@opengis/form 0.0.53 → 0.0.55

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 U, ref as k, onMounted as _e, onUnmounted as Xe, createElementBlock as d, openBlock as i, createCommentVNode as D, renderSlot as Se, createElementVNode as l, toDisplayString as G, mergeProps as Te, computed as B, normalizeStyle as be, createTextVNode as ge, normalizeProps as ot, guardReactiveProps as nt, normalizeClass as E, mergeModels as ie, useModel as de, withDirectives as ae, unref as ee, vModelText as ve, vModelCheckbox as Ct, createVNode as A, createBlock as me, resolveDynamicComponent as Fe, withCtx as Ee, withModifiers as ke, onBeforeUnmount as at, watch as ue, createStaticVNode as ye, vModelRadio as Vt, Fragment as re, renderList as fe, reactive as Nt, vModelDynamic as qt, vShow as Qe, inject as Ae, resolveComponent as mt, Transition as st, nextTick as je, Teleport as Mt, getCurrentInstance as Wt, watchEffect as Gt, toRef as Zt, provide as vt } from "vue";
2
- import { notify as ce, VsModal as Lt, modal as Kt } from "@opengis/core";
3
- const Jt = { class: "w-full relative" }, Yt = {
1
+ import { defineComponent as U, ref as k, onMounted as _e, onUnmounted as Xe, createElementBlock as d, openBlock as i, createCommentVNode as F, renderSlot as Se, createElementVNode as l, toDisplayString as G, mergeProps as Te, computed as B, normalizeStyle as be, createTextVNode as ge, normalizeProps as ot, guardReactiveProps as nt, normalizeClass as E, mergeModels as ie, useModel as de, withDirectives as ne, unref as ee, vModelText as me, vModelCheckbox as St, createVNode as T, createBlock as ve, resolveDynamicComponent as Fe, withCtx as Ee, withModifiers as ke, onBeforeUnmount as at, watch as ue, createStaticVNode as ye, vModelRadio as Bt, Fragment as re, renderList as fe, reactive as qt, vModelDynamic as Wt, vShow as Qe, inject as Ae, resolveComponent as bt, Transition as st, nextTick as je, Teleport as jt, getCurrentInstance as Gt, watchEffect as Kt, toRef as Zt, provide as yt } from "vue";
2
+ import { notify as ce, VsModal as Et, modal as Jt } from "@opengis/core";
3
+ const Yt = { class: "w-full relative" }, Xt = {
4
4
  key: 0,
5
5
  class: "text-[14px] font-medium text-gray-900 mb-2"
6
- }, Xt = { class: "opacity-100" }, Qt = {
6
+ }, Qt = { class: "opacity-100" }, el = {
7
7
  key: 0,
8
8
  class: "text-red-500 text-[14px]"
9
- }, el = {
9
+ }, tl = {
10
10
  key: 1,
11
11
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
12
- }, tl = /* @__PURE__ */ U({
12
+ }, ll = /* @__PURE__ */ U({
13
13
  __name: "vs-layout-default",
14
14
  props: {
15
15
  ua: { default: "" },
@@ -31,24 +31,24 @@ const Jt = { class: "w-full relative" }, Yt = {
31
31
  e.value = localStorage.locale, window.addEventListener("storage", t);
32
32
  }), Xe(() => {
33
33
  window.removeEventListener("resize", t);
34
- }), (a, n) => (i(), d("div", Jt, [
35
- a.ua || a.label ? (i(), d("div", Yt, [
36
- l("span", Xt, G(a.item[e.value] || a.ua || a.label), 1),
37
- a.item?.rules?.includes("required") ? (i(), d("span", Qt, "*")) : D("", !0)
38
- ])) : D("", !0),
34
+ }), (a, n) => (i(), d("div", Yt, [
35
+ a.ua || a.label ? (i(), d("div", Xt, [
36
+ l("span", Qt, G(a.item[e.value] || a.ua || a.label), 1),
37
+ a.item?.rules?.includes("required") ? (i(), d("span", el, "*")) : F("", !0)
38
+ ])) : F("", !0),
39
39
  Se(a.$slots, "default", Te(a.$attrs, {
40
40
  class: { "opacity-60": a.item.disabled }
41
41
  })),
42
- a.error ? (i(), d("span", el, G(a.error), 1)) : D("", !0)
42
+ a.error ? (i(), d("span", tl, G(a.error), 1)) : F("", !0)
43
43
  ]));
44
44
  }
45
- }), ll = { class: "w-full relative flex flex-row items-center gap-2" }, ol = {
45
+ }), ol = { class: "w-full relative flex flex-row items-center gap-2" }, nl = {
46
46
  key: 0,
47
47
  class: "text-red-500 text-[14px]"
48
- }, nl = {
48
+ }, al = {
49
49
  key: 1,
50
50
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
51
- }, al = /* @__PURE__ */ U({
51
+ }, sl = /* @__PURE__ */ U({
52
52
  __name: "vs-layout-horizontal",
53
53
  props: {
54
54
  ua: { default: "" },
@@ -80,28 +80,28 @@ const Jt = { class: "w-full relative" }, Yt = {
80
80
  const f = `${p * 100}%`;
81
81
  return { flexBasis: f, maxWidth: f };
82
82
  });
83
- return (u, c) => (i(), d("div", ll, [
83
+ return (u, c) => (i(), d("div", ol, [
84
84
  n.value ? (i(), d("span", {
85
85
  key: 0,
86
86
  class: "text-sm text-gray-900 font-medium flex shrink-0",
87
87
  style: be(s.value)
88
88
  }, [
89
89
  ge(G(u.ua || u.label) + " ", 1),
90
- u.item?.rules?.includes("required") && (u.ua || u.label) ? (i(), d("span", ol, "*")) : D("", !0)
91
- ], 4)) : D("", !0),
90
+ u.item?.rules?.includes("required") && (u.ua || u.label) ? (i(), d("span", nl, "*")) : F("", !0)
91
+ ], 4)) : F("", !0),
92
92
  l("div", {
93
93
  class: "flex-1 min-w-0",
94
94
  style: be(r.value)
95
95
  }, [
96
96
  Se(u.$slots, "default", ot(nt(u.$attrs)))
97
97
  ], 4),
98
- u.error ? (i(), d("span", nl, G(u.error), 1)) : D("", !0)
98
+ u.error ? (i(), d("span", al, G(u.error), 1)) : F("", !0)
99
99
  ]));
100
100
  }
101
- }), sl = { class: "w-full relative" }, rl = {
101
+ }), rl = { class: "w-full relative" }, il = {
102
102
  key: 0,
103
103
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
104
- }, il = /* @__PURE__ */ U({
104
+ }, ul = /* @__PURE__ */ U({
105
105
  __name: "vs-layout-inline",
106
106
  props: {
107
107
  ua: { default: "" },
@@ -116,24 +116,24 @@ const Jt = { class: "w-full relative" }, Yt = {
116
116
  columns: {}
117
117
  },
118
118
  setup(o) {
119
- return (e, t) => (i(), d("div", sl, [
119
+ return (e, t) => (i(), d("div", rl, [
120
120
  Se(e.$slots, "default", ot(nt(e.$attrs))),
121
- e.error ? (i(), d("span", rl, G(e.error), 1)) : D("", !0)
121
+ e.error ? (i(), d("span", il, G(e.error), 1)) : F("", !0)
122
122
  ]));
123
123
  }
124
- }), ul = { class: "flex-1 min-w-0" }, dl = {
124
+ }), dl = { class: "flex-1 min-w-0" }, cl = {
125
125
  key: 0,
126
126
  class: "text-sm font-medium text-slate-700 dark:text-slate-200 flex items-center gap-1"
127
- }, cl = { class: "truncate" }, pl = {
127
+ }, pl = { class: "truncate" }, fl = {
128
128
  key: 0,
129
129
  class: "text-red-500 text-[14px]"
130
- }, fl = {
130
+ }, ml = {
131
131
  key: 1,
132
132
  class: "text-xs text-slate-500 dark:text-slate-400"
133
- }, ml = { class: "w-full md:w-auto" }, vl = {
133
+ }, vl = { class: "w-full md:w-auto" }, hl = {
134
134
  key: 0,
135
135
  class: "mt-1 text-xs text-red-500"
136
- }, hl = /* @__PURE__ */ U({
136
+ }, gl = /* @__PURE__ */ U({
137
137
  __name: "vs-layout-settings",
138
138
  props: {
139
139
  ua: { default: "" },
@@ -167,25 +167,25 @@ const Jt = { class: "w-full relative" }, Yt = {
167
167
  l("div", {
168
168
  class: E(["gap-2 md:flex-row md:items-center md:justify-between", [["switcher", "native-select"].includes(u.item.type) ? "flex flex-col" : ""]])
169
169
  }, [
170
- l("div", ul, [
171
- u.ua || u.label ? (i(), d("p", dl, [
172
- l("span", cl, G(u.item[t.value] || u.ua || u.label), 1),
173
- n.value ? (i(), d("span", pl, "*")) : D("", !0)
174
- ])) : D("", !0),
175
- a.value ? (i(), d("p", fl, G(a.value), 1)) : D("", !0)
170
+ l("div", dl, [
171
+ u.ua || u.label ? (i(), d("p", cl, [
172
+ l("span", pl, G(u.item[t.value] || u.ua || u.label), 1),
173
+ n.value ? (i(), d("span", fl, "*")) : F("", !0)
174
+ ])) : F("", !0),
175
+ a.value ? (i(), d("p", ml, G(a.value), 1)) : F("", !0)
176
176
  ]),
177
- l("div", ml, [
177
+ l("div", vl, [
178
178
  Se(u.$slots, "default", ot(nt(u.$attrs)))
179
179
  ])
180
180
  ], 2),
181
- s.value ? (i(), d("p", vl, G(s.value), 1)) : D("", !0)
181
+ s.value ? (i(), d("p", hl, G(s.value), 1)) : F("", !0)
182
182
  ], 2));
183
183
  }
184
- }), gl = {
185
- default: tl,
186
- horizontal: al,
187
- inline: il,
188
- settings: hl
184
+ }), bl = {
185
+ default: ll,
186
+ horizontal: sl,
187
+ inline: ul,
188
+ settings: gl
189
189
  };
190
190
  function $e(o) {
191
191
  return {
@@ -195,7 +195,7 @@ function $e(o) {
195
195
  })
196
196
  };
197
197
  }
198
- const bl = ["placeholder", "disabled"], yl = /* @__PURE__ */ U({
198
+ const yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ U({
199
199
  __name: "vs-input-password",
200
200
  props: /* @__PURE__ */ ie({
201
201
  style: { default: () => ({}) },
@@ -212,7 +212,7 @@ const bl = ["placeholder", "disabled"], yl = /* @__PURE__ */ U({
212
212
  emits: ["update:modelValue"],
213
213
  setup(o) {
214
214
  const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue");
215
- return (n, s) => ae((i(), d("input", {
215
+ return (n, s) => ne((i(), d("input", {
216
216
  type: "password",
217
217
  "onUpdate:modelValue": s[0] || (s[0] = (r) => a.value = r),
218
218
  placeholder: n.placeholder,
@@ -221,11 +221,11 @@ const bl = ["placeholder", "disabled"], yl = /* @__PURE__ */ U({
221
221
  style: {
222
222
  border: "1px solid #CFD9E0"
223
223
  }
224
- }, null, 10, bl)), [
225
- [ve, a.value]
224
+ }, null, 10, yl)), [
225
+ [me, a.value]
226
226
  ]);
227
227
  }
228
- }), xl = ["placeholder", "disabled"], Ye = /* @__PURE__ */ U({
228
+ }), wl = ["placeholder", "disabled"], Ye = /* @__PURE__ */ U({
229
229
  __name: "vs-input-text",
230
230
  props: /* @__PURE__ */ ie({
231
231
  style: { default: () => ({}) },
@@ -242,7 +242,7 @@ const bl = ["placeholder", "disabled"], yl = /* @__PURE__ */ U({
242
242
  emits: ["update:modelValue"],
243
243
  setup(o) {
244
244
  const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue");
245
- return (n, s) => ae((i(), d("input", {
245
+ return (n, s) => ne((i(), d("input", {
246
246
  type: "text",
247
247
  "onUpdate:modelValue": s[0] || (s[0] = (r) => a.value = r),
248
248
  placeholder: n.placeholder,
@@ -251,11 +251,11 @@ const bl = ["placeholder", "disabled"], yl = /* @__PURE__ */ U({
251
251
  style: {
252
252
  border: "1px solid #CFD9E0"
253
253
  }
254
- }, null, 10, xl)), [
255
- [ve, a.value]
254
+ }, null, 10, wl)), [
255
+ [me, a.value]
256
256
  ]);
257
257
  }
258
- }), wl = ["placeholder", "min", "max"], kl = /* @__PURE__ */ U({
258
+ }), kl = ["placeholder", "min", "max"], _l = /* @__PURE__ */ U({
259
259
  __name: "vs-input-number",
260
260
  props: /* @__PURE__ */ ie({
261
261
  min: {},
@@ -274,7 +274,7 @@ const bl = ["placeholder", "disabled"], yl = /* @__PURE__ */ U({
274
274
  emits: ["update:modelValue"],
275
275
  setup(o) {
276
276
  const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue");
277
- return (n, s) => ae((i(), d("input", {
277
+ return (n, s) => ne((i(), d("input", {
278
278
  type: "number",
279
279
  step: "any",
280
280
  "onUpdate:modelValue": s[0] || (s[0] = (r) => a.value = r),
@@ -285,8 +285,8 @@ const bl = ["placeholder", "disabled"], yl = /* @__PURE__ */ U({
285
285
  },
286
286
  min: n.min,
287
287
  max: n.max
288
- }, null, 10, wl)), [
289
- [ve, a.value]
288
+ }, null, 10, kl)), [
289
+ [me, a.value]
290
290
  ]);
291
291
  }
292
292
  }), X = (o, e) => {
@@ -294,7 +294,7 @@ const bl = ["placeholder", "disabled"], yl = /* @__PURE__ */ U({
294
294
  for (const [a, n] of e)
295
295
  t[a] = n;
296
296
  return t;
297
- }, _l = {}, $l = {
297
+ }, $l = {}, Cl = {
298
298
  xmlns: "http://www.w3.org/2000/svg",
299
299
  viewBox: "0 0 24 24",
300
300
  fill: "none",
@@ -304,8 +304,8 @@ const bl = ["placeholder", "disabled"], yl = /* @__PURE__ */ U({
304
304
  "stroke-linejoin": "round",
305
305
  class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
306
306
  };
307
- function Cl(o, e) {
308
- return i(), d("svg", $l, e[0] || (e[0] = [
307
+ function Vl(o, e) {
308
+ return i(), d("svg", Cl, e[0] || (e[0] = [
309
309
  l("path", {
310
310
  stroke: "none",
311
311
  d: "M0 0h24v24H0z",
@@ -314,7 +314,7 @@ function Cl(o, e) {
314
314
  l("path", { d: "M5 12l5 5l10 -10" }, null, -1)
315
315
  ]));
316
316
  }
317
- const Vl = /* @__PURE__ */ X(_l, [["render", Cl]]), Ml = { class: "flex items-center gap-[4px]" }, Ll = ["value", "id", "disabled"], Sl = ["for"], Bl = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, jl = /* @__PURE__ */ U({
317
+ const Ml = /* @__PURE__ */ X($l, [["render", Vl]]), Ll = { class: "flex items-center gap-[4px]" }, Sl = ["value", "id", "disabled"], Bl = ["for"], jl = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, El = /* @__PURE__ */ U({
318
318
  __name: "vs-checkbox-default",
319
319
  props: {
320
320
  value: { default: "" },
@@ -331,16 +331,16 @@ const Vl = /* @__PURE__ */ X(_l, [["render", Cl]]), Ml = { class: "flex items-ce
331
331
  get: () => a.modelValue,
332
332
  set: (s) => t("update:modelValue", s)
333
333
  });
334
- return (s, r) => (i(), d("div", Ml, [
335
- ae(l("input", {
334
+ return (s, r) => (i(), d("div", Ll, [
335
+ ne(l("input", {
336
336
  type: "checkbox",
337
337
  value: s.value,
338
338
  "onUpdate:modelValue": r[0] || (r[0] = (u) => n.value = u),
339
339
  class: E(["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": s.disabled }]),
340
340
  id: s.id,
341
341
  disabled: s.disabled
342
- }, null, 10, Ll), [
343
- [Ct, n.value]
342
+ }, null, 10, Sl), [
343
+ [St, n.value]
344
344
  ]),
345
345
  l("label", {
346
346
  for: s.id,
@@ -349,23 +349,23 @@ const Vl = /* @__PURE__ */ X(_l, [["render", Cl]]), Ml = { class: "flex items-ce
349
349
  l("div", {
350
350
  class: E(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [n.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", s.error ? "border-red-600" : ""]])
351
351
  }, [
352
- A(Vl, {
352
+ T(Ml, {
353
353
  height: "12",
354
354
  width: "12"
355
355
  })
356
356
  ], 2),
357
- l("span", Bl, [
357
+ l("span", jl, [
358
358
  Se(s.$slots, "default", {}, () => [
359
359
  ge(G(s.label), 1)
360
360
  ])
361
361
  ])
362
- ], 10, Sl)
362
+ ], 10, Bl)
363
363
  ]));
364
364
  }
365
- }), El = ["name", "value", "disabled"], Il = { class: "flex items-center gap-[6px] text-[14px]" }, zl = {
365
+ }), Il = ["name", "value", "disabled"], zl = { class: "flex items-center gap-[6px] text-[14px]" }, Al = {
366
366
  key: 0,
367
367
  class: "text-[16px]"
368
- }, Al = ["src"], Tl = /* @__PURE__ */ U({
368
+ }, Tl = ["src"], Fl = /* @__PURE__ */ U({
369
369
  __name: "vs-checkbox-buttons",
370
370
  props: {
371
371
  value: { type: [String, Number, Boolean], default: "" },
@@ -388,37 +388,37 @@ const Vl = /* @__PURE__ */ X(_l, [["render", Cl]]), Ml = { class: "flex items-ce
388
388
  return (u, c) => (i(), d("label", {
389
389
  class: E(["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", [r.value, s.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
390
390
  }, [
391
- ae(l("input", {
391
+ ne(l("input", {
392
392
  type: "checkbox",
393
393
  class: "hidden",
394
394
  name: u.id,
395
395
  value: u.value,
396
396
  "onUpdate:modelValue": c[0] || (c[0] = (p) => n.value = p),
397
397
  disabled: u.disabled
398
- }, null, 8, El), [
399
- [Ct, n.value]
398
+ }, null, 8, Il), [
399
+ [St, n.value]
400
400
  ]),
401
- l("span", Il, [
402
- u.icon || u.imgUrl ? (i(), d("span", zl, [
401
+ l("span", zl, [
402
+ u.icon || u.imgUrl ? (i(), d("span", Al, [
403
403
  u.icon ? (i(), d("i", {
404
404
  key: 0,
405
405
  class: E(u.icon)
406
- }, null, 2)) : D("", !0),
406
+ }, null, 2)) : F("", !0),
407
407
  u.imgUrl ? (i(), d("img", {
408
408
  key: 1,
409
409
  src: u.imgUrl,
410
410
  width: "16",
411
411
  height: "16",
412
412
  alt: "icon"
413
- }, null, 8, Al)) : D("", !0)
414
- ])) : D("", !0),
413
+ }, null, 8, Tl)) : F("", !0)
414
+ ])) : F("", !0),
415
415
  Se(u.$slots, "default", {}, () => [
416
416
  ge(G(u.label), 1)
417
417
  ])
418
418
  ])
419
419
  ], 2));
420
420
  }
421
- }), Fl = { class: "flex items-center" }, St = /* @__PURE__ */ U({
421
+ }), Ol = { class: "flex items-center" }, It = /* @__PURE__ */ U({
422
422
  __name: "vs-input-checkbox-item",
423
423
  props: {
424
424
  value: { default: "" },
@@ -445,8 +445,8 @@ const Vl = /* @__PURE__ */ X(_l, [["render", Cl]]), Ml = { class: "flex items-ce
445
445
  a("update:modelValue", u);
446
446
  }
447
447
  }), r = k(`vs-checkbox-${t.view || "default"}`);
448
- return (u, c) => (i(), d("div", Fl, [
449
- (i(), me(Fe(r.value === "vs-checkbox-buttons" ? ee(Tl) : ee(jl)), {
448
+ return (u, c) => (i(), d("div", Ol, [
449
+ (i(), ve(Fe(r.value === "vs-checkbox-buttons" ? ee(Fl) : ee(El)), {
450
450
  value: u.value,
451
451
  label: u.label,
452
452
  info: u.option?.info,
@@ -466,7 +466,7 @@ const Vl = /* @__PURE__ */ X(_l, [["render", Cl]]), Ml = { class: "flex items-ce
466
466
  }, 8, ["value", "label", "info", "disabled", "modelValue", "icon", "imgUrl", "style", "error"]))
467
467
  ]));
468
468
  }
469
- }), Ol = {}, Dl = {
469
+ }), Dl = {}, Ul = {
470
470
  xmlns: "http://www.w3.org/2000/svg",
471
471
  viewBox: "0 0 24 24",
472
472
  fill: "none",
@@ -476,8 +476,8 @@ const Vl = /* @__PURE__ */ X(_l, [["render", Cl]]), Ml = { class: "flex items-ce
476
476
  "stroke-linejoin": "round",
477
477
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"
478
478
  };
479
- function Ul(o, e) {
480
- return i(), d("svg", Dl, e[0] || (e[0] = [
479
+ function Pl(o, e) {
480
+ return i(), d("svg", Ul, e[0] || (e[0] = [
481
481
  l("path", {
482
482
  stroke: "none",
483
483
  d: "M0 0h24v24H0z",
@@ -486,7 +486,7 @@ function Ul(o, e) {
486
486
  l("path", { d: "M6 9l6 6l6 -6" }, null, -1)
487
487
  ]));
488
488
  }
489
- const Pl = /* @__PURE__ */ X(Ol, [["render", Ul]]), Rl = {}, Hl = {
489
+ const Rl = /* @__PURE__ */ X(Dl, [["render", Pl]]), Hl = {}, Nl = {
490
490
  xmlns: "http://www.w3.org/2000/svg",
491
491
  viewBox: "0 0 24 24",
492
492
  fill: "none",
@@ -496,8 +496,8 @@ const Pl = /* @__PURE__ */ X(Ol, [["render", Ul]]), Rl = {}, Hl = {
496
496
  "stroke-linejoin": "round",
497
497
  class: "icon icon-tabler icons-tabler-outline icon-tabler-x"
498
498
  };
499
- function Nl(o, e) {
500
- return i(), d("svg", Hl, e[0] || (e[0] = [
499
+ function ql(o, e) {
500
+ return i(), d("svg", Nl, e[0] || (e[0] = [
501
501
  l("path", {
502
502
  stroke: "none",
503
503
  d: "M0 0h24v24H0z",
@@ -507,7 +507,7 @@ function Nl(o, e) {
507
507
  l("path", { d: "M6 6l12 12" }, null, -1)
508
508
  ]));
509
509
  }
510
- const ql = /* @__PURE__ */ X(Rl, [["render", Nl]]), Wl = {}, Gl = {
510
+ const Wl = /* @__PURE__ */ X(Hl, [["render", ql]]), Gl = {}, Kl = {
511
511
  xmlns: "http://www.w3.org/2000/svg",
512
512
  width: "24",
513
513
  height: "24",
@@ -519,7 +519,7 @@ const ql = /* @__PURE__ */ X(Rl, [["render", Nl]]), Wl = {}, Gl = {
519
519
  "stroke-linejoin": "round"
520
520
  };
521
521
  function Zl(o, e) {
522
- return i(), d("svg", Gl, e[0] || (e[0] = [
522
+ return i(), d("svg", Kl, e[0] || (e[0] = [
523
523
  l("path", {
524
524
  stroke: "none",
525
525
  d: "M0 0h24v24H0z",
@@ -530,13 +530,13 @@ function Zl(o, e) {
530
530
  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)
531
531
  ]));
532
532
  }
533
- const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
533
+ const Jl = /* @__PURE__ */ X(Gl, [["render", Zl]]), Yl = {
534
534
  key: 0,
535
535
  class: "flex items-start gap-x-1"
536
- }, Yl = {
536
+ }, Xl = {
537
537
  key: 0,
538
538
  class: "text-red-500 text-[14px]"
539
- }, Xl = ["title"], Ql = ["disabled"], Bt = /* @__PURE__ */ U({
539
+ }, Ql = ["title"], eo = ["disabled"], zt = /* @__PURE__ */ U({
540
540
  __name: "vs-input-switcher",
541
541
  props: /* @__PURE__ */ ie({
542
542
  rules: { default: () => [] },
@@ -558,14 +558,14 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
558
558
  emits: ["update:modelValue"],
559
559
  setup(o) {
560
560
  const e = o, t = de(o, "modelValue");
561
- return (a, n) => e.view === "checkbox" ? (i(), d("div", Jl, [
562
- A(St, {
561
+ return (a, n) => e.view === "checkbox" ? (i(), d("div", Yl, [
562
+ T(It, {
563
563
  modelValue: t.value,
564
564
  "onUpdate:modelValue": n[0] || (n[0] = (s) => t.value = s),
565
565
  label: a.text,
566
566
  error: a.error || ""
567
567
  }, null, 8, ["modelValue", "label", "error"]),
568
- a.rules?.includes("required") ? (i(), d("span", Yl, "*")) : D("", !0),
568
+ a.rules?.includes("required") ? (i(), d("span", Xl, "*")) : F("", !0),
569
569
  a.i ? (i(), d("button", {
570
570
  key: 1,
571
571
  class: "cursor-pointer",
@@ -573,8 +573,8 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
573
573
  onClick: n[1] || (n[1] = ke(() => {
574
574
  }, ["prevent"]))
575
575
  }, [
576
- A(ee(Kl), { class: "text-gray-500 w-[14px] h-[14px]" })
577
- ], 8, Xl)) : D("", !0)
576
+ T(ee(Jl), { class: "text-gray-500 w-[14px] h-[14px]" })
577
+ ], 8, Ql)) : F("", !0)
578
578
  ])) : (i(), d("button", {
579
579
  key: 1,
580
580
  type: "button",
@@ -586,9 +586,9 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
586
586
  "data-state": "checked",
587
587
  class: E(["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"]])
588
588
  }, null, 2)
589
- ], 10, Ql));
589
+ ], 10, eo));
590
590
  }
591
- }), eo = ["id", "innerHTML"], ht = /* @__PURE__ */ U({
591
+ }), to = ["id", "innerHTML"], xt = /* @__PURE__ */ U({
592
592
  __name: "vs-input-static",
593
593
  props: {
594
594
  text: { default: "" },
@@ -606,9 +606,9 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
606
606
  id: e.name,
607
607
  class: E(["text-gray-900", e.customClass]),
608
608
  innerHTML: e.html ? e.html : e.text
609
- }, null, 10, eo));
609
+ }, null, 10, to));
610
610
  }
611
- }), to = ["placeholder", "disabled", "name"], lo = /* @__PURE__ */ U({
611
+ }), lo = ["placeholder", "disabled", "name"], oo = /* @__PURE__ */ U({
612
612
  __name: "vs-input-mask",
613
613
  props: /* @__PURE__ */ ie({
614
614
  name: {},
@@ -669,9 +669,9 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
669
669
  style: {
670
670
  border: "1px solid #CFD9E0"
671
671
  }
672
- }, null, 10, to));
672
+ }, null, 10, lo));
673
673
  }
674
- }), oo = { class: "relative w-full bg-white rounded-lg" }, no = ["placeholder", "disabled"], ao = /* @__PURE__ */ U({
674
+ }), no = { class: "relative w-full bg-white rounded-lg" }, ao = ["placeholder", "disabled"], so = /* @__PURE__ */ U({
675
675
  __name: "vs-input-email",
676
676
  props: /* @__PURE__ */ ie({
677
677
  style: { default: () => ({}) },
@@ -688,9 +688,9 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
688
688
  emits: ["update:modelValue"],
689
689
  setup(o) {
690
690
  const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue");
691
- return (n, s) => (i(), d("div", oo, [
691
+ return (n, s) => (i(), d("div", no, [
692
692
  s[1] || (s[1] = ye('<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)),
693
- ae(l("input", {
693
+ ne(l("input", {
694
694
  type: "email",
695
695
  "onUpdate:modelValue": s[0] || (s[0] = (r) => a.value = r),
696
696
  placeholder: n.placeholder,
@@ -699,12 +699,12 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
699
699
  style: {
700
700
  border: "1px solid #CFD9E0"
701
701
  }
702
- }, null, 10, no), [
703
- [ve, a.value]
702
+ }, null, 10, ao), [
703
+ [me, a.value]
704
704
  ])
705
705
  ]));
706
706
  }
707
- }), so = ["value", "disabled"], ro = { class: "text-[13px] text-gray-700" }, io = /* @__PURE__ */ U({
707
+ }), ro = ["value", "disabled"], io = { class: "text-[13px] text-gray-700" }, uo = /* @__PURE__ */ U({
708
708
  __name: "vs-input-radio-default",
709
709
  props: /* @__PURE__ */ ie({
710
710
  style: {},
@@ -726,14 +726,14 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
726
726
  return (t, a) => (i(), d("label", {
727
727
  class: E(["flex items-center gap-0", [t.customClass]])
728
728
  }, [
729
- ae(l("input", {
729
+ ne(l("input", {
730
730
  "onUpdate:modelValue": a[0] || (a[0] = (n) => e.value = n),
731
731
  type: "radio",
732
732
  value: t.value,
733
733
  disabled: t.disabled,
734
734
  class: "hidden"
735
- }, null, 8, so), [
736
- [Vt, e.value]
735
+ }, null, 8, ro), [
736
+ [Bt, e.value]
737
737
  ]),
738
738
  l("span", {
739
739
  class: E(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]", [
@@ -744,12 +744,12 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
744
744
  e.value == t.value ? (i(), d("span", {
745
745
  key: 0,
746
746
  class: E(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${t.style?.primaryColor || "blue"}-500`]])
747
- }, null, 2)) : D("", !0)
747
+ }, null, 2)) : F("", !0)
748
748
  ], 2),
749
- l("span", ro, G(t.text), 1)
749
+ l("span", io, G(t.text), 1)
750
750
  ], 2));
751
751
  }
752
- }), uo = ["value", "disabled"], co = { class: "text-[13px] text-gray-700" }, po = /* @__PURE__ */ U({
752
+ }), co = ["value", "disabled"], po = { class: "text-[13px] text-gray-700" }, fo = /* @__PURE__ */ U({
753
753
  __name: "vs-input-radio-buttons",
754
754
  props: /* @__PURE__ */ ie({
755
755
  style: {},
@@ -774,22 +774,22 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
774
774
  t.customClass
775
775
  ]])
776
776
  }, [
777
- ae(l("input", {
777
+ ne(l("input", {
778
778
  "onUpdate:modelValue": a[0] || (a[0] = (n) => e.value = n),
779
779
  type: "radio",
780
780
  value: t.value,
781
781
  disabled: t.disabled,
782
782
  class: "hidden"
783
- }, null, 8, uo), [
784
- [Vt, e.value]
783
+ }, null, 8, co), [
784
+ [Bt, e.value]
785
785
  ]),
786
- l("span", co, G(t.text), 1)
786
+ l("span", po, G(t.text), 1)
787
787
  ], 2));
788
788
  }
789
- }), fo = {
790
- "vs-input-radio-default": io,
791
- "vs-input-radio-buttons": po
792
- }, gt = /* @__PURE__ */ U({
789
+ }), mo = {
790
+ "vs-input-radio-default": uo,
791
+ "vs-input-radio-buttons": fo
792
+ }, wt = /* @__PURE__ */ U({
793
793
  __name: "vs-input-radio",
794
794
  props: /* @__PURE__ */ ie({
795
795
  options: {},
@@ -808,11 +808,11 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
808
808
  }),
809
809
  emits: ["update:modelValue"],
810
810
  setup(o) {
811
- const e = o, t = de(o, "modelValue"), a = B(() => fo[`vs-input-radio-${e.view}`]);
811
+ const e = o, t = de(o, "modelValue"), a = B(() => mo[`vs-input-radio-${e.view}`]);
812
812
  return (n, s) => (i(), d("div", {
813
813
  class: E([n.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
814
814
  }, [
815
- (i(!0), d(re, null, fe(n.options, (r) => (i(), me(Fe(a.value), Te({
815
+ (i(!0), d(re, null, fe(n.options, (r) => (i(), ve(Fe(a.value), Te({
816
816
  key: r?.id,
817
817
  text: r.text,
818
818
  value: r.id.toString(),
@@ -822,7 +822,7 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
822
822
  }, { ref_for: !0 }, n.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
823
823
  ], 2));
824
824
  }
825
- }), mo = /* @__PURE__ */ U({
825
+ }), vo = /* @__PURE__ */ U({
826
826
  __name: "vs-input-checkbox",
827
827
  props: {
828
828
  options: { default: () => [] },
@@ -841,7 +841,7 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
841
841
  },
842
842
  emits: ["update:modelValue"],
843
843
  setup(o, { emit: e }) {
844
- const t = o, a = e, n = k([]), s = Nt({}), r = (f) => f?.value || f?.id || f?.text || f, u = (f) => f.text || String(f), c = (f) => `lg:col-span-${f || 12}`, p = async () => {
844
+ const t = o, a = e, n = k([]), s = qt({}), r = (f) => f?.value || f?.id || f?.text || f, u = (f) => f.text || String(f), c = (f) => `lg:col-span-${f || 12}`, p = async () => {
845
845
  try {
846
846
  const f = await fetch(`/api/suggest/${t.data}`).then((m) => m.json());
847
847
  n.value = f?.data || f;
@@ -908,7 +908,7 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
908
908
  }), (f, m) => (i(), d("div", {
909
909
  class: E(["p-0 w-full gap-[6px]", [f.position === "vertical" ? "flex-col" : "", f.colSpan ? "grid" : "flex justify-start"]])
910
910
  }, [
911
- (i(!0), d(re, null, fe(n.value, (y) => (i(), me(St, {
911
+ (i(!0), d(re, null, fe(n.value, (y) => (i(), ve(It, {
912
912
  modelValue: s[r(y)],
913
913
  "onUpdate:modelValue": (S) => s[r(y)] = S,
914
914
  value: r(y),
@@ -923,7 +923,7 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
923
923
  }, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "icon", "imgUrl", "option", "view"]))), 128))
924
924
  ], 2));
925
925
  }
926
- }), vo = /* @__PURE__ */ X(mo, [["__scopeId", "data-v-91f3584a"]]), ho = ["type", "placeholder", "disabled"], go = /* @__PURE__ */ U({
926
+ }), ho = /* @__PURE__ */ X(vo, [["__scopeId", "data-v-91f3584a"]]), go = ["type", "placeholder", "disabled"], bo = /* @__PURE__ */ U({
927
927
  __name: "vs-input-date1",
928
928
  props: {
929
929
  style: { default: () => ({}) },
@@ -945,7 +945,7 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
945
945
  get: () => a(t.modelValue),
946
946
  set: (c) => s("update:modelValue", c)
947
947
  }), u = B(() => t.mode === "datetime" ? "datetime-local" : t.mode);
948
- return (c, p) => ae((i(), d("input", {
948
+ return (c, p) => ne((i(), d("input", {
949
949
  type: u.value,
950
950
  "onUpdate:modelValue": p[0] || (p[0] = (f) => r.value = f),
951
951
  placeholder: c.placeholder,
@@ -955,11 +955,11 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
955
955
  style: {
956
956
  border: "1px solid #CFD9E0"
957
957
  }
958
- }, null, 10, ho)), [
959
- [qt, r.value]
958
+ }, null, 10, go)), [
959
+ [Wt, r.value]
960
960
  ]);
961
961
  }
962
- }), bt = async (o, e, t, a) => {
962
+ }), kt = async (o, e, t, a) => {
963
963
  try {
964
964
  const n = new FormData();
965
965
  return n.append("unique", "true"), n.append("file", o), (await fetch(
@@ -977,20 +977,20 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
977
977
  position: "right-bottom"
978
978
  }), console.error("Сталась помилка завантаження файлу", n), null;
979
979
  }
980
- }, bo = async (o) => {
980
+ }, yo = async (o) => {
981
981
  try {
982
982
  return await fetch(`file/delete${o}`), !0;
983
983
  } catch (e) {
984
984
  return console.error(e), !1;
985
985
  }
986
- }, yt = async (o) => {
986
+ }, _t = async (o) => {
987
987
  try {
988
988
  const e = await fetch(`file/download/files/uploads${o}`), t = await e.arrayBuffer(), a = e.headers["content-type"], n = new TextDecoder("utf-8").decode(t), s = new Blob([n], { type: a }), r = document.createElement("a");
989
989
  r.setAttribute("download", o), r.href = window.URL.createObjectURL(s), r.click();
990
990
  } catch (e) {
991
991
  console.error(e.message);
992
992
  }
993
- }, yo = {}, xo = {
993
+ }, xo = {}, wo = {
994
994
  xmlns: "http://www.w3.org/2000/svg",
995
995
  width: "24",
996
996
  height: "24",
@@ -1001,13 +1001,13 @@ const Kl = /* @__PURE__ */ X(Wl, [["render", Zl]]), Jl = {
1001
1001
  "stroke-linecap": "round",
1002
1002
  "stroke-linejoin": "round"
1003
1003
  };
1004
- function wo(o, e) {
1005
- return i(), d("svg", xo, e[0] || (e[0] = [
1004
+ function ko(o, e) {
1005
+ return i(), d("svg", wo, e[0] || (e[0] = [
1006
1006
  l("path", { d: "M5 12h14" }, null, -1),
1007
1007
  l("path", { d: "M12 5v14" }, null, -1)
1008
1008
  ]));
1009
1009
  }
1010
- const qe = /* @__PURE__ */ X(yo, [["render", wo]]), ko = {}, _o = {
1010
+ const qe = /* @__PURE__ */ X(xo, [["render", ko]]), _o = {}, $o = {
1011
1011
  xmlns: "http://www.w3.org/2000/svg",
1012
1012
  class: "icon icon-tabler icon-tabler-file-text",
1013
1013
  width: "44",
@@ -1019,12 +1019,12 @@ const qe = /* @__PURE__ */ X(yo, [["render", wo]]), ko = {}, _o = {
1019
1019
  "stroke-linecap": "round",
1020
1020
  "stroke-linejoin": "round"
1021
1021
  };
1022
- function $o(o, e, t, a, n, s) {
1023
- return i(), d("svg", _o, e[0] || (e[0] = [
1022
+ function Co(o, e, t, a, n, s) {
1023
+ return i(), d("svg", $o, e[0] || (e[0] = [
1024
1024
  ye('<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)
1025
1025
  ]));
1026
1026
  }
1027
- const Co = /* @__PURE__ */ X(ko, [["render", $o]]), Vo = {}, Mo = {
1027
+ const Vo = /* @__PURE__ */ X(_o, [["render", Co]]), Mo = {}, Lo = {
1028
1028
  xmlns: "http://www.w3.org/2000/svg",
1029
1029
  class: "icon icon-tabler icon-tabler-table",
1030
1030
  width: "44",
@@ -1036,8 +1036,8 @@ const Co = /* @__PURE__ */ X(ko, [["render", $o]]), Vo = {}, Mo = {
1036
1036
  "stroke-linecap": "round",
1037
1037
  "stroke-linejoin": "round"
1038
1038
  };
1039
- function Lo(o, e, t, a, n, s) {
1040
- return i(), d("svg", Mo, e[0] || (e[0] = [
1039
+ function So(o, e, t, a, n, s) {
1040
+ return i(), d("svg", Lo, e[0] || (e[0] = [
1041
1041
  l("path", {
1042
1042
  stroke: "none",
1043
1043
  d: "M0 0h24v24H0z",
@@ -1064,7 +1064,7 @@ function Lo(o, e, t, a, n, s) {
1064
1064
  }, null, -1)
1065
1065
  ]));
1066
1066
  }
1067
- const So = /* @__PURE__ */ X(Vo, [["render", Lo]]), Bo = {}, jo = {
1067
+ const Bo = /* @__PURE__ */ X(Mo, [["render", So]]), jo = {}, Eo = {
1068
1068
  xmlns: "http://www.w3.org/2000/svg",
1069
1069
  width: "24",
1070
1070
  height: "24",
@@ -1075,12 +1075,12 @@ const So = /* @__PURE__ */ X(Vo, [["render", Lo]]), Bo = {}, jo = {
1075
1075
  "stroke-linecap": "round",
1076
1076
  "stroke-linejoin": "round"
1077
1077
  };
1078
- function Eo(o, e) {
1079
- return i(), d("svg", jo, e[0] || (e[0] = [
1078
+ function Io(o, e) {
1079
+ return i(), d("svg", Eo, e[0] || (e[0] = [
1080
1080
  ye('<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="M9 9l1 0"></path><path d="M9 13l6 0"></path><path d="M9 17l6 0"></path>', 6)
1081
1081
  ]));
1082
1082
  }
1083
- const jt = /* @__PURE__ */ X(Bo, [["render", Eo]]), Io = {}, zo = {
1083
+ const At = /* @__PURE__ */ X(jo, [["render", Io]]), zo = {}, Ao = {
1084
1084
  xmlns: "http://www.w3.org/2000/svg",
1085
1085
  class: "icon icon-tabler icon-tabler-file-zip",
1086
1086
  width: "44",
@@ -1092,12 +1092,12 @@ const jt = /* @__PURE__ */ X(Bo, [["render", Eo]]), Io = {}, zo = {
1092
1092
  "stroke-linecap": "round",
1093
1093
  "stroke-linejoin": "round"
1094
1094
  };
1095
- function Ao(o, e, t, a, n, s) {
1096
- return i(), d("svg", zo, e[0] || (e[0] = [
1095
+ function To(o, e, t, a, n, s) {
1096
+ return i(), d("svg", Ao, e[0] || (e[0] = [
1097
1097
  ye('<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)
1098
1098
  ]));
1099
1099
  }
1100
- const To = /* @__PURE__ */ X(Io, [["render", Ao]]), Fo = {}, Oo = {
1100
+ const Fo = /* @__PURE__ */ X(zo, [["render", To]]), Oo = {}, Do = {
1101
1101
  xmlns: "http://www.w3.org/2000/svg",
1102
1102
  class: "icon icon-tabler icon-tabler-file-code",
1103
1103
  width: "44",
@@ -1109,25 +1109,25 @@ const To = /* @__PURE__ */ X(Io, [["render", Ao]]), Fo = {}, Oo = {
1109
1109
  "stroke-linecap": "round",
1110
1110
  "stroke-linejoin": "round"
1111
1111
  };
1112
- function Do(o, e, t, a, n, s) {
1113
- return i(), d("svg", Oo, e[0] || (e[0] = [
1112
+ function Uo(o, e, t, a, n, s) {
1113
+ return i(), d("svg", Do, e[0] || (e[0] = [
1114
1114
  ye('<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)
1115
1115
  ]));
1116
1116
  }
1117
- const Uo = /* @__PURE__ */ X(Fo, [["render", Do]]), Po = (o) => {
1117
+ const Po = /* @__PURE__ */ X(Oo, [["render", Uo]]), Ro = (o) => {
1118
1118
  if (!o) return "";
1119
1119
  const e = o?.split(".");
1120
1120
  return e[e.length - 1];
1121
- }, Ro = (o) => {
1122
- const e = Po(o), t = {
1121
+ }, Ho = (o) => {
1122
+ const e = Ro(o), t = {
1123
1123
  imageFormat: ["tiff", "jpg", "jpeg", "png", "svg", "ico", "webp"],
1124
1124
  sheetsFormat: ["xls", "csv", "xlsx"],
1125
1125
  archivesFormat: ["zip", "rar"],
1126
1126
  textsFormat: ["json", "geojson", "txt", "yml", "yaml", "shp"],
1127
1127
  documentsFormat: ["pdf"]
1128
1128
  };
1129
- return t.imageFormat.includes(e) ? "img" : t.sheetsFormat.includes(e) ? So : t.textsFormat.includes(e) ? Uo : t.documentsFormat.includes(e) ? Co : t.archivesFormat.includes(e) ? To : jt;
1130
- }, Ho = {}, No = {
1129
+ return t.imageFormat.includes(e) ? "img" : t.sheetsFormat.includes(e) ? Bo : t.textsFormat.includes(e) ? Po : t.documentsFormat.includes(e) ? Vo : t.archivesFormat.includes(e) ? Fo : At;
1130
+ }, No = {}, qo = {
1131
1131
  xmlns: "http://www.w3.org/2000/svg",
1132
1132
  width: "24",
1133
1133
  height: "24",
@@ -1139,12 +1139,12 @@ const Uo = /* @__PURE__ */ X(Fo, [["render", Do]]), Po = (o) => {
1139
1139
  "stroke-linejoin": "round",
1140
1140
  class: "icon icon-tabler icons-tabler-outline icon-tabler-trash"
1141
1141
  };
1142
- function qo(o, e) {
1143
- return i(), d("svg", No, e[0] || (e[0] = [
1142
+ function Wo(o, e) {
1143
+ return i(), d("svg", qo, e[0] || (e[0] = [
1144
1144
  ye('<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)
1145
1145
  ]));
1146
1146
  }
1147
- const et = /* @__PURE__ */ X(Ho, [["render", qo]]), Wo = {}, Go = {
1147
+ const et = /* @__PURE__ */ X(No, [["render", Wo]]), Go = {}, Ko = {
1148
1148
  xmlns: "http://www.w3.org/2000/svg",
1149
1149
  width: "24",
1150
1150
  height: "24",
@@ -1157,7 +1157,7 @@ const et = /* @__PURE__ */ X(Ho, [["render", qo]]), Wo = {}, Go = {
1157
1157
  class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
1158
1158
  };
1159
1159
  function Zo(o, e) {
1160
- return i(), d("svg", Go, e[0] || (e[0] = [
1160
+ return i(), d("svg", Ko, e[0] || (e[0] = [
1161
1161
  l("path", {
1162
1162
  stroke: "none",
1163
1163
  d: "M0 0h24v24H0z",
@@ -1168,7 +1168,7 @@ function Zo(o, e) {
1168
1168
  l("path", { d: "M12 4l0 12" }, null, -1)
1169
1169
  ]));
1170
1170
  }
1171
- const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, Jo = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, Yo = /* @__PURE__ */ U({
1171
+ const Tt = /* @__PURE__ */ X(Go, [["render", Zo]]), Jo = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, Yo = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, Xo = /* @__PURE__ */ U({
1172
1172
  __name: "vs-input-file-list-item",
1173
1173
  props: /* @__PURE__ */ ie({
1174
1174
  format: {},
@@ -1189,37 +1189,37 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
1189
1189
  emits: ["update:value", "update:item"],
1190
1190
  setup(o) {
1191
1191
  const e = de(o, "value"), t = de(o, "item"), a = o;
1192
- return (n, s) => (i(), d("div", Ko, [
1193
- (i(), me(Fe(ee(Ro)(t.value)), {
1192
+ return (n, s) => (i(), d("div", Jo, [
1193
+ (i(), ve(Fe(ee(Ho)(t.value)), {
1194
1194
  src: t.value,
1195
1195
  alt: "file",
1196
1196
  class: "w-full h-full object-cover cursor-pointer",
1197
- onClick: s[0] || (s[0] = (r) => ee(yt)(t.value))
1197
+ onClick: s[0] || (s[0] = (r) => ee(_t)(t.value))
1198
1198
  }, null, 8, ["src"])),
1199
- l("div", Jo, [
1199
+ l("div", Yo, [
1200
1200
  l("button", {
1201
1201
  type: "button",
1202
1202
  onClick: s[1] || (s[1] = (r) => {
1203
- ee(bo)(t.value), e.value = a.multiple ? e.value?.filter((u) => u !== t.value) : "";
1203
+ ee(yo)(t.value), e.value = a.multiple ? e.value?.filter((u) => u !== t.value) : "";
1204
1204
  }),
1205
1205
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"
1206
1206
  }, [
1207
- A(et, { class: "w-4 h-4" })
1207
+ T(et, { class: "w-4 h-4" })
1208
1208
  ]),
1209
1209
  l("button", {
1210
1210
  type: "button",
1211
- onClick: s[2] || (s[2] = (r) => ee(yt)(t.value)),
1211
+ onClick: s[2] || (s[2] = (r) => ee(_t)(t.value)),
1212
1212
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"
1213
1213
  }, [
1214
- A(Et, { class: "w-4 h-4" })
1214
+ T(Tt, { class: "w-4 h-4" })
1215
1215
  ])
1216
1216
  ])
1217
1217
  ]));
1218
1218
  }
1219
- }), xt = /* @__PURE__ */ X(Yo, [["__scopeId", "data-v-0ca886b3"]]), Xo = { class: "flex items-center gap-x-2" }, Qo = ["multiple"], en = {
1219
+ }), $t = /* @__PURE__ */ X(Xo, [["__scopeId", "data-v-0ca886b3"]]), Qo = { class: "flex items-center gap-x-2" }, en = ["multiple"], tn = {
1220
1220
  key: 1,
1221
1221
  class: "flex items-center flex-wrap gap-2"
1222
- }, tn = /* @__PURE__ */ U({
1222
+ }, ln = /* @__PURE__ */ U({
1223
1223
  __name: "vs-input-file",
1224
1224
  props: /* @__PURE__ */ ie({
1225
1225
  format: {},
@@ -1241,17 +1241,17 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
1241
1241
  const { files: p } = c.target;
1242
1242
  if (!(!p || p.length === 0))
1243
1243
  if (t.multiple) {
1244
- const f = Array.from(p).map(async (q) => t.format && !q.name.endsWith(t.format) ? null : await bt(q, "1", "form", "table")), S = (await Promise.all(f)).filter((q) => q !== null).map((q) => q?.file_path).filter(Boolean);
1244
+ const f = Array.from(p).map(async (q) => t.format && !q.name.endsWith(t.format) ? null : await kt(q, "1", "form", "table")), S = (await Promise.all(f)).filter((q) => q !== null).map((q) => q?.file_path).filter(Boolean);
1245
1245
  a.value = [...a.value || [], ...S], n("change", a.value);
1246
1246
  } else {
1247
1247
  const f = p[0];
1248
1248
  if (t.format && !f.name.endsWith(t.format))
1249
1249
  return;
1250
- const m = await bt(f, "1", "form", "table");
1250
+ const m = await kt(f, "1", "form", "table");
1251
1251
  a.value = m?.file_path, n("change", a.value || "");
1252
1252
  }
1253
1253
  };
1254
- return (c, p) => (i(), d("div", Xo, [
1254
+ return (c, p) => (i(), d("div", Qo, [
1255
1255
  l("input", {
1256
1256
  class: "hidden",
1257
1257
  ref_key: "fileInput",
@@ -1259,15 +1259,15 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
1259
1259
  type: "file",
1260
1260
  multiple: c.multiple,
1261
1261
  onChange: u
1262
- }, null, 40, Qo),
1263
- !c.multiple && a.value ? (i(), me(xt, {
1262
+ }, null, 40, en),
1263
+ !c.multiple && a.value ? (i(), ve($t, {
1264
1264
  key: 0,
1265
1265
  item: a.value,
1266
1266
  "onUpdate:item": p[0] || (p[0] = (f) => a.value = f),
1267
1267
  value: a.value,
1268
1268
  "onUpdate:value": p[1] || (p[1] = (f) => a.value = f)
1269
- }, null, 8, ["item", "value"])) : c.multiple ? (i(), d("div", en, [
1270
- (i(!0), d(re, null, fe(a.value, (f, m) => (i(), me(xt, {
1269
+ }, null, 8, ["item", "value"])) : c.multiple ? (i(), d("div", tn, [
1270
+ (i(!0), d(re, null, fe(a.value, (f, m) => (i(), ve($t, {
1271
1271
  multiple: c.multiple,
1272
1272
  key: m,
1273
1273
  value: a.value,
@@ -1281,19 +1281,19 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
1281
1281
  c.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
1282
1282
  ])
1283
1283
  }, [
1284
- A(qe, { class: "w-6 h-6" })
1284
+ T(qe, { class: "w-6 h-6" })
1285
1285
  ], 2)
1286
- ])) : D("", !0),
1287
- c.multiple ? D("", !0) : (i(), d("div", {
1286
+ ])) : F("", !0),
1287
+ c.multiple ? F("", !0) : (i(), d("div", {
1288
1288
  key: 2,
1289
1289
  onClick: p[4] || (p[4] = (f) => s.value?.click()),
1290
1290
  class: E([c.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"])
1291
1291
  }, [
1292
- A(qe, { class: "w-6 h-6" })
1292
+ T(qe, { class: "w-6 h-6" })
1293
1293
  ], 2))
1294
1294
  ]));
1295
1295
  }
1296
- }), ln = { class: "max-w-[55vw]" }, on = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, nn = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, an = { class: "px-[5px]" }, sn = { class: "" }, Je = /* @__PURE__ */ U({
1296
+ }), on = { class: "max-w-[55vw]" }, nn = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, an = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, sn = { class: "px-[5px]" }, rn = { class: "" }, Je = /* @__PURE__ */ U({
1297
1297
  __name: "vs-widget-file-info",
1298
1298
  props: {
1299
1299
  item: { default: null }
@@ -1318,33 +1318,33 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
1318
1318
  }
1319
1319
  return (n, s) => (i(), d(re, null, [
1320
1320
  s[1] || (s[1] = ye('<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)),
1321
- l("div", ln, [
1322
- l("p", on, G(n.item?.uploaded_name), 1),
1323
- l("p", nn, [
1321
+ l("div", on, [
1322
+ l("p", nn, G(n.item?.uploaded_name), 1),
1323
+ l("p", an, [
1324
1324
  l("span", null, G(n.item?.username), 1),
1325
- ae(l("span", an, "|", 512), [
1325
+ ne(l("span", sn, "|", 512), [
1326
1326
  [Qe, n.item?.username]
1327
1327
  ]),
1328
1328
  l("span", null, G(t.value), 1),
1329
1329
  s[0] || (s[0] = l("span", { class: "px-[5px]" }, "|", -1)),
1330
- l("span", sn, G(a(n.item?.size)), 1)
1330
+ l("span", rn, G(a(n.item?.size)), 1)
1331
1331
  ])
1332
1332
  ])
1333
1333
  ], 64));
1334
1334
  }
1335
- }), rn = { class: "p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full" }, un = {
1335
+ }), un = { class: "p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full" }, dn = {
1336
1336
  key: 0,
1337
1337
  class: "flex w-full gap-x-3 items-center"
1338
- }, dn = {
1338
+ }, cn = {
1339
1339
  key: 1,
1340
1340
  class: "flex gap-x-3 w-full items-center"
1341
- }, cn = {
1341
+ }, pn = {
1342
1342
  key: 2,
1343
1343
  class: "flex gap-x-3 w-full items-center"
1344
- }, pn = ["href"], fn = {
1344
+ }, fn = ["href"], mn = {
1345
1345
  key: 3,
1346
1346
  class: "flex gap-x-3 w-full items-center"
1347
- }, mn = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, vn = { 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" }, hn = { class: "inline-block" }, gn = { class: "inline-block" }, bn = /* @__PURE__ */ U({
1347
+ }, vn = { class: "lg:absolute lg:top-3 lg:end-1 opacity-100" }, hn = { 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" }, gn = { class: "inline-block" }, bn = { class: "inline-block" }, yn = /* @__PURE__ */ U({
1348
1348
  __name: "vs-widget-file-item",
1349
1349
  props: {
1350
1350
  item: { default: null },
@@ -1386,48 +1386,48 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
1386
1386
  function p(f) {
1387
1387
  (t.item.ext === "jpg" || t.item.ext === "png") && a("openLightbox", { item: t.item, index: f });
1388
1388
  }
1389
- return (f, m) => (i(), d("div", rn, [
1390
- f.item.ext === "jpg" || f.item.ext === "png" ? (i(), d("div", un, [
1389
+ return (f, m) => (i(), d("div", un, [
1390
+ f.item.ext === "jpg" || f.item.ext === "png" ? (i(), d("div", dn, [
1391
1391
  l("div", {
1392
1392
  class: "max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",
1393
1393
  onClick: m[0] || (m[0] = (y) => p(f.index))
1394
1394
  }, [
1395
- A(Je, { item: f.item }, null, 8, ["item"])
1395
+ T(Je, { item: f.item }, null, 8, ["item"])
1396
1396
  ])
1397
- ])) : n(f.item) ? (i(), d("div", dn, [
1398
- A(Je, { item: f.item }, null, 8, ["item"])
1399
- ])) : s(f.item) ? (i(), d("div", cn, [
1397
+ ])) : n(f.item) ? (i(), d("div", cn, [
1398
+ T(Je, { item: f.item }, null, 8, ["item"])
1399
+ ])) : s(f.item) ? (i(), d("div", pn, [
1400
1400
  l("a", {
1401
1401
  href: `/api/file-preview?id=${f.item.file_id}`,
1402
1402
  target: "_blank",
1403
1403
  class: "flex gap-x-3 w-full items-center"
1404
1404
  }, [
1405
- A(Je, { item: f.item }, null, 8, ["item"])
1406
- ], 8, pn)
1407
- ])) : (i(), d("div", fn, [
1408
- A(Je, { item: f.item }, null, 8, ["item"])
1405
+ T(Je, { item: f.item }, null, 8, ["item"])
1406
+ ], 8, fn)
1407
+ ])) : (i(), d("div", mn, [
1408
+ T(Je, { item: f.item }, null, 8, ["item"])
1409
1409
  ])),
1410
- l("div", mn, [
1411
- l("div", vn, [
1412
- l("div", hn, [
1410
+ l("div", vn, [
1411
+ l("div", hn, [
1412
+ l("div", gn, [
1413
1413
  l("button", {
1414
1414
  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",
1415
1415
  onClick: m[1] || (m[1] = (y) => r(f.item))
1416
1416
  }, [
1417
- A(Et, {
1417
+ T(Tt, {
1418
1418
  height: "14",
1419
1419
  width: "14"
1420
1420
  })
1421
1421
  ])
1422
1422
  ]),
1423
1423
  m[3] || (m[3] = l("div", { class: "w-px h-5 mx-1 bg-gray-200 dark:bg-neutral-700" }, null, -1)),
1424
- l("div", gn, [
1424
+ l("div", bn, [
1425
1425
  l("button", {
1426
1426
  type: "button",
1427
1427
  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",
1428
1428
  onClick: m[2] || (m[2] = (y) => c())
1429
1429
  }, [
1430
- A(et, {
1430
+ T(et, {
1431
1431
  height: "14",
1432
1432
  width: "14"
1433
1433
  })
@@ -1437,7 +1437,7 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
1437
1437
  ])
1438
1438
  ]));
1439
1439
  }
1440
- }), yn = {}, xn = {
1440
+ }), xn = {}, wn = {
1441
1441
  xmlns: "http://www.w3.org/2000/svg",
1442
1442
  width: "24",
1443
1443
  height: "24",
@@ -1449,8 +1449,8 @@ const Et = /* @__PURE__ */ X(Wo, [["render", Zo]]), Ko = { class: "h-[120px] w-[
1449
1449
  "stroke-linejoin": "round",
1450
1450
  class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
1451
1451
  };
1452
- function wn(o, e) {
1453
- return i(), d("svg", xn, e[0] || (e[0] = [
1452
+ function kn(o, e) {
1453
+ return i(), d("svg", wn, e[0] || (e[0] = [
1454
1454
  l("path", {
1455
1455
  stroke: "none",
1456
1456
  d: "M0 0h24v24H0z",
@@ -1461,13 +1461,13 @@ function wn(o, e) {
1461
1461
  l("path", { d: "M12 4l0 12" }, null, -1)
1462
1462
  ]));
1463
1463
  }
1464
- const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, $n = { class: "flex w-full mb-[12px] items-center gap-x-2" }, Cn = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, Vn = { class1: "ml-auto" }, Mn = { 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" }, Ln = {
1464
+ const _n = /* @__PURE__ */ X(xn, [["render", kn]]), $n = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, Cn = { class: "flex w-full mb-[12px] items-center gap-x-2" }, Vn = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, Mn = { class1: "ml-auto" }, Ln = { 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" }, Sn = {
1465
1465
  key: 0,
1466
1466
  class: "py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"
1467
- }, Sn = { class: "relative" }, Bn = {
1467
+ }, Bn = { class: "relative" }, jn = {
1468
1468
  key: 1,
1469
1469
  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"
1470
- }, jn = { key: 0 }, En = /* @__PURE__ */ U({
1470
+ }, En = { key: 0 }, In = /* @__PURE__ */ U({
1471
1471
  __name: "vs-input-file-list",
1472
1472
  props: {
1473
1473
  id: { default: "" },
@@ -1483,22 +1483,22 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1483
1483
  emits: ["update"],
1484
1484
  setup(o, { emit: e }) {
1485
1485
  const t = o, a = Ae("form"), n = B(() => a.value.formId), s = k(!1), r = k(0), u = e, c = k(!1), p = k({}), f = k([]), m = k(""), y = B(() => Array.isArray(f.value) ? f.value.filter((I) => I.ext === "jpg" || I.ext === "png").map((I) => I?.file_path) : []), S = B(() => m.value === "" ? f.value : f.value.filter((I) => I?.uploaded_name?.includes(m.value))), q = (I) => {
1486
- const v = y.value.findIndex((x) => x === I.item.file_path);
1486
+ const v = y.value.findIndex((w) => w === I.item.file_path);
1487
1487
  v !== -1 && (s.value = !0, r.value = v);
1488
- }, R = async () => {
1488
+ }, H = async () => {
1489
1489
  try {
1490
1490
  const I = await fetch(`${t.prefix}/widget/file/${n.value}`).then((v) => v.json());
1491
1491
  f.value = I?.rows;
1492
1492
  } catch (I) {
1493
1493
  console.error(I);
1494
1494
  }
1495
- }, K = async (I) => {
1495
+ }, Z = async (I) => {
1496
1496
  await Promise.all(
1497
1497
  Array.from(I.target.files).map(async (v) => {
1498
- const x = new FormData();
1499
- x.append("file", v);
1498
+ const w = new FormData();
1499
+ w.append("file", v);
1500
1500
  try {
1501
- const V = `${t.prefix}/widget/file/${n.value}`, $ = await fetch(V, { method: "POST", body: x });
1501
+ const V = `${t.prefix}/widget/file/${n.value}`, $ = await fetch(V, { method: "POST", body: w });
1502
1502
  return $.ok ? (u("update", "file-list"), v) : (ce({
1503
1503
  type: $.status >= 400 && $.status < 500 ? "warning" : "error",
1504
1504
  title: "Error",
@@ -1512,35 +1512,35 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1512
1512
  }), console.error(V), null;
1513
1513
  }
1514
1514
  })
1515
- ), await R();
1516
- }, T = (I) => {
1515
+ ), await H();
1516
+ }, z = (I) => {
1517
1517
  const v = { ...I };
1518
1518
  return I.cancel || (v.cancel = () => {
1519
1519
  c.value = !1;
1520
1520
  }), I.updateListOnConfirm && (v.confirm = async () => {
1521
- await I.confirm(), c.value = !1, R();
1521
+ await I.confirm(), c.value = !1, H();
1522
1522
  }), v;
1523
- }, H = (I) => {
1524
- p.value = T(I), c.value = !0;
1523
+ }, P = (I) => {
1524
+ p.value = z(I), c.value = !0;
1525
1525
  };
1526
1526
  return ue(n, (I) => {
1527
- I && R();
1527
+ I && H();
1528
1528
  }), _e(() => {
1529
- n.value && R();
1529
+ n.value && H();
1530
1530
  }), (I, v) => {
1531
- const x = mt("Lightbox"), V = mt("MessageBox");
1532
- return i(), d("div", _n, [
1533
- l("div", $n, [
1534
- l("h2", Cn, " Файлів: " + G(f.value?.length), 1),
1535
- l("div", Vn, [
1531
+ const w = bt("Lightbox"), V = bt("MessageBox");
1532
+ return i(), d("div", $n, [
1533
+ l("div", Cn, [
1534
+ l("h2", Vn, " Файлів: " + G(f.value?.length), 1),
1535
+ l("div", Mn, [
1536
1536
  l("label", null, [
1537
1537
  l("input", {
1538
1538
  type: "file",
1539
1539
  class: "hidden",
1540
- onChange: v[0] || (v[0] = ($) => K($))
1540
+ onChange: v[0] || (v[0] = ($) => Z($))
1541
1541
  }, null, 32),
1542
- l("div", Mn, [
1543
- A(kn, {
1542
+ l("div", Ln, [
1543
+ T(_n, {
1544
1544
  height: "16",
1545
1545
  width: "16"
1546
1546
  })
@@ -1548,9 +1548,9 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1548
1548
  ])
1549
1549
  ])
1550
1550
  ]),
1551
- f.value?.length > 4 ? (i(), d("div", Ln, [
1551
+ f.value?.length > 4 ? (i(), d("div", Sn, [
1552
1552
  l("div", null, [
1553
- l("div", Sn, [
1553
+ l("div", Bn, [
1554
1554
  v[8] || (v[8] = l("div", { class: "absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5" }, [
1555
1555
  l("svg", {
1556
1556
  class: "flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400",
@@ -1572,14 +1572,14 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1572
1572
  l("path", { d: "m21 21-4.3-4.3" })
1573
1573
  ])
1574
1574
  ], -1)),
1575
- ae(l("input", {
1575
+ ne(l("input", {
1576
1576
  type: "text",
1577
1577
  "onUpdate:modelValue": v[1] || (v[1] = ($) => m.value = $),
1578
1578
  class: "py-2 px-3 ps-10 pe-16 block w-full bg-gray-200 xl:bg-gray-100 rounded-lg text-sm focus:border-blue-500 h-[40px] focus:border-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",
1579
1579
  placeholder: "Введіть назву файлу"
1580
1580
  }, null, 512), [
1581
1581
  [
1582
- ve,
1582
+ me,
1583
1583
  m.value,
1584
1584
  void 0,
1585
1585
  { trim: !0 }
@@ -1587,29 +1587,29 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1587
1587
  ])
1588
1588
  ])
1589
1589
  ])
1590
- ])) : D("", !0),
1591
- f.value?.length ? (i(), d("div", Bn, [
1592
- (i(!0), d(re, null, fe(S.value, ($, F) => (i(), me(bn, {
1593
- key: F,
1590
+ ])) : F("", !0),
1591
+ f.value?.length ? (i(), d("div", jn, [
1592
+ (i(!0), d(re, null, fe(S.value, ($, O) => (i(), ve(yn, {
1593
+ key: O,
1594
1594
  prefix: I.prefix,
1595
1595
  item: $,
1596
- index: F,
1596
+ index: O,
1597
1597
  onUpdate: v[2] || (v[2] = (te) => I.$emit("update", "file-list")),
1598
- onOpenModal: v[3] || (v[3] = (te) => H(te)),
1598
+ onOpenModal: v[3] || (v[3] = (te) => P(te)),
1599
1599
  onOpenLightbox: v[4] || (v[4] = (te) => q(te))
1600
1600
  }, null, 8, ["prefix", "item", "index"]))), 128)),
1601
- S.value.length ? D("", !0) : (i(), d("div", jn, v[9] || (v[9] = [
1601
+ S.value.length ? F("", !0) : (i(), d("div", En, v[9] || (v[9] = [
1602
1602
  l("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
1603
1603
  ])))
1604
- ])) : D("", !0),
1605
- A(x, {
1604
+ ])) : F("", !0),
1605
+ T(w, {
1606
1606
  modelValue: s.value,
1607
1607
  "onUpdate:modelValue": v[5] || (v[5] = ($) => s.value = $),
1608
1608
  startIndex: r.value,
1609
1609
  "onUpdate:index": v[6] || (v[6] = ($) => r.value = $),
1610
1610
  images: y.value
1611
1611
  }, null, 8, ["modelValue", "startIndex", "images"]),
1612
- A(V, Te({
1612
+ T(V, Te({
1613
1613
  modelValue: c.value,
1614
1614
  "onUpdate:modelValue": v[7] || (v[7] = ($) => c.value = $),
1615
1615
  onConfirm: p.value.confirm
@@ -1617,7 +1617,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1617
1617
  ]);
1618
1618
  };
1619
1619
  }
1620
- }), In = { class: "flex items-center justify-between" }, zn = { class: "text-[16px] text-gray-900 font-medium" }, An = { class: "grid gap-3" }, Tn = /* @__PURE__ */ U({
1620
+ }), zn = { class: "flex items-center justify-between" }, An = { class: "text-[16px] text-gray-900 font-medium" }, Tn = { class: "grid gap-3" }, Fn = /* @__PURE__ */ U({
1621
1621
  __name: "vs-container-switcher",
1622
1622
  props: {
1623
1623
  title: {
@@ -1641,17 +1641,17 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1641
1641
  t.value = a;
1642
1642
  }
1643
1643
  ), (a, n) => (i(), d("div", null, [
1644
- l("div", In, [
1645
- l("p", zn, G(o.title), 1),
1646
- A(Bt, {
1644
+ l("div", zn, [
1645
+ l("p", An, G(o.title), 1),
1646
+ T(zt, {
1647
1647
  modelValue: t.value,
1648
1648
  "onUpdate:modelValue": n[0] || (n[0] = (s) => t.value = s),
1649
1649
  style: be(o.style)
1650
1650
  }, null, 8, ["modelValue", "style"])
1651
1651
  ]),
1652
- A(st, { name: "slide-fade" }, {
1652
+ T(st, { name: "slide-fade" }, {
1653
1653
  default: Ee(() => [
1654
- ae(l("div", An, [
1654
+ ne(l("div", Tn, [
1655
1655
  Se(a.$slots, "default", {}, void 0, !0)
1656
1656
  ], 512), [
1657
1657
  [Qe, t.value]
@@ -1661,7 +1661,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1661
1661
  })
1662
1662
  ]));
1663
1663
  }
1664
- }), Fn = /* @__PURE__ */ X(Tn, [["__scopeId", "data-v-90320b87"]]), On = { class: "text-[16px] text-gray-900 font-medium" }, Dn = { class: "grid gap-3" }, Un = /* @__PURE__ */ U({
1664
+ }), On = /* @__PURE__ */ X(Fn, [["__scopeId", "data-v-90320b87"]]), Dn = { class: "text-[16px] text-gray-900 font-medium" }, Un = { class: "grid gap-3" }, Pn = /* @__PURE__ */ U({
1665
1665
  __name: "vs-container-accordion",
1666
1666
  props: {
1667
1667
  title: {
@@ -1690,14 +1690,14 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1690
1690
  onClick: n[0] || (n[0] = (s) => t.value = !t.value),
1691
1691
  class: "flex items-center gap-2"
1692
1692
  }, [
1693
- A(ee(Pl), {
1693
+ T(ee(Rl), {
1694
1694
  class: E(["h-4 w-4 duration-300", [t.value ? "-rotate-180" : ""]])
1695
1695
  }, null, 8, ["class"]),
1696
- l("span", On, G(o.title), 1)
1696
+ l("span", Dn, G(o.title), 1)
1697
1697
  ]),
1698
- A(st, { name: "slide-fade" }, {
1698
+ T(st, { name: "slide-fade" }, {
1699
1699
  default: Ee(() => [
1700
- ae(l("div", Dn, [
1700
+ ne(l("div", Un, [
1701
1701
  Se(a.$slots, "default", {}, void 0, !0)
1702
1702
  ], 512), [
1703
1703
  [Qe, t.value]
@@ -1707,7 +1707,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1707
1707
  })
1708
1708
  ]));
1709
1709
  }
1710
- }), Pn = /* @__PURE__ */ X(Un, [["__scopeId", "data-v-590eff11"]]), Rn = { class: "flex items-center justify-between" }, Hn = /* @__PURE__ */ U({
1710
+ }), Rn = /* @__PURE__ */ X(Pn, [["__scopeId", "data-v-590eff11"]]), Hn = { class: "flex items-center justify-between" }, Nn = /* @__PURE__ */ U({
1711
1711
  __name: "vs-container-default",
1712
1712
  props: {
1713
1713
  title: {
@@ -1721,16 +1721,16 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1721
1721
  },
1722
1722
  setup(o) {
1723
1723
  return (e, t) => (i(), d("div", null, [
1724
- l("div", Rn, [
1724
+ l("div", Hn, [
1725
1725
  l("p", null, G(o.title), 1)
1726
1726
  ]),
1727
1727
  Se(e.$slots, "default")
1728
1728
  ]));
1729
1729
  }
1730
- }), Nn = {
1731
- switcher: Fn,
1732
- accordion: Pn,
1733
- default: Hn
1730
+ }), qn = {
1731
+ switcher: On,
1732
+ accordion: Rn,
1733
+ default: Nn
1734
1734
  }, we = {
1735
1735
  Equal: "==",
1736
1736
  Inequal: "!=",
@@ -1744,37 +1744,37 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1744
1744
  Contain: "*",
1745
1745
  In: "in",
1746
1746
  NotIn: "not_in"
1747
- }, qn = (o, e) => String(o) === String(e), Wn = (o, e) => String(o) !== String(e), Gn = (o, e) => o > e, Zn = (o, e) => o >= e, Kn = (o, e) => o < e, Jn = (o, e) => o <= e, Yn = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, Xn = (o, e) => String(o).startsWith(String(e)), Qn = (o, e) => String(o).endsWith(String(e)), ea = (o, e) => String(o).includes(String(e)), ta = (o, e) => Array.isArray(e) ? e.includes(o) : !1, la = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, It = (o, e) => {
1747
+ }, Wn = (o, e) => String(o) === String(e), Gn = (o, e) => String(o) !== String(e), Kn = (o, e) => o > e, Zn = (o, e) => o >= e, Jn = (o, e) => o < e, Yn = (o, e) => o <= e, Xn = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, Qn = (o, e) => String(o).startsWith(String(e)), ea = (o, e) => String(o).endsWith(String(e)), ta = (o, e) => String(o).includes(String(e)), la = (o, e) => Array.isArray(e) ? e.includes(o) : !1, oa = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, Ft = (o, e) => {
1748
1748
  if (!e) return !0;
1749
1749
  switch (e?.[1]) {
1750
1750
  case we.Equal:
1751
- return qn(o, e?.[2]);
1752
- case we.Inequal:
1753
1751
  return Wn(o, e?.[2]);
1754
- case we.Higer:
1752
+ case we.Inequal:
1755
1753
  return Gn(o, e?.[2]);
1754
+ case we.Higer:
1755
+ return Kn(o, e?.[2]);
1756
1756
  case we.HigerOrEqual:
1757
1757
  return Zn(o, e?.[2]);
1758
1758
  case we.Lower:
1759
- return Kn(o, e?.[2]);
1760
- case we.LowerOrEqual:
1761
1759
  return Jn(o, e?.[2]);
1762
- case we.Between:
1760
+ case we.LowerOrEqual:
1763
1761
  return Yn(o, e?.[2]);
1764
- case we.StartWith:
1762
+ case we.Between:
1765
1763
  return Xn(o, e?.[2]);
1766
- case we.EndWith:
1764
+ case we.StartWith:
1767
1765
  return Qn(o, e?.[2]);
1768
- case we.Contain:
1766
+ case we.EndWith:
1769
1767
  return ea(o, e?.[2]);
1770
- case we.In:
1768
+ case we.Contain:
1771
1769
  return ta(o, e?.[2]);
1772
- case we.NotIn:
1770
+ case we.In:
1773
1771
  return la(o, e?.[2]);
1772
+ case we.NotIn:
1773
+ return oa(o, e?.[2]);
1774
1774
  default:
1775
1775
  return !0;
1776
1776
  }
1777
- }, oa = /* @__PURE__ */ U({
1777
+ }, na = /* @__PURE__ */ U({
1778
1778
  __name: "vs-input-container",
1779
1779
  props: {
1780
1780
  style: {
@@ -1799,15 +1799,15 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1799
1799
  const u = r?.conditions;
1800
1800
  if (!u) return !0;
1801
1801
  const c = Array.isArray(u) ? u[0] : u, p = t?.value?.[c];
1802
- return It(p, u);
1803
- })), s = B(() => Nn[e.view]);
1804
- return (r, u) => o.schema?.length ? (i(), me(Fe(s.value), {
1802
+ return Ft(p, u);
1803
+ })), s = B(() => qn[e.view]);
1804
+ return (r, u) => o.schema?.length ? (i(), ve(Fe(s.value), {
1805
1805
  key: 0,
1806
1806
  title: o.title,
1807
1807
  style: be(o.style)
1808
1808
  }, {
1809
1809
  default: Ee(() => [
1810
- (i(!0), d(re, null, fe(n.value, (c) => (i(), me(zt, Te({
1810
+ (i(!0), d(re, null, fe(n.value, (c) => (i(), ve(Ot, Te({
1811
1811
  key: c.name
1812
1812
  }, { ref_for: !0 }, c, {
1813
1813
  item: c,
@@ -1818,15 +1818,21 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1818
1818
  }), null, 16, ["item", "modelValue", "onUpdate:modelValue", "style", "error"]))), 128))
1819
1819
  ]),
1820
1820
  _: 1
1821
- }, 8, ["title", "style"])) : D("", !0);
1821
+ }, 8, ["title", "style"])) : F("", !0);
1822
1822
  }
1823
- }), na = ["aria-expanded", "data-focus"], aa = { class: "flex items-center" }, sa = ["title"], ra = ["innerHTML"], ia = ["onClick"], ua = ["title"], da = ["innerHTML"], ca = {
1823
+ }), aa = ["aria-expanded", "data-focus"], sa = {
1824
+ key: 0,
1825
+ class: "flex flex-wrap items-center gap-1 max-h-20 overflow-y-auto min-w-0 flex-1"
1826
+ }, ra = { class: "flex items-center min-w-0" }, ia = ["title"], ua = ["innerHTML"], da = ["onClick"], ca = { class: "flex-1 min-w-[2px]" }, pa = ["placeholder"], fa = ["title"], ma = ["innerHTML"], va = {
1824
1827
  key: 2,
1825
1828
  class: "text-gray-500 truncate"
1826
- }, pa = { class: "flex-1 min-w-[2px]" }, fa = ["placeholder"], ma = { class: "flex items-center shrink-0" }, va = ["disabled"], ha = ["disabled", "title"], ga = ["aria-disabled", "onClick"], ba = ["innerHTML"], ya = {
1829
+ }, ha = {
1830
+ key: 3,
1831
+ class: "flex-1 min-w-[2px]"
1832
+ }, ga = ["placeholder"], ba = { class: "flex items-center shrink-0" }, ya = ["disabled"], xa = ["disabled", "title"], wa = ["aria-disabled", "onClick"], ka = ["innerHTML"], _a = {
1827
1833
  key: 1,
1828
1834
  class: "px-3 py-2 text-center text-gray-500"
1829
- }, xa = ["disabled"], wt = /* @__PURE__ */ U({
1835
+ }, $a = ["disabled"], Ct = /* @__PURE__ */ U({
1830
1836
  __name: "vs-input-select",
1831
1837
  props: {
1832
1838
  multiple: { type: Boolean, default: !1 },
@@ -1861,128 +1867,128 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1861
1867
  set: (h) => a("update:modelValue", h)
1862
1868
  });
1863
1869
  !r.value && t.defaultValue && (r.value = t.defaultValue);
1864
- const u = k(null), c = k(null), p = k(null), f = k(null), m = k(!1), y = k(!1), S = k(null), q = k([]), R = k(-1), K = k([]), T = k(""), H = k(null), I = k("bottom"), v = k({}), x = k([]), V = B(() => {
1865
- if (!x.value.length) return [];
1866
- const h = q.value, b = new Map(h.map((w) => [w.id?.toString(), w]));
1867
- return x.value.map((w) => b.get(w?.toString())).filter((w) => !!w);
1868
- }), $ = B(() => t.placeholder || "Select..."), F = B(() => W(S.value)), te = B(() => n.value ? !x.value.length && T.value === "" : !F.value && T.value === ""), J = B(() => s.value ? !1 : n.value ? x.value.length > 0 : !!r.value), M = (h) => n.value ? x.value.some((b) => b?.toString() === h?.toString()) : r.value?.toString() === h?.toString(), Z = B(() => {
1870
+ const u = k(null), c = k(null), p = k(null), f = k(null), m = k(!1), y = k(!1), S = k(null), q = k([]), H = k(-1), Z = k([]), z = k(""), P = k(null), I = k("bottom"), v = k({}), w = k([]), V = B(() => {
1871
+ if (!w.value.length) return [];
1872
+ const h = q.value, g = new Map(h.map((x) => [x.id?.toString(), x]));
1873
+ return w.value.map((x) => g.get(x?.toString())).filter((x) => !!x);
1874
+ }), $ = B(() => t.placeholder || "Select..."), O = B(() => W(S.value)), te = B(() => n.value ? !w.value.length && z.value === "" : !O.value && z.value === ""), J = B(() => s.value ? !1 : n.value ? w.value.length > 0 : !!r.value), M = (h) => n.value ? w.value.some((g) => g?.toString() === h?.toString()) : r.value?.toString() === h?.toString(), K = B(() => {
1869
1875
  let h = q.value ?? [];
1870
- if (!t.data && T.value.trim() !== "") {
1871
- const b = T.value.toLowerCase();
1872
- h = h.filter((w) => {
1873
- const P = W(w).toLowerCase(), ne = w.text?.toLowerCase?.() || "";
1874
- return P.includes(b) || ne.includes(b);
1876
+ if (!t.data && z.value.trim() !== "") {
1877
+ const g = z.value.toLowerCase();
1878
+ h = h.filter((x) => {
1879
+ const R = W(x).toLowerCase(), ae = x.text?.toLowerCase?.() || "";
1880
+ return R.includes(g) || ae.includes(g);
1875
1881
  });
1876
1882
  }
1877
- if (n.value && x.value.length) {
1878
- const b = new Set(x.value.map((w) => w?.toString()));
1879
- h = h.filter((w) => !b.has(w.id?.toString()));
1883
+ if (n.value && w.value.length) {
1884
+ const g = new Set(w.value.map((x) => x?.toString()));
1885
+ h = h.filter((x) => !g.has(x.id?.toString()));
1880
1886
  }
1881
1887
  return h;
1882
- }), N = Ae("values"), le = /\{\{\s*([^}]+?)\s*\}\}/g, z = (h) => (h ? String(h) : "").replace(/<[^>]*>/g, "").trim(), j = B(() => t.slot ?? t?.optionTemplate ?? ""), C = (h) => {
1888
+ }), N = Ae("values"), le = /\{\{\s*([^}]+?)\s*\}\}/g, A = (h) => (h ? String(h) : "").replace(/<[^>]*>/g, "").trim(), j = B(() => t.slot ?? t?.optionTemplate ?? ""), C = (h) => {
1883
1889
  if (!h) return "";
1884
- const b = j.value;
1885
- return b ? b.replace(le, (w, P) => {
1886
- const ne = P.trim(), pe = h[ne];
1890
+ const g = j.value;
1891
+ return g ? g.replace(le, (x, R) => {
1892
+ const ae = R.trim(), pe = h[ae];
1887
1893
  return pe != null ? String(pe) : "";
1888
1894
  }) : h.text ?? "";
1889
1895
  }, W = (h) => {
1890
1896
  if (!h) return "";
1891
1897
  if (!j.value) return h.text ?? "";
1892
- const w = C(h);
1893
- return z(w) || h.text || "";
1898
+ const x = C(h);
1899
+ return A(x) || h.text || "";
1894
1900
  }, oe = (h) => {
1895
- t.set && N?.value && Object.entries(t.set).forEach(([b, w]) => {
1896
- if (!b) return;
1897
- const P = h ? h[w] : null;
1898
- N.value[b] = P ?? null;
1901
+ t.set && N?.value && Object.entries(t.set).forEach(([g, x]) => {
1902
+ if (!g) return;
1903
+ const R = h ? h[x] : null;
1904
+ N.value[g] = R ?? null;
1899
1905
  });
1900
1906
  }, se = B(() => t.parent ? N?.value?.[t.parent]?.toString() ?? null : null), Le = async (h) => {
1901
1907
  if (!t.data) {
1902
- let b = t.options ?? [];
1908
+ let g = t.options ?? [];
1903
1909
  if (h?.trim()) {
1904
- const w = h.toLowerCase();
1905
- b = b.filter((P) => {
1906
- const ne = W(P).toLowerCase(), pe = P.text?.toLowerCase?.() || "";
1907
- return ne.includes(w) || pe.includes(w);
1910
+ const x = h.toLowerCase();
1911
+ g = g.filter((R) => {
1912
+ const ae = W(R).toLowerCase(), pe = R.text?.toLowerCase?.() || "";
1913
+ return ae.includes(x) || pe.includes(x);
1908
1914
  });
1909
1915
  }
1910
- return b;
1916
+ return g;
1911
1917
  }
1912
1918
  try {
1913
- const b = t.host ?? "", w = t.prefix ?? "api", P = t.api ?? `/${w}/suggest/${t.data}`, ne = `${b}${P}`, pe = new URLSearchParams();
1914
- return pe.set("json", "1"), h && pe.set("key", h), se.value !== void 0 && se.value !== null && se.value !== "" && pe.set("parent", se.value), (await fetch(`${ne}?${pe.toString()}`).then((ze) => ze.json()))?.data ?? [];
1919
+ const g = t.host ?? "", x = t.prefix ?? "api", R = t.api ?? `/${x}/suggest/${t.data}`, ae = `${g}${R}`, pe = new URLSearchParams();
1920
+ return pe.set("json", "1"), h && pe.set("key", h), se.value !== void 0 && se.value !== null && se.value !== "" && pe.set("parent", se.value), (await fetch(`${ae}?${pe.toString()}`).then((ze) => ze.json()))?.data ?? [];
1915
1921
  } catch {
1916
1922
  return [];
1917
1923
  }
1918
1924
  }, Oe = async () => {
1919
- t.data ? q.value = await Le(T.value) : q.value = t.options ? [...t.options] : [];
1925
+ t.data ? q.value = await Le(z.value) : q.value = t.options ? [...t.options] : [];
1920
1926
  }, Ge = async (h) => {
1921
1927
  if (h == null) return null;
1922
- const b = q.value?.find((w) => w?.id?.toString() === String(h));
1923
- if (b) return b;
1928
+ const g = q.value?.find((x) => x?.id?.toString() === String(h));
1929
+ if (g) return g;
1924
1930
  if (t.data)
1925
1931
  try {
1926
- const w = t.host ?? "", P = t.prefix ?? "api", ne = t.api ?? `/${P}/suggest/${t.data}`, pe = `${w}${ne}`, xe = new URLSearchParams();
1932
+ const x = t.host ?? "", R = t.prefix ?? "api", ae = t.api ?? `/${R}/suggest/${t.data}`, pe = `${x}${ae}`, xe = new URLSearchParams();
1927
1933
  return xe.set("json", "1"), xe.set("val", String(h)), se.value !== void 0 && se.value !== null && se.value !== "" && xe.set("parent", se.value), ((await fetch(`${pe}?${xe.toString()}`).then((Pe) => Pe.json()))?.data ?? [])?.[0] ?? null;
1928
1934
  } catch {
1929
1935
  return null;
1930
1936
  }
1931
1937
  return null;
1932
1938
  }, tt = async (h) => {
1933
- const b = new Set(q.value.map((P) => P.id?.toString())), w = h.filter((P) => !b.has(P?.toString()));
1934
- w.length && await w.reduce(async (P, ne) => {
1935
- await P;
1936
- const pe = await Ge(ne);
1939
+ const g = new Set(q.value.map((R) => R.id?.toString())), x = h.filter((R) => !g.has(R?.toString()));
1940
+ x.length && await x.reduce(async (R, ae) => {
1941
+ await R;
1942
+ const pe = await Ge(ae);
1937
1943
  pe && q.value.push(pe);
1938
1944
  }, Promise.resolve());
1939
1945
  }, De = async () => {
1940
1946
  s.value || (m.value = !0, await Oe(), await je(() => {
1941
- Me(), H.value?.focus(), Z.value.length ? R.value = 0 : R.value = -1;
1947
+ Me(), P.value?.focus(), K.value.length ? H.value = 0 : H.value = -1;
1942
1948
  }));
1943
1949
  }, Ce = () => {
1944
- m.value = !1, R.value = -1;
1945
- }, g = async (h) => {
1950
+ m.value = !1, H.value = -1;
1951
+ }, b = async (h) => {
1946
1952
  if (s.value) return;
1947
1953
  !m.value ? await De() : Ce();
1948
1954
  }, _ = async () => {
1949
- m.value ? H.value?.focus() : await De();
1955
+ m.value ? P.value?.focus() : await De();
1950
1956
  }, Y = () => {
1951
- n.value ? (x.value = [], r.value = [], a("change", [])) : (S.value = null, r.value = null, a("change", null)), oe(null), T.value = "", je(() => H.value?.focus());
1952
- }, O = (h) => {
1953
- n.value && (x.value = x.value.filter((b) => b?.toString() !== h?.toString()), r.value = [...x.value], a("change", r.value), je(() => H.value?.focus()));
1957
+ n.value ? (w.value = [], r.value = [], a("change", [])) : (S.value = null, r.value = null, a("change", null)), oe(null), z.value = "", je(() => P.value?.focus());
1958
+ }, D = (h) => {
1959
+ n.value && (w.value = w.value.filter((g) => g?.toString() !== h?.toString()), r.value = [...w.value], a("change", r.value), je(() => P.value?.focus()));
1954
1960
  }, Q = (h) => {
1955
- n.value ? (M(h.id) || (x.value = [...x.value, h.id], r.value = [...x.value], a("change", r.value)), T.value = "", je(() => {
1956
- H.value?.focus(), R.value = Math.min(R.value, Z.value.length - 1);
1957
- }), oe(null)) : (S.value = h, r.value = h.id, a("change", r.value), T.value = "", Ce(), oe(h));
1961
+ n.value ? (M(h.id) || (w.value = [...w.value, h.id], r.value = [...w.value], a("change", r.value)), z.value = "", je(() => {
1962
+ P.value?.focus(), H.value = Math.min(H.value, K.value.length - 1);
1963
+ }), oe(null)) : (S.value = h, r.value = h.id, a("change", r.value), z.value = "", Ce(), oe(h));
1958
1964
  }, he = (h) => {
1959
1965
  M(h.id) || Q(h);
1960
- }, Ve = (h, b) => {
1961
- if (!h || !b) return;
1962
- const w = h.offsetTop, P = w + h.offsetHeight, ne = b.scrollTop, pe = ne + b.clientHeight;
1963
- let xe = b.scrollTop;
1964
- w < ne ? xe = w - 80 : P > pe && (xe = P - b.clientHeight + 4);
1965
- const ze = b;
1966
+ }, Ve = (h, g) => {
1967
+ if (!h || !g) return;
1968
+ const x = h.offsetTop, R = x + h.offsetHeight, ae = g.scrollTop, pe = ae + g.clientHeight;
1969
+ let xe = g.scrollTop;
1970
+ x < ae ? xe = x - 80 : R > pe && (xe = R - g.clientHeight + 4);
1971
+ const ze = g;
1966
1972
  ze.scrollTop = xe;
1967
1973
  }, Be = (h) => {
1968
- let b = h.parentElement;
1969
- for (; b; ) {
1970
- if (b.classList.contains("ui-dialog__content"))
1971
- return b;
1972
- const w = window.getComputedStyle(b), P = w.overflow + w.overflowY + w.overflowX;
1973
- if (P.includes("auto") || P.includes("scroll") || b === document.body || b === document.documentElement)
1974
- return b;
1975
- b = b.parentElement;
1974
+ let g = h.parentElement;
1975
+ for (; g; ) {
1976
+ if (g.classList.contains("ui-dialog__content"))
1977
+ return g;
1978
+ const x = window.getComputedStyle(g), R = x.overflow + x.overflowY + x.overflowX;
1979
+ if (R.includes("auto") || R.includes("scroll") || g === document.body || g === document.documentElement)
1980
+ return g;
1981
+ g = g.parentElement;
1976
1982
  }
1977
1983
  return document.body;
1978
1984
  }, Me = () => {
1979
1985
  if (!c.value) return;
1980
- const h = c.value.getBoundingClientRect(), b = window.innerHeight || document.documentElement.clientHeight, w = window.innerWidth || document.documentElement.clientWidth, P = 8, ne = 8, pe = t.maxHeight || 300, xe = b - h.bottom - ne - P, ze = h.top - ne - P, Ue = xe >= ze, Pe = Math.max(w - P * 2, 0);
1986
+ const h = c.value.getBoundingClientRect(), g = window.innerHeight || document.documentElement.clientHeight, x = window.innerWidth || document.documentElement.clientWidth, R = 8, ae = 8, pe = t.maxHeight || 300, xe = g - h.bottom - ae - R, ze = h.top - ae - R, Ue = xe >= ze, Pe = Math.max(x - R * 2, 0);
1981
1987
  let { width: Re } = h;
1982
1988
  Pe > 0 && Re > Pe && (Re = Pe);
1983
1989
  let { left: He } = h;
1984
- He + Re + P > w && (He = w - Re - P), He = Math.max(He, P);
1985
- const Ht = Math.min(
1990
+ He + Re + R > x && (He = x - Re - R), He = Math.max(He, R);
1991
+ const Nt = Math.min(
1986
1992
  pe,
1987
1993
  Math.max(Ue ? xe : ze, 50)
1988
1994
  );
@@ -1991,46 +1997,46 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
1991
1997
  left: `${He}px`,
1992
1998
  width: `${Re}px`,
1993
1999
  minWidth: "300px",
1994
- maxHeight: `${Ht}px`,
2000
+ maxHeight: `${Nt}px`,
1995
2001
  transform: Ue ? "none" : "translateY(-100%)",
1996
- top: Ue ? `${h.bottom + ne}px` : `${h.top - ne}px`
2002
+ top: Ue ? `${h.bottom + ae}px` : `${h.top - ae}px`
1997
2003
  };
1998
2004
  }, Ie = async (h) => {
1999
2005
  s.value || !m.value && (h.key === "ArrowDown" || h.key === "ArrowUp") && (h.preventDefault(), await De());
2000
- }, Tt = (h) => {
2006
+ }, rt = (h) => {
2001
2007
  if (!m.value) return;
2002
- const { key: b } = h;
2003
- if (b === "ArrowDown")
2004
- h.preventDefault(), R.value + 1 < Z.value.length && (R.value += 1, Ve(K.value[R.value], p.value));
2005
- else if (b === "ArrowUp")
2006
- h.preventDefault(), R.value > 0 && (R.value -= 1, Ve(K.value[R.value], p.value));
2007
- else if (b === "Enter") {
2008
+ const { key: g } = h;
2009
+ if (g === "ArrowDown")
2010
+ h.preventDefault(), H.value + 1 < K.value.length && (H.value += 1, Ve(Z.value[H.value], p.value));
2011
+ else if (g === "ArrowUp")
2012
+ h.preventDefault(), H.value > 0 && (H.value -= 1, Ve(Z.value[H.value], p.value));
2013
+ else if (g === "Enter") {
2008
2014
  h.preventDefault();
2009
- const w = Z.value[R.value];
2010
- w && Q(w), H.value?.blur();
2011
- } else b === "Escape" ? (h.preventDefault(), Ce()) : b === "Backspace" ? n.value && T.value === "" && x.value.length && (x.value = x.value.slice(0, -1), r.value = [...x.value], a("change", r.value)) : b === "Home" ? (R.value = 0, Ve(K.value[0], p.value)) : b === "End" ? (R.value = Z.value.length - 1, Ve(K.value[R.value], p.value)) : b === "Tab" && Ce();
2012
- }, Ft = () => {
2015
+ const x = K.value[H.value];
2016
+ x && Q(x), P.value?.blur();
2017
+ } else g === "Escape" ? (h.preventDefault(), Ce()) : g === "Backspace" ? n.value && z.value === "" && w.value.length && (w.value = w.value.slice(0, -1), r.value = [...w.value], a("change", r.value)) : g === "Home" ? (H.value = 0, Ve(Z.value[0], p.value)) : g === "End" ? (H.value = K.value.length - 1, Ve(Z.value[H.value], p.value)) : g === "Tab" && Ce();
2018
+ }, it = () => {
2013
2019
  s.value || (y.value = !0);
2014
- }, Ot = () => {
2015
- y.value = !1, T.value = "";
2016
- }, rt = (h) => {
2020
+ }, ut = () => {
2021
+ y.value = !1, z.value = "";
2022
+ }, dt = (h) => {
2017
2023
  h.key === "Escape" && m.value && Ce();
2018
- }, it = (h) => {
2019
- const b = h.target;
2020
- u.value?.contains(b) || f.value?.contains(b) || Ce();
2021
- }, ut = (h) => {
2024
+ }, ct = (h) => {
2025
+ const g = h.target;
2026
+ u.value?.contains(g) || f.value?.contains(g) || Ce();
2027
+ }, pt = (h) => {
2022
2028
  m.value && p.value && !p.value.contains(h.target) && Me();
2023
- }, dt = () => {
2029
+ }, ft = () => {
2024
2030
  m.value && Me();
2025
- }, ct = () => {
2031
+ }, mt = () => {
2026
2032
  m.value && Me();
2027
2033
  };
2028
2034
  ue(() => t.options, (h) => {
2029
- h?.length && (q.value = [...h], Ze());
2035
+ h?.length && (q.value = [...h], Ke());
2030
2036
  }, { immediate: !0 });
2031
- async function Ze() {
2037
+ async function Ke() {
2032
2038
  if (n.value)
2033
- Array.isArray(r.value) ? x.value = [...r.value] : (x.value = r.value == null ? [] : [r.value], r.value = [...x.value]), t.data && x.value.length && (await tt(x.value), await je());
2039
+ Array.isArray(r.value) ? w.value = [...r.value] : (w.value = r.value == null ? [] : [r.value], r.value = [...w.value]), t.data && w.value.length && (await tt(w.value), await je());
2034
2040
  else {
2035
2041
  if (Array.isArray(r.value)) {
2036
2042
  const h = r.value[0] ?? null;
@@ -2040,65 +2046,67 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
2040
2046
  }
2041
2047
  }
2042
2048
  ue(r, () => {
2043
- Ze();
2049
+ Ke();
2044
2050
  }), _e(async () => {
2045
- addEventListener("keydown", rt), addEventListener("scroll", ut, !0), addEventListener("resize", dt), document.addEventListener("click", it, !0), c.value && Be(c.value).addEventListener("scroll", ct, !0), t.options?.length && !t.data ? q.value = [...t.options] : t.data && (q.value = await Le("")), await Ze();
2051
+ addEventListener("keydown", dt), addEventListener("scroll", pt, !0), addEventListener("resize", ft), document.addEventListener("click", ct, !0), c.value && Be(c.value).addEventListener("scroll", mt, !0), t.options?.length && !t.data ? q.value = [...t.options] : t.data && (q.value = await Le("")), await Ke(), gt.value = !1;
2046
2052
  }), Xe(() => {
2047
- removeEventListener("keydown", rt), removeEventListener("scroll", ut, !0), removeEventListener("resize", dt), document.removeEventListener("click", it, !0), c.value && Be(c.value).removeEventListener("scroll", ct, !0);
2053
+ removeEventListener("keydown", dt), removeEventListener("scroll", pt, !0), removeEventListener("resize", ft), document.removeEventListener("click", ct, !0), c.value && Be(c.value).removeEventListener("scroll", mt, !0);
2048
2054
  });
2049
- const Ke = k(!1), lt = k({}), pt = k([]), ft = k(null);
2050
- async function Dt() {
2051
- if (!t.add?.token || ft?.value.validate())
2055
+ const Ze = k(!1), lt = k({}), vt = k([]), ht = k(null);
2056
+ async function Ut() {
2057
+ if (!t.add?.token || ht?.value.validate())
2052
2058
  return;
2053
- const b = t.add.api ?? `/api/table/${t.add.token}`, { id: w } = await fetch(b, {
2059
+ const g = t.add.api ?? `/api/table/${t.add.token}`, { id: x } = await fetch(g, {
2054
2060
  method: "POST",
2055
2061
  headers: { "Content-Type": "application/json" },
2056
2062
  body: JSON.stringify(lt.value)
2057
- }).then((P) => P.json());
2063
+ }).then((R) => R.json());
2058
2064
  if (!t.options?.length && t.data) {
2059
- const { data: P } = await fetch(`${t.api ?? `/api/suggest/${t.data}`}?val=${w}`).then((ne) => ne.json());
2060
- S.value = P[0], q.value.push(P[0]), r.value = w;
2065
+ const { data: R } = await fetch(`${t.api ?? `/api/suggest/${t.data}`}?val=${x}`).then((ae) => ae.json());
2066
+ S.value = R[0], q.value.push(R[0]), r.value = x;
2061
2067
  }
2062
- Ke.value = !1, ce({ title: "Success!", message: "Object created." });
2068
+ Ze.value = !1, ce({ title: "Success!", message: "Object created." });
2063
2069
  }
2064
- async function Ut() {
2070
+ async function Pt() {
2065
2071
  if (!t.add) return null;
2066
- const h = await fetch(`/api/template/form/${t.add.form}`).then((b) => b.json());
2067
- return pt.value = h.schema, Ke.value = !0, null;
2072
+ const h = await fetch(`/api/template/form/${t.add.form}`).then((g) => g.json());
2073
+ return vt.value = h.schema, Ze.value = !0, null;
2068
2074
  }
2069
- function Pt(h, b = 200) {
2070
- let w;
2071
- return (...P) => {
2072
- w && clearTimeout(w), w = window.setTimeout(() => h(...P), b);
2075
+ function Rt(h, g = 200) {
2076
+ let x;
2077
+ return (...R) => {
2078
+ x && clearTimeout(x), x = window.setTimeout(() => h(...R), g);
2073
2079
  };
2074
2080
  }
2075
- const Rt = Pt(async (h) => {
2081
+ const Ht = Rt(async (h) => {
2076
2082
  q.value = await Le(h);
2077
2083
  }, 200);
2078
- return ue(T, (h) => {
2079
- t.data && Rt(h.trim());
2084
+ ue(z, (h) => {
2085
+ t.data && Ht(h.trim());
2080
2086
  }), ue(() => t.options, (h) => {
2081
- !t.data && h?.length && (q.value = [...h], Ze());
2087
+ !t.data && h?.length && (q.value = [...h], Ke());
2082
2088
  }, { immediate: !0 }), ue(() => t.parent ?? t.parentValue, () => {
2083
2089
  t.data && Oe();
2084
- }), ue(se, async () => {
2085
- t.data && (n.value ? (x.value = [], r.value = [], a("change", [])) : (S.value = null, r.value = null, a("change", null)), await Oe());
2086
- }), (h, b) => (i(), d(re, null, [
2087
- A(ee(Lt), {
2088
- visible: Ke.value,
2089
- "onUpdate:visible": b[1] || (b[1] = (w) => Ke.value = w),
2090
+ });
2091
+ const gt = k(!0);
2092
+ return ue(se, async () => {
2093
+ t.data && (gt.value || (n.value ? (w.value = [], r.value = [], a("change", [])) : (S.value = null, r.value = null, a("change", null))), await Oe());
2094
+ }), (h, g) => (i(), d(re, null, [
2095
+ T(ee(Et), {
2096
+ visible: Ze.value,
2097
+ "onUpdate:visible": g[1] || (g[1] = (x) => Ze.value = x),
2090
2098
  title: "Додати",
2091
2099
  buttonText: "Додати",
2092
- onDone: Dt,
2100
+ onDone: Ut,
2093
2101
  teleport: h.teleport
2094
2102
  }, {
2095
2103
  default: Ee(() => [
2096
- A(We, {
2097
- schema: pt.value,
2104
+ T(We, {
2105
+ schema: vt.value,
2098
2106
  modelValue: lt.value,
2099
- "onUpdate:modelValue": b[0] || (b[0] = (w) => lt.value = w),
2107
+ "onUpdate:modelValue": g[0] || (g[0] = (x) => lt.value = x),
2100
2108
  ref_key: "addForm",
2101
- ref: ft
2109
+ ref: ht
2102
2110
  }, null, 8, ["schema", "modelValue"])
2103
2111
  ]),
2104
2112
  _: 1
@@ -2107,17 +2115,17 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
2107
2115
  class: "flex gap-1 w-full",
2108
2116
  ref_key: "selectRoot",
2109
2117
  ref: u,
2110
- onClick: b[4] || (b[4] = ke(() => {
2118
+ onClick: g[5] || (g[5] = ke(() => {
2111
2119
  }, ["stop"]))
2112
2120
  }, [
2113
2121
  l("div", {
2114
2122
  class: E(["relative w-full font-sans", t.customClass])
2115
2123
  }, [
2116
- b[9] || (b[9] = l("span", {
2124
+ g[10] || (g[10] = l("span", {
2117
2125
  id: "react-select-live-region",
2118
2126
  class: "sr-only"
2119
2127
  }, null, -1)),
2120
- b[10] || (b[10] = l("span", {
2128
+ g[11] || (g[11] = l("span", {
2121
2129
  "aria-live": "polite",
2122
2130
  "aria-atomic": "false",
2123
2131
  "aria-relevant": "additions text",
@@ -2143,69 +2151,93 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
2143
2151
  ref_key: "triggerRef",
2144
2152
  ref: c
2145
2153
  }, [
2146
- n.value && x.value.length ? (i(!0), d(re, { key: 0 }, fe(V.value, (w) => (i(), d("div", {
2147
- class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border",
2148
- key: w.id
2149
- }, [
2150
- l("div", aa, [
2151
- w?.color ? (i(), d("span", {
2152
- key: 0,
2153
- class: "w-[16px] h-[16px] rounded-md block ml-1.5",
2154
- style: be({ backgroundColor: w?.color })
2155
- }, null, 4)) : D("", !0),
2156
- l("div", {
2157
- class: "truncate text-gray-900 overflow-hidden",
2158
- title: W(w)
2159
- }, [
2160
- j.value ? (i(), d("span", {
2154
+ n.value ? (i(), d("div", sa, [
2155
+ (i(!0), d(re, null, fe(V.value, (x) => (i(), d("div", {
2156
+ class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border max-w-full",
2157
+ key: x.id
2158
+ }, [
2159
+ l("div", ra, [
2160
+ x?.color ? (i(), d("span", {
2161
2161
  key: 0,
2162
- innerHTML: C(w)
2163
- }, null, 8, ra)) : (i(), d(re, { key: 1 }, [
2164
- ge(G(w.text), 1)
2165
- ], 64))
2166
- ], 8, sa)
2167
- ]),
2168
- l("div", {
2169
- role: "button",
2170
- class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
2171
- onClick: ke((P) => O(w.id), ["stop"])
2172
- }, b[5] || (b[5] = [
2173
- l("svg", {
2174
- height: "14",
2175
- width: "14",
2176
- viewBox: "0 0 20 20",
2177
- "aria-hidden": "true",
2178
- focusable: "false",
2179
- class: "inline-block fill-current stroke-current leading-none stroke-0"
2180
- }, [
2181
- 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" })
2182
- ], -1)
2183
- ]), 8, ia)
2184
- ]))), 128)) : !n.value && !y.value && F.value && T.value === "" ? (i(), d("div", {
2162
+ class: "w-[16px] h-[16px] rounded-md block ml-1.5 flex-shrink-0",
2163
+ style: be({ backgroundColor: x?.color })
2164
+ }, null, 4)) : F("", !0),
2165
+ l("div", {
2166
+ class: "truncate text-gray-900 overflow-hidden max-w-[200px]",
2167
+ title: W(x)
2168
+ }, [
2169
+ j.value ? (i(), d("span", {
2170
+ key: 0,
2171
+ innerHTML: C(x)
2172
+ }, null, 8, ua)) : (i(), d(re, { key: 1 }, [
2173
+ ge(G(x.text), 1)
2174
+ ], 64))
2175
+ ], 8, ia)
2176
+ ]),
2177
+ l("div", {
2178
+ role: "button",
2179
+ class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b] flex-shrink-0",
2180
+ onClick: ke((R) => D(x.id), ["stop"])
2181
+ }, g[6] || (g[6] = [
2182
+ l("svg", {
2183
+ height: "14",
2184
+ width: "14",
2185
+ viewBox: "0 0 20 20",
2186
+ "aria-hidden": "true",
2187
+ focusable: "false",
2188
+ class: "inline-block fill-current stroke-current leading-none stroke-0"
2189
+ }, [
2190
+ 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" })
2191
+ ], -1)
2192
+ ]), 8, da)
2193
+ ]))), 128)),
2194
+ l("div", ca, [
2195
+ !s.value && h.search ? ne((i(), d("input", {
2196
+ key: 0,
2197
+ ref_key: "inputRef",
2198
+ ref: P,
2199
+ class: "w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",
2200
+ autocapitalize: "none",
2201
+ autocomplete: "off",
2202
+ autocorrect: "off",
2203
+ spellcheck: "false",
2204
+ type: "text",
2205
+ tabindex: "0",
2206
+ "aria-autocomplete": "list",
2207
+ placeholder: w.value.length ? " " : $.value,
2208
+ "onUpdate:modelValue": g[2] || (g[2] = (x) => z.value = x),
2209
+ onFocus: it,
2210
+ onBlur: ut,
2211
+ onKeydown: rt
2212
+ }, null, 40, pa)), [
2213
+ [me, z.value]
2214
+ ]) : F("", !0)
2215
+ ])
2216
+ ])) : !n.value && !y.value && O.value && z.value === "" ? (i(), d("div", {
2185
2217
  key: 1,
2186
2218
  class: E(["truncate text-gray-900"]),
2187
- title: F.value
2219
+ title: O.value
2188
2220
  }, [
2189
2221
  S.value?.color ? (i(), d("span", {
2190
2222
  key: 0,
2191
2223
  class: "w-[14px] h-[14px] rounded-md block mr-1 mt-1 absolute",
2192
2224
  style: be({ backgroundColor: S.value?.color })
2193
- }, null, 4)) : D("", !0),
2225
+ }, null, 4)) : F("", !0),
2194
2226
  j.value ? (i(), d("span", {
2195
2227
  key: 1,
2196
2228
  class: E({ "pl-5": S.value?.color }),
2197
2229
  innerHTML: C(S.value)
2198
- }, null, 10, da)) : (i(), d("span", {
2230
+ }, null, 10, ma)) : (i(), d("span", {
2199
2231
  key: 2,
2200
2232
  class: E({ "pl-5": S.value?.color })
2201
2233
  }, G(S.value?.text), 3))
2202
- ], 8, ua)) : D("", !0),
2203
- te.value ? (i(), d("div", ca, G($.value), 1)) : D("", !0),
2204
- l("div", pa, [
2205
- !s.value && h.search ? ae((i(), d("input", {
2234
+ ], 8, fa)) : F("", !0),
2235
+ te.value ? (i(), d("div", va, G($.value), 1)) : F("", !0),
2236
+ n.value ? F("", !0) : (i(), d("div", ha, [
2237
+ !s.value && h.search ? ne((i(), d("input", {
2206
2238
  key: 0,
2207
2239
  ref_key: "inputRef",
2208
- ref: H,
2240
+ ref: P,
2209
2241
  class: "w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",
2210
2242
  autocapitalize: "none",
2211
2243
  autocomplete: "off",
@@ -2214,17 +2246,17 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
2214
2246
  type: "text",
2215
2247
  tabindex: "0",
2216
2248
  "aria-autocomplete": "list",
2217
- placeholder: (n.value && x.value.length ? " " : null) || y.value && !T.value?.length && F.value || " ",
2218
- "onUpdate:modelValue": b[2] || (b[2] = (w) => T.value = w),
2219
- onFocus: Ft,
2220
- onBlur: Ot,
2221
- onKeydown: Tt
2222
- }, null, 40, fa)), [
2223
- [ve, T.value]
2224
- ]) : D("", !0)
2225
- ])
2249
+ placeholder: y.value && !z.value?.length && O.value || " ",
2250
+ "onUpdate:modelValue": g[3] || (g[3] = (x) => z.value = x),
2251
+ onFocus: it,
2252
+ onBlur: ut,
2253
+ onKeydown: rt
2254
+ }, null, 40, ga)), [
2255
+ [me, z.value]
2256
+ ]) : F("", !0)
2257
+ ]))
2226
2258
  ], 512),
2227
- l("div", ma, [
2259
+ l("div", ba, [
2228
2260
  J.value ? (i(), d("button", {
2229
2261
  key: 0,
2230
2262
  type: "button",
@@ -2232,7 +2264,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
2232
2264
  "aria-hidden": "true",
2233
2265
  disabled: s.value,
2234
2266
  onClick: ke(Y, ["stop"])
2235
- }, b[6] || (b[6] = [
2267
+ }, g[7] || (g[7] = [
2236
2268
  l("svg", {
2237
2269
  height: "20",
2238
2270
  width: "20",
@@ -2241,16 +2273,16 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
2241
2273
  }, [
2242
2274
  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" })
2243
2275
  ], -1)
2244
- ]), 8, va)) : D("", !0),
2245
- b[8] || (b[8] = l("div", { class: "self-stretch w-px bg-[#ccc] my-[1px]" }, null, -1)),
2276
+ ]), 8, ya)) : F("", !0),
2277
+ g[9] || (g[9] = l("div", { class: "self-stretch w-px bg-[#ccc] my-[1px]" }, null, -1)),
2246
2278
  l("button", {
2247
2279
  type: "button",
2248
2280
  class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
2249
2281
  "aria-hidden": "true",
2250
2282
  disabled: s.value,
2251
- onClick: b[3] || (b[3] = ke((w) => g(), ["stop"])),
2283
+ onClick: g[4] || (g[4] = ke((x) => b(), ["stop"])),
2252
2284
  title: m.value ? "Закрити список" : "Відкрити список"
2253
- }, b[7] || (b[7] = [
2285
+ }, g[8] || (g[8] = [
2254
2286
  l("svg", {
2255
2287
  height: "20",
2256
2288
  width: "20",
@@ -2259,10 +2291,10 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
2259
2291
  }, [
2260
2292
  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" })
2261
2293
  ], -1)
2262
- ]), 8, ha)
2294
+ ]), 8, xa)
2263
2295
  ])
2264
- ], 42, na),
2265
- (i(), me(Mt, { to: "body" }, [
2296
+ ], 42, aa),
2297
+ (i(), ve(jt, { to: "body" }, [
2266
2298
  m.value ? (i(), d("div", {
2267
2299
  key: 0,
2268
2300
  ref_key: "dropdownRef",
@@ -2279,62 +2311,62 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
2279
2311
  ref_key: "listRef",
2280
2312
  ref: p
2281
2313
  }, [
2282
- Z.value.length ? (i(!0), d(re, { key: 0 }, fe(Z.value, (w, P) => (i(), d("div", {
2283
- key: w.id,
2314
+ K.value.length ? (i(!0), d(re, { key: 0 }, fe(K.value, (x, R) => (i(), d("div", {
2315
+ key: x.id,
2284
2316
  ref_for: !0,
2285
- ref: (ne) => K.value[P] = ne,
2317
+ ref: (ae) => Z.value[R] = ae,
2286
2318
  class: E([
2287
2319
  "flex px-3 py-2 cursor-default select-none text-gray-900 ",
2288
- M(w.id) ? "bg-blue-500 text-white" : "bg-white hover:bg-blue-100",
2289
- R.value === P && !M(w.id) ? "bg-blue-100" : ""
2320
+ M(x.id) ? "bg-blue-500 text-white" : "bg-white hover:bg-blue-100",
2321
+ H.value === R && !M(x.id) ? "bg-blue-100" : ""
2290
2322
  ]),
2291
- "aria-disabled": M(w.id) ? "true" : "false",
2323
+ "aria-disabled": M(x.id) ? "true" : "false",
2292
2324
  role: "option",
2293
2325
  tabindex: "-1",
2294
- onClick: (ne) => he(w)
2326
+ onClick: (ae) => he(x)
2295
2327
  }, [
2296
- w?.color ? (i(), d("span", {
2328
+ x?.color ? (i(), d("span", {
2297
2329
  key: 0,
2298
2330
  class: "w-[11px] h-[11px] rounded-full block mr-1 mt-1.5",
2299
- style: be({ backgroundColor: w?.color })
2300
- }, null, 4)) : D("", !0),
2331
+ style: be({ backgroundColor: x?.color })
2332
+ }, null, 4)) : F("", !0),
2301
2333
  l("div", {
2302
2334
  class: E([
2303
2335
  "leading-[19px]",
2304
- R.value === w.id ? "text-white" : "",
2336
+ H.value === x.id ? "text-white" : "",
2305
2337
  // active style like react-select
2306
- (R.value === P, "")
2338
+ (H.value === R, "")
2307
2339
  ])
2308
2340
  }, [
2309
2341
  j.value ? (i(), d("span", {
2310
2342
  key: 0,
2311
- innerHTML: C(w)
2312
- }, null, 8, ba)) : (i(), d(re, { key: 1 }, [
2313
- ge(G(w.text), 1)
2343
+ innerHTML: C(x)
2344
+ }, null, 8, ka)) : (i(), d(re, { key: 1 }, [
2345
+ ge(G(x.text), 1)
2314
2346
  ], 64))
2315
2347
  ], 2)
2316
- ], 10, ga))), 128)) : (i(), d("div", ya, " No options "))
2348
+ ], 10, wa))), 128)) : (i(), d("div", _a, " No options "))
2317
2349
  ], 4)
2318
- ], 4)) : D("", !0)
2350
+ ], 4)) : F("", !0)
2319
2351
  ]))
2320
2352
  ], 2),
2321
2353
  t.add ? (i(), d("button", {
2322
2354
  key: 0,
2323
- onClick: Ut,
2355
+ onClick: Pt,
2324
2356
  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",
2325
2357
  disabled: s.value,
2326
2358
  type: "button"
2327
2359
  }, [
2328
- A(qe, {
2360
+ T(qe, {
2329
2361
  width: "16",
2330
2362
  height: "16"
2331
2363
  }),
2332
- b[11] || (b[11] = l("span", null, "Додати", -1))
2333
- ], 8, xa)) : D("", !0)
2364
+ g[12] || (g[12] = l("span", null, "Додати", -1))
2365
+ ], 8, $a)) : F("", !0)
2334
2366
  ], 512)
2335
2367
  ], 64));
2336
2368
  }
2337
- }), wa = ["placeholder", "disabled"], ka = /* @__PURE__ */ U({
2369
+ }), Ca = ["placeholder", "disabled"], Va = /* @__PURE__ */ U({
2338
2370
  __name: "vs-input-textarea",
2339
2371
  props: /* @__PURE__ */ ie({
2340
2372
  style: { default: () => ({}) },
@@ -2351,7 +2383,7 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
2351
2383
  emits: ["update:modelValue"],
2352
2384
  setup(o) {
2353
2385
  const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue");
2354
- return (n, s) => ae((i(), d("textarea", {
2386
+ return (n, s) => ne((i(), d("textarea", {
2355
2387
  "onUpdate:modelValue": s[0] || (s[0] = (r) => a.value = r),
2356
2388
  placeholder: n.placeholder,
2357
2389
  disabled: n.disabled,
@@ -2360,11 +2392,11 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
2360
2392
  style: {
2361
2393
  border: "1px solid #CFD9E0"
2362
2394
  }
2363
- }, null, 10, wa)), [
2364
- [ve, a.value]
2395
+ }, null, 10, Ca)), [
2396
+ [me, a.value]
2365
2397
  ]);
2366
2398
  }
2367
- }), _a = {}, $a = {
2399
+ }), Ma = {}, La = {
2368
2400
  xmlns: "http://www.w3.org/2000/svg",
2369
2401
  viewBox: "0 0 24 24",
2370
2402
  fill: "none",
@@ -2374,8 +2406,8 @@ const kn = /* @__PURE__ */ X(yn, [["render", wn]]), _n = { class: "flex flex-col
2374
2406
  "stroke-linejoin": "round",
2375
2407
  class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
2376
2408
  };
2377
- function Ca(o, e) {
2378
- return i(), d("svg", $a, e[0] || (e[0] = [
2409
+ function Sa(o, e) {
2410
+ return i(), d("svg", La, e[0] || (e[0] = [
2379
2411
  l("path", {
2380
2412
  stroke: "none",
2381
2413
  d: "M0 0h24v24H0z",
@@ -2385,7 +2417,7 @@ function Ca(o, e) {
2385
2417
  l("path", { d: "M21 21l-6 -6" }, null, -1)
2386
2418
  ]));
2387
2419
  }
2388
- const Va = /* @__PURE__ */ X(_a, [["render", Ca]]), Ma = {}, La = {
2420
+ const Ba = /* @__PURE__ */ X(Ma, [["render", Sa]]), ja = {}, Ea = {
2389
2421
  class: "flex-shrink-0 mt-0.5 size-3.5",
2390
2422
  xmlns: "http://www.w3.org/2000/svg",
2391
2423
  viewBox: "0 0 24 24",
@@ -2395,15 +2427,15 @@ const Va = /* @__PURE__ */ X(_a, [["render", Ca]]), Ma = {}, La = {
2395
2427
  "stroke-linecap": "round",
2396
2428
  "stroke-linejoin": "round"
2397
2429
  };
2398
- function Sa(o, e) {
2399
- return i(), d("svg", La, e[0] || (e[0] = [
2430
+ function Ia(o, e) {
2431
+ return i(), d("svg", Ea, e[0] || (e[0] = [
2400
2432
  l("path", { d: "m3 16 4 4 4-4" }, null, -1),
2401
2433
  l("path", { d: "M7 20V4" }, null, -1),
2402
2434
  l("path", { d: "m21 8-4-4-4 4" }, null, -1),
2403
2435
  l("path", { d: "M17 4v16" }, null, -1)
2404
2436
  ]));
2405
2437
  }
2406
- const Ba = /* @__PURE__ */ X(Ma, [["render", Sa]]), ja = {}, Ea = {
2438
+ const za = /* @__PURE__ */ X(ja, [["render", Ia]]), Aa = {}, Ta = {
2407
2439
  xmlns: "http://www.w3.org/2000/svg",
2408
2440
  width: "14",
2409
2441
  height: "14",
@@ -2414,8 +2446,8 @@ const Ba = /* @__PURE__ */ X(Ma, [["render", Sa]]), ja = {}, Ea = {
2414
2446
  "stroke-linecap": "round",
2415
2447
  "stroke-linejoin": "round"
2416
2448
  };
2417
- function Ia(o, e) {
2418
- return i(), d("svg", Ea, e[0] || (e[0] = [
2449
+ function Fa(o, e) {
2450
+ return i(), d("svg", Ta, e[0] || (e[0] = [
2419
2451
  l("path", {
2420
2452
  stroke: "none",
2421
2453
  d: "M0 0h24v24H0z",
@@ -2426,7 +2458,7 @@ function Ia(o, e) {
2426
2458
  l("path", { d: "M12 4l0 12" }, null, -1)
2427
2459
  ]));
2428
2460
  }
2429
- const za = /* @__PURE__ */ X(ja, [["render", Ia]]), Aa = {}, Ta = {
2461
+ const Oa = /* @__PURE__ */ X(Aa, [["render", Fa]]), Da = {}, Ua = {
2430
2462
  xmlns: "http://www.w3.org/2000/svg",
2431
2463
  viewBox: "0 0 24 24",
2432
2464
  fill: "none",
@@ -2435,8 +2467,8 @@ const za = /* @__PURE__ */ X(ja, [["render", Ia]]), Aa = {}, Ta = {
2435
2467
  "stroke-linecap": "round",
2436
2468
  "stroke-linejoin": "round"
2437
2469
  };
2438
- function Fa(o, e) {
2439
- return i(), d("svg", Ta, e[0] || (e[0] = [
2470
+ function Pa(o, e) {
2471
+ return i(), d("svg", Ua, e[0] || (e[0] = [
2440
2472
  l("path", {
2441
2473
  stroke: "none",
2442
2474
  d: "M0 0h24v24H0z",
@@ -2447,7 +2479,7 @@ function Fa(o, e) {
2447
2479
  l("path", { d: "M12 4l0 12" }, null, -1)
2448
2480
  ]));
2449
2481
  }
2450
- const Oa = /* @__PURE__ */ X(Aa, [["render", Fa]]), Da = {}, Ua = {
2482
+ const Ra = /* @__PURE__ */ X(Da, [["render", Pa]]), Ha = {}, Na = {
2451
2483
  xmlns: "http://www.w3.org/2000/svg",
2452
2484
  viewBox: "0 0 24 24",
2453
2485
  fill: "none",
@@ -2456,22 +2488,22 @@ const Oa = /* @__PURE__ */ X(Aa, [["render", Fa]]), Da = {}, Ua = {
2456
2488
  "stroke-linecap": "round",
2457
2489
  "stroke-linejoin": "round"
2458
2490
  };
2459
- function Pa(o, e) {
2460
- return i(), d("svg", Ua, e[0] || (e[0] = [
2491
+ function qa(o, e) {
2492
+ return i(), d("svg", Na, e[0] || (e[0] = [
2461
2493
  ye('<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)
2462
2494
  ]));
2463
2495
  }
2464
- const kt = /* @__PURE__ */ X(Da, [["render", Pa]]), Ra = {}, Ha = {
2496
+ const Vt = /* @__PURE__ */ X(Ha, [["render", qa]]), Wa = {}, Ga = {
2465
2497
  viewBox: "0 0 178 90",
2466
2498
  fill: "none",
2467
2499
  xmlns: "http://www.w3.org/2000/svg"
2468
2500
  };
2469
- function Na(o, e) {
2470
- return i(), d("svg", Ha, e[0] || (e[0] = [
2501
+ function Ka(o, e) {
2502
+ return i(), d("svg", Ga, e[0] || (e[0] = [
2471
2503
  ye('<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)
2472
2504
  ]));
2473
2505
  }
2474
- const qa = /* @__PURE__ */ X(Ra, [["render", Na]]), Wa = {}, Ga = {
2506
+ const Za = /* @__PURE__ */ X(Wa, [["render", Ka]]), Ja = {}, Ya = {
2475
2507
  xmlns: "http://www.w3.org/2000/svg",
2476
2508
  viewBox: "0 0 24 24",
2477
2509
  fill: "none",
@@ -2480,25 +2512,25 @@ const qa = /* @__PURE__ */ X(Ra, [["render", Na]]), Wa = {}, Ga = {
2480
2512
  "stroke-linecap": "round",
2481
2513
  "stroke-linejoin": "round"
2482
2514
  };
2483
- function Za(o, e) {
2484
- return i(), d("svg", Ga, e[0] || (e[0] = [
2515
+ function Xa(o, e) {
2516
+ return i(), d("svg", Ya, e[0] || (e[0] = [
2485
2517
  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)
2486
2518
  ]));
2487
2519
  }
2488
- const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable border rounded-xl w-full flex-grow" }, Ya = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, Xa = { class: "relative w-full" }, Qa = { class: "table-wrapper flex gap-2" }, es = { class: "vs-popover inline-block text-slate-700" }, ts = { class: "text-center" }, ls = { class: "" }, os = { 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" }, ns = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, as = { class: "text-sm items-center text-gray-800 flex gap-1" }, ss = { class: "w-full overflow-x-auto" }, rs = { class: "w-full table-auto caption-bottom text-sm" }, is = { class: "[&_tr]:border-b" }, us = { 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" }, ds = { 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" }, cs = {
2520
+ const Qa = /* @__PURE__ */ X(Ja, [["render", Xa]]), es = { class: "vs-datatable border rounded-xl w-full flex-grow" }, ts = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, ls = { class: "relative w-full" }, os = { class: "table-wrapper flex gap-2" }, ns = { class: "vs-popover inline-block text-slate-700" }, as = { class: "text-center" }, ss = { class: "" }, rs = { 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" }, is = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, us = { class: "text-sm items-center text-gray-800 flex gap-1" }, ds = { class: "w-full overflow-x-auto" }, cs = { class: "w-full table-auto caption-bottom text-sm" }, ps = { class: "[&_tr]:border-b" }, fs = { 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" }, ms = { 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" }, vs = {
2489
2521
  key: 0,
2490
2522
  colspan: "100%",
2491
2523
  class: "text-center"
2492
- }, ps = { class: "w-full" }, fs = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, ms = ["onDragstart", "onDragover", "onDrop"], vs = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, hs = { class: "flex items-center justify-center" }, gs = {
2524
+ }, hs = { class: "w-full" }, gs = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, bs = ["onDragstart", "onDragover", "onDrop"], ys = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, xs = { class: "flex items-center justify-center" }, ws = {
2493
2525
  key: 0,
2494
2526
  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"
2495
- }, bs = { key: 0 }, ys = ["src"], xs = {
2527
+ }, ks = { key: 0 }, _s = ["src"], $s = {
2496
2528
  key: 1,
2497
2529
  class: "rounded-md max-w-[45px] w-[45px] max-h-[45px] h-[45px] bg-gray-200 flex items-center justify-center"
2498
- }, ws = ["innerHTML"], ks = {
2530
+ }, Cs = ["innerHTML"], Vs = {
2499
2531
  key: 2,
2500
2532
  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"
2501
- }, _s = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, $s = { class: "flex items-center justify-center gap-2" }, Cs = ["onClick"], Vs = ["onClick"], Ms = { class: "vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, Ls = /* @__PURE__ */ U({
2533
+ }, Ms = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, Ls = { class: "flex items-center justify-center gap-2" }, Ss = ["onClick"], Bs = ["onClick"], js = { class: "vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, Es = /* @__PURE__ */ U({
2502
2534
  __name: "vs-input-datatable",
2503
2535
  props: /* @__PURE__ */ ie({
2504
2536
  colModel: {},
@@ -2517,32 +2549,32 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
2517
2549
  setup(o) {
2518
2550
  const e = o, t = de(o, "modelValue"), a = k({}), n = k(""), s = B(() => {
2519
2551
  if (!n.value) return t.value ?? [];
2520
- const z = n.value.toLowerCase();
2552
+ const A = n.value.toLowerCase();
2521
2553
  return t.value.filter((j) => e.colModel?.some((C) => {
2522
2554
  const W = j[C.key];
2523
- return W ? Array.isArray(W) ? W.join(", ").toLowerCase().includes(z) : String(W).toLowerCase().includes(z) : !1;
2555
+ return W ? Array.isArray(W) ? W.join(", ").toLowerCase().includes(A) : String(W).toLowerCase().includes(A) : !1;
2524
2556
  }));
2525
- }), r = k(null), u = k(null), c = k(!1), p = k(null), f = k({ top: 0, left: 0 }), m = (z) => {
2526
- r.value = z;
2527
- }, y = (z) => {
2528
- u.value = z;
2529
- }, S = (z) => {
2530
- if (r.value === null || r.value === z) {
2557
+ }), r = k(null), u = k(null), c = k(!1), p = k(null), f = k({ top: 0, left: 0 }), m = (A) => {
2558
+ r.value = A;
2559
+ }, y = (A) => {
2560
+ u.value = A;
2561
+ }, S = (A) => {
2562
+ if (r.value === null || r.value === A) {
2531
2563
  r.value = null, u.value = null;
2532
2564
  return;
2533
2565
  }
2534
2566
  const j = [...t.value], [C] = j.splice(r.value, 1);
2535
- j.splice(z, 0, C), t.value = j, r.value = null, u.value = null;
2536
- }, q = (z) => {
2537
- const C = z.currentTarget.getBoundingClientRect();
2567
+ j.splice(A, 0, C), t.value = j, r.value = null, u.value = null;
2568
+ }, q = (A) => {
2569
+ const C = A.currentTarget.getBoundingClientRect();
2538
2570
  f.value = { top: C.bottom + window.scrollY, left: C.left + window.scrollX }, c.value = !c.value;
2539
- }, R = () => {
2571
+ }, H = () => {
2540
2572
  p.value && p.value.click();
2541
- }, K = (z) => {
2542
- const j = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tiff", ".tif"], C = z.toLowerCase();
2573
+ }, Z = (A) => {
2574
+ const j = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tiff", ".tif"], C = A.toLowerCase();
2543
2575
  return j.some((W) => C.endsWith(W));
2544
- }, T = (z) => {
2545
- const C = z.target.files?.[0];
2576
+ }, z = (A) => {
2577
+ const C = A.target.files?.[0];
2546
2578
  if (!C) return;
2547
2579
  const W = new FileReader();
2548
2580
  W.onload = (oe) => {
@@ -2556,79 +2588,79 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
2556
2588
  console.error("Error parsing file:", se);
2557
2589
  }
2558
2590
  }, W.readAsText(C);
2559
- }, H = () => {
2560
- const z = JSON.stringify(t.value, null, 2), j = new Blob([z], { type: "application/json" }), C = URL.createObjectURL(j), W = document.createElement("a");
2591
+ }, P = () => {
2592
+ const A = JSON.stringify(t.value, null, 2), j = new Blob([A], { type: "application/json" }), C = URL.createObjectURL(j), W = document.createElement("a");
2561
2593
  W.href = C, W.download = "data.json", W.click(), URL.revokeObjectURL(C);
2562
2594
  };
2563
2595
  _e(async () => {
2564
- const z = e.colModel?.filter((j) => j.data);
2565
- z?.length && Promise.all(z.map(async (j) => {
2596
+ const A = e.colModel?.filter((j) => j.data);
2597
+ A?.length && Promise.all(A.map(async (j) => {
2566
2598
  const W = await (await fetch(`/api/suggest/${j.data}`)).json();
2567
2599
  a.value[j.key] = W.data;
2568
2600
  }));
2569
2601
  });
2570
2602
  const I = k(""), v = k(!1);
2571
- let x = "edit", V = 0;
2572
- const $ = k({}), F = k({});
2603
+ let w = "edit", V = 0;
2604
+ const $ = k({}), O = k({});
2573
2605
  async function te() {
2574
- I.value = "Додати", v.value = !0, x = "add", $.value = {};
2606
+ I.value = "Додати", v.value = !0, w = "add", $.value = {};
2575
2607
  }
2576
- function J(z, j) {
2608
+ function J(A, j) {
2577
2609
  const C = j.key || j.name;
2578
- return a.value[C] && z[C] ? a.value[C].find((W) => W.id.toString() === z[C].toString())?.text ?? z[C] : z[C] || "-";
2610
+ return a.value[C] && A[C] ? a.value[C].find((W) => W.id.toString() === A[C].toString())?.text ?? A[C] : A[C] || "-";
2579
2611
  }
2580
- async function M(z, j) {
2581
- I.value = "Редагувати", v.value = !0, x = "edit", V = j, $.value = { ...z };
2612
+ async function M(A, j) {
2613
+ I.value = "Редагувати", v.value = !0, w = "edit", V = j, $.value = { ...A };
2582
2614
  }
2583
- function Z() {
2584
- const z = F.value.validate();
2585
- if (z) {
2586
- ce({ type: "warning", title: "Помилка валідації", message: Object.entries(z).map(([j, C]) => `${j}: ${C}`).join(`
2615
+ function K() {
2616
+ const A = O.value.validate();
2617
+ if (A) {
2618
+ ce({ type: "warning", title: "Помилка валідації", message: Object.entries(A).map(([j, C]) => `${j}: ${C}`).join(`
2587
2619
  `) });
2588
2620
  return;
2589
2621
  }
2590
- x === "add" ? Array.isArray(t.value) ? t.value = [...t.value, $.value] : t.value = [$.value] : t.value = t.value.map((j, C) => C === V ? $.value : j), v.value = !1;
2622
+ w === "add" ? Array.isArray(t.value) ? t.value = [...t.value, $.value] : t.value = [$.value] : t.value = t.value.map((j, C) => C === V ? $.value : j), v.value = !1;
2591
2623
  }
2592
- function N(z) {
2593
- t.value = t.value.filter((j, C) => C !== z);
2624
+ function N(A) {
2625
+ t.value = t.value.filter((j, C) => C !== A);
2594
2626
  }
2595
2627
  function le() {
2596
2628
  v.value = !1;
2597
2629
  }
2598
- return (z, j) => (i(), d("div", Ja, [
2599
- l("div", Ya, [
2600
- l("div", Xa, [
2601
- A(Va, {
2630
+ return (A, j) => (i(), d("div", es, [
2631
+ l("div", ts, [
2632
+ l("div", ls, [
2633
+ T(Ba, {
2602
2634
  width: "14",
2603
2635
  height: "14",
2604
2636
  class: "absolute left-3 top-1/2 transform -translate-y-1/2 text-stone-500"
2605
2637
  }),
2606
- ae(l("input", {
2638
+ ne(l("input", {
2607
2639
  type: "text",
2608
2640
  "onUpdate:modelValue": j[0] || (j[0] = (C) => n.value = C),
2609
2641
  placeholder: "Пошук",
2610
2642
  class: "py-2 px-3 pl-10 w-full bg-gray-100 h-[36px] rounded-[8px] text-[15px] leading-[18px] focus:border-1 text-stone-800 placeholder:text-[#6B7280] focus:outline-blue-500 focus:outline-2"
2611
2643
  }, null, 512), [
2612
- [ve, n.value]
2644
+ [me, n.value]
2613
2645
  ])
2614
2646
  ]),
2615
- l("div", Qa, [
2647
+ l("div", os, [
2616
2648
  l("input", {
2617
2649
  ref_key: "fileInput",
2618
2650
  ref: p,
2619
- onChange: T,
2651
+ onChange: z,
2620
2652
  class: "hidden",
2621
2653
  accept: ".json",
2622
2654
  type: "file"
2623
2655
  }, null, 544),
2624
- l("div", es, [
2625
- l("div", ts, [
2626
- l("div", ls, [
2656
+ l("div", ns, [
2657
+ l("div", as, [
2658
+ l("div", ss, [
2627
2659
  l("button", {
2628
2660
  onClick: q,
2629
2661
  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"
2630
2662
  }, [
2631
- A(Ba, {
2663
+ T(za, {
2632
2664
  height: "16",
2633
2665
  width: "16"
2634
2666
  })
@@ -2637,19 +2669,19 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
2637
2669
  ])
2638
2670
  ])
2639
2671
  ]),
2640
- (i(), me(Mt, { to: "body" }, [
2672
+ (i(), ve(jt, { to: "body" }, [
2641
2673
  c.value ? (i(), d("div", {
2642
2674
  key: 0,
2643
2675
  class: "text-slate-700 vsTailwind vs-popover__content bottom",
2644
2676
  style: be([{ width: "fit-content", "z-index": "10002", position: "fixed" }, { position: "absolute", top: f.value.top + "px", left: f.value.left + "px" }])
2645
2677
  }, [
2646
- l("div", os, [
2647
- l("div", ns, [
2678
+ l("div", rs, [
2679
+ l("div", is, [
2648
2680
  l("button", {
2649
- onClick: R,
2681
+ onClick: H,
2650
2682
  class: "text-slate-700 flex items-center gap-1 px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
2651
2683
  }, [
2652
- A(za, {
2684
+ T(Oa, {
2653
2685
  class: "text-black",
2654
2686
  width: "14",
2655
2687
  height: "14"
@@ -2657,11 +2689,11 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
2657
2689
  j[4] || (j[4] = ge(" Імпортувати ", -1))
2658
2690
  ]),
2659
2691
  l("button", {
2660
- onClick: H,
2692
+ onClick: P,
2661
2693
  class: "text-slate-700 flex items-center px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
2662
2694
  }, [
2663
- l("span", as, [
2664
- A(Oa, {
2695
+ l("span", us, [
2696
+ T(Ra, {
2665
2697
  class: "text-black",
2666
2698
  width: "14",
2667
2699
  height: "14"
@@ -2671,28 +2703,28 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
2671
2703
  ])
2672
2704
  ])
2673
2705
  ])
2674
- ], 4)) : D("", !0)
2706
+ ], 4)) : F("", !0)
2675
2707
  ])),
2676
2708
  l("button", {
2677
2709
  onClick: te,
2678
2710
  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"
2679
2711
  }, [
2680
- A(qe),
2712
+ T(qe),
2681
2713
  j[6] || (j[6] = ge(" Додати ", -1))
2682
2714
  ])
2683
2715
  ]),
2684
- l("div", ss, [
2685
- l("table", rs, [
2686
- l("thead", is, [
2687
- l("tr", us, [
2688
- l("th", ds, [
2689
- A(kt, {
2716
+ l("div", ds, [
2717
+ l("table", cs, [
2718
+ l("thead", ps, [
2719
+ l("tr", fs, [
2720
+ l("th", ms, [
2721
+ T(Vt, {
2690
2722
  width: "24",
2691
2723
  height: "24",
2692
2724
  class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
2693
2725
  })
2694
2726
  ]),
2695
- (i(!0), d(re, null, fe(z.colModel, (C) => (i(), d("th", {
2727
+ (i(!0), d(re, null, fe(A.colModel, (C) => (i(), d("th", {
2696
2728
  key: C.key,
2697
2729
  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]"
2698
2730
  }, G(C.ua || C.label), 1))), 128)),
@@ -2702,17 +2734,17 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
2702
2734
  l("tbody", {
2703
2735
  class: E({ "[&_tr:last-child]:border-0": !u.value })
2704
2736
  }, [
2705
- s.value.length === 0 ? (i(), d("td", cs, [
2706
- l("div", ps, [
2707
- l("div", fs, [
2708
- A(qa, { class: "w-48 mx-auto" }),
2737
+ s.value.length === 0 ? (i(), d("td", vs, [
2738
+ l("div", hs, [
2739
+ l("div", gs, [
2740
+ T(Za, { class: "w-48 mx-auto" }),
2709
2741
  j[8] || (j[8] = l("div", { class: "max-w-sm mx-auto mt-6" }, [
2710
2742
  l("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "Нічого не знайдено"),
2711
2743
  l("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
2712
2744
  ], -1))
2713
2745
  ])
2714
2746
  ])
2715
- ])) : D("", !0),
2747
+ ])) : F("", !0),
2716
2748
  (i(!0), d(re, null, fe(s.value, (C, W) => (i(), d("tr", {
2717
2749
  key: C.id,
2718
2750
  class: E(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move", {
@@ -2724,86 +2756,86 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
2724
2756
  onDragover: ke((oe) => y(W), ["prevent"]),
2725
2757
  onDrop: (oe) => S(W)
2726
2758
  }, [
2727
- l("td", vs, [
2728
- l("div", hs, [
2729
- A(kt, {
2759
+ l("td", ys, [
2760
+ l("div", xs, [
2761
+ T(Vt, {
2730
2762
  width: "24",
2731
2763
  height: "24",
2732
2764
  class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
2733
2765
  })
2734
2766
  ])
2735
2767
  ]),
2736
- (i(!0), d(re, null, fe(z.colModel, (oe) => (i(), d("td", {
2768
+ (i(!0), d(re, null, fe(A.colModel, (oe) => (i(), d("td", {
2737
2769
  key: oe.key,
2738
2770
  class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"
2739
2771
  }, [
2740
- oe.type === "file" ? (i(), d("div", gs, [
2741
- K(J(C, oe)) ? (i(), d("div", bs, [
2772
+ oe.type === "file" ? (i(), d("div", ws, [
2773
+ Z(J(C, oe)) ? (i(), d("div", ks, [
2742
2774
  l("img", {
2743
2775
  src: J(C, oe),
2744
2776
  alt: "alt",
2745
2777
  width: "45",
2746
2778
  class: "rounded-md max-w-[45px] h-[45px] object-cover"
2747
- }, null, 8, ys)
2748
- ])) : (i(), d("div", xs, [
2749
- A(jt, { class: "w-[25px] min-w-[25px] h-[25px]" })
2779
+ }, null, 8, _s)
2780
+ ])) : (i(), d("div", $s, [
2781
+ T(At, { class: "w-[25px] min-w-[25px] h-[25px]" })
2750
2782
  ]))
2751
2783
  ])) : oe.type === "tiptap-editor" ? (i(), d("div", {
2752
2784
  key: 1,
2753
2785
  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",
2754
2786
  innerHTML: J(C, oe)
2755
- }, null, 8, ws)) : (i(), d("div", ks, G(J(C, oe)), 1))
2787
+ }, null, 8, Cs)) : (i(), d("div", Vs, G(J(C, oe)), 1))
2756
2788
  ]))), 128)),
2757
- l("td", _s, [
2758
- l("div", $s, [
2789
+ l("td", Ms, [
2790
+ l("div", Ls, [
2759
2791
  l("button", {
2760
2792
  onClick: (oe) => M(C, W),
2761
2793
  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"
2762
2794
  }, [
2763
- A(Ka, {
2795
+ T(Qa, {
2764
2796
  width: "24",
2765
2797
  height: "24",
2766
2798
  class: "w-3 h-3"
2767
2799
  })
2768
- ], 8, Cs),
2800
+ ], 8, Ss),
2769
2801
  l("button", {
2770
2802
  onClick: (oe) => N(W),
2771
2803
  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"
2772
2804
  }, [
2773
- A(et, {
2805
+ T(et, {
2774
2806
  width: "24",
2775
2807
  height: "24",
2776
2808
  class: "w-3 h-3"
2777
2809
  })
2778
- ], 8, Vs)
2810
+ ], 8, Bs)
2779
2811
  ])
2780
2812
  ])
2781
- ], 42, ms))), 128))
2813
+ ], 42, bs))), 128))
2782
2814
  ], 2)
2783
2815
  ])
2784
2816
  ]),
2785
- A(ee(Lt), {
2817
+ T(ee(Et), {
2786
2818
  visible: v.value,
2787
2819
  title: I.value,
2788
2820
  size: "lg",
2789
2821
  onClose: le
2790
2822
  }, {
2791
2823
  default: Ee(() => [
2792
- A(We, {
2824
+ T(We, {
2793
2825
  schema: e.colModel,
2794
2826
  values: $.value,
2795
2827
  "onUpdate:values": j[1] || (j[1] = (C) => $.value = C),
2796
- form: F.value,
2797
- "onUpdate:form": j[2] || (j[2] = (C) => F.value = C)
2828
+ form: O.value,
2829
+ "onUpdate:form": j[2] || (j[2] = (C) => O.value = C)
2798
2830
  }, null, 8, ["schema", "values", "form"]),
2799
- l("div", Ms, [
2831
+ l("div", js, [
2800
2832
  l("button", {
2801
2833
  type: "button",
2802
2834
  onClick: j[3] || (j[3] = (C) => v.value = !1),
2803
2835
  class: "vs-button 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-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"
2804
2836
  }, " Скасувати "),
2805
2837
  l("button", {
2806
- onClick: Z,
2838
+ onClick: K,
2807
2839
  type: "button",
2808
2840
  class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border-1 border-transparent text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1"
2809
2841
  }, " Зберегти ")
@@ -2813,7 +2845,7 @@ const Ka = /* @__PURE__ */ X(Wa, [["render", Za]]), Ja = { class: "vs-datatable
2813
2845
  }, 8, ["visible", "title"])
2814
2846
  ]));
2815
2847
  }
2816
- }), Ss = {
2848
+ }), Is = {
2817
2849
  draw: {
2818
2850
  toolbar: {
2819
2851
  actions: {
@@ -2933,7 +2965,7 @@ function Ne(o) {
2933
2965
  features: (o.features || []).map((e) => Ne(e)).filter(Boolean)
2934
2966
  } : o : null;
2935
2967
  }
2936
- function Bs(o) {
2968
+ function zs(o) {
2937
2969
  return o ? o.type === "FeatureCollection" || o.type === "Feature" ? Ne(o) : o.geom ? {
2938
2970
  type: "Feature",
2939
2971
  geometry: Ne({
@@ -2947,7 +2979,7 @@ function Bs(o) {
2947
2979
  properties: {}
2948
2980
  } : null : null;
2949
2981
  }
2950
- const js = {}, Es = {
2982
+ const As = {}, Ts = {
2951
2983
  xmlns: "http://www.w3.org/2000/svg",
2952
2984
  viewBox: "0 0 24 24",
2953
2985
  stroke: "currentColor",
@@ -2957,8 +2989,8 @@ const js = {}, Es = {
2957
2989
  "stroke-linejoin": "round",
2958
2990
  class: "icon icon-tabler icons-tabler-outline icon-tabler-map-pin"
2959
2991
  };
2960
- function Is(o, e) {
2961
- return i(), d("svg", Es, e[0] || (e[0] = [
2992
+ function Fs(o, e) {
2993
+ return i(), d("svg", Ts, e[0] || (e[0] = [
2962
2994
  l("path", {
2963
2995
  stroke: "none",
2964
2996
  d: "M0 0h24v24H0z",
@@ -2968,7 +3000,7 @@ function Is(o, e) {
2968
3000
  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)
2969
3001
  ]));
2970
3002
  }
2971
- const zs = /* @__PURE__ */ X(js, [["render", Is]]), As = {}, Ts = {
3003
+ const Os = /* @__PURE__ */ X(As, [["render", Fs]]), Ds = {}, Us = {
2972
3004
  xmlns: "http://www.w3.org/2000/svg",
2973
3005
  viewBox: "0 0 24 24",
2974
3006
  fill: "none",
@@ -2978,8 +3010,8 @@ const zs = /* @__PURE__ */ X(js, [["render", Is]]), As = {}, Ts = {
2978
3010
  "stroke-linejoin": "round",
2979
3011
  class: "icon icon-tabler icons-tabler-outline icon-tabler-line"
2980
3012
  };
2981
- function Fs(o, e) {
2982
- return i(), d("svg", Ts, e[0] || (e[0] = [
3013
+ function Ps(o, e) {
3014
+ return i(), d("svg", Us, e[0] || (e[0] = [
2983
3015
  l("path", {
2984
3016
  stroke: "none",
2985
3017
  d: "M0 0h24v24H0z",
@@ -2990,7 +3022,7 @@ function Fs(o, e) {
2990
3022
  l("path", { d: "M7.5 16.5l9 -9" }, null, -1)
2991
3023
  ]));
2992
3024
  }
2993
- const Os = /* @__PURE__ */ X(As, [["render", Fs]]), Ds = {}, Us = {
3025
+ const Rs = /* @__PURE__ */ X(Ds, [["render", Ps]]), Hs = {}, Ns = {
2994
3026
  xmlns: "http://www.w3.org/2000/svg",
2995
3027
  viewBox: "0 0 24 24",
2996
3028
  fill: "none",
@@ -3000,12 +3032,12 @@ const Os = /* @__PURE__ */ X(As, [["render", Fs]]), Ds = {}, Us = {
3000
3032
  "stroke-linejoin": "round",
3001
3033
  class: "icon icon-tabler icons-tabler-outline icon-tabler-polygon"
3002
3034
  };
3003
- function Ps(o, e) {
3004
- return i(), d("svg", Us, e[0] || (e[0] = [
3035
+ function qs(o, e) {
3036
+ return i(), d("svg", Ns, e[0] || (e[0] = [
3005
3037
  ye('<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)
3006
3038
  ]));
3007
3039
  }
3008
- const Rs = /* @__PURE__ */ X(Ds, [["render", Ps]]), Hs = {}, Ns = {
3040
+ const Ws = /* @__PURE__ */ X(Hs, [["render", qs]]), Gs = {}, Ks = {
3009
3041
  xmlns: "http://www.w3.org/2000/svg",
3010
3042
  viewBox: "0 0 24 24",
3011
3043
  fill: "none",
@@ -3015,12 +3047,12 @@ const Rs = /* @__PURE__ */ X(Ds, [["render", Ps]]), Hs = {}, Ns = {
3015
3047
  "stroke-linejoin": "round",
3016
3048
  class: "icon icon-tabler icons-tabler-outline icon-tabler-topology-ring-3"
3017
3049
  };
3018
- function qs(o, e) {
3019
- return i(), d("svg", Ns, e[0] || (e[0] = [
3050
+ function Zs(o, e) {
3051
+ return i(), d("svg", Ks, e[0] || (e[0] = [
3020
3052
  ye('<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)
3021
3053
  ]));
3022
3054
  }
3023
- const Ws = /* @__PURE__ */ X(Hs, [["render", qs]]), Gs = {}, Zs = {
3055
+ const Js = /* @__PURE__ */ X(Gs, [["render", Zs]]), Ys = {}, Xs = {
3024
3056
  version: "1.1",
3025
3057
  viewBox: "0 0 14 14",
3026
3058
  xmlns: "http://www.w3.org/2000/svg",
@@ -3028,8 +3060,8 @@ const Ws = /* @__PURE__ */ X(Hs, [["render", qs]]), Gs = {}, Zs = {
3028
3060
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
3029
3061
  class: "fullscreen-icon"
3030
3062
  };
3031
- function Ks(o, e) {
3032
- return i(), d("svg", Zs, e[0] || (e[0] = [
3063
+ function Qs(o, e) {
3064
+ return i(), d("svg", Xs, e[0] || (e[0] = [
3033
3065
  l("title", null, null, -1),
3034
3066
  l("desc", null, null, -1),
3035
3067
  l("defs", null, null, -1),
@@ -3058,10 +3090,10 @@ function Ks(o, e) {
3058
3090
  ], -1)
3059
3091
  ]));
3060
3092
  }
3061
- const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-widget flex flex-col gap-2 rounded-xl widget min-w-[200px]" }, Xs = {
3093
+ const er = /* @__PURE__ */ X(Ys, [["render", Qs]]), tr = { class: "map-search-widget flex flex-col gap-2 rounded-xl widget min-w-[200px]" }, lr = {
3062
3094
  key: 0,
3063
3095
  class: "vs-select__options absolute z-50 mt-1 w-full bg-white border border-gray-300 shadow-lg rounded-lg text-sm"
3064
- }, Qs = ["onClick"], er = { class: "relative flex-1 min-w-[140px]" }, tr = ["placeholder"], lr = "https://data.softpro.ua/api-user/gis-url-proxy", or = "https://geo.rv.ua/api-user/dzk.api", nr = /* @__PURE__ */ U({
3096
+ }, or = ["onClick"], nr = { class: "relative flex-1 min-w-[140px]" }, ar = ["placeholder"], sr = "https://data.softpro.ua/api-user/gis-url-proxy", rr = "https://geo.rv.ua/api-user/dzk.api", ir = /* @__PURE__ */ U({
3065
3097
  __name: "map-search",
3066
3098
  props: {
3067
3099
  config: {}
@@ -3069,7 +3101,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3069
3101
  emits: ["goToCoordinates"],
3070
3102
  setup(o, { emit: e }) {
3071
3103
  const t = o, a = e, n = ["here", "xy", "parcel"], s = B(() => {
3072
- const v = t.config?.tools?.filter((x) => n.includes(x));
3104
+ const v = t.config?.tools?.filter((w) => n.includes(w));
3073
3105
  return v && v.length ? v : n;
3074
3106
  }), r = B(() => t.config?.placeholder?.trim() || "Пошук…"), u = k(s.value[0] ?? n[0]);
3075
3107
  ue(s, (v) => {
@@ -3084,8 +3116,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3084
3116
  }
3085
3117
  function y(v) {
3086
3118
  if (!p.value) return;
3087
- const x = f.value;
3088
- x && !x.contains(v.target) && (p.value = !1);
3119
+ const w = f.value;
3120
+ w && !w.contains(v.target) && (p.value = !1);
3089
3121
  }
3090
3122
  _e(() => {
3091
3123
  window.addEventListener("click", y, !0);
@@ -3096,22 +3128,22 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3096
3128
  return v === "xy" ? "Координати" : v === "parcel" ? "Кадастр" : "Адреси";
3097
3129
  }
3098
3130
  function q(v) {
3099
- const x = v.replace(/[,]+/g, " ").trim();
3100
- if (!x) return null;
3101
- const V = x.split(/\s+/).filter(Boolean);
3131
+ const w = v.replace(/[,]+/g, " ").trim();
3132
+ if (!w) return null;
3133
+ const V = w.split(/\s+/).filter(Boolean);
3102
3134
  if (V.length < 2) return null;
3103
3135
  const $ = V.slice(0, 2).map(Number);
3104
3136
  if (!$.every((le) => Number.isFinite(le))) return null;
3105
- let [F, te] = $, J = F, M = te;
3106
- const Z = (le) => Math.abs(le) <= 90, N = (le) => Math.abs(le) <= 180;
3107
- if (!Z(J) || !N(M))
3108
- if (Z(M) && N(J))
3109
- J = te, M = F;
3137
+ let [O, te] = $, J = O, M = te;
3138
+ const K = (le) => Math.abs(le) <= 90, N = (le) => Math.abs(le) <= 180;
3139
+ if (!K(J) || !N(M))
3140
+ if (K(M) && N(J))
3141
+ J = te, M = O;
3110
3142
  else
3111
3143
  return null;
3112
3144
  return { lat: J, lng: M };
3113
3145
  }
3114
- function R(v) {
3146
+ function H(v) {
3115
3147
  return (v?.items || []).map((V, $) => ({
3116
3148
  id: String(V?.id ?? $),
3117
3149
  title: V?.title || V?.address?.label || "Знайдений обʼєкт",
@@ -3119,69 +3151,69 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3119
3151
  lng: Number(V?.position?.lng)
3120
3152
  })).filter((V) => Number.isFinite(V.lat) && Number.isFinite(V.lng));
3121
3153
  }
3122
- function K(v) {
3123
- const x = v?.result || v?.data || v;
3124
- if (!x) return [];
3125
- const V = x.geom_centroid;
3154
+ function Z(v) {
3155
+ const w = v?.result || v?.data || v;
3156
+ if (!w) return [];
3157
+ const V = w.geom_centroid;
3126
3158
  if (!V || !Array.isArray(V.coordinates)) return [];
3127
- const [$, F] = V.coordinates;
3128
- return !Number.isFinite(F) || !Number.isFinite($) ? [] : [
3159
+ const [$, O] = V.coordinates;
3160
+ return !Number.isFinite(O) || !Number.isFinite($) ? [] : [
3129
3161
  {
3130
3162
  id: "parcel",
3131
- title: x.cadnum || x.cad_num || "Земельна ділянка",
3132
- lat: F,
3163
+ title: w.cadnum || w.cad_num || "Земельна ділянка",
3164
+ lat: O,
3133
3165
  lng: $
3134
3166
  }
3135
3167
  ];
3136
3168
  }
3137
- function T(v) {
3169
+ function z(v) {
3138
3170
  const V = v.replace(/\s+/g, "").split(":");
3139
3171
  if (V.length !== 4) return !1;
3140
3172
  const $ = [10, 2, 3, 4];
3141
- return V.every((F, te) => F.length === $[te] && /^\d+$/.test(F));
3173
+ return V.every((O, te) => O.length === $[te] && /^\d+$/.test(O));
3142
3174
  }
3143
- function H(v) {
3175
+ function P(v) {
3144
3176
  a("goToCoordinates", [v.lat, v.lng]);
3145
3177
  }
3146
3178
  async function I() {
3147
3179
  const v = c.value.trim();
3148
3180
  if (v) {
3149
3181
  if (u.value === "xy") {
3150
- const x = q(v);
3151
- if (!x) {
3182
+ const w = q(v);
3183
+ if (!w) {
3152
3184
  ce({ type: "warning", title: "Пошук координат", message: "Не знайдено або невірний формат координат" });
3153
3185
  return;
3154
3186
  }
3155
- H(x), c.value = "";
3187
+ P(w), c.value = "";
3156
3188
  return;
3157
3189
  }
3158
3190
  try {
3159
- const x = new URL(u.value === "here" ? lr : or);
3191
+ const w = new URL(u.value === "here" ? sr : rr);
3160
3192
  if (u.value === "here")
3161
- x.searchParams.set("searchtext", v);
3193
+ w.searchParams.set("searchtext", v);
3162
3194
  else {
3163
- if (!T(v)) {
3195
+ if (!z(v)) {
3164
3196
  ce({ type: "warning", title: "Пошук кадастру", message: "Кадастровий номер має формат ХХХХХХХХХХ:ХХ:ХХХ:ХХХХ" });
3165
3197
  return;
3166
3198
  }
3167
- x.searchParams.set("cad_num", v);
3199
+ w.searchParams.set("cad_num", v);
3168
3200
  }
3169
- const V = await fetch(x.toString());
3201
+ const V = await fetch(w.toString());
3170
3202
  if (!V.ok) throw new Error(`HTTP ${V.status}`);
3171
- const $ = await V.json(), F = u.value === "here" ? R($) : K($);
3172
- if (!F.length)
3203
+ const $ = await V.json(), O = u.value === "here" ? H($) : Z($);
3204
+ if (!O.length)
3173
3205
  ce({ type: "warning", title: "Пошук", message: "Не знайдено результатів" });
3174
3206
  else {
3175
- const te = F[0];
3176
- H(te), c.value = "";
3207
+ const te = O[0];
3208
+ P(te), c.value = "";
3177
3209
  }
3178
- } catch (x) {
3179
- const V = x?.message || "Помилка пошуку";
3210
+ } catch (w) {
3211
+ const V = w?.message || "Помилка пошуку";
3180
3212
  ce({ type: "error", title: "Пошук", message: V });
3181
3213
  }
3182
3214
  }
3183
3215
  }
3184
- return (v, x) => (i(), d("div", Ys, [
3216
+ return (v, w) => (i(), d("div", tr, [
3185
3217
  l("form", {
3186
3218
  class: "flex gap-2",
3187
3219
  onSubmit: ke(I, ["prevent"])
@@ -3195,7 +3227,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3195
3227
  l("button", {
3196
3228
  type: "button",
3197
3229
  class: "vstSelect-input transition-all text-left bg-white border border-gray-200 text-gray-900 rounded-lg focus:ring-blue-500 focus:border-blue-100 block w-full py-1.5 px-3 text-sm cursor-pointer flex items-center justify-between gap-2",
3198
- onClick: x[0] || (x[0] = (V) => p.value = !p.value)
3230
+ onClick: w[0] || (w[0] = (V) => p.value = !p.value)
3199
3231
  }, [
3200
3232
  l("span", null, G(S(u.value)), 1),
3201
3233
  (i(), d("svg", {
@@ -3203,7 +3235,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3203
3235
  viewBox: "0 0 24 24",
3204
3236
  fill: "none",
3205
3237
  xmlns: "http://www.w3.org/2000/svg"
3206
- }, x[2] || (x[2] = [
3238
+ }, w[2] || (w[2] = [
3207
3239
  l("path", {
3208
3240
  d: "M6 9l6 6 6-6",
3209
3241
  stroke: "currentColor",
@@ -3213,31 +3245,31 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3213
3245
  }, null, -1)
3214
3246
  ]), 2))
3215
3247
  ]),
3216
- p.value ? (i(), d("div", Xs, [
3248
+ p.value ? (i(), d("div", lr, [
3217
3249
  l("ul", null, [
3218
3250
  (i(!0), d(re, null, fe(s.value, (V) => (i(), d("li", {
3219
3251
  key: V,
3220
3252
  class: "px-3 py-2 cursor-pointer hover:bg-gray-100",
3221
3253
  onClick: ($) => m(V)
3222
- }, G(S(V)), 9, Qs))), 128))
3254
+ }, G(S(V)), 9, or))), 128))
3223
3255
  ])
3224
- ])) : D("", !0)
3225
- ], 512)) : D("", !0),
3226
- l("div", er, [
3227
- ae(l("input", {
3228
- "onUpdate:modelValue": x[1] || (x[1] = (V) => c.value = V),
3256
+ ])) : F("", !0)
3257
+ ], 512)) : F("", !0),
3258
+ l("div", nr, [
3259
+ ne(l("input", {
3260
+ "onUpdate:modelValue": w[1] || (w[1] = (V) => c.value = V),
3229
3261
  placeholder: r.value,
3230
3262
  type: "text",
3231
3263
  class: "vs-input transition-all border block w-full border-gray-200 rounded-md focus:border-blue-100 border-solid !pr-8 py-1.5 pl-3 text-sm"
3232
- }, null, 8, tr), [
3264
+ }, null, 8, ar), [
3233
3265
  [
3234
- ve,
3266
+ me,
3235
3267
  c.value,
3236
3268
  void 0,
3237
3269
  { trim: !0 }
3238
3270
  ]
3239
3271
  ]),
3240
- x[3] || (x[3] = l("button", {
3272
+ w[3] || (w[3] = l("button", {
3241
3273
  type: "submit",
3242
3274
  class: "absolute inset-y-0 right-2 flex items-center text-gray-400 hover:text-gray-600",
3243
3275
  "aria-label": "Пошук"
@@ -3261,7 +3293,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3261
3293
  ], 32)
3262
3294
  ]));
3263
3295
  }
3264
- }), ar = /* @__PURE__ */ X(nr, [["__scopeId", "data-v-3048520a"]]), sr = { class: "bg-white/30 p-1 rounded-md shadow" }, rr = { class: "flex gap-2" }, ir = ["onClick", "title"], ur = ["src"], dr = /* @__PURE__ */ U({
3296
+ }), ur = /* @__PURE__ */ X(ir, [["__scopeId", "data-v-3048520a"]]), dr = { class: "bg-white/30 p-1 rounded-md shadow" }, cr = { class: "flex gap-2" }, pr = ["onClick", "title"], fr = ["src"], mr = /* @__PURE__ */ U({
3265
3297
  __name: "map-layers",
3266
3298
  props: {
3267
3299
  basemaps: {}
@@ -3272,8 +3304,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3272
3304
  function s(r) {
3273
3305
  n("onLayerChange", r), a.value = r;
3274
3306
  }
3275
- return (r, u) => (i(), d("div", sr, [
3276
- l("div", rr, [
3307
+ return (r, u) => (i(), d("div", dr, [
3308
+ l("div", cr, [
3277
3309
  (i(!0), d(re, null, fe(r.basemaps, (c, p) => (i(), d("div", {
3278
3310
  key: p,
3279
3311
  class: E(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": a.value === p }]),
@@ -3286,24 +3318,24 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3286
3318
  src: c.preview,
3287
3319
  alt: "",
3288
3320
  class: "w-10 h-10 object-cover"
3289
- }, null, 8, ur)
3290
- ], 10, ir))), 128))
3321
+ }, null, 8, fr)
3322
+ ], 10, pr))), 128))
3291
3323
  ])
3292
3324
  ]));
3293
3325
  }
3294
- }), cr = {
3326
+ }), vr = {
3295
3327
  key: 0,
3296
3328
  class: "absolute inset-0 z-[2000] flex items-center justify-center pointer-events-none bg-black/20"
3297
- }, pr = { class: "bg-black/50 text-white px-6 py-2 rounded-lg text-center max-w-sm mx-4 backdrop-blur-sm" }, fr = { class: "text-sm font-medium" }, mr = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, vr = { class: "form-geom__panel flex gap-1 items-start mt-2" }, hr = { class: "flex items-center gap-1" }, gr = ["disabled"], br = { class: "absolute top-4 right-4 z-[1000]" }, yr = { class: "flex flex-col gap-[2px]" }, xr = ["aria-pressed"], wr = ["aria-pressed"], kr = ["aria-pressed"], _r = ["aria-pressed"], $r = { 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" }, Cr = {
3329
+ }, hr = { class: "bg-black/50 text-white px-6 py-2 rounded-lg text-center max-w-sm mx-4 backdrop-blur-sm" }, gr = { class: "text-sm font-medium" }, br = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, yr = { class: "form-geom__panel flex gap-1 items-start mt-2" }, xr = { class: "flex items-center gap-1" }, wr = ["disabled"], kr = { class: "absolute top-4 right-4 z-[1000]" }, _r = { class: "flex flex-col gap-[2px]" }, $r = ["aria-pressed"], Cr = ["aria-pressed"], Vr = ["aria-pressed"], Mr = ["aria-pressed"], Lr = { 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 = {
3298
3330
  key: 0,
3299
3331
  class: "form-geom__feature flex items-center text-xs transition-all gap-2 w-full"
3300
- }, Vr = { class: "mr-auto" }, Mr = { class: "font-bold" }, Lr = { class: "flex items-center" }, Sr = { class: "text-xs mr-2" }, Br = {
3332
+ }, Br = { class: "mr-auto" }, jr = { class: "font-bold" }, Er = { class: "flex items-center" }, Ir = { class: "text-xs mr-2" }, zr = {
3301
3333
  key: 0,
3302
3334
  class: "text-xs"
3303
- }, jr = {
3335
+ }, Ar = {
3304
3336
  key: 1,
3305
3337
  class: "text-xs"
3306
- }, Er = /* @__PURE__ */ U({
3338
+ }, Tr = /* @__PURE__ */ U({
3307
3339
  __name: "vs-input-map",
3308
3340
  props: {
3309
3341
  tools: {},
@@ -3318,23 +3350,23 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3318
3350
  },
3319
3351
  emits: ["update:modelValue"],
3320
3352
  setup(o, { emit: e }) {
3321
- const t = Wt(), a = o, n = e, s = k(!1), r = k("");
3353
+ const t = Gt(), a = o, n = e, s = k(!1), r = k("");
3322
3354
  function u() {
3323
- const g = navigator.platform.toUpperCase().indexOf("MAC") >= 0;
3355
+ const b = navigator.platform.toUpperCase().indexOf("MAC") >= 0;
3324
3356
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? "Використовуйте два пальці для зуму карти." : "Використовуйте Ctrl + прокрутка для зуму карти.";
3325
3357
  }
3326
3358
  const c = k(null);
3327
3359
  let p, f, m, y = null;
3328
- const S = k(null), q = (g) => {
3329
- g.ctrlKey && g.preventDefault();
3360
+ const S = k(null), q = (b) => {
3361
+ b.ctrlKey && b.preventDefault();
3330
3362
  };
3331
- function R() {
3363
+ function H() {
3332
3364
  if (!a.handleZoom) return null;
3333
- let g;
3334
- const _ = (O) => {
3335
- const Q = O.ctrlKey || O.metaKey, he = O.shiftKey;
3365
+ let b;
3366
+ const _ = (D) => {
3367
+ const Q = D.ctrlKey || D.metaKey, he = D.shiftKey;
3336
3368
  if (!Q && !he) {
3337
- s.value = !0, r.value = u(), clearTimeout(g), g = window.setTimeout(() => {
3369
+ s.value = !0, r.value = u(), clearTimeout(b), b = window.setTimeout(() => {
3338
3370
  s.value = !1;
3339
3371
  }, 1e3);
3340
3372
  return;
@@ -3342,39 +3374,39 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3342
3374
  s.value = !1, p.scrollWheelZoom.enable(), setTimeout(() => {
3343
3375
  p.scrollWheelZoom.disable();
3344
3376
  }, 100);
3345
- }, Y = (O) => {
3346
- if (O.touches.length === 1) {
3347
- s.value = !0, r.value = u(), clearTimeout(g), g = window.setTimeout(() => {
3377
+ }, Y = (D) => {
3378
+ if (D.touches.length === 1) {
3379
+ s.value = !0, r.value = u(), clearTimeout(b), b = window.setTimeout(() => {
3348
3380
  s.value = !1;
3349
3381
  }, 3e3);
3350
3382
  return;
3351
3383
  }
3352
3384
  s.value = !1;
3353
3385
  };
3354
- return c.value && (c.value.addEventListener("wheel", _, { passive: !1 }), c.value.addEventListener("touchstart", Y, { passive: !0 })), p && p.on("wheel", (O) => {
3355
- const Q = O.originalEvent.ctrlKey || O.originalEvent.metaKey, he = O.originalEvent.shiftKey;
3356
- !Q && !he && (O.originalEvent.preventDefault(), O.originalEvent.stopPropagation());
3386
+ return c.value && (c.value.addEventListener("wheel", _, { passive: !1 }), c.value.addEventListener("touchstart", Y, { passive: !0 })), p && p.on("wheel", (D) => {
3387
+ const Q = D.originalEvent.ctrlKey || D.originalEvent.metaKey, he = D.originalEvent.shiftKey;
3388
+ !Q && !he && (D.originalEvent.preventDefault(), D.originalEvent.stopPropagation());
3357
3389
  }), () => {
3358
- c.value && (c.value.removeEventListener("wheel", _), c.value.removeEventListener("touchstart", Y)), p && p.off("wheel"), clearTimeout(g);
3390
+ c.value && (c.value.removeEventListener("wheel", _), c.value.removeEventListener("touchstart", Y)), p && p.off("wheel"), clearTimeout(b);
3359
3391
  };
3360
3392
  }
3361
- const K = k(null), T = k(6), H = k(0), I = k(t?.appContext.config.globalProperties.$settings?.center || [50, 30]), v = k(null), x = De();
3393
+ const Z = k(null), z = k(6), P = k(0), I = k(t?.appContext.config.globalProperties.$settings?.center || [50, 30]), v = k(null), w = De();
3362
3394
  let V;
3363
3395
  const $ = k("topo100");
3364
- function F(g) {
3365
- return g ? g.type === "Polygon" ? {
3396
+ function O(b) {
3397
+ return b ? b.type === "Polygon" ? {
3366
3398
  type: "MultiPolygon",
3367
- coordinates: [g.coordinates]
3368
- } : (g.type === "MultiPolygon", g) : null;
3399
+ coordinates: [b.coordinates]
3400
+ } : (b.type === "MultiPolygon", b) : null;
3369
3401
  }
3370
3402
  function te() {
3371
- return new Promise((g, _) => {
3372
- window.L && window.L.Draw && g(0);
3403
+ return new Promise((b, _) => {
3404
+ window.L && window.L.Draw && b(0);
3373
3405
  const Y = (Q) => {
3374
3406
  if (Array.from(document.styleSheets).some((Be) => Be?.href?.includes(Q))) return;
3375
3407
  const Ve = document.createElement("link");
3376
3408
  Ve.rel = "stylesheet", Ve.href = Q, document.head.appendChild(Ve);
3377
- }, O = (Q) => new Promise((he, Ve) => {
3409
+ }, D = (Q) => new Promise((he, Ve) => {
3378
3410
  const Be = Array.from(document.scripts).find((Ie) => Ie.src === Q);
3379
3411
  if (Be) {
3380
3412
  Be.addEventListener("load", () => he()), Be.addEventListener("error", (Ie) => Ve(Ie));
@@ -3383,11 +3415,11 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3383
3415
  const Me = document.createElement("script");
3384
3416
  Me.src = Q, Me.async = !0, Me.onload = () => he(), Me.onerror = (Ie) => Ve(Ie), document.body.appendChild(Me);
3385
3417
  });
3386
- Y("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), Y("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), O("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => O("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => g(0)).catch(_);
3418
+ Y("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), Y("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), D("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => D("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => b(0)).catch(_);
3387
3419
  });
3388
3420
  }
3389
3421
  function J() {
3390
- const g = f.toGeoJSON(), _ = [], Y = (Q) => {
3422
+ const b = f.toGeoJSON(), _ = [], Y = (Q) => {
3391
3423
  if (Q)
3392
3424
  switch (Q.type) {
3393
3425
  case "Polygon":
@@ -3401,72 +3433,72 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3401
3433
  break;
3402
3434
  }
3403
3435
  };
3404
- (g?.features || []).forEach((Q) => Y(Q.geometry));
3405
- const O = _.length ? { type: "MultiPolygon", coordinates: _ } : null;
3406
- n("update:modelValue", O ? F(O) : null), H.value = f.getLayers().length;
3436
+ (b?.features || []).forEach((Q) => Y(Q.geometry));
3437
+ const D = _.length ? { type: "MultiPolygon", coordinates: _ } : null;
3438
+ n("update:modelValue", D ? O(D) : null), P.value = f.getLayers().length;
3407
3439
  }
3408
- function M(g = 30) {
3440
+ function M(b = 30) {
3409
3441
  const _ = f.getLayers();
3410
3442
  if (!_.length) return;
3411
- const O = L.featureGroup(_).getBounds();
3412
- O && O.isValid() && p.fitBounds(O, { padding: [g, g] });
3443
+ const D = L.featureGroup(_).getBounds();
3444
+ D && D.isValid() && p.fitBounds(D, { padding: [b, b] });
3413
3445
  }
3414
- function Z() {
3446
+ function K() {
3415
3447
  S.value?.click();
3416
3448
  }
3417
3449
  const N = k("");
3418
- function le(g) {
3419
- return g instanceof L.Circle ? "Circle" : g instanceof L.Rectangle ? "Rectangle" : g instanceof L.Polygon && !(g instanceof L.Rectangle) ? "Polygon" : g instanceof L.Polyline && !(g instanceof L.Polygon) ? "Polyline" : g instanceof L.Marker ? "Point" : "Feature";
3450
+ function le(b) {
3451
+ return b instanceof L.Circle ? "Circle" : b instanceof L.Rectangle ? "Rectangle" : b instanceof L.Polygon && !(b instanceof L.Rectangle) ? "Polygon" : b instanceof L.Polyline && !(b instanceof L.Polygon) ? "Polyline" : b instanceof L.Marker ? "Point" : "Feature";
3420
3452
  }
3421
- function z(g) {
3422
- if (g instanceof L.Circle) {
3423
- const _ = g.getRadius();
3453
+ function A(b) {
3454
+ if (b instanceof L.Circle) {
3455
+ const _ = b.getRadius();
3424
3456
  return Math.PI * (_ * _) / 1e6;
3425
3457
  }
3426
- if (g instanceof L.Polygon || g instanceof L.Rectangle)
3458
+ if (b instanceof L.Polygon || b instanceof L.Rectangle)
3427
3459
  try {
3428
- const _ = g.getLatLngs(), Y = Array.isArray(_[0]) ? _[0] : _, O = L.GeometryUtil?.geodesicArea ? L.GeometryUtil.geodesicArea(Y) : 0;
3429
- return O ? O / 1e6 : 0;
3460
+ const _ = b.getLatLngs(), Y = Array.isArray(_[0]) ? _[0] : _, D = L.GeometryUtil?.geodesicArea ? L.GeometryUtil.geodesicArea(Y) : 0;
3461
+ return D ? D / 1e6 : 0;
3430
3462
  } catch {
3431
3463
  return null;
3432
3464
  }
3433
3465
  return null;
3434
3466
  }
3435
- function j(g) {
3436
- return g instanceof L.Circle ? g.getLatLng() : g.getBounds ? g.getBounds().getCenter() : g.getLatLng ? g.getLatLng() : p.getCenter();
3467
+ function j(b) {
3468
+ return b instanceof L.Circle ? b.getLatLng() : b.getBounds ? b.getBounds().getCenter() : b.getLatLng ? b.getLatLng() : p.getCenter();
3437
3469
  }
3438
3470
  function C() {
3439
- const g = f.getLayers();
3440
- if (!g.length) {
3441
- v.value = null, H.value = 0;
3471
+ const b = f.getLayers();
3472
+ if (!b.length) {
3473
+ v.value = null, P.value = 0;
3442
3474
  return;
3443
3475
  }
3444
- const _ = g[g.length - 1], Y = le(_), O = j(_), Q = z(_);
3476
+ const _ = b[b.length - 1], Y = le(_), D = j(_), Q = A(_);
3445
3477
  v.value = {
3446
3478
  type: Y,
3447
- center: O,
3479
+ center: D,
3448
3480
  areaKm2: Q,
3449
3481
  layer: _
3450
- }, H.value = g.length;
3482
+ }, P.value = b.length;
3451
3483
  }
3452
3484
  function W() {
3453
- const g = v.value?.layer;
3454
- g && (g instanceof L.Circle && g.getBounds ? p.fitBounds(g.getBounds(), { padding: [30, 30] }) : g.getBounds ? p.fitBounds(g.getBounds(), { padding: [30, 30] }) : g.getLatLng && p.setView(g.getLatLng(), Math.max(T.value, 14)));
3485
+ const b = v.value?.layer;
3486
+ b && (b instanceof L.Circle && b.getBounds ? p.fitBounds(b.getBounds(), { padding: [30, 30] }) : b.getBounds ? p.fitBounds(b.getBounds(), { padding: [30, 30] }) : b.getLatLng && p.setView(b.getLatLng(), Math.max(z.value, 14)));
3455
3487
  }
3456
3488
  function oe() {
3457
- const g = v.value?.layer;
3458
- g && (f.removeLayer(g), J(), C());
3489
+ const b = v.value?.layer;
3490
+ b && (f.removeLayer(b), J(), C());
3459
3491
  }
3460
3492
  _e(async () => {
3461
- document.addEventListener("wheel", q, { passive: !1 }), await te(), L.drawLocal = Ss;
3462
- const g = a.handleZoom;
3493
+ document.addEventListener("wheel", q, { passive: !1 }), await te(), L.drawLocal = Is;
3494
+ const b = a.handleZoom;
3463
3495
  p = L.map(c.value, {
3464
3496
  zoomControl: !1,
3465
- scrollWheelZoom: !g
3497
+ scrollWheelZoom: !b
3466
3498
  }).setView(I.value, 10), setTimeout(() => {
3467
- y = R();
3468
- }, 100), L.control.zoom({ position: "bottomright" }).addTo(p), $.value = Object.keys(x)[0], V = L.tileLayer(x[$.value].url, { maxZoom: 19, minZoom: 6 }).addTo(p), f = new L.FeatureGroup().addTo(p), p.on(L.Draw.Event.CREATED, (O) => {
3469
- const { layer: Q } = O;
3499
+ y = H();
3500
+ }, 100), L.control.zoom({ position: "bottomright" }).addTo(p), $.value = Object.keys(w)[0], V = L.tileLayer(w[$.value].url, { maxZoom: 19, minZoom: 6 }).addTo(p), f = new L.FeatureGroup().addTo(p), p.on(L.Draw.Event.CREATED, (D) => {
3501
+ const { layer: Q } = D;
3470
3502
  f.clearLayers(), f.addLayer(Q), J(), C(), M(), N.value = "";
3471
3503
  }), p.on(L.Draw.Event.EDITED, () => {
3472
3504
  J(), C(), M();
@@ -3474,22 +3506,22 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3474
3506
  J(), C(), M();
3475
3507
  });
3476
3508
  let _ = !1;
3477
- p.on("mousemove", (O) => {
3478
- _ || (p.invalidateSize(), _ = !0), K.value = O.latlng;
3509
+ p.on("mousemove", (D) => {
3510
+ _ || (p.invalidateSize(), _ = !0), Z.value = D.latlng;
3479
3511
  }), p.on("zoomend", () => {
3480
- T.value = p.getZoom();
3512
+ z.value = p.getZoom();
3481
3513
  });
3482
- const Y = Bs(a.modelValue);
3514
+ const Y = zs(a.modelValue);
3483
3515
  if (Y) {
3484
- const O = [];
3485
- L.geoJSON(Y).eachLayer((Q) => O.push(Q)), O.length && f.addLayer(O[0]), J(), C(), M();
3516
+ const D = [];
3517
+ L.geoJSON(Y).eachLayer((Q) => D.push(Q)), D.length && f.addLayer(D[0]), J(), C(), M();
3486
3518
  }
3487
3519
  }), Xe(() => {
3488
3520
  document.removeEventListener("wheel", q), y && y();
3489
3521
  });
3490
- function se(g) {
3522
+ function se(b) {
3491
3523
  if (p) {
3492
- switch (m && m.disable(), g) {
3524
+ switch (m && m.disable(), b) {
3493
3525
  case "marker":
3494
3526
  m = new L.Draw.Marker(p);
3495
3527
  break;
@@ -3506,54 +3538,54 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3506
3538
  m = new L.Draw.Rectangle(p);
3507
3539
  break;
3508
3540
  }
3509
- m && (m.enable(), N.value = g);
3541
+ m && (m.enable(), N.value = b);
3510
3542
  }
3511
3543
  }
3512
3544
  function Le() {
3513
- const g = f.toGeoJSON(), _ = new Blob([JSON.stringify(g, null, 2)], { type: "application/json" }), Y = URL.createObjectURL(_), O = document.createElement("a");
3514
- O.href = Y, O.download = "data.geojson", O.click(), URL.revokeObjectURL(Y);
3545
+ const b = f.toGeoJSON(), _ = new Blob([JSON.stringify(b, null, 2)], { type: "application/json" }), Y = URL.createObjectURL(_), D = document.createElement("a");
3546
+ D.href = Y, D.download = "data.geojson", D.click(), URL.revokeObjectURL(Y);
3515
3547
  }
3516
- function Oe(g) {
3517
- const _ = g.target, Y = _.files?.[0];
3548
+ function Oe(b) {
3549
+ const _ = b.target, Y = _.files?.[0];
3518
3550
  if (!Y) return;
3519
- const O = new FileReader();
3520
- O.onload = () => {
3521
- if (typeof O.result == "string")
3551
+ const D = new FileReader();
3552
+ D.onload = () => {
3553
+ if (typeof D.result == "string")
3522
3554
  try {
3523
- const Q = JSON.parse(O.result);
3555
+ const Q = JSON.parse(D.result);
3524
3556
  f.clearLayers(), Q && L.geoJSON({ type: "Feature", geometry: Q }).eachLayer((he) => {
3525
3557
  f.addLayer(he);
3526
3558
  }), J(), C(), M();
3527
3559
  } finally {
3528
3560
  _.value = "";
3529
3561
  }
3530
- }, O.readAsText(Y);
3562
+ }, D.readAsText(Y);
3531
3563
  }
3532
- function Ge(g) {
3533
- p && (V && p.removeLayer(V), V = L.tileLayer(x[g].url, { maxZoom: 19, minZoom: 6 }).addTo(p), $.value = g);
3564
+ function Ge(b) {
3565
+ p && (V && p.removeLayer(V), V = L.tileLayer(w[b].url, { maxZoom: 19, minZoom: 6 }).addTo(p), $.value = b);
3534
3566
  }
3535
- function tt(g) {
3536
- const _ = L.latLng(g[0], g[1]);
3567
+ function tt(b) {
3568
+ const _ = L.latLng(b[0], b[1]);
3537
3569
  p.setView(_, 13);
3538
3570
  }
3539
3571
  ue(
3540
3572
  () => a.modelValue,
3541
- (g) => {
3542
- const _ = F(g);
3543
- if (g && _ !== g) {
3573
+ (b) => {
3574
+ const _ = O(b);
3575
+ if (b && _ !== b) {
3544
3576
  n("update:modelValue", _);
3545
3577
  return;
3546
3578
  }
3547
3579
  f.clearLayers(), _ && L.geoJSON({ type: "Feature", geometry: _ }).eachLayer((Y) => {
3548
- f.addLayer(Y), Y.dragging?.enable(), Y.dragging?.enabled(), Y.on("dragend", (O) => {
3549
- const he = O.target.getLatLng();
3580
+ f.addLayer(Y), Y.dragging?.enable(), Y.dragging?.enabled(), Y.on("dragend", (D) => {
3581
+ const he = D.target.getLatLng();
3550
3582
  n("update:modelValue", { type: "Point", coordinates: [he.lng, he.lat] });
3551
3583
  });
3552
- }), H.value = f.getLayers().length, C(), M();
3584
+ }), P.value = f.getLayers().length, C(), M();
3553
3585
  }
3554
3586
  );
3555
3587
  function De() {
3556
- return t?.appContext.config.globalProperties.$settings?.basemaps ? t?.appContext.config.globalProperties.$settings?.basemaps.map((g, _) => Object.assign(g, { key: `b${_}`, preview: g.preview || g.url.replace("{z}/{x}/{y}.png", "13/4790/2762.png") })).reduce((g, _) => ({ ...g, [_.key]: _ }), {}) : {
3588
+ return t?.appContext.config.globalProperties.$settings?.basemaps ? t?.appContext.config.globalProperties.$settings?.basemaps.map((b, _) => Object.assign(b, { key: `b${_}`, preview: b.preview || b.url.replace("{z}/{x}/{y}.png", "13/4790/2762.png") })).reduce((b, _) => ({ ...b, [_.key]: _ }), {}) : {
3557
3589
  topo100: {
3558
3590
  url: "https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",
3559
3591
  preview: "https://data.gki.com.ua/api-user/rtile/voyager/ua/13/4790/2762.png"
@@ -3573,7 +3605,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3573
3605
  setTimeout(() => {
3574
3606
  p.invalidateSize();
3575
3607
  }, 50);
3576
- }), (g, _) => (i(), d("div", {
3608
+ }), (b, _) => (i(), d("div", {
3577
3609
  class: E(["leaflet-map-wrapper relative w-full h-[400px]", { fullscreen: Ce.value }])
3578
3610
  }, [
3579
3611
  l("div", {
@@ -3581,7 +3613,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3581
3613
  ref: c,
3582
3614
  class: "w-full h-full"
3583
3615
  }, null, 512),
3584
- A(st, {
3616
+ T(st, {
3585
3617
  name: "zoom-instructions",
3586
3618
  "enter-active-class": "transition-all duration-200 ease-out",
3587
3619
  "leave-active-class": "transition-all duration-500 ease-in",
@@ -3591,29 +3623,29 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3591
3623
  "leave-to-class": "opacity-0"
3592
3624
  }, {
3593
3625
  default: Ee(() => [
3594
- s.value && a.handleZoom ? (i(), d("div", cr, [
3595
- l("div", pr, [
3596
- l("p", fr, G(r.value), 1)
3626
+ s.value && a.handleZoom ? (i(), d("div", vr, [
3627
+ l("div", hr, [
3628
+ l("p", gr, G(r.value), 1)
3597
3629
  ])
3598
- ])) : D("", !0)
3630
+ ])) : F("", !0)
3599
3631
  ]),
3600
3632
  _: 1
3601
3633
  }),
3602
- l("div", mr, [
3603
- A(ar, { onGoToCoordinates: tt }),
3604
- l("div", vr, [
3605
- l("div", hr, [
3634
+ l("div", br, [
3635
+ T(ur, { onGoToCoordinates: tt }),
3636
+ l("div", yr, [
3637
+ l("div", xr, [
3606
3638
  l("button", {
3607
3639
  type: "button",
3608
3640
  class: "inline-flex items-center gap-2 text-sm font-medium border rounded-md px-3 py-2 bg-white text-blue-600 border-stone-200 hover:bg-blue-500 hover:text-white hover:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:ring-offset-1 transition",
3609
- onClick: Z
3641
+ onClick: K
3610
3642
  }, "Import"),
3611
3643
  l("button", {
3612
3644
  type: "button",
3613
3645
  class: "inline-flex items-center gap-2 text-sm font-medium border rounded-md px-3 py-2 bg-white text-blue-600 border-stone-200 hover:bg-blue-500 hover:text-white hover:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:ring-offset-1 transition disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400 disabled:border-gray-200 disabled:hover:bg-gray-100 disabled:hover:text-gray-400",
3614
3646
  onClick: Le,
3615
- disabled: H.value === 0
3616
- }, "Export", 8, gr)
3647
+ disabled: P.value === 0
3648
+ }, "Export", 8, wr)
3617
3649
  ]),
3618
3650
  l("input", {
3619
3651
  ref_key: "importRef",
@@ -3625,8 +3657,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3625
3657
  }, null, 544)
3626
3658
  ])
3627
3659
  ]),
3628
- l("div", br, [
3629
- l("div", yr, [
3660
+ l("div", kr, [
3661
+ l("div", _r, [
3630
3662
  l("button", {
3631
3663
  class: E(["vs-btn", { "vs-active": N.value === "marker" }]),
3632
3664
  "aria-pressed": N.value === "marker",
@@ -3634,8 +3666,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3634
3666
  "aria-label": "Draw point",
3635
3667
  onClick: _[0] || (_[0] = (Y) => se("marker"))
3636
3668
  }, [
3637
- A(zs)
3638
- ], 10, xr),
3669
+ T(Os)
3670
+ ], 10, $r),
3639
3671
  l("button", {
3640
3672
  class: E(["vs-btn", { "vs-active": N.value === "polyline" }]),
3641
3673
  "aria-pressed": N.value === "polyline",
@@ -3643,8 +3675,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3643
3675
  "aria-label": "Draw polyline",
3644
3676
  onClick: _[1] || (_[1] = (Y) => se("polyline"))
3645
3677
  }, [
3646
- A(Os)
3647
- ], 10, wr),
3678
+ T(Rs)
3679
+ ], 10, Cr),
3648
3680
  l("button", {
3649
3681
  class: E(["vs-btn", { "vs-active": N.value === "polygon" }]),
3650
3682
  "aria-pressed": N.value === "polygon",
@@ -3652,8 +3684,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3652
3684
  "aria-label": "Draw polygon",
3653
3685
  onClick: _[2] || (_[2] = (Y) => se("polygon"))
3654
3686
  }, [
3655
- A(Rs)
3656
- ], 10, kr),
3687
+ T(Ws)
3688
+ ], 10, Vr),
3657
3689
  l("button", {
3658
3690
  class: E(["vs-btn", { "vs-active": N.value === "rectangle" }]),
3659
3691
  "aria-pressed": N.value === "rectangle",
@@ -3661,8 +3693,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3661
3693
  "aria-label": "Draw rectangle",
3662
3694
  onClick: _[3] || (_[3] = (Y) => se("rectangle"))
3663
3695
  }, [
3664
- A(Ws)
3665
- ], 10, _r),
3696
+ T(Js)
3697
+ ], 10, Mr),
3666
3698
  l("button", {
3667
3699
  class: "vs-btn mt-5",
3668
3700
  onClick: _[4] || (_[4] = (Y) => {
@@ -3671,33 +3703,33 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3671
3703
  title: "Full Screen",
3672
3704
  "aria-label": "Full Screen"
3673
3705
  }, [
3674
- A(Js, { style: { width: "12px", height: "12px" } })
3706
+ T(er, { style: { width: "12px", height: "12px" } })
3675
3707
  ])
3676
3708
  ])
3677
3709
  ]),
3678
3710
  l("div", {
3679
3711
  class: E(["absolute left-4 z-[1000]", v.value ? "bottom-8" : "bottom-4"])
3680
3712
  }, [
3681
- A(dr, {
3682
- basemaps: ee(x),
3713
+ T(mr, {
3714
+ basemaps: ee(w),
3683
3715
  onOnLayerChange: Ge
3684
3716
  }, null, 8, ["basemaps"])
3685
3717
  ], 2),
3686
- l("div", $r, [
3687
- v.value ? (i(), d("div", Cr, [
3688
- l("div", Vr, [
3718
+ l("div", Lr, [
3719
+ v.value ? (i(), d("div", Sr, [
3720
+ l("div", Br, [
3689
3721
  _[7] || (_[7] = ge(" Тип: ", -1)),
3690
- l("span", Mr, G(v.value.type), 1)
3722
+ l("span", jr, G(v.value.type), 1)
3691
3723
  ]),
3692
- l("div", Lr, [
3693
- l("div", Sr, [
3724
+ l("div", Er, [
3725
+ l("div", Ir, [
3694
3726
  _[8] || (_[8] = ge(" Центр: ", -1)),
3695
3727
  l("b", null, G(v.value.center.lat.toFixed(5)) + ", " + G(v.value.center.lng.toFixed(5)), 1)
3696
3728
  ]),
3697
- v.value.areaKm2 !== null ? (i(), d("div", Br, [
3729
+ v.value.areaKm2 !== null ? (i(), d("div", zr, [
3698
3730
  _[9] || (_[9] = ge(" Площа: ", -1)),
3699
3731
  l("b", null, G(v.value.areaKm2.toFixed(1)) + "км²", 1)
3700
- ])) : (i(), d("div", jr, _[10] || (_[10] = [
3732
+ ])) : (i(), d("div", Ar, _[10] || (_[10] = [
3701
3733
  ge(" Площа: ", -1),
3702
3734
  l("b", null, "—", -1)
3703
3735
  ]))),
@@ -3713,17 +3745,17 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3713
3745
  title: "Видалити",
3714
3746
  onClick: _[6] || (_[6] = (Y) => oe())
3715
3747
  }, [
3716
- A(et, { class: "w-3 h-3" })
3748
+ T(et, { class: "w-3 h-3" })
3717
3749
  ])
3718
3750
  ])
3719
- ])) : D("", !0)
3751
+ ])) : F("", !0)
3720
3752
  ])
3721
3753
  ], 2));
3722
3754
  }
3723
- }), Ir = /* @__PURE__ */ X(Er, [["__scopeId", "data-v-66e4a27d"]]), zr = ["data-focus"], Ar = { class: "flex items-center" }, Tr = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Fr = ["onClick", "aria-label"], Or = {
3755
+ }), Fr = /* @__PURE__ */ X(Tr, [["__scopeId", "data-v-66e4a27d"]]), Or = ["data-focus"], Dr = { class: "flex items-center" }, Ur = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Pr = ["onClick", "aria-label"], Rr = {
3724
3756
  key: 0,
3725
3757
  class: "absolute text-gray-500 truncate pl-2"
3726
- }, Dr = { class: "flex-1 min-w-[2px]" }, Ur = ["placeholder"], Pr = { class: "flex items-center shrink-0" }, Rr = ["disabled"], Hr = /* @__PURE__ */ U({
3758
+ }, Hr = { class: "flex-1 min-w-[2px]" }, Nr = ["placeholder"], qr = { class: "flex items-center shrink-0" }, Wr = ["disabled"], Gr = /* @__PURE__ */ U({
3727
3759
  __name: "vs-input-tag",
3728
3760
  props: /* @__PURE__ */ ie({
3729
3761
  unique: { type: Boolean, default: !0 },
@@ -3744,24 +3776,24 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3744
3776
  $e(t.style);
3745
3777
  const n = k(null), s = k(null), r = k(null), u = k(!1), c = k(""), p = de(o, "modelValue"), f = B(() => t.placeholder || "Add tag…"), m = B(() => p.value?.length === 0 && c.value === ""), y = B(() => !t.disabled && p.value?.length > 0), S = B(() => t.disabled), q = async () => {
3746
3778
  S.value || await je(() => r.value?.focus());
3747
- }, R = (V) => {
3779
+ }, H = (V) => {
3748
3780
  const $ = V.trim();
3749
3781
  $ !== "" && (!p.value || !Array.isArray(p.value) ? p.value = [$] : t.unique ? p.value.includes($) || (p.value = [...p.value, $]) : p.value = [...p.value, $], c.value = "");
3750
- }, K = () => {
3782
+ }, Z = () => {
3751
3783
  const V = c.value;
3752
- V.trim() !== "" && R(V), c.value = "";
3753
- }, T = (V) => {
3784
+ V.trim() !== "" && H(V), c.value = "";
3785
+ }, z = (V) => {
3754
3786
  const $ = p.value.slice();
3755
3787
  $.splice(V, 1), a("update:modelValue", $);
3756
- }, H = () => {
3788
+ }, P = () => {
3757
3789
  a("update:modelValue", []);
3758
3790
  }, I = () => {
3759
3791
  S.value || (u.value = !0);
3760
3792
  }, v = () => {
3761
3793
  u.value = !1;
3762
- }, x = (V) => {
3794
+ }, w = (V) => {
3763
3795
  const { key: $ } = V;
3764
- $ === "Enter" ? (V.preventDefault(), K()) : $ === "Backspace" && c.value === "" && p.value.length > 0 && T(p.value.length - 1);
3796
+ $ === "Enter" ? (V.preventDefault(), Z()) : $ === "Backspace" && c.value === "" && p.value.length > 0 && z(p.value.length - 1);
3765
3797
  };
3766
3798
  return (V, $) => (i(), d("div", {
3767
3799
  class: "flex gap-1 w-full",
@@ -3790,18 +3822,18 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3790
3822
  ref_key: "chipsRef",
3791
3823
  ref: s
3792
3824
  }, [
3793
- (i(!0), d(re, null, fe(p.value, (F, te) => (i(), d("div", {
3825
+ (i(!0), d(re, null, fe(p.value, (O, te) => (i(), d("div", {
3794
3826
  key: te,
3795
3827
  class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"
3796
3828
  }, [
3797
- l("div", Ar, [
3798
- l("div", Tr, G(F), 1)
3829
+ l("div", Dr, [
3830
+ l("div", Ur, G(O), 1)
3799
3831
  ]),
3800
3832
  l("div", {
3801
3833
  role: "button",
3802
3834
  class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
3803
- onClick: ke((J) => T(te), ["stop"]),
3804
- "aria-label": `Remove ${F}`
3835
+ onClick: ke((J) => z(te), ["stop"]),
3836
+ "aria-label": `Remove ${O}`
3805
3837
  }, $[2] || ($[2] = [
3806
3838
  l("svg", {
3807
3839
  height: "14",
@@ -3813,11 +3845,11 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3813
3845
  }, [
3814
3846
  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" })
3815
3847
  ], -1)
3816
- ]), 8, Fr)
3848
+ ]), 8, Pr)
3817
3849
  ]))), 128)),
3818
- m.value ? (i(), d("div", Or, G(f.value), 1)) : D("", !0),
3819
- l("div", Dr, [
3820
- S.value ? D("", !0) : ae((i(), d("input", {
3850
+ m.value ? (i(), d("div", Rr, G(f.value), 1)) : F("", !0),
3851
+ l("div", Hr, [
3852
+ S.value ? F("", !0) : ne((i(), d("input", {
3821
3853
  key: 0,
3822
3854
  ref_key: "inputRef",
3823
3855
  ref: r,
@@ -3829,24 +3861,24 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3829
3861
  type: "text",
3830
3862
  tabindex: "0",
3831
3863
  "aria-label": "Add tag",
3832
- "onUpdate:modelValue": $[0] || ($[0] = (F) => c.value = F),
3864
+ "onUpdate:modelValue": $[0] || ($[0] = (O) => c.value = O),
3833
3865
  onFocus: I,
3834
3866
  onBlur: v,
3835
- onKeydown: x,
3867
+ onKeydown: w,
3836
3868
  placeholder: p.value && p.value.length ? "" : void 0
3837
- }, null, 40, Ur)), [
3838
- [ve, c.value]
3869
+ }, null, 40, Nr)), [
3870
+ [me, c.value]
3839
3871
  ])
3840
3872
  ])
3841
3873
  ], 512),
3842
- l("div", Pr, [
3874
+ l("div", qr, [
3843
3875
  y.value ? (i(), d("button", {
3844
3876
  key: 0,
3845
3877
  type: "button",
3846
3878
  class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
3847
3879
  "aria-label": "Clear all tags",
3848
3880
  disabled: S.value,
3849
- onClick: ke(H, ["stop"])
3881
+ onClick: ke(P, ["stop"])
3850
3882
  }, $[3] || ($[3] = [
3851
3883
  l("svg", {
3852
3884
  height: "20",
@@ -3856,13 +3888,13 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3856
3888
  }, [
3857
3889
  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" })
3858
3890
  ], -1)
3859
- ]), 8, Rr)) : D("", !0)
3891
+ ]), 8, Wr)) : F("", !0)
3860
3892
  ])
3861
- ], 10, zr)
3893
+ ], 10, Or)
3862
3894
  ], 2)
3863
3895
  ], 512));
3864
3896
  }
3865
- }), Nr = { class: "relative flex gap-1 bg-white w-full" }, qr = ["disabled", "placeholder"], Wr = /* @__PURE__ */ U({
3897
+ }), Kr = { class: "relative flex gap-1 bg-white w-full" }, Zr = ["disabled", "placeholder"], Jr = /* @__PURE__ */ U({
3866
3898
  __name: "vs-input-slug",
3867
3899
  props: /* @__PURE__ */ ie({
3868
3900
  disabled: { type: Boolean },
@@ -3921,15 +3953,15 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3921
3953
  const r = e?.value?.[t.parent || ""]?.toString(), u = n(r);
3922
3954
  a.value = u.toString();
3923
3955
  };
3924
- return (r, u) => (i(), d("div", Nr, [
3925
- ae(l("input", {
3956
+ return (r, u) => (i(), d("div", Kr, [
3957
+ ne(l("input", {
3926
3958
  ref: "vsText",
3927
3959
  disabled: r.disabled,
3928
3960
  placeholder: r.placeholder,
3929
3961
  "onUpdate:modelValue": u[0] || (u[0] = (c) => a.value = c),
3930
3962
  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"
3931
- }, null, 8, qr), [
3932
- [ve, a.value]
3963
+ }, null, 8, Zr), [
3964
+ [me, a.value]
3933
3965
  ]),
3934
3966
  l("button", {
3935
3967
  class: "px-2 bg-gray-100 border rounded-lg hover:bg-gray-200",
@@ -3937,13 +3969,13 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3937
3969
  }, " Gen ")
3938
3970
  ]));
3939
3971
  }
3940
- }), Gr = /* @__PURE__ */ X(Wr, [["__scopeId", "data-v-b0eba370"]]), Zr = { class: "w-full" }, Kr = {
3972
+ }), Yr = /* @__PURE__ */ X(Jr, [["__scopeId", "data-v-b0eba370"]]), Xr = { class: "w-full" }, Qr = {
3941
3973
  ref: "sortableContainer",
3942
3974
  class: "flex flex-col gap-1"
3943
- }, Jr = ["onDragstart", "onDrop"], Yr = { class: "w-1/3" }, Xr = { class: "w-2/3" }, Qr = ["onClick"], ei = {
3975
+ }, ei = ["onDragstart", "onDrop"], ti = { class: "w-1/3" }, li = { class: "w-2/3" }, oi = ["onClick"], ni = {
3944
3976
  key: 0,
3945
3977
  class: "text-[14px] text-gray-700"
3946
- }, ti = { class: "mt-2 w-full flex items-center" }, li = ["disabled"], oi = /* @__PURE__ */ U({
3978
+ }, ai = { class: "mt-2 w-full flex items-center" }, si = ["disabled"], ri = /* @__PURE__ */ U({
3947
3979
  __name: "vs-input-key-value",
3948
3980
  props: {
3949
3981
  parent: {},
@@ -3953,101 +3985,101 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
3953
3985
  },
3954
3986
  emits: ["update:modelValue"],
3955
3987
  setup(o, { emit: e }) {
3956
- const t = (K) => `${K}-${Math.random().toString(36).substring(2, 15)}`, a = Ae("values"), n = o, s = e, r = n.addButtonText ?? "Додати", u = n.ignore ?? [], c = k([]), p = k(null);
3988
+ const t = (Z) => `${Z}-${Math.random().toString(36).substring(2, 15)}`, a = Ae("values"), n = o, s = e, r = n.addButtonText ?? "Додати", u = n.ignore ?? [], c = k([]), p = k(null);
3957
3989
  (() => {
3958
- const K = n.parent && a?.value?.[n.parent] || n.modelValue || {};
3959
- c.value = Object.entries(K).filter(([T]) => !u.includes(T)).map(([T, H]) => ({
3990
+ const Z = n.parent && a?.value?.[n.parent] || n.modelValue || {};
3991
+ c.value = Object.entries(Z).filter(([z]) => !u.includes(z)).map(([z, P]) => ({
3960
3992
  id: t("key-value-"),
3961
- key: T,
3962
- value: H
3993
+ key: z,
3994
+ value: P
3963
3995
  }));
3964
3996
  })();
3965
- function m(K) {
3966
- p.value = K;
3997
+ function m(Z) {
3998
+ p.value = Z;
3967
3999
  }
3968
- function y(K) {
3969
- if (p.value === null || p.value === K) return;
3970
- const T = c.value.splice(p.value, 1)[0];
3971
- c.value.splice(K, 0, T), p.value = null;
4000
+ function y(Z) {
4001
+ if (p.value === null || p.value === Z) return;
4002
+ const z = c.value.splice(p.value, 1)[0];
4003
+ c.value.splice(Z, 0, z), p.value = null;
3972
4004
  }
3973
4005
  const S = B(
3974
- () => c.value.some((K) => K.key && !K.value || !K.key && K.value)
4006
+ () => c.value.some((Z) => Z.key && !Z.value || !Z.key && Z.value)
3975
4007
  ), q = () => {
3976
4008
  c.value.push({ id: t("key-value-"), key: "", value: "" });
3977
- }, R = (K) => {
3978
- c.value = c.value.filter((T) => T.id !== K);
4009
+ }, H = (Z) => {
4010
+ c.value = c.value.filter((z) => z.id !== Z);
3979
4011
  };
3980
4012
  return ue(
3981
4013
  c,
3982
- (K) => {
3983
- const T = {};
3984
- K.forEach((I) => {
3985
- I.key && I.value !== void 0 && (T[I.key] = I.value);
4014
+ (Z) => {
4015
+ const z = {};
4016
+ Z.forEach((I) => {
4017
+ I.key && I.value !== void 0 && (z[I.key] = I.value);
3986
4018
  });
3987
- const H = {};
4019
+ const P = {};
3988
4020
  u.length && u.forEach((I) => {
3989
- H[I] = n.parent ? a?.value?.[n.parent]?.[I] : void 0;
4021
+ P[I] = n.parent ? a?.value?.[n.parent]?.[I] : void 0;
3990
4022
  }), a?.value && n.parent && (a.value[n.parent] = {
3991
- ...H,
3992
- ...T
3993
- }), s("update:modelValue", T);
4023
+ ...P,
4024
+ ...z
4025
+ }), s("update:modelValue", z);
3994
4026
  },
3995
4027
  { deep: !0 }
3996
- ), (K, T) => (i(), d("div", Zr, [
3997
- l("div", Kr, [
3998
- (i(!0), d(re, null, fe(c.value, (H, I) => (i(), d("div", {
3999
- key: H.id,
4028
+ ), (Z, z) => (i(), d("div", Xr, [
4029
+ l("div", Qr, [
4030
+ (i(!0), d(re, null, fe(c.value, (P, I) => (i(), d("div", {
4031
+ key: P.id,
4000
4032
  class: E(["flex items-center gap-2 w-full", { "opacity-50": p.value === I }]),
4001
4033
  draggable: "true",
4002
4034
  onDragstart: (v) => m(I),
4003
- onDragover: T[0] || (T[0] = ke(() => {
4035
+ onDragover: z[0] || (z[0] = ke(() => {
4004
4036
  }, ["prevent"])),
4005
4037
  onDrop: (v) => y(I)
4006
4038
  }, [
4007
- T[1] || (T[1] = ye('<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)),
4008
- l("div", Yr, [
4009
- A(Ye, {
4010
- modelValue: H.key,
4011
- "onUpdate:modelValue": (v) => H.key = v,
4039
+ z[1] || (z[1] = ye('<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)),
4040
+ l("div", ti, [
4041
+ T(Ye, {
4042
+ modelValue: P.key,
4043
+ "onUpdate:modelValue": (v) => P.key = v,
4012
4044
  placeholder: "Ключ"
4013
4045
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
4014
4046
  ]),
4015
- l("div", Xr, [
4016
- A(Ye, {
4017
- modelValue: H.value,
4018
- "onUpdate:modelValue": (v) => H.value = v,
4047
+ l("div", li, [
4048
+ T(Ye, {
4049
+ modelValue: P.value,
4050
+ "onUpdate:modelValue": (v) => P.value = v,
4019
4051
  placeholder: "Значення"
4020
4052
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
4021
4053
  ]),
4022
4054
  l("button", {
4023
- onClick: (v) => R(H.id),
4055
+ onClick: (v) => H(P.id),
4024
4056
  class: "shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200"
4025
4057
  }, [
4026
- A(ee(ql), {
4058
+ T(ee(Wl), {
4027
4059
  height: "16",
4028
4060
  width: "16"
4029
4061
  })
4030
- ], 8, Qr)
4031
- ], 42, Jr))), 128))
4062
+ ], 8, oi)
4063
+ ], 42, ei))), 128))
4032
4064
  ], 512),
4033
- c.value.length ? D("", !0) : (i(), d("span", ei, " Дані для відображення відсутні ")),
4034
- l("div", ti, [
4065
+ c.value.length ? F("", !0) : (i(), d("span", ni, " Дані для відображення відсутні ")),
4066
+ l("div", ai, [
4035
4067
  l("button", {
4036
4068
  type: "button",
4037
4069
  onClick: q,
4038
4070
  disabled: S.value,
4039
4071
  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"
4040
4072
  }, [
4041
- A(qe, {
4073
+ T(qe, {
4042
4074
  height: "14",
4043
4075
  width: "14"
4044
4076
  }),
4045
4077
  ge(" " + G(ee(r)), 1)
4046
- ], 8, li)
4078
+ ], 8, si)
4047
4079
  ])
4048
4080
  ]));
4049
4081
  }
4050
- }), ni = /* @__PURE__ */ X(oi, [["__scopeId", "data-v-a0f7fbfc"]]), ai = { class: "flex items-center gap-2 w-full" }, si = ["disabled"], ri = /* @__PURE__ */ U({
4082
+ }), ii = /* @__PURE__ */ X(ri, [["__scopeId", "data-v-a0f7fbfc"]]), ui = { class: "flex items-center gap-2 w-full" }, di = ["disabled"], ci = /* @__PURE__ */ U({
4051
4083
  __name: "vs-input-color",
4052
4084
  props: {
4053
4085
  style: { default: () => ({}) },
@@ -4064,26 +4096,26 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
4064
4096
  get: () => t.modelValue || "#000000",
4065
4097
  set: (r) => n("update:modelValue", r)
4066
4098
  });
4067
- return (r, u) => (i(), d("div", ai, [
4068
- ae(l("input", {
4099
+ return (r, u) => (i(), d("div", ui, [
4100
+ ne(l("input", {
4069
4101
  type: "color",
4070
4102
  "onUpdate:modelValue": u[0] || (u[0] = (c) => s.value = c),
4071
4103
  disabled: r.disabled,
4072
4104
  ref: "color",
4073
4105
  class: E(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]", [r.modelValue ? "" : "text-opacity-50", ee(a)].join(" ")]),
4074
4106
  style: { border: "1px solid #CFD9E0" }
4075
- }, null, 10, si), [
4076
- [ve, s.value]
4107
+ }, null, 10, di), [
4108
+ [me, s.value]
4077
4109
  ]),
4078
- ae(l("input", {
4110
+ ne(l("input", {
4079
4111
  class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2",
4080
4112
  "onUpdate:modelValue": u[1] || (u[1] = (c) => s.value = c)
4081
4113
  }, null, 512), [
4082
- [ve, s.value]
4114
+ [me, s.value]
4083
4115
  ])
4084
4116
  ]));
4085
4117
  }
4086
- }), ii = { class: "flex items-center gap-2 w-full" }, ui = ["min", "max", "step", "disabled"], di = /* @__PURE__ */ U({
4118
+ }), pi = { class: "flex items-center gap-2 w-full" }, fi = ["min", "max", "step", "disabled"], mi = /* @__PURE__ */ U({
4087
4119
  __name: "vs-input-range",
4088
4120
  props: {
4089
4121
  style: { default: () => ({}) },
@@ -4103,8 +4135,8 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
4103
4135
  get: () => Number(t.modelValue ?? t.min),
4104
4136
  set: (r) => n("update:modelValue", Number(r))
4105
4137
  });
4106
- return (r, u) => (i(), d("div", ii, [
4107
- ae(l("input", {
4138
+ return (r, u) => (i(), d("div", pi, [
4139
+ ne(l("input", {
4108
4140
  type: "range",
4109
4141
  "onUpdate:modelValue": u[0] || (u[0] = (c) => s.value = c),
4110
4142
  min: r.min,
@@ -4113,19 +4145,19 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
4113
4145
  disabled: r.disabled,
4114
4146
  ref: "range",
4115
4147
  class: E(["w-full cursor-pointer accent-blue-500", [r.modelValue ? "" : "text-opacity-50", ee(a)].join(" ")])
4116
- }, null, 10, ui), [
4117
- [ve, s.value]
4148
+ }, null, 10, fi), [
4149
+ [me, s.value]
4118
4150
  ]),
4119
- ae(l("input", {
4151
+ ne(l("input", {
4120
4152
  class: "text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2 max-w-[100px]",
4121
4153
  type: "number",
4122
4154
  "onUpdate:modelValue": u[1] || (u[1] = (c) => s.value = c)
4123
4155
  }, null, 512), [
4124
- [ve, s.value]
4156
+ [me, s.value]
4125
4157
  ])
4126
4158
  ]));
4127
4159
  }
4128
- }), ci = ["type", "value", "onInput", "placeholder", "disabled"], pi = /* @__PURE__ */ U({
4160
+ }), vi = ["type", "value", "onInput", "placeholder", "disabled"], hi = /* @__PURE__ */ U({
4129
4161
  __name: "vs-input-array",
4130
4162
  props: /* @__PURE__ */ ie({
4131
4163
  count: { default: 1 },
@@ -4145,7 +4177,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
4145
4177
  emits: ["update:modelValue"],
4146
4178
  setup(o) {
4147
4179
  const e = o, { inputClass: t } = $e(e.style), a = de(o, "modelValue");
4148
- Gt(() => {
4180
+ Kt(() => {
4149
4181
  const s = a.value?.length ?? 0;
4150
4182
  s < e.count && (a.value = [
4151
4183
  ...a.value ?? [],
@@ -4169,38 +4201,38 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
4169
4201
  style: {
4170
4202
  border: "1px solid #CFD9E0"
4171
4203
  }
4172
- }, null, 42, ci))), 256))
4204
+ }, null, 42, vi))), 256))
4173
4205
  ], 2));
4174
4206
  }
4175
- }), fi = {
4207
+ }), gi = {
4176
4208
  VsInputText: Ye,
4177
- VsInputRadio: gt,
4209
+ VsInputRadio: wt,
4178
4210
  "vs-input-text": Ye,
4179
- "vs-input-password": yl,
4180
- "vs-input-textarea": ka,
4181
- "vs-input-mask": lo,
4182
- "vs-input-number": kl,
4183
- "vs-input-radio": gt,
4184
- "vs-input-select": wt,
4185
- "vs-input-switcher": Bt,
4186
- "vs-input-static": ht,
4187
- "vs-input-container": oa,
4188
- "vs-input-date": go,
4189
- "vs-input-checkbox": vo,
4190
- "vs-input-file": tn,
4191
- "vs-input-html": ht,
4192
- "vs-input-email": ao,
4193
- "vs-input-datatable": Ls,
4194
- "vs-input-map": Ir,
4195
- "vs-input-file-list": En,
4196
- "vs-input-tags": Hr,
4197
- "vs-input-slug": Gr,
4198
- "vs-input-key-value": ni,
4199
- "vs-input-range": di,
4200
- "vs-input-color": ri,
4201
- "vs-input-native-select": wt,
4202
- "vs-input-array": pi
4203
- }, mi = /* @__PURE__ */ U({
4211
+ "vs-input-password": xl,
4212
+ "vs-input-textarea": Va,
4213
+ "vs-input-mask": oo,
4214
+ "vs-input-number": _l,
4215
+ "vs-input-radio": wt,
4216
+ "vs-input-select": Ct,
4217
+ "vs-input-switcher": zt,
4218
+ "vs-input-static": xt,
4219
+ "vs-input-container": na,
4220
+ "vs-input-date": bo,
4221
+ "vs-input-checkbox": ho,
4222
+ "vs-input-file": ln,
4223
+ "vs-input-html": xt,
4224
+ "vs-input-email": so,
4225
+ "vs-input-datatable": Es,
4226
+ "vs-input-map": Fr,
4227
+ "vs-input-file-list": In,
4228
+ "vs-input-tags": Gr,
4229
+ "vs-input-slug": Yr,
4230
+ "vs-input-key-value": ii,
4231
+ "vs-input-range": mi,
4232
+ "vs-input-color": ci,
4233
+ "vs-input-native-select": Ct,
4234
+ "vs-input-array": hi
4235
+ }, bi = /* @__PURE__ */ U({
4204
4236
  __name: "behavior",
4205
4237
  props: {
4206
4238
  api: {},
@@ -4232,10 +4264,10 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
4232
4264
  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"
4233
4265
  }, G(n.button), 1));
4234
4266
  }
4235
- }), vi = { class: "flex flex-col gap-1 w-full" }, hi = {
4267
+ }), yi = { class: "flex flex-col gap-1 w-full" }, xi = {
4236
4268
  key: 0,
4237
4269
  class: "text-sm text-gray-500"
4238
- }, zt = /* @__PURE__ */ U({
4270
+ }, Ot = /* @__PURE__ */ U({
4239
4271
  __name: "vs-compact-form-layout",
4240
4272
  props: /* @__PURE__ */ ie({
4241
4273
  item: { default: {} },
@@ -4250,7 +4282,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
4250
4282
  }),
4251
4283
  emits: ["update:modelValue"],
4252
4284
  setup(o) {
4253
- const e = o, t = de(o, "modelValue"), a = B(() => gl[`${e.layout}`]), n = B(() => fi?.[`vs-input-${e.item.type}`]), s = B(() => {
4285
+ const e = o, t = de(o, "modelValue"), a = B(() => bl[`${e.layout}`]), n = B(() => gi?.[`vs-input-${e.item.type}`]), s = B(() => {
4254
4286
  const u = ee(n);
4255
4287
  if (!u) return /* @__PURE__ */ new Set();
4256
4288
  const c = u.props ?? u.__vccOpts?.props;
@@ -4261,7 +4293,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
4261
4293
  const u = e.item ?? {}, c = s.value;
4262
4294
  return c.size ? Object.fromEntries(Object.entries(u).filter(([p]) => c.has(p))) : {};
4263
4295
  });
4264
- return (u, c) => ae((i(), me(Fe(a.value), {
4296
+ return (u, c) => ne((i(), ve(Fe(a.value), {
4265
4297
  ua: e.item.ua,
4266
4298
  error: e.error || "",
4267
4299
  item: u.item,
@@ -4272,14 +4304,14 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
4272
4304
  l("div", {
4273
4305
  class: E(["flex w-full", `${e.item.type}-component`])
4274
4306
  }, [
4275
- l("div", vi, [
4276
- (i(), me(Fe(n.value), Te(r.value, {
4307
+ l("div", yi, [
4308
+ (i(), ve(Fe(n.value), Te(r.value, {
4277
4309
  modelValue: t.value,
4278
4310
  "onUpdate:modelValue": c[0] || (c[0] = (p) => t.value = p)
4279
4311
  }), null, 16, ["modelValue"])),
4280
- u.item.description && e.layout !== "settings" ? (i(), d("p", hi, G(u.item.description), 1)) : D("", !0)
4312
+ u.item.description && e.layout !== "settings" ? (i(), d("p", xi, G(u.item.description), 1)) : F("", !0)
4281
4313
  ]),
4282
- u.item.behavior?.api && u.item.behavior?.button ? (i(), me(mi, Te({ key: 0 }, u.item.behavior, { value: t.value }), null, 16, ["value"])) : D("", !0)
4314
+ u.item.behavior?.api && u.item.behavior?.button ? (i(), ve(bi, Te({ key: 0 }, u.item.behavior, { value: t.value }), null, 16, ["value"])) : F("", !0)
4283
4315
  ], 2)
4284
4316
  ]),
4285
4317
  _: 1
@@ -4287,7 +4319,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
4287
4319
  [Qe, !u.item.hidden]
4288
4320
  ]);
4289
4321
  }
4290
- }), gi = { class: "text-sm text-gray-800 mb-[4px] font-medium dark:text-neutral-300" }, bi = { class: "vs-compact-form-navigation__rail mt-[6px]" }, yi = ["onClick"], xi = /* @__PURE__ */ U({
4322
+ }), wi = { class: "text-sm text-gray-800 mb-[4px] font-medium dark:text-neutral-300" }, ki = { class: "vs-compact-form-navigation__rail mt-[6px]" }, _i = ["onClick"], $i = /* @__PURE__ */ U({
4291
4323
  __name: "vs-compact-form-navigation",
4292
4324
  props: {
4293
4325
  target: {},
@@ -4304,11 +4336,11 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
4304
4336
  ]), c = B(() => {
4305
4337
  const M = t.width;
4306
4338
  if (M == null) return {};
4307
- const Z = typeof M == "number" ? `${M}px` : `${M}`;
4308
- return { width: Z, minWidth: Z };
4339
+ const K = typeof M == "number" ? `${M}px` : `${M}`;
4340
+ return { width: K, minWidth: K };
4309
4341
  });
4310
4342
  let p = null, f = 0, m = 0, y = null, S = null, q = null;
4311
- const R = () => te(), K = () => H();
4343
+ const H = () => te(), Z = () => P();
4312
4344
  ue(
4313
4345
  () => t.target,
4314
4346
  async (M) => {
@@ -4316,7 +4348,7 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
4316
4348
  y = null, a.value = [], n.value = "";
4317
4349
  return;
4318
4350
  }
4319
- y = M, r.value && (await je(), x(M), H());
4351
+ y = M, r.value && (await je(), w(M), P());
4320
4352
  },
4321
4353
  { immediate: !0 }
4322
4354
  ), ue(
@@ -4326,26 +4358,26 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
4326
4358
  S = M ?? null;
4327
4359
  return;
4328
4360
  }
4329
- T(M ?? null), je(() => H());
4361
+ z(M ?? null), je(() => P());
4330
4362
  },
4331
4363
  { immediate: !0 }
4332
4364
  ), _e(() => {
4333
- t.scrollContainer || T(null), H();
4365
+ t.scrollContainer || z(null), P();
4334
4366
  }), at(() => {
4335
- V(), T(null, !0), y = null, typeof window < "u" && (f && window.cancelAnimationFrame(f), m && window.cancelAnimationFrame(m));
4367
+ V(), z(null, !0), y = null, typeof window < "u" && (f && window.cancelAnimationFrame(f), m && window.cancelAnimationFrame(m));
4336
4368
  });
4337
- function T(M, Z = !1) {
4338
- if (q && (q(), q = null), Z) {
4369
+ function z(M, K = !1) {
4370
+ if (q && (q(), q = null), K) {
4339
4371
  S = null;
4340
4372
  return;
4341
4373
  }
4342
4374
  if (S = M ?? null, typeof window > "u") return;
4343
4375
  const N = M ?? window, le = window;
4344
- N.addEventListener("scroll", R, { passive: !0 }), le.addEventListener("resize", K), q = () => {
4345
- N.removeEventListener("scroll", R), le.removeEventListener("resize", K);
4376
+ N.addEventListener("scroll", H, { passive: !0 }), le.addEventListener("resize", Z), q = () => {
4377
+ N.removeEventListener("scroll", H), le.removeEventListener("resize", Z);
4346
4378
  };
4347
4379
  }
4348
- function H() {
4380
+ function P() {
4349
4381
  if (!r.value || !y) return;
4350
4382
  f && typeof window < "u" && window.cancelAnimationFrame(f);
4351
4383
  const M = () => {
@@ -4355,72 +4387,72 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
4355
4387
  }
4356
4388
  function I() {
4357
4389
  if (!r.value || !y) return;
4358
- const M = Array.from(y.querySelectorAll("h1, h2")), Z = /* @__PURE__ */ new Set(), N = [];
4359
- M.forEach((le, z) => {
4390
+ const M = Array.from(y.querySelectorAll("h1, h2")), K = /* @__PURE__ */ new Set(), N = [];
4391
+ M.forEach((le, A) => {
4360
4392
  const j = le.textContent?.trim() ?? "";
4361
4393
  if (!j) return;
4362
4394
  let C = (le.getAttribute("id") ?? "").trim();
4363
- C || (C = v(j) || `heading-${z + 1}`);
4395
+ C || (C = v(j) || `heading-${A + 1}`);
4364
4396
  let W = C, oe = 1;
4365
- for (; Z.has(W); )
4397
+ for (; K.has(W); )
4366
4398
  W = `${C}-${oe += 1}`;
4367
- le.id !== W && Object.assign(le, { id: W }), Z.add(W), N.push({
4399
+ le.id !== W && Object.assign(le, { id: W }), K.add(W), N.push({
4368
4400
  id: W,
4369
4401
  text: j,
4370
4402
  level: le.tagName.toLowerCase() === "h1" ? 1 : 2
4371
4403
  });
4372
- }), a.value = N, N.length || (n.value = ""), F();
4404
+ }), a.value = N, N.length || (n.value = ""), O();
4373
4405
  }
4374
4406
  function v(M) {
4375
4407
  return M.toLowerCase().replace(/[^a-z0-9\s-]/g, "").trim().replace(/\s+/g, "-");
4376
4408
  }
4377
- function x(M) {
4378
- !M || !r.value || typeof MutationObserver > "u" || (V(), p = new MutationObserver(() => H()), p.observe(M, { childList: !0, subtree: !0 }));
4409
+ function w(M) {
4410
+ !M || !r.value || typeof MutationObserver > "u" || (V(), p = new MutationObserver(() => P()), p.observe(M, { childList: !0, subtree: !0 }));
4379
4411
  }
4380
4412
  function V() {
4381
4413
  p && (p.disconnect(), p = null);
4382
4414
  }
4383
4415
  function $(M) {
4384
- const Z = S;
4385
- if (!Z)
4416
+ const K = S;
4417
+ if (!K)
4386
4418
  return typeof window > "u" ? M.offsetTop : M.getBoundingClientRect().top + window.scrollY;
4387
- const N = M.getBoundingClientRect(), le = Z.getBoundingClientRect();
4388
- return N.top - le.top + Z.scrollTop;
4419
+ const N = M.getBoundingClientRect(), le = K.getBoundingClientRect();
4420
+ return N.top - le.top + K.scrollTop;
4389
4421
  }
4390
- function F() {
4422
+ function O() {
4391
4423
  if (!r.value || !a.value.length) return;
4392
- const M = S, Z = (M ? M.scrollTop : null) || (typeof window < "u" ? window.scrollY : 0), N = (M ? M.clientHeight : null) || (typeof window < "u" ? window.innerHeight : 0), le = Z + N;
4393
- let z = null;
4424
+ const M = S, K = (M ? M.scrollTop : null) || (typeof window < "u" ? window.scrollY : 0), N = (M ? M.clientHeight : null) || (typeof window < "u" ? window.innerHeight : 0), le = K + N;
4425
+ let A = null;
4394
4426
  for (let C = 0; C < a.value.length; C += 1) {
4395
4427
  const W = a.value[C], oe = document.getElementById(W.id);
4396
4428
  if (oe) {
4397
4429
  const se = $(oe);
4398
- se + oe.offsetHeight > Z && se < le && (z = W.id);
4430
+ se + oe.offsetHeight > K && se < le && (A = W.id);
4399
4431
  }
4400
4432
  }
4401
- !z && s.value && (z = s.value), z && (s.value = z);
4433
+ !A && s.value && (A = s.value), A && (s.value = A);
4402
4434
  const j = M ? M.scrollHeight - M.clientHeight : document.documentElement.scrollHeight - window.innerHeight;
4403
- Z + 5 >= j && (z = a.value[a.value.length - 1].id), z && (n.value = z);
4435
+ K + 5 >= j && (A = a.value[a.value.length - 1].id), A && (n.value = A);
4404
4436
  }
4405
4437
  function te() {
4406
4438
  r.value && (m && window.cancelAnimationFrame(m), m = window.requestAnimationFrame(() => {
4407
- F(), m = 0;
4439
+ O(), m = 0;
4408
4440
  }));
4409
4441
  }
4410
4442
  function J(M) {
4411
4443
  if (!r.value) return;
4412
- const Z = document.getElementById(M);
4413
- if (!Z) return;
4414
- const N = S, le = Math.max(0, $(Z));
4444
+ const K = document.getElementById(M);
4445
+ if (!K) return;
4446
+ const N = S, le = Math.max(0, $(K));
4415
4447
  N ? N.scrollTo({ top: le, behavior: "smooth" }) : typeof window < "u" && window.scrollTo({ top: le, behavior: "smooth" });
4416
4448
  }
4417
- return e({ refresh: H }), (M, Z) => r.value && a.value.length ? (i(), d("div", {
4449
+ return e({ refresh: P }), (M, K) => r.value && a.value.length ? (i(), d("div", {
4418
4450
  key: 0,
4419
4451
  class: E(u.value),
4420
4452
  style: be(c.value)
4421
4453
  }, [
4422
- l("h2", gi, G(M.title), 1),
4423
- l("div", bi, [
4454
+ l("h2", wi, G(M.title), 1),
4455
+ l("div", ki, [
4424
4456
  (i(!0), d(re, null, fe(a.value, (N) => (i(), d("div", {
4425
4457
  key: N.id,
4426
4458
  class: E([
@@ -4439,34 +4471,34 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
4439
4471
  ])
4440
4472
  }, [
4441
4473
  l("span", null, G(N.text), 1)
4442
- ], 10, yi)
4474
+ ], 10, _i)
4443
4475
  ], 2))), 128))
4444
4476
  ])
4445
- ], 6)) : D("", !0);
4477
+ ], 6)) : F("", !0);
4446
4478
  }
4447
- }), wi = /* @__PURE__ */ X(xi, [["__scopeId", "data-v-1584a562"]]), At = {
4479
+ }), Ci = /* @__PURE__ */ X($i, [["__scopeId", "data-v-1584a562"]]), Dt = {
4448
4480
  required: "Це поле є обов’язковим",
4449
4481
  email: "Неправильний email"
4450
- }, ki = (o) => o ? !1 : At.required, _i = (o) => {
4482
+ }, Vi = (o) => o ? !1 : Dt.required, Mi = (o) => {
4451
4483
  const e = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
4452
- return o ? e.test(o) ? !1 : At.email : !1;
4453
- }, $i = (o, e) => {
4484
+ return o ? e.test(o) ? !1 : Dt.email : !1;
4485
+ }, Li = (o, e) => {
4454
4486
  const t = e.pattern ?? e.regexp;
4455
4487
  return !(typeof t == "string" ? new RegExp(t) : t).test(o) && o ? e.message : !1;
4456
- }, Ci = (o, e) => !1, Vi = (o, e) => {
4488
+ }, Si = (o, e) => !1, Bi = (o, e) => {
4457
4489
  switch (typeof e == "string" ? e : e.type) {
4458
4490
  case "required":
4459
- return ki(o);
4491
+ return Vi(o);
4460
4492
  case "email":
4461
- return _i(o);
4493
+ return Mi(o);
4462
4494
  case "regexp":
4463
- return $i(o, e);
4495
+ return Li(o, e);
4464
4496
  case "custom":
4465
- return Ci();
4497
+ return Si();
4466
4498
  default:
4467
4499
  return !1;
4468
4500
  }
4469
- }, Mi = {
4501
+ }, ji = {
4470
4502
  autocomplete: "select",
4471
4503
  combobox: "select",
4472
4504
  datepicker: "date",
@@ -4479,16 +4511,16 @@ const Js = /* @__PURE__ */ X(Gs, [["render", Ks]]), Ys = { class: "map-search-wi
4479
4511
  dropzone: "file"
4480
4512
  // mask: 'text',
4481
4513
  };
4482
- function _t(o) {
4514
+ function Mt(o) {
4483
4515
  const e = o.toLowerCase();
4484
- return Mi[e] || e;
4516
+ return ji[e] || e;
4485
4517
  }
4486
- function Li(o, e = !1) {
4518
+ function Ei(o, e = !1) {
4487
4519
  if (Array.isArray(o)) {
4488
4520
  const a = [];
4489
4521
  return o.forEach((n) => {
4490
4522
  const s = { ...n };
4491
- s.name = (n.name || n.id || n.key || "").toString(), s.type = _t(n.type), s.label = n.label || n.ua, s.rules = n.rules || n.validators, s.type === "email" && !s.rules && (s.rules = ["email"]), n.data && (s.api = `/api/suggest/${n.data}`), s.disabled = e || s.disabled, a.push(s);
4523
+ s.name = (n.name || n.id || n.key || "").toString(), s.type = Mt(n.type), s.label = n.label || n.ua, s.rules = n.rules || n.validators, s.type === "email" && !s.rules && (s.rules = ["email"]), n.data && (s.api = `/api/suggest/${n.data}`), s.disabled = e || s.disabled, a.push(s);
4492
4524
  }), a;
4493
4525
  }
4494
4526
  const t = [];
@@ -4496,7 +4528,7 @@ function Li(o, e = !1) {
4496
4528
  const n = {
4497
4529
  name: a[0],
4498
4530
  ...a[1],
4499
- type: _t(a[1].type),
4531
+ type: Mt(a[1].type),
4500
4532
  label: a[1].label || a[1].ua,
4501
4533
  rules: a[1].rules || a[1].validators,
4502
4534
  disabled: e
@@ -4504,8 +4536,8 @@ function Li(o, e = !1) {
4504
4536
  n.type === "email" && !n.rules && (n.rules = ["email"]), a[1].type.includes("list") && (n.multiple = !0), !n.api && a[1].data && (n.api = `/api/suggest/${a[1].data}`), t.push(n);
4505
4537
  }), t;
4506
4538
  }
4507
- function Si(o, e, t = !1) {
4508
- const a = B(() => Li(
4539
+ function Ii(o, e, t = !1) {
4540
+ const a = B(() => Ei(
4509
4541
  (Array.isArray(e), e),
4510
4542
  typeof t == "boolean" ? t : t.value
4511
4543
  )), n = k({});
@@ -4513,7 +4545,7 @@ function Si(o, e, t = !1) {
4513
4545
  const f = p?.conditions;
4514
4546
  if (!f) return !0;
4515
4547
  const m = Array.isArray(f) ? f[0] : f, y = o?.value?.[m];
4516
- return It(y, f);
4548
+ return Ft(y, f);
4517
4549
  }
4518
4550
  const r = (p = a.value, f = !0) => (p.forEach((m) => {
4519
4551
  if (m.rules) {
@@ -4523,8 +4555,8 @@ function Si(o, e, t = !1) {
4523
4555
  }
4524
4556
  let y = !1, S = null;
4525
4557
  m.rules.forEach((q) => {
4526
- const R = Vi(o.value[m.name], q);
4527
- R && (y = !0, !S && typeof R == "string" && (S = R));
4558
+ const H = Bi(o.value[m.name], q);
4559
+ H && (y = !0, !S && typeof H == "string" && (S = H));
4528
4560
  }), y && S ? n.value[m.name] = S : delete n.value[m.name];
4529
4561
  }
4530
4562
  m.schema && r(m.schema, !1);
@@ -4538,7 +4570,7 @@ function Si(o, e, t = !1) {
4538
4570
  visibleSchema: u
4539
4571
  };
4540
4572
  }
4541
- const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
4573
+ const zi = { class: "flex w-full h-full min-h-0 gap-6" }, Ai = {
4542
4574
  key: 0,
4543
4575
  "data-orientation": "horizontal",
4544
4576
  role: "none",
@@ -4568,7 +4600,7 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
4568
4600
  validate: c,
4569
4601
  reset: p,
4570
4602
  visibleSchema: f
4571
- } = Si(r, n.schema, Zt(n, "disabled")), m = k(null), y = k(null), S = B(() => n.navigation), q = B(() => n.navWidth), R = B(() => n.style?.columns), K = Object.freeze({ container: 12, label: 3 }), T = B(() => n.columns ?? R.value ?? K), H = B(() => n.columns != null || R.value != null), I = B(() => H.value ? "horizontal" : n.layout), v = (F) => F?.columns ? "horizontal" : I.value, x = (F) => F?.columns ?? T.value, V = () => {
4603
+ } = Ii(r, n.schema, Zt(n, "disabled")), m = k(null), y = k(null), S = B(() => n.navigation), q = B(() => n.navWidth), H = B(() => n.style?.columns), Z = Object.freeze({ container: 12, label: 3 }), z = B(() => n.columns ?? H.value ?? Z), P = B(() => n.columns != null || H.value != null), I = B(() => P.value ? "horizontal" : n.layout), v = (O) => O?.columns ? "horizontal" : I.value, w = (O) => O?.columns ?? z.value, V = () => {
4572
4604
  a("update:modelValue", r.value), c(), a("handle-submit", r.value);
4573
4605
  };
4574
4606
  e({
@@ -4584,13 +4616,13 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
4584
4616
  formId: n.formId
4585
4617
  };
4586
4618
  });
4587
- function $(F, te) {
4588
- if (F === te) return !0;
4589
- if (typeof F != "object" || typeof te != "object" || !F || !te) return !1;
4590
- const J = Object.keys(F), M = Object.keys(te);
4591
- return J.length !== M.length ? !1 : J.every((Z) => F[Z] === te[Z]);
4619
+ function $(O, te) {
4620
+ if (O === te) return !0;
4621
+ if (typeof O != "object" || typeof te != "object" || !O || !te) return !1;
4622
+ const J = Object.keys(O), M = Object.keys(te);
4623
+ return J.length !== M.length ? !1 : J.every((K) => O[K] === te[K]);
4592
4624
  }
4593
- return vt("form", s), vt("values", r), (F, te) => (i(), d("div", Bi, [
4625
+ return yt("form", s), yt("values", r), (O, te) => (i(), d("div", zi, [
4594
4626
  l("div", {
4595
4627
  class: "flex-1 min-h-0 overflow-y-auto",
4596
4628
  ref_key: "formScrollContainer",
@@ -4606,23 +4638,23 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
4606
4638
  key: J.name,
4607
4639
  class: E(v(J) === "horizontal" ? "col-span-12" : `col-span-${J.col || 12}`)
4608
4640
  }, [
4609
- A(zt, {
4610
- style: be(F.style),
4641
+ T(Ot, {
4642
+ style: be(O.style),
4611
4643
  item: J,
4612
4644
  layout: v(J),
4613
- columns: x(J),
4645
+ columns: w(J),
4614
4646
  "model-value": r.value[J.name],
4615
- "onUpdate:modelValue": (Z) => {
4647
+ "onUpdate:modelValue": (K) => {
4616
4648
  const N = r.value[J.name];
4617
- $(N, Z) || (r.value[J.name] = Z);
4649
+ $(N, K) || (r.value[J.name] = K);
4618
4650
  },
4619
4651
  error: ee(u)[J.name]
4620
4652
  }, null, 8, ["style", "item", "layout", "columns", "model-value", "onUpdate:modelValue", "error"]),
4621
- v(J) === "settings" && M + 1 !== ee(f).length ? (i(), d("div", ji)) : D("", !0)
4653
+ v(J) === "settings" && M + 1 !== ee(f).length ? (i(), d("div", Ai)) : F("", !0)
4622
4654
  ], 2))), 128))
4623
4655
  ], 34)
4624
4656
  ], 512),
4625
- A(wi, {
4657
+ T(Ci, {
4626
4658
  target: m.value,
4627
4659
  "scroll-container": y.value,
4628
4660
  enabled: S.value,
@@ -4630,7 +4662,7 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
4630
4662
  }, null, 8, ["target", "scroll-container", "enabled", "width"])
4631
4663
  ]));
4632
4664
  }
4633
- }), Ei = { class: "relative" }, Ii = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, zi = { 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]" }, Ti = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, Fi = { class: "p-4 mim-h-0 h-full overflow-auto" }, Oi = /* @__PURE__ */ U({
4665
+ }), Ti = { class: "relative" }, Fi = { 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" }, Di = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, Ui = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, Pi = { class: "p-4 mim-h-0 h-full overflow-auto" }, Ri = /* @__PURE__ */ U({
4634
4666
  __name: "modal-edit",
4635
4667
  props: {
4636
4668
  schema: {},
@@ -4726,11 +4758,11 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
4726
4758
  message: m.message || "Unexpected error"
4727
4759
  }), console.error(m);
4728
4760
  }
4729
- }), (m, y) => (i(), d("div", Ei, [
4730
- l("div", Ii, [
4731
- l("div", zi, [
4732
- l("div", Ai, [
4733
- l("h3", Ti, G(c.value === "add" ? "Додати" : "Змінити"), 1),
4761
+ }), (m, y) => (i(), d("div", Ti, [
4762
+ l("div", Fi, [
4763
+ l("div", Oi, [
4764
+ l("div", Di, [
4765
+ l("h3", Ui, G(c.value === "add" ? "Додати" : "Змінити"), 1),
4734
4766
  l("button", {
4735
4767
  onClick: f,
4736
4768
  type: "button",
@@ -4754,15 +4786,15 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
4754
4786
  ], -1)
4755
4787
  ]))
4756
4788
  ]),
4757
- l("div", Fi, [
4758
- n.value ? (i(), me(We, {
4789
+ l("div", Pi, [
4790
+ n.value ? (i(), ve(We, {
4759
4791
  key: 0,
4760
4792
  schema: n.value,
4761
4793
  values: s.value,
4762
4794
  "onUpdate:values": y[0] || (y[0] = (S) => s.value = S),
4763
4795
  form: r.value,
4764
4796
  "onUpdate:form": y[1] || (y[1] = (S) => r.value = S)
4765
- }, null, 8, ["schema", "values", "form"])) : D("", !0)
4797
+ }, null, 8, ["schema", "values", "form"])) : F("", !0)
4766
4798
  ]),
4767
4799
  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" }, [
4768
4800
  l("button", {
@@ -4780,14 +4812,14 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
4780
4812
  ])
4781
4813
  ]));
4782
4814
  }
4783
- }), $t = (o = { mode: "edit", schema: null }) => new Promise((e) => {
4784
- const { close: t } = Kt({
4815
+ }), Lt = (o = { mode: "edit", schema: null }) => new Promise((e) => {
4816
+ const { close: t } = Jt({
4785
4817
  title: o.mode === "add" ? "Додати" : "Редагувати",
4786
4818
  template: "",
4787
4819
  visible: !0,
4788
4820
  size: "medium",
4789
4821
  closeClickBack: !0,
4790
- content: Oi,
4822
+ content: Ri,
4791
4823
  contentProps: {
4792
4824
  ...o,
4793
4825
  onClose: () => {
@@ -4801,34 +4833,34 @@ const Bi = { class: "flex w-full h-full min-h-0 gap-6" }, ji = {
4801
4833
  });
4802
4834
  We.install = function(e) {
4803
4835
  e.component("VForm", We), Object.assign(e.config.globalProperties, {
4804
- $form: $t
4805
- }), e.provide("form", $t), window.v3plugin || (window.v3plugin = {});
4836
+ $form: Lt
4837
+ }), e.provide("form", Lt), window.v3plugin || (window.v3plugin = {});
4806
4838
  };
4807
4839
  export {
4808
- Oi as ModalEdit,
4840
+ Ri as ModalEdit,
4809
4841
  We as VForm,
4810
- pi as VsInputArray,
4811
- vo as VsInputCheckbox,
4812
- ri as VsInputColor,
4813
- oa as VsInputContainer,
4814
- go as VsInputDate,
4815
- ao as VsInputEmail,
4816
- tn as VsInputFile,
4817
- En as VsInputFileList,
4818
- ni as VsInputKeyValue,
4819
- lo as VsInputMask,
4820
- kl as VsInputNumber,
4821
- gt as VsInputRadio,
4822
- di as VsInputRange,
4823
- wt as VsInputSelect,
4824
- Gr as VsInputSlug,
4825
- ht as VsInputStatic,
4826
- Bt as VsInputSwitcher,
4827
- Hr as VsInputTag,
4842
+ hi as VsInputArray,
4843
+ ho as VsInputCheckbox,
4844
+ ci as VsInputColor,
4845
+ na as VsInputContainer,
4846
+ bo as VsInputDate,
4847
+ so as VsInputEmail,
4848
+ ln as VsInputFile,
4849
+ In as VsInputFileList,
4850
+ ii as VsInputKeyValue,
4851
+ oo as VsInputMask,
4852
+ _l as VsInputNumber,
4853
+ wt as VsInputRadio,
4854
+ mi as VsInputRange,
4855
+ Ct as VsInputSelect,
4856
+ Yr as VsInputSlug,
4857
+ xt as VsInputStatic,
4858
+ zt as VsInputSwitcher,
4859
+ Gr as VsInputTag,
4828
4860
  Ye as VsInputText,
4829
- ka as VsInputTextarea,
4861
+ Va as VsInputTextarea,
4830
4862
  We as default,
4831
- fi as inputs,
4832
- Ls as vsInputDatatable,
4833
- Ir as vsInputMap
4863
+ gi as inputs,
4864
+ Es as vsInputDatatable,
4865
+ Fr as vsInputMap
4834
4866
  };