tg-map-vue3 3.0.3 → 3.0.4

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.
Files changed (32) hide show
  1. package/dist/src/components/TgMap.vue.d.ts +142 -33
  2. package/dist/src/components/TgMapWidget.vue.d.ts +2 -4
  3. package/dist/src/components/controls/TgCustomControl.vue.d.ts +13 -10
  4. package/dist/src/components/controls/TgMapTypeControl.vue.d.ts +28 -10
  5. package/dist/src/components/controls/TgScaleControl.vue.d.ts +16 -8
  6. package/dist/src/components/controls/TgZoomControl.vue.d.ts +16 -8
  7. package/dist/src/components/extra/TgMarkerClusterer.vue.d.ts +50 -38
  8. package/dist/src/components/layers/TgTrafficLayer.vue.d.ts +2 -4
  9. package/dist/src/components/map-mixin.d.ts +0 -2
  10. package/dist/src/components/overlays/TgCircle.vue.d.ts +75 -18
  11. package/dist/src/components/overlays/TgElementOverlay.vue.d.ts +24 -13
  12. package/dist/src/components/overlays/TgInfoBox.vue.d.ts +51 -19
  13. package/dist/src/components/overlays/TgInfoWindow.vue.d.ts +45 -18
  14. package/dist/src/components/overlays/TgLabel.vue.d.ts +31 -12
  15. package/dist/src/components/overlays/TgMarker.vue.d.ts +175 -49
  16. package/dist/src/components/overlays/TgPolygon.vue.d.ts +68 -17
  17. package/dist/src/components/overlays/TgPolyline.vue.d.ts +56 -15
  18. package/dist/src/map/event.d.ts +1 -2
  19. package/dist/src/map/map/baidu-map.d.ts +2 -2
  20. package/dist/src/map/map/map-options.d.ts +2 -1
  21. package/dist/src/map/map/map-type.d.ts +1 -0
  22. package/dist/src/map/map/overlay/baidu-info-box.d.ts +1 -0
  23. package/dist/src/map/map/overlay/element-overlay.d.ts +1 -0
  24. package/dist/src/utils/formatter.d.ts +1 -1
  25. package/dist/src/utils/mapped-types.d.ts +1 -1
  26. package/dist/src/utils/vue-utils.d.ts +71 -19
  27. package/dist/style.css +1 -1
  28. package/dist/tg-map.js +1117 -1091
  29. package/dist/tg-map.js.map +1 -1
  30. package/dist/tg-map.umd.cjs +4 -4
  31. package/dist/tg-map.umd.cjs.map +1 -1
  32. package/package.json +7 -6
