@opengis/gis 0.1.67 → 0.1.69
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/index.css +1 -1
- package/dist/index.js +828 -843
- package/dist/index.umd.cjs +7 -7
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { computed as M, createElementBlock as p, openBlock as c, normalizeStyle as
|
|
2
|
-
import
|
|
1
|
+
import { computed as M, createElementBlock as p, openBlock as c, normalizeStyle as he, createCommentVNode as j, createElementVNode as r, toDisplayString as S, Fragment as A, renderList as N, normalizeClass as K, ref as B, onMounted as xe, resolveDirective as pt, withDirectives as ne, watch as fe, vModelText as Ze, vModelCheckbox as qe, defineComponent as Ge, reactive as ht, onBeforeUnmount as ft, createBlock as X, renderSlot as Ne, Teleport as Ke, createVNode as Z, Transition as gt, withCtx as W, vShow as Pe, nextTick as Ee, resolveComponent as G, unref as We, createTextVNode as ae, createStaticVNode as Ae, withModifiers as vt, resolveDynamicComponent as Oe, withKeys as mt, onUnmounted as yt, mergeProps as bt } from "vue";
|
|
2
|
+
import wt from "@opengis/filter";
|
|
3
3
|
const H = (e, t) => {
|
|
4
4
|
const o = e.__vccOpts || e;
|
|
5
|
-
for (const [
|
|
6
|
-
o[
|
|
5
|
+
for (const [s, n] of t)
|
|
6
|
+
o[s] = n;
|
|
7
7
|
return o;
|
|
8
|
-
},
|
|
8
|
+
}, xt = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "p-5 pb-0 flex justify-between items-center"
|
|
11
|
-
},
|
|
11
|
+
}, _t = { class: "inline-block font-semibold text-lg text-gray-800" }, kt = { class: "flex flex-col gap-1 p-5" }, Lt = { class: "flex items-center justify-between w-full text-sm text-gray-800 ml-2" }, Ct = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "ms-2 text-xs text-gray-500"
|
|
14
|
-
},
|
|
14
|
+
}, $t = {
|
|
15
15
|
__name: "vs-legend-widget",
|
|
16
16
|
props: {
|
|
17
17
|
config: {
|
|
@@ -21,21 +21,21 @@ const H = (e, t) => {
|
|
|
21
21
|
},
|
|
22
22
|
setup(e) {
|
|
23
23
|
const t = e, o = M(() => {
|
|
24
|
-
var
|
|
25
|
-
return ((
|
|
26
|
-
}),
|
|
27
|
-
var
|
|
28
|
-
return ((
|
|
24
|
+
var n;
|
|
25
|
+
return ((n = t.config) == null ? void 0 : n.items) || [];
|
|
26
|
+
}), s = M(() => {
|
|
27
|
+
var n;
|
|
28
|
+
return ((n = t.config) == null ? void 0 : n.title) || "";
|
|
29
29
|
});
|
|
30
|
-
return (
|
|
30
|
+
return (n, i) => (c(), p("div", {
|
|
31
31
|
class: "legend-widget flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative",
|
|
32
|
-
style:
|
|
32
|
+
style: he({ width: e.config.width || "100%" })
|
|
33
33
|
}, [
|
|
34
|
-
|
|
35
|
-
r("h2",
|
|
36
|
-
])) :
|
|
37
|
-
r("div",
|
|
38
|
-
(c(!0), p(
|
|
34
|
+
s.value ? (c(), p("div", xt, [
|
|
35
|
+
r("h2", _t, S(s.value), 1)
|
|
36
|
+
])) : j("", !0),
|
|
37
|
+
r("div", kt, [
|
|
38
|
+
(c(!0), p(A, null, N(o.value, (d) => (c(), p("div", {
|
|
39
39
|
class: "flex items-center",
|
|
40
40
|
key: d.label
|
|
41
41
|
}, [
|
|
@@ -46,17 +46,17 @@ const H = (e, t) => {
|
|
|
46
46
|
d.shape === "line" ? "w-6 h-0.5" : "",
|
|
47
47
|
d.shape === "dashed-line" ? "w-6 h-0.5 dashed-line" : ""
|
|
48
48
|
]]),
|
|
49
|
-
style:
|
|
49
|
+
style: he({ backgroundColor: d.color })
|
|
50
50
|
}, null, 6),
|
|
51
|
-
r("span",
|
|
51
|
+
r("span", Lt, [
|
|
52
52
|
r("span", null, S(d.label), 1),
|
|
53
|
-
d.count !== void 0 ? (c(), p("span",
|
|
53
|
+
d.count !== void 0 ? (c(), p("span", Ct, " (" + S(d.count) + ") ", 1)) : j("", !0)
|
|
54
54
|
])
|
|
55
55
|
]))), 128))
|
|
56
56
|
])
|
|
57
57
|
], 4));
|
|
58
58
|
}
|
|
59
|
-
},
|
|
59
|
+
}, It = /* @__PURE__ */ H($t, [["__scopeId", "data-v-dd12cf90"]]), Vt = { class: "flex flex-row gap-x-3 z-10 relative" }, St = ["onClick"], jt = ["src", "alt"], Ft = {
|
|
60
60
|
__name: "vs-basemaps-widget",
|
|
61
61
|
props: {
|
|
62
62
|
map: {
|
|
@@ -73,7 +73,7 @@ const H = (e, t) => {
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
setup(e) {
|
|
76
|
-
const t = e, o =
|
|
76
|
+
const t = e, o = B("voyager"), s = M(() => {
|
|
77
77
|
var g;
|
|
78
78
|
if (!((g = t.config) != null && g.layers)) return [];
|
|
79
79
|
const v = t.config.layers.map((l) => ({
|
|
@@ -98,7 +98,7 @@ const H = (e, t) => {
|
|
|
98
98
|
owner: ""
|
|
99
99
|
}), v;
|
|
100
100
|
});
|
|
101
|
-
function
|
|
101
|
+
function n(v) {
|
|
102
102
|
return {
|
|
103
103
|
version: 8,
|
|
104
104
|
sources: {
|
|
@@ -120,7 +120,7 @@ const H = (e, t) => {
|
|
|
120
120
|
}
|
|
121
121
|
const i = (v) => {
|
|
122
122
|
if (!t.map) return;
|
|
123
|
-
const g = t.map.getStyle(), l =
|
|
123
|
+
const g = t.map.getStyle(), l = s.value.map((h) => h.id), u = g.layers.filter((h) => !l.includes(h.id)), a = {};
|
|
124
124
|
for (const h in g.sources)
|
|
125
125
|
l.includes(h) || (a[h] = g.sources[h]);
|
|
126
126
|
if (v.id === "__none__") {
|
|
@@ -132,7 +132,7 @@ const H = (e, t) => {
|
|
|
132
132
|
t.map.setStyle(h);
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
|
-
const m =
|
|
135
|
+
const m = n(v);
|
|
136
136
|
t.map.setStyle(m), t.map.once("styledata", () => {
|
|
137
137
|
for (const [h, f] of Object.entries(a))
|
|
138
138
|
t.map.getSource(h) || t.map.addSource(h, f);
|
|
@@ -141,16 +141,16 @@ const H = (e, t) => {
|
|
|
141
141
|
});
|
|
142
142
|
}, d = (v) => {
|
|
143
143
|
o.value = v;
|
|
144
|
-
const g =
|
|
144
|
+
const g = s.value.find((l) => l.id === v);
|
|
145
145
|
g && t.map && i(g);
|
|
146
146
|
};
|
|
147
147
|
return xe(() => {
|
|
148
148
|
var v;
|
|
149
149
|
(v = t.config) != null && v.default && (o.value = t.config.default), d(o.value);
|
|
150
150
|
}), (v, g) => {
|
|
151
|
-
const l =
|
|
152
|
-
return c(), p("div",
|
|
153
|
-
(c(!0), p(
|
|
151
|
+
const l = pt("tooltip");
|
|
152
|
+
return c(), p("div", Vt, [
|
|
153
|
+
(c(!0), p(A, null, N(s.value, (u) => ne((c(), p("div", {
|
|
154
154
|
trigger: "hover",
|
|
155
155
|
placement: "top",
|
|
156
156
|
key: u.id
|
|
@@ -167,8 +167,8 @@ const H = (e, t) => {
|
|
|
167
167
|
src: u.image,
|
|
168
168
|
alt: u.title,
|
|
169
169
|
class: K(["object-cover rounded-lg", u.id === "__none__" ? "w-10 h-10" : "w-12 h-12"])
|
|
170
|
-
}, null, 10,
|
|
171
|
-
], 10,
|
|
170
|
+
}, null, 10, jt)) : j("", !0)
|
|
171
|
+
], 10, St)
|
|
172
172
|
])), [
|
|
173
173
|
[l, u.title]
|
|
174
174
|
])), 128))
|
|
@@ -176,7 +176,7 @@ const H = (e, t) => {
|
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
|
-
function
|
|
179
|
+
function $e(e) {
|
|
180
180
|
if (!e.attrType || !e.attribute || !e.rules)
|
|
181
181
|
return e.color || "#ccc";
|
|
182
182
|
const t = e.rules.map((o) => [
|
|
@@ -185,7 +185,7 @@ function Ie(e) {
|
|
|
185
185
|
]);
|
|
186
186
|
return t.push(e.color || "#ccc"), ["case", ...t.flat()];
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function Pt(e) {
|
|
189
189
|
if (!e.attrType || e.attrType !== "icon-by-attribute" || !e.attribute || !e.rules)
|
|
190
190
|
return e.default_icon || null;
|
|
191
191
|
const t = e.rules.map((o) => [
|
|
@@ -203,7 +203,7 @@ function Xe(e) {
|
|
|
203
203
|
]);
|
|
204
204
|
return t.push(e.fillPattern || ""), ["case", ...t.flat()];
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function ue(e, t = "stroke", o = "#ccc") {
|
|
207
207
|
return [
|
|
208
208
|
"case",
|
|
209
209
|
["boolean", ["feature-state", "hovered"], !1],
|
|
@@ -213,14 +213,14 @@ function pe(e, t = "stroke", o = "#ccc") {
|
|
|
213
213
|
e[t] || o
|
|
214
214
|
];
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function Et(e) {
|
|
217
217
|
const t = [
|
|
218
218
|
{
|
|
219
219
|
type: "fill",
|
|
220
220
|
minzoom: e.pointZoom || 0,
|
|
221
221
|
paint: {
|
|
222
|
-
"fill-color":
|
|
223
|
-
"fill-outline-color":
|
|
222
|
+
"fill-color": $e(e),
|
|
223
|
+
"fill-outline-color": ue(e, "stroke", "#ccc"),
|
|
224
224
|
"fill-opacity": e.opacity || 1,
|
|
225
225
|
...e.attrType === "attribute-pattern" && {
|
|
226
226
|
"fill-pattern": Xe(e)
|
|
@@ -231,7 +231,7 @@ function Pt(e) {
|
|
|
231
231
|
{
|
|
232
232
|
type: "line",
|
|
233
233
|
paint: {
|
|
234
|
-
"line-color":
|
|
234
|
+
"line-color": ue(e, "stroke", "#ccc"),
|
|
235
235
|
"line-width": e.width || 2,
|
|
236
236
|
"line-opacity": e.lineOpacity || e.opacity || 1
|
|
237
237
|
}
|
|
@@ -242,18 +242,18 @@ function Pt(e) {
|
|
|
242
242
|
maxzoom: e.pointZoom,
|
|
243
243
|
paint: {
|
|
244
244
|
"circle-color": e.color || "#ccc",
|
|
245
|
-
"circle-stroke-color":
|
|
245
|
+
"circle-stroke-color": ue(e, "stroke", "#ccc"),
|
|
246
246
|
"circle-stroke-width": e.width || 2,
|
|
247
247
|
"circle-opacity": e.opacity || 1
|
|
248
248
|
}
|
|
249
249
|
}), t;
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function Mt(e) {
|
|
252
252
|
return [
|
|
253
253
|
{
|
|
254
254
|
type: "line",
|
|
255
255
|
paint: {
|
|
256
|
-
"line-color":
|
|
256
|
+
"line-color": ue(e, "color", $e(e)),
|
|
257
257
|
"line-width": e.width || 2,
|
|
258
258
|
"line-opacity": e.opacity || 1,
|
|
259
259
|
...e.dashArray && { "line-dasharray": e.dashArray }
|
|
@@ -265,16 +265,16 @@ function Et(e) {
|
|
|
265
265
|
}
|
|
266
266
|
];
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function Tt(e) {
|
|
269
269
|
const t = [
|
|
270
270
|
{
|
|
271
271
|
type: "circle",
|
|
272
272
|
maxzoom: e.icon && +e.iconZoom || 22,
|
|
273
273
|
paint: {
|
|
274
274
|
"circle-radius": e.radius || 6,
|
|
275
|
-
"circle-stroke-color":
|
|
275
|
+
"circle-stroke-color": ue(e, "stroke", "#ccc"),
|
|
276
276
|
"circle-stroke-width": e.width || 2,
|
|
277
|
-
"circle-color":
|
|
277
|
+
"circle-color": $e(e),
|
|
278
278
|
"circle-opacity": e.opacity || 1
|
|
279
279
|
}
|
|
280
280
|
}
|
|
@@ -303,15 +303,15 @@ function Mt(e) {
|
|
|
303
303
|
}
|
|
304
304
|
}), t;
|
|
305
305
|
}
|
|
306
|
-
function
|
|
307
|
-
const
|
|
308
|
-
return
|
|
306
|
+
function zt(e, t, o) {
|
|
307
|
+
const s = e.type || "point";
|
|
308
|
+
return s === "polygon" ? [
|
|
309
309
|
{
|
|
310
310
|
type: "fill",
|
|
311
311
|
...o !== void 0 ? { maxzoom: o } : {},
|
|
312
312
|
paint: {
|
|
313
|
-
"fill-color":
|
|
314
|
-
"fill-outline-color":
|
|
313
|
+
"fill-color": $e(e),
|
|
314
|
+
"fill-outline-color": ue(e, "stroke", "#ccc"),
|
|
315
315
|
"fill-opacity": e.opacity || 1,
|
|
316
316
|
...e.attrType === "attribute-pattern" && {
|
|
317
317
|
"fill-pattern": Xe(e)
|
|
@@ -323,17 +323,17 @@ function Tt(e, t, o) {
|
|
|
323
323
|
type: "line",
|
|
324
324
|
...o !== void 0 ? { maxzoom: o } : {},
|
|
325
325
|
paint: {
|
|
326
|
-
"line-color":
|
|
326
|
+
"line-color": ue(e, "stroke", "#ccc"),
|
|
327
327
|
"line-width": e.width || 2,
|
|
328
328
|
"line-opacity": e.lineOpacity || e.opacity || 1
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
|
-
] :
|
|
331
|
+
] : s === "line" ? [
|
|
332
332
|
{
|
|
333
333
|
type: "line",
|
|
334
334
|
...o !== void 0 ? { maxzoom: o } : {},
|
|
335
335
|
paint: {
|
|
336
|
-
"line-color":
|
|
336
|
+
"line-color": ue(e, "color", $e(e)),
|
|
337
337
|
"line-width": e.width || 2,
|
|
338
338
|
"line-opacity": e.opacity || 1,
|
|
339
339
|
...e.dashArray && { "line-dasharray": e.dashArray }
|
|
@@ -349,24 +349,24 @@ function Tt(e, t, o) {
|
|
|
349
349
|
...o !== void 0 ? { maxzoom: o } : {},
|
|
350
350
|
paint: {
|
|
351
351
|
"circle-radius": e.radius || 6,
|
|
352
|
-
"circle-stroke-color":
|
|
352
|
+
"circle-stroke-color": ue(e, "stroke", "#ccc"),
|
|
353
353
|
"circle-stroke-width": e.width || 2,
|
|
354
|
-
"circle-color":
|
|
354
|
+
"circle-color": $e(e),
|
|
355
355
|
"circle-opacity": e.opacity || 1
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
];
|
|
359
359
|
}
|
|
360
360
|
function et(e) {
|
|
361
|
-
var o,
|
|
361
|
+
var o, s;
|
|
362
362
|
if (!e) return null;
|
|
363
363
|
if (e.attrType === "icon-by-attribute" && e.iconZoom) {
|
|
364
|
-
const
|
|
364
|
+
const n = Pt(e), i = Array.isArray(n) && n[0] === "case" ? n : [
|
|
365
365
|
"case",
|
|
366
|
-
["==", ["get", e.attribute], ((
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
], d =
|
|
366
|
+
["==", ["get", e.attribute], ((s = (o = e.rules) == null ? void 0 : o[0]) == null ? void 0 : s.value) || ""],
|
|
367
|
+
n,
|
|
368
|
+
n
|
|
369
|
+
], d = zt(e, void 0, +e.iconZoom), v = {
|
|
370
370
|
type: "symbol",
|
|
371
371
|
minzoom: +e.iconZoom,
|
|
372
372
|
layout: {
|
|
@@ -382,44 +382,44 @@ function et(e) {
|
|
|
382
382
|
return [...d, v];
|
|
383
383
|
}
|
|
384
384
|
const t = e.type || "point";
|
|
385
|
-
return t === "polygon" ?
|
|
385
|
+
return t === "polygon" ? Et(e) : t === "line" ? Mt(e) : Tt(e);
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function Bt(e) {
|
|
388
388
|
return e.startsWith("http") ? e : `${window.location.origin}${e}`;
|
|
389
389
|
}
|
|
390
390
|
function At(e) {
|
|
391
391
|
const {
|
|
392
392
|
id: t,
|
|
393
393
|
sourceLayer: o,
|
|
394
|
-
url:
|
|
395
|
-
bounds:
|
|
394
|
+
url: s,
|
|
395
|
+
bounds: n,
|
|
396
396
|
title: i,
|
|
397
397
|
style: d,
|
|
398
398
|
service: v,
|
|
399
399
|
service_type: g,
|
|
400
400
|
source_type: l,
|
|
401
401
|
data: u
|
|
402
|
-
} = e, a =
|
|
402
|
+
} = e, a = Bt(s), m = g || v || l || "vector";
|
|
403
403
|
switch (m) {
|
|
404
404
|
case "vtile":
|
|
405
405
|
case "vector":
|
|
406
|
-
return
|
|
406
|
+
return Dt(
|
|
407
407
|
t,
|
|
408
408
|
o,
|
|
409
409
|
a,
|
|
410
|
-
|
|
410
|
+
n,
|
|
411
411
|
i,
|
|
412
412
|
d
|
|
413
413
|
);
|
|
414
414
|
case "raster":
|
|
415
|
-
return
|
|
415
|
+
return Ut(t, a, n, i, d);
|
|
416
416
|
case "geojson":
|
|
417
|
-
return
|
|
417
|
+
return Rt(t, u || a, n, i, d);
|
|
418
418
|
default:
|
|
419
419
|
throw new Error(`Unsupported layer service type: ${m}`);
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function Ot(e) {
|
|
423
423
|
switch (e) {
|
|
424
424
|
case "polygon":
|
|
425
425
|
return { type: "polygon", color: "#3388ff", opacity: 0.5 };
|
|
@@ -430,11 +430,11 @@ function Bt(e) {
|
|
|
430
430
|
return { type: "point", color: "#3388ff", radius: 6, opacity: 1 };
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function Dt(e, t, o, s, n, i) {
|
|
434
434
|
const d = t || (o.match(/\/vtile\/([^/]+)/) || [])[1] || e, v = {
|
|
435
435
|
type: "vector",
|
|
436
436
|
tiles: [o],
|
|
437
|
-
...
|
|
437
|
+
...s && { bounds: s }
|
|
438
438
|
}, u = et(i || {}).map((a, m) => ({
|
|
439
439
|
...a,
|
|
440
440
|
id: `${e}-${m}`,
|
|
@@ -443,19 +443,19 @@ function Ot(e, t, o, n, s, i) {
|
|
|
443
443
|
}));
|
|
444
444
|
return {
|
|
445
445
|
id: e,
|
|
446
|
-
title:
|
|
446
|
+
title: n,
|
|
447
447
|
source: v,
|
|
448
448
|
layers: u,
|
|
449
449
|
visible: !0
|
|
450
450
|
};
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function Ut(e, t, o, s, n) {
|
|
453
453
|
const i = {
|
|
454
454
|
type: "raster",
|
|
455
455
|
tiles: [t],
|
|
456
456
|
tileSize: 256,
|
|
457
457
|
...o && { bounds: o }
|
|
458
|
-
}, d =
|
|
458
|
+
}, d = n || {}, v = {
|
|
459
459
|
id: e,
|
|
460
460
|
type: "raster",
|
|
461
461
|
source: e,
|
|
@@ -466,13 +466,13 @@ function Dt(e, t, o, n, s) {
|
|
|
466
466
|
};
|
|
467
467
|
return {
|
|
468
468
|
id: e,
|
|
469
|
-
title:
|
|
469
|
+
title: s,
|
|
470
470
|
source: i,
|
|
471
471
|
layers: [v],
|
|
472
472
|
visible: !0
|
|
473
473
|
};
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function Rt(e, t, o, s, n) {
|
|
476
476
|
var u;
|
|
477
477
|
const i = {
|
|
478
478
|
type: "geojson",
|
|
@@ -484,20 +484,20 @@ function Ut(e, t, o, n, s) {
|
|
|
484
484
|
const a = (u = t.features[0].geometry) == null ? void 0 : u.type;
|
|
485
485
|
a === "Polygon" || a === "MultiPolygon" ? d = "polygon" : a === "LineString" || a === "MultiLineString" ? d = "line" : d = "point";
|
|
486
486
|
}
|
|
487
|
-
const v =
|
|
487
|
+
const v = n || Ot(d), l = et(v).map((a, m) => ({
|
|
488
488
|
...a,
|
|
489
489
|
id: `${e}-${m}`,
|
|
490
490
|
source: e
|
|
491
491
|
}));
|
|
492
492
|
return {
|
|
493
493
|
id: e,
|
|
494
|
-
title:
|
|
494
|
+
title: s,
|
|
495
495
|
source: i,
|
|
496
496
|
layers: l,
|
|
497
497
|
visible: !0
|
|
498
498
|
};
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function Ht(e) {
|
|
501
501
|
if (!e || e.attrType !== "icon-by-attribute") return [];
|
|
502
502
|
const t = /* @__PURE__ */ new Set();
|
|
503
503
|
return e.default_icon && t.add(e.default_icon), Array.isArray(e.rules) && e.rules.forEach((o) => {
|
|
@@ -507,53 +507,53 @@ function Rt(e) {
|
|
|
507
507
|
url: (e.icon_base_url || "") + o
|
|
508
508
|
}));
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function Nt(e) {
|
|
511
511
|
const t = /* @__PURE__ */ new Set();
|
|
512
|
-
function o(
|
|
513
|
-
typeof
|
|
512
|
+
function o(s) {
|
|
513
|
+
typeof s == "string" ? t.add(s) : Array.isArray(s) && s.forEach(o);
|
|
514
514
|
}
|
|
515
515
|
return e && e["icon-image"] && o(e["icon-image"]), Array.from(t);
|
|
516
516
|
}
|
|
517
517
|
async function tt(e, t) {
|
|
518
|
-
const o = t.map(async ({ name:
|
|
519
|
-
const i = await e.loadImage(
|
|
520
|
-
return { name:
|
|
518
|
+
const o = t.map(async ({ name: s, url: n }) => {
|
|
519
|
+
const i = await e.loadImage(n);
|
|
520
|
+
return { name: s, data: i.data };
|
|
521
521
|
});
|
|
522
522
|
try {
|
|
523
|
-
const
|
|
524
|
-
for (const { name:
|
|
525
|
-
e.hasImage(
|
|
526
|
-
} catch (
|
|
527
|
-
console.error("Failed to load icons:",
|
|
523
|
+
const s = await Promise.all(o);
|
|
524
|
+
for (const { name: n, data: i } of s)
|
|
525
|
+
e.hasImage(n) || e.addImage(n, i);
|
|
526
|
+
} catch (s) {
|
|
527
|
+
console.error("Failed to load icons:", s);
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
function
|
|
531
|
-
const
|
|
532
|
-
return tt(e,
|
|
530
|
+
function Zt(e, t, o = "/icons/") {
|
|
531
|
+
const n = Nt(t).map((i) => ({ name: i, url: o + i }));
|
|
532
|
+
return tt(e, n);
|
|
533
533
|
}
|
|
534
534
|
async function we(e, t) {
|
|
535
|
-
const o = At(t),
|
|
536
|
-
|
|
537
|
-
for (const
|
|
538
|
-
t.visible !== void 0 && (
|
|
539
|
-
...
|
|
535
|
+
const o = At(t), s = Ht(t.style);
|
|
536
|
+
s.length > 0 && await tt(e, s), t.layout && t.layout["icon-image"] && await Zt(e, t.layout), e.getSource(o.id) || e.addSource(o.id, o.source);
|
|
537
|
+
for (const n of o.layers)
|
|
538
|
+
t.visible !== void 0 && (n.layout = {
|
|
539
|
+
...n.layout,
|
|
540
540
|
visibility: t.visible ? "visible" : "none"
|
|
541
|
-
}), e.getLayer(
|
|
542
|
-
|
|
541
|
+
}), e.getLayer(n.id) ? e.setLayoutProperty(
|
|
542
|
+
n.id,
|
|
543
543
|
"visibility",
|
|
544
544
|
t.visible ? "visible" : "none"
|
|
545
|
-
) : await e.addLayer(
|
|
545
|
+
) : await e.addLayer(n);
|
|
546
546
|
return o;
|
|
547
547
|
}
|
|
548
548
|
function Ce(e, t) {
|
|
549
|
-
e.getStyle().layers.filter((
|
|
550
|
-
e.removeLayer(
|
|
549
|
+
e.getStyle().layers.filter((n) => n.source === t).forEach((n) => {
|
|
550
|
+
e.removeLayer(n.id);
|
|
551
551
|
}), e.getSource(t) && e.removeSource(t);
|
|
552
552
|
}
|
|
553
|
-
const
|
|
553
|
+
const Wt = { class: "w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative" }, qt = { class: "flex flex-col justify-between h-full pb-5 px-5" }, Gt = {
|
|
554
554
|
key: 0,
|
|
555
555
|
class: "relative mb-[10px]"
|
|
556
|
-
},
|
|
556
|
+
}, Jt = {
|
|
557
557
|
width: "16",
|
|
558
558
|
height: "17",
|
|
559
559
|
viewBox: "0 0 16 17",
|
|
@@ -561,13 +561,13 @@ const Nt = { class: "w-full flex flex-col bg-white border border-stone-200 shado
|
|
|
561
561
|
xmlns: "http://www.w3.org/2000/svg",
|
|
562
562
|
class: "absolute top-1/2 left-[8px] w-[16px] h-[16px]",
|
|
563
563
|
style: { transform: "translate(0px, -50%)" }
|
|
564
|
-
},
|
|
564
|
+
}, Qt = {
|
|
565
565
|
key: 1,
|
|
566
566
|
class: "mb-4"
|
|
567
|
-
},
|
|
567
|
+
}, Yt = { class: "" }, Kt = { class: "space-y-2" }, Xt = { class: "flex items-center gap-[10px] text-gray-500" }, eo = { class: "dataset-checkbox-container flex" }, to = ["onUpdate:modelValue", "onChange"], oo = { class: "text-sm" }, ro = ["onClick"], so = ["innerHTML"], no = {
|
|
568
568
|
key: 0,
|
|
569
569
|
class: "text-sm text-gray-500 text-center py-2"
|
|
570
|
-
},
|
|
570
|
+
}, io = {
|
|
571
571
|
__name: "vs-layers-widget",
|
|
572
572
|
props: {
|
|
573
573
|
map: {
|
|
@@ -597,7 +597,7 @@ const Nt = { class: "w-full flex flex-col bg-white border border-stone-200 shado
|
|
|
597
597
|
},
|
|
598
598
|
emits: ["set-filter-layer", "update:enabledLayerIds"],
|
|
599
599
|
setup(e, { emit: t }) {
|
|
600
|
-
const o = e,
|
|
600
|
+
const o = e, s = t, n = B(""), i = B([]);
|
|
601
601
|
function d() {
|
|
602
602
|
const f = new URLSearchParams(window.location.search).get("layers");
|
|
603
603
|
return f ? f.split(",") : [];
|
|
@@ -618,47 +618,47 @@ const Nt = { class: "w-full flex flex-col bg-white border border-stone-200 shado
|
|
|
618
618
|
visible: f.visible ?? !1
|
|
619
619
|
})), i.value.forEach((f) => {
|
|
620
620
|
f.visible && we(o.map, f);
|
|
621
|
-
}),
|
|
621
|
+
}), s("update:enabledLayerIds", u());
|
|
622
622
|
});
|
|
623
623
|
const g = M(() => {
|
|
624
|
-
if (!
|
|
625
|
-
const h =
|
|
624
|
+
if (!n.value) return i.value;
|
|
625
|
+
const h = n.value.toLowerCase();
|
|
626
626
|
return i.value.filter((f) => (f.title || f.name || f.label || "").toLowerCase().includes(h));
|
|
627
627
|
}), l = M(() => i.value.every((h) => h.visible)), u = () => i.value.filter((h) => h.visible).map((h) => h.id), a = (h) => {
|
|
628
|
-
h.visible ? we(o.map, h) : (Ce(o.map, h.id),
|
|
628
|
+
h.visible ? we(o.map, h) : (Ce(o.map, h.id), s("set-filter-layer", null)), o.map.getStyle().layers.filter((F) => F.source === h.id).forEach((F) => {
|
|
629
629
|
o.map.setLayoutProperty(
|
|
630
|
-
|
|
630
|
+
F.id,
|
|
631
631
|
"visibility",
|
|
632
632
|
h.visible ? "visible" : "none"
|
|
633
633
|
);
|
|
634
|
-
}),
|
|
634
|
+
}), s("update:enabledLayerIds", u());
|
|
635
635
|
}, m = () => {
|
|
636
636
|
const h = !l.value;
|
|
637
637
|
i.value.forEach((f) => {
|
|
638
638
|
f.visible = h, h ? we(o.map, f) : Ce(o.map, f.id);
|
|
639
|
-
}), h ||
|
|
639
|
+
}), h || s("set-filter-layer", null), s("update:enabledLayerIds", u());
|
|
640
640
|
};
|
|
641
|
-
return
|
|
641
|
+
return fe(
|
|
642
642
|
() => u(),
|
|
643
643
|
(h) => {
|
|
644
644
|
o.history && v(h);
|
|
645
645
|
},
|
|
646
646
|
{ deep: !0 }
|
|
647
|
-
), (h, f) => (c(), p("div",
|
|
647
|
+
), (h, f) => (c(), p("div", Wt, [
|
|
648
648
|
f[2] || (f[2] = r("div", { class: "p-5 pb-3 flex justify-between items-center" }, [
|
|
649
649
|
r("h2", { class: "inline-block font-semibold text-lg text-gray-800" }, "Шари")
|
|
650
650
|
], -1)),
|
|
651
|
-
r("div",
|
|
652
|
-
e.config.search ? (c(), p("div",
|
|
651
|
+
r("div", qt, [
|
|
652
|
+
e.config.search ? (c(), p("div", Gt, [
|
|
653
653
|
ne(r("input", {
|
|
654
654
|
type: "text",
|
|
655
|
-
"onUpdate:modelValue": f[0] || (f[0] = (L) =>
|
|
655
|
+
"onUpdate:modelValue": f[0] || (f[0] = (L) => n.value = L),
|
|
656
656
|
placeholder: "Введіть назву шару...",
|
|
657
657
|
class: "py-[7px] ps-8 pe-8 block w-full bg-gray-100 border-transparent rounded-lg text-sm focus:bg-white focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none"
|
|
658
658
|
}, null, 512), [
|
|
659
|
-
[
|
|
659
|
+
[Ze, n.value]
|
|
660
660
|
]),
|
|
661
|
-
(c(), p("svg",
|
|
661
|
+
(c(), p("svg", Jt, [...f[1] || (f[1] = [
|
|
662
662
|
r("path", {
|
|
663
663
|
d: "M7.33333 13.1667C10.2789 13.1667 12.6667 10.7789 12.6667 7.83333C12.6667 4.88781 10.2789 2.5 7.33333 2.5C4.38781 2.5 2 4.88781 2 7.83333C2 10.7789 4.38781 13.1667 7.33333 13.1667Z",
|
|
664
664
|
stroke: "#6B7280",
|
|
@@ -672,53 +672,53 @@ const Nt = { class: "w-full flex flex-col bg-white border border-stone-200 shado
|
|
|
672
672
|
"stroke-linejoin": "round"
|
|
673
673
|
}, null, -1)
|
|
674
674
|
])]))
|
|
675
|
-
])) :
|
|
676
|
-
e.config.allow_toggle_all ? (c(), p("div",
|
|
675
|
+
])) : j("", !0),
|
|
676
|
+
e.config.allow_toggle_all ? (c(), p("div", Qt, [
|
|
677
677
|
r("button", {
|
|
678
678
|
onClick: m,
|
|
679
679
|
class: "w-full py-[7px] bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors"
|
|
680
680
|
}, S(l.value ? "Вимкнути всі" : "Увімкнути всі"), 1)
|
|
681
|
-
])) :
|
|
682
|
-
r("div",
|
|
683
|
-
r("ul",
|
|
684
|
-
(c(!0), p(
|
|
681
|
+
])) : j("", !0),
|
|
682
|
+
r("div", Yt, [
|
|
683
|
+
r("ul", Kt, [
|
|
684
|
+
(c(!0), p(A, null, N(g.value, (L) => (c(), p("li", {
|
|
685
685
|
key: L.id,
|
|
686
686
|
class: "flex flex-wrap justify-between items-center gap-x-2"
|
|
687
687
|
}, [
|
|
688
|
-
r("label",
|
|
689
|
-
r("span",
|
|
688
|
+
r("label", Xt, [
|
|
689
|
+
r("span", eo, [
|
|
690
690
|
ne(r("input", {
|
|
691
691
|
class: "dataset-checkbox",
|
|
692
692
|
type: "checkbox",
|
|
693
|
-
"onUpdate:modelValue": (
|
|
693
|
+
"onUpdate:modelValue": (F) => L.visible = F,
|
|
694
694
|
onChange: () => a(L)
|
|
695
|
-
}, null, 40,
|
|
695
|
+
}, null, 40, to), [
|
|
696
696
|
[qe, L.visible]
|
|
697
697
|
])
|
|
698
698
|
]),
|
|
699
|
-
r("span",
|
|
699
|
+
r("span", oo, S(L.title || L.name || L.label), 1)
|
|
700
700
|
]),
|
|
701
|
-
L.actions && L.visible ? (c(!0), p(
|
|
702
|
-
key:
|
|
701
|
+
L.actions && L.visible ? (c(!0), p(A, { key: 0 }, N(L.actions, (F) => (c(), p("div", {
|
|
702
|
+
key: F.id
|
|
703
703
|
}, [
|
|
704
704
|
r("button", {
|
|
705
705
|
class: "text-sm text-gray-500",
|
|
706
|
-
onClick: (T) => h.$emit("show-widget",
|
|
706
|
+
onClick: (T) => h.$emit("show-widget", F.widget)
|
|
707
707
|
}, [
|
|
708
708
|
r("div", {
|
|
709
|
-
innerHTML:
|
|
710
|
-
}, null, 8,
|
|
711
|
-
], 8,
|
|
712
|
-
]))), 128)) :
|
|
709
|
+
innerHTML: F.icon
|
|
710
|
+
}, null, 8, so)
|
|
711
|
+
], 8, ro)
|
|
712
|
+
]))), 128)) : j("", !0)
|
|
713
713
|
]))), 128)),
|
|
714
|
-
|
|
714
|
+
n.value && g.value.length === 0 ? (c(), p("li", no, " Шарів не знайдено ")) : j("", !0)
|
|
715
715
|
])
|
|
716
716
|
])
|
|
717
717
|
])
|
|
718
718
|
]));
|
|
719
719
|
}
|
|
720
720
|
};
|
|
721
|
-
|
|
721
|
+
Ge({
|
|
722
722
|
props: {
|
|
723
723
|
modelValue: { type: Boolean, default: () => !1 },
|
|
724
724
|
title: { type: String, default: () => "" },
|
|
@@ -759,49 +759,49 @@ Ye({
|
|
|
759
759
|
}
|
|
760
760
|
}
|
|
761
761
|
});
|
|
762
|
-
const
|
|
763
|
-
var L,
|
|
762
|
+
const Fe = async (e, t, o, s = 10) => {
|
|
763
|
+
var L, F, T, k;
|
|
764
764
|
if (!t || !o) return;
|
|
765
|
-
await
|
|
766
|
-
const
|
|
767
|
-
if (!i || !
|
|
768
|
-
const d = await parseInt((L = t == null ? void 0 : t.getBoundingClientRect()) == null ? void 0 : L.height), v = await parseInt((
|
|
765
|
+
await Ee();
|
|
766
|
+
const n = await (o == null ? void 0 : o.getBoundingClientRect()), i = await (t == null ? void 0 : t.getBoundingClientRect());
|
|
767
|
+
if (!i || !n) return;
|
|
768
|
+
const d = await parseInt((L = t == null ? void 0 : t.getBoundingClientRect()) == null ? void 0 : L.height), v = await parseInt((F = t == null ? void 0 : t.getBoundingClientRect()) == null ? void 0 : F.width), g = await parseInt((T = o == null ? void 0 : o.getBoundingClientRect()) == null ? void 0 : T.height), l = await parseInt((k = o == null ? void 0 : o.getBoundingClientRect()) == null ? void 0 : k.width), u = await window.innerHeight, a = await window.innerWidth;
|
|
769
769
|
let m = 0, h = 0;
|
|
770
|
-
const f = i.bottom +
|
|
770
|
+
const f = i.bottom + s + g;
|
|
771
771
|
switch (e) {
|
|
772
772
|
case "top":
|
|
773
|
-
i.top -
|
|
773
|
+
i.top - n.height - s < 0 ? m = i.top - n.height + s + g + d : m = i.top - n.height - s, a > l + i.right + 30 ? h = i.left - n.width / 2 + i.width / 2 : h = a - 30 - l;
|
|
774
774
|
break;
|
|
775
775
|
case "bottom":
|
|
776
|
-
u > f ? m = i.bottom +
|
|
776
|
+
u > f ? m = i.bottom + s : m = i.bottom - s - g - d, h = i.left - n.width / 2 + i.width / 2;
|
|
777
777
|
break;
|
|
778
778
|
case "left":
|
|
779
|
-
m = i.top -
|
|
779
|
+
m = i.top - n.height / 2 + i.height / 2, i.left - n.width - s > 0 ? h = i.left - n.width - s : h = 10;
|
|
780
780
|
break;
|
|
781
781
|
case "right":
|
|
782
|
-
m = i.top -
|
|
782
|
+
m = i.top - n.height / 2 + i.height / 2, a - v > l ? h = i.right + s : h = a - 30 - l;
|
|
783
783
|
break;
|
|
784
784
|
case "top-right":
|
|
785
|
-
i.top -
|
|
785
|
+
i.top - n.height - s < 0 ? m = i.top - n.height + s + g + d : m = i.top - n.height - s, a - v > l ? h = i.right + s : h = a - 30 - l;
|
|
786
786
|
break;
|
|
787
787
|
case "top-left":
|
|
788
|
-
i.top -
|
|
788
|
+
i.top - n.height - s < 0 ? m = i.top - n.height + s + g + d : m = i.top - n.height - s, i.left - n.width - s > 0 ? h = i.left - n.width - s : h = 10;
|
|
789
789
|
break;
|
|
790
790
|
case "top-start":
|
|
791
|
-
i.top -
|
|
791
|
+
i.top - n.height - s < 0 ? m = i.top - n.height + s + g + d : m = i.top - n.height - s, i.left > 0 ? h = i.left : h = 10;
|
|
792
792
|
break;
|
|
793
793
|
case "bottom-right":
|
|
794
|
-
u > f ? m = i.bottom +
|
|
794
|
+
u > f ? m = i.bottom + s : m = i.bottom - s - g - d, a - v > l ? h = i.left : h = a - 30 - l;
|
|
795
795
|
break;
|
|
796
796
|
case "bottom-left":
|
|
797
|
-
u > f ? m = i.bottom +
|
|
797
|
+
u > f ? m = i.bottom + s : m = i.bottom - s - g - d, i.left > 0 ? h = i.right - l : h = 10;
|
|
798
798
|
break;
|
|
799
799
|
case "bottom-start":
|
|
800
|
-
u > f ? m = i.bottom +
|
|
800
|
+
u > f ? m = i.bottom + s : m = i.bottom - s - g - d, i.left > 0 ? h = i.left : h = 10;
|
|
801
801
|
break;
|
|
802
802
|
}
|
|
803
|
-
m + g > u ? m = u - g -
|
|
804
|
-
},
|
|
803
|
+
m + g > u ? m = u - g - s : m < 0 && (m = s), h + l > a ? h = a - l - s : h < 0 && (h = s), o instanceof HTMLElement && (o.style.top = `${m}px`, o.style.left = `${h}px`, o.style.position = "fixed");
|
|
804
|
+
}, ao = { class: "text-center" }, lo = { class: "py-2 px-4 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:text-neutral-200 dark:focus:bg-neutral-800 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, Ie = /* @__PURE__ */ Ge({
|
|
805
805
|
__name: "vs-popover",
|
|
806
806
|
props: {
|
|
807
807
|
isOpen: { type: Boolean, default: !1 },
|
|
@@ -814,7 +814,7 @@ const Pe = async (e, t, o, n = 10) => {
|
|
|
814
814
|
},
|
|
815
815
|
emits: ["isvisible"],
|
|
816
816
|
setup(e, { expose: t, emit: o }) {
|
|
817
|
-
const
|
|
817
|
+
const s = e, n = o, i = B(!1), d = B([]), v = B(null), g = B(null), l = B(null), u = (_) => {
|
|
818
818
|
var D, le;
|
|
819
819
|
if (!_) {
|
|
820
820
|
i.value = !1;
|
|
@@ -837,19 +837,19 @@ const Pe = async (e, t, o, n = 10) => {
|
|
|
837
837
|
_.removeEventListener("scroll", m);
|
|
838
838
|
}), d.value = [];
|
|
839
839
|
};
|
|
840
|
-
|
|
841
|
-
_ ? (f(), window.addEventListener("resize", () =>
|
|
840
|
+
fe(i, (_) => {
|
|
841
|
+
_ ? (f(), window.addEventListener("resize", () => Fe(s.placement, g.value, l.value)), Fe(s.placement, g.value, l.value)) : window.removeEventListener("resize", () => Fe(s.placement, g.value, l.value)), n("isvisible", _);
|
|
842
842
|
}), xe(() => {
|
|
843
843
|
window.addEventListener("click", u), window.addEventListener("popstate", h), window.addEventListener("scroll", a, !0), f();
|
|
844
|
-
}),
|
|
844
|
+
}), ft(() => {
|
|
845
845
|
window.removeEventListener("click", u), window.removeEventListener("popstate", h), L();
|
|
846
846
|
});
|
|
847
|
-
const
|
|
848
|
-
i.value = !0,
|
|
847
|
+
const F = () => {
|
|
848
|
+
i.value = !0, Fe(s.placement, g.value, l.value);
|
|
849
849
|
}, T = () => {
|
|
850
850
|
i.value = !1;
|
|
851
851
|
}, k = async () => {
|
|
852
|
-
await
|
|
852
|
+
await Fe(s.placement, g.value, l.value), i.value = !i.value;
|
|
853
853
|
};
|
|
854
854
|
return t({
|
|
855
855
|
togglePopover: k
|
|
@@ -858,7 +858,7 @@ const Pe = async (e, t, o, n = 10) => {
|
|
|
858
858
|
ref: v,
|
|
859
859
|
class: "vs-popover inline-block"
|
|
860
860
|
}, [
|
|
861
|
-
r("div",
|
|
861
|
+
r("div", ao, [
|
|
862
862
|
_.trigger === "click" ? (c(), p("div", {
|
|
863
863
|
key: 0,
|
|
864
864
|
ref_key: "popoverRef",
|
|
@@ -866,41 +866,41 @@ const Pe = async (e, t, o, n = 10) => {
|
|
|
866
866
|
onClick: k,
|
|
867
867
|
class: K({ "pointer-events-none": _.disabled })
|
|
868
868
|
}, [
|
|
869
|
-
|
|
869
|
+
Ne(_.$slots, "reference", {}, () => [
|
|
870
870
|
D[0] || (D[0] = r("button", null, "Click me!", -1))
|
|
871
871
|
])
|
|
872
|
-
], 2)) :
|
|
872
|
+
], 2)) : j("", !0),
|
|
873
873
|
_.trigger === "hover" ? (c(), p("div", {
|
|
874
874
|
key: 1,
|
|
875
875
|
ref_key: "popoverRef",
|
|
876
876
|
ref: g,
|
|
877
|
-
onMouseover:
|
|
877
|
+
onMouseover: F,
|
|
878
878
|
onMouseleave: T,
|
|
879
879
|
class: K({ "pointer-events-none": _.disabled })
|
|
880
880
|
}, [
|
|
881
|
-
|
|
881
|
+
Ne(_.$slots, "reference", {}, () => [
|
|
882
882
|
D[1] || (D[1] = r("button", null, "Click me!", -1))
|
|
883
883
|
])
|
|
884
|
-
], 34)) :
|
|
884
|
+
], 34)) : j("", !0),
|
|
885
885
|
(c(), X(Ke, { to: _.teleport }, [
|
|
886
|
-
|
|
887
|
-
default:
|
|
886
|
+
Z(gt, { name: "fade" }, {
|
|
887
|
+
default: W(() => [
|
|
888
888
|
ne(r("div", {
|
|
889
889
|
class: K(["vsTailwind vs-popover__content", _.placement]),
|
|
890
890
|
ref_key: "contentPop",
|
|
891
891
|
ref: l,
|
|
892
|
-
style:
|
|
892
|
+
style: he({
|
|
893
893
|
width: _.width ? _.width + "px" : "fit-content",
|
|
894
894
|
zIndex: 10002
|
|
895
895
|
})
|
|
896
896
|
}, [
|
|
897
|
-
r("div",
|
|
898
|
-
|
|
897
|
+
r("div", lo, [
|
|
898
|
+
Ne(_.$slots, "default", {}, () => [
|
|
899
899
|
D[2] || (D[2] = r("span", null, "Popover content", -1))
|
|
900
900
|
])
|
|
901
901
|
])
|
|
902
902
|
], 6), [
|
|
903
|
-
[
|
|
903
|
+
[Pe, i.value]
|
|
904
904
|
])
|
|
905
905
|
]),
|
|
906
906
|
_: 3
|
|
@@ -910,11 +910,11 @@ const Pe = async (e, t, o, n = 10) => {
|
|
|
910
910
|
], 512));
|
|
911
911
|
}
|
|
912
912
|
});
|
|
913
|
-
|
|
914
|
-
const
|
|
913
|
+
ht({ visible: !0 });
|
|
914
|
+
const co = { class: "legend-widget flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative" }, uo = {
|
|
915
915
|
key: 0,
|
|
916
916
|
class: "p-5 pb-3 flex justify-between items-start gap-[30px]"
|
|
917
|
-
},
|
|
917
|
+
}, po = { class: "inline-block font-semibold text-lg text-gray-800 dark:text-neutral-200" }, ho = { class: "flex flex-col gap-1" }, fo = { class: "flex flex-col gap-1 p-5 pt-0" }, go = ["innerHTML"], vo = {
|
|
918
918
|
__name: "vs-info-widget",
|
|
919
919
|
props: {
|
|
920
920
|
config: {
|
|
@@ -926,29 +926,29 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
926
926
|
const t = e, o = M(() => {
|
|
927
927
|
var i;
|
|
928
928
|
return ((i = t.config) == null ? void 0 : i.title) || "";
|
|
929
|
-
}),
|
|
929
|
+
}), s = M(() => {
|
|
930
930
|
var i;
|
|
931
931
|
return ((i = t.config) == null ? void 0 : i.content) || "";
|
|
932
|
-
}),
|
|
932
|
+
}), n = M(() => {
|
|
933
933
|
var i;
|
|
934
934
|
return ((i = t.config) == null ? void 0 : i.goTo) || [];
|
|
935
935
|
});
|
|
936
936
|
return (i, d) => {
|
|
937
937
|
var g, l;
|
|
938
938
|
const v = G("router-link");
|
|
939
|
-
return c(), p("div",
|
|
940
|
-
o.value || (g =
|
|
941
|
-
r("h2",
|
|
942
|
-
(l =
|
|
939
|
+
return c(), p("div", co, [
|
|
940
|
+
o.value || (g = n.value) != null && g.length ? (c(), p("div", uo, [
|
|
941
|
+
r("h2", po, S(o.value), 1),
|
|
942
|
+
(l = n.value) != null && l.length ? (c(), X(We(Ie), {
|
|
943
943
|
key: 0,
|
|
944
944
|
placement: "bottom"
|
|
945
945
|
}, {
|
|
946
|
-
reference:
|
|
947
|
-
|
|
946
|
+
reference: W(() => [
|
|
947
|
+
Z(We(Ie), {
|
|
948
948
|
trigger: "hover",
|
|
949
949
|
placement: "right"
|
|
950
950
|
}, {
|
|
951
|
-
reference:
|
|
951
|
+
reference: W(() => [...d[0] || (d[0] = [
|
|
952
952
|
r("div", { class: "flex items-center justify-center h-8 w-8 transition-colors rounded-full hover:bg-gray-100 cursor-pointer" }, [
|
|
953
953
|
r("svg", {
|
|
954
954
|
width: "16",
|
|
@@ -978,15 +978,15 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
978
978
|
])
|
|
979
979
|
], -1)
|
|
980
980
|
])]),
|
|
981
|
-
default:
|
|
981
|
+
default: W(() => [
|
|
982
982
|
d[1] || (d[1] = ae(" Перейти на карту ", -1))
|
|
983
983
|
]),
|
|
984
984
|
_: 1
|
|
985
985
|
})
|
|
986
986
|
]),
|
|
987
|
-
default:
|
|
988
|
-
r("div",
|
|
989
|
-
(c(!0), p(
|
|
987
|
+
default: W(() => [
|
|
988
|
+
r("div", ho, [
|
|
989
|
+
(c(!0), p(A, null, N(n.value, (u) => (c(), p("div", {
|
|
990
990
|
key: u.label
|
|
991
991
|
}, [
|
|
992
992
|
u.url ? (c(), X(v, {
|
|
@@ -994,45 +994,45 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
994
994
|
to: u.url,
|
|
995
995
|
class: "text-sm text-gray-800 dark:text-neutral-200 hover:bg-gray-100 hover:text-blue-600 transition-colors rounded px-2 py-1 block"
|
|
996
996
|
}, {
|
|
997
|
-
default:
|
|
997
|
+
default: W(() => [
|
|
998
998
|
ae(S(u.label), 1)
|
|
999
999
|
]),
|
|
1000
1000
|
_: 2
|
|
1001
|
-
}, 1032, ["to"])) :
|
|
1001
|
+
}, 1032, ["to"])) : j("", !0)
|
|
1002
1002
|
]))), 128))
|
|
1003
1003
|
])
|
|
1004
1004
|
]),
|
|
1005
1005
|
_: 1
|
|
1006
|
-
})) :
|
|
1007
|
-
])) :
|
|
1008
|
-
r("div",
|
|
1009
|
-
r("div", { innerHTML:
|
|
1006
|
+
})) : j("", !0)
|
|
1007
|
+
])) : j("", !0),
|
|
1008
|
+
r("div", fo, [
|
|
1009
|
+
r("div", { innerHTML: s.value }, null, 8, go)
|
|
1010
1010
|
])
|
|
1011
1011
|
]);
|
|
1012
1012
|
};
|
|
1013
1013
|
}
|
|
1014
|
-
},
|
|
1014
|
+
}, mo = /* @__PURE__ */ H(vo, [["__scopeId", "data-v-629caa82"]]), yo = { class: "w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative overflow-hidden" }, bo = {
|
|
1015
1015
|
key: 0,
|
|
1016
1016
|
class: "p-5 pb-3 flex justify-between items-center"
|
|
1017
|
-
},
|
|
1017
|
+
}, wo = { class: "inline-block font-semibold text-lg text-gray-800" }, xo = {
|
|
1018
1018
|
key: 1,
|
|
1019
1019
|
class: "flex"
|
|
1020
|
-
},
|
|
1020
|
+
}, _o = { class: "flex items-center mx-[8px]" }, ko = { class: "min-h-[34px] max-h-[34px] overflow-hidden min-w-[34px] flex justify-center items-center bg-stone-100 text-stone-800 py-2 px-3 text-sm rounded-lg" }, Lo = { class: "min-h-[34px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm" }, Co = { class: "flex flex-col justify-between pb-5 px-5 h-full overflow-y-auto flex-1 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent" }, $o = {
|
|
1021
1021
|
key: 0,
|
|
1022
1022
|
class: "text-center"
|
|
1023
|
-
},
|
|
1023
|
+
}, Io = {
|
|
1024
1024
|
key: 1,
|
|
1025
1025
|
class: "text-red-500"
|
|
1026
|
-
},
|
|
1026
|
+
}, Vo = { key: 2 }, So = ["innerHTML"], jo = {
|
|
1027
1027
|
key: 1,
|
|
1028
1028
|
class: "flow-root"
|
|
1029
|
-
}, Fo = { class: "-my-3 divide-y divide-gray-100 text-sm" },
|
|
1029
|
+
}, Fo = { class: "-my-3 divide-y divide-gray-100 text-sm" }, Po = { class: "font-medium text-gray-900" }, Eo = { class: "text-gray-700 sm:col-span-2" }, Mo = {
|
|
1030
1030
|
key: 2,
|
|
1031
1031
|
class: "vs-map-card-info__nodata"
|
|
1032
|
-
},
|
|
1032
|
+
}, To = {
|
|
1033
1033
|
key: 3,
|
|
1034
1034
|
class: "pt-4 flex justify-end"
|
|
1035
|
-
},
|
|
1035
|
+
}, zo = ["href"], ot = {
|
|
1036
1036
|
__name: "vs-card-widget",
|
|
1037
1037
|
props: {
|
|
1038
1038
|
config: {
|
|
@@ -1046,12 +1046,12 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1046
1046
|
},
|
|
1047
1047
|
emits: ["close", "content-resize"],
|
|
1048
1048
|
setup(e, { emit: t }) {
|
|
1049
|
-
const o = e,
|
|
1049
|
+
const o = e, s = t, n = M(() => {
|
|
1050
1050
|
var T;
|
|
1051
1051
|
return ((T = o.config) == null ? void 0 : T.title) || "";
|
|
1052
1052
|
}), i = M(
|
|
1053
1053
|
() => !!(typeof window.app == "object" && window.app && window.app.config)
|
|
1054
|
-
), d =
|
|
1054
|
+
), d = B([]), v = B(!1), g = B(null), l = B(0), u = M(() => l.value + 1), a = M(() => {
|
|
1055
1055
|
var T;
|
|
1056
1056
|
return ((T = o.info) == null ? void 0 : T.length) || 0;
|
|
1057
1057
|
}), m = M(() => d.value[l.value]), h = M(() => {
|
|
@@ -1060,46 +1060,46 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1060
1060
|
return !T || !k ? {} : k.reduce((_, D) => (!D.hide && !["geom", "geodata", "id"].includes(D.name) && (_[D.ua] = T[D.name] ?? "-"), _), {});
|
|
1061
1061
|
});
|
|
1062
1062
|
async function f() {
|
|
1063
|
-
var T, k, _, D, le,
|
|
1063
|
+
var T, k, _, D, le, pe;
|
|
1064
1064
|
v.value = !0, g.value = null;
|
|
1065
1065
|
try {
|
|
1066
|
-
const
|
|
1066
|
+
const oe = {
|
|
1067
1067
|
id: (T = o.cardValues) == null ? void 0 : T.id,
|
|
1068
1068
|
layer: typeof ((k = o.cardValues) == null ? void 0 : k.layer) == "object" ? (D = (_ = o.cardValues) == null ? void 0 : _.layer) == null ? void 0 : D.id : (le = o.cardValues) == null ? void 0 : le.layer,
|
|
1069
|
-
map: (
|
|
1070
|
-
},
|
|
1071
|
-
d.value[l.value] =
|
|
1072
|
-
} catch (
|
|
1073
|
-
g.value = (
|
|
1069
|
+
map: (pe = o.cardValues) == null ? void 0 : pe.map
|
|
1070
|
+
}, De = await fetch("/api/map-format?" + new URLSearchParams(oe)).then((Ue) => Ue.json());
|
|
1071
|
+
d.value[l.value] = De;
|
|
1072
|
+
} catch (oe) {
|
|
1073
|
+
g.value = (oe == null ? void 0 : oe.message) || "Помилка запиту";
|
|
1074
1074
|
} finally {
|
|
1075
|
-
v.value = !1, await
|
|
1075
|
+
v.value = !1, await Ee(), s("content-resize");
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
1078
|
function L() {
|
|
1079
1079
|
l.value < o.info.length - 1 && (l.value += 1, d.value[l.value] || f());
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function F() {
|
|
1082
1082
|
l.value > 0 && (l.value -= 1, d.value[l.value] || f());
|
|
1083
1083
|
}
|
|
1084
1084
|
return xe(async () => {
|
|
1085
|
-
await
|
|
1086
|
-
}),
|
|
1085
|
+
await Ee(), f();
|
|
1086
|
+
}), fe(
|
|
1087
1087
|
() => o.info,
|
|
1088
1088
|
() => {
|
|
1089
|
-
l.value = 0, f(),
|
|
1089
|
+
l.value = 0, f(), s("content-resize");
|
|
1090
1090
|
},
|
|
1091
1091
|
{ deep: !0 }
|
|
1092
|
-
),
|
|
1093
|
-
await
|
|
1092
|
+
), fe([() => o.cardValues, () => o.config], async () => {
|
|
1093
|
+
await Ee(), f(), s("content-resize");
|
|
1094
1094
|
}), (T, k) => {
|
|
1095
1095
|
var _, D;
|
|
1096
|
-
return c(), p("div",
|
|
1097
|
-
|
|
1098
|
-
r("h2",
|
|
1096
|
+
return c(), p("div", yo, [
|
|
1097
|
+
n.value ? (c(), p("div", bo, [
|
|
1098
|
+
r("h2", wo, S(n.value), 1),
|
|
1099
1099
|
r("button", {
|
|
1100
1100
|
type: "button",
|
|
1101
1101
|
class: "size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600 ml-2",
|
|
1102
|
-
onClick: k[0] || (k[0] = (le) =>
|
|
1102
|
+
onClick: k[0] || (k[0] = (le) => s("close"))
|
|
1103
1103
|
}, [...k[1] || (k[1] = [
|
|
1104
1104
|
r("svg", {
|
|
1105
1105
|
class: "shrink-0 size-4 cursor-pointer",
|
|
@@ -1117,19 +1117,19 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1117
1117
|
r("path", { d: "m6 6 12 12" })
|
|
1118
1118
|
], -1)
|
|
1119
1119
|
])])
|
|
1120
|
-
])) :
|
|
1121
|
-
a.value > 1 ? (c(), p("div",
|
|
1120
|
+
])) : j("", !0),
|
|
1121
|
+
a.value > 1 ? (c(), p("div", xo, [
|
|
1122
1122
|
r("button", {
|
|
1123
1123
|
type: "button",
|
|
1124
1124
|
class: K([{
|
|
1125
1125
|
"opacity-flex items-center justify-between border-b px-[16px] py-[8px]50 pointer-events-none": u.value === 1
|
|
1126
1126
|
}, "min-h-[34px] min-w-[34px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"]),
|
|
1127
|
-
onClick:
|
|
1127
|
+
onClick: F
|
|
1128
1128
|
}, " ◀ ", 2),
|
|
1129
|
-
r("div",
|
|
1130
|
-
r("span",
|
|
1129
|
+
r("div", _o, [
|
|
1130
|
+
r("span", ko, S(u.value), 1),
|
|
1131
1131
|
k[2] || (k[2] = r("span", { class: "min-h-[34px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm" }, "з", -1)),
|
|
1132
|
-
r("span",
|
|
1132
|
+
r("span", Lo, S(a.value), 1)
|
|
1133
1133
|
]),
|
|
1134
1134
|
r("button", {
|
|
1135
1135
|
type: "button",
|
|
@@ -1138,51 +1138,51 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1138
1138
|
"opacity-50 pointer-events-none": u.value === a.value
|
|
1139
1139
|
}, "min-h-[34px] min-w-[34px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"])
|
|
1140
1140
|
}, " ▶ ", 2)
|
|
1141
|
-
])) :
|
|
1142
|
-
r("div",
|
|
1143
|
-
v.value ? (c(), p("div",
|
|
1141
|
+
])) : j("", !0),
|
|
1142
|
+
r("div", Co, [
|
|
1143
|
+
v.value ? (c(), p("div", $o, "Завантаження даних...")) : g.value ? (c(), p("div", Io, " Помилка завантаження даних ")) : (c(), p("div", Vo, [
|
|
1144
1144
|
(_ = m.value) != null && _.html ? (c(), p("div", {
|
|
1145
1145
|
key: 0,
|
|
1146
1146
|
innerHTML: m.value.html,
|
|
1147
1147
|
class: "custom-table-html border-b"
|
|
1148
|
-
}, null, 8,
|
|
1148
|
+
}, null, 8, So)) : Object.keys(h.value).length ? (c(), p("div", jo, [
|
|
1149
1149
|
r("dl", Fo, [
|
|
1150
|
-
(c(!0), p(
|
|
1151
|
-
key:
|
|
1150
|
+
(c(!0), p(A, null, N(h.value, (le, pe) => (c(), p("div", {
|
|
1151
|
+
key: pe,
|
|
1152
1152
|
class: "grid grid-cols-1 gap-1 py-3 even:bg-gray-50 sm:grid-cols-3 sm:gap-4"
|
|
1153
1153
|
}, [
|
|
1154
|
-
r("dt",
|
|
1155
|
-
r("dd",
|
|
1154
|
+
r("dt", Po, S(pe), 1),
|
|
1155
|
+
r("dd", Eo, S(le), 1)
|
|
1156
1156
|
]))), 128))
|
|
1157
1157
|
])
|
|
1158
|
-
])) : (c(), p("div",
|
|
1158
|
+
])) : (c(), p("div", Mo, "Даних не знайдено."))
|
|
1159
1159
|
])),
|
|
1160
|
-
(D = m.value) != null && D.cardInterface && i.value ? (c(), p("div",
|
|
1160
|
+
(D = m.value) != null && D.cardInterface && i.value ? (c(), p("div", To, [
|
|
1161
1161
|
r("a", {
|
|
1162
1162
|
href: `/card/${m.value.cardInterface}/${m.value.id}`,
|
|
1163
1163
|
target: "_blank",
|
|
1164
1164
|
class: "w-full !cursor-pointer text-center gap-2 px-3 py-1.5 bg-blue-600 text-white rounded hover:bg-blue-700 transition text-sm font-medium"
|
|
1165
|
-
}, " Перейти в реєстр ", 8,
|
|
1166
|
-
])) :
|
|
1165
|
+
}, " Перейти в реєстр ", 8, zo)
|
|
1166
|
+
])) : j("", !0)
|
|
1167
1167
|
])
|
|
1168
1168
|
]);
|
|
1169
1169
|
};
|
|
1170
1170
|
}
|
|
1171
|
-
},
|
|
1171
|
+
}, Bo = { class: "size-full flex flex-col bg-white border border-gray-200 shadow-2xs rounded-xl dark:bg-neutral-800 dark:border-neutral-700" }, Ao = {
|
|
1172
1172
|
key: 0,
|
|
1173
1173
|
class: "p-5 pb-0 items-center"
|
|
1174
|
-
},
|
|
1174
|
+
}, Oo = { class: "inline-block font-semibold text-lg text-gray-800 dark:text-neutral-200" }, Do = { class: "h-full p-5" }, Uo = { class: "h-full flex flex-col justify-between space-y-4" }, Ro = { class: "space-y-4" }, Ho = {
|
|
1175
1175
|
key: 0,
|
|
1176
1176
|
class: "flex gap-x-1 w-full h-2.5 rounded-full overflow-hidden"
|
|
1177
|
-
},
|
|
1177
|
+
}, No = ["aria-valuenow"], Zo = { class: "text-sm text-gray-500 px-2 w-full py-2 cursor-pointer !flex flex-row items-center rounded-lg group hover:bg-gray-100" }, Wo = ["for"], qo = {
|
|
1178
1178
|
key: 0,
|
|
1179
1179
|
width: "16",
|
|
1180
1180
|
height: "auto",
|
|
1181
1181
|
src: "data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTYgMTYnIGZpbGw9J3doaXRlJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxwYXRoIGQ9J00xMi4yMDcgNC43OTNhMSAxIDAgMDEwIDEuNDE0bC01IDVhMSAxIDAgMDEtMS40MTQgMGwtMi0yYTEgMSAwIDAxMS40MTQtMS40MTRMNi41IDkuMDg2bDQuMjkzLTQuMjkzYTEgMSAwIDAxMS40MTQgMHonLz48L3N2Zz4="
|
|
1182
|
-
},
|
|
1182
|
+
}, Go = ["id", "onUpdate:modelValue"], Jo = { class: "ml-2 text-gray-800 dark:text-neutral-200" }, Qo = {
|
|
1183
1183
|
key: 0,
|
|
1184
1184
|
class: "ms-auto text-xs text-gray-500 dark:text-neutral-500"
|
|
1185
|
-
},
|
|
1185
|
+
}, Yo = {
|
|
1186
1186
|
__name: "vs-attributre-widget",
|
|
1187
1187
|
props: {
|
|
1188
1188
|
config: {
|
|
@@ -1198,14 +1198,14 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1198
1198
|
const t = e, o = M(() => {
|
|
1199
1199
|
var g;
|
|
1200
1200
|
return ((g = t.config) == null ? void 0 : g.title) || "";
|
|
1201
|
-
}),
|
|
1201
|
+
}), s = B([]), n = M(() => t.config.layer.style.rules.some(
|
|
1202
1202
|
(g) => g.count !== void 0
|
|
1203
1203
|
)), i = M(() => t.config.layer.style.rules.reduce(
|
|
1204
1204
|
(g, l) => g + (l.count || 0),
|
|
1205
1205
|
0
|
|
1206
1206
|
)), d = (g) => !g || i.value === 0 ? 0 : Math.round(g / i.value * 100), v = () => {
|
|
1207
1207
|
const l = t.config.layer.style.rules.filter(
|
|
1208
|
-
(u, a) =>
|
|
1208
|
+
(u, a) => s.value[a]
|
|
1209
1209
|
).map((u) => u.id || u.value).join(",");
|
|
1210
1210
|
if (t.config.layer.id) {
|
|
1211
1211
|
const u = t.map.getSource(t.config.layer.id);
|
|
@@ -1217,23 +1217,23 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1217
1217
|
};
|
|
1218
1218
|
return xe(() => {
|
|
1219
1219
|
var g;
|
|
1220
|
-
(g = t.config) != null && g.layer && (we(t.map, t.config.layer),
|
|
1220
|
+
(g = t.config) != null && g.layer && (we(t.map, t.config.layer), s.value = new Array(t.config.layer.style.rules.length).fill(
|
|
1221
1221
|
!1
|
|
1222
1222
|
));
|
|
1223
|
-
}), (g, l) => (c(), p("div",
|
|
1223
|
+
}), (g, l) => (c(), p("div", Bo, [
|
|
1224
1224
|
o.value ? (c(), p("div", Ao, [
|
|
1225
1225
|
r("div", null, [
|
|
1226
|
-
r("h2",
|
|
1226
|
+
r("h2", Oo, S(o.value), 1)
|
|
1227
1227
|
])
|
|
1228
|
-
])) :
|
|
1229
|
-
r("div",
|
|
1230
|
-
r("div",
|
|
1231
|
-
r("div",
|
|
1232
|
-
|
|
1233
|
-
(c(!0), p(
|
|
1228
|
+
])) : j("", !0),
|
|
1229
|
+
r("div", Do, [
|
|
1230
|
+
r("div", Uo, [
|
|
1231
|
+
r("div", Ro, [
|
|
1232
|
+
n.value ? (c(), p("div", Ho, [
|
|
1233
|
+
(c(!0), p(A, null, N(e.config.layer.style.rules, (u, a) => (c(), p("div", {
|
|
1234
1234
|
key: a,
|
|
1235
1235
|
class: "flex flex-col justify-center overflow-hidden text-xs text-white text-center whitespace-nowrap",
|
|
1236
|
-
style:
|
|
1236
|
+
style: he({
|
|
1237
1237
|
width: `${d(u.count)}%`,
|
|
1238
1238
|
backgroundColor: u.color
|
|
1239
1239
|
}),
|
|
@@ -1241,37 +1241,37 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1241
1241
|
"aria-valuenow": d(u.count),
|
|
1242
1242
|
"aria-valuemin": "0",
|
|
1243
1243
|
"aria-valuemax": "100"
|
|
1244
|
-
}, null, 12,
|
|
1245
|
-
])) :
|
|
1244
|
+
}, null, 12, No))), 128))
|
|
1245
|
+
])) : j("", !0),
|
|
1246
1246
|
r("ul", null, [
|
|
1247
|
-
(c(!0), p(
|
|
1248
|
-
r("div",
|
|
1247
|
+
(c(!0), p(A, null, N(e.config.layer.style.rules, (u, a) => (c(), p("li", { key: a }, [
|
|
1248
|
+
r("div", Zo, [
|
|
1249
1249
|
r("label", {
|
|
1250
1250
|
for: `filter-${a}`,
|
|
1251
1251
|
class: "flex items-center w-full cursor-pointer"
|
|
1252
1252
|
}, [
|
|
1253
1253
|
r("div", {
|
|
1254
1254
|
class: "w-[18px] h-[18px] border rounded-[4px] flex items-center justify-center",
|
|
1255
|
-
style:
|
|
1256
|
-
background:
|
|
1257
|
-
borderColor:
|
|
1255
|
+
style: he({
|
|
1256
|
+
background: s.value[a] ? u.color || "#2563eb" : "#fff",
|
|
1257
|
+
borderColor: s.value[a] ? u.color || "#2563eb" : u.color || "#d9d9d9"
|
|
1258
1258
|
})
|
|
1259
1259
|
}, [
|
|
1260
|
-
|
|
1260
|
+
s.value[a] ? (c(), p("img", qo)) : j("", !0)
|
|
1261
1261
|
], 4),
|
|
1262
1262
|
ne(r("input", {
|
|
1263
1263
|
type: "checkbox",
|
|
1264
1264
|
id: `filter-${a}`,
|
|
1265
|
-
"onUpdate:modelValue": (m) =>
|
|
1265
|
+
"onUpdate:modelValue": (m) => s.value[a] = m,
|
|
1266
1266
|
onChange: v,
|
|
1267
1267
|
class: "hidden",
|
|
1268
1268
|
disabled: !1
|
|
1269
|
-
}, null, 40,
|
|
1270
|
-
[qe,
|
|
1269
|
+
}, null, 40, Go), [
|
|
1270
|
+
[qe, s.value[a]]
|
|
1271
1271
|
]),
|
|
1272
|
-
r("span",
|
|
1273
|
-
|
|
1274
|
-
], 8,
|
|
1272
|
+
r("span", Jo, S(u.label || u.text), 1),
|
|
1273
|
+
n.value ? (c(), p("span", Qo, "(" + S(u.count) + ")", 1)) : j("", !0)
|
|
1274
|
+
], 8, Wo)
|
|
1275
1275
|
])
|
|
1276
1276
|
]))), 128))
|
|
1277
1277
|
])
|
|
@@ -1280,17 +1280,58 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1280
1280
|
])
|
|
1281
1281
|
]));
|
|
1282
1282
|
}
|
|
1283
|
-
},
|
|
1283
|
+
}, Ko = {}, Xo = {
|
|
1284
|
+
width: "24",
|
|
1285
|
+
height: "24",
|
|
1286
|
+
viewBox: "0 0 24 24",
|
|
1287
|
+
fill: "none",
|
|
1288
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1289
|
+
};
|
|
1290
|
+
function er(e, t) {
|
|
1291
|
+
return c(), p("svg", Xo, [...t[0] || (t[0] = [
|
|
1292
|
+
r("path", {
|
|
1293
|
+
d: "M11 19C15.4183 19 19 15.4183 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19Z",
|
|
1294
|
+
stroke: "black",
|
|
1295
|
+
"stroke-linecap": "round",
|
|
1296
|
+
"stroke-linejoin": "round"
|
|
1297
|
+
}, null, -1),
|
|
1298
|
+
r("path", {
|
|
1299
|
+
d: "M21.0002 21L16.7002 16.7",
|
|
1300
|
+
stroke: "black",
|
|
1301
|
+
"stroke-linecap": "round",
|
|
1302
|
+
"stroke-linejoin": "round"
|
|
1303
|
+
}, null, -1)
|
|
1304
|
+
])]);
|
|
1305
|
+
}
|
|
1306
|
+
const tr = /* @__PURE__ */ H(Ko, [["render", er]]), or = {}, rr = {
|
|
1307
|
+
class: "shrink-0 size-4",
|
|
1308
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1309
|
+
width: "24",
|
|
1310
|
+
height: "24",
|
|
1311
|
+
viewBox: "0 0 24 24",
|
|
1312
|
+
fill: "none",
|
|
1313
|
+
stroke: "currentColor",
|
|
1314
|
+
"stroke-width": "2",
|
|
1315
|
+
"stroke-linecap": "round",
|
|
1316
|
+
"stroke-linejoin": "round"
|
|
1317
|
+
};
|
|
1318
|
+
function sr(e, t) {
|
|
1319
|
+
return c(), p("svg", rr, [...t[0] || (t[0] = [
|
|
1320
|
+
r("path", { d: "M18 6 6 18" }, null, -1),
|
|
1321
|
+
r("path", { d: "m6 6 12 12" }, null, -1)
|
|
1322
|
+
])]);
|
|
1323
|
+
}
|
|
1324
|
+
const rt = /* @__PURE__ */ H(or, [["render", sr]]), nr = { class: "hover:bg-gray-100 rounded-lg flex items-center ml-[20px] py-[8px] px-[8px]" }, ir = ["for"], ar = { class: "custom-checkbox-wrapper" }, lr = ["id", "checked"], cr = { class: "custom-checkbox" }, dr = {
|
|
1284
1325
|
key: 0,
|
|
1285
1326
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1286
1327
|
width: "12",
|
|
1287
1328
|
height: "8",
|
|
1288
1329
|
viewBox: "0 0 12 8",
|
|
1289
1330
|
fill: "none"
|
|
1290
|
-
},
|
|
1331
|
+
}, ur = { class: "flex items-center justify-between ml-2 w-full" }, pr = ["title"], hr = {
|
|
1291
1332
|
key: 0,
|
|
1292
1333
|
class: "text-xs opacity-60 text-[#4b5563]"
|
|
1293
|
-
},
|
|
1334
|
+
}, fr = {
|
|
1294
1335
|
__name: "vs-map-catalog-item",
|
|
1295
1336
|
props: {
|
|
1296
1337
|
layer: {
|
|
@@ -1308,49 +1349,49 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1308
1349
|
},
|
|
1309
1350
|
emits: ["select", "remove"],
|
|
1310
1351
|
setup(e, { emit: t }) {
|
|
1311
|
-
const o = e,
|
|
1352
|
+
const o = e, s = t, n = M(() => o.selectedLayers.some((v) => v.id === o.layer.id)), i = (v) => Intl.NumberFormat("uk", {
|
|
1312
1353
|
notation: "compact"
|
|
1313
1354
|
}).format(v), d = (v) => {
|
|
1314
|
-
|
|
1355
|
+
s(v ? "select" : "remove", o.layer);
|
|
1315
1356
|
};
|
|
1316
1357
|
return (v, g) => {
|
|
1317
1358
|
var l, u, a, m, h;
|
|
1318
|
-
return c(), p("div",
|
|
1359
|
+
return c(), p("div", nr, [
|
|
1319
1360
|
r("label", {
|
|
1320
1361
|
class: "flex items-center w-full cursor-pointer",
|
|
1321
1362
|
for: e.layer.id
|
|
1322
1363
|
}, [
|
|
1323
|
-
r("div",
|
|
1364
|
+
r("div", ar, [
|
|
1324
1365
|
r("input", {
|
|
1325
1366
|
id: e.layer.id,
|
|
1326
1367
|
type: "checkbox",
|
|
1327
|
-
checked:
|
|
1368
|
+
checked: n.value,
|
|
1328
1369
|
onChange: g[0] || (g[0] = (f) => d(f.target.checked)),
|
|
1329
1370
|
class: "custom-checkbox-input"
|
|
1330
|
-
}, null, 40,
|
|
1331
|
-
r("div",
|
|
1332
|
-
|
|
1371
|
+
}, null, 40, lr),
|
|
1372
|
+
r("div", cr, [
|
|
1373
|
+
n.value ? (c(), p("svg", dr, [...g[1] || (g[1] = [
|
|
1333
1374
|
r("path", {
|
|
1334
1375
|
d: "M10.6663 1L4.24967 7.41667L1.33301 4.5",
|
|
1335
1376
|
stroke: "#fff",
|
|
1336
1377
|
"stroke-linecap": "round",
|
|
1337
1378
|
"stroke-linejoin": "round"
|
|
1338
1379
|
}, null, -1)
|
|
1339
|
-
])])) :
|
|
1380
|
+
])])) : j("", !0)
|
|
1340
1381
|
])
|
|
1341
1382
|
]),
|
|
1342
|
-
r("div",
|
|
1383
|
+
r("div", ur, [
|
|
1343
1384
|
r("div", {
|
|
1344
1385
|
class: "whitespace-nowrap text text-ellipsis max-w-[260px] overflow-hidden text-[13px] text-[#4b5563]",
|
|
1345
1386
|
title: (l = e.layer) == null ? void 0 : l.name
|
|
1346
|
-
}, S(((u = e.layer) == null ? void 0 : u.name) || ((a = e.layer) == null ? void 0 : a.title)), 9,
|
|
1347
|
-
isNaN(i((m = e.layer) == null ? void 0 : m.count)) ?
|
|
1387
|
+
}, S(((u = e.layer) == null ? void 0 : u.name) || ((a = e.layer) == null ? void 0 : a.title)), 9, pr),
|
|
1388
|
+
isNaN(i((m = e.layer) == null ? void 0 : m.count)) ? j("", !0) : (c(), p("div", hr, S(i((h = e.layer) == null ? void 0 : h.count)), 1))
|
|
1348
1389
|
])
|
|
1349
|
-
], 8,
|
|
1390
|
+
], 8, ir)
|
|
1350
1391
|
]);
|
|
1351
1392
|
};
|
|
1352
1393
|
}
|
|
1353
|
-
},
|
|
1394
|
+
}, gr = /* @__PURE__ */ H(fr, [["__scopeId", "data-v-b96f3537"]]), vr = {}, mr = {
|
|
1354
1395
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1355
1396
|
width: "16",
|
|
1356
1397
|
height: "16",
|
|
@@ -1362,8 +1403,8 @@ const lo = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1362
1403
|
"stroke-linejoin": "round",
|
|
1363
1404
|
class: "lucide lucide-zoom-in"
|
|
1364
1405
|
};
|
|
1365
|
-
function
|
|
1366
|
-
return c(), p("svg",
|
|
1406
|
+
function yr(e, t) {
|
|
1407
|
+
return c(), p("svg", mr, [...t[0] || (t[0] = [
|
|
1367
1408
|
r("circle", {
|
|
1368
1409
|
cx: "11",
|
|
1369
1410
|
cy: "11",
|
|
@@ -1389,7 +1430,7 @@ function dr(e, t) {
|
|
|
1389
1430
|
}, null, -1)
|
|
1390
1431
|
])]);
|
|
1391
1432
|
}
|
|
1392
|
-
const
|
|
1433
|
+
const br = /* @__PURE__ */ H(vr, [["render", yr]]), wr = {}, xr = {
|
|
1393
1434
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1394
1435
|
width: "16",
|
|
1395
1436
|
height: "16",
|
|
@@ -1401,8 +1442,8 @@ const ur = /* @__PURE__ */ H(lr, [["render", dr]]), pr = {}, hr = {
|
|
|
1401
1442
|
"stroke-linejoin": "round",
|
|
1402
1443
|
class: "lucide lucide-info"
|
|
1403
1444
|
};
|
|
1404
|
-
function
|
|
1405
|
-
return c(), p("svg",
|
|
1445
|
+
function _r(e, t) {
|
|
1446
|
+
return c(), p("svg", xr, [...t[0] || (t[0] = [
|
|
1406
1447
|
r("circle", {
|
|
1407
1448
|
cx: "12",
|
|
1408
1449
|
cy: "12",
|
|
@@ -1412,7 +1453,7 @@ function fr(e, t) {
|
|
|
1412
1453
|
r("path", { d: "M12 8h.01" }, null, -1)
|
|
1413
1454
|
])]);
|
|
1414
1455
|
}
|
|
1415
|
-
const
|
|
1456
|
+
const kr = /* @__PURE__ */ H(wr, [["render", _r]]), Lr = {}, Cr = {
|
|
1416
1457
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1417
1458
|
width: "16",
|
|
1418
1459
|
height: "16",
|
|
@@ -1424,8 +1465,8 @@ const gr = /* @__PURE__ */ H(pr, [["render", fr]]), vr = {}, mr = {
|
|
|
1424
1465
|
"stroke-linejoin": "round",
|
|
1425
1466
|
class: "lucide lucide-table"
|
|
1426
1467
|
};
|
|
1427
|
-
function
|
|
1428
|
-
return c(), p("svg",
|
|
1468
|
+
function $r(e, t) {
|
|
1469
|
+
return c(), p("svg", Cr, [...t[0] || (t[0] = [
|
|
1429
1470
|
r("path", { d: "M12 3v18" }, null, -1),
|
|
1430
1471
|
r("rect", {
|
|
1431
1472
|
width: "18",
|
|
@@ -1438,7 +1479,7 @@ function yr(e, t) {
|
|
|
1438
1479
|
r("path", { d: "M3 15h18" }, null, -1)
|
|
1439
1480
|
])]);
|
|
1440
1481
|
}
|
|
1441
|
-
const
|
|
1482
|
+
const Ir = /* @__PURE__ */ H(Lr, [["render", $r]]), Vr = {}, Sr = {
|
|
1442
1483
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1443
1484
|
width: "16",
|
|
1444
1485
|
height: "16",
|
|
@@ -1450,12 +1491,12 @@ const br = /* @__PURE__ */ H(vr, [["render", yr]]), wr = {}, xr = {
|
|
|
1450
1491
|
"stroke-linejoin": "round",
|
|
1451
1492
|
class: "lucide lucide-trash2"
|
|
1452
1493
|
};
|
|
1453
|
-
function
|
|
1454
|
-
return c(), p("svg",
|
|
1455
|
-
|
|
1494
|
+
function jr(e, t) {
|
|
1495
|
+
return c(), p("svg", Sr, [...t[0] || (t[0] = [
|
|
1496
|
+
Ae('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>', 5)
|
|
1456
1497
|
])]);
|
|
1457
1498
|
}
|
|
1458
|
-
const
|
|
1499
|
+
const Fr = /* @__PURE__ */ H(Vr, [["render", jr]]), Pr = {}, Er = {
|
|
1459
1500
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1460
1501
|
width: "18",
|
|
1461
1502
|
height: "18",
|
|
@@ -1467,8 +1508,8 @@ const kr = /* @__PURE__ */ H(wr, [["render", _r]]), Lr = {}, Cr = {
|
|
|
1467
1508
|
"stroke-linejoin": "round",
|
|
1468
1509
|
class: "lucide lucide-more-vertical text-gray-600"
|
|
1469
1510
|
};
|
|
1470
|
-
function
|
|
1471
|
-
return c(), p("svg",
|
|
1511
|
+
function Mr(e, t) {
|
|
1512
|
+
return c(), p("svg", Er, [...t[0] || (t[0] = [
|
|
1472
1513
|
r("circle", {
|
|
1473
1514
|
cx: "12",
|
|
1474
1515
|
cy: "12",
|
|
@@ -1486,15 +1527,15 @@ function $r(e, t) {
|
|
|
1486
1527
|
}, null, -1)
|
|
1487
1528
|
])]);
|
|
1488
1529
|
}
|
|
1489
|
-
const
|
|
1530
|
+
const Tr = /* @__PURE__ */ H(Pr, [["render", Mr]]), zr = {}, Br = {
|
|
1490
1531
|
width: "6",
|
|
1491
1532
|
height: "10",
|
|
1492
1533
|
viewBox: "0 0 6 10",
|
|
1493
1534
|
fill: "none",
|
|
1494
1535
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1495
1536
|
};
|
|
1496
|
-
function
|
|
1497
|
-
return c(), p("svg",
|
|
1537
|
+
function Ar(e, t) {
|
|
1538
|
+
return c(), p("svg", Br, [...t[0] || (t[0] = [
|
|
1498
1539
|
r("path", {
|
|
1499
1540
|
d: "M1 9L5 5L1 1",
|
|
1500
1541
|
stroke: "currentColor",
|
|
@@ -1503,40 +1544,42 @@ function Fr(e, t) {
|
|
|
1503
1544
|
}, null, -1)
|
|
1504
1545
|
])]);
|
|
1505
1546
|
}
|
|
1506
|
-
const
|
|
1547
|
+
const Or = /* @__PURE__ */ H(zr, [["render", Ar]]), Dr = {}, Ur = {
|
|
1507
1548
|
width: "18",
|
|
1508
1549
|
height: "18",
|
|
1509
1550
|
viewBox: "0 0 24 24",
|
|
1510
1551
|
fill: "none",
|
|
1511
1552
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1512
1553
|
};
|
|
1513
|
-
function
|
|
1514
|
-
return c(), p("svg",
|
|
1515
|
-
|
|
1554
|
+
function Rr(e, t) {
|
|
1555
|
+
return c(), p("svg", Ur, [...t[0] || (t[0] = [
|
|
1556
|
+
Ae('<g clip-path="url(#clip0_231_103)"><path d="M12 20L9 21V12.5L4.52 7.572C4.18545 7.20393 4.00005 6.7244 4 6.227V4H20V6.172C19.9999 6.70239 19.7891 7.21101 19.414 7.586L15 12" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21.121 20.1209C21.5406 19.7014 21.8265 19.1668 21.9423 18.5849C22.0581 18.0029 21.9988 17.3997 21.7717 16.8514C21.5447 16.3032 21.1602 15.8346 20.6668 15.5049C20.1734 15.1752 19.5934 14.9993 19 14.9993C18.4066 14.9993 17.8266 15.1752 17.3332 15.5049C16.8398 15.8346 16.4553 16.3032 16.2283 16.8514C16.0012 17.3997 15.9419 18.0029 16.0577 18.5849C16.1735 19.1668 16.4594 19.7014 16.879 20.1209C17.297 20.5399 18.004 21.1659 19 21.9999C20.051 21.1099 20.759 20.4839 21.121 20.1209Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M19 18V18.01" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></g><defs><clipPath id="clip0_231_103"><rect width="24" height="24" fill="white"></rect></clipPath></defs>', 2)
|
|
1516
1557
|
])]);
|
|
1517
1558
|
}
|
|
1518
|
-
const
|
|
1519
|
-
function
|
|
1559
|
+
const Hr = /* @__PURE__ */ H(Dr, [["render", Rr]]);
|
|
1560
|
+
function Nr() {
|
|
1520
1561
|
const t = new URLSearchParams(window.location.search).get("layers");
|
|
1521
1562
|
return t ? t.split(",") : [];
|
|
1522
1563
|
}
|
|
1523
|
-
function
|
|
1564
|
+
function Zr(e) {
|
|
1524
1565
|
const t = new URLSearchParams(window.location.search);
|
|
1525
1566
|
e.length > 0 ? t.set("layers", e.join(",")) : t.delete("layers");
|
|
1526
1567
|
const o = `${window.location.pathname}?${t.toString()}`;
|
|
1527
1568
|
window.history.replaceState({}, "", o);
|
|
1528
1569
|
}
|
|
1529
|
-
const
|
|
1570
|
+
const Wr = {
|
|
1530
1571
|
components: {
|
|
1531
|
-
VsPopover:
|
|
1532
|
-
VsLayersItem:
|
|
1533
|
-
ZoomInIcon:
|
|
1534
|
-
InfoIcon:
|
|
1535
|
-
TableIcon:
|
|
1536
|
-
TrashIcon:
|
|
1537
|
-
DotsIcon:
|
|
1538
|
-
ChevronRightIcon:
|
|
1539
|
-
FilterIcon:
|
|
1572
|
+
VsPopover: Ie,
|
|
1573
|
+
VsLayersItem: gr,
|
|
1574
|
+
ZoomInIcon: br,
|
|
1575
|
+
InfoIcon: kr,
|
|
1576
|
+
TableIcon: Ir,
|
|
1577
|
+
TrashIcon: Fr,
|
|
1578
|
+
DotsIcon: Tr,
|
|
1579
|
+
ChevronRightIcon: Or,
|
|
1580
|
+
FilterIcon: Hr,
|
|
1581
|
+
closeIcon: rt,
|
|
1582
|
+
searchIcon: tr
|
|
1540
1583
|
},
|
|
1541
1584
|
props: {
|
|
1542
1585
|
center: { type: Array, default: () => [26.2516, 50.6199] },
|
|
@@ -1569,17 +1612,17 @@ const Br = {
|
|
|
1569
1612
|
},
|
|
1570
1613
|
async mounted() {
|
|
1571
1614
|
if (this.mounted = !0, await this.getLayers(), this.categories = this.layersCategories(), this.history) {
|
|
1572
|
-
const e =
|
|
1615
|
+
const e = Nr();
|
|
1573
1616
|
e.length > 0 && this.layers && (e.forEach((t) => {
|
|
1574
|
-
const o = this.layers.find((
|
|
1575
|
-
if (o && !this.selectedLayers.find((
|
|
1576
|
-
const
|
|
1617
|
+
const o = this.layers.find((s) => String(s.id) === t);
|
|
1618
|
+
if (o && !this.selectedLayers.find((s) => s.id === o.id)) {
|
|
1619
|
+
const s = {
|
|
1577
1620
|
...o,
|
|
1578
1621
|
visible: !0,
|
|
1579
1622
|
opacity: 100,
|
|
1580
1623
|
showFilters: !1
|
|
1581
1624
|
};
|
|
1582
|
-
this.selectedLayers.push(
|
|
1625
|
+
this.selectedLayers.push(s), we(this.map, s);
|
|
1583
1626
|
}
|
|
1584
1627
|
}), this.activeView = "selected");
|
|
1585
1628
|
}
|
|
@@ -1597,7 +1640,7 @@ const Br = {
|
|
|
1597
1640
|
// --- HISTORY: оновлення layers у URL ---
|
|
1598
1641
|
selectedLayers: {
|
|
1599
1642
|
handler(e) {
|
|
1600
|
-
this.history &&
|
|
1643
|
+
this.history && Zr(e.map((t) => t.id));
|
|
1601
1644
|
},
|
|
1602
1645
|
deep: !0
|
|
1603
1646
|
}
|
|
@@ -1608,7 +1651,7 @@ const Br = {
|
|
|
1608
1651
|
const e = await fetch("/api/map-catalog").then((o) => o.json()), t = (e.services || []).filter(
|
|
1609
1652
|
(o) => o.service_type !== "other"
|
|
1610
1653
|
);
|
|
1611
|
-
this.layers = [...t, ...e.rasters || []], this
|
|
1654
|
+
this.layers = [...t, ...e.rasters || []], this.rawCatalog = {
|
|
1612
1655
|
...e,
|
|
1613
1656
|
services: t
|
|
1614
1657
|
};
|
|
@@ -1665,17 +1708,17 @@ const Br = {
|
|
|
1665
1708
|
},
|
|
1666
1709
|
updateLayerOpacity(e) {
|
|
1667
1710
|
if (this.map) {
|
|
1668
|
-
const t = this.map.getStyle().layers.filter((
|
|
1669
|
-
t.forEach((
|
|
1670
|
-
|
|
1671
|
-
|
|
1711
|
+
const t = this.map.getStyle().layers.filter((s) => s.id.includes(e.id)), o = e.opacity / 100;
|
|
1712
|
+
t.forEach((s) => {
|
|
1713
|
+
s.type === "fill" ? (e.originalFillOpacity || (e.originalFillOpacity = this.map.getPaintProperty(s.id, "fill-opacity") || 1), this.map.setPaintProperty(
|
|
1714
|
+
s.id,
|
|
1672
1715
|
"fill-opacity",
|
|
1673
1716
|
e.originalFillOpacity * o
|
|
1674
|
-
)) :
|
|
1675
|
-
|
|
1717
|
+
)) : s.type === "raster" ? this.map.setPaintProperty(s.id, "raster-opacity", o) : s.type === "line" ? this.map.setPaintProperty(s.id, "line-opacity", o) : s.type === "circle" ? (this.map.setPaintProperty(s.id, "circle-opacity", o), this.map.setPaintProperty(
|
|
1718
|
+
s.id,
|
|
1676
1719
|
"circle-stroke-opacity",
|
|
1677
1720
|
o
|
|
1678
|
-
)) :
|
|
1721
|
+
)) : s.type === "symbol" && (this.map.setPaintProperty(s.id, "icon-opacity", o), this.map.setPaintProperty(s.id, "text-opacity", o));
|
|
1679
1722
|
});
|
|
1680
1723
|
}
|
|
1681
1724
|
},
|
|
@@ -1713,7 +1756,7 @@ const Br = {
|
|
|
1713
1756
|
async handleFilterChange({ url: e }, t) {
|
|
1714
1757
|
const o = this.map.getSource(t.id);
|
|
1715
1758
|
if (o) {
|
|
1716
|
-
const
|
|
1759
|
+
const n = o.tiles[0].split("?filter=")[0], i = e ? `${n}?filter=${e}` : n;
|
|
1717
1760
|
o.setTiles([i]);
|
|
1718
1761
|
}
|
|
1719
1762
|
},
|
|
@@ -1770,9 +1813,9 @@ const Br = {
|
|
|
1770
1813
|
const t = this.selectedLayers[this.draggedLayerIndex];
|
|
1771
1814
|
if (this.selectedLayers.splice(this.draggedLayerIndex, 1), this.selectedLayers.splice(e, 0, t), this.draggedLayerIndex = null, this.map && this.selectedLayers.length > 1)
|
|
1772
1815
|
for (let o = this.selectedLayers.length - 1; o >= 0; o--) {
|
|
1773
|
-
const
|
|
1774
|
-
|
|
1775
|
-
|
|
1816
|
+
const s = this.selectedLayers[o];
|
|
1817
|
+
s.visible && this.map.getStyle().layers.find((n) => n.id.includes(s.id)) && this.map.getStyle().layers.forEach((n) => {
|
|
1818
|
+
n.id.includes(s.id) && this.map.moveLayer(n.id);
|
|
1776
1819
|
});
|
|
1777
1820
|
}
|
|
1778
1821
|
},
|
|
@@ -1780,37 +1823,37 @@ const Br = {
|
|
|
1780
1823
|
this.draggedLayerIndex = null;
|
|
1781
1824
|
}
|
|
1782
1825
|
}
|
|
1783
|
-
},
|
|
1826
|
+
}, qr = { class: "w-full max-w-md mx-auto p-4 bg-white border border-gray-200 rounded-lg shadow-sm" }, Gr = { class: "flex items-center justify-between mb-4" }, Jr = { class: "flex items-center gap-2" }, Qr = { class: "text-lg font-semibold text-gray-800" }, Yr = { key: 0 }, Kr = { key: 1 }, Xr = { class: "flex mb-4 border-b border-gray-200" }, es = { key: 0 }, ts = { class: "mb-4" }, os = {
|
|
1784
1827
|
key: 0,
|
|
1785
1828
|
class: "space-y-2 max-h-[400px] overflow-y-auto pr-1 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"
|
|
1786
|
-
},
|
|
1829
|
+
}, rs = ["onDragstart", "onDragover", "onDrop"], ss = { class: "flex items-center justify-between" }, ns = { class: "flex items-center gap-2 cursor-move" }, is = ["onUpdate:modelValue", "onChange"], as = { class: "text-gray-800" }, ls = { class: "flex items-center gap-2" }, cs = { class: "relative" }, ds = { class: "flex items-center gap-2" }, us = ["onUpdate:modelValue", "onInput"], ps = { class: "text-xs text-gray-600 whitespace-nowrap" }, hs = ["onClick"], fs = { class: "relative" }, gs = { class: "w-48" }, vs = {
|
|
1787
1830
|
key: 0,
|
|
1788
1831
|
class: "my-1 border-gray-200"
|
|
1789
|
-
},
|
|
1832
|
+
}, ms = ["disabled", "onClick"], ys = {
|
|
1790
1833
|
class: "p-1 rounded-full hover:bg-gray-100 transition-colors",
|
|
1791
1834
|
"aria-label": "Layer actions"
|
|
1792
|
-
},
|
|
1835
|
+
}, bs = {
|
|
1793
1836
|
key: 0,
|
|
1794
1837
|
class: "bg-blue-50 rounded-md mt-2"
|
|
1795
|
-
},
|
|
1838
|
+
}, ws = { class: "px-2 pt-2 text-blue-600 hover:text-blue-700 transition-colors" }, xs = {
|
|
1796
1839
|
key: 0,
|
|
1797
1840
|
class: "text-center text-[14px] text-[#4b5563]"
|
|
1798
|
-
},
|
|
1841
|
+
}, _s = { class: "relative mt-[10px]" }, ks = {
|
|
1799
1842
|
key: 0,
|
|
1800
1843
|
class: "vs-layers-catalog__list flex-1 scrollable-container overflow-auto mt-2 catalog-list"
|
|
1801
|
-
},
|
|
1844
|
+
}, Ls = {
|
|
1802
1845
|
key: 0,
|
|
1803
1846
|
class: "text-center text-[14px] text-[#4b5563]"
|
|
1804
|
-
},
|
|
1847
|
+
}, Cs = {
|
|
1805
1848
|
key: 0,
|
|
1806
1849
|
class: "text-center text-[14px] text-[#4b5563]"
|
|
1807
|
-
},
|
|
1808
|
-
function
|
|
1850
|
+
}, $s = ["onClick"], Is = { class: "flex items-center gap-x-3" }, Vs = ["title"], Ss = { class: "text-xs opacity-60 text-[#4b5563]" };
|
|
1851
|
+
function js(e, t, o, s, n, i) {
|
|
1809
1852
|
var h;
|
|
1810
1853
|
const d = G("VsPopover"), v = G("DotsIcon"), g = G("VsFilter"), l = G("searchIcon"), u = G("closeIcon"), a = G("VsLayersItem"), m = G("chevronRightIcon");
|
|
1811
|
-
return c(), p("div",
|
|
1812
|
-
r("div",
|
|
1813
|
-
r("div",
|
|
1854
|
+
return c(), p("div", qr, [
|
|
1855
|
+
r("div", Gr, [
|
|
1856
|
+
r("div", Jr, [
|
|
1814
1857
|
t[7] || (t[7] = r("svg", {
|
|
1815
1858
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1816
1859
|
width: "20",
|
|
@@ -1827,9 +1870,9 @@ function _s(e, t, o, n, s, i) {
|
|
|
1827
1870
|
r("path", { d: "m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65" }),
|
|
1828
1871
|
r("path", { d: "m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65" })
|
|
1829
1872
|
], -1)),
|
|
1830
|
-
r("h2",
|
|
1831
|
-
ae(S(
|
|
1832
|
-
|
|
1873
|
+
r("h2", Qr, [
|
|
1874
|
+
ae(S(n.activeView === "catalog" ? "Каталог" : "Вибрані шари") + " ", 1),
|
|
1875
|
+
n.activeView === "catalog" ? (c(), p("span", Yr, "(" + S(((h = n.layers) == null ? void 0 : h.length) || 0) + ")", 1)) : (c(), p("span", Kr, "(" + S(n.selectedLayers.length) + ")", 1))
|
|
1833
1876
|
])
|
|
1834
1877
|
]),
|
|
1835
1878
|
r("button", {
|
|
@@ -1837,30 +1880,30 @@ function _s(e, t, o, n, s, i) {
|
|
|
1837
1880
|
"aria-label": "Reset layers",
|
|
1838
1881
|
onClick: t[0] || (t[0] = (...f) => i.clearSelectedLayers && i.clearSelectedLayers(...f))
|
|
1839
1882
|
}, [...t[8] || (t[8] = [
|
|
1840
|
-
|
|
1883
|
+
Ae('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw text-gray-600" data-v-1b8b657a><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" data-v-1b8b657a></path><path d="M21 3v5h-5" data-v-1b8b657a></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" data-v-1b8b657a></path><path d="M8 16H3v5" data-v-1b8b657a></path></svg>', 1)
|
|
1841
1884
|
])])
|
|
1842
1885
|
]),
|
|
1843
|
-
r("div",
|
|
1886
|
+
r("div", Xr, [
|
|
1844
1887
|
r("button", {
|
|
1845
1888
|
class: K([
|
|
1846
1889
|
"px-4 py-2 text-sm font-medium",
|
|
1847
|
-
|
|
1890
|
+
n.activeView === "catalog" ? "text-blue-600 border-b-2 border-blue-600" : "text-gray-600 hover:text-gray-800"
|
|
1848
1891
|
]),
|
|
1849
|
-
onClick: t[1] || (t[1] = (f) =>
|
|
1892
|
+
onClick: t[1] || (t[1] = (f) => n.activeView = "catalog")
|
|
1850
1893
|
}, " Каталог ", 2),
|
|
1851
1894
|
r("button", {
|
|
1852
1895
|
class: K([
|
|
1853
1896
|
"px-4 py-2 text-sm font-medium",
|
|
1854
|
-
|
|
1897
|
+
n.activeView === "selected" ? "text-blue-600 border-b-2 border-blue-600" : "text-gray-600 hover:text-gray-800"
|
|
1855
1898
|
]),
|
|
1856
|
-
onClick: t[2] || (t[2] = (f) =>
|
|
1899
|
+
onClick: t[2] || (t[2] = (f) => n.activeView = "selected")
|
|
1857
1900
|
}, " Вибрані шари ", 2)
|
|
1858
1901
|
]),
|
|
1859
|
-
|
|
1860
|
-
r("div",
|
|
1902
|
+
n.activeView === "selected" ? (c(), p("div", es, [
|
|
1903
|
+
r("div", ts, [
|
|
1861
1904
|
r("button", {
|
|
1862
1905
|
class: "flex items-center gap-2 text-blue-600 hover:text-blue-700 transition-colors px-3 py-2 rounded-md bg-blue-50 hover:bg-blue-100 w-full justify-center",
|
|
1863
|
-
onClick: t[3] || (t[3] = (f) =>
|
|
1906
|
+
onClick: t[3] || (t[3] = (f) => n.activeView = "catalog")
|
|
1864
1907
|
}, [...t[9] || (t[9] = [
|
|
1865
1908
|
r("svg", {
|
|
1866
1909
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1880,42 +1923,42 @@ function _s(e, t, o, n, s, i) {
|
|
|
1880
1923
|
r("span", null, "Вибрати шар", -1)
|
|
1881
1924
|
])])
|
|
1882
1925
|
]),
|
|
1883
|
-
|
|
1884
|
-
(c(!0), p(
|
|
1885
|
-
var
|
|
1926
|
+
n.mounted ? (c(), p("div", os, [
|
|
1927
|
+
(c(!0), p(A, null, N(n.selectedLayers, (f, L) => {
|
|
1928
|
+
var F, T;
|
|
1886
1929
|
return c(), p("div", {
|
|
1887
1930
|
key: f.id || L,
|
|
1888
|
-
class: K(["border border-gray-200 rounded-md p-3 mb-2 bg-white shadow-sm text-[13px] text-[#4b5563]", { dragging:
|
|
1931
|
+
class: K(["border border-gray-200 rounded-md p-3 mb-2 bg-white shadow-sm text-[13px] text-[#4b5563]", { dragging: n.draggedLayerIndex === L }]),
|
|
1889
1932
|
draggable: "true",
|
|
1890
1933
|
onDragstart: (k) => i.onDragStart(L),
|
|
1891
|
-
onDragover:
|
|
1934
|
+
onDragover: vt((k) => i.onDragOver(L), ["prevent"]),
|
|
1892
1935
|
onDrop: (k) => i.onDrop(L),
|
|
1893
1936
|
onDragend: t[4] || (t[4] = (...k) => i.onDragEnd && i.onDragEnd(...k))
|
|
1894
1937
|
}, [
|
|
1895
|
-
r("div",
|
|
1896
|
-
r("div",
|
|
1897
|
-
t[10] || (t[10] =
|
|
1938
|
+
r("div", ss, [
|
|
1939
|
+
r("div", ns, [
|
|
1940
|
+
t[10] || (t[10] = Ae('<svg width="16" height="16" fill="none" stroke="#9ca3af" stroke-width="2" viewBox="0 0 24 24" class="mr-1 shrink-0" data-v-1b8b657a><circle cx="5" cy="5" r="1.5" data-v-1b8b657a></circle><circle cx="5" cy="12" r="1.5" data-v-1b8b657a></circle><circle cx="5" cy="19" r="1.5" data-v-1b8b657a></circle><circle cx="12" cy="5" r="1.5" data-v-1b8b657a></circle><circle cx="12" cy="12" r="1.5" data-v-1b8b657a></circle><circle cx="12" cy="19" r="1.5" data-v-1b8b657a></circle><circle cx="19" cy="5" r="1.5" data-v-1b8b657a></circle><circle cx="19" cy="12" r="1.5" data-v-1b8b657a></circle><circle cx="19" cy="19" r="1.5" data-v-1b8b657a></circle></svg>', 1)),
|
|
1898
1941
|
ne(r("input", {
|
|
1899
1942
|
type: "checkbox",
|
|
1900
1943
|
class: "w-4 h-4 text-blue-600 rounded focus:ring-blue-500",
|
|
1901
1944
|
"onUpdate:modelValue": (k) => f.visible = k,
|
|
1902
1945
|
onChange: (k) => i.toggleLayerVisibility(f)
|
|
1903
|
-
}, null, 40,
|
|
1946
|
+
}, null, 40, is), [
|
|
1904
1947
|
[qe, f.visible]
|
|
1905
1948
|
]),
|
|
1906
|
-
r("span",
|
|
1949
|
+
r("span", as, S(f.name || f.title || f.label), 1)
|
|
1907
1950
|
]),
|
|
1908
|
-
r("div",
|
|
1909
|
-
r("div",
|
|
1910
|
-
|
|
1911
|
-
reference:
|
|
1951
|
+
r("div", ls, [
|
|
1952
|
+
r("div", cs, [
|
|
1953
|
+
Z(d, { placement: "bottom" }, {
|
|
1954
|
+
reference: W(() => [
|
|
1912
1955
|
r("div", {
|
|
1913
1956
|
class: "text-sm text-gray-600 hover:text-gray-800 transition-colors px-2 py-1 rounded hover:bg-gray-100 cursor-pointer",
|
|
1914
1957
|
onClick: (k) => i.updateLayerOpacity(f)
|
|
1915
|
-
}, S(f.opacity || 100) + "% ", 9,
|
|
1958
|
+
}, S(f.opacity || 100) + "% ", 9, hs)
|
|
1916
1959
|
]),
|
|
1917
|
-
default:
|
|
1918
|
-
r("div",
|
|
1960
|
+
default: W(() => [
|
|
1961
|
+
r("div", ds, [
|
|
1919
1962
|
t[11] || (t[11] = r("label", { class: "text-gray-600 whitespace-nowrap" }, "Прозорість:", -1)),
|
|
1920
1963
|
ne(r("input", {
|
|
1921
1964
|
type: "range",
|
|
@@ -1925,26 +1968,26 @@ function _s(e, t, o, n, s, i) {
|
|
|
1925
1968
|
"onUpdate:modelValue": (k) => f.opacity = k,
|
|
1926
1969
|
onInput: (k) => i.onLayerOpacityChange(f),
|
|
1927
1970
|
class: "h-2 w-full accent-blue-600 rounded-lg cursor-pointer bg-gray-200"
|
|
1928
|
-
}, null, 40,
|
|
1929
|
-
[
|
|
1971
|
+
}, null, 40, us), [
|
|
1972
|
+
[Ze, f.opacity]
|
|
1930
1973
|
]),
|
|
1931
|
-
r("span",
|
|
1974
|
+
r("span", ps, S(Math.round(f.opacity)) + "% ", 1)
|
|
1932
1975
|
])
|
|
1933
1976
|
]),
|
|
1934
1977
|
_: 2
|
|
1935
1978
|
}, 1024)
|
|
1936
1979
|
]),
|
|
1937
|
-
r("div",
|
|
1938
|
-
|
|
1939
|
-
reference:
|
|
1940
|
-
r("div",
|
|
1941
|
-
|
|
1980
|
+
r("div", fs, [
|
|
1981
|
+
Z(d, { placement: "bottom" }, {
|
|
1982
|
+
reference: W(() => [
|
|
1983
|
+
r("div", ys, [
|
|
1984
|
+
Z(v)
|
|
1942
1985
|
])
|
|
1943
1986
|
]),
|
|
1944
|
-
default:
|
|
1945
|
-
r("div",
|
|
1946
|
-
(c(!0), p(
|
|
1947
|
-
k.divider ? (c(), p("hr",
|
|
1987
|
+
default: W(() => [
|
|
1988
|
+
r("div", gs, [
|
|
1989
|
+
(c(!0), p(A, null, N(i.popoverActions(f), (k, _) => (c(), p(A, { key: _ }, [
|
|
1990
|
+
k.divider ? (c(), p("hr", vs)) : (c(), p("button", {
|
|
1948
1991
|
key: 1,
|
|
1949
1992
|
class: K(
|
|
1950
1993
|
"w-full p-2 text-left text-sm flex items-center gap-2 " + (k.class || "")
|
|
@@ -1952,9 +1995,9 @@ function _s(e, t, o, n, s, i) {
|
|
|
1952
1995
|
disabled: k.disabled,
|
|
1953
1996
|
onClick: (D) => !k.disabled && e.$options.methods[k.handler].call(this, f)
|
|
1954
1997
|
}, [
|
|
1955
|
-
(c(), X(
|
|
1998
|
+
(c(), X(Oe(k.icon), { class: "lucide" })),
|
|
1956
1999
|
ae(" " + S(k.label), 1)
|
|
1957
|
-
], 10,
|
|
2000
|
+
], 10, ms))
|
|
1958
2001
|
], 64))), 128))
|
|
1959
2002
|
])
|
|
1960
2003
|
]),
|
|
@@ -1963,9 +2006,9 @@ function _s(e, t, o, n, s, i) {
|
|
|
1963
2006
|
])
|
|
1964
2007
|
])
|
|
1965
2008
|
]),
|
|
1966
|
-
f.showFilters ? (c(), p("div",
|
|
1967
|
-
r("div",
|
|
1968
|
-
ne(
|
|
2009
|
+
f.showFilters ? (c(), p("div", bs, [
|
|
2010
|
+
r("div", ws, " Фільтри для шару: " + S(f.name || f.title || f.label), 1),
|
|
2011
|
+
ne(Z(g, {
|
|
1969
2012
|
ref_for: !0,
|
|
1970
2013
|
ref: "filter",
|
|
1971
2014
|
scheme: f.filters,
|
|
@@ -1975,99 +2018,99 @@ function _s(e, t, o, n, s, i) {
|
|
|
1975
2018
|
name: "filter",
|
|
1976
2019
|
onFilterChange: (k) => i.handleFilterChange(k, f)
|
|
1977
2020
|
}, null, 8, ["scheme", "onFilterChange"]), [
|
|
1978
|
-
[
|
|
2021
|
+
[Pe, (F = f.filters) == null ? void 0 : F.length]
|
|
1979
2022
|
]),
|
|
1980
2023
|
ne(r("div", null, [...t[12] || (t[12] = [
|
|
1981
2024
|
r("div", { class: "px-2 text-[14px] text-[#4b5563]" }, " Фільтри для шару відсутні ", -1)
|
|
1982
2025
|
])], 512), [
|
|
1983
|
-
[
|
|
2026
|
+
[Pe, !((T = f.filters) != null && T.length)]
|
|
1984
2027
|
])
|
|
1985
|
-
])) :
|
|
1986
|
-
], 42,
|
|
2028
|
+
])) : j("", !0)
|
|
2029
|
+
], 42, rs);
|
|
1987
2030
|
}), 128)),
|
|
1988
|
-
|
|
2031
|
+
n.selectedLayers.length === 0 ? (c(), p("div", xs, [...t[13] || (t[13] = [
|
|
1989
2032
|
r("p", null, 'Щоб додати шар, натисніть на кнопку "Вибрати шар".', -1)
|
|
1990
|
-
])])) :
|
|
1991
|
-
])) :
|
|
1992
|
-
])) : (c(), p(
|
|
1993
|
-
r("div",
|
|
2033
|
+
])])) : j("", !0)
|
|
2034
|
+
])) : j("", !0)
|
|
2035
|
+
])) : (c(), p(A, { key: 1 }, [
|
|
2036
|
+
r("div", _s, [
|
|
1994
2037
|
ne(r("input", {
|
|
1995
2038
|
title: "value",
|
|
1996
2039
|
placeholder: "Введіть назву шару...",
|
|
1997
|
-
"onUpdate:modelValue": t[5] || (t[5] = (f) =>
|
|
2040
|
+
"onUpdate:modelValue": t[5] || (t[5] = (f) => n.search = f),
|
|
1998
2041
|
type: "text",
|
|
1999
2042
|
class: "py-[7px] pl-2 pe-8 block w-full bg-gray-100 border-transparent rounded-lg text-sm focus:bg-white focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",
|
|
2000
|
-
onKeyup: t[6] || (t[6] =
|
|
2043
|
+
onKeyup: t[6] || (t[6] = mt((...f) => i.onEnter && i.onEnter(...f), ["enter"]))
|
|
2001
2044
|
}, null, 544), [
|
|
2002
|
-
[
|
|
2045
|
+
[Ze, n.search]
|
|
2003
2046
|
]),
|
|
2004
|
-
|
|
2047
|
+
Z(l, {
|
|
2005
2048
|
class: "absolute top-1/2 left-[8px] w-[16px] h-[16px]",
|
|
2006
2049
|
style: { transform: "translate(0, -50%)" }
|
|
2007
2050
|
}),
|
|
2008
|
-
|
|
2051
|
+
n.search ? (c(), X(u, {
|
|
2009
2052
|
key: 0,
|
|
2010
2053
|
class: "absolute top-1/2 right-[10px] w-[16px] h-[16px] cursor-pointer",
|
|
2011
2054
|
style: { transform: "translate(0, -50%)" },
|
|
2012
2055
|
onClick: i.clearSearch
|
|
2013
|
-
}, null, 8, ["onClick"])) :
|
|
2056
|
+
}, null, 8, ["onClick"])) : j("", !0)
|
|
2014
2057
|
]),
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
(c(!0), p(
|
|
2058
|
+
n.categories ? (c(), p("div", ks, [
|
|
2059
|
+
n.search ? (c(), p(A, { key: 0 }, [
|
|
2060
|
+
(c(!0), p(A, null, N(i.searchedLayers, (f, L) => (c(), X(a, {
|
|
2018
2061
|
key: L,
|
|
2019
2062
|
layer: f,
|
|
2020
2063
|
map: o.map,
|
|
2021
|
-
selectedLayers:
|
|
2064
|
+
selectedLayers: n.selectedLayers,
|
|
2022
2065
|
onSelect: i.addToSelected,
|
|
2023
2066
|
onRemove: i.handleRemoveFromCatalog
|
|
2024
2067
|
}, null, 8, ["layer", "map", "selectedLayers", "onSelect", "onRemove"]))), 128)),
|
|
2025
|
-
i.searchedLayers.length === 0 ? (c(), p("div",
|
|
2026
|
-
], 64)) : (c(), p(
|
|
2027
|
-
!
|
|
2068
|
+
i.searchedLayers.length === 0 ? (c(), p("div", Ls, " Нічого не знайдено ")) : j("", !0)
|
|
2069
|
+
], 64)) : (c(), p(A, { key: 1 }, [
|
|
2070
|
+
!n.categories || Object.keys(n.categories).length === 0 ? (c(), p("div", Cs, " Каталог порожній ")) : (c(!0), p(A, { key: 1 }, N(Object.keys(n.categories), (f) => (c(), p("div", { key: f }, [
|
|
2028
2071
|
r("div", {
|
|
2029
2072
|
class: "hover:bg-gray-100 focus:bg-gray-100 px-2.5 cursor-pointer p-[8px] rounded-lg flex justify-between items-center",
|
|
2030
2073
|
onClick: (L) => i.selectCategory(f)
|
|
2031
2074
|
}, [
|
|
2032
|
-
r("div",
|
|
2033
|
-
|
|
2075
|
+
r("div", Is, [
|
|
2076
|
+
Z(m, {
|
|
2034
2077
|
class: K({
|
|
2035
|
-
"rotate-up": f ===
|
|
2036
|
-
"rotate-down": f !==
|
|
2078
|
+
"rotate-up": f === n.selectedCategory,
|
|
2079
|
+
"rotate-down": f !== n.selectedCategory
|
|
2037
2080
|
})
|
|
2038
2081
|
}, null, 8, ["class"]),
|
|
2039
2082
|
r("div", {
|
|
2040
2083
|
class: "max-w-[260px] text-[14px] text-[#4b5563]",
|
|
2041
2084
|
title: f
|
|
2042
|
-
}, S(f), 9,
|
|
2085
|
+
}, S(f), 9, Vs)
|
|
2043
2086
|
]),
|
|
2044
|
-
r("div",
|
|
2045
|
-
], 8,
|
|
2087
|
+
r("div", Ss, S(i.formatNumber(n.categories[f].length)), 1)
|
|
2088
|
+
], 8, $s),
|
|
2046
2089
|
ne(r("div", null, [
|
|
2047
|
-
(c(!0), p(
|
|
2048
|
-
key:
|
|
2090
|
+
(c(!0), p(A, null, N(n.categories[f], (L, F) => (c(), X(a, {
|
|
2091
|
+
key: F,
|
|
2049
2092
|
layer: L,
|
|
2050
2093
|
map: o.map,
|
|
2051
|
-
selectedLayers:
|
|
2094
|
+
selectedLayers: n.selectedLayers,
|
|
2052
2095
|
onSelect: i.addToSelected,
|
|
2053
2096
|
onRemove: i.handleRemoveFromCatalog
|
|
2054
2097
|
}, null, 8, ["layer", "map", "selectedLayers", "onSelect", "onRemove"]))), 128))
|
|
2055
2098
|
], 512), [
|
|
2056
|
-
[
|
|
2099
|
+
[Pe, f === n.selectedCategory]
|
|
2057
2100
|
])
|
|
2058
2101
|
]))), 128))
|
|
2059
2102
|
], 64))
|
|
2060
|
-
])) :
|
|
2103
|
+
])) : j("", !0)
|
|
2061
2104
|
], 64))
|
|
2062
2105
|
]);
|
|
2063
2106
|
}
|
|
2064
|
-
const
|
|
2107
|
+
const Fs = /* @__PURE__ */ H(Wr, [["render", js], ["__scopeId", "data-v-1b8b657a"]]), Ps = {
|
|
2065
2108
|
key: 0,
|
|
2066
2109
|
class: "w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative widget"
|
|
2067
|
-
},
|
|
2110
|
+
}, Es = {
|
|
2068
2111
|
key: 0,
|
|
2069
2112
|
class: "p-5 pb-3 flex justify-between items-center"
|
|
2070
|
-
},
|
|
2113
|
+
}, Ms = { class: "inline-block font-semibold text-lg text-gray-800 dark:text-neutral-200" }, Ts = { class: "flex flex-col justify-between h-full" }, zs = {
|
|
2071
2114
|
__name: "vs-filters-widget",
|
|
2072
2115
|
props: {
|
|
2073
2116
|
config: {
|
|
@@ -2087,7 +2130,7 @@ const ks = /* @__PURE__ */ H(Br, [["render", _s], ["__scopeId", "data-v-ed5e991a
|
|
|
2087
2130
|
const t = e, o = M(() => {
|
|
2088
2131
|
var d;
|
|
2089
2132
|
return ((d = t.config) == null ? void 0 : d.filters) || [];
|
|
2090
|
-
}),
|
|
2133
|
+
}), s = M(() => o.value), n = M(() => {
|
|
2091
2134
|
var v;
|
|
2092
2135
|
const d = (v = t.config) == null ? void 0 : v.conditions;
|
|
2093
2136
|
return !d || !d.layers ? !0 : t.enabledLayerIds.some((g) => d.layers.includes(g));
|
|
@@ -2099,32 +2142,32 @@ const ks = /* @__PURE__ */ H(Br, [["render", _s], ["__scopeId", "data-v-ed5e991a
|
|
|
2099
2142
|
u.length && u.forEach((m) => {
|
|
2100
2143
|
const h = t.map.getSource(m);
|
|
2101
2144
|
if (h) {
|
|
2102
|
-
const L = h.tiles[0].split("?filter=")[0],
|
|
2103
|
-
h.setTiles([
|
|
2145
|
+
const L = h.tiles[0].split("?filter=")[0], F = v ? `${L}?filter=${v}` : L;
|
|
2146
|
+
h.setTiles([F]);
|
|
2104
2147
|
}
|
|
2105
2148
|
});
|
|
2106
2149
|
};
|
|
2107
|
-
return (d, v) =>
|
|
2108
|
-
e.config.title ? (c(), p("div",
|
|
2109
|
-
r("h2",
|
|
2110
|
-
])) :
|
|
2111
|
-
r("div",
|
|
2112
|
-
|
|
2150
|
+
return (d, v) => n.value ? (c(), p("div", Ps, [
|
|
2151
|
+
e.config.title ? (c(), p("div", Es, [
|
|
2152
|
+
r("h2", Ms, S(e.config.title), 1)
|
|
2153
|
+
])) : j("", !0),
|
|
2154
|
+
r("div", Ts, [
|
|
2155
|
+
Z(We(wt), {
|
|
2113
2156
|
ref: "filter",
|
|
2114
|
-
schema:
|
|
2157
|
+
schema: s.value,
|
|
2115
2158
|
view: "vertical",
|
|
2116
2159
|
onChange: i
|
|
2117
2160
|
}, null, 8, ["schema"])
|
|
2118
2161
|
])
|
|
2119
|
-
])) :
|
|
2162
|
+
])) : j("", !0);
|
|
2120
2163
|
}
|
|
2121
|
-
},
|
|
2164
|
+
}, Bs = {
|
|
2122
2165
|
type: "button",
|
|
2123
2166
|
class: "py-2 px-2.5 inline-flex items-center gap-x-1.5 text-sm font-medium rounded-lg bg-white text-gray-800 hover:bg-gray-50 focus:outline-none focus:bg-gray-49 h-[38px] shadow-md"
|
|
2124
|
-
},
|
|
2167
|
+
}, As = { class: "flex gap-[5px] items-center" }, Os = { class: "text-gray-600" }, Ds = {
|
|
2125
2168
|
key: 0,
|
|
2126
2169
|
class: "w-[16px] h-[16px] font-medium bg-gray-800 text-white rounded-full flex items-center justify-center text-[10px]"
|
|
2127
|
-
},
|
|
2170
|
+
}, Us = {
|
|
2128
2171
|
__name: "vs-inline-filters-widget",
|
|
2129
2172
|
props: {
|
|
2130
2173
|
config: {
|
|
@@ -2141,10 +2184,10 @@ const ks = /* @__PURE__ */ H(Br, [["render", _s], ["__scopeId", "data-v-ed5e991a
|
|
|
2141
2184
|
}
|
|
2142
2185
|
},
|
|
2143
2186
|
setup(e) {
|
|
2144
|
-
const t = e, o =
|
|
2187
|
+
const t = e, o = B(0), s = B(null), n = M(() => {
|
|
2145
2188
|
var l;
|
|
2146
2189
|
return ((l = t.config) == null ? void 0 : l.filters) || [];
|
|
2147
|
-
}), i = M(() =>
|
|
2190
|
+
}), i = M(() => n.value.map((l) => ({
|
|
2148
2191
|
...l,
|
|
2149
2192
|
id: l.name
|
|
2150
2193
|
}))), d = M(() => {
|
|
@@ -2164,31 +2207,31 @@ const ks = /* @__PURE__ */ H(Br, [["render", _s], ["__scopeId", "data-v-ed5e991a
|
|
|
2164
2207
|
if (!u) {
|
|
2165
2208
|
const L = (f = t.config) == null ? void 0 : f.layer_id;
|
|
2166
2209
|
if (!L) return;
|
|
2167
|
-
const
|
|
2168
|
-
if (
|
|
2169
|
-
const k =
|
|
2170
|
-
|
|
2210
|
+
const F = t.map.getSource(L);
|
|
2211
|
+
if (F) {
|
|
2212
|
+
const k = F.tiles[0].split("?filter=")[0], _ = l ? `${k}?filter=${l}` : k;
|
|
2213
|
+
F.setTiles([_]);
|
|
2171
2214
|
}
|
|
2172
2215
|
return;
|
|
2173
2216
|
}
|
|
2174
2217
|
const a = (u == null ? void 0 : u.layers) || [], m = t.enabledLayerIds.filter((L) => a.includes(L));
|
|
2175
2218
|
m.length && m.forEach((L) => {
|
|
2176
|
-
const
|
|
2177
|
-
if (
|
|
2178
|
-
const k =
|
|
2179
|
-
|
|
2219
|
+
const F = t.map.getSource(L);
|
|
2220
|
+
if (F) {
|
|
2221
|
+
const k = F.tiles[0].split("?filter=")[0], _ = l ? `${k}?filter=${l}` : k;
|
|
2222
|
+
F.setTiles([_]);
|
|
2180
2223
|
}
|
|
2181
2224
|
});
|
|
2182
2225
|
};
|
|
2183
|
-
return
|
|
2226
|
+
return fe(
|
|
2184
2227
|
() => t.enabledLayerIds,
|
|
2185
2228
|
(l) => {
|
|
2186
|
-
(!l || !l.length) &&
|
|
2229
|
+
(!l || !l.length) && s.value && (s.value.activeFilters = {}, o.value = 0);
|
|
2187
2230
|
}
|
|
2188
|
-
),
|
|
2231
|
+
), fe(
|
|
2189
2232
|
() => {
|
|
2190
2233
|
var l;
|
|
2191
|
-
return (l =
|
|
2234
|
+
return (l = s.value) == null ? void 0 : l.activeFilters;
|
|
2192
2235
|
},
|
|
2193
2236
|
(l) => {
|
|
2194
2237
|
o.value = Object.keys(l || {}).length;
|
|
@@ -2199,7 +2242,7 @@ const ks = /* @__PURE__ */ H(Br, [["render", _s], ["__scopeId", "data-v-ed5e991a
|
|
|
2199
2242
|
return d.value && i.value.length ? (c(), X(m, {
|
|
2200
2243
|
key: 0,
|
|
2201
2244
|
ref_key: "filter",
|
|
2202
|
-
ref:
|
|
2245
|
+
ref: s,
|
|
2203
2246
|
isDialog: e.config.dialog ?? !0,
|
|
2204
2247
|
scheme: i.value,
|
|
2205
2248
|
urlSeparator: "true",
|
|
@@ -2207,15 +2250,15 @@ const ks = /* @__PURE__ */ H(Br, [["render", _s], ["__scopeId", "data-v-ed5e991a
|
|
|
2207
2250
|
name: "filter",
|
|
2208
2251
|
onFilterChange: g
|
|
2209
2252
|
}, {
|
|
2210
|
-
button:
|
|
2211
|
-
|
|
2253
|
+
button: W(({ visible: h }) => [
|
|
2254
|
+
Z(a, {
|
|
2212
2255
|
teleport: "body",
|
|
2213
2256
|
trigger: "hover",
|
|
2214
2257
|
placement: "bottom"
|
|
2215
2258
|
}, {
|
|
2216
|
-
reference:
|
|
2217
|
-
r("button",
|
|
2218
|
-
r("div",
|
|
2259
|
+
reference: W(() => [
|
|
2260
|
+
r("button", Bs, [
|
|
2261
|
+
r("div", As, [
|
|
2219
2262
|
u[0] || (u[0] = r("svg", {
|
|
2220
2263
|
width: "18",
|
|
2221
2264
|
height: "18",
|
|
@@ -2242,22 +2285,22 @@ const ks = /* @__PURE__ */ H(Br, [["render", _s], ["__scopeId", "data-v-ed5e991a
|
|
|
2242
2285
|
"stroke-linejoin": "round"
|
|
2243
2286
|
})
|
|
2244
2287
|
], -1)),
|
|
2245
|
-
r("span",
|
|
2246
|
-
o.value ? (c(), p("span",
|
|
2288
|
+
r("span", Os, S(v.value), 1),
|
|
2289
|
+
o.value ? (c(), p("span", Ds, S(o.value), 1)) : j("", !0)
|
|
2247
2290
|
])
|
|
2248
2291
|
])
|
|
2249
2292
|
]),
|
|
2250
|
-
default:
|
|
2293
|
+
default: W(() => [
|
|
2251
2294
|
u[1] || (u[1] = ae(" Відкрити бокову панель ", -1))
|
|
2252
2295
|
]),
|
|
2253
2296
|
_: 1
|
|
2254
2297
|
})
|
|
2255
2298
|
]),
|
|
2256
2299
|
_: 1
|
|
2257
|
-
}, 8, ["isDialog", "scheme"])) :
|
|
2300
|
+
}, 8, ["isDialog", "scheme"])) : j("", !0);
|
|
2258
2301
|
};
|
|
2259
2302
|
}
|
|
2260
|
-
},
|
|
2303
|
+
}, Rs = {
|
|
2261
2304
|
name: "VsListWidget",
|
|
2262
2305
|
props: {
|
|
2263
2306
|
config: {
|
|
@@ -2305,54 +2348,54 @@ const ks = /* @__PURE__ */ H(Br, [["render", _s], ["__scopeId", "data-v-ed5e991a
|
|
|
2305
2348
|
beforeUnmount() {
|
|
2306
2349
|
this.resizeObserver && this.$refs.rootEl && (this.resizeObserver.unobserve(this.$refs.rootEl), this.resizeObserver.disconnect());
|
|
2307
2350
|
}
|
|
2308
|
-
},
|
|
2351
|
+
}, Hs = {
|
|
2309
2352
|
class: "bg-white p-4 rounded-lg h-full flex flex-col overflow-hidden",
|
|
2310
2353
|
ref: "rootEl"
|
|
2311
|
-
},
|
|
2354
|
+
}, Ns = {
|
|
2312
2355
|
key: 0,
|
|
2313
2356
|
class: "flex flex-col flex-1 overflow-hidden"
|
|
2314
|
-
},
|
|
2357
|
+
}, Zs = { class: "space-y-0 overflow-y-auto flex-1 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent" }, Ws = ["onClick"], qs = { class: "text-base font-medium" }, Gs = { class: "mt-2 flex flex-wrap gap-2" }, Js = {
|
|
2315
2358
|
key: 1,
|
|
2316
2359
|
class: "px-2 py-1 text-sm bg-gray-100 rounded-full"
|
|
2317
|
-
},
|
|
2360
|
+
}, Qs = {
|
|
2318
2361
|
key: 0,
|
|
2319
2362
|
class: "my-5 pr-2"
|
|
2320
|
-
},
|
|
2363
|
+
}, Ys = { class: "paginationWrapper relative flex justify-center" }, Ks = {
|
|
2321
2364
|
key: 1,
|
|
2322
2365
|
class: "text-center text-slate-400"
|
|
2323
2366
|
};
|
|
2324
|
-
function
|
|
2367
|
+
function Xs(e, t, o, s, n, i) {
|
|
2325
2368
|
var v;
|
|
2326
2369
|
const d = G("VsPagination");
|
|
2327
|
-
return c(), p("div",
|
|
2370
|
+
return c(), p("div", Hs, [
|
|
2328
2371
|
t[0] || (t[0] = r("h2", { class: "text-xl font-semibold mb-4" }, "Список", -1)),
|
|
2329
|
-
((v =
|
|
2330
|
-
r("div",
|
|
2331
|
-
(c(!0), p(
|
|
2372
|
+
((v = n.items) == null ? void 0 : v.length) > 0 ? (c(), p("div", Ns, [
|
|
2373
|
+
r("div", Zs, [
|
|
2374
|
+
(c(!0), p(A, null, N(n.items, (g) => (c(), p("div", {
|
|
2332
2375
|
key: g.id,
|
|
2333
2376
|
class: "py-4 border-b last:border-b-0 hover:bg-gray-50",
|
|
2334
2377
|
onClick: (l) => e.$emit("cardValuesId", g.id)
|
|
2335
2378
|
}, [
|
|
2336
|
-
r("h3",
|
|
2337
|
-
r("div",
|
|
2379
|
+
r("h3", qs, S(g.name), 1),
|
|
2380
|
+
r("div", Gs, [
|
|
2338
2381
|
g.status_data ? (c(), p("span", {
|
|
2339
2382
|
key: 0,
|
|
2340
2383
|
class: K(["px-2 py-1 text-sm rounded-full", {
|
|
2341
2384
|
"bg-green-100 text-green-800": g.status_data.color === "green",
|
|
2342
2385
|
"bg-red-100 text-red-800": g.status_data.color === "red"
|
|
2343
2386
|
}])
|
|
2344
|
-
}, S(g.status_data.text), 3)) :
|
|
2345
|
-
g.class_mbd_id_data ? (c(), p("span",
|
|
2387
|
+
}, S(g.status_data.text), 3)) : j("", !0),
|
|
2388
|
+
g.class_mbd_id_data ? (c(), p("span", Js, S(g.class_mbd_id_data.text), 1)) : j("", !0)
|
|
2346
2389
|
])
|
|
2347
|
-
], 8,
|
|
2390
|
+
], 8, Ws))), 128))
|
|
2348
2391
|
]),
|
|
2349
|
-
|
|
2350
|
-
r("div",
|
|
2351
|
-
|
|
2352
|
-
total:
|
|
2392
|
+
n.total > n.limit ? (c(), p("div", Qs, [
|
|
2393
|
+
r("div", Ys, [
|
|
2394
|
+
Z(d, {
|
|
2395
|
+
total: n.total,
|
|
2353
2396
|
maxPages: 4,
|
|
2354
|
-
defaultPage:
|
|
2355
|
-
pageSize:
|
|
2397
|
+
defaultPage: n.currentPage,
|
|
2398
|
+
pageSize: n.limit,
|
|
2356
2399
|
goTo: !1,
|
|
2357
2400
|
size: "medium",
|
|
2358
2401
|
onPageChange: i.handlePageChange,
|
|
@@ -2362,26 +2405,26 @@ function Ns(e, t, o, n, s, i) {
|
|
|
2362
2405
|
onPageSizeChange: i.changeLimit
|
|
2363
2406
|
}, null, 8, ["total", "defaultPage", "pageSize", "onPageChange", "onPageSizeChange"])
|
|
2364
2407
|
])
|
|
2365
|
-
])) :
|
|
2366
|
-
])) : (c(), p("div",
|
|
2408
|
+
])) : j("", !0)
|
|
2409
|
+
])) : (c(), p("div", Ks, "Немає даних"))
|
|
2367
2410
|
], 512);
|
|
2368
2411
|
}
|
|
2369
|
-
const
|
|
2412
|
+
const en = /* @__PURE__ */ H(Rs, [["render", Xs]]), tn = { class: "map-skeleton-loader" }, on = {
|
|
2370
2413
|
__name: "vs-skeleton-loader",
|
|
2371
2414
|
setup(e) {
|
|
2372
|
-
return (t, o) => (c(), p("div",
|
|
2415
|
+
return (t, o) => (c(), p("div", tn, [...o[0] || (o[0] = [
|
|
2373
2416
|
r("div", { class: "dot-pulse" }, null, -1)
|
|
2374
2417
|
])]));
|
|
2375
2418
|
}
|
|
2376
|
-
},
|
|
2419
|
+
}, rn = /* @__PURE__ */ H(on, [["__scopeId", "data-v-954c1e03"]]), sn = {}, nn = {
|
|
2377
2420
|
width: "24",
|
|
2378
2421
|
height: "24",
|
|
2379
2422
|
viewBox: "0 0 24 24",
|
|
2380
2423
|
fill: "none",
|
|
2381
2424
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2382
2425
|
};
|
|
2383
|
-
function
|
|
2384
|
-
return c(), p("svg",
|
|
2426
|
+
function an(e, t) {
|
|
2427
|
+
return c(), p("svg", nn, [...t[0] || (t[0] = [
|
|
2385
2428
|
r("title", null, "Globe Icon", -1),
|
|
2386
2429
|
r("desc", null, " A circular representation of a globe with horizontal and vertical lines ", -1),
|
|
2387
2430
|
r("path", {
|
|
@@ -2407,9 +2450,9 @@ function Ks(e, t) {
|
|
|
2407
2450
|
}, null, -1)
|
|
2408
2451
|
])]);
|
|
2409
2452
|
}
|
|
2410
|
-
const
|
|
2453
|
+
const ln = /* @__PURE__ */ H(sn, [["render", an]]), cn = {
|
|
2411
2454
|
components: {
|
|
2412
|
-
homeIcon:
|
|
2455
|
+
homeIcon: ln
|
|
2413
2456
|
},
|
|
2414
2457
|
name: "vs-homezoom",
|
|
2415
2458
|
props: {
|
|
@@ -2423,37 +2466,37 @@ const Xs = /* @__PURE__ */ H(Qs, [["render", Ks]]), en = {
|
|
|
2423
2466
|
},
|
|
2424
2467
|
computed: {}
|
|
2425
2468
|
};
|
|
2426
|
-
function
|
|
2469
|
+
function dn(e, t, o, s, n, i) {
|
|
2427
2470
|
const d = G("homeIcon"), v = G("VsPopover");
|
|
2428
2471
|
return c(), p("div", null, [
|
|
2429
|
-
|
|
2472
|
+
Z(v, {
|
|
2430
2473
|
trigger: "hover",
|
|
2431
2474
|
placement: "left",
|
|
2432
2475
|
teleport: "body",
|
|
2433
2476
|
class: "flex"
|
|
2434
2477
|
}, {
|
|
2435
|
-
reference:
|
|
2436
|
-
|
|
2478
|
+
reference: W(() => [
|
|
2479
|
+
Z(d, {
|
|
2437
2480
|
onClick: i.homeZoom,
|
|
2438
2481
|
class: "w-full h-auto p-[9px] [transition:.3s] hover:[transition:.3s] text-[24px] hover:bg-[#DBEAFE] flex font-normal cursor-pointer text-[#1E40AF] bg-[#fff] rounded-[4px] border-[1px] border-solid border-[#E5E7EB]"
|
|
2439
2482
|
}, null, 8, ["onClick"])
|
|
2440
2483
|
]),
|
|
2441
|
-
default:
|
|
2484
|
+
default: W(() => [
|
|
2442
2485
|
t[0] || (t[0] = r("div", null, "Повернутися до початкових налаштувань", -1))
|
|
2443
2486
|
]),
|
|
2444
2487
|
_: 1
|
|
2445
2488
|
})
|
|
2446
2489
|
]);
|
|
2447
2490
|
}
|
|
2448
|
-
const
|
|
2491
|
+
const un = /* @__PURE__ */ H(cn, [["render", dn]]), pn = {}, hn = {
|
|
2449
2492
|
width: "24",
|
|
2450
2493
|
height: "24",
|
|
2451
2494
|
viewBox: "0 0 24 24",
|
|
2452
2495
|
fill: "none",
|
|
2453
2496
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2454
2497
|
};
|
|
2455
|
-
function
|
|
2456
|
-
return c(), p("svg",
|
|
2498
|
+
function fn(e, t) {
|
|
2499
|
+
return c(), p("svg", hn, [...t[0] || (t[0] = [
|
|
2457
2500
|
r("title", null, "Document with Two Sections Icon", -1),
|
|
2458
2501
|
r("desc", null, "A document icon with a split design indicating two sections", -1),
|
|
2459
2502
|
r("path", {
|
|
@@ -2479,10 +2522,10 @@ function nn(e, t) {
|
|
|
2479
2522
|
}, null, -1)
|
|
2480
2523
|
])]);
|
|
2481
2524
|
}
|
|
2482
|
-
const
|
|
2525
|
+
const gn = /* @__PURE__ */ H(pn, [["render", fn]]), vn = {
|
|
2483
2526
|
components: {
|
|
2484
|
-
printIcon:
|
|
2485
|
-
VsPopover:
|
|
2527
|
+
printIcon: gn,
|
|
2528
|
+
VsPopover: Ie
|
|
2486
2529
|
},
|
|
2487
2530
|
props: {
|
|
2488
2531
|
map: { type: Object },
|
|
@@ -2529,14 +2572,14 @@ const an = /* @__PURE__ */ H(rn, [["render", nn]]), ln = {
|
|
|
2529
2572
|
methods: {
|
|
2530
2573
|
addScript(e) {
|
|
2531
2574
|
return new Promise((t, o) => {
|
|
2532
|
-
const
|
|
2533
|
-
|
|
2575
|
+
const s = document.createElement("script");
|
|
2576
|
+
s.src = e, s.async = !0, s.onload = t, s.onerror = o, document.head.appendChild(s), this.scriptElements.push(s);
|
|
2534
2577
|
});
|
|
2535
2578
|
},
|
|
2536
2579
|
addStyle(e) {
|
|
2537
2580
|
return new Promise((t, o) => {
|
|
2538
|
-
const
|
|
2539
|
-
|
|
2581
|
+
const s = document.createElement("link");
|
|
2582
|
+
s.href = e, s.rel = "stylesheet", s.type = "text/css", s.onload = t, s.onerror = o, document.head.appendChild(s), this.styleElements.push(s);
|
|
2540
2583
|
});
|
|
2541
2584
|
},
|
|
2542
2585
|
async loadResources() {
|
|
@@ -2566,13 +2609,13 @@ const an = /* @__PURE__ */ H(rn, [["render", nn]]), ln = {
|
|
|
2566
2609
|
return;
|
|
2567
2610
|
}
|
|
2568
2611
|
window.mapboxgl.accessToken = "pk.eyJ1Ijoia3Jpemhhbm92c2t5IiwiYSI6ImNsemkxNWtkODA5dDcycnNhMWZzYWM0MTAifQ.6fEpgfd_2mA4UYuflDewpQ";
|
|
2569
|
-
const { MapboxExportControl: e, Size: t, PageOrientation: o, Format:
|
|
2612
|
+
const { MapboxExportControl: e, Size: t, PageOrientation: o, Format: s, DPI: n } = window.MapboxExportControl;
|
|
2570
2613
|
this.map.addControl(
|
|
2571
2614
|
new e({
|
|
2572
2615
|
PageSize: t.A3,
|
|
2573
2616
|
PageOrientation: o.Portrait,
|
|
2574
|
-
Format:
|
|
2575
|
-
DPI:
|
|
2617
|
+
Format: s.PNG,
|
|
2618
|
+
DPI: n[96],
|
|
2576
2619
|
Crosshair: !0,
|
|
2577
2620
|
PrintableArea: !0,
|
|
2578
2621
|
Local: "uk"
|
|
@@ -2582,8 +2625,8 @@ const an = /* @__PURE__ */ H(rn, [["render", nn]]), ln = {
|
|
|
2582
2625
|
simulateClick() {
|
|
2583
2626
|
new Promise((t) => {
|
|
2584
2627
|
const o = setTimeout(() => {
|
|
2585
|
-
const
|
|
2586
|
-
|
|
2628
|
+
const s = document.querySelector(".mapboxgl-export-control");
|
|
2629
|
+
s && (clearInterval(o), t(s));
|
|
2587
2630
|
}, 100);
|
|
2588
2631
|
}).then((t) => {
|
|
2589
2632
|
t.click();
|
|
@@ -2596,26 +2639,26 @@ const an = /* @__PURE__ */ H(rn, [["render", nn]]), ln = {
|
|
|
2596
2639
|
}
|
|
2597
2640
|
}
|
|
2598
2641
|
};
|
|
2599
|
-
function
|
|
2642
|
+
function mn(e, t, o, s, n, i) {
|
|
2600
2643
|
const d = G("printIcon"), v = G("VsPopover");
|
|
2601
2644
|
return c(), X(v, {
|
|
2602
2645
|
trigger: "hover",
|
|
2603
2646
|
placement: "left",
|
|
2604
2647
|
teleport: "body"
|
|
2605
2648
|
}, {
|
|
2606
|
-
reference:
|
|
2607
|
-
|
|
2649
|
+
reference: W(() => [
|
|
2650
|
+
Z(d, {
|
|
2608
2651
|
onClick: i.togglePrint,
|
|
2609
2652
|
class: K([i.modalButtonClasses, "print-button w-full h-auto p-[9px] [transition:.3s] hover:[transition:.3s] text-[24px] hover:bg-[#DBEAFE] flex font-normal cursor-pointer text-[#1E40AF] bg-[#fff] rounded-[4px] border-[1px] border-solid border-[#E5E7EB]"])
|
|
2610
2653
|
}, null, 8, ["onClick", "class"])
|
|
2611
2654
|
]),
|
|
2612
|
-
default:
|
|
2655
|
+
default: W(() => [
|
|
2613
2656
|
t[0] || (t[0] = r("div", null, "Надрукувати", -1))
|
|
2614
2657
|
]),
|
|
2615
2658
|
_: 1
|
|
2616
2659
|
});
|
|
2617
2660
|
}
|
|
2618
|
-
const
|
|
2661
|
+
const yn = /* @__PURE__ */ H(vn, [["render", mn]]), bn = {
|
|
2619
2662
|
props: {
|
|
2620
2663
|
map: {
|
|
2621
2664
|
type: Object,
|
|
@@ -2628,7 +2671,7 @@ const dn = /* @__PURE__ */ H(ln, [["render", cn]]), un = {
|
|
|
2628
2671
|
};
|
|
2629
2672
|
},
|
|
2630
2673
|
components: {
|
|
2631
|
-
VsPopover:
|
|
2674
|
+
VsPopover: Ie
|
|
2632
2675
|
},
|
|
2633
2676
|
mounted() {
|
|
2634
2677
|
this.map.on("move", this.updateViewStatus), this.updateViewStatus();
|
|
@@ -2653,7 +2696,7 @@ const dn = /* @__PURE__ */ H(ln, [["render", cn]]), un = {
|
|
|
2653
2696
|
}
|
|
2654
2697
|
}
|
|
2655
2698
|
};
|
|
2656
|
-
function
|
|
2699
|
+
function wn(e, t, o, s, n, i) {
|
|
2657
2700
|
const d = G("VsPopover");
|
|
2658
2701
|
return c(), X(d, {
|
|
2659
2702
|
trigger: "hover",
|
|
@@ -2661,52 +2704,34 @@ function pn(e, t, o, n, s, i) {
|
|
|
2661
2704
|
teleport: "body",
|
|
2662
2705
|
class: "flex"
|
|
2663
2706
|
}, {
|
|
2664
|
-
reference:
|
|
2707
|
+
reference: W(() => [
|
|
2665
2708
|
r("div", {
|
|
2666
2709
|
class: "font-light w-full h-[44px] p-[9px] [transition:.3s] hover:[transition:.3s] text-[19px] hover:bg-[#DBEAFE] flex cursor-pointer text-[#1E40AF] bg-[#fff] rounded-[4px] border-[1px] border-solid border-[#E5E7EB]",
|
|
2667
2710
|
onClick: t[0] || (t[0] = (...v) => i.toggleView && i.toggleView(...v))
|
|
2668
|
-
}, S(
|
|
2711
|
+
}, S(n.is3D ? "2D" : "3D"), 1)
|
|
2669
2712
|
]),
|
|
2670
|
-
default:
|
|
2713
|
+
default: W(() => [
|
|
2671
2714
|
t[1] || (t[1] = r("div", null, "Перемикач виду", -1))
|
|
2672
2715
|
]),
|
|
2673
2716
|
_: 1
|
|
2674
2717
|
});
|
|
2675
2718
|
}
|
|
2676
|
-
const
|
|
2677
|
-
class: "shrink-0 size-4",
|
|
2678
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2679
|
-
width: "24",
|
|
2680
|
-
height: "24",
|
|
2681
|
-
viewBox: "0 0 24 24",
|
|
2682
|
-
fill: "none",
|
|
2683
|
-
stroke: "currentColor",
|
|
2684
|
-
"stroke-width": "2",
|
|
2685
|
-
"stroke-linecap": "round",
|
|
2686
|
-
"stroke-linejoin": "round"
|
|
2687
|
-
};
|
|
2688
|
-
function vn(e, t) {
|
|
2689
|
-
return c(), p("svg", gn, [...t[0] || (t[0] = [
|
|
2690
|
-
r("path", { d: "M18 6 6 18" }, null, -1),
|
|
2691
|
-
r("path", { d: "m6 6 12 12" }, null, -1)
|
|
2692
|
-
])]);
|
|
2693
|
-
}
|
|
2694
|
-
const mn = /* @__PURE__ */ H(fn, [["render", vn]]), yn = {
|
|
2719
|
+
const xn = /* @__PURE__ */ H(bn, [["render", wn]]), _n = {
|
|
2695
2720
|
props: {
|
|
2696
2721
|
bgColor: {
|
|
2697
2722
|
type: String,
|
|
2698
2723
|
default: "#1E40AF"
|
|
2699
2724
|
}
|
|
2700
2725
|
}
|
|
2701
|
-
},
|
|
2726
|
+
}, kn = {
|
|
2702
2727
|
width: "24",
|
|
2703
2728
|
height: "24",
|
|
2704
2729
|
viewBox: "0 0 24 24",
|
|
2705
2730
|
fill: "none",
|
|
2706
2731
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2707
|
-
},
|
|
2708
|
-
function
|
|
2709
|
-
return c(), p("svg",
|
|
2732
|
+
}, Ln = ["stroke"], Cn = ["stroke"], $n = ["stroke"], In = ["stroke"], Vn = ["stroke"], Sn = ["stroke"];
|
|
2733
|
+
function jn(e, t, o, s, n, i) {
|
|
2734
|
+
return c(), p("svg", kn, [
|
|
2710
2735
|
t[0] || (t[0] = r("title", null, "Target Icon", -1)),
|
|
2711
2736
|
t[1] || (t[1] = r("desc", null, "A target icon with a circular pattern inside a rounded square", -1)),
|
|
2712
2737
|
r("path", {
|
|
@@ -2715,49 +2740,49 @@ function $n(e, t, o, n, s, i) {
|
|
|
2715
2740
|
"stroke-width": "1",
|
|
2716
2741
|
"stroke-linecap": "round",
|
|
2717
2742
|
"stroke-linejoin": "round"
|
|
2718
|
-
}, null, 8,
|
|
2743
|
+
}, null, 8, Ln),
|
|
2719
2744
|
r("path", {
|
|
2720
2745
|
d: "M19 12H22",
|
|
2721
2746
|
stroke: o.bgColor,
|
|
2722
2747
|
"stroke-width": "1",
|
|
2723
2748
|
"stroke-linecap": "round",
|
|
2724
2749
|
"stroke-linejoin": "round"
|
|
2725
|
-
}, null, 8,
|
|
2750
|
+
}, null, 8, Cn),
|
|
2726
2751
|
r("path", {
|
|
2727
2752
|
d: "M12 2V5",
|
|
2728
2753
|
stroke: o.bgColor,
|
|
2729
2754
|
"stroke-width": "1",
|
|
2730
2755
|
"stroke-linecap": "round",
|
|
2731
2756
|
"stroke-linejoin": "round"
|
|
2732
|
-
}, null, 8,
|
|
2757
|
+
}, null, 8, $n),
|
|
2733
2758
|
r("path", {
|
|
2734
2759
|
d: "M12 19V22",
|
|
2735
2760
|
stroke: o.bgColor,
|
|
2736
2761
|
"stroke-width": "1",
|
|
2737
2762
|
"stroke-linecap": "round",
|
|
2738
2763
|
"stroke-linejoin": "round"
|
|
2739
|
-
}, null, 8,
|
|
2764
|
+
}, null, 8, In),
|
|
2740
2765
|
r("path", {
|
|
2741
2766
|
d: "M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19Z",
|
|
2742
2767
|
stroke: o.bgColor,
|
|
2743
2768
|
"stroke-width": "1",
|
|
2744
2769
|
"stroke-linecap": "round",
|
|
2745
2770
|
"stroke-linejoin": "round"
|
|
2746
|
-
}, null, 8,
|
|
2771
|
+
}, null, 8, Vn),
|
|
2747
2772
|
r("path", {
|
|
2748
2773
|
d: "M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z",
|
|
2749
2774
|
stroke: o.bgColor,
|
|
2750
2775
|
"stroke-width": "1",
|
|
2751
2776
|
"stroke-linecap": "round",
|
|
2752
2777
|
"stroke-linejoin": "round"
|
|
2753
|
-
}, null, 8,
|
|
2778
|
+
}, null, 8, Sn)
|
|
2754
2779
|
]);
|
|
2755
2780
|
}
|
|
2756
|
-
const
|
|
2781
|
+
const Fn = /* @__PURE__ */ H(_n, [["render", jn]]), Pn = {
|
|
2757
2782
|
components: {
|
|
2758
|
-
geoIcon:
|
|
2759
|
-
VsPopover:
|
|
2760
|
-
closeIcon:
|
|
2783
|
+
geoIcon: Fn,
|
|
2784
|
+
VsPopover: Ie,
|
|
2785
|
+
closeIcon: rt
|
|
2761
2786
|
},
|
|
2762
2787
|
data() {
|
|
2763
2788
|
return {
|
|
@@ -2810,16 +2835,16 @@ const In = /* @__PURE__ */ H(yn, [["render", $n]]), Vn = {
|
|
|
2810
2835
|
`https://nominatim.openstreetmap.org/reverse?format=json&lat=${this.location.latitude}&lon=${this.location.longitude}`
|
|
2811
2836
|
)).json();
|
|
2812
2837
|
this.data = o.address;
|
|
2813
|
-
const
|
|
2838
|
+
const s = [this.location.longitude, this.location.latitude], n = [
|
|
2814
2839
|
[parseFloat(o.boundingbox[2]), parseFloat(o.boundingbox[0])],
|
|
2815
2840
|
[parseFloat(o.boundingbox[3]), parseFloat(o.boundingbox[1])]
|
|
2816
2841
|
];
|
|
2817
|
-
this.map.fitBounds(
|
|
2842
|
+
this.map.fitBounds(n, {
|
|
2818
2843
|
padding: 200,
|
|
2819
2844
|
maxZoom: 16
|
|
2820
2845
|
}), this.marker || (this.marker = new Marker({
|
|
2821
2846
|
color: "var(--primary)"
|
|
2822
|
-
})), this.marker.setLngLat(
|
|
2847
|
+
})), this.marker.setLngLat(s).addTo(this.map), this.activeControl = "geolocation";
|
|
2823
2848
|
},
|
|
2824
2849
|
closeGeolocation() {
|
|
2825
2850
|
this.showLocation = !1, this.marker && (this.marker.remove(), this.marker = null), this.location = null, this.data = null;
|
|
@@ -2832,70 +2857,70 @@ const In = /* @__PURE__ */ H(yn, [["render", $n]]), Vn = {
|
|
|
2832
2857
|
}), this.$emit("close");
|
|
2833
2858
|
}
|
|
2834
2859
|
}
|
|
2835
|
-
},
|
|
2860
|
+
}, En = {
|
|
2836
2861
|
key: 0,
|
|
2837
2862
|
class: "max-w-[412px] absolute w-full top-[20px] right-[70px] bg-white border rounded-[15px] p-4 z-10"
|
|
2838
|
-
},
|
|
2839
|
-
function
|
|
2863
|
+
}, Mn = { class: "flex justify-between items-center border-b pb-[16px]" }, Tn = { class: "d-flex" }, zn = { class: "pt-[16px]" };
|
|
2864
|
+
function Bn(e, t, o, s, n, i) {
|
|
2840
2865
|
var l, u, a, m, h, f;
|
|
2841
2866
|
const d = G("closeIcon"), v = G("geoIcon"), g = G("VsPopover");
|
|
2842
2867
|
return c(), p("div", null, [
|
|
2843
2868
|
(c(), X(Ke, { to: "#maplibre-demo-map" }, [
|
|
2844
|
-
|
|
2845
|
-
r("div",
|
|
2869
|
+
n.location ? (c(), p("div", En, [
|
|
2870
|
+
r("div", Mn, [
|
|
2846
2871
|
t[0] || (t[0] = r("div", { class: "text-lg font-semibold" }, "Ваша геолокація", -1)),
|
|
2847
|
-
r("div",
|
|
2848
|
-
|
|
2872
|
+
r("div", Tn, [
|
|
2873
|
+
Z(d, { onClick: i.closeGeolocation }, null, 8, ["onClick"])
|
|
2849
2874
|
])
|
|
2850
2875
|
]),
|
|
2851
|
-
r("div",
|
|
2876
|
+
r("div", zn, [
|
|
2852
2877
|
r("div", null, [
|
|
2853
2878
|
t[1] || (t[1] = r("strong", null, "Широта:", -1)),
|
|
2854
|
-
ae(" " + S((l =
|
|
2879
|
+
ae(" " + S((l = n.location) == null ? void 0 : l.latitude), 1)
|
|
2855
2880
|
]),
|
|
2856
2881
|
r("div", null, [
|
|
2857
2882
|
t[2] || (t[2] = r("strong", null, "Довгота:", -1)),
|
|
2858
|
-
ae(" " + S((u =
|
|
2883
|
+
ae(" " + S((u = n.location) == null ? void 0 : u.longitude), 1)
|
|
2859
2884
|
]),
|
|
2860
2885
|
r("div", null, [
|
|
2861
2886
|
t[3] || (t[3] = r("strong", null, "КраЇна:", -1)),
|
|
2862
|
-
ae(" " + S((a =
|
|
2887
|
+
ae(" " + S((a = n.data) == null ? void 0 : a.country), 1)
|
|
2863
2888
|
]),
|
|
2864
2889
|
r("div", null, [
|
|
2865
2890
|
t[4] || (t[4] = r("strong", null, "Код країни:", -1)),
|
|
2866
|
-
ae(" " + S((m =
|
|
2891
|
+
ae(" " + S((m = n.data) == null ? void 0 : m.country_code), 1)
|
|
2867
2892
|
]),
|
|
2868
2893
|
r("div", null, [
|
|
2869
2894
|
t[5] || (t[5] = r("strong", null, "Місто:", -1)),
|
|
2870
|
-
ae(" " + S((h =
|
|
2895
|
+
ae(" " + S((h = n.data) == null ? void 0 : h.city), 1)
|
|
2871
2896
|
]),
|
|
2872
2897
|
r("div", null, [
|
|
2873
2898
|
t[6] || (t[6] = r("strong", null, "Поштовий індекс:", -1)),
|
|
2874
|
-
ae(" " + S((f =
|
|
2899
|
+
ae(" " + S((f = n.data) == null ? void 0 : f.postcode), 1)
|
|
2875
2900
|
])
|
|
2876
2901
|
])
|
|
2877
|
-
])) :
|
|
2902
|
+
])) : j("", !0)
|
|
2878
2903
|
])),
|
|
2879
|
-
|
|
2904
|
+
Z(g, {
|
|
2880
2905
|
trigger: "hover",
|
|
2881
2906
|
placement: "left",
|
|
2882
2907
|
teleport: "body",
|
|
2883
2908
|
class: "flex"
|
|
2884
2909
|
}, {
|
|
2885
|
-
reference:
|
|
2886
|
-
|
|
2910
|
+
reference: W(() => [
|
|
2911
|
+
Z(v, {
|
|
2887
2912
|
onClick: i.togleGeolocation,
|
|
2888
2913
|
class: K([i.modalButtonClasses, "w-full h-auto p-[9px] [transition:.3s] hover:[transition:.3s] text-[24px] hover:bg-[#DBEAFE] flex font-normal cursor-pointer text-[#1E40AF] bg-[#fff] rounded-[4px] border-[1px] border-solid border-[#E5E7EB]"])
|
|
2889
2914
|
}, null, 8, ["onClick", "class"])
|
|
2890
2915
|
]),
|
|
2891
|
-
default:
|
|
2916
|
+
default: W(() => [
|
|
2892
2917
|
t[7] || (t[7] = r("div", null, "Дізнатися геолокацію", -1))
|
|
2893
2918
|
]),
|
|
2894
2919
|
_: 1
|
|
2895
2920
|
})
|
|
2896
2921
|
]);
|
|
2897
2922
|
}
|
|
2898
|
-
const
|
|
2923
|
+
const An = /* @__PURE__ */ H(Pn, [["render", Bn]]), Be = {
|
|
2899
2924
|
__name: "vs-map-widget-column",
|
|
2900
2925
|
props: {
|
|
2901
2926
|
position: String,
|
|
@@ -2920,8 +2945,8 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
2920
2945
|
"content-resize"
|
|
2921
2946
|
],
|
|
2922
2947
|
setup(e, { expose: t, emit: o }) {
|
|
2923
|
-
const
|
|
2924
|
-
|
|
2948
|
+
const s = o, n = e, i = B(
|
|
2949
|
+
n.widgets.map((l) => {
|
|
2925
2950
|
var u;
|
|
2926
2951
|
return {
|
|
2927
2952
|
...l,
|
|
@@ -2929,10 +2954,10 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
2929
2954
|
};
|
|
2930
2955
|
})
|
|
2931
2956
|
);
|
|
2932
|
-
|
|
2933
|
-
() =>
|
|
2957
|
+
fe(
|
|
2958
|
+
() => n.widgets.map((l) => l.id || l.type).join(","),
|
|
2934
2959
|
() => {
|
|
2935
|
-
i.value =
|
|
2960
|
+
i.value = n.widgets.map((l) => {
|
|
2936
2961
|
var u;
|
|
2937
2962
|
return {
|
|
2938
2963
|
...l,
|
|
@@ -2944,41 +2969,41 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
2944
2969
|
function d(l) {
|
|
2945
2970
|
const u = i.value.find((a) => a.id === l);
|
|
2946
2971
|
u && u.config && (u.config.visible = !u.config.visible, setTimeout(() => {
|
|
2947
|
-
|
|
2972
|
+
s("content-resize");
|
|
2948
2973
|
}, 30));
|
|
2949
2974
|
}
|
|
2950
|
-
const v =
|
|
2975
|
+
const v = B(null);
|
|
2951
2976
|
t({ columnRef: v });
|
|
2952
2977
|
let g = null;
|
|
2953
2978
|
return xe(() => {
|
|
2954
2979
|
g = new MutationObserver(() => {
|
|
2955
2980
|
var l;
|
|
2956
2981
|
clearTimeout((l = v.value) == null ? void 0 : l._resizeTimeout), v.value._resizeTimeout = setTimeout(() => {
|
|
2957
|
-
|
|
2982
|
+
s("content-resize");
|
|
2958
2983
|
}, 30);
|
|
2959
2984
|
}), v.value && g.observe(v.value, {
|
|
2960
2985
|
childList: !0,
|
|
2961
2986
|
subtree: !0,
|
|
2962
2987
|
characterData: !0
|
|
2963
2988
|
});
|
|
2964
|
-
}),
|
|
2989
|
+
}), yt(() => {
|
|
2965
2990
|
g && g.disconnect();
|
|
2966
2991
|
}), (l, u) => e.mapLoaded ? (c(), p("div", {
|
|
2967
2992
|
key: 0,
|
|
2968
2993
|
class: "widget-column",
|
|
2969
2994
|
ref_key: "columnRef",
|
|
2970
2995
|
ref: v,
|
|
2971
|
-
style:
|
|
2996
|
+
style: he({
|
|
2972
2997
|
width: e.getColumnWidth(e.position),
|
|
2973
2998
|
paddingRight: e.rightColumnOffset
|
|
2974
2999
|
})
|
|
2975
3000
|
}, [
|
|
2976
|
-
(c(!0), p(
|
|
3001
|
+
(c(!0), p(A, null, N(i.value, (a) => {
|
|
2977
3002
|
var m;
|
|
2978
|
-
return c(), p(
|
|
3003
|
+
return c(), p(A, {
|
|
2979
3004
|
key: a.id || a.type
|
|
2980
3005
|
}, [
|
|
2981
|
-
a.type !== "card" ? ne((c(), X(
|
|
3006
|
+
a.type !== "card" ? ne((c(), X(Oe(e.getWidgetComponent(a.type)), {
|
|
2982
3007
|
key: 0,
|
|
2983
3008
|
map: e.map,
|
|
2984
3009
|
config: a.config,
|
|
@@ -2993,35 +3018,30 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
2993
3018
|
onCatalogLayers: u[3] || (u[3] = (h) => l.$emit("catalog-layers", h)),
|
|
2994
3019
|
class: "widget"
|
|
2995
3020
|
}, null, 40, ["map", "config", "hasFilters", "currentLayer", "enabledLayerIds", "history"])), [
|
|
2996
|
-
[
|
|
2997
|
-
]) :
|
|
3021
|
+
[Pe, ((m = a.config) == null ? void 0 : m.visible) !== !1]
|
|
3022
|
+
]) : j("", !0),
|
|
2998
3023
|
e.cardValues && a.type === "card" ? (c(), X(ot, {
|
|
2999
3024
|
key: 1,
|
|
3000
3025
|
config: a.config,
|
|
3001
3026
|
cardValues: e.cardValues,
|
|
3002
3027
|
class: "widget",
|
|
3003
3028
|
onClose: u[4] || (u[4] = (h) => l.$emit("closeCard"))
|
|
3004
|
-
}, null, 8, ["config", "cardValues"])) :
|
|
3029
|
+
}, null, 8, ["config", "cardValues"])) : j("", !0)
|
|
3005
3030
|
], 64);
|
|
3006
3031
|
}), 128))
|
|
3007
|
-
], 4)) :
|
|
3032
|
+
], 4)) : j("", !0);
|
|
3008
3033
|
}
|
|
3009
|
-
},
|
|
3034
|
+
}, On = { class: "map-widgets-flex" }, Dn = { class: "widgets-left" }, Un = { class: "widgets-top" }, Rn = { class: "widgets-bottom" }, Hn = { class: "widgets-right" }, Nn = { class: "widgets-top" }, Zn = { class: "widgets-bottom" }, Wn = { class: "absolute top-[180px] right-2 z-10 flex flex-col gap-[5px]" }, qn = /* @__PURE__ */ Ge({
|
|
3010
3035
|
__name: "vs-map",
|
|
3011
3036
|
props: {
|
|
3012
|
-
table: {
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
},
|
|
3016
|
-
height: {
|
|
3017
|
-
type: String,
|
|
3018
|
-
required: !0
|
|
3019
|
-
}
|
|
3037
|
+
table: {},
|
|
3038
|
+
name: {},
|
|
3039
|
+
height: {}
|
|
3020
3040
|
},
|
|
3021
3041
|
setup(e) {
|
|
3022
|
-
const t = e, o =
|
|
3023
|
-
let
|
|
3024
|
-
const i =
|
|
3042
|
+
const t = e, o = B(null), s = B(!1);
|
|
3043
|
+
let n = null;
|
|
3044
|
+
const i = B(null), d = B(null), v = B([]), g = B([]), l = B(null), u = B(null), a = B(null), m = B([]);
|
|
3025
3045
|
let h = null;
|
|
3026
3046
|
function f(b) {
|
|
3027
3047
|
return !a.value || !a.value.widgets ? [] : b === "center" ? [
|
|
@@ -3033,28 +3053,11 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3033
3053
|
(y) => (y.position || {}) === b
|
|
3034
3054
|
) || [];
|
|
3035
3055
|
}
|
|
3036
|
-
const L = (b, y, x) => {
|
|
3037
|
-
|
|
3038
|
-
if (b)
|
|
3039
|
-
if (x === "markdown") {
|
|
3040
|
-
const $ = b.replace(/\{\{([^}]+)\}\}/g, (w, C) => {
|
|
3041
|
-
try {
|
|
3042
|
-
return new Function("data", `with(data) { return ${C} }`)(y);
|
|
3043
|
-
} catch {
|
|
3044
|
-
return "";
|
|
3045
|
-
}
|
|
3046
|
-
});
|
|
3047
|
-
return marked($);
|
|
3048
|
-
} else
|
|
3049
|
-
return y[b] || b;
|
|
3050
|
-
} catch ($) {
|
|
3051
|
-
return console.error("Error processing template:", $), b;
|
|
3052
|
-
}
|
|
3053
|
-
}, j = (b, y, x, $, w) => {
|
|
3054
|
-
const C = L(b, $, w), P = y ? L(y, $, w) : "";
|
|
3056
|
+
const L = (b, y, x) => y[b] || b, F = (b, y, x, I, w) => {
|
|
3057
|
+
const C = L(b, I), P = y ? L(y, I) : "";
|
|
3055
3058
|
let V = "";
|
|
3056
3059
|
return x != null && x.length && (V = x.map((E) => {
|
|
3057
|
-
const J = L(E.value,
|
|
3060
|
+
const J = L(E.value, I);
|
|
3058
3061
|
return `
|
|
3059
3062
|
<tr class="flex justify-between items-center">
|
|
3060
3063
|
<td class="font-medium mr-1.5 flex items-center">${E.label}</td>
|
|
@@ -3079,35 +3082,35 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3079
3082
|
</div>
|
|
3080
3083
|
`;
|
|
3081
3084
|
}, T = (b) => ({
|
|
3082
|
-
legend:
|
|
3085
|
+
legend: It,
|
|
3083
3086
|
basemaps: Ft,
|
|
3084
|
-
layers:
|
|
3085
|
-
info:
|
|
3086
|
-
attribute:
|
|
3087
|
-
catalog:
|
|
3088
|
-
filters:
|
|
3089
|
-
"inline-filters":
|
|
3090
|
-
list:
|
|
3087
|
+
layers: io,
|
|
3088
|
+
info: mo,
|
|
3089
|
+
attribute: Yo,
|
|
3090
|
+
catalog: Fs,
|
|
3091
|
+
filters: zs,
|
|
3092
|
+
"inline-filters": Us,
|
|
3093
|
+
list: en,
|
|
3091
3094
|
card: ot
|
|
3092
3095
|
})[b], k = M(() => !!a.value && Array.isArray(a.value.widgets) && a.value.widgets.some((b) => b.type === "filters")), _ = (b) => {
|
|
3093
3096
|
i.value = b;
|
|
3094
3097
|
};
|
|
3095
3098
|
function D() {
|
|
3096
|
-
const b = new URLSearchParams(window.location.search), y = parseFloat(b.get("x")), x = parseFloat(b.get("y")),
|
|
3099
|
+
const b = new URLSearchParams(window.location.search), y = parseFloat(b.get("x")), x = parseFloat(b.get("y")), I = parseFloat(b.get("z")), w = parseFloat(b.get("bearing")), C = parseFloat(b.get("pitch"));
|
|
3097
3100
|
return {
|
|
3098
3101
|
center: isFinite(y) && isFinite(x) ? [y, x] : null,
|
|
3099
|
-
zoom: isFinite(
|
|
3102
|
+
zoom: isFinite(I) ? I : null,
|
|
3100
3103
|
bearing: isFinite(w) ? w : null,
|
|
3101
3104
|
pitch: isFinite(C) ? C : null
|
|
3102
3105
|
};
|
|
3103
3106
|
}
|
|
3104
|
-
function le({ center: b, zoom: y, bearing: x, pitch:
|
|
3107
|
+
function le({ center: b, zoom: y, bearing: x, pitch: I }) {
|
|
3105
3108
|
const w = new URLSearchParams(window.location.search);
|
|
3106
|
-
w.set("x", b[0].toFixed(5)), w.set("y", b[1].toFixed(5)), w.set("z", y.toFixed(2)), w.set("bearing", x.toFixed(2)), w.set("pitch",
|
|
3109
|
+
w.set("x", b[0].toFixed(5)), w.set("y", b[1].toFixed(5)), w.set("z", y.toFixed(2)), w.set("bearing", x.toFixed(2)), w.set("pitch", I.toFixed(2));
|
|
3107
3110
|
const C = `${window.location.pathname}?${w.toString()}`;
|
|
3108
3111
|
window.history.replaceState({}, "", C);
|
|
3109
3112
|
}
|
|
3110
|
-
const
|
|
3113
|
+
const pe = () => {
|
|
3111
3114
|
var C, P, V;
|
|
3112
3115
|
if (!a.value || !a.value.map) return;
|
|
3113
3116
|
const b = {
|
|
@@ -3116,33 +3119,29 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3116
3119
|
sources: {},
|
|
3117
3120
|
layers: []
|
|
3118
3121
|
};
|
|
3119
|
-
let y = a.value.map.center, x = a.value.map.zoom,
|
|
3122
|
+
let y = a.value.map.center, x = a.value.map.zoom, I = a.value.map.bearing || 0, w = a.value.map.pitch || 0;
|
|
3120
3123
|
if (a.value.history) {
|
|
3121
3124
|
const E = D();
|
|
3122
|
-
E.center && (y = E.center), E.zoom !== null && (x = E.zoom), E.bearing !== null && (
|
|
3125
|
+
E.center && (y = E.center), E.zoom !== null && (x = E.zoom), E.bearing !== null && (I = E.bearing), E.pitch !== null && (w = E.pitch);
|
|
3123
3126
|
}
|
|
3124
3127
|
o.value = new maplibregl.Map({
|
|
3125
3128
|
container: "maplibre-demo-map",
|
|
3126
3129
|
style: b,
|
|
3127
3130
|
center: y,
|
|
3128
3131
|
zoom: x,
|
|
3129
|
-
bearing:
|
|
3132
|
+
bearing: I,
|
|
3130
3133
|
pitch: w,
|
|
3131
3134
|
maxBounds: [18.0856083513, 40.3614785833, 58.0807890155, 56.3350745713]
|
|
3132
|
-
}), (V = (P = (C = a == null ? void 0 : a.value) == null ? void 0 : C.interactions) == null ? void 0 : P.navigation) != null && V.enabled && !h && (h = new maplibregl.NavigationControl({
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
visualizePitch: !0
|
|
3136
|
-
}), o.value.addControl(h, "top-right")), o.value.on("load", async () => {
|
|
3137
|
-
var Y, ke, U, Le, Fe;
|
|
3138
|
-
n.value = !0;
|
|
3135
|
+
}), (V = (P = (C = a == null ? void 0 : a.value) == null ? void 0 : C.interactions) == null ? void 0 : P.navigation) != null && V.enabled && !h && (h = new maplibregl.NavigationControl(), o.value.addControl(h, "top-right")), o.value.on("load", async () => {
|
|
3136
|
+
var Y, ke, U, Le, Se;
|
|
3137
|
+
s.value = !0;
|
|
3139
3138
|
const E = D(), J = E.center && E.zoom !== null;
|
|
3140
3139
|
if ((Y = a.value.map) != null && Y.bbox && !J) {
|
|
3141
|
-
const [q, R,
|
|
3140
|
+
const [q, R, $, te] = a.value.map.bbox;
|
|
3142
3141
|
o.value.fitBounds(
|
|
3143
3142
|
[
|
|
3144
3143
|
[q, R],
|
|
3145
|
-
[
|
|
3144
|
+
[$, te]
|
|
3146
3145
|
],
|
|
3147
3146
|
{
|
|
3148
3147
|
padding: 50,
|
|
@@ -3151,33 +3150,33 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3151
3150
|
);
|
|
3152
3151
|
}
|
|
3153
3152
|
if (await (async () => {
|
|
3154
|
-
var R,
|
|
3155
|
-
const q = ((ee = (re = (
|
|
3153
|
+
var R, $, te, re, ee;
|
|
3154
|
+
const q = ((ee = (re = (te = ($ = (R = a.value) == null ? void 0 : R.widgets) == null ? void 0 : $.find((z) => z.type === "layers")) == null ? void 0 : te.config) == null ? void 0 : re.layers) == null ? void 0 : ee.filter(
|
|
3156
3155
|
(z) => {
|
|
3157
|
-
var
|
|
3158
|
-
return ((
|
|
3156
|
+
var ce;
|
|
3157
|
+
return ((ce = z.style) == null ? void 0 : ce.attrType) === "icon-by-attribute";
|
|
3159
3158
|
}
|
|
3160
3159
|
)) || [];
|
|
3161
3160
|
for (const z of q) {
|
|
3162
|
-
const { rules:
|
|
3161
|
+
const { rules: ce, default_icon: ve, icon_base_url: me } = z.style, ye = [...ce.map((se) => se.icon), ve].filter(
|
|
3163
3162
|
Boolean
|
|
3164
3163
|
);
|
|
3165
3164
|
for (const se of ye)
|
|
3166
3165
|
try {
|
|
3167
|
-
const
|
|
3166
|
+
const de = `${me}${se}`, be = await o.value.loadImage(de);
|
|
3168
3167
|
o.value.hasImage(se) || o.value.addImage(se, be.data);
|
|
3169
|
-
} catch (
|
|
3170
|
-
console.error(`Failed to load icon: ${se}`,
|
|
3168
|
+
} catch (de) {
|
|
3169
|
+
console.error(`Failed to load icon: ${se}`, de);
|
|
3171
3170
|
}
|
|
3172
3171
|
}
|
|
3173
3172
|
})(), (Le = (U = (ke = a.value) == null ? void 0 : ke.interactions) == null ? void 0 : U.hover) != null && Le.enabled && (o.value.on("mousemove", (q) => {
|
|
3174
|
-
var
|
|
3173
|
+
var ce, ve, me, ye, se, de, be, je, Q, ze;
|
|
3175
3174
|
const R = o.value.queryRenderedFeatures(q.point);
|
|
3176
3175
|
if (o.value && o.value.getCanvas && (o.value.getCanvas().style.cursor = R.length ? "pointer" : ""), !R.length) {
|
|
3177
3176
|
if (d.value) {
|
|
3178
|
-
const O = (
|
|
3177
|
+
const O = (ce = o.value.getSource(
|
|
3179
3178
|
d.value.source
|
|
3180
|
-
)) == null ? void 0 :
|
|
3179
|
+
)) == null ? void 0 : ce.type;
|
|
3181
3180
|
d.value.source, d.value.id, O === "vector" && d.value.source, ge(
|
|
3182
3181
|
o.value,
|
|
3183
3182
|
d.value.source,
|
|
@@ -3185,11 +3184,11 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3185
3184
|
{ hovered: !1 }
|
|
3186
3185
|
), d.value = null;
|
|
3187
3186
|
}
|
|
3188
|
-
|
|
3187
|
+
n && (n.remove(), n = null);
|
|
3189
3188
|
return;
|
|
3190
3189
|
}
|
|
3191
|
-
const
|
|
3192
|
-
if (!d.value || d.value.id !==
|
|
3190
|
+
const $ = R[0];
|
|
3191
|
+
if (!d.value || d.value.id !== $.id || d.value.source !== $.layer.source) {
|
|
3193
3192
|
if (d.value) {
|
|
3194
3193
|
const Re = (ve = o.value.getSource(
|
|
3195
3194
|
d.value.source
|
|
@@ -3201,46 +3200,46 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3201
3200
|
{ hovered: !1 }
|
|
3202
3201
|
);
|
|
3203
3202
|
}
|
|
3204
|
-
const O = (me = o.value.getSource(
|
|
3205
|
-
|
|
3203
|
+
const O = (me = o.value.getSource($.layer.source)) == null ? void 0 : me.type;
|
|
3204
|
+
$.layer.source, $.id, O === "vector" && $.layer.source, ge(o.value, $.layer.source, $.id, {
|
|
3206
3205
|
hovered: !0
|
|
3207
|
-
}), d.value = { source:
|
|
3206
|
+
}), d.value = { source: $.layer.source, id: $.id };
|
|
3208
3207
|
}
|
|
3209
|
-
const
|
|
3208
|
+
const te = (se = (ye = a.value) == null ? void 0 : ye.widgets) == null ? void 0 : se.find(
|
|
3210
3209
|
(O) => O.type === "layers"
|
|
3211
|
-
), re = (be = (
|
|
3210
|
+
), re = (be = (de = a.value) == null ? void 0 : de.widgets) == null ? void 0 : be.find(
|
|
3212
3211
|
(O) => O.type === "attribute"
|
|
3213
3212
|
);
|
|
3214
3213
|
let ee = null;
|
|
3215
|
-
if (
|
|
3216
|
-
(O) => O.id ===
|
|
3214
|
+
if (te && (ee = te.config.layers.find(
|
|
3215
|
+
(O) => O.id === $.layer.source
|
|
3217
3216
|
)), (Q = (je = a.value) == null ? void 0 : je.widgets) == null ? void 0 : Q.find(
|
|
3218
3217
|
(O) => O.type === "catalog"
|
|
3219
3218
|
)) {
|
|
3220
3219
|
if (!R.length) {
|
|
3221
|
-
|
|
3220
|
+
n && (n.style.display = "none");
|
|
3222
3221
|
return;
|
|
3223
3222
|
}
|
|
3224
3223
|
const O = R[0];
|
|
3225
|
-
|
|
3224
|
+
n = ut(O, q, n);
|
|
3226
3225
|
return;
|
|
3227
3226
|
}
|
|
3228
|
-
if (!ee && re && re.config.layer.id ===
|
|
3227
|
+
if (!ee && re && re.config.layer.id === $.layer.source && (ee = re.config.layer), (ze = ee == null ? void 0 : ee.style) != null && ze.popup) {
|
|
3229
3228
|
const O = ee.style.popup;
|
|
3230
3229
|
let Re = O.title, He = "";
|
|
3231
3230
|
O.mode === "markdown" ? He = Array.isArray(O.content) ? O.content.join(`
|
|
3232
3231
|
|
|
3233
|
-
`) : "" : He = Array.isArray(O.content) ? O.content.join("") : "",
|
|
3232
|
+
`) : "" : He = Array.isArray(O.content) ? O.content.join("") : "", n || (n = document.createElement("div"), o.value.getContainer().appendChild(n)), n.innerHTML = F(
|
|
3234
3233
|
Re,
|
|
3235
3234
|
He,
|
|
3236
3235
|
O.fields,
|
|
3237
|
-
|
|
3236
|
+
$.properties,
|
|
3238
3237
|
O.mode
|
|
3239
|
-
),
|
|
3238
|
+
), Ye(n, q);
|
|
3240
3239
|
}
|
|
3241
3240
|
}), o.value.on("mouseleave", () => {
|
|
3242
3241
|
var q;
|
|
3243
|
-
if (
|
|
3242
|
+
if (n && (n.remove(), n = null), d.value) {
|
|
3244
3243
|
const R = (q = o.value.getSource(
|
|
3245
3244
|
d.value.source
|
|
3246
3245
|
)) == null ? void 0 : q.type;
|
|
@@ -3253,54 +3252,54 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3253
3252
|
}
|
|
3254
3253
|
o.value && o.value.getCanvas && (o.value.getCanvas().style.cursor = "");
|
|
3255
3254
|
})), o.value.on("click", async (q) => {
|
|
3256
|
-
var ve, me, ye, se,
|
|
3257
|
-
if (
|
|
3255
|
+
var ve, me, ye, se, de, be, je;
|
|
3256
|
+
if (oe(), ["length", "area", "print"].includes(u.value)) return;
|
|
3258
3257
|
const R = o.value.queryRenderedFeatures(q.point);
|
|
3259
3258
|
if (!R.length) return;
|
|
3260
|
-
const
|
|
3259
|
+
const $ = R[0], te = (me = (ve = a.value) == null ? void 0 : ve.widgets) == null ? void 0 : me.find(
|
|
3261
3260
|
(Q) => Q.type === "layers"
|
|
3262
3261
|
), re = (se = (ye = a.value) == null ? void 0 : ye.widgets) == null ? void 0 : se.find(
|
|
3263
3262
|
(Q) => Q.type === "attribute"
|
|
3264
|
-
), ee = (be = (
|
|
3263
|
+
), ee = (be = (de = a.value) == null ? void 0 : de.widgets) == null ? void 0 : be.find(
|
|
3265
3264
|
(Q) => Q.type === "catalog"
|
|
3266
3265
|
);
|
|
3267
3266
|
let z;
|
|
3268
|
-
if (ee ? z =
|
|
3267
|
+
if (ee ? z = $.layer.source : z = (re == null ? void 0 : re.config.layer) || (te == null ? void 0 : te.config.layers.find((Q) => Q.id === $.layer.source)), z != null && z.noCard) return;
|
|
3269
3268
|
v.value.forEach((Q) => {
|
|
3270
3269
|
var O;
|
|
3271
|
-
const
|
|
3272
|
-
Q.source, Q.id,
|
|
3270
|
+
const ze = (O = o.value.getSource(Q.source)) == null ? void 0 : O.type;
|
|
3271
|
+
Q.source, Q.id, ze === "vector" && Q.source, ge(o.value, Q.source, Q.id, {
|
|
3273
3272
|
selected: !1
|
|
3274
3273
|
});
|
|
3275
3274
|
}), v.value = [];
|
|
3276
|
-
const
|
|
3277
|
-
|
|
3275
|
+
const ce = (je = o.value.getSource($.layer.source)) == null ? void 0 : je.type;
|
|
3276
|
+
$.layer.source, $.id, ce === "vector" && $.layer.source, ge(o.value, $.layer.source, $.id, {
|
|
3278
3277
|
selected: !0
|
|
3279
|
-
}), v.value.push({ source:
|
|
3278
|
+
}), v.value.push({ source: $.layer.source, id: $.id }), l.value = {
|
|
3280
3279
|
layer: (z == null ? void 0 : z.service_key) || z || "",
|
|
3281
3280
|
map: (z == null ? void 0 : z.map_key) || "",
|
|
3282
|
-
id:
|
|
3281
|
+
id: $.properties.id,
|
|
3283
3282
|
title: (z == null ? void 0 : z.title) || ""
|
|
3284
3283
|
};
|
|
3285
3284
|
}), o.value.on("dblclick", (q) => {
|
|
3286
|
-
var
|
|
3287
|
-
if (
|
|
3288
|
-
|
|
3289
|
-
const R = (re = (
|
|
3285
|
+
var te, re, ee;
|
|
3286
|
+
if (oe(), ["length", "area", "print"].includes(u.value)) return;
|
|
3287
|
+
at([q.lngLat.lng, q.lngLat.lat]);
|
|
3288
|
+
const R = (re = (te = a.value) == null ? void 0 : te.widgets) == null ? void 0 : re.find(
|
|
3290
3289
|
(z) => z.type === "layers"
|
|
3291
3290
|
);
|
|
3292
|
-
let
|
|
3293
|
-
(ee = R == null ? void 0 : R.config) != null && ee.layers && (
|
|
3291
|
+
let $ = null;
|
|
3292
|
+
(ee = R == null ? void 0 : R.config) != null && ee.layers && ($ = R.config.layers.find(
|
|
3294
3293
|
(z) => z.visible !== !1 && ["tms", "wms", "raster"].includes(
|
|
3295
3294
|
(z.service_type || z.service || "").toLowerCase()
|
|
3296
3295
|
)
|
|
3297
|
-
)), !(
|
|
3298
|
-
layer: (
|
|
3299
|
-
map: (
|
|
3296
|
+
)), !($ != null && $.noCard) && (l.value = {
|
|
3297
|
+
layer: ($ == null ? void 0 : $.map_key) || "",
|
|
3298
|
+
map: ($ == null ? void 0 : $.service_key) || "",
|
|
3300
3299
|
id: "",
|
|
3301
|
-
title: (
|
|
3300
|
+
title: ($ == null ? void 0 : $.title) || ""
|
|
3302
3301
|
});
|
|
3303
|
-
}), o.value.resize(), (
|
|
3302
|
+
}), o.value.resize(), (Se = a == null ? void 0 : a.value) != null && Se.history) {
|
|
3304
3303
|
const q = () => {
|
|
3305
3304
|
const R = o.value.getCenter();
|
|
3306
3305
|
le({
|
|
@@ -3313,71 +3312,57 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3313
3312
|
o.value.on("moveend", q), o.value.on("rotate", q), o.value.on("pitch", q);
|
|
3314
3313
|
}
|
|
3315
3314
|
});
|
|
3316
|
-
},
|
|
3317
|
-
|
|
3315
|
+
}, oe = () => {
|
|
3316
|
+
Je(), v.value.forEach((b) => {
|
|
3318
3317
|
o.value && ge(o.value, b.source, b.id, {
|
|
3319
3318
|
selected: !1
|
|
3320
3319
|
});
|
|
3321
3320
|
}), v.value = [], l.value = null;
|
|
3322
3321
|
};
|
|
3323
3322
|
xe(async () => {
|
|
3324
|
-
await
|
|
3323
|
+
await Ue(), await Ee(), pe();
|
|
3325
3324
|
const b = document.getElementById("maplibre-demo-map");
|
|
3326
3325
|
b && b.addEventListener("mouseleave", () => {
|
|
3327
|
-
|
|
3328
|
-
})
|
|
3329
|
-
() => t.table,
|
|
3330
|
-
async (y) => {
|
|
3331
|
-
if (y) {
|
|
3332
|
-
if (te(), u.value = null, s && (s.remove(), s = null), o.value) {
|
|
3333
|
-
try {
|
|
3334
|
-
o.value.remove();
|
|
3335
|
-
} catch {
|
|
3336
|
-
}
|
|
3337
|
-
o.value = null, n.value = !1;
|
|
3338
|
-
}
|
|
3339
|
-
await Me(), await $e(), ce();
|
|
3340
|
-
}
|
|
3341
|
-
}
|
|
3342
|
-
);
|
|
3326
|
+
n && (n.remove(), n = null);
|
|
3327
|
+
});
|
|
3343
3328
|
});
|
|
3344
|
-
const
|
|
3329
|
+
const De = M(() => ({
|
|
3345
3330
|
height: (t == null ? void 0 : t.height) || "100vh",
|
|
3346
3331
|
width: "100%"
|
|
3347
|
-
})),
|
|
3348
|
-
const b = await fetch(`/api/map/${t.table}`).then((y) => y.json());
|
|
3332
|
+
})), Ue = async () => {
|
|
3333
|
+
const b = await fetch(`/api/map/${t.name || t.table || "main"}`).then((y) => y.json());
|
|
3349
3334
|
a.value = b;
|
|
3350
|
-
},
|
|
3335
|
+
}, Me = (b) => {
|
|
3351
3336
|
if (!a.value || !a.value.widgets) return "400px";
|
|
3352
3337
|
const y = a.value.widgets.find((x) => x.position === b);
|
|
3353
3338
|
return (y == null ? void 0 : y.width) || "400px";
|
|
3354
|
-
}, ie =
|
|
3355
|
-
|
|
3339
|
+
}, ie = B([]);
|
|
3340
|
+
fe(
|
|
3356
3341
|
() => a.value,
|
|
3357
3342
|
(b) => {
|
|
3358
|
-
b && b.map && (ie.value =
|
|
3343
|
+
b && b.map && (ie.value = st(), pe());
|
|
3359
3344
|
}
|
|
3360
3345
|
);
|
|
3361
|
-
const
|
|
3346
|
+
const st = () => {
|
|
3362
3347
|
var y;
|
|
3363
3348
|
if (!a.value || !a.value.widgets) return [];
|
|
3364
3349
|
const b = a.value.widgets.find((x) => x.type === "layers");
|
|
3365
3350
|
return (y = b == null ? void 0 : b.config) != null && y.layers ? b.config.layers.map((x) => ({ ...x, visible: x.visible ?? !1 })).filter((x) => x.visible).map((x) => x.id) : [];
|
|
3366
3351
|
};
|
|
3367
|
-
function ge(b, y, x,
|
|
3352
|
+
function ge(b, y, x, I) {
|
|
3368
3353
|
b.getStyle().layers.filter((C) => C.source === y).forEach((C) => {
|
|
3369
3354
|
var V;
|
|
3370
3355
|
const P = { source: y, id: x };
|
|
3371
|
-
((V = b.getSource(y)) == null ? void 0 : V.type) === "vector" && C["source-layer"] && (P.sourceLayer = C["source-layer"]), b.setFeatureState(P,
|
|
3356
|
+
((V = b.getSource(y)) == null ? void 0 : V.type) === "vector" && C["source-layer"] && (P.sourceLayer = C["source-layer"]), b.setFeatureState(P, I);
|
|
3372
3357
|
});
|
|
3373
3358
|
}
|
|
3374
|
-
const
|
|
3375
|
-
function
|
|
3359
|
+
const nt = M(() => !!a.value && !!a.value.interactions && !!a.value.interactions.navigation && a.value.interactions.navigation.enabled), it = M(() => !!a.value && Array.isArray(a.value.tools) && a.value.tools.length > 0), Te = M(() => nt.value || it.value ? "40px" : "20px");
|
|
3360
|
+
function Je() {
|
|
3376
3361
|
o.value && (o.value.getLayer("layer-with-pulsing-dot") && o.value.removeLayer("layer-with-pulsing-dot"), o.value.getSource("dot-point") && o.value.removeSource("dot-point"), o.value.hasImage && o.value.hasImage("pulsing-dot") && o.value.removeImage("pulsing-dot"));
|
|
3377
3362
|
}
|
|
3378
|
-
function
|
|
3379
|
-
var
|
|
3380
|
-
|
|
3363
|
+
function at(b) {
|
|
3364
|
+
var I, w, C, P;
|
|
3365
|
+
Je();
|
|
3381
3366
|
const y = 80, x = {
|
|
3382
3367
|
width: y,
|
|
3383
3368
|
height: y,
|
|
@@ -3388,8 +3373,8 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3388
3373
|
},
|
|
3389
3374
|
render() {
|
|
3390
3375
|
var U;
|
|
3391
|
-
const E = performance.now() % 2e3 / 2e3, J = y / 2 * 0.3,
|
|
3392
|
-
Y.clearRect(0, 0, this.width, this.height), Y.beginPath(), Y.arc(this.width / 2, this.height / 2,
|
|
3376
|
+
const E = performance.now() % 2e3 / 2e3, J = y / 2 * 0.3, Ve = y / 2 * 0.7 * E + J, { context: Y } = this;
|
|
3377
|
+
Y.clearRect(0, 0, this.width, this.height), Y.beginPath(), Y.arc(this.width / 2, this.height / 2, Ve, 0, Math.PI * 2), Y.fillStyle = `rgba(255, 100, 100, ${1 - E})`, Y.fill();
|
|
3393
3378
|
const ke = y / 2 * 0.7 * (E - 0.5 < 0 ? E - 0.5 + 1 : E - 0.5) + J;
|
|
3394
3379
|
return Y.beginPath(), Y.arc(
|
|
3395
3380
|
this.width / 2,
|
|
@@ -3400,7 +3385,7 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3400
3385
|
), Y.fillStyle = `rgba(255, 100, 100, ${1 - (E - 0.5 < 0 ? E - 0.5 + 1 : E - 0.5)})`, Y.fill(), this.data = Y.getImageData(0, 0, this.width, this.height).data, (U = o.value) == null || U.triggerRepaint(), !0;
|
|
3401
3386
|
}
|
|
3402
3387
|
};
|
|
3403
|
-
(
|
|
3388
|
+
(I = o.value) != null && I.hasImage("pulsing-dot") || (w = o.value) == null || w.addImage("pulsing-dot", x, { pixelRatio: 2 }), (C = o.value) == null || C.addSource("dot-point", {
|
|
3404
3389
|
type: "geojson",
|
|
3405
3390
|
data: {
|
|
3406
3391
|
type: "Feature",
|
|
@@ -3414,74 +3399,74 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3414
3399
|
paint: { "icon-opacity": 0.6 }
|
|
3415
3400
|
});
|
|
3416
3401
|
}
|
|
3417
|
-
const
|
|
3418
|
-
var b, y, x,
|
|
3402
|
+
const lt = M(() => {
|
|
3403
|
+
var b, y, x, I, w, C, P, V, E, J;
|
|
3419
3404
|
return {
|
|
3420
3405
|
center: (y = (b = a == null ? void 0 : a.value) == null ? void 0 : b.map) == null ? void 0 : y.center,
|
|
3421
|
-
zoom: (
|
|
3406
|
+
zoom: (I = (x = a == null ? void 0 : a.value) == null ? void 0 : x.map) == null ? void 0 : I.zoom,
|
|
3422
3407
|
pitch: ((C = (w = a == null ? void 0 : a.value) == null ? void 0 : w.map) == null ? void 0 : C.pitch) || 0,
|
|
3423
3408
|
bearing: ((V = (P = a == null ? void 0 : a.value) == null ? void 0 : P.map) == null ? void 0 : V.bearing) || 0,
|
|
3424
3409
|
bbox: ((J = (E = a == null ? void 0 : a.value) == null ? void 0 : E.map) == null ? void 0 : J.bbox) || null
|
|
3425
3410
|
};
|
|
3426
|
-
}),
|
|
3427
|
-
home:
|
|
3428
|
-
print:
|
|
3429
|
-
geolocation:
|
|
3430
|
-
pitch:
|
|
3411
|
+
}), Qe = {
|
|
3412
|
+
home: un,
|
|
3413
|
+
print: yn,
|
|
3414
|
+
geolocation: An,
|
|
3415
|
+
pitch: xn
|
|
3431
3416
|
// length: VsLengthMeasure,
|
|
3432
3417
|
// area: VsAreaMeasure,
|
|
3433
|
-
},
|
|
3418
|
+
}, ct = (b) => {
|
|
3434
3419
|
u.value = b;
|
|
3435
3420
|
};
|
|
3436
3421
|
function _e(b) {
|
|
3437
3422
|
if (!a.value || !a.value.widgets) return;
|
|
3438
3423
|
const y = a.value.widgets.find((w) => w.type === "list");
|
|
3439
3424
|
if (!y || !y.config) return;
|
|
3440
|
-
const { map_key: x, service_key:
|
|
3441
|
-
x &&
|
|
3425
|
+
const { map_key: x, service_key: I } = y.config;
|
|
3426
|
+
x && I && (l.value = {
|
|
3442
3427
|
id: b,
|
|
3443
3428
|
map: x,
|
|
3444
|
-
layer:
|
|
3429
|
+
layer: I
|
|
3445
3430
|
});
|
|
3446
3431
|
}
|
|
3447
|
-
const
|
|
3432
|
+
const dt = M(
|
|
3448
3433
|
() => a.value && a.value.widgets ? a.value.widgets.filter((b) => b.position === "absolute") : []
|
|
3449
3434
|
);
|
|
3450
|
-
function
|
|
3451
|
-
const
|
|
3435
|
+
function ut(b, y, x) {
|
|
3436
|
+
const I = b.properties, w = m.value.find(
|
|
3452
3437
|
(U) => String(U.id) === String(b.source)
|
|
3453
|
-
), C = Array.isArray(w == null ? void 0 : w.popup) ? w.popup : [], V = C.filter((U) => U.meta === "image").map((U) =>
|
|
3438
|
+
), C = Array.isArray(w == null ? void 0 : w.popup) ? w.popup : [], V = C.filter((U) => U.meta === "image").map((U) => I == null ? void 0 : I[U.name]).filter(Boolean), E = V.length > 0 ? `
|
|
3454
3439
|
<div class="popup-image-single overflow-hidden rounded-t-xl" style="width:260px;height:160px;margin:0 auto 0 auto;">
|
|
3455
3440
|
<img src="${V[0]}" style="width:100%;height:100%;object-fit:cover;border-radius:12px 12px 0 0;display:block;" />
|
|
3456
3441
|
</div>
|
|
3457
|
-
` : "", J = C.find((U) => U.meta === "title"),
|
|
3442
|
+
` : "", J = C.find((U) => U.meta === "title"), Ve = J ? I == null ? void 0 : I[J.name] : "";
|
|
3458
3443
|
let Y = C.filter((U) => U.meta !== "title" && U.meta !== "image").map((U) => {
|
|
3459
|
-
const Le =
|
|
3460
|
-
let
|
|
3444
|
+
const Le = I == null ? void 0 : I[U.name];
|
|
3445
|
+
let Se = Le ?? "-";
|
|
3461
3446
|
switch (U.meta) {
|
|
3462
3447
|
case "badge":
|
|
3463
|
-
|
|
3448
|
+
Se = Le ? `<span class="inline-block rounded px-2 py-0.5 text-xs bg-yellow-100 text-yellow-800 ">${Le}</span>` : "-";
|
|
3464
3449
|
break;
|
|
3465
3450
|
}
|
|
3466
3451
|
return `
|
|
3467
3452
|
<tr style="display: table-row;">
|
|
3468
3453
|
<td style="display: table-cell; padding: 2px 8px 2px 0; vertical-align: middle; font-weight: 500; width: 50%; text-align: left;">${U.ua || U.name}</td>
|
|
3469
|
-
<td style="display: table-cell; padding: 2px 0 2px 8px; vertical-align: middle; width: 50%; text-align: right;">${
|
|
3454
|
+
<td style="display: table-cell; padding: 2px 0 2px 8px; vertical-align: middle; width: 50%; text-align: right;">${Se}</td>
|
|
3470
3455
|
</tr>
|
|
3471
3456
|
`;
|
|
3472
3457
|
}).join("");
|
|
3473
|
-
C.length || (Y = Object.keys(
|
|
3458
|
+
C.length || (Y = Object.keys(I).map(
|
|
3474
3459
|
(U) => `
|
|
3475
3460
|
<tr style="display: table-row;">
|
|
3476
3461
|
<td style="display: table-cell; padding: 2px 8px 2px 0; vertical-align: middle; font-weight: 500; width: 50%; text-align: left;">${U}</td>
|
|
3477
|
-
<td style="display: table-cell; padding: 2px 0 2px 8px; vertical-align: middle; width: 50%; text-align: right;">${
|
|
3462
|
+
<td style="display: table-cell; padding: 2px 0 2px 8px; vertical-align: middle; width: 50%; text-align: right;">${I[U] || "-"}</td>
|
|
3478
3463
|
</tr>
|
|
3479
3464
|
`
|
|
3480
3465
|
).join(""));
|
|
3481
3466
|
const ke = `
|
|
3482
3467
|
<div class="absolute min-w-[250px] max-w-[300px] bg-white/90 border border-gray-200 rounded-lg shadow-md text-gray-800 pointer-events-none" style="display: flex; flex-direction: column; justify-content: center;">
|
|
3483
3468
|
${E}
|
|
3484
|
-
${
|
|
3469
|
+
${Ve ? `<div class="font-semibold text-sm border-b border-solid border-gray-200 text-gray-800 px-2 py-1">${Ve}</div>` : ""}
|
|
3485
3470
|
<div class="text-xs px-2 py-0.5 text-gray-500" style="display: flex; justify-content: center; align-items: center; flex: 1;">
|
|
3486
3471
|
<table class="w-full" style="border-collapse: collapse; border: none; margin: 0 auto;">
|
|
3487
3472
|
<tbody>${Y}</tbody>
|
|
@@ -3489,135 +3474,135 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3489
3474
|
</div>
|
|
3490
3475
|
</div>
|
|
3491
3476
|
`;
|
|
3492
|
-
return x || (x = document.createElement("div"), x.className = "custom-popup absolute z-50", document.body.appendChild(x)), x.innerHTML = ke,
|
|
3477
|
+
return x || (x = document.createElement("div"), x.className = "custom-popup absolute z-50", document.body.appendChild(x)), x.innerHTML = ke, Ye(x, y), x;
|
|
3493
3478
|
}
|
|
3494
|
-
function
|
|
3495
|
-
const x = b.offsetWidth,
|
|
3479
|
+
function Ye(b, y) {
|
|
3480
|
+
const x = b.offsetWidth, I = b.offsetHeight, w = document.getElementById("maplibre-demo-map"), C = w.getBoundingClientRect(), P = y.originalEvent.clientX - C.left, V = y.originalEvent.clientY - C.top;
|
|
3496
3481
|
let E = P - x / 2;
|
|
3497
3482
|
E = Math.max(10, Math.min(E, C.width - x - 10));
|
|
3498
3483
|
let J;
|
|
3499
|
-
V -
|
|
3484
|
+
V - I - 10 > 0 ? J = V - I - 5 : V + I + 10 < C.height ? J = V + 10 : J = Math.max(10, C.height - I - 10), b.style.position = "absolute", b.style.left = `${E + 20}px`, b.style.top = `${J + 10}px`, b.parentNode !== w && w.appendChild(b);
|
|
3500
3485
|
}
|
|
3501
3486
|
return (b, y) => {
|
|
3502
|
-
var x,
|
|
3487
|
+
var x, I;
|
|
3503
3488
|
return c(), p("div", {
|
|
3504
3489
|
class: "maplibre-demo-map-container",
|
|
3505
|
-
style:
|
|
3490
|
+
style: he(De.value)
|
|
3506
3491
|
}, [
|
|
3507
3492
|
y[10] || (y[10] = r("div", { id: "maplibre-demo-map" }, null, -1)),
|
|
3508
|
-
|
|
3509
|
-
r("div",
|
|
3510
|
-
r("div",
|
|
3511
|
-
r("div",
|
|
3512
|
-
(c(), p(
|
|
3493
|
+
s.value ? (c(), p(A, { key: 1 }, [
|
|
3494
|
+
r("div", On, [
|
|
3495
|
+
r("div", Dn, [
|
|
3496
|
+
r("div", Un, [
|
|
3497
|
+
(c(), p(A, null, N(["top-left"], (w) => {
|
|
3513
3498
|
var C, P;
|
|
3514
|
-
return
|
|
3499
|
+
return Z(Be, {
|
|
3515
3500
|
key: w,
|
|
3516
3501
|
position: w,
|
|
3517
3502
|
widgets: f(w),
|
|
3518
3503
|
map: o.value,
|
|
3519
|
-
mapLoaded:
|
|
3504
|
+
mapLoaded: s.value,
|
|
3520
3505
|
cardValues: l.value,
|
|
3521
3506
|
hasFilters: k.value,
|
|
3522
3507
|
history: (P = (C = a.value) == null ? void 0 : C.value) == null ? void 0 : P.history,
|
|
3523
3508
|
currentFilterLayer: i.value,
|
|
3524
3509
|
enabledLayerIds: ie.value,
|
|
3525
3510
|
getWidgetComponent: T,
|
|
3526
|
-
getColumnWidth:
|
|
3527
|
-
rightColumnOffset: w === "top-right" ?
|
|
3511
|
+
getColumnWidth: Me,
|
|
3512
|
+
rightColumnOffset: w === "top-right" ? Te.value : void 0,
|
|
3528
3513
|
onSetFilterLayer: _,
|
|
3529
3514
|
"onUpdate:enabledLayerIds": y[0] || (y[0] = (V) => ie.value = V),
|
|
3530
3515
|
onCardValuesId: _e,
|
|
3531
|
-
onCloseCard:
|
|
3516
|
+
onCloseCard: oe,
|
|
3532
3517
|
onCatalogLayers: y[1] || (y[1] = (V) => m.value = V)
|
|
3533
3518
|
}, null, 8, ["position", "widgets", "map", "mapLoaded", "cardValues", "hasFilters", "history", "currentFilterLayer", "enabledLayerIds", "rightColumnOffset"]);
|
|
3534
3519
|
}), 64))
|
|
3535
3520
|
]),
|
|
3536
|
-
r("div",
|
|
3537
|
-
(c(), p(
|
|
3521
|
+
r("div", Rn, [
|
|
3522
|
+
(c(), p(A, null, N(["bottom-left"], (w) => {
|
|
3538
3523
|
var C, P;
|
|
3539
|
-
return
|
|
3524
|
+
return Z(Be, {
|
|
3540
3525
|
key: w,
|
|
3541
3526
|
position: w,
|
|
3542
3527
|
widgets: f(w),
|
|
3543
3528
|
map: o.value,
|
|
3544
|
-
mapLoaded:
|
|
3529
|
+
mapLoaded: s.value,
|
|
3545
3530
|
cardValues: l.value,
|
|
3546
3531
|
hasFilters: k.value,
|
|
3547
3532
|
history: (P = (C = a.value) == null ? void 0 : C.value) == null ? void 0 : P.history,
|
|
3548
3533
|
currentFilterLayer: i.value,
|
|
3549
3534
|
enabledLayerIds: ie.value,
|
|
3550
3535
|
getWidgetComponent: T,
|
|
3551
|
-
getColumnWidth:
|
|
3552
|
-
rightColumnOffset: w === "top-right" ?
|
|
3536
|
+
getColumnWidth: Me,
|
|
3537
|
+
rightColumnOffset: w === "top-right" ? Te.value : void 0,
|
|
3553
3538
|
onSetFilterLayer: _,
|
|
3554
3539
|
"onUpdate:enabledLayerIds": y[2] || (y[2] = (V) => ie.value = V),
|
|
3555
3540
|
onCardValuesId: _e,
|
|
3556
|
-
onCloseCard:
|
|
3541
|
+
onCloseCard: oe,
|
|
3557
3542
|
onCatalogLayers: y[3] || (y[3] = (V) => m.value = V)
|
|
3558
3543
|
}, null, 8, ["position", "widgets", "map", "mapLoaded", "cardValues", "hasFilters", "history", "currentFilterLayer", "enabledLayerIds", "rightColumnOffset"]);
|
|
3559
3544
|
}), 64))
|
|
3560
3545
|
])
|
|
3561
3546
|
]),
|
|
3562
|
-
r("div",
|
|
3563
|
-
r("div",
|
|
3564
|
-
(c(), p(
|
|
3547
|
+
r("div", Hn, [
|
|
3548
|
+
r("div", Nn, [
|
|
3549
|
+
(c(), p(A, null, N(["top-right"], (w) => {
|
|
3565
3550
|
var C, P;
|
|
3566
|
-
return
|
|
3551
|
+
return Z(Be, {
|
|
3567
3552
|
key: w,
|
|
3568
3553
|
position: w,
|
|
3569
3554
|
widgets: f(w),
|
|
3570
3555
|
map: o.value,
|
|
3571
|
-
mapLoaded:
|
|
3556
|
+
mapLoaded: s.value,
|
|
3572
3557
|
cardValues: l.value,
|
|
3573
3558
|
hasFilters: k.value,
|
|
3574
3559
|
history: (P = (C = a.value) == null ? void 0 : C.value) == null ? void 0 : P.history,
|
|
3575
3560
|
currentFilterLayer: i.value,
|
|
3576
3561
|
enabledLayerIds: ie.value,
|
|
3577
3562
|
getWidgetComponent: T,
|
|
3578
|
-
getColumnWidth:
|
|
3579
|
-
rightColumnOffset: w === "top-right" ?
|
|
3563
|
+
getColumnWidth: Me,
|
|
3564
|
+
rightColumnOffset: w === "top-right" ? Te.value : void 0,
|
|
3580
3565
|
onSetFilterLayer: _,
|
|
3581
3566
|
"onUpdate:enabledLayerIds": y[4] || (y[4] = (V) => ie.value = V),
|
|
3582
3567
|
onCardValuesId: _e,
|
|
3583
|
-
onCloseCard:
|
|
3568
|
+
onCloseCard: oe,
|
|
3584
3569
|
onCatalogLayers: y[5] || (y[5] = (V) => m.value = V)
|
|
3585
3570
|
}, null, 8, ["position", "widgets", "map", "mapLoaded", "cardValues", "hasFilters", "history", "currentFilterLayer", "enabledLayerIds", "rightColumnOffset"]);
|
|
3586
3571
|
}), 64))
|
|
3587
3572
|
]),
|
|
3588
|
-
r("div",
|
|
3589
|
-
(c(), p(
|
|
3573
|
+
r("div", Zn, [
|
|
3574
|
+
(c(), p(A, null, N(["bottom-right"], (w) => {
|
|
3590
3575
|
var C, P;
|
|
3591
|
-
return
|
|
3576
|
+
return Z(Be, {
|
|
3592
3577
|
key: w,
|
|
3593
3578
|
position: w,
|
|
3594
3579
|
widgets: f(w),
|
|
3595
3580
|
map: o.value,
|
|
3596
|
-
mapLoaded:
|
|
3581
|
+
mapLoaded: s.value,
|
|
3597
3582
|
cardValues: l.value,
|
|
3598
3583
|
hasFilters: k.value,
|
|
3599
3584
|
history: (P = (C = a.value) == null ? void 0 : C.value) == null ? void 0 : P.history,
|
|
3600
3585
|
currentFilterLayer: i.value,
|
|
3601
3586
|
enabledLayerIds: ie.value,
|
|
3602
3587
|
getWidgetComponent: T,
|
|
3603
|
-
getColumnWidth:
|
|
3604
|
-
rightColumnOffset: w === "top-right" ?
|
|
3588
|
+
getColumnWidth: Me,
|
|
3589
|
+
rightColumnOffset: w === "top-right" ? Te.value : void 0,
|
|
3605
3590
|
onSetFilterLayer: _,
|
|
3606
3591
|
"onUpdate:enabledLayerIds": y[6] || (y[6] = (V) => ie.value = V),
|
|
3607
3592
|
onCardValuesId: _e,
|
|
3608
|
-
onCloseCard:
|
|
3593
|
+
onCloseCard: oe,
|
|
3609
3594
|
onCatalogLayers: y[7] || (y[7] = (V) => m.value = V)
|
|
3610
3595
|
}, null, 8, ["position", "widgets", "map", "mapLoaded", "cardValues", "hasFilters", "history", "currentFilterLayer", "enabledLayerIds", "rightColumnOffset"]);
|
|
3611
3596
|
}), 64))
|
|
3612
3597
|
])
|
|
3613
3598
|
])
|
|
3614
3599
|
]),
|
|
3615
|
-
(c(!0), p(
|
|
3600
|
+
(c(!0), p(A, null, N(dt.value, (w, C) => (c(), p("div", {
|
|
3616
3601
|
key: "abs-" + (w.id || w.type || C),
|
|
3617
3602
|
class: "absolute z-20",
|
|
3618
|
-
style:
|
|
3603
|
+
style: he(w.style)
|
|
3619
3604
|
}, [
|
|
3620
|
-
(c(), X(
|
|
3605
|
+
(c(), X(Oe(T(w.type)), {
|
|
3621
3606
|
map: o.value,
|
|
3622
3607
|
config: w.config,
|
|
3623
3608
|
hasFilters: k.value,
|
|
@@ -3627,30 +3612,30 @@ const Mn = /* @__PURE__ */ H(Vn, [["render", En]]), Be = {
|
|
|
3627
3612
|
onSetFilterLayer: _,
|
|
3628
3613
|
"onUpdate:enabledLayerIds": y[8] || (y[8] = (P) => ie.value = P),
|
|
3629
3614
|
onCardValuesId: _e,
|
|
3630
|
-
onCloseCard:
|
|
3615
|
+
onCloseCard: oe,
|
|
3631
3616
|
onCatalogLayers: y[9] || (y[9] = (P) => m.value = P)
|
|
3632
3617
|
}, null, 40, ["map", "config", "hasFilters", "currentFilterLayer", "enabledLayerIds", "cardValues"]))
|
|
3633
3618
|
], 4))), 128)),
|
|
3634
|
-
r("div",
|
|
3635
|
-
(c(!0), p(
|
|
3636
|
-
|
|
3619
|
+
r("div", Wn, [
|
|
3620
|
+
(c(!0), p(A, null, N((I = (x = a.value) == null ? void 0 : x.value) == null ? void 0 : I.tools, (w) => (c(), p(A, { key: w }, [
|
|
3621
|
+
s.value && Qe[w] ? (c(), X(Oe(Qe[w]), bt({
|
|
3637
3622
|
key: 0,
|
|
3638
3623
|
map: o.value,
|
|
3639
3624
|
activeTool: u.value,
|
|
3640
|
-
setActiveTool:
|
|
3641
|
-
}, { ref_for: !0 }, w === "home" ? { initialView:
|
|
3625
|
+
setActiveTool: ct
|
|
3626
|
+
}, { ref_for: !0 }, w === "home" ? { initialView: lt.value } : {}, { onCardValuesId: _e }), null, 16, ["map", "activeTool"])) : j("", !0)
|
|
3642
3627
|
], 64))), 128))
|
|
3643
3628
|
])
|
|
3644
|
-
], 64)) : (c(), X(
|
|
3629
|
+
], 64)) : (c(), X(rn, { key: 0 }))
|
|
3645
3630
|
], 4);
|
|
3646
3631
|
};
|
|
3647
3632
|
}
|
|
3648
|
-
},
|
|
3649
|
-
function
|
|
3650
|
-
e.component("MapCustom",
|
|
3633
|
+
}), Gn = /* @__PURE__ */ H(qn, [["__scopeId", "data-v-09938096"]]);
|
|
3634
|
+
function Yn(e) {
|
|
3635
|
+
e.component("MapCustom", Gn);
|
|
3651
3636
|
}
|
|
3652
3637
|
export {
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3638
|
+
Gn as MapCustom,
|
|
3639
|
+
Gn as default,
|
|
3640
|
+
Yn as install
|
|
3656
3641
|
};
|