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,KAAK,CAACy5B,YAAY,EACvBj+B,EAAiB,IAAI,CAACW,gBAAgB,CAE9C,EACAq9B,EAAa1gC,SAAS,CAACiI,MAAM,CAAG,WAC5B,MAAOC,CAAAA,EAAAA,EAAAA,GAAAA,EAAI,MAAO,CAAEP,IAAK,IAAI,CAAC4hB,gBAAgB,CAAEjhB,UAAW,IAAI,CAAC1E,KAAK,CAAC0E,SAAS,CAAEE,SAAUkN,EAAAA,QAAQA,CAACsU,IAAI,CAAC,IAAI,CAACpmB,KAAK,CAAC4E,QAAQ,CAAE,EAClI,EACAk4B,EAAaxvB,YAAY,CAAG,CACxB5I,UAAW,EACf,EACAo4B,EAAahvB,WAAW,CAAGxP,CAE/B,EAAEyG,EAAAA,aAAaA","sources":["webpack://_N_E/./node_modules/@react-google-maps/api/dist/esm.js","webpack://_N_E/"],"sourcesContent":["import { jsx, jsxs, Fragment } from 'react/jsx-runtime';\nimport { createContext, useContext, memo, useState, useRef, useEffect, PureComponent, createRef, useMemo, Children, isValidElement, cloneElement } from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { createPortal } from 'react-dom';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __rest$1(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nfunction __awaiter$1(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar NODE_ENV = process.env.NODE_ENV;\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nvar invariant_1 = invariant;\n\nvar invariant$1 = /*@__PURE__*/getDefaultExportFromCjs(invariant_1);\n\nvar MapContext = createContext(null);\nfunction useGoogleMap() {\n invariant$1(!!useContext, 'useGoogleMap is React hook and requires React version 16.8+');\n var map = useContext(MapContext);\n invariant$1(!!map, 'useGoogleMap needs a GoogleMap available up in the tree');\n return map;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction reduce(obj, fn, acc) {\n return Object.keys(obj).reduce(function reducer(newAcc, key) {\n return fn(newAcc, obj[key], key);\n }, acc);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction forEach(obj, fn) {\n Object.keys(obj).forEach(function (key) {\n return fn(obj[key], key);\n });\n}\n\n/* global google */\nfunction applyUpdaterToNextProps(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nupdaterMap, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nprevProps, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nnextProps, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ninstance\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var map = {};\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var iter = function (fn, key) {\n var nextValue = nextProps[key];\n if (nextValue !== prevProps[key]) {\n map[key] = nextValue;\n fn(instance, nextValue);\n }\n };\n forEach(updaterMap, iter);\n return map;\n}\nfunction registerEvents(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nprops, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ninstance, eventMap) {\n var registeredList = reduce(eventMap, function reducer(acc, googleEventName, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onEventName) {\n if (typeof props[onEventName] === 'function') {\n acc.push(google.maps.event.addListener(instance, googleEventName, props[onEventName]));\n }\n return acc;\n }, []);\n return registeredList;\n}\nfunction unregisterEvent(registered) {\n google.maps.event.removeListener(registered);\n}\nfunction unregisterEvents(events) {\n if (events === void 0) { events = []; }\n events.forEach(unregisterEvent);\n}\nfunction applyUpdatersToPropsAndRegisterEvents(_a) {\n var updaterMap = _a.updaterMap, eventMap = _a.eventMap, prevProps = _a.prevProps, nextProps = _a.nextProps, instance = _a.instance;\n var registeredEvents = registerEvents(nextProps, instance, eventMap);\n applyUpdaterToNextProps(updaterMap, prevProps, nextProps, instance);\n return registeredEvents;\n}\n\nvar eventMap$i = {\n onDblClick: 'dblclick',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMapTypeIdChanged: 'maptypeid_changed',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseDown: 'mousedown',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n onTilesLoaded: 'tilesloaded',\n onBoundsChanged: 'bounds_changed',\n onCenterChanged: 'center_changed',\n onClick: 'click',\n onDrag: 'drag',\n onHeadingChanged: 'heading_changed',\n onIdle: 'idle',\n onProjectionChanged: 'projection_changed',\n onResize: 'resize',\n onTiltChanged: 'tilt_changed',\n onZoomChanged: 'zoom_changed',\n};\nvar updaterMap$i = {\n extraMapTypes: function (map, extra) {\n extra.forEach(function forEachExtra(it, i) {\n map.mapTypes.set(String(i), it);\n });\n },\n center: function (map, center) {\n map.setCenter(center);\n },\n clickableIcons: function (map, clickable) {\n map.setClickableIcons(clickable);\n },\n heading: function (map, heading) {\n map.setHeading(heading);\n },\n mapTypeId: function (map, mapTypeId) {\n map.setMapTypeId(mapTypeId);\n },\n options: function (map, options) {\n map.setOptions(options);\n },\n streetView: function (map, streetView) {\n map.setStreetView(streetView);\n },\n tilt: function (map, tilt) {\n map.setTilt(tilt);\n },\n zoom: function (map, zoom) {\n map.setZoom(zoom);\n },\n};\n// TODO: unfinished!\nfunction GoogleMapFunctional(_a) {\n var children = _a.children, options = _a.options, id = _a.id, mapContainerStyle = _a.mapContainerStyle, mapContainerClassName = _a.mapContainerClassName, center = _a.center, \n // clickableIcons,\n // extraMapTypes,\n // heading,\n // mapTypeId,\n onClick = _a.onClick, onDblClick = _a.onDblClick, onDrag = _a.onDrag, onDragEnd = _a.onDragEnd, onDragStart = _a.onDragStart, onMouseMove = _a.onMouseMove, onMouseOut = _a.onMouseOut, onMouseOver = _a.onMouseOver, onMouseDown = _a.onMouseDown, onMouseUp = _a.onMouseUp, onRightClick = _a.onRightClick, \n // onMapTypeIdChanged,\n // onTilesLoaded,\n // onBoundsChanged,\n onCenterChanged = _a.onCenterChanged, \n // onHeadingChanged,\n // onIdle,\n // onProjectionChanged,\n // onResize,\n // onTiltChanged,\n // onZoomChanged,\n onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var _b = useState(null), map = _b[0], setMap = _b[1];\n var ref = useRef(null);\n // const [extraMapTypesListener, setExtraMapTypesListener] = useState(null)\n var _c = useState(null), centerChangedListener = _c[0], setCenterChangedListener = _c[1];\n var _d = useState(null), dblclickListener = _d[0], setDblclickListener = _d[1];\n var _e = useState(null), dragendListener = _e[0], setDragendListener = _e[1];\n var _f = useState(null), dragstartListener = _f[0], setDragstartListener = _f[1];\n var _g = useState(null), mousedownListener = _g[0], setMousedownListener = _g[1];\n var _h = useState(null), mousemoveListener = _h[0], setMousemoveListener = _h[1];\n var _j = useState(null), mouseoutListener = _j[0], setMouseoutListener = _j[1];\n var _k = useState(null), mouseoverListener = _k[0], setMouseoverListener = _k[1];\n var _l = useState(null), mouseupListener = _l[0], setMouseupListener = _l[1];\n var _m = useState(null), rightclickListener = _m[0], setRightclickListener = _m[1];\n var _o = useState(null), clickListener = _o[0], setClickListener = _o[1];\n var _p = useState(null), dragListener = _p[0], setDragListener = _p[1];\n // Order does matter\n useEffect(function () {\n if (options && map !== null) {\n map.setOptions(options);\n }\n }, [map, options]);\n useEffect(function () {\n if (map !== null && typeof center !== 'undefined') {\n map.setCenter(center);\n }\n }, [map, center]);\n useEffect(function () {\n if (map && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(map, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(function () {\n if (map && onDragEnd) {\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n setDragendListener(google.maps.event.addListener(map, 'dragend', onDragEnd));\n }\n }, [onDragEnd]);\n useEffect(function () {\n if (map && onDragStart) {\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n setDragstartListener(google.maps.event.addListener(map, 'dragstart', onDragStart));\n }\n }, [onDragStart]);\n useEffect(function () {\n if (map && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(map, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(function () {\n if (map && onMouseMove) {\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n setMousemoveListener(google.maps.event.addListener(map, 'mousemove', onMouseMove));\n }\n }, [onMouseMove]);\n useEffect(function () {\n if (map && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(map, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(function () {\n if (map && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(map, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(function () {\n if (map && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(map, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(function () {\n if (map && onRightClick) {\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n setRightclickListener(google.maps.event.addListener(map, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(function () {\n if (map && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(map, 'click', onClick));\n }\n }, [onClick]);\n useEffect(function () {\n if (map && onDrag) {\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n setDragListener(google.maps.event.addListener(map, 'drag', onDrag));\n }\n }, [onDrag]);\n useEffect(function () {\n if (map && onCenterChanged) {\n if (centerChangedListener !== null) {\n google.maps.event.removeListener(centerChangedListener);\n }\n setCenterChangedListener(google.maps.event.addListener(map, 'center_changed', onCenterChanged));\n }\n }, [onClick]);\n useEffect(function () {\n var map = ref.current === null\n ? null\n : new google.maps.Map(ref.current, options);\n setMap(map);\n if (map !== null && onLoad) {\n onLoad(map);\n }\n return function () {\n if (map !== null) {\n if (onUnmount) {\n onUnmount(map);\n }\n }\n };\n }, []);\n return (jsx(\"div\", { id: id, ref: ref, style: mapContainerStyle, className: mapContainerClassName, children: jsx(MapContext.Provider, { value: map, children: map !== null ? children : null }) }));\n}\nmemo(GoogleMapFunctional);\nvar GoogleMap = /** @class */ (function (_super) {\n __extends(GoogleMap, _super);\n function GoogleMap() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n map: null,\n };\n _this.registeredEvents = [];\n _this.mapRef = null;\n _this.getInstance = function () {\n if (_this.mapRef === null) {\n return null;\n }\n return new google.maps.Map(_this.mapRef, _this.props.options);\n };\n _this.panTo = function (latLng) {\n var map = _this.getInstance();\n if (map) {\n map.panTo(latLng);\n }\n };\n _this.setMapCallback = function () {\n if (_this.state.map !== null) {\n if (_this.props.onLoad) {\n _this.props.onLoad(_this.state.map);\n }\n }\n };\n _this.getRef = function (ref) {\n _this.mapRef = ref;\n };\n return _this;\n }\n GoogleMap.prototype.componentDidMount = function () {\n var map = this.getInstance();\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$i,\n eventMap: eventMap$i,\n prevProps: {},\n nextProps: this.props,\n instance: map,\n });\n this.setState(function setMap() {\n return {\n map: map,\n };\n }, this.setMapCallback);\n };\n GoogleMap.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.map !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$i,\n eventMap: eventMap$i,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.map,\n });\n }\n };\n GoogleMap.prototype.componentWillUnmount = function () {\n if (this.state.map !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.map);\n }\n unregisterEvents(this.registeredEvents);\n }\n };\n GoogleMap.prototype.render = function () {\n return (jsx(\"div\", { id: this.props.id, ref: this.getRef, style: this.props.mapContainerStyle, className: this.props.mapContainerClassName, children: jsx(MapContext.Provider, { value: this.state.map, children: this.state.map !== null ? this.props.children : null }) }));\n };\n return GoogleMap;\n}(PureComponent));\n\nvar isBrowser = typeof document !== 'undefined';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction injectScript(_a) {\n var url = _a.url, id = _a.id, nonce = _a.nonce;\n if (!isBrowser) {\n return Promise.reject(new Error('document is undefined'));\n }\n return new Promise(function injectScriptCallback(resolve, reject) {\n var existingScript = document.getElementById(id);\n var windowWithGoogleMap = window;\n if (existingScript) {\n // Same script id/url: keep same script\n var dataStateAttribute = existingScript.getAttribute('data-state');\n if (existingScript.src === url && dataStateAttribute !== 'error') {\n if (dataStateAttribute === 'ready') {\n return resolve(id);\n }\n else {\n var originalInitMap_1 = windowWithGoogleMap.initMap;\n var originalErrorCallback_1 = existingScript.onerror;\n windowWithGoogleMap.initMap = function initMap() {\n if (originalInitMap_1) {\n originalInitMap_1();\n }\n resolve(id);\n };\n existingScript.onerror = function (err) {\n if (originalErrorCallback_1) {\n originalErrorCallback_1(err);\n }\n reject(err);\n };\n return;\n }\n }\n // Same script id, but either\n // 1. requested URL is different\n // 2. script failed to load\n else {\n existingScript.remove();\n }\n }\n var script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = url;\n script.id = id;\n script.async = true;\n script.nonce = nonce || '';\n script.onerror = function onerror(err) {\n script.setAttribute('data-state', 'error');\n reject(err);\n };\n windowWithGoogleMap.initMap = function onload() {\n script.setAttribute('data-state', 'ready');\n resolve(id);\n };\n document.head.appendChild(script);\n }).catch(function (err) {\n console.error('injectScript error: ', err);\n throw err;\n });\n}\n\nfunction isGoogleFontStyle(element) {\n // 'Roboto' or 'Google Sans Text' font download\n var href = element.href;\n if (href && (href.indexOf('https://fonts.googleapis.com/css?family=Roboto') === 0 ||\n href.indexOf('https://fonts.googleapis.com/css?family=Google+Sans+Text') === 0)) {\n return true;\n }\n // font style elements\n if (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.tagName.toLowerCase() === 'style' &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.styleSheet &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.styleSheet.cssText &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.styleSheet.cssText.replace('\\r\\n', '').indexOf('.gm-style') === 0) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.styleSheet.cssText = '';\n return true;\n }\n // font style elements for other browsers\n if (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.tagName.toLowerCase() === 'style' &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.innerHTML &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.innerHTML.replace('\\r\\n', '').indexOf('.gm-style') === 0) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.innerHTML = '';\n return true;\n }\n // when google tries to add empty style\n if (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n element.tagName.toLowerCase() === 'style' &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n !element.styleSheet &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n !element.innerHTML) {\n return true;\n }\n return false;\n}\n// Preventing the Google Maps library from downloading an extra font\nfunction preventGoogleFonts() {\n // we override these methods only for one particular head element\n // default methods for other elements are not affected\n var head = document.getElementsByTagName('head')[0];\n if (head) {\n var trueInsertBefore_1 = head.insertBefore.bind(head);\n // TODO: adding return before reflect solves the TS issue\n head.insertBefore = function insertBefore(newElement, referenceElement) {\n if (!isGoogleFontStyle(newElement)) {\n Reflect.apply(trueInsertBefore_1, head, [newElement, referenceElement]);\n }\n return newElement;\n };\n var trueAppend_1 = head.appendChild.bind(head);\n // TODO: adding return before reflect solves the TS issue\n head.appendChild = function appendChild(textNode) {\n if (!isGoogleFontStyle(textNode)) {\n Reflect.apply(trueAppend_1, head, [textNode]);\n }\n return textNode;\n };\n }\n}\n\nfunction makeLoadScriptUrl(_a) {\n var googleMapsApiKey = _a.googleMapsApiKey, googleMapsClientId = _a.googleMapsClientId, _b = _a.version, version = _b === void 0 ? 'weekly' : _b, language = _a.language, region = _a.region, libraries = _a.libraries, channel = _a.channel, mapIds = _a.mapIds, authReferrerPolicy = _a.authReferrerPolicy;\n var params = [];\n invariant$1((googleMapsApiKey && googleMapsClientId) || !(googleMapsApiKey && googleMapsClientId), 'You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time.');\n if (googleMapsApiKey) {\n params.push(\"key=\".concat(googleMapsApiKey));\n }\n else if (googleMapsClientId) {\n params.push(\"client=\".concat(googleMapsClientId));\n }\n if (version) {\n params.push(\"v=\".concat(version));\n }\n if (language) {\n params.push(\"language=\".concat(language));\n }\n if (region) {\n params.push(\"region=\".concat(region));\n }\n if (libraries && libraries.length) {\n params.push(\"libraries=\".concat(libraries.sort().join(',')));\n }\n if (channel) {\n params.push(\"channel=\".concat(channel));\n }\n if (mapIds && mapIds.length) {\n params.push(\"map_ids=\".concat(mapIds.join(',')));\n }\n if (authReferrerPolicy) {\n params.push(\"auth_referrer_policy=\".concat(authReferrerPolicy));\n }\n params.push('callback=initMap');\n return \"https://maps.googleapis.com/maps/api/js?\".concat(params.join('&'));\n}\n\nvar cleaningUp = false;\nfunction DefaultLoadingElement() {\n return jsx(\"div\", { children: \"Loading...\" });\n}\nvar defaultLoadScriptProps = {\n id: 'script-loader',\n version: 'weekly',\n};\nvar LoadScript = /** @class */ (function (_super) {\n __extends(LoadScript, _super);\n function LoadScript() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.check = createRef();\n _this.state = {\n loaded: false,\n };\n _this.cleanupCallback = function () {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n delete window.google.maps;\n _this.injectScript();\n };\n _this.isCleaningUp = function () { return __awaiter$1(_this, void 0, void 0, function () {\n function promiseCallback(resolve) {\n if (!cleaningUp) {\n resolve();\n }\n else {\n if (isBrowser) {\n var timer_1 = window.setInterval(function interval() {\n if (!cleaningUp) {\n window.clearInterval(timer_1);\n resolve();\n }\n }, 1);\n }\n }\n return;\n }\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(promiseCallback)];\n });\n }); };\n _this.cleanup = function () {\n cleaningUp = true;\n var script = document.getElementById(_this.props.id);\n if (script && script.parentNode) {\n script.parentNode.removeChild(script);\n }\n Array.prototype.slice\n .call(document.getElementsByTagName('script'))\n .filter(function filter(script) {\n return typeof script.src === 'string' && script.src.includes('maps.googleapis');\n })\n .forEach(function forEach(script) {\n if (script.parentNode) {\n script.parentNode.removeChild(script);\n }\n });\n Array.prototype.slice\n .call(document.getElementsByTagName('link'))\n .filter(function filter(link) {\n return (link.href === 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans');\n })\n .forEach(function forEach(link) {\n if (link.parentNode) {\n link.parentNode.removeChild(link);\n }\n });\n Array.prototype.slice\n .call(document.getElementsByTagName('style'))\n .filter(function filter(style) {\n return (style.innerText !== undefined &&\n style.innerText.length > 0 &&\n style.innerText.includes('.gm-'));\n })\n .forEach(function forEach(style) {\n if (style.parentNode) {\n style.parentNode.removeChild(style);\n }\n });\n };\n _this.injectScript = function () {\n if (_this.props.preventGoogleFontsLoading) {\n preventGoogleFonts();\n }\n invariant$1(!!_this.props.id, 'LoadScript requires \"id\" prop to be a string: %s', _this.props.id);\n var injectScriptOptions = {\n id: _this.props.id,\n nonce: _this.props.nonce,\n url: makeLoadScriptUrl(_this.props),\n };\n injectScript(injectScriptOptions)\n .then(function () {\n if (_this.props.onLoad) {\n _this.props.onLoad();\n }\n _this.setState(function setLoaded() {\n return {\n loaded: true,\n };\n });\n return;\n })\n .catch(function (err) {\n if (_this.props.onError) {\n _this.props.onError(err);\n }\n console.error(\"\\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (\".concat(_this\n .props.googleMapsApiKey || '-', \") or Client ID (\").concat(_this.props.googleMapsClientId ||\n '-', \") to \\n Otherwise it is a Network issue.\\n \"));\n });\n };\n return _this;\n }\n LoadScript.prototype.componentDidMount = function () {\n if (isBrowser) {\n if (window.google && window.google.maps && !cleaningUp) {\n console.error('google api is already presented');\n return;\n }\n this.isCleaningUp()\n .then(this.injectScript)\n .catch(function error(err) {\n console.error('Error at injecting script after cleaning up: ', err);\n });\n }\n };\n LoadScript.prototype.componentDidUpdate = function (prevProps) {\n if (this.props.libraries !== prevProps.libraries) {\n 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');\n }\n if (isBrowser && prevProps.language !== this.props.language) {\n this.cleanup();\n // TODO: refactor to use gDSFP maybe... wait for hooks refactoring.\n this.setState(function setLoaded() {\n return {\n loaded: false,\n };\n }, this.cleanupCallback);\n }\n };\n LoadScript.prototype.componentWillUnmount = function () {\n var _this = this;\n if (isBrowser) {\n this.cleanup();\n var timeoutCallback = function () {\n if (!_this.check.current) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n delete window.google;\n cleaningUp = false;\n }\n };\n window.setTimeout(timeoutCallback, 1);\n if (this.props.onUnmount) {\n this.props.onUnmount();\n }\n }\n };\n LoadScript.prototype.render = function () {\n return (jsxs(Fragment, { children: [jsx(\"div\", { ref: this.check }), this.state.loaded\n ? this.props.children\n : this.props.loadingElement || jsx(DefaultLoadingElement, {})] }));\n };\n LoadScript.defaultProps = defaultLoadScriptProps;\n return LoadScript;\n}(PureComponent));\n\n/* eslint-disable filenames/match-regex */\nvar previouslyLoadedUrl;\nfunction useLoadScript(_a) {\n var _b = _a.id, id = _b === void 0 ? defaultLoadScriptProps.id : _b, _c = _a.version, version = _c === void 0 ? defaultLoadScriptProps.version : _c, nonce = _a.nonce, googleMapsApiKey = _a.googleMapsApiKey, googleMapsClientId = _a.googleMapsClientId, language = _a.language, region = _a.region, libraries = _a.libraries, preventGoogleFontsLoading = _a.preventGoogleFontsLoading, channel = _a.channel, mapIds = _a.mapIds, authReferrerPolicy = _a.authReferrerPolicy;\n var isMounted = useRef(false);\n var _d = useState(false), isLoaded = _d[0], setLoaded = _d[1];\n var _e = useState(undefined), loadError = _e[0], setLoadError = _e[1];\n useEffect(function trackMountedState() {\n isMounted.current = true;\n return function () {\n isMounted.current = false;\n };\n }, []);\n useEffect(function applyPreventGoogleFonts() {\n if (isBrowser && preventGoogleFontsLoading) {\n preventGoogleFonts();\n }\n }, [preventGoogleFontsLoading]);\n useEffect(function validateLoadedState() {\n if (isLoaded) {\n invariant$1(!!window.google, 'useLoadScript was marked as loaded, but window.google is not present. Something went wrong.');\n }\n }, [isLoaded]);\n var url = makeLoadScriptUrl({\n version: version,\n googleMapsApiKey: googleMapsApiKey,\n googleMapsClientId: googleMapsClientId,\n language: language,\n region: region,\n libraries: libraries,\n channel: channel,\n mapIds: mapIds,\n authReferrerPolicy: authReferrerPolicy\n });\n useEffect(function loadScriptAndModifyLoadedState() {\n if (!isBrowser) {\n return;\n }\n function setLoadedIfMounted() {\n if (isMounted.current) {\n setLoaded(true);\n previouslyLoadedUrl = url;\n }\n }\n if (window.google && window.google.maps && previouslyLoadedUrl === url) {\n setLoadedIfMounted();\n return;\n }\n injectScript({ id: id, url: url, nonce: nonce })\n .then(setLoadedIfMounted)\n .catch(function handleInjectError(err) {\n if (isMounted.current) {\n setLoadError(err);\n }\n console.warn(\"\\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (\".concat(googleMapsApiKey ||\n '-', \") or Client ID (\").concat(googleMapsClientId || '-', \")\\n Otherwise it is a Network issue.\\n \"));\n console.error(err);\n });\n }, [id, url, nonce]);\n var prevLibraries = useRef();\n useEffect(function checkPerformance() {\n if (prevLibraries.current && libraries !== prevLibraries.current) {\n 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');\n }\n prevLibraries.current = libraries;\n }, [libraries]);\n return { isLoaded: isLoaded, loadError: loadError, url: url };\n}\n\nvar defaultLoadingElement = jsx(DefaultLoadingElement, {});\nfunction LoadScriptNext(_a) {\n var loadingElement = _a.loadingElement, onLoad = _a.onLoad, onError = _a.onError, onUnmount = _a.onUnmount, children = _a.children, hookOptions = __rest$1(_a, [\"loadingElement\", \"onLoad\", \"onError\", \"onUnmount\", \"children\"]);\n var _b = useLoadScript(hookOptions), isLoaded = _b.isLoaded, loadError = _b.loadError;\n useEffect(function handleOnLoad() {\n if (isLoaded && typeof onLoad === 'function') {\n onLoad();\n }\n }, [isLoaded, onLoad]);\n useEffect(function handleOnError() {\n if (loadError && typeof onError === 'function') {\n onError(loadError);\n }\n }, [loadError, onError]);\n useEffect(function handleOnUnmount() {\n return function () {\n if (onUnmount) {\n onUnmount();\n }\n };\n }, [onUnmount]);\n return isLoaded ? children : loadingElement || defaultLoadingElement;\n}\nvar LoadScriptNext$1 = memo(LoadScriptNext);\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nvar fastDeepEqual$1 = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n\n/**\n * Copyright 2019 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at.\n *\n * Http://www.apache.org/licenses/LICENSE-2.0.\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst DEFAULT_ID = \"__googleMapsScriptId\";\n/**\n * The status of the [[Loader]].\n */\nvar LoaderStatus;\n(function (LoaderStatus) {\n LoaderStatus[LoaderStatus[\"INITIALIZED\"] = 0] = \"INITIALIZED\";\n LoaderStatus[LoaderStatus[\"LOADING\"] = 1] = \"LOADING\";\n LoaderStatus[LoaderStatus[\"SUCCESS\"] = 2] = \"SUCCESS\";\n LoaderStatus[LoaderStatus[\"FAILURE\"] = 3] = \"FAILURE\";\n})(LoaderStatus || (LoaderStatus = {}));\n/**\n * [[Loader]] makes it easier to add Google Maps JavaScript API to your application\n * dynamically using\n * [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n * It works by dynamically creating and appending a script node to the the\n * document head and wrapping the callback function so as to return a promise.\n *\n * ```\n * const loader = new Loader({\n * apiKey: \"\",\n * version: \"weekly\",\n * libraries: [\"places\"]\n * });\n *\n * loader.load().then((google) => {\n * const map = new google.maps.Map(...)\n * })\n * ```\n */\nclass Loader {\n /**\n * Creates an instance of Loader using [[LoaderOptions]]. No defaults are set\n * using this library, instead the defaults are set by the Google Maps\n * JavaScript API server.\n *\n * ```\n * const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});\n * ```\n */\n constructor({ apiKey, authReferrerPolicy, channel, client, id = DEFAULT_ID, language, libraries = [], mapIds, nonce, region, retries = 3, url = \"https://maps.googleapis.com/maps/api/js\", version, }) {\n this.callbacks = [];\n this.done = false;\n this.loading = false;\n this.errors = [];\n this.apiKey = apiKey;\n this.authReferrerPolicy = authReferrerPolicy;\n this.channel = channel;\n this.client = client;\n this.id = id || DEFAULT_ID; // Do not allow empty string\n this.language = language;\n this.libraries = libraries;\n this.mapIds = mapIds;\n this.nonce = nonce;\n this.region = region;\n this.retries = retries;\n this.url = url;\n this.version = version;\n if (Loader.instance) {\n if (!fastDeepEqual$1(this.options, Loader.instance.options)) {\n throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(Loader.instance.options)}`);\n }\n return Loader.instance;\n }\n Loader.instance = this;\n }\n get options() {\n return {\n version: this.version,\n apiKey: this.apiKey,\n channel: this.channel,\n client: this.client,\n id: this.id,\n libraries: this.libraries,\n language: this.language,\n region: this.region,\n mapIds: this.mapIds,\n nonce: this.nonce,\n url: this.url,\n authReferrerPolicy: this.authReferrerPolicy,\n };\n }\n get status() {\n if (this.errors.length) {\n return LoaderStatus.FAILURE;\n }\n if (this.done) {\n return LoaderStatus.SUCCESS;\n }\n if (this.loading) {\n return LoaderStatus.LOADING;\n }\n return LoaderStatus.INITIALIZED;\n }\n get failed() {\n return this.done && !this.loading && this.errors.length >= this.retries + 1;\n }\n /**\n * CreateUrl returns the Google Maps JavaScript API script url given the [[LoaderOptions]].\n *\n * @ignore\n * @deprecated\n */\n createUrl() {\n let url = this.url;\n url += `?callback=__googleMapsCallback`;\n if (this.apiKey) {\n url += `&key=${this.apiKey}`;\n }\n if (this.channel) {\n url += `&channel=${this.channel}`;\n }\n if (this.client) {\n url += `&client=${this.client}`;\n }\n if (this.libraries.length > 0) {\n url += `&libraries=${this.libraries.join(\",\")}`;\n }\n if (this.language) {\n url += `&language=${this.language}`;\n }\n if (this.region) {\n url += `®ion=${this.region}`;\n }\n if (this.version) {\n url += `&v=${this.version}`;\n }\n if (this.mapIds) {\n url += `&map_ids=${this.mapIds.join(\",\")}`;\n }\n if (this.authReferrerPolicy) {\n url += `&auth_referrer_policy=${this.authReferrerPolicy}`;\n }\n return url;\n }\n deleteScript() {\n const script = document.getElementById(this.id);\n if (script) {\n script.remove();\n }\n }\n /**\n * Load the Google Maps JavaScript API script and return a Promise.\n * @deprecated, use importLibrary() instead.\n */\n load() {\n return this.loadPromise();\n }\n /**\n * Load the Google Maps JavaScript API script and return a Promise.\n *\n * @ignore\n * @deprecated, use importLibrary() instead.\n */\n loadPromise() {\n return new Promise((resolve, reject) => {\n this.loadCallback((err) => {\n if (!err) {\n resolve(window.google);\n }\n else {\n reject(err.error);\n }\n });\n });\n }\n importLibrary(name) {\n this.execute();\n return google.maps.importLibrary(name);\n }\n /**\n * Load the Google Maps JavaScript API script with a callback.\n * @deprecated, use importLibrary() instead.\n */\n loadCallback(fn) {\n this.callbacks.push(fn);\n this.execute();\n }\n /**\n * Set the script on document.\n */\n setScript() {\n var _a, _b;\n if (document.getElementById(this.id)) {\n // TODO wrap onerror callback for cases where the script was loaded elsewhere\n this.callback();\n return;\n }\n const params = {\n key: this.apiKey,\n channel: this.channel,\n client: this.client,\n libraries: this.libraries.length && this.libraries,\n v: this.version,\n mapIds: this.mapIds,\n language: this.language,\n region: this.region,\n authReferrerPolicy: this.authReferrerPolicy,\n };\n // keep the URL minimal:\n Object.keys(params).forEach(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (key) => !params[key] && delete params[key]);\n if (!((_b = (_a = window === null || window === void 0 ? void 0 : window.google) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.importLibrary)) {\n // tweaked copy of https://developers.google.com/maps/documentation/javascript/load-maps-js-api#dynamic-library-import\n // which also sets the base url, the id, and the nonce\n /* eslint-disable */\n ((g) => {\n // @ts-ignore\n let h, a, k, p = \"The Google Maps JavaScript API\", c = \"google\", l = \"importLibrary\", q = \"__ib__\", m = document, b = window;\n // @ts-ignore\n b = b[c] || (b[c] = {});\n // @ts-ignore\n const d = b.maps || (b.maps = {}), r = new Set(), e = new URLSearchParams(), u = () => \n // @ts-ignore\n h || (h = new Promise((f, n) => __awaiter(this, void 0, void 0, function* () {\n var _a;\n yield (a = m.createElement(\"script\"));\n a.id = this.id;\n e.set(\"libraries\", [...r] + \"\");\n // @ts-ignore\n for (k in g)\n e.set(k.replace(/[A-Z]/g, (t) => \"_\" + t[0].toLowerCase()), g[k]);\n e.set(\"callback\", c + \".maps.\" + q);\n a.src = this.url + `?` + e;\n d[q] = f;\n a.onerror = () => (h = n(Error(p + \" could not load.\")));\n // @ts-ignore\n a.nonce = this.nonce || ((_a = m.querySelector(\"script[nonce]\")) === null || _a === void 0 ? void 0 : _a.nonce) || \"\";\n m.head.append(a);\n })));\n // @ts-ignore\n d[l] ? console.warn(p + \" only loads once. Ignoring:\", g) : (d[l] = (f, ...n) => r.add(f) && u().then(() => d[l](f, ...n)));\n })(params);\n /* eslint-enable */\n }\n // While most libraries populate the global namespace when loaded via bootstrap params,\n // this is not the case for \"marker\" when used with the inline bootstrap loader\n // (and maybe others in the future). So ensure there is an importLibrary for each:\n const libraryPromises = this.libraries.map((library) => this.importLibrary(library));\n // ensure at least one library, to kick off loading...\n if (!libraryPromises.length) {\n libraryPromises.push(this.importLibrary(\"core\"));\n }\n Promise.all(libraryPromises).then(() => this.callback(), (error) => {\n const event = new ErrorEvent(\"error\", { error }); // for backwards compat\n this.loadErrorCallback(event);\n });\n }\n /**\n * Reset the loader state.\n */\n reset() {\n this.deleteScript();\n this.done = false;\n this.loading = false;\n this.errors = [];\n this.onerrorEvent = null;\n }\n resetIfRetryingFailed() {\n if (this.failed) {\n this.reset();\n }\n }\n loadErrorCallback(e) {\n this.errors.push(e);\n if (this.errors.length <= this.retries) {\n const delay = this.errors.length * Math.pow(2, this.errors.length);\n console.error(`Failed to load Google Maps script, retrying in ${delay} ms.`);\n setTimeout(() => {\n this.deleteScript();\n this.setScript();\n }, delay);\n }\n else {\n this.onerrorEvent = e;\n this.callback();\n }\n }\n callback() {\n this.done = true;\n this.loading = false;\n this.callbacks.forEach((cb) => {\n cb(this.onerrorEvent);\n });\n this.callbacks = [];\n }\n execute() {\n this.resetIfRetryingFailed();\n if (this.done) {\n this.callback();\n }\n else {\n // short circuit and warn if google.maps is already loaded\n if (window.google && window.google.maps && window.google.maps.version) {\n console.warn(\"Google Maps already loaded outside @googlemaps/js-api-loader.\" +\n \"This may result in undesirable behavior as options and script parameters may not match.\");\n this.callback();\n return;\n }\n if (this.loading) ;\n else {\n this.loading = true;\n this.setScript();\n }\n }\n }\n}\n\nvar defaultLibraries = ['maps'];\nfunction useJsApiLoader(_a) {\n var _b = _a.id, id = _b === void 0 ? defaultLoadScriptProps.id : _b, _c = _a.version, version = _c === void 0 ? defaultLoadScriptProps.version : _c, nonce = _a.nonce, googleMapsApiKey = _a.googleMapsApiKey, \n // googleMapsClientId,\n language = _a.language, region = _a.region, _d = _a.libraries, libraries = _d === void 0 ? defaultLibraries : _d, preventGoogleFontsLoading = _a.preventGoogleFontsLoading, \n // channel,\n mapIds = _a.mapIds, authReferrerPolicy = _a.authReferrerPolicy;\n var isMounted = useRef(false);\n var _e = useState(false), isLoaded = _e[0], setLoaded = _e[1];\n var _f = useState(undefined), loadError = _f[0], setLoadError = _f[1];\n useEffect(function trackMountedState() {\n isMounted.current = true;\n return function () {\n isMounted.current = false;\n };\n }, []);\n var loader = useMemo(function () {\n return new Loader({\n id: id,\n apiKey: googleMapsApiKey,\n version: version,\n libraries: libraries,\n language: language || 'en',\n region: region || 'US',\n mapIds: mapIds || [],\n nonce: nonce || '',\n authReferrerPolicy: authReferrerPolicy || 'origin',\n });\n }, [id, googleMapsApiKey, version, libraries, language, region, mapIds, nonce, authReferrerPolicy]);\n useEffect(function effect() {\n if (isLoaded) {\n return;\n }\n else {\n loader.load().then(function () {\n if (isMounted.current) {\n setLoaded(true);\n }\n return;\n })\n .catch(function (error) {\n setLoadError(error);\n });\n }\n }, []);\n useEffect(function () {\n if (isBrowser && preventGoogleFontsLoading) {\n preventGoogleFonts();\n }\n }, [preventGoogleFontsLoading]);\n var prevLibraries = useRef();\n useEffect(function () {\n if (prevLibraries.current && libraries !== prevLibraries.current) {\n 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');\n }\n prevLibraries.current = libraries;\n }, [libraries]);\n return { isLoaded: isLoaded, loadError: loadError };\n}\n\nvar eventMap$h = {};\nvar updaterMap$h = {\n options: function (instance, options) {\n instance.setOptions(options);\n },\n};\nfunction TrafficLayerFunctional(_a) {\n var options = _a.options, onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (options && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n var trafficLayer = new google.maps.TrafficLayer(__assign(__assign({}, (options || {})), { map: map }));\n setInstance(trafficLayer);\n if (onLoad) {\n onLoad(trafficLayer);\n }\n return function () {\n if (instance !== null) {\n if (onUnmount) {\n onUnmount(instance);\n }\n instance.setMap(null);\n }\n };\n }, []);\n return null;\n}\nvar TrafficLayerF = memo(TrafficLayerFunctional);\nvar TrafficLayer = /** @class */ (function (_super) {\n __extends(TrafficLayer, _super);\n function TrafficLayer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n trafficLayer: null,\n };\n _this.setTrafficLayerCallback = function () {\n if (_this.state.trafficLayer !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.trafficLayer);\n }\n };\n _this.registeredEvents = [];\n return _this;\n }\n TrafficLayer.prototype.componentDidMount = function () {\n var trafficLayer = new google.maps.TrafficLayer(__assign(__assign({}, (this.props.options || {})), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$h,\n eventMap: eventMap$h,\n prevProps: {},\n nextProps: this.props,\n instance: trafficLayer,\n });\n this.setState(function setTrafficLayer() {\n return {\n trafficLayer: trafficLayer,\n };\n }, this.setTrafficLayerCallback);\n };\n TrafficLayer.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.trafficLayer !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$h,\n eventMap: eventMap$h,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.trafficLayer,\n });\n }\n };\n TrafficLayer.prototype.componentWillUnmount = function () {\n if (this.state.trafficLayer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.trafficLayer);\n }\n unregisterEvents(this.registeredEvents);\n this.state.trafficLayer.setMap(null);\n }\n };\n TrafficLayer.prototype.render = function () {\n return null;\n };\n TrafficLayer.contextType = MapContext;\n return TrafficLayer;\n}(PureComponent));\n\nfunction BicyclingLayerFunctional(_a) {\n var onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n var bicyclingLayer = new google.maps.BicyclingLayer();\n setInstance(bicyclingLayer);\n bicyclingLayer.setMap(map);\n if (onLoad) {\n onLoad(bicyclingLayer);\n }\n return function () {\n if (bicyclingLayer !== null) {\n if (onUnmount) {\n onUnmount(bicyclingLayer);\n }\n bicyclingLayer.setMap(null);\n }\n };\n }, []);\n return null;\n}\nvar BicyclingLayerF = memo(BicyclingLayerFunctional);\nvar BicyclingLayer = /** @class */ (function (_super) {\n __extends(BicyclingLayer, _super);\n function BicyclingLayer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n bicyclingLayer: null,\n };\n _this.setBicyclingLayerCallback = function () {\n if (_this.state.bicyclingLayer !== null) {\n _this.state.bicyclingLayer.setMap(_this.context);\n if (_this.props.onLoad) {\n _this.props.onLoad(_this.state.bicyclingLayer);\n }\n }\n };\n return _this;\n }\n BicyclingLayer.prototype.componentDidMount = function () {\n var bicyclingLayer = new google.maps.BicyclingLayer();\n this.setState(function () {\n return {\n bicyclingLayer: bicyclingLayer,\n };\n }, this.setBicyclingLayerCallback);\n };\n BicyclingLayer.prototype.componentWillUnmount = function () {\n if (this.state.bicyclingLayer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.bicyclingLayer);\n }\n this.state.bicyclingLayer.setMap(null);\n }\n };\n BicyclingLayer.prototype.render = function () {\n return null;\n };\n BicyclingLayer.contextType = MapContext;\n return BicyclingLayer;\n}(PureComponent));\n\nfunction TransitLayerFunctional(_a) {\n var onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n var transitLayer = new google.maps.TransitLayer();\n setInstance(transitLayer);\n transitLayer.setMap(map);\n if (onLoad) {\n onLoad(transitLayer);\n }\n return function () {\n if (instance !== null) {\n if (onUnmount) {\n onUnmount(instance);\n }\n instance.setMap(null);\n }\n };\n }, []);\n return null;\n}\nvar TransitLayerF = memo(TransitLayerFunctional);\nvar TransitLayer = /** @class */ (function (_super) {\n __extends(TransitLayer, _super);\n function TransitLayer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n transitLayer: null,\n };\n _this.setTransitLayerCallback = function () {\n if (_this.state.transitLayer !== null) {\n _this.state.transitLayer.setMap(_this.context);\n if (_this.props.onLoad) {\n _this.props.onLoad(_this.state.transitLayer);\n }\n }\n };\n return _this;\n }\n TransitLayer.prototype.componentDidMount = function () {\n var transitLayer = new google.maps.TransitLayer();\n this.setState(function setTransitLayer() {\n return {\n transitLayer: transitLayer,\n };\n }, this.setTransitLayerCallback);\n };\n TransitLayer.prototype.componentWillUnmount = function () {\n if (this.state.transitLayer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.transitLayer);\n }\n this.state.transitLayer.setMap(null);\n }\n };\n TransitLayer.prototype.render = function () {\n return null;\n };\n TransitLayer.contextType = MapContext;\n return TransitLayer;\n}(PureComponent));\n\nvar eventMap$g = {\n onCircleComplete: 'circlecomplete',\n onMarkerComplete: 'markercomplete',\n onOverlayComplete: 'overlaycomplete',\n onPolygonComplete: 'polygoncomplete',\n onPolylineComplete: 'polylinecomplete',\n onRectangleComplete: 'rectanglecomplete',\n};\nvar updaterMap$g = {\n drawingMode: function (instance, drawingMode) {\n instance.setDrawingMode(drawingMode);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n};\nfunction DrawingManagerFunctional(_a) {\n var options = _a.options, drawingMode = _a.drawingMode, onCircleComplete = _a.onCircleComplete, onMarkerComplete = _a.onMarkerComplete, onOverlayComplete = _a.onOverlayComplete, onPolygonComplete = _a.onPolygonComplete, onPolylineComplete = _a.onPolylineComplete, onRectangleComplete = _a.onRectangleComplete, onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n var _c = useState(null), circlecompleteListener = _c[0], setCircleCompleteListener = _c[1];\n var _d = useState(null), markercompleteListener = _d[0], setMarkerCompleteListener = _d[1];\n var _e = useState(null), overlaycompleteListener = _e[0], setOverlayCompleteListener = _e[1];\n var _f = useState(null), polygoncompleteListener = _f[0], setPolygonCompleteListener = _f[1];\n var _g = useState(null), polylinecompleteListener = _g[0], setPolylineCompleteListener = _g[1];\n var _h = useState(null), rectanglecompleteListener = _h[0], setRectangleCompleteListener = _h[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (options && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n if (instance !== null) {\n instance.setDrawingMode(drawingMode !== null && drawingMode !== void 0 ? drawingMode : null);\n }\n }, [instance, drawingMode]);\n useEffect(function () {\n if (instance && onCircleComplete) {\n if (circlecompleteListener !== null) {\n google.maps.event.removeListener(circlecompleteListener);\n }\n setCircleCompleteListener(google.maps.event.addListener(instance, 'circlecomplete', onCircleComplete));\n }\n }, [instance, onCircleComplete]);\n useEffect(function () {\n if (instance && onMarkerComplete) {\n if (markercompleteListener !== null) {\n google.maps.event.removeListener(markercompleteListener);\n }\n setMarkerCompleteListener(google.maps.event.addListener(instance, 'markercomplete', onMarkerComplete));\n }\n }, [instance, onMarkerComplete]);\n useEffect(function () {\n if (instance && onOverlayComplete) {\n if (overlaycompleteListener !== null) {\n google.maps.event.removeListener(overlaycompleteListener);\n }\n setOverlayCompleteListener(google.maps.event.addListener(instance, 'overlaycomplete', onOverlayComplete));\n }\n }, [instance, onOverlayComplete]);\n useEffect(function () {\n if (instance && onPolygonComplete) {\n if (polygoncompleteListener !== null) {\n google.maps.event.removeListener(polygoncompleteListener);\n }\n setPolygonCompleteListener(google.maps.event.addListener(instance, 'polygoncomplete', onPolygonComplete));\n }\n }, [instance, onPolygonComplete]);\n useEffect(function () {\n if (instance && onPolylineComplete) {\n if (polylinecompleteListener !== null) {\n google.maps.event.removeListener(polylinecompleteListener);\n }\n setPolylineCompleteListener(google.maps.event.addListener(instance, 'polylinecomplete', onPolylineComplete));\n }\n }, [instance, onPolylineComplete]);\n useEffect(function () {\n if (instance && onRectangleComplete) {\n if (rectanglecompleteListener !== null) {\n google.maps.event.removeListener(rectanglecompleteListener);\n }\n setRectangleCompleteListener(google.maps.event.addListener(instance, 'rectanglecomplete', onRectangleComplete));\n }\n }, [instance, onRectangleComplete]);\n useEffect(function () {\n invariant$1(!!google.maps.drawing, \"Did you include prop libraries={['drawing']} in the URL? %s\", google.maps.drawing);\n var drawingManager = new google.maps.drawing.DrawingManager(__assign(__assign({}, (options || {})), { map: map }));\n if (drawingMode) {\n drawingManager.setDrawingMode(drawingMode);\n }\n if (onCircleComplete) {\n setCircleCompleteListener(google.maps.event.addListener(drawingManager, 'circlecomplete', onCircleComplete));\n }\n if (onMarkerComplete) {\n setMarkerCompleteListener(google.maps.event.addListener(drawingManager, 'markercomplete', onMarkerComplete));\n }\n if (onOverlayComplete) {\n setOverlayCompleteListener(google.maps.event.addListener(drawingManager, 'overlaycomplete', onOverlayComplete));\n }\n if (onPolygonComplete) {\n setPolygonCompleteListener(google.maps.event.addListener(drawingManager, 'polygoncomplete', onPolygonComplete));\n }\n if (onPolylineComplete) {\n setPolylineCompleteListener(google.maps.event.addListener(drawingManager, 'polylinecomplete', onPolylineComplete));\n }\n if (onRectangleComplete) {\n setRectangleCompleteListener(google.maps.event.addListener(drawingManager, 'rectanglecomplete', onRectangleComplete));\n }\n setInstance(drawingManager);\n if (onLoad) {\n onLoad(drawingManager);\n }\n return function () {\n if (instance !== null) {\n if (circlecompleteListener) {\n google.maps.event.removeListener(circlecompleteListener);\n }\n if (markercompleteListener) {\n google.maps.event.removeListener(markercompleteListener);\n }\n if (overlaycompleteListener) {\n google.maps.event.removeListener(overlaycompleteListener);\n }\n if (polygoncompleteListener) {\n google.maps.event.removeListener(polygoncompleteListener);\n }\n if (polylinecompleteListener) {\n google.maps.event.removeListener(polylinecompleteListener);\n }\n if (rectanglecompleteListener) {\n google.maps.event.removeListener(rectanglecompleteListener);\n }\n if (onUnmount) {\n onUnmount(instance);\n }\n instance.setMap(null);\n }\n };\n }, []);\n return null;\n}\nvar DrawingManagerF = memo(DrawingManagerFunctional);\nvar DrawingManager = /** @class */ (function (_super) {\n __extends(DrawingManager, _super);\n function DrawingManager(props) {\n var _this = _super.call(this, props) || this;\n _this.registeredEvents = [];\n _this.state = {\n drawingManager: null,\n };\n _this.setDrawingManagerCallback = function () {\n if (_this.state.drawingManager !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.drawingManager);\n }\n };\n invariant$1(!!google.maps.drawing, \"Did you include prop libraries={['drawing']} in the URL? %s\", google.maps.drawing);\n return _this;\n }\n DrawingManager.prototype.componentDidMount = function () {\n var drawingManager = new google.maps.drawing.DrawingManager(__assign(__assign({}, (this.props.options || {})), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$g,\n eventMap: eventMap$g,\n prevProps: {},\n nextProps: this.props,\n instance: drawingManager,\n });\n this.setState(function setDrawingManager() {\n return {\n drawingManager: drawingManager,\n };\n }, this.setDrawingManagerCallback);\n };\n DrawingManager.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.drawingManager !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$g,\n eventMap: eventMap$g,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.drawingManager,\n });\n }\n };\n DrawingManager.prototype.componentWillUnmount = function () {\n if (this.state.drawingManager !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.drawingManager);\n }\n unregisterEvents(this.registeredEvents);\n this.state.drawingManager.setMap(null);\n }\n };\n DrawingManager.prototype.render = function () {\n return null;\n };\n DrawingManager.contextType = MapContext;\n return DrawingManager;\n}(PureComponent));\n\nvar eventMap$f = {\n onAnimationChanged: 'animation_changed',\n onClick: 'click',\n onClickableChanged: 'clickable_changed',\n onCursorChanged: 'cursor_changed',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDraggableChanged: 'draggable_changed',\n onDragStart: 'dragstart',\n onFlatChanged: 'flat_changed',\n onIconChanged: 'icon_changed',\n onMouseDown: 'mousedown',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onPositionChanged: 'position_changed',\n onRightClick: 'rightclick',\n onShapeChanged: 'shape_changed',\n onTitleChanged: 'title_changed',\n onVisibleChanged: 'visible_changed',\n onZindexChanged: 'zindex_changed',\n};\nvar updaterMap$f = {\n animation: function (instance, animation) {\n instance.setAnimation(animation);\n },\n clickable: function (instance, clickable) {\n instance.setClickable(clickable);\n },\n cursor: function (instance, cursor) {\n instance.setCursor(cursor);\n },\n draggable: function (instance, draggable) {\n instance.setDraggable(draggable);\n },\n icon: function (instance, icon) {\n instance.setIcon(icon);\n },\n label: function (instance, label) {\n instance.setLabel(label);\n },\n map: function (instance, map) {\n instance.setMap(map);\n },\n opacity: function (instance, opacity) {\n instance.setOpacity(opacity);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n position: function (instance, position) {\n instance.setPosition(position);\n },\n shape: function (instance, shape) {\n instance.setShape(shape);\n },\n title: function (instance, title) {\n instance.setTitle(title);\n },\n visible: function (instance, visible) {\n instance.setVisible(visible);\n },\n zIndex: function (instance, zIndex) {\n instance.setZIndex(zIndex);\n },\n};\nvar defaultOptions$5 = {};\nfunction MarkerFunctional(_a) {\n var position = _a.position, options = _a.options, clusterer = _a.clusterer, noClustererRedraw = _a.noClustererRedraw, children = _a.children, draggable = _a.draggable, visible = _a.visible, animation = _a.animation, clickable = _a.clickable, cursor = _a.cursor, icon = _a.icon, label = _a.label, opacity = _a.opacity, shape = _a.shape, title = _a.title, zIndex = _a.zIndex, onClick = _a.onClick, onDblClick = _a.onDblClick, onDrag = _a.onDrag, onDragEnd = _a.onDragEnd, onDragStart = _a.onDragStart, onMouseOut = _a.onMouseOut, onMouseOver = _a.onMouseOver, onMouseUp = _a.onMouseUp, onMouseDown = _a.onMouseDown, onRightClick = _a.onRightClick, onClickableChanged = _a.onClickableChanged, onCursorChanged = _a.onCursorChanged, onAnimationChanged = _a.onAnimationChanged, onDraggableChanged = _a.onDraggableChanged, onFlatChanged = _a.onFlatChanged, onIconChanged = _a.onIconChanged, onPositionChanged = _a.onPositionChanged, onShapeChanged = _a.onShapeChanged, onTitleChanged = _a.onTitleChanged, onVisibleChanged = _a.onVisibleChanged, onZindexChanged = _a.onZindexChanged, onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n var _c = useState(null), dblclickListener = _c[0], setDblclickListener = _c[1];\n var _d = useState(null), dragendListener = _d[0], setDragendListener = _d[1];\n var _e = useState(null), dragstartListener = _e[0], setDragstartListener = _e[1];\n var _f = useState(null), mousedownListener = _f[0], setMousedownListener = _f[1];\n var _g = useState(null), mouseoutListener = _g[0], setMouseoutListener = _g[1];\n var _h = useState(null), mouseoverListener = _h[0], setMouseoverListener = _h[1];\n var _j = useState(null), mouseupListener = _j[0], setMouseupListener = _j[1];\n var _k = useState(null), rightclickListener = _k[0], setRightclickListener = _k[1];\n var _l = useState(null), clickListener = _l[0], setClickListener = _l[1];\n var _m = useState(null), dragListener = _m[0], setDragListener = _m[1];\n var _o = useState(null), clickableChangedListener = _o[0], setClickableChangedListener = _o[1];\n var _p = useState(null), cursorChangedListener = _p[0], setCursorChangedListener = _p[1];\n var _q = useState(null), animationChangedListener = _q[0], setAnimationChangedListener = _q[1];\n var _r = useState(null), draggableChangedListener = _r[0], setDraggableChangedListener = _r[1];\n var _s = useState(null), flatChangedListener = _s[0], setFlatChangedListener = _s[1];\n var _t = useState(null), iconChangedListener = _t[0], setIconChangedListener = _t[1];\n var _u = useState(null), positionChangedListener = _u[0], setPositionChangedListener = _u[1];\n var _v = useState(null), shapeChangedListener = _v[0], setShapeChangedListener = _v[1];\n var _w = useState(null), titleChangedListener = _w[0], setTitleChangedListener = _w[1];\n var _x = useState(null), visibleChangedListener = _x[0], setVisibleChangedListener = _x[1];\n var _y = useState(null), zIndexChangedListener = _y[0], setZindexChangedListener = _y[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (typeof options !== 'undefined' && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n if (typeof draggable !== 'undefined' && instance !== null) {\n instance.setDraggable(draggable);\n }\n }, [instance, draggable]);\n useEffect(function () {\n if (position && instance !== null) {\n instance.setPosition(position);\n }\n }, [instance, position]);\n useEffect(function () {\n if (typeof visible !== 'undefined' && instance !== null) {\n instance.setVisible(visible);\n }\n }, [instance, visible]);\n useEffect(function () {\n instance === null || instance === void 0 ? void 0 : instance.setAnimation(animation);\n }, [instance, animation]);\n useEffect(function () {\n if (instance && clickable !== undefined) {\n instance.setClickable(clickable);\n }\n }, [instance, clickable]);\n useEffect(function () {\n if (instance && cursor !== undefined) {\n instance.setCursor(cursor);\n }\n }, [instance, cursor]);\n useEffect(function () {\n if (instance && icon !== undefined) {\n instance.setIcon(icon);\n }\n }, [instance, icon]);\n useEffect(function () {\n if (instance && label !== undefined) {\n instance.setLabel(label);\n }\n }, [instance, label]);\n useEffect(function () {\n if (instance && opacity !== undefined) {\n instance.setOpacity(opacity);\n }\n }, [instance, opacity]);\n useEffect(function () {\n if (instance && shape !== undefined) {\n instance.setShape(shape);\n }\n }, [instance, shape]);\n useEffect(function () {\n if (instance && title !== undefined) {\n instance.setTitle(title);\n }\n }, [instance, title]);\n useEffect(function () {\n if (instance && zIndex !== undefined) {\n instance.setZIndex(zIndex);\n }\n }, [instance, zIndex]);\n useEffect(function () {\n if (instance && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(instance, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(function () {\n if (instance && onDragEnd) {\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n setDragendListener(google.maps.event.addListener(instance, 'dragend', onDragEnd));\n }\n }, [onDragEnd]);\n useEffect(function () {\n if (instance && onDragStart) {\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n setDragstartListener(google.maps.event.addListener(instance, 'dragstart', onDragStart));\n }\n }, [onDragStart]);\n useEffect(function () {\n if (instance && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(instance, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(function () {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(function () {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(function () {\n if (instance && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(instance, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(function () {\n if (instance && onRightClick) {\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n setRightclickListener(google.maps.event.addListener(instance, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(function () {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, 'click', onClick));\n }\n }, [onClick]);\n useEffect(function () {\n if (instance && onDrag) {\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n setDragListener(google.maps.event.addListener(instance, 'drag', onDrag));\n }\n }, [onDrag]);\n useEffect(function () {\n if (instance && onClickableChanged) {\n if (clickableChangedListener !== null) {\n google.maps.event.removeListener(clickableChangedListener);\n }\n setClickableChangedListener(google.maps.event.addListener(instance, 'clickable_changed', onClickableChanged));\n }\n }, [onClickableChanged]);\n useEffect(function () {\n if (instance && onCursorChanged) {\n if (cursorChangedListener !== null) {\n google.maps.event.removeListener(cursorChangedListener);\n }\n setCursorChangedListener(google.maps.event.addListener(instance, 'cursor_changed', onCursorChanged));\n }\n }, [onCursorChanged]);\n useEffect(function () {\n if (instance && onAnimationChanged) {\n if (animationChangedListener !== null) {\n google.maps.event.removeListener(animationChangedListener);\n }\n setAnimationChangedListener(google.maps.event.addListener(instance, 'animation_changed', onAnimationChanged));\n }\n }, [onAnimationChanged]);\n useEffect(function () {\n if (instance && onDraggableChanged) {\n if (draggableChangedListener !== null) {\n google.maps.event.removeListener(draggableChangedListener);\n }\n setDraggableChangedListener(google.maps.event.addListener(instance, 'draggable_changed', onDraggableChanged));\n }\n }, [onDraggableChanged]);\n useEffect(function () {\n if (instance && onFlatChanged) {\n if (flatChangedListener !== null) {\n google.maps.event.removeListener(flatChangedListener);\n }\n setFlatChangedListener(google.maps.event.addListener(instance, 'flat_changed', onFlatChanged));\n }\n }, [onFlatChanged]);\n useEffect(function () {\n if (instance && onIconChanged) {\n if (iconChangedListener !== null) {\n google.maps.event.removeListener(iconChangedListener);\n }\n setIconChangedListener(google.maps.event.addListener(instance, 'icon_changed', onIconChanged));\n }\n }, [onIconChanged]);\n useEffect(function () {\n if (instance && onPositionChanged) {\n if (positionChangedListener !== null) {\n google.maps.event.removeListener(positionChangedListener);\n }\n setPositionChangedListener(google.maps.event.addListener(instance, 'position_changed', onPositionChanged));\n }\n }, [onPositionChanged]);\n useEffect(function () {\n if (instance && onShapeChanged) {\n if (shapeChangedListener !== null) {\n google.maps.event.removeListener(shapeChangedListener);\n }\n setShapeChangedListener(google.maps.event.addListener(instance, 'shape_changed', onShapeChanged));\n }\n }, [onShapeChanged]);\n useEffect(function () {\n if (instance && onTitleChanged) {\n if (titleChangedListener !== null) {\n google.maps.event.removeListener(titleChangedListener);\n }\n setTitleChangedListener(google.maps.event.addListener(instance, 'title_changed', onTitleChanged));\n }\n }, [onTitleChanged]);\n useEffect(function () {\n if (instance && onVisibleChanged) {\n if (visibleChangedListener !== null) {\n google.maps.event.removeListener(visibleChangedListener);\n }\n setVisibleChangedListener(google.maps.event.addListener(instance, 'visible_changed', onVisibleChanged));\n }\n }, [onVisibleChanged]);\n useEffect(function () {\n if (instance && onZindexChanged) {\n if (zIndexChangedListener !== null) {\n google.maps.event.removeListener(zIndexChangedListener);\n }\n setZindexChangedListener(google.maps.event.addListener(instance, 'zindex_changed', onZindexChanged));\n }\n }, [onZindexChanged]);\n useEffect(function () {\n var markerOptions = __assign(__assign(__assign({}, (options || defaultOptions$5)), (clusterer ? defaultOptions$5 : { map: map })), { position: position });\n var marker = new google.maps.Marker(markerOptions);\n if (clusterer) {\n clusterer.addMarker(marker, !!noClustererRedraw);\n }\n else {\n marker.setMap(map);\n }\n if (position) {\n marker.setPosition(position);\n }\n if (typeof visible !== 'undefined') {\n marker.setVisible(visible);\n }\n if (typeof draggable !== 'undefined') {\n marker.setDraggable(draggable);\n }\n if (typeof clickable !== 'undefined') {\n marker.setClickable(clickable);\n }\n if (typeof cursor === 'string') {\n marker.setCursor(cursor);\n }\n if (icon) {\n marker.setIcon(icon);\n }\n if (typeof label !== 'undefined') {\n marker.setLabel(label);\n }\n if (typeof opacity !== 'undefined') {\n marker.setOpacity(opacity);\n }\n if (shape) {\n marker.setShape(shape);\n }\n if (typeof title === 'string') {\n marker.setTitle(title);\n }\n if (typeof zIndex === 'number') {\n marker.setZIndex(zIndex);\n }\n if (onDblClick) {\n setDblclickListener(google.maps.event.addListener(marker, 'dblclick', onDblClick));\n }\n if (onDragEnd) {\n setDragendListener(google.maps.event.addListener(marker, 'dragend', onDragEnd));\n }\n if (onDragStart) {\n setDragstartListener(google.maps.event.addListener(marker, 'dragstart', onDragStart));\n }\n if (onMouseDown) {\n setMousedownListener(google.maps.event.addListener(marker, 'mousedown', onMouseDown));\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(marker, 'mouseout', onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(marker, 'mouseover', onMouseOver));\n }\n if (onMouseUp) {\n setMouseupListener(google.maps.event.addListener(marker, 'mouseup', onMouseUp));\n }\n if (onRightClick) {\n setRightclickListener(google.maps.event.addListener(marker, 'rightclick', onRightClick));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(marker, 'click', onClick));\n }\n if (onDrag) {\n setDragListener(google.maps.event.addListener(marker, 'drag', onDrag));\n }\n if (onClickableChanged) {\n setClickableChangedListener(google.maps.event.addListener(marker, 'clickable_changed', onClickableChanged));\n }\n if (onCursorChanged) {\n setCursorChangedListener(google.maps.event.addListener(marker, 'cursor_changed', onCursorChanged));\n }\n if (onAnimationChanged) {\n setAnimationChangedListener(google.maps.event.addListener(marker, 'animation_changed', onAnimationChanged));\n }\n if (onDraggableChanged) {\n setDraggableChangedListener(google.maps.event.addListener(marker, 'draggable_changed', onDraggableChanged));\n }\n if (onFlatChanged) {\n setFlatChangedListener(google.maps.event.addListener(marker, 'flat_changed', onFlatChanged));\n }\n if (onIconChanged) {\n setIconChangedListener(google.maps.event.addListener(marker, 'icon_changed', onIconChanged));\n }\n if (onPositionChanged) {\n setPositionChangedListener(google.maps.event.addListener(marker, 'position_changed', onPositionChanged));\n }\n if (onShapeChanged) {\n setShapeChangedListener(google.maps.event.addListener(marker, 'shape_changed', onShapeChanged));\n }\n if (onTitleChanged) {\n setTitleChangedListener(google.maps.event.addListener(marker, 'title_changed', onTitleChanged));\n }\n if (onVisibleChanged) {\n setVisibleChangedListener(google.maps.event.addListener(marker, 'visible_changed', onVisibleChanged));\n }\n if (onZindexChanged) {\n setZindexChangedListener(google.maps.event.addListener(marker, 'zindex_changed', onZindexChanged));\n }\n setInstance(marker);\n if (onLoad) {\n onLoad(marker);\n }\n return function () {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (clickableChangedListener !== null) {\n google.maps.event.removeListener(clickableChangedListener);\n }\n if (cursorChangedListener !== null) {\n google.maps.event.removeListener(cursorChangedListener);\n }\n if (animationChangedListener !== null) {\n google.maps.event.removeListener(animationChangedListener);\n }\n if (draggableChangedListener !== null) {\n google.maps.event.removeListener(draggableChangedListener);\n }\n if (flatChangedListener !== null) {\n google.maps.event.removeListener(flatChangedListener);\n }\n if (iconChangedListener !== null) {\n google.maps.event.removeListener(iconChangedListener);\n }\n if (positionChangedListener !== null) {\n google.maps.event.removeListener(positionChangedListener);\n }\n if (titleChangedListener !== null) {\n google.maps.event.removeListener(titleChangedListener);\n }\n if (visibleChangedListener !== null) {\n google.maps.event.removeListener(visibleChangedListener);\n }\n if (zIndexChangedListener !== null) {\n google.maps.event.removeListener(zIndexChangedListener);\n }\n if (onUnmount) {\n onUnmount(marker);\n }\n if (clusterer) {\n clusterer.removeMarker(marker, !!noClustererRedraw);\n }\n else if (marker) {\n marker.setMap(null);\n }\n };\n }, []);\n var chx = useMemo(function () {\n return children\n ? Children.map(children, function (child) {\n if (!isValidElement(child)) {\n return child;\n }\n var elementChild = child;\n return cloneElement(elementChild, { anchor: instance });\n })\n : null;\n }, [children, instance]);\n return jsx(Fragment, { children: chx }) || null;\n}\nvar MarkerF = memo(MarkerFunctional);\nvar Marker = /** @class */ (function (_super) {\n __extends(Marker, _super);\n function Marker() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n return _this;\n }\n Marker.prototype.componentDidMount = function () {\n var markerOptions = __assign(__assign(__assign({}, (this.props.options || defaultOptions$5)), (this.props.clusterer ? defaultOptions$5 : { map: this.context })), { position: this.props.position });\n // Unfortunately we can't just do this in the contstructor, because the\n // `MapContext` might not be filled in yet.\n this.marker = new google.maps.Marker(markerOptions);\n if (this.props.clusterer) {\n this.props.clusterer.addMarker(this.marker, !!this.props.noClustererRedraw);\n }\n else {\n this.marker.setMap(this.context);\n }\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$f,\n eventMap: eventMap$f,\n prevProps: {},\n nextProps: this.props,\n instance: this.marker,\n });\n if (this.props.onLoad) {\n this.props.onLoad(this.marker);\n }\n };\n Marker.prototype.componentDidUpdate = function (prevProps) {\n if (this.marker) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$f,\n eventMap: eventMap$f,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.marker,\n });\n }\n };\n Marker.prototype.componentWillUnmount = function () {\n if (this.marker) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.marker);\n }\n unregisterEvents(this.registeredEvents);\n if (this.props.clusterer) {\n this.props.clusterer.removeMarker(this.marker, !!this.props.noClustererRedraw);\n }\n else {\n this.marker && this.marker.setMap(null);\n }\n }\n };\n Marker.prototype.render = function () {\n var _this = this;\n var children = null;\n if (this.props.children) {\n children = Children.map(this.props.children, function (child) {\n if (!isValidElement(child)) {\n return child;\n }\n var elementChild = child;\n return cloneElement(elementChild, { anchor: _this.marker });\n });\n }\n return children || null;\n };\n Marker.contextType = MapContext;\n return Marker;\n}(PureComponent));\n\nvar ClusterIcon = /** @class */ (function () {\n function ClusterIcon(cluster, styles) {\n cluster.getClusterer().extend(ClusterIcon, google.maps.OverlayView);\n this.cluster = cluster;\n this.clusterClassName = this.cluster.getClusterer().getClusterClass();\n this.className = this.clusterClassName;\n this.styles = styles;\n this.center = undefined;\n this.div = null;\n this.sums = null;\n this.visible = false;\n this.boundsChangedListener = null;\n this.url = '';\n this.height = 0;\n this.width = 0;\n this.anchorText = [0, 0];\n this.anchorIcon = [0, 0];\n this.textColor = 'black';\n this.textSize = 11;\n this.textDecoration = 'none';\n this.fontWeight = 'bold';\n this.fontStyle = 'normal';\n this.fontFamily = 'Arial,sans-serif';\n this.backgroundPosition = '0 0';\n this.cMouseDownInCluster = null;\n this.cDraggingMapByCluster = null;\n this.timeOut = null;\n this.setMap(cluster.getMap()); // Note: this causes onAdd to be called\n this.onBoundsChanged = this.onBoundsChanged.bind(this);\n this.onMouseDown = this.onMouseDown.bind(this);\n this.onClick = this.onClick.bind(this);\n this.onMouseOver = this.onMouseOver.bind(this);\n this.onMouseOut = this.onMouseOut.bind(this);\n this.onAdd = this.onAdd.bind(this);\n this.onRemove = this.onRemove.bind(this);\n this.draw = this.draw.bind(this);\n this.hide = this.hide.bind(this);\n this.show = this.show.bind(this);\n this.useStyle = this.useStyle.bind(this);\n this.setCenter = this.setCenter.bind(this);\n this.getPosFromLatLng = this.getPosFromLatLng.bind(this);\n }\n ClusterIcon.prototype.onBoundsChanged = function () {\n this.cDraggingMapByCluster = this.cMouseDownInCluster;\n };\n ClusterIcon.prototype.onMouseDown = function () {\n this.cMouseDownInCluster = true;\n this.cDraggingMapByCluster = false;\n };\n ClusterIcon.prototype.onClick = function (event) {\n this.cMouseDownInCluster = false;\n if (!this.cDraggingMapByCluster) {\n var markerClusterer_1 = this.cluster.getClusterer();\n /**\n * This event is fired when a cluster marker is clicked.\n * @name MarkerClusterer#click\n * @param {Cluster} c The cluster that was clicked.\n * @event\n */\n google.maps.event.trigger(markerClusterer_1, 'click', this.cluster);\n google.maps.event.trigger(markerClusterer_1, 'clusterclick', this.cluster); // deprecated name\n // The default click handler follows. Disable it by setting\n // the zoomOnClick property to false.\n if (markerClusterer_1.getZoomOnClick()) {\n // Zoom into the cluster.\n var maxZoom_1 = markerClusterer_1.getMaxZoom();\n var bounds_1 = this.cluster.getBounds();\n var map = markerClusterer_1.getMap();\n if (map !== null && 'fitBounds' in map) {\n map.fitBounds(bounds_1);\n }\n // There is a fix for Issue 170 here:\n this.timeOut = window.setTimeout(function () {\n var map = markerClusterer_1.getMap();\n if (map !== null) {\n if ('fitBounds' in map) {\n map.fitBounds(bounds_1);\n }\n var zoom = map.getZoom() || 0;\n // Don't zoom beyond the max zoom level\n if (maxZoom_1 !== null &&\n zoom > maxZoom_1) {\n map.setZoom(maxZoom_1 + 1);\n }\n }\n }, 100);\n }\n // Prevent event propagation to the map:\n event.cancelBubble = true;\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n }\n };\n ClusterIcon.prototype.onMouseOver = function () {\n /**\n * This event is fired when the mouse moves over a cluster marker.\n * @name MarkerClusterer#mouseover\n * @param {Cluster} c The cluster that the mouse moved over.\n * @event\n */\n google.maps.event.trigger(this.cluster.getClusterer(), 'mouseover', this.cluster);\n };\n ClusterIcon.prototype.onMouseOut = function () {\n /**\n * This event is fired when the mouse moves out of a cluster marker.\n * @name MarkerClusterer#mouseout\n * @param {Cluster} c The cluster that the mouse moved out of.\n * @event\n */\n google.maps.event.trigger(this.cluster.getClusterer(), 'mouseout', this.cluster);\n };\n ClusterIcon.prototype.onAdd = function () {\n var _a;\n this.div = document.createElement('div');\n this.div.className = this.className;\n if (this.visible) {\n this.show();\n }\n (_a = this.getPanes()) === null || _a === void 0 ? void 0 : _a.overlayMouseTarget.appendChild(this.div);\n var map = this.getMap();\n if (map !== null) {\n // Fix for Issue 157\n this.boundsChangedListener = google.maps.event.addListener(map, 'bounds_changed', this.onBoundsChanged);\n this.div.addEventListener('mousedown', this.onMouseDown);\n this.div.addEventListener('click', this.onClick);\n this.div.addEventListener('mouseover', this.onMouseOver);\n this.div.addEventListener('mouseout', this.onMouseOut);\n }\n };\n ClusterIcon.prototype.onRemove = function () {\n if (this.div && this.div.parentNode) {\n this.hide();\n if (this.boundsChangedListener !== null) {\n google.maps.event.removeListener(this.boundsChangedListener);\n }\n this.div.removeEventListener('mousedown', this.onMouseDown);\n this.div.removeEventListener('click', this.onClick);\n this.div.removeEventListener('mouseover', this.onMouseOver);\n this.div.removeEventListener('mouseout', this.onMouseOut);\n this.div.parentNode.removeChild(this.div);\n if (this.timeOut !== null) {\n window.clearTimeout(this.timeOut);\n this.timeOut = null;\n }\n this.div = null;\n }\n };\n ClusterIcon.prototype.draw = function () {\n if (this.visible && this.div !== null && this.center) {\n var pos = this.getPosFromLatLng(this.center);\n this.div.style.top = pos !== null ? \"\".concat(pos.y, \"px\") : '0';\n this.div.style.left = pos !== null ? \"\".concat(pos.x, \"px\") : '0';\n }\n };\n ClusterIcon.prototype.hide = function () {\n if (this.div) {\n this.div.style.display = 'none';\n }\n this.visible = false;\n };\n ClusterIcon.prototype.show = function () {\n var _a, _b, _c, _d, _e, _f;\n if (this.div && this.center) {\n var divTitle = this.sums === null ||\n typeof this.sums.title === 'undefined' ||\n this.sums.title === '' ? this.cluster.getClusterer().getTitle() : this.sums.title;\n // NOTE: values must be specified in px units\n var bp = this.backgroundPosition.split(' ');\n var spriteH = parseInt(((_a = bp[0]) === null || _a === void 0 ? void 0 : _a.replace(/^\\s+|\\s+$/g, '')) || '0', 10);\n var spriteV = parseInt(((_b = bp[1]) === null || _b === void 0 ? void 0 : _b.replace(/^\\s+|\\s+$/g, '')) || '0', 10);\n var pos = this.getPosFromLatLng(this.center);\n this.div.className = this.className;\n this.div.setAttribute('style', \"cursor: pointer; position: absolute; top: \".concat(pos !== null ? \"\".concat(pos.y, \"px\") : '0', \"; left: \").concat(pos !== null ? \"\".concat(pos.x, \"px\") : '0', \"; width: \").concat(this.width, \"px; height: \").concat(this.height, \"px; \"));\n var img = document.createElement('img');\n img.alt = divTitle;\n img.src = this.url;\n img.width = this.width;\n img.height = this.height;\n img.setAttribute('style', \"position: absolute; top: \".concat(spriteV, \"px; left: \").concat(spriteH, \"px\"));\n if (!this.cluster.getClusterer().enableRetinaIcons) {\n img.style.clip = \"rect(-\".concat(spriteV, \"px, -\").concat(spriteH + this.width, \"px, -\").concat(spriteV + this.height, \", -\").concat(spriteH, \")\");\n }\n var textElm = document.createElement('div');\n textElm.setAttribute('style', \"position: absolute; top: \".concat(this.anchorText[0], \"px; left: \").concat(this.anchorText[1], \"px; color: \").concat(this.textColor, \"; font-size: \").concat(this.textSize, \"px; font-family: \").concat(this.fontFamily, \"; font-weight: \").concat(this.fontWeight, \"; fontStyle: \").concat(this.fontStyle, \"; text-decoration: \").concat(this.textDecoration, \"; text-align: center; width: \").concat(this.width, \"px; line-height: \").concat(this.height, \"px\"));\n if ((_c = this.sums) === null || _c === void 0 ? void 0 : _c.text)\n textElm.innerText = \"\".concat((_d = this.sums) === null || _d === void 0 ? void 0 : _d.text);\n if ((_e = this.sums) === null || _e === void 0 ? void 0 : _e.html)\n textElm.innerHTML = \"\".concat((_f = this.sums) === null || _f === void 0 ? void 0 : _f.html);\n this.div.innerHTML = '';\n this.div.appendChild(img);\n this.div.appendChild(textElm);\n this.div.title = divTitle;\n this.div.style.display = '';\n }\n this.visible = true;\n };\n ClusterIcon.prototype.useStyle = function (sums) {\n this.sums = sums;\n var styles = this.cluster.getClusterer().getStyles();\n var style = styles[Math.min(styles.length - 1, Math.max(0, sums.index - 1))];\n if (style) {\n this.url = style.url;\n this.height = style.height;\n this.width = style.width;\n if (style.className) {\n this.className = \"\".concat(this.clusterClassName, \" \").concat(style.className);\n }\n this.anchorText = style.anchorText || [0, 0];\n this.anchorIcon = style.anchorIcon || [this.height / 2, this.width / 2];\n this.textColor = style.textColor || 'black';\n this.textSize = style.textSize || 11;\n this.textDecoration = style.textDecoration || 'none';\n this.fontWeight = style.fontWeight || 'bold';\n this.fontStyle = style.fontStyle || 'normal';\n this.fontFamily = style.fontFamily || 'Arial,sans-serif';\n this.backgroundPosition = style.backgroundPosition || '0 0';\n }\n };\n ClusterIcon.prototype.setCenter = function (center) {\n this.center = center;\n };\n ClusterIcon.prototype.getPosFromLatLng = function (latlng) {\n var pos = this.getProjection().fromLatLngToDivPixel(latlng);\n if (pos !== null) {\n pos.x -= this.anchorIcon[1];\n pos.y -= this.anchorIcon[0];\n }\n return pos;\n };\n return ClusterIcon;\n}());\n\n/* global google */\nvar Cluster$1 = /** @class */ (function () {\n function Cluster(markerClusterer) {\n this.markerClusterer = markerClusterer;\n this.map = this.markerClusterer.getMap();\n this.gridSize = this.markerClusterer.getGridSize();\n this.minClusterSize = this.markerClusterer.getMinimumClusterSize();\n this.averageCenter = this.markerClusterer.getAverageCenter();\n this.markers = [];\n this.center = undefined;\n this.bounds = null;\n this.clusterIcon = new ClusterIcon(this, this.markerClusterer.getStyles());\n this.getSize = this.getSize.bind(this);\n this.getMarkers = this.getMarkers.bind(this);\n this.getCenter = this.getCenter.bind(this);\n this.getMap = this.getMap.bind(this);\n this.getClusterer = this.getClusterer.bind(this);\n this.getBounds = this.getBounds.bind(this);\n this.remove = this.remove.bind(this);\n this.addMarker = this.addMarker.bind(this);\n this.isMarkerInClusterBounds = this.isMarkerInClusterBounds.bind(this);\n this.calculateBounds = this.calculateBounds.bind(this);\n this.updateIcon = this.updateIcon.bind(this);\n this.isMarkerAlreadyAdded = this.isMarkerAlreadyAdded.bind(this);\n }\n Cluster.prototype.getSize = function () {\n return this.markers.length;\n };\n Cluster.prototype.getMarkers = function () {\n return this.markers;\n };\n Cluster.prototype.getCenter = function () {\n return this.center;\n };\n Cluster.prototype.getMap = function () {\n return this.map;\n };\n Cluster.prototype.getClusterer = function () {\n return this.markerClusterer;\n };\n Cluster.prototype.getBounds = function () {\n var bounds = new google.maps.LatLngBounds(this.center, this.center);\n var markers = this.getMarkers();\n for (var _i = 0, markers_1 = markers; _i < markers_1.length; _i++) {\n var marker = markers_1[_i];\n var position = marker.getPosition();\n if (position) {\n bounds.extend(position);\n }\n }\n return bounds;\n };\n Cluster.prototype.remove = function () {\n this.clusterIcon.setMap(null);\n this.markers = [];\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n delete this.markers;\n };\n Cluster.prototype.addMarker = function (marker) {\n var _a;\n if (this.isMarkerAlreadyAdded(marker)) {\n return false;\n }\n if (!this.center) {\n var position = marker.getPosition();\n if (position) {\n this.center = position;\n this.calculateBounds();\n }\n }\n else {\n if (this.averageCenter) {\n var position = marker.getPosition();\n if (position) {\n var length_1 = this.markers.length + 1;\n this.center = new google.maps.LatLng((this.center.lat() * (length_1 - 1) + position.lat()) / length_1, (this.center.lng() * (length_1 - 1) + position.lng()) / length_1);\n this.calculateBounds();\n }\n }\n }\n marker.isAdded = true;\n this.markers.push(marker);\n var mCount = this.markers.length;\n var maxZoom = this.markerClusterer.getMaxZoom();\n var zoom = (_a = this.map) === null || _a === void 0 ? void 0 : _a.getZoom();\n if (maxZoom !== null && typeof zoom !== 'undefined' && zoom > maxZoom) {\n // Zoomed in past max zoom, so show the marker.\n if (marker.getMap() !== this.map) {\n marker.setMap(this.map);\n }\n }\n else if (mCount < this.minClusterSize) {\n // Min cluster size not reached so show the marker.\n if (marker.getMap() !== this.map) {\n marker.setMap(this.map);\n }\n }\n else if (mCount === this.minClusterSize) {\n // Hide the markers that were showing.\n for (var _i = 0, _b = this.markers; _i < _b.length; _i++) {\n var markerElement = _b[_i];\n markerElement.setMap(null);\n }\n }\n else {\n marker.setMap(null);\n }\n return true;\n };\n Cluster.prototype.isMarkerInClusterBounds = function (marker) {\n if (this.bounds !== null) {\n var position = marker.getPosition();\n if (position) {\n return this.bounds.contains(position);\n }\n }\n return false;\n };\n Cluster.prototype.calculateBounds = function () {\n this.bounds = this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center, this.center));\n };\n Cluster.prototype.updateIcon = function () {\n var _a;\n var mCount = this.markers.length;\n var maxZoom = this.markerClusterer.getMaxZoom();\n var zoom = (_a = this.map) === null || _a === void 0 ? void 0 : _a.getZoom();\n if (maxZoom !== null && typeof zoom !== 'undefined' && zoom > maxZoom) {\n this.clusterIcon.hide();\n return;\n }\n if (mCount < this.minClusterSize) {\n // Min cluster size not yet reached.\n this.clusterIcon.hide();\n return;\n }\n if (this.center) {\n this.clusterIcon.setCenter(this.center);\n }\n this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers, this.markerClusterer.getStyles().length));\n this.clusterIcon.show();\n };\n Cluster.prototype.isMarkerAlreadyAdded = function (marker) {\n if (this.markers.includes) {\n return this.markers.includes(marker);\n }\n for (var i = 0; i < this.markers.length; i++) {\n if (marker === this.markers[i]) {\n return true;\n }\n }\n return false;\n };\n return Cluster;\n}());\n\n/* global google */\n/**\n * Supports up to 9007199254740991 (Number.MAX_SAFE_INTEGER) markers\n * which is not a problem as max array length is 4294967296 (2**32)\n */\nfunction CALCULATOR(markers, numStyles) {\n var count = markers.length;\n var numberOfDigits = count.toString().length;\n var index = Math.min(numberOfDigits, numStyles);\n return {\n text: count.toString(),\n index: index,\n title: '',\n };\n}\nvar BATCH_SIZE = 2000;\nvar BATCH_SIZE_IE = 500;\nvar IMAGE_PATH = 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m';\nvar IMAGE_EXTENSION = 'png';\nvar IMAGE_SIZES = [53, 56, 66, 78, 90];\nvar CLUSTERER_CLASS = 'cluster';\nvar Clusterer = /** @class */ (function () {\n function Clusterer(map, optMarkers, optOptions) {\n if (optMarkers === void 0) { optMarkers = []; }\n if (optOptions === void 0) { optOptions = {}; }\n this.getMinimumClusterSize = this.getMinimumClusterSize.bind(this);\n this.setMinimumClusterSize = this.setMinimumClusterSize.bind(this);\n this.getEnableRetinaIcons = this.getEnableRetinaIcons.bind(this);\n this.setEnableRetinaIcons = this.setEnableRetinaIcons.bind(this);\n this.addToClosestCluster = this.addToClosestCluster.bind(this);\n this.getImageExtension = this.getImageExtension.bind(this);\n this.setImageExtension = this.setImageExtension.bind(this);\n this.getExtendedBounds = this.getExtendedBounds.bind(this);\n this.getAverageCenter = this.getAverageCenter.bind(this);\n this.setAverageCenter = this.setAverageCenter.bind(this);\n this.getTotalClusters = this.getTotalClusters.bind(this);\n this.fitMapToMarkers = this.fitMapToMarkers.bind(this);\n this.getIgnoreHidden = this.getIgnoreHidden.bind(this);\n this.setIgnoreHidden = this.setIgnoreHidden.bind(this);\n this.getClusterClass = this.getClusterClass.bind(this);\n this.setClusterClass = this.setClusterClass.bind(this);\n this.getTotalMarkers = this.getTotalMarkers.bind(this);\n this.getZoomOnClick = this.getZoomOnClick.bind(this);\n this.setZoomOnClick = this.setZoomOnClick.bind(this);\n this.getBatchSizeIE = this.getBatchSizeIE.bind(this);\n this.setBatchSizeIE = this.setBatchSizeIE.bind(this);\n this.createClusters = this.createClusters.bind(this);\n this.onZoomChanged = this.onZoomChanged.bind(this);\n this.getImageSizes = this.getImageSizes.bind(this);\n this.setImageSizes = this.setImageSizes.bind(this);\n this.getCalculator = this.getCalculator.bind(this);\n this.setCalculator = this.setCalculator.bind(this);\n this.removeMarkers = this.removeMarkers.bind(this);\n this.resetViewport = this.resetViewport.bind(this);\n this.getImagePath = this.getImagePath.bind(this);\n this.setImagePath = this.setImagePath.bind(this);\n this.pushMarkerTo = this.pushMarkerTo.bind(this);\n this.removeMarker = this.removeMarker.bind(this);\n this.clearMarkers = this.clearMarkers.bind(this);\n this.setupStyles = this.setupStyles.bind(this);\n this.getGridSize = this.getGridSize.bind(this);\n this.setGridSize = this.setGridSize.bind(this);\n this.getClusters = this.getClusters.bind(this);\n this.getMaxZoom = this.getMaxZoom.bind(this);\n this.setMaxZoom = this.setMaxZoom.bind(this);\n this.getMarkers = this.getMarkers.bind(this);\n this.addMarkers = this.addMarkers.bind(this);\n this.getStyles = this.getStyles.bind(this);\n this.setStyles = this.setStyles.bind(this);\n this.addMarker = this.addMarker.bind(this);\n this.onRemove = this.onRemove.bind(this);\n this.getTitle = this.getTitle.bind(this);\n this.setTitle = this.setTitle.bind(this);\n this.repaint = this.repaint.bind(this);\n this.onIdle = this.onIdle.bind(this);\n this.redraw = this.redraw.bind(this);\n this.onAdd = this.onAdd.bind(this);\n this.draw = this.draw.bind(this);\n this.extend = this.extend.bind(this);\n this.extend(Clusterer, google.maps.OverlayView);\n this.markers = [];\n this.clusters = [];\n this.listeners = [];\n this.activeMap = null;\n this.ready = false;\n this.gridSize = optOptions.gridSize || 60;\n this.minClusterSize = optOptions.minimumClusterSize || 2;\n this.maxZoom = optOptions.maxZoom || null;\n this.styles = optOptions.styles || [];\n this.title = optOptions.title || '';\n this.zoomOnClick = true;\n if (optOptions.zoomOnClick !== undefined) {\n this.zoomOnClick = optOptions.zoomOnClick;\n }\n this.averageCenter = false;\n if (optOptions.averageCenter !== undefined) {\n this.averageCenter = optOptions.averageCenter;\n }\n this.ignoreHidden = false;\n if (optOptions.ignoreHidden !== undefined) {\n this.ignoreHidden = optOptions.ignoreHidden;\n }\n this.enableRetinaIcons = false;\n if (optOptions.enableRetinaIcons !== undefined) {\n this.enableRetinaIcons = optOptions.enableRetinaIcons;\n }\n this.imagePath = optOptions.imagePath || IMAGE_PATH;\n this.imageExtension = optOptions.imageExtension || IMAGE_EXTENSION;\n this.imageSizes = optOptions.imageSizes || IMAGE_SIZES;\n this.calculator = optOptions.calculator || CALCULATOR;\n this.batchSize = optOptions.batchSize || BATCH_SIZE;\n this.batchSizeIE = optOptions.batchSizeIE || BATCH_SIZE_IE;\n this.clusterClass = optOptions.clusterClass || CLUSTERER_CLASS;\n if (navigator.userAgent.toLowerCase().indexOf('msie') !== -1) {\n // Try to avoid IE timeout when processing a huge number of markers:\n this.batchSize = this.batchSizeIE;\n }\n this.timerRefStatic = null;\n this.setupStyles();\n this.addMarkers(optMarkers, true);\n this.setMap(map); // Note: this causes onAdd to be called\n }\n Clusterer.prototype.onZoomChanged = function () {\n var _a, _b;\n this.resetViewport(false);\n // Workaround for this Google bug: when map is at level 0 and \"-\" of\n // zoom slider is clicked, a \"zoom_changed\" event is fired even though\n // the map doesn't zoom out any further. In this situation, no \"idle\"\n // event is triggered so the cluster markers that have been removed\n // do not get redrawn. Same goes for a zoom in at maxZoom.\n if (((_a = this.getMap()) === null || _a === void 0 ? void 0 : _a.getZoom()) === (this.get('minZoom') || 0) ||\n ((_b = this.getMap()) === null || _b === void 0 ? void 0 : _b.getZoom()) === this.get('maxZoom')) {\n google.maps.event.trigger(this, 'idle');\n }\n };\n Clusterer.prototype.onIdle = function () {\n this.redraw();\n };\n Clusterer.prototype.onAdd = function () {\n var map = this.getMap();\n this.activeMap = map;\n this.ready = true;\n this.repaint();\n if (map !== null) {\n // Add the map event listeners\n this.listeners = [\n google.maps.event.addListener(map, 'zoom_changed', this.onZoomChanged),\n google.maps.event.addListener(map, 'idle', this.onIdle),\n ];\n }\n };\n Clusterer.prototype.onRemove = function () {\n // Put all the managed markers back on the map:\n for (var _i = 0, _a = this.markers; _i < _a.length; _i++) {\n var marker = _a[_i];\n if (marker.getMap() !== this.activeMap) {\n marker.setMap(this.activeMap);\n }\n }\n // Remove all clusters:\n for (var _b = 0, _c = this.clusters; _b < _c.length; _b++) {\n var cluster = _c[_b];\n cluster.remove();\n }\n this.clusters = [];\n // Remove map event listeners:\n for (var _d = 0, _e = this.listeners; _d < _e.length; _d++) {\n var listener = _e[_d];\n google.maps.event.removeListener(listener);\n }\n this.listeners = [];\n this.activeMap = null;\n this.ready = false;\n };\n Clusterer.prototype.draw = function () { return; };\n Clusterer.prototype.getMap = function () { return null; };\n Clusterer.prototype.getPanes = function () { return null; };\n Clusterer.prototype.getProjection = function () {\n return {\n fromContainerPixelToLatLng: function () { return null; },\n fromDivPixelToLatLng: function () { return null; },\n fromLatLngToContainerPixel: function () { return null; },\n fromLatLngToDivPixel: function () { return null; },\n getVisibleRegion: function () { return null; },\n getWorldWidth: function () { return 0; }\n };\n };\n Clusterer.prototype.setMap = function () { return; };\n Clusterer.prototype.addListener = function () {\n return {\n remove: function () { return; }\n };\n };\n Clusterer.prototype.bindTo = function () { return; };\n Clusterer.prototype.get = function () { return; };\n Clusterer.prototype.notify = function () { return; };\n Clusterer.prototype.set = function () { return; };\n Clusterer.prototype.setValues = function () { return; };\n Clusterer.prototype.unbind = function () { return; };\n Clusterer.prototype.unbindAll = function () { return; };\n Clusterer.prototype.setupStyles = function () {\n if (this.styles.length > 0) {\n return;\n }\n for (var i = 0; i < this.imageSizes.length; i++) {\n this.styles.push({\n url: \"\".concat(this.imagePath + (i + 1), \".\").concat(this.imageExtension),\n height: this.imageSizes[i] || 0,\n width: this.imageSizes[i] || 0,\n });\n }\n };\n Clusterer.prototype.fitMapToMarkers = function () {\n var markers = this.getMarkers();\n var bounds = new google.maps.LatLngBounds();\n for (var _i = 0, markers_1 = markers; _i < markers_1.length; _i++) {\n var marker = markers_1[_i];\n var position = marker.getPosition();\n if (position) {\n bounds.extend(position);\n }\n }\n var map = this.getMap();\n if (map !== null && 'fitBounds' in map) {\n map.fitBounds(bounds);\n }\n };\n Clusterer.prototype.getGridSize = function () {\n return this.gridSize;\n };\n Clusterer.prototype.setGridSize = function (gridSize) {\n this.gridSize = gridSize;\n };\n Clusterer.prototype.getMinimumClusterSize = function () {\n return this.minClusterSize;\n };\n Clusterer.prototype.setMinimumClusterSize = function (minimumClusterSize) {\n this.minClusterSize = minimumClusterSize;\n };\n Clusterer.prototype.getMaxZoom = function () {\n return this.maxZoom;\n };\n Clusterer.prototype.setMaxZoom = function (maxZoom) {\n this.maxZoom = maxZoom;\n };\n Clusterer.prototype.getStyles = function () {\n return this.styles;\n };\n Clusterer.prototype.setStyles = function (styles) {\n this.styles = styles;\n };\n Clusterer.prototype.getTitle = function () {\n return this.title;\n };\n Clusterer.prototype.setTitle = function (title) {\n this.title = title;\n };\n Clusterer.prototype.getZoomOnClick = function () {\n return this.zoomOnClick;\n };\n Clusterer.prototype.setZoomOnClick = function (zoomOnClick) {\n this.zoomOnClick = zoomOnClick;\n };\n Clusterer.prototype.getAverageCenter = function () {\n return this.averageCenter;\n };\n Clusterer.prototype.setAverageCenter = function (averageCenter) {\n this.averageCenter = averageCenter;\n };\n Clusterer.prototype.getIgnoreHidden = function () {\n return this.ignoreHidden;\n };\n Clusterer.prototype.setIgnoreHidden = function (ignoreHidden) {\n this.ignoreHidden = ignoreHidden;\n };\n Clusterer.prototype.getEnableRetinaIcons = function () {\n return this.enableRetinaIcons;\n };\n Clusterer.prototype.setEnableRetinaIcons = function (enableRetinaIcons) {\n this.enableRetinaIcons = enableRetinaIcons;\n };\n Clusterer.prototype.getImageExtension = function () {\n return this.imageExtension;\n };\n Clusterer.prototype.setImageExtension = function (imageExtension) {\n this.imageExtension = imageExtension;\n };\n Clusterer.prototype.getImagePath = function () {\n return this.imagePath;\n };\n Clusterer.prototype.setImagePath = function (imagePath) {\n this.imagePath = imagePath;\n };\n Clusterer.prototype.getImageSizes = function () {\n return this.imageSizes;\n };\n Clusterer.prototype.setImageSizes = function (imageSizes) {\n this.imageSizes = imageSizes;\n };\n Clusterer.prototype.getCalculator = function () {\n return this.calculator;\n };\n Clusterer.prototype.setCalculator = function (calculator) {\n this.calculator = calculator;\n };\n Clusterer.prototype.getBatchSizeIE = function () {\n return this.batchSizeIE;\n };\n Clusterer.prototype.setBatchSizeIE = function (batchSizeIE) {\n this.batchSizeIE = batchSizeIE;\n };\n Clusterer.prototype.getClusterClass = function () {\n return this.clusterClass;\n };\n Clusterer.prototype.setClusterClass = function (clusterClass) {\n this.clusterClass = clusterClass;\n };\n Clusterer.prototype.getMarkers = function () {\n return this.markers;\n };\n Clusterer.prototype.getTotalMarkers = function () {\n return this.markers.length;\n };\n Clusterer.prototype.getClusters = function () {\n return this.clusters;\n };\n Clusterer.prototype.getTotalClusters = function () {\n return this.clusters.length;\n };\n Clusterer.prototype.addMarker = function (marker, optNoDraw) {\n this.pushMarkerTo(marker);\n if (!optNoDraw) {\n this.redraw();\n }\n };\n Clusterer.prototype.addMarkers = function (markers, optNoDraw) {\n for (var key in markers) {\n if (Object.prototype.hasOwnProperty.call(markers, key)) {\n var marker = markers[key];\n if (marker) {\n this.pushMarkerTo(marker);\n }\n }\n }\n if (!optNoDraw) {\n this.redraw();\n }\n };\n Clusterer.prototype.pushMarkerTo = function (marker) {\n var _this = this;\n // If the marker is draggable add a listener so we can update the clusters on the dragend:\n if (marker.getDraggable()) {\n google.maps.event.addListener(marker, 'dragend', function () {\n if (_this.ready) {\n marker.isAdded = false;\n _this.repaint();\n }\n });\n }\n marker.isAdded = false;\n this.markers.push(marker);\n };\n Clusterer.prototype.removeMarker_ = function (marker) {\n var index = -1;\n if (this.markers.indexOf) {\n index = this.markers.indexOf(marker);\n }\n else {\n for (var i = 0; i < this.markers.length; i++) {\n if (marker === this.markers[i]) {\n index = i;\n break;\n }\n }\n }\n if (index === -1) {\n // Marker is not in our list of markers, so do nothing:\n return false;\n }\n marker.setMap(null);\n this.markers.splice(index, 1); // Remove the marker from the list of managed markers\n return true;\n };\n Clusterer.prototype.removeMarker = function (marker, optNoDraw) {\n var removed = this.removeMarker_(marker);\n if (!optNoDraw && removed) {\n this.repaint();\n }\n return removed;\n };\n Clusterer.prototype.removeMarkers = function (markers, optNoDraw) {\n var removed = false;\n for (var _i = 0, markers_2 = markers; _i < markers_2.length; _i++) {\n var marker = markers_2[_i];\n removed = removed || this.removeMarker_(marker);\n }\n if (!optNoDraw && removed) {\n this.repaint();\n }\n return removed;\n };\n Clusterer.prototype.clearMarkers = function () {\n this.resetViewport(true);\n this.markers = [];\n };\n Clusterer.prototype.repaint = function () {\n var oldClusters = this.clusters.slice();\n this.clusters = [];\n this.resetViewport(false);\n this.redraw();\n // Remove the old clusters.\n // Do it in a timeout to prevent blinking effect.\n setTimeout(function timeout() {\n for (var _i = 0, oldClusters_1 = oldClusters; _i < oldClusters_1.length; _i++) {\n var oldCluster = oldClusters_1[_i];\n oldCluster.remove();\n }\n }, 0);\n };\n Clusterer.prototype.getExtendedBounds = function (bounds) {\n var projection = this.getProjection();\n // Convert the points to pixels and the extend out by the grid size.\n var trPix = projection.fromLatLngToDivPixel(\n // Turn the bounds into latlng.\n new google.maps.LatLng(bounds.getNorthEast().lat(), bounds.getNorthEast().lng()));\n if (trPix !== null) {\n trPix.x += this.gridSize;\n trPix.y -= this.gridSize;\n }\n var blPix = projection.fromLatLngToDivPixel(\n // Turn the bounds into latlng.\n new google.maps.LatLng(bounds.getSouthWest().lat(), bounds.getSouthWest().lng()));\n if (blPix !== null) {\n blPix.x -= this.gridSize;\n blPix.y += this.gridSize;\n }\n // Extend the bounds to contain the new bounds.\n if (trPix !== null) {\n // Convert the pixel points back to LatLng nw\n var point1 = projection.fromDivPixelToLatLng(trPix);\n if (point1 !== null) {\n bounds.extend(point1);\n }\n }\n if (blPix !== null) {\n // Convert the pixel points back to LatLng sw\n var point2 = projection.fromDivPixelToLatLng(blPix);\n if (point2 !== null) {\n bounds.extend(point2);\n }\n }\n return bounds;\n };\n Clusterer.prototype.redraw = function () {\n // Redraws all the clusters.\n this.createClusters(0);\n };\n Clusterer.prototype.resetViewport = function (optHide) {\n // Remove all the clusters\n for (var _i = 0, _a = this.clusters; _i < _a.length; _i++) {\n var cluster = _a[_i];\n cluster.remove();\n }\n this.clusters = [];\n // Reset the markers to not be added and to be removed from the map.\n for (var _b = 0, _c = this.markers; _b < _c.length; _b++) {\n var marker = _c[_b];\n marker.isAdded = false;\n if (optHide) {\n marker.setMap(null);\n }\n }\n };\n Clusterer.prototype.distanceBetweenPoints = function (p1, p2) {\n var R = 6371; // Radius of the Earth in km\n var dLat = ((p2.lat() - p1.lat()) * Math.PI) / 180;\n var dLon = ((p2.lng() - p1.lng()) * Math.PI) / 180;\n var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos((p1.lat() * Math.PI) / 180) *\n Math.cos((p2.lat() * Math.PI) / 180) *\n Math.sin(dLon / 2) *\n Math.sin(dLon / 2);\n return R * (2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)));\n };\n Clusterer.prototype.isMarkerInBounds = function (marker, bounds) {\n var position = marker.getPosition();\n if (position) {\n return bounds.contains(position);\n }\n return false;\n };\n Clusterer.prototype.addToClosestCluster = function (marker) {\n var cluster;\n var distance = 40000; // Some large number\n var clusterToAddTo = null;\n for (var _i = 0, _a = this.clusters; _i < _a.length; _i++) {\n var clusterElement = _a[_i];\n cluster = clusterElement;\n var center = cluster.getCenter();\n var position = marker.getPosition();\n if (center && position) {\n var d = this.distanceBetweenPoints(center, position);\n if (d < distance) {\n distance = d;\n clusterToAddTo = cluster;\n }\n }\n }\n if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {\n clusterToAddTo.addMarker(marker);\n }\n else {\n cluster = new Cluster$1(this);\n cluster.addMarker(marker);\n this.clusters.push(cluster);\n }\n };\n Clusterer.prototype.createClusters = function (iFirst) {\n var _this = this;\n if (!this.ready) {\n return;\n }\n // Cancel previous batch processing if we're working on the first batch:\n if (iFirst === 0) {\n /**\n * This event is fired when the Clusterer begins\n * clustering markers.\n * @name Clusterer#clusteringbegin\n * @param {Clusterer} mc The Clusterer whose markers are being clustered.\n * @event\n */\n google.maps.event.trigger(this, 'clusteringbegin', this);\n if (this.timerRefStatic !== null) {\n window.clearTimeout(this.timerRefStatic);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n delete this.timerRefStatic;\n }\n }\n var map = this.getMap();\n var bounds = map !== null && 'getBounds' in map ? map.getBounds() : null;\n var zoom = (map === null || map === void 0 ? void 0 : map.getZoom()) || 0;\n // Get our current map view bounds.\n // Create a new bounds object so we don't affect the map.\n //\n // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug:\n var mapBounds = zoom > 3\n ? new google.maps.LatLngBounds(bounds === null || bounds === void 0 ? void 0 : bounds.getSouthWest(), bounds === null || bounds === void 0 ? void 0 : bounds.getNorthEast())\n : new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625));\n var extendedMapBounds = this.getExtendedBounds(mapBounds);\n var iLast = Math.min(iFirst + this.batchSize, this.markers.length);\n for (var i = iFirst; i < iLast; i++) {\n var marker = this.markers[i];\n if (marker && !marker.isAdded && this.isMarkerInBounds(marker, extendedMapBounds) && (!this.ignoreHidden || (this.ignoreHidden && marker.getVisible()))) {\n this.addToClosestCluster(marker);\n }\n }\n if (iLast < this.markers.length) {\n this.timerRefStatic = window.setTimeout(function () {\n _this.createClusters(iLast);\n }, 0);\n }\n else {\n this.timerRefStatic = null;\n /**\n * This event is fired when the Clusterer stops\n * clustering markers.\n * @name Clusterer#clusteringend\n * @param {Clusterer} mc The Clusterer whose markers are being clustered.\n * @event\n */\n google.maps.event.trigger(this, 'clusteringend', this);\n for (var _i = 0, _a = this.clusters; _i < _a.length; _i++) {\n var cluster = _a[_i];\n cluster.updateIcon();\n }\n }\n };\n Clusterer.prototype.extend = function (obj1, obj2) {\n return function applyExtend(object) {\n for (var property in object.prototype) {\n // eslint-disable-next-line @typescript-eslint/ban-types\n var prop = property;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.prototype[prop] = object.prototype[prop];\n }\n return this;\n }.apply(obj1, [obj2]);\n };\n return Clusterer;\n}());\n\nvar eventMap$e = {\n onClick: 'click',\n onClusteringBegin: 'clusteringbegin',\n onClusteringEnd: 'clusteringend',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n};\nvar updaterMap$e = {\n averageCenter: function (instance, averageCenter) {\n instance.setAverageCenter(averageCenter);\n },\n batchSizeIE: function (instance, batchSizeIE) {\n instance.setBatchSizeIE(batchSizeIE);\n },\n calculator: function (instance, calculator) {\n instance.setCalculator(calculator);\n },\n clusterClass: function (instance, clusterClass) {\n instance.setClusterClass(clusterClass);\n },\n enableRetinaIcons: function (instance, enableRetinaIcons) {\n instance.setEnableRetinaIcons(enableRetinaIcons);\n },\n gridSize: function (instance, gridSize) {\n instance.setGridSize(gridSize);\n },\n ignoreHidden: function (instance, ignoreHidden) {\n instance.setIgnoreHidden(ignoreHidden);\n },\n imageExtension: function (instance, imageExtension) {\n instance.setImageExtension(imageExtension);\n },\n imagePath: function (instance, imagePath) {\n instance.setImagePath(imagePath);\n },\n imageSizes: function (instance, imageSizes) {\n instance.setImageSizes(imageSizes);\n },\n maxZoom: function (instance, maxZoom) {\n instance.setMaxZoom(maxZoom);\n },\n minimumClusterSize: function (instance, minimumClusterSize) {\n instance.setMinimumClusterSize(minimumClusterSize);\n },\n styles: function (instance, styles) {\n instance.setStyles(styles);\n },\n title: function (instance, title) {\n instance.setTitle(title);\n },\n zoomOnClick: function (instance, zoomOnClick) {\n instance.setZoomOnClick(zoomOnClick);\n },\n};\nvar defaultOptions$4 = {};\nfunction MarkerClustererFunctional(props) {\n var children = props.children, options = props.options, averageCenter = props.averageCenter, batchSizeIE = props.batchSizeIE, calculator = props.calculator, clusterClass = props.clusterClass, enableRetinaIcons = props.enableRetinaIcons, gridSize = props.gridSize, ignoreHidden = props.ignoreHidden, imageExtension = props.imageExtension, imagePath = props.imagePath, imageSizes = props.imageSizes, maxZoom = props.maxZoom, minimumClusterSize = props.minimumClusterSize, styles = props.styles, title = props.title, zoomOnClick = props.zoomOnClick, onClick = props.onClick, onClusteringBegin = props.onClusteringBegin, onClusteringEnd = props.onClusteringEnd, onMouseOver = props.onMouseOver, onMouseOut = props.onMouseOut, onLoad = props.onLoad, onUnmount = props.onUnmount;\n var _a = useState(null), instance = _a[0], setInstance = _a[1];\n var map = useContext(MapContext);\n var _b = useState(null), clickListener = _b[0], setClickListener = _b[1];\n var _c = useState(null), clusteringBeginListener = _c[0], setClusteringBeginListener = _c[1];\n var _d = useState(null), clusteringEndListener = _d[0], setClusteringEndListener = _d[1];\n var _e = useState(null), mouseoutListener = _e[0], setMouseoutListener = _e[1];\n var _f = useState(null), mouseoverListener = _f[0], setMouseoverListener = _f[1];\n useEffect(function () {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, eventMap$e.onMouseOut, onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(function () {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, eventMap$e.onMouseOver, onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(function () {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, eventMap$e.onClick, onClick));\n }\n }, [onClick]);\n useEffect(function () {\n if (instance && onClusteringBegin) {\n if (clusteringBeginListener !== null) {\n google.maps.event.removeListener(clusteringBeginListener);\n }\n setClusteringBeginListener(google.maps.event.addListener(instance, eventMap$e.onClusteringBegin, onClusteringBegin));\n }\n }, [onClusteringBegin]);\n useEffect(function () {\n if (instance && onClusteringEnd) {\n if (clusteringEndListener !== null) {\n google.maps.event.removeListener(clusteringEndListener);\n }\n setClusteringBeginListener(google.maps.event.addListener(instance, eventMap$e.onClusteringEnd, onClusteringEnd));\n }\n }, [onClusteringEnd]);\n useEffect(function () {\n if (typeof averageCenter !== 'undefined' && instance !== null) {\n updaterMap$e.averageCenter(instance, averageCenter);\n }\n }, [instance, averageCenter]);\n useEffect(function () {\n if (typeof batchSizeIE !== 'undefined' && instance !== null) {\n updaterMap$e.batchSizeIE(instance, batchSizeIE);\n }\n }, [instance, batchSizeIE]);\n useEffect(function () {\n if (typeof calculator !== 'undefined' && instance !== null) {\n updaterMap$e.calculator(instance, calculator);\n }\n }, [instance, calculator]);\n useEffect(function () {\n if (typeof clusterClass !== 'undefined' && instance !== null) {\n updaterMap$e.clusterClass(instance, clusterClass);\n }\n }, [instance, clusterClass]);\n useEffect(function () {\n if (typeof enableRetinaIcons !== 'undefined' && instance !== null) {\n updaterMap$e.enableRetinaIcons(instance, enableRetinaIcons);\n }\n }, [instance, enableRetinaIcons]);\n useEffect(function () {\n if (typeof gridSize !== 'undefined' && instance !== null) {\n updaterMap$e.gridSize(instance, gridSize);\n }\n }, [instance, gridSize]);\n useEffect(function () {\n if (typeof ignoreHidden !== 'undefined' && instance !== null) {\n updaterMap$e.ignoreHidden(instance, ignoreHidden);\n }\n }, [instance, ignoreHidden]);\n useEffect(function () {\n if (typeof imageExtension !== 'undefined' && instance !== null) {\n updaterMap$e.imageExtension(instance, imageExtension);\n }\n }, [instance, imageExtension]);\n useEffect(function () {\n if (typeof imagePath !== 'undefined' && instance !== null) {\n updaterMap$e.imagePath(instance, imagePath);\n }\n }, [instance, imagePath]);\n useEffect(function () {\n if (typeof imageSizes !== 'undefined' && instance !== null) {\n updaterMap$e.imageSizes(instance, imageSizes);\n }\n }, [instance, imageSizes]);\n useEffect(function () {\n if (typeof maxZoom !== 'undefined' && instance !== null) {\n updaterMap$e.maxZoom(instance, maxZoom);\n }\n }, [instance, maxZoom]);\n useEffect(function () {\n if (typeof minimumClusterSize !== 'undefined' && instance !== null) {\n updaterMap$e.minimumClusterSize(instance, minimumClusterSize);\n }\n }, [instance, minimumClusterSize]);\n useEffect(function () {\n if (typeof styles !== 'undefined' && instance !== null) {\n updaterMap$e.styles(instance, styles);\n }\n }, [instance, styles]);\n useEffect(function () {\n if (typeof title !== 'undefined' && instance !== null) {\n updaterMap$e.title(instance, title);\n }\n }, [instance, title]);\n useEffect(function () {\n if (typeof zoomOnClick !== 'undefined' && instance !== null) {\n updaterMap$e.zoomOnClick(instance, zoomOnClick);\n }\n }, [instance, zoomOnClick]);\n useEffect(function () {\n if (!map)\n return;\n var clustererOptions = __assign({}, (options || defaultOptions$4));\n var clusterer = new Clusterer(map, [], clustererOptions);\n if (averageCenter) {\n updaterMap$e.averageCenter(clusterer, averageCenter);\n }\n if (batchSizeIE) {\n updaterMap$e.batchSizeIE(clusterer, batchSizeIE);\n }\n if (calculator) {\n updaterMap$e.calculator(clusterer, calculator);\n }\n if (clusterClass) {\n updaterMap$e.clusterClass(clusterer, clusterClass);\n }\n if (enableRetinaIcons) {\n updaterMap$e.enableRetinaIcons(clusterer, enableRetinaIcons);\n }\n if (gridSize) {\n updaterMap$e.gridSize(clusterer, gridSize);\n }\n if (ignoreHidden) {\n updaterMap$e.ignoreHidden(clusterer, ignoreHidden);\n }\n if (imageExtension) {\n updaterMap$e.imageExtension(clusterer, imageExtension);\n }\n if (imagePath) {\n updaterMap$e.imagePath(clusterer, imagePath);\n }\n if (imageSizes) {\n updaterMap$e.imageSizes(clusterer, imageSizes);\n }\n if (maxZoom) {\n updaterMap$e.maxZoom(clusterer, maxZoom);\n }\n if (minimumClusterSize) {\n updaterMap$e.minimumClusterSize(clusterer, minimumClusterSize);\n }\n if (styles) {\n updaterMap$e.styles(clusterer, styles);\n }\n if (title) {\n updaterMap$e.title(clusterer, title);\n }\n if (zoomOnClick) {\n updaterMap$e.zoomOnClick(clusterer, zoomOnClick);\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(clusterer, eventMap$e.onMouseOut, onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(clusterer, eventMap$e.onMouseOver, onMouseOver));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(clusterer, eventMap$e.onClick, onClick));\n }\n if (onClusteringBegin) {\n setClusteringBeginListener(google.maps.event.addListener(clusterer, eventMap$e.onClusteringBegin, onClusteringBegin));\n }\n if (onClusteringEnd) {\n setClusteringEndListener(google.maps.event.addListener(clusterer, eventMap$e.onClusteringEnd, onClusteringEnd));\n }\n setInstance(clusterer);\n if (onLoad) {\n onLoad(clusterer);\n }\n return function () {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (clusteringBeginListener !== null) {\n google.maps.event.removeListener(clusteringBeginListener);\n }\n if (clusteringEndListener !== null) {\n google.maps.event.removeListener(clusteringEndListener);\n }\n if (onUnmount) {\n onUnmount(clusterer);\n }\n };\n }, []);\n return instance !== null ? children(instance) || null : null;\n}\nvar MarkerClustererF = memo(MarkerClustererFunctional);\nvar ClustererComponent = /** @class */ (function (_super) {\n __extends(ClustererComponent, _super);\n function ClustererComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n markerClusterer: null,\n };\n _this.setClustererCallback = function () {\n if (_this.state.markerClusterer !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.markerClusterer);\n }\n };\n return _this;\n }\n ClustererComponent.prototype.componentDidMount = function () {\n if (this.context) {\n var markerClusterer_1 = new Clusterer(this.context, [], this.props.options);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$e,\n eventMap: eventMap$e,\n prevProps: {},\n nextProps: this.props,\n instance: markerClusterer_1,\n });\n this.setState(function () {\n return {\n markerClusterer: markerClusterer_1,\n };\n }, this.setClustererCallback);\n }\n };\n ClustererComponent.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.markerClusterer) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$e,\n eventMap: eventMap$e,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.markerClusterer,\n });\n }\n };\n ClustererComponent.prototype.componentWillUnmount = function () {\n if (this.state.markerClusterer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.markerClusterer);\n }\n unregisterEvents(this.registeredEvents);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.state.markerClusterer.setMap(null);\n }\n };\n ClustererComponent.prototype.render = function () {\n return this.state.markerClusterer !== null\n ? this.props.children(this.state.markerClusterer)\n : null;\n };\n ClustererComponent.contextType = MapContext;\n return ClustererComponent;\n}(PureComponent));\n\n// This handler prevents an event in the InfoBox from being passed on to the map.\nfunction cancelHandler(event) {\n event.cancelBubble = true;\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n}\nvar InfoBox = /** @class */ (function () {\n function InfoBox(options) {\n if (options === void 0) { options = {}; }\n this.getCloseClickHandler = this.getCloseClickHandler.bind(this);\n this.closeClickHandler = this.closeClickHandler.bind(this);\n this.createInfoBoxDiv = this.createInfoBoxDiv.bind(this);\n this.addClickHandler = this.addClickHandler.bind(this);\n this.getCloseBoxImg = this.getCloseBoxImg.bind(this);\n this.getBoxWidths = this.getBoxWidths.bind(this);\n this.setBoxStyle = this.setBoxStyle.bind(this);\n this.setPosition = this.setPosition.bind(this);\n this.getPosition = this.getPosition.bind(this);\n this.setOptions = this.setOptions.bind(this);\n this.setContent = this.setContent.bind(this);\n this.setVisible = this.setVisible.bind(this);\n this.getContent = this.getContent.bind(this);\n this.getVisible = this.getVisible.bind(this);\n this.setZIndex = this.setZIndex.bind(this);\n this.getZIndex = this.getZIndex.bind(this);\n this.onRemove = this.onRemove.bind(this);\n this.panBox = this.panBox.bind(this);\n this.extend = this.extend.bind(this);\n this.close = this.close.bind(this);\n this.draw = this.draw.bind(this);\n this.show = this.show.bind(this);\n this.hide = this.hide.bind(this);\n this.open = this.open.bind(this);\n this.extend(InfoBox, google.maps.OverlayView);\n // Standard options (in common with google.maps.InfoWindow):\n this.content = options.content || '';\n this.disableAutoPan = options.disableAutoPan || false;\n this.maxWidth = options.maxWidth || 0;\n this.pixelOffset = options.pixelOffset || new google.maps.Size(0, 0);\n this.position = options.position || new google.maps.LatLng(0, 0);\n this.zIndex = options.zIndex || null;\n // Additional options (unique to InfoBox):\n this.boxClass = options.boxClass || 'infoBox';\n this.boxStyle = options.boxStyle || {};\n this.closeBoxMargin = options.closeBoxMargin || '2px';\n this.closeBoxURL = options.closeBoxURL || 'http://www.google.com/intl/en_us/mapfiles/close.gif';\n if (options.closeBoxURL === '') {\n this.closeBoxURL = '';\n }\n this.infoBoxClearance = options.infoBoxClearance || new google.maps.Size(1, 1);\n if (typeof options.visible === 'undefined') {\n if (typeof options.isHidden === 'undefined') {\n options.visible = true;\n }\n else {\n options.visible = !options.isHidden;\n }\n }\n this.isHidden = !options.visible;\n this.alignBottom = options.alignBottom || false;\n this.pane = options.pane || 'floatPane';\n this.enableEventPropagation = options.enableEventPropagation || false;\n this.div = null;\n this.closeListener = null;\n this.moveListener = null;\n this.mapListener = null;\n this.contextListener = null;\n this.eventListeners = null;\n this.fixedWidthSet = null;\n }\n InfoBox.prototype.createInfoBoxDiv = function () {\n var _this = this;\n // This handler ignores the current event in the InfoBox and conditionally prevents\n // the event from being passed on to the map. It is used for the contextmenu event.\n var ignoreHandler = function (event) {\n event.returnValue = false;\n if (event.preventDefault) {\n event.preventDefault();\n }\n if (!_this.enableEventPropagation) {\n cancelHandler(event);\n }\n };\n if (!this.div) {\n this.div = document.createElement('div');\n this.setBoxStyle();\n if (typeof this.content === 'string') {\n this.div.innerHTML = this.getCloseBoxImg() + this.content;\n }\n else {\n this.div.innerHTML = this.getCloseBoxImg();\n this.div.appendChild(this.content);\n }\n var panes = this.getPanes();\n if (panes !== null) {\n panes[this.pane].appendChild(this.div); // Add the InfoBox div to the DOM\n }\n this.addClickHandler();\n if (this.div.style.width) {\n this.fixedWidthSet = true;\n }\n else {\n if (this.maxWidth !== 0 && this.div.offsetWidth > this.maxWidth) {\n this.div.style.width = this.maxWidth + 'px';\n this.fixedWidthSet = true;\n }\n else {\n // The following code is needed to overcome problems with MSIE\n var bw = this.getBoxWidths();\n this.div.style.width = this.div.offsetWidth - bw.left - bw.right + 'px';\n this.fixedWidthSet = false;\n }\n }\n this.panBox(this.disableAutoPan);\n if (!this.enableEventPropagation) {\n this.eventListeners = [];\n // Cancel event propagation.\n // Note: mousemove not included (to resolve Issue 152)\n var events = [\n 'mousedown',\n 'mouseover',\n 'mouseout',\n 'mouseup',\n 'click',\n 'dblclick',\n 'touchstart',\n 'touchend',\n 'touchmove',\n ];\n for (var _i = 0, events_1 = events; _i < events_1.length; _i++) {\n var event_1 = events_1[_i];\n this.eventListeners.push(google.maps.event.addListener(this.div, event_1, cancelHandler));\n }\n // Workaround for Google bug that causes the cursor to change to a pointer\n // when the mouse moves over a marker underneath InfoBox.\n this.eventListeners.push(google.maps.event.addListener(this.div, 'mouseover', function () {\n if (_this.div) {\n _this.div.style.cursor = 'default';\n }\n }));\n }\n this.contextListener = google.maps.event.addListener(this.div, 'contextmenu', ignoreHandler);\n /**\n * This event is fired when the DIV containing the InfoBox's content is attached to the DOM.\n * @name InfoBox#domready\n * @event\n */\n google.maps.event.trigger(this, 'domready');\n }\n };\n InfoBox.prototype.getCloseBoxImg = function () {\n var img = '';\n if (this.closeBoxURL !== '') {\n img = '\"\"';\n\";\n }\n return img;\n };\n InfoBox.prototype.addClickHandler = function () {\n this.closeListener = this.div && this.div.firstChild && this.closeBoxURL !== ''\n ? google.maps.event.addListener(this.div.firstChild, 'click', this.getCloseClickHandler())\n : null;\n };\n InfoBox.prototype.closeClickHandler = function (event) {\n // 1.0.3 fix: Always prevent propagation of a close box click to the map:\n event.cancelBubble = true;\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n /**\n * This event is fired when the InfoBox's close box is clicked.\n * @name InfoBox#closeclick\n * @event\n */\n google.maps.event.trigger(this, 'closeclick');\n this.close();\n };\n InfoBox.prototype.getCloseClickHandler = function () {\n return this.closeClickHandler;\n };\n InfoBox.prototype.panBox = function (disablePan) {\n if (this.div && !disablePan) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var map = this.getMap();\n // Only pan if attached to map, not panorama\n if (map instanceof google.maps.Map) {\n var xOffset = 0;\n var yOffset = 0;\n var bounds = map.getBounds();\n if (bounds && !bounds.contains(this.position)) {\n // Marker not in visible area of map, so set center\n // of map to the marker position first.\n map.setCenter(this.position);\n }\n var mapDiv = map.getDiv();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var mapWidth = mapDiv.offsetWidth;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var mapHeight = mapDiv.offsetHeight;\n var iwOffsetX = this.pixelOffset.width;\n var iwOffsetY = this.pixelOffset.height;\n var iwWidth = this.div.offsetWidth;\n var iwHeight = this.div.offsetHeight;\n var padX = this.infoBoxClearance.width;\n var padY = this.infoBoxClearance.height;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var projection = this.getProjection();\n var pixPosition = projection.fromLatLngToContainerPixel(this.position);\n if (pixPosition !== null) {\n if (pixPosition.x < -iwOffsetX + padX) {\n xOffset = pixPosition.x + iwOffsetX - padX;\n }\n else if (pixPosition.x + iwWidth + iwOffsetX + padX > mapWidth) {\n xOffset = pixPosition.x + iwWidth + iwOffsetX + padX - mapWidth;\n }\n if (this.alignBottom) {\n if (pixPosition.y < -iwOffsetY + padY + iwHeight) {\n yOffset = pixPosition.y + iwOffsetY - padY - iwHeight;\n }\n else if (pixPosition.y + iwOffsetY + padY > mapHeight) {\n yOffset = pixPosition.y + iwOffsetY + padY - mapHeight;\n }\n }\n else {\n if (pixPosition.y < -iwOffsetY + padY) {\n yOffset = pixPosition.y + iwOffsetY - padY;\n }\n else if (pixPosition.y + iwHeight + iwOffsetY + padY > mapHeight) {\n yOffset = pixPosition.y + iwHeight + iwOffsetY + padY - mapHeight;\n }\n }\n }\n if (!(xOffset === 0 && yOffset === 0)) {\n // Move the map to the shifted center.\n map.panBy(xOffset, yOffset);\n }\n }\n }\n };\n InfoBox.prototype.setBoxStyle = function () {\n if (this.div) {\n // Apply style values from the style sheet defined in the boxClass parameter:\n this.div.className = this.boxClass;\n // Clear existing inline style values:\n this.div.style.cssText = '';\n // Apply style values defined in the boxStyle parameter:\n var boxStyle = this.boxStyle;\n for (var i in boxStyle) {\n if (Object.prototype.hasOwnProperty.call(boxStyle, i)) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.div.style[i] = boxStyle[i];\n }\n }\n // Fix for iOS disappearing InfoBox problem\n // See http://stackoverflow.com/questions/9229535/google-maps-markers-disappear-at-certain-zoom-level-only-on-iphone-ipad\n this.div.style.webkitTransform = 'translateZ(0)';\n // Fix up opacity style for benefit of MSIE\n if (typeof this.div.style.opacity !== 'undefined' && this.div.style.opacity !== '') {\n // See http://www.quirksmode.org/css/opacity.html\n var opacity = parseFloat(this.div.style.opacity || '');\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.div.style.msFilter =\n '\"progid:DXImageTransform.Microsoft.Alpha(Opacity=' + opacity * 100 + ')\"';\n this.div.style.filter = 'alpha(opacity=' + opacity * 100 + ')';\n }\n // Apply required styles\n this.div.style.position = 'absolute';\n this.div.style.visibility = 'hidden';\n if (this.zIndex !== null) {\n this.div.style.zIndex = this.zIndex + '';\n }\n if (!this.div.style.overflow) {\n this.div.style.overflow = 'auto';\n }\n }\n };\n InfoBox.prototype.getBoxWidths = function () {\n var bw = { top: 0, bottom: 0, left: 0, right: 0 };\n if (!this.div) {\n return bw;\n }\n if (document.defaultView) {\n var ownerDocument = this.div.ownerDocument;\n var computedStyle = ownerDocument && ownerDocument.defaultView\n ? ownerDocument.defaultView.getComputedStyle(this.div, '')\n : null;\n if (computedStyle) {\n // The computed styles are always in pixel units (good!)\n bw.top = parseInt(computedStyle.borderTopWidth || '', 10) || 0;\n bw.bottom = parseInt(computedStyle.borderBottomWidth || '', 10) || 0;\n bw.left = parseInt(computedStyle.borderLeftWidth || '', 10) || 0;\n bw.right = parseInt(computedStyle.borderRightWidth || '', 10) || 0;\n }\n }\n else if (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n document.documentElement.currentStyle // MSIE\n ) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var currentStyle = this.div.currentStyle;\n if (currentStyle) {\n // The current styles may not be in pixel units, but assume they are (bad!)\n bw.top = parseInt(currentStyle.borderTopWidth || '', 10) || 0;\n bw.bottom = parseInt(currentStyle.borderBottomWidth || '', 10) || 0;\n bw.left = parseInt(currentStyle.borderLeftWidth || '', 10) || 0;\n bw.right = parseInt(currentStyle.borderRightWidth || '', 10) || 0;\n }\n }\n return bw;\n };\n InfoBox.prototype.onRemove = function () {\n if (this.div && this.div.parentNode) {\n this.div.parentNode.removeChild(this.div);\n this.div = null;\n }\n };\n InfoBox.prototype.draw = function () {\n this.createInfoBoxDiv();\n if (this.div) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var projection = this.getProjection();\n var pixPosition = projection.fromLatLngToDivPixel(this.position);\n if (pixPosition !== null) {\n this.div.style.left = pixPosition.x + this.pixelOffset.width + 'px';\n if (this.alignBottom) {\n this.div.style.bottom = -(pixPosition.y + this.pixelOffset.height) + 'px';\n }\n else {\n this.div.style.top = pixPosition.y + this.pixelOffset.height + 'px';\n }\n }\n if (this.isHidden) {\n this.div.style.visibility = 'hidden';\n }\n else {\n this.div.style.visibility = 'visible';\n }\n }\n };\n InfoBox.prototype.setOptions = function (options) {\n if (options === void 0) { options = {}; }\n if (typeof options.boxClass !== 'undefined') {\n // Must be first\n this.boxClass = options.boxClass;\n this.setBoxStyle();\n }\n if (typeof options.boxStyle !== 'undefined') {\n // Must be second\n this.boxStyle = options.boxStyle;\n this.setBoxStyle();\n }\n if (typeof options.content !== 'undefined') {\n this.setContent(options.content);\n }\n if (typeof options.disableAutoPan !== 'undefined') {\n this.disableAutoPan = options.disableAutoPan;\n }\n if (typeof options.maxWidth !== 'undefined') {\n this.maxWidth = options.maxWidth;\n }\n if (typeof options.pixelOffset !== 'undefined') {\n this.pixelOffset = options.pixelOffset;\n }\n if (typeof options.alignBottom !== 'undefined') {\n this.alignBottom = options.alignBottom;\n }\n if (typeof options.position !== 'undefined') {\n this.setPosition(options.position);\n }\n if (typeof options.zIndex !== 'undefined') {\n this.setZIndex(options.zIndex);\n }\n if (typeof options.closeBoxMargin !== 'undefined') {\n this.closeBoxMargin = options.closeBoxMargin;\n }\n if (typeof options.closeBoxURL !== 'undefined') {\n this.closeBoxURL = options.closeBoxURL;\n }\n if (typeof options.infoBoxClearance !== 'undefined') {\n this.infoBoxClearance = options.infoBoxClearance;\n }\n if (typeof options.isHidden !== 'undefined') {\n this.isHidden = options.isHidden;\n }\n if (typeof options.visible !== 'undefined') {\n this.isHidden = !options.visible;\n }\n if (typeof options.enableEventPropagation !== 'undefined') {\n this.enableEventPropagation = options.enableEventPropagation;\n }\n if (this.div) {\n this.draw();\n }\n };\n InfoBox.prototype.setContent = function (content) {\n this.content = content;\n if (this.div) {\n if (this.closeListener) {\n google.maps.event.removeListener(this.closeListener);\n this.closeListener = null;\n }\n // Odd code required to make things work with MSIE.\n if (!this.fixedWidthSet) {\n this.div.style.width = '';\n }\n if (typeof content === 'string') {\n this.div.innerHTML = this.getCloseBoxImg() + content;\n }\n else {\n this.div.innerHTML = this.getCloseBoxImg();\n this.div.appendChild(content);\n }\n // Perverse code required to make things work with MSIE.\n // (Ensures the close box does, in fact, float to the right.)\n if (!this.fixedWidthSet) {\n this.div.style.width = this.div.offsetWidth + 'px';\n if (typeof content === 'string') {\n this.div.innerHTML = this.getCloseBoxImg() + content;\n }\n else {\n this.div.innerHTML = this.getCloseBoxImg();\n this.div.appendChild(content);\n }\n }\n this.addClickHandler();\n }\n /**\n * This event is fired when the content of the InfoBox changes.\n * @name InfoBox#content_changed\n * @event\n */\n google.maps.event.trigger(this, 'content_changed');\n };\n InfoBox.prototype.setPosition = function (latLng) {\n this.position = latLng;\n if (this.div) {\n this.draw();\n }\n /**\n * This event is fired when the position of the InfoBox changes.\n * @name InfoBox#position_changed\n * @event\n */\n google.maps.event.trigger(this, 'position_changed');\n };\n InfoBox.prototype.setVisible = function (isVisible) {\n this.isHidden = !isVisible;\n if (this.div) {\n this.div.style.visibility = this.isHidden ? 'hidden' : 'visible';\n }\n };\n InfoBox.prototype.setZIndex = function (index) {\n this.zIndex = index;\n if (this.div) {\n this.div.style.zIndex = index + '';\n }\n /**\n * This event is fired when the zIndex of the InfoBox changes.\n * @name InfoBox#zindex_changed\n * @event\n */\n google.maps.event.trigger(this, 'zindex_changed');\n };\n InfoBox.prototype.getContent = function () {\n return this.content;\n };\n InfoBox.prototype.getPosition = function () {\n return this.position;\n };\n InfoBox.prototype.getZIndex = function () {\n return this.zIndex;\n };\n InfoBox.prototype.getVisible = function () {\n var map = this.getMap();\n return typeof map === 'undefined' || map === null ? false : !this.isHidden;\n };\n InfoBox.prototype.show = function () {\n this.isHidden = false;\n if (this.div) {\n this.div.style.visibility = 'visible';\n }\n };\n InfoBox.prototype.hide = function () {\n this.isHidden = true;\n if (this.div) {\n this.div.style.visibility = 'hidden';\n }\n };\n InfoBox.prototype.open = function (map, anchor) {\n var _this = this;\n if (anchor) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.position = anchor.getPosition();\n this.moveListener = google.maps.event.addListener(anchor, 'position_changed', function () {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var position = anchor.getPosition();\n _this.setPosition(position);\n });\n this.mapListener = google.maps.event.addListener(anchor, 'map_changed', function () {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n _this.setMap(anchor.map);\n });\n }\n this.setMap(map);\n if (this.div) {\n this.panBox();\n }\n };\n InfoBox.prototype.close = function () {\n if (this.closeListener) {\n google.maps.event.removeListener(this.closeListener);\n this.closeListener = null;\n }\n if (this.eventListeners) {\n for (var _i = 0, _a = this.eventListeners; _i < _a.length; _i++) {\n var eventListener = _a[_i];\n google.maps.event.removeListener(eventListener);\n }\n this.eventListeners = null;\n }\n if (this.moveListener) {\n google.maps.event.removeListener(this.moveListener);\n this.moveListener = null;\n }\n if (this.mapListener) {\n google.maps.event.removeListener(this.mapListener);\n this.mapListener = null;\n }\n if (this.contextListener) {\n google.maps.event.removeListener(this.contextListener);\n this.contextListener = null;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.setMap(null);\n };\n InfoBox.prototype.extend = function (obj1, obj2) {\n return function applyExtend(object) {\n for (var property in object.prototype) {\n if (!Object.prototype.hasOwnProperty.call(this, property)) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.prototype[property] = object.prototype[property];\n }\n }\n return this;\n }.apply(obj1, [obj2]);\n };\n return InfoBox;\n}());\n\nvar eventMap$d = {\n onCloseClick: 'closeclick',\n onContentChanged: 'content_changed',\n onDomReady: 'domready',\n onPositionChanged: 'position_changed',\n onZindexChanged: 'zindex_changed',\n};\nvar updaterMap$d = {\n options: function (instance, options) {\n instance.setOptions(options);\n },\n position: function (instance, position) {\n if (position instanceof google.maps.LatLng) {\n instance.setPosition(position);\n }\n else {\n instance.setPosition(new google.maps.LatLng(position.lat, position.lng));\n }\n },\n visible: function (instance, visible) {\n instance.setVisible(visible);\n },\n zIndex: function (instance, zIndex) {\n instance.setZIndex(zIndex);\n },\n};\nvar defaultOptions$3 = {};\nfunction InfoBoxFunctional(_a) {\n var children = _a.children, anchor = _a.anchor, options = _a.options, position = _a.position, zIndex = _a.zIndex, onCloseClick = _a.onCloseClick, onDomReady = _a.onDomReady, onContentChanged = _a.onContentChanged, onPositionChanged = _a.onPositionChanged, onZindexChanged = _a.onZindexChanged, onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n var _c = useState(null), closeClickListener = _c[0], setCloseClickListener = _c[1];\n var _d = useState(null), domReadyClickListener = _d[0], setDomReadyClickListener = _d[1];\n var _e = useState(null), contentChangedClickListener = _e[0], setContentChangedClickListener = _e[1];\n var _f = useState(null), positionChangedClickListener = _f[0], setPositionChangedClickListener = _f[1];\n var _g = useState(null), zIndexChangedClickListener = _g[0], setZindexChangedClickListener = _g[1];\n var containerElementRef = useRef(null);\n // Order does matter\n useEffect(function () {\n if (map && instance !== null) {\n instance.close();\n if (anchor) {\n instance.open(map, anchor);\n }\n else if (instance.getPosition()) {\n instance.open(map);\n }\n }\n }, [map, instance, anchor]);\n useEffect(function () {\n if (options && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n if (position && instance !== null) {\n var positionLatLng = position instanceof google.maps.LatLng\n ? position\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n : new google.maps.LatLng(position.lat, position.lng);\n instance.setPosition(positionLatLng);\n }\n }, [position]);\n useEffect(function () {\n if (typeof zIndex === 'number' && instance !== null) {\n instance.setZIndex(zIndex);\n }\n }, [zIndex]);\n useEffect(function () {\n if (instance && onCloseClick) {\n if (closeClickListener !== null) {\n google.maps.event.removeListener(closeClickListener);\n }\n setCloseClickListener(google.maps.event.addListener(instance, 'closeclick', onCloseClick));\n }\n }, [onCloseClick]);\n useEffect(function () {\n if (instance && onDomReady) {\n if (domReadyClickListener !== null) {\n google.maps.event.removeListener(domReadyClickListener);\n }\n setDomReadyClickListener(google.maps.event.addListener(instance, 'domready', onDomReady));\n }\n }, [onDomReady]);\n useEffect(function () {\n if (instance && onContentChanged) {\n if (contentChangedClickListener !== null) {\n google.maps.event.removeListener(contentChangedClickListener);\n }\n setContentChangedClickListener(google.maps.event.addListener(instance, 'content_changed', onContentChanged));\n }\n }, [onContentChanged]);\n useEffect(function () {\n if (instance && onPositionChanged) {\n if (positionChangedClickListener !== null) {\n google.maps.event.removeListener(positionChangedClickListener);\n }\n setPositionChangedClickListener(google.maps.event.addListener(instance, 'position_changed', onPositionChanged));\n }\n }, [onPositionChanged]);\n useEffect(function () {\n if (instance && onZindexChanged) {\n if (zIndexChangedClickListener !== null) {\n google.maps.event.removeListener(zIndexChangedClickListener);\n }\n setZindexChangedClickListener(google.maps.event.addListener(instance, 'zindex_changed', onZindexChanged));\n }\n }, [onZindexChanged]);\n useEffect(function () {\n if (map) {\n var _a = options || defaultOptions$3, position_1 = _a.position, infoBoxOptions = __rest$1(_a, [\"position\"]);\n var positionLatLng = void 0;\n if (position_1 && !(position_1 instanceof google.maps.LatLng)) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n positionLatLng = new google.maps.LatLng(position_1.lat, position_1.lng);\n }\n var infoBox = new InfoBox(__assign(__assign({}, infoBoxOptions), (positionLatLng ? { position: positionLatLng } : {})));\n containerElementRef.current = document.createElement('div');\n setInstance(infoBox);\n if (onCloseClick) {\n setCloseClickListener(google.maps.event.addListener(infoBox, 'closeclick', onCloseClick));\n }\n if (onDomReady) {\n setDomReadyClickListener(google.maps.event.addListener(infoBox, 'domready', onDomReady));\n }\n if (onContentChanged) {\n setContentChangedClickListener(google.maps.event.addListener(infoBox, 'content_changed', onContentChanged));\n }\n if (onPositionChanged) {\n setPositionChangedClickListener(google.maps.event.addListener(infoBox, 'position_changed', onPositionChanged));\n }\n if (onZindexChanged) {\n setZindexChangedClickListener(google.maps.event.addListener(infoBox, 'zindex_changed', onZindexChanged));\n }\n infoBox.setContent(containerElementRef.current);\n if (anchor) {\n infoBox.open(map, anchor);\n }\n else if (infoBox.getPosition()) {\n infoBox.open(map);\n }\n else {\n invariant$1(false, 'You must provide either an anchor or a position prop for .');\n }\n if (onLoad) {\n onLoad(infoBox);\n }\n }\n return function () {\n if (instance !== null) {\n if (closeClickListener) {\n google.maps.event.removeListener(closeClickListener);\n }\n if (contentChangedClickListener) {\n google.maps.event.removeListener(contentChangedClickListener);\n }\n if (domReadyClickListener) {\n google.maps.event.removeListener(domReadyClickListener);\n }\n if (positionChangedClickListener) {\n google.maps.event.removeListener(positionChangedClickListener);\n }\n if (zIndexChangedClickListener) {\n google.maps.event.removeListener(zIndexChangedClickListener);\n }\n if (onUnmount) {\n onUnmount(instance);\n }\n instance.close();\n }\n };\n }, []);\n return containerElementRef.current ? createPortal(Children.only(children), containerElementRef.current) : null;\n}\nvar InfoBoxF = memo(InfoBoxFunctional);\nvar InfoBoxComponent = /** @class */ (function (_super) {\n __extends(InfoBoxComponent, _super);\n function InfoBoxComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.containerElement = null;\n _this.state = {\n infoBox: null,\n };\n _this.open = function (infoBox, anchor) {\n if (anchor) {\n if (_this.context !== null) {\n infoBox.open(_this.context, anchor);\n }\n }\n else if (infoBox.getPosition()) {\n if (_this.context !== null) {\n infoBox.open(_this.context);\n }\n }\n else {\n invariant$1(false, 'You must provide either an anchor or a position prop for .');\n }\n };\n _this.setInfoBoxCallback = function () {\n if (_this.state.infoBox !== null && _this.containerElement !== null) {\n _this.state.infoBox.setContent(_this.containerElement);\n _this.open(_this.state.infoBox, _this.props.anchor);\n if (_this.props.onLoad) {\n _this.props.onLoad(_this.state.infoBox);\n }\n }\n };\n return _this;\n }\n InfoBoxComponent.prototype.componentDidMount = function () {\n var _a = this.props.options || {}, position = _a.position, infoBoxOptions = __rest$1(_a, [\"position\"]);\n var positionLatLng;\n if (position && !(position instanceof google.maps.LatLng)) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n positionLatLng = new google.maps.LatLng(position.lat, position.lng);\n }\n var infoBox = new InfoBox(__assign(__assign({}, infoBoxOptions), (positionLatLng ? { position: positionLatLng } : {})));\n this.containerElement = document.createElement('div');\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$d,\n eventMap: eventMap$d,\n prevProps: {},\n nextProps: this.props,\n instance: infoBox,\n });\n this.setState({ infoBox: infoBox }, this.setInfoBoxCallback);\n };\n InfoBoxComponent.prototype.componentDidUpdate = function (prevProps) {\n var infoBox = this.state.infoBox;\n if (infoBox !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$d,\n eventMap: eventMap$d,\n prevProps: prevProps,\n nextProps: this.props,\n instance: infoBox,\n });\n }\n };\n InfoBoxComponent.prototype.componentWillUnmount = function () {\n var onUnmount = this.props.onUnmount;\n var infoBox = this.state.infoBox;\n if (infoBox !== null) {\n if (onUnmount) {\n onUnmount(infoBox);\n }\n unregisterEvents(this.registeredEvents);\n infoBox.close();\n }\n };\n InfoBoxComponent.prototype.render = function () {\n return this.containerElement ? createPortal(Children.only(this.props.children), this.containerElement) : null;\n };\n InfoBoxComponent.contextType = MapContext;\n return InfoBoxComponent;\n}(PureComponent));\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nvar fastDeepEqual = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n\nvar equal = /*@__PURE__*/getDefaultExportFromCjs(fastDeepEqual);\n\nconst ARRAY_TYPES = [\n Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array,\n Int32Array, Uint32Array, Float32Array, Float64Array\n];\n\n/** @typedef {Int8ArrayConstructor | Uint8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor} TypedArrayConstructor */\n\nconst VERSION = 1; // serialized format version\nconst HEADER_SIZE = 8;\n\nclass KDBush {\n\n /**\n * Creates an index from raw `ArrayBuffer` data.\n * @param {ArrayBuffer} data\n */\n static from(data) {\n if (!(data instanceof ArrayBuffer)) {\n throw new Error('Data must be an instance of ArrayBuffer.');\n }\n const [magic, versionAndType] = new Uint8Array(data, 0, 2);\n if (magic !== 0xdb) {\n throw new Error('Data does not appear to be in a KDBush format.');\n }\n const version = versionAndType >> 4;\n if (version !== VERSION) {\n throw new Error(`Got v${version} data when expected v${VERSION}.`);\n }\n const ArrayType = ARRAY_TYPES[versionAndType & 0x0f];\n if (!ArrayType) {\n throw new Error('Unrecognized array type.');\n }\n const [nodeSize] = new Uint16Array(data, 2, 1);\n const [numItems] = new Uint32Array(data, 4, 1);\n\n return new KDBush(numItems, nodeSize, ArrayType, data);\n }\n\n /**\n * Creates an index that will hold a given number of items.\n * @param {number} numItems\n * @param {number} [nodeSize=64] Size of the KD-tree node (64 by default).\n * @param {TypedArrayConstructor} [ArrayType=Float64Array] The array type used for coordinates storage (`Float64Array` by default).\n * @param {ArrayBuffer} [data] (For internal use only)\n */\n constructor(numItems, nodeSize = 64, ArrayType = Float64Array, data) {\n if (isNaN(numItems) || numItems < 0) throw new Error(`Unpexpected numItems value: ${numItems}.`);\n\n this.numItems = +numItems;\n this.nodeSize = Math.min(Math.max(+nodeSize, 2), 65535);\n this.ArrayType = ArrayType;\n this.IndexArrayType = numItems < 65536 ? Uint16Array : Uint32Array;\n\n const arrayTypeIndex = ARRAY_TYPES.indexOf(this.ArrayType);\n const coordsByteSize = numItems * 2 * this.ArrayType.BYTES_PER_ELEMENT;\n const idsByteSize = numItems * this.IndexArrayType.BYTES_PER_ELEMENT;\n const padCoords = (8 - idsByteSize % 8) % 8;\n\n if (arrayTypeIndex < 0) {\n throw new Error(`Unexpected typed array class: ${ArrayType}.`);\n }\n\n if (data && (data instanceof ArrayBuffer)) { // reconstruct an index from a buffer\n this.data = data;\n this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, numItems);\n this.coords = new this.ArrayType(this.data, HEADER_SIZE + idsByteSize + padCoords, numItems * 2);\n this._pos = numItems * 2;\n this._finished = true;\n } else { // initialize a new index\n this.data = new ArrayBuffer(HEADER_SIZE + coordsByteSize + idsByteSize + padCoords);\n this.ids = new this.IndexArrayType(this.data, HEADER_SIZE, numItems);\n this.coords = new this.ArrayType(this.data, HEADER_SIZE + idsByteSize + padCoords, numItems * 2);\n this._pos = 0;\n this._finished = false;\n\n // set header\n new Uint8Array(this.data, 0, 2).set([0xdb, (VERSION << 4) + arrayTypeIndex]);\n new Uint16Array(this.data, 2, 1)[0] = nodeSize;\n new Uint32Array(this.data, 4, 1)[0] = numItems;\n }\n }\n\n /**\n * Add a point to the index.\n * @param {number} x\n * @param {number} y\n * @returns {number} An incremental index associated with the added item (starting from `0`).\n */\n add(x, y) {\n const index = this._pos >> 1;\n this.ids[index] = index;\n this.coords[this._pos++] = x;\n this.coords[this._pos++] = y;\n return index;\n }\n\n /**\n * Perform indexing of the added points.\n */\n finish() {\n const numAdded = this._pos >> 1;\n if (numAdded !== this.numItems) {\n throw new Error(`Added ${numAdded} items when expected ${this.numItems}.`);\n }\n // kd-sort both arrays for efficient search\n sort(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0);\n\n this._finished = true;\n return this;\n }\n\n /**\n * Search the index for items within a given bounding box.\n * @param {number} minX\n * @param {number} minY\n * @param {number} maxX\n * @param {number} maxY\n * @returns {number[]} An array of indices correponding to the found items.\n */\n range(minX, minY, maxX, maxY) {\n if (!this._finished) throw new Error('Data not yet indexed - call index.finish().');\n\n const {ids, coords, nodeSize} = this;\n const stack = [0, ids.length - 1, 0];\n const result = [];\n\n // recursively search for items in range in the kd-sorted arrays\n while (stack.length) {\n const axis = stack.pop() || 0;\n const right = stack.pop() || 0;\n const left = stack.pop() || 0;\n\n // if we reached \"tree node\", search linearly\n if (right - left <= nodeSize) {\n for (let i = left; i <= right; i++) {\n const x = coords[2 * i];\n const y = coords[2 * i + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[i]);\n }\n continue;\n }\n\n // otherwise find the middle index\n const m = (left + right) >> 1;\n\n // include the middle item if it's in range\n const x = coords[2 * m];\n const y = coords[2 * m + 1];\n if (x >= minX && x <= maxX && y >= minY && y <= maxY) result.push(ids[m]);\n\n // queue search in halves that intersect the query\n if (axis === 0 ? minX <= x : minY <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(1 - axis);\n }\n if (axis === 0 ? maxX >= x : maxY >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(1 - axis);\n }\n }\n\n return result;\n }\n\n /**\n * Search the index for items within a given radius.\n * @param {number} qx\n * @param {number} qy\n * @param {number} r Query radius.\n * @returns {number[]} An array of indices correponding to the found items.\n */\n within(qx, qy, r) {\n if (!this._finished) throw new Error('Data not yet indexed - call index.finish().');\n\n const {ids, coords, nodeSize} = this;\n const stack = [0, ids.length - 1, 0];\n const result = [];\n const r2 = r * r;\n\n // recursively search for items within radius in the kd-sorted arrays\n while (stack.length) {\n const axis = stack.pop() || 0;\n const right = stack.pop() || 0;\n const left = stack.pop() || 0;\n\n // if we reached \"tree node\", search linearly\n if (right - left <= nodeSize) {\n for (let i = left; i <= right; i++) {\n if (sqDist(coords[2 * i], coords[2 * i + 1], qx, qy) <= r2) result.push(ids[i]);\n }\n continue;\n }\n\n // otherwise find the middle index\n const m = (left + right) >> 1;\n\n // include the middle item if it's in range\n const x = coords[2 * m];\n const y = coords[2 * m + 1];\n if (sqDist(x, y, qx, qy) <= r2) result.push(ids[m]);\n\n // queue search in halves that intersect the query\n if (axis === 0 ? qx - r <= x : qy - r <= y) {\n stack.push(left);\n stack.push(m - 1);\n stack.push(1 - axis);\n }\n if (axis === 0 ? qx + r >= x : qy + r >= y) {\n stack.push(m + 1);\n stack.push(right);\n stack.push(1 - axis);\n }\n }\n\n return result;\n }\n}\n\n/**\n * @param {Uint16Array | Uint32Array} ids\n * @param {InstanceType} coords\n * @param {number} nodeSize\n * @param {number} left\n * @param {number} right\n * @param {number} axis\n */\nfunction sort(ids, coords, nodeSize, left, right, axis) {\n if (right - left <= nodeSize) return;\n\n const m = (left + right) >> 1; // middle index\n\n // sort ids and coords around the middle index so that the halves lie\n // either left/right or top/bottom correspondingly (taking turns)\n select(ids, coords, m, left, right, axis);\n\n // recursively kd-sort first half and second half on the opposite axis\n sort(ids, coords, nodeSize, left, m - 1, 1 - axis);\n sort(ids, coords, nodeSize, m + 1, right, 1 - axis);\n}\n\n/**\n * Custom Floyd-Rivest selection algorithm: sort ids and coords so that\n * [left..k-1] items are smaller than k-th item (on either x or y axis)\n * @param {Uint16Array | Uint32Array} ids\n * @param {InstanceType} coords\n * @param {number} k\n * @param {number} left\n * @param {number} right\n * @param {number} axis\n */\nfunction select(ids, coords, k, left, right, axis) {\n\n while (right > left) {\n if (right - left > 600) {\n const n = right - left + 1;\n const m = k - left + 1;\n const z = Math.log(n);\n const s = 0.5 * Math.exp(2 * z / 3);\n const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n select(ids, coords, k, newLeft, newRight, axis);\n }\n\n const t = coords[2 * k + axis];\n let i = left;\n let j = right;\n\n swapItem(ids, coords, left, k);\n if (coords[2 * right + axis] > t) swapItem(ids, coords, left, right);\n\n while (i < j) {\n swapItem(ids, coords, i, j);\n i++;\n j--;\n while (coords[2 * i + axis] < t) i++;\n while (coords[2 * j + axis] > t) j--;\n }\n\n if (coords[2 * left + axis] === t) swapItem(ids, coords, left, j);\n else {\n j++;\n swapItem(ids, coords, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\n/**\n * @param {Uint16Array | Uint32Array} ids\n * @param {InstanceType} coords\n * @param {number} i\n * @param {number} j\n */\nfunction swapItem(ids, coords, i, j) {\n swap(ids, i, j);\n swap(coords, 2 * i, 2 * j);\n swap(coords, 2 * i + 1, 2 * j + 1);\n}\n\n/**\n * @param {InstanceType} arr\n * @param {number} i\n * @param {number} j\n */\nfunction swap(arr, i, j) {\n const tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\n/**\n * @param {number} ax\n * @param {number} ay\n * @param {number} bx\n * @param {number} by\n */\nfunction sqDist(ax, ay, bx, by) {\n const dx = ax - bx;\n const dy = ay - by;\n return dx * dx + dy * dy;\n}\n\nconst defaultOptions$2 = {\n minZoom: 0, // min zoom to generate clusters on\n maxZoom: 16, // max zoom level to cluster the points on\n minPoints: 2, // minimum points to form a cluster\n radius: 40, // cluster radius in pixels\n extent: 512, // tile extent (radius is calculated relative to it)\n nodeSize: 64, // size of the KD-tree leaf node, affects performance\n log: false, // whether to log timing info\n\n // whether to generate numeric ids for input features (in vector tiles)\n generateId: false,\n\n // a reduce function for calculating custom cluster properties\n reduce: null, // (accumulated, props) => { accumulated.sum += props.sum; }\n\n // properties to use for individual points when running the reducer\n map: props => props // props => ({sum: props.my_value})\n};\n\nconst fround = Math.fround || (tmp => ((x) => { tmp[0] = +x; return tmp[0]; }))(new Float32Array(1));\n\nconst OFFSET_ZOOM = 2;\nconst OFFSET_ID = 3;\nconst OFFSET_PARENT = 4;\nconst OFFSET_NUM = 5;\nconst OFFSET_PROP = 6;\n\nclass Supercluster {\n constructor(options) {\n this.options = Object.assign(Object.create(defaultOptions$2), options);\n this.trees = new Array(this.options.maxZoom + 1);\n this.stride = this.options.reduce ? 7 : 6;\n this.clusterProps = [];\n }\n\n load(points) {\n const {log, minZoom, maxZoom} = this.options;\n\n if (log) console.time('total time');\n\n const timerId = `prepare ${ points.length } points`;\n if (log) console.time(timerId);\n\n this.points = points;\n\n // generate a cluster object for each point and index input points into a KD-tree\n const data = [];\n\n for (let i = 0; i < points.length; i++) {\n const p = points[i];\n if (!p.geometry) continue;\n\n const [lng, lat] = p.geometry.coordinates;\n const x = fround(lngX(lng));\n const y = fround(latY(lat));\n // store internal point/cluster data in flat numeric arrays for performance\n data.push(\n x, y, // projected point coordinates\n Infinity, // the last zoom the point was processed at\n i, // index of the source feature in the original input array\n -1, // parent cluster id\n 1 // number of points in a cluster\n );\n if (this.options.reduce) data.push(0); // noop\n }\n let tree = this.trees[maxZoom + 1] = this._createTree(data);\n\n if (log) console.timeEnd(timerId);\n\n // cluster points on max zoom, then cluster the results on previous zoom, etc.;\n // results in a cluster hierarchy across zoom levels\n for (let z = maxZoom; z >= minZoom; z--) {\n const now = +Date.now();\n\n // create a new set of clusters for the zoom and index them with a KD-tree\n tree = this.trees[z] = this._createTree(this._cluster(tree, z));\n\n if (log) console.log('z%d: %d clusters in %dms', z, tree.numItems, +Date.now() - now);\n }\n\n if (log) console.timeEnd('total time');\n\n return this;\n }\n\n getClusters(bbox, zoom) {\n let minLng = ((bbox[0] + 180) % 360 + 360) % 360 - 180;\n const minLat = Math.max(-90, Math.min(90, bbox[1]));\n let maxLng = bbox[2] === 180 ? 180 : ((bbox[2] + 180) % 360 + 360) % 360 - 180;\n const maxLat = Math.max(-90, Math.min(90, bbox[3]));\n\n if (bbox[2] - bbox[0] >= 360) {\n minLng = -180;\n maxLng = 180;\n } else if (minLng > maxLng) {\n const easternHem = this.getClusters([minLng, minLat, 180, maxLat], zoom);\n const westernHem = this.getClusters([-180, minLat, maxLng, maxLat], zoom);\n return easternHem.concat(westernHem);\n }\n\n const tree = this.trees[this._limitZoom(zoom)];\n const ids = tree.range(lngX(minLng), latY(maxLat), lngX(maxLng), latY(minLat));\n const data = tree.data;\n const clusters = [];\n for (const id of ids) {\n const k = this.stride * id;\n clusters.push(data[k + OFFSET_NUM] > 1 ? getClusterJSON(data, k, this.clusterProps) : this.points[data[k + OFFSET_ID]]);\n }\n return clusters;\n }\n\n getChildren(clusterId) {\n const originId = this._getOriginId(clusterId);\n const originZoom = this._getOriginZoom(clusterId);\n const errorMsg = 'No cluster with the specified id.';\n\n const tree = this.trees[originZoom];\n if (!tree) throw new Error(errorMsg);\n\n const data = tree.data;\n if (originId * this.stride >= data.length) throw new Error(errorMsg);\n\n const r = this.options.radius / (this.options.extent * Math.pow(2, originZoom - 1));\n const x = data[originId * this.stride];\n const y = data[originId * this.stride + 1];\n const ids = tree.within(x, y, r);\n const children = [];\n for (const id of ids) {\n const k = id * this.stride;\n if (data[k + OFFSET_PARENT] === clusterId) {\n children.push(data[k + OFFSET_NUM] > 1 ? getClusterJSON(data, k, this.clusterProps) : this.points[data[k + OFFSET_ID]]);\n }\n }\n\n if (children.length === 0) throw new Error(errorMsg);\n\n return children;\n }\n\n getLeaves(clusterId, limit, offset) {\n limit = limit || 10;\n offset = offset || 0;\n\n const leaves = [];\n this._appendLeaves(leaves, clusterId, limit, offset, 0);\n\n return leaves;\n }\n\n getTile(z, x, y) {\n const tree = this.trees[this._limitZoom(z)];\n const z2 = Math.pow(2, z);\n const {extent, radius} = this.options;\n const p = radius / extent;\n const top = (y - p) / z2;\n const bottom = (y + 1 + p) / z2;\n\n const tile = {\n features: []\n };\n\n this._addTileFeatures(\n tree.range((x - p) / z2, top, (x + 1 + p) / z2, bottom),\n tree.data, x, y, z2, tile);\n\n if (x === 0) {\n this._addTileFeatures(\n tree.range(1 - p / z2, top, 1, bottom),\n tree.data, z2, y, z2, tile);\n }\n if (x === z2 - 1) {\n this._addTileFeatures(\n tree.range(0, top, p / z2, bottom),\n tree.data, -1, y, z2, tile);\n }\n\n return tile.features.length ? tile : null;\n }\n\n getClusterExpansionZoom(clusterId) {\n let expansionZoom = this._getOriginZoom(clusterId) - 1;\n while (expansionZoom <= this.options.maxZoom) {\n const children = this.getChildren(clusterId);\n expansionZoom++;\n if (children.length !== 1) break;\n clusterId = children[0].properties.cluster_id;\n }\n return expansionZoom;\n }\n\n _appendLeaves(result, clusterId, limit, offset, skipped) {\n const children = this.getChildren(clusterId);\n\n for (const child of children) {\n const props = child.properties;\n\n if (props && props.cluster) {\n if (skipped + props.point_count <= offset) {\n // skip the whole cluster\n skipped += props.point_count;\n } else {\n // enter the cluster\n skipped = this._appendLeaves(result, props.cluster_id, limit, offset, skipped);\n // exit the cluster\n }\n } else if (skipped < offset) {\n // skip a single point\n skipped++;\n } else {\n // add a single point\n result.push(child);\n }\n if (result.length === limit) break;\n }\n\n return skipped;\n }\n\n _createTree(data) {\n const tree = new KDBush(data.length / this.stride | 0, this.options.nodeSize, Float32Array);\n for (let i = 0; i < data.length; i += this.stride) tree.add(data[i], data[i + 1]);\n tree.finish();\n tree.data = data;\n return tree;\n }\n\n _addTileFeatures(ids, data, x, y, z2, tile) {\n for (const i of ids) {\n const k = i * this.stride;\n const isCluster = data[k + OFFSET_NUM] > 1;\n\n let tags, px, py;\n if (isCluster) {\n tags = getClusterProperties(data, k, this.clusterProps);\n px = data[k];\n py = data[k + 1];\n } else {\n const p = this.points[data[k + OFFSET_ID]];\n tags = p.properties;\n const [lng, lat] = p.geometry.coordinates;\n px = lngX(lng);\n py = latY(lat);\n }\n\n const f = {\n type: 1,\n geometry: [[\n Math.round(this.options.extent * (px * z2 - x)),\n Math.round(this.options.extent * (py * z2 - y))\n ]],\n tags\n };\n\n // assign id\n let id;\n if (isCluster || this.options.generateId) {\n // optionally generate id for points\n id = data[k + OFFSET_ID];\n } else {\n // keep id if already assigned\n id = this.points[data[k + OFFSET_ID]].id;\n }\n\n if (id !== undefined) f.id = id;\n\n tile.features.push(f);\n }\n }\n\n _limitZoom(z) {\n return Math.max(this.options.minZoom, Math.min(Math.floor(+z), this.options.maxZoom + 1));\n }\n\n _cluster(tree, zoom) {\n const {radius, extent, reduce, minPoints} = this.options;\n const r = radius / (extent * Math.pow(2, zoom));\n const data = tree.data;\n const nextData = [];\n const stride = this.stride;\n\n // loop through each point\n for (let i = 0; i < data.length; i += stride) {\n // if we've already visited the point at this zoom level, skip it\n if (data[i + OFFSET_ZOOM] <= zoom) continue;\n data[i + OFFSET_ZOOM] = zoom;\n\n // find all nearby points\n const x = data[i];\n const y = data[i + 1];\n const neighborIds = tree.within(data[i], data[i + 1], r);\n\n const numPointsOrigin = data[i + OFFSET_NUM];\n let numPoints = numPointsOrigin;\n\n // count the number of points in a potential cluster\n for (const neighborId of neighborIds) {\n const k = neighborId * stride;\n // filter out neighbors that are already processed\n if (data[k + OFFSET_ZOOM] > zoom) numPoints += data[k + OFFSET_NUM];\n }\n\n // if there were neighbors to merge, and there are enough points to form a cluster\n if (numPoints > numPointsOrigin && numPoints >= minPoints) {\n let wx = x * numPointsOrigin;\n let wy = y * numPointsOrigin;\n\n let clusterProperties;\n let clusterPropIndex = -1;\n\n // encode both zoom and point index on which the cluster originated -- offset by total length of features\n const id = ((i / stride | 0) << 5) + (zoom + 1) + this.points.length;\n\n for (const neighborId of neighborIds) {\n const k = neighborId * stride;\n\n if (data[k + OFFSET_ZOOM] <= zoom) continue;\n data[k + OFFSET_ZOOM] = zoom; // save the zoom (so it doesn't get processed twice)\n\n const numPoints2 = data[k + OFFSET_NUM];\n wx += data[k] * numPoints2; // accumulate coordinates for calculating weighted center\n wy += data[k + 1] * numPoints2;\n\n data[k + OFFSET_PARENT] = id;\n\n if (reduce) {\n if (!clusterProperties) {\n clusterProperties = this._map(data, i, true);\n clusterPropIndex = this.clusterProps.length;\n this.clusterProps.push(clusterProperties);\n }\n reduce(clusterProperties, this._map(data, k));\n }\n }\n\n data[i + OFFSET_PARENT] = id;\n nextData.push(wx / numPoints, wy / numPoints, Infinity, id, -1, numPoints);\n if (reduce) nextData.push(clusterPropIndex);\n\n } else { // left points as unclustered\n for (let j = 0; j < stride; j++) nextData.push(data[i + j]);\n\n if (numPoints > 1) {\n for (const neighborId of neighborIds) {\n const k = neighborId * stride;\n if (data[k + OFFSET_ZOOM] <= zoom) continue;\n data[k + OFFSET_ZOOM] = zoom;\n for (let j = 0; j < stride; j++) nextData.push(data[k + j]);\n }\n }\n }\n }\n\n return nextData;\n }\n\n // get index of the point from which the cluster originated\n _getOriginId(clusterId) {\n return (clusterId - this.points.length) >> 5;\n }\n\n // get zoom of the point from which the cluster originated\n _getOriginZoom(clusterId) {\n return (clusterId - this.points.length) % 32;\n }\n\n _map(data, i, clone) {\n if (data[i + OFFSET_NUM] > 1) {\n const props = this.clusterProps[data[i + OFFSET_PROP]];\n return clone ? Object.assign({}, props) : props;\n }\n const original = this.points[data[i + OFFSET_ID]].properties;\n const result = this.options.map(original);\n return clone && result === original ? Object.assign({}, result) : result;\n }\n}\n\nfunction getClusterJSON(data, i, clusterProps) {\n return {\n type: 'Feature',\n id: data[i + OFFSET_ID],\n properties: getClusterProperties(data, i, clusterProps),\n geometry: {\n type: 'Point',\n coordinates: [xLng(data[i]), yLat(data[i + 1])]\n }\n };\n}\n\nfunction getClusterProperties(data, i, clusterProps) {\n const count = data[i + OFFSET_NUM];\n const abbrev =\n count >= 10000 ? `${Math.round(count / 1000) }k` :\n count >= 1000 ? `${Math.round(count / 100) / 10 }k` : count;\n const propIndex = data[i + OFFSET_PROP];\n const properties = propIndex === -1 ? {} : Object.assign({}, clusterProps[propIndex]);\n return Object.assign(properties, {\n cluster: true,\n cluster_id: data[i + OFFSET_ID],\n point_count: count,\n point_count_abbreviated: abbrev\n });\n}\n\n// longitude/latitude to spherical mercator in [0..1] range\nfunction lngX(lng) {\n return lng / 360 + 0.5;\n}\nfunction latY(lat) {\n const sin = Math.sin(lat * Math.PI / 180);\n const y = (0.5 - 0.25 * Math.log((1 + sin) / (1 - sin)) / Math.PI);\n return y < 0 ? 0 : y > 1 ? 1 : y;\n}\n\n// spherical mercator to longitude/latitude\nfunction xLng(x) {\n return (x - 0.5) * 360;\n}\nfunction yLat(y) {\n const y2 = (180 - y * 360) * Math.PI / 180;\n return 360 * Math.atan(Math.exp(y2)) / Math.PI - 90;\n}\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\n\n/**\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * util class that creates a common set of convenience functions to wrap\n * shared behavior of Advanced Markers and Markers.\n */\nclass MarkerUtils {\n static isAdvancedMarkerAvailable(map) {\n return (google.maps.marker &&\n map.getMapCapabilities().isAdvancedMarkersAvailable === true);\n }\n static isAdvancedMarker(marker) {\n return (google.maps.marker &&\n marker instanceof google.maps.marker.AdvancedMarkerElement);\n }\n static setMap(marker, map) {\n if (this.isAdvancedMarker(marker)) {\n marker.map = map;\n }\n else {\n marker.setMap(map);\n }\n }\n static getPosition(marker) {\n // SuperClusterAlgorithm.calculate expects a LatLng instance so we fake it for Adv Markers\n if (this.isAdvancedMarker(marker)) {\n if (marker.position) {\n if (marker.position instanceof google.maps.LatLng) {\n return marker.position;\n }\n // since we can't cast to LatLngLiteral for reasons =(\n if (marker.position.lat && marker.position.lng) {\n return new google.maps.LatLng(marker.position.lat, marker.position.lng);\n }\n }\n return new google.maps.LatLng(null);\n }\n return marker.getPosition();\n }\n static getVisible(marker) {\n if (this.isAdvancedMarker(marker)) {\n /**\n * Always return true for Advanced Markers because the clusterer\n * uses getVisible as a way to count legacy markers not as an actual\n * indicator of visibility for some reason. Even when markers are hidden\n * Marker.getVisible returns `true` and this is used to set the marker count\n * on the cluster. See the behavior of Cluster.count\n */\n return true;\n }\n return marker.getVisible();\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass Cluster {\n constructor({ markers, position }) {\n this.markers = markers;\n if (position) {\n if (position instanceof google.maps.LatLng) {\n this._position = position;\n }\n else {\n this._position = new google.maps.LatLng(position);\n }\n }\n }\n get bounds() {\n if (this.markers.length === 0 && !this._position) {\n return;\n }\n const bounds = new google.maps.LatLngBounds(this._position, this._position);\n for (const marker of this.markers) {\n bounds.extend(MarkerUtils.getPosition(marker));\n }\n return bounds;\n }\n get position() {\n return this._position || this.bounds.getCenter();\n }\n /**\n * Get the count of **visible** markers.\n */\n get count() {\n return this.markers.filter((m) => MarkerUtils.getVisible(m)).length;\n }\n /**\n * Add a marker to the cluster.\n */\n push(marker) {\n this.markers.push(marker);\n }\n /**\n * Cleanup references and remove marker from map.\n */\n delete() {\n if (this.marker) {\n MarkerUtils.setMap(this.marker, null);\n this.marker = undefined;\n }\n this.markers.length = 0;\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Returns the markers visible in a padded map viewport\n *\n * @param map\n * @param mapCanvasProjection\n * @param markers The list of marker to filter\n * @param viewportPaddingPixels The padding in pixel\n * @returns The list of markers in the padded viewport\n */\nconst filterMarkersToPaddedViewport = (map, mapCanvasProjection, markers, viewportPaddingPixels) => {\n const extendedMapBounds = extendBoundsToPaddedViewport(map.getBounds(), mapCanvasProjection, viewportPaddingPixels);\n return markers.filter((marker) => extendedMapBounds.contains(MarkerUtils.getPosition(marker)));\n};\n/**\n * Extends a bounds by a number of pixels in each direction\n */\nconst extendBoundsToPaddedViewport = (bounds, projection, numPixels) => {\n const { northEast, southWest } = latLngBoundsToPixelBounds(bounds, projection);\n const extendedPixelBounds = extendPixelBounds({ northEast, southWest }, numPixels);\n return pixelBoundsToLatLngBounds(extendedPixelBounds, projection);\n};\n/**\n * Gets the extended bounds as a bbox [westLng, southLat, eastLng, northLat]\n */\nconst getPaddedViewport = (bounds, projection, pixels) => {\n const extended = extendBoundsToPaddedViewport(bounds, projection, pixels);\n const ne = extended.getNorthEast();\n const sw = extended.getSouthWest();\n return [sw.lng(), sw.lat(), ne.lng(), ne.lat()];\n};\n/**\n * Returns the distance between 2 positions.\n *\n * @hidden\n */\nconst distanceBetweenPoints = (p1, p2) => {\n const R = 6371; // Radius of the Earth in km\n const dLat = ((p2.lat - p1.lat) * Math.PI) / 180;\n const dLon = ((p2.lng - p1.lng) * Math.PI) / 180;\n const sinDLat = Math.sin(dLat / 2);\n const sinDLon = Math.sin(dLon / 2);\n const a = sinDLat * sinDLat +\n Math.cos((p1.lat * Math.PI) / 180) *\n Math.cos((p2.lat * Math.PI) / 180) *\n sinDLon *\n sinDLon;\n const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n return R * c;\n};\n/**\n * Converts a LatLng bound to pixels.\n *\n * @hidden\n */\nconst latLngBoundsToPixelBounds = (bounds, projection) => {\n return {\n northEast: projection.fromLatLngToDivPixel(bounds.getNorthEast()),\n southWest: projection.fromLatLngToDivPixel(bounds.getSouthWest()),\n };\n};\n/**\n * Extends a pixel bounds by numPixels in all directions.\n *\n * @hidden\n */\nconst extendPixelBounds = ({ northEast, southWest }, numPixels) => {\n northEast.x += numPixels;\n northEast.y -= numPixels;\n southWest.x -= numPixels;\n southWest.y += numPixels;\n return { northEast, southWest };\n};\n/**\n * @hidden\n */\nconst pixelBoundsToLatLngBounds = ({ northEast, southWest }, projection) => {\n const sw = projection.fromDivPixelToLatLng(southWest);\n const ne = projection.fromDivPixelToLatLng(northEast);\n return new google.maps.LatLngBounds(sw, ne);\n};\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @hidden\n */\nclass AbstractAlgorithm {\n constructor({ maxZoom = 16 }) {\n this.maxZoom = maxZoom;\n }\n /**\n * Helper function to bypass clustering based upon some map state such as\n * zoom, number of markers, etc.\n *\n * ```typescript\n * cluster({markers, map}: AlgorithmInput): Cluster[] {\n * if (shouldBypassClustering(map)) {\n * return this.noop({markers})\n * }\n * }\n * ```\n */\n noop({ markers, }) {\n return noop$1(markers);\n }\n}\n/**\n * Abstract viewport algorithm proves a class to filter markers by a padded\n * viewport. This is a common optimization.\n *\n * @hidden\n */\nclass AbstractViewportAlgorithm extends AbstractAlgorithm {\n constructor(_a) {\n var { viewportPadding = 60 } = _a, options = __rest(_a, [\"viewportPadding\"]);\n super(options);\n this.viewportPadding = 60;\n this.viewportPadding = viewportPadding;\n }\n calculate({ markers, map, mapCanvasProjection, }) {\n if (map.getZoom() >= this.maxZoom) {\n return {\n clusters: this.noop({\n markers,\n }),\n changed: false,\n };\n }\n return {\n clusters: this.cluster({\n markers: filterMarkersToPaddedViewport(map, mapCanvasProjection, markers, this.viewportPadding),\n map,\n mapCanvasProjection,\n }),\n };\n }\n}\n/**\n * @hidden\n */\nconst noop$1 = (markers) => {\n const clusters = markers.map((marker) => new Cluster({\n position: MarkerUtils.getPosition(marker),\n markers: [marker],\n }));\n return clusters;\n};\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The default Grid algorithm historically used in Google Maps marker\n * clustering.\n *\n * The Grid algorithm does not implement caching and markers may flash as the\n * viewport changes. Instead use {@link SuperClusterAlgorithm}.\n */\nclass GridAlgorithm extends AbstractViewportAlgorithm {\n constructor(_a) {\n var { maxDistance = 40000, gridSize = 40 } = _a, options = __rest(_a, [\"maxDistance\", \"gridSize\"]);\n super(options);\n this.clusters = [];\n this.state = { zoom: -1 };\n this.maxDistance = maxDistance;\n this.gridSize = gridSize;\n }\n calculate({ markers, map, mapCanvasProjection, }) {\n const state = { zoom: map.getZoom() };\n let changed = false;\n if (this.state.zoom >= this.maxZoom && state.zoom >= this.maxZoom) ;\n else {\n changed = !equal(this.state, state);\n }\n this.state = state;\n if (map.getZoom() >= this.maxZoom) {\n return {\n clusters: this.noop({\n markers,\n }),\n changed,\n };\n }\n return {\n clusters: this.cluster({\n markers: filterMarkersToPaddedViewport(map, mapCanvasProjection, markers, this.viewportPadding),\n map,\n mapCanvasProjection,\n }),\n };\n }\n cluster({ markers, map, mapCanvasProjection, }) {\n this.clusters = [];\n markers.forEach((marker) => {\n this.addToClosestCluster(marker, map, mapCanvasProjection);\n });\n return this.clusters;\n }\n addToClosestCluster(marker, map, projection) {\n let maxDistance = this.maxDistance; // Some large number\n let cluster = null;\n for (let i = 0; i < this.clusters.length; i++) {\n const candidate = this.clusters[i];\n const distance = distanceBetweenPoints(candidate.bounds.getCenter().toJSON(), MarkerUtils.getPosition(marker).toJSON());\n if (distance < maxDistance) {\n maxDistance = distance;\n cluster = candidate;\n }\n }\n if (cluster &&\n extendBoundsToPaddedViewport(cluster.bounds, projection, this.gridSize).contains(MarkerUtils.getPosition(marker))) {\n cluster.push(marker);\n }\n else {\n const cluster = new Cluster({ markers: [marker] });\n this.clusters.push(cluster);\n }\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Noop algorithm does not generate any clusters or filter markers by the an extended viewport.\n */\nclass NoopAlgorithm extends AbstractAlgorithm {\n constructor(_a) {\n var options = __rest(_a, []);\n super(options);\n }\n calculate({ markers, map, mapCanvasProjection, }) {\n return {\n clusters: this.cluster({ markers, map, mapCanvasProjection }),\n changed: false,\n };\n }\n cluster(input) {\n return this.noop(input);\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A very fast JavaScript algorithm for geospatial point clustering using KD trees.\n *\n * @see https://www.npmjs.com/package/supercluster for more information on options.\n */\nclass SuperClusterAlgorithm extends AbstractAlgorithm {\n constructor(_a) {\n var { maxZoom, radius = 60 } = _a, options = __rest(_a, [\"maxZoom\", \"radius\"]);\n super({ maxZoom });\n this.state = { zoom: -1 };\n this.superCluster = new Supercluster(Object.assign({ maxZoom: this.maxZoom, radius }, options));\n }\n calculate(input) {\n let changed = false;\n const state = { zoom: input.map.getZoom() };\n if (!equal(input.markers, this.markers)) {\n changed = true;\n // TODO use proxy to avoid copy?\n this.markers = [...input.markers];\n const points = this.markers.map((marker) => {\n const position = MarkerUtils.getPosition(marker);\n const coordinates = [position.lng(), position.lat()];\n return {\n type: \"Feature\",\n geometry: {\n type: \"Point\",\n coordinates,\n },\n properties: { marker },\n };\n });\n this.superCluster.load(points);\n }\n if (!changed) {\n if (this.state.zoom <= this.maxZoom || state.zoom <= this.maxZoom) {\n changed = !equal(this.state, state);\n }\n }\n this.state = state;\n if (changed) {\n this.clusters = this.cluster(input);\n }\n return { clusters: this.clusters, changed };\n }\n cluster({ map }) {\n return this.superCluster\n .getClusters([-180, -90, 180, 90], Math.round(map.getZoom()))\n .map((feature) => this.transformCluster(feature));\n }\n transformCluster({ geometry: { coordinates: [lng, lat], }, properties, }) {\n if (properties.cluster) {\n return new Cluster({\n markers: this.superCluster\n .getLeaves(properties.cluster_id, Infinity)\n .map((leaf) => leaf.properties.marker),\n position: { lat, lng },\n });\n }\n const marker = properties.marker;\n return new Cluster({\n markers: [marker],\n position: MarkerUtils.getPosition(marker),\n });\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A very fast JavaScript algorithm for geospatial point clustering using KD trees.\n *\n * @see https://www.npmjs.com/package/supercluster for more information on options.\n */\nclass SuperClusterViewportAlgorithm extends AbstractViewportAlgorithm {\n constructor(_a) {\n var { maxZoom, radius = 60, viewportPadding = 60 } = _a, options = __rest(_a, [\"maxZoom\", \"radius\", \"viewportPadding\"]);\n super({ maxZoom, viewportPadding });\n this.superCluster = new Supercluster(Object.assign({ maxZoom: this.maxZoom, radius }, options));\n this.state = { zoom: -1, view: [0, 0, 0, 0] };\n }\n calculate(input) {\n const state = {\n zoom: Math.round(input.map.getZoom()),\n view: getPaddedViewport(input.map.getBounds(), input.mapCanvasProjection, this.viewportPadding),\n };\n let changed = !equal(this.state, state);\n if (!equal(input.markers, this.markers)) {\n changed = true;\n // TODO use proxy to avoid copy?\n this.markers = [...input.markers];\n const points = this.markers.map((marker) => {\n const position = MarkerUtils.getPosition(marker);\n const coordinates = [position.lng(), position.lat()];\n return {\n type: \"Feature\",\n geometry: {\n type: \"Point\",\n coordinates,\n },\n properties: { marker },\n };\n });\n this.superCluster.load(points);\n }\n if (changed) {\n this.clusters = this.cluster(input);\n this.state = state;\n }\n return { clusters: this.clusters, changed };\n }\n cluster({ map, mapCanvasProjection }) {\n /* recalculate new state because we can't use the cached version. */\n const state = {\n zoom: Math.round(map.getZoom()),\n view: getPaddedViewport(map.getBounds(), mapCanvasProjection, this.viewportPadding),\n };\n return this.superCluster\n .getClusters(state.view, state.zoom)\n .map((feature) => this.transformCluster(feature));\n }\n transformCluster({ geometry: { coordinates: [lng, lat], }, properties, }) {\n if (properties.cluster) {\n return new Cluster({\n markers: this.superCluster\n .getLeaves(properties.cluster_id, Infinity)\n .map((leaf) => leaf.properties.marker),\n position: { lat, lng },\n });\n }\n const marker = properties.marker;\n return new Cluster({\n markers: [marker],\n position: MarkerUtils.getPosition(marker),\n });\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Provides statistics on all clusters in the current render cycle for use in {@link Renderer.render}.\n */\nclass ClusterStats {\n constructor(markers, clusters) {\n this.markers = { sum: markers.length };\n const clusterMarkerCounts = clusters.map((a) => a.count);\n const clusterMarkerSum = clusterMarkerCounts.reduce((a, b) => a + b, 0);\n this.clusters = {\n count: clusters.length,\n markers: {\n mean: clusterMarkerSum / clusters.length,\n sum: clusterMarkerSum,\n min: Math.min(...clusterMarkerCounts),\n max: Math.max(...clusterMarkerCounts),\n },\n };\n }\n}\nclass DefaultRenderer {\n /**\n * The default render function for the library used by {@link MarkerClusterer}.\n *\n * Currently set to use the following:\n *\n * ```typescript\n * // change color if this cluster has more markers than the mean cluster\n * const color =\n * count > Math.max(10, stats.clusters.markers.mean)\n * ? \"#ff0000\"\n * : \"#0000ff\";\n *\n * // create svg url with fill color\n * const svg = window.btoa(`\n * \n * \n * \n * \n * \n * `);\n *\n * // create marker using svg icon\n * return new google.maps.Marker({\n * position,\n * icon: {\n * url: `data:image/svg+xml;base64,${svg}`,\n * scaledSize: new google.maps.Size(45, 45),\n * },\n * label: {\n * text: String(count),\n * color: \"rgba(255,255,255,0.9)\",\n * fontSize: \"12px\",\n * },\n * // adjust zIndex to be above other markers\n * zIndex: 1000 + count,\n * });\n * ```\n */\n render({ count, position }, stats, map) {\n // change color if this cluster has more markers than the mean cluster\n const color = count > Math.max(10, stats.clusters.markers.mean) ? \"#ff0000\" : \"#0000ff\";\n // create svg literal with fill color\n const svg = `\n\n\n\n${count}\n`;\n const title = `Cluster of ${count} markers`, \n // adjust zIndex to be above other markers\n zIndex = Number(google.maps.Marker.MAX_ZINDEX) + count;\n if (MarkerUtils.isAdvancedMarkerAvailable(map)) {\n // create cluster SVG element\n const parser = new DOMParser();\n const svgEl = parser.parseFromString(svg, \"image/svg+xml\").documentElement;\n svgEl.setAttribute(\"transform\", \"translate(0 25)\");\n const clusterOptions = {\n map,\n position,\n zIndex,\n title,\n content: svgEl,\n };\n return new google.maps.marker.AdvancedMarkerElement(clusterOptions);\n }\n const clusterOptions = {\n position,\n zIndex,\n title,\n icon: {\n url: `data:image/svg+xml;base64,${btoa(svg)}`,\n anchor: new google.maps.Point(25, 25),\n },\n };\n return new google.maps.Marker(clusterOptions);\n }\n}\n\n/**\n * Copyright 2019 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Extends an object's prototype by another's.\n *\n * @param type1 The Type to be extended.\n * @param type2 The Type to extend with.\n * @ignore\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction extend(type1, type2) {\n /* istanbul ignore next */\n // eslint-disable-next-line prefer-const\n for (let property in type2.prototype) {\n type1.prototype[property] = type2.prototype[property];\n }\n}\n/**\n * @ignore\n */\nclass OverlayViewSafe {\n constructor() {\n // MarkerClusterer implements google.maps.OverlayView interface. We use the\n // extend function to extend MarkerClusterer with google.maps.OverlayView\n // because it might not always be available when the code is defined so we\n // look for it at the last possible moment. If it doesn't exist now then\n // there is no point going ahead :)\n extend(OverlayViewSafe, google.maps.OverlayView);\n }\n}\n\n/**\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar MarkerClustererEvents;\n(function (MarkerClustererEvents) {\n MarkerClustererEvents[\"CLUSTERING_BEGIN\"] = \"clusteringbegin\";\n MarkerClustererEvents[\"CLUSTERING_END\"] = \"clusteringend\";\n MarkerClustererEvents[\"CLUSTER_CLICK\"] = \"click\";\n})(MarkerClustererEvents || (MarkerClustererEvents = {}));\nconst defaultOnClusterClickHandler = (_, cluster, map) => {\n map.fitBounds(cluster.bounds);\n};\n/**\n * MarkerClusterer creates and manages per-zoom-level clusters for large amounts\n * of markers. See {@link MarkerClustererOptions} for more details.\n *\n */\nclass MarkerClusterer extends OverlayViewSafe {\n constructor({ map, markers = [], algorithmOptions = {}, algorithm = new SuperClusterAlgorithm(algorithmOptions), renderer = new DefaultRenderer(), onClusterClick = defaultOnClusterClickHandler, }) {\n super();\n this.markers = [...markers];\n this.clusters = [];\n this.algorithm = algorithm;\n this.renderer = renderer;\n this.onClusterClick = onClusterClick;\n if (map) {\n this.setMap(map);\n }\n }\n addMarker(marker, noDraw) {\n if (this.markers.includes(marker)) {\n return;\n }\n this.markers.push(marker);\n if (!noDraw) {\n this.render();\n }\n }\n addMarkers(markers, noDraw) {\n markers.forEach((marker) => {\n this.addMarker(marker, true);\n });\n if (!noDraw) {\n this.render();\n }\n }\n removeMarker(marker, noDraw) {\n const index = this.markers.indexOf(marker);\n if (index === -1) {\n // Marker is not in our list of markers, so do nothing:\n return false;\n }\n MarkerUtils.setMap(marker, null);\n this.markers.splice(index, 1); // Remove the marker from the list of managed markers\n if (!noDraw) {\n this.render();\n }\n return true;\n }\n removeMarkers(markers, noDraw) {\n let removed = false;\n markers.forEach((marker) => {\n removed = this.removeMarker(marker, true) || removed;\n });\n if (removed && !noDraw) {\n this.render();\n }\n return removed;\n }\n clearMarkers(noDraw) {\n this.markers.length = 0;\n if (!noDraw) {\n this.render();\n }\n }\n /**\n * Recalculates and draws all the marker clusters.\n */\n render() {\n const map = this.getMap();\n if (map instanceof google.maps.Map && map.getProjection()) {\n google.maps.event.trigger(this, MarkerClustererEvents.CLUSTERING_BEGIN, this);\n const { clusters, changed } = this.algorithm.calculate({\n markers: this.markers,\n map,\n mapCanvasProjection: this.getProjection(),\n });\n // Allow algorithms to return flag on whether the clusters/markers have changed.\n if (changed || changed == undefined) {\n // Accumulate the markers of the clusters composed of a single marker.\n // Those clusters directly use the marker.\n // Clusters with more than one markers use a group marker generated by a renderer.\n const singleMarker = new Set();\n for (const cluster of clusters) {\n if (cluster.markers.length == 1) {\n singleMarker.add(cluster.markers[0]);\n }\n }\n const groupMarkers = [];\n // Iterate the clusters that are currently rendered.\n for (const cluster of this.clusters) {\n if (cluster.marker == null) {\n continue;\n }\n if (cluster.markers.length == 1) {\n if (!singleMarker.has(cluster.marker)) {\n // The marker:\n // - was previously rendered because it is from a cluster with 1 marker,\n // - should no more be rendered as it is not in singleMarker.\n MarkerUtils.setMap(cluster.marker, null);\n }\n }\n else {\n // Delay the removal of old group markers to avoid flickering.\n groupMarkers.push(cluster.marker);\n }\n }\n this.clusters = clusters;\n this.renderClusters();\n // Delayed removal of the markers of the former groups.\n requestAnimationFrame(() => groupMarkers.forEach((marker) => MarkerUtils.setMap(marker, null)));\n }\n google.maps.event.trigger(this, MarkerClustererEvents.CLUSTERING_END, this);\n }\n }\n onAdd() {\n this.idleListener = this.getMap().addListener(\"idle\", this.render.bind(this));\n this.render();\n }\n onRemove() {\n google.maps.event.removeListener(this.idleListener);\n this.reset();\n }\n reset() {\n this.markers.forEach((marker) => MarkerUtils.setMap(marker, null));\n this.clusters.forEach((cluster) => cluster.delete());\n this.clusters = [];\n }\n renderClusters() {\n // Generate stats to pass to renderers.\n const stats = new ClusterStats(this.markers, this.clusters);\n const map = this.getMap();\n this.clusters.forEach((cluster) => {\n if (cluster.markers.length === 1) {\n cluster.marker = cluster.markers[0];\n }\n else {\n // Generate the marker to represent the group.\n cluster.marker = this.renderer.render(cluster, stats, map);\n // Make sure all individual markers are removed from the map.\n cluster.markers.forEach((marker) => MarkerUtils.setMap(marker, null));\n if (this.onClusterClick) {\n cluster.marker.addListener(\"click\", \n /* istanbul ignore next */\n (event) => {\n google.maps.event.trigger(this, MarkerClustererEvents.CLUSTER_CLICK, cluster);\n this.onClusterClick(event, cluster, map);\n });\n }\n }\n MarkerUtils.setMap(cluster.marker, map);\n });\n }\n}\n\nvar index_esm = /*#__PURE__*/Object.freeze({\n __proto__: null,\n AbstractAlgorithm: AbstractAlgorithm,\n AbstractViewportAlgorithm: AbstractViewportAlgorithm,\n Cluster: Cluster,\n ClusterStats: ClusterStats,\n DefaultRenderer: DefaultRenderer,\n GridAlgorithm: GridAlgorithm,\n MarkerClusterer: MarkerClusterer,\n get MarkerClustererEvents () { return MarkerClustererEvents; },\n MarkerUtils: MarkerUtils,\n NoopAlgorithm: NoopAlgorithm,\n SuperClusterAlgorithm: SuperClusterAlgorithm,\n SuperClusterViewportAlgorithm: SuperClusterViewportAlgorithm,\n defaultOnClusterClickHandler: defaultOnClusterClickHandler,\n distanceBetweenPoints: distanceBetweenPoints,\n extendBoundsToPaddedViewport: extendBoundsToPaddedViewport,\n extendPixelBounds: extendPixelBounds,\n filterMarkersToPaddedViewport: filterMarkersToPaddedViewport,\n getPaddedViewport: getPaddedViewport,\n noop: noop$1,\n pixelBoundsToLatLngBounds: pixelBoundsToLatLngBounds\n});\n\nfunction useGoogleMarkerClusterer(options) {\n var map = useGoogleMap();\n var _a = useState(null), markerClusterer = _a[0], setMarkerClusterer = _a[1];\n useEffect(function () {\n if (map && markerClusterer === null) {\n var markerCluster = new MarkerClusterer(__assign(__assign({}, options), { map: map }));\n setMarkerClusterer(markerCluster);\n }\n }, [map]);\n return markerClusterer;\n}\n/** Wrapper around [@googlemaps/markerclusterer](https://github.com/googlemaps/js-markerclusterer)\n *\n * Accepts {@link MarkerClustererOptionsSubset} which is a subset of {@link MarkerClustererOptions}\n */\nfunction GoogleMarkerClusterer(_a) {\n var children = _a.children, options = _a.options;\n var markerClusterer = useGoogleMarkerClusterer(options);\n return markerClusterer !== null ? children(markerClusterer) : null;\n}\nvar GoogleMarkerClusterer$1 = memo(GoogleMarkerClusterer);\n\nvar eventMap$c = {\n onCloseClick: 'closeclick',\n onContentChanged: 'content_changed',\n onDomReady: 'domready',\n onPositionChanged: 'position_changed',\n onZindexChanged: 'zindex_changed',\n};\nvar updaterMap$c = {\n options: function (instance, options) {\n instance.setOptions(options);\n },\n position: function (instance, position) {\n instance.setPosition(position);\n },\n zIndex: function (instance, zIndex) {\n instance.setZIndex(zIndex);\n },\n};\nfunction InfoWindowFunctional(_a) {\n var children = _a.children, anchor = _a.anchor, options = _a.options, position = _a.position, zIndex = _a.zIndex, onCloseClick = _a.onCloseClick, onDomReady = _a.onDomReady, onContentChanged = _a.onContentChanged, onPositionChanged = _a.onPositionChanged, onZindexChanged = _a.onZindexChanged, onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n var _c = useState(null), closeclickListener = _c[0], setCloseClickListener = _c[1];\n var _d = useState(null), domreadyclickListener = _d[0], setDomReadyClickListener = _d[1];\n var _e = useState(null), contentchangedclickListener = _e[0], setContentChangedClickListener = _e[1];\n var _f = useState(null), positionchangedclickListener = _f[0], setPositionChangedClickListener = _f[1];\n var _g = useState(null), zindexchangedclickListener = _g[0], setZindexChangedClickListener = _g[1];\n var containerElementRef = useRef(null);\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.close();\n if (anchor) {\n instance.open(map, anchor);\n }\n else if (instance.getPosition()) {\n instance.open(map);\n }\n }\n }, [map, instance, anchor]);\n useEffect(function () {\n if (options && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n if (position && instance !== null) {\n instance.setPosition(position);\n }\n }, [position]);\n useEffect(function () {\n if (typeof zIndex === 'number' && instance !== null) {\n instance.setZIndex(zIndex);\n }\n }, [zIndex]);\n useEffect(function () {\n if (instance && onCloseClick) {\n if (closeclickListener !== null) {\n google.maps.event.removeListener(closeclickListener);\n }\n setCloseClickListener(google.maps.event.addListener(instance, 'closeclick', onCloseClick));\n }\n }, [onCloseClick]);\n useEffect(function () {\n if (instance && onDomReady) {\n if (domreadyclickListener !== null) {\n google.maps.event.removeListener(domreadyclickListener);\n }\n setDomReadyClickListener(google.maps.event.addListener(instance, 'domready', onDomReady));\n }\n }, [onDomReady]);\n useEffect(function () {\n if (instance && onContentChanged) {\n if (contentchangedclickListener !== null) {\n google.maps.event.removeListener(contentchangedclickListener);\n }\n setContentChangedClickListener(google.maps.event.addListener(instance, 'content_changed', onContentChanged));\n }\n }, [onContentChanged]);\n useEffect(function () {\n if (instance && onPositionChanged) {\n if (positionchangedclickListener !== null) {\n google.maps.event.removeListener(positionchangedclickListener);\n }\n setPositionChangedClickListener(google.maps.event.addListener(instance, 'position_changed', onPositionChanged));\n }\n }, [onPositionChanged]);\n useEffect(function () {\n if (instance && onZindexChanged) {\n if (zindexchangedclickListener !== null) {\n google.maps.event.removeListener(zindexchangedclickListener);\n }\n setZindexChangedClickListener(google.maps.event.addListener(instance, 'zindex_changed', onZindexChanged));\n }\n }, [onZindexChanged]);\n useEffect(function () {\n var infoWindow = new google.maps.InfoWindow(__assign({}, (options || {})));\n setInstance(infoWindow);\n containerElementRef.current = document.createElement('div');\n if (onCloseClick) {\n setCloseClickListener(google.maps.event.addListener(infoWindow, 'closeclick', onCloseClick));\n }\n if (onDomReady) {\n setDomReadyClickListener(google.maps.event.addListener(infoWindow, 'domready', onDomReady));\n }\n if (onContentChanged) {\n setContentChangedClickListener(google.maps.event.addListener(infoWindow, 'content_changed', onContentChanged));\n }\n if (onPositionChanged) {\n setPositionChangedClickListener(google.maps.event.addListener(infoWindow, 'position_changed', onPositionChanged));\n }\n if (onZindexChanged) {\n setZindexChangedClickListener(google.maps.event.addListener(infoWindow, 'zindex_changed', onZindexChanged));\n }\n infoWindow.setContent(containerElementRef.current);\n if (position) {\n infoWindow.setPosition(position);\n }\n if (zIndex) {\n infoWindow.setZIndex(zIndex);\n }\n if (anchor) {\n infoWindow.open(map, anchor);\n }\n else if (infoWindow.getPosition()) {\n infoWindow.open(map);\n }\n else {\n invariant$1(false, \"You must provide either an anchor (typically render it inside a ) or a position props for .\");\n }\n if (onLoad) {\n onLoad(infoWindow);\n }\n return function () {\n if (closeclickListener) {\n google.maps.event.removeListener(closeclickListener);\n }\n if (contentchangedclickListener) {\n google.maps.event.removeListener(contentchangedclickListener);\n }\n if (domreadyclickListener) {\n google.maps.event.removeListener(domreadyclickListener);\n }\n if (positionchangedclickListener) {\n google.maps.event.removeListener(positionchangedclickListener);\n }\n if (zindexchangedclickListener) {\n google.maps.event.removeListener(zindexchangedclickListener);\n }\n if (onUnmount) {\n onUnmount(infoWindow);\n }\n infoWindow.close();\n };\n }, []);\n return containerElementRef.current ? (createPortal(Children.only(children), containerElementRef.current)) : (null);\n}\nvar InfoWindowF = memo(InfoWindowFunctional);\nvar InfoWindow = /** @class */ (function (_super) {\n __extends(InfoWindow, _super);\n function InfoWindow() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.containerElement = null;\n _this.state = {\n infoWindow: null,\n };\n _this.open = function (infoWindow, anchor) {\n if (anchor) {\n infoWindow.open(_this.context, anchor);\n }\n else if (infoWindow.getPosition()) {\n infoWindow.open(_this.context);\n }\n else {\n invariant$1(false, \"You must provide either an anchor (typically render it inside a ) or a position props for .\");\n }\n };\n _this.setInfoWindowCallback = function () {\n if (_this.state.infoWindow !== null && _this.containerElement !== null) {\n _this.state.infoWindow.setContent(_this.containerElement);\n _this.open(_this.state.infoWindow, _this.props.anchor);\n if (_this.props.onLoad) {\n _this.props.onLoad(_this.state.infoWindow);\n }\n }\n };\n return _this;\n }\n InfoWindow.prototype.componentDidMount = function () {\n var infoWindow = new google.maps.InfoWindow(__assign({}, (this.props.options || {})));\n this.containerElement = document.createElement('div');\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$c,\n eventMap: eventMap$c,\n prevProps: {},\n nextProps: this.props,\n instance: infoWindow,\n });\n this.setState(function () {\n return {\n infoWindow: infoWindow,\n };\n }, this.setInfoWindowCallback);\n };\n InfoWindow.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.infoWindow !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$c,\n eventMap: eventMap$c,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.infoWindow,\n });\n }\n };\n InfoWindow.prototype.componentWillUnmount = function () {\n if (this.state.infoWindow !== null) {\n unregisterEvents(this.registeredEvents);\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.infoWindow);\n }\n this.state.infoWindow.close();\n }\n };\n InfoWindow.prototype.render = function () {\n return this.containerElement ? (createPortal(Children.only(this.props.children), this.containerElement)) : (null);\n };\n InfoWindow.contextType = MapContext;\n return InfoWindow;\n}(PureComponent));\n\nvar eventMap$b = {\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n};\nvar updaterMap$b = {\n draggable: function (instance, draggable) {\n instance.setDraggable(draggable);\n },\n editable: function (instance, editable) {\n instance.setEditable(editable);\n },\n map: function (instance, map) {\n instance.setMap(map);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n path: function (instance, path) {\n instance.setPath(path);\n },\n visible: function (instance, visible) {\n instance.setVisible(visible);\n },\n};\nvar defaultOptions$1 = {};\nfunction PolylineFunctional(_a) {\n var options = _a.options, draggable = _a.draggable, editable = _a.editable, visible = _a.visible, path = _a.path, onDblClick = _a.onDblClick, onDragEnd = _a.onDragEnd, onDragStart = _a.onDragStart, onMouseDown = _a.onMouseDown, onMouseMove = _a.onMouseMove, onMouseOut = _a.onMouseOut, onMouseOver = _a.onMouseOver, onMouseUp = _a.onMouseUp, onRightClick = _a.onRightClick, onClick = _a.onClick, onDrag = _a.onDrag, onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n var _c = useState(null), dblclickListener = _c[0], setDblclickListener = _c[1];\n var _d = useState(null), dragendListener = _d[0], setDragendListener = _d[1];\n var _e = useState(null), dragstartListener = _e[0], setDragstartListener = _e[1];\n var _f = useState(null), mousedownListener = _f[0], setMousedownListener = _f[1];\n var _g = useState(null), mousemoveListener = _g[0], setMousemoveListener = _g[1];\n var _h = useState(null), mouseoutListener = _h[0], setMouseoutListener = _h[1];\n var _j = useState(null), mouseoverListener = _j[0], setMouseoverListener = _j[1];\n var _k = useState(null), mouseupListener = _k[0], setMouseupListener = _k[1];\n var _l = useState(null), rightclickListener = _l[0], setRightclickListener = _l[1];\n var _m = useState(null), clickListener = _m[0], setClickListener = _m[1];\n var _o = useState(null), dragListener = _o[0], setDragListener = _o[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (typeof options !== 'undefined' && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n if (typeof draggable !== 'undefined' && instance !== null) {\n instance.setDraggable(draggable);\n }\n }, [instance, draggable]);\n useEffect(function () {\n if (typeof editable !== 'undefined' && instance !== null) {\n instance.setEditable(editable);\n }\n }, [instance, editable]);\n useEffect(function () {\n if (typeof visible !== 'undefined' && instance !== null) {\n instance.setVisible(visible);\n }\n }, [instance, visible]);\n useEffect(function () {\n if (typeof path !== 'undefined' && instance !== null) {\n instance.setPath(path);\n }\n }, [instance, path]);\n useEffect(function () {\n if (instance && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(instance, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(function () {\n if (instance && onDragEnd) {\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n setDragendListener(google.maps.event.addListener(instance, 'dragend', onDragEnd));\n }\n }, [onDragEnd]);\n useEffect(function () {\n if (instance && onDragStart) {\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n setDragstartListener(google.maps.event.addListener(instance, 'dragstart', onDragStart));\n }\n }, [onDragStart]);\n useEffect(function () {\n if (instance && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(instance, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(function () {\n if (instance && onMouseMove) {\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n setMousemoveListener(google.maps.event.addListener(instance, 'mousemove', onMouseMove));\n }\n }, [onMouseMove]);\n useEffect(function () {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(function () {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(function () {\n if (instance && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(instance, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(function () {\n if (instance && onRightClick) {\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n setRightclickListener(google.maps.event.addListener(instance, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(function () {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, 'click', onClick));\n }\n }, [onClick]);\n useEffect(function () {\n if (instance && onDrag) {\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n setDragListener(google.maps.event.addListener(instance, 'drag', onDrag));\n }\n }, [onDrag]);\n useEffect(function () {\n var polyline = new google.maps.Polyline(__assign(__assign({}, (options || defaultOptions$1)), { map: map }));\n if (path) {\n polyline.setPath(path);\n }\n if (typeof visible !== 'undefined') {\n polyline.setVisible(visible);\n }\n if (typeof editable !== 'undefined') {\n polyline.setEditable(editable);\n }\n if (typeof draggable !== 'undefined') {\n polyline.setDraggable(draggable);\n }\n if (onDblClick) {\n setDblclickListener(google.maps.event.addListener(polyline, 'dblclick', onDblClick));\n }\n if (onDragEnd) {\n setDragendListener(google.maps.event.addListener(polyline, 'dragend', onDragEnd));\n }\n if (onDragStart) {\n setDragstartListener(google.maps.event.addListener(polyline, 'dragstart', onDragStart));\n }\n if (onMouseDown) {\n setMousedownListener(google.maps.event.addListener(polyline, 'mousedown', onMouseDown));\n }\n if (onMouseMove) {\n setMousemoveListener(google.maps.event.addListener(polyline, 'mousemove', onMouseMove));\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(polyline, 'mouseout', onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(polyline, 'mouseover', onMouseOver));\n }\n if (onMouseUp) {\n setMouseupListener(google.maps.event.addListener(polyline, 'mouseup', onMouseUp));\n }\n if (onRightClick) {\n setRightclickListener(google.maps.event.addListener(polyline, 'rightclick', onRightClick));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(polyline, 'click', onClick));\n }\n if (onDrag) {\n setDragListener(google.maps.event.addListener(polyline, 'drag', onDrag));\n }\n setInstance(polyline);\n if (onLoad) {\n onLoad(polyline);\n }\n return function () {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (onUnmount) {\n onUnmount(polyline);\n }\n polyline.setMap(null);\n };\n }, []);\n return null;\n}\nvar PolylineF = memo(PolylineFunctional);\nvar Polyline = /** @class */ (function (_super) {\n __extends(Polyline, _super);\n function Polyline() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n polyline: null,\n };\n _this.setPolylineCallback = function () {\n if (_this.state.polyline !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.polyline);\n }\n };\n return _this;\n }\n Polyline.prototype.componentDidMount = function () {\n var polyline = new google.maps.Polyline(__assign(__assign({}, (this.props.options || {})), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$b,\n eventMap: eventMap$b,\n prevProps: {},\n nextProps: this.props,\n instance: polyline,\n });\n this.setState(function setPolyline() {\n return {\n polyline: polyline,\n };\n }, this.setPolylineCallback);\n };\n Polyline.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.polyline !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$b,\n eventMap: eventMap$b,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.polyline,\n });\n }\n };\n Polyline.prototype.componentWillUnmount = function () {\n if (this.state.polyline !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.polyline);\n }\n unregisterEvents(this.registeredEvents);\n this.state.polyline.setMap(null);\n }\n };\n Polyline.prototype.render = function () {\n return null;\n };\n Polyline.contextType = MapContext;\n return Polyline;\n}(PureComponent));\n\nvar eventMap$a = {\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n};\nvar updaterMap$a = {\n draggable: function (instance, draggable) {\n instance.setDraggable(draggable);\n },\n editable: function (instance, editable) {\n instance.setEditable(editable);\n },\n map: function (instance, map) {\n instance.setMap(map);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n path: function (instance, path) {\n instance.setPath(path);\n },\n paths: function (instance, paths) {\n instance.setPaths(paths);\n },\n visible: function (instance, visible) {\n instance.setVisible(visible);\n },\n};\nfunction PolygonFunctional(_a) {\n var options = _a.options, draggable = _a.draggable, editable = _a.editable, visible = _a.visible, path = _a.path, paths = _a.paths, onDblClick = _a.onDblClick, onDragEnd = _a.onDragEnd, onDragStart = _a.onDragStart, onMouseDown = _a.onMouseDown, onMouseMove = _a.onMouseMove, onMouseOut = _a.onMouseOut, onMouseOver = _a.onMouseOver, onMouseUp = _a.onMouseUp, onRightClick = _a.onRightClick, onClick = _a.onClick, onDrag = _a.onDrag, onLoad = _a.onLoad, onUnmount = _a.onUnmount, onEdit = _a.onEdit;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n var _c = useState(null), dblclickListener = _c[0], setDblclickListener = _c[1];\n var _d = useState(null), dragendListener = _d[0], setDragendListener = _d[1];\n var _e = useState(null), dragstartListener = _e[0], setDragstartListener = _e[1];\n var _f = useState(null), mousedownListener = _f[0], setMousedownListener = _f[1];\n var _g = useState(null), mousemoveListener = _g[0], setMousemoveListener = _g[1];\n var _h = useState(null), mouseoutListener = _h[0], setMouseoutListener = _h[1];\n var _j = useState(null), mouseoverListener = _j[0], setMouseoverListener = _j[1];\n var _k = useState(null), mouseupListener = _k[0], setMouseupListener = _k[1];\n var _l = useState(null), rightclickListener = _l[0], setRightclickListener = _l[1];\n var _m = useState(null), clickListener = _m[0], setClickListener = _m[1];\n var _o = useState(null), dragListener = _o[0], setDragListener = _o[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (typeof options !== 'undefined' && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n if (typeof draggable !== 'undefined' && instance !== null) {\n instance.setDraggable(draggable);\n }\n }, [instance, draggable]);\n useEffect(function () {\n if (typeof editable !== 'undefined' && instance !== null) {\n instance.setEditable(editable);\n }\n }, [instance, editable]);\n useEffect(function () {\n if (typeof visible !== 'undefined' && instance !== null) {\n instance.setVisible(visible);\n }\n }, [instance, visible]);\n useEffect(function () {\n if (typeof path !== 'undefined' && instance !== null) {\n instance.setPath(path);\n }\n }, [instance, path]);\n useEffect(function () {\n if (typeof paths !== 'undefined' && instance !== null) {\n instance.setPaths(paths);\n }\n }, [instance, paths]);\n useEffect(function () {\n if (instance && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(instance, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(function () {\n if (instance) {\n google.maps.event.addListener(instance.getPath(), 'insert_at', function () {\n onEdit === null || onEdit === void 0 ? void 0 : onEdit(instance);\n });\n google.maps.event.addListener(instance.getPath(), 'set_at', function () {\n onEdit === null || onEdit === void 0 ? void 0 : onEdit(instance);\n });\n }\n }, [instance, onEdit]);\n useEffect(function () {\n if (instance && onDragEnd) {\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n setDragendListener(google.maps.event.addListener(instance, 'dragend', onDragEnd));\n }\n }, [onDragEnd]);\n useEffect(function () {\n if (instance && onDragStart) {\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n setDragstartListener(google.maps.event.addListener(instance, 'dragstart', onDragStart));\n }\n }, [onDragStart]);\n useEffect(function () {\n if (instance && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(instance, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(function () {\n if (instance && onMouseMove) {\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n setMousemoveListener(google.maps.event.addListener(instance, 'mousemove', onMouseMove));\n }\n }, [onMouseMove]);\n useEffect(function () {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(function () {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(function () {\n if (instance && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(instance, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(function () {\n if (instance && onRightClick) {\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n setRightclickListener(google.maps.event.addListener(instance, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(function () {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, 'click', onClick));\n }\n }, [onClick]);\n useEffect(function () {\n if (instance && onDrag) {\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n setDragListener(google.maps.event.addListener(instance, 'drag', onDrag));\n }\n }, [onDrag]);\n useEffect(function () {\n var polygon = new google.maps.Polygon(__assign(__assign({}, (options || {})), { map: map }));\n if (path) {\n polygon.setPath(path);\n }\n if (paths) {\n polygon.setPaths(paths);\n }\n if (typeof visible !== 'undefined') {\n polygon.setVisible(visible);\n }\n if (typeof editable !== 'undefined') {\n polygon.setEditable(editable);\n }\n if (typeof draggable !== 'undefined') {\n polygon.setDraggable(draggable);\n }\n if (onDblClick) {\n setDblclickListener(google.maps.event.addListener(polygon, 'dblclick', onDblClick));\n }\n if (onDragEnd) {\n setDragendListener(google.maps.event.addListener(polygon, 'dragend', onDragEnd));\n }\n if (onDragStart) {\n setDragstartListener(google.maps.event.addListener(polygon, 'dragstart', onDragStart));\n }\n if (onMouseDown) {\n setMousedownListener(google.maps.event.addListener(polygon, 'mousedown', onMouseDown));\n }\n if (onMouseMove) {\n setMousemoveListener(google.maps.event.addListener(polygon, 'mousemove', onMouseMove));\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(polygon, 'mouseout', onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(polygon, 'mouseover', onMouseOver));\n }\n if (onMouseUp) {\n setMouseupListener(google.maps.event.addListener(polygon, 'mouseup', onMouseUp));\n }\n if (onRightClick) {\n setRightclickListener(google.maps.event.addListener(polygon, 'rightclick', onRightClick));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(polygon, 'click', onClick));\n }\n if (onDrag) {\n setDragListener(google.maps.event.addListener(polygon, 'drag', onDrag));\n }\n setInstance(polygon);\n if (onLoad) {\n onLoad(polygon);\n }\n return function () {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (onUnmount) {\n onUnmount(polygon);\n }\n polygon.setMap(null);\n };\n }, []);\n return null;\n}\nvar PolygonF = memo(PolygonFunctional);\nvar Polygon = /** @class */ (function (_super) {\n __extends(Polygon, _super);\n function Polygon() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n polygon: null,\n };\n _this.setPolygonCallback = function () {\n if (_this.state.polygon !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.polygon);\n }\n };\n return _this;\n }\n Polygon.prototype.componentDidMount = function () {\n var polygon = new google.maps.Polygon(__assign(__assign({}, (this.props.options || {})), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$a,\n eventMap: eventMap$a,\n prevProps: {},\n nextProps: this.props,\n instance: polygon,\n });\n this.setState(function setPolygon() {\n return {\n polygon: polygon,\n };\n }, this.setPolygonCallback);\n };\n Polygon.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.polygon !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$a,\n eventMap: eventMap$a,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.polygon,\n });\n }\n };\n Polygon.prototype.componentWillUnmount = function () {\n if (this.state.polygon !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.polygon);\n }\n unregisterEvents(this.registeredEvents);\n this.state.polygon && this.state.polygon.setMap(null);\n }\n };\n Polygon.prototype.render = function () {\n return null;\n };\n Polygon.contextType = MapContext;\n return Polygon;\n}(PureComponent));\n\nvar eventMap$9 = {\n onBoundsChanged: 'bounds_changed',\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n};\nvar updaterMap$9 = {\n bounds: function (instance, bounds) {\n instance.setBounds(bounds);\n },\n draggable: function (instance, draggable) {\n instance.setDraggable(draggable);\n },\n editable: function (instance, editable) {\n instance.setEditable(editable);\n },\n map: function (instance, map) {\n instance.setMap(map);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n visible: function (instance, visible) {\n instance.setVisible(visible);\n },\n};\nfunction RectangleFunctional(_a) {\n var options = _a.options, bounds = _a.bounds, draggable = _a.draggable, editable = _a.editable, visible = _a.visible, onDblClick = _a.onDblClick, onDragEnd = _a.onDragEnd, onDragStart = _a.onDragStart, onMouseDown = _a.onMouseDown, onMouseMove = _a.onMouseMove, onMouseOut = _a.onMouseOut, onMouseOver = _a.onMouseOver, onMouseUp = _a.onMouseUp, onRightClick = _a.onRightClick, onClick = _a.onClick, onDrag = _a.onDrag, onBoundsChanged = _a.onBoundsChanged, onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n var _c = useState(null), dblclickListener = _c[0], setDblclickListener = _c[1];\n var _d = useState(null), dragendListener = _d[0], setDragendListener = _d[1];\n var _e = useState(null), dragstartListener = _e[0], setDragstartListener = _e[1];\n var _f = useState(null), mousedownListener = _f[0], setMousedownListener = _f[1];\n var _g = useState(null), mousemoveListener = _g[0], setMousemoveListener = _g[1];\n var _h = useState(null), mouseoutListener = _h[0], setMouseoutListener = _h[1];\n var _j = useState(null), mouseoverListener = _j[0], setMouseoverListener = _j[1];\n var _k = useState(null), mouseupListener = _k[0], setMouseupListener = _k[1];\n var _l = useState(null), rightClickListener = _l[0], setRightClickListener = _l[1];\n var _m = useState(null), clickListener = _m[0], setClickListener = _m[1];\n var _o = useState(null), dragListener = _o[0], setDragListener = _o[1];\n var _p = useState(null), boundsChangedListener = _p[0], setBoundsChangedListener = _p[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (typeof options !== 'undefined' && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n if (typeof draggable !== 'undefined' && instance !== null) {\n instance.setDraggable(draggable);\n }\n }, [instance, draggable]);\n useEffect(function () {\n if (typeof editable !== 'undefined' && instance !== null) {\n instance.setEditable(editable);\n }\n }, [instance, editable]);\n useEffect(function () {\n if (typeof visible !== 'undefined' && instance !== null) {\n instance.setVisible(visible);\n }\n }, [instance, visible]);\n useEffect(function () {\n if (typeof bounds !== 'undefined' && instance !== null) {\n instance.setBounds(bounds);\n }\n }, [instance, bounds]);\n useEffect(function () {\n if (instance && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(instance, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(function () {\n if (instance && onDragEnd) {\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n setDragendListener(google.maps.event.addListener(instance, 'dragend', onDragEnd));\n }\n }, [onDragEnd]);\n useEffect(function () {\n if (instance && onDragStart) {\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n setDragstartListener(google.maps.event.addListener(instance, 'dragstart', onDragStart));\n }\n }, [onDragStart]);\n useEffect(function () {\n if (instance && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(instance, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(function () {\n if (instance && onMouseMove) {\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n setMousemoveListener(google.maps.event.addListener(instance, 'mousemove', onMouseMove));\n }\n }, [onMouseMove]);\n useEffect(function () {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(function () {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(function () {\n if (instance && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(instance, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(function () {\n if (instance && onRightClick) {\n if (rightClickListener !== null) {\n google.maps.event.removeListener(rightClickListener);\n }\n setRightClickListener(google.maps.event.addListener(instance, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(function () {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, 'click', onClick));\n }\n }, [onClick]);\n useEffect(function () {\n if (instance && onDrag) {\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n setDragListener(google.maps.event.addListener(instance, 'drag', onDrag));\n }\n }, [onDrag]);\n useEffect(function () {\n if (instance && onBoundsChanged) {\n if (boundsChangedListener !== null) {\n google.maps.event.removeListener(boundsChangedListener);\n }\n setBoundsChangedListener(google.maps.event.addListener(instance, 'bounds_changed', onBoundsChanged));\n }\n }, [onBoundsChanged]);\n useEffect(function () {\n var rectangle = new google.maps.Rectangle(__assign(__assign({}, (options || {})), { map: map }));\n if (typeof visible !== 'undefined') {\n rectangle.setVisible(visible);\n }\n if (typeof editable !== 'undefined') {\n rectangle.setEditable(editable);\n }\n if (typeof draggable !== 'undefined') {\n rectangle.setDraggable(draggable);\n }\n if (typeof bounds !== 'undefined') {\n rectangle.setBounds(bounds);\n }\n if (onDblClick) {\n setDblclickListener(google.maps.event.addListener(rectangle, 'dblclick', onDblClick));\n }\n if (onDragEnd) {\n setDragendListener(google.maps.event.addListener(rectangle, 'dragend', onDragEnd));\n }\n if (onDragStart) {\n setDragstartListener(google.maps.event.addListener(rectangle, 'dragstart', onDragStart));\n }\n if (onMouseDown) {\n setMousedownListener(google.maps.event.addListener(rectangle, 'mousedown', onMouseDown));\n }\n if (onMouseMove) {\n setMousemoveListener(google.maps.event.addListener(rectangle, 'mousemove', onMouseMove));\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(rectangle, 'mouseout', onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(rectangle, 'mouseover', onMouseOver));\n }\n if (onMouseUp) {\n setMouseupListener(google.maps.event.addListener(rectangle, 'mouseup', onMouseUp));\n }\n if (onRightClick) {\n setRightClickListener(google.maps.event.addListener(rectangle, 'rightclick', onRightClick));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(rectangle, 'click', onClick));\n }\n if (onDrag) {\n setDragListener(google.maps.event.addListener(rectangle, 'drag', onDrag));\n }\n if (onBoundsChanged) {\n setBoundsChangedListener(google.maps.event.addListener(rectangle, 'bounds_changed', onBoundsChanged));\n }\n setInstance(rectangle);\n if (onLoad) {\n onLoad(rectangle);\n }\n return function () {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n if (rightClickListener !== null) {\n google.maps.event.removeListener(rightClickListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n if (boundsChangedListener !== null) {\n google.maps.event.removeListener(boundsChangedListener);\n }\n if (onUnmount) {\n onUnmount(rectangle);\n }\n rectangle.setMap(null);\n };\n }, []);\n return null;\n}\nvar RectangleF = memo(RectangleFunctional);\nvar Rectangle = /** @class */ (function (_super) {\n __extends(Rectangle, _super);\n function Rectangle() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n rectangle: null,\n };\n _this.setRectangleCallback = function () {\n if (_this.state.rectangle !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.rectangle);\n }\n };\n return _this;\n }\n Rectangle.prototype.componentDidMount = function () {\n var rectangle = new google.maps.Rectangle(__assign(__assign({}, (this.props.options || {})), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$9,\n eventMap: eventMap$9,\n prevProps: {},\n nextProps: this.props,\n instance: rectangle,\n });\n this.setState(function setRectangle() {\n return {\n rectangle: rectangle,\n };\n }, this.setRectangleCallback);\n };\n Rectangle.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.rectangle !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$9,\n eventMap: eventMap$9,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.rectangle,\n });\n }\n };\n Rectangle.prototype.componentWillUnmount = function () {\n if (this.state.rectangle !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.rectangle);\n }\n unregisterEvents(this.registeredEvents);\n this.state.rectangle.setMap(null);\n }\n };\n Rectangle.prototype.render = function () {\n return null;\n };\n Rectangle.contextType = MapContext;\n return Rectangle;\n}(PureComponent));\n\nvar eventMap$8 = {\n onCenterChanged: 'center_changed',\n onRadiusChanged: 'radius_changed',\n onClick: 'click',\n onDblClick: 'dblclick',\n onDrag: 'drag',\n onDragEnd: 'dragend',\n onDragStart: 'dragstart',\n onMouseDown: 'mousedown',\n onMouseMove: 'mousemove',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n};\nvar updaterMap$8 = {\n center: function (instance, center) {\n instance.setCenter(center);\n },\n draggable: function (instance, draggable) {\n instance.setDraggable(draggable);\n },\n editable: function (instance, editable) {\n instance.setEditable(editable);\n },\n map: function (instance, map) {\n instance.setMap(map);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n radius: function (instance, radius) {\n instance.setRadius(radius);\n },\n visible: function (instance, visible) {\n instance.setVisible(visible);\n },\n};\nvar defaultOptions = {};\nfunction CircleFunctional(_a) {\n var options = _a.options, center = _a.center, radius = _a.radius, draggable = _a.draggable, editable = _a.editable, visible = _a.visible, onDblClick = _a.onDblClick, onDragEnd = _a.onDragEnd, onDragStart = _a.onDragStart, onMouseDown = _a.onMouseDown, onMouseMove = _a.onMouseMove, onMouseOut = _a.onMouseOut, onMouseOver = _a.onMouseOver, onMouseUp = _a.onMouseUp, onRightClick = _a.onRightClick, onClick = _a.onClick, onDrag = _a.onDrag, onCenterChanged = _a.onCenterChanged, onRadiusChanged = _a.onRadiusChanged, onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n var _c = useState(null), dblclickListener = _c[0], setDblclickListener = _c[1];\n var _d = useState(null), dragendListener = _d[0], setDragendListener = _d[1];\n var _e = useState(null), dragstartListener = _e[0], setDragstartListener = _e[1];\n var _f = useState(null), mousedownListener = _f[0], setMousedownListener = _f[1];\n var _g = useState(null), mousemoveListener = _g[0], setMousemoveListener = _g[1];\n var _h = useState(null), mouseoutListener = _h[0], setMouseoutListener = _h[1];\n var _j = useState(null), mouseoverListener = _j[0], setMouseoverListener = _j[1];\n var _k = useState(null), mouseupListener = _k[0], setMouseupListener = _k[1];\n var _l = useState(null), rightclickListener = _l[0], setRightclickListener = _l[1];\n var _m = useState(null), clickListener = _m[0], setClickListener = _m[1];\n var _o = useState(null), dragListener = _o[0], setDragListener = _o[1];\n var _p = useState(null), centerChangedListener = _p[0], setCenterChangedListener = _p[1];\n var _q = useState(null), radiusChangedListener = _q[0], setRadiusChangedListener = _q[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (typeof options !== 'undefined' && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n if (typeof draggable !== 'undefined' && instance !== null) {\n instance.setDraggable(draggable);\n }\n }, [instance, draggable]);\n useEffect(function () {\n if (typeof editable !== 'undefined' && instance !== null) {\n instance.setEditable(editable);\n }\n }, [instance, editable]);\n useEffect(function () {\n if (typeof visible !== 'undefined' && instance !== null) {\n instance.setVisible(visible);\n }\n }, [instance, visible]);\n useEffect(function () {\n if (typeof radius === 'number' && instance !== null) {\n instance.setRadius(radius);\n }\n }, [instance, radius]);\n useEffect(function () {\n if (typeof center !== 'undefined' && instance !== null) {\n instance.setCenter(center);\n }\n }, [instance, center]);\n useEffect(function () {\n if (instance && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(instance, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(function () {\n if (instance && onDragEnd) {\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n setDragendListener(google.maps.event.addListener(instance, 'dragend', onDragEnd));\n }\n }, [onDragEnd]);\n useEffect(function () {\n if (instance && onDragStart) {\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n setDragstartListener(google.maps.event.addListener(instance, 'dragstart', onDragStart));\n }\n }, [onDragStart]);\n useEffect(function () {\n if (instance && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(instance, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(function () {\n if (instance && onMouseMove) {\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n setMousemoveListener(google.maps.event.addListener(instance, 'mousemove', onMouseMove));\n }\n }, [onMouseMove]);\n useEffect(function () {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(function () {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(function () {\n if (instance && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(instance, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(function () {\n if (instance && onRightClick) {\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n setRightclickListener(google.maps.event.addListener(instance, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(function () {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, 'click', onClick));\n }\n }, [onClick]);\n useEffect(function () {\n if (instance && onDrag) {\n if (dragListener !== null) {\n google.maps.event.removeListener(dragListener);\n }\n setDragListener(google.maps.event.addListener(instance, 'drag', onDrag));\n }\n }, [onDrag]);\n useEffect(function () {\n if (instance && onCenterChanged) {\n if (centerChangedListener !== null) {\n google.maps.event.removeListener(centerChangedListener);\n }\n setCenterChangedListener(google.maps.event.addListener(instance, 'center_changed', onCenterChanged));\n }\n }, [onClick]);\n useEffect(function () {\n if (instance && onRadiusChanged) {\n if (radiusChangedListener !== null) {\n google.maps.event.removeListener(radiusChangedListener);\n }\n setRadiusChangedListener(google.maps.event.addListener(instance, 'radius_changed', onRadiusChanged));\n }\n }, [onRadiusChanged]);\n useEffect(function () {\n var circle = new google.maps.Circle(__assign(__assign({}, (options || defaultOptions)), { map: map }));\n if (typeof radius === 'number') {\n circle.setRadius(radius);\n }\n if (typeof center !== 'undefined') {\n circle.setCenter(center);\n }\n if (typeof radius === 'number') {\n circle.setRadius(radius);\n }\n if (typeof visible !== 'undefined') {\n circle.setVisible(visible);\n }\n if (typeof editable !== 'undefined') {\n circle.setEditable(editable);\n }\n if (typeof draggable !== 'undefined') {\n circle.setDraggable(draggable);\n }\n if (onDblClick) {\n setDblclickListener(google.maps.event.addListener(circle, 'dblclick', onDblClick));\n }\n if (onDragEnd) {\n setDragendListener(google.maps.event.addListener(circle, 'dragend', onDragEnd));\n }\n if (onDragStart) {\n setDragstartListener(google.maps.event.addListener(circle, 'dragstart', onDragStart));\n }\n if (onMouseDown) {\n setMousedownListener(google.maps.event.addListener(circle, 'mousedown', onMouseDown));\n }\n if (onMouseMove) {\n setMousemoveListener(google.maps.event.addListener(circle, 'mousemove', onMouseMove));\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(circle, 'mouseout', onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(circle, 'mouseover', onMouseOver));\n }\n if (onMouseUp) {\n setMouseupListener(google.maps.event.addListener(circle, 'mouseup', onMouseUp));\n }\n if (onRightClick) {\n setRightclickListener(google.maps.event.addListener(circle, 'rightclick', onRightClick));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(circle, 'click', onClick));\n }\n if (onDrag) {\n setDragListener(google.maps.event.addListener(circle, 'drag', onDrag));\n }\n if (onCenterChanged) {\n setCenterChangedListener(google.maps.event.addListener(circle, 'center_changed', onCenterChanged));\n }\n if (onRadiusChanged) {\n setRadiusChangedListener(google.maps.event.addListener(circle, 'radius_changed', onRadiusChanged));\n }\n setInstance(circle);\n if (onLoad) {\n onLoad(circle);\n }\n return function () {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n if (dragendListener !== null) {\n google.maps.event.removeListener(dragendListener);\n }\n if (dragstartListener !== null) {\n google.maps.event.removeListener(dragstartListener);\n }\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (centerChangedListener !== null) {\n google.maps.event.removeListener(centerChangedListener);\n }\n if (radiusChangedListener !== null) {\n google.maps.event.removeListener(radiusChangedListener);\n }\n if (onUnmount) {\n onUnmount(circle);\n }\n circle.setMap(null);\n };\n }, []);\n return null;\n}\nvar CircleF = memo(CircleFunctional);\nvar Circle = /** @class */ (function (_super) {\n __extends(Circle, _super);\n function Circle() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n circle: null,\n };\n _this.setCircleCallback = function () {\n if (_this.state.circle !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.circle);\n }\n };\n return _this;\n }\n Circle.prototype.componentDidMount = function () {\n var circle = new google.maps.Circle(__assign(__assign({}, (this.props.options || {})), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$8,\n eventMap: eventMap$8,\n prevProps: {},\n nextProps: this.props,\n instance: circle,\n });\n this.setState(function setCircle() {\n return {\n circle: circle,\n };\n }, this.setCircleCallback);\n };\n Circle.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.circle !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$8,\n eventMap: eventMap$8,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.circle,\n });\n }\n };\n Circle.prototype.componentWillUnmount = function () {\n var _a;\n if (this.state.circle !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.circle);\n }\n unregisterEvents(this.registeredEvents);\n (_a = this.state.circle) === null || _a === void 0 ? void 0 : _a.setMap(null);\n }\n };\n Circle.prototype.render = function () {\n return null;\n };\n Circle.contextType = MapContext;\n return Circle;\n}(PureComponent));\n\nvar eventMap$7 = {\n onClick: 'click',\n onDblClick: 'dblclick',\n onMouseDown: 'mousedown',\n onMouseOut: 'mouseout',\n onMouseOver: 'mouseover',\n onMouseUp: 'mouseup',\n onRightClick: 'rightclick',\n onAddFeature: 'addfeature',\n onRemoveFeature: 'removefeature',\n onRemoveProperty: 'removeproperty',\n onSetGeometry: 'setgeometry',\n onSetProperty: 'setproperty',\n};\nvar updaterMap$7 = {\n add: function (instance, feature) {\n instance.add(feature);\n },\n addgeojson: function (instance, geojson, options) {\n instance.addGeoJson(geojson, options);\n },\n contains: function (instance, feature) {\n instance.contains(feature);\n },\n foreach: function (instance, callback) {\n instance.forEach(callback);\n },\n loadgeojson: function (instance, url, options, callback) {\n instance.loadGeoJson(url, options, callback);\n },\n overridestyle: function (instance, feature, style) {\n instance.overrideStyle(feature, style);\n },\n remove: function (instance, feature) {\n instance.remove(feature);\n },\n revertstyle: function (instance, feature) {\n instance.revertStyle(feature);\n },\n controlposition: function (instance, controlPosition) {\n instance.setControlPosition(controlPosition);\n },\n controls: function (instance, controls) {\n instance.setControls(controls);\n },\n drawingmode: function (instance, mode) {\n instance.setDrawingMode(mode);\n },\n map: function (instance, map) {\n instance.setMap(map);\n },\n style: function (instance, style) {\n instance.setStyle(style);\n },\n togeojson: function (instance, callback) {\n instance.toGeoJson(callback);\n },\n};\nfunction DataFunctional(_a) {\n var options = _a.options, onClick = _a.onClick, onDblClick = _a.onDblClick, onMouseDown = _a.onMouseDown, onMouseMove = _a.onMouseMove, onMouseOut = _a.onMouseOut, onMouseOver = _a.onMouseOver, onMouseUp = _a.onMouseUp, onRightClick = _a.onRightClick, onAddFeature = _a.onAddFeature, onRemoveFeature = _a.onRemoveFeature, onRemoveProperty = _a.onRemoveProperty, onSetGeometry = _a.onSetGeometry, onSetProperty = _a.onSetProperty, onLoad = _a.onLoad, onUnmount = _a.onUnmount;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n var _c = useState(null), dblclickListener = _c[0], setDblclickListener = _c[1];\n var _d = useState(null), mousedownListener = _d[0], setMousedownListener = _d[1];\n var _e = useState(null), mousemoveListener = _e[0], setMousemoveListener = _e[1];\n var _f = useState(null), mouseoutListener = _f[0], setMouseoutListener = _f[1];\n var _g = useState(null), mouseoverListener = _g[0], setMouseoverListener = _g[1];\n var _h = useState(null), mouseupListener = _h[0], setMouseupListener = _h[1];\n var _j = useState(null), rightclickListener = _j[0], setRightclickListener = _j[1];\n var _k = useState(null), clickListener = _k[0], setClickListener = _k[1];\n var _l = useState(null), addFeatureListener = _l[0], setAddFeatureListener = _l[1];\n var _m = useState(null), removeFeatureListener = _m[0], setRemoveFeatureListener = _m[1];\n var _o = useState(null), removePropertyListener = _o[0], setRemovePropertyListener = _o[1];\n var _p = useState(null), setGeometryListener = _p[0], setSetGeometryListener = _p[1];\n var _q = useState(null), setPropertyListener = _q[0], setSetPropertyListener = _q[1];\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (instance && onDblClick) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n setDblclickListener(google.maps.event.addListener(instance, 'dblclick', onDblClick));\n }\n }, [onDblClick]);\n useEffect(function () {\n if (instance && onMouseDown) {\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n setMousedownListener(google.maps.event.addListener(instance, 'mousedown', onMouseDown));\n }\n }, [onMouseDown]);\n useEffect(function () {\n if (instance && onMouseMove) {\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n setMousemoveListener(google.maps.event.addListener(instance, 'mousemove', onMouseMove));\n }\n }, [onMouseMove]);\n useEffect(function () {\n if (instance && onMouseOut) {\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n setMouseoutListener(google.maps.event.addListener(instance, 'mouseout', onMouseOut));\n }\n }, [onMouseOut]);\n useEffect(function () {\n if (instance && onMouseOver) {\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n setMouseoverListener(google.maps.event.addListener(instance, 'mouseover', onMouseOver));\n }\n }, [onMouseOver]);\n useEffect(function () {\n if (instance && onMouseUp) {\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n setMouseupListener(google.maps.event.addListener(instance, 'mouseup', onMouseUp));\n }\n }, [onMouseUp]);\n useEffect(function () {\n if (instance && onRightClick) {\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n setRightclickListener(google.maps.event.addListener(instance, 'rightclick', onRightClick));\n }\n }, [onRightClick]);\n useEffect(function () {\n if (instance && onClick) {\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n setClickListener(google.maps.event.addListener(instance, 'click', onClick));\n }\n }, [onClick]);\n useEffect(function () {\n if (instance && onAddFeature) {\n if (addFeatureListener !== null) {\n google.maps.event.removeListener(addFeatureListener);\n }\n setAddFeatureListener(google.maps.event.addListener(instance, 'addfeature', onAddFeature));\n }\n }, [onAddFeature]);\n useEffect(function () {\n if (instance && onRemoveFeature) {\n if (removeFeatureListener !== null) {\n google.maps.event.removeListener(removeFeatureListener);\n }\n setRemoveFeatureListener(google.maps.event.addListener(instance, 'removefeature', onRemoveFeature));\n }\n }, [onRemoveFeature]);\n useEffect(function () {\n if (instance && onRemoveProperty) {\n if (removePropertyListener !== null) {\n google.maps.event.removeListener(removePropertyListener);\n }\n setRemovePropertyListener(google.maps.event.addListener(instance, 'removeproperty', onRemoveProperty));\n }\n }, [onRemoveProperty]);\n useEffect(function () {\n if (instance && onSetGeometry) {\n if (setGeometryListener !== null) {\n google.maps.event.removeListener(setGeometryListener);\n }\n setSetGeometryListener(google.maps.event.addListener(instance, 'setgeometry', onSetGeometry));\n }\n }, [onSetGeometry]);\n useEffect(function () {\n if (instance && onSetProperty) {\n if (setPropertyListener !== null) {\n google.maps.event.removeListener(setPropertyListener);\n }\n setSetPropertyListener(google.maps.event.addListener(instance, 'setproperty', onSetProperty));\n }\n }, [onSetProperty]);\n useEffect(function () {\n if (map !== null) {\n var data = new google.maps.Data(__assign(__assign({}, (options || {})), { map: map }));\n if (onDblClick) {\n setDblclickListener(google.maps.event.addListener(data, 'dblclick', onDblClick));\n }\n if (onMouseDown) {\n setMousedownListener(google.maps.event.addListener(data, 'mousedown', onMouseDown));\n }\n if (onMouseMove) {\n setMousemoveListener(google.maps.event.addListener(data, 'mousemove', onMouseMove));\n }\n if (onMouseOut) {\n setMouseoutListener(google.maps.event.addListener(data, 'mouseout', onMouseOut));\n }\n if (onMouseOver) {\n setMouseoverListener(google.maps.event.addListener(data, 'mouseover', onMouseOver));\n }\n if (onMouseUp) {\n setMouseupListener(google.maps.event.addListener(data, 'mouseup', onMouseUp));\n }\n if (onRightClick) {\n setRightclickListener(google.maps.event.addListener(data, 'rightclick', onRightClick));\n }\n if (onClick) {\n setClickListener(google.maps.event.addListener(data, 'click', onClick));\n }\n if (onAddFeature) {\n setAddFeatureListener(google.maps.event.addListener(data, 'addfeature', onAddFeature));\n }\n if (onRemoveFeature) {\n setRemoveFeatureListener(google.maps.event.addListener(data, 'removefeature', onRemoveFeature));\n }\n if (onRemoveProperty) {\n setRemovePropertyListener(google.maps.event.addListener(data, 'removeproperty', onRemoveProperty));\n }\n if (onSetGeometry) {\n setSetGeometryListener(google.maps.event.addListener(data, 'setgeometry', onSetGeometry));\n }\n if (onSetProperty) {\n setSetPropertyListener(google.maps.event.addListener(data, 'setproperty', onSetProperty));\n }\n setInstance(data);\n if (onLoad) {\n onLoad(data);\n }\n }\n return function () {\n if (instance) {\n if (dblclickListener !== null) {\n google.maps.event.removeListener(dblclickListener);\n }\n if (mousedownListener !== null) {\n google.maps.event.removeListener(mousedownListener);\n }\n if (mousemoveListener !== null) {\n google.maps.event.removeListener(mousemoveListener);\n }\n if (mouseoutListener !== null) {\n google.maps.event.removeListener(mouseoutListener);\n }\n if (mouseoverListener !== null) {\n google.maps.event.removeListener(mouseoverListener);\n }\n if (mouseupListener !== null) {\n google.maps.event.removeListener(mouseupListener);\n }\n if (rightclickListener !== null) {\n google.maps.event.removeListener(rightclickListener);\n }\n if (clickListener !== null) {\n google.maps.event.removeListener(clickListener);\n }\n if (addFeatureListener !== null) {\n google.maps.event.removeListener(addFeatureListener);\n }\n if (removeFeatureListener !== null) {\n google.maps.event.removeListener(removeFeatureListener);\n }\n if (removePropertyListener !== null) {\n google.maps.event.removeListener(removePropertyListener);\n }\n if (setGeometryListener !== null) {\n google.maps.event.removeListener(setGeometryListener);\n }\n if (setPropertyListener !== null) {\n google.maps.event.removeListener(setPropertyListener);\n }\n if (onUnmount) {\n onUnmount(instance);\n }\n instance.setMap(null);\n }\n };\n }, []);\n return null;\n}\nvar DataF = memo(DataFunctional);\nvar Data = /** @class */ (function (_super) {\n __extends(Data, _super);\n function Data() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n data: null,\n };\n _this.setDataCallback = function () {\n if (_this.state.data !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.data);\n }\n };\n return _this;\n }\n Data.prototype.componentDidMount = function () {\n if (this.context !== null) {\n var data_1 = new google.maps.Data(__assign(__assign({}, (this.props.options || {})), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$7,\n eventMap: eventMap$7,\n prevProps: {},\n nextProps: this.props,\n instance: data_1,\n });\n this.setState(function () {\n return {\n data: data_1,\n };\n }, this.setDataCallback);\n }\n };\n Data.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.data !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$7,\n eventMap: eventMap$7,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.data,\n });\n }\n };\n Data.prototype.componentWillUnmount = function () {\n if (this.state.data !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.data);\n }\n unregisterEvents(this.registeredEvents);\n if (this.state.data) {\n this.state.data.setMap(null);\n }\n }\n };\n Data.prototype.render = function () {\n return null;\n };\n Data.contextType = MapContext;\n return Data;\n}(PureComponent));\n\nvar eventMap$6 = {\n onClick: 'click',\n onDefaultViewportChanged: 'defaultviewport_changed',\n onStatusChanged: 'status_changed',\n};\nvar updaterMap$6 = {\n options: function (instance, options) {\n instance.setOptions(options);\n },\n url: function (instance, url) {\n instance.setUrl(url);\n },\n zIndex: function (instance, zIndex) {\n instance.setZIndex(zIndex);\n },\n};\nvar KmlLayer = /** @class */ (function (_super) {\n __extends(KmlLayer, _super);\n function KmlLayer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n kmlLayer: null,\n };\n _this.setKmlLayerCallback = function () {\n if (_this.state.kmlLayer !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.kmlLayer);\n }\n };\n return _this;\n }\n KmlLayer.prototype.componentDidMount = function () {\n var kmlLayer = new google.maps.KmlLayer(__assign(__assign({}, this.props.options), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$6,\n eventMap: eventMap$6,\n prevProps: {},\n nextProps: this.props,\n instance: kmlLayer,\n });\n this.setState(function setLmlLayer() {\n return {\n kmlLayer: kmlLayer,\n };\n }, this.setKmlLayerCallback);\n };\n KmlLayer.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.kmlLayer !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$6,\n eventMap: eventMap$6,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.kmlLayer,\n });\n }\n };\n KmlLayer.prototype.componentWillUnmount = function () {\n if (this.state.kmlLayer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.kmlLayer);\n }\n unregisterEvents(this.registeredEvents);\n this.state.kmlLayer.setMap(null);\n }\n };\n KmlLayer.prototype.render = function () {\n return null;\n };\n KmlLayer.contextType = MapContext;\n return KmlLayer;\n}(PureComponent));\n\nfunction getOffsetOverride(containerElement, getPixelPositionOffset) {\n return typeof getPixelPositionOffset === 'function'\n ? getPixelPositionOffset(containerElement.offsetWidth, containerElement.offsetHeight)\n : {\n x: 0,\n y: 0,\n };\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction createLatLng(inst, Type) { return new Type(inst.lat, inst.lng); }\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction createLatLngBounds(inst, Type) {\n return new Type(new google.maps.LatLng(inst.ne.lat, inst.ne.lng), new google.maps.LatLng(inst.sw.lat, inst.sw.lng));\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction ensureOfType(inst, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfactory\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n) {\n return inst instanceof type ? inst : factory(inst, type);\n}\nfunction ensureOfTypeBounds(inst, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfactory\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n) {\n return inst instanceof type ? inst : factory(inst, type);\n}\nfunction getLayoutStylesByBounds(mapCanvasProjection, offset, bounds) {\n var ne = mapCanvasProjection && mapCanvasProjection.fromLatLngToDivPixel(bounds.getNorthEast());\n var sw = mapCanvasProjection && mapCanvasProjection.fromLatLngToDivPixel(bounds.getSouthWest());\n if (ne && sw) {\n return {\n left: \"\".concat(sw.x + offset.x, \"px\"),\n top: \"\".concat(ne.y + offset.y, \"px\"),\n width: \"\".concat(ne.x - sw.x - offset.x, \"px\"),\n height: \"\".concat(sw.y - ne.y - offset.y, \"px\"),\n };\n }\n return {\n left: '-9999px',\n top: '-9999px',\n };\n}\nfunction getLayoutStylesByPosition(mapCanvasProjection, offset, position) {\n var point = mapCanvasProjection && mapCanvasProjection.fromLatLngToDivPixel(position);\n if (point) {\n var x = point.x, y = point.y;\n return {\n left: \"\".concat(x + offset.x, \"px\"),\n top: \"\".concat(y + offset.y, \"px\"),\n };\n }\n return {\n left: '-9999px',\n top: '-9999px',\n };\n}\nfunction getLayoutStyles(mapCanvasProjection, offset, bounds, position) {\n return bounds !== undefined\n ? getLayoutStylesByBounds(mapCanvasProjection, offset, ensureOfTypeBounds(bounds, google.maps.LatLngBounds, createLatLngBounds))\n : getLayoutStylesByPosition(mapCanvasProjection, offset, ensureOfType(position, google.maps.LatLng, createLatLng));\n}\nfunction arePositionsEqual(currentPosition, previousPosition) {\n return currentPosition.left === previousPosition.left\n && currentPosition.top === previousPosition.top\n && currentPosition.width === previousPosition.height\n && currentPosition.height === previousPosition.height;\n}\n\nfunction createOverlay(container, pane, position, bounds, getPixelPositionOffset) {\n var Overlay = /** @class */ (function (_super) {\n __extends(Overlay, _super);\n function Overlay(container, pane, position, bounds) {\n var _this = _super.call(this) || this;\n _this.container = container;\n _this.pane = pane;\n _this.position = position;\n _this.bounds = bounds;\n return _this;\n }\n Overlay.prototype.onAdd = function () {\n var _a;\n var pane = (_a = this.getPanes()) === null || _a === void 0 ? void 0 : _a[this.pane];\n pane === null || pane === void 0 ? void 0 : pane.appendChild(this.container);\n };\n Overlay.prototype.draw = function () {\n var projection = this.getProjection();\n var offset = __assign({}, (this.container\n ? getOffsetOverride(this.container, getPixelPositionOffset)\n : {\n x: 0,\n y: 0,\n }));\n var layoutStyles = getLayoutStyles(projection, offset, this.bounds, this.position);\n for (var _i = 0, _a = Object.entries(layoutStyles); _i < _a.length; _i++) {\n var _b = _a[_i], key = _b[0], value = _b[1];\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.container.style[key] = value;\n }\n };\n Overlay.prototype.onRemove = function () {\n if (this.container.parentNode !== null) {\n this.container.parentNode.removeChild(this.container);\n }\n };\n return Overlay;\n }(google.maps.OverlayView));\n return new Overlay(container, pane, position, bounds);\n}\n\nfunction convertToLatLngString(latLngLike) {\n if (!latLngLike) {\n return '';\n }\n var latLng = latLngLike instanceof google.maps.LatLng\n ? latLngLike\n : new google.maps.LatLng(latLngLike.lat, latLngLike.lng);\n return latLng + '';\n}\nfunction convertToLatLngBoundsString(latLngBoundsLike) {\n if (!latLngBoundsLike) {\n return '';\n }\n var latLngBounds = latLngBoundsLike instanceof google.maps.LatLngBounds\n ? latLngBoundsLike\n : new google.maps.LatLngBounds(new google.maps.LatLng(latLngBoundsLike.south, latLngBoundsLike.east), new google.maps.LatLng(latLngBoundsLike.north, latLngBoundsLike.west));\n return latLngBounds + '';\n}\nvar FLOAT_PANE = \"floatPane\";\nvar MAP_PANE = \"mapPane\";\nvar MARKER_LAYER = \"markerLayer\";\nvar OVERLAY_LAYER = \"overlayLayer\";\nvar OVERLAY_MOUSE_TARGET = \"overlayMouseTarget\";\nfunction OverlayViewFunctional(_a) {\n var position = _a.position, bounds = _a.bounds, mapPaneName = _a.mapPaneName, zIndex = _a.zIndex, onLoad = _a.onLoad, onUnmount = _a.onUnmount, getPixelPositionOffset = _a.getPixelPositionOffset, children = _a.children;\n var map = useContext(MapContext);\n var container = useMemo(function () {\n var div = document.createElement('div');\n div.style.position = 'absolute';\n return div;\n }, []);\n var overlay = useMemo(function () {\n return createOverlay(container, mapPaneName, position, bounds, getPixelPositionOffset);\n }, [container, mapPaneName, position, bounds]);\n useEffect(function () {\n onLoad === null || onLoad === void 0 ? void 0 : onLoad(overlay);\n overlay === null || overlay === void 0 ? void 0 : overlay.setMap(map);\n return function () {\n onUnmount === null || onUnmount === void 0 ? void 0 : onUnmount(overlay);\n overlay === null || overlay === void 0 ? void 0 : overlay.setMap(null);\n };\n }, [map, overlay]);\n // to move the container to the foreground and background\n useEffect(function () {\n container.style.zIndex = \"\".concat(zIndex);\n }, [zIndex, container]);\n return ReactDOM.createPortal(children, container);\n}\nvar OverlayViewF = memo(OverlayViewFunctional);\nvar OverlayView = /** @class */ (function (_super) {\n __extends(OverlayView, _super);\n function OverlayView(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n paneEl: null,\n containerStyle: {\n // set initial position\n position: 'absolute',\n },\n };\n _this.updatePane = function () {\n var mapPaneName = _this.props.mapPaneName;\n // https://developers.google.com/maps/documentation/javascript/3.exp/reference#MapPanes\n var mapPanes = _this.overlayView.getPanes();\n invariant$1(!!mapPaneName, \"OverlayView requires props.mapPaneName but got %s\", mapPaneName);\n if (mapPanes) {\n _this.setState({\n paneEl: mapPanes[mapPaneName],\n });\n }\n else {\n _this.setState({\n paneEl: null,\n });\n }\n };\n _this.onAdd = function () {\n var _a, _b;\n _this.updatePane();\n (_b = (_a = _this.props).onLoad) === null || _b === void 0 ? void 0 : _b.call(_a, _this.overlayView);\n };\n _this.onPositionElement = function () {\n var mapCanvasProjection = _this.overlayView.getProjection();\n var offset = __assign({ x: 0, y: 0 }, (_this.containerRef.current\n ? getOffsetOverride(_this.containerRef.current, _this.props.getPixelPositionOffset)\n : {}));\n var layoutStyles = getLayoutStyles(mapCanvasProjection, offset, _this.props.bounds, _this.props.position);\n var _a = _this.state.containerStyle, left = _a.left, top = _a.top, width = _a.width, height = _a.height;\n if (!arePositionsEqual(layoutStyles, { left: left, top: top, width: width, height: height })) {\n _this.setState({\n containerStyle: {\n top: layoutStyles.top || 0,\n left: layoutStyles.left || 0,\n width: layoutStyles.width || 0,\n height: layoutStyles.height || 0,\n position: 'absolute',\n },\n });\n }\n };\n _this.draw = function () {\n _this.onPositionElement();\n };\n _this.onRemove = function () {\n var _a, _b;\n _this.setState(function () { return ({\n paneEl: null,\n }); });\n (_b = (_a = _this.props).onUnmount) === null || _b === void 0 ? void 0 : _b.call(_a, _this.overlayView);\n };\n _this.containerRef = createRef();\n // You must implement three methods: onAdd(), draw(), and onRemove().\n var overlayView = new google.maps.OverlayView();\n overlayView.onAdd = _this.onAdd;\n overlayView.draw = _this.draw;\n overlayView.onRemove = _this.onRemove;\n _this.overlayView = overlayView;\n return _this;\n }\n OverlayView.prototype.componentDidMount = function () {\n this.overlayView.setMap(this.context);\n };\n OverlayView.prototype.componentDidUpdate = function (prevProps) {\n var prevPositionString = convertToLatLngString(prevProps.position);\n var positionString = convertToLatLngString(this.props.position);\n var prevBoundsString = convertToLatLngBoundsString(prevProps.bounds);\n var boundsString = convertToLatLngBoundsString(this.props.bounds);\n if (prevPositionString !== positionString ||\n prevBoundsString !== boundsString) {\n this.overlayView.draw();\n }\n if (prevProps.mapPaneName !== this.props.mapPaneName) {\n this.updatePane();\n }\n };\n OverlayView.prototype.componentWillUnmount = function () {\n this.overlayView.setMap(null);\n };\n OverlayView.prototype.render = function () {\n var paneEl = this.state.paneEl;\n if (paneEl) {\n return ReactDOM.createPortal(jsx(\"div\", { ref: this.containerRef, style: this.state.containerStyle, children: Children.only(this.props.children) }), paneEl);\n }\n else {\n return null;\n }\n };\n OverlayView.FLOAT_PANE = \"floatPane\";\n OverlayView.MAP_PANE = \"mapPane\";\n OverlayView.MARKER_LAYER = \"markerLayer\";\n OverlayView.OVERLAY_LAYER = \"overlayLayer\";\n OverlayView.OVERLAY_MOUSE_TARGET = \"overlayMouseTarget\";\n OverlayView.contextType = MapContext;\n return OverlayView;\n}(PureComponent));\n\nfunction noop() { return; }\n\nvar eventMap$5 = {\n onDblClick: 'dblclick',\n onClick: 'click',\n};\nvar updaterMap$5 = {\n opacity: function (instance, opacity) {\n instance.setOpacity(opacity);\n },\n};\nfunction GroundOverlayFunctional(_a) {\n var url = _a.url, bounds = _a.bounds, options = _a.options, visible = _a.visible;\n var map = useContext(MapContext);\n var imageBounds = new google.maps.LatLngBounds(new google.maps.LatLng(bounds.south, bounds.west), new google.maps.LatLng(bounds.north, bounds.east));\n var groundOverlay = useMemo(function () {\n var overlay = new google.maps.GroundOverlay(url, imageBounds, __assign({}, options));\n return overlay;\n }, []);\n useEffect(function () {\n if (groundOverlay !== null) {\n groundOverlay.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (typeof url !== 'undefined' && groundOverlay !== null) {\n groundOverlay.set(\"url\", url);\n groundOverlay.setMap(map);\n }\n }, [groundOverlay, url]);\n useEffect(function () {\n if (typeof visible !== 'undefined' && groundOverlay !== null) {\n groundOverlay.setOpacity(visible ? 1 : 0);\n }\n }, [groundOverlay, visible]);\n useEffect(function () {\n var newBounds = new google.maps.LatLngBounds(new google.maps.LatLng(bounds.south, bounds.west), new google.maps.LatLng(bounds.north, bounds.east));\n if (typeof bounds !== 'undefined' && groundOverlay !== null) {\n groundOverlay.set(\"bounds\", newBounds);\n groundOverlay.setMap(map);\n }\n }, [groundOverlay, bounds]);\n return null;\n}\nvar GroundOverlayF = memo(GroundOverlayFunctional);\nvar GroundOverlay = /** @class */ (function (_super) {\n __extends(GroundOverlay, _super);\n function GroundOverlay() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n groundOverlay: null,\n };\n _this.setGroundOverlayCallback = function () {\n if (_this.state.groundOverlay !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.groundOverlay);\n }\n };\n return _this;\n }\n GroundOverlay.prototype.componentDidMount = function () {\n invariant$1(!!this.props.url || !!this.props.bounds, \"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655\");\n var groundOverlay = new google.maps.GroundOverlay(this.props.url, this.props.bounds, __assign(__assign({}, this.props.options), { map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$5,\n eventMap: eventMap$5,\n prevProps: {},\n nextProps: this.props,\n instance: groundOverlay,\n });\n this.setState(function setGroundOverlay() {\n return {\n groundOverlay: groundOverlay,\n };\n }, this.setGroundOverlayCallback);\n };\n GroundOverlay.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.groundOverlay !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$5,\n eventMap: eventMap$5,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.groundOverlay,\n });\n }\n };\n GroundOverlay.prototype.componentWillUnmount = function () {\n if (this.state.groundOverlay) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.groundOverlay);\n }\n this.state.groundOverlay.setMap(null);\n }\n };\n GroundOverlay.prototype.render = function () {\n return null;\n };\n GroundOverlay.defaultProps = {\n onLoad: noop,\n };\n GroundOverlay.contextType = MapContext;\n return GroundOverlay;\n}(PureComponent));\n\nvar eventMap$4 = {};\nvar updaterMap$4 = {\n data: function (instance, data) {\n instance.setData(data);\n },\n map: function (instance, map) {\n instance.setMap(map);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n};\nfunction HeatmapLayerFunctional(_a) {\n var data = _a.data, onLoad = _a.onLoad, onUnmount = _a.onUnmount, options = _a.options;\n var map = useContext(MapContext);\n var _b = useState(null), instance = _b[0], setInstance = _b[1];\n useEffect(function () {\n if (!google.maps.visualization) {\n invariant$1(!!google.maps.visualization, 'Did you include prop libraries={[\"visualization\"]} in useJsApiScript? %s', google.maps.visualization);\n }\n }, []);\n useEffect(function () {\n invariant$1(!!data, 'data property is required in HeatmapLayer %s', data);\n }, [data]);\n // Order does matter\n useEffect(function () {\n if (instance !== null) {\n instance.setMap(map);\n }\n }, [map]);\n useEffect(function () {\n if (options && instance !== null) {\n instance.setOptions(options);\n }\n }, [instance, options]);\n useEffect(function () {\n var heatmapLayer = new google.maps.visualization.HeatmapLayer(__assign(__assign({}, (options || {})), { data: data, map: map }));\n setInstance(heatmapLayer);\n if (onLoad) {\n onLoad(heatmapLayer);\n }\n return function () {\n if (instance !== null) {\n if (onUnmount) {\n onUnmount(instance);\n }\n instance.setMap(null);\n }\n };\n }, []);\n return null;\n}\nvar HeatmapLayerF = memo(HeatmapLayerFunctional);\nvar HeatmapLayer = /** @class */ (function (_super) {\n __extends(HeatmapLayer, _super);\n function HeatmapLayer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n heatmapLayer: null,\n };\n _this.setHeatmapLayerCallback = function () {\n if (_this.state.heatmapLayer !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.heatmapLayer);\n }\n };\n return _this;\n }\n HeatmapLayer.prototype.componentDidMount = function () {\n invariant$1(!!google.maps.visualization, 'Did you include prop libraries={[\"visualization\"]} to ? %s', google.maps.visualization);\n invariant$1(!!this.props.data, 'data property is required in HeatmapLayer %s', this.props.data);\n var heatmapLayer = new google.maps.visualization.HeatmapLayer(__assign(__assign({}, (this.props.options || {})), { data: this.props.data, map: this.context }));\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$4,\n eventMap: eventMap$4,\n prevProps: {},\n nextProps: this.props,\n instance: heatmapLayer,\n });\n this.setState(function setHeatmapLayer() {\n return {\n heatmapLayer: heatmapLayer,\n };\n }, this.setHeatmapLayerCallback);\n };\n HeatmapLayer.prototype.componentDidUpdate = function (prevProps) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$4,\n eventMap: eventMap$4,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.heatmapLayer,\n });\n };\n HeatmapLayer.prototype.componentWillUnmount = function () {\n if (this.state.heatmapLayer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.heatmapLayer);\n }\n unregisterEvents(this.registeredEvents);\n this.state.heatmapLayer.setMap(null);\n }\n };\n HeatmapLayer.prototype.render = function () {\n return null;\n };\n HeatmapLayer.contextType = MapContext;\n return HeatmapLayer;\n}(PureComponent));\n\nvar eventMap$3 = {\n onCloseClick: 'closeclick',\n onPanoChanged: 'pano_changed',\n onPositionChanged: 'position_changed',\n onPovChanged: 'pov_changed',\n onResize: 'resize',\n onStatusChanged: 'status_changed',\n onVisibleChanged: 'visible_changed',\n onZoomChanged: 'zoom_changed',\n};\nvar updaterMap$3 = {\n register: function (instance, provider, options) {\n instance.registerPanoProvider(provider, options);\n },\n links: function (instance, links) {\n instance.setLinks(links);\n },\n motionTracking: function (instance, motionTracking) {\n instance.setMotionTracking(motionTracking);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n pano: function (instance, pano) {\n instance.setPano(pano);\n },\n position: function (instance, position) {\n instance.setPosition(position);\n },\n pov: function (instance, pov) {\n instance.setPov(pov);\n },\n visible: function (instance, visible) {\n instance.setVisible(visible);\n },\n zoom: function (instance, zoom) {\n instance.setZoom(zoom);\n },\n};\nvar StreetViewPanorama = /** @class */ (function (_super) {\n __extends(StreetViewPanorama, _super);\n function StreetViewPanorama() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n streetViewPanorama: null,\n };\n _this.setStreetViewPanoramaCallback = function () {\n if (_this.state.streetViewPanorama !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.streetViewPanorama);\n }\n };\n return _this;\n }\n StreetViewPanorama.prototype.componentDidMount = function () {\n var _a, _b;\n var streetViewPanorama = (_b = (_a = this.context) === null || _a === void 0 ? void 0 : _a.getStreetView()) !== null && _b !== void 0 ? _b : null;\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$3,\n eventMap: eventMap$3,\n prevProps: {},\n nextProps: this.props,\n instance: streetViewPanorama,\n });\n this.setState(function () {\n return {\n streetViewPanorama: streetViewPanorama,\n };\n }, this.setStreetViewPanoramaCallback);\n };\n StreetViewPanorama.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.streetViewPanorama !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$3,\n eventMap: eventMap$3,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.streetViewPanorama,\n });\n }\n };\n StreetViewPanorama.prototype.componentWillUnmount = function () {\n if (this.state.streetViewPanorama !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.streetViewPanorama);\n }\n unregisterEvents(this.registeredEvents);\n this.state.streetViewPanorama.setVisible(false);\n }\n };\n StreetViewPanorama.prototype.render = function () {\n return null;\n };\n StreetViewPanorama.contextType = MapContext;\n return StreetViewPanorama;\n}(PureComponent));\n\nvar StreetViewService = /** @class */ (function (_super) {\n __extends(StreetViewService, _super);\n function StreetViewService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n streetViewService: null,\n };\n _this.setStreetViewServiceCallback = function () {\n if (_this.state.streetViewService !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.streetViewService);\n }\n };\n return _this;\n }\n StreetViewService.prototype.componentDidMount = function () {\n var streetViewService = new google.maps.StreetViewService();\n this.setState(function setStreetViewService() {\n return {\n streetViewService: streetViewService,\n };\n }, this.setStreetViewServiceCallback);\n };\n StreetViewService.prototype.componentWillUnmount = function () {\n if (this.state.streetViewService !== null && this.props.onUnmount) {\n this.props.onUnmount(this.state.streetViewService);\n }\n };\n StreetViewService.prototype.render = function () {\n return null;\n };\n StreetViewService.contextType = MapContext;\n return StreetViewService;\n}(PureComponent));\n\nvar DirectionsService = /** @class */ (function (_super) {\n __extends(DirectionsService, _super);\n function DirectionsService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n directionsService: null,\n };\n _this.setDirectionsServiceCallback = function () {\n if (_this.state.directionsService !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.directionsService);\n }\n };\n return _this;\n }\n DirectionsService.prototype.componentDidMount = function () {\n invariant$1(!!this.props.options, 'DirectionsService expected options object as parameter, but got %s', this.props.options);\n var directionsService = new google.maps.DirectionsService();\n this.setState(function setDirectionsService() {\n return {\n directionsService: directionsService,\n };\n }, this.setDirectionsServiceCallback);\n };\n DirectionsService.prototype.componentDidUpdate = function () {\n if (this.state.directionsService !== null) {\n this.state.directionsService.route(this.props.options, this.props.callback);\n }\n };\n DirectionsService.prototype.componentWillUnmount = function () {\n if (this.state.directionsService !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.directionsService);\n }\n }\n };\n DirectionsService.prototype.render = function () {\n return null;\n };\n return DirectionsService;\n}(PureComponent));\n\nvar eventMap$2 = {\n onDirectionsChanged: 'directions_changed',\n};\nvar updaterMap$2 = {\n directions: function (instance, directions) {\n instance.setDirections(directions);\n },\n map: function (instance, map) {\n instance.setMap(map);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n panel: function (instance, panel) {\n instance.setPanel(panel);\n },\n routeIndex: function (instance, routeIndex) {\n instance.setRouteIndex(routeIndex);\n },\n};\nvar DirectionsRenderer = /** @class */ (function (_super) {\n __extends(DirectionsRenderer, _super);\n function DirectionsRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.state = {\n directionsRenderer: null,\n };\n _this.setDirectionsRendererCallback = function () {\n if (_this.state.directionsRenderer !== null) {\n _this.state.directionsRenderer.setMap(_this.context);\n if (_this.props.onLoad) {\n _this.props.onLoad(_this.state.directionsRenderer);\n }\n }\n };\n return _this;\n }\n DirectionsRenderer.prototype.componentDidMount = function () {\n var directionsRenderer = new google.maps.DirectionsRenderer(this.props.options);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$2,\n eventMap: eventMap$2,\n prevProps: {},\n nextProps: this.props,\n instance: directionsRenderer,\n });\n this.setState(function setDirectionsRenderer() {\n return {\n directionsRenderer: directionsRenderer,\n };\n }, this.setDirectionsRendererCallback);\n };\n DirectionsRenderer.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.directionsRenderer !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$2,\n eventMap: eventMap$2,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.directionsRenderer,\n });\n }\n };\n DirectionsRenderer.prototype.componentWillUnmount = function () {\n if (this.state.directionsRenderer !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.directionsRenderer);\n }\n unregisterEvents(this.registeredEvents);\n if (this.state.directionsRenderer) {\n this.state.directionsRenderer.setMap(null);\n }\n }\n };\n DirectionsRenderer.prototype.render = function () {\n return jsx(Fragment, {});\n };\n DirectionsRenderer.contextType = MapContext;\n return DirectionsRenderer;\n}(PureComponent));\n\nvar DistanceMatrixService = /** @class */ (function (_super) {\n __extends(DistanceMatrixService, _super);\n function DistanceMatrixService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n distanceMatrixService: null,\n };\n _this.setDistanceMatrixServiceCallback = function () {\n if (_this.state.distanceMatrixService !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.distanceMatrixService);\n }\n };\n return _this;\n }\n DistanceMatrixService.prototype.componentDidMount = function () {\n invariant$1(!!this.props.options, 'DistanceMatrixService expected options object as parameter, but go %s', this.props.options);\n var distanceMatrixService = new google.maps.DistanceMatrixService();\n this.setState(function setDistanceMatrixService() {\n return {\n distanceMatrixService: distanceMatrixService,\n };\n }, this.setDistanceMatrixServiceCallback);\n };\n DistanceMatrixService.prototype.componentDidUpdate = function () {\n if (this.state.distanceMatrixService !== null) {\n this.state.distanceMatrixService.getDistanceMatrix(this.props.options, this.props.callback);\n }\n };\n DistanceMatrixService.prototype.componentWillUnmount = function () {\n if (this.state.distanceMatrixService !== null && this.props.onUnmount) {\n this.props.onUnmount(this.state.distanceMatrixService);\n }\n };\n DistanceMatrixService.prototype.render = function () {\n return null;\n };\n return DistanceMatrixService;\n}(PureComponent));\n\nvar eventMap$1 = {\n onPlacesChanged: 'places_changed',\n};\nvar updaterMap$1 = {\n bounds: function (instance, bounds) {\n instance.setBounds(bounds);\n },\n};\nvar StandaloneSearchBox = /** @class */ (function (_super) {\n __extends(StandaloneSearchBox, _super);\n function StandaloneSearchBox() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.containerElement = createRef();\n _this.state = {\n searchBox: null,\n };\n _this.setSearchBoxCallback = function () {\n if (_this.state.searchBox !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.searchBox);\n }\n };\n return _this;\n }\n StandaloneSearchBox.prototype.componentDidMount = function () {\n invariant$1(!!google.maps.places, 'You need to provide libraries={[\"places\"]} prop to component %s', google.maps.places);\n if (this.containerElement !== null && this.containerElement.current !== null) {\n var input = this.containerElement.current.querySelector('input');\n if (input !== null) {\n var searchBox_1 = new google.maps.places.SearchBox(input, this.props.options);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$1,\n eventMap: eventMap$1,\n prevProps: {},\n nextProps: this.props,\n instance: searchBox_1,\n });\n this.setState(function setSearchBox() {\n return {\n searchBox: searchBox_1,\n };\n }, this.setSearchBoxCallback);\n }\n }\n };\n StandaloneSearchBox.prototype.componentDidUpdate = function (prevProps) {\n if (this.state.searchBox !== null) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap$1,\n eventMap: eventMap$1,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.searchBox,\n });\n }\n };\n StandaloneSearchBox.prototype.componentWillUnmount = function () {\n if (this.state.searchBox !== null) {\n if (this.props.onUnmount) {\n this.props.onUnmount(this.state.searchBox);\n }\n unregisterEvents(this.registeredEvents);\n }\n };\n StandaloneSearchBox.prototype.render = function () {\n return jsx(\"div\", { ref: this.containerElement, children: Children.only(this.props.children) });\n };\n StandaloneSearchBox.contextType = MapContext;\n return StandaloneSearchBox;\n}(PureComponent));\n\nvar eventMap = {\n onPlaceChanged: 'place_changed',\n};\nvar updaterMap = {\n bounds: function (instance, bounds) {\n instance.setBounds(bounds);\n },\n restrictions: function (instance, restrictions) {\n instance.setComponentRestrictions(restrictions);\n },\n fields: function (instance, fields) {\n instance.setFields(fields);\n },\n options: function (instance, options) {\n instance.setOptions(options);\n },\n types: function (instance, types) {\n instance.setTypes(types);\n },\n};\nvar Autocomplete = /** @class */ (function (_super) {\n __extends(Autocomplete, _super);\n function Autocomplete() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.registeredEvents = [];\n _this.containerElement = createRef();\n _this.state = {\n autocomplete: null,\n };\n _this.setAutocompleteCallback = function () {\n if (_this.state.autocomplete !== null && _this.props.onLoad) {\n _this.props.onLoad(_this.state.autocomplete);\n }\n };\n return _this;\n }\n Autocomplete.prototype.componentDidMount = function () {\n var _a;\n invariant$1(!!google.maps.places, 'You need to provide libraries={[\"places\"]} prop to component %s', google.maps.places);\n // TODO: why current could be equal null?\n var input = (_a = this.containerElement.current) === null || _a === void 0 ? void 0 : _a.querySelector('input');\n if (input) {\n var autocomplete_1 = new google.maps.places.Autocomplete(input, this.props.options);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap,\n eventMap: eventMap,\n prevProps: {},\n nextProps: this.props,\n instance: autocomplete_1,\n });\n this.setState(function () {\n return {\n autocomplete: autocomplete_1,\n };\n }, this.setAutocompleteCallback);\n }\n };\n Autocomplete.prototype.componentDidUpdate = function (prevProps) {\n unregisterEvents(this.registeredEvents);\n this.registeredEvents = applyUpdatersToPropsAndRegisterEvents({\n updaterMap: updaterMap,\n eventMap: eventMap,\n prevProps: prevProps,\n nextProps: this.props,\n instance: this.state.autocomplete,\n });\n };\n Autocomplete.prototype.componentWillUnmount = function () {\n if (this.state.autocomplete !== null) {\n unregisterEvents(this.registeredEvents);\n }\n };\n Autocomplete.prototype.render = function () {\n return jsx(\"div\", { ref: this.containerElement, className: this.props.className, children: Children.only(this.props.children) });\n };\n Autocomplete.defaultProps = {\n className: ''\n };\n Autocomplete.contextType = MapContext;\n return Autocomplete;\n}(PureComponent));\n\nexport { Autocomplete, BicyclingLayer, BicyclingLayerF, Circle, CircleF, Data, DataF, DirectionsRenderer, DirectionsService, DistanceMatrixService, DrawingManager, DrawingManagerF, FLOAT_PANE, GoogleMap, index_esm as GoogleMapsMarkerClusterer, GoogleMarkerClusterer$1 as GoogleMarkerClusterer, GroundOverlay, GroundOverlayF, HeatmapLayer, HeatmapLayerF, InfoBoxComponent as InfoBox, InfoBoxF, InfoWindow, InfoWindowF, KmlLayer, LoadScript, LoadScriptNext$1 as LoadScriptNext, MAP_PANE, MARKER_LAYER, MapContext, Marker, ClustererComponent as MarkerClusterer, MarkerClustererF, MarkerF, OVERLAY_LAYER, OVERLAY_MOUSE_TARGET, OverlayView, OverlayViewF, Polygon, PolygonF, Polyline, PolylineF, Rectangle, RectangleF, StandaloneSearchBox, StreetViewPanorama, StreetViewService, TrafficLayer, TrafficLayerF, TransitLayer, TransitLayerF, useGoogleMap, useJsApiLoader, useLoadScript };\n//# sourceMappingURL=esm.js.map\n"],"names":["LoaderStatus","tmp","MarkerClustererEvents","previouslyLoadedUrl","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","__extends","String","__","constructor","create","__assign","assign","t","s","i","n","arguments","length","apply","getDefaultExportFromCjs","x","__esModule","invariant$1","condition","format","a","c","e","f","error","undefined","args","argIndex","replace","name","framesToPop","MapContext","createContext","unregisterEvent","registered","google","maps","event","removeListener","unregisterEvents","events","forEach","applyUpdatersToPropsAndRegisterEvents","_a","map","updaterMap","eventMap","prevProps","nextProps","instance","registeredEvents","keys","reduce","newAcc","key","googleEventName","obj","props","acc","push","addListener","fn","nextValue","eventMap$i","onDblClick","onDragEnd","onDragStart","onMapTypeIdChanged","onMouseMove","onMouseOut","onMouseOver","onMouseDown","onMouseUp","onRightClick","onTilesLoaded","onBoundsChanged","onCenterChanged","onClick","onDrag","onHeadingChanged","onIdle","onProjectionChanged","onResize","onTiltChanged","onZoomChanged","updaterMap$i","extraMapTypes","extra","it","mapTypes","set","center","setCenter","clickableIcons","clickable","setClickableIcons","heading","setHeading","mapTypeId","setMapTypeId","options","setOptions","streetView","setStreetView","tilt","setTilt","zoom","setZoom","GoogleMap","_super","_this","state","mapRef","getInstance","Map","panTo","latLng","setMapCallback","onLoad","getRef","ref","componentDidMount","setState","componentDidUpdate","componentWillUnmount","onUnmount","render","jsx","id","style","mapContainerStyle","className","mapContainerClassName","children","Provider","value","PureComponent","isBrowser","document","injectScript","url","nonce","Promise","resolve","reject","existingScript","getElementById","windowWithGoogleMap","window","dataStateAttribute","getAttribute","src","originalInitMap_1","initMap","originalErrorCallback_1","onerror","err","remove","script","createElement","type","async","setAttribute","head","appendChild","catch","console","isGoogleFontStyle","element","href","indexOf","tagName","toLowerCase","styleSheet","cssText","innerHTML","preventGoogleFonts","getElementsByTagName","trueInsertBefore_1","insertBefore","bind","newElement","referenceElement","Reflect","trueAppend_1","textNode","makeLoadScriptUrl","googleMapsApiKey","googleMapsClientId","_b","version","language","region","libraries","channel","mapIds","authReferrerPolicy","params","concat","sort","join","cleaningUp","DefaultLoadingElement","defaultLoadScriptProps","useLoadScript","_c","preventGoogleFontsLoading","isMounted","useRef","_d","useState","isLoaded","setLoaded","_e","loadError","setLoadError","useEffect","current","setLoadedIfMounted","then","warn","prevLibraries","LoadScript","check","createRef","loaded","cleanupCallback","isCleaningUp","_arguments","P","generator","promiseCallback","timer_1","setInterval","clearInterval","__generator","thisArg","body","y","g","_","label","sent","trys","ops","next","verb","Symbol","iterator","v","step","op","done","pop","fulfilled","rejected","result","adopt","cleanup","parentNode","removeChild","slice","filter","includes","link","innerText","onError","setTimeout","jsxs","Fragment","loadingElement","defaultProps","eventMap$h","updaterMap$h","TrafficLayer","trafficLayer","setTrafficLayerCallback","context","setMap","contextType","BicyclingLayer","bicyclingLayer","setBicyclingLayerCallback","TransitLayer","transitLayer","setTransitLayerCallback","eventMap$g","onCircleComplete","onMarkerComplete","onOverlayComplete","onPolygonComplete","onPolylineComplete","onRectangleComplete","updaterMap$g","drawingMode","setDrawingMode","DrawingManager","drawingManager","setDrawingManagerCallback","drawing","eventMap$f","onAnimationChanged","onClickableChanged","onCursorChanged","onDraggableChanged","onFlatChanged","onIconChanged","onPositionChanged","onShapeChanged","onTitleChanged","onVisibleChanged","onZindexChanged","updaterMap$f","animation","setAnimation","setClickable","cursor","setCursor","draggable","setDraggable","icon","setIcon","setLabel","opacity","setOpacity","position","setPosition","shape","setShape","title","setTitle","visible","setVisible","zIndex","setZIndex","defaultOptions$5","Marker","markerOptions","clusterer","marker","addMarker","noClustererRedraw","removeMarker","Children","child","isValidElement","cloneElement","anchor","ClusterIcon","cluster","styles","getClusterer","extend","OverlayView","clusterClassName","getClusterClass","div","sums","boundsChangedListener","height","width","anchorText","anchorIcon","textColor","textSize","textDecoration","fontWeight","fontStyle","fontFamily","backgroundPosition","cMouseDownInCluster","cDraggingMapByCluster","timeOut","getMap","onAdd","onRemove","draw","hide","show","useStyle","getPosFromLatLng","markerClusterer_1","trigger","getZoomOnClick","maxZoom_1","getMaxZoom","bounds_1","getBounds","fitBounds","getZoom","cancelBubble","stopPropagation","getPanes","overlayMouseTarget","addEventListener","removeEventListener","clearTimeout","pos","top","left","display","_f","divTitle","getTitle","bp","split","spriteH","parseInt","spriteV","img","alt","enableRetinaIcons","clip","textElm","text","html","getStyles","Math","min","max","index","latlng","getProjection","fromLatLngToDivPixel","Cluster$1","Cluster","markerClusterer","gridSize","getGridSize","minClusterSize","getMinimumClusterSize","averageCenter","getAverageCenter","markers","bounds","clusterIcon","getSize","getMarkers","getCenter","isMarkerInClusterBounds","calculateBounds","updateIcon","isMarkerAlreadyAdded","LatLngBounds","_i","markers_1","getPosition","length_1","LatLng","lat","lng","isAdded","mCount","maxZoom","markerElement","contains","getExtendedBounds","getCalculator","CALCULATOR","numStyles","count","numberOfDigits","toString","IMAGE_SIZES","Clusterer","optMarkers","optOptions","setMinimumClusterSize","getEnableRetinaIcons","setEnableRetinaIcons","addToClosestCluster","getImageExtension","setImageExtension","setAverageCenter","getTotalClusters","fitMapToMarkers","getIgnoreHidden","setIgnoreHidden","setClusterClass","getTotalMarkers","setZoomOnClick","getBatchSizeIE","setBatchSizeIE","createClusters","getImageSizes","setImageSizes","setCalculator","removeMarkers","resetViewport","getImagePath","setImagePath","pushMarkerTo","clearMarkers","setupStyles","setGridSize","getClusters","setMaxZoom","addMarkers","setStyles","repaint","redraw","clusters","listeners","activeMap","ready","minimumClusterSize","zoomOnClick","ignoreHidden","imagePath","imageExtension","imageSizes","calculator","batchSize","batchSizeIE","clusterClass","navigator","userAgent","timerRefStatic","get","listener","fromContainerPixelToLatLng","fromDivPixelToLatLng","fromLatLngToContainerPixel","getVisibleRegion","getWorldWidth","bindTo","notify","setValues","unbind","unbindAll","optNoDraw","getDraggable","removeMarker_","splice","removed","markers_2","oldClusters","oldClusters_1","oldCluster","projection","trPix","getNorthEast","blPix","getSouthWest","point1","point2","optHide","distanceBetweenPoints","p1","p2","dLat","PI","dLon","sin","cos","R","atan2","sqrt","isMarkerInBounds","distance","clusterToAddTo","iFirst","mapBounds","extendedMapBounds","iLast","getVisible","obj1","obj2","object","property","eventMap$e","onClusteringBegin","onClusteringEnd","updaterMap$e","cancelHandler","ClustererComponent","setClustererCallback","InfoBox","getCloseClickHandler","closeClickHandler","createInfoBoxDiv","addClickHandler","getCloseBoxImg","getBoxWidths","setBoxStyle","setContent","getContent","getZIndex","panBox","close","open","content","disableAutoPan","maxWidth","pixelOffset","Size","boxClass","boxStyle","closeBoxMargin","closeBoxURL","infoBoxClearance","isHidden","alignBottom","pane","enableEventPropagation","closeListener","moveListener","mapListener","contextListener","eventListeners","fixedWidthSet","panes","offsetWidth","bw","right","events_1","event_1","returnValue","preventDefault","firstChild","disablePan","xOffset","yOffset","mapDiv","getDiv","mapWidth","mapHeight","offsetHeight","iwOffsetX","iwOffsetY","iwWidth","iwHeight","padX","padY","pixPosition","panBy","webkitTransform","parseFloat","msFilter","visibility","overflow","bottom","defaultView","ownerDocument","computedStyle","getComputedStyle","borderTopWidth","borderBottomWidth","borderLeftWidth","borderRightWidth","documentElement","currentStyle","isVisible","eventListener","eventMap$d","onCloseClick","onContentChanged","onDomReady","updaterMap$d","InfoBoxComponent","containerElement","infoBox","setInfoBoxCallback","positionLatLng","infoBoxOptions","__rest$1","getOwnPropertySymbols","propertyIsEnumerable","createPortal","only","equal","isArray","RegExp","source","flags","valueOf","ARRAY_TYPES","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","KDBush","from","data","ArrayBuffer","magic","versionAndType","VERSION","ArrayType","nodeSize","numItems","add","_pos","ids","coords","finish","numAdded","axis","m","select","k","z","log","exp","sd","newLeft","floor","newRight","j","swapItem","_finished","range","minX","minY","maxX","maxY","stack","within","qx","qy","r","r2","sqDist","isNaN","IndexArrayType","arrayTypeIndex","coordsByteSize","BYTES_PER_ELEMENT","idsByteSize","padCoords","HEADER_SIZE","swap","arr","ax","ay","bx","by","dx","dy","defaultOptions$2","minZoom","minPoints","radius","extent","generateId","fround","Supercluster","load","points","time","timerId","geometry","coordinates","lngX","latY","Infinity","tree","trees","_createTree","timeEnd","now","Date","_cluster","bbox","minLng","minLat","maxLng","maxLat","easternHem","westernHem","_limitZoom","stride","getClusterJSON","clusterProps","getChildren","clusterId","originId","_getOriginId","originZoom","_getOriginZoom","errorMsg","pow","getLeaves","limit","offset","leaves","_appendLeaves","getTile","z2","tile","features","_addTileFeatures","getClusterExpansionZoom","expansionZoom","properties","cluster_id","skipped","point_count","tags","px","py","isCluster","getClusterProperties","round","nextData","neighborIds","numPointsOrigin","numPoints","neighborId","clusterProperties","wx","wy","clusterPropIndex","numPoints2","_map","clone","original","atan","abbrev","propIndex","point_count_abbreviated","MarkerUtils","isAdvancedMarkerAvailable","getMapCapabilities","isAdvancedMarkersAvailable","isAdvancedMarker","AdvancedMarkerElement","_position","delete","extendBoundsToPaddedViewport","numPixels","northEast","southWest","latLngBoundsToPixelBounds","pixelBoundsToLatLngBounds","extendPixelBounds","param","sw","ne","AbstractAlgorithm","noop","noop$1","OverlayViewSafe","type1","type2","eventMap$c","updaterMap$c","InfoWindow","infoWindow","setInfoWindowCallback","eventMap$b","updaterMap$b","editable","setEditable","path","setPath","Polyline","polyline","setPolylineCallback","eventMap$a","updaterMap$a","paths","setPaths","Polygon","polygon","setPolygonCallback","eventMap$9","updaterMap$9","setBounds","Rectangle","rectangle","setRectangleCallback","eventMap$8","onRadiusChanged","updaterMap$8","setRadius","Circle","circle","setCircleCallback","eventMap$7","onAddFeature","onRemoveFeature","onRemoveProperty","onSetGeometry","onSetProperty","updaterMap$7","feature","addgeojson","geojson","addGeoJson","foreach","callback","loadgeojson","loadGeoJson","overridestyle","overrideStyle","revertstyle","revertStyle","controlposition","controlPosition","setControlPosition","controls","setControls","drawingmode","mode","setStyle","togeojson","toGeoJson","Data","setDataCallback","data_1","eventMap$6","onDefaultViewportChanged","onStatusChanged","updaterMap$6","setUrl","convertToLatLngString","latLngLike","convertToLatLngBoundsString","latLngBoundsLike","latLngBounds","south","east","north","west","KmlLayer","kmlLayer","setKmlLayerCallback","paneEl","containerStyle","updatePane","mapPaneName","mapPanes","overlayView","onPositionElement","inst","getPixelPositionOffset","mapCanvasProjection","previousPosition","layoutStyles","containerRef","getLayoutStylesByPosition","point","currentPosition","prevPositionString","positionString","prevBoundsString","boundsString","ReactDOM","FLOAT_PANE","MAP_PANE","MARKER_LAYER","OVERLAY_LAYER","OVERLAY_MOUSE_TARGET","eventMap$5","updaterMap$5","GroundOverlay","groundOverlay","setGroundOverlayCallback","eventMap$4","updaterMap$4","setData","HeatmapLayer","heatmapLayer","setHeatmapLayerCallback","visualization","eventMap$3","onPanoChanged","onPovChanged","updaterMap$3","register","provider","registerPanoProvider","links","setLinks","motionTracking","setMotionTracking","pano","setPano","pov","setPov","StreetViewPanorama","streetViewPanorama","setStreetViewPanoramaCallback","getStreetView","StreetViewService","streetViewService","setStreetViewServiceCallback","DirectionsService","directionsService","setDirectionsServiceCallback","route","eventMap$2","onDirectionsChanged","updaterMap$2","directions","setDirections","panel","setPanel","routeIndex","setRouteIndex","DirectionsRenderer","directionsRenderer","setDirectionsRendererCallback","DistanceMatrixService","distanceMatrixService","setDistanceMatrixServiceCallback","getDistanceMatrix","eventMap$1","onPlacesChanged","updaterMap$1","StandaloneSearchBox","searchBox","setSearchBoxCallback","places","input","querySelector","searchBox_1","SearchBox","onPlaceChanged","restrictions","setComponentRestrictions","fields","setFields","types","setTypes","Autocomplete","autocomplete","setAutocompleteCallback","autocomplete_1"],"sourceRoot":""}