tg-map-vue3 3.7.3 → 3.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/tg-map.js CHANGED
@@ -2,7 +2,7 @@
2
2
  var Ar = Object.defineProperty;
3
3
  var Rr = (i, t, e) => t in i ? Ar(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
4
4
  var c = (i, t, e) => (Rr(i, typeof t != "symbol" ? t + "" : t, e), e);
5
- import { createCommentVNode as it, computed as Xt, defineComponent as w, markRaw as $r, watch as Jt, openBlock as F, createElementBlock as U, mergeProps as ge, createElementVNode as zr, normalizeClass as Ve, renderSlot as W, normalizeStyle as Dr, getCurrentInstance as Nr, inject as Gr, onMounted as Zr, onBeforeUnmount as Wr, toRaw as Fe, withDirectives as jr, vShow as Hr } from "vue";
5
+ import { createCommentVNode as it, computed as Xt, defineComponent as w, markRaw as $r, watch as Jt, openBlock as F, createElementBlock as U, mergeProps as me, createElementVNode as zr, normalizeClass as Ve, renderSlot as W, normalizeStyle as Dr, getCurrentInstance as Nr, inject as Gr, onMounted as Zr, onBeforeUnmount as Wr, toRaw as Fe, withDirectives as Hr, vShow as jr } from "vue";
6
6
  function Y(i, t, e) {
7
7
  Object.keys(i).forEach((r) => {
8
8
  r.startsWith("update:") || e != null && e.includes(r) || t.addEventListener(r, i[r]);
@@ -25,11 +25,11 @@ var er = { exports: {} };
25
25
  i.exports ? i.exports = e() : t.coordtransform = e();
26
26
  })(Qt, function() {
27
27
  var t = 52.35987755982988, e = 3.141592653589793, r = 6378245, s = 0.006693421622965943;
28
- function n(g, f, v, O) {
29
- this.west = Math.min(g, v), this.north = Math.max(f, O), this.east = Math.max(g, v), this.south = Math.min(f, O);
28
+ function n(g, y, b, O) {
29
+ this.west = Math.min(g, b), this.north = Math.max(y, O), this.east = Math.max(g, b), this.south = Math.min(y, O);
30
30
  }
31
- n.prototype.contain = function(g, f) {
32
- return this.west <= g && this.east >= g && this.north >= f && this.south <= f;
31
+ n.prototype.contain = function(g, y) {
32
+ return this.west <= g && this.east >= g && this.north >= y && this.south <= y;
33
33
  };
34
34
  var a = [
35
35
  new n(79.4462, 49.2204, 96.33, 42.8899),
@@ -38,7 +38,7 @@ var er = { exports: {} };
38
38
  new n(82.9684, 29.5297, 97.0352, 26.7186),
39
39
  new n(97.0253, 29.5297, 124.367395, 20.414096),
40
40
  new n(107.975793, 20.414096, 111.744104, 17.871542)
41
- ], h = [
41
+ ], d = [
42
42
  new n(119.921265, 25.398623, 122.497559, 21.785006),
43
43
  new n(101.8652, 22.284, 106.665, 20.0988),
44
44
  new n(106.4525, 21.5422, 108.051, 20.4878),
@@ -47,93 +47,93 @@ var er = { exports: {} };
47
47
  new n(131.2662, 44.8922, 137.0227, 42.5692),
48
48
  new n(73.1246, 35.398637, 77.948114, 29.5297)
49
49
  ];
50
- function o(g, f) {
51
- for (var v = 0; v < a.length; v++)
52
- if (a[v].contain(g, f)) {
53
- for (var O = 0; O < h.length; O++)
54
- if (h[O].contain(g, f))
50
+ function o(g, y) {
51
+ for (var b = 0; b < a.length; b++)
52
+ if (a[b].contain(g, y)) {
53
+ for (var O = 0; O < d.length; O++)
54
+ if (d[O].contain(g, y))
55
55
  return !1;
56
56
  return !0;
57
57
  }
58
58
  return !1;
59
59
  }
60
- function l(g, f) {
61
- var v = g - 65e-4, O = f - 6e-3, P = Math.sqrt(v * v + O * O) - 2e-5 * Math.sin(O * t), E = Math.atan2(O, v) - 3e-6 * Math.cos(v * t), Q = P * Math.cos(E), ie = P * Math.sin(E);
62
- return [Q, ie];
60
+ function l(g, y) {
61
+ var b = g - 65e-4, O = y - 6e-3, P = Math.sqrt(b * b + O * O) - 2e-5 * Math.sin(O * t), E = Math.atan2(O, b) - 3e-6 * Math.cos(b * t), ee = P * Math.cos(E), se = P * Math.sin(E);
62
+ return [ee, se];
63
63
  }
64
- function d(g, f) {
65
- var v = Math.sqrt(g * g + f * f) + 2e-5 * Math.sin(f * t), O = Math.atan2(f, g) + 3e-6 * Math.cos(g * t), P = v * Math.cos(O) + 65e-4, E = v * Math.sin(O) + 6e-3;
64
+ function h(g, y) {
65
+ var b = Math.sqrt(g * g + y * y) + 2e-5 * Math.sin(y * t), O = Math.atan2(y, g) + 3e-6 * Math.cos(g * t), P = b * Math.cos(O) + 65e-4, E = b * Math.sin(O) + 6e-3;
66
66
  return [P, E];
67
67
  }
68
- function u(g, f) {
69
- return o(g, f) ? b(g, f) : [g, f];
68
+ function u(g, y) {
69
+ return o(g, y) ? f(g, y) : [g, y];
70
70
  }
71
- function p(g, f) {
72
- if (!o(g, f))
73
- return [g, f];
74
- var v = b(g, f);
75
- return [g * 2 - v[0], f * 2 - v[1]];
71
+ function p(g, y) {
72
+ if (!o(g, y))
73
+ return [g, y];
74
+ var b = f(g, y);
75
+ return [g * 2 - b[0], y * 2 - b[1]];
76
76
  }
77
- function b(g, f) {
78
- var v = _(g - 105, f - 35), O = T(g - 105, f - 35), P = f / 180 * e, E = Math.sin(P);
77
+ function f(g, y) {
78
+ var b = _(g - 105, y - 35), O = M(g - 105, y - 35), P = y / 180 * e, E = Math.sin(P);
79
79
  E = 1 - s * E * E;
80
- var Q = Math.sqrt(E);
81
- v = v * 180 / (r * (1 - s) / (E * Q) * e), O = O * 180 / (r / Q * Math.cos(P) * e);
82
- var ie = f + v, Xe = g + O;
83
- return [Xe, ie];
80
+ var ee = Math.sqrt(E);
81
+ b = b * 180 / (r * (1 - s) / (E * ee) * e), O = O * 180 / (r / ee * Math.cos(P) * e);
82
+ var se = y + b, Xe = g + O;
83
+ return [Xe, se];
84
84
  }
85
- function _(g, f) {
86
- var v = -100 + 2 * g + 3 * f + 0.2 * f * f + 0.1 * g * f + 0.2 * Math.sqrt(Math.abs(g));
87
- return v += (20 * Math.sin(6 * g * e) + 20 * Math.sin(2 * g * e)) * 2 / 3, v += (20 * Math.sin(f * e) + 40 * Math.sin(f / 3 * e)) * 2 / 3, v += (160 * Math.sin(f / 12 * e) + 320 * Math.sin(f * e / 30)) * 2 / 3, v;
85
+ function _(g, y) {
86
+ var b = -100 + 2 * g + 3 * y + 0.2 * y * y + 0.1 * g * y + 0.2 * Math.sqrt(Math.abs(g));
87
+ return b += (20 * Math.sin(6 * g * e) + 20 * Math.sin(2 * g * e)) * 2 / 3, b += (20 * Math.sin(y * e) + 40 * Math.sin(y / 3 * e)) * 2 / 3, b += (160 * Math.sin(y / 12 * e) + 320 * Math.sin(y * e / 30)) * 2 / 3, b;
88
88
  }
89
- function T(g, f) {
90
- var v = 300 + g + 2 * f + 0.1 * g * g + 0.1 * g * f + 0.1 * Math.sqrt(Math.abs(g));
91
- return v += (20 * Math.sin(6 * g * e) + 20 * Math.sin(2 * g * e)) * 2 / 3, v += (20 * Math.sin(g * e) + 40 * Math.sin(g / 3 * e)) * 2 / 3, v += (150 * Math.sin(g / 12 * e) + 300 * Math.sin(g / 30 * e)) * 2 / 3, v;
89
+ function M(g, y) {
90
+ var b = 300 + g + 2 * y + 0.1 * g * g + 0.1 * g * y + 0.1 * Math.sqrt(Math.abs(g));
91
+ return b += (20 * Math.sin(6 * g * e) + 20 * Math.sin(2 * g * e)) * 2 / 3, b += (20 * Math.sin(g * e) + 40 * Math.sin(g / 3 * e)) * 2 / 3, b += (150 * Math.sin(g / 12 * e) + 300 * Math.sin(g / 30 * e)) * 2 / 3, b;
92
92
  }
93
93
  return {
94
94
  // 向前兼容
95
95
  bd09togcj02: l,
96
- gcj02tobd09: d,
96
+ gcj02tobd09: h,
97
97
  wgs84togcj02: u,
98
98
  gcj02towgs84: p,
99
99
  // 小驼峰命名风格
100
100
  bd09ToGcj02: l,
101
- gcj02ToBd09: d,
101
+ gcj02ToBd09: h,
102
102
  wgs84ToGcj02: u,
103
103
  gcj02ToWgs84: p,
104
- bd09ToWgs84: function(g, f) {
105
- if (!o(g, f))
106
- return [g, f];
107
- var v = l(g, f);
108
- return p(v[0], v[1]);
104
+ bd09ToWgs84: function(g, y) {
105
+ if (!o(g, y))
106
+ return [g, y];
107
+ var b = l(g, y);
108
+ return p(b[0], b[1]);
109
109
  },
110
- wgs84ToBd09: function(g, f) {
111
- if (!o(g, f))
112
- return [g, f];
113
- var v = u(g, f);
114
- return d(v[0], v[1]);
110
+ wgs84ToBd09: function(g, y) {
111
+ if (!o(g, y))
112
+ return [g, y];
113
+ var b = u(g, y);
114
+ return h(b[0], b[1]);
115
115
  }
116
116
  };
117
117
  });
118
118
  })(er);
119
119
  var Ur = er.exports;
120
- const se = /* @__PURE__ */ ct(Ur);
121
- function oe(i, t) {
120
+ const ne = /* @__PURE__ */ ct(Ur);
121
+ function ae(i, t) {
122
122
  if (!i)
123
123
  throw new Error(`AssertionError: ${t}`);
124
124
  }
125
125
  function st(i) {
126
126
  throw new Error(`Unexpected object: ${i}`);
127
127
  }
128
- function zs() {
128
+ function Gs() {
129
129
  }
130
130
  function nt(i) {
131
131
  return i;
132
132
  }
133
- function Ds(i, t) {
133
+ function Zs(i, t) {
134
134
  return i instanceof t;
135
135
  }
136
- function Ns(i, t) {
136
+ function Ws(i, t) {
137
137
  if (i instanceof t)
138
138
  return i;
139
139
  }
@@ -153,7 +153,7 @@ function dt(i, t, e) {
153
153
  r = r.$parent;
154
154
  }
155
155
  }
156
- function Gs(i) {
156
+ function Hs(i) {
157
157
  return i;
158
158
  }
159
159
  function C(i) {
@@ -162,22 +162,26 @@ function C(i) {
162
162
  function ut(i) {
163
163
  throw new Error(`Unsupported: ${i}`);
164
164
  }
165
- function Zs(i) {
165
+ function js(i) {
166
166
  throw new Error(`todo: ${i}`);
167
167
  }
168
- function Ws(i) {
168
+ function Vs(i) {
169
169
  return i;
170
170
  }
171
- function Me(...i) {
171
+ function Oe(...i) {
172
172
  }
173
- function js(i) {
173
+ function Fs(i) {
174
174
  return i != null;
175
175
  }
176
176
  function Yr(i) {
177
177
  return i[1] != null;
178
178
  }
179
+ function qr(i) {
180
+ let t = null;
181
+ return () => t ?? (t = i().catch((e) => (t = null, Promise.reject(e))));
182
+ }
179
183
  var x = /* @__PURE__ */ ((i) => (i.wgs84 = "wgs84", i.gcj02 = "gcj02", i.bd09 = "bd09", i))(x || {});
180
- const Qe = "wgs84", B = class {
184
+ const Qe = "wgs84", I = class {
181
185
  constructor(t, e, r) {
182
186
  this.lat = t, this.lng = e, this.coord = r;
183
187
  }
@@ -199,23 +203,23 @@ const Qe = "wgs84", B = class {
199
203
  }
200
204
  /** @param coord Baidu Map的坐标一般都是bd09 */
201
205
  static fromBaidu(t, e) {
202
- return new B(t.lat, t.lng, e);
206
+ return new I(t.lat, t.lng, e);
203
207
  }
204
208
  /** @param coord Google Map的坐标依据地图类型不同是不一样的 */
205
209
  static fromGoogle(t, e) {
206
- return new B(t.lat(), t.lng(), e);
210
+ return new I(t.lat(), t.lng(), e);
207
211
  }
208
212
  static fromHere(t, e) {
209
- return new B(t.lat, t.lng, e);
213
+ return new I(t.lat, t.lng, e);
210
214
  }
211
215
  static fromLiteral(t) {
212
- return new B(t.lat, t.lng, t.coord || Qe);
216
+ return new I(t.lat, t.lng, t.coord || Qe);
213
217
  }
214
218
  static fromLngLat(t, e, r = Qe) {
215
- return new B(e, t, r);
219
+ return new I(e, t, r);
216
220
  }
217
221
  static create(t, e, r = Qe) {
218
- return new B(t, e, r);
222
+ return new I(t, e, r);
219
223
  }
220
224
  /** 转换坐标到指定坐标系 */
221
225
  to(t) {
@@ -223,7 +227,7 @@ const Qe = "wgs84", B = class {
223
227
  if (this.coord === e)
224
228
  return this;
225
229
  const [r, s] = this._convert(e);
226
- return new B(s, r, e);
230
+ return new I(s, r, e);
227
231
  }
228
232
  /**
229
233
  * TODO: normalize要不要默认设为true, 和google的行为保持一致?
@@ -233,7 +237,7 @@ const Qe = "wgs84", B = class {
233
237
  */
234
238
  toBaidu(t, e = !1) {
235
239
  let r = this.lat, s = this.lng;
236
- return this.coord !== t && ([s, r] = this._convert(t)), e && ([s, r] = B._normalize(s, r)), new BMap.Point(s, r);
240
+ return this.coord !== t && ([s, r] = this._convert(t)), e && ([s, r] = I._normalize(s, r)), new BMap.Point(s, r);
237
241
  }
238
242
  /**
239
243
  * 转换成google的经纬度, 内部会自动进行标准化
@@ -259,11 +263,11 @@ const Qe = "wgs84", B = class {
259
263
  _convert(t) {
260
264
  switch (this.coord) {
261
265
  case "bd09":
262
- return t === "gcj02" ? se.bd09ToGcj02(this.lng, this.lat) : se.bd09ToWgs84(this.lng, this.lat);
266
+ return t === "gcj02" ? ne.bd09ToGcj02(this.lng, this.lat) : ne.bd09ToWgs84(this.lng, this.lat);
263
267
  case "gcj02":
264
- return t === "wgs84" ? se.gcj02ToWgs84(this.lng, this.lat) : se.gcj02ToBd09(this.lng, this.lat);
268
+ return t === "wgs84" ? ne.gcj02ToWgs84(this.lng, this.lat) : ne.gcj02ToBd09(this.lng, this.lat);
265
269
  case "wgs84":
266
- return t === "bd09" ? se.wgs84ToBd09(this.lng, this.lat) : se.wgs84ToGcj02(this.lng, this.lat);
270
+ return t === "bd09" ? ne.wgs84ToBd09(this.lng, this.lat) : ne.wgs84ToGcj02(this.lng, this.lat);
267
271
  }
268
272
  throw new Error(`不支持的坐标转换: ${this.coord}=>${t}`);
269
273
  }
@@ -272,8 +276,8 @@ const Qe = "wgs84", B = class {
272
276
  * @see _normalize {@macro latlng_normalize}
273
277
  */
274
278
  normalize() {
275
- const [t, e] = B._normalize(this.lng, this.lat);
276
- return e === this.lat && t === this.lng ? this : new B(e, t, this.coord);
279
+ const [t, e] = I._normalize(this.lng, this.lat);
280
+ return e === this.lat && t === this.lng ? this : new I(e, t, this.coord);
277
281
  }
278
282
  equals(t) {
279
283
  return this === t ? !0 : this.lat === t.lat && this.lng === t.lng && this.coord === t.coord;
@@ -282,9 +286,9 @@ const Qe = "wgs84", B = class {
282
286
  return JSON.stringify(this);
283
287
  }
284
288
  };
285
- let y = B;
286
- c(y, "ZERO", B.create(0, 0));
287
- const te = class {
289
+ let v = I;
290
+ c(v, "ZERO", I.create(0, 0));
291
+ const re = class {
288
292
  /**
289
293
  * 不推荐直接创建LatLngBounds, sw和ne的大小关系可能没法保证, 推荐用LatLngBounds.Builder或者LatLngBounds.from等静态方法来创建
290
294
  * @param sw 西南, lat/lng更小
@@ -292,7 +296,7 @@ const te = class {
292
296
  */
293
297
  constructor(t, e) {
294
298
  c(this, "coord");
295
- this.sw = t, this.ne = e, oe(t.coord === e.coord, "sw和ne的coord应该相同"), oe(Number.isFinite(t.lat) && Number.isFinite(t.lng) && Number.isFinite(e.lat) && Number.isFinite(e.lng), `sw(${t})和ne(${e})不能包含NaN或Infinite`), oe(t.lat <= e.lat, `sw.lat(${t.lat})应该比ne.lat(${e.lat})小`), this.coord = t.coord;
299
+ this.sw = t, this.ne = e, ae(t.coord === e.coord, "sw和ne的coord应该相同"), ae(Number.isFinite(t.lat) && Number.isFinite(t.lng) && Number.isFinite(e.lat) && Number.isFinite(e.lng), `sw(${t})和ne(${e})不能包含NaN或Infinite`), ae(t.lat <= e.lat, `sw.lat(${t.lat})应该比ne.lat(${e.lat})小`), this.coord = t.coord;
296
300
  }
297
301
  static isBetweenLng(t, e, r) {
298
302
  return t <= e ? t <= r && r <= e : t <= r || r <= e;
@@ -300,7 +304,7 @@ const te = class {
300
304
  static fromArray(t) {
301
305
  if (t.length === 0)
302
306
  return;
303
- const e = new te.Builder(t[0]);
307
+ const e = new re.Builder(t[0]);
304
308
  for (let r = 1; r < t.length; r++)
305
309
  e.include(t[r]);
306
310
  return e.build();
@@ -309,15 +313,15 @@ const te = class {
309
313
  return this.fromArray(t) ?? C("positions中没有点");
310
314
  }
311
315
  static fromGoogle(t, e) {
312
- return new te(
313
- y.fromGoogle(t.getSouthWest(), e),
314
- y.fromGoogle(t.getNorthEast(), e)
316
+ return new re(
317
+ v.fromGoogle(t.getSouthWest(), e),
318
+ v.fromGoogle(t.getNorthEast(), e)
315
319
  );
316
320
  }
317
321
  static fromBaidu(t, e) {
318
- return new te(
319
- y.fromBaidu(t.getSouthWest(), e),
320
- y.fromBaidu(t.getNorthEast(), e)
322
+ return new re(
323
+ v.fromBaidu(t.getSouthWest(), e),
324
+ v.fromBaidu(t.getNorthEast(), e)
321
325
  );
322
326
  }
323
327
  static create(t, e) {
@@ -328,13 +332,13 @@ const te = class {
328
332
  }
329
333
  contains(t) {
330
334
  const { lat: e, lng: r } = t.to(this.coord);
331
- return this.sw.lat <= e && e <= this.ne.lat && te.isBetweenLng(this.sw.lng, this.ne.lng, r);
335
+ return this.sw.lat <= e && e <= this.ne.lat && re.isBetweenLng(this.sw.lng, this.ne.lng, r);
332
336
  }
333
337
  getCenter() {
334
338
  if (this.sw.equals(this.ne))
335
339
  return this.sw;
336
340
  const t = (this.sw.lat + this.ne.lat) / 2, e = (this.sw.lng + this.ne.lng + (this.sw.lng < this.ne.lng ? 0 : 360)) / 2;
337
- return y.create(t, e, this.coord);
341
+ return v.create(t, e, this.coord);
338
342
  }
339
343
  toString() {
340
344
  return JSON.stringify(this);
@@ -350,9 +354,9 @@ const te = class {
350
354
  const t = this.sw.coord;
351
355
  return [
352
356
  this.sw,
353
- y.fromLngLat(this.sw.lng, this.ne.lat, t),
357
+ v.fromLngLat(this.sw.lng, this.ne.lat, t),
354
358
  this.ne,
355
- y.fromLngLat(this.ne.lng, this.sw.lat, t)
359
+ v.fromLngLat(this.ne.lng, this.sw.lat, t)
356
360
  ];
357
361
  }
358
362
  toGoogle(t) {
@@ -365,8 +369,8 @@ const te = class {
365
369
  return [this.sw.toBaidu(t), this.ne.toBaidu(t)];
366
370
  }
367
371
  };
368
- let R = te;
369
- c(R, "EMPTY", new te(y.ZERO, y.ZERO));
372
+ let R = re;
373
+ c(R, "EMPTY", new re(v.ZERO, v.ZERO));
370
374
  ((i) => {
371
375
  class t {
372
376
  constructor(r) {
@@ -380,9 +384,9 @@ c(R, "EMPTY", new te(y.ZERO, y.ZERO));
380
384
  build() {
381
385
  return new i(
382
386
  // sw对应min
383
- y.create(this.minLat, this.minLng, this.coord),
387
+ v.create(this.minLat, this.minLng, this.coord),
384
388
  // ne对应max
385
- y.create(this.maxLat, this.maxLng, this.coord)
389
+ v.create(this.maxLat, this.maxLng, this.coord)
386
390
  );
387
391
  }
388
392
  include(r) {
@@ -411,102 +415,6 @@ var V;
411
415
  }
412
416
  i.getCoordType = e;
413
417
  })(V || (V = {}));
414
- var qr = function(t) {
415
- return Kr(t) && !Xr(t);
416
- };
417
- function Kr(i) {
418
- return !!i && typeof i == "object";
419
- }
420
- function Xr(i) {
421
- var t = Object.prototype.toString.call(i);
422
- return t === "[object RegExp]" || t === "[object Date]" || ei(i);
423
- }
424
- var Jr = typeof Symbol == "function" && Symbol.for, Qr = Jr ? Symbol.for("react.element") : 60103;
425
- function ei(i) {
426
- return i.$$typeof === Qr;
427
- }
428
- function ti(i) {
429
- return Array.isArray(i) ? [] : {};
430
- }
431
- function Oe(i, t) {
432
- return t.clone !== !1 && t.isMergeableObject(i) ? le(ti(i), i, t) : i;
433
- }
434
- function ri(i, t, e) {
435
- return i.concat(t).map(function(r) {
436
- return Oe(r, e);
437
- });
438
- }
439
- function ii(i, t) {
440
- if (!t.customMerge)
441
- return le;
442
- var e = t.customMerge(i);
443
- return typeof e == "function" ? e : le;
444
- }
445
- function si(i) {
446
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(i).filter(function(t) {
447
- return Object.propertyIsEnumerable.call(i, t);
448
- }) : [];
449
- }
450
- function Wt(i) {
451
- return Object.keys(i).concat(si(i));
452
- }
453
- function rr(i, t) {
454
- try {
455
- return t in i;
456
- } catch {
457
- return !1;
458
- }
459
- }
460
- function ni(i, t) {
461
- return rr(i, t) && !(Object.hasOwnProperty.call(i, t) && Object.propertyIsEnumerable.call(i, t));
462
- }
463
- function oi(i, t, e) {
464
- var r = {};
465
- return e.isMergeableObject(i) && Wt(i).forEach(function(s) {
466
- r[s] = Oe(i[s], e);
467
- }), Wt(t).forEach(function(s) {
468
- ni(i, s) || (rr(i, s) && e.isMergeableObject(t[s]) ? r[s] = ii(s, e)(i[s], t[s], e) : r[s] = Oe(t[s], e));
469
- }), r;
470
- }
471
- function le(i, t, e) {
472
- e = e || {}, e.arrayMerge = e.arrayMerge || ri, e.isMergeableObject = e.isMergeableObject || qr, e.cloneUnlessOtherwiseSpecified = Oe;
473
- var r = Array.isArray(t), s = Array.isArray(i), n = r === s;
474
- return n ? r ? e.arrayMerge(i, t, e) : oi(i, t, e) : Oe(t, e);
475
- }
476
- le.all = function(t, e) {
477
- if (!Array.isArray(t))
478
- throw new Error("first argument should be an array");
479
- return t.reduce(function(r, s) {
480
- return le(r, s, e);
481
- }, {});
482
- };
483
- var ai = le, li = ai;
484
- const ir = /* @__PURE__ */ ct(li), ze = ["3.0"], hi = {
485
- baidu: {
486
- version: "3.0",
487
- // 在build时会被静态替换, 导致使用者不能无法设置它
488
- // @see https://cn.vitejs.dev/guide/build.html#library-mode:~:text=%E6%A8%A1%E5%BC%8F%E4%B8%8B%EF%BC%8C%E6%89%80%E6%9C%89-,({}).*,-%E7%94%A8%E6%B3%95%E5%9C%A8%E6%9E%84
489
- // @see @vite_process_env_detail
490
- key: "kXOq8Hg9BZbZEWAjXKuzd1oGreynup8h"
491
- },
492
- google: {
493
- version: "quarterly",
494
- key: "AIzaSyBcyzMel3dYFNcfcr0LOklbBQNpWycyZXo",
495
- language: "en-us",
496
- libraries: ["places"]
497
- },
498
- here: {
499
- version: ze[0],
500
- key: ""
501
- }
502
- };
503
- let sr;
504
- function nr() {
505
- return sr || C("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
506
- }
507
- function ci(i) {
508
- i != null && (sr = ir(hi, i));
509
- }
510
418
  var at;
511
419
  ((i) => {
512
420
  function t(e) {
@@ -516,35 +424,35 @@ var at;
516
424
  })(at || (at = {}));
517
425
  var he;
518
426
  ((i) => {
519
- function t(h, o) {
520
- return h.length === o.length && h.every((l, d) => l === o[d]);
427
+ function t(d, o) {
428
+ return d.length === o.length && d.every((l, h) => l === o[h]);
521
429
  }
522
430
  i.equals = t;
523
- function e(h, o) {
524
- const l = h.indexOf(o);
431
+ function e(d, o) {
432
+ const l = d.indexOf(o);
525
433
  if (l !== -1)
526
- return h.splice(l, 1)[0];
434
+ return d.splice(l, 1)[0];
527
435
  }
528
436
  i.remove = e;
529
- function r(h, o) {
530
- for (const l of h)
437
+ function r(d, o) {
438
+ for (const l of d)
531
439
  if (l instanceof o)
532
440
  return l;
533
441
  }
534
442
  i.findByType = r;
535
- function s(h, o) {
536
- return h.includes(o);
443
+ function s(d, o) {
444
+ return d.includes(o);
537
445
  }
538
446
  i.includesTyped = s;
539
- function n(h, o, l) {
540
- const d = o >= 0 ? o : h.length + o;
447
+ function n(d, o, l) {
448
+ const h = o >= 0 ? o : d.length + o;
541
449
  if (l === void 0)
542
- return h[d];
543
- h[d] = l;
450
+ return d[h];
451
+ d[h] = l;
544
452
  }
545
453
  i.at = n;
546
- function a(h) {
547
- return h.length > 0;
454
+ function a(d) {
455
+ return d.length > 0;
548
456
  }
549
457
  i.isNotEmpty = a;
550
458
  })(he || (he = {}));
@@ -552,9 +460,9 @@ var ce;
552
460
  ((i) => {
553
461
  function t(s, n) {
554
462
  const a = s.getLength();
555
- for (let h = 0; h < a; h++)
556
- if (s.getAt(h) === n)
557
- return h;
463
+ for (let d = 0; d < a; d++)
464
+ if (s.getAt(d) === n)
465
+ return d;
558
466
  return -1;
559
467
  }
560
468
  i.indexOf = t;
@@ -573,19 +481,19 @@ var ce;
573
481
  }
574
482
  i.listenChanged = r;
575
483
  })(ce || (ce = {}));
576
- function or(i, t, e) {
484
+ function rr(i, t, e) {
577
485
  return i.addListener(t, e).remove;
578
486
  }
579
- function di(i, t, e) {
487
+ function Kr(i, t, e) {
580
488
  return i.addEventListener(t, e), () => i.removeEventListener(t, e);
581
489
  }
582
- function ui(i, t, e, r) {
490
+ function Xr(i, t, e, r) {
583
491
  return i.addEventListener(t, e, r), () => i.removeEventListener(t, e, r);
584
492
  }
585
- function jt(i, t, e) {
493
+ function Wt(i, t, e) {
586
494
  return i.addEventListener(t, e), () => i.removeEventListener(t, e);
587
495
  }
588
- class ar {
496
+ class ir {
589
497
  constructor(t, e) {
590
498
  c(this, "eventMap", /* @__PURE__ */ new Map());
591
499
  c(this, "target", void 0);
@@ -597,7 +505,7 @@ class ar {
597
505
  }
598
506
  class Ue {
599
507
  constructor(t, e) {
600
- c(this, "eventHub", new lr());
508
+ c(this, "eventHub", new sr());
601
509
  this.delegate = t, this.options = e;
602
510
  }
603
511
  notify(t) {
@@ -624,7 +532,7 @@ class Ue {
624
532
  this.delegate.removeEventListener(t, e);
625
533
  }
626
534
  }
627
- const Zt = class extends ar {
535
+ const Zt = class extends ir {
628
536
  addEventListener(t, e) {
629
537
  const r = $e(t, e);
630
538
  if (this.eventMap.get(r)) {
@@ -637,7 +545,7 @@ const Zt = class extends ar {
637
545
  target: this.target,
638
546
  originalEvent: n
639
547
  };
640
- n != null && n.latLng && (a.position = y.fromGoogle(n.latLng, this.coordTypeSupplier.coordType)), e.call(this.target, a);
548
+ n != null && n.latLng && (a.position = v.fromGoogle(n.latLng, this.coordTypeSupplier.coordType)), e.call(this.target, a);
641
549
  });
642
550
  this.eventMap.set(r, s);
643
551
  }
@@ -646,9 +554,9 @@ const Zt = class extends ar {
646
554
  s ? (s.remove(), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, e);
647
555
  }
648
556
  };
649
- let re = Zt;
557
+ let ie = Zt;
650
558
  // 事件类型映射: tg => google
651
- c(re, "EVENT_TYPE_MAP", {
559
+ c(ie, "EVENT_TYPE_MAP", {
652
560
  "center-changed": "center_changed",
653
561
  "zoom-changed": "zoom_changed",
654
562
  "radius-changed": "radius_changed",
@@ -664,7 +572,7 @@ c(re, "EVENT_TYPE_MAP", {
664
572
  "map-mouseup": "mouseup",
665
573
  "map-dblclick": "dblclick"
666
574
  });
667
- const We = class extends ar {
575
+ const We = class extends ir {
668
576
  addEventListener(t, e) {
669
577
  const r = $e(t, e);
670
578
  if (this.eventMap.get(r)) {
@@ -677,7 +585,7 @@ const We = class extends ar {
677
585
  target: this.target,
678
586
  originalEvent: n
679
587
  };
680
- n.point && (a.position = y.fromBaidu(n.point, this.coordTypeSupplier.coordType)), e.call(this.target, a);
588
+ n.point && (a.position = v.fromBaidu(n.point, this.coordTypeSupplier.coordType)), e.call(this.target, a);
681
589
  };
682
590
  this.inner.addEventListener(We.EVENT_TYPE_MAP[t] || t, s), this.eventMap.set(r, s);
683
591
  }
@@ -686,10 +594,10 @@ const We = class extends ar {
686
594
  s ? (this.inner.removeEventListener(We.EVENT_TYPE_MAP[t] || t, s), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, e);
687
595
  }
688
596
  };
689
- let ae = We;
597
+ let le = We;
690
598
  // cSpell:words clickclose
691
599
  // 事件类型映射, tg => baidu
692
- c(ae, "EVENT_TYPE_MAP", {
600
+ c(le, "EVENT_TYPE_MAP", {
693
601
  drag: "dragging",
694
602
  closeclick: "clickclose",
695
603
  // baidu不支持contextmenu事件, 将其映射为rightclick
@@ -697,7 +605,7 @@ c(ae, "EVENT_TYPE_MAP", {
697
605
  "zoom-changed": "zoomend",
698
606
  "map-type-changed": "maptypechange"
699
607
  });
700
- class lr {
608
+ class sr {
701
609
  constructor() {
702
610
  c(this, "typeMap", /* @__PURE__ */ new Map());
703
611
  }
@@ -725,7 +633,7 @@ class Ht {
725
633
  constructor(t, e) {
726
634
  c(this, "keyToValue", /* @__PURE__ */ new Map());
727
635
  c(this, "valueToKey", /* @__PURE__ */ new Map());
728
- oe(t.length === e.length);
636
+ ae(t.length === e.length);
729
637
  for (let r = t.length - 1; r >= 0; r--)
730
638
  this.keyToValue.set(t[r], e[r]), this.valueToKey.set(e[r], t[r]);
731
639
  }
@@ -736,7 +644,7 @@ class Ht {
736
644
  return this.keyToValue.get(t) ?? C();
737
645
  }
738
646
  }
739
- class pi {
647
+ class Jr {
740
648
  constructor(t, e = 10) {
741
649
  c(this, "map", /* @__PURE__ */ new Map());
742
650
  this.values = t, this.maxSize4Debug = e;
@@ -765,7 +673,7 @@ class pi {
765
673
  return this.getOrNull(t, e) ?? C(`key(${e})不存在与valueMap(${this.getValueMap(t)})中`);
766
674
  }
767
675
  }
768
- class ve {
676
+ class _e {
769
677
  constructor(t) {
770
678
  c(this, "value");
771
679
  this.creator = t;
@@ -840,16 +748,16 @@ var S = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
840
748
  }
841
749
  i.getGoogle = n;
842
750
  })(z || (z = {}));
843
- class gi {
751
+ class Qr {
844
752
  constructor(t) {
845
753
  /** 实际添加到地图中的control对象 */
846
754
  c(this, "inner");
847
755
  this.position = t;
848
756
  }
849
757
  }
850
- class hr {
758
+ class nr {
851
759
  }
852
- class pt extends hr {
760
+ class pt extends nr {
853
761
  constructor(t, e) {
854
762
  super(), this.inner = t, this.position = e;
855
763
  }
@@ -872,7 +780,7 @@ class pt extends hr {
872
780
  t.innerMap.removeControl(this.inner);
873
781
  }
874
782
  }
875
- class gt extends hr {
783
+ class gt extends nr {
876
784
  constructor(e, r) {
877
785
  super();
878
786
  c(this, "visible", !1);
@@ -909,7 +817,7 @@ class gt extends hr {
909
817
  });
910
818
  }
911
819
  }
912
- var cr = /* @__PURE__ */ ((i) => (i.normal = "normal", i.satellite = "satellite", i.hybrid = "hybrid", i))(cr || {});
820
+ var or = /* @__PURE__ */ ((i) => (i.normal = "normal", i.satellite = "satellite", i.hybrid = "hybrid", i))(or || {});
913
821
  class A {
914
822
  constructor(t, e, r, s) {
915
823
  this.id = t, this.baidu = e, this.google = r, this.googleCoordType = s;
@@ -934,16 +842,16 @@ class A {
934
842
  ut("google的内置地图没有对应的实例");
935
843
  }
936
844
  }
937
- class Hs {
845
+ class Us {
938
846
  constructor(t, e) {
939
- c(this, "baiduLayerCached", new ve(() => {
847
+ c(this, "baiduLayerCached", new _e(() => {
940
848
  const t = new BMap.TileLayer({});
941
849
  return t.getTilesUrl = (e, r) => {
942
850
  const s = Math.pow(2, r - 1), n = e.x + s, a = s - 1 - e.y;
943
851
  return this.options.getTileUrl({ x: n, y: a }, r);
944
852
  }, t;
945
853
  }));
946
- c(this, "baiduMapTypeCached", new ve(() => {
854
+ c(this, "baiduMapTypeCached", new _e(() => {
947
855
  const t = new BMap.MapType(this.options.name, this.baiduLayerCached.get(), {
948
856
  maxZoom: this.options.maxZoom,
949
857
  minZoom: this.options.minZoom,
@@ -951,7 +859,7 @@ class Hs {
951
859
  });
952
860
  return t.__baidu_map_type__ = this, t;
953
861
  }));
954
- c(this, "googleCached", new ve(() => {
862
+ c(this, "googleCached", new _e(() => {
955
863
  const t = new google.maps.ImageMapType({
956
864
  getTileUrl: (e, r) => this.options.getTileUrl(e, r),
957
865
  tileSize: new google.maps.Size(256, 256),
@@ -986,10 +894,10 @@ class Hs {
986
894
  ut("这个方法不会被调用");
987
895
  }
988
896
  }
989
- class mi {
897
+ class ei {
990
898
  constructor() {
991
- c(this, "baiduCache", new ve(() => new BMap.TrafficLayer()));
992
- c(this, "googleCache", new ve(() => new google.maps.TrafficLayer()));
899
+ c(this, "baiduCache", new _e(() => new BMap.TrafficLayer()));
900
+ c(this, "googleCache", new _e(() => new google.maps.TrafficLayer()));
993
901
  }
994
902
  asBaiduLayer() {
995
903
  return this.baiduCache.get();
@@ -1006,13 +914,13 @@ var $;
1006
914
  ), () => (
1007
915
  /* 地形 */
1008
916
  google.maps.MapTypeId.TERRAIN
1009
- ), x.wgs84), i.BUILD_IN_MAP_TYPES = new pi([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
917
+ ), x.wgs84), i.BUILD_IN_MAP_TYPES = new Jr([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
1010
918
  })($ || ($ = {}));
1011
- var dr = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(dr || {});
1012
- const ur = [$.NORMAL, $.SATELLITE, $.HYBRID];
919
+ var ar = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(ar || {});
920
+ const lr = [$.NORMAL, $.SATELLITE, $.HYBRID];
1013
921
  class mt extends pt {
1014
922
  static create(t) {
1015
- const e = t.mapTypes ?? ur, r = {
923
+ const e = t.mapTypes ?? lr, r = {
1016
924
  default: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
1017
925
  horizontal: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
1018
926
  dropdown: BMAP_MAPTYPE_CONTROL_DROPDOWN
@@ -1023,20 +931,20 @@ class mt extends pt {
1023
931
  return t.position && s.setAnchor(z.getBaidu().toValue(t.position)), new mt(s, t.position);
1024
932
  }
1025
933
  }
1026
- const ne = class extends gt {
1027
- constructor(t = "default", e = S.TOP_LEFT, r = ur) {
1028
- super("mapType", e), this.type = t, this.mapTypes = r, ne.type2google || (ne.type2google = {
934
+ const oe = class extends gt {
935
+ constructor(t = "default", e = S.TOP_LEFT, r = lr) {
936
+ super("mapType", e), this.type = t, this.mapTypes = r, oe.type2google || (oe.type2google = {
1029
937
  default: google.maps.MapTypeControlStyle.DEFAULT,
1030
938
  horizontal: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
1031
939
  dropdown: google.maps.MapTypeControlStyle.DROPDOWN_MENU
1032
940
  });
1033
941
  }
1034
942
  static create(t) {
1035
- return new ne(t.type, t.position, t.mapTypes);
943
+ return new oe(t.type, t.position, t.mapTypes);
1036
944
  }
1037
945
  onCreateOptions() {
1038
946
  const t = super.onCreateOptions();
1039
- return t.style = ne.type2google[this.type], t.mapTypeIds = this.mapTypes.map((e) => e instanceof A ? e.getGoogleMapTypeId() : e.id), t;
947
+ return t.style = oe.type2google[this.type], t.mapTypeIds = this.mapTypes.map((e) => e instanceof A ? e.getGoogleMapTypeId() : e.id), t;
1040
948
  }
1041
949
  addTo(t) {
1042
950
  super.addTo(t), this.mapTypes.forEach((e) => {
@@ -1044,7 +952,7 @@ const ne = class extends gt {
1044
952
  });
1045
953
  }
1046
954
  };
1047
- let Se = ne;
955
+ let Se = oe;
1048
956
  c(Se, "type2google");
1049
957
  class ft extends pt {
1050
958
  static create(t) {
@@ -1080,28 +988,28 @@ class _t extends gt {
1080
988
  super("zoom", t);
1081
989
  }
1082
990
  }
1083
- function fi(i) {
991
+ function ti(i) {
1084
992
  let t, e, r;
1085
- const s = "The Google Maps JavaScript API", n = "google", a = "importLibrary", h = "__ib__", o = document, l = window, d = l[n] || (l[n] = {}), u = d.maps || (d.maps = {}), p = /* @__PURE__ */ new Set(), b = new URLSearchParams(), _ = () => t || (t = new Promise(async (T, g) => {
1086
- var f;
1087
- await (e = o.createElement("script")), b.set("libraries", [...p] + "");
993
+ const s = "The Google Maps JavaScript API", n = "google", a = "importLibrary", d = "__ib__", o = document, l = window, h = l[n] || (l[n] = {}), u = h.maps || (h.maps = {}), p = /* @__PURE__ */ new Set(), f = new URLSearchParams(), _ = () => t || (t = new Promise(async (M, g) => {
994
+ var y;
995
+ await (e = o.createElement("script")), f.set("libraries", [...p] + "");
1088
996
  for (r in i)
1089
- b.set(r.replace(/[A-Z]/g, (v) => "_" + v[0].toLowerCase()), i[r]);
1090
- b.set("callback", n + ".maps." + h), e.src = `https://maps.${n}apis.com/maps/api/js?` + b, u[h] = T, e.onerror = () => t = g(Error(s + " could not load.")), e.nonce = ((f = o.querySelector("script[nonce]")) == null ? void 0 : f.nonce) || "", o.head.append(e);
997
+ f.set(r.replace(/[A-Z]/g, (b) => "_" + b[0].toLowerCase()), i[r]);
998
+ f.set("callback", n + ".maps." + d), e.src = `https://maps.${n}apis.com/maps/api/js?` + f, u[d] = M, e.onerror = () => t = g(Error(s + " could not load.")), e.nonce = ((y = o.querySelector("script[nonce]")) == null ? void 0 : y.nonce) || "", o.head.append(e);
1091
999
  }));
1092
- u[a] ? console.warn(s + " only loads once. Ignoring:", i) : u[a] = (T, ...g) => p.add(T) && _().then(() => u[a](T, ...g));
1000
+ u[a] ? console.warn(s + " only loads once. Ignoring:", i) : u[a] = (M, ...g) => p.add(M) && _().then(() => u[a](M, ...g));
1093
1001
  }
1094
- let yi, vi;
1002
+ let ri, ii;
1095
1003
  const J = {
1096
1004
  /** Google的坐标0点 */
1097
1005
  get LATLNG_ZERO() {
1098
- return yi ?? (yi = new google.maps.LatLng({ lat: 0, lng: 0 }));
1006
+ return ri ?? (ri = new google.maps.LatLng({ lat: 0, lng: 0 }));
1099
1007
  },
1100
1008
  get BOUNDS_ZERO() {
1101
- return vi ?? (vi = new google.maps.LatLngBounds(this.LATLNG_ZERO, this.LATLNG_ZERO));
1009
+ return ii ?? (ii = new google.maps.LatLngBounds(this.LATLNG_ZERO, this.LATLNG_ZERO));
1102
1010
  }
1103
1011
  };
1104
- function pr(i, t = { country: "", province: "", city: "", district: "", street: "", streetNumber: "" }) {
1012
+ function hr(i, t = { country: "", province: "", city: "", district: "", street: "", streetNumber: "" }) {
1105
1013
  for (const e of i)
1106
1014
  for (const r of e.types)
1107
1015
  switch (r) {
@@ -1126,22 +1034,22 @@ function pr(i, t = { country: "", province: "", city: "", district: "", street:
1126
1034
  }
1127
1035
  return t;
1128
1036
  }
1129
- function gr(i, t) {
1037
+ function cr(i, t) {
1130
1038
  var r;
1131
- const e = i.address_components && pr(i.address_components);
1039
+ const e = i.address_components && hr(i.address_components);
1132
1040
  return {
1133
1041
  country: (e == null ? void 0 : e.country) ?? "",
1134
1042
  province: (e == null ? void 0 : e.province) ?? "",
1135
1043
  city: (e == null ? void 0 : e.city) ?? "",
1136
1044
  id: i.place_id ?? "",
1137
1045
  address: i.formatted_address ?? "",
1138
- position: y.fromGoogle(((r = i.geometry) == null ? void 0 : r.location) ?? J.LATLNG_ZERO, t.coordType),
1046
+ position: v.fromGoogle(((r = i.geometry) == null ? void 0 : r.location) ?? J.LATLNG_ZERO, t.coordType),
1139
1047
  title: i.name ?? ""
1140
1048
  };
1141
1049
  }
1142
- class mr {
1050
+ class dr {
1143
1051
  }
1144
- class _i extends mr {
1052
+ class si extends dr {
1145
1053
  constructor(e, r) {
1146
1054
  super();
1147
1055
  c(this, "inner");
@@ -1157,7 +1065,7 @@ class _i extends mr {
1157
1065
  this.inner.setBounds(e.toGoogle(this.map.coordType));
1158
1066
  }
1159
1067
  addResultListener(e) {
1160
- return or(this.inner, "place_changed", () => {
1068
+ return rr(this.inner, "place_changed", () => {
1161
1069
  const r = this.inner.getPlace(), s = {
1162
1070
  title: r.name ?? "",
1163
1071
  province: "",
@@ -1167,11 +1075,11 @@ class _i extends mr {
1167
1075
  streetNumber: "",
1168
1076
  country: ""
1169
1077
  };
1170
- r.address_components && pr(r.address_components, s), e(s);
1078
+ r.address_components && hr(r.address_components, s), e(s);
1171
1079
  });
1172
1080
  }
1173
1081
  }
1174
- class bi extends mr {
1082
+ class ni extends dr {
1175
1083
  constructor(e, r) {
1176
1084
  super();
1177
1085
  c(this, "inner");
@@ -1185,7 +1093,7 @@ class bi extends mr {
1185
1093
  const s = () => {
1186
1094
  this.inner.setLocation(this.map.innerMap);
1187
1095
  };
1188
- this.removeableArray.push(jt(this.map, "center-changed", s)), this.removeableArray.push(jt(this.map, "zoom-changed", s));
1096
+ this.removeableArray.push(Wt(this.map, "center-changed", s)), this.removeableArray.push(Wt(this.map, "zoom-changed", s));
1189
1097
  }
1190
1098
  }
1191
1099
  setBounds(e) {
@@ -1193,14 +1101,14 @@ class bi extends mr {
1193
1101
  }
1194
1102
  addResultListener(e) {
1195
1103
  let r = 0;
1196
- const s = di(this.inner, "confirm", (a) => {
1197
- const h = a.item.value;
1104
+ const s = Kr(this.inner, "confirm", (a) => {
1105
+ const d = a.item.value;
1198
1106
  r = Date.now(), e(Object.assign({
1199
- title: h.business,
1107
+ title: d.business,
1200
1108
  country: ""
1201
1109
  // Baidu的自动完成只支持中国
1202
- }, h));
1203
- }), n = ui(this.input, "keyup", (a) => {
1110
+ }, d));
1111
+ }), n = Xr(this.input, "keyup", (a) => {
1204
1112
  a.key === "Enter" && Date.now() - r > 100 && e({
1205
1113
  title: this.input.value,
1206
1114
  country: "",
@@ -1216,23 +1124,23 @@ class bi extends mr {
1216
1124
  };
1217
1125
  }
1218
1126
  }
1219
- class fr {
1127
+ class ur {
1220
1128
  constructor(t) {
1221
1129
  this.options = t;
1222
1130
  }
1223
1131
  }
1224
- function _e(i, t, e) {
1132
+ function be(i, t, e) {
1225
1133
  const r = new URL(t, i), s = new URLSearchParams(Object.entries(e).filter(Yr));
1226
1134
  return r.search = "?" + s.toString(), r;
1227
1135
  }
1228
1136
  function et() {
1229
- const i = window.location.hostname.split(".").filter((t) => !de.isInt(t));
1137
+ const i = window.location.hostname.split(".").filter((t) => !ue.isInt(t));
1230
1138
  return i.length === 3 ? i.join(".") : [...i, "tg", "map", "urls"].slice(0, 3).join(".");
1231
1139
  }
1232
- const je = class extends fr {
1140
+ const He = class extends ur {
1233
1141
  /** @see https://developers.google.com/maps/documentation/urls/get-started#directions-action */
1234
1142
  directions(t, e, r) {
1235
- return _e(je.BASE_URL, "dir/", {
1143
+ return be(He.BASE_URL, "dir/", {
1236
1144
  api: "1",
1237
1145
  // {@template google_map_normal_gcj02}
1238
1146
  // google地图的普通地图, 在国内其实上是gcj02坐标, 卫星地图是wgs84坐标, 因为这里打开的是基础地图, 故使用gcj02
@@ -1244,23 +1152,23 @@ const je = class extends fr {
1244
1152
  }
1245
1153
  /** @see https://developers.google.com/maps/documentation/urls/get-started#search-action */
1246
1154
  search(t) {
1247
- return _e(je.BASE_URL, "search/", {
1155
+ return be(He.BASE_URL, "search/", {
1248
1156
  api: "1",
1249
1157
  // {@macro google_map_normal_gcj02}
1250
1158
  query: V.toString(t, x.gcj02)
1251
1159
  });
1252
1160
  }
1253
1161
  };
1254
- let Ae = je;
1162
+ let Ae = He;
1255
1163
  c(Ae, "BASE_URL", "https://www.google.com/maps/");
1256
- const Te = class extends fr {
1164
+ const Te = class extends ur {
1257
1165
  /**
1258
1166
  * 导航
1259
1167
  * @see https://lbsyun.baidu.com/faq/api?title=webapi/uri/web#:~:text=%E6%9C%8D%E5%8A%A1%E5%9C%B0%E5%9D%80-,http%3A//api.map.baidu.com/direction,-//PC%26Webapp%E6%9C%8D%E5%8A%A1
1260
1168
  * */
1261
1169
  directions(t, e, r = "driving") {
1262
1170
  const s = V.getCoordType(e) ?? V.getCoordType(t) ?? x.bd09, n = V.toString(e, s);
1263
- return _e(Te.BASE_URL, "direction", {
1171
+ return be(Te.BASE_URL, "direction", {
1264
1172
  // baidu地图, 一定要有起点, 故这里用终点当起点, 防止导航失败
1265
1173
  origin: V.toString(t, s) ?? (typeof e != "string" ? `name:请选择起点|latlng:${n}` : n),
1266
1174
  destination: n,
@@ -1287,7 +1195,7 @@ const Te = class extends fr {
1287
1195
  * @see https://lbsyun.baidu.com/faq/api?title=webapi/uri/web#%E5%9B%BE%E5%8C%BA%E5%8A%9F%E8%83%BD
1288
1196
  */
1289
1197
  markerApi(t, e, r) {
1290
- return _e(Te.BASE_URL, "marker", {
1198
+ return be(Te.BASE_URL, "marker", {
1291
1199
  location: `${t.lat},${t.lng}`,
1292
1200
  coord_type: t.coord === x.bd09 ? void 0 : t.coord,
1293
1201
  title: e,
@@ -1301,7 +1209,7 @@ const Te = class extends fr {
1301
1209
  * @see https://lbsyun.baidu.com/faq/api?title=webapi/uri/web#%E5%9B%BE%E5%8C%BA%E5%8A%9F%E8%83%BD:~:text=%E4%B8%8D%E4%BF%9D%E8%AF%81%E6%9C%8D%E5%8A%A1%E3%80%82-,2.1.2%20%E5%9C%B0%E5%9D%80%E8%A7%A3%E6%9E%90,-%E8%B0%83%E7%94%A8%E8%AF%A5
1302
1210
  * */
1303
1211
  geocoderApi(t) {
1304
- return _e(Te.BASE_URL, "geocoder", {
1212
+ return be(Te.BASE_URL, "geocoder", {
1305
1213
  ...typeof t == "string" ? {
1306
1214
  address: t
1307
1215
  } : {
@@ -1316,18 +1224,18 @@ const Te = class extends fr {
1316
1224
  };
1317
1225
  let Re = Te;
1318
1226
  c(Re, "BASE_URL", "https://api.map.baidu.com/");
1319
- let Ti = class yr {
1227
+ let oi = class pr {
1320
1228
  constructor(t, e, r) {
1321
- this.extend(yr, google.maps.OverlayView), this.map_ = t, 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;
1229
+ this.extend(pr, google.maps.OverlayView), this.map_ = t, 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;
1322
1230
  var s = r || {};
1323
1231
  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(t), this.prevZoom_ = this.map_.getZoom();
1324
1232
  var n = this;
1325
1233
  google.maps.event.addListener(this.map_, "zoom_changed", function() {
1326
- var a = n.map_.getZoom(), h = n.map_.minZoom || 0, o = Math.min(
1234
+ var a = n.map_.getZoom(), d = n.map_.minZoom || 0, o = Math.min(
1327
1235
  n.map_.maxZoom || 100,
1328
1236
  n.map_.mapTypes[n.map_.getMapTypeId()].maxZoom
1329
1237
  );
1330
- a = Math.min(Math.max(a, h), o), n.prevZoom_ != a && (n.prevZoom_ = a, n.resetViewport());
1238
+ a = Math.min(Math.max(a, d), o), n.prevZoom_ != a && (n.prevZoom_ = a, n.resetViewport());
1331
1239
  }), google.maps.event.addListener(this.map_, "idle", function() {
1332
1240
  n.redraw();
1333
1241
  }), e && (e.length || Object.keys(e).length) && this.addMarkers(e, !1);
@@ -1570,8 +1478,8 @@ let Ti = class yr {
1570
1478
  */
1571
1479
  removeMarkers(t, e) {
1572
1480
  for (var r = t === this.getMarkers() ? t.slice() : t, s = !1, n = 0, a; a = r[n]; n++) {
1573
- var h = this.removeMarker_(a);
1574
- s = s || h;
1481
+ var d = this.removeMarker_(a);
1482
+ s = s || d;
1575
1483
  }
1576
1484
  if (!e && s)
1577
1485
  return this.resetViewport(), this.redraw(), !0;
@@ -1658,8 +1566,8 @@ let Ti = class yr {
1658
1566
  n.x += this.gridSize_, n.y -= this.gridSize_;
1659
1567
  var a = e.fromLatLngToDivPixel(s);
1660
1568
  a.x -= this.gridSize_, a.y += this.gridSize_;
1661
- var h = e.fromDivPixelToLatLng(n), o = e.fromDivPixelToLatLng(a);
1662
- return t.extend(h), t.extend(o), t;
1569
+ var d = e.fromDivPixelToLatLng(n), o = e.fromDivPixelToLatLng(a);
1570
+ return t.extend(d), t.extend(o), t;
1663
1571
  }
1664
1572
  /**
1665
1573
  * Determins if a marker is contained in a bounds.
@@ -1717,7 +1625,7 @@ let Ti = class yr {
1717
1625
  distanceBetweenPoints_(t, e) {
1718
1626
  if (!t || !e)
1719
1627
  return 0;
1720
- var r = 6371, s = (e.lat() - t.lat()) * Math.PI / 180, n = (e.lng() - t.lng()) * Math.PI / 180, a = Math.sin(s / 2) * Math.sin(s / 2) + Math.cos(t.lat() * Math.PI / 180) * Math.cos(e.lat() * Math.PI / 180) * Math.sin(n / 2) * Math.sin(n / 2), h = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)), o = r * h;
1628
+ var r = 6371, s = (e.lat() - t.lat()) * Math.PI / 180, n = (e.lng() - t.lng()) * Math.PI / 180, a = Math.sin(s / 2) * Math.sin(s / 2) + Math.cos(t.lat() * Math.PI / 180) * Math.cos(e.lat() * Math.PI / 180) * Math.sin(n / 2) * Math.sin(n / 2), d = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)), o = r * d;
1721
1629
  return o;
1722
1630
  }
1723
1631
  /**
@@ -1730,14 +1638,14 @@ let Ti = class yr {
1730
1638
  for (var e = 4e4, r = null, s = 0, n; n = this.clusters_[s]; s++) {
1731
1639
  var a = n.getCenter();
1732
1640
  if (a) {
1733
- var h = this.distanceBetweenPoints_(a, t.getPosition());
1734
- h < e && (e = h, r = n);
1641
+ var d = this.distanceBetweenPoints_(a, t.getPosition());
1642
+ d < e && (e = d, r = n);
1735
1643
  }
1736
1644
  }
1737
1645
  if (r && r.isMarkerInClusterBounds(t))
1738
1646
  r.addMarker(t);
1739
1647
  else {
1740
- var o = new Mi(this);
1648
+ var o = new ai(this);
1741
1649
  o.addMarker(t), this.clusters_.push(o);
1742
1650
  }
1743
1651
  }
@@ -1754,7 +1662,7 @@ let Ti = class yr {
1754
1662
  ), e = this.getExtendedBounds(t), r = 0, s; s = this.markers_[r]; r++)
1755
1663
  !s.isAdded && this.isMarkerInBounds_(s, e) && this.addToClosestCluster_(s);
1756
1664
  }
1757
- }, Mi = class {
1665
+ }, ai = class {
1758
1666
  constructor(t) {
1759
1667
  this.markerClusterer_ = t, this.map_ = t.getMap(), this.gridSize_ = t.getGridSize(), this.minClusterSize_ = t.getMinClusterSize(), this.averageCenter_ = t.isAverageCenter(), this.center_ = null, this.markers_ = [], this.bounds_ = null, this.clusterIcon_ = new bt(
1760
1668
  this,
@@ -2023,7 +1931,7 @@ class bt {
2023
1931
  ), e.join("");
2024
1932
  }
2025
1933
  }
2026
- var vr = { exports: {} };
1934
+ var gr = { exports: {} };
2027
1935
  (function(i, t) {
2028
1936
  (function(e, r) {
2029
1937
  i.exports = r();
@@ -2039,55 +1947,55 @@ var vr = { exports: {} };
2039
1947
  return r.lang.isString(o) ? document.getElementById(o) : o;
2040
1948
  }, 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) {
2041
1949
  o = r.dom._g(o);
2042
- var d = r.dom.getDocument(o), u;
2043
- return d.defaultView && d.defaultView.getComputedStyle && (u = d.defaultView.getComputedStyle(o, null), u) ? u[l] || u.getPropertyValue(l) : "";
2044
- }, r.dom._styleFixer = r.dom._styleFixer || {}, r.dom._styleFilter = r.dom._styleFilter || [], r.dom._styleFilter.filter = function(o, l, d) {
2045
- for (var u = 0, p = r.dom._styleFilter, b; b = p[u]; u++)
2046
- (b = b[d]) && (l = b(o, l));
1950
+ var h = r.dom.getDocument(o), u;
1951
+ return h.defaultView && h.defaultView.getComputedStyle && (u = h.defaultView.getComputedStyle(o, null), u) ? u[l] || u.getPropertyValue(l) : "";
1952
+ }, r.dom._styleFixer = r.dom._styleFixer || {}, r.dom._styleFilter = r.dom._styleFilter || [], r.dom._styleFilter.filter = function(o, l, h) {
1953
+ for (var u = 0, p = r.dom._styleFilter, f; f = p[u]; u++)
1954
+ (f = f[h]) && (l = f(o, l));
2047
1955
  return l;
2048
1956
  }, r.string = r.string || {}, r.string.toCamelCase = function(o) {
2049
1957
  return o.indexOf("-") < 0 && o.indexOf("_") < 0 ? o : o.replace(/[-_][^-_]/g, function(l) {
2050
1958
  return l.charAt(1).toUpperCase();
2051
1959
  });
2052
1960
  }, r.dom.getStyle = function(o, l) {
2053
- var d = r.dom;
2054
- o = d.g(o), l = r.string.toCamelCase(l);
2055
- var u = o.style[l] || (o.currentStyle ? o.currentStyle[l] : "") || d.getComputedStyle(o, l);
1961
+ var h = r.dom;
1962
+ o = h.g(o), l = r.string.toCamelCase(l);
1963
+ var u = o.style[l] || (o.currentStyle ? o.currentStyle[l] : "") || h.getComputedStyle(o, l);
2056
1964
  if (!u) {
2057
- var p = d._styleFixer[l];
1965
+ var p = h._styleFixer[l];
2058
1966
  p && (u = p.get ? p.get(o) : r.dom.getStyle(o, p));
2059
1967
  }
2060
- return (p = d._styleFilter) && (u = p.filter(l, u, "get")), u;
1968
+ return (p = h._styleFilter) && (u = p.filter(l, u, "get")), u;
2061
1969
  }, 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) {
2062
1970
  o = r.dom.g(o);
2063
- var l = r.dom.getDocument(o), d = r.browser, u = r.dom.getStyle;
2064
- d.isGecko > 0 && l.getBoxObjectFor && u(o, "position") == "absolute" && (o.style.top === "" || o.style.left);
2065
- var p = { left: 0, top: 0 }, b = d.ie && !d.isStrict ? l.body : l.documentElement, _, T;
2066
- if (o == b)
1971
+ var l = r.dom.getDocument(o), h = r.browser, u = r.dom.getStyle;
1972
+ h.isGecko > 0 && l.getBoxObjectFor && u(o, "position") == "absolute" && (o.style.top === "" || o.style.left);
1973
+ var p = { left: 0, top: 0 }, f = h.ie && !h.isStrict ? l.body : l.documentElement, _, M;
1974
+ if (o == f)
2067
1975
  return p;
2068
1976
  if (o.getBoundingClientRect) {
2069
- T = o.getBoundingClientRect(), p.left = Math.floor(T.left) + Math.max(l.documentElement.scrollLeft, l.body.scrollLeft), p.top = Math.floor(T.top) + Math.max(l.documentElement.scrollTop, l.body.scrollTop), p.left -= l.documentElement.clientLeft, p.top -= l.documentElement.clientTop;
2070
- var g = l.body, f = parseInt(u(g, "borderLeftWidth")), v = parseInt(u(g, "borderTopWidth"));
2071
- d.ie && !d.isStrict && (p.left -= isNaN(f) ? 2 : f, p.top -= isNaN(v) ? 2 : v);
1977
+ M = o.getBoundingClientRect(), p.left = Math.floor(M.left) + Math.max(l.documentElement.scrollLeft, l.body.scrollLeft), p.top = Math.floor(M.top) + Math.max(l.documentElement.scrollTop, l.body.scrollTop), p.left -= l.documentElement.clientLeft, p.top -= l.documentElement.clientTop;
1978
+ var g = l.body, y = parseInt(u(g, "borderLeftWidth")), b = parseInt(u(g, "borderTopWidth"));
1979
+ h.ie && !h.isStrict && (p.left -= isNaN(y) ? 2 : y, p.top -= isNaN(b) ? 2 : b);
2072
1980
  } else {
2073
1981
  _ = o;
2074
1982
  do {
2075
- if (p.left += _.offsetLeft, p.top += _.offsetTop, d.isWebkit > 0 && u(_, "position") == "fixed") {
1983
+ if (p.left += _.offsetLeft, p.top += _.offsetTop, h.isWebkit > 0 && u(_, "position") == "fixed") {
2076
1984
  p.left += l.body.scrollLeft, p.top += l.body.scrollTop;
2077
1985
  break;
2078
1986
  }
2079
1987
  _ = _.offsetParent;
2080
1988
  } while (_ && _ != o);
2081
- for ((d.opera > 0 || d.isWebkit > 0 && u(o, "position") == "absolute") && (p.top -= l.body.offsetTop), _ = o.offsetParent; _ && _ != l.body; )
2082
- p.left -= _.scrollLeft, (!d.opera || _.tagName != "TR") && (p.top -= _.scrollTop), _ = _.offsetParent;
1989
+ for ((h.opera > 0 || h.isWebkit > 0 && u(o, "position") == "absolute") && (p.top -= l.body.offsetTop), _ = o.offsetParent; _ && _ != l.body; )
1990
+ p.left -= _.scrollLeft, (!h.opera || _.tagName != "TR") && (p.top -= _.scrollTop), _ = _.offsetParent;
2083
1991
  }
2084
1992
  return p;
2085
- }, r.event = r.event || {}, r.event._listeners = r.event._listeners || [], r.event.on = function(o, l, d) {
1993
+ }, r.event = r.event || {}, r.event._listeners = r.event._listeners || [], r.event.on = function(o, l, h) {
2086
1994
  l = l.replace(/^on/i, ""), o = r.dom._g(o);
2087
1995
  var u = function(g) {
2088
- d.call(o, g);
2089
- }, p = r.event._listeners, b = r.event._eventFilter, _, T = l;
2090
- return l = l.toLowerCase(), b && b[l] && (_ = b[l](o, l, u), T = _.type, u = _.listener), o.addEventListener ? o.addEventListener(T, u, !1) : o.attachEvent && o.attachEvent("on" + T, u), p[p.length] = [o, l, d, u, T], o;
1996
+ h.call(o, g);
1997
+ }, p = r.event._listeners, f = r.event._eventFilter, _, M = l;
1998
+ return l = l.toLowerCase(), f && f[l] && (_ = f[l](o, l, u), M = _.type, u = _.listener), o.addEventListener ? o.addEventListener(M, u, !1) : o.attachEvent && o.attachEvent("on" + M, u), p[p.length] = [o, l, h, u, M], o;
2091
1999
  }, r.on = r.event.on, function() {
2092
2000
  var o = s[r.guid];
2093
2001
  r.lang.guid = function() {
@@ -2106,135 +2014,135 @@ var vr = { exports: {} };
2106
2014
  return "[object " + (this._className || "Object") + "]";
2107
2015
  }, r.lang.Event = function(o, l) {
2108
2016
  this.type = o, this.returnValue = !0, this.target = l || null, this.currentTarget = null;
2109
- }, r.lang.Class.prototype.addEventListener = function(o, l, d) {
2017
+ }, r.lang.Class.prototype.addEventListener = function(o, l, h) {
2110
2018
  if (r.lang.isFunction(l)) {
2111
2019
  !this.__listeners && (this.__listeners = {});
2112
2020
  var u = this.__listeners, p;
2113
- if (typeof d == "string" && d) {
2114
- if (/[^\w\-]/.test(d))
2115
- throw "nonstandard key:" + d;
2116
- l.hashCode = d, p = d;
2021
+ if (typeof h == "string" && h) {
2022
+ if (/[^\w\-]/.test(h))
2023
+ throw "nonstandard key:" + h;
2024
+ l.hashCode = h, p = h;
2117
2025
  }
2118
2026
  o.indexOf("on") != 0 && (o = "on" + o), typeof u[o] != "object" && (u[o] = {}), p = p || r.lang.guid(), l.hashCode = p, u[o][p] = l;
2119
2027
  }
2120
2028
  }, r.lang.Class.prototype.removeEventListener = function(o, l) {
2121
2029
  if (!(typeof l < "u" && (r.lang.isFunction(l) && !(l = l.hashCode) || !r.lang.isString(l)))) {
2122
2030
  !this.__listeners && (this.__listeners = {}), o.indexOf("on") != 0 && (o = "on" + o);
2123
- var d = this.__listeners;
2124
- if (d[o])
2031
+ var h = this.__listeners;
2032
+ if (h[o])
2125
2033
  if (typeof l < "u")
2126
- d[o][l] && delete d[o][l];
2034
+ h[o][l] && delete h[o][l];
2127
2035
  else
2128
- for (var u in d[o])
2129
- delete d[o][u];
2036
+ for (var u in h[o])
2037
+ delete h[o][u];
2130
2038
  }
2131
2039
  }, r.lang.Class.prototype.dispatchEvent = function(o, l) {
2132
2040
  r.lang.isString(o) && (o = new r.lang.Event(o)), !this.__listeners && (this.__listeners = {}), l = l || {};
2133
- for (var d in l)
2134
- o[d] = l[d];
2135
- var d, u = this.__listeners, p = o.type;
2041
+ for (var h in l)
2042
+ o[h] = l[h];
2043
+ var h, u = this.__listeners, p = o.type;
2136
2044
  if (o.target = o.target || this, o.currentTarget = this, p.indexOf("on") != 0 && (p = "on" + p), r.lang.isFunction(this[p]) && this[p].apply(this, arguments), typeof u[p] == "object")
2137
- for (d in u[p])
2138
- u[p][d].apply(this, arguments);
2045
+ for (h in u[p])
2046
+ u[p][h].apply(this, arguments);
2139
2047
  return o.returnValue;
2140
- }, r.lang.inherits = function(o, l, d) {
2141
- var u, p, b = o.prototype, _ = new Function();
2048
+ }, r.lang.inherits = function(o, l, h) {
2049
+ var u, p, f = o.prototype, _ = new Function();
2142
2050
  _.prototype = l.prototype, p = o.prototype = new _();
2143
- for (u in b)
2144
- p[u] = b[u];
2145
- o.prototype.constructor = o, o.superClass = l.prototype, typeof d == "string" && (p._className = d);
2051
+ for (u in f)
2052
+ p[u] = f[u];
2053
+ o.prototype.constructor = o, o.superClass = l.prototype, typeof h == "string" && (p._className = h);
2146
2054
  }, r.inherits = r.lang.inherits;
2147
- var n = "http://api.map.baidu.com/library/TextIconOverlay/1.2/src/images/m", a = "png", h = function(o, l, d) {
2055
+ var n = "http://api.map.baidu.com/library/TextIconOverlay/1.2/src/images/m", a = "png", d = function(o, l, h) {
2148
2056
  try {
2149
2057
  BMap;
2150
2058
  } catch {
2151
2059
  throw Error("Baidu Map JS API is not ready yet!");
2152
2060
  }
2153
- e.lang.inherits(h, BMap.Overlay, "TextIconOverlay"), this._position = o, this._text = l, this._options = d || {}, this._styles = this._options.styles || [], this._zIndex = this._options.zIndex, !this._styles.length && this._setupDefaultStyles();
2061
+ e.lang.inherits(d, BMap.Overlay, "TextIconOverlay"), this._position = o, this._text = l, this._options = h || {}, this._styles = this._options.styles || [], this._zIndex = this._options.zIndex, !this._styles.length && this._setupDefaultStyles();
2154
2062
  };
2155
- return h.prototype._setupDefaultStyles = function() {
2156
- for (var o = [53, 56, 66, 78, 90], l = 0, d; d = o[l]; l++)
2063
+ return d.prototype._setupDefaultStyles = function() {
2064
+ for (var o = [53, 56, 66, 78, 90], l = 0, h; h = o[l]; l++)
2157
2065
  this._styles.push({
2158
2066
  url: n + l + "." + a,
2159
- size: new BMap.Size(d, d)
2067
+ size: new BMap.Size(h, h)
2160
2068
  });
2161
- }, h.prototype.initialize = function(o) {
2069
+ }, d.prototype.initialize = function(o) {
2162
2070
  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;
2163
- }, h.prototype.draw = function() {
2071
+ }, d.prototype.draw = function() {
2164
2072
  this._map && this._updatePosition();
2165
- }, h.prototype.getText = function() {
2073
+ }, d.prototype.getText = function() {
2166
2074
  return this._text;
2167
- }, h.prototype.setText = function(o) {
2075
+ }, d.prototype.setText = function(o) {
2168
2076
  o && (!this._text || this._text.toString() != o.toString()) && (this._text = o, this._updateText(), this._updateCss(), this._updatePosition());
2169
- }, h.prototype.getPosition = function() {
2077
+ }, d.prototype.getPosition = function() {
2170
2078
  return this._position;
2171
- }, h.prototype.setPosition = function(o) {
2079
+ }, d.prototype.setPosition = function(o) {
2172
2080
  o && (!this._position || !this._position.equals(o)) && (this._position = o, this._updatePosition());
2173
- }, h.prototype.getStyleByText = function(o, l) {
2174
- var d = parseInt(o), u = parseInt(d / 10);
2081
+ }, d.prototype.getStyleByText = function(o, l) {
2082
+ var h = parseInt(o), u = parseInt(h / 10);
2175
2083
  return u = Math.max(0, u), u = Math.min(u, l.length - 1), l[u];
2176
- }, h.prototype._updateCss = function() {
2084
+ }, d.prototype._updateCss = function() {
2177
2085
  if (this._domElement) {
2178
2086
  var o = this.getStyleByText(this._text, this._styles);
2179
2087
  this._domElement.style.cssText = this._buildCssText(o);
2180
2088
  }
2181
- }, h.prototype._updateText = function() {
2089
+ }, d.prototype._updateText = function() {
2182
2090
  this._domElement && (this._domElement.innerHTML = this._text);
2183
- }, h.prototype._updatePosition = function() {
2091
+ }, d.prototype._updatePosition = function() {
2184
2092
  if (this._domElement && this._position) {
2185
2093
  var o = this._domElement.style, l = this._map.pointToOverlayPixel(this._position);
2186
2094
  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";
2187
2095
  }
2188
- }, h.prototype._buildCssText = function(o) {
2189
- var l = o.url, d = o.size, u = o.anchor, p = o.offset, b = o.textColor || "black", _ = o.textSize || 10, T = [];
2190
- if (this._zIndex && T.push("z-index:" + this._zIndex + ";"), e.browser.ie < 7)
2191
- T.push('filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="' + l + '");');
2096
+ }, d.prototype._buildCssText = function(o) {
2097
+ var l = o.url, h = o.size, u = o.anchor, p = o.offset, f = o.textColor || "black", _ = o.textSize || 10, M = [];
2098
+ if (this._zIndex && M.push("z-index:" + this._zIndex + ";"), e.browser.ie < 7)
2099
+ M.push('filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="' + l + '");');
2192
2100
  else {
2193
- T.push("background-image:url(" + l + ");");
2101
+ M.push("background-image:url(" + l + ");");
2194
2102
  var g = "0 0";
2195
- p instanceof BMap.Size && (g = p.width + "px " + p.height + "px"), T.push("background-position:" + g + ";");
2103
+ p instanceof BMap.Size && (g = p.width + "px " + p.height + "px"), M.push("background-position:" + g + ";");
2196
2104
  }
2197
- return d instanceof BMap.Size && (u instanceof BMap.Size ? (u.height > 0 && u.height < d.height && T.push("height:" + (d.height - u.height) + "px; padding-top:" + u.height + "px;"), u.width > 0 && u.width < d.width && T.push("width:" + (d.width - u.width) + "px; padding-left:" + u.width + "px;")) : (T.push("height:" + d.height + "px; line-height:" + d.height + "px;"), T.push("width:" + d.width + "px; text-align:center;"))), T.push("cursor:pointer; color:" + b + "; position:absolute; font-size:" + _ + "px; font-family:Arial,sans-serif; font-weight:bold"), T.join("");
2198
- }, h.prototype._bind = function() {
2105
+ return h instanceof BMap.Size && (u instanceof BMap.Size ? (u.height > 0 && u.height < h.height && M.push("height:" + (h.height - u.height) + "px; padding-top:" + u.height + "px;"), u.width > 0 && u.width < h.width && M.push("width:" + (h.width - u.width) + "px; padding-left:" + u.width + "px;")) : (M.push("height:" + h.height + "px; line-height:" + h.height + "px;"), M.push("width:" + h.width + "px; text-align:center;"))), M.push("cursor:pointer; color:" + f + "; position:absolute; font-size:" + _ + "px; font-family:Arial,sans-serif; font-weight:bold"), M.join("");
2106
+ }, d.prototype._bind = function() {
2199
2107
  if (!this._domElement)
2200
2108
  return;
2201
- var o = this, l = this._map, d = e.lang.Event;
2202
- function u(p, b) {
2203
- var _ = p.srcElement || p.target, T = p.clientX || p.pageX, g = p.clientY || p.pageY;
2204
- if (p && b && T && g && _) {
2205
- var f = e.dom.getPosition(l.getContainer());
2206
- b.pixel = new BMap.Pixel(T - f.left, g - f.top), b.point = l.pixelToPoint(b.pixel);
2109
+ var o = this, l = this._map, h = e.lang.Event;
2110
+ function u(p, f) {
2111
+ var _ = p.srcElement || p.target, M = p.clientX || p.pageX, g = p.clientY || p.pageY;
2112
+ if (p && f && M && g && _) {
2113
+ var y = e.dom.getPosition(l.getContainer());
2114
+ f.pixel = new BMap.Pixel(M - y.left, g - y.top), f.point = l.pixelToPoint(f.pixel);
2207
2115
  }
2208
- return b;
2116
+ return f;
2209
2117
  }
2210
2118
  e.event.on(this._domElement, "mouseover", function(p) {
2211
- o.dispatchEvent(u(p, new d("onmouseover")));
2119
+ o.dispatchEvent(u(p, new h("onmouseover")));
2212
2120
  }), e.event.on(this._domElement, "mouseout", function(p) {
2213
- o.dispatchEvent(u(p, new d("onmouseout")));
2121
+ o.dispatchEvent(u(p, new h("onmouseout")));
2214
2122
  }), e.event.on(this._domElement, "click", function(p) {
2215
- o.dispatchEvent(u(p, new d("onclick")));
2123
+ o.dispatchEvent(u(p, new h("onclick")));
2216
2124
  });
2217
- }, h;
2125
+ }, d;
2218
2126
  });
2219
- })(vr);
2220
- var Oi = vr.exports;
2221
- const Vt = /* @__PURE__ */ ct(Oi);
2222
- var _r = function(i, t, e) {
2223
- t = Ci(t);
2127
+ })(gr);
2128
+ var li = gr.exports;
2129
+ const jt = /* @__PURE__ */ ct(li);
2130
+ var mr = function(i, t, e) {
2131
+ t = hi(t);
2224
2132
  var r = i.pointToPixel(t.getNorthEast()), s = i.pointToPixel(t.getSouthWest());
2225
2133
  r.x += e, r.y -= e, s.x -= e, s.y += e;
2226
2134
  var n = i.pixelToPoint(r), a = i.pixelToPoint(s);
2227
2135
  return new BMap.Bounds(a, n);
2228
- }, Ci = function(i) {
2229
- var t = Be(i.getNorthEast().lng, -180, 180), e = Be(i.getSouthWest().lng, -180, 180), r = Be(i.getNorthEast().lat, -74, 74), s = Be(i.getSouthWest().lat, -74, 74);
2136
+ }, hi = function(i) {
2137
+ var t = Ie(i.getNorthEast().lng, -180, 180), e = Ie(i.getSouthWest().lng, -180, 180), r = Ie(i.getNorthEast().lat, -74, 74), s = Ie(i.getSouthWest().lat, -74, 74);
2230
2138
  return new BMap.Bounds(new BMap.Point(e, s), new BMap.Point(t, r));
2231
- }, Be = function(i, t, e) {
2139
+ }, Ie = function(i, t, e) {
2232
2140
  return t && (i = Math.max(i, t)), e && (i = Math.min(i, e)), i;
2233
- }, br = function(i) {
2141
+ }, fr = function(i) {
2234
2142
  return Object.prototype.toString.call(i) === "[object Array]";
2235
- }, Tr = function(i, t) {
2143
+ }, yr = function(i, t) {
2236
2144
  var e = -1;
2237
- if (br(t)) {
2145
+ if (fr(t)) {
2238
2146
  if (t.indexOf)
2239
2147
  e = t.indexOf(i);
2240
2148
  else
@@ -2245,7 +2153,7 @@ var _r = function(i, t, e) {
2245
2153
  }
2246
2154
  }
2247
2155
  return e;
2248
- }, M = function(i, t) {
2156
+ }, T = function(i, t) {
2249
2157
  try {
2250
2158
  BMap;
2251
2159
  } catch {
@@ -2262,33 +2170,33 @@ var _r = function(i, t, e) {
2262
2170
  r._redraw();
2263
2171
  });
2264
2172
  var s = e.markers;
2265
- br(s) && this.addMarkers(s);
2173
+ fr(s) && this.addMarkers(s);
2266
2174
  }
2267
2175
  };
2268
- M.prototype.addMarkers = function(i) {
2176
+ T.prototype.addMarkers = function(i) {
2269
2177
  if (i.length) {
2270
2178
  for (var t = 0, e = i.length; t < e; t++)
2271
2179
  this._pushMarkerTo(i[t]);
2272
2180
  this._createClusters();
2273
2181
  }
2274
2182
  };
2275
- M.prototype._pushMarkerTo = function(i) {
2276
- var t = Tr(i, this._markers);
2183
+ T.prototype._pushMarkerTo = function(i) {
2184
+ var t = yr(i, this._markers);
2277
2185
  t === -1 && (i.isInCluster = !1, this._markers.push(i));
2278
2186
  };
2279
- M.prototype.addMarker = function(i) {
2187
+ T.prototype.addMarker = function(i) {
2280
2188
  this._pushMarkerTo(i), this._createClusters();
2281
2189
  };
2282
- M.prototype._createClusters = function() {
2190
+ T.prototype._createClusters = function() {
2283
2191
  var i = this._map.getBounds();
2284
2192
  if (i.getCenter()) {
2285
- for (var t = _r(this._map, i, this._gridSize), e = 0, r; r = this._markers[e]; e++)
2193
+ for (var t = mr(this._map, i, this._gridSize), e = 0, r; r = this._markers[e]; e++)
2286
2194
  !r.isInCluster && t.containsPoint(r.getPosition()) && this._addToClosestCluster(r);
2287
2195
  for (var s = this._markers.length, e = 0; e < s; e++)
2288
2196
  this._clusters[e] && this._clusters[e].render();
2289
2197
  }
2290
2198
  };
2291
- M.prototype._addToClosestCluster = function(i) {
2199
+ T.prototype._addToClosestCluster = function(i) {
2292
2200
  var t = 4e6, e = null;
2293
2201
  i.getPosition();
2294
2202
  for (var r = 0, s; s = this._clusters[r]; r++) {
@@ -2305,100 +2213,100 @@ M.prototype._addToClosestCluster = function(i) {
2305
2213
  s.addMarker(i), this._clusters.push(s);
2306
2214
  }
2307
2215
  };
2308
- M.prototype._clearLastClusters = function() {
2216
+ T.prototype._clearLastClusters = function() {
2309
2217
  for (var i = 0, t; t = this._clusters[i]; i++)
2310
2218
  t.remove();
2311
2219
  this._clusters = [], this._removeMarkersFromCluster();
2312
2220
  };
2313
- M.prototype._removeMarkersFromCluster = function() {
2221
+ T.prototype._removeMarkersFromCluster = function() {
2314
2222
  for (var i = 0, t; t = this._markers[i]; i++)
2315
2223
  t.isInCluster = !1;
2316
2224
  };
2317
- M.prototype._removeMarkersFromMap = function() {
2225
+ T.prototype._removeMarkersFromMap = function() {
2318
2226
  for (var i = 0, t; t = this._markers[i]; i++) {
2319
2227
  t.isInCluster = !1;
2320
2228
  var e = t.getLabel();
2321
2229
  this._map.removeOverlay(t), t.setLabel(e);
2322
2230
  }
2323
2231
  };
2324
- M.prototype._removeMarker = function(i) {
2325
- var t = Tr(i, this._markers);
2232
+ T.prototype._removeMarker = function(i) {
2233
+ var t = yr(i, this._markers);
2326
2234
  return t === -1 ? !1 : (this._map.removeOverlay(i), this._markers.splice(t, 1), !0);
2327
2235
  };
2328
- M.prototype.removeMarker = function(i) {
2236
+ T.prototype.removeMarker = function(i) {
2329
2237
  var t = this._removeMarker(i);
2330
2238
  return t && (this._clearLastClusters(), this._createClusters()), t;
2331
2239
  };
2332
- M.prototype.removeMarkers = function(i) {
2240
+ T.prototype.removeMarkers = function(i) {
2333
2241
  for (var t = !1, e = 0; e < i.length; e++) {
2334
2242
  var r = this._removeMarker(i[e]);
2335
2243
  t = t || r;
2336
2244
  }
2337
2245
  return t && (this._clearLastClusters(), this._createClusters()), t;
2338
2246
  };
2339
- M.prototype.clearMarkers = function() {
2247
+ T.prototype.clearMarkers = function() {
2340
2248
  this._clearLastClusters(), this._removeMarkersFromMap(), this._markers = [];
2341
2249
  };
2342
- M.prototype._redraw = function() {
2250
+ T.prototype._redraw = function() {
2343
2251
  this._clearLastClusters(), this._createClusters();
2344
2252
  };
2345
- M.prototype.getGridSize = function() {
2253
+ T.prototype.getGridSize = function() {
2346
2254
  return this._gridSize;
2347
2255
  };
2348
- M.prototype.setGridSize = function(i) {
2256
+ T.prototype.setGridSize = function(i) {
2349
2257
  this._gridSize = i, this._redraw();
2350
2258
  };
2351
- M.prototype.getMaxZoom = function() {
2259
+ T.prototype.getMaxZoom = function() {
2352
2260
  return this._maxZoom;
2353
2261
  };
2354
- M.prototype.setMaxZoom = function(i) {
2262
+ T.prototype.setMaxZoom = function(i) {
2355
2263
  this._maxZoom = i, this._redraw();
2356
2264
  };
2357
- M.prototype.getZIndex = function() {
2265
+ T.prototype.getZIndex = function() {
2358
2266
  return this._zIndex;
2359
2267
  };
2360
- M.prototype.setZIndex = function(i) {
2268
+ T.prototype.setZIndex = function(i) {
2361
2269
  this._zIndex != i && (this.zIndex = i, this._redraw());
2362
2270
  };
2363
- M.prototype.getStyles = function() {
2271
+ T.prototype.getStyles = function() {
2364
2272
  return this._styles;
2365
2273
  };
2366
- M.prototype.setStyles = function(i) {
2274
+ T.prototype.setStyles = function(i) {
2367
2275
  this._styles = i, this._redraw();
2368
2276
  };
2369
- M.prototype.getMinClusterSize = function() {
2277
+ T.prototype.getMinClusterSize = function() {
2370
2278
  return this._minClusterSize;
2371
2279
  };
2372
- M.prototype.setMinClusterSize = function(i) {
2280
+ T.prototype.setMinClusterSize = function(i) {
2373
2281
  this._minClusterSize = i, this._redraw();
2374
2282
  };
2375
- M.prototype.isAverageCenter = function() {
2283
+ T.prototype.isAverageCenter = function() {
2376
2284
  return this._isAverageCenter;
2377
2285
  };
2378
- M.prototype.getMap = function() {
2286
+ T.prototype.getMap = function() {
2379
2287
  return this._map;
2380
2288
  };
2381
- M.prototype.getMarkers = function() {
2289
+ T.prototype.getMarkers = function() {
2382
2290
  return this._markers;
2383
2291
  };
2384
- M.prototype.getClustersCount = function() {
2292
+ T.prototype.getClustersCount = function() {
2385
2293
  for (var i = 0, t = 0, e; e = this._clusters[t]; t++)
2386
2294
  e.isReal() && i++;
2387
2295
  return i;
2388
2296
  };
2389
- M.prototype._textCalculator = function(i) {
2297
+ T.prototype._textCalculator = function(i) {
2390
2298
  return i.length.toString();
2391
2299
  };
2392
- M.prototype._stylesIndexCalculator = null;
2393
- M.prototype.setTextCalculator = function(i) {
2300
+ T.prototype._stylesIndexCalculator = null;
2301
+ T.prototype.setTextCalculator = function(i) {
2394
2302
  this._textCalculator = i;
2395
2303
  };
2396
- M.prototype.setStylesIndexCalculator = function(i) {
2304
+ T.prototype.setStylesIndexCalculator = function(i) {
2397
2305
  this._stylesIndexCalculator = i;
2398
2306
  };
2399
2307
  function N(i) {
2400
2308
  var t = this;
2401
- 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 Vt(this._center, this._markers.length, {
2309
+ 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 jt(this._center, this._markers.length, {
2402
2310
  styles: this._markerClusterer.getStyles(),
2403
2311
  zIndex: i._zIndex
2404
2312
  }), this._clusterMarker.getStyleByText = function(e, r) {
@@ -2406,7 +2314,7 @@ function N(i) {
2406
2314
  var s = t._markerClusterer._stylesIndexCalculator(t._markers, r.length);
2407
2315
  return r[s];
2408
2316
  }
2409
- return Vt.prototype.getStyleByText.call(this, e, r);
2317
+ return jt.prototype.getStyleByText.call(this, e, r);
2410
2318
  }, this._clusterMarker.addEventListener && this._clusterMarker.addEventListener("click", function(e) {
2411
2319
  t._map.setViewport(t.getBounds());
2412
2320
  });
@@ -2446,7 +2354,7 @@ N.prototype.isReal = function(i) {
2446
2354
  };
2447
2355
  N.prototype.updateGridBounds = function() {
2448
2356
  var i = new BMap.Bounds(this._center, this._center);
2449
- this._gridBounds = _r(this._map, i, this._markerClusterer.getGridSize());
2357
+ this._gridBounds = mr(this._map, i, this._markerClusterer.getGridSize());
2450
2358
  };
2451
2359
  N.prototype.updateClusterMarker = function() {
2452
2360
  if (this._map.getZoom() > this._markerClusterer.getMaxZoom()) {
@@ -2476,7 +2384,7 @@ N.prototype.getBounds = function() {
2476
2384
  N.prototype.getCenter = function() {
2477
2385
  return this._center;
2478
2386
  };
2479
- var De;
2387
+ var ze;
2480
2388
  ((i) => {
2481
2389
  function t(r) {
2482
2390
  return {
@@ -2501,8 +2409,8 @@ var De;
2501
2409
  };
2502
2410
  }
2503
2411
  i.toGoogle = e;
2504
- })(De || (De = {}));
2505
- class Mr {
2412
+ })(ze || (ze = {}));
2413
+ class vr {
2506
2414
  constructor(t) {
2507
2415
  this.map = t;
2508
2416
  }
@@ -2527,62 +2435,62 @@ class Mr {
2527
2435
  return this.inner.removeMarkers(t.map((e) => e.innerOverlay));
2528
2436
  }
2529
2437
  }
2530
- class wi extends Mr {
2438
+ class ci extends vr {
2531
2439
  constructor(e, r) {
2532
2440
  var n;
2533
2441
  super(e);
2534
2442
  c(this, "inner");
2535
- this.inner = new M(e.innerMap, {
2443
+ this.inner = new T(e.innerMap, {
2536
2444
  // baidu的构造器中的markers, 会触发重绘, 会导致使用旧的calculator计算cluster
2537
2445
  // markers: options.markers?.map(it => (it as BaiduMarker).innerOverlay),
2538
2446
  gridSize: r.gridSize,
2539
2447
  maxZoom: r.maxZoom,
2540
2448
  minClusterSize: r.minClusterSize,
2541
2449
  isAverageCenter: r.averageCenter,
2542
- styles: (n = r.styles) == null ? void 0 : n.map((a) => De.toBaidu(a)),
2450
+ styles: (n = r.styles) == null ? void 0 : n.map((a) => ze.toBaidu(a)),
2543
2451
  zIndex: r.zIndex
2544
2452
  });
2545
2453
  const s = r.stylesIndexCalculator;
2546
- s && this.inner.setStylesIndexCalculator((a, h) => s(a.length, h)), r.markers && this.addMarkers(r.markers);
2454
+ s && this.inner.setStylesIndexCalculator((a, d) => s(a.length, d)), r.markers && this.addMarkers(r.markers);
2547
2455
  }
2548
2456
  recreate() {
2549
2457
  this.inner._redraw();
2550
2458
  }
2551
2459
  }
2552
- class Ei extends Mr {
2460
+ class di extends vr {
2553
2461
  constructor(e, r) {
2554
2462
  var n, a;
2555
2463
  super(e);
2556
2464
  c(this, "inner");
2557
- this.inner = new Ti(
2465
+ this.inner = new oi(
2558
2466
  e.innerMap,
2559
2467
  // google的构造器中的markers,不会触发重绘, 第一次绘制通过监听地图的'idle'事件触发, 可以直接设置
2560
- (n = r.markers) == null ? void 0 : n.map((h) => h.innerOverlay),
2468
+ (n = r.markers) == null ? void 0 : n.map((d) => d.innerOverlay),
2561
2469
  {
2562
2470
  gridSize: r.gridSize,
2563
2471
  maxZoom: r.maxZoom,
2564
2472
  minimumClusterSize: r.minClusterSize,
2565
2473
  averageCenter: r.averageCenter,
2566
- styles: (a = r.styles) == null ? void 0 : a.map((h) => De.toGoogle(h)),
2474
+ styles: (a = r.styles) == null ? void 0 : a.map((d) => ze.toGoogle(d)),
2567
2475
  zIndex: r.zIndex
2568
2476
  }
2569
2477
  );
2570
2478
  const s = r.stylesIndexCalculator;
2571
- s && this.inner.setCalculator((h, o) => ({
2572
- text: h.length,
2479
+ s && this.inner.setCalculator((d, o) => ({
2480
+ text: d.length,
2573
2481
  // google内部, 取index时, 会`-1`...故我们这里`+1`, 抵消掉它
2574
- index: s(h.length, o) + 1
2482
+ index: s(d.length, o) + 1
2575
2483
  }));
2576
2484
  }
2577
2485
  recreate() {
2578
2486
  this.inner.repaint();
2579
2487
  }
2580
2488
  }
2581
- class Or {
2489
+ class _r {
2582
2490
  constructor() {
2583
2491
  }
2584
2492
  }
2585
- class Li extends Or {
2493
+ class ui extends _r {
2586
2494
  constructor(e, r) {
2587
2495
  super();
2588
2496
  c(this, "inner");
@@ -2591,7 +2499,7 @@ class Li extends Or {
2591
2499
  search(e, r) {
2592
2500
  return this.searchImpl(
2593
2501
  e,
2594
- r instanceof y ? r.toGoogle(this.map.coordType) : r ?? this.map.innerMap.getCenter()
2502
+ r instanceof v ? r.toGoogle(this.map.coordType) : r ?? this.map.innerMap.getCenter()
2595
2503
  );
2596
2504
  }
2597
2505
  searchInBounds(e, r) {
@@ -2612,23 +2520,23 @@ class Li extends Or {
2612
2520
  // 'address_components', // TODO: 2023/04/28 ipcjs 查询请求不支持该字段...
2613
2521
  ],
2614
2522
  locationBias: r
2615
- }, (a, h) => {
2616
- switch (h) {
2523
+ }, (a, d) => {
2524
+ switch (d) {
2617
2525
  case google.maps.places.PlacesServiceStatus.ZERO_RESULTS:
2618
2526
  case google.maps.places.PlacesServiceStatus.OK: {
2619
- const o = (a ?? []).map((l) => gr(l, this.map));
2527
+ const o = (a ?? []).map((l) => cr(l, this.map));
2620
2528
  s(o);
2621
2529
  break;
2622
2530
  }
2623
2531
  default:
2624
- n(new Error(`status: ${h}`));
2532
+ n(new Error(`status: ${d}`));
2625
2533
  break;
2626
2534
  }
2627
2535
  });
2628
2536
  });
2629
2537
  }
2630
2538
  }
2631
- class xi extends Or {
2539
+ class pi extends _r {
2632
2540
  constructor(e, r) {
2633
2541
  super();
2634
2542
  c(this, "searchRequestMap", /* @__PURE__ */ new Map());
@@ -2640,7 +2548,7 @@ class xi extends Or {
2640
2548
  }
2641
2549
  search(e, r) {
2642
2550
  return this.newSearch(
2643
- r instanceof y ? r.toBaidu(this.map.coordType) : r ?? this.map.innerMap.getCenter(),
2551
+ r instanceof v ? r.toBaidu(this.map.coordType) : r ?? this.map.innerMap.getCenter(),
2644
2552
  (s) => {
2645
2553
  s.search(e);
2646
2554
  }
@@ -2659,20 +2567,20 @@ class xi extends Or {
2659
2567
  newSearch(e, r) {
2660
2568
  return new Promise((s, n) => {
2661
2569
  const a = new BMap.LocalSearch(e ?? this.map.innerMap, {
2662
- onSearchComplete: (h) => {
2663
- Array.isArray(h) && ut("当前只支持一次搜索一条数据");
2570
+ onSearchComplete: (d) => {
2571
+ Array.isArray(d) && ut("当前只支持一次搜索一条数据");
2664
2572
  const o = a.getStatus();
2665
2573
  switch (o) {
2666
2574
  case BMAP_STATUS_SUCCESS: {
2667
2575
  const l = [];
2668
- for (let d = 0; d < h.getCurrentNumPois(); d++) {
2669
- const u = h.getPoi(d);
2576
+ for (let h = 0; h < d.getCurrentNumPois(); h++) {
2577
+ const u = d.getPoi(h);
2670
2578
  l.push({
2671
2579
  id: u.uid,
2672
2580
  city: u.city,
2673
2581
  country: "",
2674
2582
  // 百度地图只支持中国
2675
- position: y.fromBaidu(u.point, this.map.coordType),
2583
+ position: v.fromBaidu(u.point, this.map.coordType),
2676
2584
  province: u.province,
2677
2585
  title: u.title,
2678
2586
  address: u.address
@@ -2694,7 +2602,7 @@ class xi extends Or {
2694
2602
  });
2695
2603
  }
2696
2604
  }
2697
- class Cr {
2605
+ class br {
2698
2606
  constructor(t, e) {
2699
2607
  c(this, "onData");
2700
2608
  c(this, "onError");
@@ -2706,26 +2614,26 @@ class Cr {
2706
2614
  * @mustCallSuper 子类必须调用一次`super.setSearchListener`, 用来保存{@link onData}和{@link onError}
2707
2615
  * */
2708
2616
  setSearchListener(t, e) {
2709
- return this.onData && C("setSearchListener只能调用一次"), this.onData = t, this.onError = e, Me;
2617
+ return this.onData && C("setSearchListener只能调用一次"), this.onData = t, this.onError = e, Oe;
2710
2618
  }
2711
2619
  }
2712
- class Pi extends Cr {
2620
+ class gi extends br {
2713
2621
  constructor(e, r) {
2714
2622
  super(e, r.input);
2715
2623
  c(this, "searchBox");
2716
2624
  this.searchBox = new google.maps.places.SearchBox(r.input), this.searchBox.bindTo("bounds", e.innerMap);
2717
2625
  }
2718
2626
  setSearchListener(e, r) {
2719
- return super.setSearchListener(e, r), or(this.searchBox, "places_changed", () => {
2627
+ return super.setSearchListener(e, r), rr(this.searchBox, "places_changed", () => {
2720
2628
  const s = this.searchBox.getPlaces();
2721
- e((s ?? []).map((n) => gr(n, this.map)));
2629
+ e((s ?? []).map((n) => cr(n, this.map)));
2722
2630
  });
2723
2631
  }
2724
2632
  search() {
2725
2633
  this.input.value && (google.maps.event.trigger(this.input, "focus", {}), google.maps.event.trigger(this.input, "keydown", { keyCode: 13 }));
2726
2634
  }
2727
2635
  }
2728
- class ki extends Cr {
2636
+ class mi extends br {
2729
2637
  constructor(e, r) {
2730
2638
  super(e, r.input);
2731
2639
  c(this, "autocomplete");
@@ -2744,8 +2652,8 @@ class ki extends Cr {
2744
2652
  this.placesService.search(e).then(this.onData, this.onError);
2745
2653
  }
2746
2654
  }
2747
- var Bi = /* @__PURE__ */ ((i) => (i[i.WORLD = 1] = "WORLD", i[i.STATE = 5] = "STATE", i[i.CITY = 10] = "CITY", i[i.STREET = 15] = "STREET", i[i.BUILDING = 20] = "BUILDING", i))(Bi || {});
2748
- class Tt {
2655
+ var fi = /* @__PURE__ */ ((i) => (i[i.WORLD = 1] = "WORLD", i[i.STATE = 5] = "STATE", i[i.CITY = 10] = "CITY", i[i.STREET = 15] = "STREET", i[i.BUILDING = 20] = "BUILDING", i))(fi || {});
2656
+ class Mt {
2749
2657
  constructor(t) {
2750
2658
  c(this, "latestInfoWindow");
2751
2659
  /** 使用{@link setEventTargetDelegate}初始化 */
@@ -2792,6 +2700,77 @@ class Tt {
2792
2700
  this.innerMap.setZoom(t);
2793
2701
  }
2794
2702
  }
2703
+ var yi = function(t) {
2704
+ return vi(t) && !_i(t);
2705
+ };
2706
+ function vi(i) {
2707
+ return !!i && typeof i == "object";
2708
+ }
2709
+ function _i(i) {
2710
+ var t = Object.prototype.toString.call(i);
2711
+ return t === "[object RegExp]" || t === "[object Date]" || Ti(i);
2712
+ }
2713
+ var bi = typeof Symbol == "function" && Symbol.for, Mi = bi ? Symbol.for("react.element") : 60103;
2714
+ function Ti(i) {
2715
+ return i.$$typeof === Mi;
2716
+ }
2717
+ function Oi(i) {
2718
+ return Array.isArray(i) ? [] : {};
2719
+ }
2720
+ function Ce(i, t) {
2721
+ return t.clone !== !1 && t.isMergeableObject(i) ? de(Oi(i), i, t) : i;
2722
+ }
2723
+ function Ci(i, t, e) {
2724
+ return i.concat(t).map(function(r) {
2725
+ return Ce(r, e);
2726
+ });
2727
+ }
2728
+ function wi(i, t) {
2729
+ if (!t.customMerge)
2730
+ return de;
2731
+ var e = t.customMerge(i);
2732
+ return typeof e == "function" ? e : de;
2733
+ }
2734
+ function Ei(i) {
2735
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(i).filter(function(t) {
2736
+ return Object.propertyIsEnumerable.call(i, t);
2737
+ }) : [];
2738
+ }
2739
+ function Vt(i) {
2740
+ return Object.keys(i).concat(Ei(i));
2741
+ }
2742
+ function Mr(i, t) {
2743
+ try {
2744
+ return t in i;
2745
+ } catch {
2746
+ return !1;
2747
+ }
2748
+ }
2749
+ function Li(i, t) {
2750
+ return Mr(i, t) && !(Object.hasOwnProperty.call(i, t) && Object.propertyIsEnumerable.call(i, t));
2751
+ }
2752
+ function xi(i, t, e) {
2753
+ var r = {};
2754
+ return e.isMergeableObject(i) && Vt(i).forEach(function(s) {
2755
+ r[s] = Ce(i[s], e);
2756
+ }), Vt(t).forEach(function(s) {
2757
+ Li(i, s) || (Mr(i, s) && e.isMergeableObject(t[s]) ? r[s] = wi(s, e)(i[s], t[s], e) : r[s] = Ce(t[s], e));
2758
+ }), r;
2759
+ }
2760
+ function de(i, t, e) {
2761
+ e = e || {}, e.arrayMerge = e.arrayMerge || Ci, e.isMergeableObject = e.isMergeableObject || yi, e.cloneUnlessOtherwiseSpecified = Ce;
2762
+ var r = Array.isArray(t), s = Array.isArray(i), n = r === s;
2763
+ return n ? r ? e.arrayMerge(i, t, e) : xi(i, t, e) : Ce(t, e);
2764
+ }
2765
+ de.all = function(t, e) {
2766
+ if (!Array.isArray(t))
2767
+ throw new Error("first argument should be an array");
2768
+ return t.reduce(function(r, s) {
2769
+ return de(r, s, e);
2770
+ }, {});
2771
+ };
2772
+ var Pi = de, ki = Pi;
2773
+ const Tr = /* @__PURE__ */ ct(ki);
2795
2774
  /*!
2796
2775
  * isobject <https://github.com/jonschlinkert/isobject>
2797
2776
  *
@@ -2810,45 +2789,66 @@ function Ii(i) {
2810
2789
  function Ft(i) {
2811
2790
  return Ii(i) === !0 && Object.prototype.toString.call(i) === "[object Object]";
2812
2791
  }
2813
- function wr(i) {
2792
+ function Or(i) {
2814
2793
  var t, e;
2815
2794
  return !(Ft(i) === !1 || (t = i.constructor, typeof t != "function") || (e = t.prototype, Ft(e) === !1) || e.hasOwnProperty("isPrototypeOf") === !1);
2816
2795
  }
2817
- var Ce;
2796
+ var Q;
2818
2797
  ((i) => {
2819
- function t(h, o) {
2820
- return h.reduce((l, d) => (l[o(d)] = d, l), {});
2798
+ function t(h, u) {
2799
+ return h.reduce((p, f) => (p[u(f)] = f, p), {});
2821
2800
  }
2822
2801
  i.fromArray = t;
2823
2802
  function e(h) {
2824
- return h.reduce((o, l) => (o[l[0]] = l[1], o), {});
2803
+ return h.reduce((u, p) => (u[p[0]] = p[1], u), {});
2825
2804
  }
2826
2805
  i.fromEntries = e;
2827
2806
  function r(h) {
2828
- return JSON.stringify(h, (o, l) => typeof l == "object" && Object.getPrototypeOf(l) !== Object.prototype ? l.toString !== Object.prototype.toString ? l.toString() : `[object ${Object.getPrototypeOf(l).constructor.name}]` : l);
2807
+ return JSON.stringify(h, (u, p) => typeof p == "object" && Object.getPrototypeOf(p) !== Object.prototype ? p.toString !== Object.prototype.toString ? p.toString() : `[object ${Object.getPrototypeOf(p).constructor.name}]` : p);
2829
2808
  }
2830
2809
  i.toJsonSafely = r;
2831
2810
  function s(h) {
2832
- wr(h) && Object.keys(h).forEach((o) => {
2833
- h[o] === void 0 ? delete h[o] : s(h[o]);
2811
+ Or(h) && Object.keys(h).forEach((u) => {
2812
+ h[u] === void 0 ? delete h[u] : s(h[u]);
2834
2813
  });
2835
2814
  }
2836
2815
  i.deleteUndefinedPropertyOnPlainObjectDeeply = s;
2837
- function n(h, ...o) {
2838
- const l = Ut(o), d = {};
2839
- for (const u in h)
2840
- l(u) || (d[u] = h[u]);
2841
- return d;
2842
- }
2843
- i.omit = n;
2844
- function a(h, ...o) {
2845
- const l = Ut(o), d = {};
2846
- for (const u in h)
2847
- l(u) && (d[u] = h[u]);
2848
- return d;
2849
- }
2850
- i.pick = a;
2851
- })(Ce || (Ce = {}));
2816
+ function n(h, u, p) {
2817
+ let f = h[u];
2818
+ return f === void 0 && (f = p(), h[u] = f), f;
2819
+ }
2820
+ i.putIfAbsent = n;
2821
+ function a(h, ...u) {
2822
+ const p = Ut(u), f = {};
2823
+ for (const _ in h)
2824
+ p(_) || (f[_] = h[_]);
2825
+ return f;
2826
+ }
2827
+ i.omit = a;
2828
+ function d(h, ...u) {
2829
+ const p = Ut(u), f = {};
2830
+ for (const _ in h)
2831
+ p(_) && (f[_] = h[_]);
2832
+ return f;
2833
+ }
2834
+ i.pick = d;
2835
+ function o(h, u) {
2836
+ const p = typeof u == "string" ? u.split(".") : u;
2837
+ let f = h;
2838
+ for (const _ of p) {
2839
+ if (f == null)
2840
+ return;
2841
+ f = f[_];
2842
+ }
2843
+ return f;
2844
+ }
2845
+ i.get = o;
2846
+ function l(h, u) {
2847
+ const p = typeof u == "string" ? u.split(".") : u, f = o(h, p.slice(0, -1)), _ = p[p.length - 1];
2848
+ f != null && delete f[_];
2849
+ }
2850
+ i.del = l;
2851
+ })(Q || (Q = {}));
2852
2852
  function Ut(i) {
2853
2853
  if (i.length <= 4)
2854
2854
  return i.includes.bind(i);
@@ -2857,20 +2857,20 @@ function Ut(i) {
2857
2857
  return t.has.bind(t);
2858
2858
  }
2859
2859
  }
2860
- Ce.toJsonSafely;
2861
- const Si = ["single", "multi"];
2860
+ Q.toJsonSafely;
2861
+ const Bi = ["single", "multi"];
2862
2862
  var j = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "greedy", i.cooperative = "cooperative", i))(j || {}), lt;
2863
2863
  ((i) => {
2864
2864
  function t(e) {
2865
- Ce.deleteUndefinedPropertyOnPlainObjectDeeply(e);
2866
- const r = { center: y.ZERO, zoom: 5 };
2867
- return ir(r, e || {}, {
2868
- isMergeableObject: wr
2865
+ Q.deleteUndefinedPropertyOnPlainObjectDeeply(e);
2866
+ const r = { center: v.ZERO, zoom: 5 };
2867
+ return Tr(r, e || {}, {
2868
+ isMergeableObject: Or
2869
2869
  });
2870
2870
  }
2871
2871
  i.create = t;
2872
2872
  })(lt || (lt = {}));
2873
- class Er {
2873
+ class Cr {
2874
2874
  constructor(t, e) {
2875
2875
  c(this, "_delegate");
2876
2876
  this.innerOverlay = t, this.coordType = e;
@@ -2888,12 +2888,12 @@ class Er {
2888
2888
  this.map.removeOverlay(this);
2889
2889
  }
2890
2890
  }
2891
- class Mt extends Er {
2891
+ class Tt extends Cr {
2892
2892
  constructor(t, e, r) {
2893
2893
  super(t, e), this.map = r;
2894
2894
  }
2895
2895
  createDelegate() {
2896
- return new re(this.innerOverlay, this.map);
2896
+ return new ie(this.innerOverlay, this.map);
2897
2897
  }
2898
2898
  isVisible() {
2899
2899
  return this.innerOverlay.getVisible();
@@ -2902,12 +2902,12 @@ class Mt extends Er {
2902
2902
  this.innerOverlay.setVisible(t);
2903
2903
  }
2904
2904
  }
2905
- class Ye extends Er {
2905
+ class Ye extends Cr {
2906
2906
  constructor(t, e, r) {
2907
2907
  super(t, e), this.map = r;
2908
2908
  }
2909
2909
  createDelegate() {
2910
- return new ae(this.innerOverlay, this.map);
2910
+ return new le(this.innerOverlay, this.map);
2911
2911
  }
2912
2912
  /** 仅限内部使用; 设为private时, 生成的d.ts文件中, 方法返回值会变成any, 故改成了public */
2913
2913
  get overlay() {
@@ -2924,7 +2924,7 @@ class Ye extends Er {
2924
2924
  return t !== void 0 && (t || this.setVisible(!1)), this;
2925
2925
  }
2926
2926
  }
2927
- const He = class extends Ye {
2927
+ const je = class extends Ye {
2928
2928
  constructor(t, e, r, s) {
2929
2929
  super(t, e, r), this.state = s;
2930
2930
  }
@@ -2938,7 +2938,7 @@ const He = class extends Ye {
2938
2938
  this.innerOverlay.setStrokeColor(t);
2939
2939
  }
2940
2940
  setStrokeOpacity(t) {
2941
- this.innerOverlay.setStrokeOpacity(t + He.OPACITY_DELTA);
2941
+ this.innerOverlay.setStrokeOpacity(t + je.OPACITY_DELTA);
2942
2942
  }
2943
2943
  setStrokeWeight(t) {
2944
2944
  this.innerOverlay.setStrokeWeight(t);
@@ -2947,18 +2947,18 @@ const He = class extends Ye {
2947
2947
  this.innerOverlay.setFillColor(t);
2948
2948
  }
2949
2949
  setFillOpacity(t) {
2950
- this.innerOverlay.setFillOpacity(t + He.OPACITY_DELTA);
2950
+ this.innerOverlay.setFillOpacity(t + je.OPACITY_DELTA);
2951
2951
  }
2952
2952
  };
2953
- let I = He;
2953
+ let B = je;
2954
2954
  /**
2955
2955
  * baidu地图的透明度属性有如下问题:
2956
2956
  * - 在透明度为0时, 无法隐藏掉颜色
2957
2957
  * - 透明度为0.7和0.8时, 在maintain的发布模式下, polyline的线条会不可见 (原因未知, 在tg-map中无法复现)
2958
2958
  * 故统一加个0.001, 规避这些问题...
2959
2959
  */
2960
- c(I, "OPACITY_DELTA", 1e-3);
2961
- class qe extends Mt {
2960
+ c(B, "OPACITY_DELTA", 1e-3);
2961
+ class qe extends Tt {
2962
2962
  isEditable() {
2963
2963
  return this.innerOverlay.getEditable();
2964
2964
  }
@@ -2981,7 +2981,7 @@ class qe extends Mt {
2981
2981
  this.innerOverlay.setOptions({ fillOpacity: t });
2982
2982
  }
2983
2983
  }
2984
- class Ot extends I {
2984
+ class Ot extends B {
2985
2985
  constructor() {
2986
2986
  super(...arguments);
2987
2987
  c(this, "prevCenter");
@@ -3008,10 +3008,10 @@ class Ot extends I {
3008
3008
  enableEditing: !1,
3009
3009
  // options.editable,
3010
3010
  strokeColor: e.strokeColor,
3011
- strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + I.OPACITY_DELTA : void 0,
3011
+ strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + B.OPACITY_DELTA : void 0,
3012
3012
  strokeWeight: e.strokeWeight,
3013
3013
  fillColor: e.fillColor,
3014
- fillOpacity: e.fillOpacity != null ? e.fillOpacity + I.OPACITY_DELTA : void 0
3014
+ fillOpacity: e.fillOpacity != null ? e.fillOpacity + B.OPACITY_DELTA : void 0
3015
3015
  }), n = new Ot(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
3016
3016
  return n.state.editable && setTimeout(() => {
3017
3017
  n.state.editable && s.enableEditing();
@@ -3034,7 +3034,7 @@ class Ot extends I {
3034
3034
  }, 0));
3035
3035
  }
3036
3036
  getCenter() {
3037
- return y.fromBaidu(this.innerOverlay.getCenter(), this.coordType);
3037
+ return v.fromBaidu(this.innerOverlay.getCenter(), this.coordType);
3038
3038
  }
3039
3039
  setRadius(e) {
3040
3040
  this.isDoingSetRadius = !0, this.innerOverlay.setRadius(e), this.isDoingSetRadius = !1;
@@ -3063,7 +3063,7 @@ class Ct extends qe {
3063
3063
  this.coordType = this.map.coordType, this.innerOverlay.setCenter(t.toGoogle(this.coordType));
3064
3064
  }
3065
3065
  getCenter() {
3066
- return y.fromGoogle(this.innerOverlay.getCenter() ?? J.LATLNG_ZERO, this.coordType);
3066
+ return v.fromGoogle(this.innerOverlay.getCenter() ?? J.LATLNG_ZERO, this.coordType);
3067
3067
  }
3068
3068
  setRadius(t) {
3069
3069
  this.innerOverlay.setRadius(t);
@@ -3072,7 +3072,7 @@ class Ct extends qe {
3072
3072
  return this.innerOverlay.getRadius();
3073
3073
  }
3074
3074
  }
3075
- function Lr() {
3075
+ function wr() {
3076
3076
  BMap.OverlayV3 || (BMap.OverlayV3 = BMap.Overlay);
3077
3077
  }
3078
3078
  const Yt = {
@@ -3086,14 +3086,14 @@ var X;
3086
3086
  i.ZERO = { x: 0, y: 0 };
3087
3087
  })(X || (X = {}));
3088
3088
  let tt;
3089
- function Ai(i, t, e, r, s, n) {
3090
- return tt || (tt = Ri()), new tt(i, t, e, r, s, n);
3089
+ function Si(i, t, e, r, s, n) {
3090
+ return tt || (tt = Ai()), new tt(i, t, e, r, s, n);
3091
3091
  }
3092
- function Ri() {
3093
- Lr();
3092
+ function Ai() {
3093
+ wr();
3094
3094
  const i = new BMap.Point(0, 0);
3095
3095
  return class extends BMap.OverlayV3 {
3096
- constructor(r, s = i, n = X.ZERO, a, h = 654, o = "") {
3096
+ constructor(r, s = i, n = X.ZERO, a, d = 654, o = "") {
3097
3097
  super();
3098
3098
  // 类表达式不能有私有成员, 故改成public
3099
3099
  c(this, "container");
@@ -3104,10 +3104,10 @@ function Ri() {
3104
3104
  this.content = r, this.position = s, this.offset = n;
3105
3105
  const l = "baidu-info-box-container";
3106
3106
  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";
3107
- const d = document.createElement("img");
3108
- d.className = l + "__close", d.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", d.addEventListener("click", () => {
3107
+ const h = document.createElement("img");
3108
+ h.className = l + "__close", h.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", h.addEventListener("click", () => {
3109
3109
  this.close(), this.dispatchEvent({ type: "onclickclose" });
3110
- }), this.inner.appendChild(r), this.border.appendChild(this.inner), this.border.appendChild(d), this.container.appendChild(this.border), a && this.setZIndex(a), this.setMaxWidth(h), this.onMarkerPositionChanged = this.onMarkerPositionChanged.bind(this);
3110
+ }), this.inner.appendChild(r), this.border.appendChild(this.inner), this.border.appendChild(h), this.container.appendChild(this.border), a && this.setZIndex(a), this.setMaxWidth(d), this.onMarkerPositionChanged = this.onMarkerPositionChanged.bind(this);
3111
3111
  }
3112
3112
  initialize(r) {
3113
3113
  return this.map = r, r.getPanes().floatPane.appendChild(this.container), this.container;
@@ -3169,10 +3169,10 @@ class wt {
3169
3169
  }
3170
3170
  class Et extends wt {
3171
3171
  constructor(t, e, r) {
3172
- super(new ae(t, e)), this.inner = t, this.map = e, this.state = r;
3172
+ super(new le(t, e)), this.inner = t, this.map = e, this.state = r;
3173
3173
  }
3174
3174
  static create(t) {
3175
- const e = t.position || y.ZERO, r = new BMap.InfoWindow(t.content, {
3175
+ const e = t.position || v.ZERO, r = new BMap.InfoWindow(t.content, {
3176
3176
  maxWidth: t.maxWidth,
3177
3177
  offset: t.offset && new BMap.Size(t.offset.x, t.offset.y),
3178
3178
  enableAutoPan: !t.disableAutoPan
@@ -3183,14 +3183,14 @@ class Et extends wt {
3183
3183
  return this.inner.isOpen();
3184
3184
  }
3185
3185
  open(t) {
3186
- t ? t.innerOverlay.openInfoWindow(this.inner) : this.map.innerMap.openInfoWindow(this.inner, (this.state.position || y.ZERO).toBaidu(this.map.coordType)), this.map.setLatestInfoWindowInternal(this);
3186
+ t ? t.innerOverlay.openInfoWindow(this.inner) : this.map.innerMap.openInfoWindow(this.inner, (this.state.position || v.ZERO).toBaidu(this.map.coordType)), this.map.setLatestInfoWindowInternal(this);
3187
3187
  }
3188
3188
  close() {
3189
3189
  this.inner.isOpen() && this.map.innerMap.closeInfoWindow();
3190
3190
  }
3191
3191
  getPosition() {
3192
3192
  const t = this.inner.getPosition();
3193
- return t && y.fromBaidu(t, this.map.coordType) || this.state.position || y.ZERO;
3193
+ return t && v.fromBaidu(t, this.map.coordType) || this.state.position || v.ZERO;
3194
3194
  }
3195
3195
  setPosition(t) {
3196
3196
  this.state.position = t, this.inner.isOpen() && this.open();
@@ -3198,8 +3198,8 @@ class Et extends wt {
3198
3198
  }
3199
3199
  class Lt extends wt {
3200
3200
  constructor(e, r) {
3201
- super(new re(e, r));
3202
- c(this, "eventHub", new lr());
3201
+ super(new ie(e, r));
3202
+ c(this, "eventHub", new sr());
3203
3203
  c(this, "isOpened", !1);
3204
3204
  this.inner = e, this.map = r, e.addListener("closeclick", () => {
3205
3205
  this.isOpened = !1, this.eventHub.hasListener("close") && this.eventHub.notify({ type: "close", target: this });
@@ -3209,7 +3209,7 @@ class Lt extends wt {
3209
3209
  });
3210
3210
  }
3211
3211
  static create(e) {
3212
- const r = e.position || y.ZERO, s = new google.maps.InfoWindow({
3212
+ const r = e.position || v.ZERO, s = new google.maps.InfoWindow({
3213
3213
  content: e.content,
3214
3214
  maxWidth: e.maxWidth,
3215
3215
  pixelOffset: e.offset && new google.maps.Size(e.offset.x, e.offset.y),
@@ -3248,7 +3248,7 @@ class Lt extends wt {
3248
3248
  this.isOpened && (this.isOpened = !1, this.inner.close(), this.eventHub.notify({ type: "close", target: this }));
3249
3249
  }
3250
3250
  getPosition() {
3251
- return y.fromGoogle(this.inner.getPosition() ?? J.LATLNG_ZERO, this.map.coordType);
3251
+ return v.fromGoogle(this.inner.getPosition() ?? J.LATLNG_ZERO, this.map.coordType);
3252
3252
  }
3253
3253
  setPosition(e) {
3254
3254
  this.inner.setPosition(e.toGoogle(this.map.coordType));
@@ -3260,7 +3260,7 @@ class xt extends Ye {
3260
3260
  }
3261
3261
  static create(t) {
3262
3262
  var s;
3263
- const e = this.coordType, r = Ai(
3263
+ const e = this.coordType, r = Si(
3264
3264
  t.content,
3265
3265
  (s = t.position) == null ? void 0 : s.toBaidu(e),
3266
3266
  t.offset,
@@ -3277,7 +3277,7 @@ class xt extends Ye {
3277
3277
  this.innerOverlay.close();
3278
3278
  }
3279
3279
  getPosition() {
3280
- return y.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
3280
+ return v.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
3281
3281
  }
3282
3282
  setPosition(t) {
3283
3283
  this.coordType = this.map.coordType, this.innerOverlay.setPosition(t.toBaidu(this.coordType));
@@ -3291,7 +3291,7 @@ class xt extends Ye {
3291
3291
  }
3292
3292
  class Pt extends wt {
3293
3293
  constructor(t, e, r) {
3294
- super(new re(t, r)), this.inner = t, this.coordType = e, this.map = r;
3294
+ super(new ie(t, r)), this.inner = t, this.coordType = e, this.map = r;
3295
3295
  }
3296
3296
  static create(t) {
3297
3297
  var n;
@@ -3303,8 +3303,8 @@ class Pt extends wt {
3303
3303
  maxWidth: t.maxWidth
3304
3304
  }), s = t.borderClass;
3305
3305
  return s && r.addListener("domready", () => {
3306
- var h;
3307
- const a = (h = t.content.parentElement) == null ? void 0 : h.parentElement;
3306
+ var d;
3307
+ const a = (d = t.content.parentElement) == null ? void 0 : d.parentElement;
3308
3308
  a && a.className.includes("gm-style-iw-c") && !a.className.includes(s) && (a.className += ` ${s}`);
3309
3309
  }), new Pt(r, e, this);
3310
3310
  }
@@ -3315,7 +3315,7 @@ class Pt extends wt {
3315
3315
  this.inner.close();
3316
3316
  }
3317
3317
  getPosition() {
3318
- return y.fromGoogle(this.inner.getPosition() ?? J.LATLNG_ZERO, this.coordType);
3318
+ return v.fromGoogle(this.inner.getPosition() ?? J.LATLNG_ZERO, this.coordType);
3319
3319
  }
3320
3320
  setPosition(t) {
3321
3321
  this.coordType = this.map.coordType, this.inner.setPosition(t.toGoogle(this.coordType));
@@ -3334,7 +3334,7 @@ class Pt extends wt {
3334
3334
  this.inner.setZIndex(t);
3335
3335
  }
3336
3336
  }
3337
- var de;
3337
+ var ue;
3338
3338
  ((i) => {
3339
3339
  function t(n, a) {
3340
3340
  if (n !== void 0)
@@ -3348,15 +3348,15 @@ var de;
3348
3348
  }
3349
3349
  i.trimIndent = e;
3350
3350
  function r(n) {
3351
- return n.replace(/([^A-Z]?)([A-Z])/g, (a, h, o) => h ? `${h}-${o.toLowerCase()}` : o.toLowerCase());
3351
+ return n.replace(/([^A-Z]?)([A-Z])/g, (a, d, o) => d ? `${d}-${o.toLowerCase()}` : o.toLowerCase());
3352
3352
  }
3353
3353
  i.pascal2kebab = r;
3354
3354
  function s(n) {
3355
3355
  return /^-?\d+$/.test(n);
3356
3356
  }
3357
3357
  i.isInt = s;
3358
- })(de || (de = {}));
3359
- const $i = {
3358
+ })(ue || (ue = {}));
3359
+ const Ri = {
3360
3360
  /** @see https://nodejs.org/docs/v10.3.0/api/path.html#path_path_basename_path_ext */
3361
3361
  basename(i, t) {
3362
3362
  const e = i.endsWith("/") ? i.slice(0, -1) : i, r = e.lastIndexOf("/"), s = r >= 0 ? e.substring(r + 1) : e;
@@ -3396,7 +3396,7 @@ var we = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overla
3396
3396
  }
3397
3397
  i.toBaidu = e;
3398
3398
  })(Ee || (Ee = {}));
3399
- class zi {
3399
+ class $i {
3400
3400
  constructor(t, e) {
3401
3401
  c(this, "baidu");
3402
3402
  c(this, "google");
@@ -3417,12 +3417,12 @@ class zi {
3417
3417
  asBaidu() {
3418
3418
  if (!this.baidu) {
3419
3419
  const t = this;
3420
- Lr();
3420
+ wr();
3421
3421
  class e extends BMap.OverlayV3 {
3422
3422
  initialize(n) {
3423
3423
  var o;
3424
- const a = t.create(), h = n.getPanes();
3425
- return (o = Ee.toBaidu(t.mapPane, h)) == null || o.appendChild(a), a;
3424
+ const a = t.create(), d = n.getPanes();
3425
+ return (o = Ee.toBaidu(t.mapPane, d)) == null || o.appendChild(a), a;
3426
3426
  }
3427
3427
  draw() {
3428
3428
  t.draw();
@@ -3435,7 +3435,7 @@ class zi {
3435
3435
  return r.pointToOverlayPixel(s.toBaidu(t.map.coordType));
3436
3436
  },
3437
3437
  fromOverlayPointToLatLng(s) {
3438
- return y.fromBaidu(r.overlayPixelToPoint(new BMap.Pixel(s.x, s.y)), t.map.coordType);
3438
+ return v.fromBaidu(r.overlayPixelToPoint(new BMap.Pixel(s.x, s.y)), t.map.coordType);
3439
3439
  }
3440
3440
  };
3441
3441
  }
@@ -3462,7 +3462,7 @@ class zi {
3462
3462
  return t.google.getProjection().fromLatLngToDivPixel(r.toGoogle(t.map.coordType)) ?? X.ZERO;
3463
3463
  },
3464
3464
  fromOverlayPointToLatLng(r) {
3465
- return y.fromGoogle(t.google.getProjection().fromDivPixelToLatLng(new google.maps.Point(r.x, r.y)) ?? J.LATLNG_ZERO, t.map.coordType);
3465
+ return v.fromGoogle(t.google.getProjection().fromDivPixelToLatLng(new google.maps.Point(r.x, r.y)) ?? J.LATLNG_ZERO, t.map.coordType);
3466
3466
  }
3467
3467
  };
3468
3468
  }
@@ -3470,10 +3470,10 @@ class zi {
3470
3470
  }
3471
3471
  }
3472
3472
  let rt;
3473
- function Di(i, t, e, r, s) {
3474
- return rt || (rt = Ni()), new rt(i, t, e, r, s);
3473
+ function zi(i, t, e, r, s) {
3474
+ return rt || (rt = Di()), new rt(i, t, e, r, s);
3475
3475
  }
3476
- function Ni() {
3476
+ function Di() {
3477
3477
  return class extends google.maps.OverlayView {
3478
3478
  constructor(e, r, s, n = we.overlayMouseTarget, a) {
3479
3479
  super();
@@ -3527,7 +3527,7 @@ function Ni() {
3527
3527
  }
3528
3528
  };
3529
3529
  }
3530
- var ue;
3530
+ var pe;
3531
3531
  ((i) => {
3532
3532
  function t(r) {
3533
3533
  return typeof r == "string" ? r : r.outerHTML;
@@ -3541,7 +3541,7 @@ var ue;
3541
3541
  return r;
3542
3542
  }
3543
3543
  i.toElement = e;
3544
- })(ue || (ue = {}));
3544
+ })(pe || (pe = {}));
3545
3545
  class kt extends Ye {
3546
3546
  constructor(e, r, s, n) {
3547
3547
  super(e, r, s);
@@ -3553,7 +3553,7 @@ class kt extends Ye {
3553
3553
  }
3554
3554
  static create(e) {
3555
3555
  var a;
3556
- const r = this.coordType, s = new BMap.Label(ue.toString(e.content), {
3556
+ const r = this.coordType, s = new BMap.Label(pe.toString(e.content), {
3557
3557
  position: (a = e.position) == null ? void 0 : a.toBaidu(r),
3558
3558
  offset: e.offset && new BMap.Size(e.offset.x, e.offset.y)
3559
3559
  });
@@ -3573,13 +3573,13 @@ class kt extends Ye {
3573
3573
  characterData: !0,
3574
3574
  childList: !0,
3575
3575
  subtree: !0
3576
- })), r || this.innerOverlay.setContent(ue.toString(e)), this.content = e);
3576
+ })), r || this.innerOverlay.setContent(pe.toString(e)), this.content = e);
3577
3577
  }
3578
3578
  setZIndex(e) {
3579
3579
  this.innerOverlay.setZIndex(e);
3580
3580
  }
3581
3581
  getPosition() {
3582
- return y.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
3582
+ return v.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
3583
3583
  }
3584
3584
  setPosition(e) {
3585
3585
  this.coordType = this.map.coordType, this.innerOverlay.setPosition(e.toBaidu(this.coordType));
@@ -3601,7 +3601,7 @@ class kt extends Ye {
3601
3601
  * @description baidu中Label默认左上角对齐Icon的左上, 我们要将其转换为对齐marker的position
3602
3602
  * */
3603
3603
  attachIcon(e) {
3604
- var h;
3604
+ var d;
3605
3605
  let r;
3606
3606
  if (e instanceof BMap.Icon)
3607
3607
  r = e.anchor;
@@ -3609,29 +3609,29 @@ class kt extends Ye {
3609
3609
  if (e.anchor)
3610
3610
  r = e.anchor;
3611
3611
  else {
3612
- const o = ((h = e.__icon__) == null ? void 0 : h.baiduLabelOffset) ?? { x: 0, y: 0 };
3612
+ const o = ((d = e.__icon__) == null ? void 0 : d.baiduLabelOffset) ?? { x: 0, y: 0 };
3613
3613
  r = {
3614
3614
  width: e.style.anchor.width + o.x,
3615
3615
  height: e.style.anchor.height + o.y
3616
3616
  }, process.env.NODE_ENV !== "production" && setTimeout(() => {
3617
3617
  var u, p;
3618
- if (oe(e.__icon__, `${e}必须是由'SymbolIcon.toBaidu()'创建的`), !e.anchor) {
3618
+ if (ae(e.__icon__, `${e}必须是由'SymbolIcon.toBaidu()'创建的`), !e.anchor) {
3619
3619
  console.log("BaiduLabelOverlay.attachIcon", "Bmap.Symbol.anchor尚未计算完成");
3620
3620
  return;
3621
3621
  }
3622
- const l = e.anchor.width - e.style.anchor.width, d = e.anchor.height - e.style.anchor.height;
3623
- if (o.x !== l || o.y !== d) {
3624
- const b = [
3622
+ const l = e.anchor.width - e.style.anchor.width, h = e.anchor.height - e.style.anchor.height;
3623
+ if (o.x !== l || o.y !== h) {
3624
+ const f = [
3625
3625
  (u = e.__icon__.anchor) == null ? void 0 : u.x,
3626
3626
  (p = e.__icon__.anchor) == null ? void 0 : p.y,
3627
3627
  e.__icon__.rotation,
3628
3628
  e.__icon__.scale,
3629
3629
  e.__icon__.strokeWeight
3630
3630
  ].map((_) => _ ?? "").join(",");
3631
- console.warn("BaiduLabelOverlay.attachIcon", e.__icon__, de.trimIndent(
3631
+ console.warn("BaiduLabelOverlay.attachIcon", e.__icon__, ue.trimIndent(
3632
3632
  `
3633
- 为了保证Label的位置正确, 请将SymbolIcon(${b})中baiduLabelOffset的值改写成:
3634
- ${JSON.stringify({ x: l, y: d })}
3633
+ 为了保证Label的位置正确, 请将SymbolIcon(${f})中baiduLabelOffset的值改写成:
3634
+ ${JSON.stringify({ x: l, y: h })}
3635
3635
  `
3636
3636
  ));
3637
3637
  }
@@ -3642,27 +3642,27 @@ class kt extends Ye {
3642
3642
  this.iconAnchor && (n -= this.iconAnchor.width, a -= this.iconAnchor.height), r && (n += r.width, a += r.height), this.innerOverlay.setOffset(new BMap.Size(n, a)), this.icon = e, this.iconAnchor = r;
3643
3643
  }
3644
3644
  }
3645
- class Bt extends Mt {
3645
+ class It extends Tt {
3646
3646
  static create(t) {
3647
3647
  var s;
3648
- const e = this.coordType, r = Di(
3649
- ue.toElement(t.content),
3648
+ const e = this.coordType, r = zi(
3649
+ pe.toElement(t.content),
3650
3650
  (s = t.position) == null ? void 0 : s.toGoogle(e),
3651
3651
  t.offset,
3652
3652
  t.mapPane,
3653
3653
  t.zIndex
3654
3654
  );
3655
- return new Bt(r, e, this);
3655
+ return new It(r, e, this);
3656
3656
  }
3657
3657
  setZIndex(t) {
3658
3658
  this.innerOverlay.setZIndex(t);
3659
3659
  }
3660
3660
  setContent(t) {
3661
- this.innerOverlay.setElement(ue.toElement(t));
3661
+ this.innerOverlay.setElement(pe.toElement(t));
3662
3662
  }
3663
3663
  getPosition() {
3664
3664
  const t = this.innerOverlay.getPosition();
3665
- return t ? y.fromGoogle(t, this.coordType) : y.ZERO;
3665
+ return t ? v.fromGoogle(t, this.coordType) : v.ZERO;
3666
3666
  }
3667
3667
  setPosition(t) {
3668
3668
  this.coordType = this.map.coordType, this.innerOverlay.setPosition(t.toGoogle(this.coordType));
@@ -3674,11 +3674,11 @@ class Bt extends Mt {
3674
3674
  this.innerOverlay.setOffset(t);
3675
3675
  }
3676
3676
  }
3677
- const Ne = {
3678
- toGoogle: (i) => "url" in i ? Ge.toGoogle(i) : pe.toGoogle(i),
3679
- toBaidu: (i) => "url" in i ? Ge.toBaidu(i) : pe.toBaidu(i)
3677
+ const De = {
3678
+ toGoogle: (i) => "url" in i ? Ne.toGoogle(i) : ge.toGoogle(i),
3679
+ toBaidu: (i) => "url" in i ? Ne.toBaidu(i) : ge.toBaidu(i)
3680
3680
  };
3681
- var Ge;
3681
+ var Ne;
3682
3682
  ((i) => {
3683
3683
  function t(r) {
3684
3684
  return {
@@ -3702,8 +3702,8 @@ var Ge;
3702
3702
  });
3703
3703
  }
3704
3704
  i.toBaidu = e;
3705
- })(Ge || (Ge = {}));
3706
- var pe;
3705
+ })(Ne || (Ne = {}));
3706
+ var ge;
3707
3707
  ((i) => {
3708
3708
  function t(r) {
3709
3709
  return {
@@ -3734,19 +3734,19 @@ var pe;
3734
3734
  return s.__icon__ = r, s;
3735
3735
  }
3736
3736
  i.toBaidu = e;
3737
- })(pe || (pe = {}));
3738
- const Ys = {
3737
+ })(ge || (ge = {}));
3738
+ const Xs = {
3739
3739
  CIRCLE: { baidu: () => BMap_Symbol_SHAPE_CIRCLE, google: () => google.maps.SymbolPath.CIRCLE },
3740
3740
  BACKWARD_CLOSED_ARROW: { baidu: () => BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW, google: () => google.maps.SymbolPath.BACKWARD_CLOSED_ARROW },
3741
3741
  BACKWARD_OPEN_ARROW: { baidu: () => BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW, google: () => google.maps.SymbolPath.BACKWARD_OPEN_ARROW },
3742
3742
  FORWARD_CLOSED_ARROW: { baidu: () => BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW, google: () => google.maps.SymbolPath.FORWARD_CLOSED_ARROW },
3743
3743
  FORWARD_OPEN_ARROW: { baidu: () => BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW, google: () => google.maps.SymbolPath.FORWARD_OPEN_ARROW }
3744
3744
  };
3745
- var Ze;
3745
+ var Ge;
3746
3746
  ((i) => {
3747
3747
  function t(r) {
3748
3748
  return {
3749
- icon: pe.toGoogle(r.icon),
3749
+ icon: ge.toGoogle(r.icon),
3750
3750
  offset: r.offset,
3751
3751
  repeat: r.repeat,
3752
3752
  fixedRotation: r.fixedRotation
@@ -3755,14 +3755,14 @@ var Ze;
3755
3755
  i.toGoogle = t;
3756
3756
  function e(r) {
3757
3757
  return new BMap.IconSequence(
3758
- pe.toBaidu(r.icon),
3758
+ ge.toBaidu(r.icon),
3759
3759
  r.offset,
3760
3760
  r.repeat ?? "",
3761
3761
  r.fixedRotation
3762
3762
  );
3763
3763
  }
3764
3764
  i.toBaidu = e;
3765
- })(Ze || (Ze = {}));
3765
+ })(Ge || (Ge = {}));
3766
3766
  class Le extends Ye {
3767
3767
  constructor(t, e, r, s) {
3768
3768
  super(t, e, r), this.state = s;
@@ -3770,7 +3770,7 @@ class Le extends Ye {
3770
3770
  static create(t) {
3771
3771
  const e = this.coordType, r = t.icon, s = {
3772
3772
  title: t.title,
3773
- icon: r && Ne.toBaidu(r),
3773
+ icon: r && De.toBaidu(r),
3774
3774
  enableClicking: t.clickable,
3775
3775
  enableDragging: t.draggable,
3776
3776
  // baidu的raiseOnDrag属性, 默认为false, 而我们的options.crossOnDrag默认为true, 故这里需要转换下
@@ -3778,11 +3778,11 @@ class Le extends Ye {
3778
3778
  draggingCursor: t.cursor
3779
3779
  }, n = new BMap.Marker(t.position.toBaidu(e, t.normalizePositionForBaidu), s);
3780
3780
  n.__create_by_tg__ = !0, t.zIndex !== void 0 && n.setZIndex(t.zIndex);
3781
- const a = t.clickable === void 0 ? !0 : t.clickable, h = !!t.draggable;
3782
- return new Le(n, e, this, { clickable: a, draggable: h, zIndex: t.zIndex, normalize: t.normalizePositionForBaidu }).visibleOptionInternal(t.visible);
3781
+ const a = t.clickable === void 0 ? !0 : t.clickable, d = !!t.draggable;
3782
+ return new Le(n, e, this, { clickable: a, draggable: d, zIndex: t.zIndex, normalize: t.normalizePositionForBaidu }).visibleOptionInternal(t.visible);
3783
3783
  }
3784
3784
  getPosition() {
3785
- return y.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
3785
+ return v.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
3786
3786
  }
3787
3787
  setPosition(t) {
3788
3788
  var e;
@@ -3795,7 +3795,7 @@ class Le extends Ye {
3795
3795
  return this.innerOverlay.getTitle();
3796
3796
  }
3797
3797
  setIcon(t) {
3798
- const e = Ne.toBaidu(t);
3798
+ const e = De.toBaidu(t);
3799
3799
  this.innerOverlay.setIcon(e);
3800
3800
  const r = this.getLabel();
3801
3801
  r && r.attachIcon(e);
@@ -3830,7 +3830,7 @@ class Le extends Ye {
3830
3830
  return (t = this.innerOverlay.getLabel()) == null ? void 0 : t.__label__;
3831
3831
  }
3832
3832
  }
3833
- class It extends Mt {
3833
+ class Bt extends Tt {
3834
3834
  constructor() {
3835
3835
  super(...arguments);
3836
3836
  c(this, "label");
@@ -3844,7 +3844,7 @@ class It extends Mt {
3844
3844
  title: e.title,
3845
3845
  zIndex: e.zIndex,
3846
3846
  visible: e.visible,
3847
- icon: s && Ne.toGoogle(s),
3847
+ icon: s && De.toGoogle(s),
3848
3848
  clickable: e.clickable,
3849
3849
  draggable: e.draggable,
3850
3850
  // google的crossOnDrag和我们的crossOnDrag是匹配的, 不需要转换
@@ -3853,10 +3853,10 @@ class It extends Mt {
3853
3853
  // InfoWindow相对marker的position的偏移量, 若不指定, 则偏移到marker的icon的上部中央
3854
3854
  anchorPoint: new google.maps.Point(0, 0)
3855
3855
  };
3856
- return new It(new google.maps.Marker(n), r, this);
3856
+ return new Bt(new google.maps.Marker(n), r, this);
3857
3857
  }
3858
3858
  getPosition() {
3859
- return y.fromGoogle(this.innerOverlay.getPosition(), this.coordType);
3859
+ return v.fromGoogle(this.innerOverlay.getPosition(), this.coordType);
3860
3860
  }
3861
3861
  setPosition(e) {
3862
3862
  this.coordType = this.map.coordType, this.innerOverlay.setPosition(e.toGoogle(this.coordType));
@@ -3868,7 +3868,7 @@ class It extends Mt {
3868
3868
  return this.innerOverlay.getTitle() || "";
3869
3869
  }
3870
3870
  setIcon(e) {
3871
- this.innerOverlay.setIcon(Ne.toGoogle(e));
3871
+ this.innerOverlay.setIcon(De.toGoogle(e));
3872
3872
  }
3873
3873
  getIcon() {
3874
3874
  return this.innerOverlay.getIcon();
@@ -3906,7 +3906,7 @@ class It extends Mt {
3906
3906
  this.label = void 0, this.labelPositionListener = void 0, this.labelVisibleListener = void 0, this.labelMapChangedListener = void 0;
3907
3907
  }
3908
3908
  }
3909
- class St extends I {
3909
+ class St extends B {
3910
3910
  constructor() {
3911
3911
  super(...arguments);
3912
3912
  c(this, "eventHubDelegate");
@@ -3949,21 +3949,21 @@ class At extends St {
3949
3949
  }
3950
3950
  static create(e) {
3951
3951
  var n, a;
3952
- const r = this.coordType, s = new BMap.Polyline(e.path.map((h) => h.toBaidu(r)), {
3952
+ const r = this.coordType, s = new BMap.Polyline(e.path.map((d) => d.toBaidu(r)), {
3953
3953
  enableClicking: e.clickable,
3954
3954
  enableEditing: e.editable,
3955
3955
  strokeColor: e.strokeColor,
3956
- strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + I.OPACITY_DELTA : void 0,
3956
+ strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + B.OPACITY_DELTA : void 0,
3957
3957
  strokeWeight: e.strokeWeight,
3958
- icons: (n = e.icons) == null ? void 0 : n.map(Ze.toBaidu)
3958
+ icons: (n = e.icons) == null ? void 0 : n.map(Ge.toBaidu)
3959
3959
  });
3960
3960
  return new At(s, r, this, {
3961
3961
  editable: !!e.editable,
3962
- symbolIcons: (a = e.icons) == null ? void 0 : a.map((h) => h.icon)
3962
+ symbolIcons: (a = e.icons) == null ? void 0 : a.map((d) => d.icon)
3963
3963
  }).visibleOptionInternal(e.visible);
3964
3964
  }
3965
3965
  getPath() {
3966
- return this.innerOverlay.getPath().map((e) => y.fromBaidu(e, this.coordType));
3966
+ return this.innerOverlay.getPath().map((e) => v.fromBaidu(e, this.coordType));
3967
3967
  }
3968
3968
  setPath(e) {
3969
3969
  this.coordType = this.map.coordType, this.setPathInternal(e.map((r) => r.toBaidu(this.coordType)));
@@ -3980,8 +3980,8 @@ class At extends St {
3980
3980
  const a = n.getIcon();
3981
3981
  if (!(a instanceof BMap.Symbol))
3982
3982
  return !1;
3983
- const h = a;
3984
- return h.__icon__ ? (o = this.state.symbolIcons) == null ? void 0 : o.includes(h.__icon__) : !1;
3983
+ const d = a;
3984
+ return d.__icon__ ? (o = this.state.symbolIcons) == null ? void 0 : o.includes(d.__icon__) : !1;
3985
3985
  }).forEach((s) => this.map.innerMap.removeOverlay(s));
3986
3986
  }
3987
3987
  }
@@ -4001,7 +4001,7 @@ class Rt extends qe {
4001
4001
  strokeOpacity: e.strokeOpacity,
4002
4002
  strokeWeight: e.strokeWeight,
4003
4003
  visible: e.visible,
4004
- icons: (n = e.icons) == null ? void 0 : n.map(Ze.toGoogle)
4004
+ icons: (n = e.icons) == null ? void 0 : n.map(Ge.toGoogle)
4005
4005
  });
4006
4006
  return new Rt(s, r, this);
4007
4007
  }
@@ -4026,7 +4026,7 @@ class Rt extends qe {
4026
4026
  getPath() {
4027
4027
  const e = [];
4028
4028
  return this.innerOverlay.getPath().forEach((r) => {
4029
- e.push(y.fromGoogle(r, this.coordType));
4029
+ e.push(v.fromGoogle(r, this.coordType));
4030
4030
  }), e;
4031
4031
  }
4032
4032
  setPath(e) {
@@ -4046,15 +4046,15 @@ class $t extends St {
4046
4046
  enableClicking: e.clickable,
4047
4047
  enableEditing: e.editable,
4048
4048
  strokeColor: e.strokeColor,
4049
- strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + I.OPACITY_DELTA : void 0,
4049
+ strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + B.OPACITY_DELTA : void 0,
4050
4050
  strokeWeight: e.strokeWeight,
4051
4051
  fillColor: e.fillColor,
4052
- fillOpacity: e.fillOpacity != null ? e.fillOpacity + I.OPACITY_DELTA : void 0
4052
+ fillOpacity: e.fillOpacity != null ? e.fillOpacity + B.OPACITY_DELTA : void 0
4053
4053
  });
4054
4054
  return new $t(n, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
4055
4055
  }
4056
4056
  getPaths() {
4057
- return [this.innerOverlay.getPath().map((e) => y.fromBaidu(e, this.coordType))];
4057
+ return [this.innerOverlay.getPath().map((e) => v.fromBaidu(e, this.coordType))];
4058
4058
  }
4059
4059
  setPaths(e) {
4060
4060
  e.length > 1 && console.warn("baidu不支持多path, 只会显示paths[0]"), this.coordType = this.map.coordType, this.setPathInternal((e[0] || []).map((r) => r.toBaidu(this.coordType)));
@@ -4105,7 +4105,7 @@ class zt extends qe {
4105
4105
  return e.forEach((s) => {
4106
4106
  const n = [];
4107
4107
  r.push(n), s.forEach((a) => {
4108
- n.push(y.fromGoogle(a, this.coordType));
4108
+ n.push(v.fromGoogle(a, this.coordType));
4109
4109
  });
4110
4110
  }), r;
4111
4111
  }
@@ -4130,9 +4130,9 @@ class Dt extends St {
4130
4130
  if (a > r.length) {
4131
4131
  for (let o = 0; o < a; o++)
4132
4132
  if (r[o] == null || !Yt.equals(s[o], r[o])) {
4133
- const l = s[(o - 2 + a) % a], d = s[(o - 1 + a) % a], u = s[o], p = s[(o + 1) % a], b = s[(o + 2) % a];
4133
+ const l = s[(o - 2 + a) % a], h = s[(o - 1 + a) % a], u = s[o], p = s[(o + 1) % a], f = s[(o + 2) % a];
4134
4134
  let _;
4135
- d.lat === p.lat ? _ = new BMap.Point(d.lng, u.lat) : d.lng === p.lng ? _ = new BMap.Point(u.lng, d.lat) : _ = u, n = [l, b, _];
4135
+ h.lat === p.lat ? _ = new BMap.Point(h.lng, u.lat) : h.lng === p.lng ? _ = new BMap.Point(u.lng, h.lat) : _ = u, n = [l, f, _];
4136
4136
  break;
4137
4137
  }
4138
4138
  } else if (a === r.length) {
@@ -4146,8 +4146,8 @@ class Dt extends St {
4146
4146
  }
4147
4147
  } else
4148
4148
  a < r.length;
4149
- const h = R.fromArray(n.map((o) => y.fromBaidu(o, this.coordType)));
4150
- h && (this.isDoingUpdateRectangle = !0, this.innerOverlay.setPath(h.toRectArray().map((o) => o.toBaidu(this.coordType))), this.isDoingUpdateRectangle = !1);
4149
+ const d = R.fromArray(n.map((o) => v.fromBaidu(o, this.coordType)));
4150
+ d && (this.isDoingUpdateRectangle = !0, this.innerOverlay.setPath(d.toRectArray().map((o) => o.toBaidu(this.coordType))), this.isDoingUpdateRectangle = !1);
4151
4151
  }, 0);
4152
4152
  });
4153
4153
  this.addEventListener("bounds-changed", this.onBoundsChanged);
@@ -4157,10 +4157,10 @@ class Dt extends St {
4157
4157
  enableClicking: e.clickable,
4158
4158
  enableEditing: e.editable,
4159
4159
  strokeColor: e.strokeColor,
4160
- strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + I.OPACITY_DELTA : void 0,
4160
+ strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + B.OPACITY_DELTA : void 0,
4161
4161
  strokeWeight: e.strokeWeight,
4162
4162
  fillColor: e.fillColor,
4163
- fillOpacity: e.fillOpacity != null ? e.fillOpacity + I.OPACITY_DELTA : void 0
4163
+ fillOpacity: e.fillOpacity != null ? e.fillOpacity + B.OPACITY_DELTA : void 0
4164
4164
  });
4165
4165
  return new Dt(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
4166
4166
  }
@@ -4197,8 +4197,8 @@ class Nt extends qe {
4197
4197
  e.equals(this.innerOverlay.getBounds()) || this.innerOverlay.setBounds(e);
4198
4198
  }
4199
4199
  }
4200
- const ee = 1;
4201
- class Gi extends Tt {
4200
+ const te = 1;
4201
+ class Ni extends Mt {
4202
4202
  constructor(e, r) {
4203
4203
  var s;
4204
4204
  super(e);
@@ -4217,12 +4217,12 @@ class Gi extends Tt {
4217
4217
  c(this, "createZoomControl", vt.create);
4218
4218
  c(this, "createScaleControl", ft.create);
4219
4219
  this.buildInMapTypeId2BIMT = $.BUILD_IN_MAP_TYPES.getValueMap(A.prototype.getId), this.baiduMapType2BIMT = $.BUILD_IN_MAP_TYPES.getValueMap(A.prototype.asBaiduMapType), this.map = new BMap.Map(e, {
4220
- minZoom: r.minZoom && r.minZoom + ee,
4221
- maxZoom: r.maxZoom && r.maxZoom + ee,
4220
+ minZoom: r.minZoom && r.minZoom + te,
4221
+ maxZoom: r.maxZoom && r.maxZoom + te,
4222
4222
  mapType: r.buildInMapTypeId && ((s = this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId)) == null ? void 0 : s.asBaiduMapType()),
4223
4223
  enableMapClick: !1
4224
4224
  // 关闭底图点击功能
4225
- }), this.map.centerAndZoom(r.center.toBaidu(this.coordType), r.zoom + ee), this.setGestureHandling(r.gestureHandling), r.infoWindowMode === "multi" && console.warn("baidu不支持多个InfoWindow, 可能会出现未知问题"), r.mapStyle && this.map.setMapStyleV2(r.mapStyle.baidu), this.setEventTargetDelegate(new ae(this.map, this)), this.map.addEventListener("addoverlay", (n) => {
4225
+ }), this.map.centerAndZoom(r.center.toBaidu(this.coordType), r.zoom + te), this.setGestureHandling(r.gestureHandling), r.infoWindowMode === "multi" && console.warn("baidu不支持多个InfoWindow, 可能会出现未知问题"), r.mapStyle && this.map.setMapStyleV2(r.mapStyle.baidu), this.setEventTargetDelegate(new le(this.map, this)), this.map.addEventListener("addoverlay", (n) => {
4226
4226
  const a = n.target.__info_box__;
4227
4227
  a && (console.debug("add:info-box", a), this.map.addOverlay(a));
4228
4228
  }), this.map.addEventListener("removeoverlay", (n) => {
@@ -4264,7 +4264,7 @@ class Gi extends Tt {
4264
4264
  super.removeEventListener(e, r);
4265
4265
  }
4266
4266
  fromContainerPointToLatLng(e) {
4267
- return y.fromBaidu(this.innerMap.pixelToPoint(new BMap.Pixel(e.x, e.y)), this.coordType);
4267
+ return v.fromBaidu(this.innerMap.pixelToPoint(new BMap.Pixel(e.x, e.y)), this.coordType);
4268
4268
  }
4269
4269
  fromLatLngToContainerPoint(e) {
4270
4270
  return this.innerMap.pointToPixel(e.toBaidu(this.coordType));
@@ -4279,22 +4279,22 @@ class Gi extends Tt {
4279
4279
  e ? this.map.enableDoubleClickZoom() : this.map.disableDoubleClickZoom();
4280
4280
  }
4281
4281
  getCenter() {
4282
- return y.fromBaidu(this.map.getCenter(), this.coordType);
4282
+ return v.fromBaidu(this.map.getCenter(), this.coordType);
4283
4283
  }
4284
4284
  setCenter(e) {
4285
4285
  this.map.setCenter(e.toBaidu(this.coordType));
4286
4286
  }
4287
4287
  getZoom() {
4288
- return super.getZoom() - ee;
4288
+ return super.getZoom() - te;
4289
4289
  }
4290
4290
  setZoom(e) {
4291
- return super.setZoom(e + ee);
4291
+ return super.setZoom(e + te);
4292
4292
  }
4293
4293
  setMinZoom(e) {
4294
- this.map.setMinZoom(e + ee);
4294
+ this.map.setMinZoom(e + te);
4295
4295
  }
4296
4296
  setMaxZoom(e) {
4297
- this.map.setMaxZoom(e + ee);
4297
+ this.map.setMaxZoom(e + te);
4298
4298
  }
4299
4299
  setMapStyle(e) {
4300
4300
  this.map.setMapStyleV2((e == null ? void 0 : e.baidu) ?? { styleJson: [] });
@@ -4361,39 +4361,39 @@ class Gi extends Tt {
4361
4361
  }
4362
4362
  }
4363
4363
  removeCustomControl(e) {
4364
- e.inner && (oe(e.inner instanceof BMap.Control, `control.inner(${e.inner})需要是BMap.Control`), this.map.removeControl(e.inner));
4364
+ e.inner && (ae(e.inner instanceof BMap.Control, `control.inner(${e.inner})需要是BMap.Control`), this.map.removeControl(e.inner));
4365
4365
  }
4366
4366
  createMarkerClusterer(e) {
4367
- return new wi(this, e);
4367
+ return new ci(this, e);
4368
4368
  }
4369
4369
  createAutocomplete(e) {
4370
- return new bi(this, e);
4370
+ return new ni(this, e);
4371
4371
  }
4372
4372
  createSearchBox(e) {
4373
- return new ki(this, e);
4373
+ return new mi(this, e);
4374
4374
  }
4375
4375
  createPlacesService(e) {
4376
- return new xi(this, e);
4376
+ return new pi(this, e);
4377
4377
  }
4378
4378
  createMapUrls(e) {
4379
4379
  return new Re(e);
4380
4380
  }
4381
4381
  }
4382
- class Zi extends Tt {
4382
+ class Gi extends Mt {
4383
4383
  constructor(e, r) {
4384
4384
  var n, a;
4385
4385
  super(e);
4386
4386
  c(this, "buildInMapTypeId2BIMT");
4387
4387
  c(this, "googleMapTypeId2BIMT");
4388
4388
  c(this, "map");
4389
- c(this, "createLabel", Bt.create);
4389
+ c(this, "createLabel", It.create);
4390
4390
  c(this, "createCircle", Ct.create);
4391
4391
  c(this, "createPolygon", zt.create);
4392
4392
  c(this, "createPolyline", Rt.create);
4393
4393
  c(this, "createRectangle", Nt.create);
4394
4394
  c(this, "createInfoWindow", Lt.create);
4395
4395
  c(this, "createInfoBox", Pt.create);
4396
- c(this, "createMarker", It.create);
4396
+ c(this, "createMarker", Bt.create);
4397
4397
  c(this, "createMapTypeControl", Se.create);
4398
4398
  c(this, "createZoomControl", _t.create);
4399
4399
  c(this, "createScaleControl", yt.create);
@@ -4410,7 +4410,7 @@ class Zi extends Tt {
4410
4410
  styles: (n = r.mapStyle) == null ? void 0 : n.google.styles,
4411
4411
  mapId: (a = r.mapStyle) == null ? void 0 : a.google.mapId,
4412
4412
  mapTypeId: s == null ? void 0 : s.getGoogleMapTypeId()
4413
- }), this.setEventTargetDelegate(new re(this.map, this));
4413
+ }), this.setEventTargetDelegate(new ie(this.map, this));
4414
4414
  }
4415
4415
  setGestureHandling(e) {
4416
4416
  this.map.setOptions({
@@ -4426,21 +4426,21 @@ class Zi extends Tt {
4426
4426
  fromContainerPointToLatLng(e) {
4427
4427
  const r = this.innerMap.getProjection(), s = this.innerMap.getBounds();
4428
4428
  if (r == null || s == null)
4429
- return y.ZERO;
4430
- const n = r.fromLatLngToPoint(s.getSouthWest()), a = r.fromLatLngToPoint(s.getNorthEast()), h = this.innerMap.getZoom();
4431
- if (n == null || a == null || h == null)
4432
- return y.ZERO;
4433
- const o = Math.pow(2, h), l = new google.maps.Point(e.x / o + n.x, e.y / o + a.y);
4434
- return y.fromGoogle(r.fromPointToLatLng(l) ?? J.LATLNG_ZERO, this.coordType);
4429
+ return v.ZERO;
4430
+ const n = r.fromLatLngToPoint(s.getSouthWest()), a = r.fromLatLngToPoint(s.getNorthEast()), d = this.innerMap.getZoom();
4431
+ if (n == null || a == null || d == null)
4432
+ return v.ZERO;
4433
+ const o = Math.pow(2, d), l = new google.maps.Point(e.x / o + n.x, e.y / o + a.y);
4434
+ return v.fromGoogle(r.fromPointToLatLng(l) ?? J.LATLNG_ZERO, this.coordType);
4435
4435
  }
4436
4436
  fromLatLngToContainerPoint(e) {
4437
4437
  const r = this.innerMap.getProjection(), s = this.innerMap.getBounds();
4438
4438
  if (r == null || s == null)
4439
4439
  return X.ZERO;
4440
- const n = r.fromLatLngToPoint(s.getSouthWest()), a = r.fromLatLngToPoint(s.getNorthEast()), h = this.innerMap.getZoom();
4441
- if (n == null || a == null || h == null)
4440
+ const n = r.fromLatLngToPoint(s.getSouthWest()), a = r.fromLatLngToPoint(s.getNorthEast()), d = this.innerMap.getZoom();
4441
+ if (n == null || a == null || d == null)
4442
4442
  return X.ZERO;
4443
- const o = Math.pow(2, h), l = r.fromLatLngToPoint(e.toGoogle(this.coordType));
4443
+ const o = Math.pow(2, d), l = r.fromLatLngToPoint(e.toGoogle(this.coordType));
4444
4444
  return l == null ? X.ZERO : { x: (l.x - n.x) * o, y: (l.y - a.y) * o };
4445
4445
  }
4446
4446
  setDefaultCursor(e) {
@@ -4453,7 +4453,7 @@ class Zi extends Tt {
4453
4453
  this.map.setOptions({ disableDoubleClickZoom: !e });
4454
4454
  }
4455
4455
  getCenter() {
4456
- return y.fromGoogle(this.map.getCenter() ?? J.LATLNG_ZERO, this.coordType);
4456
+ return v.fromGoogle(this.map.getCenter() ?? J.LATLNG_ZERO, this.coordType);
4457
4457
  }
4458
4458
  setCenter(e) {
4459
4459
  this.map.setCenter(e.toGoogle(this.coordType));
@@ -4529,30 +4529,56 @@ class Zi extends Tt {
4529
4529
  }
4530
4530
  }
4531
4531
  createMarkerClusterer(e) {
4532
- return new Ei(this, e);
4532
+ return new di(this, e);
4533
4533
  }
4534
4534
  createAutocomplete(e) {
4535
- return new _i(this, e);
4535
+ return new si(this, e);
4536
4536
  }
4537
4537
  createSearchBox(e) {
4538
- return new Pi(this, e);
4538
+ return new gi(this, e);
4539
4539
  }
4540
4540
  createPlacesService(e) {
4541
- return new Li(this, e);
4541
+ return new ui(this, e);
4542
4542
  }
4543
4543
  createMapUrls(e) {
4544
4544
  return new Ae(e);
4545
4545
  }
4546
4546
  }
4547
- class Wi extends Tt {
4547
+ const Ze = ["3.0"], Zi = {
4548
+ baidu: {
4549
+ version: "3.0",
4550
+ // 在build时会被静态替换, 导致使用者不能无法设置它
4551
+ // @see https://cn.vitejs.dev/guide/build.html#library-mode:~:text=%E6%A8%A1%E5%BC%8F%E4%B8%8B%EF%BC%8C%E6%89%80%E6%9C%89-,({}).*,-%E7%94%A8%E6%B3%95%E5%9C%A8%E6%9E%84
4552
+ // @see @vite_process_env_detail
4553
+ key: "kXOq8Hg9BZbZEWAjXKuzd1oGreynup8h"
4554
+ },
4555
+ google: {
4556
+ version: "quarterly",
4557
+ key: "AIzaSyBcyzMel3dYFNcfcr0LOklbBQNpWycyZXo",
4558
+ language: "en-us",
4559
+ libraries: ["places"]
4560
+ },
4561
+ here: {
4562
+ version: Ze[0],
4563
+ key: ""
4564
+ }
4565
+ };
4566
+ let Er;
4567
+ function Lr() {
4568
+ return Er || C("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
4569
+ }
4570
+ function Wi(i) {
4571
+ i != null && (Er = Tr(Zi, i));
4572
+ }
4573
+ class Hi extends Mt {
4548
4574
  constructor(e, r) {
4549
4575
  var a;
4550
4576
  super(e);
4551
4577
  c(this, "map");
4552
4578
  c(this, "defaultLayers");
4553
4579
  this.mapOptions = r;
4554
- const s = nr().here;
4555
- ze.includes(s.version) || C(`不支持${s.version}, HereMap当前只支持如下版本: ${ze}`);
4580
+ const s = Lr().here;
4581
+ Ze.includes(s.version) || C(`不支持${s.version}, HereMap当前只支持如下版本: ${Ze}`);
4556
4582
  const n = new H.service.Platform({
4557
4583
  app_id: s.key.split(",")[0],
4558
4584
  app_code: s.key.split(",")[1]
@@ -4569,7 +4595,7 @@ class Wi extends Tt {
4569
4595
  return x.wgs84;
4570
4596
  }
4571
4597
  getCenter() {
4572
- return y.fromHere(this.map.getCenter(), this.coordType);
4598
+ return v.fromHere(this.map.getCenter(), this.coordType);
4573
4599
  }
4574
4600
  setCenter(e) {
4575
4601
  this.map.setCenter(e.toHere(this.coordType));
@@ -4702,22 +4728,26 @@ var G = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here
4702
4728
  const n = lt.create(s);
4703
4729
  switch (e) {
4704
4730
  case "google":
4705
- return new Zi(r, n);
4706
- case "baidu":
4707
4731
  return new Gi(r, n);
4732
+ case "baidu":
4733
+ return new Ni(r, n);
4708
4734
  case "here":
4709
- return new Wi(r, n);
4735
+ return new Hi(r, n);
4710
4736
  }
4711
4737
  }
4712
4738
  i.createMap = t;
4713
4739
  })(ht || (ht = {}));
4714
- function ji({ type: i, config: t }) {
4715
- const e = window, r = Hi(i);
4716
- if (e[r])
4740
+ const ji = {};
4741
+ function Vi(i) {
4742
+ return Q.putIfAbsent(ji, i, () => qr(() => Fi({ type: i, config: Lr()[i] })))();
4743
+ }
4744
+ function Fi({ type: i, config: t }) {
4745
+ const e = window, r = Ui(i);
4746
+ if (Q.get(e, r))
4717
4747
  return Promise.resolve();
4718
4748
  switch (i !== G.here && !t.key && C(`请先配置${i}地图的key`), i) {
4719
4749
  case G.google:
4720
- return {}.VITE_FALSE ? (fi({
4750
+ return {}.VITE_FALSE ? (ti({
4721
4751
  key: t.key,
4722
4752
  v: "3.52"
4723
4753
  // v: config.version,
@@ -4725,40 +4755,40 @@ function ji({ type: i, config: t }) {
4725
4755
  case G.baidu:
4726
4756
  return qt(`https://api.map.baidu.com/api?v=${t.version}&ak=${t.key}`);
4727
4757
  case G.here:
4728
- return fe(me("core", t.version)).then(() => Promise.all([
4758
+ return ye(fe("core", t.version)).then(() => Promise.all([
4729
4759
  // 其他大多数模块都可以同时载入
4730
- fe(me("service", t.version)),
4731
- fe(me("mapevents", t.version)),
4732
- fe(me("clustering", t.version)),
4733
- fe(me("ui", t.version))
4734
- ])).catch((s) => (delete e[r], Promise.reject(s)));
4760
+ ye(fe("service", t.version)),
4761
+ ye(fe("mapevents", t.version)),
4762
+ ye(fe("clustering", t.version)),
4763
+ ye(fe("ui", t.version))
4764
+ ])).catch((s) => (Q.del(e, r), Promise.reject(s)));
4735
4765
  default:
4736
4766
  st(i);
4737
4767
  }
4738
4768
  }
4739
- function me(i, t = ze[0]) {
4769
+ function fe(i, t = Ze[0]) {
4740
4770
  return `https://js.api.here.com/v3/${t}/mapsjs-${i}.js`;
4741
4771
  }
4742
- function Hi(i) {
4772
+ function Ui(i) {
4743
4773
  switch (i) {
4744
4774
  case G.google:
4745
- return "google";
4775
+ return "google.maps";
4746
4776
  case G.baidu:
4747
4777
  return "BMap";
4748
4778
  case G.here:
4749
4779
  return "H";
4750
4780
  }
4751
4781
  }
4752
- let Vi = 0;
4782
+ let Yi = 0;
4753
4783
  function qt(i, t = "callback") {
4754
4784
  return new Promise((e, r) => {
4755
- const s = `__callback${Vi++}`;
4785
+ const s = `__callback${Yi++}`;
4756
4786
  window[s] = e;
4757
4787
  const n = document.createElement("script");
4758
4788
  n.src = `${i}&${t}=${s}`, n.onerror = r, document.body.appendChild(n);
4759
4789
  });
4760
4790
  }
4761
- function fe(i) {
4791
+ function ye(i) {
4762
4792
  return new Promise((t, e) => {
4763
4793
  const r = document.createElement("script");
4764
4794
  r.src = i, r.onload = t, r.onerror = e, document.body.appendChild(r);
@@ -4771,7 +4801,7 @@ function Z(i, t) {
4771
4801
  validator: (e) => Object.values(i).includes(e)
4772
4802
  };
4773
4803
  }
4774
- function Fi(i, t) {
4804
+ function qi(i, t) {
4775
4805
  return {
4776
4806
  type: String,
4777
4807
  default: t,
@@ -4790,7 +4820,7 @@ function m(i, t) {
4790
4820
  default: t
4791
4821
  };
4792
4822
  }
4793
- function qs(i) {
4823
+ function Js(i) {
4794
4824
  const t = {};
4795
4825
  return Object.entries(i).forEach(([e, r]) => {
4796
4826
  const s = `__${e}`;
@@ -4807,37 +4837,37 @@ function qs(i) {
4807
4837
  };
4808
4838
  }), t;
4809
4839
  }
4810
- const ye = {
4840
+ const ve = {
4811
4841
  enumerable: !0,
4812
4842
  configurable: !0,
4813
- get: Me,
4814
- set: Me
4843
+ get: Oe,
4844
+ set: Oe
4815
4845
  };
4816
- function Ui(i) {
4846
+ function Ki(i) {
4817
4847
  return Object.keys(i).forEach((t) => {
4818
4848
  const e = i[t];
4819
4849
  let r = !1;
4820
- typeof e == "function" ? (ye.get = e, ye.set = Me, r = !0) : typeof e == "object" && typeof e.get == "function" && (ye.get = e.get, ye.set = e.set, r = !0), r && (i[t] = Object.defineProperty(i, t, ye));
4850
+ typeof e == "function" ? (ve.get = e, ve.set = Oe, r = !0) : typeof e == "object" && typeof e.get == "function" && (ve.get = e.get, ve.set = e.set, r = !0), r && (i[t] = Object.defineProperty(i, t, ve));
4821
4851
  }), i;
4822
4852
  }
4823
- function Ks(i) {
4824
- return Ui(i);
4853
+ function Qs(i) {
4854
+ return Ki(i);
4825
4855
  }
4826
4856
  function xr() {
4827
4857
  return it();
4828
4858
  }
4829
- function Ie(i, t) {
4859
+ function Be(i, t) {
4830
4860
  const e = i.$options[t];
4831
4861
  if (e)
4832
4862
  for (const r of e)
4833
4863
  r.call(i);
4834
4864
  }
4835
- function Xs(i, t) {
4865
+ function en(i, t) {
4836
4866
  for (const e of i)
4837
4867
  if (e.$options.name === t.name)
4838
4868
  return e;
4839
4869
  }
4840
- function Js(i, t) {
4870
+ function tn(i, t) {
4841
4871
  if (!i.default)
4842
4872
  return;
4843
4873
  const e = i.default();
@@ -4845,12 +4875,12 @@ function Js(i, t) {
4845
4875
  if ((r == null ? void 0 : r.type).name === t.name)
4846
4876
  return r;
4847
4877
  }
4848
- function Yi(i, t) {
4878
+ function Xi(i, t) {
4849
4879
  const e = {}, r = {}, s = {};
4850
4880
  return Object.keys(i).forEach((n) => {
4851
- n.startsWith("on") ? e[de.pascal2kebab(n.substring(2))] = i[n] : r[n] = i[n];
4881
+ n.startsWith("on") ? e[ue.pascal2kebab(n.substring(2))] = i[n] : r[n] = i[n];
4852
4882
  }), t && Object.keys(t).forEach((n) => {
4853
- n.startsWith("on") && (s[de.pascal2kebab(n.substring(2))] = t[n]);
4883
+ n.startsWith("on") && (s[ue.pascal2kebab(n.substring(2))] = t[n]);
4854
4884
  }), {
4855
4885
  /** class/style/未声明的属性 等 */
4856
4886
  binds: r,
@@ -4861,12 +4891,12 @@ function Yi(i, t) {
4861
4891
  };
4862
4892
  }
4863
4893
  function q(i, t) {
4864
- return Xt(() => Yi(i, t));
4894
+ return Xt(() => Xi(i, t));
4865
4895
  }
4866
4896
  function L() {
4867
4897
  return Function;
4868
4898
  }
4869
- const Qs = () => {
4899
+ const rn = () => {
4870
4900
  let i, t;
4871
4901
  function e(s) {
4872
4902
  console.log(s), i = s && s.type, t = Date.now();
@@ -4878,20 +4908,20 @@ const Qs = () => {
4878
4908
  }, Gt = "$map", xe = "onCreate", Pe = "onDestroy", k = w({
4879
4909
  inject: [Gt],
4880
4910
  mounted() {
4881
- Ie(this, xe);
4911
+ Be(this, xe);
4882
4912
  },
4883
4913
  beforeUnmount() {
4884
- Ie(this, Pe);
4914
+ Be(this, Pe);
4885
4915
  },
4886
4916
  methods: {
4887
4917
  recreate() {
4888
- Ie(this, Pe), Ie(this, xe);
4918
+ Be(this, Pe), Be(this, xe);
4889
4919
  }
4890
4920
  },
4891
4921
  render() {
4892
4922
  return xr();
4893
4923
  }
4894
- }), qi = w({
4924
+ }), Ji = w({
4895
4925
  name: "tg-map",
4896
4926
  provide() {
4897
4927
  return {
@@ -4910,7 +4940,7 @@ const Qs = () => {
4910
4940
  * - :last-center.sync="center": 获取tg-map销毁时的最后的center的值, 使用这种方式可以做到type切换时保留中心点位置
4911
4941
  * @see AbstractMapEventMap.center-changed
4912
4942
  * */
4913
- center: D(y),
4943
+ center: D(v),
4914
4944
  /**
4915
4945
  * 同步center的延时
4916
4946
  * @default 300
@@ -4921,23 +4951,23 @@ const Qs = () => {
4921
4951
  * 仅用来获取center的值, 需要设置center的值请使用`center`属性
4922
4952
  * @see center
4923
4953
  * */
4924
- currentCenter: m(y),
4954
+ currentCenter: m(v),
4925
4955
  /**
4926
4956
  * 仅用于获取tg-map销毁时的最后的center的值
4927
4957
  * @see center
4928
4958
  */
4929
- lastCenter: m(y),
4959
+ lastCenter: m(v),
4930
4960
  zoom: D(Number),
4931
4961
  /**
4932
4962
  * 该属性不会响应式更新, 要让它立即生效, 请参考{@link file://./../views/map/InfoDemo.vue#L3}
4933
4963
  * @see MapOptions.infoWindowMode
4934
4964
  */
4935
- infoWindowMode: Fi(Si),
4965
+ infoWindowMode: qi(Bi),
4936
4966
  gestureHandling: Z(j),
4937
4967
  minZoom: m(Number),
4938
4968
  maxZoom: m(Number),
4939
4969
  mapStyle: m(Object),
4940
- mapTypeId: Z(cr),
4970
+ mapTypeId: Z(or),
4941
4971
  /** 地图类型对象, 优先级比mapTypeId高 */
4942
4972
  mapType: m(Object),
4943
4973
  hideLogo: m(Boolean),
@@ -4966,7 +4996,7 @@ const Qs = () => {
4966
4996
  },
4967
4997
  computed: {
4968
4998
  propsJson() {
4969
- return Ce.toJsonSafely(this.$props);
4999
+ return Q.toJsonSafely(this.$props);
4970
5000
  }
4971
5001
  },
4972
5002
  watch: {
@@ -4998,7 +5028,7 @@ const Qs = () => {
4998
5028
  async mounted() {
4999
5029
  const i = this.type;
5000
5030
  try {
5001
- await ji({ type: i, config: nr()[i] });
5031
+ await Vi(i);
5002
5032
  } catch (s) {
5003
5033
  this.$emit("error", s);
5004
5034
  return;
@@ -5031,8 +5061,8 @@ const Qs = () => {
5031
5061
  () => this.zoom,
5032
5062
  () => this.center
5033
5063
  //
5034
- ], ([s, n], [a, h]) => {
5035
- s !== a && t.setZoom(s), n !== h && (t.getCenter().equals(n) || t.setCenter(n));
5064
+ ], ([s, n], [a, d]) => {
5065
+ s !== a && t.setZoom(s), n !== d && (t.getCenter().equals(n) || t.setCenter(n));
5036
5066
  }), "update:center" in this.attrs.listenerProps) {
5037
5067
  const s = () => this.$emit("update:center", t.getCenter());
5038
5068
  t.addEventListener("center-changed", () => {
@@ -5061,8 +5091,8 @@ const K = (i, t) => {
5061
5091
  e[r] = s;
5062
5092
  return e;
5063
5093
  };
5064
- function Ki(i, t, e, r, s, n) {
5065
- return F(), U("div", ge({ class: "tg-map" }, i.attrs.binds), [
5094
+ function Qi(i, t, e, r, s, n) {
5095
+ return F(), U("div", me({ class: "tg-map" }, i.attrs.binds), [
5066
5096
  zr("div", {
5067
5097
  ref: "map",
5068
5098
  class: Ve({
@@ -5075,8 +5105,8 @@ function Ki(i, t, e, r, s, n) {
5075
5105
  W(i.$slots, "overlay")
5076
5106
  ], 16);
5077
5107
  }
5078
- const ke = /* @__PURE__ */ K(qi, [["render", Ki]]);
5079
- function Xi(i) {
5108
+ const ke = /* @__PURE__ */ K(Ji, [["render", Qi]]);
5109
+ function es(i) {
5080
5110
  if (i == null)
5081
5111
  return;
5082
5112
  let t;
@@ -5087,7 +5117,7 @@ function Xi(i) {
5087
5117
  t = i;
5088
5118
  return `${t}px`;
5089
5119
  }
5090
- const Ji = w({
5120
+ const ts = w({
5091
5121
  name: "tg-map-widget",
5092
5122
  props: {
5093
5123
  left: {
@@ -5113,10 +5143,10 @@ const Ji = w({
5113
5143
  }
5114
5144
  },
5115
5145
  methods: {
5116
- dimen: Xi
5146
+ dimen: es
5117
5147
  }
5118
5148
  });
5119
- function Qi(i, t, e, r, s, n) {
5149
+ function rs(i, t, e, r, s, n) {
5120
5150
  return F(), U("div", {
5121
5151
  class: Ve(i.$options.name),
5122
5152
  style: Dr({ left: i.dimen(i.left), top: i.dimen(i.topValue), right: i.dimen(i.right), bottom: i.dimen(i.bottom) })
@@ -5124,7 +5154,7 @@ function Qi(i, t, e, r, s, n) {
5124
5154
  W(i.$slots, "default")
5125
5155
  ], 6);
5126
5156
  }
5127
- const es = /* @__PURE__ */ K(Ji, [["render", Qi]]), ts = w({
5157
+ const is = /* @__PURE__ */ K(ts, [["render", rs]]), ss = w({
5128
5158
  name: "tg-custom-control",
5129
5159
  mixins: [k],
5130
5160
  props: {
@@ -5142,7 +5172,7 @@ const es = /* @__PURE__ */ K(Ji, [["render", Qi]]), ts = w({
5142
5172
  },
5143
5173
  onCreate() {
5144
5174
  tr(this.$parent, ke) || console.warn("请将tg-custom-control放到tg-map中");
5145
- const { $el: i } = this, t = class extends gi {
5175
+ const { $el: i } = this, t = class extends Qr {
5146
5176
  onCreateElement() {
5147
5177
  return i;
5148
5178
  }
@@ -5153,19 +5183,19 @@ const es = /* @__PURE__ */ K(Ji, [["render", Qi]]), ts = w({
5153
5183
  this.$map.removeCustomControl(this.control);
5154
5184
  }
5155
5185
  });
5156
- function rs(i, t, e, r, s, n) {
5186
+ function ns(i, t, e, r, s, n) {
5157
5187
  return F(), U("div", {
5158
5188
  class: Ve(i.$options.name)
5159
5189
  }, [
5160
5190
  W(i.$slots, "default")
5161
5191
  ], 2);
5162
5192
  }
5163
- const is = /* @__PURE__ */ K(ts, [["render", rs]]), ss = w({
5193
+ const os = /* @__PURE__ */ K(ss, [["render", ns]]), as = w({
5164
5194
  name: "tg-map-type-control",
5165
5195
  mixins: [k],
5166
5196
  props: {
5167
5197
  position: Z(S, S.TOP_LEFT),
5168
- type: Z(dr),
5198
+ type: Z(ar),
5169
5199
  mapTypes: m(Array)
5170
5200
  },
5171
5201
  setup() {
@@ -5193,7 +5223,7 @@ const is = /* @__PURE__ */ K(ts, [["render", rs]]), ss = w({
5193
5223
  onDestroy() {
5194
5224
  this.$map.removeControl(this.control);
5195
5225
  }
5196
- }), ns = w({
5226
+ }), ls = w({
5197
5227
  name: "tg-scale-control",
5198
5228
  mixins: [k],
5199
5229
  props: {
@@ -5222,11 +5252,11 @@ function Pr() {
5222
5252
  let t = (i == null ? void 0 : i.name) ?? (i == null ? void 0 : i.__name);
5223
5253
  if (!t) {
5224
5254
  const r = i == null ? void 0 : i.__file;
5225
- r && (t = $i.basename(r, ".vue"));
5255
+ r && (t = Ri.basename(r, ".vue"));
5226
5256
  }
5227
5257
  return t;
5228
5258
  }
5229
- function os() {
5259
+ function hs() {
5230
5260
  const i = Gr(Gt);
5231
5261
  let t, e;
5232
5262
  return i == null && C(`<${Pr() || "unknown"}>必须作为<tg-map>的子代组件`), {
@@ -5249,14 +5279,14 @@ function os() {
5249
5279
  }
5250
5280
  };
5251
5281
  }
5252
- const as = w({
5282
+ const cs = w({
5253
5283
  name: "tg-zoom-control",
5254
5284
  props: {
5255
5285
  position: Z(S, S.RIGHT_BOTTOM)
5256
5286
  },
5257
5287
  setup(i) {
5258
5288
  let t = void 0;
5259
- const { map: e, onCreate: r, onDestroy: s } = os();
5289
+ const { map: e, onCreate: r, onDestroy: s } = hs();
5260
5290
  return r(() => {
5261
5291
  t = e.createZoomControl(i), e.addControl(t);
5262
5292
  }), s(() => {
@@ -5265,7 +5295,7 @@ const as = w({
5265
5295
  t.setPosition(n);
5266
5296
  }), xr;
5267
5297
  }
5268
- }), ls = w({
5298
+ }), ds = w({
5269
5299
  name: "tg-marker-clusterer",
5270
5300
  mixins: [k],
5271
5301
  // markers从this.$children中读取, 故需要省略(Omit)
@@ -5329,14 +5359,14 @@ const as = w({
5329
5359
  }
5330
5360
  }
5331
5361
  });
5332
- function hs(i, t, e, r, s, n) {
5362
+ function us(i, t, e, r, s, n) {
5333
5363
  return F(), U("div", {
5334
5364
  class: Ve(i.$options.name)
5335
5365
  }, [
5336
5366
  W(i.$slots, "default")
5337
5367
  ], 2);
5338
5368
  }
5339
- const kr = /* @__PURE__ */ K(ls, [["render", hs]]), cs = w({
5369
+ const kr = /* @__PURE__ */ K(ds, [["render", us]]), ps = w({
5340
5370
  name: "tg-traffic-layer",
5341
5371
  mixins: [k],
5342
5372
  // 请直接使用v-if来控制它的显隐
@@ -5349,17 +5379,17 @@ const kr = /* @__PURE__ */ K(ls, [["render", hs]]), cs = w({
5349
5379
  },
5350
5380
  watch: {},
5351
5381
  onCreate() {
5352
- this.layer = new mi(), this.$map.addLayer(this.layer);
5382
+ this.layer = new ei(), this.$map.addLayer(this.layer);
5353
5383
  },
5354
5384
  onDestroy() {
5355
5385
  this.$map.removeLayer(this.layer);
5356
5386
  }
5357
- }), ds = w({
5387
+ }), gs = w({
5358
5388
  name: "tg-circle",
5359
5389
  mixins: [k],
5360
5390
  inheritAttrs: !1,
5361
5391
  props: {
5362
- center: D(y),
5392
+ center: D(v),
5363
5393
  radius: D(Number),
5364
5394
  clickable: m(Boolean),
5365
5395
  editable: m(Boolean),
@@ -5434,7 +5464,7 @@ const kr = /* @__PURE__ */ K(ls, [["render", hs]]), cs = w({
5434
5464
  this.$map.removeOverlay(this.overlay);
5435
5465
  }
5436
5466
  });
5437
- class us extends zi {
5467
+ class ms extends $i {
5438
5468
  constructor(t, e, r, s) {
5439
5469
  super(t, e), this.content = r, this.position = s;
5440
5470
  }
@@ -5449,12 +5479,12 @@ class us extends zi {
5449
5479
  this.position = t, this.draw();
5450
5480
  }
5451
5481
  }
5452
- const ps = w({
5482
+ const fs = w({
5453
5483
  name: "tg-element-overlay",
5454
5484
  mixins: [k],
5455
5485
  props: {
5456
5486
  mapPane: Z(we, we.overlayMouseTarget),
5457
- position: D(y)
5487
+ position: D(v)
5458
5488
  },
5459
5489
  setup() {
5460
5490
  return {
@@ -5475,25 +5505,25 @@ const ps = w({
5475
5505
  }
5476
5506
  },
5477
5507
  onCreate() {
5478
- this.overlay = new us(this.$map, this, this.content(), this.position), this.$map.addElementOverlay(this.overlay);
5508
+ this.overlay = new ms(this.$map, this, this.content(), this.position), this.$map.addElementOverlay(this.overlay);
5479
5509
  },
5480
5510
  onDestroy() {
5481
5511
  this.$map.removeElementOverlay(this.overlay);
5482
5512
  }
5483
5513
  });
5484
- function gs(i, t, e, r, s, n) {
5485
- return F(), U("div", ge({
5514
+ function ys(i, t, e, r, s, n) {
5515
+ return F(), U("div", me({
5486
5516
  class: i.$options.name
5487
5517
  }, i.$attrs), [
5488
5518
  W(i.$slots, "default")
5489
5519
  ], 16);
5490
5520
  }
5491
- const ms = /* @__PURE__ */ K(ps, [["render", gs]]), fs = w({
5521
+ const vs = /* @__PURE__ */ K(fs, [["render", ys]]), _s = w({
5492
5522
  name: "tg-marker",
5493
5523
  mixins: [k],
5494
5524
  inheritAttrs: !1,
5495
5525
  props: {
5496
- position: D(y),
5526
+ position: D(v),
5497
5527
  title: m(String),
5498
5528
  icon: m(Object),
5499
5529
  clickable: m(Boolean),
@@ -5581,20 +5611,20 @@ const ms = /* @__PURE__ */ K(ps, [["render", gs]]), fs = w({
5581
5611
  }
5582
5612
  }
5583
5613
  });
5584
- function ys(i, t, e, r, s, n) {
5585
- return F(), U("div", ge({
5614
+ function bs(i, t, e, r, s, n) {
5615
+ return F(), U("div", me({
5586
5616
  class: i.$options.name
5587
5617
  }, i.attrs.binds), [
5588
5618
  W(i.$slots, "default")
5589
5619
  ], 16);
5590
5620
  }
5591
- const Ke = /* @__PURE__ */ K(fs, [["render", ys]]), vs = w({
5621
+ const Ke = /* @__PURE__ */ K(_s, [["render", bs]]), Ms = w({
5592
5622
  name: "tg-info-box",
5593
5623
  mixins: [k],
5594
5624
  inheritAttrs: !1,
5595
5625
  props: {
5596
5626
  show: D(Boolean),
5597
- position: m(y),
5627
+ position: m(v),
5598
5628
  offset: m(Object),
5599
5629
  maxWidth: m(Number),
5600
5630
  borderClass: m(String),
@@ -5661,20 +5691,20 @@ const Ke = /* @__PURE__ */ K(fs, [["render", ys]]), vs = w({
5661
5691
  }
5662
5692
  }
5663
5693
  });
5664
- function _s(i, t, e, r, s, n) {
5665
- return F(), U("div", ge({
5694
+ function Ts(i, t, e, r, s, n) {
5695
+ return F(), U("div", me({
5666
5696
  class: i.$options.name
5667
5697
  }, i.attrs.binds), [
5668
5698
  W(i.$slots, "default")
5669
5699
  ], 16);
5670
5700
  }
5671
- const bs = /* @__PURE__ */ K(vs, [["render", _s]]), Ts = w({
5701
+ const Os = /* @__PURE__ */ K(Ms, [["render", Ts]]), Cs = w({
5672
5702
  name: "tg-info-window",
5673
5703
  mixins: [k],
5674
5704
  inheritAttrs: !1,
5675
5705
  props: {
5676
5706
  show: D(Boolean),
5677
- position: m(y),
5707
+ position: m(v),
5678
5708
  maxWidth: m(Number),
5679
5709
  offset: m(Object),
5680
5710
  disableAutoPan: m(Boolean),
@@ -5732,21 +5762,21 @@ const bs = /* @__PURE__ */ K(vs, [["render", _s]]), Ts = w({
5732
5762
  this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
5733
5763
  }
5734
5764
  });
5735
- function Ms(i, t, e, r, s, n) {
5736
- return jr((F(), U("div", ge({
5765
+ function ws(i, t, e, r, s, n) {
5766
+ return Hr((F(), U("div", me({
5737
5767
  class: i.$options.name
5738
5768
  }, i.attrs.binds), [
5739
5769
  W(i.$slots, "default")
5740
5770
  ], 16)), [
5741
- [Hr, i.show]
5771
+ [jr, i.show]
5742
5772
  ]);
5743
5773
  }
5744
- const Os = /* @__PURE__ */ K(Ts, [["render", Ms]]), Cs = w({
5774
+ const Es = /* @__PURE__ */ K(Cs, [["render", ws]]), Ls = w({
5745
5775
  name: "tg-label",
5746
5776
  mixins: [k],
5747
5777
  inheritAttrs: !1,
5748
5778
  props: {
5749
- position: m(y),
5779
+ position: m(v),
5750
5780
  offset: m(Object),
5751
5781
  zIndex: m(Number),
5752
5782
  mapPane: Z(we)
@@ -5803,14 +5833,14 @@ const Os = /* @__PURE__ */ K(Ts, [["render", Ms]]), Cs = w({
5803
5833
  this.$marker() ? this.$marker().onRemoveLabel(this) : this.$map.removeOverlay(this.overlay);
5804
5834
  }
5805
5835
  });
5806
- function ws(i, t, e, r, s, n) {
5807
- return F(), U("div", ge({
5836
+ function xs(i, t, e, r, s, n) {
5837
+ return F(), U("div", me({
5808
5838
  class: i.$options.name
5809
5839
  }, i.attrs.binds), [
5810
5840
  W(i.$slots, "default")
5811
5841
  ], 16);
5812
5842
  }
5813
- const Es = /* @__PURE__ */ K(Cs, [["render", ws]]), Ls = w({
5843
+ const Ps = /* @__PURE__ */ K(Ls, [["render", xs]]), ks = w({
5814
5844
  name: "tg-polygon",
5815
5845
  mixins: [k],
5816
5846
  inheritAttrs: !1,
@@ -5879,7 +5909,7 @@ const Es = /* @__PURE__ */ K(Cs, [["render", ws]]), Ls = w({
5879
5909
  onDestroy() {
5880
5910
  this.$map.removeOverlay(this.overlay);
5881
5911
  }
5882
- }), xs = w({
5912
+ }), Is = w({
5883
5913
  name: "tg-polyline",
5884
5914
  mixins: [k],
5885
5915
  inheritAttrs: !1,
@@ -5947,7 +5977,7 @@ const Es = /* @__PURE__ */ K(Cs, [["render", ws]]), Ls = w({
5947
5977
  onDestroy() {
5948
5978
  this.overlay.remove();
5949
5979
  }
5950
- }), Ps = w({
5980
+ }), Bs = w({
5951
5981
  name: "tg-rectangle",
5952
5982
  mixins: [k],
5953
5983
  inheritAttrs: !1,
@@ -6013,14 +6043,14 @@ const Es = /* @__PURE__ */ K(Cs, [["render", ws]]), Ls = w({
6013
6043
  onDestroy() {
6014
6044
  this.$map.removeOverlay(this.overlay);
6015
6045
  }
6016
- }), ks = ["beforeUpdate", "updated"], en = {
6046
+ }), Ss = ["beforeUpdate", "updated"], sn = {
6017
6047
  install(i, t = {}) {
6018
6048
  if (t.enable !== !1) {
6019
6049
  const e = w({
6020
6050
  beforeCreate() {
6021
6051
  const r = Pr() ?? "", n = (t.nameRegex || /^[A-Z]/).test(r) ? (a) => {
6022
- t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : ks.includes(a) || console.debug("[lifecycle]", r, a);
6023
- } : Me;
6052
+ t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : Ss.includes(a) || console.debug("[lifecycle]", r, a);
6053
+ } : Oe;
6024
6054
  n("beforeCreate"), this.__life_impl = n;
6025
6055
  },
6026
6056
  created() {
@@ -6059,44 +6089,44 @@ const Es = /* @__PURE__ */ K(Cs, [["render", ws]]), Ls = w({
6059
6089
  i.mixin(e);
6060
6090
  }
6061
6091
  }
6062
- }, Bs = 6378137;
6063
- function be(i) {
6092
+ }, As = 6378137;
6093
+ function Me(i) {
6064
6094
  return i * Math.PI / 180;
6065
6095
  }
6066
6096
  function Kt(i) {
6067
6097
  return i * 180 / Math.PI;
6068
6098
  }
6069
- function Is(i, t) {
6099
+ function Rs(i, t) {
6070
6100
  if (i.lat === t.lat && i.lng === t.lng)
6071
6101
  return 0;
6072
- const e = be((i.lat + t.lat) / 2), r = be((i.lat - t.lat) / 2), s = be((i.lng - t.lng) / 2);
6073
- let n = Math.sin(r), a = Math.sin(s), h = Math.sin(e);
6074
- const o = Bs, l = 1 / 298.257;
6075
- n = n * n, a = a * a, h = h * h;
6076
- const d = n * (1 - a) + (1 - h) * a, u = (1 - n) * (1 - a) + h * a, p = Math.atan(Math.sqrt(d / u)), b = Math.sqrt(d * u) / p, _ = 2 * p * o, T = (3 * b - 1) / 2 / u, g = (3 * b + 1) / 2 / d;
6077
- return _ * (1 + l * (T * h * (1 - n) - g * (1 - h) * n));
6078
- }
6079
- function Ss(i, t, e) {
6080
- const s = 63567523142e-4, n = 1 / 298.257223563, a = be(t), h = Math.sin(a), o = Math.cos(a), l = (1 - n) * Math.tan(be(i.lat)), d = 1 / Math.sqrt(1 + l * l), u = l * d, p = Math.atan2(l, o), b = d * h, _ = 1 - b * b, T = _ * (6378137 * 6378137 - s * s) / (s * s), g = 1 + T / 16384 * (4096 + T * (-768 + T * (320 - 175 * T))), f = T / 1024 * (256 + T * (-128 + T * (74 - 47 * T)));
6081
- let v = 0, O = 0, P = 0, E = e / (s * g), Q = 2 * Math.PI;
6082
- for (; Math.abs(E - Q) > 1e-12; ) {
6083
- v = Math.cos(2 * p + E), O = Math.sin(E), P = Math.cos(E);
6084
- const Sr = f * O * (v + f / 4 * (P * (-1 + 2 * v * v) - f / 6 * v * (-3 + 4 * O * O) * (-3 + 4 * v * v)));
6085
- Q = E, E = e / (s * g) + Sr;
6086
- }
6087
- const ie = u * O - d * P * o, Xe = Math.atan2(
6088
- u * P + d * O * o,
6089
- (1 - n) * Math.sqrt(b * b + ie * ie)
6090
- ), Br = Math.atan2(O * h, d * P - u * O * o), Je = n / 16 * _ * (4 + n * (4 - 3 * _)), Ir = Br - (1 - Je) * n * b * (E + Je * O * (v + Je * P * (-1 + 2 * v * v)));
6091
- return { lng: i.lng + Kt(Ir), lat: Kt(Xe) };
6092
- }
6093
- const tn = {
6094
- getDistance: Is,
6095
- getDestination: Ss
6096
- }, rn = {
6102
+ const e = Me((i.lat + t.lat) / 2), r = Me((i.lat - t.lat) / 2), s = Me((i.lng - t.lng) / 2);
6103
+ let n = Math.sin(r), a = Math.sin(s), d = Math.sin(e);
6104
+ const o = As, l = 1 / 298.257;
6105
+ n = n * n, a = a * a, d = d * d;
6106
+ const h = n * (1 - a) + (1 - d) * a, u = (1 - n) * (1 - a) + d * a, p = Math.atan(Math.sqrt(h / u)), f = Math.sqrt(h * u) / p, _ = 2 * p * o, M = (3 * f - 1) / 2 / u, g = (3 * f + 1) / 2 / h;
6107
+ return _ * (1 + l * (M * d * (1 - n) - g * (1 - d) * n));
6108
+ }
6109
+ function $s(i, t, e) {
6110
+ const s = 63567523142e-4, n = 1 / 298.257223563, a = Me(t), d = Math.sin(a), o = Math.cos(a), l = (1 - n) * Math.tan(Me(i.lat)), h = 1 / Math.sqrt(1 + l * l), u = l * h, p = Math.atan2(l, o), f = h * d, _ = 1 - f * f, M = _ * (6378137 * 6378137 - s * s) / (s * s), g = 1 + M / 16384 * (4096 + M * (-768 + M * (320 - 175 * M))), y = M / 1024 * (256 + M * (-128 + M * (74 - 47 * M)));
6111
+ let b = 0, O = 0, P = 0, E = e / (s * g), ee = 2 * Math.PI;
6112
+ for (; Math.abs(E - ee) > 1e-12; ) {
6113
+ b = Math.cos(2 * p + E), O = Math.sin(E), P = Math.cos(E);
6114
+ const Sr = y * O * (b + y / 4 * (P * (-1 + 2 * b * b) - y / 6 * b * (-3 + 4 * O * O) * (-3 + 4 * b * b)));
6115
+ ee = E, E = e / (s * g) + Sr;
6116
+ }
6117
+ const se = u * O - h * P * o, Xe = Math.atan2(
6118
+ u * P + h * O * o,
6119
+ (1 - n) * Math.sqrt(f * f + se * se)
6120
+ ), Ir = Math.atan2(O * d, h * P - u * O * o), Je = n / 16 * _ * (4 + n * (4 - 3 * _)), Br = Ir - (1 - Je) * n * f * (E + Je * O * (b + Je * P * (-1 + 2 * b * b)));
6121
+ return { lng: i.lng + Kt(Br), lat: Kt(Xe) };
6122
+ }
6123
+ const nn = {
6124
+ getDistance: Rs,
6125
+ getDestination: $s
6126
+ }, on = {
6097
6127
  install(i, t) {
6098
- if (ci(t), {}.VITE_FALSE) {
6099
- const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue": ke, "./TgMapWidget.vue": es, "./controls/TgCustomControl.vue": is, "./controls/TgMapTypeControl.vue": ss, "./controls/TgScaleControl.vue": ns, "./controls/TgZoomControl.vue": as, "./extra/TgMarkerClusterer.vue": kr, "./layers/TgTrafficLayer.vue": cs, "./overlays/TgCircle.vue": ds, "./overlays/TgElementOverlay.vue": ms, "./overlays/TgInfoBox.vue": bs, "./overlays/TgInfoWindow.vue": Os, "./overlays/TgLabel.vue": Es, "./overlays/TgMarker.vue": Ke, "./overlays/TgPolygon.vue": Ls, "./overlays/TgPolyline.vue": xs, "./overlays/TgRectangle.vue": Ps });
6128
+ if (Wi(t), {}.VITE_FALSE) {
6129
+ const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue": ke, "./TgMapWidget.vue": is, "./controls/TgCustomControl.vue": os, "./controls/TgMapTypeControl.vue": as, "./controls/TgScaleControl.vue": ls, "./controls/TgZoomControl.vue": cs, "./extra/TgMarkerClusterer.vue": kr, "./layers/TgTrafficLayer.vue": ps, "./overlays/TgCircle.vue": gs, "./overlays/TgElementOverlay.vue": vs, "./overlays/TgInfoBox.vue": Os, "./overlays/TgInfoWindow.vue": Es, "./overlays/TgLabel.vue": Ps, "./overlays/TgMarker.vue": Ke, "./overlays/TgPolygon.vue": ks, "./overlays/TgPolyline.vue": Is, "./overlays/TgRectangle.vue": Bs });
6100
6130
  Object.keys(r).forEach((s) => {
6101
6131
  const n = r[s];
6102
6132
  i.component(n.name ?? C(`Tg开头的组件必须设置name: ${s}`), n);
@@ -6107,11 +6137,11 @@ const tn = {
6107
6137
  }
6108
6138
  };
6109
6139
  export {
6110
- hr as AbstractControl,
6111
- Tt as AbstractMap,
6140
+ nr as AbstractControl,
6141
+ Mt as AbstractMap,
6112
6142
  he as Arrays,
6113
- mr as Autocomplete,
6114
- bi as BaiduAutocomplete,
6143
+ dr as Autocomplete,
6144
+ ni as BaiduAutocomplete,
6115
6145
  Ot as BaiduCircle,
6116
6146
  pt as BaiduControl,
6117
6147
  xt as BaiduInfoBoxOverlay,
@@ -6119,127 +6149,134 @@ export {
6119
6149
  mt as BaiduMapTypeControl,
6120
6150
  Re as BaiduMapUrls,
6121
6151
  Le as BaiduMarker,
6122
- wi as BaiduMarkerClusterer,
6152
+ ci as BaiduMarkerClusterer,
6123
6153
  Ye as BaiduOverlay,
6124
- xi as BaiduPlacesService,
6154
+ pi as BaiduPlacesService,
6125
6155
  St as BaiduPolyShape,
6126
6156
  $t as BaiduPolygon,
6127
6157
  At as BaiduPolyline,
6128
6158
  Dt as BaiduRectangle,
6129
6159
  ft as BaiduScaleControl,
6130
- ki as BaiduSearchBox,
6160
+ mi as BaiduSearchBox,
6131
6161
  vt as BaiduZoomControl,
6132
6162
  A as BuildInMapType,
6133
- cr as BuildInMapTypeId,
6134
- ve as CachedValue,
6163
+ or as BuildInMapTypeId,
6164
+ _e as CachedValue,
6135
6165
  S as ControlPosition,
6136
6166
  z as ControlPositionConverter,
6137
6167
  x as CoordType,
6138
- gi as CustomControl,
6139
- pi as FastFindValues,
6140
- _i as GoogleAutocomplete,
6168
+ Qr as CustomControl,
6169
+ $i as ElementOverlay,
6170
+ Jr as FastFindValues,
6171
+ j as GestureHandlingOptions,
6172
+ si as GoogleAutocomplete,
6141
6173
  Ct as GoogleCircle,
6142
6174
  gt as GoogleControl,
6143
6175
  Pt as GoogleInfoBoxOverlay,
6144
6176
  Lt as GoogleInfoWindow,
6145
6177
  Se as GoogleMapTypeControl,
6146
6178
  Ae as GoogleMapUrls,
6147
- It as GoogleMarker,
6148
- Ei as GoogleMarkerClusterer,
6149
- Mt as GoogleOverlay,
6150
- Li as GooglePlacesService,
6179
+ Bt as GoogleMarker,
6180
+ di as GoogleMarkerClusterer,
6181
+ Tt as GoogleOverlay,
6182
+ ui as GooglePlacesService,
6151
6183
  zt as GooglePolygon,
6152
6184
  Rt as GooglePolyline,
6153
6185
  Nt as GoogleRectangle,
6154
6186
  yt as GoogleScaleControl,
6155
- Pi as GoogleSearchBox,
6187
+ gi as GoogleSearchBox,
6156
6188
  _t as GoogleZoomControl,
6157
- Ge as Icon,
6158
- Ze as IconSequence,
6159
- Hs as ImageMapType,
6189
+ Ne as Icon,
6190
+ Ge as IconSequence,
6191
+ Us as ImageMapType,
6160
6192
  wt as InfoWindow,
6193
+ Bi as InfoWindowModeValues,
6161
6194
  Ht as KeyValue,
6162
- y as LatLng,
6195
+ v as LatLng,
6163
6196
  R as LatLngBounds,
6164
- en as LifecycleLogPlugin,
6197
+ sn as LifecycleLogPlugin,
6165
6198
  V as Location,
6166
6199
  xe as MIXIN_HOOK_CREATE,
6167
6200
  Pe as MIXIN_HOOK_DESTROY,
6168
6201
  Gt as MIXIN_MAP_NAME,
6169
6202
  ce as MVCArrays,
6170
6203
  k as MapMixin,
6204
+ lt as MapOptions,
6205
+ we as MapPane,
6206
+ Ee as MapPanes,
6171
6207
  $ as MapType,
6172
- dr as MapTypeControlType,
6173
- fr as MapUrls,
6174
- Bi as MapZoom,
6175
- Mr as MarkerClusterer,
6176
- Ce as Objects,
6177
- Er as Overlay,
6178
- Or as PlacesService,
6208
+ ar as MapTypeControlType,
6209
+ ur as MapUrls,
6210
+ fi as MapZoom,
6211
+ vr as MarkerClusterer,
6212
+ Q as Objects,
6213
+ Cr as Overlay,
6214
+ _r as PlacesService,
6179
6215
  X as Point,
6180
- Cr as SearchBox,
6181
- tn as SphericalUtils,
6182
- de as Strings,
6183
- pe as SymbolIcon,
6184
- Ys as SymbolPath,
6185
- ds as TgCircle,
6186
- is as TgCustomControl,
6187
- ms as TgElementOverlay,
6188
- bs as TgInfoBox,
6189
- Os as TgInfoWindow,
6190
- Es as TgLabel,
6216
+ br as SearchBox,
6217
+ nn as SphericalUtils,
6218
+ ue as Strings,
6219
+ ge as SymbolIcon,
6220
+ Xs as SymbolPath,
6221
+ gs as TgCircle,
6222
+ os as TgCustomControl,
6223
+ vs as TgElementOverlay,
6224
+ Os as TgInfoBox,
6225
+ Es as TgInfoWindow,
6226
+ Ps as TgLabel,
6191
6227
  ke as TgMap,
6192
6228
  ht as TgMapFactory,
6193
6229
  G as TgMapType,
6194
- ss as TgMapTypeControl,
6195
- es as TgMapWidget,
6230
+ as as TgMapTypeControl,
6231
+ is as TgMapWidget,
6196
6232
  Ke as TgMarker,
6197
6233
  kr as TgMarkerClusterer,
6198
- Ls as TgPolygon,
6199
- xs as TgPolyline,
6200
- Ps as TgRectangle,
6201
- ns as TgScaleControl,
6202
- cs as TgTrafficLayer,
6203
- as as TgZoomControl,
6204
- mi as TrafficLayer,
6205
- Ne as UnionIcon,
6206
- oe as assert,
6234
+ ks as TgPolygon,
6235
+ Is as TgPolyline,
6236
+ Bs as TgRectangle,
6237
+ ls as TgScaleControl,
6238
+ ps as TgTrafficLayer,
6239
+ cs as TgZoomControl,
6240
+ ei as TrafficLayer,
6241
+ De as UnionIcon,
6242
+ ae as assert,
6207
6243
  st as assertNever,
6208
- Ie as callHook,
6209
- qs as computedSaveOnThis,
6244
+ Be as callHook,
6245
+ Js as computedSaveOnThis,
6246
+ qr as createAsyncSingleton,
6210
6247
  xr as createEmptyVNode,
6211
- Ui as createPropertyObject,
6212
- Ks as createPropertyObjectTyped,
6213
- Ws as debug,
6214
- rn as default,
6248
+ Ki as createPropertyObject,
6249
+ Qs as createPropertyObjectTyped,
6250
+ Vs as debug,
6251
+ on as default,
6215
6252
  L as eventProp,
6216
- Js as extractVNodeFromSlotsByComponent,
6253
+ tn as extractVNodeFromSlotsByComponent,
6217
6254
  dt as findAncestorComponentByType,
6218
- Xs as findByComponentType,
6219
- Ss as getDestination,
6220
- nr as getTgMapConfig,
6255
+ en as findByComponentType,
6256
+ $s as getDestination,
6257
+ Lr as getTgMapConfig,
6221
6258
  ot as isComponentByType,
6222
- js as isDef,
6259
+ Fs as isDef,
6223
6260
  Yr as isEntryValueDef,
6224
- Ds as isInstanceOf,
6225
- zs as lateinit,
6226
- Me as noop,
6261
+ Zs as isInstanceOf,
6262
+ Gs as lateinit,
6263
+ Oe as noop,
6227
6264
  m as optionalProp,
6228
- $i as path,
6265
+ Ri as path,
6229
6266
  D as requiredProp,
6230
- Ns as safeAs,
6267
+ Ws as safeAs,
6231
6268
  tr as safeAsComponent,
6232
- ci as setTgMapConfig,
6233
- Yi as splitAttrs,
6269
+ Wi as setTgMapConfig,
6270
+ Xi as splitAttrs,
6234
6271
  Z as stringEnumProp,
6235
- Fi as stringUnionPropFromValues,
6272
+ qi as stringUnionPropFromValues,
6236
6273
  C as throwError,
6237
6274
  ut as throwUnsupported,
6238
- Zs as todo,
6275
+ js as todo,
6239
6276
  nt as typed,
6240
- Gs as unwrapStringEnumValue,
6241
- Qs as useEventLogMethods,
6277
+ Hs as unwrapStringEnumValue,
6278
+ rn as useEventLogMethods,
6242
6279
  q as useSplittedAttrs,
6243
- os as useTgMapInner
6280
+ hs as useTgMapInner
6244
6281
  };
6245
6282
  //# sourceMappingURL=tg-map.js.map