@m3ui-vue/m3ui-vue 1.0.3 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/API.md +75 -11
- package/dist/MMenuItem-BOkcVtEe.js +809 -0
- package/dist/MMenuItem-BOkcVtEe.js.map +1 -0
- package/dist/{MSlider-CdNIH7jc.js → MSlider-BXsBv0ox.js} +208 -182
- package/dist/MSlider-BXsBv0ox.js.map +1 -0
- package/dist/{MTextField-B4X92vH_.js → MTextField-rML9jnXs.js} +2 -2
- package/dist/{MTextField-B4X92vH_.js.map → MTextField-rML9jnXs.js.map} +1 -1
- package/dist/api.json +1 -1
- package/dist/code-editor.js +1 -1
- package/dist/components/MBottomSheet.vue.d.ts +20 -1
- package/dist/components/MDialog.vue.d.ts +17 -8
- package/dist/components/MDragDropList.vue.d.ts +1 -1
- package/dist/components/MMap.vue.d.ts +4 -4
- package/dist/components/MMapControl.vue.d.ts +20 -3
- package/dist/components/MMapMarker.vue.d.ts +5 -2
- package/dist/components/MMapPopup.vue.d.ts +5 -3
- package/dist/components/MMenuItem.vue.d.ts +2 -2
- package/dist/components/MSeekBar.vue.d.ts +122 -0
- package/dist/components/MSplitButton.vue.d.ts +2 -2
- package/dist/components/_MMapAttribution.vue.d.ts +7 -0
- package/dist/composables/_mapPin.d.ts +5 -0
- package/dist/composables/_popupPosition.d.ts +12 -0
- package/dist/composables/_useCalendarMonth.d.ts +24 -0
- package/dist/composables/_useEscapeStack.d.ts +3 -0
- package/dist/composables/_useScrollLock.d.ts +8 -0
- package/dist/composables/_useSheetMotion.d.ts +16 -1
- package/dist/composables/useLocale.d.ts +8 -0
- package/dist/index.d.ts +2 -0
- package/dist/locales/index.js +56 -0
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +5269 -4714
- package/dist/m3ui.js.map +1 -1
- package/dist/map.js +777 -641
- package/dist/map.js.map +1 -1
- package/dist/rich-text-editor.js +8 -8
- package/dist/styles.css +1 -1
- package/dist/{useLocale-b5-hzsL3.js → useLocale-CqQrhWFl.js} +9 -1
- package/dist/useLocale-CqQrhWFl.js.map +1 -0
- package/package.json +1 -1
- package/src/__tests__/MDialog.test.ts +30 -0
- package/src/__tests__/MMap.test.ts +132 -2
- package/src/__tests__/MSeekBar.test.ts +170 -0
- package/src/__tests__/MTooltip.test.ts +110 -0
- package/src/__tests__/_fakeMaplibre.ts +3 -0
- package/src/__tests__/calendarMonth.test.ts +59 -0
- package/src/__tests__/pickerModals.test.ts +128 -0
- package/src/__tests__/popupPosition.test.ts +224 -0
- package/src/__tests__/scrollLock.test.ts +110 -0
- package/src/__tests__/sheets.test.ts +158 -0
- package/src/components/MAutocomplete.vue +2 -4
- package/src/components/MBottomSheet.vue +211 -13
- package/src/components/MCommandPalette.vue +4 -6
- package/src/components/MContextMenu.vue +19 -5
- package/src/components/MDatePicker.vue +29 -70
- package/src/components/MDatePickerModal.vue +116 -172
- package/src/components/MDateRangePicker.vue +29 -51
- package/src/components/MDateRangePickerModal.vue +84 -162
- package/src/components/MDialog.vue +87 -63
- package/src/components/MLightbox.vue +6 -3
- package/src/components/MMap.vue +74 -28
- package/src/components/MMapControl.vue +121 -7
- package/src/components/MMapIdentify.vue +2 -1
- package/src/components/MMapMarker.vue +14 -7
- package/src/components/MMapPopup.vue +8 -4
- package/src/components/MMenu.vue +31 -12
- package/src/components/MMenuItem.vue +21 -4
- package/src/components/MMultiAutocomplete.vue +2 -4
- package/src/components/MMultiSelect.vue +2 -4
- package/src/components/MNavigationDrawer.vue +2 -8
- package/src/components/MNavigationRail.vue +2 -3
- package/src/components/MSearchBar.vue +2 -5
- package/src/components/MSeekBar.vue +593 -0
- package/src/components/MSelect.vue +2 -8
- package/src/components/MSplitButton.vue +23 -7
- package/src/components/MSpotlightSearch.vue +4 -6
- package/src/components/MTimePicker.vue +23 -6
- package/src/components/MTimePickerModal.vue +213 -226
- package/src/components/MTooltip.vue +99 -3
- package/src/components/_MMapAttribution.vue +81 -0
- package/src/composables/_mapPin.ts +25 -0
- package/src/composables/_popupPosition.ts +39 -0
- package/src/composables/_useCalendarMonth.ts +74 -0
- package/src/composables/_useEscapeStack.ts +33 -0
- package/src/composables/_useScrollLock.ts +41 -0
- package/src/composables/_useSheetMotion.ts +82 -20
- package/src/composables/useLocale.ts +16 -0
- package/src/index.ts +2 -0
- package/src/locales/de.ts +8 -0
- package/src/locales/es.ts +8 -0
- package/src/locales/fr.ts +8 -0
- package/src/locales/ja.ts +8 -0
- package/src/locales/ko.ts +8 -0
- package/src/locales/pt.ts +8 -0
- package/src/locales/zh.ts +8 -0
- package/dist/MMenuItem-DFyXflk9.js +0 -707
- package/dist/MMenuItem-DFyXflk9.js.map +0 -1
- package/dist/MSlider-CdNIH7jc.js.map +0 -1
- package/dist/useLocale-b5-hzsL3.js.map +0 -1
package/dist/map.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { a as e,
|
|
2
|
-
import { i as
|
|
3
|
-
import { h as
|
|
4
|
-
import { t as
|
|
5
|
-
import { Fragment as
|
|
1
|
+
import { a as e, c as t, d as n, i as r, l as i, n as a, p as o, s, t as c, u as l } from "./MSlider-BXsBv0ox.js";
|
|
2
|
+
import { i as u } from "./useLocale-CqQrhWFl.js";
|
|
3
|
+
import { f as d, h as f, n as p, t as m } from "./MTextField-rML9jnXs.js";
|
|
4
|
+
import { t as h } from "./MIcon-DLOkQduI.js";
|
|
5
|
+
import { Fragment as g, Transition as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as C, createTextVNode as w, createVNode as T, defineComponent as E, getCurrentInstance as D, inject as O, markRaw as k, mergeProps as A, normalizeClass as j, normalizeStyle as M, onBeforeUnmount as N, onMounted as P, onUnmounted as ee, openBlock as F, provide as I, reactive as L, ref as R, renderList as z, renderSlot as B, shallowRef as V, toDisplayString as H, unref as U, useId as te, useSlots as ne, watch as W, withCtx as G, withModifiers as K } from "vue";
|
|
6
6
|
//#region src/composables/useMap.ts
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
let e =
|
|
7
|
+
var q = Symbol("m3-map");
|
|
8
|
+
function J() {
|
|
9
|
+
let e = O(q, null);
|
|
10
10
|
if (!e) throw Error("useMap() must be called in a component inside <MMap>");
|
|
11
11
|
let t = [];
|
|
12
|
-
|
|
12
|
+
D() && N(() => t.splice(0).forEach((e) => e()));
|
|
13
13
|
function n(n) {
|
|
14
14
|
let r = () => {
|
|
15
15
|
if (e.map.value && e.maplibre.value) return n(e.map.value, e.maplibre.value);
|
|
16
|
-
let r =
|
|
16
|
+
let r = W(e.map, (t) => {
|
|
17
17
|
t && e.maplibre.value && (r(), n(t, e.maplibre.value));
|
|
18
18
|
});
|
|
19
19
|
t.push(r);
|
|
20
|
-
}, i =
|
|
21
|
-
i && !i.isMounted ?
|
|
20
|
+
}, i = D();
|
|
21
|
+
i && !i.isMounted ? P(r) : r();
|
|
22
22
|
}
|
|
23
23
|
function r(e, r) {
|
|
24
24
|
n((n) => {
|
|
@@ -31,9 +31,9 @@ function G() {
|
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
return {
|
|
34
|
-
map:
|
|
35
|
-
maplibre:
|
|
36
|
-
styleVersion:
|
|
34
|
+
map: v(() => e.map.value),
|
|
35
|
+
maplibre: v(() => e.maplibre.value),
|
|
36
|
+
styleVersion: v(() => e.styleVersion.value),
|
|
37
37
|
activeTool: e.activeTool,
|
|
38
38
|
onReady: n,
|
|
39
39
|
on: r,
|
|
@@ -41,8 +41,162 @@ function G() {
|
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
//#endregion
|
|
44
|
-
//#region src/
|
|
45
|
-
var
|
|
44
|
+
//#region src/components/MMapControl.vue?vue&type=script&setup=true&lang.ts
|
|
45
|
+
var re = { class: "hidden" }, ie = {
|
|
46
|
+
key: 0,
|
|
47
|
+
class: "m3-map-control-panel-in"
|
|
48
|
+
}, ae = /* @__PURE__ */ E({
|
|
49
|
+
inheritAttrs: !1,
|
|
50
|
+
__name: "MMapControl",
|
|
51
|
+
props: {
|
|
52
|
+
position: { default: "top-right" },
|
|
53
|
+
group: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: !0
|
|
56
|
+
},
|
|
57
|
+
expanded: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: !1
|
|
60
|
+
},
|
|
61
|
+
animate: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: !0
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
emits: ["update:expanded"],
|
|
67
|
+
setup(e, { emit: r }) {
|
|
68
|
+
let a = e, o = r, s = ne(), c = R(), { onReady: u } = J(), f = R(a.expanded);
|
|
69
|
+
W(() => a.expanded, (e) => {
|
|
70
|
+
f.value = e;
|
|
71
|
+
});
|
|
72
|
+
let p = v(() => f.value && !!s.panel);
|
|
73
|
+
function m(e) {
|
|
74
|
+
e !== f.value && (f.value = e, o("update:expanded", e));
|
|
75
|
+
}
|
|
76
|
+
let h = () => m(!f.value), g = () => m(!1);
|
|
77
|
+
function _(e) {
|
|
78
|
+
p.value && !c.value?.contains(e.target) && g();
|
|
79
|
+
}
|
|
80
|
+
function y(e) {
|
|
81
|
+
e.key === "Escape" && p.value && (g(), e.stopPropagation());
|
|
82
|
+
}
|
|
83
|
+
let b = null, C = null, w = [], T = {
|
|
84
|
+
w: 0,
|
|
85
|
+
h: 0
|
|
86
|
+
}, E = {
|
|
87
|
+
w: 0,
|
|
88
|
+
h: 0
|
|
89
|
+
}, D = null;
|
|
90
|
+
function O() {
|
|
91
|
+
return {
|
|
92
|
+
w: c.value.offsetWidth,
|
|
93
|
+
h: c.value.offsetHeight
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function k() {
|
|
97
|
+
let e = c.value;
|
|
98
|
+
if (!e || C) return;
|
|
99
|
+
let t = O();
|
|
100
|
+
b && (t.w !== b.w || t.h !== b.h) && a.animate && !i() && j(e, b, t), b = t;
|
|
101
|
+
}
|
|
102
|
+
function j(e, r, i) {
|
|
103
|
+
if (T = r, E = i, w = n(0, 1, 0, d.standard.defaultSpatial, .002), e.style.overflow = "hidden", C = t(e, w, (e) => ({
|
|
104
|
+
width: `${r.w + (i.w - r.w) * e}px`,
|
|
105
|
+
height: `${r.h + (i.h - r.h) * e}px`
|
|
106
|
+
})), !C) return M(e);
|
|
107
|
+
C.onfinish = () => M(e);
|
|
108
|
+
}
|
|
109
|
+
function M(e) {
|
|
110
|
+
C?.cancel(), C = null, e.style.overflow = "";
|
|
111
|
+
let t = O();
|
|
112
|
+
t.w !== E.w || t.h !== E.h ? (b = E, k()) : b = t;
|
|
113
|
+
}
|
|
114
|
+
function ee() {
|
|
115
|
+
if (!c.value || !C) return;
|
|
116
|
+
let e = l(w, C.currentTime), t = {
|
|
117
|
+
w: T.w + (E.w - T.w) * e,
|
|
118
|
+
h: T.h + (E.h - T.h) * e
|
|
119
|
+
};
|
|
120
|
+
C.onfinish = null, C.cancel(), C = null, b = t, k();
|
|
121
|
+
}
|
|
122
|
+
W(p, ee, { flush: "post" });
|
|
123
|
+
let I, L = {
|
|
124
|
+
onAdd: () => c.value,
|
|
125
|
+
onRemove: () => c.value?.remove()
|
|
126
|
+
};
|
|
127
|
+
return u((e) => {
|
|
128
|
+
I = e, c.value && e.addControl(L, a.position);
|
|
129
|
+
}), W(() => a.position, (e) => {
|
|
130
|
+
I && c.value && (I.removeControl(L), I.addControl(L, e));
|
|
131
|
+
}), P(() => {
|
|
132
|
+
document.addEventListener("pointerdown", _, !0), !(typeof ResizeObserver > "u" || !c.value) && (D = new ResizeObserver(k), D.observe(c.value));
|
|
133
|
+
}), N(() => {
|
|
134
|
+
document.removeEventListener("pointerdown", _, !0), D?.disconnect(), C?.cancel(), I?.hasControl(L) && I.removeControl(L);
|
|
135
|
+
}), (t, n) => (F(), x("div", re, [S("div", A({
|
|
136
|
+
ref_key: "el",
|
|
137
|
+
ref: c,
|
|
138
|
+
class: ["maplibregl-ctrl m3-map-control", p.value ? "m3-map-control-panel" : e.group ? "maplibregl-ctrl-group" : ""]
|
|
139
|
+
}, t.$attrs, { onKeydown: y }), [p.value ? (F(), x("div", ie, [B(t.$slots, "panel", { close: g })])) : B(t.$slots, "default", {
|
|
140
|
+
expanded: f.value,
|
|
141
|
+
toggle: h
|
|
142
|
+
}, void 0, void 0, 1)], 16)]));
|
|
143
|
+
}
|
|
144
|
+
}), Y = [
|
|
145
|
+
"title",
|
|
146
|
+
"aria-label",
|
|
147
|
+
"aria-expanded"
|
|
148
|
+
], X = ["innerHTML"], oe = /* @__PURE__ */ E({
|
|
149
|
+
__name: "_MMapAttribution",
|
|
150
|
+
props: { position: {} },
|
|
151
|
+
setup(e) {
|
|
152
|
+
let t = e, n = u(), { on: r, onReady: i } = J(), a = R([]), o = R(!0), s = R(0), c;
|
|
153
|
+
function l() {
|
|
154
|
+
if (!c) return;
|
|
155
|
+
let e = c.getStyle?.();
|
|
156
|
+
if (!e?.sources) return;
|
|
157
|
+
let t = new Set(e.layers?.map((e) => e.source).filter(Boolean)), n = [];
|
|
158
|
+
for (let [r, i] of Object.entries(e.sources)) {
|
|
159
|
+
if (t.size && !t.has(r)) continue;
|
|
160
|
+
let e = c.getSource(r)?.attribution ?? i.attribution;
|
|
161
|
+
e && !n.includes(e) && n.push(e);
|
|
162
|
+
}
|
|
163
|
+
let r = n.filter((e) => !n.some((t) => t !== e && t.includes(e)));
|
|
164
|
+
r.join("\n") !== a.value.join("\n") && (a.value = r), s.value = Math.max(0, c.getContainer().clientWidth - 20);
|
|
165
|
+
}
|
|
166
|
+
i((e) => {
|
|
167
|
+
c = e, l();
|
|
168
|
+
}), r("styledata", l), r("sourcedata", l), r("resize", l), r("dragstart", () => {
|
|
169
|
+
o.value = !1;
|
|
170
|
+
});
|
|
171
|
+
let d = v(() => a.value.join(" ")), f = v(() => t.position.endsWith("right"));
|
|
172
|
+
return (t, r) => d.value ? (F(), y(ae, {
|
|
173
|
+
key: 0,
|
|
174
|
+
position: e.position,
|
|
175
|
+
group: !1,
|
|
176
|
+
class: j(["m3-map-attrib", o.value ? "m3-map-attrib-open" : ""])
|
|
177
|
+
}, {
|
|
178
|
+
default: G(() => [S("div", {
|
|
179
|
+
class: j(["m3-map-attrib-row", f.value ? "flex-row-reverse" : ""]),
|
|
180
|
+
style: M(s.value ? { maxWidth: `${s.value}px` } : void 0)
|
|
181
|
+
}, [S("button", {
|
|
182
|
+
type: "button",
|
|
183
|
+
class: "m3-map-attrib-button",
|
|
184
|
+
title: U(n).mapToggleAttribution,
|
|
185
|
+
"aria-label": U(n).mapToggleAttribution,
|
|
186
|
+
"aria-expanded": o.value,
|
|
187
|
+
onClick: r[0] ||= (e) => o.value = !o.value
|
|
188
|
+
}, [T(h, {
|
|
189
|
+
name: "info",
|
|
190
|
+
size: 20
|
|
191
|
+
})], 8, Y), o.value ? (F(), x("div", {
|
|
192
|
+
key: 0,
|
|
193
|
+
class: j(["m3-map-attrib-text", f.value ? "pl-3.5" : "pr-3.5"]),
|
|
194
|
+
innerHTML: d.value
|
|
195
|
+
}, null, 10, X)) : b("", !0)], 6)]),
|
|
196
|
+
_: 1
|
|
197
|
+
}, 8, ["position", "class"])) : b("", !0);
|
|
198
|
+
}
|
|
199
|
+
}), se = {
|
|
46
200
|
fill: ["fill-opacity"],
|
|
47
201
|
line: ["line-opacity"],
|
|
48
202
|
circle: ["circle-opacity", "circle-stroke-opacity"],
|
|
@@ -51,27 +205,27 @@ var te = {
|
|
|
51
205
|
heatmap: ["heatmap-opacity"],
|
|
52
206
|
"fill-extrusion": ["fill-extrusion-opacity"]
|
|
53
207
|
};
|
|
54
|
-
function
|
|
55
|
-
return
|
|
208
|
+
function ce() {
|
|
209
|
+
return L({
|
|
56
210
|
visible: {},
|
|
57
211
|
opacity: {}
|
|
58
212
|
});
|
|
59
213
|
}
|
|
60
|
-
function
|
|
214
|
+
function le(e, t, n) {
|
|
61
215
|
let r = {}, i = {};
|
|
62
216
|
for (let e of n?.layers ?? []) {
|
|
63
217
|
let n = t.getLayer(e.id);
|
|
64
218
|
if (!n) continue;
|
|
65
219
|
r[e.id] = t.getLayoutProperty(e.id, "visibility") !== "none";
|
|
66
|
-
let a =
|
|
220
|
+
let a = se[n.type]?.[0], o = a ? t.getPaintProperty(e.id, a) : void 0;
|
|
67
221
|
i[e.id] = typeof o == "number" ? o : 1;
|
|
68
222
|
}
|
|
69
223
|
e.visible = r, e.opacity = i;
|
|
70
224
|
}
|
|
71
|
-
function
|
|
72
|
-
let e =
|
|
225
|
+
function Z() {
|
|
226
|
+
let e = O(q, null);
|
|
73
227
|
if (!e) throw Error("useMapLayers() must be called in a component inside <MMap>");
|
|
74
|
-
let { map: t, model: n, layerState: r } = e, i =
|
|
228
|
+
let { map: t, model: n, layerState: r } = e, i = v(() => n.value?.layers ?? []), a = v(() => new Map(i.value.map((e) => [e.id, e])));
|
|
75
229
|
function o(e) {
|
|
76
230
|
return r.visible[e] ?? !0;
|
|
77
231
|
}
|
|
@@ -88,7 +242,7 @@ function q() {
|
|
|
88
242
|
}
|
|
89
243
|
function u(e, n) {
|
|
90
244
|
let i = t.value, o = i?.getLayer(e);
|
|
91
|
-
if (o) for (let t of
|
|
245
|
+
if (o) for (let t of se[o.type] ?? []) i.setPaintProperty(e, t, n);
|
|
92
246
|
r.opacity[e] = n;
|
|
93
247
|
for (let t of a.value.get(e)?.children ?? []) u(t, n);
|
|
94
248
|
}
|
|
@@ -99,15 +253,15 @@ function q() {
|
|
|
99
253
|
let t = d(e).map((e) => o(e.id));
|
|
100
254
|
return t.length && t.every(Boolean) ? "visible" : t.some(Boolean) ? "partial" : "hidden";
|
|
101
255
|
}
|
|
102
|
-
function
|
|
256
|
+
function p(e, t) {
|
|
103
257
|
for (let n of d(e)) s(n.id, t);
|
|
104
258
|
}
|
|
105
|
-
let
|
|
106
|
-
function
|
|
107
|
-
for (let t of
|
|
259
|
+
let m = v(() => i.value.filter((e) => e.base)), h = v(() => m.value.find((e) => o(e.id))?.id ?? null);
|
|
260
|
+
function g(e) {
|
|
261
|
+
for (let t of m.value) s(t.id, t.id === e);
|
|
108
262
|
}
|
|
109
263
|
return {
|
|
110
|
-
model:
|
|
264
|
+
model: v(() => n.value),
|
|
111
265
|
layers: i,
|
|
112
266
|
isVisible: o,
|
|
113
267
|
setVisible: s,
|
|
@@ -116,15 +270,15 @@ function q() {
|
|
|
116
270
|
setOpacity: u,
|
|
117
271
|
layersOf: d,
|
|
118
272
|
groupState: f,
|
|
119
|
-
setGroupVisible:
|
|
120
|
-
baseLayers:
|
|
121
|
-
baseLayer:
|
|
122
|
-
setBaseLayer:
|
|
273
|
+
setGroupVisible: p,
|
|
274
|
+
baseLayers: m,
|
|
275
|
+
baseLayer: h,
|
|
276
|
+
setBaseLayer: g
|
|
123
277
|
};
|
|
124
278
|
}
|
|
125
279
|
//#endregion
|
|
126
280
|
//#region src/components/MMap.vue?vue&type=script&setup=true&lang.ts
|
|
127
|
-
var
|
|
281
|
+
var ue = 600, de = /* @__PURE__ */ E({
|
|
128
282
|
__name: "MMap",
|
|
129
283
|
props: {
|
|
130
284
|
mapStyle: {},
|
|
@@ -168,21 +322,21 @@ var re = 600, J = /* @__PURE__ */ x({
|
|
|
168
322
|
"update:pitch"
|
|
169
323
|
],
|
|
170
324
|
setup(e, { expose: t, emit: n }) {
|
|
171
|
-
let r = e, i = n, a =
|
|
172
|
-
|
|
173
|
-
map:
|
|
174
|
-
maplibre:
|
|
175
|
-
styleVersion:
|
|
325
|
+
let r = e, i = n, a = R(), o = R(), s = V(), c = V(), l = R(0), d = V(), f = ce(), p = R(null);
|
|
326
|
+
I(q, {
|
|
327
|
+
map: s,
|
|
328
|
+
maplibre: c,
|
|
329
|
+
styleVersion: l,
|
|
176
330
|
model: d,
|
|
177
|
-
layerState:
|
|
178
|
-
activeTool:
|
|
331
|
+
layerState: f,
|
|
332
|
+
activeTool: p
|
|
179
333
|
});
|
|
180
|
-
function
|
|
181
|
-
d.value = r.adapter ? r.adapter(e.getStyle(), { styleUrl: typeof r.mapStyle == "string" ? r.mapStyle : void 0 }) : void 0,
|
|
334
|
+
function m(e) {
|
|
335
|
+
d.value = r.adapter ? r.adapter(e.getStyle(), { styleUrl: typeof r.mapStyle == "string" ? r.mapStyle : void 0 }) : void 0, le(f, e, d.value);
|
|
182
336
|
}
|
|
183
|
-
let
|
|
184
|
-
function
|
|
185
|
-
let e =
|
|
337
|
+
let h = u(), g = () => typeof r.persist == "string" ? r.persist : r.persist ? "m3-map-view" : null;
|
|
338
|
+
function v() {
|
|
339
|
+
let e = g();
|
|
186
340
|
if (!e) return {};
|
|
187
341
|
try {
|
|
188
342
|
let t = JSON.parse(localStorage.getItem(e) ?? "null");
|
|
@@ -200,7 +354,7 @@ var re = 600, J = /* @__PURE__ */ x({
|
|
|
200
354
|
pitch: e.getPitch()
|
|
201
355
|
};
|
|
202
356
|
}
|
|
203
|
-
let
|
|
357
|
+
let w = {
|
|
204
358
|
navigation: {
|
|
205
359
|
corner: "top-right",
|
|
206
360
|
create: (e) => new e.NavigationControl()
|
|
@@ -222,44 +376,40 @@ var re = 600, J = /* @__PURE__ */ x({
|
|
|
222
376
|
maxWidth: 100,
|
|
223
377
|
unit: "metric"
|
|
224
378
|
})
|
|
225
|
-
},
|
|
226
|
-
attribution: {
|
|
227
|
-
corner: "bottom-right",
|
|
228
|
-
create: (e) => new e.AttributionControl({ compact: !0 })
|
|
229
379
|
}
|
|
230
|
-
},
|
|
231
|
-
function
|
|
232
|
-
let t =
|
|
380
|
+
}, E = /* @__PURE__ */ new Map();
|
|
381
|
+
function D(e) {
|
|
382
|
+
let t = s.value, n = c.value;
|
|
233
383
|
if (!t || !n) return;
|
|
234
|
-
let i =
|
|
235
|
-
i && (t.removeControl(i),
|
|
384
|
+
let i = E.get(e);
|
|
385
|
+
i && (t.removeControl(i), E.delete(e));
|
|
236
386
|
let a = r[e];
|
|
237
387
|
if (!a) return;
|
|
238
|
-
let o =
|
|
239
|
-
t.addControl(o, a === !0 ?
|
|
388
|
+
let o = w[e].create(n);
|
|
389
|
+
t.addControl(o, a === !0 ? w[e].corner : a), E.set(e, o);
|
|
240
390
|
}
|
|
241
|
-
for (let e of Object.keys(
|
|
242
|
-
function
|
|
391
|
+
for (let e of Object.keys(w)) W(() => r[e], () => D(e));
|
|
392
|
+
function O() {
|
|
243
393
|
return {
|
|
244
|
-
"AttributionControl.ToggleAttribution":
|
|
245
|
-
"AttributionControl.MapFeedback":
|
|
246
|
-
"FullscreenControl.Enter":
|
|
247
|
-
"FullscreenControl.Exit":
|
|
248
|
-
"GeolocateControl.FindMyLocation":
|
|
249
|
-
"GeolocateControl.LocationNotAvailable":
|
|
250
|
-
"Map.Title":
|
|
251
|
-
"Marker.Title":
|
|
252
|
-
"NavigationControl.ResetBearing":
|
|
253
|
-
"NavigationControl.ZoomIn":
|
|
254
|
-
"NavigationControl.ZoomOut":
|
|
255
|
-
"Popup.Close":
|
|
256
|
-
"CooperativeGesturesHandler.WindowsHelpText":
|
|
257
|
-
"CooperativeGesturesHandler.MacHelpText":
|
|
258
|
-
"CooperativeGesturesHandler.MobileHelpText":
|
|
394
|
+
"AttributionControl.ToggleAttribution": h.mapToggleAttribution,
|
|
395
|
+
"AttributionControl.MapFeedback": h.mapFeedback,
|
|
396
|
+
"FullscreenControl.Enter": h.mapEnterFullscreen,
|
|
397
|
+
"FullscreenControl.Exit": h.mapExitFullscreen,
|
|
398
|
+
"GeolocateControl.FindMyLocation": h.mapFindMyLocation,
|
|
399
|
+
"GeolocateControl.LocationNotAvailable": h.mapLocationNotAvailable,
|
|
400
|
+
"Map.Title": h.mapTitle,
|
|
401
|
+
"Marker.Title": h.mapMarker,
|
|
402
|
+
"NavigationControl.ResetBearing": h.mapResetBearing,
|
|
403
|
+
"NavigationControl.ZoomIn": h.mapZoomIn,
|
|
404
|
+
"NavigationControl.ZoomOut": h.mapZoomOut,
|
|
405
|
+
"Popup.Close": h.close,
|
|
406
|
+
"CooperativeGesturesHandler.WindowsHelpText": h.mapCtrlScroll,
|
|
407
|
+
"CooperativeGesturesHandler.MacHelpText": h.mapCmdScroll,
|
|
408
|
+
"CooperativeGesturesHandler.MobileHelpText": h.mapTwoFingers
|
|
259
409
|
};
|
|
260
410
|
}
|
|
261
|
-
let
|
|
262
|
-
function
|
|
411
|
+
let A = R(null), L, z;
|
|
412
|
+
function U(e) {
|
|
263
413
|
let t = e.getAttribute("title");
|
|
264
414
|
t && e.closest(".maplibregl-ctrl") && (e.setAttribute("data-m3-tip", t), e.hasAttribute("aria-label") || e.setAttribute("aria-label", t), e.removeAttribute("title"));
|
|
265
415
|
}
|
|
@@ -267,128 +417,142 @@ var re = 600, J = /* @__PURE__ */ x({
|
|
|
267
417
|
let t = e.getAttribute("data-m3-tip"), n = a.value?.getBoundingClientRect();
|
|
268
418
|
if (!t || !n) return;
|
|
269
419
|
let r = e.getBoundingClientRect(), i = r.left + r.width / 2 > n.left + n.width / 2;
|
|
270
|
-
|
|
420
|
+
A.value = {
|
|
271
421
|
text: t,
|
|
272
422
|
left: i,
|
|
273
423
|
x: (i ? r.left - 8 : r.right + 8) - n.left,
|
|
274
424
|
y: r.top + r.height / 2 - n.top
|
|
275
425
|
};
|
|
276
426
|
}
|
|
277
|
-
function
|
|
278
|
-
clearTimeout(
|
|
427
|
+
function ne() {
|
|
428
|
+
clearTimeout(L), A.value = null;
|
|
279
429
|
}
|
|
280
|
-
let
|
|
281
|
-
function
|
|
282
|
-
let t =
|
|
283
|
-
t && e.pointerType !== "touch" && (clearTimeout(
|
|
430
|
+
let K = (e) => e.target?.closest?.(".maplibregl-ctrl [data-m3-tip]") ?? null;
|
|
431
|
+
function J(e) {
|
|
432
|
+
let t = K(e);
|
|
433
|
+
t && e.pointerType !== "touch" && (clearTimeout(L), L = setTimeout(() => te(t), ue));
|
|
284
434
|
}
|
|
285
|
-
function
|
|
286
|
-
let t =
|
|
287
|
-
t && !t.contains(e.relatedTarget) &&
|
|
435
|
+
function re(e) {
|
|
436
|
+
let t = K(e);
|
|
437
|
+
t && !t.contains(e.relatedTarget) && ne();
|
|
288
438
|
}
|
|
289
|
-
function
|
|
290
|
-
let t =
|
|
439
|
+
function ie(e) {
|
|
440
|
+
let t = K(e);
|
|
291
441
|
t?.matches(":focus-visible") && te(t);
|
|
292
442
|
}
|
|
293
|
-
|
|
443
|
+
P(() => {
|
|
294
444
|
let e = a.value;
|
|
295
|
-
e && (e.querySelectorAll("[title]").forEach(
|
|
296
|
-
for (let t of e) t.type === "attributes" ?
|
|
297
|
-
e instanceof Element && (
|
|
445
|
+
e && (e.querySelectorAll("[title]").forEach(U), z = new MutationObserver((e) => {
|
|
446
|
+
for (let t of e) t.type === "attributes" ? U(t.target) : t.addedNodes.forEach((e) => {
|
|
447
|
+
e instanceof Element && (U(e), e.querySelectorAll("[title]").forEach(U));
|
|
298
448
|
});
|
|
299
|
-
}),
|
|
449
|
+
}), z.observe(e, {
|
|
300
450
|
subtree: !0,
|
|
301
451
|
childList: !0,
|
|
302
452
|
attributes: !0,
|
|
303
453
|
attributeFilter: ["title"]
|
|
304
454
|
}));
|
|
305
|
-
}),
|
|
306
|
-
|
|
455
|
+
}), N(() => {
|
|
456
|
+
z?.disconnect(), clearTimeout(L);
|
|
307
457
|
});
|
|
308
|
-
let
|
|
309
|
-
|
|
458
|
+
let ae = !1;
|
|
459
|
+
P(async () => {
|
|
310
460
|
let e = await import("maplibre-gl"), t = "Map" in e ? e : e.default;
|
|
311
|
-
if (
|
|
312
|
-
let n =
|
|
461
|
+
if (ae || !o.value) return;
|
|
462
|
+
let n = v(), a = {
|
|
313
463
|
center: n.center ?? r.center,
|
|
314
464
|
zoom: n.zoom ?? r.zoom,
|
|
315
465
|
bearing: n.bearing ?? r.bearing,
|
|
316
466
|
pitch: n.pitch ?? r.pitch
|
|
317
|
-
},
|
|
318
|
-
container:
|
|
467
|
+
}, u = k(new t.Map({
|
|
468
|
+
container: o.value,
|
|
319
469
|
style: r.mapStyle,
|
|
320
470
|
attributionControl: !1,
|
|
321
|
-
locale:
|
|
471
|
+
locale: O(),
|
|
322
472
|
...Object.fromEntries(Object.entries(a).filter(([, e]) => e !== void 0)),
|
|
323
473
|
...r.options
|
|
324
474
|
}));
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
}),
|
|
328
|
-
let e = C(
|
|
475
|
+
c.value = t, u.on("style.load", () => {
|
|
476
|
+
m(u), l.value++;
|
|
477
|
+
}), u.on("click", (e) => i("click", e)), u.on("moveend", () => {
|
|
478
|
+
let e = C(u);
|
|
329
479
|
i("update:center", e.center), i("update:zoom", e.zoom), i("update:bearing", e.bearing), i("update:pitch", e.pitch);
|
|
330
|
-
let t =
|
|
480
|
+
let t = g();
|
|
331
481
|
if (t) try {
|
|
332
482
|
localStorage.setItem(t, JSON.stringify(e));
|
|
333
483
|
} catch {}
|
|
334
|
-
}),
|
|
335
|
-
|
|
336
|
-
for (let e of Object.keys(
|
|
337
|
-
i("ready",
|
|
484
|
+
}), u.once("load", () => {
|
|
485
|
+
s.value = u;
|
|
486
|
+
for (let e of Object.keys(w)) D(e);
|
|
487
|
+
i("ready", u);
|
|
338
488
|
});
|
|
339
|
-
}),
|
|
340
|
-
|
|
489
|
+
}), ee(() => {
|
|
490
|
+
ae = !0, s.value?.remove(), s.value = void 0;
|
|
341
491
|
});
|
|
342
|
-
let
|
|
343
|
-
return
|
|
344
|
-
let e =
|
|
492
|
+
let Y = (e, t) => Math.abs(e - t) < 1e-9;
|
|
493
|
+
return W(() => r.center?.join(","), () => {
|
|
494
|
+
let e = s.value;
|
|
345
495
|
if (!e || !r.center) return;
|
|
346
496
|
let t = e.getCenter();
|
|
347
|
-
(!
|
|
348
|
-
}),
|
|
349
|
-
|
|
350
|
-
}),
|
|
351
|
-
|
|
352
|
-
}),
|
|
353
|
-
|
|
354
|
-
}),
|
|
355
|
-
|
|
356
|
-
}),
|
|
497
|
+
(!Y(t.lng, r.center[0]) || !Y(t.lat, r.center[1])) && e.jumpTo({ center: r.center });
|
|
498
|
+
}), W(() => r.zoom, (e) => {
|
|
499
|
+
s.value && e !== void 0 && !Y(s.value.getZoom(), e) && s.value.jumpTo({ zoom: e });
|
|
500
|
+
}), W(() => r.bearing, (e) => {
|
|
501
|
+
s.value && e !== void 0 && !Y(s.value.getBearing(), e) && s.value.jumpTo({ bearing: e });
|
|
502
|
+
}), W(() => r.pitch, (e) => {
|
|
503
|
+
s.value && e !== void 0 && !Y(s.value.getPitch(), e) && s.value.jumpTo({ pitch: e });
|
|
504
|
+
}), W(() => r.adapter, () => {
|
|
505
|
+
s.value && m(s.value);
|
|
506
|
+
}), W(() => r.mapStyle, (e) => s.value?.setStyle(e, { diff: !1 })), t({ map: s }), (t, n) => (F(), x("div", {
|
|
357
507
|
ref_key: "root",
|
|
358
508
|
ref: a,
|
|
359
509
|
class: "m3-map relative overflow-hidden",
|
|
360
|
-
onPointerover:
|
|
361
|
-
onPointerout:
|
|
362
|
-
onPointerdown:
|
|
363
|
-
onFocusin:
|
|
364
|
-
onFocusout:
|
|
510
|
+
onPointerover: J,
|
|
511
|
+
onPointerout: re,
|
|
512
|
+
onPointerdown: ne,
|
|
513
|
+
onFocusin: ie,
|
|
514
|
+
onFocusout: ne
|
|
365
515
|
}, [
|
|
366
|
-
|
|
516
|
+
S("div", {
|
|
367
517
|
ref_key: "container",
|
|
368
|
-
ref:
|
|
518
|
+
ref: o,
|
|
369
519
|
class: "h-full w-full"
|
|
370
520
|
}, null, 512),
|
|
371
|
-
|
|
372
|
-
|
|
521
|
+
s.value && e.attribution ? (F(), y(oe, {
|
|
522
|
+
key: 0,
|
|
523
|
+
position: e.attribution === !0 ? "bottom-right" : e.attribution
|
|
524
|
+
}, null, 8, ["position"])) : b("", !0),
|
|
525
|
+
s.value ? B(t.$slots, "default", {}, void 0, void 0, 1) : b("", !0),
|
|
526
|
+
T(_, {
|
|
373
527
|
"enter-active-class": "transition-opacity duration-150",
|
|
374
528
|
"enter-from-class": "opacity-0",
|
|
375
529
|
"leave-active-class": "transition-opacity duration-100",
|
|
376
530
|
"leave-to-class": "opacity-0"
|
|
377
531
|
}, {
|
|
378
|
-
default:
|
|
532
|
+
default: G(() => [A.value ? (F(), x("div", {
|
|
379
533
|
key: 0,
|
|
380
534
|
role: "tooltip",
|
|
381
|
-
class:
|
|
382
|
-
style:
|
|
383
|
-
left: `${
|
|
384
|
-
top: `${
|
|
535
|
+
class: j(["pointer-events-none absolute z-10 min-h-6 max-w-[200px] -translate-y-1/2 rounded bg-inverse-surface px-2 py-1 text-body-small whitespace-nowrap text-inverse-on-surface", A.value.left ? "-translate-x-full" : ""]),
|
|
536
|
+
style: M({
|
|
537
|
+
left: `${A.value.x}px`,
|
|
538
|
+
top: `${A.value.y}px`
|
|
385
539
|
})
|
|
386
|
-
},
|
|
540
|
+
}, H(A.value.text), 7)) : b("", !0)]),
|
|
387
541
|
_: 1
|
|
388
542
|
})
|
|
389
543
|
], 544));
|
|
390
544
|
}
|
|
391
|
-
}),
|
|
545
|
+
}), fe = 13.5, pe = fe / Math.SQRT2, me = [0, -14], he = {
|
|
546
|
+
center: [0, 0],
|
|
547
|
+
top: [0, 0],
|
|
548
|
+
"top-left": [0, 0],
|
|
549
|
+
"top-right": [0, 0],
|
|
550
|
+
bottom: [0, -38.1],
|
|
551
|
+
"bottom-left": [pe, (24.6 + pe) * -1],
|
|
552
|
+
"bottom-right": [-pe, (24.6 + pe) * -1],
|
|
553
|
+
left: [fe, -24.6],
|
|
554
|
+
right: [-13.5, -24.6]
|
|
555
|
+
}, ge = { class: "hidden" }, _e = /* @__PURE__ */ E({
|
|
392
556
|
inheritAttrs: !1,
|
|
393
557
|
__name: "MMapMarker",
|
|
394
558
|
props: {
|
|
@@ -404,40 +568,39 @@ var re = 600, J = /* @__PURE__ */ x({
|
|
|
404
568
|
},
|
|
405
569
|
emits: ["update:lngLat", "click"],
|
|
406
570
|
setup(e, { expose: t, emit: n }) {
|
|
407
|
-
let r = e, i = n, a =
|
|
571
|
+
let r = e, i = n, a = ne(), o = R(), s = R(), { onReady: c } = J(), l, u = !1;
|
|
408
572
|
c((e, t) => {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
...n ? { element: o.value } : { color: r.color ?? "currentColor" },
|
|
573
|
+
u = !!a.default && !!o.value, l = new t.Marker({
|
|
574
|
+
...u ? { element: o.value } : { color: r.color ?? "currentColor" },
|
|
412
575
|
draggable: r.draggable,
|
|
413
|
-
anchor: r.anchor
|
|
414
|
-
offset: r.offset,
|
|
576
|
+
...r.anchor ? { anchor: r.anchor } : u ? { anchor: "center" } : {},
|
|
577
|
+
...r.offset ? { offset: r.offset } : {},
|
|
415
578
|
rotation: r.rotation
|
|
416
|
-
}), !
|
|
579
|
+
}), !u && !r.color && l.getElement().classList.add("m3-map-marker--default"), l.setLngLat(r.lngLat).addTo(e), l.getElement().addEventListener("click", d), l.on("dragend", () => {
|
|
417
580
|
let { lng: e, lat: t } = l.getLngLat();
|
|
418
581
|
i("update:lngLat", [e, t]);
|
|
419
582
|
}), a.popup && s.value && l.setPopup(new t.Popup({
|
|
420
|
-
offset:
|
|
583
|
+
...u ? { offset: 16 } : {},
|
|
421
584
|
maxWidth: "320px"
|
|
422
585
|
}).setDOMContent(s.value));
|
|
423
586
|
});
|
|
424
|
-
function
|
|
587
|
+
function d(e) {
|
|
425
588
|
i("click", e);
|
|
426
589
|
}
|
|
427
|
-
return
|
|
428
|
-
l?.getElement().removeEventListener("click",
|
|
429
|
-
}), t({ marker: () => l }), (e, t) => (
|
|
590
|
+
return W(() => r.lngLat.join(","), () => l?.setLngLat(r.lngLat)), W(() => r.draggable, (e) => l?.setDraggable(e)), W(() => r.rotation, (e) => l?.setRotation(e)), W(() => r.offset?.join(","), () => l?.setOffset(r.offset ?? (u ? [0, 0] : me))), N(() => {
|
|
591
|
+
l?.getElement().removeEventListener("click", d), l?.getPopup()?.remove(), l?.remove();
|
|
592
|
+
}), t({ marker: () => l }), (e, t) => (F(), x("div", ge, [e.$slots.default ? (F(), x("div", A({
|
|
430
593
|
key: 0,
|
|
431
594
|
ref_key: "content",
|
|
432
595
|
ref: o,
|
|
433
596
|
class: "m3-map-marker"
|
|
434
|
-
}, e.$attrs), [
|
|
597
|
+
}, e.$attrs), [B(e.$slots, "default")], 16)) : b("", !0), e.$slots.popup ? (F(), x("div", {
|
|
435
598
|
key: 1,
|
|
436
599
|
ref_key: "popupContent",
|
|
437
600
|
ref: s
|
|
438
|
-
}, [
|
|
601
|
+
}, [B(e.$slots, "popup")], 512)) : b("", !0)]));
|
|
439
602
|
}
|
|
440
|
-
}),
|
|
603
|
+
}), ve = { class: "hidden" }, ye = /* @__PURE__ */ E({
|
|
441
604
|
inheritAttrs: !1,
|
|
442
605
|
__name: "MMapPopup",
|
|
443
606
|
props: {
|
|
@@ -455,12 +618,12 @@ var re = 600, J = /* @__PURE__ */ x({
|
|
|
455
618
|
default: !0
|
|
456
619
|
},
|
|
457
620
|
anchor: {},
|
|
458
|
-
offset: {
|
|
621
|
+
offset: {},
|
|
459
622
|
maxWidth: { default: "320px" }
|
|
460
623
|
},
|
|
461
624
|
emits: ["update:open"],
|
|
462
625
|
setup(e, { expose: t, emit: n }) {
|
|
463
|
-
let r = e, i = n, a =
|
|
626
|
+
let r = e, i = n, a = R(), { onReady: o } = J(), s, c, l = !1;
|
|
464
627
|
function u() {
|
|
465
628
|
s && c && !s.isOpen() && s.setLngLat(r.lngLat).addTo(c);
|
|
466
629
|
}
|
|
@@ -470,37 +633,37 @@ var re = 600, J = /* @__PURE__ */ x({
|
|
|
470
633
|
closeOnClick: r.closeOnClick,
|
|
471
634
|
closeOnMove: !1,
|
|
472
635
|
anchor: r.anchor,
|
|
473
|
-
offset: r.offset,
|
|
636
|
+
...r.offset === void 0 ? {} : { offset: r.offset },
|
|
474
637
|
maxWidth: r.maxWidth,
|
|
475
638
|
focusAfterOpen: !1
|
|
476
639
|
}), a.value && s.setDOMContent(a.value), s.on("close", () => {
|
|
477
640
|
l || i("update:open", !1);
|
|
478
641
|
}), r.open && u();
|
|
479
|
-
}),
|
|
642
|
+
}), W(() => r.open, (e) => {
|
|
480
643
|
e ? u() : s?.isOpen() && (l = !0, s.remove(), l = !1);
|
|
481
|
-
}),
|
|
644
|
+
}), W(() => r.lngLat.join(","), () => s?.setLngLat(r.lngLat)), W(() => r.maxWidth, (e) => s?.setMaxWidth(e)), W(() => r.offset, (e) => s?.setOffset(e ?? 0)), N(() => {
|
|
482
645
|
l = !0, s?.remove();
|
|
483
|
-
}), t({ popup: () => s }), (e, t) => (
|
|
646
|
+
}), t({ popup: () => s }), (e, t) => (F(), x("div", ve, [S("div", A({
|
|
484
647
|
ref_key: "content",
|
|
485
648
|
ref: a
|
|
486
|
-
}, e.$attrs), [
|
|
649
|
+
}, e.$attrs), [B(e.$slots, "default")], 16)]));
|
|
487
650
|
}
|
|
488
651
|
});
|
|
489
652
|
//#endregion
|
|
490
653
|
//#region src/composables/_useThemeTokens.ts
|
|
491
|
-
function
|
|
654
|
+
function be(e) {
|
|
492
655
|
let t = () => {
|
|
493
656
|
let t = getComputedStyle(document.documentElement);
|
|
494
657
|
return Object.fromEntries(e.map((e) => [e, t.getPropertyValue(`--color-${e}`).trim()]));
|
|
495
|
-
},
|
|
496
|
-
return
|
|
497
|
-
let
|
|
498
|
-
let
|
|
499
|
-
e.some((e) =>
|
|
500
|
-
}, s = (e) => (e instanceof Element ? e : e?.parentElement)?.id ===
|
|
501
|
-
|
|
502
|
-
e.some((e) => e.target === document.documentElement || s(e.target) || Array.from(e.addedNodes).some(s)) && (
|
|
503
|
-
}),
|
|
658
|
+
}, n = R(typeof document > "u" ? Object.fromEntries(e.map((e) => [e, ""])) : t()), r, i;
|
|
659
|
+
return P(() => {
|
|
660
|
+
let a = () => {
|
|
661
|
+
let r = t();
|
|
662
|
+
e.some((e) => r[e] !== n.value[e]) && (n.value = r);
|
|
663
|
+
}, s = (e) => (e instanceof Element ? e : e?.parentElement)?.id === o;
|
|
664
|
+
r = new MutationObserver((e) => {
|
|
665
|
+
e.some((e) => e.target === document.documentElement || s(e.target) || Array.from(e.addedNodes).some(s)) && (a(), clearTimeout(i), i = setTimeout(a, 300));
|
|
666
|
+
}), r.observe(document.documentElement, {
|
|
504
667
|
attributes: !0,
|
|
505
668
|
attributeFilter: [
|
|
506
669
|
"class",
|
|
@@ -508,18 +671,18 @@ function X(e) {
|
|
|
508
671
|
"data-palette",
|
|
509
672
|
"data-contrast"
|
|
510
673
|
]
|
|
511
|
-
}),
|
|
674
|
+
}), r.observe(document.head, {
|
|
512
675
|
childList: !0,
|
|
513
676
|
characterData: !0,
|
|
514
677
|
subtree: !0
|
|
515
678
|
});
|
|
516
|
-
}),
|
|
517
|
-
|
|
518
|
-
}),
|
|
679
|
+
}), N(() => {
|
|
680
|
+
r?.disconnect(), clearTimeout(i);
|
|
681
|
+
}), n;
|
|
519
682
|
}
|
|
520
683
|
//#endregion
|
|
521
684
|
//#region src/components/MMapGeoJson.vue
|
|
522
|
-
var
|
|
685
|
+
var xe = /* @__PURE__ */ E({
|
|
523
686
|
inheritAttrs: !1,
|
|
524
687
|
__name: "MMapGeoJson",
|
|
525
688
|
props: {
|
|
@@ -535,13 +698,13 @@ var se = /* @__PURE__ */ x({
|
|
|
535
698
|
},
|
|
536
699
|
emits: ["click"],
|
|
537
700
|
setup(e, { expose: t, emit: n }) {
|
|
538
|
-
let r = e, i = n, a = r.id ?? `m3-geojson-${
|
|
701
|
+
let r = e, i = n, a = r.id ?? `m3-geojson-${te()}`, { onReady: o, styleVersion: s } = J(), c = be(["primary", "surface"]), l = (...e) => [
|
|
539
702
|
"match",
|
|
540
703
|
["geometry-type"],
|
|
541
704
|
e,
|
|
542
705
|
!0,
|
|
543
706
|
!1
|
|
544
|
-
], u =
|
|
707
|
+
], u = v(() => {
|
|
545
708
|
let { primary: e, surface: t } = c.value;
|
|
546
709
|
return [
|
|
547
710
|
{
|
|
@@ -574,25 +737,25 @@ var se = /* @__PURE__ */ x({
|
|
|
574
737
|
}
|
|
575
738
|
}
|
|
576
739
|
];
|
|
577
|
-
}), d =
|
|
740
|
+
}), d = v(() => (r.layers ?? u.value).map((e, t) => ({
|
|
578
741
|
...e,
|
|
579
742
|
id: e.id ?? `${a}-${t}`,
|
|
580
743
|
source: a
|
|
581
|
-
}))), f,
|
|
744
|
+
}))), f, p = [], m = (e) => i("click", e), h = () => {
|
|
582
745
|
r.interactive && f && (f.getCanvas().style.cursor = "pointer");
|
|
583
|
-
},
|
|
746
|
+
}, g = () => {
|
|
584
747
|
r.interactive && f && (f.getCanvas().style.cursor = "");
|
|
585
748
|
};
|
|
586
|
-
function
|
|
749
|
+
function _() {
|
|
587
750
|
if (f) {
|
|
588
|
-
for (let e of
|
|
589
|
-
|
|
751
|
+
for (let e of p) f.off("click", e, m), f.off("mouseenter", e, h), f.off("mouseleave", e, g), f.getLayer(e) && f.removeLayer(e);
|
|
752
|
+
p = [];
|
|
590
753
|
}
|
|
591
754
|
}
|
|
592
755
|
function y() {
|
|
593
756
|
if (f) {
|
|
594
|
-
|
|
595
|
-
for (let e of d.value) f.addLayer(e, r.before && f.getLayer(r.before) ? r.before : void 0), f.on("click", e.id,
|
|
757
|
+
_();
|
|
758
|
+
for (let e of d.value) f.addLayer(e, r.before && f.getLayer(r.before) ? r.before : void 0), f.on("click", e.id, m), f.on("mouseenter", e.id, h), f.on("mouseleave", e.id, g), p.push(e.id);
|
|
596
759
|
}
|
|
597
760
|
}
|
|
598
761
|
function b() {
|
|
@@ -600,57 +763,30 @@ var se = /* @__PURE__ */ x({
|
|
|
600
763
|
type: "geojson",
|
|
601
764
|
data: r.data,
|
|
602
765
|
...r.sourceOptions
|
|
603
|
-
}),
|
|
766
|
+
}), p = []), (!p.length || !f.getLayer(p[0])) && y());
|
|
604
767
|
}
|
|
605
768
|
return o((e) => {
|
|
606
769
|
f = e, b();
|
|
607
|
-
}),
|
|
608
|
-
f &&= (
|
|
770
|
+
}), W(s, () => b()), W(() => r.data, (e) => (f?.getSource(a))?.setData(e)), W(() => JSON.stringify(d.value), () => y()), W(() => r.before, () => y()), N(() => {
|
|
771
|
+
f &&= (_(), f.getSource(a) && f.removeSource(a), void 0);
|
|
609
772
|
}), t({
|
|
610
773
|
sourceId: a,
|
|
611
|
-
layerIds: () => [...
|
|
774
|
+
layerIds: () => [...p]
|
|
612
775
|
}), (e, t) => null;
|
|
613
776
|
}
|
|
614
|
-
}),
|
|
615
|
-
inheritAttrs: !1,
|
|
616
|
-
__name: "MMapControl",
|
|
617
|
-
props: {
|
|
618
|
-
position: { default: "top-right" },
|
|
619
|
-
group: {
|
|
620
|
-
type: Boolean,
|
|
621
|
-
default: !0
|
|
622
|
-
}
|
|
623
|
-
},
|
|
624
|
-
setup(e) {
|
|
625
|
-
let t = e, n = P(), { onReady: r } = G(), i, a = {
|
|
626
|
-
onAdd: () => n.value,
|
|
627
|
-
onRemove: () => n.value?.remove()
|
|
628
|
-
};
|
|
629
|
-
return r((e) => {
|
|
630
|
-
i = e, n.value && e.addControl(a, t.position);
|
|
631
|
-
}), H(() => t.position, (e) => {
|
|
632
|
-
i && n.value && (i.removeControl(a), i.addControl(a, e));
|
|
633
|
-
}), O(() => {
|
|
634
|
-
i?.hasControl(a) && i.removeControl(a);
|
|
635
|
-
}), (t, r) => (j(), g("div", ce, [_("div", T({
|
|
636
|
-
ref_key: "el",
|
|
637
|
-
ref: n,
|
|
638
|
-
class: ["maplibregl-ctrl", e.group ? "maplibregl-ctrl-group" : ""]
|
|
639
|
-
}, t.$attrs), [I(t.$slots, "default")], 16)]));
|
|
640
|
-
}
|
|
641
|
-
}), ue = { class: "flex min-w-0 flex-1 flex-col" }, de = ["aria-label", "aria-pressed"], fe = { class: "flex min-w-0 flex-1 flex-col" }, pe = {
|
|
777
|
+
}), Q = { class: "flex min-w-0 flex-1 flex-col" }, Se = ["aria-label", "aria-pressed"], Ce = { class: "flex min-w-0 flex-1 flex-col" }, we = {
|
|
642
778
|
key: 0,
|
|
643
779
|
class: "truncate text-label-small text-on-surface-variant"
|
|
644
|
-
},
|
|
780
|
+
}, Te = {
|
|
645
781
|
key: 0,
|
|
646
782
|
class: "rounded-full bg-primary/8 px-2 py-0.5 text-label-small tabular-nums text-primary"
|
|
647
|
-
},
|
|
783
|
+
}, Ee = { class: "min-h-0 overflow-hidden" }, De = { class: "flex flex-col gap-3 px-3 pb-3" }, Oe = {
|
|
648
784
|
key: 0,
|
|
649
785
|
class: "text-body-small text-on-surface-variant"
|
|
650
|
-
},
|
|
786
|
+
}, ke = { class: "flex items-center gap-2 rounded-2xl bg-surface-container-highest/60 px-3 py-1" }, Ae = ["src"], je = {
|
|
651
787
|
key: 2,
|
|
652
788
|
class: "flex flex-wrap items-center gap-2"
|
|
653
|
-
},
|
|
789
|
+
}, Me = ["href"], Ne = /* @__PURE__ */ E({
|
|
654
790
|
__name: "_MMapLayerItem",
|
|
655
791
|
props: {
|
|
656
792
|
layer: {},
|
|
@@ -658,80 +794,80 @@ var se = /* @__PURE__ */ x({
|
|
|
658
794
|
},
|
|
659
795
|
emits: ["toggle-expanded"],
|
|
660
796
|
setup(e, { emit: t }) {
|
|
661
|
-
let n = t, r =
|
|
662
|
-
return (t,
|
|
797
|
+
let n = t, r = u(), { isVisible: i, toggle: a, opacityOf: o, setOpacity: s } = Z();
|
|
798
|
+
return (t, l) => (F(), x("div", { class: j(["flex overflow-hidden rounded-2xl bg-surface-container", U(i)(e.layer.id) ? "" : "opacity-75"]) }, [S("div", { class: j(["w-1 shrink-0 transition-colors duration-200", U(i)(e.layer.id) ? "bg-primary" : "bg-outline-variant"]) }, null, 2), S("div", Q, [S("div", {
|
|
663
799
|
class: "flex cursor-pointer items-center gap-2 px-3 py-2",
|
|
664
|
-
onClick:
|
|
800
|
+
onClick: l[1] ||= (e) => n("toggle-expanded")
|
|
665
801
|
}, [
|
|
666
|
-
|
|
802
|
+
S("button", {
|
|
667
803
|
type: "button",
|
|
668
|
-
class:
|
|
669
|
-
"aria-label":
|
|
670
|
-
"aria-pressed":
|
|
671
|
-
onClick:
|
|
672
|
-
}, [
|
|
673
|
-
name:
|
|
804
|
+
class: j(["grid size-8 shrink-0 cursor-pointer place-items-center rounded-full transition-colors duration-200", U(i)(e.layer.id) ? "bg-primary/12 text-primary" : "bg-on-surface/5 text-on-surface-variant"]),
|
|
805
|
+
"aria-label": U(i)(e.layer.id) ? U(r).mapHideLayer : U(r).mapShowLayer,
|
|
806
|
+
"aria-pressed": U(i)(e.layer.id),
|
|
807
|
+
onClick: l[0] ||= K((t) => U(a)(e.layer.id), ["stop"])
|
|
808
|
+
}, [T(h, {
|
|
809
|
+
name: U(i)(e.layer.id) ? "visibility" : "visibility_off",
|
|
674
810
|
size: 18
|
|
675
|
-
}, null, 8, ["name"])], 10,
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
811
|
+
}, null, 8, ["name"])], 10, Se),
|
|
812
|
+
S("div", Ce, [S("span", { class: j(["truncate text-body-medium", U(i)(e.layer.id) ? "text-on-surface" : "text-on-surface-variant"]) }, H(e.layer.title), 3), e.layer.description && !e.expanded ? (F(), x("span", we, H(e.layer.description), 1)) : b("", !0)]),
|
|
813
|
+
U(i)(e.layer.id) && U(o)(e.layer.id) < 1 ? (F(), x("span", Te, H(Math.round(U(o)(e.layer.id) * 100)) + "% ", 1)) : b("", !0),
|
|
814
|
+
T(h, {
|
|
679
815
|
name: "expand_more",
|
|
680
816
|
size: 18,
|
|
681
|
-
class:
|
|
817
|
+
class: j(["shrink-0 text-on-surface-variant transition-transform duration-300", e.expanded ? "rotate-180" : ""])
|
|
682
818
|
}, null, 8, ["class"])
|
|
683
|
-
]),
|
|
819
|
+
]), S("div", {
|
|
684
820
|
class: "grid transition-[grid-template-rows] duration-300 ease-[cubic-bezier(0.2,0,0,1)]",
|
|
685
|
-
style:
|
|
686
|
-
}, [
|
|
687
|
-
e.layer.description ? (
|
|
688
|
-
|
|
821
|
+
style: M({ gridTemplateRows: e.expanded ? "1fr" : "0fr" })
|
|
822
|
+
}, [S("div", Ee, [S("div", De, [
|
|
823
|
+
e.layer.description ? (F(), x("p", Oe, H(e.layer.description), 1)) : b("", !0),
|
|
824
|
+
S("div", ke, [T(h, {
|
|
689
825
|
name: "opacity",
|
|
690
826
|
size: 16,
|
|
691
827
|
class: "shrink-0 text-on-surface-variant"
|
|
692
|
-
}),
|
|
693
|
-
"model-value":
|
|
828
|
+
}), T(c, {
|
|
829
|
+
"model-value": U(o)(e.layer.id),
|
|
694
830
|
min: 0,
|
|
695
831
|
max: 1,
|
|
696
832
|
step: .01,
|
|
697
|
-
label:
|
|
833
|
+
label: U(r).mapOpacity,
|
|
698
834
|
class: "flex-1",
|
|
699
|
-
"onUpdate:modelValue":
|
|
835
|
+
"onUpdate:modelValue": l[2] ||= (t) => U(s)(e.layer.id, Number(t))
|
|
700
836
|
}, null, 8, ["model-value", "label"])]),
|
|
701
|
-
e.layer.legend ? (
|
|
837
|
+
e.layer.legend ? (F(), x("img", {
|
|
702
838
|
key: 1,
|
|
703
839
|
src: e.layer.legend,
|
|
704
840
|
alt: "",
|
|
705
841
|
class: "max-w-full self-start",
|
|
706
842
|
loading: "lazy"
|
|
707
|
-
}, null, 8,
|
|
708
|
-
e.layer.download || t.$slots.actions ? (
|
|
843
|
+
}, null, 8, Ae)) : b("", !0),
|
|
844
|
+
e.layer.download || t.$slots.actions ? (F(), x("div", je, [e.layer.download ? (F(), x("a", {
|
|
709
845
|
key: 0,
|
|
710
846
|
href: e.layer.download,
|
|
711
847
|
target: "_blank",
|
|
712
848
|
rel: "noopener",
|
|
713
849
|
download: "",
|
|
714
850
|
class: "inline-flex items-center gap-1 rounded-full px-3 py-1.5 text-label-large text-primary hover:bg-primary/8"
|
|
715
|
-
}, [
|
|
851
|
+
}, [T(h, {
|
|
716
852
|
name: "download",
|
|
717
853
|
size: 18
|
|
718
|
-
}),
|
|
854
|
+
}), w(" " + H(U(r).mapDownload), 1)], 8, Me)) : b("", !0), B(t.$slots, "actions", {
|
|
719
855
|
layer: e.layer,
|
|
720
|
-
visible:
|
|
721
|
-
})])) :
|
|
856
|
+
visible: U(i)(e.layer.id)
|
|
857
|
+
})])) : b("", !0)
|
|
722
858
|
])])], 4)])], 2));
|
|
723
859
|
}
|
|
724
|
-
}),
|
|
860
|
+
}), Pe = { class: "flex flex-col gap-3" }, Fe = ["onClick"], Ie = [
|
|
725
861
|
"aria-label",
|
|
726
862
|
"aria-pressed",
|
|
727
863
|
"onClick"
|
|
728
|
-
],
|
|
864
|
+
], Le = { class: "flex-1 select-none truncate text-label-large text-on-surface" }, Re = { class: "rounded-full bg-surface-container-highest px-2 py-0.5 text-label-small tabular-nums text-on-surface-variant" }, ze = {
|
|
729
865
|
key: 1,
|
|
730
866
|
class: "flex flex-col gap-1.5"
|
|
731
|
-
},
|
|
867
|
+
}, Be = {
|
|
732
868
|
key: 2,
|
|
733
869
|
class: "flex flex-col items-center gap-3 py-8"
|
|
734
|
-
},
|
|
870
|
+
}, Ve = { class: "grid size-14 place-items-center rounded-full bg-surface-container-highest" }, He = { class: "text-body-medium text-on-surface-variant" }, Ue = /* @__PURE__ */ E({
|
|
735
871
|
__name: "MMapLayers",
|
|
736
872
|
props: {
|
|
737
873
|
search: {
|
|
@@ -744,103 +880,103 @@ var se = /* @__PURE__ */ x({
|
|
|
744
880
|
}
|
|
745
881
|
},
|
|
746
882
|
setup(e) {
|
|
747
|
-
let t = e, n =
|
|
883
|
+
let t = e, n = u(), { model: r, layersOf: i, isVisible: a, groupState: o, setGroupVisible: s } = Z(), c = R(""), l = (e) => !c.value || e.title.toLowerCase().includes(c.value.toLowerCase()), d = v(() => (r.value?.groups ?? []).map((e) => ({
|
|
748
884
|
...e,
|
|
749
885
|
all: i(e.name),
|
|
750
|
-
layers: i(e.name).filter(
|
|
751
|
-
})).filter((e) => e.layers.length)),
|
|
752
|
-
function
|
|
753
|
-
let t = new Set(
|
|
754
|
-
t.delete(e) || t.add(e),
|
|
886
|
+
layers: i(e.name).filter(l)
|
|
887
|
+
})).filter((e) => e.layers.length)), f = v(() => i(null).filter(l)), p = R(/* @__PURE__ */ new Set()), _ = (e) => p.value.has(e) === t.collapsed;
|
|
888
|
+
function w(e) {
|
|
889
|
+
let t = new Set(p.value);
|
|
890
|
+
t.delete(e) || t.add(e), p.value = t;
|
|
755
891
|
}
|
|
756
|
-
let
|
|
757
|
-
function
|
|
758
|
-
let t = new Set(
|
|
759
|
-
t.delete(e) || t.add(e),
|
|
892
|
+
let E = R(/* @__PURE__ */ new Set());
|
|
893
|
+
function D(e) {
|
|
894
|
+
let t = new Set(E.value);
|
|
895
|
+
t.delete(e) || t.add(e), E.value = t;
|
|
760
896
|
}
|
|
761
|
-
let
|
|
762
|
-
return (t, r) => (
|
|
763
|
-
e.search ? (
|
|
897
|
+
let O = (e) => e.filter((e) => a(e.id)).length;
|
|
898
|
+
return (t, r) => (F(), x("div", Pe, [
|
|
899
|
+
e.search ? (F(), y(m, {
|
|
764
900
|
key: 0,
|
|
765
|
-
modelValue:
|
|
766
|
-
"onUpdate:modelValue": r[0] ||= (e) =>
|
|
767
|
-
label:
|
|
901
|
+
modelValue: c.value,
|
|
902
|
+
"onUpdate:modelValue": r[0] ||= (e) => c.value = e,
|
|
903
|
+
label: U(n).mapSearchLayers,
|
|
768
904
|
"leading-icon": "search",
|
|
769
905
|
variant: "outlined",
|
|
770
906
|
clearable: ""
|
|
771
|
-
}, null, 8, ["modelValue", "label"])) :
|
|
772
|
-
(
|
|
907
|
+
}, null, 8, ["modelValue", "label"])) : b("", !0),
|
|
908
|
+
(F(!0), x(g, null, z(d.value, (e) => (F(), x("section", {
|
|
773
909
|
key: e.name,
|
|
774
910
|
class: "flex flex-col"
|
|
775
|
-
}, [
|
|
911
|
+
}, [S("div", {
|
|
776
912
|
class: "m3-map-layers-row flex cursor-pointer items-center gap-2 rounded-xl px-2 py-1.5",
|
|
777
|
-
onClick: (t) =>
|
|
913
|
+
onClick: (t) => w(e.name)
|
|
778
914
|
}, [
|
|
779
|
-
|
|
915
|
+
S("button", {
|
|
780
916
|
type: "button",
|
|
781
|
-
class:
|
|
782
|
-
"aria-label":
|
|
783
|
-
"aria-pressed":
|
|
784
|
-
onClick:
|
|
785
|
-
}, [
|
|
786
|
-
name:
|
|
917
|
+
class: j(["grid size-8 shrink-0 cursor-pointer place-items-center rounded-full transition-colors duration-200", U(o)(e.name) === "visible" ? "bg-primary-container text-on-primary-container" : U(o)(e.name) === "partial" ? "bg-secondary-container text-on-secondary-container" : "bg-on-surface/8 text-on-surface-variant"]),
|
|
918
|
+
"aria-label": U(o)(e.name) === "hidden" ? U(n).mapShowLayer : U(n).mapHideLayer,
|
|
919
|
+
"aria-pressed": U(o)(e.name) !== "hidden",
|
|
920
|
+
onClick: K((t) => U(s)(e.name, U(o)(e.name) !== "visible"), ["stop"])
|
|
921
|
+
}, [T(h, {
|
|
922
|
+
name: U(o)(e.name) === "hidden" ? "visibility_off" : "visibility",
|
|
787
923
|
size: 18
|
|
788
|
-
}, null, 8, ["name"])], 10,
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
924
|
+
}, null, 8, ["name"])], 10, Ie),
|
|
925
|
+
S("span", Le, H(e.title), 1),
|
|
926
|
+
S("span", Re, H(O(e.all)) + "/" + H(e.all.length), 1),
|
|
927
|
+
T(h, {
|
|
792
928
|
name: "expand_more",
|
|
793
929
|
size: 18,
|
|
794
|
-
class:
|
|
930
|
+
class: j(["text-on-surface-variant transition-transform duration-300", _(e.name) ? "rotate-180" : ""])
|
|
795
931
|
}, null, 8, ["class"])
|
|
796
|
-
], 8,
|
|
932
|
+
], 8, Fe), S("div", {
|
|
797
933
|
class: "grid transition-[grid-template-rows] duration-300 ease-[cubic-bezier(0.2,0,0,1)]",
|
|
798
|
-
style:
|
|
799
|
-
}, [
|
|
934
|
+
style: M({ gridTemplateRows: _(e.name) ? "1fr" : "0fr" })
|
|
935
|
+
}, [S("div", { class: j(["flex min-h-0 flex-col gap-1.5 overflow-hidden", _(e.name) ? "pt-1.5" : ""]) }, [(F(!0), x(g, null, z(e.layers, (e) => (F(), y(Ne, {
|
|
800
936
|
key: e.id,
|
|
801
937
|
layer: e,
|
|
802
|
-
expanded:
|
|
803
|
-
onToggleExpanded: (t) =>
|
|
804
|
-
},
|
|
938
|
+
expanded: E.value.has(e.id),
|
|
939
|
+
onToggleExpanded: (t) => D(e.id)
|
|
940
|
+
}, C({ _: 2 }, [t.$slots.actions ? {
|
|
805
941
|
name: "actions",
|
|
806
|
-
fn:
|
|
942
|
+
fn: G((e) => [B(t.$slots, "actions", A({ ref_for: !0 }, e))]),
|
|
807
943
|
key: "0"
|
|
808
944
|
} : void 0]), 1032, [
|
|
809
945
|
"layer",
|
|
810
946
|
"expanded",
|
|
811
947
|
"onToggleExpanded"
|
|
812
948
|
]))), 128))], 2)], 4)]))), 128)),
|
|
813
|
-
|
|
949
|
+
f.value.length ? (F(), x("div", ze, [(F(!0), x(g, null, z(f.value, (e) => (F(), y(Ne, {
|
|
814
950
|
key: e.id,
|
|
815
951
|
layer: e,
|
|
816
|
-
expanded:
|
|
817
|
-
onToggleExpanded: (t) =>
|
|
818
|
-
},
|
|
952
|
+
expanded: E.value.has(e.id),
|
|
953
|
+
onToggleExpanded: (t) => D(e.id)
|
|
954
|
+
}, C({ _: 2 }, [t.$slots.actions ? {
|
|
819
955
|
name: "actions",
|
|
820
|
-
fn:
|
|
956
|
+
fn: G((e) => [B(t.$slots, "actions", A({ ref_for: !0 }, e))]),
|
|
821
957
|
key: "0"
|
|
822
958
|
} : void 0]), 1032, [
|
|
823
959
|
"layer",
|
|
824
960
|
"expanded",
|
|
825
961
|
"onToggleExpanded"
|
|
826
|
-
]))), 128))])) :
|
|
827
|
-
!
|
|
962
|
+
]))), 128))])) : b("", !0),
|
|
963
|
+
!d.value.length && !f.value.length ? (F(), x("div", Be, [S("div", Ve, [T(h, {
|
|
828
964
|
name: "layers_clear",
|
|
829
965
|
size: 28,
|
|
830
966
|
class: "text-on-surface-variant"
|
|
831
|
-
})]),
|
|
967
|
+
})]), S("p", He, H(U(n).mapNoLayers), 1)])) : b("", !0)
|
|
832
968
|
]));
|
|
833
969
|
}
|
|
834
|
-
}),
|
|
970
|
+
}), We = [
|
|
835
971
|
"title",
|
|
836
972
|
"aria-label",
|
|
837
973
|
"aria-checked",
|
|
838
974
|
"onClick"
|
|
839
|
-
],
|
|
975
|
+
], Ge = ["src"], Ke = [
|
|
840
976
|
"title",
|
|
841
977
|
"aria-label",
|
|
842
978
|
"aria-checked"
|
|
843
|
-
],
|
|
979
|
+
], qe = /* @__PURE__ */ E({
|
|
844
980
|
__name: "MMapBaseLayers",
|
|
845
981
|
props: {
|
|
846
982
|
imageBase: { default: "" },
|
|
@@ -854,95 +990,95 @@ var se = /* @__PURE__ */ x({
|
|
|
854
990
|
}
|
|
855
991
|
},
|
|
856
992
|
setup(e) {
|
|
857
|
-
let t =
|
|
858
|
-
return (o, s) => (
|
|
859
|
-
class:
|
|
993
|
+
let t = u(), { baseLayers: n, baseLayer: r, setBaseLayer: i } = Z(), a = (e, t) => /^(https?:|data:|\/\/)/.test(e) ? e : `${t}${e}`;
|
|
994
|
+
return (o, s) => (F(), x("div", {
|
|
995
|
+
class: j(["flex gap-2", e.vertical ? "flex-col" : "flex-row flex-wrap"]),
|
|
860
996
|
role: "radiogroup"
|
|
861
|
-
}, [(
|
|
997
|
+
}, [(F(!0), x(g, null, z(U(n), (t) => (F(), x("button", {
|
|
862
998
|
key: t.id,
|
|
863
999
|
type: "button",
|
|
864
1000
|
role: "radio",
|
|
865
|
-
class:
|
|
1001
|
+
class: j(["m3-map-base grid size-12 shrink-0 cursor-pointer place-items-center overflow-hidden rounded-full border-2 bg-surface-variant transition-[border-color,transform] duration-150 hover:scale-110", U(r) === t.id ? "m3-map-base--active border-primary" : "border-transparent"]),
|
|
866
1002
|
title: t.title,
|
|
867
1003
|
"aria-label": t.title,
|
|
868
|
-
"aria-checked":
|
|
869
|
-
onClick: (e) =>
|
|
870
|
-
}, [t.base?.image ? (
|
|
1004
|
+
"aria-checked": U(r) === t.id,
|
|
1005
|
+
onClick: (e) => U(i)(t.id)
|
|
1006
|
+
}, [t.base?.image ? (F(), x("img", {
|
|
871
1007
|
key: 0,
|
|
872
1008
|
src: a(t.base.image, e.imageBase),
|
|
873
1009
|
alt: "",
|
|
874
1010
|
class: "size-full object-cover"
|
|
875
|
-
}, null, 8,
|
|
1011
|
+
}, null, 8, Ge)) : (F(), y(h, {
|
|
876
1012
|
key: 1,
|
|
877
1013
|
name: "map",
|
|
878
1014
|
size: 22,
|
|
879
1015
|
class: "text-on-surface-variant"
|
|
880
|
-
}))], 10,
|
|
1016
|
+
}))], 10, We))), 128)), e.none ? (F(), x("button", {
|
|
881
1017
|
key: 0,
|
|
882
1018
|
type: "button",
|
|
883
1019
|
role: "radio",
|
|
884
|
-
class:
|
|
885
|
-
title:
|
|
886
|
-
"aria-label":
|
|
887
|
-
"aria-checked":
|
|
888
|
-
onClick: s[0] ||= (e) =>
|
|
889
|
-
}, [
|
|
1020
|
+
class: j(["m3-map-base grid size-12 shrink-0 cursor-pointer place-items-center rounded-full border-2 bg-surface-variant transition-[border-color,transform] duration-150 hover:scale-110", U(r) === null ? "m3-map-base--active border-primary" : "border-transparent"]),
|
|
1021
|
+
title: U(t).mapNoBaseLayer,
|
|
1022
|
+
"aria-label": U(t).mapNoBaseLayer,
|
|
1023
|
+
"aria-checked": U(r) === null,
|
|
1024
|
+
onClick: s[0] ||= (e) => U(i)(null)
|
|
1025
|
+
}, [T(h, {
|
|
890
1026
|
name: "layers_clear",
|
|
891
1027
|
size: 22,
|
|
892
1028
|
class: "text-on-surface-variant"
|
|
893
|
-
})], 10,
|
|
1029
|
+
})], 10, Ke)) : b("", !0)], 2));
|
|
894
1030
|
}
|
|
895
|
-
}),
|
|
1031
|
+
}), Je = { class: "flex flex-col gap-2" }, Ye = { class: "flex items-center gap-2 bg-primary-container/40 px-4 py-2" }, Xe = { class: "text-label-large text-on-primary-container" }, Ze = { class: "flex flex-col px-4 py-1" }, Qe = { class: "text-label-small text-on-surface-variant" }, $e = { class: "text-body-medium text-on-surface" }, et = {
|
|
896
1032
|
key: 0,
|
|
897
1033
|
class: "break-words"
|
|
898
|
-
},
|
|
1034
|
+
}, tt = {
|
|
899
1035
|
key: 1,
|
|
900
1036
|
class: "text-body-small italic text-on-surface-variant"
|
|
901
|
-
},
|
|
1037
|
+
}, nt = /* @__PURE__ */ E({
|
|
902
1038
|
__name: "MMapFeatureInfo",
|
|
903
1039
|
props: { results: {} },
|
|
904
1040
|
setup(e) {
|
|
905
|
-
let t =
|
|
906
|
-
return (n, r) => (
|
|
1041
|
+
let t = u();
|
|
1042
|
+
return (n, r) => (F(), x("div", Je, [(F(!0), x(g, null, z(e.results, (e, r) => (F(), x("div", {
|
|
907
1043
|
key: r,
|
|
908
1044
|
class: "overflow-hidden rounded-2xl bg-surface-container"
|
|
909
|
-
}, [
|
|
1045
|
+
}, [S("div", Ye, [T(h, {
|
|
910
1046
|
name: "layers",
|
|
911
1047
|
size: 16,
|
|
912
1048
|
class: "text-on-primary-container"
|
|
913
|
-
}),
|
|
1049
|
+
}), S("span", Xe, H(e.layer.title), 1)]), S("dl", Ze, [(F(!0), x(g, null, z(e.fields, (r) => (F(), x("div", {
|
|
914
1050
|
key: r.key,
|
|
915
1051
|
class: "flex flex-col gap-0.5 border-b border-outline-variant py-1.5 last:border-b-0"
|
|
916
|
-
}, [
|
|
1052
|
+
}, [S("dt", Qe, H(r.label), 1), S("dd", $e, [B(n.$slots, "value", {
|
|
917
1053
|
field: r,
|
|
918
1054
|
result: e
|
|
919
|
-
}, () => [r.value ? (
|
|
1055
|
+
}, () => [r.value ? (F(), x("span", et, H(r.value), 1)) : (F(), x("span", tt, H(U(t).mapNoValue), 1))])])]))), 128))])]))), 128))]));
|
|
920
1056
|
}
|
|
921
|
-
}),
|
|
1057
|
+
}), rt = (e) => e.metadata, it = /* @__PURE__ */ new Set([
|
|
922
1058
|
"fill",
|
|
923
1059
|
"line",
|
|
924
1060
|
"circle",
|
|
925
1061
|
"symbol",
|
|
926
1062
|
"fill-extrusion",
|
|
927
1063
|
"heatmap"
|
|
928
|
-
]),
|
|
1064
|
+
]), at = (e) => ({
|
|
929
1065
|
title: e.name,
|
|
930
1066
|
groups: [],
|
|
931
1067
|
layers: e.layers.filter((e) => e.type !== "background").map((e) => ({
|
|
932
1068
|
id: e.id,
|
|
933
|
-
title:
|
|
1069
|
+
title: rt(e)?.title ?? e.id,
|
|
934
1070
|
listed: !0,
|
|
935
1071
|
children: [],
|
|
936
|
-
identify:
|
|
1072
|
+
identify: it.has(e.type) ? {
|
|
937
1073
|
format: {},
|
|
938
1074
|
exclude: []
|
|
939
1075
|
} : !1,
|
|
940
1076
|
hover: !1
|
|
941
1077
|
}))
|
|
942
1078
|
});
|
|
943
|
-
function
|
|
1079
|
+
function ot(e = {}) {
|
|
944
1080
|
let t = e.legend ?? ((e, t) => {
|
|
945
|
-
let n =
|
|
1081
|
+
let n = rt(e)?.legend;
|
|
946
1082
|
if (n?.show === !1) return;
|
|
947
1083
|
if (n?.wmslegend) return n.wmslegend;
|
|
948
1084
|
if (!t?.includes("/services/styles/")) return;
|
|
@@ -958,7 +1094,7 @@ function qe(e = {}) {
|
|
|
958
1094
|
title: e.alias ?? e.name
|
|
959
1095
|
})),
|
|
960
1096
|
layers: e.layers.filter((e) => e.type !== "background").map((e) => {
|
|
961
|
-
let r =
|
|
1097
|
+
let r = rt(e) ?? {}, i = { ...r.fields }, a = i.exclude ?? [];
|
|
962
1098
|
delete i.exclude;
|
|
963
1099
|
let o = {};
|
|
964
1100
|
for (let [e, t] of Object.entries(i)) o[e] = {
|
|
@@ -995,10 +1131,10 @@ function qe(e = {}) {
|
|
|
995
1131
|
};
|
|
996
1132
|
};
|
|
997
1133
|
}
|
|
998
|
-
function
|
|
1134
|
+
function st(e, t) {
|
|
999
1135
|
return t?.label ?? e.charAt(0).toUpperCase() + e.slice(1);
|
|
1000
1136
|
}
|
|
1001
|
-
function
|
|
1137
|
+
function ct(e, t) {
|
|
1002
1138
|
if (e == null || String(e).trim() === "") return "";
|
|
1003
1139
|
let n = String(e), r = typeof e == "number" ? e : Number(e);
|
|
1004
1140
|
if (t?.mask && !Number.isNaN(r)) {
|
|
@@ -1011,23 +1147,23 @@ function Ye(e, t) {
|
|
|
1011
1147
|
}
|
|
1012
1148
|
return t?.prefix && (n = `${t.prefix} ${n}`), t?.suffix && (n = `${n} ${t.suffix}`), n;
|
|
1013
1149
|
}
|
|
1014
|
-
var
|
|
1150
|
+
var lt = /* @__PURE__ */ new Set([
|
|
1015
1151
|
"coordinates",
|
|
1016
1152
|
"mapCoordinates",
|
|
1017
1153
|
"layerId",
|
|
1018
1154
|
"__layerMetadata"
|
|
1019
1155
|
]);
|
|
1020
|
-
function
|
|
1156
|
+
function ut(e, t, n) {
|
|
1021
1157
|
let r = new Map((n?.layers ?? []).filter((t) => t.identify && e.getLayer(t.id)).map((e) => [e.id, e]));
|
|
1022
1158
|
if (!r.size) return [];
|
|
1023
1159
|
let i = [];
|
|
1024
1160
|
for (let n of e.queryRenderedFeatures(t, { layers: [...r.keys()] })) {
|
|
1025
1161
|
let e = r.get(n.layer.id);
|
|
1026
1162
|
if (!e || !e.identify) continue;
|
|
1027
|
-
let { format: t, exclude: a } = e.identify, o = Object.entries(n.properties ?? {}).filter(([e]) => !
|
|
1163
|
+
let { format: t, exclude: a } = e.identify, o = Object.entries(n.properties ?? {}).filter(([e]) => !lt.has(e) && !a.includes(e) && !t[e]?.hidden).map(([e, n]) => ({
|
|
1028
1164
|
key: e,
|
|
1029
|
-
label:
|
|
1030
|
-
value:
|
|
1165
|
+
label: st(e, t[e]),
|
|
1166
|
+
value: ct(n, t[e])
|
|
1031
1167
|
}));
|
|
1032
1168
|
o.length && i.push({
|
|
1033
1169
|
layer: e,
|
|
@@ -1039,7 +1175,7 @@ function Ze(e, t, n) {
|
|
|
1039
1175
|
}
|
|
1040
1176
|
//#endregion
|
|
1041
1177
|
//#region src/components/MMapIdentify.vue?vue&type=script&setup=true&lang.ts
|
|
1042
|
-
var
|
|
1178
|
+
var dt = { class: "hidden" }, ft = /* @__PURE__ */ E({
|
|
1043
1179
|
inheritAttrs: !1,
|
|
1044
1180
|
__name: "MMapIdentify",
|
|
1045
1181
|
props: {
|
|
@@ -1058,64 +1194,64 @@ var Qe = { class: "hidden" }, $e = /* @__PURE__ */ x({
|
|
|
1058
1194
|
},
|
|
1059
1195
|
emits: ["identify"],
|
|
1060
1196
|
setup(e, { expose: t, emit: n }) {
|
|
1061
|
-
let r = e, i = n, { on: a, onReady: o, activeTool: s } =
|
|
1197
|
+
let r = e, i = n, { on: a, onReady: o, activeTool: s } = J(), { model: c } = Z(), l = V([]), u = R([0, 0]), d = R(!1);
|
|
1062
1198
|
a("click", (e) => {
|
|
1063
1199
|
if (!r.enabled || s.value) return;
|
|
1064
1200
|
let t = e.target;
|
|
1065
|
-
l.value =
|
|
1201
|
+
l.value = ut(t, e.point, c.value), u.value = [e.lngLat.lng, e.lngLat.lat], d.value = l.value.length > 0, i("identify", l.value, u.value);
|
|
1066
1202
|
});
|
|
1067
1203
|
function f() {
|
|
1068
1204
|
d.value = !1;
|
|
1069
1205
|
}
|
|
1070
|
-
|
|
1206
|
+
W(() => r.enabled, (e) => {
|
|
1071
1207
|
e || f();
|
|
1072
1208
|
});
|
|
1073
|
-
let p,
|
|
1209
|
+
let p, m = [], h = () => {
|
|
1074
1210
|
r.enabled && !s.value && p && (p.getCanvas().style.cursor = "pointer");
|
|
1075
|
-
},
|
|
1211
|
+
}, g = () => {
|
|
1076
1212
|
p && (p.getCanvas().style.cursor = "");
|
|
1077
1213
|
};
|
|
1078
|
-
function
|
|
1214
|
+
function _() {
|
|
1079
1215
|
if (p) {
|
|
1080
|
-
for (let e of
|
|
1081
|
-
|
|
1082
|
-
for (let e of
|
|
1216
|
+
for (let e of m) p.off("mouseenter", e, h), p.off("mouseleave", e, g);
|
|
1217
|
+
m = (c.value?.layers ?? []).filter((e) => e.identify).map((e) => e.id);
|
|
1218
|
+
for (let e of m) p.on("mouseenter", e, h), p.on("mouseleave", e, g);
|
|
1083
1219
|
}
|
|
1084
1220
|
}
|
|
1085
1221
|
return o((e) => {
|
|
1086
|
-
p = e,
|
|
1087
|
-
}),
|
|
1088
|
-
|
|
1089
|
-
p?.off("mouseenter", e,
|
|
1222
|
+
p = e, _();
|
|
1223
|
+
}), W(c, _), N(() => {
|
|
1224
|
+
m.forEach((e) => {
|
|
1225
|
+
p?.off("mouseenter", e, h), p?.off("mouseleave", e, g);
|
|
1090
1226
|
});
|
|
1091
|
-
}), t({ close: f }), (t, n) => (
|
|
1227
|
+
}), t({ close: f }), (t, n) => (F(), x("div", dt, [e.marker && d.value ? (F(), y(_e, {
|
|
1092
1228
|
key: 0,
|
|
1093
1229
|
"lng-lat": u.value
|
|
1094
|
-
}, null, 8, ["lng-lat"])) :
|
|
1230
|
+
}, null, 8, ["lng-lat"])) : b("", !0), e.popup && l.value.length ? (F(), y(ye, {
|
|
1095
1231
|
key: 1,
|
|
1096
1232
|
open: d.value,
|
|
1097
1233
|
"onUpdate:open": n[0] ||= (e) => d.value = e,
|
|
1098
1234
|
"lng-lat": u.value,
|
|
1099
1235
|
"max-width": "360px",
|
|
1100
|
-
offset: e.marker ?
|
|
1236
|
+
offset: e.marker ? U(he) : void 0
|
|
1101
1237
|
}, {
|
|
1102
|
-
default:
|
|
1238
|
+
default: G(() => [S("div", A({ class: "max-h-80 overflow-y-auto" }, t.$attrs), [B(t.$slots, "default", {
|
|
1103
1239
|
results: l.value,
|
|
1104
1240
|
lngLat: u.value,
|
|
1105
1241
|
close: f
|
|
1106
|
-
}, () => [
|
|
1242
|
+
}, () => [T(nt, { results: l.value }, null, 8, ["results"])])], 16)]),
|
|
1107
1243
|
_: 3
|
|
1108
1244
|
}, 8, [
|
|
1109
1245
|
"open",
|
|
1110
1246
|
"lng-lat",
|
|
1111
1247
|
"offset"
|
|
1112
|
-
])) :
|
|
1248
|
+
])) : b("", !0)]));
|
|
1113
1249
|
}
|
|
1114
|
-
}),
|
|
1250
|
+
}), pt = { class: "hidden" }, mt = [
|
|
1115
1251
|
"title",
|
|
1116
1252
|
"aria-label",
|
|
1117
1253
|
"aria-pressed"
|
|
1118
|
-
],
|
|
1254
|
+
], ht = { class: "-mx-4 -mt-3 mb-1 bg-primary-container px-3 py-1.5 text-label-medium text-on-primary-container" }, gt = { class: "flex flex-col" }, _t = { class: "text-label-small text-on-surface-variant" }, vt = { class: "text-body-small text-on-surface" }, yt = /* @__PURE__ */ E({
|
|
1119
1255
|
__name: "MMapHover",
|
|
1120
1256
|
props: {
|
|
1121
1257
|
modelValue: {
|
|
@@ -1129,82 +1265,82 @@ var Qe = { class: "hidden" }, $e = /* @__PURE__ */ x({
|
|
|
1129
1265
|
},
|
|
1130
1266
|
emits: ["update:modelValue"],
|
|
1131
1267
|
setup(e, { emit: t }) {
|
|
1132
|
-
let n = e, r = t, i =
|
|
1133
|
-
function
|
|
1134
|
-
let t = e.features?.[0], n =
|
|
1268
|
+
let n = e, r = t, i = u(), { onReady: a } = J(), { model: o } = Z(), s = v(() => (o.value?.layers ?? []).filter((e) => e.hover && e.hover.fields.length)), c = V(null), l = R([0, 0]), d = R(!1), f, p = [];
|
|
1269
|
+
function m(e) {
|
|
1270
|
+
let t = e.features?.[0], n = s.value.find((e) => e.id === t?.layer.id);
|
|
1135
1271
|
if (!t || !n || !n.hover) return;
|
|
1136
1272
|
let r = t.properties ?? {};
|
|
1137
|
-
|
|
1273
|
+
c.value = {
|
|
1138
1274
|
layer: n,
|
|
1139
1275
|
fields: n.hover.fields.map((e) => ({
|
|
1140
1276
|
key: e.key,
|
|
1141
|
-
label:
|
|
1142
|
-
value:
|
|
1277
|
+
label: st(e.key, e),
|
|
1278
|
+
value: ct(r[e.key], e)
|
|
1143
1279
|
})).filter((e) => e.value)
|
|
1144
|
-
},
|
|
1280
|
+
}, l.value = [e.lngLat.lng, e.lngLat.lat], d.value = !0;
|
|
1281
|
+
}
|
|
1282
|
+
function _() {
|
|
1283
|
+
d.value = !1;
|
|
1145
1284
|
}
|
|
1146
1285
|
function C() {
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
x = n.modelValue ? c.value.map((e) => e.id) : [];
|
|
1153
|
-
for (let e of x) y.on("mousemove", e, S), y.on("mouseleave", e, C);
|
|
1154
|
-
n.modelValue || (v.value = !1);
|
|
1286
|
+
if (f) {
|
|
1287
|
+
for (let e of p) f.off("mousemove", e, m), f.off("mouseleave", e, _);
|
|
1288
|
+
p = n.modelValue ? s.value.map((e) => e.id) : [];
|
|
1289
|
+
for (let e of p) f.on("mousemove", e, m), f.on("mouseleave", e, _);
|
|
1290
|
+
n.modelValue || (d.value = !1);
|
|
1155
1291
|
}
|
|
1156
1292
|
}
|
|
1157
1293
|
a((e) => {
|
|
1158
|
-
|
|
1159
|
-
}),
|
|
1160
|
-
for (let e of
|
|
1294
|
+
f = e, C();
|
|
1295
|
+
}), W([() => n.modelValue, s], C), N(() => {
|
|
1296
|
+
for (let e of p) f?.off("mousemove", e, m), f?.off("mouseleave", e, _);
|
|
1161
1297
|
});
|
|
1162
|
-
let
|
|
1163
|
-
return (t, n) => (
|
|
1298
|
+
let w = v(() => n.control === !0 ? "top-right" : n.control || "top-right");
|
|
1299
|
+
return (t, n) => (F(), x("div", pt, [e.control && s.value.length ? (F(), y(ae, {
|
|
1164
1300
|
key: 0,
|
|
1165
|
-
position:
|
|
1301
|
+
position: w.value
|
|
1166
1302
|
}, {
|
|
1167
|
-
default:
|
|
1303
|
+
default: G(() => [S("button", {
|
|
1168
1304
|
type: "button",
|
|
1169
1305
|
class: "grid place-items-center",
|
|
1170
|
-
title:
|
|
1171
|
-
"aria-label":
|
|
1306
|
+
title: U(i).mapHoverInfo,
|
|
1307
|
+
"aria-label": U(i).mapHoverInfo,
|
|
1172
1308
|
"aria-pressed": e.modelValue,
|
|
1173
1309
|
onClick: n[0] ||= (t) => r("update:modelValue", !e.modelValue)
|
|
1174
|
-
}, [
|
|
1310
|
+
}, [T(h, {
|
|
1175
1311
|
name: "ads_click",
|
|
1176
1312
|
size: 20
|
|
1177
|
-
})], 8,
|
|
1313
|
+
})], 8, mt)]),
|
|
1178
1314
|
_: 1
|
|
1179
|
-
}, 8, ["position"])) :
|
|
1315
|
+
}, 8, ["position"])) : b("", !0), c.value ? (F(), y(ye, {
|
|
1180
1316
|
key: 1,
|
|
1181
|
-
open:
|
|
1182
|
-
"onUpdate:open": n[1] ||= (e) =>
|
|
1183
|
-
"lng-lat":
|
|
1317
|
+
open: d.value,
|
|
1318
|
+
"onUpdate:open": n[1] ||= (e) => d.value = e,
|
|
1319
|
+
"lng-lat": l.value,
|
|
1184
1320
|
"close-button": !1,
|
|
1185
1321
|
"close-on-click": !1,
|
|
1186
1322
|
offset: 12,
|
|
1187
1323
|
"max-width": "280px",
|
|
1188
1324
|
class: "m3-map-hover"
|
|
1189
1325
|
}, {
|
|
1190
|
-
default:
|
|
1326
|
+
default: G(() => [S("p", ht, H(c.value.layer.title), 1), S("dl", gt, [(F(!0), x(g, null, z(c.value.fields, (e) => (F(), x("div", {
|
|
1191
1327
|
key: e.key,
|
|
1192
1328
|
class: "border-b border-outline-variant py-1 last:border-b-0"
|
|
1193
|
-
}, [
|
|
1329
|
+
}, [S("dt", _t, H(e.label), 1), S("dd", vt, H(e.value), 1)]))), 128))])]),
|
|
1194
1330
|
_: 1
|
|
1195
|
-
}, 8, ["open", "lng-lat"])) :
|
|
1331
|
+
}, 8, ["open", "lng-lat"])) : b("", !0)]));
|
|
1196
1332
|
}
|
|
1197
|
-
}),
|
|
1198
|
-
function
|
|
1333
|
+
}), bt = 6371008.8, $ = Math.PI / 180;
|
|
1334
|
+
function xt(e, t) {
|
|
1199
1335
|
let n = (t[1] - e[1]) * $, r = (t[0] - e[0]) * $, i = Math.sin(n / 2) ** 2 + Math.cos(e[1] * $) * Math.cos(t[1] * $) * Math.sin(r / 2) ** 2;
|
|
1200
|
-
return 2 *
|
|
1336
|
+
return 2 * bt * Math.asin(Math.min(1, Math.sqrt(i)));
|
|
1201
1337
|
}
|
|
1202
|
-
function
|
|
1338
|
+
function St(e) {
|
|
1203
1339
|
let t = 0;
|
|
1204
|
-
for (let n = 1; n < e.length; n++) t +=
|
|
1340
|
+
for (let n = 1; n < e.length; n++) t += xt(e[n - 1], e[n]);
|
|
1205
1341
|
return t;
|
|
1206
1342
|
}
|
|
1207
|
-
function
|
|
1343
|
+
function Ct(e, t) {
|
|
1208
1344
|
let [n, r, i, a] = [
|
|
1209
1345
|
e[0] * $,
|
|
1210
1346
|
e[1] * $,
|
|
@@ -1213,22 +1349,22 @@ function ut(e, t) {
|
|
|
1213
1349
|
], o = Math.cos(a) * Math.cos(i - n), s = Math.cos(a) * Math.sin(i - n), c = Math.atan2(Math.sin(r) + Math.sin(a), Math.sqrt((Math.cos(r) + o) ** 2 + s ** 2));
|
|
1214
1350
|
return [(n + Math.atan2(s, Math.cos(r) + o)) / $, c / $];
|
|
1215
1351
|
}
|
|
1216
|
-
function
|
|
1217
|
-
let t =
|
|
1352
|
+
function wt(e) {
|
|
1353
|
+
let t = Tt(e), n = t.length - 1;
|
|
1218
1354
|
if (n <= 2) return 0;
|
|
1219
1355
|
let r = 0;
|
|
1220
1356
|
for (let e = 0; e < n; e++) {
|
|
1221
1357
|
let i = t[e], a = t[e + 1 === n ? 0 : e + 1], o = t[e + 2 >= n ? (e + 2) % n : e + 2];
|
|
1222
1358
|
r += (o[0] - i[0]) * $ * Math.sin(a[1] * $);
|
|
1223
1359
|
}
|
|
1224
|
-
return Math.abs(r *
|
|
1360
|
+
return Math.abs(r * bt * bt / 2);
|
|
1225
1361
|
}
|
|
1226
|
-
function
|
|
1362
|
+
function Tt(e) {
|
|
1227
1363
|
let t = e[0], n = e[e.length - 1];
|
|
1228
1364
|
return t && n && (t[0] !== n[0] || t[1] !== n[1]) ? [...e, t] : e;
|
|
1229
1365
|
}
|
|
1230
|
-
function
|
|
1231
|
-
let t =
|
|
1366
|
+
function Et(e) {
|
|
1367
|
+
let t = Tt(e), n = 0, r = 0, i = 0;
|
|
1232
1368
|
for (let e = 0; e < t.length - 1; e++) {
|
|
1233
1369
|
let [a, o] = t[e], [s, c] = t[e + 1], l = a * c - s * o;
|
|
1234
1370
|
n += l, r += (a + s) * l, i += (o + c) * l;
|
|
@@ -1241,11 +1377,11 @@ function pt(e) {
|
|
|
1241
1377
|
}
|
|
1242
1378
|
//#endregion
|
|
1243
1379
|
//#region src/components/MMapMeasure.vue?vue&type=script&setup=true&lang.ts
|
|
1244
|
-
var
|
|
1380
|
+
var Dt = { class: "hidden" }, Ot = ["title", "aria-pressed"], kt = ["title", "aria-pressed"], At = ["title", "disabled"], jt = [
|
|
1245
1381
|
"aria-label",
|
|
1246
1382
|
"title",
|
|
1247
1383
|
"onClick"
|
|
1248
|
-
],
|
|
1384
|
+
], Mt = /* @__PURE__ */ E({
|
|
1249
1385
|
__name: "MMapMeasure",
|
|
1250
1386
|
props: {
|
|
1251
1387
|
modelValue: { default: null },
|
|
@@ -1256,14 +1392,14 @@ var mt = { class: "hidden" }, ht = ["title", "aria-pressed"], gt = ["title", "ar
|
|
|
1256
1392
|
},
|
|
1257
1393
|
emits: ["update:modelValue", "change"],
|
|
1258
1394
|
setup(e, { expose: t, emit: n }) {
|
|
1259
|
-
let r = e, i = n, a =
|
|
1260
|
-
done: `${
|
|
1261
|
-
draft: `${
|
|
1262
|
-
handles: `${
|
|
1263
|
-
},
|
|
1395
|
+
let r = e, i = n, a = u(), { onReady: o, styleVersion: s, activeTool: c } = J(), l = be(["primary", "surface"]), d = `m3-measure-${te()}`, f = {
|
|
1396
|
+
done: `${d}-done`,
|
|
1397
|
+
draft: `${d}-draft`,
|
|
1398
|
+
handles: `${d}-handles`
|
|
1399
|
+
}, p = `${f.handles}-vertex`, m = `${f.handles}-midpoint`, _ = [], C = [], E = null, D = !1, O = null, k = 0, A, M = R(null), P = R(0), ee = V([]), I = () => typeof document < "u" && document.documentElement.lang || void 0, L = (e, t) => new Intl.NumberFormat(I(), {
|
|
1264
1400
|
minimumFractionDigits: t,
|
|
1265
1401
|
maximumFractionDigits: t
|
|
1266
|
-
}).format(e),
|
|
1402
|
+
}).format(e), B = (e) => e === 0 ? "" : e < 1e3 ? `${L(Math.round(e), 0)} m` : `${L(e / 1e3, 2)} km`, ne = (e) => e >= 1e6 ? `${L(e / 1e6, 2)} km²` : e >= 1e4 ? `${L(e / 1e4, 2)} ha` : `${L(Math.round(e), 0)} m²`, q = (e, t = {}) => ({
|
|
1267
1403
|
type: "Feature",
|
|
1268
1404
|
geometry: {
|
|
1269
1405
|
type: "Point",
|
|
@@ -1271,8 +1407,8 @@ var mt = { class: "hidden" }, ht = ["title", "aria-pressed"], gt = ["title", "ar
|
|
|
1271
1407
|
},
|
|
1272
1408
|
properties: t
|
|
1273
1409
|
});
|
|
1274
|
-
function
|
|
1275
|
-
let i = e.map((e) =>
|
|
1410
|
+
function re(e, t, n, r) {
|
|
1411
|
+
let i = e.map((e) => q(e)), o = [];
|
|
1276
1412
|
if (e.length < 2) return {
|
|
1277
1413
|
features: i,
|
|
1278
1414
|
labels: o
|
|
@@ -1287,10 +1423,10 @@ var mt = { class: "hidden" }, ht = ["title", "aria-pressed"], gt = ["title", "ar
|
|
|
1287
1423
|
});
|
|
1288
1424
|
let s = (e) => {
|
|
1289
1425
|
for (let t = 0; t < e.length - 1; t++) {
|
|
1290
|
-
let r =
|
|
1426
|
+
let r = B(xt(e[t], e[t + 1]));
|
|
1291
1427
|
r && o.push({
|
|
1292
1428
|
key: `${n}-s${t}`,
|
|
1293
|
-
at:
|
|
1429
|
+
at: Ct(e[t], e[t + 1]),
|
|
1294
1430
|
text: r,
|
|
1295
1431
|
kind: "segment"
|
|
1296
1432
|
});
|
|
@@ -1299,12 +1435,12 @@ var mt = { class: "hidden" }, ht = ["title", "aria-pressed"], gt = ["title", "ar
|
|
|
1299
1435
|
if (t === "distance") s(e), o.push({
|
|
1300
1436
|
key: `${n}-t`,
|
|
1301
1437
|
at: e[e.length - 1],
|
|
1302
|
-
text: `${a.mapTotal}: ${
|
|
1438
|
+
text: `${a.mapTotal}: ${B(St(e))}`,
|
|
1303
1439
|
kind: "total",
|
|
1304
1440
|
m: r
|
|
1305
1441
|
});
|
|
1306
1442
|
else if (e.length >= 3) {
|
|
1307
|
-
let t =
|
|
1443
|
+
let t = Tt(e);
|
|
1308
1444
|
i.push({
|
|
1309
1445
|
type: "Feature",
|
|
1310
1446
|
geometry: {
|
|
@@ -1314,15 +1450,15 @@ var mt = { class: "hidden" }, ht = ["title", "aria-pressed"], gt = ["title", "ar
|
|
|
1314
1450
|
properties: {}
|
|
1315
1451
|
}), s(t), o.push({
|
|
1316
1452
|
key: `${n}-a`,
|
|
1317
|
-
at:
|
|
1318
|
-
text:
|
|
1453
|
+
at: Et(t),
|
|
1454
|
+
text: ne(wt(t)),
|
|
1319
1455
|
kind: "area",
|
|
1320
1456
|
m: r
|
|
1321
1457
|
});
|
|
1322
1458
|
} else o.push({
|
|
1323
1459
|
key: `${n}-t`,
|
|
1324
1460
|
at: e[e.length - 1],
|
|
1325
|
-
text:
|
|
1461
|
+
text: B(St(e)),
|
|
1326
1462
|
kind: "total",
|
|
1327
1463
|
m: r
|
|
1328
1464
|
});
|
|
@@ -1334,44 +1470,44 @@ var mt = { class: "hidden" }, ht = ["title", "aria-pressed"], gt = ["title", "ar
|
|
|
1334
1470
|
let ie = (e) => ({
|
|
1335
1471
|
type: "FeatureCollection",
|
|
1336
1472
|
features: e
|
|
1337
|
-
}),
|
|
1338
|
-
function
|
|
1339
|
-
if (!
|
|
1340
|
-
let e =
|
|
1473
|
+
}), Y = (e, t) => (A?.getSource(e))?.setData(ie(t));
|
|
1474
|
+
function X() {
|
|
1475
|
+
if (!A) return;
|
|
1476
|
+
let e = _.map((e, t) => re(e.points, e.mode, `m${t}`, t)), t = M.value && C.length ? re(E ? [...C, E] : C, M.value, "draft") : {
|
|
1341
1477
|
features: [],
|
|
1342
1478
|
labels: []
|
|
1343
1479
|
};
|
|
1344
|
-
|
|
1480
|
+
Y(f.done, e.flatMap((e) => e.features)), Y(f.draft, t.features);
|
|
1345
1481
|
let n = [];
|
|
1346
|
-
|
|
1347
|
-
(e.closed ? e.points.slice(0, -1) : e.points).forEach((e, r) => n.push(
|
|
1482
|
+
M.value || _.forEach((e, t) => {
|
|
1483
|
+
(e.closed ? e.points.slice(0, -1) : e.points).forEach((e, r) => n.push(q(e, {
|
|
1348
1484
|
handle: "vertex",
|
|
1349
1485
|
m: t,
|
|
1350
1486
|
v: r
|
|
1351
1487
|
})));
|
|
1352
|
-
for (let r = 0; r < e.points.length - 1; r++) n.push(
|
|
1488
|
+
for (let r = 0; r < e.points.length - 1; r++) n.push(q(Ct(e.points[r], e.points[r + 1]), {
|
|
1353
1489
|
handle: "midpoint",
|
|
1354
1490
|
m: t,
|
|
1355
1491
|
after: r
|
|
1356
1492
|
}));
|
|
1357
|
-
}),
|
|
1493
|
+
}), Y(f.handles, n), ee.value = [...e.flatMap((e) => e.labels), ...t.labels];
|
|
1358
1494
|
}
|
|
1359
|
-
function
|
|
1360
|
-
|
|
1495
|
+
function oe() {
|
|
1496
|
+
P.value = _.length, i("change", _.map((e) => ({
|
|
1361
1497
|
mode: e.mode,
|
|
1362
1498
|
points: e.points.map((e) => [...e]),
|
|
1363
1499
|
closed: e.closed,
|
|
1364
|
-
length:
|
|
1365
|
-
...e.mode === "area" || e.closed ? { area:
|
|
1500
|
+
length: St(e.points),
|
|
1501
|
+
...e.mode === "area" || e.closed ? { area: wt(e.points) } : {}
|
|
1366
1502
|
})));
|
|
1367
1503
|
}
|
|
1368
|
-
let
|
|
1504
|
+
let se = (e) => [
|
|
1369
1505
|
"==",
|
|
1370
1506
|
["geometry-type"],
|
|
1371
1507
|
e
|
|
1372
1508
|
];
|
|
1373
|
-
function
|
|
1374
|
-
let { primary: e, surface: t } =
|
|
1509
|
+
function ce() {
|
|
1510
|
+
let { primary: e, surface: t } = l.value;
|
|
1375
1511
|
return {
|
|
1376
1512
|
fill: { "fill-color": e },
|
|
1377
1513
|
line: { "line-color": e },
|
|
@@ -1381,20 +1517,20 @@ var mt = { class: "hidden" }, ht = ["title", "aria-pressed"], gt = ["title", "ar
|
|
|
1381
1517
|
}
|
|
1382
1518
|
};
|
|
1383
1519
|
}
|
|
1384
|
-
function
|
|
1385
|
-
if (!
|
|
1386
|
-
for (let e of Object.values(
|
|
1520
|
+
function le() {
|
|
1521
|
+
if (!A) return;
|
|
1522
|
+
for (let e of Object.values(f)) A.getSource(e) || A.addSource(e, {
|
|
1387
1523
|
type: "geojson",
|
|
1388
1524
|
data: ie([])
|
|
1389
1525
|
});
|
|
1390
|
-
let e =
|
|
1391
|
-
|
|
1526
|
+
let e = ce(), t = (e) => {
|
|
1527
|
+
A.getLayer(e.id) || A.addLayer(e);
|
|
1392
1528
|
};
|
|
1393
|
-
for (let [n, r] of [[
|
|
1529
|
+
for (let [n, r] of [[f.done, !1], [f.draft, !0]]) t({
|
|
1394
1530
|
id: `${n}-fill`,
|
|
1395
1531
|
type: "fill",
|
|
1396
1532
|
source: n,
|
|
1397
|
-
filter:
|
|
1533
|
+
filter: se("Polygon"),
|
|
1398
1534
|
paint: {
|
|
1399
1535
|
...e.fill,
|
|
1400
1536
|
"fill-opacity": r ? .15 : .2
|
|
@@ -1417,7 +1553,7 @@ var mt = { class: "hidden" }, ht = ["title", "aria-pressed"], gt = ["title", "ar
|
|
|
1417
1553
|
id: `${n}-points`,
|
|
1418
1554
|
type: "circle",
|
|
1419
1555
|
source: n,
|
|
1420
|
-
filter:
|
|
1556
|
+
filter: se("Point"),
|
|
1421
1557
|
paint: {
|
|
1422
1558
|
...e.vertices,
|
|
1423
1559
|
"circle-radius": 5,
|
|
@@ -1425,9 +1561,9 @@ var mt = { class: "hidden" }, ht = ["title", "aria-pressed"], gt = ["title", "ar
|
|
|
1425
1561
|
}
|
|
1426
1562
|
});
|
|
1427
1563
|
t({
|
|
1428
|
-
id:
|
|
1564
|
+
id: m,
|
|
1429
1565
|
type: "circle",
|
|
1430
|
-
source:
|
|
1566
|
+
source: f.handles,
|
|
1431
1567
|
filter: [
|
|
1432
1568
|
"==",
|
|
1433
1569
|
["get", "handle"],
|
|
@@ -1440,9 +1576,9 @@ var mt = { class: "hidden" }, ht = ["title", "aria-pressed"], gt = ["title", "ar
|
|
|
1440
1576
|
"circle-opacity": .7
|
|
1441
1577
|
}
|
|
1442
1578
|
}), t({
|
|
1443
|
-
id:
|
|
1579
|
+
id: p,
|
|
1444
1580
|
type: "circle",
|
|
1445
|
-
source:
|
|
1581
|
+
source: f.handles,
|
|
1446
1582
|
filter: [
|
|
1447
1583
|
"==",
|
|
1448
1584
|
["get", "handle"],
|
|
@@ -1455,197 +1591,197 @@ var mt = { class: "hidden" }, ht = ["title", "aria-pressed"], gt = ["title", "ar
|
|
|
1455
1591
|
}
|
|
1456
1592
|
});
|
|
1457
1593
|
}
|
|
1458
|
-
|
|
1459
|
-
if (!
|
|
1460
|
-
let e =
|
|
1461
|
-
if (
|
|
1594
|
+
W(l, () => {
|
|
1595
|
+
if (!A) return;
|
|
1596
|
+
let e = ce(), t = (e, t) => {
|
|
1597
|
+
if (A.getLayer(e)) for (let [n, r] of Object.entries(t)) A.setPaintProperty(e, n, r);
|
|
1462
1598
|
};
|
|
1463
|
-
for (let n of [
|
|
1464
|
-
t(
|
|
1599
|
+
for (let n of [f.done, f.draft]) t(`${n}-fill`, e.fill), t(`${n}-line`, e.line), t(`${n}-points`, e.vertices);
|
|
1600
|
+
t(m, e.vertices), t(p, e.vertices);
|
|
1465
1601
|
});
|
|
1466
|
-
let
|
|
1467
|
-
function
|
|
1468
|
-
if (
|
|
1469
|
-
let t =
|
|
1602
|
+
let Z = (e) => [e.lngLat.lng, e.lngLat.lat];
|
|
1603
|
+
function ue(e) {
|
|
1604
|
+
if (C.length >= 2) {
|
|
1605
|
+
let t = A.project(C[0]);
|
|
1470
1606
|
if (Math.hypot(t.x - e.point.x, t.y - e.point.y) < 20) {
|
|
1471
|
-
|
|
1607
|
+
D = !0, Q();
|
|
1472
1608
|
return;
|
|
1473
1609
|
}
|
|
1474
1610
|
}
|
|
1475
|
-
|
|
1611
|
+
C.push(Z(e)), X();
|
|
1476
1612
|
}
|
|
1477
|
-
function
|
|
1478
|
-
|
|
1479
|
-
|
|
1613
|
+
function de(e) {
|
|
1614
|
+
E = Z(e), !k && (k = requestAnimationFrame(() => {
|
|
1615
|
+
k = 0, X();
|
|
1480
1616
|
}));
|
|
1481
1617
|
}
|
|
1482
|
-
function
|
|
1483
|
-
if (e.preventDefault(),
|
|
1484
|
-
let t =
|
|
1485
|
-
Math.hypot(t.x - n.x, t.y - n.y) < 10 &&
|
|
1618
|
+
function fe(e) {
|
|
1619
|
+
if (e.preventDefault(), C.length < 2) return;
|
|
1620
|
+
let t = A.project(C[C.length - 1]), n = A.project(C[C.length - 2]);
|
|
1621
|
+
Math.hypot(t.x - n.x, t.y - n.y) < 10 && C.pop(), Q();
|
|
1486
1622
|
}
|
|
1487
|
-
function
|
|
1623
|
+
function pe(e) {
|
|
1488
1624
|
(e.key === "Escape" || e.key === "Enter") && Q(e.key === "Escape");
|
|
1489
1625
|
}
|
|
1490
|
-
let
|
|
1491
|
-
function
|
|
1492
|
-
|
|
1493
|
-
|
|
1626
|
+
let me = () => typeof navigator < "u" ? navigator.keyboard : void 0, he = !1;
|
|
1627
|
+
function ge() {
|
|
1628
|
+
M.value && document.fullscreenElement && me()?.lock && me().lock(["Escape"]).then(() => {
|
|
1629
|
+
he = !0;
|
|
1494
1630
|
}, () => {});
|
|
1495
1631
|
}
|
|
1496
|
-
function
|
|
1497
|
-
|
|
1632
|
+
function ve() {
|
|
1633
|
+
M.value || (he && me()?.unlock?.(), he = !1);
|
|
1498
1634
|
}
|
|
1499
|
-
function
|
|
1635
|
+
function ye() {
|
|
1500
1636
|
let e, t = () => {
|
|
1501
|
-
document.removeEventListener("keyup", n, !0), clearTimeout(e), setTimeout(
|
|
1637
|
+
document.removeEventListener("keyup", n, !0), clearTimeout(e), setTimeout(ve);
|
|
1502
1638
|
}, n = (e) => {
|
|
1503
1639
|
e.key === "Escape" && t();
|
|
1504
1640
|
};
|
|
1505
1641
|
document.addEventListener("keyup", n, !0), e = setTimeout(t, 1500);
|
|
1506
1642
|
}
|
|
1507
|
-
function
|
|
1508
|
-
if (
|
|
1509
|
-
if (
|
|
1510
|
-
|
|
1643
|
+
function xe(e) {
|
|
1644
|
+
if (A) {
|
|
1645
|
+
if (M.value === e) return Q();
|
|
1646
|
+
M.value && Q(), M.value = e, c.value = "measure", C = [], E = null, A.getCanvas().style.cursor = "crosshair", A.doubleClickZoom.disable(), A.on("click", ue), A.on("mousemove", de), A.on("dblclick", fe), document.addEventListener("keydown", pe), document.addEventListener("fullscreenchange", ge), ge(), X(), r.modelValue !== e && i("update:modelValue", e);
|
|
1511
1647
|
}
|
|
1512
1648
|
}
|
|
1513
1649
|
function Q(e = !1) {
|
|
1514
|
-
if (!
|
|
1515
|
-
cancelAnimationFrame(
|
|
1516
|
-
let t =
|
|
1517
|
-
|
|
1518
|
-
mode:
|
|
1519
|
-
points: t ? [...
|
|
1650
|
+
if (!A || !M.value) return;
|
|
1651
|
+
cancelAnimationFrame(k), k = 0;
|
|
1652
|
+
let t = C.length >= 3 && (D || M.value === "area");
|
|
1653
|
+
C.length >= 2 && _.push({
|
|
1654
|
+
mode: M.value,
|
|
1655
|
+
points: t ? [...C, [...C[0]]] : C,
|
|
1520
1656
|
closed: t
|
|
1521
|
-
}),
|
|
1657
|
+
}), C = [], E = null, D = !1, M.value = null, c.value === "measure" && (c.value = null), A.getCanvas().style.cursor = "", A.doubleClickZoom.enable(), A.off("click", ue), A.off("mousemove", de), A.off("dblclick", fe), document.removeEventListener("keydown", pe), document.removeEventListener("fullscreenchange", ge), e && he ? ye() : ve(), X(), oe(), r.modelValue !== null && i("update:modelValue", null);
|
|
1522
1658
|
}
|
|
1523
1659
|
function Se(e) {
|
|
1524
|
-
|
|
1660
|
+
_[e] && (_.splice(e, 1), X(), oe());
|
|
1525
1661
|
}
|
|
1526
1662
|
function Ce() {
|
|
1527
|
-
|
|
1663
|
+
M.value && Q(), _.length = 0, X(), oe();
|
|
1528
1664
|
}
|
|
1529
1665
|
function we(e) {
|
|
1530
1666
|
let t = e.features?.[0];
|
|
1531
|
-
if (!t ||
|
|
1667
|
+
if (!t || M.value || !A) return;
|
|
1532
1668
|
e.preventDefault();
|
|
1533
|
-
let n = t.properties.m, r =
|
|
1669
|
+
let n = t.properties.m, r = _[n];
|
|
1534
1670
|
if (!r) return;
|
|
1535
1671
|
let i = t.properties.v;
|
|
1536
|
-
t.properties.handle === "midpoint" && (i = t.properties.after + 1, r.points.splice(i, 0,
|
|
1672
|
+
t.properties.handle === "midpoint" && (i = t.properties.after + 1, r.points.splice(i, 0, Z(e))), O = {
|
|
1537
1673
|
m: n,
|
|
1538
1674
|
v: i
|
|
1539
|
-
},
|
|
1675
|
+
}, c.value = "measure", A.getCanvas().style.cursor = "grabbing";
|
|
1540
1676
|
let a = e.type === "touchstart";
|
|
1541
|
-
a &&
|
|
1677
|
+
a && A.dragPan.disable(), A.on(a ? "touchmove" : "mousemove", Te), A.once(a ? "touchend" : "mouseup", Ee), X();
|
|
1542
1678
|
}
|
|
1543
1679
|
function Te(e) {
|
|
1544
|
-
if (!
|
|
1545
|
-
let t =
|
|
1680
|
+
if (!O) return;
|
|
1681
|
+
let t = _[O.m];
|
|
1546
1682
|
if (!t) return;
|
|
1547
|
-
let n =
|
|
1548
|
-
t.points[
|
|
1683
|
+
let n = Z(e);
|
|
1684
|
+
t.points[O.v] = n, t.closed && O.v === 0 && (t.points[t.points.length - 1] = n), X();
|
|
1549
1685
|
}
|
|
1550
1686
|
function Ee() {
|
|
1551
|
-
|
|
1552
|
-
|
|
1687
|
+
A && (O = null, A.off("mousemove", Te), A.off("touchmove", Te), A.dragPan.enable(), A.getCanvas().style.cursor = "", oe(), setTimeout(() => {
|
|
1688
|
+
c.value === "measure" && !M.value && (c.value = null);
|
|
1553
1689
|
}));
|
|
1554
1690
|
}
|
|
1555
1691
|
let De = () => {
|
|
1556
|
-
|
|
1692
|
+
A && !O && !M.value && (A.getCanvas().style.cursor = "grab");
|
|
1557
1693
|
}, Oe = () => {
|
|
1558
|
-
|
|
1694
|
+
A && !O && !M.value && (A.getCanvas().style.cursor = "");
|
|
1559
1695
|
};
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
for (let t of [
|
|
1563
|
-
r.modelValue &&
|
|
1564
|
-
}),
|
|
1565
|
-
|
|
1566
|
-
}),
|
|
1567
|
-
e && e !==
|
|
1568
|
-
}),
|
|
1569
|
-
if (!
|
|
1570
|
-
|
|
1571
|
-
for (let e of [
|
|
1696
|
+
o((e) => {
|
|
1697
|
+
A = e, le();
|
|
1698
|
+
for (let t of [p, m]) e.on("mousedown", t, we), e.on("touchstart", t, we), e.on("mouseenter", t, De), e.on("mouseleave", t, Oe);
|
|
1699
|
+
r.modelValue && xe(r.modelValue);
|
|
1700
|
+
}), W(s, () => {
|
|
1701
|
+
le(), X();
|
|
1702
|
+
}), W(() => r.modelValue, (e) => {
|
|
1703
|
+
e && e !== M.value ? xe(e) : !e && M.value && Q();
|
|
1704
|
+
}), N(() => {
|
|
1705
|
+
if (!A) return;
|
|
1706
|
+
M.value && Q();
|
|
1707
|
+
for (let e of [p, m]) A.off("mousedown", e, we), A.off("touchstart", e, we), A.off("mouseenter", e, De), A.off("mouseleave", e, Oe);
|
|
1572
1708
|
let e = [
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
...[
|
|
1709
|
+
p,
|
|
1710
|
+
m,
|
|
1711
|
+
...[f.done, f.draft].flatMap((e) => [
|
|
1576
1712
|
`${e}-points`,
|
|
1577
1713
|
`${e}-line`,
|
|
1578
1714
|
`${e}-fill`
|
|
1579
1715
|
])
|
|
1580
1716
|
];
|
|
1581
|
-
for (let t of e)
|
|
1582
|
-
for (let e of Object.values(
|
|
1717
|
+
for (let t of e) A.getLayer(t) && A.removeLayer(t);
|
|
1718
|
+
for (let e of Object.values(f)) A.getSource(e) && A.removeSource(e);
|
|
1583
1719
|
});
|
|
1584
|
-
let ke =
|
|
1720
|
+
let ke = v(() => r.control === !0 ? "top-right" : r.control || "top-right");
|
|
1585
1721
|
return t({
|
|
1586
|
-
start:
|
|
1722
|
+
start: xe,
|
|
1587
1723
|
finish: Q,
|
|
1588
1724
|
clear: Ce,
|
|
1589
1725
|
remove: Se
|
|
1590
|
-
}), (t, n) => (
|
|
1726
|
+
}), (t, n) => (F(), x("div", Dt, [e.control ? (F(), y(ae, {
|
|
1591
1727
|
key: 0,
|
|
1592
1728
|
position: ke.value
|
|
1593
1729
|
}, {
|
|
1594
|
-
default:
|
|
1595
|
-
|
|
1730
|
+
default: G(() => [
|
|
1731
|
+
S("button", {
|
|
1596
1732
|
type: "button",
|
|
1597
1733
|
class: "grid place-items-center",
|
|
1598
|
-
title:
|
|
1599
|
-
"aria-pressed":
|
|
1600
|
-
onClick: n[0] ||= (e) =>
|
|
1601
|
-
}, [
|
|
1734
|
+
title: U(a).mapMeasureDistance,
|
|
1735
|
+
"aria-pressed": M.value === "distance",
|
|
1736
|
+
onClick: n[0] ||= (e) => xe("distance")
|
|
1737
|
+
}, [T(h, {
|
|
1602
1738
|
name: "straighten",
|
|
1603
1739
|
size: 20
|
|
1604
|
-
})], 8,
|
|
1605
|
-
|
|
1740
|
+
})], 8, Ot),
|
|
1741
|
+
S("button", {
|
|
1606
1742
|
type: "button",
|
|
1607
1743
|
class: "grid place-items-center",
|
|
1608
|
-
title:
|
|
1609
|
-
"aria-pressed":
|
|
1610
|
-
onClick: n[1] ||= (e) =>
|
|
1611
|
-
}, [
|
|
1744
|
+
title: U(a).mapMeasureArea,
|
|
1745
|
+
"aria-pressed": M.value === "area",
|
|
1746
|
+
onClick: n[1] ||= (e) => xe("area")
|
|
1747
|
+
}, [T(h, {
|
|
1612
1748
|
name: "pentagon",
|
|
1613
1749
|
size: 20
|
|
1614
|
-
})], 8,
|
|
1615
|
-
|
|
1750
|
+
})], 8, kt),
|
|
1751
|
+
S("button", {
|
|
1616
1752
|
type: "button",
|
|
1617
1753
|
class: "grid place-items-center",
|
|
1618
|
-
title:
|
|
1619
|
-
disabled: !
|
|
1754
|
+
title: U(a).mapClearMeasurements,
|
|
1755
|
+
disabled: !P.value && !M.value,
|
|
1620
1756
|
onClick: Ce
|
|
1621
|
-
}, [
|
|
1757
|
+
}, [T(h, {
|
|
1622
1758
|
name: "delete",
|
|
1623
1759
|
size: 20
|
|
1624
|
-
})], 8,
|
|
1760
|
+
})], 8, At)
|
|
1625
1761
|
]),
|
|
1626
1762
|
_: 1
|
|
1627
|
-
}, 8, ["position"])) :
|
|
1763
|
+
}, 8, ["position"])) : b("", !0), (F(!0), x(g, null, z(ee.value, (e) => (F(), y(_e, {
|
|
1628
1764
|
key: e.key,
|
|
1629
1765
|
"lng-lat": e.at,
|
|
1630
1766
|
anchor: e.kind === "area" ? "center" : "top",
|
|
1631
1767
|
offset: e.kind === "area" ? [0, 0] : [0, 8],
|
|
1632
1768
|
class: "pointer-events-none"
|
|
1633
1769
|
}, {
|
|
1634
|
-
default:
|
|
1770
|
+
default: G(() => [S("span", { class: j(["flex items-center gap-1 whitespace-nowrap rounded-full py-0.5 shadow-elevation-1", [e.kind === "segment" ? "bg-surface-container-highest text-label-small text-on-surface" : "bg-primary text-label-medium text-on-primary", e.m === void 0 ? "px-2" : "pr-0.5 pl-2"]]) }, [w(H(e.text) + " ", 1), e.m === void 0 ? b("", !0) : (F(), x("button", {
|
|
1635
1771
|
key: 0,
|
|
1636
1772
|
type: "button",
|
|
1637
1773
|
class: "pointer-events-auto grid size-5 cursor-pointer place-items-center rounded-full hover:bg-on-primary/12 focus-visible:outline-2 focus-visible:outline-on-primary",
|
|
1638
|
-
"aria-label":
|
|
1639
|
-
title:
|
|
1640
|
-
onClick:
|
|
1641
|
-
onPointerdown: n[2] ||=
|
|
1642
|
-
onMousedown: n[3] ||=
|
|
1643
|
-
onTouchstart: n[4] ||=
|
|
1644
|
-
onDblclick: n[5] ||=
|
|
1645
|
-
}, [
|
|
1774
|
+
"aria-label": U(a).mapDeleteMeasurement,
|
|
1775
|
+
title: U(a).mapDeleteMeasurement,
|
|
1776
|
+
onClick: K((t) => Se(e.m), ["stop"]),
|
|
1777
|
+
onPointerdown: n[2] ||= K(() => {}, ["stop"]),
|
|
1778
|
+
onMousedown: n[3] ||= K(() => {}, ["stop"]),
|
|
1779
|
+
onTouchstart: n[4] ||= K(() => {}, ["stop"]),
|
|
1780
|
+
onDblclick: n[5] ||= K(() => {}, ["stop"])
|
|
1781
|
+
}, [T(h, {
|
|
1646
1782
|
name: "close",
|
|
1647
1783
|
size: 14
|
|
1648
|
-
})], 40,
|
|
1784
|
+
})], 40, jt))], 2)]),
|
|
1649
1785
|
_: 2
|
|
1650
1786
|
}, 1032, [
|
|
1651
1787
|
"lng-lat",
|
|
@@ -1653,15 +1789,15 @@ var mt = { class: "hidden" }, ht = ["title", "aria-pressed"], gt = ["title", "ar
|
|
|
1653
1789
|
"offset"
|
|
1654
1790
|
]))), 128))]));
|
|
1655
1791
|
}
|
|
1656
|
-
}),
|
|
1657
|
-
function
|
|
1658
|
-
let e =
|
|
1792
|
+
}), Nt = /* @__PURE__ */ new WeakMap();
|
|
1793
|
+
function Pt() {
|
|
1794
|
+
let e = O(q, null);
|
|
1659
1795
|
if (!e) throw Error("useMapFilter() must be called in a component inside <MMap>");
|
|
1660
1796
|
function t(t, n) {
|
|
1661
1797
|
let r = e.map.value;
|
|
1662
1798
|
if (!r?.getLayer(t)) return;
|
|
1663
|
-
let i =
|
|
1664
|
-
i ||
|
|
1799
|
+
let i = Nt.get(r);
|
|
1800
|
+
i || Nt.set(r, i = /* @__PURE__ */ new Map()), i.has(t) || i.set(t, r.getFilter(t) ?? void 0);
|
|
1665
1801
|
let a = i.get(t);
|
|
1666
1802
|
r.setFilter(t, n ? a ? [
|
|
1667
1803
|
"all",
|
|
@@ -1686,7 +1822,7 @@ function xt() {
|
|
|
1686
1822
|
}
|
|
1687
1823
|
//#endregion
|
|
1688
1824
|
//#region src/components/MMapFilter.vue?vue&type=script&setup=true&lang.ts
|
|
1689
|
-
var
|
|
1825
|
+
var Ft = { class: "flex flex-wrap gap-2" }, It = /* @__PURE__ */ E({
|
|
1690
1826
|
__name: "MMapFilter",
|
|
1691
1827
|
props: {
|
|
1692
1828
|
layer: {},
|
|
@@ -1697,44 +1833,44 @@ var St = { class: "flex flex-wrap gap-2" }, Ct = /* @__PURE__ */ x({
|
|
|
1697
1833
|
},
|
|
1698
1834
|
emits: ["update:modelValue"],
|
|
1699
1835
|
setup(t, { emit: n }) {
|
|
1700
|
-
let r = t, i = n, { onReady: a, styleVersion: o } =
|
|
1701
|
-
function
|
|
1702
|
-
let e =
|
|
1836
|
+
let r = t, i = n, { onReady: a, styleVersion: o } = J(), { setFilter: s, valuesOf: c } = Pt(), l = R([]), u = v(() => r.values ?? l.value), d = R([]), f = v(() => r.modelValue ?? d.value);
|
|
1837
|
+
function p() {
|
|
1838
|
+
let e = f.value;
|
|
1703
1839
|
s(r.layer, e.length ? [
|
|
1704
1840
|
"in",
|
|
1705
1841
|
["get", r.property],
|
|
1706
1842
|
["literal", e]
|
|
1707
1843
|
] : null);
|
|
1708
1844
|
}
|
|
1709
|
-
function
|
|
1710
|
-
let t =
|
|
1711
|
-
|
|
1845
|
+
function m(e) {
|
|
1846
|
+
let t = f.value.includes(e) ? f.value.filter((t) => t !== e) : [...f.value, e];
|
|
1847
|
+
d.value = t, i("update:modelValue", t);
|
|
1712
1848
|
}
|
|
1713
|
-
function
|
|
1849
|
+
function h(e) {
|
|
1714
1850
|
let t = () => {
|
|
1715
1851
|
r.values || (l.value = c(r.layer, r.property));
|
|
1716
1852
|
};
|
|
1717
1853
|
t(), e.once("idle", t);
|
|
1718
1854
|
}
|
|
1719
1855
|
return a((e) => {
|
|
1720
|
-
|
|
1721
|
-
}),
|
|
1722
|
-
e !== t && s(t, null),
|
|
1723
|
-
}),
|
|
1856
|
+
h(e), p();
|
|
1857
|
+
}), W(f, p, { deep: !0 }), W(o, () => p()), W(() => [r.layer, r.property], ([e], [t]) => {
|
|
1858
|
+
e !== t && s(t, null), p();
|
|
1859
|
+
}), N(() => s(r.layer, null)), (n, r) => (F(), x("div", Ft, [(F(!0), x(g, null, z(u.value, (n) => (F(), y(e, {
|
|
1724
1860
|
key: n,
|
|
1725
1861
|
type: "filter",
|
|
1726
1862
|
clickable: "",
|
|
1727
|
-
selected:
|
|
1728
|
-
onClick: (e) =>
|
|
1863
|
+
selected: f.value.includes(n),
|
|
1864
|
+
onClick: (e) => m(n)
|
|
1729
1865
|
}, {
|
|
1730
|
-
default:
|
|
1866
|
+
default: G(() => [w(H(t.labels?.[String(n)] ?? n), 1)]),
|
|
1731
1867
|
_: 2
|
|
1732
1868
|
}, 1032, ["selected", "onClick"]))), 128))]));
|
|
1733
1869
|
}
|
|
1734
1870
|
});
|
|
1735
1871
|
//#endregion
|
|
1736
1872
|
//#region src/composables/mapSearch.ts
|
|
1737
|
-
function
|
|
1873
|
+
function Lt(e = {}) {
|
|
1738
1874
|
return async (t, n) => {
|
|
1739
1875
|
let r = new URLSearchParams({
|
|
1740
1876
|
format: "jsonv2",
|
|
@@ -1762,17 +1898,17 @@ function wt(e = {}) {
|
|
|
1762
1898
|
}
|
|
1763
1899
|
//#endregion
|
|
1764
1900
|
//#region src/components/MMapSearch.vue?vue&type=script&setup=true&lang.ts
|
|
1765
|
-
var
|
|
1901
|
+
var Rt = { class: "hidden" }, zt = [
|
|
1766
1902
|
"value",
|
|
1767
1903
|
"placeholder",
|
|
1768
1904
|
"aria-label"
|
|
1769
|
-
],
|
|
1905
|
+
], Bt = {
|
|
1770
1906
|
key: 0,
|
|
1771
1907
|
class: "border-t border-outline-variant"
|
|
1772
|
-
},
|
|
1908
|
+
}, Vt = {
|
|
1773
1909
|
key: 1,
|
|
1774
1910
|
class: "flex flex-col items-center gap-2 py-6"
|
|
1775
|
-
},
|
|
1911
|
+
}, Ht = { class: "text-body-small text-on-surface-variant" }, Ut = /* @__PURE__ */ E({
|
|
1776
1912
|
__name: "MMapSearch",
|
|
1777
1913
|
props: {
|
|
1778
1914
|
provider: {},
|
|
@@ -1789,45 +1925,45 @@ var Tt = { class: "hidden" }, Et = [
|
|
|
1789
1925
|
}
|
|
1790
1926
|
},
|
|
1791
1927
|
emits: ["select"],
|
|
1792
|
-
setup(e, { emit:
|
|
1793
|
-
let
|
|
1794
|
-
async function
|
|
1795
|
-
let e =
|
|
1928
|
+
setup(e, { emit: t }) {
|
|
1929
|
+
let n = e, i = t, o = u(), { map: c } = J(), l = v(() => n.provider ?? Lt()), d = R(""), m = V([]), _ = R(!1), C = R(!1), w = R(!1), E = V(null), D, O;
|
|
1930
|
+
async function k() {
|
|
1931
|
+
let e = d.value.trim();
|
|
1796
1932
|
if (!e) return;
|
|
1797
1933
|
D?.abort(), D = new AbortController();
|
|
1798
1934
|
let t = D;
|
|
1799
|
-
|
|
1935
|
+
_.value = !0, w.value = !0;
|
|
1800
1936
|
try {
|
|
1801
|
-
|
|
1937
|
+
m.value = await l.value(e, t.signal);
|
|
1802
1938
|
} catch {
|
|
1803
1939
|
if (t.signal.aborted) return;
|
|
1804
|
-
|
|
1940
|
+
m.value = [];
|
|
1805
1941
|
} finally {
|
|
1806
|
-
D === t && (
|
|
1942
|
+
D === t && (_.value = !1, C.value = !0);
|
|
1807
1943
|
}
|
|
1808
1944
|
}
|
|
1809
|
-
function
|
|
1810
|
-
if (
|
|
1811
|
-
|
|
1945
|
+
function A(e) {
|
|
1946
|
+
if (d.value = e, !e) return M();
|
|
1947
|
+
n.instant && (clearTimeout(O), O = setTimeout(k, 350));
|
|
1812
1948
|
}
|
|
1813
|
-
function
|
|
1814
|
-
E.value = e,
|
|
1815
|
-
let t =
|
|
1949
|
+
function j(e) {
|
|
1950
|
+
E.value = e, w.value = !1;
|
|
1951
|
+
let t = c.value;
|
|
1816
1952
|
e.bbox && e.bbox[0] !== e.bbox[2] ? t?.fitBounds([[e.bbox[0], e.bbox[1]], [e.bbox[2], e.bbox[3]]], {
|
|
1817
1953
|
padding: 48,
|
|
1818
|
-
maxZoom:
|
|
1954
|
+
maxZoom: n.zoom
|
|
1819
1955
|
}) : t?.flyTo({
|
|
1820
1956
|
center: e.lngLat,
|
|
1821
|
-
zoom:
|
|
1822
|
-
}),
|
|
1957
|
+
zoom: n.zoom
|
|
1958
|
+
}), i("select", e);
|
|
1823
1959
|
}
|
|
1824
|
-
function
|
|
1825
|
-
D?.abort(), clearTimeout(
|
|
1960
|
+
function M() {
|
|
1961
|
+
D?.abort(), clearTimeout(O), d.value = "", m.value = [], C.value = !1, _.value = !1, w.value = !1, E.value = null;
|
|
1826
1962
|
}
|
|
1827
|
-
|
|
1828
|
-
D?.abort(), clearTimeout(
|
|
1963
|
+
N(() => {
|
|
1964
|
+
D?.abort(), clearTimeout(O);
|
|
1829
1965
|
});
|
|
1830
|
-
let
|
|
1966
|
+
let P = {
|
|
1831
1967
|
city: "location_city",
|
|
1832
1968
|
town: "location_city",
|
|
1833
1969
|
village: "holiday_village",
|
|
@@ -1854,78 +1990,78 @@ var Tt = { class: "hidden" }, Et = [
|
|
|
1854
1990
|
administrative: "map",
|
|
1855
1991
|
country: "public",
|
|
1856
1992
|
state: "map"
|
|
1857
|
-
},
|
|
1858
|
-
return (
|
|
1993
|
+
}, ee = (e) => e && P[e] || "location_on";
|
|
1994
|
+
return (t, n) => (F(), x("div", Rt, [T(ae, {
|
|
1859
1995
|
position: e.position,
|
|
1860
1996
|
group: !1
|
|
1861
1997
|
}, {
|
|
1862
|
-
default:
|
|
1998
|
+
default: G(() => [T(s, {
|
|
1863
1999
|
variant: "elevated",
|
|
1864
2000
|
class: "w-80 max-w-[calc(100vw-5rem)] overflow-hidden"
|
|
1865
2001
|
}, {
|
|
1866
|
-
default:
|
|
2002
|
+
default: G(() => [S("form", {
|
|
1867
2003
|
class: "flex items-center gap-2 py-1 pr-1 pl-3",
|
|
1868
2004
|
role: "search",
|
|
1869
|
-
onSubmit:
|
|
2005
|
+
onSubmit: K(k, ["prevent"])
|
|
1870
2006
|
}, [
|
|
1871
|
-
|
|
2007
|
+
T(h, {
|
|
1872
2008
|
name: "search",
|
|
1873
2009
|
size: 20,
|
|
1874
2010
|
class: "shrink-0 text-on-surface-variant"
|
|
1875
2011
|
}),
|
|
1876
|
-
|
|
1877
|
-
value:
|
|
2012
|
+
S("input", {
|
|
2013
|
+
value: d.value,
|
|
1878
2014
|
type: "search",
|
|
1879
2015
|
enterkeyhint: "search",
|
|
1880
|
-
placeholder: e.placeholder ??
|
|
1881
|
-
"aria-label": e.placeholder ??
|
|
2016
|
+
placeholder: e.placeholder ?? U(o).mapSearchPlaces,
|
|
2017
|
+
"aria-label": e.placeholder ?? U(o).mapSearchPlaces,
|
|
1882
2018
|
class: "min-w-0 flex-1 bg-transparent py-2 text-body-medium text-on-surface outline-none placeholder:text-on-surface-variant [&::-webkit-search-cancel-button]:hidden",
|
|
1883
|
-
onInput:
|
|
1884
|
-
onFocus:
|
|
1885
|
-
}, null, 40,
|
|
1886
|
-
|
|
2019
|
+
onInput: n[0] ||= (e) => A(e.target.value),
|
|
2020
|
+
onFocus: n[1] ||= (e) => w.value = C.value && !E.value
|
|
2021
|
+
}, null, 40, zt),
|
|
2022
|
+
_.value ? (F(), y(f, {
|
|
1887
2023
|
key: 0,
|
|
1888
2024
|
size: 20,
|
|
1889
2025
|
class: "mr-2 shrink-0"
|
|
1890
|
-
})) :
|
|
2026
|
+
})) : d.value ? (F(), y(p, {
|
|
1891
2027
|
key: 1,
|
|
1892
2028
|
icon: "close",
|
|
1893
|
-
label:
|
|
2029
|
+
label: U(o).clearSearch,
|
|
1894
2030
|
size: "sm",
|
|
1895
|
-
onClick:
|
|
1896
|
-
}, null, 8, ["label"])) :
|
|
1897
|
-
], 32),
|
|
2031
|
+
onClick: M
|
|
2032
|
+
}, null, 8, ["label"])) : b("", !0)
|
|
2033
|
+
], 32), w.value && C.value && !_.value ? (F(), x("div", Bt, [m.value.length ? (F(), y(r, {
|
|
1898
2034
|
key: 0,
|
|
1899
2035
|
class: "max-h-72 overflow-y-auto"
|
|
1900
2036
|
}, {
|
|
1901
|
-
default:
|
|
2037
|
+
default: G(() => [(F(!0), x(g, null, z(m.value, (e, t) => (F(), y(a, {
|
|
1902
2038
|
key: t,
|
|
1903
2039
|
title: e.label,
|
|
1904
|
-
icon:
|
|
2040
|
+
icon: ee(e.type),
|
|
1905
2041
|
leading: "icon",
|
|
1906
2042
|
clickable: "",
|
|
1907
|
-
onClick: (t) =>
|
|
2043
|
+
onClick: (t) => j(e)
|
|
1908
2044
|
}, null, 8, [
|
|
1909
2045
|
"title",
|
|
1910
2046
|
"icon",
|
|
1911
2047
|
"onClick"
|
|
1912
2048
|
]))), 128))]),
|
|
1913
2049
|
_: 1
|
|
1914
|
-
})) : (
|
|
2050
|
+
})) : (F(), x("div", Vt, [T(h, {
|
|
1915
2051
|
name: "search_off",
|
|
1916
2052
|
size: 28,
|
|
1917
2053
|
class: "text-on-surface-variant"
|
|
1918
|
-
}),
|
|
2054
|
+
}), S("span", Ht, H(U(o).noResults), 1)]))])) : b("", !0)]),
|
|
1919
2055
|
_: 1
|
|
1920
2056
|
})]),
|
|
1921
2057
|
_: 1
|
|
1922
|
-
}, 8, ["position"]), e.marker && E.value ? (
|
|
2058
|
+
}, 8, ["position"]), e.marker && E.value ? (F(), y(_e, {
|
|
1923
2059
|
key: 0,
|
|
1924
2060
|
"lng-lat": E.value.lngLat
|
|
1925
|
-
}, null, 8, ["lng-lat"])) :
|
|
2061
|
+
}, null, 8, ["lng-lat"])) : b("", !0)]));
|
|
1926
2062
|
}
|
|
1927
2063
|
});
|
|
1928
2064
|
//#endregion
|
|
1929
|
-
export {
|
|
2065
|
+
export { de as MMap, qe as MMapBaseLayers, ae as MMapControl, nt as MMapFeatureInfo, It as MMapFilter, xe as MMapGeoJson, yt as MMapHover, ft as MMapIdentify, Ue as MMapLayers, _e as MMapMarker, Mt as MMapMeasure, ye as MMapPopup, Ut as MMapSearch, st as fieldLabel, ct as formatFieldValue, at as genericAdapter, ut as identifyFeatures, Lt as nominatimProvider, ot as orvianAdapter, J as useMap, Pt as useMapFilter, Z as useMapLayers };
|
|
1930
2066
|
|
|
1931
2067
|
//# sourceMappingURL=map.js.map
|