@opengis/gis 0.1.73 → 0.1.75
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 +1171 -1184
- package/dist/index.umd.cjs +13 -13
- package/package.json +52 -53
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { computed as
|
|
1
|
+
import { computed as E, createElementBlock as p, openBlock as c, normalizeStyle as he, createCommentVNode as F, createElementVNode as s, toDisplayString as S, Fragment as z, renderList as q, normalizeClass as K, ref as T, onMounted as ke, resolveDirective as pt, withDirectives as se, watch as fe, createVNode as Z, vModelText as He, vModelCheckbox as Ze, defineComponent as We, reactive as ht, onBeforeUnmount as ft, createBlock as X, renderSlot as Re, Teleport as Qe, Transition as gt, withCtx as G, vShow as je, nextTick as Pe, resolveComponent as J, unref as Ne, createTextVNode as ie, createStaticVNode as Ae, withModifiers as vt, resolveDynamicComponent as Be, withKeys as mt, onUnmounted as yt, getCurrentInstance as bt, mergeProps as wt } from "vue";
|
|
2
2
|
import xt from "@opengis/filter";
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
for (const [
|
|
6
|
-
o
|
|
7
|
-
return
|
|
3
|
+
const N = (e, t) => {
|
|
4
|
+
const r = e.__vccOpts || e;
|
|
5
|
+
for (const [o, i] of t)
|
|
6
|
+
r[o] = i;
|
|
7
|
+
return r;
|
|
8
8
|
}, _t = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "p-5 pb-0 flex justify-between items-center"
|
|
@@ -20,43 +20,43 @@ const H = (e, t) => {
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
setup(e) {
|
|
23
|
-
const t = e,
|
|
24
|
-
var
|
|
25
|
-
return ((
|
|
26
|
-
}),
|
|
27
|
-
var
|
|
28
|
-
return ((
|
|
23
|
+
const t = e, r = E(() => {
|
|
24
|
+
var i;
|
|
25
|
+
return ((i = t.config) == null ? void 0 : i.items) || [];
|
|
26
|
+
}), o = E(() => {
|
|
27
|
+
var i;
|
|
28
|
+
return ((i = t.config) == null ? void 0 : i.title) || "";
|
|
29
29
|
});
|
|
30
|
-
return (
|
|
30
|
+
return (i, n) => (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
32
|
style: he({ width: e.config.width || "100%" })
|
|
33
33
|
}, [
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
o.value ? (c(), p("div", _t, [
|
|
35
|
+
s("h2", kt, S(o.value), 1)
|
|
36
36
|
])) : F("", !0),
|
|
37
|
-
|
|
38
|
-
(c(!0), p(
|
|
37
|
+
s("div", Lt, [
|
|
38
|
+
(c(!0), p(z, null, q(r.value, (m) => (c(), p("div", {
|
|
39
39
|
class: "flex items-center",
|
|
40
|
-
key:
|
|
40
|
+
key: m.label
|
|
41
41
|
}, [
|
|
42
|
-
|
|
42
|
+
s("span", {
|
|
43
43
|
class: K(["shrink-0 size-2.5 inline-block me-2.5 h-[10px] w-[10px]", [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
m.shape === "square" ? "rounded-sm" : "",
|
|
45
|
+
m.shape === "circle" ? "rounded-full" : "",
|
|
46
|
+
m.shape === "line" ? "w-6 h-0.5" : "",
|
|
47
|
+
m.shape === "dashed-line" ? "w-6 h-0.5 dashed-line" : ""
|
|
48
48
|
]]),
|
|
49
|
-
style: he({ backgroundColor:
|
|
49
|
+
style: he({ backgroundColor: m.color })
|
|
50
50
|
}, null, 6),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
s("span", Ct, [
|
|
52
|
+
s("span", null, S(m.label), 1),
|
|
53
|
+
m.count !== void 0 ? (c(), p("span", $t, " (" + S(m.count) + ") ", 1)) : F("", !0)
|
|
54
54
|
])
|
|
55
55
|
]))), 128))
|
|
56
56
|
])
|
|
57
57
|
], 4));
|
|
58
58
|
}
|
|
59
|
-
}, Vt = /* @__PURE__ */
|
|
59
|
+
}, Vt = /* @__PURE__ */ N(It, [["__scopeId", "data-v-dd12cf90"]]), St = { class: "flex flex-row gap-x-3 z-10 relative" }, Ft = ["onClick"], jt = ["src", "alt"], Pt = {
|
|
60
60
|
__name: "vs-basemaps-widget",
|
|
61
61
|
props: {
|
|
62
62
|
map: {
|
|
@@ -73,10 +73,10 @@ const H = (e, t) => {
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
setup(e) {
|
|
76
|
-
const t = e,
|
|
76
|
+
const t = e, r = T("voyager"), o = E(() => {
|
|
77
77
|
var g;
|
|
78
78
|
if (!((g = t.config) != null && g.layers)) return [];
|
|
79
|
-
const
|
|
79
|
+
const h = t.config.layers.map((l) => ({
|
|
80
80
|
id: l.id,
|
|
81
81
|
title: l.label || l.title,
|
|
82
82
|
url: l.url,
|
|
@@ -87,7 +87,7 @@ const H = (e, t) => {
|
|
|
87
87
|
enabled: !0,
|
|
88
88
|
owner: l.owner || "Unknown"
|
|
89
89
|
}));
|
|
90
|
-
return
|
|
90
|
+
return h.push({
|
|
91
91
|
id: "__none__",
|
|
92
92
|
title: "Без підложки",
|
|
93
93
|
url: "",
|
|
@@ -96,121 +96,121 @@ const H = (e, t) => {
|
|
|
96
96
|
attribution: "",
|
|
97
97
|
enabled: !0,
|
|
98
98
|
owner: ""
|
|
99
|
-
}),
|
|
99
|
+
}), h;
|
|
100
100
|
});
|
|
101
|
-
function
|
|
101
|
+
function i(h) {
|
|
102
102
|
return {
|
|
103
103
|
version: 8,
|
|
104
104
|
sources: {
|
|
105
|
-
[
|
|
105
|
+
[h.id]: {
|
|
106
106
|
type: "raster",
|
|
107
|
-
tiles: [
|
|
107
|
+
tiles: [h.url],
|
|
108
108
|
tileSize: 256,
|
|
109
|
-
attribution:
|
|
109
|
+
attribution: h.attribution || ""
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
112
|
layers: [
|
|
113
113
|
{
|
|
114
|
-
id:
|
|
114
|
+
id: h.id,
|
|
115
115
|
type: "raster",
|
|
116
|
-
source:
|
|
116
|
+
source: h.id
|
|
117
117
|
}
|
|
118
118
|
]
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
|
-
const
|
|
121
|
+
const n = (h) => {
|
|
122
122
|
if (!t.map) return;
|
|
123
|
-
const g = t.map.getStyle(), l =
|
|
124
|
-
for (const
|
|
125
|
-
l.includes(
|
|
126
|
-
if (
|
|
127
|
-
const
|
|
123
|
+
const g = t.map.getStyle(), l = o.value.map((u) => u.id), d = g.layers.filter((u) => !l.includes(u.id)), v = {};
|
|
124
|
+
for (const u in g.sources)
|
|
125
|
+
l.includes(u) || (v[u] = g.sources[u]);
|
|
126
|
+
if (h.id === "__none__") {
|
|
127
|
+
const u = {
|
|
128
128
|
version: 8,
|
|
129
|
-
sources: { ...
|
|
130
|
-
layers: [...
|
|
129
|
+
sources: { ...v },
|
|
130
|
+
layers: [...d]
|
|
131
131
|
};
|
|
132
|
-
t.map.setStyle(
|
|
132
|
+
t.map.setStyle(u);
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
|
-
const
|
|
136
|
-
t.map.setStyle(
|
|
137
|
-
for (const [
|
|
138
|
-
t.map.getSource(
|
|
139
|
-
for (const
|
|
140
|
-
t.map.getLayer(
|
|
135
|
+
const a = i(h);
|
|
136
|
+
t.map.setStyle(a), t.map.once("styledata", () => {
|
|
137
|
+
for (const [u, f] of Object.entries(v))
|
|
138
|
+
t.map.getSource(u) || t.map.addSource(u, f);
|
|
139
|
+
for (const u of d)
|
|
140
|
+
t.map.getLayer(u.id) || t.map.addLayer(u);
|
|
141
141
|
});
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
const g =
|
|
145
|
-
g && t.map &&
|
|
142
|
+
}, m = (h) => {
|
|
143
|
+
r.value = h;
|
|
144
|
+
const g = o.value.find((l) => l.id === h);
|
|
145
|
+
g && t.map && n(g);
|
|
146
146
|
};
|
|
147
|
-
return
|
|
148
|
-
var
|
|
149
|
-
(
|
|
150
|
-
}), (
|
|
151
|
-
const l =
|
|
147
|
+
return ke(() => {
|
|
148
|
+
var h;
|
|
149
|
+
(h = t.config) != null && h.default && (r.value = t.config.default), m(r.value);
|
|
150
|
+
}), (h, g) => {
|
|
151
|
+
const l = pt("tooltip");
|
|
152
152
|
return c(), p("div", St, [
|
|
153
|
-
(c(!0), p(
|
|
153
|
+
(c(!0), p(z, null, q(o.value, (d) => se((c(), p("div", {
|
|
154
154
|
trigger: "hover",
|
|
155
155
|
placement: "top",
|
|
156
|
-
key:
|
|
156
|
+
key: d.id
|
|
157
157
|
}, [
|
|
158
|
-
|
|
158
|
+
s("div", {
|
|
159
159
|
class: K([
|
|
160
160
|
"w-14 h-14 flex items-center justify-center bg-gray-200 rounded-xl shadow-2xs cursor-pointer transition-all border-4",
|
|
161
|
-
|
|
161
|
+
r.value === d.id ? "border-blue-400" : "border-transparent"
|
|
162
162
|
]),
|
|
163
|
-
onClick: (
|
|
163
|
+
onClick: (v) => m(d.id)
|
|
164
164
|
}, [
|
|
165
|
-
|
|
165
|
+
d.image ? (c(), p("img", {
|
|
166
166
|
key: 0,
|
|
167
|
-
src:
|
|
168
|
-
alt:
|
|
169
|
-
class: K(["object-cover rounded-lg",
|
|
167
|
+
src: d.image,
|
|
168
|
+
alt: d.title,
|
|
169
|
+
class: K(["object-cover rounded-lg", d.id === "__none__" ? "w-10 h-10" : "w-12 h-12"])
|
|
170
170
|
}, null, 10, jt)) : F("", !0)
|
|
171
171
|
], 10, Ft)
|
|
172
172
|
])), [
|
|
173
|
-
[l,
|
|
173
|
+
[l, d.title]
|
|
174
174
|
])), 128))
|
|
175
175
|
]);
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
|
-
function
|
|
179
|
+
function Ie(e) {
|
|
180
180
|
if (!e.attrType || !e.attribute || !e.rules)
|
|
181
181
|
return e.color || "#ccc";
|
|
182
|
-
const t = e.rules.map((
|
|
183
|
-
["==", ["get", e.attribute],
|
|
184
|
-
|
|
182
|
+
const t = e.rules.map((r) => [
|
|
183
|
+
["==", ["get", e.attribute], r.id || r.value],
|
|
184
|
+
r.color
|
|
185
185
|
]);
|
|
186
186
|
return t.push(e.color || "#ccc"), ["case", ...t.flat()];
|
|
187
187
|
}
|
|
188
188
|
function Et(e) {
|
|
189
189
|
if (!e.attrType || e.attrType !== "icon-by-attribute" || !e.attribute || !e.rules)
|
|
190
190
|
return e.default_icon || null;
|
|
191
|
-
const t = e.rules.map((
|
|
192
|
-
["==", ["get", e.attribute],
|
|
193
|
-
|
|
191
|
+
const t = e.rules.map((r) => [
|
|
192
|
+
["==", ["get", e.attribute], r.value],
|
|
193
|
+
r.icon
|
|
194
194
|
]);
|
|
195
195
|
return t.push(e.default_icon || "marker.svg"), ["case", ...t.flat()];
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function Ye(e) {
|
|
198
198
|
if (!e.attrType || e.attrType !== "attribute-pattern" || !e.attribute || !e.rules)
|
|
199
199
|
return e.fillPattern || "";
|
|
200
|
-
const t = e.rules.map((
|
|
201
|
-
["==", ["get", e.attribute],
|
|
202
|
-
|
|
200
|
+
const t = e.rules.map((r) => [
|
|
201
|
+
["==", ["get", e.attribute], r.value],
|
|
202
|
+
r.fillPattern || ""
|
|
203
203
|
]);
|
|
204
204
|
return t.push(e.fillPattern || ""), ["case", ...t.flat()];
|
|
205
205
|
}
|
|
206
|
-
function ue(e, t = "stroke",
|
|
206
|
+
function ue(e, t = "stroke", r = "#ccc") {
|
|
207
207
|
return [
|
|
208
208
|
"case",
|
|
209
209
|
["boolean", ["feature-state", "hovered"], !1],
|
|
210
210
|
"#ff0000",
|
|
211
211
|
["boolean", ["feature-state", "selected"], !1],
|
|
212
212
|
"#ff0000",
|
|
213
|
-
e[t] ||
|
|
213
|
+
e[t] || r
|
|
214
214
|
];
|
|
215
215
|
}
|
|
216
216
|
function Mt(e) {
|
|
@@ -219,11 +219,11 @@ function Mt(e) {
|
|
|
219
219
|
type: "fill",
|
|
220
220
|
minzoom: e.pointZoom || 0,
|
|
221
221
|
paint: {
|
|
222
|
-
"fill-color":
|
|
222
|
+
"fill-color": Ie(e),
|
|
223
223
|
"fill-outline-color": ue(e, "stroke", "#ccc"),
|
|
224
224
|
"fill-opacity": e.opacity || 1,
|
|
225
225
|
...e.attrType === "attribute-pattern" && {
|
|
226
|
-
"fill-pattern":
|
|
226
|
+
"fill-pattern": Ye(e)
|
|
227
227
|
},
|
|
228
228
|
...e.fillPattern && !e.attrType && { "fill-pattern": e.fillPattern }
|
|
229
229
|
}
|
|
@@ -253,7 +253,7 @@ function Tt(e) {
|
|
|
253
253
|
{
|
|
254
254
|
type: "line",
|
|
255
255
|
paint: {
|
|
256
|
-
"line-color": ue(e, "color",
|
|
256
|
+
"line-color": ue(e, "color", Ie(e)),
|
|
257
257
|
"line-width": e.width || 2,
|
|
258
258
|
"line-opacity": e.opacity || 1,
|
|
259
259
|
...e.dashArray && { "line-dasharray": e.dashArray }
|
|
@@ -274,7 +274,7 @@ function zt(e) {
|
|
|
274
274
|
"circle-radius": e.radius || 6,
|
|
275
275
|
"circle-stroke-color": ue(e, "stroke", "#ccc"),
|
|
276
276
|
"circle-stroke-width": e.width || 2,
|
|
277
|
-
"circle-color":
|
|
277
|
+
"circle-color": Ie(e),
|
|
278
278
|
"circle-opacity": e.opacity || 1
|
|
279
279
|
}
|
|
280
280
|
}
|
|
@@ -303,37 +303,37 @@ function zt(e) {
|
|
|
303
303
|
}
|
|
304
304
|
}), t;
|
|
305
305
|
}
|
|
306
|
-
function At(e, t,
|
|
307
|
-
const
|
|
308
|
-
return
|
|
306
|
+
function At(e, t, r) {
|
|
307
|
+
const o = e.type || "point";
|
|
308
|
+
return o === "polygon" ? [
|
|
309
309
|
{
|
|
310
310
|
type: "fill",
|
|
311
|
-
...
|
|
311
|
+
...r !== void 0 ? { maxzoom: r } : {},
|
|
312
312
|
paint: {
|
|
313
|
-
"fill-color":
|
|
313
|
+
"fill-color": Ie(e),
|
|
314
314
|
"fill-outline-color": ue(e, "stroke", "#ccc"),
|
|
315
315
|
"fill-opacity": e.opacity || 1,
|
|
316
316
|
...e.attrType === "attribute-pattern" && {
|
|
317
|
-
"fill-pattern":
|
|
317
|
+
"fill-pattern": Ye(e)
|
|
318
318
|
},
|
|
319
319
|
...e.fillPattern && !e.attrType && { "fill-pattern": e.fillPattern }
|
|
320
320
|
}
|
|
321
321
|
},
|
|
322
322
|
{
|
|
323
323
|
type: "line",
|
|
324
|
-
...
|
|
324
|
+
...r !== void 0 ? { maxzoom: r } : {},
|
|
325
325
|
paint: {
|
|
326
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
|
+
] : o === "line" ? [
|
|
332
332
|
{
|
|
333
333
|
type: "line",
|
|
334
|
-
...
|
|
334
|
+
...r !== void 0 ? { maxzoom: r } : {},
|
|
335
335
|
paint: {
|
|
336
|
-
"line-color": ue(e, "color",
|
|
336
|
+
"line-color": ue(e, "color", Ie(e)),
|
|
337
337
|
"line-width": e.width || 2,
|
|
338
338
|
"line-opacity": e.opacity || 1,
|
|
339
339
|
...e.dashArray && { "line-dasharray": e.dashArray }
|
|
@@ -346,31 +346,31 @@ function At(e, t, o) {
|
|
|
346
346
|
] : [
|
|
347
347
|
{
|
|
348
348
|
type: "circle",
|
|
349
|
-
...
|
|
349
|
+
...r !== void 0 ? { maxzoom: r } : {},
|
|
350
350
|
paint: {
|
|
351
351
|
"circle-radius": e.radius || 6,
|
|
352
352
|
"circle-stroke-color": ue(e, "stroke", "#ccc"),
|
|
353
353
|
"circle-stroke-width": e.width || 2,
|
|
354
|
-
"circle-color":
|
|
354
|
+
"circle-color": Ie(e),
|
|
355
355
|
"circle-opacity": e.opacity || 1
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
];
|
|
359
359
|
}
|
|
360
|
-
function
|
|
361
|
-
var
|
|
360
|
+
function Ke(e) {
|
|
361
|
+
var r, o;
|
|
362
362
|
if (!e) return null;
|
|
363
363
|
if (e.attrType === "icon-by-attribute" && e.iconZoom) {
|
|
364
|
-
const
|
|
364
|
+
const i = Et(e), n = Array.isArray(i) && i[0] === "case" ? i : [
|
|
365
365
|
"case",
|
|
366
|
-
["==", ["get", e.attribute], ((
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
],
|
|
366
|
+
["==", ["get", e.attribute], ((o = (r = e.rules) == null ? void 0 : r[0]) == null ? void 0 : o.value) || ""],
|
|
367
|
+
i,
|
|
368
|
+
i
|
|
369
|
+
], m = At(e, void 0, +e.iconZoom), h = {
|
|
370
370
|
type: "symbol",
|
|
371
371
|
minzoom: +e.iconZoom,
|
|
372
372
|
layout: {
|
|
373
|
-
"icon-image":
|
|
373
|
+
"icon-image": n,
|
|
374
374
|
"icon-size": (e == null ? void 0 : e.icon_size) || 1,
|
|
375
375
|
"icon-allow-overlap": !0,
|
|
376
376
|
"icon-anchor": (e == null ? void 0 : e.icon_anchor) || "bottom"
|
|
@@ -379,7 +379,7 @@ function et(e) {
|
|
|
379
379
|
"icon-opacity": e.opacity || 1
|
|
380
380
|
}
|
|
381
381
|
};
|
|
382
|
-
return [...
|
|
382
|
+
return [...m, h];
|
|
383
383
|
}
|
|
384
384
|
const t = e.type || "point";
|
|
385
385
|
return t === "polygon" ? Mt(e) : t === "line" ? Tt(e) : zt(e);
|
|
@@ -390,33 +390,33 @@ function Bt(e) {
|
|
|
390
390
|
function Ot(e) {
|
|
391
391
|
const {
|
|
392
392
|
id: t,
|
|
393
|
-
sourceLayer:
|
|
394
|
-
url:
|
|
395
|
-
bounds:
|
|
396
|
-
title:
|
|
397
|
-
style:
|
|
398
|
-
service:
|
|
393
|
+
sourceLayer: r,
|
|
394
|
+
url: o,
|
|
395
|
+
bounds: i,
|
|
396
|
+
title: n,
|
|
397
|
+
style: m,
|
|
398
|
+
service: h,
|
|
399
399
|
service_type: g,
|
|
400
400
|
source_type: l,
|
|
401
|
-
data:
|
|
402
|
-
} = e,
|
|
403
|
-
switch (
|
|
401
|
+
data: d
|
|
402
|
+
} = e, v = Bt(o), a = g || h || l || "vector";
|
|
403
|
+
switch (a) {
|
|
404
404
|
case "vtile":
|
|
405
405
|
case "vector":
|
|
406
406
|
return Ut(
|
|
407
407
|
t,
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
n,
|
|
408
|
+
r,
|
|
409
|
+
v,
|
|
411
410
|
i,
|
|
412
|
-
|
|
411
|
+
n,
|
|
412
|
+
m
|
|
413
413
|
);
|
|
414
414
|
case "raster":
|
|
415
|
-
return Rt(t,
|
|
415
|
+
return Rt(t, v, i, n, m);
|
|
416
416
|
case "geojson":
|
|
417
|
-
return Ht(t,
|
|
417
|
+
return Ht(t, d || v, i, n, m);
|
|
418
418
|
default:
|
|
419
|
-
throw new Error(`Unsupported layer service type: ${
|
|
419
|
+
throw new Error(`Unsupported layer service type: ${a}`);
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
function Dt(e) {
|
|
@@ -430,69 +430,69 @@ function Dt(e) {
|
|
|
430
430
|
return { type: "point", color: "#3388ff", radius: 6, opacity: 1 };
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
|
-
function Ut(e, t, o,
|
|
434
|
-
const
|
|
433
|
+
function Ut(e, t, r, o, i, n) {
|
|
434
|
+
const m = t || (r.match(/\/vtile\/([^/]+)/) || [])[1] || e, h = {
|
|
435
435
|
type: "vector",
|
|
436
|
-
tiles: [
|
|
437
|
-
...
|
|
438
|
-
},
|
|
439
|
-
...
|
|
440
|
-
id: `${e}-${
|
|
441
|
-
"source-layer":
|
|
436
|
+
tiles: [r],
|
|
437
|
+
...o && { bounds: o }
|
|
438
|
+
}, d = Ke(n || {}).map((v, a) => ({
|
|
439
|
+
...v,
|
|
440
|
+
id: `${e}-${a}`,
|
|
441
|
+
"source-layer": m,
|
|
442
442
|
source: e
|
|
443
443
|
}));
|
|
444
444
|
return {
|
|
445
445
|
id: e,
|
|
446
|
-
title:
|
|
447
|
-
source:
|
|
448
|
-
layers:
|
|
446
|
+
title: i,
|
|
447
|
+
source: h,
|
|
448
|
+
layers: d,
|
|
449
449
|
visible: !0
|
|
450
450
|
};
|
|
451
451
|
}
|
|
452
|
-
function Rt(e, t,
|
|
453
|
-
const
|
|
452
|
+
function Rt(e, t, r, o, i) {
|
|
453
|
+
const n = {
|
|
454
454
|
type: "raster",
|
|
455
455
|
tiles: [t],
|
|
456
456
|
tileSize: 256,
|
|
457
|
-
...
|
|
458
|
-
},
|
|
457
|
+
...r && { bounds: r }
|
|
458
|
+
}, m = i || {}, h = {
|
|
459
459
|
id: e,
|
|
460
460
|
type: "raster",
|
|
461
461
|
source: e,
|
|
462
462
|
layout: {
|
|
463
463
|
visibility: "visible"
|
|
464
464
|
},
|
|
465
|
-
...
|
|
465
|
+
...m && { paint: m }
|
|
466
466
|
};
|
|
467
467
|
return {
|
|
468
468
|
id: e,
|
|
469
|
-
title:
|
|
470
|
-
source:
|
|
471
|
-
layers: [
|
|
469
|
+
title: o,
|
|
470
|
+
source: n,
|
|
471
|
+
layers: [h],
|
|
472
472
|
visible: !0
|
|
473
473
|
};
|
|
474
474
|
}
|
|
475
|
-
function Ht(e, t,
|
|
476
|
-
var
|
|
477
|
-
const
|
|
475
|
+
function Ht(e, t, r, o, i) {
|
|
476
|
+
var d;
|
|
477
|
+
const n = {
|
|
478
478
|
type: "geojson",
|
|
479
479
|
data: t,
|
|
480
|
-
...
|
|
480
|
+
...r && { bounds: r }
|
|
481
481
|
};
|
|
482
|
-
let
|
|
482
|
+
let m = "point";
|
|
483
483
|
if (t && t.features && t.features.length > 0) {
|
|
484
|
-
const
|
|
485
|
-
|
|
484
|
+
const v = (d = t.features[0].geometry) == null ? void 0 : d.type;
|
|
485
|
+
v === "Polygon" || v === "MultiPolygon" ? m = "polygon" : v === "LineString" || v === "MultiLineString" ? m = "line" : m = "point";
|
|
486
486
|
}
|
|
487
|
-
const
|
|
488
|
-
...
|
|
489
|
-
id: `${e}-${
|
|
487
|
+
const h = i || Dt(m), l = Ke(h).map((v, a) => ({
|
|
488
|
+
...v,
|
|
489
|
+
id: `${e}-${a}`,
|
|
490
490
|
source: e
|
|
491
491
|
}));
|
|
492
492
|
return {
|
|
493
493
|
id: e,
|
|
494
|
-
title:
|
|
495
|
-
source:
|
|
494
|
+
title: o,
|
|
495
|
+
source: n,
|
|
496
496
|
layers: l,
|
|
497
497
|
visible: !0
|
|
498
498
|
};
|
|
@@ -500,54 +500,54 @@ function Ht(e, t, o, s, n) {
|
|
|
500
500
|
function Nt(e) {
|
|
501
501
|
if (!e || e.attrType !== "icon-by-attribute") return [];
|
|
502
502
|
const t = /* @__PURE__ */ new Set();
|
|
503
|
-
return e.default_icon && t.add(e.default_icon), Array.isArray(e.rules) && e.rules.forEach((
|
|
504
|
-
|
|
505
|
-
}), Array.from(t).map((
|
|
506
|
-
name:
|
|
507
|
-
url: (e.icon_base_url || "") +
|
|
503
|
+
return e.default_icon && t.add(e.default_icon), Array.isArray(e.rules) && e.rules.forEach((r) => {
|
|
504
|
+
r.icon && t.add(r.icon);
|
|
505
|
+
}), Array.from(t).map((r) => ({
|
|
506
|
+
name: r,
|
|
507
|
+
url: (e.icon_base_url || "") + r
|
|
508
508
|
}));
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function Zt(e) {
|
|
511
511
|
const t = /* @__PURE__ */ new Set();
|
|
512
|
-
function o
|
|
513
|
-
typeof
|
|
512
|
+
function r(o) {
|
|
513
|
+
typeof o == "string" ? t.add(o) : Array.isArray(o) && o.forEach(r);
|
|
514
514
|
}
|
|
515
|
-
return e && e["icon-image"] &&
|
|
515
|
+
return e && e["icon-image"] && r(e["icon-image"]), Array.from(t);
|
|
516
516
|
}
|
|
517
|
-
async function
|
|
518
|
-
const
|
|
519
|
-
const
|
|
520
|
-
return { name:
|
|
517
|
+
async function Xe(e, t) {
|
|
518
|
+
const r = t.map(async ({ name: o, url: i }) => {
|
|
519
|
+
const n = await e.loadImage(i);
|
|
520
|
+
return { name: o, data: n.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 o = await Promise.all(r);
|
|
524
|
+
for (const { name: i, data: n } of o)
|
|
525
|
+
e.hasImage(i) || e.addImage(i, n);
|
|
526
|
+
} catch (o) {
|
|
527
|
+
console.error("Failed to load icons:", o);
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
function
|
|
531
|
-
const
|
|
532
|
-
return
|
|
530
|
+
function Wt(e, t, r = "/icons/") {
|
|
531
|
+
const i = Zt(t).map((n) => ({ name: n, url: r + n }));
|
|
532
|
+
return Xe(e, i);
|
|
533
533
|
}
|
|
534
|
-
async function
|
|
535
|
-
const
|
|
536
|
-
|
|
537
|
-
for (const
|
|
538
|
-
t.visible !== void 0 && (
|
|
539
|
-
...
|
|
534
|
+
async function _e(e, t) {
|
|
535
|
+
const r = Ot(t), o = Nt(t.style);
|
|
536
|
+
o.length > 0 && await Xe(e, o), t.layout && t.layout["icon-image"] && await Wt(e, t.layout), e.getSource(r.id) || e.addSource(r.id, r.source);
|
|
537
|
+
for (const i of r.layers)
|
|
538
|
+
t.visible !== void 0 && (i.layout = {
|
|
539
|
+
...i.layout,
|
|
540
540
|
visibility: t.visible ? "visible" : "none"
|
|
541
|
-
}), e.getLayer(
|
|
542
|
-
|
|
541
|
+
}), e.getLayer(i.id) ? e.setLayoutProperty(
|
|
542
|
+
i.id,
|
|
543
543
|
"visibility",
|
|
544
544
|
t.visible ? "visible" : "none"
|
|
545
|
-
) : await e.addLayer(
|
|
546
|
-
return
|
|
545
|
+
) : await e.addLayer(i);
|
|
546
|
+
return r;
|
|
547
547
|
}
|
|
548
|
-
function
|
|
549
|
-
e.getStyle().layers.filter((
|
|
550
|
-
e.removeLayer(
|
|
548
|
+
function $e(e, t) {
|
|
549
|
+
e.getStyle().layers.filter((i) => i.source === t).forEach((i) => {
|
|
550
|
+
e.removeLayer(i.id);
|
|
551
551
|
}), e.getSource(t) && e.removeSource(t);
|
|
552
552
|
}
|
|
553
553
|
const qt = {}, Gt = {
|
|
@@ -559,13 +559,13 @@ const qt = {}, Gt = {
|
|
|
559
559
|
};
|
|
560
560
|
function Jt(e, t) {
|
|
561
561
|
return c(), p("svg", Gt, [...t[0] || (t[0] = [
|
|
562
|
-
|
|
562
|
+
s("path", {
|
|
563
563
|
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",
|
|
564
564
|
stroke: "black",
|
|
565
565
|
"stroke-linecap": "round",
|
|
566
566
|
"stroke-linejoin": "round"
|
|
567
567
|
}, null, -1),
|
|
568
|
-
|
|
568
|
+
s("path", {
|
|
569
569
|
d: "M21.0002 21L16.7002 16.7",
|
|
570
570
|
stroke: "black",
|
|
571
571
|
"stroke-linecap": "round",
|
|
@@ -573,7 +573,7 @@ function Jt(e, t) {
|
|
|
573
573
|
}, null, -1)
|
|
574
574
|
])]);
|
|
575
575
|
}
|
|
576
|
-
const
|
|
576
|
+
const et = /* @__PURE__ */ N(qt, [["render", Jt]]), Qt = { class: "w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative" }, Yt = { class: "flex flex-col justify-between h-full pb-5 px-5" }, Kt = {
|
|
577
577
|
key: 0,
|
|
578
578
|
class: "relative mb-[10px]"
|
|
579
579
|
}, Xt = {
|
|
@@ -612,115 +612,115 @@ const ot = /* @__PURE__ */ H(qt, [["render", Jt]]), Qt = { class: "w-full flex f
|
|
|
612
612
|
},
|
|
613
613
|
emits: ["set-filter-layer", "update:enabledLayerIds"],
|
|
614
614
|
setup(e, { emit: t }) {
|
|
615
|
-
const
|
|
616
|
-
function
|
|
615
|
+
const r = e, o = t, i = T(""), n = T([]);
|
|
616
|
+
function m() {
|
|
617
617
|
const f = new URLSearchParams(window.location.search).get("layers");
|
|
618
618
|
return f ? f.split(",") : [];
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function h(u) {
|
|
621
621
|
const f = new URLSearchParams(window.location.search);
|
|
622
|
-
|
|
622
|
+
u.length > 0 ? f.set("layers", u.join(",")) : f.delete("layers");
|
|
623
623
|
const L = `${window.location.pathname}?${f.toString()}`;
|
|
624
624
|
window.history.replaceState({}, "", L);
|
|
625
625
|
}
|
|
626
|
-
|
|
627
|
-
let
|
|
628
|
-
|
|
626
|
+
ke(() => {
|
|
627
|
+
let u = [];
|
|
628
|
+
r.history && (u = m()), u.length > 0 ? n.value = r.config.layers.map((f) => ({
|
|
629
629
|
...f,
|
|
630
|
-
visible:
|
|
631
|
-
})) :
|
|
630
|
+
visible: u.includes(String(f.id))
|
|
631
|
+
})) : n.value = r.config.layers.map((f) => ({
|
|
632
632
|
...f,
|
|
633
633
|
visible: f.visible ?? !1
|
|
634
|
-
})),
|
|
635
|
-
f.visible &&
|
|
636
|
-
}),
|
|
634
|
+
})), n.value.forEach((f) => {
|
|
635
|
+
f.visible && _e(r.map, f);
|
|
636
|
+
}), o("update:enabledLayerIds", d());
|
|
637
637
|
});
|
|
638
|
-
const g =
|
|
639
|
-
if (!
|
|
640
|
-
const
|
|
641
|
-
return
|
|
642
|
-
}), l =
|
|
643
|
-
|
|
644
|
-
|
|
638
|
+
const g = E(() => {
|
|
639
|
+
if (!i.value) return n.value;
|
|
640
|
+
const u = i.value.toLowerCase();
|
|
641
|
+
return n.value.filter((f) => (f.title || f.name || f.label || "").toLowerCase().includes(u));
|
|
642
|
+
}), l = E(() => n.value.every((u) => u.visible)), d = () => n.value.filter((u) => u.visible).map((u) => u.id), v = (u) => {
|
|
643
|
+
u.visible ? _e(r.map, u) : ($e(r.map, u.id), o("set-filter-layer", null)), r.map.getStyle().layers.filter((j) => j.source === u.id).forEach((j) => {
|
|
644
|
+
r.map.setLayoutProperty(
|
|
645
645
|
j.id,
|
|
646
646
|
"visibility",
|
|
647
|
-
|
|
647
|
+
u.visible ? "visible" : "none"
|
|
648
648
|
);
|
|
649
|
-
}),
|
|
650
|
-
},
|
|
651
|
-
const
|
|
652
|
-
|
|
653
|
-
f.visible =
|
|
654
|
-
}),
|
|
649
|
+
}), o("update:enabledLayerIds", d());
|
|
650
|
+
}, a = () => {
|
|
651
|
+
const u = !l.value;
|
|
652
|
+
n.value.forEach((f) => {
|
|
653
|
+
f.visible = u, u ? _e(r.map, f) : $e(r.map, f.id);
|
|
654
|
+
}), u || o("set-filter-layer", null), o("update:enabledLayerIds", d());
|
|
655
655
|
};
|
|
656
656
|
return fe(
|
|
657
|
-
() =>
|
|
658
|
-
(
|
|
659
|
-
|
|
657
|
+
() => d(),
|
|
658
|
+
(u) => {
|
|
659
|
+
r.history && h(u);
|
|
660
660
|
},
|
|
661
661
|
{ deep: !0 }
|
|
662
|
-
), (
|
|
663
|
-
f[1] || (f[1] =
|
|
664
|
-
|
|
662
|
+
), (u, f) => (c(), p("div", Qt, [
|
|
663
|
+
f[1] || (f[1] = s("div", { class: "p-5 pb-3 flex justify-between items-center" }, [
|
|
664
|
+
s("h2", { class: "inline-block font-semibold text-lg text-gray-800" }, "Шари")
|
|
665
665
|
], -1)),
|
|
666
|
-
|
|
666
|
+
s("div", Yt, [
|
|
667
667
|
e.config.search ? (c(), p("div", Kt, [
|
|
668
|
-
|
|
668
|
+
se(s("input", {
|
|
669
669
|
type: "text",
|
|
670
|
-
"onUpdate:modelValue": f[0] || (f[0] = (L) =>
|
|
670
|
+
"onUpdate:modelValue": f[0] || (f[0] = (L) => i.value = L),
|
|
671
671
|
placeholder: "Введіть назву шару...",
|
|
672
672
|
class: "py-[7px] ps-8 pl-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"
|
|
673
673
|
}, null, 512), [
|
|
674
|
-
[
|
|
674
|
+
[He, i.value]
|
|
675
675
|
]),
|
|
676
|
-
|
|
676
|
+
Z(et)
|
|
677
677
|
])) : F("", !0),
|
|
678
678
|
e.config.allow_toggle_all ? (c(), p("div", Xt, [
|
|
679
|
-
|
|
680
|
-
onClick:
|
|
679
|
+
s("button", {
|
|
680
|
+
onClick: a,
|
|
681
681
|
class: "w-full py-[7px] bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors"
|
|
682
682
|
}, S(l.value ? "Вимкнути всі" : "Увімкнути всі"), 1)
|
|
683
683
|
])) : F("", !0),
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
(c(!0), p(
|
|
684
|
+
s("div", eo, [
|
|
685
|
+
s("ul", to, [
|
|
686
|
+
(c(!0), p(z, null, q(g.value, (L) => (c(), p("li", {
|
|
687
687
|
key: L.id,
|
|
688
688
|
class: "flex flex-wrap justify-between items-center gap-x-2"
|
|
689
689
|
}, [
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
690
|
+
s("label", oo, [
|
|
691
|
+
s("span", ro, [
|
|
692
|
+
se(s("input", {
|
|
693
693
|
class: "dataset-checkbox",
|
|
694
694
|
type: "checkbox",
|
|
695
695
|
"onUpdate:modelValue": (j) => L.visible = j,
|
|
696
|
-
onChange: () =>
|
|
696
|
+
onChange: () => v(L)
|
|
697
697
|
}, null, 40, so), [
|
|
698
|
-
[
|
|
698
|
+
[Ze, L.visible]
|
|
699
699
|
])
|
|
700
700
|
]),
|
|
701
|
-
|
|
701
|
+
s("span", no, S(L.title || L.name || L.label), 1)
|
|
702
702
|
]),
|
|
703
|
-
L.actions && L.visible ? (c(!0), p(
|
|
703
|
+
L.actions && L.visible ? (c(!0), p(z, { key: 0 }, q(L.actions, (j) => (c(), p("div", {
|
|
704
704
|
key: j.id
|
|
705
705
|
}, [
|
|
706
|
-
|
|
706
|
+
s("button", {
|
|
707
707
|
class: "text-sm text-gray-500",
|
|
708
|
-
onClick: (
|
|
708
|
+
onClick: (B) => u.$emit("show-widget", j.widget)
|
|
709
709
|
}, [
|
|
710
|
-
|
|
710
|
+
s("div", {
|
|
711
711
|
innerHTML: j.icon
|
|
712
712
|
}, null, 8, ao)
|
|
713
713
|
], 8, io)
|
|
714
714
|
]))), 128)) : F("", !0)
|
|
715
715
|
]))), 128)),
|
|
716
|
-
|
|
716
|
+
i.value && g.value.length === 0 ? (c(), p("li", lo, " Шарів не знайдено ")) : F("", !0)
|
|
717
717
|
])
|
|
718
718
|
])
|
|
719
719
|
])
|
|
720
720
|
]));
|
|
721
721
|
}
|
|
722
722
|
};
|
|
723
|
-
|
|
723
|
+
We({
|
|
724
724
|
props: {
|
|
725
725
|
modelValue: { type: Boolean, default: () => !1 },
|
|
726
726
|
title: { type: String, default: () => "" },
|
|
@@ -761,49 +761,49 @@ Ge({
|
|
|
761
761
|
}
|
|
762
762
|
}
|
|
763
763
|
});
|
|
764
|
-
const
|
|
765
|
-
var L, j,
|
|
766
|
-
if (!t || !
|
|
767
|
-
await
|
|
768
|
-
const
|
|
769
|
-
if (!
|
|
770
|
-
const
|
|
771
|
-
let
|
|
772
|
-
const f =
|
|
764
|
+
const Fe = async (e, t, r, o = 10) => {
|
|
765
|
+
var L, j, B, k;
|
|
766
|
+
if (!t || !r) return;
|
|
767
|
+
await Pe();
|
|
768
|
+
const i = await (r == null ? void 0 : r.getBoundingClientRect()), n = await (t == null ? void 0 : t.getBoundingClientRect());
|
|
769
|
+
if (!n || !i) return;
|
|
770
|
+
const m = await parseInt((L = t == null ? void 0 : t.getBoundingClientRect()) == null ? void 0 : L.height), h = await parseInt((j = t == null ? void 0 : t.getBoundingClientRect()) == null ? void 0 : j.width), g = await parseInt((B = r == null ? void 0 : r.getBoundingClientRect()) == null ? void 0 : B.height), l = await parseInt((k = r == null ? void 0 : r.getBoundingClientRect()) == null ? void 0 : k.width), d = await window.innerHeight, v = await window.innerWidth;
|
|
771
|
+
let a = 0, u = 0;
|
|
772
|
+
const f = n.bottom + o + g;
|
|
773
773
|
switch (e) {
|
|
774
774
|
case "top":
|
|
775
|
-
|
|
775
|
+
n.top - i.height - o < 0 ? a = n.top - i.height + o + g + m : a = n.top - i.height - o, v > l + n.right + 30 ? u = n.left - i.width / 2 + n.width / 2 : u = v - 30 - l;
|
|
776
776
|
break;
|
|
777
777
|
case "bottom":
|
|
778
|
-
|
|
778
|
+
d > f ? a = n.bottom + o : a = n.bottom - o - g - m, u = n.left - i.width / 2 + n.width / 2;
|
|
779
779
|
break;
|
|
780
780
|
case "left":
|
|
781
|
-
|
|
781
|
+
a = n.top - i.height / 2 + n.height / 2, n.left - i.width - o > 0 ? u = n.left - i.width - o : u = 10;
|
|
782
782
|
break;
|
|
783
783
|
case "right":
|
|
784
|
-
|
|
784
|
+
a = n.top - i.height / 2 + n.height / 2, v - h > l ? u = n.right + o : u = v - 30 - l;
|
|
785
785
|
break;
|
|
786
786
|
case "top-right":
|
|
787
|
-
|
|
787
|
+
n.top - i.height - o < 0 ? a = n.top - i.height + o + g + m : a = n.top - i.height - o, v - h > l ? u = n.right + o : u = v - 30 - l;
|
|
788
788
|
break;
|
|
789
789
|
case "top-left":
|
|
790
|
-
|
|
790
|
+
n.top - i.height - o < 0 ? a = n.top - i.height + o + g + m : a = n.top - i.height - o, n.left - i.width - o > 0 ? u = n.left - i.width - o : u = 10;
|
|
791
791
|
break;
|
|
792
792
|
case "top-start":
|
|
793
|
-
|
|
793
|
+
n.top - i.height - o < 0 ? a = n.top - i.height + o + g + m : a = n.top - i.height - o, n.left > 0 ? u = n.left : u = 10;
|
|
794
794
|
break;
|
|
795
795
|
case "bottom-right":
|
|
796
|
-
|
|
796
|
+
d > f ? a = n.bottom + o : a = n.bottom - o - g - m, v - h > l ? u = n.left : u = v - 30 - l;
|
|
797
797
|
break;
|
|
798
798
|
case "bottom-left":
|
|
799
|
-
|
|
799
|
+
d > f ? a = n.bottom + o : a = n.bottom - o - g - m, n.left > 0 ? u = n.right - l : u = 10;
|
|
800
800
|
break;
|
|
801
801
|
case "bottom-start":
|
|
802
|
-
|
|
802
|
+
d > f ? a = n.bottom + o : a = n.bottom - o - g - m, n.left > 0 ? u = n.left : u = 10;
|
|
803
803
|
break;
|
|
804
804
|
}
|
|
805
|
-
|
|
806
|
-
}, uo = { class: "text-center" }, po = { 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" },
|
|
805
|
+
a + g > d ? a = d - g - o : a < 0 && (a = o), u + l > v ? u = v - l - o : u < 0 && (u = o), r instanceof HTMLElement && (r.style.top = `${a}px`, r.style.left = `${u}px`, r.style.position = "fixed");
|
|
806
|
+
}, uo = { class: "text-center" }, po = { 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" }, Ve = /* @__PURE__ */ We({
|
|
807
807
|
__name: "vs-popover",
|
|
808
808
|
props: {
|
|
809
809
|
isOpen: { type: Boolean, default: !1 },
|
|
@@ -815,52 +815,52 @@ const je = async (e, t, o, s = 10) => {
|
|
|
815
815
|
teleport: { default: "body" }
|
|
816
816
|
},
|
|
817
817
|
emits: ["isvisible"],
|
|
818
|
-
setup(e, { expose: t, emit:
|
|
819
|
-
const
|
|
820
|
-
var
|
|
818
|
+
setup(e, { expose: t, emit: r }) {
|
|
819
|
+
const o = e, i = r, n = T(!1), m = T([]), h = T(null), g = T(null), l = T(null), d = (_) => {
|
|
820
|
+
var A, ae;
|
|
821
821
|
if (!_) {
|
|
822
|
-
|
|
822
|
+
n.value = !1;
|
|
823
823
|
return;
|
|
824
824
|
}
|
|
825
|
-
(
|
|
826
|
-
},
|
|
827
|
-
|
|
828
|
-
},
|
|
829
|
-
|
|
830
|
-
},
|
|
831
|
-
|
|
825
|
+
(A = g.value) != null && A.contains(_.target) || (ae = l.value) != null && ae.contains(_.target) || (n.value = !1);
|
|
826
|
+
}, v = (_) => {
|
|
827
|
+
n.value && l.value && !l.value.contains(_.target) && (n.value = !1);
|
|
828
|
+
}, a = () => {
|
|
829
|
+
n.value = !1;
|
|
830
|
+
}, u = () => {
|
|
831
|
+
n.value && (n.value = !1);
|
|
832
832
|
}, f = () => {
|
|
833
|
-
let _ =
|
|
833
|
+
let _ = h.value;
|
|
834
834
|
for (; _ && _ !== document.body; )
|
|
835
|
-
(_.scrollHeight > _.clientHeight || _.scrollWidth > _.clientWidth) && (_.addEventListener("scroll",
|
|
836
|
-
document.body && (document.body.addEventListener("scroll",
|
|
835
|
+
(_.scrollHeight > _.clientHeight || _.scrollWidth > _.clientWidth) && (_.addEventListener("scroll", a), m.value.push(_)), _ = _.parentElement;
|
|
836
|
+
document.body && (document.body.addEventListener("scroll", a), m.value.push(document.body));
|
|
837
837
|
}, L = () => {
|
|
838
|
-
|
|
839
|
-
_.removeEventListener("scroll",
|
|
840
|
-
}),
|
|
838
|
+
m.value.forEach((_) => {
|
|
839
|
+
_.removeEventListener("scroll", a);
|
|
840
|
+
}), m.value = [];
|
|
841
841
|
};
|
|
842
|
-
fe(
|
|
843
|
-
_ ? (f(), window.addEventListener("resize", () =>
|
|
844
|
-
}),
|
|
845
|
-
window.addEventListener("click",
|
|
846
|
-
}),
|
|
847
|
-
window.removeEventListener("click",
|
|
842
|
+
fe(n, (_) => {
|
|
843
|
+
_ ? (f(), window.addEventListener("resize", () => Fe(o.placement, g.value, l.value)), Fe(o.placement, g.value, l.value)) : window.removeEventListener("resize", () => Fe(o.placement, g.value, l.value)), i("isvisible", _);
|
|
844
|
+
}), ke(() => {
|
|
845
|
+
window.addEventListener("click", d), window.addEventListener("popstate", u), window.addEventListener("scroll", v, !0), f();
|
|
846
|
+
}), ft(() => {
|
|
847
|
+
window.removeEventListener("click", d), window.removeEventListener("popstate", u), L();
|
|
848
848
|
});
|
|
849
849
|
const j = () => {
|
|
850
|
-
|
|
851
|
-
},
|
|
852
|
-
|
|
850
|
+
n.value = !0, Fe(o.placement, g.value, l.value);
|
|
851
|
+
}, B = () => {
|
|
852
|
+
n.value = !1;
|
|
853
853
|
}, k = async () => {
|
|
854
|
-
await
|
|
854
|
+
await Fe(o.placement, g.value, l.value), n.value = !n.value;
|
|
855
855
|
};
|
|
856
856
|
return t({
|
|
857
857
|
togglePopover: k
|
|
858
|
-
}), (_,
|
|
858
|
+
}), (_, A) => (c(), p("div", {
|
|
859
859
|
ref_key: "popover",
|
|
860
|
-
ref:
|
|
860
|
+
ref: h,
|
|
861
861
|
class: "vs-popover inline-block"
|
|
862
862
|
}, [
|
|
863
|
-
|
|
863
|
+
s("div", uo, [
|
|
864
864
|
_.trigger === "click" ? (c(), p("div", {
|
|
865
865
|
key: 0,
|
|
866
866
|
ref_key: "popoverRef",
|
|
@@ -868,8 +868,8 @@ const je = async (e, t, o, s = 10) => {
|
|
|
868
868
|
onClick: k,
|
|
869
869
|
class: K({ "pointer-events-none": _.disabled })
|
|
870
870
|
}, [
|
|
871
|
-
|
|
872
|
-
|
|
871
|
+
Re(_.$slots, "reference", {}, () => [
|
|
872
|
+
A[0] || (A[0] = s("button", null, "Click me!", -1))
|
|
873
873
|
])
|
|
874
874
|
], 2)) : F("", !0),
|
|
875
875
|
_.trigger === "hover" ? (c(), p("div", {
|
|
@@ -877,17 +877,17 @@ const je = async (e, t, o, s = 10) => {
|
|
|
877
877
|
ref_key: "popoverRef",
|
|
878
878
|
ref: g,
|
|
879
879
|
onMouseover: j,
|
|
880
|
-
onMouseleave:
|
|
880
|
+
onMouseleave: B,
|
|
881
881
|
class: K({ "pointer-events-none": _.disabled })
|
|
882
882
|
}, [
|
|
883
|
-
|
|
884
|
-
|
|
883
|
+
Re(_.$slots, "reference", {}, () => [
|
|
884
|
+
A[1] || (A[1] = s("button", null, "Click me!", -1))
|
|
885
885
|
])
|
|
886
886
|
], 34)) : F("", !0),
|
|
887
|
-
(c(), X(
|
|
888
|
-
|
|
889
|
-
default:
|
|
890
|
-
|
|
887
|
+
(c(), X(Qe, { to: _.teleport }, [
|
|
888
|
+
Z(gt, { name: "fade" }, {
|
|
889
|
+
default: G(() => [
|
|
890
|
+
se(s("div", {
|
|
891
891
|
class: K(["vsTailwind vs-popover__content", _.placement]),
|
|
892
892
|
ref_key: "contentPop",
|
|
893
893
|
ref: l,
|
|
@@ -896,13 +896,13 @@ const je = async (e, t, o, s = 10) => {
|
|
|
896
896
|
zIndex: 10002
|
|
897
897
|
})
|
|
898
898
|
}, [
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
899
|
+
s("div", po, [
|
|
900
|
+
Re(_.$slots, "default", {}, () => [
|
|
901
|
+
A[2] || (A[2] = s("span", null, "Popover content", -1))
|
|
902
902
|
])
|
|
903
903
|
])
|
|
904
904
|
], 6), [
|
|
905
|
-
[
|
|
905
|
+
[je, n.value]
|
|
906
906
|
])
|
|
907
907
|
]),
|
|
908
908
|
_: 3
|
|
@@ -912,7 +912,7 @@ const je = async (e, t, o, s = 10) => {
|
|
|
912
912
|
], 512));
|
|
913
913
|
}
|
|
914
914
|
});
|
|
915
|
-
|
|
915
|
+
ht({ visible: !0 });
|
|
916
916
|
const ho = { class: "legend-widget flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative" }, fo = {
|
|
917
917
|
key: 0,
|
|
918
918
|
class: "p-5 pb-3 flex justify-between items-start gap-[30px]"
|
|
@@ -925,53 +925,53 @@ const ho = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
925
925
|
}
|
|
926
926
|
},
|
|
927
927
|
setup(e) {
|
|
928
|
-
const t = e,
|
|
929
|
-
var
|
|
930
|
-
return ((
|
|
931
|
-
}),
|
|
932
|
-
var
|
|
933
|
-
return ((
|
|
934
|
-
}),
|
|
935
|
-
var
|
|
936
|
-
return ((
|
|
928
|
+
const t = e, r = E(() => {
|
|
929
|
+
var n;
|
|
930
|
+
return ((n = t.config) == null ? void 0 : n.title) || "";
|
|
931
|
+
}), o = E(() => {
|
|
932
|
+
var n;
|
|
933
|
+
return ((n = t.config) == null ? void 0 : n.content) || "";
|
|
934
|
+
}), i = E(() => {
|
|
935
|
+
var n;
|
|
936
|
+
return ((n = t.config) == null ? void 0 : n.goTo) || [];
|
|
937
937
|
});
|
|
938
|
-
return (
|
|
938
|
+
return (n, m) => {
|
|
939
939
|
var g, l;
|
|
940
|
-
const
|
|
940
|
+
const h = J("router-link");
|
|
941
941
|
return c(), p("div", ho, [
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
(l =
|
|
942
|
+
r.value || (g = i.value) != null && g.length ? (c(), p("div", fo, [
|
|
943
|
+
s("h2", go, S(r.value), 1),
|
|
944
|
+
(l = i.value) != null && l.length ? (c(), X(Ne(Ve), {
|
|
945
945
|
key: 0,
|
|
946
946
|
placement: "bottom"
|
|
947
947
|
}, {
|
|
948
|
-
reference:
|
|
949
|
-
|
|
948
|
+
reference: G(() => [
|
|
949
|
+
Z(Ne(Ve), {
|
|
950
950
|
trigger: "hover",
|
|
951
951
|
placement: "right"
|
|
952
952
|
}, {
|
|
953
|
-
reference:
|
|
954
|
-
|
|
955
|
-
|
|
953
|
+
reference: G(() => [...m[0] || (m[0] = [
|
|
954
|
+
s("div", { class: "flex items-center justify-center h-8 w-8 transition-colors rounded-full hover:bg-gray-100 cursor-pointer" }, [
|
|
955
|
+
s("svg", {
|
|
956
956
|
width: "16",
|
|
957
957
|
height: "16",
|
|
958
958
|
viewBox: "0 0 24 24",
|
|
959
959
|
fill: "none",
|
|
960
960
|
xmlns: "http://www.w3.org/2000/svg"
|
|
961
961
|
}, [
|
|
962
|
-
|
|
962
|
+
s("path", {
|
|
963
963
|
d: "M4 12H20",
|
|
964
964
|
stroke: "#000000",
|
|
965
965
|
"stroke-linecap": "round",
|
|
966
966
|
"stroke-linejoin": "round"
|
|
967
967
|
}),
|
|
968
|
-
|
|
968
|
+
s("path", {
|
|
969
969
|
d: "M4 6H20",
|
|
970
970
|
stroke: "#000000",
|
|
971
971
|
"stroke-linecap": "round",
|
|
972
972
|
"stroke-linejoin": "round"
|
|
973
973
|
}),
|
|
974
|
-
|
|
974
|
+
s("path", {
|
|
975
975
|
d: "M4 18H20",
|
|
976
976
|
stroke: "#000000",
|
|
977
977
|
"stroke-linecap": "round",
|
|
@@ -980,24 +980,24 @@ const ho = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
980
980
|
])
|
|
981
981
|
], -1)
|
|
982
982
|
])]),
|
|
983
|
-
default:
|
|
984
|
-
|
|
983
|
+
default: G(() => [
|
|
984
|
+
m[1] || (m[1] = ie(" Перейти на карту ", -1))
|
|
985
985
|
]),
|
|
986
986
|
_: 1
|
|
987
987
|
})
|
|
988
988
|
]),
|
|
989
|
-
default:
|
|
990
|
-
|
|
991
|
-
(c(!0), p(
|
|
992
|
-
key:
|
|
989
|
+
default: G(() => [
|
|
990
|
+
s("div", vo, [
|
|
991
|
+
(c(!0), p(z, null, q(i.value, (d) => (c(), p("div", {
|
|
992
|
+
key: d.label
|
|
993
993
|
}, [
|
|
994
|
-
|
|
994
|
+
d.url ? (c(), X(h, {
|
|
995
995
|
key: 0,
|
|
996
|
-
to:
|
|
996
|
+
to: d.url,
|
|
997
997
|
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"
|
|
998
998
|
}, {
|
|
999
|
-
default:
|
|
1000
|
-
|
|
999
|
+
default: G(() => [
|
|
1000
|
+
ie(S(d.label), 1)
|
|
1001
1001
|
]),
|
|
1002
1002
|
_: 2
|
|
1003
1003
|
}, 1032, ["to"])) : F("", !0)
|
|
@@ -1007,13 +1007,13 @@ const ho = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1007
1007
|
_: 1
|
|
1008
1008
|
})) : F("", !0)
|
|
1009
1009
|
])) : F("", !0),
|
|
1010
|
-
|
|
1011
|
-
|
|
1010
|
+
s("div", mo, [
|
|
1011
|
+
s("div", { innerHTML: o.value }, null, 8, yo)
|
|
1012
1012
|
])
|
|
1013
1013
|
]);
|
|
1014
1014
|
};
|
|
1015
1015
|
}
|
|
1016
|
-
}, wo = /* @__PURE__ */
|
|
1016
|
+
}, wo = /* @__PURE__ */ N(bo, [["__scopeId", "data-v-629caa82"]]), xo = { class: "w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative overflow-hidden" }, _o = {
|
|
1017
1017
|
key: 0,
|
|
1018
1018
|
class: "p-5 pb-3 flex justify-between items-center"
|
|
1019
1019
|
}, ko = { class: "inline-block font-semibold text-lg text-gray-800" }, Lo = {
|
|
@@ -1034,7 +1034,7 @@ const ho = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1034
1034
|
}, Bo = {
|
|
1035
1035
|
key: 3,
|
|
1036
1036
|
class: "pt-4 flex justify-end"
|
|
1037
|
-
}, Oo = ["href"],
|
|
1037
|
+
}, Oo = ["href"], tt = {
|
|
1038
1038
|
__name: "vs-card-widget",
|
|
1039
1039
|
props: {
|
|
1040
1040
|
config: {
|
|
@@ -1048,62 +1048,62 @@ const ho = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1048
1048
|
},
|
|
1049
1049
|
emits: ["close", "content-resize"],
|
|
1050
1050
|
setup(e, { emit: t }) {
|
|
1051
|
-
const
|
|
1052
|
-
var
|
|
1053
|
-
return ((
|
|
1054
|
-
}),
|
|
1051
|
+
const r = e, o = t, i = E(() => {
|
|
1052
|
+
var B;
|
|
1053
|
+
return ((B = r.config) == null ? void 0 : B.title) || "";
|
|
1054
|
+
}), n = E(
|
|
1055
1055
|
() => !!(typeof window.app == "object" && window.app && window.app.config)
|
|
1056
|
-
),
|
|
1057
|
-
var
|
|
1058
|
-
return ((
|
|
1059
|
-
}),
|
|
1060
|
-
if (!
|
|
1061
|
-
const { rows:
|
|
1062
|
-
return !
|
|
1056
|
+
), m = T([]), h = T(!1), g = T(null), l = T(0), d = E(() => l.value + 1), v = E(() => {
|
|
1057
|
+
var B;
|
|
1058
|
+
return ((B = r.info) == null ? void 0 : B.length) || 0;
|
|
1059
|
+
}), a = E(() => m.value[l.value]), u = E(() => {
|
|
1060
|
+
if (!a.value) return {};
|
|
1061
|
+
const { rows: B, columns: k } = a.value;
|
|
1062
|
+
return !B || !k ? {} : k.reduce((_, A) => (!A.hide && !["geom", "geodata", "id"].includes(A.name) && (_[A.ua] = B[A.name] ?? "-"), _), {});
|
|
1063
1063
|
});
|
|
1064
1064
|
async function f() {
|
|
1065
|
-
var
|
|
1066
|
-
|
|
1065
|
+
var B, k, _, A, ae, ge;
|
|
1066
|
+
h.value = !0, g.value = null;
|
|
1067
1067
|
try {
|
|
1068
|
-
const
|
|
1069
|
-
id: (
|
|
1070
|
-
layer: typeof ((k =
|
|
1071
|
-
map: (
|
|
1072
|
-
},
|
|
1073
|
-
|
|
1074
|
-
} catch (
|
|
1075
|
-
g.value = (
|
|
1068
|
+
const pe = {
|
|
1069
|
+
id: (B = r.cardValues) == null ? void 0 : B.id,
|
|
1070
|
+
layer: typeof ((k = r.cardValues) == null ? void 0 : k.layer) == "object" ? (A = (_ = r.cardValues) == null ? void 0 : _.layer) == null ? void 0 : A.id : (ae = r.cardValues) == null ? void 0 : ae.layer,
|
|
1071
|
+
map: (ge = r.cardValues) == null ? void 0 : ge.map
|
|
1072
|
+
}, le = await fetch("/api/map-format?" + new URLSearchParams(pe)).then((Oe) => Oe.json());
|
|
1073
|
+
m.value[l.value] = le;
|
|
1074
|
+
} catch (pe) {
|
|
1075
|
+
g.value = (pe == null ? void 0 : pe.message) || "Помилка запиту";
|
|
1076
1076
|
} finally {
|
|
1077
|
-
|
|
1077
|
+
h.value = !1, await Pe(), o("content-resize");
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
1080
1080
|
function L() {
|
|
1081
|
-
l.value <
|
|
1081
|
+
l.value < r.info.length - 1 && (l.value += 1, m.value[l.value] || f());
|
|
1082
1082
|
}
|
|
1083
1083
|
function j() {
|
|
1084
|
-
l.value > 0 && (l.value -= 1,
|
|
1084
|
+
l.value > 0 && (l.value -= 1, m.value[l.value] || f());
|
|
1085
1085
|
}
|
|
1086
|
-
return
|
|
1087
|
-
await
|
|
1086
|
+
return ke(async () => {
|
|
1087
|
+
await Pe(), f();
|
|
1088
1088
|
}), fe(
|
|
1089
|
-
() =>
|
|
1089
|
+
() => r.info,
|
|
1090
1090
|
() => {
|
|
1091
|
-
l.value = 0, f(),
|
|
1091
|
+
l.value = 0, f(), o("content-resize");
|
|
1092
1092
|
},
|
|
1093
1093
|
{ deep: !0 }
|
|
1094
|
-
), fe([() =>
|
|
1095
|
-
await
|
|
1096
|
-
}), (
|
|
1097
|
-
var _,
|
|
1094
|
+
), fe([() => r.cardValues, () => r.config], async () => {
|
|
1095
|
+
await Pe(), f(), o("content-resize");
|
|
1096
|
+
}), (B, k) => {
|
|
1097
|
+
var _, A;
|
|
1098
1098
|
return c(), p("div", xo, [
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1099
|
+
i.value ? (c(), p("div", _o, [
|
|
1100
|
+
s("h2", ko, S(i.value), 1),
|
|
1101
|
+
s("button", {
|
|
1102
1102
|
type: "button",
|
|
1103
1103
|
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",
|
|
1104
|
-
onClick: k[0] || (k[0] = (
|
|
1104
|
+
onClick: k[0] || (k[0] = (ae) => o("close"))
|
|
1105
1105
|
}, [...k[1] || (k[1] = [
|
|
1106
|
-
|
|
1106
|
+
s("svg", {
|
|
1107
1107
|
class: "shrink-0 size-4 cursor-pointer",
|
|
1108
1108
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1109
1109
|
width: "24",
|
|
@@ -1115,53 +1115,53 @@ const ho = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1115
1115
|
"stroke-linecap": "round",
|
|
1116
1116
|
"stroke-linejoin": "round"
|
|
1117
1117
|
}, [
|
|
1118
|
-
|
|
1119
|
-
|
|
1118
|
+
s("path", { d: "M18 6 6 18" }),
|
|
1119
|
+
s("path", { d: "m6 6 12 12" })
|
|
1120
1120
|
], -1)
|
|
1121
1121
|
])])
|
|
1122
1122
|
])) : F("", !0),
|
|
1123
|
-
|
|
1124
|
-
|
|
1123
|
+
v.value > 1 ? (c(), p("div", Lo, [
|
|
1124
|
+
s("button", {
|
|
1125
1125
|
type: "button",
|
|
1126
1126
|
class: K([{
|
|
1127
|
-
"opacity-flex items-center justify-between border-b px-[16px] py-[8px]50 pointer-events-none":
|
|
1127
|
+
"opacity-flex items-center justify-between border-b px-[16px] py-[8px]50 pointer-events-none": d.value === 1
|
|
1128
1128
|
}, "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"]),
|
|
1129
1129
|
onClick: j
|
|
1130
1130
|
}, " ◀ ", 2),
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
k[2] || (k[2] =
|
|
1134
|
-
|
|
1131
|
+
s("div", Co, [
|
|
1132
|
+
s("span", $o, S(d.value), 1),
|
|
1133
|
+
k[2] || (k[2] = s("span", { class: "min-h-[34px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm" }, "з", -1)),
|
|
1134
|
+
s("span", Io, S(v.value), 1)
|
|
1135
1135
|
]),
|
|
1136
|
-
|
|
1136
|
+
s("button", {
|
|
1137
1137
|
type: "button",
|
|
1138
1138
|
onClick: L,
|
|
1139
1139
|
class: K([{
|
|
1140
|
-
"opacity-50 pointer-events-none":
|
|
1140
|
+
"opacity-50 pointer-events-none": d.value === v.value
|
|
1141
1141
|
}, "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"])
|
|
1142
1142
|
}, " ▶ ", 2)
|
|
1143
1143
|
])) : F("", !0),
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
(_ =
|
|
1144
|
+
s("div", Vo, [
|
|
1145
|
+
h.value ? (c(), p("div", So, "Завантаження даних...")) : g.value ? (c(), p("div", Fo, " Помилка завантаження даних ")) : (c(), p("div", jo, [
|
|
1146
|
+
(_ = a.value) != null && _.html ? (c(), p("div", {
|
|
1147
1147
|
key: 0,
|
|
1148
|
-
innerHTML:
|
|
1148
|
+
innerHTML: a.value.html,
|
|
1149
1149
|
class: "custom-table-html border-b"
|
|
1150
|
-
}, null, 8, Po)) : Object.keys(
|
|
1151
|
-
|
|
1152
|
-
(c(!0), p(
|
|
1153
|
-
key:
|
|
1150
|
+
}, null, 8, Po)) : Object.keys(u.value).length ? (c(), p("div", Eo, [
|
|
1151
|
+
s("dl", Mo, [
|
|
1152
|
+
(c(!0), p(z, null, q(u.value, (ae, ge) => (c(), p("div", {
|
|
1153
|
+
key: ge,
|
|
1154
1154
|
class: "grid grid-cols-1 gap-1 py-3 even:bg-gray-50 sm:grid-cols-3 sm:gap-4"
|
|
1155
1155
|
}, [
|
|
1156
|
-
|
|
1157
|
-
|
|
1156
|
+
s("dt", To, S(ge), 1),
|
|
1157
|
+
s("dd", zo, S(ae), 1)
|
|
1158
1158
|
]))), 128))
|
|
1159
1159
|
])
|
|
1160
1160
|
])) : (c(), p("div", Ao, "Даних не знайдено."))
|
|
1161
1161
|
])),
|
|
1162
|
-
(
|
|
1163
|
-
|
|
1164
|
-
href: `/card/${
|
|
1162
|
+
(A = a.value) != null && A.cardInterface && n.value ? (c(), p("div", Bo, [
|
|
1163
|
+
s("a", {
|
|
1164
|
+
href: `/card/${a.value.cardInterface}/${a.value.id}`,
|
|
1165
1165
|
target: "_blank",
|
|
1166
1166
|
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"
|
|
1167
1167
|
}, " Перейти в реєстр ", 8, Oo)
|
|
@@ -1173,7 +1173,7 @@ const ho = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1173
1173
|
}, Do = { class: "size-full flex flex-col bg-white border border-gray-200 shadow-2xs rounded-xl dark:bg-neutral-800 dark:border-neutral-700" }, Uo = {
|
|
1174
1174
|
key: 0,
|
|
1175
1175
|
class: "p-5 pb-0 items-center"
|
|
1176
|
-
}, Ro = { class: "inline-block font-semibold text-lg text-gray-800 dark:text-neutral-200" }, Ho = { class: "h-full p-5" }, No = { class: "h-full flex flex-col justify-between space-y-4" },
|
|
1176
|
+
}, Ro = { class: "inline-block font-semibold text-lg text-gray-800 dark:text-neutral-200" }, Ho = { class: "h-full p-5" }, No = { class: "h-full flex flex-col justify-between space-y-4" }, Zo = { class: "space-y-4" }, Wo = {
|
|
1177
1177
|
key: 0,
|
|
1178
1178
|
class: "flex gap-x-1 w-full h-2.5 rounded-full overflow-hidden"
|
|
1179
1179
|
}, qo = ["aria-valuenow"], Go = { 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" }, Jo = ["for"], Qo = {
|
|
@@ -1197,82 +1197,82 @@ const ho = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1197
1197
|
}
|
|
1198
1198
|
},
|
|
1199
1199
|
setup(e) {
|
|
1200
|
-
const t = e,
|
|
1200
|
+
const t = e, r = E(() => {
|
|
1201
1201
|
var g;
|
|
1202
1202
|
return ((g = t.config) == null ? void 0 : g.title) || "";
|
|
1203
|
-
}),
|
|
1203
|
+
}), o = T([]), i = E(() => t.config.layer.style.rules.some(
|
|
1204
1204
|
(g) => g.count !== void 0
|
|
1205
|
-
)),
|
|
1205
|
+
)), n = E(() => t.config.layer.style.rules.reduce(
|
|
1206
1206
|
(g, l) => g + (l.count || 0),
|
|
1207
1207
|
0
|
|
1208
|
-
)),
|
|
1208
|
+
)), m = (g) => !g || n.value === 0 ? 0 : Math.round(g / n.value * 100), h = () => {
|
|
1209
1209
|
const l = t.config.layer.style.rules.filter(
|
|
1210
|
-
(
|
|
1211
|
-
).map((
|
|
1210
|
+
(d, v) => o.value[v]
|
|
1211
|
+
).map((d) => d.id || d.value).join(",");
|
|
1212
1212
|
if (t.config.layer.id) {
|
|
1213
|
-
const
|
|
1214
|
-
if (
|
|
1215
|
-
const
|
|
1216
|
-
|
|
1213
|
+
const d = t.map.getSource(t.config.layer.id);
|
|
1214
|
+
if (d) {
|
|
1215
|
+
const a = d.tiles[0].split("?filter=")[0], u = l ? `${a}?filter=${t.config.layer.style.attribute}=${l}` : a;
|
|
1216
|
+
d.setTiles([u]);
|
|
1217
1217
|
}
|
|
1218
1218
|
}
|
|
1219
1219
|
};
|
|
1220
|
-
return
|
|
1220
|
+
return ke(() => {
|
|
1221
1221
|
var g;
|
|
1222
|
-
(g = t.config) != null && g.layer && (
|
|
1222
|
+
(g = t.config) != null && g.layer && (_e(t.map, t.config.layer), o.value = new Array(t.config.layer.style.rules.length).fill(
|
|
1223
1223
|
!1
|
|
1224
1224
|
));
|
|
1225
1225
|
}), (g, l) => (c(), p("div", Do, [
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1226
|
+
r.value ? (c(), p("div", Uo, [
|
|
1227
|
+
s("div", null, [
|
|
1228
|
+
s("h2", Ro, S(r.value), 1)
|
|
1229
1229
|
])
|
|
1230
1230
|
])) : F("", !0),
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
(c(!0), p(
|
|
1236
|
-
key:
|
|
1231
|
+
s("div", Ho, [
|
|
1232
|
+
s("div", No, [
|
|
1233
|
+
s("div", Zo, [
|
|
1234
|
+
i.value ? (c(), p("div", Wo, [
|
|
1235
|
+
(c(!0), p(z, null, q(e.config.layer.style.rules, (d, v) => (c(), p("div", {
|
|
1236
|
+
key: v,
|
|
1237
1237
|
class: "flex flex-col justify-center overflow-hidden text-xs text-white text-center whitespace-nowrap",
|
|
1238
1238
|
style: he({
|
|
1239
|
-
width: `${d
|
|
1240
|
-
backgroundColor:
|
|
1239
|
+
width: `${m(d.count)}%`,
|
|
1240
|
+
backgroundColor: d.color
|
|
1241
1241
|
}),
|
|
1242
1242
|
role: "progressbar",
|
|
1243
|
-
"aria-valuenow": d
|
|
1243
|
+
"aria-valuenow": m(d.count),
|
|
1244
1244
|
"aria-valuemin": "0",
|
|
1245
1245
|
"aria-valuemax": "100"
|
|
1246
1246
|
}, null, 12, qo))), 128))
|
|
1247
1247
|
])) : F("", !0),
|
|
1248
|
-
|
|
1249
|
-
(c(!0), p(
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
for: `filter-${
|
|
1248
|
+
s("ul", null, [
|
|
1249
|
+
(c(!0), p(z, null, q(e.config.layer.style.rules, (d, v) => (c(), p("li", { key: v }, [
|
|
1250
|
+
s("div", Go, [
|
|
1251
|
+
s("label", {
|
|
1252
|
+
for: `filter-${v}`,
|
|
1253
1253
|
class: "flex items-center w-full cursor-pointer"
|
|
1254
1254
|
}, [
|
|
1255
|
-
|
|
1255
|
+
s("div", {
|
|
1256
1256
|
class: "w-[18px] h-[18px] border rounded-[4px] flex items-center justify-center",
|
|
1257
1257
|
style: he({
|
|
1258
|
-
background:
|
|
1259
|
-
borderColor:
|
|
1258
|
+
background: o.value[v] ? d.color || "#2563eb" : "#fff",
|
|
1259
|
+
borderColor: o.value[v] ? d.color || "#2563eb" : d.color || "#d9d9d9"
|
|
1260
1260
|
})
|
|
1261
1261
|
}, [
|
|
1262
|
-
|
|
1262
|
+
o.value[v] ? (c(), p("img", Qo)) : F("", !0)
|
|
1263
1263
|
], 4),
|
|
1264
|
-
|
|
1264
|
+
se(s("input", {
|
|
1265
1265
|
type: "checkbox",
|
|
1266
|
-
id: `filter-${
|
|
1267
|
-
"onUpdate:modelValue": (
|
|
1268
|
-
onChange:
|
|
1266
|
+
id: `filter-${v}`,
|
|
1267
|
+
"onUpdate:modelValue": (a) => o.value[v] = a,
|
|
1268
|
+
onChange: h,
|
|
1269
1269
|
class: "hidden",
|
|
1270
1270
|
disabled: !1
|
|
1271
1271
|
}, null, 40, Yo), [
|
|
1272
|
-
[
|
|
1272
|
+
[Ze, o.value[v]]
|
|
1273
1273
|
]),
|
|
1274
|
-
|
|
1275
|
-
|
|
1274
|
+
s("span", Ko, S(d.label || d.text), 1),
|
|
1275
|
+
i.value ? (c(), p("span", Xo, "(" + S(d.count) + ")", 1)) : F("", !0)
|
|
1276
1276
|
], 8, Jo)
|
|
1277
1277
|
])
|
|
1278
1278
|
]))), 128))
|
|
@@ -1296,11 +1296,11 @@ const ho = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1296
1296
|
};
|
|
1297
1297
|
function rr(e, t) {
|
|
1298
1298
|
return c(), p("svg", or, [...t[0] || (t[0] = [
|
|
1299
|
-
|
|
1300
|
-
|
|
1299
|
+
s("path", { d: "M18 6 6 18" }, null, -1),
|
|
1300
|
+
s("path", { d: "m6 6 12 12" }, null, -1)
|
|
1301
1301
|
])]);
|
|
1302
1302
|
}
|
|
1303
|
-
const
|
|
1303
|
+
const ot = /* @__PURE__ */ N(tr, [["render", rr]]), sr = { class: "hover:bg-gray-100 rounded-lg flex items-center ml-[20px] py-[8px] px-[8px]" }, nr = ["for"], ir = { class: "custom-checkbox-wrapper" }, ar = ["id", "checked"], lr = { class: "custom-checkbox" }, cr = {
|
|
1304
1304
|
key: 0,
|
|
1305
1305
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1306
1306
|
width: "12",
|
|
@@ -1328,29 +1328,29 @@ const st = /* @__PURE__ */ H(tr, [["render", rr]]), sr = { class: "hover:bg-gray
|
|
|
1328
1328
|
},
|
|
1329
1329
|
emits: ["select", "remove"],
|
|
1330
1330
|
setup(e, { emit: t }) {
|
|
1331
|
-
const
|
|
1331
|
+
const r = e, o = t, i = E(() => r.selectedLayers.some((h) => h.id === r.layer.id)), n = (h) => Intl.NumberFormat("uk", {
|
|
1332
1332
|
notation: "compact"
|
|
1333
|
-
}).format(
|
|
1334
|
-
|
|
1333
|
+
}).format(h), m = (h) => {
|
|
1334
|
+
o(h ? "select" : "remove", r.layer);
|
|
1335
1335
|
};
|
|
1336
|
-
return (
|
|
1337
|
-
var l,
|
|
1336
|
+
return (h, g) => {
|
|
1337
|
+
var l, d, v, a, u;
|
|
1338
1338
|
return c(), p("div", sr, [
|
|
1339
|
-
|
|
1339
|
+
s("label", {
|
|
1340
1340
|
class: "flex items-center w-full cursor-pointer",
|
|
1341
1341
|
for: e.layer.id
|
|
1342
1342
|
}, [
|
|
1343
|
-
|
|
1344
|
-
|
|
1343
|
+
s("div", ir, [
|
|
1344
|
+
s("input", {
|
|
1345
1345
|
id: e.layer.id,
|
|
1346
1346
|
type: "checkbox",
|
|
1347
|
-
checked:
|
|
1348
|
-
onChange: g[0] || (g[0] = (f) =>
|
|
1347
|
+
checked: i.value,
|
|
1348
|
+
onChange: g[0] || (g[0] = (f) => m(f.target.checked)),
|
|
1349
1349
|
class: "custom-checkbox-input"
|
|
1350
1350
|
}, null, 40, ar),
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1351
|
+
s("div", lr, [
|
|
1352
|
+
i.value ? (c(), p("svg", cr, [...g[1] || (g[1] = [
|
|
1353
|
+
s("path", {
|
|
1354
1354
|
d: "M10.6663 1L4.24967 7.41667L1.33301 4.5",
|
|
1355
1355
|
stroke: "#fff",
|
|
1356
1356
|
"stroke-linecap": "round",
|
|
@@ -1359,18 +1359,18 @@ const st = /* @__PURE__ */ H(tr, [["render", rr]]), sr = { class: "hover:bg-gray
|
|
|
1359
1359
|
])])) : F("", !0)
|
|
1360
1360
|
])
|
|
1361
1361
|
]),
|
|
1362
|
-
|
|
1363
|
-
|
|
1362
|
+
s("div", dr, [
|
|
1363
|
+
s("div", {
|
|
1364
1364
|
class: "whitespace-nowrap text text-ellipsis max-w-[260px] overflow-hidden text-[13px] text-[#4b5563]",
|
|
1365
1365
|
title: (l = e.layer) == null ? void 0 : l.name
|
|
1366
|
-
}, S(((
|
|
1367
|
-
isNaN(
|
|
1366
|
+
}, S(((d = e.layer) == null ? void 0 : d.name) || ((v = e.layer) == null ? void 0 : v.title)), 9, ur),
|
|
1367
|
+
isNaN(n((a = e.layer) == null ? void 0 : a.count)) ? F("", !0) : (c(), p("div", pr, S(n((u = e.layer) == null ? void 0 : u.count)), 1))
|
|
1368
1368
|
])
|
|
1369
1369
|
], 8, nr)
|
|
1370
1370
|
]);
|
|
1371
1371
|
};
|
|
1372
1372
|
}
|
|
1373
|
-
}, fr = /* @__PURE__ */
|
|
1373
|
+
}, fr = /* @__PURE__ */ N(hr, [["__scopeId", "data-v-b96f3537"]]), gr = {}, vr = {
|
|
1374
1374
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1375
1375
|
width: "16",
|
|
1376
1376
|
height: "16",
|
|
@@ -1384,24 +1384,24 @@ const st = /* @__PURE__ */ H(tr, [["render", rr]]), sr = { class: "hover:bg-gray
|
|
|
1384
1384
|
};
|
|
1385
1385
|
function mr(e, t) {
|
|
1386
1386
|
return c(), p("svg", vr, [...t[0] || (t[0] = [
|
|
1387
|
-
|
|
1387
|
+
s("circle", {
|
|
1388
1388
|
cx: "11",
|
|
1389
1389
|
cy: "11",
|
|
1390
1390
|
r: "8"
|
|
1391
1391
|
}, null, -1),
|
|
1392
|
-
|
|
1392
|
+
s("line", {
|
|
1393
1393
|
x1: "21",
|
|
1394
1394
|
x2: "16.65",
|
|
1395
1395
|
y1: "21",
|
|
1396
1396
|
y2: "16.65"
|
|
1397
1397
|
}, null, -1),
|
|
1398
|
-
|
|
1398
|
+
s("line", {
|
|
1399
1399
|
x1: "11",
|
|
1400
1400
|
x2: "11",
|
|
1401
1401
|
y1: "8",
|
|
1402
1402
|
y2: "14"
|
|
1403
1403
|
}, null, -1),
|
|
1404
|
-
|
|
1404
|
+
s("line", {
|
|
1405
1405
|
x1: "8",
|
|
1406
1406
|
x2: "14",
|
|
1407
1407
|
y1: "11",
|
|
@@ -1409,7 +1409,7 @@ function mr(e, t) {
|
|
|
1409
1409
|
}, null, -1)
|
|
1410
1410
|
])]);
|
|
1411
1411
|
}
|
|
1412
|
-
const yr = /* @__PURE__ */
|
|
1412
|
+
const yr = /* @__PURE__ */ N(gr, [["render", mr]]), br = {}, wr = {
|
|
1413
1413
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1414
1414
|
width: "16",
|
|
1415
1415
|
height: "16",
|
|
@@ -1423,16 +1423,16 @@ const yr = /* @__PURE__ */ H(gr, [["render", mr]]), br = {}, wr = {
|
|
|
1423
1423
|
};
|
|
1424
1424
|
function xr(e, t) {
|
|
1425
1425
|
return c(), p("svg", wr, [...t[0] || (t[0] = [
|
|
1426
|
-
|
|
1426
|
+
s("circle", {
|
|
1427
1427
|
cx: "12",
|
|
1428
1428
|
cy: "12",
|
|
1429
1429
|
r: "10"
|
|
1430
1430
|
}, null, -1),
|
|
1431
|
-
|
|
1432
|
-
|
|
1431
|
+
s("path", { d: "M12 16v-4" }, null, -1),
|
|
1432
|
+
s("path", { d: "M12 8h.01" }, null, -1)
|
|
1433
1433
|
])]);
|
|
1434
1434
|
}
|
|
1435
|
-
const _r = /* @__PURE__ */
|
|
1435
|
+
const _r = /* @__PURE__ */ N(br, [["render", xr]]), kr = {}, Lr = {
|
|
1436
1436
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1437
1437
|
width: "16",
|
|
1438
1438
|
height: "16",
|
|
@@ -1446,19 +1446,19 @@ const _r = /* @__PURE__ */ H(br, [["render", xr]]), kr = {}, Lr = {
|
|
|
1446
1446
|
};
|
|
1447
1447
|
function Cr(e, t) {
|
|
1448
1448
|
return c(), p("svg", Lr, [...t[0] || (t[0] = [
|
|
1449
|
-
|
|
1450
|
-
|
|
1449
|
+
s("path", { d: "M12 3v18" }, null, -1),
|
|
1450
|
+
s("rect", {
|
|
1451
1451
|
width: "18",
|
|
1452
1452
|
height: "18",
|
|
1453
1453
|
x: "3",
|
|
1454
1454
|
y: "3",
|
|
1455
1455
|
rx: "2"
|
|
1456
1456
|
}, null, -1),
|
|
1457
|
-
|
|
1458
|
-
|
|
1457
|
+
s("path", { d: "M3 9h18" }, null, -1),
|
|
1458
|
+
s("path", { d: "M3 15h18" }, null, -1)
|
|
1459
1459
|
])]);
|
|
1460
1460
|
}
|
|
1461
|
-
const $r = /* @__PURE__ */
|
|
1461
|
+
const $r = /* @__PURE__ */ N(kr, [["render", Cr]]), Ir = {}, Vr = {
|
|
1462
1462
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1463
1463
|
width: "16",
|
|
1464
1464
|
height: "16",
|
|
@@ -1472,10 +1472,10 @@ const $r = /* @__PURE__ */ H(kr, [["render", Cr]]), Ir = {}, Vr = {
|
|
|
1472
1472
|
};
|
|
1473
1473
|
function Sr(e, t) {
|
|
1474
1474
|
return c(), p("svg", Vr, [...t[0] || (t[0] = [
|
|
1475
|
-
|
|
1475
|
+
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)
|
|
1476
1476
|
])]);
|
|
1477
1477
|
}
|
|
1478
|
-
const Fr = /* @__PURE__ */
|
|
1478
|
+
const Fr = /* @__PURE__ */ N(Ir, [["render", Sr]]), jr = {}, Pr = {
|
|
1479
1479
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1480
1480
|
width: "18",
|
|
1481
1481
|
height: "18",
|
|
@@ -1489,24 +1489,24 @@ const Fr = /* @__PURE__ */ H(Ir, [["render", Sr]]), jr = {}, Pr = {
|
|
|
1489
1489
|
};
|
|
1490
1490
|
function Er(e, t) {
|
|
1491
1491
|
return c(), p("svg", Pr, [...t[0] || (t[0] = [
|
|
1492
|
-
|
|
1492
|
+
s("circle", {
|
|
1493
1493
|
cx: "12",
|
|
1494
1494
|
cy: "12",
|
|
1495
1495
|
r: "1"
|
|
1496
1496
|
}, null, -1),
|
|
1497
|
-
|
|
1497
|
+
s("circle", {
|
|
1498
1498
|
cx: "12",
|
|
1499
1499
|
cy: "5",
|
|
1500
1500
|
r: "1"
|
|
1501
1501
|
}, null, -1),
|
|
1502
|
-
|
|
1502
|
+
s("circle", {
|
|
1503
1503
|
cx: "12",
|
|
1504
1504
|
cy: "19",
|
|
1505
1505
|
r: "1"
|
|
1506
1506
|
}, null, -1)
|
|
1507
1507
|
])]);
|
|
1508
1508
|
}
|
|
1509
|
-
const Mr = /* @__PURE__ */
|
|
1509
|
+
const Mr = /* @__PURE__ */ N(jr, [["render", Er]]), Tr = {}, zr = {
|
|
1510
1510
|
width: "6",
|
|
1511
1511
|
height: "10",
|
|
1512
1512
|
viewBox: "0 0 6 10",
|
|
@@ -1515,7 +1515,7 @@ const Mr = /* @__PURE__ */ H(jr, [["render", Er]]), Tr = {}, zr = {
|
|
|
1515
1515
|
};
|
|
1516
1516
|
function Ar(e, t) {
|
|
1517
1517
|
return c(), p("svg", zr, [...t[0] || (t[0] = [
|
|
1518
|
-
|
|
1518
|
+
s("path", {
|
|
1519
1519
|
d: "M1 9L5 5L1 1",
|
|
1520
1520
|
stroke: "currentColor",
|
|
1521
1521
|
"stroke-linecap": "round",
|
|
@@ -1523,7 +1523,7 @@ function Ar(e, t) {
|
|
|
1523
1523
|
}, null, -1)
|
|
1524
1524
|
])]);
|
|
1525
1525
|
}
|
|
1526
|
-
const Br = /* @__PURE__ */
|
|
1526
|
+
const Br = /* @__PURE__ */ N(Tr, [["render", Ar]]), Or = {}, Dr = {
|
|
1527
1527
|
width: "18",
|
|
1528
1528
|
height: "18",
|
|
1529
1529
|
viewBox: "0 0 24 24",
|
|
@@ -1532,10 +1532,10 @@ const Br = /* @__PURE__ */ H(Tr, [["render", Ar]]), Or = {}, Dr = {
|
|
|
1532
1532
|
};
|
|
1533
1533
|
function Ur(e, t) {
|
|
1534
1534
|
return c(), p("svg", Dr, [...t[0] || (t[0] = [
|
|
1535
|
-
|
|
1535
|
+
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)
|
|
1536
1536
|
])]);
|
|
1537
1537
|
}
|
|
1538
|
-
const Rr = /* @__PURE__ */
|
|
1538
|
+
const Rr = /* @__PURE__ */ N(Or, [["render", Ur]]);
|
|
1539
1539
|
function Hr() {
|
|
1540
1540
|
const t = new URLSearchParams(window.location.search).get("layers");
|
|
1541
1541
|
return t ? t.split(",") : [];
|
|
@@ -1543,12 +1543,12 @@ function Hr() {
|
|
|
1543
1543
|
function Nr(e) {
|
|
1544
1544
|
const t = new URLSearchParams(window.location.search);
|
|
1545
1545
|
e.length > 0 ? t.set("layers", e.join(",")) : t.delete("layers");
|
|
1546
|
-
const
|
|
1547
|
-
window.history.replaceState({}, "",
|
|
1546
|
+
const r = `${window.location.pathname}?${t.toString()}`;
|
|
1547
|
+
window.history.replaceState({}, "", r);
|
|
1548
1548
|
}
|
|
1549
|
-
const
|
|
1549
|
+
const Zr = {
|
|
1550
1550
|
components: {
|
|
1551
|
-
VsPopover:
|
|
1551
|
+
VsPopover: Ve,
|
|
1552
1552
|
VsLayersItem: fr,
|
|
1553
1553
|
ZoomInIcon: yr,
|
|
1554
1554
|
InfoIcon: _r,
|
|
@@ -1557,8 +1557,8 @@ const Wr = {
|
|
|
1557
1557
|
DotsIcon: Mr,
|
|
1558
1558
|
ChevronRightIcon: Br,
|
|
1559
1559
|
FilterIcon: Rr,
|
|
1560
|
-
closeIcon:
|
|
1561
|
-
searchIcon:
|
|
1560
|
+
closeIcon: ot,
|
|
1561
|
+
searchIcon: et
|
|
1562
1562
|
},
|
|
1563
1563
|
props: {
|
|
1564
1564
|
center: { type: Array, default: () => [26.2516, 50.6199] },
|
|
@@ -1593,15 +1593,15 @@ const Wr = {
|
|
|
1593
1593
|
if (this.mounted = !0, await this.getLayers(), this.categories = this.layersCategories(), this.history) {
|
|
1594
1594
|
const e = Hr();
|
|
1595
1595
|
e.length > 0 && this.layers && (e.forEach((t) => {
|
|
1596
|
-
const
|
|
1597
|
-
if (
|
|
1598
|
-
const
|
|
1599
|
-
...
|
|
1596
|
+
const r = this.layers.find((o) => String(o.id) === t);
|
|
1597
|
+
if (r && !this.selectedLayers.find((o) => o.id === r.id)) {
|
|
1598
|
+
const o = {
|
|
1599
|
+
...r,
|
|
1600
1600
|
visible: !0,
|
|
1601
1601
|
opacity: 100,
|
|
1602
1602
|
showFilters: !1
|
|
1603
1603
|
};
|
|
1604
|
-
this.selectedLayers.push(
|
|
1604
|
+
this.selectedLayers.push(o), _e(this.map, o);
|
|
1605
1605
|
}
|
|
1606
1606
|
}), this.activeView = "selected");
|
|
1607
1607
|
}
|
|
@@ -1627,8 +1627,8 @@ const Wr = {
|
|
|
1627
1627
|
methods: {
|
|
1628
1628
|
async getLayers() {
|
|
1629
1629
|
try {
|
|
1630
|
-
const e = await fetch("/api/map-catalog").then((
|
|
1631
|
-
(
|
|
1630
|
+
const e = await fetch("/api/map-catalog").then((r) => r.json()), t = (e.services || []).filter(
|
|
1631
|
+
(r) => r.service_type !== "other"
|
|
1632
1632
|
);
|
|
1633
1633
|
this.layers = [...t, ...e.rasters || []], this.rawCatalog = {
|
|
1634
1634
|
...e,
|
|
@@ -1668,16 +1668,16 @@ const Wr = {
|
|
|
1668
1668
|
opacity: 100,
|
|
1669
1669
|
showFilters: !1
|
|
1670
1670
|
};
|
|
1671
|
-
this.selectedLayers.unshift(t),
|
|
1671
|
+
this.selectedLayers.unshift(t), _e(this.map, t);
|
|
1672
1672
|
}
|
|
1673
1673
|
},
|
|
1674
1674
|
deleteLayer(e) {
|
|
1675
|
-
const t = this.selectedLayers.findIndex((
|
|
1676
|
-
t !== -1 && this.selectedLayers.splice(t, 1),
|
|
1675
|
+
const t = this.selectedLayers.findIndex((r) => r.id === e.id);
|
|
1676
|
+
t !== -1 && this.selectedLayers.splice(t, 1), $e(this.map, e.id);
|
|
1677
1677
|
},
|
|
1678
1678
|
async toggleLayerVisibility(e) {
|
|
1679
1679
|
try {
|
|
1680
|
-
e.visible ? (await
|
|
1680
|
+
e.visible ? (await _e(this.map, e), this.updateLayerOpacity(e)) : await $e(this.map, e.id);
|
|
1681
1681
|
} catch (t) {
|
|
1682
1682
|
console.error("Error toggling layer visibility:", t), e.visible = !e.visible;
|
|
1683
1683
|
}
|
|
@@ -1687,27 +1687,27 @@ const Wr = {
|
|
|
1687
1687
|
},
|
|
1688
1688
|
updateLayerOpacity(e) {
|
|
1689
1689
|
if (this.map) {
|
|
1690
|
-
const t = this.map.getStyle().layers.filter((
|
|
1691
|
-
t.forEach((
|
|
1692
|
-
|
|
1693
|
-
|
|
1690
|
+
const t = this.map.getStyle().layers.filter((o) => o.id.includes(e.id)), r = e.opacity / 100;
|
|
1691
|
+
t.forEach((o) => {
|
|
1692
|
+
o.type === "fill" ? (e.originalFillOpacity || (e.originalFillOpacity = this.map.getPaintProperty(o.id, "fill-opacity") || 1), this.map.setPaintProperty(
|
|
1693
|
+
o.id,
|
|
1694
1694
|
"fill-opacity",
|
|
1695
|
-
e.originalFillOpacity *
|
|
1696
|
-
)) :
|
|
1697
|
-
|
|
1695
|
+
e.originalFillOpacity * r
|
|
1696
|
+
)) : o.type === "raster" ? this.map.setPaintProperty(o.id, "raster-opacity", r) : o.type === "line" ? this.map.setPaintProperty(o.id, "line-opacity", r) : o.type === "circle" ? (this.map.setPaintProperty(o.id, "circle-opacity", r), this.map.setPaintProperty(
|
|
1697
|
+
o.id,
|
|
1698
1698
|
"circle-stroke-opacity",
|
|
1699
|
-
|
|
1700
|
-
)) :
|
|
1699
|
+
r
|
|
1700
|
+
)) : o.type === "symbol" && (this.map.setPaintProperty(o.id, "icon-opacity", r), this.map.setPaintProperty(o.id, "text-opacity", r));
|
|
1701
1701
|
});
|
|
1702
1702
|
}
|
|
1703
1703
|
},
|
|
1704
1704
|
async handleRemoveFromCatalog(e) {
|
|
1705
|
-
const t = this.selectedLayers.find((
|
|
1706
|
-
t != null && t.visible && await
|
|
1705
|
+
const t = this.selectedLayers.find((r) => r.id === e.id);
|
|
1706
|
+
t != null && t.visible && await $e(this.map, e.id), this.deleteLayer(e);
|
|
1707
1707
|
},
|
|
1708
1708
|
clearSelectedLayers() {
|
|
1709
1709
|
this.selectedLayers.forEach(async (e) => {
|
|
1710
|
-
e.visible && await
|
|
1710
|
+
e.visible && await $e(this.map, e.id);
|
|
1711
1711
|
}), this.selectedLayers = [];
|
|
1712
1712
|
},
|
|
1713
1713
|
zoomToLayer(e) {
|
|
@@ -1733,10 +1733,10 @@ const Wr = {
|
|
|
1733
1733
|
);
|
|
1734
1734
|
},
|
|
1735
1735
|
async handleFilterChange({ url: e }, t) {
|
|
1736
|
-
const
|
|
1737
|
-
if (
|
|
1738
|
-
const
|
|
1739
|
-
|
|
1736
|
+
const r = this.map.getSource(t.id);
|
|
1737
|
+
if (r) {
|
|
1738
|
+
const i = r.tiles[0].split("?filter=")[0], n = e ? `${i}?filter=${e}` : i;
|
|
1739
|
+
r.setTiles([n]);
|
|
1740
1740
|
}
|
|
1741
1741
|
},
|
|
1742
1742
|
popoverActions(e) {
|
|
@@ -1791,10 +1791,10 @@ const Wr = {
|
|
|
1791
1791
|
return;
|
|
1792
1792
|
const t = this.selectedLayers[this.draggedLayerIndex];
|
|
1793
1793
|
if (this.selectedLayers.splice(this.draggedLayerIndex, 1), this.selectedLayers.splice(e, 0, t), this.draggedLayerIndex = null, this.map && this.selectedLayers.length > 1)
|
|
1794
|
-
for (let
|
|
1795
|
-
const
|
|
1796
|
-
|
|
1797
|
-
|
|
1794
|
+
for (let r = this.selectedLayers.length - 1; r >= 0; r--) {
|
|
1795
|
+
const o = this.selectedLayers[r];
|
|
1796
|
+
o.visible && this.map.getStyle().layers.find((i) => i.id.includes(o.id)) && this.map.getStyle().layers.forEach((i) => {
|
|
1797
|
+
i.id.includes(o.id) && this.map.moveLayer(i.id);
|
|
1798
1798
|
});
|
|
1799
1799
|
}
|
|
1800
1800
|
},
|
|
@@ -1802,7 +1802,7 @@ const Wr = {
|
|
|
1802
1802
|
this.draggedLayerIndex = null;
|
|
1803
1803
|
}
|
|
1804
1804
|
}
|
|
1805
|
-
},
|
|
1805
|
+
}, Wr = { class: "w-full max-w-md mx-auto p-4 bg-white border border-gray-200 rounded-lg shadow-sm" }, qr = { class: "flex items-center justify-between mb-4" }, Gr = { class: "flex items-center gap-2" }, Jr = { class: "text-lg font-semibold text-gray-800" }, Qr = { key: 0 }, Yr = { key: 1 }, Kr = { class: "flex mb-4 border-b border-gray-200" }, Xr = { key: 0 }, es = { class: "mb-4" }, ts = {
|
|
1806
1806
|
key: 0,
|
|
1807
1807
|
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"
|
|
1808
1808
|
}, os = ["onDragstart", "onDragover", "onDrop"], rs = { class: "flex items-center justify-between" }, ss = { class: "flex items-center gap-2 cursor-move" }, ns = ["onUpdate:modelValue", "onChange"], is = { class: "text-gray-800" }, as = { class: "flex items-center gap-2" }, ls = { class: "relative" }, cs = { class: "flex items-center gap-2" }, ds = ["onUpdate:modelValue", "onInput"], us = { class: "text-xs text-gray-600 whitespace-nowrap" }, ps = ["onClick"], hs = { class: "relative" }, fs = { class: "w-48" }, gs = {
|
|
@@ -1827,13 +1827,13 @@ const Wr = {
|
|
|
1827
1827
|
key: 0,
|
|
1828
1828
|
class: "text-center text-[14px] text-[#4b5563]"
|
|
1829
1829
|
}, Cs = ["onClick"], $s = { class: "flex items-center gap-x-3" }, Is = ["title"], Vs = { class: "text-xs opacity-60 text-[#4b5563]" };
|
|
1830
|
-
function Ss(e, t, o,
|
|
1831
|
-
var
|
|
1832
|
-
const
|
|
1833
|
-
return c(), p("div",
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
t[7] || (t[7] =
|
|
1830
|
+
function Ss(e, t, r, o, i, n) {
|
|
1831
|
+
var u;
|
|
1832
|
+
const m = J("VsPopover"), h = J("DotsIcon"), g = J("VsFilter"), l = J("searchIcon"), d = J("closeIcon"), v = J("VsLayersItem"), a = J("chevronRightIcon");
|
|
1833
|
+
return c(), p("div", Wr, [
|
|
1834
|
+
s("div", qr, [
|
|
1835
|
+
s("div", Gr, [
|
|
1836
|
+
t[7] || (t[7] = s("svg", {
|
|
1837
1837
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1838
1838
|
width: "20",
|
|
1839
1839
|
height: "20",
|
|
@@ -1845,46 +1845,46 @@ function Ss(e, t, o, s, n, i) {
|
|
|
1845
1845
|
"stroke-linejoin": "round",
|
|
1846
1846
|
class: "lucide lucide-layers text-blue-600"
|
|
1847
1847
|
}, [
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1848
|
+
s("path", { d: "m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z" }),
|
|
1849
|
+
s("path", { d: "m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65" }),
|
|
1850
|
+
s("path", { d: "m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65" })
|
|
1851
1851
|
], -1)),
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1852
|
+
s("h2", Jr, [
|
|
1853
|
+
ie(S(i.activeView === "catalog" ? "Каталог" : "Вибрані шари") + " ", 1),
|
|
1854
|
+
i.activeView === "catalog" ? (c(), p("span", Qr, "(" + S(((u = i.layers) == null ? void 0 : u.length) || 0) + ")", 1)) : (c(), p("span", Yr, "(" + S(i.selectedLayers.length) + ")", 1))
|
|
1855
1855
|
])
|
|
1856
1856
|
]),
|
|
1857
|
-
|
|
1857
|
+
s("button", {
|
|
1858
1858
|
class: "p-1 rounded-full hover:bg-gray-200 transition-colors",
|
|
1859
1859
|
"aria-label": "Reset layers",
|
|
1860
|
-
onClick: t[0] || (t[0] = (...f) =>
|
|
1860
|
+
onClick: t[0] || (t[0] = (...f) => n.clearSelectedLayers && n.clearSelectedLayers(...f))
|
|
1861
1861
|
}, [...t[8] || (t[8] = [
|
|
1862
|
-
|
|
1862
|
+
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-e9e7021a><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" data-v-e9e7021a></path><path d="M21 3v5h-5" data-v-e9e7021a></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-e9e7021a></path><path d="M8 16H3v5" data-v-e9e7021a></path></svg>', 1)
|
|
1863
1863
|
])])
|
|
1864
1864
|
]),
|
|
1865
|
-
|
|
1866
|
-
|
|
1865
|
+
s("div", Kr, [
|
|
1866
|
+
s("button", {
|
|
1867
1867
|
class: K([
|
|
1868
1868
|
"px-4 py-2 text-sm font-medium",
|
|
1869
|
-
|
|
1869
|
+
i.activeView === "catalog" ? "text-blue-600 border-b-2 border-blue-600" : "text-gray-600 hover:text-gray-800"
|
|
1870
1870
|
]),
|
|
1871
|
-
onClick: t[1] || (t[1] = (f) =>
|
|
1871
|
+
onClick: t[1] || (t[1] = (f) => i.activeView = "catalog")
|
|
1872
1872
|
}, " Каталог ", 2),
|
|
1873
|
-
|
|
1873
|
+
s("button", {
|
|
1874
1874
|
class: K([
|
|
1875
1875
|
"px-4 py-2 text-sm font-medium",
|
|
1876
|
-
|
|
1876
|
+
i.activeView === "selected" ? "text-blue-600 border-b-2 border-blue-600" : "text-gray-600 hover:text-gray-800"
|
|
1877
1877
|
]),
|
|
1878
|
-
onClick: t[2] || (t[2] = (f) =>
|
|
1878
|
+
onClick: t[2] || (t[2] = (f) => i.activeView = "selected")
|
|
1879
1879
|
}, " Вибрані шари ", 2)
|
|
1880
1880
|
]),
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1881
|
+
i.activeView === "selected" ? (c(), p("div", Xr, [
|
|
1882
|
+
s("div", es, [
|
|
1883
|
+
s("button", {
|
|
1884
1884
|
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",
|
|
1885
|
-
onClick: t[3] || (t[3] = (f) =>
|
|
1885
|
+
onClick: t[3] || (t[3] = (f) => i.activeView = "catalog")
|
|
1886
1886
|
}, [...t[9] || (t[9] = [
|
|
1887
|
-
|
|
1887
|
+
s("svg", {
|
|
1888
1888
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1889
1889
|
width: "16",
|
|
1890
1890
|
height: "16",
|
|
@@ -1896,86 +1896,86 @@ function Ss(e, t, o, s, n, i) {
|
|
|
1896
1896
|
"stroke-linejoin": "round",
|
|
1897
1897
|
class: "lucide lucide-plus"
|
|
1898
1898
|
}, [
|
|
1899
|
-
|
|
1900
|
-
|
|
1899
|
+
s("path", { d: "M5 12h14" }),
|
|
1900
|
+
s("path", { d: "M12 5v14" })
|
|
1901
1901
|
], -1),
|
|
1902
|
-
|
|
1902
|
+
s("span", null, "Вибрати шар", -1)
|
|
1903
1903
|
])])
|
|
1904
1904
|
]),
|
|
1905
|
-
|
|
1906
|
-
(c(!0), p(
|
|
1907
|
-
var j,
|
|
1905
|
+
i.mounted ? (c(), p("div", ts, [
|
|
1906
|
+
(c(!0), p(z, null, q(i.selectedLayers, (f, L) => {
|
|
1907
|
+
var j, B;
|
|
1908
1908
|
return c(), p("div", {
|
|
1909
1909
|
key: f.id || L,
|
|
1910
|
-
class: K(["border border-gray-200 rounded-md p-3 mb-2 bg-white shadow-sm text-[13px] text-[#4b5563]", { dragging:
|
|
1910
|
+
class: K(["border border-gray-200 rounded-md p-3 mb-2 bg-white shadow-sm text-[13px] text-[#4b5563]", { dragging: i.draggedLayerIndex === L }]),
|
|
1911
1911
|
draggable: "true",
|
|
1912
|
-
onDragstart: (k) =>
|
|
1913
|
-
onDragover:
|
|
1914
|
-
onDrop: (k) =>
|
|
1915
|
-
onDragend: t[4] || (t[4] = (...k) =>
|
|
1912
|
+
onDragstart: (k) => n.onDragStart(L),
|
|
1913
|
+
onDragover: vt((k) => n.onDragOver(L), ["prevent"]),
|
|
1914
|
+
onDrop: (k) => n.onDrop(L),
|
|
1915
|
+
onDragend: t[4] || (t[4] = (...k) => n.onDragEnd && n.onDragEnd(...k))
|
|
1916
1916
|
}, [
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
t[10] || (t[10] =
|
|
1920
|
-
|
|
1917
|
+
s("div", rs, [
|
|
1918
|
+
s("div", ss, [
|
|
1919
|
+
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-e9e7021a><circle cx="5" cy="5" r="1.5" data-v-e9e7021a></circle><circle cx="5" cy="12" r="1.5" data-v-e9e7021a></circle><circle cx="5" cy="19" r="1.5" data-v-e9e7021a></circle><circle cx="12" cy="5" r="1.5" data-v-e9e7021a></circle><circle cx="12" cy="12" r="1.5" data-v-e9e7021a></circle><circle cx="12" cy="19" r="1.5" data-v-e9e7021a></circle><circle cx="19" cy="5" r="1.5" data-v-e9e7021a></circle><circle cx="19" cy="12" r="1.5" data-v-e9e7021a></circle><circle cx="19" cy="19" r="1.5" data-v-e9e7021a></circle></svg>', 1)),
|
|
1920
|
+
se(s("input", {
|
|
1921
1921
|
type: "checkbox",
|
|
1922
1922
|
class: "w-4 h-4 text-blue-600 rounded focus:ring-blue-500",
|
|
1923
1923
|
"onUpdate:modelValue": (k) => f.visible = k,
|
|
1924
|
-
onChange: (k) =>
|
|
1924
|
+
onChange: (k) => n.toggleLayerVisibility(f)
|
|
1925
1925
|
}, null, 40, ns), [
|
|
1926
|
-
[
|
|
1926
|
+
[Ze, f.visible]
|
|
1927
1927
|
]),
|
|
1928
|
-
|
|
1928
|
+
s("span", is, S(f.name || f.title || f.label), 1)
|
|
1929
1929
|
]),
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
reference:
|
|
1934
|
-
|
|
1930
|
+
s("div", as, [
|
|
1931
|
+
s("div", ls, [
|
|
1932
|
+
Z(m, { placement: "bottom" }, {
|
|
1933
|
+
reference: G(() => [
|
|
1934
|
+
s("div", {
|
|
1935
1935
|
class: "text-sm text-gray-600 hover:text-gray-800 transition-colors px-2 py-1 rounded hover:bg-gray-100 cursor-pointer",
|
|
1936
|
-
onClick: (k) =>
|
|
1936
|
+
onClick: (k) => n.updateLayerOpacity(f)
|
|
1937
1937
|
}, S(f.opacity || 100) + "% ", 9, ps)
|
|
1938
1938
|
]),
|
|
1939
|
-
default:
|
|
1940
|
-
|
|
1941
|
-
t[11] || (t[11] =
|
|
1942
|
-
|
|
1939
|
+
default: G(() => [
|
|
1940
|
+
s("div", cs, [
|
|
1941
|
+
t[11] || (t[11] = s("label", { class: "text-gray-600 whitespace-nowrap" }, "Прозорість:", -1)),
|
|
1942
|
+
se(s("input", {
|
|
1943
1943
|
type: "range",
|
|
1944
1944
|
min: "0",
|
|
1945
1945
|
max: "100",
|
|
1946
1946
|
step: "1",
|
|
1947
1947
|
"onUpdate:modelValue": (k) => f.opacity = k,
|
|
1948
|
-
onInput: (k) =>
|
|
1948
|
+
onInput: (k) => n.onLayerOpacityChange(f),
|
|
1949
1949
|
class: "h-2 w-full accent-blue-600 rounded-lg cursor-pointer bg-gray-200"
|
|
1950
1950
|
}, null, 40, ds), [
|
|
1951
|
-
[
|
|
1951
|
+
[He, f.opacity]
|
|
1952
1952
|
]),
|
|
1953
|
-
|
|
1953
|
+
s("span", us, S(Math.round(f.opacity)) + "% ", 1)
|
|
1954
1954
|
])
|
|
1955
1955
|
]),
|
|
1956
1956
|
_: 2
|
|
1957
1957
|
}, 1024)
|
|
1958
1958
|
]),
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
reference:
|
|
1962
|
-
|
|
1963
|
-
|
|
1959
|
+
s("div", hs, [
|
|
1960
|
+
Z(m, { placement: "bottom" }, {
|
|
1961
|
+
reference: G(() => [
|
|
1962
|
+
s("div", ms, [
|
|
1963
|
+
Z(h)
|
|
1964
1964
|
])
|
|
1965
1965
|
]),
|
|
1966
|
-
default:
|
|
1967
|
-
|
|
1968
|
-
(c(!0), p(
|
|
1966
|
+
default: G(() => [
|
|
1967
|
+
s("div", fs, [
|
|
1968
|
+
(c(!0), p(z, null, q(n.popoverActions(f), (k, _) => (c(), p(z, { key: _ }, [
|
|
1969
1969
|
k.divider ? (c(), p("hr", gs)) : (c(), p("button", {
|
|
1970
1970
|
key: 1,
|
|
1971
1971
|
class: K(
|
|
1972
1972
|
"w-full p-2 text-left text-sm flex items-center gap-2 " + (k.class || "")
|
|
1973
1973
|
),
|
|
1974
1974
|
disabled: k.disabled,
|
|
1975
|
-
onClick: (
|
|
1975
|
+
onClick: (A) => !k.disabled && e.$options.methods[k.handler].call(this, f)
|
|
1976
1976
|
}, [
|
|
1977
|
-
(c(), X(
|
|
1978
|
-
|
|
1977
|
+
(c(), X(Be(k.icon), { class: "lucide" })),
|
|
1978
|
+
ie(" " + S(k.label), 1)
|
|
1979
1979
|
], 10, vs))
|
|
1980
1980
|
], 64))), 128))
|
|
1981
1981
|
])
|
|
@@ -1986,8 +1986,8 @@ function Ss(e, t, o, s, n, i) {
|
|
|
1986
1986
|
])
|
|
1987
1987
|
]),
|
|
1988
1988
|
f.showFilters ? (c(), p("div", ys, [
|
|
1989
|
-
|
|
1990
|
-
|
|
1989
|
+
s("div", bs, " Фільтри для шару: " + S(f.name || f.title || f.label), 1),
|
|
1990
|
+
se(Z(g, {
|
|
1991
1991
|
ref_for: !0,
|
|
1992
1992
|
ref: "filter",
|
|
1993
1993
|
scheme: f.filters,
|
|
@@ -1995,87 +1995,87 @@ function Ss(e, t, o, s, n, i) {
|
|
|
1995
1995
|
urlSeparator: "true",
|
|
1996
1996
|
view: "plain",
|
|
1997
1997
|
name: "filter",
|
|
1998
|
-
onFilterChange: (k) =>
|
|
1998
|
+
onFilterChange: (k) => n.handleFilterChange(k, f)
|
|
1999
1999
|
}, null, 8, ["scheme", "onFilterChange"]), [
|
|
2000
|
-
[
|
|
2000
|
+
[je, (j = f.filters) == null ? void 0 : j.length]
|
|
2001
2001
|
]),
|
|
2002
|
-
|
|
2003
|
-
|
|
2002
|
+
se(s("div", null, [...t[12] || (t[12] = [
|
|
2003
|
+
s("div", { class: "px-2 text-[14px] text-[#4b5563]" }, " Фільтри для шару відсутні ", -1)
|
|
2004
2004
|
])], 512), [
|
|
2005
|
-
[
|
|
2005
|
+
[je, !((B = f.filters) != null && B.length)]
|
|
2006
2006
|
])
|
|
2007
2007
|
])) : F("", !0)
|
|
2008
2008
|
], 42, os);
|
|
2009
2009
|
}), 128)),
|
|
2010
|
-
|
|
2011
|
-
|
|
2010
|
+
i.selectedLayers.length === 0 ? (c(), p("div", ws, [...t[13] || (t[13] = [
|
|
2011
|
+
s("p", null, 'Щоб додати шар, натисніть на кнопку "Вибрати шар".', -1)
|
|
2012
2012
|
])])) : F("", !0)
|
|
2013
2013
|
])) : F("", !0)
|
|
2014
|
-
])) : (c(), p(
|
|
2015
|
-
|
|
2016
|
-
|
|
2014
|
+
])) : (c(), p(z, { key: 1 }, [
|
|
2015
|
+
s("div", xs, [
|
|
2016
|
+
se(s("input", {
|
|
2017
2017
|
title: "value",
|
|
2018
2018
|
placeholder: "Введіть назву шару...",
|
|
2019
|
-
"onUpdate:modelValue": t[5] || (t[5] = (f) =>
|
|
2019
|
+
"onUpdate:modelValue": t[5] || (t[5] = (f) => i.search = f),
|
|
2020
2020
|
type: "text",
|
|
2021
2021
|
class: "py-[7px] pl-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 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",
|
|
2022
|
-
onKeyup: t[6] || (t[6] =
|
|
2022
|
+
onKeyup: t[6] || (t[6] = mt((...f) => n.onEnter && n.onEnter(...f), ["enter"]))
|
|
2023
2023
|
}, null, 544), [
|
|
2024
|
-
[
|
|
2024
|
+
[He, i.search]
|
|
2025
2025
|
]),
|
|
2026
|
-
|
|
2026
|
+
Z(l, {
|
|
2027
2027
|
class: "absolute top-1/2 left-[8px] w-[16px] h-[16px]",
|
|
2028
2028
|
style: { transform: "translate(0, -50%)" }
|
|
2029
2029
|
}),
|
|
2030
|
-
|
|
2030
|
+
i.search ? (c(), X(d, {
|
|
2031
2031
|
key: 0,
|
|
2032
2032
|
class: "absolute top-1/2 right-[10px] w-[16px] h-[16px] cursor-pointer",
|
|
2033
2033
|
style: { transform: "translate(0, -50%)" },
|
|
2034
|
-
onClick:
|
|
2034
|
+
onClick: n.clearSearch
|
|
2035
2035
|
}, null, 8, ["onClick"])) : F("", !0)
|
|
2036
2036
|
]),
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
(c(!0), p(
|
|
2037
|
+
i.categories ? (c(), p("div", _s, [
|
|
2038
|
+
i.search ? (c(), p(z, { key: 0 }, [
|
|
2039
|
+
(c(!0), p(z, null, q(n.searchedLayers, (f, L) => (c(), X(v, {
|
|
2040
2040
|
key: L,
|
|
2041
2041
|
layer: f,
|
|
2042
|
-
map:
|
|
2043
|
-
selectedLayers:
|
|
2044
|
-
onSelect:
|
|
2045
|
-
onRemove:
|
|
2042
|
+
map: r.map,
|
|
2043
|
+
selectedLayers: i.selectedLayers,
|
|
2044
|
+
onSelect: n.addToSelected,
|
|
2045
|
+
onRemove: n.handleRemoveFromCatalog
|
|
2046
2046
|
}, null, 8, ["layer", "map", "selectedLayers", "onSelect", "onRemove"]))), 128)),
|
|
2047
|
-
|
|
2048
|
-
], 64)) : (c(), p(
|
|
2049
|
-
!
|
|
2050
|
-
|
|
2047
|
+
n.searchedLayers.length === 0 ? (c(), p("div", ks, " Нічого не знайдено ")) : F("", !0)
|
|
2048
|
+
], 64)) : (c(), p(z, { key: 1 }, [
|
|
2049
|
+
!i.categories || Object.keys(i.categories).length === 0 ? (c(), p("div", Ls, " Каталог порожній ")) : (c(!0), p(z, { key: 1 }, q(Object.keys(i.categories), (f) => (c(), p("div", { key: f }, [
|
|
2050
|
+
s("div", {
|
|
2051
2051
|
class: "hover:bg-gray-100 focus:bg-gray-100 px-2.5 cursor-pointer p-[8px] rounded-lg flex justify-between items-center",
|
|
2052
|
-
onClick: (L) =>
|
|
2052
|
+
onClick: (L) => n.selectCategory(f)
|
|
2053
2053
|
}, [
|
|
2054
|
-
|
|
2055
|
-
|
|
2054
|
+
s("div", $s, [
|
|
2055
|
+
Z(a, {
|
|
2056
2056
|
class: K({
|
|
2057
|
-
"rotate-up": f ===
|
|
2058
|
-
"rotate-down": f !==
|
|
2057
|
+
"rotate-up": f === i.selectedCategory,
|
|
2058
|
+
"rotate-down": f !== i.selectedCategory
|
|
2059
2059
|
})
|
|
2060
2060
|
}, null, 8, ["class"]),
|
|
2061
|
-
|
|
2061
|
+
s("div", {
|
|
2062
2062
|
class: "max-w-[260px] text-[14px] text-[#4b5563]",
|
|
2063
2063
|
title: f
|
|
2064
2064
|
}, S(f), 9, Is)
|
|
2065
2065
|
]),
|
|
2066
|
-
|
|
2066
|
+
s("div", Vs, S(n.formatNumber(i.categories[f].length)), 1)
|
|
2067
2067
|
], 8, Cs),
|
|
2068
|
-
|
|
2069
|
-
(c(!0), p(
|
|
2068
|
+
se(s("div", null, [
|
|
2069
|
+
(c(!0), p(z, null, q(i.categories[f], (L, j) => (c(), X(v, {
|
|
2070
2070
|
key: j,
|
|
2071
2071
|
layer: L,
|
|
2072
|
-
map:
|
|
2073
|
-
selectedLayers:
|
|
2074
|
-
onSelect:
|
|
2075
|
-
onRemove:
|
|
2072
|
+
map: r.map,
|
|
2073
|
+
selectedLayers: i.selectedLayers,
|
|
2074
|
+
onSelect: n.addToSelected,
|
|
2075
|
+
onRemove: n.handleRemoveFromCatalog
|
|
2076
2076
|
}, null, 8, ["layer", "map", "selectedLayers", "onSelect", "onRemove"]))), 128))
|
|
2077
2077
|
], 512), [
|
|
2078
|
-
[
|
|
2078
|
+
[je, f === i.selectedCategory]
|
|
2079
2079
|
])
|
|
2080
2080
|
]))), 128))
|
|
2081
2081
|
], 64))
|
|
@@ -2083,7 +2083,7 @@ function Ss(e, t, o, s, n, i) {
|
|
|
2083
2083
|
], 64))
|
|
2084
2084
|
]);
|
|
2085
2085
|
}
|
|
2086
|
-
const Fs = /* @__PURE__ */
|
|
2086
|
+
const Fs = /* @__PURE__ */ N(Zr, [["render", Ss], ["__scopeId", "data-v-e9e7021a"]]), js = {
|
|
2087
2087
|
key: 0,
|
|
2088
2088
|
class: "w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative widget"
|
|
2089
2089
|
}, Ps = {
|
|
@@ -2106,36 +2106,36 @@ const Fs = /* @__PURE__ */ H(Wr, [["render", Ss], ["__scopeId", "data-v-e9e7021a
|
|
|
2106
2106
|
}
|
|
2107
2107
|
},
|
|
2108
2108
|
setup(e) {
|
|
2109
|
-
const t = e,
|
|
2110
|
-
var
|
|
2111
|
-
return ((
|
|
2112
|
-
}),
|
|
2109
|
+
const t = e, r = E(() => {
|
|
2110
|
+
var m;
|
|
2111
|
+
return ((m = t.config) == null ? void 0 : m.filters) || [];
|
|
2112
|
+
}), o = E(() => r.value), i = E(() => {
|
|
2113
|
+
var h;
|
|
2114
|
+
const m = (h = t.config) == null ? void 0 : h.conditions;
|
|
2115
|
+
return !m || !m.layers ? !0 : t.enabledLayerIds.some((g) => m.layers.includes(g));
|
|
2116
|
+
}), n = async ({ data: m }) => {
|
|
2113
2117
|
var v;
|
|
2114
|
-
const
|
|
2115
|
-
|
|
2116
|
-
}), i = async ({ data: d }) => {
|
|
2117
|
-
var a;
|
|
2118
|
-
const v = Object.entries(d).map((m) => m.join("=")).join("|"), g = (a = t.config) == null ? void 0 : a.conditions, l = (g == null ? void 0 : g.layers) || [], u = t.enabledLayerIds.filter(
|
|
2119
|
-
(m) => l.includes(m)
|
|
2118
|
+
const h = Object.entries(m).map((a) => a.join("=")).join("|"), g = (v = t.config) == null ? void 0 : v.conditions, l = (g == null ? void 0 : g.layers) || [], d = t.enabledLayerIds.filter(
|
|
2119
|
+
(a) => l.includes(a)
|
|
2120
2120
|
);
|
|
2121
|
-
|
|
2122
|
-
const
|
|
2123
|
-
if (
|
|
2124
|
-
const L =
|
|
2125
|
-
|
|
2121
|
+
d.length && d.forEach((a) => {
|
|
2122
|
+
const u = t.map.getSource(a);
|
|
2123
|
+
if (u) {
|
|
2124
|
+
const L = u.tiles[0].split("?filter=")[0], j = h ? `${L}?filter=${h}` : L;
|
|
2125
|
+
u.setTiles([j]);
|
|
2126
2126
|
}
|
|
2127
2127
|
});
|
|
2128
2128
|
};
|
|
2129
|
-
return (
|
|
2129
|
+
return (m, h) => i.value ? (c(), p("div", js, [
|
|
2130
2130
|
e.config.title ? (c(), p("div", Ps, [
|
|
2131
|
-
|
|
2131
|
+
s("h2", Es, S(e.config.title), 1)
|
|
2132
2132
|
])) : F("", !0),
|
|
2133
|
-
|
|
2134
|
-
|
|
2133
|
+
s("div", Ms, [
|
|
2134
|
+
Z(Ne(xt), {
|
|
2135
2135
|
ref: "filter",
|
|
2136
|
-
schema:
|
|
2136
|
+
schema: o.value,
|
|
2137
2137
|
view: "vertical",
|
|
2138
|
-
onChange:
|
|
2138
|
+
onChange: n
|
|
2139
2139
|
}, null, 8, ["schema"])
|
|
2140
2140
|
])
|
|
2141
2141
|
])) : F("", !0);
|
|
@@ -2163,27 +2163,27 @@ const Fs = /* @__PURE__ */ H(Wr, [["render", Ss], ["__scopeId", "data-v-e9e7021a
|
|
|
2163
2163
|
}
|
|
2164
2164
|
},
|
|
2165
2165
|
setup(e) {
|
|
2166
|
-
const t = e,
|
|
2166
|
+
const t = e, r = T(0), o = T(null), i = E(() => {
|
|
2167
2167
|
var l;
|
|
2168
2168
|
return ((l = t.config) == null ? void 0 : l.filters) || [];
|
|
2169
|
-
}),
|
|
2169
|
+
}), n = E(() => i.value.map((l) => ({
|
|
2170
2170
|
...l,
|
|
2171
2171
|
id: l.name
|
|
2172
|
-
}))),
|
|
2173
|
-
var
|
|
2174
|
-
const l = (
|
|
2175
|
-
return !l || !l.layers ? !0 : t.enabledLayerIds.some((
|
|
2176
|
-
}),
|
|
2172
|
+
}))), m = E(() => {
|
|
2173
|
+
var d;
|
|
2174
|
+
const l = (d = t.config) == null ? void 0 : d.conditions;
|
|
2175
|
+
return !l || !l.layers ? !0 : t.enabledLayerIds.some((v) => l.layers.includes(v));
|
|
2176
|
+
}), h = E(() => {
|
|
2177
2177
|
var l;
|
|
2178
2178
|
if (t.enabledLayerIds && t.enabledLayerIds.length) {
|
|
2179
|
-
const
|
|
2180
|
-
return (
|
|
2179
|
+
const v = (((l = t.config) == null ? void 0 : l.layers) || []).find((a) => a.id === t.enabledLayerIds[0]);
|
|
2180
|
+
return (v == null ? void 0 : v.title) || (v == null ? void 0 : v.name) || (v == null ? void 0 : v.label) || t.enabledLayerIds[0];
|
|
2181
2181
|
}
|
|
2182
2182
|
return "";
|
|
2183
2183
|
}), g = async ({ url: l }) => {
|
|
2184
|
-
var
|
|
2185
|
-
const
|
|
2186
|
-
if (!
|
|
2184
|
+
var u, f;
|
|
2185
|
+
const d = (u = t.config) == null ? void 0 : u.conditions;
|
|
2186
|
+
if (!d) {
|
|
2187
2187
|
const L = (f = t.config) == null ? void 0 : f.layer_id;
|
|
2188
2188
|
if (!L) return;
|
|
2189
2189
|
const j = t.map.getSource(L);
|
|
@@ -2193,8 +2193,8 @@ const Fs = /* @__PURE__ */ H(Wr, [["render", Ss], ["__scopeId", "data-v-e9e7021a
|
|
|
2193
2193
|
}
|
|
2194
2194
|
return;
|
|
2195
2195
|
}
|
|
2196
|
-
const
|
|
2197
|
-
|
|
2196
|
+
const v = (d == null ? void 0 : d.layers) || [], a = t.enabledLayerIds.filter((L) => v.includes(L));
|
|
2197
|
+
a.length && a.forEach((L) => {
|
|
2198
2198
|
const j = t.map.getSource(L);
|
|
2199
2199
|
if (j) {
|
|
2200
2200
|
const k = j.tiles[0].split("?filter=")[0], _ = l ? `${k}?filter=${l}` : k;
|
|
@@ -2205,72 +2205,72 @@ const Fs = /* @__PURE__ */ H(Wr, [["render", Ss], ["__scopeId", "data-v-e9e7021a
|
|
|
2205
2205
|
return fe(
|
|
2206
2206
|
() => t.enabledLayerIds,
|
|
2207
2207
|
(l) => {
|
|
2208
|
-
(!l || !l.length) &&
|
|
2208
|
+
(!l || !l.length) && o.value && (o.value.activeFilters = {}, r.value = 0);
|
|
2209
2209
|
}
|
|
2210
2210
|
), fe(
|
|
2211
2211
|
() => {
|
|
2212
2212
|
var l;
|
|
2213
|
-
return (l =
|
|
2213
|
+
return (l = o.value) == null ? void 0 : l.activeFilters;
|
|
2214
2214
|
},
|
|
2215
2215
|
(l) => {
|
|
2216
|
-
|
|
2216
|
+
r.value = Object.keys(l || {}).length;
|
|
2217
2217
|
},
|
|
2218
2218
|
{ deep: !0 }
|
|
2219
|
-
), (l,
|
|
2220
|
-
const
|
|
2221
|
-
return
|
|
2219
|
+
), (l, d) => {
|
|
2220
|
+
const v = J("VsPopover"), a = J("VsFilterList");
|
|
2221
|
+
return m.value && n.value.length ? (c(), X(a, {
|
|
2222
2222
|
key: 0,
|
|
2223
2223
|
ref_key: "filter",
|
|
2224
|
-
ref:
|
|
2224
|
+
ref: o,
|
|
2225
2225
|
isDialog: e.config.dialog ?? !0,
|
|
2226
|
-
scheme:
|
|
2226
|
+
scheme: n.value,
|
|
2227
2227
|
urlSeparator: "true",
|
|
2228
2228
|
view: "plain",
|
|
2229
2229
|
name: "filter",
|
|
2230
2230
|
onFilterChange: g
|
|
2231
2231
|
}, {
|
|
2232
|
-
button:
|
|
2233
|
-
|
|
2232
|
+
button: G(({ visible: u }) => [
|
|
2233
|
+
Z(v, {
|
|
2234
2234
|
teleport: "body",
|
|
2235
2235
|
trigger: "hover",
|
|
2236
2236
|
placement: "bottom"
|
|
2237
2237
|
}, {
|
|
2238
|
-
reference:
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2238
|
+
reference: G(() => [
|
|
2239
|
+
s("button", zs, [
|
|
2240
|
+
s("div", As, [
|
|
2241
|
+
d[0] || (d[0] = s("svg", {
|
|
2242
2242
|
width: "18",
|
|
2243
2243
|
height: "18",
|
|
2244
2244
|
viewBox: "0 0 24 24",
|
|
2245
2245
|
fill: "none",
|
|
2246
2246
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2247
2247
|
}, [
|
|
2248
|
-
|
|
2248
|
+
s("path", {
|
|
2249
2249
|
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",
|
|
2250
2250
|
stroke: "currentColor",
|
|
2251
2251
|
"stroke-linecap": "round",
|
|
2252
2252
|
"stroke-linejoin": "round"
|
|
2253
2253
|
}),
|
|
2254
|
-
|
|
2254
|
+
s("path", {
|
|
2255
2255
|
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",
|
|
2256
2256
|
stroke: "currentColor",
|
|
2257
2257
|
"stroke-linecap": "round",
|
|
2258
2258
|
"stroke-linejoin": "round"
|
|
2259
2259
|
}),
|
|
2260
|
-
|
|
2260
|
+
s("path", {
|
|
2261
2261
|
d: "M19 18V18.01",
|
|
2262
2262
|
stroke: "currentColor",
|
|
2263
2263
|
"stroke-linecap": "round",
|
|
2264
2264
|
"stroke-linejoin": "round"
|
|
2265
2265
|
})
|
|
2266
2266
|
], -1)),
|
|
2267
|
-
|
|
2268
|
-
|
|
2267
|
+
s("span", Bs, S(h.value), 1),
|
|
2268
|
+
r.value ? (c(), p("span", Os, S(r.value), 1)) : F("", !0)
|
|
2269
2269
|
])
|
|
2270
2270
|
])
|
|
2271
2271
|
]),
|
|
2272
|
-
default:
|
|
2273
|
-
|
|
2272
|
+
default: G(() => [
|
|
2273
|
+
d[1] || (d[1] = ie(" Відкрити бокову панель ", -1))
|
|
2274
2274
|
]),
|
|
2275
2275
|
_: 1
|
|
2276
2276
|
})
|
|
@@ -2304,7 +2304,7 @@ const Fs = /* @__PURE__ */ H(Wr, [["render", Ss], ["__scopeId", "data-v-e9e7021a
|
|
|
2304
2304
|
limit: this.limit
|
|
2305
2305
|
};
|
|
2306
2306
|
try {
|
|
2307
|
-
const t = await fetch(this.config.api + "?" + new URLSearchParams(e)).then((
|
|
2307
|
+
const t = await fetch(this.config.api + "?" + new URLSearchParams(e)).then((r) => r.json());
|
|
2308
2308
|
this.items = t.rows, this.total = t.total, this.$emit("content-resize");
|
|
2309
2309
|
} catch (t) {
|
|
2310
2310
|
console.error("Error fetching data:", t);
|
|
@@ -2333,7 +2333,7 @@ const Fs = /* @__PURE__ */ H(Wr, [["render", Ss], ["__scopeId", "data-v-e9e7021a
|
|
|
2333
2333
|
}, Hs = {
|
|
2334
2334
|
key: 0,
|
|
2335
2335
|
class: "flex flex-col flex-1 overflow-hidden"
|
|
2336
|
-
}, Ns = { 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" },
|
|
2336
|
+
}, Ns = { 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" }, Zs = ["onClick"], Ws = { class: "text-base font-medium" }, qs = { class: "mt-2 flex flex-wrap gap-2" }, Gs = {
|
|
2337
2337
|
key: 1,
|
|
2338
2338
|
class: "px-2 py-1 text-sm bg-gray-100 rounded-full"
|
|
2339
2339
|
}, Js = {
|
|
@@ -2343,20 +2343,20 @@ const Fs = /* @__PURE__ */ H(Wr, [["render", Ss], ["__scopeId", "data-v-e9e7021a
|
|
|
2343
2343
|
key: 1,
|
|
2344
2344
|
class: "text-center text-slate-400"
|
|
2345
2345
|
};
|
|
2346
|
-
function Ks(e, t, o,
|
|
2347
|
-
var
|
|
2348
|
-
const
|
|
2346
|
+
function Ks(e, t, r, o, i, n) {
|
|
2347
|
+
var h;
|
|
2348
|
+
const m = J("VsPagination");
|
|
2349
2349
|
return c(), p("div", Rs, [
|
|
2350
|
-
t[0] || (t[0] =
|
|
2351
|
-
((
|
|
2352
|
-
|
|
2353
|
-
(c(!0), p(
|
|
2350
|
+
t[0] || (t[0] = s("h2", { class: "text-xl font-semibold mb-4" }, "Список", -1)),
|
|
2351
|
+
((h = i.items) == null ? void 0 : h.length) > 0 ? (c(), p("div", Hs, [
|
|
2352
|
+
s("div", Ns, [
|
|
2353
|
+
(c(!0), p(z, null, q(i.items, (g) => (c(), p("div", {
|
|
2354
2354
|
key: g.id,
|
|
2355
2355
|
class: "py-4 border-b last:border-b-0 hover:bg-gray-50",
|
|
2356
2356
|
onClick: (l) => e.$emit("cardValuesId", g.id)
|
|
2357
2357
|
}, [
|
|
2358
|
-
|
|
2359
|
-
|
|
2358
|
+
s("h3", Ws, S(g.name), 1),
|
|
2359
|
+
s("div", qs, [
|
|
2360
2360
|
g.status_data ? (c(), p("span", {
|
|
2361
2361
|
key: 0,
|
|
2362
2362
|
class: K(["px-2 py-1 text-sm rounded-full", {
|
|
@@ -2366,36 +2366,36 @@ function Ks(e, t, o, s, n, i) {
|
|
|
2366
2366
|
}, S(g.status_data.text), 3)) : F("", !0),
|
|
2367
2367
|
g.class_mbd_id_data ? (c(), p("span", Gs, S(g.class_mbd_id_data.text), 1)) : F("", !0)
|
|
2368
2368
|
])
|
|
2369
|
-
], 8,
|
|
2369
|
+
], 8, Zs))), 128))
|
|
2370
2370
|
]),
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
total:
|
|
2371
|
+
i.total > i.limit ? (c(), p("div", Js, [
|
|
2372
|
+
s("div", Qs, [
|
|
2373
|
+
Z(m, {
|
|
2374
|
+
total: i.total,
|
|
2375
2375
|
maxPages: 4,
|
|
2376
|
-
defaultPage:
|
|
2377
|
-
pageSize:
|
|
2376
|
+
defaultPage: i.currentPage,
|
|
2377
|
+
pageSize: i.limit,
|
|
2378
2378
|
goTo: !1,
|
|
2379
2379
|
size: "medium",
|
|
2380
|
-
onPageChange:
|
|
2380
|
+
onPageChange: n.handlePageChange,
|
|
2381
2381
|
backgroundColor: "#e5e7eb",
|
|
2382
2382
|
borderedCellSelected: !0,
|
|
2383
2383
|
pageSizes: [16, 32, 48, 64],
|
|
2384
|
-
onPageSizeChange:
|
|
2384
|
+
onPageSizeChange: n.changeLimit
|
|
2385
2385
|
}, null, 8, ["total", "defaultPage", "pageSize", "onPageChange", "onPageSizeChange"])
|
|
2386
2386
|
])
|
|
2387
2387
|
])) : F("", !0)
|
|
2388
2388
|
])) : (c(), p("div", Ys, "Немає даних"))
|
|
2389
2389
|
], 512);
|
|
2390
2390
|
}
|
|
2391
|
-
const Xs = /* @__PURE__ */
|
|
2391
|
+
const Xs = /* @__PURE__ */ N(Us, [["render", Ks]]), en = { class: "map-skeleton-loader" }, tn = {
|
|
2392
2392
|
__name: "vs-skeleton-loader",
|
|
2393
2393
|
setup(e) {
|
|
2394
|
-
return (t,
|
|
2395
|
-
|
|
2394
|
+
return (t, r) => (c(), p("div", en, [...r[0] || (r[0] = [
|
|
2395
|
+
s("div", { class: "dot-pulse" }, null, -1)
|
|
2396
2396
|
])]));
|
|
2397
2397
|
}
|
|
2398
|
-
}, on = /* @__PURE__ */
|
|
2398
|
+
}, on = /* @__PURE__ */ N(tn, [["__scopeId", "data-v-954c1e03"]]), rn = {}, sn = {
|
|
2399
2399
|
width: "24",
|
|
2400
2400
|
height: "24",
|
|
2401
2401
|
viewBox: "0 0 24 24",
|
|
@@ -2404,23 +2404,23 @@ const Xs = /* @__PURE__ */ H(Us, [["render", Ks]]), en = { class: "map-skeleton-
|
|
|
2404
2404
|
};
|
|
2405
2405
|
function nn(e, t) {
|
|
2406
2406
|
return c(), p("svg", sn, [...t[0] || (t[0] = [
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2407
|
+
s("title", null, "Globe Icon", -1),
|
|
2408
|
+
s("desc", null, " A circular representation of a globe with horizontal and vertical lines ", -1),
|
|
2409
|
+
s("path", {
|
|
2410
2410
|
d: "M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",
|
|
2411
2411
|
stroke: "#1E40AF",
|
|
2412
2412
|
"stroke-width": "1",
|
|
2413
2413
|
"stroke-linecap": "round",
|
|
2414
2414
|
"stroke-linejoin": "round"
|
|
2415
2415
|
}, null, -1),
|
|
2416
|
-
|
|
2416
|
+
s("path", {
|
|
2417
2417
|
d: "M2 12H22",
|
|
2418
2418
|
stroke: "#1E40AF",
|
|
2419
2419
|
"stroke-width": "1",
|
|
2420
2420
|
"stroke-linecap": "round",
|
|
2421
2421
|
"stroke-linejoin": "round"
|
|
2422
2422
|
}, null, -1),
|
|
2423
|
-
|
|
2423
|
+
s("path", {
|
|
2424
2424
|
d: "M12 2C14.5013 4.73835 15.9228 8.29203 16 12C15.9228 15.708 14.5013 19.2616 12 22C9.49872 19.2616 8.07725 15.708 8 12C8.07725 8.29203 9.49872 4.73835 12 2Z",
|
|
2425
2425
|
stroke: "#1E40AF",
|
|
2426
2426
|
"stroke-width": "1",
|
|
@@ -2429,7 +2429,7 @@ function nn(e, t) {
|
|
|
2429
2429
|
}, null, -1)
|
|
2430
2430
|
])]);
|
|
2431
2431
|
}
|
|
2432
|
-
const an = /* @__PURE__ */
|
|
2432
|
+
const an = /* @__PURE__ */ N(rn, [["render", nn]]), ln = {
|
|
2433
2433
|
components: {
|
|
2434
2434
|
homeIcon: an
|
|
2435
2435
|
},
|
|
@@ -2445,29 +2445,29 @@ const an = /* @__PURE__ */ H(rn, [["render", nn]]), ln = {
|
|
|
2445
2445
|
},
|
|
2446
2446
|
computed: {}
|
|
2447
2447
|
};
|
|
2448
|
-
function cn(e, t, o,
|
|
2449
|
-
const
|
|
2448
|
+
function cn(e, t, r, o, i, n) {
|
|
2449
|
+
const m = J("homeIcon"), h = J("VsPopover");
|
|
2450
2450
|
return c(), p("div", null, [
|
|
2451
|
-
|
|
2451
|
+
Z(h, {
|
|
2452
2452
|
trigger: "hover",
|
|
2453
2453
|
placement: "left",
|
|
2454
2454
|
teleport: "body",
|
|
2455
2455
|
class: "flex"
|
|
2456
2456
|
}, {
|
|
2457
|
-
reference:
|
|
2458
|
-
|
|
2459
|
-
onClick:
|
|
2457
|
+
reference: G(() => [
|
|
2458
|
+
Z(m, {
|
|
2459
|
+
onClick: n.homeZoom,
|
|
2460
2460
|
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]"
|
|
2461
2461
|
}, null, 8, ["onClick"])
|
|
2462
2462
|
]),
|
|
2463
|
-
default:
|
|
2464
|
-
t[0] || (t[0] =
|
|
2463
|
+
default: G(() => [
|
|
2464
|
+
t[0] || (t[0] = s("div", null, "Повернутися до початкових налаштувань", -1))
|
|
2465
2465
|
]),
|
|
2466
2466
|
_: 1
|
|
2467
2467
|
})
|
|
2468
2468
|
]);
|
|
2469
2469
|
}
|
|
2470
|
-
const dn = /* @__PURE__ */
|
|
2470
|
+
const dn = /* @__PURE__ */ N(ln, [["render", cn]]), un = {}, pn = {
|
|
2471
2471
|
width: "24",
|
|
2472
2472
|
height: "24",
|
|
2473
2473
|
viewBox: "0 0 24 24",
|
|
@@ -2476,23 +2476,23 @@ const dn = /* @__PURE__ */ H(ln, [["render", cn]]), un = {}, pn = {
|
|
|
2476
2476
|
};
|
|
2477
2477
|
function hn(e, t) {
|
|
2478
2478
|
return c(), p("svg", pn, [...t[0] || (t[0] = [
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2479
|
+
s("title", null, "Document with Two Sections Icon", -1),
|
|
2480
|
+
s("desc", null, "A document icon with a split design indicating two sections", -1),
|
|
2481
|
+
s("path", {
|
|
2482
2482
|
d: "M6 9V2H18V9",
|
|
2483
2483
|
stroke: "#1E40AF",
|
|
2484
2484
|
"stroke-width": "1",
|
|
2485
2485
|
"stroke-linecap": "round",
|
|
2486
2486
|
"stroke-linejoin": "round"
|
|
2487
2487
|
}, null, -1),
|
|
2488
|
-
|
|
2488
|
+
s("path", {
|
|
2489
2489
|
d: "M6 18H4C3.46957 18 2.96086 17.7893 2.58579 17.4142C2.21071 17.0391 2 16.5304 2 16V11C2 10.4696 2.21071 9.96086 2.58579 9.58579C2.96086 9.21071 3.46957 9 4 9H20C20.5304 9 21.0391 9.21071 21.4142 9.58579C21.7893 9.96086 22 10.4696 22 11V16C22 16.5304 21.7893 17.0391 21.4142 17.4142C21.0391 17.7893 20.5304 18 20 18H18",
|
|
2490
2490
|
stroke: "#1E40AF",
|
|
2491
2491
|
"stroke-width": "1",
|
|
2492
2492
|
"stroke-linecap": "round",
|
|
2493
2493
|
"stroke-linejoin": "round"
|
|
2494
2494
|
}, null, -1),
|
|
2495
|
-
|
|
2495
|
+
s("path", {
|
|
2496
2496
|
d: "M18 14H6V22H18V14Z",
|
|
2497
2497
|
stroke: "#1E40AF",
|
|
2498
2498
|
"stroke-width": "1",
|
|
@@ -2501,10 +2501,10 @@ function hn(e, t) {
|
|
|
2501
2501
|
}, null, -1)
|
|
2502
2502
|
])]);
|
|
2503
2503
|
}
|
|
2504
|
-
const fn = /* @__PURE__ */
|
|
2504
|
+
const fn = /* @__PURE__ */ N(un, [["render", hn]]), gn = {
|
|
2505
2505
|
components: {
|
|
2506
2506
|
printIcon: fn,
|
|
2507
|
-
VsPopover:
|
|
2507
|
+
VsPopover: Ve
|
|
2508
2508
|
},
|
|
2509
2509
|
props: {
|
|
2510
2510
|
map: { type: Object },
|
|
@@ -2550,15 +2550,15 @@ const fn = /* @__PURE__ */ H(un, [["render", hn]]), gn = {
|
|
|
2550
2550
|
},
|
|
2551
2551
|
methods: {
|
|
2552
2552
|
addScript(e) {
|
|
2553
|
-
return new Promise((t,
|
|
2554
|
-
const
|
|
2555
|
-
|
|
2553
|
+
return new Promise((t, r) => {
|
|
2554
|
+
const o = document.createElement("script");
|
|
2555
|
+
o.src = e, o.async = !0, o.onload = t, o.onerror = r, document.head.appendChild(o), this.scriptElements.push(o);
|
|
2556
2556
|
});
|
|
2557
2557
|
},
|
|
2558
2558
|
addStyle(e) {
|
|
2559
|
-
return new Promise((t,
|
|
2560
|
-
const
|
|
2561
|
-
|
|
2559
|
+
return new Promise((t, r) => {
|
|
2560
|
+
const o = document.createElement("link");
|
|
2561
|
+
o.href = e, o.rel = "stylesheet", o.type = "text/css", o.onload = t, o.onerror = r, document.head.appendChild(o), this.styleElements.push(o);
|
|
2562
2562
|
});
|
|
2563
2563
|
},
|
|
2564
2564
|
async loadResources() {
|
|
@@ -2588,13 +2588,13 @@ const fn = /* @__PURE__ */ H(un, [["render", hn]]), gn = {
|
|
|
2588
2588
|
return;
|
|
2589
2589
|
}
|
|
2590
2590
|
window.mapboxgl.accessToken = "pk.eyJ1Ijoia3Jpemhhbm92c2t5IiwiYSI6ImNsemkxNWtkODA5dDcycnNhMWZzYWM0MTAifQ.6fEpgfd_2mA4UYuflDewpQ";
|
|
2591
|
-
const { MapboxExportControl: e, Size: t, PageOrientation:
|
|
2591
|
+
const { MapboxExportControl: e, Size: t, PageOrientation: r, Format: o, DPI: i } = window.MapboxExportControl;
|
|
2592
2592
|
this.map.addControl(
|
|
2593
2593
|
new e({
|
|
2594
2594
|
PageSize: t.A3,
|
|
2595
|
-
PageOrientation:
|
|
2596
|
-
Format:
|
|
2597
|
-
DPI:
|
|
2595
|
+
PageOrientation: r.Portrait,
|
|
2596
|
+
Format: o.PNG,
|
|
2597
|
+
DPI: i[96],
|
|
2598
2598
|
Crosshair: !0,
|
|
2599
2599
|
PrintableArea: !0,
|
|
2600
2600
|
Local: "uk"
|
|
@@ -2603,9 +2603,9 @@ const fn = /* @__PURE__ */ H(un, [["render", hn]]), gn = {
|
|
|
2603
2603
|
},
|
|
2604
2604
|
simulateClick() {
|
|
2605
2605
|
new Promise((t) => {
|
|
2606
|
-
const
|
|
2607
|
-
const
|
|
2608
|
-
|
|
2606
|
+
const r = setTimeout(() => {
|
|
2607
|
+
const o = document.querySelector(".mapboxgl-export-control");
|
|
2608
|
+
o && (clearInterval(r), t(o));
|
|
2609
2609
|
}, 100);
|
|
2610
2610
|
}).then((t) => {
|
|
2611
2611
|
t.click();
|
|
@@ -2618,26 +2618,26 @@ const fn = /* @__PURE__ */ H(un, [["render", hn]]), gn = {
|
|
|
2618
2618
|
}
|
|
2619
2619
|
}
|
|
2620
2620
|
};
|
|
2621
|
-
function vn(e, t, o,
|
|
2622
|
-
const
|
|
2623
|
-
return c(), X(
|
|
2621
|
+
function vn(e, t, r, o, i, n) {
|
|
2622
|
+
const m = J("printIcon"), h = J("VsPopover");
|
|
2623
|
+
return c(), X(h, {
|
|
2624
2624
|
trigger: "hover",
|
|
2625
2625
|
placement: "left",
|
|
2626
2626
|
teleport: "body"
|
|
2627
2627
|
}, {
|
|
2628
|
-
reference:
|
|
2629
|
-
|
|
2630
|
-
onClick:
|
|
2631
|
-
class: K([
|
|
2628
|
+
reference: G(() => [
|
|
2629
|
+
Z(m, {
|
|
2630
|
+
onClick: n.togglePrint,
|
|
2631
|
+
class: K([n.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]"])
|
|
2632
2632
|
}, null, 8, ["onClick", "class"])
|
|
2633
2633
|
]),
|
|
2634
|
-
default:
|
|
2635
|
-
t[0] || (t[0] =
|
|
2634
|
+
default: G(() => [
|
|
2635
|
+
t[0] || (t[0] = s("div", null, "Надрукувати", -1))
|
|
2636
2636
|
]),
|
|
2637
2637
|
_: 1
|
|
2638
2638
|
});
|
|
2639
2639
|
}
|
|
2640
|
-
const mn = /* @__PURE__ */
|
|
2640
|
+
const mn = /* @__PURE__ */ N(gn, [["render", vn]]), yn = {
|
|
2641
2641
|
props: {
|
|
2642
2642
|
map: {
|
|
2643
2643
|
type: Object,
|
|
@@ -2650,7 +2650,7 @@ const mn = /* @__PURE__ */ H(gn, [["render", vn]]), yn = {
|
|
|
2650
2650
|
};
|
|
2651
2651
|
},
|
|
2652
2652
|
components: {
|
|
2653
|
-
VsPopover:
|
|
2653
|
+
VsPopover: Ve
|
|
2654
2654
|
},
|
|
2655
2655
|
mounted() {
|
|
2656
2656
|
this.map.on("move", this.updateViewStatus), this.updateViewStatus();
|
|
@@ -2675,27 +2675,27 @@ const mn = /* @__PURE__ */ H(gn, [["render", vn]]), yn = {
|
|
|
2675
2675
|
}
|
|
2676
2676
|
}
|
|
2677
2677
|
};
|
|
2678
|
-
function bn(e, t, o,
|
|
2679
|
-
const
|
|
2680
|
-
return c(), X(
|
|
2678
|
+
function bn(e, t, r, o, i, n) {
|
|
2679
|
+
const m = J("VsPopover");
|
|
2680
|
+
return c(), X(m, {
|
|
2681
2681
|
trigger: "hover",
|
|
2682
2682
|
placement: "left",
|
|
2683
2683
|
teleport: "body",
|
|
2684
2684
|
class: "flex"
|
|
2685
2685
|
}, {
|
|
2686
|
-
reference:
|
|
2687
|
-
|
|
2686
|
+
reference: G(() => [
|
|
2687
|
+
s("div", {
|
|
2688
2688
|
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]",
|
|
2689
|
-
onClick: t[0] || (t[0] = (...
|
|
2690
|
-
}, S(
|
|
2689
|
+
onClick: t[0] || (t[0] = (...h) => n.toggleView && n.toggleView(...h))
|
|
2690
|
+
}, S(i.is3D ? "2D" : "3D"), 1)
|
|
2691
2691
|
]),
|
|
2692
|
-
default:
|
|
2693
|
-
t[1] || (t[1] =
|
|
2692
|
+
default: G(() => [
|
|
2693
|
+
t[1] || (t[1] = s("div", null, "Перемикач виду", -1))
|
|
2694
2694
|
]),
|
|
2695
2695
|
_: 1
|
|
2696
2696
|
});
|
|
2697
2697
|
}
|
|
2698
|
-
const wn = /* @__PURE__ */
|
|
2698
|
+
const wn = /* @__PURE__ */ N(yn, [["render", bn]]), xn = {
|
|
2699
2699
|
props: {
|
|
2700
2700
|
bgColor: {
|
|
2701
2701
|
type: String,
|
|
@@ -2709,59 +2709,59 @@ const wn = /* @__PURE__ */ H(yn, [["render", bn]]), xn = {
|
|
|
2709
2709
|
fill: "none",
|
|
2710
2710
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2711
2711
|
}, kn = ["stroke"], Ln = ["stroke"], Cn = ["stroke"], $n = ["stroke"], In = ["stroke"], Vn = ["stroke"];
|
|
2712
|
-
function Sn(e, t, o,
|
|
2712
|
+
function Sn(e, t, r, o, i, n) {
|
|
2713
2713
|
return c(), p("svg", _n, [
|
|
2714
|
-
t[0] || (t[0] =
|
|
2715
|
-
t[1] || (t[1] =
|
|
2716
|
-
|
|
2714
|
+
t[0] || (t[0] = s("title", null, "Target Icon", -1)),
|
|
2715
|
+
t[1] || (t[1] = s("desc", null, "A target icon with a circular pattern inside a rounded square", -1)),
|
|
2716
|
+
s("path", {
|
|
2717
2717
|
d: "M2 12H5",
|
|
2718
|
-
stroke:
|
|
2718
|
+
stroke: r.bgColor,
|
|
2719
2719
|
"stroke-width": "1",
|
|
2720
2720
|
"stroke-linecap": "round",
|
|
2721
2721
|
"stroke-linejoin": "round"
|
|
2722
2722
|
}, null, 8, kn),
|
|
2723
|
-
|
|
2723
|
+
s("path", {
|
|
2724
2724
|
d: "M19 12H22",
|
|
2725
|
-
stroke:
|
|
2725
|
+
stroke: r.bgColor,
|
|
2726
2726
|
"stroke-width": "1",
|
|
2727
2727
|
"stroke-linecap": "round",
|
|
2728
2728
|
"stroke-linejoin": "round"
|
|
2729
2729
|
}, null, 8, Ln),
|
|
2730
|
-
|
|
2730
|
+
s("path", {
|
|
2731
2731
|
d: "M12 2V5",
|
|
2732
|
-
stroke:
|
|
2732
|
+
stroke: r.bgColor,
|
|
2733
2733
|
"stroke-width": "1",
|
|
2734
2734
|
"stroke-linecap": "round",
|
|
2735
2735
|
"stroke-linejoin": "round"
|
|
2736
2736
|
}, null, 8, Cn),
|
|
2737
|
-
|
|
2737
|
+
s("path", {
|
|
2738
2738
|
d: "M12 19V22",
|
|
2739
|
-
stroke:
|
|
2739
|
+
stroke: r.bgColor,
|
|
2740
2740
|
"stroke-width": "1",
|
|
2741
2741
|
"stroke-linecap": "round",
|
|
2742
2742
|
"stroke-linejoin": "round"
|
|
2743
2743
|
}, null, 8, $n),
|
|
2744
|
-
|
|
2744
|
+
s("path", {
|
|
2745
2745
|
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",
|
|
2746
|
-
stroke:
|
|
2746
|
+
stroke: r.bgColor,
|
|
2747
2747
|
"stroke-width": "1",
|
|
2748
2748
|
"stroke-linecap": "round",
|
|
2749
2749
|
"stroke-linejoin": "round"
|
|
2750
2750
|
}, null, 8, In),
|
|
2751
|
-
|
|
2751
|
+
s("path", {
|
|
2752
2752
|
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",
|
|
2753
|
-
stroke:
|
|
2753
|
+
stroke: r.bgColor,
|
|
2754
2754
|
"stroke-width": "1",
|
|
2755
2755
|
"stroke-linecap": "round",
|
|
2756
2756
|
"stroke-linejoin": "round"
|
|
2757
2757
|
}, null, 8, Vn)
|
|
2758
2758
|
]);
|
|
2759
2759
|
}
|
|
2760
|
-
const Fn = /* @__PURE__ */
|
|
2760
|
+
const Fn = /* @__PURE__ */ N(xn, [["render", Sn]]), jn = {
|
|
2761
2761
|
components: {
|
|
2762
2762
|
geoIcon: Fn,
|
|
2763
|
-
VsPopover:
|
|
2764
|
-
closeIcon:
|
|
2763
|
+
VsPopover: Ve,
|
|
2764
|
+
closeIcon: ot
|
|
2765
2765
|
},
|
|
2766
2766
|
data() {
|
|
2767
2767
|
return {
|
|
@@ -2810,20 +2810,20 @@ const Fn = /* @__PURE__ */ H(xn, [["render", Sn]]), jn = {
|
|
|
2810
2810
|
latitude: e.coords.latitude,
|
|
2811
2811
|
longitude: e.coords.longitude
|
|
2812
2812
|
};
|
|
2813
|
-
const
|
|
2813
|
+
const r = await (await fetch(
|
|
2814
2814
|
`https://nominatim.openstreetmap.org/reverse?format=json&lat=${this.location.latitude}&lon=${this.location.longitude}`
|
|
2815
2815
|
)).json();
|
|
2816
|
-
this.data =
|
|
2817
|
-
const
|
|
2818
|
-
[parseFloat(
|
|
2819
|
-
[parseFloat(
|
|
2816
|
+
this.data = r.address;
|
|
2817
|
+
const o = [this.location.longitude, this.location.latitude], i = [
|
|
2818
|
+
[parseFloat(r.boundingbox[2]), parseFloat(r.boundingbox[0])],
|
|
2819
|
+
[parseFloat(r.boundingbox[3]), parseFloat(r.boundingbox[1])]
|
|
2820
2820
|
];
|
|
2821
|
-
this.map.fitBounds(
|
|
2821
|
+
this.map.fitBounds(i, {
|
|
2822
2822
|
padding: 200,
|
|
2823
2823
|
maxZoom: 16
|
|
2824
2824
|
}), this.marker || (this.marker = new Marker({
|
|
2825
2825
|
color: "var(--primary)"
|
|
2826
|
-
})), this.marker.setLngLat(
|
|
2826
|
+
})), this.marker.setLngLat(o).addTo(this.map), this.activeControl = "geolocation";
|
|
2827
2827
|
},
|
|
2828
2828
|
closeGeolocation() {
|
|
2829
2829
|
this.showLocation = !1, this.marker && (this.marker.remove(), this.marker = null), this.location = null, this.data = null;
|
|
@@ -2840,66 +2840,66 @@ const Fn = /* @__PURE__ */ H(xn, [["render", Sn]]), jn = {
|
|
|
2840
2840
|
key: 0,
|
|
2841
2841
|
class: "max-w-[412px] absolute w-full top-[20px] right-[70px] bg-white border rounded-[15px] p-4 z-10"
|
|
2842
2842
|
}, En = { class: "flex justify-between items-center border-b pb-[16px]" }, Mn = { class: "d-flex" }, Tn = { class: "pt-[16px]" };
|
|
2843
|
-
function zn(e, t, o,
|
|
2844
|
-
var l,
|
|
2845
|
-
const
|
|
2843
|
+
function zn(e, t, r, o, i, n) {
|
|
2844
|
+
var l, d, v, a, u, f;
|
|
2845
|
+
const m = J("closeIcon"), h = J("geoIcon"), g = J("VsPopover");
|
|
2846
2846
|
return c(), p("div", null, [
|
|
2847
|
-
(c(), X(
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
t[0] || (t[0] =
|
|
2851
|
-
|
|
2852
|
-
|
|
2847
|
+
(c(), X(Qe, { to: "#maplibre-demo-map" }, [
|
|
2848
|
+
i.location ? (c(), p("div", Pn, [
|
|
2849
|
+
s("div", En, [
|
|
2850
|
+
t[0] || (t[0] = s("div", { class: "text-lg font-semibold" }, "Ваша геолокація", -1)),
|
|
2851
|
+
s("div", Mn, [
|
|
2852
|
+
Z(m, { onClick: n.closeGeolocation }, null, 8, ["onClick"])
|
|
2853
2853
|
])
|
|
2854
2854
|
]),
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
t[1] || (t[1] =
|
|
2858
|
-
|
|
2855
|
+
s("div", Tn, [
|
|
2856
|
+
s("div", null, [
|
|
2857
|
+
t[1] || (t[1] = s("strong", null, "Широта:", -1)),
|
|
2858
|
+
ie(" " + S((l = i.location) == null ? void 0 : l.latitude), 1)
|
|
2859
2859
|
]),
|
|
2860
|
-
|
|
2861
|
-
t[2] || (t[2] =
|
|
2862
|
-
|
|
2860
|
+
s("div", null, [
|
|
2861
|
+
t[2] || (t[2] = s("strong", null, "Довгота:", -1)),
|
|
2862
|
+
ie(" " + S((d = i.location) == null ? void 0 : d.longitude), 1)
|
|
2863
2863
|
]),
|
|
2864
|
-
|
|
2865
|
-
t[3] || (t[3] =
|
|
2866
|
-
|
|
2864
|
+
s("div", null, [
|
|
2865
|
+
t[3] || (t[3] = s("strong", null, "КраЇна:", -1)),
|
|
2866
|
+
ie(" " + S((v = i.data) == null ? void 0 : v.country), 1)
|
|
2867
2867
|
]),
|
|
2868
|
-
|
|
2869
|
-
t[4] || (t[4] =
|
|
2870
|
-
|
|
2868
|
+
s("div", null, [
|
|
2869
|
+
t[4] || (t[4] = s("strong", null, "Код країни:", -1)),
|
|
2870
|
+
ie(" " + S((a = i.data) == null ? void 0 : a.country_code), 1)
|
|
2871
2871
|
]),
|
|
2872
|
-
|
|
2873
|
-
t[5] || (t[5] =
|
|
2874
|
-
|
|
2872
|
+
s("div", null, [
|
|
2873
|
+
t[5] || (t[5] = s("strong", null, "Місто:", -1)),
|
|
2874
|
+
ie(" " + S((u = i.data) == null ? void 0 : u.city), 1)
|
|
2875
2875
|
]),
|
|
2876
|
-
|
|
2877
|
-
t[6] || (t[6] =
|
|
2878
|
-
|
|
2876
|
+
s("div", null, [
|
|
2877
|
+
t[6] || (t[6] = s("strong", null, "Поштовий індекс:", -1)),
|
|
2878
|
+
ie(" " + S((f = i.data) == null ? void 0 : f.postcode), 1)
|
|
2879
2879
|
])
|
|
2880
2880
|
])
|
|
2881
2881
|
])) : F("", !0)
|
|
2882
2882
|
])),
|
|
2883
|
-
|
|
2883
|
+
Z(g, {
|
|
2884
2884
|
trigger: "hover",
|
|
2885
2885
|
placement: "left",
|
|
2886
2886
|
teleport: "body",
|
|
2887
2887
|
class: "flex"
|
|
2888
2888
|
}, {
|
|
2889
|
-
reference:
|
|
2890
|
-
|
|
2891
|
-
onClick:
|
|
2892
|
-
class: K([
|
|
2889
|
+
reference: G(() => [
|
|
2890
|
+
Z(h, {
|
|
2891
|
+
onClick: n.togleGeolocation,
|
|
2892
|
+
class: K([n.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]"])
|
|
2893
2893
|
}, null, 8, ["onClick", "class"])
|
|
2894
2894
|
]),
|
|
2895
|
-
default:
|
|
2896
|
-
t[7] || (t[7] =
|
|
2895
|
+
default: G(() => [
|
|
2896
|
+
t[7] || (t[7] = s("div", null, "Дізнатися геолокацію", -1))
|
|
2897
2897
|
]),
|
|
2898
2898
|
_: 1
|
|
2899
2899
|
})
|
|
2900
2900
|
]);
|
|
2901
2901
|
}
|
|
2902
|
-
const An = /* @__PURE__ */
|
|
2902
|
+
const An = /* @__PURE__ */ N(jn, [["render", zn]]), ze = {
|
|
2903
2903
|
__name: "vs-map-widget-column",
|
|
2904
2904
|
props: {
|
|
2905
2905
|
position: String,
|
|
@@ -2923,94 +2923,94 @@ const An = /* @__PURE__ */ H(jn, [["render", zn]]), Ae = {
|
|
|
2923
2923
|
"closeCard",
|
|
2924
2924
|
"content-resize"
|
|
2925
2925
|
],
|
|
2926
|
-
setup(e, { expose: t, emit:
|
|
2927
|
-
const
|
|
2928
|
-
|
|
2929
|
-
var
|
|
2926
|
+
setup(e, { expose: t, emit: r }) {
|
|
2927
|
+
const o = r, i = e, n = T(
|
|
2928
|
+
i.widgets.map((l) => {
|
|
2929
|
+
var d;
|
|
2930
2930
|
return {
|
|
2931
2931
|
...l,
|
|
2932
|
-
config: { ...l.config, visible: ((
|
|
2932
|
+
config: { ...l.config, visible: ((d = l.config) == null ? void 0 : d.visible) !== !1 }
|
|
2933
2933
|
};
|
|
2934
2934
|
})
|
|
2935
2935
|
);
|
|
2936
2936
|
fe(
|
|
2937
|
-
() =>
|
|
2937
|
+
() => i.widgets.map((l) => l.id || l.type).join(","),
|
|
2938
2938
|
() => {
|
|
2939
|
-
|
|
2940
|
-
var
|
|
2939
|
+
n.value = i.widgets.map((l) => {
|
|
2940
|
+
var d;
|
|
2941
2941
|
return {
|
|
2942
2942
|
...l,
|
|
2943
|
-
config: { ...l.config, visible: ((
|
|
2943
|
+
config: { ...l.config, visible: ((d = l.config) == null ? void 0 : d.visible) !== !1 }
|
|
2944
2944
|
};
|
|
2945
2945
|
});
|
|
2946
2946
|
}
|
|
2947
2947
|
);
|
|
2948
|
-
function
|
|
2949
|
-
const
|
|
2950
|
-
|
|
2951
|
-
|
|
2948
|
+
function m(l) {
|
|
2949
|
+
const d = n.value.find((v) => v.id === l);
|
|
2950
|
+
d && d.config && (d.config.visible = !d.config.visible, setTimeout(() => {
|
|
2951
|
+
o("content-resize");
|
|
2952
2952
|
}, 30));
|
|
2953
2953
|
}
|
|
2954
|
-
const
|
|
2955
|
-
t({ columnRef:
|
|
2954
|
+
const h = T(null);
|
|
2955
|
+
t({ columnRef: h });
|
|
2956
2956
|
let g = null;
|
|
2957
|
-
return
|
|
2957
|
+
return ke(() => {
|
|
2958
2958
|
g = new MutationObserver(() => {
|
|
2959
2959
|
var l;
|
|
2960
|
-
clearTimeout((l =
|
|
2961
|
-
|
|
2960
|
+
clearTimeout((l = h.value) == null ? void 0 : l._resizeTimeout), h.value._resizeTimeout = setTimeout(() => {
|
|
2961
|
+
o("content-resize");
|
|
2962
2962
|
}, 30);
|
|
2963
|
-
}),
|
|
2963
|
+
}), h.value && g.observe(h.value, {
|
|
2964
2964
|
childList: !0,
|
|
2965
2965
|
subtree: !0,
|
|
2966
2966
|
characterData: !0
|
|
2967
2967
|
});
|
|
2968
|
-
}),
|
|
2968
|
+
}), yt(() => {
|
|
2969
2969
|
g && g.disconnect();
|
|
2970
|
-
}), (l,
|
|
2970
|
+
}), (l, d) => e.mapLoaded ? (c(), p("div", {
|
|
2971
2971
|
key: 0,
|
|
2972
2972
|
class: "widget-column",
|
|
2973
2973
|
ref_key: "columnRef",
|
|
2974
|
-
ref:
|
|
2974
|
+
ref: h,
|
|
2975
2975
|
style: he({
|
|
2976
2976
|
width: e.getColumnWidth(e.position),
|
|
2977
2977
|
paddingRight: e.rightColumnOffset
|
|
2978
2978
|
})
|
|
2979
2979
|
}, [
|
|
2980
|
-
(c(!0), p(
|
|
2981
|
-
var
|
|
2982
|
-
return c(), p(
|
|
2983
|
-
key:
|
|
2980
|
+
(c(!0), p(z, null, q(n.value, (v) => {
|
|
2981
|
+
var a;
|
|
2982
|
+
return c(), p(z, {
|
|
2983
|
+
key: v.id || v.type
|
|
2984
2984
|
}, [
|
|
2985
|
-
|
|
2985
|
+
v.type !== "card" ? se((c(), X(Be(e.getWidgetComponent(v.type)), {
|
|
2986
2986
|
key: 0,
|
|
2987
2987
|
map: e.map,
|
|
2988
|
-
config:
|
|
2988
|
+
config: v.config,
|
|
2989
2989
|
hasFilters: e.hasFilters,
|
|
2990
2990
|
currentLayer: e.currentFilterLayer,
|
|
2991
2991
|
enabledLayerIds: e.enabledLayerIds,
|
|
2992
2992
|
history: e.history,
|
|
2993
|
-
onSetFilterLayer:
|
|
2994
|
-
"onUpdate:enabledLayerIds":
|
|
2995
|
-
onCardValuesId:
|
|
2996
|
-
onShowWidget:
|
|
2997
|
-
onCatalogLayers:
|
|
2993
|
+
onSetFilterLayer: d[0] || (d[0] = (u) => l.$emit("set-filter-layer", u)),
|
|
2994
|
+
"onUpdate:enabledLayerIds": d[1] || (d[1] = (u) => l.$emit("update:enabledLayerIds", u)),
|
|
2995
|
+
onCardValuesId: d[2] || (d[2] = (u) => l.$emit("cardValuesId", u)),
|
|
2996
|
+
onShowWidget: m,
|
|
2997
|
+
onCatalogLayers: d[3] || (d[3] = (u) => l.$emit("catalog-layers", u)),
|
|
2998
2998
|
class: "widget"
|
|
2999
2999
|
}, null, 40, ["map", "config", "hasFilters", "currentLayer", "enabledLayerIds", "history"])), [
|
|
3000
|
-
[
|
|
3000
|
+
[je, ((a = v.config) == null ? void 0 : a.visible) !== !1]
|
|
3001
3001
|
]) : F("", !0),
|
|
3002
|
-
e.cardValues &&
|
|
3002
|
+
e.cardValues && v.type === "card" ? (c(), X(tt, {
|
|
3003
3003
|
key: 1,
|
|
3004
|
-
config:
|
|
3004
|
+
config: v.config,
|
|
3005
3005
|
cardValues: e.cardValues,
|
|
3006
3006
|
class: "widget",
|
|
3007
|
-
onClose:
|
|
3007
|
+
onClose: d[4] || (d[4] = (u) => l.$emit("closeCard"))
|
|
3008
3008
|
}, null, 8, ["config", "cardValues"])) : F("", !0)
|
|
3009
3009
|
], 64);
|
|
3010
3010
|
}), 128))
|
|
3011
3011
|
], 4)) : F("", !0);
|
|
3012
3012
|
}
|
|
3013
|
-
}, Bn = { class: "map-widgets-flex" }, On = { class: "widgets-left" }, Dn = { class: "widgets-top" }, Un = { class: "widgets-bottom" }, Rn = { class: "widgets-right" }, Hn = { class: "widgets-top" }, Nn = { class: "widgets-bottom" },
|
|
3013
|
+
}, Bn = { class: "map-widgets-flex" }, On = { class: "widgets-left" }, Dn = { class: "widgets-top" }, Un = { class: "widgets-bottom" }, Rn = { class: "widgets-right" }, Hn = { class: "widgets-top" }, Nn = { class: "widgets-bottom" }, Zn = { class: "absolute top-[180px] right-2 z-10 flex flex-col gap-[5px]" }, Wn = /* @__PURE__ */ We({
|
|
3014
3014
|
__name: "vs-map",
|
|
3015
3015
|
props: {
|
|
3016
3016
|
table: {},
|
|
@@ -3018,29 +3018,29 @@ const An = /* @__PURE__ */ H(jn, [["render", zn]]), Ae = {
|
|
|
3018
3018
|
height: {}
|
|
3019
3019
|
},
|
|
3020
3020
|
setup(e) {
|
|
3021
|
-
const t = e, o =
|
|
3021
|
+
const t = bt(), r = e, o = T(null), i = T(!1);
|
|
3022
3022
|
let n = null;
|
|
3023
|
-
const
|
|
3024
|
-
let
|
|
3025
|
-
function
|
|
3023
|
+
const m = T(null), h = T(null), g = T([]), l = T([]), d = T(null), v = T(null), a = T(null), u = T([]);
|
|
3024
|
+
let f = null;
|
|
3025
|
+
function L(b) {
|
|
3026
3026
|
return !a.value || !a.value.widgets ? [] : b === "center" ? [
|
|
3027
3027
|
...a.value.widgets.filter(
|
|
3028
3028
|
(x) => (x.position || {}) === "center"
|
|
3029
3029
|
) || [],
|
|
3030
|
-
...
|
|
3030
|
+
...l.value.filter((x) => x.position === "center")
|
|
3031
3031
|
] : a.value.widgets.filter(
|
|
3032
3032
|
(y) => (y.position || {}) === b
|
|
3033
3033
|
) || [];
|
|
3034
3034
|
}
|
|
3035
|
-
const
|
|
3036
|
-
const C =
|
|
3035
|
+
const j = (b, y, x) => y[b] || b, B = (b, y, x, $, w) => {
|
|
3036
|
+
const C = j(b, $), P = y ? j(y, $) : "";
|
|
3037
3037
|
let V = "";
|
|
3038
|
-
return x != null && x.length && (V = x.map((
|
|
3039
|
-
const
|
|
3038
|
+
return x != null && x.length && (V = x.map((H) => {
|
|
3039
|
+
const O = j(H.value, $);
|
|
3040
3040
|
return `
|
|
3041
3041
|
<tr class="flex justify-between items-center">
|
|
3042
|
-
<td class="font-medium mr-1.5 flex items-center">${
|
|
3043
|
-
<td class="text-right">${
|
|
3042
|
+
<td class="font-medium mr-1.5 flex items-center">${H.label}</td>
|
|
3043
|
+
<td class="text-right">${O}</td>
|
|
3044
3044
|
</tr>
|
|
3045
3045
|
`;
|
|
3046
3046
|
}).join("")), `
|
|
@@ -3060,7 +3060,7 @@ const An = /* @__PURE__ */ H(jn, [["render", zn]]), Ae = {
|
|
|
3060
3060
|
` : ""}
|
|
3061
3061
|
</div>
|
|
3062
3062
|
`;
|
|
3063
|
-
},
|
|
3063
|
+
}, k = (b) => ({
|
|
3064
3064
|
legend: Vt,
|
|
3065
3065
|
basemaps: Pt,
|
|
3066
3066
|
layers: co,
|
|
@@ -3070,278 +3070,265 @@ const An = /* @__PURE__ */ H(jn, [["render", zn]]), Ae = {
|
|
|
3070
3070
|
filters: Ts,
|
|
3071
3071
|
"inline-filters": Ds,
|
|
3072
3072
|
list: Xs,
|
|
3073
|
-
card:
|
|
3074
|
-
})[b],
|
|
3075
|
-
|
|
3073
|
+
card: tt
|
|
3074
|
+
})[b], _ = E(() => !!a.value && Array.isArray(a.value.widgets) && a.value.widgets.some((b) => b.type === "filters")), A = (b) => {
|
|
3075
|
+
m.value = b;
|
|
3076
3076
|
};
|
|
3077
|
-
function
|
|
3078
|
-
const b = new URLSearchParams(window.location.search), y = parseFloat(b.get("x")), x = parseFloat(b.get("y")),
|
|
3077
|
+
function ae() {
|
|
3078
|
+
const b = new URLSearchParams(window.location.search), y = parseFloat(b.get("x")), x = parseFloat(b.get("y")), $ = parseFloat(b.get("z")), w = parseFloat(b.get("bearing")), C = parseFloat(b.get("pitch"));
|
|
3079
3079
|
return {
|
|
3080
3080
|
center: isFinite(y) && isFinite(x) ? [y, x] : null,
|
|
3081
|
-
zoom: isFinite(
|
|
3081
|
+
zoom: isFinite($) ? $ : null,
|
|
3082
3082
|
bearing: isFinite(w) ? w : null,
|
|
3083
3083
|
pitch: isFinite(C) ? C : null
|
|
3084
3084
|
};
|
|
3085
3085
|
}
|
|
3086
|
-
function
|
|
3086
|
+
function ge({ center: b, zoom: y, bearing: x, pitch: $ }) {
|
|
3087
3087
|
const w = new URLSearchParams(window.location.search);
|
|
3088
|
-
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",
|
|
3088
|
+
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", $.toFixed(2));
|
|
3089
3089
|
const C = `${window.location.pathname}?${w.toString()}`;
|
|
3090
3090
|
window.history.replaceState({}, "", C);
|
|
3091
3091
|
}
|
|
3092
3092
|
const pe = () => {
|
|
3093
|
-
var
|
|
3093
|
+
var P, V, H;
|
|
3094
3094
|
if (!a.value || !a.value.map) return;
|
|
3095
3095
|
const b = {
|
|
3096
3096
|
version: 8,
|
|
3097
3097
|
glyphs: "https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",
|
|
3098
3098
|
sources: {},
|
|
3099
3099
|
layers: []
|
|
3100
|
-
};
|
|
3101
|
-
let
|
|
3100
|
+
}, y = (t == null ? void 0 : t.appContext.config.globalProperties.$settings) || {};
|
|
3101
|
+
let x = a.value.map.center || y.center || [50, 30], $ = a.value.map.zoom || y.zoom || 10, w = a.value.map.bearing || 0, C = a.value.map.pitch || 0;
|
|
3102
3102
|
if (a.value.history) {
|
|
3103
|
-
const
|
|
3104
|
-
|
|
3103
|
+
const O = ae();
|
|
3104
|
+
O.center && (x = O.center), O.zoom !== null && ($ = O.zoom), O.bearing !== null && (w = O.bearing), O.pitch !== null && (C = O.pitch);
|
|
3105
3105
|
}
|
|
3106
3106
|
o.value = new maplibregl.Map({
|
|
3107
3107
|
container: "maplibre-demo-map",
|
|
3108
3108
|
style: b,
|
|
3109
|
-
center:
|
|
3110
|
-
zoom:
|
|
3111
|
-
bearing:
|
|
3112
|
-
pitch:
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
if (
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
[q, R],
|
|
3123
|
-
[$, te]
|
|
3124
|
-
],
|
|
3125
|
-
{
|
|
3126
|
-
padding: 50,
|
|
3127
|
-
duration: 0
|
|
3128
|
-
}
|
|
3129
|
-
);
|
|
3130
|
-
}
|
|
3131
|
-
if (await (async () => {
|
|
3132
|
-
var R, $, te, re, ee;
|
|
3133
|
-
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(
|
|
3134
|
-
(z) => {
|
|
3109
|
+
center: x,
|
|
3110
|
+
zoom: $,
|
|
3111
|
+
bearing: w,
|
|
3112
|
+
pitch: C,
|
|
3113
|
+
maxZoom: 19,
|
|
3114
|
+
minZoom: 5
|
|
3115
|
+
// maxBounds: [18.0856083513, 40.3614785833, 58.0807890155, 56.3350745713],
|
|
3116
|
+
}), console.log({ center: x, zoom: $ }), (H = (V = (P = a == null ? void 0 : a.value) == null ? void 0 : P.interactions) == null ? void 0 : V.navigation) != null && H.enabled && !f && (f = new maplibregl.NavigationControl(), o.value.addControl(f, "top-right")), o.value.on("load", async () => {
|
|
3117
|
+
var me, Y, Ce, U;
|
|
3118
|
+
if (i.value = !0, await (async () => {
|
|
3119
|
+
var R, I, oe, te, ee;
|
|
3120
|
+
const W = ((ee = (te = (oe = (I = (R = a.value) == null ? void 0 : R.widgets) == null ? void 0 : I.find((M) => M.type === "layers")) == null ? void 0 : oe.config) == null ? void 0 : te.layers) == null ? void 0 : ee.filter(
|
|
3121
|
+
(M) => {
|
|
3135
3122
|
var ce;
|
|
3136
|
-
return ((ce =
|
|
3123
|
+
return ((ce = M.style) == null ? void 0 : ce.attrType) === "icon-by-attribute";
|
|
3137
3124
|
}
|
|
3138
3125
|
)) || [];
|
|
3139
|
-
for (const
|
|
3140
|
-
const { rules: ce, default_icon:
|
|
3126
|
+
for (const M of W) {
|
|
3127
|
+
const { rules: ce, default_icon: ye, icon_base_url: be } = M.style, we = [...ce.map((re) => re.icon), ye].filter(
|
|
3141
3128
|
Boolean
|
|
3142
3129
|
);
|
|
3143
|
-
for (const
|
|
3130
|
+
for (const re of we)
|
|
3144
3131
|
try {
|
|
3145
|
-
const de = `${
|
|
3146
|
-
o.value.hasImage(
|
|
3132
|
+
const de = `${be}${re}`, xe = await o.value.loadImage(de);
|
|
3133
|
+
o.value.hasImage(re) || o.value.addImage(re, xe.data);
|
|
3147
3134
|
} catch (de) {
|
|
3148
|
-
console.error(`Failed to load icon: ${
|
|
3135
|
+
console.error(`Failed to load icon: ${re}`, de);
|
|
3149
3136
|
}
|
|
3150
3137
|
}
|
|
3151
|
-
})(), (
|
|
3152
|
-
var ce,
|
|
3153
|
-
const R = o.value.queryRenderedFeatures(
|
|
3138
|
+
})(), (Ce = (Y = (me = a.value) == null ? void 0 : me.interactions) == null ? void 0 : Y.hover) != null && Ce.enabled && (o.value.on("mousemove", (W) => {
|
|
3139
|
+
var ce, ye, be, we, re, de, xe, Se, Q, Te;
|
|
3140
|
+
const R = o.value.queryRenderedFeatures(W.point);
|
|
3154
3141
|
if (o.value && o.value.getCanvas && (o.value.getCanvas().style.cursor = R.length ? "pointer" : ""), !R.length) {
|
|
3155
|
-
if (
|
|
3156
|
-
const
|
|
3157
|
-
|
|
3142
|
+
if (h.value) {
|
|
3143
|
+
const D = (ce = o.value.getSource(
|
|
3144
|
+
h.value.source
|
|
3158
3145
|
)) == null ? void 0 : ce.type;
|
|
3159
|
-
|
|
3146
|
+
h.value.source, h.value.id, D === "vector" && h.value.source, ve(
|
|
3160
3147
|
o.value,
|
|
3161
|
-
|
|
3162
|
-
|
|
3148
|
+
h.value.source,
|
|
3149
|
+
h.value.id,
|
|
3163
3150
|
{ hovered: !1 }
|
|
3164
|
-
),
|
|
3151
|
+
), h.value = null;
|
|
3165
3152
|
}
|
|
3166
3153
|
n && (n.remove(), n = null);
|
|
3167
3154
|
return;
|
|
3168
3155
|
}
|
|
3169
|
-
const
|
|
3170
|
-
if (!
|
|
3171
|
-
if (
|
|
3172
|
-
const
|
|
3173
|
-
|
|
3174
|
-
)) == null ? void 0 :
|
|
3175
|
-
|
|
3156
|
+
const I = R[0];
|
|
3157
|
+
if (!h.value || h.value.id !== I.id || h.value.source !== I.layer.source) {
|
|
3158
|
+
if (h.value) {
|
|
3159
|
+
const De = (ye = o.value.getSource(
|
|
3160
|
+
h.value.source
|
|
3161
|
+
)) == null ? void 0 : ye.type;
|
|
3162
|
+
h.value.source, h.value.id, De === "vector" && h.value.source, ve(
|
|
3176
3163
|
o.value,
|
|
3177
|
-
|
|
3178
|
-
|
|
3164
|
+
h.value.source,
|
|
3165
|
+
h.value.id,
|
|
3179
3166
|
{ hovered: !1 }
|
|
3180
3167
|
);
|
|
3181
3168
|
}
|
|
3182
|
-
const
|
|
3183
|
-
|
|
3169
|
+
const D = (be = o.value.getSource(I.layer.source)) == null ? void 0 : be.type;
|
|
3170
|
+
I.layer.source, I.id, D === "vector" && I.layer.source, ve(o.value, I.layer.source, I.id, {
|
|
3184
3171
|
hovered: !0
|
|
3185
|
-
}),
|
|
3172
|
+
}), h.value = { source: I.layer.source, id: I.id };
|
|
3186
3173
|
}
|
|
3187
|
-
const
|
|
3188
|
-
(
|
|
3189
|
-
),
|
|
3190
|
-
(
|
|
3174
|
+
const oe = (re = (we = a.value) == null ? void 0 : we.widgets) == null ? void 0 : re.find(
|
|
3175
|
+
(D) => D.type === "layers"
|
|
3176
|
+
), te = (xe = (de = a.value) == null ? void 0 : de.widgets) == null ? void 0 : xe.find(
|
|
3177
|
+
(D) => D.type === "attribute"
|
|
3191
3178
|
);
|
|
3192
3179
|
let ee = null;
|
|
3193
|
-
if (
|
|
3194
|
-
(
|
|
3195
|
-
)), (Q = (
|
|
3196
|
-
(
|
|
3180
|
+
if (oe && (ee = oe.config.layers.find(
|
|
3181
|
+
(D) => D.id === I.layer.source
|
|
3182
|
+
)), (Q = (Se = a.value) == null ? void 0 : Se.widgets) == null ? void 0 : Q.find(
|
|
3183
|
+
(D) => D.type === "catalog"
|
|
3197
3184
|
)) {
|
|
3198
3185
|
if (!R.length) {
|
|
3199
3186
|
n && (n.style.display = "none");
|
|
3200
3187
|
return;
|
|
3201
3188
|
}
|
|
3202
|
-
const
|
|
3203
|
-
n =
|
|
3189
|
+
const D = R[0];
|
|
3190
|
+
n = ut(D, W, n);
|
|
3204
3191
|
return;
|
|
3205
3192
|
}
|
|
3206
|
-
if (!ee &&
|
|
3207
|
-
const
|
|
3208
|
-
let
|
|
3209
|
-
|
|
3193
|
+
if (!ee && te && te.config.layer.id === I.layer.source && (ee = te.config.layer), (Te = ee == null ? void 0 : ee.style) != null && Te.popup) {
|
|
3194
|
+
const D = ee.style.popup;
|
|
3195
|
+
let De = D.title, Ue = "";
|
|
3196
|
+
D.mode === "markdown" ? Ue = Array.isArray(D.content) ? D.content.join(`
|
|
3210
3197
|
|
|
3211
|
-
`) : "" :
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
),
|
|
3198
|
+
`) : "" : Ue = Array.isArray(D.content) ? D.content.join("") : "", n || (n = document.createElement("div"), o.value.getContainer().appendChild(n)), n.innerHTML = B(
|
|
3199
|
+
De,
|
|
3200
|
+
Ue,
|
|
3201
|
+
D.fields,
|
|
3202
|
+
I.properties,
|
|
3203
|
+
D.mode
|
|
3204
|
+
), Je(n, W);
|
|
3218
3205
|
}
|
|
3219
3206
|
}), o.value.on("mouseleave", () => {
|
|
3220
|
-
var
|
|
3221
|
-
if (n && (n.remove(), n = null),
|
|
3222
|
-
const R = (
|
|
3223
|
-
|
|
3224
|
-
)) == null ? void 0 :
|
|
3225
|
-
|
|
3207
|
+
var W;
|
|
3208
|
+
if (n && (n.remove(), n = null), h.value) {
|
|
3209
|
+
const R = (W = o.value.getSource(
|
|
3210
|
+
h.value.source
|
|
3211
|
+
)) == null ? void 0 : W.type;
|
|
3212
|
+
h.value.source, h.value.id, R === "vector" && h.value.source, ve(
|
|
3226
3213
|
o.value,
|
|
3227
|
-
|
|
3228
|
-
|
|
3214
|
+
h.value.source,
|
|
3215
|
+
h.value.id,
|
|
3229
3216
|
{ hovered: !1 }
|
|
3230
|
-
),
|
|
3217
|
+
), h.value = null;
|
|
3231
3218
|
}
|
|
3232
3219
|
o.value && o.value.getCanvas && (o.value.getCanvas().style.cursor = "");
|
|
3233
|
-
})), o.value.on("click", async (
|
|
3234
|
-
var
|
|
3235
|
-
if (
|
|
3236
|
-
const R = o.value.queryRenderedFeatures(
|
|
3220
|
+
})), o.value.on("click", async (W) => {
|
|
3221
|
+
var ye, be, we, re, de, xe, Se;
|
|
3222
|
+
if (le(), ["length", "area", "print"].includes(v.value)) return;
|
|
3223
|
+
const R = o.value.queryRenderedFeatures(W.point);
|
|
3237
3224
|
if (!R.length) return;
|
|
3238
|
-
const
|
|
3225
|
+
const I = R[0], oe = (be = (ye = a.value) == null ? void 0 : ye.widgets) == null ? void 0 : be.find(
|
|
3239
3226
|
(Q) => Q.type === "layers"
|
|
3240
|
-
),
|
|
3227
|
+
), te = (re = (we = a.value) == null ? void 0 : we.widgets) == null ? void 0 : re.find(
|
|
3241
3228
|
(Q) => Q.type === "attribute"
|
|
3242
|
-
), ee = (
|
|
3229
|
+
), ee = (xe = (de = a.value) == null ? void 0 : de.widgets) == null ? void 0 : xe.find(
|
|
3243
3230
|
(Q) => Q.type === "catalog"
|
|
3244
3231
|
);
|
|
3245
|
-
let
|
|
3246
|
-
if (ee ?
|
|
3247
|
-
|
|
3248
|
-
var
|
|
3249
|
-
const
|
|
3250
|
-
Q.source, Q.id,
|
|
3232
|
+
let M;
|
|
3233
|
+
if (ee ? M = I.layer.source : M = (te == null ? void 0 : te.config.layer) || (oe == null ? void 0 : oe.config.layers.find((Q) => Q.id === I.layer.source)), M != null && M.noCard) return;
|
|
3234
|
+
g.value.forEach((Q) => {
|
|
3235
|
+
var D;
|
|
3236
|
+
const Te = (D = o.value.getSource(Q.source)) == null ? void 0 : D.type;
|
|
3237
|
+
Q.source, Q.id, Te === "vector" && Q.source, ve(o.value, Q.source, Q.id, {
|
|
3251
3238
|
selected: !1
|
|
3252
3239
|
});
|
|
3253
|
-
}),
|
|
3254
|
-
const ce = (
|
|
3255
|
-
|
|
3240
|
+
}), g.value = [];
|
|
3241
|
+
const ce = (Se = o.value.getSource(I.layer.source)) == null ? void 0 : Se.type;
|
|
3242
|
+
I.layer.source, I.id, ce === "vector" && I.layer.source, ve(o.value, I.layer.source, I.id, {
|
|
3256
3243
|
selected: !0
|
|
3257
|
-
}),
|
|
3258
|
-
layer: (
|
|
3259
|
-
map: (
|
|
3260
|
-
id:
|
|
3261
|
-
title: (
|
|
3244
|
+
}), g.value.push({ source: I.layer.source, id: I.id }), d.value = {
|
|
3245
|
+
layer: (M == null ? void 0 : M.service_key) || M || "",
|
|
3246
|
+
map: (M == null ? void 0 : M.map_key) || "",
|
|
3247
|
+
id: I.properties.id,
|
|
3248
|
+
title: (M == null ? void 0 : M.title) || ""
|
|
3262
3249
|
};
|
|
3263
|
-
}), o.value.on("dblclick", (
|
|
3264
|
-
var
|
|
3265
|
-
if (
|
|
3266
|
-
|
|
3267
|
-
const R = (
|
|
3268
|
-
(
|
|
3250
|
+
}), o.value.on("dblclick", (W) => {
|
|
3251
|
+
var oe, te, ee;
|
|
3252
|
+
if (le(), ["length", "area", "print"].includes(v.value)) return;
|
|
3253
|
+
at([W.lngLat.lng, W.lngLat.lat]);
|
|
3254
|
+
const R = (te = (oe = a.value) == null ? void 0 : oe.widgets) == null ? void 0 : te.find(
|
|
3255
|
+
(M) => M.type === "layers"
|
|
3269
3256
|
);
|
|
3270
|
-
let
|
|
3271
|
-
(ee = R == null ? void 0 : R.config) != null && ee.layers && (
|
|
3272
|
-
(
|
|
3273
|
-
(
|
|
3257
|
+
let I = null;
|
|
3258
|
+
(ee = R == null ? void 0 : R.config) != null && ee.layers && (I = R.config.layers.find(
|
|
3259
|
+
(M) => M.visible !== !1 && ["tms", "wms", "raster"].includes(
|
|
3260
|
+
(M.service_type || M.service || "").toLowerCase()
|
|
3274
3261
|
)
|
|
3275
|
-
)), !(
|
|
3276
|
-
layer: (
|
|
3277
|
-
map: (
|
|
3262
|
+
)), !(I != null && I.noCard) && (d.value = {
|
|
3263
|
+
layer: (I == null ? void 0 : I.map_key) || "",
|
|
3264
|
+
map: (I == null ? void 0 : I.service_key) || "",
|
|
3278
3265
|
id: "",
|
|
3279
|
-
title: (
|
|
3266
|
+
title: (I == null ? void 0 : I.title) || ""
|
|
3280
3267
|
});
|
|
3281
|
-
}), o.value.resize(), (
|
|
3282
|
-
const
|
|
3268
|
+
}), o.value.resize(), (U = a == null ? void 0 : a.value) != null && U.history) {
|
|
3269
|
+
const W = () => {
|
|
3283
3270
|
const R = o.value.getCenter();
|
|
3284
|
-
|
|
3271
|
+
ge({
|
|
3285
3272
|
center: [R.lng, R.lat],
|
|
3286
3273
|
zoom: o.value.getZoom(),
|
|
3287
3274
|
bearing: o.value.getBearing(),
|
|
3288
3275
|
pitch: o.value.getPitch()
|
|
3289
3276
|
});
|
|
3290
3277
|
};
|
|
3291
|
-
o.value.on("moveend",
|
|
3278
|
+
o.value.on("moveend", W), o.value.on("rotate", W), o.value.on("pitch", W);
|
|
3292
3279
|
}
|
|
3293
3280
|
});
|
|
3294
|
-
},
|
|
3295
|
-
|
|
3296
|
-
o.value &&
|
|
3281
|
+
}, le = () => {
|
|
3282
|
+
qe(), g.value.forEach((b) => {
|
|
3283
|
+
o.value && ve(o.value, b.source, b.id, {
|
|
3297
3284
|
selected: !1
|
|
3298
3285
|
});
|
|
3299
|
-
}),
|
|
3286
|
+
}), g.value = [], d.value = null;
|
|
3300
3287
|
};
|
|
3301
|
-
|
|
3302
|
-
await
|
|
3288
|
+
ke(async () => {
|
|
3289
|
+
await rt(), await Pe(), pe();
|
|
3303
3290
|
const b = document.getElementById("maplibre-demo-map");
|
|
3304
3291
|
b && b.addEventListener("mouseleave", () => {
|
|
3305
3292
|
n && (n.remove(), n = null);
|
|
3306
3293
|
});
|
|
3307
3294
|
});
|
|
3308
|
-
const
|
|
3309
|
-
height: (
|
|
3295
|
+
const Oe = E(() => ({
|
|
3296
|
+
height: (r == null ? void 0 : r.height) || "100vh",
|
|
3310
3297
|
width: "100%"
|
|
3311
|
-
})),
|
|
3312
|
-
const b = await fetch(`/api/map/${
|
|
3298
|
+
})), rt = async () => {
|
|
3299
|
+
const b = await fetch(`/api/map/${r.name || r.table || "main"}`).then((y) => y.json());
|
|
3313
3300
|
a.value = b;
|
|
3314
|
-
},
|
|
3301
|
+
}, Ee = (b) => {
|
|
3315
3302
|
if (!a.value || !a.value.widgets) return "400px";
|
|
3316
3303
|
const y = a.value.widgets.find((x) => x.position === b);
|
|
3317
3304
|
return (y == null ? void 0 : y.width) || "400px";
|
|
3318
|
-
},
|
|
3305
|
+
}, ne = T([]);
|
|
3319
3306
|
fe(
|
|
3320
3307
|
() => a.value,
|
|
3321
3308
|
(b) => {
|
|
3322
|
-
b && b.map && (
|
|
3309
|
+
b && b.map && (ne.value = st(), pe());
|
|
3323
3310
|
}
|
|
3324
3311
|
);
|
|
3325
|
-
const
|
|
3312
|
+
const st = () => {
|
|
3326
3313
|
var y;
|
|
3327
3314
|
if (!a.value || !a.value.widgets) return [];
|
|
3328
3315
|
const b = a.value.widgets.find((x) => x.type === "layers");
|
|
3329
3316
|
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) : [];
|
|
3330
3317
|
};
|
|
3331
|
-
function
|
|
3318
|
+
function ve(b, y, x, $) {
|
|
3332
3319
|
b.getStyle().layers.filter((C) => C.source === y).forEach((C) => {
|
|
3333
3320
|
var V;
|
|
3334
3321
|
const P = { source: y, id: x };
|
|
3335
|
-
((V = b.getSource(y)) == null ? void 0 : V.type) === "vector" && C["source-layer"] && (P.sourceLayer = C["source-layer"]), b.setFeatureState(P,
|
|
3322
|
+
((V = b.getSource(y)) == null ? void 0 : V.type) === "vector" && C["source-layer"] && (P.sourceLayer = C["source-layer"]), b.setFeatureState(P, $);
|
|
3336
3323
|
});
|
|
3337
3324
|
}
|
|
3338
|
-
const
|
|
3339
|
-
function
|
|
3325
|
+
const nt = E(() => !!a.value && !!a.value.interactions && !!a.value.interactions.navigation && a.value.interactions.navigation.enabled), it = E(() => !!a.value && Array.isArray(a.value.tools) && a.value.tools.length > 0), Me = E(() => nt.value || it.value ? "40px" : "20px");
|
|
3326
|
+
function qe() {
|
|
3340
3327
|
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"));
|
|
3341
3328
|
}
|
|
3342
|
-
function
|
|
3343
|
-
var
|
|
3344
|
-
|
|
3329
|
+
function at(b) {
|
|
3330
|
+
var $, w, C, P;
|
|
3331
|
+
qe();
|
|
3345
3332
|
const y = 80, x = {
|
|
3346
3333
|
width: y,
|
|
3347
3334
|
height: y,
|
|
@@ -3352,19 +3339,19 @@ const An = /* @__PURE__ */ H(jn, [["render", zn]]), Ae = {
|
|
|
3352
3339
|
},
|
|
3353
3340
|
render() {
|
|
3354
3341
|
var U;
|
|
3355
|
-
const
|
|
3356
|
-
Y.clearRect(0, 0, this.width, this.height), Y.beginPath(), Y.arc(this.width / 2, this.height / 2,
|
|
3357
|
-
const
|
|
3342
|
+
const H = performance.now() % 2e3 / 2e3, O = y / 2 * 0.3, me = y / 2 * 0.7 * H + O, { context: Y } = this;
|
|
3343
|
+
Y.clearRect(0, 0, this.width, this.height), Y.beginPath(), Y.arc(this.width / 2, this.height / 2, me, 0, Math.PI * 2), Y.fillStyle = `rgba(255, 100, 100, ${1 - H})`, Y.fill();
|
|
3344
|
+
const Ce = y / 2 * 0.7 * (H - 0.5 < 0 ? H - 0.5 + 1 : H - 0.5) + O;
|
|
3358
3345
|
return Y.beginPath(), Y.arc(
|
|
3359
3346
|
this.width / 2,
|
|
3360
3347
|
this.height / 2,
|
|
3361
|
-
|
|
3348
|
+
Ce,
|
|
3362
3349
|
0,
|
|
3363
3350
|
Math.PI * 2
|
|
3364
|
-
), Y.fillStyle = `rgba(255, 100, 100, ${1 - (
|
|
3351
|
+
), Y.fillStyle = `rgba(255, 100, 100, ${1 - (H - 0.5 < 0 ? H - 0.5 + 1 : H - 0.5)})`, Y.fill(), this.data = Y.getImageData(0, 0, this.width, this.height).data, (U = o.value) == null || U.triggerRepaint(), !0;
|
|
3365
3352
|
}
|
|
3366
3353
|
};
|
|
3367
|
-
(
|
|
3354
|
+
($ = o.value) != null && $.hasImage("pulsing-dot") || (w = o.value) == null || w.addImage("pulsing-dot", x, { pixelRatio: 2 }), (C = o.value) == null || C.addSource("dot-point", {
|
|
3368
3355
|
type: "geojson",
|
|
3369
3356
|
data: {
|
|
3370
3357
|
type: "Feature",
|
|
@@ -3378,74 +3365,74 @@ const An = /* @__PURE__ */ H(jn, [["render", zn]]), Ae = {
|
|
|
3378
3365
|
paint: { "icon-opacity": 0.6 }
|
|
3379
3366
|
});
|
|
3380
3367
|
}
|
|
3381
|
-
const
|
|
3382
|
-
var b, y, x,
|
|
3368
|
+
const lt = E(() => {
|
|
3369
|
+
var b, y, x, $, w, C, P, V, H, O;
|
|
3383
3370
|
return {
|
|
3384
3371
|
center: (y = (b = a == null ? void 0 : a.value) == null ? void 0 : b.map) == null ? void 0 : y.center,
|
|
3385
|
-
zoom: (
|
|
3372
|
+
zoom: ($ = (x = a == null ? void 0 : a.value) == null ? void 0 : x.map) == null ? void 0 : $.zoom,
|
|
3386
3373
|
pitch: ((C = (w = a == null ? void 0 : a.value) == null ? void 0 : w.map) == null ? void 0 : C.pitch) || 0,
|
|
3387
3374
|
bearing: ((V = (P = a == null ? void 0 : a.value) == null ? void 0 : P.map) == null ? void 0 : V.bearing) || 0,
|
|
3388
|
-
bbox: ((
|
|
3375
|
+
bbox: ((O = (H = a == null ? void 0 : a.value) == null ? void 0 : H.map) == null ? void 0 : O.bbox) || null
|
|
3389
3376
|
};
|
|
3390
|
-
}),
|
|
3377
|
+
}), Ge = {
|
|
3391
3378
|
home: dn,
|
|
3392
3379
|
print: mn,
|
|
3393
3380
|
geolocation: An,
|
|
3394
3381
|
pitch: wn
|
|
3395
3382
|
// length: VsLengthMeasure,
|
|
3396
3383
|
// area: VsAreaMeasure,
|
|
3397
|
-
},
|
|
3398
|
-
|
|
3384
|
+
}, ct = (b) => {
|
|
3385
|
+
v.value = b;
|
|
3399
3386
|
};
|
|
3400
|
-
function
|
|
3387
|
+
function Le(b) {
|
|
3401
3388
|
if (!a.value || !a.value.widgets) return;
|
|
3402
3389
|
const y = a.value.widgets.find((w) => w.type === "list");
|
|
3403
3390
|
if (!y || !y.config) return;
|
|
3404
|
-
const { map_key: x, service_key:
|
|
3405
|
-
x &&
|
|
3391
|
+
const { map_key: x, service_key: $ } = y.config;
|
|
3392
|
+
x && $ && (d.value = {
|
|
3406
3393
|
id: b,
|
|
3407
3394
|
map: x,
|
|
3408
|
-
layer:
|
|
3395
|
+
layer: $
|
|
3409
3396
|
});
|
|
3410
3397
|
}
|
|
3411
|
-
const
|
|
3398
|
+
const dt = E(
|
|
3412
3399
|
() => a.value && a.value.widgets ? a.value.widgets.filter((b) => b.position === "absolute") : []
|
|
3413
3400
|
);
|
|
3414
|
-
function
|
|
3415
|
-
const
|
|
3401
|
+
function ut(b, y, x) {
|
|
3402
|
+
const $ = b.properties, w = u.value.find(
|
|
3416
3403
|
(U) => String(U.id) === String(b.source)
|
|
3417
|
-
), C = Array.isArray(w == null ? void 0 : w.popup) ? w.popup : [], V = C.filter((U) => U.meta === "image").map((U) =>
|
|
3404
|
+
), C = Array.isArray(w == null ? void 0 : w.popup) ? w.popup : [], V = C.filter((U) => U.meta === "image").map((U) => $ == null ? void 0 : $[U.name]).filter(Boolean), H = V.length > 0 ? `
|
|
3418
3405
|
<div class="popup-image-single overflow-hidden rounded-t-xl" style="width:260px;height:160px;margin:0 auto 0 auto;">
|
|
3419
3406
|
<img src="${V[0]}" style="width:100%;height:100%;object-fit:cover;border-radius:12px 12px 0 0;display:block;" />
|
|
3420
3407
|
</div>
|
|
3421
|
-
` : "",
|
|
3408
|
+
` : "", O = C.find((U) => U.meta === "title"), me = O ? $ == null ? void 0 : $[O.name] : "";
|
|
3422
3409
|
let Y = C.filter((U) => U.meta !== "title" && U.meta !== "image").map((U) => {
|
|
3423
|
-
const
|
|
3424
|
-
let
|
|
3410
|
+
const W = $ == null ? void 0 : $[U.name];
|
|
3411
|
+
let R = W ?? "-";
|
|
3425
3412
|
switch (U.meta) {
|
|
3426
3413
|
case "badge":
|
|
3427
|
-
|
|
3414
|
+
R = W ? `<span class="inline-block rounded px-2 py-0.5 text-xs bg-yellow-100 text-yellow-800 ">${W}</span>` : "-";
|
|
3428
3415
|
break;
|
|
3429
3416
|
}
|
|
3430
3417
|
return `
|
|
3431
3418
|
<tr style="display: table-row;">
|
|
3432
3419
|
<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>
|
|
3433
|
-
<td style="display: table-cell; padding: 2px 0 2px 8px; vertical-align: middle; width: 50%; text-align: right;">${
|
|
3420
|
+
<td style="display: table-cell; padding: 2px 0 2px 8px; vertical-align: middle; width: 50%; text-align: right;">${R}</td>
|
|
3434
3421
|
</tr>
|
|
3435
3422
|
`;
|
|
3436
3423
|
}).join("");
|
|
3437
|
-
C.length || (Y = Object.keys(
|
|
3424
|
+
C.length || (Y = Object.keys($).map(
|
|
3438
3425
|
(U) => `
|
|
3439
3426
|
<tr style="display: table-row;">
|
|
3440
3427
|
<td style="display: table-cell; padding: 2px 8px 2px 0; vertical-align: middle; font-weight: 500; width: 50%; text-align: left;">${U}</td>
|
|
3441
|
-
<td style="display: table-cell; padding: 2px 0 2px 8px; vertical-align: middle; width: 50%; text-align: right;">${
|
|
3428
|
+
<td style="display: table-cell; padding: 2px 0 2px 8px; vertical-align: middle; width: 50%; text-align: right;">${$[U] || "-"}</td>
|
|
3442
3429
|
</tr>
|
|
3443
3430
|
`
|
|
3444
3431
|
).join(""));
|
|
3445
|
-
const
|
|
3432
|
+
const Ce = `
|
|
3446
3433
|
<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;">
|
|
3447
|
-
${
|
|
3448
|
-
${
|
|
3434
|
+
${H}
|
|
3435
|
+
${me ? `<div class="font-semibold text-sm border-b border-solid border-gray-200 text-gray-800 px-2 py-1">${me}</div>` : ""}
|
|
3449
3436
|
<div class="text-xs px-2 py-0.5 text-gray-500" style="display: flex; justify-content: center; align-items: center; flex: 1;">
|
|
3450
3437
|
<table class="w-full" style="border-collapse: collapse; border: none; margin: 0 auto;">
|
|
3451
3438
|
<tbody>${Y}</tbody>
|
|
@@ -3453,163 +3440,163 @@ const An = /* @__PURE__ */ H(jn, [["render", zn]]), Ae = {
|
|
|
3453
3440
|
</div>
|
|
3454
3441
|
</div>
|
|
3455
3442
|
`;
|
|
3456
|
-
return x || (x = document.createElement("div"), x.className = "custom-popup absolute z-50", document.body.appendChild(x)), x.innerHTML =
|
|
3443
|
+
return x || (x = document.createElement("div"), x.className = "custom-popup absolute z-50", document.body.appendChild(x)), x.innerHTML = Ce, Je(x, y), x;
|
|
3457
3444
|
}
|
|
3458
|
-
function
|
|
3459
|
-
const x = b.offsetWidth,
|
|
3460
|
-
let
|
|
3461
|
-
|
|
3462
|
-
let
|
|
3463
|
-
V -
|
|
3445
|
+
function Je(b, y) {
|
|
3446
|
+
const x = b.offsetWidth, $ = b.offsetHeight, w = document.getElementById("maplibre-demo-map"), C = w.getBoundingClientRect(), P = y.originalEvent.clientX - C.left, V = y.originalEvent.clientY - C.top;
|
|
3447
|
+
let H = P - x / 2;
|
|
3448
|
+
H = Math.max(10, Math.min(H, C.width - x - 10));
|
|
3449
|
+
let O;
|
|
3450
|
+
V - $ - 10 > 0 ? O = V - $ - 5 : V + $ + 10 < C.height ? O = V + 10 : O = Math.max(10, C.height - $ - 10), b.style.position = "absolute", b.style.left = `${H + 20}px`, b.style.top = `${O + 10}px`, b.parentNode !== w && w.appendChild(b);
|
|
3464
3451
|
}
|
|
3465
3452
|
return (b, y) => {
|
|
3466
|
-
var x,
|
|
3453
|
+
var x, $;
|
|
3467
3454
|
return c(), p("div", {
|
|
3468
3455
|
class: "maplibre-demo-map-container",
|
|
3469
|
-
style: he(
|
|
3456
|
+
style: he(Oe.value)
|
|
3470
3457
|
}, [
|
|
3471
|
-
y[10] || (y[10] =
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
(c(), p(
|
|
3458
|
+
y[10] || (y[10] = s("div", { id: "maplibre-demo-map" }, null, -1)),
|
|
3459
|
+
i.value ? (c(), p(z, { key: 1 }, [
|
|
3460
|
+
s("div", Bn, [
|
|
3461
|
+
s("div", On, [
|
|
3462
|
+
s("div", Dn, [
|
|
3463
|
+
(c(), p(z, null, q(["top-left"], (w) => {
|
|
3477
3464
|
var C, P;
|
|
3478
|
-
return
|
|
3465
|
+
return Z(ze, {
|
|
3479
3466
|
key: w,
|
|
3480
3467
|
position: w,
|
|
3481
|
-
widgets:
|
|
3468
|
+
widgets: L(w),
|
|
3482
3469
|
map: o.value,
|
|
3483
|
-
mapLoaded:
|
|
3484
|
-
cardValues:
|
|
3485
|
-
hasFilters:
|
|
3470
|
+
mapLoaded: i.value,
|
|
3471
|
+
cardValues: d.value,
|
|
3472
|
+
hasFilters: _.value,
|
|
3486
3473
|
history: (P = (C = a.value) == null ? void 0 : C.value) == null ? void 0 : P.history,
|
|
3487
|
-
currentFilterLayer:
|
|
3488
|
-
enabledLayerIds:
|
|
3489
|
-
getWidgetComponent:
|
|
3490
|
-
getColumnWidth:
|
|
3491
|
-
rightColumnOffset: w === "top-right" ?
|
|
3492
|
-
onSetFilterLayer:
|
|
3493
|
-
"onUpdate:enabledLayerIds": y[0] || (y[0] = (V) =>
|
|
3494
|
-
onCardValuesId:
|
|
3495
|
-
onCloseCard:
|
|
3496
|
-
onCatalogLayers: y[1] || (y[1] = (V) =>
|
|
3474
|
+
currentFilterLayer: m.value,
|
|
3475
|
+
enabledLayerIds: ne.value,
|
|
3476
|
+
getWidgetComponent: k,
|
|
3477
|
+
getColumnWidth: Ee,
|
|
3478
|
+
rightColumnOffset: w === "top-right" ? Me.value : void 0,
|
|
3479
|
+
onSetFilterLayer: A,
|
|
3480
|
+
"onUpdate:enabledLayerIds": y[0] || (y[0] = (V) => ne.value = V),
|
|
3481
|
+
onCardValuesId: Le,
|
|
3482
|
+
onCloseCard: le,
|
|
3483
|
+
onCatalogLayers: y[1] || (y[1] = (V) => u.value = V)
|
|
3497
3484
|
}, null, 8, ["position", "widgets", "map", "mapLoaded", "cardValues", "hasFilters", "history", "currentFilterLayer", "enabledLayerIds", "rightColumnOffset"]);
|
|
3498
3485
|
}), 64))
|
|
3499
3486
|
]),
|
|
3500
|
-
|
|
3501
|
-
(c(), p(
|
|
3487
|
+
s("div", Un, [
|
|
3488
|
+
(c(), p(z, null, q(["bottom-left"], (w) => {
|
|
3502
3489
|
var C, P;
|
|
3503
|
-
return
|
|
3490
|
+
return Z(ze, {
|
|
3504
3491
|
key: w,
|
|
3505
3492
|
position: w,
|
|
3506
|
-
widgets:
|
|
3493
|
+
widgets: L(w),
|
|
3507
3494
|
map: o.value,
|
|
3508
|
-
mapLoaded:
|
|
3509
|
-
cardValues:
|
|
3510
|
-
hasFilters:
|
|
3495
|
+
mapLoaded: i.value,
|
|
3496
|
+
cardValues: d.value,
|
|
3497
|
+
hasFilters: _.value,
|
|
3511
3498
|
history: (P = (C = a.value) == null ? void 0 : C.value) == null ? void 0 : P.history,
|
|
3512
|
-
currentFilterLayer:
|
|
3513
|
-
enabledLayerIds:
|
|
3514
|
-
getWidgetComponent:
|
|
3515
|
-
getColumnWidth:
|
|
3516
|
-
rightColumnOffset: w === "top-right" ?
|
|
3517
|
-
onSetFilterLayer:
|
|
3518
|
-
"onUpdate:enabledLayerIds": y[2] || (y[2] = (V) =>
|
|
3519
|
-
onCardValuesId:
|
|
3520
|
-
onCloseCard:
|
|
3521
|
-
onCatalogLayers: y[3] || (y[3] = (V) =>
|
|
3499
|
+
currentFilterLayer: m.value,
|
|
3500
|
+
enabledLayerIds: ne.value,
|
|
3501
|
+
getWidgetComponent: k,
|
|
3502
|
+
getColumnWidth: Ee,
|
|
3503
|
+
rightColumnOffset: w === "top-right" ? Me.value : void 0,
|
|
3504
|
+
onSetFilterLayer: A,
|
|
3505
|
+
"onUpdate:enabledLayerIds": y[2] || (y[2] = (V) => ne.value = V),
|
|
3506
|
+
onCardValuesId: Le,
|
|
3507
|
+
onCloseCard: le,
|
|
3508
|
+
onCatalogLayers: y[3] || (y[3] = (V) => u.value = V)
|
|
3522
3509
|
}, null, 8, ["position", "widgets", "map", "mapLoaded", "cardValues", "hasFilters", "history", "currentFilterLayer", "enabledLayerIds", "rightColumnOffset"]);
|
|
3523
3510
|
}), 64))
|
|
3524
3511
|
])
|
|
3525
3512
|
]),
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
(c(), p(
|
|
3513
|
+
s("div", Rn, [
|
|
3514
|
+
s("div", Hn, [
|
|
3515
|
+
(c(), p(z, null, q(["top-right"], (w) => {
|
|
3529
3516
|
var C, P;
|
|
3530
|
-
return
|
|
3517
|
+
return Z(ze, {
|
|
3531
3518
|
key: w,
|
|
3532
3519
|
position: w,
|
|
3533
|
-
widgets:
|
|
3520
|
+
widgets: L(w),
|
|
3534
3521
|
map: o.value,
|
|
3535
|
-
mapLoaded:
|
|
3536
|
-
cardValues:
|
|
3537
|
-
hasFilters:
|
|
3522
|
+
mapLoaded: i.value,
|
|
3523
|
+
cardValues: d.value,
|
|
3524
|
+
hasFilters: _.value,
|
|
3538
3525
|
history: (P = (C = a.value) == null ? void 0 : C.value) == null ? void 0 : P.history,
|
|
3539
|
-
currentFilterLayer:
|
|
3540
|
-
enabledLayerIds:
|
|
3541
|
-
getWidgetComponent:
|
|
3542
|
-
getColumnWidth:
|
|
3543
|
-
rightColumnOffset: w === "top-right" ?
|
|
3544
|
-
onSetFilterLayer:
|
|
3545
|
-
"onUpdate:enabledLayerIds": y[4] || (y[4] = (V) =>
|
|
3546
|
-
onCardValuesId:
|
|
3547
|
-
onCloseCard:
|
|
3548
|
-
onCatalogLayers: y[5] || (y[5] = (V) =>
|
|
3526
|
+
currentFilterLayer: m.value,
|
|
3527
|
+
enabledLayerIds: ne.value,
|
|
3528
|
+
getWidgetComponent: k,
|
|
3529
|
+
getColumnWidth: Ee,
|
|
3530
|
+
rightColumnOffset: w === "top-right" ? Me.value : void 0,
|
|
3531
|
+
onSetFilterLayer: A,
|
|
3532
|
+
"onUpdate:enabledLayerIds": y[4] || (y[4] = (V) => ne.value = V),
|
|
3533
|
+
onCardValuesId: Le,
|
|
3534
|
+
onCloseCard: le,
|
|
3535
|
+
onCatalogLayers: y[5] || (y[5] = (V) => u.value = V)
|
|
3549
3536
|
}, null, 8, ["position", "widgets", "map", "mapLoaded", "cardValues", "hasFilters", "history", "currentFilterLayer", "enabledLayerIds", "rightColumnOffset"]);
|
|
3550
3537
|
}), 64))
|
|
3551
3538
|
]),
|
|
3552
|
-
|
|
3553
|
-
(c(), p(
|
|
3539
|
+
s("div", Nn, [
|
|
3540
|
+
(c(), p(z, null, q(["bottom-right"], (w) => {
|
|
3554
3541
|
var C, P;
|
|
3555
|
-
return
|
|
3542
|
+
return Z(ze, {
|
|
3556
3543
|
key: w,
|
|
3557
3544
|
position: w,
|
|
3558
|
-
widgets:
|
|
3545
|
+
widgets: L(w),
|
|
3559
3546
|
map: o.value,
|
|
3560
|
-
mapLoaded:
|
|
3561
|
-
cardValues:
|
|
3562
|
-
hasFilters:
|
|
3547
|
+
mapLoaded: i.value,
|
|
3548
|
+
cardValues: d.value,
|
|
3549
|
+
hasFilters: _.value,
|
|
3563
3550
|
history: (P = (C = a.value) == null ? void 0 : C.value) == null ? void 0 : P.history,
|
|
3564
|
-
currentFilterLayer:
|
|
3565
|
-
enabledLayerIds:
|
|
3566
|
-
getWidgetComponent:
|
|
3567
|
-
getColumnWidth:
|
|
3568
|
-
rightColumnOffset: w === "top-right" ?
|
|
3569
|
-
onSetFilterLayer:
|
|
3570
|
-
"onUpdate:enabledLayerIds": y[6] || (y[6] = (V) =>
|
|
3571
|
-
onCardValuesId:
|
|
3572
|
-
onCloseCard:
|
|
3573
|
-
onCatalogLayers: y[7] || (y[7] = (V) =>
|
|
3551
|
+
currentFilterLayer: m.value,
|
|
3552
|
+
enabledLayerIds: ne.value,
|
|
3553
|
+
getWidgetComponent: k,
|
|
3554
|
+
getColumnWidth: Ee,
|
|
3555
|
+
rightColumnOffset: w === "top-right" ? Me.value : void 0,
|
|
3556
|
+
onSetFilterLayer: A,
|
|
3557
|
+
"onUpdate:enabledLayerIds": y[6] || (y[6] = (V) => ne.value = V),
|
|
3558
|
+
onCardValuesId: Le,
|
|
3559
|
+
onCloseCard: le,
|
|
3560
|
+
onCatalogLayers: y[7] || (y[7] = (V) => u.value = V)
|
|
3574
3561
|
}, null, 8, ["position", "widgets", "map", "mapLoaded", "cardValues", "hasFilters", "history", "currentFilterLayer", "enabledLayerIds", "rightColumnOffset"]);
|
|
3575
3562
|
}), 64))
|
|
3576
3563
|
])
|
|
3577
3564
|
])
|
|
3578
3565
|
]),
|
|
3579
|
-
(c(!0), p(
|
|
3566
|
+
(c(!0), p(z, null, q(dt.value, (w, C) => (c(), p("div", {
|
|
3580
3567
|
key: "abs-" + (w.id || w.type || C),
|
|
3581
3568
|
class: "absolute z-20",
|
|
3582
3569
|
style: he(w.style)
|
|
3583
3570
|
}, [
|
|
3584
|
-
(c(), X(
|
|
3571
|
+
(c(), X(Be(k(w.type)), {
|
|
3585
3572
|
map: o.value,
|
|
3586
3573
|
config: w.config,
|
|
3587
|
-
hasFilters:
|
|
3588
|
-
currentFilterLayer:
|
|
3589
|
-
enabledLayerIds:
|
|
3590
|
-
cardValues:
|
|
3591
|
-
onSetFilterLayer:
|
|
3592
|
-
"onUpdate:enabledLayerIds": y[8] || (y[8] = (P) =>
|
|
3593
|
-
onCardValuesId:
|
|
3594
|
-
onCloseCard:
|
|
3595
|
-
onCatalogLayers: y[9] || (y[9] = (P) =>
|
|
3574
|
+
hasFilters: _.value,
|
|
3575
|
+
currentFilterLayer: m.value,
|
|
3576
|
+
enabledLayerIds: ne.value,
|
|
3577
|
+
cardValues: d.value,
|
|
3578
|
+
onSetFilterLayer: A,
|
|
3579
|
+
"onUpdate:enabledLayerIds": y[8] || (y[8] = (P) => ne.value = P),
|
|
3580
|
+
onCardValuesId: Le,
|
|
3581
|
+
onCloseCard: le,
|
|
3582
|
+
onCatalogLayers: y[9] || (y[9] = (P) => u.value = P)
|
|
3596
3583
|
}, null, 40, ["map", "config", "hasFilters", "currentFilterLayer", "enabledLayerIds", "cardValues"]))
|
|
3597
3584
|
], 4))), 128)),
|
|
3598
|
-
|
|
3599
|
-
(c(!0), p(
|
|
3600
|
-
|
|
3585
|
+
s("div", Zn, [
|
|
3586
|
+
(c(!0), p(z, null, q(($ = (x = a.value) == null ? void 0 : x.value) == null ? void 0 : $.tools, (w) => (c(), p(z, { key: w }, [
|
|
3587
|
+
i.value && Ge[w] ? (c(), X(Be(Ge[w]), wt({
|
|
3601
3588
|
key: 0,
|
|
3602
3589
|
map: o.value,
|
|
3603
|
-
activeTool:
|
|
3604
|
-
setActiveTool:
|
|
3605
|
-
}, { ref_for: !0 }, w === "home" ? { initialView:
|
|
3590
|
+
activeTool: v.value,
|
|
3591
|
+
setActiveTool: ct
|
|
3592
|
+
}, { ref_for: !0 }, w === "home" ? { initialView: lt.value } : {}, { onCardValuesId: Le }), null, 16, ["map", "activeTool"])) : F("", !0)
|
|
3606
3593
|
], 64))), 128))
|
|
3607
3594
|
])
|
|
3608
3595
|
], 64)) : (c(), X(on, { key: 0 }))
|
|
3609
3596
|
], 4);
|
|
3610
3597
|
};
|
|
3611
3598
|
}
|
|
3612
|
-
}), qn = /* @__PURE__ */
|
|
3599
|
+
}), qn = /* @__PURE__ */ N(Wn, [["__scopeId", "data-v-22436345"]]);
|
|
3613
3600
|
function Qn(e) {
|
|
3614
3601
|
e.component("MapCustom", qn);
|
|
3615
3602
|
}
|