@opengis/gis 0.1.72 → 0.1.74
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 +1305 -1303
- package/dist/index.umd.cjs +13 -13
- package/module/test/layer/ts.linking_passport.yml +56 -0
- package/module/test/layer/ts.temp_structure.yml +51 -0
- package/module/test/map/ts.json +157 -0
- package/package.json +10 -10
- package/server/plugins/vite.js +2 -2
- package/server/routes/map/controllers/layerList.js +38 -0
- package/server/routes/map/index.mjs +7 -2
- package/server/routes/map/vtile1.js +24 -14
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
for (const [
|
|
6
|
-
o
|
|
7
|
-
return
|
|
8
|
-
},
|
|
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 W, normalizeClass as Y, ref as T, onMounted as _e, resolveDirective as gt, withDirectives as se, watch as fe, createVNode as Z, vModelText as Ze, vModelCheckbox as qe, defineComponent as Ge, reactive as vt, onBeforeUnmount as mt, createBlock as K, renderSlot as Ne, Teleport as Xe, Transition as yt, withCtx as q, vShow as Ee, nextTick as Me, resolveComponent as J, unref as We, createTextVNode as ae, createStaticVNode as Oe, withModifiers as bt, resolveDynamicComponent as De, withKeys as wt, onUnmounted as xt, getCurrentInstance as _t, mergeProps as kt } from "vue";
|
|
2
|
+
import Lt from "@opengis/filter";
|
|
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
|
+
}, Ct = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "p-5 pb-0 flex justify-between items-center"
|
|
11
|
-
},
|
|
11
|
+
}, $t = { class: "inline-block font-semibold text-lg text-gray-800" }, It = { class: "flex flex-col gap-1 p-5" }, Vt = { class: "flex items-center justify-between w-full text-sm text-gray-800 ml-2" }, St = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "ms-2 text-xs text-gray-500"
|
|
14
|
-
},
|
|
14
|
+
}, Ft = {
|
|
15
15
|
__name: "vs-legend-widget",
|
|
16
16
|
props: {
|
|
17
17
|
config: {
|
|
@@ -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", Ct, [
|
|
35
|
+
s("h2", $t, S(o.value), 1)
|
|
36
36
|
])) : F("", !0),
|
|
37
|
-
|
|
38
|
-
(c(!0), p(
|
|
37
|
+
s("div", It, [
|
|
38
|
+
(c(!0), p(z, null, W(r.value, (m) => (c(), p("div", {
|
|
39
39
|
class: "flex items-center",
|
|
40
|
-
key:
|
|
40
|
+
key: m.label
|
|
41
41
|
}, [
|
|
42
|
-
|
|
43
|
-
class:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
s("span", {
|
|
43
|
+
class: Y(["shrink-0 size-2.5 inline-block me-2.5 h-[10px] w-[10px]", [
|
|
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", Vt, [
|
|
52
|
+
s("span", null, S(m.label), 1),
|
|
53
|
+
m.count !== void 0 ? (c(), p("span", St, " (" + S(m.count) + ") ", 1)) : F("", !0)
|
|
54
54
|
])
|
|
55
55
|
]))), 128))
|
|
56
56
|
])
|
|
57
57
|
], 4));
|
|
58
58
|
}
|
|
59
|
-
},
|
|
59
|
+
}, jt = /* @__PURE__ */ N(Ft, [["__scopeId", "data-v-dd12cf90"]]), Pt = { class: "flex flex-row gap-x-3 z-10 relative" }, Et = ["onClick"], Mt = ["src", "alt"], Tt = {
|
|
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,134 +96,134 @@ 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 =
|
|
152
|
-
return c(), p("div",
|
|
153
|
-
(c(!0), p(
|
|
147
|
+
return _e(() => {
|
|
148
|
+
var h;
|
|
149
|
+
(h = t.config) != null && h.default && (r.value = t.config.default), m(r.value);
|
|
150
|
+
}), (h, g) => {
|
|
151
|
+
const l = gt("tooltip");
|
|
152
|
+
return c(), p("div", Pt, [
|
|
153
|
+
(c(!0), p(z, null, W(o.value, (d) => se((c(), p("div", {
|
|
154
154
|
trigger: "hover",
|
|
155
155
|
placement: "top",
|
|
156
|
-
key:
|
|
156
|
+
key: d.id
|
|
157
157
|
}, [
|
|
158
|
-
|
|
159
|
-
class:
|
|
158
|
+
s("div", {
|
|
159
|
+
class: Y([
|
|
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:
|
|
170
|
-
}, null, 10,
|
|
171
|
-
], 10,
|
|
167
|
+
src: d.image,
|
|
168
|
+
alt: d.title,
|
|
169
|
+
class: Y(["object-cover rounded-lg", d.id === "__none__" ? "w-10 h-10" : "w-12 h-12"])
|
|
170
|
+
}, null, 10, Mt)) : F("", !0)
|
|
171
|
+
], 10, Et)
|
|
172
172
|
])), [
|
|
173
|
-
[l,
|
|
173
|
+
[l, d.title]
|
|
174
174
|
])), 128))
|
|
175
175
|
]);
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
|
-
function
|
|
179
|
+
function Ve(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
|
-
function
|
|
188
|
+
function zt(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 et(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
|
-
function
|
|
216
|
+
function At(e) {
|
|
217
217
|
const t = [
|
|
218
218
|
{
|
|
219
219
|
type: "fill",
|
|
220
220
|
minzoom: e.pointZoom || 0,
|
|
221
221
|
paint: {
|
|
222
|
-
"fill-color":
|
|
222
|
+
"fill-color": Ve(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": et(e)
|
|
227
227
|
},
|
|
228
228
|
...e.fillPattern && !e.attrType && { "fill-pattern": e.fillPattern }
|
|
229
229
|
}
|
|
@@ -248,12 +248,12 @@ function Mt(e) {
|
|
|
248
248
|
}
|
|
249
249
|
}), t;
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function Bt(e) {
|
|
252
252
|
return [
|
|
253
253
|
{
|
|
254
254
|
type: "line",
|
|
255
255
|
paint: {
|
|
256
|
-
"line-color": ue(e, "color",
|
|
256
|
+
"line-color": ue(e, "color", Ve(e)),
|
|
257
257
|
"line-width": e.width || 2,
|
|
258
258
|
"line-opacity": e.opacity || 1,
|
|
259
259
|
...e.dashArray && { "line-dasharray": e.dashArray }
|
|
@@ -265,7 +265,7 @@ function Tt(e) {
|
|
|
265
265
|
}
|
|
266
266
|
];
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function Ot(e) {
|
|
269
269
|
const t = [
|
|
270
270
|
{
|
|
271
271
|
type: "circle",
|
|
@@ -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": Ve(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
|
|
307
|
-
const
|
|
308
|
-
return
|
|
306
|
+
function Dt(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": Ve(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": et(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", Ve(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": Ve(e),
|
|
355
355
|
"circle-opacity": e.opacity || 1
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
];
|
|
359
359
|
}
|
|
360
|
-
function
|
|
361
|
-
var
|
|
360
|
+
function tt(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 = zt(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 = Dt(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,47 +379,47 @@ 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
|
-
return t === "polygon" ?
|
|
385
|
+
return t === "polygon" ? At(e) : t === "line" ? Bt(e) : Ot(e);
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function Ut(e) {
|
|
388
388
|
return e.startsWith("http") ? e : `${window.location.origin}${e}`;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
390
|
+
function Rt(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 = Ut(o), a = g || h || l || "vector";
|
|
403
|
+
switch (a) {
|
|
404
404
|
case "vtile":
|
|
405
405
|
case "vector":
|
|
406
|
-
return
|
|
406
|
+
return Nt(
|
|
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
|
|
415
|
+
return Zt(t, v, i, n, m);
|
|
416
416
|
case "geojson":
|
|
417
|
-
return
|
|
417
|
+
return Wt(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
|
-
function
|
|
422
|
+
function Ht(e) {
|
|
423
423
|
switch (e) {
|
|
424
424
|
case "polygon":
|
|
425
425
|
return { type: "polygon", color: "#3388ff", opacity: 0.5 };
|
|
@@ -430,142 +430,142 @@ function Dt(e) {
|
|
|
430
430
|
return { type: "point", color: "#3388ff", radius: 6, opacity: 1 };
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
|
-
function
|
|
434
|
-
const
|
|
433
|
+
function Nt(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 = tt(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
|
|
453
|
-
const
|
|
452
|
+
function Zt(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
|
|
476
|
-
var
|
|
477
|
-
const
|
|
475
|
+
function Wt(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 || Ht(m), l = tt(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
|
};
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function qt(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 Gt(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 ot(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 Jt(e, t, r = "/icons/") {
|
|
531
|
+
const i = Gt(t).map((n) => ({ name: n, url: r + n }));
|
|
532
|
+
return ot(e, i);
|
|
533
533
|
}
|
|
534
|
-
async function
|
|
535
|
-
const
|
|
536
|
-
|
|
537
|
-
for (const
|
|
538
|
-
t.visible !== void 0 && (
|
|
539
|
-
...
|
|
534
|
+
async function xe(e, t) {
|
|
535
|
+
const r = Rt(t), o = qt(t.style);
|
|
536
|
+
o.length > 0 && await ot(e, o), t.layout && t.layout["icon-image"] && await Jt(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 Ie(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
|
-
const
|
|
553
|
+
const Qt = {}, Yt = {
|
|
554
554
|
width: "24",
|
|
555
555
|
height: "24",
|
|
556
556
|
viewBox: "0 0 24 24",
|
|
557
557
|
fill: "none",
|
|
558
558
|
xmlns: "http://www.w3.org/2000/svg"
|
|
559
559
|
};
|
|
560
|
-
function
|
|
561
|
-
return c(), p("svg",
|
|
562
|
-
|
|
560
|
+
function Kt(e, t) {
|
|
561
|
+
return c(), p("svg", Yt, [...t[0] || (t[0] = [
|
|
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,16 +573,16 @@ function Jt(e, t) {
|
|
|
573
573
|
}, null, -1)
|
|
574
574
|
])]);
|
|
575
575
|
}
|
|
576
|
-
const
|
|
576
|
+
const rt = /* @__PURE__ */ N(Qt, [["render", Kt]]), Xt = { class: "w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative" }, eo = { class: "flex flex-col justify-between h-full pb-5 px-5" }, to = {
|
|
577
577
|
key: 0,
|
|
578
578
|
class: "relative mb-[10px]"
|
|
579
|
-
},
|
|
579
|
+
}, oo = {
|
|
580
580
|
key: 1,
|
|
581
581
|
class: "mb-4"
|
|
582
|
-
},
|
|
582
|
+
}, ro = { class: "" }, so = { class: "space-y-2" }, no = { class: "flex items-center gap-[10px] text-gray-500" }, io = { class: "dataset-checkbox-container flex" }, ao = ["onUpdate:modelValue", "onChange"], lo = { class: "text-sm" }, co = ["onClick"], uo = ["innerHTML"], po = {
|
|
583
583
|
key: 0,
|
|
584
584
|
class: "text-sm text-gray-500 text-center py-2"
|
|
585
|
-
},
|
|
585
|
+
}, ho = {
|
|
586
586
|
__name: "vs-layers-widget",
|
|
587
587
|
props: {
|
|
588
588
|
map: {
|
|
@@ -612,108 +612,108 @@ 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
|
+
_e(() => {
|
|
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 && xe(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 ? xe(r.map, u) : (Ie(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 ? xe(r.map, f) : Ie(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", Xt, [
|
|
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
|
-
|
|
667
|
-
e.config.search ? (c(), p("div",
|
|
668
|
-
|
|
666
|
+
s("div", eo, [
|
|
667
|
+
e.config.search ? (c(), p("div", to, [
|
|
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
|
+
[Ze, i.value]
|
|
675
675
|
]),
|
|
676
|
-
|
|
676
|
+
Z(rt)
|
|
677
677
|
])) : F("", !0),
|
|
678
|
-
e.config.allow_toggle_all ? (c(), p("div",
|
|
679
|
-
|
|
680
|
-
onClick:
|
|
678
|
+
e.config.allow_toggle_all ? (c(), p("div", oo, [
|
|
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", ro, [
|
|
685
|
+
s("ul", so, [
|
|
686
|
+
(c(!0), p(z, null, W(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", no, [
|
|
691
|
+
s("span", io, [
|
|
692
|
+
se(s("input", {
|
|
693
693
|
class: "dataset-checkbox",
|
|
694
694
|
type: "checkbox",
|
|
695
695
|
"onUpdate:modelValue": (j) => L.visible = j,
|
|
696
|
-
onChange: () =>
|
|
697
|
-
}, null, 40,
|
|
696
|
+
onChange: () => v(L)
|
|
697
|
+
}, null, 40, ao), [
|
|
698
698
|
[qe, L.visible]
|
|
699
699
|
])
|
|
700
700
|
]),
|
|
701
|
-
|
|
701
|
+
s("span", lo, 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 }, W(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: (O) => u.$emit("show-widget", j.widget)
|
|
709
709
|
}, [
|
|
710
|
-
|
|
710
|
+
s("div", {
|
|
711
711
|
innerHTML: j.icon
|
|
712
|
-
}, null, 8,
|
|
713
|
-
], 8,
|
|
712
|
+
}, null, 8, uo)
|
|
713
|
+
], 8, co)
|
|
714
714
|
]))), 128)) : F("", !0)
|
|
715
715
|
]))), 128)),
|
|
716
|
-
|
|
716
|
+
i.value && g.value.length === 0 ? (c(), p("li", po, " Шарів не знайдено ")) : F("", !0)
|
|
717
717
|
])
|
|
718
718
|
])
|
|
719
719
|
])
|
|
@@ -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 Pe = async (e, t, r, o = 10) => {
|
|
765
|
+
var L, j, O, k;
|
|
766
|
+
if (!t || !r) return;
|
|
767
|
+
await Me();
|
|
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((O = r == null ? void 0 : r.getBoundingClientRect()) == null ? void 0 : O.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
|
-
},
|
|
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
|
+
}, fo = { class: "text-center" }, go = { 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" }, Se = /* @__PURE__ */ Ge({
|
|
807
807
|
__name: "vs-popover",
|
|
808
808
|
props: {
|
|
809
809
|
isOpen: { type: Boolean, default: !1 },
|
|
@@ -815,61 +815,61 @@ 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, ne;
|
|
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) || (ne = l.value) != null && ne.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", () => Pe(o.placement, g.value, l.value)), Pe(o.placement, g.value, l.value)) : window.removeEventListener("resize", () => Pe(o.placement, g.value, l.value)), i("isvisible", _);
|
|
844
|
+
}), _e(() => {
|
|
845
|
+
window.addEventListener("click", d), window.addEventListener("popstate", u), window.addEventListener("scroll", v, !0), f();
|
|
846
|
+
}), mt(() => {
|
|
847
|
+
window.removeEventListener("click", d), window.removeEventListener("popstate", u), L();
|
|
848
848
|
});
|
|
849
849
|
const j = () => {
|
|
850
|
-
|
|
851
|
-
},
|
|
852
|
-
|
|
850
|
+
n.value = !0, Pe(o.placement, g.value, l.value);
|
|
851
|
+
}, O = () => {
|
|
852
|
+
n.value = !1;
|
|
853
853
|
}, k = async () => {
|
|
854
|
-
await
|
|
854
|
+
await Pe(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", fo, [
|
|
864
864
|
_.trigger === "click" ? (c(), p("div", {
|
|
865
865
|
key: 0,
|
|
866
866
|
ref_key: "popoverRef",
|
|
867
867
|
ref: g,
|
|
868
868
|
onClick: k,
|
|
869
|
-
class:
|
|
869
|
+
class: Y({ "pointer-events-none": _.disabled })
|
|
870
870
|
}, [
|
|
871
871
|
Ne(_.$slots, "reference", {}, () => [
|
|
872
|
-
|
|
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,18 +877,18 @@ const je = async (e, t, o, s = 10) => {
|
|
|
877
877
|
ref_key: "popoverRef",
|
|
878
878
|
ref: g,
|
|
879
879
|
onMouseover: j,
|
|
880
|
-
onMouseleave:
|
|
881
|
-
class:
|
|
880
|
+
onMouseleave: O,
|
|
881
|
+
class: Y({ "pointer-events-none": _.disabled })
|
|
882
882
|
}, [
|
|
883
883
|
Ne(_.$slots, "reference", {}, () => [
|
|
884
|
-
|
|
884
|
+
A[1] || (A[1] = s("button", null, "Click me!", -1))
|
|
885
885
|
])
|
|
886
886
|
], 34)) : F("", !0),
|
|
887
|
-
(c(),
|
|
888
|
-
|
|
889
|
-
default:
|
|
890
|
-
|
|
891
|
-
class:
|
|
887
|
+
(c(), K(Xe, { to: _.teleport }, [
|
|
888
|
+
Z(yt, { name: "fade" }, {
|
|
889
|
+
default: q(() => [
|
|
890
|
+
se(s("div", {
|
|
891
|
+
class: Y(["vsTailwind vs-popover__content", _.placement]),
|
|
892
892
|
ref_key: "contentPop",
|
|
893
893
|
ref: l,
|
|
894
894
|
style: he({
|
|
@@ -896,13 +896,13 @@ const je = async (e, t, o, s = 10) => {
|
|
|
896
896
|
zIndex: 10002
|
|
897
897
|
})
|
|
898
898
|
}, [
|
|
899
|
-
|
|
899
|
+
s("div", go, [
|
|
900
900
|
Ne(_.$slots, "default", {}, () => [
|
|
901
|
-
|
|
901
|
+
A[2] || (A[2] = s("span", null, "Popover content", -1))
|
|
902
902
|
])
|
|
903
903
|
])
|
|
904
904
|
], 6), [
|
|
905
|
-
[
|
|
905
|
+
[Ee, n.value]
|
|
906
906
|
])
|
|
907
907
|
]),
|
|
908
908
|
_: 3
|
|
@@ -912,11 +912,11 @@ const je = async (e, t, o, s = 10) => {
|
|
|
912
912
|
], 512));
|
|
913
913
|
}
|
|
914
914
|
});
|
|
915
|
-
|
|
916
|
-
const
|
|
915
|
+
vt({ visible: !0 });
|
|
916
|
+
const vo = { class: "legend-widget flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative" }, mo = {
|
|
917
917
|
key: 0,
|
|
918
918
|
class: "p-5 pb-3 flex justify-between items-start gap-[30px]"
|
|
919
|
-
},
|
|
919
|
+
}, yo = { class: "inline-block font-semibold text-lg text-gray-800 dark:text-neutral-200" }, bo = { class: "flex flex-col gap-1" }, wo = { class: "flex flex-col gap-1 p-5 pt-0" }, xo = ["innerHTML"], _o = {
|
|
920
920
|
__name: "vs-info-widget",
|
|
921
921
|
props: {
|
|
922
922
|
config: {
|
|
@@ -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
|
|
941
|
-
return c(), p("div",
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
(l =
|
|
940
|
+
const h = J("router-link");
|
|
941
|
+
return c(), p("div", vo, [
|
|
942
|
+
r.value || (g = i.value) != null && g.length ? (c(), p("div", mo, [
|
|
943
|
+
s("h2", yo, S(r.value), 1),
|
|
944
|
+
(l = i.value) != null && l.length ? (c(), K(We(Se), {
|
|
945
945
|
key: 0,
|
|
946
946
|
placement: "bottom"
|
|
947
947
|
}, {
|
|
948
|
-
reference:
|
|
949
|
-
|
|
948
|
+
reference: q(() => [
|
|
949
|
+
Z(We(Se), {
|
|
950
950
|
trigger: "hover",
|
|
951
951
|
placement: "right"
|
|
952
952
|
}, {
|
|
953
|
-
reference:
|
|
954
|
-
|
|
955
|
-
|
|
953
|
+
reference: q(() => [...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: q(() => [
|
|
984
|
+
m[1] || (m[1] = ae(" Перейти на карту ", -1))
|
|
985
985
|
]),
|
|
986
986
|
_: 1
|
|
987
987
|
})
|
|
988
988
|
]),
|
|
989
|
-
default:
|
|
990
|
-
|
|
991
|
-
(c(!0), p(
|
|
992
|
-
key:
|
|
989
|
+
default: q(() => [
|
|
990
|
+
s("div", bo, [
|
|
991
|
+
(c(!0), p(z, null, W(i.value, (d) => (c(), p("div", {
|
|
992
|
+
key: d.label
|
|
993
993
|
}, [
|
|
994
|
-
|
|
994
|
+
d.url ? (c(), K(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
|
-
ae(S(
|
|
999
|
+
default: q(() => [
|
|
1000
|
+
ae(S(d.label), 1)
|
|
1001
1001
|
]),
|
|
1002
1002
|
_: 2
|
|
1003
1003
|
}, 1032, ["to"])) : F("", !0)
|
|
@@ -1007,34 +1007,34 @@ 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", wo, [
|
|
1011
|
+
s("div", { innerHTML: o.value }, null, 8, xo)
|
|
1012
1012
|
])
|
|
1013
1013
|
]);
|
|
1014
1014
|
};
|
|
1015
1015
|
}
|
|
1016
|
-
},
|
|
1016
|
+
}, ko = /* @__PURE__ */ N(_o, [["__scopeId", "data-v-629caa82"]]), Lo = { class: "w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative overflow-hidden" }, Co = {
|
|
1017
1017
|
key: 0,
|
|
1018
1018
|
class: "p-5 pb-3 flex justify-between items-center"
|
|
1019
|
-
},
|
|
1019
|
+
}, $o = { class: "inline-block font-semibold text-lg text-gray-800" }, Io = {
|
|
1020
1020
|
key: 1,
|
|
1021
1021
|
class: "flex"
|
|
1022
|
-
},
|
|
1022
|
+
}, Vo = { class: "flex items-center mx-[8px]" }, So = { class: "min-h-[34px] max-h-[34px] overflow-hidden min-w-[34px] flex justify-center items-center bg-stone-100 text-stone-800 py-2 px-3 text-sm rounded-lg" }, Fo = { class: "min-h-[34px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm" }, jo = { class: "flex flex-col justify-between pb-5 px-5 h-full overflow-y-auto flex-1 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent" }, Po = {
|
|
1023
1023
|
key: 0,
|
|
1024
1024
|
class: "text-center"
|
|
1025
|
-
},
|
|
1025
|
+
}, Eo = {
|
|
1026
1026
|
key: 1,
|
|
1027
1027
|
class: "text-red-500"
|
|
1028
|
-
},
|
|
1028
|
+
}, Mo = { key: 2 }, To = ["innerHTML"], zo = {
|
|
1029
1029
|
key: 1,
|
|
1030
1030
|
class: "flow-root"
|
|
1031
|
-
},
|
|
1031
|
+
}, Ao = { class: "-my-3 divide-y divide-gray-100 text-sm" }, Bo = { class: "font-medium text-gray-900" }, Oo = { class: "text-gray-700 sm:col-span-2" }, Do = {
|
|
1032
1032
|
key: 2,
|
|
1033
1033
|
class: "vs-map-card-info__nodata"
|
|
1034
|
-
},
|
|
1034
|
+
}, Uo = {
|
|
1035
1035
|
key: 3,
|
|
1036
1036
|
class: "pt-4 flex justify-end"
|
|
1037
|
-
},
|
|
1037
|
+
}, Ro = ["href"], st = {
|
|
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 O;
|
|
1053
|
+
return ((O = r.config) == null ? void 0 : O.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 O;
|
|
1058
|
+
return ((O = r.info) == null ? void 0 : O.length) || 0;
|
|
1059
|
+
}), a = E(() => m.value[l.value]), u = E(() => {
|
|
1060
|
+
if (!a.value) return {};
|
|
1061
|
+
const { rows: O, columns: k } = a.value;
|
|
1062
|
+
return !O || !k ? {} : k.reduce((_, A) => (!A.hide && !["geom", "geodata", "id"].includes(A.name) && (_[A.ua] = O[A.name] ?? "-"), _), {});
|
|
1063
1063
|
});
|
|
1064
1064
|
async function f() {
|
|
1065
|
-
var
|
|
1066
|
-
|
|
1065
|
+
var O, k, _, A, ne, 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: (O = r.cardValues) == null ? void 0 : O.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 : (ne = r.cardValues) == null ? void 0 : ne.layer,
|
|
1071
|
+
map: (ge = r.cardValues) == null ? void 0 : ge.map
|
|
1072
|
+
}, le = await fetch("/api/map-format?" + new URLSearchParams(pe)).then((Ue) => Ue.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 Me(), 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 _e(async () => {
|
|
1087
|
+
await Me(), 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 _,
|
|
1098
|
-
return c(), p("div",
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1094
|
+
), fe([() => r.cardValues, () => r.config], async () => {
|
|
1095
|
+
await Me(), f(), o("content-resize");
|
|
1096
|
+
}), (O, k) => {
|
|
1097
|
+
var _, A;
|
|
1098
|
+
return c(), p("div", Lo, [
|
|
1099
|
+
i.value ? (c(), p("div", Co, [
|
|
1100
|
+
s("h2", $o, 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] = (ne) => 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,76 +1115,76 @@ 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", Io, [
|
|
1124
|
+
s("button", {
|
|
1125
1125
|
type: "button",
|
|
1126
|
-
class:
|
|
1127
|
-
"opacity-flex items-center justify-between border-b px-[16px] py-[8px]50 pointer-events-none":
|
|
1126
|
+
class: Y([{
|
|
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", Vo, [
|
|
1132
|
+
s("span", So, 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", Fo, S(v.value), 1)
|
|
1135
1135
|
]),
|
|
1136
|
-
|
|
1136
|
+
s("button", {
|
|
1137
1137
|
type: "button",
|
|
1138
1138
|
onClick: L,
|
|
1139
|
-
class:
|
|
1140
|
-
"opacity-50 pointer-events-none":
|
|
1139
|
+
class: Y([{
|
|
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", jo, [
|
|
1145
|
+
h.value ? (c(), p("div", Po, "Завантаження даних...")) : g.value ? (c(), p("div", Eo, " Помилка завантаження даних ")) : (c(), p("div", Mo, [
|
|
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,
|
|
1151
|
-
|
|
1152
|
-
(c(!0), p(
|
|
1153
|
-
key:
|
|
1150
|
+
}, null, 8, To)) : Object.keys(u.value).length ? (c(), p("div", zo, [
|
|
1151
|
+
s("dl", Ao, [
|
|
1152
|
+
(c(!0), p(z, null, W(u.value, (ne, 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", Bo, S(ge), 1),
|
|
1157
|
+
s("dd", Oo, S(ne), 1)
|
|
1158
1158
|
]))), 128))
|
|
1159
1159
|
])
|
|
1160
|
-
])) : (c(), p("div",
|
|
1160
|
+
])) : (c(), p("div", Do, "Даних не знайдено."))
|
|
1161
1161
|
])),
|
|
1162
|
-
(
|
|
1163
|
-
|
|
1164
|
-
href: `/card/${
|
|
1162
|
+
(A = a.value) != null && A.cardInterface && n.value ? (c(), p("div", Uo, [
|
|
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
|
-
}, " Перейти в реєстр ", 8,
|
|
1167
|
+
}, " Перейти в реєстр ", 8, Ro)
|
|
1168
1168
|
])) : F("", !0)
|
|
1169
1169
|
])
|
|
1170
1170
|
]);
|
|
1171
1171
|
};
|
|
1172
1172
|
}
|
|
1173
|
-
},
|
|
1173
|
+
}, Ho = { class: "size-full flex flex-col bg-white border border-gray-200 shadow-2xs rounded-xl dark:bg-neutral-800 dark:border-neutral-700" }, No = {
|
|
1174
1174
|
key: 0,
|
|
1175
1175
|
class: "p-5 pb-0 items-center"
|
|
1176
|
-
},
|
|
1176
|
+
}, Zo = { class: "inline-block font-semibold text-lg text-gray-800 dark:text-neutral-200" }, Wo = { class: "h-full p-5" }, qo = { class: "h-full flex flex-col justify-between space-y-4" }, Go = { class: "space-y-4" }, Jo = {
|
|
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"], Yo = { 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" }, Ko = ["for"], Xo = {
|
|
1180
1180
|
key: 0,
|
|
1181
1181
|
width: "16",
|
|
1182
1182
|
height: "auto",
|
|
1183
1183
|
src: "data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTYgMTYnIGZpbGw9J3doaXRlJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxwYXRoIGQ9J00xMi4yMDcgNC43OTNhMSAxIDAgMDEwIDEuNDE0bC01IDVhMSAxIDAgMDEtMS40MTQgMGwtMi0yYTEgMSAwIDAxMS40MTQtMS40MTRMNi41IDkuMDg2bDQuMjkzLTQuMjkzYTEgMSAwIDAxMS40MTQgMHonLz48L3N2Zz4="
|
|
1184
|
-
},
|
|
1184
|
+
}, er = ["id", "onUpdate:modelValue"], tr = { class: "ml-2 text-gray-800 dark:text-neutral-200" }, or = {
|
|
1185
1185
|
key: 0,
|
|
1186
1186
|
class: "ms-auto text-xs text-gray-500 dark:text-neutral-500"
|
|
1187
|
-
},
|
|
1187
|
+
}, rr = {
|
|
1188
1188
|
__name: "vs-attributre-widget",
|
|
1189
1189
|
props: {
|
|
1190
1190
|
config: {
|
|
@@ -1197,83 +1197,83 @@ 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 _e(() => {
|
|
1221
1221
|
var g;
|
|
1222
|
-
(g = t.config) != null && g.layer && (
|
|
1222
|
+
(g = t.config) != null && g.layer && (xe(t.map, t.config.layer), o.value = new Array(t.config.layer.style.rules.length).fill(
|
|
1223
1223
|
!1
|
|
1224
1224
|
));
|
|
1225
|
-
}), (g, l) => (c(), p("div",
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1225
|
+
}), (g, l) => (c(), p("div", Ho, [
|
|
1226
|
+
r.value ? (c(), p("div", No, [
|
|
1227
|
+
s("div", null, [
|
|
1228
|
+
s("h2", Zo, S(r.value), 1)
|
|
1229
1229
|
])
|
|
1230
1230
|
])) : F("", !0),
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
(c(!0), p(
|
|
1236
|
-
key:
|
|
1231
|
+
s("div", Wo, [
|
|
1232
|
+
s("div", qo, [
|
|
1233
|
+
s("div", Go, [
|
|
1234
|
+
i.value ? (c(), p("div", Jo, [
|
|
1235
|
+
(c(!0), p(z, null, W(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
|
-
}, null, 12,
|
|
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, W(e.config.layer.style.rules, (d, v) => (c(), p("li", { key: v }, [
|
|
1250
|
+
s("div", Yo, [
|
|
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", Xo)) : 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
|
-
}, null, 40,
|
|
1272
|
-
[qe,
|
|
1271
|
+
}, null, 40, er), [
|
|
1272
|
+
[qe, o.value[v]]
|
|
1273
1273
|
]),
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
], 8,
|
|
1274
|
+
s("span", tr, S(d.label || d.text), 1),
|
|
1275
|
+
i.value ? (c(), p("span", or, "(" + S(d.count) + ")", 1)) : F("", !0)
|
|
1276
|
+
], 8, Ko)
|
|
1277
1277
|
])
|
|
1278
1278
|
]))), 128))
|
|
1279
1279
|
])
|
|
@@ -1282,7 +1282,7 @@ const ho = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1282
1282
|
])
|
|
1283
1283
|
]));
|
|
1284
1284
|
}
|
|
1285
|
-
},
|
|
1285
|
+
}, sr = {}, nr = {
|
|
1286
1286
|
class: "shrink-0 size-4",
|
|
1287
1287
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1288
1288
|
width: "24",
|
|
@@ -1294,23 +1294,23 @@ const ho = { class: "legend-widget flex flex-col bg-white border border-stone-20
|
|
|
1294
1294
|
"stroke-linecap": "round",
|
|
1295
1295
|
"stroke-linejoin": "round"
|
|
1296
1296
|
};
|
|
1297
|
-
function
|
|
1298
|
-
return c(), p("svg",
|
|
1299
|
-
|
|
1300
|
-
|
|
1297
|
+
function ir(e, t) {
|
|
1298
|
+
return c(), p("svg", nr, [...t[0] || (t[0] = [
|
|
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 nt = /* @__PURE__ */ N(sr, [["render", ir]]), ar = { class: "hover:bg-gray-100 rounded-lg flex items-center ml-[20px] py-[8px] px-[8px]" }, lr = ["for"], cr = { class: "custom-checkbox-wrapper" }, dr = ["id", "checked"], ur = { class: "custom-checkbox" }, pr = {
|
|
1304
1304
|
key: 0,
|
|
1305
1305
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1306
1306
|
width: "12",
|
|
1307
1307
|
height: "8",
|
|
1308
1308
|
viewBox: "0 0 12 8",
|
|
1309
1309
|
fill: "none"
|
|
1310
|
-
},
|
|
1310
|
+
}, hr = { class: "flex items-center justify-between ml-2 w-full" }, fr = ["title"], gr = {
|
|
1311
1311
|
key: 0,
|
|
1312
1312
|
class: "text-xs opacity-60 text-[#4b5563]"
|
|
1313
|
-
},
|
|
1313
|
+
}, vr = {
|
|
1314
1314
|
__name: "vs-map-catalog-item",
|
|
1315
1315
|
props: {
|
|
1316
1316
|
layer: {
|
|
@@ -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,
|
|
1338
|
-
return c(), p("div",
|
|
1339
|
-
|
|
1336
|
+
return (h, g) => {
|
|
1337
|
+
var l, d, v, a, u;
|
|
1338
|
+
return c(), p("div", ar, [
|
|
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", cr, [
|
|
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
|
-
}, null, 40,
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1350
|
+
}, null, 40, dr),
|
|
1351
|
+
s("div", ur, [
|
|
1352
|
+
i.value ? (c(), p("svg", pr, [...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", hr, [
|
|
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, fr),
|
|
1367
|
+
isNaN(n((a = e.layer) == null ? void 0 : a.count)) ? F("", !0) : (c(), p("div", gr, S(n((u = e.layer) == null ? void 0 : u.count)), 1))
|
|
1368
1368
|
])
|
|
1369
|
-
], 8,
|
|
1369
|
+
], 8, lr)
|
|
1370
1370
|
]);
|
|
1371
1371
|
};
|
|
1372
1372
|
}
|
|
1373
|
-
},
|
|
1373
|
+
}, mr = /* @__PURE__ */ N(vr, [["__scopeId", "data-v-b96f3537"]]), yr = {}, br = {
|
|
1374
1374
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1375
1375
|
width: "16",
|
|
1376
1376
|
height: "16",
|
|
@@ -1382,26 +1382,26 @@ const st = /* @__PURE__ */ H(tr, [["render", rr]]), sr = { class: "hover:bg-gray
|
|
|
1382
1382
|
"stroke-linejoin": "round",
|
|
1383
1383
|
class: "lucide lucide-zoom-in"
|
|
1384
1384
|
};
|
|
1385
|
-
function
|
|
1386
|
-
return c(), p("svg",
|
|
1387
|
-
|
|
1385
|
+
function wr(e, t) {
|
|
1386
|
+
return c(), p("svg", br, [...t[0] || (t[0] = [
|
|
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
|
|
1412
|
+
const xr = /* @__PURE__ */ N(yr, [["render", wr]]), _r = {}, kr = {
|
|
1413
1413
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1414
1414
|
width: "16",
|
|
1415
1415
|
height: "16",
|
|
@@ -1421,18 +1421,18 @@ const yr = /* @__PURE__ */ H(gr, [["render", mr]]), br = {}, wr = {
|
|
|
1421
1421
|
"stroke-linejoin": "round",
|
|
1422
1422
|
class: "lucide lucide-info"
|
|
1423
1423
|
};
|
|
1424
|
-
function
|
|
1425
|
-
return c(), p("svg",
|
|
1426
|
-
|
|
1424
|
+
function Lr(e, t) {
|
|
1425
|
+
return c(), p("svg", kr, [...t[0] || (t[0] = [
|
|
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
|
|
1435
|
+
const Cr = /* @__PURE__ */ N(_r, [["render", Lr]]), $r = {}, Ir = {
|
|
1436
1436
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1437
1437
|
width: "16",
|
|
1438
1438
|
height: "16",
|
|
@@ -1444,21 +1444,21 @@ const _r = /* @__PURE__ */ H(br, [["render", xr]]), kr = {}, Lr = {
|
|
|
1444
1444
|
"stroke-linejoin": "round",
|
|
1445
1445
|
class: "lucide lucide-table"
|
|
1446
1446
|
};
|
|
1447
|
-
function
|
|
1448
|
-
return c(), p("svg",
|
|
1449
|
-
|
|
1450
|
-
|
|
1447
|
+
function Vr(e, t) {
|
|
1448
|
+
return c(), p("svg", Ir, [...t[0] || (t[0] = [
|
|
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
|
|
1461
|
+
const Sr = /* @__PURE__ */ N($r, [["render", Vr]]), Fr = {}, jr = {
|
|
1462
1462
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1463
1463
|
width: "16",
|
|
1464
1464
|
height: "16",
|
|
@@ -1470,12 +1470,12 @@ const $r = /* @__PURE__ */ H(kr, [["render", Cr]]), Ir = {}, Vr = {
|
|
|
1470
1470
|
"stroke-linejoin": "round",
|
|
1471
1471
|
class: "lucide lucide-trash2"
|
|
1472
1472
|
};
|
|
1473
|
-
function
|
|
1474
|
-
return c(), p("svg",
|
|
1475
|
-
|
|
1473
|
+
function Pr(e, t) {
|
|
1474
|
+
return c(), p("svg", jr, [...t[0] || (t[0] = [
|
|
1475
|
+
Oe('<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
|
|
1478
|
+
const Er = /* @__PURE__ */ N(Fr, [["render", Pr]]), Mr = {}, Tr = {
|
|
1479
1479
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1480
1480
|
width: "18",
|
|
1481
1481
|
height: "18",
|
|
@@ -1487,35 +1487,35 @@ const Fr = /* @__PURE__ */ H(Ir, [["render", Sr]]), jr = {}, Pr = {
|
|
|
1487
1487
|
"stroke-linejoin": "round",
|
|
1488
1488
|
class: "lucide lucide-more-vertical text-gray-600"
|
|
1489
1489
|
};
|
|
1490
|
-
function
|
|
1491
|
-
return c(), p("svg",
|
|
1492
|
-
|
|
1490
|
+
function zr(e, t) {
|
|
1491
|
+
return c(), p("svg", Tr, [...t[0] || (t[0] = [
|
|
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
|
|
1509
|
+
const Ar = /* @__PURE__ */ N(Mr, [["render", zr]]), Br = {}, Or = {
|
|
1510
1510
|
width: "6",
|
|
1511
1511
|
height: "10",
|
|
1512
1512
|
viewBox: "0 0 6 10",
|
|
1513
1513
|
fill: "none",
|
|
1514
1514
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1515
1515
|
};
|
|
1516
|
-
function
|
|
1517
|
-
return c(), p("svg",
|
|
1518
|
-
|
|
1516
|
+
function Dr(e, t) {
|
|
1517
|
+
return c(), p("svg", Or, [...t[0] || (t[0] = [
|
|
1518
|
+
s("path", {
|
|
1519
1519
|
d: "M1 9L5 5L1 1",
|
|
1520
1520
|
stroke: "currentColor",
|
|
1521
1521
|
"stroke-linecap": "round",
|
|
@@ -1523,42 +1523,42 @@ function Ar(e, t) {
|
|
|
1523
1523
|
}, null, -1)
|
|
1524
1524
|
])]);
|
|
1525
1525
|
}
|
|
1526
|
-
const
|
|
1526
|
+
const Ur = /* @__PURE__ */ N(Br, [["render", Dr]]), Rr = {}, Hr = {
|
|
1527
1527
|
width: "18",
|
|
1528
1528
|
height: "18",
|
|
1529
1529
|
viewBox: "0 0 24 24",
|
|
1530
1530
|
fill: "none",
|
|
1531
1531
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1532
1532
|
};
|
|
1533
|
-
function
|
|
1534
|
-
return c(), p("svg",
|
|
1535
|
-
|
|
1533
|
+
function Nr(e, t) {
|
|
1534
|
+
return c(), p("svg", Hr, [...t[0] || (t[0] = [
|
|
1535
|
+
Oe('<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
|
|
1539
|
-
function
|
|
1538
|
+
const Zr = /* @__PURE__ */ N(Rr, [["render", Nr]]);
|
|
1539
|
+
function Wr() {
|
|
1540
1540
|
const t = new URLSearchParams(window.location.search).get("layers");
|
|
1541
1541
|
return t ? t.split(",") : [];
|
|
1542
1542
|
}
|
|
1543
|
-
function
|
|
1543
|
+
function qr(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 Gr = {
|
|
1550
1550
|
components: {
|
|
1551
|
-
VsPopover:
|
|
1552
|
-
VsLayersItem:
|
|
1553
|
-
ZoomInIcon:
|
|
1554
|
-
InfoIcon:
|
|
1555
|
-
TableIcon:
|
|
1556
|
-
TrashIcon:
|
|
1557
|
-
DotsIcon:
|
|
1558
|
-
ChevronRightIcon:
|
|
1559
|
-
FilterIcon:
|
|
1560
|
-
closeIcon:
|
|
1561
|
-
searchIcon:
|
|
1551
|
+
VsPopover: Se,
|
|
1552
|
+
VsLayersItem: mr,
|
|
1553
|
+
ZoomInIcon: xr,
|
|
1554
|
+
InfoIcon: Cr,
|
|
1555
|
+
TableIcon: Sr,
|
|
1556
|
+
TrashIcon: Er,
|
|
1557
|
+
DotsIcon: Ar,
|
|
1558
|
+
ChevronRightIcon: Ur,
|
|
1559
|
+
FilterIcon: Zr,
|
|
1560
|
+
closeIcon: nt,
|
|
1561
|
+
searchIcon: rt
|
|
1562
1562
|
},
|
|
1563
1563
|
props: {
|
|
1564
1564
|
center: { type: Array, default: () => [26.2516, 50.6199] },
|
|
@@ -1591,17 +1591,17 @@ const Wr = {
|
|
|
1591
1591
|
},
|
|
1592
1592
|
async mounted() {
|
|
1593
1593
|
if (this.mounted = !0, await this.getLayers(), this.categories = this.layersCategories(), this.history) {
|
|
1594
|
-
const e =
|
|
1594
|
+
const e = Wr();
|
|
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), xe(this.map, o);
|
|
1605
1605
|
}
|
|
1606
1606
|
}), this.activeView = "selected");
|
|
1607
1607
|
}
|
|
@@ -1619,7 +1619,7 @@ const Wr = {
|
|
|
1619
1619
|
// --- HISTORY: оновлення layers у URL ---
|
|
1620
1620
|
selectedLayers: {
|
|
1621
1621
|
handler(e) {
|
|
1622
|
-
this.history &&
|
|
1622
|
+
this.history && qr(e.map((t) => t.id));
|
|
1623
1623
|
},
|
|
1624
1624
|
deep: !0
|
|
1625
1625
|
}
|
|
@@ -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), xe(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), Ie(this.map, e.id);
|
|
1677
1677
|
},
|
|
1678
1678
|
async toggleLayerVisibility(e) {
|
|
1679
1679
|
try {
|
|
1680
|
-
e.visible ? (await
|
|
1680
|
+
e.visible ? (await xe(this.map, e), this.updateLayerOpacity(e)) : await Ie(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 Ie(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 Ie(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,38 +1802,38 @@ const Wr = {
|
|
|
1802
1802
|
this.draggedLayerIndex = null;
|
|
1803
1803
|
}
|
|
1804
1804
|
}
|
|
1805
|
-
},
|
|
1805
|
+
}, Jr = { 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" }, Yr = { class: "flex items-center gap-2" }, Kr = { class: "text-lg font-semibold text-gray-800" }, Xr = { key: 0 }, es = { key: 1 }, ts = { class: "flex mb-4 border-b border-gray-200" }, os = { key: 0 }, rs = { class: "mb-4" }, ss = {
|
|
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
|
+
}, ns = ["onDragstart", "onDragover", "onDrop"], is = { class: "flex items-center justify-between" }, as = { class: "flex items-center gap-2 cursor-move" }, ls = ["onUpdate:modelValue", "onChange"], cs = { class: "text-gray-800" }, ds = { class: "flex items-center gap-2" }, us = { class: "relative" }, ps = { class: "flex items-center gap-2" }, hs = ["onUpdate:modelValue", "onInput"], fs = { class: "text-xs text-gray-600 whitespace-nowrap" }, gs = ["onClick"], vs = { class: "relative" }, ms = { class: "w-48" }, ys = {
|
|
1809
1809
|
key: 0,
|
|
1810
1810
|
class: "my-1 border-gray-200"
|
|
1811
|
-
},
|
|
1811
|
+
}, bs = ["disabled", "onClick"], ws = {
|
|
1812
1812
|
class: "p-1 rounded-full hover:bg-gray-100 transition-colors",
|
|
1813
1813
|
"aria-label": "Layer actions"
|
|
1814
|
-
},
|
|
1814
|
+
}, xs = {
|
|
1815
1815
|
key: 0,
|
|
1816
1816
|
class: "bg-blue-50 rounded-md mt-2"
|
|
1817
|
-
},
|
|
1817
|
+
}, _s = { class: "px-2 pt-2 text-blue-600 hover:text-blue-700 transition-colors" }, ks = {
|
|
1818
1818
|
key: 0,
|
|
1819
1819
|
class: "text-center text-[14px] text-[#4b5563]"
|
|
1820
|
-
},
|
|
1820
|
+
}, Ls = { class: "relative mt-[10px]" }, Cs = {
|
|
1821
1821
|
key: 0,
|
|
1822
1822
|
class: "vs-layers-catalog__list flex-1 scrollable-container overflow-auto mt-2 catalog-list"
|
|
1823
|
-
},
|
|
1823
|
+
}, $s = {
|
|
1824
1824
|
key: 0,
|
|
1825
1825
|
class: "text-center text-[14px] text-[#4b5563]"
|
|
1826
|
-
},
|
|
1826
|
+
}, Is = {
|
|
1827
1827
|
key: 0,
|
|
1828
1828
|
class: "text-center text-[14px] text-[#4b5563]"
|
|
1829
|
-
},
|
|
1830
|
-
function
|
|
1831
|
-
var
|
|
1832
|
-
const
|
|
1833
|
-
return c(), p("div",
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
t[7] || (t[7] =
|
|
1829
|
+
}, Vs = ["onClick"], Ss = { class: "flex items-center gap-x-3" }, Fs = ["title"], js = { class: "text-xs opacity-60 text-[#4b5563]" };
|
|
1830
|
+
function Ps(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", Jr, [
|
|
1834
|
+
s("div", Qr, [
|
|
1835
|
+
s("div", Yr, [
|
|
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
|
-
ae(S(
|
|
1854
|
-
|
|
1852
|
+
s("h2", Kr, [
|
|
1853
|
+
ae(S(i.activeView === "catalog" ? "Каталог" : "Вибрані шари") + " ", 1),
|
|
1854
|
+
i.activeView === "catalog" ? (c(), p("span", Xr, "(" + S(((u = i.layers) == null ? void 0 : u.length) || 0) + ")", 1)) : (c(), p("span", es, "(" + 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
|
+
Oe('<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
|
-
|
|
1867
|
-
class:
|
|
1865
|
+
s("div", ts, [
|
|
1866
|
+
s("button", {
|
|
1867
|
+
class: Y([
|
|
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
|
-
|
|
1874
|
-
class:
|
|
1873
|
+
s("button", {
|
|
1874
|
+
class: Y([
|
|
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", os, [
|
|
1882
|
+
s("div", rs, [
|
|
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,87 +1896,87 @@ 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", ss, [
|
|
1906
|
+
(c(!0), p(z, null, W(i.selectedLayers, (f, L) => {
|
|
1907
|
+
var j, O;
|
|
1908
1908
|
return c(), p("div", {
|
|
1909
1909
|
key: f.id || L,
|
|
1910
|
-
class:
|
|
1910
|
+
class: Y(["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: bt((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", is, [
|
|
1918
|
+
s("div", as, [
|
|
1919
|
+
t[10] || (t[10] = Oe('<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) =>
|
|
1925
|
-
}, null, 40,
|
|
1924
|
+
onChange: (k) => n.toggleLayerVisibility(f)
|
|
1925
|
+
}, null, 40, ls), [
|
|
1926
1926
|
[qe, f.visible]
|
|
1927
1927
|
]),
|
|
1928
|
-
|
|
1928
|
+
s("span", cs, S(f.name || f.title || f.label), 1)
|
|
1929
1929
|
]),
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
reference:
|
|
1934
|
-
|
|
1930
|
+
s("div", ds, [
|
|
1931
|
+
s("div", us, [
|
|
1932
|
+
Z(m, { placement: "bottom" }, {
|
|
1933
|
+
reference: q(() => [
|
|
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) =>
|
|
1937
|
-
}, S(f.opacity || 100) + "% ", 9,
|
|
1936
|
+
onClick: (k) => n.updateLayerOpacity(f)
|
|
1937
|
+
}, S(f.opacity || 100) + "% ", 9, gs)
|
|
1938
1938
|
]),
|
|
1939
|
-
default:
|
|
1940
|
-
|
|
1941
|
-
t[11] || (t[11] =
|
|
1942
|
-
|
|
1939
|
+
default: q(() => [
|
|
1940
|
+
s("div", ps, [
|
|
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
|
-
}, null, 40,
|
|
1951
|
-
[
|
|
1950
|
+
}, null, 40, hs), [
|
|
1951
|
+
[Ze, f.opacity]
|
|
1952
1952
|
]),
|
|
1953
|
-
|
|
1953
|
+
s("span", fs, 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", vs, [
|
|
1960
|
+
Z(m, { placement: "bottom" }, {
|
|
1961
|
+
reference: q(() => [
|
|
1962
|
+
s("div", ws, [
|
|
1963
|
+
Z(h)
|
|
1964
1964
|
])
|
|
1965
1965
|
]),
|
|
1966
|
-
default:
|
|
1967
|
-
|
|
1968
|
-
(c(!0), p(
|
|
1969
|
-
k.divider ? (c(), p("hr",
|
|
1966
|
+
default: q(() => [
|
|
1967
|
+
s("div", ms, [
|
|
1968
|
+
(c(!0), p(z, null, W(n.popoverActions(f), (k, _) => (c(), p(z, { key: _ }, [
|
|
1969
|
+
k.divider ? (c(), p("hr", ys)) : (c(), p("button", {
|
|
1970
1970
|
key: 1,
|
|
1971
|
-
class:
|
|
1971
|
+
class: Y(
|
|
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(),
|
|
1977
|
+
(c(), K(De(k.icon), { class: "lucide" })),
|
|
1978
1978
|
ae(" " + S(k.label), 1)
|
|
1979
|
-
], 10,
|
|
1979
|
+
], 10, bs))
|
|
1980
1980
|
], 64))), 128))
|
|
1981
1981
|
])
|
|
1982
1982
|
]),
|
|
@@ -1985,9 +1985,9 @@ function Ss(e, t, o, s, n, i) {
|
|
|
1985
1985
|
])
|
|
1986
1986
|
])
|
|
1987
1987
|
]),
|
|
1988
|
-
f.showFilters ? (c(), p("div",
|
|
1989
|
-
|
|
1990
|
-
|
|
1988
|
+
f.showFilters ? (c(), p("div", xs, [
|
|
1989
|
+
s("div", _s, " Фільтри для шару: " + 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
|
+
[Ee, (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
|
+
[Ee, !((O = f.filters) != null && O.length)]
|
|
2006
2006
|
])
|
|
2007
2007
|
])) : F("", !0)
|
|
2008
|
-
], 42,
|
|
2008
|
+
], 42, ns);
|
|
2009
2009
|
}), 128)),
|
|
2010
|
-
|
|
2011
|
-
|
|
2010
|
+
i.selectedLayers.length === 0 ? (c(), p("div", ks, [...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", Ls, [
|
|
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] = wt((...f) => n.onEnter && n.onEnter(...f), ["enter"]))
|
|
2023
2023
|
}, null, 544), [
|
|
2024
|
-
[
|
|
2024
|
+
[Ze, 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(), K(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", Cs, [
|
|
2038
|
+
i.search ? (c(), p(z, { key: 0 }, [
|
|
2039
|
+
(c(!0), p(z, null, W(n.searchedLayers, (f, L) => (c(), K(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", $s, " Нічого не знайдено ")) : F("", !0)
|
|
2048
|
+
], 64)) : (c(), p(z, { key: 1 }, [
|
|
2049
|
+
!i.categories || Object.keys(i.categories).length === 0 ? (c(), p("div", Is, " Каталог порожній ")) : (c(!0), p(z, { key: 1 }, W(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
|
-
|
|
2056
|
-
class:
|
|
2057
|
-
"rotate-up": f ===
|
|
2058
|
-
"rotate-down": f !==
|
|
2054
|
+
s("div", Ss, [
|
|
2055
|
+
Z(a, {
|
|
2056
|
+
class: Y({
|
|
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
|
-
}, S(f), 9,
|
|
2064
|
+
}, S(f), 9, Fs)
|
|
2065
2065
|
]),
|
|
2066
|
-
|
|
2067
|
-
], 8,
|
|
2068
|
-
|
|
2069
|
-
(c(!0), p(
|
|
2066
|
+
s("div", js, S(n.formatNumber(i.categories[f].length)), 1)
|
|
2067
|
+
], 8, Vs),
|
|
2068
|
+
se(s("div", null, [
|
|
2069
|
+
(c(!0), p(z, null, W(i.categories[f], (L, j) => (c(), K(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
|
+
[Ee, f === i.selectedCategory]
|
|
2079
2079
|
])
|
|
2080
2080
|
]))), 128))
|
|
2081
2081
|
], 64))
|
|
@@ -2083,13 +2083,13 @@ function Ss(e, t, o, s, n, i) {
|
|
|
2083
2083
|
], 64))
|
|
2084
2084
|
]);
|
|
2085
2085
|
}
|
|
2086
|
-
const
|
|
2086
|
+
const Es = /* @__PURE__ */ N(Gr, [["render", Ps], ["__scopeId", "data-v-e9e7021a"]]), Ms = {
|
|
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
|
+
}, Ts = {
|
|
2090
2090
|
key: 0,
|
|
2091
2091
|
class: "p-5 pb-3 flex justify-between items-center"
|
|
2092
|
-
},
|
|
2092
|
+
}, zs = { class: "inline-block font-semibold text-lg text-gray-800 dark:text-neutral-200" }, As = { class: "flex flex-col justify-between h-full" }, Bs = {
|
|
2093
2093
|
__name: "vs-filters-widget",
|
|
2094
2094
|
props: {
|
|
2095
2095
|
config: {
|
|
@@ -2106,47 +2106,47 @@ 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 (
|
|
2130
|
-
e.config.title ? (c(), p("div",
|
|
2131
|
-
|
|
2129
|
+
return (m, h) => i.value ? (c(), p("div", Ms, [
|
|
2130
|
+
e.config.title ? (c(), p("div", Ts, [
|
|
2131
|
+
s("h2", zs, S(e.config.title), 1)
|
|
2132
2132
|
])) : F("", !0),
|
|
2133
|
-
|
|
2134
|
-
|
|
2133
|
+
s("div", As, [
|
|
2134
|
+
Z(We(Lt), {
|
|
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);
|
|
2142
2142
|
}
|
|
2143
|
-
},
|
|
2143
|
+
}, Os = {
|
|
2144
2144
|
type: "button",
|
|
2145
2145
|
class: "py-2 px-2.5 inline-flex items-center gap-x-1.5 text-sm font-medium rounded-lg bg-white text-gray-800 hover:bg-gray-50 focus:outline-none focus:bg-gray-49 h-[38px] shadow-md"
|
|
2146
|
-
},
|
|
2146
|
+
}, Ds = { class: "flex gap-[5px] items-center" }, Us = { class: "text-gray-600" }, Rs = {
|
|
2147
2147
|
key: 0,
|
|
2148
2148
|
class: "w-[16px] h-[16px] font-medium bg-gray-800 text-white rounded-full flex items-center justify-center text-[10px]"
|
|
2149
|
-
},
|
|
2149
|
+
}, Hs = {
|
|
2150
2150
|
__name: "vs-inline-filters-widget",
|
|
2151
2151
|
props: {
|
|
2152
2152
|
config: {
|
|
@@ -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(), K(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: q(({ 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: q(() => [
|
|
2239
|
+
s("button", Os, [
|
|
2240
|
+
s("div", Ds, [
|
|
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", Us, S(h.value), 1),
|
|
2268
|
+
r.value ? (c(), p("span", Rs, S(r.value), 1)) : F("", !0)
|
|
2269
2269
|
])
|
|
2270
2270
|
])
|
|
2271
2271
|
]),
|
|
2272
|
-
default:
|
|
2273
|
-
|
|
2272
|
+
default: q(() => [
|
|
2273
|
+
d[1] || (d[1] = ae(" Відкрити бокову панель ", -1))
|
|
2274
2274
|
]),
|
|
2275
2275
|
_: 1
|
|
2276
2276
|
})
|
|
@@ -2279,7 +2279,7 @@ const Fs = /* @__PURE__ */ H(Wr, [["render", Ss], ["__scopeId", "data-v-e9e7021a
|
|
|
2279
2279
|
}, 8, ["isDialog", "scheme"])) : F("", !0);
|
|
2280
2280
|
};
|
|
2281
2281
|
}
|
|
2282
|
-
},
|
|
2282
|
+
}, Ns = {
|
|
2283
2283
|
name: "VsListWidget",
|
|
2284
2284
|
props: {
|
|
2285
2285
|
config: {
|
|
@@ -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);
|
|
@@ -2327,100 +2327,100 @@ const Fs = /* @__PURE__ */ H(Wr, [["render", Ss], ["__scopeId", "data-v-e9e7021a
|
|
|
2327
2327
|
beforeUnmount() {
|
|
2328
2328
|
this.resizeObserver && this.$refs.rootEl && (this.resizeObserver.unobserve(this.$refs.rootEl), this.resizeObserver.disconnect());
|
|
2329
2329
|
}
|
|
2330
|
-
},
|
|
2330
|
+
}, Zs = {
|
|
2331
2331
|
class: "bg-white p-4 rounded-lg h-full flex flex-col overflow-hidden",
|
|
2332
2332
|
ref: "rootEl"
|
|
2333
|
-
},
|
|
2333
|
+
}, Ws = {
|
|
2334
2334
|
key: 0,
|
|
2335
2335
|
class: "flex flex-col flex-1 overflow-hidden"
|
|
2336
|
-
},
|
|
2336
|
+
}, qs = { 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" }, Gs = ["onClick"], Js = { class: "text-base font-medium" }, Qs = { class: "mt-2 flex flex-wrap gap-2" }, Ys = {
|
|
2337
2337
|
key: 1,
|
|
2338
2338
|
class: "px-2 py-1 text-sm bg-gray-100 rounded-full"
|
|
2339
|
-
},
|
|
2339
|
+
}, Ks = {
|
|
2340
2340
|
key: 0,
|
|
2341
2341
|
class: "my-5 pr-2"
|
|
2342
|
-
},
|
|
2342
|
+
}, Xs = { class: "paginationWrapper relative flex justify-center" }, en = {
|
|
2343
2343
|
key: 1,
|
|
2344
2344
|
class: "text-center text-slate-400"
|
|
2345
2345
|
};
|
|
2346
|
-
function
|
|
2347
|
-
var
|
|
2348
|
-
const
|
|
2349
|
-
return c(), p("div",
|
|
2350
|
-
t[0] || (t[0] =
|
|
2351
|
-
((
|
|
2352
|
-
|
|
2353
|
-
(c(!0), p(
|
|
2346
|
+
function tn(e, t, r, o, i, n) {
|
|
2347
|
+
var h;
|
|
2348
|
+
const m = J("VsPagination");
|
|
2349
|
+
return c(), p("div", Zs, [
|
|
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", Ws, [
|
|
2352
|
+
s("div", qs, [
|
|
2353
|
+
(c(!0), p(z, null, W(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", Js, S(g.name), 1),
|
|
2359
|
+
s("div", Qs, [
|
|
2360
2360
|
g.status_data ? (c(), p("span", {
|
|
2361
2361
|
key: 0,
|
|
2362
|
-
class:
|
|
2362
|
+
class: Y(["px-2 py-1 text-sm rounded-full", {
|
|
2363
2363
|
"bg-green-100 text-green-800": g.status_data.color === "green",
|
|
2364
2364
|
"bg-red-100 text-red-800": g.status_data.color === "red"
|
|
2365
2365
|
}])
|
|
2366
2366
|
}, S(g.status_data.text), 3)) : F("", !0),
|
|
2367
|
-
g.class_mbd_id_data ? (c(), p("span",
|
|
2367
|
+
g.class_mbd_id_data ? (c(), p("span", Ys, S(g.class_mbd_id_data.text), 1)) : F("", !0)
|
|
2368
2368
|
])
|
|
2369
|
-
], 8,
|
|
2369
|
+
], 8, Gs))), 128))
|
|
2370
2370
|
]),
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
total:
|
|
2371
|
+
i.total > i.limit ? (c(), p("div", Ks, [
|
|
2372
|
+
s("div", Xs, [
|
|
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
|
-
])) : (c(), p("div",
|
|
2388
|
+
])) : (c(), p("div", en, "Немає даних"))
|
|
2389
2389
|
], 512);
|
|
2390
2390
|
}
|
|
2391
|
-
const
|
|
2391
|
+
const on = /* @__PURE__ */ N(Ns, [["render", tn]]), rn = { class: "map-skeleton-loader" }, sn = {
|
|
2392
2392
|
__name: "vs-skeleton-loader",
|
|
2393
2393
|
setup(e) {
|
|
2394
|
-
return (t,
|
|
2395
|
-
|
|
2394
|
+
return (t, r) => (c(), p("div", rn, [...r[0] || (r[0] = [
|
|
2395
|
+
s("div", { class: "dot-pulse" }, null, -1)
|
|
2396
2396
|
])]));
|
|
2397
2397
|
}
|
|
2398
|
-
},
|
|
2398
|
+
}, nn = /* @__PURE__ */ N(sn, [["__scopeId", "data-v-954c1e03"]]), an = {}, ln = {
|
|
2399
2399
|
width: "24",
|
|
2400
2400
|
height: "24",
|
|
2401
2401
|
viewBox: "0 0 24 24",
|
|
2402
2402
|
fill: "none",
|
|
2403
2403
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2404
2404
|
};
|
|
2405
|
-
function
|
|
2406
|
-
return c(), p("svg",
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2405
|
+
function cn(e, t) {
|
|
2406
|
+
return c(), p("svg", ln, [...t[0] || (t[0] = [
|
|
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,9 +2429,9 @@ function nn(e, t) {
|
|
|
2429
2429
|
}, null, -1)
|
|
2430
2430
|
])]);
|
|
2431
2431
|
}
|
|
2432
|
-
const
|
|
2432
|
+
const dn = /* @__PURE__ */ N(an, [["render", cn]]), un = {
|
|
2433
2433
|
components: {
|
|
2434
|
-
homeIcon:
|
|
2434
|
+
homeIcon: dn
|
|
2435
2435
|
},
|
|
2436
2436
|
name: "vs-homezoom",
|
|
2437
2437
|
props: {
|
|
@@ -2445,54 +2445,54 @@ const an = /* @__PURE__ */ H(rn, [["render", nn]]), ln = {
|
|
|
2445
2445
|
},
|
|
2446
2446
|
computed: {}
|
|
2447
2447
|
};
|
|
2448
|
-
function
|
|
2449
|
-
const
|
|
2448
|
+
function pn(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: q(() => [
|
|
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: q(() => [
|
|
2464
|
+
t[0] || (t[0] = s("div", null, "Повернутися до початкових налаштувань", -1))
|
|
2465
2465
|
]),
|
|
2466
2466
|
_: 1
|
|
2467
2467
|
})
|
|
2468
2468
|
]);
|
|
2469
2469
|
}
|
|
2470
|
-
const
|
|
2470
|
+
const hn = /* @__PURE__ */ N(un, [["render", pn]]), fn = {}, gn = {
|
|
2471
2471
|
width: "24",
|
|
2472
2472
|
height: "24",
|
|
2473
2473
|
viewBox: "0 0 24 24",
|
|
2474
2474
|
fill: "none",
|
|
2475
2475
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2476
2476
|
};
|
|
2477
|
-
function
|
|
2478
|
-
return c(), p("svg",
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2477
|
+
function vn(e, t) {
|
|
2478
|
+
return c(), p("svg", gn, [...t[0] || (t[0] = [
|
|
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
|
|
2504
|
+
const mn = /* @__PURE__ */ N(fn, [["render", vn]]), yn = {
|
|
2505
2505
|
components: {
|
|
2506
|
-
printIcon:
|
|
2507
|
-
VsPopover:
|
|
2506
|
+
printIcon: mn,
|
|
2507
|
+
VsPopover: Se
|
|
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
|
|
2622
|
-
const
|
|
2623
|
-
return c(),
|
|
2621
|
+
function bn(e, t, r, o, i, n) {
|
|
2622
|
+
const m = J("printIcon"), h = J("VsPopover");
|
|
2623
|
+
return c(), K(h, {
|
|
2624
2624
|
trigger: "hover",
|
|
2625
2625
|
placement: "left",
|
|
2626
2626
|
teleport: "body"
|
|
2627
2627
|
}, {
|
|
2628
|
-
reference:
|
|
2629
|
-
|
|
2630
|
-
onClick:
|
|
2631
|
-
class:
|
|
2628
|
+
reference: q(() => [
|
|
2629
|
+
Z(m, {
|
|
2630
|
+
onClick: n.togglePrint,
|
|
2631
|
+
class: Y([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: q(() => [
|
|
2635
|
+
t[0] || (t[0] = s("div", null, "Надрукувати", -1))
|
|
2636
2636
|
]),
|
|
2637
2637
|
_: 1
|
|
2638
2638
|
});
|
|
2639
2639
|
}
|
|
2640
|
-
const
|
|
2640
|
+
const wn = /* @__PURE__ */ N(yn, [["render", bn]]), xn = {
|
|
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: Se
|
|
2654
2654
|
},
|
|
2655
2655
|
mounted() {
|
|
2656
2656
|
this.map.on("move", this.updateViewStatus), this.updateViewStatus();
|
|
@@ -2675,93 +2675,93 @@ const mn = /* @__PURE__ */ H(gn, [["render", vn]]), yn = {
|
|
|
2675
2675
|
}
|
|
2676
2676
|
}
|
|
2677
2677
|
};
|
|
2678
|
-
function
|
|
2679
|
-
const
|
|
2680
|
-
return c(),
|
|
2678
|
+
function _n(e, t, r, o, i, n) {
|
|
2679
|
+
const m = J("VsPopover");
|
|
2680
|
+
return c(), K(m, {
|
|
2681
2681
|
trigger: "hover",
|
|
2682
2682
|
placement: "left",
|
|
2683
2683
|
teleport: "body",
|
|
2684
2684
|
class: "flex"
|
|
2685
2685
|
}, {
|
|
2686
|
-
reference:
|
|
2687
|
-
|
|
2686
|
+
reference: q(() => [
|
|
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: q(() => [
|
|
2693
|
+
t[1] || (t[1] = s("div", null, "Перемикач виду", -1))
|
|
2694
2694
|
]),
|
|
2695
2695
|
_: 1
|
|
2696
2696
|
});
|
|
2697
2697
|
}
|
|
2698
|
-
const
|
|
2698
|
+
const kn = /* @__PURE__ */ N(xn, [["render", _n]]), Ln = {
|
|
2699
2699
|
props: {
|
|
2700
2700
|
bgColor: {
|
|
2701
2701
|
type: String,
|
|
2702
2702
|
default: "#1E40AF"
|
|
2703
2703
|
}
|
|
2704
2704
|
}
|
|
2705
|
-
},
|
|
2705
|
+
}, Cn = {
|
|
2706
2706
|
width: "24",
|
|
2707
2707
|
height: "24",
|
|
2708
2708
|
viewBox: "0 0 24 24",
|
|
2709
2709
|
fill: "none",
|
|
2710
2710
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2711
|
-
},
|
|
2712
|
-
function
|
|
2713
|
-
return c(), p("svg",
|
|
2714
|
-
t[0] || (t[0] =
|
|
2715
|
-
t[1] || (t[1] =
|
|
2716
|
-
|
|
2711
|
+
}, $n = ["stroke"], In = ["stroke"], Vn = ["stroke"], Sn = ["stroke"], Fn = ["stroke"], jn = ["stroke"];
|
|
2712
|
+
function Pn(e, t, r, o, i, n) {
|
|
2713
|
+
return c(), p("svg", Cn, [
|
|
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
|
-
}, null, 8,
|
|
2723
|
-
|
|
2722
|
+
}, null, 8, $n),
|
|
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
|
-
}, null, 8,
|
|
2730
|
-
|
|
2729
|
+
}, null, 8, In),
|
|
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
|
-
}, null, 8,
|
|
2737
|
-
|
|
2736
|
+
}, null, 8, Vn),
|
|
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
|
-
}, null, 8,
|
|
2744
|
-
|
|
2743
|
+
}, null, 8, Sn),
|
|
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
|
-
}, null, 8,
|
|
2751
|
-
|
|
2750
|
+
}, null, 8, Fn),
|
|
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
|
-
}, null, 8,
|
|
2757
|
+
}, null, 8, jn)
|
|
2758
2758
|
]);
|
|
2759
2759
|
}
|
|
2760
|
-
const
|
|
2760
|
+
const En = /* @__PURE__ */ N(Ln, [["render", Pn]]), Mn = {
|
|
2761
2761
|
components: {
|
|
2762
|
-
geoIcon:
|
|
2763
|
-
VsPopover:
|
|
2764
|
-
closeIcon:
|
|
2762
|
+
geoIcon: En,
|
|
2763
|
+
VsPopover: Se,
|
|
2764
|
+
closeIcon: nt
|
|
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;
|
|
@@ -2836,70 +2836,70 @@ const Fn = /* @__PURE__ */ H(xn, [["render", Sn]]), jn = {
|
|
|
2836
2836
|
}), this.$emit("close");
|
|
2837
2837
|
}
|
|
2838
2838
|
}
|
|
2839
|
-
},
|
|
2839
|
+
}, Tn = {
|
|
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
|
-
},
|
|
2843
|
-
function
|
|
2844
|
-
var l,
|
|
2845
|
-
const
|
|
2842
|
+
}, zn = { class: "flex justify-between items-center border-b pb-[16px]" }, An = { class: "d-flex" }, Bn = { class: "pt-[16px]" };
|
|
2843
|
+
function On(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(),
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
t[0] || (t[0] =
|
|
2851
|
-
|
|
2852
|
-
|
|
2847
|
+
(c(), K(Xe, { to: "#maplibre-demo-map" }, [
|
|
2848
|
+
i.location ? (c(), p("div", Tn, [
|
|
2849
|
+
s("div", zn, [
|
|
2850
|
+
t[0] || (t[0] = s("div", { class: "text-lg font-semibold" }, "Ваша геолокація", -1)),
|
|
2851
|
+
s("div", An, [
|
|
2852
|
+
Z(m, { onClick: n.closeGeolocation }, null, 8, ["onClick"])
|
|
2853
2853
|
])
|
|
2854
2854
|
]),
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
t[1] || (t[1] =
|
|
2858
|
-
ae(" " + S((l =
|
|
2855
|
+
s("div", Bn, [
|
|
2856
|
+
s("div", null, [
|
|
2857
|
+
t[1] || (t[1] = s("strong", null, "Широта:", -1)),
|
|
2858
|
+
ae(" " + S((l = i.location) == null ? void 0 : l.latitude), 1)
|
|
2859
2859
|
]),
|
|
2860
|
-
|
|
2861
|
-
t[2] || (t[2] =
|
|
2862
|
-
ae(" " + S((
|
|
2860
|
+
s("div", null, [
|
|
2861
|
+
t[2] || (t[2] = s("strong", null, "Довгота:", -1)),
|
|
2862
|
+
ae(" " + S((d = i.location) == null ? void 0 : d.longitude), 1)
|
|
2863
2863
|
]),
|
|
2864
|
-
|
|
2865
|
-
t[3] || (t[3] =
|
|
2866
|
-
ae(" " + S((
|
|
2864
|
+
s("div", null, [
|
|
2865
|
+
t[3] || (t[3] = s("strong", null, "КраЇна:", -1)),
|
|
2866
|
+
ae(" " + S((v = i.data) == null ? void 0 : v.country), 1)
|
|
2867
2867
|
]),
|
|
2868
|
-
|
|
2869
|
-
t[4] || (t[4] =
|
|
2870
|
-
ae(" " + S((
|
|
2868
|
+
s("div", null, [
|
|
2869
|
+
t[4] || (t[4] = s("strong", null, "Код країни:", -1)),
|
|
2870
|
+
ae(" " + S((a = i.data) == null ? void 0 : a.country_code), 1)
|
|
2871
2871
|
]),
|
|
2872
|
-
|
|
2873
|
-
t[5] || (t[5] =
|
|
2874
|
-
ae(" " + S((
|
|
2872
|
+
s("div", null, [
|
|
2873
|
+
t[5] || (t[5] = s("strong", null, "Місто:", -1)),
|
|
2874
|
+
ae(" " + S((u = i.data) == null ? void 0 : u.city), 1)
|
|
2875
2875
|
]),
|
|
2876
|
-
|
|
2877
|
-
t[6] || (t[6] =
|
|
2878
|
-
ae(" " + S((f =
|
|
2876
|
+
s("div", null, [
|
|
2877
|
+
t[6] || (t[6] = s("strong", null, "Поштовий індекс:", -1)),
|
|
2878
|
+
ae(" " + 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:
|
|
2889
|
+
reference: q(() => [
|
|
2890
|
+
Z(h, {
|
|
2891
|
+
onClick: n.togleGeolocation,
|
|
2892
|
+
class: Y([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: q(() => [
|
|
2896
|
+
t[7] || (t[7] = s("div", null, "Дізнатися геолокацію", -1))
|
|
2897
2897
|
]),
|
|
2898
2898
|
_: 1
|
|
2899
2899
|
})
|
|
2900
2900
|
]);
|
|
2901
2901
|
}
|
|
2902
|
-
const
|
|
2902
|
+
const Dn = /* @__PURE__ */ N(Mn, [["render", On]]), Be = {
|
|
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 _e(() => {
|
|
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
|
+
}), xt(() => {
|
|
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, W(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(), K(De(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
|
+
[Ee, ((a = v.config) == null ? void 0 : a.visible) !== !1]
|
|
3001
3001
|
]) : F("", !0),
|
|
3002
|
-
e.cardValues &&
|
|
3002
|
+
e.cardValues && v.type === "card" ? (c(), K(st, {
|
|
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
|
-
},
|
|
3013
|
+
}, Un = { class: "map-widgets-flex" }, Rn = { class: "widgets-left" }, Hn = { class: "widgets-top" }, Nn = { class: "widgets-bottom" }, Zn = { class: "widgets-right" }, Wn = { class: "widgets-top" }, qn = { class: "widgets-bottom" }, Gn = { class: "absolute top-[180px] right-2 z-10 flex flex-col gap-[5px]" }, Jn = /* @__PURE__ */ Ge({
|
|
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 = _t(), 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, O = (b, y, x, I, w) => {
|
|
3036
|
+
const C = j(b, I), P = y ? j(y, I) : "";
|
|
3037
3037
|
let V = "";
|
|
3038
|
-
return x != null && x.length && (V = x.map((
|
|
3039
|
-
const
|
|
3038
|
+
return x != null && x.length && (V = x.map((R) => {
|
|
3039
|
+
const B = j(R.value, I);
|
|
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">${R.label}</td>
|
|
3043
|
+
<td class="text-right">${B}</td>
|
|
3044
3044
|
</tr>
|
|
3045
3045
|
`;
|
|
3046
3046
|
}).join("")), `
|
|
@@ -3060,21 +3060,21 @@ const An = /* @__PURE__ */ H(jn, [["render", zn]]), Ae = {
|
|
|
3060
3060
|
` : ""}
|
|
3061
3061
|
</div>
|
|
3062
3062
|
`;
|
|
3063
|
-
},
|
|
3064
|
-
legend:
|
|
3065
|
-
basemaps:
|
|
3066
|
-
layers:
|
|
3067
|
-
info:
|
|
3068
|
-
attribute:
|
|
3069
|
-
catalog:
|
|
3070
|
-
filters:
|
|
3071
|
-
"inline-filters":
|
|
3072
|
-
list:
|
|
3073
|
-
card:
|
|
3074
|
-
})[b],
|
|
3075
|
-
|
|
3063
|
+
}, k = (b) => ({
|
|
3064
|
+
legend: jt,
|
|
3065
|
+
basemaps: Tt,
|
|
3066
|
+
layers: ho,
|
|
3067
|
+
info: ko,
|
|
3068
|
+
attribute: rr,
|
|
3069
|
+
catalog: Es,
|
|
3070
|
+
filters: Bs,
|
|
3071
|
+
"inline-filters": Hs,
|
|
3072
|
+
list: on,
|
|
3073
|
+
card: st
|
|
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
|
|
3077
|
+
function ne() {
|
|
3078
3078
|
const b = new URLSearchParams(window.location.search), y = parseFloat(b.get("x")), x = parseFloat(b.get("y")), I = parseFloat(b.get("z")), w = parseFloat(b.get("bearing")), C = parseFloat(b.get("pitch"));
|
|
3079
3079
|
return {
|
|
3080
3080
|
center: isFinite(y) && isFinite(x) ? [y, x] : null,
|
|
@@ -3083,43 +3083,45 @@ const An = /* @__PURE__ */ H(jn, [["render", zn]]), Ae = {
|
|
|
3083
3083
|
pitch: isFinite(C) ? C : null
|
|
3084
3084
|
};
|
|
3085
3085
|
}
|
|
3086
|
-
function
|
|
3086
|
+
function ge({ center: b, zoom: y, bearing: x, pitch: I }) {
|
|
3087
3087
|
const w = new URLSearchParams(window.location.search);
|
|
3088
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", I.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, R;
|
|
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], I = 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 B = ne();
|
|
3104
|
+
B.center && (x = B.center), B.zoom !== null && (I = B.zoom), B.bearing !== null && (w = B.bearing), B.pitch !== null && (C = B.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
|
-
|
|
3119
|
-
|
|
3109
|
+
center: x,
|
|
3110
|
+
zoom: I,
|
|
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: I }), (R = (V = (P = a == null ? void 0 : a.value) == null ? void 0 : P.interactions) == null ? void 0 : V.navigation) != null && R.enabled && !f && (f = new maplibregl.NavigationControl(), o.value.addControl(f, "top-right")), o.value.on("load", async () => {
|
|
3117
|
+
var Ce, U, $e, Fe, Ke;
|
|
3118
|
+
i.value = !0;
|
|
3119
|
+
const B = ne(), Le = B.center && B.zoom !== null;
|
|
3120
|
+
if ((Ce = a.value.map) != null && Ce.bbox && !Le) {
|
|
3121
|
+
const [G, H, $, te] = a.value.map.bbox;
|
|
3120
3122
|
o.value.fitBounds(
|
|
3121
3123
|
[
|
|
3122
|
-
[
|
|
3124
|
+
[G, H],
|
|
3123
3125
|
[$, te]
|
|
3124
3126
|
],
|
|
3125
3127
|
{
|
|
@@ -3129,217 +3131,217 @@ const An = /* @__PURE__ */ H(jn, [["render", zn]]), Ae = {
|
|
|
3129
3131
|
);
|
|
3130
3132
|
}
|
|
3131
3133
|
if (await (async () => {
|
|
3132
|
-
var
|
|
3133
|
-
const
|
|
3134
|
-
(
|
|
3134
|
+
var H, $, te, oe, X;
|
|
3135
|
+
const G = ((X = (oe = (te = ($ = (H = a.value) == null ? void 0 : H.widgets) == null ? void 0 : $.find((M) => M.type === "layers")) == null ? void 0 : te.config) == null ? void 0 : oe.layers) == null ? void 0 : X.filter(
|
|
3136
|
+
(M) => {
|
|
3135
3137
|
var ce;
|
|
3136
|
-
return ((ce =
|
|
3138
|
+
return ((ce = M.style) == null ? void 0 : ce.attrType) === "icon-by-attribute";
|
|
3137
3139
|
}
|
|
3138
3140
|
)) || [];
|
|
3139
|
-
for (const
|
|
3140
|
-
const { rules: ce, default_icon:
|
|
3141
|
+
for (const M of G) {
|
|
3142
|
+
const { rules: ce, default_icon: me, icon_base_url: ye } = M.style, be = [...ce.map((re) => re.icon), me].filter(
|
|
3141
3143
|
Boolean
|
|
3142
3144
|
);
|
|
3143
|
-
for (const
|
|
3145
|
+
for (const re of be)
|
|
3144
3146
|
try {
|
|
3145
|
-
const de = `${
|
|
3146
|
-
o.value.hasImage(
|
|
3147
|
+
const de = `${ye}${re}`, we = await o.value.loadImage(de);
|
|
3148
|
+
o.value.hasImage(re) || o.value.addImage(re, we.data);
|
|
3147
3149
|
} catch (de) {
|
|
3148
|
-
console.error(`Failed to load icon: ${
|
|
3150
|
+
console.error(`Failed to load icon: ${re}`, de);
|
|
3149
3151
|
}
|
|
3150
3152
|
}
|
|
3151
|
-
})(), (
|
|
3152
|
-
var ce,
|
|
3153
|
-
const
|
|
3154
|
-
if (o.value && o.value.getCanvas && (o.value.getCanvas().style.cursor =
|
|
3155
|
-
if (
|
|
3156
|
-
const
|
|
3157
|
-
|
|
3153
|
+
})(), (Fe = ($e = (U = a.value) == null ? void 0 : U.interactions) == null ? void 0 : $e.hover) != null && Fe.enabled && (o.value.on("mousemove", (G) => {
|
|
3154
|
+
var ce, me, ye, be, re, de, we, je, Q, Ae;
|
|
3155
|
+
const H = o.value.queryRenderedFeatures(G.point);
|
|
3156
|
+
if (o.value && o.value.getCanvas && (o.value.getCanvas().style.cursor = H.length ? "pointer" : ""), !H.length) {
|
|
3157
|
+
if (h.value) {
|
|
3158
|
+
const D = (ce = o.value.getSource(
|
|
3159
|
+
h.value.source
|
|
3158
3160
|
)) == null ? void 0 : ce.type;
|
|
3159
|
-
|
|
3161
|
+
h.value.source, h.value.id, D === "vector" && h.value.source, ve(
|
|
3160
3162
|
o.value,
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
+
h.value.source,
|
|
3164
|
+
h.value.id,
|
|
3163
3165
|
{ hovered: !1 }
|
|
3164
|
-
),
|
|
3166
|
+
), h.value = null;
|
|
3165
3167
|
}
|
|
3166
3168
|
n && (n.remove(), n = null);
|
|
3167
3169
|
return;
|
|
3168
3170
|
}
|
|
3169
|
-
const $ =
|
|
3170
|
-
if (!
|
|
3171
|
-
if (
|
|
3172
|
-
const Re = (
|
|
3173
|
-
|
|
3174
|
-
)) == null ? void 0 :
|
|
3175
|
-
|
|
3171
|
+
const $ = H[0];
|
|
3172
|
+
if (!h.value || h.value.id !== $.id || h.value.source !== $.layer.source) {
|
|
3173
|
+
if (h.value) {
|
|
3174
|
+
const Re = (me = o.value.getSource(
|
|
3175
|
+
h.value.source
|
|
3176
|
+
)) == null ? void 0 : me.type;
|
|
3177
|
+
h.value.source, h.value.id, Re === "vector" && h.value.source, ve(
|
|
3176
3178
|
o.value,
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
+
h.value.source,
|
|
3180
|
+
h.value.id,
|
|
3179
3181
|
{ hovered: !1 }
|
|
3180
3182
|
);
|
|
3181
3183
|
}
|
|
3182
|
-
const
|
|
3183
|
-
$.layer.source, $.id,
|
|
3184
|
+
const D = (ye = o.value.getSource($.layer.source)) == null ? void 0 : ye.type;
|
|
3185
|
+
$.layer.source, $.id, D === "vector" && $.layer.source, ve(o.value, $.layer.source, $.id, {
|
|
3184
3186
|
hovered: !0
|
|
3185
|
-
}),
|
|
3187
|
+
}), h.value = { source: $.layer.source, id: $.id };
|
|
3186
3188
|
}
|
|
3187
|
-
const te = (
|
|
3188
|
-
(
|
|
3189
|
-
),
|
|
3190
|
-
(
|
|
3189
|
+
const te = (re = (be = a.value) == null ? void 0 : be.widgets) == null ? void 0 : re.find(
|
|
3190
|
+
(D) => D.type === "layers"
|
|
3191
|
+
), oe = (we = (de = a.value) == null ? void 0 : de.widgets) == null ? void 0 : we.find(
|
|
3192
|
+
(D) => D.type === "attribute"
|
|
3191
3193
|
);
|
|
3192
|
-
let
|
|
3193
|
-
if (te && (
|
|
3194
|
-
(
|
|
3195
|
-
)), (Q = (
|
|
3196
|
-
(
|
|
3194
|
+
let X = null;
|
|
3195
|
+
if (te && (X = te.config.layers.find(
|
|
3196
|
+
(D) => D.id === $.layer.source
|
|
3197
|
+
)), (Q = (je = a.value) == null ? void 0 : je.widgets) == null ? void 0 : Q.find(
|
|
3198
|
+
(D) => D.type === "catalog"
|
|
3197
3199
|
)) {
|
|
3198
|
-
if (!
|
|
3200
|
+
if (!H.length) {
|
|
3199
3201
|
n && (n.style.display = "none");
|
|
3200
3202
|
return;
|
|
3201
3203
|
}
|
|
3202
|
-
const
|
|
3203
|
-
n =
|
|
3204
|
+
const D = H[0];
|
|
3205
|
+
n = ft(D, G, n);
|
|
3204
3206
|
return;
|
|
3205
3207
|
}
|
|
3206
|
-
if (!
|
|
3207
|
-
const
|
|
3208
|
-
let Re =
|
|
3209
|
-
|
|
3208
|
+
if (!X && oe && oe.config.layer.id === $.layer.source && (X = oe.config.layer), (Ae = X == null ? void 0 : X.style) != null && Ae.popup) {
|
|
3209
|
+
const D = X.style.popup;
|
|
3210
|
+
let Re = D.title, He = "";
|
|
3211
|
+
D.mode === "markdown" ? He = Array.isArray(D.content) ? D.content.join(`
|
|
3210
3212
|
|
|
3211
|
-
`) : "" : He = Array.isArray(
|
|
3213
|
+
`) : "" : He = Array.isArray(D.content) ? D.content.join("") : "", n || (n = document.createElement("div"), o.value.getContainer().appendChild(n)), n.innerHTML = O(
|
|
3212
3214
|
Re,
|
|
3213
3215
|
He,
|
|
3214
|
-
|
|
3216
|
+
D.fields,
|
|
3215
3217
|
$.properties,
|
|
3216
|
-
|
|
3217
|
-
), Ye(n,
|
|
3218
|
+
D.mode
|
|
3219
|
+
), Ye(n, G);
|
|
3218
3220
|
}
|
|
3219
3221
|
}), o.value.on("mouseleave", () => {
|
|
3220
|
-
var
|
|
3221
|
-
if (n && (n.remove(), n = null),
|
|
3222
|
-
const
|
|
3223
|
-
|
|
3224
|
-
)) == null ? void 0 :
|
|
3225
|
-
|
|
3222
|
+
var G;
|
|
3223
|
+
if (n && (n.remove(), n = null), h.value) {
|
|
3224
|
+
const H = (G = o.value.getSource(
|
|
3225
|
+
h.value.source
|
|
3226
|
+
)) == null ? void 0 : G.type;
|
|
3227
|
+
h.value.source, h.value.id, H === "vector" && h.value.source, ve(
|
|
3226
3228
|
o.value,
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
+
h.value.source,
|
|
3230
|
+
h.value.id,
|
|
3229
3231
|
{ hovered: !1 }
|
|
3230
|
-
),
|
|
3232
|
+
), h.value = null;
|
|
3231
3233
|
}
|
|
3232
3234
|
o.value && o.value.getCanvas && (o.value.getCanvas().style.cursor = "");
|
|
3233
|
-
})), o.value.on("click", async (
|
|
3234
|
-
var
|
|
3235
|
-
if (
|
|
3236
|
-
const
|
|
3237
|
-
if (!
|
|
3238
|
-
const $ =
|
|
3235
|
+
})), o.value.on("click", async (G) => {
|
|
3236
|
+
var me, ye, be, re, de, we, je;
|
|
3237
|
+
if (le(), ["length", "area", "print"].includes(v.value)) return;
|
|
3238
|
+
const H = o.value.queryRenderedFeatures(G.point);
|
|
3239
|
+
if (!H.length) return;
|
|
3240
|
+
const $ = H[0], te = (ye = (me = a.value) == null ? void 0 : me.widgets) == null ? void 0 : ye.find(
|
|
3239
3241
|
(Q) => Q.type === "layers"
|
|
3240
|
-
),
|
|
3242
|
+
), oe = (re = (be = a.value) == null ? void 0 : be.widgets) == null ? void 0 : re.find(
|
|
3241
3243
|
(Q) => Q.type === "attribute"
|
|
3242
|
-
),
|
|
3244
|
+
), X = (we = (de = a.value) == null ? void 0 : de.widgets) == null ? void 0 : we.find(
|
|
3243
3245
|
(Q) => Q.type === "catalog"
|
|
3244
3246
|
);
|
|
3245
|
-
let
|
|
3246
|
-
if (
|
|
3247
|
-
|
|
3248
|
-
var
|
|
3249
|
-
const
|
|
3250
|
-
Q.source, Q.id,
|
|
3247
|
+
let M;
|
|
3248
|
+
if (X ? M = $.layer.source : M = (oe == null ? void 0 : oe.config.layer) || (te == null ? void 0 : te.config.layers.find((Q) => Q.id === $.layer.source)), M != null && M.noCard) return;
|
|
3249
|
+
g.value.forEach((Q) => {
|
|
3250
|
+
var D;
|
|
3251
|
+
const Ae = (D = o.value.getSource(Q.source)) == null ? void 0 : D.type;
|
|
3252
|
+
Q.source, Q.id, Ae === "vector" && Q.source, ve(o.value, Q.source, Q.id, {
|
|
3251
3253
|
selected: !1
|
|
3252
3254
|
});
|
|
3253
|
-
}),
|
|
3254
|
-
const ce = (
|
|
3255
|
-
$.layer.source, $.id, ce === "vector" && $.layer.source,
|
|
3255
|
+
}), g.value = [];
|
|
3256
|
+
const ce = (je = o.value.getSource($.layer.source)) == null ? void 0 : je.type;
|
|
3257
|
+
$.layer.source, $.id, ce === "vector" && $.layer.source, ve(o.value, $.layer.source, $.id, {
|
|
3256
3258
|
selected: !0
|
|
3257
|
-
}),
|
|
3258
|
-
layer: (
|
|
3259
|
-
map: (
|
|
3259
|
+
}), g.value.push({ source: $.layer.source, id: $.id }), d.value = {
|
|
3260
|
+
layer: (M == null ? void 0 : M.service_key) || M || "",
|
|
3261
|
+
map: (M == null ? void 0 : M.map_key) || "",
|
|
3260
3262
|
id: $.properties.id,
|
|
3261
|
-
title: (
|
|
3263
|
+
title: (M == null ? void 0 : M.title) || ""
|
|
3262
3264
|
};
|
|
3263
|
-
}), o.value.on("dblclick", (
|
|
3264
|
-
var te,
|
|
3265
|
-
if (
|
|
3266
|
-
|
|
3267
|
-
const
|
|
3268
|
-
(
|
|
3265
|
+
}), o.value.on("dblclick", (G) => {
|
|
3266
|
+
var te, oe, X;
|
|
3267
|
+
if (le(), ["length", "area", "print"].includes(v.value)) return;
|
|
3268
|
+
dt([G.lngLat.lng, G.lngLat.lat]);
|
|
3269
|
+
const H = (oe = (te = a.value) == null ? void 0 : te.widgets) == null ? void 0 : oe.find(
|
|
3270
|
+
(M) => M.type === "layers"
|
|
3269
3271
|
);
|
|
3270
3272
|
let $ = null;
|
|
3271
|
-
(
|
|
3272
|
-
(
|
|
3273
|
-
(
|
|
3273
|
+
(X = H == null ? void 0 : H.config) != null && X.layers && ($ = H.config.layers.find(
|
|
3274
|
+
(M) => M.visible !== !1 && ["tms", "wms", "raster"].includes(
|
|
3275
|
+
(M.service_type || M.service || "").toLowerCase()
|
|
3274
3276
|
)
|
|
3275
|
-
)), !($ != null && $.noCard) && (
|
|
3277
|
+
)), !($ != null && $.noCard) && (d.value = {
|
|
3276
3278
|
layer: ($ == null ? void 0 : $.map_key) || "",
|
|
3277
3279
|
map: ($ == null ? void 0 : $.service_key) || "",
|
|
3278
3280
|
id: "",
|
|
3279
3281
|
title: ($ == null ? void 0 : $.title) || ""
|
|
3280
3282
|
});
|
|
3281
|
-
}), o.value.resize(), (
|
|
3282
|
-
const
|
|
3283
|
-
const
|
|
3284
|
-
|
|
3285
|
-
center: [
|
|
3283
|
+
}), o.value.resize(), (Ke = a == null ? void 0 : a.value) != null && Ke.history) {
|
|
3284
|
+
const G = () => {
|
|
3285
|
+
const H = o.value.getCenter();
|
|
3286
|
+
ge({
|
|
3287
|
+
center: [H.lng, H.lat],
|
|
3286
3288
|
zoom: o.value.getZoom(),
|
|
3287
3289
|
bearing: o.value.getBearing(),
|
|
3288
3290
|
pitch: o.value.getPitch()
|
|
3289
3291
|
});
|
|
3290
3292
|
};
|
|
3291
|
-
o.value.on("moveend",
|
|
3293
|
+
o.value.on("moveend", G), o.value.on("rotate", G), o.value.on("pitch", G);
|
|
3292
3294
|
}
|
|
3293
3295
|
});
|
|
3294
|
-
},
|
|
3295
|
-
Je(),
|
|
3296
|
-
o.value &&
|
|
3296
|
+
}, le = () => {
|
|
3297
|
+
Je(), g.value.forEach((b) => {
|
|
3298
|
+
o.value && ve(o.value, b.source, b.id, {
|
|
3297
3299
|
selected: !1
|
|
3298
3300
|
});
|
|
3299
|
-
}),
|
|
3301
|
+
}), g.value = [], d.value = null;
|
|
3300
3302
|
};
|
|
3301
|
-
|
|
3302
|
-
await
|
|
3303
|
+
_e(async () => {
|
|
3304
|
+
await it(), await Me(), pe();
|
|
3303
3305
|
const b = document.getElementById("maplibre-demo-map");
|
|
3304
3306
|
b && b.addEventListener("mouseleave", () => {
|
|
3305
3307
|
n && (n.remove(), n = null);
|
|
3306
3308
|
});
|
|
3307
3309
|
});
|
|
3308
|
-
const
|
|
3309
|
-
height: (
|
|
3310
|
+
const Ue = E(() => ({
|
|
3311
|
+
height: (r == null ? void 0 : r.height) || "100vh",
|
|
3310
3312
|
width: "100%"
|
|
3311
|
-
})),
|
|
3312
|
-
const b = await fetch(`/api/map/${
|
|
3313
|
+
})), it = async () => {
|
|
3314
|
+
const b = await fetch(`/api/map/${r.name || r.table || "main"}`).then((y) => y.json());
|
|
3313
3315
|
a.value = b;
|
|
3314
|
-
},
|
|
3316
|
+
}, Te = (b) => {
|
|
3315
3317
|
if (!a.value || !a.value.widgets) return "400px";
|
|
3316
3318
|
const y = a.value.widgets.find((x) => x.position === b);
|
|
3317
3319
|
return (y == null ? void 0 : y.width) || "400px";
|
|
3318
|
-
}, ie =
|
|
3320
|
+
}, ie = T([]);
|
|
3319
3321
|
fe(
|
|
3320
3322
|
() => a.value,
|
|
3321
3323
|
(b) => {
|
|
3322
|
-
b && b.map && (ie.value =
|
|
3324
|
+
b && b.map && (ie.value = at(), pe());
|
|
3323
3325
|
}
|
|
3324
3326
|
);
|
|
3325
|
-
const
|
|
3327
|
+
const at = () => {
|
|
3326
3328
|
var y;
|
|
3327
3329
|
if (!a.value || !a.value.widgets) return [];
|
|
3328
3330
|
const b = a.value.widgets.find((x) => x.type === "layers");
|
|
3329
3331
|
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
3332
|
};
|
|
3331
|
-
function
|
|
3333
|
+
function ve(b, y, x, I) {
|
|
3332
3334
|
b.getStyle().layers.filter((C) => C.source === y).forEach((C) => {
|
|
3333
3335
|
var V;
|
|
3334
3336
|
const P = { source: y, id: x };
|
|
3335
3337
|
((V = b.getSource(y)) == null ? void 0 : V.type) === "vector" && C["source-layer"] && (P.sourceLayer = C["source-layer"]), b.setFeatureState(P, I);
|
|
3336
3338
|
});
|
|
3337
3339
|
}
|
|
3338
|
-
const
|
|
3340
|
+
const lt = E(() => !!a.value && !!a.value.interactions && !!a.value.interactions.navigation && a.value.interactions.navigation.enabled), ct = E(() => !!a.value && Array.isArray(a.value.tools) && a.value.tools.length > 0), ze = E(() => lt.value || ct.value ? "40px" : "20px");
|
|
3339
3341
|
function Je() {
|
|
3340
3342
|
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
3343
|
}
|
|
3342
|
-
function
|
|
3344
|
+
function dt(b) {
|
|
3343
3345
|
var I, w, C, P;
|
|
3344
3346
|
Je();
|
|
3345
3347
|
const y = 80, x = {
|
|
@@ -3352,16 +3354,16 @@ const An = /* @__PURE__ */ H(jn, [["render", zn]]), Ae = {
|
|
|
3352
3354
|
},
|
|
3353
3355
|
render() {
|
|
3354
3356
|
var U;
|
|
3355
|
-
const
|
|
3356
|
-
|
|
3357
|
-
const
|
|
3358
|
-
return
|
|
3357
|
+
const R = performance.now() % 2e3 / 2e3, B = y / 2 * 0.3, Le = y / 2 * 0.7 * R + B, { context: ee } = this;
|
|
3358
|
+
ee.clearRect(0, 0, this.width, this.height), ee.beginPath(), ee.arc(this.width / 2, this.height / 2, Le, 0, Math.PI * 2), ee.fillStyle = `rgba(255, 100, 100, ${1 - R})`, ee.fill();
|
|
3359
|
+
const Ce = y / 2 * 0.7 * (R - 0.5 < 0 ? R - 0.5 + 1 : R - 0.5) + B;
|
|
3360
|
+
return ee.beginPath(), ee.arc(
|
|
3359
3361
|
this.width / 2,
|
|
3360
3362
|
this.height / 2,
|
|
3361
|
-
|
|
3363
|
+
Ce,
|
|
3362
3364
|
0,
|
|
3363
3365
|
Math.PI * 2
|
|
3364
|
-
),
|
|
3366
|
+
), ee.fillStyle = `rgba(255, 100, 100, ${1 - (R - 0.5 < 0 ? R - 0.5 + 1 : R - 0.5)})`, ee.fill(), this.data = ee.getImageData(0, 0, this.width, this.height).data, (U = o.value) == null || U.triggerRepaint(), !0;
|
|
3365
3367
|
}
|
|
3366
3368
|
};
|
|
3367
3369
|
(I = o.value) != null && I.hasImage("pulsing-dot") || (w = o.value) == null || w.addImage("pulsing-dot", x, { pixelRatio: 2 }), (C = o.value) == null || C.addSource("dot-point", {
|
|
@@ -3378,63 +3380,63 @@ const An = /* @__PURE__ */ H(jn, [["render", zn]]), Ae = {
|
|
|
3378
3380
|
paint: { "icon-opacity": 0.6 }
|
|
3379
3381
|
});
|
|
3380
3382
|
}
|
|
3381
|
-
const
|
|
3382
|
-
var b, y, x, I, w, C, P, V,
|
|
3383
|
+
const ut = E(() => {
|
|
3384
|
+
var b, y, x, I, w, C, P, V, R, B;
|
|
3383
3385
|
return {
|
|
3384
3386
|
center: (y = (b = a == null ? void 0 : a.value) == null ? void 0 : b.map) == null ? void 0 : y.center,
|
|
3385
3387
|
zoom: (I = (x = a == null ? void 0 : a.value) == null ? void 0 : x.map) == null ? void 0 : I.zoom,
|
|
3386
3388
|
pitch: ((C = (w = a == null ? void 0 : a.value) == null ? void 0 : w.map) == null ? void 0 : C.pitch) || 0,
|
|
3387
3389
|
bearing: ((V = (P = a == null ? void 0 : a.value) == null ? void 0 : P.map) == null ? void 0 : V.bearing) || 0,
|
|
3388
|
-
bbox: ((
|
|
3390
|
+
bbox: ((B = (R = a == null ? void 0 : a.value) == null ? void 0 : R.map) == null ? void 0 : B.bbox) || null
|
|
3389
3391
|
};
|
|
3390
3392
|
}), Qe = {
|
|
3391
|
-
home:
|
|
3392
|
-
print:
|
|
3393
|
-
geolocation:
|
|
3394
|
-
pitch:
|
|
3393
|
+
home: hn,
|
|
3394
|
+
print: wn,
|
|
3395
|
+
geolocation: Dn,
|
|
3396
|
+
pitch: kn
|
|
3395
3397
|
// length: VsLengthMeasure,
|
|
3396
3398
|
// area: VsAreaMeasure,
|
|
3397
|
-
},
|
|
3398
|
-
|
|
3399
|
+
}, pt = (b) => {
|
|
3400
|
+
v.value = b;
|
|
3399
3401
|
};
|
|
3400
|
-
function
|
|
3402
|
+
function ke(b) {
|
|
3401
3403
|
if (!a.value || !a.value.widgets) return;
|
|
3402
3404
|
const y = a.value.widgets.find((w) => w.type === "list");
|
|
3403
3405
|
if (!y || !y.config) return;
|
|
3404
3406
|
const { map_key: x, service_key: I } = y.config;
|
|
3405
|
-
x && I && (
|
|
3407
|
+
x && I && (d.value = {
|
|
3406
3408
|
id: b,
|
|
3407
3409
|
map: x,
|
|
3408
3410
|
layer: I
|
|
3409
3411
|
});
|
|
3410
3412
|
}
|
|
3411
|
-
const
|
|
3413
|
+
const ht = E(
|
|
3412
3414
|
() => a.value && a.value.widgets ? a.value.widgets.filter((b) => b.position === "absolute") : []
|
|
3413
3415
|
);
|
|
3414
|
-
function
|
|
3415
|
-
const I = b.properties, w =
|
|
3416
|
+
function ft(b, y, x) {
|
|
3417
|
+
const I = b.properties, w = u.value.find(
|
|
3416
3418
|
(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) => I == null ? void 0 : I[U.name]).filter(Boolean),
|
|
3419
|
+
), C = Array.isArray(w == null ? void 0 : w.popup) ? w.popup : [], V = C.filter((U) => U.meta === "image").map((U) => I == null ? void 0 : I[U.name]).filter(Boolean), R = V.length > 0 ? `
|
|
3418
3420
|
<div class="popup-image-single overflow-hidden rounded-t-xl" style="width:260px;height:160px;margin:0 auto 0 auto;">
|
|
3419
3421
|
<img src="${V[0]}" style="width:100%;height:100%;object-fit:cover;border-radius:12px 12px 0 0;display:block;" />
|
|
3420
3422
|
</div>
|
|
3421
|
-
` : "",
|
|
3422
|
-
let
|
|
3423
|
-
const
|
|
3424
|
-
let
|
|
3423
|
+
` : "", B = C.find((U) => U.meta === "title"), Le = B ? I == null ? void 0 : I[B.name] : "";
|
|
3424
|
+
let ee = C.filter((U) => U.meta !== "title" && U.meta !== "image").map((U) => {
|
|
3425
|
+
const $e = I == null ? void 0 : I[U.name];
|
|
3426
|
+
let Fe = $e ?? "-";
|
|
3425
3427
|
switch (U.meta) {
|
|
3426
3428
|
case "badge":
|
|
3427
|
-
|
|
3429
|
+
Fe = $e ? `<span class="inline-block rounded px-2 py-0.5 text-xs bg-yellow-100 text-yellow-800 ">${$e}</span>` : "-";
|
|
3428
3430
|
break;
|
|
3429
3431
|
}
|
|
3430
3432
|
return `
|
|
3431
3433
|
<tr style="display: table-row;">
|
|
3432
3434
|
<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;">${
|
|
3435
|
+
<td style="display: table-cell; padding: 2px 0 2px 8px; vertical-align: middle; width: 50%; text-align: right;">${Fe}</td>
|
|
3434
3436
|
</tr>
|
|
3435
3437
|
`;
|
|
3436
3438
|
}).join("");
|
|
3437
|
-
C.length || (
|
|
3439
|
+
C.length || (ee = Object.keys(I).map(
|
|
3438
3440
|
(U) => `
|
|
3439
3441
|
<tr style="display: table-row;">
|
|
3440
3442
|
<td style="display: table-cell; padding: 2px 8px 2px 0; vertical-align: middle; font-weight: 500; width: 50%; text-align: left;">${U}</td>
|
|
@@ -3442,179 +3444,179 @@ const An = /* @__PURE__ */ H(jn, [["render", zn]]), Ae = {
|
|
|
3442
3444
|
</tr>
|
|
3443
3445
|
`
|
|
3444
3446
|
).join(""));
|
|
3445
|
-
const
|
|
3447
|
+
const Ce = `
|
|
3446
3448
|
<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
|
-
${
|
|
3449
|
+
${R}
|
|
3450
|
+
${Le ? `<div class="font-semibold text-sm border-b border-solid border-gray-200 text-gray-800 px-2 py-1">${Le}</div>` : ""}
|
|
3449
3451
|
<div class="text-xs px-2 py-0.5 text-gray-500" style="display: flex; justify-content: center; align-items: center; flex: 1;">
|
|
3450
3452
|
<table class="w-full" style="border-collapse: collapse; border: none; margin: 0 auto;">
|
|
3451
|
-
<tbody>${
|
|
3453
|
+
<tbody>${ee}</tbody>
|
|
3452
3454
|
</table>
|
|
3453
3455
|
</div>
|
|
3454
3456
|
</div>
|
|
3455
3457
|
`;
|
|
3456
|
-
return x || (x = document.createElement("div"), x.className = "custom-popup absolute z-50", document.body.appendChild(x)), x.innerHTML =
|
|
3458
|
+
return x || (x = document.createElement("div"), x.className = "custom-popup absolute z-50", document.body.appendChild(x)), x.innerHTML = Ce, Ye(x, y), x;
|
|
3457
3459
|
}
|
|
3458
3460
|
function Ye(b, y) {
|
|
3459
3461
|
const x = b.offsetWidth, I = b.offsetHeight, w = document.getElementById("maplibre-demo-map"), C = w.getBoundingClientRect(), P = y.originalEvent.clientX - C.left, V = y.originalEvent.clientY - C.top;
|
|
3460
|
-
let
|
|
3461
|
-
|
|
3462
|
-
let
|
|
3463
|
-
V - I - 10 > 0 ?
|
|
3462
|
+
let R = P - x / 2;
|
|
3463
|
+
R = Math.max(10, Math.min(R, C.width - x - 10));
|
|
3464
|
+
let B;
|
|
3465
|
+
V - I - 10 > 0 ? B = V - I - 5 : V + I + 10 < C.height ? B = V + 10 : B = Math.max(10, C.height - I - 10), b.style.position = "absolute", b.style.left = `${R + 20}px`, b.style.top = `${B + 10}px`, b.parentNode !== w && w.appendChild(b);
|
|
3464
3466
|
}
|
|
3465
3467
|
return (b, y) => {
|
|
3466
3468
|
var x, I;
|
|
3467
3469
|
return c(), p("div", {
|
|
3468
3470
|
class: "maplibre-demo-map-container",
|
|
3469
|
-
style: he(
|
|
3471
|
+
style: he(Ue.value)
|
|
3470
3472
|
}, [
|
|
3471
|
-
y[10] || (y[10] =
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
(c(), p(
|
|
3473
|
+
y[10] || (y[10] = s("div", { id: "maplibre-demo-map" }, null, -1)),
|
|
3474
|
+
i.value ? (c(), p(z, { key: 1 }, [
|
|
3475
|
+
s("div", Un, [
|
|
3476
|
+
s("div", Rn, [
|
|
3477
|
+
s("div", Hn, [
|
|
3478
|
+
(c(), p(z, null, W(["top-left"], (w) => {
|
|
3477
3479
|
var C, P;
|
|
3478
|
-
return
|
|
3480
|
+
return Z(Be, {
|
|
3479
3481
|
key: w,
|
|
3480
3482
|
position: w,
|
|
3481
|
-
widgets:
|
|
3483
|
+
widgets: L(w),
|
|
3482
3484
|
map: o.value,
|
|
3483
|
-
mapLoaded:
|
|
3484
|
-
cardValues:
|
|
3485
|
-
hasFilters:
|
|
3485
|
+
mapLoaded: i.value,
|
|
3486
|
+
cardValues: d.value,
|
|
3487
|
+
hasFilters: _.value,
|
|
3486
3488
|
history: (P = (C = a.value) == null ? void 0 : C.value) == null ? void 0 : P.history,
|
|
3487
|
-
currentFilterLayer:
|
|
3489
|
+
currentFilterLayer: m.value,
|
|
3488
3490
|
enabledLayerIds: ie.value,
|
|
3489
|
-
getWidgetComponent:
|
|
3490
|
-
getColumnWidth:
|
|
3491
|
-
rightColumnOffset: w === "top-right" ?
|
|
3492
|
-
onSetFilterLayer:
|
|
3491
|
+
getWidgetComponent: k,
|
|
3492
|
+
getColumnWidth: Te,
|
|
3493
|
+
rightColumnOffset: w === "top-right" ? ze.value : void 0,
|
|
3494
|
+
onSetFilterLayer: A,
|
|
3493
3495
|
"onUpdate:enabledLayerIds": y[0] || (y[0] = (V) => ie.value = V),
|
|
3494
|
-
onCardValuesId:
|
|
3495
|
-
onCloseCard:
|
|
3496
|
-
onCatalogLayers: y[1] || (y[1] = (V) =>
|
|
3496
|
+
onCardValuesId: ke,
|
|
3497
|
+
onCloseCard: le,
|
|
3498
|
+
onCatalogLayers: y[1] || (y[1] = (V) => u.value = V)
|
|
3497
3499
|
}, null, 8, ["position", "widgets", "map", "mapLoaded", "cardValues", "hasFilters", "history", "currentFilterLayer", "enabledLayerIds", "rightColumnOffset"]);
|
|
3498
3500
|
}), 64))
|
|
3499
3501
|
]),
|
|
3500
|
-
|
|
3501
|
-
(c(), p(
|
|
3502
|
+
s("div", Nn, [
|
|
3503
|
+
(c(), p(z, null, W(["bottom-left"], (w) => {
|
|
3502
3504
|
var C, P;
|
|
3503
|
-
return
|
|
3505
|
+
return Z(Be, {
|
|
3504
3506
|
key: w,
|
|
3505
3507
|
position: w,
|
|
3506
|
-
widgets:
|
|
3508
|
+
widgets: L(w),
|
|
3507
3509
|
map: o.value,
|
|
3508
|
-
mapLoaded:
|
|
3509
|
-
cardValues:
|
|
3510
|
-
hasFilters:
|
|
3510
|
+
mapLoaded: i.value,
|
|
3511
|
+
cardValues: d.value,
|
|
3512
|
+
hasFilters: _.value,
|
|
3511
3513
|
history: (P = (C = a.value) == null ? void 0 : C.value) == null ? void 0 : P.history,
|
|
3512
|
-
currentFilterLayer:
|
|
3514
|
+
currentFilterLayer: m.value,
|
|
3513
3515
|
enabledLayerIds: ie.value,
|
|
3514
|
-
getWidgetComponent:
|
|
3515
|
-
getColumnWidth:
|
|
3516
|
-
rightColumnOffset: w === "top-right" ?
|
|
3517
|
-
onSetFilterLayer:
|
|
3516
|
+
getWidgetComponent: k,
|
|
3517
|
+
getColumnWidth: Te,
|
|
3518
|
+
rightColumnOffset: w === "top-right" ? ze.value : void 0,
|
|
3519
|
+
onSetFilterLayer: A,
|
|
3518
3520
|
"onUpdate:enabledLayerIds": y[2] || (y[2] = (V) => ie.value = V),
|
|
3519
|
-
onCardValuesId:
|
|
3520
|
-
onCloseCard:
|
|
3521
|
-
onCatalogLayers: y[3] || (y[3] = (V) =>
|
|
3521
|
+
onCardValuesId: ke,
|
|
3522
|
+
onCloseCard: le,
|
|
3523
|
+
onCatalogLayers: y[3] || (y[3] = (V) => u.value = V)
|
|
3522
3524
|
}, null, 8, ["position", "widgets", "map", "mapLoaded", "cardValues", "hasFilters", "history", "currentFilterLayer", "enabledLayerIds", "rightColumnOffset"]);
|
|
3523
3525
|
}), 64))
|
|
3524
3526
|
])
|
|
3525
3527
|
]),
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
(c(), p(
|
|
3528
|
+
s("div", Zn, [
|
|
3529
|
+
s("div", Wn, [
|
|
3530
|
+
(c(), p(z, null, W(["top-right"], (w) => {
|
|
3529
3531
|
var C, P;
|
|
3530
|
-
return
|
|
3532
|
+
return Z(Be, {
|
|
3531
3533
|
key: w,
|
|
3532
3534
|
position: w,
|
|
3533
|
-
widgets:
|
|
3535
|
+
widgets: L(w),
|
|
3534
3536
|
map: o.value,
|
|
3535
|
-
mapLoaded:
|
|
3536
|
-
cardValues:
|
|
3537
|
-
hasFilters:
|
|
3537
|
+
mapLoaded: i.value,
|
|
3538
|
+
cardValues: d.value,
|
|
3539
|
+
hasFilters: _.value,
|
|
3538
3540
|
history: (P = (C = a.value) == null ? void 0 : C.value) == null ? void 0 : P.history,
|
|
3539
|
-
currentFilterLayer:
|
|
3541
|
+
currentFilterLayer: m.value,
|
|
3540
3542
|
enabledLayerIds: ie.value,
|
|
3541
|
-
getWidgetComponent:
|
|
3542
|
-
getColumnWidth:
|
|
3543
|
-
rightColumnOffset: w === "top-right" ?
|
|
3544
|
-
onSetFilterLayer:
|
|
3543
|
+
getWidgetComponent: k,
|
|
3544
|
+
getColumnWidth: Te,
|
|
3545
|
+
rightColumnOffset: w === "top-right" ? ze.value : void 0,
|
|
3546
|
+
onSetFilterLayer: A,
|
|
3545
3547
|
"onUpdate:enabledLayerIds": y[4] || (y[4] = (V) => ie.value = V),
|
|
3546
|
-
onCardValuesId:
|
|
3547
|
-
onCloseCard:
|
|
3548
|
-
onCatalogLayers: y[5] || (y[5] = (V) =>
|
|
3548
|
+
onCardValuesId: ke,
|
|
3549
|
+
onCloseCard: le,
|
|
3550
|
+
onCatalogLayers: y[5] || (y[5] = (V) => u.value = V)
|
|
3549
3551
|
}, null, 8, ["position", "widgets", "map", "mapLoaded", "cardValues", "hasFilters", "history", "currentFilterLayer", "enabledLayerIds", "rightColumnOffset"]);
|
|
3550
3552
|
}), 64))
|
|
3551
3553
|
]),
|
|
3552
|
-
|
|
3553
|
-
(c(), p(
|
|
3554
|
+
s("div", qn, [
|
|
3555
|
+
(c(), p(z, null, W(["bottom-right"], (w) => {
|
|
3554
3556
|
var C, P;
|
|
3555
|
-
return
|
|
3557
|
+
return Z(Be, {
|
|
3556
3558
|
key: w,
|
|
3557
3559
|
position: w,
|
|
3558
|
-
widgets:
|
|
3560
|
+
widgets: L(w),
|
|
3559
3561
|
map: o.value,
|
|
3560
|
-
mapLoaded:
|
|
3561
|
-
cardValues:
|
|
3562
|
-
hasFilters:
|
|
3562
|
+
mapLoaded: i.value,
|
|
3563
|
+
cardValues: d.value,
|
|
3564
|
+
hasFilters: _.value,
|
|
3563
3565
|
history: (P = (C = a.value) == null ? void 0 : C.value) == null ? void 0 : P.history,
|
|
3564
|
-
currentFilterLayer:
|
|
3566
|
+
currentFilterLayer: m.value,
|
|
3565
3567
|
enabledLayerIds: ie.value,
|
|
3566
|
-
getWidgetComponent:
|
|
3567
|
-
getColumnWidth:
|
|
3568
|
-
rightColumnOffset: w === "top-right" ?
|
|
3569
|
-
onSetFilterLayer:
|
|
3568
|
+
getWidgetComponent: k,
|
|
3569
|
+
getColumnWidth: Te,
|
|
3570
|
+
rightColumnOffset: w === "top-right" ? ze.value : void 0,
|
|
3571
|
+
onSetFilterLayer: A,
|
|
3570
3572
|
"onUpdate:enabledLayerIds": y[6] || (y[6] = (V) => ie.value = V),
|
|
3571
|
-
onCardValuesId:
|
|
3572
|
-
onCloseCard:
|
|
3573
|
-
onCatalogLayers: y[7] || (y[7] = (V) =>
|
|
3573
|
+
onCardValuesId: ke,
|
|
3574
|
+
onCloseCard: le,
|
|
3575
|
+
onCatalogLayers: y[7] || (y[7] = (V) => u.value = V)
|
|
3574
3576
|
}, null, 8, ["position", "widgets", "map", "mapLoaded", "cardValues", "hasFilters", "history", "currentFilterLayer", "enabledLayerIds", "rightColumnOffset"]);
|
|
3575
3577
|
}), 64))
|
|
3576
3578
|
])
|
|
3577
3579
|
])
|
|
3578
3580
|
]),
|
|
3579
|
-
(c(!0), p(
|
|
3581
|
+
(c(!0), p(z, null, W(ht.value, (w, C) => (c(), p("div", {
|
|
3580
3582
|
key: "abs-" + (w.id || w.type || C),
|
|
3581
3583
|
class: "absolute z-20",
|
|
3582
3584
|
style: he(w.style)
|
|
3583
3585
|
}, [
|
|
3584
|
-
(c(),
|
|
3586
|
+
(c(), K(De(k(w.type)), {
|
|
3585
3587
|
map: o.value,
|
|
3586
3588
|
config: w.config,
|
|
3587
|
-
hasFilters:
|
|
3588
|
-
currentFilterLayer:
|
|
3589
|
+
hasFilters: _.value,
|
|
3590
|
+
currentFilterLayer: m.value,
|
|
3589
3591
|
enabledLayerIds: ie.value,
|
|
3590
|
-
cardValues:
|
|
3591
|
-
onSetFilterLayer:
|
|
3592
|
+
cardValues: d.value,
|
|
3593
|
+
onSetFilterLayer: A,
|
|
3592
3594
|
"onUpdate:enabledLayerIds": y[8] || (y[8] = (P) => ie.value = P),
|
|
3593
|
-
onCardValuesId:
|
|
3594
|
-
onCloseCard:
|
|
3595
|
-
onCatalogLayers: y[9] || (y[9] = (P) =>
|
|
3595
|
+
onCardValuesId: ke,
|
|
3596
|
+
onCloseCard: le,
|
|
3597
|
+
onCatalogLayers: y[9] || (y[9] = (P) => u.value = P)
|
|
3596
3598
|
}, null, 40, ["map", "config", "hasFilters", "currentFilterLayer", "enabledLayerIds", "cardValues"]))
|
|
3597
3599
|
], 4))), 128)),
|
|
3598
|
-
|
|
3599
|
-
(c(!0), p(
|
|
3600
|
-
|
|
3600
|
+
s("div", Gn, [
|
|
3601
|
+
(c(!0), p(z, null, W((I = (x = a.value) == null ? void 0 : x.value) == null ? void 0 : I.tools, (w) => (c(), p(z, { key: w }, [
|
|
3602
|
+
i.value && Qe[w] ? (c(), K(De(Qe[w]), kt({
|
|
3601
3603
|
key: 0,
|
|
3602
3604
|
map: o.value,
|
|
3603
|
-
activeTool:
|
|
3604
|
-
setActiveTool:
|
|
3605
|
-
}, { ref_for: !0 }, w === "home" ? { initialView:
|
|
3605
|
+
activeTool: v.value,
|
|
3606
|
+
setActiveTool: pt
|
|
3607
|
+
}, { ref_for: !0 }, w === "home" ? { initialView: ut.value } : {}, { onCardValuesId: ke }), null, 16, ["map", "activeTool"])) : F("", !0)
|
|
3606
3608
|
], 64))), 128))
|
|
3607
3609
|
])
|
|
3608
|
-
], 64)) : (c(),
|
|
3610
|
+
], 64)) : (c(), K(nn, { key: 0 }))
|
|
3609
3611
|
], 4);
|
|
3610
3612
|
};
|
|
3611
3613
|
}
|
|
3612
|
-
}),
|
|
3613
|
-
function
|
|
3614
|
-
e.component("MapCustom",
|
|
3614
|
+
}), Qn = /* @__PURE__ */ N(Jn, [["__scopeId", "data-v-c37c9f40"]]);
|
|
3615
|
+
function Xn(e) {
|
|
3616
|
+
e.component("MapCustom", Qn);
|
|
3615
3617
|
}
|
|
3616
3618
|
export {
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3619
|
+
Qn as MapCustom,
|
|
3620
|
+
Qn as default,
|
|
3621
|
+
Xn as install
|
|
3620
3622
|
};
|