@opengis/widgets 0.0.13 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,24 +1,24 @@
1
- import { h as Y, defineComponent as I, mergeModels as J, useModel as le, ref as M, createElementBlock as r, openBlock as a, createElementVNode as e, createVNode as w, unref as _, withDirectives as U, vModelText as ye, createCommentVNode as $, createTextVNode as H, onMounted as re, onUnmounted as de, resolveComponent as ee, normalizeClass as D, createBlock as j, toDisplayString as k, Fragment as A, renderList as S, normalizeStyle as R, resolveDynamicComponent as N, withModifiers as K, computed as O, Teleport as be, TransitionGroup as Me, withCtx as Le, nextTick as De, renderSlot as G, vModelRadio as Q, vModelCheckbox as Te, mergeProps as te, vShow as Ie } from "vue";
1
+ import { h as te, defineComponent as j, mergeModels as X, useModel as de, ref as w, createElementBlock as a, openBlock as o, createElementVNode as e, createVNode as $, unref as k, withDirectives as R, vModelText as ye, createCommentVNode as _, createTextVNode as S, onMounted as Q, onUnmounted as ce, resolveComponent as se, normalizeClass as D, createBlock as I, toDisplayString as b, Fragment as V, renderList as A, normalizeStyle as U, resolveDynamicComponent as B, withModifiers as K, computed as O, Teleport as be, TransitionGroup as De, withCtx as Te, nextTick as Ie, renderSlot as G, vModelRadio as ee, vModelCheckbox as je, mergeProps as Z, vShow as ze } from "vue";
2
2
  /**
3
3
  * @license lucide-vue-next v0.535.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
7
7
  */
8
- const me = (l) => l.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ze = (l) => l.replace(
8
+ const ge = (r) => r.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Ve = (r) => r.replace(
9
9
  /^([A-Z])|[\s-_]+(\w)/g,
10
- (i, n, t) => t ? t.toUpperCase() : n.toLowerCase()
11
- ), je = (l) => {
12
- const i = ze(l);
13
- return i.charAt(0).toUpperCase() + i.slice(1);
14
- }, Ve = (...l) => l.filter((i, n, t) => !!i && i.trim() !== "" && t.indexOf(i) === n).join(" ").trim();
10
+ (l, i, t) => t ? t.toUpperCase() : i.toLowerCase()
11
+ ), Fe = (r) => {
12
+ const l = Ve(r);
13
+ return l.charAt(0).toUpperCase() + l.slice(1);
14
+ }, He = (...r) => r.filter((l, i, t) => !!l && l.trim() !== "" && t.indexOf(l) === i).join(" ").trim();
15
15
  /**
16
16
  * @license lucide-vue-next v0.535.0 - ISC
17
17
  *
18
18
  * This source code is licensed under the ISC license.
19
19
  * See the LICENSE file in the root directory of this source tree.
20
20
  */
