vue3-google-map 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -16,7 +16,7 @@ Note: Please refer to the [documentation site](https://vue3-google-map.com/) for
16
16
  - [Your First Map](#your-first-map)
17
17
  - [Components](#components)
18
18
  - [Advanced Marker](#advanced-marker)
19
- - [Marker](#marker)
19
+ - [Marker](#marker) ⚠️ **Deprecated**
20
20
  - [Polyline](#polyline)
21
21
  - [Polygon](#polygon)
22
22
  - [Rectangle](#rectangle)
@@ -25,7 +25,7 @@ Note: Please refer to the [documentation site](https://vue3-google-map.com/) for
25
25
  - [Custom Marker](#custom-marker)
26
26
  - [Custom Control](#custom-control)
27
27
  - [Marker Cluster](#marker-cluster)
28
- - [Heatmap Layer](#heatmap-layer)
28
+ - [Heatmap Layer](#heatmap-layer) ⚠️ **Deprecated**
29
29
  - [Advanced Usage](#advanced-usage)
30
30
  - [Contribution](#contribution)
31
31
  - [License](#license)
@@ -87,7 +87,7 @@ This library is intended to be used in a composable fashion. Therefore you will
87
87
  The main mapping component is `GoogleMap`, however the following components are available at your disposal:
88
88
 
89
89
  - [AdvancedMarker](#advanced-marker)
90
- - [Marker](#marker)
90
+ - [Marker](#marker) ⚠️ **Deprecated** - Use AdvancedMarker instead
91
91
  - [Polyline](#polyline)
92
92
  - [Polygon](#polygon)
93
93
  - [Rectangle](#rectangle)
@@ -96,12 +96,24 @@ The main mapping component is `GoogleMap`, however the following components are
96
96
  - [CustomMarker](#custom-marker)
97
97
  - [CustomControl](#custom-control)
98
98
  - [MarkerCluster](#marker-cluster)
99
+ - [HeatmapLayer](#heatmap-layer) ⚠️ **Deprecated**
99
100
 
100
101
  ### Advanced Marker
101
102
 
102
103
  Use the `AdvancedMarker` component to draw markers, drop pins or any custom icons on a map. `AdvancedMarker` is the new version offered by google when deprecated the `Marker` component ([read more here](https://developers.google.com/maps/deprecations#googlemapsmarker_in_the_deprecated_as_of_february_2024)).
103
104
 
104
- In order to use the `AdvancedMarker` component is necessary to specify a MapId on declaring the `GoogleMap` component ([see more here](https://developers.google.com/maps/documentation/javascript/advanced-markers/start#create_a_map_id)).
105
+ In order to use the `AdvancedMarker` component it is necessary to specify a MapId on declaring the `GoogleMap` component ([see more here](https://developers.google.com/maps/documentation/javascript/advanced-markers/start#create_a_map_id)).
106
+
107
+ > [!IMPORTANT]
108
+ > If you're using the `AdvancedMarker` component with an external loader (using the `apiPromise` prop), you must include the `marker` library in your loader configuration:
109
+ >
110
+ > ```js
111
+ > const loader = new Loader({
112
+ > apiKey: YOUR_GOOGLE_MAPS_API_KEY,
113
+ > version: 'weekly',
114
+ > libraries: ['marker'], // Required for AdvancedMarker component
115
+ > });
116
+ > ```
105
117
 
106
118
  #### Options
107
119
 
@@ -109,7 +121,7 @@ You can pass a [AdvancedMarkerElementOptions](https://developers.google.com/maps
109
121
 
110
122
  You can also pass a [PinElementOptions interface](https://developers.google.com/maps/documentation/javascript/reference/advanced-markers#PinElementOptions) object to customize pin used by the marker.
111
123
 
112
- Additionally, `AdvancedMarker` supports default slot content, allowing you to use custom HTML or Vue components inside the marker.
124
+ Additionally, `AdvancedMarker` supports custom slot content via the `content` slot, allowing you to use custom HTML or Vue components inside the marker.
113
125
 
114
126
  ```vue
115
127
  <script setup>
@@ -130,9 +142,11 @@ const pinOptions = { background: '#FBBC04' }
130
142
  >
131
143
  <AdvancedMarker :options="markerOptions" :pin-options="pinOptions"/>
132
144
  <AdvancedMarker :options="markerOptions">
133
- <div style="background: white; color: black; padding: 5px; border-radius: 5px">
134
- Custom Content
135
- </div>
145
+ <template #content>
146
+ <div style="background: white; color: black; padding: 5px; border-radius: 5px">
147
+ Custom Content
148
+ </div>
149
+ </template>
136
150
  </AdvancedMarker>
137
151
  </GoogleMap>
138
152
  </template>
@@ -144,6 +158,9 @@ You can listen for [the following events](https://developers.google.com/maps/doc
144
158
 
145
159
  ### Marker
146
160
 
161
+ > [!WARNING]
162
+ > **DEPRECATED:** The `Marker` component is deprecated as of February 2024. Please use the [`AdvancedMarker`](#advanced-marker) component instead for new projects. The legacy `google.maps.Marker` API will be removed in a future version. [Learn more about the deprecation](https://developers.google.com/maps/deprecations#googlemapsmarker_in_the_deprecated_as_of_february_2024).
163
+
147
164
  Use the `Marker` component to draw markers, drop pins or any custom icons on a map.
148
165
 
149
166
  #### Options
@@ -447,6 +464,56 @@ const center = { lat: -25.363, lng: 131.044 }
447
464
  </template>
448
465
  ```
449
466
 
467
+ #### Use with AdvancedMarker
468
+
469
+ You can nest the `InfoWindow` component inside the `AdvancedMarker` component to display an info window when the marker is clicked.
470
+
471
+ ```vue
472
+ <script setup>
473
+ import { GoogleMap, AdvancedMarker, InfoWindow } from 'vue3-google-map';
474
+
475
+ const center = { lat: -25.363, lng: 131.044 };
476
+
477
+ const centerSydney = { lat: -33.873220, lng: 151.206176 };
478
+ const makerOptionsSydney = { position: centerSydney, title: 'SYDNEY' };
479
+
480
+ const centerPerth = { lat: -31.954877, lng: 115.860462 };
481
+ const markerOptionsPerth = { position: centerPerth, title: 'PERTH' };
482
+ </script>
483
+
484
+ <template>
485
+ <GoogleMap
486
+ mapId="DEMO_MAP_ID"
487
+ style="width: 100%; height: 500px"
488
+ :center="center"
489
+ :zoom="3"
490
+ >
491
+ <AdvancedMarker :options="makerOptionsSydney">
492
+ <InfoWindow>
493
+ <h1>Sydney</h1>
494
+ <div>
495
+ Default AdvancedMarker With Custom InfoWindow
496
+ </div>
497
+ </InfoWindow>
498
+ </AdvancedMarker>
499
+
500
+ <AdvancedMarker :options="markerOptionsPerth">
501
+ <template #content>
502
+ <div style="background: white; color: black; padding: 5px; border-radius: 5px">
503
+ Perth
504
+ </div>
505
+ </template>
506
+ <InfoWindow>
507
+ <h1>Perth</h1>
508
+ <div>
509
+ Custom Content AdvancedMarker With Custom InfoWindow
510
+ </div>
511
+ </InfoWindow>
512
+ </AdvancedMarker>
513
+ </GoogleMap>
514
+ </template>
515
+ ```
516
+
450
517
  #### Open and close the Info Window
451
518
 
452
519
  You can use `v-model` to manage the state of the info window programmatically or to know whether it's open or closed
@@ -646,6 +713,9 @@ You can listen for [the following events](https://googlemaps.github.io/js-marker
646
713
 
647
714
  ### Heatmap Layer
648
715
 
716
+ > [!WARNING]
717
+ > **DEPRECATED:** The `HeatmapLayer` component was deprecated on **May 27, 2025** and will be sunset in **May 2026**. Google recommends migrating to third-party library integrations like [deck.gl](https://deck.gl/), which offers a HeatmapLayer implementation. [Learn more about the deprecation](https://developers.google.com/maps/deprecations).
718
+
649
719
  Use the `HeatmapLayer` component to depict the intensity of data at geographical points on the map. Make sure to include the `visualization` library in the `libraries` prop of the `GoogleMap` component.
650
720
 
651
721
  #### Options
@@ -833,7 +903,7 @@ import { GoogleMap, Marker } from 'vue3-google-map';
833
903
  import { Loader } from '@googlemaps/js-api-loader';
834
904
 
835
905
  const loader = new Loader({
836
- apiKey: '',
906
+ apiKey: YOUR_GOOGLE_MAPS_API_KEY,
837
907
  version: 'weekly',
838
908
  libraries: ['places'],
839
909
  });
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-e7ebb206]{width:100%;height:100%}.advanced-marker-wrapper{display:none}.mapdiv .advanced-marker-wrapper{display:inline-block}.custom-control-wrapper[data-v-d099a3a6]{display:none}.mapdiv .custom-control-wrapper[data-v-d099a3a6]{display:inline-block}.info-window-wrapper[data-v-cbe1707b]{display:none}.mapdiv .info-window-wrapper[data-v-cbe1707b]{display:inline-block}.custom-marker-wrapper[data-v-2d2d343a]{display:none}.mapdiv .custom-marker-wrapper[data-v-2d2d343a]{display:inline-block}")),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- "use strict";var Me=Object.defineProperty;var Ee=(s,e,t)=>e in s?Me(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var H=(s,e,t)=>(Ee(s,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),I=Symbol("map"),T=Symbol("api"),X=Symbol("marker"),Q=Symbol("markerCluster"),z=Symbol("CustomMarker"),ve=Symbol("mapTilesLoaded"),j=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];/*! *****************************************************************************
2
+ "use strict";var Me=Object.defineProperty;var Ee=(s,e,t)=>e in s?Me(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var H=(s,e,t)=>(Ee(s,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),I=Symbol("map"),T=Symbol("api"),X=Symbol("marker"),Q=Symbol("markerCluster"),z=Symbol("CustomMarker"),ve=Symbol("mapTilesLoaded"),j=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];/*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
5
5
  Permission to use, copy, modify, and/or distribute this software for any
@@ -12,7 +12,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */function Pe(s,e,t,r){function n(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function c(d){try{p(r.next(d))}catch(u){a(u)}}function i(d){try{p(r.throw(d))}catch(u){a(u)}}function p(d){d.done?o(d.value):n(d.value).then(c,i)}p((r=r.apply(s,e||[])).next())})}var Oe=function s(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,o;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!s(e[n],t[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){var a=o[n];if(!s(e[a],t[a]))return!1}return!0}return e!==e&&t!==t};const ne="__googleMapsScriptId";var R;(function(s){s[s.INITIALIZED=0]="INITIALIZED",s[s.LOADING=1]="LOADING",s[s.SUCCESS=2]="SUCCESS",s[s.FAILURE=3]="FAILURE"})(R||(R={}));class A{constructor({apiKey:e,authReferrerPolicy:t,channel:r,client:n,id:o=ne,language:a,libraries:c=[],mapIds:i,nonce:p,region:d,retries:u=3,url:h="https://maps.googleapis.com/maps/api/js",version:f}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=t,this.channel=r,this.client=n,this.id=o||ne,this.language=a,this.libraries=c,this.mapIds=i,this.nonce=p,this.region=d,this.retries=u,this.url=h,this.version=f,A.instance){if(!Oe(this.options,A.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(A.instance.options)}`);return A.instance}A.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?R.FAILURE:this.done?R.SUCCESS:this.loading?R.LOADING:R.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback",this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`&region=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((e,t)=>{this.loadCallback(r=>{r?t(r.error):e(window.google)})})}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,t;if(document.getElementById(this.id)){this.callback();return}const r={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(r).forEach(o=>!r[o]&&delete r[o]),!((t=(e=window==null?void 0:window.google)===null||e===void 0?void 0:e.maps)===null||t===void 0)&&t.importLibrary||(o=>{let a,c,i,p="The Google Maps JavaScript API",d="google",u="importLibrary",h="__ib__",f=document,m=window;m=m[d]||(m[d]={});const g=m.maps||(m.maps={}),v=new Set,y=new URLSearchParams,w=()=>a||(a=new Promise((k,M)=>Pe(this,void 0,void 0,function*(){var C;yield c=f.createElement("script"),c.id=this.id,y.set("libraries",[...v]+"");for(i in o)y.set(i.replace(/[A-Z]/g,E=>"_"+E[0].toLowerCase()),o[i]);y.set("callback",d+".maps."+h),c.src=this.url+"?"+y,g[h]=k,c.onerror=()=>a=M(Error(p+" could not load.")),c.nonce=this.nonce||((C=f.querySelector("script[nonce]"))===null||C===void 0?void 0:C.nonce)||"",f.head.append(c)})));g[u]?console.warn(p+" only loads once. Ignoring:",o):g[u]=(k,...M)=>v.add(k)&&w().then(()=>g[u](k,...M))})(r);const n=this.libraries.map(o=>this.importLibrary(o));n.length||n.push(this.importLibrary("core")),Promise.all(n).then(()=>this.callback(),o=>{const a=new ErrorEvent("error",{error:o});this.loadErrorCallback(a)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const t=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${t} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},t)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(e=>{e(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading||(this.loading=!0,this.setScript())}}}function Se(s){return class extends s.OverlayView{constructor(r){super();H(this,"element");H(this,"opts");const{element:n,...o}=r;this.element=n,this.opts=o,this.opts.map&&this.setMap(this.opts.map)}getPosition(){return this.opts.position?this.opts.position instanceof s.LatLng?this.opts.position:new s.LatLng(this.opts.position):null}getVisible(){if(!this.element)return!1;const r=this.element;return r.style.display!=="none"&&r.style.visibility!=="hidden"&&(r.style.opacity===""||Number(r.style.opacity)>.01)}onAdd(){if(!this.element)return;const r=this.getPanes();r&&r.overlayMouseTarget.appendChild(this.element)}draw(){if(!this.element)return;const r=this.getProjection(),n=r==null?void 0:r.fromLatLngToDivPixel(this.getPosition());if(n){this.element.style.position="absolute";let o,a;switch(this.opts.anchorPoint){case"TOP_CENTER":o="-50%",a="-100%";break;case"BOTTOM_CENTER":o="-50%",a="0";break;case"LEFT_CENTER":o="-100%",a="-50%";break;case"RIGHT_CENTER":o="0",a="-50%";break;case"TOP_LEFT":o="-100%",a="-100%";break;case"TOP_RIGHT":o="0",a="-100%";break;case"BOTTOM_LEFT":o="-100%",a="0";break;case"BOTTOM_RIGHT":o="0",a="0";break;default:o="-50%",a="-50%"}const c=n.x+(this.opts.offsetX||0)+"px",i=n.y+(this.opts.offsetY||0)+"px";this.element.style.transform=`translateX(${o}) translateX(${c}) translateY(${a}) translateY(${i})`,this.opts.zIndex&&(this.element.style.zIndex=this.opts.zIndex.toString())}}onRemove(){this.element&&this.element.remove()}setOptions(r){const{element:n,...o}=r;this.element=n,this.opts=o,this.draw()}}}let se;const oe=["bounds_changed","center_changed","click","contextmenu","dblclick","drag","dragend","dragstart","heading_changed","idle","isfractionalzoomenabled_changed","mapcapabilities_changed","maptypeid_changed","mousemove","mouseout","mouseover","projection_changed","renderingtype_changed","rightclick","tilesloaded","tilt_changed","zoom_changed"],Le=l.defineComponent({props:{apiPromise:{type:Promise},apiKey:{type:String,default:""},version:{type:String,default:"weekly"},libraries:{type:Array,default:()=>["places","marker"]},region:{type:String,required:!1},language:{type:String,required:!1},backgroundColor:{type:String,required:!1},center:{type:Object,default:()=>({lat:0,lng:0})},clickableIcons:{type:Boolean,required:!1,default:void 0},colorScheme:{type:String,required:!1},controlSize:{type:Number,required:!1},disableDefaultUi:{type:Boolean,required:!1,default:void 0},disableDoubleClickZoom:{type:Boolean,required:!1,default:void 0},draggable:{type:Boolean,required:!1,default:void 0},draggableCursor:{type:String,required:!1},draggingCursor:{type:String,required:!1},fullscreenControl:{type:Boolean,required:!1,default:void 0},fullscreenControlPosition:{type:String,required:!1},gestureHandling:{type:String,required:!1},heading:{type:Number,required:!1},isFractionalZoomEnabled:{type:Boolean,required:!1,default:void 0},keyboardShortcuts:{type:Boolean,required:!1,default:void 0},mapTypeControl:{type:Boolean,required:!1,default:void 0},mapTypeControlOptions:{type:Object,required:!1},mapTypeId:{type:[Number,String],required:!1},mapId:{type:String,required:!1},maxZoom:{type:Number,required:!1},minZoom:{type:Number,required:!1},noClear:{type:Boolean,required:!1,default:void 0},panControl:{type:Boolean,required:!1,default:void 0},panControlPosition:{type:String,required:!1},restriction:{type:Object,required:!1},rotateControl:{type:Boolean,required:!1,default:void 0},rotateControlPosition:{type:String,required:!1},scaleControl:{type:Boolean,required:!1,default:void 0},scaleControlStyle:{type:Number,required:!1},scrollwheel:{type:Boolean,required:!1,default:void 0},streetView:{type:Object,required:!1},streetViewControl:{type:Boolean,required:!1,default:void 0},streetViewControlPosition:{type:String,required:!1},styles:{type:Array,required:!1},tilt:{type:Number,required:!1},zoom:{type:Number,required:!1},zoomControl:{type:Boolean,required:!1,default:void 0},zoomControlPosition:{type:String,required:!1},cameraControl:{type:Boolean,required:!1,default:void 0},cameraControlPosition:{type:String,required:!1},nonce:{type:String,default:""}},emits:oe,setup(s,{emit:e}){const t=l.ref(),r=l.ref(!1),n=l.ref(),o=l.ref(),a=l.ref(!1);l.provide(I,n),l.provide(T,o),l.provide(ve,a);const c=()=>{const u={...s};Object.keys(u).forEach(g=>{u[g]===void 0&&delete u[g]});const f=g=>{var v;return g?{position:(v=o.value)==null?void 0:v.ControlPosition[g]}:{}},m={scaleControlOptions:s.scaleControlStyle?{style:s.scaleControlStyle}:{},panControlOptions:f(s.panControlPosition),zoomControlOptions:f(s.zoomControlPosition),rotateControlOptions:f(s.rotateControlPosition),streetViewControlOptions:f(s.streetViewControlPosition),fullscreenControlOptions:f(s.fullscreenControlPosition),cameraControlOptions:f(s.cameraControlPosition),disableDefaultUI:s.disableDefaultUi};return{...u,...m}},i=l.watch([o,n],([u,h])=>{const f=u,m=h;f&&m&&(f.event.addListenerOnce(m,"tilesloaded",()=>{a.value=!0}),setTimeout(i,0))},{immediate:!0}),p=()=>{try{const{apiKey:u,region:h,version:f,language:m,libraries:g,nonce:v}=s;se=new A({apiKey:u,region:h,version:f,language:m,libraries:g,nonce:v})}catch(u){console.error(u)}},d=u=>{o.value=l.markRaw(u.maps),n.value=l.markRaw(new u.maps.Map(t.value,c()));const h=Se(o.value);o.value[z]=h,oe.forEach(m=>{var g;(g=n.value)==null||g.addListener(m,v=>e(m,v))}),r.value=!0;const f=Object.keys(s).filter(m=>!["apiPromise","apiKey","version","libraries","region","language","center","zoom","nonce"].includes(m)).map(m=>l.toRef(s,m));l.watch([()=>s.center,()=>s.zoom,...f],([m,g],[v,y])=>{var E,b,P;const{center:w,zoom:k,...M}=c();(E=n.value)==null||E.setOptions(M),g!==void 0&&g!==y&&((b=n.value)==null||b.setZoom(g));const C=!v||m.lng!==v.lng||m.lat!==v.lat;m&&C&&((P=n.value)==null||P.panTo(m))})};return l.onMounted(()=>{s.apiPromise&&s.apiPromise instanceof Promise?s.apiPromise.then(d):(p(),se.load().then(d))}),l.onBeforeUnmount(()=>{var u;a.value=!1,n.value&&((u=o.value)==null||u.event.clearInstanceListeners(n.value))}),{mapRef:t,ready:r,map:n,api:o,mapTilesLoaded:a}}});const U=(s,e)=>{const t=s.__vccOpts||s;for(const[r,n]of e)t[r]=n;return t},xe={ref:"mapRef",class:"mapdiv"};function Ae(s,e,t,r,n,o){return l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",xe,null,512),l.renderSlot(s.$slots,"default",l.normalizeProps(l.guardReactiveProps({ready:s.ready,map:s.map,api:s.api,mapTilesLoaded:s.mapTilesLoaded})),void 0,!0)])}const Ie=U(Le,[["render",Ae],["__scopeId","data-v-e7ebb206"]]);function Te(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Re=function s(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,o;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!s(e[n],t[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){var a=o[n];if(!s(e[a],t[a]))return!1}return!0}return e!==e&&t!==t};const O=Te(Re),ie=["click","drag","dragend","dragstart","gmp-click"],$e=l.defineComponent({name:"AdvancedMarker",props:{options:{type:Object,required:!0},pinOptions:{type:Object,required:!1}},emits:ie,setup(s,{emit:e,expose:t,slots:r}){const n=l.ref(),o=l.computed(()=>{var f;return(f=r.default)==null?void 0:f.call(r).some(m=>m.type!==l.Comment)}),a=l.toRef(s,"options"),c=l.toRef(s,"pinOptions"),i=l.ref(),p=l.inject(I,l.ref()),d=l.inject(T,l.ref()),u=l.inject(Q,l.ref()),h=l.computed(()=>!!(u.value&&d.value&&i.value instanceof google.maps.marker.AdvancedMarkerElement));return l.watch([p,a,c],async(f,[m,g,v])=>{var C,E,b;const w=!O(a.value,g)||!O(c.value,v)||p.value!==m;if(!p.value||!d.value||!w)return;const{AdvancedMarkerElement:k,PinElement:M}=d.value.marker;if(i.value){const{map:P,content:D,...G}=a.value;Object.assign(i.value,{content:o.value?n.value:c.value?new M(c.value).element:D,...G}),h.value&&((C=u.value)==null||C.removeMarker(i.value),(E=u.value)==null||E.addMarker(i.value))}else o.value?a.value.content=n.value:c.value&&(a.value.content=new M(c.value).element),i.value=l.markRaw(new k(a.value)),h.value?(b=u.value)==null||b.addMarker(i.value):i.value.map=p.value,ie.forEach(P=>{var D;(D=i.value)==null||D.addListener(P,G=>e(P,G))})},{immediate:!0}),l.onBeforeUnmount(()=>{var f,m;i.value&&((f=d.value)==null||f.event.clearInstanceListeners(i.value),h.value?(m=u.value)==null||m.removeMarker(i.value):i.value.map=null)}),l.provide(X,i),t({marker:i}),{hasSlotContent:o,markerRef:n}}});const je={key:0,class:"advanced-marker-wrapper"};function Be(s,e,t,r,n,o){return s.hasSlotContent?(l.openBlock(),l.createElementBlock("div",je,[l.createElementVNode("div",l.mergeProps({ref:"markerRef"},s.$attrs),[l.renderSlot(s.$slots,"default")],16)])):l.createCommentVNode("",!0)}const qe=U($e,[["render",Be]]),Ne=s=>s==="Marker",Ze=s=>s===z,B=(s,e,t,r)=>{const n=l.ref(),o=l.inject(I,l.ref()),a=l.inject(T,l.ref()),c=l.inject(Q,l.ref()),i=l.computed(()=>!!(c.value&&a.value&&(n.value instanceof a.value.Marker||n.value instanceof a.value[z])));return l.watch([o,t],(p,[d,u])=>{var f,m,g;const h=!O(t.value,u)||o.value!==d;!o.value||!a.value||!h||(n.value?(n.value.setOptions(t.value),i.value&&((f=c.value)==null||f.removeMarker(n.value),(m=c.value)==null||m.addMarker(n.value))):(Ne(s)?n.value=l.markRaw(new a.value[s](t.value)):Ze(s)?n.value=l.markRaw(new a.value[s](t.value)):n.value=l.markRaw(new a.value[s]({...t.value,map:o.value})),i.value?(g=c.value)==null||g.addMarker(n.value):n.value.setMap(o.value),e.forEach(v=>{var y;(y=n.value)==null||y.addListener(v,w=>r(v,w))})))},{immediate:!0}),l.onBeforeUnmount(()=>{var p,d;n.value&&((p=a.value)==null||p.event.clearInstanceListeners(n.value),i.value?(d=c.value)==null||d.removeMarker(n.value):n.value.setMap(null))}),n},ae=["animation_changed","click","dblclick","rightclick","dragstart","dragend","drag","mouseover","mousedown","mouseout","mouseup","draggable_changed","clickable_changed","contextmenu","cursor_changed","flat_changed","rightclick","zindex_changed","icon_changed","position_changed","shape_changed","title_changed","visible_changed"],Ue=l.defineComponent({name:"Marker",props:{options:{type:Object,required:!0}},emits:ae,setup(s,{emit:e,expose:t,slots:r}){const n=l.toRef(s,"options"),o=B("Marker",ae,n,e);return l.provide(X,o),t({marker:o}),()=>{var a;return(a=r.default)==null?void 0:a.call(r)}}}),De=l.defineComponent({name:"Polyline",props:{options:{type:Object,required:!0}},emits:j,setup(s,{emit:e}){const t=l.toRef(s,"options");return{polyline:B("Polyline",j,t,e)}},render:()=>null}),Fe=l.defineComponent({name:"Polygon",props:{options:{type:Object,required:!0}},emits:j,setup(s,{emit:e}){const t=l.toRef(s,"options");return{polygon:B("Polygon",j,t,e)}},render:()=>null}),le=j.concat(["bounds_changed"]),Ve=l.defineComponent({name:"Rectangle",props:{options:{type:Object,required:!0}},emits:le,setup(s,{emit:e}){const t=l.toRef(s,"options");return{rectangle:B("Rectangle",le,t,e)}},render:()=>null}),ce=j.concat(["center_changed","radius_changed"]),ze=l.defineComponent({name:"Circle",props:{options:{type:Object,required:!0}},emits:ce,setup(s,{emit:e}){const t=l.toRef(s,"options");return{circle:B("Circle",ce,t,e)}},render:()=>null}),Ge=l.defineComponent({props:{position:{type:String,required:!0},index:{type:Number,default:1}},emits:["content:loaded"],setup(s,{emit:e}){const t=l.ref(null),r=l.inject(I,l.ref()),n=l.inject(T,l.ref()),o=l.inject(ve,l.ref(!1)),a=l.watch([o,n,t],([p,d,u])=>{d&&p&&u&&(c(s.position),e("content:loaded"),setTimeout(a,0))},{immediate:!0}),c=p=>{if(r.value&&n.value&&t.value){const d=n.value.ControlPosition[p];r.value.controls[d].push(t.value)}},i=p=>{if(r.value&&n.value){let d=null;const u=n.value.ControlPosition[p];r.value.controls[u].forEach((h,f)=>{h===t.value&&(d=f)}),d!==null&&r.value.controls[u].removeAt(d)}};return l.onBeforeUnmount(()=>i(s.position)),l.watch(()=>s.position,(p,d)=>{i(d),c(p)}),l.watch(()=>s.index,p=>{p&&t.value&&(t.value.index=s.index)}),{controlRef:t}}});const He={ref:"controlRef",class:"custom-control-wrapper"};function We(s,e,t,r,n,o){return l.openBlock(),l.createElementBlock("div",He,[l.renderSlot(s.$slots,"default",{},void 0,!0)],512)}const Ke=U(Ge,[["render",We],["__scopeId","data-v-d099a3a6"]]),ue=["closeclick","content_changed","domready","position_changed","visible","zindex_changed"],Ye=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})},modelValue:{type:Boolean}},emits:[...ue,"update:modelValue"],setup(s,{slots:e,emit:t,expose:r}){const n=l.ref(),o=l.ref(),a=l.inject(I,l.ref()),c=l.inject(T,l.ref()),i=l.inject(X,l.ref());let p,d=s.modelValue;const u=l.computed(()=>{var g;return(g=e.default)==null?void 0:g.call(e).some(v=>v.type!==l.Comment)}),h=g=>{d=g,t("update:modelValue",g)},f=g=>{n.value&&(n.value.open({map:a.value,anchor:i.value,...g}),h(!0))},m=()=>{n.value&&(n.value.close(),h(!1))};return l.onMounted(()=>{l.watch([a,()=>s.options],([g,v],[y,w])=>{var M;const k=!O(v,w)||a.value!==y;a.value&&c.value&&k&&(n.value?(n.value.setOptions({...v,content:u.value?o.value:v.content}),i.value||f()):(n.value=l.markRaw(new c.value.InfoWindow({...v,content:u.value?o.value:v.content})),i.value&&(p=i.value.addListener("click",()=>{f()})),(!i.value||d)&&f(),ue.forEach(C=>{var E;(E=n.value)==null||E.addListener(C,b=>t(C,b))}),(M=n.value)==null||M.addListener("closeclick",()=>h(!1))))},{immediate:!0}),l.watch(()=>s.modelValue,g=>{g!==d&&(g?f():m())})}),l.onBeforeUnmount(()=>{var g;p&&p.remove(),n.value&&((g=c.value)==null||g.event.clearInstanceListeners(n.value),m())}),r({infoWindow:n,open:f,close:m}),{infoWindow:n,infoWindowRef:o,hasSlotContent:u,open:f,close:m}}});const Je={key:0,class:"info-window-wrapper"};function Xe(s,e,t,r,n,o){return s.hasSlotContent?(l.openBlock(),l.createElementBlock("div",Je,[l.createElementVNode("div",l.mergeProps({ref:"infoWindowRef"},s.$attrs),[l.renderSlot(s.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("",!0)}const Qe=U(Ye,[["render",Xe],["__scopeId","data-v-cbe1707b"]]),de=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],W=1,q=8;class ee{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[t,r]=new Uint8Array(e,0,2);if(t!==219)throw new Error("Data does not appear to be in a KDBush format.");const n=r>>4;if(n!==W)throw new Error(`Got v${n} data when expected v${W}.`);const o=de[r&15];if(!o)throw new Error("Unrecognized array type.");const[a]=new Uint16Array(e,2,1),[c]=new Uint32Array(e,4,1);return new ee(c,a,o,e)}constructor(e,t=64,r=Float64Array,n){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const o=de.indexOf(this.ArrayType),a=e*2*this.ArrayType.BYTES_PER_ELEMENT,c=e*this.IndexArrayType.BYTES_PER_ELEMENT,i=(8-c%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,q,e),this.coords=new this.ArrayType(this.data,q+c+i,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(q+a+c+i),this.ids=new this.IndexArrayType(this.data,q,e),this.coords=new this.ArrayType(this.data,q+c+i,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(W<<4)+o]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=t,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return J(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:a,nodeSize:c}=this,i=[0,o.length-1,0],p=[];for(;i.length;){const d=i.pop()||0,u=i.pop()||0,h=i.pop()||0;if(u-h<=c){for(let v=h;v<=u;v++){const y=a[2*v],w=a[2*v+1];y>=e&&y<=r&&w>=t&&w<=n&&p.push(o[v])}continue}const f=h+u>>1,m=a[2*f],g=a[2*f+1];m>=e&&m<=r&&g>=t&&g<=n&&p.push(o[f]),(d===0?e<=m:t<=g)&&(i.push(h),i.push(f-1),i.push(1-d)),(d===0?r>=m:n>=g)&&(i.push(f+1),i.push(u),i.push(1-d))}return p}within(e,t,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:n,coords:o,nodeSize:a}=this,c=[0,n.length-1,0],i=[],p=r*r;for(;c.length;){const d=c.pop()||0,u=c.pop()||0,h=c.pop()||0;if(u-h<=a){for(let v=h;v<=u;v++)pe(o[2*v],o[2*v+1],e,t)<=p&&i.push(n[v]);continue}const f=h+u>>1,m=o[2*f],g=o[2*f+1];pe(m,g,e,t)<=p&&i.push(n[f]),(d===0?e-r<=m:t-r<=g)&&(c.push(h),c.push(f-1),c.push(1-d)),(d===0?e+r>=m:t+r>=g)&&(c.push(f+1),c.push(u),c.push(1-d))}return i}}function J(s,e,t,r,n,o){if(n-r<=t)return;const a=r+n>>1;ye(s,e,a,r,n,o),J(s,e,t,r,a-1,1-o),J(s,e,t,a+1,n,1-o)}function ye(s,e,t,r,n,o){for(;n>r;){if(n-r>600){const p=n-r+1,d=t-r+1,u=Math.log(p),h=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*h*(p-h)/p)*(d-p/2<0?-1:1),m=Math.max(r,Math.floor(t-d*h/p+f)),g=Math.min(n,Math.floor(t+(p-d)*h/p+f));ye(s,e,t,m,g,o)}const a=e[2*t+o];let c=r,i=n;for(N(s,e,r,t),e[2*n+o]>a&&N(s,e,r,n);c<i;){for(N(s,e,c,i),c++,i--;e[2*c+o]<a;)c++;for(;e[2*i+o]>a;)i--}e[2*r+o]===a?N(s,e,r,i):(i++,N(s,e,i,n)),i<=t&&(r=i+1),t<=i&&(n=i-1)}}function N(s,e,t,r){K(s,t,r),K(e,2*t,2*r),K(e,2*t+1,2*r+1)}function K(s,e,t){const r=s[e];s[e]=s[t],s[t]=r}function pe(s,e,t,r){const n=s-t,o=e-r;return n*n+o*o}const et={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:s=>s},he=Math.fround||(s=>e=>(s[0]=+e,s[0]))(new Float32Array(1)),x=2,L=3,Y=4,S=5,we=6;class ke{constructor(e){this.options=Object.assign(Object.create(et),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:r,maxZoom:n}=this.options;t&&console.time("total time");const o=`prepare ${e.length} points`;t&&console.time(o),this.points=e;const a=[];for(let i=0;i<e.length;i++){const p=e[i];if(!p.geometry)continue;const[d,u]=p.geometry.coordinates,h=he(F(d)),f=he(V(u));a.push(h,f,1/0,i,-1,1),this.options.reduce&&a.push(0)}let c=this.trees[n+1]=this._createTree(a);t&&console.timeEnd(o);for(let i=n;i>=r;i--){const p=+Date.now();c=this.trees[i]=this._createTree(this._cluster(c,i)),t&&console.log("z%d: %d clusters in %dms",i,c.numItems,+Date.now()-p)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let r=((e[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,e[1]));let o=e[2]===180?180:((e[2]+180)%360+360)%360-180;const a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,o=180;else if(r>o){const u=this.getClusters([r,n,180,a],t),h=this.getClusters([-180,n,o,a],t);return u.concat(h)}const c=this.trees[this._limitZoom(t)],i=c.range(F(r),V(a),F(o),V(n)),p=c.data,d=[];for(const u of i){const h=this.stride*u;d.push(p[h+S]>1?fe(p,h,this.clusterProps):this.points[p[h+L]])}return d}getChildren(e){const t=this._getOriginId(e),r=this._getOriginZoom(e),n="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(n);const a=o.data;if(t*this.stride>=a.length)throw new Error(n);const c=this.options.radius/(this.options.extent*Math.pow(2,r-1)),i=a[t*this.stride],p=a[t*this.stride+1],d=o.within(i,p,c),u=[];for(const h of d){const f=h*this.stride;a[f+Y]===e&&u.push(a[f+S]>1?fe(a,f,this.clusterProps):this.points[a[f+L]])}if(u.length===0)throw new Error(n);return u}getLeaves(e,t,r){t=t||10,r=r||0;const n=[];return this._appendLeaves(n,e,t,r,0),n}getTile(e,t,r){const n=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:a,radius:c}=this.options,i=c/a,p=(r-i)/o,d=(r+1+i)/o,u={features:[]};return this._addTileFeatures(n.range((t-i)/o,p,(t+1+i)/o,d),n.data,t,r,o,u),t===0&&this._addTileFeatures(n.range(1-i/o,p,1,d),n.data,o,r,o,u),t===o-1&&this._addTileFeatures(n.range(0,p,i/o,d),n.data,-1,r,o,u),u.features.length?u:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const r=this.getChildren(e);if(t++,r.length!==1)break;e=r[0].properties.cluster_id}return t}_appendLeaves(e,t,r,n,o){const a=this.getChildren(t);for(const c of a){const i=c.properties;if(i&&i.cluster?o+i.point_count<=n?o+=i.point_count:o=this._appendLeaves(e,i.cluster_id,r,n,o):o<n?o++:e.push(c),e.length===r)break}return o}_createTree(e){const t=new ee(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)t.add(e[r],e[r+1]);return t.finish(),t.data=e,t}_addTileFeatures(e,t,r,n,o,a){for(const c of e){const i=c*this.stride,p=t[i+S]>1;let d,u,h;if(p)d=_e(t,i,this.clusterProps),u=t[i],h=t[i+1];else{const g=this.points[t[i+L]];d=g.properties;const[v,y]=g.geometry.coordinates;u=F(v),h=V(y)}const f={type:1,geometry:[[Math.round(this.options.extent*(u*o-r)),Math.round(this.options.extent*(h*o-n))]],tags:d};let m;p||this.options.generateId?m=t[i+L]:m=this.points[t[i+L]].id,m!==void 0&&(f.id=m),a.features.push(f)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:r,extent:n,reduce:o,minPoints:a}=this.options,c=r/(n*Math.pow(2,t)),i=e.data,p=[],d=this.stride;for(let u=0;u<i.length;u+=d){if(i[u+x]<=t)continue;i[u+x]=t;const h=i[u],f=i[u+1],m=e.within(i[u],i[u+1],c),g=i[u+S];let v=g;for(const y of m){const w=y*d;i[w+x]>t&&(v+=i[w+S])}if(v>g&&v>=a){let y=h*g,w=f*g,k,M=-1;const C=((u/d|0)<<5)+(t+1)+this.points.length;for(const E of m){const b=E*d;if(i[b+x]<=t)continue;i[b+x]=t;const P=i[b+S];y+=i[b]*P,w+=i[b+1]*P,i[b+Y]=C,o&&(k||(k=this._map(i,u,!0),M=this.clusterProps.length,this.clusterProps.push(k)),o(k,this._map(i,b)))}i[u+Y]=C,p.push(y/v,w/v,1/0,C,-1,v),o&&p.push(M)}else{for(let y=0;y<d;y++)p.push(i[u+y]);if(v>1)for(const y of m){const w=y*d;if(!(i[w+x]<=t)){i[w+x]=t;for(let k=0;k<d;k++)p.push(i[w+k])}}}}return p}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,r){if(e[t+S]>1){const a=this.clusterProps[e[t+we]];return r?Object.assign({},a):a}const n=this.points[e[t+L]].properties,o=this.options.map(n);return r&&o===n?Object.assign({},o):o}}function fe(s,e,t){return{type:"Feature",id:s[e+L],properties:_e(s,e,t),geometry:{type:"Point",coordinates:[tt(s[e]),rt(s[e+1])]}}}function _e(s,e,t){const r=s[e+S],n=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=s[e+we],a=o===-1?{}:Object.assign({},t[o]);return Object.assign(a,{cluster:!0,cluster_id:s[e+L],point_count:r,point_count_abbreviated:n})}function F(s){return s/360+.5}function V(s){const e=Math.sin(s*Math.PI/180),t=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return t<0?0:t>1?1:t}function tt(s){return(s-.5)*360}function rt(s){const e=(180-s*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
15
+ ***************************************************************************** */function Pe(s,e,t,r){function n(o){return o instanceof t?o:new t(function(l){l(o)})}return new(t||(t=Promise))(function(o,l){function c(d){try{h(r.next(d))}catch(u){l(u)}}function i(d){try{h(r.throw(d))}catch(u){l(u)}}function h(d){d.done?o(d.value):n(d.value).then(c,i)}h((r=r.apply(s,e||[])).next())})}var Oe=function s(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,o;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!s(e[n],t[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){var l=o[n];if(!s(e[l],t[l]))return!1}return!0}return e!==e&&t!==t};const ne="__googleMapsScriptId";var R;(function(s){s[s.INITIALIZED=0]="INITIALIZED",s[s.LOADING=1]="LOADING",s[s.SUCCESS=2]="SUCCESS",s[s.FAILURE=3]="FAILURE"})(R||(R={}));class A{constructor({apiKey:e,authReferrerPolicy:t,channel:r,client:n,id:o=ne,language:l,libraries:c=[],mapIds:i,nonce:h,region:d,retries:u=3,url:p="https://maps.googleapis.com/maps/api/js",version:f}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=e,this.authReferrerPolicy=t,this.channel=r,this.client=n,this.id=o||ne,this.language=l,this.libraries=c,this.mapIds=i,this.nonce=h,this.region=d,this.retries=u,this.url=p,this.version=f,A.instance){if(!Oe(this.options,A.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(A.instance.options)}`);return A.instance}A.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?R.FAILURE:this.done?R.SUCCESS:this.loading?R.LOADING:R.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=__googleMapsCallback",this.apiKey&&(e+=`&key=${this.apiKey}`),this.channel&&(e+=`&channel=${this.channel}`),this.client&&(e+=`&client=${this.client}`),this.libraries.length>0&&(e+=`&libraries=${this.libraries.join(",")}`),this.language&&(e+=`&language=${this.language}`),this.region&&(e+=`&region=${this.region}`),this.version&&(e+=`&v=${this.version}`),this.mapIds&&(e+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(e+=`&auth_referrer_policy=${this.authReferrerPolicy}`),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((e,t)=>{this.loadCallback(r=>{r?t(r.error):e(window.google)})})}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,t;if(document.getElementById(this.id)){this.callback();return}const r={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(r).forEach(o=>!r[o]&&delete r[o]),!((t=(e=window==null?void 0:window.google)===null||e===void 0?void 0:e.maps)===null||t===void 0)&&t.importLibrary||(o=>{let l,c,i,h="The Google Maps JavaScript API",d="google",u="importLibrary",p="__ib__",f=document,m=window;m=m[d]||(m[d]={});const g=m.maps||(m.maps={}),v=new Set,y=new URLSearchParams,w=()=>l||(l=new Promise((k,M)=>Pe(this,void 0,void 0,function*(){var C;yield c=f.createElement("script"),c.id=this.id,y.set("libraries",[...v]+"");for(i in o)y.set(i.replace(/[A-Z]/g,E=>"_"+E[0].toLowerCase()),o[i]);y.set("callback",d+".maps."+p),c.src=this.url+"?"+y,g[p]=k,c.onerror=()=>l=M(Error(h+" could not load.")),c.nonce=this.nonce||((C=f.querySelector("script[nonce]"))===null||C===void 0?void 0:C.nonce)||"",f.head.append(c)})));g[u]?console.warn(h+" only loads once. Ignoring:",o):g[u]=(k,...M)=>v.add(k)&&w().then(()=>g[u](k,...M))})(r);const n=this.libraries.map(o=>this.importLibrary(o));n.length||n.push(this.importLibrary("core")),Promise.all(n).then(()=>this.callback(),o=>{const l=new ErrorEvent("error",{error:o});this.loadErrorCallback(l)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const t=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${t} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},t)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(e=>{e(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading||(this.loading=!0,this.setScript())}}}function Se(s){return class extends s.OverlayView{constructor(r){super();H(this,"element");H(this,"opts");const{element:n,...o}=r;this.element=n,this.opts=o,this.opts.map&&this.setMap(this.opts.map)}getPosition(){return this.opts.position?this.opts.position instanceof s.LatLng?this.opts.position:new s.LatLng(this.opts.position):null}getVisible(){if(!this.element)return!1;const r=this.element;return r.style.display!=="none"&&r.style.visibility!=="hidden"&&(r.style.opacity===""||Number(r.style.opacity)>.01)}onAdd(){if(!this.element)return;const r=this.getPanes();r&&r.overlayMouseTarget.appendChild(this.element)}draw(){if(!this.element)return;const r=this.getProjection(),n=r==null?void 0:r.fromLatLngToDivPixel(this.getPosition());if(n){this.element.style.position="absolute";let o,l;switch(this.opts.anchorPoint){case"TOP_CENTER":o="-50%",l="-100%";break;case"BOTTOM_CENTER":o="-50%",l="0";break;case"LEFT_CENTER":o="-100%",l="-50%";break;case"RIGHT_CENTER":o="0",l="-50%";break;case"TOP_LEFT":o="-100%",l="-100%";break;case"TOP_RIGHT":o="0",l="-100%";break;case"BOTTOM_LEFT":o="-100%",l="0";break;case"BOTTOM_RIGHT":o="0",l="0";break;default:o="-50%",l="-50%"}const c=n.x+(this.opts.offsetX||0)+"px",i=n.y+(this.opts.offsetY||0)+"px";this.element.style.transform=`translateX(${o}) translateX(${c}) translateY(${l}) translateY(${i})`,this.opts.zIndex&&(this.element.style.zIndex=this.opts.zIndex.toString())}}onRemove(){this.element&&this.element.remove()}setOptions(r){const{element:n,...o}=r;this.element=n,this.opts=o,this.draw()}}}let se;const oe=["bounds_changed","center_changed","click","contextmenu","dblclick","drag","dragend","dragstart","heading_changed","idle","isfractionalzoomenabled_changed","mapcapabilities_changed","maptypeid_changed","mousemove","mouseout","mouseover","projection_changed","renderingtype_changed","rightclick","tilesloaded","tilt_changed","zoom_changed"],Le=a.defineComponent({props:{apiPromise:{type:Promise},apiKey:{type:String,default:""},version:{type:String,default:"weekly"},libraries:{type:Array,default:()=>["places","marker"]},region:{type:String,required:!1},language:{type:String,required:!1},backgroundColor:{type:String,required:!1},center:{type:Object,default:()=>({lat:0,lng:0})},clickableIcons:{type:Boolean,required:!1,default:void 0},colorScheme:{type:String,required:!1},controlSize:{type:Number,required:!1},disableDefaultUi:{type:Boolean,required:!1,default:void 0},disableDoubleClickZoom:{type:Boolean,required:!1,default:void 0},draggable:{type:Boolean,required:!1,default:void 0},draggableCursor:{type:String,required:!1},draggingCursor:{type:String,required:!1},fullscreenControl:{type:Boolean,required:!1,default:void 0},fullscreenControlPosition:{type:String,required:!1},gestureHandling:{type:String,required:!1},heading:{type:Number,required:!1},isFractionalZoomEnabled:{type:Boolean,required:!1,default:void 0},keyboardShortcuts:{type:Boolean,required:!1,default:void 0},mapTypeControl:{type:Boolean,required:!1,default:void 0},mapTypeControlOptions:{type:Object,required:!1},mapTypeId:{type:[Number,String],required:!1},mapId:{type:String,required:!1},maxZoom:{type:Number,required:!1},minZoom:{type:Number,required:!1},noClear:{type:Boolean,required:!1,default:void 0},panControl:{type:Boolean,required:!1,default:void 0},panControlPosition:{type:String,required:!1},restriction:{type:Object,required:!1},rotateControl:{type:Boolean,required:!1,default:void 0},rotateControlPosition:{type:String,required:!1},scaleControl:{type:Boolean,required:!1,default:void 0},scaleControlStyle:{type:Number,required:!1},scrollwheel:{type:Boolean,required:!1,default:void 0},streetView:{type:Object,required:!1},streetViewControl:{type:Boolean,required:!1,default:void 0},streetViewControlPosition:{type:String,required:!1},styles:{type:Array,required:!1},tilt:{type:Number,required:!1},zoom:{type:Number,required:!1},zoomControl:{type:Boolean,required:!1,default:void 0},zoomControlPosition:{type:String,required:!1},cameraControl:{type:Boolean,required:!1,default:void 0},cameraControlPosition:{type:String,required:!1},nonce:{type:String,default:""}},emits:oe,setup(s,{emit:e}){const t=a.ref(),r=a.ref(!1),n=a.ref(),o=a.ref(),l=a.ref(!1);a.provide(I,n),a.provide(T,o),a.provide(ve,l);const c=()=>{const u={...s};Object.keys(u).forEach(g=>{u[g]===void 0&&delete u[g]});const f=g=>{var v;return g?{position:(v=o.value)==null?void 0:v.ControlPosition[g]}:{}},m={scaleControlOptions:s.scaleControlStyle?{style:s.scaleControlStyle}:{},panControlOptions:f(s.panControlPosition),zoomControlOptions:f(s.zoomControlPosition),rotateControlOptions:f(s.rotateControlPosition),streetViewControlOptions:f(s.streetViewControlPosition),fullscreenControlOptions:f(s.fullscreenControlPosition),cameraControlOptions:f(s.cameraControlPosition),disableDefaultUI:s.disableDefaultUi};return{...u,...m}},i=a.watch([o,n],([u,p])=>{const f=u,m=p;f&&m&&(f.event.addListenerOnce(m,"tilesloaded",()=>{l.value=!0}),setTimeout(i,0))},{immediate:!0}),h=()=>{try{const{apiKey:u,region:p,version:f,language:m,libraries:g,nonce:v}=s;se=new A({apiKey:u,region:p,version:f,language:m,libraries:g,nonce:v})}catch(u){console.error(u)}},d=u=>{o.value=a.markRaw(u.maps),n.value=a.markRaw(new u.maps.Map(t.value,c()));const p=Se(o.value);o.value[z]=p,oe.forEach(m=>{var g;(g=n.value)==null||g.addListener(m,v=>e(m,v))}),r.value=!0;const f=Object.keys(s).filter(m=>!["apiPromise","apiKey","version","libraries","region","language","center","zoom","nonce"].includes(m)).map(m=>a.toRef(s,m));a.watch([()=>s.center,()=>s.zoom,...f],([m,g],[v,y])=>{var E,b,P;const{center:w,zoom:k,...M}=c();(E=n.value)==null||E.setOptions(M),g!==void 0&&g!==y&&((b=n.value)==null||b.setZoom(g));const C=!v||m.lng!==v.lng||m.lat!==v.lat;m&&C&&((P=n.value)==null||P.panTo(m))})};return a.onMounted(()=>{s.apiPromise&&s.apiPromise instanceof Promise?s.apiPromise.then(d):(h(),se.load().then(d))}),a.onBeforeUnmount(()=>{var u;l.value=!1,n.value&&((u=o.value)==null||u.event.clearInstanceListeners(n.value))}),{mapRef:t,ready:r,map:n,api:o,mapTilesLoaded:l}}});const U=(s,e)=>{const t=s.__vccOpts||s;for(const[r,n]of e)t[r]=n;return t},xe={ref:"mapRef",class:"mapdiv"};function Ae(s,e,t,r,n,o){return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",xe,null,512),a.renderSlot(s.$slots,"default",a.normalizeProps(a.guardReactiveProps({ready:s.ready,map:s.map,api:s.api,mapTilesLoaded:s.mapTilesLoaded})),void 0,!0)])}const Ie=U(Le,[["render",Ae],["__scopeId","data-v-e7ebb206"]]);function Te(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Re=function s(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,o;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!s(e[n],t[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){var l=o[n];if(!s(e[l],t[l]))return!1}return!0}return e!==e&&t!==t};const O=Te(Re),ie=["click","drag","dragend","dragstart","gmp-click"],$e=a.defineComponent({name:"AdvancedMarker",props:{options:{type:Object,required:!0},pinOptions:{type:Object,required:!1}},emits:ie,setup(s,{emit:e,expose:t,slots:r}){const n=a.ref(),o=a.computed(()=>{var f;return(f=r.content)==null?void 0:f.call(r).some(m=>m.type!==a.Comment)}),l=a.toRef(s,"options"),c=a.toRef(s,"pinOptions"),i=a.ref(),h=a.inject(I,a.ref()),d=a.inject(T,a.ref()),u=a.inject(Q,a.ref()),p=a.computed(()=>!!(u.value&&d.value&&i.value instanceof google.maps.marker.AdvancedMarkerElement));return a.watch([h,l,c],async(f,[m,g,v])=>{var C,E,b;const w=!O(l.value,g)||!O(c.value,v)||h.value!==m;if(!h.value||!d.value||!w)return;const{AdvancedMarkerElement:k,PinElement:M}=d.value.marker;if(i.value){const{map:P,content:D,...G}=l.value;Object.assign(i.value,{content:o.value?n.value:c.value?new M(c.value).element:D,...G}),p.value&&((C=u.value)==null||C.removeMarker(i.value),(E=u.value)==null||E.addMarker(i.value))}else o.value?l.value.content=n.value:c.value&&(l.value.content=new M(c.value).element),i.value=a.markRaw(new k(l.value)),p.value?(b=u.value)==null||b.addMarker(i.value):i.value.map=h.value,ie.forEach(P=>{var D;(D=i.value)==null||D.addListener(P,G=>e(P,G))})},{immediate:!0}),a.onBeforeUnmount(()=>{var f,m;i.value&&((f=d.value)==null||f.event.clearInstanceListeners(i.value),p.value?(m=u.value)==null||m.removeMarker(i.value):i.value.map=null)}),a.provide(X,i),t({marker:i}),{hasCustomSlotContent:o,markerRef:n}}});const je={key:0,class:"advanced-marker-wrapper"};function Be(s,e,t,r,n,o){return a.openBlock(),a.createElementBlock(a.Fragment,null,[s.hasCustomSlotContent?(a.openBlock(),a.createElementBlock("div",je,[a.createElementVNode("div",a.mergeProps({ref:"markerRef"},s.$attrs),[a.renderSlot(s.$slots,"content")],16)])):a.createCommentVNode("",!0),a.renderSlot(s.$slots,"default")],64)}const qe=U($e,[["render",Be]]),Ne=s=>s==="Marker",Ze=s=>s===z,B=(s,e,t,r)=>{const n=a.ref(),o=a.inject(I,a.ref()),l=a.inject(T,a.ref()),c=a.inject(Q,a.ref()),i=a.computed(()=>!!(c.value&&l.value&&(n.value instanceof l.value.Marker||n.value instanceof l.value[z])));return a.watch([o,t],(h,[d,u])=>{var f,m,g;const p=!O(t.value,u)||o.value!==d;!o.value||!l.value||!p||(n.value?(n.value.setOptions(t.value),i.value&&((f=c.value)==null||f.removeMarker(n.value),(m=c.value)==null||m.addMarker(n.value))):(Ne(s)?n.value=a.markRaw(new l.value[s](t.value)):Ze(s)?n.value=a.markRaw(new l.value[s](t.value)):n.value=a.markRaw(new l.value[s]({...t.value,map:o.value})),i.value?(g=c.value)==null||g.addMarker(n.value):n.value.setMap(o.value),e.forEach(v=>{var y;(y=n.value)==null||y.addListener(v,w=>r(v,w))})))},{immediate:!0}),a.onBeforeUnmount(()=>{var h,d;n.value&&((h=l.value)==null||h.event.clearInstanceListeners(n.value),i.value?(d=c.value)==null||d.removeMarker(n.value):n.value.setMap(null))}),n},ae=["animation_changed","click","dblclick","rightclick","dragstart","dragend","drag","mouseover","mousedown","mouseout","mouseup","draggable_changed","clickable_changed","contextmenu","cursor_changed","flat_changed","rightclick","zindex_changed","icon_changed","position_changed","shape_changed","title_changed","visible_changed"],Ue=a.defineComponent({name:"Marker",props:{options:{type:Object,required:!0}},emits:ae,setup(s,{emit:e,expose:t,slots:r}){const n=a.toRef(s,"options"),o=B("Marker",ae,n,e);return a.provide(X,o),t({marker:o}),()=>{var l;return(l=r.default)==null?void 0:l.call(r)}}}),De=a.defineComponent({name:"Polyline",props:{options:{type:Object,required:!0}},emits:j,setup(s,{emit:e}){const t=a.toRef(s,"options");return{polyline:B("Polyline",j,t,e)}},render:()=>null}),Fe=a.defineComponent({name:"Polygon",props:{options:{type:Object,required:!0}},emits:j,setup(s,{emit:e}){const t=a.toRef(s,"options");return{polygon:B("Polygon",j,t,e)}},render:()=>null}),le=j.concat(["bounds_changed"]),Ve=a.defineComponent({name:"Rectangle",props:{options:{type:Object,required:!0}},emits:le,setup(s,{emit:e}){const t=a.toRef(s,"options");return{rectangle:B("Rectangle",le,t,e)}},render:()=>null}),ce=j.concat(["center_changed","radius_changed"]),ze=a.defineComponent({name:"Circle",props:{options:{type:Object,required:!0}},emits:ce,setup(s,{emit:e}){const t=a.toRef(s,"options");return{circle:B("Circle",ce,t,e)}},render:()=>null}),Ge=a.defineComponent({props:{position:{type:String,required:!0},index:{type:Number,default:1}},emits:["content:loaded"],setup(s,{emit:e}){const t=a.ref(null),r=a.inject(I,a.ref()),n=a.inject(T,a.ref()),o=a.inject(ve,a.ref(!1)),l=a.watch([o,n,t],([h,d,u])=>{d&&h&&u&&(c(s.position),e("content:loaded"),setTimeout(l,0))},{immediate:!0}),c=h=>{if(r.value&&n.value&&t.value){const d=n.value.ControlPosition[h];r.value.controls[d].push(t.value)}},i=h=>{if(r.value&&n.value){let d=null;const u=n.value.ControlPosition[h];r.value.controls[u].forEach((p,f)=>{p===t.value&&(d=f)}),d!==null&&r.value.controls[u].removeAt(d)}};return a.onBeforeUnmount(()=>i(s.position)),a.watch(()=>s.position,(h,d)=>{i(d),c(h)}),a.watch(()=>s.index,h=>{h&&t.value&&(t.value.index=s.index)}),{controlRef:t}}});const He={ref:"controlRef",class:"custom-control-wrapper"};function We(s,e,t,r,n,o){return a.openBlock(),a.createElementBlock("div",He,[a.renderSlot(s.$slots,"default",{},void 0,!0)],512)}const Ke=U(Ge,[["render",We],["__scopeId","data-v-d099a3a6"]]),ue=["closeclick","content_changed","domready","position_changed","visible","zindex_changed"],Ye=a.defineComponent({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})},modelValue:{type:Boolean}},emits:[...ue,"update:modelValue"],setup(s,{slots:e,emit:t,expose:r}){const n=a.ref(),o=a.ref(),l=a.inject(I,a.ref()),c=a.inject(T,a.ref()),i=a.inject(X,a.ref());let h,d=s.modelValue;const u=a.computed(()=>{var g;return(g=e.default)==null?void 0:g.call(e).some(v=>v.type!==a.Comment)}),p=g=>{d=g,t("update:modelValue",g)},f=g=>{n.value&&(n.value.open({map:l.value,anchor:i.value,...g}),p(!0))},m=()=>{n.value&&(n.value.close(),p(!1))};return a.onMounted(()=>{a.watch([l,()=>s.options],([g,v],[y,w])=>{var M;const k=!O(v,w)||l.value!==y;l.value&&c.value&&k&&(n.value?(n.value.setOptions({...v,content:u.value?o.value:v.content}),i.value||f()):(n.value=a.markRaw(new c.value.InfoWindow({...v,content:u.value?o.value:v.content})),i.value&&(h=i.value.addListener("click",()=>{f()})),(!i.value||d)&&f(),ue.forEach(C=>{var E;(E=n.value)==null||E.addListener(C,b=>t(C,b))}),(M=n.value)==null||M.addListener("closeclick",()=>p(!1))))},{immediate:!0}),a.watch(()=>s.modelValue,g=>{g!==d&&(g?f():m())})}),a.onBeforeUnmount(()=>{var g;h&&h.remove(),n.value&&((g=c.value)==null||g.event.clearInstanceListeners(n.value),m())}),r({infoWindow:n,open:f,close:m}),{infoWindow:n,infoWindowRef:o,hasSlotContent:u,open:f,close:m}}});const Je={key:0,class:"info-window-wrapper"};function Xe(s,e,t,r,n,o){return s.hasSlotContent?(a.openBlock(),a.createElementBlock("div",Je,[a.createElementVNode("div",a.mergeProps({ref:"infoWindowRef"},s.$attrs),[a.renderSlot(s.$slots,"default",{},void 0,!0)],16)])):a.createCommentVNode("",!0)}const Qe=U(Ye,[["render",Xe],["__scopeId","data-v-cbe1707b"]]),de=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],W=1,q=8;class ee{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[t,r]=new Uint8Array(e,0,2);if(t!==219)throw new Error("Data does not appear to be in a KDBush format.");const n=r>>4;if(n!==W)throw new Error(`Got v${n} data when expected v${W}.`);const o=de[r&15];if(!o)throw new Error("Unrecognized array type.");const[l]=new Uint16Array(e,2,1),[c]=new Uint32Array(e,4,1);return new ee(c,l,o,e)}constructor(e,t=64,r=Float64Array,n){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const o=de.indexOf(this.ArrayType),l=e*2*this.ArrayType.BYTES_PER_ELEMENT,c=e*this.IndexArrayType.BYTES_PER_ELEMENT,i=(8-c%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${r}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,q,e),this.coords=new this.ArrayType(this.data,q+c+i,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(q+l+c+i),this.ids=new this.IndexArrayType(this.data,q,e),this.coords=new this.ArrayType(this.data,q+c+i,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(W<<4)+o]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=t,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return J(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:l,nodeSize:c}=this,i=[0,o.length-1,0],h=[];for(;i.length;){const d=i.pop()||0,u=i.pop()||0,p=i.pop()||0;if(u-p<=c){for(let v=p;v<=u;v++){const y=l[2*v],w=l[2*v+1];y>=e&&y<=r&&w>=t&&w<=n&&h.push(o[v])}continue}const f=p+u>>1,m=l[2*f],g=l[2*f+1];m>=e&&m<=r&&g>=t&&g<=n&&h.push(o[f]),(d===0?e<=m:t<=g)&&(i.push(p),i.push(f-1),i.push(1-d)),(d===0?r>=m:n>=g)&&(i.push(f+1),i.push(u),i.push(1-d))}return h}within(e,t,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:n,coords:o,nodeSize:l}=this,c=[0,n.length-1,0],i=[],h=r*r;for(;c.length;){const d=c.pop()||0,u=c.pop()||0,p=c.pop()||0;if(u-p<=l){for(let v=p;v<=u;v++)he(o[2*v],o[2*v+1],e,t)<=h&&i.push(n[v]);continue}const f=p+u>>1,m=o[2*f],g=o[2*f+1];he(m,g,e,t)<=h&&i.push(n[f]),(d===0?e-r<=m:t-r<=g)&&(c.push(p),c.push(f-1),c.push(1-d)),(d===0?e+r>=m:t+r>=g)&&(c.push(f+1),c.push(u),c.push(1-d))}return i}}function J(s,e,t,r,n,o){if(n-r<=t)return;const l=r+n>>1;ye(s,e,l,r,n,o),J(s,e,t,r,l-1,1-o),J(s,e,t,l+1,n,1-o)}function ye(s,e,t,r,n,o){for(;n>r;){if(n-r>600){const h=n-r+1,d=t-r+1,u=Math.log(h),p=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*p*(h-p)/h)*(d-h/2<0?-1:1),m=Math.max(r,Math.floor(t-d*p/h+f)),g=Math.min(n,Math.floor(t+(h-d)*p/h+f));ye(s,e,t,m,g,o)}const l=e[2*t+o];let c=r,i=n;for(N(s,e,r,t),e[2*n+o]>l&&N(s,e,r,n);c<i;){for(N(s,e,c,i),c++,i--;e[2*c+o]<l;)c++;for(;e[2*i+o]>l;)i--}e[2*r+o]===l?N(s,e,r,i):(i++,N(s,e,i,n)),i<=t&&(r=i+1),t<=i&&(n=i-1)}}function N(s,e,t,r){K(s,t,r),K(e,2*t,2*r),K(e,2*t+1,2*r+1)}function K(s,e,t){const r=s[e];s[e]=s[t],s[t]=r}function he(s,e,t,r){const n=s-t,o=e-r;return n*n+o*o}const et={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:s=>s},pe=Math.fround||(s=>e=>(s[0]=+e,s[0]))(new Float32Array(1)),x=2,L=3,Y=4,S=5,we=6;class ke{constructor(e){this.options=Object.assign(Object.create(et),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:r,maxZoom:n}=this.options;t&&console.time("total time");const o=`prepare ${e.length} points`;t&&console.time(o),this.points=e;const l=[];for(let i=0;i<e.length;i++){const h=e[i];if(!h.geometry)continue;const[d,u]=h.geometry.coordinates,p=pe(F(d)),f=pe(V(u));l.push(p,f,1/0,i,-1,1),this.options.reduce&&l.push(0)}let c=this.trees[n+1]=this._createTree(l);t&&console.timeEnd(o);for(let i=n;i>=r;i--){const h=+Date.now();c=this.trees[i]=this._createTree(this._cluster(c,i)),t&&console.log("z%d: %d clusters in %dms",i,c.numItems,+Date.now()-h)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let r=((e[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,e[1]));let o=e[2]===180?180:((e[2]+180)%360+360)%360-180;const l=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,o=180;else if(r>o){const u=this.getClusters([r,n,180,l],t),p=this.getClusters([-180,n,o,l],t);return u.concat(p)}const c=this.trees[this._limitZoom(t)],i=c.range(F(r),V(l),F(o),V(n)),h=c.data,d=[];for(const u of i){const p=this.stride*u;d.push(h[p+S]>1?fe(h,p,this.clusterProps):this.points[h[p+L]])}return d}getChildren(e){const t=this._getOriginId(e),r=this._getOriginZoom(e),n="No cluster with the specified id.",o=this.trees[r];if(!o)throw new Error(n);const l=o.data;if(t*this.stride>=l.length)throw new Error(n);const c=this.options.radius/(this.options.extent*Math.pow(2,r-1)),i=l[t*this.stride],h=l[t*this.stride+1],d=o.within(i,h,c),u=[];for(const p of d){const f=p*this.stride;l[f+Y]===e&&u.push(l[f+S]>1?fe(l,f,this.clusterProps):this.points[l[f+L]])}if(u.length===0)throw new Error(n);return u}getLeaves(e,t,r){t=t||10,r=r||0;const n=[];return this._appendLeaves(n,e,t,r,0),n}getTile(e,t,r){const n=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:l,radius:c}=this.options,i=c/l,h=(r-i)/o,d=(r+1+i)/o,u={features:[]};return this._addTileFeatures(n.range((t-i)/o,h,(t+1+i)/o,d),n.data,t,r,o,u),t===0&&this._addTileFeatures(n.range(1-i/o,h,1,d),n.data,o,r,o,u),t===o-1&&this._addTileFeatures(n.range(0,h,i/o,d),n.data,-1,r,o,u),u.features.length?u:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const r=this.getChildren(e);if(t++,r.length!==1)break;e=r[0].properties.cluster_id}return t}_appendLeaves(e,t,r,n,o){const l=this.getChildren(t);for(const c of l){const i=c.properties;if(i&&i.cluster?o+i.point_count<=n?o+=i.point_count:o=this._appendLeaves(e,i.cluster_id,r,n,o):o<n?o++:e.push(c),e.length===r)break}return o}_createTree(e){const t=new ee(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)t.add(e[r],e[r+1]);return t.finish(),t.data=e,t}_addTileFeatures(e,t,r,n,o,l){for(const c of e){const i=c*this.stride,h=t[i+S]>1;let d,u,p;if(h)d=_e(t,i,this.clusterProps),u=t[i],p=t[i+1];else{const g=this.points[t[i+L]];d=g.properties;const[v,y]=g.geometry.coordinates;u=F(v),p=V(y)}const f={type:1,geometry:[[Math.round(this.options.extent*(u*o-r)),Math.round(this.options.extent*(p*o-n))]],tags:d};let m;h||this.options.generateId?m=t[i+L]:m=this.points[t[i+L]].id,m!==void 0&&(f.id=m),l.features.push(f)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:r,extent:n,reduce:o,minPoints:l}=this.options,c=r/(n*Math.pow(2,t)),i=e.data,h=[],d=this.stride;for(let u=0;u<i.length;u+=d){if(i[u+x]<=t)continue;i[u+x]=t;const p=i[u],f=i[u+1],m=e.within(i[u],i[u+1],c),g=i[u+S];let v=g;for(const y of m){const w=y*d;i[w+x]>t&&(v+=i[w+S])}if(v>g&&v>=l){let y=p*g,w=f*g,k,M=-1;const C=((u/d|0)<<5)+(t+1)+this.points.length;for(const E of m){const b=E*d;if(i[b+x]<=t)continue;i[b+x]=t;const P=i[b+S];y+=i[b]*P,w+=i[b+1]*P,i[b+Y]=C,o&&(k||(k=this._map(i,u,!0),M=this.clusterProps.length,this.clusterProps.push(k)),o(k,this._map(i,b)))}i[u+Y]=C,h.push(y/v,w/v,1/0,C,-1,v),o&&h.push(M)}else{for(let y=0;y<d;y++)h.push(i[u+y]);if(v>1)for(const y of m){const w=y*d;if(!(i[w+x]<=t)){i[w+x]=t;for(let k=0;k<d;k++)h.push(i[w+k])}}}}return h}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,r){if(e[t+S]>1){const l=this.clusterProps[e[t+we]];return r?Object.assign({},l):l}const n=this.points[e[t+L]].properties,o=this.options.map(n);return r&&o===n?Object.assign({},o):o}}function fe(s,e,t){return{type:"Feature",id:s[e+L],properties:_e(s,e,t),geometry:{type:"Point",coordinates:[tt(s[e]),rt(s[e+1])]}}}function _e(s,e,t){const r=s[e+S],n=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,o=s[e+we],l=o===-1?{}:Object.assign({},t[o]);return Object.assign(l,{cluster:!0,cluster_id:s[e+L],point_count:r,point_count_abbreviated:n})}function F(s){return s/360+.5}function V(s){const e=Math.sin(s*Math.PI/180),t=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return t<0?0:t>1?1:t}function tt(s){return(s-.5)*360}function rt(s){const e=(180-s*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
16
16
  Copyright (c) Microsoft Corporation.
17
17
 
18
18
  Permission to use, copy, modify, and/or distribute this software for any
@@ -25,9 +25,9 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
25
25
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
26
26
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
27
27
  PERFORMANCE OF THIS SOFTWARE.
28
- ***************************************************************************** */function te(s,e){var t={};for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(s);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(s,r[n])&&(t[r[n]]=s[r[n]]);return t}class _{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,t){this.isAdvancedMarker(e)?e.map=t:e.setMap(t)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(e.position.lat&&e.position.lng)return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class Z{constructor({markers:e,position:t}){this.markers=e,t&&(t instanceof google.maps.LatLng?this._position=t:this._position=new google.maps.LatLng(t))}get bounds(){if(this.markers.length===0&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const t of this.markers)e.extend(_.getPosition(t));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>_.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(_.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}const nt=(s,e,t,r)=>{const n=Ce(s.getBounds(),e,r);return t.filter(o=>n.contains(_.getPosition(o)))},Ce=(s,e,t)=>{const{northEast:r,southWest:n}=st(s,e),o=ot({northEast:r,southWest:n},t);return it(o,e)},me=(s,e,t)=>{const r=Ce(s,e,t),n=r.getNorthEast(),o=r.getSouthWest();return[o.lng(),o.lat(),n.lng(),n.lat()]},st=(s,e)=>({northEast:e.fromLatLngToDivPixel(s.getNorthEast()),southWest:e.fromLatLngToDivPixel(s.getSouthWest())}),ot=({northEast:s,southWest:e},t)=>(s.x+=t,s.y-=t,e.x-=t,e.y+=t,{northEast:s,southWest:e}),it=({northEast:s,southWest:e},t)=>{const r=t.fromDivPixelToLatLng(e),n=t.fromDivPixelToLatLng(s);return new google.maps.LatLngBounds(r,n)};class be{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return lt(e)}}class at extends be{constructor(e){var{viewportPadding:t=60}=e,r=te(e,["viewportPadding"]);super(r),this.viewportPadding=60,this.viewportPadding=t}calculate({markers:e,map:t,mapCanvasProjection:r}){return t.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:nt(t,r,e,this.viewportPadding),map:t,mapCanvasProjection:r})}}}const lt=s=>s.map(t=>new Z({position:_.getPosition(t),markers:[t]}));class ct extends be{constructor(e){var{maxZoom:t,radius:r=60}=e,n=te(e,["maxZoom","radius"]);super({maxZoom:t}),this.state={zoom:-1},this.superCluster=new ke(Object.assign({maxZoom:this.maxZoom,radius:r},n))}calculate(e){let t=!1;const r={zoom:e.map.getZoom()};if(!O(e.markers,this.markers)){t=!0,this.markers=[...e.markers];const n=this.markers.map(o=>{const a=_.getPosition(o);return{type:"Feature",geometry:{type:"Point",coordinates:[a.lng(),a.lat()]},properties:{marker:o}}});this.superCluster.load(n)}return t||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(t=!O(this.state,r)),this.state=r,t&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:t}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(t=>this.transformCluster(t))}transformCluster({geometry:{coordinates:[e,t]},properties:r}){if(r.cluster)return new Z({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(o=>o.properties.marker),position:{lat:t,lng:e}});const n=r.marker;return new Z({markers:[n],position:_.getPosition(n)})}}class ut extends at{constructor(e){var{maxZoom:t,radius:r=60,viewportPadding:n=60}=e,o=te(e,["maxZoom","radius","viewportPadding"]);super({maxZoom:t,viewportPadding:n}),this.superCluster=new ke(Object.assign({maxZoom:this.maxZoom,radius:r},o)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(e){const t={zoom:Math.round(e.map.getZoom()),view:me(e.map.getBounds(),e.mapCanvasProjection,this.viewportPadding)};let r=!O(this.state,t);if(!O(e.markers,this.markers)){r=!0,this.markers=[...e.markers];const n=this.markers.map(o=>{const a=_.getPosition(o);return{type:"Feature",geometry:{type:"Point",coordinates:[a.lng(),a.lat()]},properties:{marker:o}}});this.superCluster.load(n)}return r&&(this.clusters=this.cluster(e),this.state=t),{clusters:this.clusters,changed:r}}cluster({map:e,mapCanvasProjection:t}){const r={zoom:Math.round(e.getZoom()),view:me(e.getBounds(),t,this.viewportPadding)};return this.superCluster.getClusters(r.view,r.zoom).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,t]},properties:r}){if(r.cluster)return new Z({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(o=>o.properties.marker),position:{lat:t,lng:e}});const n=r.marker;return new Z({markers:[n],position:_.getPosition(n)})}}class dt{constructor(e,t){this.markers={sum:e.length};const r=t.map(o=>o.count),n=r.reduce((o,a)=>o+a,0);this.clusters={count:t.length,markers:{mean:n/t.length,sum:n,min:Math.min(...r),max:Math.max(...r)}}}}class pt{render({count:e,position:t},r,n){const a=`<svg fill="${e>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
28
+ ***************************************************************************** */function te(s,e){var t={};for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(s);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(s,r[n])&&(t[r[n]]=s[r[n]]);return t}class _{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,t){this.isAdvancedMarker(e)?e.map=t:e.setMap(t)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(e.position.lat&&e.position.lng)return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class Z{constructor({markers:e,position:t}){this.markers=e,t&&(t instanceof google.maps.LatLng?this._position=t:this._position=new google.maps.LatLng(t))}get bounds(){if(this.markers.length===0&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const t of this.markers)e.extend(_.getPosition(t));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>_.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(_.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}const nt=(s,e,t,r)=>{const n=Ce(s.getBounds(),e,r);return t.filter(o=>n.contains(_.getPosition(o)))},Ce=(s,e,t)=>{const{northEast:r,southWest:n}=st(s,e),o=ot({northEast:r,southWest:n},t);return it(o,e)},me=(s,e,t)=>{const r=Ce(s,e,t),n=r.getNorthEast(),o=r.getSouthWest();return[o.lng(),o.lat(),n.lng(),n.lat()]},st=(s,e)=>({northEast:e.fromLatLngToDivPixel(s.getNorthEast()),southWest:e.fromLatLngToDivPixel(s.getSouthWest())}),ot=({northEast:s,southWest:e},t)=>(s.x+=t,s.y-=t,e.x-=t,e.y+=t,{northEast:s,southWest:e}),it=({northEast:s,southWest:e},t)=>{const r=t.fromDivPixelToLatLng(e),n=t.fromDivPixelToLatLng(s);return new google.maps.LatLngBounds(r,n)};class be{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return lt(e)}}class at extends be{constructor(e){var{viewportPadding:t=60}=e,r=te(e,["viewportPadding"]);super(r),this.viewportPadding=60,this.viewportPadding=t}calculate({markers:e,map:t,mapCanvasProjection:r}){return t.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:nt(t,r,e,this.viewportPadding),map:t,mapCanvasProjection:r})}}}const lt=s=>s.map(t=>new Z({position:_.getPosition(t),markers:[t]}));class ct extends be{constructor(e){var{maxZoom:t,radius:r=60}=e,n=te(e,["maxZoom","radius"]);super({maxZoom:t}),this.state={zoom:-1},this.superCluster=new ke(Object.assign({maxZoom:this.maxZoom,radius:r},n))}calculate(e){let t=!1;const r={zoom:e.map.getZoom()};if(!O(e.markers,this.markers)){t=!0,this.markers=[...e.markers];const n=this.markers.map(o=>{const l=_.getPosition(o);return{type:"Feature",geometry:{type:"Point",coordinates:[l.lng(),l.lat()]},properties:{marker:o}}});this.superCluster.load(n)}return t||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(t=!O(this.state,r)),this.state=r,t&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:t}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(t=>this.transformCluster(t))}transformCluster({geometry:{coordinates:[e,t]},properties:r}){if(r.cluster)return new Z({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(o=>o.properties.marker),position:{lat:t,lng:e}});const n=r.marker;return new Z({markers:[n],position:_.getPosition(n)})}}class ut extends at{constructor(e){var{maxZoom:t,radius:r=60,viewportPadding:n=60}=e,o=te(e,["maxZoom","radius","viewportPadding"]);super({maxZoom:t,viewportPadding:n}),this.superCluster=new ke(Object.assign({maxZoom:this.maxZoom,radius:r},o)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(e){const t={zoom:Math.round(e.map.getZoom()),view:me(e.map.getBounds(),e.mapCanvasProjection,this.viewportPadding)};let r=!O(this.state,t);if(!O(e.markers,this.markers)){r=!0,this.markers=[...e.markers];const n=this.markers.map(o=>{const l=_.getPosition(o);return{type:"Feature",geometry:{type:"Point",coordinates:[l.lng(),l.lat()]},properties:{marker:o}}});this.superCluster.load(n)}return r&&(this.clusters=this.cluster(e),this.state=t),{clusters:this.clusters,changed:r}}cluster({map:e,mapCanvasProjection:t}){const r={zoom:Math.round(e.getZoom()),view:me(e.getBounds(),t,this.viewportPadding)};return this.superCluster.getClusters(r.view,r.zoom).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,t]},properties:r}){if(r.cluster)return new Z({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(o=>o.properties.marker),position:{lat:t,lng:e}});const n=r.marker;return new Z({markers:[n],position:_.getPosition(n)})}}class dt{constructor(e,t){this.markers={sum:e.length};const r=t.map(o=>o.count),n=r.reduce((o,l)=>o+l,0);this.clusters={count:t.length,markers:{mean:n/t.length,sum:n,min:Math.min(...r),max:Math.max(...r)}}}}class ht{render({count:e,position:t},r,n){const l=`<svg fill="${e>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
29
29
  <circle cx="120" cy="120" opacity=".6" r="70" />
30
30
  <circle cx="120" cy="120" opacity=".3" r="90" />
31
31
  <circle cx="120" cy="120" opacity=".2" r="110" />
32
32
  <text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
33
- </svg>`,c=`Cluster of ${e} markers`,i=Number(google.maps.Marker.MAX_ZINDEX)+e;if(_.isAdvancedMarkerAvailable(n)){const d=document.createElement("div");d.innerHTML=a;const u=d.firstElementChild;u.setAttribute("transform","translate(0 25)");const h={map:n,position:t,zIndex:i,title:c,content:u};return new google.maps.marker.AdvancedMarkerElement(h)}const p={position:t,zIndex:i,title:c,icon:{url:`data:image/svg+xml;base64,${btoa(a)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(p)}}function ht(s,e){for(let t in e.prototype)s.prototype[t]=e.prototype[t]}class re{constructor(){ht(re,google.maps.OverlayView)}}var $;(function(s){s.CLUSTERING_BEGIN="clusteringbegin",s.CLUSTERING_END="clusteringend",s.CLUSTER_CLICK="click"})($||($={}));const ft=(s,e,t)=>{t.fitBounds(e.bounds)};class mt extends re{constructor({map:e,markers:t=[],algorithmOptions:r={},algorithm:n=new ct(r),renderer:o=new pt,onClusterClick:a=ft}){super(),this.markers=[...t],this.clusters=[],this.algorithm=n,this.renderer=o,this.onClusterClick=a,e&&this.setMap(e)}addMarker(e,t){this.markers.includes(e)||(this.markers.push(e),t||this.render())}addMarkers(e,t){e.forEach(r=>{this.addMarker(r,!0)}),t||this.render()}removeMarker(e,t){const r=this.markers.indexOf(e);return r===-1?!1:(_.setMap(e,null),this.markers.splice(r,1),t||this.render(),!0)}removeMarkers(e,t){let r=!1;return e.forEach(n=>{r=this.removeMarker(n,!0)||r}),r&&!t&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,$.CLUSTERING_BEGIN,this);const{clusters:t,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const n=new Set;for(const a of t)a.markers.length==1&&n.add(a.markers[0]);const o=[];for(const a of this.clusters)a.marker!=null&&(a.markers.length==1?n.has(a.marker)||_.setMap(a.marker,null):o.push(a.marker));this.clusters=t,this.renderClusters(),requestAnimationFrame(()=>o.forEach(a=>_.setMap(a,null)))}google.maps.event.trigger(this,$.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>_.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new dt(this.markers,this.clusters),t=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,t),r.markers.forEach(n=>_.setMap(n,null)),this.onClusterClick&&r.marker.addListener("click",n=>{google.maps.event.trigger(this,$.CLUSTER_CLICK,r),this.onClusterClick(n,r,t)})),_.setMap(r.marker,t)})}}const ge=Object.values($),gt=l.defineComponent({name:"MarkerCluster",props:{options:{type:Object,default:()=>({})}},emits:ge,setup(s,{emit:e,expose:t,slots:r}){const n=l.ref(),o=l.inject(I,l.ref()),a=l.inject(T,l.ref());return l.provide(Q,n),l.watch(o,()=>{o.value&&(n.value=l.markRaw(new mt({map:o.value,algorithm:new ut(s.options.algorithmOptions??{}),...s.options})),ge.forEach(c=>{var i;(i=n.value)==null||i.addListener(c,p=>e(c,p))}))},{immediate:!0}),l.onBeforeUnmount(()=>{var c;n.value&&((c=a.value)==null||c.event.clearInstanceListeners(n.value),n.value.clearMarkers(),n.value.setMap(null))}),t({markerCluster:n}),()=>{var c;return(c=r.default)==null?void 0:c.call(r)}}}),vt=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,required:!0}},setup(s,{slots:e,emit:t,expose:r}){const n=l.ref(),o=l.computed(()=>{var i;return(i=e.default)==null?void 0:i.call(e).some(p=>p.type!==l.Comment)}),a=l.computed(()=>({...s.options,element:n.value})),c=B(z,[],a,t);return r({customMarker:c}),{customMarkerRef:n,customMarker:c,hasSlotContent:o}}});const yt={key:0,class:"custom-marker-wrapper"};function wt(s,e,t,r,n,o){return s.hasSlotContent?(l.openBlock(),l.createElementBlock("div",yt,[l.createElementVNode("div",l.mergeProps({ref:"customMarkerRef",style:{cursor:s.$attrs.onClick?"pointer":void 0}},s.$attrs),[l.renderSlot(s.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("",!0)}const kt=U(vt,[["render",wt],["__scopeId","data-v-2d2d343a"]]),_t=l.defineComponent({name:"HeatmapLayer",props:{options:{type:Object,default:()=>({})}},setup(s){const e=l.ref(),t=l.inject(I,l.ref()),r=l.inject(T,l.ref());return l.watch([t,()=>s.options],([n,o],[a,c])=>{var p;const i=!O(o,c)||t.value!==a;if(t.value&&r.value&&i){const d=structuredClone(o);if(d.data&&!(d.data instanceof r.value.MVCArray)){const u=r.value.LatLng;d.data=(p=d.data)==null?void 0:p.map(h=>h instanceof u||"location"in h&&(h.location instanceof u||h.location===null)?h:"location"in h?{...h,location:new u(h.location)}:new u(h))}e.value?e.value.setOptions(d):e.value=l.markRaw(new r.value.visualization.HeatmapLayer({...d,map:t.value}))}},{immediate:!0}),l.onBeforeUnmount(()=>{e.value&&e.value.setMap(null)}),{heatmapLayer:e}},render:()=>null});exports.AdvancedMarker=qe;exports.Circle=ze;exports.CustomControl=Ke;exports.CustomMarker=kt;exports.GoogleMap=Ie;exports.HeatmapLayer=_t;exports.InfoWindow=Qe;exports.Marker=Ue;exports.MarkerCluster=gt;exports.Polygon=Fe;exports.Polyline=De;exports.Rectangle=Ve;
33
+ </svg>`,c=`Cluster of ${e} markers`,i=Number(google.maps.Marker.MAX_ZINDEX)+e;if(_.isAdvancedMarkerAvailable(n)){const d=document.createElement("div");d.innerHTML=l;const u=d.firstElementChild;u.setAttribute("transform","translate(0 25)");const p={map:n,position:t,zIndex:i,title:c,content:u};return new google.maps.marker.AdvancedMarkerElement(p)}const h={position:t,zIndex:i,title:c,icon:{url:`data:image/svg+xml;base64,${btoa(l)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(h)}}function pt(s,e){for(let t in e.prototype)s.prototype[t]=e.prototype[t]}class re{constructor(){pt(re,google.maps.OverlayView)}}var $;(function(s){s.CLUSTERING_BEGIN="clusteringbegin",s.CLUSTERING_END="clusteringend",s.CLUSTER_CLICK="click"})($||($={}));const ft=(s,e,t)=>{t.fitBounds(e.bounds)};class mt extends re{constructor({map:e,markers:t=[],algorithmOptions:r={},algorithm:n=new ct(r),renderer:o=new ht,onClusterClick:l=ft}){super(),this.markers=[...t],this.clusters=[],this.algorithm=n,this.renderer=o,this.onClusterClick=l,e&&this.setMap(e)}addMarker(e,t){this.markers.includes(e)||(this.markers.push(e),t||this.render())}addMarkers(e,t){e.forEach(r=>{this.addMarker(r,!0)}),t||this.render()}removeMarker(e,t){const r=this.markers.indexOf(e);return r===-1?!1:(_.setMap(e,null),this.markers.splice(r,1),t||this.render(),!0)}removeMarkers(e,t){let r=!1;return e.forEach(n=>{r=this.removeMarker(n,!0)||r}),r&&!t&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,$.CLUSTERING_BEGIN,this);const{clusters:t,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const n=new Set;for(const l of t)l.markers.length==1&&n.add(l.markers[0]);const o=[];for(const l of this.clusters)l.marker!=null&&(l.markers.length==1?n.has(l.marker)||_.setMap(l.marker,null):o.push(l.marker));this.clusters=t,this.renderClusters(),requestAnimationFrame(()=>o.forEach(l=>_.setMap(l,null)))}google.maps.event.trigger(this,$.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>_.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new dt(this.markers,this.clusters),t=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,t),r.markers.forEach(n=>_.setMap(n,null)),this.onClusterClick&&r.marker.addListener("click",n=>{google.maps.event.trigger(this,$.CLUSTER_CLICK,r),this.onClusterClick(n,r,t)})),_.setMap(r.marker,t)})}}const ge=Object.values($),gt=a.defineComponent({name:"MarkerCluster",props:{options:{type:Object,default:()=>({})}},emits:ge,setup(s,{emit:e,expose:t,slots:r}){const n=a.ref(),o=a.inject(I,a.ref()),l=a.inject(T,a.ref());return a.provide(Q,n),a.watch(o,()=>{o.value&&(n.value=a.markRaw(new mt({map:o.value,algorithm:new ut(s.options.algorithmOptions??{}),...s.options})),ge.forEach(c=>{var i;(i=n.value)==null||i.addListener(c,h=>e(c,h))}))},{immediate:!0}),a.onBeforeUnmount(()=>{var c;n.value&&((c=l.value)==null||c.event.clearInstanceListeners(n.value),n.value.clearMarkers(),n.value.setMap(null))}),t({markerCluster:n}),()=>{var c;return(c=r.default)==null?void 0:c.call(r)}}}),vt=a.defineComponent({inheritAttrs:!1,props:{options:{type:Object,required:!0}},setup(s,{slots:e,emit:t,expose:r}){const n=a.ref(),o=a.computed(()=>{var i;return(i=e.default)==null?void 0:i.call(e).some(h=>h.type!==a.Comment)}),l=a.computed(()=>({...s.options,element:n.value})),c=B(z,[],l,t);return r({customMarker:c}),{customMarkerRef:n,customMarker:c,hasSlotContent:o}}});const yt={key:0,class:"custom-marker-wrapper"};function wt(s,e,t,r,n,o){return s.hasSlotContent?(a.openBlock(),a.createElementBlock("div",yt,[a.createElementVNode("div",a.mergeProps({ref:"customMarkerRef",style:{cursor:s.$attrs.onClick?"pointer":void 0}},s.$attrs),[a.renderSlot(s.$slots,"default",{},void 0,!0)],16)])):a.createCommentVNode("",!0)}const kt=U(vt,[["render",wt],["__scopeId","data-v-2d2d343a"]]),_t=a.defineComponent({name:"HeatmapLayer",props:{options:{type:Object,default:()=>({})}},setup(s){const e=a.ref(),t=a.inject(I,a.ref()),r=a.inject(T,a.ref());return a.watch([t,()=>s.options],([n,o],[l,c])=>{const i=!O(o,c)||t.value!==l;if(t.value&&r.value&&i){let h;if(o.data&&!(o.data instanceof r.value.MVCArray)){const d=r.value.LatLng,u=o.data.map(p=>p instanceof d||"location"in p&&(p.location instanceof d||p.location===null)?p:"location"in p?{...p,location:new d(p.location)}:new d(p));h={...o,data:u}}else h=o;e.value?e.value.setOptions(h):e.value=a.markRaw(new r.value.visualization.HeatmapLayer({...h,map:t.value}))}},{immediate:!0}),a.onBeforeUnmount(()=>{e.value&&e.value.setMap(null)}),{heatmapLayer:e}},render:()=>null});exports.AdvancedMarker=qe;exports.Circle=ze;exports.CustomControl=Ke;exports.CustomMarker=kt;exports.GoogleMap=Ie;exports.HeatmapLayer=_t;exports.InfoWindow=Qe;exports.Marker=Ue;exports.MarkerCluster=gt;exports.Polygon=Fe;exports.Polyline=De;exports.Rectangle=Ve;