Files
sibedas/public/build/assets/maps-google-KamR_rNw.js
2025-02-06 08:40:19 +07:00

8 lines
36 KiB
JavaScript

import{c as ge,a as ce}from"./_commonjsHelpers-C4iS2aBk.js";var te={exports:{}};(function(H,A){(function(v,x){H.exports=x()})(ge,function(){/*!
* GMaps.js v0.4.25
* http://hpneo.github.com/gmaps/
*
* Copyright 2017, Gustavo Leon
* Released under the MIT License.
*/var v=function(t,r){var a;if(t===r)return t;for(a in r)r[a]!==void 0&&(t[a]=r[a]);return t},x=function(t,r){var a=Array.prototype.slice.call(arguments,2),l=[],n=t.length,i;if(Array.prototype.map&&t.map===Array.prototype.map)l=Array.prototype.map.call(t,function(s){var f=a.slice(0);return f.splice(0,0,s),r.apply(this,f)});else for(i=0;i<n;i++)callback_params=a,callback_params.splice(0,0,t[i]),l.push(r.apply(this,callback_params));return l},Y=function(t){var r=[],a;for(a=0;a<t.length;a++)r=r.concat(t[a]);return r},re=function(t,r){var a=t[0],l=t[1];return r&&(a=t[1],l=t[0]),new google.maps.LatLng(a,l)},V=function(t,r){var a;for(a=0;a<t.length;a++)t[a]instanceof google.maps.LatLng||(t[a].length>0&&typeof t[a][0]=="object"?t[a]=V(t[a],r):t[a]=re(t[a],r));return t},ae=function(t,r){var a,l=t.replace(".","");return"jQuery"in this&&r?a=$("."+l,r)[0]:a=document.getElementsByClassName(l)[0],a},C=function(l,r){var a,l=l.replace("#","");return"jQuery"in window&&r?a=$("#"+l,r)[0]:a=document.getElementById(l),a},le=function(t){var r=0,a=0;if(t.getBoundingClientRect){var l=t.getBoundingClientRect(),n=-(window.scrollX?window.scrollX:window.pageXOffset),i=-(window.scrollY?window.scrollY:window.pageYOffset);return[l.left-n,l.top-i]}if(t.offsetParent)do r+=t.offsetLeft,a+=t.offsetTop;while(t=t.offsetParent);return[r,a]},o=function(t){var r=document,a=function(l){if(!(typeof window.google=="object"&&window.google.maps))return typeof window.console=="object"&&window.console.error&&console.error("Google Maps API is required. Please register the following JavaScript library https://maps.googleapis.com/maps/api/js."),function(){};if(!this)return new a(l);l.zoom=l.zoom||15,l.mapType=l.mapType||"roadmap";var n=function(g,y){return g===void 0?y:g},i=this,s,f=["bounds_changed","center_changed","click","dblclick","drag","dragend","dragstart","idle","maptypeid_changed","projection_changed","resize","tilesloaded","zoom_changed"],c=["mousemove","mouseout","mouseover"],d=["el","lat","lng","mapType","width","height","markerClusterer","enableNewStyle"],u=l.el||l.div,m=l.markerClusterer,_=google.maps.MapTypeId[l.mapType.toUpperCase()],p=new google.maps.LatLng(l.lat,l.lng),T=n(l.zoomControl,!0),b=l.zoomControlOpt||{style:"DEFAULT",position:"TOP_LEFT"},L=b.style||"DEFAULT",E=b.position||"TOP_LEFT",U=n(l.panControl,!0),F=n(l.mapTypeControl,!0),K=n(l.scaleControl,!0),q=n(l.streetViewControl,!0),W=n(W,!0),z={},D={zoom:this.zoom,center:p,mapTypeId:_},O={panControl:U,zoomControl:T,zoomControlOptions:{style:google.maps.ZoomControlStyle[L],position:google.maps.ControlPosition[E]},mapTypeControl:F,scaleControl:K,streetViewControl:q,overviewMapControl:W};if(typeof l.el=="string"||typeof l.div=="string"?u.indexOf("#")>-1?this.el=C(u,l.context):this.el=ae.apply(this,[u,l.context]):this.el=u,typeof this.el>"u"||this.el===null)throw"No element defined.";for(window.context_menu=window.context_menu||{},window.context_menu[i.el.id]={},this.controls=[],this.overlays=[],this.layers=[],this.singleLayers={},this.markers=[],this.polylines=[],this.routes=[],this.polygons=[],this.infoWindow=null,this.overlay_el=null,this.zoom=l.zoom,this.registered_events={},this.el.style.width=l.width||this.el.scrollWidth||this.el.offsetWidth,this.el.style.height=l.height||this.el.scrollHeight||this.el.offsetHeight,google.maps.visualRefresh=l.enableNewStyle,s=0;s<d.length;s++)delete l[d[s]];for(l.disableDefaultUI!=!0&&(D=v(D,O)),z=v(D,l),s=0;s<f.length;s++)delete z[f[s]];for(s=0;s<c.length;s++)delete z[c[s]];this.map=new google.maps.Map(this.el,z),m&&(this.markerClusterer=m.apply(this,[this.map]));var w=function(g,y){var h="",k=window.context_menu[i.el.id][g];for(var P in k)if(k.hasOwnProperty(P)){var I=k[P];h+='<li><a id="'+g+"_"+P+'" href="#">'+I.title+"</a></li>"}if(C("gmaps_context_menu")){var M=C("gmaps_context_menu");M.innerHTML=h;var Q=M.getElementsByTagName("a"),ne=Q.length,P;for(P=0;P<ne;P++){var j=Q[P],ie=function(fe){fe.preventDefault(),k[this.id.replace(g+"_","")].action.apply(i,[y]),i.hideContextMenu()};google.maps.event.clearListeners(j,"click"),google.maps.event.addDomListenerOnce(j,"click",ie,!1)}var ee=le.apply(this,[i.el]),se=ee[0]+y.pixel.x-15,oe=ee[1]+y.pixel.y-15;M.style.left=se+"px",M.style.top=oe+"px"}};this.buildContextMenu=function(g,y){if(g==="marker"){y.pixel={};var h=new google.maps.OverlayView;h.setMap(i.map),h.draw=function(){var I=h.getProjection(),M=y.marker.getPosition();y.pixel=I.fromLatLngToContainerPixel(M),w(g,y)}}else w(g,y);var k=C("gmaps_context_menu");setTimeout(function(){k.style.display="block"},0)},this.setContextMenu=function(g){window.context_menu[i.el.id][g.control]={};var y,h=r.createElement("ul");for(y in g.options)if(g.options.hasOwnProperty(y)){var k=g.options[y];window.context_menu[i.el.id][g.control][k.name]={title:k.title,action:k.action}}h.id="gmaps_context_menu",h.style.display="none",h.style.position="absolute",h.style.minWidth="100px",h.style.background="white",h.style.listStyle="none",h.style.padding="8px",h.style.boxShadow="2px 2px 6px #ccc",C("gmaps_context_menu")||r.body.appendChild(h);var I=C("gmaps_context_menu");google.maps.event.addDomListener(I,"mouseout",function(M){(!M.relatedTarget||!this.contains(M.relatedTarget))&&window.setTimeout(function(){I.style.display="none"},400)},!1)},this.hideContextMenu=function(){var g=C("gmaps_context_menu");g&&(g.style.display="none")};var X=function(g,y){google.maps.event.addListener(g,y,function(h){h==null&&(h=this),l[y].apply(this,[h]),i.hideContextMenu()})};google.maps.event.addListener(this.map,"zoom_changed",this.hideContextMenu);for(var S=0;S<f.length;S++){var G=f[S];G in l&&X(this.map,G)}for(var S=0;S<c.length;S++){var G=c[S];G in l&&X(this.map,G)}google.maps.event.addListener(this.map,"rightclick",function(g){l.rightclick&&l.rightclick.apply(this,[g]),window.context_menu[i.el.id].map!=null&&i.buildContextMenu("map",g)}),this.refresh=function(){google.maps.event.trigger(this.map,"resize")},this.fitZoom=function(){var g=[],y=this.markers.length,h;for(h=0;h<y;h++)typeof this.markers[h].visible=="boolean"&&this.markers[h].visible&&g.push(this.markers[h].getPosition());this.fitLatLngBounds(g)},this.fitLatLngBounds=function(g){var y=g.length,h=new google.maps.LatLngBounds,k;for(k=0;k<y;k++)h.extend(g[k]);this.map.fitBounds(h)},this.setCenter=function(g,y,h){this.map.panTo(new google.maps.LatLng(g,y)),h&&h()},this.getElement=function(){return this.el},this.zoomIn=function(g){g=g||1,this.zoom=this.map.getZoom()+g,this.map.setZoom(this.zoom)},this.zoomOut=function(g){g=g||1,this.zoom=this.map.getZoom()-g,this.map.setZoom(this.zoom)};var J=[],N;for(N in this.map)typeof this.map[N]=="function"&&!this[N]&&J.push(N);for(s=0;s<J.length;s++)(function(g,y,h){g[h]=function(){return y[h].apply(y,arguments)}})(this,this.map,J[s])};return a}();o.prototype.createControl=function(t){var r=document.createElement("div");r.style.cursor="pointer",t.disableDefaultStyles!==!0&&(r.style.fontFamily="Roboto, Arial, sans-serif",r.style.fontSize="11px",r.style.boxShadow="rgba(0, 0, 0, 0.298039) 0px 1px 4px -1px");for(var a in t.style)r.style[a]=t.style[a];t.id&&(r.id=t.id),t.title&&(r.title=t.title),t.classes&&(r.className=t.classes),t.content&&(typeof t.content=="string"?r.innerHTML=t.content:t.content instanceof HTMLElement&&r.appendChild(t.content)),t.position&&(r.position=google.maps.ControlPosition[t.position.toUpperCase()]);for(var l in t.events)(function(n,i){google.maps.event.addDomListener(n,i,function(){t.events[i].apply(this,[this])})})(r,l);return r.index=1,r},o.prototype.addControl=function(t){var r=this.createControl(t);return this.controls.push(r),this.map.controls[r.position].push(r),r},o.prototype.removeControl=function(t){var r=null,a;for(a=0;a<this.controls.length;a++)this.controls[a]==t&&(r=this.controls[a].position,this.controls.splice(a,1));if(r)for(a=0;a<this.map.controls.length;a++){var l=this.map.controls[t.position];if(l.getAt(a)==t){l.removeAt(a);break}}return t},o.prototype.createMarker=function(t){if(t.lat==null&&t.lng==null&&t.position==null)throw"No latitude or longitude defined.";var r=this,a=t.details,l=t.fences,n=t.outside,i={position:new google.maps.LatLng(t.lat,t.lng),map:null},s=v(i,t);delete s.lat,delete s.lng,delete s.fences,delete s.outside;var f=new google.maps.Marker(s);if(f.fences=l,t.infoWindow){f.infoWindow=new google.maps.InfoWindow(t.infoWindow);for(var c=["closeclick","content_changed","domready","position_changed","zindex_changed"],d=0;d<c.length;d++)(function(_,p){t.infoWindow[p]&&google.maps.event.addListener(_,p,function(T){t.infoWindow[p].apply(this,[T])})})(f.infoWindow,c[d])}for(var u=["animation_changed","clickable_changed","cursor_changed","draggable_changed","flat_changed","icon_changed","position_changed","shadow_changed","shape_changed","title_changed","visible_changed","zindex_changed"],m=["dblclick","drag","dragend","dragstart","mousedown","mouseout","mouseover","mouseup"],d=0;d<u.length;d++)(function(p,T){t[T]&&google.maps.event.addListener(p,T,function(){t[T].apply(this,[this])})})(f,u[d]);for(var d=0;d<m.length;d++)(function(p,T,b){t[b]&&google.maps.event.addListener(T,b,function(L){L.pixel||(L.pixel=p.getProjection().fromLatLngToPoint(L.latLng)),t[b].apply(this,[L])})})(this.map,f,m[d]);return google.maps.event.addListener(f,"click",function(){this.details=a,t.click&&t.click.apply(this,[this]),f.infoWindow&&(r.hideInfoWindows(),f.infoWindow.open(r.map,f))}),google.maps.event.addListener(f,"rightclick",function(_){_.marker=this,t.rightclick&&t.rightclick.apply(this,[_]),window.context_menu[r.el.id].marker!=null&&r.buildContextMenu("marker",_)}),f.fences&&google.maps.event.addListener(f,"dragend",function(){r.checkMarkerGeofence(f,function(_,p){n(_,p)})}),f},o.prototype.addMarker=function(t){var r;if(t.hasOwnProperty("gm_accessors_"))r=t;else if(t.hasOwnProperty("lat")&&t.hasOwnProperty("lng")||t.position)r=this.createMarker(t);else throw"No latitude or longitude defined.";return r.setMap(this.map),this.markerClusterer&&this.markerClusterer.addMarker(r),this.markers.push(r),o.fire("marker_added",r,this),r},o.prototype.addMarkers=function(t){for(var r=0,a;a=t[r];r++)this.addMarker(a);return this.markers},o.prototype.hideInfoWindows=function(){for(var t=0,r;r=this.markers[t];t++)r.infoWindow&&r.infoWindow.close()},o.prototype.removeMarker=function(t){for(var r=0;r<this.markers.length;r++)if(this.markers[r]===t){this.markers[r].setMap(null),this.markers.splice(r,1),this.markerClusterer&&this.markerClusterer.removeMarker(t),o.fire("marker_removed",t,this);break}return t},o.prototype.removeMarkers=function(t){var r=[];if(typeof t>"u"){for(var a=0;a<this.markers.length;a++){var l=this.markers[a];l.setMap(null),o.fire("marker_removed",l,this)}this.markerClusterer&&this.markerClusterer.clearMarkers&&this.markerClusterer.clearMarkers(),this.markers=r}else{for(var a=0;a<t.length;a++){var n=this.markers.indexOf(t[a]);if(n>-1){var l=this.markers[n];l.setMap(null),this.markerClusterer&&this.markerClusterer.removeMarker(l),o.fire("marker_removed",l,this)}}for(var a=0;a<this.markers.length;a++){var l=this.markers[a];l.getMap()!=null&&r.push(l)}this.markers=r}},o.prototype.drawOverlay=function(t){var r=new google.maps.OverlayView,a=!0;return r.setMap(this.map),t.auto_show!=null&&(a=t.auto_show),r.onAdd=function(){var l=document.createElement("div");l.style.borderStyle="none",l.style.borderWidth="0px",l.style.position="absolute",l.style.zIndex=100,l.innerHTML=t.content,r.el=l,t.layer||(t.layer="overlayLayer");var n=this.getPanes(),i=n[t.layer],s=["contextmenu","DOMMouseScroll","dblclick","mousedown"];i.appendChild(l);for(var f=0;f<s.length;f++)(function(c,d){google.maps.event.addDomListener(c,d,function(u){navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&document.all?(u.cancelBubble=!0,u.returnValue=!1):u.stopPropagation()})})(l,s[f]);t.click&&(n.overlayMouseTarget.appendChild(r.el),google.maps.event.addDomListener(r.el,"click",function(){t.click.apply(r,[r])})),google.maps.event.trigger(this,"ready")},r.draw=function(){var l=this.getProjection(),n=l.fromLatLngToDivPixel(new google.maps.LatLng(t.lat,t.lng));t.horizontalOffset=t.horizontalOffset||0,t.verticalOffset=t.verticalOffset||0;var i=r.el,s=i.children[0],f=s.clientHeight,c=s.clientWidth;switch(t.verticalAlign){case"top":i.style.top=n.y-f+t.verticalOffset+"px";break;default:case"middle":i.style.top=n.y-f/2+t.verticalOffset+"px";break;case"bottom":i.style.top=n.y+t.verticalOffset+"px";break}switch(t.horizontalAlign){case"left":i.style.left=n.x-c+t.horizontalOffset+"px";break;default:case"center":i.style.left=n.x-c/2+t.horizontalOffset+"px";break;case"right":i.style.left=n.x+t.horizontalOffset+"px";break}i.style.display=a?"block":"none",a||t.show.apply(this,[i])},r.onRemove=function(){var l=r.el;t.remove?t.remove.apply(this,[l]):(r.el.parentNode.removeChild(r.el),r.el=null)},this.overlays.push(r),r},o.prototype.removeOverlay=function(t){for(var r=0;r<this.overlays.length;r++)if(this.overlays[r]===t){this.overlays[r].setMap(null),this.overlays.splice(r,1);break}},o.prototype.removeOverlays=function(){for(var t=0,r;r=this.overlays[t];t++)r.setMap(null);this.overlays=[]},o.prototype.drawPolyline=function(t){var r=[],a=t.path;if(a.length)if(a[0][0]===void 0)r=a;else for(var l=0,n;n=a[l];l++)r.push(new google.maps.LatLng(n[0],n[1]));var i={map:this.map,path:r,strokeColor:t.strokeColor,strokeOpacity:t.strokeOpacity,strokeWeight:t.strokeWeight,geodesic:t.geodesic,clickable:!0,editable:!1,visible:!0};t.hasOwnProperty("clickable")&&(i.clickable=t.clickable),t.hasOwnProperty("editable")&&(i.editable=t.editable),t.hasOwnProperty("icons")&&(i.icons=t.icons),t.hasOwnProperty("zIndex")&&(i.zIndex=t.zIndex);for(var s=new google.maps.Polyline(i),f=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"],c=0;c<f.length;c++)(function(d,u){t[u]&&google.maps.event.addListener(d,u,function(m){t[u].apply(this,[m])})})(s,f[c]);return this.polylines.push(s),o.fire("polyline_added",s,this),s},o.prototype.removePolyline=function(t){for(var r=0;r<this.polylines.length;r++)if(this.polylines[r]===t){this.polylines[r].setMap(null),this.polylines.splice(r,1),o.fire("polyline_removed",t,this);break}},o.prototype.removePolylines=function(){for(var t=0,r;r=this.polylines[t];t++)r.setMap(null);this.polylines=[]},o.prototype.drawCircle=function(t){t=v({map:this.map,center:new google.maps.LatLng(t.lat,t.lng)},t),delete t.lat,delete t.lng;for(var r=new google.maps.Circle(t),a=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"],l=0;l<a.length;l++)(function(n,i){t[i]&&google.maps.event.addListener(n,i,function(s){t[i].apply(this,[s])})})(r,a[l]);return this.polygons.push(r),r},o.prototype.drawRectangle=function(t){t=v({map:this.map},t);var r=new google.maps.LatLngBounds(new google.maps.LatLng(t.bounds[0][0],t.bounds[0][1]),new google.maps.LatLng(t.bounds[1][0],t.bounds[1][1]));t.bounds=r;for(var a=new google.maps.Rectangle(t),l=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"],n=0;n<l.length;n++)(function(i,s){t[s]&&google.maps.event.addListener(i,s,function(f){t[s].apply(this,[f])})})(a,l[n]);return this.polygons.push(a),a},o.prototype.drawPolygon=function(t){var r=!1;t.hasOwnProperty("useGeoJSON")&&(r=t.useGeoJSON),delete t.useGeoJSON,t=v({map:this.map},t),r==!1&&(t.paths=[t.paths.slice(0)]),t.paths.length>0&&t.paths[0].length>0&&(t.paths=Y(x(t.paths,V,r)));for(var a=new google.maps.Polygon(t),l=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"],n=0;n<l.length;n++)(function(i,s){t[s]&&google.maps.event.addListener(i,s,function(f){t[s].apply(this,[f])})})(a,l[n]);return this.polygons.push(a),o.fire("polygon_added",a,this),a},o.prototype.removePolygon=function(t){for(var r=0;r<this.polygons.length;r++)if(this.polygons[r]===t){this.polygons[r].setMap(null),this.polygons.splice(r,1),o.fire("polygon_removed",t,this);break}},o.prototype.removePolygons=function(){for(var t=0,r;r=this.polygons[t];t++)r.setMap(null);this.polygons=[]},o.prototype.getFromFusionTables=function(t){var r=t.events;delete t.events;var a=t,l=new google.maps.FusionTablesLayer(a);for(var n in r)(function(i,s){google.maps.event.addListener(i,s,function(f){r[s].apply(this,[f])})})(l,n);return this.layers.push(l),l},o.prototype.loadFromFusionTables=function(t){var r=this.getFromFusionTables(t);return r.setMap(this.map),r},o.prototype.getFromKML=function(t){var r=t.url,a=t.events;delete t.url,delete t.events;var l=t,n=new google.maps.KmlLayer(r,l);for(var i in a)(function(s,f){google.maps.event.addListener(s,f,function(c){a[f].apply(this,[c])})})(n,i);return this.layers.push(n),n},o.prototype.loadFromKML=function(t){var r=this.getFromKML(t);return r.setMap(this.map),r},o.prototype.addLayer=function(t,r){r=r||{};var a;switch(t){case"weather":this.singleLayers.weather=a=new google.maps.weather.WeatherLayer;break;case"clouds":this.singleLayers.clouds=a=new google.maps.weather.CloudLayer;break;case"traffic":this.singleLayers.traffic=a=new google.maps.TrafficLayer;break;case"transit":this.singleLayers.transit=a=new google.maps.TransitLayer;break;case"bicycling":this.singleLayers.bicycling=a=new google.maps.BicyclingLayer;break;case"panoramio":this.singleLayers.panoramio=a=new google.maps.panoramio.PanoramioLayer,a.setTag(r.filter),delete r.filter,r.click&&google.maps.event.addListener(a,"click",function(i){r.click(i),delete r.click});break;case"places":if(this.singleLayers.places=a=new google.maps.places.PlacesService(this.map),r.search||r.nearbySearch||r.radarSearch){var l={bounds:r.bounds||null,keyword:r.keyword||null,location:r.location||null,name:r.name||null,radius:r.radius||null,rankBy:r.rankBy||null,types:r.types||null};r.radarSearch&&a.radarSearch(l,r.radarSearch),r.search&&a.search(l,r.search),r.nearbySearch&&a.nearbySearch(l,r.nearbySearch)}if(r.textSearch){var n={bounds:r.bounds||null,location:r.location||null,query:r.query||null,radius:r.radius||null};a.textSearch(n,r.textSearch)}break}if(a!==void 0)return typeof a.setOptions=="function"&&a.setOptions(r),typeof a.setMap=="function"&&a.setMap(this.map),a},o.prototype.removeLayer=function(t){if(typeof t=="string"&&this.singleLayers[t]!==void 0)this.singleLayers[t].setMap(null),delete this.singleLayers[t];else for(var r=0;r<this.layers.length;r++)if(this.layers[r]===t){this.layers[r].setMap(null),this.layers.splice(r,1);break}};var B,Z;return o.prototype.getRoutes=function(t){switch(t.travelMode){case"bicycling":B=google.maps.TravelMode.BICYCLING;break;case"transit":B=google.maps.TravelMode.TRANSIT;break;case"driving":B=google.maps.TravelMode.DRIVING;break;default:B=google.maps.TravelMode.WALKING;break}t.unitSystem==="imperial"?Z=google.maps.UnitSystem.IMPERIAL:Z=google.maps.UnitSystem.METRIC;var r={avoidHighways:!1,avoidTolls:!1,optimizeWaypoints:!1,waypoints:[]},a=v(r,t);a.origin=/string/.test(typeof t.origin)?t.origin:new google.maps.LatLng(t.origin[0],t.origin[1]),a.destination=/string/.test(typeof t.destination)?t.destination:new google.maps.LatLng(t.destination[0],t.destination[1]),a.travelMode=B,a.unitSystem=Z,delete a.callback,delete a.error;var l=[],n=new google.maps.DirectionsService;n.route(a,function(i,s){if(s===google.maps.DirectionsStatus.OK){for(var f in i.routes)i.routes.hasOwnProperty(f)&&l.push(i.routes[f]);t.callback&&t.callback(l,i,s)}else t.error&&t.error(i,s)})},o.prototype.removeRoutes=function(){this.routes.length=0},o.prototype.getElevations=function(t){t=v({locations:[],path:!1,samples:256},t),t.locations.length>0&&t.locations[0].length>0&&(t.locations=Y(x([t.locations],V,!1)));var r=t.callback;delete t.callback;var a=new google.maps.ElevationService;if(!t.path)delete t.path,delete t.samples,a.getElevationForLocations(t,function(n,i){r&&typeof r=="function"&&r(n,i)});else{var l={path:t.locations,samples:t.samples};a.getElevationAlongPath(l,function(n,i){r&&typeof r=="function"&&r(n,i)})}},o.prototype.cleanRoute=o.prototype.removePolylines,o.prototype.renderRoute=function(t,r){var a=typeof r.panel=="string"?document.getElementById(r.panel.replace("#","")):r.panel,l;r.panel=a,r=v({map:this.map},r),l=new google.maps.DirectionsRenderer(r),this.getRoutes({origin:t.origin,destination:t.destination,travelMode:t.travelMode,waypoints:t.waypoints,unitSystem:t.unitSystem,error:t.error,avoidHighways:t.avoidHighways,avoidTolls:t.avoidTolls,optimizeWaypoints:t.optimizeWaypoints,callback:function(n,i,s){s===google.maps.DirectionsStatus.OK&&l.setDirections(i)}})},o.prototype.drawRoute=function(t){var r=this;this.getRoutes({origin:t.origin,destination:t.destination,travelMode:t.travelMode,waypoints:t.waypoints,unitSystem:t.unitSystem,error:t.error,avoidHighways:t.avoidHighways,avoidTolls:t.avoidTolls,optimizeWaypoints:t.optimizeWaypoints,callback:function(a){if(a.length>0){var l={path:a[a.length-1].overview_path,strokeColor:t.strokeColor,strokeOpacity:t.strokeOpacity,strokeWeight:t.strokeWeight};t.hasOwnProperty("icons")&&(l.icons=t.icons),r.drawPolyline(l),t.callback&&t.callback(a[a.length-1])}}})},o.prototype.travelRoute=function(t){if(t.origin&&t.destination)this.getRoutes({origin:t.origin,destination:t.destination,travelMode:t.travelMode,waypoints:t.waypoints,unitSystem:t.unitSystem,error:t.error,callback:function(n){if(n.length>0&&t.start&&t.start(n[n.length-1]),n.length>0&&t.step){var i=n[n.length-1];if(i.legs.length>0)for(var s=i.legs[0].steps,f=0,c;c=s[f];f++)c.step_number=f,t.step(c,i.legs[0].steps.length-1)}n.length>0&&t.end&&t.end(n[n.length-1])}});else if(t.route&&t.route.legs.length>0)for(var r=t.route.legs[0].steps,a=0,l;l=r[a];a++)l.step_number=a,t.step(l)},o.prototype.drawSteppedRoute=function(t){var r=this;if(t.origin&&t.destination)this.getRoutes({origin:t.origin,destination:t.destination,travelMode:t.travelMode,waypoints:t.waypoints,error:t.error,callback:function(s){if(s.length>0&&t.start&&t.start(s[s.length-1]),s.length>0&&t.step){var f=s[s.length-1];if(f.legs.length>0)for(var c=f.legs[0].steps,d=0,u;u=c[d];d++){u.step_number=d;var m={path:u.path,strokeColor:t.strokeColor,strokeOpacity:t.strokeOpacity,strokeWeight:t.strokeWeight};t.hasOwnProperty("icons")&&(m.icons=t.icons),r.drawPolyline(m),t.step(u,f.legs[0].steps.length-1)}}s.length>0&&t.end&&t.end(s[s.length-1])}});else if(t.route&&t.route.legs.length>0)for(var a=t.route.legs[0].steps,l=0,n;n=a[l];l++){n.step_number=l;var i={path:n.path,strokeColor:t.strokeColor,strokeOpacity:t.strokeOpacity,strokeWeight:t.strokeWeight};t.hasOwnProperty("icons")&&(i.icons=t.icons),r.drawPolyline(i),t.step(n)}},o.Route=function(t){this.origin=t.origin,this.destination=t.destination,this.waypoints=t.waypoints,this.map=t.map,this.route=t.route,this.step_count=0,this.steps=this.route.legs[0].steps,this.steps_length=this.steps.length;var r={path:new google.maps.MVCArray,strokeColor:t.strokeColor,strokeOpacity:t.strokeOpacity,strokeWeight:t.strokeWeight};t.hasOwnProperty("icons")&&(r.icons=t.icons),this.polyline=this.map.drawPolyline(r).getPath()},o.Route.prototype.getRoute=function(t){var r=this;this.map.getRoutes({origin:this.origin,destination:this.destination,travelMode:t.travelMode,waypoints:this.waypoints||[],error:t.error,callback:function(){r.route=e[0],t.callback&&t.callback.call(r)}})},o.Route.prototype.back=function(){if(this.step_count>0){this.step_count--;var t=this.route.legs[0].steps[this.step_count].path;for(var r in t)t.hasOwnProperty(r)&&this.polyline.pop()}},o.Route.prototype.forward=function(){if(this.step_count<this.steps_length){var t=this.route.legs[0].steps[this.step_count].path;for(var r in t)t.hasOwnProperty(r)&&this.polyline.push(t[r]);this.step_count++}},o.prototype.checkGeofence=function(t,r,a){return a.containsLatLng(new google.maps.LatLng(t,r))},o.prototype.checkMarkerGeofence=function(t,r){if(t.fences)for(var a=0,l;l=t.fences[a];a++){var n=t.getPosition();this.checkGeofence(n.lat(),n.lng(),l)||r(t,l)}},o.prototype.toImage=function(r){var r=r||{},a={};if(a.size=r.size||[this.el.clientWidth,this.el.clientHeight],a.lat=this.getCenter().lat(),a.lng=this.getCenter().lng(),this.markers.length>0){a.markers=[];for(var l=0;l<this.markers.length;l++)a.markers.push({lat:this.markers[l].getPosition().lat(),lng:this.markers[l].getPosition().lng()})}if(this.polylines.length>0){var n=this.polylines[0];a.polyline={},a.polyline.path=google.maps.geometry.encoding.encodePath(n.getPath()),a.polyline.strokeColor=n.strokeColor,a.polyline.strokeOpacity=n.strokeOpacity,a.polyline.strokeWeight=n.strokeWeight}return o.staticMapURL(a)},o.staticMapURL=function(t){var r=[],a,l=(location.protocol==="file:"?"http:":location.protocol)+"//maps.googleapis.com/maps/api/staticmap";t.url&&(l=t.url,delete t.url),l+="?";var n=t.markers;delete t.markers,!n&&t.marker&&(n=[t.marker],delete t.marker);var i=t.styles;delete t.styles;var s=t.polyline;if(delete t.polyline,t.center)r.push("center="+t.center),delete t.center;else if(t.address)r.push("center="+t.address),delete t.address;else if(t.lat)r.push(["center=",t.lat,",",t.lng].join("")),delete t.lat,delete t.lng;else if(t.visible){var f=encodeURI(t.visible.join("|"));r.push("visible="+f)}var c=t.size;c?(c.join&&(c=c.join("x")),delete t.size):c="630x300",r.push("size="+c),!t.zoom&&t.zoom!==!1&&(t.zoom=15);var d=t.hasOwnProperty("sensor")?!!t.sensor:!0;delete t.sensor,r.push("sensor="+d);for(var u in t)t.hasOwnProperty(u)&&r.push(u+"="+t[u]);if(n)for(var m,_,p=0;a=n[p];p++){m=[],a.size&&a.size!=="normal"?(m.push("size:"+a.size),delete a.size):a.icon&&(m.push("icon:"+encodeURI(a.icon)),delete a.icon),a.color&&(m.push("color:"+a.color.replace("#","0x")),delete a.color),a.label&&(m.push("label:"+a.label[0].toUpperCase()),delete a.label),_=a.address?a.address:a.lat+","+a.lng,delete a.address,delete a.lat,delete a.lng;for(var u in a)a.hasOwnProperty(u)&&m.push(u+":"+a[u]);m.length||p===0?(m.push(_),m=m.join("|"),r.push("markers="+encodeURI(m))):(m=r.pop()+encodeURI("|"+_),r.push(m))}if(i)for(var p=0;p<i.length;p++){var T=[];i[p].featureType&&T.push("feature:"+i[p].featureType.toLowerCase()),i[p].elementType&&T.push("element:"+i[p].elementType.toLowerCase());for(var b=0;b<i[p].stylers.length;b++)for(var L in i[p].stylers[b]){var E=i[p].stylers[b][L];(L=="hue"||L=="color")&&(E="0x"+E.substring(1)),T.push(L+":"+E)}var U=T.join("|");U!=""&&r.push("style="+U)}function F(O,w){if(O[0]==="#"&&(O=O.replace("#","0x"),w)){if(w=parseFloat(w),w=Math.min(1,Math.max(w,0)),w===0)return"0x00000000";w=(w*255).toString(16),w.length===1&&(w+=w),O=O.slice(0,8)+w}return O}if(s){if(a=s,s=[],a.strokeWeight&&s.push("weight:"+parseInt(a.strokeWeight,10)),a.strokeColor){var K=F(a.strokeColor,a.strokeOpacity);s.push("color:"+K)}if(a.fillColor){var q=F(a.fillColor,a.fillOpacity);s.push("fillcolor:"+q)}var W=a.path;if(W.join)for(var b=0,z;z=W[b];b++)s.push(z.join(","));else s.push("enc:"+W);s=s.join("|"),r.push("path="+encodeURI(s))}var D=window.devicePixelRatio||1;return r.push("scale="+D),r=r.join("&"),l+r},o.prototype.addMapType=function(t,r){if(r.hasOwnProperty("getTileUrl")&&typeof r.getTileUrl=="function"){r.tileSize=r.tileSize||new google.maps.Size(256,256);var a=new google.maps.ImageMapType(r);this.map.mapTypes.set(t,a)}else throw"'getTileUrl' function required."},o.prototype.addOverlayMapType=function(t){if(t.hasOwnProperty("getTile")&&typeof t.getTile=="function"){var r=t.index;delete t.index,this.map.overlayMapTypes.insertAt(r,t)}else throw"'getTile' function required."},o.prototype.removeOverlayMapType=function(t){this.map.overlayMapTypes.removeAt(t)},o.prototype.addStyle=function(t){var r=new google.maps.StyledMapType(t.styles,{name:t.styledMapName});this.map.mapTypes.set(t.mapTypeId,r)},o.prototype.setStyle=function(t){this.map.setMapTypeId(t)},o.prototype.createPanorama=function(t){return(!t.hasOwnProperty("lat")||!t.hasOwnProperty("lng"))&&(t.lat=this.getCenter().lat(),t.lng=this.getCenter().lng()),this.panorama=o.createPanorama(t),this.map.setStreetView(this.panorama),this.panorama},o.createPanorama=function(t){var r=C(t.el,t.context);t.position=new google.maps.LatLng(t.lat,t.lng),delete t.el,delete t.context,delete t.lat,delete t.lng;for(var a=["closeclick","links_changed","pano_changed","position_changed","pov_changed","resize","visible_changed"],l=v({visible:!0},t),n=0;n<a.length;n++)delete l[a[n]];for(var i=new google.maps.StreetViewPanorama(r,l),n=0;n<a.length;n++)(function(f,c){t[c]&&google.maps.event.addListener(f,c,function(){t[c].apply(this)})})(i,a[n]);return i},o.prototype.on=function(t,r){return o.on(t,this,r)},o.prototype.off=function(t){o.off(t,this)},o.prototype.once=function(t,r){return o.once(t,this,r)},o.custom_events=["marker_added","marker_removed","polyline_added","polyline_removed","polygon_added","polygon_removed","geolocated","geolocation_failed"],o.on=function(t,r,a){if(o.custom_events.indexOf(t)==-1)return r instanceof o&&(r=r.map),google.maps.event.addListener(r,t,a);var l={handler:a,eventName:t};return r.registered_events[t]=r.registered_events[t]||[],r.registered_events[t].push(l),l},o.off=function(t,r){o.custom_events.indexOf(t)==-1?(r instanceof o&&(r=r.map),google.maps.event.clearListeners(r,t)):r.registered_events[t]=[]},o.once=function(t,r,a){if(o.custom_events.indexOf(t)==-1)return r instanceof o&&(r=r.map),google.maps.event.addListenerOnce(r,t,a)},o.fire=function(t,r,a){if(o.custom_events.indexOf(t)==-1)google.maps.event.trigger(r,t,Array.prototype.slice.apply(arguments).slice(2));else if(t in a.registered_events)for(var l=a.registered_events[t],n=0;n<l.length;n++)(function(i,s,f){i.apply(s,[f])})(l[n].handler,a,r)},o.geolocate=function(t){var r=t.always||t.complete;navigator.geolocation?navigator.geolocation.getCurrentPosition(function(a){t.success(a),r&&r()},function(a){t.error(a),r&&r()},t.options):(t.not_supported(),r&&r())},o.geocode=function(t){this.geocoder=new google.maps.Geocoder;var r=t.callback;t.hasOwnProperty("lat")&&t.hasOwnProperty("lng")&&(t.latLng=new google.maps.LatLng(t.lat,t.lng)),delete t.lat,delete t.lng,delete t.callback,this.geocoder.geocode(t,function(a,l){r(a,l)})},typeof window.google=="object"&&window.google.maps&&(google.maps.Polygon.prototype.getBounds||(google.maps.Polygon.prototype.getBounds=function(t){for(var r=new google.maps.LatLngBounds,a=this.getPaths(),l,n=0;n<a.getLength();n++){l=a.getAt(n);for(var i=0;i<l.getLength();i++)r.extend(l.getAt(i))}return r}),google.maps.Polygon.prototype.containsLatLng||(google.maps.Polygon.prototype.containsLatLng=function(t){var r=this.getBounds();if(r!==null&&!r.contains(t))return!1;for(var a=!1,l=this.getPaths().getLength(),n=0;n<l;n++)for(var i=this.getPaths().getAt(n),s=i.getLength(),f=s-1,c=0;c<s;c++){var d=i.getAt(c),u=i.getAt(f);(d.lng()<t.lng()&&u.lng()>=t.lng()||u.lng()<t.lng()&&d.lng()>=t.lng())&&d.lat()+(t.lng()-d.lng())/(u.lng()-d.lng())*(u.lat()-d.lat())<t.lat()&&(a=!a),f=c}return a}),google.maps.Circle.prototype.containsLatLng||(google.maps.Circle.prototype.containsLatLng=function(t){return google.maps.geometry?google.maps.geometry.spherical.computeDistanceBetween(this.getCenter(),t)<=this.getRadius():!0}),google.maps.Rectangle.prototype.containsLatLng=function(t){return this.getBounds().contains(t)},google.maps.LatLngBounds.prototype.containsLatLng=function(t){return this.contains(t)},google.maps.Marker.prototype.setFences=function(t){this.fences=t},google.maps.Marker.prototype.addFence=function(t){this.fences.push(t)},google.maps.Marker.prototype.getId=function(){return this.__gm_id}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){if(this==null)throw new TypeError;var r=Object(this),a=r.length>>>0;if(a===0)return-1;var l=0;if(arguments.length>1&&(l=Number(arguments[1]),l!=l?l=0:l!=0&&l!=1/0&&l!=-1/0&&(l=(l>0||-1)*Math.floor(Math.abs(l)))),l>=a)return-1;for(var n=l>=0?l:Math.max(a-Math.abs(l),0);n<a;n++)if(n in r&&r[n]===t)return n;return-1}),o})})(te);var he=te.exports;const R=ce(he);class ue{initBasicGoogleMap(){new R({div:"#gmaps-basic",lat:-12.043333,lng:-77.028333})}initMarkerGoogleMap(){new R({div:"#gmaps-markers",lat:-12.043333,lng:-77.028333})}initStreetViewGoogleMap(){R.createPanorama({el:"#panorama",lat:42.3455,lng:-71.0983})}initMapTypes(){var A=new R({el:"#gmaps-types",lat:42.3455,lng:-71.0983,mapTypeControlOptions:{mapTypeIds:["hybrid","roadmap","satellite","terrain","osm","cloudmade"]}});return A.addMapType("osm",{getTileUrl:function(v,x){return"http://tile.openstreetmap.org/"+x+"/"+v.x+"/"+v.y+".png"},tileSize:new google.maps.Size(256,256),name:"OpenStreetMap",maxZoom:18}),A.addMapType("cloudmade",{getTileUrl:function(v,x){return"http://b.tile.cloudmade.com/8ee2a50541944fb9bcedded5165f09d9/1/256/"+x+"/"+v.x+"/"+v.y+".png"},tileSize:new google.maps.Size(256,256),name:"CloudMade",maxZoom:18}),A.setMapTypeId("osm"),A}initUltraLightMap(){new R({div:"#ultra-light",lat:42.3455,lng:-71.0983,styles:[{featureType:"water",elementType:"geometry",stylers:[{color:"#e9e9e9"},{lightness:17}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#f5f5f5"},{lightness:20}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffffff"},{lightness:17}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#ffffff"},{lightness:29},{weight:.2}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#ffffff"},{lightness:18}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#ffffff"},{lightness:16}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#f5f5f5"},{lightness:21}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#dedede"},{lightness:21}]},{elementType:"labels.text.stroke",stylers:[{visibility:"on"},{color:"#ffffff"},{lightness:16}]},{elementType:"labels.text.fill",stylers:[{saturation:36},{color:"#333333"},{lightness:40}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#f2f2f2"},{lightness:19}]},{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#fefefe"},{lightness:20}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#fefefe"},{lightness:17},{weight:1.2}]}]})}initDarkMap(){new R({div:"#dark",lat:42.3455,lng:-71.0983,styles:[{featureType:"all",elementType:"labels",stylers:[{visibility:"on"}]},{featureType:"all",elementType:"labels.text.fill",stylers:[{saturation:36},{color:"#000000"},{lightness:40}]},{featureType:"all",elementType:"labels.text.stroke",stylers:[{visibility:"on"},{color:"#000000"},{lightness:16}]},{featureType:"all",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#000000"},{lightness:20}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#000000"},{lightness:17},{weight:1.2}]},{featureType:"administrative.country",elementType:"labels.text.fill",stylers:[{color:"#e5c163"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#c4c4c4"}]},{featureType:"administrative.neighborhood",elementType:"labels.text.fill",stylers:[{color:"#e5c163"}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#000000"},{lightness:20}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#000000"},{lightness:21},{visibility:"on"}]},{featureType:"poi.business",elementType:"geometry",stylers:[{visibility:"on"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#e5c163"},{lightness:"0"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{visibility:"off"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#ffffff"}]},{featureType:"road.highway",elementType:"labels.text.stroke",stylers:[{color:"#e5c163"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#000000"},{lightness:18}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{color:"#575757"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"labels.text.stroke",stylers:[{color:"#2c2c2c"}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#000000"},{lightness:16}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#999999"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#000000"},{lightness:19}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"},{lightness:17}]}]})}init(){this.initBasicGoogleMap(),this.initMarkerGoogleMap(),this.initStreetViewGoogleMap(),this.initMapTypes(),this.initUltraLightMap(),this.initDarkMap()}}document.addEventListener("DOMContentLoaded",function(H){new ue().init()});