vue3-google-map 0.19.0 → 0.21.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.
@@ -1,9 +1,9 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-f29e129b]{width:100%;height:100%}.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
- var qe = Object.defineProperty;
3
- var Be = (n, e, t) => e in n ? qe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
4
- var se = (n, e, t) => (Be(n, typeof e != "symbol" ? e + "" : e, t), t);
5
- import { defineComponent as P, ref as y, provide as G, watch as O, onMounted as Me, onBeforeUnmount as B, markRaw as I, toRef as Z, openBlock as Y, createElementBlock as X, createElementVNode as ae, renderSlot as Q, normalizeProps as Ze, guardReactiveProps as Ne, inject as C, computed as J, Comment as Ee, mergeProps as Pe, createCommentVNode as Oe } from "vue";
6
- const N = Symbol("map"), U = Symbol("api"), xe = Symbol("marker"), Le = Symbol("markerCluster"), ee = Symbol("CustomMarker"), Se = Symbol("mapTilesLoaded"), q = [
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-d05fc6bc]{width:100%;height:100%}.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(d){console.error("vite-plugin-css-injected-by-js",d)}})();
2
+ var Be = Object.defineProperty;
3
+ var Ze = (n, e, t) => e in n ? Be(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
4
+ var se = (n, e, t) => (Ze(n, typeof e != "symbol" ? e + "" : e, t), t);
5
+ import { defineComponent as P, ref as y, provide as U, watch as x, onMounted as Pe, onBeforeUnmount as q, markRaw as S, toRef as $, openBlock as Y, createElementBlock as X, createElementVNode as ae, renderSlot as Q, normalizeProps as Ne, guardReactiveProps as Ue, inject as b, computed as H, Comment as xe, mergeProps as Le, createCommentVNode as Se } from "vue";
6
+ const B = Symbol("map"), Z = Symbol("api"), le = Symbol("marker"), ce = Symbol("markerCluster"), ee = Symbol("CustomMarker"), Ae = Symbol("mapTilesLoaded"), F = [
7
7
  "click",
8
8
  "dblclick",
9
9
  "drag",
@@ -30,34 +30,34 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
30
30
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
31
31
  PERFORMANCE OF THIS SOFTWARE.
32
32
  ***************************************************************************** */
33
- function Ue(n, e, t, s) {
33
+ function De(n, e, t, s) {
34
34
  function r(o) {
35
- return o instanceof t ? o : new t(function(a) {
36
- a(o);
35
+ return o instanceof t ? o : new t(function(i) {
36
+ i(o);
37
37
  });
38
38
  }
39
- return new (t || (t = Promise))(function(o, a) {
39
+ return new (t || (t = Promise))(function(o, i) {
40
40
  function l(u) {
41
41
  try {
42
42
  d(s.next(u));
43
43
  } catch (c) {
44
- a(c);
44
+ i(c);
45
45
  }
46
46
  }
47
- function i(u) {
47
+ function a(u) {
48
48
  try {
49
49
  d(s.throw(u));
50
50
  } catch (c) {
51
- a(c);
51
+ i(c);
52
52
  }
53
53
  }
54
54
  function d(u) {
55
- u.done ? o(u.value) : r(u.value).then(l, i);
55
+ u.done ? o(u.value) : r(u.value).then(l, a);
56
56
  }
57
57
  d((s = s.apply(n, e || [])).next());
58
58
  });
59
59
  }
60
- var De = function n(e, t) {
60
+ var Fe = function n(e, t) {
61
61
  if (e === t)
62
62
  return !0;
63
63
  if (e && t && typeof e == "object" && typeof t == "object") {
@@ -84,20 +84,20 @@ var De = function n(e, t) {
84
84
  if (!Object.prototype.hasOwnProperty.call(t, o[r]))
85
85
  return !1;
86
86
  for (r = s; r-- !== 0; ) {
87
- var a = o[r];
88
- if (!n(e[a], t[a]))
87
+ var i = o[r];
88
+ if (!n(e[i], t[i]))
89
89
  return !1;
90
90
  }
91
91
  return !0;
92
92
  }
93
93
  return e !== e && t !== t;
94
94
  };
95
- const de = "__googleMapsScriptId";
96
- var R;
95
+ const pe = "__googleMapsScriptId";
96
+ var N;
97
97
  (function(n) {
98
98
  n[n.INITIALIZED = 0] = "INITIALIZED", n[n.LOADING = 1] = "LOADING", n[n.SUCCESS = 2] = "SUCCESS", n[n.FAILURE = 3] = "FAILURE";
99
- })(R || (R = {}));
100
- class T {
99
+ })(N || (N = {}));
100
+ class j {
101
101
  /**
102
102
  * Creates an instance of Loader using [[LoaderOptions]]. No defaults are set
103
103
  * using this library, instead the defaults are set by the Google Maps
@@ -107,13 +107,13 @@ class T {
107
107
  * const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});
108
108
  * ```
109
109
  */
110
- constructor({ apiKey: e, authReferrerPolicy: t, channel: s, client: r, id: o = de, language: a, libraries: l = [], mapIds: i, nonce: d, region: u, retries: c = 3, url: h = "https://maps.googleapis.com/maps/api/js", version: p }) {
111
- if (this.callbacks = [], this.done = !1, this.loading = !1, this.errors = [], this.apiKey = e, this.authReferrerPolicy = t, this.channel = s, this.client = r, this.id = o || de, this.language = a, this.libraries = l, this.mapIds = i, this.nonce = d, this.region = u, this.retries = c, this.url = h, this.version = p, T.instance) {
112
- if (!De(this.options, T.instance.options))
113
- throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(T.instance.options)}`);
114
- return T.instance;
110
+ constructor({ apiKey: e, authReferrerPolicy: t, channel: s, client: r, id: o = pe, language: i, libraries: l = [], mapIds: a, nonce: d, region: u, retries: c = 3, url: h = "https://maps.googleapis.com/maps/api/js", version: p }) {
111
+ if (this.callbacks = [], this.done = !1, this.loading = !1, this.errors = [], this.apiKey = e, this.authReferrerPolicy = t, this.channel = s, this.client = r, this.id = o || pe, this.language = i, this.libraries = l, this.mapIds = a, this.nonce = d, this.region = u, this.retries = c, this.url = h, this.version = p, j.instance) {
112
+ if (!Fe(this.options, j.instance.options))
113
+ throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(j.instance.options)}`);
114
+ return j.instance;
115
115
  }
116
- T.instance = this;
116
+ j.instance = this;
117
117
  }
118
118
  get options() {
119
119
  return {
@@ -132,7 +132,7 @@ class T {
132
132
  };
133
133
  }
134
134
  get status() {
135
- return this.errors.length ? R.FAILURE : this.done ? R.SUCCESS : this.loading ? R.LOADING : R.INITIALIZED;
135
+ return this.errors.length ? N.FAILURE : this.done ? N.SUCCESS : this.loading ? N.LOADING : N.INITIALIZED;
136
136
  }
137
137
  get failed() {
138
138
  return this.done && !this.loading && this.errors.length >= this.retries + 1;
@@ -205,24 +205,24 @@ class T {
205
205
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
206
206
  (o) => !s[o] && delete s[o]
207
207
  ), !((t = (e = window == null ? void 0 : window.google) === null || e === void 0 ? void 0 : e.maps) === null || t === void 0) && t.importLibrary || ((o) => {
208
- let a, l, i, d = "The Google Maps JavaScript API", u = "google", c = "importLibrary", h = "__ib__", p = document, m = window;
208
+ let i, l, a, d = "The Google Maps JavaScript API", u = "google", c = "importLibrary", h = "__ib__", p = document, m = window;
209
209
  m = m[u] || (m[u] = {});
210
210
  const f = m.maps || (m.maps = {}), g = /* @__PURE__ */ new Set(), v = new URLSearchParams(), w = () => (
211
211
  // @ts-ignore
212
- a || (a = new Promise((_, E) => Ue(this, void 0, void 0, function* () {
213
- var b;
212
+ i || (i = new Promise((_, O) => De(this, void 0, void 0, function* () {
213
+ var M;
214
214
  yield l = p.createElement("script"), l.id = this.id, v.set("libraries", [...g] + "");
215
- for (i in o)
216
- v.set(i.replace(/[A-Z]/g, (x) => "_" + x[0].toLowerCase()), o[i]);
217
- v.set("callback", u + ".maps." + h), l.src = this.url + "?" + v, f[h] = _, l.onerror = () => a = E(Error(d + " could not load.")), l.nonce = this.nonce || ((b = p.querySelector("script[nonce]")) === null || b === void 0 ? void 0 : b.nonce) || "", p.head.append(l);
215
+ for (a in o)
216
+ v.set(a.replace(/[A-Z]/g, (E) => "_" + E[0].toLowerCase()), o[a]);
217
+ v.set("callback", u + ".maps." + h), l.src = this.url + "?" + v, f[h] = _, l.onerror = () => i = O(Error(d + " could not load.")), l.nonce = this.nonce || ((M = p.querySelector("script[nonce]")) === null || M === void 0 ? void 0 : M.nonce) || "", p.head.append(l);
218
218
  })))
219
219
  );
220
- f[c] ? console.warn(d + " only loads once. Ignoring:", o) : f[c] = (_, ...E) => g.add(_) && w().then(() => f[c](_, ...E));
220
+ f[c] ? console.warn(d + " only loads once. Ignoring:", o) : f[c] = (_, ...O) => g.add(_) && w().then(() => f[c](_, ...O));
221
221
  })(s);
222
222
  const r = this.libraries.map((o) => this.importLibrary(o));
223
223
  r.length || r.push(this.importLibrary("core")), Promise.all(r).then(() => this.callback(), (o) => {
224
- const a = new ErrorEvent("error", { error: o });
225
- this.loadErrorCallback(a);
224
+ const i = new ErrorEvent("error", { error: o });
225
+ this.loadErrorCallback(i);
226
226
  });
227
227
  }
228
228
  /**
@@ -260,7 +260,7 @@ class T {
260
260
  }
261
261
  }
262
262
  }
263
- function Fe(n) {
263
+ function Ve(n) {
264
264
  return class extends n.OverlayView {
265
265
  constructor(s) {
266
266
  super();
@@ -290,37 +290,37 @@ function Fe(n) {
290
290
  const s = this.getProjection(), r = s == null ? void 0 : s.fromLatLngToDivPixel(this.getPosition());
291
291
  if (r) {
292
292
  this.element.style.position = "absolute";
293
- const o = this.element.offsetHeight, a = this.element.offsetWidth;
294
- let l, i;
293
+ const o = this.element.offsetHeight, i = this.element.offsetWidth;
294
+ let l, a;
295
295
  switch (this.opts.anchorPoint) {
296
296
  case "TOP_CENTER":
297
- l = r.x - a / 2, i = r.y;
297
+ l = r.x - i / 2, a = r.y;
298
298
  break;
299
299
  case "BOTTOM_CENTER":
300
- l = r.x - a / 2, i = r.y - o;
300
+ l = r.x - i / 2, a = r.y - o;
301
301
  break;
302
302
  case "LEFT_CENTER":
303
- l = r.x, i = r.y - o / 2;
303
+ l = r.x, a = r.y - o / 2;
304
304
  break;
305
305
  case "RIGHT_CENTER":
306
- l = r.x - a, i = r.y - o / 2;
306
+ l = r.x - i, a = r.y - o / 2;
307
307
  break;
308
308
  case "TOP_LEFT":
309
- l = r.x, i = r.y;
309
+ l = r.x, a = r.y;
310
310
  break;
311
311
  case "TOP_RIGHT":
312
- l = r.x - a, i = r.y;
312
+ l = r.x - i, a = r.y;
313
313
  break;
314
314
  case "BOTTOM_LEFT":
315
- l = r.x, i = r.y - o;
315
+ l = r.x, a = r.y - o;
316
316
  break;
317
317
  case "BOTTOM_RIGHT":
318
- l = r.x - a, i = r.y - o;
318
+ l = r.x - i, a = r.y - o;
319
319
  break;
320
320
  default:
321
- l = r.x - a / 2, i = r.y - o / 2;
321
+ l = r.x - i / 2, a = r.y - o / 2;
322
322
  }
323
- this.element.style.left = l + "px", this.element.style.top = i + "px", this.element.style.transform = `translateX(${this.opts.offsetX || 0}px) translateY(${this.opts.offsetY || 0}px)`, this.opts.zIndex && (this.element.style.zIndex = this.opts.zIndex.toString());
323
+ this.element.style.left = l + "px", this.element.style.top = a + "px", this.element.style.transform = `translateX(${this.opts.offsetX || 0}px) translateY(${this.opts.offsetY || 0}px)`, this.opts.zIndex && (this.element.style.zIndex = this.opts.zIndex.toString());
324
324
  }
325
325
  }
326
326
  onRemove() {
@@ -332,8 +332,8 @@ function Fe(n) {
332
332
  }
333
333
  };
334
334
  }
335
- let he;
336
- const pe = [
335
+ let fe;
336
+ const me = [
337
337
  "bounds_changed",
338
338
  "center_changed",
339
339
  "click",
@@ -356,7 +356,7 @@ const pe = [
356
356
  "tilesloaded",
357
357
  "tilt_changed",
358
358
  "zoom_changed"
359
- ], Ve = P({
359
+ ], ze = P({
360
360
  props: {
361
361
  apiPromise: {
362
362
  type: Promise
@@ -371,7 +371,7 @@ const pe = [
371
371
  },
372
372
  libraries: {
373
373
  type: Array,
374
- default: () => ["places"]
374
+ default: () => ["places", "marker"]
375
375
  },
376
376
  region: {
377
377
  type: String,
@@ -547,12 +547,16 @@ const pe = [
547
547
  zoomControlPosition: {
548
548
  type: String,
549
549
  required: !1
550
+ },
551
+ nonce: {
552
+ type: String,
553
+ default: ""
550
554
  }
551
555
  },
552
- emits: pe,
556
+ emits: me,
553
557
  setup(n, { emit: e }) {
554
- const t = y(), s = y(!1), r = y(), o = y(), a = y(!1);
555
- G(N, r), G(U, o), G(Se, a);
558
+ const t = y(), s = y(!1), r = y(), o = y(), i = y(!1);
559
+ U(B, r), U(Z, o), U(Ae, i);
556
560
  const l = () => {
557
561
  const c = { ...n };
558
562
  Object.keys(c).forEach((f) => {
@@ -571,49 +575,49 @@ const pe = [
571
575
  disableDefaultUI: n.disableDefaultUi
572
576
  };
573
577
  return { ...c, ...m };
574
- }, i = O(
578
+ }, a = x(
575
579
  [o, r],
576
580
  ([c, h]) => {
577
581
  const p = c, m = h;
578
582
  p && m && (p.event.addListenerOnce(m, "tilesloaded", () => {
579
- a.value = !0;
580
- }), setTimeout(i, 0));
583
+ i.value = !0;
584
+ }), setTimeout(a, 0));
581
585
  },
582
586
  { immediate: !0 }
583
587
  ), d = () => {
584
588
  try {
585
- const { apiKey: c, region: h, version: p, language: m, libraries: f } = n;
586
- he = new T({ apiKey: c, region: h, version: p, language: m, libraries: f });
589
+ const { apiKey: c, region: h, version: p, language: m, libraries: f, nonce: g } = n;
590
+ fe = new j({ apiKey: c, region: h, version: p, language: m, libraries: f, nonce: g });
587
591
  } catch (c) {
588
592
  console.error(c);
589
593
  }
590
594
  }, u = (c) => {
591
- o.value = I(c.maps), r.value = I(new c.maps.Map(t.value, l()));
592
- const h = Fe(o.value);
593
- o.value[ee] = h, pe.forEach((m) => {
595
+ o.value = S(c.maps), r.value = S(new c.maps.Map(t.value, l()));
596
+ const h = Ve(o.value);
597
+ o.value[ee] = h, me.forEach((m) => {
594
598
  var f;
595
599
  (f = r.value) == null || f.addListener(m, (g) => e(m, g));
596
600
  }), s.value = !0;
597
601
  const p = Object.keys(n).filter(
598
- (m) => !["apiPromise", "apiKey", "version", "libraries", "region", "language", "center", "zoom"].includes(m)
599
- ).map((m) => Z(n, m));
600
- O(
602
+ (m) => !["apiPromise", "apiKey", "version", "libraries", "region", "language", "center", "zoom", "nonce"].includes(m)
603
+ ).map((m) => $(n, m));
604
+ x(
601
605
  [() => n.center, () => n.zoom, ...p],
602
606
  ([m, f], [g, v]) => {
603
- var x, M, F;
604
- const { center: w, zoom: _, ...E } = l();
605
- (x = r.value) == null || x.setOptions(E), f !== void 0 && f !== v && ((M = r.value) == null || M.setZoom(f));
606
- const b = !g || m.lng !== g.lng || m.lat !== g.lat;
607
- m && b && ((F = r.value) == null || F.panTo(m));
607
+ var E, k, L;
608
+ const { center: w, zoom: _, ...O } = l();
609
+ (E = r.value) == null || E.setOptions(O), f !== void 0 && f !== v && ((k = r.value) == null || k.setZoom(f));
610
+ const M = !g || m.lng !== g.lng || m.lat !== g.lat;
611
+ m && M && ((L = r.value) == null || L.panTo(m));
608
612
  }
609
613
  );
610
614
  };
611
- return Me(() => {
612
- n.apiPromise && n.apiPromise instanceof Promise ? n.apiPromise.then(u) : (d(), he.load().then(u));
613
- }), B(() => {
615
+ return Pe(() => {
616
+ n.apiPromise && n.apiPromise instanceof Promise ? n.apiPromise.then(u) : (d(), fe.load().then(u));
617
+ }), q(() => {
614
618
  var c;
615
- a.value = !1, r.value && ((c = o.value) == null || c.event.clearInstanceListeners(r.value));
616
- }), { mapRef: t, ready: s, map: r, api: o, mapTilesLoaded: a };
619
+ i.value = !1, r.value && ((c = o.value) == null || c.event.clearInstanceListeners(r.value));
620
+ }), { mapRef: t, ready: s, map: r, api: o, mapTilesLoaded: i };
617
621
  }
618
622
  });
619
623
  const te = (n, e) => {
@@ -621,21 +625,21 @@ const te = (n, e) => {
621
625
  for (const [s, r] of e)
622
626
  t[s] = r;
623
627
  return t;
624
- }, ze = {
628
+ }, Ge = {
625
629
  ref: "mapRef",
626
630
  class: "mapdiv"
627
631
  };
628
- function Ge(n, e, t, s, r, o) {
632
+ function He(n, e, t, s, r, o) {
629
633
  return Y(), X("div", null, [
630
- ae("div", ze, null, 512),
631
- Q(n.$slots, "default", Ze(Ne({ ready: n.ready, map: n.map, api: n.api, mapTilesLoaded: n.mapTilesLoaded })), void 0, !0)
634
+ ae("div", Ge, null, 512),
635
+ Q(n.$slots, "default", Ne(Ue({ ready: n.ready, map: n.map, api: n.api, mapTilesLoaded: n.mapTilesLoaded })), void 0, !0)
632
636
  ]);
633
637
  }
634
- const Et = /* @__PURE__ */ te(Ve, [["render", Ge], ["__scopeId", "data-v-f29e129b"]]);
635
- function He(n) {
638
+ const Et = /* @__PURE__ */ te(ze, [["render", He], ["__scopeId", "data-v-d05fc6bc"]]);
639
+ function We(n) {
636
640
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
637
641
  }
638
- var We = function n(e, t) {
642
+ var Ke = function n(e, t) {
639
643
  if (e === t)
640
644
  return !0;
641
645
  if (e && t && typeof e == "object" && typeof t == "object") {
@@ -662,33 +666,81 @@ var We = function n(e, t) {
662
666
  if (!Object.prototype.hasOwnProperty.call(t, o[r]))
663
667
  return !1;
664
668
  for (r = s; r-- !== 0; ) {
665
- var a = o[r];
666
- if (!n(e[a], t[a]))
669
+ var i = o[r];
670
+ if (!n(e[i], t[i]))
667
671
  return !1;
668
672
  }
669
673
  return !0;
670
674
  }
671
675
  return e !== e && t !== t;
672
676
  };
673
- const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n === ee, D = (n, e, t, s) => {
674
- const r = y(), o = C(N, y()), a = C(U, y()), l = C(Le, y()), i = J(
675
- () => !!(l.value && a.value && (r.value instanceof a.value.Marker || r.value instanceof a.value[ee]))
677
+ const A = /* @__PURE__ */ We(Ke), ge = ["click", "drag", "dragend", "dragstart", "gmp-click"], Pt = P({
678
+ name: "AdvancedMarker",
679
+ props: {
680
+ options: {
681
+ type: Object,
682
+ required: !0
683
+ },
684
+ pinOptions: {
685
+ type: Object,
686
+ required: !1
687
+ }
688
+ },
689
+ emits: ge,
690
+ setup(n, { emit: e, expose: t, slots: s }) {
691
+ const r = $(n, "options"), o = $(n, "pinOptions"), i = y(), l = b(B, y()), a = b(Z, y()), d = b(ce, y()), u = H(
692
+ () => !!(d.value && a.value && i.value instanceof google.maps.marker.AdvancedMarkerElement)
693
+ );
694
+ return x(
695
+ [l, r, o],
696
+ async (c, [h, p, m]) => {
697
+ var _, O, M;
698
+ const g = !A(r.value, p) || !A(o.value, m) || l.value !== h;
699
+ if (!l.value || !a.value || !g)
700
+ return;
701
+ const { AdvancedMarkerElement: v, PinElement: w } = a.value.marker;
702
+ if (i.value) {
703
+ const { map: E, content: k, ...L } = r.value;
704
+ Object.assign(i.value, {
705
+ content: o.value ? new w(o.value).element : k,
706
+ ...L
707
+ }), u.value && ((_ = d.value) == null || _.removeMarker(i.value), (O = d.value) == null || O.addMarker(i.value));
708
+ } else
709
+ o.value && (r.value.content = new w(o.value).element), i.value = S(new v(r.value)), u.value ? (M = d.value) == null || M.addMarker(i.value) : i.value.map = l.value, ge.forEach((E) => {
710
+ var k;
711
+ (k = i.value) == null || k.addListener(E, (L) => e(E, L));
712
+ });
713
+ },
714
+ {
715
+ immediate: !0
716
+ }
717
+ ), q(() => {
718
+ var c, h;
719
+ i.value && ((c = a.value) == null || c.event.clearInstanceListeners(i.value), u.value ? (h = d.value) == null || h.removeMarker(i.value) : i.value.map = null);
720
+ }), U(le, i), t({ marker: i }), () => {
721
+ var c;
722
+ return (c = s.default) == null ? void 0 : c.call(s);
723
+ };
724
+ }
725
+ }), Je = (n) => n === "Marker", Ye = (n) => n === ee, V = (n, e, t, s) => {
726
+ const r = y(), o = b(B, y()), i = b(Z, y()), l = b(ce, y()), a = H(
727
+ () => !!(l.value && i.value && (r.value instanceof i.value.Marker || r.value instanceof i.value[ee]))
676
728
  );
677
- return O(
729
+ return x(
678
730
  [o, t],
679
731
  (d, [u, c]) => {
680
732
  var p, m, f;
681
- const h = !$(t.value, c) || o.value !== u;
682
- !o.value || !a.value || !h || (r.value ? (r.value.setOptions(t.value), i.value && ((p = l.value) == null || p.removeMarker(r.value), (m = l.value) == null || m.addMarker(r.value))) : (Ke(n) ? r.value = I(
683
- new a.value[n](t.value)
684
- ) : Je(n) ? r.value = I(
685
- new a.value[n](t.value)
686
- ) : r.value = I(
687
- new a.value[n]({
733
+ const h = !A(t.value, c) || o.value !== u;
734
+ !o.value || !i.value || !h || (r.value ? (r.value.setOptions(t.value), a.value && ((p = l.value) == null || p.removeMarker(r.value), (m = l.value) == null || m.addMarker(r.value))) : (Je(n) ? r.value = S(
735
+ new i.value[n](t.value)
736
+ ) : Ye(n) ? r.value = S(
737
+ new i.value[n](t.value)
738
+ ) : r.value = S(
739
+ new i.value[n]({
688
740
  ...t.value,
689
741
  map: o.value
690
742
  })
691
- ), i.value ? (f = l.value) == null || f.addMarker(r.value) : r.value.setMap(o.value), e.forEach((g) => {
743
+ ), a.value ? (f = l.value) == null || f.addMarker(r.value) : r.value.setMap(o.value), e.forEach((g) => {
692
744
  var v;
693
745
  (v = r.value) == null || v.addListener(g, (w) => s(g, w));
694
746
  })));
@@ -696,11 +748,11 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
696
748
  {
697
749
  immediate: !0
698
750
  }
699
- ), B(() => {
751
+ ), q(() => {
700
752
  var d, u;
701
- r.value && ((d = a.value) == null || d.event.clearInstanceListeners(r.value), i.value ? (u = l.value) == null || u.removeMarker(r.value) : r.value.setMap(null));
753
+ r.value && ((d = i.value) == null || d.event.clearInstanceListeners(r.value), a.value ? (u = l.value) == null || u.removeMarker(r.value) : r.value.setMap(null));
702
754
  }), r;
703
- }, fe = [
755
+ }, ve = [
704
756
  "animation_changed",
705
757
  "click",
706
758
  "dblclick",
@@ -724,7 +776,7 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
724
776
  "shape_changed",
725
777
  "title_changed",
726
778
  "visible_changed"
727
- ], Pt = P({
779
+ ], xt = P({
728
780
  name: "Marker",
729
781
  props: {
730
782
  options: {
@@ -732,15 +784,15 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
732
784
  required: !0
733
785
  }
734
786
  },
735
- emits: fe,
787
+ emits: ve,
736
788
  setup(n, { emit: e, expose: t, slots: s }) {
737
- const r = Z(n, "options"), o = D("Marker", fe, r, e);
738
- return G(xe, o), t({ marker: o }), () => {
739
- var a;
740
- return (a = s.default) == null ? void 0 : a.call(s);
789
+ const r = $(n, "options"), o = V("Marker", ve, r, e);
790
+ return U(le, o), t({ marker: o }), () => {
791
+ var i;
792
+ return (i = s.default) == null ? void 0 : i.call(s);
741
793
  };
742
794
  }
743
- }), Ot = P({
795
+ }), Lt = P({
744
796
  name: "Polyline",
745
797
  props: {
746
798
  options: {
@@ -748,13 +800,13 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
748
800
  required: !0
749
801
  }
750
802
  },
751
- emits: q,
803
+ emits: F,
752
804
  setup(n, { emit: e }) {
753
- const t = Z(n, "options");
754
- return { polyline: D("Polyline", q, t, e) };
805
+ const t = $(n, "options");
806
+ return { polyline: V("Polyline", F, t, e) };
755
807
  },
756
808
  render: () => null
757
- }), xt = P({
809
+ }), St = P({
758
810
  name: "Polygon",
759
811
  props: {
760
812
  options: {
@@ -762,13 +814,13 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
762
814
  required: !0
763
815
  }
764
816
  },
765
- emits: q,
817
+ emits: F,
766
818
  setup(n, { emit: e }) {
767
- const t = Z(n, "options");
768
- return { polygon: D("Polygon", q, t, e) };
819
+ const t = $(n, "options");
820
+ return { polygon: V("Polygon", F, t, e) };
769
821
  },
770
822
  render: () => null
771
- }), me = q.concat(["bounds_changed"]), Lt = P({
823
+ }), ye = F.concat(["bounds_changed"]), At = P({
772
824
  name: "Rectangle",
773
825
  props: {
774
826
  options: {
@@ -776,13 +828,13 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
776
828
  required: !0
777
829
  }
778
830
  },
779
- emits: me,
831
+ emits: ye,
780
832
  setup(n, { emit: e }) {
781
- const t = Z(n, "options");
782
- return { rectangle: D("Rectangle", me, t, e) };
833
+ const t = $(n, "options");
834
+ return { rectangle: V("Rectangle", ye, t, e) };
783
835
  },
784
836
  render: () => null
785
- }), ge = q.concat(["center_changed", "radius_changed"]), St = P({
837
+ }), we = F.concat(["center_changed", "radius_changed"]), It = P({
786
838
  name: "Circle",
787
839
  props: {
788
840
  options: {
@@ -790,13 +842,13 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
790
842
  required: !0
791
843
  }
792
844
  },
793
- emits: ge,
845
+ emits: we,
794
846
  setup(n, { emit: e }) {
795
- const t = Z(n, "options");
796
- return { circle: D("Circle", ge, t, e) };
847
+ const t = $(n, "options");
848
+ return { circle: V("Circle", we, t, e) };
797
849
  },
798
850
  render: () => null
799
- }), Ye = P({
851
+ }), Xe = P({
800
852
  props: {
801
853
  position: {
802
854
  type: String,
@@ -809,10 +861,10 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
809
861
  },
810
862
  emits: ["content:loaded"],
811
863
  setup(n, { emit: e }) {
812
- const t = y(null), s = C(N, y()), r = C(U, y()), o = C(Se, y(!1)), a = O(
864
+ const t = y(null), s = b(B, y()), r = b(Z, y()), o = b(Ae, y(!1)), i = x(
813
865
  [o, r, t],
814
866
  ([d, u, c]) => {
815
- u && d && c && (l(n.position), e("content:loaded"), setTimeout(a, 0));
867
+ u && d && c && (l(n.position), e("content:loaded"), setTimeout(i, 0));
816
868
  },
817
869
  { immediate: !0 }
818
870
  ), l = (d) => {
@@ -820,7 +872,7 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
820
872
  const u = r.value.ControlPosition[d];
821
873
  s.value.controls[u].push(t.value);
822
874
  }
823
- }, i = (d) => {
875
+ }, a = (d) => {
824
876
  if (s.value && r.value) {
825
877
  let u = null;
826
878
  const c = r.value.ControlPosition[d];
@@ -829,12 +881,12 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
829
881
  }), u !== null && s.value.controls[c].removeAt(u);
830
882
  }
831
883
  };
832
- return B(() => i(n.position)), O(
884
+ return q(() => a(n.position)), x(
833
885
  () => n.position,
834
886
  (d, u) => {
835
- i(u), l(d);
887
+ a(u), l(d);
836
888
  }
837
- ), O(
889
+ ), x(
838
890
  () => n.index,
839
891
  (d) => {
840
892
  d && t.value && (t.value.index = n.index);
@@ -842,16 +894,16 @@ const $ = /* @__PURE__ */ He(We), Ke = (n) => n === "Marker", Je = (n) => n ===
842
894
  ), { controlRef: t };
843
895
  }
844
896
  });
845
- const Xe = {
897
+ const Qe = {
846
898
  ref: "controlRef",
847
899
  class: "custom-control-wrapper"
848
900
  };
849
- function Qe(n, e, t, s, r, o) {
850
- return Y(), X("div", Xe, [
901
+ function et(n, e, t, s, r, o) {
902
+ return Y(), X("div", Qe, [
851
903
  Q(n.$slots, "default", {}, void 0, !0)
852
904
  ], 512);
853
905
  }
854
- const It = /* @__PURE__ */ te(Ye, [["render", Qe], ["__scopeId", "data-v-d099a3a6"]]), ve = ["closeclick", "content_changed", "domready", "position_changed", "visible", "zindex_changed"], et = P({
906
+ const Tt = /* @__PURE__ */ te(Xe, [["render", et], ["__scopeId", "data-v-d099a3a6"]]), _e = ["closeclick", "content_changed", "domready", "position_changed", "visible", "zindex_changed"], tt = P({
855
907
  inheritAttrs: !1,
856
908
  props: {
857
909
  options: {
@@ -862,68 +914,68 @@ const It = /* @__PURE__ */ te(Ye, [["render", Qe], ["__scopeId", "data-v-d099a3a
862
914
  type: Boolean
863
915
  }
864
916
  },
865
- emits: [...ve, "update:modelValue"],
917
+ emits: [..._e, "update:modelValue"],
866
918
  setup(n, { slots: e, emit: t, expose: s }) {
867
- const r = y(), o = y(), a = C(N, y()), l = C(U, y()), i = C(xe, y());
919
+ const r = y(), o = y(), i = b(B, y()), l = b(Z, y()), a = b(le, y());
868
920
  let d, u = n.modelValue;
869
- const c = J(() => {
921
+ const c = H(() => {
870
922
  var f;
871
- return (f = e.default) == null ? void 0 : f.call(e).some((g) => g.type !== Ee);
923
+ return (f = e.default) == null ? void 0 : f.call(e).some((g) => g.type !== xe);
872
924
  }), h = (f) => {
873
925
  u = f, t("update:modelValue", f);
874
926
  }, p = (f) => {
875
- r.value && (r.value.open({ map: a.value, anchor: i.value, ...f }), h(!0));
927
+ r.value && (r.value.open({ map: i.value, anchor: a.value, ...f }), h(!0));
876
928
  }, m = () => {
877
929
  r.value && (r.value.close(), h(!1));
878
930
  };
879
- return Me(() => {
880
- O(
881
- [a, () => n.options],
931
+ return Pe(() => {
932
+ x(
933
+ [i, () => n.options],
882
934
  ([f, g], [v, w]) => {
883
- var E;
884
- const _ = !$(g, w) || a.value !== v;
885
- a.value && l.value && _ && (r.value ? (r.value.setOptions({
935
+ var O;
936
+ const _ = !A(g, w) || i.value !== v;
937
+ i.value && l.value && _ && (r.value ? (r.value.setOptions({
886
938
  ...g,
887
939
  content: c.value ? o.value : g.content
888
- }), i.value || p()) : (r.value = I(
940
+ }), a.value || p()) : (r.value = S(
889
941
  new l.value.InfoWindow({
890
942
  ...g,
891
943
  content: c.value ? o.value : g.content
892
944
  })
893
- ), i.value && (d = i.value.addListener("click", () => {
945
+ ), a.value && (d = a.value.addListener("click", () => {
894
946
  p();
895
- })), (!i.value || u) && p(), ve.forEach((b) => {
896
- var x;
897
- (x = r.value) == null || x.addListener(b, (M) => t(b, M));
898
- }), (E = r.value) == null || E.addListener("closeclick", () => h(!1))));
947
+ })), (!a.value || u) && p(), _e.forEach((M) => {
948
+ var E;
949
+ (E = r.value) == null || E.addListener(M, (k) => t(M, k));
950
+ }), (O = r.value) == null || O.addListener("closeclick", () => h(!1))));
899
951
  },
900
952
  {
901
953
  immediate: !0
902
954
  }
903
- ), O(
955
+ ), x(
904
956
  () => n.modelValue,
905
957
  (f) => {
906
958
  f !== u && (f ? p() : m());
907
959
  }
908
960
  );
909
- }), B(() => {
961
+ }), q(() => {
910
962
  var f;
911
963
  d && d.remove(), r.value && ((f = l.value) == null || f.event.clearInstanceListeners(r.value), m());
912
964
  }), s({ infoWindow: r, open: p, close: m }), { infoWindow: r, infoWindowRef: o, hasSlotContent: c, open: p, close: m };
913
965
  }
914
966
  });
915
- const tt = {
967
+ const st = {
916
968
  key: 0,
917
969
  class: "info-window-wrapper"
918
970
  };
919
- function st(n, e, t, s, r, o) {
920
- return n.hasSlotContent ? (Y(), X("div", tt, [
921
- ae("div", Pe({ ref: "infoWindowRef" }, n.$attrs), [
971
+ function rt(n, e, t, s, r, o) {
972
+ return n.hasSlotContent ? (Y(), X("div", st, [
973
+ ae("div", Le({ ref: "infoWindowRef" }, n.$attrs), [
922
974
  Q(n.$slots, "default", {}, void 0, !0)
923
975
  ], 16)
924
- ])) : Oe("", !0);
976
+ ])) : Se("", !0);
925
977
  }
926
- const At = /* @__PURE__ */ te(et, [["render", st], ["__scopeId", "data-v-cbe1707b"]]), ye = [
978
+ const $t = /* @__PURE__ */ te(tt, [["render", rt], ["__scopeId", "data-v-cbe1707b"]]), ke = [
927
979
  Int8Array,
928
980
  Uint8Array,
929
981
  Uint8ClampedArray,
@@ -933,8 +985,8 @@ const At = /* @__PURE__ */ te(et, [["render", st], ["__scopeId", "data-v-cbe1707
933
985
  Uint32Array,
934
986
  Float32Array,
935
987
  Float64Array
936
- ], re = 1, V = 8;
937
- class le {
988
+ ], re = 1, z = 8;
989
+ class ue {
938
990
  /**
939
991
  * Creates an index from raw `ArrayBuffer` data.
940
992
  * @param {ArrayBuffer} data
@@ -948,11 +1000,11 @@ class le {
948
1000
  const r = s >> 4;
949
1001
  if (r !== re)
950
1002
  throw new Error(`Got v${r} data when expected v${re}.`);
951
- const o = ye[s & 15];
1003
+ const o = ke[s & 15];
952
1004
  if (!o)
953
1005
  throw new Error("Unrecognized array type.");
954
- const [a] = new Uint16Array(e, 2, 1), [l] = new Uint32Array(e, 4, 1);
955
- return new le(l, a, o, e);
1006
+ const [i] = new Uint16Array(e, 2, 1), [l] = new Uint32Array(e, 4, 1);
1007
+ return new ue(l, i, o, e);
956
1008
  }
957
1009
  /**
958
1010
  * Creates an index that will hold a given number of items.
@@ -965,10 +1017,10 @@ class le {
965
1017
  if (isNaN(e) || e < 0)
966
1018
  throw new Error(`Unpexpected numItems value: ${e}.`);
967
1019
  this.numItems = +e, this.nodeSize = Math.min(Math.max(+t, 2), 65535), this.ArrayType = s, this.IndexArrayType = e < 65536 ? Uint16Array : Uint32Array;
968
- const o = ye.indexOf(this.ArrayType), a = e * 2 * this.ArrayType.BYTES_PER_ELEMENT, l = e * this.IndexArrayType.BYTES_PER_ELEMENT, i = (8 - l % 8) % 8;
1020
+ const o = ke.indexOf(this.ArrayType), i = e * 2 * this.ArrayType.BYTES_PER_ELEMENT, l = e * this.IndexArrayType.BYTES_PER_ELEMENT, a = (8 - l % 8) % 8;
969
1021
  if (o < 0)
970
1022
  throw new Error(`Unexpected typed array class: ${s}.`);
971
- r && r instanceof ArrayBuffer ? (this.data = r, this.ids = new this.IndexArrayType(this.data, V, e), this.coords = new this.ArrayType(this.data, V + l + i, e * 2), this._pos = e * 2, this._finished = !0) : (this.data = new ArrayBuffer(V + a + l + i), this.ids = new this.IndexArrayType(this.data, V, e), this.coords = new this.ArrayType(this.data, V + l + i, e * 2), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, (re << 4) + o]), new Uint16Array(this.data, 2, 1)[0] = t, new Uint32Array(this.data, 4, 1)[0] = e);
1023
+ r && r instanceof ArrayBuffer ? (this.data = r, this.ids = new this.IndexArrayType(this.data, z, e), this.coords = new this.ArrayType(this.data, z + l + a, e * 2), this._pos = e * 2, this._finished = !0) : (this.data = new ArrayBuffer(z + i + l + a), this.ids = new this.IndexArrayType(this.data, z, e), this.coords = new this.ArrayType(this.data, z + l + a, e * 2), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, (re << 4) + o]), new Uint16Array(this.data, 2, 1)[0] = t, new Uint32Array(this.data, 4, 1)[0] = e);
972
1024
  }
973
1025
  /**
974
1026
  * Add a point to the index.
@@ -1000,18 +1052,18 @@ class le {
1000
1052
  range(e, t, s, r) {
1001
1053
  if (!this._finished)
1002
1054
  throw new Error("Data not yet indexed - call index.finish().");
1003
- const { ids: o, coords: a, nodeSize: l } = this, i = [0, o.length - 1, 0], d = [];
1004
- for (; i.length; ) {
1005
- const u = i.pop() || 0, c = i.pop() || 0, h = i.pop() || 0;
1055
+ const { ids: o, coords: i, nodeSize: l } = this, a = [0, o.length - 1, 0], d = [];
1056
+ for (; a.length; ) {
1057
+ const u = a.pop() || 0, c = a.pop() || 0, h = a.pop() || 0;
1006
1058
  if (c - h <= l) {
1007
1059
  for (let g = h; g <= c; g++) {
1008
- const v = a[2 * g], w = a[2 * g + 1];
1060
+ const v = i[2 * g], w = i[2 * g + 1];
1009
1061
  v >= e && v <= s && w >= t && w <= r && d.push(o[g]);
1010
1062
  }
1011
1063
  continue;
1012
1064
  }
1013
- const p = h + c >> 1, m = a[2 * p], f = a[2 * p + 1];
1014
- m >= e && m <= s && f >= t && f <= r && d.push(o[p]), (u === 0 ? e <= m : t <= f) && (i.push(h), i.push(p - 1), i.push(1 - u)), (u === 0 ? s >= m : r >= f) && (i.push(p + 1), i.push(c), i.push(1 - u));
1065
+ const p = h + c >> 1, m = i[2 * p], f = i[2 * p + 1];
1066
+ m >= e && m <= s && f >= t && f <= r && d.push(o[p]), (u === 0 ? e <= m : t <= f) && (a.push(h), a.push(p - 1), a.push(1 - u)), (u === 0 ? s >= m : r >= f) && (a.push(p + 1), a.push(c), a.push(1 - u));
1015
1067
  }
1016
1068
  return d;
1017
1069
  }
@@ -1025,25 +1077,25 @@ class le {
1025
1077
  within(e, t, s) {
1026
1078
  if (!this._finished)
1027
1079
  throw new Error("Data not yet indexed - call index.finish().");
1028
- const { ids: r, coords: o, nodeSize: a } = this, l = [0, r.length - 1, 0], i = [], d = s * s;
1080
+ const { ids: r, coords: o, nodeSize: i } = this, l = [0, r.length - 1, 0], a = [], d = s * s;
1029
1081
  for (; l.length; ) {
1030
1082
  const u = l.pop() || 0, c = l.pop() || 0, h = l.pop() || 0;
1031
- if (c - h <= a) {
1083
+ if (c - h <= i) {
1032
1084
  for (let g = h; g <= c; g++)
1033
- we(o[2 * g], o[2 * g + 1], e, t) <= d && i.push(r[g]);
1085
+ Ce(o[2 * g], o[2 * g + 1], e, t) <= d && a.push(r[g]);
1034
1086
  continue;
1035
1087
  }
1036
1088
  const p = h + c >> 1, m = o[2 * p], f = o[2 * p + 1];
1037
- we(m, f, e, t) <= d && i.push(r[p]), (u === 0 ? e - s <= m : t - s <= f) && (l.push(h), l.push(p - 1), l.push(1 - u)), (u === 0 ? e + s >= m : t + s >= f) && (l.push(p + 1), l.push(c), l.push(1 - u));
1089
+ Ce(m, f, e, t) <= d && a.push(r[p]), (u === 0 ? e - s <= m : t - s <= f) && (l.push(h), l.push(p - 1), l.push(1 - u)), (u === 0 ? e + s >= m : t + s >= f) && (l.push(p + 1), l.push(c), l.push(1 - u));
1038
1090
  }
1039
- return i;
1091
+ return a;
1040
1092
  }
1041
1093
  }
1042
1094
  function ie(n, e, t, s, r, o) {
1043
1095
  if (r - s <= t)
1044
1096
  return;
1045
- const a = s + r >> 1;
1046
- Ie(n, e, a, s, r, o), ie(n, e, t, s, a - 1, 1 - o), ie(n, e, t, a + 1, r, 1 - o);
1097
+ const i = s + r >> 1;
1098
+ Ie(n, e, i, s, r, o), ie(n, e, t, s, i - 1, 1 - o), ie(n, e, t, i + 1, r, 1 - o);
1047
1099
  }
1048
1100
  function Ie(n, e, t, s, r, o) {
1049
1101
  for (; r > s; ) {
@@ -1051,29 +1103,29 @@ function Ie(n, e, t, s, r, o) {
1051
1103
  const d = r - s + 1, u = t - s + 1, c = Math.log(d), h = 0.5 * Math.exp(2 * c / 3), p = 0.5 * Math.sqrt(c * h * (d - h) / d) * (u - d / 2 < 0 ? -1 : 1), m = Math.max(s, Math.floor(t - u * h / d + p)), f = Math.min(r, Math.floor(t + (d - u) * h / d + p));
1052
1104
  Ie(n, e, t, m, f, o);
1053
1105
  }
1054
- const a = e[2 * t + o];
1055
- let l = s, i = r;
1056
- for (z(n, e, s, t), e[2 * r + o] > a && z(n, e, s, r); l < i; ) {
1057
- for (z(n, e, l, i), l++, i--; e[2 * l + o] < a; )
1106
+ const i = e[2 * t + o];
1107
+ let l = s, a = r;
1108
+ for (G(n, e, s, t), e[2 * r + o] > i && G(n, e, s, r); l < a; ) {
1109
+ for (G(n, e, l, a), l++, a--; e[2 * l + o] < i; )
1058
1110
  l++;
1059
- for (; e[2 * i + o] > a; )
1060
- i--;
1111
+ for (; e[2 * a + o] > i; )
1112
+ a--;
1061
1113
  }
1062
- e[2 * s + o] === a ? z(n, e, s, i) : (i++, z(n, e, i, r)), i <= t && (s = i + 1), t <= i && (r = i - 1);
1114
+ e[2 * s + o] === i ? G(n, e, s, a) : (a++, G(n, e, a, r)), a <= t && (s = a + 1), t <= a && (r = a - 1);
1063
1115
  }
1064
1116
  }
1065
- function z(n, e, t, s) {
1117
+ function G(n, e, t, s) {
1066
1118
  ne(n, t, s), ne(e, 2 * t, 2 * s), ne(e, 2 * t + 1, 2 * s + 1);
1067
1119
  }
1068
1120
  function ne(n, e, t) {
1069
1121
  const s = n[e];
1070
1122
  n[e] = n[t], n[t] = s;
1071
1123
  }
1072
- function we(n, e, t, s) {
1124
+ function Ce(n, e, t, s) {
1073
1125
  const r = n - t, o = e - s;
1074
1126
  return r * r + o * o;
1075
1127
  }
1076
- const rt = {
1128
+ const nt = {
1077
1129
  minZoom: 0,
1078
1130
  // min zoom to generate clusters on
1079
1131
  maxZoom: 16,
@@ -1096,41 +1148,41 @@ const rt = {
1096
1148
  // properties to use for individual points when running the reducer
1097
1149
  map: (n) => n
1098
1150
  // props => ({sum: props.my_value})
1099
- }, _e = Math.fround || ((n) => (e) => (n[0] = +e, n[0]))(new Float32Array(1)), A = 2, S = 3, oe = 4, L = 5, Ae = 6;
1100
- class Te {
1151
+ }, be = Math.fround || ((n) => (e) => (n[0] = +e, n[0]))(new Float32Array(1)), R = 2, T = 3, oe = 4, I = 5, Te = 6;
1152
+ class $e {
1101
1153
  constructor(e) {
1102
- this.options = Object.assign(Object.create(rt), e), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];
1154
+ this.options = Object.assign(Object.create(nt), e), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];
1103
1155
  }
1104
1156
  load(e) {
1105
1157
  const { log: t, minZoom: s, maxZoom: r } = this.options;
1106
1158
  t && console.time("total time");
1107
1159
  const o = `prepare ${e.length} points`;
1108
1160
  t && console.time(o), this.points = e;
1109
- const a = [];
1110
- for (let i = 0; i < e.length; i++) {
1111
- const d = e[i];
1161
+ const i = [];
1162
+ for (let a = 0; a < e.length; a++) {
1163
+ const d = e[a];
1112
1164
  if (!d.geometry)
1113
1165
  continue;
1114
- const [u, c] = d.geometry.coordinates, h = _e(W(u)), p = _e(K(c));
1115
- a.push(
1166
+ const [u, c] = d.geometry.coordinates, h = be(K(u)), p = be(J(c));
1167
+ i.push(
1116
1168
  h,
1117
1169
  p,
1118
1170
  // projected point coordinates
1119
1171
  1 / 0,
1120
1172
  // the last zoom the point was processed at
1121
- i,
1173
+ a,
1122
1174
  // index of the source feature in the original input array
1123
1175
  -1,
1124
1176
  // parent cluster id
1125
1177
  1
1126
1178
  // number of points in a cluster
1127
- ), this.options.reduce && a.push(0);
1179
+ ), this.options.reduce && i.push(0);
1128
1180
  }
1129
- let l = this.trees[r + 1] = this._createTree(a);
1181
+ let l = this.trees[r + 1] = this._createTree(i);
1130
1182
  t && console.timeEnd(o);
1131
- for (let i = r; i >= s; i--) {
1183
+ for (let a = r; a >= s; a--) {
1132
1184
  const d = +Date.now();
1133
- l = this.trees[i] = this._createTree(this._cluster(l, i)), t && console.log("z%d: %d clusters in %dms", i, l.numItems, +Date.now() - d);
1185
+ l = this.trees[a] = this._createTree(this._cluster(l, a)), t && console.log("z%d: %d clusters in %dms", a, l.numItems, +Date.now() - d);
1134
1186
  }
1135
1187
  return t && console.timeEnd("total time"), this;
1136
1188
  }
@@ -1138,17 +1190,17 @@ class Te {
1138
1190
  let s = ((e[0] + 180) % 360 + 360) % 360 - 180;
1139
1191
  const r = Math.max(-90, Math.min(90, e[1]));
1140
1192
  let o = e[2] === 180 ? 180 : ((e[2] + 180) % 360 + 360) % 360 - 180;
1141
- const a = Math.max(-90, Math.min(90, e[3]));
1193
+ const i = Math.max(-90, Math.min(90, e[3]));
1142
1194
  if (e[2] - e[0] >= 360)
1143
1195
  s = -180, o = 180;
1144
1196
  else if (s > o) {
1145
- const c = this.getClusters([s, r, 180, a], t), h = this.getClusters([-180, r, o, a], t);
1197
+ const c = this.getClusters([s, r, 180, i], t), h = this.getClusters([-180, r, o, i], t);
1146
1198
  return c.concat(h);
1147
1199
  }
1148
- const l = this.trees[this._limitZoom(t)], i = l.range(W(s), K(a), W(o), K(r)), d = l.data, u = [];
1149
- for (const c of i) {
1200
+ const l = this.trees[this._limitZoom(t)], a = l.range(K(s), J(i), K(o), J(r)), d = l.data, u = [];
1201
+ for (const c of a) {
1150
1202
  const h = this.stride * c;
1151
- u.push(d[h + L] > 1 ? ke(d, h, this.clusterProps) : this.points[d[h + S]]);
1203
+ u.push(d[h + I] > 1 ? Me(d, h, this.clusterProps) : this.points[d[h + T]]);
1152
1204
  }
1153
1205
  return u;
1154
1206
  }
@@ -1156,13 +1208,13 @@ class Te {
1156
1208
  const t = this._getOriginId(e), s = this._getOriginZoom(e), r = "No cluster with the specified id.", o = this.trees[s];
1157
1209
  if (!o)
1158
1210
  throw new Error(r);
1159
- const a = o.data;
1160
- if (t * this.stride >= a.length)
1211
+ const i = o.data;
1212
+ if (t * this.stride >= i.length)
1161
1213
  throw new Error(r);
1162
- const l = this.options.radius / (this.options.extent * Math.pow(2, s - 1)), i = a[t * this.stride], d = a[t * this.stride + 1], u = o.within(i, d, l), c = [];
1214
+ const l = this.options.radius / (this.options.extent * Math.pow(2, s - 1)), a = i[t * this.stride], d = i[t * this.stride + 1], u = o.within(a, d, l), c = [];
1163
1215
  for (const h of u) {
1164
1216
  const p = h * this.stride;
1165
- a[p + oe] === e && c.push(a[p + L] > 1 ? ke(a, p, this.clusterProps) : this.points[a[p + S]]);
1217
+ i[p + oe] === e && c.push(i[p + I] > 1 ? Me(i, p, this.clusterProps) : this.points[i[p + T]]);
1166
1218
  }
1167
1219
  if (c.length === 0)
1168
1220
  throw new Error(r);
@@ -1174,25 +1226,25 @@ class Te {
1174
1226
  return this._appendLeaves(r, e, t, s, 0), r;
1175
1227
  }
1176
1228
  getTile(e, t, s) {
1177
- const r = this.trees[this._limitZoom(e)], o = Math.pow(2, e), { extent: a, radius: l } = this.options, i = l / a, d = (s - i) / o, u = (s + 1 + i) / o, c = {
1229
+ const r = this.trees[this._limitZoom(e)], o = Math.pow(2, e), { extent: i, radius: l } = this.options, a = l / i, d = (s - a) / o, u = (s + 1 + a) / o, c = {
1178
1230
  features: []
1179
1231
  };
1180
1232
  return this._addTileFeatures(
1181
- r.range((t - i) / o, d, (t + 1 + i) / o, u),
1233
+ r.range((t - a) / o, d, (t + 1 + a) / o, u),
1182
1234
  r.data,
1183
1235
  t,
1184
1236
  s,
1185
1237
  o,
1186
1238
  c
1187
1239
  ), t === 0 && this._addTileFeatures(
1188
- r.range(1 - i / o, d, 1, u),
1240
+ r.range(1 - a / o, d, 1, u),
1189
1241
  r.data,
1190
1242
  o,
1191
1243
  s,
1192
1244
  o,
1193
1245
  c
1194
1246
  ), t === o - 1 && this._addTileFeatures(
1195
- r.range(0, d, i / o, u),
1247
+ r.range(0, d, a / o, u),
1196
1248
  r.data,
1197
1249
  -1,
1198
1250
  s,
@@ -1211,31 +1263,31 @@ class Te {
1211
1263
  return t;
1212
1264
  }
1213
1265
  _appendLeaves(e, t, s, r, o) {
1214
- const a = this.getChildren(t);
1215
- for (const l of a) {
1216
- const i = l.properties;
1217
- if (i && i.cluster ? o + i.point_count <= r ? o += i.point_count : o = this._appendLeaves(e, i.cluster_id, s, r, o) : o < r ? o++ : e.push(l), e.length === s)
1266
+ const i = this.getChildren(t);
1267
+ for (const l of i) {
1268
+ const a = l.properties;
1269
+ if (a && a.cluster ? o + a.point_count <= r ? o += a.point_count : o = this._appendLeaves(e, a.cluster_id, s, r, o) : o < r ? o++ : e.push(l), e.length === s)
1218
1270
  break;
1219
1271
  }
1220
1272
  return o;
1221
1273
  }
1222
1274
  _createTree(e) {
1223
- const t = new le(e.length / this.stride | 0, this.options.nodeSize, Float32Array);
1275
+ const t = new ue(e.length / this.stride | 0, this.options.nodeSize, Float32Array);
1224
1276
  for (let s = 0; s < e.length; s += this.stride)
1225
1277
  t.add(e[s], e[s + 1]);
1226
1278
  return t.finish(), t.data = e, t;
1227
1279
  }
1228
- _addTileFeatures(e, t, s, r, o, a) {
1280
+ _addTileFeatures(e, t, s, r, o, i) {
1229
1281
  for (const l of e) {
1230
- const i = l * this.stride, d = t[i + L] > 1;
1282
+ const a = l * this.stride, d = t[a + I] > 1;
1231
1283
  let u, c, h;
1232
1284
  if (d)
1233
- u = $e(t, i, this.clusterProps), c = t[i], h = t[i + 1];
1285
+ u = Re(t, a, this.clusterProps), c = t[a], h = t[a + 1];
1234
1286
  else {
1235
- const f = this.points[t[i + S]];
1287
+ const f = this.points[t[a + T]];
1236
1288
  u = f.properties;
1237
1289
  const [g, v] = f.geometry.coordinates;
1238
- c = W(g), h = K(v);
1290
+ c = K(g), h = J(v);
1239
1291
  }
1240
1292
  const p = {
1241
1293
  type: 1,
@@ -1246,46 +1298,46 @@ class Te {
1246
1298
  tags: u
1247
1299
  };
1248
1300
  let m;
1249
- d || this.options.generateId ? m = t[i + S] : m = this.points[t[i + S]].id, m !== void 0 && (p.id = m), a.features.push(p);
1301
+ d || this.options.generateId ? m = t[a + T] : m = this.points[t[a + T]].id, m !== void 0 && (p.id = m), i.features.push(p);
1250
1302
  }
1251
1303
  }
1252
1304
  _limitZoom(e) {
1253
1305
  return Math.max(this.options.minZoom, Math.min(Math.floor(+e), this.options.maxZoom + 1));
1254
1306
  }
1255
1307
  _cluster(e, t) {
1256
- const { radius: s, extent: r, reduce: o, minPoints: a } = this.options, l = s / (r * Math.pow(2, t)), i = e.data, d = [], u = this.stride;
1257
- for (let c = 0; c < i.length; c += u) {
1258
- if (i[c + A] <= t)
1308
+ const { radius: s, extent: r, reduce: o, minPoints: i } = this.options, l = s / (r * Math.pow(2, t)), a = e.data, d = [], u = this.stride;
1309
+ for (let c = 0; c < a.length; c += u) {
1310
+ if (a[c + R] <= t)
1259
1311
  continue;
1260
- i[c + A] = t;
1261
- const h = i[c], p = i[c + 1], m = e.within(i[c], i[c + 1], l), f = i[c + L];
1312
+ a[c + R] = t;
1313
+ const h = a[c], p = a[c + 1], m = e.within(a[c], a[c + 1], l), f = a[c + I];
1262
1314
  let g = f;
1263
1315
  for (const v of m) {
1264
1316
  const w = v * u;
1265
- i[w + A] > t && (g += i[w + L]);
1317
+ a[w + R] > t && (g += a[w + I]);
1266
1318
  }
1267
- if (g > f && g >= a) {
1268
- let v = h * f, w = p * f, _, E = -1;
1269
- const b = ((c / u | 0) << 5) + (t + 1) + this.points.length;
1270
- for (const x of m) {
1271
- const M = x * u;
1272
- if (i[M + A] <= t)
1319
+ if (g > f && g >= i) {
1320
+ let v = h * f, w = p * f, _, O = -1;
1321
+ const M = ((c / u | 0) << 5) + (t + 1) + this.points.length;
1322
+ for (const E of m) {
1323
+ const k = E * u;
1324
+ if (a[k + R] <= t)
1273
1325
  continue;
1274
- i[M + A] = t;
1275
- const F = i[M + L];
1276
- v += i[M] * F, w += i[M + 1] * F, i[M + oe] = b, o && (_ || (_ = this._map(i, c, !0), E = this.clusterProps.length, this.clusterProps.push(_)), o(_, this._map(i, M)));
1326
+ a[k + R] = t;
1327
+ const L = a[k + I];
1328
+ v += a[k] * L, w += a[k + 1] * L, a[k + oe] = M, o && (_ || (_ = this._map(a, c, !0), O = this.clusterProps.length, this.clusterProps.push(_)), o(_, this._map(a, k)));
1277
1329
  }
1278
- i[c + oe] = b, d.push(v / g, w / g, 1 / 0, b, -1, g), o && d.push(E);
1330
+ a[c + oe] = M, d.push(v / g, w / g, 1 / 0, M, -1, g), o && d.push(O);
1279
1331
  } else {
1280
1332
  for (let v = 0; v < u; v++)
1281
- d.push(i[c + v]);
1333
+ d.push(a[c + v]);
1282
1334
  if (g > 1)
1283
1335
  for (const v of m) {
1284
1336
  const w = v * u;
1285
- if (!(i[w + A] <= t)) {
1286
- i[w + A] = t;
1337
+ if (!(a[w + R] <= t)) {
1338
+ a[w + R] = t;
1287
1339
  for (let _ = 0; _ < u; _++)
1288
- d.push(i[w + _]);
1340
+ d.push(a[w + _]);
1289
1341
  }
1290
1342
  }
1291
1343
  }
@@ -1301,45 +1353,45 @@ class Te {
1301
1353
  return (e - this.points.length) % 32;
1302
1354
  }
1303
1355
  _map(e, t, s) {
1304
- if (e[t + L] > 1) {
1305
- const a = this.clusterProps[e[t + Ae]];
1306
- return s ? Object.assign({}, a) : a;
1356
+ if (e[t + I] > 1) {
1357
+ const i = this.clusterProps[e[t + Te]];
1358
+ return s ? Object.assign({}, i) : i;
1307
1359
  }
1308
- const r = this.points[e[t + S]].properties, o = this.options.map(r);
1360
+ const r = this.points[e[t + T]].properties, o = this.options.map(r);
1309
1361
  return s && o === r ? Object.assign({}, o) : o;
1310
1362
  }
1311
1363
  }
1312
- function ke(n, e, t) {
1364
+ function Me(n, e, t) {
1313
1365
  return {
1314
1366
  type: "Feature",
1315
- id: n[e + S],
1316
- properties: $e(n, e, t),
1367
+ id: n[e + T],
1368
+ properties: Re(n, e, t),
1317
1369
  geometry: {
1318
1370
  type: "Point",
1319
- coordinates: [nt(n[e]), ot(n[e + 1])]
1371
+ coordinates: [ot(n[e]), it(n[e + 1])]
1320
1372
  }
1321
1373
  };
1322
1374
  }
1323
- function $e(n, e, t) {
1324
- const s = n[e + L], r = s >= 1e4 ? `${Math.round(s / 1e3)}k` : s >= 1e3 ? `${Math.round(s / 100) / 10}k` : s, o = n[e + Ae], a = o === -1 ? {} : Object.assign({}, t[o]);
1325
- return Object.assign(a, {
1375
+ function Re(n, e, t) {
1376
+ const s = n[e + I], r = s >= 1e4 ? `${Math.round(s / 1e3)}k` : s >= 1e3 ? `${Math.round(s / 100) / 10}k` : s, o = n[e + Te], i = o === -1 ? {} : Object.assign({}, t[o]);
1377
+ return Object.assign(i, {
1326
1378
  cluster: !0,
1327
- cluster_id: n[e + S],
1379
+ cluster_id: n[e + T],
1328
1380
  point_count: s,
1329
1381
  point_count_abbreviated: r
1330
1382
  });
1331
1383
  }
1332
- function W(n) {
1384
+ function K(n) {
1333
1385
  return n / 360 + 0.5;
1334
1386
  }
1335
- function K(n) {
1387
+ function J(n) {
1336
1388
  const e = Math.sin(n * Math.PI / 180), t = 0.5 - 0.25 * Math.log((1 + e) / (1 - e)) / Math.PI;
1337
1389
  return t < 0 ? 0 : t > 1 ? 1 : t;
1338
1390
  }
1339
- function nt(n) {
1391
+ function ot(n) {
1340
1392
  return (n - 0.5) * 360;
1341
1393
  }
1342
- function ot(n) {
1394
+ function it(n) {
1343
1395
  const e = (180 - n * 360) * Math.PI / 180;
1344
1396
  return 360 * Math.atan(Math.exp(e)) / Math.PI - 90;
1345
1397
  }
@@ -1357,7 +1409,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1357
1409
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1358
1410
  PERFORMANCE OF THIS SOFTWARE.
1359
1411
  ***************************************************************************** */
1360
- function ce(n, e) {
1412
+ function de(n, e) {
1361
1413
  var t = {};
1362
1414
  for (var s in n)
1363
1415
  Object.prototype.hasOwnProperty.call(n, s) && e.indexOf(s) < 0 && (t[s] = n[s]);
@@ -1366,7 +1418,7 @@ function ce(n, e) {
1366
1418
  e.indexOf(s[r]) < 0 && Object.prototype.propertyIsEnumerable.call(n, s[r]) && (t[s[r]] = n[s[r]]);
1367
1419
  return t;
1368
1420
  }
1369
- class k {
1421
+ class C {
1370
1422
  static isAdvancedMarkerAvailable(e) {
1371
1423
  return google.maps.marker && e.getMapCapabilities().isAdvancedMarkersAvailable === !0;
1372
1424
  }
@@ -1392,7 +1444,7 @@ class k {
1392
1444
  return this.isAdvancedMarker(e) ? !0 : e.getVisible();
1393
1445
  }
1394
1446
  }
1395
- class H {
1447
+ class W {
1396
1448
  constructor({ markers: e, position: t }) {
1397
1449
  this.markers = e, t && (t instanceof google.maps.LatLng ? this._position = t : this._position = new google.maps.LatLng(t));
1398
1450
  }
@@ -1401,7 +1453,7 @@ class H {
1401
1453
  return;
1402
1454
  const e = new google.maps.LatLngBounds(this._position, this._position);
1403
1455
  for (const t of this.markers)
1404
- e.extend(k.getPosition(t));
1456
+ e.extend(C.getPosition(t));
1405
1457
  return e;
1406
1458
  }
1407
1459
  get position() {
@@ -1411,7 +1463,7 @@ class H {
1411
1463
  * Get the count of **visible** markers.
1412
1464
  */
1413
1465
  get count() {
1414
- return this.markers.filter((e) => k.getVisible(e)).length;
1466
+ return this.markers.filter((e) => C.getVisible(e)).length;
1415
1467
  }
1416
1468
  /**
1417
1469
  * Add a marker to the cluster.
@@ -1423,26 +1475,26 @@ class H {
1423
1475
  * Cleanup references and remove marker from map.
1424
1476
  */
1425
1477
  delete() {
1426
- this.marker && (k.setMap(this.marker, null), this.marker = void 0), this.markers.length = 0;
1478
+ this.marker && (C.setMap(this.marker, null), this.marker = void 0), this.markers.length = 0;
1427
1479
  }
1428
1480
  }
1429
- const it = (n, e, t, s) => {
1430
- const r = Re(n.getBounds(), e, s);
1431
- return t.filter((o) => r.contains(k.getPosition(o)));
1432
- }, Re = (n, e, t) => {
1433
- const { northEast: s, southWest: r } = at(n, e), o = lt({ northEast: s, southWest: r }, t);
1434
- return ct(o, e);
1435
- }, Ce = (n, e, t) => {
1436
- const s = Re(n, e, t), r = s.getNorthEast(), o = s.getSouthWest();
1481
+ const at = (n, e, t, s) => {
1482
+ const r = je(n.getBounds(), e, s);
1483
+ return t.filter((o) => r.contains(C.getPosition(o)));
1484
+ }, je = (n, e, t) => {
1485
+ const { northEast: s, southWest: r } = lt(n, e), o = ct({ northEast: s, southWest: r }, t);
1486
+ return ut(o, e);
1487
+ }, Oe = (n, e, t) => {
1488
+ const s = je(n, e, t), r = s.getNorthEast(), o = s.getSouthWest();
1437
1489
  return [o.lng(), o.lat(), r.lng(), r.lat()];
1438
- }, at = (n, e) => ({
1490
+ }, lt = (n, e) => ({
1439
1491
  northEast: e.fromLatLngToDivPixel(n.getNorthEast()),
1440
1492
  southWest: e.fromLatLngToDivPixel(n.getSouthWest())
1441
- }), lt = ({ northEast: n, southWest: e }, t) => (n.x += t, n.y -= t, e.x -= t, e.y += t, { northEast: n, southWest: e }), ct = ({ northEast: n, southWest: e }, t) => {
1493
+ }), ct = ({ northEast: n, southWest: e }, t) => (n.x += t, n.y -= t, e.x -= t, e.y += t, { northEast: n, southWest: e }), ut = ({ northEast: n, southWest: e }, t) => {
1442
1494
  const s = t.fromDivPixelToLatLng(e), r = t.fromDivPixelToLatLng(n);
1443
1495
  return new google.maps.LatLngBounds(s, r);
1444
1496
  };
1445
- class je {
1497
+ class qe {
1446
1498
  constructor({ maxZoom: e = 16 }) {
1447
1499
  this.maxZoom = e;
1448
1500
  }
@@ -1459,12 +1511,12 @@ class je {
1459
1511
  * ```
1460
1512
  */
1461
1513
  noop({ markers: e }) {
1462
- return dt(e);
1514
+ return ht(e);
1463
1515
  }
1464
1516
  }
1465
- class ut extends je {
1517
+ class dt extends qe {
1466
1518
  constructor(e) {
1467
- var { viewportPadding: t = 60 } = e, s = ce(e, ["viewportPadding"]);
1519
+ var { viewportPadding: t = 60 } = e, s = de(e, ["viewportPadding"]);
1468
1520
  super(s), this.viewportPadding = 60, this.viewportPadding = t;
1469
1521
  }
1470
1522
  calculate({ markers: e, map: t, mapCanvasProjection: s }) {
@@ -1475,78 +1527,78 @@ class ut extends je {
1475
1527
  changed: !1
1476
1528
  } : {
1477
1529
  clusters: this.cluster({
1478
- markers: it(t, s, e, this.viewportPadding),
1530
+ markers: at(t, s, e, this.viewportPadding),
1479
1531
  map: t,
1480
1532
  mapCanvasProjection: s
1481
1533
  })
1482
1534
  };
1483
1535
  }
1484
1536
  }
1485
- const dt = (n) => n.map((t) => new H({
1486
- position: k.getPosition(t),
1537
+ const ht = (n) => n.map((t) => new W({
1538
+ position: C.getPosition(t),
1487
1539
  markers: [t]
1488
1540
  }));
1489
- class ht extends je {
1541
+ class pt extends qe {
1490
1542
  constructor(e) {
1491
- var { maxZoom: t, radius: s = 60 } = e, r = ce(e, ["maxZoom", "radius"]);
1492
- super({ maxZoom: t }), this.state = { zoom: -1 }, this.superCluster = new Te(Object.assign({ maxZoom: this.maxZoom, radius: s }, r));
1543
+ var { maxZoom: t, radius: s = 60 } = e, r = de(e, ["maxZoom", "radius"]);
1544
+ super({ maxZoom: t }), this.state = { zoom: -1 }, this.superCluster = new $e(Object.assign({ maxZoom: this.maxZoom, radius: s }, r));
1493
1545
  }
1494
1546
  calculate(e) {
1495
1547
  let t = !1;
1496
1548
  const s = { zoom: e.map.getZoom() };
1497
- if (!$(e.markers, this.markers)) {
1549
+ if (!A(e.markers, this.markers)) {
1498
1550
  t = !0, this.markers = [...e.markers];
1499
1551
  const r = this.markers.map((o) => {
1500
- const a = k.getPosition(o);
1552
+ const i = C.getPosition(o);
1501
1553
  return {
1502
1554
  type: "Feature",
1503
1555
  geometry: {
1504
1556
  type: "Point",
1505
- coordinates: [a.lng(), a.lat()]
1557
+ coordinates: [i.lng(), i.lat()]
1506
1558
  },
1507
1559
  properties: { marker: o }
1508
1560
  };
1509
1561
  });
1510
1562
  this.superCluster.load(r);
1511
1563
  }
1512
- return t || (this.state.zoom <= this.maxZoom || s.zoom <= this.maxZoom) && (t = !$(this.state, s)), this.state = s, t && (this.clusters = this.cluster(e)), { clusters: this.clusters, changed: t };
1564
+ return t || (this.state.zoom <= this.maxZoom || s.zoom <= this.maxZoom) && (t = !A(this.state, s)), this.state = s, t && (this.clusters = this.cluster(e)), { clusters: this.clusters, changed: t };
1513
1565
  }
1514
1566
  cluster({ map: e }) {
1515
1567
  return this.superCluster.getClusters([-180, -90, 180, 90], Math.round(e.getZoom())).map((t) => this.transformCluster(t));
1516
1568
  }
1517
1569
  transformCluster({ geometry: { coordinates: [e, t] }, properties: s }) {
1518
1570
  if (s.cluster)
1519
- return new H({
1571
+ return new W({
1520
1572
  markers: this.superCluster.getLeaves(s.cluster_id, 1 / 0).map((o) => o.properties.marker),
1521
1573
  position: { lat: t, lng: e }
1522
1574
  });
1523
1575
  const r = s.marker;
1524
- return new H({
1576
+ return new W({
1525
1577
  markers: [r],
1526
- position: k.getPosition(r)
1578
+ position: C.getPosition(r)
1527
1579
  });
1528
1580
  }
1529
1581
  }
1530
- class pt extends ut {
1582
+ class ft extends dt {
1531
1583
  constructor(e) {
1532
- var { maxZoom: t, radius: s = 60, viewportPadding: r = 60 } = e, o = ce(e, ["maxZoom", "radius", "viewportPadding"]);
1533
- super({ maxZoom: t, viewportPadding: r }), this.superCluster = new Te(Object.assign({ maxZoom: this.maxZoom, radius: s }, o)), this.state = { zoom: -1, view: [0, 0, 0, 0] };
1584
+ var { maxZoom: t, radius: s = 60, viewportPadding: r = 60 } = e, o = de(e, ["maxZoom", "radius", "viewportPadding"]);
1585
+ super({ maxZoom: t, viewportPadding: r }), this.superCluster = new $e(Object.assign({ maxZoom: this.maxZoom, radius: s }, o)), this.state = { zoom: -1, view: [0, 0, 0, 0] };
1534
1586
  }
1535
1587
  calculate(e) {
1536
1588
  const t = {
1537
1589
  zoom: Math.round(e.map.getZoom()),
1538
- view: Ce(e.map.getBounds(), e.mapCanvasProjection, this.viewportPadding)
1590
+ view: Oe(e.map.getBounds(), e.mapCanvasProjection, this.viewportPadding)
1539
1591
  };
1540
- let s = !$(this.state, t);
1541
- if (!$(e.markers, this.markers)) {
1592
+ let s = !A(this.state, t);
1593
+ if (!A(e.markers, this.markers)) {
1542
1594
  s = !0, this.markers = [...e.markers];
1543
1595
  const r = this.markers.map((o) => {
1544
- const a = k.getPosition(o);
1596
+ const i = C.getPosition(o);
1545
1597
  return {
1546
1598
  type: "Feature",
1547
1599
  geometry: {
1548
1600
  type: "Point",
1549
- coordinates: [a.lng(), a.lat()]
1601
+ coordinates: [i.lng(), i.lat()]
1550
1602
  },
1551
1603
  properties: { marker: o }
1552
1604
  };
@@ -1558,27 +1610,27 @@ class pt extends ut {
1558
1610
  cluster({ map: e, mapCanvasProjection: t }) {
1559
1611
  const s = {
1560
1612
  zoom: Math.round(e.getZoom()),
1561
- view: Ce(e.getBounds(), t, this.viewportPadding)
1613
+ view: Oe(e.getBounds(), t, this.viewportPadding)
1562
1614
  };
1563
1615
  return this.superCluster.getClusters(s.view, s.zoom).map((r) => this.transformCluster(r));
1564
1616
  }
1565
1617
  transformCluster({ geometry: { coordinates: [e, t] }, properties: s }) {
1566
1618
  if (s.cluster)
1567
- return new H({
1619
+ return new W({
1568
1620
  markers: this.superCluster.getLeaves(s.cluster_id, 1 / 0).map((o) => o.properties.marker),
1569
1621
  position: { lat: t, lng: e }
1570
1622
  });
1571
1623
  const r = s.marker;
1572
- return new H({
1624
+ return new W({
1573
1625
  markers: [r],
1574
- position: k.getPosition(r)
1626
+ position: C.getPosition(r)
1575
1627
  });
1576
1628
  }
1577
1629
  }
1578
- class ft {
1630
+ class mt {
1579
1631
  constructor(e, t) {
1580
1632
  this.markers = { sum: e.length };
1581
- const s = t.map((o) => o.count), r = s.reduce((o, a) => o + a, 0);
1633
+ const s = t.map((o) => o.count), r = s.reduce((o, i) => o + i, 0);
1582
1634
  this.clusters = {
1583
1635
  count: t.length,
1584
1636
  markers: {
@@ -1590,7 +1642,7 @@ class ft {
1590
1642
  };
1591
1643
  }
1592
1644
  }
1593
- class mt {
1645
+ class gt {
1594
1646
  /**
1595
1647
  * The default render function for the library used by {@link MarkerClusterer}.
1596
1648
  *
@@ -1630,21 +1682,21 @@ class mt {
1630
1682
  * ```
1631
1683
  */
1632
1684
  render({ count: e, position: t }, s, r) {
1633
- const a = `<svg fill="${e > Math.max(10, s.clusters.markers.mean) ? "#ff0000" : "#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
1685
+ const i = `<svg fill="${e > Math.max(10, s.clusters.markers.mean) ? "#ff0000" : "#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
1634
1686
  <circle cx="120" cy="120" opacity=".6" r="70" />
1635
1687
  <circle cx="120" cy="120" opacity=".3" r="90" />
1636
1688
  <circle cx="120" cy="120" opacity=".2" r="110" />
1637
1689
  <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>
1638
- </svg>`, l = `Cluster of ${e} markers`, i = Number(google.maps.Marker.MAX_ZINDEX) + e;
1639
- if (k.isAdvancedMarkerAvailable(r)) {
1690
+ </svg>`, l = `Cluster of ${e} markers`, a = Number(google.maps.Marker.MAX_ZINDEX) + e;
1691
+ if (C.isAdvancedMarkerAvailable(r)) {
1640
1692
  const u = document.createElement("div");
1641
- u.innerHTML = a;
1693
+ u.innerHTML = i;
1642
1694
  const c = u.firstElementChild;
1643
1695
  c.setAttribute("transform", "translate(0 25)");
1644
1696
  const h = {
1645
1697
  map: r,
1646
1698
  position: t,
1647
- zIndex: i,
1699
+ zIndex: a,
1648
1700
  title: l,
1649
1701
  content: c
1650
1702
  };
@@ -1652,35 +1704,35 @@ class mt {
1652
1704
  }
1653
1705
  const d = {
1654
1706
  position: t,
1655
- zIndex: i,
1707
+ zIndex: a,
1656
1708
  title: l,
1657
1709
  icon: {
1658
- url: `data:image/svg+xml;base64,${btoa(a)}`,
1710
+ url: `data:image/svg+xml;base64,${btoa(i)}`,
1659
1711
  anchor: new google.maps.Point(25, 25)
1660
1712
  }
1661
1713
  };
1662
1714
  return new google.maps.Marker(d);
1663
1715
  }
1664
1716
  }
1665
- function gt(n, e) {
1717
+ function vt(n, e) {
1666
1718
  for (let t in e.prototype)
1667
1719
  n.prototype[t] = e.prototype[t];
1668
1720
  }
1669
- class ue {
1721
+ class he {
1670
1722
  constructor() {
1671
- gt(ue, google.maps.OverlayView);
1723
+ vt(he, google.maps.OverlayView);
1672
1724
  }
1673
1725
  }
1674
- var j;
1726
+ var D;
1675
1727
  (function(n) {
1676
1728
  n.CLUSTERING_BEGIN = "clusteringbegin", n.CLUSTERING_END = "clusteringend", n.CLUSTER_CLICK = "click";
1677
- })(j || (j = {}));
1678
- const vt = (n, e, t) => {
1729
+ })(D || (D = {}));
1730
+ const yt = (n, e, t) => {
1679
1731
  t.fitBounds(e.bounds);
1680
1732
  };
1681
- class yt extends ue {
1682
- constructor({ map: e, markers: t = [], algorithmOptions: s = {}, algorithm: r = new ht(s), renderer: o = new mt(), onClusterClick: a = vt }) {
1683
- super(), this.markers = [...t], this.clusters = [], this.algorithm = r, this.renderer = o, this.onClusterClick = a, e && this.setMap(e);
1733
+ class wt extends he {
1734
+ constructor({ map: e, markers: t = [], algorithmOptions: s = {}, algorithm: r = new pt(s), renderer: o = new gt(), onClusterClick: i = yt }) {
1735
+ super(), this.markers = [...t], this.clusters = [], this.algorithm = r, this.renderer = o, this.onClusterClick = i, e && this.setMap(e);
1684
1736
  }
1685
1737
  addMarker(e, t) {
1686
1738
  this.markers.includes(e) || (this.markers.push(e), t || this.render());
@@ -1692,7 +1744,7 @@ class yt extends ue {
1692
1744
  }
1693
1745
  removeMarker(e, t) {
1694
1746
  const s = this.markers.indexOf(e);
1695
- return s === -1 ? !1 : (k.setMap(e, null), this.markers.splice(s, 1), t || this.render(), !0);
1747
+ return s === -1 ? !1 : (C.setMap(e, null), this.markers.splice(s, 1), t || this.render(), !0);
1696
1748
  }
1697
1749
  removeMarkers(e, t) {
1698
1750
  let s = !1;
@@ -1709,7 +1761,7 @@ class yt extends ue {
1709
1761
  render() {
1710
1762
  const e = this.getMap();
1711
1763
  if (e instanceof google.maps.Map && e.getProjection()) {
1712
- google.maps.event.trigger(this, j.CLUSTERING_BEGIN, this);
1764
+ google.maps.event.trigger(this, D.CLUSTERING_BEGIN, this);
1713
1765
  const { clusters: t, changed: s } = this.algorithm.calculate({
1714
1766
  markers: this.markers,
1715
1767
  map: e,
@@ -1717,14 +1769,14 @@ class yt extends ue {
1717
1769
  });
1718
1770
  if (s || s == null) {
1719
1771
  const r = /* @__PURE__ */ new Set();
1720
- for (const a of t)
1721
- a.markers.length == 1 && r.add(a.markers[0]);
1772
+ for (const i of t)
1773
+ i.markers.length == 1 && r.add(i.markers[0]);
1722
1774
  const o = [];
1723
- for (const a of this.clusters)
1724
- a.marker != null && (a.markers.length == 1 ? r.has(a.marker) || k.setMap(a.marker, null) : o.push(a.marker));
1725
- this.clusters = t, this.renderClusters(), requestAnimationFrame(() => o.forEach((a) => k.setMap(a, null)));
1775
+ for (const i of this.clusters)
1776
+ i.marker != null && (i.markers.length == 1 ? r.has(i.marker) || C.setMap(i.marker, null) : o.push(i.marker));
1777
+ this.clusters = t, this.renderClusters(), requestAnimationFrame(() => o.forEach((i) => C.setMap(i, null)));
1726
1778
  }
1727
- google.maps.event.trigger(this, j.CLUSTERING_END, this);
1779
+ google.maps.event.trigger(this, D.CLUSTERING_END, this);
1728
1780
  }
1729
1781
  }
1730
1782
  onAdd() {
@@ -1734,22 +1786,22 @@ class yt extends ue {
1734
1786
  google.maps.event.removeListener(this.idleListener), this.reset();
1735
1787
  }
1736
1788
  reset() {
1737
- this.markers.forEach((e) => k.setMap(e, null)), this.clusters.forEach((e) => e.delete()), this.clusters = [];
1789
+ this.markers.forEach((e) => C.setMap(e, null)), this.clusters.forEach((e) => e.delete()), this.clusters = [];
1738
1790
  }
1739
1791
  renderClusters() {
1740
- const e = new ft(this.markers, this.clusters), t = this.getMap();
1792
+ const e = new mt(this.markers, this.clusters), t = this.getMap();
1741
1793
  this.clusters.forEach((s) => {
1742
- s.markers.length === 1 ? s.marker = s.markers[0] : (s.marker = this.renderer.render(s, e, t), s.markers.forEach((r) => k.setMap(r, null)), this.onClusterClick && s.marker.addListener(
1794
+ s.markers.length === 1 ? s.marker = s.markers[0] : (s.marker = this.renderer.render(s, e, t), s.markers.forEach((r) => C.setMap(r, null)), this.onClusterClick && s.marker.addListener(
1743
1795
  "click",
1744
1796
  /* istanbul ignore next */
1745
1797
  (r) => {
1746
- google.maps.event.trigger(this, j.CLUSTER_CLICK, s), this.onClusterClick(r, s, t);
1798
+ google.maps.event.trigger(this, D.CLUSTER_CLICK, s), this.onClusterClick(r, s, t);
1747
1799
  }
1748
- )), k.setMap(s.marker, t);
1800
+ )), C.setMap(s.marker, t);
1749
1801
  });
1750
1802
  }
1751
1803
  }
1752
- const be = Object.values(j), Tt = P({
1804
+ const Ee = Object.values(D), Rt = P({
1753
1805
  name: "MarkerCluster",
1754
1806
  props: {
1755
1807
  options: {
@@ -1757,37 +1809,37 @@ const be = Object.values(j), Tt = P({
1757
1809
  default: () => ({})
1758
1810
  }
1759
1811
  },
1760
- emits: be,
1812
+ emits: Ee,
1761
1813
  setup(n, { emit: e, expose: t, slots: s }) {
1762
- const r = y(), o = C(N, y()), a = C(U, y());
1763
- return G(Le, r), O(
1814
+ const r = y(), o = b(B, y()), i = b(Z, y());
1815
+ return U(ce, r), x(
1764
1816
  o,
1765
1817
  () => {
1766
- o.value && (r.value = I(
1767
- new yt({
1818
+ o.value && (r.value = S(
1819
+ new wt({
1768
1820
  map: o.value,
1769
1821
  // Better perf than the default `SuperClusterAlgorithm`. See:
1770
1822
  // https://github.com/googlemaps/js-markerclusterer/pull/640
1771
- algorithm: new pt(n.options.algorithmOptions ?? {}),
1823
+ algorithm: new ft(n.options.algorithmOptions ?? {}),
1772
1824
  ...n.options
1773
1825
  })
1774
- ), be.forEach((l) => {
1775
- var i;
1776
- (i = r.value) == null || i.addListener(l, (d) => e(l, d));
1826
+ ), Ee.forEach((l) => {
1827
+ var a;
1828
+ (a = r.value) == null || a.addListener(l, (d) => e(l, d));
1777
1829
  }));
1778
1830
  },
1779
1831
  {
1780
1832
  immediate: !0
1781
1833
  }
1782
- ), B(() => {
1834
+ ), q(() => {
1783
1835
  var l;
1784
- r.value && ((l = a.value) == null || l.event.clearInstanceListeners(r.value), r.value.clearMarkers(), r.value.setMap(null));
1836
+ r.value && ((l = i.value) == null || l.event.clearInstanceListeners(r.value), r.value.clearMarkers(), r.value.setMap(null));
1785
1837
  }), t({ markerCluster: r }), () => {
1786
1838
  var l;
1787
1839
  return (l = s.default) == null ? void 0 : l.call(s);
1788
1840
  };
1789
1841
  }
1790
- }), wt = P({
1842
+ }), _t = P({
1791
1843
  inheritAttrs: !1,
1792
1844
  props: {
1793
1845
  options: {
@@ -1796,33 +1848,33 @@ const be = Object.values(j), Tt = P({
1796
1848
  }
1797
1849
  },
1798
1850
  setup(n, { slots: e, emit: t, expose: s }) {
1799
- const r = y(), o = J(() => {
1800
- var i;
1801
- return (i = e.default) == null ? void 0 : i.call(e).some((d) => d.type !== Ee);
1802
- }), a = J(() => ({
1851
+ const r = y(), o = H(() => {
1852
+ var a;
1853
+ return (a = e.default) == null ? void 0 : a.call(e).some((d) => d.type !== xe);
1854
+ }), i = H(() => ({
1803
1855
  ...n.options,
1804
1856
  element: r.value
1805
- })), l = D(ee, [], a, t);
1857
+ })), l = V(ee, [], i, t);
1806
1858
  return s({
1807
1859
  customMarker: l
1808
1860
  }), { customMarkerRef: r, customMarker: l, hasSlotContent: o };
1809
1861
  }
1810
1862
  });
1811
- const _t = {
1863
+ const kt = {
1812
1864
  key: 0,
1813
1865
  class: "custom-marker-wrapper"
1814
1866
  };
1815
- function kt(n, e, t, s, r, o) {
1816
- return n.hasSlotContent ? (Y(), X("div", _t, [
1817
- ae("div", Pe({
1867
+ function Ct(n, e, t, s, r, o) {
1868
+ return n.hasSlotContent ? (Y(), X("div", kt, [
1869
+ ae("div", Le({
1818
1870
  ref: "customMarkerRef",
1819
1871
  style: { cursor: n.$attrs.onClick ? "pointer" : void 0 }
1820
1872
  }, n.$attrs), [
1821
1873
  Q(n.$slots, "default", {}, void 0, !0)
1822
1874
  ], 16)
1823
- ])) : Oe("", !0);
1875
+ ])) : Se("", !0);
1824
1876
  }
1825
- const $t = /* @__PURE__ */ te(wt, [["render", kt], ["__scopeId", "data-v-2d2d343a"]]), Rt = P({
1877
+ const jt = /* @__PURE__ */ te(_t, [["render", Ct], ["__scopeId", "data-v-2d2d343a"]]), qt = P({
1826
1878
  name: "HeatmapLayer",
1827
1879
  props: {
1828
1880
  options: {
@@ -1831,19 +1883,19 @@ const $t = /* @__PURE__ */ te(wt, [["render", kt], ["__scopeId", "data-v-2d2d343
1831
1883
  }
1832
1884
  },
1833
1885
  setup(n) {
1834
- const e = y(), t = C(N, y()), s = C(U, y());
1835
- return O(
1886
+ const e = y(), t = b(B, y()), s = b(Z, y());
1887
+ return x(
1836
1888
  [t, () => n.options],
1837
- ([r, o], [a, l]) => {
1889
+ ([r, o], [i, l]) => {
1838
1890
  var d;
1839
- const i = !$(o, l) || t.value !== a;
1840
- if (t.value && s.value && i) {
1891
+ const a = !A(o, l) || t.value !== i;
1892
+ if (t.value && s.value && a) {
1841
1893
  const u = structuredClone(o);
1842
1894
  if (u.data && !(u.data instanceof s.value.MVCArray)) {
1843
1895
  const c = s.value.LatLng;
1844
1896
  u.data = (d = u.data) == null ? void 0 : d.map((h) => h instanceof c || "location" in h && (h.location instanceof c || h.location === null) ? h : "location" in h ? { ...h, location: new c(h.location) } : new c(h));
1845
1897
  }
1846
- e.value ? e.value.setOptions(u) : e.value = I(
1898
+ e.value ? e.value.setOptions(u) : e.value = S(
1847
1899
  new s.value.visualization.HeatmapLayer({
1848
1900
  ...u,
1849
1901
  map: t.value
@@ -1852,22 +1904,23 @@ const $t = /* @__PURE__ */ te(wt, [["render", kt], ["__scopeId", "data-v-2d2d343
1852
1904
  }
1853
1905
  },
1854
1906
  { immediate: !0 }
1855
- ), B(() => {
1907
+ ), q(() => {
1856
1908
  e.value && e.value.setMap(null);
1857
1909
  }), { heatmapLayer: e };
1858
1910
  },
1859
1911
  render: () => null
1860
1912
  });
1861
1913
  export {
1862
- St as Circle,
1863
- It as CustomControl,
1864
- $t as CustomMarker,
1914
+ Pt as AdvancedMarker,
1915
+ It as Circle,
1916
+ Tt as CustomControl,
1917
+ jt as CustomMarker,
1865
1918
  Et as GoogleMap,
1866
- Rt as HeatmapLayer,
1867
- At as InfoWindow,
1868
- Pt as Marker,
1869
- Tt as MarkerCluster,
1870
- xt as Polygon,
1871
- Ot as Polyline,
1872
- Lt as Rectangle
1919
+ qt as HeatmapLayer,
1920
+ $t as InfoWindow,
1921
+ xt as Marker,
1922
+ Rt as MarkerCluster,
1923
+ St as Polygon,
1924
+ Lt as Polyline,
1925
+ At as Rectangle
1873
1926
  };