Socket
Socket
Sign inDemoInstall

@react-google-maps/api

Package Overview
Dependencies
Maintainers
2
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-google-maps/api - npm Package Compare versions

Comparing version 1.5.4 to 1.6.0

4

CHANGELOG.md

@@ -19,3 +19,3 @@ # Changelog

## 1.2.3 Added MarkerClusterer refactored to typescript.
## 1.2.3 Added MarkerClusterer refactored to typescript

@@ -34,3 +34,3 @@ - Removed instans persistance feature due to bugs with google-maps-api.

- BREAKING: LoadScript wrapping div was changed to a sibling div https://github.com/JustFly1984/react-google-maps-api/commit/3f52446b756ce7dc47b5886f1a07071f6a2643ec
- BREAKING: LoadScript wrapping div was changed to a sibling div [https://github.com/JustFly1984/react-google-maps-api/commit/3f52446b756ce7dc47b5886f1a07071f6a2643ec](https://github.com/JustFly1984/react-google-maps-api/commit/3f52446b756ce7dc47b5886f1a07071f6a2643ec)
- Full embrace of strongly typed functionality. Autocomplete in your typescript projects out of the box.

@@ -37,0 +37,0 @@ - Added onLoad and onUnmount callback props for each component.

@@ -10,23 +10,45 @@ /// <reference types="googlemaps" />

options?: ClustererOptions;
/** Whether the position of a cluster marker should be the average position of all markers in the cluster. If set to false, the cluster marker is positioned at the location of the first marker added to the cluster. The default value is false. */
averageCenter?: boolean;
/** When Internet Explorer is being used, markers are processed in several batches with a small delay inserted between each batch in an attempt to avoid Javascript timeout errors. Set this property to the number of markers to be processed in a single batch; select as high a number as you can without causing a timeout error in the browser. This number might need to be as low as 100 if 15,000 markers are being managed, for example. The default value is MarkerClusterer.BATCH_SIZE_IE. */
batchSizeIE?: number;
/** The function used to determine the text to be displayed on a cluster marker and the index indicating which style to use for the cluster marker. The input parameters for the function are (1) the array of markers represented by a cluster marker and (2) the number of cluster icon styles. It returns a ClusterIconInfo object. The default calculator returns a text property which is the number of markers in the cluster and an index property which is one higher than the lowest integer such that 10^i exceeds the number of markers in the cluster, or the size of the styles array, whichever is less. The styles array element used has an index of index minus 1. For example, the default calculator returns a text value of "125" and an index of 3 for a cluster icon representing 125 markers so the element used in the styles array is 2. A calculator may also return a title property that contains the text of the tooltip to be used for the cluster marker. If title is not defined, the tooltip is set to the value of the title property for the MarkerClusterer. The default value is MarkerClusterer.CALCULATOR. */
calculator?: TCalculator;
/** The name of the CSS class defining general styles for the cluster markers. Use this class to define CSS styles that are not set up by the code that processes the styles array. The default value is "cluster". */
clusterClass?: string;
/** Whether to allow the use of cluster icons that have sizes that are some multiple (typically double) of their actual display size. Icons such as these look better when viewed on high-resolution monitors such as Apple's Retina displays. Note: if this property is true, sprites cannot be used as cluster icons. The default value is false. */
enableRetinaIcons?: boolean;
/** The grid size of a cluster in pixels. The grid is a square. The default value is 60. */
gridSize?: number;
/** Whether to ignore hidden markers in clusters. You may want to set this to true to ensure that hidden markers are not included in the marker count that appears on a cluster marker (this count is the value of the text property of the result returned by the default calculator). If set to true and you change the visibility of a marker being clustered, be sure to also call MarkerClusterer.repaint(). The default value is false. */
ignoreHidden?: boolean;
/** The extension name for the cluster icon image files (e.g., "png" or "jpg"). The default value is MarkerClusterer.IMAGE_EXTENSION. */
imageExtension?: string;
/** The full URL of the root name of the group of image files to use for cluster icons. The complete file name is of the form imagePathn.imageExtension where n is the image file number (1, 2, etc.). The default value is MarkerClusterer.IMAGE_PATH. */
imagePath?: string;
/** An array of numbers containing the widths of the group of imagePathn.imageExtension image files. (The images are assumed to be square.) The default value is MarkerClusterer.IMAGE_SIZES. */
imageSizes?: number[];
/** The maximum zoom level at which clustering is enabled or null if clustering is to be enabled at all zoom levels. The default value is null. */
maxZoom?: number;
/** The minimum number of markers needed in a cluster before the markers are hidden and a cluster marker appears. The default value is 2. */
minimumClusterSize?: number;
/** An array of ClusterIconStyle elements defining the styles of the cluster markers to be used. The element to be used to style a given cluster marker is determined by the function defined by the calculator property. The default is an array of ClusterIconStyle elements whose properties are derived from the values for imagePath, imageExtension, and imageSizes. */
styles?: ClusterIconStyle[];
/** The tooltip to display when the mouse moves over a cluster marker. (Alternatively, you can use a custom calculator function to specify a different tooltip for each cluster marker.) The default value is "". */
title?: string;
/** Whether to zoom the map when a cluster marker is clicked. You may want to set this to false if you have installed a handler for the click event and it deals with zooming on its own. The default value is true. */
zoomOnClick?: boolean;
/** This event is fired when a cluster marker is clicked. */
onClick?: (cluster: Cluster) => void;
/** This event is fired when the MarkerClusterer begins clustering markers. */
onClusteringBegin?: (markerClusterer: Clusterer) => void;
/** This event is fired when the MarkerClusterer stops clustering markers. */
onClusteringEnd?: (markerClusterer: Clusterer) => void;
/** This event is fired when the mouse moves over a cluster marker. */
onMouseOver?: (cluster: Cluster) => void;
/** This event is fired when the mouse moves out of a cluster marker. */
onMouseOut?: (cluster: Cluster) => void;
/** This callback is called when the markerClusterer instance has loaded. It is called with the markerClusterer instance. */
onLoad?: (markerClusterer: Clusterer) => void;
/** This callback is called when the component unmounts. It is called with the markerClusterer instance. */
onUnmount?: (markerClusterer: Clusterer) => void;

@@ -33,0 +55,0 @@ }

@@ -8,7 +8,13 @@ /// <reference types="googlemaps" />

options?: google.maps.DirectionsRendererOptions;
/** The directions to display on the map and/or in a <div> panel, retrieved as a DirectionsResult object from DirectionsService. */
directions?: google.maps.DirectionsResult;
/** The <div> in which to display the directions steps. */
panel?: Element;
/** The index of the route within the DirectionsResult object. The default value is 0. */
routeIndex?: number;
/** This event is fired when the rendered directions change, either when a new DirectionsResult is set or when the user finishes dragging a change to the directions path. */
onDirectionsChanged?: () => void;
/** This callback is called when the directionsRenderer instance has loaded. It is called with the directionsRenderer instance. */
onLoad?: (directionsRenderer: google.maps.DirectionsRenderer) => void;
/** This callback is called when the component unmounts. It is called with the directionsRenderer instance. */
onUnmount?: (directionsRenderer: google.maps.DirectionsRenderer) => void;

@@ -15,0 +21,0 @@ }

@@ -8,4 +8,10 @@ /// <reference types="googlemaps" />

options: google.maps.DirectionsRequest;
callback: (result: google.maps.DirectionsResult, status: google.maps.DirectionsStatus) => void;
callback: (
/** The directions response retrieved from the directions server. You can render these using a DirectionsRenderer or parse this object and render it yourself. You must display the warnings and copyrights as noted in the Google Maps Platform Terms of Service. Note that though this result is "JSON-like," it is not strictly JSON, as it indirectly includes LatLng objects */
result: google.maps.DirectionsResult,
/** The status returned by the DirectionsService on the completion of a call to route(). Specify these by value, or by using the constant's name. For example, 'OK' or google.maps.DirectionsStatus.OK */
status: google.maps.DirectionsStatus) => void;
/** This callback is called when the directionsService instance has loaded. It is called with the directionsService instance. */
onLoad?: (directionsService: google.maps.DirectionsService) => void;
/** This callback is called when the component unmounts. It is called with the directionsService instance. */
onUnmount?: (directionsService: google.maps.DirectionsService) => void;

@@ -12,0 +18,0 @@ }

@@ -8,4 +8,10 @@ /// <reference types="googlemaps" />

options: google.maps.DistanceMatrixRequest;
callback: (response: google.maps.DistanceMatrixResponse, status: google.maps.DistanceMatrixStatus) => void;
callback: (
/** The response to a DistanceMatrixService request, consisting of the formatted origin and destination addresses, and a sequence of DistanceMatrixResponseRows, one for each corresponding origin address. */
response: google.maps.DistanceMatrixResponse,
/** The top-level status about the request in general returned by the DistanceMatrixService upon completion of a distance matrix request. Specify these by value, or by using the constant's name. For example, 'OK' or google.maps.DistanceMatrixStatus.OK. */
status: google.maps.DistanceMatrixStatus) => void;
/** This callback is called when the distanceMatrixService instance has loaded. It is called with the distanceMatrixService instance. */
onLoad?: (distanceMatrixService: google.maps.DistanceMatrixService) => void;
/** This callback is called when the component unmounts. It is called with the distanceMatrixService instance. */
onUnmount?: (distanceMatrixService: google.maps.DistanceMatrixService) => void;

@@ -12,0 +18,0 @@ }

@@ -8,21 +8,41 @@ /// <reference types="googlemaps" />

options?: google.maps.CircleOptions;
/** sets the center of the circle */
center: google.maps.LatLng | google.maps.LatLngLiteral;
/** Sets the radius of this circle (in meters) */
radius: number;
/** If set to true, the user can drag this circle over the map */
draggable?: boolean;
/** If set to true, the user can edit this circle by dragging the control points shown at the center and around the circumference of the circle. */
editable?: boolean;
/** Hides this circle if set to false. */
visible?: boolean;
/** This event is fired when the DOM dblclick event is fired on the circle. */
onDblClick?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the user stops dragging the circle. */
onDragEnd?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the user starts dragging the circle. */
onDragStart?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the DOM mousedown event is fired on the circle. */
onMouseDown?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the DOM mousemove event is fired on the circle. */
onMouseMove?: (e: google.maps.MouseEvent) => void;
/** This event is fired on circle mouseout.*/
onMouseOut?: (e: google.maps.MouseEvent) => void;
/** This event is fired on circle mouseover.*/
onMouseOver?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the DOM mouseup event is fired on the circle.*/
onMouseUp?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the circle is right-clicked on.*/
onRightClick?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the circle's center is changed. */
onCenterChanged?: () => void;
/** This event is fired when the DOM click event is fired on the circle. */
onClick?: (e: google.maps.MouseEvent) => void;
/** This event is repeatedly fired while the user drags the circle.*/
onDrag?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the circle's radius is changed. */
onRadiusChanged?: () => void;
/** This callback is called when the circle instance has loaded. It is called with the circle instance. */
onLoad?: (circle: google.maps.Circle) => void;
/** This callback is called when the component unmounts. It is called with the circle instance. */
onUnmount?: (circle: google.maps.Circle) => void;

@@ -29,0 +49,0 @@ }

@@ -8,15 +8,29 @@ /// <reference types="googlemaps" />

options?: google.maps.Data.DataOptions;
/** This event is fired when a feature is added to the collection. */
onAddFeature?: (e: google.maps.Data.AddFeatureEvent) => void;
/** This event is fired for a click on the geometry. */
onClick?: (e: google.maps.MouseEvent) => void;
/** This event is fired for a double click on the geometry. */
onDblClick?: (e: google.maps.MouseEvent) => void;
/** This event is fired for a mousedown on the geometry. */
onMouseDown?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the mouse leaves the area of the geometry. */
onMouseOut?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the mouse enters the area of the geometry. */
onMouseOver?: (e: google.maps.MouseEvent) => void;
/** This event is fired for a mouseup on the geometry. */
onMouseUp?: (e: google.maps.MouseEvent) => void;
/** This event is fired when a feature is removed from the collection. */
onRemoveFeature?: (e: google.maps.Data.RemoveFeatureEvent) => void;
/** This event is fired when a feature's property is removed. */
onRemoveProperty?: (e: google.maps.Data.RemovePropertyEvent) => void;
/** This event is fired for a rightclick on the geometry. */
onRightClick?: (e: google.maps.MouseEvent) => void;
/** This event is fired when a feature's geometry is set. */
onSetGeometry?: (e: google.maps.Data.SetGeometryEvent) => void;
/** This event is fired when a feature's property is set. */
onSetProperty?: (e: google.maps.Data.SetPropertyEvent) => void;
/** This callback is called when the data instance has loaded. It is called with the data instance. */
onLoad?: (data: google.maps.Data) => void;
/** This callback is called when the component unmounts. It is called with the data instance. */
onUnmount?: (data: google.maps.Data) => void;

@@ -23,0 +37,0 @@ }

@@ -8,10 +8,19 @@ /// <reference types="googlemaps" />

options?: google.maps.drawing.DrawingManagerOptions;
/** Changes the DrawingManager's drawing mode, which defines the type of overlay to be added on the map. Accepted values are 'marker', 'polygon', 'polyline', 'rectangle', 'circle', or null. A drawing mode of null means that the user can interact with the map as normal, and clicks do not draw anything. */
drawingMode?: google.maps.drawing.OverlayType | null;
/** This event is fired when the user has finished drawing a circle. */
onCircleComplete?: (circle: google.maps.Circle) => void;
/** This event is fired when the user has finished drawing a marker. */
onMarkerComplete?: (marker: google.maps.Marker) => void;
/** This event is fired when the user has finished drawing an overlay of any type. */
onOverlayComplete?: (e: google.maps.drawing.OverlayCompleteEvent) => void;
/** This event is fired when the user has finished drawing a polygon. */
onPolygonComplete?: (polygon: google.maps.Polygon) => void;
/** This event is fired when the user has finished drawing a polyline. */
onPolylineComplete?: (polyline: google.maps.Polyline) => void;
/** This event is fired when the user has finished drawing a rectangle. */
onRectangleComplete?: (rectangle: google.maps.Rectangle) => void;
/** This callback is called when the drawingManager instance has loaded. It is called with the drawingManager instance. */
onLoad?: (drawingManager: google.maps.drawing.DrawingManager) => void;
/** This callback is called when the component unmounts. It is called with the drawingManager instance. */
onUnmount?: (drawingManager: google.maps.drawing.DrawingManager) => void;

@@ -18,0 +27,0 @@ }

@@ -7,12 +7,22 @@ /// <reference types="googlemaps" />

export interface InfoWindowProps {
/** Can be any MVCObject that exposes a LatLng position property and optionally a Point anchorPoint property for calculating the pixelOffset. The anchorPoint is the offset from the anchor's position to the tip of the InfoWindow. */
anchor?: google.maps.MVCObject;
options?: google.maps.InfoWindowOptions;
/** The LatLng at which to display this InfoWindow. If the InfoWindow is opened with an anchor, the anchor's position will be used instead. */
position?: google.maps.LatLng | google.maps.LatLngLiteral;
/** All InfoWindows are displayed on the map in order of their zIndex, with higher values displaying in front of InfoWindows with lower values. By default, InfoWindows are displayed according to their latitude, with InfoWindows of lower latitudes appearing in front of InfoWindows at higher latitudes. InfoWindows are always displayed in front of markers. */
zIndex?: number;
/** This event is fired when the close button was clicked. */
onCloseClick?: () => void;
/** This event is fired when the <div> containing the InfoWindow's content is attached to the DOM. You may wish to monitor this event if you are building out your info window content dynamically. */
onDomReady?: () => void;
/** This event is fired when the content property changes. */
onContentChanged?: () => void;
/** This event is fired when the position property changes. */
onPositionChanged?: () => void;
/** This event is fired when the InfoWindow's zIndex changes. */
onZindexChanged?: () => void;
/** This callback is called when the infoWindow instance has loaded. It is called with the infoWindow instance. */
onLoad?: (infoWindow: google.maps.InfoWindow) => void;
/** This callback is called when the component unmounts. It is called with the infoWindow instance. */
onUnmount?: (infoWindow: google.maps.InfoWindow) => void;

@@ -19,0 +29,0 @@ }

@@ -9,38 +9,75 @@ /// <reference types="googlemaps" />

options?: google.maps.MapOptions;
/** Start an animation. Any ongoing animation will be cancelled. Currently supported animations are: BOUNCE, DROP. Passing in null will cause any animation to stop. */
animation?: google.maps.Animation;
/** If true, the marker receives mouse and touch events. Default value is true. */
clickable?: boolean;
/** Mouse cursor to show on hover */
cursor?: string;
/** If true, the marker can be dragged. Default value is false. */
draggable?: boolean;
/** Icon for the foreground. If a string is provided, it is treated as though it were an Icon with the string as url. */
icon?: string | google.maps.Icon | google.maps.Symbol;
/** Adds a label to the marker. The label can either be a string, or a MarkerLabel object. */
label?: string | google.maps.MarkerLabel;
/** The marker's opacity between 0.0 and 1.0. */
opacity?: number;
/** Marker position. */
position: google.maps.LatLng | google.maps.LatLngLiteral;
/** Image map region definition used for drag/click. */
shape?: google.maps.MarkerShape;
/** Rollover text */
title?: string;
/** If true, the marker is visible */
visible?: boolean;
/** All markers are displayed on the map in order of their zIndex, with higher values displaying in front of markers with lower values. By default, markers are displayed according to their vertical position on screen, with lower markers appearing in front of markers further up the screen. */
zIndex?: number;
/** Render prop that handles clustering markers */
clusterer?: Clusterer;
/** Clusters are redrawn when a Marker is added unless noClustererRedraw? is set to true. */
noClustererRedraw?: boolean;
/** This event is fired when the marker icon was clicked. */
onClick?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the marker's clickable property changes. */
onClickableChanged?: () => void;
/** This event is fired when the marker's cursor property changes. */
onCursorChanged?: () => void;
/** This event is fired when the marker's animation property changes. */
onAnimationChanged?: () => void;
/** This event is fired when the marker icon was double clicked. */
onDblClick?: (e: google.maps.MouseEvent) => void;
/** This event is repeatedly fired while the user drags the marker. */
onDrag?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the user stops dragging the marker. */
onDragEnd?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the marker's draggable property changes. */
onDraggableChanged?: () => void;
/** This event is fired when the user starts dragging the marker. */
onDragStart?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the marker's flat property changes. */
onFlatChanged?: () => void;
/** This event is fired when the marker icon property changes. */
onIconChanged?: () => void;
/** This event is fired for a mousedown on the marker. */
onMouseDown?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the mouse leaves the area of the marker icon. */
onMouseOut?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the mouse enters the area of the marker icon. */
onMouseOver?: (e: google.maps.MouseEvent) => void;
/** This event is fired for a mouseup on the marker. */
onMouseUp?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the marker position property changes. */
onPositionChanged?: () => void;
/** This event is fired for a rightclick on the marker. */
onRightClick?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the marker's shape property changes. */
onShapeChanged?: () => void;
/** This event is fired when the marker title property changes. */
onTitleChanged?: () => void;
/** This event is fired when the marker's visible property changes. */
onVisibleChanged?: () => void;
/** This event is fired when the marker's zIndex property changes. */
onZindexChanged?: () => void;
/** This callback is called when the marker instance has loaded. It is called with the marker instance. */
onLoad?: (marker: google.maps.Marker) => void;
/** This callback is called when the component unmounts. It is called with the marker instance. */
onUnmount?: (marker: google.maps.Marker) => void;

@@ -47,0 +84,0 @@ }

@@ -8,19 +8,37 @@ /// <reference types="googlemaps" />

options?: google.maps.PolygonOptions;
/** If set to true, the user can drag this shape over the map. The geodesic property defines the mode of dragging. */
draggable?: boolean;
/** If set to true, the user can edit this shape by dragging the control points shown at the vertices and on each segment. */
editable?: boolean;
/** Hides this poly if set to false. */
visible?: boolean;
/** Sets the first path. See Paths for more details. */
path?: google.maps.MVCArray<google.maps.LatLng> | google.maps.LatLng[] | google.maps.LatLngLiteral[];
/** Sets the path for this polygon. The ordered sequence of coordinates that designates a closed loop. Unlike polylines, a polygon may consist of one or more paths. As a result, the paths property may specify one or more arrays of LatLng coordinates. Paths are closed automatically; do not repeat the first vertex of the path as the last vertex. Simple polygons may be defined using a single array of LatLngs. More complex polygons may specify an array of arrays. Any simple arrays are converted into MVCArrays. Inserting or removing LatLngs from the MVCArray will automatically update the polygon on the map. */
paths?: google.maps.MVCArray<google.maps.LatLng> | google.maps.MVCArray<google.maps.MVCArray<google.maps.LatLng>> | google.maps.LatLng[] | google.maps.LatLng[][] | google.maps.LatLngLiteral[] | google.maps.LatLngLiteral[][];
/** This event is fired when the DOM dblclick event is fired on the Polygon. */
onDblClick?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the user stops dragging the polygon. */
onDragEnd?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the user starts dragging the polygon. */
onDragStart?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the DOM mousedown event is fired on the Polygon. */
onMouseDown?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the DOM mousemove event is fired on the Polygon. */
onMouseMove?: (e: google.maps.MouseEvent) => void;
/** This event is fired on Polygon mouseout. */
onMouseOut?: (e: google.maps.MouseEvent) => void;
/** This event is fired on Polygon mouseover. */
onMouseOver?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the DOM mouseup event is fired on the Polygon. */
onMouseUp?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the Polygon is right-clicked on. */
onRightClick?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the DOM click event is fired on the Polygon. */
onClick?: (e: google.maps.MouseEvent) => void;
/** This event is repeatedly fired while the user drags the polygon. */
onDrag?: (e: google.maps.MouseEvent) => void;
/** This callback is called when the polygon instance has loaded. It is called with the polygon instance. */
onLoad?: (polygon: google.maps.Polygon) => void;
/** This callback is called when the component unmounts. It is called with the polygon instance. */
onUnmount?: (polygon: google.maps.Polygon) => void;

@@ -27,0 +45,0 @@ }

@@ -8,18 +8,35 @@ /// <reference types="googlemaps" />

