@opengis/widgets 0.0.8 → 0.0.10

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.
Files changed (3) hide show
  1. package/dist/index.js +960 -651
  2. package/dist/index.umd.cjs +28 -28
  3. package/package.json +54 -54
package/dist/index.js CHANGED
@@ -1,24 +1,24 @@
1
- import { h as B, defineComponent as w, mergeModels as q, useModel as W, ref as M, createElementBlock as a, openBlock as n, createElementVNode as t, createVNode as v, unref as g, withDirectives as P, vModelText as oe, createCommentVNode as b, createTextVNode as H, onMounted as ne, onUnmounted as G, resolveComponent as me, normalizeClass as x, createBlock as C, toDisplayString as f, Fragment as D, renderList as L, normalizeStyle as z, resolveDynamicComponent as T, Teleport as ie, TransitionGroup as he, withCtx as ge, computed as I, nextTick as fe, renderSlot as F, mergeProps as U, vShow as ye } from "vue";
1
+ import { h as Y, defineComponent as C, mergeModels as J, useModel as se, ref as w, createElementBlock as a, openBlock as o, createElementVNode as t, createVNode as b, unref as y, withDirectives as O, vModelText as ve, createCommentVNode as x, createTextVNode as V, onMounted as oe, onUnmounted as ne, resolveComponent as ee, normalizeClass as _, createBlock as D, toDisplayString as v, Fragment as z, renderList as F, normalizeStyle as E, resolveDynamicComponent as S, withModifiers as G, computed as A, Teleport as ye, TransitionGroup as $e, withCtx as Ce, nextTick as Me, renderSlot as U, mergeProps as te, vShow as Le, vModelRadio as Q, vModelCheckbox as De } 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 J = (l) => l.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ve = (l) => l.replace(
8
+ const re = (l) => l.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Te = (l) => l.replace(
9
9
  /^([A-Z])|[\s-_]+(\w)/g,
10
- (o, i, e) => e ? e.toUpperCase() : i.toLowerCase()
11
- ), be = (l) => {
12
- const o = ve(l);
13
- return o.charAt(0).toUpperCase() + o.slice(1);
14
- }, xe = (...l) => l.filter((o, i, e) => !!o && o.trim() !== "" && e.indexOf(o) === i).join(" ").trim();
10
+ (i, n, e) => e ? e.toUpperCase() : n.toLowerCase()
11
+ ), je = (l) => {
12
+ const i = Te(l);
13
+ return i.charAt(0).toUpperCase() + i.slice(1);
14
+ }, Ie = (...l) => l.filter((i, n, e) => !!i && i.trim() !== "" && e.indexOf(i) === n).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 E = {
21
+ var Z = {
22
22
  xmlns: "http://www.w3.org/2000/svg",
23
23
  width: 24,
24
24
  height: 24,
@@ -35,21 +35,21 @@ var E = {
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 ke = ({ size: l, strokeWidth: o = 2, absoluteStrokeWidth: i, color: e, iconNode: s, name: m, class: u, ...p }, { slots: d }) => B(
38
+ const Ve = ({ size: l, strokeWidth: i = 2, absoluteStrokeWidth: n, color: e, iconNode: s, name: f, class: p, ...g }, { slots: u }) => Y(
39
39
  "svg",
40
40
  {
41
- ...E,
42
- width: l || E.width,
43
- height: l || E.height,
44
- stroke: e || E.stroke,
45
- "stroke-width": i ? Number(o) * 24 / Number(l) : o,
46
- class: xe(
41
+ ...Z,
42
+ width: l || Z.width,
43
+ height: l || Z.height,
44
+ stroke: e || Z.stroke,
45
+ "stroke-width": n ? Number(i) * 24 / Number(l) : i,
46
+ class: Ie(
47
47
  "lucide",
48
- ...m ? [`lucide-${J(be(m))}-icon`, `lucide-${J(m)}`] : ["lucide-icon"]
48
+ ...f ? [`lucide-${re(je(f))}-icon`, `lucide-${re(f)}`] : ["lucide-icon"]
49
49
  ),
50
- ...p
50
+ ...g
51
51
  },
52
- [...s.map((c) => B(...c)), ...d.default ? [d.default()] : []]
52
+ [...s.map((m) => Y(...m)), ...u.default ? [u.default()] : []]
53
53
  );
54
54
  /**
55
55
  * @license lucide-vue-next v0.535.0 - ISC
@@ -57,11 +57,11 @@ const ke = ({ size: l, strokeWidth: o = 2, absoluteStrokeWidth: i, color: e, 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 k = (l, o) => (i, { slots: e }) => B(
61
- ke,
60
+ const $ = (l, i) => (n, { slots: e }) => Y(
61
+ Ve,
62
62
  {
63
- ...i,
64
- iconNode: o,
63
+ ...n,
64
+ iconNode: i,
65
65
  name: l
66
66
  },
67
67
  e
@@ -72,7 +72,7 @@ const k = (l, o) => (i, { slots: e }) => B(
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 _e = k("archive", [
75
+ const ze = $("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 _e = k("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 we = k("arrow-right", [
86
+ const Fe = $("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 we = k("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 $e = k("circle-check-big", [
96
+ const Ae = $("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 $e = k("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 K = k("download", [
106
+ const ie = $("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 K = k("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 Ce = k("ellipsis", [
117
+ const He = $("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" }]
@@ -125,7 +125,7 @@ const Ce = k("ellipsis", [
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
127
  */
128
- const R = k("file-text", [
128
+ const W = $("file-text", [
129
129
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
130
130
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
131
131
  ["path", { d: "M10 9H8", key: "b1mrlr" }],
@@ -138,7 +138,7 @@ const R = k("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 Me = k("file", [
141
+ const Se = $("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 Me = k("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 De = k("grid-3x3", [
151
+ const Ee = $("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 De = k("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 Le = k("heart", [
164
+ const Oe = $("heart", [
165
165
  [
166
166
  "path",
167
167
  {
@@ -176,7 +176,7 @@ const Le = k("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 He = k("history", [
179
+ const Be = $("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 He = k("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 Ie = k("image", [
190
+ const de = $("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 Ie = k("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 je = k("list", [
201
+ const Re = $("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,17 @@ const je = k("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 Te = k("reply", [
215
+ const Ne = $("plus", [
216
+ ["path", { d: "M5 12h14", key: "1ays0h" }],
217
+ ["path", { d: "M12 5v14", key: "s699le" }]
218
+ ]);
219
+ /**
220
+ * @license lucide-vue-next v0.535.0 - ISC
221
+ *
222
+ * This source code is licensed under the ISC license.
223
+ * See the LICENSE file in the root directory of this source tree.
224
+ */
225
+ const Ue = $("reply", [
216
226
  ["path", { d: "M20 18v-2a4 4 0 0 0-4-4H4", key: "5vmcpk" }],
217
227
  ["path", { d: "m9 17-5-5 5-5", key: "nvlc11" }]
218
228
  ]);
@@ -222,7 +232,7 @@ const Te = k("reply", [
222
232
  * This source code is licensed under the ISC license.
223
233
  * See the LICENSE file in the root directory of this source tree.
224
234
  */
225
- const ae = k("send", [
235
+ const be = $("send", [
226
236
  [
227
237
  "path",
228
238
  {
@@ -238,7 +248,7 @@ const ae = k("send", [
238
248
  * This source code is licensed under the ISC license.
239
249
  * See the LICENSE file in the root directory of this source tree.
240
250
  */
241
- const ze = k("share", [
251
+ const We = $("share", [
242
252
  ["path", { d: "M12 2v13", key: "1km8f5" }],
243
253
  ["path", { d: "m16 6-4-4-4 4", key: "13yo43" }],
244
254
  ["path", { d: "M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8", key: "1b2hhj" }]
@@ -249,7 +259,7 @@ const ze = k("share", [
249
259
  * This source code is licensed under the ISC license.
250
260
  * See the LICENSE file in the root directory of this source tree.
251
261
  */
252
- const Se = k("sheet", [
262
+ const Ge = $("sheet", [
253
263
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
254
264
  ["line", { x1: "3", x2: "21", y1: "9", y2: "9", key: "1vqk6q" }],
255
265
  ["line", { x1: "3", x2: "21", y1: "15", y2: "15", key: "o2sbyz" }],
@@ -262,7 +272,7 @@ const Se = k("sheet", [
262
272
  * This source code is licensed under the ISC license.
263
273
  * See the LICENSE file in the root directory of this source tree.
264
274
  */
265
- const Ve = k("square-pen", [
275
+ const qe = $("square-pen", [
266
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" }],
267
277
  [
268
278
  "path",
@@ -278,17 +288,7 @@ const Ve = k("square-pen", [
278
288
  * This source code is licensed under the ISC license.
279
289
  * See the LICENSE file in the root directory of this source tree.
280
290
  */
281
- const Fe = k("stretch-horizontal", [
282
- ["rect", { width: "20", height: "6", x: "2", y: "4", rx: "2", key: "qdearl" }],
283
- ["rect", { width: "20", height: "6", x: "2", y: "14", rx: "2", key: "1xrn6j" }]
284
- ]);
285
- /**
286
- * @license lucide-vue-next v0.535.0 - ISC
287
- *
288
- * This source code is licensed under the ISC license.
289
- * See the LICENSE file in the root directory of this source tree.
290
- */
291
- const N = k("trash-2", [
291
+ const le = $("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 N = k("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 Re = k("user-check", [
304
+ const Pe = $("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 Re = k("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 Z = k("user", [
315
+ const ae = $("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 Z = k("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 Ae = k("video", [
325
+ const Ke = $("video", [
326
326
  [
327
327
  "path",
328
328
  {
@@ -338,234 +338,234 @@ const Ae = k("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 O = k("x", [
341
+ const X = $("x", [
342
342
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
343
343
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
344
- ]), Ee = { class: "border-t pt-3 mt-4" }, Ne = { class: "flex gap-2" }, Oe = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, Be = { class: "flex-1 space-y-2" }, Ue = { class: "flex justify-between items-center" }, qe = { class: "flex gap-2" }, We = ["disabled"], re = /* @__PURE__ */ w({
344
+ ]), Ze = { class: "border-t pt-3 mt-4" }, Je = { class: "flex gap-2" }, Xe = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, Qe = { class: "flex-1 space-y-2" }, Ye = { class: "flex justify-between items-center" }, et = { class: "flex gap-2" }, tt = ["disabled"], xe = /* @__PURE__ */ C({
345
345
  __name: "CommentInputZone",
346
346
  props: {
347
347
  isReply: { type: Boolean, required: !1, default: !1 },
348
348
  isReplyModifiers: {}
349
349
  },
350
- emits: /* @__PURE__ */ q(["sendComment"], ["update:isReply"]),
351
- setup(l, { emit: o }) {
352
- const i = W(l, "isReply"), e = M(""), s = o, m = () => {
350
+ emits: /* @__PURE__ */ J(["sendComment"], ["update:isReply"]),
351
+ setup(l, { emit: i }) {
352
+ const n = se(l, "isReply"), e = w(""), s = i, f = () => {
353
353
  e.value.trim() && (s("sendComment", e.value), e.value = "");
354
- }, u = (p) => {
355
- (p.ctrlKey || p.metaKey) && p.key === "Enter" && (p.preventDefault(), m());
354
+ }, p = (g) => {
355
+ (g.ctrlKey || g.metaKey) && g.key === "Enter" && (g.preventDefault(), f());
356
356
  };
357
- return (p, d) => (n(), a("div", Ee, [
358
- t("div", Ne, [
359
- t("span", Oe, [
360
- v(g(Z), { class: "h-3 w-3 text-gray-500" })
357
+ return (g, u) => (o(), a("div", Ze, [
358
+ t("div", Je, [
359
+ t("span", Xe, [
360
+ b(y(ae), { class: "h-3 w-3 text-gray-500" })
361
361
  ]),
362
- t("div", Be, [
363
- P(t("textarea", {
364
- "onUpdate:modelValue": d[0] || (d[0] = (c) => e.value = c),
365
- onKeydown: u,
362
+ t("div", Qe, [
363
+ O(t("textarea", {
364
+ "onUpdate:modelValue": u[0] || (u[0] = (m) => e.value = m),
365
+ onKeydown: p,
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
- [oe, e.value]
369
+ [ve, e.value]
370
370
  ]),
371
- t("div", Ue, [
372
- d[4] || (d[4] = t("span", { class: "text-xs text-gray-500 hidden sm:inline" }, "Cmd+Enter to send", -1)),
373
- t("div", qe, [
374
- i.value ? (n(), a("button", {
371
+ t("div", Ye, [
372
+ u[4] || (u[4] = t("span", { class: "text-xs text-gray-500 hidden sm:inline" }, "Cmd+Enter to send", -1)),
373
+ t("div", et, [
374
+ n.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: d[1] || (d[1] = (c) => i.value = !1)
377
+ onClick: u[1] || (u[1] = (m) => n.value = !1)
378
378
  }, [
379
- v(g(O), { class: "h-3 w-3" }),
380
- d[2] || (d[2] = H(" Cancel ", -1))
381
- ])) : b("", !0),
379
+ b(y(X), { class: "h-3 w-3" }),
380
+ u[2] || (u[2] = V(" Cancel ", -1))
381
+ ])) : x("", !0),
382
382
  t("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: !e.value.trim(),
385
- onClick: m
385
+ onClick: f
386
386
  }, [
387
- v(g(ae), { class: "h-3 w-3 mr-1" }),
388
- d[3] || (d[3] = H(" Send ", -1))
389
- ], 8, We)
387
+ b(y(be), { class: "h-3 w-3 mr-1" }),
388
+ u[3] || (u[3] = V(" Send ", -1))
389
+ ], 8, tt)
390
390
  ])
391
391
  ])
392
392
  ])
393
393
  ])
394
394
  ]));
395
395
  }
396
- }), Pe = { 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" }, Ge = /* @__PURE__ */ w({
396
+ }), st = { 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" }, ot = /* @__PURE__ */ C({
397
397
  __name: "CommentDetails",
398
398
  props: {
399
399
  showMoreOptions: { type: Boolean, required: !0, default: !1 },
400
400
  showMoreOptionsModifiers: {}
401
401
  },
402
- emits: /* @__PURE__ */ q(["edit", "delete"], ["update:showMoreOptions"]),
403
- setup(l, { emit: o }) {
404
- const i = o, e = W(l, "showMoreOptions"), s = M(), m = M(!0), u = async (c) => {
405
- e.value && s.value && !s.value.contains(c.target) && !m.value && (e.value = !1), m.value = !1;
406
- }, p = () => {
407
- e.value = !1, i("edit");
408
- }, d = () => {
409
- e.value = !1, i("delete");
402
+ emits: /* @__PURE__ */ J(["edit", "delete"], ["update:showMoreOptions"]),
403
+ setup(l, { emit: i }) {
404
+ const n = i, e = se(l, "showMoreOptions"), s = w(), f = w(!0), p = async (m) => {
405
+ e.value && s.value && !s.value.contains(m.target) && !f.value && (e.value = !1), f.value = !1;
406
+ }, g = () => {
407
+ e.value = !1, n("edit");
408
+ }, u = () => {
409
+ e.value = !1, n("delete");
410
410
  };
411
- return ne(() => {
412
- document.addEventListener("click", u);
413
- }), G(() => {
414
- document.removeEventListener("click", u);
415
- }), (c, r) => (n(), a("div", {
411
+ return oe(() => {
412
+ document.addEventListener("click", p);
413
+ }), ne(() => {
414
+ document.removeEventListener("click", p);
415
+ }), (m, r) => (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
- t("div", Pe, [
420
+ t("div", st, [
421
421
  t("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: p
423
+ onClick: g
424
424
  }, [
425
- v(g(Ve), { class: "h-3 w-3 mr-2" }),
426
- r[0] || (r[0] = H(" Edit ", -1))
425
+ b(y(qe), { class: "h-3 w-3 mr-2" }),
426
+ r[0] || (r[0] = V(" Edit ", -1))
427
427
  ]),
428
428
  t("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
- onClick: d
430
+ onClick: u
431
431
  }, [
432
- v(g(N), { class: "h-3 w-3 mr-2" }),
433
- r[1] || (r[1] = H(" Delete ", -1))
432
+ b(y(le), { class: "h-3 w-3 mr-2" }),
433
+ r[1] || (r[1] = V(" Delete ", -1))
434
434
  ])
435
435
  ])
436
436
  ], 512));
437
437
  }
438
- }), Ke = { class: "space-y-2" }, Ze = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, Xe = { class: "flex-1 min-w-0 space-y-1 relative" }, Je = { class: "flex items-center gap-2" }, Qe = { class: "font-medium text-xs" }, Ye = { class: "text-xs text-gray-500" }, et = {
438
+ }), nt = { class: "space-y-2" }, it = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, lt = { class: "flex-1 min-w-0 space-y-1 relative" }, at = { class: "flex items-center gap-2" }, rt = { class: "font-medium text-xs" }, dt = { class: "text-xs text-gray-500" }, ct = {
439
439
  key: 0,
440
440
  class: "text-xs text-gray-700 leading-relaxed"
441
- }, tt = { class: "flex justify-between text-xs" }, st = { class: "flex items-center gap-2" }, ot = {
441
+ }, ut = { class: "flex justify-between text-xs" }, pt = { class: "flex items-center gap-2" }, mt = {
442
442
  key: 0,
443
443
  class: "flex gap-2"
444
- }, nt = ["disabled"], it = {
444
+ }, gt = ["disabled"], ht = {
445
445
  key: 0,
446
446
  class: "ml-8 space-y-1 border-l-2 border-gray-100 pl-3"
447
- }, at = /* @__PURE__ */ w({
447
+ }, ft = /* @__PURE__ */ C({
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: o }) {
455
- const i = o, e = l, s = M(e.comment.text), m = M("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"), u = 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"), p = M(!1), d = M(!1), c = M(!1), r = M(!1), h = (_) => {
456
- const y = /* @__PURE__ */ new Date(), V = Math.floor(
457
- (y.getTime() - _.getTime()) / (1e3 * 60 * 60)
454
+ setup(l, { emit: i }) {
455
+ const n = i, e = l, s = w(e.comment.text), f = w("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"), p = 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"), g = w(!1), u = w(!1), m = w(!1), r = w(!1), h = (d) => {
456
+ const c = /* @__PURE__ */ new Date(), T = Math.floor(
457
+ (c.getTime() - d.getTime()) / (1e3 * 60 * 60)
458
458
  );
459
- return V < 1 ? `${Math.floor(
460
- (y.getTime() - _.getTime()) / 6e4
461
- )}m` : V < 24 ? `${V}h` : `${Math.floor(V / 24)}d`;
462
- }, j = () => {
463
- r.value = !r.value, r.value ? i("like", e.comment.id, "add") : i("like", e.comment.id, "delete");
464
- }, X = () => {
465
- i("edit", e.comment.id, s.value), c.value = !1;
466
- }, ue = (_, y) => {
467
- i("like", _, y);
468
- }, pe = (_, y) => {
469
- i("edit", _, y);
459
+ return T < 1 ? `${Math.floor(
460
+ (c.getTime() - d.getTime()) / 6e4
461
+ )}m` : T < 24 ? `${T}h` : `${Math.floor(T / 24)}d`;
462
+ }, I = () => {
463
+ r.value = !r.value, r.value ? n("like", e.comment.id, "add") : n("like", e.comment.id, "delete");
464
+ }, H = () => {
465
+ n("edit", e.comment.id, s.value), m.value = !1;
466
+ }, R = (d, c) => {
467
+ n("like", d, c);
468
+ }, M = (d, c) => {
469
+ n("edit", d, c);
470
470
  };
471
- return (_, y) => {
472
- const V = me("CommentItem", !0);
473
- return n(), a("div", Ke, [
471
+ return (d, c) => {
472
+ const T = ee("CommentItem", !0);
473
+ return o(), a("div", nt, [
474
474
  t("div", {
475
- class: x(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative", c.value ? "bg-gray-50" : ""])
475
+ class: _(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative", m.value ? "bg-gray-50" : ""])
476
476
  }, [
477
- t("span", Ze, [
478
- v(g(Z), { class: "h-3 w-3 text-gray-500" })
477
+ t("span", it, [
478
+ b(y(ae), { class: "h-3 w-3 text-gray-500" })
479
479
  ]),
480
- t("div", Xe, [
481
- t("div", Je, [
482
- t("span", Qe, f(_.comment?.author), 1),
483
- t("span", Ye, f(h(_.comment?.createdAt)), 1)
480
+ t("div", lt, [
481
+ t("div", at, [
482
+ t("span", rt, v(d.comment?.author), 1),
483
+ t("span", dt, v(h(d.comment?.createdAt)), 1)
484
484
  ]),
485
- c.value ? P((n(), a("textarea", {
485
+ m.value ? O((o(), a("textarea", {
486
486
  key: 1,
487
- "onUpdate:modelValue": y[0] || (y[0] = ($) => s.value = $),
488
- class: x(c.value ? u.value : m.value)
487
+ "onUpdate:modelValue": c[0] || (c[0] = (k) => s.value = k),
488
+ class: _(m.value ? p.value : f.value)
489
489
  }, null, 2)), [
490
- [oe, s.value]
491
- ]) : (n(), a("p", et, f(_.comment?.text), 1)),
492
- t("div", tt, [
493
- t("div", st, [
490
+ [ve, s.value]
491
+ ]) : (o(), a("p", ct, v(d.comment?.text), 1)),
492
+ t("div", ut, [
493
+ t("div", pt, [
494
494
  t("button", {
495
- class: x(["flex items-center gap-1", r.value ? "text-blue-600" : "text-gray-500 hover:text-blue-600 transition-colors"]),
496
- onClick: y[1] || (y[1] = ($) => j())
495
+ class: _(["flex items-center gap-1", r.value ? "text-blue-600" : "text-gray-500 hover:text-blue-600 transition-colors"]),
496
+ onClick: c[1] || (c[1] = (k) => I())
497
497
  }, [
498
- v(g(Le), {
499
- class: x(["h-3 w-3", r.value ? "fill-blue-600" : ""])
498
+ b(y(Oe), {
499
+ class: _(["h-3 w-3", r.value ? "fill-blue-600" : ""])
500
500
  }, null, 8, ["class"]),
501
- H(" " + f(_.comment?.likes), 1)
501
+ V(" " + v(d.comment?.likes), 1)
502
502
  ], 2),
503
- _.isInside ? b("", !0) : (n(), a("button", {
503
+ d.isInside ? x("", !0) : (o(), a("button", {
504
504
  key: 0,
505
505
  class: "text-gray-500 hover:text-blue-600 transition-colors",
506
- onClick: y[2] || (y[2] = ($) => d.value = !0)
506
+ onClick: c[2] || (c[2] = (k) => u.value = !0)
507
507
  }, [
508
- v(g(Te), { class: "h-3 w-3" })
508
+ b(y(Ue), { class: "h-3 w-3" })
509
509
  ])),
510
510
  t("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: y[3] || (y[3] = ($) => p.value = !0)
513
+ onClick: c[3] || (c[3] = (k) => g.value = !0)
514
514
  }, [
515
- v(g(Ce), { class: "h-3 w-3" })
515
+ b(y(He), { class: "h-3 w-3" })
516
516
  ])
517
517
  ]),
518
- c.value ? (n(), a("div", ot, [
518
+ m.value ? (o(), a("div", mt, [
519
519
  t("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: y[4] || (y[4] = ($) => c.value = !1)
521
+ onClick: c[4] || (c[4] = (k) => m.value = !1)
522
522
  }, [
523
- v(g(O), { class: "h-3 w-3" }),
524
- y[11] || (y[11] = H(" Cancel ", -1))
523
+ b(y(X), { class: "h-3 w-3" }),
524
+ c[11] || (c[11] = V(" Cancel ", -1))
525
525
  ]),
526
526
  t("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: y[5] || (y[5] = ($) => X())
529
+ onClick: c[5] || (c[5] = (k) => H())
530
530
  }, [
531
- v(g(ae), { class: "h-3 w-3 mr-1" }),
532
- y[12] || (y[12] = H(" Send ", -1))
533
- ], 8, nt)
534
- ])) : b("", !0)
531
+ b(y(be), { class: "h-3 w-3 mr-1" }),
532
+ c[12] || (c[12] = V(" Send ", -1))
533
+ ], 8, gt)
534
+ ])) : x("", !0)
535
535
  ])
536
536
  ]),
537
- p.value ? (n(), C(Ge, {
537
+ g.value ? (o(), D(ot, {
538
538
  key: 0,
539
- showMoreOptions: p.value,
540
- "onUpdate:showMoreOptions": y[6] || (y[6] = ($) => p.value = $),
541
- onEdit: y[7] || (y[7] = ($) => c.value = !0),
542
- onDelete: y[8] || (y[8] = ($) => _.$emit("delete", _.comment?.id)),
543
- comment: _.comment
544
- }, null, 8, ["showMoreOptions", "comment"])) : b("", !0)
539
+ showMoreOptions: g.value,
540
+ "onUpdate:showMoreOptions": c[6] || (c[6] = (k) => g.value = k),
541
+ onEdit: c[7] || (c[7] = (k) => m.value = !0),
542
+ onDelete: c[8] || (c[8] = (k) => d.$emit("delete", d.comment?.id)),
543
+ comment: d.comment
544
+ }, null, 8, ["showMoreOptions", "comment"])) : x("", !0)
545
545
  ], 2),
546
- _.isInside ? b("", !0) : (n(), a("div", it, [
547
- (n(!0), a(D, null, L(_.comment?.replies, ($) => (n(), C(V, {
548
- key: $.id,
549
- comment: $,
546
+ d.isInside ? x("", !0) : (o(), a("div", ht, [
547
+ (o(!0), a(z, null, F(d.comment?.replies, (k) => (o(), D(T, {
548
+ key: k.id,
549
+ comment: k,
550
550
  isInside: !0,
551
- onDelete: (ko) => _.$emit("delete", $.id),
552
- onLike: ue,
553
- onEdit: pe
551
+ onDelete: (j) => d.$emit("delete", k.id),
552
+ onLike: R,
553
+ onEdit: M
554
554
  }, null, 8, ["comment", "onDelete"]))), 128)),
555
- d.value && !_.isInside ? (n(), C(re, {
555
+ u.value && !d.isInside ? (o(), D(xe, {
556
556
  key: 0,
557
- onSendComment: y[9] || (y[9] = ($) => _.$emit("reply", _.comment?.id, $)),
558
- isReply: d.value,
559
- "onUpdate:isReply": y[10] || (y[10] = ($) => d.value = $)
560
- }, null, 8, ["isReply"])) : b("", !0)
557
+ onSendComment: c[9] || (c[9] = (k) => d.$emit("reply", d.comment?.id, k)),
558
+ isReply: u.value,
559
+ "onUpdate:isReply": c[10] || (c[10] = (k) => u.value = k)
560
+ }, null, 8, ["isReply"])) : x("", !0)
561
561
  ]))
562
562
  ]);
563
563
  };
564
564
  }
565
- }), rt = ["id"], lt = {
565
+ }), vt = ["id"], yt = {
566
566
  key: 0,
567
567
  class: "text-xl font-semibold text-gray-900 mb-4"
568
- }, Q = /* @__PURE__ */ w({
568
+ }, ce = /* @__PURE__ */ C({
569
569
  __name: "CommentsWidget",
570
570
  props: {
571
571
  title: {},
@@ -581,79 +581,79 @@ const O = k("x", [
581
581
  style: {}
582
582
  },
583
583
  emits: ["add", "reply", "like", "delete", "edit"],
584
- setup(l, { emit: o }) {
585
- const i = l, e = o, s = (c) => {
586
- i.onAddComment(c), e("add", c);
587
- }, m = (c, r) => {
588
- i.onLike(c, r), e("like", c, r);
589
- }, u = (c, r) => {
590
- i.onReply(c, r), e("reply", c, r);
591
- }, p = (c, r) => {
592
- i.onEdit(c, r), e("edit", c, r);
593
- }, d = (c) => {
594
- i.onDelete(c), e("delete", c);
584
+ setup(l, { emit: i }) {
585
+ const n = l, e = i, s = (m) => {
586
+ n.onAddComment(m), e("add", m);
587
+ }, f = (m, r) => {
588
+ n.onLike(m, r), e("like", m, r);
589
+ }, p = (m, r) => {
590
+ n.onReply(m, r), e("reply", m, r);
591
+ }, g = (m, r) => {
592
+ n.onEdit(m, r), e("edit", m, r);
593
+ }, u = (m) => {
594
+ n.onDelete(m), e("delete", m);
595
595
  };
596
- return (c, r) => (n(), a("div", {
597
- class: x(["mx-auto font-sans", c.className]),
598
- id: c.id,
599
- style: z(c.style)
596
+ return (m, r) => (o(), a("div", {
597
+ class: _(["mx-auto font-sans", m.className]),
598
+ id: m.id,
599
+ style: E(m.style)
600
600
  }, [
601
- c.title ? (n(), a("h3", lt, f(c.title), 1)) : b("", !0),
601
+ m.title ? (o(), a("h3", yt, v(m.title), 1)) : x("", !0),
602
602
  t("div", {
603
- class: x([c.maxHeight ? "overflow-y-auto" : "", "space-y-3"]),
604
- style: z({ maxHeight: c.maxHeight + "px" })
603
+ class: _([m.maxHeight ? "overflow-y-auto" : "", "space-y-3"]),
604
+ style: E({ maxHeight: m.maxHeight + "px" })
605
605
  }, [
606
- (n(!0), a(D, null, L(c.comments, (h) => (n(), C(at, {
606
+ (o(!0), a(z, null, F(m.comments, (h) => (o(), D(ft, {
607
607
  key: h.id,
608
608
  comment: h,
609
- onReply: u,
610
- onLike: m,
611
- onDelete: r[0] || (r[0] = (j) => d(j)),
612
- onEdit: p
609
+ onReply: p,
610
+ onLike: f,
611
+ onDelete: r[0] || (r[0] = (I) => u(I)),
612
+ onEdit: g
613
613
  }, null, 8, ["comment"]))), 128))
614
614
  ], 6),
615
- v(re, {
615
+ b(xe, {
616
616
  onSendComment: r[1] || (r[1] = (h) => s(h))
617
617
  })
618
- ], 14, rt));
618
+ ], 14, vt));
619
619
  }
620
- }), Y = /* @__PURE__ */ new Map([
620
+ }), ue = /* @__PURE__ */ new Map([
621
621
  ["file", {
622
622
  name: "File",
623
623
  color: "bg-green-100 text-green-700 border-green-200",
624
- icon: R
624
+ icon: W
625
625
  }],
626
626
  ["post", {
627
627
  name: "Post",
628
628
  color: "bg-blue-100 text-blue-700 border-blue-200",
629
- icon: Se
629
+ icon: Ge
630
630
  }],
631
631
  ["user", {
632
632
  name: "User",
633
633
  color: "bg-purple-100 text-purple-700 border-purple-200",
634
- icon: Re
634
+ icon: Pe
635
635
  }],
636
636
  ["custom", {
637
637
  name: "Custom",
638
638
  color: "bg-gray-100 text-gray-700 border-gray-200",
639
- icon: He
639
+ icon: Be
640
640
  }]
641
- ]), dt = { class: "mx-auto font-sans" }, ct = {
641
+ ]), bt = { class: "mx-auto font-sans" }, xt = {
642
642
  key: 0,
643
643
  class: "text-xl font-semibold text-gray-900 mb-4"
644
- }, ut = { class: "relative" }, pt = { class: "space-y-3" }, mt = { class: "flex-1 min-w-0 pb-2" }, ht = { class: "flex items-center gap-1.5 mb-1 mt-0.5" }, gt = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, ft = { class: "font-medium text-xs" }, yt = { class: "text-xs text-gray-500" }, vt = { class: "space-y-1" }, bt = { class: "text-xs text-gray-700" }, xt = { class: "capitalize mr-1" }, kt = {
644
+ }, kt = { class: "relative" }, wt = { class: "space-y-3" }, _t = { class: "flex-1 min-w-0 pb-2" }, $t = { class: "flex items-center gap-1.5 mb-1 mt-0.5" }, Ct = { class: "relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200" }, Mt = { class: "font-medium text-xs" }, Lt = { class: "text-xs text-gray-500" }, Dt = { class: "space-y-1" }, Tt = { class: "text-xs text-gray-700" }, jt = { class: "capitalize mr-1" }, It = {
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
- }, _t = {
647
+ }, Vt = {
648
648
  key: 0,
649
649
  class: "flex items-center gap-1 text-xs"
650
- }, wt = {
650
+ }, zt = {
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
- }, $t = {
653
+ }, Ft = {
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
- }, ee = /* @__PURE__ */ w({
656
+ }, pe = /* @__PURE__ */ C({
657
657
  __name: "HistoryWidget",
658
658
  props: {
659
659
  data: {},
@@ -664,45 +664,45 @@ const O = k("x", [
664
664
  style: {}
665
665
  },
666
666
  setup(l) {
667
- return (o, i) => (n(), a("div", dt, [
668
- o.title ? (n(), a("h3", ct, f(o.title), 1)) : b("", !0),
667
+ return (i, n) => (o(), a("div", bt, [
668
+ i.title ? (o(), a("h3", xt, v(i.title), 1)) : x("", !0),
669
669
  t("div", {
670
- class: x(o.maxHeight ? "overflow-y-auto" : ""),
671
- style: z({ maxHeight: o.maxHeight + "px" })
670
+ class: _(i.maxHeight ? "overflow-y-auto" : ""),
671
+ style: E({ maxHeight: i.maxHeight + "px" })
672
672
  }, [
673
- t("div", ut, [
674
- i[0] || (i[0] = t("div", { class: "absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200" }, null, -1)),
675
- t("div", pt, [
676
- (n(!0), a(D, null, L(o.data, (e) => (n(), a("div", {
673
+ t("div", kt, [
674
+ n[0] || (n[0] = t("div", { class: "absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200" }, null, -1)),
675
+ t("div", wt, [
676
+ (o(!0), a(z, null, F(i.data, (e) => (o(), a("div", {
677
677
  class: "relative flex items-start gap-2",
678
678
  key: e?.id
679
679
  }, [
680
680
  t("div", {
681
- class: x(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${g(Y).get(e?.entityType)?.color}`)
681
+ class: _(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${y(ue).get(e?.entityType)?.color}`)
682
682
  }, [
683
- (n(), C(T(g(Y).get(e?.entityType)?.icon), { class: "h-3 w-3" }))
683
+ (o(), D(S(y(ue).get(e?.entityType)?.icon), { class: "h-3 w-3" }))
684
684
  ], 2),
685
- t("div", mt, [
686
- t("div", ht, [
687
- t("span", gt, [
688
- v(g(Z), { class: "h-3 w-3 text-gray-500" })
685
+ t("div", _t, [
686
+ t("div", $t, [
687
+ t("span", Ct, [
688
+ b(y(ae), { class: "h-3 w-3 text-gray-500" })
689
689
  ]),
690
- t("span", ft, f(e?.userName), 1),
691
- t("span", yt, f(e?.timestamp.toLocaleTimeString("ua-UA", { hour: "2-digit", minute: "2-digit" })), 1)
690
+ t("span", Mt, v(e?.userName), 1),
691
+ t("span", Lt, v(e?.timestamp.toLocaleTimeString("ua-UA", { hour: "2-digit", minute: "2-digit" })), 1)
692
692
  ]),
693
- t("div", vt, [
694
- t("div", bt, [
695
- t("span", xt, f(e?.action), 1),
696
- e?.entityId ? (n(), a("span", kt, f(e?.entityId), 1)) : b("", !0)
693
+ t("div", Dt, [
694
+ t("div", Tt, [
695
+ t("span", jt, v(e?.action), 1),
696
+ e?.entityId ? (o(), a("span", It, v(e?.entityId), 1)) : x("", !0)
697
697
  ]),
698
- e?.changes?.[e?.entityId] ? (n(), a("div", _t, [
699
- e?.changes?.[e?.entityId]?.old ? (n(), a("span", wt, f(e?.changes?.[e?.entityId]?.old), 1)) : b("", !0),
700
- e?.changes?.[e?.entityId]?.old && e?.changes?.[e?.entityId]?.new ? (n(), C(g(we), {
698
+ e?.changes?.[e?.entityId] ? (o(), a("div", Vt, [
699
+ e?.changes?.[e?.entityId]?.old ? (o(), a("span", zt, v(e?.changes?.[e?.entityId]?.old), 1)) : x("", !0),
700
+ e?.changes?.[e?.entityId]?.old && e?.changes?.[e?.entityId]?.new ? (o(), D(y(Fe), {
701
701
  key: 1,
702
702
  class: "h-2 w-2 text-gray-400"
703
- })) : b("", !0),
704
- e?.changes?.[e?.entityId]?.new ? (n(), a("span", $t, f(e?.changes?.[e?.entityId]?.new), 1)) : b("", !0)
705
- ])) : b("", !0)
703
+ })) : x("", !0),
704
+ e?.changes?.[e?.entityId]?.new ? (o(), a("span", Ft, v(e?.changes?.[e?.entityId]?.new), 1)) : x("", !0)
705
+ ])) : x("", !0)
706
706
  ])
707
707
  ])
708
708
  ]))), 128))
@@ -711,403 +711,429 @@ const O = k("x", [
711
711
  ], 6)
712
712
  ]));
713
713
  }
714
- }), Ct = {
714
+ }), At = {
715
715
  key: 0,
716
716
  class: "text-xl font-semibold"
717
- }, Mt = { class: "flex gap-1" }, Dt = /* @__PURE__ */ w({
717
+ }, Ht = { class: "flex gap-1" }, St = { 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" }, Et = /* @__PURE__ */ C({
718
718
  __name: "FileHeader",
719
- props: /* @__PURE__ */ q({
719
+ props: /* @__PURE__ */ J({
720
720
  title: {}
721
721
  }, {
722
722
  modelValue: {},
723
723
  modelModifiers: {}
724
724
  }),
725
- emits: ["update:modelValue"],
725
+ emits: /* @__PURE__ */ J(["onAddFile"], ["update:modelValue"]),
726
726
  setup(l) {
727
- const o = W(l, "modelValue"), i = {
728
- active: "bg-black text-white hover:bg-black",
729
- inactive: "bg-white text-black hover:bg-gray-100"
727
+ const i = se(l, "modelValue"), n = {
728
+ active: "bg-blue-100 text-black hover:bg-blue-100",
729
+ inactive: "bg-white text-black hover:bg-blue-100"
730
730
  };
731
- return (e, s) => (n(), a("div", {
732
- class: x(["flex flex-col sm:flex-row gap-3 mb-4", e.title ? "justify-between sm:items-center" : "justify-end sm:items-center"])
731
+ return (e, s) => (o(), a("div", {
732
+ class: _(["flex flex-col sm:flex-row gap-3 mb-4", e.title ? "justify-between sm:items-center" : "justify-end sm:items-center"])
733
733
  }, [
734
- e.title ? (n(), a("h3", Ct, f(e.title), 1)) : b("", !0),
735
- t("div", Mt, [
734
+ e.title ? (o(), a("h3", At, v(e.title), 1)) : x("", !0),
735
+ t("div", Ht, [
736
736
  t("button", {
737
- class: x(["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", o.value === "list" ? i.active : i.inactive]),
738
- onClick: s[0] || (s[0] = (m) => o.value = "list")
737
+ class: _(["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]),
738
+ onClick: s[0] || (s[0] = (f) => i.value = "list")
739
739
  }, [
740
- v(g(je), { class: "h-4 w-4" })
740
+ b(y(Re), { class: "h-4 w-4" })
741
741
  ], 2),
742
742
  t("button", {
743
- class: x(["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", o.value === "grid" ? i.active : i.inactive]),
744
- onClick: s[1] || (s[1] = (m) => o.value = "grid")
743
+ class: _(["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]),
744
+ onClick: s[1] || (s[1] = (f) => i.value = "grid")
745
745
  }, [
746
- v(g(De), { class: "h-4 w-4" })
746
+ b(y(Ee), { class: "h-4 w-4" })
747
747
  ], 2),
748
- t("button", {
749
- class: x(["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", o.value === "compact" ? i.active : i.inactive]),
750
- onClick: s[2] || (s[2] = (m) => o.value = "compact")
751
- }, [
752
- v(g(Fe), { class: "h-4 w-4" })
753
- ], 2)
748
+ t("label", null, [
749
+ t("input", {
750
+ type: "file",
751
+ class: "hidden",
752
+ onChange: s[2] || (s[2] = (f) => e.$emit("onAddFile", f))
753
+ }, null, 32),
754
+ t("div", St, [
755
+ b(y(Ne), { class: "h-4 w-4" }),
756
+ s[3] || (s[3] = V(" Додати файл ", -1))
757
+ ])
758
+ ])
754
759
  ])
755
760
  ], 2));
756
761
  }
757
- }), A = {
762
+ }), me = {
758
763
  pdf: {
759
764
  color: "bg-red-100 text-red-700 border-red-200",
760
- icon: R,
765
+ icon: W,
761
766
  label: "PDF"
762
767
  },
763
768
  sketch: {
764
769
  color: "bg-gray-100 text-gray-700 border-gray-200",
765
- icon: Me,
770
+ icon: Se,
766
771
  label: "SKETCH"
767
772
  },
768
773
  mp4: {
769
774
  color: "bg-purple-100 text-purple-700 border-purple-200",
770
- icon: Ae,
775
+ icon: Ke,
771
776
  label: "VIDEO"
772
777
  },
773
778
  docx: {
774
779
  color: "bg-blue-100 text-blue-700 border-blue-200",
775
- icon: R,
780
+ icon: W,
776
781
  label: "DOC"
777
782
  },
778
783
  zip: {
779
784
  color: "bg-orange-100 text-orange-700 border-orange-200",
780
- icon: _e,
785
+ icon: ze,
781
786
  label: "ARCHIVE"
782
787
  },
783
788
  png: {
784
789
  color: "bg-green-100 text-green-700 border-green-200",
785
- icon: Ie,
790
+ icon: de,
791
+ label: "IMAGE"
792
+ },
793
+ jpg: {
794
+ color: "bg-green-100 text-green-700 border-green-200",
795
+ icon: de,
786
796
  label: "IMAGE"
787
797
  },
788
798
  xlsx: {
789
799
  color: "bg-emerald-100 text-emerald-700 border-emerald-200",
790
- icon: R,
800
+ icon: W,
791
801
  label: "EXCEL"
792
802
  },
793
803
  pptx: {
794
804
  color: "bg-amber-100 text-amber-700 border-amber-200",
795
- icon: R,
805
+ icon: W,
796
806
  label: "PPT"
797
807
  }
798
808
  };
799
- function le(l, o = "en") {
800
- const i = {
809
+ function ke(l, i = "en") {
810
+ const n = {
801
811
  month: "short",
802
812
  day: "numeric"
803
813
  };
804
- return new Intl.DateTimeFormat(o, i).format(l);
814
+ return new Intl.DateTimeFormat(i, n).format(l);
805
815
  }
806
- function de(l) {
816
+ function we(l) {
807
817
  if (l === 0) return "0 B";
808
- const o = 1024, i = ["B", "KB", "MB", "GB", "TB"], e = Math.floor(Math.log(l) / Math.log(o));
809
- return `${parseFloat((l / Math.pow(o, e)).toFixed(1))} ${i[e]}`;
818
+ const i = 1024, n = ["B", "KB", "MB", "GB", "TB"], e = Math.floor(Math.log(l) / Math.log(i));
819
+ return `${parseFloat((l / Math.pow(i, e)).toFixed(1))} ${n[e]}`;
810
820
  }
811
- const Lt = { class: "space-y-0.5" }, Ht = { class: "flex-1 min-w-0 cursor-pointer" }, It = { class: "flex items-center gap-2" }, jt = { class: "font-medium text-xs truncate hover:text-blue-600" }, Tt = { 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" }, St = { class: "flex items-center gap-1" }, Vt = ["href"], Ft = ["onClick"], Rt = /* @__PURE__ */ w({
821
+ const Ot = { class: "space-y-0.5" }, Bt = ["onClick"], Rt = ["onClick"], Nt = { class: "flex items-center gap-2" }, Ut = { class: "font-medium text-xs truncate hover:text-blue-600" }, Wt = { class: "hidden sm:block text-xs text-gray-500 w-16 text-right" }, Gt = { class: "hidden md:block text-xs text-gray-500 w-12 text-right" }, qt = { class: "flex items-center gap-1" }, Pt = ["onClick"], Kt = ["onClick"], Zt = /* @__PURE__ */ C({
812
822
  __name: "FileList",
813
823
  props: {
814
824
  files: {}
815
825
  },
816
- emits: ["delete"],
826
+ emits: ["delete", "download", "openLightbox"],
817
827
  setup(l) {
818
- return (o, i) => (n(), a("div", Lt, [
819
- (n(!0), a(D, null, L(o.files, (e) => (n(), a("div", {
828
+ return (i, n) => (o(), a("div", Ot, [
829
+ (o(!0), a(z, null, F(i.files, (e) => (o(), a("div", {
820
830
  class: "flex items-center gap-2 p-1.5 rounded hover:bg-gray-50 group border-b border-gray-100 last:border-b-0",
821
- key: e.id
831
+ key: e.id,
832
+ onClick: G((s) => i.$emit("openLightbox", e), ["stop"])
822
833
  }, [
823
834
  t("div", {
824
- class: x(["p-1 rounded", g(A)[e.type].color])
835
+ class: _(["p-1 rounded", y(me)[e?.ext]?.color])
825
836
  }, [
826
- (n(), C(T(g(A)[e.type].icon), { class: "h-3 w-3" }))
837
+ (o(), D(S(y(me)[e?.ext]?.icon), { class: "h-3 w-3" }))
827
838
  ], 2),
828
- t("div", Ht, [
829
- t("div", It, [
830
- t("span", jt, f(e.name), 1),
831
- t("div", {
832
- class: x(["inline-flex items-center rounded-full border py-0.5 font-semibold text-xs px-1", g(A)[e.type].color])
833
- }, f(e.type), 3)
839
+ t("div", {
840
+ class: "flex-1 min-w-0",
841
+ onClick: (s) => i.$emit("openLightbox", e)
842
+ }, [
843
+ t("div", Nt, [
844
+ t("span", Ut, v(e?.uploaded_name || e?.name), 1)
834
845
  ])
835
- ]),
836
- t("div", Tt, f(g(de)(e.size)), 1),
837
- t("div", zt, f(g(le)(e.createdAt)), 1),
838
- t("div", St, [
839
- t("a", {
840
- href: e.path,
841
- target: "_blank",
842
- download: "",
846
+ ], 8, Rt),
847
+ t("div", Wt, v(y(we)(e.size)), 1),
848
+ t("div", Gt, v(y(ke)(e.createdAt)), 1),
849
+ t("div", qt, [
850
+ t("button", {
851
+ onClick: G((s) => i.$emit("download", e), ["stop"]),
843
852
  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"
844
853
  }, [
845
- v(g(K), { class: "h-3 w-3" })
846
- ], 8, Vt),
854
+ b(y(ie), { class: "h-3 w-3" })
855
+ ], 8, Pt),
847
856
  t("button", {
848
857
  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",
849
- onClick: (s) => o.$emit("delete", e.id)
858
+ onClick: G((s) => i.$emit("delete", s, e?.file_id), ["stop"])
850
859
  }, [
851
- v(g(N), { class: "h-3 w-3" })
852
- ], 8, Ft)
860
+ b(y(le), { class: "h-3 w-3" })
861
+ ], 8, Kt)
853
862
  ])
854
- ]))), 128))
863
+ ], 8, Bt))), 128))
855
864
  ]));
856
865
  }
857
- }), At = { class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3" }, Et = { class: "space-y-2" }, Nt = { class: "flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden" }, Ot = { class: "space-y-1" }, Bt = ["title"], Ut = { class: "text-xs text-gray-500 text-left" }, qt = ["onClick"], Wt = /* @__PURE__ */ w({
866
+ }), Jt = { class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3" }, Xt = ["onClick"], Qt = { class: "space-y-2" }, Yt = { class: "flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden" }, es = ["src"], ts = { class: "space-y-1" }, ss = ["title"], os = { class: "text-xs text-gray-500 text-left" }, ns = { class: "absolute top-2 right-1 flex items-center gap-1" }, is = ["onClick"], ls = ["onClick"], as = /* @__PURE__ */ C({
858
867
  __name: "FileGrid",
859
868
  props: {
860
869
  files: {}
861
870
  },
862
- emits: ["delete"],
871
+ emits: ["delete", "download", "openLightbox"],
863
872
  setup(l) {
864
- return (o, i) => (n(), a("div", At, [
865
- (n(!0), a(D, null, L(o.files, (e) => (n(), a("div", {
873
+ return (i, n) => (o(), a("div", Jt, [
874
+ (o(!0), a(z, null, F(i.files, (e) => (o(), a("div", {
866
875
  key: e.id,
876
+ onClick: G((s) => i.$emit("openLightbox", e), ["stop"]),
867
877
  class: "group relative border rounded-lg p-2 hover:shadow-md transition-all bg-white hover:bg-gray-50 cursor-pointer"
868
878
  }, [
869
- t("div", Et, [
870
- t("div", Nt, [
871
- v(g(R), { class: "h-10 w-10 text-gray-500" })
879
+ t("div", Qt, [
880
+ t("div", Yt, [
881
+ e.ext === "png" || e.ext === "jpg" || e.ext === "jpeg" || e.ext === "gif" || e.ext === "svg" || e.ext === "webp" ? (o(), a("img", {
882
+ key: 0,
883
+ src: `/file/resize?filepath=${e?.file_path}&w=500`,
884
+ alt: "file",
885
+ class: "w-full h-full object-cover"
886
+ }, null, 8, es)) : (o(), D(y(W), {
887
+ key: 1,
888
+ class: "h-10 w-10 text-gray-500"
889
+ }))
872
890
  ]),
873
- t("div", Ot, [
891
+ t("div", ts, [
874
892
  t("h3", {
875
893
  class: "font-medium text-xs leading-tight text-left",
876
- title: e.name
877
- }, f(e.name), 9, Bt),
878
- t("p", Ut, f(g(le)(e.createdAt)) + ", " + f(g(de)(e.size)), 1)
894
+ title: e.uploaded_name || e.name
895
+ }, v(e.uploaded_name || e.name), 9, ss),
896
+ t("p", os, v(y(ke)(e.createdAt)) + ", " + v(y(we)(e.size)), 1)
879
897
  ])
880
898
  ]),
881
- t("a", {
882
- 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 absolute top-2 right-2 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",
883
- onClick: (s) => o.$emit("delete", e.id)
884
- }, [
885
- v(g(N), { class: "h-3 w-3" })
886
- ], 8, qt)
887
- ]))), 128))
888
- ]));
889
- }
890
- }), Pt = { class: "flex flex-wrap gap-1" }, Gt = ["title"], Kt = { class: "flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity ml-1" }, Zt = ["href"], Xt = ["onClick"], Jt = /* @__PURE__ */ w({
891
- __name: "FileCompact",
892
- props: {
893
- files: {}
894
- },
895
- emits: ["delete"],
896
- setup(l) {
897
- return (o, i) => (n(), a("div", Pt, [
898
- (n(!0), a(D, null, L(o.files, (e) => (n(), a("div", {
899
- key: e.id,
900
- class: "group flex items-center gap-1 p-1 rounded border hover:bg-gray-50 hover:shadow-sm transition-all"
901
- }, [
902
- t("div", {
903
- class: x(["p-0.5 rounded", g(A)[e.type].color])
904
- }, [
905
- (n(), C(T(g(A)[e.type].icon), { class: "h-3 w-3" }))
906
- ], 2),
907
- t("span", {
908
- class: "text-xs font-medium truncate max-w-24",
909
- title: e.name
910
- }, f(e.name), 9, Gt),
911
- t("div", Kt, [
912
- t("a", {
913
- class: "ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground rounded-md h-4 w-4 p-0",
914
- href: e.path,
915
- target: "_blank",
916
- download: ""
917
- }, [
918
- v(g(K), { class: "h-2.5 w-2.5" })
919
- ], 8, Zt),
899
+ t("div", ns, [
920
900
  t("button", {
921
- class: "ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors hover:bg-accent rounded-md h-4 w-4 p-0 text-red-600 hover:text-red-700",
922
- onClick: (s) => o.$emit("delete", e.id)
901
+ onClick: G((s) => i.$emit("download", e), ["stop"]),
902
+ 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"
903
+ }, [
904
+ b(y(ie), { class: "h-3 w-3" })
905
+ ], 8, is),
906
+ t("a", {
907
+ 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",
908
+ onClick: G((s) => i.$emit("delete", s, e?.file_id), ["stop"])
923
909
  }, [
924
- v(g(N), { class: "h-2.5 w-2.5" })
925
- ], 8, Xt)
910
+ b(y(le), { class: "h-3 w-3" })
911
+ ], 8, ls)
926
912
  ])
927
- ]))), 128))
913
+ ], 8, Xt))), 128))
928
914
  ]));
929
915
  }
930
- }), Qt = { class: "mx-auto font-sans" }, te = /* @__PURE__ */ w({
916
+ }), rs = { class: "mx-auto font-sans" }, ds = { key: 1 }, ge = /* @__PURE__ */ C({
931
917
  __name: "FilesWidget",
932
918
  props: {
933
919
  title: {},
934
920
  view: {},
935
921
  files: {},
936
- maxHeight: {}
922
+ maxHeight: {},
923
+ onAddFile: { type: Function }
937
924
  },
938
- emits: ["delete"],
939
- setup(l) {
940
- const o = l, i = M("list");
941
- return (e, s) => (n(), a("div", Qt, [
942
- v(Dt, {
943
- modelValue: i.value,
944
- "onUpdate:modelValue": s[0] || (s[0] = (m) => i.value = m),
945
- title: o.title
946
- }, null, 8, ["modelValue", "title"]),
947
- t("div", {
948
- class: x(e.maxHeight ? "overflow-y-auto" : ""),
949
- style: z({ maxHeight: e.maxHeight + "px" })
950
- }, [
951
- i.value === "list" ? (n(), C(Rt, {
952
- key: 0,
953
- onDelete: s[1] || (s[1] = (m) => e.$emit("delete", m)),
954
- files: o.files
955
- }, null, 8, ["files"])) : b("", !0),
956
- i.value === "grid" ? (n(), C(Wt, {
957
- key: 1,
958
- onDelete: s[2] || (s[2] = (m) => e.$emit("delete", m)),
959
- files: o.files
960
- }, null, 8, ["files"])) : b("", !0),
961
- i.value === "compact" ? (n(), C(Jt, {
962
- key: 2,
963
- onDelete: s[3] || (s[3] = (m) => e.$emit("delete", m)),
964
- files: o.files
965
- }, null, 8, ["files"])) : b("", !0)
966
- ], 6)
967
- ]));
925
+ emits: ["delete", "add", "openLightbox"],
926
+ setup(l, { emit: i }) {
927
+ const n = l, e = w(!1), s = w(null), f = w(!1), p = w(0), g = i, u = (d, c) => {
928
+ s.value = c, e.value = !0;
929
+ }, m = () => {
930
+ s.value && (H(s.value), s.value = null, e.value = !1);
931
+ }, r = A(() => Array.isArray(n.files) ? n.files.map((d) => d?.file_path) : []), h = (d) => {
932
+ const c = r.value.findIndex((T) => T === d.file_path);
933
+ c !== -1 && (f.value = !0, p.value = c);
934
+ }, I = (d) => {
935
+ n.onAddFile && n.onAddFile(d), g("add", d);
936
+ }, H = (d) => {
937
+ g("delete", d);
938
+ }, R = (d) => {
939
+ const c = document.createElement("a");
940
+ c.setAttribute("download", d?.uploaded_name || d?.name), c.href = d?.file_path || d?.path, c.click();
941
+ }, M = w("list");
942
+ return (d, c) => {
943
+ const T = ee("MessageBox"), k = ee("Lightbox");
944
+ return o(), a(z, null, [
945
+ t("div", rs, [
946
+ b(Et, {
947
+ modelValue: M.value,
948
+ "onUpdate:modelValue": c[0] || (c[0] = (j) => M.value = j),
949
+ title: n.title,
950
+ onOnAddFile: c[1] || (c[1] = (j) => I(j))
951
+ }, null, 8, ["modelValue", "title"]),
952
+ n.files.length > 0 ? (o(), a("div", {
953
+ key: 0,
954
+ class: _(d.maxHeight ? "overflow-y-auto" : ""),
955
+ style: E({ maxHeight: d.maxHeight + "px" })
956
+ }, [
957
+ M.value === "list" ? (o(), D(Zt, {
958
+ key: 0,
959
+ onDelete: u,
960
+ onDownload: R,
961
+ onOpenLightbox: c[2] || (c[2] = (j) => h(j)),
962
+ files: n.files
963
+ }, null, 8, ["files"])) : x("", !0),
964
+ M.value === "grid" ? (o(), D(as, {
965
+ key: 1,
966
+ onDelete: u,
967
+ onDownload: R,
968
+ onOpenLightbox: c[3] || (c[3] = (j) => h(j)),
969
+ files: n.files
970
+ }, null, 8, ["files"])) : x("", !0)
971
+ ], 6)) : (o(), a("div", ds, c[6] || (c[6] = [
972
+ t("div", { class: "flex items-center justify-center h-full" }, [
973
+ t("p", { class: "text-gray-500 leading-[3]" }, "Файлів не знайдено")
974
+ ], -1)
975
+ ])))
976
+ ]),
977
+ b(T, {
978
+ modelValue: e.value,
979
+ "onUpdate:modelValue": c[4] || (c[4] = (j) => e.value = j),
980
+ onConfirm: m,
981
+ title: "Ви впевнені?",
982
+ message: "Ви впевнені, що хочете видалити цей файл?",
983
+ confirmButtonText: "Так, я впевнена/ий",
984
+ cancelButtonText: "Скасувати"
985
+ }, null, 8, ["modelValue"]),
986
+ b(k, {
987
+ modelValue: f.value,
988
+ "onUpdate:modelValue": c[5] || (c[5] = (j) => f.value = j),
989
+ images: r.value,
990
+ "start-index": p.value
991
+ }, null, 8, ["modelValue", "images", "start-index"])
992
+ ], 64);
993
+ };
968
994
  }
969
- }), Yt = ["onClick"], es = /* @__PURE__ */ w({
995
+ }), cs = ["onClick"], us = /* @__PURE__ */ C({
970
996
  __name: "CopyNotification",
971
- setup(l, { expose: o }) {
972
- const i = M([]);
997
+ setup(l, { expose: i }) {
998
+ const n = w([]);
973
999
  let e = 1;
974
1000
  const s = () => {
975
- if (i.value.length >= 10) {
976
- const p = i.value[0];
977
- clearTimeout(p.timer), i.value.shift();
1001
+ if (n.value.length >= 10) {
1002
+ const g = n.value[0];
1003
+ clearTimeout(g.timer), n.value.shift();
978
1004
  }
979
- const u = {
1005
+ const p = {
980
1006
  id: e++,
981
1007
  timer: setTimeout(() => {
982
- m(u.id);
1008
+ f(p.id);
983
1009
  }, 1500)
984
1010
  };
985
- i.value.push(u);
986
- }, m = (u) => {
987
- const p = i.value.findIndex((d) => d.id === u);
988
- if (p !== -1) {
989
- const d = i.value[p];
990
- clearTimeout(d.timer), i.value.splice(p, 1);
1011
+ n.value.push(p);
1012
+ }, f = (p) => {
1013
+ const g = n.value.findIndex((u) => u.id === p);
1014
+ if (g !== -1) {
1015
+ const u = n.value[g];
1016
+ clearTimeout(u.timer), n.value.splice(g, 1);
991
1017
  }
992
1018
  };
993
- return o({
1019
+ return i({
994
1020
  addNotification: s
995
- }), G(() => {
996
- i.value.forEach((u) => {
997
- clearTimeout(u.timer);
1021
+ }), ne(() => {
1022
+ n.value.forEach((p) => {
1023
+ clearTimeout(p.timer);
998
1024
  });
999
- }), (u, p) => (n(), C(ie, { to: "body" }, [
1000
- v(he, {
1025
+ }), (p, g) => (o(), D(ye, { to: "body" }, [
1026
+ b($e, {
1001
1027
  name: "notification",
1002
1028
  tag: "div",
1003
1029
  class: "fixed top-4 right-4 z-50 space-y-2"
1004
1030
  }, {
1005
- default: ge(() => [
1006
- (n(!0), a(D, null, L(i.value, (d) => (n(), a("div", {
1007
- key: d.id,
1031
+ default: Ce(() => [
1032
+ (o(!0), a(z, null, F(n.value, (u) => (o(), a("div", {
1033
+ key: u.id,
1008
1034
  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"
1009
1035
  }, [
1010
- v(g($e), { class: "h-5 w-5 text-green-100 flex-shrink-0" }),
1011
- p[0] || (p[0] = t("div", { class: "flex-1" }, [
1036
+ b(y(Ae), { class: "h-5 w-5 text-green-100 flex-shrink-0" }),
1037
+ g[0] || (g[0] = t("div", { class: "flex-1" }, [
1012
1038
  t("p", { class: "font-medium text-sm" }, "Ссылка скопирована!"),
1013
1039
  t("p", { class: "text-xs text-green-100 opacity-90" }, "Файл добавлен в буфер обмена")
1014
1040
  ], -1)),
1015
1041
  t("button", {
1016
- onClick: (c) => m(d.id),
1042
+ onClick: (m) => f(u.id),
1017
1043
  class: "text-green-100 hover:text-white transition-colors flex-shrink-0"
1018
1044
  }, [
1019
- v(g(O), { class: "h-4 w-4" })
1020
- ], 8, Yt)
1045
+ b(y(X), { class: "h-4 w-4" })
1046
+ ], 8, cs)
1021
1047
  ]))), 128))
1022
1048
  ]),
1023
1049
  _: 1
1024
1050
  })
1025
1051
  ]));
1026
1052
  }
1027
- }), S = (l, o) => {
1028
- const i = l.__vccOpts || l;
1029
- for (const [e, s] of o)
1030
- i[e] = s;
1031
- return i;
1032
- }, ce = /* @__PURE__ */ S(es, [["__scopeId", "data-v-7b0d3ace"]]), ts = { class: "fixed inset-0 z-50 bg-black/80" }, ss = { 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" }, os = { class: "flex flex-col space-y-1.5 text-center sm:text-left p-4 pb-2" }, ns = { class: "flex items-center justify-between" }, is = { class: "flex items-center gap-2" }, as = { class: "tracking-tight text-base font-medium" }, rs = { class: "p-4 pt-0" }, ls = { class: "flex flex-col items-center" }, ds = ["src", "alt"], cs = { class: "mt-3 flex items-center gap-4 text-sm text-gray-600" }, us = { class: "mt-3 flex gap-2" }, ps = /* @__PURE__ */ w({
1053
+ }), B = (l, i) => {
1054
+ const n = l.__vccOpts || l;
1055
+ for (const [e, s] of i)
1056
+ n[e] = s;
1057
+ return n;
1058
+ }, _e = /* @__PURE__ */ B(us, [["__scopeId", "data-v-7b0d3ace"]]), ps = { class: "fixed inset-0 z-50 bg-black/80" }, ms = { 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" }, gs = { class: "flex flex-col space-y-1.5 text-center sm:text-left p-4 pb-2" }, hs = { class: "flex items-center justify-between" }, fs = { class: "flex items-center gap-2" }, vs = { class: "tracking-tight text-base font-medium" }, ys = { class: "p-4 pt-0" }, bs = { class: "flex flex-col items-center" }, xs = ["src", "alt"], ks = { class: "mt-3 flex items-center gap-4 text-sm text-gray-600" }, ws = { class: "mt-3 flex gap-2" }, _s = /* @__PURE__ */ C({
1033
1059
  __name: "GalleryModal",
1034
1060
  props: {
1035
1061
  item: {}
1036
1062
  },
1037
1063
  emits: ["close"],
1038
1064
  setup(l) {
1039
- const o = M(), i = (u) => new Date(u).toLocaleDateString("uk-UA", {
1065
+ const i = w(), n = (p) => new Date(p).toLocaleDateString("uk-UA", {
1040
1066
  day: "2-digit",
1041
1067
  month: "2-digit",
1042
1068
  year: "numeric"
1043
- }), e = (u) => u >= 1024 * 1024 * 1024 ? (u / (1024 * 1024 * 1024)).toFixed(2) + " GB" : u >= 1024 * 1024 ? (u / (1024 * 1024)).toFixed(2) + " MB" : u >= 1024 ? (u / 1024).toFixed(2) + " KB" : u + " B", s = (u) => {
1044
- navigator.clipboard.writeText(u), o.value?.addNotification();
1045
- }, m = async (u, p) => {
1069
+ }), e = (p) => p >= 1024 * 1024 * 1024 ? (p / (1024 * 1024 * 1024)).toFixed(2) + " GB" : p >= 1024 * 1024 ? (p / (1024 * 1024)).toFixed(2) + " MB" : p >= 1024 ? (p / 1024).toFixed(2) + " KB" : p + " B", s = (p) => {
1070
+ navigator.clipboard.writeText(p), i.value?.addNotification();
1071
+ }, f = async (p, g) => {
1046
1072
  try {
1047
- const c = await (await fetch(u)).blob(), r = window.URL.createObjectURL(c), h = document.createElement("a");
1048
- h.href = r, h.download = p, document.body.appendChild(h), h.click(), window.URL.revokeObjectURL(r), document.body.removeChild(h);
1049
- } catch (d) {
1050
- console.error("Download failed:", d), alert("Download failed. Please try opening the image in a new tab.");
1073
+ const m = await (await fetch(p)).blob(), r = window.URL.createObjectURL(m), h = document.createElement("a");
1074
+ h.href = r, h.download = g, document.body.appendChild(h), h.click(), window.URL.revokeObjectURL(r), document.body.removeChild(h);
1075
+ } catch (u) {
1076
+ console.error("Download failed:", u), alert("Download failed. Please try opening the image in a new tab.");
1051
1077
  }
1052
1078
  };
1053
- return (u, p) => (n(), a("div", ts, [
1054
- t("div", ss, [
1055
- t("div", os, [
1056
- t("div", ns, [
1057
- t("div", is, [
1058
- t("h2", as, f(u.item.name), 1)
1079
+ return (p, g) => (o(), a("div", ps, [
1080
+ t("div", ms, [
1081
+ t("div", gs, [
1082
+ t("div", hs, [
1083
+ t("div", fs, [
1084
+ t("h2", vs, v(p.item.name), 1)
1059
1085
  ])
1060
1086
  ])
1061
1087
  ]),
1062
- t("div", rs, [
1063
- t("div", ls, [
1088
+ t("div", ys, [
1089
+ t("div", bs, [
1064
1090
  t("img", {
1065
- src: u.item.path,
1066
- alt: u.item.name,
1091
+ src: p.item.path,
1092
+ alt: p.item.name,
1067
1093
  class: "max-w-full max-h-[60vh] object-contain rounded border"
1068
- }, null, 8, ds),
1069
- t("div", cs, [
1070
- t("span", null, "Size: " + f(e(u.item.size)), 1),
1071
- p[3] || (p[3] = t("span", null, "•", -1)),
1072
- t("span", null, "Date: " + f(i(u.item.createdAt)), 1)
1094
+ }, null, 8, xs),
1095
+ t("div", ks, [
1096
+ t("span", null, "Size: " + v(e(p.item.size)), 1),
1097
+ g[3] || (g[3] = t("span", null, "•", -1)),
1098
+ t("span", null, "Date: " + v(n(p.item.createdAt)), 1)
1073
1099
  ]),
1074
- t("div", us, [
1100
+ t("div", ws, [
1075
1101
  t("button", {
1076
- onClick: p[0] || (p[0] = (d) => m(u.item.path, u.item.name)),
1102
+ onClick: g[0] || (g[0] = (u) => f(p.item.path, p.item.name)),
1077
1103
  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"
1078
1104
  }, [
1079
- v(g(K), { class: "h-3 w-3 mr-1" }),
1080
- p[4] || (p[4] = H(" Download ", -1))
1105
+ b(y(ie), { class: "h-3 w-3 mr-1" }),
1106
+ g[4] || (g[4] = V(" Download ", -1))
1081
1107
  ]),
1082
1108
  t("button", {
1083
- onClick: p[1] || (p[1] = (d) => s(u.item.path)),
1109
+ onClick: g[1] || (g[1] = (u) => s(p.item.path)),
1084
1110
  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"
1085
1111
  }, [
1086
- v(g(ze), { class: "h-3 w-3 mr-1" }),
1087
- p[5] || (p[5] = H(" Share ", -1))
1112
+ b(y(We), { class: "h-3 w-3 mr-1" }),
1113
+ g[5] || (g[5] = V(" Share ", -1))
1088
1114
  ])
1089
1115
  ])
1090
1116
  ])
1091
1117
  ]),
1092
1118
  t("button", {
1093
1119
  type: "button",
1094
- onClick: p[2] || (p[2] = (d) => u.$emit("close")),
1120
+ onClick: g[2] || (g[2] = (u) => p.$emit("close")),
1095
1121
  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"
1096
1122
  }, [
1097
- v(g(O), { class: "h-4 w-4" }),
1098
- p[6] || (p[6] = t("span", { class: "sr-only" }, "Close", -1))
1123
+ b(y(X), { class: "h-4 w-4" }),
1124
+ g[6] || (g[6] = t("span", { class: "sr-only" }, "Close", -1))
1099
1125
  ])
1100
1126
  ]),
1101
- v(ce, {
1127
+ b(_e, {
1102
1128
  ref_key: "copyNotificationRef",
1103
- ref: o
1129
+ ref: i
1104
1130
  }, null, 512)
1105
1131
  ]));
1106
1132
  }
1107
- }), ms = {
1133
+ }), $s = {
1108
1134
  key: 0,
1109
1135
  class: "text-xl font-semibold text-gray-900 mb-4"
1110
- }, hs = ["onClick"], gs = ["src", "alt"], se = /* @__PURE__ */ w({
1136
+ }, Cs = ["onClick"], Ms = ["src", "alt"], he = /* @__PURE__ */ C({
1111
1137
  __name: "GalleryWidget",
1112
1138
  props: {
1113
1139
  title: {},
@@ -1119,78 +1145,78 @@ const Lt = { class: "space-y-0.5" }, Ht = { class: "flex-1 min-w-0 cursor-pointe
1119
1145
  style: {}
1120
1146
  },
1121
1147
  setup(l) {
1122
- const o = l, i = M(!1), e = M(null), s = M(), m = M(0);
1123
- let u = null;
1124
- const p = I(() => {
1125
- const r = o.columns || 4;
1126
- return m.value >= 1440 ? r : m.value >= 1024 ? Math.max(1, r - 1) : m.value >= 768 ? Math.max(1, r - 2) : m.value >= 640 ? Math.max(1, r - 3) : 1;
1127
- }), d = () => {
1128
- s.value && (m.value = s.value.offsetWidth);
1148
+ const i = l, n = w(!1), e = w(null), s = w(), f = w(0);
1149
+ let p = null;
1150
+ const g = A(() => {
1151
+ const r = i.columns || 4;
1152
+ return f.value >= 1440 ? r : f.value >= 1024 ? Math.max(1, r - 1) : f.value >= 768 ? Math.max(1, r - 2) : f.value >= 640 ? Math.max(1, r - 3) : 1;
1153
+ }), u = () => {
1154
+ s.value && (f.value = s.value.offsetWidth);
1129
1155
  };
1130
- ne(() => {
1131
- fe(() => {
1132
- s.value && (u = new ResizeObserver((r) => {
1156
+ oe(() => {
1157
+ Me(() => {
1158
+ s.value && (p = new ResizeObserver((r) => {
1133
1159
  for (const h of r)
1134
- h.target === s.value && (m.value = h.contentRect.width);
1135
- }), u.observe(s.value), d());
1160
+ h.target === s.value && (f.value = h.contentRect.width);
1161
+ }), p.observe(s.value), u());
1136
1162
  });
1137
- }), G(() => {
1138
- u && u.disconnect();
1163
+ }), ne(() => {
1164
+ p && p.disconnect();
1139
1165
  });
1140
- const c = (r) => {
1141
- e.value = r, i.value = !0;
1166
+ const m = (r) => {
1167
+ e.value = r, n.value = !0;
1142
1168
  };
1143
- return (r, h) => (n(), a("div", {
1169
+ return (r, h) => (o(), a("div", {
1144
1170
  class: "w-full mx-auto font-sans",
1145
1171
  ref_key: "containerRef",
1146
1172
  ref: s
1147
1173
  }, [
1148
- r.title ? (n(), a("h3", ms, f(r.title), 1)) : b("", !0),
1174
+ r.title ? (o(), a("h3", $s, v(r.title), 1)) : x("", !0),
1149
1175
  t("div", {
1150
- class: x(r.maxHeight ? "overflow-y-auto" : ""),
1151
- style: z({ maxHeight: r.maxHeight + "px" })
1176
+ class: _(r.maxHeight ? "overflow-y-auto" : ""),
1177
+ style: E({ maxHeight: r.maxHeight + "px" })
1152
1178
  }, [
1153
1179
  t("div", {
1154
- style: z({ columns: p.value + " auto", gap: "12px" }),
1180
+ style: E({ columns: g.value + " auto", gap: "12px" }),
1155
1181
  class: "space-y-3"
1156
1182
  }, [
1157
- (n(!0), a(D, null, L(r.items, (j) => (n(), a("div", {
1158
- key: j.id,
1159
- onClick: (X) => c(j),
1183
+ (o(!0), a(z, null, F(r.items, (I) => (o(), a("div", {
1184
+ key: I.id,
1185
+ onClick: (H) => m(I),
1160
1186
  class: "group relative break-inside-avoid bg-gray-200 rounded-lg overflow-hidden cursor-pointer hover:shadow-md transition-all mb-3"
1161
1187
  }, [
1162
1188
  t("img", {
1163
- src: j.path,
1164
- alt: j.name,
1189
+ src: I.path,
1190
+ alt: I.name,
1165
1191
  class: "w-full h-auto min-h-40 rounded-md object-contain"
1166
- }, null, 8, gs),
1192
+ }, null, 8, Ms),
1167
1193
  h[1] || (h[1] = t("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" }, [
1168
1194
  t("h3", { class: "text-white font-medium text-base leading-tight mb-1" }, "Mountain Landscape"),
1169
1195
  t("p", { class: "text-white/90 text-sm" }, "2.4 MB")
1170
1196
  ], -1)),
1171
1197
  h[2] || (h[2] = t("div", { class: "absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors duration-200" }, null, -1))
1172
- ], 8, hs))), 128))
1198
+ ], 8, Cs))), 128))
1173
1199
  ], 4)
1174
1200
  ], 6),
1175
- (n(), C(ie, { to: "body" }, [
1176
- i.value && e.value ? (n(), C(ps, {
1201
+ (o(), D(ye, { to: "body" }, [
1202
+ n.value && e.value ? (o(), D(_s, {
1177
1203
  key: 0,
1178
1204
  item: e.value,
1179
- onClose: h[0] || (h[0] = (j) => i.value = !1)
1180
- }, null, 8, ["item"])) : b("", !0)
1205
+ onClose: h[0] || (h[0] = (I) => n.value = !1)
1206
+ }, null, 8, ["item"])) : x("", !0)
1181
1207
  ]))
1182
1208
  ], 512));
1183
1209
  }
1184
- }), fs = {
1210
+ }), Ls = {
1185
1211
  key: 0,
1186
1212
  class: "overflow-hidden"
1187
- }, ys = { class: "flex border-b border-gray-200 bg-gray-50" }, vs = ["onClick"], bs = { class: "p-4" }, xs = ["innerHTML"], ks = {
1213
+ }, Ds = { class: "flex border-b border-gray-200 bg-gray-50" }, Ts = ["onClick"], js = { class: "p-4" }, Is = ["innerHTML"], Vs = {
1188
1214
  key: 1,
1189
1215
  class: "p-4"
1190
- }, _s = { class: "grid grid-cols-12 gap-4" }, ws = {
1216
+ }, zs = { class: "grid grid-cols-12 gap-4" }, Fs = {
1191
1217
  key: 0,
1192
1218
  class: "mb-4 pb-2 border-b border-gray-200"
1193
- }, $s = { class: "text-lg font-semibold text-gray-900" }, Cs = ["innerHTML"], Ms = /* @__PURE__ */ w({
1219
+ }, As = { class: "text-lg font-semibold text-gray-900" }, Hs = ["innerHTML"], Ss = /* @__PURE__ */ C({
1194
1220
  __name: "Card",
1195
1221
  props: {
1196
1222
  panels: { default: () => [] },
@@ -1201,91 +1227,91 @@ const Lt = { class: "space-y-0.5" }, Ht = { class: "flex-1 min-w-0 cursor-pointe
1201
1227
  style: {}
1202
1228
  },
1203
1229
  setup(l) {
1204
- const o = l, i = M(0), e = I(() => o.panels && o.panels.length > 0 ? o.panels : o.data && Array.isArray(o.data) ? o.data.filter((c) => c.type === "tabs")[0]?.items || [] : []), s = I(() => o.panels && o.panels.length > 0 ? o.panels : o.data && Array.isArray(o.data) ? o.data : []), m = I(() => ({
1205
- [`view-${o.view}`]: !0
1206
- })), u = (d) => {
1207
- const c = {};
1208
- return d.count && (c.count = d.count), d.col && (c.col = d.col), o.data && d.name && Object.assign(c, o.data[d.name]), c;
1209
- }, p = (d) => d.width ? {
1210
- gridColumn: `span ${d.width}`
1230
+ const i = l, n = w(0), e = A(() => i.panels && i.panels.length > 0 ? i.panels : i.data && Array.isArray(i.data) ? i.data.filter((m) => m.type === "tabs")[0]?.items || [] : []), s = A(() => i.panels && i.panels.length > 0 ? i.panels : i.data && Array.isArray(i.data) ? i.data : []), f = A(() => ({
1231
+ [`view-${i.view}`]: !0
1232
+ })), p = (u) => {
1233
+ const m = {};
1234
+ return u.count && (m.count = u.count), u.col && (m.col = u.col), i.data && u.name && Object.assign(m, i.data[u.name]), m;
1235
+ }, g = (u) => u.width ? {
1236
+ gridColumn: `span ${u.width}`
1211
1237
  } : {};
1212
- return (d, c) => (n(), a("div", {
1213
- class: x(["bg-white rounded-lg shadow-sm border border-gray-200", m.value])
1238
+ return (u, m) => (o(), a("div", {
1239
+ class: _(["bg-white rounded-lg shadow-sm border border-gray-200", f.value])
1214
1240
  }, [
1215
- d.view === "tab" ? (n(), a("div", fs, [
1216
- t("div", ys, [
1217
- (n(!0), a(D, null, L(e.value, (r, h) => (n(), a("button", {
1241
+ u.view === "tab" ? (o(), a("div", Ls, [
1242
+ t("div", Ds, [
1243
+ (o(!0), a(z, null, F(e.value, (r, h) => (o(), a("button", {
1218
1244
  key: r.name || h,
1219
- onClick: (j) => i.value = h,
1220
- class: x([
1245
+ onClick: (I) => n.value = h,
1246
+ class: _([
1221
1247
  "px-4 py-3 text-sm font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-100 transition-colors",
1222
- { "text-blue-600 bg-white border-b-2 border-blue-600": i.value === h }
1248
+ { "text-blue-600 bg-white border-b-2 border-blue-600": n.value === h }
1223
1249
  ])
1224
- }, f(r.title || r.label || r.name || `Tab ${h + 1}`), 11, vs))), 128))
1250
+ }, v(r.title || r.label || r.name || `Tab ${h + 1}`), 11, Ts))), 128))
1225
1251
  ]),
1226
- t("div", bs, [
1227
- (n(!0), a(D, null, L(e.value, (r, h) => P((n(), a("div", {
1252
+ t("div", js, [
1253
+ (o(!0), a(z, null, F(e.value, (r, h) => O((o(), a("div", {
1228
1254
  key: r.name || h,
1229
- class: x([
1255
+ class: _([
1230
1256
  "min-h-[400px] w-full",
1231
1257
  `col-span-${r.col || 12}`
1232
1258
  ])
1233
1259
  }, [
1234
- r.html ? (n(), a("div", {
1260
+ r.html ? (o(), a("div", {
1235
1261
  key: 0,
1236
1262
  innerHTML: r.html,
1237
1263
  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"
1238
- }, null, 8, xs)) : d.$slots[`tab-${h}`] ? F(d.$slots, `tab-${h}`, {
1264
+ }, null, 8, Is)) : u.$slots[`tab-${h}`] ? U(u.$slots, `tab-${h}`, {
1239
1265
  key: 1,
1240
1266
  item: r,
1241
- data: d.data
1242
- }) : r.component ? (n(), C(T(r.component), U({
1267
+ data: u.data
1268
+ }) : r.component ? (o(), D(S(r.component), te({
1243
1269
  key: 2,
1244
1270
  ref_for: !0
1245
- }, u(r), { class: "w-full h-full" }), null, 16)) : F(d.$slots, r.slot || `tab-${h}`, {
1271
+ }, p(r), { class: "w-full h-full" }), null, 16)) : U(u.$slots, r.slot || `tab-${h}`, {
1246
1272
  key: 3,
1247
1273
  item: r,
1248
- data: d.data
1274
+ data: u.data
1249
1275
  })
1250
1276
  ], 2)), [
1251
- [ye, i.value === h]
1277
+ [Le, n.value === h]
1252
1278
  ])), 128))
1253
1279
  ])
1254
- ])) : (n(), a("div", ks, [
1255
- t("div", _s, [
1256
- (n(!0), a(D, null, L(s.value, (r, h) => (n(), a("div", {
1280
+ ])) : (o(), a("div", Vs, [
1281
+ t("div", zs, [
1282
+ (o(!0), a(z, null, F(s.value, (r, h) => (o(), a("div", {
1257
1283
  key: r.name || h,
1258
- class: x([
1284
+ class: _([
1259
1285
  "bg-gray-50 rounded-lg p-4 min-h-[300px]",
1260
1286
  `col-span-${r.col || 12}`
1261
1287
  ]),
1262
- style: z(p(r))
1288
+ style: E(g(r))
1263
1289
  }, [
1264
- r.title || r.label ? (n(), a("div", ws, [
1265
- t("h3", $s, f(r.title || r.label), 1)
1266
- ])) : b("", !0),
1267
- r.html ? (n(), a("div", {
1290
+ r.title || r.label ? (o(), a("div", Fs, [
1291
+ t("h3", As, v(r.title || r.label), 1)
1292
+ ])) : x("", !0),
1293
+ r.html ? (o(), a("div", {
1268
1294
  key: 1,
1269
1295
  innerHTML: r.html,
1270
1296
  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"
1271
- }, null, 8, Cs)) : d.$slots[`panel-${h}`] ? F(d.$slots, `panel-${h}`, {
1297
+ }, null, 8, Hs)) : u.$slots[`panel-${h}`] ? U(u.$slots, `panel-${h}`, {
1272
1298
  key: 2,
1273
1299
  item: r,
1274
- data: d.data
1275
- }) : r.component ? (n(), C(T(r.component), U({
1300
+ data: u.data
1301
+ }) : r.component ? (o(), D(S(r.component), te({
1276
1302
  key: 3,
1277
1303
  ref_for: !0
1278
- }, u(r), { class: "w-full h-full" }), null, 16)) : F(d.$slots, r.slot || `panel-${h}`, {
1304
+ }, p(r), { class: "w-full h-full" }), null, 16)) : U(u.$slots, r.slot || `panel-${h}`, {
1279
1305
  key: 4,
1280
1306
  item: r,
1281
- data: d.data
1307
+ data: u.data
1282
1308
  })
1283
1309
  ], 6))), 128))
1284
1310
  ])
1285
1311
  ]))
1286
1312
  ], 2));
1287
1313
  }
1288
- }), Ds = ["innerHTML"], Ls = /* @__PURE__ */ w({
1314
+ }), Es = ["innerHTML"], Os = /* @__PURE__ */ C({
1289
1315
  __name: "CardItem",
1290
1316
  props: {
1291
1317
  name: {},
@@ -1300,44 +1326,44 @@ const Lt = { class: "space-y-0.5" }, Ht = { class: "flex-1 min-w-0 cursor-pointe
1300
1326
  style: {}
1301
1327
  },
1302
1328
  setup(l) {
1303
- const o = l, i = I(() => ({
1304
- [`col-span-${o.col}`]: !0
1305
- })), e = I(() => {
1329
+ const i = l, n = A(() => ({
1330
+ [`col-span-${i.col}`]: !0
1331
+ })), e = A(() => {
1306
1332
  const s = {};
1307
1333
  return s.col && (s.col = s.col), s;
1308
1334
  });
1309
- return (s, m) => (n(), a("div", {
1310
- class: x(["w-full", i.value])
1335
+ return (s, f) => (o(), a("div", {
1336
+ class: _(["w-full", n.value])
1311
1337
  }, [
1312
- s.html ? (n(), a("div", {
1338
+ s.html ? (o(), a("div", {
1313
1339
  key: 0,
1314
1340
  innerHTML: s.html,
1315
1341
  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"
1316
- }, null, 8, Ds)) : s.component ? (n(), C(T(s.component), U({ key: 1 }, e.value, { class: "w-full" }), null, 16)) : F(s.$slots, "default", { key: 2 })
1342
+ }, null, 8, Es)) : s.component ? (o(), D(S(s.component), te({ key: 1 }, e.value, { class: "w-full" }), null, 16)) : U(s.$slots, "default", { key: 2 })
1317
1343
  ], 2));
1318
1344
  }
1319
- }), Hs = { class: "text-value" }, Is = { class: "text-sm text-gray-900" }, js = /* @__PURE__ */ w({
1345
+ }), Bs = { class: "text-value" }, Rs = { class: "text-sm text-gray-900" }, Ns = /* @__PURE__ */ C({
1320
1346
  __name: "TextValue",
1321
1347
  props: {
1322
1348
  item: {}
1323
1349
  },
1324
1350
  setup(l) {
1325
- const o = l, i = I(() => {
1326
- const e = o.item.value;
1351
+ const i = l, n = A(() => {
1352
+ const e = i.item.value;
1327
1353
  return typeof e == "boolean" ? e ? "Так" : "Ні" : e == null ? "—" : String(e);
1328
1354
  });
1329
- return (e, s) => (n(), a("div", Hs, [
1330
- t("span", Is, f(i.value), 1)
1355
+ return (e, s) => (o(), a("div", Bs, [
1356
+ t("span", Rs, v(n.value), 1)
1331
1357
  ]));
1332
1358
  }
1333
- }), Ts = /* @__PURE__ */ S(js, [["__scopeId", "data-v-c14550b7"]]), zs = { class: "link-value" }, Ss = ["href"], Vs = /* @__PURE__ */ w({
1359
+ }), Us = /* @__PURE__ */ B(Ns, [["__scopeId", "data-v-c14550b7"]]), Ws = { class: "link-value" }, Gs = ["href"], qs = /* @__PURE__ */ C({
1334
1360
  __name: "LinkValue",
1335
1361
  props: {
1336
1362
  item: {}
1337
1363
  },
1338
1364
  setup(l) {
1339
- const o = l, i = I(() => {
1340
- const e = String(o.item.value);
1365
+ const i = l, n = A(() => {
1366
+ const e = String(i.item.value);
1341
1367
  try {
1342
1368
  const s = new URL(e);
1343
1369
  return s.hostname + s.pathname;
@@ -1345,26 +1371,26 @@ const Lt = { class: "space-y-0.5" }, Ht = { class: "flex-1 min-w-0 cursor-pointe
1345
1371
  return e;
1346
1372
  }
1347
1373
  });
1348
- return (e, s) => (n(), a("div", zs, [
1374
+ return (e, s) => (o(), a("div", Ws, [
1349
1375
  t("a", {
1350
1376
  href: String(e.item.value),
1351
1377
  target: "_blank",
1352
1378
  rel: "noopener noreferrer",
1353
1379
  class: "text-blue-600 hover:text-blue-800 underline text-sm"
1354
1380
  }, [
1355
- H(f(i.value) + " ", 1),
1381
+ V(v(n.value) + " ", 1),
1356
1382
  s[0] || (s[0] = t("i", { class: "fas fa-external-link-alt ml-1 text-xs" }, null, -1))
1357
- ], 8, Ss)
1383
+ ], 8, Gs)
1358
1384
  ]));
1359
1385
  }
1360
- }), Fs = /* @__PURE__ */ S(Vs, [["__scopeId", "data-v-e6eb07a6"]]), Rs = { class: "date-value" }, As = { class: "text-sm text-gray-900" }, Es = /* @__PURE__ */ w({
1386
+ }), Ps = /* @__PURE__ */ B(qs, [["__scopeId", "data-v-e6eb07a6"]]), Ks = { class: "date-value" }, Zs = { class: "text-sm text-gray-900" }, Js = /* @__PURE__ */ C({
1361
1387
  __name: "DateValue",
1362
1388
  props: {
1363
1389
  item: {}
1364
1390
  },
1365
1391
  setup(l) {
1366
- const o = l, i = I(() => {
1367
- const e = o.item.value;
1392
+ const i = l, n = A(() => {
1393
+ const e = i.item.value;
1368
1394
  if (e instanceof Date)
1369
1395
  return e.toLocaleDateString("uk-UA", {
1370
1396
  year: "numeric",
@@ -1386,21 +1412,21 @@ const Lt = { class: "space-y-0.5" }, Ht = { class: "flex-1 min-w-0 cursor-pointe
1386
1412
  }
1387
1413
  return String(e);
1388
1414
  });
1389
- return (e, s) => (n(), a("div", Rs, [
1390
- t("span", As, f(i.value), 1)
1415
+ return (e, s) => (o(), a("div", Ks, [
1416
+ t("span", Zs, v(n.value), 1)
1391
1417
  ]));
1392
1418
  }
1393
- }), Ns = /* @__PURE__ */ S(Es, [["__scopeId", "data-v-b9600618"]]), Os = { class: "status-value" }, Bs = {
1419
+ }), Xs = /* @__PURE__ */ B(Js, [["__scopeId", "data-v-b9600618"]]), Qs = { class: "status-value" }, Ys = {
1394
1420
  key: 0,
1395
1421
  class: "mr-1"
1396
- }, Us = /* @__PURE__ */ w({
1422
+ }, eo = /* @__PURE__ */ C({
1397
1423
  __name: "StatusValue",
1398
1424
  props: {
1399
1425
  item: {}
1400
1426
  },
1401
1427
  setup(l) {
1402
- const o = l, i = I(() => {
1403
- switch (String(o.item.value).toLowerCase()) {
1428
+ const i = l, n = A(() => {
1429
+ switch (String(i.item.value).toLowerCase()) {
1404
1430
  case "active":
1405
1431
  case "активний":
1406
1432
  case "успішно":
@@ -1422,8 +1448,8 @@ const Lt = { class: "space-y-0.5" }, Ht = { class: "flex-1 min-w-0 cursor-pointe
1422
1448
  default:
1423
1449
  return "bg-blue-100 text-blue-800";
1424
1450
  }
1425
- }), e = I(() => {
1426
- switch (String(o.item.value).toLowerCase()) {
1451
+ }), e = A(() => {
1452
+ switch (String(i.item.value).toLowerCase()) {
1427
1453
  case "active":
1428
1454
  case "активний":
1429
1455
  case "успішно":
@@ -1446,50 +1472,50 @@ const Lt = { class: "space-y-0.5" }, Ht = { class: "flex-1 min-w-0 cursor-pointe
1446
1472
  return "fas fa-info-circle";
1447
1473
  }
1448
1474
  });
1449
- return (s, m) => (n(), a("div", Os, [
1475
+ return (s, f) => (o(), a("div", Qs, [
1450
1476
  t("span", {
1451
- class: x(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium", i.value])
1477
+ class: _(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium", n.value])
1452
1478
  }, [
1453
- e.value ? (n(), a("span", Bs, [
1479
+ e.value ? (o(), a("span", Ys, [
1454
1480
  t("i", {
1455
- class: x(e.value)
1481
+ class: _(e.value)
1456
1482
  }, null, 2)
1457
- ])) : b("", !0),
1458
- H(" " + f(String(s.item.value)), 1)
1483
+ ])) : x("", !0),
1484
+ V(" " + v(String(s.item.value)), 1)
1459
1485
  ], 2)
1460
1486
  ]));
1461
1487
  }
1462
- }), qs = /* @__PURE__ */ S(Us, [["__scopeId", "data-v-c72e0b01"]]), Ws = { class: "custom-value" }, Ps = { class: "text-sm text-gray-900" }, Gs = /* @__PURE__ */ w({
1488
+ }), to = /* @__PURE__ */ B(eo, [["__scopeId", "data-v-c72e0b01"]]), so = { class: "custom-value" }, oo = { class: "text-sm text-gray-900" }, no = /* @__PURE__ */ C({
1463
1489
  __name: "CustomValue",
1464
1490
  props: {
1465
1491
  item: {}
1466
1492
  },
1467
1493
  setup(l) {
1468
- return (o, i) => (n(), a("div", Ws, [
1469
- F(o.$slots, "default", {
1470
- item: o.item,
1471
- value: o.item.value
1494
+ return (i, n) => (o(), a("div", so, [
1495
+ U(i.$slots, "default", {
1496
+ item: i.item,
1497
+ value: i.item.value
1472
1498
  }, () => [
1473
- t("span", Ps, f(String(o.item.value)), 1)
1499
+ t("span", oo, v(String(i.item.value)), 1)
1474
1500
  ], !0)
1475
1501
  ]));
1476
1502
  }
1477
- }), Ks = /* @__PURE__ */ S(Gs, [["__scopeId", "data-v-11a73810"]]), Zs = ["id"], Xs = {
1503
+ }), io = /* @__PURE__ */ B(no, [["__scopeId", "data-v-11a73810"]]), lo = ["id"], ao = {
1478
1504
  key: 0,
1479
1505
  class: "text-xl font-semibold text-gray-900 mb-4"
1480
- }, Js = {
1506
+ }, ro = {
1481
1507
  key: 1,
1482
1508
  class: "overflow-x-auto"
1483
- }, 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 = {
1509
+ }, co = { class: "min-w-full divide-y divide-gray-200" }, uo = { class: "bg-white divide-y divide-gray-200" }, po = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, mo = { class: "flex items-center gap-2" }, go = ["title"], ho = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, fo = {
1484
1510
  key: 2,
1485
1511
  class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"
1486
- }, io = { class: "flex items-start gap-3" }, ao = {
1512
+ }, vo = { class: "flex items-start gap-3" }, yo = {
1487
1513
  key: 0,
1488
1514
  class: "flex-shrink-0"
1489
- }, ro = { class: "flex-1 min-w-0" }, lo = { class: "flex items-center gap-2 mb-2" }, co = { class: "text-sm font-medium text-gray-900" }, uo = ["title"], po = {
1515
+ }, bo = { class: "flex-1 min-w-0" }, xo = { class: "flex items-center gap-2 mb-2" }, ko = { class: "text-sm font-medium text-gray-900" }, wo = ["title"], _o = {
1490
1516
  key: 3,
1491
1517
  class: "overflow-x-auto"
1492
- }, mo = { class: "min-w-full divide-y divide-gray-200" }, ho = { class: "bg-white divide-y divide-gray-200" }, go = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, fo = { class: "flex items-center gap-2" }, yo = ["title"], vo = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, bo = /* @__PURE__ */ w({
1518
+ }, $o = { class: "min-w-full divide-y divide-gray-200" }, Co = { class: "bg-white divide-y divide-gray-200" }, Mo = { class: "px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900" }, Lo = { class: "flex items-center gap-2" }, Do = ["title"], To = { class: "px-6 py-4 whitespace-nowrap text-sm text-gray-500" }, jo = /* @__PURE__ */ C({
1493
1519
  __name: "DescriptionListWidget",
1494
1520
  props: {
1495
1521
  title: {},
@@ -1500,124 +1526,407 @@ const Lt = { class: "space-y-0.5" }, Ht = { class: "flex-1 min-w-0 cursor-pointe
1500
1526
  style: {}
1501
1527
  },
1502
1528
  setup(l) {
1503
- const o = (i) => {
1504
- switch (i.type) {
1529
+ const i = (n) => {
1530
+ switch (n.type) {
1505
1531
  case "link":
1506
- return Fs;
1532
+ return Ps;
1507
1533
  case "date":
1508
- return Ns;
1534
+ return Xs;
1509
1535
  case "status":
1510
- return qs;
1536
+ return to;
1511
1537
  case "custom":
1512
- return Ks;
1538
+ return io;
1513
1539
  default:
1514
- return Ts;
1540
+ return Us;
1515
1541
  }
1516
1542
  };
1517
- return (i, e) => (n(), a("div", {
1518
- class: x(["description-list-widget", i.className]),
1519
- id: i.id,
1520
- style: z(i.style)
1543
+ return (n, e) => (o(), a("div", {
1544
+ class: _(["description-list-widget", n.className]),
1545
+ id: n.id,
1546
+ style: E(n.style)
1521
1547
  }, [
1522
- i.title ? (n(), a("h3", Xs, f(i.title), 1)) : b("", !0),
1523
- i.view === "table" ? (n(), a("div", Js, [
1524
- t("table", Qs, [
1525
- t("tbody", Ys, [
1526
- (n(!0), a(D, null, L(i.items, (s) => (n(), a("tr", {
1548
+ n.title ? (o(), a("h3", ao, v(n.title), 1)) : x("", !0),
1549
+ n.view === "table" ? (o(), a("div", ro, [
1550
+ t("table", co, [
1551
+ t("tbody", uo, [
1552
+ (o(!0), a(z, null, F(n.items, (s) => (o(), a("tr", {
1527
1553
  key: s.id || s.label
1528
1554
  }, [
1529
- t("td", eo, [
1530
- t("div", to, [
1531
- s.icon ? (n(), a("i", {
1555
+ t("td", po, [
1556
+ t("div", mo, [
1557
+ s.icon ? (o(), a("i", {
1532
1558
  key: 0,
1533
- class: x([s.icon, "text-gray-500"])
1534
- }, null, 2)) : b("", !0),
1535
- H(" " + f(s.label) + " ", 1),
1536
- s.tooltip ? (n(), a("span", {
1559
+ class: _([s.icon, "text-gray-500"])
1560
+ }, null, 2)) : x("", !0),
1561
+ V(" " + v(s.label) + " ", 1),
1562
+ s.tooltip ? (o(), a("span", {
1537
1563
  key: 1,
1538
1564
  class: "text-gray-400 cursor-help",
1539
1565
  title: s.tooltip
1540
1566
  }, e[0] || (e[0] = [
1541
1567
  t("i", { class: "fas fa-info-circle text-xs" }, null, -1)
1542
- ]), 8, so)) : b("", !0)
1568
+ ]), 8, go)) : x("", !0)
1543
1569
  ])
1544
1570
  ]),
1545
- t("td", oo, [
1546
- (n(), C(T(o(s)), { item: s }, null, 8, ["item"]))
1571
+ t("td", ho, [
1572
+ (o(), D(S(i(s)), { item: s }, null, 8, ["item"]))
1547
1573
  ])
1548
1574
  ]))), 128))
1549
1575
  ])
1550
1576
  ])
1551
- ])) : i.view === "grid" ? (n(), a("div", no, [
1552
- (n(!0), a(D, null, L(i.items, (s) => (n(), a("div", {
1577
+ ])) : n.view === "grid" ? (o(), a("div", fo, [
1578
+ (o(!0), a(z, null, F(n.items, (s) => (o(), a("div", {
1553
1579
  key: s.id || s.label,
1554
1580
  class: "description-item-card bg-white border border-gray-200 rounded-lg p-4"
1555
1581
  }, [
1556
- t("div", io, [
1557
- s.icon ? (n(), a("div", ao, [
1582
+ t("div", vo, [
1583
+ s.icon ? (o(), a("div", yo, [
1558
1584
  t("i", {
1559
- class: x([s.icon, "text-gray-500 text-lg"])
1585
+ class: _([s.icon, "text-gray-500 text-lg"])
1560
1586
  }, null, 2)
1561
- ])) : b("", !0),
1562
- t("div", ro, [
1563
- t("div", lo, [
1564
- t("h4", co, f(s.label), 1),
1565
- s.tooltip ? (n(), a("span", {
1587
+ ])) : x("", !0),
1588
+ t("div", bo, [
1589
+ t("div", xo, [
1590
+ t("h4", ko, v(s.label), 1),
1591
+ s.tooltip ? (o(), a("span", {
1566
1592
  key: 0,
1567
1593
  class: "text-gray-400 cursor-help",
1568
1594
  title: s.tooltip
1569
1595
  }, e[1] || (e[1] = [
1570
1596
  t("i", { class: "fas fa-info-circle text-xs" }, null, -1)
1571
- ]), 8, uo)) : b("", !0)
1597
+ ]), 8, wo)) : x("", !0)
1572
1598
  ]),
1573
- (n(), C(T(o(s)), { item: s }, null, 8, ["item"]))
1599
+ (o(), D(S(i(s)), { item: s }, null, 8, ["item"]))
1574
1600
  ])
1575
1601
  ])
1576
1602
  ]))), 128))
1577
- ])) : (n(), a("div", po, [
1578
- t("table", mo, [
1579
- t("tbody", ho, [
1580
- (n(!0), a(D, null, L(i.items, (s) => (n(), a("tr", {
1603
+ ])) : (o(), a("div", _o, [
1604
+ t("table", $o, [
1605
+ t("tbody", Co, [
1606
+ (o(!0), a(z, null, F(n.items, (s) => (o(), a("tr", {
1581
1607
  key: s.id || s.label
1582
1608
  }, [
1583
- t("td", go, [
1584
- t("div", fo, [
1585
- s.icon ? (n(), a("i", {
1609
+ t("td", Mo, [
1610
+ t("div", Lo, [
1611
+ s.icon ? (o(), a("i", {
1586
1612
  key: 0,
1587
- class: x([s.icon, "text-gray-500"])
1588
- }, null, 2)) : b("", !0),
1589
- H(" " + f(s.label) + " ", 1),
1590
- s.tooltip ? (n(), a("span", {
1613
+ class: _([s.icon, "text-gray-500"])
1614
+ }, null, 2)) : x("", !0),
1615
+ V(" " + v(s.label) + " ", 1),
1616
+ s.tooltip ? (o(), a("span", {
1591
1617
  key: 1,
1592
1618
  class: "text-gray-400 cursor-help",
1593
1619
  title: s.tooltip
1594
1620
  }, e[2] || (e[2] = [
1595
1621
  t("i", { class: "fas fa-info-circle text-xs" }, null, -1)
1596
- ]), 8, yo)) : b("", !0)
1622
+ ]), 8, Do)) : x("", !0)
1597
1623
  ])
1598
1624
  ]),
1599
- t("td", vo, [
1600
- (n(), C(T(o(s)), { item: s }, null, 8, ["item"]))
1625
+ t("td", To, [
1626
+ (o(), D(S(i(s)), { item: s }, null, 8, ["item"]))
1601
1627
  ])
1602
1628
  ]))), 128))
1603
1629
  ])
1604
1630
  ])
1605
1631
  ]))
1606
- ], 14, Zs));
1632
+ ], 14, lo));
1633
+ }
1634
+ }), Io = /* @__PURE__ */ B(jo, [["__scopeId", "data-v-36d43e50"]]), Vo = {
1635
+ draw: {
1636
+ toolbar: {
1637
+ actions: {
1638
+ title: "Скасувати малювання",
1639
+ text: "Скасувати"
1640
+ },
1641
+ finish: {
1642
+ title: "Завершити малювання",
1643
+ text: "Завершити"
1644
+ },
1645
+ undo: {
1646
+ title: "Видалити останню точку",
1647
+ text: "Видалити останню"
1648
+ },
1649
+ buttons: {
1650
+ polyline: "Намалювати лінію",
1651
+ polygon: "Намалювати полігон",
1652
+ rectangle: "Намалювати прямокутник",
1653
+ circle: "Намалювати коло",
1654
+ marker: "Додати точку",
1655
+ circlemarker: "Додати маркер-коло"
1656
+ }
1657
+ },
1658
+ handlers: {
1659
+ circle: {
1660
+ tooltip: {
1661
+ start: "Клацніть і тягніть, щоб намалювати коло",
1662
+ end: "Відпустіть кнопку миші, щоб завершити"
1663
+ },
1664
+ radius: "Радіус"
1665
+ },
1666
+ circlemarker: {
1667
+ tooltip: {
1668
+ start: "Клацніть на карту, щоб додати маркер-коло"
1669
+ }
1670
+ },
1671
+ marker: {
1672
+ tooltip: {
1673
+ start: "Клацніть на карту, щоб додати точку"
1674
+ }
1675
+ },
1676
+ polygon: {
1677
+ tooltip: {
1678
+ start: "Клацніть, щоб почати малювати полігон",
1679
+ cont: "Клацайте, щоб продовжити малювати полігон",
1680
+ end: "Клацніть першу точку, щоб завершити полігон"
1681
+ }
1682
+ },
1683
+ polyline: {
1684
+ error: "<strong>Помилка:</strong> лінія не може перетинатися сама з собою",
1685
+ tooltip: {
1686
+ start: "Клацніть, щоб почати малювати лінію",
1687
+ cont: "Клацайте, щоб продовжити малювати лінію",
1688
+ end: "Клацніть останню точку, щоб завершити лінію"
1689
+ }
1690
+ },
1691
+ rectangle: {
1692
+ tooltip: {
1693
+ start: "Клацніть і тягніть, щоб намалювати прямокутник",
1694
+ end: "Відпустіть кнопку миші, щоб завершити"
1695
+ }
1696
+ },
1697
+ simpleshape: {
1698
+ tooltip: {
1699
+ end: "Відпустіть кнопку миші, щоб завершити"
1700
+ }
1701
+ }
1702
+ }
1703
+ },
1704
+ edit: {
1705
+ toolbar: {
1706
+ actions: {
1707
+ save: {
1708
+ title: "Зберегти зміни",
1709
+ text: "Зберегти"
1710
+ },
1711
+ cancel: {
1712
+ title: "Скасувати редагування",
1713
+ text: "Скасувати"
1714
+ },
1715
+ clearAll: {
1716
+ title: "Очистити всі шари",
1717
+ text: "Очистити все"
1718
+ }
1719
+ },
1720
+ buttons: {
1721
+ edit: "Редагувати шари",
1722
+ editDisabled: "Немає шарів для редагування",
1723
+ remove: "Видалити шари",
1724
+ removeDisabled: "Немає шарів для видалення"
1725
+ }
1726
+ },
1727
+ handlers: {
1728
+ edit: {
1729
+ tooltip: {
1730
+ text: "Перетягніть маркери, щоб редагувати шари",
1731
+ subtext: "Натисніть 'Скасувати', щоб повернутися"
1732
+ }
1733
+ },
1734
+ remove: {
1735
+ tooltip: {
1736
+ text: "Клацніть на шари, щоб видалити їх"
1737
+ }
1738
+ }
1739
+ }
1740
+ }
1741
+ };
1742
+ function zo(l) {
1743
+ return l ? l.type === "FeatureCollection" || l.type === "Feature" ? l : l.geom ? {
1744
+ type: "Feature",
1745
+ geometry: {
1746
+ type: l.geom.type,
1747
+ coordinates: l.geom.coordinates
1748
+ },
1749
+ properties: {}
1750
+ } : l.type && l.coordinates ? {
1751
+ type: "Feature",
1752
+ geometry: l,
1753
+ properties: {}
1754
+ } : null : null;
1755
+ }
1756
+ const Fo = { class: "relative" }, Ao = {
1757
+ key: 1,
1758
+ class: "bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer"
1759
+ }, Ho = { class: "flex items-center justify-between p-2 border-b" }, So = { class: "p-2 border-b" }, Eo = { class: "flex items-center" }, Oo = { class: "flex items-center" }, Bo = { class: "flex items-center" }, Ro = { class: "p-2" }, No = { class: "flex items-center" }, fe = /* @__PURE__ */ C({
1760
+ __name: "MapWidget",
1761
+ props: {
1762
+ data: {}
1763
+ },
1764
+ setup(l) {
1765
+ const i = l, n = w(null);
1766
+ let e, s;
1767
+ const f = {
1768
+ topo100: {
1769
+ url: "https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"
1770
+ },
1771
+ orto10: {
1772
+ url: "https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png"
1773
+ },
1774
+ osmb: {
1775
+ url: "https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png"
1776
+ }
1777
+ }, p = w("topo100");
1778
+ let g;
1779
+ const u = w(!0), m = w(!1);
1780
+ function r() {
1781
+ return new Promise((M, d) => {
1782
+ if (window.L && window.L.Draw) return M(0);
1783
+ const c = (k) => {
1784
+ if (Array.from(document.styleSheets).some((q) => q?.href?.includes(k))) return;
1785
+ const N = document.createElement("link");
1786
+ N.rel = "stylesheet", N.href = k, document.head.appendChild(N);
1787
+ }, T = (k) => new Promise((j, N) => {
1788
+ const q = Array.from(document.scripts).find((K) => K.src === k);
1789
+ if (q) {
1790
+ q.addEventListener("load", () => j()), q.addEventListener("error", (K) => N(K));
1791
+ return;
1792
+ }
1793
+ const P = document.createElement("script");
1794
+ P.src = k, P.async = !0, P.onload = () => j(), P.onerror = (K) => N(K), document.body.appendChild(P);
1795
+ });
1796
+ c("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), c("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), T("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => T("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => M(0)).catch(d);
1797
+ });
1798
+ }
1799
+ oe(async () => {
1800
+ await r(), L.drawLocal = Vo, e = L.map(n.value, { zoomControl: !1 }).setView([50, 30], 10), L.control.zoom({ position: "bottomright" }).addTo(e), g = L.tileLayer(f.topo100.url, { maxZoom: 19 }).addTo(e), p.value = "topo100", s = new L.FeatureGroup().addTo(e);
1801
+ const M = zo(i.data);
1802
+ if (M) {
1803
+ const d = [];
1804
+ L.geoJSON(M).eachLayer((c) => d.push(c)), d.length && s.addLayer(d[0]), s.toGeoJSON(), h();
1805
+ }
1806
+ });
1807
+ function h(M = 30) {
1808
+ const d = s.getLayers();
1809
+ if (!d.length) return;
1810
+ const T = L.featureGroup(d).getBounds();
1811
+ T && T.isValid() && e.fitBounds(T, { padding: [M, M] });
1812
+ }
1813
+ function I(M) {
1814
+ g && g.removeFrom(e);
1815
+ const d = f[M];
1816
+ g = L.tileLayer(d.url, d.options || {}).addTo(e), p.value = M;
1817
+ }
1818
+ function H() {
1819
+ I(p.value);
1820
+ }
1821
+ function R() {
1822
+ s && (u.value ? s.addTo(e) : s.removeFrom(e));
1823
+ }
1824
+ return (M, d) => (o(), a("div", Fo, [
1825
+ t("div", {
1826
+ ref_key: "mapContainer",
1827
+ ref: n,
1828
+ class: "w-full h-[400px]"
1829
+ }, null, 512),
1830
+ m.value ? x("", !0) : (o(), a("div", {
1831
+ key: 0,
1832
+ onClick: d[0] || (d[0] = (c) => m.value = !0),
1833
+ class: "z-[500] bg-white absolute top-[10px] right-[10px] p-2 border rounded-lg cursor-pointer"
1834
+ }, " Шари ")),
1835
+ m.value ? (o(), a("div", Ao, [
1836
+ t("div", Ho, [
1837
+ d[7] || (d[7] = t("div", null, "Шари", -1)),
1838
+ (o(), a("svg", {
1839
+ onClick: d[1] || (d[1] = (c) => m.value = !1),
1840
+ xmlns: "http://www.w3.org/2000/svg",
1841
+ viewBox: "0 0 24 24",
1842
+ fill: "none",
1843
+ stroke: "currentColor",
1844
+ "stroke-width": "2",
1845
+ "stroke-linecap": "round",
1846
+ "stroke-linejoin": "round",
1847
+ class: "icon icon-tabler icons-tabler-outline icon-tabler-x w-4 h-4"
1848
+ }, d[6] || (d[6] = [
1849
+ t("path", {
1850
+ stroke: "none",
1851
+ d: "M0 0h24v24H0z",
1852
+ fill: "none"
1853
+ }, null, -1),
1854
+ t("path", { d: "M18 6l-12 12" }, null, -1),
1855
+ t("path", { d: "M6 6l12 12" }, null, -1)
1856
+ ])))
1857
+ ]),
1858
+ t("div", So, [
1859
+ t("div", null, [
1860
+ t("label", Eo, [
1861
+ O(t("input", {
1862
+ type: "radio",
1863
+ name: "base-layer",
1864
+ value: "topo100",
1865
+ "onUpdate:modelValue": d[2] || (d[2] = (c) => p.value = c),
1866
+ onChange: H
1867
+ }, null, 544), [
1868
+ [Q, p.value]
1869
+ ]),
1870
+ d[8] || (d[8] = t("span", { class: "ml-2" }, "Карта України", -1))
1871
+ ])
1872
+ ]),
1873
+ t("div", null, [
1874
+ t("label", Oo, [
1875
+ O(t("input", {
1876
+ type: "radio",
1877
+ name: "base-layer",
1878
+ value: "orto10",
1879
+ "onUpdate:modelValue": d[3] || (d[3] = (c) => p.value = c),
1880
+ onChange: H
1881
+ }, null, 544), [
1882
+ [Q, p.value]
1883
+ ]),
1884
+ d[9] || (d[9] = t("span", { class: "ml-2" }, "Ortophoto 1:10К", -1))
1885
+ ])
1886
+ ]),
1887
+ t("div", null, [
1888
+ t("label", Bo, [
1889
+ O(t("input", {
1890
+ type: "radio",
1891
+ name: "base-layer",
1892
+ value: "osmb",
1893
+ "onUpdate:modelValue": d[4] || (d[4] = (c) => p.value = c),
1894
+ onChange: H
1895
+ }, null, 544), [
1896
+ [Q, p.value]
1897
+ ]),
1898
+ d[10] || (d[10] = t("span", { class: "ml-2" }, "Open Street Map", -1))
1899
+ ])
1900
+ ])
1901
+ ]),
1902
+ t("div", Ro, [
1903
+ t("label", No, [
1904
+ O(t("input", {
1905
+ type: "checkbox",
1906
+ "onUpdate:modelValue": d[5] || (d[5] = (c) => u.value = c),
1907
+ onChange: R
1908
+ }, null, 544), [
1909
+ [De, u.value]
1910
+ ]),
1911
+ d[11] || (d[11] = t("span", { class: "ml-2" }, " Показати геометрію ", -1))
1912
+ ])
1913
+ ])
1914
+ ])) : x("", !0)
1915
+ ]));
1607
1916
  }
1608
- }), xo = /* @__PURE__ */ S(bo, [["__scopeId", "data-v-36d43e50"]]), wo = {
1917
+ }), Wo = {
1609
1918
  install: (l) => {
1610
- l.component("vs-widget-file", te), l.component("vs-widget-comments", Q), l.component("vs-widget-history", ee), l.component("vs-widget-gallery", se), l.component("CommentsWidget", Q), l.component("HistoryWidget", ee), l.component("GalleryWidget", se), l.component("FilesWidget", te), l.component("Card", Ms), l.component("CardItem", Ls), l.component("DescriptionListWidget", xo), l.component("CopyNotification", ce);
1919
+ l.component("vs-widget-file", ge), l.component("vs-widget-comments", ce), l.component("vs-widget-history", pe), l.component("vs-widget-gallery", he), l.component("vs-widget-map", fe), l.component("CommentsWidget", ce), l.component("HistoryWidget", pe), l.component("GalleryWidget", he), l.component("FilesWidget", ge), l.component("MapWidget", fe), l.component("Card", Ss), l.component("CardItem", Os), l.component("DescriptionListWidget", Io), l.component("CopyNotification", _e);
1611
1920
  }
1612
1921
  };
1613
1922
  export {
1614
- Ms as Card,
1615
- Ls as CardItem,
1616
- Q as CommentsWidget,
1617
- ce as CopyNotification,
1618
- xo as DescriptionListWidget,
1619
- te as FilesWidget,
1620
- se as GalleryWidget,
1621
- ee as HistoryWidget,
1622
- wo as default
1923
+ Ss as Card,
1924
+ Os as CardItem,
1925
+ ce as CommentsWidget,
1926
+ _e as CopyNotification,
1927
+ Io as DescriptionListWidget,
1928
+ ge as FilesWidget,
1929
+ he as GalleryWidget,
1930
+ pe as HistoryWidget,
1931
+ Wo as default
1623
1932
  };