@opengis/gis 0.2.110 → 0.2.111
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 +452 -451
- package/dist/index.umd.cjs +8 -8
- package/module/gis/select/layer_list.sql +7 -0
- package/package.json +75 -75
package/dist/index.js
CHANGED
|
@@ -1200,7 +1200,7 @@ const ka = /* @__PURE__ */ Te(ba, [["render", _a]]), yr = {
|
|
|
1200
1200
|
je({
|
|
1201
1201
|
type: "warning",
|
|
1202
1202
|
title: "Validation",
|
|
1203
|
-
message: Object.entries(S).map(([C,
|
|
1203
|
+
message: Object.entries(S).map(([C, M]) => `${C}: ${M}`).join(`
|
|
1204
1204
|
`)
|
|
1205
1205
|
});
|
|
1206
1206
|
return;
|
|
@@ -1215,21 +1215,21 @@ const ka = /* @__PURE__ */ Te(ba, [["render", _a]]), yr = {
|
|
|
1215
1215
|
}
|
|
1216
1216
|
const g = T(null), _ = T(null), A = (S) => {
|
|
1217
1217
|
g.value = S;
|
|
1218
|
-
},
|
|
1218
|
+
}, E = (S) => {
|
|
1219
1219
|
_.value = S;
|
|
1220
1220
|
}, k = (S) => {
|
|
1221
1221
|
if (g.value === null || g.value === S) {
|
|
1222
1222
|
g.value = null, _.value = null;
|
|
1223
1223
|
return;
|
|
1224
1224
|
}
|
|
1225
|
-
const C = [...u.value], [
|
|
1226
|
-
C.splice(S, 0,
|
|
1225
|
+
const C = [...u.value], [M] = C.splice(g.value, 1);
|
|
1226
|
+
C.splice(S, 0, M), u.value = C, g.value = null, _.value = null;
|
|
1227
1227
|
};
|
|
1228
1228
|
return (S, C) => (c(), x(ie, null, [
|
|
1229
1229
|
e.addButton ? (c(), x("div", $a, [
|
|
1230
1230
|
o("div", Ca, [
|
|
1231
1231
|
o("button", {
|
|
1232
|
-
onClick: C[0] || (C[0] = (
|
|
1232
|
+
onClick: C[0] || (C[0] = (M) => v.value = !0),
|
|
1233
1233
|
class: "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&_svg]:shrink-0 bg-primary hover:bg-primary/90 h-10 px-4 py-2 bg-gradient-to-r from-blue-600 to-blue-500 hover:from-blue-700 hover:to-blue-600 text-white"
|
|
1234
1234
|
}, [...C[4] || (C[4] = [
|
|
1235
1235
|
o("svg", {
|
|
@@ -1254,33 +1254,33 @@ const ka = /* @__PURE__ */ Te(ba, [["render", _a]]), yr = {
|
|
|
1254
1254
|
o("div", Aa, [
|
|
1255
1255
|
o("table", La, [
|
|
1256
1256
|
o("colgroup", null, [
|
|
1257
|
-
(c(!0), x(ie, null, he(d.value, (
|
|
1258
|
-
key:
|
|
1257
|
+
(c(!0), x(ie, null, he(d.value, (M) => (c(), x("col", {
|
|
1258
|
+
key: M.key,
|
|
1259
1259
|
style: ft(
|
|
1260
|
-
|
|
1260
|
+
M.type === "main" ? `width: ${e.mainColWidth}` : M.width ? `width: ${M.width}` : "auto"
|
|
1261
1261
|
)
|
|
1262
1262
|
}, null, 4))), 128)),
|
|
1263
1263
|
C[5] || (C[5] = o("col", null, null, -1))
|
|
1264
1264
|
]),
|
|
1265
1265
|
o("thead", null, [
|
|
1266
1266
|
o("tr", Ma, [
|
|
1267
|
-
(c(!0), x(ie, null, he(d.value, (
|
|
1268
|
-
key:
|
|
1267
|
+
(c(!0), x(ie, null, he(d.value, (M) => (c(), x("th", {
|
|
1268
|
+
key: M.key,
|
|
1269
1269
|
class: "px-6 py-4"
|
|
1270
|
-
}, V(
|
|
1270
|
+
}, V(M.label), 1))), 128)),
|
|
1271
1271
|
C[6] || (C[6] = o("th", { class: "px-6 py-4" }, "Дії", -1))
|
|
1272
1272
|
])
|
|
1273
1273
|
]),
|
|
1274
1274
|
u.value.length ? (c(), x("tbody", Ea, [
|
|
1275
|
-
(c(!0), x(ie, null, he(u.value, (
|
|
1276
|
-
key:
|
|
1275
|
+
(c(!0), x(ie, null, he(u.value, (M, N) => (c(), x("tr", {
|
|
1276
|
+
key: M.id || M.name || N,
|
|
1277
1277
|
class: Ae(["transition-colors hover:bg-gray-50/50 cursor-move", {
|
|
1278
1278
|
"opacity-50": g.value === N,
|
|
1279
1279
|
"border-t-2 border-b-2 border-blue-500 bg-blue-50": _.value === N
|
|
1280
1280
|
}]),
|
|
1281
1281
|
draggable: "true",
|
|
1282
1282
|
onDragstart: (D) => A(N),
|
|
1283
|
-
onDragover: nt((D) =>
|
|
1283
|
+
onDragover: nt((D) => E(N), ["prevent"]),
|
|
1284
1284
|
onDrop: (D) => k(N)
|
|
1285
1285
|
}, [
|
|
1286
1286
|
(c(!0), x(ie, null, he(d.value, (D) => (c(), x("td", {
|
|
@@ -1290,46 +1290,46 @@ const ka = /* @__PURE__ */ Te(ba, [["render", _a]]), yr = {
|
|
|
1290
1290
|
D.type === "main" ? (c(), x("div", Fa, [
|
|
1291
1291
|
C[7] || (C[7] = o("span", { class: "drag-handle cursor-move mr-2 text-gray-400" }, "☰", -1)),
|
|
1292
1292
|
se(cl)(
|
|
1293
|
-
|
|
1293
|
+
M.format === "yes/no" ? "check" : M.format || M.type
|
|
1294
1294
|
) ? (c(), x("div", {
|
|
1295
1295
|
key: 0,
|
|
1296
1296
|
class: Ae(["flex items-center justify-center p-1 rounded", `bg-${se(ul)(
|
|
1297
|
-
|
|
1297
|
+
M.format === "yes/no" ? "check" : M.format || M.type
|
|
1298
1298
|
)}-100`])
|
|
1299
1299
|
}, [
|
|
1300
1300
|
(c(), pe(Qt(
|
|
1301
|
-
|
|
1301
|
+
M.format === "yes/no" ? "icon-check" : se(yr)["Icon" + n(M.format || M.type)] || se(yr).IconText
|
|
1302
1302
|
), { class: "w-4 h-4" }))
|
|
1303
1303
|
], 2)) : K("", !0),
|
|
1304
1304
|
o("div", Ia, [
|
|
1305
1305
|
Be((c(), x("p", ja, [
|
|
1306
|
-
Ce(V(
|
|
1306
|
+
Ce(V(M.name || M.id), 1)
|
|
1307
1307
|
])), [
|
|
1308
1308
|
[se(di)]
|
|
1309
1309
|
]),
|
|
1310
|
-
o("p", za, V(
|
|
1310
|
+
o("p", za, V(M.ua || M.label || M.name || M.id), 1)
|
|
1311
1311
|
])
|
|
1312
1312
|
])) : (c(), x(ie, { key: 1 }, [
|
|
1313
1313
|
D.slot && h(D.slot) ? Zt(S.$slots, D.slot, {
|
|
1314
1314
|
key: 0,
|
|
1315
|
-
row:
|
|
1315
|
+
row: M,
|
|
1316
1316
|
column: D,
|
|
1317
|
-
value:
|
|
1317
|
+
value: M[D.key],
|
|
1318
1318
|
rowIndex: N
|
|
1319
1319
|
}, void 0, !0) : D.type === "color" ? (c(), x("div", Na, [
|
|
1320
1320
|
o("div", {
|
|
1321
|
-
class: Ae(["w-4 h-4 rounded-full align-middle", `bg-[${
|
|
1321
|
+
class: Ae(["w-4 h-4 rounded-full align-middle", `bg-[${M[D.key]}]`])
|
|
1322
1322
|
}, null, 2)
|
|
1323
1323
|
])) : ["format", "type", "meta"].includes(D.key) ? (c(), x(ie, { key: 2 }, [
|
|
1324
|
-
|
|
1325
|
-
], 64)) : (c(), x("span", Oa, V(
|
|
1324
|
+
M[D.key] ? (c(), x("span", Pa, V(M[D.key]), 1)) : (c(), x("span", Ra, "Не вказано"))
|
|
1325
|
+
], 64)) : (c(), x("span", Oa, V(M[D.key]), 1))
|
|
1326
1326
|
], 64))
|
|
1327
1327
|
]))), 128)),
|
|
1328
1328
|
o("td", Da, [
|
|
1329
1329
|
ne(ci, {
|
|
1330
1330
|
columns: u.value,
|
|
1331
1331
|
"onUpdate:columns": C[1] || (C[1] = (D) => u.value = D),
|
|
1332
|
-
data:
|
|
1332
|
+
data: M,
|
|
1333
1333
|
index: N,
|
|
1334
1334
|
scheme: e.formScheme
|
|
1335
1335
|
}, null, 8, ["columns", "data", "index", "scheme"])
|
|
@@ -1349,7 +1349,7 @@ const ka = /* @__PURE__ */ Te(ba, [["render", _a]]), yr = {
|
|
|
1349
1349
|
title: "Створити поле",
|
|
1350
1350
|
size: "lg",
|
|
1351
1351
|
visible: v.value,
|
|
1352
|
-
"onUpdate:visible": C[3] || (C[3] = (
|
|
1352
|
+
"onUpdate:visible": C[3] || (C[3] = (M) => v.value = M)
|
|
1353
1353
|
}, {
|
|
1354
1354
|
footer: Oe(() => [
|
|
1355
1355
|
o("div", { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, [
|
|
@@ -1370,7 +1370,7 @@ const ka = /* @__PURE__ */ Te(ba, [["render", _a]]), yr = {
|
|
|
1370
1370
|
ref_key: "form",
|
|
1371
1371
|
ref: a,
|
|
1372
1372
|
modelValue: m.value,
|
|
1373
|
-
"onUpdate:modelValue": C[2] || (C[2] = (
|
|
1373
|
+
"onUpdate:modelValue": C[2] || (C[2] = (M) => m.value = M),
|
|
1374
1374
|
schema: e.formScheme
|
|
1375
1375
|
}, null, 8, ["modelValue", "schema"])
|
|
1376
1376
|
]),
|
|
@@ -1404,18 +1404,18 @@ const ka = /* @__PURE__ */ Te(ba, [["render", _a]]), yr = {
|
|
|
1404
1404
|
), v = (A) => (A == null ? void 0 : A.name) ?? (A == null ? void 0 : A.id) ?? (A == null ? void 0 : A.key) ?? (A == null ? void 0 : A.code) ?? (A == null ? void 0 : A.field) ?? (A == null ? void 0 : A.value) ?? "", m = (A) => String(v(A) ?? "").trim(), b = (A) => (A == null ? void 0 : A.title) ?? (A == null ? void 0 : A.label) ?? m(A), f = (A) => String((A == null ? void 0 : A.type) ?? "").trim(), h = P(
|
|
1405
1405
|
() => new Set(r.value.map((A) => String(A ?? "").trim()))
|
|
1406
1406
|
), u = (A) => h.value.has(m(A)), d = (A) => {
|
|
1407
|
-
const
|
|
1408
|
-
if (!
|
|
1407
|
+
const E = m(A);
|
|
1408
|
+
if (!E) return;
|
|
1409
1409
|
const k = new Set(h.value);
|
|
1410
|
-
k.has(
|
|
1410
|
+
k.has(E) ? k.delete(E) : k.add(E), r.value = Array.from(k);
|
|
1411
1411
|
}, y = P(() => l.confirmText || "Імпортувати"), p = P(() => l.cancelText || "Скасувати"), g = () => {
|
|
1412
1412
|
n.value = !1, i("cancel");
|
|
1413
1413
|
}, _ = () => {
|
|
1414
1414
|
i("confirm"), n.value = !1;
|
|
1415
1415
|
};
|
|
1416
|
-
return (A,
|
|
1416
|
+
return (A, E) => (c(), pe(se(s), {
|
|
1417
1417
|
visible: n.value,
|
|
1418
|
-
"onUpdate:visible":
|
|
1418
|
+
"onUpdate:visible": E[0] || (E[0] = (k) => n.value = k),
|
|
1419
1419
|
teleport: "#modal",
|
|
1420
1420
|
title: e.title,
|
|
1421
1421
|
size: "lg"
|
|
@@ -1521,8 +1521,8 @@ const Qa = { class: "vs-form" }, Ja = { class: "vs-form__body auto-rows-max cont
|
|
|
1521
1521
|
}), u = P({
|
|
1522
1522
|
get: () => t.value || {},
|
|
1523
1523
|
set: (_) => {
|
|
1524
|
-
var
|
|
1525
|
-
const A = Array.isArray((
|
|
1524
|
+
var E;
|
|
1525
|
+
const A = Array.isArray((E = t.value) == null ? void 0 : E.columns) ? t.value.columns : [];
|
|
1526
1526
|
t.value = {
|
|
1527
1527
|
...t.value,
|
|
1528
1528
|
..._,
|
|
@@ -1542,7 +1542,7 @@ const Qa = { class: "vs-form" }, Ja = { class: "vs-form__body auto-rows-max cont
|
|
|
1542
1542
|
const d = () => {
|
|
1543
1543
|
const _ = new Set(
|
|
1544
1544
|
m.value.map((k) => Cn(k)).filter((k) => k.length > 0)
|
|
1545
|
-
), A = Array.isArray(h.value) ? [...h.value] : [],
|
|
1545
|
+
), A = Array.isArray(h.value) ? [...h.value] : [], E = l.value.filter((k) => _.has(i(k))).map((k) => {
|
|
1546
1546
|
const S = i(k), C = k.title ?? k.label ?? S;
|
|
1547
1547
|
return {
|
|
1548
1548
|
...k,
|
|
@@ -1552,7 +1552,7 @@ const Qa = { class: "vs-form" }, Ja = { class: "vs-form__body auto-rows-max cont
|
|
|
1552
1552
|
meta: k.meta ?? "features"
|
|
1553
1553
|
};
|
|
1554
1554
|
});
|
|
1555
|
-
h.value = Mn(A,
|
|
1555
|
+
h.value = Mn(A, E, {
|
|
1556
1556
|
selectedKeys: m.value,
|
|
1557
1557
|
resolveKey: i
|
|
1558
1558
|
}), v.value = !1, m.value = [];
|
|
@@ -1663,7 +1663,7 @@ const Qa = { class: "vs-form" }, Ja = { class: "vs-form__body auto-rows-max cont
|
|
|
1663
1663
|
key: f.value,
|
|
1664
1664
|
schema: y,
|
|
1665
1665
|
modelValue: u.value,
|
|
1666
|
-
"onUpdate:modelValue": A[0] || (A[0] = (
|
|
1666
|
+
"onUpdate:modelValue": A[0] || (A[0] = (E) => u.value = E)
|
|
1667
1667
|
}, null, 8, ["modelValue"]))
|
|
1668
1668
|
]),
|
|
1669
1669
|
o("div", nu, [
|
|
@@ -1694,7 +1694,7 @@ const Qa = { class: "vs-form" }, Ja = { class: "vs-form__body auto-rows-max cont
|
|
|
1694
1694
|
o("div", ou, [
|
|
1695
1695
|
ne(sn, {
|
|
1696
1696
|
modelValue: h.value,
|
|
1697
|
-
"onUpdate:modelValue": A[1] || (A[1] = (
|
|
1697
|
+
"onUpdate:modelValue": A[1] || (A[1] = (E) => h.value = E),
|
|
1698
1698
|
"columns-scheme": p,
|
|
1699
1699
|
"form-scheme": g,
|
|
1700
1700
|
"main-col-width": "250px",
|
|
@@ -1706,9 +1706,9 @@ const Qa = { class: "vs-form" }, Ja = { class: "vs-form__body auto-rows-max cont
|
|
|
1706
1706
|
]),
|
|
1707
1707
|
ne(Ln, {
|
|
1708
1708
|
visible: v.value,
|
|
1709
|
-
"onUpdate:visible": A[2] || (A[2] = (
|
|
1709
|
+
"onUpdate:visible": A[2] || (A[2] = (E) => v.value = E),
|
|
1710
1710
|
selection: m.value,
|
|
1711
|
-
"onUpdate:selection": A[3] || (A[3] = (
|
|
1711
|
+
"onUpdate:selection": A[3] || (A[3] = (E) => m.value = E),
|
|
1712
1712
|
fields: l.value,
|
|
1713
1713
|
title: "Імпорт колонок",
|
|
1714
1714
|
"id-prefix": "import-column",
|
|
@@ -2112,8 +2112,8 @@ const hu = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
|
|
|
2112
2112
|
}, [
|
|
2113
2113
|
o("span", Lu, V((g == null ? void 0 : g.ua) || g.label || g.name) + ": ", 1),
|
|
2114
2114
|
o("span", Mu, [
|
|
2115
|
-
Array.isArray(u[g == null ? void 0 : g.name]) ? (c(!0), x(ie, { key: 0 }, he(u[(g == null ? void 0 : g.name) + "_text"] || u[g == null ? void 0 : g.name], (A,
|
|
2116
|
-
key:
|
|
2115
|
+
Array.isArray(u[g == null ? void 0 : g.name]) ? (c(!0), x(ie, { key: 0 }, he(u[(g == null ? void 0 : g.name) + "_text"] || u[g == null ? void 0 : g.name], (A, E) => (c(), x("span", {
|
|
2116
|
+
key: E,
|
|
2117
2117
|
class: "bg-gray-100 px-2 py-0 border-[0.01rem] border-gray-300 rounded-lg whitespace-nowrap"
|
|
2118
2118
|
}, V(A), 1))), 128)) : (c(), x(ie, { key: 1 }, [
|
|
2119
2119
|
g.format === "date" ? (c(), x(ie, { key: 0 }, [
|
|
@@ -2244,8 +2244,8 @@ const hu = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
|
|
|
2244
2244
|
}, [
|
|
2245
2245
|
o("p", Uu, V(g.ua), 1),
|
|
2246
2246
|
o("p", qu, [
|
|
2247
|
-
Array.isArray(u[g == null ? void 0 : g.name]) ? (c(!0), x(ie, { key: 0 }, he(u[g == null ? void 0 : g.name], (A,
|
|
2248
|
-
key:
|
|
2247
|
+
Array.isArray(u[g == null ? void 0 : g.name]) ? (c(!0), x(ie, { key: 0 }, he(u[g == null ? void 0 : g.name], (A, E) => (c(), x("span", {
|
|
2248
|
+
key: E,
|
|
2249
2249
|
class: "bg-gray-200 px-1 py-0.5 rounded-lg mr-1"
|
|
2250
2250
|
}, V(A), 1))), 128)) : (c(), x(ie, { key: 1 }, [
|
|
2251
2251
|
g.format === "date" ? (c(), x(ie, { key: 0 }, [
|
|
@@ -2390,10 +2390,10 @@ const hu = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
|
|
|
2390
2390
|
}, [
|
|
2391
2391
|
o("p", uc, V(_.ua), 1),
|
|
2392
2392
|
o("p", cc, [
|
|
2393
|
-
Array.isArray(d[_.name]) ? (c(!0), x(ie, { key: 0 }, he(d[_.name], (
|
|
2393
|
+
Array.isArray(d[_.name]) ? (c(!0), x(ie, { key: 0 }, he(d[_.name], (E, k) => (c(), x("span", {
|
|
2394
2394
|
key: k,
|
|
2395
2395
|
class: "bg-gray-200 px-1 py-0.5 rounded-lg mr-1 text-[10px] lg:text-xs"
|
|
2396
|
-
}, V(
|
|
2396
|
+
}, V(E), 1))), 128)) : (c(), x(ie, { key: 1 }, [
|
|
2397
2397
|
_.format === "date" ? (c(), x(ie, { key: 0 }, [
|
|
2398
2398
|
Ce(V(se(Zn)(d[_.name]) || "Немає даних"), 1)
|
|
2399
2399
|
], 64)) : _.type === "date" ? (c(), x(ie, { key: 1 }, [
|
|
@@ -2519,8 +2519,8 @@ const hu = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
|
|
|
2519
2519
|
}, [
|
|
2520
2520
|
o("p", kc, V(g.ua), 1),
|
|
2521
2521
|
o("p", $c, [
|
|
2522
|
-
Array.isArray(u[g == null ? void 0 : g.name]) ? (c(!0), x(ie, { key: 0 }, he(u[g == null ? void 0 : g.name], (A,
|
|
2523
|
-
key:
|
|
2522
|
+
Array.isArray(u[g == null ? void 0 : g.name]) ? (c(!0), x(ie, { key: 0 }, he(u[g == null ? void 0 : g.name], (A, E) => (c(), x("span", {
|
|
2523
|
+
key: E,
|
|
2524
2524
|
class: "bg-gray-200 px-1 py-0.5 rounded-lg mr-1"
|
|
2525
2525
|
}, V(A), 1))), 128)) : (c(), x(ie, { key: 1 }, [
|
|
2526
2526
|
g.format === "date" ? (c(), x(ie, { key: 0 }, [
|
|
@@ -2591,7 +2591,7 @@ const hu = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
|
|
|
2591
2591
|
return `/map?layers=${d}&info=${d},${y}`;
|
|
2592
2592
|
};
|
|
2593
2593
|
return (u, d) => (c(!0), x(ie, null, he(n.value, (y) => {
|
|
2594
|
-
var p, g, _, A,
|
|
2594
|
+
var p, g, _, A, E, k, S, C, M;
|
|
2595
2595
|
return c(), x("div", {
|
|
2596
2596
|
key: y.id,
|
|
2597
2597
|
class: "bg-white border border-gray-200 rounded-lg overflow-hidden transition-all duration-200 hover:shadow-md"
|
|
@@ -2613,7 +2613,7 @@ const hu = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
|
|
|
2613
2613
|
])])),
|
|
2614
2614
|
o("div", Ic, [
|
|
2615
2615
|
o("div", jc, [
|
|
2616
|
-
o("h3", zc, V(y[`${(_ = l.value) == null ? void 0 : _.name}_text`] || y[(A = l.value) == null ? void 0 : A.name] || y[(
|
|
2616
|
+
o("h3", zc, V(y[`${(_ = l.value) == null ? void 0 : _.name}_text`] || y[(A = l.value) == null ? void 0 : A.name] || y[(E = l.value) == null ? void 0 : E.label] || "Не вказано"), 1),
|
|
2617
2617
|
o("div", Nc, [
|
|
2618
2618
|
Array.isArray(i.value) && i.value.length ? (c(!0), x(ie, { key: 0 }, he(i.value, (N) => (c(), x(ie, {
|
|
2619
2619
|
key: N.name
|
|
@@ -2622,7 +2622,7 @@ const hu = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
|
|
|
2622
2622
|
], 64))), 128)) : K("", !0)
|
|
2623
2623
|
])
|
|
2624
2624
|
]),
|
|
2625
|
-
o("p", Rc, V(((S = y[((k = m.value) == null ? void 0 : k.name) + "_data"]) == null ? void 0 : S.text) || y[((C = m.value) == null ? void 0 : C.name) + "_text"] || y[(
|
|
2625
|
+
o("p", Rc, V(((S = y[((k = m.value) == null ? void 0 : k.name) + "_data"]) == null ? void 0 : S.text) || y[((C = m.value) == null ? void 0 : C.name) + "_text"] || y[(M = m.value) == null ? void 0 : M.name]), 1),
|
|
2626
2626
|
o("div", Oc, [
|
|
2627
2627
|
(c(!0), x(ie, null, he(a.value, (N) => {
|
|
2628
2628
|
var D;
|
|
@@ -4459,11 +4459,11 @@ const Jp = /* @__PURE__ */ Te(Kp, [["render", Qp]]), Jo = /* @__PURE__ */ ge({
|
|
|
4459
4459
|
return typeof (k == null ? void 0 : k.is_public) != "boolean" ? zt : k.is_public ? "Публічний" : "Приватний";
|
|
4460
4460
|
}
|
|
4461
4461
|
const f = P(() => {
|
|
4462
|
-
const k = l.data, S = (k == null ? void 0 : k.group_name) ?? s.value ?? ((k == null ? void 0 : k.group_id) != null ? String(k.group_id) : zt), C = m(k),
|
|
4462
|
+
const k = l.data, S = (k == null ? void 0 : k.group_name) ?? s.value ?? ((k == null ? void 0 : k.group_id) != null ? String(k.group_id) : zt), C = m(k), M = b(k), N = k != null && k.created_at ? v(k.created_at) : zt;
|
|
4463
4463
|
return [
|
|
4464
4464
|
{ label: "Група", value: S },
|
|
4465
4465
|
{ label: "Статус", value: C },
|
|
4466
|
-
{ label: "Видимість", value:
|
|
4466
|
+
{ label: "Видимість", value: M },
|
|
4467
4467
|
{ label: "Створено", value: N }
|
|
4468
4468
|
];
|
|
4469
4469
|
}), h = P(() => {
|
|
@@ -4471,11 +4471,11 @@ const Jp = /* @__PURE__ */ Te(Kp, [["render", Qp]]), Jo = /* @__PURE__ */ ge({
|
|
|
4471
4471
|
const k = (S = l.data) == null ? void 0 : S.description;
|
|
4472
4472
|
return k != null && k !== "" ? k : zt;
|
|
4473
4473
|
}), u = P(() => {
|
|
4474
|
-
const k = l.data, S = (k == null ? void 0 : k.holder) ?? (k == null ? void 0 : k.producer) ?? zt, C = (k == null ? void 0 : k.license) ?? zt,
|
|
4474
|
+
const k = l.data, S = (k == null ? void 0 : k.holder) ?? (k == null ? void 0 : k.producer) ?? zt, C = (k == null ? void 0 : k.license) ?? zt, M = (k == null ? void 0 : k.year) != null ? String(k.year) : zt, N = Array.isArray(k == null ? void 0 : k.keywords) && k.keywords.length > 0 ? k.keywords.join(", ") : zt;
|
|
4475
4475
|
return [
|
|
4476
4476
|
{ label: "Виробник", value: S },
|
|
4477
4477
|
{ label: "Ліцензія", value: C },
|
|
4478
|
-
{ label: "Рік", value:
|
|
4478
|
+
{ label: "Рік", value: M },
|
|
4479
4479
|
{ label: "Ключові слова", value: N }
|
|
4480
4480
|
];
|
|
4481
4481
|
}), d = T(!1), y = T({}), p = T(null), g = T(!1), _ = [
|
|
@@ -4545,7 +4545,7 @@ const Jp = /* @__PURE__ */ Te(Kp, [["render", Qp]]), Jo = /* @__PURE__ */ ge({
|
|
|
4545
4545
|
is_active: typeof (k == null ? void 0 : k.is_active) == "boolean" ? k.is_active : (k == null ? void 0 : k.enabled) ?? !1
|
|
4546
4546
|
}, p.value = null, d.value = !0;
|
|
4547
4547
|
}
|
|
4548
|
-
async function
|
|
4548
|
+
async function E() {
|
|
4549
4549
|
var k, S;
|
|
4550
4550
|
if (!(!l.entityId || !l.entityType)) {
|
|
4551
4551
|
if (p.value) {
|
|
@@ -4554,7 +4554,7 @@ const Jp = /* @__PURE__ */ Te(Kp, [["render", Qp]]), Jo = /* @__PURE__ */ ge({
|
|
|
4554
4554
|
je({
|
|
4555
4555
|
type: "warning",
|
|
4556
4556
|
title: "Валідація",
|
|
4557
|
-
message: Object.entries(C).map(([
|
|
4557
|
+
message: Object.entries(C).map(([M, N]) => `${M}: ${N}`).join(`
|
|
4558
4558
|
`)
|
|
4559
4559
|
});
|
|
4560
4560
|
return;
|
|
@@ -4562,7 +4562,7 @@ const Jp = /* @__PURE__ */ Te(Kp, [["render", Qp]]), Jo = /* @__PURE__ */ ge({
|
|
|
4562
4562
|
}
|
|
4563
4563
|
g.value = !0;
|
|
4564
4564
|
try {
|
|
4565
|
-
const C = { ...y.value },
|
|
4565
|
+
const C = { ...y.value }, M = `/api/gis-metadata/${encodeURIComponent(l.entityType)}/${encodeURIComponent(l.entityId)}`, N = await fetch(M, {
|
|
4566
4566
|
method: "POST",
|
|
4567
4567
|
headers: { "Content-Type": "application/json" },
|
|
4568
4568
|
body: JSON.stringify(C)
|
|
@@ -4649,7 +4649,7 @@ const Jp = /* @__PURE__ */ Te(Kp, [["render", Qp]]), Jo = /* @__PURE__ */ ge({
|
|
|
4649
4649
|
type: "button",
|
|
4650
4650
|
class: "px-4 py-2 rounded bg-blue-600 text-white text-sm",
|
|
4651
4651
|
disabled: g.value,
|
|
4652
|
-
onClick:
|
|
4652
|
+
onClick: E
|
|
4653
4653
|
}, V(g.value ? "Збереження…" : "Зберегти"), 9, mm)
|
|
4654
4654
|
])
|
|
4655
4655
|
]),
|
|
@@ -5236,11 +5236,11 @@ function Lm(e) {
|
|
|
5236
5236
|
}
|
|
5237
5237
|
u.bounds && t.value.fitBounds(u.bounds, { animate: !1 });
|
|
5238
5238
|
}, b = async () => {
|
|
5239
|
-
var
|
|
5239
|
+
var E, k, S, C, M, N, D;
|
|
5240
5240
|
if (typeof window > "u" || t.value) return;
|
|
5241
5241
|
const u = s();
|
|
5242
5242
|
if (!u) throw new Error("Map container not found");
|
|
5243
|
-
const d = se(e.settings) || null, y = pn((
|
|
5243
|
+
const d = se(e.settings) || null, y = pn((E = d == null ? void 0 : d.map) == null ? void 0 : E.center) || [30, 50], p = v((k = d == null ? void 0 : d.map) == null ? void 0 : k.zoom, 7), g = v((S = d == null ? void 0 : d.map) == null ? void 0 : S.maxZoom, 20), A = {
|
|
5244
5244
|
...{
|
|
5245
5245
|
attributionControl: !1,
|
|
5246
5246
|
center: y,
|
|
@@ -5259,7 +5259,7 @@ function Lm(e) {
|
|
|
5259
5259
|
oe && typeof t.value.easeTo == "function" && oe.addEventListener("click", (X) => {
|
|
5260
5260
|
X.preventDefault(), X.stopPropagation(), t.value.easeTo({ bearing: 0, pitch: 0 });
|
|
5261
5261
|
}, !0);
|
|
5262
|
-
})), (
|
|
5262
|
+
})), (M = e.controls) != null && M.scale && t.value.addControl(new maplibregl.ScaleControl(
|
|
5263
5263
|
typeof e.controls.scale == "object" ? e.controls.scale : {}
|
|
5264
5264
|
), "bottom-left"), (N = e.controls) != null && N.fullscreen && t.value.addControl(new maplibregl.FullscreenControl(), "top-right"), (D = e.controls) != null && D.geolocate && t.value.addControl(new maplibregl.GeolocateControl(
|
|
5265
5265
|
typeof e.controls.geolocate == "object" ? e.controls.geolocate : {}
|
|
@@ -5396,19 +5396,19 @@ function Pm(e, t = {}) {
|
|
|
5396
5396
|
"textMinZoom",
|
|
5397
5397
|
"textZoom",
|
|
5398
5398
|
"text-zoom"
|
|
5399
|
-
]), b = ct(e, ["text-maxzoom", "textMaxZoom", "maxzoom"]), f = ct(e, ["text-color", "textColor"]) || Tm, h = ct(e, ["text-halo-color", "textHaloColor"]) || Fm, u = ct(e, ["text-halo-width", "textHaloWidth"]), d = ct(e, ["text-halo-blur", "textHaloBlur"]), y = ct(e, ["text-offset", "textOffset"]), p = ct(e, ["text-anchor", "textAnchor"]), g = ct(e, ["text-justify", "textJustify"]), _ = ct(e, ["text-letter-spacing", "textLetterSpacing"]), A = ct(e, ["text-transform", "textTransform"]),
|
|
5399
|
+
]), b = ct(e, ["text-maxzoom", "textMaxZoom", "maxzoom"]), f = ct(e, ["text-color", "textColor"]) || Tm, h = ct(e, ["text-halo-color", "textHaloColor"]) || Fm, u = ct(e, ["text-halo-width", "textHaloWidth"]), d = ct(e, ["text-halo-blur", "textHaloBlur"]), y = ct(e, ["text-offset", "textOffset"]), p = ct(e, ["text-anchor", "textAnchor"]), g = ct(e, ["text-justify", "textJustify"]), _ = ct(e, ["text-letter-spacing", "textLetterSpacing"]), A = ct(e, ["text-transform", "textTransform"]), E = ct(e, ["symbol-placement", "symbolPlacement"]), k = ct(e, ["symbol-spacing", "symbolSpacing"]), S = ct(e, [
|
|
5400
5400
|
"text-rotation-alignment",
|
|
5401
5401
|
"textRotationAlignment"
|
|
5402
|
-
]), C = ct(e, ["text-pitch-alignment", "textPitchAlignment"]),
|
|
5402
|
+
]), C = ct(e, ["text-pitch-alignment", "textPitchAlignment"]), M = ct(e, ["text-opacity", "textOpacity"]), N = {
|
|
5403
5403
|
"text-field": l,
|
|
5404
5404
|
"text-font": jm(s),
|
|
5405
5405
|
"text-size": a,
|
|
5406
5406
|
"text-allow-overlap": v ?? !1
|
|
5407
5407
|
};
|
|
5408
|
-
y && (N["text-offset"] = y), i !== "line" && (N["text-anchor"] = p ?? "center"), g && (N["text-justify"] = g), _ !== void 0 && (N["text-letter-spacing"] = _), A && (N["text-transform"] = A), k !== void 0 && (N["symbol-spacing"] = k), i === "line" ? (N["symbol-placement"] =
|
|
5408
|
+
y && (N["text-offset"] = y), i !== "line" && (N["text-anchor"] = p ?? "center"), g && (N["text-justify"] = g), _ !== void 0 && (N["text-letter-spacing"] = _), A && (N["text-transform"] = A), k !== void 0 && (N["symbol-spacing"] = k), i === "line" ? (N["symbol-placement"] = E || "line", N["text-rotation-alignment"] = S || "map", N["text-pitch-alignment"] = C || "map") : (S && (N["text-rotation-alignment"] = S), C && (N["text-pitch-alignment"] = C), E && (N["symbol-placement"] = E)), p && i === "line" && (N["text-anchor"] = p);
|
|
5409
5409
|
const D = {
|
|
5410
5410
|
"text-color": f,
|
|
5411
|
-
"text-opacity":
|
|
5411
|
+
"text-opacity": M ?? 1
|
|
5412
5412
|
};
|
|
5413
5413
|
D["text-halo-color"] = h, u !== void 0 && (D["text-halo-width"] = u), d !== void 0 && (D["text-halo-blur"] = d);
|
|
5414
5414
|
const Q = {
|
|
@@ -6176,25 +6176,25 @@ const Hm = { class: "flex flex-col flex-1 min-h-0" }, Wm = { class: "flex flex-c
|
|
|
6176
6176
|
}
|
|
6177
6177
|
function h() {
|
|
6178
6178
|
var A;
|
|
6179
|
-
const p = [...l.value], g = ((A = n.fields) == null ? void 0 : A.filter((
|
|
6180
|
-
const { type: k, format: S, ...C } =
|
|
6179
|
+
const p = [...l.value], g = ((A = n.fields) == null ? void 0 : A.filter((E) => v.value.includes(E.name)).map((E) => {
|
|
6180
|
+
const { type: k, format: S, ...C } = E;
|
|
6181
6181
|
return {
|
|
6182
6182
|
...C,
|
|
6183
6183
|
format: S ?? k ?? "text"
|
|
6184
6184
|
};
|
|
6185
6185
|
})) || [], _ = Mn(p, g, {
|
|
6186
6186
|
selectedKeys: v.value,
|
|
6187
|
-
resolveKey: (
|
|
6187
|
+
resolveKey: (E) => nn(E)
|
|
6188
6188
|
});
|
|
6189
6189
|
if (l.value = _, i.value === "html" && g.length) {
|
|
6190
|
-
const
|
|
6191
|
-
const
|
|
6192
|
-
return `<dd>${
|
|
6190
|
+
const E = g.map((C) => {
|
|
6191
|
+
const M = C.label ?? "", N = C.name ?? C.id ?? "";
|
|
6192
|
+
return `<dd>${M}</dd>
|
|
6193
6193
|
<dt>{{ ${N} }}</dt>`;
|
|
6194
6194
|
}).join(`
|
|
6195
6195
|
`), S = (s.value ?? "").trimEnd();
|
|
6196
6196
|
s.value = S ? `${S}
|
|
6197
|
-
${
|
|
6197
|
+
${E}` : E;
|
|
6198
6198
|
}
|
|
6199
6199
|
a.value = !1, v.value = [];
|
|
6200
6200
|
}
|
|
@@ -6522,7 +6522,7 @@ const gv = { class: "map-filter" }, yv = { class: "map-filter__header" }, hv = {
|
|
|
6522
6522
|
}), p = P(() => y.value.length > 0), g = P(() => {
|
|
6523
6523
|
var F;
|
|
6524
6524
|
return ((F = n.layer) == null ? void 0 : F.name) ?? "";
|
|
6525
|
-
}), _ = P(() => y.value), A = T(null),
|
|
6525
|
+
}), _ = P(() => y.value), A = T(null), E = P(() => y.value.length), k = P(() => E.value <= 2), S = P(() => k.value ? "body" : typeof window > "u" || A.value ? Eo : "body"), C = P(() => {
|
|
6526
6526
|
if (!d.value || !k.value)
|
|
6527
6527
|
return {};
|
|
6528
6528
|
const F = typeof window < "u" ? window.innerWidth : 280, I = Math.max(280, F - 16 * 2);
|
|
@@ -6536,7 +6536,7 @@ const gv = { class: "map-filter" }, yv = { class: "map-filter__header" }, hv = {
|
|
|
6536
6536
|
maxWidth: `${I}px`
|
|
6537
6537
|
};
|
|
6538
6538
|
});
|
|
6539
|
-
function
|
|
6539
|
+
function M() {
|
|
6540
6540
|
s();
|
|
6541
6541
|
}
|
|
6542
6542
|
function N(F, $, I = 8) {
|
|
@@ -6673,7 +6673,7 @@ const gv = { class: "map-filter" }, yv = { class: "map-filter__header" }, hv = {
|
|
|
6673
6673
|
o("button", {
|
|
6674
6674
|
type: "button",
|
|
6675
6675
|
class: "map-filter__close",
|
|
6676
|
-
onClick:
|
|
6676
|
+
onClick: M
|
|
6677
6677
|
}, [
|
|
6678
6678
|
o("span", xv, [
|
|
6679
6679
|
ne(se(ln), { class: "h-4 w-4" })
|
|
@@ -6744,36 +6744,36 @@ const gv = { class: "map-filter" }, yv = { class: "map-filter__header" }, hv = {
|
|
|
6744
6744
|
},
|
|
6745
6745
|
none: {}
|
|
6746
6746
|
}, n = { z: 13, x: 4790, y: 2762 };
|
|
6747
|
-
function r(
|
|
6748
|
-
if (
|
|
6749
|
-
return
|
|
6747
|
+
function r(E) {
|
|
6748
|
+
if (E)
|
|
6749
|
+
return E.replace(/{z}/gi, String(n.z)).replace(/{x}/gi, String(n.x)).replace(/{y}/gi, String(n.y));
|
|
6750
6750
|
}
|
|
6751
|
-
function l(
|
|
6752
|
-
let S =
|
|
6751
|
+
function l(E, k) {
|
|
6752
|
+
let S = E || `layers-${Object.keys(k).length}`, C = 1;
|
|
6753
6753
|
for (; k[S]; )
|
|
6754
|
-
S = `${
|
|
6754
|
+
S = `${E}-${C}`, C += 1;
|
|
6755
6755
|
return S;
|
|
6756
6756
|
}
|
|
6757
6757
|
const i = rn(), s = (g = i == null ? void 0 : i.appContext.config.globalProperties) == null ? void 0 : g.$settings, a = s == null ? void 0 : s.map, v = Lt(), m = Pt();
|
|
6758
6758
|
function b() {
|
|
6759
|
-
const
|
|
6760
|
-
return !
|
|
6759
|
+
const E = v == null ? void 0 : v.query;
|
|
6760
|
+
return !E || typeof E != "object" ? null : typeof E.basemap == "string" ? E.basemap : null;
|
|
6761
6761
|
}
|
|
6762
6762
|
const f = P(() => b()), h = P(() => {
|
|
6763
|
-
const
|
|
6764
|
-
if (!
|
|
6763
|
+
const E = Array.isArray(a == null ? void 0 : a.basemaps) ? a == null ? void 0 : a.basemaps : [];
|
|
6764
|
+
if (!E.length) return {};
|
|
6765
6765
|
const k = {};
|
|
6766
|
-
return
|
|
6767
|
-
const
|
|
6766
|
+
return E.forEach((S, C) => {
|
|
6767
|
+
const M = S.name ?? S.title ?? `basemap-${C}`, N = (S.id ?? M ?? `basemap-${C}`).toString().toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, ""), D = l(N || `basemap-${C}`, k), Q = S.preview || (S.url ? r(S.url) : void 0);
|
|
6768
6768
|
k[D] = {
|
|
6769
6769
|
url: S.url,
|
|
6770
6770
|
preview: Q,
|
|
6771
|
-
title:
|
|
6771
|
+
title: M
|
|
6772
6772
|
};
|
|
6773
6773
|
}), k;
|
|
6774
6774
|
}), u = P(() => {
|
|
6775
|
-
const
|
|
6776
|
-
return Object.keys(
|
|
6775
|
+
const E = h.value;
|
|
6776
|
+
return Object.keys(E).length ? E : t;
|
|
6777
6777
|
}), d = T(
|
|
6778
6778
|
f.value ?? Object.keys(u.value)[0] ?? "gki"
|
|
6779
6779
|
), y = Xe("base", {
|
|
@@ -6783,42 +6783,42 @@ const gv = { class: "map-filter" }, yv = { class: "map-filter__header" }, hv = {
|
|
|
6783
6783
|
},
|
|
6784
6784
|
beforeId: 0
|
|
6785
6785
|
});
|
|
6786
|
-
function p(
|
|
6787
|
-
if (!u.value[
|
|
6788
|
-
d.value =
|
|
6789
|
-
const k = u.value[
|
|
6786
|
+
function p(E) {
|
|
6787
|
+
if (!u.value[E]) return;
|
|
6788
|
+
d.value = E;
|
|
6789
|
+
const k = u.value[E];
|
|
6790
6790
|
if (!(k != null && k.url)) {
|
|
6791
6791
|
y.setVisible(!1);
|
|
6792
6792
|
return;
|
|
6793
6793
|
}
|
|
6794
|
-
y.setVisible(!0), y.setTiles([k.url]), typeof window < "u" && b() !==
|
|
6794
|
+
y.setVisible(!0), y.setTiles([k.url]), typeof window < "u" && b() !== E && m.replace({ query: { ...v == null ? void 0 : v.query, basemap: E } }).catch(() => {
|
|
6795
6795
|
});
|
|
6796
6796
|
}
|
|
6797
6797
|
return le(
|
|
6798
6798
|
() => u.value,
|
|
6799
|
-
(
|
|
6800
|
-
const k = f.value &&
|
|
6801
|
-
|
|
6802
|
-
const S =
|
|
6799
|
+
(E) => {
|
|
6800
|
+
const k = f.value && E[f.value] ? f.value : d.value;
|
|
6801
|
+
E[k] ? d.value = k : d.value = Object.keys(E)[0] ?? k;
|
|
6802
|
+
const S = E[d.value];
|
|
6803
6803
|
S != null && S.url ? (y.setVisible(!0), y.setTiles([S.url])) : y.setVisible(!1);
|
|
6804
6804
|
},
|
|
6805
6805
|
{ immediate: !0 }
|
|
6806
6806
|
), le(
|
|
6807
6807
|
() => [f.value, u.value],
|
|
6808
|
-
([
|
|
6809
|
-
if (typeof
|
|
6810
|
-
d.value =
|
|
6811
|
-
const k = u.value[
|
|
6808
|
+
([E]) => {
|
|
6809
|
+
if (typeof E != "string" || !u.value[E] || d.value === E) return;
|
|
6810
|
+
d.value = E;
|
|
6811
|
+
const k = u.value[E];
|
|
6812
6812
|
if (!(k != null && k.url)) {
|
|
6813
6813
|
y.setVisible(!1);
|
|
6814
6814
|
return;
|
|
6815
6815
|
}
|
|
6816
6816
|
y.setVisible(!0), y.setTiles([k.url]);
|
|
6817
6817
|
}
|
|
6818
|
-
), (
|
|
6818
|
+
), (E, k) => (c(), x("div", kv, [
|
|
6819
6819
|
(c(!0), x(ie, null, he(u.value, (S, C) => (c(), x("div", {
|
|
6820
6820
|
key: C,
|
|
6821
|
-
onClick: (
|
|
6821
|
+
onClick: (M) => p(C)
|
|
6822
6822
|
}, [
|
|
6823
6823
|
C !== "none" && S.url ? (c(), x("div", {
|
|
6824
6824
|
key: 0,
|
|
@@ -6977,7 +6977,7 @@ const Ev = { class: "min-w-[200px] max-w-[280px] rounded-lg border border-slate-
|
|
|
6977
6977
|
return p;
|
|
6978
6978
|
}
|
|
6979
6979
|
function b(y, p, g) {
|
|
6980
|
-
const _ = y.name || y.label || y.title || `field-${g}`, A = y.label || y.title || y.name || _,
|
|
6980
|
+
const _ = y.name || y.label || y.title || `field-${g}`, A = y.label || y.title || y.name || _, E = y.name ? p[y.name] : void 0, S = (y.name ? p[`${y.name}_text`] : void 0) ?? E ?? y.value ?? null;
|
|
6981
6981
|
return {
|
|
6982
6982
|
key: _,
|
|
6983
6983
|
label: A,
|
|
@@ -7009,9 +7009,9 @@ const Ev = { class: "min-w-[200px] max-w-[280px] rounded-lg border border-slate-
|
|
|
7009
7009
|
top: 0,
|
|
7010
7010
|
width: window.innerWidth,
|
|
7011
7011
|
height: window.innerHeight
|
|
7012
|
-
}, _ = ((re = (O = i.value) == null ? void 0 : O.getContainer) == null ? void 0 : re.call(O)) || void 0, A = (_ == null ? void 0 : _.getBoundingClientRect()) ?? g,
|
|
7013
|
-
let oe =
|
|
7014
|
-
oe + S + N > g.width && (oe =
|
|
7012
|
+
}, _ = ((re = (O = i.value) == null ? void 0 : O.getContainer) == null ? void 0 : re.call(O)) || void 0, A = (_ == null ? void 0 : _.getBoundingClientRect()) ?? g, E = A.left - g.left, k = A.top - g.top, S = y.offsetWidth || 0, C = y.offsetHeight || 0, M = 12, N = 8, [D, Q] = t.value;
|
|
7013
|
+
let oe = E + D + M, ae = k + Q + M;
|
|
7014
|
+
oe + S + N > g.width && (oe = E + D - S - M), ae + C + N > g.height && (ae = k + Q - C - M);
|
|
7015
7015
|
const X = N, ue = N, Y = Math.max(N, g.width - S - N), R = Math.max(N, g.height - C - N);
|
|
7016
7016
|
oe = Math.min(Math.max(oe, X), Y), ae = Math.min(Math.max(ae, ue), R), a.value = { left: `${oe}px`, top: `${ae}px` };
|
|
7017
7017
|
}
|
|
@@ -7060,7 +7060,7 @@ function jv() {
|
|
|
7060
7060
|
async function p() {
|
|
7061
7061
|
await t();
|
|
7062
7062
|
const oe = e.value;
|
|
7063
|
-
oe && (y(), d(), oe.on("click", g), h = () => oe.off("click", g), Q(
|
|
7063
|
+
oe && (y(), d(), oe.on("click", g), h = () => oe.off("click", g), Q(M()));
|
|
7064
7064
|
}
|
|
7065
7065
|
function g(oe) {
|
|
7066
7066
|
const ae = e.value;
|
|
@@ -7085,7 +7085,7 @@ function jv() {
|
|
|
7085
7085
|
function A() {
|
|
7086
7086
|
m.value >= v.value.length - 1 || _(m.value + 1);
|
|
7087
7087
|
}
|
|
7088
|
-
function
|
|
7088
|
+
function E() {
|
|
7089
7089
|
m.value <= 0 || _(m.value - 1);
|
|
7090
7090
|
}
|
|
7091
7091
|
async function k(oe, ae) {
|
|
@@ -7136,7 +7136,7 @@ function jv() {
|
|
|
7136
7136
|
y(), d();
|
|
7137
7137
|
}
|
|
7138
7138
|
t().then(p), Ve(() => C());
|
|
7139
|
-
function
|
|
7139
|
+
function M() {
|
|
7140
7140
|
const oe = Array.isArray(n.query.info) ? n.query.info[0] : n.query.info;
|
|
7141
7141
|
return typeof oe != "string" ? null : oe.trim() || null;
|
|
7142
7142
|
}
|
|
@@ -7146,7 +7146,7 @@ function jv() {
|
|
|
7146
7146
|
return !ae || X === void 0 || X === null ? null : `${ae},${X}`.trim() || null;
|
|
7147
7147
|
}
|
|
7148
7148
|
function D(oe) {
|
|
7149
|
-
const ae = N(oe), X =
|
|
7149
|
+
const ae = N(oe), X = M();
|
|
7150
7150
|
if (ae === X) return;
|
|
7151
7151
|
const ue = { ...n.query };
|
|
7152
7152
|
ae ? ue.info = ae : delete ue.info, r.push({ query: ue }).catch(() => {
|
|
@@ -7178,7 +7178,7 @@ function jv() {
|
|
|
7178
7178
|
}
|
|
7179
7179
|
}
|
|
7180
7180
|
return le(
|
|
7181
|
-
() =>
|
|
7181
|
+
() => M(),
|
|
7182
7182
|
(oe) => {
|
|
7183
7183
|
oe !== N(i.value) && (u = !0, Q(oe).finally(() => {
|
|
7184
7184
|
u = !1;
|
|
@@ -7192,7 +7192,7 @@ function jv() {
|
|
|
7192
7192
|
isOpen: f,
|
|
7193
7193
|
close: S,
|
|
7194
7194
|
next: A,
|
|
7195
|
-
prev:
|
|
7195
|
+
prev: E,
|
|
7196
7196
|
count: b,
|
|
7197
7197
|
index: m
|
|
7198
7198
|
};
|
|
@@ -7202,17 +7202,17 @@ function zv() {
|
|
|
7202
7202
|
let h = null;
|
|
7203
7203
|
const u = () => {
|
|
7204
7204
|
h == null || h.remove(), h = null;
|
|
7205
|
-
}, d = (
|
|
7205
|
+
}, d = (M) => M ? M.type === "FeatureCollection" ? M : M.type === "Feature" ? { type: "FeatureCollection", features: [M] } : M.type && Array.isArray(M.coordinates) ? {
|
|
7206
7206
|
type: "FeatureCollection",
|
|
7207
|
-
features: [{ type: "Feature", geometry:
|
|
7208
|
-
} : Array.isArray(
|
|
7207
|
+
features: [{ type: "Feature", geometry: M, properties: {} }]
|
|
7208
|
+
} : Array.isArray(M.features) ? { type: "FeatureCollection", features: M.features } : M.geometry ? d(M.geometry) : null : null, y = () => ({
|
|
7209
7209
|
type: "line",
|
|
7210
7210
|
color: "#0a57ff",
|
|
7211
7211
|
width: 4,
|
|
7212
7212
|
opacity: 0.95
|
|
7213
|
-
}), p = (
|
|
7213
|
+
}), p = (M) => Number(M.toFixed(5)), g = async (M) => {
|
|
7214
7214
|
if (await t(), !e.value) return;
|
|
7215
|
-
const N = d(
|
|
7215
|
+
const N = d(M);
|
|
7216
7216
|
N && (u(), h = Xe(
|
|
7217
7217
|
"feature-highlight",
|
|
7218
7218
|
{
|
|
@@ -7221,9 +7221,9 @@ function zv() {
|
|
|
7221
7221
|
},
|
|
7222
7222
|
e
|
|
7223
7223
|
));
|
|
7224
|
-
}, _ = async (
|
|
7224
|
+
}, _ = async (M, N, D) => {
|
|
7225
7225
|
var ae, X;
|
|
7226
|
-
const [Q, oe] = [p(
|
|
7226
|
+
const [Q, oe] = [p(M), p(N)];
|
|
7227
7227
|
v.value = { x: Q, y: oe }, m.value = D, i.value = !0, s.value = null, n.value = [], a.value = {}, l.value = 0;
|
|
7228
7228
|
try {
|
|
7229
7229
|
const ue = D.map(async (F) => {
|
|
@@ -7248,25 +7248,25 @@ function zv() {
|
|
|
7248
7248
|
} finally {
|
|
7249
7249
|
i.value = !1;
|
|
7250
7250
|
}
|
|
7251
|
-
}, A = async (
|
|
7251
|
+
}, A = async (M) => {
|
|
7252
7252
|
if (!v.value || !m.value.length) return;
|
|
7253
|
-
if (a.value[
|
|
7254
|
-
n.value[
|
|
7253
|
+
if (a.value[M]) {
|
|
7254
|
+
n.value[M] = a.value[M];
|
|
7255
7255
|
return;
|
|
7256
7256
|
}
|
|
7257
|
-
const { x: N, y: D } = v.value, Q = m.value.join(","), oe = `/api/map-info-point?x=${N}&y=${D}&index=${
|
|
7257
|
+
const { x: N, y: D } = v.value, Q = m.value.join(","), oe = `/api/map-info-point?x=${N}&y=${D}&index=${M}&layers=${Q}`;
|
|
7258
7258
|
try {
|
|
7259
7259
|
i.value = !0;
|
|
7260
7260
|
const ae = await fetch(oe);
|
|
7261
7261
|
if (!ae.ok) throw new Error("Failed to fetch feature by index");
|
|
7262
7262
|
const X = await ae.json();
|
|
7263
|
-
n.value[
|
|
7263
|
+
n.value[M] = X, a.value[M] = X;
|
|
7264
7264
|
} catch (ae) {
|
|
7265
7265
|
s.value = ae.message;
|
|
7266
7266
|
} finally {
|
|
7267
7267
|
i.value = !1;
|
|
7268
7268
|
}
|
|
7269
|
-
},
|
|
7269
|
+
}, E = async () => {
|
|
7270
7270
|
l.value < r.value - 1 && (l.value += 1, a.value[l.value] || await A(l.value));
|
|
7271
7271
|
}, k = async () => {
|
|
7272
7272
|
l.value > 0 && (l.value -= 1, a.value[l.value] || await A(l.value));
|
|
@@ -7275,16 +7275,16 @@ function zv() {
|
|
|
7275
7275
|
};
|
|
7276
7276
|
le(l, async () => {
|
|
7277
7277
|
var N, D;
|
|
7278
|
-
const
|
|
7279
|
-
if (
|
|
7280
|
-
const Q = ((N =
|
|
7278
|
+
const M = b.value;
|
|
7279
|
+
if (M) {
|
|
7280
|
+
const Q = ((N = M == null ? void 0 : M.data) == null ? void 0 : N.geom_4326) ?? ((D = M == null ? void 0 : M.data) == null ? void 0 : D.geom);
|
|
7281
7281
|
await g(Q);
|
|
7282
7282
|
}
|
|
7283
7283
|
});
|
|
7284
7284
|
let C = null;
|
|
7285
7285
|
return Ue(async () => {
|
|
7286
|
-
await t(), e.value && (C = async (
|
|
7287
|
-
const { lng: N, lat: D } =
|
|
7286
|
+
await t(), e.value && (C = async (M) => {
|
|
7287
|
+
const { lng: N, lat: D } = M.lngLat, Q = Xe(), ae = Object.entries(Q).map(([X, ue]) => {
|
|
7288
7288
|
var Y, R, O, re;
|
|
7289
7289
|
return {
|
|
7290
7290
|
id: X,
|
|
@@ -7312,7 +7312,7 @@ function zv() {
|
|
|
7312
7312
|
loading: i,
|
|
7313
7313
|
error: s,
|
|
7314
7314
|
active: f,
|
|
7315
|
-
next:
|
|
7315
|
+
next: E,
|
|
7316
7316
|
prev: k,
|
|
7317
7317
|
close: S
|
|
7318
7318
|
};
|
|
@@ -7389,8 +7389,8 @@ function Rv(e) {
|
|
|
7389
7389
|
}
|
|
7390
7390
|
function or(e) {
|
|
7391
7391
|
function t(s, a = {}, v, m) {
|
|
7392
|
-
var A,
|
|
7393
|
-
const b = to(s == null ? void 0 : s.id), f = ((A = s == null ? void 0 : s.title) == null ? void 0 : A.trim()) || b, h = ((
|
|
7392
|
+
var A, E;
|
|
7393
|
+
const b = to(s == null ? void 0 : s.id), f = ((A = s == null ? void 0 : s.title) == null ? void 0 : A.trim()) || b, h = ((E = s == null ? void 0 : s.url) == null ? void 0 : E.trim()) || "";
|
|
7394
7394
|
if (!b || !h) return;
|
|
7395
7395
|
const u = Nv(h, a);
|
|
7396
7396
|
if (!u) return;
|
|
@@ -7550,7 +7550,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
|
|
|
7550
7550
|
}), g = Lt(), {
|
|
7551
7551
|
activateTemporaryLayer: _,
|
|
7552
7552
|
deactivateTemporaryLayer: A,
|
|
7553
|
-
clearTemporaryLayers:
|
|
7553
|
+
clearTemporaryLayers: E,
|
|
7554
7554
|
isTemporaryLayerActive: k
|
|
7555
7555
|
} = or(d.map);
|
|
7556
7556
|
function S(L) {
|
|
@@ -7559,7 +7559,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
|
|
|
7559
7559
|
const C = P(() => {
|
|
7560
7560
|
var L;
|
|
7561
7561
|
return ((L = n.cardFeature.value) == null ? void 0 : L.source) ?? null;
|
|
7562
|
-
}),
|
|
7562
|
+
}), M = P(() => C.value ? `map-card:${C.value}` : "map-card"), N = P(() => {
|
|
7563
7563
|
var ve, ke;
|
|
7564
7564
|
const L = n.cardFeature.value, j = (L == null ? void 0 : L.source) || ((ve = L == null ? void 0 : L.layer) == null ? void 0 : ve.id), Z = ((ke = L == null ? void 0 : L.properties) == null ? void 0 : ke.id) ?? (L == null ? void 0 : L.id);
|
|
7565
7565
|
return j && Z != null ? `${j}:${Z}` : null;
|
|
@@ -7918,9 +7918,9 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
|
|
|
7918
7918
|
if (!(L != null && L.id)) return;
|
|
7919
7919
|
await $t();
|
|
7920
7920
|
const j = Mt(), Z = be.value.find((Je) => Je.spec.id === L.id), ve = Ie.value.find((Je) => Je.id === L.id), ke = (Z == null ? void 0 : Z.spec) || xe(ve) || xe(L), ze = (Z == null ? void 0 : Z.spec.bounds) ?? (ve == null ? void 0 : ve.bounds);
|
|
7921
|
-
if (!ke || k(ke.id,
|
|
7921
|
+
if (!ke || k(ke.id, M.value))
|
|
7922
7922
|
return;
|
|
7923
|
-
const Qe =
|
|
7923
|
+
const Qe = M.value || void 0;
|
|
7924
7924
|
D.value = Qe ?? null, _(ke, j, Qe), S({
|
|
7925
7925
|
action: "activate",
|
|
7926
7926
|
owner: Qe,
|
|
@@ -7957,7 +7957,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
|
|
|
7957
7957
|
!!(Z != null && Z.checked) ? mt(L) : Bt(L.id);
|
|
7958
7958
|
}
|
|
7959
7959
|
function yn() {
|
|
7960
|
-
return D.value ||
|
|
7960
|
+
return D.value || M.value || null;
|
|
7961
7961
|
}
|
|
7962
7962
|
le(
|
|
7963
7963
|
C,
|
|
@@ -7973,7 +7973,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
|
|
|
7973
7973
|
} = r, Ee = P(() => n.count.value), qe = P(() => n.index.value), $e = P(() => Ee.value > 1), Ge = P(() => m.value ? W.value : Ee.value), He = P(() => m.value ? de.value : qe.value), _e = n.next, Ye = n.prev;
|
|
7974
7974
|
function Ke() {
|
|
7975
7975
|
const L = yn();
|
|
7976
|
-
L && (
|
|
7976
|
+
L && (E(L), S({ action: "clear", owner: L }), D.value = null);
|
|
7977
7977
|
}
|
|
7978
7978
|
function tt() {
|
|
7979
7979
|
l.value = null, i.value = null, n.close(), r.close(), Ke();
|
|
@@ -8436,14 +8436,14 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
|
|
|
8436
8436
|
return null;
|
|
8437
8437
|
}
|
|
8438
8438
|
async function f() {
|
|
8439
|
-
var g, _, A,
|
|
8439
|
+
var g, _, A, E;
|
|
8440
8440
|
if (!t.layerId || !r.value) {
|
|
8441
8441
|
s();
|
|
8442
8442
|
return;
|
|
8443
8443
|
}
|
|
8444
8444
|
typeof l == "function" && await l().catch(() => {
|
|
8445
8445
|
});
|
|
8446
|
-
const d = t.boundary ?? ((g = t.settingsMap) == null ? void 0 : g.boundary) ?? ((_ = n == null ? void 0 : n.map) == null ? void 0 : _.boundary) ?? null, y = t.katottg ?? ((A = t.settingsMap) == null ? void 0 : A.katottg) ?? ((
|
|
8446
|
+
const d = t.boundary ?? ((g = t.settingsMap) == null ? void 0 : g.boundary) ?? ((_ = n == null ? void 0 : n.map) == null ? void 0 : _.boundary) ?? null, y = t.katottg ?? ((A = t.settingsMap) == null ? void 0 : A.katottg) ?? ((E = n == null ? void 0 : n.map) == null ? void 0 : E.katottg) ?? null;
|
|
8447
8447
|
if (!d && !y) {
|
|
8448
8448
|
s();
|
|
8449
8449
|
return;
|
|
@@ -8490,20 +8490,20 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
|
|
|
8490
8490
|
});
|
|
8491
8491
|
function b(_) {
|
|
8492
8492
|
if (Array.isArray(_) && _.length >= 2) {
|
|
8493
|
-
const [A,
|
|
8494
|
-
return Number.isNaN(A) || Number.isNaN(
|
|
8493
|
+
const [A, E] = _.slice(0, 2).map((k) => Number(k));
|
|
8494
|
+
return Number.isNaN(A) || Number.isNaN(E) ? null : [A, E];
|
|
8495
8495
|
}
|
|
8496
8496
|
if (_ && typeof _ == "object") {
|
|
8497
|
-
const A = _,
|
|
8498
|
-
if (
|
|
8499
|
-
const S = Number(
|
|
8497
|
+
const A = _, E = A.lng ?? A.lon ?? A.long ?? A.x, k = A.lat ?? A.y;
|
|
8498
|
+
if (E != null && k != null) {
|
|
8499
|
+
const S = Number(E), C = Number(k);
|
|
8500
8500
|
if (!Number.isNaN(S) && !Number.isNaN(C))
|
|
8501
8501
|
return [S, C];
|
|
8502
8502
|
}
|
|
8503
8503
|
}
|
|
8504
8504
|
if (typeof _ == "string") {
|
|
8505
|
-
const A = _.split(",").map((
|
|
8506
|
-
if (A.length >= 2 && A.every((
|
|
8505
|
+
const A = _.split(",").map((E) => Number(E.trim()));
|
|
8506
|
+
if (A.length >= 2 && A.every((E) => !Number.isNaN(E)))
|
|
8507
8507
|
return [A[0], A[1]];
|
|
8508
8508
|
}
|
|
8509
8509
|
return null;
|
|
@@ -8577,8 +8577,8 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
|
|
|
8577
8577
|
const A = l.value || (() => {
|
|
8578
8578
|
const k = _.getCenter();
|
|
8579
8579
|
return [k.lng, k.lat];
|
|
8580
|
-
})(),
|
|
8581
|
-
_.flyTo({ center: A, zoom:
|
|
8580
|
+
})(), E = i.value ?? _.getZoom();
|
|
8581
|
+
_.flyTo({ center: A, zoom: E });
|
|
8582
8582
|
}
|
|
8583
8583
|
function g() {
|
|
8584
8584
|
const _ = n.value;
|
|
@@ -8671,7 +8671,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
|
|
|
8671
8671
|
};
|
|
8672
8672
|
r.query.z === ye.z && r.query.x === ye.x && r.query.y === ye.y || l.replace({ query: ye });
|
|
8673
8673
|
}
|
|
8674
|
-
const
|
|
8674
|
+
const E = T(null), k = T(""), S = T([]), C = T([]), M = T([]), N = T("list"), D = T(""), Q = T([]), oe = T(!0);
|
|
8675
8675
|
let ae = null;
|
|
8676
8676
|
const X = P(() => {
|
|
8677
8677
|
var w, z;
|
|
@@ -8758,7 +8758,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
|
|
|
8758
8758
|
function U() {
|
|
8759
8759
|
var z;
|
|
8760
8760
|
if (!m.value) return;
|
|
8761
|
-
const w = I(
|
|
8761
|
+
const w = I(E.value);
|
|
8762
8762
|
B(w, ((z = m.value) == null ? void 0 : z.style) ?? null) || (m.value = {
|
|
8763
8763
|
...m.value,
|
|
8764
8764
|
style: w
|
|
@@ -8776,7 +8776,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
|
|
|
8776
8776
|
const z = await w.json();
|
|
8777
8777
|
v.value = z || {}, a.value = i;
|
|
8778
8778
|
const ee = I(z.style);
|
|
8779
|
-
m.value = z ? { ...z, style: $(ee) } : null,
|
|
8779
|
+
m.value = z ? { ...z, style: $(ee) } : null, E.value = ee, k.value = typeof (z == null ? void 0 : z.style) == "string" ? z.style : ee ? jr.dump(ee) : "", C.value = (z == null ? void 0 : z.popup) || [], N.value = z.card_mode === "html" ? "html" : "list", M.value = z.card, D.value = z.html, S.value = (z == null ? void 0 : z.legend) || [], Q.value = (z == null ? void 0 : z.filters) || [];
|
|
8780
8780
|
} catch (w) {
|
|
8781
8781
|
console.error("Failed to fetch map info", w);
|
|
8782
8782
|
}
|
|
@@ -8787,11 +8787,11 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
|
|
|
8787
8787
|
return (w = m.value) == null ? void 0 : w.style;
|
|
8788
8788
|
},
|
|
8789
8789
|
(w) => {
|
|
8790
|
-
|
|
8790
|
+
E.value = I(w);
|
|
8791
8791
|
},
|
|
8792
8792
|
{ deep: !0 }
|
|
8793
8793
|
), le(
|
|
8794
|
-
() =>
|
|
8794
|
+
() => E.value,
|
|
8795
8795
|
() => {
|
|
8796
8796
|
te();
|
|
8797
8797
|
},
|
|
@@ -8803,7 +8803,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
|
|
|
8803
8803
|
await Fe({ [w]: z }, w);
|
|
8804
8804
|
}
|
|
8805
8805
|
function xe() {
|
|
8806
|
-
const w = $(
|
|
8806
|
+
const w = $(E.value);
|
|
8807
8807
|
m.value = m.value ? { ...m.value, style: w } : m.value;
|
|
8808
8808
|
}
|
|
8809
8809
|
async function Fe(w, z) {
|
|
@@ -8831,7 +8831,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
|
|
|
8831
8831
|
return;
|
|
8832
8832
|
}
|
|
8833
8833
|
const ee = (z == null ? void 0 : z.card_mode) === "html" ? "html" : "list", ye = ee === "html" && typeof (z == null ? void 0 : z.html) == "string" ? z.html : "", Me = (ee === "html" ? [] : null) || (Array.isArray(z == null ? void 0 : z.list) ? z.list : []);
|
|
8834
|
-
|
|
8834
|
+
M.value = Me, N.value = ee, D.value = ye;
|
|
8835
8835
|
const we = {
|
|
8836
8836
|
card_mode: ee
|
|
8837
8837
|
};
|
|
@@ -8963,8 +8963,8 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
|
|
|
8963
8963
|
key: 0,
|
|
8964
8964
|
token: X.value,
|
|
8965
8965
|
"style-text": k.value,
|
|
8966
|
-
"style-yaml":
|
|
8967
|
-
"onUpdate:styleYaml": z[2] || (z[2] = (we) =>
|
|
8966
|
+
"style-yaml": E.value,
|
|
8967
|
+
"onUpdate:styleYaml": z[2] || (z[2] = (we) => E.value = we),
|
|
8968
8968
|
"onUpdate:styleText": z[3] || (z[3] = (we) => k.value = we),
|
|
8969
8969
|
onUpdate: xe
|
|
8970
8970
|
}, null, 8, ["token", "style-text", "style-yaml"])) : re.value === "legend" ? (c(), pe(tv, {
|
|
@@ -8983,11 +8983,11 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
|
|
|
8983
8983
|
}, null, 8, ["token", "columns", "fields"])) : re.value === "card" ? (c(), pe(uv, {
|
|
8984
8984
|
key: 3,
|
|
8985
8985
|
token: X.value,
|
|
8986
|
-
columns:
|
|
8986
|
+
columns: M.value,
|
|
8987
8987
|
fields: v.value.fields,
|
|
8988
8988
|
"view-mode": N.value,
|
|
8989
8989
|
html: D.value,
|
|
8990
|
-
"onUpdate:columns": z[8] || (z[8] = (we) =>
|
|
8990
|
+
"onUpdate:columns": z[8] || (z[8] = (we) => M.value = we),
|
|
8991
8991
|
onSave: Ne
|
|
8992
8992
|
}, null, 8, ["token", "columns", "fields", "view-mode", "html"])) : re.value === "filter" ? (c(), pe(dv, {
|
|
8993
8993
|
key: 4,
|
|
@@ -9356,18 +9356,18 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
|
|
|
9356
9356
|
le(s, (U) => {
|
|
9357
9357
|
U && st(O);
|
|
9358
9358
|
});
|
|
9359
|
-
const h = T(!1), u = T(null), d = T({}), y = T(null), p = T(""), g = T(!1), _ = T(!1), A = T(null),
|
|
9359
|
+
const h = T(!1), u = T(null), d = T({}), y = T(null), p = T(""), g = T(!1), _ = T(!1), A = T(null), E = P(() => n.entityId || ""), k = (U, te) => U ? typeof U == "function" ? U(te) : typeof U != "string" ? "" : U.includes(":id") ? te ? U.replace(":id", encodeURIComponent(te)) : "" : U : "", S = P(() => {
|
|
9360
9360
|
var U;
|
|
9361
9361
|
return (U = n.table) == null ? void 0 : U.trim();
|
|
9362
9362
|
}), C = P(() => {
|
|
9363
9363
|
if (n.formEndpoint) return n.formEndpoint;
|
|
9364
9364
|
if (S.value)
|
|
9365
9365
|
return (U) => `/api/form/${S.value}/${U}`;
|
|
9366
|
-
}),
|
|
9366
|
+
}), M = P(() => {
|
|
9367
9367
|
if (n.saveEndpoint) return n.saveEndpoint;
|
|
9368
9368
|
if (S.value)
|
|
9369
9369
|
return (U) => `/api/table/${U}`;
|
|
9370
|
-
}), N = P(() => k(C.value,
|
|
9370
|
+
}), N = P(() => k(C.value, E.value)), D = P(() => n.saveEndpoint ? k(n.saveEndpoint, E.value) : A.value ? `/api/table/${encodeURIComponent(A.value)}` : k(M.value, E.value)), Q = P(() => k("/api/gis-clear-rtile/:id", E.value)), oe = P(() => k("/api/gis-xml/:id", E.value)), ae = P(() => {
|
|
9371
9371
|
var fe, me, xe;
|
|
9372
9372
|
const U = (me = (fe = n.entityInfo) == null ? void 0 : fe.name) == null ? void 0 : me.trim();
|
|
9373
9373
|
if (U) return `Редагування ${U}`;
|
|
@@ -9407,7 +9407,7 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
|
|
|
9407
9407
|
});
|
|
9408
9408
|
async function $() {
|
|
9409
9409
|
var U, te, fe;
|
|
9410
|
-
if (!(!
|
|
9410
|
+
if (!(!E.value || !N.value)) {
|
|
9411
9411
|
R(), h.value = !0, g.value = !0, p.value = "", u.value = null, d.value = {}, A.value = null;
|
|
9412
9412
|
try {
|
|
9413
9413
|
const me = await fetch(N.value);
|
|
@@ -9429,7 +9429,7 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
|
|
|
9429
9429
|
}
|
|
9430
9430
|
async function B() {
|
|
9431
9431
|
var U, te;
|
|
9432
|
-
if (!(!
|
|
9432
|
+
if (!(!E.value || !D.value)) {
|
|
9433
9433
|
if (y.value) {
|
|
9434
9434
|
const fe = (te = (U = y.value).validate) == null ? void 0 : te.call(U);
|
|
9435
9435
|
if (fe) {
|
|
@@ -9650,17 +9650,17 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
|
|
|
9650
9650
|
const w = (z = Q.value) == null ? void 0 : z.name;
|
|
9651
9651
|
document.title = w ? `${w} — Растер` : ay;
|
|
9652
9652
|
}
|
|
9653
|
-
const
|
|
9653
|
+
const E = P(() => {
|
|
9654
9654
|
var z;
|
|
9655
9655
|
const w = (z = s.value) == null ? void 0 : z.url;
|
|
9656
9656
|
return w ? /^https?:\/\//i.test(w) || typeof window > "u" || typeof location > "u" ? w : `${location.origin}${w}` : "";
|
|
9657
9657
|
}), k = P(() => {
|
|
9658
9658
|
var w;
|
|
9659
9659
|
return ((w = s.value) == null ? void 0 : w.extent) ?? null;
|
|
9660
|
-
}), S = P(() => i.value ? `raster-${i.value}` : void 0), C = P(() => i.value ? `raster-extent-${i.value}` : "raster-extent"),
|
|
9660
|
+
}), S = P(() => i.value ? `raster-${i.value}` : void 0), C = P(() => i.value ? `raster-extent-${i.value}` : "raster-extent"), M = P(() => {
|
|
9661
9661
|
const w = S.value ?? "raster", z = k.value && k.value.length === 4 ? k.value.join(",") : "no-extent";
|
|
9662
9662
|
return `${w}-${z}`;
|
|
9663
|
-
}), N = P(() => !!
|
|
9663
|
+
}), N = P(() => !!E.value), D = P(() => {
|
|
9664
9664
|
const w = k.value;
|
|
9665
9665
|
if (!w || w.length !== 4) return null;
|
|
9666
9666
|
const [z, ee, ye, Me] = w;
|
|
@@ -9924,8 +9924,8 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
|
|
|
9924
9924
|
}, {
|
|
9925
9925
|
default: Oe(() => [
|
|
9926
9926
|
N.value && v.value ? (c(), pe(Eg, {
|
|
9927
|
-
key:
|
|
9928
|
-
"tile-url":
|
|
9927
|
+
key: M.value,
|
|
9928
|
+
"tile-url": E.value,
|
|
9929
9929
|
extent: k.value,
|
|
9930
9930
|
"layer-id": S.value,
|
|
9931
9931
|
"show-raster-extent": b.value,
|
|
@@ -10374,7 +10374,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
10374
10374
|
console.warn("CartoCSS map-format (id) error", g);
|
|
10375
10375
|
}
|
|
10376
10376
|
}, h = async (u) => {
|
|
10377
|
-
var g, _, A,
|
|
10377
|
+
var g, _, A, E;
|
|
10378
10378
|
if (!n.value) return;
|
|
10379
10379
|
if (!r.value) {
|
|
10380
10380
|
je({
|
|
@@ -10394,7 +10394,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
10394
10394
|
try {
|
|
10395
10395
|
const k = await a(p), S = b(
|
|
10396
10396
|
((A = k == null ? void 0 : k.data) == null ? void 0 : A.geom) ?? (k == null ? void 0 : k.geom) ?? null
|
|
10397
|
-
), C = ((
|
|
10397
|
+
), C = ((E = k == null ? void 0 : k.data) == null ? void 0 : E.id) ?? (k == null ? void 0 : k.id);
|
|
10398
10398
|
if (C != null) {
|
|
10399
10399
|
await f(C, S);
|
|
10400
10400
|
return;
|
|
@@ -10486,12 +10486,12 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
10486
10486
|
};
|
|
10487
10487
|
n.query.z === z.z && n.query.x === z.x && n.query.y === z.y || t.replace({ query: z });
|
|
10488
10488
|
}
|
|
10489
|
-
function
|
|
10489
|
+
function E(H) {
|
|
10490
10490
|
typeof document > "u" || (document.title = H ? `${H} — CartoCSS` : nh);
|
|
10491
10491
|
}
|
|
10492
10492
|
const k = T("");
|
|
10493
10493
|
T("");
|
|
10494
|
-
const S = T([]), C = T(!1),
|
|
10494
|
+
const S = T([]), C = T(!1), M = T(!1), N = T(""), D = T(0), Q = T(!1), oe = T(1), ae = T(!0), X = P(() => `cartocss-layer-${b.value}`), ue = P(() => `${Math.round(oe.value * 100)}%`), Y = P(() => `cartocss-extent-${b.value}`), R = P(() => {
|
|
10495
10495
|
var ee;
|
|
10496
10496
|
const H = (ee = N.value) == null ? void 0 : ee.trim();
|
|
10497
10497
|
if (!H) return "";
|
|
@@ -10539,7 +10539,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
10539
10539
|
var H;
|
|
10540
10540
|
return (H = f.value) == null ? void 0 : H.name;
|
|
10541
10541
|
},
|
|
10542
|
-
(H) =>
|
|
10542
|
+
(H) => E(H),
|
|
10543
10543
|
{ immediate: !0 }
|
|
10544
10544
|
);
|
|
10545
10545
|
async function B() {
|
|
@@ -10589,7 +10589,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
10589
10589
|
}
|
|
10590
10590
|
async function te(H, ce) {
|
|
10591
10591
|
if (b.value) {
|
|
10592
|
-
|
|
10592
|
+
M.value = !0;
|
|
10593
10593
|
try {
|
|
10594
10594
|
const w = await fetch(`/api/gis-css/${b.value}`, {
|
|
10595
10595
|
method: "POST",
|
|
@@ -10601,7 +10601,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
10601
10601
|
} catch (w) {
|
|
10602
10602
|
console.error("Failed to save CartoCSS", w), je({ type: "error", title: "Помилка", message: "Не вдалося зберегти CartoCSS" });
|
|
10603
10603
|
} finally {
|
|
10604
|
-
|
|
10604
|
+
M.value = !1;
|
|
10605
10605
|
}
|
|
10606
10606
|
}
|
|
10607
10607
|
}
|
|
@@ -10970,11 +10970,11 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
10970
10970
|
}
|
|
10971
10971
|
function m() {
|
|
10972
10972
|
if (!r.open || !l.value || !i.value) return;
|
|
10973
|
-
const y = l.value.getBoundingClientRect(), p = 12, g = window.scrollX + p, _ = window.scrollX + window.innerWidth - p, A = window.scrollY + p,
|
|
10973
|
+
const y = l.value.getBoundingClientRect(), p = 12, g = window.scrollX + p, _ = window.scrollX + window.innerWidth - p, A = window.scrollY + p, E = window.scrollY + window.innerHeight - p, k = i.value.offsetWidth || Math.min(300, window.innerWidth - 24), S = i.value.offsetHeight || 0;
|
|
10974
10974
|
let C = y.left + window.scrollX + (y.width - k) / 2;
|
|
10975
10975
|
C < g && (C = g), C + k > _ && (C = Math.max(g, _ - k)), r.left = C;
|
|
10976
|
-
let
|
|
10977
|
-
|
|
10976
|
+
let M = y.bottom + window.scrollY + p;
|
|
10977
|
+
M + S > E && (M = y.top + window.scrollY - S - p, M < A && (M = Math.max(A, E - S))), M < A && (M = A), M + S > E && (M = Math.max(A, E - S)), r.top = M, r.transform = "none";
|
|
10978
10978
|
}
|
|
10979
10979
|
function b(y) {
|
|
10980
10980
|
var g, _;
|
|
@@ -11061,41 +11061,41 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
11061
11061
|
setup(e) {
|
|
11062
11062
|
const t = e, n = T(null), r = T(!1), l = T(null), i = T(null), s = T({ top: 0, left: 0 });
|
|
11063
11063
|
Pt();
|
|
11064
|
-
const a = T(!0), v = T(!1), m = P(() => Array.isArray(t.links) ? t.links.filter((
|
|
11064
|
+
const a = T(!0), v = T(!1), m = P(() => Array.isArray(t.links) ? t.links.filter((E) => (E == null ? void 0 : E.name) && (E == null ? void 0 : E.slug)) : []), b = P(() => ({
|
|
11065
11065
|
top: `${s.value.top}px`,
|
|
11066
11066
|
left: `${s.value.left}px`
|
|
11067
11067
|
})), f = P(() => {
|
|
11068
|
-
const
|
|
11069
|
-
return t.mapName &&
|
|
11068
|
+
const E = [];
|
|
11069
|
+
return t.mapName && E.push({ label: "Назва карти", value: t.mapName }), t.mapDescription && E.push({ label: "Опис", value: t.mapDescription, breakLine: !0 }), E;
|
|
11070
11070
|
});
|
|
11071
|
-
function h(
|
|
11072
|
-
return
|
|
11071
|
+
function h(E) {
|
|
11072
|
+
return E == null ? !1 : E.replace(/<[^>]*>/g, "").trim().length > 0;
|
|
11073
11073
|
}
|
|
11074
11074
|
const u = P(() => h(t.content)), d = P(() => u.value);
|
|
11075
|
-
function y(
|
|
11076
|
-
|
|
11075
|
+
function y(E) {
|
|
11076
|
+
E.stopPropagation(), r.value = !r.value;
|
|
11077
11077
|
}
|
|
11078
11078
|
function p() {
|
|
11079
|
-
const
|
|
11080
|
-
if (!
|
|
11081
|
-
const k =
|
|
11079
|
+
const E = l.value;
|
|
11080
|
+
if (!E || !i.value) return;
|
|
11081
|
+
const k = E.getBoundingClientRect(), S = 12, C = 8, M = window.scrollX + S, N = window.scrollX + window.innerWidth - S, D = window.scrollY + S, Q = window.scrollY + window.innerHeight - S, oe = i.value.offsetWidth || 160, ae = i.value.offsetHeight || 0;
|
|
11082
11082
|
let X = k.bottom + window.scrollY + C, ue = k.left + window.scrollX;
|
|
11083
|
-
ue + oe > N && (ue = k.right + window.scrollX - oe, ue <
|
|
11083
|
+
ue + oe > N && (ue = k.right + window.scrollX - oe, ue < M && (ue = M)), ue < M && (ue = M), X + ae > Q && (X = k.top + window.scrollY - ae - C, X < D && (X = Math.max(D, Q - ae))), X < D && (X = D), X + ae > Q && (X = Math.max(D, Q - ae)), s.value = {
|
|
11084
11084
|
top: X,
|
|
11085
11085
|
left: ue
|
|
11086
11086
|
};
|
|
11087
11087
|
}
|
|
11088
|
-
function g(
|
|
11088
|
+
function g(E) {
|
|
11089
11089
|
if (!r.value) return;
|
|
11090
11090
|
const k = n.value;
|
|
11091
11091
|
if (!k) {
|
|
11092
11092
|
r.value = !1;
|
|
11093
11093
|
return;
|
|
11094
11094
|
}
|
|
11095
|
-
k.contains(
|
|
11095
|
+
k.contains(E.target) || (r.value = !1);
|
|
11096
11096
|
}
|
|
11097
|
-
le(r, (
|
|
11098
|
-
|
|
11097
|
+
le(r, (E) => {
|
|
11098
|
+
E ? st(() => {
|
|
11099
11099
|
p(), requestAnimationFrame(() => {
|
|
11100
11100
|
p();
|
|
11101
11101
|
}), window.addEventListener("scroll", p, !0), window.addEventListener("resize", p);
|
|
@@ -11111,7 +11111,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
11111
11111
|
document.addEventListener("click", g, !0), A(), d.value ? v.value && (a.value = !1) : a.value = !1, window.addEventListener("resize", A);
|
|
11112
11112
|
}), Ve(() => {
|
|
11113
11113
|
document.removeEventListener("click", g, !0), window.removeEventListener("scroll", p, !0), window.removeEventListener("resize", p), window.removeEventListener("resize", A);
|
|
11114
|
-
}), (
|
|
11114
|
+
}), (E, k) => (c(), x("div", {
|
|
11115
11115
|
class: "map-info legend-widget flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative widget",
|
|
11116
11116
|
ref_key: "container",
|
|
11117
11117
|
ref: n
|
|
@@ -11226,8 +11226,8 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
11226
11226
|
const f = (k = i.value) == null ? void 0 : k.querySelector("button");
|
|
11227
11227
|
if (!f || !l.value) return;
|
|
11228
11228
|
const h = f.getBoundingClientRect(), u = 260, d = l.value.offsetHeight || 60, y = 8, p = 12, g = window.innerWidth, _ = window.innerHeight;
|
|
11229
|
-
let A = h.bottom + y + window.scrollY,
|
|
11230
|
-
|
|
11229
|
+
let A = h.bottom + y + window.scrollY, E = h.left + window.scrollX;
|
|
11230
|
+
E + u > g - p && (E = g - u - p + window.scrollX), E < p + window.scrollX && (E = p + window.scrollX), A + d > _ + window.scrollY - p && (A = h.top - d - y + window.scrollY, A < p + window.scrollY && (A = _ - d - p + window.scrollY)), s.top = A, s.left = E;
|
|
11231
11231
|
}
|
|
11232
11232
|
function v() {
|
|
11233
11233
|
n.value = !n.value, n.value && st(a);
|
|
@@ -11353,7 +11353,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
11353
11353
|
);
|
|
11354
11354
|
return [...F, ...$];
|
|
11355
11355
|
}), h = P(() => f.value.length), u = P(
|
|
11356
|
-
() => f.value.filter((F) =>
|
|
11356
|
+
() => f.value.filter((F) => E(F.id)).length
|
|
11357
11357
|
), d = P(
|
|
11358
11358
|
() => h.value > 0 && u.value === h.value
|
|
11359
11359
|
), y = P(() => a.value.length > 0), p = t;
|
|
@@ -11435,7 +11435,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
11435
11435
|
function A(F) {
|
|
11436
11436
|
return F ? /^https?:\/\//i.test(F) ? F : F.startsWith("//") ? `${window.location.protocol}${F}` : F.startsWith("/") ? `${location.origin}${F}` : `${location.origin}/${F}` : null;
|
|
11437
11437
|
}
|
|
11438
|
-
function
|
|
11438
|
+
function E(F) {
|
|
11439
11439
|
const $ = r.value[F];
|
|
11440
11440
|
return $ ?? !0;
|
|
11441
11441
|
}
|
|
@@ -11487,7 +11487,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
11487
11487
|
},
|
|
11488
11488
|
{ immediate: !0 }
|
|
11489
11489
|
);
|
|
11490
|
-
function
|
|
11490
|
+
function M(F, $) {
|
|
11491
11491
|
var B, U, te;
|
|
11492
11492
|
if (F.isTemporary) {
|
|
11493
11493
|
if (!$) {
|
|
@@ -11505,10 +11505,10 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
11505
11505
|
}
|
|
11506
11506
|
function N(F, $) {
|
|
11507
11507
|
const I = $.target;
|
|
11508
|
-
|
|
11508
|
+
M(F, I.checked);
|
|
11509
11509
|
}
|
|
11510
11510
|
function D(F) {
|
|
11511
|
-
f.value.forEach(($) =>
|
|
11511
|
+
f.value.forEach(($) => M($, F));
|
|
11512
11512
|
}
|
|
11513
11513
|
function Q() {
|
|
11514
11514
|
D(!d.value);
|
|
@@ -11654,7 +11654,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
11654
11654
|
o("input", {
|
|
11655
11655
|
type: "checkbox",
|
|
11656
11656
|
class: "layers-panel__checkbox",
|
|
11657
|
-
checked:
|
|
11657
|
+
checked: E(I.id),
|
|
11658
11658
|
style: ft(Y(I)),
|
|
11659
11659
|
onChange: (U) => N(I, U)
|
|
11660
11660
|
}, null, 44, Ih),
|
|
@@ -11662,7 +11662,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
11662
11662
|
o("span", zh, V(I.name), 1)
|
|
11663
11663
|
]),
|
|
11664
11664
|
o("div", Nh, [
|
|
11665
|
-
|
|
11665
|
+
E(I.id) && !I.isTemporary ? (c(), x(ie, { key: 0 }, [
|
|
11666
11666
|
ne(as, {
|
|
11667
11667
|
"layer-id": I.id,
|
|
11668
11668
|
class: "flex"
|
|
@@ -11733,10 +11733,10 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
11733
11733
|
}), a = new Intl.Collator("uk", { sensitivity: "base" }), v = P(() => {
|
|
11734
11734
|
const g = n.search.trim().toLowerCase();
|
|
11735
11735
|
return n.catalog.groups.map((_) => {
|
|
11736
|
-
const A = _.layers.filter((
|
|
11737
|
-
const k = y(
|
|
11736
|
+
const A = _.layers.filter((E) => {
|
|
11737
|
+
const k = y(E);
|
|
11738
11738
|
return k ? g ? k.toLowerCase().includes(g) : !0 : !1;
|
|
11739
|
-
}).sort((
|
|
11739
|
+
}).sort((E, k) => a.compare(y(E), y(k)));
|
|
11740
11740
|
return { ..._, layers: A };
|
|
11741
11741
|
}).filter((_) => _.layers.length > 0).sort((_, A) => a.compare(_.name, A.name));
|
|
11742
11742
|
}), m = P({
|
|
@@ -11756,8 +11756,8 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
11756
11756
|
}
|
|
11757
11757
|
const A = g.currentTarget;
|
|
11758
11758
|
if (!A) return;
|
|
11759
|
-
const
|
|
11760
|
-
s.left =
|
|
11759
|
+
const E = A.getBoundingClientRect(), k = typeof window < "u" ? window.scrollX : 0, S = typeof window < "u" ? window.scrollY : 0;
|
|
11760
|
+
s.left = E.left + E.width / 2 + k, s.top = E.bottom + 8 + S, s.layerId = _, s.visible = !0;
|
|
11761
11761
|
}
|
|
11762
11762
|
function u() {
|
|
11763
11763
|
s.visible = !1, s.layerId = null;
|
|
@@ -11821,7 +11821,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
11821
11821
|
}, [
|
|
11822
11822
|
o("div", {
|
|
11823
11823
|
class: "hover:bg-gray-100 cursor-pointer p-[8px] rounded-lg flex justify-between items-center",
|
|
11824
|
-
onClick: (
|
|
11824
|
+
onClick: (E) => b(A.id)
|
|
11825
11825
|
}, [
|
|
11826
11826
|
o("div", Zh, [
|
|
11827
11827
|
(c(), x("svg", {
|
|
@@ -11846,16 +11846,16 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
11846
11846
|
ne(Uo, { name: "out-in" }, {
|
|
11847
11847
|
default: Oe(() => [
|
|
11848
11848
|
Be(o("div", null, [
|
|
11849
|
-
(c(!0), x(ie, null, he(A.layers, (
|
|
11850
|
-
key:
|
|
11849
|
+
(c(!0), x(ie, null, he(A.layers, (E) => (c(), x("div", {
|
|
11850
|
+
key: E.id,
|
|
11851
11851
|
class: "hover:bg-gray-100 rounded-lg flex items-center justify-between ml-[20px] py-[8px] px-[8px] gap-3"
|
|
11852
11852
|
}, [
|
|
11853
11853
|
o("label", Xh, [
|
|
11854
11854
|
o("input", {
|
|
11855
11855
|
type: "checkbox",
|
|
11856
11856
|
class: "peer hidden",
|
|
11857
|
-
checked: e.selected.includes(
|
|
11858
|
-
onChange: (k) => g.$emit("toggle-layer",
|
|
11857
|
+
checked: e.selected.includes(E.id),
|
|
11858
|
+
onChange: (k) => g.$emit("toggle-layer", E.id, k.target.checked, E)
|
|
11859
11859
|
}, null, 40, Qh),
|
|
11860
11860
|
_[3] || (_[3] = o("div", { class: "w-4 h-4 rounded border border-blue-800 flex items-center justify-center peer-checked:bg-blue-600 peer-checked:border-blue-600 shrink-0" }, [
|
|
11861
11861
|
o("svg", {
|
|
@@ -11873,21 +11873,21 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
11873
11873
|
})
|
|
11874
11874
|
])
|
|
11875
11875
|
], -1)),
|
|
11876
|
-
o("span", Jh, V(
|
|
11876
|
+
o("span", Jh, V(E.name), 1)
|
|
11877
11877
|
]),
|
|
11878
11878
|
o("div", e1, [
|
|
11879
|
-
Array.isArray(
|
|
11879
|
+
Array.isArray(E.filters) && E.filters.length ? (c(), pe(bo, {
|
|
11880
11880
|
key: 0,
|
|
11881
|
-
count:
|
|
11882
|
-
layer:
|
|
11883
|
-
disabled: !e.selected.includes(
|
|
11884
|
-
onMouseenter: (k) => h(k,
|
|
11881
|
+
count: E.filters.length,
|
|
11882
|
+
layer: E,
|
|
11883
|
+
disabled: !e.selected.includes(E.id),
|
|
11884
|
+
onMouseenter: (k) => h(k, E.id),
|
|
11885
11885
|
onMouseleave: u,
|
|
11886
|
-
onFocus: (k) => h(k,
|
|
11886
|
+
onFocus: (k) => h(k, E.id),
|
|
11887
11887
|
onBlur: u
|
|
11888
11888
|
}, null, 8, ["count", "layer", "disabled", "onMouseenter", "onFocus"])) : K("", !0),
|
|
11889
11889
|
ne(lr, {
|
|
11890
|
-
items: d(
|
|
11890
|
+
items: d(E)
|
|
11891
11891
|
}, null, 8, ["items"])
|
|
11892
11892
|
])
|
|
11893
11893
|
]))), 128))
|
|
@@ -11954,11 +11954,11 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
11954
11954
|
}
|
|
11955
11955
|
function m() {
|
|
11956
11956
|
if (!r.open || !l.value || !i.value) return;
|
|
11957
|
-
const y = l.value.getBoundingClientRect(), p = 12, g = window.scrollX + p, _ = window.scrollX + window.innerWidth - p, A = window.scrollY + p,
|
|
11957
|
+
const y = l.value.getBoundingClientRect(), p = 12, g = window.scrollX + p, _ = window.scrollX + window.innerWidth - p, A = window.scrollY + p, E = window.scrollY + window.innerHeight - p, k = i.value.offsetWidth || Math.min(460, window.innerWidth - 24), S = i.value.offsetHeight || 0;
|
|
11958
11958
|
let C = y.left + window.scrollX + (y.width - k) / 2;
|
|
11959
11959
|
C < g && (C = g), C + k > _ && (C = Math.max(g, _ - k)), r.left = C;
|
|
11960
|
-
let
|
|
11961
|
-
|
|
11960
|
+
let M = y.bottom + window.scrollY + p;
|
|
11961
|
+
M + S > E && (M = y.top + window.scrollY - S - p, M < A && (M = Math.max(A, E - S))), M < A && (M = A), M + S > E && (M = Math.max(A, E - S)), r.top = M, r.transform = "none";
|
|
11962
11962
|
}
|
|
11963
11963
|
function b(y) {
|
|
11964
11964
|
var g, _;
|
|
@@ -12075,7 +12075,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
12075
12075
|
function A(F, $) {
|
|
12076
12076
|
$ ? h.set(F, $) : h.delete(F);
|
|
12077
12077
|
}
|
|
12078
|
-
function
|
|
12078
|
+
function E(F) {
|
|
12079
12079
|
m.value = m.value === F ? null : F, m.value && st(() => {
|
|
12080
12080
|
k(F), requestAnimationFrame(() => {
|
|
12081
12081
|
k(F);
|
|
@@ -12106,13 +12106,13 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
12106
12106
|
m.value = null;
|
|
12107
12107
|
}
|
|
12108
12108
|
}
|
|
12109
|
-
function
|
|
12109
|
+
function M() {
|
|
12110
12110
|
i.value && g(), m.value && k(m.value);
|
|
12111
12111
|
}
|
|
12112
12112
|
Ue(() => {
|
|
12113
|
-
document.addEventListener("click", C), window.addEventListener("resize",
|
|
12113
|
+
document.addEventListener("click", C), window.addEventListener("resize", M), window.addEventListener("scroll", M, !0);
|
|
12114
12114
|
}), Ve(() => {
|
|
12115
|
-
document.removeEventListener("click", C), window.removeEventListener("resize",
|
|
12115
|
+
document.removeEventListener("click", C), window.removeEventListener("resize", M), window.removeEventListener("scroll", M, !0);
|
|
12116
12116
|
});
|
|
12117
12117
|
const { map: N } = it();
|
|
12118
12118
|
function D(F) {
|
|
@@ -12230,7 +12230,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
12230
12230
|
class: "selected-tab__item-menu",
|
|
12231
12231
|
ref_for: !0,
|
|
12232
12232
|
ref: (te) => A(I, te),
|
|
12233
|
-
onClick: nt((te) =>
|
|
12233
|
+
onClick: nt((te) => E(I), ["stop"])
|
|
12234
12234
|
}, [...$[5] || ($[5] = [
|
|
12235
12235
|
o("svg", {
|
|
12236
12236
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -12517,7 +12517,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
12517
12517
|
} else
|
|
12518
12518
|
s.value = s.value.filter((U) => U !== R), b.value === R && (y(), b.value = null);
|
|
12519
12519
|
}
|
|
12520
|
-
function
|
|
12520
|
+
function E() {
|
|
12521
12521
|
s.value.forEach((R) => {
|
|
12522
12522
|
const O = Xe(R);
|
|
12523
12523
|
O && O.setVisible(!1);
|
|
@@ -12553,7 +12553,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
12553
12553
|
function C() {
|
|
12554
12554
|
l.value = "catalog";
|
|
12555
12555
|
}
|
|
12556
|
-
const
|
|
12556
|
+
const M = P(() => b.value ? u(b.value) : null), N = P(() => {
|
|
12557
12557
|
const R = b.value;
|
|
12558
12558
|
return R ? m[R] ?? {} : {};
|
|
12559
12559
|
}), D = P(() => i.value.groups.reduce(
|
|
@@ -12561,7 +12561,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
12561
12561
|
0
|
|
12562
12562
|
)), Q = P(() => l.value === "selected" ? "Вибрані шари" : l.value === "filter" ? "Фільтр шарів" : "Каталог"), oe = P(() => l.value === "selected" ? s.value.length : l.value === "catalog" ? D.value : null), ae = P(() => {
|
|
12563
12563
|
var R;
|
|
12564
|
-
return l.value === "filter" ? ((R =
|
|
12564
|
+
return l.value === "filter" ? ((R = M.value) == null ? void 0 : R.name) ?? "" : "";
|
|
12565
12565
|
});
|
|
12566
12566
|
async function X() {
|
|
12567
12567
|
const O = await (await fetch("/api/gis-layer-list")).json(), re = /* @__PURE__ */ new Map();
|
|
@@ -12585,7 +12585,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
12585
12585
|
}
|
|
12586
12586
|
le(b, (R) => {
|
|
12587
12587
|
!R && l.value === "filter" && (l.value = "catalog");
|
|
12588
|
-
}), le(
|
|
12588
|
+
}), le(M, (R) => {
|
|
12589
12589
|
!R && b.value && (b.value = null);
|
|
12590
12590
|
}), le(
|
|
12591
12591
|
s,
|
|
@@ -12635,7 +12635,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
12635
12635
|
]),
|
|
12636
12636
|
o("div", F1, [
|
|
12637
12637
|
o("button", {
|
|
12638
|
-
onClick:
|
|
12638
|
+
onClick: E,
|
|
12639
12639
|
class: "p-1 rounded-full hover:bg-gray-200 transition-colors",
|
|
12640
12640
|
"aria-label": "Reset layers"
|
|
12641
12641
|
}, [...O[6] || (O[6] = [
|
|
@@ -12705,7 +12705,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
12705
12705
|
onRemove: O[4] || (O[4] = (re) => s.value = s.value.filter((F) => F !== re))
|
|
12706
12706
|
}, null, 8, ["catalog", "selected"])) : (c(), pe(S1, {
|
|
12707
12707
|
key: 2,
|
|
12708
|
-
layer:
|
|
12708
|
+
layer: M.value,
|
|
12709
12709
|
value: N.value,
|
|
12710
12710
|
onChange: g,
|
|
12711
12711
|
onClose: C
|
|
@@ -12794,7 +12794,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
12794
12794
|
var Y, R;
|
|
12795
12795
|
return ((R = (Y = _.value) == null ? void 0 : Y.filters) == null ? void 0 : R.length) || 0;
|
|
12796
12796
|
});
|
|
12797
|
-
async function
|
|
12797
|
+
async function E(Y) {
|
|
12798
12798
|
var re;
|
|
12799
12799
|
const R = await fetch(`/api/gis-service/${encodeURIComponent(Y)}`);
|
|
12800
12800
|
if (!R.ok) {
|
|
@@ -12856,7 +12856,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
12856
12856
|
F != null && R.set(String(F), re);
|
|
12857
12857
|
}), R;
|
|
12858
12858
|
}
|
|
12859
|
-
function
|
|
12859
|
+
function M(Y, R, O, re, F) {
|
|
12860
12860
|
if (typeof (R == null ? void 0 : R.color) == "string" && R.color.trim()) return R.color.trim();
|
|
12861
12861
|
const $ = n.config.colors || {};
|
|
12862
12862
|
if ($[Y]) return $[Y];
|
|
@@ -12890,12 +12890,12 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
12890
12890
|
if (!R)
|
|
12891
12891
|
return;
|
|
12892
12892
|
l.value = !0;
|
|
12893
|
-
const O = await
|
|
12893
|
+
const O = await E(Y);
|
|
12894
12894
|
k(Y, O);
|
|
12895
12895
|
const re = await S(Y, R), F = Array.isArray(re == null ? void 0 : re.rows) ? re.rows.map((B, U) => {
|
|
12896
12896
|
const te = (B == null ? void 0 : B.id) ?? (B == null ? void 0 : B.value), fe = te != null ? String(te) : "";
|
|
12897
12897
|
if (!fe) return null;
|
|
12898
|
-
const me = N(fe, B, O, R), xe = Number((B == null ? void 0 : B.count) ?? 0) || 0, Fe =
|
|
12898
|
+
const me = N(fe, B, O, R), xe = Number((B == null ? void 0 : B.count) ?? 0) || 0, Fe = M(fe, B, O, R, U);
|
|
12899
12899
|
return {
|
|
12900
12900
|
id: fe,
|
|
12901
12901
|
label: me,
|
|
@@ -13080,14 +13080,14 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13080
13080
|
le(f, (q) => {
|
|
13081
13081
|
q.includes(u.value) || (u.value = q[0]);
|
|
13082
13082
|
});
|
|
13083
|
-
const d = T(""), y = T(!1), p = T(null), g = T(null), _ = T(null), A = T(null),
|
|
13083
|
+
const d = T(""), y = T(!1), p = T(null), g = T(null), _ = T(null), A = T(null), E = T([]), k = T(null), S = T(!1), C = T([]), M = P(
|
|
13084
13084
|
() => (u.value === "address" || u.value === "nominatim") && S.value
|
|
13085
13085
|
), N = P(() => {
|
|
13086
13086
|
var q;
|
|
13087
13087
|
return ((q = n.config) == null ? void 0 : q.addressDebounceMs) ?? 1e3;
|
|
13088
13088
|
});
|
|
13089
13089
|
let D = null;
|
|
13090
|
-
const Q = T(!1), oe = P(() => d.value.trim().length > 0 ?
|
|
13090
|
+
const Q = T(!1), oe = P(() => d.value.trim().length > 0 ? E.value : C.value), ae = P(() => d.value.trim().length ? `Знайдено ${E.value.length}` : "Історія пошуку"), X = P(() => d.value.trim().length ? "Нічого не знайдено" : "Історія порожня");
|
|
13091
13091
|
function ue() {
|
|
13092
13092
|
var q, J;
|
|
13093
13093
|
if (typeof window > "u") return [];
|
|
@@ -13192,24 +13192,24 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13192
13192
|
fe.left = `${be}px`, fe.top = `${Se}px`, fe.width = `${G}px`, fe.display = "block";
|
|
13193
13193
|
}
|
|
13194
13194
|
const xe = () => {
|
|
13195
|
-
|
|
13195
|
+
M.value && me();
|
|
13196
13196
|
};
|
|
13197
13197
|
function Fe() {
|
|
13198
13198
|
D && (clearTimeout(D), D = null);
|
|
13199
13199
|
}
|
|
13200
13200
|
le(u, () => {
|
|
13201
|
-
d.value = "", y.value = !1,
|
|
13202
|
-
}), le(
|
|
13201
|
+
d.value = "", y.value = !1, E.value = [], S.value = !1, Fe(), Q.value = !1, re(), F();
|
|
13202
|
+
}), le(M, (q) => {
|
|
13203
13203
|
q ? st(() => {
|
|
13204
13204
|
me();
|
|
13205
13205
|
}) : fe.display = "none";
|
|
13206
13206
|
}), le(d, (q) => {
|
|
13207
13207
|
if (u.value !== "address" && u.value !== "nominatim") {
|
|
13208
|
-
|
|
13208
|
+
E.value = [], Fe();
|
|
13209
13209
|
return;
|
|
13210
13210
|
}
|
|
13211
13211
|
if (!q.trim()) {
|
|
13212
|
-
|
|
13212
|
+
E.value = [], S.value = C.value.length > 0, Fe();
|
|
13213
13213
|
return;
|
|
13214
13214
|
}
|
|
13215
13215
|
Fe(), S.value = !0, D = window.setTimeout(() => {
|
|
@@ -13237,7 +13237,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13237
13237
|
Ne(J == null ? void 0 : J.target), u.value = q;
|
|
13238
13238
|
}
|
|
13239
13239
|
function w() {
|
|
13240
|
-
d.value = "",
|
|
13240
|
+
d.value = "", E.value = [], S.value = !1, Q.value = !1, re(), F();
|
|
13241
13241
|
}
|
|
13242
13242
|
function z(q) {
|
|
13243
13243
|
const J = q.target;
|
|
@@ -13245,7 +13245,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13245
13245
|
const G = p.value;
|
|
13246
13246
|
G && !G.contains(J) && (Ne(J), y.value = !1);
|
|
13247
13247
|
}
|
|
13248
|
-
if (
|
|
13248
|
+
if (M.value) {
|
|
13249
13249
|
const G = k.value, be = A.value;
|
|
13250
13250
|
G && !G.contains(J) && (!be || !be.contains(J)) && (S.value = !1);
|
|
13251
13251
|
}
|
|
@@ -13382,7 +13382,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13382
13382
|
return Ze(Se);
|
|
13383
13383
|
}
|
|
13384
13384
|
async function cn(q) {
|
|
13385
|
-
if (
|
|
13385
|
+
if (E.value = [], Fe(), u.value === "address") {
|
|
13386
13386
|
if (!a()) {
|
|
13387
13387
|
je({ type: "warning", title: "Пошук адреси", message: "Не налаштовано addressSuggest" });
|
|
13388
13388
|
return;
|
|
@@ -13392,7 +13392,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13392
13392
|
je({ type: "warning", title: "Пошук адреси", message: "Не знайдено результатів" });
|
|
13393
13393
|
return;
|
|
13394
13394
|
}
|
|
13395
|
-
|
|
13395
|
+
E.value = be;
|
|
13396
13396
|
return;
|
|
13397
13397
|
}
|
|
13398
13398
|
const J = await gn(q);
|
|
@@ -13400,7 +13400,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13400
13400
|
je({ type: "warning", title: "Пошук адреси", message: "Не знайдено результатів" });
|
|
13401
13401
|
return;
|
|
13402
13402
|
}
|
|
13403
|
-
|
|
13403
|
+
E.value = J;
|
|
13404
13404
|
}
|
|
13405
13405
|
async function jt(q) {
|
|
13406
13406
|
if (rt(q)) {
|
|
@@ -13611,7 +13611,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13611
13611
|
])
|
|
13612
13612
|
], -1))
|
|
13613
13613
|
]),
|
|
13614
|
-
|
|
13614
|
+
M.value ? (c(), pe(Ot, {
|
|
13615
13615
|
key: 2,
|
|
13616
13616
|
to: "body"
|
|
13617
13617
|
}, [
|
|
@@ -13658,27 +13658,27 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13658
13658
|
var D;
|
|
13659
13659
|
return (D = N == null ? void 0 : N.href) == null ? void 0 : D.includes(S);
|
|
13660
13660
|
})) return;
|
|
13661
|
-
const
|
|
13662
|
-
|
|
13661
|
+
const M = document.createElement("link");
|
|
13662
|
+
M.rel = "stylesheet", M.href = S, document.head.appendChild(M);
|
|
13663
13663
|
}
|
|
13664
13664
|
function h(S) {
|
|
13665
|
-
return new Promise((C,
|
|
13665
|
+
return new Promise((C, M) => {
|
|
13666
13666
|
const N = Array.from(document.scripts).find((Q) => Q.src === S);
|
|
13667
13667
|
if (N) {
|
|
13668
13668
|
if (N._loaded) return C();
|
|
13669
|
-
N.addEventListener("load", () => C()), N.addEventListener("error", () =>
|
|
13669
|
+
N.addEventListener("load", () => C()), N.addEventListener("error", () => M(new Error(`Failed ${S}`)));
|
|
13670
13670
|
return;
|
|
13671
13671
|
}
|
|
13672
13672
|
const D = document.createElement("script");
|
|
13673
13673
|
D.src = S, D.async = !0, D.onload = () => {
|
|
13674
13674
|
D._loaded = !0, C();
|
|
13675
|
-
}, D.onerror = () =>
|
|
13675
|
+
}, D.onerror = () => M(new Error(`Failed ${S}`)), document.head.appendChild(D);
|
|
13676
13676
|
});
|
|
13677
13677
|
}
|
|
13678
13678
|
function u() {
|
|
13679
|
-
var C,
|
|
13679
|
+
var C, M, N;
|
|
13680
13680
|
const S = window;
|
|
13681
|
-
return S.MapboxExportControl || ((C = S.mapboxgl) == null ? void 0 : C.MapboxExportControl) || ((
|
|
13681
|
+
return S.MapboxExportControl || ((C = S.mapboxgl) == null ? void 0 : C.MapboxExportControl) || ((M = S.mapboxglExport) == null ? void 0 : M.MapboxExportControl) || ((N = S.mapboxglExport) == null ? void 0 : N.default) || null;
|
|
13682
13682
|
}
|
|
13683
13683
|
function d() {
|
|
13684
13684
|
const S = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
@@ -13687,9 +13687,9 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13687
13687
|
{ d: "M17 17h2a2 2 0 0 0 2 -2v-4a2 2 0 0 0 -2 -2h-14a2 2 0 0 0 -2 2v4a2 2 0 0 0 2 2h2" },
|
|
13688
13688
|
{ d: "M17 9v-4a2 2 0 0 0 -2 -2h-6a2 2 0 0 0 -2 2v4" },
|
|
13689
13689
|
{ d: "M7 13m0 2a2 2 0 0 1 2 -2h6a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-6a2 2 0 0 1 -2 -2z" }
|
|
13690
|
-
].forEach((
|
|
13690
|
+
].forEach((M, N) => {
|
|
13691
13691
|
const D = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
13692
|
-
Object.entries(
|
|
13692
|
+
Object.entries(M).forEach(([Q, oe]) => {
|
|
13693
13693
|
D.setAttribute(Q, oe);
|
|
13694
13694
|
}), S.appendChild(D);
|
|
13695
13695
|
}), S;
|
|
@@ -13702,13 +13702,13 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13702
13702
|
"bg-white text-gray-700 hover:bg-gray-50 hover:scale-105",
|
|
13703
13703
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-400/60 focus-visible:ring-offset-2"
|
|
13704
13704
|
].join(" "), S.setAttribute("aria-label", "Друк карти");
|
|
13705
|
-
const C = d(),
|
|
13706
|
-
return
|
|
13705
|
+
const C = d(), M = document.createElement("span");
|
|
13706
|
+
return M.className = [
|
|
13707
13707
|
"absolute right-full mr-3 px-1.5 py-0.5",
|
|
13708
13708
|
"bg-gray-700 text-white text-[0.75rem] font-medium rounded-md",
|
|
13709
13709
|
"opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100",
|
|
13710
13710
|
"pointer-events-none transition-opacity duration-200 whitespace-nowrap"
|
|
13711
|
-
].join(" "),
|
|
13711
|
+
].join(" "), M.textContent = "Друк карти", M.setAttribute("aria-hidden", "true"), S.appendChild(C), S.appendChild(M), S.addEventListener("click", (N) => {
|
|
13712
13712
|
N.stopPropagation(), p();
|
|
13713
13713
|
}), v.value = S, S;
|
|
13714
13714
|
}
|
|
@@ -13717,18 +13717,18 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13717
13717
|
a.value.style.display === "block" ? _() : g();
|
|
13718
13718
|
}
|
|
13719
13719
|
function g() {
|
|
13720
|
-
var S, C,
|
|
13721
|
-
a.value && (a.value.style.display = "block", (S = v.value) == null || S.classList.add("scale-105", "shadow-xl"), (C = s.value) == null || C.toggleCrosshair(!0), (
|
|
13720
|
+
var S, C, M;
|
|
13721
|
+
a.value && (a.value.style.display = "block", (S = v.value) == null || S.classList.add("scale-105", "shadow-xl"), (C = s.value) == null || C.toggleCrosshair(!0), (M = s.value) == null || M.togglePrintableArea(!0), document.addEventListener("click", A));
|
|
13722
13722
|
}
|
|
13723
13723
|
function _() {
|
|
13724
|
-
var S, C,
|
|
13725
|
-
a.value && (a.value.style.display = "none", (S = v.value) == null || S.classList.remove("scale-105", "shadow-xl"), (C = s.value) == null || C.toggleCrosshair(!1), (
|
|
13724
|
+
var S, C, M;
|
|
13725
|
+
a.value && (a.value.style.display = "none", (S = v.value) == null || S.classList.remove("scale-105", "shadow-xl"), (C = s.value) == null || C.toggleCrosshair(!1), (M = s.value) == null || M.togglePrintableArea(!1), document.removeEventListener("click", A));
|
|
13726
13726
|
}
|
|
13727
13727
|
function A(S) {
|
|
13728
13728
|
const C = i.value;
|
|
13729
13729
|
C && (S.target && C.contains(S.target) || _());
|
|
13730
13730
|
}
|
|
13731
|
-
function
|
|
13731
|
+
function E(S) {
|
|
13732
13732
|
const C = {
|
|
13733
13733
|
Size: "Розмір",
|
|
13734
13734
|
Orientation: "Орієнтація",
|
|
@@ -13748,15 +13748,15 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13748
13748
|
const D = (Q = N.textContent) == null ? void 0 : Q.trim();
|
|
13749
13749
|
D && C[D] && (N.textContent = C[D]);
|
|
13750
13750
|
});
|
|
13751
|
-
const
|
|
13752
|
-
|
|
13751
|
+
const M = S.querySelector("button");
|
|
13752
|
+
M && (M.textContent = "Друкувати");
|
|
13753
13753
|
}
|
|
13754
13754
|
function k(S) {
|
|
13755
13755
|
const C = S.querySelector(".mapboxgl-export-list");
|
|
13756
13756
|
if (!C || !i.value) return;
|
|
13757
13757
|
a.value = C;
|
|
13758
|
-
const
|
|
13759
|
-
if (
|
|
13758
|
+
const M = S.querySelector("button");
|
|
13759
|
+
if (M && (M.style.display = "none"), S.style.display = "none", !v.value) {
|
|
13760
13760
|
const D = y();
|
|
13761
13761
|
i.value.appendChild(D);
|
|
13762
13762
|
}
|
|
@@ -13766,7 +13766,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13766
13766
|
const D = (Q) => Q.stopPropagation();
|
|
13767
13767
|
C.addEventListener("click", D), C.addEventListener("mousedown", D), C[N] = !0;
|
|
13768
13768
|
}
|
|
13769
|
-
i.value.appendChild(C),
|
|
13769
|
+
i.value.appendChild(C), E(C);
|
|
13770
13770
|
}
|
|
13771
13771
|
return Ue(async () => {
|
|
13772
13772
|
await (n == null ? void 0 : n());
|
|
@@ -13781,7 +13781,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13781
13781
|
}
|
|
13782
13782
|
const C = u();
|
|
13783
13783
|
if (!C) return;
|
|
13784
|
-
const
|
|
13784
|
+
const M = new C({
|
|
13785
13785
|
PageSize: "A4",
|
|
13786
13786
|
PageOrientation: "landscape",
|
|
13787
13787
|
Format: "pdf",
|
|
@@ -13789,14 +13789,14 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13789
13789
|
Crosshair: !0,
|
|
13790
13790
|
PrintableArea: !0
|
|
13791
13791
|
});
|
|
13792
|
-
if (s.value =
|
|
13793
|
-
const N =
|
|
13794
|
-
|
|
13792
|
+
if (s.value = M, typeof M.onAdd == "function") {
|
|
13793
|
+
const N = M.onAdd.bind(M);
|
|
13794
|
+
M.onAdd = (D) => {
|
|
13795
13795
|
const Q = N(D);
|
|
13796
13796
|
return setTimeout(() => Q && k(Q), 50), Q;
|
|
13797
13797
|
};
|
|
13798
13798
|
}
|
|
13799
|
-
r ? r(
|
|
13799
|
+
r ? r(M, "top-right") : S.addControl(M, "top-right"), m = (N) => {
|
|
13800
13800
|
N.key === "Escape" && _();
|
|
13801
13801
|
}, document.addEventListener("keyup", m);
|
|
13802
13802
|
}), Ve(() => {
|
|
@@ -13833,22 +13833,22 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13833
13833
|
options: {}
|
|
13834
13834
|
},
|
|
13835
13835
|
setup(e) {
|
|
13836
|
-
var A,
|
|
13837
|
-
const t = e, n = ((
|
|
13838
|
-
function v(C,
|
|
13839
|
-
return typeof C == "number" && Number.isFinite(C) ? C :
|
|
13836
|
+
var A, E, k, S;
|
|
13837
|
+
const t = e, n = ((E = (A = rn()) == null ? void 0 : A.appContext.config.globalProperties) == null ? void 0 : E.$settings) || null, r = pn((k = n == null ? void 0 : n.map) == null ? void 0 : k.center) || [30, 50], l = T(null), i = tl(null), s = (S = t.options) == null ? void 0 : S.active, a = T(s === void 0 ? !1 : !!s);
|
|
13838
|
+
function v(C, M) {
|
|
13839
|
+
return typeof C == "number" && Number.isFinite(C) ? C : M;
|
|
13840
13840
|
}
|
|
13841
13841
|
const m = P(() => {
|
|
13842
13842
|
var Q, oe;
|
|
13843
|
-
const C = (Q = t.options) == null ? void 0 : Q.width,
|
|
13843
|
+
const C = (Q = t.options) == null ? void 0 : Q.width, M = (oe = t.options) == null ? void 0 : oe.height, N = v(t.width ?? C, 210), D = v(t.height ?? M, 150);
|
|
13844
13844
|
return {
|
|
13845
13845
|
width: `${N}px`,
|
|
13846
13846
|
height: `${D}px`
|
|
13847
13847
|
};
|
|
13848
13848
|
});
|
|
13849
13849
|
function b() {
|
|
13850
|
-
var
|
|
13851
|
-
const C = (N = (
|
|
13850
|
+
var M, N;
|
|
13851
|
+
const C = (N = (M = t.mapContext) == null ? void 0 : M.map) == null ? void 0 : N.value;
|
|
13852
13852
|
if (!C || typeof C.getStyle != "function") return null;
|
|
13853
13853
|
try {
|
|
13854
13854
|
const D = C.getStyle();
|
|
@@ -13861,7 +13861,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13861
13861
|
function h() {
|
|
13862
13862
|
var Q;
|
|
13863
13863
|
if (typeof window > "u" || i.value || !l.value) return;
|
|
13864
|
-
const C = b(),
|
|
13864
|
+
const C = b(), M = r, N = {
|
|
13865
13865
|
container: l.value,
|
|
13866
13866
|
style: C ?? {
|
|
13867
13867
|
version: 8,
|
|
@@ -13880,7 +13880,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13880
13880
|
}
|
|
13881
13881
|
]
|
|
13882
13882
|
},
|
|
13883
|
-
center:
|
|
13883
|
+
center: M,
|
|
13884
13884
|
zoom: ((Q = t.options) == null ? void 0 : Q.zoom) ?? 3,
|
|
13885
13885
|
interactive: !1,
|
|
13886
13886
|
attributionControl: !1
|
|
@@ -13953,9 +13953,9 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13953
13953
|
});
|
|
13954
13954
|
return;
|
|
13955
13955
|
}
|
|
13956
|
-
const
|
|
13957
|
-
if (!
|
|
13958
|
-
const N =
|
|
13956
|
+
const M = C.getBounds();
|
|
13957
|
+
if (!M) return;
|
|
13958
|
+
const N = M.getNorthEast(), D = M.getSouthWest();
|
|
13959
13959
|
if (!N || !D) return;
|
|
13960
13960
|
const Q = [
|
|
13961
13961
|
[D.lng, N.lat],
|
|
@@ -13979,8 +13979,8 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
13979
13979
|
}
|
|
13980
13980
|
function g() {
|
|
13981
13981
|
var N;
|
|
13982
|
-
const C = t.mapContext,
|
|
13983
|
-
!(C != null && C.on) || !
|
|
13982
|
+
const C = t.mapContext, M = (N = C == null ? void 0 : C.map) == null ? void 0 : N.value;
|
|
13983
|
+
!(C != null && C.on) || !M || (f == null || f(), f = C.on("move", p), p());
|
|
13984
13984
|
}
|
|
13985
13985
|
async function _() {
|
|
13986
13986
|
const C = t.mapContext;
|
|
@@ -14003,8 +14003,8 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
14003
14003
|
}
|
|
14004
14004
|
), le(
|
|
14005
14005
|
() => {
|
|
14006
|
-
var C,
|
|
14007
|
-
return (
|
|
14006
|
+
var C, M;
|
|
14007
|
+
return (M = (C = t.mapContext) == null ? void 0 : C.map) == null ? void 0 : M.value;
|
|
14008
14008
|
},
|
|
14009
14009
|
() => {
|
|
14010
14010
|
i.value && (u(), _());
|
|
@@ -14020,9 +14020,9 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
14020
14020
|
), le(
|
|
14021
14021
|
() => t.options,
|
|
14022
14022
|
() => {
|
|
14023
|
-
var
|
|
14023
|
+
var M;
|
|
14024
14024
|
f == null || f(), f = null, i.value && (i.value.remove(), i.value = null);
|
|
14025
|
-
const C = (
|
|
14025
|
+
const C = (M = t.options) == null ? void 0 : M.active;
|
|
14026
14026
|
typeof C == "boolean" && (a.value = C), st(() => {
|
|
14027
14027
|
h(), _();
|
|
14028
14028
|
});
|
|
@@ -14030,7 +14030,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
|
|
|
14030
14030
|
{ deep: !0 }
|
|
14031
14031
|
), Ve(() => {
|
|
14032
14032
|
f == null || f(), f = null, i.value && (i.value.remove(), i.value = null);
|
|
14033
|
-
}), (C,
|
|
14033
|
+
}), (C, M) => (c(), x("div", {
|
|
14034
14034
|
class: Ae(["minimap", { "minimap--open": a.value }])
|
|
14035
14035
|
}, [
|
|
14036
14036
|
o("button", {
|
|
@@ -14312,10 +14312,10 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
14312
14312
|
], i = () => {
|
|
14313
14313
|
n.value = !n.value;
|
|
14314
14314
|
}, s = (d, y) => {
|
|
14315
|
-
const p = (N) => N * Math.PI / 180, g = p(y.lat - d.lat), _ = p(y.lng - d.lng), A = p(d.lat),
|
|
14315
|
+
const p = (N) => N * Math.PI / 180, g = p(y.lat - d.lat), _ = p(y.lng - d.lng), A = p(d.lat), E = p(y.lat), k = Math.sin(g / 2), S = Math.sin(_ / 2);
|
|
14316
14316
|
return 6371e3 * (2 * Math.asin(
|
|
14317
14317
|
Math.sqrt(
|
|
14318
|
-
k * k + Math.cos(A) * Math.cos(
|
|
14318
|
+
k * k + Math.cos(A) * Math.cos(E) * S * S
|
|
14319
14319
|
)
|
|
14320
14320
|
));
|
|
14321
14321
|
}, a = P(() => {
|
|
@@ -14330,13 +14330,13 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
14330
14330
|
}), v = P(() => a.value >= 1e3 ? `${dn(a.value / 1e3)} км` : `${dn(a.value)} м`);
|
|
14331
14331
|
function m(d) {
|
|
14332
14332
|
if (d.length < 3) return 0;
|
|
14333
|
-
const y = d[0].lat, p = d[0].lng, g = (A,
|
|
14333
|
+
const y = d[0].lat, p = d[0].lng, g = (A, E) => {
|
|
14334
14334
|
const k = (A - y) * 110574;
|
|
14335
|
-
return { x: (
|
|
14335
|
+
return { x: (E - p) * 111320 * Math.cos(y * Math.PI / 180), y: k };
|
|
14336
14336
|
};
|
|
14337
14337
|
let _ = 0;
|
|
14338
14338
|
for (let A = 0; A < d.length; A++) {
|
|
14339
|
-
const
|
|
14339
|
+
const E = (A + 1) % d.length, k = g(d[A].lat, d[A].lng), S = g(d[E].lat, d[E].lng);
|
|
14340
14340
|
_ += k.x * S.y - k.y * S.x;
|
|
14341
14341
|
}
|
|
14342
14342
|
return Math.abs(_) * 0.5;
|
|
@@ -14548,7 +14548,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
14548
14548
|
l.value = [], a.value && (a.value = !1, r("shape-closed-change", !1)), u();
|
|
14549
14549
|
}, A = (Q) => {
|
|
14550
14550
|
p(Q);
|
|
14551
|
-
},
|
|
14551
|
+
}, E = (Q) => {
|
|
14552
14552
|
g(Q);
|
|
14553
14553
|
}, k = () => {
|
|
14554
14554
|
s.value = !0, r("add-request");
|
|
@@ -14556,7 +14556,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
14556
14556
|
y(Q), s.value = !1;
|
|
14557
14557
|
}, C = () => {
|
|
14558
14558
|
s.value = !1;
|
|
14559
|
-
},
|
|
14559
|
+
}, M = () => {
|
|
14560
14560
|
b.value && (a.value = !0, r("complete"), r("shape-closed-change", !0));
|
|
14561
14561
|
}, N = (Q) => {
|
|
14562
14562
|
const oe = (Q ?? []).map((ae) => ({
|
|
@@ -14620,7 +14620,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
14620
14620
|
points: l.value,
|
|
14621
14621
|
"is-shape-closed": a.value,
|
|
14622
14622
|
onUpdatePoint: A,
|
|
14623
|
-
onDeletePoint:
|
|
14623
|
+
onDeletePoint: E
|
|
14624
14624
|
}, null, 8, ["points", "is-shape-closed"])) : (c(), pe(lb, { key: 0 }))
|
|
14625
14625
|
], 64)) : (c(), x("div", yb, [
|
|
14626
14626
|
i.value ? (c(), pe(cb, {
|
|
@@ -14637,7 +14637,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
14637
14637
|
})),
|
|
14638
14638
|
b.value ? (c(), pe(jx, {
|
|
14639
14639
|
key: 1,
|
|
14640
|
-
onClick:
|
|
14640
|
+
onClick: M
|
|
14641
14641
|
})) : K("", !0)
|
|
14642
14642
|
]),
|
|
14643
14643
|
s.value ? (c(), pe(Tx, {
|
|
@@ -14662,10 +14662,10 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
14662
14662
|
},
|
|
14663
14663
|
setup(e) {
|
|
14664
14664
|
function t(p, g) {
|
|
14665
|
-
const _ = (
|
|
14665
|
+
const _ = (M) => M * Math.PI / 180, A = _(g.lat - p.lat), E = _(g.lng - p.lng), k = _(p.lat), S = _(g.lat);
|
|
14666
14666
|
return 6371e3 * (2 * Math.asin(
|
|
14667
14667
|
Math.sqrt(
|
|
14668
|
-
Math.sin(A / 2) ** 2 + Math.cos(k) * Math.cos(S) * Math.sin(
|
|
14668
|
+
Math.sin(A / 2) ** 2 + Math.cos(k) * Math.cos(S) * Math.sin(E / 2) ** 2
|
|
14669
14669
|
)
|
|
14670
14670
|
));
|
|
14671
14671
|
}
|
|
@@ -14677,15 +14677,15 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
14677
14677
|
return { type: "FeatureCollection", features: [] };
|
|
14678
14678
|
}
|
|
14679
14679
|
function a(p, g, _) {
|
|
14680
|
-
const A = _ ?? "general",
|
|
14680
|
+
const A = _ ?? "general", E = [];
|
|
14681
14681
|
let k = 0;
|
|
14682
|
-
|
|
14682
|
+
E.push(0);
|
|
14683
14683
|
for (let S = 1; S < p.length; S++)
|
|
14684
|
-
k += t(p[S - 1].coords, p[S].coords),
|
|
14684
|
+
k += t(p[S - 1].coords, p[S].coords), E.push(k);
|
|
14685
14685
|
return g && p.length >= 2 && (k += t(p[p.length - 1].coords, p[0].coords)), {
|
|
14686
14686
|
type: "FeatureCollection",
|
|
14687
14687
|
features: p.map((S, C) => {
|
|
14688
|
-
const
|
|
14688
|
+
const M = A === "general" ? C === 0 ? "0" : n(E[C]) : C === 0 ? "0" : n(
|
|
14689
14689
|
t(p[C - 1].coords, p[C].coords)
|
|
14690
14690
|
);
|
|
14691
14691
|
return {
|
|
@@ -14694,7 +14694,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
14694
14694
|
type: "Point",
|
|
14695
14695
|
coordinates: [S.coords.lng, S.coords.lat]
|
|
14696
14696
|
},
|
|
14697
|
-
properties: { id: S.id, index: C + 1, label:
|
|
14697
|
+
properties: { id: S.id, index: C + 1, label: M }
|
|
14698
14698
|
};
|
|
14699
14699
|
})
|
|
14700
14700
|
};
|
|
@@ -14703,9 +14703,9 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
14703
14703
|
if (p.length < 2) return s();
|
|
14704
14704
|
const _ = [];
|
|
14705
14705
|
for (let A = 0; A < p.length; A++) {
|
|
14706
|
-
const
|
|
14707
|
-
if (
|
|
14708
|
-
const k = p[A].coords, S = p[
|
|
14706
|
+
const E = A === p.length - 1 && g ? 0 : A + 1;
|
|
14707
|
+
if (E >= p.length) break;
|
|
14708
|
+
const k = p[A].coords, S = p[E].coords, C = t(k, S);
|
|
14709
14709
|
_.push({
|
|
14710
14710
|
type: "Feature",
|
|
14711
14711
|
geometry: {
|
|
@@ -14831,10 +14831,10 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
14831
14831
|
}
|
|
14832
14832
|
function d(p) {
|
|
14833
14833
|
if (!p) return;
|
|
14834
|
-
const g = p.getSource(Ft), _ = p.getSource(qt), A = p.getSource(Ht),
|
|
14834
|
+
const g = p.getSource(Ft), _ = p.getSource(qt), A = p.getSource(Ht), E = p.getSource(Wt), k = r.points, S = r.labelMode ?? "general";
|
|
14835
14835
|
g && g.setData(
|
|
14836
14836
|
a(k, r.isShapeClosed, S)
|
|
14837
|
-
), _ && _.setData(m(k, r.isShapeClosed)), A && A.setData(b(k)),
|
|
14837
|
+
), _ && _.setData(m(k, r.isShapeClosed)), A && A.setData(b(k)), E && E.setData(
|
|
14838
14838
|
S === "topoint" ? v(k, r.isShapeClosed) : s()
|
|
14839
14839
|
);
|
|
14840
14840
|
}
|
|
@@ -15222,7 +15222,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
15222
15222
|
Fe && Fe.scale(me, me);
|
|
15223
15223
|
}
|
|
15224
15224
|
}
|
|
15225
|
-
function
|
|
15225
|
+
function E($) {
|
|
15226
15226
|
const I = r.value;
|
|
15227
15227
|
if (!I) return { x: 0, y: 0 };
|
|
15228
15228
|
const B = I.getBoundingClientRect();
|
|
@@ -15245,7 +15245,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
15245
15245
|
const I = window.devicePixelRatio || 1, B = $.getContext("2d");
|
|
15246
15246
|
B && B.clearRect(0, 0, $.width / I, $.height / I);
|
|
15247
15247
|
}
|
|
15248
|
-
function
|
|
15248
|
+
function M() {
|
|
15249
15249
|
const $ = S();
|
|
15250
15250
|
if ($) {
|
|
15251
15251
|
if (C(), $.globalCompositeOperation = "source-over", $.strokeStyle = a.strokeColor, $.lineWidth = a.strokeWidth, $.lineCap = "round", $.lineJoin = "round", a.tool === "line")
|
|
@@ -15277,7 +15277,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
15277
15277
|
}
|
|
15278
15278
|
function Q($) {
|
|
15279
15279
|
if (!r.value) return;
|
|
15280
|
-
const { x: I, y: B } =
|
|
15280
|
+
const { x: I, y: B } = E($);
|
|
15281
15281
|
d = I, y = B, p = I, g = B;
|
|
15282
15282
|
const U = k();
|
|
15283
15283
|
if (U) {
|
|
@@ -15294,13 +15294,13 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
15294
15294
|
return;
|
|
15295
15295
|
}
|
|
15296
15296
|
if (a.tool === "polygon") {
|
|
15297
|
-
h.value = [...h.value, { x: I, y: B }], p = I, g = B,
|
|
15297
|
+
h.value = [...h.value, { x: I, y: B }], p = I, g = B, M();
|
|
15298
15298
|
return;
|
|
15299
15299
|
}
|
|
15300
15300
|
}
|
|
15301
15301
|
}
|
|
15302
15302
|
function oe($) {
|
|
15303
|
-
const { x: I, y: B } =
|
|
15303
|
+
const { x: I, y: B } = E($);
|
|
15304
15304
|
p = I, g = B, a.tool === "eraser" && (i.value = { x: $.clientX, y: $.clientY }, s.value = !0);
|
|
15305
15305
|
const U = k();
|
|
15306
15306
|
if (U) {
|
|
@@ -15316,7 +15316,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
15316
15316
|
U.globalCompositeOperation = "source-over", U.fillStyle = a.strokeColor, ue(U, I, B);
|
|
15317
15317
|
return;
|
|
15318
15318
|
}
|
|
15319
|
-
f.value && (a.tool === "line" || a.tool === "rect" || a.tool === "circle") &&
|
|
15319
|
+
f.value && (a.tool === "line" || a.tool === "rect" || a.tool === "circle") && M(), a.tool === "polygon" && h.value.length > 0 && M();
|
|
15320
15320
|
}
|
|
15321
15321
|
}
|
|
15322
15322
|
function ae() {
|
|
@@ -15471,7 +15471,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
15471
15471
|
},
|
|
15472
15472
|
setup(e) {
|
|
15473
15473
|
var Xn, yn, In, jn;
|
|
15474
|
-
const t = e, n = Lt(), r = Pt(), l = T(null), i = T({}), s = T(null), a = T(!1), v = T(null), m = T(!1), b = T([]), f = T(null), h = P(() => f.value === "ruler"), u = P(() => f.value === "draw"), d = P(() => f.value === "geolocation"), y = T("general"), p = T(null), g = T(null), _ = T(null), A = T("pen"),
|
|
15474
|
+
const t = e, n = Lt(), r = Pt(), l = T(null), i = T({}), s = T(null), a = T(!1), v = T(null), m = T(!1), b = T([]), f = T(null), h = P(() => f.value === "ruler"), u = P(() => f.value === "draw"), d = P(() => f.value === "geolocation"), y = T("general"), p = T(null), g = T(null), _ = T(null), A = T("pen"), E = T("#2563eb"), k = T(3), S = T([]), C = T(!1), M = T(null), N = T(!1), D = T(null), Q = P(() => t.id || "main"), oe = P(() => {
|
|
15475
15475
|
var W, de;
|
|
15476
15476
|
return {
|
|
15477
15477
|
height: ((W = t.height) == null ? void 0 : W.trim()) || ((de = i.value) == null ? void 0 : de.height) || "calc(100vh - 65px)"
|
|
@@ -15633,16 +15633,16 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
15633
15633
|
}
|
|
15634
15634
|
function Tn() {
|
|
15635
15635
|
var W;
|
|
15636
|
-
f.value === "ruler" ? (S.value = [], C.value = !1, (W = p.value) == null || W.clearPoints(), f.value = null) : (
|
|
15636
|
+
f.value === "ruler" ? (S.value = [], C.value = !1, (W = p.value) == null || W.clearPoints(), f.value = null) : (M.value = null, D.value = null, f.value = "ruler");
|
|
15637
15637
|
}
|
|
15638
15638
|
function Jt() {
|
|
15639
15639
|
f.value = null, S.value = [], C.value = !1;
|
|
15640
15640
|
}
|
|
15641
15641
|
function Fn() {
|
|
15642
|
-
f.value === "draw" ? f.value = null : (
|
|
15642
|
+
f.value === "draw" ? f.value = null : (M.value = null, D.value = null, f.value = "draw");
|
|
15643
15643
|
}
|
|
15644
15644
|
function q() {
|
|
15645
|
-
if (f.value === "geolocation" &&
|
|
15645
|
+
if (f.value === "geolocation" && M.value != null) {
|
|
15646
15646
|
G();
|
|
15647
15647
|
return;
|
|
15648
15648
|
}
|
|
@@ -15653,7 +15653,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
15653
15653
|
navigator.geolocation.getCurrentPosition(
|
|
15654
15654
|
(W) => {
|
|
15655
15655
|
const de = W.coords.latitude, Ee = W.coords.longitude;
|
|
15656
|
-
|
|
15656
|
+
M.value = { lat: de, lng: Ee }, D.value = null, N.value = !1, f.value = "geolocation", ee().then((qe) => {
|
|
15657
15657
|
qe != null && qe.flyTo && qe.flyTo({ center: [Ee, de], zoom: 15 });
|
|
15658
15658
|
});
|
|
15659
15659
|
},
|
|
@@ -15664,10 +15664,10 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
15664
15664
|
);
|
|
15665
15665
|
}
|
|
15666
15666
|
function J() {
|
|
15667
|
-
f.value = null,
|
|
15667
|
+
f.value = null, M.value = null, D.value = null;
|
|
15668
15668
|
}
|
|
15669
15669
|
function G() {
|
|
15670
|
-
const W =
|
|
15670
|
+
const W = M.value;
|
|
15671
15671
|
W != null && ee().then((de) => {
|
|
15672
15672
|
de != null && de.flyTo && de.flyTo({ center: [W.lng, W.lat], zoom: 15 });
|
|
15673
15673
|
});
|
|
@@ -15843,7 +15843,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
15843
15843
|
onFinishPolygon: Ie,
|
|
15844
15844
|
onUndo: De,
|
|
15845
15845
|
"onUpdate:tool": de[1] || (de[1] = (He) => A.value = He),
|
|
15846
|
-
"onUpdate:strokeColor": de[2] || (de[2] = (He) =>
|
|
15846
|
+
"onUpdate:strokeColor": de[2] || (de[2] = (He) => E.value = He),
|
|
15847
15847
|
"onUpdate:strokeWidth": de[3] || (de[3] = (He) => k.value = He)
|
|
15848
15848
|
}, null, 512)
|
|
15849
15849
|
])) : K("", !0),
|
|
@@ -15867,7 +15867,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
15867
15867
|
}, null, 512)) : K("", !0),
|
|
15868
15868
|
b.value.includes("geolocation") && d.value ? (c(), pe(Fb, {
|
|
15869
15869
|
key: 2,
|
|
15870
|
-
position:
|
|
15870
|
+
position: M.value,
|
|
15871
15871
|
onClose: J,
|
|
15872
15872
|
onRecenter: G
|
|
15873
15873
|
}, null, 8, ["position"])) : K("", !0)
|
|
@@ -15926,16 +15926,16 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
15926
15926
|
"is-shape-closed": C.value,
|
|
15927
15927
|
"label-mode": y.value
|
|
15928
15928
|
}, null, 8, ["points", "is-shape-closed", "label-mode"])) : K("", !0),
|
|
15929
|
-
m.value &&
|
|
15929
|
+
m.value && M.value != null ? (c(), pe(Ib, {
|
|
15930
15930
|
key: 5,
|
|
15931
|
-
position:
|
|
15931
|
+
position: M.value
|
|
15932
15932
|
}, null, 8, ["position"])) : K("", !0),
|
|
15933
15933
|
m.value && u.value ? (c(), pe(Xb, {
|
|
15934
15934
|
key: 6,
|
|
15935
15935
|
ref_key: "drawingCanvasRef",
|
|
15936
15936
|
ref: _,
|
|
15937
15937
|
tool: A.value,
|
|
15938
|
-
"stroke-color":
|
|
15938
|
+
"stroke-color": E.value,
|
|
15939
15939
|
"stroke-width": k.value
|
|
15940
15940
|
}, null, 8, ["tool", "stroke-color", "stroke-width"])) : K("", !0),
|
|
15941
15941
|
m.value ? (c(), x(ie, { key: 7 }, [
|
|
@@ -16216,14 +16216,14 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
16216
16216
|
message: "Ви впевнені, що хочете видалити цей віджет?",
|
|
16217
16217
|
type: "warning",
|
|
16218
16218
|
onConfirm: () => {
|
|
16219
|
-
const _ = v.value.filter((A,
|
|
16219
|
+
const _ = v.value.filter((A, E) => E !== g);
|
|
16220
16220
|
r("update:modelValue", _);
|
|
16221
16221
|
}
|
|
16222
16222
|
});
|
|
16223
16223
|
}
|
|
16224
16224
|
function f(g, _, A) {
|
|
16225
|
-
const
|
|
16226
|
-
|
|
16225
|
+
const E = [...v.value];
|
|
16226
|
+
E[g] = { ...E[g], [_]: A }, r("update:modelValue", E);
|
|
16227
16227
|
}
|
|
16228
16228
|
function h(g) {
|
|
16229
16229
|
return !!g && Object.keys(g).length > 0;
|
|
@@ -16269,14 +16269,14 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
16269
16269
|
])
|
|
16270
16270
|
], -1)),
|
|
16271
16271
|
o("tbody", M2, [
|
|
16272
|
-
(c(!0), x(ie, null, he(v.value, (
|
|
16272
|
+
(c(!0), x(ie, null, he(v.value, (E, k) => (c(), x("tr", {
|
|
16273
16273
|
key: k,
|
|
16274
16274
|
class: "hover:bg-gray-50"
|
|
16275
16275
|
}, [
|
|
16276
16276
|
o("td", E2, [
|
|
16277
16277
|
Be(o("select", {
|
|
16278
|
-
"onUpdate:modelValue": (S) =>
|
|
16279
|
-
onChange: (S) => f(k, "type",
|
|
16278
|
+
"onUpdate:modelValue": (S) => E.type = S,
|
|
16279
|
+
onChange: (S) => f(k, "type", E.type),
|
|
16280
16280
|
class: "w-full px-2 py-1.5 bg-white border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500 text-gray-700"
|
|
16281
16281
|
}, [
|
|
16282
16282
|
(c(), x(ie, null, he(l, (S) => o("option", {
|
|
@@ -16284,13 +16284,13 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
16284
16284
|
value: S
|
|
16285
16285
|
}, V(S), 9, F2)), 64))
|
|
16286
16286
|
], 40, T2), [
|
|
16287
|
-
[cr,
|
|
16287
|
+
[cr, E.type]
|
|
16288
16288
|
])
|
|
16289
16289
|
]),
|
|
16290
16290
|
o("td", I2, [
|
|
16291
16291
|
Be(o("select", {
|
|
16292
|
-
"onUpdate:modelValue": (S) =>
|
|
16293
|
-
onChange: (S) => f(k, "position",
|
|
16292
|
+
"onUpdate:modelValue": (S) => E.position = S,
|
|
16293
|
+
onChange: (S) => f(k, "position", E.position),
|
|
16294
16294
|
class: "w-full px-2 py-1.5 bg-white border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500 text-gray-700"
|
|
16295
16295
|
}, [
|
|
16296
16296
|
(c(), x(ie, null, he(i, (S) => o("option", {
|
|
@@ -16298,21 +16298,21 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
16298
16298
|
value: S
|
|
16299
16299
|
}, V(S), 9, z2)), 64))
|
|
16300
16300
|
], 40, j2), [
|
|
16301
|
-
[cr,
|
|
16301
|
+
[cr, E.position]
|
|
16302
16302
|
])
|
|
16303
16303
|
]),
|
|
16304
16304
|
o("td", N2, [
|
|
16305
16305
|
o("input", {
|
|
16306
16306
|
type: "checkbox",
|
|
16307
|
-
checked:
|
|
16307
|
+
checked: E.visible !== !1,
|
|
16308
16308
|
onChange: (S) => f(k, "visible", S.target.checked),
|
|
16309
16309
|
class: "w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500"
|
|
16310
16310
|
}, null, 40, P2)
|
|
16311
16311
|
]),
|
|
16312
16312
|
o("td", R2, [
|
|
16313
|
-
h(
|
|
16313
|
+
h(E.config) ? (c(), x("div", O2, [
|
|
16314
16314
|
o("button", {
|
|
16315
|
-
onClick: (S) => u(k,
|
|
16315
|
+
onClick: (S) => u(k, E.config),
|
|
16316
16316
|
class: "p-1 text-blue-600 hover:text-blue-800 hover:bg-blue-50 rounded transition-colors",
|
|
16317
16317
|
title: "Редагувати конфігурацію"
|
|
16318
16318
|
}, [
|
|
@@ -16351,7 +16351,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
16351
16351
|
ne(C2, {
|
|
16352
16352
|
teleport: "#modal",
|
|
16353
16353
|
modelValue: s.value,
|
|
16354
|
-
"onUpdate:modelValue": _[0] || (_[0] = (
|
|
16354
|
+
"onUpdate:modelValue": _[0] || (_[0] = (E) => s.value = E),
|
|
16355
16355
|
onSave: p
|
|
16356
16356
|
}, null, 8, ["modelValue"])
|
|
16357
16357
|
]);
|
|
@@ -16383,8 +16383,8 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
16383
16383
|
le(
|
|
16384
16384
|
() => n.query.tab,
|
|
16385
16385
|
(C) => {
|
|
16386
|
-
const
|
|
16387
|
-
|
|
16386
|
+
const M = b(C);
|
|
16387
|
+
M && m.includes(M) && h.value !== M && (h.value = M);
|
|
16388
16388
|
}
|
|
16389
16389
|
), le(h, (C) => {
|
|
16390
16390
|
n.query.tab !== C && t.replace({ query: { ...n.query, tab: C } });
|
|
@@ -16405,34 +16405,35 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
16405
16405
|
set: (C) => {
|
|
16406
16406
|
u.value.layers = C;
|
|
16407
16407
|
}
|
|
16408
|
-
}), y = P(
|
|
16409
|
-
|
|
16410
|
-
|
|
16411
|
-
|
|
16412
|
-
|
|
16413
|
-
|
|
16408
|
+
}), y = P(() => {
|
|
16409
|
+
var M;
|
|
16410
|
+
return (Array.isArray(s.value) ? s.value : ((M = s.value) == null ? void 0 : M.data) || []).map((N) => ({
|
|
16411
|
+
id: N.id,
|
|
16412
|
+
text: N.text || N.name || N.id
|
|
16413
|
+
}));
|
|
16414
|
+
}), p = P({
|
|
16414
16415
|
get: () => d.value.map((C) => {
|
|
16415
|
-
const
|
|
16416
|
-
return
|
|
16416
|
+
const M = y.value.find((N) => N.id === C);
|
|
16417
|
+
return M ? M.text : C;
|
|
16417
16418
|
}),
|
|
16418
16419
|
set: (C) => {
|
|
16419
|
-
const
|
|
16420
|
+
const M = C.map((N) => {
|
|
16420
16421
|
const D = y.value.find((Q) => Q.text === N);
|
|
16421
16422
|
return D ? D.id : null;
|
|
16422
16423
|
}).filter((N) => N !== null);
|
|
16423
|
-
d.value =
|
|
16424
|
+
d.value = M;
|
|
16424
16425
|
}
|
|
16425
16426
|
}), g = P(() => {
|
|
16426
16427
|
const C = u.value.center;
|
|
16427
16428
|
if (!Array.isArray(C) || C.length < 2) return "Не задано";
|
|
16428
|
-
const [
|
|
16429
|
-
return
|
|
16429
|
+
const [M, N] = C;
|
|
16430
|
+
return M === void 0 || N === void 0 || M === null || N === null || Number.isNaN(Number(M)) || Number.isNaN(Number(N)) ? "Не задано" : `Lng ${Number(M).toFixed(6)}, Lat ${Number(N).toFixed(6)}`;
|
|
16430
16431
|
}), _ = P(() => {
|
|
16431
16432
|
const C = u.value.zoom;
|
|
16432
16433
|
if (C == null || C === "")
|
|
16433
16434
|
return "Не задано";
|
|
16434
|
-
const
|
|
16435
|
-
return Number.isNaN(
|
|
16435
|
+
const M = Number(C);
|
|
16436
|
+
return Number.isNaN(M) ? "Не задано" : M.toFixed(2);
|
|
16436
16437
|
}), A = [
|
|
16437
16438
|
{
|
|
16438
16439
|
name: "name",
|
|
@@ -16504,9 +16505,9 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
16504
16505
|
col: 12
|
|
16505
16506
|
}
|
|
16506
16507
|
];
|
|
16507
|
-
async function
|
|
16508
|
+
async function E() {
|
|
16508
16509
|
try {
|
|
16509
|
-
const C = await fetch("/api/
|
|
16510
|
+
const C = await fetch("/api/suggest/layer_list");
|
|
16510
16511
|
C.ok && (s.value = await C.json());
|
|
16511
16512
|
} catch (C) {
|
|
16512
16513
|
console.error("Failed to load available layers:", C);
|
|
@@ -16514,13 +16515,13 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
16514
16515
|
}
|
|
16515
16516
|
async function k() {
|
|
16516
16517
|
try {
|
|
16517
|
-
const
|
|
16518
|
+
const M = await (await fetch(`/api/gis-map/${n.params.id}?original=1`)).json();
|
|
16518
16519
|
u.value = {
|
|
16519
|
-
...
|
|
16520
|
-
keywords:
|
|
16521
|
-
center:
|
|
16522
|
-
widgets: Array.isArray(
|
|
16523
|
-
layers: (
|
|
16520
|
+
...M,
|
|
16521
|
+
keywords: M.keywords || [],
|
|
16522
|
+
center: M.center ?? null,
|
|
16523
|
+
widgets: Array.isArray(M.widgets) ? M.widgets : [],
|
|
16524
|
+
layers: (M.layers || []).map((N) => N.id || N)
|
|
16524
16525
|
};
|
|
16525
16526
|
} catch (C) {
|
|
16526
16527
|
console.error("Failed to load map:", C), je({
|
|
@@ -16533,8 +16534,8 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
16533
16534
|
}
|
|
16534
16535
|
}
|
|
16535
16536
|
async function S() {
|
|
16536
|
-
var
|
|
16537
|
-
const C = (N = (
|
|
16537
|
+
var M, N;
|
|
16538
|
+
const C = (N = (M = a.value) == null ? void 0 : M.validate) == null ? void 0 : N.call(M);
|
|
16538
16539
|
if (C) {
|
|
16539
16540
|
je({
|
|
16540
16541
|
type: "warning",
|
|
@@ -16562,8 +16563,8 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
16562
16563
|
}
|
|
16563
16564
|
}
|
|
16564
16565
|
return Ue(async () => {
|
|
16565
|
-
await
|
|
16566
|
-
}), (C,
|
|
16566
|
+
await E(), k();
|
|
16567
|
+
}), (C, M) => {
|
|
16567
16568
|
const N = el("router-link");
|
|
16568
16569
|
return c(), x("div", Y2, [
|
|
16569
16570
|
ne(nl, {
|
|
@@ -16588,12 +16589,12 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
16588
16589
|
]),
|
|
16589
16590
|
o("span", G2, V(u.value.name || "Налаштування карти"), 1)
|
|
16590
16591
|
]),
|
|
16591
|
-
description: Oe(() => [...
|
|
16592
|
+
description: Oe(() => [...M[7] || (M[7] = [
|
|
16592
16593
|
Ce("Редагування параметрів карти", -1)
|
|
16593
16594
|
])]),
|
|
16594
16595
|
actions: Oe(() => [
|
|
16595
16596
|
o("button", {
|
|
16596
|
-
onClick:
|
|
16597
|
+
onClick: M[0] || (M[0] = (D) => se(t).back()),
|
|
16597
16598
|
class: "inline-flex items-center justify-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"
|
|
16598
16599
|
}, " Повернутися "),
|
|
16599
16600
|
o("button", {
|
|
@@ -16604,22 +16605,22 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
16604
16605
|
]),
|
|
16605
16606
|
_: 1
|
|
16606
16607
|
}, 8, ["title"]),
|
|
16607
|
-
l.value ? (c(), x("div", X2, [...
|
|
16608
|
+
l.value ? (c(), x("div", X2, [...M[8] || (M[8] = [
|
|
16608
16609
|
o("p", { class: "text-gray-500" }, "Завантаження...", -1)
|
|
16609
16610
|
])])) : (c(), x("div", Q2, [
|
|
16610
16611
|
ne(sh, {
|
|
16611
16612
|
tabs: v,
|
|
16612
16613
|
activeTab: h.value,
|
|
16613
|
-
"onUpdate:activeTab":
|
|
16614
|
+
"onUpdate:activeTab": M[1] || (M[1] = (D) => h.value = D)
|
|
16614
16615
|
}, null, 8, ["activeTab"]),
|
|
16615
16616
|
Be(o("div", J2, [
|
|
16616
16617
|
ne(ah, {
|
|
16617
16618
|
schema: A,
|
|
16618
16619
|
loading: l.value,
|
|
16619
16620
|
modelValue: u.value,
|
|
16620
|
-
"onUpdate:modelValue":
|
|
16621
|
+
"onUpdate:modelValue": M[2] || (M[2] = (D) => u.value = D),
|
|
16621
16622
|
form: a.value,
|
|
16622
|
-
"onUpdate:form":
|
|
16623
|
+
"onUpdate:form": M[3] || (M[3] = (D) => a.value = D)
|
|
16623
16624
|
}, null, 8, ["loading", "modelValue", "form"])
|
|
16624
16625
|
], 512), [
|
|
16625
16626
|
[Gt, h.value === "general"]
|
|
@@ -16628,16 +16629,16 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
16628
16629
|
ne(ch, {
|
|
16629
16630
|
options: y.value,
|
|
16630
16631
|
layerIDs: d.value,
|
|
16631
|
-
"onUpdate:layerIDs":
|
|
16632
|
+
"onUpdate:layerIDs": M[4] || (M[4] = (D) => d.value = D),
|
|
16632
16633
|
layerNames: p.value,
|
|
16633
|
-
"onUpdate:layerNames":
|
|
16634
|
+
"onUpdate:layerNames": M[5] || (M[5] = (D) => p.value = D)
|
|
16634
16635
|
}, null, 8, ["options", "layerIDs", "layerNames"])
|
|
16635
16636
|
], 512), [
|
|
16636
16637
|
[Gt, h.value === "layers"]
|
|
16637
16638
|
]),
|
|
16638
16639
|
Be(ne(W2, {
|
|
16639
16640
|
modelValue: u.value.widgets,
|
|
16640
|
-
"onUpdate:modelValue":
|
|
16641
|
+
"onUpdate:modelValue": M[6] || (M[6] = (D) => u.value.widgets = D)
|
|
16641
16642
|
}, null, 8, ["modelValue"]), [
|
|
16642
16643
|
[Gt, h.value === "widgets"]
|
|
16643
16644
|
]),
|
|
@@ -16655,7 +16656,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
16655
16656
|
]);
|
|
16656
16657
|
};
|
|
16657
16658
|
}
|
|
16658
|
-
}), q_ = /* @__PURE__ */ Te(nw, [["__scopeId", "data-v-
|
|
16659
|
+
}), q_ = /* @__PURE__ */ Te(nw, [["__scopeId", "data-v-54593f35"]]), ow = { class: "flex-1 overflow-y-auto p-0 overflow-x-hidden max-h-[70%] lg:max-h-[80%] xl:max-h-[83%] 2xl:max-h-[95%]" }, rw = { class: "pt-0 mt-0" }, lw = {
|
|
16659
16660
|
key: 0,
|
|
16660
16661
|
class: "flex items-center justify-center py-12"
|
|
16661
16662
|
}, sw = {
|
|
@@ -16682,28 +16683,28 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
16682
16683
|
emits: ["update:counts"],
|
|
16683
16684
|
setup(e, { expose: t, emit: n }) {
|
|
16684
16685
|
const r = e, l = n, i = Pt(), s = Lt(), a = T(Number(s.query.page) || 1), v = T(!1), m = T(0), b = T([]), f = P(() => {
|
|
16685
|
-
const C = (a.value - 1) * Fo,
|
|
16686
|
-
return b.value.slice(C,
|
|
16686
|
+
const C = (a.value - 1) * Fo, M = C + Fo;
|
|
16687
|
+
return b.value.slice(C, M);
|
|
16687
16688
|
}), h = T(!0), u = T(null), d = T(null);
|
|
16688
16689
|
let y = null, p = null;
|
|
16689
|
-
const g = (C = "",
|
|
16690
|
+
const g = (C = "", M = "") => {
|
|
16690
16691
|
const N = new URLSearchParams(), D = C.trim();
|
|
16691
16692
|
D && N.set("search", D);
|
|
16692
|
-
const Q = (
|
|
16693
|
+
const Q = (M || "").trim();
|
|
16693
16694
|
Q && N.set("type", Q);
|
|
16694
16695
|
const oe = N.toString();
|
|
16695
16696
|
return oe ? `/api/user-cls?${oe}` : "/api/user-cls";
|
|
16696
|
-
}, _ = async (C = "",
|
|
16697
|
+
}, _ = async (C = "", M = "") => {
|
|
16697
16698
|
try {
|
|
16698
16699
|
h.value = !0, u.value = null;
|
|
16699
|
-
const N = g(C,
|
|
16700
|
+
const N = g(C, M), D = await fetch(N);
|
|
16700
16701
|
if (!D.ok)
|
|
16701
16702
|
throw new Error(`HTTP error: ${D.status}`);
|
|
16702
16703
|
const Q = await D.json();
|
|
16703
16704
|
if (b.value = Q.data, !C.trim())
|
|
16704
16705
|
m.value = Q.data.length;
|
|
16705
16706
|
else if (m.value === 0) {
|
|
16706
|
-
const oe = await fetch(g("",
|
|
16707
|
+
const oe = await fetch(g("", M));
|
|
16707
16708
|
if (oe.ok) {
|
|
16708
16709
|
const ae = await oe.json();
|
|
16709
16710
|
m.value = ae.data.length;
|
|
@@ -16723,9 +16724,9 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
16723
16724
|
v.value = !0, _(r.search, r.type ?? "");
|
|
16724
16725
|
}), le(
|
|
16725
16726
|
() => [r.search, r.type],
|
|
16726
|
-
([C,
|
|
16727
|
+
([C, M]) => {
|
|
16727
16728
|
y && clearTimeout(y), y = setTimeout(() => {
|
|
16728
|
-
_(C,
|
|
16729
|
+
_(C, M ?? ""), a.value = 1;
|
|
16729
16730
|
}, 300);
|
|
16730
16731
|
}
|
|
16731
16732
|
);
|
|
@@ -16734,26 +16735,26 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
16734
16735
|
name: "classifier-detail",
|
|
16735
16736
|
params: { name: C.name }
|
|
16736
16737
|
});
|
|
16737
|
-
},
|
|
16738
|
+
}, E = () => {
|
|
16738
16739
|
_(r.search, r.type ?? "");
|
|
16739
16740
|
}, k = async (C) => {
|
|
16740
16741
|
try {
|
|
16741
16742
|
await navigator.clipboard.writeText(C), d.value = C, p && clearTimeout(p), p = setTimeout(() => {
|
|
16742
16743
|
d.value = null;
|
|
16743
16744
|
}, 500);
|
|
16744
|
-
} catch (
|
|
16745
|
-
console.error("Failed to copy text: ",
|
|
16745
|
+
} catch (M) {
|
|
16746
|
+
console.error("Failed to copy text: ", M);
|
|
16746
16747
|
}
|
|
16747
16748
|
};
|
|
16748
16749
|
t({
|
|
16749
|
-
refetch:
|
|
16750
|
+
refetch: E
|
|
16750
16751
|
});
|
|
16751
16752
|
const S = (C) => {
|
|
16752
16753
|
a.value = C, i.replace({
|
|
16753
16754
|
query: { ...s.query, page: String(C) }
|
|
16754
16755
|
});
|
|
16755
16756
|
};
|
|
16756
|
-
return (C,
|
|
16757
|
+
return (C, M) => (c(), x("div", ow, [
|
|
16757
16758
|
o("div", rw, [
|
|
16758
16759
|
h.value ? (c(), x("div", lw, [
|
|
16759
16760
|
ne(se(ll), {
|
|
@@ -17052,14 +17053,14 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
17052
17053
|
const t = Pt(), n = Lt(), r = P(() => n.params.name), l = T(!1), i = T(null), s = T(null), a = T(""), v = T(""), m = T(""), b = T(!1), f = T(!1), h = T(null), u = async () => {
|
|
17053
17054
|
var A;
|
|
17054
17055
|
try {
|
|
17055
|
-
const
|
|
17056
|
+
const E = await fetch(
|
|
17056
17057
|
`/api/user-cls?name=${encodeURIComponent(r.value)}`
|
|
17057
17058
|
);
|
|
17058
|
-
if (!
|
|
17059
|
-
const S = (A = (await
|
|
17059
|
+
if (!E.ok) return;
|
|
17060
|
+
const S = (A = (await E.json()).data) == null ? void 0 : A[0];
|
|
17060
17061
|
S && (v.value = S.description || "");
|
|
17061
|
-
} catch (
|
|
17062
|
-
console.error("Error fetching classifier details:",
|
|
17062
|
+
} catch (E) {
|
|
17063
|
+
console.error("Error fetching classifier details:", E);
|
|
17063
17064
|
}
|
|
17064
17065
|
}, d = () => {
|
|
17065
17066
|
m.value = v.value, b.value = !0, st(() => {
|
|
@@ -17106,14 +17107,14 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
17106
17107
|
}, _ = (A) => {
|
|
17107
17108
|
i.value = A, l.value = !0;
|
|
17108
17109
|
};
|
|
17109
|
-
return (A,
|
|
17110
|
+
return (A, E) => (c(), x("div", Yw, [
|
|
17110
17111
|
o("div", null, [
|
|
17111
17112
|
o("div", Zw, [
|
|
17112
17113
|
o("button", {
|
|
17113
|
-
onClick:
|
|
17114
|
+
onClick: E[0] || (E[0] = (k) => se(t).back()),
|
|
17114
17115
|
class: "text-blue-600 hover:text-blue-500 transition-colors"
|
|
17115
17116
|
}, " Довідники "),
|
|
17116
|
-
|
|
17117
|
+
E[4] || (E[4] = o("span", { class: "text-gray-400" }, "/", -1)),
|
|
17117
17118
|
o("span", Gw, V(r.value), 1)
|
|
17118
17119
|
]),
|
|
17119
17120
|
o("div", Kw, [
|
|
@@ -17123,7 +17124,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
17123
17124
|
Be(o("input", {
|
|
17124
17125
|
ref_key: "editInputRef",
|
|
17125
17126
|
ref: h,
|
|
17126
|
-
"onUpdate:modelValue":
|
|
17127
|
+
"onUpdate:modelValue": E[1] || (E[1] = (k) => m.value = k),
|
|
17127
17128
|
type: "text",
|
|
17128
17129
|
class: "text-sm text-gray-600 border-b-2 border-sky-500 focus:outline-none bg-transparent w-full py-0.5",
|
|
17129
17130
|
onKeydown: [
|
|
@@ -17182,10 +17183,10 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
17182
17183
|
"stroke-width": 2,
|
|
17183
17184
|
class: "shrink-0"
|
|
17184
17185
|
}),
|
|
17185
|
-
|
|
17186
|
+
E[5] || (E[5] = Ce(" Додати запис ", -1))
|
|
17186
17187
|
]),
|
|
17187
17188
|
o("button", {
|
|
17188
|
-
onClick:
|
|
17189
|
+
onClick: E[2] || (E[2] = (k) => se(t).back()),
|
|
17189
17190
|
class: "px-4 py-2 border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors text-gray-700 text-sm font-medium"
|
|
17190
17191
|
}, " Назад ")
|
|
17191
17192
|
])
|
|
@@ -17203,7 +17204,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
17203
17204
|
})
|
|
17204
17205
|
]),
|
|
17205
17206
|
Be(o("input", {
|
|
17206
|
-
"onUpdate:modelValue":
|
|
17207
|
+
"onUpdate:modelValue": E[3] || (E[3] = (k) => a.value = k),
|
|
17207
17208
|
type: "text",
|
|
17208
17209
|
placeholder: "Пошук за назвою або описом...",
|
|
17209
17210
|
class: "pl-9 bg-white h-[38px] min-w-[100px] py-2 px-3 block w-full border border-solid placeholder:text-nowrap border-stone-200 text-sm text-stone-800 placeholder:text-stone-400 focus:border-2 focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500 rounded-lg"
|
|
@@ -17282,16 +17283,16 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
17282
17283
|
le(
|
|
17283
17284
|
() => r.modelValue,
|
|
17284
17285
|
(A) => {
|
|
17285
|
-
const
|
|
17286
|
+
const E = {};
|
|
17286
17287
|
(A || []).forEach((k) => {
|
|
17287
|
-
|
|
17288
|
-
}), a.value =
|
|
17288
|
+
E[k.id] = new Set(k.actions || []);
|
|
17289
|
+
}), a.value = E;
|
|
17289
17290
|
},
|
|
17290
17291
|
{ immediate: !0 }
|
|
17291
17292
|
);
|
|
17292
17293
|
function m() {
|
|
17293
|
-
const A = Object.entries(a.value).map(([
|
|
17294
|
-
id:
|
|
17294
|
+
const A = Object.entries(a.value).map(([E, k]) => ({
|
|
17295
|
+
id: E,
|
|
17295
17296
|
actions: Array.from(k)
|
|
17296
17297
|
}));
|
|
17297
17298
|
l("update:modelValue", A);
|
|
@@ -17310,46 +17311,46 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
17310
17311
|
del: "Видалення"
|
|
17311
17312
|
}[A] || A;
|
|
17312
17313
|
}
|
|
17313
|
-
function u(A,
|
|
17314
|
+
function u(A, E) {
|
|
17314
17315
|
var S;
|
|
17315
17316
|
const k = b(A);
|
|
17316
|
-
return ((S = a.value[k]) == null ? void 0 : S.has(
|
|
17317
|
+
return ((S = a.value[k]) == null ? void 0 : S.has(E)) || !1;
|
|
17317
17318
|
}
|
|
17318
17319
|
function d(A) {
|
|
17319
|
-
const
|
|
17320
|
-
return s.value[
|
|
17320
|
+
const E = f(A);
|
|
17321
|
+
return s.value[E] === !0;
|
|
17321
17322
|
}
|
|
17322
17323
|
function y(A) {
|
|
17323
|
-
const
|
|
17324
|
-
s.value[
|
|
17324
|
+
const E = f(A);
|
|
17325
|
+
s.value[E] = !d(A);
|
|
17325
17326
|
}
|
|
17326
|
-
function p(A,
|
|
17327
|
+
function p(A, E) {
|
|
17327
17328
|
var k;
|
|
17328
|
-
return (k = A.menu) != null && k.length ? A.menu.every((S) => u(S,
|
|
17329
|
+
return (k = A.menu) != null && k.length ? A.menu.every((S) => u(S, E)) : u(A, E);
|
|
17329
17330
|
}
|
|
17330
|
-
function g(A,
|
|
17331
|
+
function g(A, E, k) {
|
|
17331
17332
|
var S;
|
|
17332
17333
|
if ((S = A.menu) != null && S.length) {
|
|
17333
17334
|
const C = { ...a.value };
|
|
17334
|
-
A.menu.forEach((
|
|
17335
|
-
const N = b(
|
|
17336
|
-
k ? D.add(
|
|
17335
|
+
A.menu.forEach((M) => {
|
|
17336
|
+
const N = b(M), D = new Set(C[N] || []);
|
|
17337
|
+
k ? D.add(E) : D.delete(E), C[N] = D;
|
|
17337
17338
|
}), a.value = C, m();
|
|
17338
17339
|
}
|
|
17339
17340
|
}
|
|
17340
|
-
function _(A,
|
|
17341
|
+
function _(A, E, k) {
|
|
17341
17342
|
const S = b(A), C = new Set(a.value[S] || []);
|
|
17342
|
-
k ? C.add(
|
|
17343
|
+
k ? C.add(E) : C.delete(E), a.value = { ...a.value, [S]: C }, m();
|
|
17343
17344
|
}
|
|
17344
17345
|
return t({
|
|
17345
17346
|
getSelected: () => r.modelValue
|
|
17346
|
-
}), (A,
|
|
17347
|
+
}), (A, E) => {
|
|
17347
17348
|
var k;
|
|
17348
17349
|
return c(), x("div", f_, [
|
|
17349
17350
|
o("table", p_, [
|
|
17350
17351
|
o("thead", m_, [
|
|
17351
17352
|
o("tr", null, [
|
|
17352
|
-
|
|
17353
|
+
E[0] || (E[0] = o("th", { class: "px-6 py-4 text-xs font-semibold text-gray-800 uppercase tracking-wider w-32 text-left" }, "Групи", -1)),
|
|
17353
17354
|
(c(!0), x(ie, null, he(i.value, (S) => (c(), x("th", {
|
|
17354
17355
|
key: S,
|
|
17355
17356
|
class: "px-4 py-4 text-xs font-semibold text-gray-800 uppercase tracking-wider w-20 text-center"
|
|
@@ -17386,15 +17387,15 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
17386
17387
|
type: "checkbox",
|
|
17387
17388
|
class: "sr-only peer",
|
|
17388
17389
|
checked: p(S, C),
|
|
17389
|
-
onChange: (
|
|
17390
|
+
onChange: (M) => g(S, C, M.target.checked)
|
|
17390
17391
|
}, null, 40, $_),
|
|
17391
|
-
|
|
17392
|
+
E[1] || (E[1] = o("div", { class: "w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600" }, null, -1))
|
|
17392
17393
|
])
|
|
17393
17394
|
])) : (c(), x("input", {
|
|
17394
17395
|
key: 1,
|
|
17395
17396
|
type: "checkbox",
|
|
17396
17397
|
checked: u(S, C),
|
|
17397
|
-
onChange: (
|
|
17398
|
+
onChange: (M) => _(S, C, M.target.checked),
|
|
17398
17399
|
class: "w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500 cursor-pointer"
|
|
17399
17400
|
}, null, 40, C_))
|
|
17400
17401
|
]))), 128))
|
|
@@ -17409,20 +17410,20 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
|
|
|
17409
17410
|
o("div", M_, V(C.path || C.table), 1)
|
|
17410
17411
|
])
|
|
17411
17412
|
]),
|
|
17412
|
-
(c(!0), x(ie, null, he(i.value, (
|
|
17413
|
-
key:
|
|
17413
|
+
(c(!0), x(ie, null, he(i.value, (M) => (c(), x("td", {
|
|
17414
|
+
key: M,
|
|
17414
17415
|
class: "px-5 py-3 text-center"
|
|
17415
17416
|
}, [
|
|
17416
17417
|
o("input", {
|
|
17417
17418
|
type: "checkbox",
|
|
17418
|
-
checked: u(C,
|
|
17419
|
-
onChange: (N) => _(C,
|
|
17419
|
+
checked: u(C, M),
|
|
17420
|
+
onChange: (N) => _(C, M, N.target.checked),
|
|
17420
17421
|
class: "w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500 cursor-pointer"
|
|
17421
17422
|
}, null, 40, E_)
|
|
17422
17423
|
]))), 128))
|
|
17423
17424
|
]))), 128)) : K("", !0)
|
|
17424
17425
|
], 64))), 128))
|
|
17425
|
-
])) : (c(), x("tfoot", T_, [...
|
|
17426
|
+
])) : (c(), x("tfoot", T_, [...E[2] || (E[2] = [
|
|
17426
17427
|
o("tr", null, [
|
|
17427
17428
|
o("td", {
|
|
17428
17429
|
colspan: "100%",
|