{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./app/assets/images/centredil-logo-marker.svg","webpack:///./app/assets/images/network-marker-gruppo.svg","webpack:///./app/assets/images/worksite_marker.svg","webpack:///./node_modules/@googlemaps/markerclustererplus/dist/index.esm.js","webpack:///./app/javascript/packs/map.js","webpack:///./app/javascript/packs/application.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","_extendStatics","b","setPrototypeOf","__proto__","Array","__extends","TypeError","String","__","this","constructor","_assign","assign","arguments","length","apply","OverlayViewSafe","type1","type2","extend","google","maps","OverlayView","toCssText","styles","keys","reduce","acc","push","join","coercePixels","pixels","undefined","ClusterIcon","_super","cluster_","styles_","_this","center_","div_","sums_","visible_","style","setMap","getMap","onAdd","cMouseDownInCluster","cDraggingMapByCluster","mc","getMarkerClusterer","_a","version","split","major","minor","gmVersion","parseInt","document","createElement","show","getPanes","overlayMouseTarget","appendChild","boundsChangedListener_","event","addListener","addDomListener","trigger","e","stopPropagation","getZoomOnClick","mz_1","getMaxZoom","theBounds_1","getBounds","fitBounds","setTimeout","getZoom","setZoom","cancelBubble","onRemove","parentNode","hide","removeListener","clearInstanceListeners","removeChild","draw","pos","getPosFromLatLng_","top","y","left","x","display","className","className_","cssText","createCss_","innerHTML","url","getImageElementHtml","getLabelDivHtml","title","getTitle","ariaLabelFn","text","position","anchorText_","color","textColor","textSize","fontFamily","fontWeight","fontStyle","textDecoration","width","textLineHeight","bp","backgroundPosition","spriteH","replace","spriteV","dimensions","getEnableRetinaIcons","height","clip","overrideDimensionsDynamicIcon","useStyle","sums","index","Math","max","min","anchorText","anchorIcon_","anchorIcon","floor","getClusterClass","setCenter","center","getZIndex","cursor","latlng","getProjection","fromLatLngToDivPixel","Cluster","markerClusterer_","map_","minClusterSize_","getMinimumClusterSize","averageCenter_","getAverageCenter","markers_","bounds_","clusterIcon_","getStyles","getSize","getMarkers","getCenter","bounds","LatLngBounds","markers","getPosition","remove","addMarker","marker","isMarkerAlreadyAdded_","lat","lng","LatLng","calculateBounds_","isAdded","mCount","mz","isMarkerInClusterBounds","contains","getExtendedBounds","updateIcon","numStyles","getCalculator","indexOf","getOption","options","prop","def","MarkerClusterer","map","clusters_","listeners_","activeMap_","ready_","zIndex_","zIndex","Number","Marker","MAX_ZINDEX","gridSize_","gridSize","minimumClusterSize","maxZoom_","maxZoom","title_","zoomOnClick_","ignoreHidden_","enableRetinaIcons_","imagePath_","imagePath","IMAGE_PATH","imageExtension_","imageExtension","IMAGE_EXTENSION","imageSizes_","imageSizes","IMAGE_SIZES","calculator_","calculator","CALCULATOR","batchSize_","batchSize","BATCH_SIZE","batchSizeIE_","batchSizeIE","BATCH_SIZE_IE","clusterClass_","clusterClass","navigator","userAgent","toLowerCase","setupStyles_","addMarkers","repaint","prevZoom_","minZoom","mapTypes","getMapTypeId","zoom","resetViewport_","redraw_","size","withDefaultStyle","fitMapToMarkers","padding","getVisible","getIgnoreHidden","getGridSize","setGridSize","setMinimumClusterSize","setMaxZoom","setZIndex","setStyles","setTitle","setZoomOnClick","zoomOnClick","setAverageCenter","averageCenter","setIgnoreHidden","ignoreHidden","setEnableRetinaIcons","enableRetinaIcons","getImageExtension","setImageExtension","getImagePath","setImagePath","getImageSizes","setImageSizes","setCalculator","getBatchSizeIE","setBatchSizeIE","setClusterClass","getTotalMarkers","getClusters","getTotalClusters","nodraw","pushMarkerTo_","getDraggable","removeMarker","removed","removeMarker_","removeMarkers","splice","clearMarkers","oldClusters","slice","projection","tr","getNorthEast","bl","getSouthWest","trPix","blPix","ne","fromDivPixelToLatLng","sw","createClusters_","distanceBetweenPoints_","p1","p2","dLat","PI","dLon","a","sin","cos","atan2","sqrt","isMarkerInBounds_","addToClosestCluster_","distance","clusterToAddTo","cluster","iFirst","mapBounds","timerRefStatic","clearTimeout","iLast","window","count","dv","toString","overrides","pointsMap","CEPoints","otherPoints","centerPoint","UserCoords","defaultCoord","geolocation","getCurrentPosition","coords","latitude","longitude","getLocation","mapOptions","Map","getElementById","forEach","point","icon","ceMarker","location","href","netMarker","routeMap","startLat","startLng","destLat","destLng","pointA","pointB","myOptions","suppressMarkers","directionsService","DirectionsService","directionsDisplay","DirectionsRenderer","wsMarker","route","origin","destination","avoidTolls","avoidHighways","travelMode","TravelMode","DRIVING","response","status","DirectionsStatus","OK","setDirections","alert","calculateAndDisplayRoute"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,qBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAA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,EAAmBE,EAAmBN,EAAQC,K,6BCpI3E","file":"js/application-41fd726a4615d9299c4f.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/packs/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n","module.exports = __webpack_public_path__ + \"media/images/centredil-logo-marker-d011677b.svg\";","module.exports = __webpack_public_path__ + \"media/images/network-marker-gruppo-803b177a.svg\";","module.exports = __webpack_public_path__ + \"media/images/worksite_marker-dd4ded0f.svg\";","/*! *****************************************************************************\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***************************************************************************** */\n\n/* global Reflect, Promise */\nvar _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n};\n\nfunction __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nvar _assign = function __assign() {\n _assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return _assign.apply(this, arguments);\n};\n/**\r\n * Copyright 2019 Google LLC. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Extends an object's prototype by another's.\r\n *\r\n * @param type1 The Type to be extended.\r\n * @param type2 The Type to extend with.\r\n * @ignore\r\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nfunction extend(type1, type2) {\n // eslint-disable-next-line prefer-const\n for (var property in type2.prototype) {\n type1.prototype[property] = type2.prototype[property];\n }\n}\n/**\r\n * @ignore\r\n */\n\n\nvar OverlayViewSafe =\n/** @class */\nfunction () {\n function OverlayViewSafe() {\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 return OverlayViewSafe;\n}();\n/**\r\n * Copyright 2019 Google LLC. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n *\r\n * @hidden\r\n */\n\n\nfunction toCssText(styles) {\n return Object.keys(styles).reduce(function (acc, key) {\n if (styles[key]) {\n acc.push(key + \":\" + styles[key]);\n }\n\n return acc;\n }, []).join(\";\");\n}\n/**\r\n *\r\n * @hidden\r\n */\n\n\nfunction coercePixels(pixels) {\n return pixels ? pixels + \"px\" : undefined;\n}\n/**\r\n * A cluster icon.\r\n */\n\n\nvar ClusterIcon =\n/** @class */\nfunction (_super) {\n __extends(ClusterIcon, _super);\n /**\r\n * @param cluster_ The cluster with which the icon is to be associated.\r\n * @param styles_ An array of {@link ClusterIconStyle} defining the cluster icons\r\n * to use for various cluster sizes.\r\n */\n\n\n function ClusterIcon(cluster_, styles_) {\n var _this = _super.call(this) || this;\n\n _this.cluster_ = cluster_;\n _this.styles_ = styles_;\n _this.center_ = null;\n _this.div_ = null;\n _this.sums_ = null;\n _this.visible_ = false;\n _this.style = null;\n\n _this.setMap(cluster_.getMap()); // Note: this causes onAdd to be called\n\n\n return _this;\n }\n /**\r\n * Adds the icon to the DOM.\r\n */\n\n\n ClusterIcon.prototype.onAdd = function () {\n var _this = this;\n\n var cMouseDownInCluster;\n var cDraggingMapByCluster;\n var mc = this.cluster_.getMarkerClusterer();\n\n var _a = google.maps.version.split(\".\"),\n major = _a[0],\n minor = _a[1];\n\n var gmVersion = parseInt(major, 10) * 100 + parseInt(minor, 10);\n this.div_ = document.createElement(\"div\");\n\n if (this.visible_) {\n this.show();\n }\n\n this.getPanes().overlayMouseTarget.appendChild(this.div_); // Fix for Issue 157\n\n this.boundsChangedListener_ = google.maps.event.addListener(this.getMap(), \"bounds_changed\", function () {\n cDraggingMapByCluster = cMouseDownInCluster;\n });\n google.maps.event.addDomListener(this.div_, \"mousedown\", function () {\n cMouseDownInCluster = true;\n cDraggingMapByCluster = false;\n });\n google.maps.event.addDomListener(this.div_, \"contextmenu\", function () {\n /**\r\n * This event is fired when a cluster marker contextmenu is requested.\r\n * @name MarkerClusterer#mouseover\r\n * @param {Cluster} c The cluster that the contextmenu is requested.\r\n * @event\r\n */\n google.maps.event.trigger(mc, \"contextmenu\", _this.cluster_);\n }); // March 1, 2018: Fix for this 3.32 exp bug, https://issuetracker.google.com/issues/73571522\n // But it doesn't work with earlier releases so do a version check.\n\n if (gmVersion >= 332) {\n // Ugly version-dependent code\n google.maps.event.addDomListener(this.div_, \"touchstart\", function (e) {\n e.stopPropagation();\n });\n }\n\n google.maps.event.addDomListener(this.div_, \"click\", function (e) {\n cMouseDownInCluster = false;\n\n if (!cDraggingMapByCluster) {\n /**\r\n * This event is fired when a cluster marker is clicked.\r\n * @name MarkerClusterer#click\r\n * @param {Cluster} c The cluster that was clicked.\r\n * @event\r\n */\n google.maps.event.trigger(mc, \"click\", _this.cluster_);\n google.maps.event.trigger(mc, \"clusterclick\", _this.cluster_); // deprecated name\n // The default click handler follows. Disable it by setting\n // the zoomOnClick property to false.\n\n if (mc.getZoomOnClick()) {\n // Zoom into the cluster.\n var mz_1 = mc.getMaxZoom();\n\n var theBounds_1 = _this.cluster_.getBounds();\n\n mc.getMap().fitBounds(theBounds_1); // There is a fix for Issue 170 here:\n\n setTimeout(function () {\n mc.getMap().fitBounds(theBounds_1); // Don't zoom beyond the max zoom level\n\n if (mz_1 !== null && mc.getMap().getZoom() > mz_1) {\n mc.getMap().setZoom(mz_1 + 1);\n }\n }, 100);\n } // Prevent event propagation to the map:\n\n\n e.cancelBubble = true;\n\n if (e.stopPropagation) {\n e.stopPropagation();\n }\n }\n });\n google.maps.event.addDomListener(this.div_, \"mouseover\", function () {\n /**\r\n * This event is fired when the mouse moves over a cluster marker.\r\n * @name MarkerClusterer#mouseover\r\n * @param {Cluster} c The cluster that the mouse moved over.\r\n * @event\r\n */\n google.maps.event.trigger(mc, \"mouseover\", _this.cluster_);\n });\n google.maps.event.addDomListener(this.div_, \"mouseout\", function () {\n /**\r\n * This event is fired when the mouse moves out of a cluster marker.\r\n * @name MarkerClusterer#mouseout\r\n * @param {Cluster} c The cluster that the mouse moved out of.\r\n * @event\r\n */\n google.maps.event.trigger(mc, \"mouseout\", _this.cluster_);\n });\n };\n /**\r\n * Removes the icon from the DOM.\r\n */\n\n\n ClusterIcon.prototype.onRemove = function () {\n if (this.div_ && this.div_.parentNode) {\n this.hide();\n google.maps.event.removeListener(this.boundsChangedListener_);\n google.maps.event.clearInstanceListeners(this.div_);\n this.div_.parentNode.removeChild(this.div_);\n this.div_ = null;\n }\n };\n /**\r\n * Draws the icon.\r\n */\n\n\n ClusterIcon.prototype.draw = function () {\n if (this.visible_) {\n var pos = this.getPosFromLatLng_(this.center_);\n this.div_.style.top = pos.y + \"px\";\n this.div_.style.left = pos.x + \"px\";\n }\n };\n /**\r\n * Hides the icon.\r\n */\n\n\n ClusterIcon.prototype.hide = function () {\n if (this.div_) {\n this.div_.style.display = \"none\";\n }\n\n this.visible_ = false;\n };\n /**\r\n * Positions and shows the icon.\r\n */\n\n\n ClusterIcon.prototype.show = function () {\n if (this.div_) {\n this.div_.className = this.className_;\n this.div_.style.cssText = this.createCss_(this.getPosFromLatLng_(this.center_));\n this.div_.innerHTML = (this.style.url ? this.getImageElementHtml() : \"\") + this.getLabelDivHtml();\n\n if (typeof this.sums_.title === \"undefined\" || this.sums_.title === \"\") {\n this.div_.title = this.cluster_.getMarkerClusterer().getTitle();\n } else {\n this.div_.title = this.sums_.title;\n }\n\n this.div_.style.display = \"\";\n }\n\n this.visible_ = true;\n };\n\n ClusterIcon.prototype.getLabelDivHtml = function () {\n var mc = this.cluster_.getMarkerClusterer();\n var ariaLabel = mc.ariaLabelFn(this.sums_.text);\n var divStyle = {\n position: \"absolute\",\n top: coercePixels(this.anchorText_[0]),\n left: coercePixels(this.anchorText_[1]),\n color: this.style.textColor,\n \"font-size\": coercePixels(this.style.textSize),\n \"font-family\": this.style.fontFamily,\n \"font-weight\": this.style.fontWeight,\n \"font-style\": this.style.fontStyle,\n \"text-decoration\": this.style.textDecoration,\n \"text-align\": \"center\",\n width: coercePixels(this.style.width),\n \"line-height\": coercePixels(this.style.textLineHeight)\n };\n return \"\\n
\\n \" + this.sums_.text + \"\\n
\\n\";\n };\n\n ClusterIcon.prototype.getImageElementHtml = function () {\n // NOTE: values must be specified in px units\n var bp = (this.style.backgroundPosition || \"0 0\").split(\" \");\n var spriteH = parseInt(bp[0].replace(/^\\s+|\\s+$/g, \"\"), 10);\n var spriteV = parseInt(bp[1].replace(/^\\s+|\\s+$/g, \"\"), 10);\n var dimensions = {};\n\n if (this.cluster_.getMarkerClusterer().getEnableRetinaIcons()) {\n dimensions = {\n width: coercePixels(this.style.width),\n height: coercePixels(this.style.height)\n };\n } else {\n var _a = [-1 * spriteV, -1 * spriteH + this.style.width, -1 * spriteV + this.style.height, -1 * spriteH],\n Y1 = _a[0],\n X1 = _a[1],\n Y2 = _a[2],\n X2 = _a[3];\n dimensions = {\n clip: \"rect(\" + Y1 + \"px, \" + X1 + \"px, \" + Y2 + \"px, \" + X2 + \"px)\"\n };\n }\n\n var overrideDimensionsDynamicIcon = this.sums_.url ? {\n width: \"100%\",\n height: \"100%\"\n } : {};\n var cssText = toCssText(_assign(_assign({\n position: \"absolute\",\n top: coercePixels(spriteV),\n left: coercePixels(spriteH)\n }, dimensions), overrideDimensionsDynamicIcon));\n return \"\\\"\"\";\n };\n /**\r\n * Sets the icon styles to the appropriate element in the styles array.\r\n *\r\n * @ignore\r\n * @param sums The icon label text and styles index.\r\n */\n\n\n ClusterIcon.prototype.useStyle = function (sums) {\n this.sums_ = sums;\n var index = Math.max(0, sums.index - 1);\n index = Math.min(this.styles_.length - 1, index);\n this.style = this.sums_.url ? _assign(_assign({}, this.styles_[index]), {\n url: this.sums_.url\n }) : this.styles_[index];\n this.anchorText_ = this.style.anchorText || [0, 0];\n this.anchorIcon_ = this.style.anchorIcon || [Math.floor(this.style.height / 2), Math.floor(this.style.width / 2)];\n this.className_ = this.cluster_.getMarkerClusterer().getClusterClass() + \" \" + (this.style.className || \"cluster-\" + index);\n };\n /**\r\n * Sets the position at which to center the icon.\r\n *\r\n * @param center The latlng to set as the center.\r\n */\n\n\n ClusterIcon.prototype.setCenter = function (center) {\n this.center_ = center;\n };\n /**\r\n * Creates the `cssText` style parameter based on the position of the icon.\r\n *\r\n * @param pos The position of the icon.\r\n * @return The CSS style text.\r\n */\n\n\n ClusterIcon.prototype.createCss_ = function (pos) {\n return toCssText({\n \"z-index\": \"\" + this.cluster_.getMarkerClusterer().getZIndex(),\n top: coercePixels(pos.y),\n left: coercePixels(pos.x),\n width: coercePixels(this.style.width),\n height: coercePixels(this.style.height),\n cursor: \"pointer\",\n position: \"absolute\",\n \"-webkit-user-select\": \"none\",\n \"-khtml-user-select\": \"none\",\n \"-moz-user-select\": \"none\",\n \"-o-user-select\": \"none\",\n \"user-select\": \"none\"\n });\n };\n /**\r\n * Returns the position at which to place the DIV depending on the latlng.\r\n *\r\n * @param latlng The position in latlng.\r\n * @return The position in pixels.\r\n */\n\n\n ClusterIcon.prototype.getPosFromLatLng_ = function (latlng) {\n var pos = this.getProjection().fromLatLngToDivPixel(latlng);\n pos.x = Math.floor(pos.x - this.anchorIcon_[1]);\n pos.y = Math.floor(pos.y - this.anchorIcon_[0]);\n return pos;\n };\n\n return ClusterIcon;\n}(OverlayViewSafe);\n/**\r\n * Copyright 2019 Google LLC. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Creates a single cluster that manages a group of proximate markers.\r\n * Used internally, do not call this constructor directly.\r\n */\n\n\nvar Cluster =\n/** @class */\nfunction () {\n /**\r\n *\r\n * @param markerClusterer_ The `MarkerClusterer` object with which this\r\n * cluster is associated.\r\n */\n function Cluster(markerClusterer_) {\n this.markerClusterer_ = markerClusterer_;\n this.map_ = this.markerClusterer_.getMap();\n this.minClusterSize_ = this.markerClusterer_.getMinimumClusterSize();\n this.averageCenter_ = this.markerClusterer_.getAverageCenter();\n this.markers_ = []; // TODO: type;\n\n this.center_ = null;\n this.bounds_ = null;\n this.clusterIcon_ = new ClusterIcon(this, this.markerClusterer_.getStyles());\n }\n /**\r\n * Returns the number of markers managed by the cluster. You can call this from\r\n * a `click`, `mouseover`, or `mouseout` event handler for the `MarkerClusterer` object.\r\n *\r\n * @return The number of markers in the cluster.\r\n */\n\n\n Cluster.prototype.getSize = function () {\n return this.markers_.length;\n };\n /**\r\n * Returns the array of markers managed by the cluster. You can call this from\r\n * a `click`, `mouseover`, or `mouseout` event handler for the `MarkerClusterer` object.\r\n *\r\n * @return The array of markers in the cluster.\r\n */\n\n\n Cluster.prototype.getMarkers = function () {\n return this.markers_;\n };\n /**\r\n * Returns the center of the cluster. You can call this from\r\n * a `click`, `mouseover`, or `mouseout` event handler\r\n * for the `MarkerClusterer` object.\r\n *\r\n * @return The center of the cluster.\r\n */\n\n\n Cluster.prototype.getCenter = function () {\n return this.center_;\n };\n /**\r\n * Returns the map with which the cluster is associated.\r\n *\r\n * @return The map.\r\n * @ignore\r\n */\n\n\n Cluster.prototype.getMap = function () {\n return this.map_;\n };\n /**\r\n * Returns the `MarkerClusterer` object with which the cluster is associated.\r\n *\r\n * @return The associated marker clusterer.\r\n * @ignore\r\n */\n\n\n Cluster.prototype.getMarkerClusterer = function () {\n return this.markerClusterer_;\n };\n /**\r\n * Returns the bounds of the cluster.\r\n *\r\n * @return the cluster bounds.\r\n * @ignore\r\n */\n\n\n Cluster.prototype.getBounds = function () {\n var bounds = new google.maps.LatLngBounds(this.center_, this.center_);\n var markers = this.getMarkers();\n\n for (var i = 0; i < markers.length; i++) {\n bounds.extend(markers[i].getPosition());\n }\n\n return bounds;\n };\n /**\r\n * Removes the cluster from the map.\r\n *\r\n * @ignore\r\n */\n\n\n Cluster.prototype.remove = function () {\n this.clusterIcon_.setMap(null);\n this.markers_ = [];\n delete this.markers_;\n };\n /**\r\n * Adds a marker to the cluster.\r\n *\r\n * @param marker The marker to be added.\r\n * @return True if the marker was added.\r\n * @ignore\r\n */\n\n\n Cluster.prototype.addMarker = function (marker) {\n if (this.isMarkerAlreadyAdded_(marker)) {\n return false;\n }\n\n if (!this.center_) {\n this.center_ = marker.getPosition();\n this.calculateBounds_();\n } else {\n if (this.averageCenter_) {\n var l = this.markers_.length + 1;\n var lat = (this.center_.lat() * (l - 1) + marker.getPosition().lat()) / l;\n var lng = (this.center_.lng() * (l - 1) + marker.getPosition().lng()) / l;\n this.center_ = new google.maps.LatLng(lat, lng);\n this.calculateBounds_();\n }\n }\n\n marker.isAdded = true;\n this.markers_.push(marker);\n var mCount = this.markers_.length;\n var mz = this.markerClusterer_.getMaxZoom();\n\n if (mz !== null && this.map_.getZoom() > mz) {\n // Zoomed in past max zoom, so show the marker.\n if (marker.getMap() !== this.map_) {\n marker.setMap(this.map_);\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 } else if (mCount === this.minClusterSize_) {\n // Hide the markers that were showing.\n for (var i = 0; i < mCount; i++) {\n this.markers_[i].setMap(null);\n }\n } else {\n marker.setMap(null);\n }\n\n return true;\n };\n /**\r\n * Determines if a marker lies within the cluster's bounds.\r\n *\r\n * @param marker The marker to check.\r\n * @return True if the marker lies in the bounds.\r\n * @ignore\r\n */\n\n\n Cluster.prototype.isMarkerInClusterBounds = function (marker) {\n return this.bounds_.contains(marker.getPosition());\n };\n /**\r\n * Calculates the extended bounds of the cluster with the grid.\r\n */\n\n\n Cluster.prototype.calculateBounds_ = function () {\n var bounds = new google.maps.LatLngBounds(this.center_, this.center_);\n this.bounds_ = this.markerClusterer_.getExtendedBounds(bounds);\n };\n /**\r\n * Updates the cluster icon.\r\n */\n\n\n Cluster.prototype.updateIcon = function () {\n var mCount = this.markers_.length;\n var mz = this.markerClusterer_.getMaxZoom();\n\n if (mz !== null && this.map_.getZoom() > mz) {\n this.clusterIcon_.hide();\n return;\n }\n\n if (mCount < this.minClusterSize_) {\n // Min cluster size not yet reached.\n this.clusterIcon_.hide();\n return;\n }\n\n var numStyles = this.markerClusterer_.getStyles().length;\n var sums = this.markerClusterer_.getCalculator()(this.markers_, numStyles);\n this.clusterIcon_.setCenter(this.center_);\n this.clusterIcon_.useStyle(sums);\n this.clusterIcon_.show();\n };\n /**\r\n * Determines if a marker has already been added to the cluster.\r\n *\r\n * @param marker The marker to check.\r\n * @return True if the marker has already been added.\r\n */\n\n\n Cluster.prototype.isMarkerAlreadyAdded_ = function (marker) {\n if (this.markers_.indexOf) {\n return this.markers_.indexOf(marker) !== -1;\n } else {\n for (var i = 0; i < this.markers_.length; i++) {\n if (marker === this.markers_[i]) {\n return true;\n }\n }\n }\n\n return false;\n };\n\n return Cluster;\n}();\n/**\r\n * Copyright 2019 Google LLC. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * @ignore\r\n */\n\n\nvar getOption = function getOption(options, prop, def) {\n if (options[prop] !== undefined) {\n return options[prop];\n } else {\n return def;\n }\n};\n\nvar MarkerClusterer =\n/** @class */\nfunction (_super) {\n __extends(MarkerClusterer, _super);\n /**\r\n * Creates a MarkerClusterer object with the options specified in {@link MarkerClustererOptions}.\r\n * @param map The Google map to attach to.\r\n * @param markers The markers to be added to the cluster.\r\n * @param options The optional parameters.\r\n */\n\n\n function MarkerClusterer(map, markers, options) {\n if (markers === void 0) {\n markers = [];\n }\n\n if (options === void 0) {\n options = {};\n }\n\n var _this = _super.call(this) || this;\n\n _this.options = options;\n _this.markers_ = [];\n _this.clusters_ = [];\n _this.listeners_ = [];\n _this.activeMap_ = null;\n _this.ready_ = false;\n\n _this.ariaLabelFn = _this.options.ariaLabelFn || function () {\n return \"\";\n };\n\n _this.zIndex_ = _this.options.zIndex || Number(google.maps.Marker.MAX_ZINDEX) + 1;\n _this.gridSize_ = _this.options.gridSize || 60;\n _this.minClusterSize_ = _this.options.minimumClusterSize || 2;\n _this.maxZoom_ = _this.options.maxZoom || null;\n _this.styles_ = _this.options.styles || [];\n _this.title_ = _this.options.title || \"\";\n _this.zoomOnClick_ = getOption(_this.options, \"zoomOnClick\", true);\n _this.averageCenter_ = getOption(_this.options, \"averageCenter\", false);\n _this.ignoreHidden_ = getOption(_this.options, \"ignoreHidden\", false);\n _this.enableRetinaIcons_ = getOption(_this.options, \"enableRetinaIcons\", false);\n _this.imagePath_ = _this.options.imagePath || MarkerClusterer.IMAGE_PATH;\n _this.imageExtension_ = _this.options.imageExtension || MarkerClusterer.IMAGE_EXTENSION;\n _this.imageSizes_ = _this.options.imageSizes || MarkerClusterer.IMAGE_SIZES;\n _this.calculator_ = _this.options.calculator || MarkerClusterer.CALCULATOR;\n _this.batchSize_ = _this.options.batchSize || MarkerClusterer.BATCH_SIZE;\n _this.batchSizeIE_ = _this.options.batchSizeIE || MarkerClusterer.BATCH_SIZE_IE;\n _this.clusterClass_ = _this.options.clusterClass || \"cluster\";\n\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\n _this.setupStyles_();\n\n _this.addMarkers(markers, true);\n\n _this.setMap(map); // Note: this causes onAdd to be called\n\n\n return _this;\n }\n /**\r\n * Implementation of the onAdd interface method.\r\n * @ignore\r\n */\n\n\n MarkerClusterer.prototype.onAdd = function () {\n var _this = this;\n\n this.activeMap_ = this.getMap();\n this.ready_ = true;\n this.repaint();\n this.prevZoom_ = this.getMap().getZoom(); // Add the map event listeners\n\n this.listeners_ = [google.maps.event.addListener(this.getMap(), \"zoom_changed\", function () {\n var map = _this.getMap(); // eslint-disable-line @typescript-eslint/no-explicit-any\n // Fix for bug #407\n // Determines map type and prevents illegal zoom levels\n\n\n var minZoom = map.minZoom || 0;\n var maxZoom = Math.min(map.maxZoom || 100, map.mapTypes[map.getMapTypeId()].maxZoom);\n var zoom = Math.min(Math.max(_this.getMap().getZoom(), minZoom), maxZoom);\n\n if (_this.prevZoom_ != zoom) {\n _this.prevZoom_ = zoom;\n\n _this.resetViewport_(false);\n }\n }), google.maps.event.addListener(this.getMap(), \"idle\", function () {\n _this.redraw_();\n })];\n };\n /**\r\n * Implementation of the onRemove interface method.\r\n * Removes map event listeners and all cluster icons from the DOM.\r\n * All managed markers are also put back on the map.\r\n * @ignore\r\n */\n\n\n MarkerClusterer.prototype.onRemove = function () {\n // Put all the managed markers back on the map:\n for (var i = 0; i < this.markers_.length; i++) {\n if (this.markers_[i].getMap() !== this.activeMap_) {\n this.markers_[i].setMap(this.activeMap_);\n }\n } // Remove all clusters:\n\n\n for (var i = 0; i < this.clusters_.length; i++) {\n this.clusters_[i].remove();\n }\n\n this.clusters_ = []; // Remove map event listeners:\n\n for (var i = 0; i < this.listeners_.length; i++) {\n google.maps.event.removeListener(this.listeners_[i]);\n }\n\n this.listeners_ = [];\n this.activeMap_ = null;\n this.ready_ = false;\n };\n /**\r\n * Implementation of the draw interface method.\r\n * @ignore\r\n */\n\n\n MarkerClusterer.prototype.draw = function () {};\n /**\r\n * Sets up the styles object.\r\n */\n\n\n MarkerClusterer.prototype.setupStyles_ = function () {\n if (this.styles_.length > 0) {\n return;\n }\n\n for (var i = 0; i < this.imageSizes_.length; i++) {\n var size = this.imageSizes_[i];\n this.styles_.push(MarkerClusterer.withDefaultStyle({\n url: this.imagePath_ + (i + 1) + \".\" + this.imageExtension_,\n height: size,\n width: size\n }));\n }\n };\n /**\r\n * Fits the map to the bounds of the markers managed by the clusterer.\r\n */\n\n\n MarkerClusterer.prototype.fitMapToMarkers = function (padding) {\n var markers = this.getMarkers();\n var bounds = new google.maps.LatLngBounds();\n\n for (var i = 0; i < markers.length; i++) {\n // March 3, 2018: Bug fix -- honor the ignoreHidden property\n if (markers[i].getVisible() || !this.getIgnoreHidden()) {\n bounds.extend(markers[i].getPosition());\n }\n }\n\n this.getMap().fitBounds(bounds, padding);\n };\n /**\r\n * Returns the value of the `gridSize` property.\r\n *\r\n * @return The grid size.\r\n */\n\n\n MarkerClusterer.prototype.getGridSize = function () {\n return this.gridSize_;\n };\n /**\r\n * Sets the value of the `gridSize` property.\r\n *\r\n * @param gridSize The grid size.\r\n */\n\n\n MarkerClusterer.prototype.setGridSize = function (gridSize) {\n this.gridSize_ = gridSize;\n };\n /**\r\n * Returns the value of the `minimumClusterSize` property.\r\n *\r\n * @return The minimum cluster size.\r\n */\n\n\n MarkerClusterer.prototype.getMinimumClusterSize = function () {\n return this.minClusterSize_;\n };\n /**\r\n * Sets the value of the `minimumClusterSize` property.\r\n *\r\n * @param minimumClusterSize The minimum cluster size.\r\n */\n\n\n MarkerClusterer.prototype.setMinimumClusterSize = function (minimumClusterSize) {\n this.minClusterSize_ = minimumClusterSize;\n };\n /**\r\n * Returns the value of the `maxZoom` property.\r\n *\r\n * @return The maximum zoom level.\r\n */\n\n\n MarkerClusterer.prototype.getMaxZoom = function () {\n return this.maxZoom_;\n };\n /**\r\n * Sets the value of the `maxZoom` property.\r\n *\r\n * @param maxZoom The maximum zoom level.\r\n */\n\n\n MarkerClusterer.prototype.setMaxZoom = function (maxZoom) {\n this.maxZoom_ = maxZoom;\n };\n\n MarkerClusterer.prototype.getZIndex = function () {\n return this.zIndex_;\n };\n\n MarkerClusterer.prototype.setZIndex = function (zIndex) {\n this.zIndex_ = zIndex;\n };\n /**\r\n * Returns the value of the `styles` property.\r\n *\r\n * @return The array of styles defining the cluster markers to be used.\r\n */\n\n\n MarkerClusterer.prototype.getStyles = function () {\n return this.styles_;\n };\n /**\r\n * Sets the value of the `styles` property.\r\n *\r\n * @param styles The array of styles to use.\r\n */\n\n\n MarkerClusterer.prototype.setStyles = function (styles) {\n this.styles_ = styles;\n };\n /**\r\n * Returns the value of the `title` property.\r\n *\r\n * @return The content of the title text.\r\n */\n\n\n MarkerClusterer.prototype.getTitle = function () {\n return this.title_;\n };\n /**\r\n * Sets the value of the `title` property.\r\n *\r\n * @param title The value of the title property.\r\n */\n\n\n MarkerClusterer.prototype.setTitle = function (title) {\n this.title_ = title;\n };\n /**\r\n * Returns the value of the `zoomOnClick` property.\r\n *\r\n * @return True if zoomOnClick property is set.\r\n */\n\n\n MarkerClusterer.prototype.getZoomOnClick = function () {\n return this.zoomOnClick_;\n };\n /**\r\n * Sets the value of the `zoomOnClick` property.\r\n *\r\n * @param zoomOnClick The value of the zoomOnClick property.\r\n */\n\n\n MarkerClusterer.prototype.setZoomOnClick = function (zoomOnClick) {\n this.zoomOnClick_ = zoomOnClick;\n };\n /**\r\n * Returns the value of the `averageCenter` property.\r\n *\r\n * @return True if averageCenter property is set.\r\n */\n\n\n MarkerClusterer.prototype.getAverageCenter = function () {\n return this.averageCenter_;\n };\n /**\r\n * Sets the value of the `averageCenter` property.\r\n *\r\n * @param averageCenter The value of the averageCenter property.\r\n */\n\n\n MarkerClusterer.prototype.setAverageCenter = function (averageCenter) {\n this.averageCenter_ = averageCenter;\n };\n /**\r\n * Returns the value of the `ignoreHidden` property.\r\n *\r\n * @return True if ignoreHidden property is set.\r\n */\n\n\n MarkerClusterer.prototype.getIgnoreHidden = function () {\n return this.ignoreHidden_;\n };\n /**\r\n * Sets the value of the `ignoreHidden` property.\r\n *\r\n * @param ignoreHidden The value of the ignoreHidden property.\r\n */\n\n\n MarkerClusterer.prototype.setIgnoreHidden = function (ignoreHidden) {\n this.ignoreHidden_ = ignoreHidden;\n };\n /**\r\n * Returns the value of the `enableRetinaIcons` property.\r\n *\r\n * @return True if enableRetinaIcons property is set.\r\n */\n\n\n MarkerClusterer.prototype.getEnableRetinaIcons = function () {\n return this.enableRetinaIcons_;\n };\n /**\r\n * Sets the value of the `enableRetinaIcons` property.\r\n *\r\n * @param enableRetinaIcons The value of the enableRetinaIcons property.\r\n */\n\n\n MarkerClusterer.prototype.setEnableRetinaIcons = function (enableRetinaIcons) {\n this.enableRetinaIcons_ = enableRetinaIcons;\n };\n /**\r\n * Returns the value of the `imageExtension` property.\r\n *\r\n * @return The value of the imageExtension property.\r\n */\n\n\n MarkerClusterer.prototype.getImageExtension = function () {\n return this.imageExtension_;\n };\n /**\r\n * Sets the value of the `imageExtension` property.\r\n *\r\n * @param imageExtension The value of the imageExtension property.\r\n */\n\n\n MarkerClusterer.prototype.setImageExtension = function (imageExtension) {\n this.imageExtension_ = imageExtension;\n };\n /**\r\n * Returns the value of the `imagePath` property.\r\n *\r\n * @return The value of the imagePath property.\r\n */\n\n\n MarkerClusterer.prototype.getImagePath = function () {\n return this.imagePath_;\n };\n /**\r\n * Sets the value of the `imagePath` property.\r\n *\r\n * @param imagePath The value of the imagePath property.\r\n */\n\n\n MarkerClusterer.prototype.setImagePath = function (imagePath) {\n this.imagePath_ = imagePath;\n };\n /**\r\n * Returns the value of the `imageSizes` property.\r\n *\r\n * @return The value of the imageSizes property.\r\n */\n\n\n MarkerClusterer.prototype.getImageSizes = function () {\n return this.imageSizes_;\n };\n /**\r\n * Sets the value of the `imageSizes` property.\r\n *\r\n * @param imageSizes The value of the imageSizes property.\r\n */\n\n\n MarkerClusterer.prototype.setImageSizes = function (imageSizes) {\n this.imageSizes_ = imageSizes;\n };\n /**\r\n * Returns the value of the `calculator` property.\r\n *\r\n * @return the value of the calculator property.\r\n */\n\n\n MarkerClusterer.prototype.getCalculator = function () {\n return this.calculator_;\n };\n /**\r\n * Sets the value of the `calculator` property.\r\n *\r\n * @param calculator The value of the calculator property.\r\n */\n\n\n MarkerClusterer.prototype.setCalculator = function (calculator) {\n this.calculator_ = calculator;\n };\n /**\r\n * Returns the value of the `batchSizeIE` property.\r\n *\r\n * @return the value of the batchSizeIE property.\r\n */\n\n\n MarkerClusterer.prototype.getBatchSizeIE = function () {\n return this.batchSizeIE_;\n };\n /**\r\n * Sets the value of the `batchSizeIE` property.\r\n *\r\n * @param batchSizeIE The value of the batchSizeIE property.\r\n */\n\n\n MarkerClusterer.prototype.setBatchSizeIE = function (batchSizeIE) {\n this.batchSizeIE_ = batchSizeIE;\n };\n /**\r\n * Returns the value of the `clusterClass` property.\r\n *\r\n * @return the value of the clusterClass property.\r\n */\n\n\n MarkerClusterer.prototype.getClusterClass = function () {\n return this.clusterClass_;\n };\n /**\r\n * Sets the value of the `clusterClass` property.\r\n *\r\n * @param clusterClass The value of the clusterClass property.\r\n */\n\n\n MarkerClusterer.prototype.setClusterClass = function (clusterClass) {\n this.clusterClass_ = clusterClass;\n };\n /**\r\n * Returns the array of markers managed by the clusterer.\r\n *\r\n * @return The array of markers managed by the clusterer.\r\n */\n\n\n MarkerClusterer.prototype.getMarkers = function () {\n return this.markers_;\n };\n /**\r\n * Returns the number of markers managed by the clusterer.\r\n *\r\n * @return The number of markers.\r\n */\n\n\n MarkerClusterer.prototype.getTotalMarkers = function () {\n return this.markers_.length;\n };\n /**\r\n * Returns the current array of clusters formed by the clusterer.\r\n *\r\n * @return The array of clusters formed by the clusterer.\r\n */\n\n\n MarkerClusterer.prototype.getClusters = function () {\n return this.clusters_;\n };\n /**\r\n * Returns the number of clusters formed by the clusterer.\r\n *\r\n * @return The number of clusters formed by the clusterer.\r\n */\n\n\n MarkerClusterer.prototype.getTotalClusters = function () {\n return this.clusters_.length;\n };\n /**\r\n * Adds a marker to the clusterer. The clusters are redrawn unless\r\n * `nodraw` is set to `true`.\r\n *\r\n * @param marker The marker to add.\r\n * @param nodraw Set to `true` to prevent redrawing.\r\n */\n\n\n MarkerClusterer.prototype.addMarker = function (marker, nodraw) {\n this.pushMarkerTo_(marker);\n\n if (!nodraw) {\n this.redraw_();\n }\n };\n /**\r\n * Adds an array of markers to the clusterer. The clusters are redrawn unless\r\n * `nodraw` is set to `true`.\r\n *\r\n * @param markers The markers to add.\r\n * @param nodraw Set to `true` to prevent redrawing.\r\n */\n\n\n MarkerClusterer.prototype.addMarkers = function (markers, nodraw) {\n for (var key in markers) {\n if (Object.prototype.hasOwnProperty.call(markers, key)) {\n this.pushMarkerTo_(markers[key]);\n }\n }\n\n if (!nodraw) {\n this.redraw_();\n }\n };\n /**\r\n * Pushes a marker to the clusterer.\r\n *\r\n * @param marker The marker to add.\r\n */\n\n\n MarkerClusterer.prototype.pushMarkerTo_ = function (marker) {\n var _this = this; // If the marker is draggable add a listener so we can update the clusters on the dragend:\n\n\n if (marker.getDraggable()) {\n google.maps.event.addListener(marker, \"dragend\", function () {\n if (_this.ready_) {\n marker.isAdded = false;\n\n _this.repaint();\n }\n });\n }\n\n marker.isAdded = false;\n this.markers_.push(marker);\n };\n /**\r\n * Removes a marker from the cluster. The clusters are redrawn unless\r\n * `nodraw` is set to `true`. Returns `true` if the\r\n * marker was removed from the clusterer.\r\n *\r\n * @param marker The marker to remove.\r\n * @param nodraw Set to `true` to prevent redrawing.\r\n * @return True if the marker was removed from the clusterer.\r\n */\n\n\n MarkerClusterer.prototype.removeMarker = function (marker, nodraw) {\n var removed = this.removeMarker_(marker);\n\n if (!nodraw && removed) {\n this.repaint();\n }\n\n return removed;\n };\n /**\r\n * Removes an array of markers from the cluster. The clusters are redrawn unless\r\n * `nodraw` is set to `true`. Returns `true` if markers were removed from the clusterer.\r\n *\r\n * @param markers The markers to remove.\r\n * @param nodraw Set to `true` to prevent redrawing.\r\n * @return True if markers were removed from the clusterer.\r\n */\n\n\n MarkerClusterer.prototype.removeMarkers = function (markers, nodraw) {\n var removed = false;\n\n for (var i = 0; i < markers.length; i++) {\n var r = this.removeMarker_(markers[i]);\n removed = removed || r;\n }\n\n if (!nodraw && removed) {\n this.repaint();\n }\n\n return removed;\n };\n /**\r\n * Removes a marker and returns true if removed, false if not.\r\n *\r\n * @param marker The marker to remove\r\n * @return Whether the marker was removed or not\r\n */\n\n\n MarkerClusterer.prototype.removeMarker_ = function (marker) {\n var index = -1;\n\n if (this.markers_.indexOf) {\n index = this.markers_.indexOf(marker);\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\n if (index === -1) {\n // Marker is not in our list of markers, so do nothing:\n return false;\n }\n\n marker.setMap(null);\n this.markers_.splice(index, 1); // Remove the marker from the list of managed markers\n\n return true;\n };\n /**\r\n * Removes all clusters and markers from the map and also removes all markers\r\n * managed by the clusterer.\r\n */\n\n\n MarkerClusterer.prototype.clearMarkers = function () {\n this.resetViewport_(true);\n this.markers_ = [];\n };\n /**\r\n * Recalculates and redraws all the marker clusters from scratch.\r\n * Call this after changing any properties.\r\n */\n\n\n MarkerClusterer.prototype.repaint = function () {\n var oldClusters = this.clusters_.slice();\n this.clusters_ = [];\n this.resetViewport_(false);\n this.redraw_(); // Remove the old clusters.\n // Do it in a timeout to prevent blinking effect.\n\n setTimeout(function () {\n for (var i = 0; i < oldClusters.length; i++) {\n oldClusters[i].remove();\n }\n }, 0);\n };\n /**\r\n * Returns the current bounds extended by the grid size.\r\n *\r\n * @param bounds The bounds to extend.\r\n * @return The extended bounds.\r\n * @ignore\r\n */\n\n\n MarkerClusterer.prototype.getExtendedBounds = function (bounds) {\n var projection = this.getProjection(); // Turn the bounds into latlng.\n\n var tr = new google.maps.LatLng(bounds.getNorthEast().lat(), bounds.getNorthEast().lng());\n var bl = new google.maps.LatLng(bounds.getSouthWest().lat(), bounds.getSouthWest().lng()); // Convert the points to pixels and the extend out by the grid size.\n\n var trPix = projection.fromLatLngToDivPixel(tr);\n trPix.x += this.gridSize_;\n trPix.y -= this.gridSize_;\n var blPix = projection.fromLatLngToDivPixel(bl);\n blPix.x -= this.gridSize_;\n blPix.y += this.gridSize_; // Convert the pixel points back to LatLng\n\n var ne = projection.fromDivPixelToLatLng(trPix);\n var sw = projection.fromDivPixelToLatLng(blPix); // Extend the bounds to contain the new bounds.\n\n bounds.extend(ne);\n bounds.extend(sw);\n return bounds;\n };\n /**\r\n * Redraws all the clusters.\r\n */\n\n\n MarkerClusterer.prototype.redraw_ = function () {\n this.createClusters_(0);\n };\n /**\r\n * Removes all clusters from the map. The markers are also removed from the map\r\n * if `hide` is set to `true`.\r\n *\r\n * @param hide Set to `true` to also remove the markers from the map.\r\n */\n\n\n MarkerClusterer.prototype.resetViewport_ = function (hide) {\n // Remove all the clusters\n for (var i = 0; i < this.clusters_.length; i++) {\n this.clusters_[i].remove();\n }\n\n this.clusters_ = []; // Reset the markers to not be added and to be removed from the map.\n\n for (var i = 0; i < this.markers_.length; i++) {\n var marker = this.markers_[i];\n marker.isAdded = false;\n\n if (hide) {\n marker.setMap(null);\n }\n }\n };\n /**\r\n * Calculates the distance between two latlng locations in km.\r\n *\r\n * @param p1 The first lat lng point.\r\n * @param p2 The second lat lng point.\r\n * @return The distance between the two points in km.\r\n * @link http://www.movable-type.co.uk/scripts/latlong.html\r\n */\n\n\n MarkerClusterer.prototype.distanceBetweenPoints_ = function (p1, p2) {\n var R = 6371; // Radius of the Earth in km\n\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) + Math.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) * Math.sin(dLon / 2) * Math.sin(dLon / 2);\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n return R * c;\n };\n /**\r\n * Determines if a marker is contained in a bounds.\r\n *\r\n * @param marker The marker to check.\r\n * @param bounds The bounds to check against.\r\n * @return True if the marker is in the bounds.\r\n */\n\n\n MarkerClusterer.prototype.isMarkerInBounds_ = function (marker, bounds) {\n return bounds.contains(marker.getPosition());\n };\n /**\r\n * Adds a marker to a cluster, or creates a new cluster.\r\n *\r\n * @param marker The marker to add.\r\n */\n\n\n MarkerClusterer.prototype.addToClosestCluster_ = function (marker) {\n var distance = 40000; // Some large number\n\n var clusterToAddTo = null;\n\n for (var i = 0; i < this.clusters_.length; i++) {\n var cluster = this.clusters_[i];\n var center = cluster.getCenter();\n\n if (center) {\n var d = this.distanceBetweenPoints_(center, marker.getPosition());\n\n if (d < distance) {\n distance = d;\n clusterToAddTo = cluster;\n }\n }\n }\n\n if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {\n clusterToAddTo.addMarker(marker);\n } else {\n var cluster = new Cluster(this);\n cluster.addMarker(marker);\n this.clusters_.push(cluster);\n }\n };\n /**\r\n * Creates the clusters. This is done in batches to avoid timeout errors\r\n * in some browsers when there is a huge number of markers.\r\n *\r\n * @param iFirst The index of the first marker in the batch of\r\n * markers to be added to clusters.\r\n */\n\n\n MarkerClusterer.prototype.createClusters_ = function (iFirst) {\n var _this = this;\n\n if (!this.ready_) {\n return;\n } // Cancel previous batch processing if we're working on the first batch:\n\n\n if (iFirst === 0) {\n google.maps.event.trigger(this, \"clusteringbegin\", this);\n\n if (typeof this.timerRefStatic !== \"undefined\") {\n clearTimeout(this.timerRefStatic);\n delete this.timerRefStatic;\n }\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\n\n var mapBounds;\n\n if (this.getMap().getZoom() > 3) {\n mapBounds = new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(), this.getMap().getBounds().getNorthEast());\n } else {\n mapBounds = new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625));\n }\n\n var bounds = this.getExtendedBounds(mapBounds);\n var iLast = Math.min(iFirst + this.batchSize_, this.markers_.length);\n\n for (var i = iFirst; i < iLast; i++) {\n var marker = this.markers_[i];\n\n if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) {\n if (!this.ignoreHidden_ || this.ignoreHidden_ && marker.getVisible()) {\n this.addToClosestCluster_(marker);\n }\n }\n }\n\n if (iLast < this.markers_.length) {\n this.timerRefStatic = window.setTimeout(function () {\n _this.createClusters_(iLast);\n }, 0);\n } else {\n delete this.timerRefStatic;\n google.maps.event.trigger(this, \"clusteringend\", this);\n\n for (var i = 0; i < this.clusters_.length; i++) {\n this.clusters_[i].updateIcon();\n }\n }\n };\n /**\r\n * The default function for determining the label text and style\r\n * for a cluster icon.\r\n *\r\n * @param markers The array of markers represented by the cluster.\r\n * @param numStyles The number of marker styles available.\r\n * @return The information resource for the cluster.\r\n */\n\n\n MarkerClusterer.CALCULATOR = function (markers, numStyles) {\n var index = 0;\n var count = markers.length;\n var dv = count;\n\n while (dv !== 0) {\n dv = Math.floor(dv / 10);\n index++;\n }\n\n index = Math.min(index, numStyles);\n return {\n text: count.toString(),\n index: index,\n title: \"\"\n };\n };\n /**\r\n * Generates default styles augmented with user passed values.\r\n * Useful when you want to override some default values but keep untouched\r\n *\r\n * @param overrides override default values\r\n */\n\n\n MarkerClusterer.withDefaultStyle = function (overrides) {\n return _assign({\n textColor: \"black\",\n textSize: 11,\n textDecoration: \"none\",\n textLineHeight: overrides.height,\n fontWeight: \"bold\",\n fontStyle: \"normal\",\n fontFamily: \"Arial,sans-serif\",\n backgroundPosition: \"0 0\"\n }, overrides);\n };\n /**\r\n * The number of markers to process in one batch.\r\n */\n\n\n MarkerClusterer.BATCH_SIZE = 2000;\n /**\r\n * The number of markers to process in one batch (IE only).\r\n */\n\n MarkerClusterer.BATCH_SIZE_IE = 500;\n /**\r\n * The default root name for the marker cluster images.\r\n */\n\n MarkerClusterer.IMAGE_PATH = \"../images/m\";\n /**\r\n * The default extension name for the marker cluster images.\r\n */\n\n MarkerClusterer.IMAGE_EXTENSION = \"png\";\n /**\r\n * The default array of sizes for the marker cluster images.\r\n */\n\n MarkerClusterer.IMAGE_SIZES = [53, 56, 66, 78, 90];\n return MarkerClusterer;\n}(OverlayViewSafe);\n/**\r\n * Copyright 2019 Google LLC. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nexport default MarkerClusterer;","import ceMarker from '../../assets/images/centredil-logo-marker.svg'\nimport netMarker from '../../assets/images/network-marker-gruppo.svg'\nimport wsMarker from '../../assets/images/worksite_marker.svg'\nimport MarkerClusterer from '@googlemaps/markerclustererplus';\n\nfunction CEMarker() {\n return {\n path: \"M-20,0a20,20 0 1,0 40,0a20,20 0 1,0 -40,0\",\n fillColor: '#FF0000',\n fillOpacity: .6,\n anchor: new google.maps.Point(0,0),\n strokeWeight: 0,\n scale: 1\n }\n}\n\nfunction pointsMap(CEPoints, otherPoints, centerPoint) {\n\n centerPoint = typeof centerPoint !== 'undefined' ? centerPoint : null;\n if (centerPoint == null){\n var UserCoords = getLocation({lat: CEPoints[0][0], lng: CEPoints[0][1]})\n } else {\n var UserCoords = {lat: centerPoint[0], lng: centerPoint[1]}\n }\n\n var marker = null;\n var markers = [];\n var myCoords = new google.maps.LatLng(UserCoords.lat, UserCoords.lng);\n var mapOptions = {\n center: myCoords,\n zoom: 9\n };\n var map = new google.maps.Map(document.getElementById('map'), mapOptions);\n\n\n\n CEPoints.forEach(function(point) {\n marker = new google.maps.Marker({\n position: new google.maps.LatLng(point[0], point[1]),\n url: point[2],\n map: map,\n icon: ceMarker\n });\n markers.push(marker);\n google.maps.event.addListener(marker, 'click', function() {\n window.location.href = this.url;\n });\n });\n\n otherPoints.forEach(function(point) {\n marker = new google.maps.Marker({\n position: new google.maps.LatLng(point[0], point[1]),\n url: point[2],\n map: map,\n icon: netMarker\n });\n markers.push(marker);\n google.maps.event.addListener(marker, 'click', function() {\n window.location.href = this.url;\n });\n });\n\n const markerCluster = new MarkerClusterer(map, markers, {\n imagePath:\n \"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m\",\n });\n\n}\n\nwindow.pointsMap = pointsMap;\n\n\nfunction routeMap(startLat, startLng, destLat, destLng, CEPoints, otherPoints) {\n\n var pointA = new google.maps.LatLng(startLat, startLng),\n pointB = new google.maps.LatLng(destLat, destLng),\n myOptions = {\n zoom: 12,\n center: pointA,\n suppressMarkers: true\n },\n map = new google.maps.Map(document.getElementById('map'), myOptions),\n // Instantiate a directions service.\n directionsService = new google.maps.DirectionsService,\n directionsDisplay = new google.maps.DirectionsRenderer({\n suppressMarkers: true,\n map: map\n });\n\n var marker = null;\n var markers = [];\n\n\n var markerA = new google.maps.Marker({\n position: pointA,\n map: map,\n icon: wsMarker\n });\n\n CEPoints.forEach(function(point) {\n marker = new google.maps.Marker({\n position: new google.maps.LatLng(point[0], point[1]),\n url: point[2],\n map: map,\n icon: ceMarker\n });\n markers.push(marker);\n google.maps.event.addListener(marker, 'click', function() {\n window.location.href = this.url;\n });\n\n });\n\n otherPoints.forEach(function(point) {\n marker = new google.maps.Marker({\n position: new google.maps.LatLng(point[0], point[1]),\n url: point[2],\n map: map,\n icon: netMarker\n });\n markers.push(marker);\n google.maps.event.addListener(marker, 'click', function() {\n window.location.href = this.url;\n });\n });\n\n const markerCluster = new MarkerClusterer(map, markers, {\n imagePath:\n \"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m\",\n });\n\n\n calculateAndDisplayRoute(directionsService, directionsDisplay, pointA, pointB);\n}\n\nwindow.routeMap = routeMap;\n\nfunction calculateAndDisplayRoute(directionsService, directionsDisplay, pointA, pointB) {\n directionsService.route({\n origin: pointA,\n destination: pointB,\n avoidTolls: true,\n avoidHighways: false,\n travelMode: google.maps.TravelMode.DRIVING\n }, function (response, status) {\n if (status == google.maps.DirectionsStatus.OK) {\n directionsDisplay.setDirections(response);\n } else {\n window.alert('Directions request failed due to ' + status);\n }\n });\n}\n\n\nfunction getLocation(defaultCoord) {\n var UserCoords = defaultCoord\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function (position) {\n UserCoords.lat = position.coords.latitude;\n UserCoords.lng = position.coords.longitude;\n });\n }\n return UserCoords\n}","/* eslint no-console:0 */\n// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. You're encouraged to place your actual application logic in\n// a relevant structure within app/javascript and only use these pack files to reference\n// that code so it'll be compiled.\n//\n// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate\n// layout file, like app/views/layouts/application.html.erb\n\n\n// Uncomment to copy all static images under ../images to the output folder and reference\n// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)\n// or the `imagePath` JavaScript helper below.\n//\n// const images = require.context('../images', true)\n// const imagePath = (name) => images(name, true)\n\nimport './map'"],"sourceRoot":""}