@sword916/vae-map-plus 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/lib/index.js +5376 -0
  2. package/lib/style.css +1 -0
  3. package/lib/vae-amap/favicon.ico +0 -0
  4. package/lib/vae-amap/images/game.png +0 -0
  5. package/lib/vae-amap/images/grid.png +0 -0
  6. package/lib/vae-amap/images/marker.png +0 -0
  7. package/lib/vae-amap/index.js +209 -0
  8. package/lib/vae-amap/style.css +1 -0
  9. package/lib/vae-cloudmap/favicon.ico +0 -0
  10. package/lib/vae-cloudmap/images/game.png +0 -0
  11. package/lib/vae-cloudmap/images/grid.png +0 -0
  12. package/lib/vae-cloudmap/images/marker.png +0 -0
  13. package/lib/vae-cloudmap/index.html +30 -0
  14. package/lib/vae-cloudmap/index.js +4085 -0
  15. package/lib/vae-cloudmap/style.css +1 -0
  16. package/lib/vae-map/favicon.ico +0 -0
  17. package/lib/vae-map/images/game.png +0 -0
  18. package/lib/vae-map/images/grid.png +0 -0
  19. package/lib/vae-map/images/marker.png +0 -0
  20. package/lib/vae-map/index.html +30 -0
  21. package/lib/vae-map/index.js +4322 -0
  22. package/lib/vae-map/style.css +1 -0
  23. package/package.json +1 -1
  24. package/plugins/L.AnimatedMarker/favicon.ico +0 -0
  25. package/plugins/L.AnimatedMarker/images/game.png +0 -0
  26. package/plugins/L.AnimatedMarker/images/grid.png +0 -0
  27. package/plugins/L.AnimatedMarker/images/marker.png +0 -0
  28. package/plugins/L.AnimatedMarker/index.html +30 -0
  29. package/plugins/L.AnimatedMarker/index.js +83 -0
  30. package/plugins/L.EchartsLayer/favicon.ico +0 -0
  31. package/plugins/L.EchartsLayer/images/game.png +0 -0
  32. package/plugins/L.EchartsLayer/images/grid.png +0 -0
  33. package/plugins/L.EchartsLayer/images/marker.png +0 -0
  34. package/plugins/L.EchartsLayer/index.html +30 -0
  35. package/plugins/L.EchartsLayer/index.js +176 -0
  36. package/plugins/L.FootageCalculator.Area/favicon.ico +0 -0
  37. package/plugins/L.FootageCalculator.Area/images/game.png +0 -0
  38. package/plugins/L.FootageCalculator.Area/images/grid.png +0 -0
  39. package/plugins/L.FootageCalculator.Area/images/marker.png +0 -0
  40. package/plugins/L.FootageCalculator.Area/index.html +30 -0
  41. package/plugins/L.FootageCalculator.Area/index.js +418 -0
  42. package/plugins/L.FootageCalculator.Line/favicon.ico +0 -0
  43. package/plugins/L.FootageCalculator.Line/images/game.png +0 -0
  44. package/plugins/L.FootageCalculator.Line/images/grid.png +0 -0
  45. package/plugins/L.FootageCalculator.Line/images/marker.png +0 -0
  46. package/plugins/L.FootageCalculator.Line/index.html +30 -0
  47. package/plugins/L.FootageCalculator.Line/index.js +416 -0
  48. package/plugins/L.GeoUtil/favicon.ico +0 -0
  49. package/plugins/L.GeoUtil/images/game.png +0 -0
  50. package/plugins/L.GeoUtil/images/grid.png +0 -0
  51. package/plugins/L.GeoUtil/images/marker.png +0 -0
  52. package/plugins/L.GeoUtil/index.html +30 -0
  53. package/plugins/L.GeoUtil/index.js +279 -0
  54. package/plugins/L.Glyphicon/favicon.ico +0 -0
  55. package/plugins/L.Glyphicon/images/game.png +0 -0
  56. package/plugins/L.Glyphicon/images/grid.png +0 -0
  57. package/plugins/L.Glyphicon/images/marker.png +0 -0
  58. package/plugins/L.Glyphicon/index.html +30 -0
  59. package/plugins/L.Glyphicon/index.js +57 -0
  60. package/plugins/L.Glyphicon/style.css +1 -0
  61. package/plugins/L.MarkerClusterX/favicon.ico +0 -0
  62. package/plugins/L.MarkerClusterX/images/game.png +0 -0
  63. package/plugins/L.MarkerClusterX/images/grid.png +0 -0
  64. package/plugins/L.MarkerClusterX/images/marker.png +0 -0
  65. package/plugins/L.MarkerClusterX/index.html +30 -0
  66. package/plugins/L.MarkerClusterX/index.js +33 -0
  67. package/plugins/L.MarkerClusterX/style.css +1 -0
  68. package/plugins/L.SafeDivOverlay/favicon.ico +0 -0
  69. package/plugins/L.SafeDivOverlay/images/game.png +0 -0
  70. package/plugins/L.SafeDivOverlay/images/grid.png +0 -0
  71. package/plugins/L.SafeDivOverlay/images/marker.png +0 -0
  72. package/plugins/L.SafeDivOverlay/index.html +30 -0
  73. package/plugins/L.SafeDivOverlay/index.js +26 -0
  74. package/plugins/L.TileLayer.ChinaProvider/favicon.ico +0 -0
  75. package/plugins/L.TileLayer.ChinaProvider/images/game.png +0 -0
  76. package/plugins/L.TileLayer.ChinaProvider/images/grid.png +0 -0
  77. package/plugins/L.TileLayer.ChinaProvider/images/marker.png +0 -0
  78. package/plugins/L.TileLayer.ChinaProvider/index.html +30 -0
  79. package/plugins/L.TileLayer.ChinaProvider/index.js +91 -0
  80. package/plugins/L.VuePopup/favicon.ico +0 -0
  81. package/plugins/L.VuePopup/images/game.png +0 -0
  82. package/plugins/L.VuePopup/images/grid.png +0 -0
  83. package/plugins/L.VuePopup/images/marker.png +0 -0
  84. package/plugins/L.VuePopup/index.html +30 -0
  85. package/plugins/L.VuePopup/index.js +68 -0
  86. package/plugins/L.VueTooltip/favicon.ico +0 -0
  87. package/plugins/L.VueTooltip/images/game.png +0 -0
  88. package/plugins/L.VueTooltip/images/grid.png +0 -0
  89. package/plugins/L.VueTooltip/images/marker.png +0 -0
  90. package/plugins/L.VueTooltip/index.html +30 -0
  91. package/plugins/L.VueTooltip/index.js +68 -0
  92. package/plugins/Mixin.Map.Measure/favicon.ico +0 -0
  93. package/plugins/Mixin.Map.Measure/images/game.png +0 -0
  94. package/plugins/Mixin.Map.Measure/images/grid.png +0 -0
  95. package/plugins/Mixin.Map.Measure/images/marker.png +0 -0
  96. package/plugins/Mixin.Map.Measure/index.html +30 -0
  97. package/plugins/Mixin.Map.Measure/index.js +84 -0
  98. package/plugins/globals/favicon.ico +0 -0
  99. package/plugins/globals/images/game.png +0 -0
  100. package/plugins/globals/images/grid.png +0 -0
  101. package/plugins/globals/images/marker.png +0 -0
  102. package/plugins/globals/index.html +30 -0
  103. package/plugins/globals/index.js +4 -0
  104. package/build/index.mjs +0 -113
  105. package/examples/App.vue +0 -18
  106. package/examples/index.js +0 -13
  107. package/examples/router/index.js +0 -35
  108. package/examples/views/amap.vue +0 -29
  109. package/examples/views/amarker.vue +0 -58
  110. package/examples/views/buffer.vue +0 -66
  111. package/examples/views/cluster.vue +0 -74
  112. package/examples/views/cover.vue +0 -85
  113. package/examples/views/draw-line.vue +0 -49
  114. package/examples/views/draw.vue +0 -54
  115. package/examples/views/echarts.vue +0 -142
  116. package/examples/views/emarker.vue +0 -39
  117. package/examples/views/image.vue +0 -182
  118. package/examples/views/index.vue +0 -61
  119. package/examples/views/lrmap.vue +0 -108
  120. package/examples/views/map.vue +0 -82
  121. package/examples/views/measure.vue +0 -86
  122. package/examples/views/parts/popup.vue +0 -39
  123. package/examples/views/parts/tooltip.vue +0 -39
  124. package/examples/views/push-area.vue +0 -52
  125. package/examples/views/push-line.vue +0 -84
  126. package/examples/views/trace.vue +0 -49
  127. package/jsconfig.json +0 -17
  128. package/src/components/resize-listener/component.jsx +0 -30
  129. package/src/components/resize-listener/index.js +0 -3
  130. package/src/composables/useAutoMessage.js +0 -41
  131. package/src/composables/useContextMenu.js +0 -99
  132. package/src/composables/useMapMeasure.js +0 -191
  133. package/src/composables/useResizeObserver.js +0 -81
  134. package/src/mixins/message.js +0 -1
  135. package/src/packages/index.js +0 -16
  136. package/src/packages/vae-amap/index.js +0 -8
  137. package/src/packages/vae-amap/style.less +0 -9
  138. package/src/packages/vae-amap/vae-amap.jsx +0 -98
  139. package/src/packages/vae-cloudmap/ctrl-context-menu/index.vue +0 -74
  140. package/src/packages/vae-cloudmap/ctrl-draw/index.vue +0 -499
  141. package/src/packages/vae-cloudmap/ctrl-draw-line/index.vue +0 -161
  142. package/src/packages/vae-cloudmap/index.js +0 -57
  143. package/src/packages/vae-cloudmap/scripts/L.MarkerCluster/index.js +0 -2690
  144. package/src/packages/vae-cloudmap/scripts/L.MarkerCluster/style.css +0 -14
  145. package/src/packages/vae-cloudmap/scripts/L.Vae.CRS/index.js +0 -212
  146. package/src/packages/vae-cloudmap/scripts/L.Vae.Client/index.js +0 -780
  147. package/src/packages/vae-cloudmap/scripts/Mixin.ContextMenu/index.js +0 -101
  148. package/src/packages/vae-cloudmap/style.less +0 -163
  149. package/src/packages/vae-cloudmap/vae-cloudmap.jsx +0 -272
  150. package/src/packages/vae-map/ctrl-context-menu/index.vue +0 -74
  151. package/src/packages/vae-map/ctrl-draw/index.vue +0 -498
  152. package/src/packages/vae-map/ctrl-draw-line/index.vue +0 -128
  153. package/src/packages/vae-map/index.js +0 -59
  154. package/src/packages/vae-map/scripts/L.MarkerCluster/index.js +0 -2690
  155. package/src/packages/vae-map/scripts/L.MarkerCluster/style.css +0 -14
  156. package/src/packages/vae-map/scripts/L.Vae.CRS/index.js +0 -114
  157. package/src/packages/vae-map/scripts/L.Vae.Client/index.js +0 -548
  158. package/src/packages/vae-map/scripts/Mixin.ContextMenu/index.js +0 -1
  159. package/src/packages/vae-map/style.less +0 -161
  160. package/src/packages/vae-map/vae-lrmap.jsx +0 -237
  161. package/src/packages/vae-map/vae-map.jsx +0 -135
  162. package/src/plugins/L.AnimatedMarker/index.js +0 -158
  163. package/src/plugins/L.EchartsLayer/index.js +0 -339
  164. package/src/plugins/L.ElasticMarker/index.js +0 -162
  165. package/src/plugins/L.FootageCalculator.Area/index.js +0 -263
  166. package/src/plugins/L.FootageCalculator.Line/index.js +0 -273
  167. package/src/plugins/L.GeoUtil/buffer.js +0 -67
  168. package/src/plugins/L.GeoUtil/index.js +0 -284
  169. package/src/plugins/L.Glyphicon/index.js +0 -91
  170. package/src/plugins/L.Glyphicon/style.less +0 -37
  171. package/src/plugins/L.MarkerClusterX/index.js +0 -93
  172. package/src/plugins/L.MarkerClusterX/style.less +0 -162
  173. package/src/plugins/L.SafeDivOverlay/index.js +0 -55
  174. package/src/plugins/L.TileLayer.ChinaProvider/index.js +0 -108
  175. package/src/plugins/L.VuePopup/index.js +0 -67
  176. package/src/plugins/L.VueTooltip/index.js +0 -63
  177. package/src/plugins/Mixin.Map.Measure/index.js +0 -248
  178. package/src/plugins/globals/index.js +0 -7
  179. package/src/utils/index.js +0 -36
  180. package/src/utils/resize-event.js +0 -45
  181. /package/{public → lib}/favicon.ico +0 -0
  182. /package/{public → lib}/images/game.png +0 -0
  183. /package/{public → lib}/images/grid.png +0 -0
  184. /package/{public → lib}/images/marker.png +0 -0
  185. /package/{public → lib/vae-amap}/index.html +0 -0
