vue3-google-map 0.24.0 → 0.25.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/dist/index.mjs CHANGED
@@ -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-289550ca]{width:100%;height:100%}.advanced-marker-wrapper{display:none}.mapdiv .advanced-marker-wrapper{display:inline-block}.custom-control-wrapper[data-v-ab9120cd]{display:none}.mapdiv .custom-control-wrapper[data-v-ab9120cd]{display:inline-block}.info-window-wrapper[data-v-f0c09f6e]{display:none}.mapdiv .info-window-wrapper[data-v-f0c09f6e]{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 it = Object.defineProperty;
3
- var at = (n, e, t) => e in n ? it(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
4
- var pe = (n, e, t) => (at(n, typeof e != "symbol" ? e + "" : e, t), t);
5
- import { defineComponent as P, ref as w, provide as G, watch as q, onMounted as Ye, onBeforeUnmount as B, markRaw as S, toRef as j, openBlock as V, createElementBlock as z, createElementVNode as le, renderSlot as W, normalizeProps as lt, guardReactiveProps as ut, computed as K, Comment as ye, inject as k, Fragment as ct, mergeProps as we, createCommentVNode as Ee } from "vue";
6
- const D = Symbol("map"), Z = Symbol("api"), _e = Symbol("marker"), ke = Symbol("markerCluster"), ue = Symbol("CustomMarker"), Xe = Symbol("mapTilesLoaded"), H = [
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-c63ff230]{width:100%;height:100%}.advanced-marker-wrapper{display:none}.mapdiv .advanced-marker-wrapper{display:inline-block}.custom-control-wrapper[data-v-ab9120cd]{display:none}.mapdiv .custom-control-wrapper[data-v-ab9120cd]{display:inline-block}.info-window-wrapper[data-v-135889a7]{display:none}.mapdiv .info-window-wrapper[data-v-135889a7]{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 nt = Object.defineProperty;
3
+ var st = (r, e, t) => e in r ? nt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
4
+ var pe = (r, e, t) => (st(r, typeof e != "symbol" ? e + "" : e, t), t);
5
+ import { defineComponent as O, ref as y, provide as U, watch as M, onMounted as He, onBeforeUnmount as $, markRaw as S, toRef as R, openBlock as G, createElementBlock as V, createElementVNode as ie, renderSlot as F, normalizeProps as ot, guardReactiveProps as at, computed as z, Comment as ve, inject as k, Fragment as it, mergeProps as ye, createCommentVNode as _e } from "vue";
6
+ const B = Symbol("map"), D = Symbol("api"), Ee = Symbol("marker"), we = Symbol("markerCluster"), le = Symbol("CustomMarker"), Ke = Symbol("mapTilesLoaded"), W = [
7
7
  "click",
8
8
  "dblclick",
9
9
  "drag",
@@ -16,272 +16,72 @@ const D = Symbol("map"), Z = Symbol("api"), _e = Symbol("marker"), ke = Symbol("
16
16
  "mouseup",
17
17
  "rightclick"
18
18
  ];
19
- function dt(n, e, t, r) {
20
- function s(o) {
21
- return o instanceof t ? o : new t(function(i) {
22
- i(o);
23
- });
19
+ function lt(r, e) {
20
+ r.src = e;
21
+ }
22
+ const ut = (r) => {
23
+ var e, t, n, s = "The Google Maps JavaScript API", o = "google", i = "importLibrary", l = "__ib__", a = document, c = window, d = c[o] || (c[o] = {}), u = d.maps || (d.maps = {}), f = /* @__PURE__ */ new Set(), m = new URLSearchParams(), h = () => e || (e = new Promise(async (p, g) => {
24
+ var v;
25
+ await (t = a.createElement("script")), m.set("libraries", [...f] + "");
26
+ for (n in r)
27
+ m.set(n.replace(/[A-Z]/g, (_) => "_" + _[0].toLowerCase()), r[n]);
28
+ m.set("callback", o + ".maps." + l), lt(t, "https://maps.googleapis.com/maps/api/js?" + m), u[l] = p, t.onerror = () => e = g(Error(s + " could not load.")), t.nonce = ((v = a.querySelector("script[nonce]")) == null ? void 0 : v.nonce) || "", a.head.append(t);
29
+ }));
30
+ u[i] ? console.warn(s + " only loads once. Ignoring:", r) : u[i] = (p, ...g) => f.add(p) && h().then(() => u[i](p, ...g));
31
+ }, ct = (r) => `The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(r)}) will be ignored.`, pt = (r) => `The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(r)}) will be ignored.`, dt = "No options were set before calling importLibrary. Make sure to configure the loader using setOptions().", ft = "There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.", ke = process.env.NODE_ENV !== "production" ? (r) => {
32
+ console.warn(`[@googlemaps/js-api-loader] ${r}`);
33
+ } : () => {
34
+ }, ht = process.env.NODE_ENV !== "production" ? (r) => {
35
+ console.info(`[@googlemaps/js-api-loader] ${r}`);
36
+ } : () => {
37
+ };
38
+ let me = !1;
39
+ function mt(r) {
40
+ if (me) {
41
+ ke(ct(r));
42
+ return;
24
43
  }
25
- return new (t || (t = Promise))(function(o, i) {
26
- function l(d) {
27
- try {
28
- c(r.next(d));
29
- } catch (u) {
30
- i(u);
31
- }
32
- }
33
- function a(d) {
34
- try {
35
- c(r.throw(d));
36
- } catch (u) {
37
- i(u);
38
- }
39
- }
40
- function c(d) {
41
- d.done ? o(d.value) : s(d.value).then(l, a);
42
- }
43
- c((r = r.apply(n, e || [])).next());
44
- });
44
+ vt(r), me = !0;
45
45
  }
46
- function pt(n) {
47
- return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
46
+ async function gt(r) {
47
+ var e, t;
48
+ if (me || ke(dt), !((t = (e = window == null ? void 0 : window.google) == null ? void 0 : e.maps) != null && t.importLibrary))
49
+ throw new Error("google.maps.importLibrary is not installed.");
50
+ return await google.maps.importLibrary(r);
48
51
  }
49
- var fe, Pe;
50
- function ft() {
51
- return Pe || (Pe = 1, fe = function n(e, t) {
52
- if (e === t)
53
- return !0;
54
- if (e && t && typeof e == "object" && typeof t == "object") {
55
- if (e.constructor !== t.constructor)
56
- return !1;
57
- var r, s, o;
58
- if (Array.isArray(e)) {
59
- if (r = e.length, r != t.length)
60
- return !1;
61
- for (s = r; s-- !== 0; )
62
- if (!n(e[s], t[s]))
63
- return !1;
64
- return !0;
65
- }
66
- if (e.constructor === RegExp)
67
- return e.source === t.source && e.flags === t.flags;
68
- if (e.valueOf !== Object.prototype.valueOf)
69
- return e.valueOf() === t.valueOf();
70
- if (e.toString !== Object.prototype.toString)
71
- return e.toString() === t.toString();
72
- if (o = Object.keys(e), r = o.length, r !== Object.keys(t).length)
73
- return !1;
74
- for (s = r; s-- !== 0; )
75
- if (!Object.prototype.hasOwnProperty.call(t, o[s]))
76
- return !1;
77
- for (s = r; s-- !== 0; ) {
78
- var i = o[s];
79
- if (!n(e[i], t[i]))
80
- return !1;
81
- }
82
- return !0;
83
- }
84
- return e !== e && t !== t;
85
- }), fe;
86
- }
87
- var ht = ft(), mt = /* @__PURE__ */ pt(ht);
88
- const qe = "__googleMapsScriptId";
89
- var U;
90
- (function(n) {
91
- n[n.INITIALIZED = 0] = "INITIALIZED", n[n.LOADING = 1] = "LOADING", n[n.SUCCESS = 2] = "SUCCESS", n[n.FAILURE = 3] = "FAILURE";
92
- })(U || (U = {}));
93
- class N {
94
- /**
95
- * Creates an instance of Loader using [[LoaderOptions]]. No defaults are set
96
- * using this library, instead the defaults are set by the Google Maps
97
- * JavaScript API server.
98
- *
99
- * ```
100
- * const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});
101
- * ```
102
- */
103
- constructor({ apiKey: e, authReferrerPolicy: t, channel: r, client: s, id: o = qe, language: i, libraries: l = [], mapIds: a, nonce: c, region: d, retries: u = 3, url: h = "https://maps.googleapis.com/maps/api/js", version: m }) {
104
- if (this.callbacks = [], this.done = !1, this.loading = !1, this.errors = [], this.apiKey = e, this.authReferrerPolicy = t, this.channel = r, this.client = s, this.id = o || qe, this.language = i, this.libraries = l, this.mapIds = a, this.nonce = c, this.region = d, this.retries = u, this.url = h, this.version = m, N.instance) {
105
- if (!mt(this.options, N.instance.options))
106
- throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(N.instance.options)}`);
107
- return N.instance;
108
- }
109
- N.instance = this;
110
- }
111
- get options() {
112
- return {
113
- version: this.version,
114
- apiKey: this.apiKey,
115
- channel: this.channel,
116
- client: this.client,
117
- id: this.id,
118
- libraries: this.libraries,
119
- language: this.language,
120
- region: this.region,
121
- mapIds: this.mapIds,
122
- nonce: this.nonce,
123
- url: this.url,
124
- authReferrerPolicy: this.authReferrerPolicy
125
- };
126
- }
127
- get status() {
128
- return this.errors.length ? U.FAILURE : this.done ? U.SUCCESS : this.loading ? U.LOADING : U.INITIALIZED;
129
- }
130
- get failed() {
131
- return this.done && !this.loading && this.errors.length >= this.retries + 1;
132
- }
133
- /**
134
- * CreateUrl returns the Google Maps JavaScript API script url given the [[LoaderOptions]].
135
- *
136
- * @ignore
137
- * @deprecated
138
- */
139
- createUrl() {
140
- let e = this.url;
141
- return e += "?callback=__googleMapsCallback&loading=async", 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;
142
- }
143
- deleteScript() {
144
- const e = document.getElementById(this.id);
145
- e && e.remove();
146
- }
147
- /**
148
- * Load the Google Maps JavaScript API script and return a Promise.
149
- * @deprecated, use importLibrary() instead.
150
- */
151
- load() {
152
- return this.loadPromise();
153
- }
154
- /**
155
- * Load the Google Maps JavaScript API script and return a Promise.
156
- *
157
- * @ignore
158
- * @deprecated, use importLibrary() instead.
159
- */
160
- loadPromise() {
161
- return new Promise((e, t) => {
162
- this.loadCallback((r) => {
163
- r ? t(r.error) : e(window.google);
164
- });
165
- });
166
- }
167
- importLibrary(e) {
168
- return this.execute(), google.maps.importLibrary(e);
169
- }
170
- /**
171
- * Load the Google Maps JavaScript API script with a callback.
172
- * @deprecated, use importLibrary() instead.
173
- */
174
- loadCallback(e) {
175
- this.callbacks.push(e), this.execute();
176
- }
177
- /**
178
- * Set the script on document.
179
- */
180
- setScript() {
181
- var e, t;
182
- if (document.getElementById(this.id)) {
183
- this.callback();
184
- return;
185
- }
186
- const r = {
187
- key: this.apiKey,
188
- channel: this.channel,
189
- client: this.client,
190
- libraries: this.libraries.length && this.libraries,
191
- v: this.version,
192
- mapIds: this.mapIds,
193
- language: this.language,
194
- region: this.region,
195
- authReferrerPolicy: this.authReferrerPolicy
196
- };
197
- Object.keys(r).forEach(
198
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
199
- (o) => !r[o] && delete r[o]
200
- ), !((t = (e = window == null ? void 0 : window.google) === null || e === void 0 ? void 0 : e.maps) === null || t === void 0) && t.importLibrary || ((o) => {
201
- let i, l, a, c = "The Google Maps JavaScript API", d = "google", u = "importLibrary", h = "__ib__", m = document, p = window;
202
- p = p[d] || (p[d] = {});
203
- const f = p.maps || (p.maps = {}), g = /* @__PURE__ */ new Set(), v = new URLSearchParams(), E = () => (
204
- // @ts-ignore
205
- i || (i = new Promise((y, M) => dt(this, void 0, void 0, function* () {
206
- var O;
207
- yield l = m.createElement("script"), l.id = this.id, v.set("libraries", [...g] + "");
208
- for (a in o)
209
- v.set(a.replace(/[A-Z]/g, (b) => "_" + b[0].toLowerCase()), o[a]);
210
- v.set("callback", d + ".maps." + h), l.src = this.url + "?" + v, f[h] = y, l.onerror = () => i = M(Error(c + " could not load.")), l.nonce = this.nonce || ((O = m.querySelector("script[nonce]")) === null || O === void 0 ? void 0 : O.nonce) || "", m.head.append(l);
211
- })))
212
- );
213
- f[u] ? console.warn(c + " only loads once. Ignoring:", o) : f[u] = (y, ...M) => g.add(y) && E().then(() => f[u](y, ...M));
214
- })(r);
215
- const s = this.libraries.map((o) => this.importLibrary(o));
216
- s.length || s.push(this.importLibrary("core")), Promise.all(s).then(() => this.callback(), (o) => {
217
- const i = new ErrorEvent("error", { error: o });
218
- this.loadErrorCallback(i);
219
- });
220
- }
221
- /**
222
- * Reset the loader state.
223
- */
224
- reset() {
225
- this.deleteScript(), this.done = !1, this.loading = !1, this.errors = [], this.onerrorEvent = null;
226
- }
227
- resetIfRetryingFailed() {
228
- this.failed && this.reset();
229
- }
230
- loadErrorCallback(e) {
231
- if (this.errors.push(e), this.errors.length <= this.retries) {
232
- const t = this.errors.length * Math.pow(2, this.errors.length);
233
- console.error(`Failed to load Google Maps script, retrying in ${t} ms.`), setTimeout(() => {
234
- this.deleteScript(), this.setScript();
235
- }, t);
236
- } else
237
- this.onerrorEvent = e, this.callback();
238
- }
239
- callback() {
240
- this.done = !0, this.loading = !1, this.callbacks.forEach((e) => {
241
- e(this.onerrorEvent);
242
- }), this.callbacks = [];
243
- }
244
- execute() {
245
- if (this.resetIfRetryingFailed(), !this.loading)
246
- if (this.done)
247
- this.callback();
248
- else {
249
- if (window.google && window.google.maps && window.google.maps.version) {
250
- 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();
251
- return;
252
- }
253
- this.loading = !0, this.setScript();
254
- }
255
- }
52
+ function vt(r) {
53
+ var t, n;
54
+ const e = !!((n = (t = window.google) == null ? void 0 : t.maps) != null && n.importLibrary);
55
+ e ? ht(pt(r)) : process.env.NODE_ENV !== "production" && document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]') && ke(ft), e || ut(r);
256
56
  }
257
- function gt(n) {
258
- return class extends n.OverlayView {
259
- constructor(r) {
57
+ function yt(r) {
58
+ return class extends r.OverlayView {
59
+ constructor(n) {
260
60
  super();
261
61
  pe(this, "element");
262
62
  pe(this, "opts");
263
- const { element: s, ...o } = r;
63
+ const { element: s, ...o } = n;
264
64
  this.element = s, this.opts = o, this.opts.map && this.setMap(this.opts.map);
265
65
  }
266
66
  getPosition() {
267
- return this.opts.position ? this.opts.position instanceof n.LatLng ? this.opts.position : new n.LatLng(this.opts.position) : null;
67
+ return this.opts.position ? this.opts.position instanceof r.LatLng ? this.opts.position : new r.LatLng(this.opts.position) : null;
268
68
  }
269
69
  getVisible() {
270
70
  if (!this.element)
271
71
  return !1;
272
- const r = this.element;
273
- return r.style.display !== "none" && r.style.visibility !== "hidden" && (r.style.opacity === "" || Number(r.style.opacity) > 0.01);
72
+ const n = this.element;
73
+ return n.style.display !== "none" && n.style.visibility !== "hidden" && (n.style.opacity === "" || Number(n.style.opacity) > 0.01);
274
74
  }
275
75
  onAdd() {
276
76
  if (!this.element)
277
77
  return;
278
- const r = this.getPanes();
279
- r && r.overlayMouseTarget.appendChild(this.element);
78
+ const n = this.getPanes();
79
+ n && n.overlayMouseTarget.appendChild(this.element);
280
80
  }
281
81
  draw() {
282
82
  if (!this.element)
283
83
  return;
284
- const r = this.getProjection(), s = r == null ? void 0 : r.fromLatLngToDivPixel(this.getPosition());
84
+ const n = this.getProjection(), s = n == null ? void 0 : n.fromLatLngToDivPixel(this.getPosition());
285
85
  if (s) {
286
86
  this.element.style.position = "absolute";
287
87
  let o, i;
@@ -320,14 +120,14 @@ function gt(n) {
320
120
  onRemove() {
321
121
  this.element && this.element.remove();
322
122
  }
323
- setOptions(r) {
324
- const { element: s, ...o } = r;
123
+ setOptions(n) {
124
+ const { element: s, ...o } = n;
325
125
  this.element = s, this.opts = o, this.draw();
326
126
  }
327
127
  };
328
128
  }
329
- let Se;
330
- const Ae = [
129
+ let Pe = !1;
130
+ const be = [
331
131
  "bounds_changed",
332
132
  "center_changed",
333
133
  "click",
@@ -350,7 +150,7 @@ const Ae = [
350
150
  "tilesloaded",
351
151
  "tilt_changed",
352
152
  "zoom_changed"
353
- ], vt = P({
153
+ ], _t = O({
354
154
  props: {
355
155
  apiPromise: {
356
156
  type: Promise
@@ -554,113 +354,110 @@ const Ae = [
554
354
  cameraControlPosition: {
555
355
  type: String,
556
356
  required: !1
557
- },
558
- nonce: {
559
- type: String,
560
- default: ""
561
357
  }
562
358
  },
563
- emits: Ae,
564
- setup(n, { emit: e }) {
565
- const t = w(), r = w(!1), s = w(), o = w(), i = w(!1);
566
- G(D, s), G(Z, o), G(Xe, i);
359
+ emits: be,
360
+ setup(r, { emit: e }) {
361
+ const t = y(), n = y(!1), s = y(), o = y(), i = y(!1);
362
+ U(B, s), U(D, o), U(Ke, i);
567
363
  const l = () => {
568
- const u = { ...n };
569
- Object.keys(u).forEach((f) => {
570
- u[f] === void 0 && delete u[f];
364
+ const u = { ...r };
365
+ Object.keys(u).forEach((p) => {
366
+ u[p] === void 0 && delete u[p];
571
367
  });
572
- const m = (f) => {
368
+ const m = (p) => {
573
369
  var g;
574
- return f ? { position: (g = o.value) == null ? void 0 : g.ControlPosition[f] } : {};
575
- }, p = {
576
- scaleControlOptions: n.scaleControlStyle ? { style: n.scaleControlStyle } : {},
577
- panControlOptions: m(n.panControlPosition),
578
- zoomControlOptions: m(n.zoomControlPosition),
579
- rotateControlOptions: m(n.rotateControlPosition),
580
- streetViewControlOptions: m(n.streetViewControlPosition),
581
- fullscreenControlOptions: m(n.fullscreenControlPosition),
582
- cameraControlOptions: m(n.cameraControlPosition),
583
- disableDefaultUI: n.disableDefaultUi
370
+ return p ? { position: (g = o.value) == null ? void 0 : g.ControlPosition[p] } : {};
371
+ }, h = {
372
+ scaleControlOptions: r.scaleControlStyle ? { style: r.scaleControlStyle } : {},
373
+ panControlOptions: m(r.panControlPosition),
374
+ zoomControlOptions: m(r.zoomControlPosition),
375
+ rotateControlOptions: m(r.rotateControlPosition),
376
+ streetViewControlOptions: m(r.streetViewControlPosition),
377
+ fullscreenControlOptions: m(r.fullscreenControlPosition),
378
+ cameraControlOptions: m(r.cameraControlPosition),
379
+ disableDefaultUI: r.disableDefaultUi
584
380
  };
585
- return { ...u, ...p };
586
- }, a = q(
381
+ return { ...u, ...h };
382
+ }, a = M(
587
383
  [o, s],
588
- ([u, h]) => {
589
- const m = u, p = h;
590
- m && p && (m.event.addListenerOnce(p, "tilesloaded", () => {
384
+ ([u, f]) => {
385
+ const m = u, h = f;
386
+ m && h && (m.event.addListenerOnce(h, "tilesloaded", () => {
591
387
  i.value = !0;
592
388
  }), setTimeout(a, 0));
593
389
  },
594
390
  { immediate: !0 }
595
391
  ), c = () => {
596
- try {
597
- const { apiKey: u, region: h, version: m, language: p, libraries: f, nonce: g } = n;
598
- Se = new N({ apiKey: u, region: h, version: m, language: p, libraries: f, nonce: g });
599
- } catch (u) {
600
- console.error(u);
601
- }
392
+ const { apiKey: u, region: f, version: m, language: h, libraries: p } = r;
393
+ mt({ key: u, region: f, v: m, language: h, libraries: p });
602
394
  }, d = (u) => {
603
- o.value = S(u.maps), s.value = S(new u.maps.Map(t.value, l()));
604
- const h = gt(o.value);
605
- o.value[ue] = h, Ae.forEach((p) => {
606
- var f;
607
- (f = s.value) == null || f.addListener(p, (g) => e(p, g));
608
- }), r.value = !0;
609
- const m = Object.keys(n).filter(
610
- (p) => !["apiPromise", "apiKey", "version", "libraries", "region", "language", "center", "zoom", "nonce"].includes(
611
- p
612
- )
613
- ).map((p) => j(n, p));
614
- q(
615
- [() => n.center, () => n.zoom, ...m],
616
- ([p, f], [g, v]) => {
617
- var b, C, T;
618
- const { center: E, zoom: y, ...M } = l();
619
- (b = s.value) == null || b.setOptions(M), f !== void 0 && f !== v && ((C = s.value) == null || C.setZoom(f));
620
- const O = !g || p.lng !== g.lng || p.lat !== g.lat;
621
- p && O && ((T = s.value) == null || T.panTo(p));
395
+ const f = u ? u.maps : google.maps;
396
+ o.value = S(f), s.value = S(new f.Map(t.value, l()));
397
+ const m = yt(o.value);
398
+ o.value[le] = m, be.forEach((p) => {
399
+ var g;
400
+ (g = s.value) == null || g.addListener(p, (v) => e(p, v));
401
+ }), n.value = !0;
402
+ const h = Object.keys(r).filter(
403
+ (p) => !["apiPromise", "apiKey", "version", "libraries", "region", "language", "center", "zoom"].includes(p)
404
+ ).map((p) => R(r, p));
405
+ M(
406
+ [() => r.center, () => r.zoom, ...h],
407
+ ([p, g], [v, _]) => {
408
+ var C, T, K;
409
+ const { center: E, zoom: q, ...P } = l();
410
+ (C = s.value) == null || C.setOptions(P), g !== void 0 && g !== _ && ((T = s.value) == null || T.setZoom(g));
411
+ const b = !v || p.lng !== v.lng || p.lat !== v.lat;
412
+ p && b && ((K = s.value) == null || K.panTo(p));
622
413
  }
623
414
  );
624
415
  };
625
- return Ye(() => {
626
- n.apiPromise && n.apiPromise instanceof Promise ? n.apiPromise.then(d) : (c(), Se.load().then(d));
627
- }), B(() => {
416
+ return He(() => {
417
+ if (r.apiPromise && r.apiPromise instanceof Promise)
418
+ r.apiPromise.then(d);
419
+ else {
420
+ Pe || (c(), Pe = !0);
421
+ const u = r.libraries && r.libraries.length > 0 ? r.libraries : ["maps", "marker"];
422
+ Promise.all(u.map((f) => gt(f))).then(() => d());
423
+ }
424
+ }), $(() => {
628
425
  var u;
629
426
  i.value = !1, s.value && ((u = o.value) == null || u.event.clearInstanceListeners(s.value));
630
- }), { mapRef: t, ready: r, map: s, api: o, mapTilesLoaded: i };
427
+ }), { mapRef: t, ready: n, map: s, api: o, mapTilesLoaded: i };
631
428
  }
632
429
  });
633
- const re = (n, e) => {
634
- const t = n.__vccOpts || n;
635
- for (const [r, s] of e)
636
- t[r] = s;
430
+ const te = (r, e) => {
431
+ const t = r.__vccOpts || r;
432
+ for (const [n, s] of e)
433
+ t[n] = s;
637
434
  return t;
638
- }, yt = {
435
+ }, Et = {
639
436
  ref: "mapRef",
640
437
  class: "mapdiv"
641
438
  };
642
- function wt(n, e, t, r, s, o) {
643
- return V(), z("div", null, [
644
- le("div", yt, null, 512),
645
- W(n.$slots, "default", lt(ut({ ready: n.ready, map: n.map, api: n.api, mapTilesLoaded: n.mapTilesLoaded })), void 0, !0)
439
+ function wt(r, e, t, n, s, o) {
440
+ return G(), V("div", null, [
441
+ ie("div", Et, null, 512),
442
+ F(r.$slots, "default", ot(at({ ready: r.ready, map: r.map, api: r.api, mapTilesLoaded: r.mapTilesLoaded })), void 0, !0)
646
443
  ]);
647
444
  }
648
- const Ir = /* @__PURE__ */ re(vt, [["render", wt], ["__scopeId", "data-v-289550ca"]]);
649
- function Et(n) {
650
- return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
445
+ const jr = /* @__PURE__ */ te(_t, [["render", wt], ["__scopeId", "data-v-c63ff230"]]);
446
+ function kt(r) {
447
+ return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
651
448
  }
652
- var _t = function n(e, t) {
449
+ var Ct = function r(e, t) {
653
450
  if (e === t)
654
451
  return !0;
655
452
  if (e && t && typeof e == "object" && typeof t == "object") {
656
453
  if (e.constructor !== t.constructor)
657
454
  return !1;
658
- var r, s, o;
455
+ var n, s, o;
659
456
  if (Array.isArray(e)) {
660
- if (r = e.length, r != t.length)
457
+ if (n = e.length, n != t.length)
661
458
  return !1;
662
- for (s = r; s-- !== 0; )
663
- if (!n(e[s], t[s]))
459
+ for (s = n; s-- !== 0; )
460
+ if (!r(e[s], t[s]))
664
461
  return !1;
665
462
  return !0;
666
463
  }
@@ -670,21 +467,21 @@ var _t = function n(e, t) {
670
467
  return e.valueOf() === t.valueOf();
671
468
  if (e.toString !== Object.prototype.toString)
672
469
  return e.toString() === t.toString();
673
- if (o = Object.keys(e), r = o.length, r !== Object.keys(t).length)
470
+ if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length)
674
471
  return !1;
675
- for (s = r; s-- !== 0; )
472
+ for (s = n; s-- !== 0; )
676
473
  if (!Object.prototype.hasOwnProperty.call(t, o[s]))
677
474
  return !1;
678
- for (s = r; s-- !== 0; ) {
475
+ for (s = n; s-- !== 0; ) {
679
476
  var i = o[s];
680
- if (!n(e[i], t[i]))
477
+ if (!r(e[i], t[i]))
681
478
  return !1;
682
479
  }
683
480
  return !0;
684
481
  }
685
482
  return e !== e && t !== t;
686
483
  };
687
- const ee = /* @__PURE__ */ Et(_t), Te = ["click", "drag", "dragend", "dragstart", "gmp-click"], kt = P({
484
+ const Q = /* @__PURE__ */ kt(Ct), Se = ["click", "drag", "dragend", "dragstart", "gmp-click"], Ot = O({
688
485
  name: "AdvancedMarker",
689
486
  props: {
690
487
  options: {
@@ -696,32 +493,32 @@ const ee = /* @__PURE__ */ Et(_t), Te = ["click", "drag", "dragend", "dragstart"
696
493
  required: !1
697
494
  }
698
495
  },
699
- emits: Te,
700
- setup(n, { emit: e, expose: t, slots: r }) {
701
- const s = w(), o = K(() => {
496
+ emits: Se,
497
+ setup(r, { emit: e, expose: t, slots: n }) {
498
+ const s = y(), o = z(() => {
702
499
  var m;
703
- return (m = r.content) == null ? void 0 : m.call(r).some((p) => p.type !== ye);
704
- }), i = j(n, "options"), l = j(n, "pinOptions"), a = w(), c = k(D, w()), d = k(Z, w()), u = k(ke, w()), h = K(
500
+ return (m = n.content) == null ? void 0 : m.call(n).some((h) => h.type !== ve);
501
+ }), i = R(r, "options"), l = R(r, "pinOptions"), a = y(), c = k(B, y()), d = k(D, y()), u = k(we, y()), f = z(
705
502
  () => !!(u.value && d.value && a.value instanceof google.maps.marker.AdvancedMarkerElement)
706
503
  );
707
- return q(
504
+ return M(
708
505
  [c, i, l, s],
709
- async (m, [p, f, g, v]) => {
710
- var C, T, be;
711
- const E = !ee(i.value, f) || !ee(l.value, g), y = s.value !== v, M = E || y || c.value !== p;
712
- if (!c.value || !d.value || !M || o.value && !s.value)
506
+ async (m, [h, p, g, v]) => {
507
+ var C, T, K;
508
+ const _ = !Q(i.value, p) || !Q(l.value, g), E = s.value !== v, q = _ || E || c.value !== h;
509
+ if (!c.value || !d.value || !q || o.value && !s.value)
713
510
  return;
714
- const { AdvancedMarkerElement: O, PinElement: b } = d.value.marker;
511
+ const { AdvancedMarkerElement: P, PinElement: b } = d.value.marker;
715
512
  if (a.value) {
716
- const { map: ce, content: ne, ...de } = i.value;
513
+ const { map: ue, content: re, ...ce } = i.value;
717
514
  Object.assign(a.value, {
718
- content: o.value ? s.value : l.value ? new b(l.value).element : ne,
719
- ...de
720
- }), h.value && ((C = u.value) == null || C.removeMarker(a.value), (T = u.value) == null || T.addMarker(a.value));
515
+ content: o.value ? s.value : l.value ? new b(l.value).element : re,
516
+ ...ce
517
+ }), f.value && ((C = u.value) == null || C.removeMarker(a.value), (T = u.value) == null || T.addMarker(a.value));
721
518
  } else
722
- o.value ? i.value.content = s.value : l.value && (i.value.content = new b(l.value).element), a.value = S(new O(i.value)), h.value ? (be = u.value) == null || be.addMarker(a.value) : a.value.map = c.value, Te.forEach((ce) => {
723
- var ne;
724
- (ne = a.value) == null || ne.addListener(ce, (de) => e(ce, de));
519
+ o.value ? i.value.content = s.value : l.value && (i.value.content = new b(l.value).element), a.value = S(new P(i.value)), f.value ? (K = u.value) == null || K.addMarker(a.value) : a.value.map = c.value, Se.forEach((ue) => {
520
+ var re;
521
+ (re = a.value) == null || re.addListener(ue, (ce) => e(ue, ce));
725
522
  });
726
523
  },
727
524
  {
@@ -729,56 +526,56 @@ const ee = /* @__PURE__ */ Et(_t), Te = ["click", "drag", "dragend", "dragstart"
729
526
  flush: "post"
730
527
  // Ensure DOM updates happen before this watcher runs
731
528
  }
732
- ), B(() => {
733
- var m, p;
734
- a.value && ((m = d.value) == null || m.event.clearInstanceListeners(a.value), h.value ? (p = u.value) == null || p.removeMarker(a.value) : a.value.map = null);
735
- }), G(_e, a), t({ marker: a }), { hasCustomSlotContent: o, markerRef: s };
529
+ ), $(() => {
530
+ var m, h;
531
+ a.value && ((m = d.value) == null || m.event.clearInstanceListeners(a.value), f.value ? (h = u.value) == null || h.removeMarker(a.value) : a.value.map = null);
532
+ }), U(Ee, a), t({ marker: a }), { hasCustomSlotContent: o, markerRef: s };
736
533
  }
737
534
  });
738
- const Ct = {
535
+ const Mt = {
739
536
  key: 0,
740
537
  class: "advanced-marker-wrapper"
741
538
  };
742
- function Ot(n, e, t, r, s, o) {
743
- return V(), z(ct, null, [
744
- n.hasCustomSlotContent ? (V(), z("div", Ct, [
745
- le("div", we({ ref: "markerRef" }, n.$attrs), [
746
- W(n.$slots, "content")
539
+ function Pt(r, e, t, n, s, o) {
540
+ return G(), V(it, null, [
541
+ r.hasCustomSlotContent ? (G(), V("div", Mt, [
542
+ ie("div", ye({ ref: "markerRef" }, r.$attrs), [
543
+ F(r.$slots, "content")
747
544
  ], 16)
748
- ])) : Ee("", !0),
749
- W(n.$slots, "default")
545
+ ])) : _e("", !0),
546
+ F(r.$slots, "default")
750
547
  ], 64);
751
548
  }
752
- const jr = /* @__PURE__ */ re(kt, [["render", Ot]]), Le = (n) => n === "Marker", xe = (n) => n === ue, J = (n, e, t, r) => {
753
- const s = w(), o = k(D, w()), i = k(Z, w()), l = k(ke, w()), a = K(
754
- () => !!(l.value && i.value && (s.value instanceof i.value.Marker || s.value instanceof i.value[ue]))
549
+ const Nr = /* @__PURE__ */ te(Ot, [["render", Pt]]), Ae = (r) => r === "Marker", qe = (r) => r === le, H = (r, e, t, n) => {
550
+ const s = y(), o = k(B, y()), i = k(D, y()), l = k(we, y()), a = z(
551
+ () => !!(l.value && i.value && (s.value instanceof i.value.Marker || s.value instanceof i.value[le]))
755
552
  );
756
- return q(
553
+ return M(
757
554
  [o, t],
758
555
  (c, [d, u]) => {
759
- var m, p, f;
760
- const h = !ee(t.value, u) || o.value !== d;
761
- if (!(!o.value || !i.value || !h))
556
+ var m, h, p;
557
+ const f = !Q(t.value, u) || o.value !== d;
558
+ if (!(!o.value || !i.value || !f))
762
559
  if (s.value)
763
- s.value.setOptions(t.value), a.value && ((m = l.value) == null || m.removeMarker(s.value), (p = l.value) == null || p.addMarker(s.value));
560
+ s.value.setOptions(t.value), a.value && ((m = l.value) == null || m.removeMarker(s.value), (h = l.value) == null || h.addMarker(s.value));
764
561
  else {
765
- if (Le(n))
562
+ if (Ae(r))
766
563
  s.value = S(
767
- new i.value[n](t.value)
564
+ new i.value[r](t.value)
768
565
  );
769
- else if (xe(n)) {
566
+ else if (qe(r)) {
770
567
  const g = t.value;
771
- g.element && (s.value = S(new i.value[n](g)));
568
+ g.element && (s.value = S(new i.value[r](g)));
772
569
  } else
773
570
  s.value = S(
774
- new i.value[n]({
571
+ new i.value[r]({
775
572
  ...t.value,
776
573
  map: o.value
777
574
  })
778
575
  );
779
- s.value && (a.value ? (f = l.value) == null || f.addMarker(s.value) : (Le(n) || xe(n)) && s.value.setMap(o.value)), e.forEach((g) => {
576
+ s.value && (a.value ? (p = l.value) == null || p.addMarker(s.value) : (Ae(r) || qe(r)) && s.value.setMap(o.value)), e.forEach((g) => {
780
577
  var v;
781
- (v = s.value) == null || v.addListener(g, (E) => r(g, E));
578
+ (v = s.value) == null || v.addListener(g, (_) => n(g, _));
782
579
  });
783
580
  }
784
581
  },
@@ -786,11 +583,11 @@ const jr = /* @__PURE__ */ re(kt, [["render", Ot]]), Le = (n) => n === "Marker",
786
583
  immediate: !0,
787
584
  flush: "post"
788
585
  }
789
- ), B(() => {
586
+ ), $(() => {
790
587
  var c, d;
791
588
  s.value && ((c = i.value) == null || c.event.clearInstanceListeners(s.value), a.value ? (d = l.value) == null || d.removeMarker(s.value) : s.value.setMap(null));
792
589
  }), s;
793
- }, Ie = [
590
+ }, Te = [
794
591
  "animation_changed",
795
592
  "click",
796
593
  "dblclick",
@@ -813,7 +610,7 @@ const jr = /* @__PURE__ */ re(kt, [["render", Ot]]), Le = (n) => n === "Marker",
813
610
  "shape_changed",
814
611
  "title_changed",
815
612
  "visible_changed"
816
- ], Rr = P({
613
+ ], $r = O({
817
614
  name: "Marker",
818
615
  props: {
819
616
  options: {
@@ -821,15 +618,15 @@ const jr = /* @__PURE__ */ re(kt, [["render", Ot]]), Le = (n) => n === "Marker",
821
618
  required: !0
822
619
  }
823
620
  },
824
- emits: Ie,
825
- setup(n, { emit: e, expose: t, slots: r }) {
826
- const s = j(n, "options"), o = J("Marker", Ie, s, e);
827
- return G(_e, o), t({ marker: o }), () => {
621
+ emits: Te,
622
+ setup(r, { emit: e, expose: t, slots: n }) {
623
+ const s = R(r, "options"), o = H("Marker", Te, s, e);
624
+ return U(Ee, o), t({ marker: o }), () => {
828
625
  var i;
829
- return (i = r.default) == null ? void 0 : i.call(r);
626
+ return (i = n.default) == null ? void 0 : i.call(n);
830
627
  };
831
628
  }
832
- }), $r = P({
629
+ }), Br = O({
833
630
  name: "Polyline",
834
631
  props: {
835
632
  options: {
@@ -837,13 +634,13 @@ const jr = /* @__PURE__ */ re(kt, [["render", Ot]]), Le = (n) => n === "Marker",
837
634
  required: !0
838
635
  }
839
636
  },
840
- emits: H,
841
- setup(n, { emit: e }) {
842
- const t = j(n, "options");
843
- return { polyline: J("Polyline", H, t, e) };
637
+ emits: W,
638
+ setup(r, { emit: e }) {
639
+ const t = R(r, "options");
640
+ return { polyline: H("Polyline", W, t, e) };
844
641
  },
845
642
  render: () => null
846
- }), Nr = P({
643
+ }), Dr = O({
847
644
  name: "Polygon",
848
645
  props: {
849
646
  options: {
@@ -851,13 +648,13 @@ const jr = /* @__PURE__ */ re(kt, [["render", Ot]]), Le = (n) => n === "Marker",
851
648
  required: !0
852
649
  }
853
650
  },
854
- emits: H,
855
- setup(n, { emit: e }) {
856
- const t = j(n, "options");
857
- return { polygon: J("Polygon", H, t, e) };
651
+ emits: W,
652
+ setup(r, { emit: e }) {
653
+ const t = R(r, "options");
654
+ return { polygon: H("Polygon", W, t, e) };
858
655
  },
859
656
  render: () => null
860
- }), je = H.concat(["bounds_changed"]), Br = P({
657
+ }), Le = W.concat(["bounds_changed"]), Zr = O({
861
658
  name: "Rectangle",
862
659
  props: {
863
660
  options: {
@@ -865,13 +662,13 @@ const jr = /* @__PURE__ */ re(kt, [["render", Ot]]), Le = (n) => n === "Marker",
865
662
  required: !0
866
663
  }
867
664
  },
868
- emits: je,
869
- setup(n, { emit: e }) {
870
- const t = j(n, "options");
871
- return { rectangle: J("Rectangle", je, t, e) };
665
+ emits: Le,
666
+ setup(r, { emit: e }) {
667
+ const t = R(r, "options");
668
+ return { rectangle: H("Rectangle", Le, t, e) };
872
669
  },
873
670
  render: () => null
874
- }), Re = H.concat(["center_changed", "radius_changed"]), Dr = P({
671
+ }), xe = W.concat(["center_changed", "radius_changed"]), Ur = O({
875
672
  name: "Circle",
876
673
  props: {
877
674
  options: {
@@ -879,13 +676,13 @@ const jr = /* @__PURE__ */ re(kt, [["render", Ot]]), Le = (n) => n === "Marker",
879
676
  required: !0
880
677
  }
881
678
  },
882
- emits: Re,
883
- setup(n, { emit: e }) {
884
- const t = j(n, "options");
885
- return { circle: J("Circle", Re, t, e) };
679
+ emits: xe,
680
+ setup(r, { emit: e }) {
681
+ const t = R(r, "options");
682
+ return { circle: H("Circle", xe, t, e) };
886
683
  },
887
684
  render: () => null
888
- }), Mt = P({
685
+ }), bt = O({
889
686
  props: {
890
687
  position: {
891
688
  type: String,
@@ -897,57 +694,57 @@ const jr = /* @__PURE__ */ re(kt, [["render", Ot]]), Le = (n) => n === "Marker",
897
694
  }
898
695
  },
899
696
  emits: ["content:loaded"],
900
- setup(n, { emit: e }) {
901
- const t = w(null), r = k(D, w()), s = k(Z, w()), o = k(Xe, w(!1)), i = q(
697
+ setup(r, { emit: e }) {
698
+ const t = y(null), n = k(B, y()), s = k(D, y()), o = k(Ke, y(!1)), i = M(
902
699
  [o, s, t],
903
700
  ([c, d, u]) => {
904
- d && c && u && (l(n.position), e("content:loaded"), setTimeout(i, 0));
701
+ d && c && u && (l(r.position), e("content:loaded"), setTimeout(i, 0));
905
702
  },
906
703
  { immediate: !0 }
907
704
  ), l = (c) => {
908
- if (r.value && s.value && t.value) {
705
+ if (n.value && s.value && t.value) {
909
706
  const d = s.value.ControlPosition[c];
910
- t.value.index = n.index, r.value.controls[d].push(t.value);
707
+ t.value.index = r.index, n.value.controls[d].push(t.value);
911
708
  }
912
709
  }, a = (c) => {
913
- if (r.value && s.value) {
710
+ if (n.value && s.value) {
914
711
  let d = null;
915
712
  const u = s.value.ControlPosition[c];
916
- r.value.controls[u].forEach((h, m) => {
917
- h === t.value && (d = m);
918
- }), d !== null && r.value.controls[u].removeAt(d);
713
+ n.value.controls[u].forEach((f, m) => {
714
+ f === t.value && (d = m);
715
+ }), d !== null && n.value.controls[u].removeAt(d);
919
716
  }
920
717
  };
921
- return B(() => a(n.position)), q(
922
- () => n.position,
718
+ return $(() => a(r.position)), M(
719
+ () => r.position,
923
720
  (c, d) => {
924
721
  a(d), l(c);
925
722
  }
926
- ), q(
927
- () => n.index,
723
+ ), M(
724
+ () => r.index,
928
725
  (c) => {
929
726
  t.value && (t.value.index = c);
930
727
  }
931
728
  ), { controlRef: t };
932
729
  }
933
730
  });
934
- const bt = {
731
+ const St = {
935
732
  ref: "controlRef",
936
733
  class: "custom-control-wrapper"
937
734
  };
938
- function Pt(n, e, t, r, s, o) {
939
- return V(), z("div", bt, [
940
- W(n.$slots, "default", {}, void 0, !0)
735
+ function At(r, e, t, n, s, o) {
736
+ return G(), V("div", St, [
737
+ F(r.$slots, "default", {}, void 0, !0)
941
738
  ], 512);
942
739
  }
943
- const Zr = /* @__PURE__ */ re(Mt, [["render", Pt], ["__scopeId", "data-v-ab9120cd"]]), $e = [
740
+ const Gr = /* @__PURE__ */ te(bt, [["render", At], ["__scopeId", "data-v-ab9120cd"]]), Ie = [
944
741
  "closeclick",
945
742
  "content_changed",
946
743
  "domready",
947
744
  "position_changed",
948
745
  "visible",
949
746
  "zindex_changed"
950
- ], qt = P({
747
+ ], qt = O({
951
748
  inheritAttrs: !1,
952
749
  props: {
953
750
  options: {
@@ -958,27 +755,27 @@ const Zr = /* @__PURE__ */ re(Mt, [["render", Pt], ["__scopeId", "data-v-ab9120c
958
755
  type: Boolean
959
756
  }
960
757
  },
961
- emits: [...$e, "update:modelValue"],
962
- setup(n, { slots: e, emit: t, expose: r }) {
963
- const s = w(), o = w(), i = k(D, w()), l = k(Z, w()), a = k(_e, w());
964
- let c, d = n.modelValue;
965
- const u = K(() => {
966
- var f;
967
- return (f = e.default) == null ? void 0 : f.call(e).some((g) => g.type !== ye);
968
- }), h = (f) => {
969
- d = f, t("update:modelValue", f);
970
- }, m = (f) => {
971
- s.value && (s.value.open({ map: i.value, anchor: a.value, ...f }), h(!0));
972
- }, p = () => {
973
- s.value && (s.value.close(), h(!1));
758
+ emits: [...Ie, "update:modelValue"],
759
+ setup(r, { slots: e, emit: t, expose: n }) {
760
+ const s = y(), o = y(), i = k(B, y()), l = k(D, y()), a = k(Ee, y());
761
+ let c, d = r.modelValue;
762
+ const u = z(() => {
763
+ var p;
764
+ return (p = e.default) == null ? void 0 : p.call(e).some((g) => g.type !== ve);
765
+ }), f = (p) => {
766
+ d = p, t("update:modelValue", p);
767
+ }, m = (p) => {
768
+ s.value && (s.value.open({ map: i.value, anchor: a.value, ...p }), f(!0));
769
+ }, h = () => {
770
+ s.value && (s.value.close(), f(!1));
974
771
  };
975
- return Ye(() => {
976
- q(
977
- [i, () => n.options],
978
- ([f, g], [v, E]) => {
979
- var M;
980
- const y = !ee(g, E) || i.value !== v;
981
- i.value && l.value && y && (s.value ? (s.value.setOptions({
772
+ return He(() => {
773
+ M(
774
+ [i, () => r.options],
775
+ ([p, g], [v, _]) => {
776
+ var q;
777
+ const E = !Q(g, _) || i.value !== v;
778
+ i.value && l.value && E && (s.value ? (s.value.setOptions({
982
779
  ...g,
983
780
  content: u.value ? o.value : g.content
984
781
  }), a.value || m()) : (s.value = S(
@@ -988,98 +785,99 @@ const Zr = /* @__PURE__ */ re(Mt, [["render", Pt], ["__scopeId", "data-v-ab9120c
988
785
  })
989
786
  ), a.value && (c = a.value.addListener("click", () => {
990
787
  m();
991
- })), (!a.value || d) && m(), $e.forEach((O) => {
788
+ })), (!a.value || d) && m(), Ie.forEach((P) => {
992
789
  var b;
993
- (b = s.value) == null || b.addListener(O, (C) => t(O, C));
994
- }), (M = s.value) == null || M.addListener("closeclick", () => h(!1))));
790
+ (b = s.value) == null || b.addListener(P, (C) => t(P, C));
791
+ }), (q = s.value) == null || q.addListener("closeclick", () => f(!1))));
995
792
  },
996
793
  {
997
- immediate: !0
794
+ immediate: !0,
795
+ flush: "post"
998
796
  }
999
- ), q(
1000
- () => n.modelValue,
1001
- (f) => {
1002
- f !== d && (f ? m() : p());
797
+ ), M(
798
+ () => r.modelValue,
799
+ (p) => {
800
+ p !== d && (p ? m() : h());
1003
801
  }
1004
802
  );
1005
- }), B(() => {
1006
- var f;
1007
- c && c.remove(), s.value && ((f = l.value) == null || f.event.clearInstanceListeners(s.value), p());
1008
- }), r({ infoWindow: s, open: m, close: p }), { infoWindow: s, infoWindowRef: o, hasSlotContent: u, open: m, close: p };
803
+ }), $(() => {
804
+ var p;
805
+ c && c.remove(), s.value && ((p = l.value) == null || p.event.clearInstanceListeners(s.value), h());
806
+ }), n({ infoWindow: s, open: m, close: h }), { infoWindow: s, infoWindowRef: o, hasSlotContent: u, open: m, close: h };
1009
807
  }
1010
808
  });
1011
- const St = {
809
+ const Tt = {
1012
810
  key: 0,
1013
811
  class: "info-window-wrapper"
1014
812
  };
1015
- function At(n, e, t, r, s, o) {
1016
- return n.hasSlotContent ? (V(), z("div", St, [
1017
- le("div", we({ ref: "infoWindowRef" }, n.$attrs), [
1018
- W(n.$slots, "default", {}, void 0, !0)
813
+ function Lt(r, e, t, n, s, o) {
814
+ return r.hasSlotContent ? (G(), V("div", Tt, [
815
+ ie("div", ye({ ref: "infoWindowRef" }, r.$attrs), [
816
+ F(r.$slots, "default", {}, void 0, !0)
1019
817
  ], 16)
1020
- ])) : Ee("", !0);
818
+ ])) : _e("", !0);
1021
819
  }
1022
- const Fr = /* @__PURE__ */ re(qt, [["render", At], ["__scopeId", "data-v-f0c09f6e"]]);
1023
- var Tt = Object.getOwnPropertyNames, Lt = Object.getOwnPropertySymbols, xt = Object.prototype.hasOwnProperty;
1024
- function Ne(n, e) {
1025
- return function(r, s, o) {
1026
- return n(r, s, o) && e(r, s, o);
820
+ const Vr = /* @__PURE__ */ te(qt, [["render", Lt], ["__scopeId", "data-v-135889a7"]]);
821
+ var xt = Object.getOwnPropertyNames, It = Object.getOwnPropertySymbols, Rt = Object.prototype.hasOwnProperty;
822
+ function Re(r, e) {
823
+ return function(n, s, o) {
824
+ return r(n, s, o) && e(n, s, o);
1027
825
  };
1028
826
  }
1029
- function se(n) {
1030
- return function(t, r, s) {
1031
- if (!t || !r || typeof t != "object" || typeof r != "object")
1032
- return n(t, r, s);
1033
- var o = s.cache, i = o.get(t), l = o.get(r);
827
+ function ne(r) {
828
+ return function(t, n, s) {
829
+ if (!t || !n || typeof t != "object" || typeof n != "object")
830
+ return r(t, n, s);
831
+ var o = s.cache, i = o.get(t), l = o.get(n);
1034
832
  if (i && l)
1035
- return i === r && l === t;
1036
- o.set(t, r), o.set(r, t);
1037
- var a = n(t, r, s);
1038
- return o.delete(t), o.delete(r), a;
833
+ return i === n && l === t;
834
+ o.set(t, n), o.set(n, t);
835
+ var a = r(t, n, s);
836
+ return o.delete(t), o.delete(n), a;
1039
837
  };
1040
838
  }
1041
- function Be(n) {
1042
- return Tt(n).concat(Lt(n));
839
+ function je(r) {
840
+ return xt(r).concat(It(r));
1043
841
  }
1044
- var It = Object.hasOwn || function(n, e) {
1045
- return xt.call(n, e);
842
+ var jt = Object.hasOwn || function(r, e) {
843
+ return Rt.call(r, e);
1046
844
  };
1047
- function F(n, e) {
1048
- return n === e || !n && !e && n !== n && e !== e;
845
+ function Z(r, e) {
846
+ return r === e || !r && !e && r !== r && e !== e;
1049
847
  }
1050
- var jt = "__v", Rt = "__o", $t = "_owner", De = Object.getOwnPropertyDescriptor, Ze = Object.keys;
1051
- function Nt(n, e, t) {
1052
- var r = n.length;
1053
- if (e.length !== r)
848
+ var Nt = "__v", $t = "__o", Bt = "_owner", Ne = Object.getOwnPropertyDescriptor, $e = Object.keys;
849
+ function Dt(r, e, t) {
850
+ var n = r.length;
851
+ if (e.length !== n)
1054
852
  return !1;
1055
- for (; r-- > 0; )
1056
- if (!t.equals(n[r], e[r], r, r, n, e, t))
853
+ for (; n-- > 0; )
854
+ if (!t.equals(r[n], e[n], n, n, r, e, t))
1057
855
  return !1;
1058
856
  return !0;
1059
857
  }
1060
- function Bt(n, e) {
1061
- return F(n.getTime(), e.getTime());
858
+ function Zt(r, e) {
859
+ return Z(r.getTime(), e.getTime());
1062
860
  }
1063
- function Dt(n, e) {
1064
- return n.name === e.name && n.message === e.message && n.cause === e.cause && n.stack === e.stack;
861
+ function Ut(r, e) {
862
+ return r.name === e.name && r.message === e.message && r.cause === e.cause && r.stack === e.stack;
1065
863
  }
1066
- function Zt(n, e) {
1067
- return n === e;
864
+ function Gt(r, e) {
865
+ return r === e;
1068
866
  }
1069
- function Fe(n, e, t) {
1070
- var r = n.size;
1071
- if (r !== e.size)
867
+ function Be(r, e, t) {
868
+ var n = r.size;
869
+ if (n !== e.size)
1072
870
  return !1;
1073
- if (!r)
871
+ if (!n)
1074
872
  return !0;
1075
- for (var s = new Array(r), o = n.entries(), i, l, a = 0; (i = o.next()) && !i.done; ) {
873
+ for (var s = new Array(n), o = r.entries(), i, l, a = 0; (i = o.next()) && !i.done; ) {
1076
874
  for (var c = e.entries(), d = !1, u = 0; (l = c.next()) && !l.done; ) {
1077
875
  if (s[u]) {
1078
876
  u++;
1079
877
  continue;
1080
878
  }
1081
- var h = i.value, m = l.value;
1082
- if (t.equals(h[0], m[0], a, u, n, e, t) && t.equals(h[1], m[1], h[0], m[0], n, e, t)) {
879
+ var f = i.value, m = l.value;
880
+ if (t.equals(f[0], m[0], a, u, r, e, t) && t.equals(f[1], m[1], f[0], m[0], r, e, t)) {
1083
881
  d = s[u] = !0;
1084
882
  break;
1085
883
  }
@@ -1091,40 +889,40 @@ function Fe(n, e, t) {
1091
889
  }
1092
890
  return !0;
1093
891
  }
1094
- var Ft = F;
1095
- function Ut(n, e, t) {
1096
- var r = Ze(n), s = r.length;
1097
- if (Ze(e).length !== s)
892
+ var Vt = Z;
893
+ function Ft(r, e, t) {
894
+ var n = $e(r), s = n.length;
895
+ if ($e(e).length !== s)
1098
896
  return !1;
1099
897
  for (; s-- > 0; )
1100
- if (!Qe(n, e, t, r[s]))
898
+ if (!Ye(r, e, t, n[s]))
1101
899
  return !1;
1102
900
  return !0;
1103
901
  }
1104
- function Y(n, e, t) {
1105
- var r = Be(n), s = r.length;
1106
- if (Be(e).length !== s)
902
+ function Y(r, e, t) {
903
+ var n = je(r), s = n.length;
904
+ if (je(e).length !== s)
1107
905
  return !1;
1108
906
  for (var o, i, l; s-- > 0; )
1109
- if (o = r[s], !Qe(n, e, t, o) || (i = De(n, o), l = De(e, o), (i || l) && (!i || !l || i.configurable !== l.configurable || i.enumerable !== l.enumerable || i.writable !== l.writable)))
907
+ if (o = n[s], !Ye(r, e, t, o) || (i = Ne(r, o), l = Ne(e, o), (i || l) && (!i || !l || i.configurable !== l.configurable || i.enumerable !== l.enumerable || i.writable !== l.writable)))
1110
908
  return !1;
1111
909
  return !0;
1112
910
  }
1113
- function Gt(n, e) {
1114
- return F(n.valueOf(), e.valueOf());
911
+ function zt(r, e) {
912
+ return Z(r.valueOf(), e.valueOf());
1115
913
  }
1116
- function Vt(n, e) {
1117
- return n.source === e.source && n.flags === e.flags;
914
+ function Wt(r, e) {
915
+ return r.source === e.source && r.flags === e.flags;
1118
916
  }
1119
- function Ue(n, e, t) {
1120
- var r = n.size;
1121
- if (r !== e.size)
917
+ function De(r, e, t) {
918
+ var n = r.size;
919
+ if (n !== e.size)
1122
920
  return !1;
1123
- if (!r)
921
+ if (!n)
1124
922
  return !0;
1125
- for (var s = new Array(r), o = n.values(), i, l; (i = o.next()) && !i.done; ) {
923
+ for (var s = new Array(n), o = r.values(), i, l; (i = o.next()) && !i.done; ) {
1126
924
  for (var a = e.values(), c = !1, d = 0; (l = a.next()) && !l.done; ) {
1127
- if (!s[d] && t.equals(i.value, l.value, i.value, l.value, n, e, t)) {
925
+ if (!s[d] && t.equals(i.value, l.value, i.value, l.value, r, e, t)) {
1128
926
  c = s[d] = !0;
1129
927
  break;
1130
928
  }
@@ -1135,73 +933,73 @@ function Ue(n, e, t) {
1135
933
  }
1136
934
  return !0;
1137
935
  }
1138
- function zt(n, e) {
1139
- var t = n.length;
936
+ function Ht(r, e) {
937
+ var t = r.length;
1140
938
  if (e.length !== t)
1141
939
  return !1;
1142
940
  for (; t-- > 0; )
1143
- if (n[t] !== e[t])
941
+ if (r[t] !== e[t])
1144
942
  return !1;
1145
943
  return !0;
1146
944
  }
1147
- function Wt(n, e) {
1148
- return n.hostname === e.hostname && n.pathname === e.pathname && n.protocol === e.protocol && n.port === e.port && n.hash === e.hash && n.username === e.username && n.password === e.password;
945
+ function Kt(r, e) {
946
+ return r.hostname === e.hostname && r.pathname === e.pathname && r.protocol === e.protocol && r.port === e.port && r.hash === e.hash && r.username === e.username && r.password === e.password;
1149
947
  }
1150
- function Qe(n, e, t, r) {
1151
- return (r === $t || r === Rt || r === jt) && (n.$$typeof || e.$$typeof) ? !0 : It(e, r) && t.equals(n[r], e[r], r, r, n, e, t);
948
+ function Ye(r, e, t, n) {
949
+ return (n === Bt || n === $t || n === Nt) && (r.$$typeof || e.$$typeof) ? !0 : jt(e, n) && t.equals(r[n], e[n], n, n, r, e, t);
1152
950
  }
1153
- var Kt = "[object Arguments]", Ht = "[object Boolean]", Jt = "[object Date]", Yt = "[object Error]", Xt = "[object Map]", Qt = "[object Number]", er = "[object Object]", tr = "[object RegExp]", rr = "[object Set]", nr = "[object String]", sr = "[object URL]", or = Array.isArray, Ge = typeof ArrayBuffer == "function" && ArrayBuffer.isView ? ArrayBuffer.isView : null, Ve = Object.assign, ir = Object.prototype.toString.call.bind(Object.prototype.toString);
1154
- function ar(n) {
1155
- var e = n.areArraysEqual, t = n.areDatesEqual, r = n.areErrorsEqual, s = n.areFunctionsEqual, o = n.areMapsEqual, i = n.areNumbersEqual, l = n.areObjectsEqual, a = n.arePrimitiveWrappersEqual, c = n.areRegExpsEqual, d = n.areSetsEqual, u = n.areTypedArraysEqual, h = n.areUrlsEqual;
1156
- return function(p, f, g) {
1157
- if (p === f)
951
+ var Yt = "[object Arguments]", Jt = "[object Boolean]", Xt = "[object Date]", Qt = "[object Error]", er = "[object Map]", tr = "[object Number]", rr = "[object Object]", nr = "[object RegExp]", sr = "[object Set]", or = "[object String]", ar = "[object URL]", ir = Array.isArray, Ze = typeof ArrayBuffer == "function" && ArrayBuffer.isView ? ArrayBuffer.isView : null, Ue = Object.assign, lr = Object.prototype.toString.call.bind(Object.prototype.toString);
952
+ function ur(r) {
953
+ var e = r.areArraysEqual, t = r.areDatesEqual, n = r.areErrorsEqual, s = r.areFunctionsEqual, o = r.areMapsEqual, i = r.areNumbersEqual, l = r.areObjectsEqual, a = r.arePrimitiveWrappersEqual, c = r.areRegExpsEqual, d = r.areSetsEqual, u = r.areTypedArraysEqual, f = r.areUrlsEqual;
954
+ return function(h, p, g) {
955
+ if (h === p)
1158
956
  return !0;
1159
- if (p == null || f == null)
957
+ if (h == null || p == null)
1160
958
  return !1;
1161
- var v = typeof p;
1162
- if (v !== typeof f)
959
+ var v = typeof h;
960
+ if (v !== typeof p)
1163
961
  return !1;
1164
962
  if (v !== "object")
1165
- return v === "number" ? i(p, f, g) : v === "function" ? s(p, f, g) : !1;
1166
- var E = p.constructor;
1167
- if (E !== f.constructor)
963
+ return v === "number" ? i(h, p, g) : v === "function" ? s(h, p, g) : !1;
964
+ var _ = h.constructor;
965
+ if (_ !== p.constructor)
1168
966
  return !1;
1169
- if (E === Object)
1170
- return l(p, f, g);
1171
- if (or(p))
1172
- return e(p, f, g);
1173
- if (Ge != null && Ge(p))
1174
- return u(p, f, g);
1175
- if (E === Date)
1176
- return t(p, f, g);
1177
- if (E === RegExp)
1178
- return c(p, f, g);
1179
- if (E === Map)
1180
- return o(p, f, g);
1181
- if (E === Set)
1182
- return d(p, f, g);
1183
- var y = ir(p);
1184
- return y === Jt ? t(p, f, g) : y === tr ? c(p, f, g) : y === Xt ? o(p, f, g) : y === rr ? d(p, f, g) : y === er ? typeof p.then != "function" && typeof f.then != "function" && l(p, f, g) : y === sr ? h(p, f, g) : y === Yt ? r(p, f, g) : y === Kt ? l(p, f, g) : y === Ht || y === Qt || y === nr ? a(p, f, g) : !1;
967
+ if (_ === Object)
968
+ return l(h, p, g);
969
+ if (ir(h))
970
+ return e(h, p, g);
971
+ if (Ze != null && Ze(h))
972
+ return u(h, p, g);
973
+ if (_ === Date)
974
+ return t(h, p, g);
975
+ if (_ === RegExp)
976
+ return c(h, p, g);
977
+ if (_ === Map)
978
+ return o(h, p, g);
979
+ if (_ === Set)
980
+ return d(h, p, g);
981
+ var E = lr(h);
982
+ return E === Xt ? t(h, p, g) : E === nr ? c(h, p, g) : E === er ? o(h, p, g) : E === sr ? d(h, p, g) : E === rr ? typeof h.then != "function" && typeof p.then != "function" && l(h, p, g) : E === ar ? f(h, p, g) : E === Qt ? n(h, p, g) : E === Yt ? l(h, p, g) : E === Jt || E === tr || E === or ? a(h, p, g) : !1;
1185
983
  };
1186
984
  }
1187
- function lr(n) {
1188
- var e = n.circular, t = n.createCustomConfig, r = n.strict, s = {
1189
- areArraysEqual: r ? Y : Nt,
1190
- areDatesEqual: Bt,
1191
- areErrorsEqual: Dt,
1192
- areFunctionsEqual: Zt,
1193
- areMapsEqual: r ? Ne(Fe, Y) : Fe,
1194
- areNumbersEqual: Ft,
1195
- areObjectsEqual: r ? Y : Ut,
1196
- arePrimitiveWrappersEqual: Gt,
1197
- areRegExpsEqual: Vt,
1198
- areSetsEqual: r ? Ne(Ue, Y) : Ue,
1199
- areTypedArraysEqual: r ? Y : zt,
1200
- areUrlsEqual: Wt
985
+ function cr(r) {
986
+ var e = r.circular, t = r.createCustomConfig, n = r.strict, s = {
987
+ areArraysEqual: n ? Y : Dt,
988
+ areDatesEqual: Zt,
989
+ areErrorsEqual: Ut,
990
+ areFunctionsEqual: Gt,
991
+ areMapsEqual: n ? Re(Be, Y) : Be,
992
+ areNumbersEqual: Vt,
993
+ areObjectsEqual: n ? Y : Ft,
994
+ arePrimitiveWrappersEqual: zt,
995
+ areRegExpsEqual: Wt,
996
+ areSetsEqual: n ? Re(De, Y) : De,
997
+ areTypedArraysEqual: n ? Y : Ht,
998
+ areUrlsEqual: Kt
1201
999
  };
1202
- if (t && (s = Ve({}, s, t(s))), e) {
1203
- var o = se(s.areArraysEqual), i = se(s.areMapsEqual), l = se(s.areObjectsEqual), a = se(s.areSetsEqual);
1204
- s = Ve({}, s, {
1000
+ if (t && (s = Ue({}, s, t(s))), e) {
1001
+ var o = ne(s.areArraysEqual), i = ne(s.areMapsEqual), l = ne(s.areObjectsEqual), a = ne(s.areSetsEqual);
1002
+ s = Ue({}, s, {
1205
1003
  areArraysEqual: o,
1206
1004
  areMapsEqual: i,
1207
1005
  areObjectsEqual: l,
@@ -1210,18 +1008,18 @@ function lr(n) {
1210
1008
  }
1211
1009
  return s;
1212
1010
  }
1213
- function ur(n) {
1214
- return function(e, t, r, s, o, i, l) {
1215
- return n(e, t, l);
1011
+ function pr(r) {
1012
+ return function(e, t, n, s, o, i, l) {
1013
+ return r(e, t, l);
1216
1014
  };
1217
1015
  }
1218
- function cr(n) {
1219
- var e = n.circular, t = n.comparator, r = n.createState, s = n.equals, o = n.strict;
1220
- if (r)
1016
+ function dr(r) {
1017
+ var e = r.circular, t = r.comparator, n = r.createState, s = r.equals, o = r.strict;
1018
+ if (n)
1221
1019
  return function(a, c) {
1222
- var d = r(), u = d.cache, h = u === void 0 ? e ? /* @__PURE__ */ new WeakMap() : void 0 : u, m = d.meta;
1020
+ var d = n(), u = d.cache, f = u === void 0 ? e ? /* @__PURE__ */ new WeakMap() : void 0 : u, m = d.meta;
1223
1021
  return t(a, c, {
1224
- cache: h,
1022
+ cache: f,
1225
1023
  equals: s,
1226
1024
  meta: m,
1227
1025
  strict: o
@@ -1246,43 +1044,43 @@ function cr(n) {
1246
1044
  return t(a, c, i);
1247
1045
  };
1248
1046
  }
1249
- var ae = R();
1250
- R({ strict: !0 });
1251
- R({ circular: !0 });
1252
- R({
1047
+ var ae = j();
1048
+ j({ strict: !0 });
1049
+ j({ circular: !0 });
1050
+ j({
1253
1051
  circular: !0,
1254
1052
  strict: !0
1255
1053
  });
1256
- R({
1054
+ j({
1257
1055
  createInternalComparator: function() {
1258
- return F;
1056
+ return Z;
1259
1057
  }
1260
1058
  });
1261
- R({
1059
+ j({
1262
1060
  strict: !0,
1263
1061
  createInternalComparator: function() {
1264
- return F;
1062
+ return Z;
1265
1063
  }
1266
1064
  });
1267
- R({
1065
+ j({
1268
1066
  circular: !0,
1269
1067
  createInternalComparator: function() {
1270
- return F;
1068
+ return Z;
1271
1069
  }
1272
1070
  });
1273
- R({
1071
+ j({
1274
1072
  circular: !0,
1275
1073
  createInternalComparator: function() {
1276
- return F;
1074
+ return Z;
1277
1075
  },
1278
1076
  strict: !0
1279
1077
  });
1280
- function R(n) {
1281
- n === void 0 && (n = {});
1282
- var e = n.circular, t = e === void 0 ? !1 : e, r = n.createInternalComparator, s = n.createState, o = n.strict, i = o === void 0 ? !1 : o, l = lr(n), a = ar(l), c = r ? r(a) : ur(a);
1283
- return cr({ circular: t, comparator: a, createState: s, equals: c, strict: i });
1078
+ function j(r) {
1079
+ r === void 0 && (r = {});
1080
+ var e = r.circular, t = e === void 0 ? !1 : e, n = r.createInternalComparator, s = r.createState, o = r.strict, i = o === void 0 ? !1 : o, l = cr(r), a = ur(l), c = n ? n(a) : pr(a);
1081
+ return dr({ circular: t, comparator: a, createState: s, equals: c, strict: i });
1284
1082
  }
1285
- const ze = [
1083
+ const Ge = [
1286
1084
  Int8Array,
1287
1085
  Uint8Array,
1288
1086
  Uint8ClampedArray,
@@ -1292,7 +1090,7 @@ const ze = [
1292
1090
  Uint32Array,
1293
1091
  Float32Array,
1294
1092
  Float64Array
1295
- ], he = 1, X = 8;
1093
+ ], de = 1, J = 8;
1296
1094
  class Ce {
1297
1095
  /**
1298
1096
  * Creates an index from raw `ArrayBuffer` data.
@@ -1301,13 +1099,13 @@ class Ce {
1301
1099
  static from(e) {
1302
1100
  if (!(e instanceof ArrayBuffer))
1303
1101
  throw new Error("Data must be an instance of ArrayBuffer.");
1304
- const [t, r] = new Uint8Array(e, 0, 2);
1102
+ const [t, n] = new Uint8Array(e, 0, 2);
1305
1103
  if (t !== 219)
1306
1104
  throw new Error("Data does not appear to be in a KDBush format.");
1307
- const s = r >> 4;
1308
- if (s !== he)
1309
- throw new Error(`Got v${s} data when expected v${he}.`);
1310
- const o = ze[r & 15];
1105
+ const s = n >> 4;
1106
+ if (s !== de)
1107
+ throw new Error(`Got v${s} data when expected v${de}.`);
1108
+ const o = Ge[n & 15];
1311
1109
  if (!o)
1312
1110
  throw new Error("Unrecognized array type.");
1313
1111
  const [i] = new Uint16Array(e, 2, 1), [l] = new Uint32Array(e, 4, 1);
@@ -1320,14 +1118,14 @@ class Ce {
1320
1118
  * @param {TypedArrayConstructor} [ArrayType=Float64Array] The array type used for coordinates storage (`Float64Array` by default).
1321
1119
  * @param {ArrayBuffer} [data] (For internal use only)
1322
1120
  */
1323
- constructor(e, t = 64, r = Float64Array, s) {
1121
+ constructor(e, t = 64, n = Float64Array, s) {
1324
1122
  if (isNaN(e) || e < 0)
1325
1123
  throw new Error(`Unpexpected numItems value: ${e}.`);
1326
- this.numItems = +e, this.nodeSize = Math.min(Math.max(+t, 2), 65535), this.ArrayType = r, this.IndexArrayType = e < 65536 ? Uint16Array : Uint32Array;
1327
- const o = ze.indexOf(this.ArrayType), i = e * 2 * this.ArrayType.BYTES_PER_ELEMENT, l = e * this.IndexArrayType.BYTES_PER_ELEMENT, a = (8 - l % 8) % 8;
1124
+ this.numItems = +e, this.nodeSize = Math.min(Math.max(+t, 2), 65535), this.ArrayType = n, this.IndexArrayType = e < 65536 ? Uint16Array : Uint32Array;
1125
+ const o = Ge.indexOf(this.ArrayType), i = e * 2 * this.ArrayType.BYTES_PER_ELEMENT, l = e * this.IndexArrayType.BYTES_PER_ELEMENT, a = (8 - l % 8) % 8;
1328
1126
  if (o < 0)
1329
- throw new Error(`Unexpected typed array class: ${r}.`);
1330
- s && s instanceof ArrayBuffer ? (this.data = s, this.ids = new this.IndexArrayType(this.data, X, e), this.coords = new this.ArrayType(this.data, X + l + a, e * 2), this._pos = e * 2, this._finished = !0) : (this.data = new ArrayBuffer(X + i + l + a), this.ids = new this.IndexArrayType(this.data, X, e), this.coords = new this.ArrayType(this.data, X + l + a, e * 2), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, (he << 4) + o]), new Uint16Array(this.data, 2, 1)[0] = t, new Uint32Array(this.data, 4, 1)[0] = e);
1127
+ throw new Error(`Unexpected typed array class: ${n}.`);
1128
+ s && s instanceof ArrayBuffer ? (this.data = s, this.ids = new this.IndexArrayType(this.data, J, e), this.coords = new this.ArrayType(this.data, J + l + a, e * 2), this._pos = e * 2, this._finished = !0) : (this.data = new ArrayBuffer(J + i + l + a), this.ids = new this.IndexArrayType(this.data, J, e), this.coords = new this.ArrayType(this.data, J + l + a, e * 2), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, (de << 4) + o]), new Uint16Array(this.data, 2, 1)[0] = t, new Uint32Array(this.data, 4, 1)[0] = e);
1331
1129
  }
1332
1130
  /**
1333
1131
  * Add a point to the index.
@@ -1336,8 +1134,8 @@ class Ce {
1336
1134
  * @returns {number} An incremental index associated with the added item (starting from `0`).
1337
1135
  */
1338
1136
  add(e, t) {
1339
- const r = this._pos >> 1;
1340
- return this.ids[r] = r, this.coords[this._pos++] = e, this.coords[this._pos++] = t, r;
1137
+ const n = this._pos >> 1;
1138
+ return this.ids[n] = n, this.coords[this._pos++] = e, this.coords[this._pos++] = t, n;
1341
1139
  }
1342
1140
  /**
1343
1141
  * Perform indexing of the added points.
@@ -1346,7 +1144,7 @@ class Ce {
1346
1144
  const e = this._pos >> 1;
1347
1145
  if (e !== this.numItems)
1348
1146
  throw new Error(`Added ${e} items when expected ${this.numItems}.`);
1349
- return ve(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = !0, this;
1147
+ return ge(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = !0, this;
1350
1148
  }
1351
1149
  /**
1352
1150
  * Search the index for items within a given bounding box.
@@ -1356,21 +1154,21 @@ class Ce {
1356
1154
  * @param {number} maxY
1357
1155
  * @returns {number[]} An array of indices correponding to the found items.
1358
1156
  */
1359
- range(e, t, r, s) {
1157
+ range(e, t, n, s) {
1360
1158
  if (!this._finished)
1361
1159
  throw new Error("Data not yet indexed - call index.finish().");
1362
1160
  const { ids: o, coords: i, nodeSize: l } = this, a = [0, o.length - 1, 0], c = [];
1363
1161
  for (; a.length; ) {
1364
- const d = a.pop() || 0, u = a.pop() || 0, h = a.pop() || 0;
1365
- if (u - h <= l) {
1366
- for (let g = h; g <= u; g++) {
1367
- const v = i[2 * g], E = i[2 * g + 1];
1368
- v >= e && v <= r && E >= t && E <= s && c.push(o[g]);
1162
+ const d = a.pop() || 0, u = a.pop() || 0, f = a.pop() || 0;
1163
+ if (u - f <= l) {
1164
+ for (let g = f; g <= u; g++) {
1165
+ const v = i[2 * g], _ = i[2 * g + 1];
1166
+ v >= e && v <= n && _ >= t && _ <= s && c.push(o[g]);
1369
1167
  }
1370
1168
  continue;
1371
1169
  }
1372
- const m = h + u >> 1, p = i[2 * m], f = i[2 * m + 1];
1373
- p >= e && p <= r && f >= t && f <= s && c.push(o[m]), (d === 0 ? e <= p : t <= f) && (a.push(h), a.push(m - 1), a.push(1 - d)), (d === 0 ? r >= p : s >= f) && (a.push(m + 1), a.push(u), a.push(1 - d));
1170
+ const m = f + u >> 1, h = i[2 * m], p = i[2 * m + 1];
1171
+ h >= e && h <= n && p >= t && p <= s && c.push(o[m]), (d === 0 ? e <= h : t <= p) && (a.push(f), a.push(m - 1), a.push(1 - d)), (d === 0 ? n >= h : s >= p) && (a.push(m + 1), a.push(u), a.push(1 - d));
1374
1172
  }
1375
1173
  return c;
1376
1174
  }
@@ -1381,58 +1179,58 @@ class Ce {
1381
1179
  * @param {number} r Query radius.
1382
1180
  * @returns {number[]} An array of indices correponding to the found items.
1383
1181
  */
1384
- within(e, t, r) {
1182
+ within(e, t, n) {
1385
1183
  if (!this._finished)
1386
1184
  throw new Error("Data not yet indexed - call index.finish().");
1387
- const { ids: s, coords: o, nodeSize: i } = this, l = [0, s.length - 1, 0], a = [], c = r * r;
1185
+ const { ids: s, coords: o, nodeSize: i } = this, l = [0, s.length - 1, 0], a = [], c = n * n;
1388
1186
  for (; l.length; ) {
1389
- const d = l.pop() || 0, u = l.pop() || 0, h = l.pop() || 0;
1390
- if (u - h <= i) {
1391
- for (let g = h; g <= u; g++)
1392
- We(o[2 * g], o[2 * g + 1], e, t) <= c && a.push(s[g]);
1187
+ const d = l.pop() || 0, u = l.pop() || 0, f = l.pop() || 0;
1188
+ if (u - f <= i) {
1189
+ for (let g = f; g <= u; g++)
1190
+ Ve(o[2 * g], o[2 * g + 1], e, t) <= c && a.push(s[g]);
1393
1191
  continue;
1394
1192
  }
1395
- const m = h + u >> 1, p = o[2 * m], f = o[2 * m + 1];
1396
- We(p, f, e, t) <= c && a.push(s[m]), (d === 0 ? e - r <= p : t - r <= f) && (l.push(h), l.push(m - 1), l.push(1 - d)), (d === 0 ? e + r >= p : t + r >= f) && (l.push(m + 1), l.push(u), l.push(1 - d));
1193
+ const m = f + u >> 1, h = o[2 * m], p = o[2 * m + 1];
1194
+ Ve(h, p, e, t) <= c && a.push(s[m]), (d === 0 ? e - n <= h : t - n <= p) && (l.push(f), l.push(m - 1), l.push(1 - d)), (d === 0 ? e + n >= h : t + n >= p) && (l.push(m + 1), l.push(u), l.push(1 - d));
1397
1195
  }
1398
1196
  return a;
1399
1197
  }
1400
1198
  }
1401
- function ve(n, e, t, r, s, o) {
1402
- if (s - r <= t)
1199
+ function ge(r, e, t, n, s, o) {
1200
+ if (s - n <= t)
1403
1201
  return;
1404
- const i = r + s >> 1;
1405
- et(n, e, i, r, s, o), ve(n, e, t, r, i - 1, 1 - o), ve(n, e, t, i + 1, s, 1 - o);
1202
+ const i = n + s >> 1;
1203
+ Je(r, e, i, n, s, o), ge(r, e, t, n, i - 1, 1 - o), ge(r, e, t, i + 1, s, 1 - o);
1406
1204
  }
1407
- function et(n, e, t, r, s, o) {
1408
- for (; s > r; ) {
1409
- if (s - r > 600) {
1410
- const c = s - r + 1, d = t - r + 1, u = Math.log(c), h = 0.5 * Math.exp(2 * u / 3), m = 0.5 * Math.sqrt(u * h * (c - h) / c) * (d - c / 2 < 0 ? -1 : 1), p = Math.max(r, Math.floor(t - d * h / c + m)), f = Math.min(s, Math.floor(t + (c - d) * h / c + m));
1411
- et(n, e, t, p, f, o);
1205
+ function Je(r, e, t, n, s, o) {
1206
+ for (; s > n; ) {
1207
+ if (s - n > 600) {
1208
+ const c = s - n + 1, d = t - n + 1, u = Math.log(c), f = 0.5 * Math.exp(2 * u / 3), m = 0.5 * Math.sqrt(u * f * (c - f) / c) * (d - c / 2 < 0 ? -1 : 1), h = Math.max(n, Math.floor(t - d * f / c + m)), p = Math.min(s, Math.floor(t + (c - d) * f / c + m));
1209
+ Je(r, e, t, h, p, o);
1412
1210
  }
1413
1211
  const i = e[2 * t + o];
1414
- let l = r, a = s;
1415
- for (Q(n, e, r, t), e[2 * s + o] > i && Q(n, e, r, s); l < a; ) {
1416
- for (Q(n, e, l, a), l++, a--; e[2 * l + o] < i; )
1212
+ let l = n, a = s;
1213
+ for (X(r, e, n, t), e[2 * s + o] > i && X(r, e, n, s); l < a; ) {
1214
+ for (X(r, e, l, a), l++, a--; e[2 * l + o] < i; )
1417
1215
  l++;
1418
1216
  for (; e[2 * a + o] > i; )
1419
1217
  a--;
1420
1218
  }
1421
- e[2 * r + o] === i ? Q(n, e, r, a) : (a++, Q(n, e, a, s)), a <= t && (r = a + 1), t <= a && (s = a - 1);
1219
+ e[2 * n + o] === i ? X(r, e, n, a) : (a++, X(r, e, a, s)), a <= t && (n = a + 1), t <= a && (s = a - 1);
1422
1220
  }
1423
1221
  }
1424
- function Q(n, e, t, r) {
1425
- me(n, t, r), me(e, 2 * t, 2 * r), me(e, 2 * t + 1, 2 * r + 1);
1222
+ function X(r, e, t, n) {
1223
+ fe(r, t, n), fe(e, 2 * t, 2 * n), fe(e, 2 * t + 1, 2 * n + 1);
1426
1224
  }
1427
- function me(n, e, t) {
1428
- const r = n[e];
1429
- n[e] = n[t], n[t] = r;
1225
+ function fe(r, e, t) {
1226
+ const n = r[e];
1227
+ r[e] = r[t], r[t] = n;
1430
1228
  }
1431
- function We(n, e, t, r) {
1432
- const s = n - t, o = e - r;
1229
+ function Ve(r, e, t, n) {
1230
+ const s = r - t, o = e - n;
1433
1231
  return s * s + o * o;
1434
1232
  }
1435
- const dr = {
1233
+ const fr = {
1436
1234
  minZoom: 0,
1437
1235
  // min zoom to generate clusters on
1438
1236
  maxZoom: 16,
@@ -1453,15 +1251,15 @@ const dr = {
1453
1251
  reduce: null,
1454
1252
  // (accumulated, props) => { accumulated.sum += props.sum; }
1455
1253
  // properties to use for individual points when running the reducer
1456
- map: (n) => n
1254
+ map: (r) => r
1457
1255
  // props => ({sum: props.my_value})
1458
- }, Ke = Math.fround || ((n) => (e) => (n[0] = +e, n[0]))(new Float32Array(1)), $ = 2, x = 3, ge = 4, L = 5, tt = 6;
1459
- class rt {
1256
+ }, Fe = Math.fround || ((r) => (e) => (r[0] = +e, r[0]))(new Float32Array(1)), N = 2, x = 3, he = 4, L = 5, Xe = 6;
1257
+ class Qe {
1460
1258
  constructor(e) {
1461
- this.options = Object.assign(Object.create(dr), e), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];
1259
+ this.options = Object.assign(Object.create(fr), e), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];
1462
1260
  }
1463
1261
  load(e) {
1464
- const { log: t, minZoom: r, maxZoom: s } = this.options;
1262
+ const { log: t, minZoom: n, maxZoom: s } = this.options;
1465
1263
  t && console.time("total time");
1466
1264
  const o = `prepare ${e.length} points`;
1467
1265
  t && console.time(o), this.points = e;
@@ -1470,9 +1268,9 @@ class rt {
1470
1268
  const c = e[a];
1471
1269
  if (!c.geometry)
1472
1270
  continue;
1473
- const [d, u] = c.geometry.coordinates, h = Ke(oe(d)), m = Ke(ie(u));
1271
+ const [d, u] = c.geometry.coordinates, f = Fe(se(d)), m = Fe(oe(u));
1474
1272
  i.push(
1475
- h,
1273
+ f,
1476
1274
  m,
1477
1275
  // projected point coordinates
1478
1276
  1 / 0,
@@ -1487,74 +1285,74 @@ class rt {
1487
1285
  }
1488
1286
  let l = this.trees[s + 1] = this._createTree(i);
1489
1287
  t && console.timeEnd(o);
1490
- for (let a = s; a >= r; a--) {
1288
+ for (let a = s; a >= n; a--) {
1491
1289
  const c = +Date.now();
1492
1290
  l = this.trees[a] = this._createTree(this._cluster(l, a)), t && console.log("z%d: %d clusters in %dms", a, l.numItems, +Date.now() - c);
1493
1291
  }
1494
1292
  return t && console.timeEnd("total time"), this;
1495
1293
  }
1496
1294
  getClusters(e, t) {
1497
- let r = ((e[0] + 180) % 360 + 360) % 360 - 180;
1295
+ let n = ((e[0] + 180) % 360 + 360) % 360 - 180;
1498
1296
  const s = Math.max(-90, Math.min(90, e[1]));
1499
1297
  let o = e[2] === 180 ? 180 : ((e[2] + 180) % 360 + 360) % 360 - 180;
1500
1298
  const i = Math.max(-90, Math.min(90, e[3]));
1501
1299
  if (e[2] - e[0] >= 360)
1502
- r = -180, o = 180;
1503
- else if (r > o) {
1504
- const u = this.getClusters([r, s, 180, i], t), h = this.getClusters([-180, s, o, i], t);
1505
- return u.concat(h);
1300
+ n = -180, o = 180;
1301
+ else if (n > o) {
1302
+ const u = this.getClusters([n, s, 180, i], t), f = this.getClusters([-180, s, o, i], t);
1303
+ return u.concat(f);
1506
1304
  }
1507
- const l = this.trees[this._limitZoom(t)], a = l.range(oe(r), ie(i), oe(o), ie(s)), c = l.data, d = [];
1305
+ const l = this.trees[this._limitZoom(t)], a = l.range(se(n), oe(i), se(o), oe(s)), c = l.data, d = [];
1508
1306
  for (const u of a) {
1509
- const h = this.stride * u;
1510
- d.push(c[h + L] > 1 ? He(c, h, this.clusterProps) : this.points[c[h + x]]);
1307
+ const f = this.stride * u;
1308
+ d.push(c[f + L] > 1 ? ze(c, f, this.clusterProps) : this.points[c[f + x]]);
1511
1309
  }
1512
1310
  return d;
1513
1311
  }
1514
1312
  getChildren(e) {
1515
- const t = this._getOriginId(e), r = this._getOriginZoom(e), s = "No cluster with the specified id.", o = this.trees[r];
1313
+ const t = this._getOriginId(e), n = this._getOriginZoom(e), s = "No cluster with the specified id.", o = this.trees[n];
1516
1314
  if (!o)
1517
1315
  throw new Error(s);
1518
1316
  const i = o.data;
1519
1317
  if (t * this.stride >= i.length)
1520
1318
  throw new Error(s);
1521
- const l = this.options.radius / (this.options.extent * Math.pow(2, r - 1)), a = i[t * this.stride], c = i[t * this.stride + 1], d = o.within(a, c, l), u = [];
1522
- for (const h of d) {
1523
- const m = h * this.stride;
1524
- i[m + ge] === e && u.push(i[m + L] > 1 ? He(i, m, this.clusterProps) : this.points[i[m + x]]);
1319
+ const l = this.options.radius / (this.options.extent * Math.pow(2, n - 1)), a = i[t * this.stride], c = i[t * this.stride + 1], d = o.within(a, c, l), u = [];
1320
+ for (const f of d) {
1321
+ const m = f * this.stride;
1322
+ i[m + he] === e && u.push(i[m + L] > 1 ? ze(i, m, this.clusterProps) : this.points[i[m + x]]);
1525
1323
  }
1526
1324
  if (u.length === 0)
1527
1325
  throw new Error(s);
1528
1326
  return u;
1529
1327
  }
1530
- getLeaves(e, t, r) {
1531
- t = t || 10, r = r || 0;
1328
+ getLeaves(e, t, n) {
1329
+ t = t || 10, n = n || 0;
1532
1330
  const s = [];
1533
- return this._appendLeaves(s, e, t, r, 0), s;
1331
+ return this._appendLeaves(s, e, t, n, 0), s;
1534
1332
  }
1535
- getTile(e, t, r) {
1536
- const s = this.trees[this._limitZoom(e)], o = Math.pow(2, e), { extent: i, radius: l } = this.options, a = l / i, c = (r - a) / o, d = (r + 1 + a) / o, u = {
1333
+ getTile(e, t, n) {
1334
+ const s = this.trees[this._limitZoom(e)], o = Math.pow(2, e), { extent: i, radius: l } = this.options, a = l / i, c = (n - a) / o, d = (n + 1 + a) / o, u = {
1537
1335
  features: []
1538
1336
  };
1539
1337
  return this._addTileFeatures(
1540
1338
  s.range((t - a) / o, c, (t + 1 + a) / o, d),
1541
1339
  s.data,
1542
1340
  t,
1543
- r,
1341
+ n,
1544
1342
  o,
1545
1343
  u
1546
1344
  ), t === 0 && this._addTileFeatures(
1547
1345
  s.range(1 - a / o, c, 1, d),
1548
1346
  s.data,
1549
1347
  o,
1550
- r,
1348
+ n,
1551
1349
  o,
1552
1350
  u
1553
1351
  ), t === o - 1 && this._addTileFeatures(
1554
1352
  s.range(0, c, a / o, d),
1555
1353
  s.data,
1556
1354
  -1,
1557
- r,
1355
+ n,
1558
1356
  o,
1559
1357
  u
1560
1358
  ), u.features.length ? u : null;
@@ -1562,89 +1360,89 @@ class rt {
1562
1360
  getClusterExpansionZoom(e) {
1563
1361
  let t = this._getOriginZoom(e) - 1;
1564
1362
  for (; t <= this.options.maxZoom; ) {
1565
- const r = this.getChildren(e);
1566
- if (t++, r.length !== 1)
1363
+ const n = this.getChildren(e);
1364
+ if (t++, n.length !== 1)
1567
1365
  break;
1568
- e = r[0].properties.cluster_id;
1366
+ e = n[0].properties.cluster_id;
1569
1367
  }
1570
1368
  return t;
1571
1369
  }
1572
- _appendLeaves(e, t, r, s, o) {
1370
+ _appendLeaves(e, t, n, s, o) {
1573
1371
  const i = this.getChildren(t);
1574
1372
  for (const l of i) {
1575
1373
  const a = l.properties;
1576
- if (a && a.cluster ? o + a.point_count <= s ? o += a.point_count : o = this._appendLeaves(e, a.cluster_id, r, s, o) : o < s ? o++ : e.push(l), e.length === r)
1374
+ if (a && a.cluster ? o + a.point_count <= s ? o += a.point_count : o = this._appendLeaves(e, a.cluster_id, n, s, o) : o < s ? o++ : e.push(l), e.length === n)
1577
1375
  break;
1578
1376
  }
1579
1377
  return o;
1580
1378
  }
1581
1379
  _createTree(e) {
1582
1380
  const t = new Ce(e.length / this.stride | 0, this.options.nodeSize, Float32Array);
1583
- for (let r = 0; r < e.length; r += this.stride)
1584
- t.add(e[r], e[r + 1]);
1381
+ for (let n = 0; n < e.length; n += this.stride)
1382
+ t.add(e[n], e[n + 1]);
1585
1383
  return t.finish(), t.data = e, t;
1586
1384
  }
1587
- _addTileFeatures(e, t, r, s, o, i) {
1385
+ _addTileFeatures(e, t, n, s, o, i) {
1588
1386
  for (const l of e) {
1589
1387
  const a = l * this.stride, c = t[a + L] > 1;
1590
- let d, u, h;
1388
+ let d, u, f;
1591
1389
  if (c)
1592
- d = nt(t, a, this.clusterProps), u = t[a], h = t[a + 1];
1390
+ d = et(t, a, this.clusterProps), u = t[a], f = t[a + 1];
1593
1391
  else {
1594
- const f = this.points[t[a + x]];
1595
- d = f.properties;
1596
- const [g, v] = f.geometry.coordinates;
1597
- u = oe(g), h = ie(v);
1392
+ const p = this.points[t[a + x]];
1393
+ d = p.properties;
1394
+ const [g, v] = p.geometry.coordinates;
1395
+ u = se(g), f = oe(v);
1598
1396
  }
1599
1397
  const m = {
1600
1398
  type: 1,
1601
1399
  geometry: [[
1602
- Math.round(this.options.extent * (u * o - r)),
1603
- Math.round(this.options.extent * (h * o - s))
1400
+ Math.round(this.options.extent * (u * o - n)),
1401
+ Math.round(this.options.extent * (f * o - s))
1604
1402
  ]],
1605
1403
  tags: d
1606
1404
  };
1607
- let p;
1608
- c || this.options.generateId ? p = t[a + x] : p = this.points[t[a + x]].id, p !== void 0 && (m.id = p), i.features.push(m);
1405
+ let h;
1406
+ c || this.options.generateId ? h = t[a + x] : h = this.points[t[a + x]].id, h !== void 0 && (m.id = h), i.features.push(m);
1609
1407
  }
1610
1408
  }
1611
1409
  _limitZoom(e) {
1612
1410
  return Math.max(this.options.minZoom, Math.min(Math.floor(+e), this.options.maxZoom + 1));
1613
1411
  }
1614
1412
  _cluster(e, t) {
1615
- const { radius: r, extent: s, reduce: o, minPoints: i } = this.options, l = r / (s * Math.pow(2, t)), a = e.data, c = [], d = this.stride;
1413
+ const { radius: n, extent: s, reduce: o, minPoints: i } = this.options, l = n / (s * Math.pow(2, t)), a = e.data, c = [], d = this.stride;
1616
1414
  for (let u = 0; u < a.length; u += d) {
1617
- if (a[u + $] <= t)
1415
+ if (a[u + N] <= t)
1618
1416
  continue;
1619
- a[u + $] = t;
1620
- const h = a[u], m = a[u + 1], p = e.within(a[u], a[u + 1], l), f = a[u + L];
1621
- let g = f;
1622
- for (const v of p) {
1623
- const E = v * d;
1624
- a[E + $] > t && (g += a[E + L]);
1417
+ a[u + N] = t;
1418
+ const f = a[u], m = a[u + 1], h = e.within(a[u], a[u + 1], l), p = a[u + L];
1419
+ let g = p;
1420
+ for (const v of h) {
1421
+ const _ = v * d;
1422
+ a[_ + N] > t && (g += a[_ + L]);
1625
1423
  }
1626
- if (g > f && g >= i) {
1627
- let v = h * f, E = m * f, y, M = -1;
1628
- const O = ((u / d | 0) << 5) + (t + 1) + this.points.length;
1629
- for (const b of p) {
1424
+ if (g > p && g >= i) {
1425
+ let v = f * p, _ = m * p, E, q = -1;
1426
+ const P = ((u / d | 0) << 5) + (t + 1) + this.points.length;
1427
+ for (const b of h) {
1630
1428
  const C = b * d;
1631
- if (a[C + $] <= t)
1429
+ if (a[C + N] <= t)
1632
1430
  continue;
1633
- a[C + $] = t;
1431
+ a[C + N] = t;
1634
1432
  const T = a[C + L];
1635
- v += a[C] * T, E += a[C + 1] * T, a[C + ge] = O, o && (y || (y = this._map(a, u, !0), M = this.clusterProps.length, this.clusterProps.push(y)), o(y, this._map(a, C)));
1433
+ v += a[C] * T, _ += a[C + 1] * T, a[C + he] = P, o && (E || (E = this._map(a, u, !0), q = this.clusterProps.length, this.clusterProps.push(E)), o(E, this._map(a, C)));
1636
1434
  }
1637
- a[u + ge] = O, c.push(v / g, E / g, 1 / 0, O, -1, g), o && c.push(M);
1435
+ a[u + he] = P, c.push(v / g, _ / g, 1 / 0, P, -1, g), o && c.push(q);
1638
1436
  } else {
1639
1437
  for (let v = 0; v < d; v++)
1640
1438
  c.push(a[u + v]);
1641
1439
  if (g > 1)
1642
- for (const v of p) {
1643
- const E = v * d;
1644
- if (!(a[E + $] <= t)) {
1645
- a[E + $] = t;
1646
- for (let y = 0; y < d; y++)
1647
- c.push(a[E + y]);
1440
+ for (const v of h) {
1441
+ const _ = v * d;
1442
+ if (!(a[_ + N] <= t)) {
1443
+ a[_ + N] = t;
1444
+ for (let E = 0; E < d; E++)
1445
+ c.push(a[_ + E]);
1648
1446
  }
1649
1447
  }
1650
1448
  }
@@ -1659,59 +1457,59 @@ class rt {
1659
1457
  _getOriginZoom(e) {
1660
1458
  return (e - this.points.length) % 32;
1661
1459
  }
1662
- _map(e, t, r) {
1460
+ _map(e, t, n) {
1663
1461
  if (e[t + L] > 1) {
1664
- const i = this.clusterProps[e[t + tt]];
1665
- return r ? Object.assign({}, i) : i;
1462
+ const i = this.clusterProps[e[t + Xe]];
1463
+ return n ? Object.assign({}, i) : i;
1666
1464
  }
1667
1465
  const s = this.points[e[t + x]].properties, o = this.options.map(s);
1668
- return r && o === s ? Object.assign({}, o) : o;
1466
+ return n && o === s ? Object.assign({}, o) : o;
1669
1467
  }
1670
1468
  }
1671
- function He(n, e, t) {
1469
+ function ze(r, e, t) {
1672
1470
  return {
1673
1471
  type: "Feature",
1674
- id: n[e + x],
1675
- properties: nt(n, e, t),
1472
+ id: r[e + x],
1473
+ properties: et(r, e, t),
1676
1474
  geometry: {
1677
1475
  type: "Point",
1678
- coordinates: [pr(n[e]), fr(n[e + 1])]
1476
+ coordinates: [hr(r[e]), mr(r[e + 1])]
1679
1477
  }
1680
1478
  };
1681
1479
  }
1682
- function nt(n, e, t) {
1683
- const r = n[e + L], s = r >= 1e4 ? `${Math.round(r / 1e3)}k` : r >= 1e3 ? `${Math.round(r / 100) / 10}k` : r, o = n[e + tt], i = o === -1 ? {} : Object.assign({}, t[o]);
1480
+ function et(r, e, t) {
1481
+ const n = r[e + L], s = n >= 1e4 ? `${Math.round(n / 1e3)}k` : n >= 1e3 ? `${Math.round(n / 100) / 10}k` : n, o = r[e + Xe], i = o === -1 ? {} : Object.assign({}, t[o]);
1684
1482
  return Object.assign(i, {
1685
1483
  cluster: !0,
1686
- cluster_id: n[e + x],
1687
- point_count: r,
1484
+ cluster_id: r[e + x],
1485
+ point_count: n,
1688
1486
  point_count_abbreviated: s
1689
1487
  });
1690
1488
  }
1691
- function oe(n) {
1692
- return n / 360 + 0.5;
1489
+ function se(r) {
1490
+ return r / 360 + 0.5;
1693
1491
  }
1694
- function ie(n) {
1695
- const e = Math.sin(n * Math.PI / 180), t = 0.5 - 0.25 * Math.log((1 + e) / (1 - e)) / Math.PI;
1492
+ function oe(r) {
1493
+ const e = Math.sin(r * Math.PI / 180), t = 0.5 - 0.25 * Math.log((1 + e) / (1 - e)) / Math.PI;
1696
1494
  return t < 0 ? 0 : t > 1 ? 1 : t;
1697
1495
  }
1698
- function pr(n) {
1699
- return (n - 0.5) * 360;
1496
+ function hr(r) {
1497
+ return (r - 0.5) * 360;
1700
1498
  }
1701
- function fr(n) {
1702
- const e = (180 - n * 360) * Math.PI / 180;
1499
+ function mr(r) {
1500
+ const e = (180 - r * 360) * Math.PI / 180;
1703
1501
  return 360 * Math.atan(Math.exp(e)) / Math.PI - 90;
1704
1502
  }
1705
- function Oe(n, e) {
1503
+ function Oe(r, e) {
1706
1504
  var t = {};
1707
- for (var r in n)
1708
- Object.prototype.hasOwnProperty.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
1709
- if (n != null && typeof Object.getOwnPropertySymbols == "function")
1710
- for (var s = 0, r = Object.getOwnPropertySymbols(n); s < r.length; s++)
1711
- e.indexOf(r[s]) < 0 && Object.prototype.propertyIsEnumerable.call(n, r[s]) && (t[r[s]] = n[r[s]]);
1505
+ for (var n in r)
1506
+ Object.prototype.hasOwnProperty.call(r, n) && e.indexOf(n) < 0 && (t[n] = r[n]);
1507
+ if (r != null && typeof Object.getOwnPropertySymbols == "function")
1508
+ for (var s = 0, n = Object.getOwnPropertySymbols(r); s < n.length; s++)
1509
+ e.indexOf(n[s]) < 0 && Object.prototype.propertyIsEnumerable.call(r, n[s]) && (t[n[s]] = r[n[s]]);
1712
1510
  return t;
1713
1511
  }
1714
- class _ {
1512
+ class w {
1715
1513
  static isAdvancedMarkerAvailable(e) {
1716
1514
  return google.maps.marker && e.getMapCapabilities().isAdvancedMarkersAvailable === !0;
1717
1515
  }
@@ -1737,7 +1535,7 @@ class _ {
1737
1535
  return this.isAdvancedMarker(e) ? !0 : e.getVisible();
1738
1536
  }
1739
1537
  }
1740
- class te {
1538
+ class ee {
1741
1539
  constructor({ markers: e, position: t }) {
1742
1540
  this.markers = [], e && (this.markers = e), t && (t instanceof google.maps.LatLng ? this._position = t : this._position = new google.maps.LatLng(t));
1743
1541
  }
@@ -1746,7 +1544,7 @@ class te {
1746
1544
  return;
1747
1545
  const e = new google.maps.LatLngBounds(this._position, this._position);
1748
1546
  for (const t of this.markers)
1749
- e.extend(_.getPosition(t));
1547
+ e.extend(w.getPosition(t));
1750
1548
  return e;
1751
1549
  }
1752
1550
  get position() {
@@ -1756,7 +1554,7 @@ class te {
1756
1554
  * Get the count of **visible** markers.
1757
1555
  */
1758
1556
  get count() {
1759
- return this.markers.filter((e) => _.getVisible(e)).length;
1557
+ return this.markers.filter((e) => w.getVisible(e)).length;
1760
1558
  }
1761
1559
  /**
1762
1560
  * Add a marker to the cluster.
@@ -1768,32 +1566,32 @@ class te {
1768
1566
  * Cleanup references and remove marker from map.
1769
1567
  */
1770
1568
  delete() {
1771
- this.marker && (_.setMap(this.marker, null), this.marker = void 0), this.markers.length = 0;
1569
+ this.marker && (w.setMap(this.marker, null), this.marker = void 0), this.markers.length = 0;
1772
1570
  }
1773
1571
  }
1774
- function A(n, e = "assertion failed") {
1775
- if (n == null)
1572
+ function A(r, e = "assertion failed") {
1573
+ if (r == null)
1776
1574
  throw Error(e);
1777
1575
  }
1778
- const hr = (n, e, t, r) => {
1779
- const s = n.getBounds();
1576
+ const gr = (r, e, t, n) => {
1577
+ const s = r.getBounds();
1780
1578
  A(s);
1781
- const o = st(s, e, r);
1782
- return t.filter((i) => o.contains(_.getPosition(i)));
1783
- }, st = (n, e, t) => {
1784
- const { northEast: r, southWest: s } = gr(n, e), o = vr({ northEast: r, southWest: s }, t);
1785
- return yr(o, e);
1786
- }, mr = (n, e, t) => {
1787
- const r = st(n, e, t), s = r.getNorthEast(), o = r.getSouthWest();
1579
+ const o = tt(s, e, n);
1580
+ return t.filter((i) => o.contains(w.getPosition(i)));
1581
+ }, tt = (r, e, t) => {
1582
+ const { northEast: n, southWest: s } = yr(r, e), o = _r({ northEast: n, southWest: s }, t);
1583
+ return Er(o, e);
1584
+ }, vr = (r, e, t) => {
1585
+ const n = tt(r, e, t), s = n.getNorthEast(), o = n.getSouthWest();
1788
1586
  return [o.lng(), o.lat(), s.lng(), s.lat()];
1789
- }, gr = (n, e) => {
1790
- const t = e.fromLatLngToDivPixel(n.getNorthEast()), r = e.fromLatLngToDivPixel(n.getSouthWest());
1791
- return A(t), A(r), { northEast: t, southWest: r };
1792
- }, vr = ({ northEast: n, southWest: e }, t) => (n.x += t, n.y -= t, e.x -= t, e.y += t, { northEast: n, southWest: e }), yr = ({ northEast: n, southWest: e }, t) => {
1793
- const r = t.fromDivPixelToLatLng(e), s = t.fromDivPixelToLatLng(n);
1794
- return new google.maps.LatLngBounds(r, s);
1587
+ }, yr = (r, e) => {
1588
+ const t = e.fromLatLngToDivPixel(r.getNorthEast()), n = e.fromLatLngToDivPixel(r.getSouthWest());
1589
+ return A(t), A(n), { northEast: t, southWest: n };
1590
+ }, _r = ({ northEast: r, southWest: e }, t) => (r.x += t, r.y -= t, e.x -= t, e.y += t, { northEast: r, southWest: e }), Er = ({ northEast: r, southWest: e }, t) => {
1591
+ const n = t.fromDivPixelToLatLng(e), s = t.fromDivPixelToLatLng(r);
1592
+ return new google.maps.LatLngBounds(n, s);
1795
1593
  };
1796
- class ot {
1594
+ class rt {
1797
1595
  constructor({ maxZoom: e = 16 }) {
1798
1596
  this.maxZoom = e;
1799
1597
  }
@@ -1810,15 +1608,15 @@ class ot {
1810
1608
  * ```
1811
1609
  */
1812
1610
  noop({ markers: e }) {
1813
- return Er(e);
1611
+ return kr(e);
1814
1612
  }
1815
1613
  }
1816
- class wr extends ot {
1614
+ class wr extends rt {
1817
1615
  constructor(e) {
1818
- var { viewportPadding: t = 60 } = e, r = Oe(e, ["viewportPadding"]);
1819
- super(r), this.viewportPadding = 60, this.viewportPadding = t;
1616
+ var { viewportPadding: t = 60 } = e, n = Oe(e, ["viewportPadding"]);
1617
+ super(n), this.viewportPadding = 60, this.viewportPadding = t;
1820
1618
  }
1821
- calculate({ markers: e, map: t, mapCanvasProjection: r }) {
1619
+ calculate({ markers: e, map: t, mapCanvasProjection: n }) {
1822
1620
  const s = t.getZoom();
1823
1621
  return A(s), s >= this.maxZoom ? {
1824
1622
  clusters: this.noop({
@@ -1827,30 +1625,30 @@ class wr extends ot {
1827
1625
  changed: !1
1828
1626
  } : {
1829
1627
  clusters: this.cluster({
1830
- markers: hr(t, r, e, this.viewportPadding),
1628
+ markers: gr(t, n, e, this.viewportPadding),
1831
1629
  map: t,
1832
- mapCanvasProjection: r
1630
+ mapCanvasProjection: n
1833
1631
  })
1834
1632
  };
1835
1633
  }
1836
1634
  }
1837
- const Er = (n) => n.map((t) => new te({
1838
- position: _.getPosition(t),
1635
+ const kr = (r) => r.map((t) => new ee({
1636
+ position: w.getPosition(t),
1839
1637
  markers: [t]
1840
1638
  }));
1841
- class _r extends ot {
1639
+ class Cr extends rt {
1842
1640
  constructor(e) {
1843
- var { maxZoom: t, radius: r = 60 } = e, s = Oe(e, ["maxZoom", "radius"]);
1844
- super({ maxZoom: t }), this.markers = [], this.clusters = [], this.state = { zoom: -1 }, this.superCluster = new rt(Object.assign({ maxZoom: this.maxZoom, radius: r }, s));
1641
+ var { maxZoom: t, radius: n = 60 } = e, s = Oe(e, ["maxZoom", "radius"]);
1642
+ super({ maxZoom: t }), this.markers = [], this.clusters = [], this.state = { zoom: -1 }, this.superCluster = new Qe(Object.assign({ maxZoom: this.maxZoom, radius: n }, s));
1845
1643
  }
1846
1644
  calculate(e) {
1847
- let t = !1, r = e.map.getZoom();
1848
- A(r), r = Math.round(r);
1849
- const s = { zoom: r };
1645
+ let t = !1, n = e.map.getZoom();
1646
+ A(n), n = Math.round(n);
1647
+ const s = { zoom: n };
1850
1648
  if (!ae(e.markers, this.markers)) {
1851
1649
  t = !0, this.markers = [...e.markers];
1852
1650
  const o = this.markers.map((i) => {
1853
- const l = _.getPosition(i);
1651
+ const l = w.getPosition(i);
1854
1652
  return {
1855
1653
  type: "Feature",
1856
1654
  geometry: { type: "Point", coordinates: [l.lng(), l.lat()] },
@@ -1863,33 +1661,33 @@ class _r extends ot {
1863
1661
  }
1864
1662
  cluster({ map: e }) {
1865
1663
  const t = e.getZoom();
1866
- return A(t), this.superCluster.getClusters([-180, -90, 180, 90], Math.round(t)).map((r) => this.transformCluster(r));
1664
+ return A(t), this.superCluster.getClusters([-180, -90, 180, 90], Math.round(t)).map((n) => this.transformCluster(n));
1867
1665
  }
1868
- transformCluster({ geometry: { coordinates: [e, t] }, properties: r }) {
1869
- if (r.cluster)
1870
- return new te({
1871
- markers: this.superCluster.getLeaves(r.cluster_id, 1 / 0).map((o) => o.properties.marker),
1666
+ transformCluster({ geometry: { coordinates: [e, t] }, properties: n }) {
1667
+ if (n.cluster)
1668
+ return new ee({
1669
+ markers: this.superCluster.getLeaves(n.cluster_id, 1 / 0).map((o) => o.properties.marker),
1872
1670
  position: { lat: t, lng: e }
1873
1671
  });
1874
- const s = r.marker;
1875
- return new te({
1672
+ const s = n.marker;
1673
+ return new ee({
1876
1674
  markers: [s],
1877
- position: _.getPosition(s)
1675
+ position: w.getPosition(s)
1878
1676
  });
1879
1677
  }
1880
1678
  }
1881
- class kr extends wr {
1679
+ class Or extends wr {
1882
1680
  constructor(e) {
1883
- var { maxZoom: t, radius: r = 60, viewportPadding: s = 60 } = e, o = Oe(e, ["maxZoom", "radius", "viewportPadding"]);
1884
- super({ maxZoom: t, viewportPadding: s }), this.markers = [], this.clusters = [], this.superCluster = new rt(Object.assign({ maxZoom: this.maxZoom, radius: r }, o)), this.state = { zoom: -1, view: [0, 0, 0, 0] };
1681
+ var { maxZoom: t, radius: n = 60, viewportPadding: s = 60 } = e, o = Oe(e, ["maxZoom", "radius", "viewportPadding"]);
1682
+ super({ maxZoom: t, viewportPadding: s }), this.markers = [], this.clusters = [], this.superCluster = new Qe(Object.assign({ maxZoom: this.maxZoom, radius: n }, o)), this.state = { zoom: -1, view: [0, 0, 0, 0] };
1885
1683
  }
1886
1684
  calculate(e) {
1887
1685
  const t = this.getViewportState(e);
1888
- let r = !ae(this.state, t);
1686
+ let n = !ae(this.state, t);
1889
1687
  if (!ae(e.markers, this.markers)) {
1890
- r = !0, this.markers = [...e.markers];
1688
+ n = !0, this.markers = [...e.markers];
1891
1689
  const s = this.markers.map((o) => {
1892
- const i = _.getPosition(o);
1690
+ const i = w.getPosition(o);
1893
1691
  return {
1894
1692
  type: "Feature",
1895
1693
  geometry: {
@@ -1901,48 +1699,48 @@ class kr extends wr {
1901
1699
  });
1902
1700
  this.superCluster.load(s);
1903
1701
  }
1904
- return r && (this.clusters = this.cluster(e), this.state = t), { clusters: this.clusters, changed: r };
1702
+ return n && (this.clusters = this.cluster(e), this.state = t), { clusters: this.clusters, changed: n };
1905
1703
  }
1906
1704
  cluster(e) {
1907
1705
  const t = this.getViewportState(e);
1908
- return this.superCluster.getClusters(t.view, t.zoom).map((r) => this.transformCluster(r));
1706
+ return this.superCluster.getClusters(t.view, t.zoom).map((n) => this.transformCluster(n));
1909
1707
  }
1910
- transformCluster({ geometry: { coordinates: [e, t] }, properties: r }) {
1911
- if (r.cluster)
1912
- return new te({
1913
- markers: this.superCluster.getLeaves(r.cluster_id, 1 / 0).map((o) => o.properties.marker),
1708
+ transformCluster({ geometry: { coordinates: [e, t] }, properties: n }) {
1709
+ if (n.cluster)
1710
+ return new ee({
1711
+ markers: this.superCluster.getLeaves(n.cluster_id, 1 / 0).map((o) => o.properties.marker),
1914
1712
  position: { lat: t, lng: e }
1915
1713
  });
1916
- const s = r.marker;
1917
- return new te({
1714
+ const s = n.marker;
1715
+ return new ee({
1918
1716
  markers: [s],
1919
- position: _.getPosition(s)
1717
+ position: w.getPosition(s)
1920
1718
  });
1921
1719
  }
1922
1720
  getViewportState(e) {
1923
- const t = e.map.getZoom(), r = e.map.getBounds();
1924
- return A(t), A(r), {
1721
+ const t = e.map.getZoom(), n = e.map.getBounds();
1722
+ return A(t), A(n), {
1925
1723
  zoom: Math.round(t),
1926
- view: mr(r, e.mapCanvasProjection, this.viewportPadding)
1724
+ view: vr(n, e.mapCanvasProjection, this.viewportPadding)
1927
1725
  };
1928
1726
  }
1929
1727
  }
1930
- class Cr {
1728
+ class Mr {
1931
1729
  constructor(e, t) {
1932
1730
  this.markers = { sum: e.length };
1933
- const r = t.map((o) => o.count), s = r.reduce((o, i) => o + i, 0);
1731
+ const n = t.map((o) => o.count), s = n.reduce((o, i) => o + i, 0);
1934
1732
  this.clusters = {
1935
1733
  count: t.length,
1936
1734
  markers: {
1937
1735
  mean: s / t.length,
1938
1736
  sum: s,
1939
- min: Math.min(...r),
1940
- max: Math.max(...r)
1737
+ min: Math.min(...n),
1738
+ max: Math.max(...n)
1941
1739
  }
1942
1740
  };
1943
1741
  }
1944
1742
  }
1945
- class Or {
1743
+ class Pr {
1946
1744
  /**
1947
1745
  * The default render function for the library used by {@link MarkerClusterer}.
1948
1746
  *
@@ -1981,24 +1779,24 @@ class Or {
1981
1779
  * });
1982
1780
  * ```
1983
1781
  */
1984
- render({ count: e, position: t }, r, s) {
1985
- const i = `<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">
1782
+ render({ count: e, position: t }, n, s) {
1783
+ const i = `<svg fill="${e > Math.max(10, n.clusters.markers.mean) ? "#ff0000" : "#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
1986
1784
  <circle cx="120" cy="120" opacity=".6" r="70" />
1987
1785
  <circle cx="120" cy="120" opacity=".3" r="90" />
1988
1786
  <circle cx="120" cy="120" opacity=".2" r="110" />
1989
1787
  <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>
1990
1788
  </svg>`, l = `Cluster of ${e} markers`, a = Number(google.maps.Marker.MAX_ZINDEX) + e;
1991
- if (_.isAdvancedMarkerAvailable(s)) {
1789
+ if (w.isAdvancedMarkerAvailable(s)) {
1992
1790
  const u = new DOMParser().parseFromString(i, "image/svg+xml").documentElement;
1993
1791
  u.setAttribute("transform", "translate(0 25)");
1994
- const h = {
1792
+ const f = {
1995
1793
  map: s,
1996
1794
  position: t,
1997
1795
  zIndex: a,
1998
1796
  title: l,
1999
1797
  content: u
2000
1798
  };
2001
- return new google.maps.marker.AdvancedMarkerElement(h);
1799
+ return new google.maps.marker.AdvancedMarkerElement(f);
2002
1800
  }
2003
1801
  const c = {
2004
1802
  position: t,
@@ -2012,43 +1810,43 @@ class Or {
2012
1810
  return new google.maps.Marker(c);
2013
1811
  }
2014
1812
  }
2015
- function Mr(n, e) {
1813
+ function br(r, e) {
2016
1814
  for (let t in e.prototype)
2017
- n.prototype[t] = e.prototype[t];
1815
+ r.prototype[t] = e.prototype[t];
2018
1816
  }
2019
1817
  class Me {
2020
1818
  constructor() {
2021
- Mr(Me, google.maps.OverlayView);
1819
+ br(Me, google.maps.OverlayView);
2022
1820
  }
2023
1821
  }
2024
1822
  var I;
2025
- (function(n) {
2026
- n.CLUSTERING_BEGIN = "clusteringbegin", n.CLUSTERING_END = "clusteringend", n.CLUSTER_CLICK = "click", n.GMP_CLICK = "gmp-click";
1823
+ (function(r) {
1824
+ r.CLUSTERING_BEGIN = "clusteringbegin", r.CLUSTERING_END = "clusteringend", r.CLUSTER_CLICK = "click", r.GMP_CLICK = "gmp-click";
2027
1825
  })(I || (I = {}));
2028
- const br = (n, e, t) => {
1826
+ const Sr = (r, e, t) => {
2029
1827
  e.bounds && t.fitBounds(e.bounds);
2030
1828
  };
2031
- class Pr extends Me {
2032
- constructor({ map: e, markers: t = [], algorithmOptions: r = {}, algorithm: s = new _r(r), renderer: o = new Or(), onClusterClick: i = br }) {
1829
+ class Ar extends Me {
1830
+ constructor({ map: e, markers: t = [], algorithmOptions: n = {}, algorithm: s = new Cr(n), renderer: o = new Pr(), onClusterClick: i = Sr }) {
2033
1831
  super(), this.map = null, this.idleListener = null, this.markers = [...t], this.clusters = [], this.algorithm = s, this.renderer = o, this.onClusterClick = i, e && this.setMap(e);
2034
1832
  }
2035
1833
  addMarker(e, t) {
2036
1834
  this.markers.includes(e) || (this.markers.push(e), t || this.render());
2037
1835
  }
2038
1836
  addMarkers(e, t) {
2039
- e.forEach((r) => {
2040
- this.addMarker(r, !0);
1837
+ e.forEach((n) => {
1838
+ this.addMarker(n, !0);
2041
1839
  }), t || this.render();
2042
1840
  }
2043
1841
  removeMarker(e, t) {
2044
- const r = this.markers.indexOf(e);
2045
- return r === -1 ? !1 : (_.setMap(e, null), this.markers.splice(r, 1), t || this.render(), !0);
1842
+ const n = this.markers.indexOf(e);
1843
+ return n === -1 ? !1 : (w.setMap(e, null), this.markers.splice(n, 1), t || this.render(), !0);
2046
1844
  }
2047
1845
  removeMarkers(e, t) {
2048
- let r = !1;
1846
+ let n = !1;
2049
1847
  return e.forEach((s) => {
2050
- r = this.removeMarker(s, !0) || r;
2051
- }), r && !t && this.render(), r;
1848
+ n = this.removeMarker(s, !0) || n;
1849
+ }), n && !t && this.render(), n;
2052
1850
  }
2053
1851
  clearMarkers(e) {
2054
1852
  this.markers.length = 0, e || this.render();
@@ -2060,19 +1858,19 @@ class Pr extends Me {
2060
1858
  const e = this.getMap();
2061
1859
  if (e instanceof google.maps.Map && e.getProjection()) {
2062
1860
  google.maps.event.trigger(this, I.CLUSTERING_BEGIN, this);
2063
- const { clusters: t, changed: r } = this.algorithm.calculate({
1861
+ const { clusters: t, changed: n } = this.algorithm.calculate({
2064
1862
  markers: this.markers,
2065
1863
  map: e,
2066
1864
  mapCanvasProjection: this.getProjection()
2067
1865
  });
2068
- if (r || r == null) {
1866
+ if (n || n == null) {
2069
1867
  const s = /* @__PURE__ */ new Set();
2070
1868
  for (const i of t)
2071
1869
  i.markers.length == 1 && s.add(i.markers[0]);
2072
1870
  const o = [];
2073
1871
  for (const i of this.clusters)
2074
- i.marker != null && (i.markers.length == 1 ? s.has(i.marker) || _.setMap(i.marker, null) : o.push(i.marker));
2075
- this.clusters = t, this.renderClusters(), requestAnimationFrame(() => o.forEach((i) => _.setMap(i, null)));
1872
+ i.marker != null && (i.markers.length == 1 ? s.has(i.marker) || w.setMap(i.marker, null) : o.push(i.marker));
1873
+ this.clusters = t, this.renderClusters(), requestAnimationFrame(() => o.forEach((i) => w.setMap(i, null)));
2076
1874
  }
2077
1875
  google.maps.event.trigger(this, I.CLUSTERING_END, this);
2078
1876
  }
@@ -2085,28 +1883,28 @@ class Pr extends Me {
2085
1883
  this.idleListener && google.maps.event.removeListener(this.idleListener), this.reset();
2086
1884
  }
2087
1885
  reset() {
2088
- this.markers.forEach((e) => _.setMap(e, null)), this.clusters.forEach((e) => e.delete()), this.clusters = [];
1886
+ this.markers.forEach((e) => w.setMap(e, null)), this.clusters.forEach((e) => e.delete()), this.clusters = [];
2089
1887
  }
2090
1888
  renderClusters() {
2091
- const e = new Cr(this.markers, this.clusters), t = this.getMap();
2092
- this.clusters.forEach((r) => {
2093
- if (r.markers.length === 1)
2094
- r.marker = r.markers[0];
2095
- else if (r.marker = this.renderer.render(r, e, t), r.markers.forEach((s) => _.setMap(s, null)), this.onClusterClick) {
2096
- const s = _.isAdvancedMarker(r.marker) ? I.GMP_CLICK : I.CLUSTER_CLICK;
2097
- r.marker.addListener(
1889
+ const e = new Mr(this.markers, this.clusters), t = this.getMap();
1890
+ this.clusters.forEach((n) => {
1891
+ if (n.markers.length === 1)
1892
+ n.marker = n.markers[0];
1893
+ else if (n.marker = this.renderer.render(n, e, t), n.markers.forEach((s) => w.setMap(s, null)), this.onClusterClick) {
1894
+ const s = w.isAdvancedMarker(n.marker) ? I.GMP_CLICK : I.CLUSTER_CLICK;
1895
+ n.marker.addListener(
2098
1896
  s,
2099
1897
  /* istanbul ignore next */
2100
1898
  (o) => {
2101
- google.maps.event.trigger(this, I.CLUSTER_CLICK, r), this.onClusterClick(o, r, t);
1899
+ google.maps.event.trigger(this, I.CLUSTER_CLICK, n), this.onClusterClick(o, n, t);
2102
1900
  }
2103
1901
  );
2104
1902
  }
2105
- _.setMap(r.marker, t);
1903
+ w.setMap(n.marker, t);
2106
1904
  });
2107
1905
  }
2108
1906
  }
2109
- const Je = Object.values(I), Ur = P({
1907
+ const We = Object.values(I), Fr = O({
2110
1908
  name: "MarkerCluster",
2111
1909
  props: {
2112
1910
  options: {
@@ -2114,21 +1912,21 @@ const Je = Object.values(I), Ur = P({
2114
1912
  default: () => ({})
2115
1913
  }
2116
1914
  },
2117
- emits: Je,
2118
- setup(n, { emit: e, expose: t, slots: r }) {
2119
- const s = w(), o = k(D, w()), i = k(Z, w());
2120
- return G(ke, s), q(
1915
+ emits: We,
1916
+ setup(r, { emit: e, expose: t, slots: n }) {
1917
+ const s = y(), o = k(B, y()), i = k(D, y());
1918
+ return U(we, s), M(
2121
1919
  o,
2122
1920
  () => {
2123
1921
  o.value && (s.value = S(
2124
- new Pr({
1922
+ new Ar({
2125
1923
  map: o.value,
2126
1924
  // Better perf than the default `SuperClusterAlgorithm`. See:
2127
1925
  // https://github.com/googlemaps/js-markerclusterer/pull/640
2128
- algorithm: new kr(n.options.algorithmOptions ?? {}),
2129
- ...n.options
1926
+ algorithm: new Or(r.options.algorithmOptions ?? {}),
1927
+ ...r.options
2130
1928
  })
2131
- ), Je.forEach((l) => {
1929
+ ), We.forEach((l) => {
2132
1930
  var a;
2133
1931
  (a = s.value) == null || a.addListener(l, (c) => e(l, c));
2134
1932
  }));
@@ -2136,15 +1934,15 @@ const Je = Object.values(I), Ur = P({
2136
1934
  {
2137
1935
  immediate: !0
2138
1936
  }
2139
- ), B(() => {
1937
+ ), $(() => {
2140
1938
  var l;
2141
1939
  s.value && ((l = i.value) == null || l.event.clearInstanceListeners(s.value), s.value.clearMarkers(), s.value.setMap(null));
2142
1940
  }), t({ markerCluster: s }), () => {
2143
1941
  var l;
2144
- return (l = r.default) == null ? void 0 : l.call(r);
1942
+ return (l = n.default) == null ? void 0 : l.call(n);
2145
1943
  };
2146
1944
  }
2147
- }), qr = P({
1945
+ }), qr = O({
2148
1946
  inheritAttrs: !1,
2149
1947
  props: {
2150
1948
  options: {
@@ -2152,34 +1950,34 @@ const Je = Object.values(I), Ur = P({
2152
1950
  required: !0
2153
1951
  }
2154
1952
  },
2155
- setup(n, { slots: e, emit: t, expose: r }) {
2156
- const s = w(), o = K(() => {
1953
+ setup(r, { slots: e, emit: t, expose: n }) {
1954
+ const s = y(), o = z(() => {
2157
1955
  var a;
2158
- return (a = e.default) == null ? void 0 : a.call(e).some((c) => c.type !== ye);
2159
- }), i = K(() => ({
2160
- ...n.options,
1956
+ return (a = e.default) == null ? void 0 : a.call(e).some((c) => c.type !== ve);
1957
+ }), i = z(() => ({
1958
+ ...r.options,
2161
1959
  element: s.value
2162
- })), l = J(ue, [], i, t);
2163
- return r({
1960
+ })), l = H(le, [], i, t);
1961
+ return n({
2164
1962
  customMarker: l
2165
1963
  }), { customMarkerRef: s, customMarker: l, hasSlotContent: o };
2166
1964
  }
2167
1965
  });
2168
- const Sr = {
1966
+ const Tr = {
2169
1967
  key: 0,
2170
1968
  class: "custom-marker-wrapper"
2171
1969
  };
2172
- function Ar(n, e, t, r, s, o) {
2173
- return n.hasSlotContent ? (V(), z("div", Sr, [
2174
- le("div", we({
1970
+ function Lr(r, e, t, n, s, o) {
1971
+ return r.hasSlotContent ? (G(), V("div", Tr, [
1972
+ ie("div", ye({
2175
1973
  ref: "customMarkerRef",
2176
- style: { cursor: n.$attrs.onClick ? "pointer" : void 0 }
2177
- }, n.$attrs), [
2178
- W(n.$slots, "default", {}, void 0, !0)
1974
+ style: { cursor: r.$attrs.onClick ? "pointer" : void 0 }
1975
+ }, r.$attrs), [
1976
+ F(r.$slots, "default", {}, void 0, !0)
2179
1977
  ], 16)
2180
- ])) : Ee("", !0);
1978
+ ])) : _e("", !0);
2181
1979
  }
2182
- const Gr = /* @__PURE__ */ re(qr, [["render", Ar], ["__scopeId", "data-v-2d2d343a"]]), Vr = P({
1980
+ const zr = /* @__PURE__ */ te(qr, [["render", Lr], ["__scopeId", "data-v-2d2d343a"]]), Wr = O({
2183
1981
  name: "HeatmapLayer",
2184
1982
  props: {
2185
1983
  options: {
@@ -2187,16 +1985,16 @@ const Gr = /* @__PURE__ */ re(qr, [["render", Ar], ["__scopeId", "data-v-2d2d343
2187
1985
  default: () => ({})
2188
1986
  }
2189
1987
  },
2190
- setup(n) {
2191
- const e = w(), t = k(D, w()), r = k(Z, w());
2192
- return q(
2193
- [t, () => n.options],
1988
+ setup(r) {
1989
+ const e = y(), t = k(B, y()), n = k(D, y());
1990
+ return M(
1991
+ [t, () => r.options],
2194
1992
  ([s, o], [i, l]) => {
2195
- const a = !ee(o, l) || t.value !== i;
2196
- if (t.value && r.value && a) {
1993
+ const a = !Q(o, l) || t.value !== i;
1994
+ if (t.value && n.value && a) {
2197
1995
  let c;
2198
- if (o.data && !(o.data instanceof r.value.MVCArray)) {
2199
- const d = r.value.LatLng, u = o.data.map((h) => h instanceof d || "location" in h && (h.location instanceof d || h.location === null) ? h : "location" in h ? { ...h, location: new d(h.location) } : new d(h));
1996
+ if (o.data && !(o.data instanceof n.value.MVCArray)) {
1997
+ const d = n.value.LatLng, u = o.data.map((f) => f instanceof d || "location" in f && (f.location instanceof d || f.location === null) ? f : "location" in f ? { ...f, location: new d(f.location) } : new d(f));
2200
1998
  c = {
2201
1999
  ...o,
2202
2000
  data: u
@@ -2204,7 +2002,7 @@ const Gr = /* @__PURE__ */ re(qr, [["render", Ar], ["__scopeId", "data-v-2d2d343
2204
2002
  } else
2205
2003
  c = o;
2206
2004
  e.value ? e.value.setOptions(c) : e.value = S(
2207
- new r.value.visualization.HeatmapLayer({
2005
+ new n.value.visualization.HeatmapLayer({
2208
2006
  ...c,
2209
2007
  map: t.value
2210
2008
  })
@@ -2212,26 +2010,26 @@ const Gr = /* @__PURE__ */ re(qr, [["render", Ar], ["__scopeId", "data-v-2d2d343
2212
2010
  }
2213
2011
  },
2214
2012
  { immediate: !0 }
2215
- ), B(() => {
2013
+ ), $(() => {
2216
2014
  e.value && e.value.setMap(null);
2217
2015
  }), { heatmapLayer: e };
2218
2016
  },
2219
2017
  render: () => null
2220
2018
  });
2221
2019
  export {
2222
- jr as AdvancedMarker,
2223
- Dr as Circle,
2224
- Zr as CustomControl,
2225
- Gr as CustomMarker,
2226
- Ir as GoogleMap,
2227
- Vr as HeatmapLayer,
2228
- Fr as InfoWindow,
2229
- Rr as Marker,
2230
- Ur as MarkerCluster,
2231
- Nr as Polygon,
2232
- $r as Polyline,
2233
- Br as Rectangle,
2234
- Z as apiSymbol,
2235
- D as mapSymbol,
2236
- Xe as mapTilesLoadedSymbol
2020
+ Nr as AdvancedMarker,
2021
+ Ur as Circle,
2022
+ Gr as CustomControl,
2023
+ zr as CustomMarker,
2024
+ jr as GoogleMap,
2025
+ Wr as HeatmapLayer,
2026
+ Vr as InfoWindow,
2027
+ $r as Marker,
2028
+ Fr as MarkerCluster,
2029
+ Dr as Polygon,
2030
+ Br as Polyline,
2031
+ Zr as Rectangle,
2032
+ D as apiSymbol,
2033
+ B as mapSymbol,
2034
+ Ke as mapTilesLoadedSymbol
2237
2035
  };