@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.
@@ -1,77 +1,77 @@
1
- import { defineComponent as H, resolveDirective as Oe, openBlock as u, createElementBlock as m, createElementVNode as n, Fragment as O, renderList as G, toDisplayString as p, withDirectives as be, createTextVNode as Ge, normalizeClass as re, ref as $, watch as j, computed as h, vModelText as Qe, onMounted as We, onBeforeUnmount as Xe, unref as Ke, createCommentVNode as q, createVNode as N, withCtx as Ye, createBlock as F, resolveDynamicComponent as Ze } from "vue";
2
- import { useRouter as He, useRoute as Je } from "vue-router";
3
- import { TooltipDirective as et, notify as I } from "@opengis/core";
4
- import { _ as tt, u as st, f as nt, M as lt, i as rt, j as ye, F as ot } from "./index-DJKZSGVW.js";
5
- import { _ as it, a as at, b as ut, c as ct } from "./HeaderActions.vue_vue_type_script_setup_true_lang-9kitzmJK.js";
6
- import { _ as xe } from "./ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-B7Nkfd7c.js";
7
- const dt = { class: "flex-1 overflow-y-auto p-4 sm:p-6" }, ft = { class: "space-y-3" }, mt = { class: "bg-white p-3 rounded-xl border border-gray-200 shadow-sm" }, pt = { class: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2" }, gt = { class: "text-xs text-gray-500 mb-1" }, yt = {
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
- }, xt = {
10
+ }, bt = {
11
11
  key: 1,
12
12
  class: "text-base text-md font-semibold text-gray-900"
13
- }, vt = { class: "bg-white p-3 rounded-xl border border-gray-200 shadow-sm" }, bt = { class: "space-y-2" }, ht = { 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" }, wt = { class: "text-xs text-gray-600 mt-1" }, $t = { class: "grid grid-cols-2 gap-3" }, kt = { class: "text-xs text-gray-500 mb-1" }, Ct = { class: "text-sm font-semibold text-gray-900" }, Et = { class: "bg-gray-50 p-4 rounded-lg" }, Lt = { class: "grid grid-cols-2 gap-4" }, Rt = { class: "text-xs text-gray-500 mb-1" }, Mt = { class: "text-sm font-semibold text-gray-900" }, St = /* @__PURE__ */ H({
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: et
15
+ tooltip: st
16
16
  },
17
17
  __name: "raster-info-tab",
18
18
  props: {
19
19
  details: {}
20
20
  },
