@heycar/heycars-map 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +22 -0
  2. package/dist/business-components/BusinessTaxiServiceMap/index.d.ts +1 -0
  3. package/dist/business-components/DrivingRoute/DrivingRoute.d.ts +2 -0
  4. package/dist/business-components/FitView/FitView.d.ts +9 -0
  5. package/dist/business-components/FitView/index.d.ts +1 -0
  6. package/dist/business-components/PickupPoints/PickupPoints.d.ts +2 -1
  7. package/dist/business-components/PlaceCircle/PlaceCircle.d.ts +5 -3
  8. package/dist/business-components/WalkingRoute/WalkingRoute.d.ts +0 -1
  9. package/dist/components/AmapMarker/AmapMarker.d.ts +5 -2
  10. package/dist/components/Demo/DemoBusinessTaxiService.d.ts +2 -0
  11. package/dist/components/GmapAdvancedMarkerView/GmapAdvancedMarkerView.d.ts +5 -2
  12. package/dist/hooks/useGeoLocation.d.ts +4 -0
  13. package/dist/hooks/useMapFitView.d.ts +6 -2296
  14. package/dist/hooks-business/useBusinessMapFitView.d.ts +2228 -2234
  15. package/dist/hooks-business/useBusinessMapRecomendPlace.d.ts +4 -1
  16. package/dist/index.cjs +52 -52
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.js +2072 -1698
  19. package/dist/types/interface.d.ts +1 -0
  20. package/dist/utils/compare.d.ts +1 -1
  21. package/package.json +1 -1
  22. package/src/App.tsx +1 -0
  23. package/src/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.tsx +285 -0
  24. package/src/business-components/BusinessTaxiServiceMap/index.ts +1 -0
  25. package/src/business-components/DrivingRoute/DrivingRoute.tsx +2 -0
  26. package/src/business-components/FitView/FitView.tsx +14 -0
  27. package/src/business-components/FitView/index.ts +1 -0
  28. package/src/business-components/PickupPoints/PickupPoints.tsx +8 -2
  29. package/src/business-components/PlaceCircle/PlaceCircle.tsx +32 -8
  30. package/src/business-components/WalkingRoute/WalkingRoute.tsx +0 -1
  31. package/src/components/AmapMarker/AmapMarker.ts +10 -3
  32. package/src/components/Demo/DemoBusinessTaxiService.tsx +48 -0
  33. package/src/components/Demo/HeycarDemo.tsx +18 -8
  34. package/src/components/GmapAdvancedMarkerView/GmapAdvancedMarkerView.ts +15 -4
  35. package/src/hooks/useDrivingRoute.ts +0 -2
  36. package/src/hooks/useGeoLocation.ts +5 -1
  37. package/src/hooks/useMapFitView.ts +8 -1
  38. package/src/hooks/useWalkingRoute.ts +15 -9
  39. package/src/hooks-business/useBusinessMapRecomendPlace.ts +23 -0
  40. package/src/index.ts +1 -0
  41. package/src/types/interface.ts +12 -0
  42. package/src/utils/compare.ts +4 -1
  43. package/todo.md +7 -0
package/dist/index.js CHANGED
@@ -1,114 +1,114 @@
1
- import ln, { inject as Ae, provide as Le, watch as b, defineComponent as $e, h as m, watchPostEffect as k, shallowRef as w, onMounted as ge, onUnmounted as Ie, computed as L, reactive as x, toRefs as _e, ref as D, watchEffect as dn } from "vue";
2
- ln.util.warn;
3
- const Ke = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNiIgaGVpZ2h0PSIxMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMSAxbDQgNC00IDQiIHN0cm9rZT0iI0ZGRiIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG9wYWNpdHk9Ii44Ii8+PC9zdmc+", T = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTdweCIgaGVpZ2h0PSIxN3B4IiB2aWV3Qm94PSIwIDAgMTcgMTciIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0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HJpeCIgaW49InNoYWRvd0JsdXJPdXRlcjEiPjwvZmVDb2xvck1hdHJpeD4KICAgICAgICA8L2ZpbHRlcj4KICAgIDwvZGVmcz4KICAgIDxnIGlkPSIxLjAiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLpppbpobUt5Y2z5pe255So6L2mLeaLluWKqOWFieaghyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIyOC4wMDAwMDAsIC0zMjIuMDAwMDAwKSI+CiAgICAgICAgICAgIDxnIGlkPSLmpK3lnIblvaIiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIzMi4wMDAwMDAsIDMyMS4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDx1c2UgZmlsbD0iYmxhY2siIGZpbGwtb3BhY2l0eT0iMSIgZmlsdGVyPSJ1cmwoI2ZpbHRlci0yKSIgeGxpbms6aHJlZj0iI3BhdGgtMSI+PC91c2U+CiAgICAgICAgICAgICAgICA8dXNlIHN0cm9rZT0iI0ZGRkZGRiIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSIjMzQ2RUZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHhsaW5rOmhyZWY9IiNwYXRoLTEiPjwvdXNlPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=", qe = Symbol(), j = () => {
4
- const t = Ae(qe);
1
+ import Nn, { inject as Ne, provide as Se, watch as P, defineComponent as at, h as M, watchPostEffect as B, shallowRef as w, onMounted as fe, onUnmounted as pe, computed as L, ref as h, reactive as C, toRefs as ot, watchEffect as Sn } from "vue";
2
+ Nn.util.warn;
3
+ const rt = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNiIgaGVpZ2h0PSIxMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj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HhsaW5rOmhyZWY9IiNwYXRoLTEiPjwvdXNlPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=", st = Symbol(), j = () => {
4
+ const t = Ne(st);
5
5
  if (!t)
6
6
  throw new Error("MyError: useMapSupplier should be under MapProvider");
7
7
  return t;
8
- }, gn = (t) => Le(qe, t), et = Symbol("amap"), Ne = () => Ae(et), In = (t) => Le(et, t), tt = Symbol("gmap"), Se = () => Ae(tt), Mn = (t) => Le(tt, t), nt = (t) => {
8
+ }, hn = (t) => Se(st, t), ct = Symbol("amap"), he = () => Ne(ct), Dn = (t) => Se(ct, t), ut = Symbol("gmap"), De = () => Ne(ut), Cn = (t) => Se(ut, t), lt = (t) => {
9
9
  const { registerOverlay: e, overlayRef: n } = t;
10
- b(
10
+ P(
11
11
  () => n.value,
12
12
  (i, a) => {
13
13
  e && (a && e.remove(a), i && e.add(i));
14
14
  }
15
15
  );
16
16
  };
17
- var fn = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}, mn = typeof global == "object" && global && global.Object === Object && global;
18
- const pn = mn;
19
- var vn = typeof self == "object" && self && self.Object === Object && self, yn = pn || vn || Function("return this")();
20
- const it = yn;
21
- var jn = it.Symbol;
22
- const V = jn;
23
- var at = Object.prototype, An = at.hasOwnProperty, Ln = at.toString, $ = V ? V.toStringTag : void 0;
24
- function Nn(t) {
25
- var e = An.call(t, $), n = t[$];
17
+ var xn = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}, wn = typeof global == "object" && global && global.Object === Object && global;
18
+ const bn = wn;
19
+ var Pn = typeof self == "object" && self && self.Object === Object && self, zn = bn || Pn || Function("return this")();
20
+ const dt = zn;
21
+ var Tn = dt.Symbol;
22
+ const $ = Tn;
23
+ var gt = Object.prototype, En = gt.hasOwnProperty, Zn = gt.toString, te = $ ? $.toStringTag : void 0;
24
+ function Rn(t) {
25
+ var e = En.call(t, te), n = t[te];
26
26
  try {
27
- t[$] = void 0;
27
+ t[te] = void 0;
28
28
  var i = !0;
29
29
  } catch {
30
30
  }
31
- var a = Ln.call(t);
32
- return i && (e ? t[$] = n : delete t[$]), a;
31
+ var a = Zn.call(t);
32
+ return i && (e ? t[te] = n : delete t[te]), a;
33
33
  }
