@opengis/form 0.0.33 → 0.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
- import { defineComponent as D, ref as x, onMounted as xe, onUnmounted as Ne, createElementBlock as c, openBlock as i, normalizeClass as V, createCommentVNode as F, renderSlot as $e, createElementVNode as l, toDisplayString as T, normalizeProps as qe, guardReactiveProps as Ge, createTextVNode as fe, computed as A, mergeModels as Z, useModel as W, withDirectives as K, unref as q, vModelText as ne, vModelCheckbox as ft, createVNode as B, createBlock as se, resolveDynamicComponent as Be, normalizeStyle as ye, withCtx as Le, withModifiers as ve, onBeforeUnmount as St, watch as le, createStaticVNode as ce, vModelRadio as vt, Fragment as Y, renderList as oe, mergeProps as Ee, reactive as Bt, vModelDynamic as jt, vShow as Je, inject as Me, resolveComponent as at, Transition as mt, nextTick as ze, Teleport as It, getCurrentInstance as zt, provide as st } from "vue";
2
- import { notify as be, VsModal as ht, modal as Et } from "@opengis/core";
3
- const Dt = {
1
+ import { defineComponent as A, ref as x, onMounted as me, onUnmounted as Te, createElementBlock as c, openBlock as u, normalizeClass as C, createCommentVNode as z, renderSlot as _e, createElementVNode as l, toDisplayString as U, normalizeProps as Re, guardReactiveProps as Pe, createTextVNode as fe, computed as F, mergeModels as Z, useModel as W, withDirectives as K, unref as q, vModelText as ne, vModelCheckbox as ft, createVNode as B, createBlock as se, resolveDynamicComponent as Be, normalizeStyle as xe, withCtx as Le, withModifiers as ve, onBeforeUnmount as St, watch as le, createStaticVNode as ce, vModelRadio as vt, Fragment as Y, renderList as oe, mergeProps as Ee, reactive as Bt, vModelDynamic as jt, vShow as Je, inject as Me, resolveComponent as at, Transition as mt, nextTick as ze, Teleport as It, getCurrentInstance as zt, provide as st } from "vue";
2
+ import { notify as ye, VsModal as ht, modal as Et } from "@opengis/core";
3
+ const At = {
4
4
  key: 0,
5
5
  class: "text-[14px] font-medium text-gray-900 mb-2"
6
- }, Ft = { class: "opacity-100" }, Ot = {
6
+ }, Dt = { class: "opacity-100" }, Ft = {
7
7
  key: 0,
8
8
  class: "text-red-500 text-[14px]"
9
- }, At = {
9
+ }, Ot = {
10
10
  key: 1,
11
11
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
12
- }, Ut = /* @__PURE__ */ D({
12
+ }, Ut = /* @__PURE__ */ A({
13
13
  __name: "vs-layout-default",
14
14
  props: {
15
15
  ua: { default: "" },
@@ -26,19 +26,19 @@ const Dt = {
26
26
  const e = x("uk"), t = (n) => {
27
27
  n.detail.key === "locale" && (e.value = n.detail.newValue);
28
28
  };
29
- return xe(() => {
29
+ return me(() => {
30
30
  e.value = localStorage.locale, window.addEventListener("storage", t);
31
- }), Ne(() => {
31
+ }), Te(() => {
32
32
  window.removeEventListener("resize", t);
33
- }), (n, s) => (i(), c("div", {
34
- class: V(["w-full relative", { "opacity-60": n.item.disabled }])
33
+ }), (n, s) => (u(), c("div", {
34
+ class: C(["w-full relative", { "opacity-60": n.item.disabled }])
35
35
  }, [
36
- n.ua || n.label ? (i(), c("div", Dt, [
37
- l("span", Ft, T(n.item[e.value] || n.ua || n.label), 1),
38
- n.item?.rules?.includes("required") ? (i(), c("span", Ot, "*")) : F("", !0)
39
- ])) : F("", !0),
40
- $e(n.$slots, "default", qe(Ge(n.$attrs))),
41
- n.error ? (i(), c("span", At, T(n.error), 1)) : F("", !0)
36
+ n.ua || n.label ? (u(), c("div", At, [
37
+ l("span", Dt, U(n.item[e.value] || n.ua || n.label), 1),
38
+ n.item?.rules?.includes("required") ? (u(), c("span", Ft, "*")) : z("", !0)
39
+ ])) : z("", !0),
40
+ _e(n.$slots, "default", Re(Pe(n.$attrs))),
41
+ n.error ? (u(), c("span", Ot, U(n.error), 1)) : z("", !0)
42
42
  ], 2));
43
43
  }
44
44
  }), Tt = { class: "w-full relative flex flex-row items-center gap-2" }, Rt = {
@@ -50,7 +50,7 @@ const Dt = {
50
50
  }, Ht = {
51
51
  key: 1,
52
52
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
53
- }, Nt = /* @__PURE__ */ D({
53
+ }, Nt = /* @__PURE__ */ A({
54
54
  __name: "vs-layout-horizontal",
55
55
  props: {
56
56
  ua: { default: "" },
@@ -64,19 +64,19 @@ const Dt = {
64
64
  label: { default: "" }
65
65
  },
66
66
  setup(o) {
67
- return (e, t) => (i(), c("div", Tt, [
68
- e.item?.type !== "html" ? (i(), c("span", Rt, [
69
- fe(T(e.ua || e.label) + " ", 1),
70
- e.item?.rules?.includes("required") && (e.ua || e.label) ? (i(), c("span", Pt, "*")) : F("", !0)
71
- ])) : F("", !0),
72
- $e(e.$slots, "default", qe(Ge(e.$attrs))),
73
- e.error ? (i(), c("span", Ht, T(e.error), 1)) : F("", !0)
67
+ return (e, t) => (u(), c("div", Tt, [
68
+ e.item?.type !== "html" ? (u(), c("span", Rt, [
69
+ fe(U(e.ua || e.label) + " ", 1),
70
+ e.item?.rules?.includes("required") && (e.ua || e.label) ? (u(), c("span", Pt, "*")) : z("", !0)
71
+ ])) : z("", !0),
72
+ _e(e.$slots, "default", Re(Pe(e.$attrs))),
73
+ e.error ? (u(), c("span", Ht, U(e.error), 1)) : z("", !0)
74
74
  ]));
75
75
  }
76
76
  }), qt = { class: "w-full relative" }, Gt = {
77
77
  key: 0,
78
78
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
79
- }, Jt = /* @__PURE__ */ D({
79
+ }, Jt = /* @__PURE__ */ A({
80
80
  __name: "vs-layout-inline",
81
81
  props: {
82
82
  ua: { default: "" },
@@ -90,25 +90,85 @@ const Dt = {
90
90
  label: { default: "" }
91
91
  },
92
92
  setup(o) {
93
- return (e, t) => (i(), c("div", qt, [
94
- $e(e.$slots, "default", qe(Ge(e.$attrs))),
95
- e.error ? (i(), c("span", Gt, T(e.error), 1)) : F("", !0)
93
+ return (e, t) => (u(), c("div", qt, [
94
+ _e(e.$slots, "default", Re(Pe(e.$attrs))),
95
+ e.error ? (u(), c("span", Gt, U(e.error), 1)) : z("", !0)
96
96
  ]));
97
97
  }
98
- }), Kt = {
98
+ }), Kt = { class: "flex-1 min-w-0" }, Zt = {
99
+ key: 0,
100
+ class: "text-sm font-medium text-slate-700 dark:text-slate-200 flex items-center gap-1"
101
+ }, Wt = { class: "truncate" }, Qt = {
102
+ key: 0,
103
+ class: "text-red-500 text-[14px]"
104
+ }, Xt = {
105
+ key: 1,
106
+ class: "text-xs text-slate-500 dark:text-slate-400"
107
+ }, Yt = { class: "w-full md:w-auto" }, el = {
108
+ key: 0,
109
+ class: "mt-1 text-xs text-red-500"
110
+ }, tl = /* @__PURE__ */ A({
111
+ __name: "vs-layout-settings",
112
+ props: {
113
+ ua: { default: "" },
114
+ uk: {},
115
+ en: {},
116
+ de: {},
117
+ es: {},
118
+ fr: {},
119
+ item: { default: () => ({}) },
120
+ error: { type: [String, Boolean], default: "" },
121
+ label: { default: "" }
122
+ },
123
+ setup(o) {
124
+ const e = o, t = x("uk");
125
+ F(() => (e.item ?? {})?.[t.value] ?? e.ua ?? e.label ?? "");
126
+ const n = F(() => e.item?.description ?? ""), s = F(() => Array.isArray(e.item?.rules) && e.item.rules.includes("required")), r = F(() => (typeof e.error == "string" ? e.error : "") ?? ""), a = (i) => {
127
+ i.key === "locale" && (t.value = i.newValue ?? "uk");
128
+ };
129
+ return me(() => {
130
+ try {
131
+ typeof localStorage < "u" && localStorage.locale && (t.value = localStorage.locale);
132
+ } catch {
133
+ }
134
+ window.addEventListener("storage", a);
135
+ }), Te(() => {
136
+ window.removeEventListener("storage", a);
137
+ }), (i, d) => (u(), c("div", {
138
+ class: C(["w-full relative", { "opacity-60": i.item?.disabled }])
139
+ }, [
140
+ l("div", {
141
+ class: C(["gap-2 md:flex-row md:items-center md:justify-between", i.item.type === "switcher" ? "flex flex-col" : ""])
142
+ }, [
143
+ l("div", Kt, [
144
+ i.ua || i.label ? (u(), c("p", Zt, [
145
+ l("span", Wt, U(i.item[t.value] || i.ua || i.label), 1),
146
+ s.value ? (u(), c("span", Qt, "*")) : z("", !0)
147
+ ])) : z("", !0),
148
+ n.value ? (u(), c("p", Xt, U(n.value), 1)) : z("", !0)
149
+ ]),
150
+ l("div", Yt, [
151
+ _e(i.$slots, "default", Re(Pe(i.$attrs)))
152
+ ])
153
+ ], 2),
154
+ r.value ? (u(), c("p", el, U(r.value), 1)) : z("", !0)
155
+ ], 2));
156
+ }
157
+ }), ll = {
99
158
  default: Ut,
100
159
  horizontal: Nt,
101
- inline: Jt
160
+ inline: Jt,
161
+ settings: tl
102
162
  };
103
- function me(o) {
163
+ function he(o) {
104
164
  return {
105
- inputClass: A(() => {
165
+ inputClass: F(() => {
106
166
  const t = `disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${o?.primaryColor || "blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;
107
167
  return o?.size === "sm" ? `${t}h-[32px]` : `${t}h-[38px]`;
108
168
  })
109
169
  };
110
170
  }
111
- const Zt = ["placeholder", "disabled"], Wt = /* @__PURE__ */ D({
171
+ const ol = ["placeholder", "disabled"], al = /* @__PURE__ */ A({
112
172
  __name: "vs-input-password",
113
173
  props: /* @__PURE__ */ Z({
114
174
  style: { default: () => ({}) },
@@ -124,21 +184,21 @@ const Zt = ["placeholder", "disabled"], Wt = /* @__PURE__ */ D({
124
184
  }),
125
185
  emits: ["update:modelValue"],
126
186
  setup(o) {
127
- const e = o, { inputClass: t } = me(e.style), n = W(o, "modelValue");
128
- return (s, r) => K((i(), c("input", {
187
+ const e = o, { inputClass: t } = he(e.style), n = W(o, "modelValue");
188
+ return (s, r) => K((u(), c("input", {
129
189
  type: "password",
130
190
  "onUpdate:modelValue": r[0] || (r[0] = (a) => n.value = a),
131
191
  placeholder: s.placeholder,
132
192
  disabled: s.disabled,
133
- class: V(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [q(t), { "!border-red-600": s.error }]]),
193
+ class: C(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [q(t), { "!border-red-600": s.error }]]),
134
194
  style: {
135
195
  border: "1px solid #CFD9E0"
136
196
  }
137
- }, null, 10, Zt)), [
197
+ }, null, 10, ol)), [
138
198
  [ne, n.value]
139
199
  ]);
140
200
  }
141
- }), Qt = ["placeholder", "disabled"], Ue = /* @__PURE__ */ D({
201
+ }), sl = ["placeholder", "disabled"], Ue = /* @__PURE__ */ A({
142
202
  __name: "vs-input-text",
143
203
  props: /* @__PURE__ */ Z({
144
204
  style: { default: () => ({}) },
@@ -154,21 +214,21 @@ const Zt = ["placeholder", "disabled"], Wt = /* @__PURE__ */ D({
154
214
  }),
155
215
  emits: ["update:modelValue"],
156
216
  setup(o) {
157
- const e = o, { inputClass: t } = me(e.style), n = W(o, "modelValue");
158
- return (s, r) => K((i(), c("input", {
217
+ const e = o, { inputClass: t } = he(e.style), n = W(o, "modelValue");
218
+ return (s, r) => K((u(), c("input", {
159
219
  type: "text",
160
220
  "onUpdate:modelValue": r[0] || (r[0] = (a) => n.value = a),
161
221
  placeholder: s.placeholder,
162
222
  disabled: s.disabled,
163
- class: V(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [q(t), { "!border-red-600": s.error }]]),
223
+ class: C(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [q(t), { "!border-red-600": s.error }]]),
164
224
  style: {
165
225
  border: "1px solid #CFD9E0"
166
226
  }
167
- }, null, 10, Qt)), [
227
+ }, null, 10, sl)), [
168
228
  [ne, n.value]
169
229
  ]);
170
230
  }
171
- }), Xt = ["placeholder"], Yt = /* @__PURE__ */ D({
231
+ }), nl = ["placeholder"], rl = /* @__PURE__ */ A({
172
232
  __name: "vs-input-number",
173
233
  props: /* @__PURE__ */ Z({
174
234
  style: { default: () => ({}) },
@@ -184,17 +244,17 @@ const Zt = ["placeholder", "disabled"], Wt = /* @__PURE__ */ D({
184
244
  }),
185
245
  emits: ["update:modelValue"],
186
246
  setup(o) {
187
- const e = o, { inputClass: t } = me(e.style), n = W(o, "modelValue");
188
- return (s, r) => K((i(), c("input", {
247
+ const e = o, { inputClass: t } = he(e.style), n = W(o, "modelValue");
248
+ return (s, r) => K((u(), c("input", {
189
249
  type: "number",
190
250
  step: "any",
191
251
  "onUpdate:modelValue": r[0] || (r[0] = (a) => n.value = a),
192
252
  placeholder: s.placeholder,
193
- class: V(["py-1.5 px-3 block w-full bg-white", [q(t)]]),
253
+ class: C(["py-1.5 px-3 block w-full bg-white", [q(t)]]),
194
254
  style: {
195
255
  border: "1px solid #CFD9E0"
196
256
  }
197
- }, null, 10, Xt)), [
257
+ }, null, 10, nl)), [
198
258
  [ne, n.value]
199
259
  ]);
200
260
  }
@@ -203,7 +263,7 @@ const Zt = ["placeholder", "disabled"], Wt = /* @__PURE__ */ D({
203
263
  for (const [n, s] of e)
204
264
  t[n] = s;
205
265
  return t;
206
- }, el = {}, tl = {
266
+ }, il = {}, ul = {
207
267
  xmlns: "http://www.w3.org/2000/svg",
208
268
  viewBox: "0 0 24 24",
209
269
  fill: "none",
@@ -213,8 +273,8 @@ const Zt = ["placeholder", "disabled"], Wt = /* @__PURE__ */ D({
213
273
  "stroke-linejoin": "round",
214
274
  class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
215
275
  };
216
- function ll(o, e) {
217
- return i(), c("svg", tl, e[0] || (e[0] = [
276
+ function dl(o, e) {
277
+ return u(), c("svg", ul, e[0] || (e[0] = [
218
278
  l("path", {
219
279
  stroke: "none",
220
280
  d: "M0 0h24v24H0z",
@@ -223,7 +283,7 @@ function ll(o, e) {
223
283
  l("path", { d: "M5 12l5 5l10 -10" }, null, -1)
224
284
  ]));
225
285
  }
226
- const ol = /* @__PURE__ */ N(el, [["render", ll]]), al = { class: "flex items-center gap-[4px]" }, sl = ["value", "id", "disabled"], nl = ["for"], rl = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, il = /* @__PURE__ */ D({
286
+ const cl = /* @__PURE__ */ N(il, [["render", dl]]), pl = { class: "flex items-center gap-[4px]" }, fl = ["value", "id", "disabled"], vl = ["for"], ml = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, hl = /* @__PURE__ */ A({
227
287
  __name: "vs-checkbox-default",
228
288
  props: {
229
289
  value: { default: "" },
@@ -236,45 +296,45 @@ const ol = /* @__PURE__ */ N(el, [["render", ll]]), al = { class: "flex items-ce
236
296
  },
237
297
  emits: ["update:modelValue"],
238
298
  setup(o, { emit: e }) {
239
- const t = e, n = o, s = A({
299
+ const t = e, n = o, s = F({
240
300
  get: () => n.modelValue,
241
301
  set: (r) => t("update:modelValue", r)
242
302
  });
243
- return (r, a) => (i(), c("div", al, [
303
+ return (r, a) => (u(), c("div", pl, [
244
304
  K(l("input", {
245
305
  type: "checkbox",
246
306
  value: r.value,
247
- "onUpdate:modelValue": a[0] || (a[0] = (d) => s.value = d),
248
- class: V(["shrink-0 border border-solid hidden border-gray-700 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer", { "!cursor-not-allowed": r.disabled }]),
307
+ "onUpdate:modelValue": a[0] || (a[0] = (i) => s.value = i),
308
+ class: C(["shrink-0 border border-solid hidden border-gray-700 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer", { "!cursor-not-allowed": r.disabled }]),
249
309
  id: r.id,
250
310
  disabled: r.disabled
251
- }, null, 10, sl), [
311
+ }, null, 10, fl), [
252
312
  [ft, s.value]
253
313
  ]),
254
314
  l("label", {
255
315
  for: r.id,
256
- class: V(["flex flex-1 checkbox-label items-center gap-x-2 cursor-pointer text-sm text-gray-800 dark:text-neutral-300", { "!cursor-not-allowed": r.disabled }])
316
+ class: C(["flex flex-1 checkbox-label items-center gap-x-2 cursor-pointer text-sm text-gray-800 dark:text-neutral-300", { "!cursor-not-allowed": r.disabled }])
257
317
  }, [
258
318
  l("div", {
259
- class: V(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [s.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", r.error ? "border-red-600" : ""]])
319
+ class: C(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [s.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", r.error ? "border-red-600" : ""]])
260
320
  }, [
261
- B(ol, {
321
+ B(cl, {
262
322
  height: "12",
263
323
  width: "12"
264
324
  })
265
325
  ], 2),
266
- l("span", rl, [
267
- $e(r.$slots, "default", {}, () => [
268
- fe(T(r.label), 1)
326
+ l("span", ml, [
327
+ _e(r.$slots, "default", {}, () => [
328
+ fe(U(r.label), 1)
269
329
  ])
270
330
  ])
271
- ], 10, nl)
331
+ ], 10, vl)
272
332
  ]));
273
333
  }
274
- }), ul = ["name", "value", "disabled"], dl = { class: "flex items-center gap-[6px] text-[14px]" }, cl = {
334
+ }), gl = ["name", "value", "disabled"], bl = { class: "flex items-center gap-[6px] text-[14px]" }, yl = {
275
335
  key: 0,
276
336
  class: "text-[16px]"
277
- }, pl = ["src"], fl = /* @__PURE__ */ D({
337
+ }, xl = ["src"], wl = /* @__PURE__ */ A({
278
338
  __name: "vs-checkbox-buttons",
279
339
  props: {
280
340
  value: { type: [String, Number, Boolean], default: "" },
@@ -288,46 +348,46 @@ const ol = /* @__PURE__ */ N(el, [["render", ll]]), al = { class: "flex items-ce
288
348
  },
289
349
  emits: ["update:modelValue"],
290
350
  setup(o, { emit: e }) {
291
- const t = o, n = e, s = A({
351
+ const t = o, n = e, s = F({
292
352
  get: () => t.modelValue,
293
- set: (d) => {
294
- n("update:modelValue", d);
353
+ set: (i) => {
354
+ n("update:modelValue", i);
295
355
  }
296
- }), r = A(() => Array.isArray(s.value) ? s.value.includes(t.value) : s.value === !0 || s.value === t.value), a = A(() => t.style?.size === "xs" ? "p-1.5 text-xs" : t.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
297
- return (d, u) => (i(), c("label", {
298
- class: V(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg", [a.value, r.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
356
+ }), r = F(() => Array.isArray(s.value) ? s.value.includes(t.value) : s.value === !0 || s.value === t.value), a = F(() => t.style?.size === "xs" ? "p-1.5 text-xs" : t.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
357
+ return (i, d) => (u(), c("label", {
358
+ class: C(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg", [a.value, r.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
299
359
  }, [
300
360
  K(l("input", {
301
361
  type: "checkbox",
302
362
  class: "hidden",
303
- name: d.id,
304
- value: d.value,
305
- "onUpdate:modelValue": u[0] || (u[0] = (v) => s.value = v),
306
- disabled: d.disabled
307
- }, null, 8, ul), [
363
+ name: i.id,
364
+ value: i.value,
365
+ "onUpdate:modelValue": d[0] || (d[0] = (v) => s.value = v),
366
+ disabled: i.disabled
367
+ }, null, 8, gl), [
308
368
  [ft, s.value]
309
369
  ]),
310
- l("span", dl, [
311
- d.icon || d.imgUrl ? (i(), c("span", cl, [
312
- d.icon ? (i(), c("i", {
370
+ l("span", bl, [
371
+ i.icon || i.imgUrl ? (u(), c("span", yl, [
372
+ i.icon ? (u(), c("i", {
313
373
  key: 0,
314
- class: V(d.icon)
315
- }, null, 2)) : F("", !0),
316
- d.imgUrl ? (i(), c("img", {
374
+ class: C(i.icon)
375
+ }, null, 2)) : z("", !0),
376
+ i.imgUrl ? (u(), c("img", {
317
377
  key: 1,
318
- src: d.imgUrl,
378
+ src: i.imgUrl,
319
379
  width: "16",
320
380
  height: "16",
321
381
  alt: "icon"
322
- }, null, 8, pl)) : F("", !0)
323
- ])) : F("", !0),
324
- $e(d.$slots, "default", {}, () => [
325
- fe(T(d.label), 1)
382
+ }, null, 8, xl)) : z("", !0)
383
+ ])) : z("", !0),
384
+ _e(i.$slots, "default", {}, () => [
385
+ fe(U(i.label), 1)
326
386
  ])
327
387
  ])
328
388
  ], 2));
329
389
  }
330
- }), vl = { class: "flex items-center" }, gt = /* @__PURE__ */ D({
390
+ }), kl = { class: "flex items-center" }, gt = /* @__PURE__ */ A({
331
391
  __name: "vs-input-checkbox-item",
332
392
  props: {
333
393
  value: { default: "" },
@@ -344,38 +404,38 @@ const ol = /* @__PURE__ */ N(el, [["render", ll]]), al = { class: "flex items-ce
344
404
  },
345
405
  emits: ["update:modelValue"],
346
406
  setup(o, { emit: e }) {
347
- const t = o, n = e, s = `radio-${Math.floor(Math.random() * 1e4)}`, r = A({
407
+ const t = o, n = e, s = `radio-${Math.floor(Math.random() * 1e4)}`, r = F({
348
408
  get: () => Array.isArray(t.modelValue) ? Array.isArray(t.modelValue) && t.modelValue.includes(t.value) : t.modelValue,
349
- set: (d) => {
409
+ set: (i) => {
350
410
  if (Array.isArray(t.modelValue)) {
351
- let u = [...t.modelValue];
352
- d ? u.includes(t.value) || u.push(t.value) : u = u.filter((v) => v !== t.value), n("update:modelValue", u);
411
+ let d = [...t.modelValue];
412
+ i ? d.includes(t.value) || d.push(t.value) : d = d.filter((v) => v !== t.value), n("update:modelValue", d);
353
413
  } else
354
- n("update:modelValue", d);
414
+ n("update:modelValue", i);
355
415
  }
356
416
  }), a = x(`vs-checkbox-${t.view || "default"}`);
357
- return (d, u) => (i(), c("div", vl, [
358
- (i(), se(Be(a.value === "vs-checkbox-buttons" ? q(fl) : q(il)), {
359
- value: d.value,
360
- label: d.label,
361
- info: d.option?.info,
362
- disabled: d.disabled,
417
+ return (i, d) => (u(), c("div", kl, [
418
+ (u(), se(Be(a.value === "vs-checkbox-buttons" ? q(wl) : q(hl)), {
419
+ value: i.value,
420
+ label: i.label,
421
+ info: i.option?.info,
422
+ disabled: i.disabled,
363
423
  modelValue: r.value,
364
- "onUpdate:modelValue": u[0] || (u[0] = (v) => r.value = v),
424
+ "onUpdate:modelValue": d[0] || (d[0] = (v) => r.value = v),
365
425
  id: s,
366
- icon: d.icon,
367
- imgUrl: d.imgUrl,
368
- style: ye(d.style),
369
- error: d.error
426
+ icon: i.icon,
427
+ imgUrl: i.imgUrl,
428
+ style: xe(i.style),
429
+ error: i.error
370
430
  }, {
371
431
  default: Le(() => [
372
- fe(T(d.label), 1)
432
+ fe(U(i.label), 1)
373
433
  ]),
374
434
  _: 1
375
435
  }, 8, ["value", "label", "info", "disabled", "modelValue", "icon", "imgUrl", "style", "error"]))
376
436
  ]));
377
437
  }
378
- }), ml = {}, hl = {
438
+ }), _l = {}, $l = {
379
439
  xmlns: "http://www.w3.org/2000/svg",
380
440
  viewBox: "0 0 24 24",
381
441
  fill: "none",
@@ -385,8 +445,8 @@ const ol = /* @__PURE__ */ N(el, [["render", ll]]), al = { class: "flex items-ce
385
445
  "stroke-linejoin": "round",
386
446
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"
387
447
  };
388
- function gl(o, e) {
389
- return i(), c("svg", hl, e[0] || (e[0] = [
448
+ function Vl(o, e) {
449
+ return u(), c("svg", $l, e[0] || (e[0] = [
390
450
  l("path", {
391
451
  stroke: "none",
392
452
  d: "M0 0h24v24H0z",
@@ -395,7 +455,7 @@ function gl(o, e) {
395
455
  l("path", { d: "M6 9l6 6l6 -6" }, null, -1)
396
456
  ]));
397
457
  }
398
- const bl = /* @__PURE__ */ N(ml, [["render", gl]]), yl = {}, xl = {
458
+ const Cl = /* @__PURE__ */ N(_l, [["render", Vl]]), Ml = {}, Ll = {
399
459
  xmlns: "http://www.w3.org/2000/svg",
400
460
  viewBox: "0 0 24 24",
401
461
  fill: "none",
@@ -405,8 +465,8 @@ const bl = /* @__PURE__ */ N(ml, [["render", gl]]), yl = {}, xl = {
405
465
  "stroke-linejoin": "round",
406
466
  class: "icon icon-tabler icons-tabler-outline icon-tabler-x"
407
467
  };
408
- function wl(o, e) {
409
- return i(), c("svg", xl, e[0] || (e[0] = [
468
+ function Sl(o, e) {
469
+ return u(), c("svg", Ll, e[0] || (e[0] = [
410
470
  l("path", {
411
471
  stroke: "none",
412
472
  d: "M0 0h24v24H0z",
@@ -416,7 +476,7 @@ function wl(o, e) {
416
476
  l("path", { d: "M6 6l12 12" }, null, -1)
417
477
  ]));
418
478
  }
419
- const kl = /* @__PURE__ */ N(yl, [["render", wl]]), _l = {}, $l = {
479
+ const Bl = /* @__PURE__ */ N(Ml, [["render", Sl]]), jl = {}, Il = {
420
480
  xmlns: "http://www.w3.org/2000/svg",
421
481
  width: "24",
422
482
  height: "24",
@@ -427,8 +487,8 @@ const kl = /* @__PURE__ */ N(yl, [["render", wl]]), _l = {}, $l = {
427
487
  "stroke-linecap": "round",
428
488
  "stroke-linejoin": "round"
429
489
  };
430
- function Cl(o, e) {
431
- return i(), c("svg", $l, e[0] || (e[0] = [
490
+ function zl(o, e) {
491
+ return u(), c("svg", Il, e[0] || (e[0] = [
432
492
  l("path", {
433
493
  stroke: "none",
434
494
  d: "M0 0h24v24H0z",
@@ -439,13 +499,13 @@ function Cl(o, e) {
439
499
  l("path", { d: "M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z" }, null, -1)
440
500
  ]));
441
501
  }
442
- const Vl = /* @__PURE__ */ N(_l, [["render", Cl]]), Ml = {
502
+ const El = /* @__PURE__ */ N(jl, [["render", zl]]), Al = {
443
503
  key: 0,
444
504
  class: "flex items-start gap-x-1"
445
- }, Ll = {
505
+ }, Dl = {
446
506
  key: 0,
447
507
  class: "text-red-500 text-[14px]"
448
- }, Sl = ["title"], Bl = ["disabled"], bt = /* @__PURE__ */ D({
508
+ }, Fl = ["title"], Ol = ["disabled"], bt = /* @__PURE__ */ A({
449
509
  __name: "vs-input-switcher",
450
510
  props: /* @__PURE__ */ Z({
451
511
  rules: { default: () => [] },
@@ -467,37 +527,37 @@ const Vl = /* @__PURE__ */ N(_l, [["render", Cl]]), Ml = {
467
527
  emits: ["update:modelValue"],
468
528
  setup(o) {
469
529
  const e = o, t = W(o, "modelValue");
470
- return (n, s) => e.view === "checkbox" ? (i(), c("div", Ml, [
530
+ return (n, s) => e.view === "checkbox" ? (u(), c("div", Al, [
471
531
  B(gt, {
472
532
  modelValue: t.value,
473
533
  "onUpdate:modelValue": s[0] || (s[0] = (r) => t.value = r),
474
534
  label: n.text,
475
535
  error: n.error || ""
476
536
  }, null, 8, ["modelValue", "label", "error"]),
477
- n.rules?.includes("required") ? (i(), c("span", Ll, "*")) : F("", !0),
478
- n.i ? (i(), c("button", {
537
+ n.rules?.includes("required") ? (u(), c("span", Dl, "*")) : z("", !0),
538
+ n.i ? (u(), c("button", {
479
539
  key: 1,
480
540
  class: "cursor-pointer",
481
541
  title: n.i,
482
542
  onClick: s[1] || (s[1] = ve(() => {
483
543
  }, ["prevent"]))
484
544
  }, [
485
- B(q(Vl), { class: "text-gray-500 w-[14px] h-[14px]" })
486
- ], 8, Sl)) : F("", !0)
487
- ])) : (i(), c("button", {
545
+ B(q(El), { class: "text-gray-500 w-[14px] h-[14px]" })
546
+ ], 8, Fl)) : z("", !0)
547
+ ])) : (u(), c("button", {
488
548
  key: 1,
489
549
  type: "button",
490
- class: V(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50", [t.value ? `bg-${n.style?.primaryColor || "blue"}-500` : "bg-stone-200", n.customClass]]),
550
+ class: C(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50", [t.value ? `bg-${n.style?.primaryColor || "blue"}-500` : "bg-stone-200", n.customClass]]),
491
551
  disabled: n.disabled,
492
552
  onClick: s[2] || (s[2] = (r) => t.value = !t.value)
493
553
  }, [
494
554
  l("span", {
495
555
  "data-state": "checked",
496
- class: V(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform", [t.value ? "translate-x-4" : "translate-x-0"]])
556
+ class: C(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform", [t.value ? "translate-x-4" : "translate-x-0"]])
497
557
  }, null, 2)
498
- ], 10, Bl));
558
+ ], 10, Ol));
499
559
  }
500
- }), jl = ["innerHTML"], nt = /* @__PURE__ */ D({
560
+ }), Ul = ["innerHTML"], nt = /* @__PURE__ */ A({
501
561
  __name: "vs-input-static",
502
562
  props: {
503
563
  text: { default: "" },
@@ -511,12 +571,12 @@ const Vl = /* @__PURE__ */ N(_l, [["render", Cl]]), Ml = {
511
571
  placeholder: {}
512
572
  },
513
573
  setup(o) {
514
- return (e, t) => (i(), c("div", {
515
- class: V(e.customClass),
574
+ return (e, t) => (u(), c("div", {
575
+ class: C(e.customClass),
516
576
  innerHTML: e.html ? e.html : e.text
517
- }, null, 10, jl));
577
+ }, null, 10, Ul));
518
578
  }
519
- }), Il = ["placeholder", "disabled", "name"], zl = /* @__PURE__ */ D({
579
+ }), Tl = ["placeholder", "disabled", "name"], Rl = /* @__PURE__ */ A({
520
580
  __name: "vs-input-mask",
521
581
  props: /* @__PURE__ */ Z({
522
582
  name: {},
@@ -534,9 +594,9 @@ const Vl = /* @__PURE__ */ N(_l, [["render", Cl]]), Ml = {
534
594
  }),
535
595
  emits: ["update:modelValue"],
536
596
  setup(o) {
537
- const e = o, { inputClass: t } = me(e.style), n = W(o, "modelValue"), s = x(null);
597
+ const e = o, { inputClass: t } = he(e.style), n = W(o, "modelValue"), s = x(null);
538
598
  let r = null;
539
- return xe(async () => {
599
+ return me(async () => {
540
600
  if (s.value) {
541
601
  const { default: a } = await import("./index-W-qQIppj.js");
542
602
  r = a(s.value, {
@@ -566,20 +626,20 @@ const Vl = /* @__PURE__ */ N(_l, [["render", Cl]]), Ml = {
566
626
  });
567
627
  }), le(n, (a) => {
568
628
  r && r.unmaskedValue !== a && (r.value = a || "");
569
- }), (a, d) => (i(), c("input", {
629
+ }), (a, i) => (u(), c("input", {
570
630
  type: "text",
571
631
  ref_key: "inputEl",
572
632
  ref: s,
573
633
  placeholder: a.placeholder,
574
634
  disabled: a.disabled,
575
635
  name: a.name,
576
- class: V(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [q(t)]]),
636
+ class: C(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [q(t)]]),
577
637
  style: {
578
638
  border: "1px solid #CFD9E0"
579
639
  }
580
- }, null, 10, Il));
640
+ }, null, 10, Tl));
581
641
  }
582
- }), El = { class: "relative w-full bg-white rounded-lg" }, Dl = ["placeholder", "disabled"], Fl = /* @__PURE__ */ D({
642
+ }), Pl = { class: "relative w-full bg-white rounded-lg" }, Hl = ["placeholder", "disabled"], Nl = /* @__PURE__ */ A({
583
643
  __name: "vs-input-email",
584
644
  props: /* @__PURE__ */ Z({
585
645
  style: { default: () => ({}) },
@@ -595,24 +655,24 @@ const Vl = /* @__PURE__ */ N(_l, [["render", Cl]]), Ml = {
595
655
  }),
596
656
  emits: ["update:modelValue"],
597
657
  setup(o) {
598
- const e = o, { inputClass: t } = me(e.style), n = W(o, "modelValue");
599
- return (s, r) => (i(), c("div", El, [
658
+ const e = o, { inputClass: t } = he(e.style), n = W(o, "modelValue");
659
+ return (s, r) => (u(), c("div", Pl, [
600
660
  r[1] || (r[1] = ce('<div class="absolute bottom-2/4 translate-y-2/4 left-[10px] cursor-pointer"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="stroke-gray-500 transition-all"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z"></path><path d="M3 7l9 6l9 -6"></path></svg></div>', 1)),
601
661
  K(l("input", {
602
662
  type: "email",
603
663
  "onUpdate:modelValue": r[0] || (r[0] = (a) => n.value = a),
604
664
  placeholder: s.placeholder,
605
665
  disabled: s.disabled,
606
- class: V(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [q(t), { "!border-red-600": s.error }]]),
666
+ class: C(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [q(t), { "!border-red-600": s.error }]]),
607
667
  style: {
608
668
  border: "1px solid #CFD9E0"
609
669
  }
610
- }, null, 10, Dl), [
670
+ }, null, 10, Hl), [
611
671
  [ne, n.value]
612
672
  ])
613
673
  ]));
614
674
  }
615
- }), Ol = ["value", "disabled"], Al = { class: "text-[13px] text-gray-700" }, Ul = /* @__PURE__ */ D({
675
+ }), ql = ["value", "disabled"], Gl = { class: "text-[13px] text-gray-700" }, Jl = /* @__PURE__ */ A({
616
676
  __name: "vs-input-radio-default",
617
677
  props: /* @__PURE__ */ Z({
618
678
  style: {},
@@ -631,8 +691,8 @@ const Vl = /* @__PURE__ */ N(_l, [["render", Cl]]), Ml = {
631
691
  emits: ["update:modelValue"],
632
692
  setup(o) {
633
693
  const e = W(o, "modelValue");
634
- return (t, n) => (i(), c("label", {
635
- class: V(["flex items-center gap-0", [t.customClass]])
694
+ return (t, n) => (u(), c("label", {
695
+ class: C(["flex items-center gap-0", [t.customClass]])
636
696
  }, [
637
697
  K(l("input", {
638
698
  "onUpdate:modelValue": n[0] || (n[0] = (s) => e.value = s),
@@ -640,24 +700,24 @@ const Vl = /* @__PURE__ */ N(_l, [["render", Cl]]), Ml = {
640
700
  value: t.value,
641
701
  disabled: t.disabled,
642
702
  class: "hidden"
643
- }, null, 8, Ol), [
703
+ }, null, 8, ql), [
644
704
  [vt, e.value]
645
705
  ]),
646
706
  l("span", {
647
- class: V(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]", [
707
+ class: C(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]", [
648
708
  `border-${t.style?.primaryColor || "blue"}-500`,
649
709
  t.disabled ? "opacity-50 cursor-not-allowed" : ""
650
710
  ]])
651
711
  }, [
652
- e.value == t.value ? (i(), c("span", {
712
+ e.value == t.value ? (u(), c("span", {
653
713
  key: 0,
654
- class: V(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${t.style?.primaryColor || "blue"}-500`]])
655
- }, null, 2)) : F("", !0)
714
+ class: C(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${t.style?.primaryColor || "blue"}-500`]])
715
+ }, null, 2)) : z("", !0)
656
716
  ], 2),
657
- l("span", Al, T(t.text), 1)
717
+ l("span", Gl, U(t.text), 1)
658
718
  ], 2));
659
719
  }
660
- }), Tl = ["value", "disabled"], Rl = { class: "text-[13px] text-gray-700" }, Pl = /* @__PURE__ */ D({
720
+ }), Kl = ["value", "disabled"], Zl = { class: "text-[13px] text-gray-700" }, Wl = /* @__PURE__ */ A({
661
721
  __name: "vs-input-radio-buttons",
662
722
  props: /* @__PURE__ */ Z({
663
723
  style: {},
@@ -676,8 +736,8 @@ const Vl = /* @__PURE__ */ N(_l, [["render", Cl]]), Ml = {
676
736
  emits: ["update:modelValue"],
677
737
  setup(o) {
678
738
  const e = W(o, "modelValue");
679
- return (t, n) => (i(), c("label", {
680
- class: V(["flex items-center border rounded-lg px-2 py-1", [
739
+ return (t, n) => (u(), c("label", {
740
+ class: C(["flex items-center border rounded-lg px-2 py-1", [
681
741
  e.value == t.value ? `ring-2 ring-ring ring-${t.style?.primaryColor || "blue"}-500` : "",
682
742
  t.customClass
683
743
  ]])
@@ -688,16 +748,16 @@ const Vl = /* @__PURE__ */ N(_l, [["render", Cl]]), Ml = {
688
748
  value: t.value,
689
749
  disabled: t.disabled,
690
750
  class: "hidden"
691
- }, null, 8, Tl), [
751
+ }, null, 8, Kl), [
692
752
  [vt, e.value]
693
753
  ]),
694
- l("span", Rl, T(t.text), 1)
754
+ l("span", Zl, U(t.text), 1)
695
755
  ], 2));
696
756
  }
697
- }), Hl = {
698
- "vs-input-radio-default": Ul,
699
- "vs-input-radio-buttons": Pl
700
- }, rt = /* @__PURE__ */ D({
757
+ }), Ql = {
758
+ "vs-input-radio-default": Jl,
759
+ "vs-input-radio-buttons": Wl
760
+ }, rt = /* @__PURE__ */ A({
701
761
  __name: "vs-input-radio",
702
762
  props: /* @__PURE__ */ Z({
703
763
  options: {},
@@ -716,21 +776,21 @@ const Vl = /* @__PURE__ */ N(_l, [["render", Cl]]), Ml = {
716
776
  }),
717
777
  emits: ["update:modelValue"],
718
778
  setup(o) {
719
- const e = o, t = W(o, "modelValue"), n = A(() => Hl[`vs-input-radio-${e.view}`]);
720
- return (s, r) => (i(), c("div", {
721
- class: V([s.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
779
+ const e = o, t = W(o, "modelValue"), n = F(() => Ql[`vs-input-radio-${e.view}`]);
780
+ return (s, r) => (u(), c("div", {
781
+ class: C([s.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
722
782
  }, [
723
- (i(!0), c(Y, null, oe(s.options, (a) => (i(), se(Be(n.value), Ee({
783
+ (u(!0), c(Y, null, oe(s.options, (a) => (u(), se(Be(n.value), Ee({
724
784
  key: a?.id,
725
785
  text: a.text,
726
786
  value: a.id.toString(),
727
787
  checked: t.value === a.id,
728
788
  modelValue: t.value,
729
- "onUpdate:modelValue": r[0] || (r[0] = (d) => t.value = d)
789
+ "onUpdate:modelValue": r[0] || (r[0] = (i) => t.value = i)
730
790
  }, { ref_for: !0 }, s.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
731
791
  ], 2));
732
792
  }
733
- }), Nl = /* @__PURE__ */ D({
793
+ }), Xl = /* @__PURE__ */ A({
734
794
  __name: "vs-input-checkbox",
735
795
  props: {
736
796
  options: { default: () => [] },
@@ -749,7 +809,7 @@ const Vl = /* @__PURE__ */ N(_l, [["render", Cl]]), Ml = {
749
809
  },
750
810
  emits: ["update:modelValue"],
751
811
  setup(o, { emit: e }) {
752
- const t = o, n = e, s = x([]), r = Bt({}), a = (p) => p?.value || p?.id || p?.text || p, d = (p) => p.text || String(p), u = (p) => `lg:col-span-${p || 12}`, v = async () => {
812
+ const t = o, n = e, s = x([]), r = Bt({}), a = (p) => p?.value || p?.id || p?.text || p, i = (p) => p.text || String(p), d = (p) => `lg:col-span-${p || 12}`, v = async () => {
753
813
  try {
754
814
  const p = await fetch(`/api/suggest/${t.data}`).then((w) => w.json());
755
815
  s.value = p?.data || p;
@@ -785,7 +845,7 @@ const Vl = /* @__PURE__ */ N(_l, [["render", Cl]]), Ml = {
785
845
  n("update:modelValue", p.length === 0 ? [] : p);
786
846
  },
787
847
  { deep: !0 }
788
- ), xe(() => {
848
+ ), me(() => {
789
849
  if (t.data)
790
850
  v().then(() => {
791
851
  if (typeof t.modelValue == "boolean" && s.value.length === 1) {
@@ -813,16 +873,16 @@ const Vl = /* @__PURE__ */ N(_l, [["render", Cl]]), Ml = {
813
873
  }
814
874
  });
815
875
  }
816
- }), (p, w) => (i(), c("div", {
817
- class: V(["p-0 w-full gap-[6px]", [p.position === "vertical" ? "flex-col" : "", p.colSpan ? "grid" : "flex justify-start"]])
876
+ }), (p, w) => (u(), c("div", {
877
+ class: C(["p-0 w-full gap-[6px]", [p.position === "vertical" ? "flex-col" : "", p.colSpan ? "grid" : "flex justify-start"]])
818
878
  }, [
819
- (i(!0), c(Y, null, oe(s.value, (b) => (i(), se(gt, {
879
+ (u(!0), c(Y, null, oe(s.value, (b) => (u(), se(gt, {
820
880
  modelValue: r[a(b)],
821
881
  "onUpdate:modelValue": ($) => r[a(b)] = $,
822
882
  value: a(b),
823
- class: V(u(p.colSpan)),
883
+ class: C(d(p.colSpan)),
824
884
  disabled: b.disabled,
825
- label: d(b),
885
+ label: i(b),
826
886
  key: a(b),
827
887
  icon: b?.icon,
828
888
  imgUrl: b?.imgUrl,
@@ -831,7 +891,7 @@ const Vl = /* @__PURE__ */ N(_l, [["render", Cl]]), Ml = {
831
891
  }, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "icon", "imgUrl", "option", "view"]))), 128))
832
892
  ], 2));
833
893
  }
834
- }), ql = /* @__PURE__ */ N(Nl, [["__scopeId", "data-v-91f3584a"]]), Gl = ["type", "placeholder", "disabled"], Jl = /* @__PURE__ */ D({
894
+ }), Yl = /* @__PURE__ */ N(Xl, [["__scopeId", "data-v-91f3584a"]]), eo = ["type", "placeholder", "disabled"], to = /* @__PURE__ */ A({
835
895
  __name: "vs-input-date1",
836
896
  props: {
837
897
  style: { default: () => ({}) },
@@ -846,28 +906,28 @@ const Vl = /* @__PURE__ */ N(_l, [["render", Cl]]), Ml = {
846
906
  emits: ["update:modelValue"],
847
907
  setup(o, { emit: e }) {
848
908
  const t = o;
849
- function n(u) {
850
- return u ? t.mode === "datetime" ? (u.includes("T") ? u : null) || u + (u.includes(" ") ? "" : "T00:00") : u?.split(" ")[0] : null;
909
+ function n(d) {
910
+ return d ? t.mode === "datetime" ? (d.includes("T") ? d : null) || d + (d.includes(" ") ? "" : "T00:00") : d?.split(" ")[0] : null;
851
911
  }
852
- const { inputClass: s } = me(t.style), r = e, a = A({
912
+ const { inputClass: s } = he(t.style), r = e, a = F({
853
913
  get: () => n(t.modelValue),
854
- set: (u) => r("update:modelValue", u)
855
- }), d = A(() => t.mode === "datetime" ? "datetime-local" : t.mode);
856
- return (u, v) => K((i(), c("input", {
857
- type: d.value,
914
+ set: (d) => r("update:modelValue", d)
915
+ }), i = F(() => t.mode === "datetime" ? "datetime-local" : t.mode);
916
+ return (d, v) => K((u(), c("input", {
917
+ type: i.value,
858
918
  "onUpdate:modelValue": v[0] || (v[0] = (p) => a.value = p),
859
- placeholder: u.placeholder,
860
- disabled: u.disabled,
919
+ placeholder: d.placeholder,
920
+ disabled: d.disabled,
861
921
  ref: "date",
862
- class: V(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [u.modelValue ? "" : "text-opacity-50", q(s)].join(" ")]),
922
+ class: C(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [d.modelValue ? "" : "text-opacity-50", q(s)].join(" ")]),
863
923
  style: {
864
924
  border: "1px solid #CFD9E0"
865
925
  }
866
- }, null, 10, Gl)), [
926
+ }, null, 10, eo)), [
867
927
  [jt, a.value]
868
928
  ]);
869
929
  }
870
- }), Kl = async (o, e, t, n) => {
930
+ }), lo = async (o, e, t, n) => {
871
931
  try {
872
932
  const s = new FormData();
873
933
  return s.append("unique", "true"), s.append("file", o), (await fetch(
@@ -878,14 +938,14 @@ const Vl = /* @__PURE__ */ N(_l, [["render", Cl]]), Ml = {
878
938
  }
879
939
  ).then((a) => a.json()))?.result;
880
940
  } catch (s) {
881
- return be({
941
+ return ye({
882
942
  type: "error",
883
943
  title: "Помилка!",
884
944
  message: "Сталась помилка під час завантаження файлу",
885
945
  position: "right-bottom"
886
946
  }), console.error("Сталась помилка завантаження файлу", s), null;
887
947
  }
888
- }, Zl = async (o) => {
948
+ }, oo = async (o) => {
889
949
  try {
890
950
  return await fetch(`file/delete${o}`), !0;
891
951
  } catch (e) {
@@ -898,7 +958,7 @@ const Vl = /* @__PURE__ */ N(_l, [["render", Cl]]), Ml = {
898
958
  } catch (e) {
899
959
  console.error(e.message);
900
960
  }
901
- }, Wl = {}, Ql = {
961
+ }, ao = {}, so = {
902
962
  xmlns: "http://www.w3.org/2000/svg",
903
963
  width: "24",
904
964
  height: "24",
@@ -909,13 +969,13 @@ const Vl = /* @__PURE__ */ N(_l, [["render", Cl]]), Ml = {
909
969
  "stroke-linecap": "round",
910
970
  "stroke-linejoin": "round"
911
971
  };
912
- function Xl(o, e) {
913
- return i(), c("svg", Ql, e[0] || (e[0] = [
972
+ function no(o, e) {
973
+ return u(), c("svg", so, e[0] || (e[0] = [
914
974
  l("path", { d: "M5 12h14" }, null, -1),
915
975
  l("path", { d: "M12 5v14" }, null, -1)
916
976
  ]));
917
977
  }
918
- const De = /* @__PURE__ */ N(Wl, [["render", Xl]]), Yl = {}, eo = {
978
+ const Ae = /* @__PURE__ */ N(ao, [["render", no]]), ro = {}, io = {
919
979
  xmlns: "http://www.w3.org/2000/svg",
920
980
  class: "icon icon-tabler icon-tabler-file-text",
921
981
  width: "44",
@@ -927,12 +987,12 @@ const De = /* @__PURE__ */ N(Wl, [["render", Xl]]), Yl = {}, eo = {
927
987
  "stroke-linecap": "round",
928
988
  "stroke-linejoin": "round"
929
989
  };
930
- function to(o, e, t, n, s, r) {
931
- return i(), c("svg", eo, e[0] || (e[0] = [
990
+ function uo(o, e, t, n, s, r) {
991
+ return u(), c("svg", io, e[0] || (e[0] = [
932
992
  ce('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><line x1="9" y1="9" x2="10" y2="9"></line><line x1="9" y1="13" x2="15" y2="13"></line><line x1="9" y1="17" x2="15" y2="17"></line>', 6)
933
993
  ]));
934
994
  }
935
- const lo = /* @__PURE__ */ N(Yl, [["render", to]]), oo = {}, ao = {
995
+ const co = /* @__PURE__ */ N(ro, [["render", uo]]), po = {}, fo = {
936
996
  xmlns: "http://www.w3.org/2000/svg",
937
997
  class: "icon icon-tabler icon-tabler-table",
938
998
  width: "44",
@@ -944,8 +1004,8 @@ const lo = /* @__PURE__ */ N(Yl, [["render", to]]), oo = {}, ao = {
944
1004
  "stroke-linecap": "round",
945
1005
  "stroke-linejoin": "round"
946
1006
  };
947
- function so(o, e, t, n, s, r) {
948
- return i(), c("svg", ao, e[0] || (e[0] = [
1007
+ function vo(o, e, t, n, s, r) {
1008
+ return u(), c("svg", fo, e[0] || (e[0] = [
949
1009
  l("path", {
950
1010
  stroke: "none",
951
1011
  d: "M0 0h24v24H0z",
@@ -972,7 +1032,7 @@ function so(o, e, t, n, s, r) {
972
1032
  }, null, -1)
973
1033
  ]));
974
1034
  }
975
- const no = /* @__PURE__ */ N(oo, [["render", so]]), ro = {}, io = {
1035
+ const mo = /* @__PURE__ */ N(po, [["render", vo]]), ho = {}, go = {
976
1036
  xmlns: "http://www.w3.org/2000/svg",
977
1037
  width: "24",
978
1038
  height: "24",
@@ -984,12 +1044,12 @@ const no = /* @__PURE__ */ N(oo, [["render", so]]), ro = {}, io = {
984
1044
  "stroke-linejoin": "round",
985
1045
  class: "icon icon-tabler icons-tabler-outline icon-tabler-file-unknown"
986
1046
  };
987
- function uo(o, e, t, n, s, r) {
988
- return i(), c("svg", io, e[0] || (e[0] = [
1047
+ function bo(o, e, t, n, s, r) {
1048
+ return u(), c("svg", go, e[0] || (e[0] = [
989
1049
  ce('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M12 17v.01"></path><path d="M12 14a1.5 1.5 0 1 0 -1.14 -2.474"></path>', 5)
990
1050
  ]));
991
1051
  }
992
- const co = /* @__PURE__ */ N(ro, [["render", uo]]), po = {}, fo = {
1052
+ const yo = /* @__PURE__ */ N(ho, [["render", bo]]), xo = {}, wo = {
993
1053
  xmlns: "http://www.w3.org/2000/svg",
994
1054
  class: "icon icon-tabler icon-tabler-file-zip",
995
1055
  width: "44",
@@ -1001,12 +1061,12 @@ const co = /* @__PURE__ */ N(ro, [["render", uo]]), po = {}, fo = {
1001
1061
  "stroke-linecap": "round",
1002
1062
  "stroke-linejoin": "round"
1003
1063
  };
1004
- function vo(o, e, t, n, s, r) {
1005
- return i(), c("svg", fo, e[0] || (e[0] = [
1064
+ function ko(o, e, t, n, s, r) {
1065
+ return u(), c("svg", wo, e[0] || (e[0] = [
1006
1066
  ce('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"></path><path d="M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z"></path><line x1="11" y1="5" x2="10" y2="5"></line><line x1="13" y1="7" x2="12" y2="7"></line><line x1="11" y1="9" x2="10" y2="9"></line><line x1="13" y1="11" x2="12" y2="11"></line><line x1="11" y1="13" x2="10" y2="13"></line><line x1="13" y1="15" x2="12" y2="15"></line>', 9)
1007
1067
  ]));
1008
1068
  }
1009
- const mo = /* @__PURE__ */ N(po, [["render", vo]]), ho = {}, go = {
1069
+ const _o = /* @__PURE__ */ N(xo, [["render", ko]]), $o = {}, Vo = {
1010
1070
  xmlns: "http://www.w3.org/2000/svg",
1011
1071
  class: "icon icon-tabler icon-tabler-file-code",
1012
1072
  width: "44",
@@ -1018,25 +1078,25 @@ const mo = /* @__PURE__ */ N(po, [["render", vo]]), ho = {}, go = {
1018
1078
  "stroke-linecap": "round",
1019
1079
  "stroke-linejoin": "round"
1020
1080
  };
1021
- function bo(o, e, t, n, s, r) {
1022
- return i(), c("svg", go, e[0] || (e[0] = [
1081
+ function Co(o, e, t, n, s, r) {
1082
+ return u(), c("svg", Vo, e[0] || (e[0] = [
1023
1083
  ce('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M10 13l-1 2l1 2"></path><path d="M14 13l1 2l-1 2"></path>', 5)
1024
1084
  ]));
1025
1085
  }
1026
- const yo = /* @__PURE__ */ N(ho, [["render", bo]]), xo = (o) => {
1086
+ const Mo = /* @__PURE__ */ N($o, [["render", Co]]), Lo = (o) => {
1027
1087
  if (!o) return "";
1028
1088
  const e = o?.split(".");
1029
1089
  return e[e.length - 1];
1030
- }, wo = (o) => {
1031
- const e = xo(o), t = {
1090
+ }, So = (o) => {
1091
+ const e = Lo(o), t = {
1032
1092
  imageFormat: ["tiff", "jpg", "jpeg", "png", "svg", "ico", "webp"],
1033
1093
  sheetsFormat: ["xls", "csv", "xlsx"],
1034
1094
  archivesFormat: ["zip", "rar"],
1035
1095
  textsFormat: ["json", "geojson", "txt", "yml", "yaml", "shp"],
1036
1096
  documentsFormat: ["pdf"]
1037
1097
  };
1038
- return t.imageFormat.includes(e) ? "img" : t.sheetsFormat.includes(e) ? no : t.textsFormat.includes(e) ? yo : t.documentsFormat.includes(e) ? lo : t.archivesFormat.includes(e) ? mo : co;
1039
- }, ko = {}, _o = {
1098
+ return t.imageFormat.includes(e) ? "img" : t.sheetsFormat.includes(e) ? mo : t.textsFormat.includes(e) ? Mo : t.documentsFormat.includes(e) ? co : t.archivesFormat.includes(e) ? _o : yo;
1099
+ }, Bo = {}, jo = {
1040
1100
  xmlns: "http://www.w3.org/2000/svg",
1041
1101
  width: "24",
1042
1102
  height: "24",
@@ -1048,12 +1108,12 @@ const yo = /* @__PURE__ */ N(ho, [["render", bo]]), xo = (o) => {
1048
1108
  "stroke-linejoin": "round",
1049
1109
  class: "icon icon-tabler icons-tabler-outline icon-tabler-trash"
1050
1110
  };
1051
- function $o(o, e) {
1052
- return i(), c("svg", _o, e[0] || (e[0] = [
1111
+ function Io(o, e) {
1112
+ return u(), c("svg", jo, e[0] || (e[0] = [
1053
1113
  ce('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>', 6)
1054
1114
  ]));
1055
1115
  }
1056
- const Te = /* @__PURE__ */ N(ko, [["render", $o]]), Co = {}, Vo = {
1116
+ const He = /* @__PURE__ */ N(Bo, [["render", Io]]), zo = {}, Eo = {
1057
1117
  xmlns: "http://www.w3.org/2000/svg",
1058
1118
  width: "24",
1059
1119
  height: "24",
@@ -1065,8 +1125,8 @@ const Te = /* @__PURE__ */ N(ko, [["render", $o]]), Co = {}, Vo = {
1065
1125
  "stroke-linejoin": "round",
1066
1126
  class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
1067
1127
  };
1068
- function Mo(o, e) {
1069
- return i(), c("svg", Vo, e[0] || (e[0] = [
1128
+ function Ao(o, e) {
1129
+ return u(), c("svg", Eo, e[0] || (e[0] = [
1070
1130
  l("path", {
1071
1131
  stroke: "none",
1072
1132
  d: "M0 0h24v24H0z",
@@ -1077,7 +1137,7 @@ function Mo(o, e) {
1077
1137
  l("path", { d: "M12 4l0 12" }, null, -1)
1078
1138
  ]));
1079
1139
  }
1080
- const yt = /* @__PURE__ */ N(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, So = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, Bo = /* @__PURE__ */ D({
1140
+ const yt = /* @__PURE__ */ N(zo, [["render", Ao]]), Do = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, Fo = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, Oo = /* @__PURE__ */ A({
1081
1141
  __name: "vs-input-file-list-item",
1082
1142
  props: /* @__PURE__ */ Z({
1083
1143
  format: {},
@@ -1098,22 +1158,22 @@ const yt = /* @__PURE__ */ N(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
1098
1158
  emits: ["update:value", "update:item"],
1099
1159
  setup(o) {
1100
1160
  const e = W(o, "value"), t = W(o, "item"), n = o;
1101
- return (s, r) => (i(), c("div", Lo, [
1102
- (i(), se(Be(q(wo)(t.value)), {
1161
+ return (s, r) => (u(), c("div", Do, [
1162
+ (u(), se(Be(q(So)(t.value)), {
1103
1163
  src: t.value,
1104
1164
  alt: "file",
1105
1165
  class: "w-full h-full object-cover cursor-pointer",
1106
1166
  onClick: r[0] || (r[0] = (a) => q(it)(t.value))
1107
1167
  }, null, 8, ["src"])),
1108
- l("div", So, [
1168
+ l("div", Fo, [
1109
1169
  l("button", {
1110
1170
  type: "button",
1111
1171
  onClick: r[1] || (r[1] = (a) => {
1112
- q(Zl)(t.value), e.value = n.multiple ? e.value?.filter((d) => d !== t.value) : "";
1172
+ q(oo)(t.value), e.value = n.multiple ? e.value?.filter((i) => i !== t.value) : "";
1113
1173
  }),
1114
1174
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"
1115
1175
  }, [
1116
- B(Te, { class: "w-4 h-4" })
1176
+ B(He, { class: "w-4 h-4" })
1117
1177
  ]),
1118
1178
  l("button", {
1119
1179
  type: "button",
@@ -1125,10 +1185,10 @@ const yt = /* @__PURE__ */ N(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
1125
1185
  ])
1126
1186
  ]));
1127
1187
  }
1128
- }), ut = /* @__PURE__ */ N(Bo, [["__scopeId", "data-v-0ca886b3"]]), jo = { class: "flex items-center gap-x-2" }, Io = {
1188
+ }), ut = /* @__PURE__ */ N(Oo, [["__scopeId", "data-v-0ca886b3"]]), Uo = { class: "flex items-center gap-x-2" }, To = {
1129
1189
  key: 1,
1130
1190
  class: "flex items-center flex-wrap gap-2"
1131
- }, zo = /* @__PURE__ */ D({
1191
+ }, Ro = /* @__PURE__ */ A({
1132
1192
  __name: "vs-input-file",
1133
1193
  props: /* @__PURE__ */ Z({
1134
1194
  format: {},
@@ -1152,12 +1212,12 @@ const yt = /* @__PURE__ */ N(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
1152
1212
  if (!v || !v.name.endsWith(e.format))
1153
1213
  return;
1154
1214
  }
1155
- const d = a.target.files?.[0];
1156
- if (!d) return;
1157
- const u = await Kl(d, "1", "form", "table");
1158
- t.value = e.multiple ? [...t.value || [], u?.file_path] : u?.file_path;
1215
+ const i = a.target.files?.[0];
1216
+ if (!i) return;
1217
+ const d = await lo(i, "1", "form", "table");
1218
+ t.value = e.multiple ? [...t.value || [], d?.file_path] : d?.file_path;
1159
1219
  };
1160
- return (a, d) => (i(), c("div", jo, [
1220
+ return (a, i) => (u(), c("div", Uo, [
1161
1221
  l("input", {
1162
1222
  class: "hidden",
1163
1223
  ref_key: "fileInput",
@@ -1165,46 +1225,46 @@ const yt = /* @__PURE__ */ N(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
1165
1225
  type: "file",
1166
1226
  onChange: r
1167
1227
  }, null, 544),
1168
- !a.multiple && t.value ? (i(), se(ut, {
1228
+ !a.multiple && t.value ? (u(), se(ut, {
1169
1229
  key: 0,
1170
1230
  item: t.value,
1171
- "onUpdate:item": d[0] || (d[0] = (u) => t.value = u),
1231
+ "onUpdate:item": i[0] || (i[0] = (d) => t.value = d),
1172
1232
  value: t.value,
1173
- "onUpdate:value": d[1] || (d[1] = (u) => t.value = u)
1174
- }, null, 8, ["item", "value"])) : a.multiple ? (i(), c("div", Io, [
1175
- (i(!0), c(Y, null, oe(t.value, (u, v) => (i(), se(ut, {
1233
+ "onUpdate:value": i[1] || (i[1] = (d) => t.value = d)
1234
+ }, null, 8, ["item", "value"])) : a.multiple ? (u(), c("div", To, [
1235
+ (u(!0), c(Y, null, oe(t.value, (d, v) => (u(), se(ut, {
1176
1236
  multiple: a.multiple,
1177
1237
  key: v,
1178
1238
  value: t.value,
1179
- "onUpdate:value": d[2] || (d[2] = (p) => t.value = p),
1239
+ "onUpdate:value": i[2] || (i[2] = (p) => t.value = p),
1180
1240
  item: s(v)
1181
1241
  }, null, 8, ["multiple", "value", "item"]))), 128)),
1182
1242
  l("div", {
1183
- onClick: d[3] || (d[3] = (u) => !a.disabled && n.value?.click()),
1184
- class: V([
1243
+ onClick: i[3] || (i[3] = (d) => !a.disabled && n.value?.click()),
1244
+ class: C([
1185
1245
  "h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-[#CFD9E0] rounded-lg flex items-center justify-center transition-all duration-300",
1186
1246
  a.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
1187
1247
  ])
1188
1248
  }, [
1189
- B(De, { class: "w-6 h-6" })
1249
+ B(Ae, { class: "w-6 h-6" })
1190
1250
  ], 2)
1191
- ])) : F("", !0),
1192
- a.multiple ? F("", !0) : (i(), c("div", {
1251
+ ])) : z("", !0),
1252
+ a.multiple ? z("", !0) : (u(), c("div", {
1193
1253
  key: 2,
1194
- onClick: d[4] || (d[4] = (u) => n.value?.click()),
1195
- class: V([a.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500", "h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center cursor-pointer hover:border-blue-500 transition-all duration-300 hover:bg-blue-50"])
1254
+ onClick: i[4] || (i[4] = (d) => n.value?.click()),
1255
+ class: C([a.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500", "h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center cursor-pointer hover:border-blue-500 transition-all duration-300 hover:bg-blue-50"])
1196
1256
  }, [
1197
- B(De, { class: "w-6 h-6" })
1257
+ B(Ae, { class: "w-6 h-6" })
1198
1258
  ], 2))
1199
1259
  ]));
1200
1260
  }
1201
- }), Eo = { class: "max-w-[55vw]" }, Do = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, Fo = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, Oo = { class: "px-[5px]" }, Ao = { class: "" }, Ae = /* @__PURE__ */ D({
1261
+ }), Po = { class: "max-w-[55vw]" }, Ho = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, No = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, qo = { class: "px-[5px]" }, Go = { class: "" }, Oe = /* @__PURE__ */ A({
1202
1262
  __name: "vs-widget-file-info",
1203
1263
  props: {
1204
1264
  item: { default: null }
1205
1265
  },
1206
1266
  setup(o) {
1207
- const e = o, t = A(() => {
1267
+ const e = o, t = F(() => {
1208
1268
  try {
1209
1269
  return new Date(e.item.cdate).toLocaleDateString("uk-UA", {
1210
1270
  day: "2-digit",
@@ -1221,35 +1281,35 @@ const yt = /* @__PURE__ */ N(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
1221
1281
  const r = s / 1024;
1222
1282
  return r < 1024 ? `${r.toFixed(2)} KB` : `${(r / 1024).toFixed(2)} MB`;
1223
1283
  }
1224
- return (s, r) => (i(), c(Y, null, [
1284
+ return (s, r) => (u(), c(Y, null, [
1225
1285
  r[1] || (r[1] = ce('<div class="flex items-center justify-center h-[30px] w-[30px]"><svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-file"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path></svg></div>', 1)),
1226
- l("div", Eo, [
1227
- l("p", Do, T(s.item?.uploaded_name), 1),
1228
- l("p", Fo, [
1229
- l("span", null, T(s.item?.username), 1),
1230
- K(l("span", Oo, "|", 512), [
1286
+ l("div", Po, [
1287
+ l("p", Ho, U(s.item?.uploaded_name), 1),
1288
+ l("p", No, [
1289
+ l("span", null, U(s.item?.username), 1),
1290
+ K(l("span", qo, "|", 512), [
1231
1291
  [Je, s.item?.username]
1232
1292
  ]),
1233
- l("span", null, T(t.value), 1),
1293
+ l("span", null, U(t.value), 1),
1234
1294
  r[0] || (r[0] = l("span", { class: "px-[5px]" }, "|", -1)),
1235
- l("span", Ao, T(n(s.item?.size)), 1)
1295
+ l("span", Go, U(n(s.item?.size)), 1)
1236
1296
  ])
1237
1297
  ])
1238
1298
  ], 64));
1239
1299
  }
1240
- }), Uo = { class: "p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full" }, To = {
1300
+ }), Jo = { class: "p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full" }, Ko = {
1241
1301
  key: 0,
1242
1302
  class: "flex w-full gap-x-3 items-center"
1243
- }, Ro = {
1303
+ }, Zo = {
1244
1304
  key: 1,
1245
1305
  class: "flex gap-x-3 w-full items-center"
1246
- }, Po = {
1306
+ }, Wo = {
1247
1307
  key: 2,
1248
1308
  class: "flex gap-x-3 w-full items-center"
1249
- }, Ho = ["href"], No = {
1309
+ }, Qo = ["href"], Xo = {
1250
1310
  key: 3,
1251
1311
  class: "flex gap-x-3 w-full items-center"
1252
- }, qo = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, Go = { class: "p-0.5 sm:p-1 inline-flex items-center gap-0.5 bg-white rounded-lg dark:bg-neutral-800 dark:border-neutral-700" }, Jo = { class: "inline-block" }, Ko = { class: "inline-block" }, Zo = /* @__PURE__ */ D({
1312
+ }, Yo = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, ea = { class: "p-0.5 sm:p-1 inline-flex items-center gap-0.5 bg-white rounded-lg dark:bg-neutral-800 dark:border-neutral-700" }, ta = { class: "inline-block" }, la = { class: "inline-block" }, oa = /* @__PURE__ */ A({
1253
1313
  __name: "vs-widget-file-item",
1254
1314
  props: {
1255
1315
  item: { default: null },
@@ -1269,7 +1329,7 @@ const yt = /* @__PURE__ */ N(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
1269
1329
  const w = document.createElement("a");
1270
1330
  w.setAttribute("download", p?.uploaded_name), w.href = p?.file_path, w.click();
1271
1331
  }
1272
- async function d() {
1332
+ async function i() {
1273
1333
  try {
1274
1334
  await fetch(
1275
1335
  `${t.prefix}/widget/file/${t.item.entity_id}/${t.item.file_id}`
@@ -1278,43 +1338,43 @@ const yt = /* @__PURE__ */ N(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
1278
1338
  console.error(p);
1279
1339
  }
1280
1340
  }
1281
- function u() {
1341
+ function d() {
1282
1342
  n("openModal", {
1283
1343
  title: "Ви впевнені?",
1284
1344
  message: "Ви впевнені, що хочете видалити цей файл?",
1285
1345
  confirmButtonText: "Так, я впевнена/ий",
1286
1346
  cancelButtonText: "Скасувати",
1287
- confirm: d,
1347
+ confirm: i,
1288
1348
  updateListOnConfirm: !0
1289
1349
  });
1290
1350
  }
1291
1351
  function v(p) {
1292
1352
  (t.item.ext === "jpg" || t.item.ext === "png") && n("openLightbox", { item: t.item, index: p });
1293
1353
  }
1294
- return (p, w) => (i(), c("div", Uo, [
1295
- p.item.ext === "jpg" || p.item.ext === "png" ? (i(), c("div", To, [
1354
+ return (p, w) => (u(), c("div", Jo, [
1355
+ p.item.ext === "jpg" || p.item.ext === "png" ? (u(), c("div", Ko, [
1296
1356
  l("div", {
1297
1357
  class: "max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",
1298
1358
  onClick: w[0] || (w[0] = (b) => v(p.index))
1299
1359
  }, [
1300
- B(Ae, { item: p.item }, null, 8, ["item"])
1360
+ B(Oe, { item: p.item }, null, 8, ["item"])
1301
1361
  ])
1302
- ])) : s(p.item) ? (i(), c("div", Ro, [
1303
- B(Ae, { item: p.item }, null, 8, ["item"])
1304
- ])) : r(p.item) ? (i(), c("div", Po, [
1362
+ ])) : s(p.item) ? (u(), c("div", Zo, [
1363
+ B(Oe, { item: p.item }, null, 8, ["item"])
1364
+ ])) : r(p.item) ? (u(), c("div", Wo, [
1305
1365
  l("a", {
1306
1366
  href: `/api/file-preview?id=${p.item.file_id}`,
1307
1367
  target: "_blank",
1308
1368
  class: "flex gap-x-3 w-full items-center"
1309
1369
  }, [
1310
- B(Ae, { item: p.item }, null, 8, ["item"])
1311
- ], 8, Ho)
1312
- ])) : (i(), c("div", No, [
1313
- B(Ae, { item: p.item }, null, 8, ["item"])
1370
+ B(Oe, { item: p.item }, null, 8, ["item"])
1371
+ ], 8, Qo)
1372
+ ])) : (u(), c("div", Xo, [
1373
+ B(Oe, { item: p.item }, null, 8, ["item"])
1314
1374
  ])),
1315
- l("div", qo, [
1316
- l("div", Go, [
1317
- l("div", Jo, [
1375
+ l("div", Yo, [
1376
+ l("div", ea, [
1377
+ l("div", ta, [
1318
1378
  l("button", {
1319
1379
  class: "inline-flex p-[6px] justify-center items-center gap-x-2 rounded-lg border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
1320
1380
  onClick: w[1] || (w[1] = (b) => a(p.item))
@@ -1326,13 +1386,13 @@ const yt = /* @__PURE__ */ N(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
1326
1386
  ])
1327
1387
  ]),
1328
1388
  w[3] || (w[3] = l("div", { class: "w-px h-5 mx-1 bg-gray-200 dark:bg-neutral-700" }, null, -1)),
1329
- l("div", Ko, [
1389
+ l("div", la, [
1330
1390
  l("button", {
1331
1391
  type: "button",
1332
1392
  class: "size-[30px] inline-flex justify-center items-center gap-x-2 rounded-lg border border-transparent text-red-600 hover:bg-red-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-red-100 dark:text-red-500 dark:hover:bg-red-500/20 dark:focus:bg-red-500/20",
1333
- onClick: w[2] || (w[2] = (b) => u())
1393
+ onClick: w[2] || (w[2] = (b) => d())
1334
1394
  }, [
1335
- B(Te, {
1395
+ B(He, {
1336
1396
  height: "14",
1337
1397
  width: "14"
1338
1398
  })
@@ -1342,7 +1402,7 @@ const yt = /* @__PURE__ */ N(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
1342
1402
  ])
1343
1403
  ]));
1344
1404
  }
1345
- }), Wo = {}, Qo = {
1405
+ }), aa = {}, sa = {
1346
1406
  xmlns: "http://www.w3.org/2000/svg",
1347
1407
  width: "24",
1348
1408
  height: "24",
@@ -1354,8 +1414,8 @@ const yt = /* @__PURE__ */ N(Co, [["render", Mo]]), Lo = { class: "h-[120px] w-[
1354
1414
  "stroke-linejoin": "round",
1355
1415
  class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
1356
1416
  };
1357
- function Xo(o, e) {
1358
- return i(), c("svg", Qo, e[0] || (e[0] = [
1417
+ function na(o, e) {
1418
+ return u(), c("svg", sa, e[0] || (e[0] = [
1359
1419
  l("path", {
1360
1420
  stroke: "none",
1361
1421
  d: "M0 0h24v24H0z",
@@ -1366,13 +1426,13 @@ function Xo(o, e) {
1366
1426
  l("path", { d: "M12 4l0 12" }, null, -1)
1367
1427
  ]));
1368
1428
  }
1369
- const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, ta = { class: "flex w-full mb-[12px] items-center gap-x-2" }, la = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, oa = { class1: "ml-auto" }, aa = { class: "py-1.5 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 cursor-pointer hover:bg-gray-200 text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700" }, sa = {
1429
+ const ra = /* @__PURE__ */ N(aa, [["render", na]]), ia = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, ua = { class: "flex w-full mb-[12px] items-center gap-x-2" }, da = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, ca = { class1: "ml-auto" }, pa = { class: "py-1.5 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 cursor-pointer hover:bg-gray-200 text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700" }, fa = {
1370
1430
  key: 0,
1371
1431
  class: "py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"
1372
- }, na = { class: "relative" }, ra = {
1432
+ }, va = { class: "relative" }, ma = {
1373
1433
  key: 1,
1374
1434
  class: "space-y-3 max-h-[300px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"
1375
- }, ia = { key: 0 }, ua = /* @__PURE__ */ D({
1435
+ }, ha = { key: 0 }, ga = /* @__PURE__ */ A({
1376
1436
  __name: "vs-input-file-list",
1377
1437
  props: {
1378
1438
  id: { default: "" },
@@ -1387,7 +1447,7 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1387
1447
  },
1388
1448
  emits: ["update"],
1389
1449
  setup(o, { emit: e }) {
1390
- const t = o, n = Me("form"), s = A(() => n.value.formId), r = x(!1), a = x(0), d = e, u = x(!1), v = x({}), p = x([]), w = x(""), b = A(() => Array.isArray(p.value) ? p.value.filter((m) => m.ext === "jpg" || m.ext === "png").map((m) => m?.file_path) : []), $ = A(() => w.value === "" ? p.value : p.value.filter((m) => m?.uploaded_name?.includes(w.value))), S = (m) => {
1450
+ const t = o, n = Me("form"), s = F(() => n.value.formId), r = x(!1), a = x(0), i = e, d = x(!1), v = x({}), p = x([]), w = x(""), b = F(() => Array.isArray(p.value) ? p.value.filter((m) => m.ext === "jpg" || m.ext === "png").map((m) => m?.file_path) : []), $ = F(() => w.value === "" ? p.value : p.value.filter((m) => m?.uploaded_name?.includes(w.value))), S = (m) => {
1391
1451
  const f = b.value.findIndex((Q) => Q === m.item.file_path);
1392
1452
  f !== -1 && (r.value = !0, a.value = f);
1393
1453
  }, R = async () => {
@@ -1397,47 +1457,47 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1397
1457
  } catch (m) {
1398
1458
  console.error(m);
1399
1459
  }
1400
- }, C = async (m) => {
1460
+ }, V = async (m) => {
1401
1461
  await Promise.all(
1402
1462
  Array.from(m.target.files).map(async (f) => {
1403
1463
  const Q = new FormData();
1404
1464
  Q.append("file", f);
1405
1465
  try {
1406
- const U = `${t.prefix}/widget/file/${s.value}`;
1407
- return await fetch(U, { method: "POST", body: Q }), d("update", "file-list"), f;
1408
- } catch (U) {
1409
- return console.error(U), null;
1466
+ const T = `${t.prefix}/widget/file/${s.value}`;
1467
+ return await fetch(T, { method: "POST", body: Q }), i("update", "file-list"), f;
1468
+ } catch (T) {
1469
+ return console.error(T), null;
1410
1470
  }
1411
1471
  })
1412
1472
  ), await R();
1413
- }, E = (m) => {
1473
+ }, D = (m) => {
1414
1474
  const f = { ...m };
1415
1475
  return m.cancel || (f.cancel = () => {
1416
- u.value = !1;
1476
+ d.value = !1;
1417
1477
  }), m.updateListOnConfirm && (f.confirm = async () => {
1418
- await m.confirm(), u.value = !1, R();
1478
+ await m.confirm(), d.value = !1, R();
1419
1479
  }), f;
1420
1480
  }, j = (m) => {
1421
- v.value = E(m), u.value = !0;
1481
+ v.value = D(m), d.value = !0;
1422
1482
  };
1423
1483
  return le(s, (m) => {
1424
1484
  m && R();
1425
- }), xe(() => {
1485
+ }), me(() => {
1426
1486
  s.value && R();
1427
1487
  }), (m, f) => {
1428
- const Q = at("Lightbox"), U = at("MessageBox");
1429
- return i(), c("div", ea, [
1430
- l("div", ta, [
1431
- l("h2", la, " Файлів: " + T(p.value?.length), 1),
1432
- l("div", oa, [
1488
+ const Q = at("Lightbox"), T = at("MessageBox");
1489
+ return u(), c("div", ia, [
1490
+ l("div", ua, [
1491
+ l("h2", da, " Файлів: " + U(p.value?.length), 1),
1492
+ l("div", ca, [
1433
1493
  l("label", null, [
1434
1494
  l("input", {
1435
1495
  type: "file",
1436
1496
  class: "hidden",
1437
- onChange: f[0] || (f[0] = (O) => C(O))
1497
+ onChange: f[0] || (f[0] = (O) => V(O))
1438
1498
  }, null, 32),
1439
- l("div", aa, [
1440
- B(Yo, {
1499
+ l("div", pa, [
1500
+ B(ra, {
1441
1501
  height: "16",
1442
1502
  width: "16"
1443
1503
  })
@@ -1445,9 +1505,9 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1445
1505
  ])
1446
1506
  ])
1447
1507
  ]),
1448
- p.value?.length > 4 ? (i(), c("div", sa, [
1508
+ p.value?.length > 4 ? (u(), c("div", fa, [
1449
1509
  l("div", null, [
1450
- l("div", na, [
1510
+ l("div", va, [
1451
1511
  f[8] || (f[8] = l("div", { class: "absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5" }, [
1452
1512
  l("svg", {
1453
1513
  class: "flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400",
@@ -1484,9 +1544,9 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1484
1544
  ])
1485
1545
  ])
1486
1546
  ])
1487
- ])) : F("", !0),
1488
- p.value?.length ? (i(), c("div", ra, [
1489
- (i(!0), c(Y, null, oe($.value, (O, ue) => (i(), se(Zo, {
1547
+ ])) : z("", !0),
1548
+ p.value?.length ? (u(), c("div", ma, [
1549
+ (u(!0), c(Y, null, oe($.value, (O, ue) => (u(), se(oa, {
1490
1550
  key: ue,
1491
1551
  prefix: m.prefix,
1492
1552
  item: O,
@@ -1495,10 +1555,10 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1495
1555
  onOpenModal: f[3] || (f[3] = (ee) => j(ee)),
1496
1556
  onOpenLightbox: f[4] || (f[4] = (ee) => S(ee))
1497
1557
  }, null, 8, ["prefix", "item", "index"]))), 128)),
1498
- $.value.length ? F("", !0) : (i(), c("div", ia, f[9] || (f[9] = [
1558
+ $.value.length ? z("", !0) : (u(), c("div", ha, f[9] || (f[9] = [
1499
1559
  l("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
1500
1560
  ])))
1501
- ])) : F("", !0),
1561
+ ])) : z("", !0),
1502
1562
  B(Q, {
1503
1563
  modelValue: r.value,
1504
1564
  "onUpdate:modelValue": f[5] || (f[5] = (O) => r.value = O),
@@ -1506,15 +1566,15 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1506
1566
  "onUpdate:index": f[6] || (f[6] = (O) => a.value = O),
1507
1567
  images: b.value
1508
1568
  }, null, 8, ["modelValue", "startIndex", "images"]),
1509
- B(U, Ee({
1510
- modelValue: u.value,
1511
- "onUpdate:modelValue": f[7] || (f[7] = (O) => u.value = O),
1569
+ B(T, Ee({
1570
+ modelValue: d.value,
1571
+ "onUpdate:modelValue": f[7] || (f[7] = (O) => d.value = O),
1512
1572
  onConfirm: v.value.confirm
1513
1573
  }, v.value), null, 16, ["modelValue", "onConfirm"])
1514
1574
  ]);
1515
1575
  };
1516
1576
  }
1517
- }), da = { class: "flex items-center justify-between" }, ca = { class: "text-[16px] text-gray-900 font-medium" }, pa = { class: "grid gap-3" }, fa = /* @__PURE__ */ D({
1577
+ }), ba = { class: "flex items-center justify-between" }, ya = { class: "text-[16px] text-gray-900 font-medium" }, xa = { class: "grid gap-3" }, wa = /* @__PURE__ */ A({
1518
1578
  __name: "vs-container-switcher",
1519
1579
  props: {
1520
1580
  title: {
@@ -1537,19 +1597,19 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1537
1597
  (n) => {
1538
1598
  t.value = n;
1539
1599
  }
1540
- ), (n, s) => (i(), c("div", null, [
1541
- l("div", da, [
1542
- l("p", ca, T(o.title), 1),
1600
+ ), (n, s) => (u(), c("div", null, [
1601
+ l("div", ba, [
1602
+ l("p", ya, U(o.title), 1),
1543
1603
  B(bt, {
1544
1604
  modelValue: t.value,
1545
1605
  "onUpdate:modelValue": s[0] || (s[0] = (r) => t.value = r),
1546
- style: ye(o.style)
1606
+ style: xe(o.style)
1547
1607
  }, null, 8, ["modelValue", "style"])
1548
1608
  ]),
1549
1609
  B(mt, { name: "slide-fade" }, {
1550
1610
  default: Le(() => [
1551
- K(l("div", pa, [
1552
- $e(n.$slots, "default", {}, void 0, !0)
1611
+ K(l("div", xa, [
1612
+ _e(n.$slots, "default", {}, void 0, !0)
1553
1613
  ], 512), [
1554
1614
  [Je, t.value]
1555
1615
  ])
@@ -1558,7 +1618,7 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1558
1618
  })
1559
1619
  ]));
1560
1620
  }
1561
- }), va = /* @__PURE__ */ N(fa, [["__scopeId", "data-v-90320b87"]]), ma = { class: "text-[16px] text-gray-900 font-medium" }, ha = { class: "grid gap-3" }, ga = /* @__PURE__ */ D({
1621
+ }), ka = /* @__PURE__ */ N(wa, [["__scopeId", "data-v-90320b87"]]), _a = { class: "text-[16px] text-gray-900 font-medium" }, $a = { class: "grid gap-3" }, Va = /* @__PURE__ */ A({
1562
1622
  __name: "vs-container-accordion",
1563
1623
  props: {
1564
1624
  title: {
@@ -1581,21 +1641,21 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1581
1641
  (n) => {
1582
1642
  t.value = n;
1583
1643
  }
1584
- ), (n, s) => (i(), c("div", null, [
1644
+ ), (n, s) => (u(), c("div", null, [
1585
1645
  l("button", {
1586
1646
  type: "button",
1587
1647
  onClick: s[0] || (s[0] = (r) => t.value = !t.value),
1588
1648
  class: "flex items-center gap-2"
1589
1649
  }, [
1590
- B(q(bl), {
1591
- class: V(["h-4 w-4 duration-300", [t.value ? "-rotate-180" : ""]])
1650
+ B(q(Cl), {
1651
+ class: C(["h-4 w-4 duration-300", [t.value ? "-rotate-180" : ""]])
1592
1652
  }, null, 8, ["class"]),
1593
- l("span", ma, T(o.title), 1)
1653
+ l("span", _a, U(o.title), 1)
1594
1654
  ]),
1595
1655
  B(mt, { name: "slide-fade" }, {
1596
1656
  default: Le(() => [
1597
- K(l("div", ha, [
1598
- $e(n.$slots, "default", {}, void 0, !0)
1657
+ K(l("div", $a, [
1658
+ _e(n.$slots, "default", {}, void 0, !0)
1599
1659
  ], 512), [
1600
1660
  [Je, t.value]
1601
1661
  ])
@@ -1604,7 +1664,7 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1604
1664
  })
1605
1665
  ]));
1606
1666
  }
1607
- }), ba = /* @__PURE__ */ N(ga, [["__scopeId", "data-v-590eff11"]]), ya = { class: "flex items-center justify-between" }, xa = /* @__PURE__ */ D({
1667
+ }), Ca = /* @__PURE__ */ N(Va, [["__scopeId", "data-v-590eff11"]]), Ma = { class: "flex items-center justify-between" }, La = /* @__PURE__ */ A({
1608
1668
  __name: "vs-container-default",
1609
1669
  props: {
1610
1670
  title: {
@@ -1617,17 +1677,17 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1617
1677
  }
1618
1678
  },
1619
1679
  setup(o) {
1620
- return (e, t) => (i(), c("div", null, [
1621
- l("div", ya, [
1622
- l("p", null, T(o.title), 1)
1680
+ return (e, t) => (u(), c("div", null, [
1681
+ l("div", Ma, [
1682
+ l("p", null, U(o.title), 1)
1623
1683
  ]),
1624
- $e(e.$slots, "default")
1684
+ _e(e.$slots, "default")
1625
1685
  ]));
1626
1686
  }
1627
- }), wa = {
1628
- switcher: va,
1629
- accordion: ba,
1630
- default: xa
1687
+ }), Sa = {
1688
+ switcher: ka,
1689
+ accordion: Ca,
1690
+ default: La
1631
1691
  }, pe = {
1632
1692
  Equal: "==",
1633
1693
  Inequal: "!=",
@@ -1641,37 +1701,37 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1641
1701
  Contain: "*",
1642
1702
  In: "in",
1643
1703
  NotIn: "not_in"
1644
- }, ka = (o, e) => String(o) === String(e), _a = (o, e) => String(o) !== String(e), $a = (o, e) => o > e, Ca = (o, e) => o >= e, Va = (o, e) => o < e, Ma = (o, e) => o <= e, La = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, Sa = (o, e) => String(o).startsWith(String(e)), Ba = (o, e) => String(o).endsWith(String(e)), ja = (o, e) => String(o).includes(String(e)), Ia = (o, e) => Array.isArray(e) ? e.includes(o) : !1, za = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, xt = (o, e) => {
1704
+ }, Ba = (o, e) => String(o) === String(e), ja = (o, e) => String(o) !== String(e), Ia = (o, e) => o > e, za = (o, e) => o >= e, Ea = (o, e) => o < e, Aa = (o, e) => o <= e, Da = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, Fa = (o, e) => String(o).startsWith(String(e)), Oa = (o, e) => String(o).endsWith(String(e)), Ua = (o, e) => String(o).includes(String(e)), Ta = (o, e) => Array.isArray(e) ? e.includes(o) : !1, Ra = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, xt = (o, e) => {
1645
1705
  if (!e) return !0;
1646
1706
  switch (e?.[1]) {
1647
1707
  case pe.Equal:
1648
- return ka(o, e?.[2]);
1708
+ return Ba(o, e?.[2]);
1649
1709
  case pe.Inequal:
1650
- return _a(o, e?.[2]);
1710
+ return ja(o, e?.[2]);
1651
1711
  case pe.Higer:
1652
- return $a(o, e?.[2]);
1712
+ return Ia(o, e?.[2]);
1653
1713
  case pe.HigerOrEqual:
1654
- return Ca(o, e?.[2]);
1714
+ return za(o, e?.[2]);
1655
1715
  case pe.Lower:
1656
- return Va(o, e?.[2]);
1716
+ return Ea(o, e?.[2]);
1657
1717
  case pe.LowerOrEqual:
1658
- return Ma(o, e?.[2]);
1718
+ return Aa(o, e?.[2]);
1659
1719
  case pe.Between:
1660
- return La(o, e?.[2]);
1720
+ return Da(o, e?.[2]);
1661
1721
  case pe.StartWith:
1662
- return Sa(o, e?.[2]);
1722
+ return Fa(o, e?.[2]);
1663
1723
  case pe.EndWith:
1664
- return Ba(o, e?.[2]);
1724
+ return Oa(o, e?.[2]);
1665
1725
  case pe.Contain:
1666
- return ja(o, e?.[2]);
1726
+ return Ua(o, e?.[2]);
1667
1727
  case pe.In:
1668
- return Ia(o, e?.[2]);
1728
+ return Ta(o, e?.[2]);
1669
1729
  case pe.NotIn:
1670
- return za(o, e?.[2]);
1730
+ return Ra(o, e?.[2]);
1671
1731
  default:
1672
1732
  return !0;
1673
1733
  }
1674
- }, Ea = /* @__PURE__ */ D({
1734
+ }, Pa = /* @__PURE__ */ A({
1675
1735
  __name: "vs-input-container",
1676
1736
  props: {
1677
1737
  style: {
@@ -1692,38 +1752,38 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1692
1752
  }
1693
1753
  },
1694
1754
  setup(o) {
1695
- const e = o, t = Me("formValues", { default: {} }), n = Me("form"), s = A(() => e.schema?.filter((a) => {
1696
- const d = a?.conditions;
1697
- if (!d) return !0;
1698
- const u = Array.isArray(d) ? d[0] : d, v = t?.value?.[u];
1699
- return xt(v, d);
1700
- })), r = A(() => wa[e.view]);
1701
- return (a, d) => o.schema?.length ? (i(), se(Be(r.value), {
1755
+ const e = o, t = Me("formValues", { default: {} }), n = Me("form"), s = F(() => e.schema?.filter((a) => {
1756
+ const i = a?.conditions;
1757
+ if (!i) return !0;
1758
+ const d = Array.isArray(i) ? i[0] : i, v = t?.value?.[d];
1759
+ return xt(v, i);
1760
+ })), r = F(() => Sa[e.view]);
1761
+ return (a, i) => o.schema?.length ? (u(), se(Be(r.value), {
1702
1762
  key: 0,
1703
1763
  title: o.title,
1704
- style: ye(o.style)
1764
+ style: xe(o.style)
1705
1765
  }, {
1706
1766
  default: Le(() => [
1707
- (i(!0), c(Y, null, oe(s.value, (u) => (i(), se(wt, Ee({
1708
- key: u.name
1709
- }, { ref_for: !0 }, u, {
1710
- item: u,
1711
- modelValue: q(t)[u.name],
1712
- "onUpdate:modelValue": (v) => q(t)[u.name] = v,
1767
+ (u(!0), c(Y, null, oe(s.value, (d) => (u(), se(wt, Ee({
1768
+ key: d.name
1769
+ }, { ref_for: !0 }, d, {
1770
+ item: d,
1771
+ modelValue: q(t)[d.name],
1772
+ "onUpdate:modelValue": (v) => q(t)[d.name] = v,
1713
1773
  style: o.style,
1714
- error: q(n)?.errors?.[u.name]
1774
+ error: q(n)?.errors?.[d.name]
1715
1775
  }), null, 16, ["item", "modelValue", "onUpdate:modelValue", "style", "error"]))), 128))
1716
1776
  ]),
1717
1777
  _: 1
1718
- }, 8, ["title", "style"])) : F("", !0);
1778
+ }, 8, ["title", "style"])) : z("", !0);
1719
1779
  }
1720
- }), Da = ["aria-expanded", "data-focus"], Fa = { class: "flex items-center" }, Oa = ["title"], Aa = ["onClick"], Ua = ["title"], Ta = {
1780
+ }), Ha = ["aria-expanded", "data-focus"], Na = { class: "flex items-center" }, qa = ["title"], Ga = ["onClick"], Ja = ["title"], Ka = {
1721
1781
  key: 2,
1722
1782
  class: "text-gray-500 truncate"
1723
- }, Ra = { class: "flex-1 min-w-[2px]" }, Pa = ["placeholder"], Ha = { class: "flex items-center shrink-0" }, Na = ["disabled"], qa = ["disabled", "title"], Ga = ["aria-disabled", "onClick"], Ja = {
1783
+ }, Za = { class: "flex-1 min-w-[2px]" }, Wa = ["placeholder"], Qa = { class: "flex items-center shrink-0" }, Xa = ["disabled"], Ya = ["disabled", "title"], es = ["aria-disabled", "onClick"], ts = {
1724
1784
  key: 1,
1725
1785
  class: "px-3 py-2 text-center text-gray-500"
1726
- }, Ka = ["disabled"], Za = /* @__PURE__ */ D({
1786
+ }, ls = ["disabled"], os = /* @__PURE__ */ A({
1727
1787
  __name: "vs-input-select",
1728
1788
  props: {
1729
1789
  multiple: { type: Boolean, default: !1 },
@@ -1748,21 +1808,21 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1748
1808
  },
1749
1809
  emits: ["change", "update:modelValue"],
1750
1810
  setup(o, { emit: e }) {
1751
- const t = o, n = e, s = A(() => t.multiple), r = A(() => t.disabled);
1752
- me(t.style);
1753
- const a = A({
1811
+ const t = o, n = e, s = F(() => t.multiple), r = F(() => t.disabled);
1812
+ he(t.style);
1813
+ const a = F({
1754
1814
  get: () => t.modelValue,
1755
1815
  set: (g) => n("update:modelValue", g)
1756
1816
  });
1757
1817
  !a.value && t.defaultValue && (a.value = t.defaultValue);
1758
- const d = x(null), u = x(null), v = x(null), p = x(!1), w = x(!1), b = x(null), $ = x([]), S = x(-1), R = x([]), C = x(""), E = x(null), j = x("bottom"), m = x({}), f = x([]), Q = A(() => {
1818
+ const i = x(null), d = x(null), v = x(null), p = x(!1), w = x(!1), b = x(null), $ = x([]), S = x(-1), R = x([]), V = x(""), D = x(null), j = x("bottom"), m = x({}), f = x([]), Q = F(() => {
1759
1819
  if (!f.value.length) return [];
1760
1820
  const g = new Map($.value.map((h) => [h.id?.toString(), h]));
1761
1821
  return f.value.map((h) => g.get(h?.toString())).filter((h) => !!h);
1762
- }), U = A(() => t.placeholder || "Select..."), O = A(() => s.value ? !f.value.length && C.value === "" : !b.value?.text && C.value === ""), ue = A(() => r.value ? !1 : s.value ? f.value.length > 0 : !!a.value), ee = (g) => s.value ? f.value.some((h) => h?.toString() === g?.toString()) : a.value?.toString() === g?.toString(), X = A(() => {
1822
+ }), T = F(() => t.placeholder || "Select..."), O = F(() => s.value ? !f.value.length && V.value === "" : !b.value?.text && V.value === ""), ue = F(() => r.value ? !1 : s.value ? f.value.length > 0 : !!a.value), ee = (g) => s.value ? f.value.some((h) => h?.toString() === g?.toString()) : a.value?.toString() === g?.toString(), X = F(() => {
1763
1823
  let g = $.value ?? [];
1764
- if (!t.data && C.value.trim() !== "") {
1765
- const h = C.value.toLowerCase();
1824
+ if (!t.data && V.value.trim() !== "") {
1825
+ const h = V.value.toLowerCase();
1766
1826
  g = g.filter((_) => _.text?.toLowerCase?.().includes(h));
1767
1827
  }
1768
1828
  if (s.value && f.value.length) {
@@ -1770,7 +1830,7 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1770
1830
  g = g.filter((_) => !h.has(_.id?.toString()));
1771
1831
  }
1772
1832
  return g;
1773
- }), je = Me("values"), we = A(() => t.parent ? je?.value?.[t.parent] ?? null : null), z = async (g) => {
1833
+ }), je = Me("values"), we = F(() => t.parent ? je?.value?.[t.parent] ?? null : null), E = async (g) => {
1774
1834
  if (!t.data) {
1775
1835
  let h = t.options ?? [];
1776
1836
  if (g?.trim()) {
@@ -1786,11 +1846,11 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1786
1846
  return [];
1787
1847
  }
1788
1848
  }, M = async () => {
1789
- t.data ? $.value = await z(C.value) : $.value = t.options ? [...t.options] : [];
1849
+ t.data ? $.value = await E(V.value) : $.value = t.options ? [...t.options] : [];
1790
1850
  }, I = async (g) => {
1791
1851
  if (g == null) return null;
1792
1852
  const h = $.value?.find((H) => H?.id?.toString() === String(g));
1793
- return h || ((await z(String(g)))?.[0] ?? null);
1853
+ return h || ((await E(String(g)))?.[0] ?? null);
1794
1854
  }, G = async (g) => {
1795
1855
  const h = new Set($.value.map((H) => H.id?.toString())), _ = g.filter((H) => !h.has(H?.toString()));
1796
1856
  _.length && await _.reduce(async (H, te) => {
@@ -1800,7 +1860,7 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1800
1860
  }, Promise.resolve());
1801
1861
  }, ae = async () => {
1802
1862
  r.value || (p.value = !0, await M(), await ze(() => {
1803
- ge(), E.value?.focus(), X.value.length ? S.value = 0 : S.value = -1;
1863
+ be(), D.value?.focus(), X.value.length ? S.value = 0 : S.value = -1;
1804
1864
  }));
1805
1865
  }, de = () => {
1806
1866
  p.value = !1, S.value = -1;
@@ -1808,25 +1868,25 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1808
1868
  if (r.value) return;
1809
1869
  !p.value ? await ae() : de();
1810
1870
  }, y = async () => {
1811
- p.value ? E.value?.focus() : await ae();
1871
+ p.value ? D.value?.focus() : await ae();
1812
1872
  }, k = () => {
1813
- s.value ? (f.value = [], a.value = [], n("change", [])) : (b.value = null, a.value = null, n("change", null)), C.value = "", ze(() => E.value?.focus());
1873
+ s.value ? (f.value = [], a.value = [], n("change", [])) : (b.value = null, a.value = null, n("change", null)), V.value = "", ze(() => D.value?.focus());
1814
1874
  }, P = (g) => {
1815
- s.value && (f.value = f.value.filter((h) => h?.toString() !== g?.toString()), a.value = [...f.value], n("change", a.value), ze(() => E.value?.focus()));
1875
+ s.value && (f.value = f.value.filter((h) => h?.toString() !== g?.toString()), a.value = [...f.value], n("change", a.value), ze(() => D.value?.focus()));
1816
1876
  }, J = (g) => {
1817
- s.value ? (ee(g.id) || (f.value = [...f.value, g.id], a.value = [...f.value], n("change", a.value)), C.value = "", ze(() => {
1818
- E.value?.focus(), S.value = Math.min(S.value, X.value.length - 1);
1819
- })) : (b.value = g, a.value = g.id, n("change", a.value), C.value = "", de());
1877
+ s.value ? (ee(g.id) || (f.value = [...f.value, g.id], a.value = [...f.value], n("change", a.value)), V.value = "", ze(() => {
1878
+ D.value?.focus(), S.value = Math.min(S.value, X.value.length - 1);
1879
+ })) : (b.value = g, a.value = g.id, n("change", a.value), V.value = "", de());
1820
1880
  }, re = (g) => {
1821
1881
  ee(g.id) || J(g);
1822
- }, _e = (g, h) => {
1882
+ }, $e = (g, h) => {
1823
1883
  if (!g || !h) return;
1824
1884
  const _ = g.offsetTop, H = _ + g.offsetHeight, te = h.scrollTop, ie = te + h.clientHeight;
1825
1885
  let Se = h.scrollTop;
1826
1886
  _ < te ? Se = _ - 80 : H > ie && (Se = H - h.clientHeight + 4);
1827
1887
  const Ie = h;
1828
1888
  Ie.scrollTop = Se;
1829
- }, he = (g) => {
1889
+ }, ge = (g) => {
1830
1890
  let h = g.parentElement;
1831
1891
  for (; h; ) {
1832
1892
  if (h.classList.contains("ui-dialog__content"))
@@ -1837,59 +1897,59 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1837
1897
  h = h.parentElement;
1838
1898
  }
1839
1899
  return document.body;
1840
- }, ge = () => {
1841
- if (!u.value) return;
1842
- const g = u.value.getBoundingClientRect(), _ = he(u.value).getBoundingClientRect(), H = 300, te = 20, ie = 8, Se = g.top - _.top, Ie = g.bottom - _.top, lt = _.height - Ie - ie - te, ot = Se - ie - te;
1843
- let Pe = !1;
1844
- if (lt >= ot ? Pe = !0 : Pe = !1, Pe) {
1900
+ }, be = () => {
1901
+ if (!d.value) return;
1902
+ const g = d.value.getBoundingClientRect(), _ = ge(d.value).getBoundingClientRect(), H = 300, te = 20, ie = 8, Se = g.top - _.top, Ie = g.bottom - _.top, lt = _.height - Ie - ie - te, ot = Se - ie - te;
1903
+ let qe = !1;
1904
+ if (lt >= ot ? qe = !0 : qe = !1, qe) {
1845
1905
  j.value = "bottom";
1846
- const He = Math.min(H, Math.max(lt + te, 50));
1906
+ const Ge = Math.min(H, Math.max(lt + te, 50));
1847
1907
  m.value = {
1848
1908
  top: `${g.height + ie}px`,
1849
1909
  left: "0px",
1850
1910
  right: "0px",
1851
1911
  bottom: "auto",
1852
- maxHeight: `${He}px`
1912
+ maxHeight: `${Ge}px`
1853
1913
  };
1854
1914
  } else {
1855
1915
  j.value = "top";
1856
- const He = Math.min(H, Math.max(ot + te, 50));
1916
+ const Ge = Math.min(H, Math.max(ot + te, 50));
1857
1917
  m.value = {
1858
1918
  top: "auto",
1859
1919
  left: "0px",
1860
1920
  right: "0px",
1861
1921
  bottom: `${g.height + ie}px`,
1862
- maxHeight: `${He}px`
1922
+ maxHeight: `${Ge}px`
1863
1923
  };
1864
1924
  }
1865
- }, Ce = async (g) => {
1925
+ }, Ve = async (g) => {
1866
1926
  r.value || !p.value && (g.key === "ArrowDown" || g.key === "ArrowUp") && (g.preventDefault(), await ae());
1867
- }, Ve = (g) => {
1927
+ }, Ce = (g) => {
1868
1928
  if (!p.value) return;
1869
1929
  const { key: h } = g;
1870
1930
  if (h === "ArrowDown")
1871
- g.preventDefault(), S.value + 1 < X.value.length && (S.value += 1, _e(R.value[S.value], v.value));
1931
+ g.preventDefault(), S.value + 1 < X.value.length && (S.value += 1, $e(R.value[S.value], v.value));
1872
1932
  else if (h === "ArrowUp")
1873
- g.preventDefault(), S.value > 0 && (S.value -= 1, _e(R.value[S.value], v.value));
1933
+ g.preventDefault(), S.value > 0 && (S.value -= 1, $e(R.value[S.value], v.value));
1874
1934
  else if (h === "Enter") {
1875
1935
  g.preventDefault();
1876
1936
  const _ = X.value[S.value];
1877
- _ && J(_), E.value?.blur();
1878
- } else h === "Escape" ? (g.preventDefault(), de()) : h === "Backspace" ? s.value && C.value === "" && f.value.length && (f.value = f.value.slice(0, -1), a.value = [...f.value], n("change", a.value)) : h === "Home" ? (S.value = 0, _e(R.value[0], v.value)) : h === "End" ? (S.value = X.value.length - 1, _e(R.value[S.value], v.value)) : h === "Tab" && de();
1937
+ _ && J(_), D.value?.blur();
1938
+ } else h === "Escape" ? (g.preventDefault(), de()) : h === "Backspace" ? s.value && V.value === "" && f.value.length && (f.value = f.value.slice(0, -1), a.value = [...f.value], n("change", a.value)) : h === "Home" ? (S.value = 0, $e(R.value[0], v.value)) : h === "End" ? (S.value = X.value.length - 1, $e(R.value[S.value], v.value)) : h === "Tab" && de();
1879
1939
  }, _t = () => {
1880
1940
  r.value || (w.value = !0);
1881
1941
  }, $t = () => {
1882
- w.value = !1, C.value = "";
1942
+ w.value = !1, V.value = "";
1883
1943
  }, Ke = (g) => {
1884
1944
  g.key === "Escape" && p.value && de();
1885
1945
  }, Ze = (g) => {
1886
- d.value && (d.value.contains(g.target) || de());
1946
+ i.value && (i.value.contains(g.target) || de());
1887
1947
  }, We = (g) => {
1888
- p.value && v.value && !v.value.contains(g.target) && ge();
1948
+ p.value && v.value && !v.value.contains(g.target) && be();
1889
1949
  }, Qe = () => {
1890
- p.value && ge();
1950
+ p.value && be();
1891
1951
  }, Xe = () => {
1892
- p.value && ge();
1952
+ p.value && be();
1893
1953
  };
1894
1954
  le(() => t.options, (g) => {
1895
1955
  g?.length && ($.value = [...g]);
@@ -1907,30 +1967,30 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1907
1967
  };
1908
1968
  le(a, () => {
1909
1969
  Ye();
1910
- }), xe(async () => {
1911
- addEventListener("keydown", Ke), addEventListener("scroll", We, !0), addEventListener("resize", Qe), document.addEventListener("click", Ze, !0), u.value && he(u.value).addEventListener("scroll", Xe, !0), t.options?.length ? $.value = [...t.options] : t.data && ($.value = await z("")), await Ye();
1912
- }), Ne(() => {
1913
- removeEventListener("keydown", Ke), removeEventListener("scroll", We, !0), removeEventListener("resize", Qe), document.removeEventListener("click", Ze, !0), u.value && he(u.value).removeEventListener("scroll", Xe, !0);
1970
+ }), me(async () => {
1971
+ addEventListener("keydown", Ke), addEventListener("scroll", We, !0), addEventListener("resize", Qe), document.addEventListener("click", Ze, !0), d.value && ge(d.value).addEventListener("scroll", Xe, !0), t.options?.length ? $.value = [...t.options] : t.data && ($.value = await E("")), await Ye();
1972
+ }), Te(() => {
1973
+ removeEventListener("keydown", Ke), removeEventListener("scroll", We, !0), removeEventListener("resize", Qe), document.removeEventListener("click", Ze, !0), d.value && ge(d.value).removeEventListener("scroll", Xe, !0);
1914
1974
  });
1915
- const Oe = x(!1), Re = x({}), et = x([]), tt = x(null);
1916
- async function Ct() {
1975
+ const Fe = x(!1), Ne = x({}), et = x([]), tt = x(null);
1976
+ async function Vt() {
1917
1977
  if (!t.add?.token || tt?.value.validate())
1918
1978
  return;
1919
1979
  const h = t.add.api ?? `/api/table/${t.add.token}`, { id: _ } = await fetch(h, {
1920
1980
  method: "POST",
1921
1981
  headers: { "Content-Type": "application/json" },
1922
- body: JSON.stringify(Re.value)
1982
+ body: JSON.stringify(Ne.value)
1923
1983
  }).then((H) => H.json());
1924
1984
  if (!t.options?.length && t.data) {
1925
1985
  const { data: H } = await fetch(`${t.api ?? `/api/suggest/${t.data}`}?val=${_}`).then((te) => te.json());
1926
1986
  b.value = H[0], $.value.push(H[0]), a.value = _;
1927
1987
  }
1928
- Oe.value = !1, be({ title: "Success!", message: "Object created." });
1988
+ Fe.value = !1, ye({ title: "Success!", message: "Object created." });
1929
1989
  }
1930
- async function Vt() {
1990
+ async function Ct() {
1931
1991
  if (!t.add) return null;
1932
1992
  const g = await fetch(`/api/template/form/${t.add.form}`).then((h) => h.json());
1933
- return et.value = g.schema, Oe.value = !0, null;
1993
+ return et.value = g.schema, Fe.value = !0, null;
1934
1994
  }
1935
1995
  function Mt(g, h = 200) {
1936
1996
  let _;
@@ -1939,9 +1999,9 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1939
1999
  };
1940
2000
  }
1941
2001
  const Lt = Mt(async (g) => {
1942
- $.value = await z(g);
2002
+ $.value = await E(g);
1943
2003
  }, 200);
1944
- return le(C, (g) => {
2004
+ return le(V, (g) => {
1945
2005
  t.data && Lt(g.trim());
1946
2006
  }), le(() => t.options, (g) => {
1947
2007
  !t.data && g?.length && ($.value = [...g]);
@@ -1949,19 +2009,19 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1949
2009
  t.data && M();
1950
2010
  }), le(we, async () => {
1951
2011
  t.data && (s.value ? (f.value = [], a.value = [], n("change", [])) : (b.value = null, a.value = null, n("change", null)));
1952
- }), (g, h) => (i(), c(Y, null, [
2012
+ }), (g, h) => (u(), c(Y, null, [
1953
2013
  B(q(ht), {
1954
- visible: Oe.value,
1955
- "onUpdate:visible": h[1] || (h[1] = (_) => Oe.value = _),
2014
+ visible: Fe.value,
2015
+ "onUpdate:visible": h[1] || (h[1] = (_) => Fe.value = _),
1956
2016
  title: "Додати",
1957
2017
  buttonText: "Додати",
1958
- onDone: Ct
2018
+ onDone: Vt
1959
2019
  }, {
1960
2020
  default: Le(() => [
1961
- B(Fe, {
2021
+ B(De, {
1962
2022
  schema: et.value,
1963
- modelValue: Re.value,
1964
- "onUpdate:modelValue": h[0] || (h[0] = (_) => Re.value = _),
2023
+ modelValue: Ne.value,
2024
+ "onUpdate:modelValue": h[0] || (h[0] = (_) => Ne.value = _),
1965
2025
  ref_key: "addForm",
1966
2026
  ref: tt
1967
2027
  }, null, 8, ["schema", "modelValue"])
@@ -1971,12 +2031,12 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1971
2031
  l("div", {
1972
2032
  class: "flex gap-1 w-full",
1973
2033
  ref_key: "selectRoot",
1974
- ref: d,
2034
+ ref: i,
1975
2035
  onClick: h[4] || (h[4] = ve(() => {
1976
2036
  }, ["stop"]))
1977
2037
  }, [
1978
2038
  l("div", {
1979
- class: V(["relative w-full font-sans", t.customClass])
2039
+ class: C(["relative w-full font-sans", t.customClass])
1980
2040
  }, [
1981
2041
  h[9] || (h[9] = l("span", {
1982
2042
  id: "react-select-live-region",
@@ -1990,7 +2050,7 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1990
2050
  class: "sr-only"
1991
2051
  }, null, -1)),
1992
2052
  l("div", {
1993
- class: V([
2053
+ class: C([
1994
2054
  "flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
1995
2055
  "border-gray-300 hover:border-gray-400",
1996
2056
  p.value || w.value ? "border-blue-500 ring-1 ring-blue-500" : "",
@@ -1999,29 +2059,29 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
1999
2059
  role: "combobox",
2000
2060
  "aria-expanded": p.value,
2001
2061
  "aria-haspopup": "listbox",
2002
- onKeydown: Ce,
2062
+ onKeydown: Ve,
2003
2063
  onClick: y,
2004
2064
  "data-focus": p.value || w.value ? "true" : "false"
2005
2065
  }, [
2006
2066
  l("div", {
2007
2067
  class: "flex flex-1 items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",
2008
2068
  ref_key: "triggerRef",
2009
- ref: u
2069
+ ref: d
2010
2070
  }, [
2011
- s.value && f.value.length ? (i(!0), c(Y, { key: 0 }, oe(Q.value, (_) => (i(), c("div", {
2071
+ s.value && f.value.length ? (u(!0), c(Y, { key: 0 }, oe(Q.value, (_) => (u(), c("div", {
2012
2072
  class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border",
2013
2073
  key: _.id
2014
2074
  }, [
2015
- l("div", Fa, [
2016
- _?.color ? (i(), c("span", {
2075
+ l("div", Na, [
2076
+ _?.color ? (u(), c("span", {
2017
2077
  key: 0,
2018
2078
  class: "w-[16px] h-[16px] rounded-md block ml-1.5",
2019
- style: ye({ backgroundColor: _?.color })
2020
- }, null, 4)) : F("", !0),
2079
+ style: xe({ backgroundColor: _?.color })
2080
+ }, null, 4)) : z("", !0),
2021
2081
  l("div", {
2022
2082
  class: "truncate text-gray-900 overflow-hidden",
2023
2083
  title: _.text
2024
- }, T(_.text), 9, Oa)
2084
+ }, U(_.text), 9, qa)
2025
2085
  ]),
2026
2086
  l("div", {
2027
2087
  role: "button",
@@ -2038,27 +2098,27 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
2038
2098
  }, [
2039
2099
  l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
2040
2100
  ], -1)
2041
- ]), 8, Aa)
2042
- ]))), 128)) : !s.value && !w.value && b.value?.text && C.value === "" ? (i(), c("div", {
2101
+ ]), 8, Ga)
2102
+ ]))), 128)) : !s.value && !w.value && b.value?.text && V.value === "" ? (u(), c("div", {
2043
2103
  key: 1,
2044
- class: V(["truncate text-gray-900"]),
2104
+ class: C(["truncate text-gray-900"]),
2045
2105
  title: b.value.text
2046
2106
  }, [
2047
- b.value?.color ? (i(), c("span", {
2107
+ b.value?.color ? (u(), c("span", {
2048
2108
  key: 0,
2049
2109
  class: "w-[14px] h-[14px] rounded-md block mr-1 mt-1 absolute",
2050
- style: ye({ backgroundColor: b.value?.color })
2051
- }, null, 4)) : F("", !0),
2110
+ style: xe({ backgroundColor: b.value?.color })
2111
+ }, null, 4)) : z("", !0),
2052
2112
  l("span", {
2053
- class: V({ "pl-5": b.value?.color })
2054
- }, T(b.value.text), 3)
2055
- ], 8, Ua)) : F("", !0),
2056
- O.value ? (i(), c("div", Ta, T(U.value), 1)) : F("", !0),
2057
- l("div", Ra, [
2058
- !r.value && g.search ? K((i(), c("input", {
2113
+ class: C({ "pl-5": b.value?.color })
2114
+ }, U(b.value.text), 3)
2115
+ ], 8, Ja)) : z("", !0),
2116
+ O.value ? (u(), c("div", Ka, U(T.value), 1)) : z("", !0),
2117
+ l("div", Za, [
2118
+ !r.value && g.search ? K((u(), c("input", {
2059
2119
  key: 0,
2060
2120
  ref_key: "inputRef",
2061
- ref: E,
2121
+ ref: D,
2062
2122
  class: "w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",
2063
2123
  autocapitalize: "none",
2064
2124
  autocomplete: "off",
@@ -2067,18 +2127,18 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
2067
2127
  type: "text",
2068
2128
  tabindex: "0",
2069
2129
  "aria-autocomplete": "list",
2070
- placeholder: (s.value && f.value.length ? " " : null) || (w.value && !C.value?.length ? b.value?.text : " "),
2071
- "onUpdate:modelValue": h[2] || (h[2] = (_) => C.value = _),
2130
+ placeholder: (s.value && f.value.length ? " " : null) || (w.value && !V.value?.length ? b.value?.text : " "),
2131
+ "onUpdate:modelValue": h[2] || (h[2] = (_) => V.value = _),
2072
2132
  onFocus: _t,
2073
2133
  onBlur: $t,
2074
- onKeydown: Ve
2075
- }, null, 40, Pa)), [
2076
- [ne, C.value]
2077
- ]) : F("", !0)
2134
+ onKeydown: Ce
2135
+ }, null, 40, Wa)), [
2136
+ [ne, V.value]
2137
+ ]) : z("", !0)
2078
2138
  ])
2079
2139
  ], 512),
2080
- l("div", Ha, [
2081
- ue.value ? (i(), c("button", {
2140
+ l("div", Qa, [
2141
+ ue.value ? (u(), c("button", {
2082
2142
  key: 0,
2083
2143
  type: "button",
2084
2144
  class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
@@ -2094,7 +2154,7 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
2094
2154
  }, [
2095
2155
  l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
2096
2156
  ], -1)
2097
- ]), 8, Na)) : F("", !0),
2157
+ ]), 8, Xa)) : z("", !0),
2098
2158
  h[8] || (h[8] = l("div", { class: "self-stretch w-px bg-[#ccc] my-[1px]" }, null, -1)),
2099
2159
  l("button", {
2100
2160
  type: "button",
@@ -2112,29 +2172,29 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
2112
2172
  }, [
2113
2173
  l("path", { d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" })
2114
2174
  ], -1)
2115
- ]), 8, qa)
2175
+ ]), 8, Ya)
2116
2176
  ])
2117
- ], 42, Da),
2118
- p.value ? (i(), c("div", {
2177
+ ], 42, Ha),
2178
+ p.value ? (u(), c("div", {
2119
2179
  key: 0,
2120
- class: V([
2180
+ class: C([
2121
2181
  "absolute z-10 w-full rounded bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.1),0_4px_11px_rgba(0,0,0,0.1)]",
2122
2182
  j.value === "bottom" ? "mt-2" : "mb-2"
2123
2183
  ]),
2124
- style: ye(m.value),
2184
+ style: xe(m.value),
2125
2185
  role: "listbox"
2126
2186
  }, [
2127
2187
  l("div", {
2128
2188
  class: "overflow-y-auto py-1",
2129
- style: ye({ maxHeight: m.value.maxHeight || "300px" }),
2189
+ style: xe({ maxHeight: m.value.maxHeight || "300px" }),
2130
2190
  ref_key: "listRef",
2131
2191
  ref: v
2132
2192
  }, [
2133
- X.value.length ? (i(!0), c(Y, { key: 0 }, oe(X.value, (_, H) => (i(), c("div", {
2193
+ X.value.length ? (u(!0), c(Y, { key: 0 }, oe(X.value, (_, H) => (u(), c("div", {
2134
2194
  key: _.id,
2135
2195
  ref_for: !0,
2136
2196
  ref: (te) => R.value[H] = te,
2137
- class: V([
2197
+ class: C([
2138
2198
  "flex px-3 py-2 cursor-default select-none text-gray-900 hover:bg-blue-100",
2139
2199
  S.value === H ? "bg-blue-100" : "",
2140
2200
  ee(_.id) ? "bg-blue-50" : "bg-white"
@@ -2144,40 +2204,40 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
2144
2204
  tabindex: "-1",
2145
2205
  onClick: (te) => re(_)
2146
2206
  }, [
2147
- _?.color ? (i(), c("span", {
2207
+ _?.color ? (u(), c("span", {
2148
2208
  key: 0,
2149
2209
  class: "w-[11px] h-[11px] rounded-full block mr-1 mt-1.5",
2150
- style: ye({ backgroundColor: _?.color })
2151
- }, null, 4)) : F("", !0),
2210
+ style: xe({ backgroundColor: _?.color })
2211
+ }, null, 4)) : z("", !0),
2152
2212
  l("div", {
2153
- class: V([
2213
+ class: C([
2154
2214
  "leading-[19px]",
2155
2215
  S.value === _.id ? "text-white" : "",
2156
2216
  // active style like react-select
2157
2217
  (S.value === H, "")
2158
2218
  ])
2159
- }, T(_.text), 3)
2160
- ], 10, Ga))), 128)) : (i(), c("div", Ja, " No options "))
2219
+ }, U(_.text), 3)
2220
+ ], 10, es))), 128)) : (u(), c("div", ts, " No options "))
2161
2221
  ], 4)
2162
- ], 6)) : F("", !0)
2222
+ ], 6)) : z("", !0)
2163
2223
  ], 2),
2164
- t.add ? (i(), c("button", {
2224
+ t.add ? (u(), c("button", {
2165
2225
  key: 0,
2166
- onClick: Vt,
2226
+ onClick: Ct,
2167
2227
  class: "bg-white hover:bg-gray-100 text-sm text-gray-900 py-[10px] px-3 border border-stone-200 rounded-md h-[38px] flex items-center gap-2",
2168
2228
  disabled: r.value,
2169
2229
  type: "button"
2170
2230
  }, [
2171
- B(De, {
2231
+ B(Ae, {
2172
2232
  width: "16",
2173
2233
  height: "16"
2174
2234
  }),
2175
2235
  h[11] || (h[11] = l("span", null, "Додати", -1))
2176
- ], 8, Ka)) : F("", !0)
2236
+ ], 8, ls)) : z("", !0)
2177
2237
  ], 512)
2178
2238
  ], 64));
2179
2239
  }
2180
- }), Wa = ["placeholder", "disabled"], Qa = /* @__PURE__ */ D({
2240
+ }), as = ["placeholder", "disabled"], ss = /* @__PURE__ */ A({
2181
2241
  __name: "vs-input-textarea",
2182
2242
  props: /* @__PURE__ */ Z({
2183
2243
  style: { default: () => ({}) },
@@ -2193,21 +2253,21 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
2193
2253
  }),
2194
2254
  emits: ["update:modelValue"],
2195
2255
  setup(o) {
2196
- const e = o, { inputClass: t } = me(e.style), n = W(o, "modelValue");
2197
- return (s, r) => K((i(), c("textarea", {
2256
+ const e = o, { inputClass: t } = he(e.style), n = W(o, "modelValue");
2257
+ return (s, r) => K((u(), c("textarea", {
2198
2258
  "onUpdate:modelValue": r[0] || (r[0] = (a) => n.value = a),
2199
2259
  placeholder: s.placeholder,
2200
2260
  disabled: s.disabled,
2201
2261
  row: "2",
2202
- class: V(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto bg-white", [q(t)]]),
2262
+ class: C(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto bg-white", [q(t)]]),
2203
2263
  style: {
2204
2264
  border: "1px solid #CFD9E0"
2205
2265
  }
2206
- }, null, 10, Wa)), [
2266
+ }, null, 10, as)), [
2207
2267
  [ne, n.value]
2208
2268
  ]);
2209
2269
  }
2210
- }), Xa = {}, Ya = {
2270
+ }), ns = {}, rs = {
2211
2271
  xmlns: "http://www.w3.org/2000/svg",
2212
2272
  viewBox: "0 0 24 24",
2213
2273
  fill: "none",
@@ -2217,8 +2277,8 @@ const Yo = /* @__PURE__ */ N(Wo, [["render", Xo]]), ea = { class: "flex flex-col
2217
2277
  "stroke-linejoin": "round",
2218
2278
  class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
2219
2279
  };
2220
- function es(o, e) {
2221
- return i(), c("svg", Ya, e[0] || (e[0] = [
2280
+ function is(o, e) {
2281
+ return u(), c("svg", rs, e[0] || (e[0] = [
2222
2282
  l("path", {
2223
2283
  stroke: "none",
2224
2284
  d: "M0 0h24v24H0z",
@@ -2228,7 +2288,7 @@ function es(o, e) {
2228
2288
  l("path", { d: "M21 21l-6 -6" }, null, -1)
2229
2289
  ]));
2230
2290
  }
2231
- const ts = /* @__PURE__ */ N(Xa, [["render", es]]), ls = {}, os = {
2291
+ const us = /* @__PURE__ */ N(ns, [["render", is]]), ds = {}, cs = {
2232
2292
  class: "flex-shrink-0 mt-0.5 size-3.5",
2233
2293
  xmlns: "http://www.w3.org/2000/svg",
2234
2294
  viewBox: "0 0 24 24",
@@ -2238,15 +2298,15 @@ const ts = /* @__PURE__ */ N(Xa, [["render", es]]), ls = {}, os = {
2238
2298
  "stroke-linecap": "round",
2239
2299
  "stroke-linejoin": "round"
2240
2300
  };
2241
- function as(o, e) {
2242
- return i(), c("svg", os, e[0] || (e[0] = [
2301
+ function ps(o, e) {
2302
+ return u(), c("svg", cs, e[0] || (e[0] = [
2243
2303
  l("path", { d: "m3 16 4 4 4-4" }, null, -1),
2244
2304
  l("path", { d: "M7 20V4" }, null, -1),
2245
2305
  l("path", { d: "m21 8-4-4-4 4" }, null, -1),
2246
2306
  l("path", { d: "M17 4v16" }, null, -1)
2247
2307
  ]));
2248
2308
  }
2249
- const ss = /* @__PURE__ */ N(ls, [["render", as]]), ns = {}, rs = {
2309
+ const fs = /* @__PURE__ */ N(ds, [["render", ps]]), vs = {}, ms = {
2250
2310
  xmlns: "http://www.w3.org/2000/svg",
2251
2311
  width: "14",
2252
2312
  height: "14",
@@ -2257,8 +2317,8 @@ const ss = /* @__PURE__ */ N(ls, [["render", as]]), ns = {}, rs = {
2257
2317
  "stroke-linecap": "round",
2258
2318
  "stroke-linejoin": "round"
2259
2319
  };
2260
- function is(o, e) {
2261
- return i(), c("svg", rs, e[0] || (e[0] = [
2320
+ function hs(o, e) {
2321
+ return u(), c("svg", ms, e[0] || (e[0] = [
2262
2322
  l("path", {
2263
2323
  stroke: "none",
2264
2324
  d: "M0 0h24v24H0z",
@@ -2269,7 +2329,7 @@ function is(o, e) {
2269
2329
  l("path", { d: "M12 4l0 12" }, null, -1)
2270
2330
  ]));
2271
2331
  }
2272
- const us = /* @__PURE__ */ N(ns, [["render", is]]), ds = {}, cs = {
2332
+ const gs = /* @__PURE__ */ N(vs, [["render", hs]]), bs = {}, ys = {
2273
2333
  xmlns: "http://www.w3.org/2000/svg",
2274
2334
  viewBox: "0 0 24 24",
2275
2335
  fill: "none",
@@ -2278,8 +2338,8 @@ const us = /* @__PURE__ */ N(ns, [["render", is]]), ds = {}, cs = {
2278
2338
  "stroke-linecap": "round",
2279
2339
  "stroke-linejoin": "round"
2280
2340
  };
2281
- function ps(o, e) {
2282
- return i(), c("svg", cs, e[0] || (e[0] = [
2341
+ function xs(o, e) {
2342
+ return u(), c("svg", ys, e[0] || (e[0] = [
2283
2343
  l("path", {
2284
2344
  stroke: "none",
2285
2345
  d: "M0 0h24v24H0z",
@@ -2290,7 +2350,7 @@ function ps(o, e) {
2290
2350
  l("path", { d: "M12 4l0 12" }, null, -1)
2291
2351
  ]));
2292
2352
  }
2293
- const fs = /* @__PURE__ */ N(ds, [["render", ps]]), vs = {}, ms = {
2353
+ const ws = /* @__PURE__ */ N(bs, [["render", xs]]), ks = {}, _s = {
2294
2354
  xmlns: "http://www.w3.org/2000/svg",
2295
2355
  viewBox: "0 0 24 24",
2296
2356
  fill: "none",
@@ -2299,22 +2359,22 @@ const fs = /* @__PURE__ */ N(ds, [["render", ps]]), vs = {}, ms = {
2299
2359
  "stroke-linecap": "round",
2300
2360
  "stroke-linejoin": "round"
2301
2361
  };
2302
- function hs(o, e) {
2303
- return i(), c("svg", ms, e[0] || (e[0] = [
2362
+ function $s(o, e) {
2363
+ return u(), c("svg", _s, e[0] || (e[0] = [
2304
2364
  ce('<circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle>', 6)
2305
2365
  ]));
2306
2366
  }
2307
- const dt = /* @__PURE__ */ N(vs, [["render", hs]]), gs = {}, bs = {
2367
+ const dt = /* @__PURE__ */ N(ks, [["render", $s]]), Vs = {}, Cs = {
2308
2368
  viewBox: "0 0 178 90",
2309
2369
  fill: "none",
2310
2370
  xmlns: "http://www.w3.org/2000/svg"
2311
2371
  };
2312
- function ys(o, e) {
2313
- return i(), c("svg", bs, e[0] || (e[0] = [
2372
+ function Ms(o, e) {
2373
+ return u(), c("svg", Cs, e[0] || (e[0] = [
2314
2374
  ce('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>', 12)
2315
2375
  ]));
2316
2376
  }
2317
- const xs = /* @__PURE__ */ N(gs, [["render", ys]]), ws = {}, ks = {
2377
+ const Ls = /* @__PURE__ */ N(Vs, [["render", Ms]]), Ss = {}, Bs = {
2318
2378
  xmlns: "http://www.w3.org/2000/svg",
2319
2379
  viewBox: "0 0 24 24",
2320
2380
  fill: "none",
@@ -2323,16 +2383,16 @@ const xs = /* @__PURE__ */ N(gs, [["render", ys]]), ws = {}, ks = {
2323
2383
  "stroke-linecap": "round",
2324
2384
  "stroke-linejoin": "round"
2325
2385
  };
2326
- function _s(o, e) {
2327
- return i(), c("svg", ks, e[0] || (e[0] = [
2386
+ function js(o, e) {
2387
+ return u(), c("svg", Bs, e[0] || (e[0] = [
2328
2388
  l("path", { d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }, null, -1)
2329
2389
  ]));
2330
2390
  }
2331
- const $s = /* @__PURE__ */ N(ws, [["render", _s]]), Cs = { class: "vs-datatable border rounded-xl w-full flex-grow" }, Vs = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, Ms = { class: "relative w-full" }, Ls = { class: "table-wrapper flex gap-2" }, Ss = { class: "vs-popover inline-block text-slate-700" }, Bs = { class: "text-center" }, js = { class: "" }, Is = { class: "py-1 px-0 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:text-neutral-200 dark:focus:bg-neutral-800 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, zs = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, Es = { class: "text-sm items-center text-gray-800 flex gap-1" }, Ds = { class: "w-full overflow-x-auto" }, Fs = { class: "w-full table-auto caption-bottom text-sm" }, Os = { class: "[&_tr]:border-b" }, As = { class: "border-b data-[state=selected]:bg-muted bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors" }, Us = { class: "h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center" }, Ts = {
2391
+ const Is = /* @__PURE__ */ N(Ss, [["render", js]]), zs = { class: "vs-datatable border rounded-xl w-full flex-grow" }, Es = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, As = { class: "relative w-full" }, Ds = { class: "table-wrapper flex gap-2" }, Fs = { class: "vs-popover inline-block text-slate-700" }, Os = { class: "text-center" }, Us = { class: "" }, Ts = { class: "py-1 px-0 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:text-neutral-200 dark:focus:bg-neutral-800 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, Rs = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, Ps = { class: "text-sm items-center text-gray-800 flex gap-1" }, Hs = { class: "w-full overflow-x-auto" }, Ns = { class: "w-full table-auto caption-bottom text-sm" }, qs = { class: "[&_tr]:border-b" }, Gs = { class: "border-b data-[state=selected]:bg-muted bg-slate-50/50 dark:bg-slate-700/50 hover:bg-slate-50/80 dark:hover:bg-slate-700/80 transition-colors" }, Js = { class: "h-10 px-2 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] w-12 text-center" }, Ks = {
2332
2392
  key: 0,
2333
2393
  colspan: "100%",
2334
2394
  class: "text-center"
2335
- }, Rs = { class: "w-full" }, Ps = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, Hs = ["onDragstart", "onDragover", "onDrop"], Ns = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, qs = { class: "flex items-center justify-center" }, Gs = { class: "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors" }, Js = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, Ks = { class: "flex items-center justify-center gap-2" }, Zs = ["onClick"], Ws = ["onClick"], Qs = { class: "vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, Xs = /* @__PURE__ */ D({
2395
+ }, Zs = { class: "w-full" }, Ws = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, Qs = ["onDragstart", "onDragover", "onDrop"], Xs = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, Ys = { class: "flex items-center justify-center" }, en = { class: "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-200 dark:hover:bg-slate-600 transition-colors" }, tn = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, ln = { class: "flex items-center justify-center gap-2" }, on = ["onClick"], an = ["onClick"], sn = { class: "vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, nn = /* @__PURE__ */ A({
2336
2396
  __name: "vs-input-datatable",
2337
2397
  props: /* @__PURE__ */ Z({
2338
2398
  colModel: {},
@@ -2349,31 +2409,31 @@ const $s = /* @__PURE__ */ N(ws, [["render", _s]]), Cs = { class: "vs-datatable
2349
2409
  }),
2350
2410
  emits: ["update:modelValue"],
2351
2411
  setup(o) {
2352
- const e = o, t = W(o, "modelValue"), n = x({}), s = x(""), r = A(() => {
2412
+ const e = o, t = W(o, "modelValue"), n = x({}), s = x(""), r = F(() => {
2353
2413
  if (!s.value) return t.value ?? [];
2354
- const z = s.value.toLowerCase();
2414
+ const E = s.value.toLowerCase();
2355
2415
  return t.value.filter((M) => e.colModel?.some((I) => {
2356
2416
  const G = M[I.key];
2357
- return G ? Array.isArray(G) ? G.join(", ").toLowerCase().includes(z) : String(G).toLowerCase().includes(z) : !1;
2417
+ return G ? Array.isArray(G) ? G.join(", ").toLowerCase().includes(E) : String(G).toLowerCase().includes(E) : !1;
2358
2418
  }));
2359
- }), a = x(null), d = x(null), u = x(!1), v = x(null), p = x({ top: 0, left: 0 }), w = (z) => {
2360
- a.value = z;
2361
- }, b = (z) => {
2362
- d.value = z;
2363
- }, $ = (z) => {
2364
- if (a.value === null || a.value === z) {
2365
- a.value = null, d.value = null;
2419
+ }), a = x(null), i = x(null), d = x(!1), v = x(null), p = x({ top: 0, left: 0 }), w = (E) => {
2420
+ a.value = E;
2421
+ }, b = (E) => {
2422
+ i.value = E;
2423
+ }, $ = (E) => {
2424
+ if (a.value === null || a.value === E) {
2425
+ a.value = null, i.value = null;
2366
2426
  return;
2367
2427
  }
2368
2428
  const M = [...t.value], [I] = M.splice(a.value, 1);
2369
- M.splice(z, 0, I), t.value = M, a.value = null, d.value = null;
2370
- }, S = (z) => {
2371
- const I = z.currentTarget.getBoundingClientRect();
2372
- p.value = { top: I.bottom + window.scrollY, left: I.left + window.scrollX }, u.value = !u.value;
2429
+ M.splice(E, 0, I), t.value = M, a.value = null, i.value = null;
2430
+ }, S = (E) => {
2431
+ const I = E.currentTarget.getBoundingClientRect();
2432
+ p.value = { top: I.bottom + window.scrollY, left: I.left + window.scrollX }, d.value = !d.value;
2373
2433
  }, R = () => {
2374
2434
  v.value && v.value.click();
2375
- }, C = (z) => {
2376
- const I = z.target.files?.[0];
2435
+ }, V = (E) => {
2436
+ const I = E.target.files?.[0];
2377
2437
  if (!I) return;
2378
2438
  const G = new FileReader();
2379
2439
  G.onload = (ae) => {
@@ -2387,46 +2447,46 @@ const $s = /* @__PURE__ */ N(ws, [["render", _s]]), Cs = { class: "vs-datatable
2387
2447
  console.error("Error parsing file:", de);
2388
2448
  }
2389
2449
  }, G.readAsText(I);
2390
- }, E = () => {
2391
- const z = JSON.stringify(t.value, null, 2), M = new Blob([z], { type: "application/json" }), I = URL.createObjectURL(M), G = document.createElement("a");
2450
+ }, D = () => {
2451
+ const E = JSON.stringify(t.value, null, 2), M = new Blob([E], { type: "application/json" }), I = URL.createObjectURL(M), G = document.createElement("a");
2392
2452
  G.href = I, G.download = "data.json", G.click(), URL.revokeObjectURL(I);
2393
2453
  };
2394
- xe(async () => {
2395
- const z = e.colModel?.filter((M) => M.data);
2396
- z?.length && Promise.all(z.map(async (M) => {
2454
+ me(async () => {
2455
+ const E = e.colModel?.filter((M) => M.data);
2456
+ E?.length && Promise.all(E.map(async (M) => {
2397
2457
  const G = await (await fetch(`/api/suggest/${M.data}`)).json();
2398
2458
  n.value[M.key] = G.data;
2399
2459
  }));
2400
2460
  });
2401
2461
  const j = x(""), m = x(!1);
2402
2462
  let f = "edit", Q = 0;
2403
- const U = x({}), O = x({});
2463
+ const T = x({}), O = x({});
2404
2464
  async function ue() {
2405
- j.value = "Додати", m.value = !0, f = "add", U.value = {};
2465
+ j.value = "Додати", m.value = !0, f = "add", T.value = {};
2406
2466
  }
2407
- function ee(z, M) {
2467
+ function ee(E, M) {
2408
2468
  const I = M.key || M.name;
2409
- return n.value[I] && z[I] ? n.value[I].find((G) => G.id.toString() === z[I].toString())?.text ?? z[I] : z[I] || "-";
2469
+ return n.value[I] && E[I] ? n.value[I].find((G) => G.id.toString() === E[I].toString())?.text ?? E[I] : E[I] || "-";
2410
2470
  }
2411
- async function X(z, M) {
2412
- j.value = "Редагувати", m.value = !0, f = "edit", Q = M, U.value = { ...z };
2471
+ async function X(E, M) {
2472
+ j.value = "Редагувати", m.value = !0, f = "edit", Q = M, T.value = { ...E };
2413
2473
  }
2414
2474
  function je() {
2415
- const z = O.value.validate();
2416
- if (z) {
2417
- be({ type: "warning", title: "Помилка валідації", message: Object.entries(z).map(([M, I]) => `${M}: ${I}`).join(`
2475
+ const E = O.value.validate();
2476
+ if (E) {
2477
+ ye({ type: "warning", title: "Помилка валідації", message: Object.entries(E).map(([M, I]) => `${M}: ${I}`).join(`
2418
2478
  `) });
2419
2479
  return;
2420
2480
  }
2421
- f === "add" ? Array.isArray(t.value) ? t.value = [...t.value, U.value] : t.value = [U.value] : t.value = t.value.map((M, I) => I === Q ? U.value : M), m.value = !1;
2481
+ f === "add" ? Array.isArray(t.value) ? t.value = [...t.value, T.value] : t.value = [T.value] : t.value = t.value.map((M, I) => I === Q ? T.value : M), m.value = !1;
2422
2482
  }
2423
- function we(z) {
2424
- t.value = t.value.filter((M, I) => I !== z);
2483
+ function we(E) {
2484
+ t.value = t.value.filter((M, I) => I !== E);
2425
2485
  }
2426
- return (z, M) => (i(), c("div", Cs, [
2427
- l("div", Vs, [
2428
- l("div", Ms, [
2429
- B(ts, {
2486
+ return (E, M) => (u(), c("div", zs, [
2487
+ l("div", Es, [
2488
+ l("div", As, [
2489
+ B(us, {
2430
2490
  width: "14",
2431
2491
  height: "14",
2432
2492
  class: "absolute left-3 top-1/2 transform -translate-y-1/2 text-stone-500"
@@ -2440,23 +2500,23 @@ const $s = /* @__PURE__ */ N(ws, [["render", _s]]), Cs = { class: "vs-datatable
2440
2500
  [ne, s.value]
2441
2501
  ])
2442
2502
  ]),
2443
- l("div", Ls, [
2503
+ l("div", Ds, [
2444
2504
  l("input", {
2445
2505
  ref_key: "fileInput",
2446
2506
  ref: v,
2447
- onChange: C,
2507
+ onChange: V,
2448
2508
  class: "hidden",
2449
2509
  accept: ".json",
2450
2510
  type: "file"
2451
2511
  }, null, 544),
2452
- l("div", Ss, [
2453
- l("div", Bs, [
2454
- l("div", js, [
2512
+ l("div", Fs, [
2513
+ l("div", Os, [
2514
+ l("div", Us, [
2455
2515
  l("button", {
2456
2516
  onClick: S,
2457
2517
  class: "bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"
2458
2518
  }, [
2459
- B(ss, {
2519
+ B(fs, {
2460
2520
  height: "16",
2461
2521
  width: "16"
2462
2522
  })
@@ -2465,19 +2525,19 @@ const $s = /* @__PURE__ */ N(ws, [["render", _s]]), Cs = { class: "vs-datatable
2465
2525
  ])
2466
2526
  ])
2467
2527
  ]),
2468
- (i(), se(It, { to: "body" }, [
2469
- u.value ? (i(), c("div", {
2528
+ (u(), se(It, { to: "body" }, [
2529
+ d.value ? (u(), c("div", {
2470
2530
  key: 0,
2471
2531
  class: "text-slate-700 vsTailwind vs-popover__content bottom",
2472
- style: ye([{ width: "fit-content", "z-index": "10002", position: "fixed" }, { position: "absolute", top: p.value.top + "px", left: p.value.left + "px" }])
2532
+ style: xe([{ width: "fit-content", "z-index": "10002", position: "fixed" }, { position: "absolute", top: p.value.top + "px", left: p.value.left + "px" }])
2473
2533
  }, [
2474
- l("div", Is, [
2475
- l("div", zs, [
2534
+ l("div", Ts, [
2535
+ l("div", Rs, [
2476
2536
  l("button", {
2477
2537
  onClick: R,
2478
2538
  class: "text-slate-700 flex items-center gap-1 px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
2479
2539
  }, [
2480
- B(us, {
2540
+ B(gs, {
2481
2541
  class: "text-black",
2482
2542
  width: "14",
2483
2543
  height: "14"
@@ -2485,11 +2545,11 @@ const $s = /* @__PURE__ */ N(ws, [["render", _s]]), Cs = { class: "vs-datatable
2485
2545
  M[4] || (M[4] = fe(" Імпортувати ", -1))
2486
2546
  ]),
2487
2547
  l("button", {
2488
- onClick: E,
2548
+ onClick: D,
2489
2549
  class: "text-slate-700 flex items-center px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
2490
2550
  }, [
2491
- l("span", Es, [
2492
- B(fs, {
2551
+ l("span", Ps, [
2552
+ B(ws, {
2493
2553
  class: "text-black",
2494
2554
  width: "14",
2495
2555
  height: "14"
@@ -2499,61 +2559,61 @@ const $s = /* @__PURE__ */ N(ws, [["render", _s]]), Cs = { class: "vs-datatable
2499
2559
  ])
2500
2560
  ])
2501
2561
  ])
2502
- ], 4)) : F("", !0)
2562
+ ], 4)) : z("", !0)
2503
2563
  ])),
2504
2564
  l("button", {
2505
2565
  onClick: ue,
2506
2566
  class: "text-slate-700 bg-white hover:bg-gray-100 font-semibold text-[15px] leadig-[18.5px] py-[10px] px-[12px] border border-[#E5E7EB] rounded-[8px] h-[38px] max-h-[38px] gap-[8px] flex items-center"
2507
2567
  }, [
2508
- B(De),
2568
+ B(Ae),
2509
2569
  M[6] || (M[6] = fe(" Додати ", -1))
2510
2570
  ])
2511
2571
  ]),
2512
- l("div", Ds, [
2513
- l("table", Fs, [
2514
- l("thead", Os, [
2515
- l("tr", As, [
2516
- l("th", Us, [
2572
+ l("div", Hs, [
2573
+ l("table", Ns, [
2574
+ l("thead", qs, [
2575
+ l("tr", Gs, [
2576
+ l("th", Js, [
2517
2577
  B(dt, {
2518
2578
  width: "24",
2519
2579
  height: "24",
2520
2580
  class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
2521
2581
  })
2522
2582
  ]),
2523
- (i(!0), c(Y, null, oe(z.colModel, (I) => (i(), c("th", {
2583
+ (u(!0), c(Y, null, oe(E.colModel, (I) => (u(), c("th", {
2524
2584
  key: I.key,
2525
2585
  class: "h-10 px-2 text-left align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 min-w-[150px]"
2526
- }, T(I.ua || I.label), 1))), 128)),
2586
+ }, U(I.ua || I.label), 1))), 128)),
2527
2587
  M[7] || (M[7] = l("th", { class: "h-10 px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 text-center" }, " Дії ", -1))
2528
2588
  ])
2529
2589
  ]),
2530
2590
  l("tbody", {
2531
- class: V({ "[&_tr:last-child]:border-0": !d.value })
2591
+ class: C({ "[&_tr:last-child]:border-0": !i.value })
2532
2592
  }, [
2533
- r.value.length === 0 ? (i(), c("td", Ts, [
2534
- l("div", Rs, [
2535
- l("div", Ps, [
2536
- B(xs, { class: "w-48 mx-auto" }),
2593
+ r.value.length === 0 ? (u(), c("td", Ks, [
2594
+ l("div", Zs, [
2595
+ l("div", Ws, [
2596
+ B(Ls, { class: "w-48 mx-auto" }),
2537
2597
  M[8] || (M[8] = l("div", { class: "max-w-sm mx-auto mt-6" }, [
2538
2598
  l("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "Нічого не знайдено"),
2539
2599
  l("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
2540
2600
  ], -1))
2541
2601
  ])
2542
2602
  ])
2543
- ])) : F("", !0),
2544
- (i(!0), c(Y, null, oe(r.value, (I, G) => (i(), c("tr", {
2603
+ ])) : z("", !0),
2604
+ (u(!0), c(Y, null, oe(r.value, (I, G) => (u(), c("tr", {
2545
2605
  key: I.id,
2546
- class: V(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move", {
2606
+ class: C(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move", {
2547
2607
  "opacity-50": a.value === G,
2548
- "border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20": d.value === G
2608
+ "border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20": i.value === G
2549
2609
  }]),
2550
2610
  draggable: "true",
2551
2611
  onDragstart: (ae) => w(G),
2552
2612
  onDragover: ve((ae) => b(G), ["prevent"]),
2553
2613
  onDrop: (ae) => $(G)
2554
2614
  }, [
2555
- l("td", Ns, [
2556
- l("div", qs, [
2615
+ l("td", Xs, [
2616
+ l("div", Ys, [
2557
2617
  B(dt, {
2558
2618
  width: "24",
2559
2619
  height: "24",
@@ -2561,37 +2621,37 @@ const $s = /* @__PURE__ */ N(ws, [["render", _s]]), Cs = { class: "vs-datatable
2561
2621
  })
2562
2622
  ])
2563
2623
  ]),
2564
- (i(!0), c(Y, null, oe(z.colModel, (ae) => (i(), c("td", {
2624
+ (u(!0), c(Y, null, oe(E.colModel, (ae) => (u(), c("td", {
2565
2625
  key: ae.key,
2566
2626
  class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"
2567
2627
  }, [
2568
- l("div", Gs, T(ee(I, ae)), 1)
2628
+ l("div", en, U(ee(I, ae)), 1)
2569
2629
  ]))), 128)),
2570
- l("td", Js, [
2571
- l("div", Ks, [
2630
+ l("td", tn, [
2631
+ l("div", ln, [
2572
2632
  l("button", {
2573
2633
  onClick: (ae) => X(I, G),
2574
2634
  class: "text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-blue-50 dark:hover:bg-slate-600 hover:border-blue-300 dark:hover:border-slate-500 hover:text-blue-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"
2575
2635
  }, [
2576
- B($s, {
2636
+ B(Is, {
2577
2637
  width: "24",
2578
2638
  height: "24",
2579
2639
  class: "w-3 h-3"
2580
2640
  })
2581
- ], 8, Zs),
2641
+ ], 8, on),
2582
2642
  l("button", {
2583
2643
  onClick: (ae) => we(G),
2584
2644
  class: "text-slate-700 inline-flex items-center justify-center whitespace-nowrap font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border rounded-md text-xs h-7 w-7 p-0 border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-700 hover:bg-red-50 dark:hover:bg-slate-600 hover:border-red-300 dark:hover:border-slate-500 hover:text-red-600 dark:hover:text-slate-200 transition-all duration-200 shadow-sm"
2585
2645
  }, [
2586
- B(Te, {
2646
+ B(He, {
2587
2647
  width: "24",
2588
2648
  height: "24",
2589
2649
  class: "w-3 h-3"
2590
2650
  })
2591
- ], 8, Ws)
2651
+ ], 8, an)
2592
2652
  ])
2593
2653
  ])
2594
- ], 42, Hs))), 128))
2654
+ ], 42, Qs))), 128))
2595
2655
  ], 2)
2596
2656
  ])
2597
2657
  ]),
@@ -2601,14 +2661,14 @@ const $s = /* @__PURE__ */ N(ws, [["render", _s]]), Cs = { class: "vs-datatable
2601
2661
  size: "lg"
2602
2662
  }, {
2603
2663
  default: Le(() => [
2604
- B(Fe, {
2664
+ B(De, {
2605
2665
  schema: e.colModel,
2606
- values: U.value,
2607
- "onUpdate:values": M[1] || (M[1] = (I) => U.value = I),
2666
+ values: T.value,
2667
+ "onUpdate:values": M[1] || (M[1] = (I) => T.value = I),
2608
2668
  form: O.value,
2609
2669
  "onUpdate:form": M[2] || (M[2] = (I) => O.value = I)
2610
2670
  }, null, 8, ["schema", "values", "form"]),
2611
- l("div", Qs, [
2671
+ l("div", sn, [
2612
2672
  l("button", {
2613
2673
  type: "button",
2614
2674
  onClick: M[3] || (M[3] = (I) => m.value = !1),
@@ -2625,7 +2685,7 @@ const $s = /* @__PURE__ */ N(ws, [["render", _s]]), Cs = { class: "vs-datatable
2625
2685
  }, 8, ["visible", "title"])
2626
2686
  ]));
2627
2687
  }
2628
- }), Ys = {
2688
+ }), rn = {
2629
2689
  draw: {
2630
2690
  toolbar: {
2631
2691
  actions: {
@@ -2733,7 +2793,7 @@ const $s = /* @__PURE__ */ N(ws, [["render", _s]]), Cs = { class: "vs-datatable
2733
2793
  }
2734
2794
  }
2735
2795
  };
2736
- function en(o) {
2796
+ function un(o) {
2737
2797
  return o ? o.type === "FeatureCollection" || o.type === "Feature" ? o : o.geom ? {
2738
2798
  type: "Feature",
2739
2799
  geometry: {
@@ -2747,7 +2807,7 @@ function en(o) {
2747
2807
  properties: {}
2748
2808
  } : null : null;
2749
2809
  }
2750
- const tn = {}, ln = {
2810
+ const dn = {}, cn = {
2751
2811
  xmlns: "http://www.w3.org/2000/svg",
2752
2812
  viewBox: "0 0 24 24",
2753
2813
  stroke: "currentColor",
@@ -2757,8 +2817,8 @@ const tn = {}, ln = {
2757
2817
  "stroke-linejoin": "round",
2758
2818
  class: "icon icon-tabler icons-tabler-outline icon-tabler-map-pin"
2759
2819
  };
2760
- function on(o, e) {
2761
- return i(), c("svg", ln, e[0] || (e[0] = [
2820
+ function pn(o, e) {
2821
+ return u(), c("svg", cn, e[0] || (e[0] = [
2762
2822
  l("path", {
2763
2823
  stroke: "none",
2764
2824
  d: "M0 0h24v24H0z",
@@ -2768,7 +2828,7 @@ function on(o, e) {
2768
2828
  l("path", { d: "M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0z" }, null, -1)
2769
2829
  ]));
2770
2830
  }
2771
- const an = /* @__PURE__ */ N(tn, [["render", on]]), sn = {}, nn = {
2831
+ const fn = /* @__PURE__ */ N(dn, [["render", pn]]), vn = {}, mn = {
2772
2832
  xmlns: "http://www.w3.org/2000/svg",
2773
2833
  viewBox: "0 0 24 24",
2774
2834
  fill: "none",
@@ -2778,8 +2838,8 @@ const an = /* @__PURE__ */ N(tn, [["render", on]]), sn = {}, nn = {
2778
2838
  "stroke-linejoin": "round",
2779
2839
  class: "icon icon-tabler icons-tabler-outline icon-tabler-line"
2780
2840
  };
2781
- function rn(o, e) {
2782
- return i(), c("svg", nn, e[0] || (e[0] = [
2841
+ function hn(o, e) {
2842
+ return u(), c("svg", mn, e[0] || (e[0] = [
2783
2843
  l("path", {
2784
2844
  stroke: "none",
2785
2845
  d: "M0 0h24v24H0z",
@@ -2790,7 +2850,7 @@ function rn(o, e) {
2790
2850
  l("path", { d: "M7.5 16.5l9 -9" }, null, -1)
2791
2851
  ]));
2792
2852
  }
2793
- const un = /* @__PURE__ */ N(sn, [["render", rn]]), dn = {}, cn = {
2853
+ const gn = /* @__PURE__ */ N(vn, [["render", hn]]), bn = {}, yn = {
2794
2854
  xmlns: "http://www.w3.org/2000/svg",
2795
2855
  viewBox: "0 0 24 24",
2796
2856
  fill: "none",
@@ -2800,12 +2860,12 @@ const un = /* @__PURE__ */ N(sn, [["render", rn]]), dn = {}, cn = {
2800
2860
  "stroke-linejoin": "round",
2801
2861
  class: "icon icon-tabler icons-tabler-outline icon-tabler-polygon"
2802
2862
  };
2803
- function pn(o, e) {
2804
- return i(), c("svg", cn, e[0] || (e[0] = [
2863
+ function xn(o, e) {
2864
+ return u(), c("svg", yn, e[0] || (e[0] = [
2805
2865
  ce('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M6.5 9.5l3.5 -3"></path><path d="M14 5.5l3 1.5"></path><path d="M18.5 10l-2.5 7"></path><path d="M13.5 17.5l-7 -5"></path>', 9)
2806
2866
  ]));
2807
2867
  }
2808
- const fn = /* @__PURE__ */ N(dn, [["render", pn]]), vn = {}, mn = {
2868
+ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = {}, _n = {
2809
2869
  xmlns: "http://www.w3.org/2000/svg",
2810
2870
  viewBox: "0 0 24 24",
2811
2871
  fill: "none",
@@ -2815,12 +2875,12 @@ const fn = /* @__PURE__ */ N(dn, [["render", pn]]), vn = {}, mn = {
2815
2875
  "stroke-linejoin": "round",
2816
2876
  class: "icon icon-tabler icons-tabler-outline icon-tabler-topology-ring-3"
2817
2877
  };
2818
- function hn(o, e) {
2819
- return i(), c("svg", mn, e[0] || (e[0] = [
2878
+ function $n(o, e) {
2879
+ return u(), c("svg", _n, e[0] || (e[0] = [
2820
2880
  ce('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M8 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M8 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M6 8v8"></path><path d="M18 16v-8"></path><path d="M8 6h8"></path><path d="M16 18h-8"></path>', 9)
2821
2881
  ]));
2822
2882
  }
2823
- const gn = /* @__PURE__ */ N(vn, [["render", hn]]), bn = {}, yn = {
2883
+ const Vn = /* @__PURE__ */ N(kn, [["render", $n]]), Cn = {}, Mn = {
2824
2884
  version: "1.1",
2825
2885
  viewBox: "0 0 14 14",
2826
2886
  xmlns: "http://www.w3.org/2000/svg",
@@ -2828,8 +2888,8 @@ const gn = /* @__PURE__ */ N(vn, [["render", hn]]), bn = {}, yn = {
2828
2888
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
2829
2889
  class: "fullscreen-icon"
2830
2890
  };
2831
- function xn(o, e) {
2832
- return i(), c("svg", yn, e[0] || (e[0] = [
2891
+ function Ln(o, e) {
2892
+ return u(), c("svg", Mn, e[0] || (e[0] = [
2833
2893
  l("title", null, null, -1),
2834
2894
  l("desc", null, null, -1),
2835
2895
  l("defs", null, null, -1),
@@ -2858,10 +2918,10 @@ function xn(o, e) {
2858
2918
  ], -1)
2859
2919
  ]));
2860
2920
  }
2861
- const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__search" }, _n = { class: "map-search__input" }, $n = { class: "flex flex-nowrap relative" }, Cn = { class: "form-autocomplete relative min-w-[6rem] vsTailwind map-search__select hidden" }, Vn = { class: "flex items-center w-full" }, Mn = { class: "max-w-[90%] truncate" }, Ln = {
2921
+ const Sn = /* @__PURE__ */ N(Cn, [["render", Ln]]), Bn = { class: "form-geom__search" }, jn = { class: "map-search__input" }, In = { class: "flex flex-nowrap relative" }, zn = { class: "form-autocomplete relative min-w-[6rem] vsTailwind map-search__select hidden" }, En = { class: "flex items-center w-full" }, An = { class: "max-w-[90%] truncate" }, Dn = {
2862
2922
  key: 0,
2863
2923
  class: "absolute z-[3100] mt-0.5 left-0 right-0"
2864
- }, Sn = { class: "form-autocomplete__wrapper mt-[10px] z-50 w-full min-w-36 max-h-72 p-0 space-y-0.5 bg-white rounded-xl shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:bg-neutral-900 top-full opened" }, Bn = { class: "form-autocomplete__list vsTailwind px-2 pb-2 pt-0 max-h-200 relative [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-900" }, jn = ["onClick"], In = { class: "flex justify-between items-center w-full" }, zn = { class: "flex items-center" }, En = {
2924
+ }, Fn = { class: "form-autocomplete__wrapper mt-[10px] z-50 w-full min-w-36 max-h-72 p-0 space-y-0.5 bg-white rounded-xl shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:bg-neutral-900 top-full opened" }, On = { class: "form-autocomplete__list vsTailwind px-2 pb-2 pt-0 max-h-200 relative [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-900" }, Un = ["onClick"], Tn = { class: "flex justify-between items-center w-full" }, Rn = { class: "flex items-center" }, Pn = {
2865
2925
  key: 0,
2866
2926
  class: "flex-shrink-0 w-3.5 h-3.5 text-blue-600",
2867
2927
  width: "24",
@@ -2872,37 +2932,37 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
2872
2932
  "stroke-width": "2",
2873
2933
  "stroke-linecap": "round",
2874
2934
  "stroke-linejoin": "round"
2875
- }, Dn = { class: "relative w-full" }, Fn = { class: "vs-form-text relative bg-white rounded-lg" }, On = {
2935
+ }, Hn = { class: "relative w-full" }, Nn = { class: "vs-form-text relative bg-white rounded-lg" }, qn = {
2876
2936
  key: 1,
2877
2937
  class: "absolute left-0 right-0 top-full z-[3200] bg-white border border-gray-200 rounded-b-lg shadow-lg max-h-72 overflow-auto"
2878
- }, An = { key: 0 }, Un = ["onClick"], Tn = {
2938
+ }, Gn = { key: 0 }, Jn = ["onClick"], Kn = {
2879
2939
  key: 1,
2880
2940
  class: "px-3 py-2 text-xs text-gray-500"
2881
- }, Rn = {
2941
+ }, Zn = {
2882
2942
  key: 2,
2883
2943
  class: "px-3 py-2 text-xs text-gray-400"
2884
- }, Pn = /* @__PURE__ */ D({
2944
+ }, Wn = /* @__PURE__ */ A({
2885
2945
  __name: "map-search",
2886
2946
  props: {
2887
2947
  placeholder: { default: "50, 30" }
2888
2948
  },
2889
2949
  emits: ["goToCoordinates"],
2890
2950
  setup(o, { emit: e }) {
2891
- const t = e, n = x(!1), s = x("coordinates"), r = x(""), a = x([]), d = x(!1), u = x(!1);
2951
+ const t = e, n = x(!1), s = x("coordinates"), r = x(""), a = x([]), i = x(!1), d = x(!1);
2892
2952
  let v;
2893
2953
  const p = [
2894
2954
  { value: "coordinates", label: "Пошук по кординатам" },
2895
2955
  { value: "atu", label: "АТУ" },
2896
2956
  { value: "address", label: "Адресса" },
2897
2957
  { value: "search_here", label: "Пошук HERE" }
2898
- ], w = A(() => p.find((j) => j.value === s.value)?.label ?? "АТУ");
2958
+ ], w = F(() => p.find((j) => j.value === s.value)?.label ?? "АТУ");
2899
2959
  function b(j) {
2900
2960
  s.value = j.value, n.value = !1, r.value = "", r.value && R();
2901
2961
  }
2902
2962
  function $(j) {
2903
2963
  j.target.closest(".map-search__input") || (n.value = !1);
2904
2964
  }
2905
- xe(() => document.addEventListener("click", $)), Ne(() => document.removeEventListener("click", $));
2965
+ me(() => document.addEventListener("click", $)), Te(() => document.removeEventListener("click", $));
2906
2966
  async function S(j) {
2907
2967
  let m;
2908
2968
  s.value === "atu" ? m = "/api/suggest/atu.nsdi.ato_level" : s.value === "address" ? m = "/api/suggest/map.address_id" : s.value === "search_here" && (m = "/api/gis-url-proxy");
@@ -2910,7 +2970,7 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
2910
2970
  return s.value === "search_here" ? f.searchParams.set("searchtext", j) : (s.value === "atu" || s.value === "address") && f.searchParams.set("key", j), f.searchParams.set("limit", "20"), f.searchParams.set("q", j), (await fetch(f.toString())).json();
2911
2971
  }
2912
2972
  function R() {
2913
- if (d.value = !0, u.value = !0, s.value === "coordinates") {
2973
+ if (i.value = !0, d.value = !0, s.value === "coordinates") {
2914
2974
  const j = r.value.trim().split(",");
2915
2975
  if (j.length === 2) {
2916
2976
  const m = parseFloat(j[0]), f = parseFloat(j[1]);
@@ -2921,7 +2981,7 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
2921
2981
  v && window.clearTimeout(v), v = window.setTimeout(async () => {
2922
2982
  const j = r.value.trim();
2923
2983
  if (!j) {
2924
- a.value = [], u.value = !1;
2984
+ a.value = [], d.value = !1;
2925
2985
  return;
2926
2986
  }
2927
2987
  try {
@@ -2930,27 +2990,27 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
2930
2990
  } catch {
2931
2991
  a.value = [];
2932
2992
  } finally {
2933
- u.value = !1;
2993
+ d.value = !1;
2934
2994
  }
2935
2995
  }, 300);
2936
2996
  }
2937
- function C() {
2938
- r.value = "", a.value = [], d.value = !1, u.value = !1;
2997
+ function V() {
2998
+ r.value = "", a.value = [], i.value = !1, d.value = !1;
2939
2999
  }
2940
- function E(j) {
2941
- t("goToCoordinates", j), d.value = !1, u.value = !1, a.value = [];
3000
+ function D(j) {
3001
+ t("goToCoordinates", j), i.value = !1, d.value = !1, a.value = [];
2942
3002
  }
2943
- return (j, m) => (i(), c("div", kn, [
2944
- l("div", _n, [
2945
- l("div", $n, [
2946
- l("div", Cn, [
3003
+ return (j, m) => (u(), c("div", Bn, [
3004
+ l("div", jn, [
3005
+ l("div", In, [
3006
+ l("div", zn, [
2947
3007
  l("button", {
2948
3008
  type: "button",
2949
3009
  onClick: m[0] || (m[0] = (f) => n.value = !n.value),
2950
3010
  class: "h-[40px] relative px-4 pe-9 flex text-nowrap w-full cursor-pointer bg-white border border-solid border-stone-200 rounded-lg text-start text-sm text-stone-800 focus:outline-none focus:ring-1 focus:ring-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200"
2951
3011
  }, [
2952
- l("div", Vn, [
2953
- l("span", Mn, T(w.value), 1)
3012
+ l("div", En, [
3013
+ l("span", An, U(w.value), 1)
2954
3014
  ]),
2955
3015
  m[3] || (m[3] = l("svg", {
2956
3016
  class: "stroke-gray-500 absolute right-3 translate-y-1/2 bottom-1/2",
@@ -2967,29 +3027,29 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
2967
3027
  })
2968
3028
  ], -1))
2969
3029
  ]),
2970
- n.value ? (i(), c("div", Ln, [
2971
- l("div", Sn, [
2972
- l("div", Bn, [
2973
- (i(), c(Y, null, oe(p, (f) => l("div", {
3030
+ n.value ? (u(), c("div", Dn, [
3031
+ l("div", Fn, [
3032
+ l("div", On, [
3033
+ (u(), c(Y, null, oe(p, (f) => l("div", {
2974
3034
  onClick: (Q) => b(f),
2975
3035
  key: f.value,
2976
3036
  class: "form-autocomplete__item cursor-pointer hs-selected:bg-stone-100 dark:hs-selected:bg-neutral-800 py-2 px-4 w-full text-sm text-gray-800 hover:bg-gray-100 rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:hover:bg-neutral-800 dark:text-neutral-200 dark:focus:bg-neutral-800 cursor-default"
2977
3037
  }, [
2978
- l("div", In, [
2979
- l("div", zn, [
2980
- l("div", null, T(f.label), 1)
3038
+ l("div", Tn, [
3039
+ l("div", Rn, [
3040
+ l("div", null, U(f.label), 1)
2981
3041
  ]),
2982
- f.value === s.value ? (i(), c("svg", En, m[4] || (m[4] = [
3042
+ f.value === s.value ? (u(), c("svg", Pn, m[4] || (m[4] = [
2983
3043
  l("polyline", { points: "20 6 9 17 4 12" }, null, -1)
2984
- ]))) : F("", !0)
3044
+ ]))) : z("", !0)
2985
3045
  ])
2986
- ], 8, jn)), 64))
3046
+ ], 8, Un)), 64))
2987
3047
  ])
2988
3048
  ])
2989
- ])) : F("", !0)
3049
+ ])) : z("", !0)
2990
3050
  ]),
2991
- l("div", Dn, [
2992
- l("div", Fn, [
3051
+ l("div", Hn, [
3052
+ l("div", Nn, [
2993
3053
  m[6] || (m[6] = l("i", { class: "absolute bottom-1/2 translate-y-1/2 left-3 text-gray-500" }, [
2994
3054
  l("svg", {
2995
3055
  width: "16",
@@ -3017,15 +3077,15 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3017
3077
  type: "text",
3018
3078
  "onUpdate:modelValue": m[1] || (m[1] = (f) => r.value = f),
3019
3079
  onInput: R,
3020
- onFocus: m[2] || (m[2] = (f) => d.value = !0),
3080
+ onFocus: m[2] || (m[2] = (f) => i.value = !0),
3021
3081
  placeholder: "lat, lng ex. 50, 30",
3022
3082
  class: "bg-white h-[38px] text-sm py-2 px-3 ps-9 pe-8 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-lg text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
3023
3083
  }, null, 544), [
3024
3084
  [ne, r.value]
3025
3085
  ]),
3026
- r.value ? (i(), c("button", {
3086
+ r.value ? (u(), c("button", {
3027
3087
  key: 0,
3028
- onClick: C,
3088
+ onClick: V,
3029
3089
  class: "absolute right-2 bottom-1/2 translate-y-1/2 text-gray-500 hover:text-red-500",
3030
3090
  "aria-label": "Очистити",
3031
3091
  type: "button"
@@ -3044,23 +3104,23 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3044
3104
  "stroke-linejoin": "round"
3045
3105
  })
3046
3106
  ], -1)
3047
- ]))) : F("", !0),
3048
- d.value && s.value !== "coordinates" ? (i(), c("div", On, [
3049
- a.value.length ? (i(), c("ul", An, [
3050
- (i(!0), c(Y, null, oe(a.value, (f) => (i(), c("li", {
3107
+ ]))) : z("", !0),
3108
+ i.value && s.value !== "coordinates" ? (u(), c("div", qn, [
3109
+ a.value.length ? (u(), c("ul", Gn, [
3110
+ (u(!0), c(Y, null, oe(a.value, (f) => (u(), c("li", {
3051
3111
  key: f.properties.place_id,
3052
- onClick: (Q) => E(f),
3112
+ onClick: (Q) => D(f),
3053
3113
  class: "px-3 py-2 text-sm cursor-pointer hover:bg-gray-100"
3054
- }, T(f.properties.display_name), 9, Un))), 128))
3055
- ])) : u.value ? (i(), c("div", Tn, "Шукаю…")) : (i(), c("div", Rn, "Нічого не знайдено"))
3056
- ])) : F("", !0)
3114
+ }, U(f.properties.display_name), 9, Jn))), 128))
3115
+ ])) : d.value ? (u(), c("div", Kn, "Шукаю…")) : (u(), c("div", Zn, "Нічого не знайдено"))
3116
+ ])) : z("", !0)
3057
3117
  ])
3058
3118
  ])
3059
3119
  ])
3060
3120
  ])
3061
3121
  ]));
3062
3122
  }
3063
- }), Hn = { class: "bg-white/95 p-2 rounded-xl shadow border border-gray-200" }, Nn = { class: "flex gap-2" }, qn = ["onClick", "title"], Gn = ["src"], Jn = /* @__PURE__ */ D({
3123
+ }), Qn = { class: "bg-white/95 p-2 rounded-xl shadow border border-gray-200" }, Xn = { class: "flex gap-2" }, Yn = ["onClick", "title"], er = ["src"], tr = /* @__PURE__ */ A({
3064
3124
  __name: "map-layers",
3065
3125
  props: {
3066
3126
  basemaps: {}
@@ -3071,35 +3131,35 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3071
3131
  function r(a) {
3072
3132
  s("onLayerChange", a), n.value = a;
3073
3133
  }
3074
- return (a, d) => (i(), c("div", Hn, [
3075
- l("div", Nn, [
3076
- (i(!0), c(Y, null, oe(a.basemaps, (u, v) => (i(), c("div", {
3134
+ return (a, i) => (u(), c("div", Qn, [
3135
+ l("div", Xn, [
3136
+ (u(!0), c(Y, null, oe(a.basemaps, (d, v) => (u(), c("div", {
3077
3137
  key: v,
3078
- class: V(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": n.value === v }]),
3138
+ class: C(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": n.value === v }]),
3079
3139
  onClick: (p) => r(v),
3080
- title: u.name || v,
3140
+ title: d.name || v,
3081
3141
  role: "button",
3082
3142
  tabindex: "0"
3083
3143
  }, [
3084
3144
  l("img", {
3085
- src: u.preview,
3145
+ src: d.preview,
3086
3146
  alt: "",
3087
3147
  class: "w-14 h-14 object-cover"
3088
- }, null, 8, Gn)
3089
- ], 10, qn))), 128))
3148
+ }, null, 8, er)
3149
+ ], 10, Yn))), 128))
3090
3150
  ])
3091
3151
  ]));
3092
3152
  }
3093
- }), Kn = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, Zn = { class: "form-geom__panel flex gap-1 items-start mt-2" }, Wn = { class: "flex items-center gap-1" }, Qn = ["disabled"], Xn = { class: "absolute top-4 right-4 z-[1000]" }, Yn = { class: "flex flex-col gap-[2px]" }, er = ["aria-pressed"], tr = ["aria-pressed"], lr = ["aria-pressed"], or = ["aria-pressed"], ar = { class: "absolute bottom-0 left-0 right-0 z-[1000] bg-white/95 border-t border-gray-200 text-xs text-gray-700 flex items-center gap-4 pt-1" }, sr = {
3153
+ }), lr = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, or = { class: "form-geom__panel flex gap-1 items-start mt-2" }, ar = { class: "flex items-center gap-1" }, sr = ["disabled"], nr = { class: "absolute top-4 right-4 z-[1000]" }, rr = { class: "flex flex-col gap-[2px]" }, ir = ["aria-pressed"], ur = ["aria-pressed"], dr = ["aria-pressed"], cr = ["aria-pressed"], pr = { class: "absolute bottom-0 left-0 right-0 z-[1000] bg-white/95 border-t border-gray-200 text-xs text-gray-700 flex items-center gap-4 pt-1" }, fr = {
3094
3154
  key: 0,
3095
3155
  class: "form-geom__feature flex items-center text-xs transition-all gap-2 w-full"
3096
- }, nr = { class: "mr-auto" }, rr = { class: "font-bold" }, ir = { class: "flex items-center" }, ur = { class: "text-xs mr-2" }, dr = {
3156
+ }, vr = { class: "mr-auto" }, mr = { class: "font-bold" }, hr = { class: "flex items-center" }, gr = { class: "text-xs mr-2" }, br = {
3097
3157
  key: 0,
3098
3158
  class: "text-xs"
3099
- }, cr = {
3159
+ }, yr = {
3100
3160
  key: 1,
3101
3161
  class: "text-xs"
3102
- }, pr = /* @__PURE__ */ D({
3162
+ }, xr = /* @__PURE__ */ A({
3103
3163
  __name: "vs-input-map",
3104
3164
  props: {
3105
3165
  tools: {},
@@ -3114,36 +3174,36 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3114
3174
  emits: ["update:modelValue"],
3115
3175
  setup(o, { emit: e }) {
3116
3176
  const t = zt(), n = o, s = e, r = x(null);
3117
- let a, d, u;
3177
+ let a, i, d;
3118
3178
  const v = x(null), p = x(null), w = x(6), b = x(0), $ = x(t?.appContext.config.globalProperties.$settings?.center || [50, 30]), S = x(null), R = de();
3119
- let C;
3120
- const E = x("topo100");
3179
+ let V;
3180
+ const D = x("topo100");
3121
3181
  function j() {
3122
3182
  return new Promise((y, k) => {
3123
3183
  window.L && window.L.Draw && y(0);
3124
3184
  const P = (re) => {
3125
- if (Array.from(document.styleSheets).some((ge) => ge?.href?.includes(re))) return;
3126
- const he = document.createElement("link");
3127
- he.rel = "stylesheet", he.href = re, document.head.appendChild(he);
3128
- }, J = (re) => new Promise((_e, he) => {
3129
- const ge = Array.from(document.scripts).find((Ve) => Ve.src === re);
3130
- if (ge) {
3131
- ge.addEventListener("load", () => _e()), ge.addEventListener("error", (Ve) => he(Ve));
3185
+ if (Array.from(document.styleSheets).some((be) => be?.href?.includes(re))) return;
3186
+ const ge = document.createElement("link");
3187
+ ge.rel = "stylesheet", ge.href = re, document.head.appendChild(ge);
3188
+ }, J = (re) => new Promise(($e, ge) => {
3189
+ const be = Array.from(document.scripts).find((Ce) => Ce.src === re);
3190
+ if (be) {
3191
+ be.addEventListener("load", () => $e()), be.addEventListener("error", (Ce) => ge(Ce));
3132
3192
  return;
3133
3193
  }
3134
- const Ce = document.createElement("script");
3135
- Ce.src = re, Ce.async = !0, Ce.onload = () => _e(), Ce.onerror = (Ve) => he(Ve), document.body.appendChild(Ce);
3194
+ const Ve = document.createElement("script");
3195
+ Ve.src = re, Ve.async = !0, Ve.onload = () => $e(), Ve.onerror = (Ce) => ge(Ce), document.body.appendChild(Ve);
3136
3196
  });
3137
3197
  P("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), P("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), J("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => J("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => y(0)).catch(k);
3138
3198
  });
3139
3199
  }
3140
3200
  function m() {
3141
- const y = d.toGeoJSON();
3201
+ const y = i.toGeoJSON();
3142
3202
  let k = null;
3143
- y?.features?.length && (k = y.features[0].geometry), s("update:modelValue", k), b.value = d.getLayers().length;
3203
+ y?.features?.length && (k = y.features[0].geometry), s("update:modelValue", k), b.value = i.getLayers().length;
3144
3204
  }
3145
3205
  function f(y = 30) {
3146
- const k = d.getLayers();
3206
+ const k = i.getLayers();
3147
3207
  if (!k.length) return;
3148
3208
  const J = L.featureGroup(k).getBounds();
3149
3209
  J && J.isValid() && a.fitBounds(J, { padding: [y, y] });
@@ -3151,7 +3211,7 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3151
3211
  function Q() {
3152
3212
  v.value?.click();
3153
3213
  }
3154
- const U = x("");
3214
+ const T = x("");
3155
3215
  function O(y) {
3156
3216
  return y instanceof L.Circle ? "Circle" : y instanceof L.Rectangle ? "Rectangle" : y instanceof L.Polygon && !(y instanceof L.Rectangle) ? "Polygon" : y instanceof L.Polyline && !(y instanceof L.Polygon) ? "Polyline" : y instanceof L.Marker ? "Point" : "Feature";
3157
3217
  }
@@ -3173,7 +3233,7 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3173
3233
  return y instanceof L.Circle ? y.getLatLng() : y.getBounds ? y.getBounds().getCenter() : y.getLatLng ? y.getLatLng() : a.getCenter();
3174
3234
  }
3175
3235
  function X() {
3176
- const y = d.getLayers();
3236
+ const y = i.getLayers();
3177
3237
  if (!y.length) {
3178
3238
  S.value = null, b.value = 0;
3179
3239
  return;
@@ -3192,12 +3252,12 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3192
3252
  }
3193
3253
  function we() {
3194
3254
  const y = S.value?.layer;
3195
- y && (d.removeLayer(y), m(), X());
3255
+ y && (i.removeLayer(y), m(), X());
3196
3256
  }
3197
- xe(async () => {
3198
- await j(), L.drawLocal = Ys, a = L.map(r.value, { zoomControl: !1 }).setView($.value, 10), L.control.zoom({ position: "bottomright" }).addTo(a), E.value = Object.keys(R)[0], C = L.tileLayer(R[E.value].url, { maxZoom: 19, minZoom: 6 }).addTo(a), d = new L.FeatureGroup().addTo(a), a.on(L.Draw.Event.CREATED, (P) => {
3257
+ me(async () => {
3258
+ await j(), L.drawLocal = rn, a = L.map(r.value, { zoomControl: !1 }).setView($.value, 10), L.control.zoom({ position: "bottomright" }).addTo(a), D.value = Object.keys(R)[0], V = L.tileLayer(R[D.value].url, { maxZoom: 19, minZoom: 6 }).addTo(a), i = new L.FeatureGroup().addTo(a), a.on(L.Draw.Event.CREATED, (P) => {
3199
3259
  const { layer: J } = P;
3200
- d.clearLayers(), d.addLayer(J), m(), X(), f(), U.value = "";
3260
+ i.clearLayers(), i.addLayer(J), m(), X(), f(), T.value = "";
3201
3261
  }), a.on(L.Draw.Event.EDITED, () => {
3202
3262
  m(), X(), f();
3203
3263
  }), a.on(L.Draw.Event.DELETED, () => {
@@ -3209,36 +3269,36 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3209
3269
  }), a.on("zoomend", () => {
3210
3270
  w.value = a.getZoom();
3211
3271
  });
3212
- const k = en(n.modelValue);
3272
+ const k = un(n.modelValue);
3213
3273
  if (k) {
3214
3274
  const P = [];
3215
- L.geoJSON(k).eachLayer((J) => P.push(J)), P.length && d.addLayer(P[0]), m(), X(), f();
3275
+ L.geoJSON(k).eachLayer((J) => P.push(J)), P.length && i.addLayer(P[0]), m(), X(), f();
3216
3276
  }
3217
3277
  });
3218
- function z(y) {
3278
+ function E(y) {
3219
3279
  if (a) {
3220
- switch (u && u.disable(), y) {
3280
+ switch (d && d.disable(), y) {
3221
3281
  case "marker":
3222
- u = new L.Draw.Marker(a);
3282
+ d = new L.Draw.Marker(a);
3223
3283
  break;
3224
3284
  case "polyline":
3225
- u = new L.Draw.Polyline(a);
3285
+ d = new L.Draw.Polyline(a);
3226
3286
  break;
3227
3287
  case "polygon":
3228
- u = new L.Draw.Polygon(a);
3288
+ d = new L.Draw.Polygon(a);
3229
3289
  break;
3230
3290
  case "rectangle":
3231
- u = new L.Draw.Rectangle(a);
3291
+ d = new L.Draw.Rectangle(a);
3232
3292
  break;
3233
3293
  default:
3234
- u = new L.Draw.Rectangle(a);
3294
+ d = new L.Draw.Rectangle(a);
3235
3295
  break;
3236
3296
  }
3237
- u && (u.enable(), U.value = y);
3297
+ d && (d.enable(), T.value = y);
3238
3298
  }
3239
3299
  }
3240
3300
  function M() {
3241
- const y = d.toGeoJSON(), k = new Blob([JSON.stringify(y, null, 2)], { type: "application/json" }), P = URL.createObjectURL(k), J = document.createElement("a");
3301
+ const y = i.toGeoJSON(), k = new Blob([JSON.stringify(y, null, 2)], { type: "application/json" }), P = URL.createObjectURL(k), J = document.createElement("a");
3242
3302
  J.href = P, J.download = "data.geojson", J.click(), URL.revokeObjectURL(P);
3243
3303
  }
3244
3304
  function I(y) {
@@ -3249,8 +3309,8 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3249
3309
  if (typeof P.result == "string")
3250
3310
  try {
3251
3311
  const J = JSON.parse(P.result);
3252
- d.clearLayers(), J && L.geoJSON({ type: "Feature", geometry: J }).eachLayer((re) => {
3253
- d.addLayer(re);
3312
+ i.clearLayers(), J && L.geoJSON({ type: "Feature", geometry: J }).eachLayer((re) => {
3313
+ i.addLayer(re);
3254
3314
  }), m(), X(), f();
3255
3315
  } finally {
3256
3316
  y.target.value = "";
@@ -3258,7 +3318,7 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3258
3318
  }, P.readAsText(k);
3259
3319
  }
3260
3320
  function G(y) {
3261
- a && (C && a.removeLayer(C), C = L.tileLayer(R[y].url, { maxZoom: 19, minZoom: 6 }).addTo(a), E.value = y);
3321
+ a && (V && a.removeLayer(V), V = L.tileLayer(R[y].url, { maxZoom: 19, minZoom: 6 }).addTo(a), D.value = y);
3262
3322
  }
3263
3323
  function ae(y) {
3264
3324
  const k = L.latLng(y[0], y[1]);
@@ -3267,12 +3327,12 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3267
3327
  le(
3268
3328
  () => n.modelValue,
3269
3329
  (y) => {
3270
- console.log("update map"), d.clearLayers(), y && L.geoJSON({ type: "Feature", geometry: y }).eachLayer((k) => {
3271
- d.addLayer(k), k.dragging?.enable(), k.dragging?.enabled(), k.on("dragend", (P) => {
3330
+ console.log("update map"), i.clearLayers(), y && L.geoJSON({ type: "Feature", geometry: y }).eachLayer((k) => {
3331
+ i.addLayer(k), k.dragging?.enable(), k.dragging?.enabled(), k.on("dragend", (P) => {
3272
3332
  const re = P.target.getLatLng();
3273
3333
  s("update:modelValue", { type: "Point", coordinates: [re.lng, re.lat] });
3274
3334
  });
3275
- }), b.value = d.getLayers().length, X(), f();
3335
+ }), b.value = i.getLayers().length, X(), f();
3276
3336
  }
3277
3337
  );
3278
3338
  function de() {
@@ -3296,18 +3356,18 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3296
3356
  setTimeout(() => {
3297
3357
  a.invalidateSize();
3298
3358
  }, 50);
3299
- }), (y, k) => (i(), c("div", {
3300
- class: V(["leaflet-map-wrapper relative w-full h-[400px]", { fullscreen: ke.value }])
3359
+ }), (y, k) => (u(), c("div", {
3360
+ class: C(["leaflet-map-wrapper relative w-full h-[400px]", { fullscreen: ke.value }])
3301
3361
  }, [
3302
3362
  l("div", {
3303
3363
  ref_key: "mapContainer",
3304
3364
  ref: r,
3305
3365
  class: "w-full h-full"
3306
3366
  }, null, 512),
3307
- l("div", Kn, [
3308
- B(Pn, { onGoToCoordinates: ae }),
3309
- l("div", Zn, [
3310
- l("div", Wn, [
3367
+ l("div", lr, [
3368
+ B(Wn, { onGoToCoordinates: ae }),
3369
+ l("div", or, [
3370
+ l("div", ar, [
3311
3371
  l("button", {
3312
3372
  type: "button",
3313
3373
  class: "vs-btn-row",
@@ -3318,7 +3378,7 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3318
3378
  class: "vs-btn-row",
3319
3379
  onClick: M,
3320
3380
  disabled: b.value === 0
3321
- }, "Export ", 8, Qn)
3381
+ }, "Export ", 8, sr)
3322
3382
  ]),
3323
3383
  l("input", {
3324
3384
  ref_key: "importRef",
@@ -3330,44 +3390,44 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3330
3390
  }, null, 544)
3331
3391
  ])
3332
3392
  ]),
3333
- l("div", Xn, [
3334
- l("div", Yn, [
3393
+ l("div", nr, [
3394
+ l("div", rr, [
3335
3395
  l("button", {
3336
- class: V(["vs-btn", { "vs-active": U.value === "marker" }]),
3337
- "aria-pressed": U.value === "marker",
3396
+ class: C(["vs-btn", { "vs-active": T.value === "marker" }]),
3397
+ "aria-pressed": T.value === "marker",
3338
3398
  title: "Point (P)",
3339
3399
  "aria-label": "Draw point",
3340
- onClick: k[0] || (k[0] = (P) => z("marker"))
3400
+ onClick: k[0] || (k[0] = (P) => E("marker"))
3341
3401
  }, [
3342
- B(an)
3343
- ], 10, er),
3402
+ B(fn)
3403
+ ], 10, ir),
3344
3404
  l("button", {
3345
- class: V(["vs-btn", { "vs-active": U.value === "polyline" }]),
3346
- "aria-pressed": U.value === "polyline",
3405
+ class: C(["vs-btn", { "vs-active": T.value === "polyline" }]),
3406
+ "aria-pressed": T.value === "polyline",
3347
3407
  title: "Line (L)",
3348
3408
  "aria-label": "Draw polyline",
3349
- onClick: k[1] || (k[1] = (P) => z("polyline"))
3409
+ onClick: k[1] || (k[1] = (P) => E("polyline"))
3350
3410
  }, [
3351
- B(un)
3352
- ], 10, tr),
3411
+ B(gn)
3412
+ ], 10, ur),
3353
3413
  l("button", {
3354
- class: V(["vs-btn", { "vs-active": U.value === "polygon" }]),
3355
- "aria-pressed": U.value === "polygon",
3414
+ class: C(["vs-btn", { "vs-active": T.value === "polygon" }]),
3415
+ "aria-pressed": T.value === "polygon",
3356
3416
  title: "Polygon (G)",
3357
3417
  "aria-label": "Draw polygon",
3358
- onClick: k[2] || (k[2] = (P) => z("polygon"))
3418
+ onClick: k[2] || (k[2] = (P) => E("polygon"))
3359
3419
  }, [
3360
- B(fn)
3361
- ], 10, lr),
3420
+ B(wn)
3421
+ ], 10, dr),
3362
3422
  l("button", {
3363
- class: V(["vs-btn", { "vs-active": U.value === "rectangle" }]),
3364
- "aria-pressed": U.value === "rectangle",
3423
+ class: C(["vs-btn", { "vs-active": T.value === "rectangle" }]),
3424
+ "aria-pressed": T.value === "rectangle",
3365
3425
  title: "Rectangle (R)",
3366
3426
  "aria-label": "Draw rectangle",
3367
- onClick: k[3] || (k[3] = (P) => z("rectangle"))
3427
+ onClick: k[3] || (k[3] = (P) => E("rectangle"))
3368
3428
  }, [
3369
- B(gn)
3370
- ], 10, or),
3429
+ B(Vn)
3430
+ ], 10, cr),
3371
3431
  l("button", {
3372
3432
  class: "vs-btn mt-5",
3373
3433
  onClick: k[4] || (k[4] = (P) => {
@@ -3376,33 +3436,33 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3376
3436
  title: "Full Screen",
3377
3437
  "aria-label": "Full Screen"
3378
3438
  }, [
3379
- B(wn, { style: { width: "12px", height: "12px" } })
3439
+ B(Sn, { style: { width: "12px", height: "12px" } })
3380
3440
  ])
3381
3441
  ])
3382
3442
  ]),
3383
3443
  l("div", {
3384
- class: V(["absolute left-4 z-[1000]", S.value ? "bottom-8" : "bottom-4"])
3444
+ class: C(["absolute left-4 z-[1000]", S.value ? "bottom-8" : "bottom-4"])
3385
3445
  }, [
3386
- B(Jn, {
3446
+ B(tr, {
3387
3447
  basemaps: q(R),
3388
3448
  onOnLayerChange: G
3389
3449
  }, null, 8, ["basemaps"])
3390
3450
  ], 2),
3391
- l("div", ar, [
3392
- S.value ? (i(), c("div", sr, [
3393
- l("div", nr, [
3451
+ l("div", pr, [
3452
+ S.value ? (u(), c("div", fr, [
3453
+ l("div", vr, [
3394
3454
  k[7] || (k[7] = fe(" Тип: ", -1)),
3395
- l("span", rr, T(S.value.type), 1)
3455
+ l("span", mr, U(S.value.type), 1)
3396
3456
  ]),
3397
- l("div", ir, [
3398
- l("div", ur, [
3457
+ l("div", hr, [
3458
+ l("div", gr, [
3399
3459
  k[8] || (k[8] = fe(" Центр: ", -1)),
3400
- l("b", null, T(S.value.center.lat.toFixed(5)) + ", " + T(S.value.center.lng.toFixed(5)), 1)
3460
+ l("b", null, U(S.value.center.lat.toFixed(5)) + ", " + U(S.value.center.lng.toFixed(5)), 1)
3401
3461
  ]),
3402
- S.value.areaKm2 !== null ? (i(), c("div", dr, [
3462
+ S.value.areaKm2 !== null ? (u(), c("div", br, [
3403
3463
  k[9] || (k[9] = fe(" Площа: ", -1)),
3404
- l("b", null, T(S.value.areaKm2.toFixed(1)) + "км²", 1)
3405
- ])) : (i(), c("div", cr, k[10] || (k[10] = [
3464
+ l("b", null, U(S.value.areaKm2.toFixed(1)) + "км²", 1)
3465
+ ])) : (u(), c("div", yr, k[10] || (k[10] = [
3406
3466
  fe(" Площа: ", -1),
3407
3467
  l("b", null, "—", -1)
3408
3468
  ]))),
@@ -3418,17 +3478,17 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3418
3478
  title: "Видалити",
3419
3479
  onClick: k[6] || (k[6] = (P) => we())
3420
3480
  }, [
3421
- B(Te, { class: "w-3 h-3" })
3481
+ B(He, { class: "w-3 h-3" })
3422
3482
  ])
3423
3483
  ])
3424
- ])) : F("", !0)
3484
+ ])) : z("", !0)
3425
3485
  ])
3426
3486
  ], 2));
3427
3487
  }
3428
- }), fr = /* @__PURE__ */ N(pr, [["__scopeId", "data-v-5a4c21a7"]]), vr = ["data-focus"], mr = { class: "flex items-center" }, hr = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, gr = ["onClick", "aria-label"], br = {
3488
+ }), wr = /* @__PURE__ */ N(xr, [["__scopeId", "data-v-5a4c21a7"]]), kr = ["data-focus"], _r = { class: "flex items-center" }, $r = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Vr = ["onClick", "aria-label"], Cr = {
3429
3489
  key: 0,
3430
3490
  class: "absolute text-gray-500 truncate pl-2"
3431
- }, yr = { class: "flex-1 min-w-[2px]" }, xr = ["placeholder"], wr = { class: "flex items-center shrink-0" }, kr = ["disabled"], _r = /* @__PURE__ */ D({
3491
+ }, Mr = { class: "flex-1 min-w-[2px]" }, Lr = ["placeholder"], Sr = { class: "flex items-center shrink-0" }, Br = ["disabled"], jr = /* @__PURE__ */ A({
3432
3492
  __name: "vs-input-tag",
3433
3493
  props: /* @__PURE__ */ Z({
3434
3494
  unique: { type: Boolean, default: !0 },
@@ -3446,29 +3506,29 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3446
3506
  emits: /* @__PURE__ */ Z(["update:modelValue"], ["update:modelValue"]),
3447
3507
  setup(o, { emit: e }) {
3448
3508
  const t = o, n = e;
3449
- me(t.style);
3450
- const s = x(null), r = x(null), a = x(null), d = x(!1), u = x(""), v = W(o, "modelValue"), p = A(() => t.placeholder || "Add tag…"), w = A(() => v.value?.length === 0 && u.value === ""), b = A(() => !t.disabled && v.value?.length > 0), $ = A(() => t.disabled), S = async () => {
3509
+ he(t.style);
3510
+ const s = x(null), r = x(null), a = x(null), i = x(!1), d = x(""), v = W(o, "modelValue"), p = F(() => t.placeholder || "Add tag…"), w = F(() => v.value?.length === 0 && d.value === ""), b = F(() => !t.disabled && v.value?.length > 0), $ = F(() => t.disabled), S = async () => {
3451
3511
  $.value || await ze(() => a.value?.focus());
3452
- }, R = (U) => {
3453
- const O = U.trim();
3454
- O !== "" && (!v.value || !Array.isArray(v.value) ? v.value = [O] : t.unique ? v.value.includes(O) || (v.value = [...v.value, O]) : v.value = [...v.value, O], u.value = "");
3455
- }, C = () => {
3456
- const U = u.value;
3457
- U.trim() !== "" && R(U), u.value = "";
3458
- }, E = (U) => {
3512
+ }, R = (T) => {
3513
+ const O = T.trim();
3514
+ O !== "" && (!v.value || !Array.isArray(v.value) ? v.value = [O] : t.unique ? v.value.includes(O) || (v.value = [...v.value, O]) : v.value = [...v.value, O], d.value = "");
3515
+ }, V = () => {
3516
+ const T = d.value;
3517
+ T.trim() !== "" && R(T), d.value = "";
3518
+ }, D = (T) => {
3459
3519
  const O = v.value.slice();
3460
- O.splice(U, 1), n("update:modelValue", O);
3520
+ O.splice(T, 1), n("update:modelValue", O);
3461
3521
  }, j = () => {
3462
3522
  n("update:modelValue", []);
3463
3523
  }, m = () => {
3464
- $.value || (d.value = !0);
3524
+ $.value || (i.value = !0);
3465
3525
  }, f = () => {
3466
- d.value = !1;
3467
- }, Q = (U) => {
3468
- const { key: O } = U;
3469
- O === "Enter" ? (U.preventDefault(), C()) : O === "Backspace" && u.value === "" && v.value.length > 0 && E(v.value.length - 1);
3526
+ i.value = !1;
3527
+ }, Q = (T) => {
3528
+ const { key: O } = T;
3529
+ O === "Enter" ? (T.preventDefault(), V()) : O === "Backspace" && d.value === "" && v.value.length > 0 && D(v.value.length - 1);
3470
3530
  };
3471
- return (U, O) => (i(), c("div", {
3531
+ return (T, O) => (u(), c("div", {
3472
3532
  class: "flex gap-1 w-full",
3473
3533
  ref_key: "root",
3474
3534
  ref: s,
@@ -3476,18 +3536,18 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3476
3536
  }, ["stop"]))
3477
3537
  }, [
3478
3538
  l("div", {
3479
- class: V(["relative w-full font-sans", t.customClass]),
3539
+ class: C(["relative w-full font-sans", t.customClass]),
3480
3540
  role: "group",
3481
3541
  "aria-label": "Tag input"
3482
3542
  }, [
3483
3543
  l("div", {
3484
- class: V([
3544
+ class: C([
3485
3545
  "flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
3486
3546
  "border-gray-300 hover:border-gray-400",
3487
- d.value ? "border-blue-500 ring-1 ring-blue-500" : "",
3547
+ i.value ? "border-blue-500 ring-1 ring-blue-500" : "",
3488
3548
  $.value ? "bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300" : ""
3489
3549
  ]),
3490
- "data-focus": d.value ? "true" : "false",
3550
+ "data-focus": i.value ? "true" : "false",
3491
3551
  onClick: S
3492
3552
  }, [
3493
3553
  l("div", {
@@ -3495,17 +3555,17 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3495
3555
  ref_key: "chipsRef",
3496
3556
  ref: r
3497
3557
  }, [
3498
- (i(!0), c(Y, null, oe(v.value, (ue, ee) => (i(), c("div", {
3558
+ (u(!0), c(Y, null, oe(v.value, (ue, ee) => (u(), c("div", {
3499
3559
  key: ee,
3500
3560
  class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"
3501
3561
  }, [
3502
- l("div", mr, [
3503
- l("div", hr, T(ue), 1)
3562
+ l("div", _r, [
3563
+ l("div", $r, U(ue), 1)
3504
3564
  ]),
3505
3565
  l("div", {
3506
3566
  role: "button",
3507
3567
  class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
3508
- onClick: ve((X) => E(ee), ["stop"]),
3568
+ onClick: ve((X) => D(ee), ["stop"]),
3509
3569
  "aria-label": `Remove ${ue}`
3510
3570
  }, O[2] || (O[2] = [
3511
3571
  l("svg", {
@@ -3518,11 +3578,11 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3518
3578
  }, [
3519
3579
  l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
3520
3580
  ], -1)
3521
- ]), 8, gr)
3581
+ ]), 8, Vr)
3522
3582
  ]))), 128)),
3523
- w.value ? (i(), c("div", br, T(p.value), 1)) : F("", !0),
3524
- l("div", yr, [
3525
- $.value ? F("", !0) : K((i(), c("input", {
3583
+ w.value ? (u(), c("div", Cr, U(p.value), 1)) : z("", !0),
3584
+ l("div", Mr, [
3585
+ $.value ? z("", !0) : K((u(), c("input", {
3526
3586
  key: 0,
3527
3587
  ref_key: "inputRef",
3528
3588
  ref: a,
@@ -3534,18 +3594,18 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3534
3594
  type: "text",
3535
3595
  tabindex: "0",
3536
3596
  "aria-label": "Add tag",
3537
- "onUpdate:modelValue": O[0] || (O[0] = (ue) => u.value = ue),
3597
+ "onUpdate:modelValue": O[0] || (O[0] = (ue) => d.value = ue),
3538
3598
  onFocus: m,
3539
3599
  onBlur: f,
3540
3600
  onKeydown: Q,
3541
3601
  placeholder: v.value && v.value.length ? "" : void 0
3542
- }, null, 40, xr)), [
3543
- [ne, u.value]
3602
+ }, null, 40, Lr)), [
3603
+ [ne, d.value]
3544
3604
  ])
3545
3605
  ])
3546
3606
  ], 512),
3547
- l("div", wr, [
3548
- b.value ? (i(), c("button", {
3607
+ l("div", Sr, [
3608
+ b.value ? (u(), c("button", {
3549
3609
  key: 0,
3550
3610
  type: "button",
3551
3611
  class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
@@ -3561,13 +3621,13 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3561
3621
  }, [
3562
3622
  l("path", { d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" })
3563
3623
  ], -1)
3564
- ]), 8, kr)) : F("", !0)
3624
+ ]), 8, Br)) : z("", !0)
3565
3625
  ])
3566
- ], 10, vr)
3626
+ ], 10, kr)
3567
3627
  ], 2)
3568
3628
  ], 512));
3569
3629
  }
3570
- }), $r = { class: "relative flex gap-1 bg-white w-full" }, Cr = ["disabled", "placeholder"], Vr = /* @__PURE__ */ D({
3630
+ }), Ir = { class: "relative flex gap-1 bg-white w-full" }, zr = ["disabled", "placeholder"], Er = /* @__PURE__ */ A({
3571
3631
  __name: "vs-input-slug",
3572
3632
  props: /* @__PURE__ */ Z({
3573
3633
  disabled: { type: Boolean },
@@ -3581,7 +3641,7 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3581
3641
  setup(o) {
3582
3642
  const e = Me("values"), t = o, n = W(o, "modelValue");
3583
3643
  function s(a) {
3584
- const d = {
3644
+ const i = {
3585
3645
  а: "a",
3586
3646
  б: "b",
3587
3647
  в: "v",
@@ -3620,20 +3680,20 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3620
3680
  ї: "yi",
3621
3681
  ґ: "g"
3622
3682
  };
3623
- return a.toLowerCase().split("").map((u) => d[u] || u).join("").replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
3683
+ return a.toLowerCase().split("").map((d) => i[d] || d).join("").replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
3624
3684
  }
3625
3685
  const r = () => {
3626
- const a = e?.value?.[t.parent || ""]?.toString(), d = s(a);
3627
- n.value = d.toString();
3686
+ const a = e?.value?.[t.parent || ""]?.toString(), i = s(a);
3687
+ n.value = i.toString();
3628
3688
  };
3629
- return (a, d) => (i(), c("div", $r, [
3689
+ return (a, i) => (u(), c("div", Ir, [
3630
3690
  K(l("input", {
3631
3691
  ref: "vsText",
3632
3692
  disabled: a.disabled,
3633
3693
  placeholder: a.placeholder,
3634
- "onUpdate:modelValue": d[0] || (d[0] = (u) => n.value = u),
3694
+ "onUpdate:modelValue": i[0] || (i[0] = (d) => n.value = d),
3635
3695
  class: "block w-full px-3 py-2 text-sm border border-solid rounded-lg placeholder:text-nowrap border-stone-200 text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
3636
- }, null, 8, Cr), [
3696
+ }, null, 8, zr), [
3637
3697
  [ne, n.value]
3638
3698
  ]),
3639
3699
  l("button", {
@@ -3642,13 +3702,13 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3642
3702
  }, " Gen ")
3643
3703
  ]));
3644
3704
  }
3645
- }), Mr = /* @__PURE__ */ N(Vr, [["__scopeId", "data-v-b0eba370"]]), Lr = { class: "w-full" }, Sr = {
3705
+ }), Ar = /* @__PURE__ */ N(Er, [["__scopeId", "data-v-b0eba370"]]), Dr = { class: "w-full" }, Fr = {
3646
3706
  ref: "sortableContainer",
3647
3707
  class: "flex flex-col gap-1"
3648
- }, Br = ["onDragstart", "onDrop"], jr = { class: "w-1/3" }, Ir = { class: "w-2/3" }, zr = ["onClick"], Er = {
3708
+ }, Or = ["onDragstart", "onDrop"], Ur = { class: "w-1/3" }, Tr = { class: "w-2/3" }, Rr = ["onClick"], Pr = {
3649
3709
  key: 0,
3650
3710
  class: "text-[14px] text-gray-700"
3651
- }, Dr = { class: "mt-2 w-full flex items-center" }, Fr = ["disabled"], Or = /* @__PURE__ */ D({
3711
+ }, Hr = { class: "mt-2 w-full flex items-center" }, Nr = ["disabled"], qr = /* @__PURE__ */ A({
3652
3712
  __name: "vs-input-key-value",
3653
3713
  props: {
3654
3714
  parent: {},
@@ -3658,66 +3718,66 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3658
3718
  },
3659
3719
  emits: ["update:modelValue"],
3660
3720
  setup(o, { emit: e }) {
3661
- const t = (C) => `${C}-${Math.random().toString(36).substring(2, 15)}`, n = Me("values"), s = o, r = e, a = s.addButtonText ?? "Додати", d = s.ignore ?? [], u = x([]), v = x(null);
3721
+ const t = (V) => `${V}-${Math.random().toString(36).substring(2, 15)}`, n = Me("values"), s = o, r = e, a = s.addButtonText ?? "Додати", i = s.ignore ?? [], d = x([]), v = x(null);
3662
3722
  (() => {
3663
- const C = s.parent && n?.value?.[s.parent] || s.modelValue || {};
3664
- u.value = Object.entries(C).filter(([E]) => !d.includes(E)).map(([E, j]) => ({
3723
+ const V = s.parent && n?.value?.[s.parent] || s.modelValue || {};
3724
+ d.value = Object.entries(V).filter(([D]) => !i.includes(D)).map(([D, j]) => ({
3665
3725
  id: t("key-value-"),
3666
- key: E,
3726
+ key: D,
3667
3727
  value: j
3668
3728
  }));
3669
3729
  })();
3670
- function w(C) {
3671
- v.value = C;
3730
+ function w(V) {
3731
+ v.value = V;
3672
3732
  }
3673
- function b(C) {
3674
- if (v.value === null || v.value === C) return;
3675
- const E = u.value.splice(v.value, 1)[0];
3676
- u.value.splice(C, 0, E), v.value = null;
3733
+ function b(V) {
3734
+ if (v.value === null || v.value === V) return;
3735
+ const D = d.value.splice(v.value, 1)[0];
3736
+ d.value.splice(V, 0, D), v.value = null;
3677
3737
  }
3678
- const $ = A(
3679
- () => u.value.some((C) => C.key && !C.value || !C.key && C.value)
3738
+ const $ = F(
3739
+ () => d.value.some((V) => V.key && !V.value || !V.key && V.value)
3680
3740
  ), S = () => {
3681
- u.value.push({ id: t("key-value-"), key: "", value: "" });
3682
- }, R = (C) => {
3683
- u.value = u.value.filter((E) => E.id !== C);
3741
+ d.value.push({ id: t("key-value-"), key: "", value: "" });
3742
+ }, R = (V) => {
3743
+ d.value = d.value.filter((D) => D.id !== V);
3684
3744
  };
3685
3745
  return le(
3686
- u,
3687
- (C) => {
3688
- const E = {};
3689
- C.forEach((m) => {
3690
- m.key && m.value !== void 0 && (E[m.key] = m.value);
3746
+ d,
3747
+ (V) => {
3748
+ const D = {};
3749
+ V.forEach((m) => {
3750
+ m.key && m.value !== void 0 && (D[m.key] = m.value);
3691
3751
  });
3692
3752
  const j = {};
3693
- d.length && d.forEach((m) => {
3753
+ i.length && i.forEach((m) => {
3694
3754
  j[m] = s.parent ? n?.value?.[s.parent]?.[m] : void 0;
3695
3755
  }), n?.value && s.parent && (n.value[s.parent] = {
3696
3756
  ...j,
3697
- ...E
3698
- }), r("update:modelValue", E);
3757
+ ...D
3758
+ }), r("update:modelValue", D);
3699
3759
  },
3700
3760
  { deep: !0 }
3701
- ), (C, E) => (i(), c("div", Lr, [
3702
- l("div", Sr, [
3703
- (i(!0), c(Y, null, oe(u.value, (j, m) => (i(), c("div", {
3761
+ ), (V, D) => (u(), c("div", Dr, [
3762
+ l("div", Fr, [
3763
+ (u(!0), c(Y, null, oe(d.value, (j, m) => (u(), c("div", {
3704
3764
  key: j.id,
3705
- class: V(["flex items-center gap-2 w-full", { "opacity-50": v.value === m }]),
3765
+ class: C(["flex items-center gap-2 w-full", { "opacity-50": v.value === m }]),
3706
3766
  draggable: "true",
3707
3767
  onDragstart: (f) => w(m),
3708
- onDragover: E[0] || (E[0] = ve(() => {
3768
+ onDragover: D[0] || (D[0] = ve(() => {
3709
3769
  }, ["prevent"])),
3710
3770
  onDrop: (f) => b(m)
3711
3771
  }, [
3712
- E[1] || (E[1] = ce('<button class="cursor-move" data-v-a0f7fbfc><svg fill="#000000" width="20" height="20" viewBox="0 0 36 36" data-v-a0f7fbfc><circle cx="15" cy="12" r="1.5" data-v-a0f7fbfc></circle><circle cx="15" cy="24" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="12" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="24" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="18" r="1.5" data-v-a0f7fbfc></circle><circle cx="15" cy="18" r="1.5" data-v-a0f7fbfc></circle></svg></button>', 1)),
3713
- l("div", jr, [
3772
+ D[1] || (D[1] = ce('<button class="cursor-move" data-v-a0f7fbfc><svg fill="#000000" width="20" height="20" viewBox="0 0 36 36" data-v-a0f7fbfc><circle cx="15" cy="12" r="1.5" data-v-a0f7fbfc></circle><circle cx="15" cy="24" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="12" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="24" r="1.5" data-v-a0f7fbfc></circle><circle cx="21" cy="18" r="1.5" data-v-a0f7fbfc></circle><circle cx="15" cy="18" r="1.5" data-v-a0f7fbfc></circle></svg></button>', 1)),
3773
+ l("div", Ur, [
3714
3774
  B(Ue, {
3715
3775
  modelValue: j.key,
3716
3776
  "onUpdate:modelValue": (f) => j.key = f,
3717
3777
  placeholder: "Ключ"
3718
3778
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
3719
3779
  ]),
3720
- l("div", Ir, [
3780
+ l("div", Tr, [
3721
3781
  B(Ue, {
3722
3782
  modelValue: j.value,
3723
3783
  "onUpdate:modelValue": (f) => j.value = f,
@@ -3728,31 +3788,31 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3728
3788
  onClick: (f) => R(j.id),
3729
3789
  class: "shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200"
3730
3790
  }, [
3731
- B(q(kl), {
3791
+ B(q(Bl), {
3732
3792
  height: "16",
3733
3793
  width: "16"
3734
3794
  })
3735
- ], 8, zr)
3736
- ], 42, Br))), 128))
3795
+ ], 8, Rr)
3796
+ ], 42, Or))), 128))
3737
3797
  ], 512),
3738
- u.value.length ? F("", !0) : (i(), c("span", Er, " Дані для відображення відсутні ")),
3739
- l("div", Dr, [
3798
+ d.value.length ? z("", !0) : (u(), c("span", Pr, " Дані для відображення відсутні ")),
3799
+ l("div", Hr, [
3740
3800
  l("button", {
3741
3801
  type: "button",
3742
3802
  onClick: S,
3743
3803
  disabled: $.value,
3744
3804
  class: "py-1.5 px-2 flex items-center gap-x-1 text-xs font-medium rounded-full border border-dashed border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"
3745
3805
  }, [
3746
- B(De, {
3806
+ B(Ae, {
3747
3807
  height: "14",
3748
3808
  width: "14"
3749
3809
  }),
3750
- fe(" " + T(q(a)), 1)
3751
- ], 8, Fr)
3810
+ fe(" " + U(q(a)), 1)
3811
+ ], 8, Nr)
3752
3812
  ])
3753
3813
  ]));
3754
3814
  }
3755
- }), Ar = /* @__PURE__ */ N(Or, [["__scopeId", "data-v-a0f7fbfc"]]), Ur = { class: "flex items-center gap-2 w-full" }, Tr = ["disabled"], Rr = /* @__PURE__ */ D({
3815
+ }), Gr = /* @__PURE__ */ N(qr, [["__scopeId", "data-v-a0f7fbfc"]]), Jr = { class: "flex items-center gap-2 w-full" }, Kr = ["disabled"], Zr = /* @__PURE__ */ A({
3756
3816
  __name: "vs-input-color",
3757
3817
  props: {
3758
3818
  style: { default: () => ({}) },
@@ -3765,30 +3825,30 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3765
3825
  },
3766
3826
  emits: ["update:modelValue"],
3767
3827
  setup(o, { emit: e }) {
3768
- const t = o, { inputClass: n } = me(t.style), s = e, r = A({
3828
+ const t = o, { inputClass: n } = he(t.style), s = e, r = F({
3769
3829
  get: () => t.modelValue || "#000000",
3770
3830
  set: (a) => s("update:modelValue", a)
3771
3831
  });
3772
- return (a, d) => (i(), c("div", Ur, [
3832
+ return (a, i) => (u(), c("div", Jr, [
3773
3833
  K(l("input", {
3774
3834
  type: "color",
3775
- "onUpdate:modelValue": d[0] || (d[0] = (u) => r.value = u),
3835
+ "onUpdate:modelValue": i[0] || (i[0] = (d) => r.value = d),
3776
3836
  disabled: a.disabled,
3777
3837
  ref: "color",
3778
- class: V(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]", [a.modelValue ? "" : "text-opacity-50", q(n)].join(" ")]),
3838
+ class: C(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]", [a.modelValue ? "" : "text-opacity-50", q(n)].join(" ")]),
3779
3839
  style: { border: "1px solid #CFD9E0" }
3780
- }, null, 10, Tr), [
3840
+ }, null, 10, Kr), [
3781
3841
  [ne, r.value]
3782
3842
  ]),
3783
3843
  K(l("input", {
3784
3844
  class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2",
3785
- "onUpdate:modelValue": d[1] || (d[1] = (u) => r.value = u)
3845
+ "onUpdate:modelValue": i[1] || (i[1] = (d) => r.value = d)
3786
3846
  }, null, 512), [
3787
3847
  [ne, r.value]
3788
3848
  ])
3789
3849
  ]));
3790
3850
  }
3791
- }), Pr = { class: "flex items-center gap-2 w-full" }, Hr = ["min", "max", "step", "disabled"], Nr = /* @__PURE__ */ D({
3851
+ }), Wr = { class: "flex items-center gap-2 w-full" }, Qr = ["min", "max", "step", "disabled"], Xr = /* @__PURE__ */ A({
3792
3852
  __name: "vs-input-range",
3793
3853
  props: {
3794
3854
  style: { default: () => ({}) },
@@ -3804,59 +3864,59 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3804
3864
  },
3805
3865
  emits: ["update:modelValue"],
3806
3866
  setup(o, { emit: e }) {
3807
- const t = o, { inputClass: n } = me(t.style), s = e, r = A({
3867
+ const t = o, { inputClass: n } = he(t.style), s = e, r = F({
3808
3868
  get: () => Number(t.modelValue ?? t.min),
3809
3869
  set: (a) => s("update:modelValue", Number(a))
3810
3870
  });
3811
- return (a, d) => (i(), c("div", Pr, [
3871
+ return (a, i) => (u(), c("div", Wr, [
3812
3872
  K(l("input", {
3813
3873
  type: "range",
3814
- "onUpdate:modelValue": d[0] || (d[0] = (u) => r.value = u),
3874
+ "onUpdate:modelValue": i[0] || (i[0] = (d) => r.value = d),
3815
3875
  min: a.min,
3816
3876
  max: a.max,
3817
3877
  step: a.step,
3818
3878
  disabled: a.disabled,
3819
3879
  ref: "range",
3820
- class: V(["w-full cursor-pointer accent-blue-500", [a.modelValue ? "" : "text-opacity-50", q(n)].join(" ")])
3821
- }, null, 10, Hr), [
3880
+ class: C(["w-full cursor-pointer accent-blue-500", [a.modelValue ? "" : "text-opacity-50", q(n)].join(" ")])
3881
+ }, null, 10, Qr), [
3822
3882
  [ne, r.value]
3823
3883
  ]),
3824
3884
  K(l("input", {
3825
3885
  class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2 max-w-[100px]",
3826
3886
  type: "number",
3827
- "onUpdate:modelValue": d[1] || (d[1] = (u) => r.value = u)
3887
+ "onUpdate:modelValue": i[1] || (i[1] = (d) => r.value = d)
3828
3888
  }, null, 512), [
3829
3889
  [ne, r.value]
3830
3890
  ])
3831
3891
  ]));
3832
3892
  }
3833
- }), qr = {
3893
+ }), Yr = {
3834
3894
  VsInputText: Ue,
3835
3895
  VsInputRadio: rt,
3836
3896
  "vs-input-text": Ue,
3837
- "vs-input-password": Wt,
3838
- "vs-input-textarea": Qa,
3839
- "vs-input-mask": zl,
3840
- "vs-input-number": Yt,
3897
+ "vs-input-password": al,
3898
+ "vs-input-textarea": ss,
3899
+ "vs-input-mask": Rl,
3900
+ "vs-input-number": rl,
3841
3901
  "vs-input-radio": rt,
3842
- "vs-input-select": Za,
3902
+ "vs-input-select": os,
3843
3903
  "vs-input-switcher": bt,
3844
3904
  "vs-input-static": nt,
3845
- "vs-input-container": Ea,
3846
- "vs-input-date": Jl,
3847
- "vs-input-checkbox": ql,
3848
- "vs-input-file": zo,
3905
+ "vs-input-container": Pa,
3906
+ "vs-input-date": to,
3907
+ "vs-input-checkbox": Yl,
3908
+ "vs-input-file": Ro,
3849
3909
  "vs-input-html": nt,
3850
- "vs-input-email": Fl,
3851
- "vs-input-datatable": Xs,
3852
- "vs-input-map": fr,
3853
- "vs-input-file-list": ua,
3854
- "vs-input-tag": _r,
3855
- "vs-input-slug": Mr,
3856
- "vs-input-key-value": Ar,
3857
- "vs-input-range": Nr,
3858
- "vs-input-color": Rr
3859
- }, Gr = /* @__PURE__ */ D({
3910
+ "vs-input-email": Nl,
3911
+ "vs-input-datatable": nn,
3912
+ "vs-input-map": wr,
3913
+ "vs-input-file-list": ga,
3914
+ "vs-input-tag": jr,
3915
+ "vs-input-slug": Ar,
3916
+ "vs-input-key-value": Gr,
3917
+ "vs-input-range": Xr,
3918
+ "vs-input-color": Zr
3919
+ }, ei = /* @__PURE__ */ A({
3860
3920
  __name: "behavior",
3861
3921
  props: {
3862
3922
  api: {},
@@ -3872,23 +3932,23 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3872
3932
  if (!e.api) return;
3873
3933
  const s = e.api.replace("{{value}}", e.value), r = await fetch(s);
3874
3934
  if (!r.ok) {
3875
- be({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
3935
+ ye({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
3876
3936
  return;
3877
3937
  }
3878
3938
  const a = await r.json();
3879
3939
  if (!e.set || !t) return;
3880
- for (const [d, u] of Object.entries(e.set))
3881
- t.value[d] = a.result[u];
3940
+ for (const [i, d] of Object.entries(e.set))
3941
+ t.value[i] = a.result[d];
3882
3942
  } catch (s) {
3883
3943
  console.error(e.error, s);
3884
3944
  }
3885
3945
  }
3886
- return (s, r) => (i(), c("button", {
3946
+ return (s, r) => (u(), c("button", {
3887
3947
  onClick: n,
3888
3948
  class: "vs-button relative inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-blue-500 hover:border-blue-500 hover:bg-blue-500 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 ml-0 md:ml-2 mt-2 md:mt-0 py-[8px] md:w-2/4 whitespace-nowrap w-full"
3889
- }, T(s.button), 1));
3949
+ }, U(s.button), 1));
3890
3950
  }
3891
- }), wt = /* @__PURE__ */ D({
3951
+ }), wt = /* @__PURE__ */ A({
3892
3952
  __name: "vs-compact-form-layout",
3893
3953
  props: /* @__PURE__ */ Z({
3894
3954
  item: { default: {} },
@@ -3902,32 +3962,32 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3902
3962
  }),
3903
3963
  emits: ["update:modelValue"],
3904
3964
  setup(o) {
3905
- const e = o, t = W(o, "modelValue"), n = A(() => Kt[`${e.layout}`]), s = A(() => qr?.[`vs-input-${e.item.type}`]), r = A(() => {
3906
- const d = q(s);
3965
+ const e = o, t = W(o, "modelValue"), n = F(() => ll[`${e.layout}`]), s = F(() => Yr?.[`vs-input-${e.item.type}`]), r = F(() => {
3966
+ const i = q(s);
3967
+ if (!i) return /* @__PURE__ */ new Set();
3968
+ const d = i.props ?? i.__vccOpts?.props;
3907
3969
  if (!d) return /* @__PURE__ */ new Set();
3908
- const u = d.props ?? d.__vccOpts?.props;
3909
- if (!u) return /* @__PURE__ */ new Set();
3910
- const v = Array.isArray(u) ? u : Object.keys(u);
3970
+ const v = Array.isArray(d) ? d : Object.keys(d);
3911
3971
  return new Set(v);
3912
- }), a = A(() => {
3913
- const d = e.item ?? {}, u = r.value;
3914
- return u.size ? Object.fromEntries(Object.entries(d).filter(([v]) => u.has(v))) : {};
3972
+ }), a = F(() => {
3973
+ const i = e.item ?? {}, d = r.value;
3974
+ return d.size ? Object.fromEntries(Object.entries(i).filter(([v]) => d.has(v))) : {};
3915
3975
  });
3916
- return (d, u) => (i(), se(Be(n.value), {
3976
+ return (i, d) => (u(), se(Be(n.value), {
3917
3977
  ua: e.item.ua,
3918
3978
  error: e.error || "",
3919
- item: d.item,
3979
+ item: i.item,
3920
3980
  label: e.item.label
3921
3981
  }, {
3922
3982
  default: Le(() => [
3923
3983
  l("div", {
3924
- class: V(["flex w-full", `${e.item.type}-component`])
3984
+ class: C(["flex w-full", `${e.item.type}-component`])
3925
3985
  }, [
3926
- (i(), se(Be(s.value), Ee(a.value, {
3986
+ (u(), se(Be(s.value), Ee(a.value, {
3927
3987
  modelValue: t.value,
3928
- "onUpdate:modelValue": u[0] || (u[0] = (v) => t.value = v)
3988
+ "onUpdate:modelValue": d[0] || (d[0] = (v) => t.value = v)
3929
3989
  }), null, 16, ["modelValue"])),
3930
- d.item.behavior?.api && d.item.behavior?.button ? (i(), se(Gr, Ee({ key: 0 }, d.item.behavior, { value: t.value }), null, 16, ["value"])) : F("", !0)
3990
+ i.item.behavior?.api && i.item.behavior?.button ? (u(), se(ei, Ee({ key: 0 }, i.item.behavior, { value: t.value }), null, 16, ["value"])) : z("", !0)
3931
3991
  ], 2)
3932
3992
  ]),
3933
3993
  _: 1
@@ -3936,23 +3996,23 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3936
3996
  }), kt = {
3937
3997
  required: "Це поле є обов’язковим",
3938
3998
  email: "Неправильний email"
3939
- }, Jr = (o) => o ? !1 : kt.required, Kr = (o) => !o && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o) ? kt.email : !1, Zr = (o, e) => {
3999
+ }, ti = (o) => o ? !1 : kt.required, li = (o) => !o && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o) ? kt.email : !1, oi = (o, e) => {
3940
4000
  const t = e.pattern ?? e.regexp;
3941
4001
  return !(typeof t == "string" ? new RegExp(t) : t).test(o) && o ? e.message : !1;
3942
- }, Wr = (o, e) => !1, Qr = (o, e) => {
4002
+ }, ai = (o, e) => !1, si = (o, e) => {
3943
4003
  switch (typeof e == "string" ? e : e.type) {
3944
4004
  case "required":
3945
- return Jr(o);
4005
+ return ti(o);
3946
4006
  case "email":
3947
- return Kr(o);
4007
+ return li(o);
3948
4008
  case "regexp":
3949
- return Zr(o, e);
4009
+ return oi(o, e);
3950
4010
  case "custom":
3951
- return Wr();
4011
+ return ai();
3952
4012
  default:
3953
4013
  return !1;
3954
4014
  }
3955
- }, Xr = {
4015
+ }, ni = {
3956
4016
  autocomplete: "select",
3957
4017
  combobox: "select",
3958
4018
  datepicker: "date",
@@ -3966,9 +4026,9 @@ const wn = /* @__PURE__ */ N(bn, [["render", xn]]), kn = { class: "form-geom__se
3966
4026
  };
3967
4027
  function ct(o) {
3968
4028
  const e = o.toLowerCase();
3969
- return Xr[e] || e;
4029
+ return ni[e] || e;
3970
4030
  }
3971
- function Yr(o) {
4031
+ function ri(o) {
3972
4032
  if (Array.isArray(o)) {
3973
4033
  const t = [];
3974
4034
  return o.forEach((n) => {
@@ -3988,27 +4048,27 @@ function Yr(o) {
3988
4048
  t[1].type.includes("list") && (n.multiple = !0), !n.api && t[1].data && (n.api = `/api/suggest/${t[1].data}`), e.push(n);
3989
4049
  }), e;
3990
4050
  }
3991
- function ei(o, e) {
3992
- const t = Yr(e), n = x({});
3993
- function s(u) {
3994
- const v = u?.conditions;
4051
+ function ii(o, e) {
4052
+ const t = ri(e), n = x({});
4053
+ function s(d) {
4054
+ const v = d?.conditions;
3995
4055
  if (!v) return !0;
3996
4056
  const p = Array.isArray(v) ? v[0] : v, w = o?.value?.[p];
3997
4057
  return xt(w, v);
3998
4058
  }
3999
- const r = (u = t, v = !0) => (u.forEach((p) => {
4059
+ const r = (d = t, v = !0) => (d.forEach((p) => {
4000
4060
  if (p.rules) {
4001
4061
  if (!s(p)) {
4002
4062
  delete n.value[p.name];
4003
4063
  return;
4004
4064
  }
4005
4065
  p.rules.forEach((w) => {
4006
- const b = Qr(o.value[p.name], w);
4066
+ const b = si(o.value[p.name], w);
4007
4067
  b ? n.value[p.name] = b : delete n.value[p.name];
4008
4068
  });
4009
4069
  }
4010
4070
  p.schema && r(p.schema, !1);
4011
- }), v && Object.values(n.value).some(Boolean) ? n.value : null), a = A(() => t?.filter((u) => s(u)));
4071
+ }), v && Object.values(n.value).some(Boolean) ? n.value : null), a = F(() => t?.filter((d) => s(d)));
4012
4072
  return {
4013
4073
  errors: n,
4014
4074
  validate: r,
@@ -4018,7 +4078,7 @@ function ei(o, e) {
4018
4078
  visibleSchema: a
4019
4079
  };
4020
4080
  }
4021
- const Fe = /* @__PURE__ */ D({
4081
+ const De = /* @__PURE__ */ A({
4022
4082
  __name: "vs-compact-form",
4023
4083
  props: /* @__PURE__ */ Z({
4024
4084
  schema: { default: () => [] },
@@ -4035,46 +4095,46 @@ const Fe = /* @__PURE__ */ D({
4035
4095
  emits: /* @__PURE__ */ Z(["handle-submit", "update:modelValue"], ["update:form", "update:values"]),
4036
4096
  setup(o, { expose: e, emit: t }) {
4037
4097
  const n = t, s = o, r = W(o, "form"), a = W(o, "values"), {
4038
- errors: d,
4039
- validate: u,
4098
+ errors: i,
4099
+ validate: d,
4040
4100
  reset: v,
4041
4101
  visibleSchema: p
4042
- } = ei(a, s.schema), w = () => {
4043
- n("update:modelValue", a.value), u(), n("handle-submit", a.value);
4102
+ } = ii(a, s.schema), w = () => {
4103
+ n("update:modelValue", a.value), d(), n("handle-submit", a.value);
4044
4104
  };
4045
4105
  e({
4046
- validate: u,
4106
+ validate: d,
4047
4107
  reset: v,
4048
- errors: d
4049
- }), xe(() => {
4050
- s.modelValue && (a.value = s.modelValue), r.value.value = a.value, r.value.errors = d.value, r.value.reset = v, r.value.validate = u, r.value.formId = s.formId;
4108
+ errors: i
4109
+ }), me(() => {
4110
+ s.modelValue && (a.value = s.modelValue), r.value.value = a.value, r.value.errors = i.value, r.value.reset = v, r.value.validate = d, r.value.formId = s.formId;
4051
4111
  });
4052
4112
  function b($, S) {
4053
4113
  if ($ === S) return !0;
4054
4114
  if (typeof $ != "object" || typeof S != "object" || !$ || !S) return !1;
4055
- const R = Object.keys($), C = Object.keys(S);
4056
- return R.length !== C.length ? !1 : R.every((E) => $[E] === S[E]);
4115
+ const R = Object.keys($), V = Object.keys(S);
4116
+ return R.length !== V.length ? !1 : R.every((D) => $[D] === S[D]);
4057
4117
  }
4058
- return st("form", r), st("values", a), ($, S) => (i(), c("form", {
4118
+ return st("form", r), st("values", a), ($, S) => (u(), c("form", {
4059
4119
  onSubmit: ve(w, ["prevent"]),
4060
- class: V(["grid grid-cols-12", $.layout === "default" ? "gap-6" : "gap-4"])
4120
+ class: C(["grid grid-cols-12", $.layout === "default" ? "gap-6" : "gap-4"])
4061
4121
  }, [
4062
- (i(!0), c(Y, null, oe(q(p), (R) => (i(), se(wt, {
4122
+ (u(!0), c(Y, null, oe(q(p), (R) => (u(), se(wt, {
4063
4123
  key: R.name,
4064
- class: V($.layout === "horizontal" ? "col-span-12" : `col-span-${R.col || 12} `),
4065
- style: ye($.style),
4124
+ class: C($.layout === "horizontal" ? "col-span-12" : `col-span-${R.col || 12} `),
4125
+ style: xe($.style),
4066
4126
  item: R,
4067
4127
  layout: $.layout,
4068
4128
  "model-value": a.value[R.name],
4069
- "onUpdate:modelValue": (C) => {
4070
- const E = a.value[R.name];
4071
- b(E, C) || (a.value[R.name] = C);
4129
+ "onUpdate:modelValue": (V) => {
4130
+ const D = a.value[R.name];
4131
+ b(D, V) || (a.value[R.name] = V);
4072
4132
  },
4073
- error: q(d)[R.name]
4133
+ error: q(i)[R.name]
4074
4134
  }, null, 8, ["class", "style", "item", "layout", "model-value", "onUpdate:modelValue", "error"]))), 128))
4075
4135
  ], 34));
4076
4136
  }
4077
- }), ti = { class: "relative" }, li = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, oi = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12" }, ai = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, si = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, ni = { class: "p-4 mim-h-0 h-full overflow-auto" }, ri = /* @__PURE__ */ D({
4137
+ }), ui = { class: "relative" }, di = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, ci = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12" }, pi = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, fi = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, vi = { class: "p-4 mim-h-0 h-full overflow-auto" }, mi = /* @__PURE__ */ A({
4078
4138
  __name: "modal-edit",
4079
4139
  props: {
4080
4140
  schema: {},
@@ -4085,47 +4145,47 @@ const Fe = /* @__PURE__ */ D({
4085
4145
  },
4086
4146
  emits: ["close", "save", "edit"],
4087
4147
  setup(o, { emit: e }) {
4088
- const t = o, n = e, s = x(t.schema), r = x(t.defaultValue ? JSON.parse(JSON.stringify(t.defaultValue)) : {}), a = x({}), d = x(), u = x(t.mode);
4148
+ const t = o, n = e, s = x(t.schema), r = x(t.defaultValue ? JSON.parse(JSON.stringify(t.defaultValue)) : {}), a = x({}), i = x(), d = x(t.mode);
4089
4149
  async function v() {
4090
4150
  const w = a.value.validate();
4091
4151
  if (w) {
4092
- be({ type: "warning", title: "Помилка валідації", message: Object.entries(w).map(([b, $]) => `${b}: ${$}`).join(`
4152
+ ye({ type: "warning", title: "Помилка валідації", message: Object.entries(w).map(([b, $]) => `${b}: ${$}`).join(`
4093
4153
  `) });
4094
4154
  return;
4095
4155
  }
4096
- if (d.value)
4156
+ if (i.value)
4097
4157
  try {
4098
- const b = await fetch(`/api/table/${d.value}`, {
4099
- method: u.value === "add" ? "POST" : "PUT",
4158
+ const b = await fetch(`/api/table/${i.value}`, {
4159
+ method: d.value === "add" ? "POST" : "PUT",
4100
4160
  headers: {
4101
4161
  "Content-Type": "application/json"
4102
4162
  },
4103
4163
  body: JSON.stringify(r.value)
4104
4164
  });
4105
4165
  if (b.ok)
4106
- await b.json(), be({
4166
+ await b.json(), ye({
4107
4167
  type: "success",
4108
4168
  title: "Успішно",
4109
- message: `Дані успішно ${u.value === "add" ? "збережено" : "оновлено"}`
4169
+ message: `Дані успішно ${d.value === "add" ? "збережено" : "оновлено"}`
4110
4170
  }), n("save", r.value);
4111
4171
  else if (b.status === 400) {
4112
4172
  const $ = await b.json().catch(() => ({}));
4113
- be({
4173
+ ye({
4114
4174
  type: "warning",
4115
4175
  title: "Помилка валідації",
4116
4176
  message: $.message || "Некоректні дані (400)"
4117
4177
  });
4118
- } else b.status === 500 ? be({
4178
+ } else b.status === 500 ? ye({
4119
4179
  type: "error",
4120
4180
  title: "Серверна помилка",
4121
4181
  message: "Виникла помилка на сервері (500)"
4122
- }) : be({
4182
+ }) : ye({
4123
4183
  type: "error",
4124
4184
  title: "Помилка",
4125
4185
  message: `Статус: ${b.status}`
4126
4186
  });
4127
4187
  } catch (b) {
4128
- be({
4188
+ ye({
4129
4189
  type: "error",
4130
4190
  title: "Помилка з’єднання",
4131
4191
  message: b.message || "Не вдалося виконати запит"
@@ -4135,20 +4195,20 @@ const Fe = /* @__PURE__ */ D({
4135
4195
  function p() {
4136
4196
  n("close");
4137
4197
  }
4138
- return xe(async () => {
4198
+ return me(async () => {
4139
4199
  if (t.form) {
4140
4200
  const w = await fetch(`/api/template/form/${t.form}`).then((b) => b.json());
4141
- s.value = w.schema, d.value = w.token;
4201
+ s.value = w.schema, i.value = w.token;
4142
4202
  } else if (t.token) {
4143
- d.value = t.token;
4144
- const w = await fetch(`/api/form/${d.value}`).then((b) => b.json());
4145
- s.value = w.schema, w.data ? r.value = w.data : u.value = "add";
4203
+ i.value = t.token;
4204
+ const w = await fetch(`/api/form/${i.value}`).then((b) => b.json());
4205
+ s.value = w.schema, w.data ? r.value = w.data : d.value = "add";
4146
4206
  }
4147
- }), (w, b) => (i(), c("div", ti, [
4148
- l("div", li, [
4149
- l("div", oi, [
4150
- l("div", ai, [
4151
- l("h3", si, T(u.value === "add" ? "Додати" : "Змінити"), 1),
4207
+ }), (w, b) => (u(), c("div", ui, [
4208
+ l("div", di, [
4209
+ l("div", ci, [
4210
+ l("div", pi, [
4211
+ l("h3", fi, U(d.value === "add" ? "Додати" : "Змінити"), 1),
4152
4212
  l("button", {
4153
4213
  onClick: p,
4154
4214
  type: "button",
@@ -4172,15 +4232,15 @@ const Fe = /* @__PURE__ */ D({
4172
4232
  ], -1)
4173
4233
  ]))
4174
4234
  ]),
4175
- l("div", ni, [
4176
- s.value ? (i(), se(Fe, {
4235
+ l("div", vi, [
4236
+ s.value ? (u(), se(De, {
4177
4237
  key: 0,
4178
4238
  schema: s.value,
4179
4239
  values: r.value,
4180
4240
  "onUpdate:values": b[0] || (b[0] = ($) => r.value = $),
4181
4241
  form: a.value,
4182
4242
  "onUpdate:form": b[1] || (b[1] = ($) => a.value = $)
4183
- }, null, 8, ["schema", "values", "form"])) : F("", !0)
4243
+ }, null, 8, ["schema", "values", "form"])) : z("", !0)
4184
4244
  ]),
4185
4245
  l("div", { class: "vs-form__head mr-5 mb-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, [
4186
4246
  l("button", {
@@ -4205,7 +4265,7 @@ const Fe = /* @__PURE__ */ D({
4205
4265
  visible: !0,
4206
4266
  size: "medium",
4207
4267
  closeClickBack: !0,
4208
- content: ri,
4268
+ content: mi,
4209
4269
  contentProps: {
4210
4270
  ...o,
4211
4271
  onClose: () => {
@@ -4217,35 +4277,35 @@ const Fe = /* @__PURE__ */ D({
4217
4277
  }
4218
4278
  });
4219
4279
  });
4220
- Fe.install = function(e) {
4221
- e.component("VForm", Fe), Object.assign(e.config.globalProperties, {
4280
+ De.install = function(e) {
4281
+ e.component("VForm", De), Object.assign(e.config.globalProperties, {
4222
4282
  $form: pt
4223
4283
  }), e.provide("form", pt), window.v3plugin || (window.v3plugin = {});
4224
4284
  };
4225
4285
  export {
4226
- ri as ModalEdit,
4227
- Fe as VForm,
4228
- ql as VsInputCheckbox,
4229
- Rr as VsInputColor,
4230
- Ea as VsInputContainer,
4231
- Jl as VsInputDate,
4232
- Fl as VsInputEmail,
4233
- zo as VsInputFile,
4234
- ua as VsInputFileList,
4235
- Ar as VsInputKeyValue,
4236
- zl as VsInputMask,
4237
- Yt as VsInputNumber,
4286
+ mi as ModalEdit,
4287
+ De as VForm,
4288
+ Yl as VsInputCheckbox,
4289
+ Zr as VsInputColor,
4290
+ Pa as VsInputContainer,
4291
+ to as VsInputDate,
4292
+ Nl as VsInputEmail,
4293
+ Ro as VsInputFile,
4294
+ ga as VsInputFileList,
4295
+ Gr as VsInputKeyValue,
4296
+ Rl as VsInputMask,
4297
+ rl as VsInputNumber,
4238
4298
  rt as VsInputRadio,
4239
- Nr as VsInputRange,
4240
- Za as VsInputSelect,
4241
- Mr as VsInputSlug,
4299
+ Xr as VsInputRange,
4300
+ os as VsInputSelect,
4301
+ Ar as VsInputSlug,
4242
4302
  nt as VsInputStatic,
4243
4303
  bt as VsInputSwitcher,
4244
- _r as VsInputTag,
4304
+ jr as VsInputTag,
4245
4305
  Ue as VsInputText,
4246
- Qa as VsInputTextarea,
4247
- Fe as default,
4248
- qr as inputs,
4249
- Xs as vsInputDatatable,
4250
- fr as vsInputMap
4306
+ ss as VsInputTextarea,
4307
+ De as default,
4308
+ Yr as inputs,
4309
+ nn as vsInputDatatable,
4310
+ wr as vsInputMap
4251
4311
  };