tg-map-vue3 3.6.4 → 3.6.7

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,8 +2,8 @@
2
2
  var Ir = Object.defineProperty;
3
3
  var Sr = (i, t, e) => t in i ? Ir(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
4
4
  var c = (i, t, e) => (Sr(i, typeof t != "symbol" ? t + "" : t, e), e);
5
- import { createCommentVNode as Je, computed as Yt, defineComponent as w, markRaw as Ar, watch as qt, openBlock as V, createElementBlock as F, mergeProps as ue, createElementVNode as Rr, normalizeClass as Ze, renderSlot as W, normalizeStyle as $r, getCurrentInstance as Dr, inject as zr, onMounted as Nr, onBeforeUnmount as Gr, toRaw as We, withDirectives as Zr, vShow as Wr } from "vue";
6
- function U(i, t, e) {
5
+ import { createCommentVNode as tt, computed as qt, defineComponent as w, markRaw as Ar, watch as Kt, openBlock as F, createElementBlock as U, mergeProps as ue, createElementVNode as Rr, normalizeClass as je, renderSlot as W, normalizeStyle as $r, getCurrentInstance as zr, inject as Dr, onMounted as Nr, onBeforeUnmount as Gr, toRaw as Ve, withDirectives as Zr, vShow as Wr } from "vue";
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]);
9
9
  });
@@ -15,15 +15,15 @@ function jr() {
15
15
  function Se(i, t) {
16
16
  return t.__id__ || (t.__id__ = jr()), `${i}::${t.__id__}`;
17
17
  }
18
- var Kt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
19
- function nt(i) {
18
+ var Xt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
19
+ function lt(i) {
20
20
  return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
21
21
  }
22
- var Xt = { exports: {} };
22
+ var Jt = { exports: {} };
23
23
  (function(i) {
24
24
  (function(t, e) {
25
25
  i.exports ? i.exports = e() : t.coordtransform = e();
26
- })(Kt, function() {
26
+ })(Xt, function() {
27
27
  var t = 52.35987755982988, e = 3.141592653589793, r = 6378245, s = 0.006693421622965943;
28
28
  function n(g, f, v, O) {
29
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);
@@ -58,12 +58,12 @@ var Xt = { exports: {} };
58
58
  return !1;
59
59
  }
60
60
  function l(g, f) {
61
- var v = g - 65e-4, O = f - 6e-3, x = Math.sqrt(v * v + O * O) - 2e-5 * Math.sin(O * t), E = Math.atan2(O, v) - 3e-6 * Math.cos(v * t), Q = x * Math.cos(E), ie = x * Math.sin(E);
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
62
  return [Q, ie];
63
63
  }
64
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), x = v * Math.cos(O) + 65e-4, E = v * Math.sin(O) + 6e-3;
66
- return [x, E];
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;
66
+ return [P, E];
67
67
  }
68
68
  function u(g, f) {
69
69
  return o(g, f) ? b(g, f) : [g, f];
@@ -75,12 +75,12 @@ var Xt = { exports: {} };
75
75
  return [g * 2 - v[0], f * 2 - v[1]];
76
76
  }
77
77
  function b(g, f) {
78
- var v = _(g - 105, f - 35), O = T(g - 105, f - 35), x = f / 180 * e, E = Math.sin(x);
78
+ var v = _(g - 105, f - 35), O = T(g - 105, f - 35), P = f / 180 * e, E = Math.sin(P);
79
79
  E = 1 - s * E * E;
80
80
  var Q = Math.sqrt(E);
81
- v = v * 180 / (r * (1 - s) / (E * Q) * e), O = O * 180 / (r / Q * Math.cos(x) * e);
82
- var ie = f + v, Ue = g + O;
83
- return [Ue, ie];
81
+ v = v * 180 / (r * (1 - s) / (E * Q) * e), O = O * 180 / (r / Q * Math.cos(P) * e);
82
+ var ie = f + v, Ke = g + O;
83
+ return [Ke, ie];
84
84
  }
85
85
  function _(g, f) {
86
86
  var v = -100 + 2 * g + 3 * f + 0.2 * f * f + 0.1 * g * f + 0.2 * Math.sqrt(Math.abs(g));
@@ -115,40 +115,40 @@ var Xt = { exports: {} };
115
115
  }
116
116
  };
117
117
  });
118
- })(Xt);
119
- var Vr = Xt.exports;
120
- const se = /* @__PURE__ */ nt(Vr);
118
+ })(Jt);
119
+ var Vr = Jt.exports;
120
+ const se = /* @__PURE__ */ lt(Vr);
121
121
  function oe(i, t) {
122
122
  if (!i)
123
123
  throw new Error(`AssertionError: ${t}`);
124
124
  }