34
- var Sn = Object.prototype, Dn = Sn.toString;
35
- function hn(t) {
36
- return Dn.call(t);
34
+ var kn = Object.prototype, Gn = kn.toString;
35
+ function On(t) {
36
+ return Gn.call(t);
37
37
  }
38
- var xn = "[object Null]", Cn = "[object Undefined]", we = V ? V.toStringTag : void 0;
39
- function wn(t) {
40
- return t == null ? t === void 0 ? Cn : xn : we && we in Object(t) ? Nn(t) : hn(t);
38
+ var Wn = "[object Null]", Un = "[object Undefined]", Re = $ ? $.toStringTag : void 0;
39
+ function Bn(t) {
40
+ return t == null ? t === void 0 ? Un : Wn : Re && Re in Object(t) ? Rn(t) : On(t);
41
41
  }
42
- function bn(t) {
42
+ function Yn(t) {
43
43
  return t != null && typeof t == "object";
44
44
  }
45
- var Pn = "[object Symbol]";
46
- function ot(t) {
47
- return typeof t == "symbol" || bn(t) && wn(t) == Pn;
45
+ var Hn = "[object Symbol]";
46
+ function It(t) {
47
+ return typeof t == "symbol" || Yn(t) && Bn(t) == Hn;
48
48
  }
49
- function zn(t, e) {
49
+ function Vn(t, e) {
50
50
  for (var n = -1, i = t == null ? 0 : t.length, a = Array(i); ++n < i; )
51
51
  a[n] = e(t[n], n, t);
52
52
  return a;
53
53
  }
54
- var En = Array.isArray;
55
- const Zn = En;
56
- var Tn = 1 / 0, be = V ? V.prototype : void 0, Pe = be ? be.toString : void 0;
57
- function rt(t) {
54
+ var Qn = Array.isArray;
55
+ const Jn = Qn;
56
+ var Xn = 1 / 0, ke = $ ? $.prototype : void 0, Ge = ke ? ke.toString : void 0;
57
+ function Mt(t) {
58
58
  if (typeof t == "string")
59
59
  return t;
60
- if (Zn(t))
61
- return zn(t, rt) + "";
62
- if (ot(t))
63
- return Pe ? Pe.call(t) : "";
60
+ if (Jn(t))
61
+ return Vn(t, Mt) + "";
62
+ if (It(t))
63
+ return Ge ? Ge.call(t) : "";
64
64
  var e = t + "";
65
- return e == "0" && 1 / t == -Tn ? "-0" : e;
65
+ return e == "0" && 1 / t == -Xn ? "-0" : e;
66
66
  }
67
- var Rn = /\s/;
68
- function Gn(t) {
69
- for (var e = t.length; e-- && Rn.test(t.charAt(e)); )
67
+ var Fn = /\s/;
68
+ function $n(t) {
69
+ for (var e = t.length; e-- && Fn.test(t.charAt(e)); )
70
70
  ;
71
71
  return e;
72
72
  }
73
- var kn = /^\s+/;
74
- function On(t) {
75
- return t && t.slice(0, Gn(t) + 1).replace(kn, "");
73
+ var _n = /^\s+/;
74
+ function Kn(t) {
75
+ return t && t.slice(0, $n(t) + 1).replace(_n, "");
76
76
  }
77
- function pe(t) {
77
+ function je(t) {
78
78
  var e = typeof t;
79
79
  return t != null && (e == "object" || e == "function");
80
80
  }
81
- var ze = 0 / 0, Wn = /^[-+]0x[0-9a-f]+$/i, Un = /^0b[01]+$/i, Bn = /^0o[0-7]+$/i, Yn = parseInt;
82
- function Ee(t) {
81
+ var Oe = 0 / 0, qn = /^[-+]0x[0-9a-f]+$/i, ei = /^0b[01]+$/i, ti = /^0o[0-7]+$/i, ni = parseInt;
82
+ function We(t) {
83
83
  if (typeof t == "number")
84
84
  return t;
85
- if (ot(t))
86
- return ze;
87
- if (pe(t)) {
85
+ if (It(t))
86
+ return Oe;
87
+ if (je(t)) {
88
88
  var e = typeof t.valueOf == "function" ? t.valueOf() : t;
89
- t = pe(e) ? e + "" : e;
89
+ t = je(e) ? e + "" : e;
90
90
  }
91
91
  if (typeof t != "string")
92
92
  return t === 0 ? t : +t;
93
- t = On(t);
94
- var n = Un.test(t);
95
- return n || Bn.test(t) ? Yn(t.slice(2), n ? 2 : 8) : Wn.test(t) ? ze : +t;
93
+ t = Kn(t);
94
+ var n = ei.test(t);
95
+ return n || ti.test(t) ? ni(t.slice(2), n ? 2 : 8) : qn.test(t) ? Oe : +t;
96
96
  }
97
- function st(t) {
98
- return t == null ? "" : rt(t);
97
+ function mt(t) {
98
+ return t == null ? "" : Mt(t);
99
99
  }
100
- function Hn(t, e, n, i) {
100
+ function ii(t, e, n, i) {
101
101
  var a = -1, o = t == null ? 0 : t.length;
102
102
  for (i && o && (n = t[++a]); ++a < o; )
103
103
  n = e(n, t[a], a, t);
104
104
  return n;
105
105
  }
106
- function Vn(t) {
106
+ function ai(t) {
107
107
  return function(e) {
108
108
  return t == null ? void 0 : t[e];
109
109
  };
110
110
  }
111
- var Qn = {
111
+ var oi = {
112
112
  // Latin-1 Supplement block.
113
113
  À: "A",
114
114
  Á: "A",
@@ -301,105 +301,105 @@ var Qn = {
301
301
  œ: "oe",
302
302
  ʼn: "'n",
303
303
  ſ: "s"
304
- }, Jn = Vn(Qn);
305
- const Xn = Jn;
306
- var Fn = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, $n = "\\u0300-\\u036f", _n = "\\ufe20-\\ufe2f", Kn = "\\u20d0-\\u20ff", qn = $n + _n + Kn, ei = "[" + qn + "]", ti = RegExp(ei, "g");
307
- function ni(t) {
308
- return t = st(t), t && t.replace(Fn, Xn).replace(ti, "");
304
+ }, ri = ai(oi);
305
+ const si = ri;
306
+ var ci = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, ui = "\\u0300-\\u036f", li = "\\ufe20-\\ufe2f", di = "\\u20d0-\\u20ff", gi = ui + li + di, Ii = "[" + gi + "]", Mi = RegExp(Ii, "g");
307
+ function mi(t) {
308
+ return t = mt(t), t && t.replace(ci, si).replace(Mi, "");
309
309
  }
310
- var ii = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
311
- function ai(t) {
312
- return t.match(ii) || [];
310
+ var fi = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
311
+ function pi(t) {
312
+ return t.match(fi) || [];
313
313
  }
314
- var oi = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
315
- function ri(t) {
316
- return oi.test(t);
314
+ var vi = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
315
+ function yi(t) {
316
+ return vi.test(t);
317
317
  }
318
- var ct = "\\ud800-\\udfff", si = "\\u0300-\\u036f", ci = "\\ufe20-\\ufe2f", ui = "\\u20d0-\\u20ff", li = si + ci + ui, ut = "\\u2700-\\u27bf", lt = "a-z\\xdf-\\xf6\\xf8-\\xff", di = "\\xac\\xb1\\xd7\\xf7", gi = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", Ii = "\\u2000-\\u206f", Mi = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", dt = "A-Z\\xc0-\\xd6\\xd8-\\xde", fi = "\\ufe0e\\ufe0f", gt = di + gi + Ii + Mi, It = "['’]", Ze = "[" + gt + "]", mi = "[" + li + "]", Mt = "\\d+", pi = "[" + ut + "]", ft = "[" + lt + "]", mt = "[^" + ct + gt + Mt + ut + lt + dt + "]", vi = "\\ud83c[\\udffb-\\udfff]", yi = "(?:" + mi + "|" + vi + ")", ji = "[^" + ct + "]", pt = "(?:\\ud83c[\\udde6-\\uddff]){2}", vt = "[\\ud800-\\udbff][\\udc00-\\udfff]", B = "[" + dt + "]", Ai = "\\u200d", Te = "(?:" + ft + "|" + mt + ")", Li = "(?:" + B + "|" + mt + ")", Re = "(?:" + It + "(?:d|ll|m|re|s|t|ve))?", Ge = "(?:" + It + "(?:D|LL|M|RE|S|T|VE))?", yt = yi + "?", jt = "[" + fi + "]?", Ni = "(?:" + Ai + "(?:" + [ji, pt, vt].join("|") + ")" + jt + yt + ")*", Si = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Di = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", hi = jt + yt + Ni, xi = "(?:" + [pi, pt, vt].join("|") + ")" + hi, Ci = RegExp([
319
- B + "?" + ft + "+" + Re + "(?=" + [Ze, B, "$"].join("|") + ")",
320
- Li + "+" + Ge + "(?=" + [Ze, B + Te, "$"].join("|") + ")",
321
- B + "?" + Te + "+" + Re,
322
- B + "+" + Ge,
323
- Di,
324
- Si,
325
- Mt,
326
- xi
318
+ var ft = "\\ud800-\\udfff", ji = "\\u0300-\\u036f", Ai = "\\ufe20-\\ufe2f", Li = "\\u20d0-\\u20ff", Ni = ji + Ai + Li, pt = "\\u2700-\\u27bf", vt = "a-z\\xdf-\\xf6\\xf8-\\xff", Si = "\\xac\\xb1\\xd7\\xf7", hi = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", Di = "\\u2000-\\u206f", Ci = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", yt = "A-Z\\xc0-\\xd6\\xd8-\\xde", xi = "\\ufe0e\\ufe0f", jt = Si + hi + Di + Ci, At = "['’]", Ue = "[" + jt + "]", wi = "[" + Ni + "]", Lt = "\\d+", bi = "[" + pt + "]", Nt = "[" + vt + "]", St = "[^" + ft + jt + Lt + pt + vt + yt + "]", Pi = "\\ud83c[\\udffb-\\udfff]", zi = "(?:" + wi + "|" + Pi + ")", Ti = "[^" + ft + "]", ht = "(?:\\ud83c[\\udde6-\\uddff]){2}", Dt = "[\\ud800-\\udbff][\\udc00-\\udfff]", J = "[" + yt + "]", Ei = "\\u200d", Be = "(?:" + Nt + "|" + St + ")", Zi = "(?:" + J + "|" + St + ")", Ye = "(?:" + At + "(?:d|ll|m|re|s|t|ve))?", He = "(?:" + At + "(?:D|LL|M|RE|S|T|VE))?", Ct = zi + "?", xt = "[" + xi + "]?", Ri = "(?:" + Ei + "(?:" + [Ti, ht, Dt].join("|") + ")" + xt + Ct + ")*", ki = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Gi = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", Oi = xt + Ct + Ri, Wi = "(?:" + [bi, ht, Dt].join("|") + ")" + Oi, Ui = RegExp([
319
+ J + "?" + Nt + "+" + Ye + "(?=" + [Ue, J, "$"].join("|") + ")",
320
+ Zi + "+" + He + "(?=" + [Ue, J + Be, "$"].join("|") + ")",
321
+ J + "?" + Be + "+" + Ye,
322
+ J + "+" + He,
323
+ Gi,
324
+ ki,
325
+ Lt,
326
+ Wi
327
327
  ].join("|"), "g");
328
- function wi(t) {
329
- return t.match(Ci) || [];
328
+ function Bi(t) {
329
+ return t.match(Ui) || [];
330
330
  }
331
- function bi(t, e, n) {
332
- return t = st(t), e = n ? void 0 : e, e === void 0 ? ri(t) ? wi(t) : ai(t) : t.match(e) || [];
331
+ function Yi(t, e, n) {
332
+ return t = mt(t), e = n ? void 0 : e, e === void 0 ? yi(t) ? Bi(t) : pi(t) : t.match(e) || [];
333
333
  }
334
- var Pi = "['’]", zi = RegExp(Pi, "g");
335
- function Ei(t) {
334
+ var Hi = "['’]", Vi = RegExp(Hi, "g");
335
+ function Qi(t) {
336
336
  return function(e) {
337
- return Hn(bi(ni(e).replace(zi, "")), t, "");
337
+ return ii(Yi(mi(e).replace(Vi, "")), t, "");
338
338
  };
339
339
  }
340
- var Zi = function() {
341
- return it.Date.now();
340
+ var Ji = function() {
341
+ return dt.Date.now();
342
342
  };
343
- const me = Zi;
344
- var Ti = "Expected a function", Ri = Math.max, Gi = Math.min;
345
- function ki(t, e, n) {
343
+ const ye = Ji;
344
+ var Xi = "Expected a function", Fi = Math.max, $i = Math.min;
345
+ function _i(t, e, n) {
346
346
  var i, a, o, r, s, u, l = 0, d = !1, c = !1, g = !0;
347
347
  if (typeof t != "function")
348
- throw new TypeError(Ti);
349
- e = Ee(e) || 0, pe(n) && (d = !!n.leading, c = "maxWait" in n, o = c ? Ri(Ee(n.maxWait) || 0, e) : o, g = "trailing" in n ? !!n.trailing : g);
350
- function I(N) {
351
- var Z = i, W = a;
352
- return i = a = void 0, l = N, r = t.apply(W, Z), r;
348
+ throw new TypeError(Xi);
349
+ e = We(e) || 0, je(n) && (d = !!n.leading, c = "maxWait" in n, o = c ? Fi(We(n.maxWait) || 0, e) : o, g = "trailing" in n ? !!n.trailing : g);
350
+ function I(S) {
351
+ var Z = i, H = a;
352
+ return i = a = void 0, l = S, r = t.apply(H, Z), r;
353
353
  }
354
- function M(N) {
355
- return l = N, s = setTimeout(A, e), d ? I(N) : r;
354
+ function m(S) {
355
+ return l = S, s = setTimeout(A, e), d ? I(S) : r;
356
356
  }
357
- function f(N) {
358
- var Z = N - u, W = N - l, F = e - Z;
359
- return c ? Gi(F, o - W) : F;
357
+ function f(S) {
358
+ var Z = S - u, H = S - l, k = e - Z;
359
+ return c ? $i(k, o - H) : k;
360
360
  }
361
- function p(N) {
362
- var Z = N - u, W = N - l;
363
- return u === void 0 || Z >= e || Z < 0 || c && W >= o;
361
+ function p(S) {
362
+ var Z = S - u, H = S - l;
363
+ return u === void 0 || Z >= e || Z < 0 || c && H >= o;
364
364
  }
365
365
  function A() {
366
- var N = me();
367
- if (p(N))
368
- return y(N);
369
- s = setTimeout(A, f(N));
366
+ var S = ye();
367
+ if (p(S))
368
+ return y(S);
369
+ s = setTimeout(A, f(S));
370
370
  }
371
- function y(N) {
372
- return s = void 0, g && i ? I(N) : (i = a = void 0, r);
371
+ function y(S) {
372
+ return s = void 0, g && i ? I(S) : (i = a = void 0, r);
373
373
  }
374
- function h() {
374
+ function D() {
375
375
  s !== void 0 && clearTimeout(s), l = 0, i = u = a = s = void 0;
376
376
  }
377
- function P() {
378
- return s === void 0 ? r : y(me());
377
+ function z() {
378
+ return s === void 0 ? r : y(ye());
379
379
  }
380
- function O() {
381
- var N = me(), Z = p(N);
382
- if (i = arguments, a = this, u = N, Z) {
380
+ function Y() {
381
+ var S = ye(), Z = p(S);
382
+ if (i = arguments, a = this, u = S, Z) {
383
383
  if (s === void 0)
384
- return M(u);
384
+ return m(u);
385
385
  if (c)
386
386
  return clearTimeout(s), s = setTimeout(A, e), I(u);
387
387
  }
388
388
  return s === void 0 && (s = setTimeout(A, e)), r;
389
389
  }
390
- return O.cancel = h, O.flush = P, O;
390
+ return Y.cancel = D, Y.flush = z, Y;
391
391
  }
392
- var Oi = Ei(function(t, e, n) {
392
+ var Ki = Qi(function(t, e, n) {
393
393
  return t + (n ? "-" : "") + e.toLowerCase();
394
394
  });
395
- const At = Oi;
395
+ const wt = Ki;
396
396
  function v(t) {
397
- return $e({
397
+ return at({
398
398
  name: t.name,
399
399
  inheritAttrs: !1,
400
400
  setup(e, n) {
401
401
  const { attrs: i, slots: a, emit: o } = n, r = i, s = o, u = (d, c) => {
402
- const g = At(d);
402
+ const g = wt(d);
403
403
  s(d, c), d !== g && s(g, c);
404
404
  }, l = new Proxy(a, {
405
405
  get(d, c, g) {
@@ -411,15 +411,15 @@ function v(t) {
411
411
  }
412
412
  });
413
413
  }
414
- function Me(t) {
414
+ function Q(t) {
415
415
  return {
416
- props: (e) => $e({
416
+ props: (e) => at({
417
417
  name: t.name,
418
418
  inheritAttrs: !1,
419
419
  props: e,
420
420
  setup(n, i) {
421
421
  const a = n, { slots: o, emit: r } = i, s = r, u = (d, c) => {
422
- const g = At(d);
422
+ const g = wt(d);
423
423
  s(d, c), d !== g && s(g, c);
424
424
  }, l = new Proxy(o, {
425
425
  get(d, c, g) {
@@ -432,21 +432,21 @@ function Me(t) {
432
432
  })
433
433
  };
434
434
  }
435
- const E = m, De = "zh-CN", ke = (t) => t != null && typeof t == "object" && Number.isFinite(t.lat) && Number.isFinite(t.lng);
436
- var Wi = typeof WeakMap == "function", Oe = Object.keys;
437
- function ae(t, e) {
435
+ const E = M, Ce = "zh-CN", Ve = (t) => t != null && typeof t == "object" && Number.isFinite(t.lat) && Number.isFinite(t.lng);
436
+ var qi = typeof WeakMap == "function", Qe = Object.keys;
437
+ function ue(t, e) {
438
438
  return t === e || t !== t && e !== e;
439
439
  }
440
- function We(t) {
440
+ function Je(t) {
441
441
  return t.constructor === Object || t.constructor == null;
442
442
  }
443
- function Ue(t) {
443
+ function Xe(t) {
444
444
  return !!t && typeof t.then == "function";
445
445
  }
446
- function Be(t) {
446
+ function Fe(t) {
447
447
  return !!(t && t.$$typeof);
448
448
  }
449
- function Ui() {
449
+ function ea() {
450
450
  var t = [];
451
451
  return {
452
452
  delete: function(e) {
@@ -471,31 +471,31 @@ function Ui() {
471
471
  }
472
472
  };
473
473
  }
474
- var Bi = function(t) {
474
+ var ta = function(t) {
475
475
  return t ? function() {
476
476
  return /* @__PURE__ */ new WeakMap();
477
- } : Ui;
478
- }(Wi);
479
- function Lt(t) {
477
+ } : ea;
478
+ }(qi);
479
+ function bt(t) {
480
480
  return function(n) {
481
481
  var i = t || n;
482
482
  return function(o, r, s, u, l, d, c) {
483
- c === void 0 && (c = Bi());
483
+ c === void 0 && (c = ta());
484
484
  var g = !!o && typeof o == "object", I = !!r && typeof r == "object";
485
485
  if (g !== I)
486
486
  return !1;
487
487
  if (!g && !I)
488
488
  return i(o, r, c);
489
- var M = c.get(o);
490
- if (M && c.get(r))
491
- return M === r;
489
+ var m = c.get(o);
490
+ if (m && c.get(r))
491
+ return m === r;
492
492
  c.set(o, r), c.set(r, o);
493
493
  var f = i(o, r, c);
494
494
  return c.delete(o), c.delete(r), f;
495
495
  };
496
496
  };
497
497
  }
498
- function Yi(t, e, n, i) {
498
+ function na(t, e, n, i) {
499
499
  var a = t.length;
500
500
  if (e.length !== a)
501
501
  return !1;
@@ -504,7 +504,7 @@ function Yi(t, e, n, i) {
504
504
  return !1;
505
505
  return !0;
506
506
  }
507
- function Hi(t, e, n, i) {
507
+ function ia(t, e, n, i) {
508
508
  var a = t.size === e.size;
509
509
  if (a && t.size) {
510
510
  var o = {}, r = 0;
@@ -519,31 +519,31 @@ function Hi(t, e, n, i) {
519
519
  }
520
520
  return a;
521
521
  }
522
- var Vi = "_owner", Qi = Function.prototype.bind.call(Function.prototype.call, Object.prototype.hasOwnProperty);
523
- function Ye(t, e, n, i) {
524
- var a = Oe(t), o = a.length;
525
- if (Oe(e).length !== o)
522
+ var aa = "_owner", oa = Function.prototype.bind.call(Function.prototype.call, Object.prototype.hasOwnProperty);
523
+ function $e(t, e, n, i) {
524
+ var a = Qe(t), o = a.length;
525
+ if (Qe(e).length !== o)
526
526
  return !1;
527
527
  if (o)
528
528
  for (var r = void 0; o-- > 0; ) {
529
- if (r = a[o], r === Vi) {
530
- var s = Be(t), u = Be(e);
529
+ if (r = a[o], r === aa) {
530
+ var s = Fe(t), u = Fe(e);
531
531
  if ((s || u) && s !== u)
532
532
  return !1;
533
533
  }
534
- if (!Qi(e, r) || !n(t[r], e[r], r, r, t, e, i))
534
+ if (!oa(e, r) || !n(t[r], e[r], r, r, t, e, i))
535
535
  return !1;
536
536
  }
537
537
  return !0;
538
538
  }
539
- var Ji = function() {
539
+ var ra = function() {
540
540
  return /foo/g.flags === "g" ? function(e, n) {
541
541
  return e.source === n.source && e.flags === n.flags;
542
542
  } : function(e, n) {
543
543
  return e.source === n.source && e.global === n.global && e.ignoreCase === n.ignoreCase && e.multiline === n.multiline && e.unicode === n.unicode && e.sticky === n.sticky && e.lastIndex === n.lastIndex;
544
544
  };
545
545
  }();
546
- function Xi(t, e, n, i) {
546
+ function sa(t, e, n, i) {
547
547
  var a = t.size === e.size;
548
548
  if (a && t.size) {
549
549
  var o = {};
@@ -558,8 +558,8 @@ function Xi(t, e, n, i) {
558
558
  }
559
559
  return a;
560
560
  }
561
- var Fi = typeof Map == "function", $i = typeof Set == "function", He = Object.prototype.valueOf;
562
- function ee(t) {
561
+ var ca = typeof Map == "function", ua = typeof Set == "function", _e = Object.prototype.valueOf;
562
+ function oe(t) {
563
563
  var e = (
564
564
  /* eslint-disable no-use-before-define */
565
565
  typeof t == "function" ? t(n) : function(i, a, o, r, s, u, l) {
@@ -570,39 +570,39 @@ function ee(t) {
570
570
  if (i === a)
571
571
  return !0;
572
572
  if (i && a && typeof i == "object" && typeof a == "object") {
573
- if (We(i) && We(a))
574
- return Ye(i, a, e, o);
573
+ if (Je(i) && Je(a))
574
+ return $e(i, a, e, o);
575
575
  var r = Array.isArray(i), s = Array.isArray(a);
576
- return r || s ? r === s && Yi(i, a, e, o) : (r = i instanceof Date, s = a instanceof Date, r || s ? r === s && ae(i.getTime(), a.getTime()) : (r = i instanceof RegExp, s = a instanceof RegExp, r || s ? r === s && Ji(i, a) : Ue(i) || Ue(a) ? i === a : Fi && (r = i instanceof Map, s = a instanceof Map, r || s) ? r === s && Hi(i, a, e, o) : $i && (r = i instanceof Set, s = a instanceof Set, r || s) ? r === s && Xi(i, a, e, o) : i.valueOf !== He || a.valueOf !== He ? ae(i.valueOf(), a.valueOf()) : Ye(i, a, e, o)));
576
+ return r || s ? r === s && na(i, a, e, o) : (r = i instanceof Date, s = a instanceof Date, r || s ? r === s && ue(i.getTime(), a.getTime()) : (r = i instanceof RegExp, s = a instanceof RegExp, r || s ? r === s && ra(i, a) : Xe(i) || Xe(a) ? i === a : ca && (r = i instanceof Map, s = a instanceof Map, r || s) ? r === s && ia(i, a, e, o) : ua && (r = i instanceof Set, s = a instanceof Set, r || s) ? r === s && sa(i, a, e, o) : i.valueOf !== _e || a.valueOf !== _e ? ue(i.valueOf(), a.valueOf()) : $e(i, a, e, o)));
577
577
  }
578
578
  return i !== i && a !== a;
579
579
  }
580
580
  return n;
581
581
  }
582
- ee();
583
- ee(function() {
584
- return ae;
582
+ oe();
583
+ oe(function() {
584
+ return ue;
585
585
  });
586
- ee(Lt());
587
- ee(Lt(ae));
588
- const C = ([t, e]) => ({
586
+ oe(bt());
587
+ oe(bt(ue));
588
+ const x = ([t, e]) => ({
589
589
  lng: t,
590
590
  lat: e
591
- }), fe = (t) => {
591
+ }), ve = (t) => {
592
592
  const e = [], n = t.split("*");
593
593
  for (const [i, a] of n.entries())
594
594
  a && e.push({ value: a, type: i % 2 === 0 ? "normal" : "emphasize" });
595
595
  return e;
596
- }, Nt = (t) => `${t.charAt(2).toLocaleLowerCase()}${t.slice(3)}`, St = (t) => t.slice(2).toLowerCase(), _i = (t) => {
596
+ }, Pt = (t) => `${t.charAt(2).toLocaleLowerCase()}${t.slice(3)}`, zt = (t) => t.slice(2).toLowerCase(), la = (t) => {
597
597
  switch (t) {
598
598
  case "en":
599
599
  return "style_en";
600
600
  case "zh":
601
601
  return "style_zh_cn";
602
602
  }
603
- }, ve = (t) => [t.lng, t.lat], Dt = (t) => (...e) => {
603
+ }, b = (t) => [t.lng, t.lat], Tt = (t) => (...e) => {
604
604
  setTimeout(() => t == null ? void 0 : t(...e));
605
- }, Ki = (t) => {
605
+ }, da = (t) => {
606
606
  const { address_components: e } = t, n = e.find(
607
607
  (a) => a.types[0] === "administrative_area_level_1" || a.types[0] === "administrative_area_level_2"
608
608
  );
@@ -611,44 +611,44 @@ const C = ([t, e]) => ({
611
611
  const i = e.findIndex((a) => a.types[0] === "country");
612
612
  if (i > 0)
613
613
  return e[i - 1].long_name;
614
- }, ht = ee((t) => (e, n) => ke(e) || ke(n) ? new google.maps.LatLng(e).equals(new google.maps.LatLng(n)) : t(e, n));
615
- function xt() {
614
+ }, Et = oe((t) => (e, n) => Ve(e) || Ve(n) ? new google.maps.LatLng(e).equals(new google.maps.LatLng(n)) : t(e, n));
615
+ function Zt() {
616
616
  let t;
617
617
  return function(n) {
618
- return ht(n, t) || (t = n), t;
618
+ return Et(n, t) || (t = n), t;
619
619
  };
620
620
  }
621
- function te(t, e, n) {
622
- const i = xt();
623
- return b(() => i(t()), e, {
621
+ function re(t, e, n) {
622
+ const i = Zt();
623
+ return P(() => i(t()), e, {
624
624
  immediate: !1,
625
625
  flush: "post",
626
626
  ...n
627
627
  });
628
628
  }
629
- function Q(t, e, n) {
630
- const i = xt();
631
- return b(() => i(t()), e, {
629
+ function K(t, e, n) {
630
+ const i = Zt();
631
+ return P(() => i(t()), e, {
632
632
  immediate: !0,
633
633
  flush: "post",
634
634
  ...n
635
635
  });
636
636
  }
637
- function qi(t) {
637
+ function ga(t) {
638
638
  return `set${t.charAt(0).toUpperCase()}${t.slice(1)}`;
639
639
  }
640
- function ea(t, e, n, i) {
640
+ function Ia(t, e, n, i) {
641
641
  const a = n.map(
642
642
  ({ name: o }) => () => e[o]
643
643
  );
644
- b(
644
+ P(
645
645
  a,
646
646
  (o, r) => {
647
647
  const s = t.value;
648
648
  if (s)
649
649
  for (const [u, l] of o.entries()) {
650
650
  const { name: d, defaultValue: c } = n[u], g = r[u];
651
- ht(l, g) || s[qi(d)](l != null ? l : c);
651
+ Et(l, g) || s[ga(d)](l != null ? l : c);
652
652
  }
653
653
  },
654
654
  {
@@ -658,20 +658,20 @@ function ea(t, e, n, i) {
658
658
  }
659
659
  );
660
660
  }
661
- function he(t, e, n, i) {
662
- return ea(t, e, n, {
661
+ function xe(t, e, n, i) {
662
+ return Ia(t, e, n, {
663
663
  immediate: !1,
664
664
  ...i
665
665
  });
666
666
  }
667
- function oe(t, e, n, i) {
668
- k((a) => {
667
+ function ie(t, e, n, i) {
668
+ B((a) => {
669
669
  const o = t == null ? void 0 : t.value;
670
670
  if (!o)
671
671
  return;
672
672
  const r = [];
673
673
  for (const s of i) {
674
- const u = Nt(s), l = St(s), d = (c) => n(u, c);
674
+ const u = Pt(s), l = zt(s), d = (c) => n(u, c);
675
675
  o.on(l, d), r.push(() => o == null ? void 0 : o.off(l, d));
676
676
  }
677
677
  a(() => {
@@ -680,14 +680,14 @@ function oe(t, e, n, i) {
680
680
  });
681
681
  });
682
682
  }
683
- function K(t, e, n, i) {
684
- k((a) => {
683
+ function _(t, e, n, i) {
684
+ B((a) => {
685
685
  const o = t == null ? void 0 : t.value;
686
686
  if (!o)
687
687
  return;
688
688
  const r = [];
689
689
  for (const s of i) {
690
- const u = Nt(s), l = St(s), d = (g) => n(u, g), c = o.addListener(l, d);
690
+ const u = Pt(s), l = zt(s), d = (g) => n(u, g), c = o.addListener(l, d);
691
691
  r.push(() => google.maps.event.removeListener(c));
692
692
  }
693
693
  a(() => {
@@ -696,18 +696,18 @@ function K(t, e, n, i) {
696
696
  });
697
697
  });
698
698
  }
699
- const R = v(function(e) {
700
- const { registerOverlay: n } = e, i = w(), a = Ne();
701
- return ge(() => {
702
- i.value = new AMap.Marker({ ...e });
703
- }), Ie(() => {
704
- var o;
705
- (o = i.value) == null || o.setMap(null);
706
- }), nt({ registerOverlay: n, overlayRef: i }), k(() => {
699
+ const W = v(function(e, { emit: n }) {
700
+ const { registerOverlay: i } = e, a = w(), o = he();
701
+ return fe(() => {
702
+ a.value = new AMap.Marker({ ...e });
703
+ }), pe(() => {
707
704
  var r;
708
- const o = a == null ? void 0 : a.value;
709
- o && ((r = i.value) == null || r.setMap(o));
710
- }), he(i, e, [
705
+ (r = a.value) == null || r.setMap(null);
706
+ }), lt({ registerOverlay: i, overlayRef: a }), B(() => {
707
+ var s;
708
+ const r = o == null ? void 0 : o.value;
709
+ r && ((s = a.value) == null || s.setMap(r));
710
+ }), xe(a, e, [
711
711
  { name: "anchor", defaultValue: "" },
712
712
  { name: "offset", defaultValue: [0, 0] },
713
713
  { name: "clickable", defaultValue: !1 },
@@ -721,822 +721,944 @@ const R = v(function(e) {
721
721
  { name: "content", defaultValue: "" },
722
722
  { name: "title", defaultValue: "" },
723
723
  { name: "extData", defaultValue: "" }
724
- ]), () => null;
725
- }), G = v(function(e) {
726
- const { registerOverlay: n } = e, i = w(), a = Se();
727
- return nt({ registerOverlay: n, overlayRef: i }), ge(() => {
728
- const { registerOverlay: o, ...r } = e;
729
- i.value = new google.maps.marker.AdvancedMarkerView({ ...r });
730
- }), Ie(() => {
731
- i.value && (i.value.map = null);
732
- }), k(() => {
733
- const o = a == null ? void 0 : a.value;
734
- !o || !i.value || (i.value.map = o);
735
- }), te(
724
+ ]), ie(a, e, n, ["onClick"]), () => null;
725
+ }), U = v(function(e, { emit: n }) {
726
+ const { registerOverlay: i } = e, a = w(), o = De(), r = (s) => n(s, { target: a.value });
727
+ return lt({ registerOverlay: i, overlayRef: a }), fe(() => {
728
+ const { registerOverlay: s, ...u } = e;
729
+ a.value = new google.maps.marker.AdvancedMarkerView({ ...u }), a.value.addListener;
730
+ }), pe(() => {
731
+ a.value && (a.value.map = null);
732
+ }), B(() => {
733
+ const s = o == null ? void 0 : o.value;
734
+ !s || !a.value || (a.value.map = s);
735
+ }), re(
736
736
  () => {
737
- const { content: o, registerOverlay: r, ...s } = e;
738
- return s;
737
+ const { content: s, registerOverlay: u, ...l } = e;
738
+ return l;
739
739
  },
740
- (o) => {
741
- i.value && Object.assign(i.value, o);
740
+ (s) => {
741
+ a.value && Object.assign(a.value, s);
742
742
  }
743
- ), b(
743
+ ), P(
744
744
  () => e.content,
745
- (o) => {
746
- i.value && (i.value.content = o);
745
+ (s) => {
746
+ a.value && (a.value.content = s);
747
747
  },
748
748
  {
749
749
  flush: "post"
750
750
  }
751
- ), () => null;
752
- }), z = (t, e, n) => {
751
+ ), _(a, e, r, ["onClick"]), () => null;
752
+ }), T = (t, e, n) => {
753
753
  const { class: i, ...a } = e != null ? e : {}, o = document.createElement(t);
754
754
  return i && (o.className = i), Object.assign(o, a), n && (o.innerHTML = n), o;
755
- }, Ct = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjYiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSItMzkuNzE5JSIgeTE9IjUwJSIgeDI9IjEyNi4wOTMlIiB5Mj0iNTAlIiBpZD0icHJ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PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuNSAyNGgzdjE0LjVhMS41IDEuNSAwIDAxLTMgMFYyNHoiIGZpbGw9IiM0QzgwRkYiLz48Zz48Y2lyY2xlIGZpbGw9InVybCgjcHJlZml4X19hKSIgY3g9IjEzIiBjeT0iMTMiIHI9IjEzIi8+PGNpcmNsZSBmaWxsPSIjRkZGIiBjeD0iMTMiIGN5PSIxMyIgcj0iNCIvPjwvZz48L2c+PC9zdmc+";
756
+ var kt = "rgf09w0";
757
+ const Gt = v(function(e) {
758
758
  const n = L(() => `
759
- <img src="${Ct}" class="${wt}">
759
+ <img src="${Rt}" class="${kt}">
760
760
  `);
761
- return () => m(R, {
761
+ return () => M(W, {
762
762
  attrs: {
763
763
  position: e.position,
764
764
  content: n.value,
765
765
  anchor: "bottom-center"
766
766
  }
767
767
  });
768
- }), Pt = v(function(e) {
769
- const n = L(() => z("img", {
770
- class: wt,
771
- src: Ct
768
+ }), Ot = v(function(e) {
769
+ const n = L(() => T("img", {
770
+ class: kt,
771
+ src: Rt
772
772
  }));
773
- return () => m(G, {
773
+ return () => M(U, {
774
774
  attrs: {
775
- position: C(e.position),
775
+ position: x(e.position),
776
776
  content: n.value
777
777
  }
778
778
  });
779
779
  });
780
780
  v(function(e) {
781
781
  const n = j();
782
- return () => E(n.supplier === "gmap" ? Pt : bt, {
782
+ return () => E(n.supplier === "gmap" ? Ot : Gt, {
783
783
  attrs: e
784
784
  });
785
785
  });
786
- var zt = "_15rq2xn1", Et = "_15rq2xn0", Zt = "_15rq2xn3", Tt = "_15rq2xn2", Rt = "_15rq2xn4", Gt = "_15rq2xn6", kt = "_15rq2xn5";
787
- const ta = v(function(e) {
786
+ var Wt = "_15rq2xn1", Ut = "_15rq2xn0", Bt = "_15rq2xn3", Yt = "_15rq2xn2", Ht = "_15rq2xn4", Vt = "_15rq2xn6", Qt = "_15rq2xn5";
787
+ const Ma = v(function(e) {
788
788
  const n = L(() => {
789
789
  var i;
790
790
  return `
791
- <div class="${Et}">
792
- <div class="${zt}">
791
+ <div class="${Ut}">
792
+ <div class="${Wt}">
793
793
  <div>
794
- <div class="${Tt}">${e.title}</div>
795
- <div class="${Zt}">${(i = e.description) != null ? i : ""}</div>
794
+ <div class="${Yt}">${e.title}</div>
795
+ <div class="${Bt}">${(i = e.description) != null ? i : ""}</div>
796
796
  </div>
797
- <img class="${Rt}" src="${Ke}" >
797
+ <img class="${Ht}" src="${rt}" >
798
798
  </div>
799
- <div class="${kt}"></div>
800
- <img src="${T}" class="${Gt}">
799
+ <div class="${Qt}"></div>
800
+ <img src="${O}" class="${Vt}">
801
801
  </div>
802
802
  `;
803
803
  });
804
- return () => e.type === "locator" ? m(bt, {
804
+ return () => e.type === "locator" ? M(Gt, {
805
805
  attrs: {
806
806
  position: e.position
807
807
  }
808
- }) : m(R, {
808
+ }) : M(W, {
809
809
  attrs: {
810
810
  position: e.position,
811
811
  content: n.value,
812
812
  anchor: "bottom-center"
813
813
  }
814
814
  });
815
- }), na = v(function(e) {
815
+ }), ma = v(function(e) {
816
816
  const n = L(() => {
817
817
  var i;
818
- return z("div", {
819
- class: Et
818
+ return T("div", {
819
+ class: Ut
820
820
  }, `
821
- <div class="${zt}">
821
+ <div class="${Wt}">
822
822
  <div>
823
- <div class="${Tt}">${e.title}</div>
824
- <div class="${Zt}">${(i = e.description) != null ? i : ""}</div>
823
+ <div class="${Yt}">${e.title}</div>
824
+ <div class="${Bt}">${(i = e.description) != null ? i : ""}</div>
825
825
  </div>
826
- <img class="${Rt}" src="${Ke}" >
826
+ <img class="${Ht}" src="${rt}" >
827
827
  </div>
828
- <div class="${kt}"></div>
829
- <img src="${T}" class="${Gt}">
828
+ <div class="${Qt}"></div>
829
+ <img src="${O}" class="${Vt}">
830
830
  `);
831
831
  });
832
- return () => e.type === "locator" ? m(Pt, {
832
+ return () => e.type === "locator" ? M(Ot, {
833
833
  attrs: {
834
834
  position: e.position
835
835
  }
836
- }) : m(G, {
836
+ }) : M(U, {
837
837
  attrs: {
838
- position: C(e.position),
838
+ position: x(e.position),
839
839
  content: n.value
840
840
  }
841
841
  });
842
- }), so = v(function(e) {
842
+ }), xo = v(function(e) {
843
843
  const n = j();
844
- return () => E(n.supplier === "gmap" ? na : ta, {
844
+ return () => E(n.supplier === "gmap" ? ma : Ma, {
845
845
  attrs: e
846
846
  });
847
- }), _ = v(function(e) {
848
- const n = w(), i = Ne();
849
- return ge(() => {
850
- n.value = new AMap.Polyline({ ...e });
851
- }), Ie(() => {
852
- var a;
853
- (a = n.value) == null || a.setMap(null);
854
- }), k(() => {
855
- var o;
856
- const a = i == null ? void 0 : i.value;
857
- a && ((o = n.value) == null || o.setMap(a));
858
- }), he(n, e, [
859
- { name: "path", defaultValue: [[0, 0]] },
860
- { name: "extData", defaultValue: void 0 },
861
- { name: "draggable", defaultValue: !1 }
862
- ]), te(
863
- () => {
864
- const { path: a, extData: o, draggable: r, ...s } = e;
865
- return s;
866
- },
867
- (a) => {
868
- var o;
869
- (o = n.value) == null || o.setOptions({ ...a });
870
- }
871
- ), () => null;
872
- }), ne = v(function(e) {
873
- const n = w(), i = Se();
874
- return ge(() => {
875
- n.value = new google.maps.Polyline({ ...e });
876
- }), Ie(() => {
877
- var a;
878
- (a = n.value) == null || a.setMap(null);
879
- }), k(() => {
880
- var o;
881
- const a = i == null ? void 0 : i.value;
882
- a && ((o = n.value) == null || o.setMap(a));
883
- }), te(
884
- () => ({ ...e }),
885
- (a) => {
886
- var o;
887
- (o = n.value) == null || o.setOptions({ ...a });
847
+ });
848
+ var Ae = {}, fa = {
849
+ get exports() {
850
+ return Ae;
851
+ },
852
+ set exports(t) {
853
+ Ae = t;
854
+ }
855
+ };
856
+ (function(t, e) {
857
+ (function(n, i) {
858
+ t.exports = i();
859
+ })(xn, function() {
860
+ function n(c) {
861
+ var g = [];
862
+ return c.AMapUI && g.push(i(c.AMapUI)), c.Loca && g.push(a(c.Loca)), Promise.all(g);
888
863
  }
889
- ), () => null;
890
- }), ia = v(function(e) {
891
- return () => {
892
- const n = window.innerWidth * 0.01, i = 2.5 * n, a = 0.35 * n, o = 0.6 * n, r = 1 * n, s = 0.75 * n, u = e.done ? "#96B2CA" : "#487BF4", l = e.done ? "#7693AF" : "#4175F1", d = e.done ? "#7693AF" : "#6C95F5";
893
- return m("div", [m(_, {
894
- attrs: {
895
- path: e.path,
896
- strokeWeight: i + 2 * a + 2 * r,
897
- strokeOpacity: 1,
898
- strokeColor: l,
899
- lineJoin: "round",
900
- lineCap: "round"
901
- }
902
- }), m(_, {
903
- attrs: {
904
- path: e.path,
905
- strokeWeight: i + 2 * a,
906
- strokeOpacity: 1,
907
- strokeColor: d,
908
- lineJoin: "round",
909
- lineCap: "round",
910
- strokeStyle: "dashed",
911
- strokeDasharray: [s, s * 0.5]
912
- }
913
- }), m(_, {
914
- attrs: {
915
- path: e.path,
916
- strokeWeight: i,
917
- strokeOpacity: 1,
918
- strokeColor: u,
919
- lineJoin: "round",
920
- lineCap: "round"
921
- }
922
- }), m(_, {
923
- attrs: {
924
- showDir: !0,
925
- path: e.path,
926
- strokeWeight: i + 2 * o,
927
- strokeOpacity: 1,
928
- strokeColor: "transparent",
929
- lineJoin: "round",
930
- lineCap: "round"
931
- }
932
- })]);
933
- };
934
- }), aa = v(function(e) {
935
- const n = L(() => e.path.map(C));
936
- return () => {
937
- const i = window.innerWidth * 0.01, a = 10 * i, o = 2.5 * i, r = 0.35 * i, s = 0.75 * i, u = 1 * i, l = e.done ? "#96B2CA" : "#487BF4", d = e.done ? "#7693AF" : "#4175F1", c = e.done ? "#7693AF" : "#6C95F5";
938
- return m("div", [m(ne, {
939
- attrs: {
940
- path: n.value,
941
- strokeWeight: o + 2 * r + 2 * u,
942
- strokeOpacity: 1,
943
- strokeColor: d
944
- }
945
- }), m(ne, {
946
- attrs: {
947
- path: n.value,
948
- icons: [{
949
- icon: {
950
- path: "M 0,-0.5 0,0.5",
951
- strokeWeight: o + 2 * r,
952
- strokeColor: c,
953
- fillColor: c,
954
- scale: 1
955
- },
956
- repeat: `${o}px`,
957
- offset: `${o / 2}px`
958
- }]
959
- }
960
- }), m(ne, {
961
- attrs: {
962
- path: n.value,
963
- strokeWeight: o,
964
- strokeOpacity: 1,
965
- strokeColor: l,
966
- icons: [{
967
- icon: {
968
- path: google.maps.SymbolPath.FORWARD_OPEN_ARROW,
969
- strokeColor: "white",
970
- strokeWeight: s,
971
- // todo: 3 maybe not responsive
972
- scale: 3
973
- },
974
- repeat: `${a}px`
975
- }]
976
- }
977
- })]);
978
- };
979
- }), co = v(function(e) {
980
- const n = j();
981
- return () => e.path.length ? E(n.supplier === "gmap" ? aa : ia, {
982
- attrs: e
983
- }) : null;
984
- }), Ot = (t) => {
985
- const e = x({ path: [], distance: 0, duration: 0 }), n = new AMap.Driving({});
986
- return Q(
987
- () => ({ ...t }),
988
- ({ from: i, to: a }) => {
989
- n.search(
990
- AMap.LngLat.from(i),
991
- AMap.LngLat.from(a),
992
- { waypoints: [] },
993
- (o, r) => {
994
- switch (o) {
995
- case "complete": {
996
- let s = [];
997
- const l = r.routes[0];
998
- for (const d of l.steps) {
999
- const g = d.path.map(({ lng: I, lat: M }) => [I, M]);
1000
- s = s.concat(g);
1001
- }
1002
- e.path = s, e.distance = l.distance, e.duration = l.time;
1003
- return;
864
+ function i(c) {
865
+ return new Promise(function(g, I) {
866
+ var m = [];
867
+ if (c.plugins)
868
+ for (var f = 0; f < c.plugins.length; f += 1)
869
+ r.AMapUI.plugins.indexOf(c.plugins[f]) == -1 && m.push(c.plugins[f]);
870
+ if (s.AMapUI === o.failed)
871
+ I("前次请求 AMapUI 失败");
872
+ else if (s.AMapUI === o.notload) {
873
+ s.AMapUI = o.loading, r.AMapUI.version = c.version || r.AMapUI.version, f = r.AMapUI.version;
874
+ var p = document.body || document.head, A = document.createElement("script");
875
+ A.type = "text/javascript", A.src = "https://webapi.amap.com/ui/" + f + "/main.js", A.onerror = function(y) {
876
+ s.AMapUI = o.failed, I("请求 AMapUI 失败");
877
+ }, A.onload = function() {
878
+ if (s.AMapUI = o.loaded, m.length)
879
+ window.AMapUI.loadUI(m, function() {
880
+ for (var y = 0, D = m.length; y < D; y++) {
881
+ var z = m[y].split("/").slice(-1)[0];
882
+ window.AMapUI[z] = arguments[y];
883
+ }
884
+ for (g(); u.AMapUI.length; )
885
+ u.AMapUI.splice(0, 1)[0]();
886
+ });
887
+ else
888
+ for (g(); u.AMapUI.length; )
889
+ u.AMapUI.splice(0, 1)[0]();
890
+ }, p.appendChild(A);
891
+ } else
892
+ s.AMapUI === o.loaded ? c.version && c.version !== r.AMapUI.version ? I("不允许多个版本 AMapUI 混用") : m.length ? window.AMapUI.loadUI(m, function() {
893
+ for (var y = 0, D = m.length; y < D; y++) {
894
+ var z = m[y].split("/").slice(-1)[0];
895
+ window.AMapUI[z] = arguments[y];
1004
896
  }
1005
- case "no_data":
1006
- e.path = [], e.distance = 0, e.duration = 0;
1007
- return;
1008
- default:
1009
- throw r;
1010
- }
1011
- }
1012
- );
897
+ g();
898
+ }) : g() : c.version && c.version !== r.AMapUI.version ? I("不允许多个版本 AMapUI 混用") : u.AMapUI.push(function(y) {
899
+ y ? I(y) : m.length ? window.AMapUI.loadUI(m, function() {
900
+ for (var D = 0, z = m.length; D < z; D++) {
901
+ var Y = m[D].split("/").slice(-1)[0];
902
+ window.AMapUI[Y] = arguments[D];
903
+ }
904
+ g();
905
+ }) : g();
906
+ });
907
+ });
1013
908
  }
1014
- ), e;
1015
- }, Wt = (t) => {
1016
- const e = x({ path: [], distance: 0, duration: 0 }), n = new google.maps.DirectionsService();
1017
- return Q(
1018
- () => ({ ...t }),
1019
- ({ from: i, to: a }) => {
1020
- n.route(
1021
- {
1022
- origin: { lng: i[0], lat: i[1] },
1023
- destination: { lng: a[0], lat: a[1] },
1024
- travelMode: google.maps.TravelMode.DRIVING
1025
- },
1026
- (o, r) => {
1027
- var s, u, l, d;
1028
- switch (r) {
1029
- case google.maps.DirectionsStatus.OK: {
1030
- let c = [], g = 0, I = 0;
1031
- const M = o.routes[0], f = M.overview_path.map((p) => [
1032
- p.lng(),
1033
- p.lat()
1034
- ]);
1035
- c = c.concat(f);
1036
- for (const p of M.legs)
1037
- g += (u = (s = p.distance) == null ? void 0 : s.value) != null ? u : 0, I += (d = (l = p.duration) == null ? void 0 : l.value) != null ? d : 0;
1038
- e.path = c, e.distance = g, e.duration = I;
1039
- return;
1040
- }
1041
- case google.maps.DirectionsStatus.ZERO_RESULTS:
1042
- case google.maps.DirectionsStatus.NOT_FOUND:
1043
- e.path = [], e.distance = 0, e.duration = 0;
1044
- return;
1045
- default:
1046
- throw new Error(r);
909
+ function a(c) {
910
+ return new Promise(function(g, I) {
911
+ if (s.Loca === o.failed)
912
+ I("前次请求 Loca 失败");
913
+ else if (s.Loca === o.notload) {
914
+ s.Loca = o.loading, r.Loca.version = c.version || r.Loca.version;
915
+ var m = r.Loca.version, f = r.AMap.version.startsWith("2"), p = m.startsWith("2");
916
+ if (f && !p || !f && p)
917
+ I("JSAPI Loca 版本不对应!!");
918
+ else {
919
+ f = r.key, p = document.body || document.head;
920
+ var A = document.createElement("script");
921
+ A.type = "text/javascript", A.src = "https://webapi.amap.com/loca?v=" + m + "&key=" + f, A.onerror = function(y) {
922
+ s.Loca = o.failed, I("请求 AMapUI 失败");
923
+ }, A.onload = function() {
924
+ for (s.Loca = o.loaded, g(); u.Loca.length; )
925
+ u.Loca.splice(0, 1)[0]();
926
+ }, p.appendChild(A);
1047
927
  }
1048
- }
1049
- );
928
+ } else
929
+ s.Loca === o.loaded ? c.version && c.version !== r.Loca.version ? I("不允许多个版本 Loca 混用") : g() : c.version && c.version !== r.Loca.version ? I("不允许多个版本 Loca 混用") : u.Loca.push(function(y) {
930
+ y ? I(y) : I();
931
+ });
932
+ });
1050
933
  }
1051
- ), e;
1052
- }, uo = (t) => {
1053
- const { supplier: e } = j();
1054
- return e === "gmap" ? Wt(t) : Ot(t);
1055
- }, oa = (t, e, n) => {
1056
- if (!n)
1057
- return 0;
1058
- const { x: i, y: a } = n.lngLatToContainer(t), { x: o, y: r } = n.lngLatToContainer(e), s = Math.atan2(a - r, o - i);
1059
- return (Math.PI / 2 - s) / Math.PI * 180;
1060
- }, Ut = (t) => L(() => {
1061
- const { map: e, path: n } = t, [i, a] = n;
1062
- if (!(!i || !a || !e))
1063
- return oa(i, a, e);
1064
- }), Bt = (t) => L(() => {
1065
- const { path: e } = t, [n, i] = e;
1066
- if (!(!n || !i))
1067
- return google.maps.geometry.spherical.computeHeading(C(n), C(i));
1068
- }), lo = (t) => {
1069
- const { supplier: e } = j();
1070
- return e === "gmap" ? Bt(t) : Ut(t);
1071
- }, ra = v(function(e, {
1072
- slots: n
1073
- }) {
1074
- const i = Ne(), {
1075
- path: a,
1076
- distance: o,
1077
- duration: r
1078
- } = _e(Ot(e)), s = Ut(x({
1079
- path: a,
1080
- map: i
1081
- }));
1082
- return () => {
1083
- var u;
1084
- return m("div", [(u = n.render) == null ? void 0 : u.call(n, x({
1085
- path: a,
1086
- angle: s,
1087
- distance: o,
1088
- duration: r
1089
- }))]);
1090
- };
1091
- }), sa = v(function(e, {
1092
- slots: n
1093
- }) {
1094
- const i = Se(), {
1095
- path: a,
1096
- distance: o,
1097
- duration: r
1098
- } = _e(Wt(e)), s = Bt(x({
1099
- path: a,
1100
- map: i
1101
- }));
1102
- return () => {
1103
- var u;
1104
- return m("div", [(u = n.render) == null ? void 0 : u.call(n, x({
1105
- path: a,
1106
- angle: s,
1107
- distance: o,
1108
- duration: r
1109
- }))]);
1110
- };
1111
- }), go = v(function(e, {
1112
- slots: n
1113
- }) {
1114
- const {
1115
- supplier: i
1116
- } = j();
1117
- return () => E(i === "gmap" ? sa : ra, {
1118
- attrs: e,
1119
- scopedSlots: n
934
+ if (!window)
935
+ throw Error("AMap JSAPI can only be used in Browser.");
936
+ var o;
937
+ (function(c) {
938
+ c.notload = "notload", c.loading = "loading", c.loaded = "loaded", c.failed = "failed";
939
+ })(o || (o = {}));
940
+ var r = { key: "", AMap: { version: "1.4.15", plugins: [] }, AMapUI: { version: "1.1", plugins: [] }, Loca: { version: "1.3.2" } }, s = { AMap: o.notload, AMapUI: o.notload, Loca: o.notload }, u = { AMap: [], AMapUI: [], Loca: [] }, l = [], d = function(c) {
941
+ typeof c == "function" && (s.AMap === o.loaded ? c(window.AMap) : l.push(c));
942
+ };
943
+ return { load: function(c) {
944
+ return new Promise(function(g, I) {
945
+ if (s.AMap == o.failed)
946
+ I("");
947
+ else if (s.AMap == o.notload) {
948
+ var m = c.key, f = c.version, p = c.plugins;
949
+ m ? (window.AMap && location.host !== "lbs.amap.com" && I("禁止多种API加载方式混用"), r.key = m, r.AMap.version = f || r.AMap.version, r.AMap.plugins = p || r.AMap.plugins, s.AMap = o.loading, f = document.body || document.head, window.___onAPILoaded = function(y) {
950
+ if (delete window.___onAPILoaded, y)
951
+ s.AMap = o.failed, I(y);
952
+ else
953
+ for (s.AMap = o.loaded, n(c).then(function() {
954
+ g(window.AMap);
955
+ }).catch(I); l.length; )
956
+ l.splice(0, 1)[0]();
957
+ }, p = document.createElement("script"), p.type = "text/javascript", p.src = "https://webapi.amap.com/maps?callback=___onAPILoaded&v=" + r.AMap.version + "&key=" + m + "&plugin=" + r.AMap.plugins.join(","), p.onerror = function(y) {
958
+ s.AMap = o.failed, I(y);
959
+ }, f.appendChild(p)) : I("请填写key");
960
+ } else if (s.AMap == o.loaded)
961
+ if (c.key && c.key !== r.key)
962
+ I("多个不一致的 key");
963
+ else if (c.version && c.version !== r.AMap.version)
964
+ I("不允许多个版本 JSAPI 混用");
965
+ else {
966
+ if (m = [], c.plugins)
967
+ for (f = 0; f < c.plugins.length; f += 1)
968
+ r.AMap.plugins.indexOf(c.plugins[f]) == -1 && m.push(c.plugins[f]);
969
+ m.length ? window.AMap.plugin(m, function() {
970
+ n(c).then(function() {
971
+ g(window.AMap);
972
+ }).catch(I);
973
+ }) : n(c).then(function() {
974
+ g(window.AMap);
975
+ }).catch(I);
976
+ }
977
+ else if (c.key && c.key !== r.key)
978
+ I("多个不一致的 key");
979
+ else if (c.version && c.version !== r.AMap.version)
980
+ I("不允许多个版本 JSAPI 混用");
981
+ else {
982
+ var A = [];
983
+ if (c.plugins)
984
+ for (f = 0; f < c.plugins.length; f += 1)
985
+ r.AMap.plugins.indexOf(c.plugins[f]) == -1 && A.push(c.plugins[f]);
986
+ d(function() {
987
+ A.length ? window.AMap.plugin(A, function() {
988
+ n(c).then(function() {
989
+ g(window.AMap);
990
+ }).catch(I);
991
+ }) : n(c).then(function() {
992
+ g(window.AMap);
993
+ }).catch(I);
994
+ });
995
+ }
996
+ });
997
+ }, reset: function() {
998
+ delete window.AMap, delete window.AMapUI, delete window.Loca, r = { key: "", AMap: { version: "1.4.15", plugins: [] }, AMapUI: { version: "1.1", plugins: [] }, Loca: { version: "1.3.2" } }, s = {
999
+ AMap: o.notload,
1000
+ AMapUI: o.notload,
1001
+ Loca: o.notload
1002
+ }, u = { AMap: [], AMapUI: [], Loca: [] };
1003
+ } };
1120
1004
  });
1121
- }), Yt = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjEiIGhlaWdodD0iNjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxmaWx0ZXIgeD0iLTcuMSUiIHk9Ii03LjElIiB3aWR0aD0iMTE0LjMlIiBoZWlnaHQ9IjExNC4zJSIgZmlsdGVyVW5pdHM9Im9iamVjdEJvdW5kaW5nQm94IiBpZD0icHJlZml4X19hIj48ZmVPZmZzZXQgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSIvPjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249Ii41IiBpbj0ic2hhZG93T2Zmc2V0T3V0ZXIxIiByZXN1bHQ9InNoYWRvd0JsdXJPdXRlcjEiLz48ZmVDb21wb3NpdGUgaW49InNoYWRvd0JsdXJPdXRlcjEiIGluMj0iU291cmNlQWxwaGEiIG9wZXJhdG9yPSJvdXQiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSIvPjxmZUNvbG9yTWF0cml4IHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMC4yNzc0NTMwMTYgMCIgaW49InNoYWRvd0JsdXJPdXRlcjEiLz48L2ZpbHRlcj48Y2lyY2xlIGlkPSJwcmVmaXhfX2IiIGN4PSIzMCIgY3k9IjMwIiByPSIxMC41Ii8+PC9kZWZzPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC40MDUgLjI2NCkiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGNpcmNsZSBzdHJva2Utb3BhY2l0eT0iLjEiIHN0cm9rZT0iIzAwM0RGRiIgZmlsbC1vcGFjaXR5PSIuMTUiIGZpbGw9IiM0ODczRkUiIGN4PSIzMCIgY3k9IjMwIiByPSIyOS41Ii8+PHVzZSBmaWxsPSIjMDAwIiBmaWx0ZXI9InVybCgjcHJlZml4X19hKSIgeGxpbms6aHJlZj0iI3ByZWZpeF9fYiIvPjxjaXJjbGUgc3Ryb2tlPSIjRkZGIiBzdHJva2Utd2lkdGg9IjIuNCIgc3Ryb2tlLWxpbmVqb2luPSJzcXVhcmUiIGZpbGw9IiM0ODcxRjEiIGN4PSIzMCIgY3k9IjMwIiByPSI5LjMiLz48L2c+PC9zdmc+";
1122
- function ca(t, e, n) {
1123
- return e in t ? Object.defineProperty(t, e, {
1124
- value: n,
1125
- enumerable: !0,
1126
- configurable: !0,
1127
- writable: !0
1128
- }) : t[e] = n, t;
1129
- }
1130
- function Ve(t, e) {
1131
- var n = Object.keys(t);
1132
- if (Object.getOwnPropertySymbols) {
1133
- var i = Object.getOwnPropertySymbols(t);
1134
- e && (i = i.filter(function(a) {
1135
- return Object.getOwnPropertyDescriptor(t, a).enumerable;
1136
- })), n.push.apply(n, i);
1005
+ })(fa);
1006
+ var pa = function t(e, n) {
1007
+ if (e === n)
1008
+ return !0;
1009
+ if (e && n && typeof e == "object" && typeof n == "object") {
1010
+ if (e.constructor !== n.constructor)
1011
+ return !1;
1012
+ var i, a, o;
1013
+ if (Array.isArray(e)) {
1014
+ if (i = e.length, i != n.length)
1015
+ return !1;
1016
+ for (a = i; a-- !== 0; )
1017
+ if (!t(e[a], n[a]))
1018
+ return !1;
1019
+ return !0;
1020
+ }
1021
+ if (e.constructor === RegExp)
1022
+ return e.source === n.source && e.flags === n.flags;
1023
+ if (e.valueOf !== Object.prototype.valueOf)
1024
+ return e.valueOf() === n.valueOf();
1025
+ if (e.toString !== Object.prototype.toString)
1026
+ return e.toString() === n.toString();
1027
+ if (o = Object.keys(e), i = o.length, i !== Object.keys(n).length)
1028
+ return !1;
1029
+ for (a = i; a-- !== 0; )
1030
+ if (!Object.prototype.hasOwnProperty.call(n, o[a]))
1031
+ return !1;
1032
+ for (a = i; a-- !== 0; ) {
1033
+ var r = o[a];
1034
+ if (!t(e[r], n[r]))
1035
+ return !1;
1036
+ }
1037
+ return !0;
1137
1038
  }
1138
- return n;
1139
- }
1140
- function Qe(t) {
1141
- for (var e = 1; e < arguments.length; e++) {
1142
- var n = arguments[e] != null ? arguments[e] : {};
1143
- e % 2 ? Ve(Object(n), !0).forEach(function(i) {
1144
- ca(t, i, n[i]);
1145
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : Ve(Object(n)).forEach(function(i) {
1146
- Object.defineProperty(t, i, Object.getOwnPropertyDescriptor(n, i));
1039
+ return e !== e && n !== n;
1040
+ };
1041
+ const Ke = "__googleMapsScriptId";
1042
+ var X;
1043
+ (function(t) {
1044
+ t[t.INITIALIZED = 0] = "INITIALIZED", t[t.LOADING = 1] = "LOADING", t[t.SUCCESS = 2] = "SUCCESS", t[t.FAILURE = 3] = "FAILURE";
1045
+ })(X || (X = {}));
1046
+ class V {
1047
+ /**
1048
+ * Creates an instance of Loader using [[LoaderOptions]]. No defaults are set
1049
+ * using this library, instead the defaults are set by the Google Maps
1050
+ * JavaScript API server.
1051
+ *
1052
+ * ```
1053
+ * const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});
1054
+ * ```
1055
+ */
1056
+ constructor({ apiKey: e, authReferrerPolicy: n, channel: i, client: a, id: o = Ke, language: r, libraries: s = [], mapIds: u, nonce: l, region: d, retries: c = 3, url: g = "https://maps.googleapis.com/maps/api/js", version: I }) {
1057
+ if (this.CALLBACK = "__googleMapsCallback", this.callbacks = [], this.done = !1, this.loading = !1, this.errors = [], this.apiKey = e, this.authReferrerPolicy = n, this.channel = i, this.client = a, this.id = o || Ke, this.language = r, this.libraries = s, this.mapIds = u, this.nonce = l, this.region = d, this.retries = c, this.url = g, this.version = I, V.instance) {
1058
+ if (!pa(this.options, V.instance.options))
1059
+ throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(V.instance.options)}`);
1060
+ return V.instance;
1061
+ }
1062
+ V.instance = this;
1063
+ }
1064
+ get options() {
1065
+ return {
1066
+ version: this.version,
1067
+ apiKey: this.apiKey,
1068
+ channel: this.channel,
1069
+ client: this.client,
1070
+ id: this.id,
1071
+ libraries: this.libraries,
1072
+ language: this.language,
1073
+ region: this.region,
1074
+ mapIds: this.mapIds,
1075
+ nonce: this.nonce,
1076
+ url: this.url,
1077
+ authReferrerPolicy: this.authReferrerPolicy
1078
+ };
1079
+ }
1080
+ get status() {
1081
+ return this.errors.length ? X.FAILURE : this.done ? X.SUCCESS : this.loading ? X.LOADING : X.INITIALIZED;
1082
+ }
1083
+ get failed() {
1084
+ return this.done && !this.loading && this.errors.length >= this.retries + 1;
1085
+ }
1086
+ /**
1087
+ * CreateUrl returns the Google Maps JavaScript API script url given the [[LoaderOptions]].
1088
+ *
1089
+ * @ignore
1090
+ */
1091
+ createUrl() {
1092
+ let e = this.url;
1093
+ return e += `?callback=${this.CALLBACK}`, this.apiKey && (e += `&key=${this.apiKey}`), this.channel && (e += `&channel=${this.channel}`), this.client && (e += `&client=${this.client}`), this.libraries.length > 0 && (e += `&libraries=${this.libraries.join(",")}`), this.language && (e += `&language=${this.language}`), this.region && (e += `&region=${this.region}`), this.version && (e += `&v=${this.version}`), this.mapIds && (e += `&map_ids=${this.mapIds.join(",")}`), this.authReferrerPolicy && (e += `&auth_referrer_policy=${this.authReferrerPolicy}`), e;
1094
+ }
1095
+ deleteScript() {
1096
+ const e = document.getElementById(this.id);
1097
+ e && e.remove();
1098
+ }
1099
+ /**
1100
+ * Load the Google Maps JavaScript API script and return a Promise.
1101
+ */
1102
+ load() {
1103
+ return this.loadPromise();
1104
+ }
1105
+ /**
1106
+ * Load the Google Maps JavaScript API script and return a Promise.
1107
+ *
1108
+ * @ignore
1109
+ */
1110
+ loadPromise() {
1111
+ return new Promise((e, n) => {
1112
+ this.loadCallback((i) => {
1113
+ i ? n(i.error) : e(window.google);
1114
+ });
1147
1115
  });
1148
1116
  }
1149
- return t;
1150
- }
1151
- var ua = (t, e, n) => {
1152
- for (var i of Object.keys(t)) {
1153
- var a;
1154
- if (t[i] !== ((a = e[i]) !== null && a !== void 0 ? a : n[i]))
1155
- return !1;
1117
+ /**
1118
+ * Load the Google Maps JavaScript API script with a callback.
1119
+ */
1120
+ loadCallback(e) {
1121
+ this.callbacks.push(e), this.execute();
1156
1122
  }
1157
- return !0;
1158
- }, J = (t) => (e) => {
1159
- var n = t.defaultClassName, i = Qe(Qe({}, t.defaultVariants), e);
1160
- for (var a in i) {
1161
- var o, r = (o = i[a]) !== null && o !== void 0 ? o : t.defaultVariants[a];
1162
- if (r != null) {
1163
- var s = r;
1164
- typeof s == "boolean" && (s = s === !0 ? "true" : "false");
1165
- var u = (
1166
- // @ts-expect-error
1167
- t.variantClassNames[a][s]
1168
- );
1169
- u && (n += " " + u);
1123
+ /**
1124
+ * Set the script on document.
1125
+ */
1126
+ setScript() {
1127
+ if (document.getElementById(this.id)) {
1128
+ this.callback();
1129
+ return;
1170
1130
  }
1131
+ const e = this.createUrl(), n = document.createElement("script");
1132
+ n.id = this.id, n.type = "text/javascript", n.src = e, n.onerror = this.loadErrorCallback.bind(this), n.defer = !0, n.async = !0, this.nonce && (n.nonce = this.nonce), document.head.appendChild(n);
1171
1133
  }
1172
- for (var [l, d] of t.compoundVariants)
1173
- ua(l, i, t.defaultVariants) && (n += " " + d);
1174
- return n;
1175
- }, Ht = J({ defaultClassName: "_1l6offo0", variantClassNames: { size: { small: "_1l6offo1", large: "_1l6offo2" } }, defaultVariants: {}, compoundVariants: [] });
1176
- const la = v(function(e) {
1177
- const n = L(() => {
1178
- const {
1179
- size: i = "large"
1180
- } = e;
1181
- return `
1182
- <img src="${i === "large" ? Yt : T}" class="${Ht({
1183
- size: i
1184
- })}">
1185
- `;
1186
- });
1187
- return () => m(R, {
1188
- attrs: {
1189
- position: e.position,
1190
- content: n.value,
1191
- anchor: "bottom-center"
1134
+ /**
1135
+ * Reset the loader state.
1136
+ */
1137
+ reset() {
1138
+ this.deleteScript(), this.done = !1, this.loading = !1, this.errors = [], this.onerrorEvent = null;
1139
+ }
1140
+ resetIfRetryingFailed() {
1141
+ this.failed && this.reset();
1142
+ }
1143
+ loadErrorCallback(e) {
1144
+ if (this.errors.push(e), this.errors.length <= this.retries) {
1145
+ const n = this.errors.length * Math.pow(2, this.errors.length);
1146
+ console.log(`Failed to load Google Maps script, retrying in ${n} ms.`), setTimeout(() => {
1147
+ this.deleteScript(), this.setScript();
1148
+ }, n);
1149
+ } else
1150
+ this.onerrorEvent = e, this.callback();
1151
+ }
1152
+ setCallback() {
1153
+ window.__googleMapsCallback = this.callback.bind(this);
1154
+ }
1155
+ callback() {
1156
+ this.done = !0, this.loading = !1, this.callbacks.forEach((e) => {
1157
+ e(this.onerrorEvent);
1158
+ }), this.callbacks = [];
1159
+ }
1160
+ execute() {
1161
+ if (this.resetIfRetryingFailed(), this.done)
1162
+ this.callback();
1163
+ else {
1164
+ if (window.google && window.google.maps && window.google.maps.version) {
1165
+ console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."), this.callback();
1166
+ return;
1167
+ }
1168
+ this.loading || (this.loading = !0, this.setCallback(), this.setScript());
1192
1169
  }
1170
+ }
1171
+ }
1172
+ const va = [
1173
+ "AMap.Geolocation",
1174
+ "AMap.Geocoder",
1175
+ "AMap.PlaceSearch",
1176
+ "AMap.Driving",
1177
+ "AMap.Walking"
1178
+ ], ya = ["marker", "places", "geometry"];
1179
+ var ae = /* @__PURE__ */ ((t) => (t.LOADING = "LOADING", t.FAILURE = "FAILURE", t.SUCCESS = "SUCCESS", t))(ae || {});
1180
+ const ja = (t) => {
1181
+ const { onChange: e } = t;
1182
+ let n, i;
1183
+ const a = new Promise((s, u) => {
1184
+ n = s, i = u;
1185
+ }), o = w(
1186
+ "LOADING"
1187
+ /* LOADING */
1188
+ ), r = L(() => {
1189
+ const { onChange: s, loading: u, fallback: l, apiKey: d, apiSecret: c, apiServiceHost: g, version: I, ...m } = t;
1190
+ return { ...m, key: d, version: I != null ? I : "2.0.5.16" };
1193
1191
  });
1194
- }), da = v(function(e) {
1195
- const n = L(() => {
1196
- const {
1197
- size: i = "large"
1198
- } = e, a = i === "large" ? Yt : T;
1199
- return z("img", {
1200
- class: Ht({
1201
- size: i
1202
- }),
1203
- src: a
1204
- });
1205
- });
1206
- return () => m(G, {
1207
- attrs: {
1208
- position: C(e.position),
1209
- content: n.value
1192
+ return K(
1193
+ () => r.value,
1194
+ (s) => {
1195
+ const u = (l) => {
1196
+ o.value = l, l === "SUCCESS" && n(), l === "FAILURE" && i(), e == null || e(o.value);
1197
+ };
1198
+ u(
1199
+ "LOADING"
1200
+ /* LOADING */
1201
+ ), window._AMapSecurityConfig = t.apiServiceHost ? {
1202
+ serviceHost: t.apiServiceHost
1203
+ } : { securityJsCode: t.apiSecret }, Ae.load(s).then(
1204
+ () => u(
1205
+ "SUCCESS"
1206
+ /* SUCCESS */
1207
+ ),
1208
+ () => u(
1209
+ "FAILURE"
1210
+ /* FAILURE */
1211
+ )
1212
+ );
1210
1213
  }
1214
+ ), { statusRef: o, readyPromise: a };
1215
+ }, Aa = (t) => {
1216
+ const { onChange: e } = t;
1217
+ let n, i;
1218
+ const a = new Promise((s, u) => {
1219
+ n = s, i = u;
1220
+ }), o = w(
1221
+ "LOADING"
1222
+ /* LOADING */
1223
+ ), r = L(() => {
1224
+ const { onChange: s, fallback: u, loading: l, ...d } = t;
1225
+ return d;
1211
1226
  });
1212
- }), Io = v(function(e) {
1213
- const n = j();
1214
- return () => E(n.supplier === "gmap" ? da : la, {
1215
- attrs: e
1227
+ return K(
1228
+ () => r.value,
1229
+ (s) => {
1230
+ const u = new V(s), l = (d) => {
1231
+ o.value = d, d === "SUCCESS" && n(), d === "FAILURE" && i(), e == null || e(o.value);
1232
+ };
1233
+ l(
1234
+ "LOADING"
1235
+ /* LOADING */
1236
+ ), u.load().then(
1237
+ () => l(
1238
+ "SUCCESS"
1239
+ /* SUCCESS */
1240
+ ),
1241
+ () => l(
1242
+ "FAILURE"
1243
+ /* FAILURE */
1244
+ )
1245
+ );
1246
+ }
1247
+ ), { statusRef: o, readyPromise: a };
1248
+ }, La = (t) => {
1249
+ const { gmapKey: e, amapKey: n, amapSecret: i, amapServiceHost: a, supplier: o, language: r, onChange: s } = t;
1250
+ return o === "gmap" ? Aa({
1251
+ apiKey: e,
1252
+ language: r,
1253
+ version: "beta",
1254
+ libraries: ya,
1255
+ onChange: s
1256
+ }) : ja({
1257
+ apiKey: n,
1258
+ apiSecret: i,
1259
+ apiServiceHost: a,
1260
+ plugins: va,
1261
+ onChange: s
1216
1262
  });
1263
+ };
1264
+ var Na = "_1d8ur7t0";
1265
+ const Sa = v(function(e, { slots: n, emit: i }) {
1266
+ const {
1267
+ onDragStart: a,
1268
+ onDragEnd: o,
1269
+ mapRef: r,
1270
+ vectorMapForeign: s = "style_zh_cn",
1271
+ ...u
1272
+ } = e, l = L(() => ({
1273
+ dragEnable: !!e.dragEnable,
1274
+ zoomEnable: !!e.zoomEnable,
1275
+ jogEnable: !!e.jogEnable,
1276
+ pitchEnable: !!e.pitchEnable,
1277
+ rotateEnable: !!e.rotateEnable,
1278
+ animateEnable: !!e.animateEnable,
1279
+ keyboardEnable: !!e.keyboardEnable
1280
+ })), d = w(), c = w();
1281
+ return Dn(c), B(() => {
1282
+ if (c.value || !d.value)
1283
+ return;
1284
+ const g = new AMap.Map(d.value, {
1285
+ ...u,
1286
+ vectorMapForeign: s,
1287
+ mapStyle: "amap://styles/95498a904992a4c0b866a3e4d7729682"
1288
+ });
1289
+ c.value = g, r == null || r(g);
1290
+ }), re(
1291
+ () => l.value,
1292
+ (g) => {
1293
+ var I;
1294
+ (I = c.value) == null || I.setStatus(g);
1295
+ }
1296
+ ), xe(c, e, [
1297
+ { name: "center", defaultValue: [0, 0] },
1298
+ { name: "zooms", defaultValue: [0, 0] },
1299
+ { name: "zoom", defaultValue: 0 },
1300
+ { name: "layers", defaultValue: [] },
1301
+ { name: "limitBounds", defaultValue: [] },
1302
+ { name: "rotation", defaultValue: 0 },
1303
+ { name: "defaultCursor", defaultValue: "" },
1304
+ { name: "mapStyle", defaultValue: "" },
1305
+ { name: "features", defaultValue: [] },
1306
+ { name: "pitch", defaultValue: 0 },
1307
+ { name: "mask", defaultValue: [] },
1308
+ { name: "labelRejectMask", defaultValue: !1 }
1309
+ ]), ie(c, e, i, ["onDragStart", "onDragEnd"]), () => {
1310
+ var g;
1311
+ return M("div", { ref: d, class: Na }, (g = n.default) == null ? void 0 : g.call(n));
1312
+ };
1217
1313
  });
1218
- var ye = /* @__PURE__ */ ((t) => (t.topLeft = "top-left", t.topCenter = "top-center", t.topRight = "top-right", t.middleLeft = "middle-left", t.center = "center", t.middleRight = "middle-right", t.bottomLeft = "bottom-left", t.bottomCenter = "bottom-center", t.bottomRight = "bottom-right", t))(ye || {});
1219
- var Je = J({ defaultClassName: "", variantClassNames: { textAlign: { left: "fhyw83", right: "fhyw84" } }, defaultVariants: {}, compoundVariants: [] }), Xe = J({ defaultClassName: "fhyw85", variantClassNames: { textAlign: { left: "fhyw86", right: "fhyw87" } }, defaultVariants: {}, compoundVariants: [] }), Vt = "fhyw8b", Qt = J({ defaultClassName: "fhyw80", variantClassNames: { textAlign: { left: "fhyw81", right: "fhyw82" } }, defaultVariants: {}, compoundVariants: [] }), re = J({ defaultClassName: "fhyw88", variantClassNames: { hideIcon: { true: "fhyw89", false: "fhyw8a" } }, defaultVariants: {}, compoundVariants: [] });
1220
- const ga = v(function(e) {
1221
- const n = L(() => {
1222
- var o;
1223
- return (o = e.textAlign) != null ? o : "right";
1224
- }), i = L(() => {
1225
- const {
1226
- hideIcon: o = !1
1227
- } = e;
1228
- return `
1229
- <div class="${Qt({
1230
- textAlign: n.value
1231
- })}">
1232
- <img class="${re({
1233
- hideIcon: o
1234
- })} ${Je({
1235
- textAlign: n.value
1236
- })}" src="${T}">
1237
- <div class="${Vt}">${e.label}</div>
1238
- </div>
1239
- `;
1240
- }), a = L(() => {
1314
+ let se = "user";
1315
+ const ha = () => se, Jt = () => ({ executeMapApi: (e) => {
1316
+ se = "api";
1317
+ try {
1318
+ e(), setTimeout(() => {
1319
+ se = "user";
1320
+ }, 100);
1321
+ } catch (n) {
1322
+ throw se = "user", n;
1323
+ }
1324
+ } }), Da = v(function(e, { slots: n, emit: i }) {
1325
+ const a = e.mapRef, o = L(() => {
1326
+ const { mapRef: c, onDragStart: g, onDragEnd: I, ...m } = e;
1327
+ return m;
1328
+ }), r = o.value, s = w(), u = w(), { executeMapApi: l } = Jt(), d = (c) => i(c, { target: u.value });
1329
+ return Cn(u), B(() => {
1330
+ if (u.value || !s.value)
1331
+ return;
1332
+ let c;
1333
+ l(() => {
1334
+ c = new google.maps.Map(s.value, { ...r });
1335
+ }), u.value = c, a == null || a(c);
1336
+ }), re(
1337
+ () => o.value,
1338
+ (c) => {
1339
+ l(() => {
1340
+ var g;
1341
+ return (g = u.value) == null ? void 0 : g.setOptions({ ...c });
1342
+ });
1343
+ }
1344
+ ), _(u, e, d, ["onDragStart", "onDragEnd"]), () => {
1345
+ var c;
1346
+ return M("div", { ref: s }, (c = n.default) == null ? void 0 : c.call(n));
1347
+ };
1348
+ }), wo = Q(function(e, {
1349
+ slots: n
1350
+ }) {
1351
+ const {
1352
+ statusRef: i,
1353
+ readyPromise: a
1354
+ } = La(e), o = new Proxy(e, {
1355
+ get(r, s, u) {
1356
+ return s === "status" ? i.value : s === "readyPromise" ? a : Reflect.get(r, s, u);
1357
+ }
1358
+ });
1359
+ return hn(o), () => {
1360
+ var r;
1361
+ return M("div", [(r = n.default) == null ? void 0 : r.call(n)]);
1362
+ };
1363
+ }).props(["amapKey", "amapSecret", "amapServiceHost", "gmapId", "gmapKey", "supplier", "language"]), Ca = Q(function(e, {
1364
+ slots: n,
1365
+ emit: i
1366
+ }) {
1367
+ const a = j(), o = ({
1368
+ target: s
1369
+ }) => {
1241
1370
  const {
1242
- hideIcon: o = !1
1243
- } = e;
1244
- return `<img class="${re({
1245
- hideIcon: o
1246
- })} ${Je({
1247
- textAlign: n.value
1248
- })}" src="${T}">`;
1249
- });
1250
- return () => m(R, {
1251
- attrs: {
1252
- position: e.position,
1253
- content: e.label ? i.value : a.value,
1254
- anchor: n.value === "left" ? ye.middleRight : ye.middleLeft
1255
- }
1256
- });
1257
- }), Ia = v(function(e) {
1258
- const n = L(() => {
1259
- var o;
1260
- return (o = e.textAlign) != null ? o : "right";
1261
- }), i = L(() => {
1371
+ lng: u,
1372
+ lat: l
1373
+ } = s.getCenter();
1374
+ i("dragEnd", [u(), l()]);
1375
+ }, r = ({
1376
+ target: s
1377
+ }) => {
1262
1378
  const {
1263
- hideIcon: o = !1
1264
- } = e;
1265
- return z("div", {
1266
- class: `${Qt({
1267
- textAlign: n.value
1268
- })} ${Xe({
1269
- textAlign: n.value
1270
- })}`
1271
- }, `
1272
- <img class="${re({
1273
- hideIcon: o
1274
- })}" src="${T}">
1275
- <div class="${Vt}">${e.label}</div>
1276
- `);
1277
- }), a = L(() => {
1379
+ lng: u,
1380
+ lat: l
1381
+ } = s.getCenter();
1382
+ i("dragEnd", [u, l]);
1383
+ };
1384
+ return () => {
1385
+ var f, p, A;
1278
1386
  const {
1279
- hideIcon: o = !1
1387
+ supplier: s,
1388
+ gmapId: u,
1389
+ language: l = "zh",
1390
+ status: d
1391
+ } = a, {
1392
+ mapRef: c,
1393
+ center: g,
1394
+ zoom: I
1280
1395
  } = e;
1281
- return z("img", {
1282
- class: `${re({
1283
- hideIcon: o
1284
- })} ${Xe({
1285
- textAlign: n.value
1286
- })}`,
1287
- src: T
1288
- });
1289
- });
1290
- return () => m(G, {
1291
- attrs: {
1292
- position: C(e.position),
1293
- content: e.label ? i.value : a.value
1294
- }
1295
- });
1296
- }), Ma = v(function(e) {
1297
- const n = j();
1298
- return () => E(n.supplier === "gmap" ? Ia : ga, {
1299
- attrs: e
1300
- });
1301
- }), Mo = v(function(e) {
1302
- return () => m("div", [e.places.map((n) => m(Ma, {
1303
- attrs: {
1304
- position: ve(n),
1305
- label: n.name,
1306
- textAlign: "left"
1307
- }
1308
- }))]);
1309
- }), Jt = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSI3Mi4zMzklIiB5MT0iNTAlIiB4Mj0iMCUiIHkyPSI1MCUiIGlkPSJwcmVmaXhfX2EiPjxzdG9wIHN0b3AtY29sb3I9IiNGRjg0NDciIG9mZnNldD0iMCUiLz48c3RvcCBzdG9wLWNvbG9yPSIjRkY4QjRBIiBvZmZzZXQ9IjUwLjU5NiUiLz48c3RvcCBzdG9wLWNvbG9yPSIjRkZBOTVBIiBvZmZzZXQ9IjEwMCUiLz48L2xpbmVhckdyYWR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J({ defaultClassName: "", variantClassNames: { type: { start: "_4a4ovk6", end: "_4a4ovk7" } }, defaultVariants: {}, compoundVariants: [] }), Ft = "_4a4ovk1", $t = "_4a4ovk4", _t = "_4a4ovk5", Kt = "_4a4ovk3", se = "_4a4ovk0", qt = "_4a4ovk2";
1311
- const fa = Me(function(e) {
1312
- const n = L(() => {
1313
- var o;
1314
- const i = e.type === "start" ? Xt : Jt, a = e.description ? fe(e.description).map((r) => r.type === "normal" ? r.value : `<span class="${_t}">${r.value}</span>`).join("") : "";
1315
- return !e.description && !e.title ? `<img src="${i}" class="${H({
1316
- type: e.type
1317
- })}">` : e.description ? `
1318
- <div class="${se}">
1319
- <div class="${Ft}">
1320
- <div class="${Kt}">${(o = e.title) != null ? o : ""}</div>
1321
- <div class="${$t}">${a}</div>
1322
- </div>
1323
- <img src="${i}" class="${H({
1324
- type: e.type
1325
- })}">
1326
- </div>
1327
- ` : `
1328
- <div class="${se}">
1329
- <div class="${qt}">${e.title}</div>
1330
- <img src="${i}" class="${H({
1331
- type: e.type
1332
- })}">
1333
- </div>
1334
- `;
1335
- });
1336
- return () => m(R, {
1337
- attrs: {
1338
- registerOverlay: e.registerOverlay,
1339
- position: e.position,
1340
- content: n.value,
1341
- anchor: "bottom-center"
1342
- }
1343
- });
1344
- }).props(["type", "title", "registerOverlay", "position", "description"]), ma = Me(function(e) {
1345
- const n = L(() => {
1346
- var o;
1347
- const i = e.type === "start" ? Xt : Jt, a = e.description ? fe(e.description).map((r) => r.type === "normal" ? r.value : `<span class="${_t}">${r.value}</span>`).join("") : "";
1348
- return !e.description && !e.title ? z("img", {
1349
- class: H({
1350
- type: e.type
1351
- }),
1352
- src: i
1353
- }) : e.description ? z("div", {
1354
- class: se
1355
- }, `
1356
- <div class="${Ft}">
1357
- <div class="${Kt}">${(o = e.title) != null ? o : ""}</div>
1358
- <div class="${$t}">${a}</div>
1359
- </div>
1360
- <img src="${i}" class="${H({
1361
- type: e.type
1362
- })}">
1363
- `) : z("div", {
1364
- class: se
1365
- }, `
1366
- <div class="${qt}">${e.title}</div>
1367
- <img src="${i}" class="${H({
1368
- type: e.type
1369
- })}">
1370
- `);
1371
- });
1372
- return () => m(G, {
1373
- attrs: {
1374
- registerOverlay: e.registerOverlay,
1375
- position: C(e.position),
1376
- content: n.value
1396
+ if (d === ae.LOADING)
1397
+ return (f = n.loading) == null ? void 0 : f.call(n);
1398
+ if (d === ae.FAILURE)
1399
+ return (p = n.fallback) == null ? void 0 : p.call(n);
1400
+ const m = (A = n.default) == null ? void 0 : A.call(n);
1401
+ switch (s) {
1402
+ case "gmap":
1403
+ return M(Da, {
1404
+ attrs: {
1405
+ mapRef: c,
1406
+ mapId: u,
1407
+ center: g ? x(g) : void 0,
1408
+ zoom: I
1409
+ },
1410
+ on: {
1411
+ dragEnd: o
1412
+ }
1413
+ }, [m]);
1414
+ default:
1415
+ return M(Sa, {
1416
+ attrs: {
1417
+ mapRef: c,
1418
+ vectorMapForeign: la(l),
1419
+ center: g,
1420
+ zoom: I
1421
+ },
1422
+ on: {
1423
+ dragEnd: r
1424
+ }
1425
+ }, [m]);
1377
1426
  }
1378
- });
1379
- }).props(["type", "title", "registerOverlay", "position", "description"]), fo = v(function(e) {
1380
- const n = j();
1381
- return () => E(n.supplier === "gmap" ? ma : fa, {
1382
- attrs: e
1383
- });
1384
- }), ce = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iNDQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik0zNC4wODcgMTAuOTZjMCAyLjM2OS0uMDU0IDIuOTgtLjc4MiAzLjcwNC0uNzkzLjc5LTUuMjM2LjgzMy01LjIzNi44MzNsLTQuMTE2LjE5Mi05Ljg5Ni0uMTQ0cy03Ljc5LS4wMjYtOS4xMzEtLjAyNmMtMS4zNDI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42NzMgMCAwMC0uMzAzIDIuNTJjLS4xNDcgMi44ODQuMDIgMy4zMTQuMjMyIDUuMDQ4LjAwNi4wNTcuMDI2LjE1Mi4wNTYuMjc0LTEuNTEzLjI3OC0zIC41NC00LjkxMi41NC0xLjg0NyAwLTMuMjg5LS4yNS00Ljc1LS41MTF2LS4wMDhjLjAzLS4xMzEuMDU1LS4yMzMuMDYtLjI5LjIxOC0xLjc0NC4zOC0yLjE3My4yMzMtNS4wNTN6IiBmaWxsPSIjRjJGQUZGIi8+PHBhdGggZD0iTTEyLjA2NyAxOS43MTZsLTQuNjQ1LjY5MmMtLjQzMS0yLjkyLS44MzItNC4zNi0xLjIwMi00LjMyNGwtLjIxLTEuMjk3YTExLjczMiAxMS43MzIgMCAwMTYuMDI2LTEuNjczYy4zODYgMC0uMTM3LjA1LTEuNTY5LjE0N2wxLjYgNi40NTV6IiBmaWxsPSIjMTYxNjE2Ii8+PC9nPjwvZz48L3N2Zz4=";
1385
- var ue = "_65j3sr1", en = "_4a4ovk5", tn = "_4a4ovk0", nn = "_4a4ovk2";
1386
- const pa = v(function(e) {
1387
- const n = L(() => {
1427
+ };
1428
+ }).props(["center", "fallback", "loading", "mapRef", "zoom"]), Xt = (t) => {
1429
+ const { onChange: e, onLoad: n, onLoadDefault: i } = t != null ? t : {}, a = h(!1), o = h(!1), r = h(), s = h({
1430
+ accuracy: 0,
1431
+ altitude: 0,
1432
+ altitudeAccuracy: 0,
1433
+ heading: 0,
1434
+ latitude: 0,
1435
+ longitude: 0,
1436
+ speed: 0
1437
+ }), u = h([s.value.longitude, s.value.latitude]);
1438
+ return P(
1439
+ () => !0,
1440
+ (l, d, c) => {
1441
+ a.value = !0;
1442
+ const g = navigator.geolocation.watchPosition(
1443
+ (I) => {
1444
+ const m = I.coords, f = [I.coords.longitude, I.coords.latitude];
1445
+ s.value = m, u.value = f, a.value && (a.value = !1, o.value = !0, n == null || n({ position: f, coordinate: m })), e == null || e({ position: f, coordinate: m });
1446
+ },
1447
+ (I) => {
1448
+ a.value = !1, r.value = I;
1449
+ const m = t == null ? void 0 : t.geoDefaultPosition;
1450
+ m && (i == null || i({ position: m })), console.log("errorRef = ", r);
1451
+ },
1452
+ // todo 要不要 timeout
1453
+ { timeout: 5e3, maximumAge: 0, enableHighAccuracy: !0 }
1454
+ );
1455
+ c(() => navigator.geolocation.clearWatch(g));
1456
+ },
1457
+ { immediate: !0 }
1458
+ ), {
1459
+ geoError: r,
1460
+ geoPosition: u,
1461
+ geoCoordinate: s,
1462
+ geoLoading: a,
1463
+ geoReady: o
1464
+ };
1465
+ }, ne = v(function(e) {
1466
+ const n = w(), i = he();
1467
+ return fe(() => {
1468
+ n.value = new AMap.Polyline({ ...e });
1469
+ }), pe(() => {
1470
+ var a;
1471
+ (a = n.value) == null || a.setMap(null);
1472
+ }), B(() => {
1388
1473
  var o;
1389
- const i = e.title ? fe(e.title).map((r) => r.type === "normal" ? r.value : `<span class="${en}">${r.value}</span>`).join("") : "", a = `transform:rotate(${(o = e.angle) != null ? o : 0}deg)`;
1390
- return e.title ? `
1391
- <div class="${tn}">
1392
- <div class="${nn}">${i}</div>
1393
- <img src="${ce}" class="${ue}" style="${a}">
1394
- </div>
1395
- ` : `<img src="${ce}" class="${ue}" style="${a}">`;
1396
- });
1397
- return () => m(R, {
1398
- attrs: {
1399
- position: e.position,
1400
- content: n.value,
1401
- anchor: "bottom-center"
1474
+ const a = i == null ? void 0 : i.value;
1475
+ a && ((o = n.value) == null || o.setMap(a));
1476
+ }), xe(n, e, [
1477
+ { name: "path", defaultValue: [[0, 0]] },
1478
+ { name: "extData", defaultValue: void 0 },
1479
+ { name: "draggable", defaultValue: !1 }
1480
+ ]), re(
1481
+ () => {
1482
+ const { path: a, extData: o, draggable: r, ...s } = e;
1483
+ return s;
1484
+ },
1485
+ (a) => {
1486
+ var o;
1487
+ (o = n.value) == null || o.setOptions({ ...a });
1402
1488
  }
1403
- });
1404
- }), va = v(function(e) {
1405
- const n = L(() => {
1489
+ ), () => null;
1490
+ }), ce = v(function(e) {
1491
+ const n = w(), i = De();
1492
+ return fe(() => {
1493
+ n.value = new google.maps.Polyline({ ...e });
1494
+ }), pe(() => {
1495
+ var a;
1496
+ (a = n.value) == null || a.setMap(null);
1497
+ }), B(() => {
1406
1498
  var o;
1407
- const i = e.title ? fe(e.title).map((r) => r.type === "normal" ? r.value : `<span class="${en}">${r.value}</span>`).join("") : "", a = `transform:rotate(${(o = e.angle) != null ? o : 0}deg)`;
1408
- return e.title ? z("div", {
1409
- class: tn
1410
- }, `
1411
- <div class="${nn}">${i}</div>
1412
- <img src="${ce}" class="${ue}" style="${a}">
1413
- `) : z("img", {
1414
- class: ue,
1415
- src: ce,
1416
- style: a
1417
- });
1418
- });
1419
- return () => m(G, {
1420
- attrs: {
1421
- position: C(e.position),
1422
- content: n.value
1499
+ const a = i == null ? void 0 : i.value;
1500
+ a && ((o = n.value) == null || o.setMap(a));
1501
+ }), re(
1502
+ () => ({ ...e }),
1503
+ (a) => {
1504
+ var o;
1505
+ (o = n.value) == null || o.setOptions({ ...a });
1423
1506
  }
1424
- });
1425
- }), mo = v(function(e) {
1426
- const n = j();
1427
- return () => E(n.supplier === "gmap" ? va : pa, {
1428
- attrs: e
1429
- });
1430
- }), ya = v(function(e) {
1507
+ ), () => null;
1508
+ }), xa = v(function(e) {
1431
1509
  return () => {
1432
- const {
1433
- path: n
1434
- } = e;
1435
- if (n.length === 0)
1436
- return null;
1437
- const a = 2 * (window.innerWidth * 0.01);
1438
- return m(_, {
1510
+ const n = window.innerWidth * 0.01, i = 2.5 * n, a = 0.35 * n, o = 0.6 * n, r = 1 * n, s = 0.75 * n, u = e.done ? "#96B2CA" : "#487BF4", l = e.done ? "#7693AF" : "#4175F1", d = e.done ? "#7693AF" : "#6C95F5";
1511
+ return M("div", [M(ne, {
1439
1512
  attrs: {
1440
- path: n,
1441
- strokeWeight: a,
1513
+ path: e.path,
1514
+ strokeWeight: i + 2 * a + 2 * r,
1442
1515
  strokeOpacity: 1,
1443
- strokeColor: "#38A3FE",
1516
+ strokeColor: l,
1517
+ lineJoin: "round",
1518
+ lineCap: "round"
1519
+ }
1520
+ }), M(ne, {
1521
+ attrs: {
1522
+ path: e.path,
1523
+ strokeWeight: i + 2 * a,
1524
+ strokeOpacity: 1,
1525
+ strokeColor: d,
1526
+ lineJoin: "round",
1527
+ lineCap: "round",
1444
1528
  strokeStyle: "dashed",
1445
- strokeDasharray: [a, a * 1.5],
1529
+ strokeDasharray: [s, s * 0.5]
1530
+ }
1531
+ }), M(ne, {
1532
+ attrs: {
1533
+ path: e.path,
1534
+ strokeWeight: i,
1535
+ strokeOpacity: 1,
1536
+ strokeColor: u,
1446
1537
  lineJoin: "round",
1447
1538
  lineCap: "round"
1448
1539
  }
1449
- });
1540
+ }), M(ne, {
1541
+ attrs: {
1542
+ showDir: !0,
1543
+ path: e.path,
1544
+ strokeWeight: i + 2 * o,
1545
+ strokeOpacity: 1,
1546
+ strokeColor: "transparent",
1547
+ lineJoin: "round",
1548
+ lineCap: "round"
1549
+ }
1550
+ })]);
1450
1551
  };
1451
- }), ja = v(function(e) {
1452
- const n = L(() => e.path.map(C));
1552
+ }), wa = v(function(e) {
1553
+ const n = L(() => e.path.map(x));
1453
1554
  return () => {
1454
- const i = n.value;
1455
- if (i.length === 0)
1456
- return null;
1457
- const o = 2 * (window.innerWidth * 0.01), r = o / 4;
1458
- return m(ne, {
1555
+ const i = window.innerWidth * 0.01, a = 10 * i, o = 2.5 * i, r = 0.35 * i, s = 0.75 * i, u = 1 * i, l = e.done ? "#96B2CA" : "#487BF4", d = e.done ? "#7693AF" : "#4175F1", c = e.done ? "#7693AF" : "#6C95F5";
1556
+ return M("div", [M(ce, {
1459
1557
  attrs: {
1460
- path: i,
1461
- strokeWeight: o,
1558
+ path: n.value,
1559
+ strokeWeight: o + 2 * r + 2 * u,
1462
1560
  strokeOpacity: 1,
1463
- strokeColor: "transparent",
1561
+ strokeColor: d
1562
+ }
1563
+ }), M(ce, {
1564
+ attrs: {
1565
+ path: n.value,
1464
1566
  icons: [{
1465
1567
  icon: {
1466
- path: `
1467
- M ${r}, ${r}
1468
- m -${r}, 0
1469
- a ${r},${r} 0 1,0 ${2 * r},0
1470
- a ${r},${r} 0 1,0 -${2 * r},0
1471
- `,
1472
- strokeColor: "#38A3FE",
1473
- fillColor: "#38A3FE",
1474
- fillOpacity: 1,
1475
- strokeOpacity: 1,
1476
- strokeWeight: o / 2,
1568
+ path: "M 0,-0.5 0,0.5",
1569
+ strokeWeight: o + 2 * r,
1570
+ strokeColor: c,
1571
+ fillColor: c,
1477
1572
  scale: 1
1478
1573
  },
1479
- repeat: `${o * 2}px`
1574
+ repeat: `${o}px`,
1575
+ offset: `${o / 2}px`
1576
+ }]
1577
+ }
1578
+ }), M(ce, {
1579
+ attrs: {
1580
+ path: n.value,
1581
+ strokeWeight: o,
1582
+ strokeOpacity: 1,
1583
+ strokeColor: l,
1584
+ icons: [{
1585
+ icon: {
1586
+ path: google.maps.SymbolPath.FORWARD_OPEN_ARROW,
1587
+ strokeColor: "white",
1588
+ strokeWeight: s,
1589
+ // todo: 3 maybe not responsive
1590
+ scale: 3
1591
+ },
1592
+ repeat: `${a}px`
1480
1593
  }]
1481
1594
  }
1482
- });
1595
+ })]);
1483
1596
  };
1484
- }), po = v(function(e) {
1597
+ }), we = v(function(e) {
1485
1598
  const n = j();
1486
- return () => E(n.supplier === "gmap" ? ja : ya, {
1599
+ return () => e.path.length ? E(n.supplier === "gmap" ? wa : xa, {
1487
1600
  attrs: e
1488
- });
1489
- }), an = (t) => {
1490
- const e = w([]), n = new AMap.Walking({});
1491
- return Q(
1601
+ }) : null;
1602
+ }), Ft = (t) => {
1603
+ const e = C({ path: [], distance: 0, duration: 0 }), n = new AMap.Driving({});
1604
+ return K(
1492
1605
  () => ({ ...t }),
1493
1606
  ({ from: i, to: a }) => {
1494
- n.search(AMap.LngLat.from(i), AMap.LngLat.from(a), (o, r) => {
1495
- switch (o) {
1496
- case "complete": {
1497
- let s = [];
1498
- const u = r;
1499
- for (const l of u.routes)
1607
+ n.search(
1608
+ AMap.LngLat.from(i),
1609
+ AMap.LngLat.from(a),
1610
+ { waypoints: [] },
1611
+ (o, r) => {
1612
+ switch (o) {
1613
+ case "complete": {
1614
+ let s = [];
1615
+ const l = r.routes[0];
1500
1616
  for (const d of l.steps) {
1501
- const c = d.path.map(({ lng: g, lat: I }) => [g, I]);
1502
- s = s.concat(c);
1617
+ const g = d.path.map(({ lng: I, lat: m }) => [I, m]);
1618
+ s = s.concat(g);
1503
1619
  }
1504
- e.value = s;
1505
- return;
1620
+ e.path = s, e.distance = l.distance, e.duration = l.time;
1621
+ return;
1622
+ }
1623
+ case "no_data":
1624
+ e.path = [], e.distance = 0, e.duration = 0;
1625
+ return;
1626
+ default:
1627
+ throw r;
1506
1628
  }
1507
- case "no_data":
1508
- e.value = [];
1509
- return;
1510
- default:
1511
- throw r;
1512
1629
  }
1513
- });
1630
+ );
1514
1631
  }
1515
1632
  ), e;
1516
- }, on = (t) => {
1517
- const e = w([]), n = new google.maps.DirectionsService();
1518
- return Q(
1633
+ }, $t = (t) => {
1634
+ const e = C({ path: [], distance: 0, duration: 0 }), n = new google.maps.DirectionsService();
1635
+ return K(
1519
1636
  () => ({ ...t }),
1520
1637
  ({ from: i, to: a }) => {
1521
1638
  n.route(
1522
1639
  {
1523
1640
  origin: { lng: i[0], lat: i[1] },
1524
1641
  destination: { lng: a[0], lat: a[1] },
1525
- travelMode: google.maps.TravelMode.WALKING
1642
+ travelMode: google.maps.TravelMode.DRIVING
1526
1643
  },
1527
1644
  (o, r) => {
1645
+ var s, u, l, d;
1528
1646
  switch (r) {
1529
1647
  case google.maps.DirectionsStatus.OK: {
1530
- let s = [];
1531
- o == null || o.routes.map((u) => {
1532
- const l = u.overview_path.map((d) => [d.lng(), d.lat()]);
1533
- s = s.concat(l);
1534
- }), e.value = s;
1648
+ let c = [], g = 0, I = 0;
1649
+ const m = o.routes[0], f = m.overview_path.map((p) => [
1650
+ p.lng(),
1651
+ p.lat()
1652
+ ]);
1653
+ c = c.concat(f);
1654
+ for (const p of m.legs)
1655
+ g += (u = (s = p.distance) == null ? void 0 : s.value) != null ? u : 0, I += (d = (l = p.duration) == null ? void 0 : l.value) != null ? d : 0;
1656
+ e.path = c, e.distance = g, e.duration = I;
1535
1657
  return;
1536
1658
  }
1537
1659
  case google.maps.DirectionsStatus.ZERO_RESULTS:
1538
1660
  case google.maps.DirectionsStatus.NOT_FOUND:
1539
- e.value = [];
1661
+ e.path = [], e.distance = 0, e.duration = 0;
1540
1662
  return;
1541
1663
  default:
1542
1664
  throw new Error(r);
@@ -1545,676 +1667,953 @@ const pa = v(function(e) {
1545
1667
  );
1546
1668
  }
1547
1669
  ), e;
1548
- }, vo = (t) => {
1670
+ }, bo = (t) => {
1671
+ const { supplier: e } = j();
1672
+ return e === "gmap" ? $t(t) : Ft(t);
1673
+ }, ba = (t, e, n) => {
1674
+ if (!n)
1675
+ return 0;
1676
+ const { x: i, y: a } = n.lngLatToContainer(t), { x: o, y: r } = n.lngLatToContainer(e), s = Math.atan2(a - r, o - i);
1677
+ return (Math.PI / 2 - s) / Math.PI * 180;
1678
+ }, _t = (t) => L(() => {
1679
+ const { map: e, path: n } = t, [i, a] = n;
1680
+ if (!(!i || !a || !e))
1681
+ return ba(i, a, e);
1682
+ }), Kt = (t) => L(() => {
1683
+ const { path: e } = t, [n, i] = e;
1684
+ if (!(!n || !i))
1685
+ return google.maps.geometry.spherical.computeHeading(x(n), x(i));
1686
+ }), Po = (t) => {
1549
1687
  const { supplier: e } = j();
1550
- return e === "gmap" ? on(t) : an(t);
1551
- }, Aa = v(function(e, {
1688
+ return e === "gmap" ? Kt(t) : _t(t);
1689
+ }, Pa = v(function(e, {
1552
1690
  slots: n
1553
1691
  }) {
1554
- const i = an(e);
1692
+ const i = he(), {
1693
+ path: a,
1694
+ distance: o,
1695
+ duration: r
1696
+ } = ot(Ft(e)), s = _t(C({
1697
+ path: a,
1698
+ map: i
1699
+ }));
1555
1700
  return () => {
1556
- var a;
1557
- return m("div", [(a = n.render) == null ? void 0 : a.call(n, x({
1558
- path: i
1701
+ var u;
1702
+ return M("div", [(u = n.render) == null ? void 0 : u.call(n, C({
1703
+ path: a,
1704
+ angle: s,
1705
+ distance: o,
1706
+ duration: r
1559
1707
  }))]);
1560
1708
  };
1561
- }), La = v(function(e, {
1709
+ }), za = v(function(e, {
1562
1710
  slots: n
1563
1711
  }) {
1564
- const i = on(e);
1712
+ const i = De(), {
1713
+ path: a,
1714
+ distance: o,
1715
+ duration: r
1716
+ } = ot($t(e)), s = Kt(C({
1717
+ path: a,
1718
+ map: i
1719
+ }));
1565
1720
  return () => {
1566
- var a;
1567
- return m("div", [(a = n.render) == null ? void 0 : a.call(n, x({
1568
- path: i
1721
+ var u;
1722
+ return M("div", [(u = n.render) == null ? void 0 : u.call(n, C({
1723
+ path: a,
1724
+ angle: s,
1725
+ distance: o,
1726
+ duration: r
1569
1727
  }))]);
1570
1728
  };
1571
- }), yo = v(function(e, {
1729
+ }), be = v(function(e, {
1572
1730
  slots: n
1573
1731
  }) {
1574
1732
  const {
1575
1733
  supplier: i
1576
1734
  } = j();
1577
- return () => E(i === "gmap" ? La : Aa, {
1578
- attrs: e,
1579
- scopedSlots: n
1580
- });
1581
- }), le = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTE5IiBoZWlnaHQ9IjExOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcz48cmFkaWFsR3JhZGllbnQgY3g9IjUwJSIgY3k9IjUwJSIgZng9IjUwJSIgZnk9IjUwJSIgcj0iNTAlIiBpZD0icHJlZml4X19hIj48c3RvcCBzdG9wLWNvbG9yPSIjRkZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzQ0NzFGRiIgb2Zmc2V0PSIxMDAlIi8+PC9yYWRpYWxHcmFkaWVudD48L2RlZnM+PGNpcmNsZSBjeD0iMTkxLjM5NCIgY3k9IjIzOCIgcj0iNTkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzIgLTE3OSkiIGZpbGw9InVybCgjcHJlZml4X19hKSIgZmlsbC1ydWxlPSJldmVub2RkIiBvcGFjaXR5PSIuMiIvPjwvc3ZnPg==";
1582
- var rn = "rrvp0y3", de = "rrvp0y2";
1583
- const Na = v(function(e) {
1584
- const n = L(() => `<img src="${le}" class="${de}">`), i = L(() => `<img src="${le}" class="${de} ${rn}">`);
1585
- return () => m("div", [m(R, {
1586
- attrs: {
1587
- position: e.position,
1588
- anchor: "bottom-center",
1589
- content: n.value
1590
- }
1591
- }), m(R, {
1592
- attrs: {
1593
- position: e.position,
1594
- anchor: "bottom-center",
1595
- content: i.value
1596
- }
1597
- })]);
1598
- }), Sa = v(function(e) {
1599
- const n = L(() => z("img", {
1600
- class: de,
1601
- src: le
1602
- })), i = L(() => z("img", {
1603
- class: `${de} ${rn}`,
1604
- src: le
1605
- }));
1606
- return () => {
1607
- const a = C(e.position);
1608
- return m("div", [m(G, {
1609
- attrs: {
1610
- position: a,
1611
- content: n.value
1612
- }
1613
- }), m(G, {
1614
- attrs: {
1615
- position: a,
1616
- content: i.value
1617
- }
1618
- })]);
1619
- };
1620
- }), jo = v(function(e) {
1621
- const n = j();
1622
- return () => E(n.supplier === "gmap" ? Sa : Na, {
1623
- attrs: e
1624
- });
1625
- });
1626
- var je = {}, Da = {
1627
- get exports() {
1628
- return je;
1629
- },
1630
- set exports(t) {
1631
- je = t;
1632
- }
1633
- };
1634
- (function(t, e) {
1635
- (function(n, i) {
1636
- t.exports = i();
1637
- })(fn, function() {
1638
- function n(c) {
1639
- var g = [];
1640
- return c.AMapUI && g.push(i(c.AMapUI)), c.Loca && g.push(a(c.Loca)), Promise.all(g);
1641
- }
1642
- function i(c) {
1643
- return new Promise(function(g, I) {
1644
- var M = [];
1645
- if (c.plugins)
1646
- for (var f = 0; f < c.plugins.length; f += 1)
1647
- r.AMapUI.plugins.indexOf(c.plugins[f]) == -1 && M.push(c.plugins[f]);
1648
- if (s.AMapUI === o.failed)
1649
- I("前次请求 AMapUI 失败");
1650
- else if (s.AMapUI === o.notload) {
1651
- s.AMapUI = o.loading, r.AMapUI.version = c.version || r.AMapUI.version, f = r.AMapUI.version;
1652
- var p = document.body || document.head, A = document.createElement("script");
1653
- A.type = "text/javascript", A.src = "https://webapi.amap.com/ui/" + f + "/main.js", A.onerror = function(y) {
1654
- s.AMapUI = o.failed, I("请求 AMapUI 失败");
1655
- }, A.onload = function() {
1656
- if (s.AMapUI = o.loaded, M.length)
1657
- window.AMapUI.loadUI(M, function() {
1658
- for (var y = 0, h = M.length; y < h; y++) {
1659
- var P = M[y].split("/").slice(-1)[0];
1660
- window.AMapUI[P] = arguments[y];
1661
- }
1662
- for (g(); u.AMapUI.length; )
1663
- u.AMapUI.splice(0, 1)[0]();
1664
- });
1665
- else
1666
- for (g(); u.AMapUI.length; )
1667
- u.AMapUI.splice(0, 1)[0]();
1668
- }, p.appendChild(A);
1669
- } else
1670
- s.AMapUI === o.loaded ? c.version && c.version !== r.AMapUI.version ? I("不允许多个版本 AMapUI 混用") : M.length ? window.AMapUI.loadUI(M, function() {
1671
- for (var y = 0, h = M.length; y < h; y++) {
1672
- var P = M[y].split("/").slice(-1)[0];
1673
- window.AMapUI[P] = arguments[y];
1674
- }
1675
- g();
1676
- }) : g() : c.version && c.version !== r.AMapUI.version ? I("不允许多个版本 AMapUI 混用") : u.AMapUI.push(function(y) {
1677
- y ? I(y) : M.length ? window.AMapUI.loadUI(M, function() {
1678
- for (var h = 0, P = M.length; h < P; h++) {
1679
- var O = M[h].split("/").slice(-1)[0];
1680
- window.AMapUI[O] = arguments[h];
1681
- }
1682
- g();
1683
- }) : g();
1684
- });
1685
- });
1686
- }
1687
- function a(c) {
1688
- return new Promise(function(g, I) {
1689
- if (s.Loca === o.failed)
1690
- I("前次请求 Loca 失败");
1691
- else if (s.Loca === o.notload) {
1692
- s.Loca = o.loading, r.Loca.version = c.version || r.Loca.version;
1693
- var M = r.Loca.version, f = r.AMap.version.startsWith("2"), p = M.startsWith("2");
1694
- if (f && !p || !f && p)
1695
- I("JSAPI 与 Loca 版本不对应!!");
1696
- else {
1697
- f = r.key, p = document.body || document.head;
1698
- var A = document.createElement("script");
1699
- A.type = "text/javascript", A.src = "https://webapi.amap.com/loca?v=" + M + "&key=" + f, A.onerror = function(y) {
1700
- s.Loca = o.failed, I("请求 AMapUI 失败");
1701
- }, A.onload = function() {
1702
- for (s.Loca = o.loaded, g(); u.Loca.length; )
1703
- u.Loca.splice(0, 1)[0]();
1704
- }, p.appendChild(A);
1705
- }
1706
- } else
1707
- s.Loca === o.loaded ? c.version && c.version !== r.Loca.version ? I("不允许多个版本 Loca 混用") : g() : c.version && c.version !== r.Loca.version ? I("不允许多个版本 Loca 混用") : u.Loca.push(function(y) {
1708
- y ? I(y) : I();
1709
- });
1710
- });
1711
- }
1712
- if (!window)
1713
- throw Error("AMap JSAPI can only be used in Browser.");
1714
- var o;
1715
- (function(c) {
1716
- c.notload = "notload", c.loading = "loading", c.loaded = "loaded", c.failed = "failed";
1717
- })(o || (o = {}));
1718
- var r = { key: "", AMap: { version: "1.4.15", plugins: [] }, AMapUI: { version: "1.1", plugins: [] }, Loca: { version: "1.3.2" } }, s = { AMap: o.notload, AMapUI: o.notload, Loca: o.notload }, u = { AMap: [], AMapUI: [], Loca: [] }, l = [], d = function(c) {
1719
- typeof c == "function" && (s.AMap === o.loaded ? c(window.AMap) : l.push(c));
1720
- };
1721
- return { load: function(c) {
1722
- return new Promise(function(g, I) {
1723
- if (s.AMap == o.failed)
1724
- I("");
1725
- else if (s.AMap == o.notload) {
1726
- var M = c.key, f = c.version, p = c.plugins;
1727
- M ? (window.AMap && location.host !== "lbs.amap.com" && I("禁止多种API加载方式混用"), r.key = M, r.AMap.version = f || r.AMap.version, r.AMap.plugins = p || r.AMap.plugins, s.AMap = o.loading, f = document.body || document.head, window.___onAPILoaded = function(y) {
1728
- if (delete window.___onAPILoaded, y)
1729
- s.AMap = o.failed, I(y);
1730
- else
1731
- for (s.AMap = o.loaded, n(c).then(function() {
1732
- g(window.AMap);
1733
- }).catch(I); l.length; )
1734
- l.splice(0, 1)[0]();
1735
- }, p = document.createElement("script"), p.type = "text/javascript", p.src = "https://webapi.amap.com/maps?callback=___onAPILoaded&v=" + r.AMap.version + "&key=" + M + "&plugin=" + r.AMap.plugins.join(","), p.onerror = function(y) {
1736
- s.AMap = o.failed, I(y);
1737
- }, f.appendChild(p)) : I("请填写key");
1738
- } else if (s.AMap == o.loaded)
1739
- if (c.key && c.key !== r.key)
1740
- I("多个不一致的 key");
1741
- else if (c.version && c.version !== r.AMap.version)
1742
- I("不允许多个版本 JSAPI 混用");
1743
- else {
1744
- if (M = [], c.plugins)
1745
- for (f = 0; f < c.plugins.length; f += 1)
1746
- r.AMap.plugins.indexOf(c.plugins[f]) == -1 && M.push(c.plugins[f]);
1747
- M.length ? window.AMap.plugin(M, function() {
1748
- n(c).then(function() {
1749
- g(window.AMap);
1750
- }).catch(I);
1751
- }) : n(c).then(function() {
1752
- g(window.AMap);
1753
- }).catch(I);
1754
- }
1755
- else if (c.key && c.key !== r.key)
1756
- I("多个不一致的 key");
1757
- else if (c.version && c.version !== r.AMap.version)
1758
- I("不允许多个版本 JSAPI 混用");
1759
- else {
1760
- var A = [];
1761
- if (c.plugins)
1762
- for (f = 0; f < c.plugins.length; f += 1)
1763
- r.AMap.plugins.indexOf(c.plugins[f]) == -1 && A.push(c.plugins[f]);
1764
- d(function() {
1765
- A.length ? window.AMap.plugin(A, function() {
1766
- n(c).then(function() {
1767
- g(window.AMap);
1768
- }).catch(I);
1769
- }) : n(c).then(function() {
1770
- g(window.AMap);
1771
- }).catch(I);
1772
- });
1773
- }
1774
- });
1775
- }, reset: function() {
1776
- delete window.AMap, delete window.AMapUI, delete window.Loca, r = { key: "", AMap: { version: "1.4.15", plugins: [] }, AMapUI: { version: "1.1", plugins: [] }, Loca: { version: "1.3.2" } }, s = {
1777
- AMap: o.notload,
1778
- AMapUI: o.notload,
1779
- Loca: o.notload
1780
- }, u = { AMap: [], AMapUI: [], Loca: [] };
1781
- } };
1735
+ return () => E(i === "gmap" ? za : Pa, {
1736
+ attrs: e,
1737
+ scopedSlots: n
1782
1738
  });
1783
- })(Da);
1784
- var ha = function t(e, n) {
1785
- if (e === n)
1786
- return !0;
1787
- if (e && n && typeof e == "object" && typeof n == "object") {
1788
- if (e.constructor !== n.constructor)
1789
- return !1;
1790
- var i, a, o;
1791
- if (Array.isArray(e)) {
1792
- if (i = e.length, i != n.length)
1793
- return !1;
1794
- for (a = i; a-- !== 0; )
1795
- if (!t(e[a], n[a]))
1796
- return !1;
1797
- return !0;
1798
- }
1799
- if (e.constructor === RegExp)
1800
- return e.source === n.source && e.flags === n.flags;
1801
- if (e.valueOf !== Object.prototype.valueOf)
1802
- return e.valueOf() === n.valueOf();
1803
- if (e.toString !== Object.prototype.toString)
1804
- return e.toString() === n.toString();
1805
- if (o = Object.keys(e), i = o.length, i !== Object.keys(n).length)
1806
- return !1;
1807
- for (a = i; a-- !== 0; )
1808
- if (!Object.prototype.hasOwnProperty.call(n, o[a]))
1809
- return !1;
1810
- for (a = i; a-- !== 0; ) {
1811
- var r = o[a];
1812
- if (!t(e[r], n[r]))
1813
- return !1;
1814
- }
1815
- return !0;
1816
- }
1817
- return e !== e && n !== n;
1818
- };
1819
- const Fe = "__googleMapsScriptId";
1820
- var Y;
1821
- (function(t) {
1822
- t[t.INITIALIZED = 0] = "INITIALIZED", t[t.LOADING = 1] = "LOADING", t[t.SUCCESS = 2] = "SUCCESS", t[t.FAILURE = 3] = "FAILURE";
1823
- })(Y || (Y = {}));
1824
- class U {
1825
- /**
1826
- * Creates an instance of Loader using [[LoaderOptions]]. No defaults are set
1827
- * using this library, instead the defaults are set by the Google Maps
1828
- * JavaScript API server.
1829
- *
1830
- * ```
1831
- * const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});
1832
- * ```
1833
- */
1834
- constructor({ apiKey: e, authReferrerPolicy: n, channel: i, client: a, id: o = Fe, language: r, libraries: s = [], mapIds: u, nonce: l, region: d, retries: c = 3, url: g = "https://maps.googleapis.com/maps/api/js", version: I }) {
1835
- if (this.CALLBACK = "__googleMapsCallback", this.callbacks = [], this.done = !1, this.loading = !1, this.errors = [], this.apiKey = e, this.authReferrerPolicy = n, this.channel = i, this.client = a, this.id = o || Fe, this.language = r, this.libraries = s, this.mapIds = u, this.nonce = l, this.region = d, this.retries = c, this.url = g, this.version = I, U.instance) {
1836
- if (!ha(this.options, U.instance.options))
1837
- throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(U.instance.options)}`);
1838
- return U.instance;
1839
- }
1840
- U.instance = this;
1841
- }
1842
- get options() {
1843
- return {
1844
- version: this.version,
1845
- apiKey: this.apiKey,
1846
- channel: this.channel,
1847
- client: this.client,
1848
- id: this.id,
1849
- libraries: this.libraries,
1850
- language: this.language,
1851
- region: this.region,
1852
- mapIds: this.mapIds,
1853
- nonce: this.nonce,
1854
- url: this.url,
1855
- authReferrerPolicy: this.authReferrerPolicy
1856
- };
1857
- }
1858
- get status() {
1859
- return this.errors.length ? Y.FAILURE : this.done ? Y.SUCCESS : this.loading ? Y.LOADING : Y.INITIALIZED;
1860
- }
1861
- get failed() {
1862
- return this.done && !this.loading && this.errors.length >= this.retries + 1;
1863
- }
1864
- /**
1865
- * CreateUrl returns the Google Maps JavaScript API script url given the [[LoaderOptions]].
1866
- *
1867
- * @ignore
1868
- */
1869
- createUrl() {
1870
- let e = this.url;
1871
- return e += `?callback=${this.CALLBACK}`, this.apiKey && (e += `&key=${this.apiKey}`), this.channel && (e += `&channel=${this.channel}`), this.client && (e += `&client=${this.client}`), this.libraries.length > 0 && (e += `&libraries=${this.libraries.join(",")}`), this.language && (e += `&language=${this.language}`), this.region && (e += `&region=${this.region}`), this.version && (e += `&v=${this.version}`), this.mapIds && (e += `&map_ids=${this.mapIds.join(",")}`), this.authReferrerPolicy && (e += `&auth_referrer_policy=${this.authReferrerPolicy}`), e;
1872
- }
1873
- deleteScript() {
1874
- const e = document.getElementById(this.id);
1875
- e && e.remove();
1876
- }
1877
- /**
1878
- * Load the Google Maps JavaScript API script and return a Promise.
1879
- */
1880
- load() {
1881
- return this.loadPromise();
1739
+ }), qt = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjEiIGhlaWdodD0iNjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxmaWx0ZXIgeD0iLTcuMSUiIHk9Ii03LjElIiB3aWR0aD0iMTE0LjMlIiBoZWlnaHQ9IjExNC4zJSIgZmlsdGVyVW5pdHM9Im9iamVjdEJvdW5kaW5nQm94IiBpZD0icHJlZml4X19hIj48ZmVPZmZzZXQgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSIvPjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249Ii41IiBpbj0ic2hhZG93T2Zmc2V0T3V0ZXIxIiByZXN1bHQ9InNoYWRvd0JsdXJPdXRlcjEiLz48ZmVDb21wb3NpdGUgaW49InNoYWRvd0JsdXJPdXRlcjEiIGluMj0iU291cmNlQWxwaGEiIG9wZXJhdG9yPSJvdXQiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSIvPjxmZUNvbG9yTWF0cml4IHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMC4yNzc0NTMwMTYgMCIgaW49InNoYWRvd0JsdXJPdXRlcjEiLz48L2ZpbHRlcj48Y2lyY2xlIGlkPSJwcmVmaXhfX2IiIGN4PSIzMCIgY3k9IjMwIiByPSIxMC41Ii8+PC9kZWZzPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC40MDUgLjI2NCkiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PGNpcmNsZSBzdHJva2Utb3BhY2l0eT0iLjEiIHN0cm9rZT0iIzAwM0RGRiIgZmlsbC1vcGFjaXR5PSIuMTUiIGZpbGw9IiM0ODczRkUiIGN4PSIzMCIgY3k9IjMwIiByPSIyOS41Ii8+PHVzZSBmaWxsPSIjMDAwIiBmaWx0ZXI9InVybCgjcHJlZml4X19hKSIgeGxpbms6aHJlZj0iI3ByZWZpeF9fYiIvPjxjaXJjbGUgc3Ryb2tlPSIjRkZGIiBzdHJva2Utd2lkdGg9IjIuNCIgc3Ryb2tlLWxpbmVqb2luPSJzcXVhcmUiIGZpbGw9IiM0ODcxRjEiIGN4PSIzMCIgY3k9IjMwIiByPSI5LjMiLz48L2c+PC9zdmc+";
1740
+ function Ta(t, e, n) {
1741
+ return e in t ? Object.defineProperty(t, e, {
1742
+ value: n,
1743
+ enumerable: !0,
1744
+ configurable: !0,
1745
+ writable: !0
1746
+ }) : t[e] = n, t;
1747
+ }
1748
+ function qe(t, e) {
1749
+ var n = Object.keys(t);
1750
+ if (Object.getOwnPropertySymbols) {
1751
+ var i = Object.getOwnPropertySymbols(t);
1752
+ e && (i = i.filter(function(a) {
1753
+ return Object.getOwnPropertyDescriptor(t, a).enumerable;
1754
+ })), n.push.apply(n, i);
1882
1755
  }
1883
- /**
1884
- * Load the Google Maps JavaScript API script and return a Promise.
1885
- *
1886
- * @ignore
1887
- */
1888
- loadPromise() {
1889
- return new Promise((e, n) => {
1890
- this.loadCallback((i) => {
1891
- i ? n(i.error) : e(window.google);
1892
- });
1756
+ return n;
1757
+ }
1758
+ function et(t) {
1759
+ for (var e = 1; e < arguments.length; e++) {
1760
+ var n = arguments[e] != null ? arguments[e] : {};
1761
+ e % 2 ? qe(Object(n), !0).forEach(function(i) {
1762
+ Ta(t, i, n[i]);
1763
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : qe(Object(n)).forEach(function(i) {
1764
+ Object.defineProperty(t, i, Object.getOwnPropertyDescriptor(n, i));
1893
1765
  });
1894
1766
  }
1895
- /**
1896
- * Load the Google Maps JavaScript API script with a callback.
1897
- */
1898
- loadCallback(e) {
1899
- this.callbacks.push(e), this.execute();
1767
+ return t;
1768
+ }
1769
+ var Ea = (t, e, n) => {
1770
+ for (var i of Object.keys(t)) {
1771
+ var a;
1772
+ if (t[i] !== ((a = e[i]) !== null && a !== void 0 ? a : n[i]))
1773
+ return !1;
1900
1774
  }
1901
- /**
1902
- * Set the script on document.
1903
- */
1904
- setScript() {
1905
- if (document.getElementById(this.id)) {
1906
- this.callback();
1907
- return;
1775
+ return !0;
1776
+ }, q = (t) => (e) => {
1777
+ var n = t.defaultClassName, i = et(et({}, t.defaultVariants), e);
1778
+ for (var a in i) {
1779
+ var o, r = (o = i[a]) !== null && o !== void 0 ? o : t.defaultVariants[a];
1780
+ if (r != null) {
1781
+ var s = r;
1782
+ typeof s == "boolean" && (s = s === !0 ? "true" : "false");
1783
+ var u = (
1784
+ // @ts-expect-error
1785
+ t.variantClassNames[a][s]
1786
+ );
1787
+ u && (n += " " + u);
1908
1788
  }
1909
- const e = this.createUrl(), n = document.createElement("script");
1910
- n.id = this.id, n.type = "text/javascript", n.src = e, n.onerror = this.loadErrorCallback.bind(this), n.defer = !0, n.async = !0, this.nonce && (n.nonce = this.nonce), document.head.appendChild(n);
1911
- }
1912
- /**
1913
- * Reset the loader state.
1914
- */
1915
- reset() {
1916
- this.deleteScript(), this.done = !1, this.loading = !1, this.errors = [], this.onerrorEvent = null;
1917
- }
1918
- resetIfRetryingFailed() {
1919
- this.failed && this.reset();
1920
- }
1921
- loadErrorCallback(e) {
1922
- if (this.errors.push(e), this.errors.length <= this.retries) {
1923
- const n = this.errors.length * Math.pow(2, this.errors.length);
1924
- console.log(`Failed to load Google Maps script, retrying in ${n} ms.`), setTimeout(() => {
1925
- this.deleteScript(), this.setScript();
1926
- }, n);
1927
- } else
1928
- this.onerrorEvent = e, this.callback();
1929
- }
1930
- setCallback() {
1931
- window.__googleMapsCallback = this.callback.bind(this);
1932
1789
  }
1933
- callback() {
1934
- this.done = !0, this.loading = !1, this.callbacks.forEach((e) => {
1935
- e(this.onerrorEvent);
1936
- }), this.callbacks = [];
1937
- }
1938
- execute() {
1939
- if (this.resetIfRetryingFailed(), this.done)
1940
- this.callback();
1941
- else {
1942
- if (window.google && window.google.maps && window.google.maps.version) {
1943
- console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."), this.callback();
1944
- return;
1945
- }
1946
- this.loading || (this.loading = !0, this.setCallback(), this.setScript());
1790
+ for (var [l, d] of t.compoundVariants)
1791
+ Ea(l, i, t.defaultVariants) && (n += " " + d);
1792
+ return n;
1793
+ }, en = q({ defaultClassName: "_1l6offo0", variantClassNames: { size: { small: "_1l6offo1", large: "_1l6offo2" } }, defaultVariants: {}, compoundVariants: [] });
1794
+ const Za = v(function(e) {
1795
+ const n = L(() => {
1796
+ const {
1797
+ size: i = "large"
1798
+ } = e;
1799
+ return `
1800
+ <img src="${i === "large" ? qt : O}" class="${en({
1801
+ size: i
1802
+ })}">
1803
+ `;
1804
+ });
1805
+ return () => M(W, {
1806
+ attrs: {
1807
+ position: e.position,
1808
+ content: n.value,
1809
+ anchor: "bottom-center"
1810
+ }
1811
+ });
1812
+ }), Ra = v(function(e) {
1813
+ const n = L(() => {
1814
+ const {
1815
+ size: i = "large"
1816
+ } = e, a = i === "large" ? qt : O;
1817
+ return T("img", {
1818
+ class: en({
1819
+ size: i
1820
+ }),
1821
+ src: a
1822
+ });
1823
+ });
1824
+ return () => M(U, {
1825
+ attrs: {
1826
+ position: x(e.position),
1827
+ content: n.value
1828
+ }
1829
+ });
1830
+ }), Pe = v(function(e) {
1831
+ const n = j();
1832
+ return () => E(n.supplier === "gmap" ? Ra : Za, {
1833
+ attrs: e
1834
+ });
1835
+ });
1836
+ var Le = /* @__PURE__ */ ((t) => (t.topLeft = "top-left", t.topCenter = "top-center", t.topRight = "top-right", t.middleLeft = "middle-left", t.center = "center", t.middleRight = "middle-right", t.bottomLeft = "bottom-left", t.bottomCenter = "bottom-center", t.bottomRight = "bottom-right", t))(Le || {});
1837
+ var tt = q({ defaultClassName: "", variantClassNames: { textAlign: { left: "fhyw83", right: "fhyw84" } }, defaultVariants: {}, compoundVariants: [] }), nt = q({ defaultClassName: "fhyw85", variantClassNames: { textAlign: { left: "fhyw86", right: "fhyw87" } }, defaultVariants: {}, compoundVariants: [] }), tn = "fhyw8b", nn = q({ defaultClassName: "fhyw80", variantClassNames: { textAlign: { left: "fhyw81", right: "fhyw82" } }, defaultVariants: {}, compoundVariants: [] }), le = q({ defaultClassName: "fhyw88", variantClassNames: { hideIcon: { true: "fhyw89", false: "fhyw8a" } }, defaultVariants: {}, compoundVariants: [] });
1838
+ const ka = Q(function(e, {
1839
+ emit: n
1840
+ }) {
1841
+ const i = L(() => {
1842
+ var s;
1843
+ return (s = e.textAlign) != null ? s : "right";
1844
+ }), a = L(() => {
1845
+ const {
1846
+ hideIcon: s = !1
1847
+ } = e;
1848
+ return `
1849
+ <div class="${nn({
1850
+ textAlign: i.value
1851
+ })}">
1852
+ <img class="${le({
1853
+ hideIcon: s
1854
+ })} ${tt({
1855
+ textAlign: i.value
1856
+ })}" src="${O}">
1857
+ <div class="${tn}">${e.label}</div>
1858
+ </div>
1859
+ `;
1860
+ }), o = L(() => {
1861
+ const {
1862
+ hideIcon: s = !1
1863
+ } = e;
1864
+ return `<img class="${le({
1865
+ hideIcon: s
1866
+ })} ${tt({
1867
+ textAlign: i.value
1868
+ })}" src="${O}">`;
1869
+ }), r = (s) => {
1870
+ console.log("on amap marker e = ", s), n("click", e.position);
1871
+ };
1872
+ return () => M(W, {
1873
+ attrs: {
1874
+ position: e.position,
1875
+ content: e.label ? a.value : o.value,
1876
+ anchor: i.value === "left" ? Le.middleRight : Le.middleLeft
1877
+ },
1878
+ on: {
1879
+ click: r
1880
+ }
1881
+ });
1882
+ }).props(["hideIcon", "label", "position", "textAlign"]), Ga = Q(function(e, {
1883
+ emit: n
1884
+ }) {
1885
+ const i = L(() => {
1886
+ var s;
1887
+ return (s = e.textAlign) != null ? s : "right";
1888
+ }), a = L(() => {
1889
+ const {
1890
+ hideIcon: s = !1
1891
+ } = e;
1892
+ return T("div", {
1893
+ class: `${nn({
1894
+ textAlign: i.value
1895
+ })} ${nt({
1896
+ textAlign: i.value
1897
+ })}`
1898
+ }, `
1899
+ <img class="${le({
1900
+ hideIcon: s
1901
+ })}" src="${O}">
1902
+ <div class="${tn}">${e.label}</div>
1903
+ `);
1904
+ }), o = L(() => {
1905
+ const {
1906
+ hideIcon: s = !1
1907
+ } = e;
1908
+ return T("img", {
1909
+ class: `${le({
1910
+ hideIcon: s
1911
+ })} ${nt({
1912
+ textAlign: i.value
1913
+ })}`,
1914
+ src: O
1915
+ });
1916
+ }), r = (s) => {
1917
+ console.log("on gmap advanced marker view e = ", s), n("click", e.position);
1918
+ };
1919
+ return () => M(U, {
1920
+ attrs: {
1921
+ position: x(e.position),
1922
+ content: e.label ? a.value : o.value
1923
+ },
1924
+ on: {
1925
+ click: r
1926
+ }
1927
+ });
1928
+ }).props(["hideIcon", "label", "position", "textAlign"]), R = v(function(e, {
1929
+ emit: n
1930
+ }) {
1931
+ const i = j();
1932
+ return () => E(i.supplier === "gmap" ? Ga : ka, {
1933
+ attrs: e,
1934
+ on: {
1935
+ click: (a) => n("click", a)
1936
+ }
1937
+ });
1938
+ }), an = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSI3Mi4zMzklIiB5MT0iNTAlIiB4Mj0iMCUiIHkyPSI1MCUiIGlkPSJwcmVmaXhfX2EiPjxzdG9wIHN0b3AtY29sb3I9IiNGRjg0NDciIG9mZnNldD0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aWxsPSIjRkZGIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEuMjE1KSI+PHRzcGFuIHg9IjUiIHk9IjE1LjYyNCI+6LW3PC90c3Bhbj48L3RleHQ+PC9nPjwvc3ZnPg==";
1939
+ var F = q({ defaultClassName: "", variantClassNames: { type: { start: "_4a4ovk6", end: "_4a4ovk7" } }, defaultVariants: {}, compoundVariants: [] }), rn = "_4a4ovk1", sn = "_4a4ovk4", cn = "_4a4ovk5", un = "_4a4ovk3", de = "_4a4ovk0", ln = "_4a4ovk2";
1940
+ const Oa = Q(function(e) {
1941
+ const n = L(() => {
1942
+ var o;
1943
+ const i = e.type === "start" ? on : an, a = e.description ? ve(e.description).map((r) => r.type === "normal" ? r.value : `<span class="${cn}">${r.value}</span>`).join("") : "";
1944
+ return !e.description && !e.title ? `<img src="${i}" class="${F({
1945
+ type: e.type
1946
+ })}">` : e.description ? `
1947
+ <div class="${de}">
1948
+ <div class="${rn}">
1949
+ <div class="${un}">${(o = e.title) != null ? o : ""}</div>
1950
+ <div class="${sn}">${a}</div>
1951
+ </div>
1952
+ <img src="${i}" class="${F({
1953
+ type: e.type
1954
+ })}">
1955
+ </div>
1956
+ ` : `
1957
+ <div class="${de}">
1958
+ <div class="${ln}">${e.title}</div>
1959
+ <img src="${i}" class="${F({
1960
+ type: e.type
1961
+ })}">
1962
+ </div>
1963
+ `;
1964
+ });
1965
+ return () => M(W, {
1966
+ attrs: {
1967
+ registerOverlay: e.registerOverlay,
1968
+ position: e.position,
1969
+ content: n.value,
1970
+ anchor: "bottom-center"
1947
1971
  }
1948
- }
1949
- }
1950
- const xa = [
1951
- "AMap.Geolocation",
1952
- "AMap.Geocoder",
1953
- "AMap.PlaceSearch",
1954
- "AMap.Driving",
1955
- "AMap.Walking"
1956
- ], Ca = ["marker", "places", "geometry"];
1957
- var q = /* @__PURE__ */ ((t) => (t.LOADING = "LOADING", t.FAILURE = "FAILURE", t.SUCCESS = "SUCCESS", t))(q || {});
1958
- const wa = (t) => {
1959
- const { onChange: e } = t;
1960
- let n, i;
1961
- const a = new Promise((s, u) => {
1962
- n = s, i = u;
1963
- }), o = w(
1964
- "LOADING"
1965
- /* LOADING */
1966
- ), r = L(() => {
1967
- const { onChange: s, loading: u, fallback: l, apiKey: d, apiSecret: c, apiServiceHost: g, version: I, ...M } = t;
1968
- return { ...M, key: d, version: I != null ? I : "2.0.5.16" };
1969
1972
  });
1970
- return Q(
1971
- () => r.value,
1972
- (s) => {
1973
- const u = (l) => {
1974
- o.value = l, l === "SUCCESS" && n(), l === "FAILURE" && i(), e == null || e(o.value);
1975
- };
1976
- u(
1977
- "LOADING"
1978
- /* LOADING */
1979
- ), window._AMapSecurityConfig = t.apiServiceHost ? {
1980
- serviceHost: t.apiServiceHost
1981
- } : { securityJsCode: t.apiSecret }, je.load(s).then(
1982
- () => u(
1983
- "SUCCESS"
1984
- /* SUCCESS */
1985
- ),
1986
- () => u(
1987
- "FAILURE"
1988
- /* FAILURE */
1989
- )
1990
- );
1973
+ }).props(["type", "title", "registerOverlay", "position", "description"]), Wa = Q(function(e) {
1974
+ const n = L(() => {
1975
+ var o;
1976
+ const i = e.type === "start" ? on : an, a = e.description ? ve(e.description).map((r) => r.type === "normal" ? r.value : `<span class="${cn}">${r.value}</span>`).join("") : "";
1977
+ return !e.description && !e.title ? T("img", {
1978
+ class: F({
1979
+ type: e.type
1980
+ }),
1981
+ src: i
1982
+ }) : e.description ? T("div", {
1983
+ class: de
1984
+ }, `
1985
+ <div class="${rn}">
1986
+ <div class="${un}">${(o = e.title) != null ? o : ""}</div>
1987
+ <div class="${sn}">${a}</div>
1988
+ </div>
1989
+ <img src="${i}" class="${F({
1990
+ type: e.type
1991
+ })}">
1992
+ `) : T("div", {
1993
+ class: de
1994
+ }, `
1995
+ <div class="${ln}">${e.title}</div>
1996
+ <img src="${i}" class="${F({
1997
+ type: e.type
1998
+ })}">
1999
+ `);
2000
+ });
2001
+ return () => M(U, {
2002
+ attrs: {
2003
+ registerOverlay: e.registerOverlay,
2004
+ position: x(e.position),
2005
+ content: n.value
1991
2006
  }
1992
- ), { statusRef: o, readyPromise: a };
1993
- }, ba = (t) => {
1994
- const { onChange: e } = t;
1995
- let n, i;
1996
- const a = new Promise((s, u) => {
1997
- n = s, i = u;
1998
- }), o = w(
1999
- "LOADING"
2000
- /* LOADING */
2001
- ), r = L(() => {
2002
- const { onChange: s, fallback: u, loading: l, ...d } = t;
2003
- return d;
2004
2007
  });
2005
- return Q(
2006
- () => r.value,
2007
- (s) => {
2008
- const u = new U(s), l = (d) => {
2009
- o.value = d, d === "SUCCESS" && n(), d === "FAILURE" && i(), e == null || e(o.value);
2010
- };
2011
- l(
2012
- "LOADING"
2013
- /* LOADING */
2014
- ), u.load().then(
2015
- () => l(
2016
- "SUCCESS"
2017
- /* SUCCESS */
2018
- ),
2019
- () => l(
2020
- "FAILURE"
2021
- /* FAILURE */
2022
- )
2023
- );
2008
+ }).props(["type", "title", "registerOverlay", "position", "description"]), G = v(function(e) {
2009
+ const n = j();
2010
+ return () => E(n.supplier === "gmap" ? Wa : Oa, {
2011
+ attrs: e
2012
+ });
2013
+ }), ge = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iNDQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik0zNC4wODcgMTAuOTZjMCAyLjM2OS0uMDU0IDIuOTgtLjc4MiAzLjcwNC0uNzkzLjc5LTUuMjM2LjgzMy01LjIzNi44MzNsLTQuMTE2LjE5Mi05Ljg5Ni0uMTQ0cy03Ljc5LS4wMjYtOS4xMzEtLjAyNmMtMS4zNDIgMC0yLjQwNi0uODQ3LTIuNDA2LS44NDdDLjE0IDEyLjkzMiAwIDExLjA5IDAgMTEuMDlWNS44NnMuMTQtMS44NDIgMi41Mi0zLjU4M2MwI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NTEzLjI3OC0zIC41NC00LjkxMi41NC0xLjg0NyAwLTMuMjg5LS4yNS00Ljc1LS41MTF2LS4wMDhjLjAzLS4xMzEuMDU1LS4yMzMuMDYtLjI5LjIxOC0xLjc0NC4zOC0yLjE3My4yMzMtNS4wNTN6IiBmaWxsPSIjRjJGQUZGIi8+PHBhdGggZD0iTTEyLjA2NyAxOS43MTZsLTQuNjQ1LjY5MmMtLjQzMS0yLjkyLS44MzItNC4zNi0xLjIwMi00LjMyNGwtLjIxLTEuMjk3YTExLjczMiAxMS43MzIgMCAwMTYuMDI2LTEuNjczYy4zODYgMC0uMTM3LjA1LTEuNTY5LjE0N2wxLjYgNi40NTV6IiBmaWxsPSIjMTYxNjE2Ii8+PC9nPjwvZz48L3N2Zz4=";
2014
+ var Ie = "_65j3sr1", dn = "_4a4ovk5", gn = "_4a4ovk0", In = "_4a4ovk2";
2015
+ const Ua = v(function(e) {
2016
+ const n = L(() => {
2017
+ var o;
2018
+ const i = e.title ? ve(e.title).map((r) => r.type === "normal" ? r.value : `<span class="${dn}">${r.value}</span>`).join("") : "", a = `transform:rotate(${(o = e.angle) != null ? o : 0}deg)`;
2019
+ return e.title ? `
2020
+ <div class="${gn}">
2021
+ <div class="${In}">${i}</div>
2022
+ <img src="${ge}" class="${Ie}" style="${a}">
2023
+ </div>
2024
+ ` : `<img src="${ge}" class="${Ie}" style="${a}">`;
2025
+ });
2026
+ return () => M(W, {
2027
+ attrs: {
2028
+ position: e.position,
2029
+ content: n.value,
2030
+ anchor: "bottom-center"
2024
2031
  }
2025
- ), { statusRef: o, readyPromise: a };
2026
- }, Pa = (t) => {
2027
- const { gmapKey: e, amapKey: n, amapSecret: i, amapServiceHost: a, supplier: o, language: r, onChange: s } = t;
2028
- return o === "gmap" ? ba({
2029
- apiKey: e,
2030
- language: r,
2031
- version: "beta",
2032
- libraries: Ca,
2033
- onChange: s
2034
- }) : wa({
2035
- apiKey: n,
2036
- apiSecret: i,
2037
- apiServiceHost: a,
2038
- plugins: xa,
2039
- onChange: s
2040
2032
  });
2041
- };
2042
- var za = "_1d8ur7t0";
2043
- const Ea = v(function(e, { slots: n, emit: i }) {
2044
- const {
2045
- onDragStart: a,
2046
- onDragEnd: o,
2047
- mapRef: r,
2048
- vectorMapForeign: s = "style_zh_cn",
2049
- ...u
2050
- } = e, l = L(() => ({
2051
- dragEnable: !!e.dragEnable,
2052
- zoomEnable: !!e.zoomEnable,
2053
- jogEnable: !!e.jogEnable,
2054
- pitchEnable: !!e.pitchEnable,
2055
- rotateEnable: !!e.rotateEnable,
2056
- animateEnable: !!e.animateEnable,
2057
- keyboardEnable: !!e.keyboardEnable
2058
- })), d = w(), c = w();
2059
- return In(c), k(() => {
2060
- if (c.value || !d.value)
2061
- return;
2062
- const g = new AMap.Map(d.value, {
2063
- ...u,
2064
- vectorMapForeign: s,
2065
- mapStyle: "amap://styles/95498a904992a4c0b866a3e4d7729682"
2033
+ }), Ba = v(function(e) {
2034
+ const n = L(() => {
2035
+ var o;
2036
+ const i = e.title ? ve(e.title).map((r) => r.type === "normal" ? r.value : `<span class="${dn}">${r.value}</span>`).join("") : "", a = `transform:rotate(${(o = e.angle) != null ? o : 0}deg)`;
2037
+ return e.title ? T("div", {
2038
+ class: gn
2039
+ }, `
2040
+ <div class="${In}">${i}</div>
2041
+ <img src="${ge}" class="${Ie}" style="${a}">
2042
+ `) : T("img", {
2043
+ class: Ie,
2044
+ src: ge,
2045
+ style: a
2066
2046
  });
2067
- c.value = g, r == null || r(g);
2068
- }), te(
2069
- () => l.value,
2070
- (g) => {
2071
- var I;
2072
- (I = c.value) == null || I.setStatus(g);
2047
+ });
2048
+ return () => M(U, {
2049
+ attrs: {
2050
+ position: x(e.position),
2051
+ content: n.value
2073
2052
  }
2074
- ), he(c, e, [
2075
- { name: "center", defaultValue: [0, 0] },
2076
- { name: "zooms", defaultValue: [0, 0] },
2077
- { name: "zoom", defaultValue: 0 },
2078
- { name: "layers", defaultValue: [] },
2079
- { name: "limitBounds", defaultValue: [] },
2080
- { name: "rotation", defaultValue: 0 },
2081
- { name: "defaultCursor", defaultValue: "" },
2082
- { name: "mapStyle", defaultValue: "" },
2083
- { name: "features", defaultValue: [] },
2084
- { name: "pitch", defaultValue: 0 },
2085
- { name: "mask", defaultValue: [] },
2086
- { name: "labelRejectMask", defaultValue: !1 }
2087
- ]), oe(c, e, i, ["onDragStart", "onDragEnd"]), () => {
2088
- var g;
2089
- return m("div", { ref: d, class: za }, (g = n.default) == null ? void 0 : g.call(n));
2053
+ });
2054
+ }), ze = v(function(e) {
2055
+ const n = j();
2056
+ return () => E(n.supplier === "gmap" ? Ba : Ua, {
2057
+ attrs: e
2058
+ });
2059
+ }), Ya = v(function(e) {
2060
+ return () => {
2061
+ const {
2062
+ path: n
2063
+ } = e;
2064
+ if (n.length === 0)
2065
+ return null;
2066
+ const a = 2 * (window.innerWidth * 0.01);
2067
+ return M(ne, {
2068
+ attrs: {
2069
+ path: n,
2070
+ strokeWeight: a,
2071
+ strokeOpacity: 1,
2072
+ strokeColor: "#38A3FE",
2073
+ strokeStyle: "dashed",
2074
+ strokeDasharray: [a, a * 1.5],
2075
+ lineJoin: "round",
2076
+ lineCap: "round"
2077
+ }
2078
+ });
2090
2079
  };
2091
- });
2092
- let ie = "user";
2093
- const Za = () => ie, sn = () => ({ executeMapApi: (e) => {
2094
- ie = "api";
2095
- try {
2096
- e(), setTimeout(() => {
2097
- ie = "user";
2098
- }, 100);
2099
- } catch (n) {
2100
- throw ie = "user", n;
2101
- }
2102
- } }), Ta = v(function(e, { slots: n, emit: i }) {
2103
- const a = e.mapRef, o = L(() => {
2104
- const { mapRef: c, onDragStart: g, onDragEnd: I, ...M } = e;
2105
- return M;
2106
- }), r = o.value, s = w(), u = w(), { executeMapApi: l } = sn(), d = (c) => i(c, { target: u.value });
2107
- return Mn(u), k(() => {
2108
- if (u.value || !s.value)
2109
- return;
2110
- let c;
2111
- l(() => {
2112
- c = new google.maps.Map(s.value, { ...r });
2113
- }), u.value = c, a == null || a(c);
2114
- }), te(
2115
- () => o.value,
2116
- (c) => {
2117
- l(() => {
2118
- var g;
2119
- return (g = u.value) == null ? void 0 : g.setOptions({ ...c });
2080
+ }), Ha = v(function(e) {
2081
+ const n = L(() => e.path.map(x));
2082
+ return () => {
2083
+ const i = n.value;
2084
+ if (i.length === 0)
2085
+ return null;
2086
+ const o = 2 * (window.innerWidth * 0.01), r = o / 4;
2087
+ return M(ce, {
2088
+ attrs: {
2089
+ path: i,
2090
+ strokeWeight: o,
2091
+ strokeOpacity: 1,
2092
+ strokeColor: "transparent",
2093
+ icons: [{
2094
+ icon: {
2095
+ path: `
2096
+ M ${r}, ${r}
2097
+ m -${r}, 0
2098
+ a ${r},${r} 0 1,0 ${2 * r},0
2099
+ a ${r},${r} 0 1,0 -${2 * r},0
2100
+ `,
2101
+ strokeColor: "#38A3FE",
2102
+ fillColor: "#38A3FE",
2103
+ fillOpacity: 1,
2104
+ strokeOpacity: 1,
2105
+ strokeWeight: o / 2,
2106
+ scale: 1
2107
+ },
2108
+ repeat: `${o * 2}px`
2109
+ }]
2110
+ }
2111
+ });
2112
+ };
2113
+ }), Mn = v(function(e) {
2114
+ const n = j();
2115
+ return () => E(n.supplier === "gmap" ? Ha : Ya, {
2116
+ attrs: e
2117
+ });
2118
+ }), mn = (t) => {
2119
+ const e = w([]), n = new AMap.Walking({});
2120
+ return K(
2121
+ () => ({ ...t }),
2122
+ ({ from: i, to: a }) => {
2123
+ n.search(AMap.LngLat.from(i), AMap.LngLat.from(a), (o, r) => {
2124
+ switch (o) {
2125
+ case "complete": {
2126
+ let s = [];
2127
+ const u = r;
2128
+ debugger;
2129
+ if (!u.routes)
2130
+ return;
2131
+ const l = u.routes[0];
2132
+ console.log("firstRoute = ", l);
2133
+ for (const d of l.steps) {
2134
+ const c = d.path.map(({ lng: g, lat: I }) => [g, I]);
2135
+ s = s.concat(c);
2136
+ }
2137
+ e.value = s;
2138
+ return;
2139
+ }
2140
+ case "no_data":
2141
+ e.value = [];
2142
+ return;
2143
+ default:
2144
+ throw r;
2145
+ }
2120
2146
  });
2121
2147
  }
2122
- ), K(u, e, d, ["onDragStart", "onDragEnd"]), () => {
2123
- var c;
2124
- return m("div", { ref: s }, (c = n.default) == null ? void 0 : c.call(n));
2148
+ ), e;
2149
+ }, fn = (t) => {
2150
+ const e = w([]), n = new google.maps.DirectionsService();
2151
+ return K(
2152
+ () => ({ ...t }),
2153
+ ({ from: i, to: a }) => {
2154
+ n.route(
2155
+ {
2156
+ origin: { lng: i[0], lat: i[1] },
2157
+ destination: { lng: a[0], lat: a[1] },
2158
+ travelMode: google.maps.TravelMode.WALKING
2159
+ },
2160
+ (o, r) => {
2161
+ switch (r) {
2162
+ case google.maps.DirectionsStatus.OK: {
2163
+ let s = [];
2164
+ const l = o.routes[0].overview_path.map((d) => [
2165
+ d.lng(),
2166
+ d.lat()
2167
+ ]);
2168
+ s = s.concat(l), e.value = s;
2169
+ return;
2170
+ }
2171
+ case google.maps.DirectionsStatus.ZERO_RESULTS:
2172
+ case google.maps.DirectionsStatus.NOT_FOUND:
2173
+ e.value = [];
2174
+ return;
2175
+ default:
2176
+ throw new Error(r);
2177
+ }
2178
+ }
2179
+ );
2180
+ }
2181
+ ), e;
2182
+ }, zo = (t) => {
2183
+ const { supplier: e } = j();
2184
+ return e === "gmap" ? fn(t) : mn(t);
2185
+ }, Va = v(function(e, {
2186
+ slots: n
2187
+ }) {
2188
+ const i = mn(e);
2189
+ return () => {
2190
+ var a;
2191
+ return M("div", [(a = n.render) == null ? void 0 : a.call(n, C({
2192
+ path: i
2193
+ }))]);
2194
+ };
2195
+ }), Qa = v(function(e, {
2196
+ slots: n
2197
+ }) {
2198
+ const i = fn(e);
2199
+ return () => {
2200
+ var a;
2201
+ return M("div", [(a = n.render) == null ? void 0 : a.call(n, C({
2202
+ path: i
2203
+ }))]);
2125
2204
  };
2126
- }), Ao = Me(function(e, {
2205
+ }), pn = v(function(e, {
2127
2206
  slots: n
2128
2207
  }) {
2129
2208
  const {
2130
- statusRef: i,
2131
- readyPromise: a
2132
- } = Pa(e), o = new Proxy(e, {
2133
- get(r, s, u) {
2134
- return s === "status" ? i.value : s === "readyPromise" ? a : Reflect.get(r, s, u);
2135
- }
2209
+ supplier: i
2210
+ } = j();
2211
+ return () => E(i === "gmap" ? Qa : Va, {
2212
+ attrs: e,
2213
+ scopedSlots: n
2136
2214
  });
2137
- return gn(o), () => {
2138
- var r;
2139
- return m("div", [(r = n.default) == null ? void 0 : r.call(n)]);
2215
+ }), Me = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTE5IiBoZWlnaHQ9IjExOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcz48cmFkaWFsR3JhZGllbnQgY3g9IjUwJSIgY3k9IjUwJSIgZng9IjUwJSIgZnk9IjUwJSIgcj0iNTAlIiBpZD0icHJlZml4X19hIj48c3RvcCBzdG9wLWNvbG9yPSIjRkZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzQ0NzFGRiIgb2Zmc2V0PSIxMDAlIi8+PC9yYWRpYWxHcmFkaWVudD48L2RlZnM+PGNpcmNsZSBjeD0iMTkxLjM5NCIgY3k9IjIzOCIgcj0iNTkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMzIgLTE3OSkiIGZpbGw9InVybCgjcHJlZml4X19hKSIgZmlsbC1ydWxlPSJldmVub2RkIiBvcGFjaXR5PSIuMiIvPjwvc3ZnPg==";
2216
+ var vn = "rrvp0y3", me = "rrvp0y2";
2217
+ const Ja = v(function(e) {
2218
+ const n = L(() => `<img src="${Me}" class="${me}">`), i = L(() => `<img src="${Me}" class="${me} ${vn}">`);
2219
+ return () => M("div", [M(W, {
2220
+ attrs: {
2221
+ position: e.position,
2222
+ anchor: "bottom-center",
2223
+ content: n.value
2224
+ }
2225
+ }), M(W, {
2226
+ attrs: {
2227
+ position: e.position,
2228
+ anchor: "bottom-center",
2229
+ content: i.value
2230
+ }
2231
+ })]);
2232
+ }), Xa = v(function(e) {
2233
+ const n = L(() => T("img", {
2234
+ class: me,
2235
+ src: Me
2236
+ })), i = L(() => T("img", {
2237
+ class: `${me} ${vn}`,
2238
+ src: Me
2239
+ }));
2240
+ return () => {
2241
+ const a = x(e.position);
2242
+ return M("div", [M(U, {
2243
+ attrs: {
2244
+ position: a,
2245
+ content: n.value
2246
+ }
2247
+ }), M(U, {
2248
+ attrs: {
2249
+ position: a,
2250
+ content: i.value
2251
+ }
2252
+ })]);
2140
2253
  };
2141
- }).props(["amapKey", "amapSecret", "amapServiceHost", "gmapId", "gmapKey", "supplier", "language"]), Lo = Me(function(e, {
2142
- slots: n,
2143
- emit: i
2144
- }) {
2145
- const a = j(), o = ({
2146
- target: s
2147
- }) => {
2148
- const {
2149
- lng: u,
2150
- lat: l
2151
- } = s.getCenter();
2152
- i("dragEnd", [u(), l()]);
2153
- }, r = ({
2154
- target: s
2155
- }) => {
2254
+ }), Fa = v(function(e) {
2255
+ const n = j();
2256
+ return () => E(n.supplier === "gmap" ? Xa : Ja, {
2257
+ attrs: e
2258
+ });
2259
+ }), $a = ["book-driverStartService", "dispatched", "driverStartService", "inService", "driverArrived"], it = v((t) => () => {
2260
+ const {
2261
+ from: e,
2262
+ title: n
2263
+ } = t, i = b(e);
2264
+ return M("div", [M(G, {
2265
+ attrs: {
2266
+ type: "start",
2267
+ position: i,
2268
+ title: n
2269
+ }
2270
+ }), M(Fa, {
2271
+ attrs: {
2272
+ position: i
2273
+ }
2274
+ }), M(R, {
2275
+ attrs: {
2276
+ position: i,
2277
+ label: e.name,
2278
+ hideIcon: !0
2279
+ }
2280
+ })]);
2281
+ }), _a = v((t) => () => {
2282
+ const {
2283
+ from: e,
2284
+ carPosition: n,
2285
+ passengerPosition: i,
2286
+ renderTitle: a
2287
+ } = t, o = b(e);
2288
+ return M("div", [M(G, {
2289
+ attrs: {
2290
+ type: "start",
2291
+ position: o
2292
+ }
2293
+ }), M(R, {
2294
+ attrs: {
2295
+ position: o,
2296
+ label: e.name,
2297
+ hideIcon: !0
2298
+ }
2299
+ }), M(be, {
2300
+ attrs: {
2301
+ from: n,
2302
+ to: o,
2303
+ render: ({
2304
+ path: r,
2305
+ distance: s,
2306
+ duration: u
2307
+ }) => [M(we, {
2308
+ attrs: {
2309
+ path: r
2310
+ }
2311
+ }), M(ze, {
2312
+ attrs: {
2313
+ position: n,
2314
+ title: a({
2315
+ distance: s,
2316
+ duration: u
2317
+ })
2318
+ }
2319
+ })]
2320
+ }
2321
+ }), M(pn, {
2322
+ attrs: {
2323
+ from: i,
2324
+ to: o,
2325
+ render: ({
2326
+ path: r
2327
+ }) => M(Mn, {
2328
+ attrs: {
2329
+ path: r
2330
+ }
2331
+ })
2332
+ }
2333
+ }), M(Pe, {
2334
+ attrs: {
2335
+ position: i
2336
+ }
2337
+ })]);
2338
+ }), Ka = v((t) => () => {
2339
+ const {
2340
+ from: e,
2341
+ passengerPosition: n,
2342
+ title: i
2343
+ } = t, a = b(e);
2344
+ return M("div", [M(G, {
2345
+ attrs: {
2346
+ type: "start",
2347
+ position: a,
2348
+ title: i
2349
+ }
2350
+ }), M(R, {
2351
+ attrs: {
2352
+ position: a,
2353
+ label: e.name,
2354
+ hideIcon: !0
2355
+ }
2356
+ }), M(Pe, {
2357
+ attrs: {
2358
+ position: n
2359
+ }
2360
+ })]);
2361
+ }), qa = v((t) => () => {
2362
+ const {
2363
+ from: e,
2364
+ carPosition: n,
2365
+ passengerPosition: i,
2366
+ title: a
2367
+ } = t, o = b(e);
2368
+ return M("div", [M(ze, {
2369
+ attrs: {
2370
+ position: n,
2371
+ title: a
2372
+ }
2373
+ }), M(G, {
2374
+ attrs: {
2375
+ type: "start",
2376
+ position: o
2377
+ }
2378
+ }), M(R, {
2379
+ attrs: {
2380
+ position: o,
2381
+ label: e.name,
2382
+ hideIcon: !0
2383
+ }
2384
+ }), M(pn, {
2385
+ attrs: {
2386
+ from: i,
2387
+ to: o,
2388
+ render: ({
2389
+ path: r
2390
+ }) => M(Mn, {
2391
+ attrs: {
2392
+ path: r
2393
+ }
2394
+ })
2395
+ }
2396
+ }), M(Pe, {
2397
+ attrs: {
2398
+ position: i,
2399
+ size: "small"
2400
+ }
2401
+ })]);
2402
+ }), eo = v((t) => () => {
2403
+ const {
2404
+ to: e,
2405
+ carPosition: n,
2406
+ renderTitle: i
2407
+ } = t, a = b(e);
2408
+ return M("div", [M(G, {
2409
+ attrs: {
2410
+ type: "end",
2411
+ position: a
2412
+ }
2413
+ }), M(R, {
2414
+ attrs: {
2415
+ position: n,
2416
+ label: "'WebSter Dental Plaza'",
2417
+ "hide-icon": "true"
2418
+ }
2419
+ }), M(be, {
2420
+ attrs: {
2421
+ from: n,
2422
+ to: a,
2423
+ render: ({
2424
+ path: o,
2425
+ distance: r,
2426
+ duration: s
2427
+ }) => [M(we, {
2428
+ attrs: {
2429
+ path: o
2430
+ }
2431
+ }), M(ze, {
2432
+ attrs: {
2433
+ position: n,
2434
+ title: i({
2435
+ distance: r,
2436
+ duration: s
2437
+ })
2438
+ }
2439
+ })]
2440
+ }
2441
+ })]);
2442
+ }), to = v((t) => () => {
2443
+ const {
2444
+ from: e,
2445
+ to: n
2446
+ } = t, i = b(e), a = b(n);
2447
+ return M("div", [M(G, {
2448
+ attrs: {
2449
+ type: "start",
2450
+ position: i
2451
+ }
2452
+ }), M(G, {
2453
+ attrs: {
2454
+ type: "end",
2455
+ position: a
2456
+ }
2457
+ }), M(R, {
2458
+ attrs: {
2459
+ position: i,
2460
+ label: e.name,
2461
+ hideIcon: !0
2462
+ }
2463
+ }), M(R, {
2464
+ attrs: {
2465
+ position: a,
2466
+ label: n.name,
2467
+ hideIcon: !0
2468
+ }
2469
+ })]);
2470
+ }), no = v((t) => () => {
2471
+ const {
2472
+ from: e,
2473
+ to: n
2474
+ } = t, i = b(e), a = b(n);
2475
+ return M("div", [M(G, {
2476
+ attrs: {
2477
+ type: "start",
2478
+ position: i
2479
+ }
2480
+ }), M(G, {
2481
+ attrs: {
2482
+ type: "end",
2483
+ position: a
2484
+ }
2485
+ }), M(R, {
2486
+ attrs: {
2487
+ position: i,
2488
+ label: e.name,
2489
+ hideIcon: !0
2490
+ }
2491
+ }), M(R, {
2492
+ attrs: {
2493
+ position: a,
2494
+ label: n.name,
2495
+ hideIcon: !0
2496
+ }
2497
+ }), M(be, {
2498
+ attrs: {
2499
+ from: i,
2500
+ to: a,
2501
+ render: ({
2502
+ path: o
2503
+ }) => M(we, {
2504
+ attrs: {
2505
+ path: o,
2506
+ done: !0
2507
+ }
2508
+ })
2509
+ }
2510
+ })]);
2511
+ }), To = Q((t) => {
2512
+ const {
2513
+ interval: e,
2514
+ getDriverPosition: n
2515
+ } = t, {
2516
+ geoPosition: i
2517
+ } = Xt(), a = h(b(t.from));
2518
+ return P(() => t.driverStatus, (o, r, s) => {
2519
+ if (!$a.includes(o))
2520
+ return;
2521
+ const u = setInterval(() => {
2522
+ n().then((l) => a.value = l);
2523
+ }, e);
2524
+ s(() => clearInterval(u));
2525
+ }, {
2526
+ immediate: !0
2527
+ }), () => {
2156
2528
  const {
2157
- lng: u,
2158
- lat: l
2159
- } = s.getCenter();
2160
- i("dragEnd", [u, l]);
2529
+ driverStatus: o,
2530
+ from: r,
2531
+ to: s,
2532
+ dispatchingTitle: u,
2533
+ bookDispatchingTitle: l,
2534
+ bookDispatchedTitle: d,
2535
+ driverArrivedTitle: c,
2536
+ renderStartSerivceTitle: g,
2537
+ renderInServiceTitle: I
2538
+ } = t, m = a.value;
2539
+ return M(Ca, {
2540
+ attrs: {
2541
+ center: b(r),
2542
+ zoom: 13
2543
+ }
2544
+ }, [o === "dispatching" ? M(it, {
2545
+ attrs: {
2546
+ from: r,
2547
+ title: u
2548
+ }
2549
+ }) : o === "book-dispatching" ? M(it, {
2550
+ attrs: {
2551
+ from: r,
2552
+ title: l
2553
+ }
2554
+ }) : o === "dispatched" || o === "driverStartService" || o === "book-driverStartService" ? M(_a, {
2555
+ attrs: {
2556
+ from: r,
2557
+ carPosition: m,
2558
+ passengerPosition: i.value,
2559
+ renderTitle: g
2560
+ }
2561
+ }) : o === "book-dispatched" ? M(Ka, {
2562
+ attrs: {
2563
+ from: r,
2564
+ passengerPosition: i.value,
2565
+ title: d
2566
+ }
2567
+ }) : o === "inService" ? M(eo, {
2568
+ attrs: {
2569
+ to: s,
2570
+ carPosition: m,
2571
+ renderTitle: I
2572
+ }
2573
+ }) : o === "driverArrived" ? M(qa, {
2574
+ attrs: {
2575
+ from: r,
2576
+ carPosition: m,
2577
+ passengerPosition: i.value,
2578
+ title: c
2579
+ }
2580
+ }) : o === "canceled" ? M(to, {
2581
+ attrs: {
2582
+ from: r,
2583
+ to: s
2584
+ }
2585
+ }) : o === "endService" ? M(no, {
2586
+ attrs: {
2587
+ from: r,
2588
+ to: s
2589
+ }
2590
+ }) : null]);
2161
2591
  };
2162
- return () => {
2163
- var f, p, A;
2164
- const {
2165
- supplier: s,
2166
- gmapId: u,
2167
- language: l = "zh",
2168
- status: d
2169
- } = a, {
2170
- mapRef: c,
2171
- center: g,
2172
- zoom: I
2173
- } = e;
2174
- if (d === q.LOADING)
2175
- return (f = n.loading) == null ? void 0 : f.call(n);
2176
- if (d === q.FAILURE)
2177
- return (p = n.fallback) == null ? void 0 : p.call(n);
2178
- const M = (A = n.default) == null ? void 0 : A.call(n);
2179
- switch (s) {
2180
- case "gmap":
2181
- return m(Ta, {
2182
- attrs: {
2183
- mapRef: c,
2184
- mapId: u,
2185
- center: g ? C(g) : void 0,
2186
- zoom: I
2187
- },
2188
- on: {
2189
- dragEnd: o
2190
- }
2191
- }, [M]);
2192
- default:
2193
- return m(Ea, {
2194
- attrs: {
2195
- mapRef: c,
2196
- vectorMapForeign: _i(l),
2197
- center: g,
2198
- zoom: I
2199
- },
2200
- on: {
2201
- dragEnd: r
2202
- }
2203
- }, [M]);
2592
+ }).props(["bookDispatchedTitle", "bookDispatchingTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "fallback", "from", "getDriverPosition", "interval", "loading", "mapRef", "renderInServiceTitle", "renderStartSerivceTitle", "to"]), Eo = v(function(e, {
2593
+ emit: n
2594
+ }) {
2595
+ return () => M("div", [e.places.map((i) => M(R, {
2596
+ attrs: {
2597
+ position: b(i),
2598
+ label: i.name,
2599
+ textAlign: "left"
2600
+ },
2601
+ on: {
2602
+ click: () => n("click", i)
2204
2603
  }
2205
- };
2206
- }).props(["center", "fallback", "loading", "mapRef", "zoom"]), X = () => {
2207
- const t = D(0);
2604
+ }))]);
2605
+ }), ee = () => {
2606
+ const t = h(0);
2208
2607
  return { idx: t, update: () => {
2209
2608
  t.value += 1;
2210
2609
  } };
2211
- }, Ra = (t) => {
2212
- const { city: e } = t, n = D(e), { readyPromise: i } = j(), a = D(""), o = D([]), { update: r, idx: s } = X(), u = (d) => {
2610
+ }, io = (t) => {
2611
+ const { city: e } = t, n = h(e), { readyPromise: i } = j(), a = h(""), o = h([]), { update: r, idx: s } = ee(), u = (d) => {
2213
2612
  n.value = d, r();
2214
2613
  }, l = (d) => {
2215
2614
  a.value = d, r();
2216
2615
  };
2217
- return b(
2616
+ return P(
2218
2617
  () => s.value,
2219
2618
  async () => {
2220
2619
  if (!a.value)
@@ -2244,13 +2643,13 @@ const Za = () => ie, sn = () => ({ executeMapApi: (e) => {
2244
2643
  immediate: !0
2245
2644
  }
2246
2645
  ), { setKeyword: l, setCity: u, autoCompletePlaces: o };
2247
- }, Ga = (t) => {
2248
- const { city: e } = t, n = D({ ...e }), { readyPromise: i } = j(), a = D(""), o = D([]), { update: r, idx: s } = X(), u = (c) => {
2646
+ }, ao = (t) => {
2647
+ const { city: e } = t, n = h({ ...e }), { readyPromise: i } = j(), a = h(""), o = h([]), { update: r, idx: s } = ee(), u = (c) => {
2249
2648
  n.value = c, r();
2250
2649
  }, l = (c) => {
2251
2650
  a.value = c, r();
2252
2651
  }, d = document.createElement("div");
2253
- return b(
2652
+ return P(
2254
2653
  () => s.value,
2255
2654
  async () => {
2256
2655
  if (!a.value)
@@ -2264,11 +2663,11 @@ const Za = () => ie, sn = () => ({ executeMapApi: (e) => {
2264
2663
  switch (I) {
2265
2664
  case google.maps.places.PlacesServiceStatus.OK:
2266
2665
  o.value = g.map(
2267
- ({ geometry: M, name: f, formatted_address: p }) => {
2268
- var A, y, h, P;
2666
+ ({ geometry: m, name: f, formatted_address: p }) => {
2667
+ var A, y, D, z;
2269
2668
  return {
2270
- lng: (y = (A = M == null ? void 0 : M.location) == null ? void 0 : A.lng()) != null ? y : 0,
2271
- lat: (P = (h = M == null ? void 0 : M.location) == null ? void 0 : h.lat()) != null ? P : 0,
2669
+ lng: (y = (A = m == null ? void 0 : m.location) == null ? void 0 : A.lng()) != null ? y : 0,
2670
+ lat: (z = (D = m == null ? void 0 : m.location) == null ? void 0 : D.lat()) != null ? z : 0,
2272
2671
  name: f != null ? f : "",
2273
2672
  description: p != null ? p : ""
2274
2673
  };
@@ -2284,22 +2683,22 @@ const Za = () => ie, sn = () => ({ executeMapApi: (e) => {
2284
2683
  );
2285
2684
  }
2286
2685
  ), { setKeyword: l, setCity: u, autoCompletePlaces: o };
2287
- }, ka = (t) => {
2686
+ }, oo = (t) => {
2288
2687
  const { supplier: e } = j();
2289
- return e === "gmap" ? Ga(t) : Ra(t);
2290
- }, Oa = (t) => {
2688
+ return e === "gmap" ? ao(t) : io(t);
2689
+ }, ro = (t) => {
2291
2690
  var a;
2292
- const { cityNameRef: e, onChange: n } = t, i = x({ name: (a = e.value) != null ? a : "" });
2293
- return b(
2691
+ const { cityNameRef: e, onChange: n } = t, i = C({ name: (a = e.value) != null ? a : "" });
2692
+ return P(
2294
2693
  () => e.value,
2295
2694
  (o) => {
2296
2695
  const r = o != null ? o : "";
2297
2696
  i.name = r, n == null || n({ name: r });
2298
2697
  }
2299
2698
  ), i;
2300
- }, Wa = (t) => {
2699
+ }, so = (t) => {
2301
2700
  var o;
2302
- const { cityNameRef: e, onChange: n } = t, { readyPromise: i } = j(), a = x({
2701
+ const { cityNameRef: e, onChange: n } = t, { readyPromise: i } = j(), a = C({
2303
2702
  name: (o = e.value) != null ? o : "",
2304
2703
  bound: {
2305
2704
  east: 0,
@@ -2308,7 +2707,7 @@ const Za = () => ie, sn = () => ({ executeMapApi: (e) => {
2308
2707
  west: 0
2309
2708
  }
2310
2709
  });
2311
- return dn(async () => {
2710
+ return Sn(async () => {
2312
2711
  var c, g;
2313
2712
  const r = e.value;
2314
2713
  if (!r)
@@ -2319,26 +2718,26 @@ const Za = () => ie, sn = () => ({ executeMapApi: (e) => {
2319
2718
  componentRestrictions: {
2320
2719
  administrativeArea: "administrative_area_level_1"
2321
2720
  },
2322
- language: De
2721
+ language: Ce
2323
2722
  });
2324
2723
  if (u.length !== 1)
2325
2724
  throw new Error("MyError: multiple city found");
2326
2725
  const { geometry: l } = u[0], d = (g = (c = l.bounds) == null ? void 0 : c.toJSON()) != null ? g : l.viewport.toJSON();
2327
2726
  a.name = r, a.bound = d, n == null || n({ name: r, bound: d });
2328
2727
  }), a;
2329
- }, Ua = (t) => {
2728
+ }, co = (t) => {
2330
2729
  const { supplier: e } = j();
2331
- return e === "gmap" ? Wa(t) : Oa(t);
2332
- }, No = (t) => {
2333
- const { cityNameRef: e } = t, n = Ua({
2730
+ return e === "gmap" ? so(t) : ro(t);
2731
+ }, Zo = (t) => {
2732
+ const { cityNameRef: e } = t, n = co({
2334
2733
  cityNameRef: e,
2335
2734
  onChange: (s) => o(s)
2336
- }), { autoCompletePlaces: i, setKeyword: a, setCity: o } = ka({ city: n });
2735
+ }), { autoCompletePlaces: i, setKeyword: a, setCity: o } = oo({ city: n });
2337
2736
  return { autoCompletePlaces: i, setKeyword: a, setCity: o, handleKeywordInput: (s) => {
2338
2737
  const u = s.target;
2339
2738
  a(u.value);
2340
2739
  } };
2341
- }, Ba = 20, Ya = (t) => {
2740
+ }, uo = 20, lo = (t) => {
2342
2741
  const { mapRef: e, autoFitTimeout: n } = t, i = /* @__PURE__ */ new Set();
2343
2742
  let a;
2344
2743
  const o = {
@@ -2349,14 +2748,14 @@ const Za = () => ie, sn = () => ({ executeMapApi: (e) => {
2349
2748
  i.delete(u);
2350
2749
  }
2351
2750
  }, r = () => {
2352
- var M;
2751
+ var m;
2353
2752
  const u = e.value;
2354
2753
  if (!u)
2355
2754
  return;
2356
- const l = window.innerWidth / 100, [d, c, g, I] = (M = t.padding) != null ? M : [0, 0, 0, 0];
2755
+ const l = window.innerWidth / 100, [d, c, g, I] = (m = t.padding) != null ? m : [0, 0, 0, 0];
2357
2756
  console.log([...i]), u.setFitView([...i], !1, [d * l, g * l, I * l, c * l]);
2358
2757
  };
2359
- return oe(
2758
+ return ie(
2360
2759
  e,
2361
2760
  {},
2362
2761
  () => {
@@ -2367,7 +2766,7 @@ const Za = () => ie, sn = () => ({ executeMapApi: (e) => {
2367
2766
  ["onDragEnd"]
2368
2767
  ), { registerFitVeiw: o, setFitView: r };
2369
2768
  };
2370
- class Ha extends Set {
2769
+ class go extends Set {
2371
2770
  getBound() {
2372
2771
  const e = new google.maps.LatLngBounds();
2373
2772
  for (const n of this.values()) {
@@ -2377,8 +2776,8 @@ class Ha extends Set {
2377
2776
  return e;
2378
2777
  }
2379
2778
  }
2380
- const Va = (t) => {
2381
- const { mapRef: e, autoFitTimeout: n } = t, { executeMapApi: i } = sn(), a = new Ha();
2779
+ const Io = (t) => {
2780
+ const { mapRef: e, autoFitTimeout: n } = t, { executeMapApi: i } = Jt(), a = new go();
2382
2781
  let o;
2383
2782
  const r = {
2384
2783
  add: (d) => {
@@ -2392,112 +2791,77 @@ const Va = (t) => {
2392
2791
  const d = e.value;
2393
2792
  if (!d)
2394
2793
  return;
2395
- const c = window.innerWidth / 100, [g, I, M, f] = (p = t.padding) != null ? p : [0, 0, 0, 0];
2794
+ const c = window.innerWidth / 100, [g, I, m, f] = (p = t.padding) != null ? p : [0, 0, 0, 0];
2396
2795
  i(
2397
2796
  () => d.fitBounds(a.getBound(), {
2398
2797
  top: g * c,
2399
2798
  right: I * c,
2400
- bottom: M * c,
2799
+ bottom: m * c,
2401
2800
  left: f * c
2402
2801
  })
2403
2802
  );
2404
2803
  }, u = (d) => {
2405
- const c = Za();
2804
+ const c = ha();
2406
2805
  console.log("handleMoveEndOrZomEnd name, eventSource = ", d, c), !(!n || c !== "user") && (o && clearTimeout(o), o = setTimeout(() => {
2407
2806
  o = void 0, s();
2408
2807
  }, n));
2409
- }, l = ki(u, Ba);
2410
- return K(e, {}, u, [
2808
+ }, l = _i(u, uo);
2809
+ return _(e, {}, u, [
2411
2810
  "onDragEnd"
2412
- ]), K(e, {}, l, [
2811
+ ]), _(e, {}, l, [
2413
2812
  "onZoom_changed"
2414
2813
  ]), { registerFitVeiw: r, setFitView: s };
2415
- }, Qa = (t) => {
2814
+ }, Mo = (t) => {
2416
2815
  const { supplier: e } = j();
2417
- return e === "gmap" ? Va(t) : Ya(t);
2418
- }, So = (t) => Qa({ ...t, padding: [25, 20, 15, 15] }), Ja = (t) => {
2419
- const { onChange: e, onLoad: n } = t != null ? t : {}, i = D(!1), a = D(!1), o = D(), r = D({
2420
- accuracy: 0,
2421
- altitude: 0,
2422
- altitudeAccuracy: 0,
2423
- heading: 0,
2424
- latitude: 0,
2425
- longitude: 0,
2426
- speed: 0
2427
- }), s = D([r.value.longitude, r.value.latitude]);
2428
- return b(
2429
- () => !0,
2430
- (u, l, d) => {
2431
- i.value = !0;
2432
- const c = navigator.geolocation.watchPosition(
2433
- (g) => {
2434
- const I = g.coords, M = [g.coords.longitude, g.coords.latitude];
2435
- r.value = I, s.value = M, i.value && (i.value = !1, a.value = !0, n == null || n({ position: M, coordinate: I })), e == null || e({ position: M, coordinate: I });
2436
- },
2437
- (g) => {
2438
- i.value = !1, o.value = g, console.log("errorRef = ", o);
2439
- },
2440
- // todo 要不要 timeout
2441
- { timeout: 5e3, maximumAge: 0, enableHighAccuracy: !0 }
2442
- );
2443
- d(() => navigator.geolocation.clearWatch(c));
2444
- },
2445
- { immediate: !0 }
2446
- ), {
2447
- geoError: o,
2448
- geoPosition: s,
2449
- geoCoordinate: r,
2450
- geoLoading: i,
2451
- geoReady: a
2452
- };
2453
- }, Xa = (t) => {
2454
- const { mapRef: e, onChange: n } = t, i = D([0, 0]), a = D(!1), o = () => {
2816
+ return e === "gmap" ? Io(t) : lo(t);
2817
+ }, Ro = (t) => Mo({ ...t, padding: [25, 20, 15, 15] }), mo = (t) => {
2818
+ const { mapRef: e, onChange: n } = t, i = h([0, 0]), a = h(!1), o = () => {
2455
2819
  Promise.resolve().then(() => a.value = !0);
2456
2820
  }, r = (s, { target: u }) => {
2457
2821
  var c;
2458
2822
  a.value = !1;
2459
2823
  const { lng: l, lat: d } = u.getCenter();
2460
- i.value = [l, d], (c = Dt(n)) == null || c([l, d]);
2824
+ i.value = [l, d], (c = Tt(n)) == null || c([l, d]);
2461
2825
  };
2462
- return oe(e, {}, o, [
2826
+ return ie(e, {}, o, [
2463
2827
  "onDragStart"
2464
- ]), oe(e, {}, r, [
2828
+ ]), ie(e, {}, r, [
2465
2829
  "onDragEnd"
2466
2830
  ]), { centerRef: i, isDragging: a };
2467
- }, Fa = (t) => {
2468
- const { mapRef: e, onChange: n } = t, i = D([0, 0]), a = D(!1), o = () => {
2831
+ }, fo = (t) => {
2832
+ const { mapRef: e, onChange: n } = t, i = h([0, 0]), a = h(!1), o = () => {
2469
2833
  Promise.resolve().then(() => a.value = !0);
2470
2834
  }, r = async () => {
2471
2835
  var d, c;
2472
2836
  a.value = !1;
2473
2837
  const s = (d = e.value) == null ? void 0 : d.getCenter(), u = s == null ? void 0 : s.lng(), l = s == null ? void 0 : s.lat();
2474
- i.value = [u, l], (c = Dt(n)) == null || c([u, l]);
2838
+ i.value = [u, l], (c = Tt(n)) == null || c([u, l]);
2475
2839
  };
2476
- return K(e, {}, o, [
2840
+ return _(e, {}, o, [
2477
2841
  "onDragStart"
2478
- ]), K(e, {}, r, [
2842
+ ]), _(e, {}, r, [
2479
2843
  "onDragEnd"
2480
2844
  ]), { centerRef: i, isDragging: a };
2481
- }, $a = (t) => {
2845
+ }, po = (t) => {
2482
2846
  const { supplier: e } = j();
2483
- return e === "gmap" ? Fa(t) : Xa(t);
2484
- }, cn = (t) => {
2485
- const { pointRef: e, onChange: n } = t, { readyPromise: i } = j(), { idx: a, update: o } = X(), r = x({
2847
+ return e === "gmap" ? fo(t) : mo(t);
2848
+ }, yn = (t) => {
2849
+ const { pointRef: e, onChange: n } = t, { readyPromise: i } = j(), { idx: a, update: o } = ee(), r = C({
2486
2850
  lng: e.value[0],
2487
2851
  lat: e.value[1],
2488
2852
  name: "",
2489
2853
  cityName: void 0
2490
2854
  });
2491
- return b(
2855
+ return P(
2492
2856
  () => a.value,
2493
2857
  async () => {
2494
2858
  await i;
2495
- const s = new AMap.Geocoder({ lang: De }), [u, l] = e.value;
2859
+ const s = new AMap.Geocoder({ lang: Ce }), [u, l] = e.value;
2496
2860
  s.getAddress(new AMap.LngLat(u, l), (d, c) => {
2497
2861
  switch (d) {
2498
2862
  case "complete": {
2499
- const { formattedAddress: g, addressComponent: I } = c.regeocode, M = I.city ? I.city : I.province;
2500
- r.name = g, r.lng = u, r.lat = l, r.cityName = M, n == null || n({ lng: u, lat: l, name: g, cityName: M });
2863
+ const { formattedAddress: g, addressComponent: I } = c.regeocode, m = I.city ? I.city : I.province;
2864
+ r.name = g, r.lng = u, r.lat = l, r.cityName = m, n == null || n({ lng: u, lat: l, name: g, cityName: m });
2501
2865
  return;
2502
2866
  }
2503
2867
  case "no_data":
@@ -2509,127 +2873,136 @@ const Va = (t) => {
2509
2873
  });
2510
2874
  }
2511
2875
  ), { place: r, updatePlace: o };
2512
- }, un = (t) => {
2513
- const { pointRef: e, onChange: n } = t, { readyPromise: i } = j(), { idx: a, update: o } = X(), r = x({ lng: e.value[0], lat: e.value[1], name: "" });
2514
- return b(
2876
+ }, jn = (t) => {
2877
+ const { pointRef: e, onChange: n } = t, { readyPromise: i } = j(), { idx: a, update: o } = ee(), r = C({ lng: e.value[0], lat: e.value[1], name: "" });
2878
+ return P(
2515
2879
  () => a.value,
2516
2880
  async () => {
2517
2881
  await i;
2518
- const s = new google.maps.Geocoder(), [u, l] = e.value, { results: d } = await s.geocode({ language: De, location: { lng: u, lat: l } }), c = d[0].formatted_address, g = Ki(d[0]);
2882
+ const s = new google.maps.Geocoder(), [u, l] = e.value, { results: d } = await s.geocode({ language: Ce, location: { lng: u, lat: l } }), c = d[0].formatted_address, g = da(d[0]);
2519
2883
  r.name = c, r.lng = u, r.lat = l, n == null || n({ lng: u, lat: l, name: c, cityName: g });
2520
2884
  }
2521
2885
  ), { place: r, updatePlace: o };
2522
- }, Do = (t) => {
2886
+ }, ko = (t) => {
2523
2887
  const { supplier: e } = j();
2524
- return e === "gmap" ? un(t) : cn(t);
2525
- }, _a = (t, e) => {
2888
+ return e === "gmap" ? jn(t) : yn(t);
2889
+ }, vo = (t, e) => {
2526
2890
  let n = 1 / 0, i = t;
2527
2891
  for (const a of e) {
2528
- const o = AMap.GeometryUtil.distance(ve(t), ve(a));
2892
+ const o = AMap.GeometryUtil.distance(b(t), b(a));
2529
2893
  o >= n || (i = a, n = o);
2530
2894
  }
2531
2895
  return { shortestPlace: i, shortestDistance: n };
2532
- }, Ka = (t, e) => {
2896
+ }, yo = (t, e) => {
2533
2897
  let n = 1 / 0, i = t;
2534
2898
  for (const a of e) {
2535
2899
  const o = google.maps.geometry.spherical.computeDistanceBetween(t, a);
2536
2900
  o >= n || (i = a, n = o);
2537
2901
  }
2538
2902
  return { shortestPlace: i, shortestDistance: n };
2539
- }, qa = (t) => {
2540
- const { pointRef: e, getRecomendPlace: n, getLimit: i, context: a, onChange: o, onChangePlace: r } = t, s = D([]), { idx: u, update: l } = X(), { readyPromise: d } = j(), { place: c, updatePlace: g } = cn({ pointRef: e, onChange: r }), I = x({ ...c });
2541
- return b(
2903
+ }, jo = (t) => {
2904
+ const { pointRef: e, getRecomendPlace: n, getLimit: i, context: a, onChange: o, onChangePlace: r } = t, s = h([]), { idx: u, update: l } = ee(), { readyPromise: d } = j(), { place: c, updatePlace: g } = yn({ pointRef: e, onChange: r }), I = C({ ...c });
2905
+ return P(
2542
2906
  () => u.value,
2543
2907
  async () => {
2544
2908
  await d;
2545
- const M = await n({ ...c }, a), { shortestPlace: f, shortestDistance: p } = _a(c, M), A = i(a), y = p > A ? c : f;
2546
- s.value = M, Object.assign(I, { ...y }), o == null || o({ ...y });
2909
+ const m = await n({ ...c }, a), { shortestPlace: f, shortestDistance: p } = vo(c, m), A = i(a), y = p > A ? c : f;
2910
+ s.value = m, Object.assign(I, { ...y }), o == null || o({ ...y });
2547
2911
  }
2548
2912
  ), { recomendPlace: I, placeCandidates: s, updateRecomandPlace: l, updatePlace: g };
2549
- }, eo = (t) => {
2550
- const { pointRef: e, getRecomendPlace: n, getLimit: i, context: a, onChange: o, onChangePlace: r } = t, s = D([]), { idx: u, update: l } = X(), { readyPromise: d } = j(), { place: c, updatePlace: g } = un({ pointRef: e, onChange: r }), I = x({ ...c });
2551
- return b(
2913
+ }, Ao = (t) => {
2914
+ const { pointRef: e, getRecomendPlace: n, getLimit: i, context: a, onChange: o, onChangePlace: r } = t, s = h([]), { idx: u, update: l } = ee(), { readyPromise: d } = j(), { place: c, updatePlace: g } = jn({ pointRef: e, onChange: r }), I = C({ ...c });
2915
+ return P(
2552
2916
  () => u.value,
2553
2917
  async () => {
2554
2918
  await d;
2555
- const M = await n({ ...c }, a), { shortestPlace: f, shortestDistance: p } = Ka(c, M), A = i(a), y = p > A ? c : f;
2556
- s.value = M, Object.assign(I, { ...y }), o == null || o({ ...y });
2919
+ const m = await n({ ...c }, a), { shortestPlace: f, shortestDistance: p } = yo(c, m), A = i(a), y = p > A ? c : f;
2920
+ s.value = m, Object.assign(I, { ...y }), o == null || o({ ...y });
2557
2921
  }
2558
2922
  ), { recomendPlace: I, placeCandidates: s, updateRecomandPlace: l, updatePlace: g };
2559
- }, to = (t) => {
2923
+ }, Lo = (t) => {
2560
2924
  const { supplier: e } = j();
2561
- return e === "gmap" ? eo(t) : qa(t);
2562
- }, ho = (t) => {
2563
- var F, xe;
2925
+ return e === "gmap" ? Ao(t) : jo(t);
2926
+ }, Go = (t) => {
2927
+ var Te, Ee;
2564
2928
  const {
2565
2929
  mapRef: e,
2566
- getRecomendPlace: n,
2567
- defaultCenterPoint: i,
2568
- recomendPlaceDragLimit: a,
2569
- recomendPlaceGeoLimit: o,
2570
- onLoadGeoLocation: r,
2571
- onChangeByDrag: s,
2572
- onChangeGeoLocation: u,
2573
- onChangePlace: l,
2574
- onChangeRecomandPlace: d
2575
- } = t, { readyPromise: c } = j(), g = x({
2576
- lng: (F = i == null ? void 0 : i[0]) != null ? F : 0,
2577
- lat: (xe = i == null ? void 0 : i[1]) != null ? xe : 0,
2930
+ geoDefaultPosition: n,
2931
+ getRecomendPlace: i,
2932
+ defaultCenterPoint: a,
2933
+ recomendPlaceDragLimit: o,
2934
+ recomendPlaceGeoLimit: r,
2935
+ onLoadGeoLocation: s,
2936
+ onLoadDefaultGeoLocation: u,
2937
+ onChangeByDrag: l,
2938
+ onChangeGeoLocation: d,
2939
+ onChangePlace: c,
2940
+ onChangeRecomandPlace: g
2941
+ } = t, { readyPromise: I } = j(), m = C({
2942
+ lng: (Te = a == null ? void 0 : a[0]) != null ? Te : 0,
2943
+ lat: (Ee = a == null ? void 0 : a[1]) != null ? Ee : 0,
2578
2944
  name: "",
2579
2945
  cityName: void 0
2580
- }), I = L(() => [g.lng, g.lat]), M = { source: "geo" }, f = (S) => {
2581
- M.source = "api", g.lng = S[0], g.lat = S[1], N();
2946
+ }), f = L(() => [m.lng, m.lat]), p = { source: "geo" }, A = (N) => {
2947
+ p.source = "api", m.lng = N[0], m.lat = N[1], k();
2948
+ }, y = (N) => {
2949
+ p.source = "api", m.lng = N.lng, m.lat = N.lat;
2582
2950
  };
2583
- i && c.then(() => {
2584
- M.source = "default", N();
2951
+ a && I.then(() => {
2952
+ p.source = "default", k();
2585
2953
  });
2586
- const { geoLoading: p, geoError: A, geoPosition: y, geoCoordinate: h, geoReady: P } = Ja({
2587
- onLoad: async (S) => {
2588
- i || (await c, M.source = "geo", g.lng = S.position[0], g.lat = S.position[1], N()), r == null || r(S);
2954
+ const { geoLoading: D, geoError: z, geoPosition: Y, geoCoordinate: S, geoReady: Z } = Xt({
2955
+ geoDefaultPosition: n,
2956
+ onLoad: async (N) => {
2957
+ a || (await I, p.source = "geo", m.lng = N.position[0], m.lat = N.position[1], k()), s == null || s(N);
2589
2958
  },
2590
- onChange: u
2591
- }), { isDragging: O } = $a({
2959
+ onLoadDefault: async (N) => {
2960
+ a || (await I, p.source = "geo", m.lng = N.position[0], m.lat = N.position[1], k()), u == null || u(N);
2961
+ },
2962
+ onChange: d
2963
+ }), { isDragging: H } = po({
2592
2964
  mapRef: e,
2593
- onChange: (S) => {
2594
- M.source = "drag", g.lng = S[0], g.lat = S[1], N(), s == null || s(S);
2595
- }
2596
- }), { updatePlace: N, updateRecomandPlace: Z, placeCandidates: W } = to({
2597
- pointRef: I,
2598
- context: M,
2599
- getRecomendPlace: n,
2600
- getLimit: (S) => {
2601
- const Ce = S == null ? void 0 : S.source;
2602
- switch (Ce) {
2965
+ onChange: (N) => {
2966
+ p.source = "drag", m.lng = N[0], m.lat = N[1], k(), l == null || l(N);
2967
+ }
2968
+ }), { updatePlace: k, updateRecomandPlace: An, placeCandidates: Ln } = Lo({
2969
+ pointRef: f,
2970
+ context: p,
2971
+ getRecomendPlace: i,
2972
+ getLimit: (N) => {
2973
+ const Ze = N == null ? void 0 : N.source;
2974
+ switch (Ze) {
2603
2975
  case "drag":
2604
2976
  case "api":
2605
- return a;
2977
+ return o;
2606
2978
  case "geo":
2607
2979
  case "default":
2608
- return o;
2980
+ return r;
2609
2981
  default:
2610
- throw new Error(`MyError: should not call getLimit on source: ${Ce}`);
2982
+ throw new Error(`MyError: should not call getLimit on source: ${Ze}`);
2611
2983
  }
2612
2984
  },
2613
- onChangePlace: (S) => {
2614
- Object.assign(g, { ...S }), M.source !== "recomend" && Z(), l == null || l(S);
2985
+ onChangePlace: (N) => {
2986
+ Object.assign(m, { ...N }), p.source !== "recomend" && An(), c == null || c(N);
2615
2987
  },
2616
- onChange: (S) => {
2617
- M.source = "recomend", Object.assign(g, { ...S }), N(), d == null || d(S);
2988
+ onChange: (N) => {
2989
+ p.source = "recomend", Object.assign(m, { ...N }), k(), g == null || g(N);
2618
2990
  }
2619
2991
  });
2620
2992
  return {
2621
- isDragging: O,
2622
- geoLoading: p,
2623
- geoError: A,
2624
- geoPosition: y,
2625
- geoCoordinate: h,
2626
- geoReady: P,
2627
- centerPlace: g,
2628
- centerPoint: I,
2629
- placeCandidates: W,
2630
- setCenterPlaceByRecomand: f
2993
+ isDragging: H,
2994
+ geoLoading: D,
2995
+ geoError: z,
2996
+ geoPosition: Y,
2997
+ geoCoordinate: S,
2998
+ geoReady: Z,
2999
+ centerPlace: m,
3000
+ centerPoint: f,
3001
+ placeCandidates: Ln,
3002
+ setCenterPlaceByRecomand: A,
3003
+ setCenterByPlace: y
2631
3004
  };
2632
- }, no = () => {
3005
+ }, No = () => {
2633
3006
  const t = w();
2634
3007
  return { mapRef: t, panTo: (i) => {
2635
3008
  var a;
@@ -2637,58 +3010,59 @@ const Va = (t) => {
2637
3010
  }, setMap: (i) => {
2638
3011
  t.value = i;
2639
3012
  } };
2640
- }, io = () => {
3013
+ }, So = () => {
2641
3014
  const t = w();
2642
3015
  return { mapRef: t, panTo: (i) => {
2643
3016
  var a;
2644
- return (a = t == null ? void 0 : t.value) == null ? void 0 : a.panTo(C(i));
3017
+ return (a = t == null ? void 0 : t.value) == null ? void 0 : a.panTo(x(i));
2645
3018
  }, setMap: (i) => {
2646
3019
  t.value = i;
2647
3020
  } };
2648
- }, xo = () => {
3021
+ }, Oo = () => {
2649
3022
  const { supplier: t } = j();
2650
- return t === "gmap" ? io() : no();
2651
- }, ao = () => {
3023
+ return t === "gmap" ? So() : No();
3024
+ }, ho = () => {
2652
3025
  const { status: t } = j();
2653
3026
  return { apiMapDistance: (n, i) => {
2654
- if (t === q.SUCCESS)
3027
+ if (t === ae.SUCCESS)
2655
3028
  return AMap.GeometryUtil.distance(n, i);
2656
3029
  } };
2657
- }, oo = () => {
3030
+ }, Do = () => {
2658
3031
  const { status: t } = j();
2659
3032
  return { apiMapDistance: (n, i) => {
2660
- if (t === q.SUCCESS)
2661
- return google.maps.geometry.spherical.computeDistanceBetween(C(n), C(i));
3033
+ if (t === ae.SUCCESS)
3034
+ return google.maps.geometry.spherical.computeDistanceBetween(x(n), x(i));
2662
3035
  } };
2663
- }, Co = () => {
3036
+ }, Wo = () => {
2664
3037
  const { supplier: t } = j();
2665
- return t === "gmap" ? oo() : ao();
3038
+ return t === "gmap" ? Do() : ho();
2666
3039
  };
2667
3040
  export {
2668
- so as AddressBox,
2669
- co as DrivingLine,
2670
- go as DrivingRoute,
2671
- Lo as HeycarMap,
2672
- Ao as MapProvider,
2673
- Io as PassengerCircle,
2674
- Mo as PickupPoints,
2675
- Ma as PlaceCircle,
2676
- fo as StartEndPoint,
2677
- mo as TaxiCar,
2678
- po as WalkingLine,
2679
- yo as WalkingRoute,
2680
- jo as WaveCircle,
2681
- No as useBusinessMapAutoComplete,
2682
- So as useBusinessMapFitView,
2683
- ho as useBusinessMapRecomendPlace,
2684
- uo as useDrivingRoute,
2685
- Ja as useGeoLocation,
2686
- xo as useHeycarMap,
2687
- lo as useMapAngle,
2688
- $a as useMapDrag,
2689
- Qa as useMapFitView,
2690
- Co as useMapGeometry,
2691
- Do as useMapPlace,
2692
- to as useMapRecomendPlace,
2693
- vo as useWalkingRoute
3041
+ xo as AddressBox,
3042
+ To as BusinessTaxiServiceMap,
3043
+ we as DrivingLine,
3044
+ be as DrivingRoute,
3045
+ Ca as HeycarMap,
3046
+ wo as MapProvider,
3047
+ Pe as PassengerCircle,
3048
+ Eo as PickupPoints,
3049
+ R as PlaceCircle,
3050
+ G as StartEndPoint,
3051
+ ze as TaxiCar,
3052
+ Mn as WalkingLine,
3053
+ pn as WalkingRoute,
3054
+ Fa as WaveCircle,
3055
+ Zo as useBusinessMapAutoComplete,
3056
+ Ro as useBusinessMapFitView,
3057
+ Go as useBusinessMapRecomendPlace,
3058
+ bo as useDrivingRoute,
3059
+ Xt as useGeoLocation,
3060
+ Oo as useHeycarMap,
3061
+ Po as useMapAngle,
3062
+ po as useMapDrag,
3063
+ Mo as useMapFitView,
3064
+ Wo as useMapGeometry,
3065
+ ko as useMapPlace,
3066
+ Lo as useMapRecomendPlace,
3067
+ zo as useWalkingRoute
2694
3068
  };