options?: google.maps.PolylineOptions;
/** If set to true, the user can drag this shape over the map. The geodesic property defines the mode of dragging. */
draggable?: boolean;
/** If set to true, the user can edit this shape by dragging the control points shown at the vertices and on each segment. */
editable?: boolean;
/** Hides this poly if set to false. */
visible?: boolean;
/** Sets the path. The ordered sequence of coordinates of the Polyline. This path may be specified using either a simple array of LatLngs, or an MVCArray of LatLngs. Note that if you pass a simple array, it will be converted to an MVCArray Inserting or removing LatLngs in the MVCArray will automatically update the polyline on the map. */
path?: google.maps.MVCArray<google.maps.LatLng> | google.maps.LatLng[] | google.maps.LatLngLiteral[];
/** This event is fired when the DOM dblclick event is fired on the Polyline. */
onDblClick?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the user stops dragging the polyline. */
onDragEnd?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the user starts dragging the polyline. */
onDragStart?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the DOM mousedown event is fired on the Polyline. */
onMouseDown?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the DOM mousemove event is fired on the Polyline. */
onMouseMove?: (e: google.maps.MouseEvent) => void;
/** This event is fired on Polyline mouseout. */
onMouseOut?: (e: google.maps.MouseEvent) => void;
/** This event is fired on Polyline mouseover. */
onMouseOver?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the DOM mouseup event is fired on the Polyline. */
onMouseUp?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the Polyline is right-clicked on. */
onRightClick?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the DOM click event is fired on the Polyline. */
onClick?: (e: google.maps.MouseEvent) => void;
/** This event is repeatedly fired while the user drags the polyline. */
onDrag?: (e: google.maps.MouseEvent) => void;
/** This callback is called when the polyline instance has loaded. It is called with the polyline instance. */
onLoad?: (polyline: google.maps.Polyline) => void;
/** This callback is called when the component unmounts. It is called with the polyline instance. */
onUnmount?: (polyline: google.maps.Polyline) => void;

@@ -26,0 +43,0 @@ }

@@ -8,20 +8,39 @@ /// <reference types="googlemaps" />

options?: google.maps.RectangleOptions;
/** Sets the bounds of this rectangle. */
bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral;
/** If set to true, the user can drag this rectangle over the map. */
draggable?: boolean;
/** If set to true, the user can edit this rectangle by dragging the control points shown at the corners and on each edge. */
editable?: boolean;
/** Hides this rectangle if set to false. */
visible?: boolean;
/** Indicates whether this Rectangle handles mouse events. Defaults to true. */
clickable?: boolean;
/** This event is fired when the DOM dblclick event is fired on the rectangle. */
onDblClick?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the user stops dragging the rectangle. */
onDragEnd?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the user starts dragging the rectangle. */
onDragStart?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the DOM mousedown event is fired on the rectangle. */
onMouseDown?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the DOM mousemove event is fired on the rectangle. */
onMouseMove?: (e: google.maps.MouseEvent) => void;
/** This event is fired on rectangle mouseout. */
onMouseOut?: (e: google.maps.MouseEvent) => void;
/** This event is fired on rectangle mouseover. */
onMouseOver?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the DOM mouseup event is fired on the rectangle. */
onMouseUp?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the rectangle is right-clicked on. */
onRightClick?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the DOM click event is fired on the rectangle. */
onClick?: (e: google.maps.MouseEvent) => void;
/** This event is repeatedly fired while the user drags the rectangle. */
onDrag?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the rectangle's bounds are changed. */
onBoundsChanged?: () => void;
/** This callback is called when the rectangle instance has loaded. It is called with the rectangle instance. */
onLoad?: (rectangle: google.maps.Rectangle) => void;
/** This callback is called when the component unmounts. It is called with the rectangle instance. */
onUnmount?: (rectangle: google.maps.Rectangle) => void;

@@ -28,0 +47,0 @@ }

@@ -7,5 +7,8 @@ /// <reference types="googlemaps" />

export interface HeatmapLayerProps {
/** The data points to display. Required. */
data: google.maps.MVCArray<google.maps.LatLng | google.maps.visualization.WeightedLocation> | google.maps.LatLng[] | google.maps.visualization.WeightedLocation[];
options?: google.maps.visualization.HeatmapLayerOptions;
/** This callback is called when the heatmapLayer instance has loaded. It is called with the heatmapLayer instance. */
onLoad?: (heatmapLayer: google.maps.visualization.HeatmapLayer) => void;
/** This callback is called when the component unmounts. It is called with the heatmapLayer instance. */
onUnmount?: (heatmapLayer: google.maps.visualization.HeatmapLayer) => void;

@@ -12,0 +15,0 @@ }

@@ -8,8 +8,15 @@ /// <reference types="googlemaps" />

options?: google.maps.KmlLayerOptions;
/** The URL of the KML document to display. */
url?: string;
/** The z-index of the layer. */
zIndex?: number;
/** This event is fired when a feature in the layer is clicked. */
onClick?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the KML layers default viewport has changed. */
onDefaultViewportChanged?: () => void;
/** This event is fired when the KML layer has finished loading. At this point it is safe to read the status property to determine if the layer loaded successfully. */
onStatusChanged?: () => void;
/** This callback is called when the kmlLayer instance has loaded. It is called with the kmlLayer instance. */
onLoad: (kmlLayer: google.maps.KmlLayer) => void;
/** This callback is called when the component unmounts. It is called with the kmlLayer instance. */
onUnmount: (kmlLayer: google.maps.KmlLayer) => void;

@@ -16,0 +23,0 @@ }

@@ -7,3 +7,5 @@ /// <reference types="googlemaps" />

export interface BicyclingLayerProps {
/** This callback is called when the bicyclingLayer instance has loaded. It is called with the bicyclingLayer instance. */
onLoad?: (bicyclingLayer: google.maps.BicyclingLayer) => void;
/** This callback is called when the component unmounts. It is called with the bicyclingLayer instance. */
onUnmount?: (bicyclingLayer: google.maps.BicyclingLayer) => void;

@@ -10,0 +12,0 @@ }

@@ -8,3 +8,5 @@ /// <reference types="googlemaps" />

options?: google.maps.TrafficLayerOptions;
/** This callback is called when the component unmounts. It is called with the trafficLayer instance. */
onLoad?: (trafficLayer: google.maps.TrafficLayer) => void;
/** This callback is called when the trafficLayer instance has loaded. It is called with the trafficLayer instance. */
onUnmount?: (trafficLayer: google.maps.TrafficLayer) => void;

@@ -11,0 +13,0 @@ }

@@ -8,8 +8,15 @@ /// <reference types="googlemaps" />

options?: google.maps.GroundOverlayOptions;
/** The opacity of the overlay, expressed as a number between 0 and 1. Optional. Defaults to 1. */
opacity?: number;
/** This event is fired when the DOM dblclick event is fired on the GroundOverlay. */
onDblClick?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the DOM click event is fired on the GroundOverlay. */
onClick?: (e: google.maps.MouseEvent) => void;
/** The url of the projected image */
url: string;
/** The bounds that the image will be scaled to fit */
bounds: google.maps.LatLngBounds;
/** This callback is called when the component unmounts. It is called with the groundOverlay instance. */
onLoad?: (groundOverlay: google.maps.GroundOverlay) => void;
/** This callback is called when the groundOverlay instance has loaded. It is called with the groundOverlay instance. */
onUnmount?: (groundOverlay: google.maps.GroundOverlay) => void;

@@ -16,0 +23,0 @@ }

@@ -8,9 +8,16 @@ /// <reference types="googlemaps" />

children: React.ReactChild;
/** The area in which to search for places. */
bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral;
/** The component restrictions. Component restrictions are used to restrict predictions to only those within the parent component. For example, the country. */
restrictions?: google.maps.places.ComponentRestrictions;
/** Fields to be included for the Place in the details response when the details are successfully retrieved. For a list of fields see PlaceResult. Nested fields can be specified with dot-paths (for example, "geometry.location"). */
fields?: string[];
options?: google.maps.places.AutocompleteOptions;
/** The types of predictions to be returned. For a list of supported types, see the developer's guide. If nothing is specified, all types are returned. In general only a single type is allowed. The exception is that you can safely mix the 'geocode' and 'establishment' types, but note that this will have the same effect as specifying no types. */
types?: string[];
/** This event is fired when a PlaceResult is made available for a Place the user has selected. If the user enters the name of a Place that was not suggested by the control and presses the Enter key, or if a Place Details request fails, the PlaceResult contains the user input in the name property, with no other properties defined. */
onPlaceChanged?: () => void;
/** This callback is called when the component unmounts. It is called with the autocomplete instance. */
onLoad?: (autocomplete: google.maps.places.Autocomplete) => void;
/** This callback is called when the autocomplete instance has loaded. It is called with the autocomplete instance. */
onUnmount?: (autocomplete: google.maps.places.Autocomplete) => void;

@@ -17,0 +24,0 @@ }

@@ -7,6 +7,10 @@ /// <reference types="googlemaps" />

export interface StandaloneSearchBoxProps {
/** The area towards which to bias query predictions. Predictions are biased towards, but not restricted to, queries targeting these bounds. */
bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral;
options?: google.maps.places.SearchBoxOptions;
/** This event is fired when the user selects a query, getPlaces should be used to get new places. */
onPlacesChanged?: () => void;
/** This callback is called when the component unmounts. It is called with the searchBox instance. */
onLoad?: (searchBox: google.maps.places.SearchBox) => void;
/** This callback is called when the searchBox instance has loaded. It is called with the searchBox instance. */
onUnmount?: (searchBox: google.maps.places.SearchBox) => void;

@@ -13,0 +17,0 @@ }

@@ -8,11 +8,21 @@ /// <reference types="googlemaps" />

options?: google.maps.StreetViewPanoramaOptions;
onCloseclick?: (event: google.maps.event) => void;
/** This event is fired when the close button is clicked. */
onCloseclick?: (event: google.maps.MouseEvent) => void;
/** This event is fired when the panorama's pano id changes. The pano may change as the user navigates through the panorama or the position is manually set. Note that not all position changes trigger a pano_changed. */
onPanoChanged?: () => void;
/** This event is fired when the panorama's position changes. The position changes as the user navigates through the panorama or the position is set manually. */
onPositionChanged?: () => void;
/** This event is fired when the panorama's point-of-view changes. The point of view changes as the pitch, zoom, or heading changes. */
onPovChanged?: () => void;
/** Developers should trigger this event on the panorama when its div changes size: google.maps.event.trigger(panorama, 'resize'). */
onResize?: () => void;
/** This event is fired after every panorama lookup by id or location, via setPosition() or setPano(). */
onStatusChanged?: () => void;
/** This event is fired when the panorama's visibility changes. The visibility is changed when the Pegman is dragged onto the map, the close button is clicked, or setVisible() is called. */
onVisibleChanged?: () => void;
/** This event is fired when the panorama's zoom level changes. */
onZoomChange?: () => void;
/** This callback is called when the component unmounts. It is called with the streetViewPanorama instance. */
onLoad?: (streetViewPanorama: google.maps.StreetViewPanorama) => void;
/** This callback is called when the streetViewPanorama instance has loaded. It is called with the streetViewPanorama instance. */
onUnmount?: (streetViewPanorama: google.maps.StreetViewPanorama) => void;

@@ -19,0 +29,0 @@ }

/// <reference types="googlemaps" />
import * as React from "react";
export interface StreetViewServiceProps {
/** This callback is called when the component unmounts. It is called with the streetViewService instance. */
onLoad?: (streetViewService: google.maps.StreetViewService | null) => void;
/** This callback is called when the streetViewService instance has loaded. It is called with the streetViewService instance. */
onUnmount?: (streetViewService: google.maps.StreetViewService | null) => void;

@@ -6,0 +8,0 @@ }

@@ -11,30 +11,59 @@ /// <reference types="googlemaps" />

options?: google.maps.MapOptions;
/** Additional map types to overlay. Overlay map types will display on top of the base map they are attached to, in the order in which they appear in the overlayMapTypes array (overlays with higher index values are displayed in front of overlays with lower index values). */
extraMapTypes?: google.maps.MapType[];
/** The initial Map center. */
center?: google.maps.LatLng | google.maps.LatLngLiteral;
/** When false, map icons are not clickable. A map icon represents a point of interest, also known as a POI. By default map icons are clickable. */
clickableIcons?: boolean;
/** The heading for aerial imagery in degrees measured clockwise from cardinal direction North. Headings are snapped to the nearest available angle for which imagery is available. */
heading?: number;
/** The initial Map mapTypeId. Defaults to ROADMAP. */
mapTypeId?: string;
/** A StreetViewPanorama to display when the Street View pegman is dropped on the map. If no panorama is specified, a default StreetViewPanorama will be displayed in the map's div when the pegman is dropped. */
streetView?: google.maps.StreetViewPanorama;
/** Controls the automatic switching behavior for the angle of incidence of the map. The only allowed values are 0 and 45. The value 0 causes the map to always use a 0° overhead view regardless of the zoom level and viewport. The value 45 causes the tilt angle to automatically switch to 45 whenever 45° imagery is available for the current zoom level and viewport, and switch back to 0 whenever 45° imagery is not available (this is the default behavior). 45° imagery is only available for satellite and hybrid map types, within some locations, and at some zoom levels. Note: getTilt returns the current tilt angle, not the value specified by this option. Because getTilt and this option refer to different things, do not bind() the tilt property; doing so may yield unpredictable effects. */
tilt?: number;
/** The initial Map zoom level. Required. Valid values: Integers between zero, and up to the supported maximum zoom level. */
zoom?: number;
/** This event is fired when the user clicks on the map. An ApiMouseEvent with properties for the clicked location is returned unless a place icon was clicked, in which case an IconMouseEvent with a placeid is returned. IconMouseEvent and ApiMouseEvent are identical, except that IconMouseEvent has the placeid field. The event can always be treated as an ApiMouseEvent when the placeid is not important. The click event is not fired if a marker or infowindow was clicked. */
onClick?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the user double-clicks on the map. Note that the click event will also fire, right before this one. */
onDblClick?: (e: google.maps.MouseEvent) => void;
/** This event is repeatedly fired while the user drags the map. */
onDrag?: () => void;
/** This event is fired when the user stops dragging the map. */
onDragEnd?: () => void;
/** This event is fired when the user starts dragging the map. */
onDragStart?: () => void;
/** This event is fired when the mapTypeId property changes. */
onMapTypeIdChanged?: () => void;
/** This event is fired whenever the user's mouse moves over the map container. */
onMouseMove?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the user's mouse exits the map container. */
onMouseOut?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the user's mouse enters the map container. */
onMouseOver?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the DOM contextmenu event is fired on the map container. */
onRightClick?: (e: google.maps.MouseEvent) => void;
/** This event is fired when the visible tiles have finished loading. */
onTilesLoaded?: () => void;
/** This event is fired when the viewport bounds have changed. */
onBoundsChanged?: () => void;
/** This event is fired when the map center property changes. */
onCenterChanged?: () => void;
/** This event is fired when the map heading property changes. */
onHeadingChanged?: () => void;
/** This event is fired when the map becomes idle after panning or zooming. */
onIdle?: () => void;
/** This event is fired when the projection has changed. */
onProjectionChanged?: () => void;
/** This event is fired when the map size has changed. */
onResize?: () => void;
/** This event is fired when the map tilt property changes. */
onTiltChanged?: () => void;
/** This event is fired when the map zoom property changes. */
onZoomChanged?: () => void;
/** This callback is called when the component unmounts. It is called with the map instance. */
onLoad?: (map: google.maps.Map) => void | Promise<void>;
/** This callback is called when the map instance has loaded. It is called with the map instance. */
onUnmount?: (map: google.maps.Map) => void | Promise<void>;

@@ -41,0 +70,0 @@ }

@@ -1,2 +0,2 @@