21
21
  setup(_) {
22
- return (x, v) => {
23
- const a = Oe("tooltip");
24
- return u(), m("div", dt, [
25
- n("div", ft, [
26
- n("div", mt, [
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", pt, [
31
- (u(!0), m(O, null, G(_.details.baseParams, (f) => (u(), m("div", {
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", gt, p(f.label), 1),
36
- f.tooltip ? be((u(), m("p", yt, [
37
- Ge(p(f.value), 1)
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
- [a, f.tooltip]
40
- ]) : (u(), m("p", xt, p(f.value), 1))
39
+ [o, f.tooltip]
40
+ ]) : (u(), m("p", bt, d(f.value), 1))
41
41
  ]))), 128))
42
42
  ])
43
43
  ]),
44
- n("div", vt, [
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", bt, [
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", ht, [
52
- n("p", _t, p(_.details.spatial.crs.code), 1),
53
- n("p", wt, p(_.details.spatial.crs.description), 1)
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", $t, [
59
- (u(!0), m(O, null, G(_.details.spatial.bounds, (f) => (u(), m("div", {
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", kt, p(f.label), 1),
64
- n("p", Ct, p(f.value), 1)
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", Et, [
69
- n("div", Lt, [
70
- (u(!0), m(O, null, G(_.details.spatial.resolution, (f) => (u(), m("div", {
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", Rt, p(f.label), 1),
74
- n("p", Mt, p(f.value), 1)
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
- }), It = { class: "flex-1 overflow-y-auto space-y-3 pr-1" }, jt = { class: "font-medium text-sm text-gray-800" }, zt = { class: "text-xs text-gray-500" }, Bt = /* @__PURE__ */ H({
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 (x, v) => (u(), m("div", It, [
91
- (u(!0), m(O, null, G(_.files, (a) => (u(), m("div", {
92
- key: a.name,
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", jt, p(a.name), 1),
97
- n("p", zt, p(a.resolution) + " • " + p(a.size) + "MB", 1)
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: re(["text-[11px] font-semibold px-2 py-0.5 rounded-full", a.statusClass])
101
- }, p(a.status), 3)
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
- }), Nt = {}, Pt = {
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 Dt(_, x) {
117
- return u(), m("svg", Pt, [...x[0] || (x[0] = [
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 Ut = /* @__PURE__ */ tt(Nt, [["render", Dt]]), Tt = { class: "absolute top-[5.5rem] left-4 z-30 flex flex-col items-start gap-2" }, qt = { class: "rounded-2xl bg-white/90 px-3 py-2 text-xs font-medium text-slate-600 shadow-sm backdrop-blur" }, Ft = { class: "flex items-center 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: "inline-flex items-center gap-2 text-[11px] text-slate-600" }, Ot = ["checked"], Gt = /* @__PURE__ */ H({
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 x = _, v = x.layerId || "raster-preview-layer", a = `${v}-source`, f = x.extent && x.extent.length === 4 ? [...x.extent] : void 0, g = st(v, {
144
- sourceId: a,
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: x.tileUrl ? [x.tileUrl + "?nottl=1"] : [],
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: x.beforeId ?? null
157
- }), { fitBounds: c } = nt(), E = $(1);
158
- j(
159
- () => x.tileUrl,
160
- (d) => {
161
- if (!d) {
162
- g.setVisible(!1);
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
- g.setVisible(!0), g.setTiles([d]);
165
+ P.setVisible(!0), P.setTiles([p]);
166
166
  },
167
167
  { immediate: !0 }
168
- ), j(
169
- () => E.value,
170
- (d) => {
171
- g.setOpacity(d);
168
+ ), S(
169
+ () => N.value,
170
+ (p) => {
171
+ P.setOpacity(p);
172
172
  },
173
173
  { immediate: !0 }
174
174
  );
175
- let P = null, L = !1;
176
- j(
177
- () => x.extent,
178
- (d) => {
179
- if (!d || d.length !== 4) return;
180
- const b = d.join(",");
181
- if (b !== P) {
182
- if (P = b, !L) {
183
- L = !0;
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
- c == null || c([[d[0], d[1]], [d[2], d[3]]], {
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 V = h(() => `${Math.round(E.value * 100)}%`);
195
- return (d, b) => (u(), m("div", Tt, [
196
- n("div", qt, [
197
- n("div", Ft, [
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
- be(n("input", {
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] = (k) => E.value = k),
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
- Qe,
210
- E.value,
209
+ Ke,
210
+ N.value,
211
211
  void 0,
212
212
  { number: !0 }
213
213
  ]
214
214
  ]),
215
- n("span", null, p(V.value), 1)
215
+ n("span", null, d(A.value), 1)
216
216
  ])
217
217
  ]),
218
- n("div", Vt, [
219
- n("label", At, [
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] = (k) => d.$emit("toggle-extent", k.target.checked))
225
- }, null, 40, Ot),
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
- }), Qt = { class: "flex h-full bg-gradient-to-br from-slate-50 to-white" }, Wt = { class: "flex-1 relative overflow-hidden" }, Xt = { class: "absolute top-0 left-0 w-full z-20" }, Kt = { class: "px-4 sm:px-6 py-4 border-b border-gray-200 bg-white shadow-sm" }, Yt = { class: "flex items-start justify-between gap-4" }, Zt = { class: "flex-1 min-w-0" }, Ht = { class: "flex items-center text-sm text-gray-500 mb-3" }, Jt = { class: "text-gray-900 font-medium truncate max-w-xs" }, es = { class: "flex items-center justify-between gap-4" }, ts = { class: "flex-1 min-w-0" }, ss = { class: "flex items-center gap-3 mb-1" }, ns = { class: "text-base font-semibold text-gray-900 truncate" }, ls = ["title"], rs = { class: "flex items-center gap-4 min-w-0" }, os = { class: "flex-1 min-w-0" }, is = ["title"], as = { 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]" }, us = { class: "relative w-full h-full" }, cs = { class: "absolute top-4 left-4 z-20" }, ds = {
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
- }, fs = { class: "absolute top-[6.5rem] right-2 space-y-1 z-20" }, ms = { class: "flex-1 flex flex-col h-full" }, ps = { class: "px-3 pt-3 pb-2 border-b border-gray-100" }, gs = { 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" }, ys = ["aria-selected", "onClick"], xs = { class: "leading-none" }, vs = { class: "flex flex-col flex-1 overflow-y-hidden p-3" }, bs = {
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
- }, hs = {
237
+ }, ws = {
238
238
  key: 1,
239
239
  class: "mb-3 text-xs text-rose-600"
240
- }, _s = "OpenGIS", ve = 2, Z = 5, ws = 5, Ss = /* @__PURE__ */ H({
240
+ }, $s = "OpenGIS", _e = 2, ee = 5, ks = 5, js = /* @__PURE__ */ te({
241
241
  __name: "raster",
242
242
  setup(_) {
243
- const x = [
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 = He(), a = Je(), f = $(null), g = h(() => {
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 = a.params) == null ? void 0 : t.id;
262
+ const e = (t = o.params) == null ? void 0 : t.id;
251
263
  return typeof e == "string" ? e : void 0;
252
- }), c = $(null), E = $(!1), P = $(!1), L = $(null), V = $(!0), d = $(!1), b = $(null);
253
- let k = null, D = null;
254
- const J = $(!1);
255
- let z = null, A = !1;
256
- function Q(e) {
257
- if (Array.isArray(e)) return Q(e[0]);
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 ee(e, t) {
274
+ function ne(e, t) {
263
275
  return e.toFixed(t);
264
276
  }
265
- function te(e, t, s) {
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 B() {
281
+ function z() {
270
282
  var e;
271
283
  return (e = f.value) == null ? void 0 : e.ctx;
272
284
  }
273
- function oe() {
274
- var i, y, S, C;
275
- const e = (y = (i = B()) == null ? void 0 : i.map) == null ? void 0 : y.value;
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 = Q(a.query.z), s = Q(a.query.x), l = Q(a.query.y);
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 = (S = e.getCenter) == null ? void 0 : S.call(e), o = (C = e.getZoom) == null ? void 0 : C.call(e);
280
- (!r || te(r.lng, s, Z) || te(r.lat, l, Z) || te(o ?? 0, t, ve)) && (J.value = !0, e.jumpTo({ center: [s, l], zoom: t }), J.value = !1);
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 he() {
283
- var r, o, w, i;
284
- if (J.value) return;
285
- const e = (o = (r = B()) == null ? void 0 : r.map) == null ? void 0 : o.value;
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 = (i = e.getZoom) == null ? void 0 : i.call(e);
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
- ...a.query,
291
- z: ee(s, ve),
292
- x: ee(t.lng, Z),
293
- y: ee(t.lat, Z)
302
+ ...o.query,
303
+ z: ne(s, _e),
304
+ x: ne(t.lng, ee),
305
+ y: ne(t.lat, ee)
294
306
  };
295
- a.query.z === l.z && a.query.x === l.x && a.query.y === l.y || v.replace({ query: l });
307
+ o.query.z === l.z && o.query.x === l.x && o.query.y === l.y || v.replace({ query: l });
296
308
  }
297
- function _e() {
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} — Растер` : _s;
313
+ document.title = e ? `${e} — Растер` : $s;
302
314
  }
303
- function W(e) {
304
- return Number(e.toFixed(ws));
315
+ function Y(e) {
316
+ return Number(e.toFixed(ks));
305
317
  }
306
- function ie(e, t) {
307
- const [s, l] = e, [r, o] = t;
318
+ function ce(e, t) {
319
+ const [s, l] = e, [r, i] = t;
308
320
  return [
309
- W(Math.min(s, r)),
310
- W(Math.min(l, o)),
311
- W(Math.max(s, r)),
312
- W(Math.max(l, o))
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 we(e) {
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 se(e) {
329
- var l, r, o;
330
- const t = (r = (l = B()) == null ? void 0 : l.map) == null ? void 0 : r.value, s = (o = t == null ? void 0 : t.getCanvas) == null ? void 0 : o.call(t);
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 $e(e, t) {
334
- if (!(!g.value || !c.value))
345
+ async function Ee(e, t) {
346
+ if (!(!x.value || !c.value))
335
347
  try {
336
- const s = we(e), l = await fetch(`/api/gis-metadata/raster/${encodeURIComponent(g.value)}`, {
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
- I({
354
+ M({
343
355
  type: "success",
344
356
  title: "Extent збережено",
345
357
  message: "Нові межі успішно збережено."
346
- }), await K();
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
- }), I({
363
+ }), M({
352
364
  type: "error",
353
365
  title: "Помилка",
354
366
  message: "Не вдалося зберегти Extent"
355
367
  });
356
368
  }
357
369
  }
358
- function ae(e) {
370
+ function de(e) {
359
371
  var s, l, r;
360
- const t = (l = (s = B()) == null ? void 0 : s.map) == null ? void 0 : l.value;
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 o = Array.isArray(c.value.extent) ? [...c.value.extent] : null;
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
- }, $e(e, o);
378
+ }, Ee(e, i);
367
379
  }
368
- z = null, A = !1, b.value = null, d.value = !1, se("");
380
+ j = null, Q = !1, O.value = null, C.value = !1, re("");
369
381
  }
370
- function ne() {
371
- ae(null);
382
+ function oe() {
383
+ de(null);
372
384
  }
373
- function ke() {
374
- var o, w;
375
- const e = (w = (o = B()) == null ? void 0 : o.map) == null ? void 0 : w.value;
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 = (i) => {
378
- var S, C, Y;
379
- if (!d.value || ((S = i == null ? void 0 : i.originalEvent) == null ? void 0 : S.button) != null && i.originalEvent.button !== 0) return;
380
- const y = i == null ? void 0 : i.lngLat;
381
- y && (z = [y.lng, y.lat], A = !0, b.value = [y.lng, y.lat, y.lng, y.lat], (Y = (C = e.dragPan) == null ? void 0 : C.disable) == null || Y.call(C));
382
- }, s = (i) => {
383
- if (!d.value || !A || !z) return;
384
- const y = i == null ? void 0 : i.lngLat;
385
- y && (b.value = ie(z, [y.lng, y.lat]));
386
- }, l = (i) => {
387
- if (!d.value || !A || !z) return;
388
- const y = i == null ? void 0 : i.lngLat;
389
- if (!y) {
390
- ne();
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 S = ie(z, [y.lng, y.lat]), [C, Y, Ve, Ae] = S;
394
- if (!(Math.abs(Ve - C) > 0 && Math.abs(Ae - Y) > 0)) {
395
- I({
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
- }), ne();
411
+ }), oe();
400
412
  return;
401
413
  }
402
- ae(S);
403
- }, r = (i) => {
404
- d.value && i.key === "Escape" && (i.preventDefault(), ne());
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 Ce() {
422
+ async function Re() {
411
423
  var s;
412
- if (d.value) return;
413
- const e = B();
414
- !(e != null && e.ready) || (await e.ready(), !((s = e.map) == null ? void 0 : s.value)) || (D || ke(), d.value = !0, A = !1, z = null, b.value = null, se("crosshair"), I({
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 ue = h(() => {
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
- }), ce = h(() => g.value ? `raster-${g.value}` : void 0), Ee = h(() => g.value ? `raster-extent-${g.value}` : "raster-extent"), Le = h(() => g.value ? `raster-extent-draft-${g.value}` : "raster-extent-draft"), Re = h(() => {
428
- const e = ce.value ?? "raster", t = U.value && U.value.length === 4 ? U.value.join(",") : "no-extent";
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
- }), Me = h(() => !!ue.value), de = h(() => {
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
- (o) => typeof o != "number" || Number.isNaN(o)
447
+ (i) => typeof i != "number" || Number.isNaN(i)
436
448
  ) ? null : [(t + l) / 2, (s + r) / 2];
437
449
  }), T = h(() => {
438
- var o, w;
439
- const e = c.value, t = e == null ? void 0 : e.extent, l = g.value ?? "—", r = [
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 = (o = e == null ? void 0 : e.files) == null ? void 0 : o[0]) == null ? void 0 : w.name),
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 ? `${M(t[0])}, ${M(t[1])} → ${M(t[2])}, ${M(t[3])}` : "Покриття уточнюється",
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
- }), le = h(() => {
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
- }), fe = [
462
- { key: "info", label: "Інформація", icon: Ut },
463
- { key: "files", label: "Файли", icon: ot },
464
- { key: "metadata", label: "Метадані", icon: ct }
465
- ], me = fe.map((e) => e.key), R = $(me.includes(a.query.tab) ? a.query.tab : "info"), X = $(!0);
466
- j(() => a.query.tab, (e) => {
467
- e && me.includes(e) && R.value !== e && (R.value = e);
468
- }), j(R, (e) => {
469
- a.query.tab !== e && v.replace({ query: { ...a.query, tab: e } });
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 Se = h(() => ze(c.value)), pe = h(() => Ne(c.value));
472
- j(
483
+ const ze = h(() => Ne(c.value)), ve = h(() => Ue(c.value));
484
+ S(
473
485
  () => c.value,
474
486
  () => {
475
- _e();
487
+ ke();
476
488
  },
477
489
  { immediate: !0 }
478
490
  );
479
- async function Ie() {
491
+ async function Be() {
480
492
  var l;
481
- const e = B();
493
+ const e = z();
482
494
  if (!(e != null && e.ready)) return;
483
- await e.ready(), oe();
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 = () => he();
487
- t.on("moveend", s), t.on("zoomend", s), k = () => {
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
- j(
492
- () => [a.query.z, a.query.x, a.query.y],
503
+ S(
504
+ () => [o.query.z, o.query.x, o.query.y],
493
505
  () => {
494
- oe();
506
+ ue();
495
507
  }
496
- ), We(() => {
497
- Ie();
498
- }), Xe(() => {
499
- k == null || k(), k = null, D == null || D(), D = null, se("");
500
- }), j(g, () => {
501
- K();
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 je(e) {
515
+ async function Pe(e) {
504
516
  var t;
505
- K(), ((t = c.value) == null ? void 0 : t.srid) !== e.srid && (I({ title: "XML start", type: "info", message: "зміна системи координат, оновлюємо карту ..." }), await ge(`/api/gis-xml/${encodeURIComponent(g.value)}`), I({ title: "XML created", type: "info", message: "карта створена" }), location.reload());
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 K() {
508
- const e = g.value;
519
+ async function H() {
520
+ const e = x.value;
509
521
  if (!e) {
510
- c.value = null, L.value = null;
522
+ c.value = null, b.value = null;
511
523
  return;
512
524
  }
513
- E.value = !0, L.value = null;
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 && (P.value = !0), c.value = s, s.xml || (I({ title: "XML not found", type: "info", message: "йде створення xml ... зачекайте" }), await ge(`/api/gis-xml/${encodeURIComponent(e)}`), I({ title: "XML created", type: "info", message: "карта створена" }), fetch(`/api/gis-raster/${encodeURIComponent(e)}?nocache=1`), P.value = !0);
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, L.value = t instanceof Error ? t.message : String(t);
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
- E.value = !1;
535
+ A.value = !1;
524
536
  }
525
537
  }
526
- function ge(e) {
538
+ function xe(e) {
527
539
  return new Promise((t, s) => {
528
540
  const l = new EventSource(e), r = [];
529
- l.onmessage = (o) => {
530
- r.push(o.data), console.log("Received:", o.data);
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 = (o) => {
534
- l.close(), t(o);
545
+ }), l.onerror = (i) => {
546
+ l.close(), t(i);
535
547
  };
536
548
  });
537
549
  }
538
- function ze(e) {
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: Be(s.name, e),
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 Be(e, t) {
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 Ne(e) {
564
+ function Ue(e) {
553
565
  return e ? {
554
- baseParams: De(e),
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: Ue(e.extent),
561
- resolution: Te(e)
572
+ bounds: Fe(e.extent),
573
+ resolution: Ve(e)
562
574
  },
563
- statistics: qe(e),
564
- technical: Fe(e)
575
+ statistics: Ae(e),
576
+ technical: Oe(e)
565
577
  } : null;
566
578
  }
567
- function Pe(e) {
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 De(e) {
576
- var o, w;
577
- const t = e.bands_count ?? ((o = e.bands) == null ? void 0 : o.length) ?? "—", s = Pe(e.bands), l = (e.bands ?? []).map((i) => i.trim()).filter((i) => i.length > 0), r = l.length ? l.join(", ") : void 0;
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 Ue(e) {
606
+ function Fe(e) {
595
607
  return !e || e.length !== 4 ? [] : [
596
- { label: "Північ", value: M(e[3], "N") },
597
- { label: "Схід", value: M(e[2], "E") },
598
- { label: "Південь", value: M(e[1], "S") },
599
- { label: "Захід", value: M(e[0], "W") }
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 Te(e) {
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 qe(e) {
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 = x[l % x.length];
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 Fe(e) {
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 M(e, t) {
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", Qt, [
641
- n("div", Wt, [
642
- n("div", Xt, [
643
- n("div", Kt, [
644
- n("div", Yt, [
645
- n("div", Zt, [
646
- n("div", Ht, [
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: t[0] || (t[0] = (s) => Ke(v).push("/gis.rasters"))
651
- }, " Растри "),
652
- t[3] || (t[3] = n("svg", {
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", Jt, p(T.value.name || "Растер"), 1)
678
+ n("span", ts, d(T.value.name || "Растер"), 1)
667
679
  ]),
668
- n("div", es, [
669
- n("div", ts, [
670
- n("div", ss, [
671
- n("h1", ns, p(T.value.name || "Растер"), 1)
680
+ n("div", ss, [
681
+ n("div", ns, [
682
+ n("div", ls, [
683
+ n("h1", rs, d(T.value.name || "Растер"), 1)
672
684
  ]),
673
- le.value ? (u(), m("p", {
685
+ ie.value ? (u(), m("p", {
674
686
  key: 0,
675
687
  class: "text-xs text-gray-500 truncate",
676
- title: le.value
677
- }, p(le.value), 9, ls)) : q("", !0)
688
+ title: ie.value
689
+ }, d(ie.value), 9, os)) : q("", !0)
678
690
  ])
679
691
  ])
680
692
  ]),
681
- n("div", rs, [
682
- n("div", os, [
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
- }, p(T.value.description), 9, is)
698
+ }, d(T.value.description), 9, us)
687
699
  ]),
688
- N(it, {
689
- "entity-id": g.value || "",
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: je
707
+ onSaved: Pe
696
708
  }, null, 8, ["entity-id", "entity-info"])
697
709
  ])
698
710
  ])
699
711
  ])
700
712
  ]),
701
- n("div", as, [
702
- n("div", us, [
703
- N(lt, {
713
+ n("div", cs, [
714
+ n("div", ds, [
715
+ B(ot, {
704
716
  ref_key: "mapViewRef",
705
717
  ref: f
706
718
  }, {
707
- default: Ye(() => [
708
- Me.value && P.value ? (u(), F(Gt, {
709
- key: Re.value,
710
- "tile-url": ue.value,
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": ce.value,
713
- "show-raster-extent": V.value,
714
- onToggleExtent: t[1] || (t[1] = (s) => V.value = s)
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
- N(xe, {
717
- extent: V.value ? U.value : null,
718
- "layer-id": Ee.value
728
+ B(he, {
729
+ extent: I.value ? U.value : null,
730
+ "layer-id": Me.value
719
731
  }, null, 8, ["extent", "layer-id"]),
720
- N(xe, {
721
- extent: b.value,
722
- "layer-id": Le.value,
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
- N(ye),
732
- de.value ? (u(), F(ye, {
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: de.value,
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
- N(at, {
745
- open: X.value,
746
- onToggle: t[2] || (t[2] = (s) => X.value = !X.value)
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: re(["bg-white border-l border-gray-100 flex flex-col overflow-hidden shadow-lg flex-shrink-0 transition-[width] duration-100 ease-in-out", X.value ? "w-[650px]" : "w-0"])
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", ms, [
753
- n("div", ps, [
754
- n("div", gs, [
755
- (u(), m(O, null, G(fe, (s) => n("button", {
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": R.value === s.key,
760
- class: re(["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", R.value === s.key ? "bg-white shadow-sm text-gray-700" : ""]),
761
- onClick: (l) => R.value = s.key
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(Ze(s.icon), { class: "h-3.5 w-3.5 mb-0.5" })),
764
- n("span", xs, p(s.label), 1)
765
- ], 10, ys)), 64))
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", vs, [
769
- E.value ? (u(), m("div", bs, " Завантаження метаданих растру… ")) : L.value ? (u(), m("div", hs, " Не вдалося отримати дані: " + p(L.value), 1)) : q("", !0),
770
- R.value === "files" ? (u(), F(Bt, {
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: Se.value
773
- }, null, 8, ["files"])) : R.value === "metadata" ? (u(), F(ut, {
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": g.value,
788
+ "entity-id": x.value,
777
789
  "entity-type": "raster",
778
- onSaved: K,
779
- onEditCssBounds: Ce
780
- }, null, 8, ["data", "entity-id"])) : pe.value ? (u(), F(St, {
790
+ onSaved: H,
791
+ onEditCssBounds: Re
792
+ }, null, 8, ["data", "entity-id"])) : ve.value ? (u(), F(jt, {
781
793
  key: 4,
782
- details: pe.value
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
- Ss as default
803
+ js as default
792
804
  };