21
- var Z = {
21
+ var J = {
22
22
  xmlns: "http://www.w3.org/2000/svg",
23
23
  width: 24,
24
24
  height: 24,
@@ -35,21 +35,21 @@ var Z = {
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
37
  */
38
- const Fe = ({ size: l, strokeWidth: i = 2, absoluteStrokeWidth: n, color: t, iconNode: s, name: f, class: o, ...m }, { slots: v }) => Y(
38
+ const Ae = ({ size: r, strokeWidth: l = 2, absoluteStrokeWidth: i, color: t, iconNode: s, name: c, class: n, ...u }, { slots: v }) => te(
39
39
  "svg",
40
40
  {
41
- ...Z,
42
- width: l || Z.width,
43
- height: l || Z.height,
44
- stroke: t || Z.stroke,
45
- "stroke-width": n ? Number(i) * 24 / Number(l) : i,
46
- class: Ve(
41
+ ...J,
42
+ width: r || J.width,
43
+ height: r || J.height,
44
+ stroke: t || J.stroke,
45
+ "stroke-width": i ? Number(l) * 24 / Number(r) : l,
46
+ class: He(
47
47
  "lucide",
48
- ...f ? [`lucide-${me(je(f))}-icon`, `lucide-${me(f)}`] : ["lucide-icon"]
48
+ ...c ? [`lucide-${ge(Fe(c))}-icon`, `lucide-${ge(c)}`] : ["lucide-icon"]
49
49
  ),
50
- ...m
50
+ ...u
51
51
  },
52
- [...s.map((g) => Y(...g)), ...v.default ? [v.default()] : []]
52
+ [...s.map((g) => te(...g)), ...v.default ? [v.default()] : []]
53
53
  );
54
54
  /**
55
55
  * @license lucide-vue-next v0.535.0 - ISC
@@ -57,12 +57,12 @@ const Fe = ({ size: l, strokeWidth: i = 2, absoluteStrokeWidth: n, color: t, ico
57
57
  * This source code is licensed under the ISC license.
58
58
  * See the LICENSE file in the root directory of this source tree.
59
59
  */
60
- const T = (l, i) => (n, { slots: t }) => Y(
61
- Fe,
60
+ const T = (r, l) => (i, { slots: t }) => te(
61
+ Ae,
62
62
  {
63
- ...n,
64
- iconNode: i,
65
- name: l
63
+ ...i,
64
+ iconNode: l,
65
+ name: r
66
66
  },
67
67
  t
68
68
  );
@@ -72,7 +72,7 @@ const T = (l, i) => (n, { slots: t }) => Y(
72
72
  * This source code is licensed under the ISC license.
73
73
  * See the LICENSE file in the root directory of this source tree.
74
74
  */
75
- const He = T("archive", [
75
+ const Se = T("archive", [
76
76
  ["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1", key: "1wp1u1" }],
77
77
  ["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8", key: "1s80jp" }],
78
78
  ["path", { d: "M10 12h4", key: "a56b0p" }]
@@ -83,7 +83,7 @@ const He = T("archive", [
83
83
  * This source code is licensed under the ISC license.
84
84
  * See the LICENSE file in the root directory of this source tree.
85
85
  */
86
- const Ae = T("arrow-right", [
86
+ const Ee = T("arrow-right", [
87
87
  ["path", { d: "M5 12h14", key: "1ays0h" }],
88
88
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
89
89
  ]);
@@ -93,7 +93,7 @@ const Ae = T("arrow-right", [
93
93
  * This source code is licensed under the ISC license.
94
94
  * See the LICENSE file in the root directory of this source tree.
95
95
  */
96
- const Se = T("circle-check-big", [
96
+ const Oe = T("circle-check-big", [
97
97
  ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
98
98
  ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
99
99
  ]);
@@ -103,7 +103,7 @@ const Se = T("circle-check-big", [
103
103
  * This source code is licensed under the ISC license.
104
104
  * See the LICENSE file in the root directory of this source tree.
105
105
  */
106
- const ce = T("download", [
106
+ const ue = T("download", [
107
107
  ["path", { d: "M12 15V3", key: "m9g1x1" }],
108
108
  ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
109
109
  ["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
@@ -114,7 +114,7 @@ const ce = T("download", [
114
114
  * This source code is licensed under the ISC license.
115
115
  * See the LICENSE file in the root directory of this source tree.
116
116
  */
117
- const Ee = T("ellipsis", [
117
+ const Be = T("ellipsis", [
118
118
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
119
119
  ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
120
120
  ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
@@ -138,7 +138,7 @@ const q = T("file-text", [
138
138
  * This source code is licensed under the ISC license.
139
139
  * See the LICENSE file in the root directory of this source tree.
140
140
  */
141
- const Oe = T("file", [
141
+ const Ne = T("file", [
142
142
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
143
143
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }]
144
144
  ]);
@@ -148,7 +148,7 @@ const Oe = T("file", [
148
148
  * This source code is licensed under the ISC license.
149
149
  * See the LICENSE file in the root directory of this source tree.
150
150
  */
151
- const Be = T("grid-3x3", [
151
+ const Re = T("grid-3x3", [
152
152
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
153
153
  ["path", { d: "M3 9h18", key: "1pudct" }],
154
154
  ["path", { d: "M3 15h18", key: "5xshup" }],
@@ -161,7 +161,7 @@ const Be = T("grid-3x3", [
161
161
  * This source code is licensed under the ISC license.
162
162
  * See the LICENSE file in the root directory of this source tree.
163
163
  */
164
- const Ne = T("heart", [
164
+ const Ue = T("heart", [
165
165
  [
166
166
  "path",
167
167
  {
@@ -176,7 +176,7 @@ const Ne = T("heart", [
176
176
  * This source code is licensed under the ISC license.
177
177
  * See the LICENSE file in the root directory of this source tree.
178
178
  */
179
- const Re = T("history", [
179
+ const We = T("history", [
180
180
  ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
181
181
  ["path", { d: "M3 3v5h5", key: "1xhq8a" }],
182
182
  ["path", { d: "M12 7v5l4 2", key: "1fdv2h" }]
@@ -187,7 +187,7 @@ const Re = T("history", [
187
187
  * This source code is licensed under the ISC license.
188
188
  * See the LICENSE file in the root directory of this source tree.
189
189
  */
190
- const ge = T("image", [
190
+ const he = T("image", [
191
191
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
192
192
  ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
193
193
  ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
@@ -198,7 +198,7 @@ const ge = T("image", [
198
198
  * This source code is licensed under the ISC license.
199
199
  * See the LICENSE file in the root directory of this source tree.
200
200
  */
201
- const Ue = T("list", [
201
+ const Pe = T("list", [
202
202
  ["path", { d: "M3 12h.01", key: "nlz23k" }],
203
203
  ["path", { d: "M3 18h.01", key: "1tta3j" }],
204
204
  ["path", { d: "M3 6h.01", key: "1rqtza" }],
@@ -212,7 +212,7 @@ const Ue = T("list", [
212
212
  * This source code is licensed under the ISC license.
213
213
  * See the LICENSE file in the root directory of this source tree.
214
214
  */
215
- const Pe = T("plus", [
215
+ const Ge = T("plus", [
216
216
  ["path", { d: "M5 12h14", key: "1ays0h" }],
217
217
  ["path", { d: "M12 5v14", key: "s699le" }]
218
218
  ]);
@@ -222,7 +222,7 @@ const Pe = T("plus", [
222
222
  * This source code is licensed under the ISC license.
223
223
  * See the LICENSE file in the root directory of this source tree.
224
224
  */
225
- const We = T("reply", [
225
+ const qe = T("reply", [
226
226
  ["path", { d: "M20 18v-2a4 4 0 0 0-4-4H4", key: "5vmcpk" }],
227
227
  ["path", { d: "m9 17-5-5 5-5", key: "nvlc11" }]
228
228
  ]);
@@ -248,7 +248,7 @@ const xe = T("send", [
248
248
  * This source code is licensed under the ISC license.
249
249
  * See the LICENSE file in the root directory of this source tree.
250
250
  */
251
- const Ge = T("share", [
251
+ const Ke = T("share", [
252
252
  ["path", { d: "M12 2v13", key: "1km8f5" }],
253
253
  ["path", { d: "m16 6-4-4-4 4", key: "13yo43" }],
254
254
  ["path", { d: "M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8", key: "1b2hhj" }]
@@ -259,7 +259,7 @@ const Ge = T("share", [
259
259
  * This source code is licensed under the ISC license.
260
260
  * See the LICENSE file in the root directory of this source tree.
261
261
  */
262
- const qe = T("sheet", [
262
+ const Ze = T("sheet", [
263
263
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
264
264
  ["line", { x1: "3", x2: "21", y1: "9", y2: "9", key: "1vqk6q" }],
265
265
  ["line", { x1: "3", x2: "21", y1: "15", y2: "15", key: "o2sbyz" }],
@@ -272,7 +272,7 @@ const qe = T("sheet", [
272
272
  * This source code is licensed under the ISC license.
273
273
  * See the LICENSE file in the root directory of this source tree.
274
274
  */
275
- const Ke = T("square-pen", [
275
+ const Je = T("square-pen", [
276
276
  ["path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7", key: "1m0v6g" }],
277
277
  [
278
278
  "path",
@@ -288,7 +288,7 @@ const Ke = T("square-pen", [
288
288
  * This source code is licensed under the ISC license.
289
289
  * See the LICENSE file in the root directory of this source tree.
290
290
  */
291
- const ue = T("trash-2", [
291
+ const pe = T("trash-2", [
292
292
  ["path", { d: "M10 11v6", key: "nco0om" }],
293
293
  ["path", { d: "M14 11v6", key: "outv1u" }],
294
294
  ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
@@ -301,7 +301,7 @@ const ue = T("trash-2", [
301
301
  * This source code is licensed under the ISC license.
302
302
  * See the LICENSE file in the root directory of this source tree.
303
303
  */
304
- const Ze = T("user-check", [
304
+ const Xe = T("user-check", [
305
305
  ["path", { d: "m16 11 2 2 4-4", key: "9rsbq5" }],
306
306
  ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
307
307
  ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }]
@@ -312,7 +312,7 @@ const Ze = T("user-check", [
312
312
  * This source code is licensed under the ISC license.
313
313
  * See the LICENSE file in the root directory of this source tree.
314
314
  */
315
- const pe = T("user", [
315
+ const me = T("user", [
316
316
  ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
317
317
  ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
318
318
  ]);
@@ -322,7 +322,7 @@ const pe = T("user", [
322
322
  * This source code is licensed under the ISC license.
323
323
  * See the LICENSE file in the root directory of this source tree.
324
324
  */
325
- const Je = T("video", [
325
+ const Qe = T("video", [
326
326
  [
327
327
  "path",
328
328
  {
@@ -338,234 +338,234 @@ const Je = T("video", [
338
338
  * This source code is licensed under the ISC license.
339
339
  * See the LICENSE file in the root directory of this source tree.
340
340
  */
341
- const X = T("x", [
341
+ const Y = T("x", [
342
342
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
343
343
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
344
- ]), Xe = { class: "border-t pt-3 mt-4" }, Qe = { class: "flex gap-2" }, Ye = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, et = { class: "flex-1 space-y-2" }, tt = { class: "flex justify-between items-center" }, st = { class: "flex gap-2" }, ot = ["disabled"], ke = /* @__PURE__ */ I({
344
+ ]), Ye = { class: "border-t pt-3 mt-4" }, et = { class: "flex gap-2" }, tt = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, st = { class: "flex-1 space-y-2" }, ot = { class: "flex justify-between items-center" }, nt = { class: "flex gap-2" }, it = ["disabled"], ke = /* @__PURE__ */ j({
345
345
  __name: "CommentInputZone",
346
346
  props: {
347
347
  isReply: { type: Boolean, required: !1, default: !1 },
348
348
  isReplyModifiers: {}
349
349
  },
350
- emits: /* @__PURE__ */ J(["sendComment"], ["update:isReply"]),
351
- setup(l, { emit: i }) {
352
- const n = le(l, "isReply"), t = M(""), s = i, f = () => {
350
+ emits: /* @__PURE__ */ X(["sendComment"], ["update:isReply"]),
351
+ setup(r, { emit: l }) {
352
+ const i = de(r, "isReply"), t = w(""), s = l, c = () => {
353
353
  t.value.trim() && (s("sendComment", t.value), t.value = "");
354
- }, o = (m) => {
355
- (m.ctrlKey || m.metaKey) && m.key === "Enter" && (m.preventDefault(), f());
354
+ }, n = (u) => {
355
+ (u.ctrlKey || u.metaKey) && u.key === "Enter" && (u.preventDefault(), c());
356
356
  };
357
- return (m, v) => (a(), r("div", Xe, [
358
- e("div", Qe, [
359
- e("span", Ye, [
360
- w(_(pe), { class: "h-3 w-3 text-gray-500" })
357
+ return (u, v) => (o(), a("div", Ye, [
358
+ e("div", et, [
359
+ e("span", tt, [
360
+ $(k(me), { class: "h-3 w-3 text-gray-500" })
361
361
  ]),
362
- e("div", et, [
363
- U(e("textarea", {
362
+ e("div", st, [
363
+ R(e("textarea", {
364
364
  "onUpdate:modelValue": v[0] || (v[0] = (g) => t.value = g),
365
- onKeydown: o,
365
+ onKeydown: n,
366
366
  placeholder: "Add a comment...",
367
367
  class: "w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"
368
368
  }, null, 544), [
369
369
  [ye, t.value]
370
370
  ]),
371
- e("div", tt, [
371
+ e("div", ot, [
372
372
  v[4] || (v[4] = e("span", { class: "text-xs text-gray-500 hidden sm:inline" }, "Cmd+Enter to send", -1)),
373
- e("div", st, [
374
- n.value ? (a(), r("button", {
373
+ e("div", nt, [
374
+ i.value ? (o(), a("button", {
375
375
  key: 0,
376
376
  class: "inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",
377
- onClick: v[1] || (v[1] = (g) => n.value = !1)
377
+ onClick: v[1] || (v[1] = (g) => i.value = !1)
378
378
  }, [
379
- w(_(X), { class: "h-3 w-3" }),
380
- v[2] || (v[2] = H(" Cancel ", -1))
381
- ])) : $("", !0),
379
+ $(k(Y), { class: "h-3 w-3" }),
380
+ v[2] || (v[2] = S(" Cancel ", -1))
381
+ ])) : _("", !0),
382
382
  e("button", {
383
383
  class: "inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",
384
384
  disabled: !t.value.trim(),
385
- onClick: f
385
+ onClick: c
386
386
  }, [
387
- w(_(xe), { class: "h-3 w-3 mr-1" }),
388
- v[3] || (v[3] = H(" Send ", -1))
389
- ], 8, ot)
387
+ $(k(xe), { class: "h-3 w-3 mr-1" }),
388
+ v[3] || (v[3] = S(" Send ", -1))
389
+ ], 8, it)
390
390
  ])
391
391
  ])
392
392
  ])
393
393
  ])
394
394
  ]));
395
395
  }
396
- }), nt = { class: "z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md w-32 outline-none pointer-events-auto" }, it = /* @__PURE__ */ I({
396
+ }), lt = { class: "z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md w-32 outline-none pointer-events-auto" }, at = /* @__PURE__ */ j({
397
397
  __name: "CommentDetails",
398
398
  props: {
399
399
  showMoreOptions: { type: Boolean, required: !0, default: !1 },
400
400
  showMoreOptionsModifiers: {}
401
401
  },
402
- emits: /* @__PURE__ */ J(["edit", "delete"], ["update:showMoreOptions"]),
403
- setup(l, { emit: i }) {
404
- const n = i, t = le(l, "showMoreOptions"), s = M(), f = M(!0), o = async (g) => {
405
- t.value && s.value && !s.value.contains(g.target) && !f.value && (t.value = !1), f.value = !1;
406
- }, m = () => {
407
- t.value = !1, n("edit");
402
+ emits: /* @__PURE__ */ X(["edit", "delete"], ["update:showMoreOptions"]),
403
+ setup(r, { emit: l }) {
404
+ const i = l, t = de(r, "showMoreOptions"), s = w(), c = w(!0), n = async (g) => {
405
+ t.value && s.value && !s.value.contains(g.target) && !c.value && (t.value = !1), c.value = !1;
406
+ }, u = () => {
407
+ t.value = !1, i("edit");
408
408
  }, v = () => {
409
- t.value = !1, n("delete");
409
+ t.value = !1, i("delete");
410
410
  };
411
- return re(() => {
412
- document.addEventListener("click", o);
413
- }), de(() => {
414
- document.removeEventListener("click", o);
415
- }), (g, d) => (a(), r("div", {
411
+ return Q(() => {
412
+ document.addEventListener("click", n);
413
+ }), ce(() => {
414
+ document.removeEventListener("click", n);
415
+ }), (g, d) => (o(), a("div", {
416
416
  class: "absolute bg-white left-0 top-full transform min-w-max z-50",
417
417
  ref_key: "moreOptionsRef",
418
418
  ref: s
419
419
  }, [
420
- e("div", nt, [
420
+ e("div", lt, [
421
421
  e("div", {
422
422
  class: "relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs hover:bg-gray-100 transition-colors duration-300",
423
- onClick: m
423
+ onClick: u
424
424
  }, [
425
- w(_(Ke), { class: "h-3 w-3 mr-2" }),
426
- d[0] || (d[0] = H(" Edit ", -1))
425
+ $(k(Je), { class: "h-3 w-3 mr-2" }),
426
+ d[0] || (d[0] = S(" Edit ", -1))
427
427
  ]),
428
428
  e("div", {
429
429
  class: "relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs text-red-600 hover:bg-gray-100 transition-colors duration-300",
430
430
  onClick: v
431
431
  }, [
432
- w(_(ue), { class: "h-3 w-3 mr-2" }),
433
- d[1] || (d[1] = H(" Delete ", -1))
432
+ $(k(pe), { class: "h-3 w-3 mr-2" }),
433
+ d[1] || (d[1] = S(" Delete ", -1))
434
434
  ])
435
435
  ])
436
436
  ], 512));
437
437
  }
438
- }), at = { class: "space-y-2" }, lt = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, rt = { class: "flex-1 min-w-0 space-y-1 relative" }, dt = { class: "flex items-center gap-2" }, ct = { class: "font-medium text-xs" }, ut = { class: "text-xs text-gray-500" }, pt = {
438
+ }), rt = { class: "space-y-2" }, dt = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, ct = { class: "flex-1 min-w-0 space-y-1 relative" }, ut = { class: "flex items-center gap-2" }, pt = { class: "font-medium text-xs" }, mt = { class: "text-xs text-gray-500" }, gt = {
439
439
  key: 0,
440
440
  class: "text-xs text-gray-700 leading-relaxed"
441
- }, mt = { class: "flex justify-between text-xs" }, gt = { class: "flex items-center gap-2" }, ht = {
441
+ }, ht = { class: "flex justify-between text-xs" }, ft = { class: "flex items-center gap-2" }, vt = {
442
442
  key: 0,
443
443
  class: "flex gap-2"
444
- }, ft = ["disabled"], vt = {
444
+ }, yt = ["disabled"], bt = {
445
445
  key: 0,
446
446
  class: "ml-8 space-y-1 border-l-2 border-gray-100 pl-3"
447
- }, yt = /* @__PURE__ */ I({
447
+ }, xt = /* @__PURE__ */ j({
448
448
  __name: "CommentItem",
449
449
  props: {
450
450
  comment: {},
451
451
  isInside: { type: Boolean }
452
452
  },
453
453
  emits: ["like", "reply", "edit", "delete"],
454
- setup(l, { emit: i }) {
455
- const n = i, t = l, s = M(t.comment.text), f = M("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"), o = M("w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"), m = M(!1), v = M(!1), g = M(!1), d = M(!1), y = (c) => {
456
- const h = /* @__PURE__ */ new Date(), F = Math.floor(
457
- (h.getTime() - c.getTime()) / (1e3 * 60 * 60)
454
+ setup(r, { emit: l }) {
455
+ const i = l, t = r, s = w(t.comment.text), c = w("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"), n = w("w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"), u = w(!1), v = w(!1), g = w(!1), d = w(!1), y = (p) => {
456
+ const f = /* @__PURE__ */ new Date(), H = Math.floor(
457
+ (f.getTime() - p.getTime()) / (1e3 * 60 * 60)
458
458
  );
459
- return F < 1 ? `${Math.floor(
460
- (h.getTime() - c.getTime()) / 6e4
461
- )}m` : F < 24 ? `${F}h` : `${Math.floor(F / 24)}d`;
462
- }, p = () => {
463
- d.value = !d.value, d.value ? n("like", t.comment.id, "add") : n("like", t.comment.id, "delete");
464
- }, b = () => {
465
- n("edit", t.comment.id, s.value), g.value = !1;
466
- }, W = (c, h) => {
467
- n("like", c, h);
468
- }, V = (c, h) => {
469
- n("edit", c, h);
459
+ return H < 1 ? `${Math.floor(
460
+ (f.getTime() - p.getTime()) / 6e4
461
+ )}m` : H < 24 ? `${H}h` : `${Math.floor(H / 24)}d`;
462
+ }, h = () => {
463
+ d.value = !d.value, d.value ? i("like", t.comment.id, "add") : i("like", t.comment.id, "delete");
464
+ }, M = () => {
465
+ i("edit", t.comment.id, s.value), g.value = !1;
466
+ }, P = (p, f) => {
467
+ i("like", p, f);
468
+ }, F = (p, f) => {
469
+ i("edit", p, f);
470
470
  };
471
- return (c, h) => {
472
- const F = ee("CommentItem", !0);
473
- return a(), r("div", at, [
471
+ return (p, f) => {
472
+ const H = se("CommentItem", !0);
473
+ return o(), a("div", rt, [
474
474
  e("div", {
475
475
  class: D(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative", g.value ? "bg-gray-50" : ""])
476
476
  }, [
477
- e("span", lt, [
478
- w(_(pe), { class: "h-3 w-3 text-gray-500" })
477
+ e("span", dt, [
478
+ $(k(me), { class: "h-3 w-3 text-gray-500" })
479
479
  ]),
480
- e("div", rt, [
481
- e("div", dt, [
482
- e("span", ct, k(c.comment?.author), 1),
483
- e("span", ut, k(y(c.comment?.createdAt)), 1)
480
+ e("div", ct, [
481
+ e("div", ut, [
482
+ e("span", pt, b(p.comment?.author), 1),
483
+ e("span", mt, b(y(p.comment?.createdAt)), 1)
484
484
  ]),
485
- g.value ? U((a(), r("textarea", {
485
+ g.value ? R((o(), a("textarea", {
486
486
  key: 1,
487
- "onUpdate:modelValue": h[0] || (h[0] = (C) => s.value = C),
488
- class: D(g.value ? o.value : f.value)
487
+ "onUpdate:modelValue": f[0] || (f[0] = (C) => s.value = C),
488
+ class: D(g.value ? n.value : c.value)
489
489
  }, null, 2)), [
490
490
  [ye, s.value]
491
- ]) : (a(), r("p", pt, k(c.comment?.text), 1)),
492
- e("div", mt, [
493
- e("div", gt, [
491
+ ]) : (o(), a("p", gt, b(p.comment?.text), 1)),
492
+ e("div", ht, [
493
+ e("div", ft, [
494
494
  e("button", {
495
495
  class: D(["flex items-center gap-1", d.value ? "text-blue-600" : "text-gray-500 hover:text-blue-600 transition-colors"]),
496
- onClick: h[1] || (h[1] = (C) => p())
496
+ onClick: f[1] || (f[1] = (C) => h())
497
497
  }, [
498
- w(_(Ne), {
498
+ $(k(Ue), {
499
499
  class: D(["h-3 w-3", d.value ? "fill-blue-600" : ""])
500
500
  }, null, 8, ["class"]),
501
- H(" " + k(c.comment?.likes), 1)
501
+ S(" " + b(p.comment?.likes), 1)
502
502
  ], 2),
503
- c.isInside ? $("", !0) : (a(), r("button", {
503
+ p.isInside ? _("", !0) : (o(), a("button", {
504
504
  key: 0,
505
505
  class: "text-gray-500 hover:text-blue-600 transition-colors",
506
- onClick: h[2] || (h[2] = (C) => v.value = !0)
506
+ onClick: f[2] || (f[2] = (C) => v.value = !0)
507
507
  }, [
508
- w(_(We), { class: "h-3 w-3" })
508
+ $(k(qe), { class: "h-3 w-3" })
509
509
  ])),
510
510
  e("button", {
511
511
  class: "text-gray-400 hover:text-gray-600 transition-colors opacity-0 group-hover:opacity-100",
512
512
  type: "button",
513
- onClick: h[3] || (h[3] = (C) => m.value = !0)
513
+ onClick: f[3] || (f[3] = (C) => u.value = !0)
514
514
  }, [
515
- w(_(Ee), { class: "h-3 w-3" })
515
+ $(k(Be), { class: "h-3 w-3" })
516
516
  ])
517
517
  ]),
518
- g.value ? (a(), r("div", ht, [
518
+ g.value ? (o(), a("div", vt, [
519
519
  e("button", {
520
520
  class: "inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",
521
- onClick: h[4] || (h[4] = (C) => g.value = !1)
521
+ onClick: f[4] || (f[4] = (C) => g.value = !1)
522
522
  }, [
523
- w(_(X), { class: "h-3 w-3" }),
524
- h[11] || (h[11] = H(" Cancel ", -1))
523
+ $(k(Y), { class: "h-3 w-3" }),
524
+ f[11] || (f[11] = S(" Cancel ", -1))
525
525
  ]),
526
526
  e("button", {
527
527
  class: "inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",
528
528
  disabled: !s.value.trim(),
529
- onClick: h[5] || (h[5] = (C) => b())
529
+ onClick: f[5] || (f[5] = (C) => M())
530
530
  }, [
531
- w(_(xe), { class: "h-3 w-3 mr-1" }),
532
- h[12] || (h[12] = H(" Send ", -1))
533
- ], 8, ft)
534
- ])) : $("", !0)
531
+ $(k(xe), { class: "h-3 w-3 mr-1" }),
532
+ f[12] || (f[12] = S(" Send ", -1))
533
+ ], 8, yt)
534
+ ])) : _("", !0)
535
535
  ])
536
536
  ]),
537
- m.value ? (a(), j(it, {
537
+ u.value ? (o(), I(at, {
538
538
  key: 0,
539
- showMoreOptions: m.value,
540
- "onUpdate:showMoreOptions": h[6] || (h[6] = (C) => m.value = C),
541
- onEdit: h[7] || (h[7] = (C) => g.value = !0),
542
- onDelete: h[8] || (h[8] = (C) => c.$emit("delete", c.comment?.id)),
543
- comment: c.comment
544
- }, null, 8, ["showMoreOptions", "comment"])) : $("", !0)
539
+ showMoreOptions: u.value,
540
+ "onUpdate:showMoreOptions": f[6] || (f[6] = (C) => u.value = C),
541
+ onEdit: f[7] || (f[7] = (C) => g.value = !0),
542
+ onDelete: f[8] || (f[8] = (C) => p.$emit("delete", p.comment?.id)),
543
+ comment: p.comment
544
+ }, null, 8, ["showMoreOptions", "comment"])) : _("", !0)
545
545
  ], 2),
546
- c.isInside ? $("", !0) : (a(), r("div", vt, [
547
- (a(!0), r(A, null, S(c.comment?.replies, (C) => (a(), j(F, {
546
+ p.isInside ? _("", !0) : (o(), a("div", bt, [
547
+ (o(!0), a(V, null, A(p.comment?.replies, (C) => (o(), I(H, {
548
548
  key: C.id,
549
549
  comment: C,
550
550
  isInside: !0,
551
- onDelete: (x) => c.$emit("delete", C.id),
552
- onLike: W,
553
- onEdit: V
551
+ onDelete: (x) => p.$emit("delete", C.id),
552
+ onLike: P,
553
+ onEdit: F
554
554
  }, null, 8, ["comment", "onDelete"]))), 128)),
555
- v.value && !c.isInside ? (a(), j(ke, {
555
+ v.value && !p.isInside ? (o(), I(ke, {
556
556
  key: 0,
557
- onSendComment: h[9] || (h[9] = (C) => c.$emit("reply", c.comment?.id, C)),
557
+ onSendComment: f[9] || (f[9] = (C) => p.$emit("reply", p.comment?.id, C)),
558
558
  isReply: v.value,
559
- "onUpdate:isReply": h[10] || (h[10] = (C) => v.value = C)
560
- }, null, 8, ["isReply"])) : $("", !0)
559
+ "onUpdate:isReply": f[10] || (f[10] = (C) => v.value = C)
560
+ }, null, 8, ["isReply"])) : _("", !0)
561
561
  ]))
562
562
  ]);
563
563
  };
564
564
  }
565
- }), bt = ["id"], xt = {
565
+ }), kt = ["id"], _t = {
566
566
  key: 0,
567
567
  class: "text-xl font-semibold text-gray-900 mb-4"
568
- }, se = /* @__PURE__ */ I({
568
+ }, oe = /* @__PURE__ */ j({
569
569
  __name: "CommentsWidget",
570
570
  props: {
571
571
  title: {},
@@ -581,43 +581,43 @@ const X = T("x", [
581
581
  style: {}
582
582
  },
583
583
  emits: ["add", "reply", "like", "delete", "edit"],
584
- setup(l, { emit: i }) {
585
- const n = l, t = i, s = (g) => {
586
- n?.onAddComment?.(g), t("add", g);
587
- }, f = (g, d) => {
588
- n?.onLike?.(g, d), t("like", g, d);
589
- }, o = (g, d) => {
590
- n.onReply?.(g, d), t("reply", g, d);
591
- }, m = (g, d) => {
592
- n.onEdit?.(g, d), t("edit", g, d);
584
+ setup(r, { emit: l }) {
585
+ const i = r, t = l, s = (g) => {
586
+ i?.onAddComment?.(g), t("add", g);
587
+ }, c = (g, d) => {
588
+ i?.onLike?.(g, d), t("like", g, d);
589
+ }, n = (g, d) => {
590
+ i.onReply?.(g, d), t("reply", g, d);
591
+ }, u = (g, d) => {
592
+ i.onEdit?.(g, d), t("edit", g, d);
593
593
  }, v = (g) => {
594
- n.onDelete?.(g), t("delete", g);
594
+ i.onDelete?.(g), t("delete", g);
595
595
  };
596
- return (g, d) => (a(), r("div", {
596
+ return (g, d) => (o(), a("div", {
597
597
  class: D(["mx-auto font-sans", g.className]),
598
598
  id: g.id,
599
- style: R(g.style)
599
+ style: U(g.style)
600
600
  }, [
601
- g.title ? (a(), r("h3", xt, k(g.title), 1)) : $("", !0),
601
+ g.title ? (o(), a("h3", _t, b(g.title), 1)) : _("", !0),
602
602
  e("div", {
603
603
  class: D([g.maxHeight ? "overflow-y-auto" : "", "space-y-3"]),
604
- style: R({ maxHeight: g.maxHeight + "px" })
604
+ style: U({ maxHeight: g.maxHeight + "px" })
605
605
  }, [
606
- (a(!0), r(A, null, S(g.comments, (y) => (a(), j(yt, {
606
+ (o(!0), a(V, null, A(g.comments, (y) => (o(), I(xt, {
607
607
  key: y.id,
608
608
  comment: y,
609
- onReply: o,
610
- onLike: f,
611
- onDelete: d[0] || (d[0] = (p) => v(p)),
612
- onEdit: m
609
+ onReply: n,
610
+ onLike: c,
611
+ onDelete: d[0] || (d[0] = (h) => v(h)),
612
+ onEdit: u
613
613
  }, null, 8, ["comment"]))), 128))
614
614
  ], 6),
615
- w(ke, {
615
+ $(ke, {
616
616
  onSendComment: d[1] || (d[1] = (y) => s(y))
617
617
  })
618
- ], 14, bt));
618
+ ], 14, kt));
619
619
  }
620
- }), he = /* @__PURE__ */ new Map([
620
+ }), fe = /* @__PURE__ */ new Map([
621
621
  ["file", {
622
622
  name: "File",
623
623
  color: "bg-green-100 text-green-700 border-green-200",
@@ -626,34 +626,34 @@ const X = T("x", [
626
626
  ["post", {
627
627
  name: "Post",
628
628
  color: "bg-blue-100 text-blue-700 border-blue-200",
629
- icon: qe
629
+ icon: Ze
630
630
  }],
631
631
  ["user", {
632
632
  name: "User",
633
633
  color: "bg-purple-100 text-purple-700 border-purple-200",
634
- icon: Ze
634
+ icon: Xe
635
635
  }],
636
636
  ["custom", {
637
637
  name: "Custom",
638
638
  color: "bg-gray-100 text-gray-700 border-gray-200",
639
- icon: Re
639
+ icon: We
640
640
  }]
641
- ]), kt = { class: "mx-auto font-sans" }, _t = {
641
+ ]), wt = { class: "mx-auto font-sans" }, $t = {
642
642
  key: 0,
643
643
  class: "text-xl font-semibold text-gray-900 mb-4"
644
- }, wt = { class: "relative" }, $t = { class: "space-y-3" }, Ct = { class: "flex-1 min-w-0 pb-2" }, Mt = { class: "flex items-center gap-1.5 mb-1 mt-0.5" }, Lt = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, Dt = { class: "font-medium text-xs" }, Tt = { class: "text-xs text-gray-500" }, It = { class: "space-y-1" }, zt = { class: "text-xs text-gray-700" }, jt = { class: "capitalize mr-1" }, Vt = {
644
+ }, Ct = { class: "relative" }, Mt = { class: "space-y-3" }, Lt = { class: "flex-1 min-w-0 pb-2" }, Dt = { class: "flex items-center gap-1.5 mb-1 mt-0.5" }, Tt = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, It = { class: "font-medium text-xs" }, jt = { class: "text-xs text-gray-500" }, zt = { class: "space-y-1" }, Vt = { class: "text-xs text-gray-700" }, Ft = { class: "capitalize mr-1" }, Ht = {
645
645
  key: 0,
646
646
  class: "inline-flex items-center rounded-full border py-0.5 font-semibold transition-colors text-foreground text-xs h-4 px-1 capitalize"
647
- }, Ft = {
647
+ }, At = {
648
648
  key: 0,
649
649
  class: "flex items-center gap-1 text-xs"
650
- }, Ht = {
650
+ }, St = {
651
651
  key: 0,
652
652
  class: "bg-red-50 text-red-600 px-1.5 py-0.5 rounded text-xs border border-red-200"
653
- }, At = {
653
+ }, Et = {
654
654
  key: 2,
655
655
  class: "bg-green-50 text-green-600 px-1.5 py-0.5 rounded text-xs border border-green-200"
656
- }, oe = /* @__PURE__ */ I({
656
+ }, ne = /* @__PURE__ */ j({
657
657
  __name: "HistoryWidget",
658
658
  props: {
659
659
  data: {},
@@ -663,57 +663,57 @@ const X = T("x", [
663
663
  className: {},
664
664
  style: {}
665
665
  },
666
- setup(l) {
667
- const i = l, n = M(i.data ?? []);
668
- n.value.length === 0 && i.id && t(), console.log(i);
666
+ setup(r) {
667
+ const l = r, i = w(Array.isArray(l.data) ? l.data : []);
668
+ i.value.length === 0 && l.id && t();
669
669
  async function t() {
670
- const s = await fetch(`/api/widget/history/${i.id}`);
670
+ const s = await fetch(`/api/widget/history/${l.id}`);
671
671
  if (!s.ok)
672
672
  return { data: [] };
673
- const f = await s.json();
674
- f.rows.forEach((o) => {
675
- o.timestamp = new Date(o.cdate), o.id = o.entity_id, o.entityType = o.entity_type, o.entityId = o.entity_id, o.action = o.change_type, o.userId = o.change_user_id, o.userName = o.username, o.timestamp = new Date(o.cdate), o.description = o.username, o.status = o.username;
676
- }), n.value = f.rows;
673
+ const c = await s.json();
674
+ c.rows.forEach((n) => {
675
+ n.timestamp = new Date(n.cdate), n.id = n.entity_id, n.entityType = n.entity_type, n.entityId = n.entity_id, n.action = n.change_type, n.userId = n.change_user_id, n.userName = n.username, n.timestamp = new Date(n.cdate), n.description = n.username, n.status = n.username;
676
+ }), i.value = c.rows;
677
677
  }
678
- return (s, f) => (a(), r("div", kt, [
679
- s.title ? (a(), r("h3", _t, k(s.title), 1)) : $("", !0),
678
+ return (s, c) => (o(), a("div", wt, [
679
+ s.title ? (o(), a("h3", $t, b(s.title), 1)) : _("", !0),
680
680
  e("div", {
681
681
  class: D(s.maxHeight ? "overflow-y-auto" : ""),
682
- style: R({ maxHeight: s.maxHeight + "px" })
682
+ style: U({ maxHeight: s.maxHeight + "px" })
683
683
  }, [
684
- e("div", wt, [
685
- f[0] || (f[0] = e("div", { class: "absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200" }, null, -1)),
686
- e("div", $t, [
687
- (a(!0), r(A, null, S(n.value, (o) => (a(), r("div", {
684
+ e("div", Ct, [
685
+ c[0] || (c[0] = e("div", { class: "absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200" }, null, -1)),
686
+ e("div", Mt, [
687
+ (o(!0), a(V, null, A(i.value, (n) => (o(), a("div", {
688
688
  class: "relative flex items-start gap-2",
689
- key: o?.id
689
+ key: n?.id
690
690
  }, [
691
691
  e("div", {
692
- class: D(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${_(he).get(o?.entityType)?.color}`)
692
+ class: D(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${k(fe).get(n?.entityType)?.color}`)
693
693
  }, [
694
- (a(), j(N(_(he).get(o?.entityType)?.icon), { class: "h-3 w-3" }))
694
+ (o(), I(B(k(fe).get(n?.entityType)?.icon), { class: "h-3 w-3" }))
695
695
  ], 2),
696
- e("div", Ct, [
697
- e("div", Mt, [
698
- e("span", Lt, [
699
- w(_(pe), { class: "h-3 w-3 text-gray-500" })
696
+ e("div", Lt, [
697
+ e("div", Dt, [
698
+ e("span", Tt, [
699
+ $(k(me), { class: "h-3 w-3 text-gray-500" })
700
700
  ]),
701
- e("span", Dt, k(o?.userName), 1),
702
- e("span", Tt, k(o?.timestamp.toLocaleTimeString("ua-UA", { hour: "2-digit", minute: "2-digit" })), 1)
701
+ e("span", It, b(n?.userName), 1),
702
+ e("span", jt, b(n?.timestamp.toLocaleTimeString("ua-UA", { hour: "2-digit", minute: "2-digit" })), 1)
703
703
  ]),
704
- e("div", It, [
705
- e("div", zt, [
706
- e("span", jt, k(o?.action), 1),
707
- o?.entityId ? (a(), r("span", Vt, k(o?.entityId), 1)) : $("", !0)
704
+ e("div", zt, [
705
+ e("div", Vt, [
706
+ e("span", Ft, b(n?.action), 1),
707
+ n?.entityId ? (o(), a("span", Ht, b(n?.entityId), 1)) : _("", !0)
708
708
  ]),
709
- o?.changes?.[o?.entityId] ? (a(), r("div", Ft, [
710
- o?.changes?.[o?.entityId]?.old ? (a(), r("span", Ht, k(o?.changes?.[o?.entityId]?.old), 1)) : $("", !0),
711
- o?.changes?.[o?.entityId]?.old && o?.changes?.[o?.entityId]?.new ? (a(), j(_(Ae), {
709
+ n?.changes?.[n?.entityId] ? (o(), a("div", At, [
710
+ n?.changes?.[n?.entityId]?.old ? (o(), a("span", St, b(n?.changes?.[n?.entityId]?.old), 1)) : _("", !0),
711
+ n?.changes?.[n?.entityId]?.old && n?.changes?.[n?.entityId]?.new ? (o(), I(k(Ee), {
712
712
  key: 1,
713
713
  class: "h-2 w-2 text-gray-400"
714
- })) : $("", !0),
715
- o?.changes?.[o?.entityId]?.new ? (a(), r("span", At, k(o?.changes?.[o?.entityId]?.new), 1)) : $("", !0)
716
- ])) : $("", !0)
714
+ })) : _("", !0),
715
+ n?.changes?.[n?.entityId]?.new ? (o(), a("span", Et, b(n?.changes?.[n?.entityId]?.new), 1)) : _("", !0)
716
+ ])) : _("", !0)
717
717
  ])
718
718
  ])
719
719
  ]))), 128))
@@ -722,55 +722,55 @@ const X = T("x", [
722
722
  ], 6)
723
723
  ]));
724
724
  }
725
- }), St = {
725
+ }), Ot = {
726
726
  key: 0,
727
727
  class: "text-xl font-semibold"
728
- }, Et = { class: "flex gap-1" }, Ot = { class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer" }, Bt = /* @__PURE__ */ I({
728
+ }, Bt = { class: "flex gap-1" }, Nt = { class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer" }, Rt = /* @__PURE__ */ j({
729
729
  __name: "FileHeader",
730
- props: /* @__PURE__ */ J({
730
+ props: /* @__PURE__ */ X({
731
731
  title: {}
732
732
  }, {
733
733
  modelValue: {},
734
734
  modelModifiers: {}
735
735
  }),
736
- emits: /* @__PURE__ */ J(["onAddFile"], ["update:modelValue"]),
737
- setup(l) {
738
- const i = le(l, "modelValue"), n = {
736
+ emits: /* @__PURE__ */ X(["onAddFile"], ["update:modelValue"]),
737
+ setup(r) {
738
+ const l = de(r, "modelValue"), i = {
739
739
  active: "bg-blue-100 text-black hover:bg-blue-100",
740
740
  inactive: "bg-white text-black hover:bg-blue-100"
741
741
  };
742
- return (t, s) => (a(), r("div", {
742
+ return (t, s) => (o(), a("div", {
743
743
  class: D(["flex flex-col sm:flex-row gap-3 mb-4", t.title ? "justify-between sm:items-center" : "justify-end sm:items-center"])
744
744
  }, [
745
- t.title ? (a(), r("h3", St, k(t.title), 1)) : $("", !0),
746
- e("div", Et, [
745
+ t.title ? (o(), a("h3", Ot, b(t.title), 1)) : _("", !0),
746
+ e("div", Bt, [
747
747
  e("button", {
748
- class: D(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2", i.value === "list" ? n.active : n.inactive]),
749
- onClick: s[0] || (s[0] = (f) => i.value = "list")
748
+ class: D(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2", l.value === "list" ? i.active : i.inactive]),
749
+ onClick: s[0] || (s[0] = (c) => l.value = "list")
750
750
  }, [
751
- w(_(Ue), { class: "h-4 w-4" })
751
+ $(k(Pe), { class: "h-4 w-4" })
752
752
  ], 2),
753
753
  e("button", {
754
- class: D(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2", i.value === "grid" ? n.active : n.inactive]),
755
- onClick: s[1] || (s[1] = (f) => i.value = "grid")
754
+ class: D(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2", l.value === "grid" ? i.active : i.inactive]),
755
+ onClick: s[1] || (s[1] = (c) => l.value = "grid")
756
756
  }, [
757
- w(_(Be), { class: "h-4 w-4" })
757
+ $(k(Re), { class: "h-4 w-4" })
758
758
  ], 2),
759
759
  e("label", null, [
760
760
  e("input", {
761
761
  type: "file",
762
762
  class: "hidden",
763
- onChange: s[2] || (s[2] = (f) => t.$emit("onAddFile", f))
763
+ onChange: s[2] || (s[2] = (c) => t.$emit("onAddFile", c))
764
764
  }, null, 32),
765
- e("div", Ot, [
766
- w(_(Pe), { class: "h-4 w-4" }),
767
- s[3] || (s[3] = H(" Додати файл ", -1))
765
+ e("div", Nt, [
766
+ $(k(Ge), { class: "h-4 w-4" }),
767
+ s[3] || (s[3] = S(" Додати файл ", -1))
768
768
  ])
769
769
  ])
770
770
  ])
771
771
  ], 2));
772
772
  }
773
- }), fe = {
773
+ }), ve = {
774
774
  pdf: {
775
775
  color: "bg-red-100 text-red-700 border-red-200",
776
776
  icon: q,
@@ -778,12 +778,12 @@ const X = T("x", [
778
778
  },
779
779
  sketch: {
780
780
  color: "bg-gray-100 text-gray-700 border-gray-200",
781
- icon: Oe,
781
+ icon: Ne,
782
782
  label: "SKETCH"
783
783
  },
784
784
  mp4: {
785
785
  color: "bg-purple-100 text-purple-700 border-purple-200",
786
- icon: Je,
786
+ icon: Qe,
787
787
  label: "VIDEO"
788
788
  },
789
789
  docx: {
@@ -793,17 +793,17 @@ const X = T("x", [
793
793
  },
794
794
  zip: {
795
795
  color: "bg-orange-100 text-orange-700 border-orange-200",
796
- icon: He,
796
+ icon: Se,
797
797
  label: "ARCHIVE"
798
798
  },
799
799
  png: {
800
800
  color: "bg-green-100 text-green-700 border-green-200",
801
- icon: ge,
801
+ icon: he,
802
802
  label: "IMAGE"
803
803
  },
804
804
  jpg: {
805
805
  color: "bg-green-100 text-green-700 border-green-200",
806
- icon: ge,
806
+ icon: he,
807
807
  label: "IMAGE"
808
808
  },
809
809
  xlsx: {
@@ -817,114 +817,114 @@ const X = T("x", [
817
817
  label: "PPT"
818
818
  }
819
819
  };
820
- function _e(l, i = "en") {
821
- const n = {
820
+ function _e(r, l = "en") {
821
+ const i = {
822
822
  month: "short",
823
823
  day: "numeric"
824
824
  };
825
- return new Intl.DateTimeFormat(i, n).format(l);
825
+ return new Intl.DateTimeFormat(l, i).format(r);
826
826
  }
827
- function we(l) {
828
- if (l === 0) return "0 B";
829
- const i = 1024, n = ["B", "KB", "MB", "GB", "TB"], t = Math.floor(Math.log(l) / Math.log(i));
830
- return `${parseFloat((l / Math.pow(i, t)).toFixed(1))} ${n[t]}`;
827
+ function we(r) {
828
+ if (r === 0) return "0 B";
829
+ const l = 1024, i = ["B", "KB", "MB", "GB", "TB"], t = Math.floor(Math.log(r) / Math.log(l));
830
+ return `${parseFloat((r / Math.pow(l, t)).toFixed(1))} ${i[t]}`;
831
831
  }
832
- const Nt = { class: "space-y-0.5" }, Rt = ["onClick"], Ut = ["onClick"], Pt = { class: "flex items-center gap-2" }, Wt = { class: "font-medium text-xs truncate hover:text-blue-600 cursor-pointer" }, Gt = { class: "hidden sm:block text-xs text-gray-500 w-16 text-right" }, qt = { class: "hidden md:block text-xs text-gray-500 w-12 text-right" }, Kt = { class: "flex items-center gap-1" }, Zt = ["onClick"], Jt = ["onClick"], Xt = /* @__PURE__ */ I({
832
+ const Ut = { class: "space-y-0.5" }, Wt = ["onClick"], Pt = ["onClick"], Gt = { class: "flex items-center gap-2" }, qt = { class: "font-medium text-xs truncate hover:text-blue-600 cursor-pointer" }, Kt = { class: "hidden sm:block text-xs text-gray-500 w-16 text-right" }, Zt = { class: "hidden md:block text-xs text-gray-500 w-12 text-right" }, Jt = { class: "flex items-center gap-1" }, Xt = ["onClick"], Qt = ["onClick"], Yt = /* @__PURE__ */ j({
833
833
  __name: "FileList",
834
834
  props: {
835
835
  files: {}
836
836
  },
837
837
  emits: ["delete", "download", "openLightbox"],
838
- setup(l) {
839
- return (i, n) => (a(), r("div", Nt, [
840
- (a(!0), r(A, null, S(i.files, (t) => (a(), r("div", {
838
+ setup(r) {
839
+ return (l, i) => (o(), a("div", Ut, [
840
+ (o(!0), a(V, null, A(l.files, (t) => (o(), a("div", {
841
841
  class: "flex items-center gap-2 p-1.5 rounded hover:bg-gray-50 group border-b border-gray-100 last:border-b-0",
842
842
  key: t.id,
843
- onClick: K((s) => i.$emit("openLightbox", t), ["stop"])
843
+ onClick: K((s) => l.$emit("openLightbox", t), ["stop"])
844
844
  }, [
845
845
  e("div", {
846
- class: D(["p-1 rounded", _(fe)[t?.ext]?.color])
846
+ class: D(["p-1 rounded", k(ve)[t?.ext]?.color])
847
847
  }, [
848
- (a(), j(N(_(fe)[t?.ext]?.icon), { class: "h-3 w-3" }))
848
+ (o(), I(B(k(ve)[t?.ext]?.icon), { class: "h-3 w-3" }))
849
849
  ], 2),
850
850
  e("div", {
851
851
  class: "flex-1 min-w-0",
852
- onClick: (s) => i.$emit("openLightbox", t)
852
+ onClick: (s) => l.$emit("openLightbox", t)
853
853
  }, [
854
- e("div", Pt, [
855
- e("span", Wt, k(t?.uploaded_name || t?.name), 1)
854
+ e("div", Gt, [
855
+ e("span", qt, b(t?.uploaded_name || t?.name), 1)
856
856
  ])
857
- ], 8, Ut),
858
- e("div", Gt, k(_(we)(t.size)), 1),
859
- e("div", qt, k(_(_e)(t.createdAt)), 1),
860
- e("div", Kt, [
857
+ ], 8, Pt),
858
+ e("div", Kt, b(k(we)(t.size)), 1),
859
+ e("div", Zt, b(k(_e)(t.createdAt)), 1),
860
+ e("div", Jt, [
861
861
  e("button", {
862
- onClick: K((s) => i.$emit("download", t), ["stop"]),
862
+ onClick: K((s) => l.$emit("download", t), ["stop"]),
863
863
  class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity"
864
864
  }, [
865
- w(_(ce), { class: "h-3 w-3" })
866
- ], 8, Zt),
865
+ $(k(ue), { class: "h-3 w-3" })
866
+ ], 8, Xt),
867
867
  e("button", {
868
868
  class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700",
869
- onClick: K((s) => i.$emit("delete", s, t?.file_id), ["stop"])
869
+ onClick: K((s) => l.$emit("delete", s, t?.file_id), ["stop"])
870
870
  }, [
871
- w(_(ue), { class: "h-3 w-3" })
872
- ], 8, Jt)
871
+ $(k(pe), { class: "h-3 w-3" })
872
+ ], 8, Qt)
873
873
  ])
874
- ], 8, Rt))), 128))
874
+ ], 8, Wt))), 128))
875
875
  ]));
876
876
  }
877
- }), Qt = { class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3" }, Yt = ["onClick"], es = { class: "space-y-2" }, ts = { class: "flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden" }, ss = ["src"], os = { class: "space-y-1" }, ns = ["title"], is = { class: "text-xs text-gray-500 text-left" }, as = { class: "absolute top-2 right-1 flex items-center gap-1" }, ls = ["onClick"], rs = ["onClick"], ds = /* @__PURE__ */ I({
877
+ }), es = { class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3" }, ts = ["onClick"], ss = { class: "space-y-2" }, os = { class: "flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden" }, ns = ["src"], is = { class: "space-y-1" }, ls = ["title"], as = { class: "text-xs text-gray-500 text-left" }, rs = { class: "absolute top-2 right-1 flex items-center gap-1" }, ds = ["onClick"], cs = ["onClick"], us = /* @__PURE__ */ j({
878
878
  __name: "FileGrid",
879
879
  props: {
880
880
  files: {}
881
881
  },
882
882
  emits: ["delete", "download", "openLightbox"],
883
- setup(l) {
884
- return (i, n) => (a(), r("div", Qt, [
885
- (a(!0), r(A, null, S(i.files, (t) => (a(), r("div", {
883
+ setup(r) {
884
+ return (l, i) => (o(), a("div", es, [
885
+ (o(!0), a(V, null, A(l.files, (t) => (o(), a("div", {
886
886
  key: t.id,
887
- onClick: K((s) => i.$emit("openLightbox", t), ["stop"]),
887
+ onClick: K((s) => l.$emit("openLightbox", t), ["stop"]),
888
888
  class: "group relative border rounded-lg p-2 hover:shadow-md transition-all bg-white hover:bg-gray-50 cursor-pointer"
889
889
  }, [
890
- e("div", es, [
891
- e("div", ts, [
892
- t.ext === "png" || t.ext === "jpg" || t.ext === "jpeg" || t.ext === "gif" || t.ext === "svg" || t.ext === "webp" ? (a(), r("img", {
890
+ e("div", ss, [
891
+ e("div", os, [
892
+ t.ext === "png" || t.ext === "jpg" || t.ext === "jpeg" || t.ext === "gif" || t.ext === "svg" || t.ext === "webp" ? (o(), a("img", {
893
893
  key: 0,
894
894
  src: `/file/resize?filepath=${t?.file_path}&w=500`,
895
895
  alt: "file",
896
896
  class: "w-full h-full object-cover"
897
- }, null, 8, ss)) : (a(), j(_(q), {
897
+ }, null, 8, ns)) : (o(), I(k(q), {
898
898
  key: 1,
899
899
  class: "h-10 w-10 text-gray-500"
900
900
  }))
901
901
  ]),
902
- e("div", os, [
902
+ e("div", is, [
903
903
  e("h3", {
904
904
  class: "font-medium text-xs leading-tight text-left",
905
905
  title: t.uploaded_name || t.name
906
- }, k(t.uploaded_name || t.name), 9, ns),
907
- e("p", is, k(_(_e)(t.createdAt)) + ", " + k(_(we)(t.size)), 1)
906
+ }, b(t.uploaded_name || t.name), 9, ls),
907
+ e("p", as, b(k(_e)(t.createdAt)) + ", " + b(k(we)(t.size)), 1)
908
908
  ])
909
909
  ]),
910
- e("div", as, [
910
+ e("div", rs, [
911
911
  e("button", {
912
- onClick: K((s) => i.$emit("download", t), ["stop"]),
912
+ onClick: K((s) => l.$emit("download", t), ["stop"]),
913
913
  class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50"
914
914
  }, [
915
- w(_(ce), { class: "h-3 w-3" })
916
- ], 8, ls),
915
+ $(k(ue), { class: "h-3 w-3" })
916
+ ], 8, ds),
917
917
  e("a", {
918
918
  class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700 hover:bg-red-50",
919
- onClick: K((s) => i.$emit("delete", s, t?.file_id), ["stop"])
919
+ onClick: K((s) => l.$emit("delete", s, t?.file_id), ["stop"])
920
920
  }, [
921
- w(_(ue), { class: "h-3 w-3" })
922
- ], 8, rs)
921
+ $(k(pe), { class: "h-3 w-3" })
922
+ ], 8, cs)
923
923
  ])
924
- ], 8, Yt))), 128))
924
+ ], 8, ts))), 128))
925
925
  ]));
926
926
  }
927
- }), cs = { class: "mx-auto font-sans" }, us = { key: 1 }, ne = /* @__PURE__ */ I({
927
+ }), ps = { class: "mx-auto font-sans" }, ms = { key: 1 }, ie = /* @__PURE__ */ j({
928
928
  __name: "FilesWidget",
929
929
  props: {
930
930
  title: {},
@@ -938,258 +938,258 @@ const Nt = { class: "space-y-0.5" }, Rt = ["onClick"], Ut = ["onClick"], Pt = {
938
938
  onDelete: {}
939
939
  },
940
940
  emits: ["delete", "add", "openLightbox"],
941
- setup(l, { emit: i }) {
942
- const n = l, t = M(!1), s = M(null), f = M(!1), o = M(0), m = M(n.files ?? []), v = i;
943
- m.value.length === 0 && h();
944
- const g = (x, u) => {
945
- s.value = u, t.value = !0;
941
+ setup(r, { emit: l }) {
942
+ const i = r, t = w(!1), s = w(null), c = w(!1), n = w(0), u = w(i.files ?? []), v = l;
943
+ u.value.length === 0 && f();
944
+ const g = (x, m) => {
945
+ s.value = m, t.value = !0;
946
946
  }, d = () => {
947
- s.value && (W(s.value), s.value = null, t.value = !1);
948
- }, y = O(() => Array.isArray(m.value) ? m.value.map((x) => x?.file_path) : []), p = (x) => {
949
- const u = y.value.findIndex((E) => E === x.file_path);
950
- u !== -1 && (f.value = !0, o.value = u);
951
- }, b = (x) => {
952
- n.onAddFile ? n.onAddFile(x) : F(x), v("add", x);
953
- }, W = (x) => {
954
- n.onDelete ? n.onDelete(x) : C(x), v("delete", x);
955
- }, V = (x) => {
956
- const u = document.createElement("a");
957
- u.setAttribute("download", x?.uploaded_name || x?.name), u.href = x?.file_path || x?.path, u.click();
958
- }, c = M("list");
959
- async function h() {
960
- if (!n.id)
947
+ s.value && (P(s.value), s.value = null, t.value = !1);
948
+ }, y = O(() => Array.isArray(u.value) ? u.value.map((x) => x?.file_path) : []), h = (x) => {
949
+ const m = y.value.findIndex((E) => E === x.file_path);
950
+ m !== -1 && (c.value = !0, n.value = m);
951
+ }, M = (x) => {
952
+ i.onAddFile ? i.onAddFile(x) : H(x), v("add", x);
953
+ }, P = (x) => {
954
+ i.onDelete ? i.onDelete(x) : C(x), v("delete", x);
955
+ }, F = (x) => {
956
+ const m = document.createElement("a");
957
+ m.setAttribute("download", x?.uploaded_name || x?.name), m.href = x?.file_path || x?.path, m.click();
958
+ }, p = w("list");
959
+ async function f() {
960
+ if (!i.id)
961
961
  return;
962
- const x = await fetch(`/api/widget/file/${n.id}`).then((u) => u.json());
963
- x.rows.forEach((u) => {
964
- u.timestamp = new Date(u.cdate), u.id = u.entity_id, u.entityType = u.entity_type, u.entityId = u.entity_id, u.entityType = u.entity_type, u.action = u.change_type, u.userId = u.change_user_id, u.userName = u.username, u.timestamp = new Date(u.cdate), u.description = u.username, u.status = u.username;
965
- }), m.value = x.rows;
962
+ const x = await fetch(`/api/widget/file/${i.id}`).then((m) => m.json());
963
+ x.rows.forEach((m) => {
964
+ m.timestamp = new Date(m.cdate), m.id = m.entity_id, m.entityType = m.entity_type, m.entityId = m.entity_id, m.entityType = m.entity_type, m.action = m.change_type, m.userId = m.change_user_id, m.userName = m.username, m.timestamp = new Date(m.cdate), m.description = m.username, m.status = m.username;
965
+ }), u.value = x.rows;
966
966
  }
967
- const F = async (x) => {
967
+ const H = async (x) => {
968
968
  if (!(!x.target || !x.target.files || x.target.files.length === 0))
969
969
  try {
970
970
  await Promise.all(
971
- Array.from(x.target.files).map(async (u) => {
971
+ Array.from(x.target.files).map(async (m) => {
972
972
  const E = new FormData();
973
- E.append("file", u);
974
- const B = `/api/widget/file/${n.id}`, z = await fetch(B, {
973
+ E.append("file", m);
974
+ const N = `/api/widget/file/${i.id}`, z = await fetch(N, {
975
975
  method: "POST",
976
976
  body: E
977
977
  });
978
978
  if (!z.ok)
979
979
  throw new Error(`HTTP error! status: ${z.status}`);
980
- return u;
980
+ return m;
981
981
  })
982
- ), await h();
983
- } catch (u) {
984
- console.error("Помилка при завантаженні файлів:", u);
982
+ ), await f();
983
+ } catch (m) {
984
+ console.error("Помилка при завантаженні файлів:", m);
985
985
  }
986
986
  }, C = async (x) => {
987
987
  try {
988
988
  await fetch(
989
- `/api/widget/file/${n.id}/${x}`,
989
+ `/api/widget/file/${i.id}/${x}`,
990
990
  {
991
991
  method: "DELETE"
992
992
  }
993
- ), await h();
994
- } catch (u) {
995
- console.error(u);
993
+ ), await f();
994
+ } catch (m) {
995
+ console.error(m);
996
996
  }
997
997
  };
998
- return (x, u) => {
999
- const E = ee("MessageBox"), B = ee("Lightbox");
1000
- return a(), r(A, null, [
1001
- e("div", cs, [
1002
- w(Bt, {
1003
- modelValue: c.value,
1004
- "onUpdate:modelValue": u[0] || (u[0] = (z) => c.value = z),
1005
- title: n.title,
1006
- onOnAddFile: u[1] || (u[1] = (z) => b(z))
998
+ return (x, m) => {
999
+ const E = se("MessageBox"), N = se("Lightbox");
1000
+ return o(), a(V, null, [
1001
+ e("div", ps, [
1002
+ $(Rt, {
1003
+ modelValue: p.value,
1004
+ "onUpdate:modelValue": m[0] || (m[0] = (z) => p.value = z),
1005
+ title: i.title,
1006
+ onOnAddFile: m[1] || (m[1] = (z) => M(z))
1007
1007
  }, null, 8, ["modelValue", "title"]),
1008
- m.value.length > 0 ? (a(), r("div", {
1008
+ u.value.length > 0 ? (o(), a("div", {
1009
1009
  key: 0,
1010
1010
  class: D(x.maxHeight ? "overflow-y-auto" : ""),
1011
- style: R({ maxHeight: x.maxHeight + "px" })
1011
+ style: U({ maxHeight: x.maxHeight + "px" })
1012
1012
  }, [
1013
- c.value === "list" ? (a(), j(Xt, {
1013
+ p.value === "list" ? (o(), I(Yt, {
1014
1014
  key: 0,
1015
1015
  onDelete: g,
1016
- onDownload: V,
1017
- onOpenLightbox: u[2] || (u[2] = (z) => p(z)),
1018
- files: m.value
1019
- }, null, 8, ["files"])) : $("", !0),
1020
- c.value === "grid" ? (a(), j(ds, {
1016
+ onDownload: F,
1017
+ onOpenLightbox: m[2] || (m[2] = (z) => h(z)),
1018
+ files: u.value
1019
+ }, null, 8, ["files"])) : _("", !0),
1020
+ p.value === "grid" ? (o(), I(us, {
1021
1021
  key: 1,
1022
1022
  onDelete: g,
1023
- onDownload: V,
1024
- onOpenLightbox: u[3] || (u[3] = (z) => p(z)),
1025
- files: m.value
1026
- }, null, 8, ["files"])) : $("", !0)
1027
- ], 6)) : (a(), r("div", us, u[6] || (u[6] = [
1023
+ onDownload: F,
1024
+ onOpenLightbox: m[3] || (m[3] = (z) => h(z)),
1025
+ files: u.value
1026
+ }, null, 8, ["files"])) : _("", !0)
1027
+ ], 6)) : (o(), a("div", ms, m[6] || (m[6] = [
1028
1028
  e("div", { class: "flex items-center justify-center h-full" }, [
1029
1029
  e("p", { class: "text-gray-500 leading-[3]" }, "Файлів не знайдено")
1030
1030
  ], -1)
1031
1031
  ])))
1032
1032
  ]),
1033
- w(E, {
1033
+ $(E, {
1034
1034
  modelValue: t.value,
1035
- "onUpdate:modelValue": u[4] || (u[4] = (z) => t.value = z),
1035
+ "onUpdate:modelValue": m[4] || (m[4] = (z) => t.value = z),
1036
1036
  onConfirm: d,
1037
1037
  title: "Ви впевнені?",
1038
1038
  message: "Ви впевнені, що хочете видалити цей файл?",
1039
1039
  confirmButtonText: "Так, я впевнена/ий",
1040
1040
  cancelButtonText: "Скасувати"
1041
1041
  }, null, 8, ["modelValue"]),
1042
- w(B, {
1043
- modelValue: f.value,
1044
- "onUpdate:modelValue": u[5] || (u[5] = (z) => f.value = z),
1042
+ $(N, {
1043
+ modelValue: c.value,
1044
+ "onUpdate:modelValue": m[5] || (m[5] = (z) => c.value = z),
1045
1045
  images: y.value,
1046
- "start-index": o.value
1046
+ "start-index": n.value
1047
1047
  }, null, 8, ["modelValue", "images", "start-index"])
1048
1048
  ], 64);
1049
1049
  };
1050
1050
  }
1051
- }), ps = ["onClick"], ms = /* @__PURE__ */ I({
1051
+ }), gs = ["onClick"], hs = /* @__PURE__ */ j({
1052
1052
  __name: "CopyNotification",
1053
- setup(l, { expose: i }) {
1054
- const n = M([]);
1053
+ setup(r, { expose: l }) {
1054
+ const i = w([]);
1055
1055
  let t = 1;
1056
1056
  const s = () => {
1057
- if (n.value.length >= 10) {
1058
- const m = n.value[0];
1059
- clearTimeout(m.timer), n.value.shift();
1057
+ if (i.value.length >= 10) {
1058
+ const u = i.value[0];
1059
+ clearTimeout(u.timer), i.value.shift();
1060
1060
  }
1061
- const o = {
1061
+ const n = {
1062
1062
  id: t++,
1063
1063
  timer: setTimeout(() => {
1064
- f(o.id);
1064
+ c(n.id);
1065
1065
  }, 1500)
1066
1066
  };
1067
- n.value.push(o);
1068
- }, f = (o) => {
1069
- const m = n.value.findIndex((v) => v.id === o);
1070
- if (m !== -1) {
1071
- const v = n.value[m];
1072
- clearTimeout(v.timer), n.value.splice(m, 1);
1067
+ i.value.push(n);
1068
+ }, c = (n) => {
1069
+ const u = i.value.findIndex((v) => v.id === n);
1070
+ if (u !== -1) {
1071
+ const v = i.value[u];
1072
+ clearTimeout(v.timer), i.value.splice(u, 1);
1073
1073
  }
1074
1074
  };
1075
- return i({
1075
+ return l({
1076
1076
  addNotification: s
1077
- }), de(() => {
1078
- n.value.forEach((o) => {
1079
- clearTimeout(o.timer);
1077
+ }), ce(() => {
1078
+ i.value.forEach((n) => {
1079
+ clearTimeout(n.timer);
1080
1080
  });
1081
- }), (o, m) => (a(), j(be, { to: "body" }, [
1082
- w(Me, {
1081
+ }), (n, u) => (o(), I(be, { to: "body" }, [
1082
+ $(De, {
1083
1083
  name: "notification",
1084
1084
  tag: "div",
1085
1085
  class: "fixed top-4 right-4 z-50 space-y-2"
1086
1086
  }, {
1087
- default: Le(() => [
1088
- (a(!0), r(A, null, S(n.value, (v) => (a(), r("div", {
1087
+ default: Te(() => [
1088
+ (o(!0), a(V, null, A(i.value, (v) => (o(), a("div", {
1089
1089
  key: v.id,
1090
1090
  class: "bg-green-500 text-white px-4 py-3 rounded-lg shadow-lg flex items-center gap-3 min-w-64 max-w-sm"
1091
1091
  }, [
1092
- w(_(Se), { class: "h-5 w-5 text-green-100 flex-shrink-0" }),
1093
- m[0] || (m[0] = e("div", { class: "flex-1" }, [
1092
+ $(k(Oe), { class: "h-5 w-5 text-green-100 flex-shrink-0" }),
1093
+ u[0] || (u[0] = e("div", { class: "flex-1" }, [
1094
1094
  e("p", { class: "font-medium text-sm" }, "Ссылка скопирована!"),
1095
1095
  e("p", { class: "text-xs text-green-100 opacity-90" }, "Файл добавлен в буфер обмена")
1096
1096
  ], -1)),
1097
1097
  e("button", {
1098
- onClick: (g) => f(v.id),
1098
+ onClick: (g) => c(v.id),
1099
1099
  class: "text-green-100 hover:text-white transition-colors flex-shrink-0"
1100
1100
  }, [
1101
- w(_(X), { class: "h-4 w-4" })
1102
- ], 8, ps)
1101
+ $(k(Y), { class: "h-4 w-4" })
1102
+ ], 8, gs)
1103
1103
  ]))), 128))
1104
1104
  ]),
1105
1105
  _: 1
1106
1106
  })
1107
1107
  ]));
1108
1108
  }
1109
- }), P = (l, i) => {
1110
- const n = l.__vccOpts || l;
1111
- for (const [t, s] of i)
1112
- n[t] = s;
1113
- return n;
1114
- }, $e = /* @__PURE__ */ P(ms, [["__scopeId", "data-v-55903525"]]), gs = { class: "fixed inset-0 z-50 bg-black/80" }, hs = { class: "fixed bg-white left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg duration-200 sm:rounded-lg max-w-4xl max-h-[90vh] p-0" }, fs = { class: "flex flex-col space-y-1.5 text-center sm:text-left p-4 pb-2" }, vs = { class: "flex items-center justify-between" }, ys = { class: "flex items-center gap-2" }, bs = { class: "tracking-tight text-base font-medium" }, xs = { class: "p-4 pt-0" }, ks = { class: "flex flex-col items-center" }, _s = ["src", "alt"], ws = { class: "mt-3 flex items-center gap-4 text-sm text-gray-600" }, $s = { class: "mt-3 flex gap-2" }, Cs = /* @__PURE__ */ I({
1109
+ }), W = (r, l) => {
1110
+ const i = r.__vccOpts || r;
1111
+ for (const [t, s] of l)
1112
+ i[t] = s;
1113
+ return i;
1114
+ }, $e = /* @__PURE__ */ W(hs, [["__scopeId", "data-v-55903525"]]), fs = { class: "fixed inset-0 z-50 bg-black/80" }, vs = { class: "fixed bg-white left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg duration-200 sm:rounded-lg max-w-4xl max-h-[90vh] p-0" }, ys = { class: "flex flex-col space-y-1.5 text-center sm:text-left p-4 pb-2" }, bs = { class: "flex items-center justify-between" }, xs = { class: "flex items-center gap-2" }, ks = { class: "tracking-tight text-base font-medium" }, _s = { class: "p-4 pt-0" }, ws = { class: "flex flex-col items-center" }, $s = ["src", "alt"], Cs = { class: "mt-3 flex items-center gap-4 text-sm text-gray-600" }, Ms = { class: "mt-3 flex gap-2" }, Ls = /* @__PURE__ */ j({
1115
1115
  __name: "GalleryModal",
1116
1116
  props: {
1117
1117
  item: {}
1118
1118
  },
1119
1119
  emits: ["close"],
1120
- setup(l) {
1121
- const i = M(), n = (o) => new Date(o).toLocaleDateString("uk-UA", {
1120
+ setup(r) {
1121
+ const l = w(), i = (n) => new Date(n).toLocaleDateString("uk-UA", {
1122
1122
  day: "2-digit",
1123
1123
  month: "2-digit",
1124
1124
  year: "numeric"
1125
- }), t = (o) => o >= 1024 * 1024 * 1024 ? (o / (1024 * 1024 * 1024)).toFixed(2) + " GB" : o >= 1024 * 1024 ? (o / (1024 * 1024)).toFixed(2) + " MB" : o >= 1024 ? (o / 1024).toFixed(2) + " KB" : o + " B", s = (o) => {
1126
- navigator.clipboard.writeText(o), i.value?.addNotification();
1127
- }, f = async (o, m) => {
1125
+ }), t = (n) => n >= 1024 * 1024 * 1024 ? (n / (1024 * 1024 * 1024)).toFixed(2) + " GB" : n >= 1024 * 1024 ? (n / (1024 * 1024)).toFixed(2) + " MB" : n >= 1024 ? (n / 1024).toFixed(2) + " KB" : n + " B", s = (n) => {
1126
+ navigator.clipboard.writeText(n), l.value?.addNotification();
1127
+ }, c = async (n, u) => {
1128
1128
  try {
1129
- const g = await (await fetch(o)).blob(), d = window.URL.createObjectURL(g), y = document.createElement("a");
1130
- y.href = d, y.download = m, document.body.appendChild(y), y.click(), window.URL.revokeObjectURL(d), document.body.removeChild(y);
1129
+ const g = await (await fetch(n)).blob(), d = window.URL.createObjectURL(g), y = document.createElement("a");
1130
+ y.href = d, y.download = u, document.body.appendChild(y), y.click(), window.URL.revokeObjectURL(d), document.body.removeChild(y);
1131
1131
  } catch (v) {
1132
1132
  console.error("Download failed:", v), alert("Download failed. Please try opening the image in a new tab.");
1133
1133
  }
1134
1134
  };
1135
- return (o, m) => (a(), r("div", gs, [
1136
- e("div", hs, [
1137
- e("div", fs, [
1138
- e("div", vs, [
1139
- e("div", ys, [
1140
- e("h2", bs, k(o.item.name), 1)
1135
+ return (n, u) => (o(), a("div", fs, [
1136
+ e("div", vs, [
1137
+ e("div", ys, [
1138
+ e("div", bs, [
1139
+ e("div", xs, [
1140
+ e("h2", ks, b(n.item.name), 1)
1141
1141
  ])
1142
1142
  ])
1143
1143
  ]),
1144
- e("div", xs, [
1145
- e("div", ks, [
1144
+ e("div", _s, [
1145
+ e("div", ws, [
1146
1146
  e("img", {
1147
- src: o.item.path,
1148
- alt: o.item.name,
1147
+ src: n.item.path,
1148
+ alt: n.item.name,
1149
1149
  class: "max-w-full max-h-[60vh] object-contain rounded border"
1150
- }, null, 8, _s),
1151
- e("div", ws, [
1152
- e("span", null, "Size: " + k(t(o.item.size)), 1),
1153
- m[3] || (m[3] = e("span", null, "•", -1)),
1154
- e("span", null, "Date: " + k(n(o.item.createdAt)), 1)
1150
+ }, null, 8, $s),
1151
+ e("div", Cs, [
1152
+ e("span", null, "Size: " + b(t(n.item.size)), 1),
1153
+ u[3] || (u[3] = e("span", null, "•", -1)),
1154
+ e("span", null, "Date: " + b(i(n.item.createdAt)), 1)
1155
1155
  ]),
1156
- e("div", $s, [
1156
+ e("div", Ms, [
1157
1157
  e("button", {
1158
- onClick: m[0] || (m[0] = (v) => f(o.item.path, o.item.name)),
1158
+ onClick: u[0] || (u[0] = (v) => c(n.item.path, n.item.name)),
1159
1159
  class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border h-9 rounded-md px-3"
1160
1160
  }, [
1161
- w(_(ce), { class: "h-3 w-3 mr-1" }),
1162
- m[4] || (m[4] = H(" Download ", -1))
1161
+ $(k(ue), { class: "h-3 w-3 mr-1" }),
1162
+ u[4] || (u[4] = S(" Download ", -1))
1163
1163
  ]),
1164
1164
  e("button", {
1165
- onClick: m[1] || (m[1] = (v) => s(o.item.path)),
1165
+ onClick: u[1] || (u[1] = (v) => s(n.item.path)),
1166
1166
  class: "ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border h-9 rounded-md px-3"
1167
1167
  }, [
1168
- w(_(Ge), { class: "h-3 w-3 mr-1" }),
1169
- m[5] || (m[5] = H(" Share ", -1))
1168
+ $(k(Ke), { class: "h-3 w-3 mr-1" }),
1169
+ u[5] || (u[5] = S(" Share ", -1))
1170
1170
  ])
1171
1171
  ])
1172
1172
  ])
1173
1173
  ]),
1174
1174
  e("button", {
1175
1175
  type: "button",
1176
- onClick: m[2] || (m[2] = (v) => o.$emit("close")),
1176
+ onClick: u[2] || (u[2] = (v) => n.$emit("close")),
1177
1177
  class: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
1178
1178
  }, [
1179
- w(_(X), { class: "h-4 w-4" }),
1180
- m[6] || (m[6] = e("span", { class: "sr-only" }, "Close", -1))
1179
+ $(k(Y), { class: "h-4 w-4" }),
1180
+ u[6] || (u[6] = e("span", { class: "sr-only" }, "Close", -1))
1181
1181
  ])
1182
1182
  ]),
1183
- w($e, {
1183
+ $($e, {
1184
1184
  ref_key: "copyNotificationRef",
1185
- ref: i
1185
+ ref: l
1186
1186
  }, null, 512)
1187
1187
  ]));
1188
1188
  }
1189
- }), Ms = {
1189
+ }), Ds = {
1190
1190
  key: 0,
1191
1191
  class: "text-xl font-semibold text-gray-900 mb-4"
1192
- }, Ls = ["onClick"], Ds = ["src", "alt"], ie = /* @__PURE__ */ I({
1192
+ }, Ts = ["onClick"], Is = ["src", "alt"], le = /* @__PURE__ */ j({
1193
1193
  __name: "GalleryWidget",
1194
1194
  props: {
1195
1195
  title: {},
@@ -1200,91 +1200,91 @@ const Nt = { class: "space-y-0.5" }, Rt = ["onClick"], Ut = ["onClick"], Pt = {
1200
1200
  className: {},
1201
1201
  style: {}
1202
1202
  },
1203
- setup(l) {
1204
- const i = l, n = M(!1), t = M(null), s = M(), f = M(0);
1205
- let o = null;
1206
- const m = O(() => {
1207
- const d = i.columns || 4;
1208
- return f.value >= 1440 ? d : f.value >= 1024 ? Math.max(1, d - 1) : f.value >= 768 ? Math.max(1, d - 2) : f.value >= 640 ? Math.max(1, d - 3) : 1;
1203
+ setup(r) {
1204
+ const l = r, i = w(!1), t = w(null), s = w(), c = w(0);
1205
+ let n = null;
1206
+ const u = O(() => {
1207
+ const d = l.columns || 4;
1208
+ return c.value >= 1440 ? d : c.value >= 1024 ? Math.max(1, d - 1) : c.value >= 768 ? Math.max(1, d - 2) : c.value >= 640 ? Math.max(1, d - 3) : 1;
1209
1209
  }), v = () => {
1210
- s.value && (f.value = s.value.offsetWidth);
1210
+ s.value && (c.value = s.value.offsetWidth);
1211
1211
  };
1212
- re(() => {
1213
- De(() => {
1214
- s.value && (o = new ResizeObserver((d) => {
1212
+ Q(() => {
1213
+ Ie(() => {
1214
+ s.value && (n = new ResizeObserver((d) => {
1215
1215
  for (const y of d)
1216
- y.target === s.value && (f.value = y.contentRect.width);
1217
- }), o.observe(s.value), v());
1216
+ y.target === s.value && (c.value = y.contentRect.width);
1217
+ }), n.observe(s.value), v());
1218
1218
  });
1219
- }), de(() => {
1220
- o && o.disconnect();
1219
+ }), ce(() => {
1220
+ n && n.disconnect();
1221
1221
  });
1222
1222
  const g = (d) => {
1223
- t.value = d, n.value = !0;
1223
+ t.value = d, i.value = !0;
1224
1224
  };
1225
- return (d, y) => (a(), r("div", {
1225
+ return (d, y) => (o(), a("div", {
1226
1226
  class: "w-full mx-auto font-sans",
1227
1227
  ref_key: "containerRef",
1228
1228
  ref: s
1229
1229
  }, [
1230
- d.title ? (a(), r("h3", Ms, k(d.title), 1)) : $("", !0),
1230
+ d.title ? (o(), a("h3", Ds, b(d.title), 1)) : _("", !0),
1231
1231
  e("div", {
1232
1232
  class: D(d.maxHeight ? "overflow-y-auto" : ""),
1233
- style: R({ maxHeight: d.maxHeight + "px" })
1233
+ style: U({ maxHeight: d.maxHeight + "px" })
1234
1234
  }, [
1235
1235
  e("div", {
1236
- style: R({ columns: m.value + " auto", gap: "12px" }),
1236
+ style: U({ columns: u.value + " auto", gap: "12px" }),
1237
1237
  class: "space-y-3"
1238
1238
  }, [
1239
- (a(!0), r(A, null, S(d.items, (p) => (a(), r("div", {
1240
- key: p.id,
1241
- onClick: (b) => g(p),
1239
+ (o(!0), a(V, null, A(d.items, (h) => (o(), a("div", {
1240
+ key: h.id,
1241
+ onClick: (M) => g(h),
1242
1242
  class: "group relative break-inside-avoid bg-gray-200 rounded-lg overflow-hidden cursor-pointer hover:shadow-md transition-all mb-3"
1243
1243
  }, [
1244
1244
  e("img", {
1245
- src: p.path,
1246
- alt: p.name,
1245
+ src: h.path,
1246
+ alt: h.name,
1247
1247
  class: "w-full h-auto min-h-40 rounded-md object-contain"
1248
- }, null, 8, Ds),
1248
+ }, null, 8, Is),
1249
1249
  y[1] || (y[1] = e("div", { class: "absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent p-4 pt-12" }, [
1250
1250
  e("h3", { class: "text-white font-medium text-base leading-tight mb-1" }, "Mountain Landscape"),
1251
1251
  e("p", { class: "text-white/90 text-sm" }, "2.4 MB")
1252
1252
  ], -1)),
1253
1253
  y[2] || (y[2] = e("div", { class: "absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors duration-200" }, null, -1))
1254
- ], 8, Ls))), 128))
1254
+ ], 8, Ts))), 128))
1255
1255
  ], 4)
1256
1256
  ], 6),
1257
- (a(), j(be, { to: "body" }, [
1258
- n.value && t.value ? (a(), j(Cs, {
1257
+ (o(), I(be, { to: "body" }, [
1258
+ i.value && t.value ? (o(), I(Ls, {
1259
1259
  key: 0,
1260
1260
  item: t.value,
1261
- onClose: y[0] || (y[0] = (p) => n.value = !1)
1262
- }, null, 8, ["item"])) : $("", !0)
1261
+ onClose: y[0] || (y[0] = (h) => i.value = !1)
1262
+ }, null, 8, ["item"])) : _("", !0)
1263
1263
  ]))
1264
1264
  ], 512));
1265
1265
  }
1266
- }), Ts = { class: "text-value" }, Is = { class: "text-sm text-gray-900" }, zs = /* @__PURE__ */ I({
1266
+ }), js = { class: "text-value" }, zs = { class: "text-sm text-gray-900" }, Vs = /* @__PURE__ */ j({
1267
1267
  __name: "TextValue",
1268
1268
  props: {
1269
1269
  item: {}
1270
1270
  },
1271
- setup(l) {
1272
- const i = l, n = O(() => {
1273
- const t = i.item.value;
1271
+ setup(r) {
1272
+ const l = r, i = O(() => {
1273
+ const t = l.item.value;
1274
1274
  return typeof t == "boolean" ? t ? "Так" : "Ні" : t == null ? "—" : String(t);
1275
1275
  });
1276
- return (t, s) => (a(), r("div", Ts, [
1277
- e("span", Is, k(n.value), 1)
1276
+ return (t, s) => (o(), a("div", js, [
1277
+ e("span", zs, b(i.value), 1)
1278
1278
  ]));
1279
1279
  }
1280
- }), js = /* @__PURE__ */ P(zs, [["__scopeId", "data-v-c14550b7"]]), Vs = { class: "link-value" }, Fs = ["href"], Hs = /* @__PURE__ */ I({
1280
+ }), Fs = /* @__PURE__ */ W(Vs, [["__scopeId", "data-v-c14550b7"]]), Hs = { class: "link-value" }, As = ["href"], Ss = /* @__PURE__ */ j({
1281
1281
  __name: "LinkValue",
1282
1282
  props: {
1283
1283
  item: {}
1284
1284
  },
1285
- setup(l) {
1286
- const i = l, n = O(() => {
1287
- const t = String(i.item.value);
1285
+ setup(r) {
1286
+ const l = r, i = O(() => {
1287
+ const t = String(l.item.value);
1288
1288
  try {
1289
1289
  const s = new URL(t);
1290
1290
  return s.hostname + s.pathname;
@@ -1292,26 +1292,26 @@ const Nt = { class: "space-y-0.5" }, Rt = ["onClick"], Ut = ["onClick"], Pt = {
1292
1292
  return t;
1293
1293
  }
1294
1294
  });
1295
- return (t, s) => (a(), r("div", Vs, [
1295
+ return (t, s) => (o(), a("div", Hs, [
1296
1296
  e("a", {
1297
1297
  href: String(t.item.value),
1298
1298
  target: "_blank",
1299
1299
  rel: "noopener noreferrer",
1300
1300
  class: "text-blue-600 hover:text-blue-800 underline text-sm"
1301
1301
  }, [
1302
- H(k(n.value) + " ", 1),
1302
+ S(b(i.value) + " ", 1),
1303
1303
  s[0] || (s[0] = e("i", { class: "fas fa-external-link-alt ml-1 text-xs" }, null, -1))
1304
- ], 8, Fs)
1304
+ ], 8, As)
1305
1305
  ]));
1306
1306
  }
1307
- }), As = /* @__PURE__ */ P(Hs, [["__scopeId", "data-v-e6eb07a6"]]), Ss = { class: "date-value" }, Es = { class: "text-sm text-gray-900" }, Os = /* @__PURE__ */ I({
1307
+ }), Es = /* @__PURE__ */ W(Ss, [["__scopeId", "data-v-e6eb07a6"]]), Os = { class: "date-value" }, Bs = { class: "text-sm text-gray-900" }, Ns = /* @__PURE__ */ j({
1308
1308
  __name: "DateValue",
1309
1309
  props: {
1310
1310
  item: {}
1311
1311
  },
1312
- setup(l) {
1313
- const i = l, n = O(() => {
1314
- const t = i.item.value;
1312
+ setup(r) {
1313
+ const l = r, i = O(() => {
1314
+ const t = l.item.value;
1315
1315
  if (t instanceof Date)
1316
1316
  return t.toLocaleDateString("uk-UA", {
1317
1317
  year: "numeric",
@@ -1333,21 +1333,21 @@ const Nt = { class: "space-y-0.5" }, Rt = ["onClick"], Ut = ["onClick"], Pt = {
1333
1333
  }
1334
1334
  return String(t);
1335
1335
  });
1336
- return (t, s) => (a(), r("div", Ss, [
1337
- e("span", Es, k(n.value), 1)
1336
+ return (t, s) => (o(), a("div", Os, [
1337
+ e("span", Bs, b(i.value), 1)
1338
1338
  ]));
1339
1339
  }
1340
- }), Bs = /* @__PURE__ */ P(Os, [["__scopeId", "data-v-b9600618"]]), Ns = { class: "status-value" }, Rs = {
1340
+ }), Rs = /* @__PURE__ */ W(Ns, [["__scopeId", "data-v-b9600618"]]), Us = { class: "status-value" }, Ws = {
1341
1341
  key: 0,
1342
1342
  class: "mr-1"
1343
- }, Us = /* @__PURE__ */ I({
1343
+ }, Ps = /* @__PURE__ */ j({
1344
1344
  __name: "StatusValue",
1345
1345
  props: {
1346
1346
  item: {}
1347
1347
  },
1348
- setup(l) {
1349
- const i = l, n = O(() => {
1350
- switch (String(i.item.value).toLowerCase()) {
1348
+ setup(r) {
1349
+ const l = r, i = O(() => {
1350
+ switch (String(l.item.value).toLowerCase()) {
1351
1351
  case "active":
1352
1352
  case "активний":
1353
1353
  case "успішно":
@@ -1370,7 +1370,7 @@ const Nt = { class: "space-y-0.5" }, Rt = ["onClick"], Ut = ["onClick"], Pt = {
1370
1370
  return "bg-blue-100 text-blue-800";
1371
1371
  }
1372
1372
  }), t = O(() => {
1373
- switch (String(i.item.value).toLowerCase()) {
1373
+ switch (String(l.item.value).toLowerCase()) {
1374
1374
  case "active":
1375
1375
  case "активний":
1376
1376
  case "успішно":
@@ -1393,50 +1393,50 @@ const Nt = { class: "space-y-0.5" }, Rt = ["onClick"], Ut = ["onClick"], Pt = {
1393
1393
  return "fas fa-info-circle";
1394
1394
  }
1395
1395
  });
1396
- return (s, f) => (a(), r("div", Ns, [
1396
+ return (s, c) => (o(), a("div", Us, [
1397
1397
  e("span", {
1398
- class: D(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium", n.value])
1398
+ class: D(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium", i.value])
1399
1399
  }, [
1400
- t.value ? (a(), r("span", Rs, [
1400
+ t.value ? (o(), a("span", Ws, [
1401
1401
  e("i", {
1402
1402
  class: D(t.value)
1403
1403
  }, null, 2)
1404
- ])) : $("", !0),
1405
- H(" " + k(String(s.item.value)), 1)
1404
+ ])) : _("", !0),
1405
+ S(" " + b(String(s.item.value)), 1)
1406
1406
  ], 2)
1407
1407
  ]));
1408
1408
  }
1409
- }), Ps = /* @__PURE__ */ P(Us, [["__scopeId", "data-v-c72e0b01"]]), Ws = { class: "custom-value" }, Gs = { class: "text-sm text-gray-900" }, qs = /* @__PURE__ */ I({
1409
+ }), Gs = /* @__PURE__ */ W(Ps, [["__scopeId", "data-v-c72e0b01"]]), qs = { class: "custom-value" }, Ks = { class: "text-sm text-gray-900" }, Zs = /* @__PURE__ */ j({
1410
1410
  __name: "CustomValue",
1411
1411
  props: {
1412
1412
  item: {}
1413
1413
  },
1414
- setup(l) {
1415
- return (i, n) => (a(), r("div", Ws, [
1416
- G(i.$slots, "default", {
1417
- item: i.item,
1418
- value: i.item.value
1414
+ setup(r) {
1415
+ return (l, i) => (o(), a("div", qs, [
1416
+ G(l.$slots, "default", {
1417
+ item: l.item,
1418
+ value: l.item.value
1419
1419
  }, () => [
1420
- e("span", Gs, k(String(i.item.value)), 1)
1420
+ e("span", Ks, b(String(l.item.value)), 1)
1421
1421
  ], !0)
1422
1422
  ]));
1423
1423
  }
1424
- }), Ks = /* @__PURE__ */ P(qs, [["__scopeId", "data-v-11a73810"]]), Zs = ["id"], Js = {
1424
+ }), Js = /* @__PURE__ */ W(Zs, [["__scopeId", "data-v-11a73810"]]), Xs = ["id"], Qs = {
1425
1425
  key: 0,
1426
1426
  class: "text-xl font-semibold text-gray-900 mb-4"
1427
- }, Xs = {
1427
+ }, Ys = {
1428
1428
  key: 1,
1429
1429
  class: "overflow-x-auto"
1430
- }, Qs = { class: "min-w-full divide-y divide-gray-200" }, Ys = { class: "bg-white divide-y divide-gray-200" }, eo = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, to = { class: "flex items-center gap-2" }, so = ["title"], oo = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, no = {
1430
+ }, eo = { class: "min-w-full divide-y divide-gray-200" }, to = { class: "bg-white divide-y divide-gray-200" }, so = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, oo = { class: "flex items-center gap-2" }, no = ["title"], io = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, lo = {
1431
1431
  key: 2,
1432
1432
  class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"
1433
- }, io = { class: "flex items-start gap-3" }, ao = {
1433
+ }, ao = { class: "flex items-start gap-3" }, ro = {
1434
1434
  key: 0,
1435
1435
  class: "flex-shrink-0"
1436
- }, lo = { class: "flex-1 min-w-0" }, ro = { class: "flex items-center gap-2 mb-2" }, co = { class: "text-sm font-medium text-gray-900" }, uo = ["title"], po = {
1436
+ }, co = { class: "flex-1 min-w-0" }, uo = { class: "flex items-center gap-2 mb-2" }, po = { class: "text-sm font-medium text-gray-900" }, mo = ["title"], go = {
1437
1437
  key: 3,
1438
1438
  class: "overflow-x-auto"
1439
- }, mo = { class: "min-w-full divide-y divide-gray-200" }, go = { class: "bg-white divide-y divide-gray-200" }, ho = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, fo = { class: "flex items-center gap-2" }, vo = ["title"], yo = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, bo = /* @__PURE__ */ I({
1439
+ }, ho = { class: "min-w-full divide-y divide-gray-200" }, fo = { class: "bg-white divide-y divide-gray-200" }, vo = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, yo = { class: "flex items-center gap-2" }, bo = ["title"], xo = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, ko = /* @__PURE__ */ j({
1440
1440
  __name: "DescriptionListWidget",
1441
1441
  props: {
1442
1442
  title: {},
@@ -1446,113 +1446,113 @@ const Nt = { class: "space-y-0.5" }, Rt = ["onClick"], Ut = ["onClick"], Pt = {
1446
1446
  className: {},
1447
1447
  style: {}
1448
1448
  },
1449
- setup(l) {
1450
- const i = (n) => {
1451
- switch (n.type) {
1449
+ setup(r) {
1450
+ const l = (i) => {
1451
+ switch (i.type) {
1452
1452
  case "link":
1453
- return As;
1453
+ return Es;
1454
1454
  case "date":
1455
- return Bs;
1455
+ return Rs;
1456
1456
  case "status":
1457
- return Ps;
1457
+ return Gs;
1458
1458
  case "custom":
1459
- return Ks;
1459
+ return Js;
1460
1460
  default:
1461
- return js;
1461
+ return Fs;
1462
1462
  }
1463
1463
  };
1464
- return (n, t) => (a(), r("div", {
1465
- class: D(["description-list-widget", n.className]),
1466
- id: n.id,
1467
- style: R(n.style)
1464
+ return (i, t) => (o(), a("div", {
1465
+ class: D(["description-list-widget", i.className]),
1466
+ id: i.id,
1467
+ style: U(i.style)
1468
1468
  }, [
1469
- n.title ? (a(), r("h3", Js, k(n.title), 1)) : $("", !0),
1470
- n.view === "table" ? (a(), r("div", Xs, [
1471
- e("table", Qs, [
1472
- e("tbody", Ys, [
1473
- (a(!0), r(A, null, S(n.items, (s) => (a(), r("tr", {
1469
+ i.title ? (o(), a("h3", Qs, b(i.title), 1)) : _("", !0),
1470
+ i.view === "table" ? (o(), a("div", Ys, [
1471
+ e("table", eo, [
1472
+ e("tbody", to, [
1473
+ (o(!0), a(V, null, A(i.items, (s) => (o(), a("tr", {
1474
1474
  key: s.id || s.label
1475
1475
  }, [
1476
- e("td", eo, [
1477
- e("div", to, [
1478
- s.icon ? (a(), r("i", {
1476
+ e("td", so, [
1477
+ e("div", oo, [
1478
+ s.icon ? (o(), a("i", {
1479
1479
  key: 0,
1480
1480
  class: D([s.icon, "text-gray-500"])
1481
- }, null, 2)) : $("", !0),
1482
- H(" " + k(s.label) + " ", 1),
1483
- s.tooltip ? (a(), r("span", {
1481
+ }, null, 2)) : _("", !0),
1482
+ S(" " + b(s.label) + " ", 1),
1483
+ s.tooltip ? (o(), a("span", {
1484
1484
  key: 1,
1485
1485
  class: "text-gray-400 cursor-help",
1486
1486
  title: s.tooltip
1487
1487
  }, t[0] || (t[0] = [
1488
1488
  e("i", { class: "fas fa-info-circle text-xs" }, null, -1)
1489
- ]), 8, so)) : $("", !0)
1489
+ ]), 8, no)) : _("", !0)
1490
1490
  ])
1491
1491
  ]),
1492
- e("td", oo, [
1493
- (a(), j(N(i(s)), { item: s }, null, 8, ["item"]))
1492
+ e("td", io, [
1493
+ (o(), I(B(l(s)), { item: s }, null, 8, ["item"]))
1494
1494
  ])
1495
1495
  ]))), 128))
1496
1496
  ])
1497
1497
  ])
1498
- ])) : n.view === "grid" ? (a(), r("div", no, [
1499
- (a(!0), r(A, null, S(n.items, (s) => (a(), r("div", {
1498
+ ])) : i.view === "grid" ? (o(), a("div", lo, [
1499
+ (o(!0), a(V, null, A(i.items, (s) => (o(), a("div", {
1500
1500
  key: s.id || s.label,
1501
1501
  class: "description-item-card bg-white border border-gray-200 rounded-lg p-4"
1502
1502
  }, [
1503
- e("div", io, [
1504
- s.icon ? (a(), r("div", ao, [
1503
+ e("div", ao, [
1504
+ s.icon ? (o(), a("div", ro, [
1505
1505
  e("i", {
1506
1506
  class: D([s.icon, "text-gray-500 text-lg"])
1507
1507
  }, null, 2)
1508
- ])) : $("", !0),
1509
- e("div", lo, [
1510
- e("div", ro, [
1511
- e("h4", co, k(s.label), 1),
1512
- s.tooltip ? (a(), r("span", {
1508
+ ])) : _("", !0),
1509
+ e("div", co, [
1510
+ e("div", uo, [
1511
+ e("h4", po, b(s.label), 1),
1512
+ s.tooltip ? (o(), a("span", {
1513
1513
  key: 0,
1514
1514
  class: "text-gray-400 cursor-help",
1515
1515
  title: s.tooltip
1516
1516
  }, t[1] || (t[1] = [
1517
1517
  e("i", { class: "fas fa-info-circle text-xs" }, null, -1)
1518
- ]), 8, uo)) : $("", !0)
1518
+ ]), 8, mo)) : _("", !0)
1519
1519
  ]),
1520
- (a(), j(N(i(s)), { item: s }, null, 8, ["item"]))
1520
+ (o(), I(B(l(s)), { item: s }, null, 8, ["item"]))
1521
1521
  ])
1522
1522
  ])
1523
1523
  ]))), 128))
1524
- ])) : (a(), r("div", po, [
1525
- e("table", mo, [
1526
- e("tbody", go, [
1527
- (a(!0), r(A, null, S(n.items, (s) => (a(), r("tr", {
1524
+ ])) : (o(), a("div", go, [
1525
+ e("table", ho, [
1526
+ e("tbody", fo, [
1527
+ (o(!0), a(V, null, A(i.items, (s) => (o(), a("tr", {
1528
1528
  key: s.id || s.label
1529
1529
  }, [
1530
- e("td", ho, [
1531
- e("div", fo, [
1532
- s.icon ? (a(), r("i", {
1530
+ e("td", vo, [
1531
+ e("div", yo, [
1532
+ s.icon ? (o(), a("i", {
1533
1533
  key: 0,
1534
1534
  class: D([s.icon, "text-gray-500"])
1535
- }, null, 2)) : $("", !0),
1536
- H(" " + k(s.label) + " ", 1),
1537
- s.tooltip ? (a(), r("span", {
1535
+ }, null, 2)) : _("", !0),
1536
+ S(" " + b(s.label) + " ", 1),
1537
+ s.tooltip ? (o(), a("span", {
1538
1538
  key: 1,
1539
1539
  class: "text-gray-400 cursor-help",
1540
1540
  title: s.tooltip
1541
1541
  }, t[2] || (t[2] = [
1542
1542
  e("i", { class: "fas fa-info-circle text-xs" }, null, -1)
1543
- ]), 8, vo)) : $("", !0)
1543
+ ]), 8, bo)) : _("", !0)
1544
1544
  ])
1545
1545
  ]),
1546
- e("td", yo, [
1547
- (a(), j(N(i(s)), { item: s }, null, 8, ["item"]))
1546
+ e("td", xo, [
1547
+ (o(), I(B(l(s)), { item: s }, null, 8, ["item"]))
1548
1548
  ])
1549
1549
  ]))), 128))
1550
1550
  ])
1551
1551
  ])
1552
1552
  ]))
1553
- ], 14, Zs));
1553
+ ], 14, Xs));
1554
1554
  }
1555
- }), Ce = /* @__PURE__ */ P(bo, [["__scopeId", "data-v-36d43e50"]]), xo = {
1555
+ }), Ce = /* @__PURE__ */ W(ko, [["__scopeId", "data-v-36d43e50"]]), _o = {
1556
1556
  draw: {
1557
1557
  toolbar: {
1558
1558
  actions: {
@@ -1660,24 +1660,24 @@ const Nt = { class: "space-y-0.5" }, Rt = ["onClick"], Ut = ["onClick"], Pt = {
1660
1660
  }
1661
1661
  }
1662
1662
  };
1663
- function ko(l) {
1664
- return l ? l.type === "FeatureCollection" || l.type === "Feature" ? l : l.geom ? {
1663
+ function wo(r) {
1664
+ return r ? r.type === "FeatureCollection" || r.type === "Feature" ? r : r.geom ? {
1665
1665
  type: "Feature",
1666
1666
  geometry: {
1667
- type: l.geom.type,
1668
- coordinates: l.geom.coordinates
1667
+ type: r.geom.type,
1668
+ coordinates: r.geom.coordinates
1669
1669
  },
1670
1670
  properties: {}
1671
- } : l.type && l.coordinates ? {
1671
+ } : r.type && r.coordinates ? {
1672
1672
  type: "Feature",
1673
- geometry: l,
1673
+ geometry: r,
1674
1674
  properties: {}
1675
1675
  } : null : null;
1676
1676
  }
1677
- const _o = { class: "relative min-h-[300px] pb-[3.25rem]" }, wo = {
1677
+ const $o = { class: "relative min-h-[300px] h-full pb-[3.25rem]" }, Co = {
1678
1678
  key: 1,
1679
1679
  class: "bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer"
1680
- }, $o = { class: "flex items-center justify-between p-2 border-b" }, Co = { class: "p-2 border-b" }, Mo = { class: "flex items-center" }, Lo = { class: "flex items-center" }, Do = { class: "flex items-center" }, To = { class: "p-2" }, Io = { class: "flex items-center" }, ae = /* @__PURE__ */ I({
1680
+ }, Mo = { class: "flex items-center justify-between p-2 border-b" }, Lo = { class: "p-2 border-b" }, Do = { class: "flex items-center" }, To = { class: "flex items-center" }, Io = { class: "flex items-center" }, jo = { class: "p-2" }, zo = { class: "flex items-center" }, ae = /* @__PURE__ */ j({
1681
1681
  __name: "MapWidget",
1682
1682
  props: {
1683
1683
  geom: {},
@@ -1685,10 +1685,10 @@ const _o = { class: "relative min-h-[300px] pb-[3.25rem]" }, wo = {
1685
1685
  className: {},
1686
1686
  style: {}
1687
1687
  },
1688
- setup(l) {
1689
- const i = l, n = M(null);
1688
+ setup(r) {
1689
+ const l = r, i = w(null);
1690
1690
  let t, s;
1691
- const f = {
1691
+ const c = {
1692
1692
  topo100: {
1693
1693
  url: "https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"
1694
1694
  },
@@ -1698,69 +1698,69 @@ const _o = { class: "relative min-h-[300px] pb-[3.25rem]" }, wo = {
1698
1698
  osmb: {
1699
1699
  url: "https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png"
1700
1700
  }
1701
- }, o = M("topo100");
1702
- let m;
1703
- const v = M(!0), g = M(!1);
1701
+ }, n = w("topo100");
1702
+ let u;
1703
+ const v = w(!0), g = w(!1);
1704
1704
  function d() {
1705
- return new Promise((V, c) => {
1706
- if (window.L && window.L.Draw) return V(0);
1707
- const h = (C) => {
1705
+ return new Promise((F, p) => {
1706
+ if (window.L && window.L.Draw) return F(0);
1707
+ const f = (C) => {
1708
1708
  if (Array.from(document.styleSheets).some((E) => E?.href?.includes(C))) return;
1709
- const u = document.createElement("link");
1710
- u.rel = "stylesheet", u.href = C, document.head.appendChild(u);
1711
- }, F = (C) => new Promise((x, u) => {
1709
+ const m = document.createElement("link");
1710
+ m.rel = "stylesheet", m.href = C, document.head.appendChild(m);
1711
+ }, H = (C) => new Promise((x, m) => {
1712
1712
  const E = Array.from(document.scripts).find((z) => z.src === C);
1713
1713
  if (E) {
1714
- E.addEventListener("load", () => x()), E.addEventListener("error", (z) => u(z));
1714
+ E.addEventListener("load", () => x()), E.addEventListener("error", (z) => m(z));
1715
1715
  return;
1716
1716
  }
1717
- const B = document.createElement("script");
1718
- B.src = C, B.async = !0, B.onload = () => x(), B.onerror = (z) => u(z), document.body.appendChild(B);
1717
+ const N = document.createElement("script");
1718
+ N.src = C, N.async = !0, N.onload = () => x(), N.onerror = (z) => m(z), document.body.appendChild(N);
1719
1719
  });
1720
- h("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), h("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), F("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => F("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => V(0)).catch(c);
1720
+ f("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), f("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), H("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => H("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => F(0)).catch(p);
1721
1721
  });
1722
1722
  }
1723
- re(async () => {
1724
- await d(), L.drawLocal = xo, t = L.map(n.value, { zoomControl: !1 }).setView([50, 30], 10), L.control.zoom({ position: "bottomright" }).addTo(t), m = L.tileLayer(f.topo100.url, { maxZoom: 19 }).addTo(t), o.value = "topo100", s = new L.FeatureGroup().addTo(t);
1725
- const V = ko(i.geom);
1726
- if (V) {
1727
- const c = [];
1728
- L.geoJSON(V).eachLayer((h) => c.push(h)), c.length && s.addLayer(c[0]), s.toGeoJSON(), y();
1723
+ Q(async () => {
1724
+ await d(), L.drawLocal = _o, t = L.map(i.value, { zoomControl: !1 }).setView([50, 30], 10), L.control.zoom({ position: "bottomright" }).addTo(t), u = L.tileLayer(c.topo100.url, { maxZoom: 19 }).addTo(t), n.value = "topo100", s = new L.FeatureGroup().addTo(t);
1725
+ const F = wo(l.geom);
1726
+ if (F) {
1727
+ const p = [];
1728
+ L.geoJSON(F).eachLayer((f) => p.push(f)), p.length && s.addLayer(p[0]), s.toGeoJSON(), y();
1729
1729
  }
1730
1730
  });
1731
- function y(V = 30) {
1732
- const c = s.getLayers();
1733
- if (!c.length) return;
1734
- const F = L.featureGroup(c).getBounds();
1735
- F && F.isValid() && t.fitBounds(F, { padding: [V, V] });
1731
+ function y(F = 30) {
1732
+ const p = s.getLayers();
1733
+ if (!p.length) return;
1734
+ const H = L.featureGroup(p).getBounds();
1735
+ H && H.isValid() && t.fitBounds(H, { padding: [F, F] });
1736
1736
  }
1737
- function p(V) {
1738
- m && m.removeFrom(t);
1739
- const c = f[V];
1740
- m = L.tileLayer(c.url, c.options || {}).addTo(t), o.value = V;
1737
+ function h(F) {
1738
+ u && u.removeFrom(t);
1739
+ const p = c[F];
1740
+ u = L.tileLayer(p.url, p.options || {}).addTo(t), n.value = F;
1741
1741
  }
1742
- function b() {
1743
- p(o.value);
1742
+ function M() {
1743
+ h(n.value);
1744
1744
  }
1745
- function W() {
1745
+ function P() {
1746
1746
  s && (v.value ? s.addTo(t) : s.removeFrom(t));
1747
1747
  }
1748
- return (V, c) => (a(), r("div", _o, [
1748
+ return (F, p) => (o(), a("div", $o, [
1749
1749
  e("div", {
1750
1750
  ref_key: "mapContainer",
1751
- ref: n,
1752
- class: "w-full h-full"
1751
+ ref: i,
1752
+ class: "w-full h-full min-h-[300px]"
1753
1753
  }, null, 512),
1754
- g.value ? $("", !0) : (a(), r("div", {
1754
+ g.value ? _("", !0) : (o(), a("div", {
1755
1755
  key: 0,
1756
- onClick: c[0] || (c[0] = (h) => g.value = !0),
1756
+ onClick: p[0] || (p[0] = (f) => g.value = !0),
1757
1757
  class: "z-[500] bg-white absolute top-[10px] right-[10px] p-2 border rounded-lg cursor-pointer"
1758
1758
  }, " Шари ")),
1759
- g.value ? (a(), r("div", wo, [
1760
- e("div", $o, [
1761
- c[7] || (c[7] = e("div", null, "Шари", -1)),
1762
- (a(), r("svg", {
1763
- onClick: c[1] || (c[1] = (h) => g.value = !1),
1759
+ g.value ? (o(), a("div", Co, [
1760
+ e("div", Mo, [
1761
+ p[7] || (p[7] = e("div", null, "Шари", -1)),
1762
+ (o(), a("svg", {
1763
+ onClick: p[1] || (p[1] = (f) => g.value = !1),
1764
1764
  xmlns: "http://www.w3.org/2000/svg",
1765
1765
  viewBox: "0 0 24 24",
1766
1766
  fill: "none",
@@ -1769,7 +1769,7 @@ const _o = { class: "relative min-h-[300px] pb-[3.25rem]" }, wo = {
1769
1769
  "stroke-linecap": "round",
1770
1770
  "stroke-linejoin": "round",
1771
1771
  class: "icon icon-tabler icons-tabler-outline icon-tabler-x w-4 h-4"
1772
- }, c[6] || (c[6] = [
1772
+ }, p[6] || (p[6] = [
1773
1773
  e("path", {
1774
1774
  stroke: "none",
1775
1775
  d: "M0 0h24v24H0z",
@@ -1779,82 +1779,170 @@ const _o = { class: "relative min-h-[300px] pb-[3.25rem]" }, wo = {
1779
1779
  e("path", { d: "M6 6l12 12" }, null, -1)
1780
1780
  ])))
1781
1781
  ]),
1782
- e("div", Co, [
1782
+ e("div", Lo, [
1783
1783
  e("div", null, [
1784
- e("label", Mo, [
1785
- U(e("input", {
1784
+ e("label", Do, [
1785
+ R(e("input", {
1786
1786
  type: "radio",
1787
1787
  name: "base-layer",
1788
1788
  value: "topo100",
1789
- "onUpdate:modelValue": c[2] || (c[2] = (h) => o.value = h),
1790
- onChange: b
1789
+ "onUpdate:modelValue": p[2] || (p[2] = (f) => n.value = f),
1790
+ onChange: M
1791
1791
  }, null, 544), [
1792
- [Q, o.value]
1792
+ [ee, n.value]
1793
1793
  ]),
1794
- c[8] || (c[8] = e("span", { class: "ml-2" }, "Карта України", -1))
1794
+ p[8] || (p[8] = e("span", { class: "ml-2" }, "Карта України", -1))
1795
1795
  ])
1796
1796
  ]),
1797
1797
  e("div", null, [
1798
- e("label", Lo, [
1799
- U(e("input", {
1798
+ e("label", To, [
1799
+ R(e("input", {
1800
1800
  type: "radio",
1801
1801
  name: "base-layer",
1802
1802
  value: "orto10",
1803
- "onUpdate:modelValue": c[3] || (c[3] = (h) => o.value = h),
1804
- onChange: b
1803
+ "onUpdate:modelValue": p[3] || (p[3] = (f) => n.value = f),
1804
+ onChange: M
1805
1805
  }, null, 544), [
1806
- [Q, o.value]
1806
+ [ee, n.value]
1807
1807
  ]),
1808
- c[9] || (c[9] = e("span", { class: "ml-2" }, "Ortophoto 1:10К", -1))
1808
+ p[9] || (p[9] = e("span", { class: "ml-2" }, "Ortophoto 1:10К", -1))
1809
1809
  ])
1810
1810
  ]),
1811
1811
  e("div", null, [
1812
- e("label", Do, [
1813
- U(e("input", {
1812
+ e("label", Io, [
1813
+ R(e("input", {
1814
1814
  type: "radio",
1815
1815
  name: "base-layer",
1816
1816
  value: "osmb",
1817
- "onUpdate:modelValue": c[4] || (c[4] = (h) => o.value = h),
1818
- onChange: b
1817
+ "onUpdate:modelValue": p[4] || (p[4] = (f) => n.value = f),
1818
+ onChange: M
1819
1819
  }, null, 544), [
1820
- [Q, o.value]
1820
+ [ee, n.value]
1821
1821
  ]),
1822
- c[10] || (c[10] = e("span", { class: "ml-2" }, "Open Street Map", -1))
1822
+ p[10] || (p[10] = e("span", { class: "ml-2" }, "Open Street Map", -1))
1823
1823
  ])
1824
1824
  ])
1825
1825
  ]),
1826
- e("div", To, [
1827
- e("label", Io, [
1828
- U(e("input", {
1826
+ e("div", jo, [
1827
+ e("label", zo, [
1828
+ R(e("input", {
1829
1829
  type: "checkbox",
1830
- "onUpdate:modelValue": c[5] || (c[5] = (h) => v.value = h),
1831
- onChange: W
1830
+ "onUpdate:modelValue": p[5] || (p[5] = (f) => v.value = f),
1831
+ onChange: P
1832
1832
  }, null, 544), [
1833
- [Te, v.value]
1833
+ [je, v.value]
1834
1834
  ]),
1835
- c[11] || (c[11] = e("span", { class: "ml-2" }, " Показати геометрію ", -1))
1835
+ p[11] || (p[11] = e("span", { class: "ml-2" }, " Показати геометрію ", -1))
1836
1836
  ])
1837
1837
  ])
1838
- ])) : $("", !0)
1838
+ ])) : _("", !0)
1839
1839
  ]));
1840
1840
  }
1841
- }), zo = {
1841
+ }), Vo = /* @__PURE__ */ j({
1842
+ __name: "table",
1843
+ props: {
1844
+ name: {},
1845
+ label: {},
1846
+ component: {},
1847
+ slot: {},
1848
+ col: {},
1849
+ width: {},
1850
+ html: {},
1851
+ title: {},
1852
+ type: {},
1853
+ token: {},
1854
+ count: {},
1855
+ items: {}
1856
+ },
1857
+ setup(r) {
1858
+ const l = w([]), i = w([]), t = r;
1859
+ return Q(async () => {
1860
+ const s = await fetch("/api/data/" + t.token).then((c) => c.json());
1861
+ l.value = s.rows, i.value = s.columns;
1862
+ }), (s, c) => b(t) + " " + b(i.value) + " " + b(l.value);
1863
+ }
1864
+ }), Me = {
1842
1865
  "vs-widget-map": ae,
1843
- "vs-widget-comments": se,
1844
- "vs-widget-history": oe,
1845
- "vs-widget-gallery": ie,
1846
- "vs-widget-file": ne,
1847
- "vs-widget-list": Ce
1848
- }, jo = {
1866
+ "vs-widget-comments": oe,
1867
+ "vs-widget-history": ne,
1868
+ "vs-widget-gallery": le,
1869
+ "vs-widget-file": ie,
1870
+ "vs-widget-list": Ce,
1871
+ "vs-widget-table": Vo
1872
+ }, Fo = {
1849
1873
  key: 0,
1850
- class: "overflow-hidden"
1851
- }, Vo = { class: "flex border-b border-gray-200 bg-gray-50" }, Fo = ["onClick"], Ho = { class: "p-1" }, Ao = ["innerHTML"], So = {
1852
- key: 1,
1853
- class: "p-1"
1854
- }, Eo = { class: "grid grid-cols-12 gap-4" }, Oo = {
1874
+ class: "mb-4 pb-2 border-b border-gray-200"
1875
+ }, Ho = { class: "text-lg font-semibold text-gray-900" }, Ao = ["innerHTML"], So = {
1855
1876
  key: 0,
1856
1877
  class: "mb-4 pb-2 border-b border-gray-200"
1857
- }, Bo = { class: "text-lg font-semibold text-gray-900" }, No = ["innerHTML"], ve = /* @__PURE__ */ I({
1878
+ }, Eo = { class: "text-lg font-semibold text-gray-900" }, Oo = ["innerHTML"], Le = /* @__PURE__ */ j({
1879
+ __name: "CardItem",
1880
+ props: {
1881
+ items: {},
1882
+ type: {},
1883
+ col: {},
1884
+ data: {},
1885
+ html: {},
1886
+ title: {},
1887
+ name: {},
1888
+ label: {},
1889
+ component: {},
1890
+ slot: {},
1891
+ id: {},
1892
+ className: {},
1893
+ style: {}
1894
+ },
1895
+ setup(r) {
1896
+ const l = r, i = O(() => l.col ? {
1897
+ [`lg:col-span-${l.col}`]: !0
1898
+ } : {});
1899
+ function t(c) {
1900
+ return Me[c] || c;
1901
+ }
1902
+ const s = O(() => {
1903
+ const c = {};
1904
+ return c.col && (c.col = c.col), c;
1905
+ });
1906
+ return (c, n) => (o(), a("div", {
1907
+ class: D(["w-full bg-gray-50 rounded-lg p-4 col-span-12", i.value])
1908
+ }, [
1909
+ c.title ? (o(), a("div", Fo, [
1910
+ e("h3", Ho, b(c.title), 1)
1911
+ ])) : _("", !0),
1912
+ c.html ? (o(), a("div", {
1913
+ key: 1,
1914
+ innerHTML: c.html,
1915
+ class: "text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"
1916
+ }, null, 8, Ao)) : c.type?.includes("tabs") ? (o(), I(re, {
1917
+ key: 2,
1918
+ view: "tab",
1919
+ panels: c.items,
1920
+ data: c.data
1921
+ }, null, 8, ["panels", "data"])) : (o(!0), a(V, { key: 3 }, A(c.items, (u) => (o(), a(V, null, [
1922
+ u.title || u.label ? (o(), a("div", So, [
1923
+ e("h3", Eo, b(u.title || u.label), 1)
1924
+ ])) : _("", !0),
1925
+ u.html ? (o(), a("div", {
1926
+ key: 1,
1927
+ innerHTML: u.html,
1928
+ class: "text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"
1929
+ }, null, 8, Oo)) : u.component ? (o(), I(B(t(u.component)), Z({
1930
+ key: 2,
1931
+ ref_for: !0
1932
+ }, { ...s.value, ...c.data }, { class: "w-full" }), null, 16)) : G(c.$slots, "default", { key: 3 })
1933
+ ], 64))), 256))
1934
+ ], 2));
1935
+ }
1936
+ }), Bo = { class: "md:flex gap-[20px]" }, No = {
1937
+ key: 0,
1938
+ class: "col-span-4"
1939
+ }, Ro = ["innerHTML"], Uo = {
1940
+ key: 1,
1941
+ class: "overflow-hidden w-full"
1942
+ }, Wo = { class: "flex border-b border-gray-200 bg-gray-50" }, Po = ["onClick"], Go = { class: "p-1" }, qo = ["innerHTML"], Ko = {
1943
+ key: 2,
1944
+ class: "p-1 w-full"
1945
+ }, Zo = { class: "grid grid-cols-12 gap-4" }, re = /* @__PURE__ */ j({
1858
1946
  __name: "Card",
1859
1947
  props: {
1860
1948
  panels: { default: () => [] },
@@ -1862,161 +1950,131 @@ const _o = { class: "relative min-h-[300px] pb-[3.25rem]" }, wo = {
1862
1950
  view: { default: "plain" },
1863
1951
  classWrapper: { default: "" },
1864
1952
  classPanel: {},
1865
- normalizeTabs: { type: Boolean, default: !1 },
1953
+ normalizeTabs: { type: Boolean, default: !0 },
1866
1954
  id: {},
1867
1955
  className: {},
1868
1956
  style: {}
1869
1957
  },
1870
- setup(l) {
1871
- const i = l, n = M(0);
1872
- function t(d) {
1873
- return zo[d] || d;
1874
- }
1958
+ setup(r) {
1959
+ const l = r, i = w(0), t = w([]);
1875
1960
  function s(d) {
1876
- const y = [];
1877
- for (const p of d) {
1878
- if (!p?.items) {
1879
- y.push(p);
1880
- continue;
1881
- }
1882
- if (p.items.length === 1) {
1883
- let b = p.items[0];
1884
- delete p.items, b = { ...p, ...b }, y.push(b);
1885
- } else {
1886
- const b = p;
1887
- b.component = "Card", p.type && (b.view = p.type.includes("tab") ? "tab" : "plain"), b.panels = p.items, b.data = i.data, b.normalizeTabs = !1, y.push(b);
1888
- }
1889
- }
1890
- return y;
1961
+ return Me[d] || d;
1962
+ }
1963
+ function c(d) {
1964
+ return t.value = d.filter((y) => y.type === "pin"), d.filter((y) => y.type !== "pin");
1891
1965
  }
1892
- const f = O(() => i.panels && i.panels.length > 0 ? i.normalizeTabs ? s(i.panels) : i.panels : i.data && Array.isArray(i.data) ? i.data.filter((y) => y.type === "tabs")[0]?.items || [] : []), o = O(() => i.panels && i.panels.length > 0 ? i.normalizeTabs ? s(i.panels) : i.panels : i.data && Array.isArray(i.data) ? i.data : []), m = O(() => ({
1893
- [`view-${i.view}`]: !0
1894
- })), v = (d) => {
1895
- const y = i.data ? { ...i.data } : {};
1896
- return d.count && (y.count = d.count), d.col && (y.col = d.col), y;
1897
- }, g = (d) => d.width ? {
1898
- gridColumn: `span ${d.width}`
1899
- } : {};
1900
- return (d, y) => (a(), r("div", {
1901
- class: D(m.value + d.classWrapper)
1966
+ const n = O(() => l.panels && l.panels.length > 0 ? l.normalizeTabs ? c(l.panels) : l.panels : l.data && Array.isArray(l.data) ? l.data.filter((y) => y.type === "tabs")[0]?.items || [] : []), u = O(() => l.panels && l.panels.length > 0 ? l.normalizeTabs ? c(l.panels) : l.panels : l.data && Array.isArray(l.data) ? l.data : []), v = O(() => ({
1967
+ [`view-${l.view}`]: !0
1968
+ })), g = (d) => {
1969
+ const y = {};
1970
+ return d.count && (y.count = d.count), d.col && (y.col = d.col), d.html && (y.html = d.html), d.title && (y.title = d.title), d.type && (y.type = d.type), d.token && (y.token = d.token), l.data && (y.data = l.data), y;
1971
+ };
1972
+ return (d, y) => (o(), a("div", {
1973
+ class: D(d.classWrapper || v.value)
1902
1974
  }, [
1903
- d.view === "tab" ? (a(), r("div", jo, [
1904
- e("div", Vo, [
1905
- (a(!0), r(A, null, S(f.value, (p, b) => (a(), r("button", {
1906
- key: p.name || b,
1907
- onClick: (W) => n.value = b,
1908
- class: D([
1909
- "px-4 py-3 text-sm font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-100 transition-colors",
1910
- { "text-blue-600 bg-white border-b-2 border-blue-600": n.value === b }
1911
- ])
1912
- }, k(p.title || p.label || p.name || `Tab ${b + 1}`), 11, Fo))), 128))
1913
- ]),
1914
- e("div", Ho, [
1915
- (a(!0), r(A, null, S(f.value, (p, b) => U((a(), r("div", {
1916
- key: p.name || b,
1917
- class: D([
1918
- d.classPanel || "w-full border-gray-100",
1919
- `col-span-${p.col || 12}`
1920
- ])
1975
+ e("div", Bo, [
1976
+ t.value.length !== 0 ? (o(), a("div", No, [
1977
+ (o(!0), a(V, null, A(t.value[0].items, (h, M) => (o(), a("div", {
1978
+ key: h.name || M,
1979
+ class: "w-full bg-gray-50 rounded-lg p-4 col-span-12 w-full m-1 mb-3"
1921
1980
  }, [
1922
- p.html ? (a(), r("div", {
1981
+ h.html ? (o(), a("div", {
1923
1982
  key: 0,
1924
- innerHTML: p.html,
1925
- class: "text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"
1926
- }, null, 8, Ao)) : d.$slots[`tab-${b}`] ? G(d.$slots, `tab-${b}`, {
1927
- key: 1,
1928
- item: p,
1929
- data: d.data
1930
- }) : p.component ? (a(), j(N(p.component), te({
1931
- key: 2,
1932
- ref_for: !0
1933
- }, p.component === "Card" ? p : v(p), { class: "w-full h-full" }), null, 16)) : G(d.$slots, p.slot || `tab-${b}`, {
1934
- key: 3,
1935
- item: p,
1936
- data: d.data
1937
- })
1938
- ], 2)), [
1939
- [Ie, n.value === b]
1940
- ])), 128))
1941
- ])
1942
- ])) : (a(), r("div", So, [
1943
- e("div", Eo, [
1944
- (a(!0), r(A, null, S(o.value, (p, b) => (a(), r("div", {
1945
- key: p.name || b,
1946
- class: D([
1947
- d.classPanel || "bg-gray-50 rounded-lg p-4 border-gray-100",
1948
- `col-span-${p.col || 12}`
1949
- ]),
1950
- style: R(g(p))
1951
- }, [
1952
- p.title || p.label ? (a(), r("div", Oo, [
1953
- e("h3", Bo, k(p.title || p.label), 1)
1954
- ])) : $("", !0),
1955
- p.html ? (a(), r("div", {
1983
+ innerHTML: h.html,
1984
+ class: "text-gray-900 leading-relaxed"
1985
+ }, null, 8, Ro)) : h.component ? (o(), I(B(s(h.component)), Z({
1956
1986
  key: 1,
1957
- innerHTML: p.html,
1958
- class: "text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"
1959
- }, null, 8, No)) : d.$slots[`panel-${b}`] ? G(d.$slots, `panel-${b}`, {
1960
- key: 2,
1961
- item: p,
1962
- data: d.data
1963
- }) : p.component ? (a(), j(N(t(p.component)), te({
1964
- key: 3,
1965
1987
  ref_for: !0
1966
- }, p.component === "Card" ? p : v(p), { class: "w-full h-full" }), null, 16)) : G(d.$slots, p.slot || `panel-${b}`, {
1967
- key: 4,
1968
- item: p,
1969
- data: d.data
1970
- })
1971
- ], 6))), 128))
1972
- ])
1973
- ]))
1974
- ], 2));
1975
- }
1976
- }), Ro = ["innerHTML"], Uo = /* @__PURE__ */ I({
1977
- __name: "CardItem",
1978
- props: {
1979
- name: {},
1980
- label: {},
1981
- component: {},
1982
- slot: {},
1983
- col: { default: 12 },
1984
- html: {},
1985
- title: {},
1986
- id: {},
1987
- className: {},
1988
- style: {}
1989
- },
1990
- setup(l) {
1991
- const i = l, n = O(() => ({
1992
- [`col-span-${i.col}`]: !0
1993
- })), t = O(() => {
1994
- const s = {};
1995
- return s.col && (s.col = s.col), s;
1996
- });
1997
- return (s, f) => (a(), r("div", {
1998
- class: D(["w-full", n.value])
1999
- }, [
2000
- s.html ? (a(), r("div", {
2001
- key: 0,
2002
- innerHTML: s.html,
2003
- class: "text-gray-900 leading-relaxed [&>h1]:font-semibold [&>h1]:text-gray-900 [&>h1]:mb-2 [&>h2]:font-semibold [&>h2]:text-gray-900 [&>h2]:mb-2 [&>h3]:font-semibold [&>h3]:text-gray-900 [&>h3]:mb-2 [&>h4]:font-semibold [&>h4]:text-gray-900 [&>h4]:mb-2 [&>h5]:font-semibold [&>h5]:text-gray-900 [&>h5]:mb-2 [&>h6]:font-semibold [&>h6]:text-gray-900 [&>h6]:mb-2 [&>p]:mb-3 [&>ul]:mb-3 [&>ul]:pl-5 [&>ol]:mb-3 [&>ol]:pl-5 [&>li]:mb-1"
2004
- }, null, 8, Ro)) : s.component ? (a(), j(N(s.component), te({ key: 1 }, t.value, { class: "w-full" }), null, 16)) : G(s.$slots, "default", { key: 2 })
1988
+ }, h.component === "Card" ? h : g(h), {
1989
+ id: d.data.id,
1990
+ class: "w-full h-full"
1991
+ }), null, 16, ["id"])) : _("", !0)
1992
+ ]))), 128))
1993
+ ])) : _("", !0),
1994
+ d.view === "tab" ? (o(), a("div", Uo, [
1995
+ e("div", Wo, [
1996
+ (o(!0), a(V, null, A(n.value, (h, M) => (o(), a("button", {
1997
+ key: h.name || M,
1998
+ onClick: (P) => i.value = M,
1999
+ class: D([
2000
+ "px-4 py-3 text-sm font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-100 transition-colors",
2001
+ { "text-blue-600 bg-white border-b-2 border-blue-600": i.value === M }
2002
+ ])
2003
+ }, b(h.title || h.label || h.name || `Tab ${M + 1}`), 11, Po))), 128))
2004
+ ]),
2005
+ e("div", Go, [
2006
+ (o(!0), a(V, null, A(n.value, (h, M) => R((o(), a("div", {
2007
+ key: h.name || M,
2008
+ class: D([
2009
+ d.classPanel || "w-full border-gray-100 py-2",
2010
+ `col-span-${h.col || 12}`
2011
+ ])
2012
+ }, [
2013
+ h.html ? (o(), a("div", {
2014
+ key: 0,
2015
+ innerHTML: h.html,
2016
+ class: "text-gray-900 leading-relaxed"
2017
+ }, null, 8, qo)) : d.$slots[`tab-${M}`] ? G(d.$slots, `tab-${M}`, {
2018
+ key: 1,
2019
+ item: h,
2020
+ data: d.data
2021
+ }) : h.component || h.name ? (o(), I(B(s(h.component || h.name)), Z({
2022
+ key: 2,
2023
+ ref_for: !0
2024
+ }, h.component === "Card" ? h : g(h), {
2025
+ id: d.data.id,
2026
+ class: "w-full h-full"
2027
+ }), null, 16, ["id"])) : G(d.$slots, h.slot || `tab-${M}`, {
2028
+ key: 3,
2029
+ item: h,
2030
+ data: d.data
2031
+ })
2032
+ ], 2)), [
2033
+ [ze, i.value === M]
2034
+ ])), 128))
2035
+ ])
2036
+ ])) : (o(), a("div", Ko, [
2037
+ e("div", Zo, [
2038
+ (o(!0), a(V, null, A(u.value, (h, M) => (o(), a(V, {
2039
+ key: h.name || M
2040
+ }, [
2041
+ d.$slots[`panel-${M}`] ? G(d.$slots, `panel-${M}`, {
2042
+ key: 0,
2043
+ item: h,
2044
+ data: d.data
2045
+ }) : h.items || h.html ? (o(), I(B(Le), Z({
2046
+ key: 1,
2047
+ ref_for: !0
2048
+ }, g(h), {
2049
+ items: h.items,
2050
+ class: "w-full h-full"
2051
+ }), null, 16, ["items"])) : h.component ? (o(), I(B(s(h.component)), Z({
2052
+ key: 2,
2053
+ ref_for: !0
2054
+ }, g(h), { class: "w-full h-full" }), null, 16)) : G(d.$slots, h.slot || `panel-${M}`, {
2055
+ key: 3,
2056
+ item: h,
2057
+ data: d.data
2058
+ })
2059
+ ], 64))), 128))
2060
+ ])
2061
+ ]))
2062
+ ])
2005
2063
  ], 2));
2006
2064
  }
2007
2065
  });
2008
- ve.install = function(l) {
2009
- l.component("vs-widget-file", ne), l.component("vs-widget-comments", se), l.component("vs-widget-history", oe), l.component("vs-widget-gallery", ie), l.component("vs-widget-map", ae), l.component("CommentsWidget", se), l.component("HistoryWidget", oe), l.component("GalleryWidget", ie), l.component("FilesWidget", ne), l.component("MapWidget", ae), l.component("Card", ve), l.component("CardItem", Uo), l.component("DescriptionListWidget", Ce), l.component("CopyNotification", $e);
2066
+ re.install = function(r) {
2067
+ r.component("vs-widget-file", ie), r.component("vs-widget-comments", oe), r.component("vs-widget-history", ne), r.component("vs-widget-gallery", le), r.component("vs-widget-map", ae), r.component("CommentsWidget", oe), r.component("HistoryWidget", ne), r.component("GalleryWidget", le), r.component("FilesWidget", ie), r.component("MapWidget", ae), r.component("Card", re), r.component("CardItem", Le), r.component("DescriptionListWidget", Ce), r.component("CopyNotification", $e);
2010
2068
  };
2011
2069
  export {
2012
- ve as Card,
2013
- Uo as CardItem,
2014
- se as CommentsWidget,
2070
+ re as Card,
2071
+ Le as CardItem,
2072
+ oe as CommentsWidget,
2015
2073
  $e as CopyNotification,
2016
2074
  Ce as DescriptionListWidget,
2017
- ne as FilesWidget,
2018
- ie as GalleryWidget,
2019
- oe as HistoryWidget,
2075
+ ie as FilesWidget,
2076
+ le as GalleryWidget,
2077
+ ne as HistoryWidget,
2020
2078
  ae as MapWidget,
2021
- ve as default
2079
+ re as default
2022
2080
  };