"use strict";var e,t=require("react"),n=(e=require("invariant"))&&"object"==typeof e&&"default"in e?e.default:e,o=require("@react-google-maps/marker-clusterer"),r=require("react-dom");function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var a=t.createContext(null),p=function(e,t,n){return Object.keys(e).reduce(function(n,o){return t(n,e[o],o)},n)},c=function(e,t,n,o){var r,s,i={};return r=e,s=function(e,r){var s=n[r];s!==t[r]&&(i[r]=s,e(o,s))},Object.keys(r).forEach(function(e){return s(r[e],e)}),i};function l(e){google.maps.event.removeListener(e)}function u(e){void 0===e&&(e=[]),e.map(l)}function d(e){var t=e.updaterMap,n=e.prevProps,o=e.nextProps,r=e.instance,s=function(t,n,o){return p(e.eventMap,function(e,o,r){return"function"==typeof t[r]&&e.push(google.maps.event.addListener(n,o,t[r])),e},[])}(o,r);return c(t,n,o,r),s}var h={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},g={extraMapTypes:function(e,t){t.forEach(function(t,n){e.mapTypes.set(String(n),t)})},center:function(e,t){e.setCenter(t)},clickableIcons:function(e,t){e.setClickableIcons(t)},heading:function(e,t){e.setHeading(t)},mapTypeId:function(e,t){e.setMapTypeId(t)},options:function(e,t){e.setOptions(t)},streetView:function(e,t){e.setStreetView(t)},tilt:function(e,t){e.setTilt(t)},zoom:function(e,t){e.setZoom(t)}},m=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state={map:null},t.registeredEvents=[],t.mapRef=null,t.getInstance=function(){return new google.maps.Map(t.mapRef,t.props.options)},t.setMapCallback=function(){null!==t.state.map&&t.props.onLoad&&t.props.onLoad(t.state.map)},t.getRef=function(e){t.mapRef=e},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=this.getInstance();this.registeredEvents=d({updaterMap:g,eventMap:h,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{map:e}},this.setMapCallback)},o.componentDidUpdate=function(e){null!==this.state.map&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:g,eventMap:h,prevProps:e,nextProps:this.props,instance:this.state.map}))},o.componentWillUnmount=function(){null!==this.state.map&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),u(this.registeredEvents))},o.render=function(){return t.createElement("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName},t.createElement(a.Provider,{value:this.state.map},null!==this.state.map?this.props.children:t.createElement(t.Fragment,null)))},n}(t.PureComponent),f="undefined"!=typeof document,v=function(e){var t=e.url,n=e.id;return f?new Promise(function(e,o){var r=document.getElementById(n),s=window;if(r){if(r.src===t){if("ready"===r.getAttribute("data-state"))return e(n);var i=s.initMap;return void(s.initMap=function(){i&&i(),e(n)})}r.remove()}var a=document.createElement("script");a.type="text/javascript",a.src=t,a.id=n,a.async=!0,a.onerror=o,s.initMap=function(){a.setAttribute("data-state","ready"),e(n)},document.head.appendChild(a)}).catch(function(e){console.error("injectScript error: ",e)}):Promise.reject(new Error("document is undefined"))},y=function(e){return!((!e.href||0!==e.href.indexOf("https://fonts.googleapis.com/css?family=Roboto"))&&("style"===e.tagName.toLowerCase()&&e.styleSheet&&e.styleSheet.cssText&&0===e.styleSheet.cssText.replace("\r\n","").indexOf(".gm-style")?(e.styleSheet.cssText="",0):"style"===e.tagName.toLowerCase()&&e.innerHTML&&0===e.innerHTML.replace("\r\n","").indexOf(".gm-style")?(e.innerHTML="",0):"style"!==e.tagName.toLowerCase()||e.styleSheet||e.innerHTML))},M=function(){var e=document.getElementsByTagName("head")[0],t=e.insertBefore.bind(e);e.insertBefore=function(n,o){y(n)||Reflect.apply(t,e,[n,o])};var n=e.appendChild.bind(e);e.appendChild=function(t){y(t)||Reflect.apply(n,e,[t])}};function C(e){var t=e.googleMapsApiKey,o=e.googleMapsClientId,r=e.version,s=void 0===r?"weekly":r,i=e.language,a=e.region,p=e.libraries,c=[];return t&&o||!t||!o||n(!1),t?c.push("key="+t):o&&c.push("client="+o),s&&c.push("v="+s),i&&c.push("language="+i),a&&c.push("region="+a),p&&p.length&&c.push("libraries="+p.sort().join(",")),c.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?"+c.join("&")}var E=!1;function x(){return t.createElement("div",null,"Loading...")}var P,k={id:"script-loader",version:"weekly"},w=function(e){function o(){var o;return(o=e.apply(this,arguments)||this).check=t.createRef(),o.state={loaded:!1},o.cleanupCallback=function(){delete window.google,o.injectScript()},o.isCleaningUp=function(){try{return Promise.resolve(new Promise(function(e){if(E){if(f)var t=window.setInterval(function(){E||(window.clearInterval(t),e())},1)}else e()}))}catch(e){return Promise.reject(e)}},o.cleanup=function(){E=!0;var e=document.getElementById(o.props.id);e&&e.parentNode&&e.parentNode.removeChild(e),Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function(e){return e.src.includes("maps.googleapis")}).forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function(e){return"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"===e.href}).forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function(e){return void 0!==e.innerText&&e.innerText.length>0&&e.innerText.includes(".gm-")}).forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)})},o.injectScript=function(){o.props.preventGoogleFontsLoading&&M(),o.props.id||n(!1);var e={id:o.props.id,url:C(o.props)};v(e).then(function(){o.props.onLoad&&o.props.onLoad(),o.setState(function(){return{loaded:!0}})}).catch(function(e){o.props.onError&&o.props.onError(e),console.error("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key ("+(o.props.googleMapsApiKey||"-")+") or Client ID ("+(o.props.googleMapsClientId||"-")+") to <LoadScript />\n Otherwise it is a Network issue.\n ")})},o}i(o,e);var r=o.prototype;return r.componentDidMount=function(){if(f){if(window.google&&!E)return void console.error("google api is already presented");this.isCleaningUp().then(this.injectScript).catch(function(e){console.error("Error at injecting script after cleaning up: ",e)})}},r.componentDidUpdate=function(e){this.props.libraries!==e.libraries&&console.warn("Performance warning! Loadscript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable ounside of component, or somwhere in config files or ENV variables"),f&&e.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},r.componentWillUnmount=function(){var e=this;f&&(this.cleanup(),window.setTimeout(function(){e.check.current||(delete window.google,E=!1)},1),this.props.onUnmount&&this.props.onUnmount())},r.render=function(){return t.createElement(t.Fragment,null,t.createElement("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||t.createElement(x,null))},o}(t.PureComponent);function b(e){var o=e.id,r=void 0===o?k.id:o,s=e.version,i=void 0===s?k.version:s,a=e.googleMapsApiKey,p=e.googleMapsClientId,c=e.language,l=e.region,u=e.libraries,d=e.preventGoogleFontsLoading,h=t.useRef(!1),g=t.useState(!1),m=g[0],y=g[1],E=t.useState(void 0),x=E[0],w=E[1];t.useEffect(function(){return h.current=!0,function(){h.current=!1}},[]),t.useEffect(function(){f&&d&&M()},[d]),t.useEffect(function(){m&&(window.google||n(!1))},[m]);var b=C({version:i,googleMapsApiKey:a,googleMapsClientId:p,language:c,region:l,libraries:u});t.useEffect(function(){function e(){h.current&&(y(!0),P=b)}f&&(window.google&&P===b?e():v({id:r,url:b}).then(e).catch(function(e){h.current&&w(e),console.warn("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key ("+(a||"-")+") or Client ID ("+(p||"-")+")\n Otherwise it is a Network issue.\n "),console.error(e)}))},[r,b]);var L=t.useRef();return t.useEffect(function(){L.current&&u!==L.current&&console.warn("Performance warning! Loadscript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),L.current=u},[u]),{isLoaded:m,loadError:x,url:b}}w.defaultProps=k;var L=t.createElement(x,null);function D(e){var n=e.loadingElement,o=e.onLoad,r=e.onError,s=e.onUnmount,i=e.children,a=b(function(e,t){if(null==e)return{};var n,o,r={},s=Object.keys(e);for(o=0;o<s.length;o++)t.indexOf(n=s[o])>=0||(r[n]=e[n]);return r}(e,["loadingElement","onLoad","onError","onUnmount","children"])),p=a.isLoaded,c=a.loadError;return t.useEffect(function(){p&&"function"==typeof o&&o()},[p,o]),t.useEffect(function(){c&&"function"==typeof r&&r(c)},[c,r]),t.useEffect(function(){return function(){s&&s()}},[s]),p?i:n||L}var S=t.memo(D),U={},O={options:function(e,t){e.setOptions(t)}},R=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).state={trafficLayer:null},t.setTrafficLayerCallback=function(){null!==t.state.trafficLayer&&t.props.onLoad&&t.props.onLoad(t.state.trafficLayer)},t.registeredEvents=[],t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.TrafficLayer(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:O,eventMap:U,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{trafficLayer:e}},this.setTrafficLayerCallback)},n.componentDidUpdate=function(e){null!==this.state.trafficLayer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:O,eventMap:U,prevProps:e,nextProps:this.props,instance:this.state.trafficLayer}))},n.componentWillUnmount=function(){null!==this.state.trafficLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),u(this.registeredEvents),this.state.trafficLayer.setMap(null))},n.render=function(){return null},t}(t.PureComponent);R.contextType=a;var T=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).state={bicyclingLayer:null},t.setBicyclingLayerCallback=function(){null!==t.state.bicyclingLayer&&(t.state.bicyclingLayer.setMap(t.context),t.props.onLoad&&t.props.onLoad(t.state.bicyclingLayer))},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:e}},this.setBicyclingLayerCallback)},n.componentWillUnmount=function(){null!==this.state.bicyclingLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},n.render=function(){return null},t}(t.PureComponent);T.contextType=a;var V={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},_={drawingMode:function(e,t){e.setDrawingMode(t)},options:function(e,t){e.setOptions(t)}},I=function(e){function o(t){var o;return(o=e.call(this,t)||this).registeredEvents=[],o.state={drawingManager:null},o.setDrawingManagerCallback=function(){null!==o.state.drawingManager&&o.props.onLoad&&o.props.onLoad(o.state.drawingManager)},google.maps.drawing||n(!1),o}i(o,e);var r=o.prototype;return r.componentDidMount=function(){var e=new google.maps.drawing.DrawingManager(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:_,eventMap:V,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{drawingManager:e}},this.setDrawingManagerCallback)},r.componentDidUpdate=function(e){null!==this.state.drawingManager&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:_,eventMap:V,prevProps:e,nextProps:this.props,instance:this.state.drawingManager}))},r.componentWillUnmount=function(){null!==this.state.drawingManager&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),u(this.registeredEvents),this.state.drawingManager.setMap(null))},r.render=function(){return t.createElement(t.Fragment,null)},o}(t.PureComponent);I.contextType=a;var W={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},A={animation:function(e,t){e.setAnimation(t)},clickable:function(e,t){e.setClickable(t)},cursor:function(e,t){e.setCursor(t)},draggable:function(e,t){e.setDraggable(t)},icon:function(e,t){e.setIcon(t)},label:function(e,t){e.setLabel(t)},map:function(e,t){e.setMap(t)},opacity:function(e,t){e.setOpacity(t)},options:function(e,t){e.setOptions(t)},position:function(e,t){e.setPosition(t)},shape:function(e,t){e.setShape(t)},title:function(e,t){e.setTitle(t)},visible:function(e,t){e.setVisible(t)},zIndex:function(e,t){e.setZIndex(t)}},B=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={marker:null},t.setMarkerCallback=function(){null!==t.state.marker&&t.props.onLoad&&t.props.onLoad(t.state.marker)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=s({},this.props.options||{},{},this.props.clusterer?{}:{map:this.context},{position:this.props.position}),t=new google.maps.Marker(e);this.props.clusterer?this.props.clusterer.addMarker(t,!!this.props.noClustererRedraw):t.setMap(this.context),this.registeredEvents=d({updaterMap:A,eventMap:W,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{marker:t}},this.setMarkerCallback)},n.componentDidUpdate=function(e){null!==this.state.marker&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:A,eventMap:W,prevProps:e,nextProps:this.props,instance:this.state.marker}))},n.componentWillUnmount=function(){null!==this.state.marker&&(this.props.onUnmount&&this.props.onUnmount(this.state.marker),u(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.state.marker,!!this.props.noClustererRedraw):this.state.marker&&this.state.marker.setMap(null))},n.render=function(){return this.props.children||null},t}(t.PureComponent);B.contextType=a;var N={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},j={averageCenter:function(e,t){e.setAverageCenter(t)},batchSizeIE:function(e,t){e.setBatchSizeIE(t)},calculator:function(e,t){e.setCalculator(t)},clusterClass:function(e,t){e.setClusterClass(t)},enableRetinaIcons:function(e,t){e.setEnableRetinaIcons(t)},gridSize:function(e,t){e.setGridSize(t)},ignoreHidden:function(e,t){e.setIgnoreHidden(t)},imageExtension:function(e,t){e.setImageExtension(t)},imagePath:function(e,t){e.setImagePath(t)},imageSizes:function(e,t){e.setImageSizes(t)},maxZoom:function(e,t){e.setMaxZoom(t)},minimumClusterSize:function(e,t){e.setMinimumClusterSize(t)},styles:function(e,t){e.setStyles(t)},title:function(e,t){e.setTitle(t)},zoomOnClick:function(e,t){e.setZoomOnClick(t)}},z=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={markerClusterer:null},t.setClustererCallback=function(){null!==t.state.markerClusterer&&t.props.onLoad&&t.props.onLoad(t.state.markerClusterer)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){if(this.context){var e=new o.Clusterer(this.context,[],this.props.options);this.registeredEvents=d({updaterMap:j,eventMap:N,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{markerClusterer:e}},this.setClustererCallback)}},n.componentDidUpdate=function(e){this.state.markerClusterer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:j,eventMap:N,prevProps:e,nextProps:this.props,instance:this.state.markerClusterer}))},n.componentWillUnmount=function(){null!==this.state.markerClusterer&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),u(this.registeredEvents),this.state.markerClusterer.setMap(null))},n.render=function(){return null!==this.state.markerClusterer?this.props.children(this.state.markerClusterer):null},t}(t.PureComponent);z.contextType=a;var F={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},G={options:function(e,t){e.setOptions(t)},position:function(e,t){e.setPosition(t)},zIndex:function(e,t){e.setZIndex(t)}},H=function(e){function o(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.containerElement=null,t.state={infoWindow:null},t.open=function(e,o){o?e.open(t.context,o):e.getPosition()?e.open(t.context):n(!1)},t.setInfowindowCallback=function(){null!==t.state.infoWindow&&null!==t.containerElement&&(t.state.infoWindow.setContent(t.containerElement),t.open(t.state.infoWindow,t.props.anchor),t.props.onLoad&&t.props.onLoad(t.state.infoWindow))},t}i(o,e);var a=o.prototype;return a.componentDidMount=function(){var e=new google.maps.InfoWindow(s({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=d({updaterMap:G,eventMap:F,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{infoWindow:e}},this.setInfowindowCallback)},a.componentDidUpdate=function(e){null!==this.state.infoWindow&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:G,eventMap:F,prevProps:e,nextProps:this.props,instance:this.state.infoWindow}))},a.componentWillUnmount=function(){null!==this.state.infoWindow&&(u(this.registeredEvents),this.state.infoWindow.close())},a.render=function(){return this.containerElement?r.createPortal(t.Children.only(this.props.children),this.containerElement):t.createElement(t.Fragment,null)},o}(t.PureComponent);H.contextType=a;var Z={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},K={draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},path:function(e,t){e.setPath(t)},visible:function(e,t){e.setVisible(t)}},q=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={polyline:null},t.setPolylineCallback=function(){null!==t.state.polyline&&t.props.onLoad&&t.props.onLoad(t.state.polyline)},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=new google.maps.Polyline(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:K,eventMap:Z,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{polyline:e}},this.setPolylineCallback)},o.componentDidUpdate=function(e){null!==this.state.polyline&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:K,eventMap:Z,prevProps:e,nextProps:this.props,instance:this.state.polyline}))},o.componentWillUnmount=function(){null!==this.state.polyline&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),u(this.registeredEvents),this.state.polyline.setMap(null))},o.render=function(){return t.createElement(t.Fragment,null)},n}(t.PureComponent);q.contextType=a;var Y={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},J={draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},path:function(e,t){e.setPath(t)},paths:function(e,t){e.setPaths(t)},visible:function(e,t){e.setVisible(t)}},Q=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={polygon:null},t.setPolygonCallback=function(){null!==t.state.polygon&&t.props.onLoad&&t.props.onLoad(t.state.polygon)},t.render=function(){return null},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.Polygon(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:J,eventMap:Y,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{polygon:e}},this.setPolygonCallback)},n.componentDidUpdate=function(e){null!==this.state.polygon&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:J,eventMap:Y,prevProps:e,nextProps:this.props,instance:this.state.polygon}))},n.componentWillUnmount=function(){null!==this.state.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),u(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},t}(t.PureComponent);Q.contextType=a;var X={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"},$={bounds:function(e,t){e.setBounds(t)},draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},visible:function(e,t){e.setVisible(t)}},ee=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={rectangle:null},t.setRectangleCallback=function(){null!==t.state.rectangle&&t.props.onLoad&&t.props.onLoad(t.state.rectangle)},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=new google.maps.Rectangle(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:$,eventMap:X,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{rectangle:e}},this.setRectangleCallback)},o.componentDidUpdate=function(e){null!==this.state.rectangle&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:$,eventMap:X,prevProps:e,nextProps:this.props,instance:this.state.rectangle}))},o.componentWillUnmount=function(){null!==this.state.rectangle&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),u(this.registeredEvents),this.state.rectangle.setMap(null))},o.render=function(){return t.createElement(t.Fragment,null)},n}(t.PureComponent);ee.contextType=a;var te={onCenterChanged:"center_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRadiusChanged:"radius_changed",onRightClick:"rightclick"},ne={center:function(e,t){e.setCenter(t)},draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},radius:function(e,t){e.setRadius(t)},visible:function(e,t){e.setVisible(t)}},oe=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={circle:null},t.setCircleCallback=function(){null!==t.state.circle&&t.props.onLoad&&t.props.onLoad(t.state.circle)},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=new google.maps.Circle(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:ne,eventMap:te,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{circle:e}},this.setCircleCallback)},o.componentDidUpdate=function(e){null!==this.state.circle&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:ne,eventMap:te,prevProps:e,nextProps:this.props,instance:this.state.circle}))},o.componentWillUnmount=function(){null!==this.state.circle&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),u(this.registeredEvents),this.state.circle&&this.state.circle.setMap(null))},o.render=function(){return t.createElement(t.Fragment,null)},n}(t.PureComponent);oe.contextType=a;var re={onAddFeature:"addfeature",onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onRightClick:"rightclick",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},se={add:function(e,t){e.add(t)},addgeojson:function(e,t,n){e.addGeoJson(t,n)},contains:function(e,t){e.contains(t)},foreach:function(e,t){e.forEach(t)},loadgeojson:function(e,t,n,o){e.loadGeoJson(t,n,o)},overridestyle:function(e,t,n){e.overrideStyle(t,n)},remove:function(e,t){e.remove(t)},revertstyle:function(e,t){e.revertStyle(t)},controlposition:function(e,t){e.setControlPosition(t)},controls:function(e,t){e.setControls(t)},drawingmode:function(e,t){e.setDrawingMode(t)},map:function(e,t){e.setMap(t)},style:function(e,t){e.setStyle(t)},togeojson:function(e,t){e.toGeoJson(t)}},ie=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={data:null},t.setDataCallback=function(){null!==t.state.data&&t.props.onLoad&&t.props.onLoad(t.state.data)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.Data(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:se,eventMap:re,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{data:e}},this.setDataCallback)},n.componentDidUpdate=function(e){null!==this.state.data&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:se,eventMap:re,prevProps:e,nextProps:this.props,instance:this.state.data}))},n.componentWillUnmount=function(){null!==this.state.data&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),u(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},n.render=function(){return null},t}(t.PureComponent);ie.contextType=a;var ae={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},pe={options:function(e,t){e.setOptions(t)},url:function(e,t){e.setUrl(t)},zIndex:function(e,t){e.setZIndex(t)}},ce=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={kmlLayer:null},t.setKmlLayerCallback=function(){null!==t.state.kmlLayer&&t.props.onLoad&&t.props.onLoad(t.state.kmlLayer)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.KmlLayer(s({},this.props.options,{map:this.context}));this.registeredEvents=d({updaterMap:pe,eventMap:ae,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{kmlLayer:e}},this.setKmlLayerCallback)},n.componentDidUpdate=function(e){null!==this.state.kmlLayer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:pe,eventMap:ae,prevProps:e,nextProps:this.props,instance:this.state.kmlLayer}))},n.componentWillUnmount=function(){null!==this.state.kmlLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),u(this.registeredEvents),this.state.kmlLayer.setMap(null))},n.render=function(){return null},t}(t.PureComponent);ce.contextType=a;var le=function(e,t){return new t(e.lat,e.lng)},ue=function(e,t){return new t(new google.maps.LatLng(e.ne.lat,e.ne.lng),new google.maps.LatLng(e.sw.lat,e.sw.lng))},de=function(e,t,n){return e instanceof t?e:n(e,t)},he=function(e,t,n,o){return void 0!==n?function(e,t,n){var o=e.fromLatLngToDivPixel(n.getNorthEast()),r=e.fromLatLngToDivPixel(n.getSouthWest());return o&&r?{left:r.x+t.x+"px",top:o.y+t.y+"px",width:o.x-r.x-t.x+"px",height:r.y-o.y-t.y+"px"}:{left:"-9999px",top:"-9999px"}}(e,t,de(n,google.maps.LatLngBounds,ue)):function(e,t,n){var o=e.fromLatLngToDivPixel(n);return o?{left:o.x+t.x+"px",top:o.y+t.y+"px"}:{left:"-9999px",top:"-9999px"}}(e,t,de(o,google.maps.LatLng,le))},ge=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onLoad&&this.props.onLoad()},n.render=function(){return this.props.children},t}(t.Component),me=function(e){function o(){var t;return(t=e.apply(this,arguments)||this).state={overlayView:null},t.containerElement=null,t.setOverlayViewCallback=function(){null!==t.state.overlayView&&t.props.onLoad&&t.props.onLoad(t.state.overlayView),t.onPositionElement()},t.onAdd=function(){t.containerElement=document.createElement("div"),t.containerElement.style.position="absolute"},t.onPositionElement=function(){if(null!==t.state.overlayView&&null!==t.containerElement){var e=t.state.overlayView.getProjection(),n=s({x:0,y:0},(r=t.containerElement,"function"==typeof(i=t.props.getPixelPositionOffset)?i(r.offsetWidth,r.offsetHeight):{})),o=he(e,n,t.props.bounds,t.props.position);Object.assign(t.containerElement.style,o)}var r,i},t.draw=function(){t.props.mapPaneName||n(!1);var e=t.state.overlayView;if(null!==e){var o=e.getPanes();o&&(t.containerElement&&o[t.props.mapPaneName].appendChild(t.containerElement),t.onPositionElement(),t.forceUpdate())}},t.onRemove=function(){null!==t.containerElement&&t.containerElement.parentNode&&(t.containerElement.parentNode.removeChild(t.containerElement),delete t.containerElement)},t}i(o,e);var a=o.prototype;return a.componentDidMount=function(){var e=new google.maps.OverlayView;e.onAdd=this.onAdd,e.draw=this.draw,e.onRemove=this.onRemove,e.setMap(this.context),this.setState(function(){return{overlayView:e}})},a.componentDidUpdate=function(e){var t=this;e.position===this.props.position&&e.bounds===this.props.bounds||setTimeout(function(){null!==t.state.overlayView&&t.state.overlayView.draw()},0)},a.componentWillUnmount=function(){null!==this.state.overlayView&&(this.props.onUnmount&&this.props.onUnmount(this.state.overlayView),this.state.overlayView.setMap(null))},a.render=function(){return null!==this.containerElement?r.createPortal(t.createElement(ge,{onLoad:this.setOverlayViewCallback},t.Children.only(this.props.children)),this.containerElement):t.createElement(t.Fragment,null)},o}(t.PureComponent);me.FLOAT_PANE="floatPane",me.MAP_PANE="mapPane",me.MARKER_LAYER="markerLayer",me.OVERLAY_LAYER="overlayLayer",me.OVERLAY_MOUSE_TARGET="overlayMouseTarget",me.contextType=a;var fe={onDblClick:"dblclick",onClick:"click"},ve={opacity:function(e,t){e.setOpacity(t)}},ye=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={groundOverlay:null},t.setGroundOverlayCallback=function(){null!==t.state.groundOverlay&&t.props.onLoad&&t.props.onLoad(t.state.groundOverlay)},t}i(t,e);var o=t.prototype;return o.componentDidMount=function(){this.props.url||this.props.bounds||n(!1);var e=new google.maps.GroundOverlay(this.props.url,this.props.bounds,s({},this.props.options,{map:this.context}));this.registeredEvents=d({updaterMap:ve,eventMap:fe,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{groundOverlay:e}},this.setGroundOverlayCallback)},o.componentDidUpdate=function(e){null!==this.state.groundOverlay&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:ve,eventMap:fe,prevProps:e,nextProps:this.props,instance:this.state.groundOverlay}))},o.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},o.render=function(){return null},t}(t.PureComponent);ye.defaultProps={onLoad:function(){}},ye.contextType=a;var Me={},Ce={data:function(e,t){e.setData(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)}},Ee=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={heatmapLayer:null},t.setHeatmapLayerCallback=function(){null!==t.state.heatmapLayer&&t.props.onLoad&&t.props.onLoad(t.state.heatmapLayer)},t}i(t,e);var o=t.prototype;return o.componentDidMount=function(){google.maps.visualization||n(!1),this.props.data||n(!1);var e=new google.maps.visualization.HeatmapLayer(s({data:this.props.data},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:Ce,eventMap:Me,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{heatmapLayer:e}},this.setHeatmapLayerCallback)},o.componentDidUpdate=function(e){u(this.registeredEvents),this.registeredEvents=d({updaterMap:Ce,eventMap:Me,prevProps:e,nextProps:this.props,instance:this.state.heatmapLayer})},o.componentWillUnmount=function(){null!==this.state.heatmapLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),u(this.registeredEvents),this.state.heatmapLayer.setMap(null))},o.render=function(){return null},t}(t.PureComponent);Ee.contextType=a;var xe={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Pe={register:function(e,t,n){e.registerPanoProvider(t,n)},links:function(e,t){e.setLinks(t)},motionTracking:function(e,t){e.setMotionTracking(t)},options:function(e,t){e.setOptions(t)},pano:function(e,t){e.setPano(t)},position:function(e,t){e.setPosition(t)},pov:function(e,t){e.setPov(t)},visible:function(e,t){e.setVisible(t)},zoom:function(e,t){e.setZoom(t)}},ke=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={streetViewPanorama:null},t.setStreetViewPanoramaCallback=function(){null!==t.state.streetViewPanorama&&t.props.onLoad&&t.props.onLoad(t.state.streetViewPanorama)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this.context.getStreetView();this.registeredEvents=d({updaterMap:Pe,eventMap:xe,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{streetViewPanorama:e}},this.setStreetViewPanoramaCallback)},n.componentDidUpdate=function(e){null!==this.state.streetViewPanorama&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:Pe,eventMap:xe,prevProps:e,nextProps:this.props,instance:this.state.streetViewPanorama}))},n.componentWillUnmount=function(){null!==this.state.streetViewPanorama&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),u(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},n.render=function(){return null},t}(t.PureComponent);ke.contextType=a;var we=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).state={streetViewService:null},t.setStreetViewServiceCallback=function(){null!==t.state.streetViewService&&t.props.onLoad&&t.props.onLoad(t.state.streetViewService)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:e}})},n.componentWillUnmount=function(){null!==this.state.streetViewService&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},n.render=function(){return null},t}(t.PureComponent);we.contextType=a;var be=function(e){function o(){var t;return(t=e.apply(this,arguments)||this).state={directionsService:null},t.setDirectionsServiceCallback=function(){null!==t.state.directionsService&&t.props.onLoad&&t.props.onLoad(t.state.directionsService)},t}i(o,e);var r=o.prototype;return r.componentDidMount=function(){this.props.options||n(!1);var e=new google.maps.DirectionsService;this.setState(function(){return{directionsService:e}},this.setDirectionsServiceCallback)},r.componentDidUpdate=function(){null!==this.state.directionsService&&this.state.directionsService.route(this.props.options,this.props.callback)},r.componentWillUnmount=function(){null!==this.state.directionsService&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},r.render=function(){return t.createElement(t.Fragment,null)},o}(t.PureComponent),Le={onDirectionsChanged:"directions_changed"},De={directions:function(e,t){e.setDirections(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},panel:function(e,t){e.setPanel(t)},routeIndex:function(e,t){e.setRouteIndex(t)}},Se=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={directionsRenderer:null},t.setDirectionsRendererCallback=function(){null!==t.state.directionsRenderer&&(t.state.directionsRenderer.setMap(t.context),t.props.onLoad&&t.props.onLoad(t.state.directionsRenderer))},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=d({updaterMap:De,eventMap:Le,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{directionsRenderer:e}},this.setDirectionsRendererCallback)},o.componentDidUpdate=function(e){null!==this.state.directionsRenderer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:De,eventMap:Le,prevProps:e,nextProps:this.props,instance:this.state.directionsRenderer}))},o.componentWillUnmount=function(){null!==this.state.directionsRenderer&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),u(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},o.render=function(){return t.createElement(t.Fragment,null)},n}(t.PureComponent);Se.contextType=a;var Ue=function(e){function o(){var t;return(t=e.apply(this,arguments)||this).state={distanceMatrixService:null},t.setDistanceMatrixServiceCallbak=function(){null!==t.state.distanceMatrixService&&t.props.onLoad&&t.props.onLoad(t.state.distanceMatrixService)},t}i(o,e);var r=o.prototype;return r.componentDidMount=function(){this.props.options||n(!1);var e=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:e}},this.setDistanceMatrixServiceCallbak)},r.componentDidUpdate=function(){null!==this.state.distanceMatrixService&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},r.componentWillUnmount=function(){null!==this.state.distanceMatrixService&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},r.render=function(){return t.createElement(t.Fragment,null)},o}(t.PureComponent),Oe={onPlacesChanged:"places_changed"},Re={bounds:function(e,t){e.setBounds(t)}},Te=function(e){function o(){var n;return(n=e.apply(this,arguments)||this).registeredEvents=[],n.containerElement=t.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){null!==n.state.searchBox&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}i(o,e);var r=o.prototype;return r.componentDidMount=function(){if(google.maps.places||n(!1),null!==this.containerElement&&null!==this.containerElement.current){var e=this.containerElement.current.querySelector("input");if(e){var t=new google.maps.places.SearchBox(e,this.props.options);this.registeredEvents=d({updaterMap:Re,eventMap:Oe,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{searchBox:t}},this.setSearchBoxCallback)}}},r.componentDidUpdate=function(e){null!==this.state.searchBox&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:Re,eventMap:Oe,prevProps:e,nextProps:this.props,instance:this.state.searchBox}))},r.componentWillUnmount=function(){null!==this.state.searchBox&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),u(this.registeredEvents))},r.render=function(){return t.createElement("div",{ref:this.containerElement},t.Children.only(this.props.children))},o}(t.PureComponent);Te.contextType=a;var Ve={onPlaceChanged:"place_changed"},_e={bounds:function(e,t){e.setBounds(t)},restrictions:function(e,t){e.setComponentRestrictions(t)},fields:function(e,t){e.setFields(t)},options:function(e,t){e.setOptions(t)},types:function(e,t){e.setTypes(t)}},Ie=function(e){function o(){var n;return(n=e.apply(this,arguments)||this).registeredEvents=[],n.containerElement=t.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){null!==n.state.autocomplete&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}i(o,e);var r=o.prototype;return r.componentDidMount=function(){google.maps.places||n(!1);var e=this.containerElement.current.querySelector("input");if(e){var t=new google.maps.places.Autocomplete(e,this.props.options);this.registeredEvents=d({updaterMap:_e,eventMap:Ve,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{autocomplete:t}},this.setAutocompleteCallback)}},r.componentDidUpdate=function(e){u(this.registeredEvents),this.registeredEvents=d({updaterMap:_e,eventMap:Ve,prevProps:e,nextProps:this.props,instance:this.state.autocomplete})},r.componentWillUnmount=function(){null!==this.state.autocomplete&&u(this.registeredEvents)},r.render=function(){return t.createElement("div",{ref:this.containerElement},t.Children.only(this.props.children))},o}(t.PureComponent);Ie.contextType=a,exports.Autocomplete=Ie,exports.BicyclingLayer=T,exports.Circle=oe,exports.Data=ie,exports.DirectionsRenderer=Se,exports.DirectionsService=be,exports.DistanceMatrixService=Ue,exports.DrawingManager=I,exports.GoogleMap=m,exports.GroundOverlay=ye,exports.HeatmapLayer=Ee,exports.InfoWindow=H,exports.KmlLayer=ce,exports.LoadScript=w,exports.LoadScriptNext=S,exports.Marker=B,exports.MarkerClusterer=z,exports.OverlayView=me,exports.Polygon=Q,exports.Polyline=q,exports.Rectangle=ee,exports.StandaloneSearchBox=Te,exports.StreetViewPanorama=ke,exports.StreetViewService=we,exports.TrafficLayer=R,exports.useGoogleMap=function(){t.useContext||n(!1);var e=t.useContext(a);return e||n(!1),e},exports.useLoadScript=b;
"use strict";var e,t=require("react"),n=(e=require("invariant"))&&"object"==typeof e&&"default"in e?e.default:e,o=require("@react-google-maps/marker-clusterer"),r=require("react-dom");function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var a=t.createContext(null),p=function(e,t,n){return Object.keys(e).reduce(function(n,o){return t(n,e[o],o)},n)},c=function(e,t,n,o){var r,s,i={};return r=e,s=function(e,r){var s=n[r];s!==t[r]&&(i[r]=s,e(o,s))},Object.keys(r).forEach(function(e){return s(r[e],e)}),i};function l(e){google.maps.event.removeListener(e)}function u(e){void 0===e&&(e=[]),e.map(l)}function d(e){var t=e.updaterMap,n=e.prevProps,o=e.nextProps,r=e.instance,s=function(t,n,o){return p(e.eventMap,function(e,o,r){return"function"==typeof t[r]&&e.push(google.maps.event.addListener(n,o,t[r])),e},[])}(o,r);return c(t,n,o,r),s}var h={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},g={extraMapTypes:function(e,t){t.forEach(function(t,n){e.mapTypes.set(String(n),t)})},center:function(e,t){e.setCenter(t)},clickableIcons:function(e,t){e.setClickableIcons(t)},heading:function(e,t){e.setHeading(t)},mapTypeId:function(e,t){e.setMapTypeId(t)},options:function(e,t){e.setOptions(t)},streetView:function(e,t){e.setStreetView(t)},tilt:function(e,t){e.setTilt(t)},zoom:function(e,t){e.setZoom(t)}},m=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state={map:null},t.registeredEvents=[],t.mapRef=null,t.getInstance=function(){return new google.maps.Map(t.mapRef,t.props.options)},t.setMapCallback=function(){null!==t.state.map&&t.props.onLoad&&t.props.onLoad(t.state.map)},t.getRef=function(e){t.mapRef=e},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=this.getInstance();this.registeredEvents=d({updaterMap:g,eventMap:h,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{map:e}},this.setMapCallback)},o.componentDidUpdate=function(e){null!==this.state.map&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:g,eventMap:h,prevProps:e,nextProps:this.props,instance:this.state.map}))},o.componentWillUnmount=function(){null!==this.state.map&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),u(this.registeredEvents))},o.render=function(){return t.createElement("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName},t.createElement(a.Provider,{value:this.state.map},null!==this.state.map?this.props.children:t.createElement(t.Fragment,null)))},n}(t.PureComponent),f="undefined"!=typeof document,v=function(e){var t=e.url,n=e.id;return f?new Promise(function(e,o){var r=document.getElementById(n),s=window;if(r){if(r.src===t){if("ready"===r.getAttribute("data-state"))return e(n);var i=s.initMap;return void(s.initMap=function(){i&&i(),e(n)})}r.remove()}var a=document.createElement("script");a.type="text/javascript",a.src=t,a.id=n,a.async=!0,a.onerror=o,s.initMap=function(){a.setAttribute("data-state","ready"),e(n)},document.head.appendChild(a)}).catch(function(e){console.error("injectScript error: ",e)}):Promise.reject(new Error("document is undefined"))},y=function(e){return!((!e.href||0!==e.href.indexOf("https://fonts.googleapis.com/css?family=Roboto"))&&("style"===e.tagName.toLowerCase()&&e.styleSheet&&e.styleSheet.cssText&&0===e.styleSheet.cssText.replace("\r\n","").indexOf(".gm-style")?(e.styleSheet.cssText="",0):"style"===e.tagName.toLowerCase()&&e.innerHTML&&0===e.innerHTML.replace("\r\n","").indexOf(".gm-style")?(e.innerHTML="",0):"style"!==e.tagName.toLowerCase()||e.styleSheet||e.innerHTML))},M=function(){var e=document.getElementsByTagName("head")[0],t=e.insertBefore.bind(e);e.insertBefore=function(n,o){y(n)||Reflect.apply(t,e,[n,o])};var n=e.appendChild.bind(e);e.appendChild=function(t){y(t)||Reflect.apply(n,e,[t])}};function C(e){var t=e.googleMapsApiKey,o=e.googleMapsClientId,r=e.version,s=void 0===r?"weekly":r,i=e.language,a=e.region,p=e.libraries,c=e.channel,l=[];return t&&o||!t||!o||n(!1),t?l.push("key="+t):o&&l.push("client="+o),s&&l.push("v="+s),i&&l.push("language="+i),a&&l.push("region="+a),p&&p.length&&l.push("libraries="+p.sort().join(",")),c&&l.push("channel="+c),l.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?"+l.join("&")}var E=!1;function x(){return t.createElement("div",null,"Loading...")}var P,k={id:"script-loader",version:"weekly"},w=function(e){function o(){var o;return(o=e.apply(this,arguments)||this).check=t.createRef(),o.state={loaded:!1},o.cleanupCallback=function(){delete window.google,o.injectScript()},o.isCleaningUp=function(){try{return Promise.resolve(new Promise(function(e){if(E){if(f)var t=window.setInterval(function(){E||(window.clearInterval(t),e())},1)}else e()}))}catch(e){return Promise.reject(e)}},o.cleanup=function(){E=!0;var e=document.getElementById(o.props.id);e&&e.parentNode&&e.parentNode.removeChild(e),Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function(e){return e.src.includes("maps.googleapis")}).forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function(e){return"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"===e.href}).forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function(e){return void 0!==e.innerText&&e.innerText.length>0&&e.innerText.includes(".gm-")}).forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)})},o.injectScript=function(){o.props.preventGoogleFontsLoading&&M(),o.props.id||n(!1);var e={id:o.props.id,url:C(o.props)};v(e).then(function(){o.props.onLoad&&o.props.onLoad(),o.setState(function(){return{loaded:!0}})}).catch(function(e){o.props.onError&&o.props.onError(e),console.error("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key ("+(o.props.googleMapsApiKey||"-")+") or Client ID ("+(o.props.googleMapsClientId||"-")+") to <LoadScript />\n Otherwise it is a Network issue.\n ")})},o}i(o,e);var r=o.prototype;return r.componentDidMount=function(){if(f){if(window.google&&!E)return void console.error("google api is already presented");this.isCleaningUp().then(this.injectScript).catch(function(e){console.error("Error at injecting script after cleaning up: ",e)})}},r.componentDidUpdate=function(e){this.props.libraries!==e.libraries&&console.warn("Performance warning! Loadscript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable ounside of component, or somwhere in config files or ENV variables"),f&&e.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},r.componentWillUnmount=function(){var e=this;f&&(this.cleanup(),window.setTimeout(function(){e.check.current||(delete window.google,E=!1)},1),this.props.onUnmount&&this.props.onUnmount())},r.render=function(){return t.createElement(t.Fragment,null,t.createElement("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||t.createElement(x,null))},o}(t.PureComponent);function b(e){var o=e.id,r=void 0===o?k.id:o,s=e.version,i=void 0===s?k.version:s,a=e.googleMapsApiKey,p=e.googleMapsClientId,c=e.language,l=e.region,u=e.libraries,d=e.preventGoogleFontsLoading,h=e.channel,g=t.useRef(!1),m=t.useState(!1),y=m[0],E=m[1],x=t.useState(void 0),w=x[0],b=x[1];t.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]),t.useEffect(function(){f&&d&&M()},[d]),t.useEffect(function(){y&&(window.google||n(!1))},[y]);var L=C({version:i,googleMapsApiKey:a,googleMapsClientId:p,language:c,region:l,libraries:u,channel:h});t.useEffect(function(){function e(){g.current&&(E(!0),P=L)}f&&(window.google&&P===L?e():v({id:r,url:L}).then(e).catch(function(e){g.current&&b(e),console.warn("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key ("+(a||"-")+") or Client ID ("+(p||"-")+")\n Otherwise it is a Network issue.\n "),console.error(e)}))},[r,L]);var D=t.useRef();return t.useEffect(function(){D.current&&u!==D.current&&console.warn("Performance warning! Loadscript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),D.current=u},[u]),{isLoaded:y,loadError:w,url:L}}w.defaultProps=k;var L=t.createElement(x,null);function D(e){var n=e.loadingElement,o=e.onLoad,r=e.onError,s=e.onUnmount,i=e.children,a=b(function(e,t){if(null==e)return{};var n,o,r={},s=Object.keys(e);for(o=0;o<s.length;o++)t.indexOf(n=s[o])>=0||(r[n]=e[n]);return r}(e,["loadingElement","onLoad","onError","onUnmount","children"])),p=a.isLoaded,c=a.loadError;return t.useEffect(function(){p&&"function"==typeof o&&o()},[p,o]),t.useEffect(function(){c&&"function"==typeof r&&r(c)},[c,r]),t.useEffect(function(){return function(){s&&s()}},[s]),p?i:n||L}var S=t.memo(D),U={},O={options:function(e,t){e.setOptions(t)}},R=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).state={trafficLayer:null},t.setTrafficLayerCallback=function(){null!==t.state.trafficLayer&&t.props.onLoad&&t.props.onLoad(t.state.trafficLayer)},t.registeredEvents=[],t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.TrafficLayer(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:O,eventMap:U,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{trafficLayer:e}},this.setTrafficLayerCallback)},n.componentDidUpdate=function(e){null!==this.state.trafficLayer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:O,eventMap:U,prevProps:e,nextProps:this.props,instance:this.state.trafficLayer}))},n.componentWillUnmount=function(){null!==this.state.trafficLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),u(this.registeredEvents),this.state.trafficLayer.setMap(null))},n.render=function(){return null},t}(t.PureComponent);R.contextType=a;var T=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).state={bicyclingLayer:null},t.setBicyclingLayerCallback=function(){null!==t.state.bicyclingLayer&&(t.state.bicyclingLayer.setMap(t.context),t.props.onLoad&&t.props.onLoad(t.state.bicyclingLayer))},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:e}},this.setBicyclingLayerCallback)},n.componentWillUnmount=function(){null!==this.state.bicyclingLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},n.render=function(){return null},t}(t.PureComponent);T.contextType=a;var V={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},_={drawingMode:function(e,t){e.setDrawingMode(t)},options:function(e,t){e.setOptions(t)}},I=function(e){function o(t){var o;return(o=e.call(this,t)||this).registeredEvents=[],o.state={drawingManager:null},o.setDrawingManagerCallback=function(){null!==o.state.drawingManager&&o.props.onLoad&&o.props.onLoad(o.state.drawingManager)},google.maps.drawing||n(!1),o}i(o,e);var r=o.prototype;return r.componentDidMount=function(){var e=new google.maps.drawing.DrawingManager(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:_,eventMap:V,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{drawingManager:e}},this.setDrawingManagerCallback)},r.componentDidUpdate=function(e){null!==this.state.drawingManager&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:_,eventMap:V,prevProps:e,nextProps:this.props,instance:this.state.drawingManager}))},r.componentWillUnmount=function(){null!==this.state.drawingManager&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),u(this.registeredEvents),this.state.drawingManager.setMap(null))},r.render=function(){return t.createElement(t.Fragment,null)},o}(t.PureComponent);I.contextType=a;var W={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},A={animation:function(e,t){e.setAnimation(t)},clickable:function(e,t){e.setClickable(t)},cursor:function(e,t){e.setCursor(t)},draggable:function(e,t){e.setDraggable(t)},icon:function(e,t){e.setIcon(t)},label:function(e,t){e.setLabel(t)},map:function(e,t){e.setMap(t)},opacity:function(e,t){e.setOpacity(t)},options:function(e,t){e.setOptions(t)},position:function(e,t){e.setPosition(t)},shape:function(e,t){e.setShape(t)},title:function(e,t){e.setTitle(t)},visible:function(e,t){e.setVisible(t)},zIndex:function(e,t){e.setZIndex(t)}},B=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={marker:null},t.setMarkerCallback=function(){null!==t.state.marker&&t.props.onLoad&&t.props.onLoad(t.state.marker)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=s({},this.props.options||{},{},this.props.clusterer?{}:{map:this.context},{position:this.props.position}),t=new google.maps.Marker(e);this.props.clusterer?this.props.clusterer.addMarker(t,!!this.props.noClustererRedraw):t.setMap(this.context),this.registeredEvents=d({updaterMap:A,eventMap:W,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{marker:t}},this.setMarkerCallback)},n.componentDidUpdate=function(e){null!==this.state.marker&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:A,eventMap:W,prevProps:e,nextProps:this.props,instance:this.state.marker}))},n.componentWillUnmount=function(){null!==this.state.marker&&(this.props.onUnmount&&this.props.onUnmount(this.state.marker),u(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.state.marker,!!this.props.noClustererRedraw):this.state.marker&&this.state.marker.setMap(null))},n.render=function(){return this.props.children||null},t}(t.PureComponent);B.contextType=a;var N={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},j={averageCenter:function(e,t){e.setAverageCenter(t)},batchSizeIE:function(e,t){e.setBatchSizeIE(t)},calculator:function(e,t){e.setCalculator(t)},clusterClass:function(e,t){e.setClusterClass(t)},enableRetinaIcons:function(e,t){e.setEnableRetinaIcons(t)},gridSize:function(e,t){e.setGridSize(t)},ignoreHidden:function(e,t){e.setIgnoreHidden(t)},imageExtension:function(e,t){e.setImageExtension(t)},imagePath:function(e,t){e.setImagePath(t)},imageSizes:function(e,t){e.setImageSizes(t)},maxZoom:function(e,t){e.setMaxZoom(t)},minimumClusterSize:function(e,t){e.setMinimumClusterSize(t)},styles:function(e,t){e.setStyles(t)},title:function(e,t){e.setTitle(t)},zoomOnClick:function(e,t){e.setZoomOnClick(t)}},z=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={markerClusterer:null},t.setClustererCallback=function(){null!==t.state.markerClusterer&&t.props.onLoad&&t.props.onLoad(t.state.markerClusterer)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){if(this.context){var e=new o.Clusterer(this.context,[],this.props.options);this.registeredEvents=d({updaterMap:j,eventMap:N,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{markerClusterer:e}},this.setClustererCallback)}},n.componentDidUpdate=function(e){this.state.markerClusterer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:j,eventMap:N,prevProps:e,nextProps:this.props,instance:this.state.markerClusterer}))},n.componentWillUnmount=function(){null!==this.state.markerClusterer&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),u(this.registeredEvents),this.state.markerClusterer.setMap(null))},n.render=function(){return null!==this.state.markerClusterer?this.props.children(this.state.markerClusterer):null},t}(t.PureComponent);z.contextType=a;var F={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},G={options:function(e,t){e.setOptions(t)},position:function(e,t){e.setPosition(t)},zIndex:function(e,t){e.setZIndex(t)}},H=function(e){function o(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.containerElement=null,t.state={infoWindow:null},t.open=function(e,o){o?e.open(t.context,o):e.getPosition()?e.open(t.context):n(!1)},t.setInfowindowCallback=function(){null!==t.state.infoWindow&&null!==t.containerElement&&(t.state.infoWindow.setContent(t.containerElement),t.open(t.state.infoWindow,t.props.anchor),t.props.onLoad&&t.props.onLoad(t.state.infoWindow))},t}i(o,e);var a=o.prototype;return a.componentDidMount=function(){var e=new google.maps.InfoWindow(s({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=d({updaterMap:G,eventMap:F,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{infoWindow:e}},this.setInfowindowCallback)},a.componentDidUpdate=function(e){null!==this.state.infoWindow&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:G,eventMap:F,prevProps:e,nextProps:this.props,instance:this.state.infoWindow}))},a.componentWillUnmount=function(){null!==this.state.infoWindow&&(u(this.registeredEvents),this.state.infoWindow.close())},a.render=function(){return this.containerElement?r.createPortal(t.Children.only(this.props.children),this.containerElement):t.createElement(t.Fragment,null)},o}(t.PureComponent);H.contextType=a;var Z={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},K={draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},path:function(e,t){e.setPath(t)},visible:function(e,t){e.setVisible(t)}},q=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={polyline:null},t.setPolylineCallback=function(){null!==t.state.polyline&&t.props.onLoad&&t.props.onLoad(t.state.polyline)},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=new google.maps.Polyline(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:K,eventMap:Z,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{polyline:e}},this.setPolylineCallback)},o.componentDidUpdate=function(e){null!==this.state.polyline&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:K,eventMap:Z,prevProps:e,nextProps:this.props,instance:this.state.polyline}))},o.componentWillUnmount=function(){null!==this.state.polyline&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),u(this.registeredEvents),this.state.polyline.setMap(null))},o.render=function(){return t.createElement(t.Fragment,null)},n}(t.PureComponent);q.contextType=a;var Y={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},J={draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},path:function(e,t){e.setPath(t)},paths:function(e,t){e.setPaths(t)},visible:function(e,t){e.setVisible(t)}},Q=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={polygon:null},t.setPolygonCallback=function(){null!==t.state.polygon&&t.props.onLoad&&t.props.onLoad(t.state.polygon)},t.render=function(){return null},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.Polygon(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:J,eventMap:Y,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{polygon:e}},this.setPolygonCallback)},n.componentDidUpdate=function(e){null!==this.state.polygon&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:J,eventMap:Y,prevProps:e,nextProps:this.props,instance:this.state.polygon}))},n.componentWillUnmount=function(){null!==this.state.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),u(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},t}(t.PureComponent);Q.contextType=a;var X={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"},$={bounds:function(e,t){e.setBounds(t)},draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},visible:function(e,t){e.setVisible(t)}},ee=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={rectangle:null},t.setRectangleCallback=function(){null!==t.state.rectangle&&t.props.onLoad&&t.props.onLoad(t.state.rectangle)},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=new google.maps.Rectangle(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:$,eventMap:X,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{rectangle:e}},this.setRectangleCallback)},o.componentDidUpdate=function(e){null!==this.state.rectangle&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:$,eventMap:X,prevProps:e,nextProps:this.props,instance:this.state.rectangle}))},o.componentWillUnmount=function(){null!==this.state.rectangle&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),u(this.registeredEvents),this.state.rectangle.setMap(null))},o.render=function(){return t.createElement(t.Fragment,null)},n}(t.PureComponent);ee.contextType=a;var te={onCenterChanged:"center_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRadiusChanged:"radius_changed",onRightClick:"rightclick"},ne={center:function(e,t){e.setCenter(t)},draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},radius:function(e,t){e.setRadius(t)},visible:function(e,t){e.setVisible(t)}},oe=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={circle:null},t.setCircleCallback=function(){null!==t.state.circle&&t.props.onLoad&&t.props.onLoad(t.state.circle)},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=new google.maps.Circle(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:ne,eventMap:te,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{circle:e}},this.setCircleCallback)},o.componentDidUpdate=function(e){null!==this.state.circle&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:ne,eventMap:te,prevProps:e,nextProps:this.props,instance:this.state.circle}))},o.componentWillUnmount=function(){null!==this.state.circle&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),u(this.registeredEvents),this.state.circle&&this.state.circle.setMap(null))},o.render=function(){return t.createElement(t.Fragment,null)},n}(t.PureComponent);oe.contextType=a;var re={onAddFeature:"addfeature",onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onRightClick:"rightclick",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},se={add:function(e,t){e.add(t)},addgeojson:function(e,t,n){e.addGeoJson(t,n)},contains:function(e,t){e.contains(t)},foreach:function(e,t){e.forEach(t)},loadgeojson:function(e,t,n,o){e.loadGeoJson(t,n,o)},overridestyle:function(e,t,n){e.overrideStyle(t,n)},remove:function(e,t){e.remove(t)},revertstyle:function(e,t){e.revertStyle(t)},controlposition:function(e,t){e.setControlPosition(t)},controls:function(e,t){e.setControls(t)},drawingmode:function(e,t){e.setDrawingMode(t)},map:function(e,t){e.setMap(t)},style:function(e,t){e.setStyle(t)},togeojson:function(e,t){e.toGeoJson(t)}},ie=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={data:null},t.setDataCallback=function(){null!==t.state.data&&t.props.onLoad&&t.props.onLoad(t.state.data)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.Data(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:se,eventMap:re,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{data:e}},this.setDataCallback)},n.componentDidUpdate=function(e){null!==this.state.data&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:se,eventMap:re,prevProps:e,nextProps:this.props,instance:this.state.data}))},n.componentWillUnmount=function(){null!==this.state.data&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),u(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},n.render=function(){return null},t}(t.PureComponent);ie.contextType=a;var ae={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},pe={options:function(e,t){e.setOptions(t)},url:function(e,t){e.setUrl(t)},zIndex:function(e,t){e.setZIndex(t)}},ce=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={kmlLayer:null},t.setKmlLayerCallback=function(){null!==t.state.kmlLayer&&t.props.onLoad&&t.props.onLoad(t.state.kmlLayer)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.KmlLayer(s({},this.props.options,{map:this.context}));this.registeredEvents=d({updaterMap:pe,eventMap:ae,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{kmlLayer:e}},this.setKmlLayerCallback)},n.componentDidUpdate=function(e){null!==this.state.kmlLayer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:pe,eventMap:ae,prevProps:e,nextProps:this.props,instance:this.state.kmlLayer}))},n.componentWillUnmount=function(){null!==this.state.kmlLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),u(this.registeredEvents),this.state.kmlLayer.setMap(null))},n.render=function(){return null},t}(t.PureComponent);ce.contextType=a;var le=function(e,t){return new t(e.lat,e.lng)},ue=function(e,t){return new t(new google.maps.LatLng(e.ne.lat,e.ne.lng),new google.maps.LatLng(e.sw.lat,e.sw.lng))},de=function(e,t,n){return e instanceof t?e:n(e,t)},he=function(e,t,n,o){return void 0!==n?function(e,t,n){var o=e.fromLatLngToDivPixel(n.getNorthEast()),r=e.fromLatLngToDivPixel(n.getSouthWest());return o&&r?{left:r.x+t.x+"px",top:o.y+t.y+"px",width:o.x-r.x-t.x+"px",height:r.y-o.y-t.y+"px"}:{left:"-9999px",top:"-9999px"}}(e,t,de(n,google.maps.LatLngBounds,ue)):function(e,t,n){var o=e.fromLatLngToDivPixel(n);return o?{left:o.x+t.x+"px",top:o.y+t.y+"px"}:{left:"-9999px",top:"-9999px"}}(e,t,de(o,google.maps.LatLng,le))},ge=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onLoad&&this.props.onLoad()},n.render=function(){return this.props.children},t}(t.Component),me=function(e){function o(){var t;return(t=e.apply(this,arguments)||this).state={overlayView:null},t.containerElement=null,t.setOverlayViewCallback=function(){null!==t.state.overlayView&&t.props.onLoad&&t.props.onLoad(t.state.overlayView),t.onPositionElement()},t.onAdd=function(){t.containerElement=document.createElement("div"),t.containerElement.style.position="absolute"},t.onPositionElement=function(){if(null!==t.state.overlayView&&null!==t.containerElement){var e=t.state.overlayView.getProjection(),n=s({x:0,y:0},(r=t.containerElement,"function"==typeof(i=t.props.getPixelPositionOffset)?i(r.offsetWidth,r.offsetHeight):{})),o=he(e,n,t.props.bounds,t.props.position);Object.assign(t.containerElement.style,o)}var r,i},t.draw=function(){t.props.mapPaneName||n(!1);var e=t.state.overlayView;if(null!==e){var o=e.getPanes();o&&(t.containerElement&&o[t.props.mapPaneName].appendChild(t.containerElement),t.onPositionElement(),t.forceUpdate())}},t.onRemove=function(){null!==t.containerElement&&t.containerElement.parentNode&&(t.containerElement.parentNode.removeChild(t.containerElement),delete t.containerElement)},t}i(o,e);var a=o.prototype;return a.componentDidMount=function(){var e=new google.maps.OverlayView;e.onAdd=this.onAdd,e.draw=this.draw,e.onRemove=this.onRemove,e.setMap(this.context),this.setState(function(){return{overlayView:e}})},a.componentDidUpdate=function(e){var t=this;e.position===this.props.position&&e.bounds===this.props.bounds||setTimeout(function(){null!==t.state.overlayView&&t.state.overlayView.draw()},0)},a.componentWillUnmount=function(){null!==this.state.overlayView&&(this.props.onUnmount&&this.props.onUnmount(this.state.overlayView),this.state.overlayView.setMap(null))},a.render=function(){return null!==this.containerElement?r.createPortal(t.createElement(ge,{onLoad:this.setOverlayViewCallback},t.Children.only(this.props.children)),this.containerElement):t.createElement(t.Fragment,null)},o}(t.PureComponent);me.FLOAT_PANE="floatPane",me.MAP_PANE="mapPane",me.MARKER_LAYER="markerLayer",me.OVERLAY_LAYER="overlayLayer",me.OVERLAY_MOUSE_TARGET="overlayMouseTarget",me.contextType=a;var fe={onDblClick:"dblclick",onClick:"click"},ve={opacity:function(e,t){e.setOpacity(t)}},ye=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={groundOverlay:null},t.setGroundOverlayCallback=function(){null!==t.state.groundOverlay&&t.props.onLoad&&t.props.onLoad(t.state.groundOverlay)},t}i(t,e);var o=t.prototype;return o.componentDidMount=function(){this.props.url||this.props.bounds||n(!1);var e=new google.maps.GroundOverlay(this.props.url,this.props.bounds,s({},this.props.options,{map:this.context}));this.registeredEvents=d({updaterMap:ve,eventMap:fe,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{groundOverlay:e}},this.setGroundOverlayCallback)},o.componentDidUpdate=function(e){null!==this.state.groundOverlay&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:ve,eventMap:fe,prevProps:e,nextProps:this.props,instance:this.state.groundOverlay}))},o.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},o.render=function(){return null},t}(t.PureComponent);ye.defaultProps={onLoad:function(){}},ye.contextType=a;var Me={},Ce={data:function(e,t){e.setData(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)}},Ee=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={heatmapLayer:null},t.setHeatmapLayerCallback=function(){null!==t.state.heatmapLayer&&t.props.onLoad&&t.props.onLoad(t.state.heatmapLayer)},t}i(t,e);var o=t.prototype;return o.componentDidMount=function(){google.maps.visualization||n(!1),this.props.data||n(!1);var e=new google.maps.visualization.HeatmapLayer(s({data:this.props.data},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:Ce,eventMap:Me,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{heatmapLayer:e}},this.setHeatmapLayerCallback)},o.componentDidUpdate=function(e){u(this.registeredEvents),this.registeredEvents=d({updaterMap:Ce,eventMap:Me,prevProps:e,nextProps:this.props,instance:this.state.heatmapLayer})},o.componentWillUnmount=function(){null!==this.state.heatmapLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),u(this.registeredEvents),this.state.heatmapLayer.setMap(null))},o.render=function(){return null},t}(t.PureComponent);Ee.contextType=a;var xe={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Pe={register:function(e,t,n){e.registerPanoProvider(t,n)},links:function(e,t){e.setLinks(t)},motionTracking:function(e,t){e.setMotionTracking(t)},options:function(e,t){e.setOptions(t)},pano:function(e,t){e.setPano(t)},position:function(e,t){e.setPosition(t)},pov:function(e,t){e.setPov(t)},visible:function(e,t){e.setVisible(t)},zoom:function(e,t){e.setZoom(t)}},ke=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={streetViewPanorama:null},t.setStreetViewPanoramaCallback=function(){null!==t.state.streetViewPanorama&&t.props.onLoad&&t.props.onLoad(t.state.streetViewPanorama)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this.context.getStreetView();this.registeredEvents=d({updaterMap:Pe,eventMap:xe,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{streetViewPanorama:e}},this.setStreetViewPanoramaCallback)},n.componentDidUpdate=function(e){null!==this.state.streetViewPanorama&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:Pe,eventMap:xe,prevProps:e,nextProps:this.props,instance:this.state.streetViewPanorama}))},n.componentWillUnmount=function(){null!==this.state.streetViewPanorama&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),u(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},n.render=function(){return null},t}(t.PureComponent);ke.contextType=a;var we=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).state={streetViewService:null},t.setStreetViewServiceCallback=function(){null!==t.state.streetViewService&&t.props.onLoad&&t.props.onLoad(t.state.streetViewService)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:e}})},n.componentWillUnmount=function(){null!==this.state.streetViewService&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},n.render=function(){return null},t}(t.PureComponent);we.contextType=a;var be=function(e){function o(){var t;return(t=e.apply(this,arguments)||this).state={directionsService:null},t.setDirectionsServiceCallback=function(){null!==t.state.directionsService&&t.props.onLoad&&t.props.onLoad(t.state.directionsService)},t}i(o,e);var r=o.prototype;return r.componentDidMount=function(){this.props.options||n(!1);var e=new google.maps.DirectionsService;this.setState(function(){return{directionsService:e}},this.setDirectionsServiceCallback)},r.componentDidUpdate=function(){null!==this.state.directionsService&&this.state.directionsService.route(this.props.options,this.props.callback)},r.componentWillUnmount=function(){null!==this.state.directionsService&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},r.render=function(){return t.createElement(t.Fragment,null)},o}(t.PureComponent),Le={onDirectionsChanged:"directions_changed"},De={directions:function(e,t){e.setDirections(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},panel:function(e,t){e.setPanel(t)},routeIndex:function(e,t){e.setRouteIndex(t)}},Se=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={directionsRenderer:null},t.setDirectionsRendererCallback=function(){null!==t.state.directionsRenderer&&(t.state.directionsRenderer.setMap(t.context),t.props.onLoad&&t.props.onLoad(t.state.directionsRenderer))},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=d({updaterMap:De,eventMap:Le,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{directionsRenderer:e}},this.setDirectionsRendererCallback)},o.componentDidUpdate=function(e){null!==this.state.directionsRenderer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:De,eventMap:Le,prevProps:e,nextProps:this.props,instance:this.state.directionsRenderer}))},o.componentWillUnmount=function(){null!==this.state.directionsRenderer&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),u(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},o.render=function(){return t.createElement(t.Fragment,null)},n}(t.PureComponent);Se.contextType=a;var Ue=function(e){function o(){var t;return(t=e.apply(this,arguments)||this).state={distanceMatrixService:null},t.setDistanceMatrixServiceCallbak=function(){null!==t.state.distanceMatrixService&&t.props.onLoad&&t.props.onLoad(t.state.distanceMatrixService)},t}i(o,e);var r=o.prototype;return r.componentDidMount=function(){this.props.options||n(!1);var e=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:e}},this.setDistanceMatrixServiceCallbak)},r.componentDidUpdate=function(){null!==this.state.distanceMatrixService&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},r.componentWillUnmount=function(){null!==this.state.distanceMatrixService&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},r.render=function(){return t.createElement(t.Fragment,null)},o}(t.PureComponent),Oe={onPlacesChanged:"places_changed"},Re={bounds:function(e,t){e.setBounds(t)}},Te=function(e){function o(){var n;return(n=e.apply(this,arguments)||this).registeredEvents=[],n.containerElement=t.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){null!==n.state.searchBox&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}i(o,e);var r=o.prototype;return r.componentDidMount=function(){if(google.maps.places||n(!1),null!==this.containerElement&&null!==this.containerElement.current){var e=this.containerElement.current.querySelector("input");if(e){var t=new google.maps.places.SearchBox(e,this.props.options);this.registeredEvents=d({updaterMap:Re,eventMap:Oe,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{searchBox:t}},this.setSearchBoxCallback)}}},r.componentDidUpdate=function(e){null!==this.state.searchBox&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:Re,eventMap:Oe,prevProps:e,nextProps:this.props,instance:this.state.searchBox}))},r.componentWillUnmount=function(){null!==this.state.searchBox&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),u(this.registeredEvents))},r.render=function(){return t.createElement("div",{ref:this.containerElement},t.Children.only(this.props.children))},o}(t.PureComponent);Te.contextType=a;var Ve={onPlaceChanged:"place_changed"},_e={bounds:function(e,t){e.setBounds(t)},restrictions:function(e,t){e.setComponentRestrictions(t)},fields:function(e,t){e.setFields(t)},options:function(e,t){e.setOptions(t)},types:function(e,t){e.setTypes(t)}},Ie=function(e){function o(){var n;return(n=e.apply(this,arguments)||this).registeredEvents=[],n.containerElement=t.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){null!==n.state.autocomplete&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}i(o,e);var r=o.prototype;return r.componentDidMount=function(){google.maps.places||n(!1);var e=this.containerElement.current.querySelector("input");if(e){var t=new google.maps.places.Autocomplete(e,this.props.options);this.registeredEvents=d({updaterMap:_e,eventMap:Ve,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{autocomplete:t}},this.setAutocompleteCallback)}},r.componentDidUpdate=function(e){u(this.registeredEvents),this.registeredEvents=d({updaterMap:_e,eventMap:Ve,prevProps:e,nextProps:this.props,instance:this.state.autocomplete})},r.componentWillUnmount=function(){null!==this.state.autocomplete&&u(this.registeredEvents)},r.render=function(){return t.createElement("div",{ref:this.containerElement},t.Children.only(this.props.children))},o}(t.PureComponent);Ie.contextType=a,exports.Autocomplete=Ie,exports.BicyclingLayer=T,exports.Circle=oe,exports.Data=ie,exports.DirectionsRenderer=Se,exports.DirectionsService=be,exports.DistanceMatrixService=Ue,exports.DrawingManager=I,exports.GoogleMap=m,exports.GroundOverlay=ye,exports.HeatmapLayer=Ee,exports.InfoWindow=H,exports.KmlLayer=ce,exports.LoadScript=w,exports.LoadScriptNext=S,exports.Marker=B,exports.MarkerClusterer=z,exports.OverlayView=me,exports.Polygon=Q,exports.Polyline=q,exports.Rectangle=ee,exports.StandaloneSearchBox=Te,exports.StreetViewPanorama=ke,exports.StreetViewService=we,exports.TrafficLayer=R,exports.useGoogleMap=function(){t.useContext||n(!1);var e=t.useContext(a);return e||n(!1),e},exports.useLoadScript=b;
//# sourceMappingURL=reactgooglemapsapi.cjs.production.min.js.map

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("invariant"),require("@react-google-maps/marker-clusterer"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","invariant","@react-google-maps/marker-clusterer","react-dom"],t):t((e=e||self).reactGoogleMapsApi={},e.React,e.invariant,e.markerClusterer,e.reactDom)}(this,function(e,t,n,o,r){"use strict";function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n=n&&n.hasOwnProperty("default")?n.default:n;var a=t.createContext(null),p=function(e,t,n){return Object.keys(e).reduce(function(n,o){return t(n,e[o],o)},n)},c=function(e,t,n,o){var r,s,i={};return r=e,s=function(e,r){var s=n[r];s!==t[r]&&(i[r]=s,e(o,s))},Object.keys(r).forEach(function(e){return s(r[e],e)}),i};function l(e){google.maps.event.removeListener(e)}function u(e){void 0===e&&(e=[]),e.map(l)}function d(e){var t=e.updaterMap,n=e.prevProps,o=e.nextProps,r=e.instance,s=function(t,n,o){return p(e.eventMap,function(e,o,r){return"function"==typeof t[r]&&e.push(google.maps.event.addListener(n,o,t[r])),e},[])}(o,r);return c(t,n,o,r),s}var h={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},m={extraMapTypes:function(e,t){t.forEach(function(t,n){e.mapTypes.set(String(n),t)})},center:function(e,t){e.setCenter(t)},clickableIcons:function(e,t){e.setClickableIcons(t)},heading:function(e,t){e.setHeading(t)},mapTypeId:function(e,t){e.setMapTypeId(t)},options:function(e,t){e.setOptions(t)},streetView:function(e,t){e.setStreetView(t)},tilt:function(e,t){e.setTilt(t)},zoom:function(e,t){e.setZoom(t)}},g=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state={map:null},t.registeredEvents=[],t.mapRef=null,t.getInstance=function(){return new google.maps.Map(t.mapRef,t.props.options)},t.setMapCallback=function(){null!==t.state.map&&t.props.onLoad&&t.props.onLoad(t.state.map)},t.getRef=function(e){t.mapRef=e},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=this.getInstance();this.registeredEvents=d({updaterMap:m,eventMap:h,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{map:e}},this.setMapCallback)},o.componentDidUpdate=function(e){null!==this.state.map&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:m,eventMap:h,prevProps:e,nextProps:this.props,instance:this.state.map}))},o.componentWillUnmount=function(){null!==this.state.map&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),u(this.registeredEvents))},o.render=function(){return t.createElement("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName},t.createElement(a.Provider,{value:this.state.map},null!==this.state.map?this.props.children:t.createElement(t.Fragment,null)))},n}(t.PureComponent),f="undefined"!=typeof document,v=function(e){var t=e.url,n=e.id;return f?new Promise(function(e,o){var r=document.getElementById(n),s=window;if(r){if(r.src===t){if("ready"===r.getAttribute("data-state"))return e(n);var i=s.initMap;return void(s.initMap=function(){i&&i(),e(n)})}r.remove()}var a=document.createElement("script");a.type="text/javascript",a.src=t,a.id=n,a.async=!0,a.onerror=o,s.initMap=function(){a.setAttribute("data-state","ready"),e(n)},document.head.appendChild(a)}).catch(function(e){console.error("injectScript error: ",e)}):Promise.reject(new Error("document is undefined"))},y=function(e){return!((!e.href||0!==e.href.indexOf("https://fonts.googleapis.com/css?family=Roboto"))&&("style"===e.tagName.toLowerCase()&&e.styleSheet&&e.styleSheet.cssText&&0===e.styleSheet.cssText.replace("\r\n","").indexOf(".gm-style")?(e.styleSheet.cssText="",0):"style"===e.tagName.toLowerCase()&&e.innerHTML&&0===e.innerHTML.replace("\r\n","").indexOf(".gm-style")?(e.innerHTML="",0):"style"!==e.tagName.toLowerCase()||e.styleSheet||e.innerHTML))},M=function(){var e=document.getElementsByTagName("head")[0],t=e.insertBefore.bind(e);e.insertBefore=function(n,o){y(n)||Reflect.apply(t,e,[n,o])};var n=e.appendChild.bind(e);e.appendChild=function(t){y(t)||Reflect.apply(n,e,[t])}};function C(e){var t=e.googleMapsApiKey,o=e.googleMapsClientId,r=e.version,s=void 0===r?"weekly":r,i=e.language,a=e.region,p=e.libraries,c=[];return t&&o||!t||!o||n(!1),t?c.push("key="+t):o&&c.push("client="+o),s&&c.push("v="+s),i&&c.push("language="+i),a&&c.push("region="+a),p&&p.length&&c.push("libraries="+p.sort().join(",")),c.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?"+c.join("&")}var E=!1;function P(){return t.createElement("div",null,"Loading...")}var k,w={id:"script-loader",version:"weekly"},b=function(e){function o(){var o;return(o=e.apply(this,arguments)||this).check=t.createRef(),o.state={loaded:!1},o.cleanupCallback=function(){delete window.google,o.injectScript()},o.isCleaningUp=function(){try{return Promise.resolve(new Promise(function(e){if(E){if(f)var t=window.setInterval(function(){E||(window.clearInterval(t),e())},1)}else e()}))}catch(e){return Promise.reject(e)}},o.cleanup=function(){E=!0;var e=document.getElementById(o.props.id);e&&e.parentNode&&e.parentNode.removeChild(e),Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function(e){return e.src.includes("maps.googleapis")}).forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function(e){return"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"===e.href}).forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function(e){return void 0!==e.innerText&&e.innerText.length>0&&e.innerText.includes(".gm-")}).forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)})},o.injectScript=function(){o.props.preventGoogleFontsLoading&&M(),o.props.id||n(!1);var e={id:o.props.id,url:C(o.props)};v(e).then(function(){o.props.onLoad&&o.props.onLoad(),o.setState(function(){return{loaded:!0}})}).catch(function(e){o.props.onError&&o.props.onError(e),console.error("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key ("+(o.props.googleMapsApiKey||"-")+") or Client ID ("+(o.props.googleMapsClientId||"-")+") to <LoadScript />\n Otherwise it is a Network issue.\n ")})},o}i(o,e);var r=o.prototype;return r.componentDidMount=function(){if(f){if(window.google&&!E)return void console.error("google api is already presented");this.isCleaningUp().then(this.injectScript).catch(function(e){console.error("Error at injecting script after cleaning up: ",e)})}},r.componentDidUpdate=function(e){this.props.libraries!==e.libraries&&console.warn("Performance warning! Loadscript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable ounside of component, or somwhere in config files or ENV variables"),f&&e.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},r.componentWillUnmount=function(){var e=this;f&&(this.cleanup(),window.setTimeout(function(){e.check.current||(delete window.google,E=!1)},1),this.props.onUnmount&&this.props.onUnmount())},r.render=function(){return t.createElement(t.Fragment,null,t.createElement("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||t.createElement(P,null))},o}(t.PureComponent);function x(e){var o=e.id,r=void 0===o?w.id:o,s=e.version,i=void 0===s?w.version:s,a=e.googleMapsApiKey,p=e.googleMapsClientId,c=e.language,l=e.region,u=e.libraries,d=e.preventGoogleFontsLoading,h=t.useRef(!1),m=t.useState(!1),g=m[0],y=m[1],E=t.useState(void 0),P=E[0],b=E[1];t.useEffect(function(){return h.current=!0,function(){h.current=!1}},[]),t.useEffect(function(){f&&d&&M()},[d]),t.useEffect(function(){g&&(window.google||n(!1))},[g]);var x=C({version:i,googleMapsApiKey:a,googleMapsClientId:p,language:c,region:l,libraries:u});t.useEffect(function(){function e(){h.current&&(y(!0),k=x)}f&&(window.google&&k===x?e():v({id:r,url:x}).then(e).catch(function(e){h.current&&b(e),console.warn("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key ("+(a||"-")+") or Client ID ("+(p||"-")+")\n Otherwise it is a Network issue.\n "),console.error(e)}))},[r,x]);var L=t.useRef();return t.useEffect(function(){L.current&&u!==L.current&&console.warn("Performance warning! Loadscript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),L.current=u},[u]),{isLoaded:g,loadError:P,url:x}}b.defaultProps=w;var L=t.createElement(P,null);function D(e){var n=e.loadingElement,o=e.onLoad,r=e.onError,s=e.onUnmount,i=e.children,a=x(function(e,t){if(null==e)return{};var n,o,r={},s=Object.keys(e);for(o=0;o<s.length;o++)t.indexOf(n=s[o])>=0||(r[n]=e[n]);return r}(e,["loadingElement","onLoad","onError","onUnmount","children"])),p=a.isLoaded,c=a.loadError;return t.useEffect(function(){p&&"function"==typeof o&&o()},[p,o]),t.useEffect(function(){c&&"function"==typeof r&&r(c)},[c,r]),t.useEffect(function(){return function(){s&&s()}},[s]),p?i:n||L}var S=t.memo(D),U={},O={options:function(e,t){e.setOptions(t)}},R=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).state={trafficLayer:null},t.setTrafficLayerCallback=function(){null!==t.state.trafficLayer&&t.props.onLoad&&t.props.onLoad(t.state.trafficLayer)},t.registeredEvents=[],t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.TrafficLayer(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:O,eventMap:U,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{trafficLayer:e}},this.setTrafficLayerCallback)},n.componentDidUpdate=function(e){null!==this.state.trafficLayer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:O,eventMap:U,prevProps:e,nextProps:this.props,instance:this.state.trafficLayer}))},n.componentWillUnmount=function(){null!==this.state.trafficLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),u(this.registeredEvents),this.state.trafficLayer.setMap(null))},n.render=function(){return null},t}(t.PureComponent);R.contextType=a;var T=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).state={bicyclingLayer:null},t.setBicyclingLayerCallback=function(){null!==t.state.bicyclingLayer&&(t.state.bicyclingLayer.setMap(t.context),t.props.onLoad&&t.props.onLoad(t.state.bicyclingLayer))},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:e}},this.setBicyclingLayerCallback)},n.componentWillUnmount=function(){null!==this.state.bicyclingLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},n.render=function(){return null},t}(t.PureComponent);T.contextType=a;var V={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},_={drawingMode:function(e,t){e.setDrawingMode(t)},options:function(e,t){e.setOptions(t)}},I=function(e){function o(t){var o;return(o=e.call(this,t)||this).registeredEvents=[],o.state={drawingManager:null},o.setDrawingManagerCallback=function(){null!==o.state.drawingManager&&o.props.onLoad&&o.props.onLoad(o.state.drawingManager)},google.maps.drawing||n(!1),o}i(o,e);var r=o.prototype;return r.componentDidMount=function(){var e=new google.maps.drawing.DrawingManager(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:_,eventMap:V,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{drawingManager:e}},this.setDrawingManagerCallback)},r.componentDidUpdate=function(e){null!==this.state.drawingManager&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:_,eventMap:V,prevProps:e,nextProps:this.props,instance:this.state.drawingManager}))},r.componentWillUnmount=function(){null!==this.state.drawingManager&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),u(this.registeredEvents),this.state.drawingManager.setMap(null))},r.render=function(){return t.createElement(t.Fragment,null)},o}(t.PureComponent);I.contextType=a;var W={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},A={animation:function(e,t){e.setAnimation(t)},clickable:function(e,t){e.setClickable(t)},cursor:function(e,t){e.setCursor(t)},draggable:function(e,t){e.setDraggable(t)},icon:function(e,t){e.setIcon(t)},label:function(e,t){e.setLabel(t)},map:function(e,t){e.setMap(t)},opacity:function(e,t){e.setOpacity(t)},options:function(e,t){e.setOptions(t)},position:function(e,t){e.setPosition(t)},shape:function(e,t){e.setShape(t)},title:function(e,t){e.setTitle(t)},visible:function(e,t){e.setVisible(t)},zIndex:function(e,t){e.setZIndex(t)}},B=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={marker:null},t.setMarkerCallback=function(){null!==t.state.marker&&t.props.onLoad&&t.props.onLoad(t.state.marker)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=s({},this.props.options||{},{},this.props.clusterer?{}:{map:this.context},{position:this.props.position}),t=new google.maps.Marker(e);this.props.clusterer?this.props.clusterer.addMarker(t,!!this.props.noClustererRedraw):t.setMap(this.context),this.registeredEvents=d({updaterMap:A,eventMap:W,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{marker:t}},this.setMarkerCallback)},n.componentDidUpdate=function(e){null!==this.state.marker&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:A,eventMap:W,prevProps:e,nextProps:this.props,instance:this.state.marker}))},n.componentWillUnmount=function(){null!==this.state.marker&&(this.props.onUnmount&&this.props.onUnmount(this.state.marker),u(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.state.marker,!!this.props.noClustererRedraw):this.state.marker&&this.state.marker.setMap(null))},n.render=function(){return this.props.children||null},t}(t.PureComponent);B.contextType=a;var N={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},j={averageCenter:function(e,t){e.setAverageCenter(t)},batchSizeIE:function(e,t){e.setBatchSizeIE(t)},calculator:function(e,t){e.setCalculator(t)},clusterClass:function(e,t){e.setClusterClass(t)},enableRetinaIcons:function(e,t){e.setEnableRetinaIcons(t)},gridSize:function(e,t){e.setGridSize(t)},ignoreHidden:function(e,t){e.setIgnoreHidden(t)},imageExtension:function(e,t){e.setImageExtension(t)},imagePath:function(e,t){e.setImagePath(t)},imageSizes:function(e,t){e.setImageSizes(t)},maxZoom:function(e,t){e.setMaxZoom(t)},minimumClusterSize:function(e,t){e.setMinimumClusterSize(t)},styles:function(e,t){e.setStyles(t)},title:function(e,t){e.setTitle(t)},zoomOnClick:function(e,t){e.setZoomOnClick(t)}},z=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={markerClusterer:null},t.setClustererCallback=function(){null!==t.state.markerClusterer&&t.props.onLoad&&t.props.onLoad(t.state.markerClusterer)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){if(this.context){var e=new o.Clusterer(this.context,[],this.props.options);this.registeredEvents=d({updaterMap:j,eventMap:N,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{markerClusterer:e}},this.setClustererCallback)}},n.componentDidUpdate=function(e){this.state.markerClusterer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:j,eventMap:N,prevProps:e,nextProps:this.props,instance:this.state.markerClusterer}))},n.componentWillUnmount=function(){null!==this.state.markerClusterer&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),u(this.registeredEvents),this.state.markerClusterer.setMap(null))},n.render=function(){return null!==this.state.markerClusterer?this.props.children(this.state.markerClusterer):null},t}(t.PureComponent);z.contextType=a;var F={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},G={options:function(e,t){e.setOptions(t)},position:function(e,t){e.setPosition(t)},zIndex:function(e,t){e.setZIndex(t)}},H=function(e){function o(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.containerElement=null,t.state={infoWindow:null},t.open=function(e,o){o?e.open(t.context,o):e.getPosition()?e.open(t.context):n(!1)},t.setInfowindowCallback=function(){null!==t.state.infoWindow&&null!==t.containerElement&&(t.state.infoWindow.setContent(t.containerElement),t.open(t.state.infoWindow,t.props.anchor),t.props.onLoad&&t.props.onLoad(t.state.infoWindow))},t}i(o,e);var a=o.prototype;return a.componentDidMount=function(){var e=new google.maps.InfoWindow(s({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=d({updaterMap:G,eventMap:F,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{infoWindow:e}},this.setInfowindowCallback)},a.componentDidUpdate=function(e){null!==this.state.infoWindow&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:G,eventMap:F,prevProps:e,nextProps:this.props,instance:this.state.infoWindow}))},a.componentWillUnmount=function(){null!==this.state.infoWindow&&(u(this.registeredEvents),this.state.infoWindow.close())},a.render=function(){return this.containerElement?r.createPortal(t.Children.only(this.props.children),this.containerElement):t.createElement(t.Fragment,null)},o}(t.PureComponent);H.contextType=a;var Z={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},K={draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},path:function(e,t){e.setPath(t)},visible:function(e,t){e.setVisible(t)}},q=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={polyline:null},t.setPolylineCallback=function(){null!==t.state.polyline&&t.props.onLoad&&t.props.onLoad(t.state.polyline)},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=new google.maps.Polyline(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:K,eventMap:Z,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{polyline:e}},this.setPolylineCallback)},o.componentDidUpdate=function(e){null!==this.state.polyline&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:K,eventMap:Z,prevProps:e,nextProps:this.props,instance:this.state.polyline}))},o.componentWillUnmount=function(){null!==this.state.polyline&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),u(this.registeredEvents),this.state.polyline.setMap(null))},o.render=function(){return t.createElement(t.Fragment,null)},n}(t.PureComponent);q.contextType=a;var Y={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},J={draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},path:function(e,t){e.setPath(t)},paths:function(e,t){e.setPaths(t)},visible:function(e,t){e.setVisible(t)}},Q=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={polygon:null},t.setPolygonCallback=function(){null!==t.state.polygon&&t.props.onLoad&&t.props.onLoad(t.state.polygon)},t.render=function(){return null},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.Polygon(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:J,eventMap:Y,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{polygon:e}},this.setPolygonCallback)},n.componentDidUpdate=function(e){null!==this.state.polygon&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:J,eventMap:Y,prevProps:e,nextProps:this.props,instance:this.state.polygon}))},n.componentWillUnmount=function(){null!==this.state.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),u(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},t}(t.PureComponent);Q.contextType=a;var X={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"},$={bounds:function(e,t){e.setBounds(t)},draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},visible:function(e,t){e.setVisible(t)}},ee=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={rectangle:null},t.setRectangleCallback=function(){null!==t.state.rectangle&&t.props.onLoad&&t.props.onLoad(t.state.rectangle)},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=new google.maps.Rectangle(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:$,eventMap:X,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{rectangle:e}},this.setRectangleCallback)},o.componentDidUpdate=function(e){null!==this.state.rectangle&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:$,eventMap:X,prevProps:e,nextProps:this.props,instance:this.state.rectangle}))},o.componentWillUnmount=function(){null!==this.state.rectangle&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),u(this.registeredEvents),this.state.rectangle.setMap(null))},o.render=function(){return t.createElement(t.Fragment,null)},n}(t.PureComponent);ee.contextType=a;var te={onCenterChanged:"center_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRadiusChanged:"radius_changed",onRightClick:"rightclick"},ne={center:function(e,t){e.setCenter(t)},draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},radius:function(e,t){e.setRadius(t)},visible:function(e,t){e.setVisible(t)}},oe=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={circle:null},t.setCircleCallback=function(){null!==t.state.circle&&t.props.onLoad&&t.props.onLoad(t.state.circle)},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=new google.maps.Circle(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:ne,eventMap:te,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{circle:e}},this.setCircleCallback)},o.componentDidUpdate=function(e){null!==this.state.circle&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:ne,eventMap:te,prevProps:e,nextProps:this.props,instance:this.state.circle}))},o.componentWillUnmount=function(){null!==this.state.circle&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),u(this.registeredEvents),this.state.circle&&this.state.circle.setMap(null))},o.render=function(){return t.createElement(t.Fragment,null)},n}(t.PureComponent);oe.contextType=a;var re={onAddFeature:"addfeature",onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onRightClick:"rightclick",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},se={add:function(e,t){e.add(t)},addgeojson:function(e,t,n){e.addGeoJson(t,n)},contains:function(e,t){e.contains(t)},foreach:function(e,t){e.forEach(t)},loadgeojson:function(e,t,n,o){e.loadGeoJson(t,n,o)},overridestyle:function(e,t,n){e.overrideStyle(t,n)},remove:function(e,t){e.remove(t)},revertstyle:function(e,t){e.revertStyle(t)},controlposition:function(e,t){e.setControlPosition(t)},controls:function(e,t){e.setControls(t)},drawingmode:function(e,t){e.setDrawingMode(t)},map:function(e,t){e.setMap(t)},style:function(e,t){e.setStyle(t)},togeojson:function(e,t){e.toGeoJson(t)}},ie=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={data:null},t.setDataCallback=function(){null!==t.state.data&&t.props.onLoad&&t.props.onLoad(t.state.data)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.Data(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:se,eventMap:re,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{data:e}},this.setDataCallback)},n.componentDidUpdate=function(e){null!==this.state.data&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:se,eventMap:re,prevProps:e,nextProps:this.props,instance:this.state.data}))},n.componentWillUnmount=function(){null!==this.state.data&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),u(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},n.render=function(){return null},t}(t.PureComponent);ie.contextType=a;var ae={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},pe={options:function(e,t){e.setOptions(t)},url:function(e,t){e.setUrl(t)},zIndex:function(e,t){e.setZIndex(t)}},ce=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={kmlLayer:null},t.setKmlLayerCallback=function(){null!==t.state.kmlLayer&&t.props.onLoad&&t.props.onLoad(t.state.kmlLayer)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.KmlLayer(s({},this.props.options,{map:this.context}));this.registeredEvents=d({updaterMap:pe,eventMap:ae,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{kmlLayer:e}},this.setKmlLayerCallback)},n.componentDidUpdate=function(e){null!==this.state.kmlLayer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:pe,eventMap:ae,prevProps:e,nextProps:this.props,instance:this.state.kmlLayer}))},n.componentWillUnmount=function(){null!==this.state.kmlLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),u(this.registeredEvents),this.state.kmlLayer.setMap(null))},n.render=function(){return null},t}(t.PureComponent);ce.contextType=a;var le=function(e,t){return new t(e.lat,e.lng)},ue=function(e,t){return new t(new google.maps.LatLng(e.ne.lat,e.ne.lng),new google.maps.LatLng(e.sw.lat,e.sw.lng))},de=function(e,t,n){return e instanceof t?e:n(e,t)},he=function(e,t,n,o){return void 0!==n?function(e,t,n){var o=e.fromLatLngToDivPixel(n.getNorthEast()),r=e.fromLatLngToDivPixel(n.getSouthWest());return o&&r?{left:r.x+t.x+"px",top:o.y+t.y+"px",width:o.x-r.x-t.x+"px",height:r.y-o.y-t.y+"px"}:{left:"-9999px",top:"-9999px"}}(e,t,de(n,google.maps.LatLngBounds,ue)):function(e,t,n){var o=e.fromLatLngToDivPixel(n);return o?{left:o.x+t.x+"px",top:o.y+t.y+"px"}:{left:"-9999px",top:"-9999px"}}(e,t,de(o,google.maps.LatLng,le))},me=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onLoad&&this.props.onLoad()},n.render=function(){return this.props.children},t}(t.Component),ge=function(e){function o(){var t;return(t=e.apply(this,arguments)||this).state={overlayView:null},t.containerElement=null,t.setOverlayViewCallback=function(){null!==t.state.overlayView&&t.props.onLoad&&t.props.onLoad(t.state.overlayView),t.onPositionElement()},t.onAdd=function(){t.containerElement=document.createElement("div"),t.containerElement.style.position="absolute"},t.onPositionElement=function(){if(null!==t.state.overlayView&&null!==t.containerElement){var e=t.state.overlayView.getProjection(),n=s({x:0,y:0},(r=t.containerElement,"function"==typeof(i=t.props.getPixelPositionOffset)?i(r.offsetWidth,r.offsetHeight):{})),o=he(e,n,t.props.bounds,t.props.position);Object.assign(t.containerElement.style,o)}var r,i},t.draw=function(){t.props.mapPaneName||n(!1);var e=t.state.overlayView;if(null!==e){var o=e.getPanes();o&&(t.containerElement&&o[t.props.mapPaneName].appendChild(t.containerElement),t.onPositionElement(),t.forceUpdate())}},t.onRemove=function(){null!==t.containerElement&&t.containerElement.parentNode&&(t.containerElement.parentNode.removeChild(t.containerElement),delete t.containerElement)},t}i(o,e);var a=o.prototype;return a.componentDidMount=function(){var e=new google.maps.OverlayView;e.onAdd=this.onAdd,e.draw=this.draw,e.onRemove=this.onRemove,e.setMap(this.context),this.setState(function(){return{overlayView:e}})},a.componentDidUpdate=function(e){var t=this;e.position===this.props.position&&e.bounds===this.props.bounds||setTimeout(function(){null!==t.state.overlayView&&t.state.overlayView.draw()},0)},a.componentWillUnmount=function(){null!==this.state.overlayView&&(this.props.onUnmount&&this.props.onUnmount(this.state.overlayView),this.state.overlayView.setMap(null))},a.render=function(){return null!==this.containerElement?r.createPortal(t.createElement(me,{onLoad:this.setOverlayViewCallback},t.Children.only(this.props.children)),this.containerElement):t.createElement(t.Fragment,null)},o}(t.PureComponent);ge.FLOAT_PANE="floatPane",ge.MAP_PANE="mapPane",ge.MARKER_LAYER="markerLayer",ge.OVERLAY_LAYER="overlayLayer",ge.OVERLAY_MOUSE_TARGET="overlayMouseTarget",ge.contextType=a;var fe={onDblClick:"dblclick",onClick:"click"},ve={opacity:function(e,t){e.setOpacity(t)}},ye=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={groundOverlay:null},t.setGroundOverlayCallback=function(){null!==t.state.groundOverlay&&t.props.onLoad&&t.props.onLoad(t.state.groundOverlay)},t}i(t,e);var o=t.prototype;return o.componentDidMount=function(){this.props.url||this.props.bounds||n(!1);var e=new google.maps.GroundOverlay(this.props.url,this.props.bounds,s({},this.props.options,{map:this.context}));this.registeredEvents=d({updaterMap:ve,eventMap:fe,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{groundOverlay:e}},this.setGroundOverlayCallback)},o.componentDidUpdate=function(e){null!==this.state.groundOverlay&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:ve,eventMap:fe,prevProps:e,nextProps:this.props,instance:this.state.groundOverlay}))},o.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},o.render=function(){return null},t}(t.PureComponent);ye.defaultProps={onLoad:function(){}},ye.contextType=a;var Me={},Ce={data:function(e,t){e.setData(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)}},Ee=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={heatmapLayer:null},t.setHeatmapLayerCallback=function(){null!==t.state.heatmapLayer&&t.props.onLoad&&t.props.onLoad(t.state.heatmapLayer)},t}i(t,e);var o=t.prototype;return o.componentDidMount=function(){google.maps.visualization||n(!1),this.props.data||n(!1);var e=new google.maps.visualization.HeatmapLayer(s({data:this.props.data},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:Ce,eventMap:Me,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{heatmapLayer:e}},this.setHeatmapLayerCallback)},o.componentDidUpdate=function(e){u(this.registeredEvents),this.registeredEvents=d({updaterMap:Ce,eventMap:Me,prevProps:e,nextProps:this.props,instance:this.state.heatmapLayer})},o.componentWillUnmount=function(){null!==this.state.heatmapLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),u(this.registeredEvents),this.state.heatmapLayer.setMap(null))},o.render=function(){return null},t}(t.PureComponent);Ee.contextType=a;var Pe={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},ke={register:function(e,t,n){e.registerPanoProvider(t,n)},links:function(e,t){e.setLinks(t)},motionTracking:function(e,t){e.setMotionTracking(t)},options:function(e,t){e.setOptions(t)},pano:function(e,t){e.setPano(t)},position:function(e,t){e.setPosition(t)},pov:function(e,t){e.setPov(t)},visible:function(e,t){e.setVisible(t)},zoom:function(e,t){e.setZoom(t)}},we=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={streetViewPanorama:null},t.setStreetViewPanoramaCallback=function(){null!==t.state.streetViewPanorama&&t.props.onLoad&&t.props.onLoad(t.state.streetViewPanorama)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this.context.getStreetView();this.registeredEvents=d({updaterMap:ke,eventMap:Pe,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{streetViewPanorama:e}},this.setStreetViewPanoramaCallback)},n.componentDidUpdate=function(e){null!==this.state.streetViewPanorama&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:ke,eventMap:Pe,prevProps:e,nextProps:this.props,instance:this.state.streetViewPanorama}))},n.componentWillUnmount=function(){null!==this.state.streetViewPanorama&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),u(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},n.render=function(){return null},t}(t.PureComponent);we.contextType=a;var be=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).state={streetViewService:null},t.setStreetViewServiceCallback=function(){null!==t.state.streetViewService&&t.props.onLoad&&t.props.onLoad(t.state.streetViewService)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:e}})},n.componentWillUnmount=function(){null!==this.state.streetViewService&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},n.render=function(){return null},t}(t.PureComponent);be.contextType=a;var xe=function(e){function o(){var t;return(t=e.apply(this,arguments)||this).state={directionsService:null},t.setDirectionsServiceCallback=function(){null!==t.state.directionsService&&t.props.onLoad&&t.props.onLoad(t.state.directionsService)},t}i(o,e);var r=o.prototype;return r.componentDidMount=function(){this.props.options||n(!1);var e=new google.maps.DirectionsService;this.setState(function(){return{directionsService:e}},this.setDirectionsServiceCallback)},r.componentDidUpdate=function(){null!==this.state.directionsService&&this.state.directionsService.route(this.props.options,this.props.callback)},r.componentWillUnmount=function(){null!==this.state.directionsService&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},r.render=function(){return t.createElement(t.Fragment,null)},o}(t.PureComponent),Le={onDirectionsChanged:"directions_changed"},De={directions:function(e,t){e.setDirections(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},panel:function(e,t){e.setPanel(t)},routeIndex:function(e,t){e.setRouteIndex(t)}},Se=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={directionsRenderer:null},t.setDirectionsRendererCallback=function(){null!==t.state.directionsRenderer&&(t.state.directionsRenderer.setMap(t.context),t.props.onLoad&&t.props.onLoad(t.state.directionsRenderer))},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=d({updaterMap:De,eventMap:Le,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{directionsRenderer:e}},this.setDirectionsRendererCallback)},o.componentDidUpdate=function(e){null!==this.state.directionsRenderer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:De,eventMap:Le,prevProps:e,nextProps:this.props,instance:this.state.directionsRenderer}))},o.componentWillUnmount=function(){null!==this.state.directionsRenderer&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),u(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},o.render=function(){return t.createElement(t.Fragment,null)},n}(t.PureComponent);Se.contextType=a;var Ue=function(e){function o(){var t;return(t=e.apply(this,arguments)||this).state={distanceMatrixService:null},t.setDistanceMatrixServiceCallbak=function(){null!==t.state.distanceMatrixService&&t.props.onLoad&&t.props.onLoad(t.state.distanceMatrixService)},t}i(o,e);var r=o.prototype;return r.componentDidMount=function(){this.props.options||n(!1);var e=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:e}},this.setDistanceMatrixServiceCallbak)},r.componentDidUpdate=function(){null!==this.state.distanceMatrixService&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},r.componentWillUnmount=function(){null!==this.state.distanceMatrixService&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},r.render=function(){return t.createElement(t.Fragment,null)},o}(t.PureComponent),Oe={onPlacesChanged:"places_changed"},Re={bounds:function(e,t){e.setBounds(t)}},Te=function(e){function o(){var n;return(n=e.apply(this,arguments)||this).registeredEvents=[],n.containerElement=t.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){null!==n.state.searchBox&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}i(o,e);var r=o.prototype;return r.componentDidMount=function(){if(google.maps.places||n(!1),null!==this.containerElement&&null!==this.containerElement.current){var e=this.containerElement.current.querySelector("input");if(e){var t=new google.maps.places.SearchBox(e,this.props.options);this.registeredEvents=d({updaterMap:Re,eventMap:Oe,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{searchBox:t}},this.setSearchBoxCallback)}}},r.componentDidUpdate=function(e){null!==this.state.searchBox&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:Re,eventMap:Oe,prevProps:e,nextProps:this.props,instance:this.state.searchBox}))},r.componentWillUnmount=function(){null!==this.state.searchBox&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),u(this.registeredEvents))},r.render=function(){return t.createElement("div",{ref:this.containerElement},t.Children.only(this.props.children))},o}(t.PureComponent);Te.contextType=a;var Ve={onPlaceChanged:"place_changed"},_e={bounds:function(e,t){e.setBounds(t)},restrictions:function(e,t){e.setComponentRestrictions(t)},fields:function(e,t){e.setFields(t)},options:function(e,t){e.setOptions(t)},types:function(e,t){e.setTypes(t)}},Ie=function(e){function o(){var n;return(n=e.apply(this,arguments)||this).registeredEvents=[],n.containerElement=t.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){null!==n.state.autocomplete&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}i(o,e);var r=o.prototype;return r.componentDidMount=function(){google.maps.places||n(!1);var e=this.containerElement.current.querySelector("input");if(e){var t=new google.maps.places.Autocomplete(e,this.props.options);this.registeredEvents=d({updaterMap:_e,eventMap:Ve,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{autocomplete:t}},this.setAutocompleteCallback)}},r.componentDidUpdate=function(e){u(this.registeredEvents),this.registeredEvents=d({updaterMap:_e,eventMap:Ve,prevProps:e,nextProps:this.props,instance:this.state.autocomplete})},r.componentWillUnmount=function(){null!==this.state.autocomplete&&u(this.registeredEvents)},r.render=function(){return t.createElement("div",{ref:this.containerElement},t.Children.only(this.props.children))},o}(t.PureComponent);Ie.contextType=a,e.Autocomplete=Ie,e.BicyclingLayer=T,e.Circle=oe,e.Data=ie,e.DirectionsRenderer=Se,e.DirectionsService=xe,e.DistanceMatrixService=Ue,e.DrawingManager=I,e.GoogleMap=g,e.GroundOverlay=ye,e.HeatmapLayer=Ee,e.InfoWindow=H,e.KmlLayer=ce,e.LoadScript=b,e.LoadScriptNext=S,e.Marker=B,e.MarkerClusterer=z,e.OverlayView=ge,e.Polygon=Q,e.Polyline=q,e.Rectangle=ee,e.StandaloneSearchBox=Te,e.StreetViewPanorama=we,e.StreetViewService=be,e.TrafficLayer=R,e.useGoogleMap=function(){t.useContext||n(!1);var e=t.useContext(a);return e||n(!1),e},e.useLoadScript=x});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("invariant"),require("@react-google-maps/marker-clusterer"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","invariant","@react-google-maps/marker-clusterer","react-dom"],t):t((e=e||self).reactGoogleMapsApi={},e.React,e.invariant,e.markerClusterer,e.reactDom)}(this,function(e,t,n,o,r){"use strict";function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n=n&&n.hasOwnProperty("default")?n.default:n;var a=t.createContext(null),p=function(e,t,n){return Object.keys(e).reduce(function(n,o){return t(n,e[o],o)},n)},c=function(e,t,n,o){var r,s,i={};return r=e,s=function(e,r){var s=n[r];s!==t[r]&&(i[r]=s,e(o,s))},Object.keys(r).forEach(function(e){return s(r[e],e)}),i};function l(e){google.maps.event.removeListener(e)}function u(e){void 0===e&&(e=[]),e.map(l)}function d(e){var t=e.updaterMap,n=e.prevProps,o=e.nextProps,r=e.instance,s=function(t,n,o){return p(e.eventMap,function(e,o,r){return"function"==typeof t[r]&&e.push(google.maps.event.addListener(n,o,t[r])),e},[])}(o,r);return c(t,n,o,r),s}var h={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},m={extraMapTypes:function(e,t){t.forEach(function(t,n){e.mapTypes.set(String(n),t)})},center:function(e,t){e.setCenter(t)},clickableIcons:function(e,t){e.setClickableIcons(t)},heading:function(e,t){e.setHeading(t)},mapTypeId:function(e,t){e.setMapTypeId(t)},options:function(e,t){e.setOptions(t)},streetView:function(e,t){e.setStreetView(t)},tilt:function(e,t){e.setTilt(t)},zoom:function(e,t){e.setZoom(t)}},g=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state={map:null},t.registeredEvents=[],t.mapRef=null,t.getInstance=function(){return new google.maps.Map(t.mapRef,t.props.options)},t.setMapCallback=function(){null!==t.state.map&&t.props.onLoad&&t.props.onLoad(t.state.map)},t.getRef=function(e){t.mapRef=e},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=this.getInstance();this.registeredEvents=d({updaterMap:m,eventMap:h,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{map:e}},this.setMapCallback)},o.componentDidUpdate=function(e){null!==this.state.map&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:m,eventMap:h,prevProps:e,nextProps:this.props,instance:this.state.map}))},o.componentWillUnmount=function(){null!==this.state.map&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),u(this.registeredEvents))},o.render=function(){return t.createElement("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName},t.createElement(a.Provider,{value:this.state.map},null!==this.state.map?this.props.children:t.createElement(t.Fragment,null)))},n}(t.PureComponent),f="undefined"!=typeof document,v=function(e){var t=e.url,n=e.id;return f?new Promise(function(e,o){var r=document.getElementById(n),s=window;if(r){if(r.src===t){if("ready"===r.getAttribute("data-state"))return e(n);var i=s.initMap;return void(s.initMap=function(){i&&i(),e(n)})}r.remove()}var a=document.createElement("script");a.type="text/javascript",a.src=t,a.id=n,a.async=!0,a.onerror=o,s.initMap=function(){a.setAttribute("data-state","ready"),e(n)},document.head.appendChild(a)}).catch(function(e){console.error("injectScript error: ",e)}):Promise.reject(new Error("document is undefined"))},y=function(e){return!((!e.href||0!==e.href.indexOf("https://fonts.googleapis.com/css?family=Roboto"))&&("style"===e.tagName.toLowerCase()&&e.styleSheet&&e.styleSheet.cssText&&0===e.styleSheet.cssText.replace("\r\n","").indexOf(".gm-style")?(e.styleSheet.cssText="",0):"style"===e.tagName.toLowerCase()&&e.innerHTML&&0===e.innerHTML.replace("\r\n","").indexOf(".gm-style")?(e.innerHTML="",0):"style"!==e.tagName.toLowerCase()||e.styleSheet||e.innerHTML))},M=function(){var e=document.getElementsByTagName("head")[0],t=e.insertBefore.bind(e);e.insertBefore=function(n,o){y(n)||Reflect.apply(t,e,[n,o])};var n=e.appendChild.bind(e);e.appendChild=function(t){y(t)||Reflect.apply(n,e,[t])}};function C(e){var t=e.googleMapsApiKey,o=e.googleMapsClientId,r=e.version,s=void 0===r?"weekly":r,i=e.language,a=e.region,p=e.libraries,c=e.channel,l=[];return t&&o||!t||!o||n(!1),t?l.push("key="+t):o&&l.push("client="+o),s&&l.push("v="+s),i&&l.push("language="+i),a&&l.push("region="+a),p&&p.length&&l.push("libraries="+p.sort().join(",")),c&&l.push("channel="+c),l.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?"+l.join("&")}var E=!1;function P(){return t.createElement("div",null,"Loading...")}var k,w={id:"script-loader",version:"weekly"},b=function(e){function o(){var o;return(o=e.apply(this,arguments)||this).check=t.createRef(),o.state={loaded:!1},o.cleanupCallback=function(){delete window.google,o.injectScript()},o.isCleaningUp=function(){try{return Promise.resolve(new Promise(function(e){if(E){if(f)var t=window.setInterval(function(){E||(window.clearInterval(t),e())},1)}else e()}))}catch(e){return Promise.reject(e)}},o.cleanup=function(){E=!0;var e=document.getElementById(o.props.id);e&&e.parentNode&&e.parentNode.removeChild(e),Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function(e){return e.src.includes("maps.googleapis")}).forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function(e){return"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"===e.href}).forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function(e){return void 0!==e.innerText&&e.innerText.length>0&&e.innerText.includes(".gm-")}).forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)})},o.injectScript=function(){o.props.preventGoogleFontsLoading&&M(),o.props.id||n(!1);var e={id:o.props.id,url:C(o.props)};v(e).then(function(){o.props.onLoad&&o.props.onLoad(),o.setState(function(){return{loaded:!0}})}).catch(function(e){o.props.onError&&o.props.onError(e),console.error("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key ("+(o.props.googleMapsApiKey||"-")+") or Client ID ("+(o.props.googleMapsClientId||"-")+") to <LoadScript />\n Otherwise it is a Network issue.\n ")})},o}i(o,e);var r=o.prototype;return r.componentDidMount=function(){if(f){if(window.google&&!E)return void console.error("google api is already presented");this.isCleaningUp().then(this.injectScript).catch(function(e){console.error("Error at injecting script after cleaning up: ",e)})}},r.componentDidUpdate=function(e){this.props.libraries!==e.libraries&&console.warn("Performance warning! Loadscript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable ounside of component, or somwhere in config files or ENV variables"),f&&e.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},r.componentWillUnmount=function(){var e=this;f&&(this.cleanup(),window.setTimeout(function(){e.check.current||(delete window.google,E=!1)},1),this.props.onUnmount&&this.props.onUnmount())},r.render=function(){return t.createElement(t.Fragment,null,t.createElement("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||t.createElement(P,null))},o}(t.PureComponent);function x(e){var o=e.id,r=void 0===o?w.id:o,s=e.version,i=void 0===s?w.version:s,a=e.googleMapsApiKey,p=e.googleMapsClientId,c=e.language,l=e.region,u=e.libraries,d=e.preventGoogleFontsLoading,h=e.channel,m=t.useRef(!1),g=t.useState(!1),y=g[0],E=g[1],P=t.useState(void 0),b=P[0],x=P[1];t.useEffect(function(){return m.current=!0,function(){m.current=!1}},[]),t.useEffect(function(){f&&d&&M()},[d]),t.useEffect(function(){y&&(window.google||n(!1))},[y]);var L=C({version:i,googleMapsApiKey:a,googleMapsClientId:p,language:c,region:l,libraries:u,channel:h});t.useEffect(function(){function e(){m.current&&(E(!0),k=L)}f&&(window.google&&k===L?e():v({id:r,url:L}).then(e).catch(function(e){m.current&&x(e),console.warn("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key ("+(a||"-")+") or Client ID ("+(p||"-")+")\n Otherwise it is a Network issue.\n "),console.error(e)}))},[r,L]);var D=t.useRef();return t.useEffect(function(){D.current&&u!==D.current&&console.warn("Performance warning! Loadscript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),D.current=u},[u]),{isLoaded:y,loadError:b,url:L}}b.defaultProps=w;var L=t.createElement(P,null);function D(e){var n=e.loadingElement,o=e.onLoad,r=e.onError,s=e.onUnmount,i=e.children,a=x(function(e,t){if(null==e)return{};var n,o,r={},s=Object.keys(e);for(o=0;o<s.length;o++)t.indexOf(n=s[o])>=0||(r[n]=e[n]);return r}(e,["loadingElement","onLoad","onError","onUnmount","children"])),p=a.isLoaded,c=a.loadError;return t.useEffect(function(){p&&"function"==typeof o&&o()},[p,o]),t.useEffect(function(){c&&"function"==typeof r&&r(c)},[c,r]),t.useEffect(function(){return function(){s&&s()}},[s]),p?i:n||L}var S=t.memo(D),U={},O={options:function(e,t){e.setOptions(t)}},R=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).state={trafficLayer:null},t.setTrafficLayerCallback=function(){null!==t.state.trafficLayer&&t.props.onLoad&&t.props.onLoad(t.state.trafficLayer)},t.registeredEvents=[],t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.TrafficLayer(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:O,eventMap:U,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{trafficLayer:e}},this.setTrafficLayerCallback)},n.componentDidUpdate=function(e){null!==this.state.trafficLayer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:O,eventMap:U,prevProps:e,nextProps:this.props,instance:this.state.trafficLayer}))},n.componentWillUnmount=function(){null!==this.state.trafficLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),u(this.registeredEvents),this.state.trafficLayer.setMap(null))},n.render=function(){return null},t}(t.PureComponent);R.contextType=a;var T=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).state={bicyclingLayer:null},t.setBicyclingLayerCallback=function(){null!==t.state.bicyclingLayer&&(t.state.bicyclingLayer.setMap(t.context),t.props.onLoad&&t.props.onLoad(t.state.bicyclingLayer))},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:e}},this.setBicyclingLayerCallback)},n.componentWillUnmount=function(){null!==this.state.bicyclingLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},n.render=function(){return null},t}(t.PureComponent);T.contextType=a;var V={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},_={drawingMode:function(e,t){e.setDrawingMode(t)},options:function(e,t){e.setOptions(t)}},I=function(e){function o(t){var o;return(o=e.call(this,t)||this).registeredEvents=[],o.state={drawingManager:null},o.setDrawingManagerCallback=function(){null!==o.state.drawingManager&&o.props.onLoad&&o.props.onLoad(o.state.drawingManager)},google.maps.drawing||n(!1),o}i(o,e);var r=o.prototype;return r.componentDidMount=function(){var e=new google.maps.drawing.DrawingManager(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:_,eventMap:V,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{drawingManager:e}},this.setDrawingManagerCallback)},r.componentDidUpdate=function(e){null!==this.state.drawingManager&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:_,eventMap:V,prevProps:e,nextProps:this.props,instance:this.state.drawingManager}))},r.componentWillUnmount=function(){null!==this.state.drawingManager&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),u(this.registeredEvents),this.state.drawingManager.setMap(null))},r.render=function(){return t.createElement(t.Fragment,null)},o}(t.PureComponent);I.contextType=a;var W={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},A={animation:function(e,t){e.setAnimation(t)},clickable:function(e,t){e.setClickable(t)},cursor:function(e,t){e.setCursor(t)},draggable:function(e,t){e.setDraggable(t)},icon:function(e,t){e.setIcon(t)},label:function(e,t){e.setLabel(t)},map:function(e,t){e.setMap(t)},opacity:function(e,t){e.setOpacity(t)},options:function(e,t){e.setOptions(t)},position:function(e,t){e.setPosition(t)},shape:function(e,t){e.setShape(t)},title:function(e,t){e.setTitle(t)},visible:function(e,t){e.setVisible(t)},zIndex:function(e,t){e.setZIndex(t)}},B=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={marker:null},t.setMarkerCallback=function(){null!==t.state.marker&&t.props.onLoad&&t.props.onLoad(t.state.marker)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=s({},this.props.options||{},{},this.props.clusterer?{}:{map:this.context},{position:this.props.position}),t=new google.maps.Marker(e);this.props.clusterer?this.props.clusterer.addMarker(t,!!this.props.noClustererRedraw):t.setMap(this.context),this.registeredEvents=d({updaterMap:A,eventMap:W,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{marker:t}},this.setMarkerCallback)},n.componentDidUpdate=function(e){null!==this.state.marker&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:A,eventMap:W,prevProps:e,nextProps:this.props,instance:this.state.marker}))},n.componentWillUnmount=function(){null!==this.state.marker&&(this.props.onUnmount&&this.props.onUnmount(this.state.marker),u(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.state.marker,!!this.props.noClustererRedraw):this.state.marker&&this.state.marker.setMap(null))},n.render=function(){return this.props.children||null},t}(t.PureComponent);B.contextType=a;var N={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},j={averageCenter:function(e,t){e.setAverageCenter(t)},batchSizeIE:function(e,t){e.setBatchSizeIE(t)},calculator:function(e,t){e.setCalculator(t)},clusterClass:function(e,t){e.setClusterClass(t)},enableRetinaIcons:function(e,t){e.setEnableRetinaIcons(t)},gridSize:function(e,t){e.setGridSize(t)},ignoreHidden:function(e,t){e.setIgnoreHidden(t)},imageExtension:function(e,t){e.setImageExtension(t)},imagePath:function(e,t){e.setImagePath(t)},imageSizes:function(e,t){e.setImageSizes(t)},maxZoom:function(e,t){e.setMaxZoom(t)},minimumClusterSize:function(e,t){e.setMinimumClusterSize(t)},styles:function(e,t){e.setStyles(t)},title:function(e,t){e.setTitle(t)},zoomOnClick:function(e,t){e.setZoomOnClick(t)}},z=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={markerClusterer:null},t.setClustererCallback=function(){null!==t.state.markerClusterer&&t.props.onLoad&&t.props.onLoad(t.state.markerClusterer)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){if(this.context){var e=new o.Clusterer(this.context,[],this.props.options);this.registeredEvents=d({updaterMap:j,eventMap:N,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{markerClusterer:e}},this.setClustererCallback)}},n.componentDidUpdate=function(e){this.state.markerClusterer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:j,eventMap:N,prevProps:e,nextProps:this.props,instance:this.state.markerClusterer}))},n.componentWillUnmount=function(){null!==this.state.markerClusterer&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),u(this.registeredEvents),this.state.markerClusterer.setMap(null))},n.render=function(){return null!==this.state.markerClusterer?this.props.children(this.state.markerClusterer):null},t}(t.PureComponent);z.contextType=a;var F={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},G={options:function(e,t){e.setOptions(t)},position:function(e,t){e.setPosition(t)},zIndex:function(e,t){e.setZIndex(t)}},H=function(e){function o(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.containerElement=null,t.state={infoWindow:null},t.open=function(e,o){o?e.open(t.context,o):e.getPosition()?e.open(t.context):n(!1)},t.setInfowindowCallback=function(){null!==t.state.infoWindow&&null!==t.containerElement&&(t.state.infoWindow.setContent(t.containerElement),t.open(t.state.infoWindow,t.props.anchor),t.props.onLoad&&t.props.onLoad(t.state.infoWindow))},t}i(o,e);var a=o.prototype;return a.componentDidMount=function(){var e=new google.maps.InfoWindow(s({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=d({updaterMap:G,eventMap:F,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{infoWindow:e}},this.setInfowindowCallback)},a.componentDidUpdate=function(e){null!==this.state.infoWindow&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:G,eventMap:F,prevProps:e,nextProps:this.props,instance:this.state.infoWindow}))},a.componentWillUnmount=function(){null!==this.state.infoWindow&&(u(this.registeredEvents),this.state.infoWindow.close())},a.render=function(){return this.containerElement?r.createPortal(t.Children.only(this.props.children),this.containerElement):t.createElement(t.Fragment,null)},o}(t.PureComponent);H.contextType=a;var Z={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},K={draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},path:function(e,t){e.setPath(t)},visible:function(e,t){e.setVisible(t)}},q=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={polyline:null},t.setPolylineCallback=function(){null!==t.state.polyline&&t.props.onLoad&&t.props.onLoad(t.state.polyline)},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=new google.maps.Polyline(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:K,eventMap:Z,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{polyline:e}},this.setPolylineCallback)},o.componentDidUpdate=function(e){null!==this.state.polyline&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:K,eventMap:Z,prevProps:e,nextProps:this.props,instance:this.state.polyline}))},o.componentWillUnmount=function(){null!==this.state.polyline&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),u(this.registeredEvents),this.state.polyline.setMap(null))},o.render=function(){return t.createElement(t.Fragment,null)},n}(t.PureComponent);q.contextType=a;var Y={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},J={draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},path:function(e,t){e.setPath(t)},paths:function(e,t){e.setPaths(t)},visible:function(e,t){e.setVisible(t)}},Q=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={polygon:null},t.setPolygonCallback=function(){null!==t.state.polygon&&t.props.onLoad&&t.props.onLoad(t.state.polygon)},t.render=function(){return null},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.Polygon(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:J,eventMap:Y,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{polygon:e}},this.setPolygonCallback)},n.componentDidUpdate=function(e){null!==this.state.polygon&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:J,eventMap:Y,prevProps:e,nextProps:this.props,instance:this.state.polygon}))},n.componentWillUnmount=function(){null!==this.state.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),u(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},t}(t.PureComponent);Q.contextType=a;var X={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"},$={bounds:function(e,t){e.setBounds(t)},draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},visible:function(e,t){e.setVisible(t)}},ee=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={rectangle:null},t.setRectangleCallback=function(){null!==t.state.rectangle&&t.props.onLoad&&t.props.onLoad(t.state.rectangle)},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=new google.maps.Rectangle(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:$,eventMap:X,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{rectangle:e}},this.setRectangleCallback)},o.componentDidUpdate=function(e){null!==this.state.rectangle&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:$,eventMap:X,prevProps:e,nextProps:this.props,instance:this.state.rectangle}))},o.componentWillUnmount=function(){null!==this.state.rectangle&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),u(this.registeredEvents),this.state.rectangle.setMap(null))},o.render=function(){return t.createElement(t.Fragment,null)},n}(t.PureComponent);ee.contextType=a;var te={onCenterChanged:"center_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRadiusChanged:"radius_changed",onRightClick:"rightclick"},ne={center:function(e,t){e.setCenter(t)},draggable:function(e,t){e.setDraggable(t)},editable:function(e,t){e.setEditable(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},radius:function(e,t){e.setRadius(t)},visible:function(e,t){e.setVisible(t)}},oe=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={circle:null},t.setCircleCallback=function(){null!==t.state.circle&&t.props.onLoad&&t.props.onLoad(t.state.circle)},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=new google.maps.Circle(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:ne,eventMap:te,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{circle:e}},this.setCircleCallback)},o.componentDidUpdate=function(e){null!==this.state.circle&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:ne,eventMap:te,prevProps:e,nextProps:this.props,instance:this.state.circle}))},o.componentWillUnmount=function(){null!==this.state.circle&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),u(this.registeredEvents),this.state.circle&&this.state.circle.setMap(null))},o.render=function(){return t.createElement(t.Fragment,null)},n}(t.PureComponent);oe.contextType=a;var re={onAddFeature:"addfeature",onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onRightClick:"rightclick",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},se={add:function(e,t){e.add(t)},addgeojson:function(e,t,n){e.addGeoJson(t,n)},contains:function(e,t){e.contains(t)},foreach:function(e,t){e.forEach(t)},loadgeojson:function(e,t,n,o){e.loadGeoJson(t,n,o)},overridestyle:function(e,t,n){e.overrideStyle(t,n)},remove:function(e,t){e.remove(t)},revertstyle:function(e,t){e.revertStyle(t)},controlposition:function(e,t){e.setControlPosition(t)},controls:function(e,t){e.setControls(t)},drawingmode:function(e,t){e.setDrawingMode(t)},map:function(e,t){e.setMap(t)},style:function(e,t){e.setStyle(t)},togeojson:function(e,t){e.toGeoJson(t)}},ie=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={data:null},t.setDataCallback=function(){null!==t.state.data&&t.props.onLoad&&t.props.onLoad(t.state.data)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.Data(s({},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:se,eventMap:re,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{data:e}},this.setDataCallback)},n.componentDidUpdate=function(e){null!==this.state.data&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:se,eventMap:re,prevProps:e,nextProps:this.props,instance:this.state.data}))},n.componentWillUnmount=function(){null!==this.state.data&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),u(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},n.render=function(){return null},t}(t.PureComponent);ie.contextType=a;var ae={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},pe={options:function(e,t){e.setOptions(t)},url:function(e,t){e.setUrl(t)},zIndex:function(e,t){e.setZIndex(t)}},ce=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={kmlLayer:null},t.setKmlLayerCallback=function(){null!==t.state.kmlLayer&&t.props.onLoad&&t.props.onLoad(t.state.kmlLayer)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.KmlLayer(s({},this.props.options,{map:this.context}));this.registeredEvents=d({updaterMap:pe,eventMap:ae,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{kmlLayer:e}},this.setKmlLayerCallback)},n.componentDidUpdate=function(e){null!==this.state.kmlLayer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:pe,eventMap:ae,prevProps:e,nextProps:this.props,instance:this.state.kmlLayer}))},n.componentWillUnmount=function(){null!==this.state.kmlLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),u(this.registeredEvents),this.state.kmlLayer.setMap(null))},n.render=function(){return null},t}(t.PureComponent);ce.contextType=a;var le=function(e,t){return new t(e.lat,e.lng)},ue=function(e,t){return new t(new google.maps.LatLng(e.ne.lat,e.ne.lng),new google.maps.LatLng(e.sw.lat,e.sw.lng))},de=function(e,t,n){return e instanceof t?e:n(e,t)},he=function(e,t,n,o){return void 0!==n?function(e,t,n){var o=e.fromLatLngToDivPixel(n.getNorthEast()),r=e.fromLatLngToDivPixel(n.getSouthWest());return o&&r?{left:r.x+t.x+"px",top:o.y+t.y+"px",width:o.x-r.x-t.x+"px",height:r.y-o.y-t.y+"px"}:{left:"-9999px",top:"-9999px"}}(e,t,de(n,google.maps.LatLngBounds,ue)):function(e,t,n){var o=e.fromLatLngToDivPixel(n);return o?{left:o.x+t.x+"px",top:o.y+t.y+"px"}:{left:"-9999px",top:"-9999px"}}(e,t,de(o,google.maps.LatLng,le))},me=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onLoad&&this.props.onLoad()},n.render=function(){return this.props.children},t}(t.Component),ge=function(e){function o(){var t;return(t=e.apply(this,arguments)||this).state={overlayView:null},t.containerElement=null,t.setOverlayViewCallback=function(){null!==t.state.overlayView&&t.props.onLoad&&t.props.onLoad(t.state.overlayView),t.onPositionElement()},t.onAdd=function(){t.containerElement=document.createElement("div"),t.containerElement.style.position="absolute"},t.onPositionElement=function(){if(null!==t.state.overlayView&&null!==t.containerElement){var e=t.state.overlayView.getProjection(),n=s({x:0,y:0},(r=t.containerElement,"function"==typeof(i=t.props.getPixelPositionOffset)?i(r.offsetWidth,r.offsetHeight):{})),o=he(e,n,t.props.bounds,t.props.position);Object.assign(t.containerElement.style,o)}var r,i},t.draw=function(){t.props.mapPaneName||n(!1);var e=t.state.overlayView;if(null!==e){var o=e.getPanes();o&&(t.containerElement&&o[t.props.mapPaneName].appendChild(t.containerElement),t.onPositionElement(),t.forceUpdate())}},t.onRemove=function(){null!==t.containerElement&&t.containerElement.parentNode&&(t.containerElement.parentNode.removeChild(t.containerElement),delete t.containerElement)},t}i(o,e);var a=o.prototype;return a.componentDidMount=function(){var e=new google.maps.OverlayView;e.onAdd=this.onAdd,e.draw=this.draw,e.onRemove=this.onRemove,e.setMap(this.context),this.setState(function(){return{overlayView:e}})},a.componentDidUpdate=function(e){var t=this;e.position===this.props.position&&e.bounds===this.props.bounds||setTimeout(function(){null!==t.state.overlayView&&t.state.overlayView.draw()},0)},a.componentWillUnmount=function(){null!==this.state.overlayView&&(this.props.onUnmount&&this.props.onUnmount(this.state.overlayView),this.state.overlayView.setMap(null))},a.render=function(){return null!==this.containerElement?r.createPortal(t.createElement(me,{onLoad:this.setOverlayViewCallback},t.Children.only(this.props.children)),this.containerElement):t.createElement(t.Fragment,null)},o}(t.PureComponent);ge.FLOAT_PANE="floatPane",ge.MAP_PANE="mapPane",ge.MARKER_LAYER="markerLayer",ge.OVERLAY_LAYER="overlayLayer",ge.OVERLAY_MOUSE_TARGET="overlayMouseTarget",ge.contextType=a;var fe={onDblClick:"dblclick",onClick:"click"},ve={opacity:function(e,t){e.setOpacity(t)}},ye=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={groundOverlay:null},t.setGroundOverlayCallback=function(){null!==t.state.groundOverlay&&t.props.onLoad&&t.props.onLoad(t.state.groundOverlay)},t}i(t,e);var o=t.prototype;return o.componentDidMount=function(){this.props.url||this.props.bounds||n(!1);var e=new google.maps.GroundOverlay(this.props.url,this.props.bounds,s({},this.props.options,{map:this.context}));this.registeredEvents=d({updaterMap:ve,eventMap:fe,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{groundOverlay:e}},this.setGroundOverlayCallback)},o.componentDidUpdate=function(e){null!==this.state.groundOverlay&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:ve,eventMap:fe,prevProps:e,nextProps:this.props,instance:this.state.groundOverlay}))},o.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},o.render=function(){return null},t}(t.PureComponent);ye.defaultProps={onLoad:function(){}},ye.contextType=a;var Me={},Ce={data:function(e,t){e.setData(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)}},Ee=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={heatmapLayer:null},t.setHeatmapLayerCallback=function(){null!==t.state.heatmapLayer&&t.props.onLoad&&t.props.onLoad(t.state.heatmapLayer)},t}i(t,e);var o=t.prototype;return o.componentDidMount=function(){google.maps.visualization||n(!1),this.props.data||n(!1);var e=new google.maps.visualization.HeatmapLayer(s({data:this.props.data},this.props.options||{},{map:this.context}));this.registeredEvents=d({updaterMap:Ce,eventMap:Me,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{heatmapLayer:e}},this.setHeatmapLayerCallback)},o.componentDidUpdate=function(e){u(this.registeredEvents),this.registeredEvents=d({updaterMap:Ce,eventMap:Me,prevProps:e,nextProps:this.props,instance:this.state.heatmapLayer})},o.componentWillUnmount=function(){null!==this.state.heatmapLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),u(this.registeredEvents),this.state.heatmapLayer.setMap(null))},o.render=function(){return null},t}(t.PureComponent);Ee.contextType=a;var Pe={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},ke={register:function(e,t,n){e.registerPanoProvider(t,n)},links:function(e,t){e.setLinks(t)},motionTracking:function(e,t){e.setMotionTracking(t)},options:function(e,t){e.setOptions(t)},pano:function(e,t){e.setPano(t)},position:function(e,t){e.setPosition(t)},pov:function(e,t){e.setPov(t)},visible:function(e,t){e.setVisible(t)},zoom:function(e,t){e.setZoom(t)}},we=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={streetViewPanorama:null},t.setStreetViewPanoramaCallback=function(){null!==t.state.streetViewPanorama&&t.props.onLoad&&t.props.onLoad(t.state.streetViewPanorama)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this.context.getStreetView();this.registeredEvents=d({updaterMap:ke,eventMap:Pe,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{streetViewPanorama:e}},this.setStreetViewPanoramaCallback)},n.componentDidUpdate=function(e){null!==this.state.streetViewPanorama&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:ke,eventMap:Pe,prevProps:e,nextProps:this.props,instance:this.state.streetViewPanorama}))},n.componentWillUnmount=function(){null!==this.state.streetViewPanorama&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),u(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},n.render=function(){return null},t}(t.PureComponent);we.contextType=a;var be=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).state={streetViewService:null},t.setStreetViewServiceCallback=function(){null!==t.state.streetViewService&&t.props.onLoad&&t.props.onLoad(t.state.streetViewService)},t}i(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:e}})},n.componentWillUnmount=function(){null!==this.state.streetViewService&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},n.render=function(){return null},t}(t.PureComponent);be.contextType=a;var xe=function(e){function o(){var t;return(t=e.apply(this,arguments)||this).state={directionsService:null},t.setDirectionsServiceCallback=function(){null!==t.state.directionsService&&t.props.onLoad&&t.props.onLoad(t.state.directionsService)},t}i(o,e);var r=o.prototype;return r.componentDidMount=function(){this.props.options||n(!1);var e=new google.maps.DirectionsService;this.setState(function(){return{directionsService:e}},this.setDirectionsServiceCallback)},r.componentDidUpdate=function(){null!==this.state.directionsService&&this.state.directionsService.route(this.props.options,this.props.callback)},r.componentWillUnmount=function(){null!==this.state.directionsService&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},r.render=function(){return t.createElement(t.Fragment,null)},o}(t.PureComponent),Le={onDirectionsChanged:"directions_changed"},De={directions:function(e,t){e.setDirections(t)},map:function(e,t){e.setMap(t)},options:function(e,t){e.setOptions(t)},panel:function(e,t){e.setPanel(t)},routeIndex:function(e,t){e.setRouteIndex(t)}},Se=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).registeredEvents=[],t.state={directionsRenderer:null},t.setDirectionsRendererCallback=function(){null!==t.state.directionsRenderer&&(t.state.directionsRenderer.setMap(t.context),t.props.onLoad&&t.props.onLoad(t.state.directionsRenderer))},t}i(n,e);var o=n.prototype;return o.componentDidMount=function(){var e=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=d({updaterMap:De,eventMap:Le,prevProps:{},nextProps:this.props,instance:e}),this.setState(function(){return{directionsRenderer:e}},this.setDirectionsRendererCallback)},o.componentDidUpdate=function(e){null!==this.state.directionsRenderer&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:De,eventMap:Le,prevProps:e,nextProps:this.props,instance:this.state.directionsRenderer}))},o.componentWillUnmount=function(){null!==this.state.directionsRenderer&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),u(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},o.render=function(){return t.createElement(t.Fragment,null)},n}(t.PureComponent);Se.contextType=a;var Ue=function(e){function o(){var t;return(t=e.apply(this,arguments)||this).state={distanceMatrixService:null},t.setDistanceMatrixServiceCallbak=function(){null!==t.state.distanceMatrixService&&t.props.onLoad&&t.props.onLoad(t.state.distanceMatrixService)},t}i(o,e);var r=o.prototype;return r.componentDidMount=function(){this.props.options||n(!1);var e=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:e}},this.setDistanceMatrixServiceCallbak)},r.componentDidUpdate=function(){null!==this.state.distanceMatrixService&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},r.componentWillUnmount=function(){null!==this.state.distanceMatrixService&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},r.render=function(){return t.createElement(t.Fragment,null)},o}(t.PureComponent),Oe={onPlacesChanged:"places_changed"},Re={bounds:function(e,t){e.setBounds(t)}},Te=function(e){function o(){var n;return(n=e.apply(this,arguments)||this).registeredEvents=[],n.containerElement=t.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){null!==n.state.searchBox&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}i(o,e);var r=o.prototype;return r.componentDidMount=function(){if(google.maps.places||n(!1),null!==this.containerElement&&null!==this.containerElement.current){var e=this.containerElement.current.querySelector("input");if(e){var t=new google.maps.places.SearchBox(e,this.props.options);this.registeredEvents=d({updaterMap:Re,eventMap:Oe,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{searchBox:t}},this.setSearchBoxCallback)}}},r.componentDidUpdate=function(e){null!==this.state.searchBox&&(u(this.registeredEvents),this.registeredEvents=d({updaterMap:Re,eventMap:Oe,prevProps:e,nextProps:this.props,instance:this.state.searchBox}))},r.componentWillUnmount=function(){null!==this.state.searchBox&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),u(this.registeredEvents))},r.render=function(){return t.createElement("div",{ref:this.containerElement},t.Children.only(this.props.children))},o}(t.PureComponent);Te.contextType=a;var Ve={onPlaceChanged:"place_changed"},_e={bounds:function(e,t){e.setBounds(t)},restrictions:function(e,t){e.setComponentRestrictions(t)},fields:function(e,t){e.setFields(t)},options:function(e,t){e.setOptions(t)},types:function(e,t){e.setTypes(t)}},Ie=function(e){function o(){var n;return(n=e.apply(this,arguments)||this).registeredEvents=[],n.containerElement=t.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){null!==n.state.autocomplete&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}i(o,e);var r=o.prototype;return r.componentDidMount=function(){google.maps.places||n(!1);var e=this.containerElement.current.querySelector("input");if(e){var t=new google.maps.places.Autocomplete(e,this.props.options);this.registeredEvents=d({updaterMap:_e,eventMap:Ve,prevProps:{},nextProps:this.props,instance:t}),this.setState(function(){return{autocomplete:t}},this.setAutocompleteCallback)}},r.componentDidUpdate=function(e){u(this.registeredEvents),this.registeredEvents=d({updaterMap:_e,eventMap:Ve,prevProps:e,nextProps:this.props,instance:this.state.autocomplete})},r.componentWillUnmount=function(){null!==this.state.autocomplete&&u(this.registeredEvents)},r.render=function(){return t.createElement("div",{ref:this.containerElement},t.Children.only(this.props.children))},o}(t.PureComponent);Ie.contextType=a,e.Autocomplete=Ie,e.BicyclingLayer=T,e.Circle=oe,e.Data=ie,e.DirectionsRenderer=Se,e.DirectionsService=xe,e.DistanceMatrixService=Ue,e.DrawingManager=I,e.GoogleMap=g,e.GroundOverlay=ye,e.HeatmapLayer=Ee,e.InfoWindow=H,e.KmlLayer=ce,e.LoadScript=b,e.LoadScriptNext=S,e.Marker=B,e.MarkerClusterer=z,e.OverlayView=ge,e.Polygon=Q,e.Polyline=q,e.Rectangle=ee,e.StandaloneSearchBox=Te,e.StreetViewPanorama=we,e.StreetViewService=be,e.TrafficLayer=R,e.useGoogleMap=function(){t.useContext||n(!1);var e=t.useContext(a);return e||n(!1),e},e.useLoadScript=x});
//# sourceMappingURL=reactgooglemapsapi.umd.production.min.js.map

@@ -6,3 +6,3 @@ import { LoadScriptUrlOptions } from './utils/make-load-script-url';

}
export declare function useLoadScript({ id, version, googleMapsApiKey, googleMapsClientId, language, region, libraries, preventGoogleFontsLoading, }: UseLoadScriptOptions): {
export declare function useLoadScript({ id, version, googleMapsApiKey, googleMapsClientId, language, region, libraries, preventGoogleFontsLoading, channel, }: UseLoadScriptOptions): {
isLoaded: boolean;

@@ -9,0 +9,0 @@ loadError: Error | undefined;

@@ -8,3 +8,4 @@ export interface LoadScriptUrlOptions {

libraries?: string[];
channel?: string;
}
export declare function makeLoadScriptUrl({ googleMapsApiKey, googleMapsClientId, version, language, region, libraries }: LoadScriptUrlOptions): string;
export declare function makeLoadScriptUrl({ googleMapsApiKey, googleMapsClientId, version, language, region, libraries, channel }: LoadScriptUrlOptions): string;
{
"name": "@react-google-maps/api",
"version": "1.5.4",
"version": "1.6.0",
"description": "React.js Google Maps API integration",

@@ -86,3 +86,3 @@ "license": "MIT",

"dependencies": {
"@react-google-maps/marker-clusterer": "1.5.4",
"@react-google-maps/marker-clusterer": "1.6.0",
"invariant": "2.2.4"

@@ -96,15 +96,12 @@ },

"@getify/eslint-plugin-proper-arrows": "8.0.1",
"@testing-library/react": "8.0.7",
"@testing-library/react": "9.1.3",
"@types/babel-types": "7.0.7",
"@types/googlemaps": "3.37.1",
"@types/invariant": "2.2.30",
"@types/jest": "24.0.17",
"@types/react-dom": "16.8.5",
"@typescript-eslint/eslint-plugin": "1.13.0",
"@typescript-eslint/parser": "1.13.0",
"@types/jest": "24.0.18",
"@typescript-eslint/eslint-plugin": "2.0.0",
"@typescript-eslint/parser": "2.0.0",
"acorn": "6.2.1",
"awesome-typescript-loader": "5.2.1",
"eslint": "6.1.0",
"eslint-config-standard": "13.0.1",
"eslint-config-standard-react": "8.0.0",
"eslint-config-standard": "14.0.0",
"eslint-config-standard-react": "9.0.0",
"eslint-import-resolver-typescript": "1.1.1",

@@ -125,19 +122,19 @@ "eslint-plugin-ascii": "1.0.0",

"eslint-plugin-react-functional-set-state": "1.2.1",
"eslint-plugin-react-hooks": "1.6.1",
"eslint-plugin-react-perf": "3.2.0",
"eslint-plugin-standard": "4.0.0",
"eslint-plugin-you-dont-need-lodash-underscore": "6.5.0",
"husky": "3.0.2",
"jest": "24.8.0",
"jest-cli": "24.8.0",
"react": "16.8.6",
"eslint-plugin-react-hooks": "1.7.0",
"eslint-plugin-react-perf": "3.2.1",
"eslint-plugin-standard": "4.0.1",
"eslint-plugin-you-dont-need-lodash-underscore": "6.6.0",
"husky": "3.0.4",
"jest": "24.9.0",
"jest-cli": "24.9.0",
"react": "16.9.0",
"react-docgen-typescript": "1.12.5",
"react-dom": "16.8.6",
"react-styleguidist": "9.1.13",
"rimraf": "2.6.3",
"react-dom": "16.9.0",
"react-styleguidist": "9.1.16",
"rimraf": "3.0.0",
"ts-jest": "24.0.2",
"typescript": "3.5.3",
"webpack": "4.39.1"
"webpack": "4.39.2"
},
"gitHead": "80167ddcc3d8e356dbf0b0c3a6292c6a3a989f83"
}

@@ -12,3 +12,3 @@ /* eslint-disable filenames/match-regex */

): any => {
let map: any = {}
const map: any = {}

@@ -15,0 +15,0 @@ const iter = (fn: any, key: string) => {

@@ -28,3 +28,3 @@ import { isBrowser } from "./isbrowser"

const originalInitMap = windowWithGoogleMap.initMap
windowWithGoogleMap.initMap = function() {
windowWithGoogleMap.initMap = function initMap () {
if(originalInitMap) {

@@ -31,0 +31,0 @@ originalInitMap()

@@ -10,2 +10,3 @@ import invariant from "invariant"

libraries?: string[];
channel?: string;
}

@@ -19,3 +20,4 @@

region,
libraries
libraries,
channel
}: LoadScriptUrlOptions) {

@@ -51,2 +53,6 @@ const params = []

if (channel) {
params.push(`channel=${channel}`)
}
params.push('callback=initMap')

@@ -53,0 +59,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc