vue3-google-map 0.22.0 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -9
- package/dist/index.cjs +3 -29
- package/dist/index.mjs +1071 -789
- package/dist/index.umd.js +6 -29
- package/dist/types/@types/index.d.ts +0 -1
- package/dist/types/components/AdvancedMarker.vue.d.ts +12 -9
- package/dist/types/components/Circle.d.ts +7 -7
- package/dist/types/components/CustomControl.vue.d.ts +10 -9
- package/dist/types/components/CustomMarker.vue.d.ts +9 -7
- package/dist/types/components/GoogleMap.vue.d.ts +34 -33
- package/dist/types/components/HeatmapLayer.d.ts +11 -7
- package/dist/types/components/InfoWindow.vue.d.ts +9 -9
- package/dist/types/components/Marker.d.ts +16 -7
- package/dist/types/components/MarkerCluster.d.ts +13 -8
- package/dist/types/components/Polygon.d.ts +6 -7
- package/dist/types/components/Polyline.d.ts +6 -7
- package/dist/types/components/Rectangle.d.ts +7 -7
- package/dist/types/composables/useSetupMapComponent.d.ts +0 -1
- package/dist/types/shared/index.d.ts +0 -1
- package/dist/types/shims-google-maps.d.ts +0 -1
- package/dist/types/themes/aubergine.d.ts +0 -1
- package/dist/types/themes/dark.d.ts +0 -1
- package/dist/types/themes/grey.d.ts +0 -1
- package/dist/types/themes/minimal.d.ts +0 -1
- package/dist/types/themes/retro.d.ts +0 -1
- package/dist/types/themes/roadways.d.ts +0 -1
- package/dist/types/themes/roadwaysMinimal.d.ts +0 -1
- package/dist/types/themes/ultraLight.d.ts +0 -1
- package/dist/types/utils/index.d.ts +0 -1
- package/package.json +17 -6
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-
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
import { defineComponent as P, ref as
|
|
6
|
-
const
|
|
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 = [
|
|
7
7
|
"click",
|
|
8
8
|
"dblclick",
|
|
9
9
|
"drag",
|
|
@@ -16,88 +16,81 @@ const B = Symbol("map"), Z = Symbol("api"), pe = Symbol("marker"), fe = Symbol("
|
|
|
16
16
|
"mouseup",
|
|
17
17
|
"rightclick"
|
|
18
18
|
];
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
purpose with or without fee is hereby granted.
|
|
24
|
-
|
|
25
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
26
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
27
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
28
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
29
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
30
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
31
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
32
|
-
***************************************************************************** */
|
|
33
|
-
function Ve(n, e, t, s) {
|
|
34
|
-
function r(o) {
|
|
35
|
-
return o instanceof t ? o : new t(function(a) {
|
|
36
|
-
a(o);
|
|
19
|
+
function dt(n, e, t, r) {
|
|
20
|
+
function s(o) {
|
|
21
|
+
return o instanceof t ? o : new t(function(i) {
|
|
22
|
+
i(o);
|
|
37
23
|
});
|
|
38
24
|
}
|
|
39
|
-
return new (t || (t = Promise))(function(o,
|
|
40
|
-
function l(
|
|
25
|
+
return new (t || (t = Promise))(function(o, i) {
|
|
26
|
+
function l(d) {
|
|
41
27
|
try {
|
|
42
|
-
|
|
43
|
-
} catch (
|
|
44
|
-
|
|
28
|
+
c(r.next(d));
|
|
29
|
+
} catch (u) {
|
|
30
|
+
i(u);
|
|
45
31
|
}
|
|
46
32
|
}
|
|
47
|
-
function
|
|
33
|
+
function a(d) {
|
|
48
34
|
try {
|
|
49
|
-
|
|
50
|
-
} catch (
|
|
51
|
-
|
|
35
|
+
c(r.throw(d));
|
|
36
|
+
} catch (u) {
|
|
37
|
+
i(u);
|
|
52
38
|
}
|
|
53
39
|
}
|
|
54
|
-
function d
|
|
55
|
-
|
|
40
|
+
function c(d) {
|
|
41
|
+
d.done ? o(d.value) : s(d.value).then(l, a);
|
|
56
42
|
}
|
|
57
|
-
|
|
43
|
+
c((r = r.apply(n, e || [])).next());
|
|
58
44
|
});
|
|
59
45
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if (Array.isArray(e)) {
|
|
68
|
-
if (s = e.length, s != t.length)
|
|
69
|
-
return !1;
|
|
70
|
-
for (r = s; r-- !== 0; )
|
|
71
|
-
if (!n(e[r], t[r]))
|
|
72
|
-
return !1;
|
|
46
|
+
function pt(n) {
|
|
47
|
+
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
48
|
+
}
|
|
49
|
+
var fe, Pe;
|
|
50
|
+
function ft() {
|
|
51
|
+
return Pe || (Pe = 1, fe = function n(e, t) {
|
|
52
|
+
if (e === t)
|
|
73
53
|
return !0;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return e.source === t.source && e.flags === t.flags;
|
|
77
|
-
if (e.valueOf !== Object.prototype.valueOf)
|
|
78
|
-
return e.valueOf() === t.valueOf();
|
|
79
|
-
if (e.toString !== Object.prototype.toString)
|
|
80
|
-
return e.toString() === t.toString();
|
|
81
|
-
if (o = Object.keys(e), s = o.length, s !== Object.keys(t).length)
|
|
82
|
-
return !1;
|
|
83
|
-
for (r = s; r-- !== 0; )
|
|
84
|
-
if (!Object.prototype.hasOwnProperty.call(t, o[r]))
|
|
54
|
+
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
55
|
+
if (e.constructor !== t.constructor)
|
|
85
56
|
return !1;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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)
|
|
89
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;
|
|
90
83
|
}
|
|
91
|
-
return
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
var
|
|
84
|
+
return e !== e && t !== t;
|
|
85
|
+
}), fe;
|
|
86
|
+
}
|
|
87
|
+
var ht = ft(), mt = /* @__PURE__ */ pt(ht);
|
|
88
|
+
const qe = "__googleMapsScriptId";
|
|
89
|
+
var U;
|
|
97
90
|
(function(n) {
|
|
98
91
|
n[n.INITIALIZED = 0] = "INITIALIZED", n[n.LOADING = 1] = "LOADING", n[n.SUCCESS = 2] = "SUCCESS", n[n.FAILURE = 3] = "FAILURE";
|
|
99
|
-
})(
|
|
100
|
-
class
|
|
92
|
+
})(U || (U = {}));
|
|
93
|
+
class N {
|
|
101
94
|
/**
|
|
102
95
|
* Creates an instance of Loader using [[LoaderOptions]]. No defaults are set
|
|
103
96
|
* using this library, instead the defaults are set by the Google Maps
|
|
@@ -107,13 +100,13 @@ class q {
|
|
|
107
100
|
* const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});
|
|
108
101
|
* ```
|
|
109
102
|
*/
|
|
110
|
-
constructor({ apiKey: e, authReferrerPolicy: t, channel:
|
|
111
|
-
if (this.callbacks = [], this.done = !1, this.loading = !1, this.errors = [], this.apiKey = e, this.authReferrerPolicy = t, this.channel =
|
|
112
|
-
if (!
|
|
113
|
-
throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(
|
|
114
|
-
return
|
|
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;
|
|
115
108
|
}
|
|
116
|
-
|
|
109
|
+
N.instance = this;
|
|
117
110
|
}
|
|
118
111
|
get options() {
|
|
119
112
|
return {
|
|
@@ -132,7 +125,7 @@ class q {
|
|
|
132
125
|
};
|
|
133
126
|
}
|
|
134
127
|
get status() {
|
|
135
|
-
return this.errors.length ?
|
|
128
|
+
return this.errors.length ? U.FAILURE : this.done ? U.SUCCESS : this.loading ? U.LOADING : U.INITIALIZED;
|
|
136
129
|
}
|
|
137
130
|
get failed() {
|
|
138
131
|
return this.done && !this.loading && this.errors.length >= this.retries + 1;
|
|
@@ -145,7 +138,7 @@ class q {
|
|
|
145
138
|
*/
|
|
146
139
|
createUrl() {
|
|
147
140
|
let e = this.url;
|
|
148
|
-
return e += "?callback=__googleMapsCallback", this.apiKey && (e += `&key=${this.apiKey}`), this.channel && (e += `&channel=${this.channel}`), this.client && (e += `&client=${this.client}`), this.libraries.length > 0 && (e += `&libraries=${this.libraries.join(",")}`), this.language && (e += `&language=${this.language}`), this.region && (e += `®ion=${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;
|
|
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 += `®ion=${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;
|
|
149
142
|
}
|
|
150
143
|
deleteScript() {
|
|
151
144
|
const e = document.getElementById(this.id);
|
|
@@ -166,8 +159,8 @@ class q {
|
|
|
166
159
|
*/
|
|
167
160
|
loadPromise() {
|
|
168
161
|
return new Promise((e, t) => {
|
|
169
|
-
this.loadCallback((
|
|
170
|
-
|
|
162
|
+
this.loadCallback((r) => {
|
|
163
|
+
r ? t(r.error) : e(window.google);
|
|
171
164
|
});
|
|
172
165
|
});
|
|
173
166
|
}
|
|
@@ -190,7 +183,7 @@ class q {
|
|
|
190
183
|
this.callback();
|
|
191
184
|
return;
|
|
192
185
|
}
|
|
193
|
-
const
|
|
186
|
+
const r = {
|
|
194
187
|
key: this.apiKey,
|
|
195
188
|
channel: this.channel,
|
|
196
189
|
client: this.client,
|
|
@@ -201,28 +194,28 @@ class q {
|
|
|
201
194
|
region: this.region,
|
|
202
195
|
authReferrerPolicy: this.authReferrerPolicy
|
|
203
196
|
};
|
|
204
|
-
Object.keys(
|
|
197
|
+
Object.keys(r).forEach(
|
|
205
198
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
206
|
-
(o) => !
|
|
199
|
+
(o) => !r[o] && delete r[o]
|
|
207
200
|
), !((t = (e = window == null ? void 0 : window.google) === null || e === void 0 ? void 0 : e.maps) === null || t === void 0) && t.importLibrary || ((o) => {
|
|
208
|
-
let
|
|
209
|
-
|
|
210
|
-
const
|
|
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 = () => (
|
|
211
204
|
// @ts-ignore
|
|
212
|
-
|
|
213
|
-
var
|
|
214
|
-
yield l =
|
|
215
|
-
for (
|
|
216
|
-
|
|
217
|
-
|
|
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);
|
|
218
211
|
})))
|
|
219
212
|
);
|
|
220
|
-
|
|
221
|
-
})(
|
|
222
|
-
const
|
|
223
|
-
|
|
224
|
-
const
|
|
225
|
-
this.loadErrorCallback(
|
|
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);
|
|
226
219
|
});
|
|
227
220
|
}
|
|
228
221
|
/**
|
|
@@ -249,25 +242,26 @@ class q {
|
|
|
249
242
|
}), this.callbacks = [];
|
|
250
243
|
}
|
|
251
244
|
execute() {
|
|
252
|
-
if (this.resetIfRetryingFailed(), this.
|
|
253
|
-
this.
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
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();
|
|
258
254
|
}
|
|
259
|
-
this.loading || (this.loading = !0, this.setScript());
|
|
260
|
-
}
|
|
261
255
|
}
|
|
262
256
|
}
|
|
263
|
-
function
|
|
257
|
+
function gt(n) {
|
|
264
258
|
return class extends n.OverlayView {
|
|
265
|
-
constructor(
|
|
259
|
+
constructor(r) {
|
|
266
260
|
super();
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
const { element:
|
|
270
|
-
this.element =
|
|
261
|
+
pe(this, "element");
|
|
262
|
+
pe(this, "opts");
|
|
263
|
+
const { element: s, ...o } = r;
|
|
264
|
+
this.element = s, this.opts = o, this.opts.map && this.setMap(this.opts.map);
|
|
271
265
|
}
|
|
272
266
|
getPosition() {
|
|
273
267
|
return this.opts.position ? this.opts.position instanceof n.LatLng ? this.opts.position : new n.LatLng(this.opts.position) : null;
|
|
@@ -275,65 +269,65 @@ function Ge(n) {
|
|
|
275
269
|
getVisible() {
|
|
276
270
|
if (!this.element)
|
|
277
271
|
return !1;
|
|
278
|
-
const
|
|
279
|
-
return
|
|
272
|
+
const r = this.element;
|
|
273
|
+
return r.style.display !== "none" && r.style.visibility !== "hidden" && (r.style.opacity === "" || Number(r.style.opacity) > 0.01);
|
|
280
274
|
}
|
|
281
275
|
onAdd() {
|
|
282
276
|
if (!this.element)
|
|
283
277
|
return;
|
|
284
|
-
const
|
|
285
|
-
|
|
278
|
+
const r = this.getPanes();
|
|
279
|
+
r && r.overlayMouseTarget.appendChild(this.element);
|
|
286
280
|
}
|
|
287
281
|
draw() {
|
|
288
282
|
if (!this.element)
|
|
289
283
|
return;
|
|
290
|
-
const
|
|
291
|
-
if (
|
|
284
|
+
const r = this.getProjection(), s = r == null ? void 0 : r.fromLatLngToDivPixel(this.getPosition());
|
|
285
|
+
if (s) {
|
|
292
286
|
this.element.style.position = "absolute";
|
|
293
|
-
let o,
|
|
287
|
+
let o, i;
|
|
294
288
|
switch (this.opts.anchorPoint) {
|
|
295
289
|
case "TOP_CENTER":
|
|
296
|
-
o = "-50%",
|
|
290
|
+
o = "-50%", i = "-100%";
|
|
297
291
|
break;
|
|
298
292
|
case "BOTTOM_CENTER":
|
|
299
|
-
o = "-50%",
|
|
293
|
+
o = "-50%", i = "0";
|
|
300
294
|
break;
|
|
301
295
|
case "LEFT_CENTER":
|
|
302
|
-
o = "-100%",
|
|
296
|
+
o = "-100%", i = "-50%";
|
|
303
297
|
break;
|
|
304
298
|
case "RIGHT_CENTER":
|
|
305
|
-
o = "0",
|
|
299
|
+
o = "0", i = "-50%";
|
|
306
300
|
break;
|
|
307
301
|
case "TOP_LEFT":
|
|
308
|
-
o = "-100%",
|
|
302
|
+
o = "-100%", i = "-100%";
|
|
309
303
|
break;
|
|
310
304
|
case "TOP_RIGHT":
|
|
311
|
-
o = "0",
|
|
305
|
+
o = "0", i = "-100%";
|
|
312
306
|
break;
|
|
313
307
|
case "BOTTOM_LEFT":
|
|
314
|
-
o = "-100%",
|
|
308
|
+
o = "-100%", i = "0";
|
|
315
309
|
break;
|
|
316
310
|
case "BOTTOM_RIGHT":
|
|
317
|
-
o = "0",
|
|
311
|
+
o = "0", i = "0";
|
|
318
312
|
break;
|
|
319
313
|
default:
|
|
320
|
-
o = "-50%",
|
|
314
|
+
o = "-50%", i = "-50%";
|
|
321
315
|
}
|
|
322
|
-
const l =
|
|
323
|
-
this.element.style.transform = `translateX(${o}) translateX(${l}) translateY(${
|
|
316
|
+
const l = s.x + (this.opts.offsetX || 0) + "px", a = s.y + (this.opts.offsetY || 0) + "px";
|
|
317
|
+
this.element.style.transform = `translateX(${o}) translateX(${l}) translateY(${i}) translateY(${a})`, this.opts.zIndex && (this.element.style.zIndex = this.opts.zIndex.toString());
|
|
324
318
|
}
|
|
325
319
|
}
|
|
326
320
|
onRemove() {
|
|
327
321
|
this.element && this.element.remove();
|
|
328
322
|
}
|
|
329
|
-
setOptions(
|
|
330
|
-
const { element:
|
|
331
|
-
this.element =
|
|
323
|
+
setOptions(r) {
|
|
324
|
+
const { element: s, ...o } = r;
|
|
325
|
+
this.element = s, this.opts = o, this.draw();
|
|
332
326
|
}
|
|
333
327
|
};
|
|
334
328
|
}
|
|
335
|
-
let
|
|
336
|
-
const
|
|
329
|
+
let Se;
|
|
330
|
+
const Ae = [
|
|
337
331
|
"bounds_changed",
|
|
338
332
|
"center_changed",
|
|
339
333
|
"click",
|
|
@@ -356,7 +350,7 @@ const we = [
|
|
|
356
350
|
"tilesloaded",
|
|
357
351
|
"tilt_changed",
|
|
358
352
|
"zoom_changed"
|
|
359
|
-
],
|
|
353
|
+
], vt = P({
|
|
360
354
|
props: {
|
|
361
355
|
apiPromise: {
|
|
362
356
|
type: Promise
|
|
@@ -566,105 +560,107 @@ const we = [
|
|
|
566
560
|
default: ""
|
|
567
561
|
}
|
|
568
562
|
},
|
|
569
|
-
emits:
|
|
563
|
+
emits: Ae,
|
|
570
564
|
setup(n, { emit: e }) {
|
|
571
|
-
const t =
|
|
572
|
-
|
|
565
|
+
const t = w(), r = w(!1), s = w(), o = w(), i = w(!1);
|
|
566
|
+
G(D, s), G(Z, o), G(Xe, i);
|
|
573
567
|
const l = () => {
|
|
574
|
-
const
|
|
575
|
-
Object.keys(
|
|
576
|
-
|
|
568
|
+
const u = { ...n };
|
|
569
|
+
Object.keys(u).forEach((f) => {
|
|
570
|
+
u[f] === void 0 && delete u[f];
|
|
577
571
|
});
|
|
578
|
-
const
|
|
572
|
+
const m = (f) => {
|
|
579
573
|
var g;
|
|
580
|
-
return
|
|
581
|
-
},
|
|
574
|
+
return f ? { position: (g = o.value) == null ? void 0 : g.ControlPosition[f] } : {};
|
|
575
|
+
}, p = {
|
|
582
576
|
scaleControlOptions: n.scaleControlStyle ? { style: n.scaleControlStyle } : {},
|
|
583
|
-
panControlOptions:
|
|
584
|
-
zoomControlOptions:
|
|
585
|
-
rotateControlOptions:
|
|
586
|
-
streetViewControlOptions:
|
|
587
|
-
fullscreenControlOptions:
|
|
588
|
-
cameraControlOptions:
|
|
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),
|
|
589
583
|
disableDefaultUI: n.disableDefaultUi
|
|
590
584
|
};
|
|
591
|
-
return { ...
|
|
592
|
-
},
|
|
593
|
-
[o,
|
|
594
|
-
([
|
|
595
|
-
const
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
}), setTimeout(
|
|
585
|
+
return { ...u, ...p };
|
|
586
|
+
}, a = q(
|
|
587
|
+
[o, s],
|
|
588
|
+
([u, h]) => {
|
|
589
|
+
const m = u, p = h;
|
|
590
|
+
m && p && (m.event.addListenerOnce(p, "tilesloaded", () => {
|
|
591
|
+
i.value = !0;
|
|
592
|
+
}), setTimeout(a, 0));
|
|
599
593
|
},
|
|
600
594
|
{ immediate: !0 }
|
|
601
|
-
),
|
|
595
|
+
), c = () => {
|
|
602
596
|
try {
|
|
603
|
-
const { apiKey:
|
|
604
|
-
|
|
605
|
-
} catch (
|
|
606
|
-
console.error(
|
|
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);
|
|
607
601
|
}
|
|
608
|
-
},
|
|
609
|
-
o.value =
|
|
610
|
-
const h =
|
|
611
|
-
o.value[
|
|
612
|
-
var
|
|
613
|
-
(
|
|
614
|
-
}),
|
|
615
|
-
const
|
|
616
|
-
(
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
const
|
|
625
|
-
f &&
|
|
602
|
+
}, 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));
|
|
626
622
|
}
|
|
627
623
|
);
|
|
628
624
|
};
|
|
629
|
-
return
|
|
630
|
-
n.apiPromise && n.apiPromise instanceof Promise ? n.apiPromise.then(
|
|
631
|
-
}),
|
|
632
|
-
var
|
|
633
|
-
|
|
634
|
-
}), { mapRef: t, ready:
|
|
625
|
+
return Ye(() => {
|
|
626
|
+
n.apiPromise && n.apiPromise instanceof Promise ? n.apiPromise.then(d) : (c(), Se.load().then(d));
|
|
627
|
+
}), B(() => {
|
|
628
|
+
var u;
|
|
629
|
+
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 };
|
|
635
631
|
}
|
|
636
632
|
});
|
|
637
|
-
const
|
|
633
|
+
const re = (n, e) => {
|
|
638
634
|
const t = n.__vccOpts || n;
|
|
639
|
-
for (const [
|
|
640
|
-
t[
|
|
635
|
+
for (const [r, s] of e)
|
|
636
|
+
t[r] = s;
|
|
641
637
|
return t;
|
|
642
|
-
},
|
|
638
|
+
}, yt = {
|
|
643
639
|
ref: "mapRef",
|
|
644
640
|
class: "mapdiv"
|
|
645
641
|
};
|
|
646
|
-
function
|
|
647
|
-
return
|
|
648
|
-
|
|
649
|
-
|
|
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)
|
|
650
646
|
]);
|
|
651
647
|
}
|
|
652
|
-
const
|
|
653
|
-
function
|
|
648
|
+
const Ir = /* @__PURE__ */ re(vt, [["render", wt], ["__scopeId", "data-v-289550ca"]]);
|
|
649
|
+
function Et(n) {
|
|
654
650
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
655
651
|
}
|
|
656
|
-
var
|
|
652
|
+
var _t = function n(e, t) {
|
|
657
653
|
if (e === t)
|
|
658
654
|
return !0;
|
|
659
655
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
660
656
|
if (e.constructor !== t.constructor)
|
|
661
657
|
return !1;
|
|
662
|
-
var
|
|
658
|
+
var r, s, o;
|
|
663
659
|
if (Array.isArray(e)) {
|
|
664
|
-
if (
|
|
660
|
+
if (r = e.length, r != t.length)
|
|
665
661
|
return !1;
|
|
666
|
-
for (
|
|
667
|
-
if (!n(e[
|
|
662
|
+
for (s = r; s-- !== 0; )
|
|
663
|
+
if (!n(e[s], t[s]))
|
|
668
664
|
return !1;
|
|
669
665
|
return !0;
|
|
670
666
|
}
|
|
@@ -674,21 +670,21 @@ var Je = function n(e, t) {
|
|
|
674
670
|
return e.valueOf() === t.valueOf();
|
|
675
671
|
if (e.toString !== Object.prototype.toString)
|
|
676
672
|
return e.toString() === t.toString();
|
|
677
|
-
if (o = Object.keys(e),
|
|
673
|
+
if (o = Object.keys(e), r = o.length, r !== Object.keys(t).length)
|
|
678
674
|
return !1;
|
|
679
|
-
for (
|
|
680
|
-
if (!Object.prototype.hasOwnProperty.call(t, o[
|
|
675
|
+
for (s = r; s-- !== 0; )
|
|
676
|
+
if (!Object.prototype.hasOwnProperty.call(t, o[s]))
|
|
681
677
|
return !1;
|
|
682
|
-
for (
|
|
683
|
-
var
|
|
684
|
-
if (!n(e[
|
|
678
|
+
for (s = r; s-- !== 0; ) {
|
|
679
|
+
var i = o[s];
|
|
680
|
+
if (!n(e[i], t[i]))
|
|
685
681
|
return !1;
|
|
686
682
|
}
|
|
687
683
|
return !0;
|
|
688
684
|
}
|
|
689
685
|
return e !== e && t !== t;
|
|
690
686
|
};
|
|
691
|
-
const
|
|
687
|
+
const ee = /* @__PURE__ */ Et(_t), Te = ["click", "drag", "dragend", "dragstart", "gmp-click"], kt = P({
|
|
692
688
|
name: "AdvancedMarker",
|
|
693
689
|
props: {
|
|
694
690
|
options: {
|
|
@@ -700,85 +696,101 @@ const A = /* @__PURE__ */ Ye(Je), ke = ["click", "drag", "dragend", "dragstart",
|
|
|
700
696
|
required: !1
|
|
701
697
|
}
|
|
702
698
|
},
|
|
703
|
-
emits:
|
|
704
|
-
setup(n, { emit: e, expose: t, slots:
|
|
705
|
-
const
|
|
706
|
-
var
|
|
707
|
-
return (
|
|
708
|
-
}),
|
|
709
|
-
() => !!(
|
|
699
|
+
emits: Te,
|
|
700
|
+
setup(n, { emit: e, expose: t, slots: r }) {
|
|
701
|
+
const s = w(), o = K(() => {
|
|
702
|
+
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(
|
|
705
|
+
() => !!(u.value && d.value && a.value instanceof google.maps.marker.AdvancedMarkerElement)
|
|
710
706
|
);
|
|
711
|
-
return
|
|
712
|
-
[
|
|
713
|
-
async (p,
|
|
714
|
-
var
|
|
715
|
-
const
|
|
716
|
-
if (!
|
|
707
|
+
return q(
|
|
708
|
+
[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)
|
|
717
713
|
return;
|
|
718
|
-
const { AdvancedMarkerElement:
|
|
719
|
-
if (
|
|
720
|
-
const { map:
|
|
721
|
-
Object.assign(
|
|
722
|
-
content: o.value ?
|
|
723
|
-
...
|
|
724
|
-
}), h.value && ((
|
|
714
|
+
const { AdvancedMarkerElement: O, PinElement: b } = d.value.marker;
|
|
715
|
+
if (a.value) {
|
|
716
|
+
const { map: ce, content: ne, ...de } = i.value;
|
|
717
|
+
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));
|
|
725
721
|
} else
|
|
726
|
-
o.value ?
|
|
727
|
-
var
|
|
728
|
-
(
|
|
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));
|
|
729
725
|
});
|
|
730
726
|
},
|
|
731
727
|
{
|
|
732
|
-
immediate: !0
|
|
728
|
+
immediate: !0,
|
|
729
|
+
flush: "post"
|
|
730
|
+
// Ensure DOM updates happen before this watcher runs
|
|
733
731
|
}
|
|
734
|
-
),
|
|
735
|
-
var
|
|
736
|
-
|
|
737
|
-
}),
|
|
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 };
|
|
738
736
|
}
|
|
739
737
|
});
|
|
740
|
-
const
|
|
738
|
+
const Ct = {
|
|
741
739
|
key: 0,
|
|
742
740
|
class: "advanced-marker-wrapper"
|
|
743
741
|
};
|
|
744
|
-
function
|
|
745
|
-
return
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
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")
|
|
747
|
+
], 16)
|
|
748
|
+
])) : Ee("", !0),
|
|
749
|
+
W(n.$slots, "default")
|
|
750
|
+
], 64);
|
|
750
751
|
}
|
|
751
|
-
const
|
|
752
|
-
const
|
|
753
|
-
() => !!(l.value &&
|
|
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]))
|
|
754
755
|
);
|
|
755
|
-
return
|
|
756
|
+
return q(
|
|
756
757
|
[o, t],
|
|
757
|
-
(
|
|
758
|
-
var p, f
|
|
759
|
-
const h = !
|
|
760
|
-
!o.value || !
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
758
|
+
(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))
|
|
762
|
+
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));
|
|
764
|
+
else {
|
|
765
|
+
if (Le(n))
|
|
766
|
+
s.value = S(
|
|
767
|
+
new i.value[n](t.value)
|
|
768
|
+
);
|
|
769
|
+
else if (xe(n)) {
|
|
770
|
+
const g = t.value;
|
|
771
|
+
g.element && (s.value = S(new i.value[n](g)));
|
|
772
|
+
} else
|
|
773
|
+
s.value = S(
|
|
774
|
+
new i.value[n]({
|
|
775
|
+
...t.value,
|
|
776
|
+
map: o.value
|
|
777
|
+
})
|
|
778
|
+
);
|
|
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) => {
|
|
780
|
+
var v;
|
|
781
|
+
(v = s.value) == null || v.addListener(g, (E) => r(g, E));
|
|
782
|
+
});
|
|
783
|
+
}
|
|
773
784
|
},
|
|
774
785
|
{
|
|
775
|
-
immediate: !0
|
|
786
|
+
immediate: !0,
|
|
787
|
+
flush: "post"
|
|
776
788
|
}
|
|
777
|
-
),
|
|
778
|
-
var
|
|
779
|
-
|
|
780
|
-
}),
|
|
781
|
-
},
|
|
789
|
+
), B(() => {
|
|
790
|
+
var c, d;
|
|
791
|
+
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
|
+
}), s;
|
|
793
|
+
}, Ie = [
|
|
782
794
|
"animation_changed",
|
|
783
795
|
"click",
|
|
784
796
|
"dblclick",
|
|
@@ -795,14 +807,13 @@ const It = /* @__PURE__ */ X(Xe, [["render", et]]), tt = (n) => n === "Marker",
|
|
|
795
807
|
"contextmenu",
|
|
796
808
|
"cursor_changed",
|
|
797
809
|
"flat_changed",
|
|
798
|
-
"rightclick",
|
|
799
810
|
"zindex_changed",
|
|
800
811
|
"icon_changed",
|
|
801
812
|
"position_changed",
|
|
802
813
|
"shape_changed",
|
|
803
814
|
"title_changed",
|
|
804
815
|
"visible_changed"
|
|
805
|
-
],
|
|
816
|
+
], Rr = P({
|
|
806
817
|
name: "Marker",
|
|
807
818
|
props: {
|
|
808
819
|
options: {
|
|
@@ -810,15 +821,15 @@ const It = /* @__PURE__ */ X(Xe, [["render", et]]), tt = (n) => n === "Marker",
|
|
|
810
821
|
required: !0
|
|
811
822
|
}
|
|
812
823
|
},
|
|
813
|
-
emits:
|
|
814
|
-
setup(n, { emit: e, expose: t, slots:
|
|
815
|
-
const
|
|
816
|
-
return
|
|
817
|
-
var
|
|
818
|
-
return (
|
|
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 }), () => {
|
|
828
|
+
var i;
|
|
829
|
+
return (i = r.default) == null ? void 0 : i.call(r);
|
|
819
830
|
};
|
|
820
831
|
}
|
|
821
|
-
}), $
|
|
832
|
+
}), $r = P({
|
|
822
833
|
name: "Polyline",
|
|
823
834
|
props: {
|
|
824
835
|
options: {
|
|
@@ -826,13 +837,13 @@ const It = /* @__PURE__ */ X(Xe, [["render", et]]), tt = (n) => n === "Marker",
|
|
|
826
837
|
required: !0
|
|
827
838
|
}
|
|
828
839
|
},
|
|
829
|
-
emits:
|
|
840
|
+
emits: H,
|
|
830
841
|
setup(n, { emit: e }) {
|
|
831
|
-
const t =
|
|
832
|
-
return { polyline:
|
|
842
|
+
const t = j(n, "options");
|
|
843
|
+
return { polyline: J("Polyline", H, t, e) };
|
|
833
844
|
},
|
|
834
845
|
render: () => null
|
|
835
|
-
}),
|
|
846
|
+
}), Nr = P({
|
|
836
847
|
name: "Polygon",
|
|
837
848
|
props: {
|
|
838
849
|
options: {
|
|
@@ -840,13 +851,13 @@ const It = /* @__PURE__ */ X(Xe, [["render", et]]), tt = (n) => n === "Marker",
|
|
|
840
851
|
required: !0
|
|
841
852
|
}
|
|
842
853
|
},
|
|
843
|
-
emits:
|
|
854
|
+
emits: H,
|
|
844
855
|
setup(n, { emit: e }) {
|
|
845
|
-
const t =
|
|
846
|
-
return { polygon:
|
|
856
|
+
const t = j(n, "options");
|
|
857
|
+
return { polygon: J("Polygon", H, t, e) };
|
|
847
858
|
},
|
|
848
859
|
render: () => null
|
|
849
|
-
}),
|
|
860
|
+
}), je = H.concat(["bounds_changed"]), Br = P({
|
|
850
861
|
name: "Rectangle",
|
|
851
862
|
props: {
|
|
852
863
|
options: {
|
|
@@ -854,13 +865,13 @@ const It = /* @__PURE__ */ X(Xe, [["render", et]]), tt = (n) => n === "Marker",
|
|
|
854
865
|
required: !0
|
|
855
866
|
}
|
|
856
867
|
},
|
|
857
|
-
emits:
|
|
868
|
+
emits: je,
|
|
858
869
|
setup(n, { emit: e }) {
|
|
859
|
-
const t =
|
|
860
|
-
return { rectangle:
|
|
870
|
+
const t = j(n, "options");
|
|
871
|
+
return { rectangle: J("Rectangle", je, t, e) };
|
|
861
872
|
},
|
|
862
873
|
render: () => null
|
|
863
|
-
}),
|
|
874
|
+
}), Re = H.concat(["center_changed", "radius_changed"]), Dr = P({
|
|
864
875
|
name: "Circle",
|
|
865
876
|
props: {
|
|
866
877
|
options: {
|
|
@@ -868,13 +879,13 @@ const It = /* @__PURE__ */ X(Xe, [["render", et]]), tt = (n) => n === "Marker",
|
|
|
868
879
|
required: !0
|
|
869
880
|
}
|
|
870
881
|
},
|
|
871
|
-
emits:
|
|
882
|
+
emits: Re,
|
|
872
883
|
setup(n, { emit: e }) {
|
|
873
|
-
const t =
|
|
874
|
-
return { circle:
|
|
884
|
+
const t = j(n, "options");
|
|
885
|
+
return { circle: J("Circle", Re, t, e) };
|
|
875
886
|
},
|
|
876
887
|
render: () => null
|
|
877
|
-
}),
|
|
888
|
+
}), Mt = P({
|
|
878
889
|
props: {
|
|
879
890
|
position: {
|
|
880
891
|
type: String,
|
|
@@ -887,49 +898,56 @@ const It = /* @__PURE__ */ X(Xe, [["render", et]]), tt = (n) => n === "Marker",
|
|
|
887
898
|
},
|
|
888
899
|
emits: ["content:loaded"],
|
|
889
900
|
setup(n, { emit: e }) {
|
|
890
|
-
const t =
|
|
891
|
-
[o,
|
|
892
|
-
([d, u
|
|
893
|
-
|
|
901
|
+
const t = w(null), r = k(D, w()), s = k(Z, w()), o = k(Xe, w(!1)), i = q(
|
|
902
|
+
[o, s, t],
|
|
903
|
+
([c, d, u]) => {
|
|
904
|
+
d && c && u && (l(n.position), e("content:loaded"), setTimeout(i, 0));
|
|
894
905
|
},
|
|
895
906
|
{ immediate: !0 }
|
|
896
|
-
), l = (
|
|
897
|
-
if (
|
|
898
|
-
const
|
|
899
|
-
|
|
907
|
+
), l = (c) => {
|
|
908
|
+
if (r.value && s.value && t.value) {
|
|
909
|
+
const d = s.value.ControlPosition[c];
|
|
910
|
+
t.value.index = n.index, r.value.controls[d].push(t.value);
|
|
900
911
|
}
|
|
901
|
-
},
|
|
902
|
-
if (
|
|
903
|
-
let
|
|
904
|
-
const
|
|
905
|
-
|
|
906
|
-
h === t.value && (
|
|
907
|
-
}),
|
|
912
|
+
}, a = (c) => {
|
|
913
|
+
if (r.value && s.value) {
|
|
914
|
+
let d = null;
|
|
915
|
+
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);
|
|
908
919
|
}
|
|
909
920
|
};
|
|
910
|
-
return
|
|
921
|
+
return B(() => a(n.position)), q(
|
|
911
922
|
() => n.position,
|
|
912
|
-
(
|
|
913
|
-
|
|
923
|
+
(c, d) => {
|
|
924
|
+
a(d), l(c);
|
|
914
925
|
}
|
|
915
|
-
),
|
|
926
|
+
), q(
|
|
916
927
|
() => n.index,
|
|
917
|
-
(
|
|
918
|
-
|
|
928
|
+
(c) => {
|
|
929
|
+
t.value && (t.value.index = c);
|
|
919
930
|
}
|
|
920
931
|
), { controlRef: t };
|
|
921
932
|
}
|
|
922
933
|
});
|
|
923
|
-
const
|
|
934
|
+
const bt = {
|
|
924
935
|
ref: "controlRef",
|
|
925
936
|
class: "custom-control-wrapper"
|
|
926
937
|
};
|
|
927
|
-
function
|
|
928
|
-
return
|
|
929
|
-
|
|
938
|
+
function Pt(n, e, t, r, s, o) {
|
|
939
|
+
return V(), z("div", bt, [
|
|
940
|
+
W(n.$slots, "default", {}, void 0, !0)
|
|
930
941
|
], 512);
|
|
931
942
|
}
|
|
932
|
-
const
|
|
943
|
+
const Zr = /* @__PURE__ */ re(Mt, [["render", Pt], ["__scopeId", "data-v-ab9120cd"]]), $e = [
|
|
944
|
+
"closeclick",
|
|
945
|
+
"content_changed",
|
|
946
|
+
"domready",
|
|
947
|
+
"position_changed",
|
|
948
|
+
"visible",
|
|
949
|
+
"zindex_changed"
|
|
950
|
+
], qt = P({
|
|
933
951
|
inheritAttrs: !1,
|
|
934
952
|
props: {
|
|
935
953
|
options: {
|
|
@@ -940,68 +958,331 @@ const Bt = /* @__PURE__ */ X(rt, [["render", ot], ["__scopeId", "data-v-d099a3a6
|
|
|
940
958
|
type: Boolean
|
|
941
959
|
}
|
|
942
960
|
},
|
|
943
|
-
emits: [
|
|
944
|
-
setup(n, { slots: e, emit: t, expose:
|
|
945
|
-
const
|
|
946
|
-
let
|
|
947
|
-
const
|
|
948
|
-
var
|
|
949
|
-
return (
|
|
950
|
-
}), h = (
|
|
951
|
-
|
|
952
|
-
},
|
|
953
|
-
|
|
954
|
-
},
|
|
955
|
-
|
|
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));
|
|
956
974
|
};
|
|
957
|
-
return
|
|
958
|
-
|
|
959
|
-
[
|
|
960
|
-
([
|
|
961
|
-
var
|
|
962
|
-
const
|
|
963
|
-
|
|
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({
|
|
964
982
|
...g,
|
|
965
|
-
content:
|
|
966
|
-
}),
|
|
983
|
+
content: u.value ? o.value : g.content
|
|
984
|
+
}), a.value || m()) : (s.value = S(
|
|
967
985
|
new l.value.InfoWindow({
|
|
968
986
|
...g,
|
|
969
|
-
content:
|
|
987
|
+
content: u.value ? o.value : g.content
|
|
970
988
|
})
|
|
971
|
-
),
|
|
972
|
-
|
|
973
|
-
})), (!
|
|
974
|
-
var
|
|
975
|
-
(
|
|
976
|
-
}), (
|
|
989
|
+
), a.value && (c = a.value.addListener("click", () => {
|
|
990
|
+
m();
|
|
991
|
+
})), (!a.value || d) && m(), $e.forEach((O) => {
|
|
992
|
+
var b;
|
|
993
|
+
(b = s.value) == null || b.addListener(O, (C) => t(O, C));
|
|
994
|
+
}), (M = s.value) == null || M.addListener("closeclick", () => h(!1))));
|
|
977
995
|
},
|
|
978
996
|
{
|
|
979
997
|
immediate: !0
|
|
980
998
|
}
|
|
981
|
-
),
|
|
999
|
+
), q(
|
|
982
1000
|
() => n.modelValue,
|
|
983
|
-
(
|
|
984
|
-
|
|
1001
|
+
(f) => {
|
|
1002
|
+
f !== d && (f ? m() : p());
|
|
985
1003
|
}
|
|
986
1004
|
);
|
|
987
|
-
}),
|
|
988
|
-
var
|
|
989
|
-
|
|
990
|
-
}),
|
|
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 };
|
|
991
1009
|
}
|
|
992
1010
|
});
|
|
993
|
-
const
|
|
1011
|
+
const St = {
|
|
994
1012
|
key: 0,
|
|
995
1013
|
class: "info-window-wrapper"
|
|
996
1014
|
};
|
|
997
|
-
function
|
|
998
|
-
return n.hasSlotContent ? (
|
|
999
|
-
|
|
1000
|
-
|
|
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)
|
|
1001
1019
|
], 16)
|
|
1002
|
-
])) :
|
|
1020
|
+
])) : Ee("", !0);
|
|
1021
|
+
}
|
|
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);
|
|
1027
|
+
};
|
|
1028
|
+
}
|
|
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);
|
|
1034
|
+
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;
|
|
1039
|
+
};
|
|
1040
|
+
}
|
|
1041
|
+
function Be(n) {
|
|
1042
|
+
return Tt(n).concat(Lt(n));
|
|
1003
1043
|
}
|
|
1004
|
-
|
|
1044
|
+
var It = Object.hasOwn || function(n, e) {
|
|
1045
|
+
return xt.call(n, e);
|
|
1046
|
+
};
|
|
1047
|
+
function F(n, e) {
|
|
1048
|
+
return n === e || !n && !e && n !== n && e !== e;
|
|
1049
|
+
}
|
|
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)
|
|
1054
|
+
return !1;
|
|
1055
|
+
for (; r-- > 0; )
|
|
1056
|
+
if (!t.equals(n[r], e[r], r, r, n, e, t))
|
|
1057
|
+
return !1;
|
|
1058
|
+
return !0;
|
|
1059
|
+
}
|
|
1060
|
+
function Bt(n, e) {
|
|
1061
|
+
return F(n.getTime(), e.getTime());
|
|
1062
|
+
}
|
|
1063
|
+
function Dt(n, e) {
|
|
1064
|
+
return n.name === e.name && n.message === e.message && n.cause === e.cause && n.stack === e.stack;
|
|
1065
|
+
}
|
|
1066
|
+
function Zt(n, e) {
|
|
1067
|
+
return n === e;
|
|
1068
|
+
}
|
|
1069
|
+
function Fe(n, e, t) {
|
|
1070
|
+
var r = n.size;
|
|
1071
|
+
if (r !== e.size)
|
|
1072
|
+
return !1;
|
|
1073
|
+
if (!r)
|
|
1074
|
+
return !0;
|
|
1075
|
+
for (var s = new Array(r), o = n.entries(), i, l, a = 0; (i = o.next()) && !i.done; ) {
|
|
1076
|
+
for (var c = e.entries(), d = !1, u = 0; (l = c.next()) && !l.done; ) {
|
|
1077
|
+
if (s[u]) {
|
|
1078
|
+
u++;
|
|
1079
|
+
continue;
|
|
1080
|
+
}
|
|
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)) {
|
|
1083
|
+
d = s[u] = !0;
|
|
1084
|
+
break;
|
|
1085
|
+
}
|
|
1086
|
+
u++;
|
|
1087
|
+
}
|
|
1088
|
+
if (!d)
|
|
1089
|
+
return !1;
|
|
1090
|
+
a++;
|
|
1091
|
+
}
|
|
1092
|
+
return !0;
|
|
1093
|
+
}
|
|
1094
|
+
var Ft = F;
|
|
1095
|
+
function Ut(n, e, t) {
|
|
1096
|
+
var r = Ze(n), s = r.length;
|
|
1097
|
+
if (Ze(e).length !== s)
|
|
1098
|
+
return !1;
|
|
1099
|
+
for (; s-- > 0; )
|
|
1100
|
+
if (!Qe(n, e, t, r[s]))
|
|
1101
|
+
return !1;
|
|
1102
|
+
return !0;
|
|
1103
|
+
}
|
|
1104
|
+
function Y(n, e, t) {
|
|
1105
|
+
var r = Be(n), s = r.length;
|
|
1106
|
+
if (Be(e).length !== s)
|
|
1107
|
+
return !1;
|
|
1108
|
+
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)))
|
|
1110
|
+
return !1;
|
|
1111
|
+
return !0;
|
|
1112
|
+
}
|
|
1113
|
+
function Gt(n, e) {
|
|
1114
|
+
return F(n.valueOf(), e.valueOf());
|
|
1115
|
+
}
|
|
1116
|
+
function Vt(n, e) {
|
|
1117
|
+
return n.source === e.source && n.flags === e.flags;
|
|
1118
|
+
}
|
|
1119
|
+
function Ue(n, e, t) {
|
|
1120
|
+
var r = n.size;
|
|
1121
|
+
if (r !== e.size)
|
|
1122
|
+
return !1;
|
|
1123
|
+
if (!r)
|
|
1124
|
+
return !0;
|
|
1125
|
+
for (var s = new Array(r), o = n.values(), i, l; (i = o.next()) && !i.done; ) {
|
|
1126
|
+
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)) {
|
|
1128
|
+
c = s[d] = !0;
|
|
1129
|
+
break;
|
|
1130
|
+
}
|
|
1131
|
+
d++;
|
|
1132
|
+
}
|
|
1133
|
+
if (!c)
|
|
1134
|
+
return !1;
|
|
1135
|
+
}
|
|
1136
|
+
return !0;
|
|
1137
|
+
}
|
|
1138
|
+
function zt(n, e) {
|
|
1139
|
+
var t = n.length;
|
|
1140
|
+
if (e.length !== t)
|
|
1141
|
+
return !1;
|
|
1142
|
+
for (; t-- > 0; )
|
|
1143
|
+
if (n[t] !== e[t])
|
|
1144
|
+
return !1;
|
|
1145
|
+
return !0;
|
|
1146
|
+
}
|
|
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;
|
|
1149
|
+
}
|
|
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);
|
|
1152
|
+
}
|
|
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)
|
|
1158
|
+
return !0;
|
|
1159
|
+
if (p == null || f == null)
|
|
1160
|
+
return !1;
|
|
1161
|
+
var v = typeof p;
|
|
1162
|
+
if (v !== typeof f)
|
|
1163
|
+
return !1;
|
|
1164
|
+
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)
|
|
1168
|
+
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;
|
|
1185
|
+
};
|
|
1186
|
+
}
|
|
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
|
|
1201
|
+
};
|
|
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, {
|
|
1205
|
+
areArraysEqual: o,
|
|
1206
|
+
areMapsEqual: i,
|
|
1207
|
+
areObjectsEqual: l,
|
|
1208
|
+
areSetsEqual: a
|
|
1209
|
+
});
|
|
1210
|
+
}
|
|
1211
|
+
return s;
|
|
1212
|
+
}
|
|
1213
|
+
function ur(n) {
|
|
1214
|
+
return function(e, t, r, s, o, i, l) {
|
|
1215
|
+
return n(e, t, l);
|
|
1216
|
+
};
|
|
1217
|
+
}
|
|
1218
|
+
function cr(n) {
|
|
1219
|
+
var e = n.circular, t = n.comparator, r = n.createState, s = n.equals, o = n.strict;
|
|
1220
|
+
if (r)
|
|
1221
|
+
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;
|
|
1223
|
+
return t(a, c, {
|
|
1224
|
+
cache: h,
|
|
1225
|
+
equals: s,
|
|
1226
|
+
meta: m,
|
|
1227
|
+
strict: o
|
|
1228
|
+
});
|
|
1229
|
+
};
|
|
1230
|
+
if (e)
|
|
1231
|
+
return function(a, c) {
|
|
1232
|
+
return t(a, c, {
|
|
1233
|
+
cache: /* @__PURE__ */ new WeakMap(),
|
|
1234
|
+
equals: s,
|
|
1235
|
+
meta: void 0,
|
|
1236
|
+
strict: o
|
|
1237
|
+
});
|
|
1238
|
+
};
|
|
1239
|
+
var i = {
|
|
1240
|
+
cache: void 0,
|
|
1241
|
+
equals: s,
|
|
1242
|
+
meta: void 0,
|
|
1243
|
+
strict: o
|
|
1244
|
+
};
|
|
1245
|
+
return function(a, c) {
|
|
1246
|
+
return t(a, c, i);
|
|
1247
|
+
};
|
|
1248
|
+
}
|
|
1249
|
+
var ae = R();
|
|
1250
|
+
R({ strict: !0 });
|
|
1251
|
+
R({ circular: !0 });
|
|
1252
|
+
R({
|
|
1253
|
+
circular: !0,
|
|
1254
|
+
strict: !0
|
|
1255
|
+
});
|
|
1256
|
+
R({
|
|
1257
|
+
createInternalComparator: function() {
|
|
1258
|
+
return F;
|
|
1259
|
+
}
|
|
1260
|
+
});
|
|
1261
|
+
R({
|
|
1262
|
+
strict: !0,
|
|
1263
|
+
createInternalComparator: function() {
|
|
1264
|
+
return F;
|
|
1265
|
+
}
|
|
1266
|
+
});
|
|
1267
|
+
R({
|
|
1268
|
+
circular: !0,
|
|
1269
|
+
createInternalComparator: function() {
|
|
1270
|
+
return F;
|
|
1271
|
+
}
|
|
1272
|
+
});
|
|
1273
|
+
R({
|
|
1274
|
+
circular: !0,
|
|
1275
|
+
createInternalComparator: function() {
|
|
1276
|
+
return F;
|
|
1277
|
+
},
|
|
1278
|
+
strict: !0
|
|
1279
|
+
});
|
|
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 });
|
|
1284
|
+
}
|
|
1285
|
+
const ze = [
|
|
1005
1286
|
Int8Array,
|
|
1006
1287
|
Uint8Array,
|
|
1007
1288
|
Uint8ClampedArray,
|
|
@@ -1011,8 +1292,8 @@ const Zt = /* @__PURE__ */ X(it, [["render", lt], ["__scopeId", "data-v-cbe1707b
|
|
|
1011
1292
|
Uint32Array,
|
|
1012
1293
|
Float32Array,
|
|
1013
1294
|
Float64Array
|
|
1014
|
-
],
|
|
1015
|
-
class
|
|
1295
|
+
], he = 1, X = 8;
|
|
1296
|
+
class Ce {
|
|
1016
1297
|
/**
|
|
1017
1298
|
* Creates an index from raw `ArrayBuffer` data.
|
|
1018
1299
|
* @param {ArrayBuffer} data
|
|
@@ -1020,17 +1301,17 @@ class me {
|
|
|
1020
1301
|
static from(e) {
|
|
1021
1302
|
if (!(e instanceof ArrayBuffer))
|
|
1022
1303
|
throw new Error("Data must be an instance of ArrayBuffer.");
|
|
1023
|
-
const [t,
|
|
1304
|
+
const [t, r] = new Uint8Array(e, 0, 2);
|
|
1024
1305
|
if (t !== 219)
|
|
1025
1306
|
throw new Error("Data does not appear to be in a KDBush format.");
|
|
1026
|
-
const
|
|
1027
|
-
if (
|
|
1028
|
-
throw new Error(`Got v${
|
|
1029
|
-
const o =
|
|
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];
|
|
1030
1311
|
if (!o)
|
|
1031
1312
|
throw new Error("Unrecognized array type.");
|
|
1032
|
-
const [
|
|
1033
|
-
return new
|
|
1313
|
+
const [i] = new Uint16Array(e, 2, 1), [l] = new Uint32Array(e, 4, 1);
|
|
1314
|
+
return new Ce(l, i, o, e);
|
|
1034
1315
|
}
|
|
1035
1316
|
/**
|
|
1036
1317
|
* Creates an index that will hold a given number of items.
|
|
@@ -1039,14 +1320,14 @@ class me {
|
|
|
1039
1320
|
* @param {TypedArrayConstructor} [ArrayType=Float64Array] The array type used for coordinates storage (`Float64Array` by default).
|
|
1040
1321
|
* @param {ArrayBuffer} [data] (For internal use only)
|
|
1041
1322
|
*/
|
|
1042
|
-
constructor(e, t = 64,
|
|
1323
|
+
constructor(e, t = 64, r = Float64Array, s) {
|
|
1043
1324
|
if (isNaN(e) || e < 0)
|
|
1044
1325
|
throw new Error(`Unpexpected numItems value: ${e}.`);
|
|
1045
|
-
this.numItems = +e, this.nodeSize = Math.min(Math.max(+t, 2), 65535), this.ArrayType =
|
|
1046
|
-
const o =
|
|
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;
|
|
1047
1328
|
if (o < 0)
|
|
1048
|
-
throw new Error(`Unexpected typed array class: ${
|
|
1049
|
-
|
|
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);
|
|
1050
1331
|
}
|
|
1051
1332
|
/**
|
|
1052
1333
|
* Add a point to the index.
|
|
@@ -1055,8 +1336,8 @@ class me {
|
|
|
1055
1336
|
* @returns {number} An incremental index associated with the added item (starting from `0`).
|
|
1056
1337
|
*/
|
|
1057
1338
|
add(e, t) {
|
|
1058
|
-
const
|
|
1059
|
-
return this.ids[
|
|
1339
|
+
const r = this._pos >> 1;
|
|
1340
|
+
return this.ids[r] = r, this.coords[this._pos++] = e, this.coords[this._pos++] = t, r;
|
|
1060
1341
|
}
|
|
1061
1342
|
/**
|
|
1062
1343
|
* Perform indexing of the added points.
|
|
@@ -1065,7 +1346,7 @@ class me {
|
|
|
1065
1346
|
const e = this._pos >> 1;
|
|
1066
1347
|
if (e !== this.numItems)
|
|
1067
1348
|
throw new Error(`Added ${e} items when expected ${this.numItems}.`);
|
|
1068
|
-
return
|
|
1349
|
+
return ve(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = !0, this;
|
|
1069
1350
|
}
|
|
1070
1351
|
/**
|
|
1071
1352
|
* Search the index for items within a given bounding box.
|
|
@@ -1075,23 +1356,23 @@ class me {
|
|
|
1075
1356
|
* @param {number} maxY
|
|
1076
1357
|
* @returns {number[]} An array of indices correponding to the found items.
|
|
1077
1358
|
*/
|
|
1078
|
-
range(e, t,
|
|
1359
|
+
range(e, t, r, s) {
|
|
1079
1360
|
if (!this._finished)
|
|
1080
1361
|
throw new Error("Data not yet indexed - call index.finish().");
|
|
1081
|
-
const { ids: o, coords:
|
|
1082
|
-
for (;
|
|
1083
|
-
const
|
|
1084
|
-
if (
|
|
1085
|
-
for (let g = h; g <=
|
|
1086
|
-
const
|
|
1087
|
-
|
|
1362
|
+
const { ids: o, coords: i, nodeSize: l } = this, a = [0, o.length - 1, 0], c = [];
|
|
1363
|
+
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]);
|
|
1088
1369
|
}
|
|
1089
1370
|
continue;
|
|
1090
1371
|
}
|
|
1091
|
-
const
|
|
1092
|
-
|
|
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));
|
|
1093
1374
|
}
|
|
1094
|
-
return
|
|
1375
|
+
return c;
|
|
1095
1376
|
}
|
|
1096
1377
|
/**
|
|
1097
1378
|
* Search the index for items within a given radius.
|
|
@@ -1100,58 +1381,58 @@ class me {
|
|
|
1100
1381
|
* @param {number} r Query radius.
|
|
1101
1382
|
* @returns {number[]} An array of indices correponding to the found items.
|
|
1102
1383
|
*/
|
|
1103
|
-
within(e, t,
|
|
1384
|
+
within(e, t, r) {
|
|
1104
1385
|
if (!this._finished)
|
|
1105
1386
|
throw new Error("Data not yet indexed - call index.finish().");
|
|
1106
|
-
const { ids:
|
|
1387
|
+
const { ids: s, coords: o, nodeSize: i } = this, l = [0, s.length - 1, 0], a = [], c = r * r;
|
|
1107
1388
|
for (; l.length; ) {
|
|
1108
|
-
const
|
|
1109
|
-
if (
|
|
1110
|
-
for (let g = h; g <=
|
|
1111
|
-
|
|
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]);
|
|
1112
1393
|
continue;
|
|
1113
1394
|
}
|
|
1114
|
-
const
|
|
1115
|
-
|
|
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));
|
|
1116
1397
|
}
|
|
1117
|
-
return
|
|
1398
|
+
return a;
|
|
1118
1399
|
}
|
|
1119
1400
|
}
|
|
1120
|
-
function
|
|
1121
|
-
if (
|
|
1401
|
+
function ve(n, e, t, r, s, o) {
|
|
1402
|
+
if (s - r <= t)
|
|
1122
1403
|
return;
|
|
1123
|
-
const
|
|
1124
|
-
|
|
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);
|
|
1125
1406
|
}
|
|
1126
|
-
function
|
|
1127
|
-
for (;
|
|
1128
|
-
if (
|
|
1129
|
-
const
|
|
1130
|
-
|
|
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);
|
|
1131
1412
|
}
|
|
1132
|
-
const
|
|
1133
|
-
let l =
|
|
1134
|
-
for (
|
|
1135
|
-
for (
|
|
1413
|
+
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; )
|
|
1136
1417
|
l++;
|
|
1137
|
-
for (; e[2 *
|
|
1138
|
-
|
|
1418
|
+
for (; e[2 * a + o] > i; )
|
|
1419
|
+
a--;
|
|
1139
1420
|
}
|
|
1140
|
-
e[2 *
|
|
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);
|
|
1141
1422
|
}
|
|
1142
1423
|
}
|
|
1143
|
-
function
|
|
1144
|
-
|
|
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);
|
|
1145
1426
|
}
|
|
1146
|
-
function
|
|
1147
|
-
const
|
|
1148
|
-
n[e] = n[t], n[t] =
|
|
1427
|
+
function me(n, e, t) {
|
|
1428
|
+
const r = n[e];
|
|
1429
|
+
n[e] = n[t], n[t] = r;
|
|
1149
1430
|
}
|
|
1150
|
-
function
|
|
1151
|
-
const
|
|
1152
|
-
return
|
|
1431
|
+
function We(n, e, t, r) {
|
|
1432
|
+
const s = n - t, o = e - r;
|
|
1433
|
+
return s * s + o * o;
|
|
1153
1434
|
}
|
|
1154
|
-
const
|
|
1435
|
+
const dr = {
|
|
1155
1436
|
minZoom: 0,
|
|
1156
1437
|
// min zoom to generate clusters on
|
|
1157
1438
|
maxZoom: 16,
|
|
@@ -1174,201 +1455,201 @@ const ct = {
|
|
|
1174
1455
|
// properties to use for individual points when running the reducer
|
|
1175
1456
|
map: (n) => n
|
|
1176
1457
|
// props => ({sum: props.my_value})
|
|
1177
|
-
},
|
|
1178
|
-
class
|
|
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 {
|
|
1179
1460
|
constructor(e) {
|
|
1180
|
-
this.options = Object.assign(Object.create(
|
|
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 = [];
|
|
1181
1462
|
}
|
|
1182
1463
|
load(e) {
|
|
1183
|
-
const { log: t, minZoom:
|
|
1464
|
+
const { log: t, minZoom: r, maxZoom: s } = this.options;
|
|
1184
1465
|
t && console.time("total time");
|
|
1185
1466
|
const o = `prepare ${e.length} points`;
|
|
1186
1467
|
t && console.time(o), this.points = e;
|
|
1187
|
-
const
|
|
1188
|
-
for (let
|
|
1189
|
-
const
|
|
1190
|
-
if (!
|
|
1468
|
+
const i = [];
|
|
1469
|
+
for (let a = 0; a < e.length; a++) {
|
|
1470
|
+
const c = e[a];
|
|
1471
|
+
if (!c.geometry)
|
|
1191
1472
|
continue;
|
|
1192
|
-
const [
|
|
1193
|
-
|
|
1473
|
+
const [d, u] = c.geometry.coordinates, h = Ke(oe(d)), m = Ke(ie(u));
|
|
1474
|
+
i.push(
|
|
1194
1475
|
h,
|
|
1195
|
-
|
|
1476
|
+
m,
|
|
1196
1477
|
// projected point coordinates
|
|
1197
1478
|
1 / 0,
|
|
1198
1479
|
// the last zoom the point was processed at
|
|
1199
|
-
|
|
1480
|
+
a,
|
|
1200
1481
|
// index of the source feature in the original input array
|
|
1201
1482
|
-1,
|
|
1202
1483
|
// parent cluster id
|
|
1203
1484
|
1
|
|
1204
1485
|
// number of points in a cluster
|
|
1205
|
-
), this.options.reduce &&
|
|
1486
|
+
), this.options.reduce && i.push(0);
|
|
1206
1487
|
}
|
|
1207
|
-
let l = this.trees[
|
|
1488
|
+
let l = this.trees[s + 1] = this._createTree(i);
|
|
1208
1489
|
t && console.timeEnd(o);
|
|
1209
|
-
for (let
|
|
1210
|
-
const
|
|
1211
|
-
l = this.trees[
|
|
1490
|
+
for (let a = s; a >= r; a--) {
|
|
1491
|
+
const c = +Date.now();
|
|
1492
|
+
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);
|
|
1212
1493
|
}
|
|
1213
1494
|
return t && console.timeEnd("total time"), this;
|
|
1214
1495
|
}
|
|
1215
1496
|
getClusters(e, t) {
|
|
1216
|
-
let
|
|
1217
|
-
const
|
|
1497
|
+
let r = ((e[0] + 180) % 360 + 360) % 360 - 180;
|
|
1498
|
+
const s = Math.max(-90, Math.min(90, e[1]));
|
|
1218
1499
|
let o = e[2] === 180 ? 180 : ((e[2] + 180) % 360 + 360) % 360 - 180;
|
|
1219
|
-
const
|
|
1500
|
+
const i = Math.max(-90, Math.min(90, e[3]));
|
|
1220
1501
|
if (e[2] - e[0] >= 360)
|
|
1221
|
-
|
|
1222
|
-
else if (
|
|
1223
|
-
const
|
|
1224
|
-
return
|
|
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);
|
|
1225
1506
|
}
|
|
1226
|
-
const l = this.trees[this._limitZoom(t)],
|
|
1227
|
-
for (const
|
|
1228
|
-
const h = this.stride *
|
|
1229
|
-
|
|
1507
|
+
const l = this.trees[this._limitZoom(t)], a = l.range(oe(r), ie(i), oe(o), ie(s)), c = l.data, d = [];
|
|
1508
|
+
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]]);
|
|
1230
1511
|
}
|
|
1231
|
-
return
|
|
1512
|
+
return d;
|
|
1232
1513
|
}
|
|
1233
1514
|
getChildren(e) {
|
|
1234
|
-
const t = this._getOriginId(e),
|
|
1515
|
+
const t = this._getOriginId(e), r = this._getOriginZoom(e), s = "No cluster with the specified id.", o = this.trees[r];
|
|
1235
1516
|
if (!o)
|
|
1236
|
-
throw new Error(
|
|
1237
|
-
const
|
|
1238
|
-
if (t * this.stride >=
|
|
1239
|
-
throw new Error(
|
|
1240
|
-
const l = this.options.radius / (this.options.extent * Math.pow(2,
|
|
1241
|
-
for (const h of
|
|
1242
|
-
const
|
|
1243
|
-
|
|
1517
|
+
throw new Error(s);
|
|
1518
|
+
const i = o.data;
|
|
1519
|
+
if (t * this.stride >= i.length)
|
|
1520
|
+
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]]);
|
|
1244
1525
|
}
|
|
1245
|
-
if (
|
|
1246
|
-
throw new Error(
|
|
1247
|
-
return
|
|
1526
|
+
if (u.length === 0)
|
|
1527
|
+
throw new Error(s);
|
|
1528
|
+
return u;
|
|
1248
1529
|
}
|
|
1249
|
-
getLeaves(e, t,
|
|
1250
|
-
t = t || 10,
|
|
1251
|
-
const
|
|
1252
|
-
return this._appendLeaves(
|
|
1530
|
+
getLeaves(e, t, r) {
|
|
1531
|
+
t = t || 10, r = r || 0;
|
|
1532
|
+
const s = [];
|
|
1533
|
+
return this._appendLeaves(s, e, t, r, 0), s;
|
|
1253
1534
|
}
|
|
1254
|
-
getTile(e, t,
|
|
1255
|
-
const
|
|
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 = {
|
|
1256
1537
|
features: []
|
|
1257
1538
|
};
|
|
1258
1539
|
return this._addTileFeatures(
|
|
1259
|
-
|
|
1260
|
-
|
|
1540
|
+
s.range((t - a) / o, c, (t + 1 + a) / o, d),
|
|
1541
|
+
s.data,
|
|
1261
1542
|
t,
|
|
1262
|
-
|
|
1543
|
+
r,
|
|
1263
1544
|
o,
|
|
1264
|
-
|
|
1545
|
+
u
|
|
1265
1546
|
), t === 0 && this._addTileFeatures(
|
|
1266
|
-
|
|
1267
|
-
|
|
1547
|
+
s.range(1 - a / o, c, 1, d),
|
|
1548
|
+
s.data,
|
|
1268
1549
|
o,
|
|
1269
|
-
|
|
1550
|
+
r,
|
|
1270
1551
|
o,
|
|
1271
|
-
|
|
1552
|
+
u
|
|
1272
1553
|
), t === o - 1 && this._addTileFeatures(
|
|
1273
|
-
|
|
1274
|
-
|
|
1554
|
+
s.range(0, c, a / o, d),
|
|
1555
|
+
s.data,
|
|
1275
1556
|
-1,
|
|
1276
|
-
|
|
1557
|
+
r,
|
|
1277
1558
|
o,
|
|
1278
|
-
|
|
1279
|
-
),
|
|
1559
|
+
u
|
|
1560
|
+
), u.features.length ? u : null;
|
|
1280
1561
|
}
|
|
1281
1562
|
getClusterExpansionZoom(e) {
|
|
1282
1563
|
let t = this._getOriginZoom(e) - 1;
|
|
1283
1564
|
for (; t <= this.options.maxZoom; ) {
|
|
1284
|
-
const
|
|
1285
|
-
if (t++,
|
|
1565
|
+
const r = this.getChildren(e);
|
|
1566
|
+
if (t++, r.length !== 1)
|
|
1286
1567
|
break;
|
|
1287
|
-
e =
|
|
1568
|
+
e = r[0].properties.cluster_id;
|
|
1288
1569
|
}
|
|
1289
1570
|
return t;
|
|
1290
1571
|
}
|
|
1291
|
-
_appendLeaves(e, t,
|
|
1292
|
-
const
|
|
1293
|
-
for (const l of
|
|
1294
|
-
const
|
|
1295
|
-
if (
|
|
1572
|
+
_appendLeaves(e, t, r, s, o) {
|
|
1573
|
+
const i = this.getChildren(t);
|
|
1574
|
+
for (const l of i) {
|
|
1575
|
+
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)
|
|
1296
1577
|
break;
|
|
1297
1578
|
}
|
|
1298
1579
|
return o;
|
|
1299
1580
|
}
|
|
1300
1581
|
_createTree(e) {
|
|
1301
|
-
const t = new
|
|
1302
|
-
for (let
|
|
1303
|
-
t.add(e[
|
|
1582
|
+
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]);
|
|
1304
1585
|
return t.finish(), t.data = e, t;
|
|
1305
1586
|
}
|
|
1306
|
-
_addTileFeatures(e, t,
|
|
1587
|
+
_addTileFeatures(e, t, r, s, o, i) {
|
|
1307
1588
|
for (const l of e) {
|
|
1308
|
-
const
|
|
1309
|
-
let
|
|
1310
|
-
if (
|
|
1311
|
-
|
|
1589
|
+
const a = l * this.stride, c = t[a + L] > 1;
|
|
1590
|
+
let d, u, h;
|
|
1591
|
+
if (c)
|
|
1592
|
+
d = nt(t, a, this.clusterProps), u = t[a], h = t[a + 1];
|
|
1312
1593
|
else {
|
|
1313
|
-
const
|
|
1314
|
-
|
|
1315
|
-
const [g,
|
|
1316
|
-
|
|
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);
|
|
1317
1598
|
}
|
|
1318
|
-
const
|
|
1599
|
+
const m = {
|
|
1319
1600
|
type: 1,
|
|
1320
1601
|
geometry: [[
|
|
1321
|
-
Math.round(this.options.extent * (
|
|
1322
|
-
Math.round(this.options.extent * (h * o -
|
|
1602
|
+
Math.round(this.options.extent * (u * o - r)),
|
|
1603
|
+
Math.round(this.options.extent * (h * o - s))
|
|
1323
1604
|
]],
|
|
1324
|
-
tags:
|
|
1605
|
+
tags: d
|
|
1325
1606
|
};
|
|
1326
|
-
let
|
|
1327
|
-
|
|
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);
|
|
1328
1609
|
}
|
|
1329
1610
|
}
|
|
1330
1611
|
_limitZoom(e) {
|
|
1331
1612
|
return Math.max(this.options.minZoom, Math.min(Math.floor(+e), this.options.maxZoom + 1));
|
|
1332
1613
|
}
|
|
1333
1614
|
_cluster(e, t) {
|
|
1334
|
-
const { radius:
|
|
1335
|
-
for (let
|
|
1336
|
-
if (
|
|
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;
|
|
1616
|
+
for (let u = 0; u < a.length; u += d) {
|
|
1617
|
+
if (a[u + $] <= t)
|
|
1337
1618
|
continue;
|
|
1338
|
-
|
|
1339
|
-
const h =
|
|
1340
|
-
let g =
|
|
1341
|
-
for (const
|
|
1342
|
-
const
|
|
1343
|
-
|
|
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]);
|
|
1344
1625
|
}
|
|
1345
|
-
if (g >
|
|
1346
|
-
let
|
|
1347
|
-
const
|
|
1348
|
-
for (const
|
|
1349
|
-
const
|
|
1350
|
-
if (
|
|
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) {
|
|
1630
|
+
const C = b * d;
|
|
1631
|
+
if (a[C + $] <= t)
|
|
1351
1632
|
continue;
|
|
1352
|
-
|
|
1353
|
-
const
|
|
1354
|
-
|
|
1633
|
+
a[C + $] = t;
|
|
1634
|
+
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)));
|
|
1355
1636
|
}
|
|
1356
|
-
|
|
1637
|
+
a[u + ge] = O, c.push(v / g, E / g, 1 / 0, O, -1, g), o && c.push(M);
|
|
1357
1638
|
} else {
|
|
1358
|
-
for (let
|
|
1359
|
-
|
|
1639
|
+
for (let v = 0; v < d; v++)
|
|
1640
|
+
c.push(a[u + v]);
|
|
1360
1641
|
if (g > 1)
|
|
1361
|
-
for (const
|
|
1362
|
-
const
|
|
1363
|
-
if (!(
|
|
1364
|
-
|
|
1365
|
-
for (let
|
|
1366
|
-
|
|
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]);
|
|
1367
1648
|
}
|
|
1368
1649
|
}
|
|
1369
1650
|
}
|
|
1370
1651
|
}
|
|
1371
|
-
return
|
|
1652
|
+
return c;
|
|
1372
1653
|
}
|
|
1373
1654
|
// get index of the point from which the cluster originated
|
|
1374
1655
|
_getOriginId(e) {
|
|
@@ -1378,73 +1659,59 @@ class qe {
|
|
|
1378
1659
|
_getOriginZoom(e) {
|
|
1379
1660
|
return (e - this.points.length) % 32;
|
|
1380
1661
|
}
|
|
1381
|
-
_map(e, t,
|
|
1382
|
-
if (e[t +
|
|
1383
|
-
const
|
|
1384
|
-
return
|
|
1662
|
+
_map(e, t, r) {
|
|
1663
|
+
if (e[t + L] > 1) {
|
|
1664
|
+
const i = this.clusterProps[e[t + tt]];
|
|
1665
|
+
return r ? Object.assign({}, i) : i;
|
|
1385
1666
|
}
|
|
1386
|
-
const
|
|
1387
|
-
return
|
|
1667
|
+
const s = this.points[e[t + x]].properties, o = this.options.map(s);
|
|
1668
|
+
return r && o === s ? Object.assign({}, o) : o;
|
|
1388
1669
|
}
|
|
1389
1670
|
}
|
|
1390
|
-
function
|
|
1671
|
+
function He(n, e, t) {
|
|
1391
1672
|
return {
|
|
1392
1673
|
type: "Feature",
|
|
1393
|
-
id: n[e +
|
|
1394
|
-
properties:
|
|
1674
|
+
id: n[e + x],
|
|
1675
|
+
properties: nt(n, e, t),
|
|
1395
1676
|
geometry: {
|
|
1396
1677
|
type: "Point",
|
|
1397
|
-
coordinates: [
|
|
1678
|
+
coordinates: [pr(n[e]), fr(n[e + 1])]
|
|
1398
1679
|
}
|
|
1399
1680
|
};
|
|
1400
1681
|
}
|
|
1401
|
-
function
|
|
1402
|
-
const
|
|
1403
|
-
return Object.assign(
|
|
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]);
|
|
1684
|
+
return Object.assign(i, {
|
|
1404
1685
|
cluster: !0,
|
|
1405
|
-
cluster_id: n[e +
|
|
1406
|
-
point_count:
|
|
1407
|
-
point_count_abbreviated:
|
|
1686
|
+
cluster_id: n[e + x],
|
|
1687
|
+
point_count: r,
|
|
1688
|
+
point_count_abbreviated: s
|
|
1408
1689
|
});
|
|
1409
1690
|
}
|
|
1410
|
-
function
|
|
1691
|
+
function oe(n) {
|
|
1411
1692
|
return n / 360 + 0.5;
|
|
1412
1693
|
}
|
|
1413
|
-
function
|
|
1694
|
+
function ie(n) {
|
|
1414
1695
|
const e = Math.sin(n * Math.PI / 180), t = 0.5 - 0.25 * Math.log((1 + e) / (1 - e)) / Math.PI;
|
|
1415
1696
|
return t < 0 ? 0 : t > 1 ? 1 : t;
|
|
1416
1697
|
}
|
|
1417
|
-
function
|
|
1698
|
+
function pr(n) {
|
|
1418
1699
|
return (n - 0.5) * 360;
|
|
1419
1700
|
}
|
|
1420
|
-
function
|
|
1701
|
+
function fr(n) {
|
|
1421
1702
|
const e = (180 - n * 360) * Math.PI / 180;
|
|
1422
1703
|
return 360 * Math.atan(Math.exp(e)) / Math.PI - 90;
|
|
1423
1704
|
}
|
|
1424
|
-
|
|
1425
|
-
Copyright (c) Microsoft Corporation.
|
|
1426
|
-
|
|
1427
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
1428
|
-
purpose with or without fee is hereby granted.
|
|
1429
|
-
|
|
1430
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1431
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1432
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1433
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1434
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1435
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1436
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1437
|
-
***************************************************************************** */
|
|
1438
|
-
function ge(n, e) {
|
|
1705
|
+
function Oe(n, e) {
|
|
1439
1706
|
var t = {};
|
|
1440
|
-
for (var
|
|
1441
|
-
Object.prototype.hasOwnProperty.call(n,
|
|
1707
|
+
for (var r in n)
|
|
1708
|
+
Object.prototype.hasOwnProperty.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
|
|
1442
1709
|
if (n != null && typeof Object.getOwnPropertySymbols == "function")
|
|
1443
|
-
for (var
|
|
1444
|
-
e.indexOf(s
|
|
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]]);
|
|
1445
1712
|
return t;
|
|
1446
1713
|
}
|
|
1447
|
-
class
|
|
1714
|
+
class _ {
|
|
1448
1715
|
static isAdvancedMarkerAvailable(e) {
|
|
1449
1716
|
return google.maps.marker && e.getMapCapabilities().isAdvancedMarkersAvailable === !0;
|
|
1450
1717
|
}
|
|
@@ -1459,7 +1726,7 @@ class k {
|
|
|
1459
1726
|
if (e.position) {
|
|
1460
1727
|
if (e.position instanceof google.maps.LatLng)
|
|
1461
1728
|
return e.position;
|
|
1462
|
-
if (e.position.lat && e.position.lng)
|
|
1729
|
+
if (Number.isFinite(e.position.lat) && Number.isFinite(e.position.lng))
|
|
1463
1730
|
return new google.maps.LatLng(e.position.lat, e.position.lng);
|
|
1464
1731
|
}
|
|
1465
1732
|
return new google.maps.LatLng(null);
|
|
@@ -1470,16 +1737,16 @@ class k {
|
|
|
1470
1737
|
return this.isAdvancedMarker(e) ? !0 : e.getVisible();
|
|
1471
1738
|
}
|
|
1472
1739
|
}
|
|
1473
|
-
class
|
|
1740
|
+
class te {
|
|
1474
1741
|
constructor({ markers: e, position: t }) {
|
|
1475
|
-
this.markers = e, t && (t instanceof google.maps.LatLng ? this._position = t : this._position = new google.maps.LatLng(t));
|
|
1742
|
+
this.markers = [], e && (this.markers = e), t && (t instanceof google.maps.LatLng ? this._position = t : this._position = new google.maps.LatLng(t));
|
|
1476
1743
|
}
|
|
1477
1744
|
get bounds() {
|
|
1478
1745
|
if (this.markers.length === 0 && !this._position)
|
|
1479
1746
|
return;
|
|
1480
1747
|
const e = new google.maps.LatLngBounds(this._position, this._position);
|
|
1481
1748
|
for (const t of this.markers)
|
|
1482
|
-
e.extend(
|
|
1749
|
+
e.extend(_.getPosition(t));
|
|
1483
1750
|
return e;
|
|
1484
1751
|
}
|
|
1485
1752
|
get position() {
|
|
@@ -1489,7 +1756,7 @@ class W {
|
|
|
1489
1756
|
* Get the count of **visible** markers.
|
|
1490
1757
|
*/
|
|
1491
1758
|
get count() {
|
|
1492
|
-
return this.markers.filter((e) =>
|
|
1759
|
+
return this.markers.filter((e) => _.getVisible(e)).length;
|
|
1493
1760
|
}
|
|
1494
1761
|
/**
|
|
1495
1762
|
* Add a marker to the cluster.
|
|
@@ -1501,26 +1768,32 @@ class W {
|
|
|
1501
1768
|
* Cleanup references and remove marker from map.
|
|
1502
1769
|
*/
|
|
1503
1770
|
delete() {
|
|
1504
|
-
this.marker && (
|
|
1771
|
+
this.marker && (_.setMap(this.marker, null), this.marker = void 0), this.markers.length = 0;
|
|
1505
1772
|
}
|
|
1506
1773
|
}
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
}
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
const
|
|
1515
|
-
return
|
|
1516
|
-
},
|
|
1517
|
-
northEast:
|
|
1518
|
-
|
|
1519
|
-
}
|
|
1520
|
-
const
|
|
1521
|
-
return
|
|
1774
|
+
function A(n, e = "assertion failed") {
|
|
1775
|
+
if (n == null)
|
|
1776
|
+
throw Error(e);
|
|
1777
|
+
}
|
|
1778
|
+
const hr = (n, e, t, r) => {
|
|
1779
|
+
const s = n.getBounds();
|
|
1780
|
+
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();
|
|
1788
|
+
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);
|
|
1522
1795
|
};
|
|
1523
|
-
class
|
|
1796
|
+
class ot {
|
|
1524
1797
|
constructor({ maxZoom: e = 16 }) {
|
|
1525
1798
|
this.maxZoom = e;
|
|
1526
1799
|
}
|
|
@@ -1537,138 +1810,139 @@ class Ze {
|
|
|
1537
1810
|
* ```
|
|
1538
1811
|
*/
|
|
1539
1812
|
noop({ markers: e }) {
|
|
1540
|
-
return
|
|
1813
|
+
return Er(e);
|
|
1541
1814
|
}
|
|
1542
1815
|
}
|
|
1543
|
-
class
|
|
1816
|
+
class wr extends ot {
|
|
1544
1817
|
constructor(e) {
|
|
1545
|
-
var { viewportPadding: t = 60 } = e,
|
|
1546
|
-
super(
|
|
1818
|
+
var { viewportPadding: t = 60 } = e, r = Oe(e, ["viewportPadding"]);
|
|
1819
|
+
super(r), this.viewportPadding = 60, this.viewportPadding = t;
|
|
1547
1820
|
}
|
|
1548
|
-
calculate({ markers: e, map: t, mapCanvasProjection:
|
|
1549
|
-
|
|
1821
|
+
calculate({ markers: e, map: t, mapCanvasProjection: r }) {
|
|
1822
|
+
const s = t.getZoom();
|
|
1823
|
+
return A(s), s >= this.maxZoom ? {
|
|
1550
1824
|
clusters: this.noop({
|
|
1551
1825
|
markers: e
|
|
1552
1826
|
}),
|
|
1553
1827
|
changed: !1
|
|
1554
1828
|
} : {
|
|
1555
1829
|
clusters: this.cluster({
|
|
1556
|
-
markers:
|
|
1830
|
+
markers: hr(t, r, e, this.viewportPadding),
|
|
1557
1831
|
map: t,
|
|
1558
|
-
mapCanvasProjection:
|
|
1832
|
+
mapCanvasProjection: r
|
|
1559
1833
|
})
|
|
1560
1834
|
};
|
|
1561
1835
|
}
|
|
1562
1836
|
}
|
|
1563
|
-
const
|
|
1564
|
-
position:
|
|
1837
|
+
const Er = (n) => n.map((t) => new te({
|
|
1838
|
+
position: _.getPosition(t),
|
|
1565
1839
|
markers: [t]
|
|
1566
1840
|
}));
|
|
1567
|
-
class
|
|
1841
|
+
class _r extends ot {
|
|
1568
1842
|
constructor(e) {
|
|
1569
|
-
var { maxZoom: t, radius:
|
|
1570
|
-
super({ maxZoom: t }), this.state = { zoom: -1 }, this.superCluster = new
|
|
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));
|
|
1571
1845
|
}
|
|
1572
1846
|
calculate(e) {
|
|
1573
|
-
let t = !1;
|
|
1574
|
-
|
|
1575
|
-
|
|
1847
|
+
let t = !1, r = e.map.getZoom();
|
|
1848
|
+
A(r), r = Math.round(r);
|
|
1849
|
+
const s = { zoom: r };
|
|
1850
|
+
if (!ae(e.markers, this.markers)) {
|
|
1576
1851
|
t = !0, this.markers = [...e.markers];
|
|
1577
|
-
const
|
|
1578
|
-
const
|
|
1852
|
+
const o = this.markers.map((i) => {
|
|
1853
|
+
const l = _.getPosition(i);
|
|
1579
1854
|
return {
|
|
1580
1855
|
type: "Feature",
|
|
1581
|
-
geometry: {
|
|
1582
|
-
|
|
1583
|
-
coordinates: [a.lng(), a.lat()]
|
|
1584
|
-
},
|
|
1585
|
-
properties: { marker: o }
|
|
1856
|
+
geometry: { type: "Point", coordinates: [l.lng(), l.lat()] },
|
|
1857
|
+
properties: { marker: i }
|
|
1586
1858
|
};
|
|
1587
1859
|
});
|
|
1588
|
-
this.superCluster.load(
|
|
1860
|
+
this.superCluster.load(o);
|
|
1589
1861
|
}
|
|
1590
|
-
return t || (this.state.zoom <= this.maxZoom || s.zoom <= this.maxZoom) && (t = !
|
|
1862
|
+
return t || (this.state.zoom <= this.maxZoom || s.zoom <= this.maxZoom) && (t = !ae(this.state, s)), this.state = s, e.markers.length === 0 ? (this.clusters = [], { clusters: this.clusters, changed: t }) : (t && (this.clusters = this.cluster(e)), { clusters: this.clusters, changed: t });
|
|
1591
1863
|
}
|
|
1592
1864
|
cluster({ map: e }) {
|
|
1593
|
-
|
|
1865
|
+
const t = e.getZoom();
|
|
1866
|
+
return A(t), this.superCluster.getClusters([-180, -90, 180, 90], Math.round(t)).map((r) => this.transformCluster(r));
|
|
1594
1867
|
}
|
|
1595
|
-
transformCluster({ geometry: { coordinates: [e, t] }, properties:
|
|
1596
|
-
if (
|
|
1597
|
-
return new
|
|
1598
|
-
markers: this.superCluster.getLeaves(
|
|
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),
|
|
1599
1872
|
position: { lat: t, lng: e }
|
|
1600
1873
|
});
|
|
1601
|
-
const
|
|
1602
|
-
return new
|
|
1603
|
-
markers: [
|
|
1604
|
-
position:
|
|
1874
|
+
const s = r.marker;
|
|
1875
|
+
return new te({
|
|
1876
|
+
markers: [s],
|
|
1877
|
+
position: _.getPosition(s)
|
|
1605
1878
|
});
|
|
1606
1879
|
}
|
|
1607
1880
|
}
|
|
1608
|
-
class
|
|
1881
|
+
class kr extends wr {
|
|
1609
1882
|
constructor(e) {
|
|
1610
|
-
var { maxZoom: t, radius:
|
|
1611
|
-
super({ maxZoom: t, viewportPadding:
|
|
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] };
|
|
1612
1885
|
}
|
|
1613
1886
|
calculate(e) {
|
|
1614
|
-
const t =
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
s = !0, this.markers = [...e.markers];
|
|
1621
|
-
const r = this.markers.map((o) => {
|
|
1622
|
-
const a = k.getPosition(o);
|
|
1887
|
+
const t = this.getViewportState(e);
|
|
1888
|
+
let r = !ae(this.state, t);
|
|
1889
|
+
if (!ae(e.markers, this.markers)) {
|
|
1890
|
+
r = !0, this.markers = [...e.markers];
|
|
1891
|
+
const s = this.markers.map((o) => {
|
|
1892
|
+
const i = _.getPosition(o);
|
|
1623
1893
|
return {
|
|
1624
1894
|
type: "Feature",
|
|
1625
1895
|
geometry: {
|
|
1626
1896
|
type: "Point",
|
|
1627
|
-
coordinates: [
|
|
1897
|
+
coordinates: [i.lng(), i.lat()]
|
|
1628
1898
|
},
|
|
1629
1899
|
properties: { marker: o }
|
|
1630
1900
|
};
|
|
1631
1901
|
});
|
|
1632
|
-
this.superCluster.load(
|
|
1902
|
+
this.superCluster.load(s);
|
|
1633
1903
|
}
|
|
1634
|
-
return
|
|
1904
|
+
return r && (this.clusters = this.cluster(e), this.state = t), { clusters: this.clusters, changed: r };
|
|
1635
1905
|
}
|
|
1636
|
-
cluster(
|
|
1637
|
-
const
|
|
1638
|
-
|
|
1639
|
-
view: xe(e.getBounds(), t, this.viewportPadding)
|
|
1640
|
-
};
|
|
1641
|
-
return this.superCluster.getClusters(s.view, s.zoom).map((r) => this.transformCluster(r));
|
|
1906
|
+
cluster(e) {
|
|
1907
|
+
const t = this.getViewportState(e);
|
|
1908
|
+
return this.superCluster.getClusters(t.view, t.zoom).map((r) => this.transformCluster(r));
|
|
1642
1909
|
}
|
|
1643
|
-
transformCluster({ geometry: { coordinates: [e, t] }, properties:
|
|
1644
|
-
if (
|
|
1645
|
-
return new
|
|
1646
|
-
markers: this.superCluster.getLeaves(
|
|
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),
|
|
1647
1914
|
position: { lat: t, lng: e }
|
|
1648
1915
|
});
|
|
1649
|
-
const
|
|
1650
|
-
return new
|
|
1651
|
-
markers: [
|
|
1652
|
-
position:
|
|
1916
|
+
const s = r.marker;
|
|
1917
|
+
return new te({
|
|
1918
|
+
markers: [s],
|
|
1919
|
+
position: _.getPosition(s)
|
|
1653
1920
|
});
|
|
1654
1921
|
}
|
|
1922
|
+
getViewportState(e) {
|
|
1923
|
+
const t = e.map.getZoom(), r = e.map.getBounds();
|
|
1924
|
+
return A(t), A(r), {
|
|
1925
|
+
zoom: Math.round(t),
|
|
1926
|
+
view: mr(r, e.mapCanvasProjection, this.viewportPadding)
|
|
1927
|
+
};
|
|
1928
|
+
}
|
|
1655
1929
|
}
|
|
1656
|
-
class
|
|
1930
|
+
class Cr {
|
|
1657
1931
|
constructor(e, t) {
|
|
1658
1932
|
this.markers = { sum: e.length };
|
|
1659
|
-
const
|
|
1933
|
+
const r = t.map((o) => o.count), s = r.reduce((o, i) => o + i, 0);
|
|
1660
1934
|
this.clusters = {
|
|
1661
1935
|
count: t.length,
|
|
1662
1936
|
markers: {
|
|
1663
|
-
mean:
|
|
1664
|
-
sum:
|
|
1665
|
-
min: Math.min(...
|
|
1666
|
-
max: Math.max(...
|
|
1937
|
+
mean: s / t.length,
|
|
1938
|
+
sum: s,
|
|
1939
|
+
min: Math.min(...r),
|
|
1940
|
+
max: Math.max(...r)
|
|
1667
1941
|
}
|
|
1668
1942
|
};
|
|
1669
1943
|
}
|
|
1670
1944
|
}
|
|
1671
|
-
class
|
|
1945
|
+
class Or {
|
|
1672
1946
|
/**
|
|
1673
1947
|
* The default render function for the library used by {@link MarkerClusterer}.
|
|
1674
1948
|
*
|
|
@@ -1707,76 +1981,74 @@ class kt {
|
|
|
1707
1981
|
* });
|
|
1708
1982
|
* ```
|
|
1709
1983
|
*/
|
|
1710
|
-
render({ count: e, position: t },
|
|
1711
|
-
const
|
|
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">
|
|
1712
1986
|
<circle cx="120" cy="120" opacity=".6" r="70" />
|
|
1713
1987
|
<circle cx="120" cy="120" opacity=".3" r="90" />
|
|
1714
1988
|
<circle cx="120" cy="120" opacity=".2" r="110" />
|
|
1715
1989
|
<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>
|
|
1716
|
-
</svg>`, l = `Cluster of ${e} markers`,
|
|
1717
|
-
if (
|
|
1718
|
-
const u =
|
|
1719
|
-
u.
|
|
1720
|
-
const c = u.firstElementChild;
|
|
1721
|
-
c.setAttribute("transform", "translate(0 25)");
|
|
1990
|
+
</svg>`, l = `Cluster of ${e} markers`, a = Number(google.maps.Marker.MAX_ZINDEX) + e;
|
|
1991
|
+
if (_.isAdvancedMarkerAvailable(s)) {
|
|
1992
|
+
const u = new DOMParser().parseFromString(i, "image/svg+xml").documentElement;
|
|
1993
|
+
u.setAttribute("transform", "translate(0 25)");
|
|
1722
1994
|
const h = {
|
|
1723
|
-
map:
|
|
1995
|
+
map: s,
|
|
1724
1996
|
position: t,
|
|
1725
|
-
zIndex:
|
|
1997
|
+
zIndex: a,
|
|
1726
1998
|
title: l,
|
|
1727
|
-
content:
|
|
1999
|
+
content: u
|
|
1728
2000
|
};
|
|
1729
2001
|
return new google.maps.marker.AdvancedMarkerElement(h);
|
|
1730
2002
|
}
|
|
1731
|
-
const
|
|
2003
|
+
const c = {
|
|
1732
2004
|
position: t,
|
|
1733
|
-
zIndex:
|
|
2005
|
+
zIndex: a,
|
|
1734
2006
|
title: l,
|
|
1735
2007
|
icon: {
|
|
1736
|
-
url: `data:image/svg+xml;base64,${btoa(
|
|
2008
|
+
url: `data:image/svg+xml;base64,${btoa(i)}`,
|
|
1737
2009
|
anchor: new google.maps.Point(25, 25)
|
|
1738
2010
|
}
|
|
1739
2011
|
};
|
|
1740
|
-
return new google.maps.Marker(
|
|
2012
|
+
return new google.maps.Marker(c);
|
|
1741
2013
|
}
|
|
1742
2014
|
}
|
|
1743
|
-
function
|
|
2015
|
+
function Mr(n, e) {
|
|
1744
2016
|
for (let t in e.prototype)
|
|
1745
2017
|
n.prototype[t] = e.prototype[t];
|
|
1746
2018
|
}
|
|
1747
|
-
class
|
|
2019
|
+
class Me {
|
|
1748
2020
|
constructor() {
|
|
1749
|
-
|
|
2021
|
+
Mr(Me, google.maps.OverlayView);
|
|
1750
2022
|
}
|
|
1751
2023
|
}
|
|
1752
|
-
var
|
|
2024
|
+
var I;
|
|
1753
2025
|
(function(n) {
|
|
1754
|
-
n.CLUSTERING_BEGIN = "clusteringbegin", n.CLUSTERING_END = "clusteringend", n.CLUSTER_CLICK = "click";
|
|
1755
|
-
})(
|
|
1756
|
-
const
|
|
1757
|
-
t.fitBounds(e.bounds);
|
|
2026
|
+
n.CLUSTERING_BEGIN = "clusteringbegin", n.CLUSTERING_END = "clusteringend", n.CLUSTER_CLICK = "click", n.GMP_CLICK = "gmp-click";
|
|
2027
|
+
})(I || (I = {}));
|
|
2028
|
+
const br = (n, e, t) => {
|
|
2029
|
+
e.bounds && t.fitBounds(e.bounds);
|
|
1758
2030
|
};
|
|
1759
|
-
class
|
|
1760
|
-
constructor({ map: e, markers: t = [], algorithmOptions:
|
|
1761
|
-
super(), this.markers = [...t], this.clusters = [], this.algorithm =
|
|
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 }) {
|
|
2033
|
+
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);
|
|
1762
2034
|
}
|
|
1763
2035
|
addMarker(e, t) {
|
|
1764
2036
|
this.markers.includes(e) || (this.markers.push(e), t || this.render());
|
|
1765
2037
|
}
|
|
1766
2038
|
addMarkers(e, t) {
|
|
1767
|
-
e.forEach((
|
|
1768
|
-
this.addMarker(
|
|
2039
|
+
e.forEach((r) => {
|
|
2040
|
+
this.addMarker(r, !0);
|
|
1769
2041
|
}), t || this.render();
|
|
1770
2042
|
}
|
|
1771
2043
|
removeMarker(e, t) {
|
|
1772
|
-
const
|
|
1773
|
-
return
|
|
2044
|
+
const r = this.markers.indexOf(e);
|
|
2045
|
+
return r === -1 ? !1 : (_.setMap(e, null), this.markers.splice(r, 1), t || this.render(), !0);
|
|
1774
2046
|
}
|
|
1775
2047
|
removeMarkers(e, t) {
|
|
1776
|
-
let
|
|
1777
|
-
return e.forEach((
|
|
1778
|
-
|
|
1779
|
-
}),
|
|
2048
|
+
let r = !1;
|
|
2049
|
+
return e.forEach((s) => {
|
|
2050
|
+
r = this.removeMarker(s, !0) || r;
|
|
2051
|
+
}), r && !t && this.render(), r;
|
|
1780
2052
|
}
|
|
1781
2053
|
clearMarkers(e) {
|
|
1782
2054
|
this.markers.length = 0, e || this.render();
|
|
@@ -1787,47 +2059,54 @@ class Mt extends ve {
|
|
|
1787
2059
|
render() {
|
|
1788
2060
|
const e = this.getMap();
|
|
1789
2061
|
if (e instanceof google.maps.Map && e.getProjection()) {
|
|
1790
|
-
google.maps.event.trigger(this,
|
|
1791
|
-
const { clusters: t, changed:
|
|
2062
|
+
google.maps.event.trigger(this, I.CLUSTERING_BEGIN, this);
|
|
2063
|
+
const { clusters: t, changed: r } = this.algorithm.calculate({
|
|
1792
2064
|
markers: this.markers,
|
|
1793
2065
|
map: e,
|
|
1794
2066
|
mapCanvasProjection: this.getProjection()
|
|
1795
2067
|
});
|
|
1796
|
-
if (
|
|
1797
|
-
const
|
|
1798
|
-
for (const
|
|
1799
|
-
|
|
2068
|
+
if (r || r == null) {
|
|
2069
|
+
const s = /* @__PURE__ */ new Set();
|
|
2070
|
+
for (const i of t)
|
|
2071
|
+
i.markers.length == 1 && s.add(i.markers[0]);
|
|
1800
2072
|
const o = [];
|
|
1801
|
-
for (const
|
|
1802
|
-
|
|
1803
|
-
this.clusters = t, this.renderClusters(), requestAnimationFrame(() => o.forEach((
|
|
2073
|
+
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)));
|
|
1804
2076
|
}
|
|
1805
|
-
google.maps.event.trigger(this,
|
|
2077
|
+
google.maps.event.trigger(this, I.CLUSTERING_END, this);
|
|
1806
2078
|
}
|
|
1807
2079
|
}
|
|
1808
2080
|
onAdd() {
|
|
1809
|
-
|
|
2081
|
+
const e = this.getMap();
|
|
2082
|
+
A(e), this.idleListener = e.addListener("idle", this.render.bind(this)), this.render();
|
|
1810
2083
|
}
|
|
1811
2084
|
onRemove() {
|
|
1812
|
-
google.maps.event.removeListener(this.idleListener), this.reset();
|
|
2085
|
+
this.idleListener && google.maps.event.removeListener(this.idleListener), this.reset();
|
|
1813
2086
|
}
|
|
1814
2087
|
reset() {
|
|
1815
|
-
this.markers.forEach((e) =>
|
|
2088
|
+
this.markers.forEach((e) => _.setMap(e, null)), this.clusters.forEach((e) => e.delete()), this.clusters = [];
|
|
1816
2089
|
}
|
|
1817
2090
|
renderClusters() {
|
|
1818
|
-
const e = new
|
|
1819
|
-
this.clusters.forEach((
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
(r)
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
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(
|
|
2098
|
+
s,
|
|
2099
|
+
/* istanbul ignore next */
|
|
2100
|
+
(o) => {
|
|
2101
|
+
google.maps.event.trigger(this, I.CLUSTER_CLICK, r), this.onClusterClick(o, r, t);
|
|
2102
|
+
}
|
|
2103
|
+
);
|
|
2104
|
+
}
|
|
2105
|
+
_.setMap(r.marker, t);
|
|
1827
2106
|
});
|
|
1828
2107
|
}
|
|
1829
2108
|
}
|
|
1830
|
-
const
|
|
2109
|
+
const Je = Object.values(I), Ur = P({
|
|
1831
2110
|
name: "MarkerCluster",
|
|
1832
2111
|
props: {
|
|
1833
2112
|
options: {
|
|
@@ -1835,37 +2114,37 @@ const Ae = Object.values(D), Nt = P({
|
|
|
1835
2114
|
default: () => ({})
|
|
1836
2115
|
}
|
|
1837
2116
|
},
|
|
1838
|
-
emits:
|
|
1839
|
-
setup(n, { emit: e, expose: t, slots:
|
|
1840
|
-
const
|
|
1841
|
-
return
|
|
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(
|
|
1842
2121
|
o,
|
|
1843
2122
|
() => {
|
|
1844
|
-
o.value && (
|
|
1845
|
-
new
|
|
2123
|
+
o.value && (s.value = S(
|
|
2124
|
+
new Pr({
|
|
1846
2125
|
map: o.value,
|
|
1847
2126
|
// Better perf than the default `SuperClusterAlgorithm`. See:
|
|
1848
2127
|
// https://github.com/googlemaps/js-markerclusterer/pull/640
|
|
1849
|
-
algorithm: new
|
|
2128
|
+
algorithm: new kr(n.options.algorithmOptions ?? {}),
|
|
1850
2129
|
...n.options
|
|
1851
2130
|
})
|
|
1852
|
-
),
|
|
1853
|
-
var
|
|
1854
|
-
(
|
|
2131
|
+
), Je.forEach((l) => {
|
|
2132
|
+
var a;
|
|
2133
|
+
(a = s.value) == null || a.addListener(l, (c) => e(l, c));
|
|
1855
2134
|
}));
|
|
1856
2135
|
},
|
|
1857
2136
|
{
|
|
1858
2137
|
immediate: !0
|
|
1859
2138
|
}
|
|
1860
|
-
),
|
|
2139
|
+
), B(() => {
|
|
1861
2140
|
var l;
|
|
1862
|
-
|
|
1863
|
-
}), t({ markerCluster:
|
|
2141
|
+
s.value && ((l = i.value) == null || l.event.clearInstanceListeners(s.value), s.value.clearMarkers(), s.value.setMap(null));
|
|
2142
|
+
}), t({ markerCluster: s }), () => {
|
|
1864
2143
|
var l;
|
|
1865
|
-
return (l =
|
|
2144
|
+
return (l = r.default) == null ? void 0 : l.call(r);
|
|
1866
2145
|
};
|
|
1867
2146
|
}
|
|
1868
|
-
}),
|
|
2147
|
+
}), qr = P({
|
|
1869
2148
|
inheritAttrs: !1,
|
|
1870
2149
|
props: {
|
|
1871
2150
|
options: {
|
|
@@ -1873,34 +2152,34 @@ const Ae = Object.values(D), Nt = P({
|
|
|
1873
2152
|
required: !0
|
|
1874
2153
|
}
|
|
1875
2154
|
},
|
|
1876
|
-
setup(n, { slots: e, emit: t, expose:
|
|
1877
|
-
const
|
|
1878
|
-
var
|
|
1879
|
-
return (
|
|
1880
|
-
}),
|
|
2155
|
+
setup(n, { slots: e, emit: t, expose: r }) {
|
|
2156
|
+
const s = w(), o = K(() => {
|
|
2157
|
+
var a;
|
|
2158
|
+
return (a = e.default) == null ? void 0 : a.call(e).some((c) => c.type !== ye);
|
|
2159
|
+
}), i = K(() => ({
|
|
1881
2160
|
...n.options,
|
|
1882
|
-
element:
|
|
1883
|
-
})), l =
|
|
1884
|
-
return
|
|
2161
|
+
element: s.value
|
|
2162
|
+
})), l = J(ue, [], i, t);
|
|
2163
|
+
return r({
|
|
1885
2164
|
customMarker: l
|
|
1886
|
-
}), { customMarkerRef:
|
|
2165
|
+
}), { customMarkerRef: s, customMarker: l, hasSlotContent: o };
|
|
1887
2166
|
}
|
|
1888
2167
|
});
|
|
1889
|
-
const
|
|
2168
|
+
const Sr = {
|
|
1890
2169
|
key: 0,
|
|
1891
2170
|
class: "custom-marker-wrapper"
|
|
1892
2171
|
};
|
|
1893
|
-
function
|
|
1894
|
-
return n.hasSlotContent ? (
|
|
1895
|
-
|
|
2172
|
+
function Ar(n, e, t, r, s, o) {
|
|
2173
|
+
return n.hasSlotContent ? (V(), z("div", Sr, [
|
|
2174
|
+
le("div", we({
|
|
1896
2175
|
ref: "customMarkerRef",
|
|
1897
2176
|
style: { cursor: n.$attrs.onClick ? "pointer" : void 0 }
|
|
1898
2177
|
}, n.$attrs), [
|
|
1899
|
-
|
|
2178
|
+
W(n.$slots, "default", {}, void 0, !0)
|
|
1900
2179
|
], 16)
|
|
1901
|
-
])) :
|
|
2180
|
+
])) : Ee("", !0);
|
|
1902
2181
|
}
|
|
1903
|
-
const
|
|
2182
|
+
const Gr = /* @__PURE__ */ re(qr, [["render", Ar], ["__scopeId", "data-v-2d2d343a"]]), Vr = P({
|
|
1904
2183
|
name: "HeatmapLayer",
|
|
1905
2184
|
props: {
|
|
1906
2185
|
options: {
|
|
@@ -1909,44 +2188,47 @@ const Ut = /* @__PURE__ */ X(Ot, [["render", Pt], ["__scopeId", "data-v-2d2d343a
|
|
|
1909
2188
|
}
|
|
1910
2189
|
},
|
|
1911
2190
|
setup(n) {
|
|
1912
|
-
const e =
|
|
1913
|
-
return
|
|
2191
|
+
const e = w(), t = k(D, w()), r = k(Z, w());
|
|
2192
|
+
return q(
|
|
1914
2193
|
[t, () => n.options],
|
|
1915
|
-
([
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
2194
|
+
([s, o], [i, l]) => {
|
|
2195
|
+
const a = !ee(o, l) || t.value !== i;
|
|
2196
|
+
if (t.value && r.value && a) {
|
|
2197
|
+
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));
|
|
2200
|
+
c = {
|
|
2201
|
+
...o,
|
|
2202
|
+
data: u
|
|
2203
|
+
};
|
|
2204
|
+
} else
|
|
2205
|
+
c = o;
|
|
2206
|
+
e.value ? e.value.setOptions(c) : e.value = S(
|
|
2207
|
+
new r.value.visualization.HeatmapLayer({
|
|
2208
|
+
...c,
|
|
1927
2209
|
map: t.value
|
|
1928
2210
|
})
|
|
1929
2211
|
);
|
|
1930
2212
|
}
|
|
1931
2213
|
},
|
|
1932
2214
|
{ immediate: !0 }
|
|
1933
|
-
),
|
|
2215
|
+
), B(() => {
|
|
1934
2216
|
e.value && e.value.setMap(null);
|
|
1935
2217
|
}), { heatmapLayer: e };
|
|
1936
2218
|
},
|
|
1937
2219
|
render: () => null
|
|
1938
2220
|
});
|
|
1939
2221
|
export {
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
$
|
|
1951
|
-
|
|
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
|
|
1952
2234
|
};
|