package/dist/tg-map.js CHANGED
@@ -1,32 +1,32 @@
1
- var Wt = Object.defineProperty;
2
- var Vt = (i, e, t) => e in i ? Wt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var h = (i, e, t) => (Vt(i, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { defineComponent as C, computed as Ht, openBlock as D, createElementBlock as Z, createElementVNode as Ft, createCommentVNode as dt, renderSlot as A, normalizeClass as q, normalizeStyle as Ut, withDirectives as Yt, vShow as Kt, mergeProps as qt, toHandlers as Xt } from "vue";
5
- function I(i) {
1
+ var jt = Object.defineProperty;
2
+ var Wt = (i, e, t) => e in i ? jt(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
+ var h = (i, e, t) => (Wt(i, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import { createCommentVNode as Pe, defineComponent as C, computed as Vt, openBlock as R, createElementBlock as D, mergeProps as re, createElementVNode as Ht, renderSlot as A, normalizeClass as De, normalizeStyle as Ft, withDirectives as Ut, vShow as Yt } from "vue";
5
+ function x(i) {
6
6
  throw new Error(i);
7
7
  }
8
- function Jt(i) {
8
+ function Kt(i) {
9
9
  throw new Error(`Unsupported: ${i}`);
10
10
  }
11
- function Ci(i) {
11
+ function Ti(i) {
12
12
  throw new Error(`todo: ${i}`);
13
13
  }
14
- function wi(i) {
14
+ function Oi(i) {
15
15
  return i;
16
16
  }
17
17
  function fe(...i) {
18
18
  }
19
- function Qt(i) {
19
+ function Ci(i) {
20
20
  return i != null;
21
21
  }
22
- function V(i, e) {
22
+ function W(i, e) {
23
23
  return {
24
24
  type: String,
25
25
  default: e,
26
26
  validator: (t) => Object.values(i).includes(t)
27
27
  };
28
28
  }
29
- function er(i, e) {
29
+ function qt(i, e) {
30
30
  return {
31
31
  type: String,
32
32
  default: e,
@@ -45,17 +45,17 @@ function m(i, e) {
45
45
  default: e
46
46
  };
47
47
  }
48
- function xi(i) {
48
+ function wi(i) {
49
49
  const e = {};
50
50
  return Object.entries(i).forEach(([t, r]) => {
51
51
  const s = `__${t}`;
52
52
  e[t] = {
53
53
  get() {
54
- const o = this[s];
55
- return o === void 0 ? r : o;
54
+ const n = this[s];
55
+ return n === void 0 ? r : n;
56
56
  },
57
- set(o) {
58
- this[s] = o;
57
+ set(n) {
58
+ this[s] = n;
59
59
  }
60
60
  // Vue3已经不支持该属性
61
61
  // cache: false
@@ -68,18 +68,18 @@ const ie = {
68
68
  get: fe,
69
69
  set: fe
70
70
  };
71
- function tr(i) {
71
+ function Xt(i) {
72
72
  return Object.keys(i).forEach((e) => {
73
73
  const t = i[e];
74
74
  let r = !1;
75
75
  typeof t == "function" ? (ie.get = t, ie.set = fe, r = !0) : typeof t == "object" && typeof t.get == "function" && (ie.get = t.get, ie.set = t.set, r = !0), r && (i[e] = Object.defineProperty(i, e, ie));
76
76
  }), i;
77
77
  }
78
- function Ei(i) {
79
- return tr(i);
78
+ function xi(i) {
79
+ return Xt(i);
80
80
  }
81
- function rr(i, e) {
82
- return e._e();
81
+ function Jt() {
82
+ return Pe();
83
83
  }
84
84
  function ue(i, e) {
85
85
  const t = i.$options[e];
@@ -87,12 +87,29 @@ function ue(i, e) {
87
87
  for (const r of t)
88
88
  r.call(i);
89
89
  }
90
- function we(i, e) {
90
+ function Ei(i, e) {
91
91
  for (const t of i)
92
92
  if (t.$options.name === e.name)
93
93
  return t;
94
94
  }
95
- const ki = {
95
+ function ki(i, e) {
96
+ if (!i.default)
97
+ return;
98
+ const t = i.default();
99
+ for (const r of t)
100
+ if ((r == null ? void 0 : r.type).name === e.name)
101
+ return r;
102
+ }
103
+ function V(i) {
104
+ const e = {}, t = {};
105
+ return Object.keys(i).forEach((r) => {
106
+ r.startsWith("on") ? e[r.substring(2).toLowerCase()] = i[r] : t[r] = i[r];
107
+ }), {
108
+ binds: t,
109
+ listeners: e
110
+ };
111
+ }
112
+ const Ii = {
96
113
  /**
97
114
  * @event 一般来说传{@link Tg.Event}对象, 但传其他对象也不会报错
98
115
  */
@@ -118,59 +135,59 @@ var ye;
118
135
  }
119
136
  i.trimIndent = t;
120
137
  })(ye || (ye = {}));
121
- const _t = "$map", Ie = "onCreate", Pe = "onDestroy", w = C({
122
- inject: [_t],
138
+ const bt = "$map", Le = "onCreate", Be = "onDestroy", w = C({
139
+ inject: [bt],
123
140
  mounted() {
124
- ue(this, Ie);
141
+ ue(this, Le);
125
142
  },
126
- beforeDestroy() {
127
- ue(this, Pe);
143
+ beforeUnmount() {
144
+ ue(this, Be);
128
145
  },
129
146
  methods: {
130
147
  recreate() {
131
- ue(this, Pe), ue(this, Ie);
148
+ ue(this, Be), ue(this, Le);
132
149
  }
133
150
  },
134
- render(i) {
135
- return rr(i, this);
151
+ render() {
152
+ return Jt();
136
153
  }
137
154
  });
138
- var Mt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, j = {}, ir = {
155
+ var Tt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, G = {}, Qt = {
139
156
  get exports() {
140
- return j;
157
+ return G;
141
158
  },
142
159
  set exports(i) {
143
- j = i;
160
+ G = i;
144
161
  }
145
162
  };
146
163
  (function(i) {
147
164
  (function(e, t) {
148
165
  i.exports ? i.exports = t() : e.coordtransform = t();
149
- })(Mt, function() {
166
+ })(Tt, function() {
150
167
  var e = 52.35987755982988, t = 3.141592653589793, r = 6378245, s = 0.006693421622965943;
151
- function o(p, f, v, O) {
168
+ function n(p, f, v, O) {
152
169
  this.west = Math.min(p, v), this.north = Math.max(f, O), this.east = Math.max(p, v), this.south = Math.min(f, O);
153
170
  }
154
- o.prototype.contain = function(p, f) {
171
+ n.prototype.contain = function(p, f) {
155
172
  return this.west <= p && this.east >= p && this.north >= f && this.south <= f;
156
173
  };
157
174
  var a = [
158
- new o(79.4462, 49.2204, 96.33, 42.8899),
159
- new o(109.6872, 54.1415, 135.0002, 39.3742),
160
- new o(73.1246, 42.8899, 124.143255, 29.5297),
161
- new o(82.9684, 29.5297, 97.0352, 26.7186),
162
- new o(97.0253, 29.5297, 124.367395, 20.414096),
163
- new o(107.975793, 20.414096, 111.744104, 17.871542)
175
+ new n(79.4462, 49.2204, 96.33, 42.8899),
176
+ new n(109.6872, 54.1415, 135.0002, 39.3742),
177
+ new n(73.1246, 42.8899, 124.143255, 29.5297),
178
+ new n(82.9684, 29.5297, 97.0352, 26.7186),
179
+ new n(97.0253, 29.5297, 124.367395, 20.414096),
180
+ new n(107.975793, 20.414096, 111.744104, 17.871542)
164
181
  ], g = [
165
- new o(119.921265, 25.398623, 122.497559, 21.785006),
166
- new o(101.8652, 22.284, 106.665, 20.0988),
167
- new o(106.4525, 21.5422, 108.051, 20.4878),
168
- new o(109.0323, 55.8175, 119.127, 50.3257),
169
- new o(127.4568, 55.8175, 137.0227, 49.5574),
170
- new o(131.2662, 44.8922, 137.0227, 42.5692),
171
- new o(73.1246, 35.398637, 77.948114, 29.5297)
182
+ new n(119.921265, 25.398623, 122.497559, 21.785006),
183
+ new n(101.8652, 22.284, 106.665, 20.0988),
184
+ new n(106.4525, 21.5422, 108.051, 20.4878),
185
+ new n(109.0323, 55.8175, 119.127, 50.3257),
186
+ new n(127.4568, 55.8175, 137.0227, 49.5574),
187
+ new n(131.2662, 44.8922, 137.0227, 42.5692),
188
+ new n(73.1246, 35.398637, 77.948114, 29.5297)
172
189
  ];
173
- function n(p, f) {
190
+ function o(p, f) {
174
191
  for (var v = 0; v < a.length; v++)
175
192
  if (a[v].contain(p, f)) {
176
193
  for (var O = 0; O < g.length; O++)
@@ -181,29 +198,29 @@ var Mt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
181
198
  return !1;
182
199
  }
183
200
  function l(p, f) {
184
- var v = p - 65e-4, O = f - 6e-3, F = Math.sqrt(v * v + O * O) - 2e-5 * Math.sin(O * e), B = Math.atan2(O, v) - 3e-6 * Math.cos(v * e), pe = F * Math.cos(B), Ce = F * Math.sin(B);
185
- return [pe, Ce];
201
+ var v = p - 65e-4, O = f - 6e-3, U = Math.sqrt(v * v + O * O) - 2e-5 * Math.sin(O * e), B = Math.atan2(O, v) - 3e-6 * Math.cos(v * e), pe = U * Math.cos(B), xe = U * Math.sin(B);
202
+ return [pe, xe];
186
203
  }
187
204
  function c(p, f) {
188
- var v = Math.sqrt(p * p + f * f) + 2e-5 * Math.sin(f * e), O = Math.atan2(f, p) + 3e-6 * Math.cos(p * e), F = v * Math.cos(O) + 65e-4, B = v * Math.sin(O) + 6e-3;
189
- return [F, B];
205
+ var v = Math.sqrt(p * p + f * f) + 2e-5 * Math.sin(f * e), O = Math.atan2(f, p) + 3e-6 * Math.cos(p * e), U = v * Math.cos(O) + 65e-4, B = v * Math.sin(O) + 6e-3;
206
+ return [U, B];
190
207
  }
191
208
  function u(p, f) {
192
- return n(p, f) ? b(p, f) : [p, f];
209
+ return o(p, f) ? b(p, f) : [p, f];
193
210
  }
194
211
  function d(p, f) {
195
- if (!n(p, f))
212
+ if (!o(p, f))
196
213
  return [p, f];
197
214
  var v = b(p, f);
198
215
  return [p * 2 - v[0], f * 2 - v[1]];
199
216
  }
200
217
  function b(p, f) {
201
- var v = M(p - 105, f - 35), O = T(p - 105, f - 35), F = f / 180 * t, B = Math.sin(F);
218
+ var v = M(p - 105, f - 35), O = T(p - 105, f - 35), U = f / 180 * t, B = Math.sin(U);
202
219
  B = 1 - s * B * B;
203
220
  var pe = Math.sqrt(B);
204
- v = v * 180 / (r * (1 - s) / (B * pe) * t), O = O * 180 / (r / pe * Math.cos(F) * t);
205
- var Ce = f + v, jt = p + O;
206
- return [jt, Ce];
221
+ v = v * 180 / (r * (1 - s) / (B * pe) * t), O = O * 180 / (r / pe * Math.cos(U) * t);
222
+ var xe = f + v, Gt = p + O;
223
+ return [Gt, xe];
207
224
  }
208
225
  function M(p, f) {
209
226
  var v = -100 + 2 * p + 3 * f + 0.2 * f * f + 0.1 * p * f + 0.2 * Math.sqrt(Math.abs(p));
@@ -225,29 +242,29 @@ var Mt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
225
242
  wgs84ToGcj02: u,
226
243
  gcj02ToWgs84: d,
227
244
  bd09ToWgs84: function(p, f) {
228
- if (!n(p, f))
245
+ if (!o(p, f))
229
246
  return [p, f];
230
247
  var v = l(p, f);
231
248
  return d(v[0], v[1]);
232
249
  },
233
250
  wgs84ToBd09: function(p, f) {
234
- if (!n(p, f))
251
+ if (!o(p, f))
235
252
  return [p, f];
236
253
  var v = u(p, f);
237
254
  return c(v[0], v[1]);
238
255
  }
239
256
  };
240
257
  });
241
- })(ir);
242
- function ne(i, e) {
258
+ })(Qt);
259
+ function oe(i, e) {
243
260
  if (!i)
244
261
  throw new Error(`AssertionError: ${e}`);
245
262
  }
246
- function pt(i) {
263
+ function ut(i) {
247
264
  throw new Error(`Unexpected object: ${i}`);
248
265
  }
249
- var Y = /* @__PURE__ */ ((i) => (i.wgs84 = "wgs84", i.gcj02 = "gcj02", i.bd09 = "bd09", i))(Y || {});
250
- const xe = "wgs84", S = class {
266
+ var K = /* @__PURE__ */ ((i) => (i.wgs84 = "wgs84", i.gcj02 = "gcj02", i.bd09 = "bd09", i))(K || {});
267
+ const Ee = "wgs84", S = class {
251
268
  constructor(e, t, r) {
252
269
  this.lat = e, this.lng = t, this.coord = r;
253
270
  }
@@ -263,12 +280,12 @@ const xe = "wgs84", S = class {
263
280
  return new S(e.lat, e.lng, t);
264
281
  }
265
282
  static fromLiteral(e) {
266
- return new S(e.lat, e.lng, e.coord || xe);
283
+ return new S(e.lat, e.lng, e.coord || Ee);
267
284
  }
268
- static fromLngLat(e, t, r = xe) {
285
+ static fromLngLat(e, t, r = Ee) {
269
286
  return new S(t, e, r);
270
287
  }
271
- static create(e, t, r = xe) {
288
+ static create(e, t, r = Ee) {
272
289
  return new S(e, t, r);
273
290
  }
274
291
  to(e) {
@@ -300,11 +317,11 @@ const xe = "wgs84", S = class {
300
317
  convert(e) {
301
318
  switch (this.coord) {
302
319
  case "bd09":
303
- return e === "gcj02" ? j.bd09ToGcj02(this.lng, this.lat) : j.bd09ToWgs84(this.lng, this.lat);
320
+ return e === "gcj02" ? G.bd09ToGcj02(this.lng, this.lat) : G.bd09ToWgs84(this.lng, this.lat);
304
321
  case "gcj02":
305
- return e === "wgs84" ? j.gcj02ToWgs84(this.lng, this.lat) : j.gcj02ToBd09(this.lng, this.lat);
322
+ return e === "wgs84" ? G.gcj02ToWgs84(this.lng, this.lat) : G.gcj02ToBd09(this.lng, this.lat);
306
323
  case "wgs84":
307
- return e === "bd09" ? j.wgs84ToBd09(this.lng, this.lat) : j.wgs84ToGcj02(this.lng, this.lat);
324
+ return e === "bd09" ? G.wgs84ToBd09(this.lng, this.lat) : G.wgs84ToGcj02(this.lng, this.lat);
308
325
  }
309
326
  throw new Error(`不支持的坐标转换: ${this.coord}=>${e}`);
310
327
  }
@@ -317,7 +334,7 @@ const xe = "wgs84", S = class {
317
334
  };
318
335
  let y = S;
319
336
  h(y, "ZERO", S.create(0, 0));
320
- const U = class {
337
+ const Y = class {
321
338
  /**
322
339
  * 不推荐直接创建LatLngBounds, sw和ne的大小关系可能没法保证, 推荐用LatLngBounds.Builder或者LatLngBounds.from等静态方法来创建
323
340
  * @param sw 西南, lat/lng更小
@@ -325,7 +342,7 @@ const U = class {
325
342
  */
326
343
  constructor(e, t) {
327
344
  h(this, "coord");
328
- this.sw = e, this.ne = t, ne(e.coord === t.coord, "sw和ne的coord应该相同"), ne(Number.isFinite(e.lat) && Number.isFinite(e.lng) && Number.isFinite(t.lat) && Number.isFinite(t.lng), `sw(${e})和ne(${t})不能包含NaN或Infinite`), ne(e.lat <= t.lat, `sw.lat(${e.lat})应该比ne.lat(${t.lat})小`), this.coord = e.coord;
345
+ this.sw = e, this.ne = t, oe(e.coord === t.coord, "sw和ne的coord应该相同"), oe(Number.isFinite(e.lat) && Number.isFinite(e.lng) && Number.isFinite(t.lat) && Number.isFinite(t.lng), `sw(${e})和ne(${t})不能包含NaN或Infinite`), oe(e.lat <= t.lat, `sw.lat(${e.lat})应该比ne.lat(${t.lat})小`), this.coord = e.coord;
329
346
  }
330
347
  static isBetweenLng(e, t, r) {
331
348
  return e <= t ? e <= r && r <= t : e <= r || r <= t;
@@ -333,22 +350,22 @@ const U = class {
333
350
  static fromArray(e) {
334
351
  if (e.length === 0)
335
352
  return;
336
- const t = new U.Builder(e[0]);
353
+ const t = new Y.Builder(e[0]);
337
354
  for (let r = 1; r < e.length; r++)
338
355
  t.include(e[r]);
339
356
  return t.build();
340
357
  }
341
358
  static from(...e) {
342
- return this.fromArray(e) ?? I("positions中没有点");
359
+ return this.fromArray(e) ?? x("positions中没有点");
343
360
  }
344
361
  static fromGoogle(e, t) {
345
- return new U(
362
+ return new Y(
346
363
  y.fromGoogle(e.getSouthWest(), t),
347
364
  y.fromGoogle(e.getNorthEast(), t)
348
365
  );
349
366
  }
350
367
  static fromBaidu(e, t) {
351
- return new U(
368
+ return new Y(
352
369
  y.fromBaidu(e.getSouthWest(), t),
353
370
  y.fromBaidu(e.getNorthEast(), t)
354
371
  );
@@ -361,7 +378,7 @@ const U = class {
361
378
  }
362
379
  contains(e) {
363
380
  const { lat: t, lng: r } = e.to(this.coord);
364
- return this.sw.lat <= t && t <= this.ne.lat && U.isBetweenLng(this.sw.lng, this.ne.lng, r);
381
+ return this.sw.lat <= t && t <= this.ne.lat && Y.isBetweenLng(this.sw.lng, this.ne.lng, r);
365
382
  }
366
383
  getCenter() {
367
384
  const e = (this.sw.lat + this.ne.lat) / 2, t = (this.sw.lng + this.ne.lng + (this.sw.lng < this.ne.lng ? 0 : 360)) / 2;
@@ -383,8 +400,8 @@ const U = class {
383
400
  return [this.sw.toBaidu(e), this.ne.toBaidu(e)];
384
401
  }
385
402
  };
386
- let W = U;
387
- h(W, "EMPTY", new U(y.ZERO, y.ZERO));
403
+ let j = Y;
404
+ h(j, "EMPTY", new Y(y.ZERO, y.ZERO));
388
405
  ((i) => {
389
406
  class e {
390
407
  constructor(r) {
@@ -404,18 +421,18 @@ h(W, "EMPTY", new U(y.ZERO, y.ZERO));
404
421
  );
405
422
  }
406
423
  include(r) {
407
- const { lat: s, lng: o } = r.to(this.coord);
408
- return this.minLat = Math.min(this.minLat, s), this.maxLat = Math.max(this.maxLat, s), i.isBetweenLng(this.minLng, this.maxLng, o) || (this.delta(this.minLng, o) < this.delta(o, this.maxLng) ? this.minLng = o : this.maxLng = o), this;
424
+ const { lat: s, lng: n } = r.to(this.coord);
425
+ return this.minLat = Math.min(this.minLat, s), this.maxLat = Math.max(this.maxLat, s), i.isBetweenLng(this.minLng, this.maxLng, n) || (this.delta(this.minLng, n) < this.delta(n, this.maxLng) ? this.minLng = n : this.maxLng = n), this;
409
426
  }
410
427
  delta(r, s) {
411
428
  return (r - s + 360) % 360;
412
429
  }
413
430
  }
414
431
  i.Builder = e;
415
- })(W || (W = {}));
416
- function Ii() {
432
+ })(j || (j = {}));
433
+ function Pi() {
417
434
  }
418
- function Pi(i) {
435
+ function gt(i) {
419
436
  return i;
420
437
  }
421
438
  function Li(i, e) {
@@ -425,11 +442,11 @@ function Bi(i, e) {
425
442
  if (i instanceof e)
426
443
  return i;
427
444
  }
428
- function re(i, e) {
445
+ function de(i, e) {
429
446
  if ((i == null ? void 0 : i.$options.name) === e.name)
430
447
  return i;
431
448
  }
432
- class Re {
449
+ class Ze {
433
450
  constructor(e) {
434
451
  h(this, "latestInfoWindow");
435
452
  /** 使用{@link setEventTargetDelegate}初始化 */
@@ -475,67 +492,67 @@ class Re {
475
492
  this.innerMap.setZoom(e);
476
493
  }
477
494
  }
478
- var sr = function(e) {
479
- return or(e) && !nr(e);
495
+ var er = function(e) {
496
+ return tr(e) && !rr(e);
480
497
  };
481
- function or(i) {
498
+ function tr(i) {
482
499
  return !!i && typeof i == "object";
483
500
  }
484
- function nr(i) {
501
+ function rr(i) {
485
502
  var e = Object.prototype.toString.call(i);
486
- return e === "[object RegExp]" || e === "[object Date]" || hr(i);
503
+ return e === "[object RegExp]" || e === "[object Date]" || nr(i);
487
504
  }
488
- var ar = typeof Symbol == "function" && Symbol.for, lr = ar ? Symbol.for("react.element") : 60103;
489
- function hr(i) {
490
- return i.$$typeof === lr;
505
+ var ir = typeof Symbol == "function" && Symbol.for, sr = ir ? Symbol.for("react.element") : 60103;
506
+ function nr(i) {
507
+ return i.$$typeof === sr;
491
508
  }
492
- function cr(i) {
509
+ function or(i) {
493
510
  return Array.isArray(i) ? [] : {};
494
511
  }
495
512
  function ae(i, e) {
496
- return e.clone !== !1 && e.isMergeableObject(i) ? Q(cr(i), i, e) : i;
513
+ return e.clone !== !1 && e.isMergeableObject(i) ? Q(or(i), i, e) : i;
497
514
  }
498
- function dr(i, e, t) {
515
+ function ar(i, e, t) {
499
516
  return i.concat(e).map(function(r) {
500
517
  return ae(r, t);
501
518
  });
502
519
  }
503
- function pr(i, e) {
520
+ function lr(i, e) {
504
521
  if (!e.customMerge)
505
522
  return Q;
506
523
  var t = e.customMerge(i);
507
524
  return typeof t == "function" ? t : Q;
508
525
  }
509
- function ur(i) {
526
+ function hr(i) {
510
527
  return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(i).filter(function(e) {
511
528
  return Object.propertyIsEnumerable.call(i, e);
512
529
  }) : [];
513
530
  }
514
- function ut(i) {
515
- return Object.keys(i).concat(ur(i));
531
+ function mt(i) {
532
+ return Object.keys(i).concat(hr(i));
516
533
  }
517
- function bt(i, e) {
534
+ function Ot(i, e) {
518
535
  try {
519
536
  return e in i;
520
537
  } catch {
521
538
  return !1;
522
539
  }
523
540
  }
524
- function gr(i, e) {
525
- return bt(i, e) && !(Object.hasOwnProperty.call(i, e) && Object.propertyIsEnumerable.call(i, e));
541
+ function cr(i, e) {
542
+ return Ot(i, e) && !(Object.hasOwnProperty.call(i, e) && Object.propertyIsEnumerable.call(i, e));
526
543
  }
527
- function mr(i, e, t) {
544
+ function dr(i, e, t) {
528
545
  var r = {};
529
- return t.isMergeableObject(i) && ut(i).forEach(function(s) {
546
+ return t.isMergeableObject(i) && mt(i).forEach(function(s) {
530
547
  r[s] = ae(i[s], t);
531
- }), ut(e).forEach(function(s) {
532
- gr(i, s) || (bt(i, s) && t.isMergeableObject(e[s]) ? r[s] = pr(s, t)(i[s], e[s], t) : r[s] = ae(e[s], t));
548
+ }), mt(e).forEach(function(s) {
549
+ cr(i, s) || (Ot(i, s) && t.isMergeableObject(e[s]) ? r[s] = lr(s, t)(i[s], e[s], t) : r[s] = ae(e[s], t));
533
550
  }), r;
534
551
  }
535
552
  function Q(i, e, t) {
536
- t = t || {}, t.arrayMerge = t.arrayMerge || dr, t.isMergeableObject = t.isMergeableObject || sr, t.cloneUnlessOtherwiseSpecified = ae;
537
- var r = Array.isArray(e), s = Array.isArray(i), o = r === s;
538
- return o ? r ? t.arrayMerge(i, e, t) : mr(i, e, t) : ae(e, t);
553
+ t = t || {}, t.arrayMerge = t.arrayMerge || ar, t.isMergeableObject = t.isMergeableObject || er, t.cloneUnlessOtherwiseSpecified = ae;
554
+ var r = Array.isArray(e), s = Array.isArray(i), n = r === s;
555
+ return n ? r ? t.arrayMerge(i, e, t) : dr(i, e, t) : ae(e, t);
539
556
  }
540
557
  Q.all = function(e, t) {
541
558
  if (!Array.isArray(e))
@@ -544,14 +561,14 @@ Q.all = function(e, t) {
544
561
  return Q(r, s, t);
545
562
  }, {});
546
563
  };
547
- var fr = Q, Tt = fr;
564
+ var pr = Q, Ct = pr;
548
565
  /*!
549
566
  * isobject <https://github.com/jonschlinkert/isobject>
550
567
  *
551
568
  * Copyright (c) 2014-2017, Jon Schlinkert.
552
569
  * Released under the MIT License.
553
570
  */
554
- function yr(i) {
571
+ function ur(i) {
555
572
  return i != null && typeof i == "object" && Array.isArray(i) === !1;
556
573
  }
557
574
  /*!
@@ -560,137 +577,137 @@ function yr(i) {
560
577
  * Copyright (c) 2014-2017, Jon Schlinkert.
561
578
  * Released under the MIT License.
562
579
  */
563
- function gt(i) {
564
- return yr(i) === !0 && Object.prototype.toString.call(i) === "[object Object]";
580
+ function ft(i) {
581
+ return ur(i) === !0 && Object.prototype.toString.call(i) === "[object Object]";
565
582
  }
566
- function Ot(i) {
583
+ function wt(i) {
567
584
  var e, t;
568
- return !(gt(i) === !1 || (e = i.constructor, typeof e != "function") || (t = e.prototype, gt(t) === !1) || t.hasOwnProperty("isPrototypeOf") === !1);
585
+ return !(ft(i) === !1 || (e = i.constructor, typeof e != "function") || (t = e.prototype, ft(t) === !1) || t.hasOwnProperty("isPrototypeOf") === !1);
569
586
  }
570
587
  var le;
571
588
  ((i) => {
572
- function e(o, a) {
573
- return o.reduce((g, n) => (g[a(n)] = n, g), {});
589
+ function e(n, a) {
590
+ return n.reduce((g, o) => (g[a(o)] = o, g), {});
574
591
  }
575
592
  i.fromArray = e;
576
- function t(o) {
577
- return o.reduce((a, g) => (a[g[0]] = g[1], a), {});
593
+ function t(n) {
594
+ return n.reduce((a, g) => (a[g[0]] = g[1], a), {});
578
595
  }
579
596
  i.fromEntries = t;
580
- function r(o) {
581
- return JSON.stringify(o, (a, g) => typeof g == "object" && Object.getPrototypeOf(g) !== Object.prototype ? g.toString !== Object.prototype.toString ? g.toString() : `[object ${Object.getPrototypeOf(g).constructor.name}]` : g);
597
+ function r(n) {
598
+ return JSON.stringify(n, (a, g) => typeof g == "object" && Object.getPrototypeOf(g) !== Object.prototype ? g.toString !== Object.prototype.toString ? g.toString() : `[object ${Object.getPrototypeOf(g).constructor.name}]` : g);
582
599
  }
583
600
  i.toJsonSafely = r;
584
- function s(o) {
585
- Ot(o) && Object.keys(o).forEach((a) => {
586
- o[a] === void 0 ? delete o[a] : s(o[a]);
601
+ function s(n) {
602
+ wt(n) && Object.keys(n).forEach((a) => {
603
+ n[a] === void 0 ? delete n[a] : s(n[a]);
587
604
  });
588
605
  }
589
606
  i.deleteUndefinedPropertyOnPlainObjectDeeply = s;
590
607
  })(le || (le = {}));
591
608
  le.toJsonSafely;
592
- var N = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "greedy", i.cooperative = "cooperative", i))(N || {}), Le;
609
+ var N = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "greedy", i.cooperative = "cooperative", i))(N || {}), Se;
593
610
  ((i) => {
594
611
  function e(t) {
595
612
  le.deleteUndefinedPropertyOnPlainObjectDeeply(t);
596
613
  const r = { center: y.ZERO, zoom: 5 };
597
- return Tt(r, t || {}, {
598
- isMergeableObject: Ot
614
+ return Ct(r, t || {}, {
615
+ isMergeableObject: wt
599
616
  });
600
617
  }
601
618
  i.create = e;
602
- })(Le || (Le = {}));
603
- var Be = {}, vr = {
619
+ })(Se || (Se = {}));
620
+ var $e = {}, gr = {
604
621
  get exports() {
605
- return Be;
622
+ return $e;
606
623
  },
607
624
  set exports(i) {
608
- Be = i;
625
+ $e = i;
609
626
  }
610
627
  };
611
628
  (function(i, e) {
612
629
  (function(t, r) {
613
630
  i.exports = r();
614
- })(Mt, function() {
631
+ })(Tt, function() {
615
632
  var t, r = t = r || { version: "1.3.8" }, s = {};
616
- r.guid = "$BAIDU$", s[r.guid] = s[r.guid] || {}, r.dom = r.dom || {}, r.dom.g = function(n) {
617
- return typeof n == "string" || n instanceof String ? document.getElementById(n) : n && n.nodeName && (n.nodeType == 1 || n.nodeType == 9) ? n : null;
618
- }, r.g = r.G = r.dom.g, r.dom.getDocument = function(n) {
619
- return n = r.dom.g(n), n.nodeType == 9 ? n : n.ownerDocument || n.document;
620
- }, r.lang = r.lang || {}, r.lang.isString = function(n) {
621
- return Object.prototype.toString.call(n) == "[object String]";
622
- }, r.isString = r.lang.isString, r.dom._g = function(n) {
623
- return r.lang.isString(n) ? document.getElementById(n) : n;
624
- }, r._g = r.dom._g, r.browser = r.browser || {}, /msie (\d+\.\d)/i.test(navigator.userAgent) && (r.browser.ie = r.ie = document.documentMode || +RegExp.$1), r.dom.getComputedStyle = function(n, l) {
625
- n = r.dom._g(n);
626
- var c = r.dom.getDocument(n), u;
627
- return c.defaultView && c.defaultView.getComputedStyle && (u = c.defaultView.getComputedStyle(n, null), u) ? u[l] || u.getPropertyValue(l) : "";
628
- }, r.dom._styleFixer = r.dom._styleFixer || {}, r.dom._styleFilter = r.dom._styleFilter || [], r.dom._styleFilter.filter = function(n, l, c) {
633
+ r.guid = "$BAIDU$", s[r.guid] = s[r.guid] || {}, r.dom = r.dom || {}, r.dom.g = function(o) {
634
+ return typeof o == "string" || o instanceof String ? document.getElementById(o) : o && o.nodeName && (o.nodeType == 1 || o.nodeType == 9) ? o : null;
635
+ }, r.g = r.G = r.dom.g, r.dom.getDocument = function(o) {
636
+ return o = r.dom.g(o), o.nodeType == 9 ? o : o.ownerDocument || o.document;
637
+ }, r.lang = r.lang || {}, r.lang.isString = function(o) {
638
+ return Object.prototype.toString.call(o) == "[object String]";
639
+ }, r.isString = r.lang.isString, r.dom._g = function(o) {
640
+ return r.lang.isString(o) ? document.getElementById(o) : o;
641
+ }, r._g = r.dom._g, r.browser = r.browser || {}, /msie (\d+\.\d)/i.test(navigator.userAgent) && (r.browser.ie = r.ie = document.documentMode || +RegExp.$1), r.dom.getComputedStyle = function(o, l) {
642
+ o = r.dom._g(o);
643
+ var c = r.dom.getDocument(o), u;
644
+ return c.defaultView && c.defaultView.getComputedStyle && (u = c.defaultView.getComputedStyle(o, null), u) ? u[l] || u.getPropertyValue(l) : "";
645
+ }, r.dom._styleFixer = r.dom._styleFixer || {}, r.dom._styleFilter = r.dom._styleFilter || [], r.dom._styleFilter.filter = function(o, l, c) {
629
646
  for (var u = 0, d = r.dom._styleFilter, b; b = d[u]; u++)
630
- (b = b[c]) && (l = b(n, l));
647
+ (b = b[c]) && (l = b(o, l));
631
648
  return l;
632
- }, r.string = r.string || {}, r.string.toCamelCase = function(n) {
633
- return n.indexOf("-") < 0 && n.indexOf("_") < 0 ? n : n.replace(/[-_][^-_]/g, function(l) {
649
+ }, r.string = r.string || {}, r.string.toCamelCase = function(o) {
650
+ return o.indexOf("-") < 0 && o.indexOf("_") < 0 ? o : o.replace(/[-_][^-_]/g, function(l) {
634
651
  return l.charAt(1).toUpperCase();
635
652
  });
636
- }, r.dom.getStyle = function(n, l) {
653
+ }, r.dom.getStyle = function(o, l) {
637
654
  var c = r.dom;
638
- n = c.g(n), l = r.string.toCamelCase(l);
639
- var u = n.style[l] || (n.currentStyle ? n.currentStyle[l] : "") || c.getComputedStyle(n, l);
655
+ o = c.g(o), l = r.string.toCamelCase(l);
656
+ var u = o.style[l] || (o.currentStyle ? o.currentStyle[l] : "") || c.getComputedStyle(o, l);
640
657
  if (!u) {
641
658
  var d = c._styleFixer[l];
642
- d && (u = d.get ? d.get(n) : r.dom.getStyle(n, d));
659
+ d && (u = d.get ? d.get(o) : r.dom.getStyle(o, d));
643
660
  }
644
661
  return (d = c._styleFilter) && (u = d.filter(l, u, "get")), u;
645
- }, r.getStyle = r.dom.getStyle, /opera\/(\d+\.\d)/i.test(navigator.userAgent) && (r.browser.opera = +RegExp.$1), r.browser.isWebkit = /webkit/i.test(navigator.userAgent), r.browser.isGecko = /gecko/i.test(navigator.userAgent) && !/like gecko/i.test(navigator.userAgent), r.browser.isStrict = document.compatMode == "CSS1Compat", r.dom.getPosition = function(n) {
646
- n = r.dom.g(n);
647
- var l = r.dom.getDocument(n), c = r.browser, u = r.dom.getStyle;
648
- c.isGecko > 0 && l.getBoxObjectFor && u(n, "position") == "absolute" && (n.style.top === "" || n.style.left);
662
+ }, r.getStyle = r.dom.getStyle, /opera\/(\d+\.\d)/i.test(navigator.userAgent) && (r.browser.opera = +RegExp.$1), r.browser.isWebkit = /webkit/i.test(navigator.userAgent), r.browser.isGecko = /gecko/i.test(navigator.userAgent) && !/like gecko/i.test(navigator.userAgent), r.browser.isStrict = document.compatMode == "CSS1Compat", r.dom.getPosition = function(o) {
663
+ o = r.dom.g(o);
664
+ var l = r.dom.getDocument(o), c = r.browser, u = r.dom.getStyle;
665
+ c.isGecko > 0 && l.getBoxObjectFor && u(o, "position") == "absolute" && (o.style.top === "" || o.style.left);
649
666
  var d = { left: 0, top: 0 }, b = c.ie && !c.isStrict ? l.body : l.documentElement, M, T;
650
- if (n == b)
667
+ if (o == b)
651
668
  return d;
652
- if (n.getBoundingClientRect) {
653
- T = n.getBoundingClientRect(), d.left = Math.floor(T.left) + Math.max(l.documentElement.scrollLeft, l.body.scrollLeft), d.top = Math.floor(T.top) + Math.max(l.documentElement.scrollTop, l.body.scrollTop), d.left -= l.documentElement.clientLeft, d.top -= l.documentElement.clientTop;
669
+ if (o.getBoundingClientRect) {
670
+ T = o.getBoundingClientRect(), d.left = Math.floor(T.left) + Math.max(l.documentElement.scrollLeft, l.body.scrollLeft), d.top = Math.floor(T.top) + Math.max(l.documentElement.scrollTop, l.body.scrollTop), d.left -= l.documentElement.clientLeft, d.top -= l.documentElement.clientTop;
654
671
  var p = l.body, f = parseInt(u(p, "borderLeftWidth")), v = parseInt(u(p, "borderTopWidth"));
655
672
  c.ie && !c.isStrict && (d.left -= isNaN(f) ? 2 : f, d.top -= isNaN(v) ? 2 : v);
656
673
  } else {
657
- M = n;
674
+ M = o;
658
675
  do {
659
676
  if (d.left += M.offsetLeft, d.top += M.offsetTop, c.isWebkit > 0 && u(M, "position") == "fixed") {
660
677
  d.left += l.body.scrollLeft, d.top += l.body.scrollTop;
661
678
  break;
662
679
  }
663
680
  M = M.offsetParent;
664
- } while (M && M != n);
665
- for ((c.opera > 0 || c.isWebkit > 0 && u(n, "position") == "absolute") && (d.top -= l.body.offsetTop), M = n.offsetParent; M && M != l.body; )
681
+ } while (M && M != o);
682
+ for ((c.opera > 0 || c.isWebkit > 0 && u(o, "position") == "absolute") && (d.top -= l.body.offsetTop), M = o.offsetParent; M && M != l.body; )
666
683
  d.left -= M.scrollLeft, (!c.opera || M.tagName != "TR") && (d.top -= M.scrollTop), M = M.offsetParent;
667
684
  }
668
685
  return d;
669
- }, r.event = r.event || {}, r.event._listeners = r.event._listeners || [], r.event.on = function(n, l, c) {
670
- l = l.replace(/^on/i, ""), n = r.dom._g(n);
686
+ }, r.event = r.event || {}, r.event._listeners = r.event._listeners || [], r.event.on = function(o, l, c) {
687
+ l = l.replace(/^on/i, ""), o = r.dom._g(o);
671
688
  var u = function(p) {
672
- c.call(n, p);
689
+ c.call(o, p);
673
690
  }, d = r.event._listeners, b = r.event._eventFilter, M, T = l;
674
- return l = l.toLowerCase(), b && b[l] && (M = b[l](n, l, u), T = M.type, u = M.listener), n.addEventListener ? n.addEventListener(T, u, !1) : n.attachEvent && n.attachEvent("on" + T, u), d[d.length] = [n, l, c, u, T], n;
691
+ return l = l.toLowerCase(), b && b[l] && (M = b[l](o, l, u), T = M.type, u = M.listener), o.addEventListener ? o.addEventListener(T, u, !1) : o.attachEvent && o.attachEvent("on" + T, u), d[d.length] = [o, l, c, u, T], o;
675
692
  }, r.on = r.event.on, function() {
676
- var n = s[r.guid];
693
+ var o = s[r.guid];
677
694
  r.lang.guid = function() {
678
- return "TANGRAM__" + (n._counter++).toString(36);
679
- }, n._counter = n._counter || 1;
680
- }(), s[r.guid]._instances = s[r.guid]._instances || {}, r.lang.isFunction = function(n) {
681
- return Object.prototype.toString.call(n) == "[object Function]";
682
- }, r.lang.Class = function(n) {
683
- this.guid = n || r.lang.guid(), s[r.guid]._instances[this.guid] = this;
695
+ return "TANGRAM__" + (o._counter++).toString(36);
696
+ }, o._counter = o._counter || 1;
697
+ }(), s[r.guid]._instances = s[r.guid]._instances || {}, r.lang.isFunction = function(o) {
698
+ return Object.prototype.toString.call(o) == "[object Function]";
699
+ }, r.lang.Class = function(o) {
700
+ this.guid = o || r.lang.guid(), s[r.guid]._instances[this.guid] = this;
684
701
  }, s[r.guid]._instances = s[r.guid]._instances || {}, r.lang.Class.prototype.dispose = function() {
685
702
  delete s[r.guid]._instances[this.guid];
686
- for (var n in this)
687
- r.lang.isFunction(this[n]) || delete this[n];
703
+ for (var o in this)
704
+ r.lang.isFunction(this[o]) || delete this[o];
688
705
  this.disposed = !0;
689
706
  }, r.lang.Class.prototype.toString = function() {
690
707
  return "[object " + (this._className || "Object") + "]";
691
- }, r.lang.Event = function(n, l) {
692
- this.type = n, this.returnValue = !0, this.target = l || null, this.currentTarget = null;
693
- }, r.lang.Class.prototype.addEventListener = function(n, l, c) {
708
+ }, r.lang.Event = function(o, l) {
709
+ this.type = o, this.returnValue = !0, this.target = l || null, this.currentTarget = null;
710
+ }, r.lang.Class.prototype.addEventListener = function(o, l, c) {
694
711
  if (r.lang.isFunction(l)) {
695
712
  !this.__listeners && (this.__listeners = {});
696
713
  var u = this.__listeners, d;
@@ -699,78 +716,78 @@ var Be = {}, vr = {
699
716
  throw "nonstandard key:" + c;
700
717
  l.hashCode = c, d = c;
701
718
  }
702
- n.indexOf("on") != 0 && (n = "on" + n), typeof u[n] != "object" && (u[n] = {}), d = d || r.lang.guid(), l.hashCode = d, u[n][d] = l;
719
+ o.indexOf("on") != 0 && (o = "on" + o), typeof u[o] != "object" && (u[o] = {}), d = d || r.lang.guid(), l.hashCode = d, u[o][d] = l;
703
720
  }
704
- }, r.lang.Class.prototype.removeEventListener = function(n, l) {
721
+ }, r.lang.Class.prototype.removeEventListener = function(o, l) {
705
722
  if (!(typeof l < "u" && (r.lang.isFunction(l) && !(l = l.hashCode) || !r.lang.isString(l)))) {
706
- !this.__listeners && (this.__listeners = {}), n.indexOf("on") != 0 && (n = "on" + n);
723
+ !this.__listeners && (this.__listeners = {}), o.indexOf("on") != 0 && (o = "on" + o);
707
724
  var c = this.__listeners;
708
- if (c[n])
725
+ if (c[o])
709
726
  if (typeof l < "u")
710
- c[n][l] && delete c[n][l];
727
+ c[o][l] && delete c[o][l];
711
728
  else
712
- for (var u in c[n])
713
- delete c[n][u];
729
+ for (var u in c[o])
730
+ delete c[o][u];
714
731
  }
715
- }, r.lang.Class.prototype.dispatchEvent = function(n, l) {
716
- r.lang.isString(n) && (n = new r.lang.Event(n)), !this.__listeners && (this.__listeners = {}), l = l || {};
732
+ }, r.lang.Class.prototype.dispatchEvent = function(o, l) {
733
+ r.lang.isString(o) && (o = new r.lang.Event(o)), !this.__listeners && (this.__listeners = {}), l = l || {};
717
734
  for (var c in l)
718
- n[c] = l[c];
719
- var c, u = this.__listeners, d = n.type;
720
- if (n.target = n.target || this, n.currentTarget = this, d.indexOf("on") != 0 && (d = "on" + d), r.lang.isFunction(this[d]) && this[d].apply(this, arguments), typeof u[d] == "object")
735
+ o[c] = l[c];
736
+ var c, u = this.__listeners, d = o.type;
737
+ if (o.target = o.target || this, o.currentTarget = this, d.indexOf("on") != 0 && (d = "on" + d), r.lang.isFunction(this[d]) && this[d].apply(this, arguments), typeof u[d] == "object")
721
738
  for (c in u[d])
722
739
  u[d][c].apply(this, arguments);
723
- return n.returnValue;
724
- }, r.lang.inherits = function(n, l, c) {
725
- var u, d, b = n.prototype, M = new Function();
726
- M.prototype = l.prototype, d = n.prototype = new M();
740
+ return o.returnValue;
741
+ }, r.lang.inherits = function(o, l, c) {
742
+ var u, d, b = o.prototype, M = new Function();
743
+ M.prototype = l.prototype, d = o.prototype = new M();
727
744
  for (u in b)
728
745
  d[u] = b[u];
729
- n.prototype.constructor = n, n.superClass = l.prototype, typeof c == "string" && (d._className = c);
746
+ o.prototype.constructor = o, o.superClass = l.prototype, typeof c == "string" && (d._className = c);
730
747
  }, r.inherits = r.lang.inherits;
731
- var o = "http://api.map.baidu.com/library/TextIconOverlay/1.2/src/images/m", a = "png", g = function(n, l, c) {
748
+ var n = "http://api.map.baidu.com/library/TextIconOverlay/1.2/src/images/m", a = "png", g = function(o, l, c) {
732
749
  try {
733
750
  BMap;
734
751
  } catch {
735
752
  throw Error("Baidu Map JS API is not ready yet!");
736
753
  }
737
- t.lang.inherits(g, BMap.Overlay, "TextIconOverlay"), this._position = n, this._text = l, this._options = c || {}, this._styles = this._options.styles || [], this._zIndex = this._options.zIndex, !this._styles.length && this._setupDefaultStyles();
754
+ t.lang.inherits(g, BMap.Overlay, "TextIconOverlay"), this._position = o, this._text = l, this._options = c || {}, this._styles = this._options.styles || [], this._zIndex = this._options.zIndex, !this._styles.length && this._setupDefaultStyles();
738
755
  };
739
756
  return g.prototype._setupDefaultStyles = function() {
740
- for (var n = [53, 56, 66, 78, 90], l = 0, c; c = n[l]; l++)
757
+ for (var o = [53, 56, 66, 78, 90], l = 0, c; c = o[l]; l++)
741
758
  this._styles.push({
742
- url: o + l + "." + a,
759
+ url: n + l + "." + a,
743
760
  size: new BMap.Size(c, c)
744
761
  });
745
- }, g.prototype.initialize = function(n) {
746
- return this._map = n, this._domElement = document.createElement("div"), this._updateCss(), this._updateText(), this._updatePosition(), this._bind(), this._map.getPanes().markerMouseTarget.appendChild(this._domElement), this._domElement;
762
+ }, g.prototype.initialize = function(o) {
763
+ return this._map = o, this._domElement = document.createElement("div"), this._updateCss(), this._updateText(), this._updatePosition(), this._bind(), this._map.getPanes().markerMouseTarget.appendChild(this._domElement), this._domElement;
747
764
  }, g.prototype.draw = function() {
748
765
  this._map && this._updatePosition();
749
766
  }, g.prototype.getText = function() {
750
767
  return this._text;
751
- }, g.prototype.setText = function(n) {
752
- n && (!this._text || this._text.toString() != n.toString()) && (this._text = n, this._updateText(), this._updateCss(), this._updatePosition());
768
+ }, g.prototype.setText = function(o) {
769
+ o && (!this._text || this._text.toString() != o.toString()) && (this._text = o, this._updateText(), this._updateCss(), this._updatePosition());
753
770
  }, g.prototype.getPosition = function() {
754
771
  return this._position;
755
- }, g.prototype.setPosition = function(n) {
756
- n && (!this._position || !this._position.equals(n)) && (this._position = n, this._updatePosition());
757
- }, g.prototype.getStyleByText = function(n, l) {
758
- var c = parseInt(n), u = parseInt(c / 10);
772
+ }, g.prototype.setPosition = function(o) {
773
+ o && (!this._position || !this._position.equals(o)) && (this._position = o, this._updatePosition());
774
+ }, g.prototype.getStyleByText = function(o, l) {
775
+ var c = parseInt(o), u = parseInt(c / 10);
759
776
  return u = Math.max(0, u), u = Math.min(u, l.length - 1), l[u];
760
777
  }, g.prototype._updateCss = function() {
761
778
  if (this._domElement) {
762
- var n = this.getStyleByText(this._text, this._styles);
763
- this._domElement.style.cssText = this._buildCssText(n);
779
+ var o = this.getStyleByText(this._text, this._styles);
780
+ this._domElement.style.cssText = this._buildCssText(o);
764
781
  }
765
782
  }, g.prototype._updateText = function() {
766
783
  this._domElement && (this._domElement.innerHTML = this._text);
767
784
  }, g.prototype._updatePosition = function() {
768
785
  if (this._domElement && this._position) {
769
- var n = this._domElement.style, l = this._map.pointToOverlayPixel(this._position);
770
- l.x -= Math.ceil(parseInt(n.width) / 2), l.y -= Math.ceil(parseInt(n.height) / 2), n.left = l.x + "px", n.top = l.y + "px";
786
+ var o = this._domElement.style, l = this._map.pointToOverlayPixel(this._position);
787
+ l.x -= Math.ceil(parseInt(o.width) / 2), l.y -= Math.ceil(parseInt(o.height) / 2), o.left = l.x + "px", o.top = l.y + "px";
771
788
  }
772
- }, g.prototype._buildCssText = function(n) {
773
- var l = n.url, c = n.size, u = n.anchor, d = n.offset, b = n.textColor || "black", M = n.textSize || 10, T = [];
789
+ }, g.prototype._buildCssText = function(o) {
790
+ var l = o.url, c = o.size, u = o.anchor, d = o.offset, b = o.textColor || "black", M = o.textSize || 10, T = [];
774
791
  if (this._zIndex && T.push("z-index:" + this._zIndex + ";"), t.browser.ie < 7)
775
792
  T.push('filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="' + l + '");');
776
793
  else {
@@ -782,7 +799,7 @@ var Be = {}, vr = {
782
799
  }, g.prototype._bind = function() {
783
800
  if (!this._domElement)
784
801
  return;
785
- var n = this, l = this._map, c = t.lang.Event;
802
+ var o = this, l = this._map, c = t.lang.Event;
786
803
  function u(d, b) {
787
804
  var M = d.srcElement || d.target, T = d.clientX || d.pageX, p = d.clientY || d.pageY;
788
805
  if (d && b && T && p && M) {
@@ -792,32 +809,32 @@ var Be = {}, vr = {
792
809
  return b;
793
810
  }
794
811
  t.event.on(this._domElement, "mouseover", function(d) {
795
- n.dispatchEvent(u(d, new c("onmouseover")));
812
+ o.dispatchEvent(u(d, new c("onmouseover")));
796
813
  }), t.event.on(this._domElement, "mouseout", function(d) {
797
- n.dispatchEvent(u(d, new c("onmouseout")));
814
+ o.dispatchEvent(u(d, new c("onmouseout")));
798
815
  }), t.event.on(this._domElement, "click", function(d) {
799
- n.dispatchEvent(u(d, new c("onclick")));
816
+ o.dispatchEvent(u(d, new c("onclick")));
800
817
  });
801
818
  }, g;
802
819
  });
803
- })(vr);
804
- const mt = Be;
805
- var Ct = function(i, e, t) {
806
- e = _r(e);
820
+ })(gr);
821
+ const yt = $e;
822
+ var xt = function(i, e, t) {
823
+ e = mr(e);
807
824
  var r = i.pointToPixel(e.getNorthEast()), s = i.pointToPixel(e.getSouthWest());
808
825
  r.x += t, r.y -= t, s.x -= t, s.y += t;
809
- var o = i.pixelToPoint(r), a = i.pixelToPoint(s);
810
- return new BMap.Bounds(a, o);
811
- }, _r = function(i) {
826
+ var n = i.pixelToPoint(r), a = i.pixelToPoint(s);
827
+ return new BMap.Bounds(a, n);
828
+ }, mr = function(i) {
812
829
  var e = ge(i.getNorthEast().lng, -180, 180), t = ge(i.getSouthWest().lng, -180, 180), r = ge(i.getNorthEast().lat, -74, 74), s = ge(i.getSouthWest().lat, -74, 74);
813
830
  return new BMap.Bounds(new BMap.Point(t, s), new BMap.Point(e, r));
814
831
  }, ge = function(i, e, t) {
815
832
  return e && (i = Math.max(i, e)), t && (i = Math.min(i, t)), i;
816
- }, wt = function(i) {
833
+ }, Et = function(i) {
817
834
  return Object.prototype.toString.call(i) === "[object Array]";
818
- }, xt = function(i, e) {
835
+ }, kt = function(i, e) {
819
836
  var t = -1;
820
- if (wt(e)) {
837
+ if (Et(e)) {
821
838
  if (e.indexOf)
822
839
  t = e.indexOf(i);
823
840
  else
@@ -845,7 +862,7 @@ var Ct = function(i, e, t) {
845
862
  r._redraw();
846
863
  });
847
864
  var s = t.markers;
848
- wt(s) && this.addMarkers(s);
865
+ Et(s) && this.addMarkers(s);
849
866
  }
850
867
  };
851
868
  _.prototype.addMarkers = function(i) {
@@ -856,7 +873,7 @@ _.prototype.addMarkers = function(i) {
856
873
  }
857
874
  };
858
875
  _.prototype._pushMarkerTo = function(i) {
859
- var e = xt(i, this._markers);
876
+ var e = kt(i, this._markers);
860
877
  e === -1 && (i.isInCluster = !1, this._markers.push(i));
861
878
  };
862
879
  _.prototype.addMarker = function(i) {
@@ -865,7 +882,7 @@ _.prototype.addMarker = function(i) {
865
882
  _.prototype._createClusters = function() {
866
883
  var i = this._map.getBounds();
867
884
  if (i.getCenter()) {
868
- for (var e = Ct(this._map, i, this._gridSize), t = 0, r; r = this._markers[t]; t++)
885
+ for (var e = xt(this._map, i, this._gridSize), t = 0, r; r = this._markers[t]; t++)
869
886
  !r.isInCluster && e.containsPoint(r.getPosition()) && this._addToClosestCluster(r);
870
887
  for (var s = this._markers.length, t = 0; t < s; t++)
871
888
  this._clusters[t] && this._clusters[t].render();
@@ -875,9 +892,9 @@ _.prototype._addToClosestCluster = function(i) {
875
892
  var e = 4e6, t = null;
876
893
  i.getPosition();
877
894
  for (var r = 0, s; s = this._clusters[r]; r++) {
878
- var o = s.getCenter();
879
- if (o) {
880
- var a = this._map.getDistance(o, i.getPosition());
895
+ var n = s.getCenter();
896
+ if (n) {
897
+ var a = this._map.getDistance(n, i.getPosition());
881
898
  a < e && (e = a, t = s);
882
899
  }
883
900
  }
@@ -905,7 +922,7 @@ _.prototype._removeMarkersFromMap = function() {
905
922
  }
906
923
  };
907
924
  _.prototype._removeMarker = function(i) {
908
- var e = xt(i, this._markers);
925
+ var e = kt(i, this._markers);
909
926
  return e === -1 ? !1 : (this._map.removeOverlay(i), this._markers.splice(e, 1), !0);
910
927
  };
911
928
  _.prototype.removeMarker = function(i) {
@@ -981,7 +998,7 @@ _.prototype.setStylesIndexCalculator = function(i) {
981
998
  };
982
999
  function L(i) {
983
1000
  var e = this;
984
- this._markerClusterer = i, this._map = i.getMap(), this._minClusterSize = i.getMinClusterSize(), this._isAverageCenter = i.isAverageCenter(), this._center = null, this._markers = [], this._gridBounds = null, this._isReal = !1, this._clusterMarker = new mt(this._center, this._markers.length, {
1001
+ this._markerClusterer = i, this._map = i.getMap(), this._minClusterSize = i.getMinClusterSize(), this._isAverageCenter = i.isAverageCenter(), this._center = null, this._markers = [], this._gridBounds = null, this._isReal = !1, this._clusterMarker = new yt(this._center, this._markers.length, {
985
1002
  styles: this._markerClusterer.getStyles(),
986
1003
  zIndex: i._zIndex
987
1004
  }), this._clusterMarker.getStyleByText = function(t, r) {
@@ -989,7 +1006,7 @@ function L(i) {
989
1006
  var s = e._markerClusterer._stylesIndexCalculator(e._markers, r.length);
990
1007
  return r[s];
991
1008
  }
992
- return mt.prototype.getStyleByText.call(this, t, r);
1009
+ return yt.prototype.getStyleByText.call(this, t, r);
993
1010
  }, this._clusterMarker.addEventListener && this._clusterMarker.addEventListener("click", function(t) {
994
1011
  e._map.setViewport(e.getBounds());
995
1012
  });
@@ -1029,7 +1046,7 @@ L.prototype.isReal = function(i) {
1029
1046
  };
1030
1047
  L.prototype.updateGridBounds = function() {
1031
1048
  var i = new BMap.Bounds(this._center, this._center);
1032
- this._gridBounds = Ct(this._map, i, this._markerClusterer.getGridSize());
1049
+ this._gridBounds = xt(this._map, i, this._markerClusterer.getGridSize());
1033
1050
  };
1034
1051
  L.prototype.updateClusterMarker = function() {
1035
1052
  if (this._map.getZoom() > this._markerClusterer.getMaxZoom()) {
@@ -1059,20 +1076,20 @@ L.prototype.getBounds = function() {
1059
1076
  L.prototype.getCenter = function() {
1060
1077
  return this._center;
1061
1078
  };
1062
- let Mr = class Et {
1079
+ let fr = class It {
1063
1080
  constructor(e, t, r) {
1064
- this.extend(Et, google.maps.OverlayView), this.map_ = e, this.MARKER_CLUSTER_IMAGE_PATH_ = "../images/m", this.MARKER_CLUSTER_IMAGE_EXTENSION_ = "png", this.markers_ = [], this.clusters_ = [], this.sizes = [53, 56, 66, 78, 90], this.styles_ = [], this.ready_ = !1;
1081
+ this.extend(It, google.maps.OverlayView), this.map_ = e, this.MARKER_CLUSTER_IMAGE_PATH_ = "../images/m", this.MARKER_CLUSTER_IMAGE_EXTENSION_ = "png", this.markers_ = [], this.clusters_ = [], this.sizes = [53, 56, 66, 78, 90], this.styles_ = [], this.ready_ = !1;
1065
1082
  var s = r || {};
1066
1083
  this.zIndex_ = s.zIndex || google.maps.Marker.MAX_ZINDEX + 1, this.gridSize_ = s.gridSize || 60, this.minClusterSize_ = s.minimumClusterSize || 2, this.maxZoom_ = s.maxZoom || null, this.styles_ = s.styles || [], this.imagePath_ = s.imagePath || this.MARKER_CLUSTER_IMAGE_PATH_, this.imageExtension_ = s.imageExtension || this.MARKER_CLUSTER_IMAGE_EXTENSION_, this.zoomOnClick_ = !0, s.zoomOnClick != null && (this.zoomOnClick_ = s.zoomOnClick), this.averageCenter_ = !1, s.averageCenter != null && (this.averageCenter_ = s.averageCenter), this.setupStyles_(), this.setMap(e), this.prevZoom_ = this.map_.getZoom();
1067
- var o = this;
1084
+ var n = this;
1068
1085
  google.maps.event.addListener(this.map_, "zoom_changed", function() {
1069
- var a = o.map_.getZoom(), g = o.map_.minZoom || 0, n = Math.min(
1070
- o.map_.maxZoom || 100,
1071
- o.map_.mapTypes[o.map_.getMapTypeId()].maxZoom
1086
+ var a = n.map_.getZoom(), g = n.map_.minZoom || 0, o = Math.min(
1087
+ n.map_.maxZoom || 100,
1088
+ n.map_.mapTypes[n.map_.getMapTypeId()].maxZoom
1072
1089
  );
1073
- a = Math.min(Math.max(a, g), n), o.prevZoom_ != a && (o.prevZoom_ = a, o.resetViewport());
1090
+ a = Math.min(Math.max(a, g), o), n.prevZoom_ != a && (n.prevZoom_ = a, n.resetViewport());
1074
1091
  }), google.maps.event.addListener(this.map_, "idle", function() {
1075
- o.redraw();
1092
+ n.redraw();
1076
1093
  }), t && (t.length || Object.keys(t).length) && this.addMarkers(t, !1);
1077
1094
  }
1078
1095
  /**
@@ -1210,8 +1227,8 @@ let Mr = class Et {
1210
1227
  * @private
1211
1228
  */
1212
1229
  calculator_(e, t) {
1213
- for (var r = 0, s = e.length, o = s; o !== 0; )
1214
- o = parseInt(o / 10, 10), r++;
1230
+ for (var r = 0, s = e.length, n = s; n !== 0; )
1231
+ n = parseInt(n / 10, 10), r++;
1215
1232
  return r = Math.min(r, t), {
1216
1233
  text: s,
1217
1234
  index: r
@@ -1312,7 +1329,7 @@ let Mr = class Et {
1312
1329
  * @param {boolean=} opt_nodraw Optional boolean to force no redraw.
1313
1330
  */
1314
1331
  removeMarkers(e, t) {
1315
- for (var r = e === this.getMarkers() ? e.slice() : e, s = !1, o = 0, a; a = r[o]; o++) {
1332
+ for (var r = e === this.getMarkers() ? e.slice() : e, s = !1, n = 0, a; a = r[n]; n++) {
1316
1333
  var g = this.removeMarker_(a);
1317
1334
  s = s || g;
1318
1335
  }
@@ -1397,12 +1414,12 @@ let Mr = class Et {
1397
1414
  ), s = new google.maps.LatLng(
1398
1415
  e.getSouthWest().lat(),
1399
1416
  e.getSouthWest().lng()
1400
- ), o = t.fromLatLngToDivPixel(r);
1401
- o.x += this.gridSize_, o.y -= this.gridSize_;
1417
+ ), n = t.fromLatLngToDivPixel(r);
1418
+ n.x += this.gridSize_, n.y -= this.gridSize_;
1402
1419
  var a = t.fromLatLngToDivPixel(s);
1403
1420
  a.x -= this.gridSize_, a.y += this.gridSize_;
1404
- var g = t.fromDivPixelToLatLng(o), n = t.fromDivPixelToLatLng(a);
1405
- return e.extend(g), e.extend(n), e;
1421
+ var g = t.fromDivPixelToLatLng(n), o = t.fromDivPixelToLatLng(a);
1422
+ return e.extend(g), e.extend(o), e;
1406
1423
  }
1407
1424
  /**
1408
1425
  * Determins if a marker is contained in a bounds.
@@ -1460,8 +1477,8 @@ let Mr = class Et {
1460
1477
  distanceBetweenPoints_(e, t) {
1461
1478
  if (!e || !t)
1462
1479
  return 0;
1463
- var r = 6371, s = (t.lat() - e.lat()) * Math.PI / 180, o = (t.lng() - e.lng()) * Math.PI / 180, a = Math.sin(s / 2) * Math.sin(s / 2) + Math.cos(e.lat() * Math.PI / 180) * Math.cos(t.lat() * Math.PI / 180) * Math.sin(o / 2) * Math.sin(o / 2), g = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)), n = r * g;
1464
- return n;
1480
+ var r = 6371, s = (t.lat() - e.lat()) * Math.PI / 180, n = (t.lng() - e.lng()) * Math.PI / 180, a = Math.sin(s / 2) * Math.sin(s / 2) + Math.cos(e.lat() * Math.PI / 180) * Math.cos(t.lat() * Math.PI / 180) * Math.sin(n / 2) * Math.sin(n / 2), g = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)), o = r * g;
1481
+ return o;
1465
1482
  }
1466
1483
  /**
1467
1484
  * Add a marker to a cluster, or creates a new cluster.
@@ -1470,18 +1487,18 @@ let Mr = class Et {
1470
1487
  * @private
1471
1488
  */
1472
1489
  addToClosestCluster_(e) {
1473
- for (var t = 4e4, r = null, s = 0, o; o = this.clusters_[s]; s++) {
1474
- var a = o.getCenter();
1490
+ for (var t = 4e4, r = null, s = 0, n; n = this.clusters_[s]; s++) {
1491
+ var a = n.getCenter();
1475
1492
  if (a) {
1476
1493
  var g = this.distanceBetweenPoints_(a, e.getPosition());
1477
- g < t && (t = g, r = o);
1494
+ g < t && (t = g, r = n);
1478
1495
  }
1479
1496
  }
1480
1497
  if (r && r.isMarkerInClusterBounds(e))
1481
1498
  r.addMarker(e);
1482
1499
  else {
1483
- var n = new br(this);
1484
- n.addMarker(e), this.clusters_.push(n);
1500
+ var o = new yr(this);
1501
+ o.addMarker(e), this.clusters_.push(o);
1485
1502
  }
1486
1503
  }
1487
1504
  /**
@@ -1498,9 +1515,9 @@ let Mr = class Et {
1498
1515
  !s.isAdded && this.isMarkerInBounds_(s, t) && this.addToClosestCluster_(s);
1499
1516
  }
1500
1517
  };
1501
- class br {
1518
+ class yr {
1502
1519
  constructor(e) {
1503
- this.markerClusterer_ = e, this.map_ = e.getMap(), this.gridSize_ = e.getGridSize(), this.minClusterSize_ = e.getMinClusterSize(), this.averageCenter_ = e.isAverageCenter(), this.center_ = null, this.markers_ = [], this.bounds_ = null, this.clusterIcon_ = new De(
1520
+ this.markerClusterer_ = e, this.map_ = e.getMap(), this.gridSize_ = e.getGridSize(), this.minClusterSize_ = e.getMinClusterSize(), this.averageCenter_ = e.isAverageCenter(), this.center_ = null, this.markers_ = [], this.bounds_ = null, this.clusterIcon_ = new Ge(
1504
1521
  this,
1505
1522
  e.getStyles(),
1506
1523
  e.getGridSize()
@@ -1536,11 +1553,11 @@ class br {
1536
1553
  this.center_ = new google.maps.LatLng(r, s), this.calculateBounds_();
1537
1554
  }
1538
1555
  e.isAdded = !0, this.markers_.push(e);
1539
- var o = this.markers_.length;
1540
- if (o < this.minClusterSize_ && e.getMap() != this.map_ && e.setMap(this.map_), o == this.minClusterSize_)
1541
- for (var a = 0; a < o; a++)
1556
+ var n = this.markers_.length;
1557
+ if (n < this.minClusterSize_ && e.getMap() != this.map_ && e.setMap(this.map_), n == this.minClusterSize_)
1558
+ for (var a = 0; a < n; a++)
1542
1559
  this.markers_[a].setMap(null);
1543
- return o >= this.minClusterSize_ && e.setMap(null), this.updateIcon(), !0;
1560
+ return n >= this.minClusterSize_ && e.setMap(null), this.updateIcon(), !0;
1544
1561
  }
1545
1562
  /**
1546
1563
  * Returns the marker clusterer that the cluster is associated with.
@@ -1630,13 +1647,13 @@ class br {
1630
1647
  this.clusterIcon_.hide();
1631
1648
  return;
1632
1649
  }
1633
- var o = this.markerClusterer_.getStyles().length, a = this.markerClusterer_.getCalculator()(this.markers_, o);
1650
+ var n = this.markerClusterer_.getStyles().length, a = this.markerClusterer_.getCalculator()(this.markers_, n);
1634
1651
  this.clusterIcon_.setCenter(this.center_), this.clusterIcon_.setSums(a), this.clusterIcon_.show();
1635
1652
  }
1636
1653
  }
1637
- class De {
1654
+ class Ge {
1638
1655
  constructor(e, t, r) {
1639
- e.getMarkerClusterer().extend(De, google.maps.OverlayView), this.styles_ = t, this.padding_ = r || 0, this.cluster_ = e, this.center_ = null, this.map_ = e.getMap(), this.div_ = null, this.sums_ = null, this.visible_ = !1, this.setMap(this.map_);
1656
+ e.getMarkerClusterer().extend(Ge, google.maps.OverlayView), this.styles_ = t, this.padding_ = r || 0, this.cluster_ = e, this.center_ = null, this.map_ = e.getMap(), this.div_ = null, this.sums_ = null, this.visible_ = !1, this.setMap(this.map_);
1640
1657
  }
1641
1658
  /**
1642
1659
  * Triggers the clusterclick event and zoom's if the option is set.
@@ -1761,9 +1778,9 @@ class De {
1761
1778
  ) : t.push("width:" + this.width_ + "px; text-align:center;")) : t.push(
1762
1779
  "height:" + this.height_ + "px; line-height:" + this.height_ + "px; width:" + this.width_ + "px; text-align:center;"
1763
1780
  );
1764
- var s = this.textColor_ ? this.textColor_ : "black", o = this.textSize_ ? this.textSize_ : 11;
1781
+ var s = this.textColor_ ? this.textColor_ : "black", n = this.textSize_ ? this.textSize_ : 11;
1765
1782
  return t.push(
1766
- "cursor:pointer; top:" + e.y + "px; left:" + e.x + "px; color:" + s + "; position:absolute; font-size:" + o + "px; font-family:Arial,sans-serif; font-weight:bold"
1783
+ "cursor:pointer; top:" + e.y + "px; left:" + e.x + "px; color:" + s + "; position:absolute; font-size:" + n + "px; font-family:Arial,sans-serif; font-weight:bold"
1767
1784
  ), t.join("");
1768
1785
  }
1769
1786
  }
@@ -1793,7 +1810,7 @@ var ve;
1793
1810
  }
1794
1811
  i.toGoogle = t;
1795
1812
  })(ve || (ve = {}));
1796
- class kt {
1813
+ class Pt {
1797
1814
  constructor(e) {
1798
1815
  h(this, "inner");
1799
1816
  this.map = e;
@@ -1819,7 +1836,7 @@ class kt {
1819
1836
  return this.inner.removeMarkers(e.map((t) => t.innerOverlay));
1820
1837
  }
1821
1838
  }
1822
- class Tr extends kt {
1839
+ class vr extends Pt {
1823
1840
  constructor(e, t) {
1824
1841
  var s;
1825
1842
  super(e), this.inner = new _(e.innerMap, {
@@ -1829,20 +1846,20 @@ class Tr extends kt {
1829
1846
  maxZoom: t.maxZoom,
1830
1847
  minClusterSize: t.minClusterSize,
1831
1848
  isAverageCenter: t.averageCenter,
1832
- styles: (s = t.styles) == null ? void 0 : s.map((o) => ve.toBaidu(o)),
1849
+ styles: (s = t.styles) == null ? void 0 : s.map((n) => ve.toBaidu(n)),
1833
1850
  zIndex: t.zIndex
1834
1851
  });
1835
1852
  const r = t.stylesIndexCalculator;
1836
- r && this.inner.setStylesIndexCalculator((o, a) => r(o.length, a)), t.markers && this.addMarkers(t.markers);
1853
+ r && this.inner.setStylesIndexCalculator((n, a) => r(n.length, a)), t.markers && this.addMarkers(t.markers);
1837
1854
  }
1838
1855
  recreate() {
1839
1856
  this.inner._redraw();
1840
1857
  }
1841
1858
  }
1842
- class Or extends kt {
1859
+ class _r extends Pt {
1843
1860
  constructor(e, t) {
1844
- var s, o;
1845
- super(e), this.inner = new Mr(
1861
+ var s, n;
1862
+ super(e), this.inner = new fr(
1846
1863
  e.innerMap,
1847
1864
  // google的构造器中的markers,不会触发重绘, 第一次绘制通过监听地图的'idle'事件触发, 可以直接设置
1848
1865
  (s = t.markers) == null ? void 0 : s.map((a) => a.innerOverlay),
@@ -1851,7 +1868,7 @@ class Or extends kt {
1851
1868
  maxZoom: t.maxZoom,
1852
1869
  minimumClusterSize: t.minClusterSize,
1853
1870
  averageCenter: t.averageCenter,
1854
- styles: (o = t.styles) == null ? void 0 : o.map((a) => ve.toGoogle(a)),
1871
+ styles: (n = t.styles) == null ? void 0 : n.map((a) => ve.toGoogle(a)),
1855
1872
  zIndex: t.zIndex
1856
1873
  }
1857
1874
  );
@@ -1866,51 +1883,51 @@ class Or extends kt {
1866
1883
  this.inner.repaint();
1867
1884
  }
1868
1885
  }
1869
- function R(i, e) {
1870
- Object.keys(this.$listeners).forEach((t) => {
1871
- t.startsWith("update:") || e != null && e.includes(t) || i.addEventListener(t, this.$listeners[t]);
1886
+ function F(i, e, t) {
1887
+ Object.keys(i).forEach((r) => {
1888
+ r.startsWith("update:") || t != null && t.includes(r) || e.addEventListener(r, i[r]);
1872
1889
  });
1873
1890
  }
1874
- let Cr = 1;
1875
- function wr() {
1876
- return Cr++;
1891
+ let Mr = 1;
1892
+ function br() {
1893
+ return Mr++;
1877
1894
  }
1878
1895
  function _e(i, e) {
1879
- return e.__id__ || (e.__id__ = wr()), `${i}::${e.__id__}`;
1896
+ return e.__id__ || (e.__id__ = br()), `${i}::${e.__id__}`;
1880
1897
  }
1881
- var Se;
1898
+ var Me;
1882
1899
  ((i) => {
1883
1900
  function e(r, s) {
1884
- const o = r.indexOf(s);
1885
- if (o !== -1)
1886
- return r.splice(o, 1)[0];
1901
+ const n = r.indexOf(s);
1902
+ if (n !== -1)
1903
+ return r.splice(n, 1)[0];
1887
1904
  }
1888
1905
  i.remove = e;
1889
1906
  function t(r, s) {
1890
- for (const o of r)
1891
- if (o instanceof s)
1892
- return o;
1907
+ for (const n of r)
1908
+ if (n instanceof s)
1909
+ return n;
1893
1910
  }
1894
1911
  i.findByType = t;
1895
- })(Se || (Se = {}));
1896
- var Me;
1912
+ })(Me || (Me = {}));
1913
+ var be;
1897
1914
  ((i) => {
1898
1915
  function e(r, s) {
1899
- const o = r.getLength();
1900
- for (let a = 0; a < o; a++)
1916
+ const n = r.getLength();
1917
+ for (let a = 0; a < n; a++)
1901
1918
  if (r.getAt(a) === s)
1902
1919
  return a;
1903
1920
  return -1;
1904
1921
  }
1905
1922
  i.indexOf = e;
1906
1923
  function t(r, s) {
1907
- const o = e(r, s);
1908
- if (o !== -1)
1909
- return r.removeAt(o);
1924
+ const n = e(r, s);
1925
+ if (n !== -1)
1926
+ return r.removeAt(n);
1910
1927
  }
1911
1928
  i.remove = t;
1912
- })(Me || (Me = {}));
1913
- class It {
1929
+ })(be || (be = {}));
1930
+ class Lt {
1914
1931
  constructor(e, t) {
1915
1932
  h(this, "eventMap", /* @__PURE__ */ new Map());
1916
1933
  h(this, "target", void 0);
@@ -1920,20 +1937,20 @@ class It {
1920
1937
  return this.target = e, this;
1921
1938
  }
1922
1939
  }
1923
- const ct = class extends It {
1940
+ const pt = class extends Lt {
1924
1941
  addEventListener(e, t) {
1925
1942
  const r = _e(e, t);
1926
1943
  if (this.eventMap.get(r)) {
1927
1944
  console.warn("listener已经添加过了", r, t);
1928
1945
  return;
1929
1946
  }
1930
- const s = this.inner.addListener(ct.EVENT_TYPE_MAP[e] || e, (o) => {
1947
+ const s = this.inner.addListener(pt.EVENT_TYPE_MAP[e] || e, (n) => {
1931
1948
  const a = {
1932
1949
  type: e,
1933
1950
  target: this.target,
1934
- originalEvent: o
1951
+ originalEvent: n
1935
1952
  };
1936
- o != null && o.latLng && (a.position = y.fromGoogle(o.latLng, this.coordTypeSupplier.coordType)), t.call(this.target, a);
1953
+ n != null && n.latLng && (a.position = y.fromGoogle(n.latLng, this.coordTypeSupplier.coordType)), t.call(this.target, a);
1937
1954
  });
1938
1955
  this.eventMap.set(r, s);
1939
1956
  }
@@ -1942,9 +1959,9 @@ const ct = class extends It {
1942
1959
  s ? (s.remove(), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, t);
1943
1960
  }
1944
1961
  };
1945
- let K = ct;
1962
+ let q = pt;
1946
1963
  // 事件类型映射: tg => google
1947
- h(K, "EVENT_TYPE_MAP", {
1964
+ h(q, "EVENT_TYPE_MAP", {
1948
1965
  "center-changed": "center_changed",
1949
1966
  "zoom-changed": "zoom_changed",
1950
1967
  "map-type-changed": "maptypeid_changed",
@@ -1955,29 +1972,29 @@ h(K, "EVENT_TYPE_MAP", {
1955
1972
  "map-mouseup": "mouseup",
1956
1973
  "map-dblclick": "dblclick"
1957
1974
  });
1958
- const Te = class extends It {
1975
+ const Oe = class extends Lt {
1959
1976
  addEventListener(e, t) {
1960
1977
  const r = _e(e, t);
1961
1978
  if (this.eventMap.get(r)) {
1962
1979
  console.warn("listener已经添加过了", r, t);
1963
1980
  return;
1964
1981
  }
1965
- const s = (o) => {
1982
+ const s = (n) => {
1966
1983
  const a = {
1967
1984
  type: e,
1968
1985
  target: this.target,
1969
- originalEvent: o
1986
+ originalEvent: n
1970
1987
  };
1971
- o.point && (a.position = y.fromBaidu(o.point, this.coordTypeSupplier.coordType)), t.call(this.target, a);
1988
+ n.point && (a.position = y.fromBaidu(n.point, this.coordTypeSupplier.coordType)), t.call(this.target, a);
1972
1989
  };
1973
- this.inner.addEventListener(Te.EVENT_TYPE_MAP[e] || e, s), this.eventMap.set(r, s);
1990
+ this.inner.addEventListener(Oe.EVENT_TYPE_MAP[e] || e, s), this.eventMap.set(r, s);
1974
1991
  }
1975
1992
  removeEventListener(e, t) {
1976
1993
  const r = _e(e, t), s = this.eventMap.get(r);
1977
- s ? (this.inner.removeEventListener(Te.EVENT_TYPE_MAP[e] || e, s), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, t);
1994
+ s ? (this.inner.removeEventListener(Oe.EVENT_TYPE_MAP[e] || e, s), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, t);
1978
1995
  }
1979
1996
  };
1980
- let J = Te;
1997
+ let J = Oe;
1981
1998
  // cSpell:words clickclose
1982
1999
  // 事件类型映射, tg => baidu
1983
2000
  h(J, "EVENT_TYPE_MAP", {
@@ -1986,7 +2003,7 @@ h(J, "EVENT_TYPE_MAP", {
1986
2003
  "zoom-changed": "zoomend",
1987
2004
  "map-type-changed": "maptypechange"
1988
2005
  });
1989
- class xr {
2006
+ class Tr {
1990
2007
  constructor() {
1991
2008
  h(this, "typeMap", /* @__PURE__ */ new Map());
1992
2009
  }
@@ -1996,7 +2013,7 @@ class xr {
1996
2013
  }
1997
2014
  removeEventListener(e, t) {
1998
2015
  const r = this.typeMap.get(e);
1999
- r && Se.remove(r, t);
2016
+ r && Me.remove(r, t);
2000
2017
  }
2001
2018
  hasListener(e) {
2002
2019
  const t = this.typeMap.get(e);
@@ -2007,7 +2024,7 @@ class xr {
2007
2024
  t && t.forEach((r) => r.call(e.target, e));
2008
2025
  }
2009
2026
  }
2010
- class Pt {
2027
+ class Bt {
2011
2028
  constructor(e, t, r, s) {
2012
2029
  h(this, "addEventListener");
2013
2030
  h(this, "removeEventListener");
@@ -2017,9 +2034,9 @@ class Pt {
2017
2034
  this.map.removeOverlay(this);
2018
2035
  }
2019
2036
  }
2020
- class Ze extends Pt {
2037
+ class je extends Bt {
2021
2038
  constructor(e, t, r) {
2022
- super(e, t, r, new K(e, r));
2039
+ super(e, t, r, new q(e, r));
2023
2040
  }
2024
2041
  isVisible() {
2025
2042
  return this.innerOverlay.getVisible();
@@ -2028,7 +2045,7 @@ class Ze extends Pt {
2028
2045
  this.innerOverlay.setVisible(e);
2029
2046
  }
2030
2047
  }
2031
- class Oe extends Pt {
2048
+ class Ce extends Bt {
2032
2049
  constructor(e, t, r) {
2033
2050
  super(e, t, r, new J(e, r));
2034
2051
  }
@@ -2047,7 +2064,7 @@ class Oe extends Pt {
2047
2064
  return e !== void 0 && (e || this.setVisible(!1)), this;
2048
2065
  }
2049
2066
  }
2050
- class Ge extends Oe {
2067
+ class We extends Ce {
2051
2068
  constructor(e, t, r, s) {
2052
2069
  super(e, t, r), this.state = s;
2053
2070
  }
@@ -2073,7 +2090,7 @@ class Ge extends Oe {
2073
2090
  this.innerOverlay.setFillOpacity(e);
2074
2091
  }
2075
2092
  }
2076
- class je extends Ze {
2093
+ class Ve extends je {
2077
2094
  isEditable() {
2078
2095
  return this.innerOverlay.getEditable();
2079
2096
  }
@@ -2096,7 +2113,7 @@ class je extends Ze {
2096
2113
  this.innerOverlay.setOptions({ fillOpacity: e });
2097
2114
  }
2098
2115
  }
2099
- class We extends Ge {
2116
+ class He extends We {
2100
2117
  static create(e) {
2101
2118
  const t = this.coordType, r = new BMap.Polyline(e.path.map((s) => s.toBaidu(t)), {
2102
2119
  enableClicking: e.clickable,
@@ -2105,7 +2122,7 @@ class We extends Ge {
2105
2122
  strokeOpacity: e.strokeOpacity,
2106
2123
  strokeWeight: e.strokeWeight
2107
2124
  });
2108
- return new We(r, t, this, { editable: e.editable === !0 }).visibleOptionInternal(e.visible);
2125
+ return new He(r, t, this, { editable: e.editable === !0 }).visibleOptionInternal(e.visible);
2109
2126
  }
2110
2127
  getPath() {
2111
2128
  return this.innerOverlay.getPath().map((e) => y.fromBaidu(e, this.coordType));
@@ -2114,7 +2131,7 @@ class We extends Ge {
2114
2131
  this.coordType = this.map.coordType, this.innerOverlay.setPath(e.map((t) => t.toBaidu(this.coordType)));
2115
2132
  }
2116
2133
  }
2117
- class Ve extends je {
2134
+ class Fe extends Ve {
2118
2135
  static create(e) {
2119
2136
  const t = this.coordType, r = new google.maps.Polyline({
2120
2137
  path: e.path.map((s) => s.toGoogle(t)),
@@ -2125,7 +2142,7 @@ class Ve extends je {
2125
2142
  strokeWeight: e.strokeWeight,
2126
2143
  visible: e.visible
2127
2144
  });
2128
- return new Ve(r, t, this);
2145
+ return new Fe(r, t, this);
2129
2146
  }
2130
2147
  getPath() {
2131
2148
  const e = [];
@@ -2137,11 +2154,11 @@ class Ve extends je {
2137
2154
  this.coordType = this.map.coordType, this.innerOverlay.setPath(e.map((t) => t.toGoogle(this.coordType)));
2138
2155
  }
2139
2156
  }
2140
- class He extends Ge {
2157
+ class Ue extends We {
2141
2158
  static create(e) {
2142
2159
  const t = this.coordType;
2143
2160
  e.paths.length > 1 && console.warn("baidu不支持多path, 只会显示paths[0]");
2144
- const r = e.paths[0] || [], s = new BMap.Polygon(r.map((o) => o.toBaidu(t)), {
2161
+ const r = e.paths[0] || [], s = new BMap.Polygon(r.map((n) => n.toBaidu(t)), {
2145
2162
  enableClicking: e.clickable,
2146
2163
  enableEditing: e.editable,
2147
2164
  strokeColor: e.strokeColor,
@@ -2150,7 +2167,7 @@ class He extends Ge {
2150
2167
  fillColor: e.fillColor,
2151
2168
  fillOpacity: e.fillOpacity
2152
2169
  });
2153
- return new He(s, t, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
2170
+ return new Ue(s, t, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
2154
2171
  }
2155
2172
  getPaths() {
2156
2173
  return [this.innerOverlay.getPath().map((e) => y.fromBaidu(e, this.coordType))];
@@ -2159,10 +2176,10 @@ class He extends Ge {
2159
2176
  e.length > 1 && console.warn("baidu不支持多path, 只会显示paths[0]"), this.coordType = this.map.coordType, this.innerOverlay.setPath((e[0] || []).map((t) => t.toBaidu(this.coordType)));
2160
2177
  }
2161
2178
  }
2162
- class Fe extends je {
2179
+ class Ye extends Ve {
2163
2180
  static create(e) {
2164
2181
  const t = this.coordType, r = new google.maps.Polygon({
2165
- paths: e.paths.map((s) => s.map((o) => o.toGoogle(t))),
2182
+ paths: e.paths.map((s) => s.map((n) => n.toGoogle(t))),
2166
2183
  clickable: e.clickable,
2167
2184
  editable: e.editable,
2168
2185
  strokeColor: e.strokeColor,
@@ -2172,14 +2189,14 @@ class Fe extends je {
2172
2189
  fillOpacity: e.fillOpacity,
2173
2190
  visible: e.visible
2174
2191
  });
2175
- return new Fe(r, t, this);
2192
+ return new Ye(r, t, this);
2176
2193
  }
2177
2194
  getPaths() {
2178
2195
  const e = this.innerOverlay.getPaths(), t = [];
2179
2196
  return e.forEach((r) => {
2180
2197
  const s = [];
2181
- t.push(s), r.forEach((o) => {
2182
- s.push(y.fromGoogle(o, this.coordType));
2198
+ t.push(s), r.forEach((n) => {
2199
+ s.push(y.fromGoogle(n, this.coordType));
2183
2200
  });
2184
2201
  }), t;
2185
2202
  }
@@ -2187,7 +2204,7 @@ class Fe extends je {
2187
2204
  this.coordType = this.map.coordType, this.innerOverlay.setPaths(e.map((t) => t.map((r) => r.toGoogle(this.coordType))));
2188
2205
  }
2189
2206
  }
2190
- class Ue extends Ge {
2207
+ class Ke extends We {
2191
2208
  static create(e) {
2192
2209
  const t = this.coordType, r = new BMap.Circle(e.center.toBaidu(t), e.radius, {
2193
2210
  enableClicking: e.clickable,
@@ -2198,7 +2215,7 @@ class Ue extends Ge {
2198
2215
  fillColor: e.fillColor,
2199
2216
  fillOpacity: e.fillOpacity
2200
2217
  });
2201
- return new Ue(r, t, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
2218
+ return new Ke(r, t, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
2202
2219
  }
2203
2220
  setCenter(e) {
2204
2221
  this.coordType = this.map.coordType, this.innerOverlay.setCenter(e.toBaidu(this.coordType));
@@ -2213,7 +2230,7 @@ class Ue extends Ge {
2213
2230
  return this.innerOverlay.getRadius();
2214
2231
  }
2215
2232
  }
2216
- class Ye extends je {
2233
+ class qe extends Ve {
2217
2234
  static create(e) {
2218
2235
  const t = this.coordType, r = new google.maps.Circle({
2219
2236
  center: e.center.toGoogle(t),
@@ -2227,7 +2244,7 @@ class Ye extends je {
2227
2244
  fillOpacity: e.fillOpacity,
2228
2245
  visible: e.visible
2229
2246
  });
2230
- return new Ye(r, t, this);
2247
+ return new qe(r, t, this);
2231
2248
  }
2232
2249
  setCenter(e) {
2233
2250
  this.coordType = this.map.coordType, this.innerOverlay.setCenter(e.toGoogle(this.coordType));
@@ -2242,25 +2259,25 @@ class Ye extends je {
2242
2259
  return this.innerOverlay.getRadius();
2243
2260
  }
2244
2261
  }
2245
- class ft {
2262
+ class vt {
2246
2263
  /**
2247
2264
  * `keys`和`values`数组中可以有相同的值, 若存在相同值, 则index越小的优先级越高
2248
2265
  */
2249
2266
  constructor(e, t) {
2250
2267
  h(this, "keyToValue", /* @__PURE__ */ new Map());
2251
2268
  h(this, "valueToKey", /* @__PURE__ */ new Map());
2252
- ne(e.length === t.length);
2269
+ oe(e.length === t.length);
2253
2270
  for (let r = e.length - 1; r >= 0; r--)
2254
2271
  this.keyToValue.set(e[r], t[r]), this.valueToKey.set(t[r], e[r]);
2255
2272
  }
2256
2273
  toKey(e) {
2257
- return this.valueToKey.get(e) ?? I();
2274
+ return this.valueToKey.get(e) ?? x();
2258
2275
  }
2259
2276
  toValue(e) {
2260
- return this.keyToValue.get(e) ?? I();
2277
+ return this.keyToValue.get(e) ?? x();
2261
2278
  }
2262
2279
  }
2263
- class Er {
2280
+ class Or {
2264
2281
  constructor(e, t = 10) {
2265
2282
  h(this, "map", /* @__PURE__ */ new Map());
2266
2283
  this.values = e, this.maxSize4Debug = t;
@@ -2286,10 +2303,10 @@ class Er {
2286
2303
  return this.getValueMap(e).get(t);
2287
2304
  }
2288
2305
  get(e, t) {
2289
- return this.getOrNull(e, t) ?? I(`key(${t})不存在与valueMap(${this.getValueMap(e)})中`);
2306
+ return this.getOrNull(e, t) ?? x(`key(${t})不存在与valueMap(${this.getValueMap(e)})中`);
2290
2307
  }
2291
2308
  }
2292
- class yt {
2309
+ class _t {
2293
2310
  constructor(e) {
2294
2311
  h(this, "value");
2295
2312
  this.creator = e;
@@ -2298,7 +2315,7 @@ class yt {
2298
2315
  return this.value === void 0 && (this.value = this.creator()), this.value;
2299
2316
  }
2300
2317
  }
2301
- var x = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-center", i.TOP_RIGHT = "top-right", i.BOTTOM_LEFT = "bottom-left", i.BOTTOM_CENTER = "bottom-center", i.BOTTOM_RIGHT = "bottom-right", i.LEFT_TOP = "left-top", i.LEFT_CENTER = "left-center", i.LEFT_BOTTOM = "left-bottom", i.RIGHT_TOP = "right-top", i.RIGHT_CENTER = "right-center", i.RIGHT_BOTTOM = "right-bottom", i))(x || {}), P;
2318
+ var E = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-center", i.TOP_RIGHT = "top-right", i.BOTTOM_LEFT = "bottom-left", i.BOTTOM_CENTER = "bottom-center", i.BOTTOM_RIGHT = "bottom-right", i.LEFT_TOP = "left-top", i.LEFT_CENTER = "left-center", i.LEFT_BOTTOM = "left-bottom", i.RIGHT_TOP = "right-top", i.RIGHT_CENTER = "right-center", i.RIGHT_BOTTOM = "right-bottom", i))(E || {}), P;
2302
2319
  ((i) => {
2303
2320
  let e, t;
2304
2321
  const r = [
@@ -2317,7 +2334,7 @@ var x = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
2317
2334
  /* RIGHT_BOTTOM */
2318
2335
  ];
2319
2336
  function s() {
2320
- return e || (e = new ft(r, [
2337
+ return e || (e = new vt(r, [
2321
2338
  /* | @tg/map |名字相同| baidu | */
2322
2339
  /* TOP_LEFT = */
2323
2340
  BMAP_ANCHOR_TOP_LEFT,
@@ -2346,8 +2363,8 @@ var x = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
2346
2363
  ])), e;
2347
2364
  }
2348
2365
  i.getBaidu = s;
2349
- function o() {
2350
- return t || (t = new ft(r, [
2366
+ function n() {
2367
+ return t || (t = new vt(r, [
2351
2368
  google.maps.ControlPosition.TOP_LEFT,
2352
2369
  google.maps.ControlPosition.TOP_CENTER,
2353
2370
  google.maps.ControlPosition.TOP_RIGHT,
@@ -2362,18 +2379,18 @@ var x = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
2362
2379
  google.maps.ControlPosition.RIGHT_BOTTOM
2363
2380
  ])), t;
2364
2381
  }
2365
- i.getGoogle = o;
2382
+ i.getGoogle = n;
2366
2383
  })(P || (P = {}));
2367
- class kr {
2384
+ class Cr {
2368
2385
  constructor(e) {
2369
2386
  /** 实际添加到地图中的control对象 */
2370
2387
  h(this, "inner");
2371
2388
  this.position = e;
2372
2389
  }
2373
2390
  }
2374
- class Lt {
2391
+ class St {
2375
2392
  }
2376
- class Ke extends Lt {
2393
+ class Xe extends St {
2377
2394
  constructor(e, t) {
2378
2395
  super(), this.inner = e, this.position = t;
2379
2396
  }
@@ -2396,7 +2413,7 @@ class Ke extends Lt {
2396
2413
  e.innerMap.removeControl(this.inner);
2397
2414
  }
2398
2415
  }
2399
- class qe extends Lt {
2416
+ class Je extends St {
2400
2417
  constructor(t, r) {
2401
2418
  super();
2402
2419
  h(this, "visible", !1);
@@ -2433,8 +2450,8 @@ class qe extends Lt {
2433
2450
  });
2434
2451
  }
2435
2452
  }
2436
- var $e = /* @__PURE__ */ ((i) => (i.normal = "normal", i.satellite = "satellite", i.hybrid = "hybrid", i))($e || {});
2437
- class E {
2453
+ var Ae = /* @__PURE__ */ ((i) => (i.normal = "normal", i.satellite = "satellite", i.hybrid = "hybrid", i))(Ae || {});
2454
+ class k {
2438
2455
  constructor(e, t, r, s) {
2439
2456
  this.id = e, this.baidu = t, this.google = r, this.googleCoordType = s;
2440
2457
  }
@@ -2442,7 +2459,7 @@ class E {
2442
2459
  return this.id;
2443
2460
  }
2444
2461
  getBaiduCoordType() {
2445
- return Y.bd09;
2462
+ return K.bd09;
2446
2463
  }
2447
2464
  asBaiduMapType() {
2448
2465
  return this.baidu();
@@ -2455,13 +2472,13 @@ class E {
2455
2472
  return this.google();
2456
2473
  }
2457
2474
  asGoogleMapType() {
2458
- Jt("google的内置地图没有对应的实例");
2475
+ Kt("google的内置地图没有对应的实例");
2459
2476
  }
2460
2477
  }
2461
- class Ir {
2478
+ class wr {
2462
2479
  constructor() {
2463
- h(this, "baiduCache", new yt(() => new BMap.TrafficLayer()));
2464
- h(this, "googleCache", new yt(() => new google.maps.TrafficLayer()));
2480
+ h(this, "baiduCache", new _t(() => new BMap.TrafficLayer()));
2481
+ h(this, "googleCache", new _t(() => new google.maps.TrafficLayer()));
2465
2482
  }
2466
2483
  asBaiduLayer() {
2467
2484
  return this.baiduCache.get();
@@ -2470,33 +2487,33 @@ class Ir {
2470
2487
  return this.googleCache.get();
2471
2488
  }
2472
2489
  }
2473
- var k;
2490
+ var I;
2474
2491
  ((i) => {
2475
- i.NORMAL = new E("normal", () => BMAP_NORMAL_MAP, () => google.maps.MapTypeId.ROADMAP, Y.gcj02), i.SATELLITE = new E("satellite", () => BMAP_SATELLITE_MAP, () => google.maps.MapTypeId.SATELLITE, Y.wgs84), i.HYBRID = new E("hybrid", () => BMAP_HYBRID_MAP, () => google.maps.MapTypeId.HYBRID, Y.gcj02), i.TERRAIN = new E("terrain", () => (
2492
+ i.NORMAL = new k("normal", () => BMAP_NORMAL_MAP, () => google.maps.MapTypeId.ROADMAP, K.gcj02), i.SATELLITE = new k("satellite", () => BMAP_SATELLITE_MAP, () => google.maps.MapTypeId.SATELLITE, K.wgs84), i.HYBRID = new k("hybrid", () => BMAP_HYBRID_MAP, () => google.maps.MapTypeId.HYBRID, K.gcj02), i.TERRAIN = new k("terrain", () => (
2476
2493
  /* 三维 */
2477
2494
  BMAP_PERSPECTIVE_MAP
2478
2495
  ), () => (
2479
2496
  /* 地形 */
2480
2497
  google.maps.MapTypeId.TERRAIN
2481
- ), Y.wgs84), i.BUILD_IN_MAP_TYPES = new Er([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
2482
- })(k || (k = {}));
2483
- var Bt = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(Bt || {});
2484
- const St = [k.NORMAL, k.SATELLITE, k.HYBRID];
2485
- class Xe extends Ke {
2498
+ ), K.wgs84), i.BUILD_IN_MAP_TYPES = new Or([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
2499
+ })(I || (I = {}));
2500
+ var $t = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))($t || {});
2501
+ const At = [I.NORMAL, I.SATELLITE, I.HYBRID];
2502
+ class Qe extends Xe {
2486
2503
  static create(e) {
2487
- const t = e.mapTypes ?? St, r = {
2504
+ const t = e.mapTypes ?? At, r = {
2488
2505
  default: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
2489
2506
  horizontal: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
2490
2507
  dropdown: BMAP_MAPTYPE_CONTROL_DROPDOWN
2491
2508
  }, s = new BMap.MapTypeControl({
2492
2509
  type: e.type && r[e.type],
2493
- mapTypes: t.map((o) => o.asBaiduMapType())
2510
+ mapTypes: t.map((n) => n.asBaiduMapType())
2494
2511
  });
2495
- return e.position && s.setAnchor(P.getBaidu().toValue(e.position)), new Xe(s, e.position);
2512
+ return e.position && s.setAnchor(P.getBaidu().toValue(e.position)), new Qe(s, e.position);
2496
2513
  }
2497
2514
  }
2498
- const X = class extends qe {
2499
- constructor(e = "default", t = x.TOP_LEFT, r = St) {
2515
+ const X = class extends Je {
2516
+ constructor(e = "default", t = E.TOP_LEFT, r = At) {
2500
2517
  super("mapType", t), this.type = e, this.mapTypes = r, X.type2google || (X.type2google = {
2501
2518
  default: google.maps.MapTypeControlStyle.DEFAULT,
2502
2519
  horizontal: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
@@ -2508,57 +2525,57 @@ const X = class extends qe {
2508
2525
  }
2509
2526
  onCreateOptions() {
2510
2527
  const e = super.onCreateOptions();
2511
- return e.style = X.type2google[this.type], e.mapTypeIds = this.mapTypes.map((t) => t instanceof E ? t.getGoogleMapTypeId() : t.id), e;
2528
+ return e.style = X.type2google[this.type], e.mapTypeIds = this.mapTypes.map((t) => t instanceof k ? t.getGoogleMapTypeId() : t.id), e;
2512
2529
  }
2513
2530
  addTo(e) {
2514
2531
  super.addTo(e), this.mapTypes.forEach((t) => {
2515
- t instanceof E || e.innerMap.mapTypes.set(t.id, t.asGoogleMapType());
2532
+ t instanceof k || e.innerMap.mapTypes.set(t.id, t.asGoogleMapType());
2516
2533
  });
2517
2534
  }
2518
2535
  };
2519
2536
  let me = X;
2520
2537
  h(me, "type2google");
2521
- class Je extends Ke {
2538
+ class et extends Xe {
2522
2539
  static create(e) {
2523
2540
  const t = new BMap.NavigationControl({
2524
2541
  type: BMAP_NAVIGATION_CONTROL_ZOOM,
2525
2542
  // enableGeolocation: true,
2526
2543
  anchor: e.position && P.getBaidu().toValue(e.position)
2527
2544
  });
2528
- return new Je(t, e.position);
2545
+ return new et(t, e.position);
2529
2546
  }
2530
2547
  }
2531
- class Qe extends qe {
2548
+ class tt extends Je {
2532
2549
  static create(e) {
2533
- return new Qe(e.position);
2550
+ return new tt(e.position);
2534
2551
  }
2535
- constructor(e = x.RIGHT_BOTTOM) {
2552
+ constructor(e = E.RIGHT_BOTTOM) {
2536
2553
  super("zoom", e);
2537
2554
  }
2538
2555
  }
2539
- class et extends Ke {
2556
+ class rt extends Xe {
2540
2557
  static create(e) {
2541
2558
  const t = new BMap.ScaleControl({
2542
2559
  anchor: e.position && P.getBaidu().toValue(e.position)
2543
2560
  });
2544
- return new et(t, e.position);
2561
+ return new rt(t, e.position);
2545
2562
  }
2546
2563
  }
2547
- class tt extends qe {
2564
+ class it extends Je {
2548
2565
  static create(e) {
2549
- return new tt(e.position);
2566
+ return new it(e.position);
2550
2567
  }
2551
- constructor(e = x.BOTTOM_RIGHT) {
2568
+ constructor(e = E.BOTTOM_RIGHT) {
2552
2569
  super("scale", e);
2553
2570
  }
2554
2571
  }
2555
- var Ae;
2572
+ var ze;
2556
2573
  ((i) => {
2557
2574
  function e(t) {
2558
2575
  return t.scrollWidth > t.clientWidth || t.scrollHeight > t.clientHeight;
2559
2576
  }
2560
2577
  i.isScrollable = e;
2561
- })(Ae || (Ae = {}));
2578
+ })(ze || (ze = {}));
2562
2579
  var ee;
2563
2580
  ((i) => {
2564
2581
  function e(r) {
@@ -2582,7 +2599,7 @@ var ee;
2582
2599
  }
2583
2600
  i.toBaidu = t;
2584
2601
  })(ee || (ee = {}));
2585
- class he extends Oe {
2602
+ class he extends Ce {
2586
2603
  constructor(e, t, r, s) {
2587
2604
  super(e, t, r), this.state = s;
2588
2605
  }
@@ -2595,10 +2612,10 @@ class he extends Oe {
2595
2612
  // baidu的raiseOnDrag属性, 默认为false, 而我们的options.crossOnDrag默认为true, 故这里需要转换下
2596
2613
  raiseOnDrag: e.crossOnDrag === void 0 ? !0 : e.crossOnDrag,
2597
2614
  draggingCursor: e.cursor
2598
- }, o = new BMap.Marker(e.position.toBaidu(t), s);
2599
- e.zIndex !== void 0 && o.setZIndex(e.zIndex);
2615
+ }, n = new BMap.Marker(e.position.toBaidu(t), s);
2616
+ e.zIndex !== void 0 && n.setZIndex(e.zIndex);
2600
2617
  const a = e.clickable === void 0 ? !0 : e.clickable, g = !!e.draggable;
2601
- return new he(o, t, this, { clickable: a, draggable: g, zIndex: e.zIndex }).visibleOptionInternal(e.visible);
2618
+ return new he(n, t, this, { clickable: a, draggable: g, zIndex: e.zIndex }).visibleOptionInternal(e.visible);
2602
2619
  }
2603
2620
  getPosition() {
2604
2621
  return y.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
@@ -2649,7 +2666,7 @@ class he extends Oe {
2649
2666
  return (e = this.innerOverlay.getLabel()) == null ? void 0 : e.__label__;
2650
2667
  }
2651
2668
  }
2652
- class rt extends Ze {
2669
+ class st extends je {
2653
2670
  constructor() {
2654
2671
  super(...arguments);
2655
2672
  h(this, "label");
@@ -2658,7 +2675,7 @@ class rt extends Ze {
2658
2675
  h(this, "labelMapChangedListener");
2659
2676
  }
2660
2677
  static create(t) {
2661
- const r = this.coordType, s = t.icon, o = {
2678
+ const r = this.coordType, s = t.icon, n = {
2662
2679
  position: t.position.toGoogle(r),
2663
2680
  title: t.title,
2664
2681
  zIndex: t.zIndex,
@@ -2672,7 +2689,7 @@ class rt extends Ze {
2672
2689
  // InfoWindow相对marker的position的偏移量, 若不指定, 则偏移到marker的icon的上部中央
2673
2690
  anchorPoint: new google.maps.Point(0, 0)
2674
2691
  };
2675
- return new rt(new google.maps.Marker(o), r, this);
2692
+ return new st(new google.maps.Marker(n), r, this);
2676
2693
  }
2677
2694
  getPosition() {
2678
2695
  return y.fromGoogle(this.innerOverlay.getPosition(), this.coordType);
@@ -2717,15 +2734,15 @@ class rt extends Ze {
2717
2734
  t.innerOverlay.setPosition(this.innerOverlay.getPosition());
2718
2735
  }, s = () => {
2719
2736
  t.innerOverlay.setVisible(this.innerOverlay.getVisible());
2720
- }, o = () => {
2737
+ }, n = () => {
2721
2738
  this.innerOverlay.getMap() ? this.map.addOverlay(t) : this.map.removeOverlay(t);
2722
2739
  };
2723
- o(), r(), s(), this.label = t, this.labelMapChangedListener = this.innerOverlay.addListener("map_changed", o), this.labelPositionListener = this.innerOverlay.addListener("position_changed", r), this.labelVisibleListener = this.innerOverlay.addListener("visible_changed", s);
2740
+ n(), r(), s(), this.label = t, this.labelMapChangedListener = this.innerOverlay.addListener("map_changed", n), this.labelPositionListener = this.innerOverlay.addListener("position_changed", r), this.labelVisibleListener = this.innerOverlay.addListener("visible_changed", s);
2724
2741
  } else
2725
2742
  this.label = void 0, this.labelPositionListener = void 0, this.labelVisibleListener = void 0, this.labelMapChangedListener = void 0;
2726
2743
  }
2727
2744
  }
2728
- class it {
2745
+ class nt {
2729
2746
  constructor(e) {
2730
2747
  this.delegate = e, this.delegate.setTarget(this);
2731
2748
  }
@@ -2736,7 +2753,7 @@ class it {
2736
2753
  this.delegate.removeEventListener(e, t);
2737
2754
  }
2738
2755
  }
2739
- class st extends it {
2756
+ class ot extends nt {
2740
2757
  constructor(e, t, r) {
2741
2758
  super(new J(e, t)), this.inner = e, this.map = t, this.state = r;
2742
2759
  }
@@ -2746,7 +2763,7 @@ class st extends it {
2746
2763
  offset: e.offset && new BMap.Size(e.offset.x, e.offset.y),
2747
2764
  enableAutoPan: !e.disableAutoPan
2748
2765
  });
2749
- return new st(r, this, { position: t });
2766
+ return new ot(r, this, { position: t });
2750
2767
  }
2751
2768
  isOpen() {
2752
2769
  return this.inner.isOpen();
@@ -2765,10 +2782,10 @@ class st extends it {
2765
2782
  this.state.position = e, this.inner.isOpen() && this.open();
2766
2783
  }
2767
2784
  }
2768
- class ot extends it {
2785
+ class at extends nt {
2769
2786
  constructor(t, r) {
2770
- super(new K(t, r));
2771
- h(this, "eventHub", new xr());
2787
+ super(new q(t, r));
2788
+ h(this, "eventHub", new Tr());
2772
2789
  h(this, "isOpened", !1);
2773
2790
  this.inner = t, this.map = r, t.addListener("closeclick", () => {
2774
2791
  this.isOpened = !1, this.eventHub.hasListener("close") && this.eventHub.notify({ type: "close", target: this });
@@ -2785,7 +2802,7 @@ class ot extends it {
2785
2802
  position: r.toGoogle(this.coordType),
2786
2803
  disableAutoPan: t.disableAutoPan
2787
2804
  });
2788
- return new ot(s, this);
2805
+ return new at(s, this);
2789
2806
  }
2790
2807
  isOpen() {
2791
2808
  return this.isOpened;
@@ -2827,16 +2844,16 @@ var ce;
2827
2844
  ((i) => {
2828
2845
  i.ZERO = { x: 0, y: 0 };
2829
2846
  })(ce || (ce = {}));
2830
- let Ee;
2831
- function Pr(i, e, t, r) {
2832
- return Ee || (Ee = Lr()), new Ee(i, e, t, r);
2847
+ let ke;
2848
+ function xr(i, e, t, r) {
2849
+ return ke || (ke = Er()), new ke(i, e, t, r);
2833
2850
  }
2834
- function Lr() {
2851
+ function Er() {
2835
2852
  return class extends google.maps.OverlayView {
2836
- constructor(t, r, s, o) {
2853
+ constructor(t, r, s, n) {
2837
2854
  super();
2838
2855
  h(this, "container");
2839
- this.position = r, this.offset = s, this.zIndex = o, this.container = document.createElement("div"), this.container.className = "label-container", this.container.style.position = "absolute", o && this.setZIndex(o), this.container.addEventListener("click", () => {
2856
+ this.position = r, this.offset = s, this.zIndex = n, this.container = document.createElement("div"), this.container.className = "label-container", this.container.style.position = "absolute", n && this.setZIndex(n), this.container.addEventListener("click", () => {
2840
2857
  google.maps.event.trigger(this, "click");
2841
2858
  }), this.setElement(t);
2842
2859
  }
@@ -2857,8 +2874,8 @@ function Lr() {
2857
2874
  if (this.container.style.display = this.position ? "block" : "none", this.position) {
2858
2875
  const s = this.getProjection();
2859
2876
  if (s) {
2860
- const o = s.fromLatLngToDivPixel(this.position);
2861
- this.container.style.left = `${o.x + (((t = this.offset) == null ? void 0 : t.x) ?? 0)}px`, this.container.style.top = `${o.y + (((r = this.offset) == null ? void 0 : r.y) ?? 0)}px`;
2877
+ const n = s.fromLatLngToDivPixel(this.position);
2878
+ this.container.style.left = `${n.x + (((t = this.offset) == null ? void 0 : t.x) ?? 0)}px`, this.container.style.top = `${n.y + (((r = this.offset) == null ? void 0 : r.y) ?? 0)}px`;
2862
2879
  }
2863
2880
  }
2864
2881
  }
@@ -2902,13 +2919,13 @@ var te;
2902
2919
  }
2903
2920
  i.toElement = t;
2904
2921
  })(te || (te = {}));
2905
- class nt extends Oe {
2906
- constructor(t, r, s, o) {
2922
+ class lt extends Ce {
2923
+ constructor(t, r, s, n) {
2907
2924
  super(t, r, s);
2908
2925
  h(this, "icon");
2909
2926
  h(this, "content", void 0);
2910
2927
  h(this, "contentObserver");
2911
- this.setContentInternal(o, !0);
2928
+ this.setContentInternal(n, !0);
2912
2929
  }
2913
2930
  static create(t) {
2914
2931
  var a;
@@ -2921,8 +2938,8 @@ class nt extends Oe {
2921
2938
  padding: "0px",
2922
2939
  backgroundColor: "unset"
2923
2940
  });
2924
- const o = new nt(s, r, this, t.content);
2925
- return s.__label__ = o, o;
2941
+ const n = new lt(s, r, this, t.content);
2942
+ return s.__label__ = n, n;
2926
2943
  }
2927
2944
  setContentInternal(t, r = !1) {
2928
2945
  this.content !== t && (this.contentObserver && (this.contentObserver.disconnect(), this.contentObserver = void 0), typeof t != "string" && (this.contentObserver = new MutationObserver(() => {
@@ -2961,20 +2978,20 @@ class nt extends Oe {
2961
2978
  * */
2962
2979
  attachIcon(t) {
2963
2980
  const r = this.innerOverlay.getOffset();
2964
- let s = r.width, o = r.height;
2965
- this.icon && (s -= this.icon.anchor.width, o -= this.icon.anchor.height), t && (s += t.anchor.width, o += t.anchor.height), this.innerOverlay.setOffset(new BMap.Size(s, o)), this.icon = t;
2981
+ let s = r.width, n = r.height;
2982
+ this.icon && (s -= this.icon.anchor.width, n -= this.icon.anchor.height), t && (s += t.anchor.width, n += t.anchor.height), this.innerOverlay.setOffset(new BMap.Size(s, n)), this.icon = t;
2966
2983
  }
2967
2984
  }
2968
- class at extends Ze {
2985
+ class ht extends je {
2969
2986
  static create(e) {
2970
2987
  var s;
2971
- const t = this.coordType, r = Pr(
2988
+ const t = this.coordType, r = xr(
2972
2989
  te.toElement(e.content),
2973
2990
  (s = e.position) == null ? void 0 : s.toGoogle(t),
2974
2991
  e.offset,
2975
2992
  e.zIndex
2976
2993
  );
2977
- return new at(r, t, this);
2994
+ return new ht(r, t, this);
2978
2995
  }
2979
2996
  setZIndex(e) {
2980
2997
  this.innerOverlay.setZIndex(e);
@@ -2996,18 +3013,18 @@ class at extends Ze {
2996
3013
  this.innerOverlay.setOffset(e);
2997
3014
  }
2998
3015
  }
2999
- function $t() {
3016
+ function zt() {
3000
3017
  BMap.OverlayV3 || (BMap.OverlayV3 = BMap.Overlay);
3001
3018
  }
3002
- let ke;
3003
- function Br(i, e, t, r, s, o) {
3004
- return ke || (ke = Sr()), new ke(i, e, t, r, s, o);
3019
+ let Ie;
3020
+ function kr(i, e, t, r, s, n) {
3021
+ return Ie || (Ie = Ir()), new Ie(i, e, t, r, s, n);
3005
3022
  }
3006
- function Sr() {
3007
- $t();
3023
+ function Ir() {
3024
+ zt();
3008
3025
  const i = new BMap.Point(0, 0);
3009
3026
  return class extends BMap.OverlayV3 {
3010
- constructor(r, s = i, o = ce.ZERO, a, g = 654, n = "") {
3027
+ constructor(r, s = i, n = ce.ZERO, a, g = 654, o = "") {
3011
3028
  super();
3012
3029
  // 类表达式不能有私有成员, 故改成public
3013
3030
  h(this, "container");
@@ -3015,9 +3032,9 @@ function Sr() {
3015
3032
  h(this, "inner");
3016
3033
  h(this, "map");
3017
3034
  h(this, "marker");
3018
- this.content = r, this.position = s, this.offset = o;
3035
+ this.content = r, this.position = s, this.offset = n;
3019
3036
  const l = "baidu-info-box-container";
3020
- this.container = document.createElement("div"), this.container.className = l, this.container.style.position = "absolute", this.border = document.createElement("div"), this.border.className = `${l}__border ${n}`, this.inner = document.createElement("div"), this.inner.className = l + "__inner";
3037
+ this.container = document.createElement("div"), this.container.className = l, this.container.style.position = "absolute", this.border = document.createElement("div"), this.border.className = `${l}__border ${o}`, this.inner = document.createElement("div"), this.inner.className = l + "__inner";
3021
3038
  const c = document.createElement("img");
3022
3039
  c.className = l + "__close", c.src = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224px%22%20height%3D%2224px%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22%23000000%22%3E%0A%20%20%20%20%3Cpath%20d%3D%22M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%0A%3C%2Fsvg%3E%0A", c.addEventListener("click", () => {
3023
3040
  this.close(), this.dispatchEvent({ type: "onclickclose" });
@@ -3031,8 +3048,8 @@ function Sr() {
3031
3048
  draw() {
3032
3049
  if (!this.map)
3033
3050
  return;
3034
- const r = this.marker ? this.marker.getPosition() : this.position, s = this.map.pointToOverlayPixel(r), o = s.x + this.offset.x, a = s.y + this.offset.y;
3035
- this.container.style.left = `${o}px`, this.container.style.top = `${a}px`;
3051
+ const r = this.marker ? this.marker.getPosition() : this.position, s = this.map.pointToOverlayPixel(r), n = s.x + this.offset.x, a = s.y + this.offset.y;
3052
+ this.container.style.left = `${n}px`, this.container.style.top = `${a}px`;
3036
3053
  }
3037
3054
  open(r, s) {
3038
3055
  s && s === this.marker || (this.marker && this.detachMarker(this.marker), this.marker = s, this.marker && this.attachMarker(this.marker), this.isOpen() ? this.draw() : this.marker && !this.marker.getMap() || r.addOverlay(this));
@@ -3072,13 +3089,13 @@ function Sr() {
3072
3089
  }
3073
3090
  };
3074
3091
  }
3075
- class lt extends Oe {
3092
+ class ct extends Ce {
3076
3093
  constructor(e, t, r) {
3077
3094
  super(e, t, r), this.baiduMap = r;
3078
3095
  }
3079
3096
  static create(e) {
3080
3097
  var s;
3081
- const t = this.coordType, r = Br(
3098
+ const t = this.coordType, r = kr(
3082
3099
  e.content,
3083
3100
  (s = e.position) == null ? void 0 : s.toBaidu(t),
3084
3101
  e.offset,
@@ -3086,7 +3103,7 @@ class lt extends Oe {
3086
3103
  e.maxWidth,
3087
3104
  e.borderClass
3088
3105
  );
3089
- return new lt(r, t, this);
3106
+ return new ct(r, t, this);
3090
3107
  }
3091
3108
  open(e) {
3092
3109
  this.innerOverlay.open(this.baiduMap.innerMap, e == null ? void 0 : e.innerOverlay);
@@ -3107,15 +3124,15 @@ class lt extends Oe {
3107
3124
  this.innerOverlay.setZIndex(e);
3108
3125
  }
3109
3126
  }
3110
- class ht extends it {
3127
+ class dt extends nt {
3111
3128
  constructor(e, t, r) {
3112
- super(new K(e, r)), this.inner = e, this.coordType = t, this.map = r;
3129
+ super(new q(e, r)), this.inner = e, this.coordType = t, this.map = r;
3113
3130
  }
3114
3131
  static create(e) {
3115
- var o;
3132
+ var n;
3116
3133
  const t = this.coordType, r = new google.maps.InfoWindow({
3117
3134
  content: e.content,
3118
- position: (o = e.position) == null ? void 0 : o.toGoogle(t),
3135
+ position: (n = e.position) == null ? void 0 : n.toGoogle(t),
3119
3136
  pixelOffset: e.offset && new google.maps.Size(e.offset.x, e.offset.y),
3120
3137
  zIndex: e.zIndex,
3121
3138
  maxWidth: e.maxWidth
@@ -3124,7 +3141,7 @@ class ht extends it {
3124
3141
  var g;
3125
3142
  const a = (g = e.content.parentElement) == null ? void 0 : g.parentElement;
3126
3143
  a && a.className.includes("gm-style-iw-c") && !a.className.includes(s) && (a.className += ` ${s}`);
3127
- }), new ht(r, t, this);
3144
+ }), new dt(r, t, this);
3128
3145
  }
3129
3146
  open(e) {
3130
3147
  this.inner.open(this.map.innerMap, e == null ? void 0 : e.innerOverlay);
@@ -3152,34 +3169,34 @@ class ht extends it {
3152
3169
  this.inner.setZIndex(e);
3153
3170
  }
3154
3171
  }
3155
- class $r extends Re {
3172
+ class Pr extends Ze {
3156
3173
  constructor(t, r) {
3157
3174
  var s;
3158
3175
  super(t);
3159
3176
  h(this, "buildInMapTypeId2BIMT");
3160
3177
  h(this, "baiduMapType2BIMT");
3161
3178
  h(this, "map");
3162
- h(this, "createLabel", nt.create);
3163
- h(this, "createCircle", Ue.create);
3164
- h(this, "createPolygon", He.create);
3165
- h(this, "createPolyline", We.create);
3166
- h(this, "createInfoWindow", st.create);
3167
- h(this, "createInfoBox", lt.create);
3179
+ h(this, "createLabel", lt.create);
3180
+ h(this, "createCircle", Ke.create);
3181
+ h(this, "createPolygon", Ue.create);
3182
+ h(this, "createPolyline", He.create);
3183
+ h(this, "createInfoWindow", ot.create);
3184
+ h(this, "createInfoBox", ct.create);
3168
3185
  h(this, "createMarker", he.create);
3169
- h(this, "createMapTypeControl", Xe.create);
3170
- h(this, "createZoomControl", Je.create);
3171
- h(this, "createScaleControl", et.create);
3172
- this.buildInMapTypeId2BIMT = k.BUILD_IN_MAP_TYPES.getValueMap(E.prototype.getId), this.baiduMapType2BIMT = k.BUILD_IN_MAP_TYPES.getValueMap(E.prototype.asBaiduMapType), this.map = new BMap.Map(t, {
3186
+ h(this, "createMapTypeControl", Qe.create);
3187
+ h(this, "createZoomControl", et.create);
3188
+ h(this, "createScaleControl", rt.create);
3189
+ this.buildInMapTypeId2BIMT = I.BUILD_IN_MAP_TYPES.getValueMap(k.prototype.getId), this.baiduMapType2BIMT = I.BUILD_IN_MAP_TYPES.getValueMap(k.prototype.asBaiduMapType), this.map = new BMap.Map(t, {
3173
3190
  minZoom: r.minZoom,
3174
3191
  maxZoom: r.maxZoom,
3175
3192
  mapType: r.buildInMapTypeId && ((s = this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId)) == null ? void 0 : s.asBaiduMapType()),
3176
3193
  enableMapClick: !1
3177
3194
  // 关闭底图点击功能
3178
- }), this.map.centerAndZoom(r.center.toBaidu(this.coordType), r.zoom), this.setGestureHandling(r.gestureHandling), r.infoWindowMode === "multi" && console.warn("baidu不支持多个InfoWindow, 可能会出现未知问题"), r.mapStyle && this.map.setMapStyle2(r.mapStyle.toBaidu()), this.setEventTargetDelegate(new J(this.map, this)), this.map.addEventListener("addoverlay", (o) => {
3179
- const a = o.target.__info_box__;
3195
+ }), this.map.centerAndZoom(r.center.toBaidu(this.coordType), r.zoom), this.setGestureHandling(r.gestureHandling), r.infoWindowMode === "multi" && console.warn("baidu不支持多个InfoWindow, 可能会出现未知问题"), r.mapStyle && this.map.setMapStyle2(r.mapStyle.toBaidu()), this.setEventTargetDelegate(new J(this.map, this)), this.map.addEventListener("addoverlay", (n) => {
3196
+ const a = n.target.__info_box__;
3180
3197
  a && (console.debug("add:info-box", a), this.map.addOverlay(a));
3181
- }), this.map.addEventListener("removeoverlay", (o) => {
3182
- const a = o.target.__info_box__;
3198
+ }), this.map.addEventListener("removeoverlay", (n) => {
3199
+ const a = n.target.__info_box__;
3183
3200
  a && (console.debug("remove:info-box", a), this.map.removeOverlay(a));
3184
3201
  });
3185
3202
  }
@@ -3187,7 +3204,7 @@ class $r extends Re {
3187
3204
  this.innerMap.setDefaultCursor(t);
3188
3205
  }
3189
3206
  setGestureHandling(t = N.auto) {
3190
- switch (t === N.auto && (t = this.element.parentElement && Ae.isScrollable(this.element.parentElement) ? N.cooperative : N.greedy), t) {
3207
+ switch (t === N.auto && (t = this.element.parentElement && ze.isScrollable(this.element.parentElement) ? N.cooperative : N.greedy), t) {
3191
3208
  case N.cooperative:
3192
3209
  this.map.disableScrollWheelZoom(), this.map.enableDragging(), this.map.enableDoubleClickZoom();
3193
3210
  break;
@@ -3249,14 +3266,14 @@ class $r extends Re {
3249
3266
  setBuildInMapTypeId(t) {
3250
3267
  var s;
3251
3268
  const r = (s = this.buildInMapTypeId2BIMT.get(t)) == null ? void 0 : s.asBaiduMapType();
3252
- this.map.setMapType(r ?? I("理论上来说不可能为空"));
3269
+ this.map.setMapType(r ?? x("理论上来说不可能为空"));
3253
3270
  }
3254
3271
  setMapType(t) {
3255
3272
  this.map.setMapType(t.asBaiduMapType());
3256
3273
  }
3257
3274
  getMapType() {
3258
3275
  const t = this.map.getMapType(), r = this.baiduMapType2BIMT.get(t);
3259
- return r || (t.__baidu_map_type__ ?? I("实现asBaiduMapType()时, 忘了给实例设置__baidu_map_type__?"));
3276
+ return r || (t.__baidu_map_type__ ?? x("实现asBaiduMapType()时, 忘了给实例设置__baidu_map_type__?"));
3260
3277
  }
3261
3278
  addLayer(t) {
3262
3279
  this.map.addTileLayer(t.asBaiduLayer());
@@ -3277,7 +3294,7 @@ class $r extends Re {
3277
3294
  });
3278
3295
  }
3279
3296
  getBounds() {
3280
- return W.fromBaidu(this.map.getBounds(), this.coordType);
3297
+ return j.fromBaidu(this.map.getBounds(), this.coordType);
3281
3298
  }
3282
3299
  addElementOverlay(t) {
3283
3300
  this.map.addOverlay(t.asBaidu());
@@ -3299,51 +3316,51 @@ class $r extends Re {
3299
3316
  h(this, "defaultAnchor", P.getBaidu().toValue(t.position));
3300
3317
  h(this, "defaultOffset", new BMap.Size(0, 0));
3301
3318
  }
3302
- initialize(o) {
3319
+ initialize(n) {
3303
3320
  const a = t.onCreateElement();
3304
- return o.getContainer().appendChild(a), a;
3321
+ return n.getContainer().appendChild(a), a;
3305
3322
  }
3306
3323
  };
3307
3324
  t.inner = new r(), this.map.addControl(t.inner);
3308
3325
  }
3309
3326
  }
3310
3327
  removeCustomControl(t) {
3311
- t.inner && (ne(t.inner instanceof BMap.Control, `control.inner(${t.inner})需要是BMap.Control`), this.map.removeControl(t.inner));
3328
+ t.inner && (oe(t.inner instanceof BMap.Control, `control.inner(${t.inner})需要是BMap.Control`), this.map.removeControl(t.inner));
3312
3329
  }
3313
3330
  createMarkerClusterer(t) {
3314
- return new Tr(this, t);
3331
+ return new vr(this, t);
3315
3332
  }
3316
3333
  }
3317
- class Ar extends Re {
3334
+ class Lr extends Ze {
3318
3335
  constructor(t, r) {
3319
- var o;
3336
+ var n;
3320
3337
  super(t);
3321
3338
  h(this, "buildInMapTypeId2BIMT");
3322
3339
  h(this, "googleMapTypeId2BIMT");
3323
3340
  h(this, "map");
3324
- h(this, "createLabel", at.create);
3325
- h(this, "createCircle", Ye.create);
3326
- h(this, "createPolygon", Fe.create);
3327
- h(this, "createPolyline", Ve.create);
3328
- h(this, "createInfoWindow", ot.create);
3329
- h(this, "createInfoBox", ht.create);
3330
- h(this, "createMarker", rt.create);
3341
+ h(this, "createLabel", ht.create);
3342
+ h(this, "createCircle", qe.create);
3343
+ h(this, "createPolygon", Ye.create);
3344
+ h(this, "createPolyline", Fe.create);
3345
+ h(this, "createInfoWindow", at.create);
3346
+ h(this, "createInfoBox", dt.create);
3347
+ h(this, "createMarker", st.create);
3331
3348
  h(this, "createMapTypeControl", me.create);
3332
- h(this, "createZoomControl", Qe.create);
3333
- h(this, "createScaleControl", tt.create);
3334
- this.mapOptions = r, this.buildInMapTypeId2BIMT = k.BUILD_IN_MAP_TYPES.getValueMap(E.prototype.getId), this.googleMapTypeId2BIMT = k.BUILD_IN_MAP_TYPES.getValueMap(E.prototype.getGoogleMapTypeId);
3349
+ h(this, "createZoomControl", tt.create);
3350
+ h(this, "createScaleControl", it.create);
3351
+ this.mapOptions = r, this.buildInMapTypeId2BIMT = I.BUILD_IN_MAP_TYPES.getValueMap(k.prototype.getId), this.googleMapTypeId2BIMT = I.BUILD_IN_MAP_TYPES.getValueMap(k.prototype.getGoogleMapTypeId);
3335
3352
  const s = r.buildInMapTypeId && this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId);
3336
3353
  this.map = new google.maps.Map(t, {
3337
- center: r.center.toGoogle((s ?? k.NORMAL).getGoogleCoordType()),
3354
+ center: r.center.toGoogle((s ?? I.NORMAL).getGoogleCoordType()),
3338
3355
  zoom: r.zoom,
3339
3356
  disableDefaultUI: !0,
3340
3357
  streetViewControl: !0,
3341
3358
  gestureHandling: r.gestureHandling,
3342
3359
  minZoom: r.minZoom,
3343
3360
  maxZoom: r.maxZoom,
3344
- styles: (o = r.mapStyle) == null ? void 0 : o.toGoogle(),
3361
+ styles: (n = r.mapStyle) == null ? void 0 : n.toGoogle(),
3345
3362
  mapTypeId: s == null ? void 0 : s.getGoogleMapTypeId()
3346
- }), this.setEventTargetDelegate(new K(this.map, this));
3363
+ }), this.setEventTargetDelegate(new q(this.map, this));
3347
3364
  }
3348
3365
  setDefaultCursor(t) {
3349
3366
  this.innerMap.setOptions({ draggableCursor: t });
@@ -3363,15 +3380,15 @@ class Ar extends Re {
3363
3380
  const r = this.innerMap.getProjection(), s = this.innerMap.getBounds();
3364
3381
  if (r == null || s == null)
3365
3382
  return y.ZERO;
3366
- const o = r.fromLatLngToPoint(s.getSouthWest()), a = r.fromLatLngToPoint(s.getNorthEast()), g = Math.pow(2, this.innerMap.getZoom()), n = new google.maps.Point(t.x / g + o.x, t.y / g + a.y);
3367
- return y.fromGoogle(r.fromPointToLatLng(n), this.coordType);
3383
+ const n = r.fromLatLngToPoint(s.getSouthWest()), a = r.fromLatLngToPoint(s.getNorthEast()), g = Math.pow(2, this.innerMap.getZoom()), o = new google.maps.Point(t.x / g + n.x, t.y / g + a.y);
3384
+ return y.fromGoogle(r.fromPointToLatLng(o), this.coordType);
3368
3385
  }
3369
3386
  fromLatLngToContainerPoint(t) {
3370
3387
  const r = this.innerMap.getProjection(), s = this.innerMap.getBounds();
3371
3388
  if (r == null || s == null)
3372
3389
  return ce.ZERO;
3373
- const o = r.fromLatLngToPoint(s.getSouthWest()), a = r.fromLatLngToPoint(s.getNorthEast()), g = Math.pow(2, this.innerMap.getZoom()), n = r.fromLatLngToPoint(t.toGoogle(this.coordType));
3374
- return { x: (n.x - o.x) * g, y: (n.y - a.y) * g };
3390
+ const n = r.fromLatLngToPoint(s.getSouthWest()), a = r.fromLatLngToPoint(s.getNorthEast()), g = Math.pow(2, this.innerMap.getZoom()), o = r.fromLatLngToPoint(t.toGoogle(this.coordType));
3391
+ return { x: (o.x - n.x) * g, y: (o.y - a.y) * g };
3375
3392
  }
3376
3393
  setDraggable(t) {
3377
3394
  this.innerMap.setOptions({ draggable: t });
@@ -3397,20 +3414,20 @@ class Ar extends Re {
3397
3414
  setBuildInMapTypeId(t) {
3398
3415
  var s;
3399
3416
  const r = (s = this.buildInMapTypeId2BIMT.get(t)) == null ? void 0 : s.getGoogleMapTypeId();
3400
- this.map.setMapTypeId(r ?? I("理论上来说不可能为空"));
3417
+ this.map.setMapTypeId(r ?? x("理论上来说不可能为空"));
3401
3418
  }
3402
3419
  setMapType(t) {
3403
- t instanceof E ? this.map.setMapTypeId(t.getGoogleMapTypeId()) : (this.map.mapTypes.set(t.id, t.asGoogleMapType()), this.map.setMapTypeId(t.id));
3420
+ t instanceof k ? this.map.setMapTypeId(t.getGoogleMapTypeId()) : (this.map.mapTypes.set(t.id, t.asGoogleMapType()), this.map.setMapTypeId(t.id));
3404
3421
  }
3405
3422
  getMapType() {
3406
3423
  const t = this.map.getMapTypeId(), r = this.googleMapTypeId2BIMT.get(t);
3407
- return r || (this.map.mapTypes.get(t).__google_map_type__ ?? I(`实现${t}的asGoogleMapType()时, 忘了给实例设置__google_map_type__?`));
3424
+ return r || (this.map.mapTypes.get(t).__google_map_type__ ?? x(`实现${t}的asGoogleMapType()时, 忘了给实例设置__google_map_type__?`));
3408
3425
  }
3409
3426
  addOverlayMapType(t) {
3410
3427
  this.map.overlayMapTypes.push(t.asGoogleMapType());
3411
3428
  }
3412
3429
  removeOverlayMapType(t) {
3413
- Me.remove(this.map.overlayMapTypes, t.asGoogleMapType());
3430
+ be.remove(this.map.overlayMapTypes, t.asGoogleMapType());
3414
3431
  }
3415
3432
  addLayer(t) {
3416
3433
  t.asGoogleLayer().setMap(this.map);
@@ -3429,7 +3446,7 @@ class Ar extends Re {
3429
3446
  }
3430
3447
  getBounds() {
3431
3448
  const t = this.map.getBounds();
3432
- return t ? W.fromGoogle(t, this.coordType) : W.EMPTY;
3449
+ return t ? j.fromGoogle(t, this.coordType) : j.EMPTY;
3433
3450
  }
3434
3451
  addElementOverlay(t) {
3435
3452
  t.asGoogle().setMap(this.map);
@@ -3449,14 +3466,14 @@ class Ar extends Re {
3449
3466
  removeCustomControl(t) {
3450
3467
  if (t.inner) {
3451
3468
  const r = this.map.controls[P.getGoogle().toValue(t.position)];
3452
- Me.remove(r, t.inner);
3469
+ be.remove(r, t.inner);
3453
3470
  }
3454
3471
  }
3455
3472
  createMarkerClusterer(t) {
3456
- return new Or(this, t);
3473
+ return new _r(this, t);
3457
3474
  }
3458
3475
  }
3459
- const be = ["3.0"], zr = {
3476
+ const Te = ["3.0"], Br = {
3460
3477
  baidu: {
3461
3478
  version: "3.0",
3462
3479
  // TODO: 在build时好像会被静态替换, 导致使用者不能无法设置它
@@ -3470,32 +3487,32 @@ const be = ["3.0"], zr = {
3470
3487
  language: "en-us"
3471
3488
  },
3472
3489
  here: {
3473
- version: be[0],
3490
+ version: Te[0],
3474
3491
  key: {}.VITE_APP_DEV_KEY_HERE,
3475
3492
  language: ""
3476
3493
  }
3477
3494
  };
3478
- let At;
3479
- function zt() {
3480
- return At || I("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
3495
+ let Nt;
3496
+ function Rt() {
3497
+ return Nt || x("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
3481
3498
  }
3482
- function Nr(i) {
3483
- i != null && (At = Tt(zr, i));
3499
+ function Sr(i) {
3500
+ i != null && (Nt = Ct(Br, i));
3484
3501
  }
3485
- class Rr extends Re {
3502
+ class $r extends Ze {
3486
3503
  constructor(t, r) {
3487
3504
  var a;
3488
3505
  super(t);
3489
3506
  h(this, "map");
3490
3507
  h(this, "defaultLayers");
3491
3508
  this.mapOptions = r;
3492
- const s = zt().here;
3493
- be.includes(s.version) || I(`不支持${s.version}, HereMap当前只支持如下版本: ${be}`);
3494
- const o = new H.service.Platform({
3509
+ const s = Rt().here;
3510
+ Te.includes(s.version) || x(`不支持${s.version}, HereMap当前只支持如下版本: ${Te}`);
3511
+ const n = new H.service.Platform({
3495
3512
  app_id: s.key.split(",")[0],
3496
3513
  app_code: s.key.split(",")[1]
3497
3514
  });
3498
- this.defaultLayers = o.createDefaultLayers(), this.map = new H.Map(t, this.defaultLayers.normal.map, {
3515
+ this.defaultLayers = n.createDefaultLayers(), this.map = new H.Map(t, this.defaultLayers.normal.map, {
3499
3516
  zoom: r.zoom,
3500
3517
  center: (a = r.center) == null ? void 0 : a.toHere(this.coordType)
3501
3518
  }), new H.mapevents.Behavior(new H.mapevents.MapEvents(this.map)), H.ui.UI.createDefault(this.map, this.defaultLayers);
@@ -3507,7 +3524,7 @@ class Rr extends Re {
3507
3524
  return this.map;
3508
3525
  }
3509
3526
  get coordType() {
3510
- return Y.wgs84;
3527
+ return K.wgs84;
3511
3528
  }
3512
3529
  getCenter() {
3513
3530
  return y.fromHere(this.map.getCenter(), this.coordType);
@@ -3619,44 +3636,44 @@ class Rr extends Re {
3619
3636
  throw new Error("Method not implemented.");
3620
3637
  }
3621
3638
  }
3622
- var $ = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here = "here", i))($ || {}), ze;
3639
+ var $ = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here = "here", i))($ || {}), Ne;
3623
3640
  ((i) => {
3624
3641
  function e(t, r, s) {
3625
- const o = Le.create(s);
3642
+ const n = Se.create(s);
3626
3643
  switch (t) {
3627
3644
  case "google":
3628
- return new Ar(r, o);
3645
+ return new Lr(r, n);
3629
3646
  case "baidu":
3630
- return new $r(r, o);
3647
+ return new Pr(r, n);
3631
3648
  case "here":
3632
- return new Rr(r, o);
3649
+ return new $r(r, n);
3633
3650
  }
3634
3651
  }
3635
3652
  i.createMap = e;
3636
- })(ze || (ze = {}));
3637
- function Dr(i, e) {
3638
- const t = window, r = Zr(i);
3653
+ })(Ne || (Ne = {}));
3654
+ function Ar(i, e) {
3655
+ const t = window, r = zr(i);
3639
3656
  if (t[r])
3640
3657
  return Promise.resolve();
3641
- switch (i != $.here && !e.key && I(`请先配置${i}地图的key`), i) {
3658
+ switch (i != $.here && !e.key && x(`请先配置${i}地图的key`), i) {
3642
3659
  case $.google:
3643
- return vt(`https://maps.googleapis.com/maps/api/js?key=${e.key}&language=${e.language}`);
3660
+ return Mt(`https://maps.googleapis.com/maps/api/js?key=${e.key}&language=${e.language}`);
3644
3661
  case $.baidu:
3645
- return vt(`https://api.map.baidu.com/api?v=${e.version}&ak=${e.key}`);
3662
+ return Mt(`https://api.map.baidu.com/api?v=${e.version}&ak=${e.key}`);
3646
3663
  case $.here:
3647
- return oe(se("core", e.version)).then(() => Promise.all([
3664
+ return ne(se("core", e.version)).then(() => Promise.all([
3648
3665
  // 其他大多数模块都可以同时载入
3649
- oe(se("service", e.version)),
3650
- oe(se("mapevents", e.version)),
3651
- oe(se("clustering", e.version)),
3652
- oe(se("ui", e.version))
3666
+ ne(se("service", e.version)),
3667
+ ne(se("mapevents", e.version)),
3668
+ ne(se("clustering", e.version)),
3669
+ ne(se("ui", e.version))
3653
3670
  ])).catch((s) => (delete t[r], Promise.reject(s)));
3654
3671
  }
3655
3672
  }
3656
- function se(i, e = be[0]) {
3673
+ function se(i, e = Te[0]) {
3657
3674
  return `https://js.api.here.com/v3/${e}/mapsjs-${i}.js`;
3658
3675
  }
3659
- function Zr(i) {
3676
+ function zr(i) {
3660
3677
  switch (i) {
3661
3678
  case $.google:
3662
3679
  return "google";
@@ -3666,26 +3683,27 @@ function Zr(i) {
3666
3683
  return "H";
3667
3684
  }
3668
3685
  }
3669
- let Gr = 0;
3670
- function vt(i, e = "callback") {
3686
+ let Nr = 0;
3687
+ function Mt(i, e = "callback") {
3671
3688
  return new Promise((t, r) => {
3672
- const s = `__callback${Gr++}`;
3689
+ const s = `__callback${Nr++}`;
3673
3690
  window[s] = t;
3674
- const o = document.createElement("script");
3675
- o.src = `${i}&${e}=${s}`, o.onerror = r, document.body.appendChild(o);
3691
+ const n = document.createElement("script");
3692
+ n.src = `${i}&${e}=${s}`, n.onerror = r, document.body.appendChild(n);
3676
3693
  });
3677
3694
  }
3678
- function oe(i) {
3695
+ function ne(i) {
3679
3696
  return new Promise((e, t) => {
3680
3697
  const r = document.createElement("script");
3681
3698
  r.src = i, r.onload = e, r.onerror = t, document.body.appendChild(r);
3682
3699
  });
3683
3700
  }
3684
- const jr = C({
3701
+ const Rr = C({
3702
+ inheritAttrs: !1,
3685
3703
  name: "tg-map",
3686
3704
  props: {
3687
3705
  /** type没做响应式, 但外部可以把type作为tg-map的key, 让type修改时完全重建tg-map */
3688
- type: V($, $.google),
3706
+ type: W($, $.google),
3689
3707
  /**
3690
3708
  * 当对该属性使用双向绑定时, 改变center将触发update:center又反过来触发center改变, 最终导致无限循环...
3691
3709
  * 当前通过setCenter()时判断center是否有改变来避免该问题, 但为了避免可能存在的问题, 另外设计了如下机制:
@@ -3712,8 +3730,9 @@ const jr = C({
3712
3730
  */
3713
3731
  lastCenter: m(y),
3714
3732
  zoom: z(Number),
3715
- infoWindowMode: er(["single", "multi"]),
3716
- gestureHandling: V(N),
3733
+ infoWindowMode: qt(["single", "multi"]),
3734
+ // TODO: 2023/03/22 ipcjs string enum和string应该怎么合在一起?
3735
+ gestureHandling: W(N),
3717
3736
  minZoom: m(Number),
3718
3737
  maxZoom: m(Number),
3719
3738
  mapStyle: m(Object),
@@ -3728,8 +3747,9 @@ const jr = C({
3728
3747
  isDestroyed: !1
3729
3748
  };
3730
3749
  },
3731
- setup() {
3750
+ setup(i, { attrs: e }) {
3732
3751
  return {
3752
+ attrs: V(e),
3733
3753
  centerSyncTimeoutId: 0
3734
3754
  };
3735
3755
  },
@@ -3764,24 +3784,24 @@ const jr = C({
3764
3784
  },
3765
3785
  mapTypeId(i) {
3766
3786
  if (this.map) {
3767
- const e = ye.toEnumOrNull(i, $e);
3787
+ const e = ye.toEnumOrNull(i, Ae);
3768
3788
  e && this.map.setBuildInMapTypeId(e);
3769
3789
  }
3770
3790
  },
3771
3791
  mapType(i) {
3772
3792
  var e;
3773
- (e = this.map) == null || e.setMapType(i ?? k.NORMAL);
3793
+ (e = this.map) == null || e.setMapType(i ?? I.NORMAL);
3774
3794
  }
3775
3795
  },
3776
3796
  provide() {
3777
3797
  return {
3778
- [_t]: Ht(() => this.map)
3798
+ [bt]: Vt(() => this.map)
3779
3799
  };
3780
3800
  },
3781
3801
  async created() {
3782
3802
  const { type: i } = this;
3783
3803
  try {
3784
- await Dr(i, zt()[i]);
3804
+ await Ar(i, Rt()[i]);
3785
3805
  } catch (s) {
3786
3806
  this.$emit("error", s);
3787
3807
  return;
@@ -3790,7 +3810,7 @@ const jr = C({
3790
3810
  console.warn(`tg-map(type=${i})已销毁, 不需要继续执行`);
3791
3811
  return;
3792
3812
  }
3793
- const e = this.map = ze.createMap(
3813
+ const e = this.map = Ne.createMap(
3794
3814
  i,
3795
3815
  this.$refs.map,
3796
3816
  /* options: */
@@ -3803,57 +3823,57 @@ const jr = C({
3803
3823
  maxZoom: this.maxZoom,
3804
3824
  mapStyle: this.mapStyle,
3805
3825
  // 若不能转换成BuildInMapTypeId, 则会设为undefined
3806
- buildInMapTypeId: ye.toEnumOrNull(this.mapTypeId, $e)
3826
+ buildInMapTypeId: ye.toEnumOrNull(this.mapTypeId, Ae)
3807
3827
  }
3808
3828
  );
3809
- if (this.mapType && e.setMapType(this.mapType), "ready" in this.$listeners && console.error("地图载入完成的事件已经从ready改为了load, 请手动修改"), R.call(
3810
- this,
3829
+ if (this.mapType && e.setMapType(this.mapType), "ready" in this.attrs.listeners && console.error("地图载入完成的事件已经从ready改为了load, 请手动修改"), F(
3830
+ this.attrs.listeners,
3811
3831
  this.map,
3812
3832
  /* excludes: */
3813
3833
  ["load"]
3814
- ), this.$emit("load", this.map), "update:center" in this.$listeners) {
3834
+ ), this.$emit("load", this.map), "update:center" in this.attrs.listeners) {
3815
3835
  const s = () => this.$emit("update:center", e.getCenter());
3816
3836
  e.addEventListener("center-changed", () => {
3817
3837
  this.centerSyncDelay > 0 ? (clearTimeout(this.centerSyncTimeoutId), this.centerSyncTimeoutId = setTimeout(s, this.centerSyncDelay)) : s();
3818
3838
  });
3819
3839
  }
3820
- "update:current-center" in this.$listeners && (this.$emit("update:current-center", this.center), e.addEventListener("center-changed", () => {
3840
+ "update:current-center" in this.attrs.listeners && (this.$emit("update:current-center", this.center), e.addEventListener("center-changed", () => {
3821
3841
  this.$emit("update:current-center", e.getCenter());
3822
- })), "update:zoom" in this.$listeners && e.addEventListener("zoom-changed", () => {
3842
+ })), "update:zoom" in this.attrs.listeners && e.addEventListener("zoom-changed", () => {
3823
3843
  this.$emit("update:zoom", e.getZoom());
3824
3844
  });
3825
- const t = "update:map-type" in this.$listeners, r = "update:map-type-id" in this.$listeners;
3845
+ const t = "update:map-type" in this.attrs.listeners, r = "update:map-type-id" in this.attrs.listeners;
3826
3846
  (t || r) && e.addEventListener("map-type-changed", () => {
3827
3847
  const s = e.getMapType();
3828
3848
  t && this.$emit("update:map-type", s), r && this.$emit("update:map-type-id", s.id);
3829
3849
  });
3830
3850
  },
3831
- destroyed() {
3832
- this.isDestroyed = !0, this.map && ("update:last-center" in this.$listeners && this.$emit("update:last-center", this.map.getCenter()), "update:center" in this.$listeners && (clearTimeout(this.centerSyncTimeoutId), this.$emit("update:center", this.map.getCenter())));
3851
+ unmounted() {
3852
+ this.isDestroyed = !0, this.map && ("update:last-center" in this.attrs.listeners && this.$emit("update:last-center", this.map.getCenter()), "update:center" in this.attrs.listeners && (clearTimeout(this.centerSyncTimeoutId), this.$emit("update:center", this.map.getCenter())));
3833
3853
  },
3834
3854
  methods: {}
3835
3855
  });
3836
- const G = (i, e) => {
3856
+ const Z = (i, e) => {
3837
3857
  const t = i.__vccOpts || i;
3838
3858
  for (const [r, s] of e)
3839
3859
  t[r] = s;
3840
3860
  return t;
3841
- }, Wr = { class: "tg-map" }, Vr = {
3861
+ }, Dr = {
3842
3862
  ref: "map",
3843
3863
  class: "tg-map__map"
3844
3864
  };
3845
- function Hr(i, e, t, r, s, o) {
3846
- return D(), Z("div", Wr, [
3847
- Ft("div", Vr, null, 512),
3848
- dt("", !0),
3849
- i.map ? A(i.$slots, "default", { key: 1 }) : dt("", !0),
3865
+ function Zr(i, e, t, r, s, n) {
3866
+ return R(), D("div", re({ class: "tg-map" }, i.attrs.binds), [
3867
+ Ht("div", Dr, null, 512),
3868
+ Pe("", !0),
3869
+ i.map ? A(i.$slots, "default", { key: 1 }) : Pe("", !0),
3850
3870
  A(i.$slots, "overlay")
3851
- ]);
3871
+ ], 16);
3852
3872
  }
3853
- const Nt = /* @__PURE__ */ G(jr, [["render", Hr]]);
3854
- function Fr(i) {
3873
+ const Dt = /* @__PURE__ */ Z(Rr, [["render", Zr]]);
3874
+ function Gr(i) {
3855
3875
  if (i == null)
3856
- return null;
3876
+ return;
3857
3877
  let e;
3858
3878
  if (typeof i == "string") {
3859
3879
  if (e = +i, Number.isNaN(e))
@@ -3862,7 +3882,7 @@ function Fr(i) {
3862
3882
  e = i;
3863
3883
  return `${e}px`;
3864
3884
  }
3865
- const Ur = C({
3885
+ const jr = C({
3866
3886
  name: "tg-map-widget",
3867
3887
  props: {
3868
3888
  left: {
@@ -3888,22 +3908,22 @@ const Ur = C({
3888
3908
  }
3889
3909
  },
3890
3910
  methods: {
3891
- dimen: Fr
3911
+ dimen: Gr
3892
3912
  }
3893
3913
  });
3894
- function Yr(i, e, t, r, s, o) {
3895
- return D(), Z("div", {
3896
- class: q(i.$options.name),
3897
- style: Ut({ left: i.dimen(i.left), top: i.dimen(i.topValue), right: i.dimen(i.right), bottom: i.dimen(i.bottom) })
3914
+ function Wr(i, e, t, r, s, n) {
3915
+ return R(), D("div", {
3916
+ class: De(i.$options.name),
3917
+ style: Ft({ left: i.dimen(i.left), top: i.dimen(i.topValue), right: i.dimen(i.right), bottom: i.dimen(i.bottom) })
3898
3918
  }, [
3899
3919
  A(i.$slots, "default")
3900
3920
  ], 6);
3901
3921
  }
3902
- const Kr = /* @__PURE__ */ G(Ur, [["render", Yr]]), qr = C({
3922
+ const Vr = /* @__PURE__ */ Z(jr, [["render", Wr]]), Hr = C({
3903
3923
  name: "tg-custom-control",
3904
3924
  mixins: [w],
3905
3925
  props: {
3906
- position: V(x, x.RIGHT_BOTTOM)
3926
+ position: W(E, E.RIGHT_BOTTOM)
3907
3927
  },
3908
3928
  setup() {
3909
3929
  return {
@@ -3916,8 +3936,8 @@ const Kr = /* @__PURE__ */ G(Ur, [["render", Yr]]), qr = C({
3916
3936
  }
3917
3937
  },
3918
3938
  onCreate() {
3919
- re(this.$parent, Nt) || console.warn("请将tg-custom-control放到tg-map中");
3920
- const { $el: i } = this, e = class extends kr {
3939
+ de(this.$parent, Dt) || console.warn("请将tg-custom-control放到tg-map中");
3940
+ const { $el: i } = this, e = class extends Cr {
3921
3941
  onCreateElement() {
3922
3942
  return i;
3923
3943
  }
@@ -3928,19 +3948,19 @@ const Kr = /* @__PURE__ */ G(Ur, [["render", Yr]]), qr = C({
3928
3948
  this.$map.removeCustomControl(this.control);
3929
3949
  }
3930
3950
  });
3931
- function Xr(i, e, t, r, s, o) {
3932
- return D(), Z("div", {
3933
- class: q(i.$options.name)
3951
+ function Fr(i, e, t, r, s, n) {
3952
+ return R(), D("div", {
3953
+ class: De(i.$options.name)
3934
3954
  }, [
3935
3955
  A(i.$slots, "default")
3936
3956
  ], 2);
3937
3957
  }
3938
- const Jr = /* @__PURE__ */ G(qr, [["render", Xr]]), Qr = C({
3958
+ const Ur = /* @__PURE__ */ Z(Hr, [["render", Fr]]), Yr = C({
3939
3959
  name: "tg-map-type-control",
3940
3960
  mixins: [w],
3941
3961
  props: {
3942
- position: V(x, x.TOP_LEFT),
3943
- type: V(Bt),
3962
+ position: W(E, E.TOP_LEFT),
3963
+ type: W($t),
3944
3964
  mapTypes: m(Array)
3945
3965
  },
3946
3966
  setup() {
@@ -3955,8 +3975,11 @@ const Jr = /* @__PURE__ */ G(qr, [["render", Xr]]), Qr = C({
3955
3975
  type() {
3956
3976
  this.recreate();
3957
3977
  },
3958
- mapTypes() {
3959
- this.recreate();
3978
+ mapTypes: {
3979
+ handler() {
3980
+ this.recreate();
3981
+ },
3982
+ deep: !0
3960
3983
  }
3961
3984
  },
3962
3985
  onCreate() {
@@ -3965,11 +3988,11 @@ const Jr = /* @__PURE__ */ G(qr, [["render", Xr]]), Qr = C({
3965
3988
  onDestroy() {
3966
3989
  this.$map.removeControl(this.control);
3967
3990
  }
3968
- }), ei = C({
3991
+ }), Kr = C({
3969
3992
  name: "tg-scale-control",
3970
3993
  mixins: [w],
3971
3994
  props: {
3972
- position: V(x, x.BOTTOM_RIGHT)
3995
+ position: W(E, E.BOTTOM_RIGHT)
3973
3996
  },
3974
3997
  setup() {
3975
3998
  return {
@@ -3987,11 +4010,11 @@ const Jr = /* @__PURE__ */ G(qr, [["render", Xr]]), Qr = C({
3987
4010
  onDestroy() {
3988
4011
  this.$map.removeControl(this.control);
3989
4012
  }
3990
- }), ti = C({
4013
+ }), qr = C({
3991
4014
  name: "tg-zoom-control",
3992
4015
  mixins: [w],
3993
4016
  props: {
3994
- position: V(x, x.RIGHT_BOTTOM)
4017
+ position: W(E, E.RIGHT_BOTTOM)
3995
4018
  },
3996
4019
  setup() {
3997
4020
  return {
@@ -4009,221 +4032,321 @@ const Jr = /* @__PURE__ */ G(qr, [["render", Xr]]), Qr = C({
4009
4032
  onDestroy() {
4010
4033
  this.$map.removeControl(this.control);
4011
4034
  }
4012
- }), ri = C({
4013
- name: "tg-label",
4035
+ }), Xr = C({
4036
+ name: "tg-marker-clusterer",
4014
4037
  mixins: [w],
4038
+ // markers从this.$children中读取, 故需要省略(Omit)
4015
4039
  props: {
4016
- position: m(y),
4017
- offset: m(Object),
4040
+ gridSize: m(Number),
4041
+ maxZoom: m(Number),
4042
+ minClusterSize: m(Number),
4043
+ averageCenter: m(Boolean),
4044
+ styles: m(Array),
4045
+ stylesIndexCalculator: m(Function),
4018
4046
  zIndex: m(Number)
4019
4047
  },
4020
4048
  setup() {
4021
4049
  return {
4022
- overlay: void 0
4050
+ clusterer: void 0,
4051
+ markers: []
4023
4052
  };
4024
4053
  },
4025
- methods: {
4026
- content() {
4027
- return this.$el;
4054
+ watch: {
4055
+ gridSize() {
4056
+ this.recreate();
4028
4057
  },
4029
- marker() {
4030
- var i;
4031
- return (i = this.$marker()) == null ? void 0 : i.marker;
4058
+ maxZoom() {
4059
+ this.recreate();
4032
4060
  },
4033
- $marker() {
4034
- return re(this.$parent, de);
4061
+ minClusterSize() {
4062
+ this.recreate();
4035
4063
  },
4036
- getOptions() {
4037
- return {
4038
- content: this.content(),
4039
- position: this.position,
4040
- offset: this.offset,
4041
- zIndex: this.zIndex
4042
- };
4043
- }
4044
- },
4045
- watch: {
4046
- position(i) {
4047
- this.overlay.setPosition(i);
4064
+ averageCenter() {
4065
+ this.recreate();
4048
4066
  },
4049
- offset(i) {
4050
- this.overlay.setOffset(i);
4067
+ styles: {
4068
+ handler() {
4069
+ this.recreate();
4070
+ },
4071
+ deep: !0
4051
4072
  },
4052
- zIndex(i) {
4053
- this.overlay.setZIndex(i);
4073
+ stylesIndexCalculator() {
4074
+ this.recreate();
4054
4075
  },
4055
- visible(i) {
4056
- this.overlay.setVisible(i);
4076
+ zIndex() {
4077
+ this.recreate();
4057
4078
  }
4058
4079
  },
4059
4080
  onCreate() {
4060
- this.overlay = this.$map.createLabel(this.getOptions()), R.call(this, this.overlay), this.$marker() ? this.$marker().onAddLabel(this.overlay) : this.$map.addOverlay(this.overlay), R.call(this, this.overlay);
4081
+ this.clusterer = this.$map.createMarkerClusterer(this);
4061
4082
  },
4062
4083
  onDestroy() {
4063
- this.$marker() ? this.$marker().onRemoveLabel(this.overlay) : this.$map.removeOverlay(this.overlay);
4084
+ this.clusterer.clearMarkers();
4085
+ },
4086
+ methods: {
4087
+ /** TgMarker有可能在该组件未初始化之前调用, 需要通过该方法判断 */
4088
+ isInitiated() {
4089
+ return this.clusterer != null;
4090
+ },
4091
+ onAddMarker(i) {
4092
+ this.markers.push(i), this.isInitiated() && this.clusterer.addMarker(i);
4093
+ },
4094
+ onRemoveMarker(i) {
4095
+ this.isInitiated() && this.clusterer.removeMarker(i), Me.remove(this.markers, i);
4096
+ }
4064
4097
  }
4065
4098
  });
4066
- function ii(i, e, t, r, s, o) {
4067
- return D(), Z("div", {
4068
- class: q(i.$options.name)
4099
+ function Jr(i, e, t, r, s, n) {
4100
+ return R(), D("div", {
4101
+ class: De(i.$options.name)
4069
4102
  }, [
4070
4103
  A(i.$slots, "default")
4071
4104
  ], 2);
4072
4105
  }
4073
- const Rt = /* @__PURE__ */ G(ri, [["render", ii]]), si = C({
4074
- name: "tg-info-window",
4106
+ const Zt = /* @__PURE__ */ Z(Xr, [["render", Jr]]), Qr = C({
4107
+ name: "tg-traffic-layer",
4075
4108
  mixins: [w],
4076
- model: {
4077
- prop: "show",
4078
- event: "update:show"
4079
- },
4080
4109
  props: {
4081
- show: z(Boolean),
4082
- position: m(y),
4083
- maxWidth: m(Number),
4084
- offset: m(Object),
4085
- disableAutoPan: m(Boolean)
4110
+ // 请直接使用v-if来控制它的显隐
4086
4111
  },
4087
4112
  setup() {
4088
4113
  return {
4089
- overlay: void 0
4114
+ layer: void 0
4090
4115
  };
4091
4116
  },
4092
- methods: {
4093
- content() {
4094
- return this.$el;
4095
- },
4096
- $marker() {
4097
- return re(this.$parent, de);
4098
- },
4099
- getOptions() {
4100
- return {
4101
- content: this.content(),
4102
- position: this.position,
4103
- maxWidth: this.maxWidth,
4104
- offset: this.offset,
4105
- disableAutoPan: this.disableAutoPan
4106
- };
4107
- }
4108
- },
4109
- watch: {
4110
- show(i) {
4111
- this.$marker() ? this.$marker().onInfoShowChanged(this, i) : i ? this.overlay.open() : this.overlay.close();
4112
- },
4113
- position(i) {
4114
- this.overlay.setPosition(i);
4115
- },
4116
- maxWidth() {
4117
- this.recreate();
4118
- },
4119
- offset() {
4120
- this.recreate();
4121
- },
4122
- disableAutoPan() {
4123
- this.recreate();
4124
- }
4125
- },
4117
+ watch: {},
4126
4118
  onCreate() {
4127
- this.overlay = this.$map.createInfoWindow(this.getOptions()), this.$marker() ? this.$marker().onAddInfo(this) : this.show && this.overlay.open(), this.overlay.addEventListener("open", () => {
4128
- this.$emit("update:show", !0);
4129
- }), this.overlay.addEventListener("close", () => {
4130
- this.$emit("update:show", !1);
4131
- }), R.call(this, this.overlay);
4119
+ this.layer = new wr(), this.$map.addLayer(this.layer);
4132
4120
  },
4133
4121
  onDestroy() {
4134
- this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
4122
+ this.$map.removeLayer(this.layer);
4135
4123
  }
4136
- });
4137
- function oi(i, e, t, r, s, o) {
4138
- return Yt((D(), Z("div", {
4139
- class: q(i.$options.name)
4140
- }, [
4141
- A(i.$slots, "default")
4142
- ], 2)), [
4143
- [Kt, i.show]
4144
- ]);
4145
- }
4146
- const Dt = /* @__PURE__ */ G(si, [["render", oi]]), ni = C({
4147
- name: "tg-info-box",
4124
+ }), ei = C({
4125
+ inheritAttrs: !1,
4126
+ name: "tg-circle",
4148
4127
  mixins: [w],
4149
- model: {
4150
- prop: "show",
4151
- event: "update:show"
4152
- },
4153
4128
  props: {
4154
- show: z(Boolean),
4155
- position: m(y),
4156
- offset: m(Object),
4157
- maxWidth: m(Number),
4158
- borderClass: m(String),
4159
- zIndex: m(Number)
4129
+ center: z(y),
4130
+ radius: z(Number),
4131
+ clickable: m(Boolean),
4132
+ editable: m(Boolean),
4133
+ strokeColor: m(String),
4134
+ strokeOpacity: m(Number),
4135
+ strokeWeight: m(Number),
4136
+ visible: m(Boolean),
4137
+ fillColor: m(String),
4138
+ fillOpacity: m(Number)
4160
4139
  },
4161
- setup() {
4140
+ setup(i, { attrs: e }) {
4162
4141
  return {
4142
+ attrs: V(e),
4163
4143
  overlay: void 0
4164
4144
  };
4165
4145
  },
4166
4146
  watch: {
4167
- show(i) {
4168
- this.$marker() ? this.$marker().onInfoShowChanged(this, i) : i ? this.overlay.open() : this.overlay.close();
4147
+ center(i) {
4148
+ this.overlay.setCenter(i);
4169
4149
  },
4170
- position(i) {
4171
- this.overlay.setPosition(i);
4150
+ radius(i) {
4151
+ this.overlay.setRadius(i);
4172
4152
  },
4173
- offset() {
4153
+ clickable() {
4174
4154
  this.recreate();
4175
4155
  },
4176
- maxWidth(i) {
4177
- this.overlay.setMaxWidth(i);
4156
+ editable(i) {
4157
+ this.overlay.setEditable(i);
4178
4158
  },
4179
- borderClass() {
4180
- this.recreate();
4159
+ strokeColor(i) {
4160
+ this.overlay.setStrokeColor(i);
4181
4161
  },
4182
- zIndex(i) {
4183
- this.overlay.setZIndex(i);
4162
+ strokeOpacity(i) {
4163
+ this.overlay.setStrokeOpacity(i);
4164
+ },
4165
+ strokeWeight(i) {
4166
+ this.overlay.setStrokeWeight(i);
4167
+ },
4168
+ fillColor(i) {
4169
+ this.overlay.setFillColor(i);
4170
+ },
4171
+ fillOpacity(i) {
4172
+ this.overlay.setFillOpacity(i);
4173
+ },
4174
+ visible(i) {
4175
+ this.overlay.setVisible(i);
4184
4176
  }
4185
4177
  },
4186
4178
  onCreate() {
4187
- this.overlay = this.$map.createInfoBox(this.getOptions()), this.$marker() ? this.$marker().onAddInfo(this) : this.show && this.overlay.open(), "update:show" in this.$listeners && this.overlay.addEventListener("closeclick", () => {
4188
- this.$emit("update:show", !1);
4189
- }), R.call(this, this.overlay);
4179
+ this.overlay = this.$map.createCircle(this), this.$map.addOverlay(this.overlay), F(this.attrs.listeners, this.overlay);
4190
4180
  },
4191
4181
  onDestroy() {
4192
- this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
4193
- },
4194
- methods: {
4195
- getOptions() {
4196
- return {
4197
- content: this.content(),
4198
- position: this.position,
4199
- offset: this.offset,
4200
- zIndex: this.zIndex,
4201
- maxWidth: this.maxWidth,
4202
- borderClass: this.borderClass
4203
- };
4204
- },
4205
- content() {
4206
- return this.$el;
4207
- },
4208
- $marker() {
4209
- return re(this.$parent, de);
4210
- },
4211
- open(i) {
4212
- this.overlay.open(i);
4182
+ this.$map.removeOverlay(this.overlay);
4183
+ }
4184
+ });
4185
+ var Re = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overlayMouseTarget = "overlayMouseTarget", i.float = "float", i))(Re || {});
4186
+ class ti {
4187
+ constructor(e, t) {
4188
+ h(this, "baidu");
4189
+ h(this, "google");
4190
+ h(this, "projection");
4191
+ h(this, "element", void 0);
4192
+ h(this, "mapPane");
4193
+ this.map = e, this.mapPane = t.mapPane;
4194
+ }
4195
+ create() {
4196
+ return this.element = this.onCreate(), this.element.className += " element-overlay", this.element;
4197
+ }
4198
+ draw() {
4199
+ this.projection && this.onDraw(this.projection);
4200
+ }
4201
+ getProjection() {
4202
+ return this.projection;
4203
+ }
4204
+ asBaidu() {
4205
+ if (!this.baidu) {
4206
+ const e = this;
4207
+ zt();
4208
+ class t extends BMap.OverlayV3 {
4209
+ initialize(n) {
4210
+ const a = e.create(), g = n.getPanes();
4211
+ let o;
4212
+ switch (e.mapPane) {
4213
+ case "float":
4214
+ o = g.floatPane;
4215
+ break;
4216
+ case "overlayMouseTarget":
4217
+ o = g.markerMouseTarget;
4218
+ break;
4219
+ case "overlay":
4220
+ o = g.markerPane;
4221
+ break;
4222
+ case "map":
4223
+ o = g.mapPane;
4224
+ break;
4225
+ default:
4226
+ ut(e.mapPane);
4227
+ break;
4228
+ }
4229
+ return o == null || o.appendChild(a), a;
4230
+ }
4231
+ draw() {
4232
+ e.draw();
4233
+ }
4234
+ }
4235
+ this.baidu = new t();
4236
+ const r = e.map.innerMap;
4237
+ this.projection = {
4238
+ fromLatLngToOverlayPoint(s) {
4239
+ return r.pointToOverlayPixel(s.toBaidu(e.map.coordType));
4240
+ },
4241
+ fromOverlayPointToLatLng(s) {
4242
+ return y.fromBaidu(r.overlayPixelToPoint(new BMap.Pixel(s.x, s.y)), e.map.coordType);
4243
+ }
4244
+ };
4245
+ }
4246
+ return this.baidu;
4247
+ }
4248
+ asGoogle() {
4249
+ if (!this.google) {
4250
+ const e = this;
4251
+ class t extends google.maps.OverlayView {
4252
+ onAdd() {
4253
+ const s = e.create(), n = this.getPanes();
4254
+ let a;
4255
+ switch (e.mapPane) {
4256
+ case "float":
4257
+ a = n.floatPane;
4258
+ break;
4259
+ case "overlayMouseTarget":
4260
+ a = n.overlayMouseTarget;
4261
+ break;
4262
+ case "overlay":
4263
+ a = n.overlayLayer;
4264
+ break;
4265
+ case "map":
4266
+ a = n.mapPane;
4267
+ break;
4268
+ default:
4269
+ ut(e.mapPane);
4270
+ break;
4271
+ }
4272
+ a.appendChild(s);
4273
+ }
4274
+ draw() {
4275
+ e.draw();
4276
+ }
4277
+ onRemove() {
4278
+ var s;
4279
+ (s = e.element.parentNode) == null || s.removeChild(e.element);
4280
+ }
4281
+ }
4282
+ this.google = new t(), this.projection = {
4283
+ fromLatLngToOverlayPoint(r) {
4284
+ return e.google.getProjection().fromLatLngToDivPixel(r.toGoogle(e.map.coordType));
4285
+ },
4286
+ fromOverlayPointToLatLng(r) {
4287
+ return y.fromGoogle(e.google.getProjection().fromDivPixelToLatLng(new google.maps.Point(r.x, r.y)), e.map.coordType);
4288
+ }
4289
+ };
4290
+ }
4291
+ return this.google;
4292
+ }
4293
+ }
4294
+ class ri extends ti {
4295
+ constructor(e, t, r, s) {
4296
+ super(e, t), this.content = r, this.position = s;
4297
+ }
4298
+ onCreate() {
4299
+ return this.content;
4300
+ }
4301
+ onDraw(e) {
4302
+ const t = e.fromLatLngToOverlayPoint(this.position);
4303
+ this.content.style.left = t.x + "px", this.content.style.top = t.y + "px";
4304
+ }
4305
+ setPosition(e) {
4306
+ this.position = e, this.draw();
4307
+ }
4308
+ }
4309
+ const ii = C({
4310
+ name: "tg-element-overlay",
4311
+ mixins: [w],
4312
+ props: {
4313
+ mapPane: W(Re, Re.overlayMouseTarget),
4314
+ position: z(y)
4315
+ },
4316
+ setup() {
4317
+ return {
4318
+ overlay: void 0
4319
+ };
4320
+ },
4321
+ methods: {
4322
+ content() {
4323
+ return this.$el;
4324
+ }
4325
+ },
4326
+ watch: {
4327
+ position(i) {
4328
+ this.overlay.setPosition(i);
4213
4329
  },
4214
- close() {
4215
- this.overlay.close();
4330
+ mapPane() {
4331
+ this.recreate();
4216
4332
  }
4333
+ },
4334
+ onCreate() {
4335
+ this.overlay = new ri(this.$map, this, this.content(), this.position), this.$map.addElementOverlay(this.overlay);
4336
+ },
4337
+ onDestroy() {
4338
+ this.$map.removeElementOverlay(this.overlay);
4217
4339
  }
4218
4340
  });
4219
- function ai(i, e, t, r, s, o) {
4220
- return D(), Z("div", {
4221
- class: q(i.$options.name)
4222
- }, [
4341
+ function si(i, e, t, r, s, n) {
4342
+ return R(), D("div", re({
4343
+ class: i.$options.name
4344
+ }, i.$attrs), [
4223
4345
  A(i.$slots, "default")
4224
- ], 2);
4346
+ ], 16);
4225
4347
  }
4226
- const Zt = /* @__PURE__ */ G(ni, [["render", ai]]), li = C({
4348
+ const ni = /* @__PURE__ */ Z(ii, [["render", si]]), oi = C({
4349
+ inheritAttrs: !1,
4227
4350
  name: "tg-marker",
4228
4351
  mixins: [w],
4229
4352
  props: {
@@ -4237,9 +4360,12 @@ const Zt = /* @__PURE__ */ G(ni, [["render", ai]]), li = C({
4237
4360
  zIndex: m(Number),
4238
4361
  visible: m(Boolean)
4239
4362
  },
4240
- setup() {
4363
+ setup(i, { attrs: e }) {
4241
4364
  return {
4242
- marker: void 0
4365
+ attrs: V(e),
4366
+ marker: void 0,
4367
+ label: gt(),
4368
+ info: gt()
4243
4369
  };
4244
4370
  },
4245
4371
  watch: {
@@ -4272,363 +4398,253 @@ const Zt = /* @__PURE__ */ G(ni, [["render", ai]]), li = C({
4272
4398
  }
4273
4399
  },
4274
4400
  onCreate() {
4275
- const i = we(this.$children, Rt), e = we(this.$children, Zt), t = we(this.$children, Dt);
4276
- this.marker = this.$map.createMarker(this), i && this.marker.setLabel(i.overlay), e && e.show && e.overlay.open(this.marker), this.$clusterer() ? this.$clusterer().onAddMarker(this.marker) : this.$map.addOverlay(this.marker), t && t.show && t.overlay.open(this.marker), R.call(this, this.marker);
4401
+ this.marker = this.$map.createMarker(this), this.label && this.marker.setLabel(this.label.overlay), this.$clusterer() ? this.$clusterer().onAddMarker(this.marker) : this.$map.addOverlay(this.marker), this.info && this.info.show && this.info.overlay.open(this.marker), F(this.attrs.listeners, this.marker);
4277
4402
  },
4278
4403
  onDestroy() {
4279
4404
  this.$clusterer() ? this.$clusterer().onRemoveMarker(this.marker) : this.$map.removeOverlay(this.marker);
4280
4405
  },
4281
4406
  methods: {
4282
4407
  $clusterer() {
4283
- return re(this.$parent, Gt);
4408
+ return de(this.$parent, Zt);
4284
4409
  },
4285
4410
  onAddLabel(i) {
4286
- this.marker && this.marker.setLabel(i);
4411
+ this.label = i, this.marker && this.marker.setLabel(i.overlay);
4287
4412
  },
4288
4413
  onRemoveLabel(i) {
4289
- this.marker.setLabel(void 0);
4414
+ this.marker.setLabel(void 0), this.label = void 0;
4290
4415
  },
4291
4416
  onAddInfo(i) {
4292
- this.marker && i.show && i.overlay.open(this.marker);
4417
+ this.info = i, this.marker && i.show && i.overlay.open(this.marker);
4293
4418
  },
4294
4419
  onRemoveInfo(i) {
4295
- i.overlay.close();
4420
+ i.overlay.close(), this.info = void 0;
4296
4421
  },
4297
4422
  onInfoShowChanged(i, e) {
4298
4423
  e ? i.overlay.open(this.marker) : i.overlay.close();
4299
4424
  }
4300
4425
  }
4301
4426
  });
4302
- function hi(i, e, t, r, s, o) {
4303
- return D(), Z("div", {
4304
- class: q(i.$options.name)
4305
- }, [
4427
+ function ai(i, e, t, r, s, n) {
4428
+ return R(), D("div", re({
4429
+ class: i.$options.name
4430
+ }, i.attrs.binds), [
4306
4431
  A(i.$slots, "default")
4307
- ], 2);
4432
+ ], 16);
4308
4433
  }
4309
- const de = /* @__PURE__ */ G(li, [["render", hi]]), ci = C({
4310
- name: "tg-marker-clusterer",
4434
+ const we = /* @__PURE__ */ Z(oi, [["render", ai]]), li = C({
4435
+ inheritAttrs: !1,
4436
+ name: "tg-info-box",
4311
4437
  mixins: [w],
4312
- // markers从this.$children中读取, 故需要省略(Omit)
4313
4438
  props: {
4314
- gridSize: m(Number),
4315
- maxZoom: m(Number),
4316
- minClusterSize: m(Number),
4317
- averageCenter: m(Boolean),
4318
- styles: m(Array),
4319
- stylesIndexCalculator: m(Function),
4439
+ show: z(Boolean),
4440
+ position: m(y),
4441
+ offset: m(Object),
4442
+ maxWidth: m(Number),
4443
+ borderClass: m(String),
4320
4444
  zIndex: m(Number)
4321
4445
  },
4322
- setup() {
4446
+ setup(i, { attrs: e }) {
4323
4447
  return {
4324
- clusterer: void 0
4448
+ attrs: V(e),
4449
+ overlay: void 0
4325
4450
  };
4326
4451
  },
4327
4452
  watch: {
4328
- gridSize() {
4329
- this.recreate();
4330
- },
4331
- maxZoom() {
4332
- this.recreate();
4453
+ show(i) {
4454
+ this.$marker() ? this.$marker().onInfoShowChanged(this, i) : i ? this.overlay.open() : this.overlay.close();
4333
4455
  },
4334
- minClusterSize() {
4335
- this.recreate();
4456
+ position(i) {
4457
+ this.overlay.setPosition(i);
4336
4458
  },
4337
- averageCenter() {
4459
+ offset() {
4338
4460
  this.recreate();
4339
4461
  },
4340
- styles() {
4341
- this.recreate();
4462
+ maxWidth(i) {
4463
+ this.overlay.setMaxWidth(i);
4342
4464
  },
4343
- stylesIndexCalculator() {
4465
+ borderClass() {
4344
4466
  this.recreate();
4345
4467
  },
4346
- zIndex() {
4347
- this.recreate();
4468
+ zIndex(i) {
4469
+ this.overlay.setZIndex(i);
4348
4470
  }
4349
4471
  },
4350
4472
  onCreate() {
4351
- this.clusterer = this.$map.createMarkerClusterer(this.getOptions());
4473
+ this.overlay = this.$map.createInfoBox(this.getOptions()), this.$marker() ? this.$marker().onAddInfo(this) : this.show && this.overlay.open(), "update:show" in this.attrs.listeners && this.overlay.addEventListener("closeclick", () => {
4474
+ this.$emit("update:show", !1);
4475
+ }), F(this.attrs.listeners, this.overlay);
4352
4476
  },
4353
4477
  onDestroy() {
4354
- this.clusterer.clearMarkers();
4478
+ this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
4355
4479
  },
4356
4480
  methods: {
4357
4481
  getOptions() {
4358
4482
  return {
4359
- markers: this.markers(),
4360
- gridSize: this.gridSize,
4361
- maxZoom: this.maxZoom,
4362
- minClusterSize: this.minClusterSize,
4363
- averageCenter: this.averageCenter,
4364
- styles: this.styles,
4365
- stylesIndexCalculator: this.stylesIndexCalculator,
4366
- zIndex: this.zIndex
4483
+ content: this.content(),
4484
+ position: this.position,
4485
+ offset: this.offset,
4486
+ zIndex: this.zIndex,
4487
+ maxWidth: this.maxWidth,
4488
+ borderClass: this.borderClass
4367
4489
  };
4368
4490
  },
4369
- /** TgMarker有可能在该组件未初始化之前调用, 需要通过该方法判断 */
4370
- isInitiated() {
4371
- return this.clusterer != null;
4491
+ content() {
4492
+ return this.$el;
4372
4493
  },
4373
- markers() {
4374
- return this.$children.map((e) => re(e, de)).filter(Qt).map((e) => e.marker);
4494
+ $marker() {
4495
+ return de(this.$parent, we);
4375
4496
  },
4376
- onAddMarker(i) {
4377
- this.isInitiated() && this.clusterer.addMarker(i);
4497
+ open(i) {
4498
+ this.overlay.open(i);
4378
4499
  },
4379
- onRemoveMarker(i) {
4380
- this.isInitiated() && this.clusterer.removeMarker(i);
4500
+ close() {
4501
+ this.overlay.close();
4381
4502
  }
4382
4503
  }
4383
4504
  });
4384
- function di(i, e, t, r, s, o) {
4385
- return D(), Z("div", {
4386
- class: q(i.$options.name)
4387
- }, [
4505
+ function hi(i, e, t, r, s, n) {
4506
+ return R(), D("div", re({
4507
+ class: i.$options.name
4508
+ }, i.attrs.binds), [
4388
4509
  A(i.$slots, "default")
4389
- ], 2);
4510
+ ], 16);
4390
4511
  }
4391
- const Gt = /* @__PURE__ */ G(ci, [["render", di]]), pi = C({
4392
- name: "tg-traffic-layer",
4393
- mixins: [w],
4394
- props: {
4395
- // 请直接使用v-if来控制它的显隐
4396
- },
4397
- setup() {
4398
- return {
4399
- layer: void 0
4400
- };
4401
- },
4402
- watch: {},
4403
- onCreate() {
4404
- this.layer = new Ir(), this.$map.addLayer(this.layer);
4405
- },
4406
- onDestroy() {
4407
- this.$map.removeLayer(this.layer);
4408
- }
4409
- }), ui = C({
4410
- name: "tg-circle",
4512
+ const ci = /* @__PURE__ */ Z(li, [["render", hi]]), di = C({
4513
+ inheritAttrs: !1,
4514
+ name: "tg-info-window",
4411
4515
  mixins: [w],
4412
4516
  props: {
4413
- center: z(y),
4414
- radius: z(Number),
4415
- clickable: m(Boolean),
4416
- editable: m(Boolean),
4417
- strokeColor: m(String),
4418
- strokeOpacity: m(Number),
4419
- strokeWeight: m(Number),
4420
- visible: m(Boolean),
4421
- fillColor: m(String),
4422
- fillOpacity: m(Number)
4517
+ show: z(Boolean),
4518
+ position: m(y),
4519
+ maxWidth: m(Number),
4520
+ offset: m(Object),
4521
+ disableAutoPan: m(Boolean)
4423
4522
  },
4424
- setup() {
4523
+ setup(i, { attrs: e }) {
4425
4524
  return {
4525
+ attrs: V(e),
4426
4526
  overlay: void 0
4427
4527
  };
4428
4528
  },
4429
- watch: {
4430
- center(i) {
4431
- this.overlay.setCenter(i);
4432
- },
4433
- radius(i) {
4434
- this.overlay.setRadius(i);
4435
- },
4436
- clickable() {
4437
- this.recreate();
4438
- },
4439
- editable(i) {
4440
- this.overlay.setEditable(i);
4529
+ methods: {
4530
+ content() {
4531
+ return this.$el;
4441
4532
  },
4442
- strokeColor(i) {
4443
- this.overlay.setStrokeColor(i);
4533
+ $marker() {
4534
+ return de(this.$parent, we);
4444
4535
  },
4445
- strokeOpacity(i) {
4446
- this.overlay.setStrokeOpacity(i);
4536
+ getOptions() {
4537
+ return {
4538
+ content: this.content(),
4539
+ position: this.position,
4540
+ maxWidth: this.maxWidth,
4541
+ offset: this.offset,
4542
+ disableAutoPan: this.disableAutoPan
4543
+ };
4544
+ }
4545
+ },
4546
+ watch: {
4547
+ show(i) {
4548
+ this.$marker() ? this.$marker().onInfoShowChanged(this, i) : i ? this.overlay.open() : this.overlay.close();
4447
4549
  },
4448
- strokeWeight(i) {
4449
- this.overlay.setStrokeWeight(i);
4550
+ position(i) {
4551
+ this.overlay.setPosition(i);
4450
4552
  },
4451
- fillColor(i) {
4452
- this.overlay.setFillColor(i);
4553
+ maxWidth() {
4554
+ this.recreate();
4453
4555
  },
4454
- fillOpacity(i) {
4455
- this.overlay.setFillOpacity(i);
4556
+ offset() {
4557
+ this.recreate();
4456
4558
  },
4457
- visible(i) {
4458
- this.overlay.setVisible(i);
4559
+ disableAutoPan() {
4560
+ this.recreate();
4459
4561
  }
4460
4562
  },
4461
4563
  onCreate() {
4462
- this.overlay = this.$map.createCircle(this), this.$map.addOverlay(this.overlay), R.call(this, this.overlay);
4564
+ this.overlay = this.$map.createInfoWindow(this.getOptions()), this.$marker() ? this.$marker().onAddInfo(this) : this.show && this.overlay.open(), this.overlay.addEventListener("open", () => {
4565
+ this.$emit("update:show", !0);
4566
+ }), this.overlay.addEventListener("close", () => {
4567
+ this.$emit("update:show", !1);
4568
+ }), F(this.attrs.listeners, this.overlay);
4463
4569
  },
4464
4570
  onDestroy() {
4465
- this.$map.removeOverlay(this.overlay);
4571
+ this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
4466
4572
  }
4467
4573
  });
4468
- var Ne = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overlayMouseTarget = "overlayMouseTarget", i.float = "float", i))(Ne || {});
4469
- class gi {
4470
- constructor(e, t) {
4471
- h(this, "baidu");
4472
- h(this, "google");
4473
- h(this, "projection");
4474
- h(this, "element", void 0);
4475
- h(this, "mapPane");
4476
- this.map = e, this.mapPane = t.mapPane;
4477
- }
4478
- create() {
4479
- return this.element = this.onCreate(), this.element.className += " element-overlay", this.element;
4480
- }
4481
- draw() {
4482
- this.projection && this.onDraw(this.projection);
4483
- }
4484
- getProjection() {
4485
- return this.projection;
4486
- }
4487
- asBaidu() {
4488
- if (!this.baidu) {
4489
- const e = this;
4490
- $t();
4491
- class t extends BMap.OverlayV3 {
4492
- initialize(o) {
4493
- const a = e.create(), g = o.getPanes();
4494
- let n;
4495
- switch (e.mapPane) {
4496
- case "float":
4497
- n = g.floatPane;
4498
- break;
4499
- case "overlayMouseTarget":
4500
- n = g.markerMouseTarget;
4501
- break;
4502
- case "overlay":
4503
- n = g.markerPane;
4504
- break;
4505
- case "map":
4506
- n = g.mapPane;
4507
- break;
4508
- default:
4509
- pt(e.mapPane);
4510
- break;
4511
- }
4512
- return n == null || n.appendChild(a), a;
4513
- }
4514
- draw() {
4515
- e.draw();
4516
- }
4517
- }
4518
- this.baidu = new t();
4519
- const r = e.map.innerMap;
4520
- this.projection = {
4521
- fromLatLngToOverlayPoint(s) {
4522
- return r.pointToOverlayPixel(s.toBaidu(e.map.coordType));
4523
- },
4524
- fromOverlayPointToLatLng(s) {
4525
- return y.fromBaidu(r.overlayPixelToPoint(new BMap.Pixel(s.x, s.y)), e.map.coordType);
4526
- }
4527
- };
4528
- }
4529
- return this.baidu;
4530
- }
4531
- asGoogle() {
4532
- if (!this.google) {
4533
- const e = this;
4534
- class t extends google.maps.OverlayView {
4535
- onAdd() {
4536
- const s = e.create(), o = this.getPanes();
4537
- let a;
4538
- switch (e.mapPane) {
4539
- case "float":
4540
- a = o.floatPane;
4541
- break;
4542
- case "overlayMouseTarget":
4543
- a = o.overlayMouseTarget;
4544
- break;
4545
- case "overlay":
4546
- a = o.overlayLayer;
4547
- break;
4548
- case "map":
4549
- a = o.mapPane;
4550
- break;
4551
- default:
4552
- pt(e.mapPane);
4553
- break;
4554
- }
4555
- a.appendChild(s);
4556
- }
4557
- draw() {
4558
- e.draw();
4559
- }
4560
- onRemove() {
4561
- var s;
4562
- (s = e.element.parentNode) == null || s.removeChild(e.element);
4563
- }
4564
- }
4565
- this.google = new t(), this.projection = {
4566
- fromLatLngToOverlayPoint(r) {
4567
- return e.google.getProjection().fromLatLngToDivPixel(r.toGoogle(e.map.coordType));
4568
- },
4569
- fromOverlayPointToLatLng(r) {
4570
- return y.fromGoogle(e.google.getProjection().fromDivPixelToLatLng(new google.maps.Point(r.x, r.y)), e.map.coordType);
4571
- }
4572
- };
4573
- }
4574
- return this.google;
4575
- }
4576
- }
4577
- class mi extends gi {
4578
- constructor(e, t, r, s) {
4579
- super(e, t), this.content = r, this.position = s;
4580
- }
4581
- onCreate() {
4582
- return this.content;
4583
- }
4584
- onDraw(e) {
4585
- const t = e.fromLatLngToOverlayPoint(this.position);
4586
- this.content.style.left = t.x + "px", this.content.style.top = t.y + "px";
4587
- }
4588
- setPosition(e) {
4589
- this.position = e, this.draw();
4590
- }
4574
+ function pi(i, e, t, r, s, n) {
4575
+ return Ut((R(), D("div", re({
4576
+ class: i.$options.name
4577
+ }, i.attrs.binds), [
4578
+ A(i.$slots, "default")
4579
+ ], 16)), [
4580
+ [Yt, i.show]
4581
+ ]);
4591
4582
  }
4592
- const fi = C({
4593
- name: "tg-element-overlay",
4583
+ const ui = /* @__PURE__ */ Z(di, [["render", pi]]), gi = C({
4584
+ inheritAttrs: !1,
4585
+ name: "tg-label",
4594
4586
  mixins: [w],
4595
4587
  props: {
4596
- mapPane: V(Ne, Ne.overlayMouseTarget),
4597
- position: z(y)
4588
+ position: m(y),
4589
+ offset: m(Object),
4590
+ zIndex: m(Number)
4598
4591
  },
4599
- setup() {
4592
+ setup(i, { attrs: e }) {
4600
4593
  return {
4594
+ attrs: V(e),
4601
4595
  overlay: void 0
4602
4596
  };
4603
4597
  },
4604
4598
  methods: {
4605
4599
  content() {
4606
4600
  return this.$el;
4601
+ },
4602
+ marker() {
4603
+ var i;
4604
+ return (i = this.$marker()) == null ? void 0 : i.marker;
4605
+ },
4606
+ $marker() {
4607
+ return de(this.$parent, we);
4608
+ },
4609
+ getOptions() {
4610
+ return {
4611
+ content: this.content(),
4612
+ position: this.position,
4613
+ offset: this.offset,
4614
+ zIndex: this.zIndex
4615
+ };
4607
4616
  }
4608
4617
  },
4609
4618
  watch: {
4610
4619
  position(i) {
4611
4620
  this.overlay.setPosition(i);
4612
4621
  },
4613
- mapPane() {
4614
- this.recreate();
4622
+ offset(i) {
4623
+ this.overlay.setOffset(i);
4624
+ },
4625
+ zIndex(i) {
4626
+ this.overlay.setZIndex(i);
4627
+ },
4628
+ visible(i) {
4629
+ this.overlay.setVisible(i);
4615
4630
  }
4616
4631
  },
4617
4632
  onCreate() {
4618
- this.overlay = new mi(this.$map, this, this.content(), this.position), this.$map.addElementOverlay(this.overlay);
4633
+ this.overlay = this.$map.createLabel(this.getOptions()), this.$marker() ? this.$marker().onAddLabel(this) : this.$map.addOverlay(this.overlay), F(this.attrs.listeners, this.overlay);
4619
4634
  },
4620
4635
  onDestroy() {
4621
- this.$map.removeElementOverlay(this.overlay);
4636
+ this.$marker() ? this.$marker().onRemoveLabel(this) : this.$map.removeOverlay(this.overlay);
4622
4637
  }
4623
4638
  });
4624
- function yi(i, e, t, r, s, o) {
4625
- return D(), Z("div", qt({
4639
+ function mi(i, e, t, r, s, n) {
4640
+ return R(), D("div", re({
4626
4641
  class: i.$options.name
4627
- }, Xt(i.$listeners, !0)), [
4642
+ }, i.attrs.binds), [
4628
4643
  A(i.$slots, "default")
4629
4644
  ], 16);
4630
4645
  }
4631
- const vi = /* @__PURE__ */ G(fi, [["render", yi]]), _i = C({
4646
+ const fi = /* @__PURE__ */ Z(gi, [["render", mi]]), yi = C({
4647
+ inheritAttrs: !1,
4632
4648
  name: "tg-polygon",
4633
4649
  mixins: [w],
4634
4650
  props: {
@@ -4642,14 +4658,18 @@ const vi = /* @__PURE__ */ G(fi, [["render", yi]]), _i = C({
4642
4658
  fillColor: m(String),
4643
4659
  fillOpacity: m(Number)
4644
4660
  },
4645
- setup() {
4661
+ setup(i, { attrs: e }) {
4646
4662
  return {
4663
+ attrs: V(e),
4647
4664
  polygon: void 0
4648
4665
  };
4649
4666
  },
4650
4667
  watch: {
4651
- paths(i) {
4652
- this.polygon.setPaths(i);
4668
+ paths: {
4669
+ handler(i) {
4670
+ this.polygon.setPaths(i);
4671
+ },
4672
+ deep: !0
4653
4673
  },
4654
4674
  clickable() {
4655
4675
  this.recreate();
@@ -4677,12 +4697,13 @@ const vi = /* @__PURE__ */ G(fi, [["render", yi]]), _i = C({
4677
4697
  }
4678
4698
  },
4679
4699
  onCreate() {
4680
- this.polygon = this.$map.createPolygon(this), this.$map.addOverlay(this.polygon), R.call(this, this.polygon);
4700
+ this.polygon = this.$map.createPolygon(this), this.$map.addOverlay(this.polygon), F(this.attrs.listeners, this.polygon);
4681
4701
  },
4682
4702
  onDestroy() {
4683
4703
  this.$map.removeOverlay(this.polygon);
4684
4704
  }
4685
- }), Mi = C({
4705
+ }), vi = C({
4706
+ inheritAttrs: !1,
4686
4707
  name: "tg-polyline",
4687
4708
  mixins: [w],
4688
4709
  props: {
@@ -4694,14 +4715,18 @@ const vi = /* @__PURE__ */ G(fi, [["render", yi]]), _i = C({
4694
4715
  strokeWeight: m(Number),
4695
4716
  visible: m(Boolean)
4696
4717
  },
4697
- setup() {
4718
+ setup(i, { attrs: e }) {
4698
4719
  return {
4720
+ attrs: V(e),
4699
4721
  polyline: void 0
4700
4722
  };
4701
4723
  },
4702
4724
  watch: {
4703
- path(i) {
4704
- this.polyline.setPath(i);
4725
+ path: {
4726
+ handler(i) {
4727
+ this.polyline.setPath(i);
4728
+ },
4729
+ deep: !0
4705
4730
  },
4706
4731
  clickable() {
4707
4732
  this.recreate();
@@ -4723,12 +4748,12 @@ const vi = /* @__PURE__ */ G(fi, [["render", yi]]), _i = C({
4723
4748
  }
4724
4749
  },
4725
4750
  onCreate() {
4726
- this.polyline = this.$map.createPolyline(this), this.$map.addOverlay(this.polyline), R.call(this, this.polyline);
4751
+ this.polyline = this.$map.createPolyline(this), this.$map.addOverlay(this.polyline), F(this.attrs.listeners, this.polyline);
4727
4752
  },
4728
4753
  onDestroy() {
4729
4754
  this.$map.removeOverlay(this.polyline);
4730
4755
  }
4731
- }), bi = ["beforeUpdate", "updated"], Ai = {
4756
+ }), _i = ["beforeUpdate", "updated"], Ai = {
4732
4757
  install(i, e = {}) {
4733
4758
  if (e.enable !== !1) {
4734
4759
  const t = C({
@@ -4738,10 +4763,10 @@ const vi = /* @__PURE__ */ G(fi, [["render", yi]]), _i = C({
4738
4763
  }
4739
4764
  },
4740
4765
  beforeCreate() {
4741
- const r = this.$options.name || this.$options._componentTag || "", o = (e.nameRegex || /^[A-Z]/).test(r) ? (a) => {
4742
- e.hookNames ? e.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : bi.includes(a) || console.debug("[lifecycle]", r, a);
4766
+ const r = this.$options.name || this.$options._componentTag || "", n = (e.nameRegex || /^[A-Z]/).test(r) ? (a) => {
4767
+ e.hookNames ? e.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : _i.includes(a) || console.debug("[lifecycle]", r, a);
4743
4768
  } : fe;
4744
- o("beforeCreate"), this.__life_impl = o;
4769
+ n("beforeCreate"), this.__life_impl = n;
4745
4770
  },
4746
4771
  created() {
4747
4772
  this.__life("created");
@@ -4764,11 +4789,11 @@ const vi = /* @__PURE__ */ G(fi, [["render", yi]]), _i = C({
4764
4789
  updated() {
4765
4790
  this.__life("updated");
4766
4791
  },
4767
- beforeDestroy() {
4768
- this.__life("beforeDestroy");
4792
+ beforeUnmount() {
4793
+ this.__life("beforeUnmount");
4769
4794
  },
4770
- destroyed() {
4771
- this.__life("destroyed");
4795
+ unmounted() {
4796
+ this.__life("unmounted");
4772
4797
  }
4773
4798
  });
4774
4799
  i.mixin(t);
@@ -4776,110 +4801,111 @@ const vi = /* @__PURE__ */ G(fi, [["render", yi]]), _i = C({
4776
4801
  }
4777
4802
  }, zi = {
4778
4803
  install(i, e) {
4779
- Nr(e);
4780
- const t = /* @__PURE__ */ Object.assign({ "./TgMap.vue": Nt, "./TgMapWidget.vue": Kr, "./controls/TgCustomControl.vue": Jr, "./controls/TgMapTypeControl.vue": Qr, "./controls/TgScaleControl.vue": ei, "./controls/TgZoomControl.vue": ti, "./extra/TgMarkerClusterer.vue": Gt, "./layers/TgTrafficLayer.vue": pi, "./overlays/TgCircle.vue": ui, "./overlays/TgElementOverlay.vue": vi, "./overlays/TgInfoBox.vue": Zt, "./overlays/TgInfoWindow.vue": Dt, "./overlays/TgLabel.vue": Rt, "./overlays/TgMarker.vue": de, "./overlays/TgPolygon.vue": _i, "./overlays/TgPolyline.vue": Mi });
4804
+ Sr(e);
4805
+ const t = /* @__PURE__ */ Object.assign({ "./TgMap.vue": Dt, "./TgMapWidget.vue": Vr, "./controls/TgCustomControl.vue": Ur, "./controls/TgMapTypeControl.vue": Yr, "./controls/TgScaleControl.vue": Kr, "./controls/TgZoomControl.vue": qr, "./extra/TgMarkerClusterer.vue": Zt, "./layers/TgTrafficLayer.vue": Qr, "./overlays/TgCircle.vue": ei, "./overlays/TgElementOverlay.vue": ni, "./overlays/TgInfoBox.vue": ci, "./overlays/TgInfoWindow.vue": ui, "./overlays/TgLabel.vue": fi, "./overlays/TgMarker.vue": we, "./overlays/TgPolygon.vue": yi, "./overlays/TgPolyline.vue": vi });
4781
4806
  Object.keys(t).forEach((s) => {
4782
- var a;
4783
- const o = t[s];
4784
- i.component(((a = o.options) == null ? void 0 : a.name) ?? o.name, o);
4807
+ const n = t[s];
4808
+ i.component(n.name ?? x(`Tg开头的组件必须设置name: ${s}`), n);
4785
4809
  });
4786
4810
  const r = i.config.optionMergeStrategies;
4787
- r[Ie] = r[Pe] = r.created;
4811
+ r[Le] = r[Be] = (s, n) => s ? [...new Set([].concat(s, n))] : n;
4788
4812
  }
4789
4813
  };
4790
4814
  export {
4791
- Lt as AbstractControl,
4792
- Re as AbstractMap,
4793
- Se as Arrays,
4794
- Ue as BaiduCircle,
4795
- Ke as BaiduControl,
4796
- lt as BaiduInfoBoxOverlay,
4797
- st as BaiduInfoWindow,
4798
- Xe as BaiduMapTypeControl,
4815
+ St as AbstractControl,
4816
+ Ze as AbstractMap,
4817
+ Me as Arrays,
4818
+ Ke as BaiduCircle,
4819
+ Xe as BaiduControl,
4820
+ ct as BaiduInfoBoxOverlay,
4821
+ ot as BaiduInfoWindow,
4822
+ Qe as BaiduMapTypeControl,
4799
4823
  he as BaiduMarker,
4800
- Tr as BaiduMarkerClusterer,
4801
- Oe as BaiduOverlay,
4802
- He as BaiduPolygon,
4803
- We as BaiduPolyline,
4804
- et as BaiduScaleControl,
4805
- Je as BaiduZoomControl,
4806
- yt as CachedValue,
4807
- x as ControlPosition,
4824
+ vr as BaiduMarkerClusterer,
4825
+ Ce as BaiduOverlay,
4826
+ Ue as BaiduPolygon,
4827
+ He as BaiduPolyline,
4828
+ rt as BaiduScaleControl,
4829
+ et as BaiduZoomControl,
4830
+ _t as CachedValue,
4831
+ E as ControlPosition,
4808
4832
  P as ControlPositionConverter,
4809
- Y as CoordType,
4810
- kr as CustomControl,
4811
- Er as FastFindValues,
4812
- Ye as GoogleCircle,
4813
- qe as GoogleControl,
4814
- ht as GoogleInfoBoxOverlay,
4815
- ot as GoogleInfoWindow,
4833
+ K as CoordType,
4834
+ Cr as CustomControl,
4835
+ Or as FastFindValues,
4836
+ qe as GoogleCircle,
4837
+ Je as GoogleControl,
4838
+ dt as GoogleInfoBoxOverlay,
4839
+ at as GoogleInfoWindow,
4816
4840
  me as GoogleMapTypeControl,
4817
- rt as GoogleMarker,
4818
- Or as GoogleMarkerClusterer,
4819
- Ze as GoogleOverlay,
4820
- Fe as GooglePolygon,
4821
- Ve as GooglePolyline,
4822
- tt as GoogleScaleControl,
4823
- Qe as GoogleZoomControl,
4841
+ st as GoogleMarker,
4842
+ _r as GoogleMarkerClusterer,
4843
+ je as GoogleOverlay,
4844
+ Ye as GooglePolygon,
4845
+ Fe as GooglePolyline,
4846
+ it as GoogleScaleControl,
4847
+ tt as GoogleZoomControl,
4824
4848
  ee as Icon,
4825
- it as InfoWindow,
4826
- ft as KeyValue,
4849
+ nt as InfoWindow,
4850
+ vt as KeyValue,
4827
4851
  y as LatLng,
4828
- W as LatLngBounds,
4852
+ j as LatLngBounds,
4829
4853
  Ai as LifecycleLogPlugin,
4830
- Ie as MIXIN_HOOK_CREATE,
4831
- Pe as MIXIN_HOOK_DESTROY,
4832
- _t as MIXIN_MAP_NAME,
4833
- Me as MVCArrays,
4854
+ Le as MIXIN_HOOK_CREATE,
4855
+ Be as MIXIN_HOOK_DESTROY,
4856
+ bt as MIXIN_MAP_NAME,
4857
+ be as MVCArrays,
4834
4858
  w as MapMixin,
4835
- Bt as MapTypeControlType,
4836
- kt as MarkerClusterer,
4859
+ $t as MapTypeControlType,
4860
+ Pt as MarkerClusterer,
4837
4861
  le as Objects,
4838
- Pt as Overlay,
4862
+ Bt as Overlay,
4839
4863
  ce as Point,
4840
4864
  ye as Strings,
4841
- ui as TgCircle,
4842
- Jr as TgCustomControl,
4843
- vi as TgElementOverlay,
4844
- Zt as TgInfoBox,
4845
- Dt as TgInfoWindow,
4846
- Rt as TgLabel,
4847
- Nt as TgMap,
4848
- ze as TgMapFactory,
4865
+ ei as TgCircle,
4866
+ Ur as TgCustomControl,
4867
+ ni as TgElementOverlay,
4868
+ ci as TgInfoBox,
4869
+ ui as TgInfoWindow,
4870
+ fi as TgLabel,
4871
+ Dt as TgMap,
4872
+ Ne as TgMapFactory,
4849
4873
  $ as TgMapType,
4850
- Qr as TgMapTypeControl,
4851
- Kr as TgMapWidget,
4852
- de as TgMarker,
4853
- Gt as TgMarkerClusterer,
4854
- _i as TgPolygon,
4855
- Mi as TgPolyline,
4856
- ei as TgScaleControl,
4857
- pi as TgTrafficLayer,
4858
- ti as TgZoomControl,
4874
+ Yr as TgMapTypeControl,
4875
+ Vr as TgMapWidget,
4876
+ we as TgMarker,
4877
+ Zt as TgMarkerClusterer,
4878
+ yi as TgPolygon,
4879
+ vi as TgPolyline,
4880
+ Kr as TgScaleControl,
4881
+ Qr as TgTrafficLayer,
4882
+ qr as TgZoomControl,
4859
4883
  ue as callHook,
4860
- xi as computedSaveOnThis,
4861
- rr as createEmptyVNode,
4862
- tr as createPropertyObject,
4863
- Ei as createPropertyObjectTyped,
4864
- wi as debug,
4884
+ wi as computedSaveOnThis,
4885
+ Jt as createEmptyVNode,
4886
+ Xt as createPropertyObject,
4887
+ xi as createPropertyObjectTyped,
4888
+ Oi as debug,
4865
4889
  zi as default,
4866
- ki as eventLogMethods,
4867
- we as findByComponentType,
4868
- zt as getTgMapConfig,
4869
- Qt as isDef,
4890
+ Ii as eventLogMethods,
4891
+ ki as extractVNodeFromSlotsByComponent,
4892
+ Ei as findByComponentType,
4893
+ Rt as getTgMapConfig,
4894
+ Ci as isDef,
4870
4895
  Li as isInstanceOf,
4871
- Ii as lateinit,
4896
+ Pi as lateinit,
4872
4897
  fe as noop,
4873
4898
  m as optionalProp,
4874
4899
  z as requiredProp,
4875
4900
  Bi as safeAs,
4876
- re as safeAsComponent,
4877
- Nr as setTgMapConfig,
4878
- V as stringEnumProp,
4879
- er as stringEnumPropFromArray,
4880
- I as throwError,
4881
- Jt as throwUnsupported,
4882
- Ci as todo,
4883
- Pi as typed
4901
+ de as safeAsComponent,
4902
+ Sr as setTgMapConfig,
4903
+ V as splitAttrs,
4904
+ W as stringEnumProp,
4905
+ qt as stringEnumPropFromArray,
4906
+ x as throwError,
4907
+ Kt as throwUnsupported,
4908
+ Ti as todo,
4909
+ gt as typed
4884
4910
  };
4885
4911
  //# sourceMappingURL=tg-map.js.map