125
- function Qe(i) {
125
+ function rt(i) {
126
126
  throw new Error(`Unexpected object: ${i}`);
127
127
  }
128
- function As() {
128
+ function Rs() {
129
129
  }
130
- function et(i) {
130
+ function it(i) {
131
131
  return i;
132
132
  }
133
- function Rs(i, t) {
133
+ function $s(i, t) {
134
134
  return i instanceof t;
135
135
  }
136
- function $s(i, t) {
136
+ function zs(i, t) {
137
137
  if (i instanceof t)
138
138
  return i;
139
139
  }
140
- function tt(i, t) {
140
+ function st(i, t) {
141
141
  return (i == null ? void 0 : i.$options.name) === t.name;
142
142
  }
143
- function Jt(i, t) {
144
- return tt(i, t) ? i : void 0;
143
+ function Qt(i, t) {
144
+ return st(i, t) ? i : void 0;
145
145
  }
146
- function ot(i, t, e) {
146
+ function ht(i, t, e) {
147
147
  let r = t;
148
148
  for (; r; ) {
149
- if (tt(r, i))
149
+ if (st(r, i))
150
150
  return r;
151
- if (e && tt(r, e))
151
+ if (e && st(r, e))
152
152
  return;
153
153
  r = r.$parent;
154
154
  }
@@ -159,47 +159,63 @@ function Ds(i) {
159
159
  function C(i) {
160
160
  throw new Error(i);
161
161
  }
162
- function at(i) {
162
+ function ct(i) {
163
163
  throw new Error(`Unsupported: ${i}`);
164
164
  }
165
- function zs(i) {
165
+ function Ns(i) {
166
166
  throw new Error(`todo: ${i}`);
167
167
  }
168
- function Ns(i) {
168
+ function Gs(i) {
169
169
  return i;
170
170
  }
171
171
  function ve(...i) {
172
172
  }
173
- function Gs(i) {
173
+ function Zs(i) {
174
174
  return i != null;
175
175
  }
176
- function Qt(i) {
176
+ function Fr(i) {
177
177
  return i[1] != null;
178
178
  }
179
- var I = /* @__PURE__ */ ((i) => (i.wgs84 = "wgs84", i.gcj02 = "gcj02", i.bd09 = "bd09", i))(I || {});
180
- const qe = "wgs84", N = class {
179
+ var B = /* @__PURE__ */ ((i) => (i.wgs84 = "wgs84", i.gcj02 = "gcj02", i.bd09 = "bd09", i))(B || {});
180
+ const Je = "wgs84", k = class {
181
181
  constructor(t, e, r) {
182
182
  this.lat = t, this.lng = e, this.coord = r;
183
183
  }
184
+ /**
185
+ * {@template latlng_normalize}
186
+ *
187
+ * 对经纬度进行标准化, 参考google的实现
188
+ *
189
+ * ## 行为不一致
190
+ * - google: google.maps.LatLng的构造器会对经纬度进行标准化, 所有点都能正常显示
191
+ * - baidu: BMap.Point的构造器不会对经纬度进行标准化, 超出范围的点显示到(0, 0)位置
192
+ *
193
+ * {@endtemplate}
194
+ */
195
+ /* private */
196
+ static _normalize(t, e) {
197
+ const r = e > 90 ? 90 : e < -90 ? -90 : e;
198
+ return [t > 180 ? (t + 180) % 360 - 180 : t < -180 ? (t - 180) % 360 + 180 : t, r];
199
+ }
184
200
  /** @param coord Baidu Map的坐标一般都是bd09 */
185
201
  static fromBaidu(t, e) {
186
- return new N(t.lat, t.lng, e);
202
+ return new k(t.lat, t.lng, e);
187
203
  }
188
204
  /** @param coord Google Map的坐标依据地图类型不同是不一样的 */
189
205
  static fromGoogle(t, e) {
190
- return new N(t.lat(), t.lng(), e);
206
+ return new k(t.lat(), t.lng(), e);
191
207
  }
192
208
  static fromHere(t, e) {
193
- return new N(t.lat, t.lng, e);
209
+ return new k(t.lat, t.lng, e);
194
210
  }
195
211
  static fromLiteral(t) {
196
- return new N(t.lat, t.lng, t.coord || qe);
212
+ return new k(t.lat, t.lng, t.coord || Je);
197
213
  }
198
- static fromLngLat(t, e, r = qe) {
199
- return new N(e, t, r);
214
+ static fromLngLat(t, e, r = Je) {
215
+ return new k(e, t, r);
200
216
  }
201
- static create(t, e, r = qe) {
202
- return new N(t, e, r);
217
+ static create(t, e, r = Je) {
218
+ return new k(t, e, r);
203
219
  }
204
220
  /** 转换坐标到指定坐标系 */
205
221
  to(t) {
@@ -207,12 +223,22 @@ const qe = "wgs84", N = class {
207
223
  if (this.coord === e)
208
224
  return this;
209
225
  const [r, s] = this._convert(e);
210
- return new N(s, r, e);
226
+ return new k(s, r, e);
211
227
  }
212
- toBaidu(t) {
213
- let e = this.lat, r = this.lng;
214
- return this.coord !== t && ([r, e] = this._convert(t)), new BMap.Point(r, e);
228
+ /**
229
+ * TODO: normalize要不要默认设为true, 和google的行为保持一致?
230
+ * 转换成baidu的经纬度
231
+ * @param normalize 转换时是否进行标准化, 默认false
232
+ * @see _normalize {@macro latlng_normalize}
233
+ */
234
+ toBaidu(t, e = !1) {
235
+ let r = this.lat, s = this.lng;
236
+ return this.coord !== t && ([s, r] = this._convert(t)), e && ([s, r] = k._normalize(s, r)), new BMap.Point(s, r);
215
237
  }
238
+ /**
239
+ * 转换成google的经纬度, 内部会自动进行标准化
240
+ * @see _normalize {@macro latlng_normalize}
241
+ */
216
242
  toGoogle(t) {
217
243
  let e = this.lat, r = this.lng;
218
244
  return this.coord !== t && ([r, e] = this._convert(t)), new google.maps.LatLng(e, r);
@@ -241,6 +267,14 @@ const qe = "wgs84", N = class {
241
267
  }
242
268
  throw new Error(`不支持的坐标转换: ${this.coord}=>${t}`);
243
269
  }
270
+ /**
271
+ * 标准化, 返回合法的坐标点
272
+ * @see _normalize {@macro latlng_normalize}
273
+ */
274
+ normalize() {
275
+ const [t, e] = k._normalize(this.lng, this.lat);
276
+ return e === this.lat && t === this.lng ? this : new k(e, t, this.coord);
277
+ }
244
278
  equals(t) {
245
279
  return this === t ? !0 : this.lat === t.lat && this.lng === t.lng && this.coord === t.coord;
246
280
  }
@@ -248,8 +282,8 @@ const qe = "wgs84", N = class {
248
282
  return JSON.stringify(this);
249
283
  }
250
284
  };
251
- let y = N;
252
- c(y, "ZERO", N.create(0, 0));
285
+ let y = k;
286
+ c(y, "ZERO", k.create(0, 0));
253
287
  const te = class {
254
288
  /**
255
289
  * 不推荐直接创建LatLngBounds, sw和ne的大小关系可能没法保证, 推荐用LatLngBounds.Builder或者LatLngBounds.from等静态方法来创建
@@ -331,8 +365,8 @@ const te = class {
331
365
  return [this.sw.toBaidu(t), this.ne.toBaidu(t)];
332
366
  }
333
367
  };
334
- let A = te;
335
- c(A, "EMPTY", new te(y.ZERO, y.ZERO));
368
+ let R = te;
369
+ c(R, "EMPTY", new te(y.ZERO, y.ZERO));
336
370
  ((i) => {
337
371
  class t {
338
372
  constructor(r) {
@@ -360,8 +394,8 @@ c(A, "EMPTY", new te(y.ZERO, y.ZERO));
360
394
  }
361
395
  }
362
396
  i.Builder = t;
363
- })(A || (A = {}));
364
- var K;
397
+ })(R || (R = {}));
398
+ var V;
365
399
  ((i) => {
366
400
  function t(r, s) {
367
401
  if (r == null)
@@ -376,45 +410,45 @@ var K;
376
410
  return typeof r == "string" || r == null ? void 0 : r.coord;
377
411
  }
378
412
  i.getCoordType = e;
379
- })(K || (K = {}));
380
- var Fr = function(t) {
381
- return Ur(t) && !Yr(t);
413
+ })(V || (V = {}));
414
+ var Ur = function(t) {
415
+ return Yr(t) && !qr(t);
382
416
  };
383
- function Ur(i) {
417
+ function Yr(i) {
384
418
  return !!i && typeof i == "object";
385
419
  }
386
- function Yr(i) {
420
+ function qr(i) {
387
421
  var t = Object.prototype.toString.call(i);
388
- return t === "[object RegExp]" || t === "[object Date]" || Xr(i);
389
- }
390
- var qr = typeof Symbol == "function" && Symbol.for, Kr = qr ? Symbol.for("react.element") : 60103;
391
- function Xr(i) {
392
- return i.$$typeof === Kr;
422
+ return t === "[object RegExp]" || t === "[object Date]" || Jr(i);
393
423
  }
424
+ var Kr = typeof Symbol == "function" && Symbol.for, Xr = Kr ? Symbol.for("react.element") : 60103;
394
425
  function Jr(i) {
426
+ return i.$$typeof === Xr;
427
+ }
428
+ function Qr(i) {
395
429
  return Array.isArray(i) ? [] : {};
396
430
  }
397
431
  function _e(i, t) {
398
- return t.clone !== !1 && t.isMergeableObject(i) ? le(Jr(i), i, t) : i;
432
+ return t.clone !== !1 && t.isMergeableObject(i) ? le(Qr(i), i, t) : i;
399
433
  }
400
- function Qr(i, t, e) {
434
+ function ei(i, t, e) {
401
435
  return i.concat(t).map(function(r) {
402
436
  return _e(r, e);
403
437
  });
404
438
  }
405
- function ei(i, t) {
439
+ function ti(i, t) {
406
440
  if (!t.customMerge)
407
441
  return le;
408
442
  var e = t.customMerge(i);
409
443
  return typeof e == "function" ? e : le;
410
444
  }
411
- function ti(i) {
445
+ function ri(i) {
412
446
  return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(i).filter(function(t) {
413
447
  return Object.propertyIsEnumerable.call(i, t);
414
448
  }) : [];
415
449
  }
416
- function Nt(i) {
417
- return Object.keys(i).concat(ti(i));
450
+ function Gt(i) {
451
+ return Object.keys(i).concat(ri(i));
418
452
  }
419
453
  function er(i, t) {
420
454
  try {
@@ -423,21 +457,21 @@ function er(i, t) {
423
457
  return !1;
424
458
  }
425
459
  }
426
- function ri(i, t) {
460
+ function ii(i, t) {
427
461
  return er(i, t) && !(Object.hasOwnProperty.call(i, t) && Object.propertyIsEnumerable.call(i, t));
428
462
  }
429
- function ii(i, t, e) {
463
+ function si(i, t, e) {
430
464
  var r = {};
431
- return e.isMergeableObject(i) && Nt(i).forEach(function(s) {
465
+ return e.isMergeableObject(i) && Gt(i).forEach(function(s) {
432
466
  r[s] = _e(i[s], e);
433
- }), Nt(t).forEach(function(s) {
434
- ri(i, s) || (er(i, s) && e.isMergeableObject(t[s]) ? r[s] = ei(s, e)(i[s], t[s], e) : r[s] = _e(t[s], e));
467
+ }), Gt(t).forEach(function(s) {
468
+ ii(i, s) || (er(i, s) && e.isMergeableObject(t[s]) ? r[s] = ti(s, e)(i[s], t[s], e) : r[s] = _e(t[s], e));
435
469
  }), r;
436
470
  }
437
471
  function le(i, t, e) {
438
- e = e || {}, e.arrayMerge = e.arrayMerge || Qr, e.isMergeableObject = e.isMergeableObject || Fr, e.cloneUnlessOtherwiseSpecified = _e;
472
+ e = e || {}, e.arrayMerge = e.arrayMerge || ei, e.isMergeableObject = e.isMergeableObject || Ur, e.cloneUnlessOtherwiseSpecified = _e;
439
473
  var r = Array.isArray(t), s = Array.isArray(i), n = r === s;
440
- return n ? r ? e.arrayMerge(i, t, e) : ii(i, t, e) : _e(t, e);
474
+ return n ? r ? e.arrayMerge(i, t, e) : si(i, t, e) : _e(t, e);
441
475
  }
442
476
  le.all = function(t, e) {
443
477
  if (!Array.isArray(t))
@@ -446,8 +480,8 @@ le.all = function(t, e) {
446
480
  return le(r, s, e);
447
481
  }, {});
448
482
  };
449
- var si = le, ni = si;
450
- const tr = /* @__PURE__ */ nt(ni), Ae = ["3.0"], oi = {
483
+ var ni = le, oi = ni;
484
+ const tr = /* @__PURE__ */ lt(oi), Ae = ["3.0"], ai = {
451
485
  baidu: {
452
486
  version: "3.0",
453
487
  // 在build时会被静态替换, 导致使用者不能无法设置它
@@ -470,16 +504,16 @@ let rr;
470
504
  function ir() {
471
505
  return rr || C("请先安装: Vue<PartialTgMapConfig>.use(TgMap, {})");
472
506
  }
473
- function ai(i) {
474
- i != null && (rr = tr(oi, i));
507
+ function li(i) {
508
+ i != null && (rr = tr(ai, i));
475
509
  }
476
- var rt;
510
+ var nt;
477
511
  ((i) => {
478
512
  function t(e) {
479
513
  return e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight;
480
514
  }
481
515
  i.isScrollable = t;
482
- })(rt || (rt = {}));
516
+ })(nt || (nt = {}));
483
517
  var he;
484
518
  ((i) => {
485
519
  function t(h, o) {
@@ -542,13 +576,13 @@ var ce;
542
576
  function sr(i, t, e) {
543
577
  return i.addListener(t, e).remove;
544
578
  }
545
- function li(i, t, e) {
579
+ function hi(i, t, e) {
546
580
  return i.addEventListener(t, e), () => i.removeEventListener(t, e);
547
581
  }
548
- function hi(i, t, e, r) {
582
+ function ci(i, t, e, r) {
549
583
  return i.addEventListener(t, e, r), () => i.removeEventListener(t, e, r);
550
584
  }
551
- function Gt(i, t, e) {
585
+ function Zt(i, t, e) {
552
586
  return i.addEventListener(t, e), () => i.removeEventListener(t, e);
553
587
  }
554
588
  class nr {
@@ -561,7 +595,7 @@ class nr {
561
595
  return this.target = t, this;
562
596
  }
563
597
  }
564
- class He {
598
+ class Fe {
565
599
  constructor(t, e) {
566
600
  c(this, "eventHub", new or());
567
601
  this.delegate = t, this.options = e;
@@ -590,14 +624,14 @@ class He {
590
624
  this.delegate.removeEventListener(t, e);
591
625
  }
592
626
  }
593
- const $t = class extends nr {
627
+ const Nt = class extends nr {
594
628
  addEventListener(t, e) {
595
629
  const r = Se(t, e);
596
630
  if (this.eventMap.get(r)) {
597
631
  console.warn("listener已经添加过了", r, e);
598
632
  return;
599
633
  }
600
- const s = this.inner.addListener($t.EVENT_TYPE_MAP[t] || t, (n) => {
634
+ const s = this.inner.addListener(Nt.EVENT_TYPE_MAP[t] || t, (n) => {
601
635
  const a = {
602
636
  type: t,
603
637
  target: this.target,
@@ -612,7 +646,7 @@ const $t = class extends nr {
612
646
  s ? (s.remove(), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, e);
613
647
  }
614
648
  };
615
- let re = $t;
649
+ let re = Nt;
616
650
  // 事件类型映射: tg => google
617
651
  c(re, "EVENT_TYPE_MAP", {
618
652
  "center-changed": "center_changed",
@@ -630,7 +664,7 @@ c(re, "EVENT_TYPE_MAP", {
630
664
  "map-mouseup": "mouseup",
631
665
  "map-dblclick": "dblclick"
632
666
  });
633
- const Ne = class extends nr {
667
+ const Ge = class extends nr {
634
668
  addEventListener(t, e) {
635
669
  const r = Se(t, e);
636
670
  if (this.eventMap.get(r)) {
@@ -645,14 +679,14 @@ const Ne = class extends nr {
645
679
  };
646
680
  n.point && (a.position = y.fromBaidu(n.point, this.coordTypeSupplier.coordType)), e.call(this.target, a);
647
681
  };
648
- this.inner.addEventListener(Ne.EVENT_TYPE_MAP[t] || t, s), this.eventMap.set(r, s);
682
+ this.inner.addEventListener(Ge.EVENT_TYPE_MAP[t] || t, s), this.eventMap.set(r, s);
649
683
  }
650
684
  removeEventListener(t, e) {
651
685
  const r = Se(t, e), s = this.eventMap.get(r);
652
- s ? (this.inner.removeEventListener(Ne.EVENT_TYPE_MAP[t] || t, s), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, e);
686
+ s ? (this.inner.removeEventListener(Ge.EVENT_TYPE_MAP[t] || t, s), this.eventMap.delete(r)) : console.warn("移除失败, 不存在该listener", r, e);
653
687
  }
654
688
  };
655
- let ae = Ne;
689
+ let ae = Ge;
656
690
  // cSpell:words clickclose
657
691
  // 事件类型映射, tg => baidu
658
692
  c(ae, "EVENT_TYPE_MAP", {
@@ -684,7 +718,7 @@ class or {
684
718
  e && e.forEach((r) => r.call(t.target, t));
685
719
  }
686
720
  }
687
- class Zt {
721
+ class Wt {
688
722
  /**
689
723
  * `keys`和`values`数组中可以有相同的值, 若存在相同值, 则index越小的优先级越高
690
724
  */
@@ -702,7 +736,7 @@ class Zt {
702
736
  return this.keyToValue.get(t) ?? C();
703
737
  }
704
738
  }
705
- class ci {
739
+ class di {
706
740
  constructor(t, e = 10) {
707
741
  c(this, "map", /* @__PURE__ */ new Map());
708
742
  this.values = t, this.maxSize4Debug = e;
@@ -740,7 +774,7 @@ class fe {
740
774
  return this.value === void 0 && (this.value = this.creator()), this.value;
741
775
  }
742
776
  }
743
- var B = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-center", i.TOP_RIGHT = "top-right", i.BOTTOM_LEFT = "bottom-left", i.BOTTOM_CENTER = "bottom-center", i.BOTTOM_RIGHT = "bottom-right", i.LEFT_TOP = "left-top", i.LEFT_CENTER = "left-center", i.LEFT_BOTTOM = "left-bottom", i.RIGHT_TOP = "right-top", i.RIGHT_CENTER = "right-center", i.RIGHT_BOTTOM = "right-bottom", i))(B || {}), $;
777
+ var S = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-center", i.TOP_RIGHT = "top-right", i.BOTTOM_LEFT = "bottom-left", i.BOTTOM_CENTER = "bottom-center", i.BOTTOM_RIGHT = "bottom-right", i.LEFT_TOP = "left-top", i.LEFT_CENTER = "left-center", i.LEFT_BOTTOM = "left-bottom", i.RIGHT_TOP = "right-top", i.RIGHT_CENTER = "right-center", i.RIGHT_BOTTOM = "right-bottom", i))(S || {}), z;
744
778
  ((i) => {
745
779
  let t, e;
746
780
  const r = [
@@ -759,7 +793,7 @@ var B = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
759
793
  /* RIGHT_BOTTOM */
760
794
  ];
761
795
  function s() {
762
- return t || (t = new Zt(r, [
796
+ return t || (t = new Wt(r, [
763
797
  /* | @tg/map |名字相同| baidu | */
764
798
  /* TOP_LEFT = */
765
799
  BMAP_ANCHOR_TOP_LEFT,
@@ -789,7 +823,7 @@ var B = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
789
823
  }
790
824
  i.getBaidu = s;
791
825
  function n() {
792
- return e || (e = new Zt(r, [
826
+ return e || (e = new Wt(r, [
793
827
  google.maps.ControlPosition.TOP_LEFT,
794
828
  google.maps.ControlPosition.TOP_CENTER,
795
829
  google.maps.ControlPosition.TOP_RIGHT,
@@ -805,8 +839,8 @@ var B = /* @__PURE__ */ ((i) => (i.TOP_LEFT = "top-left", i.TOP_CENTER = "top-ce
805
839
  ])), e;
806
840
  }
807
841
  i.getGoogle = n;
808
- })($ || ($ = {}));
809
- class di {
842
+ })(z || (z = {}));
843
+ class ui {
810
844
  constructor(t) {
811
845
  /** 实际添加到地图中的control对象 */
812
846
  c(this, "inner");
@@ -815,7 +849,7 @@ class di {
815
849
  }
816
850
  class ar {
817
851
  }
818
- class lt extends ar {
852
+ class dt extends ar {
819
853
  constructor(t, e) {
820
854
  super(), this.inner = t, this.position = e;
821
855
  }
@@ -826,10 +860,10 @@ class lt extends ar {
826
860
  t ? this.inner.show() : this.inner.hide();
827
861
  }
828
862
  getPosition() {
829
- return this.position ?? $.getBaidu().toKey(this.inner.getAnchor());
863
+ return this.position ?? z.getBaidu().toKey(this.inner.getAnchor());
830
864
  }
831
865
  setPosition(t) {
832
- this.position = t, this.inner.setAnchor($.getBaidu().toValue(t));
866
+ this.position = t, this.inner.setAnchor(z.getBaidu().toValue(t));
833
867
  }
834
868
  addTo(t) {
835
869
  t.innerMap.addControl(this.inner);
@@ -838,7 +872,7 @@ class lt extends ar {
838
872
  t.innerMap.removeControl(this.inner);
839
873
  }
840
874
  }
841
- class ht extends ar {
875
+ class ut extends ar {
842
876
  constructor(e, r) {
843
877
  super();
844
878
  c(this, "visible", !1);
@@ -865,7 +899,7 @@ class ht extends ar {
865
899
  }
866
900
  onCreateOptions() {
867
901
  return {
868
- position: $.getGoogle().toValue(this.position)
902
+ position: z.getGoogle().toValue(this.position)
869
903
  };
870
904
  }
871
905
  tryUpdateOptions() {
@@ -876,7 +910,7 @@ class ht extends ar {
876
910
  }
877
911
  }
878
912
  var lr = /* @__PURE__ */ ((i) => (i.normal = "normal", i.satellite = "satellite", i.hybrid = "hybrid", i))(lr || {});
879
- class S {
913
+ class A {
880
914
  constructor(t, e, r, s) {
881
915
  this.id = t, this.baidu = e, this.google = r, this.googleCoordType = s;
882
916
  }
@@ -884,7 +918,7 @@ class S {
884
918
  return this.id;
885
919
  }
886
920
  getBaiduCoordType() {
887
- return I.bd09;
921
+ return B.bd09;
888
922
  }
889
923
  asBaiduMapType() {
890
924
  return this.baidu();
@@ -897,10 +931,10 @@ class S {
897
931
  return this.google();
898
932
  }
899
933
  asGoogleMapType() {
900
- at("google的内置地图没有对应的实例");
934
+ ct("google的内置地图没有对应的实例");
901
935
  }
902
936
  }
903
- class Zs {
937
+ class Ws {
904
938
  constructor(t, e) {
905
939
  c(this, "baiduLayerCached", new fe(() => {
906
940
  const t = new BMap.TileLayer({});
@@ -949,10 +983,10 @@ class Zs {
949
983
  return this.googleCached.get();
950
984
  }
951
985
  asGoogleLayer() {
952
- at("这个方法不会被调用");
986
+ ct("这个方法不会被调用");
953
987
  }
954
988
  }
955
- class ui {
989
+ class pi {
956
990
  constructor() {
957
991
  c(this, "baiduCache", new fe(() => new BMap.TrafficLayer()));
958
992
  c(this, "googleCache", new fe(() => new google.maps.TrafficLayer()));
@@ -964,19 +998,19 @@ class ui {
964
998
  return this.googleCache.get();
965
999
  }
966
1000
  }
967
- var R;
1001
+ var $;
968
1002
  ((i) => {
969
- i.NORMAL = new S("normal", () => BMAP_NORMAL_MAP, () => google.maps.MapTypeId.ROADMAP, I.gcj02), i.SATELLITE = new S("satellite", () => BMAP_SATELLITE_MAP, () => google.maps.MapTypeId.SATELLITE, I.wgs84), i.HYBRID = new S("hybrid", () => BMAP_HYBRID_MAP, () => google.maps.MapTypeId.HYBRID, I.gcj02), i.TERRAIN = new S("terrain", () => (
1003
+ i.NORMAL = new A("normal", () => BMAP_NORMAL_MAP, () => google.maps.MapTypeId.ROADMAP, B.gcj02), i.SATELLITE = new A("satellite", () => BMAP_SATELLITE_MAP, () => google.maps.MapTypeId.SATELLITE, B.wgs84), i.HYBRID = new A("hybrid", () => BMAP_HYBRID_MAP, () => google.maps.MapTypeId.HYBRID, B.gcj02), i.TERRAIN = new A("terrain", () => (
970
1004
  /* 三维 */
971
1005
  BMAP_PERSPECTIVE_MAP
972
1006
  ), () => (
973
1007
  /* 地形 */
974
1008
  google.maps.MapTypeId.TERRAIN
975
- ), I.wgs84), i.BUILD_IN_MAP_TYPES = new ci([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
976
- })(R || (R = {}));
1009
+ ), B.wgs84), i.BUILD_IN_MAP_TYPES = new di([i.NORMAL, i.SATELLITE, i.HYBRID, i.TERRAIN]);
1010
+ })($ || ($ = {}));
977
1011
  var hr = /* @__PURE__ */ ((i) => (i.DEFAULT = "default", i.HORIZONTAL = "horizontal", i.DROPDOWN = "dropdown", i))(hr || {});
978
- const cr = [R.NORMAL, R.SATELLITE, R.HYBRID];
979
- class ct extends lt {
1012
+ const cr = [$.NORMAL, $.SATELLITE, $.HYBRID];
1013
+ class pt extends dt {
980
1014
  static create(t) {
981
1015
  const e = t.mapTypes ?? cr, r = {
982
1016
  default: BMAP_MAPTYPE_CONTROL_HORIZONTAL,
@@ -986,11 +1020,11 @@ class ct extends lt {
986
1020
  type: t.type && r[t.type],
987
1021
  mapTypes: e.map((n) => n.asBaiduMapType())
988
1022
  });
989
- return t.position && s.setAnchor($.getBaidu().toValue(t.position)), new ct(s, t.position);
1023
+ return t.position && s.setAnchor(z.getBaidu().toValue(t.position)), new pt(s, t.position);
990
1024
  }
991
1025
  }
992
- const ne = class extends ht {
993
- constructor(t = "default", e = B.TOP_LEFT, r = cr) {
1026
+ const ne = class extends ut {
1027
+ constructor(t = "default", e = S.TOP_LEFT, r = cr) {
994
1028
  super("mapType", e), this.type = t, this.mapTypes = r, ne.type2google || (ne.type2google = {
995
1029
  default: google.maps.MapTypeControlStyle.DEFAULT,
996
1030
  horizontal: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
@@ -1002,51 +1036,51 @@ const ne = class extends ht {
1002
1036
  }
1003
1037
  onCreateOptions() {
1004
1038
  const t = super.onCreateOptions();
1005
- return t.style = ne.type2google[this.type], t.mapTypeIds = this.mapTypes.map((e) => e instanceof S ? e.getGoogleMapTypeId() : e.id), t;
1039
+ return t.style = ne.type2google[this.type], t.mapTypeIds = this.mapTypes.map((e) => e instanceof A ? e.getGoogleMapTypeId() : e.id), t;
1006
1040
  }
1007
1041
  addTo(t) {
1008
1042
  super.addTo(t), this.mapTypes.forEach((e) => {
1009
- e instanceof S || t.innerMap.mapTypes.set(e.id, e.asGoogleMapType());
1043
+ e instanceof A || t.innerMap.mapTypes.set(e.id, e.asGoogleMapType());
1010
1044
  });
1011
1045
  }
1012
1046
  };
1013
1047
  let ke = ne;
1014
1048
  c(ke, "type2google");
1015
- class dt extends lt {
1049
+ class gt extends dt {
1016
1050
  static create(t) {
1017
1051
  const e = new BMap.ScaleControl({
1018
- anchor: t.position && $.getBaidu().toValue(t.position)
1052
+ anchor: t.position && z.getBaidu().toValue(t.position)
1019
1053
  });
1020
- return new dt(e, t.position);
1054
+ return new gt(e, t.position);
1021
1055
  }
1022
1056
  }
1023
- class ut extends ht {
1057
+ class mt extends ut {
1024
1058
  static create(t) {
1025
- return new ut(t.position);
1059
+ return new mt(t.position);
1026
1060
  }
1027
- constructor(t = B.BOTTOM_RIGHT) {
1061
+ constructor(t = S.BOTTOM_RIGHT) {
1028
1062
  super("scale", t);
1029
1063
  }
1030
1064
  }
1031
- class pt extends lt {
1065
+ class ft extends dt {
1032
1066
  static create(t) {
1033
1067
  const e = new BMap.NavigationControl({
1034
1068
  type: BMAP_NAVIGATION_CONTROL_ZOOM,
1035
1069
  // enableGeolocation: true,
1036
- anchor: t.position && $.getBaidu().toValue(t.position)
1070
+ anchor: t.position && z.getBaidu().toValue(t.position)
1037
1071
  });
1038
- return new pt(e, t.position);
1072
+ return new ft(e, t.position);
1039
1073
  }
1040
1074
  }
1041
- class gt extends ht {
1075
+ class yt extends ut {
1042
1076
  static create(t) {
1043
- return new gt(t.position);
1077
+ return new yt(t.position);
1044
1078
  }
1045
- constructor(t = B.RIGHT_BOTTOM) {
1079
+ constructor(t = S.RIGHT_BOTTOM) {
1046
1080
  super("zoom", t);
1047
1081
  }
1048
1082
  }
1049
- function pi(i) {
1083
+ function gi(i) {
1050
1084
  let t, e, r;
1051
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) => {
1052
1086
  var f;
@@ -1057,14 +1091,14 @@ function pi(i) {
1057
1091
  }));
1058
1092
  u[a] ? console.warn(s + " only loads once. Ignoring:", i) : u[a] = (T, ...g) => p.add(T) && _().then(() => u[a](T, ...g));
1059
1093
  }
1060
- let gi, mi;
1094
+ let mi, fi;
1061
1095
  const J = {
1062
1096
  /** Google的坐标0点 */
1063
1097
  get LATLNG_ZERO() {
1064
- return gi ?? (gi = new google.maps.LatLng({ lat: 0, lng: 0 }));
1098
+ return mi ?? (mi = new google.maps.LatLng({ lat: 0, lng: 0 }));
1065
1099
  },
1066
1100
  get BOUNDS_ZERO() {
1067
- return mi ?? (mi = new google.maps.LatLngBounds(this.LATLNG_ZERO, this.LATLNG_ZERO));
1101
+ return fi ?? (fi = new google.maps.LatLngBounds(this.LATLNG_ZERO, this.LATLNG_ZERO));
1068
1102
  }
1069
1103
  };
1070
1104
  function dr(i, t = { country: "", province: "", city: "", district: "", street: "", streetNumber: "" }) {
@@ -1107,7 +1141,7 @@ function ur(i, t) {
1107
1141
  }
1108
1142
  class pr {
1109
1143
  }
1110
- class fi extends pr {
1144
+ class yi extends pr {
1111
1145
  constructor(e, r) {
1112
1146
  super();
1113
1147
  c(this, "inner");
@@ -1137,7 +1171,7 @@ class fi extends pr {
1137
1171
  });
1138
1172
  }
1139
1173
  }
1140
- class yi extends pr {
1174
+ class vi extends pr {
1141
1175
  constructor(e, r) {
1142
1176
  super();
1143
1177
  c(this, "inner");
@@ -1151,7 +1185,7 @@ class yi extends pr {
1151
1185
  const s = () => {
1152
1186
  this.inner.setLocation(this.map.innerMap);
1153
1187
  };
1154
- this.removeableArray.push(Gt(this.map, "center-changed", s)), this.removeableArray.push(Gt(this.map, "zoom-changed", s));
1188
+ this.removeableArray.push(Zt(this.map, "center-changed", s)), this.removeableArray.push(Zt(this.map, "zoom-changed", s));
1155
1189
  }
1156
1190
  }
1157
1191
  setBounds(e) {
@@ -1159,14 +1193,14 @@ class yi extends pr {
1159
1193
  }
1160
1194
  addResultListener(e) {
1161
1195
  let r = 0;
1162
- const s = li(this.inner, "confirm", (a) => {
1196
+ const s = hi(this.inner, "confirm", (a) => {
1163
1197
  const h = a.item.value;
1164
1198
  r = Date.now(), e(Object.assign({
1165
1199
  title: h.business,
1166
1200
  country: ""
1167
1201
  // Baidu的自动完成只支持中国
1168
1202
  }, h));
1169
- }), n = hi(this.input, "keyup", (a) => {
1203
+ }), n = ci(this.input, "keyup", (a) => {
1170
1204
  a.key === "Enter" && Date.now() - r > 100 && e({
1171
1205
  title: this.input.value,
1172
1206
  country: "",
@@ -1187,40 +1221,68 @@ class gr {
1187
1221
  this.options = t;
1188
1222
  }
1189
1223
  }
1190
- const Dt = class extends gr {
1224
+ function Re(i, t, e) {
1225
+ const r = new URL(t, i), s = new URLSearchParams(Object.entries(e).filter(Fr));
1226
+ return r.search = "?" + s.toString(), r;
1227
+ }
1228
+ const Ze = class extends gr {
1191
1229
  /** @see https://developers.google.com/maps/documentation/urls/get-started#directions-action */
1192
1230
  directions(t, e, r) {
1193
- const s = new URL("dir/", Dt.BASE_URL), n = new URLSearchParams(Object.entries({
1231
+ return Re(Ze.BASE_URL, "dir/", {
1194
1232
  api: "1",
1195
- origin: K.toString(t, I.wgs84),
1196
- destination: K.toString(e, I.wgs84),
1233
+ // {@template google_map_normal_gcj02}
1234
+ // google地图的普通地图, 在国内其实上是gcj02坐标, 卫星地图是wgs84坐标, 因为这里打开的是基础地图, 故使用gcj02
1235
+ // {@endtemplate}
1236
+ origin: V.toString(t, B.gcj02),
1237
+ destination: V.toString(e, B.gcj02),
1197
1238
  travelmode: r
1198
- }).filter(Qt));
1199
- return s.search = "?" + n.toString(), s;
1239
+ });
1240
+ }
1241
+ /** @see https://developers.google.com/maps/documentation/urls/get-started#search-action */
1242
+ search(t) {
1243
+ return Re(Ze.BASE_URL, "search/", {
1244
+ api: "1",
1245
+ // {@macro google_map_normal_gcj02}
1246
+ query: V.toString(t, B.gcj02)
1247
+ });
1200
1248
  }
1201
1249
  };
1202
- let Be = Dt;
1250
+ let Be = Ze;
1203
1251
  c(Be, "BASE_URL", "https://www.google.com/maps/");
1204
- const zt = class extends gr {
1252
+ const We = class extends gr {
1205
1253
  /** @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 */
1206
1254
  directions(t, e, r = "driving") {
1207
- const s = new URL("direction", zt.BASE_URL), n = K.getCoordType(e) ?? K.getCoordType(t) ?? I.bd09, a = K.toString(e, n), h = new URLSearchParams(Object.entries({
1255
+ const s = V.getCoordType(e) ?? V.getCoordType(t) ?? B.bd09, n = V.toString(e, s);
1256
+ return Re(We.BASE_URL, "direction", {
1208
1257
  // baidu地图, 一定要有起点, 故这里用终点当起点, 防止导航失败
1209
- origin: K.toString(t, n) ?? (typeof e != "string" ? `name:请选择起点|latlng:${a}` : a),
1210
- destination: a,
1258
+ origin: V.toString(t, s) ?? (typeof e != "string" ? `name:请选择起点|latlng:${n}` : n),
1259
+ destination: n,
1211
1260
  // 默认就是bd09
1212
- coord_type: n === I.bd09 ? void 0 : n,
1261
+ coord_type: s === B.bd09 ? void 0 : s,
1213
1262
  mode: r,
1214
1263
  output: "html",
1215
1264
  region: "中国",
1216
1265
  src: window.location.hostname
1217
- }).filter(Qt));
1218
- return s.search = "?" + h.toString(), s;
1266
+ });
1267
+ }
1268
+ /** @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 */
1269
+ search(t) {
1270
+ return Re(We.BASE_URL, "geocoder", {
1271
+ ...typeof t == "string" ? {
1272
+ address: t
1273
+ } : {
1274
+ location: `${t.lat},${t.lng}`,
1275
+ // 默认就是bd09
1276
+ coord_type: t.coord === B.bd09 ? void 0 : t.coord
1277
+ },
1278
+ output: "html",
1279
+ src: window.location.hostname
1280
+ });
1219
1281
  }
1220
1282
  };
1221
- let Ie = zt;
1283
+ let Ie = We;
1222
1284
  c(Ie, "BASE_URL", "https://api.map.baidu.com/");
1223
- let vi = class mr {
1285
+ let _i = class mr {
1224
1286
  constructor(t, e, r) {
1225
1287
  this.extend(mr, 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;
1226
1288
  var s = r || {};
@@ -1641,7 +1703,7 @@ let vi = class mr {
1641
1703
  if (r && r.isMarkerInClusterBounds(t))
1642
1704
  r.addMarker(t);
1643
1705
  else {
1644
- var o = new _i(this);
1706
+ var o = new bi(this);
1645
1707
  o.addMarker(t), this.clusters_.push(o);
1646
1708
  }
1647
1709
  }
@@ -1658,9 +1720,9 @@ let vi = class mr {
1658
1720
  ), e = this.getExtendedBounds(t), r = 0, s; s = this.markers_[r]; r++)
1659
1721
  !s.isAdded && this.isMarkerInBounds_(s, e) && this.addToClosestCluster_(s);
1660
1722
  }
1661
- }, _i = class {
1723
+ }, bi = class {
1662
1724
  constructor(t) {
1663
- 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 mt(
1725
+ 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 vt(
1664
1726
  this,
1665
1727
  t.getStyles(),
1666
1728
  t.getGridSize()
@@ -1794,9 +1856,9 @@ let vi = class mr {
1794
1856
  this.clusterIcon_.setCenter(this.center_), this.clusterIcon_.setSums(a), this.clusterIcon_.show();
1795
1857
  }
1796
1858
  };
1797
- class mt {
1859
+ class vt {
1798
1860
  constructor(t, e, r) {
1799
- t.getMarkerClusterer().extend(mt, google.maps.OverlayView), this.styles_ = e, this.padding_ = r || 0, this.cluster_ = t, this.center_ = null, this.map_ = t.getMap(), this.div_ = null, this.sums_ = null, this.visible_ = !1, this.setMap(this.map_);
1861
+ t.getMarkerClusterer().extend(vt, google.maps.OverlayView), this.styles_ = e, this.padding_ = r || 0, this.cluster_ = t, this.center_ = null, this.map_ = t.getMap(), this.div_ = null, this.sums_ = null, this.visible_ = !1, this.setMap(this.map_);
1800
1862
  }
1801
1863
  /**
1802
1864
  * Triggers the clusterclick event and zoom's if the option is set.
@@ -1931,7 +1993,7 @@ var fr = { exports: {} };
1931
1993
  (function(i, t) {
1932
1994
  (function(e, r) {
1933
1995
  i.exports = r();
1934
- })(Kt, function() {
1996
+ })(Xt, function() {
1935
1997
  var e, r = e = r || { version: "1.3.8" }, s = {};
1936
1998
  r.guid = "$BAIDU$", s[r.guid] = s[r.guid] || {}, r.dom = r.dom || {}, r.dom.g = function(o) {
1937
1999
  return typeof o == "string" || o instanceof String ? document.getElementById(o) : o && o.nodeName && (o.nodeType == 1 || o.nodeType == 9) ? o : null;
@@ -2121,18 +2183,18 @@ var fr = { exports: {} };
2121
2183
  }, h;
2122
2184
  });
2123
2185
  })(fr);
2124
- var bi = fr.exports;
2125
- const Wt = /* @__PURE__ */ nt(bi);
2186
+ var Ti = fr.exports;
2187
+ const Ht = /* @__PURE__ */ lt(Ti);
2126
2188
  var yr = function(i, t, e) {
2127
- t = Ti(t);
2189
+ t = Mi(t);
2128
2190
  var r = i.pointToPixel(t.getNorthEast()), s = i.pointToPixel(t.getSouthWest());
2129
2191
  r.x += e, r.y -= e, s.x -= e, s.y += e;
2130
2192
  var n = i.pixelToPoint(r), a = i.pixelToPoint(s);
2131
2193
  return new BMap.Bounds(a, n);
2132
- }, Ti = function(i) {
2133
- var t = xe(i.getNorthEast().lng, -180, 180), e = xe(i.getSouthWest().lng, -180, 180), r = xe(i.getNorthEast().lat, -74, 74), s = xe(i.getSouthWest().lat, -74, 74);
2194
+ }, Mi = function(i) {
2195
+ var t = Pe(i.getNorthEast().lng, -180, 180), e = Pe(i.getSouthWest().lng, -180, 180), r = Pe(i.getNorthEast().lat, -74, 74), s = Pe(i.getSouthWest().lat, -74, 74);
2134
2196
  return new BMap.Bounds(new BMap.Point(e, s), new BMap.Point(t, r));
2135
- }, xe = function(i, t, e) {
2197
+ }, Pe = function(i, t, e) {
2136
2198
  return t && (i = Math.max(i, t)), e && (i = Math.min(i, e)), i;
2137
2199
  }, vr = function(i) {
2138
2200
  return Object.prototype.toString.call(i) === "[object Array]";
@@ -2205,7 +2267,7 @@ M.prototype._addToClosestCluster = function(i) {
2205
2267
  if (e && e.isMarkerInClusterBounds(i))
2206
2268
  e.addMarker(i);
2207
2269
  else {
2208
- var s = new z(this);
2270
+ var s = new N(this);
2209
2271
  s.addMarker(i), this._clusters.push(s);
2210
2272
  }
2211
2273
  };
@@ -2300,9 +2362,9 @@ M.prototype.setTextCalculator = function(i) {
2300
2362
  M.prototype.setStylesIndexCalculator = function(i) {
2301
2363
  this._stylesIndexCalculator = i;
2302
2364
  };
2303
- function z(i) {
2365
+ function N(i) {
2304
2366
  var t = this;
2305
- 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 Wt(this._center, this._markers.length, {
2367
+ 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 Ht(this._center, this._markers.length, {
2306
2368
  styles: this._markerClusterer.getStyles(),
2307
2369
  zIndex: i._zIndex
2308
2370
  }), this._clusterMarker.getStyleByText = function(e, r) {
@@ -2310,12 +2372,12 @@ function z(i) {
2310
2372
  var s = t._markerClusterer._stylesIndexCalculator(t._markers, r.length);
2311
2373
  return r[s];
2312
2374
  }
2313
- return Wt.prototype.getStyleByText.call(this, e, r);
2375
+ return Ht.prototype.getStyleByText.call(this, e, r);
2314
2376
  }, this._clusterMarker.addEventListener && this._clusterMarker.addEventListener("click", function(e) {
2315
2377
  t._map.setViewport(t.getBounds());
2316
2378
  });
2317
2379
  }
2318
- z.prototype.addMarker = function(i) {
2380
+ N.prototype.addMarker = function(i) {
2319
2381
  if (this.isMarkerInCluster(i))
2320
2382
  return !1;
2321
2383
  if (!this._center)
@@ -2326,7 +2388,7 @@ z.prototype.addMarker = function(i) {
2326
2388
  }
2327
2389
  return i.isInCluster = !0, this._markers.push(i), !0;
2328
2390
  };
2329
- z.prototype.render = function() {
2391
+ N.prototype.render = function() {
2330
2392
  var i = this._markers.length;
2331
2393
  if (i < this._minClusterSize)
2332
2394
  for (var t = 0; t < i; t++)
@@ -2334,7 +2396,7 @@ z.prototype.render = function() {
2334
2396
  else
2335
2397
  this._map.addOverlay(this._clusterMarker), this._isReal = !0, this.updateClusterMarker();
2336
2398
  };
2337
- z.prototype.isMarkerInCluster = function(i) {
2399
+ N.prototype.isMarkerInCluster = function(i) {
2338
2400
  if (this._markers.indexOf)
2339
2401
  return this._markers.indexOf(i) != -1;
2340
2402
  for (var t = 0, e; e = this._markers[t]; t++)
@@ -2342,17 +2404,17 @@ z.prototype.isMarkerInCluster = function(i) {
2342
2404
  return !0;
2343
2405
  return !1;
2344
2406
  };
2345
- z.prototype.isMarkerInClusterBounds = function(i) {
2407
+ N.prototype.isMarkerInClusterBounds = function(i) {
2346
2408
  return this._gridBounds.containsPoint(i.getPosition());
2347
2409
  };
2348
- z.prototype.isReal = function(i) {
2410
+ N.prototype.isReal = function(i) {
2349
2411
  return this._isReal;
2350
2412
  };
2351
- z.prototype.updateGridBounds = function() {
2413
+ N.prototype.updateGridBounds = function() {
2352
2414
  var i = new BMap.Bounds(this._center, this._center);
2353
2415
  this._gridBounds = yr(this._map, i, this._markerClusterer.getGridSize());
2354
2416
  };
2355
- z.prototype.updateClusterMarker = function() {
2417
+ N.prototype.updateClusterMarker = function() {
2356
2418
  if (this._map.getZoom() > this._markerClusterer.getMaxZoom()) {
2357
2419
  this._clusterMarker && this._map.removeOverlay(this._clusterMarker);
2358
2420
  for (var i = 0, t; t = this._markers[i]; i++)
@@ -2365,22 +2427,22 @@ z.prototype.updateClusterMarker = function() {
2365
2427
  }
2366
2428
  this._clusterMarker.setPosition(this._center), this._clusterMarker.setText(this._markerClusterer._textCalculator(this._markers));
2367
2429
  };
2368
- z.prototype.remove = function() {
2430
+ N.prototype.remove = function() {
2369
2431
  for (var i = 0, t; t = this._markers[i]; i++) {
2370
2432
  var e = this._markers[i].getLabel();
2371
2433
  this._markers[i].getMap() && this._map.removeOverlay(this._markers[i]), this._markers[i].setLabel(e);
2372
2434
  }
2373
2435
  this._map.removeOverlay(this._clusterMarker), this._markers.length = 0, delete this._markers;
2374
2436
  };
2375
- z.prototype.getBounds = function() {
2437
+ N.prototype.getBounds = function() {
2376
2438
  for (var i = new BMap.Bounds(this._center, this._center), t = 0, e; e = this._markers[t]; t++)
2377
2439
  i.extend(e.getPosition());
2378
2440
  return i;
2379
2441
  };
2380
- z.prototype.getCenter = function() {
2442
+ N.prototype.getCenter = function() {
2381
2443
  return this._center;
2382
2444
  };
2383
- var Re;
2445
+ var $e;
2384
2446
  ((i) => {
2385
2447
  function t(r) {
2386
2448
  return {
@@ -2405,10 +2467,9 @@ var Re;
2405
2467
  };
2406
2468
  }
2407
2469
  i.toGoogle = e;
2408
- })(Re || (Re = {}));
2470
+ })($e || ($e = {}));
2409
2471
  class br {
2410
2472
  constructor(t) {
2411
- c(this, "inner");
2412
2473
  this.map = t;
2413
2474
  }
2414
2475
  /** baidu/google 拥有相同的函数名 */
@@ -2432,47 +2493,51 @@ class br {
2432
2493
  return this.inner.removeMarkers(t.map((e) => e.innerOverlay));
2433
2494
  }
2434
2495
  }
2435
- class Mi extends br {
2436
- constructor(t, e) {
2437
- var s;
2438
- super(t), this.inner = new M(t.innerMap, {
2496
+ class Oi extends br {
2497
+ constructor(e, r) {
2498
+ var n;
2499
+ super(e);
2500
+ c(this, "inner");
2501
+ this.inner = new M(e.innerMap, {
2439
2502
  // baidu的构造器中的markers, 会触发重绘, 会导致使用旧的calculator计算cluster
2440
2503
  // markers: options.markers?.map(it => (it as BaiduMarker).innerOverlay),
2441
- gridSize: e.gridSize,
2442
- maxZoom: e.maxZoom,
2443
- minClusterSize: e.minClusterSize,
2444
- isAverageCenter: e.averageCenter,
2445
- styles: (s = e.styles) == null ? void 0 : s.map((n) => Re.toBaidu(n)),
2446
- zIndex: e.zIndex
2504
+ gridSize: r.gridSize,
2505
+ maxZoom: r.maxZoom,
2506
+ minClusterSize: r.minClusterSize,
2507
+ isAverageCenter: r.averageCenter,
2508
+ styles: (n = r.styles) == null ? void 0 : n.map((a) => $e.toBaidu(a)),
2509
+ zIndex: r.zIndex
2447
2510
  });
2448
- const r = e.stylesIndexCalculator;
2449
- r && this.inner.setStylesIndexCalculator((n, a) => r(n.length, a)), e.markers && this.addMarkers(e.markers);
2511
+ const s = r.stylesIndexCalculator;
2512
+ s && this.inner.setStylesIndexCalculator((a, h) => s(a.length, h)), r.markers && this.addMarkers(r.markers);
2450
2513
  }
2451
2514
  recreate() {
2452
2515
  this.inner._redraw();
2453
2516
  }
2454
2517
  }
2455
- class Oi extends br {
2456
- constructor(t, e) {
2457
- var s, n;
2458
- super(t), this.inner = new vi(
2459
- t.innerMap,
2518
+ class Ci extends br {
2519
+ constructor(e, r) {
2520
+ var n, a;
2521
+ super(e);
2522
+ c(this, "inner");
2523
+ this.inner = new _i(
2524
+ e.innerMap,
2460
2525
  // google的构造器中的markers,不会触发重绘, 第一次绘制通过监听地图的'idle'事件触发, 可以直接设置
2461
- (s = e.markers) == null ? void 0 : s.map((a) => a.innerOverlay),
2526
+ (n = r.markers) == null ? void 0 : n.map((h) => h.innerOverlay),
2462
2527
  {
2463
- gridSize: e.gridSize,
2464
- maxZoom: e.maxZoom,
2465
- minimumClusterSize: e.minClusterSize,
2466
- averageCenter: e.averageCenter,
2467
- styles: (n = e.styles) == null ? void 0 : n.map((a) => Re.toGoogle(a)),
2468
- zIndex: e.zIndex
2528
+ gridSize: r.gridSize,
2529
+ maxZoom: r.maxZoom,
2530
+ minimumClusterSize: r.minClusterSize,
2531
+ averageCenter: r.averageCenter,
2532
+ styles: (a = r.styles) == null ? void 0 : a.map((h) => $e.toGoogle(h)),
2533
+ zIndex: r.zIndex
2469
2534
  }
2470
2535
  );
2471
- const r = e.stylesIndexCalculator;
2472
- r && this.inner.setCalculator((a, h) => ({
2473
- text: a.length,
2536
+ const s = r.stylesIndexCalculator;
2537
+ s && this.inner.setCalculator((h, o) => ({
2538
+ text: h.length,
2474
2539
  // google内部, 取index时, 会`-1`...故我们这里`+1`, 抵消掉它
2475
- index: r(a.length, h) + 1
2540
+ index: s(h.length, o) + 1
2476
2541
  }));
2477
2542
  }
2478
2543
  recreate() {
@@ -2483,7 +2548,7 @@ class Tr {
2483
2548
  constructor() {
2484
2549
  }
2485
2550
  }
2486
- class Ci extends Tr {
2551
+ class wi extends Tr {
2487
2552
  constructor(e, r) {
2488
2553
  super();
2489
2554
  c(this, "inner");
@@ -2529,7 +2594,7 @@ class Ci extends Tr {
2529
2594
  });
2530
2595
  }
2531
2596
  }
2532
- class wi extends Tr {
2597
+ class Ei extends Tr {
2533
2598
  constructor(e, r) {
2534
2599
  super();
2535
2600
  c(this, "searchRequestMap", /* @__PURE__ */ new Map());
@@ -2561,7 +2626,7 @@ class wi extends Tr {
2561
2626
  return new Promise((s, n) => {
2562
2627
  const a = new BMap.LocalSearch(e ?? this.map.innerMap, {
2563
2628
  onSearchComplete: (h) => {
2564
- Array.isArray(h) && at("当前只支持一次搜索一条数据");
2629
+ Array.isArray(h) && ct("当前只支持一次搜索一条数据");
2565
2630
  const o = a.getStatus();
2566
2631
  switch (o) {
2567
2632
  case BMAP_STATUS_SUCCESS: {
@@ -2610,7 +2675,7 @@ class Mr {
2610
2675
  return this.onData && C("setSearchListener只能调用一次"), this.onData = t, this.onError = e, ve;
2611
2676
  }
2612
2677
  }
2613
- class Ei extends Mr {
2678
+ class Li extends Mr {
2614
2679
  constructor(e, r) {
2615
2680
  super(e, r.input);
2616
2681
  c(this, "searchBox");
@@ -2626,7 +2691,7 @@ class Ei extends Mr {
2626
2691
  this.input.value && (google.maps.event.trigger(this.input, "focus", {}), google.maps.event.trigger(this.input, "keydown", { keyCode: 13 }));
2627
2692
  }
2628
2693
  }
2629
- class Li extends Mr {
2694
+ class Pi extends Mr {
2630
2695
  constructor(e, r) {
2631
2696
  super(e, r.input);
2632
2697
  c(this, "autocomplete");
@@ -2646,7 +2711,7 @@ class Li extends Mr {
2646
2711
  }
2647
2712
  }
2648
2713
  var xi = /* @__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))(xi || {});
2649
- class ft {
2714
+ class _t {
2650
2715
  constructor(t) {
2651
2716
  c(this, "latestInfoWindow");
2652
2717
  /** 使用{@link setEventTargetDelegate}初始化 */
@@ -2699,7 +2764,7 @@ class ft {
2699
2764
  * Copyright (c) 2014-2017, Jon Schlinkert.
2700
2765
  * Released under the MIT License.
2701
2766
  */
2702
- function Pi(i) {
2767
+ function ki(i) {
2703
2768
  return i != null && typeof i == "object" && Array.isArray(i) === !1;
2704
2769
  }
2705
2770
  /*!
@@ -2708,12 +2773,12 @@ function Pi(i) {
2708
2773
  * Copyright (c) 2014-2017, Jon Schlinkert.
2709
2774
  * Released under the MIT License.
2710
2775
  */
2711
- function Ht(i) {
2712
- return Pi(i) === !0 && Object.prototype.toString.call(i) === "[object Object]";
2776
+ function jt(i) {
2777
+ return ki(i) === !0 && Object.prototype.toString.call(i) === "[object Object]";
2713
2778
  }
2714
2779
  function Or(i) {
2715
2780
  var t, e;
2716
- return !(Ht(i) === !1 || (t = i.constructor, typeof t != "function") || (e = t.prototype, Ht(e) === !1) || e.hasOwnProperty("isPrototypeOf") === !1);
2781
+ return !(jt(i) === !1 || (t = i.constructor, typeof t != "function") || (e = t.prototype, jt(e) === !1) || e.hasOwnProperty("isPrototypeOf") === !1);
2717
2782
  }
2718
2783
  var be;
2719
2784
  ((i) => {
@@ -2736,21 +2801,21 @@ var be;
2736
2801
  }
2737
2802
  i.deleteUndefinedPropertyOnPlainObjectDeeply = s;
2738
2803
  function n(h, ...o) {
2739
- const l = jt(o), d = {};
2804
+ const l = Vt(o), d = {};
2740
2805
  for (const u in h)
2741
2806
  l(u) || (d[u] = h[u]);
2742
2807
  return d;
2743
2808
  }
2744
2809
  i.omit = n;
2745
2810
  function a(h, ...o) {
2746
- const l = jt(o), d = {};
2811
+ const l = Vt(o), d = {};
2747
2812
  for (const u in h)
2748
2813
  l(u) && (d[u] = h[u]);
2749
2814
  return d;
2750
2815
  }
2751
2816
  i.pick = a;
2752
2817
  })(be || (be = {}));
2753
- function jt(i) {
2818
+ function Vt(i) {
2754
2819
  if (i.length <= 4)
2755
2820
  return i.includes.bind(i);
2756
2821
  {
@@ -2759,8 +2824,8 @@ function jt(i) {
2759
2824
  }
2760
2825
  }
2761
2826
  be.toJsonSafely;
2762
- const ki = ["single", "multi"];
2763
- var j = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "greedy", i.cooperative = "cooperative", i))(j || {}), it;
2827
+ const Bi = ["single", "multi"];
2828
+ var j = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "greedy", i.cooperative = "cooperative", i))(j || {}), ot;
2764
2829
  ((i) => {
2765
2830
  function t(e) {
2766
2831
  be.deleteUndefinedPropertyOnPlainObjectDeeply(e);
@@ -2770,7 +2835,7 @@ var j = /* @__PURE__ */ ((i) => (i.auto = "auto", i.none = "none", i.greedy = "g
2770
2835
  });
2771
2836
  }
2772
2837
  i.create = t;
2773
- })(it || (it = {}));
2838
+ })(ot || (ot = {}));
2774
2839
  class Cr {
2775
2840
  constructor(t, e, r) {
2776
2841
  c(this, "_delegate");
@@ -2789,7 +2854,7 @@ class Cr {
2789
2854
  this.map.removeOverlay(this);
2790
2855
  }
2791
2856
  }
2792
- class yt extends Cr {
2857
+ class bt extends Cr {
2793
2858
  constructor(t, e, r) {
2794
2859
  super(t, e, r);
2795
2860
  }
@@ -2803,7 +2868,7 @@ class yt extends Cr {
2803
2868
  this.innerOverlay.setVisible(t);
2804
2869
  }
2805
2870
  }
2806
- class je extends Cr {
2871
+ class Ue extends Cr {
2807
2872
  constructor(t, e, r) {
2808
2873
  super(t, e, r);
2809
2874
  }
@@ -2825,7 +2890,7 @@ class je extends Cr {
2825
2890
  return t !== void 0 && (t || this.setVisible(!1)), this;
2826
2891
  }
2827
2892
  }
2828
- const Ge = class extends je {
2893
+ const He = class extends Ue {
2829
2894
  constructor(t, e, r, s) {
2830
2895
  super(t, e, r), this.state = s;
2831
2896
  }
@@ -2839,7 +2904,7 @@ const Ge = class extends je {
2839
2904
  this.innerOverlay.setStrokeColor(t);
2840
2905
  }
2841
2906
  setStrokeOpacity(t) {
2842
- this.innerOverlay.setStrokeOpacity(t + Ge.OPACITY_DELTA);
2907
+ this.innerOverlay.setStrokeOpacity(t + He.OPACITY_DELTA);
2843
2908
  }
2844
2909
  setStrokeWeight(t) {
2845
2910
  this.innerOverlay.setStrokeWeight(t);
@@ -2848,18 +2913,18 @@ const Ge = class extends je {
2848
2913
  this.innerOverlay.setFillColor(t);
2849
2914
  }
2850
2915
  setFillOpacity(t) {
2851
- this.innerOverlay.setFillOpacity(t + Ge.OPACITY_DELTA);
2916
+ this.innerOverlay.setFillOpacity(t + He.OPACITY_DELTA);
2852
2917
  }
2853
2918
  };
2854
- let k = Ge;
2919
+ let I = He;
2855
2920
  /**
2856
2921
  * baidu地图的透明度属性有如下问题:
2857
2922
  * - 在透明度为0时, 无法隐藏掉颜色
2858
2923
  * - 透明度为0.7和0.8时, 在maintain的发布模式下, polyline的线条会不可见 (原因未知, 在tg-map中无法复现)
2859
2924
  * 故统一加个0.001, 规避这些问题...
2860
2925
  */
2861
- c(k, "OPACITY_DELTA", 1e-3);
2862
- class Ve extends yt {
2926
+ c(I, "OPACITY_DELTA", 1e-3);
2927
+ class Ye extends bt {
2863
2928
  isEditable() {
2864
2929
  return this.innerOverlay.getEditable();
2865
2930
  }
@@ -2882,7 +2947,7 @@ class Ve extends yt {
2882
2947
  this.innerOverlay.setOptions({ fillOpacity: t });
2883
2948
  }
2884
2949
  }
2885
- class vt extends k {
2950
+ class Tt extends I {
2886
2951
  constructor() {
2887
2952
  super(...arguments);
2888
2953
  c(this, "prevCenter");
@@ -2909,17 +2974,17 @@ class vt extends k {
2909
2974
  enableEditing: !1,
2910
2975
  // options.editable,
2911
2976
  strokeColor: e.strokeColor,
2912
- strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + k.OPACITY_DELTA : void 0,
2977
+ strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + I.OPACITY_DELTA : void 0,
2913
2978
  strokeWeight: e.strokeWeight,
2914
2979
  fillColor: e.fillColor,
2915
- fillOpacity: e.fillOpacity != null ? e.fillOpacity + k.OPACITY_DELTA : void 0
2916
- }), n = new vt(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
2980
+ fillOpacity: e.fillOpacity != null ? e.fillOpacity + I.OPACITY_DELTA : void 0
2981
+ }), n = new Tt(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
2917
2982
  return n.state.editable && setTimeout(() => {
2918
2983
  n.state.editable && s.enableEditing();
2919
2984
  }, 0), n;
2920
2985
  }
2921
2986
  createDelegate() {
2922
- return this.eventHubDelegate = new He(super.createDelegate(), {
2987
+ return this.eventHubDelegate = new Fe(super.createDelegate(), {
2923
2988
  types: ["radius-changed", "center-changed"],
2924
2989
  onListen: (e) => {
2925
2990
  e === "radius-changed" ? (this.prevRadius = this.innerOverlay.getRadius(), this.innerOverlay.addEventListener("lineupdate", this.onRadiusChanged)) : (this.prevCenter = this.innerOverlay.getCenter(), this.innerOverlay.addEventListener("lineupdate", this.onCenterChanged));
@@ -2944,7 +3009,7 @@ class vt extends k {
2944
3009
  return this.innerOverlay.getRadius();
2945
3010
  }
2946
3011
  }
2947
- class _t extends Ve {
3012
+ class Mt extends Ye {
2948
3013
  static create(t) {
2949
3014
  const e = this.coordType, r = new google.maps.Circle({
2950
3015
  center: t.center.toGoogle(e),
@@ -2958,7 +3023,7 @@ class _t extends Ve {
2958
3023
  fillOpacity: t.fillOpacity,
2959
3024
  visible: t.visible
2960
3025
  });
2961
- return new _t(r, e, this);
3026
+ return new Mt(r, e, this);
2962
3027
  }
2963
3028
  setCenter(t) {
2964
3029
  this.coordType = this.map.coordType, this.innerOverlay.setCenter(t.toGoogle(this.coordType));
@@ -2976,7 +3041,7 @@ class _t extends Ve {
2976
3041
  function wr() {
2977
3042
  BMap.OverlayV3 || (BMap.OverlayV3 = BMap.Overlay);
2978
3043
  }
2979
- const Vt = {
3044
+ const Ft = {
2980
3045
  /** {@link BMap.Point.equals} 无效, 故需要自己写一个 */
2981
3046
  equals(i, t) {
2982
3047
  return i.lat === t.lat && i.lng === t.lng;
@@ -2986,11 +3051,11 @@ var X;
2986
3051
  ((i) => {
2987
3052
  i.ZERO = { x: 0, y: 0 };
2988
3053
  })(X || (X = {}));
2989
- let Ke;
2990
- function Bi(i, t, e, r, s, n) {
2991
- return Ke || (Ke = Ii()), new Ke(i, t, e, r, s, n);
3054
+ let Qe;
3055
+ function Ii(i, t, e, r, s, n) {
3056
+ return Qe || (Qe = Si()), new Qe(i, t, e, r, s, n);
2992
3057
  }
2993
- function Ii() {
3058
+ function Si() {
2994
3059
  wr();
2995
3060
  const i = new BMap.Point(0, 0);
2996
3061
  return class extends BMap.OverlayV3 {
@@ -3057,7 +3122,7 @@ function Ii() {
3057
3122
  }
3058
3123
  };
3059
3124
  }
3060
- class bt {
3125
+ class Ot {
3061
3126
  constructor(t) {
3062
3127
  this.delegate = t, this.delegate.setTarget(this);
3063
3128
  }
@@ -3068,7 +3133,7 @@ class bt {
3068
3133
  this.delegate.removeEventListener(t, e);
3069
3134
  }
3070
3135
  }
3071
- class Tt extends bt {
3136
+ class Ct extends Ot {
3072
3137
  constructor(t, e, r) {
3073
3138
  super(new ae(t, e)), this.inner = t, this.map = e, this.state = r;
3074
3139
  }
@@ -3078,7 +3143,7 @@ class Tt extends bt {
3078
3143
  offset: t.offset && new BMap.Size(t.offset.x, t.offset.y),
3079
3144
  enableAutoPan: !t.disableAutoPan
3080
3145
  });
3081
- return new Tt(r, this, { position: e });
3146
+ return new Ct(r, this, { position: e });
3082
3147
  }
3083
3148
  isOpen() {
3084
3149
  return this.inner.isOpen();
@@ -3097,7 +3162,7 @@ class Tt extends bt {
3097
3162
  this.state.position = t, this.inner.isOpen() && this.open();
3098
3163
  }
3099
3164
  }
3100
- class Mt extends bt {
3165
+ class wt extends Ot {
3101
3166
  constructor(e, r) {
3102
3167
  super(new re(e, r));
3103
3168
  c(this, "eventHub", new or());
@@ -3117,7 +3182,7 @@ class Mt extends bt {
3117
3182
  position: r.toGoogle(this.coordType),
3118
3183
  disableAutoPan: e.disableAutoPan
3119
3184
  });
3120
- return new Mt(s, this);
3185
+ return new wt(s, this);
3121
3186
  }
3122
3187
  isOpen() {
3123
3188
  return this.isOpened;
@@ -3155,13 +3220,13 @@ class Mt extends bt {
3155
3220
  this.inner.setPosition(e.toGoogle(this.map.coordType));
3156
3221
  }
3157
3222
  }
3158
- class Ot extends je {
3223
+ class Et extends Ue {
3159
3224
  constructor(t, e, r) {
3160
3225
  super(t, e, r), this.baiduMap = r;
3161
3226
  }
3162
3227
  static create(t) {
3163
3228
  var s;
3164
- const e = this.coordType, r = Bi(
3229
+ const e = this.coordType, r = Ii(
3165
3230
  t.content,
3166
3231
  (s = t.position) == null ? void 0 : s.toBaidu(e),
3167
3232
  t.offset,
@@ -3169,7 +3234,7 @@ class Ot extends je {
3169
3234
  t.maxWidth,
3170
3235
  t.borderClass
3171
3236
  );
3172
- return new Ot(r, e, this);
3237
+ return new Et(r, e, this);
3173
3238
  }
3174
3239
  open(t) {
3175
3240
  this.innerOverlay.open(this.baiduMap.innerMap, t == null ? void 0 : t.innerOverlay);
@@ -3190,7 +3255,7 @@ class Ot extends je {
3190
3255
  this.innerOverlay.setZIndex(t);
3191
3256
  }
3192
3257
  }
3193
- class Ct extends bt {
3258
+ class Lt extends Ot {
3194
3259
  constructor(t, e, r) {
3195
3260
  super(new re(t, r)), this.inner = t, this.coordType = e, this.map = r;
3196
3261
  }
@@ -3207,7 +3272,7 @@ class Ct extends bt {
3207
3272
  var h;
3208
3273
  const a = (h = t.content.parentElement) == null ? void 0 : h.parentElement;
3209
3274
  a && a.className.includes("gm-style-iw-c") && !a.className.includes(s) && (a.className += ` ${s}`);
3210
- }), new Ct(r, e, this);
3275
+ }), new Lt(r, e, this);
3211
3276
  }
3212
3277
  open(t) {
3213
3278
  this.inner.open(this.map.innerMap, t == null ? void 0 : t.innerOverlay);
@@ -3253,7 +3318,7 @@ var Te;
3253
3318
  }
3254
3319
  i.pascal2kebab = r;
3255
3320
  })(Te || (Te = {}));
3256
- const Si = {
3321
+ const Ai = {
3257
3322
  /** @see https://nodejs.org/docs/v10.3.0/api/path.html#path_path_basename_path_ext */
3258
3323
  basename(i, t) {
3259
3324
  const e = i.endsWith("/") ? i.slice(0, -1) : i, r = e.lastIndexOf("/"), s = r >= 0 ? e.substring(r + 1) : e;
@@ -3273,7 +3338,7 @@ var Me = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overla
3273
3338
  case "map":
3274
3339
  return s.mapPane;
3275
3340
  default:
3276
- Qe(r);
3341
+ rt(r);
3277
3342
  }
3278
3343
  }
3279
3344
  i.toGoogle = t;
@@ -3288,12 +3353,12 @@ var Me = /* @__PURE__ */ ((i) => (i.map = "map", i.overlay = "overlay", i.overla
3288
3353
  case "map":
3289
3354
  return s.mapPane;
3290
3355
  default:
3291
- Qe(r);
3356
+ rt(r);
3292
3357
  }
3293
3358
  }
3294
3359
  i.toBaidu = e;
3295
3360
  })(Oe || (Oe = {}));
3296
- class Ai {
3361
+ class Ri {
3297
3362
  constructor(t, e) {
3298
3363
  c(this, "baidu");
3299
3364
  c(this, "google");
@@ -3366,11 +3431,11 @@ class Ai {
3366
3431
  return this.google;
3367
3432
  }
3368
3433
  }
3369
- let Xe;
3370
- function Ri(i, t, e, r, s) {
3371
- return Xe || (Xe = $i()), new Xe(i, t, e, r, s);
3434
+ let et;
3435
+ function $i(i, t, e, r, s) {
3436
+ return et || (et = zi()), new et(i, t, e, r, s);
3372
3437
  }
3373
- function $i() {
3438
+ function zi() {
3374
3439
  return class extends google.maps.OverlayView {
3375
3440
  constructor(e, r, s, n = Me.overlayMouseTarget, a) {
3376
3441
  super();
@@ -3439,7 +3504,7 @@ var de;
3439
3504
  }
3440
3505
  i.toElement = e;
3441
3506
  })(de || (de = {}));
3442
- class wt extends je {
3507
+ class Pt extends Ue {
3443
3508
  constructor(e, r, s, n) {
3444
3509
  super(e, r, s);
3445
3510
  c(this, "icon");
@@ -3459,7 +3524,7 @@ class wt extends je {
3459
3524
  padding: "0px",
3460
3525
  backgroundColor: "unset"
3461
3526
  });
3462
- const n = new wt(s, r, this, e.content);
3527
+ const n = new Pt(s, r, this, e.content);
3463
3528
  return s.__label__ = n, n;
3464
3529
  }
3465
3530
  setContentInternal(e, r = !1) {
@@ -3539,17 +3604,17 @@ class wt extends je {
3539
3604
  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;
3540
3605
  }
3541
3606
  }
3542
- class Et extends yt {
3607
+ class xt extends bt {
3543
3608
  static create(t) {
3544
3609
  var s;
3545
- const e = this.coordType, r = Ri(
3610
+ const e = this.coordType, r = $i(
3546
3611
  de.toElement(t.content),
3547
3612
  (s = t.position) == null ? void 0 : s.toGoogle(e),
3548
3613
  t.offset,
3549
3614
  t.mapPane,
3550
3615
  t.zIndex
3551
3616
  );
3552
- return new Et(r, e, this);
3617
+ return new xt(r, e, this);
3553
3618
  }
3554
3619
  setZIndex(t) {
3555
3620
  this.innerOverlay.setZIndex(t);
@@ -3571,9 +3636,9 @@ class Et extends yt {
3571
3636
  this.innerOverlay.setOffset(t);
3572
3637
  }
3573
3638
  }
3574
- const $e = {
3575
- toGoogle: (i) => "url" in i ? De.toGoogle(i) : ze.toGoogle(i),
3576
- toBaidu: (i) => "url" in i ? De.toBaidu(i) : ze.toBaidu(i)
3639
+ const ze = {
3640
+ toGoogle: (i) => "url" in i ? De.toGoogle(i) : Ne.toGoogle(i),
3641
+ toBaidu: (i) => "url" in i ? De.toBaidu(i) : Ne.toBaidu(i)
3577
3642
  };
3578
3643
  var De;
3579
3644
  ((i) => {
@@ -3600,7 +3665,7 @@ var De;
3600
3665
  }
3601
3666
  i.toBaidu = e;
3602
3667
  })(De || (De = {}));
3603
- var ze;
3668
+ var Ne;
3604
3669
  ((i) => {
3605
3670
  function t(r) {
3606
3671
  return {
@@ -3631,38 +3696,38 @@ var ze;
3631
3696
  return s.__icon__ = r, s;
3632
3697
  }
3633
3698
  i.toBaidu = e;
3634
- })(ze || (ze = {}));
3635
- const Vs = {
3699
+ })(Ne || (Ne = {}));
3700
+ const Fs = {
3636
3701
  CIRCLE: { baidu: () => BMap_Symbol_SHAPE_CIRCLE, google: () => google.maps.SymbolPath.CIRCLE },
3637
3702
  BACKWARD_CLOSED_ARROW: { baidu: () => BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW, google: () => google.maps.SymbolPath.BACKWARD_CLOSED_ARROW },
3638
3703
  BACKWARD_OPEN_ARROW: { baidu: () => BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW, google: () => google.maps.SymbolPath.BACKWARD_OPEN_ARROW },
3639
3704
  FORWARD_CLOSED_ARROW: { baidu: () => BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW, google: () => google.maps.SymbolPath.FORWARD_CLOSED_ARROW },
3640
3705
  FORWARD_OPEN_ARROW: { baidu: () => BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW, google: () => google.maps.SymbolPath.FORWARD_OPEN_ARROW }
3641
3706
  };
3642
- class Ce extends je {
3707
+ class Ce extends Ue {
3643
3708
  constructor(t, e, r, s) {
3644
3709
  super(t, e, r), this.state = s;
3645
3710
  }
3646
3711
  static create(t) {
3647
3712
  const e = this.coordType, r = t.icon, s = {
3648
3713
  title: t.title,
3649
- icon: r && $e.toBaidu(r),
3714
+ icon: r && ze.toBaidu(r),
3650
3715
  enableClicking: t.clickable,
3651
3716
  enableDragging: t.draggable,
3652
3717
  // baidu的raiseOnDrag属性, 默认为false, 而我们的options.crossOnDrag默认为true, 故这里需要转换下
3653
3718
  raiseOnDrag: t.crossOnDrag === void 0 ? !0 : t.crossOnDrag,
3654
3719
  draggingCursor: t.cursor
3655
- }, n = new BMap.Marker(t.position.toBaidu(e), s);
3720
+ }, n = new BMap.Marker(t.position.toBaidu(e, t.normalizePositionForBaidu), s);
3656
3721
  t.zIndex !== void 0 && n.setZIndex(t.zIndex);
3657
3722
  const a = t.clickable === void 0 ? !0 : t.clickable, h = !!t.draggable;
3658
- return new Ce(n, e, this, { clickable: a, draggable: h, zIndex: t.zIndex }).visibleOptionInternal(t.visible);
3723
+ return new Ce(n, e, this, { clickable: a, draggable: h, zIndex: t.zIndex, normalize: t.normalizePositionForBaidu }).visibleOptionInternal(t.visible);
3659
3724
  }
3660
3725
  getPosition() {
3661
3726
  return y.fromBaidu(this.innerOverlay.getPosition(), this.coordType);
3662
3727
  }
3663
3728
  setPosition(t) {
3664
3729
  var e;
3665
- this.coordType = this.map.coordType, this.innerOverlay.setPosition(t.toBaidu(this.coordType)), (e = this.innerOverlay.__info_box__) == null || e.onMarkerPositionChanged();
3730
+ this.coordType = this.map.coordType, this.innerOverlay.setPosition(t.toBaidu(this.coordType, this.state.normalize)), (e = this.innerOverlay.__info_box__) == null || e.onMarkerPositionChanged();
3666
3731
  }
3667
3732
  setTitle(t) {
3668
3733
  this.innerOverlay.setTitle(t);
@@ -3671,7 +3736,7 @@ class Ce extends je {
3671
3736
  return this.innerOverlay.getTitle();
3672
3737
  }
3673
3738
  setIcon(t) {
3674
- const e = $e.toBaidu(t);
3739
+ const e = ze.toBaidu(t);
3675
3740
  this.innerOverlay.setIcon(e);
3676
3741
  const r = this.getLabel();
3677
3742
  r && r.attachIcon(e);
@@ -3706,7 +3771,7 @@ class Ce extends je {
3706
3771
  return (t = this.innerOverlay.getLabel()) == null ? void 0 : t.__label__;
3707
3772
  }
3708
3773
  }
3709
- class Lt extends yt {
3774
+ class kt extends bt {
3710
3775
  constructor() {
3711
3776
  super(...arguments);
3712
3777
  c(this, "label");
@@ -3720,7 +3785,7 @@ class Lt extends yt {
3720
3785
  title: e.title,
3721
3786
  zIndex: e.zIndex,
3722
3787
  visible: e.visible,
3723
- icon: s && $e.toGoogle(s),
3788
+ icon: s && ze.toGoogle(s),
3724
3789
  clickable: e.clickable,
3725
3790
  draggable: e.draggable,
3726
3791
  // google的crossOnDrag和我们的crossOnDrag是匹配的, 不需要转换
@@ -3729,7 +3794,7 @@ class Lt extends yt {
3729
3794
  // InfoWindow相对marker的position的偏移量, 若不指定, 则偏移到marker的icon的上部中央
3730
3795
  anchorPoint: new google.maps.Point(0, 0)
3731
3796
  };
3732
- return new Lt(new google.maps.Marker(n), r, this);
3797
+ return new kt(new google.maps.Marker(n), r, this);
3733
3798
  }
3734
3799
  getPosition() {
3735
3800
  return y.fromGoogle(this.innerOverlay.getPosition(), this.coordType);
@@ -3744,7 +3809,7 @@ class Lt extends yt {
3744
3809
  return this.innerOverlay.getTitle() || "";
3745
3810
  }
3746
3811
  setIcon(e) {
3747
- this.innerOverlay.setIcon($e.toGoogle(e));
3812
+ this.innerOverlay.setIcon(ze.toGoogle(e));
3748
3813
  }
3749
3814
  getIcon() {
3750
3815
  return this.innerOverlay.getIcon();
@@ -3782,7 +3847,7 @@ class Lt extends yt {
3782
3847
  this.label = void 0, this.labelPositionListener = void 0, this.labelVisibleListener = void 0, this.labelMapChangedListener = void 0;
3783
3848
  }
3784
3849
  }
3785
- class xt extends k {
3850
+ class Bt extends I {
3786
3851
  constructor() {
3787
3852
  super(...arguments);
3788
3853
  c(this, "eventHubDelegate");
@@ -3807,7 +3872,7 @@ class xt extends k {
3807
3872
  this.isDoingSetPath = !0, this.innerOverlay.setPath(e), this.isDoingSetPath = !1;
3808
3873
  }
3809
3874
  createDelegate() {
3810
- return this.eventHubDelegate = new He(super.createDelegate(), {
3875
+ return this.eventHubDelegate = new Fe(super.createDelegate(), {
3811
3876
  types: [this.pathEditedEventType],
3812
3877
  onListen: () => {
3813
3878
  this.prevPath = this.innerOverlay.getPath(), this.innerOverlay.addEventListener("lineupdate", this.onLineUpdate);
@@ -3818,7 +3883,7 @@ class xt extends k {
3818
3883
  });
3819
3884
  }
3820
3885
  }
3821
- class Pt extends xt {
3886
+ class It extends Bt {
3822
3887
  constructor() {
3823
3888
  super(...arguments);
3824
3889
  c(this, "pathEditedEventType", "path-edited");
@@ -3828,10 +3893,10 @@ class Pt extends xt {
3828
3893
  enableClicking: e.clickable,
3829
3894
  enableEditing: e.editable,
3830
3895
  strokeColor: e.strokeColor,
3831
- strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + k.OPACITY_DELTA : void 0,
3896
+ strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + I.OPACITY_DELTA : void 0,
3832
3897
  strokeWeight: e.strokeWeight
3833
3898
  });
3834
- return new Pt(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
3899
+ return new It(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
3835
3900
  }
3836
3901
  getPath() {
3837
3902
  return this.innerOverlay.getPath().map((e) => y.fromBaidu(e, this.coordType));
@@ -3840,7 +3905,7 @@ class Pt extends xt {
3840
3905
  this.coordType = this.map.coordType, this.setPathInternal(e.map((r) => r.toBaidu(this.coordType)));
3841
3906
  }
3842
3907
  }
3843
- class kt extends Ve {
3908
+ class St extends Ye {
3844
3909
  constructor() {
3845
3910
  super(...arguments);
3846
3911
  c(this, "pathChangedListeners");
@@ -3856,7 +3921,7 @@ class kt extends Ve {
3856
3921
  strokeWeight: e.strokeWeight,
3857
3922
  visible: e.visible
3858
3923
  });
3859
- return new kt(s, r, this);
3924
+ return new St(s, r, this);
3860
3925
  }
3861
3926
  setupPathChangedListeners() {
3862
3927
  const e = () => {
@@ -3870,7 +3935,7 @@ class kt extends Ve {
3870
3935
  (e = this.pathChangedListeners) == null || e.forEach((r) => r.remove()), this.pathChangedListeners = void 0;
3871
3936
  }
3872
3937
  createDelegate() {
3873
- return this.eventHubDelegate = new He(super.createDelegate(), {
3938
+ return this.eventHubDelegate = new Fe(super.createDelegate(), {
3874
3939
  types: ["path-edited"],
3875
3940
  onListen: () => this.setupPathChangedListeners(),
3876
3941
  onCancel: () => this.clearPathChangedListeners()
@@ -3887,7 +3952,7 @@ class kt extends Ve {
3887
3952
  this.coordType = this.map.coordType, this.innerOverlay.setPath(e.map((s) => s.toGoogle(this.coordType))), (r = this.eventHubDelegate) != null && r.hasListener("path-edited") && this.setupPathChangedListeners();
3888
3953
  }
3889
3954
  }
3890
- class Bt extends xt {
3955
+ class At extends Bt {
3891
3956
  constructor() {
3892
3957
  super(...arguments);
3893
3958
  c(this, "pathEditedEventType", "paths-edited");
@@ -3899,12 +3964,12 @@ class Bt extends xt {
3899
3964
  enableClicking: e.clickable,
3900
3965
  enableEditing: e.editable,
3901
3966
  strokeColor: e.strokeColor,
3902
- strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + k.OPACITY_DELTA : void 0,
3967
+ strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + I.OPACITY_DELTA : void 0,
3903
3968
  strokeWeight: e.strokeWeight,
3904
3969
  fillColor: e.fillColor,
3905
- fillOpacity: e.fillOpacity != null ? e.fillOpacity + k.OPACITY_DELTA : void 0
3970
+ fillOpacity: e.fillOpacity != null ? e.fillOpacity + I.OPACITY_DELTA : void 0
3906
3971
  });
3907
- return new Bt(n, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
3972
+ return new At(n, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
3908
3973
  }
3909
3974
  getPaths() {
3910
3975
  return [this.innerOverlay.getPath().map((e) => y.fromBaidu(e, this.coordType))];
@@ -3913,7 +3978,7 @@ class Bt extends xt {
3913
3978
  e.length > 1 && console.warn("baidu不支持多path, 只会显示paths[0]"), this.coordType = this.map.coordType, this.setPathInternal((e[0] || []).map((r) => r.toBaidu(this.coordType)));
3914
3979
  }
3915
3980
  }
3916
- class It extends Ve {
3981
+ class Rt extends Ye {
3917
3982
  constructor() {
3918
3983
  super(...arguments);
3919
3984
  c(this, "pathChangedListeners");
@@ -3931,7 +3996,7 @@ class It extends Ve {
3931
3996
  fillOpacity: e.fillOpacity,
3932
3997
  visible: e.visible
3933
3998
  });
3934
- return new It(s, r, this);
3999
+ return new Rt(s, r, this);
3935
4000
  }
3936
4001
  setupPathChangedListeners() {
3937
4002
  const e = () => {
@@ -3947,7 +4012,7 @@ class It extends Ve {
3947
4012
  (e = this.pathChangedListeners) == null || e.forEach((r) => r.remove()), this.pathChangedListeners = void 0;
3948
4013
  }
3949
4014
  createDelegate() {
3950
- return this.eventHubDelegate = new He(super.createDelegate(), {
4015
+ return this.eventHubDelegate = new Fe(super.createDelegate(), {
3951
4016
  types: ["paths-edited"],
3952
4017
  onListen: () => this.setupPathChangedListeners(),
3953
4018
  onCancel: () => this.clearPathChangedListeners()
@@ -3967,7 +4032,7 @@ class It extends Ve {
3967
4032
  this.coordType = this.map.coordType, this.innerOverlay.setPaths(e.map((s) => s.map((n) => n.toGoogle(this.coordType)))), (r = this.eventHubDelegate) != null && r.hasListener("paths-edited") && this.setupPathChangedListeners();
3968
4033
  }
3969
4034
  }
3970
- class St extends xt {
4035
+ class $t extends Bt {
3971
4036
  constructor(e, r, s, n) {
3972
4037
  super(e, r, s, n);
3973
4038
  c(this, "pathEditedEventType", "bounds-changed");
@@ -3982,7 +4047,7 @@ class St extends xt {
3982
4047
  if (r.length === 4)
3983
4048
  if (a > r.length) {
3984
4049
  for (let o = 0; o < a; o++)
3985
- if (r[o] == null || !Vt.equals(s[o], r[o])) {
4050
+ if (r[o] == null || !Ft.equals(s[o], r[o])) {
3986
4051
  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];
3987
4052
  let _;
3988
4053
  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, _];
@@ -3990,7 +4055,7 @@ class St extends xt {
3990
4055
  }
3991
4056
  } else if (a === r.length) {
3992
4057
  for (let o = 0; o < a; o++)
3993
- if (!Vt.equals(s[o], r[o])) {
4058
+ if (!Ft.equals(s[o], r[o])) {
3994
4059
  n = [
3995
4060
  s[o],
3996
4061
  s[(o + 2) % 4]
@@ -3999,7 +4064,7 @@ class St extends xt {
3999
4064
  }
4000
4065
  } else
4001
4066
  a < r.length;
4002
- const h = A.fromArray(n.map((o) => y.fromBaidu(o, this.coordType)));
4067
+ const h = R.fromArray(n.map((o) => y.fromBaidu(o, this.coordType)));
4003
4068
  h && (this.isDoingUpdateRectangle = !0, this.innerOverlay.setPath(h.toRectArray().map((o) => o.toBaidu(this.coordType))), this.isDoingUpdateRectangle = !1);
4004
4069
  }, 0);
4005
4070
  });
@@ -4010,15 +4075,15 @@ class St extends xt {
4010
4075
  enableClicking: e.clickable,
4011
4076
  enableEditing: e.editable,
4012
4077
  strokeColor: e.strokeColor,
4013
- strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + k.OPACITY_DELTA : void 0,
4078
+ strokeOpacity: e.strokeOpacity != null ? e.strokeOpacity + I.OPACITY_DELTA : void 0,
4014
4079
  strokeWeight: e.strokeWeight,
4015
4080
  fillColor: e.fillColor,
4016
- fillOpacity: e.fillOpacity != null ? e.fillOpacity + k.OPACITY_DELTA : void 0
4081
+ fillOpacity: e.fillOpacity != null ? e.fillOpacity + I.OPACITY_DELTA : void 0
4017
4082
  });
4018
- return new St(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
4083
+ return new $t(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
4019
4084
  }
4020
4085
  getBounds() {
4021
- return A.fromBaidu(this.innerOverlay.getBounds(), this.coordType);
4086
+ return R.fromBaidu(this.innerOverlay.getBounds(), this.coordType);
4022
4087
  }
4023
4088
  setBounds(e) {
4024
4089
  const r = e.toRectArray();
@@ -4027,7 +4092,7 @@ class St extends xt {
4027
4092
  }) : this.setPathInternal(r.map((s) => s.toBaidu(this.coordType)));
4028
4093
  }
4029
4094
  }
4030
- class At extends Ve {
4095
+ class zt extends Ye {
4031
4096
  static create(t) {
4032
4097
  const e = this.coordType, r = new google.maps.Rectangle({
4033
4098
  bounds: t.bounds.toGoogle(e),
@@ -4040,10 +4105,10 @@ class At extends Ve {
4040
4105
  fillOpacity: t.fillOpacity,
4041
4106
  visible: t.visible
4042
4107
  });
4043
- return new At(r, e, this);
4108
+ return new zt(r, e, this);
4044
4109
  }
4045
4110
  getBounds() {
4046
- return A.fromGoogle(this.innerOverlay.getBounds() ?? J.BOUNDS_ZERO, this.coordType);
4111
+ return R.fromGoogle(this.innerOverlay.getBounds() ?? J.BOUNDS_ZERO, this.coordType);
4047
4112
  }
4048
4113
  setBounds(t) {
4049
4114
  const e = t.toGoogle(this.coordType);
@@ -4051,25 +4116,25 @@ class At extends Ve {
4051
4116
  }
4052
4117
  }
4053
4118
  const ee = 1;
4054
- class Di extends ft {
4119
+ class Di extends _t {
4055
4120
  constructor(e, r) {
4056
4121
  var s;
4057
4122
  super(e);
4058
4123
  c(this, "buildInMapTypeId2BIMT");
4059
4124
  c(this, "baiduMapType2BIMT");
4060
4125
  c(this, "map");
4061
- c(this, "createLabel", wt.create);
4062
- c(this, "createCircle", vt.create);
4063
- c(this, "createPolygon", Bt.create);
4064
- c(this, "createPolyline", Pt.create);
4065
- c(this, "createRectangle", St.create);
4066
- c(this, "createInfoWindow", Tt.create);
4067
- c(this, "createInfoBox", Ot.create);
4126
+ c(this, "createLabel", Pt.create);
4127
+ c(this, "createCircle", Tt.create);
4128
+ c(this, "createPolygon", At.create);
4129
+ c(this, "createPolyline", It.create);
4130
+ c(this, "createRectangle", $t.create);
4131
+ c(this, "createInfoWindow", Ct.create);
4132
+ c(this, "createInfoBox", Et.create);
4068
4133
  c(this, "createMarker", Ce.create);
4069
- c(this, "createMapTypeControl", ct.create);
4070
- c(this, "createZoomControl", pt.create);
4071
- c(this, "createScaleControl", dt.create);
4072
- this.buildInMapTypeId2BIMT = R.BUILD_IN_MAP_TYPES.getValueMap(S.prototype.getId), this.baiduMapType2BIMT = R.BUILD_IN_MAP_TYPES.getValueMap(S.prototype.asBaiduMapType), this.map = new BMap.Map(e, {
4134
+ c(this, "createMapTypeControl", pt.create);
4135
+ c(this, "createZoomControl", ft.create);
4136
+ c(this, "createScaleControl", gt.create);
4137
+ 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, {
4073
4138
  minZoom: r.minZoom && r.minZoom + ee,
4074
4139
  maxZoom: r.maxZoom && r.maxZoom + ee,
4075
4140
  mapType: r.buildInMapTypeId && ((s = this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId)) == null ? void 0 : s.asBaiduMapType()),
@@ -4084,7 +4149,7 @@ class Di extends ft {
4084
4149
  });
4085
4150
  }
4086
4151
  setGestureHandling(e = j.auto) {
4087
- switch (e === j.auto && (e = this.element.parentElement && rt.isScrollable(this.element.parentElement) ? j.cooperative : j.greedy), e) {
4152
+ switch (e === j.auto && (e = this.element.parentElement && nt.isScrollable(this.element.parentElement) ? j.cooperative : j.greedy), e) {
4088
4153
  case j.cooperative:
4089
4154
  this.map.disableScrollWheelZoom(), this.map.enableDragging(), this.map.enableDoubleClickZoom();
4090
4155
  break;
@@ -4183,7 +4248,7 @@ class Di extends ft {
4183
4248
  });
4184
4249
  }
4185
4250
  getBounds() {
4186
- return A.fromBaidu(this.map.getBounds(), this.coordType);
4251
+ return R.fromBaidu(this.map.getBounds(), this.coordType);
4187
4252
  }
4188
4253
  addElementOverlay(e) {
4189
4254
  this.map.addOverlay(e.asBaidu());
@@ -4202,7 +4267,7 @@ class Di extends ft {
4202
4267
  const r = class extends BMap.Control {
4203
4268
  constructor() {
4204
4269
  super(...arguments);
4205
- c(this, "defaultAnchor", $.getBaidu().toValue(e.position));
4270
+ c(this, "defaultAnchor", z.getBaidu().toValue(e.position));
4206
4271
  c(this, "defaultOffset", new BMap.Size(0, 0));
4207
4272
  }
4208
4273
  initialize(n) {
@@ -4217,43 +4282,43 @@ class Di extends ft {
4217
4282
  e.inner && (oe(e.inner instanceof BMap.Control, `control.inner(${e.inner})需要是BMap.Control`), this.map.removeControl(e.inner));
4218
4283
  }
4219
4284
  createMarkerClusterer(e) {
4220
- return new Mi(this, e);
4285
+ return new Oi(this, e);
4221
4286
  }
4222
4287
  createAutocomplete(e) {
4223
- return new yi(this, e);
4288
+ return new vi(this, e);
4224
4289
  }
4225
4290
  createSearchBox(e) {
4226
- return new Li(this, e);
4291
+ return new Pi(this, e);
4227
4292
  }
4228
4293
  createPlacesService(e) {
4229
- return new wi(this, e);
4294
+ return new Ei(this, e);
4230
4295
  }
4231
4296
  createMapUrls(e) {
4232
4297
  return new Ie(e);
4233
4298
  }
4234
4299
  }
4235
- class zi extends ft {
4300
+ class Ni extends _t {
4236
4301
  constructor(e, r) {
4237
4302
  var n;
4238
4303
  super(e);
4239
4304
  c(this, "buildInMapTypeId2BIMT");
4240
4305
  c(this, "googleMapTypeId2BIMT");
4241
4306
  c(this, "map");
4242
- c(this, "createLabel", Et.create);
4243
- c(this, "createCircle", _t.create);
4244
- c(this, "createPolygon", It.create);
4245
- c(this, "createPolyline", kt.create);
4246
- c(this, "createRectangle", At.create);
4247
- c(this, "createInfoWindow", Mt.create);
4248
- c(this, "createInfoBox", Ct.create);
4249
- c(this, "createMarker", Lt.create);
4307
+ c(this, "createLabel", xt.create);
4308
+ c(this, "createCircle", Mt.create);
4309
+ c(this, "createPolygon", Rt.create);
4310
+ c(this, "createPolyline", St.create);
4311
+ c(this, "createRectangle", zt.create);
4312
+ c(this, "createInfoWindow", wt.create);
4313
+ c(this, "createInfoBox", Lt.create);
4314
+ c(this, "createMarker", kt.create);
4250
4315
  c(this, "createMapTypeControl", ke.create);
4251
- c(this, "createZoomControl", gt.create);
4252
- c(this, "createScaleControl", ut.create);
4253
- this.mapOptions = r, this.buildInMapTypeId2BIMT = R.BUILD_IN_MAP_TYPES.getValueMap(S.prototype.getId), this.googleMapTypeId2BIMT = R.BUILD_IN_MAP_TYPES.getValueMap(S.prototype.getGoogleMapTypeId);
4316
+ c(this, "createZoomControl", yt.create);
4317
+ c(this, "createScaleControl", mt.create);
4318
+ this.mapOptions = r, this.buildInMapTypeId2BIMT = $.BUILD_IN_MAP_TYPES.getValueMap(A.prototype.getId), this.googleMapTypeId2BIMT = $.BUILD_IN_MAP_TYPES.getValueMap(A.prototype.getGoogleMapTypeId);
4254
4319
  const s = r.buildInMapTypeId && this.buildInMapTypeId2BIMT.get(r.buildInMapTypeId);
4255
4320
  this.map = new google.maps.Map(e, {
4256
- center: r.center.toGoogle((s ?? R.NORMAL).getGoogleCoordType()),
4321
+ center: r.center.toGoogle((s ?? $.NORMAL).getGoogleCoordType()),
4257
4322
  zoom: r.zoom,
4258
4323
  disableDefaultUI: !0,
4259
4324
  streetViewControl: !0,
@@ -4325,7 +4390,7 @@ class zi extends ft {
4325
4390
  this.map.setMapTypeId(r ?? C("理论上来说不可能为空"));
4326
4391
  }
4327
4392
  setMapType(e) {
4328
- e instanceof S ? this.map.setMapTypeId(e.getGoogleMapTypeId()) : (this.map.mapTypes.set(e.id, e.asGoogleMapType()), this.map.setMapTypeId(e.id));
4393
+ e instanceof A ? this.map.setMapTypeId(e.getGoogleMapTypeId()) : (this.map.mapTypes.set(e.id, e.asGoogleMapType()), this.map.setMapTypeId(e.id));
4329
4394
  }
4330
4395
  getMapType() {
4331
4396
  const e = this.map.getMapTypeId() ?? google.maps.MapTypeId.ROADMAP, r = this.googleMapTypeId2BIMT.get(e);
@@ -4354,7 +4419,7 @@ class zi extends ft {
4354
4419
  }
4355
4420
  getBounds() {
4356
4421
  const e = this.map.getBounds();
4357
- return e ? A.fromGoogle(e, this.coordType) : A.EMPTY;
4422
+ return e ? R.fromGoogle(e, this.coordType) : R.EMPTY;
4358
4423
  }
4359
4424
  addElementOverlay(e) {
4360
4425
  e.asGoogle().setMap(this.map);
@@ -4369,31 +4434,31 @@ class zi extends ft {
4369
4434
  e.innerOverlay.setMap(null);
4370
4435
  }
4371
4436
  addCustomControl(e) {
4372
- e.inner || (e.inner = e.onCreateElement(), this.map.controls[$.getGoogle().toValue(e.position)].push(e.inner));
4437
+ e.inner || (e.inner = e.onCreateElement(), this.map.controls[z.getGoogle().toValue(e.position)].push(e.inner));
4373
4438
  }
4374
4439
  removeCustomControl(e) {
4375
4440
  if (e.inner) {
4376
- const r = this.map.controls[$.getGoogle().toValue(e.position)];
4441
+ const r = this.map.controls[z.getGoogle().toValue(e.position)];
4377
4442
  ce.remove(r, e.inner);
4378
4443
  }
4379
4444
  }
4380
4445
  createMarkerClusterer(e) {
4381
- return new Oi(this, e);
4446
+ return new Ci(this, e);
4382
4447
  }
4383
4448
  createAutocomplete(e) {
4384
- return new fi(this, e);
4449
+ return new yi(this, e);
4385
4450
  }
4386
4451
  createSearchBox(e) {
4387
- return new Ei(this, e);
4452
+ return new Li(this, e);
4388
4453
  }
4389
4454
  createPlacesService(e) {
4390
- return new Ci(this, e);
4455
+ return new wi(this, e);
4391
4456
  }
4392
4457
  createMapUrls(e) {
4393
4458
  return new Be(e);
4394
4459
  }
4395
4460
  }
4396
- class Ni extends ft {
4461
+ class Gi extends _t {
4397
4462
  constructor(e, r) {
4398
4463
  var a;
4399
4464
  super(e);
@@ -4415,7 +4480,7 @@ class Ni extends ft {
4415
4480
  return this.map;
4416
4481
  }
4417
4482
  get coordType() {
4418
- return I.wgs84;
4483
+ return B.wgs84;
4419
4484
  }
4420
4485
  getCenter() {
4421
4486
  return y.fromHere(this.map.getCenter(), this.coordType);
@@ -4545,34 +4610,34 @@ class Ni extends ft {
4545
4610
  throw new Error("Method not implemented.");
4546
4611
  }
4547
4612
  }
4548
- var G = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here = "here", i))(G || {}), st;
4613
+ var G = /* @__PURE__ */ ((i) => (i.google = "google", i.baidu = "baidu", i.here = "here", i))(G || {}), at;
4549
4614
  ((i) => {
4550
4615
  function t(e, r, s) {
4551
- const n = it.create(s);
4616
+ const n = ot.create(s);
4552
4617
  switch (e) {
4553
4618
  case "google":
4554
- return new zi(r, n);
4619
+ return new Ni(r, n);
4555
4620
  case "baidu":
4556
4621
  return new Di(r, n);
4557
4622
  case "here":
4558
- return new Ni(r, n);
4623
+ return new Gi(r, n);
4559
4624
  }
4560
4625
  }
4561
4626
  i.createMap = t;
4562
- })(st || (st = {}));
4563
- function Gi({ type: i, config: t }) {
4564
- const e = window, r = Zi(i);
4627
+ })(at || (at = {}));
4628
+ function Zi({ type: i, config: t }) {
4629
+ const e = window, r = Wi(i);
4565
4630
  if (e[r])
4566
4631
  return Promise.resolve();
4567
4632
  switch (i !== G.here && !t.key && C(`请先配置${i}地图的key`), i) {
4568
4633
  case G.google:
4569
- return {}.VITE_FALSE ? (pi({
4634
+ return {}.VITE_FALSE ? (gi({
4570
4635
  key: t.key,
4571
4636
  v: "3.52"
4572
4637
  // v: config.version,
4573
- }), google.maps.importLibrary("core")) : Ft(`https://maps.googleapis.com/maps/api/js?key=${t.key}&language=${t.language}&v=${t.version}&libraries=${t.libraries.join(",")}`);
4638
+ }), google.maps.importLibrary("core")) : Ut(`https://maps.googleapis.com/maps/api/js?key=${t.key}&language=${t.language}&v=${t.version}&libraries=${t.libraries.join(",")}`);
4574
4639
  case G.baidu:
4575
- return Ft(`https://api.map.baidu.com/api?v=${t.version}&ak=${t.key}`);
4640
+ return Ut(`https://api.map.baidu.com/api?v=${t.version}&ak=${t.key}`);
4576
4641
  case G.here:
4577
4642
  return ge(pe("core", t.version)).then(() => Promise.all([
4578
4643
  // 其他大多数模块都可以同时载入
@@ -4582,13 +4647,13 @@ function Gi({ type: i, config: t }) {
4582
4647
  ge(pe("ui", t.version))
4583
4648
  ])).catch((s) => (delete e[r], Promise.reject(s)));
4584
4649
  default:
4585
- Qe(i);
4650
+ rt(i);
4586
4651
  }
4587
4652
  }
4588
4653
  function pe(i, t = Ae[0]) {
4589
4654
  return `https://js.api.here.com/v3/${t}/mapsjs-${i}.js`;
4590
4655
  }
4591
- function Zi(i) {
4656
+ function Wi(i) {
4592
4657
  switch (i) {
4593
4658
  case G.google:
4594
4659
  return "google";
@@ -4598,10 +4663,10 @@ function Zi(i) {
4598
4663
  return "H";
4599
4664
  }
4600
4665
  }
4601
- let Wi = 0;
4602
- function Ft(i, t = "callback") {
4666
+ let Hi = 0;
4667
+ function Ut(i, t = "callback") {
4603
4668
  return new Promise((e, r) => {
4604
- const s = `__callback${Wi++}`;
4669
+ const s = `__callback${Hi++}`;
4605
4670
  window[s] = e;
4606
4671
  const n = document.createElement("script");
4607
4672
  n.src = `${i}&${t}=${s}`, n.onerror = r, document.body.appendChild(n);
@@ -4620,7 +4685,7 @@ function Z(i, t) {
4620
4685
  validator: (e) => Object.values(i).includes(e)
4621
4686
  };
4622
4687
  }
4623
- function Hi(i, t) {
4688
+ function ji(i, t) {
4624
4689
  return {
4625
4690
  type: String,
4626
4691
  default: t,
@@ -4639,7 +4704,7 @@ function m(i, t) {
4639
4704
  default: t
4640
4705
  };
4641
4706
  }
4642
- function Fs(i) {
4707
+ function Us(i) {
4643
4708
  const t = {};
4644
4709
  return Object.entries(i).forEach(([e, r]) => {
4645
4710
  const s = `__${e}`;
@@ -4662,31 +4727,31 @@ const me = {
4662
4727
  get: ve,
4663
4728
  set: ve
4664
4729
  };
4665
- function ji(i) {
4730
+ function Vi(i) {
4666
4731
  return Object.keys(i).forEach((t) => {
4667
4732
  const e = i[t];
4668
4733
  let r = !1;
4669
4734
  typeof e == "function" ? (me.get = e, me.set = ve, r = !0) : typeof e == "object" && typeof e.get == "function" && (me.get = e.get, me.set = e.set, r = !0), r && (i[t] = Object.defineProperty(i, t, me));
4670
4735
  }), i;
4671
4736
  }
4672
- function Us(i) {
4673
- return ji(i);
4737
+ function Ys(i) {
4738
+ return Vi(i);
4674
4739
  }
4675
4740
  function Er() {
4676
- return Je();
4741
+ return tt();
4677
4742
  }
4678
- function Pe(i, t) {
4743
+ function xe(i, t) {
4679
4744
  const e = i.$options[t];
4680
4745
  if (e)
4681
4746
  for (const r of e)
4682
4747
  r.call(i);
4683
4748
  }
4684
- function Ys(i, t) {
4749
+ function qs(i, t) {
4685
4750
  for (const e of i)
4686
4751
  if (e.$options.name === t.name)
4687
4752
  return e;
4688
4753
  }
4689
- function qs(i, t) {
4754
+ function Ks(i, t) {
4690
4755
  if (!i.default)
4691
4756
  return;
4692
4757
  const e = i.default();
@@ -4694,7 +4759,7 @@ function qs(i, t) {
4694
4759
  if ((r == null ? void 0 : r.type).name === t.name)
4695
4760
  return r;
4696
4761
  }
4697
- function Vi(i, t) {
4762
+ function Fi(i, t) {
4698
4763
  const e = {}, r = {}, s = {};
4699
4764
  return Object.keys(i).forEach((n) => {
4700
4765
  n.startsWith("on") ? e[Te.pascal2kebab(n.substring(2))] = i[n] : r[n] = i[n];
@@ -4709,13 +4774,13 @@ function Vi(i, t) {
4709
4774
  listenerProps: s
4710
4775
  };
4711
4776
  }
4712
- function Y(i, t) {
4713
- return Yt(() => Vi(i, t));
4777
+ function q(i, t) {
4778
+ return qt(() => Fi(i, t));
4714
4779
  }
4715
4780
  function L() {
4716
4781
  return Function;
4717
4782
  }
4718
- const Ks = () => {
4783
+ const Xs = () => {
4719
4784
  let i, t;
4720
4785
  function e(s) {
4721
4786
  console.log(s), i = s && s.type, t = Date.now();
@@ -4724,27 +4789,27 @@ const Ks = () => {
4724
4789
  ((s && s.type) !== i || Date.now() - (t ?? 0) > 1e3) && e(s);
4725
4790
  }
4726
4791
  return { eventLog: e, eventLogLess: r };
4727
- }, Rt = "$map", we = "onCreate", Ee = "onDestroy", P = w({
4728
- inject: [Rt],
4792
+ }, Dt = "$map", we = "onCreate", Ee = "onDestroy", x = w({
4793
+ inject: [Dt],
4729
4794
  mounted() {
4730
- Pe(this, we);
4795
+ xe(this, we);
4731
4796
  },
4732
4797
  beforeUnmount() {
4733
- Pe(this, Ee);
4798
+ xe(this, Ee);
4734
4799
  },
4735
4800
  methods: {
4736
4801
  recreate() {
4737
- Pe(this, Ee), Pe(this, we);
4802
+ xe(this, Ee), xe(this, we);
4738
4803
  }
4739
4804
  },
4740
4805
  render() {
4741
4806
  return Er();
4742
4807
  }
4743
- }), Fi = w({
4808
+ }), Ui = w({
4744
4809
  name: "tg-map",
4745
4810
  provide() {
4746
4811
  return {
4747
- [Rt]: Yt(() => this.map)
4812
+ [Dt]: qt(() => this.map)
4748
4813
  };
4749
4814
  },
4750
4815
  inheritAttrs: !1,
@@ -4781,7 +4846,7 @@ const Ks = () => {
4781
4846
  * 该属性不会响应式更新, 要让它立即生效, 请参考{@link file://./../views/map/InfoDemo.vue#L3}
4782
4847
  * @see MapOptions.infoWindowMode
4783
4848
  */
4784
- infoWindowMode: Hi(ki),
4849
+ infoWindowMode: ji(Bi),
4785
4850
  gestureHandling: Z(j),
4786
4851
  minZoom: m(Number),
4787
4852
  maxZoom: m(Number),
@@ -4803,13 +4868,13 @@ const Ks = () => {
4803
4868
  emits: void 0,
4804
4869
  setup(i, { attrs: t }) {
4805
4870
  return {
4806
- attrs: Y(t, i),
4871
+ attrs: q(t, i),
4807
4872
  centerSyncTimeoutId: void 0
4808
4873
  };
4809
4874
  },
4810
4875
  data() {
4811
4876
  return {
4812
- map: et(),
4877
+ map: it(),
4813
4878
  isDestroyed: !1
4814
4879
  };
4815
4880
  },
@@ -4841,13 +4906,13 @@ const Ks = () => {
4841
4906
  },
4842
4907
  mapType(i) {
4843
4908
  var t;
4844
- (t = this.map) == null || t.setMapType(i ?? R.NORMAL);
4909
+ (t = this.map) == null || t.setMapType(i ?? $.NORMAL);
4845
4910
  }
4846
4911
  },
4847
4912
  async mounted() {
4848
4913
  const i = this.type;
4849
4914
  try {
4850
- await Gi({ type: i, config: ir()[i] });
4915
+ await Zi({ type: i, config: ir()[i] });
4851
4916
  } catch (s) {
4852
4917
  this.$emit("error", s);
4853
4918
  return;
@@ -4856,7 +4921,7 @@ const Ks = () => {
4856
4921
  console.warn(`tg-map(type=${i})已销毁, 不需要继续执行`);
4857
4922
  return;
4858
4923
  }
4859
- const t = st.createMap(
4924
+ const t = at.createMap(
4860
4925
  i,
4861
4926
  this.$refs.map,
4862
4927
  /* options: */
@@ -4871,12 +4936,12 @@ const Ks = () => {
4871
4936
  buildInMapTypeId: this.mapTypeId
4872
4937
  }
4873
4938
  );
4874
- if (this.map = Ar(t), this.mapType && t.setMapType(this.mapType), "ready" in this.attrs.listeners && console.error("地图载入完成的事件已经从ready改为了load, 请手动修改"), U(
4939
+ if (this.map = Ar(t), this.mapType && t.setMapType(this.mapType), "ready" in this.attrs.listeners && console.error("地图载入完成的事件已经从ready改为了load, 请手动修改"), Y(
4875
4940
  this.attrs.listeners,
4876
4941
  t,
4877
4942
  /* excludes: */
4878
4943
  ["load"]
4879
- ), this.$emit("load", t), qt([
4944
+ ), this.$emit("load", t), Kt([
4880
4945
  () => this.zoom,
4881
4946
  () => this.center
4882
4947
  //
@@ -4904,28 +4969,28 @@ const Ks = () => {
4904
4969
  },
4905
4970
  methods: {}
4906
4971
  });
4907
- const q = (i, t) => {
4972
+ const K = (i, t) => {
4908
4973
  const e = i.__vccOpts || i;
4909
4974
  for (const [r, s] of t)
4910
4975
  e[r] = s;
4911
4976
  return e;
4912
4977
  };
4913
- function Ui(i, t, e, r, s, n) {
4914
- return V(), F("div", ue({ class: "tg-map" }, i.attrs.binds), [
4978
+ function Yi(i, t, e, r, s, n) {
4979
+ return F(), U("div", ue({ class: "tg-map" }, i.attrs.binds), [
4915
4980
  Rr("div", {
4916
4981
  ref: "map",
4917
- class: Ze({
4982
+ class: je({
4918
4983
  "tg-map__map": !0,
4919
4984
  [`tg-map__map--hide-logo-${i.type}`]: i.hideLogo
4920
4985
  })
4921
4986
  }, null, 2),
4922
- Je("", !0),
4923
- i.map ? W(i.$slots, "default", { key: 1 }) : Je("", !0),
4987
+ tt("", !0),
4988
+ i.map ? W(i.$slots, "default", { key: 1 }) : tt("", !0),
4924
4989
  W(i.$slots, "overlay")
4925
4990
  ], 16);
4926
4991
  }
4927
- const Le = /* @__PURE__ */ q(Fi, [["render", Ui]]);
4928
- function Yi(i) {
4992
+ const Le = /* @__PURE__ */ K(Ui, [["render", Yi]]);
4993
+ function qi(i) {
4929
4994
  if (i == null)
4930
4995
  return;
4931
4996
  let t;
@@ -4936,7 +5001,7 @@ function Yi(i) {
4936
5001
  t = i;
4937
5002
  return `${t}px`;
4938
5003
  }
4939
- const qi = w({
5004
+ const Ki = w({
4940
5005
  name: "tg-map-widget",
4941
5006
  props: {
4942
5007
  left: {
@@ -4962,22 +5027,22 @@ const qi = w({
4962
5027
  }
4963
5028
  },
4964
5029
  methods: {
4965
- dimen: Yi
5030
+ dimen: qi
4966
5031
  }
4967
5032
  });
4968
- function Ki(i, t, e, r, s, n) {
4969
- return V(), F("div", {
4970
- class: Ze(i.$options.name),
5033
+ function Xi(i, t, e, r, s, n) {
5034
+ return F(), U("div", {
5035
+ class: je(i.$options.name),
4971
5036
  style: $r({ left: i.dimen(i.left), top: i.dimen(i.topValue), right: i.dimen(i.right), bottom: i.dimen(i.bottom) })
4972
5037
  }, [
4973
5038
  W(i.$slots, "default")
4974
5039
  ], 6);
4975
5040
  }
4976
- const Xi = /* @__PURE__ */ q(qi, [["render", Ki]]), Ji = w({
5041
+ const Ji = /* @__PURE__ */ K(Ki, [["render", Xi]]), Qi = w({
4977
5042
  name: "tg-custom-control",
4978
- mixins: [P],
5043
+ mixins: [x],
4979
5044
  props: {
4980
- position: Z(B, B.RIGHT_BOTTOM)
5045
+ position: Z(S, S.RIGHT_BOTTOM)
4981
5046
  },
4982
5047
  setup() {
4983
5048
  return {
@@ -4990,8 +5055,8 @@ const Xi = /* @__PURE__ */ q(qi, [["render", Ki]]), Ji = w({
4990
5055
  }
4991
5056
  },
4992
5057
  onCreate() {
4993
- Jt(this.$parent, Le) || console.warn("请将tg-custom-control放到tg-map中");
4994
- const { $el: i } = this, t = class extends di {
5058
+ Qt(this.$parent, Le) || console.warn("请将tg-custom-control放到tg-map中");
5059
+ const { $el: i } = this, t = class extends ui {
4995
5060
  onCreateElement() {
4996
5061
  return i;
4997
5062
  }
@@ -5002,18 +5067,18 @@ const Xi = /* @__PURE__ */ q(qi, [["render", Ki]]), Ji = w({
5002
5067
  this.$map.removeCustomControl(this.control);
5003
5068
  }
5004
5069
  });
5005
- function Qi(i, t, e, r, s, n) {
5006
- return V(), F("div", {
5007
- class: Ze(i.$options.name)
5070
+ function es(i, t, e, r, s, n) {
5071
+ return F(), U("div", {
5072
+ class: je(i.$options.name)
5008
5073
  }, [
5009
5074
  W(i.$slots, "default")
5010
5075
  ], 2);
5011
5076
  }
5012
- const es = /* @__PURE__ */ q(Ji, [["render", Qi]]), ts = w({
5077
+ const ts = /* @__PURE__ */ K(Qi, [["render", es]]), rs = w({
5013
5078
  name: "tg-map-type-control",
5014
- mixins: [P],
5079
+ mixins: [x],
5015
5080
  props: {
5016
- position: Z(B, B.TOP_LEFT),
5081
+ position: Z(S, S.TOP_LEFT),
5017
5082
  type: Z(hr),
5018
5083
  mapTypes: m(Array)
5019
5084
  },
@@ -5042,11 +5107,11 @@ const es = /* @__PURE__ */ q(Ji, [["render", Qi]]), ts = w({
5042
5107
  onDestroy() {
5043
5108
  this.$map.removeControl(this.control);
5044
5109
  }
5045
- }), rs = w({
5110
+ }), is = w({
5046
5111
  name: "tg-scale-control",
5047
- mixins: [P],
5112
+ mixins: [x],
5048
5113
  props: {
5049
- position: Z(B, B.BOTTOM_RIGHT)
5114
+ position: Z(S, S.BOTTOM_RIGHT)
5050
5115
  },
5051
5116
  setup() {
5052
5117
  return {
@@ -5067,16 +5132,16 @@ const es = /* @__PURE__ */ q(Ji, [["render", Qi]]), ts = w({
5067
5132
  });
5068
5133
  function Lr() {
5069
5134
  var e;
5070
- const i = (e = Dr()) == null ? void 0 : e.type;
5135
+ const i = (e = zr()) == null ? void 0 : e.type;
5071
5136
  let t = (i == null ? void 0 : i.name) ?? (i == null ? void 0 : i.__name);
5072
5137
  if (!t) {
5073
5138
  const r = i == null ? void 0 : i.__file;
5074
- r && (t = Si.basename(r, ".vue"));
5139
+ r && (t = Ai.basename(r, ".vue"));
5075
5140
  }
5076
5141
  return t;
5077
5142
  }
5078
- function is() {
5079
- const i = zr(Rt);
5143
+ function ss() {
5144
+ const i = Dr(Dt);
5080
5145
  let t, e;
5081
5146
  return i == null && C(`<${Lr() || "unknown"}>必须作为<tg-map>的子代组件`), {
5082
5147
  mapRef: i,
@@ -5098,25 +5163,25 @@ function is() {
5098
5163
  }
5099
5164
  };
5100
5165
  }
5101
- const ss = w({
5166
+ const ns = w({
5102
5167
  name: "tg-zoom-control",
5103
5168
  props: {
5104
- position: Z(B, B.RIGHT_BOTTOM)
5169
+ position: Z(S, S.RIGHT_BOTTOM)
5105
5170
  },
5106
5171
  setup(i) {
5107
5172
  let t = void 0;
5108
- const { map: e, onCreate: r, onDestroy: s } = is();
5173
+ const { map: e, onCreate: r, onDestroy: s } = ss();
5109
5174
  return r(() => {
5110
5175
  t = e.createZoomControl(i), e.addControl(t);
5111
5176
  }), s(() => {
5112
5177
  e.removeControl(t);
5113
- }), qt(() => i.position, (n) => {
5178
+ }), Kt(() => i.position, (n) => {
5114
5179
  t.setPosition(n);
5115
5180
  }), Er;
5116
5181
  }
5117
- }), ns = w({
5182
+ }), os = w({
5118
5183
  name: "tg-marker-clusterer",
5119
- mixins: [P],
5184
+ mixins: [x],
5120
5185
  // markers从this.$children中读取, 故需要省略(Omit)
5121
5186
  props: {
5122
5187
  gridSize: m(Number),
@@ -5178,16 +5243,16 @@ const ss = w({
5178
5243
  }
5179
5244
  }
5180
5245
  });
5181
- function os(i, t, e, r, s, n) {
5182
- return V(), F("div", {
5183
- class: Ze(i.$options.name)
5246
+ function as(i, t, e, r, s, n) {
5247
+ return F(), U("div", {
5248
+ class: je(i.$options.name)
5184
5249
  }, [
5185
5250
  W(i.$slots, "default")
5186
5251
  ], 2);
5187
5252
  }
5188
- const xr = /* @__PURE__ */ q(ns, [["render", os]]), as = w({
5253
+ const Pr = /* @__PURE__ */ K(os, [["render", as]]), ls = w({
5189
5254
  name: "tg-traffic-layer",
5190
- mixins: [P],
5255
+ mixins: [x],
5191
5256
  // 请直接使用v-if来控制它的显隐
5192
5257
  // 没有属性时, 写`{}`类型推断会有问题, 故注释掉
5193
5258
  // props: {} satisfies Props<{}>,
@@ -5198,14 +5263,14 @@ const xr = /* @__PURE__ */ q(ns, [["render", os]]), as = w({
5198
5263
  },
5199
5264
  watch: {},
5200
5265
  onCreate() {
5201
- this.layer = new ui(), this.$map.addLayer(this.layer);
5266
+ this.layer = new pi(), this.$map.addLayer(this.layer);
5202
5267
  },
5203
5268
  onDestroy() {
5204
5269
  this.$map.removeLayer(this.layer);
5205
5270
  }
5206
- }), ls = w({
5271
+ }), hs = w({
5207
5272
  name: "tg-circle",
5208
- mixins: [P],
5273
+ mixins: [x],
5209
5274
  inheritAttrs: !1,
5210
5275
  props: {
5211
5276
  center: D(y),
@@ -5224,7 +5289,7 @@ const xr = /* @__PURE__ */ q(ns, [["render", os]]), as = w({
5224
5289
  emits: void 0,
5225
5290
  setup(i, { attrs: t }) {
5226
5291
  return {
5227
- attrs: Y(t, i),
5292
+ attrs: q(t, i),
5228
5293
  overlay: void 0,
5229
5294
  emittedRadius: void 0,
5230
5295
  emittedCenter: void 0
@@ -5234,7 +5299,7 @@ const xr = /* @__PURE__ */ q(ns, [["render", os]]), as = w({
5234
5299
  center(i) {
5235
5300
  if (this.emittedCenter != null) {
5236
5301
  const t = this.emittedCenter;
5237
- if (this.emittedCenter = void 0, t === We(i))
5302
+ if (this.emittedCenter = void 0, t === Ve(i))
5238
5303
  return;
5239
5304
  }
5240
5305
  this.overlay.setCenter(i);
@@ -5273,7 +5338,7 @@ const xr = /* @__PURE__ */ q(ns, [["render", os]]), as = w({
5273
5338
  }
5274
5339
  },
5275
5340
  onCreate() {
5276
- this.overlay = this.$map.createCircle(this), this.$map.addOverlay(this.overlay), U(this.attrs.listeners, this.overlay), "update:center" in this.attrs.listenerProps && this.overlay.addEventListener("center-changed", () => {
5341
+ this.overlay = this.$map.createCircle(this), this.$map.addOverlay(this.overlay), Y(this.attrs.listeners, this.overlay), "update:center" in this.attrs.listenerProps && this.overlay.addEventListener("center-changed", () => {
5277
5342
  this.$emit("update:center", this.emittedCenter = this.overlay.getCenter());
5278
5343
  }), "update:radius" in this.attrs.listenerProps && this.overlay.addEventListener("radius-changed", () => {
5279
5344
  this.$emit("update:radius", this.emittedRadius = this.overlay.getRadius());
@@ -5283,7 +5348,7 @@ const xr = /* @__PURE__ */ q(ns, [["render", os]]), as = w({
5283
5348
  this.$map.removeOverlay(this.overlay);
5284
5349
  }
5285
5350
  });
5286
- class hs extends Ai {
5351
+ class cs extends Ri {
5287
5352
  constructor(t, e, r, s) {
5288
5353
  super(t, e), this.content = r, this.position = s;
5289
5354
  }
@@ -5298,9 +5363,9 @@ class hs extends Ai {
5298
5363
  this.position = t, this.draw();
5299
5364
  }
5300
5365
  }
5301
- const cs = w({
5366
+ const ds = w({
5302
5367
  name: "tg-element-overlay",
5303
- mixins: [P],
5368
+ mixins: [x],
5304
5369
  props: {
5305
5370
  mapPane: Z(Me, Me.overlayMouseTarget),
5306
5371
  position: D(y)
@@ -5324,22 +5389,22 @@ const cs = w({
5324
5389
  }
5325
5390
  },
5326
5391
  onCreate() {
5327
- this.overlay = new hs(this.$map, this, this.content(), this.position), this.$map.addElementOverlay(this.overlay);
5392
+ this.overlay = new cs(this.$map, this, this.content(), this.position), this.$map.addElementOverlay(this.overlay);
5328
5393
  },
5329
5394
  onDestroy() {
5330
5395
  this.$map.removeElementOverlay(this.overlay);
5331
5396
  }
5332
5397
  });
5333
- function ds(i, t, e, r, s, n) {
5334
- return V(), F("div", ue({
5398
+ function us(i, t, e, r, s, n) {
5399
+ return F(), U("div", ue({
5335
5400
  class: i.$options.name
5336
5401
  }, i.$attrs), [
5337
5402
  W(i.$slots, "default")
5338
5403
  ], 16);
5339
5404
  }
5340
- const us = /* @__PURE__ */ q(cs, [["render", ds]]), ps = w({
5405
+ const ps = /* @__PURE__ */ K(ds, [["render", us]]), gs = w({
5341
5406
  name: "tg-marker",
5342
- mixins: [P],
5407
+ mixins: [x],
5343
5408
  inheritAttrs: !1,
5344
5409
  props: {
5345
5410
  position: D(y),
@@ -5351,15 +5416,16 @@ const us = /* @__PURE__ */ q(cs, [["render", ds]]), ps = w({
5351
5416
  cursor: m(String),
5352
5417
  zIndex: m(Number),
5353
5418
  visible: m(Boolean),
5419
+ normalizePositionForBaidu: m(Boolean),
5354
5420
  "onUpdate:position": L()
5355
5421
  },
5356
5422
  emits: void 0,
5357
5423
  setup(i, { attrs: t }) {
5358
5424
  return {
5359
- attrs: Y(t, i),
5425
+ attrs: q(t, i),
5360
5426
  marker: void 0,
5361
- label: et(),
5362
- info: et(),
5427
+ label: it(),
5428
+ info: it(),
5363
5429
  emittedPosition: void 0
5364
5430
  };
5365
5431
  },
@@ -5367,7 +5433,7 @@ const us = /* @__PURE__ */ q(cs, [["render", ds]]), ps = w({
5367
5433
  position(i) {
5368
5434
  if (this.emittedPosition != null) {
5369
5435
  const t = this.emittedPosition;
5370
- if (this.emittedPosition = void 0, t === We(i))
5436
+ if (this.emittedPosition = void 0, t === Ve(i))
5371
5437
  return;
5372
5438
  }
5373
5439
  this.marker.setPosition(i);
@@ -5395,10 +5461,13 @@ const us = /* @__PURE__ */ q(cs, [["render", ds]]), ps = w({
5395
5461
  },
5396
5462
  visible(i) {
5397
5463
  this.marker.setVisible(i);
5464
+ },
5465
+ normalizePositionForBaidu() {
5466
+ this.recreate();
5398
5467
  }
5399
5468
  },
5400
5469
  onCreate() {
5401
- this.marker = this.$map.createMarker(this), this.label && this.marker.setLabel(this.label.overlay), this.$clusterer() ? this.$clusterer().onAddMarker(this.marker) : this.$map.addOverlay(this.marker), this.info && this.info.show && this.info.overlay.open(this.marker), U(this.attrs.listeners, this.marker), "update:position" in this.attrs.listenerProps && this.marker.addEventListener("dragend", (i) => {
5470
+ this.marker = this.$map.createMarker(this), this.label && this.marker.setLabel(this.label.overlay), this.$clusterer() ? this.$clusterer().onAddMarker(this.marker) : this.$map.addOverlay(this.marker), this.info && this.info.show && this.info.overlay.open(this.marker), Y(this.attrs.listeners, this.marker), "update:position" in this.attrs.listenerProps && this.marker.addEventListener("dragend", (i) => {
5402
5471
  this.$emit("update:position", this.emittedPosition = i.position);
5403
5472
  });
5404
5473
  },
@@ -5407,7 +5476,7 @@ const us = /* @__PURE__ */ q(cs, [["render", ds]]), ps = w({
5407
5476
  },
5408
5477
  methods: {
5409
5478
  $clusterer() {
5410
- return Jt(this.$parent, xr);
5479
+ return Qt(this.$parent, Pr);
5411
5480
  },
5412
5481
  onAddLabel(i) {
5413
5482
  this.label = i, this.marker && this.marker.setLabel(i.overlay);
@@ -5426,16 +5495,16 @@ const us = /* @__PURE__ */ q(cs, [["render", ds]]), ps = w({
5426
5495
  }
5427
5496
  }
5428
5497
  });
5429
- function gs(i, t, e, r, s, n) {
5430
- return V(), F("div", ue({
5498
+ function ms(i, t, e, r, s, n) {
5499
+ return F(), U("div", ue({
5431
5500
  class: i.$options.name
5432
5501
  }, i.attrs.binds), [
5433
5502
  W(i.$slots, "default")
5434
5503
  ], 16);
5435
5504
  }
5436
- const Fe = /* @__PURE__ */ q(ps, [["render", gs]]), ms = w({
5505
+ const qe = /* @__PURE__ */ K(gs, [["render", ms]]), fs = w({
5437
5506
  name: "tg-info-box",
5438
- mixins: [P],
5507
+ mixins: [x],
5439
5508
  inheritAttrs: !1,
5440
5509
  props: {
5441
5510
  show: D(Boolean),
@@ -5449,7 +5518,7 @@ const Fe = /* @__PURE__ */ q(ps, [["render", gs]]), ms = w({
5449
5518
  emits: void 0,
5450
5519
  setup(i, { attrs: t }) {
5451
5520
  return {
5452
- attrs: Y(t, i),
5521
+ attrs: q(t, i),
5453
5522
  overlay: void 0
5454
5523
  };
5455
5524
  },
@@ -5476,7 +5545,7 @@ const Fe = /* @__PURE__ */ q(ps, [["render", gs]]), ms = w({
5476
5545
  onCreate() {
5477
5546
  this.overlay = this.$map.createInfoBox(this.getOptions()), this.$marker() ? this.$marker().onAddInfo(this) : this.show && this.overlay.open(), "update:show" in this.attrs.listenerProps && this.overlay.addEventListener("closeclick", () => {
5478
5547
  this.$emit("update:show", !1);
5479
- }), U(this.attrs.listeners, this.overlay);
5548
+ }), Y(this.attrs.listeners, this.overlay);
5480
5549
  },
5481
5550
  onDestroy() {
5482
5551
  this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
@@ -5496,7 +5565,7 @@ const Fe = /* @__PURE__ */ q(ps, [["render", gs]]), ms = w({
5496
5565
  return this.$el;
5497
5566
  },
5498
5567
  $marker() {
5499
- return ot(Fe, this.$parent, Le);
5568
+ return ht(qe, this.$parent, Le);
5500
5569
  },
5501
5570
  open(i) {
5502
5571
  this.overlay.open(i);
@@ -5506,16 +5575,16 @@ const Fe = /* @__PURE__ */ q(ps, [["render", gs]]), ms = w({
5506
5575
  }
5507
5576
  }
5508
5577
  });
5509
- function fs(i, t, e, r, s, n) {
5510
- return V(), F("div", ue({
5578
+ function ys(i, t, e, r, s, n) {
5579
+ return F(), U("div", ue({
5511
5580
  class: i.$options.name
5512
5581
  }, i.attrs.binds), [
5513
5582
  W(i.$slots, "default")
5514
5583
  ], 16);
5515
5584
  }
5516
- const ys = /* @__PURE__ */ q(ms, [["render", fs]]), vs = w({
5585
+ const vs = /* @__PURE__ */ K(fs, [["render", ys]]), _s = w({
5517
5586
  name: "tg-info-window",
5518
- mixins: [P],
5587
+ mixins: [x],
5519
5588
  inheritAttrs: !1,
5520
5589
  props: {
5521
5590
  show: D(Boolean),
@@ -5528,7 +5597,7 @@ const ys = /* @__PURE__ */ q(ms, [["render", fs]]), vs = w({
5528
5597
  emits: void 0,
5529
5598
  setup(i, { attrs: t }) {
5530
5599
  return {
5531
- attrs: Y(t, i),
5600
+ attrs: q(t, i),
5532
5601
  overlay: void 0
5533
5602
  };
5534
5603
  },
@@ -5554,7 +5623,7 @@ const ys = /* @__PURE__ */ q(ms, [["render", fs]]), vs = w({
5554
5623
  return this.$el;
5555
5624
  },
5556
5625
  $marker() {
5557
- return ot(Fe, this.$parent, Le);
5626
+ return ht(qe, this.$parent, Le);
5558
5627
  },
5559
5628
  getOptions() {
5560
5629
  return {
@@ -5571,14 +5640,14 @@ const ys = /* @__PURE__ */ q(ms, [["render", fs]]), vs = w({
5571
5640
  this.$emit("update:show", !0);
5572
5641
  }), this.overlay.addEventListener("close", () => {
5573
5642
  this.$emit("update:show", !1);
5574
- }), U(this.attrs.listeners, this.overlay);
5643
+ }), Y(this.attrs.listeners, this.overlay);
5575
5644
  },
5576
5645
  onDestroy() {
5577
5646
  this.$marker() ? this.$marker().onRemoveInfo(this) : this.overlay.close();
5578
5647
  }
5579
5648
  });
5580
- function _s(i, t, e, r, s, n) {
5581
- return Zr((V(), F("div", ue({
5649
+ function bs(i, t, e, r, s, n) {
5650
+ return Zr((F(), U("div", ue({
5582
5651
  class: i.$options.name
5583
5652
  }, i.attrs.binds), [
5584
5653
  W(i.$slots, "default")
@@ -5586,9 +5655,9 @@ function _s(i, t, e, r, s, n) {
5586
5655
  [Wr, i.show]
5587
5656
  ]);
5588
5657
  }
5589
- const bs = /* @__PURE__ */ q(vs, [["render", _s]]), Ts = w({
5658
+ const Ts = /* @__PURE__ */ K(_s, [["render", bs]]), Ms = w({
5590
5659
  name: "tg-label",
5591
- mixins: [P],
5660
+ mixins: [x],
5592
5661
  inheritAttrs: !1,
5593
5662
  props: {
5594
5663
  position: m(y),
@@ -5599,7 +5668,7 @@ const bs = /* @__PURE__ */ q(vs, [["render", _s]]), Ts = w({
5599
5668
  emits: void 0,
5600
5669
  setup(i, { attrs: t }) {
5601
5670
  return {
5602
- attrs: Y(t),
5671
+ attrs: q(t),
5603
5672
  overlay: void 0
5604
5673
  };
5605
5674
  },
@@ -5629,7 +5698,7 @@ const bs = /* @__PURE__ */ q(vs, [["render", _s]]), Ts = w({
5629
5698
  return (i = this.$marker()) == null ? void 0 : i.marker;
5630
5699
  },
5631
5700
  $marker() {
5632
- return ot(Fe, this.$parent, Le);
5701
+ return ht(qe, this.$parent, Le);
5633
5702
  },
5634
5703
  getOptions() {
5635
5704
  return {
@@ -5642,22 +5711,22 @@ const bs = /* @__PURE__ */ q(vs, [["render", _s]]), Ts = w({
5642
5711
  }
5643
5712
  },
5644
5713
  onCreate() {
5645
- this.overlay = this.$map.createLabel(this.getOptions()), this.$marker() ? this.$marker().onAddLabel(this) : this.$map.addOverlay(this.overlay), U(this.attrs.listeners, this.overlay);
5714
+ this.overlay = this.$map.createLabel(this.getOptions()), this.$marker() ? this.$marker().onAddLabel(this) : this.$map.addOverlay(this.overlay), Y(this.attrs.listeners, this.overlay);
5646
5715
  },
5647
5716
  onDestroy() {
5648
5717
  this.$marker() ? this.$marker().onRemoveLabel(this) : this.$map.removeOverlay(this.overlay);
5649
5718
  }
5650
5719
  });
5651
- function Ms(i, t, e, r, s, n) {
5652
- return V(), F("div", ue({
5720
+ function Os(i, t, e, r, s, n) {
5721
+ return F(), U("div", ue({
5653
5722
  class: i.$options.name
5654
5723
  }, i.attrs.binds), [
5655
5724
  W(i.$slots, "default")
5656
5725
  ], 16);
5657
5726
  }
5658
- const Os = /* @__PURE__ */ q(Ts, [["render", Ms]]), Cs = w({
5727
+ const Cs = /* @__PURE__ */ K(Ms, [["render", Os]]), ws = w({
5659
5728
  name: "tg-polygon",
5660
- mixins: [P],
5729
+ mixins: [x],
5661
5730
  inheritAttrs: !1,
5662
5731
  props: {
5663
5732
  paths: D(Array),
@@ -5674,7 +5743,7 @@ const Os = /* @__PURE__ */ q(Ts, [["render", Ms]]), Cs = w({
5674
5743
  emits: void 0,
5675
5744
  setup(i, { attrs: t }) {
5676
5745
  return {
5677
- attrs: Y(t, i),
5746
+ attrs: q(t, i),
5678
5747
  overlay: void 0,
5679
5748
  emittedPaths: void 0
5680
5749
  };
@@ -5684,7 +5753,7 @@ const Os = /* @__PURE__ */ q(Ts, [["render", Ms]]), Cs = w({
5684
5753
  handler(i) {
5685
5754
  if (this.emittedPaths != null) {
5686
5755
  const t = this.emittedPaths;
5687
- if (this.emittedPaths = void 0, t.length === i.length && t.every((e, r) => e === We(i[r])))
5756
+ if (this.emittedPaths = void 0, t.length === i.length && t.every((e, r) => e === Ve(i[r])))
5688
5757
  return;
5689
5758
  }
5690
5759
  this.overlay.setPaths(i);
@@ -5717,16 +5786,16 @@ const Os = /* @__PURE__ */ q(Ts, [["render", Ms]]), Cs = w({
5717
5786
  }
5718
5787
  },
5719
5788
  onCreate() {
5720
- this.overlay = this.$map.createPolygon(this), this.$map.addOverlay(this.overlay), U(this.attrs.listeners, this.overlay), "update:paths" in this.attrs.listenerProps && this.overlay.addEventListener("paths-edited", () => {
5789
+ this.overlay = this.$map.createPolygon(this), this.$map.addOverlay(this.overlay), Y(this.attrs.listeners, this.overlay), "update:paths" in this.attrs.listenerProps && this.overlay.addEventListener("paths-edited", () => {
5721
5790
  this.$emit("update:paths", this.emittedPaths = this.overlay.getPaths());
5722
5791
  });
5723
5792
  },
5724
5793
  onDestroy() {
5725
5794
  this.$map.removeOverlay(this.overlay);
5726
5795
  }
5727
- }), ws = w({
5796
+ }), Es = w({
5728
5797
  name: "tg-polyline",
5729
- mixins: [P],
5798
+ mixins: [x],
5730
5799
  inheritAttrs: !1,
5731
5800
  props: {
5732
5801
  path: D(Array),
@@ -5741,7 +5810,7 @@ const Os = /* @__PURE__ */ q(Ts, [["render", Ms]]), Cs = w({
5741
5810
  emits: void 0,
5742
5811
  setup(i, { attrs: t }) {
5743
5812
  return {
5744
- attrs: Y(t, i),
5813
+ attrs: q(t, i),
5745
5814
  overlay: void 0,
5746
5815
  emittedPath: void 0
5747
5816
  };
@@ -5751,7 +5820,7 @@ const Os = /* @__PURE__ */ q(Ts, [["render", Ms]]), Cs = w({
5751
5820
  handler(i) {
5752
5821
  if (this.emittedPath != null) {
5753
5822
  const t = this.emittedPath;
5754
- if (this.emittedPath = void 0, t === We(i))
5823
+ if (this.emittedPath = void 0, t === Ve(i))
5755
5824
  return;
5756
5825
  }
5757
5826
  this.overlay.setPath(i);
@@ -5778,16 +5847,16 @@ const Os = /* @__PURE__ */ q(Ts, [["render", Ms]]), Cs = w({
5778
5847
  }
5779
5848
  },
5780
5849
  onCreate() {
5781
- this.overlay = this.$map.createPolyline(this), this.$map.addOverlay(this.overlay), U(this.attrs.listeners, this.overlay), "update:path" in this.attrs.listenerProps && this.overlay.addEventListener("path-edited", () => {
5850
+ this.overlay = this.$map.createPolyline(this), this.$map.addOverlay(this.overlay), Y(this.attrs.listeners, this.overlay), "update:path" in this.attrs.listenerProps && this.overlay.addEventListener("path-edited", () => {
5782
5851
  this.$emit("update:path", this.emittedPath = this.overlay.getPath());
5783
5852
  });
5784
5853
  },
5785
5854
  onDestroy() {
5786
5855
  this.$map.removeOverlay(this.overlay);
5787
5856
  }
5788
- }), Es = w({
5857
+ }), Ls = w({
5789
5858
  name: "tg-rectangle",
5790
- mixins: [P],
5859
+ mixins: [x],
5791
5860
  inheritAttrs: !1,
5792
5861
  props: {
5793
5862
  bounds: D(Object),
@@ -5804,7 +5873,7 @@ const Os = /* @__PURE__ */ q(Ts, [["render", Ms]]), Cs = w({
5804
5873
  emits: void 0,
5805
5874
  setup(i, { attrs: t }) {
5806
5875
  return {
5807
- attrs: Y(t, i),
5876
+ attrs: q(t, i),
5808
5877
  overlay: void 0,
5809
5878
  emittedBounds: void 0
5810
5879
  };
@@ -5844,20 +5913,20 @@ const Os = /* @__PURE__ */ q(Ts, [["render", Ms]]), Cs = w({
5844
5913
  }
5845
5914
  },
5846
5915
  onCreate() {
5847
- this.overlay = this.$map.createRectangle(this), this.$map.addOverlay(this.overlay), U(this.attrs.listeners, this.overlay), "update:bounds" in this.attrs.listenerProps && this.overlay.addEventListener("bounds-changed", () => {
5916
+ this.overlay = this.$map.createRectangle(this), this.$map.addOverlay(this.overlay), Y(this.attrs.listeners, this.overlay), "update:bounds" in this.attrs.listenerProps && this.overlay.addEventListener("bounds-changed", () => {
5848
5917
  this.$emit("update:bounds", this.emittedBounds = this.overlay.getBounds());
5849
5918
  });
5850
5919
  },
5851
5920
  onDestroy() {
5852
5921
  this.$map.removeOverlay(this.overlay);
5853
5922
  }
5854
- }), Ls = ["beforeUpdate", "updated"], Xs = {
5923
+ }), Ps = ["beforeUpdate", "updated"], Js = {
5855
5924
  install(i, t = {}) {
5856
5925
  if (t.enable !== !1) {
5857
5926
  const e = w({
5858
5927
  beforeCreate() {
5859
5928
  const r = Lr() ?? "", n = (t.nameRegex || /^[A-Z]/).test(r) ? (a) => {
5860
- t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : Ls.includes(a) || console.debug("[lifecycle]", r, a);
5929
+ t.hookNames ? t.hookNames.includes(a) && console.debug("[lifecycle]", r, a) : Ps.includes(a) || console.debug("[lifecycle]", r, a);
5861
5930
  } : ve;
5862
5931
  n("beforeCreate"), this.__life_impl = n;
5863
5932
  },
@@ -5901,10 +5970,10 @@ const Os = /* @__PURE__ */ q(Ts, [["render", Ms]]), Cs = w({
5901
5970
  function ye(i) {
5902
5971
  return i * Math.PI / 180;
5903
5972
  }
5904
- function Ut(i) {
5973
+ function Yt(i) {
5905
5974
  return i * 180 / Math.PI;
5906
5975
  }
5907
- function Ps(i, t) {
5976
+ function ks(i, t) {
5908
5977
  if (i.lat === t.lat && i.lng === t.lng)
5909
5978
  return 0;
5910
5979
  const e = ye((i.lat + t.lat) / 2), r = ye((i.lat - t.lat) / 2), s = ye((i.lng - t.lng) / 2);
@@ -5914,27 +5983,27 @@ function Ps(i, t) {
5914
5983
  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;
5915
5984
  return _ * (1 + l * (T * h * (1 - n) - g * (1 - h) * n));
5916
5985
  }
5917
- function ks(i, t, e) {
5986
+ function Bs(i, t, e) {
5918
5987
  const s = 63567523142e-4, n = 1 / 298.257223563, a = ye(t), h = Math.sin(a), o = Math.cos(a), l = (1 - n) * Math.tan(ye(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)));
5919
- let v = 0, O = 0, x = 0, E = e / (s * g), Q = 2 * Math.PI;
5988
+ let v = 0, O = 0, P = 0, E = e / (s * g), Q = 2 * Math.PI;
5920
5989
  for (; Math.abs(E - Q) > 1e-12; ) {
5921
- v = Math.cos(2 * p + E), O = Math.sin(E), x = Math.cos(E);
5922
- const Br = f * O * (v + f / 4 * (x * (-1 + 2 * v * v) - f / 6 * v * (-3 + 4 * O * O) * (-3 + 4 * v * v)));
5990
+ v = Math.cos(2 * p + E), O = Math.sin(E), P = Math.cos(E);
5991
+ const Br = f * O * (v + f / 4 * (P * (-1 + 2 * v * v) - f / 6 * v * (-3 + 4 * O * O) * (-3 + 4 * v * v)));
5923
5992
  Q = E, E = e / (s * g) + Br;
5924
5993
  }
5925
- const ie = u * O - d * x * o, Ue = Math.atan2(
5926
- u * x + d * O * o,
5994
+ const ie = u * O - d * P * o, Ke = Math.atan2(
5995
+ u * P + d * O * o,
5927
5996
  (1 - n) * Math.sqrt(b * b + ie * ie)
5928
- ), Pr = Math.atan2(O * h, d * x - u * O * o), Ye = n / 16 * _ * (4 + n * (4 - 3 * _)), kr = Pr - (1 - Ye) * n * b * (E + Ye * O * (v + Ye * x * (-1 + 2 * v * v)));
5929
- return { lng: i.lng + Ut(kr), lat: Ut(Ue) };
5997
+ ), xr = Math.atan2(O * h, d * P - u * O * o), Xe = n / 16 * _ * (4 + n * (4 - 3 * _)), kr = xr - (1 - Xe) * n * b * (E + Xe * O * (v + Xe * P * (-1 + 2 * v * v)));
5998
+ return { lng: i.lng + Yt(kr), lat: Yt(Ke) };
5930
5999
  }
5931
- const Js = {
5932
- getDistance: Ps,
5933
- getDestination: ks
5934
- }, Qs = {
6000
+ const Qs = {
6001
+ getDistance: ks,
6002
+ getDestination: Bs
6003
+ }, en = {
5935
6004
  install(i, t) {
5936
- if (ai(t), {}.VITE_FALSE) {
5937
- const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue": Le, "./TgMapWidget.vue": Xi, "./controls/TgCustomControl.vue": es, "./controls/TgMapTypeControl.vue": ts, "./controls/TgScaleControl.vue": rs, "./controls/TgZoomControl.vue": ss, "./extra/TgMarkerClusterer.vue": xr, "./layers/TgTrafficLayer.vue": as, "./overlays/TgCircle.vue": ls, "./overlays/TgElementOverlay.vue": us, "./overlays/TgInfoBox.vue": ys, "./overlays/TgInfoWindow.vue": bs, "./overlays/TgLabel.vue": Os, "./overlays/TgMarker.vue": Fe, "./overlays/TgPolygon.vue": Cs, "./overlays/TgPolyline.vue": ws, "./overlays/TgRectangle.vue": Es });
6005
+ if (li(t), {}.VITE_FALSE) {
6006
+ const r = /* @__PURE__ */ Object.assign({ "./TgMap.vue": Le, "./TgMapWidget.vue": Ji, "./controls/TgCustomControl.vue": ts, "./controls/TgMapTypeControl.vue": rs, "./controls/TgScaleControl.vue": is, "./controls/TgZoomControl.vue": ns, "./extra/TgMarkerClusterer.vue": Pr, "./layers/TgTrafficLayer.vue": ls, "./overlays/TgCircle.vue": hs, "./overlays/TgElementOverlay.vue": ps, "./overlays/TgInfoBox.vue": vs, "./overlays/TgInfoWindow.vue": Ts, "./overlays/TgLabel.vue": Cs, "./overlays/TgMarker.vue": qe, "./overlays/TgPolygon.vue": ws, "./overlays/TgPolyline.vue": Es, "./overlays/TgRectangle.vue": Ls });
5938
6007
  Object.keys(r).forEach((s) => {
5939
6008
  const n = r[s];
5940
6009
  i.component(n.name ?? C(`Tg开头的组件必须设置name: ${s}`), n);
@@ -5946,66 +6015,66 @@ const Js = {
5946
6015
  };
5947
6016
  export {
5948
6017
  ar as AbstractControl,
5949
- ft as AbstractMap,
6018
+ _t as AbstractMap,
5950
6019
  he as Arrays,
5951
6020
  pr as Autocomplete,
5952
- yi as BaiduAutocomplete,
5953
- vt as BaiduCircle,
5954
- lt as BaiduControl,
5955
- Ot as BaiduInfoBoxOverlay,
5956
- Tt as BaiduInfoWindow,
5957
- ct as BaiduMapTypeControl,
6021
+ vi as BaiduAutocomplete,
6022
+ Tt as BaiduCircle,
6023
+ dt as BaiduControl,
6024
+ Et as BaiduInfoBoxOverlay,
6025
+ Ct as BaiduInfoWindow,
6026
+ pt as BaiduMapTypeControl,
5958
6027
  Ie as BaiduMapUrls,
5959
6028
  Ce as BaiduMarker,
5960
- Mi as BaiduMarkerClusterer,
5961
- je as BaiduOverlay,
5962
- wi as BaiduPlacesService,
5963
- xt as BaiduPolyShape,
5964
- Bt as BaiduPolygon,
5965
- Pt as BaiduPolyline,
5966
- St as BaiduRectangle,
5967
- dt as BaiduScaleControl,
5968
- Li as BaiduSearchBox,
5969
- pt as BaiduZoomControl,
5970
- S as BuildInMapType,
6029
+ Oi as BaiduMarkerClusterer,
6030
+ Ue as BaiduOverlay,
6031
+ Ei as BaiduPlacesService,
6032
+ Bt as BaiduPolyShape,
6033
+ At as BaiduPolygon,
6034
+ It as BaiduPolyline,
6035
+ $t as BaiduRectangle,
6036
+ gt as BaiduScaleControl,
6037
+ Pi as BaiduSearchBox,
6038
+ ft as BaiduZoomControl,
6039
+ A as BuildInMapType,
5971
6040
  lr as BuildInMapTypeId,
5972
6041
  fe as CachedValue,
5973
- B as ControlPosition,
5974
- $ as ControlPositionConverter,
5975
- I as CoordType,
5976
- di as CustomControl,
5977
- ci as FastFindValues,
5978
- fi as GoogleAutocomplete,
5979
- _t as GoogleCircle,
5980
- ht as GoogleControl,
5981
- Ct as GoogleInfoBoxOverlay,
5982
- Mt as GoogleInfoWindow,
6042
+ S as ControlPosition,
6043
+ z as ControlPositionConverter,
6044
+ B as CoordType,
6045
+ ui as CustomControl,
6046
+ di as FastFindValues,
6047
+ yi as GoogleAutocomplete,
6048
+ Mt as GoogleCircle,
6049
+ ut as GoogleControl,
6050
+ Lt as GoogleInfoBoxOverlay,
6051
+ wt as GoogleInfoWindow,
5983
6052
  ke as GoogleMapTypeControl,
5984
6053
  Be as GoogleMapUrls,
5985
- Lt as GoogleMarker,
5986
- Oi as GoogleMarkerClusterer,
5987
- yt as GoogleOverlay,
5988
- Ci as GooglePlacesService,
5989
- It as GooglePolygon,
5990
- kt as GooglePolyline,
5991
- At as GoogleRectangle,
5992
- ut as GoogleScaleControl,
5993
- Ei as GoogleSearchBox,
5994
- gt as GoogleZoomControl,
6054
+ kt as GoogleMarker,
6055
+ Ci as GoogleMarkerClusterer,
6056
+ bt as GoogleOverlay,
6057
+ wi as GooglePlacesService,
6058
+ Rt as GooglePolygon,
6059
+ St as GooglePolyline,
6060
+ zt as GoogleRectangle,
6061
+ mt as GoogleScaleControl,
6062
+ Li as GoogleSearchBox,
6063
+ yt as GoogleZoomControl,
5995
6064
  De as Icon,
5996
- Zs as ImageMapType,
5997
- bt as InfoWindow,
5998
- Zt as KeyValue,
6065
+ Ws as ImageMapType,
6066
+ Ot as InfoWindow,
6067
+ Wt as KeyValue,
5999
6068
  y as LatLng,
6000
- A as LatLngBounds,
6001
- Xs as LifecycleLogPlugin,
6002
- K as Location,
6069
+ R as LatLngBounds,
6070
+ Js as LifecycleLogPlugin,
6071
+ V as Location,
6003
6072
  we as MIXIN_HOOK_CREATE,
6004
6073
  Ee as MIXIN_HOOK_DESTROY,
6005
- Rt as MIXIN_MAP_NAME,
6074
+ Dt as MIXIN_MAP_NAME,
6006
6075
  ce as MVCArrays,
6007
- P as MapMixin,
6008
- R as MapType,
6076
+ x as MapMixin,
6077
+ $ as MapType,
6009
6078
  hr as MapTypeControlType,
6010
6079
  gr as MapUrls,
6011
6080
  xi as MapZoom,
@@ -6015,68 +6084,68 @@ export {
6015
6084
  Tr as PlacesService,
6016
6085
  X as Point,
6017
6086
  Mr as SearchBox,
6018
- Js as SphericalUtils,
6087
+ Qs as SphericalUtils,
6019
6088
  Te as Strings,
6020
- ze as SymbolIcon,
6021
- Vs as SymbolPath,
6022
- ls as TgCircle,
6023
- es as TgCustomControl,
6024
- us as TgElementOverlay,
6025
- ys as TgInfoBox,
6026
- bs as TgInfoWindow,
6027
- Os as TgLabel,
6089
+ Ne as SymbolIcon,
6090
+ Fs as SymbolPath,
6091
+ hs as TgCircle,
6092
+ ts as TgCustomControl,
6093
+ ps as TgElementOverlay,
6094
+ vs as TgInfoBox,
6095
+ Ts as TgInfoWindow,
6096
+ Cs as TgLabel,
6028
6097
  Le as TgMap,
6029
- st as TgMapFactory,
6098
+ at as TgMapFactory,
6030
6099
  G as TgMapType,
6031
- ts as TgMapTypeControl,
6032
- Xi as TgMapWidget,
6033
- Fe as TgMarker,
6034
- xr as TgMarkerClusterer,
6035
- Cs as TgPolygon,
6036
- ws as TgPolyline,
6037
- Es as TgRectangle,
6038
- rs as TgScaleControl,
6039
- as as TgTrafficLayer,
6040
- ss as TgZoomControl,
6041
- ui as TrafficLayer,
6042
- $e as UnionIcon,
6100
+ rs as TgMapTypeControl,
6101
+ Ji as TgMapWidget,
6102
+ qe as TgMarker,
6103
+ Pr as TgMarkerClusterer,
6104
+ ws as TgPolygon,
6105
+ Es as TgPolyline,
6106
+ Ls as TgRectangle,
6107
+ is as TgScaleControl,
6108
+ ls as TgTrafficLayer,
6109
+ ns as TgZoomControl,
6110
+ pi as TrafficLayer,
6111
+ ze as UnionIcon,
6043
6112
  oe as assert,
6044
- Qe as assertNever,
6045
- Pe as callHook,
6046
- Fs as computedSaveOnThis,
6113
+ rt as assertNever,
6114
+ xe as callHook,
6115
+ Us as computedSaveOnThis,
6047
6116
  Er as createEmptyVNode,
6048
- ji as createPropertyObject,
6049
- Us as createPropertyObjectTyped,
6050
- Ns as debug,
6051
- Qs as default,
6117
+ Vi as createPropertyObject,
6118
+ Ys as createPropertyObjectTyped,
6119
+ Gs as debug,
6120
+ en as default,
6052
6121
  L as eventProp,
6053
- qs as extractVNodeFromSlotsByComponent,
6054
- ot as findAncestorComponentByType,
6055
- Ys as findByComponentType,
6056
- ks as getDestination,
6122
+ Ks as extractVNodeFromSlotsByComponent,
6123
+ ht as findAncestorComponentByType,
6124
+ qs as findByComponentType,
6125
+ Bs as getDestination,
6057
6126
  ir as getTgMapConfig,
6058
- tt as isComponentByType,
6059
- Gs as isDef,
6060
- Qt as isEntryValueDef,
6061
- Rs as isInstanceOf,
6062
- As as lateinit,
6127
+ st as isComponentByType,
6128
+ Zs as isDef,
6129
+ Fr as isEntryValueDef,
6130
+ $s as isInstanceOf,
6131
+ Rs as lateinit,
6063
6132
  ve as noop,
6064
6133
  m as optionalProp,
6065
- Si as path,
6134
+ Ai as path,
6066
6135
  D as requiredProp,
6067
- $s as safeAs,
6068
- Jt as safeAsComponent,
6069
- ai as setTgMapConfig,
6070
- Vi as splitAttrs,
6136
+ zs as safeAs,
6137
+ Qt as safeAsComponent,
6138
+ li as setTgMapConfig,
6139
+ Fi as splitAttrs,
6071
6140
  Z as stringEnumProp,
6072
- Hi as stringUnionPropFromValues,
6141
+ ji as stringUnionPropFromValues,
6073
6142
  C as throwError,
6074
- at as throwUnsupported,
6075
- zs as todo,
6076
- et as typed,
6143
+ ct as throwUnsupported,
6144
+ Ns as todo,
6145
+ it as typed,
6077
6146
  Ds as unwrapStringEnumValue,
6078
- Ks as useEventLogMethods,
6079
- Y as useSplittedAttrs,
6080
- is as useTgMapInner
6147
+ Xs as useEventLogMethods,
6148
+ q as useSplittedAttrs,
6149
+ ss as useTgMapInner
6081
6150
  };
6082
6151
  //# sourceMappingURL=tg-map.js.map