@@ -0,0 +1,4322 @@
1
+ import { watch as be, unref as O, onBeforeUnmount as vt, defineComponent as pe, ref as T, createVNode as ce, computed as S, openBlock as N, createElementBlock as W, normalizeStyle as Qe, Fragment as gt, renderList as pr, normalizeClass as J, toDisplayString as et, nextTick as ct, h as hr, toRef as bn, readonly as mr, getCurrentScope as vr, onScopeDispose as gr, onMounted as yt, getCurrentInstance as Ge, shallowRef as ul, watchEffect as fl, isRef as yr, reactive as dl, warn as _r, inject as Ve, createElementVNode as D, mergeProps as wr, renderSlot as qe, Transition as Ht, withCtx as Pe, createTextVNode as br, createCommentVNode as ae, provide as xr, shallowReactive as xn, createBlock as we, withDirectives as Et, resolveDynamicComponent as Ot, withModifiers as Ln, vShow as Pt, isVNode as tt, render as ut, createApp as Cn } from "vue";
2
+ import { v4 as Lr } from "uuid";
3
+ import { debounce as Cr } from "lodash";
4
+ import Sn from "leaflet";
5
+ import xt from "axios";
6
+ import "leaflet.markercluster";
7
+ import "leaflet-geometryutil";
8
+ import "proj4";
9
+ import "proj4leaflet";
10
+ import "@geoman-io/leaflet-geoman-free";
11
+ import * as Me from "echarts";
12
+ import je from "jquery";
13
+ import Lt from "@turf/buffer";
14
+ const We = () => _.replace(Lr(), /-/g, "");
15
+ function Yt(e, t) {
16
+ if (t && _.isPlainObject(t)) {
17
+ let r = t;
18
+ t = function(s) {
19
+ let o = !0;
20
+ return Object.keys(r).forEach((a) => {
21
+ s[a] != r[a] && (o = !1);
22
+ }), o;
23
+ };
24
+ }
25
+ function n(r = [], s) {
26
+ return r.forEach((o) => {
27
+ t && _.isObject(t) && !s && (t(o) ? s = o : o.children && Array.isArray(o.children) && (s = n(o.children, s) || s));
28
+ }), s;
29
+ }
30
+ return n(e);
31
+ }
32
+ const Fe = /* @__PURE__ */ new WeakMap();
33
+ function Sr(e) {
34
+ return {
35
+ width: e.contentRect.width,
36
+ height: e.contentRect.height,
37
+ visible: !!(e.contentRect.height && e.contentRect.width),
38
+ entry: e
39
+ };
40
+ }
41
+ function Mr(e) {
42
+ let t = Fe.get(e);
43
+ return t || (t = {
44
+ listeners: /* @__PURE__ */ new Set(),
45
+ observer: new ResizeObserver((n) => {
46
+ for (const r of n) {
47
+ const s = Fe.get(r.target);
48
+ if (!s)
49
+ continue;
50
+ const o = Sr(r);
51
+ s.listeners.forEach((a) => a(o));
52
+ }
53
+ })
54
+ }, t.observer.observe(e), Fe.set(e, t)), t;
55
+ }
56
+ function Ar(e) {
57
+ const t = Fe.get(e);
58
+ !t || t.listeners.size > 0 || (t.observer.disconnect(), Fe.delete(e));
59
+ }
60
+ function Ut(e, t) {
61
+ return !e || typeof t != "function" ? () => {
62
+ } : (Mr(e).listeners.add(t), () => {
63
+ const r = Fe.get(e);
64
+ r && (r.listeners.delete(t), Ar(e));
65
+ });
66
+ }
67
+ function Tr(e, t) {
68
+ let n = null;
69
+ const r = (s) => {
70
+ n == null || n(), n = s ? Ut(s, t) : null;
71
+ };
72
+ be(
73
+ () => O(e),
74
+ (s) => {
75
+ r(s);
76
+ },
77
+ { immediate: !0 }
78
+ ), vt(() => {
79
+ n == null || n();
80
+ });
81
+ }
82
+ const Mn = /* @__PURE__ */ pe({
83
+ name: "ResizeListener",
84
+ props: {
85
+ debounce: {
86
+ type: Number,
87
+ default: 100
88
+ }
89
+ },
90
+ emits: ["resize"],
91
+ setup(e, {
92
+ emit: t,
93
+ slots: n
94
+ }) {
95
+ const r = T(null), s = Cr(() => {
96
+ r.value && t("resize", r.value);
97
+ }, e.debounce);
98
+ return Tr(r, ({
99
+ visible: o
100
+ }) => {
101
+ o && s();
102
+ }), () => {
103
+ var o;
104
+ return ce("div", {
105
+ ref: r
106
+ }, [(o = n.default) == null ? void 0 : o.call(n)]);
107
+ };
108
+ }
109
+ }), Er = (e, t) => {
110
+ const n = e.__vccOpts || e;
111
+ for (const [r, s] of t)
112
+ n[r] = s;
113
+ return n;
114
+ }, Or = ["onClick"], Pr = {
115
+ __name: "index",
116
+ props: {
117
+ left: {
118
+ type: Number,
119
+ default: 0
120
+ },
121
+ top: {
122
+ type: Number,
123
+ default: 0
124
+ },
125
+ menus: {
126
+ type: Array,
127
+ default: () => []
128
+ }
129
+ },
130
+ emits: ["callback"],
131
+ setup(e, { emit: t }) {
132
+ const n = e, r = t, s = (a) => {
133
+ a.disabled || r("callback", a.callback);
134
+ }, o = S(() => ({
135
+ left: `${n.left}px`,
136
+ top: `${n.top}px`
137
+ }));
138
+ return (a, i) => (N(), W(
139
+ "div",
140
+ {
141
+ class: "vae-map-ctrl--context-menu",
142
+ style: Qe(o.value)
143
+ },
144
+ [
145
+ (N(!0), W(
146
+ gt,
147
+ null,
148
+ pr(e.menus, (l) => (N(), W("div", {
149
+ key: l.text,
150
+ class: J(["item", { "is-disabled": l.disabled, "is-divided": l.divided }]),
151
+ onClick: (u) => s(l)
152
+ }, et(l.text), 11, Or))),
153
+ 128
154
+ /* KEYED_FRAGMENT */
155
+ ))
156
+ ],
157
+ 4
158
+ /* STYLE */
159
+ ));
160
+ }
161
+ }, zr = /* @__PURE__ */ Er(Pr, [["__scopeId", "data-v-e720c89a"]]);
162
+ function Xt(e) {
163
+ return (e == null ? void 0 : e.$el) ?? e ?? null;
164
+ }
165
+ function An({ mapRef: e, mapContainerRef: t, menusRef: n }) {
166
+ const r = T(null), s = T(!1), o = T(null), a = T(0), i = T(0), l = S(() => O(n) ?? []), u = () => {
167
+ const m = O(e);
168
+ m == null || m.off("click", u), s.value = !1, o.value = null;
169
+ }, d = (m) => {
170
+ s.value = !1, m && _.isFunction(m) && m(o.value);
171
+ }, f = async (m) => {
172
+ var Z;
173
+ s.value = !0, o.value = m, await ct();
174
+ const h = Xt(r.value), w = Xt(O(t));
175
+ if (!h || !w)
176
+ return;
177
+ const I = h.scrollHeight, M = h.scrollWidth, P = w.scrollHeight, B = w.scrollWidth;
178
+ a.value = m.containerPoint.x, i.value = m.containerPoint.y, a.value + M > B && B > M && (a.value = B - M), i.value + I > P && P > I && (i.value = P - I), (Z = O(e)) == null || Z.on("click", u);
179
+ }, c = () => {
180
+ const m = O(e);
181
+ m && (m.off("contextmenu", f), l.value.length > 0 && m.on("contextmenu", f));
182
+ };
183
+ return be(l, c, { deep: !0 }), vt(() => {
184
+ const m = O(e);
185
+ m == null || m.off("contextmenu", f), m == null || m.off("click", u);
186
+ }), {
187
+ addContextMenu: c,
188
+ hideContextMenu: u,
189
+ renderContextMenu: () => l.value.length === 0 || !s.value ? null : hr(zr, {
190
+ ref: r,
191
+ menus: l.value,
192
+ left: a.value,
193
+ top: i.value,
194
+ onCallback: d
195
+ })
196
+ };
197
+ }
198
+ const kr = /* @__PURE__ */ pe({
199
+ name: "VaeMap",
200
+ props: {
201
+ height: {
202
+ type: String,
203
+ default: "100%"
204
+ },
205
+ width: {
206
+ type: String,
207
+ default: "100%"
208
+ },
209
+ options: {
210
+ type: Object,
211
+ default: () => ({})
212
+ },
213
+ baseLayers: {
214
+ type: [String, Array],
215
+ default: () => []
216
+ },
217
+ contextMenu: {
218
+ type: Array,
219
+ default: () => []
220
+ }
221
+ },
222
+ emits: ["init-map"],
223
+ setup(e, {
224
+ emit: t
225
+ }) {
226
+ const n = T(!1), r = T(`vae_map_${We()}`), s = T(null), o = T(null), a = T(null), {
227
+ addContextMenu: i,
228
+ renderContextMenu: l
229
+ } = An({
230
+ mapRef: s,
231
+ mapContainerRef: a,
232
+ menusRef: bn(e, "contextMenu")
233
+ }), u = () => {
234
+ if (!s.value)
235
+ return;
236
+ o.value || (o.value = L.layerGroup().addTo(s.value)), o.value.clearLayers();
237
+ let c = e.baseLayers;
238
+ _.isString(c) && (c = [c]), Array.isArray(c) && c.forEach((p) => {
239
+ L.tileLayer.chinaProvider(p).addTo(o.value);
240
+ });
241
+ }, d = () => {
242
+ if (!s.value) {
243
+ const c = L.extend({
244
+ center: [34.2943, 117.357],
245
+ zoom: 12,
246
+ maxZoom: 25,
247
+ zoomControl: !1,
248
+ attributionControl: !1
249
+ }, e.options);
250
+ s.value = L.map(r.value, c), s.value.whenReady(() => {
251
+ i(), u(), t("init-map", s.value);
252
+ });
253
+ }
254
+ }, f = () => {
255
+ var c;
256
+ s.value || d(), (c = s.value) == null || c.invalidateSize();
257
+ };
258
+ return be(() => e.baseLayers, () => {
259
+ s.value && u();
260
+ }, {
261
+ deep: !0
262
+ }), vt(() => {
263
+ var c;
264
+ (c = s.value) == null || c.remove();
265
+ }), () => n.value ? null : ce(Mn, {
266
+ ref: a,
267
+ class: "vae-map",
268
+ style: {
269
+ height: e.height,
270
+ width: e.width
271
+ },
272
+ onResize: f
273
+ }, {
274
+ default: () => [ce("div", {
275
+ class: "leaflet-map",
276
+ id: r.value
277
+ }, null), l()]
278
+ });
279
+ }
280
+ }), He = {
281
+ tab: "Tab",
282
+ enter: "Enter",
283
+ space: "Space",
284
+ left: "ArrowLeft",
285
+ up: "ArrowUp",
286
+ right: "ArrowRight",
287
+ down: "ArrowDown",
288
+ esc: "Escape",
289
+ delete: "Delete",
290
+ backspace: "Backspace",
291
+ numpadEnter: "NumpadEnter",
292
+ pageUp: "PageUp",
293
+ pageDown: "PageDown",
294
+ home: "Home",
295
+ end: "End"
296
+ }, Ir = [
297
+ "",
298
+ "default",
299
+ "small",
300
+ "large"
301
+ ];
302
+ function Gt(e) {
303
+ return vr() ? (gr(e), !0) : !1;
304
+ }
305
+ function _t(e) {
306
+ return typeof e == "function" ? e() : O(e);
307
+ }
308
+ const Te = typeof window < "u" && typeof document < "u";
309
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
310
+ const $r = Object.prototype.toString, Dr = (e) => $r.call(e) === "[object Object]";
311
+ const Rr = () => {
312
+ };
313
+ function Tn(e, t, n = {}) {
314
+ const {
315
+ immediate: r = !0
316
+ } = n, s = T(!1);
317
+ let o = null;
318
+ function a() {
319
+ o && (clearTimeout(o), o = null);
320
+ }
321
+ function i() {
322
+ s.value = !1, a();
323
+ }
324
+ function l(...u) {
325
+ a(), s.value = !0, o = setTimeout(() => {
326
+ s.value = !1, o = null, e(...u);
327
+ }, _t(t));
328
+ }
329
+ return r && (s.value = !0, Te && l()), Gt(i), {
330
+ isPending: mr(s),
331
+ start: l,
332
+ stop: i
333
+ };
334
+ }
335
+ const En = Te ? window : void 0, Cl = Te ? window.document : void 0;
336
+ function zt(e) {
337
+ var t;
338
+ const n = _t(e);
339
+ return (t = n == null ? void 0 : n.$el) != null ? t : n;
340
+ }
341
+ function On(...e) {
342
+ let t, n, r, s;
343
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, r, s] = e, t = En) : [t, n, r, s] = e, !t)
344
+ return Rr;
345
+ Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
346
+ const o = [], a = () => {
347
+ o.forEach((d) => d()), o.length = 0;
348
+ }, i = (d, f, c, p) => (d.addEventListener(f, c, p), () => d.removeEventListener(f, c, p)), l = be(
349
+ () => [zt(t), _t(s)],
350
+ ([d, f]) => {
351
+ if (a(), !d)
352
+ return;
353
+ const c = Dr(f) ? { ...f } : f;
354
+ o.push(
355
+ ...n.flatMap((p) => r.map((m) => i(d, p, m, c)))
356
+ );
357
+ },
358
+ { immediate: !0, flush: "post" }
359
+ ), u = () => {
360
+ l(), a();
361
+ };
362
+ return Gt(u), u;
363
+ }
364
+ function Nr() {
365
+ const e = T(!1), t = Ge();
366
+ return t && yt(() => {
367
+ e.value = !0;
368
+ }, t), e;
369
+ }
370
+ function jr(e) {
371
+ const t = Nr();
372
+ return S(() => (t.value, !!e()));
373
+ }
374
+ function Br(e, t, n = {}) {
375
+ const { window: r = En, ...s } = n;
376
+ let o;
377
+ const a = jr(() => r && "ResizeObserver" in r), i = () => {
378
+ o && (o.disconnect(), o = void 0);
379
+ }, l = S(() => {
380
+ const f = _t(e);
381
+ return Array.isArray(f) ? f.map((c) => zt(c)) : [zt(f)];
382
+ }), u = be(
383
+ l,
384
+ (f) => {
385
+ if (i(), a.value && r) {
386
+ o = new ResizeObserver(t);
387
+ for (const c of f)
388
+ c && o.observe(c, s);
389
+ }
390
+ },
391
+ { immediate: !0, flush: "post" }
392
+ ), d = () => {
393
+ i(), u();
394
+ };
395
+ return Gt(d), {
396
+ isSupported: a,
397
+ stop: d
398
+ };
399
+ }
400
+ const Vr = () => Te && /android/i.test(window.navigator.userAgent);
401
+ /**
402
+ * @vue/shared v3.5.32
403
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
404
+ * @license MIT
405
+ **/
406
+ process.env.NODE_ENV !== "production" && Object.freeze({});
407
+ process.env.NODE_ENV !== "production" && Object.freeze([]);
408
+ const Fr = Object.prototype.hasOwnProperty, ft = (e, t) => Fr.call(e, t), Pn = Array.isArray;
409
+ const nt = (e) => typeof e == "function", xe = (e) => typeof e == "string", zn = (e) => e !== null && typeof e == "object";
410
+ const kn = (e) => {
411
+ const t = /* @__PURE__ */ Object.create(null);
412
+ return (n) => t[n] || (t[n] = e(n));
413
+ }, Hr = /-\w/g, Sl = kn(
414
+ (e) => e.replace(Hr, (t) => t.slice(1).toUpperCase())
415
+ ), Ml = kn((e) => e.charAt(0).toUpperCase() + e.slice(1));
416
+ var In = typeof global == "object" && global && global.Object === Object && global, Ur = typeof self == "object" && self && self.Object === Object && self, Le = In || Ur || Function("return this")(), Ae = Le.Symbol, $n = Object.prototype, Gr = $n.hasOwnProperty, qr = $n.toString, Ye = Ae ? Ae.toStringTag : void 0;
417
+ function Wr(e) {
418
+ var t = Gr.call(e, Ye), n = e[Ye];
419
+ try {
420
+ e[Ye] = void 0;
421
+ var r = !0;
422
+ } catch {
423
+ }
424
+ var s = qr.call(e);
425
+ return r && (t ? e[Ye] = n : delete e[Ye]), s;
426
+ }
427
+ var Zr = Object.prototype, Kr = Zr.toString;
428
+ function Jr(e) {
429
+ return Kr.call(e);
430
+ }
431
+ var Yr = "[object Null]", Xr = "[object Undefined]", Qt = Ae ? Ae.toStringTag : void 0;
432
+ function De(e) {
433
+ return e == null ? e === void 0 ? Xr : Yr : Qt && Qt in Object(e) ? Wr(e) : Jr(e);
434
+ }
435
+ function ot(e) {
436
+ return e != null && typeof e == "object";
437
+ }
438
+ var Qr = "[object Symbol]";
439
+ function qt(e) {
440
+ return typeof e == "symbol" || ot(e) && De(e) == Qr;
441
+ }
442
+ function es(e, t) {
443
+ for (var n = -1, r = e == null ? 0 : e.length, s = Array(r); ++n < r; )
444
+ s[n] = t(e[n], n, e);
445
+ return s;
446
+ }
447
+ var Wt = Array.isArray, en = Ae ? Ae.prototype : void 0, tn = en ? en.toString : void 0;
448
+ function Dn(e) {
449
+ if (typeof e == "string")
450
+ return e;
451
+ if (Wt(e))
452
+ return es(e, Dn) + "";
453
+ if (qt(e))
454
+ return tn ? tn.call(e) : "";
455
+ var t = e + "";
456
+ return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
457
+ }
458
+ function Rn(e) {
459
+ var t = typeof e;
460
+ return e != null && (t == "object" || t == "function");
461
+ }
462
+ var ts = "[object AsyncFunction]", ns = "[object Function]", rs = "[object GeneratorFunction]", ss = "[object Proxy]";
463
+ function os(e) {
464
+ if (!Rn(e))
465
+ return !1;
466
+ var t = De(e);
467
+ return t == ns || t == rs || t == ts || t == ss;
468
+ }
469
+ var Ct = Le["__core-js_shared__"], nn = function() {
470
+ var e = /[^.]+$/.exec(Ct && Ct.keys && Ct.keys.IE_PROTO || "");
471
+ return e ? "Symbol(src)_1." + e : "";
472
+ }();
473
+ function as(e) {
474
+ return !!nn && nn in e;
475
+ }
476
+ var is = Function.prototype, ls = is.toString;
477
+ function Re(e) {
478
+ if (e != null) {
479
+ try {
480
+ return ls.call(e);
481
+ } catch {
482
+ }
483
+ try {
484
+ return e + "";
485
+ } catch {
486
+ }
487
+ }
488
+ return "";
489
+ }
490
+ var cs = /[\\^$.*+?()[\]{}|]/g, us = /^\[object .+?Constructor\]$/, fs = Function.prototype, ds = Object.prototype, ps = fs.toString, hs = ds.hasOwnProperty, ms = RegExp(
491
+ "^" + ps.call(hs).replace(cs, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
492
+ );
493
+ function vs(e) {
494
+ if (!Rn(e) || as(e))
495
+ return !1;
496
+ var t = os(e) ? ms : us;
497
+ return t.test(Re(e));
498
+ }
499
+ function gs(e, t) {
500
+ return e == null ? void 0 : e[t];
501
+ }
502
+ function Ne(e, t) {
503
+ var n = gs(e, t);
504
+ return vs(n) ? n : void 0;
505
+ }
506
+ var kt = Ne(Le, "WeakMap"), rn = function() {
507
+ try {
508
+ var e = Ne(Object, "defineProperty");
509
+ return e({}, "", {}), e;
510
+ } catch {
511
+ }
512
+ }();
513
+ function ys(e, t, n) {
514
+ t == "__proto__" && rn ? rn(e, t, {
515
+ configurable: !0,
516
+ enumerable: !0,
517
+ value: n,
518
+ writable: !0
519
+ }) : e[t] = n;
520
+ }
521
+ function _s(e, t) {
522
+ return e === t || e !== e && t !== t;
523
+ }
524
+ var ws = Object.prototype, Al = ws.hasOwnProperty;
525
+ var bs = 9007199254740991;
526
+ function xs(e) {
527
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= bs;
528
+ }
529
+ var Tl = Object.prototype;
530
+ var Ls = "[object Arguments]";
531
+ function sn(e) {
532
+ return ot(e) && De(e) == Ls;
533
+ }
534
+ var Nn = Object.prototype, Cs = Nn.hasOwnProperty, Ss = Nn.propertyIsEnumerable, El = sn(/* @__PURE__ */ function() {
535
+ return arguments;
536
+ }()) ? sn : function(e) {
537
+ return ot(e) && Cs.call(e, "callee") && !Ss.call(e, "callee");
538
+ };
539
+ var jn = typeof exports == "object" && exports && !exports.nodeType && exports, on = jn && typeof module == "object" && module && !module.nodeType && module, Ms = on && on.exports === jn, an = Ms ? Le.Buffer : void 0, Ol = an ? an.isBuffer : void 0;
540
+ var As = "[object Arguments]", Ts = "[object Array]", Es = "[object Boolean]", Os = "[object Date]", Ps = "[object Error]", zs = "[object Function]", ks = "[object Map]", Is = "[object Number]", $s = "[object Object]", Ds = "[object RegExp]", Rs = "[object Set]", Ns = "[object String]", js = "[object WeakMap]", Bs = "[object ArrayBuffer]", Vs = "[object DataView]", Fs = "[object Float32Array]", Hs = "[object Float64Array]", Us = "[object Int8Array]", Gs = "[object Int16Array]", qs = "[object Int32Array]", Ws = "[object Uint8Array]", Zs = "[object Uint8ClampedArray]", Ks = "[object Uint16Array]", Js = "[object Uint32Array]", q = {};
541
+ q[Fs] = q[Hs] = q[Us] = q[Gs] = q[qs] = q[Ws] = q[Zs] = q[Ks] = q[Js] = !0;
542
+ q[As] = q[Ts] = q[Bs] = q[Es] = q[Vs] = q[Os] = q[Ps] = q[zs] = q[ks] = q[Is] = q[$s] = q[Ds] = q[Rs] = q[Ns] = q[js] = !1;
543
+ function Ys(e) {
544
+ return ot(e) && xs(e.length) && !!q[De(e)];
545
+ }
546
+ function Xs(e) {
547
+ return function(t) {
548
+ return e(t);
549
+ };
550
+ }
551
+ var Bn = typeof exports == "object" && exports && !exports.nodeType && exports, Xe = Bn && typeof module == "object" && module && !module.nodeType && module, Qs = Xe && Xe.exports === Bn, St = Qs && In.process, ln = function() {
552
+ try {
553
+ var e = Xe && Xe.require && Xe.require("util").types;
554
+ return e || St && St.binding && St.binding("util");
555
+ } catch {
556
+ }
557
+ }(), cn = ln && ln.isTypedArray, Pl = cn ? Xs(cn) : Ys, eo = Object.prototype, zl = eo.hasOwnProperty;
558
+ function Vn(e, t) {
559
+ return function(n) {
560
+ return e(t(n));
561
+ };
562
+ }
563
+ var kl = Vn(Object.keys, Object), to = Object.prototype, Il = to.hasOwnProperty;
564
+ var no = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, ro = /^\w*$/;
565
+ function so(e, t) {
566
+ if (Wt(e))
567
+ return !1;
568
+ var n = typeof e;
569
+ return n == "number" || n == "symbol" || n == "boolean" || e == null || qt(e) ? !0 : ro.test(e) || !no.test(e) || t != null && e in Object(t);
570
+ }
571
+ var rt = Ne(Object, "create");
572
+ function oo() {
573
+ this.__data__ = rt ? rt(null) : {}, this.size = 0;
574
+ }
575
+ function ao(e) {
576
+ var t = this.has(e) && delete this.__data__[e];
577
+ return this.size -= t ? 1 : 0, t;
578
+ }
579
+ var io = "__lodash_hash_undefined__", lo = Object.prototype, co = lo.hasOwnProperty;
580
+ function uo(e) {
581
+ var t = this.__data__;
582
+ if (rt) {
583
+ var n = t[e];
584
+ return n === io ? void 0 : n;
585
+ }
586
+ return co.call(t, e) ? t[e] : void 0;
587
+ }
588
+ var fo = Object.prototype, po = fo.hasOwnProperty;
589
+ function ho(e) {
590
+ var t = this.__data__;
591
+ return rt ? t[e] !== void 0 : po.call(t, e);
592
+ }
593
+ var mo = "__lodash_hash_undefined__";
594
+ function vo(e, t) {
595
+ var n = this.__data__;
596
+ return this.size += this.has(e) ? 0 : 1, n[e] = rt && t === void 0 ? mo : t, this;
597
+ }
598
+ function ze(e) {
599
+ var t = -1, n = e == null ? 0 : e.length;
600
+ for (this.clear(); ++t < n; ) {
601
+ var r = e[t];
602
+ this.set(r[0], r[1]);
603
+ }
604
+ }
605
+ ze.prototype.clear = oo;
606
+ ze.prototype.delete = ao;
607
+ ze.prototype.get = uo;
608
+ ze.prototype.has = ho;
609
+ ze.prototype.set = vo;
610
+ function go() {
611
+ this.__data__ = [], this.size = 0;
612
+ }
613
+ function wt(e, t) {
614
+ for (var n = e.length; n--; )
615
+ if (_s(e[n][0], t))
616
+ return n;
617
+ return -1;
618
+ }
619
+ var yo = Array.prototype, _o = yo.splice;
620
+ function wo(e) {
621
+ var t = this.__data__, n = wt(t, e);
622
+ if (n < 0)
623
+ return !1;
624
+ var r = t.length - 1;
625
+ return n == r ? t.pop() : _o.call(t, n, 1), --this.size, !0;
626
+ }
627
+ function bo(e) {
628
+ var t = this.__data__, n = wt(t, e);
629
+ return n < 0 ? void 0 : t[n][1];
630
+ }
631
+ function xo(e) {
632
+ return wt(this.__data__, e) > -1;
633
+ }
634
+ function Lo(e, t) {
635
+ var n = this.__data__, r = wt(n, e);
636
+ return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
637
+ }
638
+ function Ce(e) {
639
+ var t = -1, n = e == null ? 0 : e.length;
640
+ for (this.clear(); ++t < n; ) {
641
+ var r = e[t];
642
+ this.set(r[0], r[1]);
643
+ }
644
+ }
645
+ Ce.prototype.clear = go;
646
+ Ce.prototype.delete = wo;
647
+ Ce.prototype.get = bo;
648
+ Ce.prototype.has = xo;
649
+ Ce.prototype.set = Lo;
650
+ var st = Ne(Le, "Map");
651
+ function Co() {
652
+ this.size = 0, this.__data__ = {
653
+ hash: new ze(),
654
+ map: new (st || Ce)(),
655
+ string: new ze()
656
+ };
657
+ }
658
+ function So(e) {
659
+ var t = typeof e;
660
+ return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
661
+ }
662
+ function bt(e, t) {
663
+ var n = e.__data__;
664
+ return So(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
665
+ }
666
+ function Mo(e) {
667
+ var t = bt(this, e).delete(e);
668
+ return this.size -= t ? 1 : 0, t;
669
+ }
670
+ function Ao(e) {
671
+ return bt(this, e).get(e);
672
+ }
673
+ function To(e) {
674
+ return bt(this, e).has(e);
675
+ }
676
+ function Eo(e, t) {
677
+ var n = bt(this, e), r = n.size;
678
+ return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
679
+ }
680
+ function Se(e) {
681
+ var t = -1, n = e == null ? 0 : e.length;
682
+ for (this.clear(); ++t < n; ) {
683
+ var r = e[t];
684
+ this.set(r[0], r[1]);
685
+ }
686
+ }
687
+ Se.prototype.clear = Co;
688
+ Se.prototype.delete = Mo;
689
+ Se.prototype.get = Ao;
690
+ Se.prototype.has = To;
691
+ Se.prototype.set = Eo;
692
+ var Oo = "Expected a function";
693
+ function Zt(e, t) {
694
+ if (typeof e != "function" || t != null && typeof t != "function")
695
+ throw new TypeError(Oo);
696
+ var n = function() {
697
+ var r = arguments, s = t ? t.apply(this, r) : r[0], o = n.cache;
698
+ if (o.has(s))
699
+ return o.get(s);
700
+ var a = e.apply(this, r);
701
+ return n.cache = o.set(s, a) || o, a;
702
+ };
703
+ return n.cache = new (Zt.Cache || Se)(), n;
704
+ }
705
+ Zt.Cache = Se;
706
+ var Po = 500;
707
+ function zo(e) {
708
+ var t = Zt(e, function(r) {
709
+ return n.size === Po && n.clear(), r;
710
+ }), n = t.cache;
711
+ return t;
712
+ }
713
+ var ko = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Io = /\\(\\)?/g, $o = zo(function(e) {
714
+ var t = [];
715
+ return e.charCodeAt(0) === 46 && t.push(""), e.replace(ko, function(n, r, s, o) {
716
+ t.push(s ? o.replace(Io, "$1") : r || n);
717
+ }), t;
718
+ });
719
+ function Do(e) {
720
+ return e == null ? "" : Dn(e);
721
+ }
722
+ function Ro(e, t) {
723
+ return Wt(e) ? e : so(e, t) ? [e] : $o(Do(e));
724
+ }
725
+ function No(e) {
726
+ if (typeof e == "string" || qt(e))
727
+ return e;
728
+ var t = e + "";
729
+ return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
730
+ }
731
+ function jo(e, t) {
732
+ t = Ro(t, e);
733
+ for (var n = 0, r = t.length; e != null && n < r; )
734
+ e = e[No(t[n++])];
735
+ return n && n == r ? e : void 0;
736
+ }
737
+ function Bo(e, t, n) {
738
+ var r = e == null ? void 0 : jo(e, t);
739
+ return r === void 0 ? n : r;
740
+ }
741
+ var Vo = Vn(Object.getPrototypeOf, Object), Fo = "[object Object]", Ho = Function.prototype, Uo = Object.prototype, Fn = Ho.toString, Go = Uo.hasOwnProperty, qo = Fn.call(Object);
742
+ function Wo(e) {
743
+ if (!ot(e) || De(e) != Fo)
744
+ return !1;
745
+ var t = Vo(e);
746
+ if (t === null)
747
+ return !0;
748
+ var n = Go.call(t, "constructor") && t.constructor;
749
+ return typeof n == "function" && n instanceof n && Fn.call(n) == qo;
750
+ }
751
+ function Zo() {
752
+ this.__data__ = new Ce(), this.size = 0;
753
+ }
754
+ function Ko(e) {
755
+ var t = this.__data__, n = t.delete(e);
756
+ return this.size = t.size, n;
757
+ }
758
+ function Jo(e) {
759
+ return this.__data__.get(e);
760
+ }
761
+ function Yo(e) {
762
+ return this.__data__.has(e);
763
+ }
764
+ var Xo = 200;
765
+ function Qo(e, t) {
766
+ var n = this.__data__;
767
+ if (n instanceof Ce) {
768
+ var r = n.__data__;
769
+ if (!st || r.length < Xo - 1)
770
+ return r.push([e, t]), this.size = ++n.size, this;
771
+ n = this.__data__ = new Se(r);
772
+ }
773
+ return n.set(e, t), this.size = n.size, this;
774
+ }
775
+ function at(e) {
776
+ var t = this.__data__ = new Ce(e);
777
+ this.size = t.size;
778
+ }
779
+ at.prototype.clear = Zo;
780
+ at.prototype.delete = Ko;
781
+ at.prototype.get = Jo;
782
+ at.prototype.has = Yo;
783
+ at.prototype.set = Qo;
784
+ var ea = Object.prototype, $l = ea.propertyIsEnumerable;
785
+ var It = Ne(Le, "DataView"), $t = Ne(Le, "Promise"), Dt = Ne(Le, "Set"), un = "[object Map]", ta = "[object Object]", fn = "[object Promise]", dn = "[object Set]", pn = "[object WeakMap]", hn = "[object DataView]", na = Re(It), ra = Re(st), sa = Re($t), oa = Re(Dt), aa = Re(kt), Be = De;
786
+ (It && Be(new It(new ArrayBuffer(1))) != hn || st && Be(new st()) != un || $t && Be($t.resolve()) != fn || Dt && Be(new Dt()) != dn || kt && Be(new kt()) != pn) && (Be = function(e) {
787
+ var t = De(e), n = t == ta ? e.constructor : void 0, r = n ? Re(n) : "";
788
+ if (r)
789
+ switch (r) {
790
+ case na:
791
+ return hn;
792
+ case ra:
793
+ return un;
794
+ case sa:
795
+ return fn;
796
+ case oa:
797
+ return dn;
798
+ case aa:
799
+ return pn;
800
+ }
801
+ return t;
802
+ });
803
+ var Dl = Le.Uint8Array, ia = "__lodash_hash_undefined__";
804
+ function la(e) {
805
+ return this.__data__.set(e, ia), this;
806
+ }
807
+ function ca(e) {
808
+ return this.__data__.has(e);
809
+ }
810
+ function Rt(e) {
811
+ var t = -1, n = e == null ? 0 : e.length;
812
+ for (this.__data__ = new Se(); ++t < n; )
813
+ this.add(e[t]);
814
+ }
815
+ Rt.prototype.add = Rt.prototype.push = la;
816
+ Rt.prototype.has = ca;
817
+ var mn = Ae ? Ae.prototype : void 0, Rl = mn ? mn.valueOf : void 0;
818
+ var ua = Object.prototype, Nl = ua.hasOwnProperty;
819
+ var fa = Object.prototype, jl = fa.hasOwnProperty;
820
+ function Hn(e) {
821
+ for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) {
822
+ var s = e[t];
823
+ ys(r, s[0], s[1]);
824
+ }
825
+ return r;
826
+ }
827
+ const da = (e) => e === void 0, Mt = (e) => typeof e == "boolean", ke = (e) => typeof e == "number";
828
+ const Nt = (e) => typeof Element > "u" ? !1 : e instanceof Element;
829
+ const pa = (e) => xe(e) ? !Number.isNaN(Number(e)) : !1;
830
+ const Un = (e) => {
831
+ if (e.code && e.code !== "Unidentified") return e.code;
832
+ const t = ha(e);
833
+ if (t) {
834
+ if (Object.values(He).includes(t)) return t;
835
+ switch (t) {
836
+ case " ":
837
+ return He.space;
838
+ default:
839
+ return "";
840
+ }
841
+ }
842
+ return "";
843
+ }, ha = (e) => {
844
+ let t = e.key && e.key !== "Unidentified" ? e.key : "";
845
+ if (!t && e.type === "keyup" && Vr()) {
846
+ const n = e.target;
847
+ t = n.value.charAt(n.selectionStart - 1);
848
+ }
849
+ return t;
850
+ }, vn = (e) => Object.keys(e);
851
+ const Gn = "__epPropKey", ee = (e) => e, ma = (e) => zn(e) && !!e[Gn], qn = (e, t) => {
852
+ if (!zn(e) || ma(e)) return e;
853
+ const { values: n, required: r, default: s, type: o, validator: a } = e, i = {
854
+ type: o,
855
+ required: !!r,
856
+ validator: n || a ? (l) => {
857
+ let u = !1, d = [];
858
+ if (n && (d = Array.from(n), ft(e, "default") && d.push(s), u || (u = d.includes(l))), a && (u || (u = a(l))), !u && d.length > 0) {
859
+ const f = [...new Set(d)].map((c) => JSON.stringify(c)).join(", ");
860
+ _r(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${f}], got value ${JSON.stringify(l)}.`);
861
+ }
862
+ return u;
863
+ } : void 0,
864
+ [Gn]: !0
865
+ };
866
+ return ft(e, "default") && (i.default = s), i;
867
+ }, Ke = (e) => Hn(Object.entries(e).map(([t, n]) => [t, qn(n, t)]));
868
+ var va = class extends Error {
869
+ constructor(e) {
870
+ super(e), this.name = "ElementPlusError";
871
+ }
872
+ };
873
+ function Je(e, t) {
874
+ {
875
+ const n = xe(e) ? new va(`[${e}] ${t}`) : e;
876
+ console.warn(n);
877
+ }
878
+ }
879
+ const ga = "utils/dom/style";
880
+ function jt(e, t = "px") {
881
+ if (!e && e !== 0) return "";
882
+ if (ke(e) || pa(e)) return `${e}${t}`;
883
+ if (xe(e)) return e;
884
+ Je(ga, "binding value must be a string or number");
885
+ }
886
+ var ya = {
887
+ name: "en",
888
+ el: {
889
+ breadcrumb: { label: "Breadcrumb" },
890
+ colorpicker: {
891
+ confirm: "OK",
892
+ clear: "Clear",
893
+ defaultLabel: "color picker",
894
+ description: "current color is {color}. press enter to select a new color.",
895
+ alphaLabel: "pick alpha value",
896
+ alphaDescription: "alpha {alpha}, current color is {color}",
897
+ hueLabel: "pick hue value",
898
+ hueDescription: "hue {hue}, current color is {color}",
899
+ svLabel: "pick saturation and brightness value",
900
+ svDescription: "saturation {saturation}, brightness {brightness}, current color is {color}",
901
+ predefineDescription: "select {value} as the color"
902
+ },
903
+ datepicker: {
904
+ now: "Now",
905
+ today: "Today",
906
+ cancel: "Cancel",
907
+ clear: "Clear",
908
+ confirm: "OK",
909
+ dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
910
+ monthTablePrompt: "Use the arrow keys and enter to select the month",
911
+ yearTablePrompt: "Use the arrow keys and enter to select the year",
912
+ selectedDate: "Selected date",
913
+ selectDate: "Select date",
914
+ selectTime: "Select time",
915
+ startDate: "Start Date",
916
+ startTime: "Start Time",
917
+ endDate: "End Date",
918
+ endTime: "End Time",
919
+ prevYear: "Previous Year",
920
+ nextYear: "Next Year",
921
+ prevMonth: "Previous Month",
922
+ nextMonth: "Next Month",
923
+ year: "",
924
+ month1: "January",
925
+ month2: "February",
926
+ month3: "March",
927
+ month4: "April",
928
+ month5: "May",
929
+ month6: "June",
930
+ month7: "July",
931
+ month8: "August",
932
+ month9: "September",
933
+ month10: "October",
934
+ month11: "November",
935
+ month12: "December",
936
+ weeks: {
937
+ sun: "Sun",
938
+ mon: "Mon",
939
+ tue: "Tue",
940
+ wed: "Wed",
941
+ thu: "Thu",
942
+ fri: "Fri",
943
+ sat: "Sat"
944
+ },
945
+ weeksFull: {
946
+ sun: "Sunday",
947
+ mon: "Monday",
948
+ tue: "Tuesday",
949
+ wed: "Wednesday",
950
+ thu: "Thursday",
951
+ fri: "Friday",
952
+ sat: "Saturday"
953
+ },
954
+ months: {
955
+ jan: "Jan",
956
+ feb: "Feb",
957
+ mar: "Mar",
958
+ apr: "Apr",
959
+ may: "May",
960
+ jun: "Jun",
961
+ jul: "Jul",
962
+ aug: "Aug",
963
+ sep: "Sep",
964
+ oct: "Oct",
965
+ nov: "Nov",
966
+ dec: "Dec"
967
+ }
968
+ },
969
+ inputNumber: {
970
+ decrease: "decrease number",
971
+ increase: "increase number"
972
+ },
973
+ select: {
974
+ loading: "Loading",
975
+ noMatch: "No matching data",
976
+ noData: "No data",
977
+ placeholder: "Select"
978
+ },
979
+ mention: { loading: "Loading" },
980
+ dropdown: { toggleDropdown: "Toggle Dropdown" },
981
+ cascader: {
982
+ noMatch: "No matching data",
983
+ loading: "Loading",
984
+ placeholder: "Select",
985
+ noData: "No data"
986
+ },
987
+ pagination: {
988
+ goto: "Go to",
989
+ pagesize: "/page",
990
+ total: "Total {total}",
991
+ pageClassifier: "",
992
+ page: "Page",
993
+ prev: "Go to previous page",
994
+ next: "Go to next page",
995
+ currentPage: "page {pager}",
996
+ prevPages: "Previous {pager} pages",
997
+ nextPages: "Next {pager} pages",
998
+ deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
999
+ },
1000
+ dialog: { close: "Close this dialog" },
1001
+ drawer: { close: "Close this dialog" },
1002
+ messagebox: {
1003
+ title: "Message",
1004
+ confirm: "OK",
1005
+ cancel: "Cancel",
1006
+ error: "Illegal input",
1007
+ close: "Close this dialog"
1008
+ },
1009
+ upload: {
1010
+ deleteTip: "press delete to remove",
1011
+ delete: "Delete",
1012
+ preview: "Preview",
1013
+ continue: "Continue"
1014
+ },
1015
+ slider: {
1016
+ defaultLabel: "slider between {min} and {max}",
1017
+ defaultRangeStartLabel: "pick start value",
1018
+ defaultRangeEndLabel: "pick end value"
1019
+ },
1020
+ table: {
1021
+ emptyText: "No Data",
1022
+ confirmFilter: "Confirm",
1023
+ resetFilter: "Reset",
1024
+ clearFilter: "All",
1025
+ sumText: "Sum",
1026
+ selectAllLabel: "Select all rows",
1027
+ selectRowLabel: "Select this row",
1028
+ expandRowLabel: "Expand this row",
1029
+ collapseRowLabel: "Collapse this row",
1030
+ sortLabel: "Sort by {column}",
1031
+ filterLabel: "Filter by {column}"
1032
+ },
1033
+ tag: { close: "Close this tag" },
1034
+ tour: {
1035
+ next: "Next",
1036
+ previous: "Previous",
1037
+ finish: "Finish",
1038
+ close: "Close this dialog"
1039
+ },
1040
+ tree: { emptyText: "No Data" },
1041
+ transfer: {
1042
+ noMatch: "No matching data",
1043
+ noData: "No data",
1044
+ titles: ["List 1", "List 2"],
1045
+ filterPlaceholder: "Enter keyword",
1046
+ noCheckedFormat: "{total} items",
1047
+ hasCheckedFormat: "{checked}/{total} checked"
1048
+ },
1049
+ image: { error: "FAILED" },
1050
+ pageHeader: { title: "Back" },
1051
+ popconfirm: {
1052
+ confirmButtonText: "Yes",
1053
+ cancelButtonText: "No"
1054
+ },
1055
+ carousel: {
1056
+ leftArrow: "Carousel arrow left",
1057
+ rightArrow: "Carousel arrow right",
1058
+ indicator: "Carousel switch to index {index}"
1059
+ }
1060
+ }
1061
+ };
1062
+ const _a = (e) => (t, n) => wa(t, n, O(e)), wa = (e, t, n) => Bo(n, e, e).replace(/\{(\w+)\}/g, (r, s) => `${(t == null ? void 0 : t[s]) ?? `{${s}}`}`), ba = (e) => ({
1063
+ lang: S(() => O(e).name),
1064
+ locale: yr(e) ? e : T(e),
1065
+ t: _a(e)
1066
+ }), Wn = Symbol("localeContextKey"), xa = (e) => {
1067
+ const t = e || Ve(Wn, T());
1068
+ return ba(S(() => t.value || ya));
1069
+ }, lt = "el", La = "is-", Ee = (e, t, n, r, s) => {
1070
+ let o = `${e}-${t}`;
1071
+ return n && (o += `-${n}`), r && (o += `__${r}`), s && (o += `--${s}`), o;
1072
+ }, Zn = Symbol("namespaceContextKey"), Ca = (e) => {
1073
+ const t = e || (Ge() ? Ve(Zn, T(lt)) : T(lt));
1074
+ return S(() => O(t) || lt);
1075
+ }, Kt = (e, t) => {
1076
+ const n = Ca(t);
1077
+ return {
1078
+ namespace: n,
1079
+ b: (h = "") => Ee(n.value, e, h, "", ""),
1080
+ e: (h) => h ? Ee(n.value, e, "", h, "") : "",
1081
+ m: (h) => h ? Ee(n.value, e, "", "", h) : "",
1082
+ be: (h, w) => h && w ? Ee(n.value, e, h, w, "") : "",
1083
+ em: (h, w) => h && w ? Ee(n.value, e, "", h, w) : "",
1084
+ bm: (h, w) => h && w ? Ee(n.value, e, h, "", w) : "",
1085
+ bem: (h, w, I) => h && w && I ? Ee(n.value, e, h, w, I) : "",
1086
+ is: (h, ...w) => {
1087
+ const I = w.length >= 1 ? w[0] : !0;
1088
+ return h && I ? `${La}${h}` : "";
1089
+ },
1090
+ cssVar: (h) => {
1091
+ const w = {};
1092
+ for (const I in h) h[I] && (w[`--${n.value}-${I}`] = h[I]);
1093
+ return w;
1094
+ },
1095
+ cssVarName: (h) => `--${n.value}-${h}`,
1096
+ cssVarBlock: (h) => {
1097
+ const w = {};
1098
+ for (const I in h) h[I] && (w[`--${n.value}-${e}-${I}`] = h[I]);
1099
+ return w;
1100
+ },
1101
+ cssVarBlockName: (h) => `--${n.value}-${e}-${h}`
1102
+ };
1103
+ }, gn = { current: 0 }, yn = T(0), Kn = 2e3, _n = Symbol("elZIndexContextKey"), Jn = Symbol("zIndexContextKey"), Sa = (e) => {
1104
+ const t = Ge() ? Ve(_n, gn) : gn, n = e || (Ge() ? Ve(Jn, void 0) : void 0), r = S(() => {
1105
+ const a = O(n);
1106
+ return ke(a) ? a : Kn;
1107
+ }), s = S(() => r.value + yn.value), o = () => (t.current++, yn.value = t.current, s.value);
1108
+ return !Te && !Ve(_n) && Je("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
1109
+ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`), {
1110
+ initialZIndex: r,
1111
+ currentZIndex: s,
1112
+ nextZIndex: o
1113
+ };
1114
+ }, Ma = qn({
1115
+ type: String,
1116
+ values: Ir,
1117
+ required: !1
1118
+ }), Aa = Symbol("size");
1119
+ const Ta = Symbol("emptyValuesContextKey");
1120
+ const Ea = Ke({
1121
+ emptyValues: Array,
1122
+ valueOnClear: {
1123
+ type: ee([
1124
+ String,
1125
+ Number,
1126
+ Boolean,
1127
+ Function
1128
+ ]),
1129
+ default: void 0,
1130
+ validator: (e) => (e = nt(e) ? e() : e, Pn(e) ? e.every((t) => !t) : !e)
1131
+ }
1132
+ });
1133
+ const Oa = (e) => {
1134
+ const t = e.props, n = Pn(t) ? Hn(t.map((r) => [r, {}])) : t;
1135
+ e.setPropsDefaults = (r) => {
1136
+ if (n) {
1137
+ for (const [s, o] of Object.entries(r)) {
1138
+ const a = n[s];
1139
+ if (ft(n, s)) {
1140
+ if (Wo(a)) {
1141
+ n[s] = {
1142
+ ...a,
1143
+ default: o
1144
+ };
1145
+ continue;
1146
+ }
1147
+ n[s] = {
1148
+ type: a,
1149
+ default: o
1150
+ };
1151
+ }
1152
+ }
1153
+ e.props = n;
1154
+ }
1155
+ };
1156
+ }, Yn = (e, t) => {
1157
+ if (e.install = (n) => {
1158
+ for (const r of [e, ...Object.values(t ?? {})]) n.component(r.name, r);
1159
+ }, t) for (const [n, r] of Object.entries(t)) e[n] = r;
1160
+ return Oa(e), e;
1161
+ }, Xn = (e, t) => (e.install = (n) => {
1162
+ e._context = n._context, n.config.globalProperties[t] = e;
1163
+ }, e);
1164
+ /*! Element Plus Icons Vue v2.3.2 */
1165
+ var Pa = /* @__PURE__ */ pe({
1166
+ name: "CircleCloseFilled",
1167
+ __name: "circle-close-filled",
1168
+ setup(e) {
1169
+ return (t, n) => (N(), W("svg", {
1170
+ xmlns: "http://www.w3.org/2000/svg",
1171
+ viewBox: "0 0 1024 1024"
1172
+ }, [
1173
+ D("path", {
1174
+ fill: "currentColor",
1175
+ d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"
1176
+ })
1177
+ ]));
1178
+ }
1179
+ }), Qn = Pa;
1180
+ var za = /* @__PURE__ */ pe({
1181
+ name: "Close",
1182
+ __name: "close",
1183
+ setup(e) {
1184
+ return (t, n) => (N(), W("svg", {
1185
+ xmlns: "http://www.w3.org/2000/svg",
1186
+ viewBox: "0 0 1024 1024"
1187
+ }, [
1188
+ D("path", {
1189
+ fill: "currentColor",
1190
+ d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
1191
+ })
1192
+ ]));
1193
+ }
1194
+ }), er = za;
1195
+ var ka = /* @__PURE__ */ pe({
1196
+ name: "InfoFilled",
1197
+ __name: "info-filled",
1198
+ setup(e) {
1199
+ return (t, n) => (N(), W("svg", {
1200
+ xmlns: "http://www.w3.org/2000/svg",
1201
+ viewBox: "0 0 1024 1024"
1202
+ }, [
1203
+ D("path", {
1204
+ fill: "currentColor",
1205
+ d: "M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"
1206
+ })
1207
+ ]));
1208
+ }
1209
+ }), Bt = ka;
1210
+ var Ia = /* @__PURE__ */ pe({
1211
+ name: "SuccessFilled",
1212
+ __name: "success-filled",
1213
+ setup(e) {
1214
+ return (t, n) => (N(), W("svg", {
1215
+ xmlns: "http://www.w3.org/2000/svg",
1216
+ viewBox: "0 0 1024 1024"
1217
+ }, [
1218
+ D("path", {
1219
+ fill: "currentColor",
1220
+ d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"
1221
+ })
1222
+ ]));
1223
+ }
1224
+ }), tr = Ia;
1225
+ var $a = /* @__PURE__ */ pe({
1226
+ name: "WarningFilled",
1227
+ __name: "warning-filled",
1228
+ setup(e) {
1229
+ return (t, n) => (N(), W("svg", {
1230
+ xmlns: "http://www.w3.org/2000/svg",
1231
+ viewBox: "0 0 1024 1024"
1232
+ }, [
1233
+ D("path", {
1234
+ fill: "currentColor",
1235
+ d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"
1236
+ })
1237
+ ]));
1238
+ }
1239
+ }), nr = $a;
1240
+ const Vt = ee([
1241
+ String,
1242
+ Object,
1243
+ Function
1244
+ ]);
1245
+ const Da = {
1246
+ Close: er,
1247
+ SuccessFilled: tr,
1248
+ InfoFilled: Bt,
1249
+ WarningFilled: nr,
1250
+ CircleCloseFilled: Qn
1251
+ }, dt = {
1252
+ primary: Bt,
1253
+ success: tr,
1254
+ warning: nr,
1255
+ error: Qn,
1256
+ info: Bt
1257
+ };
1258
+ const Ra = Ke({
1259
+ size: { type: ee([Number, String]) },
1260
+ color: { type: String }
1261
+ });
1262
+ var Na = /* @__PURE__ */ pe({
1263
+ name: "ElIcon",
1264
+ inheritAttrs: !1,
1265
+ __name: "icon",
1266
+ props: Ra,
1267
+ setup(e) {
1268
+ const t = e, n = Kt("icon"), r = S(() => {
1269
+ const { size: s, color: o } = t, a = jt(s);
1270
+ return !a && !o ? {} : {
1271
+ fontSize: a,
1272
+ "--color": o
1273
+ };
1274
+ });
1275
+ return (s, o) => (N(), W("i", wr({
1276
+ class: O(n).b(),
1277
+ style: r.value
1278
+ }, s.$attrs), [qe(s.$slots, "default")], 16));
1279
+ }
1280
+ }), ja = Na;
1281
+ const pt = Yn(ja), Ba = (e) => e, Va = Ke({
1282
+ value: {
1283
+ type: [String, Number],
1284
+ default: ""
1285
+ },
1286
+ max: {
1287
+ type: Number,
1288
+ default: 99
1289
+ },
1290
+ isDot: Boolean,
1291
+ hidden: Boolean,
1292
+ type: {
1293
+ type: String,
1294
+ values: [
1295
+ "primary",
1296
+ "success",
1297
+ "warning",
1298
+ "info",
1299
+ "danger"
1300
+ ],
1301
+ default: "danger"
1302
+ },
1303
+ showZero: {
1304
+ type: Boolean,
1305
+ default: !0
1306
+ },
1307
+ color: String,
1308
+ badgeStyle: { type: ee([
1309
+ String,
1310
+ Object,
1311
+ Array
1312
+ ]) },
1313
+ offset: {
1314
+ type: ee(Array),
1315
+ default: () => [0, 0]
1316
+ },
1317
+ badgeClass: { type: String }
1318
+ });
1319
+ var Fa = /* @__PURE__ */ pe({
1320
+ name: "ElBadge",
1321
+ __name: "badge",
1322
+ props: Va,
1323
+ setup(e, { expose: t }) {
1324
+ const n = e, r = Kt("badge"), s = S(() => n.isDot ? "" : ke(n.value) && ke(n.max) ? n.max < n.value ? `${n.max}+` : `${n.value}` : `${n.value}`), o = S(() => [{
1325
+ backgroundColor: n.color,
1326
+ marginRight: jt(-n.offset[0]),
1327
+ marginTop: jt(n.offset[1])
1328
+ }, n.badgeStyle ?? {}]);
1329
+ return t({ content: s }), (a, i) => (N(), W("div", { class: J(O(r).b()) }, [qe(a.$slots, "default"), ce(Ht, { name: `${O(r).namespace.value}-zoom-in-center` }, {
1330
+ default: Pe(() => [!e.hidden && (s.value || e.isDot || a.$slots.content) ? (N(), W("sup", {
1331
+ key: 0,
1332
+ class: J([
1333
+ O(r).e("content"),
1334
+ O(r).em("content", e.type),
1335
+ O(r).is("fixed", !!a.$slots.default),
1336
+ O(r).is("dot", e.isDot),
1337
+ O(r).is("hide-zero", !e.showZero && e.value === 0),
1338
+ e.badgeClass
1339
+ ]),
1340
+ style: Qe(o.value)
1341
+ }, [qe(a.$slots, "content", { value: s.value }, () => [br(et(s.value), 1)])], 6)) : ae("v-if", !0)]),
1342
+ _: 3
1343
+ }, 8, ["name"])], 2));
1344
+ }
1345
+ }), Ha = Fa;
1346
+ const Ua = Yn(Ha), rr = Symbol(), ht = T();
1347
+ function sr(e, t = void 0) {
1348
+ const n = Ge() ? Ve(rr, ht) : ht;
1349
+ return e ? S(() => {
1350
+ var r;
1351
+ return ((r = n.value) == null ? void 0 : r[e]) ?? t;
1352
+ }) : n;
1353
+ }
1354
+ function or(e, t) {
1355
+ const n = sr(), r = Kt(e, S(() => {
1356
+ var i;
1357
+ return ((i = n.value) == null ? void 0 : i.namespace) || lt;
1358
+ })), s = xa(S(() => {
1359
+ var i;
1360
+ return (i = n.value) == null ? void 0 : i.locale;
1361
+ })), o = Sa(S(() => {
1362
+ var i;
1363
+ return ((i = n.value) == null ? void 0 : i.zIndex) || Kn;
1364
+ })), a = S(() => {
1365
+ var i;
1366
+ return O(t) || ((i = n.value) == null ? void 0 : i.size) || "";
1367
+ });
1368
+ return ar(S(() => O(n) || {})), {
1369
+ ns: r,
1370
+ locale: s,
1371
+ zIndex: o,
1372
+ size: a
1373
+ };
1374
+ }
1375
+ const ar = (e, t, n = !1) => {
1376
+ const r = !!Ge(), s = r ? sr() : void 0, o = r ? xr : void 0;
1377
+ if (!o) {
1378
+ Je("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup().");
1379
+ return;
1380
+ }
1381
+ const a = S(() => {
1382
+ const i = O(e);
1383
+ return s != null && s.value ? Ga(s.value, i) : i;
1384
+ });
1385
+ return o(rr, a), o(Wn, S(() => a.value.locale)), o(Zn, S(() => a.value.namespace)), o(Jn, S(() => a.value.zIndex)), o(Aa, { size: S(() => a.value.size || "") }), o(Ta, S(() => ({
1386
+ emptyValues: a.value.emptyValues,
1387
+ valueOnClear: a.value.valueOnClear
1388
+ }))), (n || !ht.value) && (ht.value = a.value), a;
1389
+ }, Ga = (e, t) => {
1390
+ const n = [.../* @__PURE__ */ new Set([...vn(e), ...vn(t)])], r = {};
1391
+ for (const s of n) r[s] = t[s] !== void 0 ? t[s] : e[s];
1392
+ return r;
1393
+ }, qa = Ke({
1394
+ a11y: {
1395
+ type: Boolean,
1396
+ default: !0
1397
+ },
1398
+ locale: { type: ee(Object) },
1399
+ size: Ma,
1400
+ button: { type: ee(Object) },
1401
+ card: { type: ee(Object) },
1402
+ dialog: { type: ee(Object) },
1403
+ link: { type: ee(Object) },
1404
+ experimentalFeatures: { type: ee(Object) },
1405
+ keyboardNavigation: {
1406
+ type: Boolean,
1407
+ default: !0
1408
+ },
1409
+ message: { type: ee(Object) },
1410
+ zIndex: Number,
1411
+ namespace: {
1412
+ type: String,
1413
+ default: "el"
1414
+ },
1415
+ table: { type: ee(Object) },
1416
+ ...Ea
1417
+ }), oe = { placement: "top" }, Bl = pe({
1418
+ name: "ElConfigProvider",
1419
+ props: qa,
1420
+ setup(e, { slots: t }) {
1421
+ const n = ar(e);
1422
+ return be(() => e.message, (r) => {
1423
+ var s;
1424
+ Object.assign(oe, ((s = n == null ? void 0 : n.value) == null ? void 0 : s.message) ?? {}, r ?? {});
1425
+ }, {
1426
+ immediate: !0,
1427
+ deep: !0
1428
+ }), () => qe(t, "default", { config: n == null ? void 0 : n.value });
1429
+ }
1430
+ });
1431
+ var Wa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
1432
+ var ir = { exports: {} };
1433
+ (function(e, t) {
1434
+ (function(n, r) {
1435
+ e.exports = r();
1436
+ })(Wa, function() {
1437
+ var n = 1e3, r = 6e4, s = 36e5, o = "millisecond", a = "second", i = "minute", l = "hour", u = "day", d = "week", f = "month", c = "quarter", p = "year", m = "date", h = "Invalid Date", w = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, I = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(b) {
1438
+ var g = ["th", "st", "nd", "rd"], v = b % 100;
1439
+ return "[" + b + (g[(v - 20) % 10] || g[v] || g[0]) + "]";
1440
+ } }, P = function(b, g, v) {
1441
+ var C = String(b);
1442
+ return !C || C.length >= g ? b : "" + Array(g + 1 - C.length).join(v) + b;
1443
+ }, B = { s: P, z: function(b) {
1444
+ var g = -b.utcOffset(), v = Math.abs(g), C = Math.floor(v / 60), y = v % 60;
1445
+ return (g <= 0 ? "+" : "-") + P(C, 2, "0") + ":" + P(y, 2, "0");
1446
+ }, m: function b(g, v) {
1447
+ if (g.date() < v.date()) return -b(v, g);
1448
+ var C = 12 * (v.year() - g.year()) + (v.month() - g.month()), y = g.clone().add(C, f), A = v - y < 0, k = g.clone().add(C + (A ? -1 : 1), f);
1449
+ return +(-(C + (v - y) / (A ? y - k : k - y)) || 0);
1450
+ }, a: function(b) {
1451
+ return b < 0 ? Math.ceil(b) || 0 : Math.floor(b);
1452
+ }, p: function(b) {
1453
+ return { M: f, y: p, w: d, d: u, D: m, h: l, m: i, s: a, ms: o, Q: c }[b] || String(b || "").toLowerCase().replace(/s$/, "");
1454
+ }, u: function(b) {
1455
+ return b === void 0;
1456
+ } }, Z = "en", X = {};
1457
+ X[Z] = M;
1458
+ var Y = "$isDayjsObject", ue = function(b) {
1459
+ return b instanceof he || !(!b || !b[Y]);
1460
+ }, fe = function b(g, v, C) {
1461
+ var y;
1462
+ if (!g) return Z;
1463
+ if (typeof g == "string") {
1464
+ var A = g.toLowerCase();
1465
+ X[A] && (y = A), v && (X[A] = v, y = A);
1466
+ var k = g.split("-");
1467
+ if (!y && k.length > 1) return b(k[0]);
1468
+ } else {
1469
+ var j = g.name;
1470
+ X[j] = g, y = j;
1471
+ }
1472
+ return !C && y && (Z = y), y || !C && Z;
1473
+ }, F = function(b, g) {
1474
+ if (ue(b)) return b.clone();
1475
+ var v = typeof g == "object" ? g : {};
1476
+ return v.date = b, v.args = arguments, new he(v);
1477
+ }, R = B;
1478
+ R.l = fe, R.i = ue, R.w = function(b, g) {
1479
+ return F(b, { locale: g.$L, utc: g.$u, x: g.$x, $offset: g.$offset });
1480
+ };
1481
+ var he = function() {
1482
+ function b(v) {
1483
+ this.$L = fe(v.locale, null, !0), this.parse(v), this.$x = this.$x || v.x || {}, this[Y] = !0;
1484
+ }
1485
+ var g = b.prototype;
1486
+ return g.parse = function(v) {
1487
+ this.$d = function(C) {
1488
+ var y = C.date, A = C.utc;
1489
+ if (y === null) return /* @__PURE__ */ new Date(NaN);
1490
+ if (R.u(y)) return /* @__PURE__ */ new Date();
1491
+ if (y instanceof Date) return new Date(y);
1492
+ if (typeof y == "string" && !/Z$/i.test(y)) {
1493
+ var k = y.match(w);
1494
+ if (k) {
1495
+ var j = k[2] - 1 || 0, G = (k[7] || "0").substring(0, 3);
1496
+ return A ? new Date(Date.UTC(k[1], j, k[3] || 1, k[4] || 0, k[5] || 0, k[6] || 0, G)) : new Date(k[1], j, k[3] || 1, k[4] || 0, k[5] || 0, k[6] || 0, G);
1497
+ }
1498
+ }
1499
+ return new Date(y);
1500
+ }(v), this.init();
1501
+ }, g.init = function() {
1502
+ var v = this.$d;
1503
+ this.$y = v.getFullYear(), this.$M = v.getMonth(), this.$D = v.getDate(), this.$W = v.getDay(), this.$H = v.getHours(), this.$m = v.getMinutes(), this.$s = v.getSeconds(), this.$ms = v.getMilliseconds();
1504
+ }, g.$utils = function() {
1505
+ return R;
1506
+ }, g.isValid = function() {
1507
+ return this.$d.toString() !== h;
1508
+ }, g.isSame = function(v, C) {
1509
+ var y = F(v);
1510
+ return this.startOf(C) <= y && y <= this.endOf(C);
1511
+ }, g.isAfter = function(v, C) {
1512
+ return F(v) < this.startOf(C);
1513
+ }, g.isBefore = function(v, C) {
1514
+ return this.endOf(C) < F(v);
1515
+ }, g.$g = function(v, C, y) {
1516
+ return R.u(v) ? this[C] : this.set(y, v);
1517
+ }, g.unix = function() {
1518
+ return Math.floor(this.valueOf() / 1e3);
1519
+ }, g.valueOf = function() {
1520
+ return this.$d.getTime();
1521
+ }, g.startOf = function(v, C) {
1522
+ var y = this, A = !!R.u(C) || C, k = R.p(v), j = function(ie, re) {
1523
+ var _e = R.w(y.$u ? Date.UTC(y.$y, re, ie) : new Date(y.$y, re, ie), y);
1524
+ return A ? _e : _e.endOf(u);
1525
+ }, G = function(ie, re) {
1526
+ return R.w(y.toDate()[ie].apply(y.toDate("s"), (A ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(re)), y);
1527
+ }, H = this.$W, K = this.$M, te = this.$D, ge = "set" + (this.$u ? "UTC" : "");
1528
+ switch (k) {
1529
+ case p:
1530
+ return A ? j(1, 0) : j(31, 11);
1531
+ case f:
1532
+ return A ? j(1, K) : j(0, K + 1);
1533
+ case d:
1534
+ var de = this.$locale().weekStart || 0, ye = (H < de ? H + 7 : H) - de;
1535
+ return j(A ? te - ye : te + (6 - ye), K);
1536
+ case u:
1537
+ case m:
1538
+ return G(ge + "Hours", 0);
1539
+ case l:
1540
+ return G(ge + "Minutes", 1);
1541
+ case i:
1542
+ return G(ge + "Seconds", 2);
1543
+ case a:
1544
+ return G(ge + "Milliseconds", 3);
1545
+ default:
1546
+ return this.clone();
1547
+ }
1548
+ }, g.endOf = function(v) {
1549
+ return this.startOf(v, !1);
1550
+ }, g.$set = function(v, C) {
1551
+ var y, A = R.p(v), k = "set" + (this.$u ? "UTC" : ""), j = (y = {}, y[u] = k + "Date", y[m] = k + "Date", y[f] = k + "Month", y[p] = k + "FullYear", y[l] = k + "Hours", y[i] = k + "Minutes", y[a] = k + "Seconds", y[o] = k + "Milliseconds", y)[A], G = A === u ? this.$D + (C - this.$W) : C;
1552
+ if (A === f || A === p) {
1553
+ var H = this.clone().set(m, 1);
1554
+ H.$d[j](G), H.init(), this.$d = H.set(m, Math.min(this.$D, H.daysInMonth())).$d;
1555
+ } else j && this.$d[j](G);
1556
+ return this.init(), this;
1557
+ }, g.set = function(v, C) {
1558
+ return this.clone().$set(v, C);
1559
+ }, g.get = function(v) {
1560
+ return this[R.p(v)]();
1561
+ }, g.add = function(v, C) {
1562
+ var y, A = this;
1563
+ v = Number(v);
1564
+ var k = R.p(C), j = function(K) {
1565
+ var te = F(A);
1566
+ return R.w(te.date(te.date() + Math.round(K * v)), A);
1567
+ };
1568
+ if (k === f) return this.set(f, this.$M + v);
1569
+ if (k === p) return this.set(p, this.$y + v);
1570
+ if (k === u) return j(1);
1571
+ if (k === d) return j(7);
1572
+ var G = (y = {}, y[i] = r, y[l] = s, y[a] = n, y)[k] || 1, H = this.$d.getTime() + v * G;
1573
+ return R.w(H, this);
1574
+ }, g.subtract = function(v, C) {
1575
+ return this.add(-1 * v, C);
1576
+ }, g.format = function(v) {
1577
+ var C = this, y = this.$locale();
1578
+ if (!this.isValid()) return y.invalidDate || h;
1579
+ var A = v || "YYYY-MM-DDTHH:mm:ssZ", k = R.z(this), j = this.$H, G = this.$m, H = this.$M, K = y.weekdays, te = y.months, ge = y.meridiem, de = function(re, _e, me, x) {
1580
+ return re && (re[_e] || re(C, A)) || me[_e].slice(0, x);
1581
+ }, ye = function(re) {
1582
+ return R.s(j % 12 || 12, re, "0");
1583
+ }, ie = ge || function(re, _e, me) {
1584
+ var x = re < 12 ? "AM" : "PM";
1585
+ return me ? x.toLowerCase() : x;
1586
+ };
1587
+ return A.replace(I, function(re, _e) {
1588
+ return _e || function(me) {
1589
+ switch (me) {
1590
+ case "YY":
1591
+ return String(C.$y).slice(-2);
1592
+ case "YYYY":
1593
+ return R.s(C.$y, 4, "0");
1594
+ case "M":
1595
+ return H + 1;
1596
+ case "MM":
1597
+ return R.s(H + 1, 2, "0");
1598
+ case "MMM":
1599
+ return de(y.monthsShort, H, te, 3);
1600
+ case "MMMM":
1601
+ return de(te, H);
1602
+ case "D":
1603
+ return C.$D;
1604
+ case "DD":
1605
+ return R.s(C.$D, 2, "0");
1606
+ case "d":
1607
+ return String(C.$W);
1608
+ case "dd":
1609
+ return de(y.weekdaysMin, C.$W, K, 2);
1610
+ case "ddd":
1611
+ return de(y.weekdaysShort, C.$W, K, 3);
1612
+ case "dddd":
1613
+ return K[C.$W];
1614
+ case "H":
1615
+ return String(j);
1616
+ case "HH":
1617
+ return R.s(j, 2, "0");
1618
+ case "h":
1619
+ return ye(1);
1620
+ case "hh":
1621
+ return ye(2);
1622
+ case "a":
1623
+ return ie(j, G, !0);
1624
+ case "A":
1625
+ return ie(j, G, !1);
1626
+ case "m":
1627
+ return String(G);
1628
+ case "mm":
1629
+ return R.s(G, 2, "0");
1630
+ case "s":
1631
+ return String(C.$s);
1632
+ case "ss":
1633
+ return R.s(C.$s, 2, "0");
1634
+ case "SSS":
1635
+ return R.s(C.$ms, 3, "0");
1636
+ case "Z":
1637
+ return k;
1638
+ }
1639
+ return null;
1640
+ }(re) || k.replace(":", "");
1641
+ });
1642
+ }, g.utcOffset = function() {
1643
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1644
+ }, g.diff = function(v, C, y) {
1645
+ var A, k = this, j = R.p(C), G = F(v), H = (G.utcOffset() - this.utcOffset()) * r, K = this - G, te = function() {
1646
+ return R.m(k, G);
1647
+ };
1648
+ switch (j) {
1649
+ case p:
1650
+ A = te() / 12;
1651
+ break;
1652
+ case f:
1653
+ A = te();
1654
+ break;
1655
+ case c:
1656
+ A = te() / 3;
1657
+ break;
1658
+ case d:
1659
+ A = (K - H) / 6048e5;
1660
+ break;
1661
+ case u:
1662
+ A = (K - H) / 864e5;
1663
+ break;
1664
+ case l:
1665
+ A = K / s;
1666
+ break;
1667
+ case i:
1668
+ A = K / r;
1669
+ break;
1670
+ case a:
1671
+ A = K / n;
1672
+ break;
1673
+ default:
1674
+ A = K;
1675
+ }
1676
+ return y ? A : R.a(A);
1677
+ }, g.daysInMonth = function() {
1678
+ return this.endOf(f).$D;
1679
+ }, g.$locale = function() {
1680
+ return X[this.$L];
1681
+ }, g.locale = function(v, C) {
1682
+ if (!v) return this.$L;
1683
+ var y = this.clone(), A = fe(v, C, !0);
1684
+ return A && (y.$L = A), y;
1685
+ }, g.clone = function() {
1686
+ return R.w(this.$d, this);
1687
+ }, g.toDate = function() {
1688
+ return new Date(this.valueOf());
1689
+ }, g.toJSON = function() {
1690
+ return this.isValid() ? this.toISOString() : null;
1691
+ }, g.toISOString = function() {
1692
+ return this.$d.toISOString();
1693
+ }, g.toString = function() {
1694
+ return this.$d.toUTCString();
1695
+ }, b;
1696
+ }(), z = he.prototype;
1697
+ return F.prototype = z, [["$ms", o], ["$s", a], ["$m", i], ["$H", l], ["$W", u], ["$M", f], ["$y", p], ["$D", m]].forEach(function(b) {
1698
+ z[b[1]] = function(g) {
1699
+ return this.$g(g, b[0], b[1]);
1700
+ };
1701
+ }), F.extend = function(b, g) {
1702
+ return b.$i || (b(g, he, F), b.$i = !0), F;
1703
+ }, F.locale = fe, F.isDayjs = ue, F.unix = function(b) {
1704
+ return F(1e3 * b);
1705
+ }, F.en = X[Z], F.Ls = X, F.p = {}, F;
1706
+ });
1707
+ })(ir);
1708
+ var Vl = ir.exports;
1709
+ const lr = [
1710
+ "primary",
1711
+ "success",
1712
+ "info",
1713
+ "warning",
1714
+ "error"
1715
+ ], cr = [
1716
+ "top",
1717
+ "top-left",
1718
+ "top-right",
1719
+ "bottom",
1720
+ "bottom-left",
1721
+ "bottom-right"
1722
+ ], Ue = "top", se = Ba({
1723
+ customClass: "",
1724
+ dangerouslyUseHTMLString: !1,
1725
+ duration: 3e3,
1726
+ icon: void 0,
1727
+ id: "",
1728
+ message: "",
1729
+ onClose: void 0,
1730
+ showClose: !1,
1731
+ type: "info",
1732
+ plain: !1,
1733
+ offset: 16,
1734
+ placement: void 0,
1735
+ zIndex: 0,
1736
+ grouping: !1,
1737
+ repeatNum: 1,
1738
+ appendTo: Te ? document.body : void 0
1739
+ }), Za = Ke({
1740
+ customClass: {
1741
+ type: String,
1742
+ default: se.customClass
1743
+ },
1744
+ dangerouslyUseHTMLString: {
1745
+ type: Boolean,
1746
+ default: se.dangerouslyUseHTMLString
1747
+ },
1748
+ duration: {
1749
+ type: Number,
1750
+ default: se.duration
1751
+ },
1752
+ icon: {
1753
+ type: Vt,
1754
+ default: se.icon
1755
+ },
1756
+ id: {
1757
+ type: String,
1758
+ default: se.id
1759
+ },
1760
+ message: {
1761
+ type: ee([
1762
+ String,
1763
+ Object,
1764
+ Function
1765
+ ]),
1766
+ default: se.message
1767
+ },
1768
+ onClose: {
1769
+ type: ee(Function),
1770
+ default: se.onClose
1771
+ },
1772
+ showClose: {
1773
+ type: Boolean,
1774
+ default: se.showClose
1775
+ },
1776
+ type: {
1777
+ type: String,
1778
+ values: lr,
1779
+ default: se.type
1780
+ },
1781
+ plain: {
1782
+ type: Boolean,
1783
+ default: se.plain
1784
+ },
1785
+ offset: {
1786
+ type: Number,
1787
+ default: se.offset
1788
+ },
1789
+ placement: {
1790
+ type: String,
1791
+ values: cr,
1792
+ default: se.placement
1793
+ },
1794
+ zIndex: {
1795
+ type: Number,
1796
+ default: se.zIndex
1797
+ },
1798
+ grouping: {
1799
+ type: Boolean,
1800
+ default: se.grouping
1801
+ },
1802
+ repeatNum: {
1803
+ type: Number,
1804
+ default: se.repeatNum
1805
+ }
1806
+ }), Ka = { destroy: () => !0 }, ve = xn({}), Ja = (e) => (ve[e] || (ve[e] = xn([])), ve[e]), Ya = (e, t) => {
1807
+ const n = ve[t] || [], r = n.findIndex((a) => a.id === e), s = n[r];
1808
+ let o;
1809
+ return r > 0 && (o = n[r - 1]), {
1810
+ current: s,
1811
+ prev: o
1812
+ };
1813
+ }, Xa = (e, t) => {
1814
+ const { prev: n } = Ya(e, t);
1815
+ return n ? n.vm.exposed.bottom.value : 0;
1816
+ }, Qa = (e, t, n) => (ve[n] || []).findIndex((r) => r.id === e) > 0 ? 16 : t, ei = ["id"], ti = ["innerHTML"];
1817
+ var ni = /* @__PURE__ */ pe({
1818
+ name: "ElMessage",
1819
+ __name: "message",
1820
+ props: Za,
1821
+ emits: Ka,
1822
+ setup(e, { expose: t, emit: n }) {
1823
+ const { Close: r } = Da, s = e, o = n, a = T(!1), { ns: i, zIndex: l } = or("message"), { currentZIndex: u, nextZIndex: d } = l, f = T(), c = T(!1), p = T(0);
1824
+ let m;
1825
+ const h = S(() => s.type ? s.type === "error" ? "danger" : s.type : "info"), w = S(() => {
1826
+ const z = s.type;
1827
+ return { [i.bm("icon", z)]: z && dt[z] };
1828
+ }), I = S(() => s.icon || dt[s.type] || ""), M = S(() => s.placement || Ue), P = S(() => Xa(s.id, M.value)), B = S(() => Math.max(Qa(s.id, s.offset, M.value) + P.value, s.offset)), Z = S(() => p.value + B.value), X = S(() => M.value.includes("left") ? i.is("left") : M.value.includes("right") ? i.is("right") : i.is("center")), Y = S(() => M.value.startsWith("top") ? "top" : "bottom"), ue = S(() => ({
1829
+ [Y.value]: `${B.value}px`,
1830
+ zIndex: u.value
1831
+ }));
1832
+ function fe() {
1833
+ s.duration !== 0 && ({ stop: m } = Tn(() => {
1834
+ R();
1835
+ }, s.duration));
1836
+ }
1837
+ function F() {
1838
+ m == null || m();
1839
+ }
1840
+ function R() {
1841
+ c.value = !1, ct(() => {
1842
+ var z;
1843
+ a.value || ((z = s.onClose) == null || z.call(s), o("destroy"));
1844
+ });
1845
+ }
1846
+ function he(z) {
1847
+ Un(z) === He.esc && R();
1848
+ }
1849
+ return yt(() => {
1850
+ fe(), d(), c.value = !0;
1851
+ }), be(() => s.repeatNum, () => {
1852
+ F(), fe();
1853
+ }), On(document, "keydown", he), Br(f, () => {
1854
+ p.value = f.value.getBoundingClientRect().height;
1855
+ }), t({
1856
+ visible: c,
1857
+ bottom: Z,
1858
+ close: R
1859
+ }), (z, b) => (N(), we(Ht, {
1860
+ name: O(i).b("fade"),
1861
+ onBeforeEnter: b[0] || (b[0] = (g) => a.value = !0),
1862
+ onBeforeLeave: e.onClose,
1863
+ onAfterLeave: b[1] || (b[1] = (g) => z.$emit("destroy")),
1864
+ persisted: ""
1865
+ }, {
1866
+ default: Pe(() => [Et(D("div", {
1867
+ id: e.id,
1868
+ ref_key: "messageRef",
1869
+ ref: f,
1870
+ class: J([
1871
+ O(i).b(),
1872
+ { [O(i).m(e.type)]: e.type },
1873
+ O(i).is("closable", e.showClose),
1874
+ O(i).is("plain", e.plain),
1875
+ O(i).is("bottom", Y.value === "bottom"),
1876
+ X.value,
1877
+ e.customClass
1878
+ ]),
1879
+ style: Qe(ue.value),
1880
+ role: "alert",
1881
+ onMouseenter: F,
1882
+ onMouseleave: fe
1883
+ }, [
1884
+ e.repeatNum > 1 ? (N(), we(O(Ua), {
1885
+ key: 0,
1886
+ value: e.repeatNum,
1887
+ type: h.value,
1888
+ class: J(O(i).e("badge"))
1889
+ }, null, 8, [
1890
+ "value",
1891
+ "type",
1892
+ "class"
1893
+ ])) : ae("v-if", !0),
1894
+ I.value ? (N(), we(O(pt), {
1895
+ key: 1,
1896
+ class: J([O(i).e("icon"), w.value])
1897
+ }, {
1898
+ default: Pe(() => [(N(), we(Ot(I.value)))]),
1899
+ _: 1
1900
+ }, 8, ["class"])) : ae("v-if", !0),
1901
+ qe(z.$slots, "default", {}, () => [e.dangerouslyUseHTMLString ? (N(), W(gt, { key: 1 }, [ae(" Caution here, message could've been compromised, never use user's input as message "), D("p", {
1902
+ class: J(O(i).e("content")),
1903
+ innerHTML: e.message
1904
+ }, null, 10, ti)], 2112)) : (N(), W("p", {
1905
+ key: 0,
1906
+ class: J(O(i).e("content"))
1907
+ }, et(e.message), 3))]),
1908
+ e.showClose ? (N(), we(O(pt), {
1909
+ key: 2,
1910
+ class: J(O(i).e("closeBtn")),
1911
+ onClick: Ln(R, ["stop"])
1912
+ }, {
1913
+ default: Pe(() => [ce(O(r))]),
1914
+ _: 1
1915
+ }, 8, ["class"])) : ae("v-if", !0)
1916
+ ], 46, ei), [[Pt, c.value]])]),
1917
+ _: 3
1918
+ }, 8, ["name", "onBeforeLeave"]));
1919
+ }
1920
+ }), ri = ni;
1921
+ let si = 1;
1922
+ const oi = (e) => {
1923
+ if (!e.appendTo) e.appendTo = document.body;
1924
+ else if (xe(e.appendTo)) {
1925
+ let t = document.querySelector(e.appendTo);
1926
+ Nt(t) || (Je("ElMessage", "the appendTo option is not an HTMLElement. Falling back to document.body."), t = document.body), e.appendTo = t;
1927
+ }
1928
+ }, ai = (e) => {
1929
+ !e.placement && xe(oe.placement) && oe.placement && (e.placement = oe.placement), e.placement || (e.placement = Ue), cr.includes(e.placement) || (Je("ElMessage", `Invalid placement: ${e.placement}. Falling back to '${Ue}'.`), e.placement = Ue);
1930
+ }, ur = (e) => {
1931
+ const t = !e || xe(e) || tt(e) || nt(e) ? { message: e } : e, n = {
1932
+ ...se,
1933
+ ...t
1934
+ };
1935
+ return oi(n), ai(n), Mt(oe.grouping) && !n.grouping && (n.grouping = oe.grouping), ke(oe.duration) && n.duration === 3e3 && (n.duration = oe.duration), ke(oe.offset) && n.offset === 16 && (n.offset = oe.offset), Mt(oe.showClose) && !n.showClose && (n.showClose = oe.showClose), Mt(oe.plain) && !n.plain && (n.plain = oe.plain), n;
1936
+ }, ii = (e) => {
1937
+ const t = ve[e.props.placement || Ue], n = t.indexOf(e);
1938
+ if (n === -1) return;
1939
+ t.splice(n, 1);
1940
+ const { handler: r } = e;
1941
+ r.close();
1942
+ }, li = ({ appendTo: e, ...t }, n) => {
1943
+ const r = `message_${si++}`, s = t.onClose, o = document.createElement("div"), a = {
1944
+ ...t,
1945
+ id: r,
1946
+ onClose: () => {
1947
+ s == null || s(), ii(u);
1948
+ },
1949
+ onDestroy: () => {
1950
+ ut(null, o);
1951
+ }
1952
+ }, i = ce(ri, a, nt(a.message) || tt(a.message) ? { default: nt(a.message) ? a.message : () => a.message } : null);
1953
+ i.appContext = n || Ie._context, ut(i, o), e.appendChild(o.firstElementChild);
1954
+ const l = i.component, u = {
1955
+ id: r,
1956
+ vnode: i,
1957
+ vm: l,
1958
+ handler: { close: () => {
1959
+ l.exposed.close();
1960
+ } },
1961
+ props: i.component.props
1962
+ };
1963
+ return u;
1964
+ }, Ie = (e = {}, t) => {
1965
+ if (!Te) return { close: () => {
1966
+ } };
1967
+ const n = ur(e), r = Ja(n.placement || Ue);
1968
+ if (n.grouping && r.length) {
1969
+ const o = r.find(({ vnode: a }) => {
1970
+ var i;
1971
+ return ((i = a.props) == null ? void 0 : i.message) === n.message;
1972
+ });
1973
+ if (o)
1974
+ return o.props.repeatNum += 1, o.props.type = n.type, o.handler;
1975
+ }
1976
+ if (ke(oe.max) && r.length >= oe.max) return { close: () => {
1977
+ } };
1978
+ const s = li(n, t);
1979
+ return r.push(s), s.handler;
1980
+ };
1981
+ lr.forEach((e) => {
1982
+ Ie[e] = (t = {}, n) => Ie({
1983
+ ...ur(t),
1984
+ type: e
1985
+ }, n);
1986
+ });
1987
+ function ci(e) {
1988
+ for (const t in ve) if (ft(ve, t)) {
1989
+ const n = [...ve[t]];
1990
+ for (const r of n) (!e || e === r.props.type) && r.handler.close();
1991
+ }
1992
+ }
1993
+ function ui(e) {
1994
+ ve[e] && [...ve[e]].forEach((t) => t.handler.close());
1995
+ }
1996
+ Ie.closeAll = ci;
1997
+ Ie.closeAllByPlacement = ui;
1998
+ Ie._context = null;
1999
+ const Oe = Xn(Ie, "$message"), fr = [
2000
+ "primary",
2001
+ "success",
2002
+ "info",
2003
+ "warning",
2004
+ "error"
2005
+ ], fi = Ke({
2006
+ customClass: {
2007
+ type: String,
2008
+ default: ""
2009
+ },
2010
+ dangerouslyUseHTMLString: Boolean,
2011
+ duration: {
2012
+ type: Number,
2013
+ default: 4500
2014
+ },
2015
+ icon: { type: Vt },
2016
+ id: {
2017
+ type: String,
2018
+ default: ""
2019
+ },
2020
+ message: {
2021
+ type: ee([
2022
+ String,
2023
+ Object,
2024
+ Function
2025
+ ]),
2026
+ default: ""
2027
+ },
2028
+ offset: {
2029
+ type: Number,
2030
+ default: 0
2031
+ },
2032
+ onClick: {
2033
+ type: ee(Function),
2034
+ default: () => {
2035
+ }
2036
+ },
2037
+ onClose: {
2038
+ type: ee(Function),
2039
+ required: !0
2040
+ },
2041
+ position: {
2042
+ type: String,
2043
+ values: [
2044
+ "top-right",
2045
+ "top-left",
2046
+ "bottom-right",
2047
+ "bottom-left"
2048
+ ],
2049
+ default: "top-right"
2050
+ },
2051
+ showClose: {
2052
+ type: Boolean,
2053
+ default: !0
2054
+ },
2055
+ title: {
2056
+ type: String,
2057
+ default: ""
2058
+ },
2059
+ type: {
2060
+ type: String,
2061
+ values: [...fr, ""],
2062
+ default: ""
2063
+ },
2064
+ zIndex: Number,
2065
+ closeIcon: {
2066
+ type: Vt,
2067
+ default: er
2068
+ }
2069
+ }), di = { destroy: () => !0 }, pi = ["id"], hi = ["textContent"], mi = { key: 0 }, vi = ["innerHTML"];
2070
+ var gi = /* @__PURE__ */ pe({
2071
+ name: "ElNotification",
2072
+ __name: "notification",
2073
+ props: fi,
2074
+ emits: di,
2075
+ setup(e, { expose: t }) {
2076
+ const n = e, { ns: r, zIndex: s } = or("notification"), { nextZIndex: o, currentZIndex: a } = s, i = T(!1);
2077
+ let l;
2078
+ const u = S(() => {
2079
+ const M = n.type;
2080
+ return M && dt[n.type] ? r.m(M) : "";
2081
+ }), d = S(() => n.type && dt[n.type] || n.icon), f = S(() => n.position.endsWith("right") ? "right" : "left"), c = S(() => n.position.startsWith("top") ? "top" : "bottom"), p = S(() => ({
2082
+ [c.value]: `${n.offset}px`,
2083
+ zIndex: n.zIndex ?? a.value
2084
+ }));
2085
+ function m() {
2086
+ n.duration > 0 && ({ stop: l } = Tn(() => {
2087
+ i.value && w();
2088
+ }, n.duration));
2089
+ }
2090
+ function h() {
2091
+ l == null || l();
2092
+ }
2093
+ function w() {
2094
+ i.value = !1;
2095
+ }
2096
+ function I(M) {
2097
+ switch (Un(M)) {
2098
+ case He.delete:
2099
+ case He.backspace:
2100
+ h();
2101
+ break;
2102
+ case He.esc:
2103
+ i.value && w();
2104
+ break;
2105
+ default:
2106
+ m();
2107
+ break;
2108
+ }
2109
+ }
2110
+ return yt(() => {
2111
+ m(), o(), i.value = !0;
2112
+ }), On(document, "keydown", I), t({
2113
+ visible: i,
2114
+ close: w
2115
+ }), (M, P) => (N(), we(Ht, {
2116
+ name: O(r).b("fade"),
2117
+ onBeforeLeave: e.onClose,
2118
+ onAfterLeave: P[1] || (P[1] = (B) => M.$emit("destroy")),
2119
+ persisted: ""
2120
+ }, {
2121
+ default: Pe(() => [Et(D("div", {
2122
+ id: e.id,
2123
+ class: J([
2124
+ O(r).b(),
2125
+ e.customClass,
2126
+ f.value
2127
+ ]),
2128
+ style: Qe(p.value),
2129
+ role: "alert",
2130
+ onMouseenter: h,
2131
+ onMouseleave: m,
2132
+ onClick: P[0] || (P[0] = (...B) => e.onClick && e.onClick(...B))
2133
+ }, [d.value ? (N(), we(O(pt), {
2134
+ key: 0,
2135
+ class: J([O(r).e("icon"), u.value])
2136
+ }, {
2137
+ default: Pe(() => [(N(), we(Ot(d.value)))]),
2138
+ _: 1
2139
+ }, 8, ["class"])) : ae("v-if", !0), D("div", { class: J(O(r).e("group")) }, [
2140
+ D("h2", {
2141
+ class: J(O(r).e("title")),
2142
+ textContent: et(e.title)
2143
+ }, null, 10, hi),
2144
+ Et(D("div", {
2145
+ class: J(O(r).e("content")),
2146
+ style: Qe(e.title ? void 0 : { margin: 0 })
2147
+ }, [qe(M.$slots, "default", {}, () => [e.dangerouslyUseHTMLString ? (N(), W(gt, { key: 1 }, [ae(" Caution here, message could've been compromised, never use user's input as message "), D("p", { innerHTML: e.message }, null, 8, vi)], 2112)) : (N(), W("p", mi, et(e.message), 1))])], 6), [[Pt, e.message]]),
2148
+ e.showClose ? (N(), we(O(pt), {
2149
+ key: 0,
2150
+ class: J(O(r).e("closeBtn")),
2151
+ onClick: Ln(w, ["stop"])
2152
+ }, {
2153
+ default: Pe(() => [(N(), we(Ot(e.closeIcon)))]),
2154
+ _: 1
2155
+ }, 8, ["class"])) : ae("v-if", !0)
2156
+ ], 2)], 46, pi), [[Pt, i.value]])]),
2157
+ _: 3
2158
+ }, 8, ["name", "onBeforeLeave"]));
2159
+ }
2160
+ }), yi = gi;
2161
+ const Ze = {
2162
+ "top-left": [],
2163
+ "top-right": [],
2164
+ "bottom-left": [],
2165
+ "bottom-right": []
2166
+ }, mt = 16;
2167
+ let _i = 1;
2168
+ const $e = function(e = {}, t) {
2169
+ if (!Te) return { close: () => {
2170
+ } };
2171
+ (xe(e) || tt(e)) && (e = { message: e });
2172
+ const n = e.position || "top-right";
2173
+ let r = e.offset || 0;
2174
+ Ze[n].forEach(({ vm: d }) => {
2175
+ var f;
2176
+ r += (((f = d.el) == null ? void 0 : f.offsetHeight) || 0) + mt;
2177
+ }), r += mt;
2178
+ const s = `notification_${_i++}`, o = e.onClose, a = {
2179
+ ...e,
2180
+ offset: r,
2181
+ id: s,
2182
+ onClose: () => {
2183
+ wi(s, n, o);
2184
+ }
2185
+ };
2186
+ let i = document.body;
2187
+ Nt(e.appendTo) ? i = e.appendTo : xe(e.appendTo) && (i = document.querySelector(e.appendTo)), Nt(i) || (Je("ElNotification", "the appendTo option is not an HTMLElement. Falling back to document.body."), i = document.body);
2188
+ const l = document.createElement("div"), u = ce(yi, a, nt(a.message) ? a.message : tt(a.message) ? () => a.message : null);
2189
+ return u.appContext = da(t) ? $e._context : t, u.props.onDestroy = () => {
2190
+ ut(null, l);
2191
+ }, ut(u, l), Ze[n].push({ vm: u }), i.appendChild(l.firstElementChild), { close: () => {
2192
+ u.component.exposed.visible.value = !1;
2193
+ } };
2194
+ };
2195
+ fr.forEach((e) => {
2196
+ $e[e] = (t = {}, n) => ((xe(t) || tt(t)) && (t = { message: t }), $e({
2197
+ ...t,
2198
+ type: e
2199
+ }, n));
2200
+ });
2201
+ function wi(e, t, n) {
2202
+ const r = Ze[t], s = r.findIndex(({ vm: u }) => {
2203
+ var d;
2204
+ return ((d = u.component) == null ? void 0 : d.props.id) === e;
2205
+ });
2206
+ if (s === -1) return;
2207
+ const { vm: o } = r[s];
2208
+ if (!o) return;
2209
+ n == null || n(o);
2210
+ const a = o.el.offsetHeight, i = t.split("-")[0];
2211
+ r.splice(s, 1);
2212
+ const l = r.length;
2213
+ if (!(l < 1))
2214
+ for (let u = s; u < l; u++) {
2215
+ const { el: d, component: f } = r[u].vm, c = Number.parseInt(d.style[i], 10) - a - mt;
2216
+ f.props.offset = c;
2217
+ }
2218
+ }
2219
+ function bi() {
2220
+ for (const e of Object.values(Ze)) e.forEach(({ vm: t }) => {
2221
+ t.component.exposed.visible.value = !1;
2222
+ });
2223
+ }
2224
+ function xi(e = "top-right") {
2225
+ var n, r, s, o;
2226
+ let t = ((s = (r = (n = Ze[e][0]) == null ? void 0 : n.vm.component) == null ? void 0 : r.props) == null ? void 0 : s.offset) || 0;
2227
+ for (const { vm: a } of Ze[e])
2228
+ a.component.props.offset = t, t += (((o = a.el) == null ? void 0 : o.offsetHeight) || 0) + mt;
2229
+ }
2230
+ $e.closeAll = bi;
2231
+ $e.updateOffsets = xi;
2232
+ $e._context = null;
2233
+ const Li = Xn($e, "$notify");
2234
+ function Ci() {
2235
+ return (e) => {
2236
+ let t, n, r;
2237
+ if (_.isString(e) ? (t = e, n = "error", r = 3e3) : (t = e.message, n = e.type || "error", r = _.isNil(e.duration) ? 3e3 : e.duration), ["success", "warning", "info", "error"].includes(n)) {
2238
+ Oe({
2239
+ message: t,
2240
+ type: n,
2241
+ duration: r
2242
+ });
2243
+ return;
2244
+ }
2245
+ let s = n;
2246
+ s === "info" ? s = "primary" : s === "error" && (s = "danger"), Li({
2247
+ message: t,
2248
+ type: s,
2249
+ duration: r
2250
+ });
2251
+ };
2252
+ }
2253
+ const Si = /* @__PURE__ */ pe({
2254
+ name: "VaeLrmap",
2255
+ props: {
2256
+ height: {
2257
+ type: String,
2258
+ default: "100%"
2259
+ },
2260
+ width: {
2261
+ type: String,
2262
+ default: "100%"
2263
+ },
2264
+ options: {
2265
+ type: Object,
2266
+ default: () => ({})
2267
+ },
2268
+ beforeCreate: {
2269
+ type: Function,
2270
+ default: _.noop
2271
+ },
2272
+ contextMenu: {
2273
+ type: Array,
2274
+ default: () => []
2275
+ }
2276
+ },
2277
+ emits: ["init-map", "reload-map"],
2278
+ setup(e, {
2279
+ emit: t
2280
+ }) {
2281
+ const n = Ci(), r = T(!1), s = T(null), o = T(`vae_lrmap_${We()}`), a = T(null), i = T(!1), l = T(!1), u = T(""), d = T(!1), f = T(""), c = T(null), p = T(null), {
2282
+ addContextMenu: m,
2283
+ renderContextMenu: h
2284
+ } = An({
2285
+ mapRef: a,
2286
+ mapContainerRef: p,
2287
+ menusRef: bn(e, "contextMenu")
2288
+ }), w = (z) => {
2289
+ const {
2290
+ leafletOptions: b,
2291
+ requestOptions: g,
2292
+ treeLayers: v,
2293
+ visibleKeys: C,
2294
+ requestServer: y,
2295
+ queryEntity: A,
2296
+ showLayers: k,
2297
+ showLayerSets: j,
2298
+ getThumbnail: G
2299
+ } = s.value, H = _.merge({
2300
+ el: o.value,
2301
+ client: s.value
2302
+ }, b, g), K = z ? {
2303
+ treeLayers: v,
2304
+ visibleKeys: C
2305
+ } : {}, te = {
2306
+ requestServer: y.bind(s.value),
2307
+ queryEntity: A.bind(s.value),
2308
+ showLayers: k.bind(s.value),
2309
+ showLayerSets: j.bind(s.value),
2310
+ getThumbnail: G.bind(s.value)
2311
+ }, ge = z ? {
2312
+ refreshMap: () => {
2313
+ P(), Z();
2314
+ },
2315
+ reloadMap: F
2316
+ } : null;
2317
+ return _.merge(H, K, te, ge);
2318
+ }, I = (z) => {
2319
+ d.value = !0, f.value = z;
2320
+ }, M = () => {
2321
+ d.value = !1, f.value = "";
2322
+ }, P = () => {
2323
+ !a.value || !s.value || (c.value && a.value.removeLayer(c.value), c.value = s.value.currentTileLayer().addTo(a.value));
2324
+ }, B = () => {
2325
+ s.value = new L.Vae.Client(L.extend({
2326
+ uid: o.value
2327
+ }, e.options)), s.value.on("message", (z) => {
2328
+ n({
2329
+ message: z.message,
2330
+ type: z.messageType
2331
+ });
2332
+ }), s.value.on("openmask", (z) => {
2333
+ I(z.text);
2334
+ }), s.value.on("closemask", M), s.value.on("refreshtilelayer", P);
2335
+ }, Z = (z = !0) => {
2336
+ if (a.value) {
2337
+ if (e.options.zoom && e.options.center)
2338
+ return;
2339
+ a.value.fitBounds(s.value.leafletOptions.bounds, {
2340
+ animate: z
2341
+ });
2342
+ }
2343
+ }, X = () => {
2344
+ if (!a.value) {
2345
+ const z = L.extend({
2346
+ zoomControl: !1,
2347
+ attributionControl: !1,
2348
+ doubleClickZoom: !1
2349
+ }, _.omit(e.options, ["url", "dsname", "layerTreeType", "defaultLayers", "defaultLayerSets"]), _.pick(s.value.leafletOptions, ["crs", "center", "maxZoom"]));
2350
+ return a.value = L.map(o.value, z), Z(!1), new Promise((b) => {
2351
+ a.value.whenReady(b);
2352
+ });
2353
+ }
2354
+ return Promise.resolve();
2355
+ }, Y = () => {
2356
+ a.value.vae = {}, _.merge(a.value.vae, w(!0));
2357
+ }, ue = ({
2358
+ event: z = "init-map",
2359
+ alert: b = !0
2360
+ } = {}) => {
2361
+ B(), s.value.start(b).then(async (g) => {
2362
+ g && (await e.beforeCreate(w(!1)), await s.value.setDefaultLayers(), await X(), m(), P(), Y(), t(z, a.value), z === "init-map" && (i.value = !0));
2363
+ });
2364
+ }, fe = () => {
2365
+ var z;
2366
+ (z = a.value) == null || z.invalidateSize();
2367
+ }, F = () => {
2368
+ var z;
2369
+ (z = a.value) == null || z.remove(), a.value = null, c.value = null, r.value = !0, ct(() => {
2370
+ r.value = !1, ct(() => {
2371
+ ue({
2372
+ event: "reload-map"
2373
+ });
2374
+ });
2375
+ });
2376
+ }, R = S(() => l.value || d.value), he = S(() => u.value || f.value);
2377
+ return be(() => e.options, () => {
2378
+ i.value || ue({
2379
+ alert: !0
2380
+ });
2381
+ }, {
2382
+ deep: !0
2383
+ }), yt(() => {
2384
+ ue({
2385
+ alert: !1
2386
+ });
2387
+ }), vt(() => {
2388
+ var z;
2389
+ (z = a.value) == null || z.remove();
2390
+ }), () => {
2391
+ if (r.value)
2392
+ return null;
2393
+ const z = R.value ? ce("div", {
2394
+ class: "loading-mask"
2395
+ }, [ce("div", {
2396
+ class: "wrapper"
2397
+ }, [ce("div", {
2398
+ class: "loading-icon"
2399
+ }, [ce("i", {
2400
+ class: "fas fa-circle-notch fa-spin"
2401
+ }, null)]), ce("div", {
2402
+ class: "loading-text"
2403
+ }, [he.value])])]) : null;
2404
+ return ce(Mn, {
2405
+ ref: p,
2406
+ class: "vae-lrmap",
2407
+ style: {
2408
+ height: e.height,
2409
+ width: e.width
2410
+ },
2411
+ onResize: fe
2412
+ }, {
2413
+ default: () => [ce("div", {
2414
+ class: "leaflet-map",
2415
+ id: o.value
2416
+ }, null), h(), z]
2417
+ });
2418
+ };
2419
+ }
2420
+ }), Mi = { class: "vae-map-ctrl--draw" }, Ai = { class: "item-group" }, Ti = {
2421
+ class: "item",
2422
+ title: "绘制"
2423
+ }, Ei = {
2424
+ key: 0,
2425
+ class: "tooltips"
2426
+ }, Oi = {
2427
+ class: "item",
2428
+ title: "编辑"
2429
+ }, Pi = {
2430
+ key: 0,
2431
+ class: "tooltips"
2432
+ }, zi = {
2433
+ class: "item",
2434
+ title: "移动"
2435
+ }, ki = {
2436
+ key: 0,
2437
+ class: "tooltips"
2438
+ }, Ii = {
2439
+ class: "item",
2440
+ title: "机头机尾"
2441
+ }, $i = {
2442
+ key: 0,
2443
+ class: "tooltips"
2444
+ }, Di = {
2445
+ key: 1,
2446
+ class: "item",
2447
+ title: "清除"
2448
+ }, Ri = { class: "item-group" }, Ni = {
2449
+ class: "item",
2450
+ title: "保存"
2451
+ }, ji = /* @__PURE__ */ Object.assign({
2452
+ name: "VaeMapCtrlDraw"
2453
+ }, {
2454
+ __name: "index",
2455
+ props: {
2456
+ htOnly: {
2457
+ type: Boolean,
2458
+ default: !1
2459
+ }
2460
+ },
2461
+ emits: ["on-create", "on-save"],
2462
+ setup(e, { expose: t, emit: n }) {
2463
+ const r = {
2464
+ unpicked: { color: "#ffc107", fillColor: "#fff", fillOpacity: 1, radius: 6 },
2465
+ hint: { color: "transparent", radius: 1, weight: 1, interactive: !1 }
2466
+ };
2467
+ function s({ action: x, content: E, style: $ }) {
2468
+ const U = `<span class="${$ ?? ""}">${E}</span>`;
2469
+ return x ? `<span><span class="action">${x}</span>${U}</span>` : `<span>${U}</span>`;
2470
+ }
2471
+ function o(x, E) {
2472
+ let $ = { content: "-" };
2473
+ switch (x) {
2474
+ case "hs":
2475
+ $ = { content: "机头起点", style: "green" };
2476
+ break;
2477
+ case "ts":
2478
+ $ = { content: "机尾起点", style: "red" };
2479
+ break;
2480
+ case "he":
2481
+ $ = { content: "机头终点", style: "green" };
2482
+ break;
2483
+ case "te":
2484
+ $ = { content: "机尾终点", style: "red" };
2485
+ break;
2486
+ }
2487
+ return L.circleMarker(E, r.hint).bindTooltip(s($), {
2488
+ direction: "right",
2489
+ permanent: !0,
2490
+ className: "ht-tooltip"
2491
+ });
2492
+ }
2493
+ function a(x, E) {
2494
+ return x > E - 1 ? x - E : x < 0 ? x + E : x;
2495
+ }
2496
+ const i = e, l = n, u = T(!1), d = T(null), f = L.layerGroup(), c = T("none"), p = T(null), m = L.layerGroup(), h = L.layerGroup(), w = L.layerGroup(), I = T(null), M = T(0), P = T(-1), B = T(-1), Z = T(-1), X = T(-1), Y = /* @__PURE__ */ new Map(), ue = S(() => p.value && p.value.getLatLngs()[0].length > 3), fe = S(() => u.value && c.value !== "finish"), F = S(() => u.value && ue.value && c.value !== "finish"), R = S(() => u.value && ue.value && c.value !== "finish"), he = S(() => u.value && ue.value), z = S(() => u.value && ["finish", "reset"].includes(c.value)), b = S(() => !i.htOnly);
2497
+ be(c, (x) => {
2498
+ x === "draw" ? (j(), H(), de()) : x === "edit" ? (A(), H(), de()) : x === "drag" ? (A(), j(), de()) : x === "pick" ? (A(), j(), H()) : x === "none" || x === "reset" ? (A(), j(), H(), de()) : x === "finish" && (A(), j(), H());
2499
+ });
2500
+ const g = (x, E) => {
2501
+ if (!x)
2502
+ return;
2503
+ u.value = !0, d.value = x, d.value.pm.setLang("zh"), f.addTo(d.value), d.value.on("pm:create", ({ shape: Q, layer: V }) => {
2504
+ V.remove(), V.addTo(f), Q === "Polygon" && (V.getLatLngs()[0].length === 3 ? (V.remove(), c.value = "none", Oe.error("绘制错误,请至少绘制 4 个边")) : (p.value && p.value.remove(), p.value = V, c.value = "none", Oe.success("绘制完成"), l("on-create", p.value)));
2505
+ });
2506
+ const $ = E == null ? void 0 : E.latLngs, U = E == null ? void 0 : E.htIndex;
2507
+ Array.isArray($) && $.length > 3 && (p.value = L.polygon($).addTo(f), Array.isArray(U) && U.length === 4 && (f.hasLayer(m) || f.addLayer(m), P.value = U[0], o("hs", $[P.value]).addTo(m), B.value = U[1], o("ts", $[B.value]).addTo(m), Z.value = U[2], o("he", $[Z.value]).addTo(m), X.value = U[3], o("te", $[X.value]).addTo(m), c.value = "finish"), l("on-create", p.value));
2508
+ }, v = () => {
2509
+ c.value = "reset", f.clearLayers(), p.value = null, Oe.success("已清理");
2510
+ }, C = () => {
2511
+ fe.value && (d.value.pm.enableDraw("Polygon"), c.value = "draw");
2512
+ }, y = () => {
2513
+ const x = d.value.pm.Draw.Polygon;
2514
+ x._removeLastVertex(), x._enabled || (c.value = "none");
2515
+ }, A = () => {
2516
+ var x;
2517
+ (x = d.value) == null || x.pm.disableDraw("Polygon");
2518
+ }, k = () => {
2519
+ F.value && !p.value.pm.enabled() && (p.value.pm.enable(), c.value = "edit");
2520
+ }, j = () => {
2521
+ var x;
2522
+ (x = p.value) != null && x.pm.enabled() && p.value.pm.disable();
2523
+ }, G = () => {
2524
+ R.value && !d.value.pm.globalDragModeEnabled() && (d.value.pm.toggleGlobalDragMode(), c.value = "drag");
2525
+ }, H = () => {
2526
+ var x;
2527
+ (x = d.value) != null && x.pm.globalDragModeEnabled() && d.value.pm.toggleGlobalDragMode();
2528
+ }, K = (x) => {
2529
+ I.value && (I.value.setLatLng(x.latlng), h.hasLayer(I.value) || I.value.addTo(h));
2530
+ }, te = () => {
2531
+ m.clearLayers(), h.clearLayers(), w.clearLayers(), Y.clear(), p.value.getLatLngs()[0].forEach((E, $) => {
2532
+ const U = L.circleMarker(E, r.unpicked).addTo(h);
2533
+ re(U, $), Y.set($, U);
2534
+ }), P.value = -1, B.value = -1, Z.value = -1, X.value = -1, M.value = 1, I.value = L.circleMarker(d.value.getCenter(), r.hint).bindTooltip(s({
2535
+ action: "请选择",
2536
+ content: "机头起点",
2537
+ style: "green"
2538
+ }), {
2539
+ direction: "bottom",
2540
+ offset: [0, 8],
2541
+ permanent: !0,
2542
+ className: "ht-tooltip"
2543
+ }), d.value.off("mousemove", K), d.value.on("mousemove", K);
2544
+ }, ge = () => {
2545
+ he.value && (c.value = "pick", m.addTo(f), h.addTo(f), te());
2546
+ }, de = () => {
2547
+ var x;
2548
+ (x = d.value) == null || x.off("mousemove", K), c.value !== "finish" && (m.clearLayers(), P.value = -1, B.value = -1, Z.value = -1, X.value = -1), I.value = null, h.clearLayers(), w.clearLayers(), Y.clear(), M.value = 0;
2549
+ }, ye = () => {
2550
+ M.value === 5 ? (c.value = "finish", de(), Oe.success("标注完成")) : c.value = "none";
2551
+ }, ie = (x) => {
2552
+ var V;
2553
+ let E, $;
2554
+ M.value === 1 ? (E = "hs", $ = { action: "请选择", content: "机尾起点", style: "red" }) : M.value === 2 ? (E = "ts", $ = { action: "请选择", content: "机头终点", style: "green" }) : M.value === 3 ? (E = "he", $ = { action: "请选择", content: "机尾终点", style: "red" }) : (E = "te", $ = { content: "-" });
2555
+ const U = Y.get(x), Q = { hs: P, ts: B, he: Z, te: X };
2556
+ o(E, U.getLatLng()).addTo(m), U.off("click"), U.remove(), Y.delete(x), M.value += 1, Q[E].value = x, (V = I.value) == null || V.setTooltipContent(s($));
2557
+ }, re = (x, E) => {
2558
+ x && x.on("click", () => {
2559
+ const $ = p.value.getLatLngs()[0].length;
2560
+ if (M.value === 1) {
2561
+ ie(E);
2562
+ const U = E === $ - 1 ? 0 : E + 1, Q = E === 0 ? $ - 1 : E - 1;
2563
+ for (const [V, ne] of Y)
2564
+ V !== U && V !== Q && (w.addLayer(ne), h.removeLayer(ne));
2565
+ } else if (M.value === 2) {
2566
+ ie(E), Y.delete(E), w.eachLayer((Q) => {
2567
+ Q.addTo(h), w.removeLayer(Q);
2568
+ });
2569
+ let U = P.value < B.value;
2570
+ if (Math.abs(P.value - B.value) === $ - 1 && (U = B.value === 0), Y.size === 2) {
2571
+ const Q = a(U ? P.value - 1 : P.value + 1, $);
2572
+ ie(Q);
2573
+ const V = a(U ? B.value + 1 : B.value - 1, $);
2574
+ ie(V), ye();
2575
+ } else {
2576
+ const Q = a(U ? B.value + 1 : B.value - 1, $), V = Y.get(Q);
2577
+ w.addLayer(V), h.removeLayer(V);
2578
+ }
2579
+ } else if (M.value === 3) {
2580
+ ie(E), Y.delete(E), w.eachLayer((V) => {
2581
+ w.removeLayer(V), V.addTo(h);
2582
+ });
2583
+ let U = P.value < B.value;
2584
+ Math.abs(P.value - B.value) === $ - 1 && (U = B.value === 0);
2585
+ const Q = [];
2586
+ if (U) {
2587
+ const V = P.value < E ? P.value + $ : P.value;
2588
+ for (let ne = E + 1; ne < V; ne += 1)
2589
+ Q.push(ne > $ - 1 ? ne - $ : ne);
2590
+ } else {
2591
+ const V = P.value > E ? E + $ : E;
2592
+ for (let ne = P.value + 1; ne < V; ne += 1)
2593
+ Q.push(ne > $ - 1 ? ne - $ : ne);
2594
+ }
2595
+ if (Q.forEach((V) => {
2596
+ const ne = Y.get(V);
2597
+ w.addLayer(ne), h.removeLayer(ne);
2598
+ }), $ - Q.length - 3 === 1) {
2599
+ for (const V of Y.keys())
2600
+ if (_.indexOf(Q, V) < 0) {
2601
+ ie(V), ye();
2602
+ break;
2603
+ }
2604
+ }
2605
+ } else M.value === 4 && (ie(E), ye());
2606
+ });
2607
+ }, _e = () => {
2608
+ z.value && (c.value === "reset" ? l("on-save", { latLngs: null, htIndex: null }) : c.value === "finish" && l("on-save", {
2609
+ latLngs: p.value.getLatLngs()[0],
2610
+ htIndex: [P.value, B.value, Z.value, X.value]
2611
+ }));
2612
+ }, me = (x) => x === "draw" ? fe.value ? null : "disabled" : x === "edit" ? F.value ? null : "disabled" : x === "drag" ? R.value ? null : "disabled" : x === "pick" ? he.value ? null : "disabled" : x === "save" ? z.value ? null : "disabled" : null;
2613
+ return t({
2614
+ enable: g
2615
+ }), (x, E) => (N(), W("div", Mi, [
2616
+ D("div", Ai, [
2617
+ b.value ? (N(), W(
2618
+ gt,
2619
+ { key: 0 },
2620
+ [
2621
+ D("div", Ti, [
2622
+ D(
2623
+ "div",
2624
+ {
2625
+ class: J(["item-icon fas fa-pen-alt", me("draw")]),
2626
+ onClick: C
2627
+ },
2628
+ null,
2629
+ 2
2630
+ /* CLASS */
2631
+ ),
2632
+ c.value === "draw" ? (N(), W("div", Ei, [
2633
+ D("span", {
2634
+ onClick: E[0] || (E[0] = ($) => c.value = "none")
2635
+ }, "取消"),
2636
+ D("span", { onClick: y }, "移除上一个节点")
2637
+ ])) : ae("v-if", !0)
2638
+ ]),
2639
+ D("div", Oi, [
2640
+ D(
2641
+ "div",
2642
+ {
2643
+ class: J(["item-icon fas fa-draw-polygon", me("edit")]),
2644
+ onClick: k
2645
+ },
2646
+ null,
2647
+ 2
2648
+ /* CLASS */
2649
+ ),
2650
+ c.value === "edit" ? (N(), W("div", Pi, [
2651
+ D("span", {
2652
+ onClick: E[1] || (E[1] = ($) => c.value = "none")
2653
+ }, "完成")
2654
+ ])) : ae("v-if", !0)
2655
+ ]),
2656
+ D("div", zi, [
2657
+ D(
2658
+ "div",
2659
+ {
2660
+ class: J(["item-icon fas fa-expand-arrows-alt", me("drag")]),
2661
+ onClick: G
2662
+ },
2663
+ null,
2664
+ 2
2665
+ /* CLASS */
2666
+ ),
2667
+ c.value === "drag" ? (N(), W("div", ki, [
2668
+ D("span", {
2669
+ onClick: E[2] || (E[2] = ($) => c.value = "none")
2670
+ }, "完成")
2671
+ ])) : ae("v-if", !0)
2672
+ ])
2673
+ ],
2674
+ 64
2675
+ /* STABLE_FRAGMENT */
2676
+ )) : ae("v-if", !0),
2677
+ D("div", Ii, [
2678
+ D(
2679
+ "div",
2680
+ {
2681
+ class: J(["item-icon fas fa-map-pin", me("pick")]),
2682
+ onClick: ge
2683
+ },
2684
+ null,
2685
+ 2
2686
+ /* CLASS */
2687
+ ),
2688
+ c.value === "pick" ? (N(), W("div", $i, [
2689
+ D("span", {
2690
+ onClick: E[3] || (E[3] = ($) => c.value = "none")
2691
+ }, "取消"),
2692
+ D("span", { onClick: te }, "重置"),
2693
+ M.value === 5 ? (N(), W("span", {
2694
+ key: 0,
2695
+ onClick: ye
2696
+ }, "完成")) : ae("v-if", !0)
2697
+ ])) : ae("v-if", !0)
2698
+ ]),
2699
+ b.value ? (N(), W("div", Di, [
2700
+ D("div", {
2701
+ class: "item-icon fas fa-trash-alt",
2702
+ onClick: v
2703
+ })
2704
+ ])) : ae("v-if", !0)
2705
+ ]),
2706
+ D("div", Ri, [
2707
+ D("div", Ni, [
2708
+ D(
2709
+ "div",
2710
+ {
2711
+ class: J(["item-icon fas fa-save", me("save")]),
2712
+ onClick: _e
2713
+ },
2714
+ null,
2715
+ 2
2716
+ /* CLASS */
2717
+ )
2718
+ ])
2719
+ ])
2720
+ ]));
2721
+ }
2722
+ }), Bi = { class: "vae-map-ctrl--draw" }, Vi = { class: "item-group" }, Fi = {
2723
+ class: "item",
2724
+ title: "绘制"
2725
+ }, Hi = {
2726
+ key: 0,
2727
+ class: "tooltips"
2728
+ }, Ui = { class: "item-group" }, Gi = {
2729
+ class: "item",
2730
+ title: "保存"
2731
+ }, qi = /* @__PURE__ */ Object.assign({
2732
+ name: "VaeMapCtrlDrawLine"
2733
+ }, {
2734
+ __name: "index",
2735
+ emits: ["on-create", "on-save"],
2736
+ setup(e, { expose: t, emit: n }) {
2737
+ const r = n, s = T(!1), o = T(null), a = L.layerGroup(), i = T("none"), l = T(null);
2738
+ be(i, (M) => {
2739
+ M === "none" && p();
2740
+ });
2741
+ const u = (M, P) => {
2742
+ M && (s.value = !0, o.value = M, o.value.pm.setLang("zh"), a.addTo(o.value), o.value.on("pm:create", ({ shape: B, layer: Z }) => {
2743
+ Z.remove(), Z.addTo(a), B === "Line" && (l.value && l.value.remove(), l.value = Z, i.value = "none", Oe.success("绘制完成"), r("on-create", l.value));
2744
+ }), P != null && P.latLngs && P.latLngs.length > 1 && (l.value = L.polyline(P.latLngs).addTo(a), r("on-create", l.value)));
2745
+ }, d = () => {
2746
+ i.value = "none", a.clearLayers(), l.value = null, Oe.success("已清理");
2747
+ }, f = () => {
2748
+ w.value && (o.value.pm.enableDraw("Line"), i.value = "draw");
2749
+ }, c = () => {
2750
+ const M = o.value.pm.Draw.Line;
2751
+ M._removeLastVertex(), M._enabled || (i.value = "none");
2752
+ }, p = () => {
2753
+ var M;
2754
+ (M = o.value) == null || M.pm.disableDraw("Line");
2755
+ }, m = () => {
2756
+ I.value && (l.value ? r("on-save", { latLngs: l.value.getLatLngs() }) : r("on-save", { latLngs: null }));
2757
+ }, h = (M) => M === "draw" ? w.value ? null : "disabled" : M === "save" ? I.value ? null : "disabled" : null, w = S(() => s.value), I = S(() => s.value);
2758
+ return t({
2759
+ enable: u
2760
+ }), (M, P) => (N(), W("div", Bi, [
2761
+ D("div", Vi, [
2762
+ D("div", Fi, [
2763
+ D(
2764
+ "div",
2765
+ {
2766
+ class: J(["item-icon fas fa-pen-alt", h("draw")]),
2767
+ onClick: f
2768
+ },
2769
+ null,
2770
+ 2
2771
+ /* CLASS */
2772
+ ),
2773
+ i.value === "draw" ? (N(), W("div", Hi, [
2774
+ D("span", {
2775
+ onClick: P[0] || (P[0] = (B) => i.value = "none")
2776
+ }, "取消"),
2777
+ D("span", { onClick: c }, "移除上一个节点")
2778
+ ])) : ae("v-if", !0)
2779
+ ]),
2780
+ D("div", {
2781
+ class: "item",
2782
+ title: "清除"
2783
+ }, [
2784
+ D("div", {
2785
+ class: "item-icon fas fa-trash-alt",
2786
+ onClick: d
2787
+ })
2788
+ ])
2789
+ ]),
2790
+ D("div", Ui, [
2791
+ D("div", Gi, [
2792
+ D(
2793
+ "div",
2794
+ {
2795
+ class: J(["item-icon fas fa-save", h("save")]),
2796
+ onClick: m
2797
+ },
2798
+ null,
2799
+ 2
2800
+ /* CLASS */
2801
+ )
2802
+ ])
2803
+ ])
2804
+ ]));
2805
+ }
2806
+ }), Wi = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==", Zi = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=", Ki = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC", Ji = (e = L.point(0, 0)) => {
2807
+ const t = L.Projection.SphericalMercator, n = t.R, r = Math.PI / 180;
2808
+ return L.extend({}, t, {
2809
+ project(s) {
2810
+ const o = t.MAX_LATITUDE, a = Math.max(Math.min(o, s.lat), -o), i = Math.sin(a * r);
2811
+ return L.point(n * s.lng * r, n * Math.log((1 + i) / (1 - i)) / 2).add(e);
2812
+ },
2813
+ unproject(s) {
2814
+ const [o, a] = s.subtract(e);
2815
+ return L.latLng((2 * Math.atan(Math.exp(a / n)) - Math.PI / 2) * r, o * r / n);
2816
+ }
2817
+ });
2818
+ }, Yi = {
2819
+ SIMPLE(e = 2) {
2820
+ const t = Math.pow(0.1, e);
2821
+ return L.extend({}, L.CRS.Simple, {
2822
+ scale: (n) => t * Math.pow(2, n),
2823
+ zoom: (n) => Math.log(n / t) / Math.log(2)
2824
+ });
2825
+ },
2826
+ OFFSET_EPSG3857(e = L.point(0, 0)) {
2827
+ return L.extend({}, L.CRS.EPSG3857, {
2828
+ projection: Ji(e)
2829
+ });
2830
+ },
2831
+ BJ54(e, t = {}) {
2832
+ let n = [307.2, 153.6, 76.8, 38.4, 19.2, 9.6, 4.8, 2.4, 1.2, 0.6, 0.3, 0.15, 0.075, 0.0375, 0.01875];
2833
+ t.resolutions && (n = t.resolutions);
2834
+ let r, s;
2835
+ e > 25e6 && e < 4e7 ? (r = 3, s = parseInt(e / 1e6)) : e > 12e6 && e < 22e6 && (r = 6, s = parseInt(e / 1e6));
2836
+ let o, a, i;
2837
+ if (s >= 0 && (r == 3 ? (o = 2376 + s, a = s * 3, i = 1e6 * s + 5e5) : r == 6 && (o = 2325 + s, a = s * 6 - 3, i = 1e6 * s + 5e5)), o) {
2838
+ let l = "+proj=tmerc +lat_0=0 +lon_0=" + a + " +k=1 +x_0=" + i + " +y_0=0 +ellps=krass +units=m +no_defs no_defs";
2839
+ return new L.Proj.CRS("EPSG:" + o, l, { resolutions: n });
2840
+ } else
2841
+ return this.SIMPLE();
2842
+ },
2843
+ XA80(e) {
2844
+ let t = 900099, n = 0, r = 0, s = parseInt(e / 1e6);
2845
+ s > 0 && (r = s * 3, n = 1e6 * s + 5e5, t = 2376 + s);
2846
+ let o = "+proj=tmerc +lat_0=0 +lon_0=" + r + " +k=1 +x_0=" + n + " +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs no_defs", a = [307.2, 153.6, 76.8, 38.4, 19.2, 9.6, 4.8, 2.4, 1.2, 0.6, 0.3, 0.15, 0.075, 0.0375, 0.01875];
2847
+ return new L.Proj.CRS("EPSG:" + t, o, { resolutions: a, origin: [0, 0] });
2848
+ },
2849
+ CGCS2000(e = {}) {
2850
+ let t = [307.2, 153.6, 76.8, 38.4, 19.2, 9.6, 4.8, 2.4, 1.2, 0.6, 0.3, 0.15, 0.075, 0.0375, 0.01875];
2851
+ e.resolutions && (t = e.resolutions);
2852
+ let n = [0, 0];
2853
+ return e.origin && (n = e.origin), new L.Proj.CRS("EPSG:4525", "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +ellps=GRS80 +units=m +no_defs +type=crs", {
2854
+ resolutions: t,
2855
+ origin: n
2856
+ });
2857
+ }
2858
+ };
2859
+ L.Vae = L.Vae || {};
2860
+ L.Vae.CRS = L.extend(L.Vae.CRS || {}, Yi);
2861
+ L.Vae = L.Vae || {};
2862
+ L.Vae.Client = L.Evented.extend({
2863
+ options: {},
2864
+ requestOptions: {},
2865
+ leafletOptions: {},
2866
+ extent: [],
2867
+ treeLayers: [],
2868
+ visibleKeys: [],
2869
+ initialize(e) {
2870
+ this.options = e, this.requestOptions = { url: null, uid: null, dsid: null, dsname: null }, this.leafletOptions = {};
2871
+ },
2872
+ /**
2873
+ * 连接地图服务,构建地图参数
2874
+ * @param {Boolean} alert 是否提示参数错误
2875
+ */
2876
+ async start({ alert: e } = {}) {
2877
+ return new Promise(async (t) => {
2878
+ var n;
2879
+ for (let r of ["url", "dsname"]) {
2880
+ const s = this.options ? this.options[r] : null, o = `参数 options.${r} 无效`;
2881
+ if (!_.isString(s) || s.trim().length == 0) {
2882
+ e && this.fire("message", { message: o, messageType: "error" });
2883
+ return;
2884
+ }
2885
+ }
2886
+ this.requestOptions.uid = ((n = this.options) == null ? void 0 : n.uid) || `vae_client_${We()}`;
2887
+ try {
2888
+ this.fire("openmask", { text: "正在 获取图元信息" });
2889
+ const r = (await xt.get(this.options.url + "map/getMeta", {
2890
+ params: {
2891
+ uid: this.requestOptions.uid,
2892
+ dsname: this.options.dsname
2893
+ }
2894
+ })).data;
2895
+ this.fire("closemask"), r.status == "success" ? (this.buildMapOptions(r.result), t(!0)) : (console.error(r.errinfo), this.fire("message", { message: "未获取到正确的图元信息", messageType: "error" }), t(!1));
2896
+ } catch (r) {
2897
+ console.error(r), this.fire("message", { message: "获取图元失败,请检查地图服务和请求参数", messageType: "error" }), this.fire("closemask"), t(!1);
2898
+ }
2899
+ });
2900
+ },
2901
+ // 构建地图配置项
2902
+ buildMapOptions({ dsid: e, extent: t }) {
2903
+ try {
2904
+ if (e)
2905
+ this.requestOptions.url = this.options.url, this.requestOptions.dsid = e, this.requestOptions.dsname = this.options.dsname;
2906
+ else
2907
+ throw new Error("数据源dsid错误");
2908
+ if (Array.isArray(t) && t.length == 4) {
2909
+ this.extent = t;
2910
+ let n = (t[0] + t[2]) * 0.5, r = (t[1] + t[3]) * 0.5, s = this.options.crs || L.Vae.CRS.SIMPLE();
2911
+ s == "bj54" ? s = L.Vae.CRS.BJ54(n, this.options) : s == "xa80" ? s = L.Vae.CRS.XA80(n) : s == "simple" ? s = L.Vae.CRS.SIMPLE() : (s == "CGCS2000" || s == "cgcs2000") && (s = L.Vae.CRS.CGCS2000(this.options));
2912
+ let o = this.options.wmscrs || s;
2913
+ o == "bj54" ? o = L.Vae.CRS.BJ54(n) : o == "xa80" ? o = L.Vae.CRS.XA80(n) : s == "simple" ? o = L.Vae.CRS.SIMPLE() : (s == "CGCS2000" || s == "cgcs2000") && (o = L.Vae.CRS.CGCS2000(this.options));
2914
+ const a = this.options.center || o.unproject(L.point(n, r)), i = this.options.maxZoom ? this.options.maxZoom : s.options && s.options.resolutions ? s.options.resolutions.length - 1 : 25, l = o.unproject(L.point(t[0], t[1])), u = o.unproject(L.point(t[2], t[3])), d = L.latLngBounds(l, u);
2915
+ this.leafletOptions = { crs: s, wmscrs: o, center: a, maxZoom: i, bounds: d };
2916
+ } else
2917
+ throw new Error("地图属性extent错误");
2918
+ } catch (n) {
2919
+ console.error(n), this.fire("message", { message: "地图参数构建错误", type: "error" });
2920
+ }
2921
+ },
2922
+ /**
2923
+ * 请求地图服务
2924
+ * @param {string} api 请求动作
2925
+ * @param {string} message 提示消息
2926
+ * @param {object} params 额外参数
2927
+ * @param {boolean} forceResolve 请求结果无效时,强制resolve而不是reject
2928
+ * @param {boolean} checkResult 是否校验结果
2929
+ * @param {boolean} loadMask 是否添加遮罩层
2930
+ */
2931
+ requestServer({ api: e, message: t = "加载数据", params: n = {}, forceResolve: r, checkResult: s = !0, loadMask: o = !0 }) {
2932
+ return new Promise((a, i) => {
2933
+ e && (o && this.fire("openmask", { text: `正在 ${t}` }), xt.post(`${this.requestOptions.url}${e}`, L.extend({
2934
+ uid: this.requestOptions.uid,
2935
+ dsid: this.requestOptions.dsid
2936
+ }, n)).then((l) => {
2937
+ if (s) {
2938
+ const u = l.data;
2939
+ u && u.status == "success" ? a(u.result) : r ? (console.error(u.errinfo), a("")) : (this.fire("message", { message: `${t}结果无效`, messageType: "error" }), console.error(u.errinfo), i(u.errinfo));
2940
+ } else
2941
+ a(l.data);
2942
+ }).catch((l) => {
2943
+ this.fire("message", { message: `${t}失败,请检查地图服务和和请求参数`, messageType: "error" }), console.error(l), i(l);
2944
+ }).finally(() => {
2945
+ o && this.fire("closemask");
2946
+ }));
2947
+ });
2948
+ },
2949
+ // 设置默认图层
2950
+ async setDefaultLayers() {
2951
+ this.fire("openmask", { text: "正在 加载默认图层" });
2952
+ const { defaultLayers: e, defaultLayerSets: t, disabledLayerSets: n, layerTreeType: r } = this.options;
2953
+ await this.formatLayerGroup(r, n), Array.isArray(e) ? this.visibleKeys = await this.showLayers(e, { loadMask: !1, refreshTiles: !1 }) : Array.isArray(t) ? this.visibleKeys = await this.showLayerSets(t, { loadMask: !1, refreshTiles: !1 }) : Array.isArray(n) && await this.showLayers(this.visibleKeys, { loadMask: !1, refreshTiles: !1 }), this.fire("closemask");
2954
+ },
2955
+ /**
2956
+ * 初始化图层信息
2957
+ * 有协同服务时,处理为树结构
2958
+ * 无协同服务时,处理为列表结构
2959
+ * @param {enum} type 类型,'leaf'(默认):叶子节点为实际图层,'branch':叶子节点为末级图集,图层置于layers属性
2960
+ * @param {array<string>} disabledLayerSets 禁用的图集,支持'x>y>z'的选择方式
2961
+ * @returns {treeLayers,visibleLayers}
2962
+ * @property {array<object>} treeLayers 树结构:{id,label,children}
2963
+ * @property {array<string>} visibleKeys 可见图层keys
2964
+ */
2965
+ async formatLayerGroup(e = "leaf", t = []) {
2966
+ let n = [], r = [], { treeLayersGroup: s } = this.options;
2967
+ const o = await this.requestServer({
2968
+ api: "layer/getlayers",
2969
+ message: "获取图层",
2970
+ loadMask: !1
2971
+ });
2972
+ let a;
2973
+ if (s ? a = s : a = await this.requestServer({
2974
+ api: "layer/getlayergroups",
2975
+ params: { type: 1 },
2976
+ message: "获取图层分组",
2977
+ forceResolve: !0,
2978
+ loadMask: !1
2979
+ }), o && o.layers) {
2980
+ if (a && a.layergroups ? a.layergroups.forEach((i, l) => {
2981
+ let u = n, d = [];
2982
+ i.layers.forEach((c) => {
2983
+ const p = _.find(o.layers, { name: c });
2984
+ if (p) {
2985
+ const m = `LEAF_${l}_${p.guid}`;
2986
+ p.visible && r.push(m), d.push({ id: m, label: c });
2987
+ }
2988
+ });
2989
+ const f = _.split(i.name, "^");
2990
+ f.forEach((c, p) => {
2991
+ const m = p + 1;
2992
+ let h = _.findIndex(u, { label: c });
2993
+ if (h < 0 && (h = u.length, u.push({ id: `NODE_${l}_${p}`, label: c, level: m, children: [] })), p == f.length - 1) {
2994
+ const w = d.map((I) => _.merge(I, { level: m + 1 }));
2995
+ e == "leaf" ? u[h].children = _.concat(u[h].children, w) : e == "branch" && (u[h].layers = _.concat(u[h].children, w), i.visible && r.push(u[h].id));
2996
+ } else
2997
+ u = u[h].children;
2998
+ });
2999
+ }) : o.layers.forEach((i) => {
3000
+ i.name && i.name !== "0" && (n.push({
3001
+ id: i.guid,
3002
+ label: i.name
3003
+ }), i.visible && r.push(i.guid));
3004
+ }), Array.isArray(t) && t.length > 0) {
3005
+ let i = [], l = [];
3006
+ if (t.forEach((u) => {
3007
+ let d;
3008
+ u.split(">").forEach((f) => {
3009
+ f && (d = Yt(d ? [d] : n, { label: f }));
3010
+ }), d && i.push(d.id);
3011
+ }), i.length > 0) {
3012
+ const u = (f) => {
3013
+ let c = [];
3014
+ return Array.isArray(f.children) && f.children.length > 0 ? f.children.forEach((p) => {
3015
+ c = _.concat(c, u(p));
3016
+ }) : c = _.concat(c, f.layers || f), c;
3017
+ }, d = (f) => {
3018
+ let c = f;
3019
+ if (_.includes(i, f.id))
3020
+ c = null, l.push(f.id), u(f).forEach((p) => {
3021
+ l.push(p.id);
3022
+ });
3023
+ else {
3024
+ let p = c.children;
3025
+ p && p.length > 0 && (c.children = _.compact(p.map((m) => d(m))));
3026
+ }
3027
+ return c;
3028
+ };
3029
+ n = _.compact(n.map((f) => d(f))), r = _.pull(r, ..._.uniq(l));
3030
+ }
3031
+ }
3032
+ this.treeLayers = n, this.visibleKeys = r;
3033
+ }
3034
+ },
3035
+ /**
3036
+ * 显示指定图层
3037
+ * @param {array} nodes 图层节点集,兼容keys/leaf节点/branch节点
3038
+ * @param {boolean} args.loadMask 是否添加遮罩层
3039
+ * @param {boolean} args.refreshTiles 是否刷新瓦片
3040
+ * @returns {array} 对应的图层keys
3041
+ */
3042
+ async showLayers(e = [], t = { loadMask: !0, refreshTiles: !0 }) {
3043
+ const n = _.isUndefined(t.loadMask) ? !0 : !!t.loadMask, r = _.isUndefined(t.refreshTiles) ? !0 : !!t.refreshTiles;
3044
+ await this.requestServer({
3045
+ api: "layer/hidelayers",
3046
+ params: { type: "all" },
3047
+ message: "关闭全部图层",
3048
+ loadMask: n
3049
+ });
3050
+ const s = (i) => {
3051
+ let l = [], u = [];
3052
+ if (Array.isArray(i)) {
3053
+ const d = (f, c) => {
3054
+ let p = [];
3055
+ function m(h) {
3056
+ for (let w of h)
3057
+ if (w.id == c) {
3058
+ Array.isArray(w.layers) ? p = w.layers.map((I) => I.label) : p = [w.label];
3059
+ break;
3060
+ } else Array.isArray(w.children) && w.children.length > 0 && m(w.children);
3061
+ }
3062
+ return m(f), p;
3063
+ };
3064
+ i.forEach((f) => {
3065
+ typeof f == "string" ? (l = _.concat(l, d(this.treeLayers, f)), u.push(f)) : typeof f == "object" && (Array.isArray(f.layers) ? (l = _.concat(l, f.layers.map((c) => c.label)), u = _.concat(l, f.layers.map((c) => c.id))) : (l.push(f.label), u.push(f.id)));
3066
+ });
3067
+ }
3068
+ return [l, u];
3069
+ }, [o, a] = s(e);
3070
+ return await this.requestServer({
3071
+ api: "layer/showlayers",
3072
+ params: { layers: _.join(o) },
3073
+ message: "打开指定图层",
3074
+ loadMask: n
3075
+ }), r && this.fire("refreshtilelayer"), this.visibleKeys = a, this.visibleKeys;
3076
+ },
3077
+ /**
3078
+ * 显示指定图组,支持'xx>yy>zz'形式的精确选择
3079
+ * @param {array} sets 图组名称
3080
+ * @param {boolean} args.loadMask 是否添加遮罩层
3081
+ * @param {boolean} args.refreshTiles 是否刷新瓦片
3082
+ * @returns {array} 对应的图层keys
3083
+ */
3084
+ async showLayerSets(e = [], t = { loadMask: !0, refreshTiles: !0 }) {
3085
+ const n = _.isUndefined(t.loadMask) ? !0 : !!t.loadMask, r = _.isUndefined(t.refreshTiles) ? !0 : !!t.refreshTiles;
3086
+ if (_.isString(e) && e.length > 0 && (e = [e]), this.treeLayers.length > 0) {
3087
+ const s = (a) => {
3088
+ let i = [];
3089
+ return Array.isArray(a.children) && a.children.length > 0 ? a.children.forEach((l) => {
3090
+ i = _.concat(i, s(l));
3091
+ }) : i = _.concat(i, a.layers || a), i;
3092
+ };
3093
+ let o = [];
3094
+ return e.forEach((a) => {
3095
+ let i;
3096
+ a.split(">").forEach((l) => {
3097
+ l && (i = Yt(i ? [i] : this.treeLayers, { label: l }));
3098
+ }), i && (o.push(i.id), s(i).forEach((l) => {
3099
+ o.push(l.id);
3100
+ }));
3101
+ }), await this.showLayers(o, { loadMask: n, refreshTiles: r }), o;
3102
+ }
3103
+ },
3104
+ /**
3105
+ * 查询实体信息
3106
+ * @param {object} params 查询参数
3107
+ * @param {boolean} loadMask 是否添加遮罩层
3108
+ */
3109
+ queryEntity(e = {}, t) {
3110
+ return this.requestServer({
3111
+ api: "query/entity",
3112
+ params: e,
3113
+ message: "查询实体",
3114
+ loadMask: t
3115
+ });
3116
+ },
3117
+ // 获取缩略图
3118
+ getThumbnail() {
3119
+ return new Promise((e) => {
3120
+ if (this.extent.length == 4) {
3121
+ const { url: t, dsid: n, uid: r } = this.requestOptions;
3122
+ xt.get(`${t}wmsmap/getmap`, {
3123
+ params: {
3124
+ dsid: n,
3125
+ uid: r,
3126
+ request: "GetMap",
3127
+ service: "WMS",
3128
+ width: 256,
3129
+ height: 256,
3130
+ format: "image/png",
3131
+ transparent: !0,
3132
+ version: "1.1.1",
3133
+ bbox: _.join(this.extent, ",")
3134
+ },
3135
+ responseType: "arraybuffer"
3136
+ }).then((s) => {
3137
+ const o = btoa(new Uint8Array(s.data).reduce((a, i) => a + String.fromCharCode(i), ""));
3138
+ e(`data:image/png;base64,${o}`);
3139
+ });
3140
+ }
3141
+ });
3142
+ },
3143
+ // 获取切片图层对象
3144
+ // 适用于requestOptions、leafletOptions以及图层状态已经准备的场景
3145
+ currentTileLayer() {
3146
+ const { url: e, dsid: t, uid: n } = this.requestOptions, { wmscrs: r, maxZoom: s } = this.leafletOptions, o = `${e}wmsmap/getmap?dsid=${t}&uid=${n}&tid=${We()}`;
3147
+ return L.tileLayer.wms(o, {
3148
+ format: "image/png",
3149
+ transparent: !0,
3150
+ crs: r,
3151
+ maxZoom: s
3152
+ });
3153
+ },
3154
+ // 生成切片图层对象
3155
+ async createTileLayer({ beforeCreate: e } = {}) {
3156
+ return await this.start(), _.isFunction(e) && await e(this), await this.setDefaultLayers(), this.currentTileLayer();
3157
+ }
3158
+ });
3159
+ function Xi(e, t) {
3160
+ function n(r) {
3161
+ return Array.isArray(r) && r.length == 2 ? { x: r[0], y: r[1] } : r.lat && r.lng ? { x: r.lat, y: r.lng } : r;
3162
+ }
3163
+ return e = n(e), t = n(t), Math.sqrt((e.x - t.x) * (e.x - t.x) + (e.y - t.y) * (e.y - t.y));
3164
+ }
3165
+ L.AnimatedMarker = L.Marker.extend({
3166
+ /**
3167
+ * 活动状态
3168
+ * 1. disabled 不可用
3169
+ * 2. free 空闲
3170
+ * 3. move 移动中
3171
+ * 4. pause 暂停中
3172
+ */
3173
+ _status: "disabled",
3174
+ chunkMoveTimer: null,
3175
+ options: {
3176
+ // 持续时间
3177
+ duration: 5e3,
3178
+ // 轨迹序列
3179
+ latLngs: [],
3180
+ // 浮于其他Marker上层
3181
+ zIndexOffset: 1e3
3182
+ },
3183
+ initialize(e) {
3184
+ L.setOptions(this, e);
3185
+ const t = this.options.latLngs;
3186
+ t && t.length > 1 ? (L.Marker.prototype.initialize.call(this, t[0], this.options), this._status = "free") : console.error("invalid latLngs");
3187
+ },
3188
+ // 开始动画
3189
+ startMove() {
3190
+ if (this._status == "free") {
3191
+ const { duration: e, latLngs: t } = this.options;
3192
+ let n = 0, r = [], s = [];
3193
+ for (let o = 0; o < t.length - 1; o++) {
3194
+ const a = Xi(t[o], t[o + 1]);
3195
+ n += a, r.push(a);
3196
+ }
3197
+ r.forEach((o) => {
3198
+ s.push(o / n * e);
3199
+ }), this.stepDurations = s, this.chunkIndex = 0, this._status = "move", this.setLatLng(t[0]), _.delay(() => {
3200
+ this.chunkMove(), this.fire("startmove");
3201
+ });
3202
+ } else
3203
+ console.error("instance is not free");
3204
+ },
3205
+ // 分段移动
3206
+ chunkMove() {
3207
+ if (this.chunkIndex < this.stepDurations.length) {
3208
+ if (this._status == "pause")
3209
+ return;
3210
+ const e = this.stepDurations[this.chunkIndex], t = `transform ${e}ms linear`;
3211
+ this.setTransition(t), this.chunkIndex += 1, _.delay(() => {
3212
+ this.fire("chunkmove", { index: this.chunkIndex, duration: e }), this.setLatLng(this.options.latLngs[this.chunkIndex]), this.chunkMoveTimer = _.delay(this.chunkMove.bind(this), e);
3213
+ });
3214
+ } else
3215
+ this.stopMove();
3216
+ },
3217
+ // 设置动画参数
3218
+ setTransition(e) {
3219
+ const t = L.DomUtil.TRANSITION, n = this._icon ? this._icon.style : "";
3220
+ n && (n[t] = e);
3221
+ const r = this._shadow ? this._shadow.style : "";
3222
+ r && (r[t] = e);
3223
+ const s = this.getTooltip(), o = s && s._container ? s._container.style : "";
3224
+ o && (o[t] = e);
3225
+ const a = this.getPopup(), i = a && a._container ? a._container.style : "";
3226
+ i && (i[t] = e);
3227
+ },
3228
+ // 停止动画
3229
+ stopMove() {
3230
+ this._status = "free", this.setTransition(null), this.chunkMoveTimer && (clearTimeout(this.chunkMoveTimer), this.chunkMoveTimer = null), this.setLatLng(_.last(this.options.latLngs)), this.fire("stopmove");
3231
+ },
3232
+ // 暂停动画
3233
+ pauseMove() {
3234
+ this._status == "move" && (this._status = "pause", this.fire("pausemove"));
3235
+ },
3236
+ // 继续动画
3237
+ continueMove() {
3238
+ this._status == "pause" && (this._status = "move", this.fire("continuemove"), this.chunkMove());
3239
+ }
3240
+ });
3241
+ L.animatedMarker = (e) => new L.AnimatedMarker(e);
3242
+ L.EchartsLayer = L.Layer.extend({
3243
+ includes: [],
3244
+ _echartsContainer: null,
3245
+ _map: null,
3246
+ _ec: null,
3247
+ _echartsOptions: null,
3248
+ options: {
3249
+ loadWhileAnimating: !1
3250
+ },
3251
+ initialize: function(e, t) {
3252
+ L.Util.setOptions(this, t), this.setOption(e);
3253
+ },
3254
+ /**
3255
+ * @function L.supermap.echartsLayer.prototype.setOption
3256
+ * @description 设置图表地图参数。
3257
+ * @param {Object} echartsOptions - 图表参数。
3258
+ * @param {string} lazyUpdate - 后台自动更新。
3259
+ * @param {boolean} [notMerge] - 是否合并参数。
3260
+ */
3261
+ setOption: function(e, t, n) {
3262
+ const r = e.baseOption || e;
3263
+ r.LeafletMap = r.LeafletMap || {
3264
+ roam: !0
3265
+ }, r.animation = r.animation === !0, this._echartsOptions = e, this._ec && this._ec.setOption(e, t, n);
3266
+ },
3267
+ getEcharts: function() {
3268
+ return this._ec;
3269
+ },
3270
+ _disableEchartsContainer: function() {
3271
+ this._echartsContainer.style.visibility = "hidden";
3272
+ },
3273
+ _enableEchartsContainer: function() {
3274
+ this._echartsContainer.style.visibility = "visible";
3275
+ },
3276
+ /**
3277
+ * @private
3278
+ * @function L.supermap.echartsLayer.prototype.onAdd
3279
+ * @description 添加地图。
3280
+ * @param {L.Map} map - 待添加的地图。
3281
+ */
3282
+ onAdd: function(e) {
3283
+ this._map = e, this._initEchartsContainer(), this._ec = Me.init(this._echartsContainer), this._ec.leafletMap = e;
3284
+ const t = this;
3285
+ e.on("zoomstart", function() {
3286
+ t._disableEchartsContainer();
3287
+ }), !t.options.loadWhileAnimating && e.on("movestart", function() {
3288
+ t._disableEchartsContainer();
3289
+ }), Me.registerAction({
3290
+ type: "LeafletMapLayout",
3291
+ event: "LeafletMapLayout",
3292
+ update: "updateLayout"
3293
+ }, function(n) {
3294
+ }), Me.registerCoordinateSystem(
3295
+ "leaflet",
3296
+ le
3297
+ ), Me.extendComponentModel({
3298
+ type: "LeafletMap",
3299
+ getBMap: function() {
3300
+ return this.__LeafletMap;
3301
+ },
3302
+ defaultOption: {
3303
+ roam: !1
3304
+ }
3305
+ }), Me.extendComponentView({
3306
+ type: "LeafletMap",
3307
+ render: function(n, r, s) {
3308
+ let o = !0, a = r.scheduler.ecInstance.leafletMap;
3309
+ const i = s.getZr().painter.getViewportRoot(), l = a.options.zoomAnimation && L.Browser.any3d;
3310
+ i.className = " leaflet-layer leaflet-zoom-" + (l ? "animated" : "hide") + " echarts-layer";
3311
+ const u = L.DomUtil.testProp(["transformOrigin", "WebkitTransformOrigin", "msTransformOrigin"]);
3312
+ i.style[u] = "50% 50%";
3313
+ const d = n.coordinateSystem, f = s.getZr().painter.getLayers(), c = function() {
3314
+ if (o)
3315
+ return;
3316
+ const h = t._map.containerPointToLayerPoint([0, 0]), w = [h.x || 0, h.y || 0];
3317
+ if (i.style.left = w[0] + "px", i.style.top = w[1] + "px", !t.options.loadWhileAnimating) {
3318
+ for (let I in f)
3319
+ f.hasOwnProperty(I) && f[I] && p(f[I].ctx);
3320
+ t._enableEchartsContainer();
3321
+ }
3322
+ d.setMapOffset(w), n.__mapOffset = w, s.dispatchAction({
3323
+ type: "LeafletMapLayout"
3324
+ });
3325
+ };
3326
+ function p(h) {
3327
+ h && h.clearRect && h.clearRect(0, 0, h.canvas.width, h.canvas.height);
3328
+ }
3329
+ function m() {
3330
+ o || (s.dispatchAction({
3331
+ type: "LeafletMapLayout"
3332
+ }), t._enableEchartsContainer());
3333
+ }
3334
+ t._oldMoveHandler && a.off(t.options.loadWhileAnimating ? "move" : "moveend", t._oldMoveHandler), t._oldZoomEndHandler && a.off("zoomend", t._oldZoomEndHandler), a.on(t.options.loadWhileAnimating ? "move" : "moveend", c), a.on("zoomend", m), t._oldMoveHandler = c, t._oldZoomEndHandler = m, o = !1;
3335
+ }
3336
+ }), this._ec.setOption(this._echartsOptions);
3337
+ },
3338
+ onRemove: function() {
3339
+ this._ec.clear(), this._ec.dispose(), delete this._ec, L.DomUtil.remove(this._echartsContainer), this._oldZoomEndHandler && (this._map.off("zoomend", this._oldZoomEndHandler), this._oldZoomEndHandler = null), this._oldMoveHandler && (this._map.off(this.options.loadWhileAnimating ? "move" : "moveend", this._oldMoveHandler), this._oldMoveHandler = null), this._resizeHandler && (this._map.off("resize", this._resizeHandler), this._resizeHandler = null), delete this._map;
3340
+ },
3341
+ _initEchartsContainer: function() {
3342
+ const e = this._map.getSize(), t = document.createElement("div");
3343
+ t.style.position = "absolute", t.style.height = e.y + "px", t.style.width = e.x + "px", t.style.zIndex = 10, this._echartsContainer = t, this.getPane().appendChild(this._echartsContainer);
3344
+ const n = this;
3345
+ function r(s) {
3346
+ let o = s.newSize;
3347
+ n._echartsContainer.style.width = o.x + "px", n._echartsContainer.style.height = o.y + "px", n._ec.resize();
3348
+ }
3349
+ this._map.on("resize", r), this._resizeHandler = r;
3350
+ }
3351
+ });
3352
+ function le(e) {
3353
+ this._LeafletMap = e, this.dimensions = ["lng", "lat"], this._mapOffset = [0, 0];
3354
+ }
3355
+ le.prototype.dimensions = ["lng", "lat"];
3356
+ le.prototype.setMapOffset = function(e) {
3357
+ this._mapOffset = e;
3358
+ };
3359
+ le.prototype.getBMap = function() {
3360
+ return this._LeafletMap;
3361
+ };
3362
+ le.prototype.prepareCustoms = function() {
3363
+ const e = Me.util, t = this.getViewRect();
3364
+ return {
3365
+ coordSys: {
3366
+ // The name exposed to user is always 'cartesian2d' but not 'grid'.
3367
+ type: "leaflet",
3368
+ x: t.x,
3369
+ y: t.y,
3370
+ width: t.width,
3371
+ height: t.height
3372
+ },
3373
+ api: {
3374
+ coord: e.bind(this.dataToPoint, this),
3375
+ size: e.bind(n, this)
3376
+ }
3377
+ };
3378
+ function n(r, s) {
3379
+ return s = s || [0, 0], e.map([0, 1], function(o) {
3380
+ const a = s[o], i = r[o] / 2, l = [], u = [];
3381
+ return l[o] = a - i, u[o] = a + i, l[1 - o] = u[1 - o] = s[1 - o], Math.abs(this.dataToPoint(l)[o] - this.dataToPoint(u)[o]);
3382
+ }, this);
3383
+ }
3384
+ };
3385
+ le.prototype.dataToPoint = function(e) {
3386
+ e[1] === null && (e[1] = L.CRS.EPSG3857.projection.MAX_LATITUDE);
3387
+ const t = this._LeafletMap.latLngToLayerPoint([e[1], e[0]]), n = this._mapOffset;
3388
+ return [t.x - n[0], t.y - n[1]];
3389
+ };
3390
+ le.prototype.fixLat = function(e) {
3391
+ return e >= 90 ? 89.99999999999999 : e <= -90 ? -89.99999999999999 : e;
3392
+ };
3393
+ le.prototype.pointToData = function(e) {
3394
+ let t = this._mapOffset, n = this._LeafletMap.layerPointToLatLng([e[0] + t[0], e[1] + t[1]]);
3395
+ return [n.lng, n.lat];
3396
+ };
3397
+ le.prototype.getViewRect = function() {
3398
+ const e = this._LeafletMap.getSize();
3399
+ return new Me.graphic.BoundingRect(0, 0, e.x, e.y);
3400
+ };
3401
+ le.prototype.getRoamTransform = function() {
3402
+ return Me.matrix.create();
3403
+ };
3404
+ le.dimensions = le.prototype.dimensions;
3405
+ le.create = function(e) {
3406
+ let t, n = e.scheduler.ecInstance.leafletMap;
3407
+ e.eachComponent("LeafletMap", function(r) {
3408
+ t || (t = new le(n)), r.coordinateSystem = t, r.coordinateSystem.setMapOffset(r.__mapOffset || [0, 0]);
3409
+ }), e.eachSeries(function(r) {
3410
+ (!r.get("coordinateSystem") || r.get("coordinateSystem") === "leaflet") && (t || (t = new le(n)), r.coordinateSystem = t, r.animation = r.animation === !0);
3411
+ });
3412
+ };
3413
+ L.echartsLayer = (e, t) => new L.EchartsLayer(e, t);
3414
+ L.ElasticMarker = L.Marker.extend({
3415
+ targetMap: null,
3416
+ options: {
3417
+ // 启用动态尺寸
3418
+ elasticScale: !0,
3419
+ // 合适的级别
3420
+ fitZoom: 10,
3421
+ // 最大比例
3422
+ maxScale: 1.35,
3423
+ // 最小比例
3424
+ minScale: 0.35,
3425
+ // 比例变换系数
3426
+ scaleFactor: 1.35,
3427
+ // 启用动态透明度
3428
+ elasticOpacity: !1,
3429
+ opacityFitZoom: null,
3430
+ minOpacity: 0.1,
3431
+ opacityFactor: 2,
3432
+ // 启动动态tooltip
3433
+ elasticTooltip: !0,
3434
+ tooltipFitZoom: null
3435
+ },
3436
+ initialize(e, t) {
3437
+ L.setOptions(this, t), this.options.opacityFitZoom = this.options.opacityFitZoom || this.options.fitZoom, this.options.tooltipFitZoom = this.options.tooltipFitZoom || this.options.fitZoom, this._bindEvents(), L.Marker.prototype.initialize.call(this, e, this.options);
3438
+ },
3439
+ _bindEvents() {
3440
+ this.on("add", (e) => {
3441
+ this.targetMap = e.target._map, this.targetMap.on("zoomend", this._update, this), this._update();
3442
+ }), this.on("remove", () => {
3443
+ this.targetMap.off("zoomend", this._update, this), this.targetMap = null;
3444
+ }), this.on("tooltipopen", (e) => {
3445
+ this._updateTooltip();
3446
+ });
3447
+ },
3448
+ _update() {
3449
+ if (this.options.elasticScale && this.targetMap) {
3450
+ const e = this.targetMap.getZoom();
3451
+ let t = 1 - (this.options.fitZoom - e) * this.options.scaleFactor * 0.1;
3452
+ t = _.max([this.options.minScale, t]), t = _.min([this.options.maxScale, t]);
3453
+ const n = this.getIcon();
3454
+ if (n instanceof L.DivIcon) {
3455
+ const r = je(this._icon), s = r.contents();
3456
+ this.options.interactive && t < 1 && (r.css("pointer-events", "none"), s.css("pointer-events", "auto")), s.css("transform", `scale(${t})`), s.css("transition", "0.2s");
3457
+ } else if (n instanceof L.Icon) {
3458
+ const r = je(this._icon), s = je(this._shadow);
3459
+ let o, a;
3460
+ n instanceof L.Icon.Default ? o = a = L.Icon.Default.prototype.options.iconAnchor : (o = n.options.iconAnchor, a = n.options.shadowAnchor), r.length > 0 && (r.css("transform", r.css("transform") + ` scale(${t})`), o && o.length == 2 && r.css("transform-origin", `${o[0] + "px"} ${o[1] + "px"}`), r.css("transition", "0.2s")), s.length > 0 && (s.css("transform", s.css("transform") + ` scale(${t})`), a && a.length == 2 && s.css("transform-origin", `${a[0] + "px"} ${a[1] + "px"}`), s.css("transition", "0.2s"));
3461
+ }
3462
+ }
3463
+ if (this.options.elasticOpacity && this.targetMap) {
3464
+ const e = this.targetMap.getZoom();
3465
+ let t = 1;
3466
+ e < this.options.fitZoom && (t = 1 - (this.options.fitZoom - e) * this.options.opacityFactor * 0.1), t = _.max([this.options.minOpacity, t]);
3467
+ const n = je(this._icon), r = je(this._shadow);
3468
+ n.length > 0 && n.css("opacity", t), r.length > 0 && r.css("opacity", t);
3469
+ }
3470
+ this._updateTooltip();
3471
+ },
3472
+ _updateTooltip() {
3473
+ if (this.options.elasticTooltip && this.targetMap) {
3474
+ const e = this.getTooltip();
3475
+ if (e) {
3476
+ const t = this.targetMap.getZoom(), n = je(e._container);
3477
+ t >= this.options.fitZoom ? n.css("display", "") : n.css("display", "none"), _.delay(() => {
3478
+ this.isTooltipOpen() && e._map && e._latlng && e._container && e._updatePosition();
3479
+ });
3480
+ }
3481
+ }
3482
+ }
3483
+ });
3484
+ L.elasticMarker = (e, t) => new L.ElasticMarker(e, t);
3485
+ function Jt(e, t, n = {}) {
3486
+ const r = { type: "Feature" };
3487
+ return (n.id === 0 || n.id) && (r.id = n.id), n.bbox && (r.bbox = n.bbox), r.properties = {}, r.geometry = e, r;
3488
+ }
3489
+ function Qi(e, t, n = {}) {
3490
+ if (!e)
3491
+ throw new Error("coordinates is required");
3492
+ if (!Array.isArray(e))
3493
+ throw new Error("coordinates must be an Array");
3494
+ if (e.length < 2)
3495
+ throw new Error("coordinates must be at least 2 numbers long");
3496
+ if (!wn(e[0]) || !wn(e[1]))
3497
+ throw new Error("coordinates must contain numbers");
3498
+ return Jt({
3499
+ type: "Point",
3500
+ coordinates: e
3501
+ }, t, n);
3502
+ }
3503
+ function el(e, t, n = {}) {
3504
+ for (const s of e) {
3505
+ if (s.length < 4)
3506
+ throw new Error(
3507
+ "Each LinearRing of a Polygon must have 4 or more Positions."
3508
+ );
3509
+ if (s[s.length - 1].length !== s[0].length)
3510
+ throw new Error("First and last Position are not equivalent.");
3511
+ for (let o = 0; o < s[s.length - 1].length; o++)
3512
+ if (s[s.length - 1][o] !== s[0][o])
3513
+ throw new Error("First and last Position are not equivalent.");
3514
+ }
3515
+ return Jt({
3516
+ type: "Polygon",
3517
+ coordinates: e
3518
+ }, t, n);
3519
+ }
3520
+ function tl(e, t, n = {}) {
3521
+ if (e.length < 2)
3522
+ throw new Error("coordinates must be an array of two or more positions");
3523
+ return Jt({
3524
+ type: "LineString",
3525
+ coordinates: e
3526
+ }, t, n);
3527
+ }
3528
+ function wn(e) {
3529
+ return !isNaN(e) && e !== null && !Array.isArray(e);
3530
+ }
3531
+ const At = (e) => {
3532
+ let t = [];
3533
+ return e.geometry.coordinates.forEach((r) => {
3534
+ t.push(r.map((s) => ({
3535
+ lat: s[1],
3536
+ lng: s[0]
3537
+ })));
3538
+ }), t;
3539
+ }, nl = {
3540
+ /**
3541
+ * 点缓冲分析
3542
+ * @param {L.LatLng} center 中心点
3543
+ * @param {Number} distance 缓冲距离
3544
+ * @param {String} units 单位
3545
+ * @returns {Array<Array<L.LatLng>>} 缓冲区经纬度序列
3546
+ */
3547
+ bufferPoint(e, t, n = "meters") {
3548
+ const r = [e.lng, e.lat], s = Lt(Qi(r), t, { units: n });
3549
+ return At(s);
3550
+ },
3551
+ /**
3552
+ * 路径缓冲分析
3553
+ * @param {Array<L.LatLng>} latLngs 路径经纬度序列
3554
+ * @param {Number} distance 缓冲距离
3555
+ * @param {String} units 单位
3556
+ * @returns {Array<Array<L.LatLng>>} 缓冲区经纬度序列
3557
+ */
3558
+ bufferLine(e, t, n = "meters") {
3559
+ const r = e.map((o) => [o.lng, o.lat]), s = Lt(tl(r), t, { units: n });
3560
+ return At(s);
3561
+ },
3562
+ /**
3563
+ * 区域缓冲分析
3564
+ * @param {Array<L.LatLng>} latLngs 区域经纬度序列
3565
+ * @param {Number} distance 缓冲距离
3566
+ * @param {String} units 单位
3567
+ * @returns {Array<Array<L.LatLng>>} 缓冲区经纬度序列
3568
+ */
3569
+ bufferArea(e, t, n = "meters") {
3570
+ let r = e.map((o) => [o.lng, o.lat]);
3571
+ r.push(r[0]);
3572
+ const s = Lt(el([r]), t, { units: n });
3573
+ return At(s);
3574
+ }
3575
+ }, rl = {
3576
+ /**
3577
+ * 角度转弧度
3578
+ * @param {角度} angle
3579
+ */
3580
+ angleToRad(e) {
3581
+ return e * Math.PI / 180;
3582
+ },
3583
+ /**
3584
+ * 弧度转角度
3585
+ * @param {弧度} rad
3586
+ */
3587
+ radToAngle(e) {
3588
+ return e * 180 / Math.PI;
3589
+ },
3590
+ /**
3591
+ * 水平角度转顺时针角
3592
+ * @param {角度} angle
3593
+ */
3594
+ toClockwiseAngle(e) {
3595
+ let t = 90 - e;
3596
+ return t < 0 && (t += 360), t;
3597
+ },
3598
+ /**
3599
+ * 求两点水平弧度
3600
+ * @param {L.Point} a 起点
3601
+ * @param {L.Point} b 终点
3602
+ */
3603
+ computeRad(e, t) {
3604
+ return Math.atan2(t.y - e.y, t.x - e.x);
3605
+ },
3606
+ /**
3607
+ * 求两点水平角度
3608
+ * @param {L.Point} a 起点
3609
+ * @param {L.Point} b 终点
3610
+ */
3611
+ computeAngle(e, t) {
3612
+ return this.radToAngle(this.computeRad(e, t));
3613
+ },
3614
+ /**
3615
+ * 获取线段夹角弧度
3616
+ * @param {L.Point} a 交点
3617
+ * @param {L.Point} b 终点一
3618
+ * @param {L.Point} c 终点二
3619
+ */
3620
+ segmentsRad(e, t, n) {
3621
+ const r = t.x - e.x, s = t.y - e.y, o = n.x - e.x, a = n.y - e.y, i = r * o + s * a, l = r * a - s * o;
3622
+ return Math.atan2(l, i);
3623
+ },
3624
+ /**
3625
+ * 获取点到线段所在直线的垂足
3626
+ * @param {L.Point} a 点
3627
+ * @param {L.Point} m 线段起点
3628
+ * @param {L.Point} n 线段终点
3629
+ */
3630
+ footPointOnLine(e, t, n) {
3631
+ const r = (t.x - n.x) * (t.x - n.x) + (t.y - n.y) * (t.y - n.y), o = ((e.x - t.x) * (n.x - t.x) + (e.y - t.y) * (n.y - t.y)) / r, a = t.x + o * (n.x - t.x), i = t.y + o * (n.y - t.y);
3632
+ return L.point(a, i);
3633
+ },
3634
+ /**
3635
+ * 两线段所在直线的交点坐标,平行或共线时不返回
3636
+ * @param {L.Point} a 线段一起点
3637
+ * @param {L.Point} b 线段一终点
3638
+ * @param {L.Point} c 线段二起点
3639
+ * @param {L.Point} d 线段二终点
3640
+ */
3641
+ linesIntersection(e, t, n, r) {
3642
+ const s = (t.y - e.y) * (r.x - n.x) - (e.x - t.x) * (n.y - r.y);
3643
+ if (s) {
3644
+ const o = ((t.x - e.x) * (r.x - n.x) * (n.y - e.y) + (t.y - e.y) * (r.x - n.x) * e.x - (r.y - n.y) * (t.x - e.x) * n.x) / s, a = -((t.y - e.y) * (r.y - n.y) * (n.x - e.x) + (t.x - e.x) * (r.y - n.y) * e.y - (r.x - n.x) * (t.y - e.y) * n.y) / s;
3645
+ return L.point(o, a);
3646
+ }
3647
+ },
3648
+ /**
3649
+ * 根据经纬度计算累计距离,单位米
3650
+ * @param {Array<L.LatLng>} latLngs
3651
+ * @param {L.CRS} 坐标系,默认使用L.CRS.EPSG3857
3652
+ */
3653
+ distanceByLatLngs(e, t = L.CRS.EPSG3857) {
3654
+ typeof t.distance != "function" && (t = L.CRS.EPSG3857);
3655
+ let n = 0;
3656
+ if (Array.isArray(e) && e.length > 1)
3657
+ for (let r = 0; r < e.length - 1; r++)
3658
+ n += t.distance(e[r], e[r + 1]);
3659
+ return n;
3660
+ },
3661
+ /**
3662
+ * 根据经纬度计算面积,单位平方米
3663
+ * @param {Array<L.LatLng>} latLngs
3664
+ */
3665
+ areaByLatLngs(e) {
3666
+ let t = e.length, n = 0, r = Math.PI / 180, s, o;
3667
+ if (t > 2) {
3668
+ for (let a = 0; a < t; a++)
3669
+ s = e[a], o = e[(a + 1) % t], n += (o.lng - s.lng) * r * (2 + Math.sin(s.lat * r) + Math.sin(o.lat * r));
3670
+ n = n * 6378137 * 6378137 / 2;
3671
+ }
3672
+ return Math.abs(n);
3673
+ },
3674
+ /**
3675
+ * 根据坐标点计算面积
3676
+ * @param {Array<L.Point>} points
3677
+ */
3678
+ areaByPoints(e) {
3679
+ let t = 0;
3680
+ if (Array.isArray(e) && e.length > 2) {
3681
+ let n = 0;
3682
+ for (let r = 0; r < e.length; r++)
3683
+ r + 1 == e.length ? n += e[r].x * e[0].y - e[0].x * e[r].y : n += e[r].x * e[r + 1].y - e[r + 1].x * e[r].y;
3684
+ t = 1 / 2 * Math.abs(n);
3685
+ }
3686
+ return t;
3687
+ },
3688
+ /**
3689
+ * 转换面积,增加单位
3690
+ * @param {number} area 面积数字,单位平方米
3691
+ */
3692
+ readableArea(e) {
3693
+ let t = 0;
3694
+ return e > 1e3 * 1e3 ? t = (e / (1e3 * 1e3)).toFixed(2) + " km²" : t = Math.ceil(e) + " m²", t;
3695
+ },
3696
+ /**
3697
+ * 点是否在多边形内,射线法
3698
+ * @param {L.Point} point 给定点
3699
+ * @param {Array<L.Point>} points 多边形坐标
3700
+ * @returns {Boolean} 是否置于多边形内或边界上
3701
+ */
3702
+ isPointInPoly(e, t) {
3703
+ const n = e.x, r = e.y;
3704
+ let s = !1, o = !1;
3705
+ const a = t.length;
3706
+ for (let i = 0, l = a - 1; i < a; l = i, i++) {
3707
+ const u = t[i].x, d = t[i].y, f = t[l].x, c = t[l].y;
3708
+ if ((u === n && d === r || f === n && c === r) && (o = !0), d < r && c >= r || d >= r && c < r) {
3709
+ const p = u + (r - d) * (f - u) / (c - d);
3710
+ o = p === n, p > n && (s = !s);
3711
+ }
3712
+ if (o)
3713
+ break;
3714
+ }
3715
+ return o || s;
3716
+ },
3717
+ /**
3718
+ * 点到面的距离,在内部视为0
3719
+ * @param {L.Point} point 给定点
3720
+ * @param {Array<L.Point>} points 多边形坐标
3721
+ * @param {L.CRS} crs 地图CRS
3722
+ * @returns {Boolean} 距离数值,若CRS可用,单位为米
3723
+ */
3724
+ distanceToPoly(e, t, n) {
3725
+ let r = 0;
3726
+ if (!this.isPointInPoly(e, t)) {
3727
+ let s = [], o = [];
3728
+ const a = t.length;
3729
+ for (let u = 0, d = a - 1; u < a; d = u, u++)
3730
+ s.push(L.LineUtil.pointToSegmentDistance(e, t[u], t[d])), o.push(L.LineUtil.closestPointOnSegment(e, t[u], t[d]));
3731
+ r = _.min(s);
3732
+ const i = _.indexOf(s, r), l = o[i];
3733
+ if (n && n.unproject) {
3734
+ const u = n.unproject(e), d = n.unproject(l);
3735
+ r = n.distance(u, d);
3736
+ }
3737
+ }
3738
+ return r;
3739
+ },
3740
+ /**
3741
+ * 点到折线的距离
3742
+ * @param {L.Point} point 给定点
3743
+ * @param {Array<L.Point>} points 折线坐标
3744
+ * @param {L.CRS} crs 地图CRS
3745
+ * @param {Boolean} 距离数值,若CRS可用,单位为米
3746
+ */
3747
+ distanceToLine(e, t, n) {
3748
+ let r = 0, s = [], o = [];
3749
+ if (Array.isArray(t) && t.length > 1) {
3750
+ for (let l = 0; l < t.length - 1; l++)
3751
+ s.push(L.LineUtil.pointToSegmentDistance(e, t[l], t[l + 1])), o.push(L.LineUtil.closestPointOnSegment(e, t[l], t[l + 1]));
3752
+ r = _.min(s);
3753
+ const a = _.indexOf(s, r), i = o[a];
3754
+ if (n && n.unproject) {
3755
+ const l = n.unproject(e), u = n.unproject(i);
3756
+ r = n.distance(l, u);
3757
+ }
3758
+ }
3759
+ return r;
3760
+ }
3761
+ };
3762
+ L.GeoUtil = L.extend(L.GeoUtil || {}, _.assign(rl, nl));
3763
+ L.FootageCalculator = L.FootageCalculator || {};
3764
+ L.FootageCalculator.Area = L.Evented.extend({
3765
+ options: {
3766
+ crs: L.CRS.EPSG3857,
3767
+ // 坐标转换类
3768
+ latlngs: [],
3769
+ // 边界经纬度
3770
+ headStart: null,
3771
+ // 机头经纬度
3772
+ headEnd: null,
3773
+ // 机头终点经纬度
3774
+ tailStart: null,
3775
+ // 机尾经纬度
3776
+ tailEnd: null
3777
+ /// 机尾终点经纬度
3778
+ },
3779
+ initialize(e) {
3780
+ L.setOptions(this, e);
3781
+ const { crs: t, latlngs: n, headStart: r, headEnd: s, tailStart: o, tailEnd: a } = this.options;
3782
+ if (t && t.project && t.unproject)
3783
+ this.crs = t;
3784
+ else
3785
+ throw new Error("请传入正确的crs参数");
3786
+ if (Array.isArray(n) && n.length > 2)
3787
+ this.latlngs = n;
3788
+ else
3789
+ throw new Error("请传入正确的latlngs参数");
3790
+ function i(u, d) {
3791
+ if (u < 0)
3792
+ throw new Error(`请传入正确的${d}参数,此参数必须是latlngs的某个节点`);
3793
+ }
3794
+ if (this.hsIndex = _.findIndex(n, (u) => _.isEqual(u, r)), i(this.hsIndex, "headStart"), this.heIndex = _.findIndex(n, (u) => _.isEqual(u, s)), i(this.heIndex, "headEnd"), this.tsIndex = _.findIndex(n, (u) => _.isEqual(u, o)), i(this.tsIndex, "tailStart"), this.teIndex = _.findIndex(n, (u) => _.isEqual(u, a)), i(this.teIndex, "tailEnd"), _.uniq([this.hsIndex, this.heIndex, this.tsIndex, this.teIndex]).length < 4)
3795
+ throw new Error("机头机尾坐标不允许重复");
3796
+ const l = Math.abs(this.hsIndex - this.tsIndex);
3797
+ if (l != 1 && l != n.length - 1)
3798
+ throw new Error("机头和机尾起点必须相邻");
3799
+ this.initParams();
3800
+ },
3801
+ // 初始化参数
3802
+ initParams() {
3803
+ this.points = this.latlngs.map((s) => this.crs.project(Tt(s)));
3804
+ const e = this.latlngs.length;
3805
+ let t = [], n = [], r = this.hsIndex < this.tsIndex;
3806
+ if (Math.abs(this.hsIndex - this.tsIndex) == e - 1 && (r = this.tsIndex == 0), r) {
3807
+ let s = this.hsIndex;
3808
+ this.heIndex > this.hsIndex && (s += e);
3809
+ for (let a = this.heIndex; a <= s; a++)
3810
+ t.push(this.points[a >= e ? a - e : a]);
3811
+ t.reverse();
3812
+ let o = this.teIndex;
3813
+ this.tsIndex > this.teIndex && (o += e);
3814
+ for (let a = this.tsIndex; a <= o; a++)
3815
+ n.push(this.points[a >= e ? a - e : a]);
3816
+ } else {
3817
+ let s = this.heIndex;
3818
+ this.hsIndex > this.heIndex && (s += e);
3819
+ for (let a = this.hsIndex; a <= s; a++)
3820
+ t.push(this.points[a >= e ? a - e : a]);
3821
+ let o = this.tsIndex;
3822
+ this.teIndex > this.tsIndex && (o += e);
3823
+ for (let a = this.teIndex; a <= o; a++)
3824
+ n.push(this.points[a >= e ? a - e : a]);
3825
+ n.reverse();
3826
+ }
3827
+ this.headSegments = [], t.forEach((s, o) => {
3828
+ o > 0 && this.headSegments.push({ start: t[o - 1], end: s });
3829
+ }), this.tailSegments = [], n.forEach((s, o) => {
3830
+ o > 0 && this.tailSegments.push({ start: n[o - 1], end: s });
3831
+ });
3832
+ },
3833
+ /**
3834
+ * 执行计算
3835
+ * @param {L.LatLng} headStart 机头起点
3836
+ * @param {L.LatLng} tailStart 机尾起点
3837
+ * @param {Number} headDistance 机头推进距离
3838
+ * @param {Number} tailDistance 机尾推进距离
3839
+ * @returns {L.LatLng} headEnd 推进后机头的经纬度
3840
+ * @returns {L.LatLng} tailEnd 推进后机尾的经纬度
3841
+ * @returns {Array<L.LatLng>} latlngs 推进的区域范围
3842
+ */
3843
+ doCalculate({ headStart: e, tailStart: t, headDistance: n, tailDistance: r }) {
3844
+ const s = this.crs.project(Tt(e)), o = this.crs.project(Tt(t)), a = this.calcWorkPath(s, this.headSegments, n), i = this.calcWorkPath(o, this.tailSegments, r), l = this.crs.unproject(_.last(a.path)), u = this.crs.unproject(_.last(i.path));
3845
+ let d = [], f = a.path, c = i.path;
3846
+ return c.reverse(), new Array(f, c).forEach((p) => {
3847
+ p.forEach((m) => {
3848
+ d.push(this.crs.unproject(m));
3849
+ });
3850
+ }), { headEnd: l, tailEnd: u, latlngs: d };
3851
+ },
3852
+ /**
3853
+ * 计算一次推进的结果
3854
+ * @param {L.Point} start 起点
3855
+ * @param {Array} segments 线段
3856
+ * @param {Number} distance 推进距离
3857
+ */
3858
+ calcWorkPath(e, t, n) {
3859
+ let r = 0, s = -1, o = -1, a;
3860
+ t.forEach((c, p) => {
3861
+ if (o < 0) {
3862
+ let m = c.start;
3863
+ s < 0 && L.LineUtil.pointToSegmentDistance(e, c.start, c.end) < 0.01 && (s = p, m = e);
3864
+ let h = 0;
3865
+ s >= 0 && (h = m.distanceTo(c.end)), r + h >= n && (o = p, a = this.calcEndPointOnLine(m, c.end, n - r)), r += h;
3866
+ }
3867
+ });
3868
+ let i = o;
3869
+ o < 0 && (i = t.length - 1, a = _.last(t).end);
3870
+ let l = [e];
3871
+ for (let c = s; c < i; c++)
3872
+ l.push(t[c].end);
3873
+ if (l.push(a), l.length == 2 && l[0].x == l[1].x && l[0].y == l[1].y) {
3874
+ const c = _.last(t), p = L.GeoUtil.computeRad(c.start, c.end);
3875
+ l[0] = l[1].subtract(L.point(0.01 * Math.cos(p), 0.01 * Math.sin(p)));
3876
+ }
3877
+ let u = [];
3878
+ if (i == o) {
3879
+ u = [a];
3880
+ for (let c = i; c < t.length - 1; c++)
3881
+ u.push(t[c].end);
3882
+ u.push(_.last(t).end);
3883
+ }
3884
+ let d = t[o];
3885
+ o < 0 && (d = _.last(t));
3886
+ let f = L.GeoUtil.computeRad(d.start, d.end);
3887
+ return { path: l, remainingPath: u, endRad: f };
3888
+ },
3889
+ // 获取a点向b点方向延伸distance后的坐标
3890
+ calcEndPointOnLine(e, t, n) {
3891
+ const r = L.GeoUtil.computeRad(e, t), s = n * Math.cos(r), o = n * Math.sin(r);
3892
+ return e.add(L.point(s, o));
3893
+ }
3894
+ });
3895
+ function Tt(e) {
3896
+ return e instanceof L.LatLng || (e = L.latLng(e)), e;
3897
+ }
3898
+ L.footageCalculator = L.footageCalculator || {};
3899
+ L.footageCalculator.area = function(e) {
3900
+ return new L.FootageCalculator.Area(e);
3901
+ };
3902
+ L.FootageCalculator = L.FootageCalculator || {};
3903
+ L.FootageCalculator.Line = L.Evented.extend({
3904
+ options: {
3905
+ crs: L.CRS.EPSG3857,
3906
+ // 坐标转换类
3907
+ latlngs: [],
3908
+ // 中心线
3909
+ width: 0
3910
+ // 巷道宽度
3911
+ },
3912
+ initialize(e) {
3913
+ L.setOptions(this, e);
3914
+ const t = this.options.crs;
3915
+ if (t && t.project && t.unproject)
3916
+ this.crs = t;
3917
+ else
3918
+ throw new Error("请传入正确的crs参数");
3919
+ const n = this.options.latlngs, r = this.options.width;
3920
+ if (Array.isArray(n) && n.length > 1 && r > 0)
3921
+ this.latlngs = n, this.width = r;
3922
+ else
3923
+ throw new Error("请传入正确的latlngs和width参数");
3924
+ this.initParams();
3925
+ },
3926
+ // 初始化参数
3927
+ initParams() {
3928
+ this.points = this.latlngs.map((e) => (e instanceof L.LatLng || (e = L.latLng(e)), this.crs.project(e))), this.segments = [], this.points.forEach((e, t) => {
3929
+ if (t > 0) {
3930
+ let n = 0;
3931
+ t > 1 && (n = this.calcOffsetDistance(
3932
+ this.points[t - 2],
3933
+ this.points[t - 1],
3934
+ this.points[t],
3935
+ this.width / 2
3936
+ )), this.segments.push({
3937
+ start: this.points[t - 1],
3938
+ end: e,
3939
+ offsetDistance: n
3940
+ });
3941
+ }
3942
+ });
3943
+ },
3944
+ /**
3945
+ * 执行计算
3946
+ * @param {L.LatLng} start 起点
3947
+ * @param {Number} distance 推进距离,米
3948
+ */
3949
+ doCalculate({ start: e, distance: t }) {
3950
+ if (t > 0) {
3951
+ e instanceof L.LatLng || (e = L.latLng(e));
3952
+ const n = this.crs.project(e), { path: r, remainingPath: s, endRad: o } = this.calcWorkPath(n, this.segments, t), a = this.calcWorkArea({ path: r, width: this.width / 2 }), i = r.map((f) => this.crs.unproject(f)), l = a.map((f) => this.crs.unproject(f)), u = s.map((f) => this.crs.unproject(f)), d = L.GeoUtil.toClockwiseAngle(L.GeoUtil.radToAngle(o));
3953
+ return { path: i, remainingPath: u, area: l, endAngle: d };
3954
+ } else
3955
+ throw new Error("distance参数必须大于0");
3956
+ },
3957
+ /**
3958
+ * 计算一次推进的结果
3959
+ * @param {L.Point} start 起点
3960
+ * @param {Array} segments 线段
3961
+ * @param {Number} distance 推进距离
3962
+ */
3963
+ calcWorkPath(e, t, n) {
3964
+ let r = 0, s = -1, o = -1, a;
3965
+ t.forEach((c, p) => {
3966
+ if (o < 0) {
3967
+ n += c.offsetDistance;
3968
+ let m = c.start;
3969
+ s < 0 && L.LineUtil.pointToSegmentDistance(e, c.start, c.end) < 0.01 && (s = p, m = e);
3970
+ let h = 0;
3971
+ s >= 0 && (h = m.distanceTo(c.end)), r + h >= n && (o = p, a = this.calcEndPointOnLine(m, c.end, n - r)), r += h;
3972
+ }
3973
+ });
3974
+ let i = o;
3975
+ o < 0 && (i = t.length - 1, a = _.last(t).end);
3976
+ let l = [e];
3977
+ for (let c = s; c < i; c++)
3978
+ l.push(t[c].end);
3979
+ if (l.push(a), l.length == 2 && l[0].x == l[1].x && l[0].y == l[1].y) {
3980
+ const c = _.last(t), p = L.GeoUtil.computeRad(c.start, c.end);
3981
+ l[0] = l[1].subtract(L.point(0.01 * Math.cos(p), 0.01 * Math.sin(p)));
3982
+ }
3983
+ let u = [];
3984
+ if (i == o) {
3985
+ u = [a];
3986
+ for (let c = i; c < t.length - 1; c++)
3987
+ u.push(t[c].end);
3988
+ u.push(_.last(t).end);
3989
+ }
3990
+ let d = t[o];
3991
+ o < 0 && (d = _.last(t));
3992
+ let f = L.GeoUtil.computeRad(d.start, d.end);
3993
+ return { path: l, remainingPath: u, endRad: f };
3994
+ },
3995
+ /**
3996
+ * 根据中心线路径和法线长度,计算推进范围
3997
+ * @param {Array<L.Point>} path 推进路径
3998
+ * @param {Number} width 法线长度
3999
+ */
4000
+ calcWorkArea({ path: e, width: t }) {
4001
+ let n = [], r = [];
4002
+ return e.map((o, a) => {
4003
+ if (a == 0) {
4004
+ const i = L.GeoUtil.computeRad(e[a], e[a + 1]);
4005
+ return this.calcVerticalOffestPoints(o, i, t);
4006
+ } else if (a == e.length - 1) {
4007
+ const i = L.GeoUtil.computeRad(e[a - 1], e[a]);
4008
+ return this.calcVerticalOffestPoints(o, i, t);
4009
+ } else {
4010
+ const i = L.GeoUtil.computeRad(e[a - 1], e[a]), l = L.GeoUtil.computeRad(e[a], e[a + 1]), u = this.calcVerticalOffestPoints(e[a - 1], i, t), d = this.calcVerticalOffestPoints(e[a], i, t), f = this.calcVerticalOffestPoints(e[a], l, t), c = this.calcVerticalOffestPoints(e[a + 1], l, t), p = L.GeoUtil.linesIntersection(u[0], d[0], f[0], c[0]), m = L.GeoUtil.linesIntersection(u[1], d[1], f[1], c[1]);
4011
+ if (p && m)
4012
+ return [p, m];
4013
+ }
4014
+ }).forEach((o) => {
4015
+ o && (n.push(o[0]), r.push(o[1]));
4016
+ }), _.concat(n, _.reverse(r));
4017
+ },
4018
+ // 获取a点向b点方向延伸distance后的坐标
4019
+ calcEndPointOnLine(e, t, n) {
4020
+ const r = L.GeoUtil.computeRad(e, t), s = n * Math.cos(r), o = n * Math.sin(r);
4021
+ return e.add(L.point(s, o));
4022
+ },
4023
+ // 计算补足距离
4024
+ calcOffsetDistance(e, t, n, r) {
4025
+ const s = L.GeoUtil.segmentsRad(t, e, n, r), o = L.GeoUtil.computeRad(e, t), a = L.GeoUtil.computeRad(t, n), i = this.calcVerticalOffestPoints(e, o, r), l = this.calcVerticalOffestPoints(t, o, r), u = this.calcVerticalOffestPoints(t, a, r), d = this.calcVerticalOffestPoints(n, a, r);
4026
+ let f = null;
4027
+ return s > 0 ? f = L.GeoUtil.linesIntersection(i[1], l[1], u[1], d[1]) : f = L.GeoUtil.linesIntersection(i[0], l[0], u[0], d[0]), f ? L.GeoUtil.footPointOnLine(f, t, n).distanceTo(t) : 0;
4028
+ },
4029
+ // 获取目标点的在给定方向的法线上的两个偏移点
4030
+ calcVerticalOffestPoints(e, t, n) {
4031
+ const r = t - Math.PI / 2, s = L.point(n * Math.cos(r), n * Math.sin(r));
4032
+ return [e.add(s), e.subtract(s)];
4033
+ }
4034
+ });
4035
+ L.footageCalculator = L.footageCalculator || {};
4036
+ L.footageCalculator.line = function(e) {
4037
+ return new L.FootageCalculator(e);
4038
+ };
4039
+ L.Glyphicon = L.DivIcon.extend({
4040
+ options: {
4041
+ icon: "fas fa-leaf",
4042
+ size: 32,
4043
+ fontSize: null,
4044
+ background: "white",
4045
+ color: "#4d90fe",
4046
+ borderRadius: null,
4047
+ borderWidth: 2,
4048
+ borderColor: null,
4049
+ boxShadow: !0,
4050
+ additionalCSS: "",
4051
+ className: "",
4052
+ effect: {
4053
+ type: null,
4054
+ size: null,
4055
+ color: null,
4056
+ interval: null
4057
+ }
4058
+ },
4059
+ initialize(e = {}) {
4060
+ L.setOptions(this, e);
4061
+ let t = this.options, n = document.createElement("div");
4062
+ L.DomUtil.addClass(n, "vae-glyphicon");
4063
+ let r = [];
4064
+ r.push(`height:${t.size - t.borderWidth * 2}px`), r.push(`width:${t.size - t.borderWidth * 2}px`), r.push(`color:${t.color}`);
4065
+ let s = _.isNil(t.fontSize) ? t.size / 2 : t.fontSize;
4066
+ r.push(`font-size:${s}px`);
4067
+ let o = _.isNil(t.borderRadius) ? t.size : t.borderRadius;
4068
+ r.push(`border-radius:${o}px`), r.push(`border-width:${t.borderWidth}px`), r.push(`border-color:${t.borderColor || t.color}`), r.push("border-style:solid"), r.push(`background-color:${t.background}`), t.boxShadow && r.push("box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.2)"), r.push(t.additionalCSS);
4069
+ let a = document.createAttribute("style");
4070
+ a.value = r.join(";");
4071
+ let i = document.createElement("div");
4072
+ L.DomUtil.addClass(i, t.icon), n.setAttributeNode(a), n.appendChild(i);
4073
+ let l = t.effect;
4074
+ if (l && l.type) {
4075
+ let u = document.createElement("div"), d = l.type;
4076
+ if (d === "halo") {
4077
+ let f = document.createAttribute("style"), c = [];
4078
+ L.DomUtil.addClass(u, "halo");
4079
+ let p = l.size || t.size * 3;
4080
+ c.push(`height:${p}px`), c.push(`width:${p}px`);
4081
+ let m = l.color || t.color;
4082
+ c.push(`background-color:${m}`), c.push(`top:-${(p - t.size) / 2}px`), c.push(`left:-${(p - t.size) / 2}px`), c.push(`animation:vae-effect-${d} ${l.interval || 2}s 0s infinite ease-in`), f.value = c.join(";"), u.setAttributeNode(f);
4083
+ }
4084
+ n.appendChild(u);
4085
+ }
4086
+ L.DivIcon.prototype.initialize.call(this, {
4087
+ html: n.outerHTML,
4088
+ iconSize: [t.size, t.size],
4089
+ className: t.className
4090
+ });
4091
+ }
4092
+ });
4093
+ L.glyphicon = function(e) {
4094
+ return new L.Glyphicon(e);
4095
+ };
4096
+ function sl(e) {
4097
+ let t = 1, n = 30, r = 6;
4098
+ const s = e.getChildCount();
4099
+ s > 0 && s <= 9 ? (t = 1, n = 30, r = 6) : s > 9 && s <= 49 ? (t = 2, n = 38, r = 8) : s > 49 && s <= 99 ? (t = 3, n = 46, r = 8) : s > 99 && s <= 499 ? (t = 4, n = 54, r = 10) : s > 499 && s < 999 ? (t = 5, n = 62, r = 10) : (t = 6, n = 70, r = 12);
4100
+ const o = `vae-markercluster--icon style--${this.iconStyle || "blue"} level--${t}`, a = n - r, i = `border-radius:${n / 2}px;`, l = `height:${a}px;width:${a}px;border-radius:${a / 2}px;`;
4101
+ return L.divIcon({
4102
+ html: `<div class="outer center" style="${i}"><div class="inner center" style="${l}">${s}</div></div>`,
4103
+ className: o,
4104
+ iconSize: [n, n]
4105
+ });
4106
+ }
4107
+ L.MarkerClusterGroupX = L.MarkerClusterGroup.extend({
4108
+ options: {
4109
+ iconStyle: "blue",
4110
+ showCoverageOnHover: !1,
4111
+ maxClusterRadius: 60,
4112
+ spiderLegPolylineOptions: {
4113
+ weight: 2,
4114
+ dashArray: [5, 5],
4115
+ interactive: !1,
4116
+ opacity: 0.8
4117
+ },
4118
+ iconCreateFunction: sl
4119
+ },
4120
+ initialize(e = {}) {
4121
+ L.setOptions(this, e);
4122
+ const t = this.options.iconStyle || "blue";
4123
+ this.options.spiderLegPolylineOptions.color = t == "red" ? "hsl(354, 70%, 54%)" : t == "blue" ? "hsl(211, 100%, 45%)" : t == "green" ? "hsl(134, 61%, 41%)" : t == "gray" ? "#606266" : t == "yellow" ? "#f9c31f" : t == "orange" ? "#fd7e14" : t == "cyan" ? "#17a2b8" : t == "purple" ? "#5c11d4" : t == "pink" ? "#e83e8c" : t == "transparent" ? "rgba(0,0,0,0.6)" : null, L.MarkerClusterGroup.prototype.initialize.call(this, this.options);
4124
+ }
4125
+ });
4126
+ L.markerClusterGroupX = function(e) {
4127
+ return new L.MarkerClusterGroupX(e);
4128
+ };
4129
+ const ol = {
4130
+ TianDiTu: {
4131
+ Normal: {
4132
+ Map: "https://t{s}.tianditu.gov.cn/DataServer?T=vec_w&X={x}&Y={y}&L={z}&tk={key}",
4133
+ Annotion: "https://t{s}.tianditu.gov.cn/DataServer?T=cva_w&X={x}&Y={y}&L={z}&tk={key}"
4134
+ },
4135
+ Satellite: {
4136
+ Map: "https://t{s}.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk={key}",
4137
+ Annotion: "https://t{s}.tianditu.gov.cn/DataServer?T=cia_w&X={x}&Y={y}&L={z}&tk={key}"
4138
+ },
4139
+ Terrain: {
4140
+ Map: "https://t{s}.tianditu.gov.cn/DataServer?T=ter_w&X={x}&Y={y}&L={z}&tk={key}",
4141
+ Annotion: "https://t{s}.tianditu.gov.cn/DataServer?T=cta_w&X={x}&Y={y}&L={z}&tk={key}"
4142
+ },
4143
+ Subdomains: ["0", "1", "2", "3", "4", "5", "6", "7"],
4144
+ key: "1a346e3ea95a3227a097cabf11a901b7"
4145
+ },
4146
+ GaoDe: {
4147
+ Normal: {
4148
+ Map: "https://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}"
4149
+ },
4150
+ Satellite: {
4151
+ Map: "https://webst0{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
4152
+ Annotion: "https://webst0{s}.is.autonavi.com/appmaptile?style=8&x={x}&y={y}&z={z}"
4153
+ },
4154
+ Subdomains: ["1", "2", "3", "4"]
4155
+ },
4156
+ GaoDe_Mobile: {
4157
+ Normal: {
4158
+ Map: "https://wprd0{s}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=1&style=7"
4159
+ },
4160
+ Satellite: {
4161
+ Map: "https://wprd0{s}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=1&style=6",
4162
+ Annotion: "https://wprd0{s}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=2&style=8"
4163
+ },
4164
+ Subdomains: ["1", "2", "3", "4"]
4165
+ },
4166
+ Google: {
4167
+ Normal: {
4168
+ Map: "https://www.google.cn/maps/vt?lyrs=m&gl=cn&x={x}&y={y}&z={z}"
4169
+ },
4170
+ Satellite: {
4171
+ Map: "https://www.google.cn/maps/vt?lyrs=s&gl=cn&x={x}&y={y}&z={z}",
4172
+ Annotion: "https://www.google.cn/maps/vt?lyrs=h&gl=cn&x={x}&y={y}&z={z}"
4173
+ },
4174
+ Subdomains: []
4175
+ },
4176
+ Geoq: {
4177
+ Normal: {
4178
+ Map: "https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer/tile/{z}/{y}/{x}",
4179
+ PurplishBlue: "https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/{z}/{y}/{x}",
4180
+ Gray: "https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetGray/MapServer/tile/{z}/{y}/{x}",
4181
+ Warm: "https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetWarm/MapServer/tile/{z}/{y}/{x}"
4182
+ },
4183
+ Theme: {
4184
+ Hydro: "https://thematic.geoq.cn/arcgis/rest/services/ThematicMaps/WorldHydroMap/MapServer/tile/{z}/{y}/{x}",
4185
+ Division: "https://thematic.geoq.cn/arcgis/rest/services/ThematicMaps/administrative_division_boundaryandlabel/MapServer/tile/{z}/{y}/{x}"
4186
+ },
4187
+ Subdomains: []
4188
+ }
4189
+ };
4190
+ L.TileLayer.ChinaProvider = L.TileLayer.extend({
4191
+ initialize(e, t = {}) {
4192
+ var o;
4193
+ const [n, r] = e.split("@"), s = n.split(".");
4194
+ if (s[0] && s.length == 3) {
4195
+ const a = s[0], i = s[1], l = s[2], u = ol[a];
4196
+ if (u) {
4197
+ const d = (o = u == null ? void 0 : u[i]) == null ? void 0 : o[l];
4198
+ if (d)
4199
+ if (u.hasOwnProperty("key") && !r)
4200
+ console.error(`provider '${a}' need a key`);
4201
+ else {
4202
+ const f = {
4203
+ maxZoom: 24,
4204
+ subdomains: u.Subdomains,
4205
+ key: r
4206
+ };
4207
+ L.TileLayer.prototype.initialize.call(this, d, L.extend(f, t));
4208
+ }
4209
+ else
4210
+ console.error(`provider not found '${e}'`);
4211
+ } else
4212
+ console.error(`provider not found '${e}'`);
4213
+ } else
4214
+ console.error(`provider not found '${e}'`);
4215
+ }
4216
+ });
4217
+ L.tileLayer.chinaProvider = function(e, t) {
4218
+ return new L.TileLayer.ChinaProvider(e, t);
4219
+ };
4220
+ L.VuePopup = L.Popup.extend({
4221
+ app: null,
4222
+ stopResize: null,
4223
+ options: {
4224
+ vueInstance: null,
4225
+ props: null
4226
+ },
4227
+ initialize(e) {
4228
+ L.setOptions(this, e), this._bindEvents(), L.Popup.prototype.initialize.call(this, _.omit(this.options, ["vueInstance", "props"]));
4229
+ },
4230
+ _bindEvents() {
4231
+ this.options.vueInstance && (this.on("add", () => {
4232
+ const e = () => {
4233
+ this._updateVuePopup();
4234
+ }, t = `vue-popup-${We()}`;
4235
+ this.setContent(`<div id="${t}"></div>`), queueMicrotask(() => {
4236
+ const n = document.getElementById(t);
4237
+ n && (this.app = Cn(this.options.vueInstance, this.options.props ?? {}), this.app.mount(n), this.stopResize = Ut(n, e));
4238
+ });
4239
+ }), this.on("remove", () => {
4240
+ var e, t;
4241
+ (e = this.stopResize) == null || e.call(this), this.stopResize = null, (t = this.app) == null || t.unmount(), this.app = null;
4242
+ }));
4243
+ },
4244
+ _updateVuePopup() {
4245
+ !this._map || !this._latlng || !this._container || (this._container.style.visibility = "hidden", this._updateLayout(), this._updatePosition(), this._container.style.visibility = "", this._adjustPan());
4246
+ }
4247
+ });
4248
+ L.vuePopup = function(e) {
4249
+ return new L.VuePopup(e);
4250
+ };
4251
+ L.VueTooltip = L.Tooltip.extend({
4252
+ app: null,
4253
+ stopResize: null,
4254
+ options: {
4255
+ vueInstance: null,
4256
+ props: null
4257
+ },
4258
+ initialize(e) {
4259
+ L.setOptions(this, e), this._bindEvents(), L.Tooltip.prototype.initialize.call(this, _.omit(this.options, ["vueInstance", "props"]));
4260
+ },
4261
+ _bindEvents() {
4262
+ this.options.vueInstance && (this.on("add", () => {
4263
+ const e = () => {
4264
+ this._updateVueTooltip();
4265
+ }, t = `vue-tooltip-${We()}`;
4266
+ this.setContent(`<div id="${t}"></div>`), queueMicrotask(() => {
4267
+ const n = document.getElementById(t);
4268
+ n && (this.app = Cn(this.options.vueInstance, this.options.props ?? {}), this.app.mount(n), this.stopResize = Ut(n, e));
4269
+ });
4270
+ }), this.on("remove", () => {
4271
+ var e, t;
4272
+ (e = this.stopResize) == null || e.call(this), this.stopResize = null, (t = this.app) == null || t.unmount(), this.app = null;
4273
+ }));
4274
+ },
4275
+ _updateVueTooltip() {
4276
+ !this._map || !this._latlng || !this._container || this._updatePosition();
4277
+ }
4278
+ });
4279
+ L.vueTooltip = function(e) {
4280
+ return new L.VueTooltip(e);
4281
+ };
4282
+ const Ft = "_safeDivOverlayPatched";
4283
+ function al(e) {
4284
+ return !!(e && e._map && e._latlng && e._container);
4285
+ }
4286
+ function it(e, t) {
4287
+ var s;
4288
+ if (!((s = e == null ? void 0 : e.prototype) != null && s[t]))
4289
+ return;
4290
+ const n = `${Ft}_${t}`;
4291
+ if (e.prototype[n])
4292
+ return;
4293
+ const r = e.prototype[t];
4294
+ e.include({
4295
+ [n]: !0,
4296
+ [t](...o) {
4297
+ if (al(this))
4298
+ return r.apply(this, o);
4299
+ }
4300
+ });
4301
+ }
4302
+ function dr(e) {
4303
+ !e || e[Ft] || (it(e.Tooltip, "_animateZoom"), it(e.Tooltip, "_updatePosition"), it(e.Popup, "_animateZoom"), it(e.Popup, "_updatePosition"), e[Ft] = !0);
4304
+ }
4305
+ dr(Sn);
4306
+ typeof window < "u" && window.L && window.L !== Sn && dr(window.L);
4307
+ const il = () => {
4308
+ delete L.Icon.Default.prototype._getIconUrl, L.Icon.Default.mergeOptions({
4309
+ iconRetinaUrl: Wi,
4310
+ iconUrl: Zi,
4311
+ shadowUrl: Ki
4312
+ });
4313
+ }, ll = (e, t = {}) => {
4314
+ e.component(`${t.prefix || "vae"}-map`, kr), e.component(`${t.prefix || "vae"}-lrmap`, Si), e.component(`${t.prefix || "vae"}-map-ctrl-draw`, ji), e.component(`${t.prefix || "vae"}-map-ctrl-draw-line`, qi), il();
4315
+ }, Fl = { install: ll };
4316
+ export {
4317
+ Si as VaeLrmap,
4318
+ kr as VaeMap,
4319
+ ji as VaeMapCtrlDraw,
4320
+ qi as VaeMapCtrlDrawLine,
4321
+ Fl as default
4322
+ };