@opengis/gis 0.2.145 → 0.2.147
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/{CardIcon-KPdJQSAj.js → CardIcon-Cde9Jky8.js} +1 -1
- package/dist/{EntityTablePage-D0CxSITf.js → EntityTablePage-Cac57B6M.js} +1 -1
- package/dist/{ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-B7Nkfd7c.js → ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-DLjREp_K.js} +1 -1
- package/dist/{HeaderActions.vue_vue_type_script_setup_true_lang-9kitzmJK.js → HeaderActions.vue_vue_type_script_setup_true_lang-CphgPZBk.js} +1 -1
- package/dist/{MapSettings-CBkp5Cfw.js → MapSettings-nRv1j5Ls.js} +1 -1
- package/dist/{RastersTablePage-D1k_WisA.js → RastersTablePage-B8Rr7jO9.js} +1 -1
- package/dist/cartocss-mFm4xHBN.js +1065 -0
- package/dist/{import-utils-CVdAWcDL.js → import-utils-Bt6oFoHB.js} +1 -1
- package/dist/{index-DJKZSGVW.js → index-wy3j6by2.js} +1318 -1314
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +35 -35
- package/dist/{raster-CKQiGAgN.js → raster-BiqVALLd.js} +330 -318
- package/dist/{register-Br5WdQas.js → register-JkPi7fEL.js} +3 -3
- package/dist/{service-1sCTWkzU.js → service-BaJ_3XV-.js} +424 -415
- package/dist/{vs-datatable-CviY_UkX.js → vs-datatable-CwRAYNZZ.js} +1 -1
- package/package.json +1 -1
- package/server/routes/map/controllers/layerList.js +4 -4
- package/dist/cartocss-KfS-aCRn.js +0 -1053
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { TooltipDirective as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as te, resolveDirective as We, openBlock as u, createElementBlock as m, createElementVNode as n, Fragment as W, renderList as X, toDisplayString as d, withDirectives as we, createTextVNode as Xe, normalizeClass as ae, ref as $, watch as S, computed as h, vModelText as Ke, onMounted as Ye, onBeforeUnmount as Ze, createCommentVNode as q, createVNode as B, withCtx as He, createBlock as F, resolveDynamicComponent as Je } from "vue";
|
|
2
|
+
import { useRouter as et, useRoute as tt } from "vue-router";
|
|
3
|
+
import { TooltipDirective as st, notify as M } from "@opengis/core";
|
|
4
|
+
import { _ as nt, u as lt, f as rt, M as ot, i as it, j as be, F as at } from "./index-wy3j6by2.js";
|
|
5
|
+
import { _ as ut, a as ct, b as dt, c as ft } from "./HeaderActions.vue_vue_type_script_setup_true_lang-CphgPZBk.js";
|
|
6
|
+
import { _ as he } from "./ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-DLjREp_K.js";
|
|
7
|
+
const mt = { class: "flex-1 overflow-y-auto p-4 sm:p-6" }, pt = { class: "space-y-3" }, gt = { class: "bg-white p-3 rounded-xl border border-gray-200 shadow-sm" }, yt = { class: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2" }, vt = { class: "text-xs text-gray-500 mb-1" }, xt = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "text-base text-md font-semibold text-gray-900"
|
|
10
|
-
},
|
|
10
|
+
}, bt = {
|
|
11
11
|
key: 1,
|
|
12
12
|
class: "text-base text-md font-semibold text-gray-900"
|
|
13
|
-
},
|
|
13
|
+
}, ht = { class: "bg-white p-3 rounded-xl border border-gray-200 shadow-sm" }, _t = { class: "space-y-2" }, wt = { class: "bg-gradient-to-br from-blue-50 to-blue-100/30 p-4 rounded-lg border border-blue-200" }, $t = { class: "text-sm font-semibold text-gray-900" }, kt = { class: "text-xs text-gray-600 mt-1" }, Ct = { class: "grid grid-cols-2 gap-3" }, Et = { class: "text-xs text-gray-500 mb-1" }, Lt = { class: "text-sm font-semibold text-gray-900" }, Rt = { class: "bg-gray-50 p-4 rounded-lg" }, Mt = { class: "grid grid-cols-2 gap-4" }, St = { class: "text-xs text-gray-500 mb-1" }, It = { class: "text-sm font-semibold text-gray-900" }, jt = /* @__PURE__ */ te({
|
|
14
14
|
directives: {
|
|
15
|
-
tooltip:
|
|
15
|
+
tooltip: st
|
|
16
16
|
},
|
|
17
17
|
__name: "raster-info-tab",
|
|
18
18
|
props: {
|
|
19
19
|
details: {}
|
|
20
20
|
},
|
|
21
21
|
setup(_) {
|
|
22
|
-
return (
|
|
23
|
-
const
|
|
24
|
-
return u(), m("div",
|
|
25
|
-
n("div",
|
|
26
|
-
n("div",
|
|
22
|
+
return (y, v) => {
|
|
23
|
+
const o = We("tooltip");
|
|
24
|
+
return u(), m("div", mt, [
|
|
25
|
+
n("div", pt, [
|
|
26
|
+
n("div", gt, [
|
|
27
27
|
v[0] || (v[0] = n("div", { class: "mb-4" }, [
|
|
28
28
|
n("h4", { class: "text-sm font-semibold text-gray-900 uppercase tracking-wide" }, "Основні параметри")
|
|
29
29
|
], -1)),
|
|
30
|
-
n("div",
|
|
31
|
-
(u(!0), m(
|
|
30
|
+
n("div", yt, [
|
|
31
|
+
(u(!0), m(W, null, X(_.details.baseParams, (f) => (u(), m("div", {
|
|
32
32
|
key: f.label,
|
|
33
33
|
class: "bg-gray-50 p-2 rounded-lg"
|
|
34
34
|
}, [
|
|
35
|
-
n("p",
|
|
36
|
-
f.tooltip ?
|
|
37
|
-
|
|
35
|
+
n("p", vt, d(f.label), 1),
|
|
36
|
+
f.tooltip ? we((u(), m("p", xt, [
|
|
37
|
+
Xe(d(f.value), 1)
|
|
38
38
|
])), [
|
|
39
|
-
[
|
|
40
|
-
]) : (u(), m("p",
|
|
39
|
+
[o, f.tooltip]
|
|
40
|
+
]) : (u(), m("p", bt, d(f.value), 1))
|
|
41
41
|
]))), 128))
|
|
42
42
|
])
|
|
43
43
|
]),
|
|
44
|
-
n("div",
|
|
44
|
+
n("div", ht, [
|
|
45
45
|
v[3] || (v[3] = n("div", { class: "mb-2" }, [
|
|
46
46
|
n("h4", { class: "text-sm font-semibold text-gray-900 uppercase tracking-wide" }, "Просторова інформація")
|
|
47
47
|
], -1)),
|
|
48
|
-
n("div",
|
|
48
|
+
n("div", _t, [
|
|
49
49
|
n("div", null, [
|
|
50
50
|
v[1] || (v[1] = n("p", { class: "text-xs text-gray-500 mb-2" }, "Система координат", -1)),
|
|
51
|
-
n("div",
|
|
52
|
-
n("p",
|
|
53
|
-
n("p",
|
|
51
|
+
n("div", wt, [
|
|
52
|
+
n("p", $t, d(_.details.spatial.crs.code), 1),
|
|
53
|
+
n("p", kt, d(_.details.spatial.crs.description), 1)
|
|
54
54
|
])
|
|
55
55
|
]),
|
|
56
56
|
n("div", null, [
|
|
57
57
|
v[2] || (v[2] = n("p", { class: "text-xs text-gray-500 mb-2" }, "Межі покриття", -1)),
|
|
58
|
-
n("div",
|
|
59
|
-
(u(!0), m(
|
|
58
|
+
n("div", Ct, [
|
|
59
|
+
(u(!0), m(W, null, X(_.details.spatial.bounds, (f) => (u(), m("div", {
|
|
60
60
|
key: f.label,
|
|
61
61
|
class: "bg-gray-50 p-2 rounded-lg border border-gray-200"
|
|
62
62
|
}, [
|
|
63
|
-
n("p",
|
|
64
|
-
n("p",
|
|
63
|
+
n("p", Et, d(f.label), 1),
|
|
64
|
+
n("p", Lt, d(f.value), 1)
|
|
65
65
|
]))), 128))
|
|
66
66
|
])
|
|
67
67
|
]),
|
|
68
|
-
n("div",
|
|
69
|
-
n("div",
|
|
70
|
-
(u(!0), m(
|
|
68
|
+
n("div", Rt, [
|
|
69
|
+
n("div", Mt, [
|
|
70
|
+
(u(!0), m(W, null, X(_.details.spatial.resolution, (f) => (u(), m("div", {
|
|
71
71
|
key: f.label
|
|
72
72
|
}, [
|
|
73
|
-
n("p",
|
|
74
|
-
n("p",
|
|
73
|
+
n("p", St, d(f.label), 1),
|
|
74
|
+
n("p", It, d(f.value), 1)
|
|
75
75
|
]))), 128))
|
|
76
76
|
])
|
|
77
77
|
])
|
|
@@ -81,28 +81,28 @@ const dt = { class: "flex-1 overflow-y-auto p-4 sm:p-6" }, ft = { class: "space-
|
|
|
81
81
|
]);
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
}),
|
|
84
|
+
}), zt = { class: "flex-1 overflow-y-auto space-y-3 pr-1" }, Bt = { class: "font-medium text-sm text-gray-800" }, Pt = { class: "text-xs text-gray-500" }, Nt = /* @__PURE__ */ te({
|
|
85
85
|
__name: "raster-files-tab",
|
|
86
86
|
props: {
|
|
87
87
|
files: {}
|
|
88
88
|
},
|
|
89
89
|
setup(_) {
|
|
90
|
-
return (
|
|
91
|
-
(u(!0), m(
|
|
92
|
-
key:
|
|
90
|
+
return (y, v) => (u(), m("div", zt, [
|
|
91
|
+
(u(!0), m(W, null, X(_.files, (o) => (u(), m("div", {
|
|
92
|
+
key: o.name,
|
|
93
93
|
class: "border border-gray-100 rounded-xl p-4 shadow-sm bg-white flex items-start justify-between"
|
|
94
94
|
}, [
|
|
95
95
|
n("div", null, [
|
|
96
|
-
n("p",
|
|
97
|
-
n("p",
|
|
96
|
+
n("p", Bt, d(o.name), 1),
|
|
97
|
+
n("p", Pt, d(o.resolution) + " • " + d(o.size) + "MB", 1)
|
|
98
98
|
]),
|
|
99
99
|
n("span", {
|
|
100
|
-
class:
|
|
101
|
-
},
|
|
100
|
+
class: ae(["text-[11px] font-semibold px-2 py-0.5 rounded-full", o.statusClass])
|
|
101
|
+
}, d(o.status), 3)
|
|
102
102
|
]))), 128))
|
|
103
103
|
]));
|
|
104
104
|
}
|
|
105
|
-
}),
|
|
105
|
+
}), Dt = {}, Ut = {
|
|
106
106
|
xmlns: "http://www.w3.org/2000/svg",
|
|
107
107
|
width: "24",
|
|
108
108
|
height: "24",
|
|
@@ -113,8 +113,8 @@ const dt = { class: "flex-1 overflow-y-auto p-4 sm:p-6" }, ft = { class: "space-
|
|
|
113
113
|
"stroke-linecap": "round",
|
|
114
114
|
"stroke-linejoin": "round"
|
|
115
115
|
};
|
|
116
|
-
function
|
|
117
|
-
return u(), m("svg",
|
|
116
|
+
function Tt(_, y) {
|
|
117
|
+
return u(), m("svg", Ut, [...y[0] || (y[0] = [
|
|
118
118
|
n("circle", {
|
|
119
119
|
cx: "12",
|
|
120
120
|
cy: "12",
|
|
@@ -129,7 +129,7 @@ function Dt(_, x) {
|
|
|
129
129
|
n("path", { d: "M11 12h1v4h1" }, null, -1)
|
|
130
130
|
])]);
|
|
131
131
|
}
|
|
132
|
-
const
|
|
132
|
+
const qt = /* @__PURE__ */ nt(Dt, [["render", Tt]]), Ft = { class: "absolute top-[5.5rem] left-4 z-30 flex flex-col items-start gap-2" }, Vt = { class: "rounded-2xl bg-white/90 px-3 py-2 text-xs font-medium text-slate-600 shadow-sm backdrop-blur" }, At = { class: "flex items-center gap-2" }, Ot = { class: "rounded-2xl bg-white/90 px-3 py-2 text-xs font-medium text-slate-600 shadow-sm backdrop-blur" }, Gt = { class: "inline-flex items-center gap-2 text-[11px] text-slate-600" }, Qt = ["checked"], Wt = /* @__PURE__ */ te({
|
|
133
133
|
__name: "RasterLayer",
|
|
134
134
|
props: {
|
|
135
135
|
tileUrl: {},
|
|
@@ -140,11 +140,11 @@ const Ut = /* @__PURE__ */ tt(Nt, [["render", Dt]]), Tt = { class: "absolute top
|
|
|
140
140
|
},
|
|
141
141
|
emits: ["toggle-extent"],
|
|
142
142
|
setup(_) {
|
|
143
|
-
const
|
|
144
|
-
sourceId:
|
|
143
|
+
const y = _, v = y.layerId || "raster-preview-layer", o = `${v}-source`, f = y.extent && y.extent.length === 4 ? [...y.extent] : void 0, P = lt(v, {
|
|
144
|
+
sourceId: o,
|
|
145
145
|
source: {
|
|
146
146
|
type: "raster",
|
|
147
|
-
tiles:
|
|
147
|
+
tiles: y.tileUrl ? [y.tileUrl + "?nottl=1"] : [],
|
|
148
148
|
tileSize: 256,
|
|
149
149
|
...f ? { bounds: f } : {}
|
|
150
150
|
},
|
|
@@ -153,37 +153,37 @@ const Ut = /* @__PURE__ */ tt(Nt, [["render", Dt]]), Tt = { class: "absolute top
|
|
|
153
153
|
type: "raster",
|
|
154
154
|
paint: { "raster-opacity": 1 }
|
|
155
155
|
},
|
|
156
|
-
beforeId:
|
|
157
|
-
}), { fitBounds:
|
|
158
|
-
|
|
159
|
-
() =>
|
|
160
|
-
(
|
|
161
|
-
if (!
|
|
162
|
-
|
|
156
|
+
beforeId: y.beforeId ?? null
|
|
157
|
+
}), { fitBounds: V } = rt(), N = $(1);
|
|
158
|
+
S(
|
|
159
|
+
() => y.tileUrl,
|
|
160
|
+
(p) => {
|
|
161
|
+
if (!p) {
|
|
162
|
+
P.setVisible(!1);
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
|
-
|
|
165
|
+
P.setVisible(!0), P.setTiles([p]);
|
|
166
166
|
},
|
|
167
167
|
{ immediate: !0 }
|
|
168
|
-
),
|
|
169
|
-
() =>
|
|
170
|
-
(
|
|
171
|
-
|
|
168
|
+
), S(
|
|
169
|
+
() => N.value,
|
|
170
|
+
(p) => {
|
|
171
|
+
P.setOpacity(p);
|
|
172
172
|
},
|
|
173
173
|
{ immediate: !0 }
|
|
174
174
|
);
|
|
175
|
-
let
|
|
176
|
-
|
|
177
|
-
() =>
|
|
178
|
-
(
|
|
179
|
-
if (!
|
|
180
|
-
const b =
|
|
181
|
-
if (b !==
|
|
182
|
-
if (
|
|
183
|
-
|
|
175
|
+
let x = null, c = !1;
|
|
176
|
+
S(
|
|
177
|
+
() => y.extent,
|
|
178
|
+
(p) => {
|
|
179
|
+
if (!p || p.length !== 4) return;
|
|
180
|
+
const b = p.join(",");
|
|
181
|
+
if (b !== x) {
|
|
182
|
+
if (x = b, !c) {
|
|
183
|
+
c = !0;
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
|
-
|
|
186
|
+
V == null || V([[p[0], p[1]], [p[2], p[3]]], {
|
|
187
187
|
padding: 40,
|
|
188
188
|
maxZoom: 17
|
|
189
189
|
});
|
|
@@ -191,128 +191,140 @@ const Ut = /* @__PURE__ */ tt(Nt, [["render", Dt]]), Tt = { class: "absolute top
|
|
|
191
191
|
},
|
|
192
192
|
{ immediate: !0 }
|
|
193
193
|
);
|
|
194
|
-
const
|
|
195
|
-
return (
|
|
196
|
-
n("div",
|
|
197
|
-
n("div",
|
|
194
|
+
const A = h(() => `${Math.round(N.value * 100)}%`);
|
|
195
|
+
return (p, b) => (u(), m("div", Ft, [
|
|
196
|
+
n("div", Vt, [
|
|
197
|
+
n("div", At, [
|
|
198
198
|
b[2] || (b[2] = n("span", null, "Прозорість:", -1)),
|
|
199
|
-
|
|
199
|
+
we(n("input", {
|
|
200
200
|
type: "range",
|
|
201
201
|
min: "0",
|
|
202
202
|
max: "1",
|
|
203
203
|
step: "0.01",
|
|
204
|
-
"onUpdate:modelValue": b[0] || (b[0] = (
|
|
204
|
+
"onUpdate:modelValue": b[0] || (b[0] = (I) => N.value = I),
|
|
205
205
|
class: "h-1 w-28 cursor-pointer appearance-none rounded-full bg-slate-300 focus:outline-none",
|
|
206
206
|
style: { "accent-color": "#3b82f6" }
|
|
207
207
|
}, null, 512), [
|
|
208
208
|
[
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
Ke,
|
|
210
|
+
N.value,
|
|
211
211
|
void 0,
|
|
212
212
|
{ number: !0 }
|
|
213
213
|
]
|
|
214
214
|
]),
|
|
215
|
-
n("span", null,
|
|
215
|
+
n("span", null, d(A.value), 1)
|
|
216
216
|
])
|
|
217
217
|
]),
|
|
218
|
-
n("div",
|
|
219
|
-
n("label",
|
|
218
|
+
n("div", Ot, [
|
|
219
|
+
n("label", Gt, [
|
|
220
220
|
n("input", {
|
|
221
221
|
type: "checkbox",
|
|
222
222
|
class: "h-3.5 w-3.5 rounded border-slate-300 text-blue-600 focus:ring-blue-200",
|
|
223
223
|
checked: _.showRasterExtent,
|
|
224
|
-
onChange: b[1] || (b[1] = (
|
|
225
|
-
}, null, 40,
|
|
224
|
+
onChange: b[1] || (b[1] = (I) => p.$emit("toggle-extent", I.target.checked))
|
|
225
|
+
}, null, 40, Qt),
|
|
226
226
|
b[3] || (b[3] = n("span", null, "Межі растру", -1))
|
|
227
227
|
])
|
|
228
228
|
])
|
|
229
229
|
]));
|
|
230
230
|
}
|
|
231
|
-
}),
|
|
231
|
+
}), Xt = { class: "flex h-full bg-gradient-to-br from-slate-50 to-white" }, Kt = { class: "flex-1 relative overflow-hidden" }, Yt = { class: "absolute top-0 left-0 w-full z-20" }, Zt = { class: "px-4 sm:px-6 py-4 border-b border-gray-200 bg-white shadow-sm" }, Ht = { class: "flex items-start justify-between gap-4" }, Jt = { class: "flex-1 min-w-0" }, es = { class: "flex items-center text-sm text-gray-500 mb-3" }, ts = { class: "text-gray-900 font-medium truncate max-w-xs" }, ss = { class: "flex items-center justify-between gap-4" }, ns = { class: "flex-1 min-w-0" }, ls = { class: "flex items-center gap-3 mb-1" }, rs = { class: "text-base font-semibold text-gray-900 truncate" }, os = ["title"], is = { class: "flex items-center gap-4 min-w-0" }, as = { class: "flex-1 min-w-0" }, us = ["title"], cs = { class: "w-full h-full bg-gradient-to-br from-sky-50 via-white to-blue-50 flex items-center justify-center relative pt-[105px]" }, ds = { class: "relative w-full h-full" }, fs = { class: "absolute top-4 left-4 z-20" }, ms = {
|
|
232
232
|
key: 1,
|
|
233
233
|
class: "absolute bottom-4 left-1/2 z-30 -translate-x-1/2 rounded-2xl border border-sky-200 bg-white/95 px-4 py-2 text-xs font-medium text-slate-700 shadow-lg backdrop-blur"
|
|
234
|
-
},
|
|
234
|
+
}, ps = { class: "absolute top-[6.5rem] right-2 space-y-1 z-20" }, gs = { class: "flex-1 flex flex-col h-full" }, ys = { class: "px-3 pt-3 pb-2 border-b border-gray-100" }, vs = { class: "items-center justify-center text-muted-foreground grid w-full grid-cols-3 h-12 p-1 bg-gray-50 rounded-xl shadow-sm" }, xs = ["aria-selected", "onClick"], bs = { class: "leading-none" }, hs = { class: "flex flex-col flex-1 overflow-y-hidden p-3" }, _s = {
|
|
235
235
|
key: 0,
|
|
236
236
|
class: "mb-3 text-xs text-slate-500"
|
|
237
|
-
},
|
|
237
|
+
}, ws = {
|
|
238
238
|
key: 1,
|
|
239
239
|
class: "mb-3 text-xs text-rose-600"
|
|
240
|
-
},
|
|
240
|
+
}, $s = "OpenGIS", _e = 2, ee = 5, ks = 5, js = /* @__PURE__ */ te({
|
|
241
241
|
__name: "raster",
|
|
242
242
|
setup(_) {
|
|
243
|
-
const
|
|
243
|
+
const y = [
|
|
244
244
|
{ cardClass: "bg-gradient-to-br from-green-50 to-green-100/30 border-green-200", titleClass: "text-green-900" },
|
|
245
245
|
{ cardClass: "bg-gradient-to-br from-blue-50 to-blue-100/30 border-blue-200", titleClass: "text-blue-900" },
|
|
246
246
|
{ cardClass: "bg-gradient-to-br from-purple-50 to-purple-100/30 border-purple-200", titleClass: "text-purple-900" },
|
|
247
247
|
{ cardClass: "bg-gradient-to-br from-gray-50 to-gray-100/30 border-gray-200", titleClass: "text-gray-900" }
|
|
248
|
-
], v =
|
|
248
|
+
], v = et(), o = tt(), f = $(null), P = h(() => {
|
|
249
|
+
var s;
|
|
250
|
+
const e = (s = o.matched[o.matched.length - 1]) == null ? void 0 : s.path;
|
|
251
|
+
return (typeof e == "string" && e ? e : o.path).replace(/\/:id\??$/, "") || "/";
|
|
252
|
+
}), V = h(() => {
|
|
253
|
+
var t;
|
|
254
|
+
const e = (t = o.meta) == null ? void 0 : t.title;
|
|
255
|
+
return typeof e == "string" && e.trim() ? e : "Растри";
|
|
256
|
+
});
|
|
257
|
+
function N() {
|
|
258
|
+
v.push(P.value);
|
|
259
|
+
}
|
|
260
|
+
const x = h(() => {
|
|
249
261
|
var t;
|
|
250
|
-
const e = (t =
|
|
262
|
+
const e = (t = o.params) == null ? void 0 : t.id;
|
|
251
263
|
return typeof e == "string" ? e : void 0;
|
|
252
|
-
}), c = $(null),
|
|
253
|
-
let
|
|
254
|
-
const
|
|
255
|
-
let
|
|
256
|
-
function
|
|
257
|
-
if (Array.isArray(e)) return
|
|
264
|
+
}), c = $(null), A = $(!1), p = $(!1), b = $(null), I = $(!0), C = $(!1), O = $(null);
|
|
265
|
+
let G = null, D = null;
|
|
266
|
+
const se = $(!1);
|
|
267
|
+
let j = null, Q = !1;
|
|
268
|
+
function K(e) {
|
|
269
|
+
if (Array.isArray(e)) return K(e[0]);
|
|
258
270
|
if (typeof e != "string" && typeof e != "number") return null;
|
|
259
271
|
const t = typeof e == "number" ? e : Number(e.trim());
|
|
260
272
|
return Number.isFinite(t) ? t : null;
|
|
261
273
|
}
|
|
262
|
-
function
|
|
274
|
+
function ne(e, t) {
|
|
263
275
|
return e.toFixed(t);
|
|
264
276
|
}
|
|
265
|
-
function
|
|
277
|
+
function le(e, t, s) {
|
|
266
278
|
const l = 0.5 * 10 ** -s;
|
|
267
279
|
return Math.abs(e - t) > l;
|
|
268
280
|
}
|
|
269
|
-
function
|
|
281
|
+
function z() {
|
|
270
282
|
var e;
|
|
271
283
|
return (e = f.value) == null ? void 0 : e.ctx;
|
|
272
284
|
}
|
|
273
|
-
function
|
|
274
|
-
var
|
|
275
|
-
const e = (
|
|
285
|
+
function ue() {
|
|
286
|
+
var a, g, R, k;
|
|
287
|
+
const e = (g = (a = z()) == null ? void 0 : a.map) == null ? void 0 : g.value;
|
|
276
288
|
if (!e) return;
|
|
277
|
-
const t =
|
|
289
|
+
const t = K(o.query.z), s = K(o.query.x), l = K(o.query.y);
|
|
278
290
|
if (t == null || s == null || l == null) return;
|
|
279
|
-
const r = (
|
|
280
|
-
(!r ||
|
|
291
|
+
const r = (R = e.getCenter) == null ? void 0 : R.call(e), i = (k = e.getZoom) == null ? void 0 : k.call(e);
|
|
292
|
+
(!r || le(r.lng, s, ee) || le(r.lat, l, ee) || le(i ?? 0, t, _e)) && (se.value = !0, e.jumpTo({ center: [s, l], zoom: t }), se.value = !1);
|
|
281
293
|
}
|
|
282
|
-
function
|
|
283
|
-
var r,
|
|
284
|
-
if (
|
|
285
|
-
const e = (
|
|
294
|
+
function $e() {
|
|
295
|
+
var r, i, w, a;
|
|
296
|
+
if (se.value) return;
|
|
297
|
+
const e = (i = (r = z()) == null ? void 0 : r.map) == null ? void 0 : i.value;
|
|
286
298
|
if (!e) return;
|
|
287
|
-
const t = (w = e.getCenter) == null ? void 0 : w.call(e), s = (
|
|
299
|
+
const t = (w = e.getCenter) == null ? void 0 : w.call(e), s = (a = e.getZoom) == null ? void 0 : a.call(e);
|
|
288
300
|
if (!t || s == null) return;
|
|
289
301
|
const l = {
|
|
290
|
-
...
|
|
291
|
-
z:
|
|
292
|
-
x:
|
|
293
|
-
y:
|
|
302
|
+
...o.query,
|
|
303
|
+
z: ne(s, _e),
|
|
304
|
+
x: ne(t.lng, ee),
|
|
305
|
+
y: ne(t.lat, ee)
|
|
294
306
|
};
|
|
295
|
-
|
|
307
|
+
o.query.z === l.z && o.query.x === l.x && o.query.y === l.y || v.replace({ query: l });
|
|
296
308
|
}
|
|
297
|
-
function
|
|
309
|
+
function ke() {
|
|
298
310
|
var t;
|
|
299
311
|
if (typeof document > "u") return;
|
|
300
312
|
const e = (t = T.value) == null ? void 0 : t.name;
|
|
301
|
-
document.title = e ? `${e} — Растер` :
|
|
313
|
+
document.title = e ? `${e} — Растер` : $s;
|
|
302
314
|
}
|
|
303
|
-
function
|
|
304
|
-
return Number(e.toFixed(
|
|
315
|
+
function Y(e) {
|
|
316
|
+
return Number(e.toFixed(ks));
|
|
305
317
|
}
|
|
306
|
-
function
|
|
307
|
-
const [s, l] = e, [r,
|
|
318
|
+
function ce(e, t) {
|
|
319
|
+
const [s, l] = e, [r, i] = t;
|
|
308
320
|
return [
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
321
|
+
Y(Math.min(s, r)),
|
|
322
|
+
Y(Math.min(l, i)),
|
|
323
|
+
Y(Math.max(s, r)),
|
|
324
|
+
Y(Math.max(l, i))
|
|
313
325
|
];
|
|
314
326
|
}
|
|
315
|
-
function
|
|
327
|
+
function Ce(e) {
|
|
316
328
|
const [t, s, l, r] = e;
|
|
317
329
|
return {
|
|
318
330
|
type: "Polygon",
|
|
@@ -325,131 +337,131 @@ const Ut = /* @__PURE__ */ tt(Nt, [["render", Dt]]), Tt = { class: "absolute top
|
|
|
325
337
|
]]
|
|
326
338
|
};
|
|
327
339
|
}
|
|
328
|
-
function
|
|
329
|
-
var l, r,
|
|
330
|
-
const t = (r = (l =
|
|
340
|
+
function re(e) {
|
|
341
|
+
var l, r, i;
|
|
342
|
+
const t = (r = (l = z()) == null ? void 0 : l.map) == null ? void 0 : r.value, s = (i = t == null ? void 0 : t.getCanvas) == null ? void 0 : i.call(t);
|
|
331
343
|
s != null && s.style && (s.style.cursor = e);
|
|
332
344
|
}
|
|
333
|
-
async function
|
|
334
|
-
if (!(!
|
|
345
|
+
async function Ee(e, t) {
|
|
346
|
+
if (!(!x.value || !c.value))
|
|
335
347
|
try {
|
|
336
|
-
const s =
|
|
348
|
+
const s = Ce(e), l = await fetch(`/api/gis-metadata/raster/${encodeURIComponent(x.value)}`, {
|
|
337
349
|
method: "POST",
|
|
338
350
|
headers: { "Content-Type": "application/json" },
|
|
339
351
|
body: JSON.stringify({ geom: s })
|
|
340
352
|
});
|
|
341
353
|
if (!l.ok) throw new Error(`Failed to save raster metadata geom: ${l.status}`);
|
|
342
|
-
|
|
354
|
+
M({
|
|
343
355
|
type: "success",
|
|
344
356
|
title: "Extent збережено",
|
|
345
357
|
message: "Нові межі успішно збережено."
|
|
346
|
-
}), await
|
|
358
|
+
}), await H();
|
|
347
359
|
} catch (s) {
|
|
348
360
|
console.error("Failed to save raster extent", s), c.value && (c.value = {
|
|
349
361
|
...c.value,
|
|
350
362
|
extent: t ? [...t] : void 0
|
|
351
|
-
}),
|
|
363
|
+
}), M({
|
|
352
364
|
type: "error",
|
|
353
365
|
title: "Помилка",
|
|
354
366
|
message: "Не вдалося зберегти Extent"
|
|
355
367
|
});
|
|
356
368
|
}
|
|
357
369
|
}
|
|
358
|
-
function
|
|
370
|
+
function de(e) {
|
|
359
371
|
var s, l, r;
|
|
360
|
-
const t = (l = (s =
|
|
372
|
+
const t = (l = (s = z()) == null ? void 0 : s.map) == null ? void 0 : l.value;
|
|
361
373
|
if ((r = t == null ? void 0 : t.dragPan) != null && r.enable && t.dragPan.enable(), (e == null ? void 0 : e.length) === 4 && c.value) {
|
|
362
|
-
const
|
|
374
|
+
const i = Array.isArray(c.value.extent) ? [...c.value.extent] : null;
|
|
363
375
|
c.value = {
|
|
364
376
|
...c.value,
|
|
365
377
|
extent: [...e]
|
|
366
|
-
},
|
|
378
|
+
}, Ee(e, i);
|
|
367
379
|
}
|
|
368
|
-
|
|
380
|
+
j = null, Q = !1, O.value = null, C.value = !1, re("");
|
|
369
381
|
}
|
|
370
|
-
function
|
|
371
|
-
|
|
382
|
+
function oe() {
|
|
383
|
+
de(null);
|
|
372
384
|
}
|
|
373
|
-
function
|
|
374
|
-
var
|
|
375
|
-
const e = (w = (
|
|
385
|
+
function Le() {
|
|
386
|
+
var i, w;
|
|
387
|
+
const e = (w = (i = z()) == null ? void 0 : i.map) == null ? void 0 : w.value;
|
|
376
388
|
if (!e) return;
|
|
377
|
-
const t = (
|
|
378
|
-
var
|
|
379
|
-
if (!
|
|
380
|
-
const
|
|
381
|
-
|
|
382
|
-
}, s = (
|
|
383
|
-
if (!
|
|
384
|
-
const
|
|
385
|
-
|
|
386
|
-
}, l = (
|
|
387
|
-
if (!
|
|
388
|
-
const
|
|
389
|
-
if (!
|
|
390
|
-
|
|
389
|
+
const t = (a) => {
|
|
390
|
+
var R, k, J;
|
|
391
|
+
if (!C.value || ((R = a == null ? void 0 : a.originalEvent) == null ? void 0 : R.button) != null && a.originalEvent.button !== 0) return;
|
|
392
|
+
const g = a == null ? void 0 : a.lngLat;
|
|
393
|
+
g && (j = [g.lng, g.lat], Q = !0, O.value = [g.lng, g.lat, g.lng, g.lat], (J = (k = e.dragPan) == null ? void 0 : k.disable) == null || J.call(k));
|
|
394
|
+
}, s = (a) => {
|
|
395
|
+
if (!C.value || !Q || !j) return;
|
|
396
|
+
const g = a == null ? void 0 : a.lngLat;
|
|
397
|
+
g && (O.value = ce(j, [g.lng, g.lat]));
|
|
398
|
+
}, l = (a) => {
|
|
399
|
+
if (!C.value || !Q || !j) return;
|
|
400
|
+
const g = a == null ? void 0 : a.lngLat;
|
|
401
|
+
if (!g) {
|
|
402
|
+
oe();
|
|
391
403
|
return;
|
|
392
404
|
}
|
|
393
|
-
const
|
|
394
|
-
if (!(Math.abs(
|
|
395
|
-
|
|
405
|
+
const R = ce(j, [g.lng, g.lat]), [k, J, Ge, Qe] = R;
|
|
406
|
+
if (!(Math.abs(Ge - k) > 0 && Math.abs(Qe - J) > 0)) {
|
|
407
|
+
M({
|
|
396
408
|
type: "warning",
|
|
397
409
|
title: "Bounds не змінено",
|
|
398
410
|
message: "Потрібно протягнути прямокутник з ненульовою площею."
|
|
399
|
-
}),
|
|
411
|
+
}), oe();
|
|
400
412
|
return;
|
|
401
413
|
}
|
|
402
|
-
|
|
403
|
-
}, r = (
|
|
404
|
-
|
|
414
|
+
de(R);
|
|
415
|
+
}, r = (a) => {
|
|
416
|
+
C.value && a.key === "Escape" && (a.preventDefault(), oe());
|
|
405
417
|
};
|
|
406
418
|
e.on("mousedown", t), e.on("mousemove", s), e.on("mouseup", l), window.addEventListener("keydown", r), D = () => {
|
|
407
419
|
e.off("mousedown", t), e.off("mousemove", s), e.off("mouseup", l), window.removeEventListener("keydown", r);
|
|
408
420
|
};
|
|
409
421
|
}
|
|
410
|
-
async function
|
|
422
|
+
async function Re() {
|
|
411
423
|
var s;
|
|
412
|
-
if (
|
|
413
|
-
const e =
|
|
414
|
-
!(e != null && e.ready) || (await e.ready(), !((s = e.map) == null ? void 0 : s.value)) || (D ||
|
|
424
|
+
if (C.value) return;
|
|
425
|
+
const e = z();
|
|
426
|
+
!(e != null && e.ready) || (await e.ready(), !((s = e.map) == null ? void 0 : s.value)) || (D || Le(), C.value = !0, Q = !1, j = null, O.value = null, re("crosshair"), M({
|
|
415
427
|
type: "info",
|
|
416
428
|
title: "Редагування Bounds",
|
|
417
429
|
message: "Протягніть прямокутник на карті, щоб задати нові межі."
|
|
418
430
|
}));
|
|
419
431
|
}
|
|
420
|
-
const
|
|
432
|
+
const fe = h(() => {
|
|
421
433
|
var t;
|
|
422
434
|
const e = (t = c.value) == null ? void 0 : t.url;
|
|
423
435
|
return e ? /^https?:\/\//i.test(e) || typeof window > "u" || typeof location > "u" ? e : `${location.origin}${e}` : "";
|
|
424
436
|
}), U = h(() => {
|
|
425
437
|
var e;
|
|
426
438
|
return ((e = c.value) == null ? void 0 : e.extent) ?? null;
|
|
427
|
-
}),
|
|
428
|
-
const e =
|
|
439
|
+
}), me = h(() => x.value ? `raster-${x.value}` : void 0), Me = h(() => x.value ? `raster-extent-${x.value}` : "raster-extent"), Se = h(() => x.value ? `raster-extent-draft-${x.value}` : "raster-extent-draft"), Ie = h(() => {
|
|
440
|
+
const e = me.value ?? "raster", t = U.value && U.value.length === 4 ? U.value.join(",") : "no-extent";
|
|
429
441
|
return `${e}-${t}`;
|
|
430
|
-
}),
|
|
442
|
+
}), je = h(() => !!fe.value), pe = h(() => {
|
|
431
443
|
const e = U.value;
|
|
432
444
|
if (!e || e.length !== 4) return null;
|
|
433
445
|
const [t, s, l, r] = e;
|
|
434
446
|
return [t, s, l, r].some(
|
|
435
|
-
(
|
|
447
|
+
(i) => typeof i != "number" || Number.isNaN(i)
|
|
436
448
|
) ? null : [(t + l) / 2, (s + r) / 2];
|
|
437
449
|
}), T = h(() => {
|
|
438
|
-
var
|
|
439
|
-
const e = c.value, t = e == null ? void 0 : e.extent, l =
|
|
450
|
+
var i, w;
|
|
451
|
+
const e = c.value, t = e == null ? void 0 : e.extent, l = x.value ?? "—", r = [
|
|
440
452
|
e != null && e.extension ? `Формат ${String(e.extension).toUpperCase()}` : null,
|
|
441
453
|
(e == null ? void 0 : e.resolution) || null
|
|
442
454
|
].filter(Boolean).join(", ");
|
|
443
455
|
return {
|
|
444
456
|
id: l,
|
|
445
|
-
name: (e == null ? void 0 : e.name) || ((w = (
|
|
457
|
+
name: (e == null ? void 0 : e.name) || ((w = (i = e == null ? void 0 : e.files) == null ? void 0 : i[0]) == null ? void 0 : w.name),
|
|
446
458
|
description: (e == null ? void 0 : e.description) || r || "Попередній перегляд растрового шару.",
|
|
447
|
-
coverage: t && t.length === 4 ? `${
|
|
459
|
+
coverage: t && t.length === 4 ? `${L(t[0])}, ${L(t[1])} → ${L(t[2])}, ${L(t[3])}` : "Покриття уточнюється",
|
|
448
460
|
crs: e != null && e.srid ? `EPSG:${e.srid}` : "EPSG:4326",
|
|
449
461
|
source: e != null && e.proj4 ? e.proj4 : "Джерело: Mapnik",
|
|
450
462
|
updatedAt: e != null && e.cache ? "Дані кешовано" : "Нові дані"
|
|
451
463
|
};
|
|
452
|
-
}),
|
|
464
|
+
}), ie = h(() => {
|
|
453
465
|
const e = c.value;
|
|
454
466
|
return e ? [
|
|
455
467
|
e.source_path,
|
|
@@ -458,113 +470,113 @@ const Ut = /* @__PURE__ */ tt(Nt, [["render", Dt]]), Tt = { class: "absolute top
|
|
|
458
470
|
e.is_active ? "Активна" : "Неактивна",
|
|
459
471
|
e.cache ? "Кешовано" : null
|
|
460
472
|
].filter((t) => t).join(", ") : "";
|
|
461
|
-
}),
|
|
462
|
-
{ key: "info", label: "Інформація", icon:
|
|
463
|
-
{ key: "files", label: "Файли", icon:
|
|
464
|
-
{ key: "metadata", label: "Метадані", icon:
|
|
465
|
-
],
|
|
466
|
-
|
|
467
|
-
e &&
|
|
468
|
-
}),
|
|
469
|
-
|
|
473
|
+
}), ge = [
|
|
474
|
+
{ key: "info", label: "Інформація", icon: qt },
|
|
475
|
+
{ key: "files", label: "Файли", icon: at },
|
|
476
|
+
{ key: "metadata", label: "Метадані", icon: ft }
|
|
477
|
+
], ye = ge.map((e) => e.key), E = $(ye.includes(o.query.tab) ? o.query.tab : "info"), Z = $(!0);
|
|
478
|
+
S(() => o.query.tab, (e) => {
|
|
479
|
+
e && ye.includes(e) && E.value !== e && (E.value = e);
|
|
480
|
+
}), S(E, (e) => {
|
|
481
|
+
o.query.tab !== e && v.replace({ query: { ...o.query, tab: e } });
|
|
470
482
|
});
|
|
471
|
-
const
|
|
472
|
-
|
|
483
|
+
const ze = h(() => Ne(c.value)), ve = h(() => Ue(c.value));
|
|
484
|
+
S(
|
|
473
485
|
() => c.value,
|
|
474
486
|
() => {
|
|
475
|
-
|
|
487
|
+
ke();
|
|
476
488
|
},
|
|
477
489
|
{ immediate: !0 }
|
|
478
490
|
);
|
|
479
|
-
async function
|
|
491
|
+
async function Be() {
|
|
480
492
|
var l;
|
|
481
|
-
const e =
|
|
493
|
+
const e = z();
|
|
482
494
|
if (!(e != null && e.ready)) return;
|
|
483
|
-
await e.ready(),
|
|
495
|
+
await e.ready(), ue();
|
|
484
496
|
const t = (l = e.map) == null ? void 0 : l.value;
|
|
485
497
|
if (!t) return;
|
|
486
|
-
const s = () =>
|
|
487
|
-
t.on("moveend", s), t.on("zoomend", s),
|
|
498
|
+
const s = () => $e();
|
|
499
|
+
t.on("moveend", s), t.on("zoomend", s), G = () => {
|
|
488
500
|
t.off("moveend", s), t.off("zoomend", s);
|
|
489
501
|
};
|
|
490
502
|
}
|
|
491
|
-
|
|
492
|
-
() => [
|
|
503
|
+
S(
|
|
504
|
+
() => [o.query.z, o.query.x, o.query.y],
|
|
493
505
|
() => {
|
|
494
|
-
|
|
506
|
+
ue();
|
|
495
507
|
}
|
|
496
|
-
),
|
|
497
|
-
|
|
498
|
-
}),
|
|
499
|
-
|
|
500
|
-
}),
|
|
501
|
-
|
|
508
|
+
), Ye(() => {
|
|
509
|
+
Be();
|
|
510
|
+
}), Ze(() => {
|
|
511
|
+
G == null || G(), G = null, D == null || D(), D = null, re("");
|
|
512
|
+
}), S(x, () => {
|
|
513
|
+
H();
|
|
502
514
|
}, { immediate: !0 });
|
|
503
|
-
async function
|
|
515
|
+
async function Pe(e) {
|
|
504
516
|
var t;
|
|
505
|
-
|
|
517
|
+
H(), ((t = c.value) == null ? void 0 : t.srid) !== e.srid && (M({ title: "XML start", type: "info", message: "зміна системи координат, оновлюємо карту ..." }), await xe(`/api/gis-xml/${encodeURIComponent(x.value)}`), M({ title: "XML created", type: "info", message: "карта створена" }), location.reload());
|
|
506
518
|
}
|
|
507
|
-
async function
|
|
508
|
-
const e =
|
|
519
|
+
async function H() {
|
|
520
|
+
const e = x.value;
|
|
509
521
|
if (!e) {
|
|
510
|
-
c.value = null,
|
|
522
|
+
c.value = null, b.value = null;
|
|
511
523
|
return;
|
|
512
524
|
}
|
|
513
|
-
|
|
525
|
+
A.value = !0, b.value = null;
|
|
514
526
|
try {
|
|
515
527
|
const t = await fetch(`/api/gis-raster/${encodeURIComponent(e)}`);
|
|
516
528
|
if (!t.ok)
|
|
517
529
|
throw new Error(`HTTP ${t.status}`);
|
|
518
530
|
const s = await t.json();
|
|
519
|
-
s.xml && (
|
|
531
|
+
s.xml && (p.value = !0), c.value = s, s.xml || (M({ title: "XML not found", type: "info", message: "йде створення xml ... зачекайте" }), await xe(`/api/gis-xml/${encodeURIComponent(e)}`), M({ title: "XML created", type: "info", message: "карта створена" }), fetch(`/api/gis-raster/${encodeURIComponent(e)}?nocache=1`), p.value = !0);
|
|
520
532
|
} catch (t) {
|
|
521
|
-
console.error("Failed to load raster info", t), c.value = null,
|
|
533
|
+
console.error("Failed to load raster info", t), c.value = null, b.value = t instanceof Error ? t.message : String(t);
|
|
522
534
|
} finally {
|
|
523
|
-
|
|
535
|
+
A.value = !1;
|
|
524
536
|
}
|
|
525
537
|
}
|
|
526
|
-
function
|
|
538
|
+
function xe(e) {
|
|
527
539
|
return new Promise((t, s) => {
|
|
528
540
|
const l = new EventSource(e), r = [];
|
|
529
|
-
l.onmessage = (
|
|
530
|
-
r.push(
|
|
541
|
+
l.onmessage = (i) => {
|
|
542
|
+
r.push(i.data), console.log("Received:", i.data);
|
|
531
543
|
}, l.addEventListener("end", () => {
|
|
532
544
|
l.close(), t(r);
|
|
533
|
-
}), l.onerror = (
|
|
534
|
-
l.close(), t(
|
|
545
|
+
}), l.onerror = (i) => {
|
|
546
|
+
l.close(), t(i);
|
|
535
547
|
};
|
|
536
548
|
});
|
|
537
549
|
}
|
|
538
|
-
function
|
|
550
|
+
function Ne(e) {
|
|
539
551
|
var t;
|
|
540
552
|
return (t = e == null ? void 0 : e.files) != null && t.length ? e.files.map((s) => ({
|
|
541
553
|
name: s.name,
|
|
542
|
-
resolution:
|
|
554
|
+
resolution: De(s.name, e),
|
|
543
555
|
size: s.size || "—",
|
|
544
556
|
status: "Готово",
|
|
545
557
|
statusClass: "bg-emerald-50 text-emerald-600 border border-emerald-100"
|
|
546
558
|
})) : [];
|
|
547
559
|
}
|
|
548
|
-
function
|
|
560
|
+
function De(e, t) {
|
|
549
561
|
const s = e.toLowerCase();
|
|
550
562
|
return s.endsWith(".tfw") ? "Georeference" : s.endsWith(".xml") ? "Опис" : s.endsWith(".tif") || s.endsWith(".tiff") ? t != null && t.resolution ? t.resolution : "Растер" : (t == null ? void 0 : t.resolution) ?? "Файл";
|
|
551
563
|
}
|
|
552
|
-
function
|
|
564
|
+
function Ue(e) {
|
|
553
565
|
return e ? {
|
|
554
|
-
baseParams:
|
|
566
|
+
baseParams: qe(e),
|
|
555
567
|
spatial: {
|
|
556
568
|
crs: {
|
|
557
569
|
code: e.srid ? `EPSG:${e.srid}` : "EPSG:4326",
|
|
558
570
|
description: e.proj4 || "WGS 84 — World Geodetic System 1984"
|
|
559
571
|
},
|
|
560
|
-
bounds:
|
|
561
|
-
resolution:
|
|
572
|
+
bounds: Fe(e.extent),
|
|
573
|
+
resolution: Ve(e)
|
|
562
574
|
},
|
|
563
|
-
statistics:
|
|
564
|
-
technical:
|
|
575
|
+
statistics: Ae(e),
|
|
576
|
+
technical: Oe(e)
|
|
565
577
|
} : null;
|
|
566
578
|
}
|
|
567
|
-
function
|
|
579
|
+
function Te(e) {
|
|
568
580
|
return e != null && e.length ? e.map((s) => {
|
|
569
581
|
var r;
|
|
570
582
|
if (!s) return "";
|
|
@@ -572,9 +584,9 @@ const Ut = /* @__PURE__ */ tt(Nt, [["render", Dt]]), Tt = { class: "absolute top
|
|
|
572
584
|
return ((r = l == null ? void 0 : l[0]) == null ? void 0 : r.toUpperCase()) || "";
|
|
573
585
|
}).filter(Boolean).join("") : "";
|
|
574
586
|
}
|
|
575
|
-
function
|
|
576
|
-
var
|
|
577
|
-
const t = e.bands_count ?? ((
|
|
587
|
+
function qe(e) {
|
|
588
|
+
var i, w;
|
|
589
|
+
const t = e.bands_count ?? ((i = e.bands) == null ? void 0 : i.length) ?? "—", s = Te(e.bands), l = (e.bands ?? []).map((a) => a.trim()).filter((a) => a.length > 0), r = l.length ? l.join(", ") : void 0;
|
|
578
590
|
return [
|
|
579
591
|
{
|
|
580
592
|
label: "Розмір растру, px",
|
|
@@ -591,24 +603,24 @@ const Ut = /* @__PURE__ */ tt(Nt, [["render", Dt]]), Tt = { class: "absolute top
|
|
|
591
603
|
{ label: "Стиснення", value: e.compression || "—" }
|
|
592
604
|
];
|
|
593
605
|
}
|
|
594
|
-
function
|
|
606
|
+
function Fe(e) {
|
|
595
607
|
return !e || e.length !== 4 ? [] : [
|
|
596
|
-
{ label: "Північ", value:
|
|
597
|
-
{ label: "Схід", value:
|
|
598
|
-
{ label: "Південь", value:
|
|
599
|
-
{ label: "Захід", value:
|
|
608
|
+
{ label: "Північ", value: L(e[3], "N") },
|
|
609
|
+
{ label: "Схід", value: L(e[2], "E") },
|
|
610
|
+
{ label: "Південь", value: L(e[1], "S") },
|
|
611
|
+
{ label: "Захід", value: L(e[0], "W") }
|
|
600
612
|
];
|
|
601
613
|
}
|
|
602
|
-
function
|
|
614
|
+
function Ve(e) {
|
|
603
615
|
const t = [
|
|
604
616
|
{ label: "Роздільна здатність", value: e.resolution || "—" }
|
|
605
617
|
];
|
|
606
618
|
return e.width && e.height && t.push({ label: "Розмір пікселя", value: `${e.width} × ${e.height} px` }), t;
|
|
607
619
|
}
|
|
608
|
-
function
|
|
620
|
+
function Ae(e) {
|
|
609
621
|
var t;
|
|
610
622
|
return (t = e.bands) != null && t.length ? e.bands.map((s, l) => {
|
|
611
|
-
const r =
|
|
623
|
+
const r = y[l % y.length];
|
|
612
624
|
return {
|
|
613
625
|
label: `Канал ${l + 1}${s ? ` (${s})` : ""}`,
|
|
614
626
|
cardClass: r.cardClass,
|
|
@@ -621,7 +633,7 @@ const Ut = /* @__PURE__ */ tt(Nt, [["render", Dt]]), Tt = { class: "absolute top
|
|
|
621
633
|
};
|
|
622
634
|
}) : [];
|
|
623
635
|
}
|
|
624
|
-
function
|
|
636
|
+
function Oe(e) {
|
|
625
637
|
var t;
|
|
626
638
|
return [
|
|
627
639
|
{ label: "Тип даних", value: e.color_depth ? `Unsigned Integer ${e.color_depth}-bit` : "—" },
|
|
@@ -632,24 +644,24 @@ const Ut = /* @__PURE__ */ tt(Nt, [["render", Dt]]), Tt = { class: "absolute top
|
|
|
632
644
|
{ label: "URL тайла", value: e.url || "—" }
|
|
633
645
|
];
|
|
634
646
|
}
|
|
635
|
-
function
|
|
647
|
+
function L(e, t) {
|
|
636
648
|
if (e == null || Number.isNaN(e)) return "—";
|
|
637
649
|
const s = `${e.toFixed(5)}°`;
|
|
638
650
|
return t ? `${s} ${t}` : s;
|
|
639
651
|
}
|
|
640
|
-
return (e, t) => (u(), m("div",
|
|
641
|
-
n("div",
|
|
642
|
-
n("div",
|
|
643
|
-
n("div",
|
|
644
|
-
n("div",
|
|
645
|
-
n("div",
|
|
646
|
-
n("div",
|
|
652
|
+
return (e, t) => (u(), m("div", Xt, [
|
|
653
|
+
n("div", Kt, [
|
|
654
|
+
n("div", Yt, [
|
|
655
|
+
n("div", Zt, [
|
|
656
|
+
n("div", Ht, [
|
|
657
|
+
n("div", Jt, [
|
|
658
|
+
n("div", es, [
|
|
647
659
|
n("button", {
|
|
648
660
|
type: "button",
|
|
649
661
|
class: "hover:text-gray-700 cursor-pointer transition-colors",
|
|
650
|
-
onClick:
|
|
651
|
-
},
|
|
652
|
-
t[
|
|
662
|
+
onClick: N
|
|
663
|
+
}, d(V.value), 1),
|
|
664
|
+
t[2] || (t[2] = n("svg", {
|
|
653
665
|
xmlns: "http://www.w3.org/2000/svg",
|
|
654
666
|
width: "24",
|
|
655
667
|
height: "24",
|
|
@@ -663,75 +675,75 @@ const Ut = /* @__PURE__ */ tt(Nt, [["render", Dt]]), Tt = { class: "absolute top
|
|
|
663
675
|
}, [
|
|
664
676
|
n("path", { d: "m9 18 6-6-6-6" })
|
|
665
677
|
], -1)),
|
|
666
|
-
n("span",
|
|
678
|
+
n("span", ts, d(T.value.name || "Растер"), 1)
|
|
667
679
|
]),
|
|
668
|
-
n("div",
|
|
669
|
-
n("div",
|
|
670
|
-
n("div",
|
|
671
|
-
n("h1",
|
|
680
|
+
n("div", ss, [
|
|
681
|
+
n("div", ns, [
|
|
682
|
+
n("div", ls, [
|
|
683
|
+
n("h1", rs, d(T.value.name || "Растер"), 1)
|
|
672
684
|
]),
|
|
673
|
-
|
|
685
|
+
ie.value ? (u(), m("p", {
|
|
674
686
|
key: 0,
|
|
675
687
|
class: "text-xs text-gray-500 truncate",
|
|
676
|
-
title:
|
|
677
|
-
},
|
|
688
|
+
title: ie.value
|
|
689
|
+
}, d(ie.value), 9, os)) : q("", !0)
|
|
678
690
|
])
|
|
679
691
|
])
|
|
680
692
|
]),
|
|
681
|
-
n("div",
|
|
682
|
-
n("div",
|
|
693
|
+
n("div", is, [
|
|
694
|
+
n("div", as, [
|
|
683
695
|
n("div", {
|
|
684
696
|
class: "w-full text-xs text-gray-600 truncate",
|
|
685
697
|
title: T.value.description
|
|
686
|
-
},
|
|
698
|
+
}, d(T.value.description), 9, us)
|
|
687
699
|
]),
|
|
688
|
-
|
|
689
|
-
"entity-id":
|
|
700
|
+
B(ut, {
|
|
701
|
+
"entity-id": x.value || "",
|
|
690
702
|
"entity-info": { name: T.value.name },
|
|
691
703
|
table: "gis.rasters.table",
|
|
692
704
|
"entity-label": "Растер",
|
|
693
705
|
"save-method": "put",
|
|
694
706
|
"edit-button-text": "Редагувати",
|
|
695
|
-
onSaved:
|
|
707
|
+
onSaved: Pe
|
|
696
708
|
}, null, 8, ["entity-id", "entity-info"])
|
|
697
709
|
])
|
|
698
710
|
])
|
|
699
711
|
])
|
|
700
712
|
]),
|
|
701
|
-
n("div",
|
|
702
|
-
n("div",
|
|
703
|
-
|
|
713
|
+
n("div", cs, [
|
|
714
|
+
n("div", ds, [
|
|
715
|
+
B(ot, {
|
|
704
716
|
ref_key: "mapViewRef",
|
|
705
717
|
ref: f
|
|
706
718
|
}, {
|
|
707
|
-
default:
|
|
708
|
-
|
|
709
|
-
key:
|
|
710
|
-
"tile-url":
|
|
719
|
+
default: He(() => [
|
|
720
|
+
je.value && p.value ? (u(), F(Wt, {
|
|
721
|
+
key: Ie.value,
|
|
722
|
+
"tile-url": fe.value,
|
|
711
723
|
extent: U.value,
|
|
712
|
-
"layer-id":
|
|
713
|
-
"show-raster-extent":
|
|
714
|
-
onToggleExtent: t[
|
|
724
|
+
"layer-id": me.value,
|
|
725
|
+
"show-raster-extent": I.value,
|
|
726
|
+
onToggleExtent: t[0] || (t[0] = (s) => I.value = s)
|
|
715
727
|
}, null, 8, ["tile-url", "extent", "layer-id", "show-raster-extent"])) : q("", !0),
|
|
716
|
-
|
|
717
|
-
extent:
|
|
718
|
-
"layer-id":
|
|
728
|
+
B(he, {
|
|
729
|
+
extent: I.value ? U.value : null,
|
|
730
|
+
"layer-id": Me.value
|
|
719
731
|
}, null, 8, ["extent", "layer-id"]),
|
|
720
|
-
|
|
721
|
-
extent:
|
|
722
|
-
"layer-id":
|
|
732
|
+
B(he, {
|
|
733
|
+
extent: O.value,
|
|
734
|
+
"layer-id": Se.value,
|
|
723
735
|
"line-color": "#0ea5e9",
|
|
724
736
|
"line-width": 3
|
|
725
737
|
}, null, 8, ["extent", "layer-id"]),
|
|
726
|
-
n("div", cs, [
|
|
727
|
-
N(rt)
|
|
728
|
-
]),
|
|
729
|
-
d.value ? (u(), m("div", ds, " Потягніть на карті, щоб намалювати нові Bounds. Esc скасовує редагування. ")) : q("", !0),
|
|
730
738
|
n("div", fs, [
|
|
731
|
-
|
|
732
|
-
|
|
739
|
+
B(it)
|
|
740
|
+
]),
|
|
741
|
+
C.value ? (u(), m("div", ms, " Потягніть на карті, щоб намалювати нові Bounds. Esc скасовує редагування. ")) : q("", !0),
|
|
742
|
+
n("div", ps, [
|
|
743
|
+
B(be),
|
|
744
|
+
pe.value ? (u(), F(be, {
|
|
733
745
|
key: 0,
|
|
734
|
-
targetCenter:
|
|
746
|
+
targetCenter: pe.value,
|
|
735
747
|
targetLabel: "Центр даних",
|
|
736
748
|
targetAriaLabel: "Перейти до центру даних"
|
|
737
749
|
}, null, 8, ["targetCenter"])) : q("", !0)
|
|
@@ -741,45 +753,45 @@ const Ut = /* @__PURE__ */ tt(Nt, [["render", Dt]]), Tt = { class: "absolute top
|
|
|
741
753
|
}, 512)
|
|
742
754
|
])
|
|
743
755
|
]),
|
|
744
|
-
|
|
745
|
-
open:
|
|
746
|
-
onToggle: t[
|
|
756
|
+
B(ct, {
|
|
757
|
+
open: Z.value,
|
|
758
|
+
onToggle: t[1] || (t[1] = (s) => Z.value = !Z.value)
|
|
747
759
|
}, null, 8, ["open"])
|
|
748
760
|
]),
|
|
749
761
|
n("div", {
|
|
750
|
-
class:
|
|
762
|
+
class: ae(["bg-white border-l border-gray-100 flex flex-col overflow-hidden shadow-lg flex-shrink-0 transition-[width] duration-100 ease-in-out", Z.value ? "w-[650px]" : "w-0"])
|
|
751
763
|
}, [
|
|
752
|
-
n("div",
|
|
753
|
-
n("div",
|
|
754
|
-
n("div",
|
|
755
|
-
(u(), m(
|
|
764
|
+
n("div", gs, [
|
|
765
|
+
n("div", ys, [
|
|
766
|
+
n("div", vs, [
|
|
767
|
+
(u(), m(W, null, X(ge, (s) => n("button", {
|
|
756
768
|
key: s.key,
|
|
757
769
|
type: "button",
|
|
758
770
|
role: "tab",
|
|
759
|
-
"aria-selected":
|
|
760
|
-
class:
|
|
761
|
-
onClick: (l) =>
|
|
771
|
+
"aria-selected": E.value === s.key,
|
|
772
|
+
class: ae(["whitespace-nowrap flex flex-col items-center justify-center gap-0.5 py-1 px-1 text-[9px] font-medium transition-all duration-300 hover:bg-white/70 rounded-lg group", E.value === s.key ? "bg-white shadow-sm text-gray-700" : ""]),
|
|
773
|
+
onClick: (l) => E.value = s.key
|
|
762
774
|
}, [
|
|
763
|
-
(u(), F(
|
|
764
|
-
n("span",
|
|
765
|
-
], 10,
|
|
775
|
+
(u(), F(Je(s.icon), { class: "h-3.5 w-3.5 mb-0.5" })),
|
|
776
|
+
n("span", bs, d(s.label), 1)
|
|
777
|
+
], 10, xs)), 64))
|
|
766
778
|
])
|
|
767
779
|
]),
|
|
768
|
-
n("div",
|
|
769
|
-
|
|
770
|
-
|
|
780
|
+
n("div", hs, [
|
|
781
|
+
A.value ? (u(), m("div", _s, " Завантаження метаданих растру… ")) : b.value ? (u(), m("div", ws, " Не вдалося отримати дані: " + d(b.value), 1)) : q("", !0),
|
|
782
|
+
E.value === "files" ? (u(), F(Nt, {
|
|
771
783
|
key: 2,
|
|
772
|
-
files:
|
|
773
|
-
}, null, 8, ["files"])) :
|
|
784
|
+
files: ze.value
|
|
785
|
+
}, null, 8, ["files"])) : E.value === "metadata" ? (u(), F(dt, {
|
|
774
786
|
key: 3,
|
|
775
787
|
data: c.value,
|
|
776
|
-
"entity-id":
|
|
788
|
+
"entity-id": x.value,
|
|
777
789
|
"entity-type": "raster",
|
|
778
|
-
onSaved:
|
|
779
|
-
onEditCssBounds:
|
|
780
|
-
}, null, 8, ["data", "entity-id"])) :
|
|
790
|
+
onSaved: H,
|
|
791
|
+
onEditCssBounds: Re
|
|
792
|
+
}, null, 8, ["data", "entity-id"])) : ve.value ? (u(), F(jt, {
|
|
781
793
|
key: 4,
|
|
782
|
-
details:
|
|
794
|
+
details: ve.value
|
|
783
795
|
}, null, 8, ["details"])) : q("", !0)
|
|
784
796
|
])
|
|
785
797
|
])
|
|
@@ -788,5 +800,5 @@ const Ut = /* @__PURE__ */ tt(Nt, [["render", Dt]]), Tt = { class: "absolute top
|
|
|
788
800
|
}
|
|
789
801
|
});
|
|
790
802
|
export {
|
|
791
|
-
|
|
803
|
+
js as default
|
|
792
804
|
};
|