@opengis/form 0.0.19 → 0.0.22

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,9 +1,9 @@
1
- import { defineComponent as A, createElementBlock as u, openBlock as i, createCommentVNode as S, renderSlot as ve, createElementVNode as t, toDisplayString as E, normalizeProps as Ee, guardReactiveProps as Fe, createTextVNode as oe, computed as D, mergeModels as q, useModel as G, withDirectives as K, normalizeClass as B, unref as H, vModelText as ne, vModelCheckbox as Qe, createVNode as j, ref as $, createBlock as X, resolveDynamicComponent as xe, normalizeStyle as fe, withCtx as Me, withModifiers as re, onMounted as ue, onBeforeUnmount as ut, watch as se, createStaticVNode as ae, vModelRadio as Xe, Fragment as Q, renderList as Y, mergeProps as Ce, reactive as dt, vShow as De, inject as Se, resolveComponent as Pe, Transition as Ye, createApp as ct, h as pt, onUnmounted as et, nextTick as $e, Teleport as ft, provide as Ne } from "vue";
2
- import { notify as pe } from "@opengis/core";
3
- const vt = { class: "w-full relative" }, mt = {
1
+ import { defineComponent as A, ref as k, onMounted as ne, onUnmounted as Fe, createElementBlock as u, openBlock as i, normalizeClass as S, createCommentVNode as B, renderSlot as me, createElementVNode as l, toDisplayString as F, normalizeProps as Oe, guardReactiveProps as De, createTextVNode as oe, computed as D, mergeModels as Z, useModel as W, withDirectives as q, unref as H, vModelText as ie, vModelCheckbox as Ye, createVNode as j, createBlock as X, resolveDynamicComponent as we, normalizeStyle as ve, withCtx as Me, withModifiers as se, onBeforeUnmount as dt, watch as re, createStaticVNode as ae, vModelRadio as et, Fragment as K, renderList as Y, mergeProps as Ve, reactive as ct, vShow as Ue, inject as Be, resolveComponent as Ne, Transition as tt, nextTick as Ce, Teleport as pt, provide as He } from "vue";
2
+ import { notify as fe, modal as ft, TooltipDirective as qe } from "@opengis/core";
3
+ const vt = {
4
4
  key: 0,
5
5
  class: "text-[14px] font-medium text-gray-900 mb-2"
6
- }, ht = {
6
+ }, mt = { class: "opacity-100" }, ht = {
7
7
  key: 0,
8
8
  class: "text-red-500 text-[14px]"
9
9
  }, gt = {
@@ -13,19 +13,33 @@ const vt = { class: "w-full relative" }, mt = {
13
13
  __name: "vs-layout-default",
14
14
  props: {
15
15
  ua: { default: "" },
16
+ uk: {},
17
+ en: {},
18
+ de: {},
19
+ es: {},
20
+ fr: {},
16
21
  item: { default: () => ({}) },
17
22
  error: { type: [String, Boolean], default: "" },
18
23
  label: { default: "" }
19
24
  },
20
25
  setup(o) {
21
- return (e, l) => (i(), u("div", vt, [
22
- e.ua || e.label ? (i(), u("div", mt, [
23
- t("span", null, E(e.ua || e.label), 1),
24
- e.item?.rules?.includes("required") ? (i(), u("span", ht, "*")) : S("", !0)
25
- ])) : S("", !0),
26
- ve(e.$slots, "default", Ee(Fe(e.$attrs))),
27
- e.error ? (i(), u("span", gt, E(e.error), 1)) : S("", !0)
28
- ]));
26
+ const e = k("uk"), t = (n) => {
27
+ n.detail.key === "locale" && (e.value = n.detail.newValue);
28
+ };
29
+ return ne(() => {
30
+ e.value = localStorage.locale, window.addEventListener("storage", t);
31
+ }), Fe(() => {
32
+ window.removeEventListener("resize", t);
33
+ }), (n, s) => (i(), u("div", {
34
+ class: S(["w-full relative", { "opacity-60": n.item.disabled }])
35
+ }, [
36
+ n.ua || n.label ? (i(), u("div", vt, [
37
+ l("span", mt, F(n.item[e.value] || n.ua || n.label), 1),
38
+ n.item?.rules?.includes("required") ? (i(), u("span", ht, "*")) : B("", !0)
39
+ ])) : B("", !0),
40
+ me(n.$slots, "default", Oe(De(n.$attrs))),
41
+ n.error ? (i(), u("span", gt, F(n.error), 1)) : B("", !0)
42
+ ], 2));
29
43
  }
30
44
  }), yt = { class: "w-full relative flex flex-row items-center gap-2" }, xt = {
31
45
  key: 0,
@@ -40,18 +54,23 @@ const vt = { class: "w-full relative" }, mt = {
40
54
  __name: "vs-layout-horizontal",
41
55
  props: {
42
56
  ua: { default: "" },
57
+ uk: {},
58
+ en: {},
59
+ de: {},
60
+ es: {},
61
+ fr: {},
43
62
  item: { default: () => ({}) },
44
63
  error: { type: [String, Boolean], default: "" },
45
64
  label: { default: "" }
46
65
  },
47
66
  setup(o) {
48
- return (e, l) => (i(), u("div", yt, [
67
+ return (e, t) => (i(), u("div", yt, [
49
68
  e.item?.type !== "html" ? (i(), u("span", xt, [
50
- oe(E(e.ua || e.label) + " ", 1),
51
- e.item?.rules?.includes("required") && (e.ua || e.label) ? (i(), u("span", wt, "*")) : S("", !0)
52
- ])) : S("", !0),
53
- ve(e.$slots, "default", Ee(Fe(e.$attrs))),
54
- e.error ? (i(), u("span", kt, E(e.error), 1)) : S("", !0)
69
+ oe(F(e.ua || e.label) + " ", 1),
70
+ e.item?.rules?.includes("required") && (e.ua || e.label) ? (i(), u("span", wt, "*")) : B("", !0)
71
+ ])) : B("", !0),
72
+ me(e.$slots, "default", Oe(De(e.$attrs))),
73
+ e.error ? (i(), u("span", kt, F(e.error), 1)) : B("", !0)
55
74
  ]));
56
75
  }
57
76
  }), $t = { class: "w-full relative" }, Ct = {
@@ -61,32 +80,37 @@ const vt = { class: "w-full relative" }, mt = {
61
80
  __name: "vs-layout-inline",
62
81
  props: {
63
82
  ua: { default: "" },
83
+ uk: {},
84
+ en: {},
85
+ de: {},
86
+ es: {},
87
+ fr: {},
64
88
  item: { default: () => ({}) },
65
89
  error: { type: [String, Boolean], default: "" },
66
90
  label: { default: "" }
67
91
  },
68
92
  setup(o) {
69
- return (e, l) => (i(), u("div", $t, [
70
- ve(e.$slots, "default", Ee(Fe(e.$attrs))),
71
- e.error ? (i(), u("span", Ct, E(e.error), 1)) : S("", !0)
93
+ return (e, t) => (i(), u("div", $t, [
94
+ me(e.$slots, "default", Oe(De(e.$attrs))),
95
+ e.error ? (i(), u("span", Ct, F(e.error), 1)) : B("", !0)
72
96
  ]));
73
97
  }
74
- }), Mt = {
98
+ }), Lt = {
75
99
  default: bt,
76
100
  horizontal: _t,
77
101
  inline: Vt
78
102
  };
79
- function me(o) {
103
+ function he(o) {
80
104
  return {
81
105
  inputClass: D(() => {
82
- const l = `disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${o?.primaryColor || "blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;
83
- return o?.size === "sm" ? `${l}h-[32px]` : `${l}h-[38px]`;
106
+ const t = `disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${o?.primaryColor || "blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;
107
+ return o?.size === "sm" ? `${t}h-[32px]` : `${t}h-[38px]`;
84
108
  })
85
109
  };
86
110
  }
87
- const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ A({
111
+ const Mt = ["placeholder", "disabled"], Ge = /* @__PURE__ */ A({
88
112
  __name: "vs-input-text",
89
- props: /* @__PURE__ */ q({
113
+ props: /* @__PURE__ */ Z({
90
114
  style: { default: () => ({}) },
91
115
  customClass: { default: "" },
92
116
  disabled: { type: Boolean, default: !1 },
@@ -100,23 +124,23 @@ const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ A({
100
124
  }),
101
125
  emits: ["update:modelValue"],
102
126
  setup(o) {
103
- const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
104
- return (r, a) => K((i(), u("input", {
127
+ const e = o, { inputClass: t } = he(e.style), n = W(o, "modelValue");
128
+ return (s, a) => q((i(), u("input", {
105
129
  type: "text",
106
- "onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
107
- placeholder: r.placeholder,
108
- disabled: r.disabled,
109
- class: B(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(l), { "!border-red-600": r.error }]]),
130
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => n.value = r),
131
+ placeholder: s.placeholder,
132
+ disabled: s.disabled,
133
+ class: S(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(t), { "!border-red-600": s.error }]]),
110
134
  style: {
111
135
  border: "1px solid #CFD9E0"
112
136
  }
113
- }, null, 10, Lt)), [
114
- [ne, n.value]
137
+ }, null, 10, Mt)), [
138
+ [ie, n.value]
115
139
  ]);
116
140
  }
117
- }), Bt = ["placeholder"], St = /* @__PURE__ */ A({
141
+ }), St = ["placeholder"], Bt = /* @__PURE__ */ A({
118
142
  __name: "vs-input-number",
119
- props: /* @__PURE__ */ q({
143
+ props: /* @__PURE__ */ Z({
120
144
  style: { default: () => ({}) },
121
145
  customClass: {},
122
146
  disabled: { type: Boolean },
@@ -130,25 +154,25 @@ const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ A({
130
154
  }),
131
155
  emits: ["update:modelValue"],
132
156
  setup(o) {
133
- const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
134
- return (r, a) => K((i(), u("input", {
157
+ const e = o, { inputClass: t } = he(e.style), n = W(o, "modelValue");
158
+ return (s, a) => q((i(), u("input", {
135
159
  type: "number",
136
160
  step: "any",
137
- "onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
138
- placeholder: r.placeholder,
139
- class: B(["py-1.5 px-3 block w-full", [H(l)]]),
161
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => n.value = r),
162
+ placeholder: s.placeholder,
163
+ class: S(["py-1.5 px-3 block w-full", [H(t)]]),
140
164
  style: {
141
165
  border: "1px solid #CFD9E0"
142
166
  }
143
- }, null, 10, Bt)), [
144
- [ne, n.value]
167
+ }, null, 10, St)), [
168
+ [ie, n.value]
145
169
  ]);
146
170
  }
147
171
  }), R = (o, e) => {
148
- const l = o.__vccOpts || o;
149
- for (const [n, r] of e)
150
- l[n] = r;
151
- return l;
172
+ const t = o.__vccOpts || o;
173
+ for (const [n, s] of e)
174
+ t[n] = s;
175
+ return t;
152
176
  }, jt = {}, It = {
153
177
  xmlns: "http://www.w3.org/2000/svg",
154
178
  viewBox: "0 0 24 24",
@@ -159,17 +183,17 @@ const Lt = ["placeholder", "disabled"], He = /* @__PURE__ */ A({
159
183
  "stroke-linejoin": "round",
160
184
  class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
161
185
  };
162
- function At(o, e) {
186
+ function zt(o, e) {
163
187
  return i(), u("svg", It, e[0] || (e[0] = [
164
- t("path", {
188
+ l("path", {
165
189
  stroke: "none",
166
190
  d: "M0 0h24v24H0z",
167
191
  fill: "none"
168
192
  }, null, -1),
169
- t("path", { d: "M5 12l5 5l10 -10" }, null, -1)
193
+ l("path", { d: "M5 12l5 5l10 -10" }, null, -1)
170
194
  ]));
171
195
  }
172
- const zt = /* @__PURE__ */ R(jt, [["render", At]]), Ot = { class: "flex items-center gap-[4px]" }, Et = ["value", "id", "disabled"], Ft = ["for"], Dt = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, Ut = /* @__PURE__ */ A({
196
+ const At = /* @__PURE__ */ R(jt, [["render", zt]]), Et = { class: "flex items-center gap-[4px]" }, Ft = ["value", "id", "disabled"], Ot = ["for"], Dt = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, Ut = /* @__PURE__ */ A({
173
197
  __name: "vs-checkbox-default",
174
198
  props: {
175
199
  value: { default: "" },
@@ -182,39 +206,39 @@ const zt = /* @__PURE__ */ R(jt, [["render", At]]), Ot = { class: "flex items-ce
182
206
  },
183
207
  emits: ["update:modelValue"],
184
208
  setup(o, { emit: e }) {
185
- const l = e, n = o, r = D({
209
+ const t = e, n = o, s = D({
186
210
  get: () => n.modelValue,
187
- set: (a) => l("update:modelValue", a)
211
+ set: (a) => t("update:modelValue", a)
188
212
  });
189
- return (a, s) => (i(), u("div", Ot, [
190
- K(t("input", {
213
+ return (a, r) => (i(), u("div", Et, [
214
+ q(l("input", {
191
215
  type: "checkbox",
192
216
  value: a.value,
193
- "onUpdate:modelValue": s[0] || (s[0] = (d) => r.value = d),
194
- class: B(["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": a.disabled }]),
217
+ "onUpdate:modelValue": r[0] || (r[0] = (d) => s.value = d),
218
+ class: S(["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": a.disabled }]),
195
219
  id: a.id,
196
220
  disabled: a.disabled
197
- }, null, 10, Et), [
198
- [Qe, r.value]
221
+ }, null, 10, Ft), [
222
+ [Ye, s.value]
199
223
  ]),
200
- t("label", {
224
+ l("label", {
201
225
  for: a.id,
202
- class: B(["flex flex-1 checkbox-label items-center gap-x-2 cursor-pointer text-sm text-gray-800 dark:text-neutral-300", { "!cursor-not-allowed": a.disabled }])
226
+ class: S(["flex flex-1 checkbox-label items-center gap-x-2 cursor-pointer text-sm text-gray-800 dark:text-neutral-300", { "!cursor-not-allowed": a.disabled }])
203
227
  }, [
204
- t("div", {
205
- class: B(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [r.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", a.error ? "border-red-600" : ""]])
228
+ l("div", {
229
+ class: S(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [s.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", a.error ? "border-red-600" : ""]])
206
230
  }, [
207
- j(zt, {
231
+ j(At, {
208
232
  height: "12",
209
233
  width: "12"
210
234
  })
211
235
  ], 2),
212
- t("span", Dt, [
213
- ve(a.$slots, "default", {}, () => [
214
- oe(E(a.label), 1)
236
+ l("span", Dt, [
237
+ me(a.$slots, "default", {}, () => [
238
+ oe(F(a.label), 1)
215
239
  ])
216
240
  ])
217
- ], 10, Ft)
241
+ ], 10, Ot)
218
242
  ]));
219
243
  }
220
244
  }), Tt = ["name", "value", "disabled"], Rt = { class: "flex items-center gap-[6px] text-[14px]" }, Pt = {
@@ -234,46 +258,46 @@ const zt = /* @__PURE__ */ R(jt, [["render", At]]), Ot = { class: "flex items-ce
234
258
  },
235
259
  emits: ["update:modelValue"],
236
260
  setup(o, { emit: e }) {
237
- const l = o, n = e, r = D({
238
- get: () => l.modelValue,
261
+ const t = o, n = e, s = D({
262
+ get: () => t.modelValue,
239
263
  set: (d) => {
240
264
  n("update:modelValue", d);
241
265
  }
242
- }), a = D(() => Array.isArray(r.value) ? r.value.includes(l.value) : r.value === !0 || r.value === l.value), s = D(() => l.style?.size === "xs" ? "p-1.5 text-xs" : l.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
266
+ }), a = D(() => Array.isArray(s.value) ? s.value.includes(t.value) : s.value === !0 || s.value === t.value), r = D(() => t.style?.size === "xs" ? "p-1.5 text-xs" : t.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
243
267
  return (d, p) => (i(), u("label", {
244
- class: B(["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", [s.value, a.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
268
+ class: S(["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, a.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
245
269
  }, [
246
- K(t("input", {
270
+ q(l("input", {
247
271
  type: "checkbox",
248
272
  class: "hidden",
249
273
  name: d.id,
250
274
  value: d.value,
251
- "onUpdate:modelValue": p[0] || (p[0] = (f) => r.value = f),
275
+ "onUpdate:modelValue": p[0] || (p[0] = (f) => s.value = f),
252
276
  disabled: d.disabled
253
277
  }, null, 8, Tt), [
254
- [Qe, r.value]
278
+ [Ye, s.value]
255
279
  ]),
256
- t("span", Rt, [
280
+ l("span", Rt, [
257
281
  d.icon || d.imgUrl ? (i(), u("span", Pt, [
258
282
  d.icon ? (i(), u("i", {
259
283
  key: 0,
260
- class: B(d.icon)
261
- }, null, 2)) : S("", !0),
284
+ class: S(d.icon)
285
+ }, null, 2)) : B("", !0),
262
286
  d.imgUrl ? (i(), u("img", {
263
287
  key: 1,
264
288
  src: d.imgUrl,
265
289
  width: "16",
266
290
  height: "16",
267
291
  alt: "icon"
268
- }, null, 8, Nt)) : S("", !0)
269
- ])) : S("", !0),
270
- ve(d.$slots, "default", {}, () => [
271
- oe(E(d.label), 1)
292
+ }, null, 8, Nt)) : B("", !0)
293
+ ])) : B("", !0),
294
+ me(d.$slots, "default", {}, () => [
295
+ oe(F(d.label), 1)
272
296
  ])
273
297
  ])
274
298
  ], 2));
275
299
  }
276
- }), qt = { class: "flex items-center" }, tt = /* @__PURE__ */ A({
300
+ }), qt = { class: "flex items-center" }, lt = /* @__PURE__ */ A({
277
301
  __name: "vs-input-checkbox-item",
278
302
  props: {
279
303
  value: { default: "" },
@@ -290,32 +314,32 @@ const zt = /* @__PURE__ */ R(jt, [["render", At]]), Ot = { class: "flex items-ce
290
314
  },
291
315
  emits: ["update:modelValue"],
292
316
  setup(o, { emit: e }) {
293
- const l = o, n = e, r = `radio-${Math.floor(Math.random() * 1e4)}`, a = D({
294
- get: () => Array.isArray(l.modelValue) ? Array.isArray(l.modelValue) && l.modelValue.includes(l.value) : l.modelValue,
317
+ const t = o, n = e, s = `radio-${Math.floor(Math.random() * 1e4)}`, a = D({
318
+ get: () => Array.isArray(t.modelValue) ? Array.isArray(t.modelValue) && t.modelValue.includes(t.value) : t.modelValue,
295
319
  set: (d) => {
296
- if (Array.isArray(l.modelValue)) {
297
- let p = [...l.modelValue];
298
- d ? p.includes(l.value) || p.push(l.value) : p = p.filter((f) => f !== l.value), n("update:modelValue", p);
320
+ if (Array.isArray(t.modelValue)) {
321
+ let p = [...t.modelValue];
322
+ d ? p.includes(t.value) || p.push(t.value) : p = p.filter((f) => f !== t.value), n("update:modelValue", p);
299
323
  } else
300
324
  n("update:modelValue", d);
301
325
  }
302
- }), s = $(`vs-checkbox-${l.view || "default"}`);
326
+ }), r = k(`vs-checkbox-${t.view || "default"}`);
303
327
  return (d, p) => (i(), u("div", qt, [
304
- (i(), X(xe(s.value === "vs-checkbox-buttons" ? H(Ht) : H(Ut)), {
328
+ (i(), X(we(r.value === "vs-checkbox-buttons" ? H(Ht) : H(Ut)), {
305
329
  value: d.value,
306
330
  label: d.label,
307
331
  info: d.option?.info,
308
332
  disabled: d.disabled,
309
333
  modelValue: a.value,
310
334
  "onUpdate:modelValue": p[0] || (p[0] = (f) => a.value = f),
311
- id: r,
335
+ id: s,
312
336
  icon: d.icon,
313
337
  imgUrl: d.imgUrl,
314
- style: fe(d.style),
338
+ style: ve(d.style),
315
339
  error: d.error
316
340
  }, {
317
341
  default: Me(() => [
318
- oe(E(d.label), 1)
342
+ oe(F(d.label), 1)
319
343
  ]),
320
344
  _: 1
321
345
  }, 8, ["value", "label", "info", "disabled", "modelValue", "icon", "imgUrl", "style", "error"]))
@@ -333,12 +357,12 @@ const zt = /* @__PURE__ */ R(jt, [["render", At]]), Ot = { class: "flex items-ce
333
357
  };
334
358
  function Kt(o, e) {
335
359
  return i(), u("svg", Jt, e[0] || (e[0] = [
336
- t("path", {
360
+ l("path", {
337
361
  stroke: "none",
338
362
  d: "M0 0h24v24H0z",
339
363
  fill: "none"
340
364
  }, null, -1),
341
- t("path", { d: "M6 9l6 6l6 -6" }, null, -1)
365
+ l("path", { d: "M6 9l6 6l6 -6" }, null, -1)
342
366
  ]));
343
367
  }
344
368
  const Zt = /* @__PURE__ */ R(Gt, [["render", Kt]]), Wt = {}, Qt = {
@@ -354,14 +378,14 @@ const Zt = /* @__PURE__ */ R(Gt, [["render", Kt]]), Wt = {}, Qt = {
354
378
  };
355
379
  function Xt(o, e) {
356
380
  return i(), u("svg", Qt, e[0] || (e[0] = [
357
- t("path", {
381
+ l("path", {
358
382
  stroke: "none",
359
383
  d: "M0 0h24v24H0z",
360
384
  fill: "none"
361
385
  }, null, -1),
362
- t("path", { d: "M12 9h.01" }, null, -1),
363
- t("path", { d: "M11 12h1v4h1" }, null, -1),
364
- t("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)
386
+ l("path", { d: "M12 9h.01" }, null, -1),
387
+ l("path", { d: "M11 12h1v4h1" }, null, -1),
388
+ 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)
365
389
  ]));
366
390
  }
367
391
  const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
@@ -370,9 +394,9 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
370
394
  }, tl = {
371
395
  key: 0,
372
396
  class: "text-red-500 text-[14px]"
373
- }, ll = ["title"], ol = ["disabled"], lt = /* @__PURE__ */ A({
397
+ }, ll = ["title"], ol = ["disabled"], ot = /* @__PURE__ */ A({
374
398
  __name: "vs-input-switcher",
375
- props: /* @__PURE__ */ q({
399
+ props: /* @__PURE__ */ Z({
376
400
  rules: { default: () => [] },
377
401
  view: { default: "checkbox" },
378
402
  label: { default: "" },
@@ -391,38 +415,38 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
391
415
  }),
392
416
  emits: ["update:modelValue"],
393
417
  setup(o) {
394
- const e = o, l = G(o, "modelValue");
395
- return (n, r) => e.view === "checkbox" ? (i(), u("div", el, [
396
- j(tt, {
397
- modelValue: l.value,
398
- "onUpdate:modelValue": r[0] || (r[0] = (a) => l.value = a),
418
+ const e = o, t = W(o, "modelValue");
419
+ return (n, s) => e.view === "checkbox" ? (i(), u("div", el, [
420
+ j(lt, {
421
+ modelValue: t.value,
422
+ "onUpdate:modelValue": s[0] || (s[0] = (a) => t.value = a),
399
423
  label: n.text,
400
424
  error: n.error || ""
401
425
  }, null, 8, ["modelValue", "label", "error"]),
402
- n.rules?.includes("required") ? (i(), u("span", tl, "*")) : S("", !0),
426
+ n.rules?.includes("required") ? (i(), u("span", tl, "*")) : B("", !0),
403
427
  n.i ? (i(), u("button", {
404
428
  key: 1,
405
429
  class: "cursor-pointer",
406
430
  title: n.i,
407
- onClick: r[1] || (r[1] = re(() => {
431
+ onClick: s[1] || (s[1] = se(() => {
408
432
  }, ["prevent"]))
409
433
  }, [
410
434
  j(H(Yt), { class: "text-gray-500 w-[14px] h-[14px]" })
411
- ], 8, ll)) : S("", !0)
435
+ ], 8, ll)) : B("", !0)
412
436
  ])) : (i(), u("button", {
413
437
  key: 1,
414
438
  type: "button",
415
- class: B(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50", [l.value ? `bg-${n.style?.primaryColor || "blue"}-500` : "bg-stone-200", n.customClass]]),
439
+ class: S(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50", [t.value ? `bg-${n.style?.primaryColor || "blue"}-500` : "bg-stone-200", n.customClass]]),
416
440
  disabled: n.disabled,
417
- onClick: r[2] || (r[2] = (a) => l.value = !l.value)
441
+ onClick: s[2] || (s[2] = (a) => t.value = !t.value)
418
442
  }, [
419
- t("span", {
443
+ l("span", {
420
444
  "data-state": "checked",
421
- class: B(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform", [l.value ? "translate-x-4" : "translate-x-0"]])
445
+ class: S(["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"]])
422
446
  }, null, 2)
423
447
  ], 10, ol));
424
448
  }
425
- }), al = ["innerHTML"], qe = /* @__PURE__ */ A({
449
+ }), al = ["innerHTML"], Je = /* @__PURE__ */ A({
426
450
  __name: "vs-input-static",
427
451
  props: {
428
452
  text: { default: "" },
@@ -436,14 +460,14 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
436
460
  placeholder: {}
437
461
  },
438
462
  setup(o) {
439
- return (e, l) => (i(), u("div", {
440
- class: B(e.customClass),
463
+ return (e, t) => (i(), u("div", {
464
+ class: S(e.customClass),
441
465
  innerHTML: e.html ? e.html : e.text
442
466
  }, null, 10, al));
443
467
  }
444
- }), rl = ["placeholder", "disabled", "name"], sl = /* @__PURE__ */ A({
468
+ }), sl = ["placeholder", "disabled", "name"], rl = /* @__PURE__ */ A({
445
469
  __name: "vs-input-mask",
446
- props: /* @__PURE__ */ q({
470
+ props: /* @__PURE__ */ Z({
447
471
  name: {},
448
472
  mask: { default: "" },
449
473
  unmask: { type: Boolean, default: !1 },
@@ -459,55 +483,54 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
459
483
  }),
460
484
  emits: ["update:modelValue"],
461
485
  setup(o) {
462
- const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue"), r = $(null);
486
+ const e = o, { inputClass: t } = he(e.style), n = W(o, "modelValue"), s = k(null);
463
487
  let a = null;
464
- return ue(async () => {
465
- if (r.value) {
466
- const { default: s } = await import("./index-W-qQIppj.js");
467
- a = s(r.value, {
488
+ return ne(async () => {
489
+ if (s.value) {
490
+ const { default: r } = await import("./index-W-qQIppj.js");
491
+ a = r(s.value, {
468
492
  mask: e.mask || "",
469
493
  definitions: {
470
494
  9: /[0-9]/,
471
495
  A: /[a-zA-Z]/,
472
496
  "*": /[a-zA-Z0-9]/
473
497
  },
474
- lazy: !1,
475
- placeholderChar: e.placeholder
498
+ lazy: !1
476
499
  }), a.on("accept", () => {
477
500
  n.value = e.unmask ? a.unmaskedValue : a.value;
478
501
  }), a.on("complete", () => {
479
502
  n.value = e.unmask ? a.unmaskedValue : a.value;
480
503
  }), a.value = n.value ?? "";
481
504
  }
482
- }), ut(() => {
505
+ }), dt(() => {
483
506
  a?.destroy();
484
- }), se(() => e.mask, (s) => {
507
+ }), re(() => e.mask, (r) => {
485
508
  a && a.updateOptions({
486
- mask: s,
509
+ mask: r,
487
510
  definitions: {
488
511
  9: /[0-9]/,
489
512
  A: /[a-zA-Z]/,
490
513
  "*": /[a-zA-Z0-9]/
491
514
  }
492
515
  });
493
- }), se(n, (s) => {
494
- a && a.unmaskedValue !== s && (a.value = s || "");
495
- }), (s, d) => (i(), u("input", {
516
+ }), re(n, (r) => {
517
+ a && a.unmaskedValue !== r && (a.value = r || "");
518
+ }), (r, d) => (i(), u("input", {
496
519
  type: "text",
497
520
  ref_key: "inputEl",
498
- ref: r,
499
- placeholder: s.placeholder,
500
- disabled: s.disabled,
501
- name: s.name,
502
- class: B(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(l)]]),
521
+ ref: s,
522
+ placeholder: r.placeholder,
523
+ disabled: r.disabled,
524
+ name: r.name,
525
+ class: S(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(t)]]),
503
526
  style: {
504
527
  border: "1px solid #CFD9E0"
505
528
  }
506
- }, null, 10, rl));
529
+ }, null, 10, sl));
507
530
  }
508
531
  }), nl = { class: "relative w-full bg-white rounded-lg" }, il = ["placeholder", "disabled"], ul = /* @__PURE__ */ A({
509
532
  __name: "vs-input-email",
510
- props: /* @__PURE__ */ q({
533
+ props: /* @__PURE__ */ Z({
511
534
  style: { default: () => ({}) },
512
535
  customClass: { default: "" },
513
536
  disabled: { type: Boolean, default: !1 },
@@ -521,26 +544,26 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
521
544
  }),
522
545
  emits: ["update:modelValue"],
523
546
  setup(o) {
524
- const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
525
- return (r, a) => (i(), u("div", nl, [
547
+ const e = o, { inputClass: t } = he(e.style), n = W(o, "modelValue");
548
+ return (s, a) => (i(), u("div", nl, [
526
549
  a[1] || (a[1] = ae('<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)),
527
- K(t("input", {
550
+ q(l("input", {
528
551
  type: "email",
529
- "onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
530
- placeholder: r.placeholder,
531
- disabled: r.disabled,
532
- class: B(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(l), { "!border-red-600": r.error }]]),
552
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => n.value = r),
553
+ placeholder: s.placeholder,
554
+ disabled: s.disabled,
555
+ class: S(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(t), { "!border-red-600": s.error }]]),
533
556
  style: {
534
557
  border: "1px solid #CFD9E0"
535
558
  }
536
559
  }, null, 10, il), [
537
- [ne, n.value]
560
+ [ie, n.value]
538
561
  ])
539
562
  ]));
540
563
  }
541
564
  }), dl = ["value", "disabled"], cl = { class: "text-[13px] text-gray-700" }, pl = /* @__PURE__ */ A({
542
565
  __name: "vs-input-radio-default",
543
- props: /* @__PURE__ */ q({
566
+ props: /* @__PURE__ */ Z({
544
567
  style: {},
545
568
  customClass: { default: "" },
546
569
  disabled: { type: Boolean, default: !1 },
@@ -556,36 +579,36 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
556
579
  }),
557
580
  emits: ["update:modelValue"],
558
581
  setup(o) {
559
- const e = G(o, "modelValue");
560
- return (l, n) => (i(), u("label", {
561
- class: B(["flex items-center gap-0", [l.customClass]])
582
+ const e = W(o, "modelValue");
583
+ return (t, n) => (i(), u("label", {
584
+ class: S(["flex items-center gap-0", [t.customClass]])
562
585
  }, [
563
- K(t("input", {
564
- "onUpdate:modelValue": n[0] || (n[0] = (r) => e.value = r),
586
+ q(l("input", {
587
+ "onUpdate:modelValue": n[0] || (n[0] = (s) => e.value = s),
565
588
  type: "radio",
566
- value: l.value,
567
- disabled: l.disabled,
589
+ value: t.value,
590
+ disabled: t.disabled,
568
591
  class: "hidden"
569
592
  }, null, 8, dl), [
570
- [Xe, e.value]
593
+ [et, e.value]
571
594
  ]),
572
- t("span", {
573
- class: B(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]", [
574
- `border-${l.style?.primaryColor || "blue"}-500`,
575
- l.disabled ? "opacity-50 cursor-not-allowed" : ""
595
+ l("span", {
596
+ class: S(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]", [
597
+ `border-${t.style?.primaryColor || "blue"}-500`,
598
+ t.disabled ? "opacity-50 cursor-not-allowed" : ""
576
599
  ]])
577
600
  }, [
578
- e.value == l.value ? (i(), u("span", {
601
+ e.value == t.value ? (i(), u("span", {
579
602
  key: 0,
580
- class: B(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${l.style?.primaryColor || "blue"}-500`]])
581
- }, null, 2)) : S("", !0)
603
+ class: S(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${t.style?.primaryColor || "blue"}-500`]])
604
+ }, null, 2)) : B("", !0)
582
605
  ], 2),
583
- t("span", cl, E(l.text), 1)
606
+ l("span", cl, F(t.text), 1)
584
607
  ], 2));
585
608
  }
586
609
  }), fl = ["value", "disabled"], vl = { class: "text-[13px] text-gray-700" }, ml = /* @__PURE__ */ A({
587
610
  __name: "vs-input-radio-buttons",
588
- props: /* @__PURE__ */ q({
611
+ props: /* @__PURE__ */ Z({
589
612
  style: {},
590
613
  customClass: { default: "" },
591
614
  disabled: { type: Boolean, default: !1 },
@@ -601,31 +624,31 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
601
624
  }),
602
625
  emits: ["update:modelValue"],
603
626
  setup(o) {
604
- const e = G(o, "modelValue");
605
- return (l, n) => (i(), u("label", {
606
- class: B(["flex items-center border rounded-lg px-2 py-1", [
607
- e.value == l.value ? `ring-2 ring-ring ring-${l.style?.primaryColor || "blue"}-500` : "",
608
- l.customClass
627
+ const e = W(o, "modelValue");
628
+ return (t, n) => (i(), u("label", {
629
+ class: S(["flex items-center border rounded-lg px-2 py-1", [
630
+ e.value == t.value ? `ring-2 ring-ring ring-${t.style?.primaryColor || "blue"}-500` : "",
631
+ t.customClass
609
632
  ]])
610
633
  }, [
611
- K(t("input", {
612
- "onUpdate:modelValue": n[0] || (n[0] = (r) => e.value = r),
634
+ q(l("input", {
635
+ "onUpdate:modelValue": n[0] || (n[0] = (s) => e.value = s),
613
636
  type: "radio",
614
- value: l.value,
615
- disabled: l.disabled,
637
+ value: t.value,
638
+ disabled: t.disabled,
616
639
  class: "hidden"
617
640
  }, null, 8, fl), [
618
- [Xe, e.value]
641
+ [et, e.value]
619
642
  ]),
620
- t("span", vl, E(l.text), 1)
643
+ l("span", vl, F(t.text), 1)
621
644
  ], 2));
622
645
  }
623
646
  }), hl = {
624
647
  "vs-input-radio-default": pl,
625
648
  "vs-input-radio-buttons": ml
626
- }, Ge = /* @__PURE__ */ A({
649
+ }, Ke = /* @__PURE__ */ A({
627
650
  __name: "vs-input-radio",
628
- props: /* @__PURE__ */ q({
651
+ props: /* @__PURE__ */ Z({
629
652
  options: {},
630
653
  position: { default: "vertical" },
631
654
  view: { default: "default" },
@@ -642,18 +665,18 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
642
665
  }),
643
666
  emits: ["update:modelValue"],
644
667
  setup(o) {
645
- const e = o, l = G(o, "modelValue"), n = D(() => hl[`vs-input-radio-${e.view}`]);
646
- return (r, a) => (i(), u("div", {
647
- class: B([r.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
668
+ const e = o, t = W(o, "modelValue"), n = D(() => hl[`vs-input-radio-${e.view}`]);
669
+ return (s, a) => (i(), u("div", {
670
+ class: S([s.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
648
671
  }, [
649
- (i(!0), u(Q, null, Y(r.options, (s) => (i(), X(xe(n.value), Ce({
650
- key: s?.id,
651
- text: s.text,
652
- value: s.id.toString(),
653
- checked: l.value === s.id,
654
- modelValue: l.value,
655
- "onUpdate:modelValue": a[0] || (a[0] = (d) => l.value = d)
656
- }, { ref_for: !0 }, r.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
672
+ (i(!0), u(K, null, Y(s.options, (r) => (i(), X(we(n.value), Ve({
673
+ key: r?.id,
674
+ text: r.text,
675
+ value: r.id.toString(),
676
+ checked: t.value === r.id,
677
+ modelValue: t.value,
678
+ "onUpdate:modelValue": a[0] || (a[0] = (d) => t.value = d)
679
+ }, { ref_for: !0 }, s.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
657
680
  ], 2));
658
681
  }
659
682
  }), gl = /* @__PURE__ */ A({
@@ -675,81 +698,81 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
675
698
  },
676
699
  emits: ["update:modelValue"],
677
700
  setup(o, { emit: e }) {
678
- const l = o, n = e, r = $([]), a = dt({}), s = (c) => c?.value || c?.id || c?.text || c, d = (c) => c.text || String(c), p = (c) => `lg:col-span-${c || 12}`, f = async () => {
701
+ const t = o, n = e, s = k([]), a = ct({}), r = (c) => c?.value || c?.id || c?.text || c, d = (c) => c.text || String(c), p = (c) => `lg:col-span-${c || 12}`, f = async () => {
679
702
  try {
680
- const c = await fetch(`/api/suggest/${l.data}`).then((g) => g.json());
681
- r.value = c?.data || c;
703
+ const c = await fetch(`/api/suggest/${t.data}`).then((g) => g.json());
704
+ s.value = c?.data || c;
682
705
  } catch (c) {
683
706
  console.error(c);
684
707
  }
685
708
  };
686
- return se(
687
- () => l.modelValue,
709
+ return re(
710
+ () => t.modelValue,
688
711
  (c) => {
689
- if (typeof c == "boolean" && r.value.length === 1) {
690
- const g = s(r.value[0]);
712
+ if (typeof c == "boolean" && s.value.length === 1) {
713
+ const g = r(s.value[0]);
691
714
  a[g] = c;
692
715
  } else if (Array.isArray(c)) {
693
716
  const g = new Set(c);
694
- r.value.forEach((v) => {
717
+ s.value.forEach((v) => {
695
718
  if (!v.disabled) {
696
- const M = s(v);
719
+ const M = r(v);
697
720
  a[M] = g.has(M);
698
721
  }
699
722
  });
700
723
  }
701
724
  },
702
725
  { immediate: !0 }
703
- ), se(
726
+ ), re(
704
727
  a,
705
728
  () => {
706
- if (!r.value.length) {
729
+ if (!s.value.length) {
707
730
  n("update:modelValue", null);
708
731
  return;
709
732
  }
710
733
  const c = Object.entries(a).filter(([, g]) => g).map(([g]) => g);
711
- n("update:modelValue", c.length === 0 ? null : c);
734
+ n("update:modelValue", c.length === 0 ? [] : c);
712
735
  },
713
736
  { deep: !0 }
714
- ), ue(() => {
715
- if (l.data)
737
+ ), ne(() => {
738
+ if (t.data)
716
739
  f().then(() => {
717
- if (typeof l.modelValue == "boolean" && r.value.length === 1) {
718
- const c = s(r.value[0]);
719
- a[c] = l.modelValue;
720
- } else if (Array.isArray(l.modelValue)) {
721
- const c = new Set(l.modelValue);
722
- r.value.forEach((g) => {
740
+ if (typeof t.modelValue == "boolean" && s.value.length === 1) {
741
+ const c = r(s.value[0]);
742
+ a[c] = t.modelValue;
743
+ } else if (Array.isArray(t.modelValue)) {
744
+ const c = new Set(t.modelValue);
745
+ s.value.forEach((g) => {
723
746
  if (!g.disabled) {
724
- const v = s(g);
747
+ const v = r(g);
725
748
  a[v] = c.has(v);
726
749
  }
727
750
  });
728
751
  }
729
752
  });
730
- else if (r.value = l.options, typeof l.modelValue == "boolean" && r.value.length === 1) {
731
- const c = s(r.value[0]);
732
- a[c] = l.modelValue;
733
- } else if (Array.isArray(l.modelValue)) {
734
- const c = new Set(l.modelValue);
735
- r.value.forEach((g) => {
753
+ else if (s.value = t.options, typeof t.modelValue == "boolean" && s.value.length === 1) {
754
+ const c = r(s.value[0]);
755
+ a[c] = t.modelValue;
756
+ } else if (Array.isArray(t.modelValue)) {
757
+ const c = new Set(t.modelValue);
758
+ s.value.forEach((g) => {
736
759
  if (!g.disabled) {
737
- const v = s(g);
760
+ const v = r(g);
738
761
  a[v] = c.has(v);
739
762
  }
740
763
  });
741
764
  }
742
765
  }), (c, g) => (i(), u("div", {
743
- class: B(["p-0 w-full gap-[6px]", [c.position === "vertical" ? "flex-col" : "", c.colSpan ? "grid" : "flex justify-start"]])
766
+ class: S(["p-0 w-full gap-[6px]", [c.position === "vertical" ? "flex-col" : "", c.colSpan ? "grid" : "flex justify-start"]])
744
767
  }, [
745
- (i(!0), u(Q, null, Y(r.value, (v) => (i(), X(tt, {
746
- modelValue: a[s(v)],
747
- "onUpdate:modelValue": (M) => a[s(v)] = M,
748
- value: s(v),
749
- class: B(p(c.colSpan)),
768
+ (i(!0), u(K, null, Y(s.value, (v) => (i(), X(lt, {
769
+ modelValue: a[r(v)],
770
+ "onUpdate:modelValue": (M) => a[r(v)] = M,
771
+ value: r(v),
772
+ class: S(p(c.colSpan)),
750
773
  disabled: v.disabled,
751
774
  label: d(v),
752
- key: s(v),
775
+ key: r(v),
753
776
  icon: v?.icon,
754
777
  imgUrl: v?.imgUrl,
755
778
  option: v,
@@ -757,9 +780,9 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
757
780
  }, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "icon", "imgUrl", "option", "view"]))), 128))
758
781
  ], 2));
759
782
  }
760
- }), bl = /* @__PURE__ */ R(gl, [["__scopeId", "data-v-54f9e19c"]]), yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ A({
783
+ }), bl = /* @__PURE__ */ R(gl, [["__scopeId", "data-v-91f3584a"]]), yl = ["placeholder", "disabled"], xl = /* @__PURE__ */ A({
761
784
  __name: "vs-input-date1",
762
- props: /* @__PURE__ */ q({
785
+ props: {
763
786
  style: { default: () => ({}) },
764
787
  customClass: { default: "" },
765
788
  disabled: { type: Boolean, default: !1 },
@@ -767,43 +790,44 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
767
790
  error: {},
768
791
  name: {},
769
792
  placeholder: { default: "" }
770
- }, {
771
- modelValue: { default: "" },
772
- modelModifiers: {}
773
- }),
793
+ },
774
794
  emits: ["update:modelValue"],
775
- setup(o) {
776
- const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
777
- return (r, a) => K((i(), u("input", {
795
+ setup(o, { emit: e }) {
796
+ const t = o, { inputClass: n } = he(t.style), s = e, a = D({
797
+ get: () => t.modelValue?.split(" ")[0],
798
+ set: (r) => s("update:modelValue", r)
799
+ });
800
+ return (r, d) => q((i(), u("input", {
778
801
  type: "date",
779
- "onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
802
+ "onUpdate:modelValue": d[0] || (d[0] = (p) => a.value = p),
780
803
  placeholder: r.placeholder,
781
804
  disabled: r.disabled,
782
- class: B(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [H(l)]]),
805
+ ref: "date",
806
+ class: S(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [r.modelValue ? "" : "text-opacity-50", H(n)].join(" ")]),
783
807
  style: {
784
808
  border: "1px solid #CFD9E0"
785
809
  }
786
810
  }, null, 10, yl)), [
787
- [ne, n.value]
811
+ [ie, a.value]
788
812
  ]);
789
813
  }
790
- }), wl = async (o, e, l, n) => {
814
+ }), wl = async (o, e, t, n) => {
791
815
  try {
792
- const r = new FormData();
793
- return r.append("unique", "true"), r.append("file", o), (await fetch(
794
- `/file/upload/uploads?id=${e || ""}&form=${l || ""}&table=${n || ""}`,
816
+ const s = new FormData();
817
+ return s.append("unique", "true"), s.append("file", o), (await fetch(
818
+ `/file/upload/uploads?id=${e || ""}&form=${t || ""}&table=${n || ""}`,
795
819
  {
796
820
  method: "POST",
797
- body: r
821
+ body: s
798
822
  }
799
- ).then((s) => s.json()))?.result;
800
- } catch (r) {
801
- return pe({
823
+ ).then((r) => r.json()))?.result;
824
+ } catch (s) {
825
+ return fe({
802
826
  type: "error",
803
827
  title: "Помилка!",
804
828
  message: "Сталась помилка під час завантаження файлу",
805
829
  position: "right-bottom"
806
- }), console.error("Сталась помилка завантаження файлу", r), null;
830
+ }), console.error("Сталась помилка завантаження файлу", s), null;
807
831
  }
808
832
  }, kl = async (o) => {
809
833
  try {
@@ -811,10 +835,10 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
811
835
  } catch (e) {
812
836
  return console.error(e), !1;
813
837
  }
814
- }, Je = async (o) => {
838
+ }, Ze = async (o) => {
815
839
  try {
816
- const e = await fetch(`file/download/files/uploads${o}`), l = await e.arrayBuffer(), n = e.headers["content-type"], r = new TextDecoder("utf-8").decode(l), a = new Blob([r], { type: n }), s = document.createElement("a");
817
- s.setAttribute("download", o), s.href = window.URL.createObjectURL(a), s.click();
840
+ const e = await fetch(`file/download/files/uploads${o}`), t = await e.arrayBuffer(), n = e.headers["content-type"], s = new TextDecoder("utf-8").decode(t), a = new Blob([s], { type: n }), r = document.createElement("a");
841
+ r.setAttribute("download", o), r.href = window.URL.createObjectURL(a), r.click();
818
842
  } catch (e) {
819
843
  console.error(e.message);
820
844
  }
@@ -831,11 +855,11 @@ const Yt = /* @__PURE__ */ R(Wt, [["render", Xt]]), el = {
831
855
  };
832
856
  function Cl(o, e) {
833
857
  return i(), u("svg", $l, e[0] || (e[0] = [
834
- t("path", { d: "M5 12h14" }, null, -1),
835
- t("path", { d: "M12 5v14" }, null, -1)
858
+ l("path", { d: "M5 12h14" }, null, -1),
859
+ l("path", { d: "M12 5v14" }, null, -1)
836
860
  ]));
837
861
  }
838
- const je = /* @__PURE__ */ R(_l, [["render", Cl]]), Vl = {}, Ml = {
862
+ const je = /* @__PURE__ */ R(_l, [["render", Cl]]), Vl = {}, Ll = {
839
863
  xmlns: "http://www.w3.org/2000/svg",
840
864
  class: "icon icon-tabler icon-tabler-file-text",
841
865
  width: "44",
@@ -847,12 +871,12 @@ const je = /* @__PURE__ */ R(_l, [["render", Cl]]), Vl = {}, Ml = {
847
871
  "stroke-linecap": "round",
848
872
  "stroke-linejoin": "round"
849
873
  };
850
- function Ll(o, e, l, n, r, a) {
851
- return i(), u("svg", Ml, e[0] || (e[0] = [
874
+ function Ml(o, e, t, n, s, a) {
875
+ return i(), u("svg", Ll, e[0] || (e[0] = [
852
876
  ae('<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)
853
877
  ]));
854
878
  }
855
- const Bl = /* @__PURE__ */ R(Vl, [["render", Ll]]), Sl = {}, jl = {
879
+ const Sl = /* @__PURE__ */ R(Vl, [["render", Ml]]), Bl = {}, jl = {
856
880
  xmlns: "http://www.w3.org/2000/svg",
857
881
  class: "icon icon-tabler icon-tabler-table",
858
882
  width: "44",
@@ -864,27 +888,27 @@ const Bl = /* @__PURE__ */ R(Vl, [["render", Ll]]), Sl = {}, jl = {
864
888
  "stroke-linecap": "round",
865
889
  "stroke-linejoin": "round"
866
890
  };
867
- function Il(o, e, l, n, r, a) {
891
+ function Il(o, e, t, n, s, a) {
868
892
  return i(), u("svg", jl, e[0] || (e[0] = [
869
- t("path", {
893
+ l("path", {
870
894
  stroke: "none",
871
895
  d: "M0 0h24v24H0z",
872
896
  fill: "none"
873
897
  }, null, -1),
874
- t("rect", {
898
+ l("rect", {
875
899
  x: "4",
876
900
  y: "4",
877
901
  width: "16",
878
902
  height: "16",
879
903
  rx: "2"
880
904
  }, null, -1),
881
- t("line", {
905
+ l("line", {
882
906
  x1: "4",
883
907
  y1: "10",
884
908
  x2: "20",
885
909
  y2: "10"
886
910
  }, null, -1),
887
- t("line", {
911
+ l("line", {
888
912
  x1: "10",
889
913
  y1: "4",
890
914
  x2: "10",
@@ -892,7 +916,7 @@ function Il(o, e, l, n, r, a) {
892
916
  }, null, -1)
893
917
  ]));
894
918
  }
895
- const Al = /* @__PURE__ */ R(Sl, [["render", Il]]), zl = {}, Ol = {
919
+ const zl = /* @__PURE__ */ R(Bl, [["render", Il]]), Al = {}, El = {
896
920
  xmlns: "http://www.w3.org/2000/svg",
897
921
  width: "24",
898
922
  height: "24",
@@ -904,12 +928,12 @@ const Al = /* @__PURE__ */ R(Sl, [["render", Il]]), zl = {}, Ol = {
904
928
  "stroke-linejoin": "round",
905
929
  class: "icon icon-tabler icons-tabler-outline icon-tabler-file-unknown"
906
930
  };
907
- function El(o, e, l, n, r, a) {
908
- return i(), u("svg", Ol, e[0] || (e[0] = [
931
+ function Fl(o, e, t, n, s, a) {
932
+ return i(), u("svg", El, e[0] || (e[0] = [
909
933
  ae('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M12 17v.01"></path><path d="M12 14a1.5 1.5 0 1 0 -1.14 -2.474"></path>', 5)
910
934
  ]));
911
935
  }
912
- const Fl = /* @__PURE__ */ R(zl, [["render", El]]), Dl = {}, Ul = {
936
+ const Ol = /* @__PURE__ */ R(Al, [["render", Fl]]), Dl = {}, Ul = {
913
937
  xmlns: "http://www.w3.org/2000/svg",
914
938
  class: "icon icon-tabler icon-tabler-file-zip",
915
939
  width: "44",
@@ -921,7 +945,7 @@ const Fl = /* @__PURE__ */ R(zl, [["render", El]]), Dl = {}, Ul = {
921
945
  "stroke-linecap": "round",
922
946
  "stroke-linejoin": "round"
923
947
  };
924
- function Tl(o, e, l, n, r, a) {
948
+ function Tl(o, e, t, n, s, a) {
925
949
  return i(), u("svg", Ul, e[0] || (e[0] = [
926
950
  ae('<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)
927
951
  ]));
@@ -938,7 +962,7 @@ const Rl = /* @__PURE__ */ R(Dl, [["render", Tl]]), Pl = {}, Nl = {
938
962
  "stroke-linecap": "round",
939
963
  "stroke-linejoin": "round"
940
964
  };
941
- function Hl(o, e, l, n, r, a) {
965
+ function Hl(o, e, t, n, s, a) {
942
966
  return i(), u("svg", Nl, e[0] || (e[0] = [
943
967
  ae('<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)
944
968
  ]));
@@ -948,14 +972,14 @@ const ql = /* @__PURE__ */ R(Pl, [["render", Hl]]), Gl = (o) => {
948
972
  const e = o?.split(".");
949
973
  return e[e.length - 1];
950
974
  }, Jl = (o) => {
951
- const e = Gl(o), l = {
975
+ const e = Gl(o), t = {
952
976
  imageFormat: ["tiff", "jpg", "jpeg", "png", "svg", "ico", "webp"],
953
977
  sheetsFormat: ["xls", "csv", "xlsx"],
954
978
  archivesFormat: ["zip", "rar"],
955
979
  textsFormat: ["json", "geojson", "txt", "yml", "yaml", "shp"],
956
980
  documentsFormat: ["pdf"]
957
981
  };
958
- return l.imageFormat.includes(e) ? "img" : l.sheetsFormat.includes(e) ? Al : l.textsFormat.includes(e) ? ql : l.documentsFormat.includes(e) ? Bl : l.archivesFormat.includes(e) ? Rl : Fl;
982
+ return t.imageFormat.includes(e) ? "img" : t.sheetsFormat.includes(e) ? zl : t.textsFormat.includes(e) ? ql : t.documentsFormat.includes(e) ? Sl : t.archivesFormat.includes(e) ? Rl : Ol;
959
983
  }, Kl = {}, Zl = {
960
984
  xmlns: "http://www.w3.org/2000/svg",
961
985
  width: "24",
@@ -987,19 +1011,19 @@ const Ie = /* @__PURE__ */ R(Kl, [["render", Wl]]), Ql = {}, Xl = {
987
1011
  };
988
1012
  function Yl(o, e) {
989
1013
  return i(), u("svg", Xl, e[0] || (e[0] = [
990
- t("path", {
1014
+ l("path", {
991
1015
  stroke: "none",
992
1016
  d: "M0 0h24v24H0z",
993
1017
  fill: "none"
994
1018
  }, null, -1),
995
- t("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" }, null, -1),
996
- t("path", { d: "M7 11l5 5l5 -5" }, null, -1),
997
- t("path", { d: "M12 4l0 12" }, null, -1)
1019
+ l("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" }, null, -1),
1020
+ l("path", { d: "M7 11l5 5l5 -5" }, null, -1),
1021
+ l("path", { d: "M12 4l0 12" }, null, -1)
998
1022
  ]));
999
1023
  }
1000
- const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, to = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, lo = /* @__PURE__ */ A({
1024
+ const at = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, to = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, lo = /* @__PURE__ */ A({
1001
1025
  __name: "vs-input-file-list-item",
1002
- props: /* @__PURE__ */ q({
1026
+ props: /* @__PURE__ */ Z({
1003
1027
  format: {},
1004
1028
  multiple: { type: Boolean },
1005
1029
  style: {},
@@ -1017,40 +1041,40 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1017
1041
  }),
1018
1042
  emits: ["update:value", "update:item"],
1019
1043
  setup(o) {
1020
- const e = G(o, "value"), l = G(o, "item"), n = o;
1021
- return (r, a) => (i(), u("div", eo, [
1022
- (i(), X(xe(H(Jl)(l.value)), {
1023
- src: l.value,
1044
+ const e = W(o, "value"), t = W(o, "item"), n = o;
1045
+ return (s, a) => (i(), u("div", eo, [
1046
+ (i(), X(we(H(Jl)(t.value)), {
1047
+ src: t.value,
1024
1048
  alt: "file",
1025
1049
  class: "w-full h-full object-cover cursor-pointer",
1026
- onClick: a[0] || (a[0] = (s) => H(Je)(l.value))
1050
+ onClick: a[0] || (a[0] = (r) => H(Ze)(t.value))
1027
1051
  }, null, 8, ["src"])),
1028
- t("div", to, [
1029
- t("button", {
1052
+ l("div", to, [
1053
+ l("button", {
1030
1054
  type: "button",
1031
- onClick: a[1] || (a[1] = (s) => {
1032
- H(kl)(l.value), e.value = n.multiple ? e.value?.filter((d) => d !== l.value) : "";
1055
+ onClick: a[1] || (a[1] = (r) => {
1056
+ H(kl)(t.value), e.value = n.multiple ? e.value?.filter((d) => d !== t.value) : "";
1033
1057
  }),
1034
1058
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"
1035
1059
  }, [
1036
1060
  j(Ie, { class: "w-4 h-4" })
1037
1061
  ]),
1038
- t("button", {
1062
+ l("button", {
1039
1063
  type: "button",
1040
- onClick: a[2] || (a[2] = (s) => H(Je)(l.value)),
1064
+ onClick: a[2] || (a[2] = (r) => H(Ze)(t.value)),
1041
1065
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"
1042
1066
  }, [
1043
- j(ot, { class: "w-4 h-4" })
1067
+ j(at, { class: "w-4 h-4" })
1044
1068
  ])
1045
1069
  ])
1046
1070
  ]));
1047
1071
  }
1048
- }), Ke = /* @__PURE__ */ R(lo, [["__scopeId", "data-v-0ca886b3"]]), oo = { class: "flex items-center gap-x-2" }, ao = {
1072
+ }), We = /* @__PURE__ */ R(lo, [["__scopeId", "data-v-0ca886b3"]]), oo = { class: "flex items-center gap-x-2" }, ao = {
1049
1073
  key: 1,
1050
1074
  class: "flex items-center flex-wrap gap-2"
1051
- }, ro = /* @__PURE__ */ A({
1075
+ }, so = /* @__PURE__ */ A({
1052
1076
  __name: "vs-input-file",
1053
- props: /* @__PURE__ */ q({
1077
+ props: /* @__PURE__ */ Z({
1054
1078
  format: {},
1055
1079
  multiple: { type: Boolean },
1056
1080
  style: {},
@@ -1066,65 +1090,65 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1066
1090
  }),
1067
1091
  emits: ["update:modelValue"],
1068
1092
  setup(o) {
1069
- const e = o, l = G(o, "modelValue"), n = $(null), r = (s) => Array.isArray(l.value) && l.value[s] || "", a = async (s) => {
1093
+ const e = o, t = W(o, "modelValue"), n = k(null), s = (r) => Array.isArray(t.value) && t.value[r] || "", a = async (r) => {
1070
1094
  if (e.format) {
1071
- const f = s.target.files?.[0];
1095
+ const f = r.target.files?.[0];
1072
1096
  if (!f || !f.name.endsWith(e.format))
1073
1097
  return;
1074
1098
  }
1075
- const d = s.target.files?.[0];
1099
+ const d = r.target.files?.[0];
1076
1100
  if (!d) return;
1077
1101
  const p = await wl(d, "1", "form", "table");
1078
- l.value = e.multiple ? [...l.value || [], p?.file_path] : p?.file_path;
1102
+ t.value = e.multiple ? [...t.value || [], p?.file_path] : p?.file_path;
1079
1103
  };
1080
- return (s, d) => (i(), u("div", oo, [
1081
- t("input", {
1104
+ return (r, d) => (i(), u("div", oo, [
1105
+ l("input", {
1082
1106
  class: "hidden",
1083
1107
  ref_key: "fileInput",
1084
1108
  ref: n,
1085
1109
  type: "file",
1086
1110
  onChange: a
1087
1111
  }, null, 544),
1088
- !s.multiple && l.value ? (i(), X(Ke, {
1112
+ !r.multiple && t.value ? (i(), X(We, {
1089
1113
  key: 0,
1090
- item: l.value,
1091
- "onUpdate:item": d[0] || (d[0] = (p) => l.value = p),
1092
- value: l.value,
1093
- "onUpdate:value": d[1] || (d[1] = (p) => l.value = p)
1094
- }, null, 8, ["item", "value"])) : s.multiple ? (i(), u("div", ao, [
1095
- (i(!0), u(Q, null, Y(l.value, (p, f) => (i(), X(Ke, {
1096
- multiple: s.multiple,
1114
+ item: t.value,
1115
+ "onUpdate:item": d[0] || (d[0] = (p) => t.value = p),
1116
+ value: t.value,
1117
+ "onUpdate:value": d[1] || (d[1] = (p) => t.value = p)
1118
+ }, null, 8, ["item", "value"])) : r.multiple ? (i(), u("div", ao, [
1119
+ (i(!0), u(K, null, Y(t.value, (p, f) => (i(), X(We, {
1120
+ multiple: r.multiple,
1097
1121
  key: f,
1098
- value: l.value,
1099
- "onUpdate:value": d[2] || (d[2] = (c) => l.value = c),
1100
- item: r(f)
1122
+ value: t.value,
1123
+ "onUpdate:value": d[2] || (d[2] = (c) => t.value = c),
1124
+ item: s(f)
1101
1125
  }, null, 8, ["multiple", "value", "item"]))), 128)),
1102
- t("div", {
1103
- onClick: d[3] || (d[3] = (p) => !s.disabled && n.value?.click()),
1104
- class: B([
1126
+ l("div", {
1127
+ onClick: d[3] || (d[3] = (p) => !r.disabled && n.value?.click()),
1128
+ class: S([
1105
1129
  "h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-[#CFD9E0] rounded-lg flex items-center justify-center transition-all duration-300",
1106
- s.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
1130
+ r.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
1107
1131
  ])
1108
1132
  }, [
1109
1133
  j(je, { class: "w-6 h-6" })
1110
1134
  ], 2)
1111
- ])) : S("", !0),
1112
- s.multiple ? S("", !0) : (i(), u("div", {
1135
+ ])) : B("", !0),
1136
+ r.multiple ? B("", !0) : (i(), u("div", {
1113
1137
  key: 2,
1114
1138
  onClick: d[4] || (d[4] = (p) => n.value?.click()),
1115
- class: B([s.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"])
1139
+ class: S([r.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"])
1116
1140
  }, [
1117
1141
  j(je, { class: "w-6 h-6" })
1118
1142
  ], 2))
1119
1143
  ]));
1120
1144
  }
1121
- }), so = { class: "max-w-[55vw]" }, no = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, io = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, uo = { class: "px-[5px]" }, co = { class: "" }, Be = /* @__PURE__ */ A({
1145
+ }), ro = { class: "max-w-[55vw]" }, no = { class: "text-sm font-semibold text-gray-800 truncate dark:text-neutral-200" }, io = { class: "flex items-center text-xs text-gray-500 truncate dark:text-neutral-500" }, uo = { class: "px-[5px]" }, co = { class: "" }, Se = /* @__PURE__ */ A({
1122
1146
  __name: "vs-widget-file-info",
1123
1147
  props: {
1124
1148
  item: { default: null }
1125
1149
  },
1126
1150
  setup(o) {
1127
- const e = o, l = D(() => {
1151
+ const e = o, t = D(() => {
1128
1152
  try {
1129
1153
  return new Date(e.item.cdate).toLocaleDateString("uk-UA", {
1130
1154
  day: "2-digit",
@@ -1135,24 +1159,24 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1135
1159
  return "";
1136
1160
  }
1137
1161
  });
1138
- function n(r) {
1139
- if (r < 1024)
1140
- return `${r} B`;
1141
- const a = r / 1024;
1162
+ function n(s) {
1163
+ if (s < 1024)
1164
+ return `${s} B`;
1165
+ const a = s / 1024;
1142
1166
  return a < 1024 ? `${a.toFixed(2)} KB` : `${(a / 1024).toFixed(2)} MB`;
1143
1167
  }
1144
- return (r, a) => (i(), u(Q, null, [
1168
+ return (s, a) => (i(), u(K, null, [
1145
1169
  a[1] || (a[1] = ae('<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)),
1146
- t("div", so, [
1147
- t("p", no, E(r.item?.uploaded_name), 1),
1148
- t("p", io, [
1149
- t("span", null, E(r.item?.username), 1),
1150
- K(t("span", uo, "|", 512), [
1151
- [De, r.item?.username]
1170
+ l("div", ro, [
1171
+ l("p", no, F(s.item?.uploaded_name), 1),
1172
+ l("p", io, [
1173
+ l("span", null, F(s.item?.username), 1),
1174
+ q(l("span", uo, "|", 512), [
1175
+ [Ue, s.item?.username]
1152
1176
  ]),
1153
- t("span", null, E(l.value), 1),
1154
- a[0] || (a[0] = t("span", { class: "px-[5px]" }, "|", -1)),
1155
- t("span", co, E(n(r.item?.size)), 1)
1177
+ l("span", null, F(t.value), 1),
1178
+ a[0] || (a[0] = l("span", { class: "px-[5px]" }, "|", -1)),
1179
+ l("span", co, F(n(s.item?.size)), 1)
1156
1180
  ])
1157
1181
  ])
1158
1182
  ], 64));
@@ -1178,21 +1202,21 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1178
1202
  },
1179
1203
  emits: ["update", "openModal", "openLightbox"],
1180
1204
  setup(o, { emit: e }) {
1181
- const l = o, n = e;
1182
- function r(c) {
1205
+ const t = o, n = e;
1206
+ function s(c) {
1183
1207
  return ["pdf", "json"].includes(c.ext);
1184
1208
  }
1185
1209
  function a(c) {
1186
1210
  return ["ppt", "pptx", "doc", "docx", "xls", "xlsx"].includes(c.ext);
1187
1211
  }
1188
- function s(c) {
1212
+ function r(c) {
1189
1213
  const g = document.createElement("a");
1190
1214
  g.setAttribute("download", c?.uploaded_name), g.href = c?.file_path, g.click();
1191
1215
  }
1192
1216
  async function d() {
1193
1217
  try {
1194
1218
  await fetch(
1195
- `${l.prefix}/widget/file/${l.item.entity_id}/${l.item.file_id}`
1219
+ `${t.prefix}/widget/file/${t.item.entity_id}/${t.item.file_id}`
1196
1220
  ), n("update");
1197
1221
  } catch (c) {
1198
1222
  console.error(c);
@@ -1209,45 +1233,45 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1209
1233
  });
1210
1234
  }
1211
1235
  function f(c) {
1212
- (l.item.ext === "jpg" || l.item.ext === "png") && n("openLightbox", { item: l.item, index: c });
1236
+ (t.item.ext === "jpg" || t.item.ext === "png") && n("openLightbox", { item: t.item, index: c });
1213
1237
  }
1214
1238
  return (c, g) => (i(), u("div", po, [
1215
1239
  c.item.ext === "jpg" || c.item.ext === "png" ? (i(), u("div", fo, [
1216
- t("div", {
1240
+ l("div", {
1217
1241
  class: "max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",
1218
1242
  onClick: g[0] || (g[0] = (v) => f(c.index))
1219
1243
  }, [
1220
- j(Be, { item: c.item }, null, 8, ["item"])
1244
+ j(Se, { item: c.item }, null, 8, ["item"])
1221
1245
  ])
1222
- ])) : r(c.item) ? (i(), u("div", vo, [
1223
- j(Be, { item: c.item }, null, 8, ["item"])
1246
+ ])) : s(c.item) ? (i(), u("div", vo, [
1247
+ j(Se, { item: c.item }, null, 8, ["item"])
1224
1248
  ])) : a(c.item) ? (i(), u("div", mo, [
1225
- t("a", {
1249
+ l("a", {
1226
1250
  href: `/api/file-preview?id=${c.item.file_id}`,
1227
1251
  target: "_blank",
1228
1252
  class: "flex gap-x-3 w-full items-center"
1229
1253
  }, [
1230
- j(Be, { item: c.item }, null, 8, ["item"])
1254
+ j(Se, { item: c.item }, null, 8, ["item"])
1231
1255
  ], 8, ho)
1232
1256
  ])) : (i(), u("div", go, [
1233
- j(Be, { item: c.item }, null, 8, ["item"])
1257
+ j(Se, { item: c.item }, null, 8, ["item"])
1234
1258
  ])),
1235
- t("div", bo, [
1236
- t("div", yo, [
1237
- t("div", xo, [
1238
- t("button", {
1259
+ l("div", bo, [
1260
+ l("div", yo, [
1261
+ l("div", xo, [
1262
+ l("button", {
1239
1263
  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",
1240
- onClick: g[1] || (g[1] = (v) => s(c.item))
1264
+ onClick: g[1] || (g[1] = (v) => r(c.item))
1241
1265
  }, [
1242
- j(ot, {
1266
+ j(at, {
1243
1267
  height: "14",
1244
1268
  width: "14"
1245
1269
  })
1246
1270
  ])
1247
1271
  ]),
1248
- g[3] || (g[3] = t("div", { class: "w-px h-5 mx-1 bg-gray-200 dark:bg-neutral-700" }, null, -1)),
1249
- t("div", wo, [
1250
- t("button", {
1272
+ g[3] || (g[3] = l("div", { class: "w-px h-5 mx-1 bg-gray-200 dark:bg-neutral-700" }, null, -1)),
1273
+ l("div", wo, [
1274
+ l("button", {
1251
1275
  type: "button",
1252
1276
  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",
1253
1277
  onClick: g[2] || (g[2] = (v) => p())
@@ -1276,23 +1300,23 @@ const ot = /* @__PURE__ */ R(Ql, [["render", Yl]]), eo = { class: "h-[120px] w-[
1276
1300
  };
1277
1301
  function Co(o, e) {
1278
1302
  return i(), u("svg", $o, e[0] || (e[0] = [
1279
- t("path", {
1303
+ l("path", {
1280
1304
  stroke: "none",
1281
1305
  d: "M0 0h24v24H0z",
1282
1306
  fill: "none"
1283
1307
  }, null, -1),
1284
- t("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" }, null, -1),
1285
- t("path", { d: "M7 11l5 5l5 -5" }, null, -1),
1286
- t("path", { d: "M12 4l0 12" }, null, -1)
1308
+ l("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" }, null, -1),
1309
+ l("path", { d: "M7 11l5 5l5 -5" }, null, -1),
1310
+ l("path", { d: "M12 4l0 12" }, null, -1)
1287
1311
  ]));
1288
1312
  }
1289
- const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, Lo = { class: "flex w-full mb-[12px] items-center gap-x-2" }, Bo = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, So = { class1: "ml-auto" }, jo = { 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" }, Io = {
1313
+ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Lo = { class: "flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full" }, Mo = { class: "flex w-full mb-[12px] items-center gap-x-2" }, So = { class: "font-semibold text-gray-800 dark:text-neutral-200 text-[14px]" }, Bo = { class1: "ml-auto" }, jo = { 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" }, Io = {
1290
1314
  key: 0,
1291
1315
  class: "py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"
1292
- }, Ao = { class: "relative" }, zo = {
1316
+ }, zo = { class: "relative" }, Ao = {
1293
1317
  key: 1,
1294
1318
  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"
1295
- }, Oo = { key: 0 }, Eo = /* @__PURE__ */ A({
1319
+ }, Eo = { key: 0 }, Fo = /* @__PURE__ */ A({
1296
1320
  __name: "vs-input-file-list",
1297
1321
  props: {
1298
1322
  id: { default: "" },
@@ -1307,56 +1331,56 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1307
1331
  },
1308
1332
  emits: ["update"],
1309
1333
  setup(o, { emit: e }) {
1310
- const l = o, n = Se("form"), r = D(() => n.value.formId), a = $(!1), s = $(0), d = e, p = $(!1), f = $({}), c = $([]), g = $(""), v = D(() => Array.isArray(c.value) ? c.value.filter((x) => x.ext === "jpg" || x.ext === "png").map((x) => x?.file_path) : []), M = D(() => g.value === "" ? c.value : c.value.filter((x) => x?.uploaded_name?.includes(g.value))), I = (x) => {
1311
- const h = v.value.findIndex((J) => J === x.item.file_path);
1312
- h !== -1 && (a.value = !0, s.value = h);
1313
- }, F = async () => {
1334
+ const t = o, n = Be("form"), s = D(() => n.value.formId), a = k(!1), r = k(0), d = e, p = k(!1), f = k({}), c = k([]), g = k(""), v = D(() => Array.isArray(c.value) ? c.value.filter((x) => x.ext === "jpg" || x.ext === "png").map((x) => x?.file_path) : []), M = D(() => g.value === "" ? c.value : c.value.filter((x) => x?.uploaded_name?.includes(g.value))), I = (x) => {
1335
+ const h = v.value.findIndex((G) => G === x.item.file_path);
1336
+ h !== -1 && (a.value = !0, r.value = h);
1337
+ }, U = async () => {
1314
1338
  try {
1315
- const x = await fetch(`${l.prefix}/widget/file/${r.value}`).then((h) => h.json());
1339
+ const x = await fetch(`${t.prefix}/widget/file/${s.value}`).then((h) => h.json());
1316
1340
  c.value = x?.rows;
1317
1341
  } catch (x) {
1318
1342
  console.error(x);
1319
1343
  }
1320
- }, U = async (x) => {
1344
+ }, T = async (x) => {
1321
1345
  await Promise.all(
1322
1346
  Array.from(x.target.files).map(async (h) => {
1323
- const J = new FormData();
1324
- J.append("file", h);
1347
+ const G = new FormData();
1348
+ G.append("file", h);
1325
1349
  try {
1326
- const C = `${l.prefix}/widget/file/${r.value}`;
1327
- return await fetch(C, { method: "POST", body: J }), d("update", "file-list"), h;
1350
+ const C = `${t.prefix}/widget/file/${s.value}`;
1351
+ return await fetch(C, { method: "POST", body: G }), d("update", "file-list"), h;
1328
1352
  } catch (C) {
1329
1353
  return console.error(C), null;
1330
1354
  }
1331
1355
  })
1332
- ), await F();
1356
+ ), await U();
1333
1357
  }, P = (x) => {
1334
1358
  const h = { ...x };
1335
1359
  return x.cancel || (h.cancel = () => {
1336
1360
  p.value = !1;
1337
1361
  }), x.updateListOnConfirm && (h.confirm = async () => {
1338
- await x.confirm(), p.value = !1, F();
1362
+ await x.confirm(), p.value = !1, U();
1339
1363
  }), h;
1340
1364
  }, _ = (x) => {
1341
1365
  f.value = P(x), p.value = !0;
1342
1366
  };
1343
- return se(r, (x) => {
1344
- x && F();
1345
- }), ue(() => {
1346
- r.value && F();
1367
+ return re(s, (x) => {
1368
+ x && U();
1369
+ }), ne(() => {
1370
+ s.value && U();
1347
1371
  }), (x, h) => {
1348
- const J = Pe("Lightbox"), C = Pe("MessageBox");
1349
- return i(), u("div", Mo, [
1350
- t("div", Lo, [
1351
- t("h2", Bo, " Файлів: " + E(c.value?.length), 1),
1352
- t("div", So, [
1353
- t("label", null, [
1354
- t("input", {
1372
+ const G = Ne("Lightbox"), C = Ne("MessageBox");
1373
+ return i(), u("div", Lo, [
1374
+ l("div", Mo, [
1375
+ l("h2", So, " Файлів: " + F(c.value?.length), 1),
1376
+ l("div", Bo, [
1377
+ l("label", null, [
1378
+ l("input", {
1355
1379
  type: "file",
1356
1380
  class: "hidden",
1357
- onChange: h[0] || (h[0] = (m) => U(m))
1381
+ onChange: h[0] || (h[0] = (m) => T(m))
1358
1382
  }, null, 32),
1359
- t("div", jo, [
1383
+ l("div", jo, [
1360
1384
  j(Vo, {
1361
1385
  height: "16",
1362
1386
  width: "16"
@@ -1366,10 +1390,10 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1366
1390
  ])
1367
1391
  ]),
1368
1392
  c.value?.length > 4 ? (i(), u("div", Io, [
1369
- t("div", null, [
1370
- t("div", Ao, [
1371
- h[8] || (h[8] = t("div", { class: "absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5" }, [
1372
- t("svg", {
1393
+ l("div", null, [
1394
+ l("div", zo, [
1395
+ h[8] || (h[8] = l("div", { class: "absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5" }, [
1396
+ l("svg", {
1373
1397
  class: "flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400",
1374
1398
  xmlns: "http://www.w3.org/2000/svg",
1375
1399
  width: "24",
@@ -1381,22 +1405,22 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1381
1405
  "stroke-linecap": "round",
1382
1406
  "stroke-linejoin": "round"
1383
1407
  }, [
1384
- t("circle", {
1408
+ l("circle", {
1385
1409
  cx: "11",
1386
1410
  cy: "11",
1387
1411
  r: "8"
1388
1412
  }),
1389
- t("path", { d: "m21 21-4.3-4.3" })
1413
+ l("path", { d: "m21 21-4.3-4.3" })
1390
1414
  ])
1391
1415
  ], -1)),
1392
- K(t("input", {
1416
+ q(l("input", {
1393
1417
  type: "text",
1394
1418
  "onUpdate:modelValue": h[1] || (h[1] = (m) => g.value = m),
1395
1419
  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",
1396
1420
  placeholder: "Введіть назву файлу"
1397
1421
  }, null, 512), [
1398
1422
  [
1399
- ne,
1423
+ ie,
1400
1424
  g.value,
1401
1425
  void 0,
1402
1426
  { trim: !0 }
@@ -1404,29 +1428,29 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1404
1428
  ])
1405
1429
  ])
1406
1430
  ])
1407
- ])) : S("", !0),
1408
- c.value?.length ? (i(), u("div", zo, [
1409
- (i(!0), u(Q, null, Y(M.value, (m, V) => (i(), X(ko, {
1431
+ ])) : B("", !0),
1432
+ c.value?.length ? (i(), u("div", Ao, [
1433
+ (i(!0), u(K, null, Y(M.value, (m, V) => (i(), X(ko, {
1410
1434
  key: V,
1411
1435
  prefix: x.prefix,
1412
1436
  item: m,
1413
1437
  index: V,
1414
- onUpdate: h[2] || (h[2] = (z) => x.$emit("update", "file-list")),
1415
- onOpenModal: h[3] || (h[3] = (z) => _(z)),
1416
- onOpenLightbox: h[4] || (h[4] = (z) => I(z))
1438
+ onUpdate: h[2] || (h[2] = (E) => x.$emit("update", "file-list")),
1439
+ onOpenModal: h[3] || (h[3] = (E) => _(E)),
1440
+ onOpenLightbox: h[4] || (h[4] = (E) => I(E))
1417
1441
  }, null, 8, ["prefix", "item", "index"]))), 128)),
1418
- M.value.length ? S("", !0) : (i(), u("div", Oo, h[9] || (h[9] = [
1419
- t("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
1442
+ M.value.length ? B("", !0) : (i(), u("div", Eo, h[9] || (h[9] = [
1443
+ l("p", { class: "text-sm text-gray-600 font-sm" }, " Файлів з такою назвою не існує, введіть інше пошукове слово ", -1)
1420
1444
  ])))
1421
- ])) : S("", !0),
1422
- j(J, {
1445
+ ])) : B("", !0),
1446
+ j(G, {
1423
1447
  modelValue: a.value,
1424
1448
  "onUpdate:modelValue": h[5] || (h[5] = (m) => a.value = m),
1425
- startIndex: s.value,
1426
- "onUpdate:index": h[6] || (h[6] = (m) => s.value = m),
1449
+ startIndex: r.value,
1450
+ "onUpdate:index": h[6] || (h[6] = (m) => r.value = m),
1427
1451
  images: v.value
1428
1452
  }, null, 8, ["modelValue", "startIndex", "images"]),
1429
- j(C, Ce({
1453
+ j(C, Ve({
1430
1454
  modelValue: p.value,
1431
1455
  "onUpdate:modelValue": h[7] || (h[7] = (m) => p.value = m),
1432
1456
  onConfirm: f.value.confirm
@@ -1434,7 +1458,7 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1434
1458
  ]);
1435
1459
  };
1436
1460
  }
1437
- }), Fo = { class: "flex items-center justify-between" }, Do = { class: "text-[16px] text-gray-900 font-medium" }, Uo = { class: "grid gap-3" }, To = /* @__PURE__ */ A({
1461
+ }), Oo = { class: "flex items-center justify-between" }, Do = { class: "text-[16px] text-gray-900 font-medium" }, Uo = { class: "grid gap-3" }, To = /* @__PURE__ */ A({
1438
1462
  __name: "vs-container-switcher",
1439
1463
  props: {
1440
1464
  title: {
@@ -1451,27 +1475,27 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1451
1475
  }
1452
1476
  },
1453
1477
  setup(o) {
1454
- const e = o, l = $(e.isOpen);
1455
- return se(
1478
+ const e = o, t = k(e.isOpen);
1479
+ return re(
1456
1480
  () => e.isOpen,
1457
1481
  (n) => {
1458
- l.value = n;
1482
+ t.value = n;
1459
1483
  }
1460
- ), (n, r) => (i(), u("div", null, [
1461
- t("div", Fo, [
1462
- t("p", Do, E(o.title), 1),
1463
- j(lt, {
1464
- modelValue: l.value,
1465
- "onUpdate:modelValue": r[0] || (r[0] = (a) => l.value = a),
1466
- style: fe(o.style)
1484
+ ), (n, s) => (i(), u("div", null, [
1485
+ l("div", Oo, [
1486
+ l("p", Do, F(o.title), 1),
1487
+ j(ot, {
1488
+ modelValue: t.value,
1489
+ "onUpdate:modelValue": s[0] || (s[0] = (a) => t.value = a),
1490
+ style: ve(o.style)
1467
1491
  }, null, 8, ["modelValue", "style"])
1468
1492
  ]),
1469
- j(Ye, { name: "slide-fade" }, {
1493
+ j(tt, { name: "slide-fade" }, {
1470
1494
  default: Me(() => [
1471
- K(t("div", Uo, [
1472
- ve(n.$slots, "default", {}, void 0, !0)
1495
+ q(l("div", Uo, [
1496
+ me(n.$slots, "default", {}, void 0, !0)
1473
1497
  ], 512), [
1474
- [De, l.value]
1498
+ [Ue, t.value]
1475
1499
  ])
1476
1500
  ]),
1477
1501
  _: 3
@@ -1495,29 +1519,29 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1495
1519
  }
1496
1520
  },
1497
1521
  setup(o) {
1498
- const e = o, l = $(e.isOpen);
1499
- return se(
1522
+ const e = o, t = k(e.isOpen);
1523
+ return re(
1500
1524
  () => e.isOpen,
1501
1525
  (n) => {
1502
- l.value = n;
1526
+ t.value = n;
1503
1527
  }
1504
- ), (n, r) => (i(), u("div", null, [
1505
- t("button", {
1528
+ ), (n, s) => (i(), u("div", null, [
1529
+ l("button", {
1506
1530
  type: "button",
1507
- onClick: r[0] || (r[0] = (a) => l.value = !l.value),
1531
+ onClick: s[0] || (s[0] = (a) => t.value = !t.value),
1508
1532
  class: "flex items-center gap-2"
1509
1533
  }, [
1510
1534
  j(H(Zt), {
1511
- class: B(["h-4 w-4 duration-300", [l.value ? "-rotate-180" : ""]])
1535
+ class: S(["h-4 w-4 duration-300", [t.value ? "-rotate-180" : ""]])
1512
1536
  }, null, 8, ["class"]),
1513
- t("span", Po, E(o.title), 1)
1537
+ l("span", Po, F(o.title), 1)
1514
1538
  ]),
1515
- j(Ye, { name: "slide-fade" }, {
1539
+ j(tt, { name: "slide-fade" }, {
1516
1540
  default: Me(() => [
1517
- K(t("div", No, [
1518
- ve(n.$slots, "default", {}, void 0, !0)
1541
+ q(l("div", No, [
1542
+ me(n.$slots, "default", {}, void 0, !0)
1519
1543
  ], 512), [
1520
- [De, l.value]
1544
+ [Ue, t.value]
1521
1545
  ])
1522
1546
  ]),
1523
1547
  _: 3
@@ -1537,11 +1561,11 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1537
1561
  }
1538
1562
  },
1539
1563
  setup(o) {
1540
- return (e, l) => (i(), u("div", null, [
1541
- t("div", Go, [
1542
- t("p", null, E(o.title), 1)
1564
+ return (e, t) => (i(), u("div", null, [
1565
+ l("div", Go, [
1566
+ l("p", null, F(o.title), 1)
1543
1567
  ]),
1544
- ve(e.$slots, "default")
1568
+ me(e.$slots, "default")
1545
1569
  ]));
1546
1570
  }
1547
1571
  }), Ko = {
@@ -1561,7 +1585,7 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1561
1585
  Contain: "*",
1562
1586
  In: "in",
1563
1587
  NotIn: "not_in"
1564
- }, Zo = (o, e) => String(o) === String(e), Wo = (o, e) => String(o) !== String(e), Qo = (o, e) => o > e, Xo = (o, e) => o >= e, Yo = (o, e) => o < e, ea = (o, e) => o <= e, ta = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, la = (o, e) => String(o).startsWith(String(e)), oa = (o, e) => String(o).endsWith(String(e)), aa = (o, e) => String(o).includes(String(e)), ra = (o, e) => Array.isArray(e) ? e.includes(o) : !1, sa = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, at = (o, e) => {
1588
+ }, Zo = (o, e) => String(o) === String(e), Wo = (o, e) => String(o) !== String(e), Qo = (o, e) => o > e, Xo = (o, e) => o >= e, Yo = (o, e) => o < e, ea = (o, e) => o <= e, ta = (o, e) => Array.isArray(e) && e.length === 2 ? o >= e[0] && o <= e[1] : !1, la = (o, e) => String(o).startsWith(String(e)), oa = (o, e) => String(o).endsWith(String(e)), aa = (o, e) => String(o).includes(String(e)), sa = (o, e) => Array.isArray(e) ? e.includes(o) : !1, ra = (o, e) => Array.isArray(e) ? !e.includes(o) : !0, st = (o, e) => {
1565
1589
  if (!e) return !0;
1566
1590
  switch (e?.[1]) {
1567
1591
  case le.Equal:
@@ -1585,9 +1609,9 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1585
1609
  case le.Contain:
1586
1610
  return aa(o, e?.[2]);
1587
1611
  case le.In:
1588
- return ra(o, e?.[2]);
1589
- case le.NotIn:
1590
1612
  return sa(o, e?.[2]);
1613
+ case le.NotIn:
1614
+ return ra(o, e?.[2]);
1591
1615
  default:
1592
1616
  return !0;
1593
1617
  }
@@ -1612,32 +1636,32 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1612
1636
  }
1613
1637
  },
1614
1638
  setup(o) {
1615
- const e = o, l = Se("formValues", { default: {} }), n = Se("form"), r = D(() => e.schema?.filter((s) => {
1616
- const d = s?.conditions;
1639
+ const e = o, t = Be("formValues", { default: {} }), n = Be("form"), s = D(() => e.schema?.filter((r) => {
1640
+ const d = r?.conditions;
1617
1641
  if (!d) return !0;
1618
- const p = Array.isArray(d) ? d[0] : d, f = l?.value?.[p];
1619
- return at(f, d);
1642
+ const p = Array.isArray(d) ? d[0] : d, f = t?.value?.[p];
1643
+ return st(f, d);
1620
1644
  })), a = D(() => Ko[e.view]);
1621
- return (s, d) => o.schema?.length ? (i(), X(xe(a.value), {
1645
+ return (r, d) => o.schema?.length ? (i(), X(we(a.value), {
1622
1646
  key: 0,
1623
1647
  title: o.title,
1624
- style: fe(o.style)
1648
+ style: ve(o.style)
1625
1649
  }, {
1626
1650
  default: Me(() => [
1627
- (i(!0), u(Q, null, Y(r.value, (p) => (i(), X(rt, Ce({
1651
+ (i(!0), u(K, null, Y(s.value, (p) => (i(), X(rt, Ve({
1628
1652
  key: p.name
1629
1653
  }, { ref_for: !0 }, p, {
1630
1654
  item: p,
1631
- modelValue: H(l)[p.name],
1632
- "onUpdate:modelValue": (f) => H(l)[p.name] = f,
1655
+ modelValue: H(t)[p.name],
1656
+ "onUpdate:modelValue": (f) => H(t)[p.name] = f,
1633
1657
  style: o.style,
1634
1658
  error: H(n)?.errors?.[p.name]
1635
1659
  }), null, 16, ["item", "modelValue", "onUpdate:modelValue", "style", "error"]))), 128))
1636
1660
  ]),
1637
1661
  _: 1
1638
- }, 8, ["title", "style"])) : S("", !0);
1662
+ }, 8, ["title", "style"])) : B("", !0);
1639
1663
  }
1640
- }), ia = { class: "relative" }, ua = { class: "w-full h-full fixed top-0 start-0 z-[1000] bg-black bg-opacity-50" }, da = { 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" }, ca = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, pa = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, fa = { class: "p-4 mim-h-0 h-full overflow-auto" }, va = /* @__PURE__ */ A({
1664
+ }), ia = { class: "p-4 mim-h-0 h-full overflow-auto" }, ua = /* @__PURE__ */ A({
1641
1665
  __name: "modal-edit",
1642
1666
  props: {
1643
1667
  schema: {},
@@ -1648,11 +1672,11 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1648
1672
  },
1649
1673
  emits: ["close", "save", "edit"],
1650
1674
  setup(o, { emit: e }) {
1651
- const l = o, n = e, r = $(l.schema), a = $(l.defaultValue ? JSON.parse(JSON.stringify(l.defaultValue)) : {}), s = $({}), d = $(), p = $(l.mode);
1675
+ const t = o, n = e, s = k(t.schema), a = k(t.defaultValue ? JSON.parse(JSON.stringify(t.defaultValue)) : {}), r = k({}), d = k(), p = k(t.mode);
1652
1676
  async function f() {
1653
- const g = s.value.validate();
1677
+ const g = r.value.validate();
1654
1678
  if (g) {
1655
- pe({ type: "warning", title: "Помилка валідації", message: Object.entries(g).map(([v, M]) => `${v}: ${M}`).join(`
1679
+ fe({ type: "warning", title: "Помилка валідації", message: Object.entries(g).map(([v, M]) => `${v}: ${M}`).join(`
1656
1680
  `) });
1657
1681
  return;
1658
1682
  }
@@ -1666,151 +1690,116 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1666
1690
  body: JSON.stringify(a.value)
1667
1691
  });
1668
1692
  if (v.ok)
1669
- await v.json(), pe({
1693
+ await v.json(), fe({
1670
1694
  type: "success",
1671
1695
  title: "Успішно",
1672
1696
  message: `Дані успішно ${p.value === "add" ? "збережено" : "оновлено"}`
1673
1697
  }), n("save", a.value);
1674
1698
  else if (v.status === 400) {
1675
1699
  const M = await v.json().catch(() => ({}));
1676
- pe({
1700
+ fe({
1677
1701
  type: "warning",
1678
1702
  title: "Помилка валідації",
1679
1703
  message: M.message || "Некоректні дані (400)"
1680
1704
  });
1681
- } else v.status === 500 ? pe({
1705
+ } else v.status === 500 ? fe({
1682
1706
  type: "error",
1683
1707
  title: "Серверна помилка",
1684
1708
  message: "Виникла помилка на сервері (500)"
1685
- }) : pe({
1709
+ }) : fe({
1686
1710
  type: "error",
1687
1711
  title: "Помилка",
1688
1712
  message: `Статус: ${v.status}`
1689
1713
  });
1690
1714
  } catch (v) {
1691
- pe({
1715
+ fe({
1692
1716
  type: "error",
1693
1717
  title: "Помилка з’єднання",
1694
1718
  message: v.message || "Не вдалося виконати запит"
1695
1719
  });
1696
1720
  }
1721
+ else
1722
+ n("save", a.value);
1697
1723
  }
1698
1724
  function c() {
1699
1725
  n("close");
1700
1726
  }
1701
- return ue(async () => {
1702
- if (l.form) {
1703
- const g = await fetch(`/api/template/form/${l.form}`).then((v) => v.json());
1704
- r.value = g.schema, d.value = g.token;
1705
- } else if (l.token) {
1706
- d.value = l.token;
1727
+ return ne(async () => {
1728
+ if (t.form) {
1729
+ const g = await fetch(`/api/template/form/${t.form}`).then((v) => v.json());
1730
+ s.value = g.schema, d.value = g.token;
1731
+ } else if (t.token) {
1732
+ d.value = t.token;
1707
1733
  const g = await fetch(`/api/form/${d.value}`).then((v) => v.json());
1708
- r.value = g.schema, g.data ? a.value = g.data : p.value = "add";
1734
+ s.value = g.schema, g.data ? a.value = g.data : p.value = "add";
1709
1735
  }
1710
- }), (g, v) => (i(), u("div", ia, [
1711
- t("div", ua, [
1712
- t("div", da, [
1713
- t("div", ca, [
1714
- t("h3", pa, E(p.value === "add" ? "Додати" : "Змінити"), 1),
1715
- t("button", {
1716
- onClick: c,
1717
- type: "button",
1718
- class: "size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600"
1719
- }, v[2] || (v[2] = [
1720
- t("span", { class: "sr-only" }, "Close", -1),
1721
- t("svg", {
1722
- class: "flex-shrink-0 w-4 h-4",
1723
- xmlns: "http://www.w3.org/2000/svg",
1724
- width: "24",
1725
- height: "24",
1726
- viewBox: "0 0 24 24",
1727
- fill: "none",
1728
- stroke: "currentColor",
1729
- "stroke-width": "2",
1730
- "stroke-linecap": "round",
1731
- "stroke-linejoin": "round"
1732
- }, [
1733
- t("path", { d: "M18 6 6 18" }),
1734
- t("path", { d: "m6 6 12 12" })
1735
- ], -1)
1736
- ]))
1737
- ]),
1738
- t("div", fa, [
1739
- r.value ? (i(), X(Oe, {
1740
- key: 0,
1741
- schema: r.value,
1742
- values: a.value,
1743
- "onUpdate:values": v[0] || (v[0] = (M) => a.value = M),
1744
- form: s.value,
1745
- "onUpdate:form": v[1] || (v[1] = (M) => s.value = M)
1746
- }, null, 8, ["schema", "values", "form"])) : S("", !0)
1747
- ]),
1748
- t("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" }, [
1749
- t("button", {
1750
- type: "button",
1751
- onClick: c,
1752
- 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"
1753
- }, " Скасувати "),
1754
- t("button", {
1755
- onClick: f,
1756
- type: "button",
1757
- 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"
1758
- }, " Зберегти ")
1759
- ])
1760
- ])
1736
+ }), (g, v) => (i(), u(K, null, [
1737
+ l("div", ia, [
1738
+ s.value ? (i(), X(Ee, {
1739
+ key: 0,
1740
+ schema: s.value,
1741
+ values: a.value,
1742
+ "onUpdate:values": v[0] || (v[0] = (M) => a.value = M),
1743
+ form: r.value,
1744
+ "onUpdate:form": v[1] || (v[1] = (M) => r.value = M)
1745
+ }, null, 8, ["schema", "values", "form"])) : B("", !0)
1746
+ ]),
1747
+ l("div", { class: "vs-form__head mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, [
1748
+ l("button", {
1749
+ type: "button",
1750
+ onClick: c,
1751
+ 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"
1752
+ }, " Скасувати "),
1753
+ l("button", {
1754
+ onClick: f,
1755
+ type: "button",
1756
+ 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"
1757
+ }, " Зберегти ")
1761
1758
  ])
1762
- ]));
1763
- }
1764
- }), Ve = (o = { mode: "edit", schema: null }) => new Promise((e) => {
1765
- const l = document.querySelector("body");
1766
- if (!l) {
1767
- console.error('Modal root element with id "#modal" not found!');
1768
- return;
1769
- }
1770
- const n = document.createElement("div");
1771
- l.appendChild(n);
1772
- function r() {
1773
- a.unmount(), n.remove();
1759
+ ], 64));
1774
1760
  }
1775
- const a = ct({
1776
- render() {
1777
- return pt(va, {
1778
- ...o,
1779
- onClose: () => {
1780
- e(null), r();
1781
- },
1782
- onSave: (s) => {
1783
- e(s), r();
1784
- }
1785
- });
1761
+ }), Le = (o = { mode: "edit", schema: null }) => new Promise((e) => {
1762
+ const { close: t } = ft({
1763
+ title: o.mode === "add" ? "Додати" : "Редагувати",
1764
+ template: "",
1765
+ visible: !0,
1766
+ size: "medium",
1767
+ closeClickBack: !0,
1768
+ content: ua,
1769
+ contentProps: {
1770
+ ...o,
1771
+ onClose: () => {
1772
+ e(null), t();
1773
+ },
1774
+ onSave: (n) => {
1775
+ e(n), t();
1776
+ }
1786
1777
  }
1787
1778
  });
1788
- a.mount(n);
1789
- }), ma = ["aria-expanded", "data-focus"], ha = { class: "flex items-center" }, ga = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, ba = ["onClick"], ya = {
1790
- key: 1,
1791
- class: /* @__PURE__ */ B(["flex items-center absolute truncate text-gray-900"])
1792
- }, xa = {
1779
+ }), da = ["aria-expanded", "data-focus"], ca = { class: "flex items-center" }, pa = { class: "truncate text-gray-900 overflow-hidden" }, fa = ["onClick"], va = ["title"], ma = {
1793
1780
  key: 2,
1794
- class: "absolute text-gray-500 truncate"
1795
- }, wa = { class: "flex-1 min-w-[2px]" }, ka = ["placeholder"], _a = { class: "flex items-center shrink-0" }, $a = ["disabled"], Ca = ["disabled"], Va = {
1781
+ class: "text-gray-500 truncate"
1782
+ }, ha = { class: "flex-1 min-w-[2px]" }, ga = ["placeholder"], ba = { class: "flex items-center shrink-0" }, ya = ["disabled"], xa = ["disabled"], wa = {
1796
1783
  key: 0,
1797
1784
  class: "absolute z-10 w-full mt-2 rounded bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.1),0_4px_11px_rgba(0,0,0,0.1)]",
1798
1785
  role: "listbox"
1799
- }, Ma = ["aria-disabled", "onClick"], La = {
1786
+ }, ka = ["aria-disabled", "onClick"], _a = {
1800
1787
  key: 1,
1801
1788
  class: "px-3 py-2 text-center text-gray-500"
1802
- }, Ba = ["disabled"], Sa = /* @__PURE__ */ A({
1789
+ }, $a = ["disabled"], Ca = /* @__PURE__ */ A({
1803
1790
  __name: "vs-input-select",
1804
- props: /* @__PURE__ */ q({
1791
+ props: {
1805
1792
  multiple: { type: Boolean, default: !1 },
1806
1793
  disabled: { type: Boolean, default: !1 },
1807
1794
  mode: {},
1795
+ defaultValue: {},
1808
1796
  search: { type: Boolean, default: !0 },
1809
1797
  placeholder: { default: "Оберіть значення" },
1810
1798
  prefix: { default: "api" },
1811
1799
  host: { default: "" },
1812
1800
  data: {},
1813
1801
  options: { default: () => [] },
1802
+ api: {},
1814
1803
  maxHeight: { default: 400 },
1815
1804
  add: {},
1816
1805
  style: { default: () => ({}) },
@@ -1818,158 +1807,158 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1818
1807
  modelValue: {},
1819
1808
  error: { default: null },
1820
1809
  name: {}
1821
- }, {
1822
- modelValue: {
1823
- default: null
1824
- },
1825
- modelModifiers: {}
1826
- }),
1827
- emits: /* @__PURE__ */ q(["change"], ["update:modelValue"]),
1810
+ },
1811
+ emits: ["change", "update:modelValue"],
1828
1812
  setup(o, { emit: e }) {
1829
- const l = o, n = e, r = D(() => l.multiple), a = D(() => l.disabled);
1830
- me(l.style);
1831
- const s = G(o, "modelValue"), d = $(null), p = $(null), f = $(null), c = $(!1), g = $(!1), v = $(null), M = $([]), I = $(-1), F = $([]), U = $(""), P = $(null), _ = $([]), x = D(() => {
1813
+ const t = o, n = e, s = D(() => t.multiple), a = D(() => t.disabled);
1814
+ he(t.style);
1815
+ const r = D({
1816
+ get: () => t.modelValue,
1817
+ set: (y) => n("update:modelValue", y)
1818
+ });
1819
+ !r.value && t.defaultValue && (r.value = t.defaultValue);
1820
+ const d = k(null), p = k(null), f = k(null), c = k(!1), g = k(!1), v = k(null), M = k([]), I = k(-1), U = k([]), T = k(""), P = k(null), _ = k([]), x = D(() => {
1832
1821
  if (!_.value.length) return [];
1833
- const k = new Map(M.value.map((w) => [w.id?.toString(), w]));
1834
- return _.value.map((w) => k.get(w?.toString())).filter((w) => !!w);
1835
- }), h = D(() => l.placeholder || "Select..."), J = D(() => r.value ? !_.value.length && U.value === "" : !v.value?.text && U.value === ""), C = D(() => a.value ? !1 : r.value ? _.value.length > 0 : !!s.value), m = (k) => r.value ? _.value.some((w) => w?.toString() === k?.toString()) : s.value?.toString?.() === k?.toString?.(), V = D(() => {
1836
- let k = M.value ?? [];
1837
- if (U.value.trim() !== "") {
1838
- const w = U.value.toLowerCase();
1839
- k = k.filter((O) => O.text?.toLowerCase?.().includes(w));
1822
+ const y = new Map(M.value.map((w) => [w.id?.toString(), w]));
1823
+ return _.value.map((w) => y.get(w?.toString())).filter((w) => !!w);
1824
+ }), h = D(() => t.placeholder || "Select..."), G = D(() => s.value ? !_.value.length && T.value === "" : !v.value?.text && T.value === ""), C = D(() => a.value ? !1 : s.value ? _.value.length > 0 : !!r.value), m = (y) => s.value ? _.value.some((w) => w?.toString() === y?.toString()) : r.value?.toString() === y?.toString(), V = D(() => {
1825
+ let y = M.value ?? [];
1826
+ if (T.value.trim() !== "") {
1827
+ const w = T.value.toLowerCase();
1828
+ y = y.filter((z) => z.text?.toLowerCase?.().includes(w));
1840
1829
  }
1841
- if (r.value && _.value.length) {
1842
- const w = new Set(_.value.map((O) => O?.toString()));
1843
- k = k.filter((O) => !w.has(O.id?.toString()));
1830
+ if (s.value && _.value.length) {
1831
+ const w = new Set(_.value.map((z) => z?.toString()));
1832
+ y = y.filter((z) => !w.has(z.id?.toString()));
1844
1833
  }
1845
- return k;
1846
- }), z = async (k) => {
1847
- if (!l.data || !k) return [];
1834
+ return y;
1835
+ }), E = async (y) => {
1836
+ if (!t.data) return [];
1848
1837
  try {
1849
- const w = `${l.host}/${l.prefix}/suggest/${l.data}?json=1&val=${encodeURIComponent(k)}`;
1850
- return (await fetch(w).then((W) => W.json())).data ?? [];
1838
+ const w = t.api ? t.api : `/suggest/${t.data}`, z = "?json=1", J = y ? `&val=${encodeURIComponent(y)}` : "";
1839
+ return (await fetch(w.concat(z, J)).then((xe) => xe.json())).data ?? [];
1851
1840
  } catch {
1852
1841
  return [];
1853
1842
  }
1854
- }, Z = async () => {
1855
- l.options?.length ? M.value = [...l.options] : l.data && (M.value = await z(U.value));
1856
- }, te = async (k) => {
1857
- if (k == null) return null;
1858
- const w = M.value?.find((W) => W?.id?.toString() === String(k));
1859
- return w || ((await z(String(k)))?.[0] ?? null);
1860
- }, ye = async (k) => {
1861
- const w = new Set(M.value.map((W) => W.id?.toString())), O = k.filter((W) => !w.has(W?.toString()));
1862
- O.length && await O.reduce(async (W, be) => {
1863
- await W;
1864
- const Le = await te(be);
1865
- Le && M.value.push(Le);
1843
+ }, Q = async () => {
1844
+ t.options?.length ? M.value = [...t.options] : t.data && (M.value = await E(T.value));
1845
+ }, te = async (y) => {
1846
+ if (y == null) return null;
1847
+ const w = M.value?.find((J) => J?.id?.toString() === String(y));
1848
+ return w || ((await E(String(y)))?.[0] ?? null);
1849
+ }, ye = async (y) => {
1850
+ const w = new Set(M.value.map((J) => J.id?.toString())), z = y.filter((J) => !w.has(J?.toString()));
1851
+ z.length && await z.reduce(async (J, pe) => {
1852
+ await J;
1853
+ const xe = await te(pe);
1854
+ xe && M.value.push(xe);
1866
1855
  }, Promise.resolve());
1867
- }, we = async () => {
1868
- a.value || (c.value = !0, await Z(), await $e(() => {
1856
+ }, ke = async () => {
1857
+ a.value || (c.value = !0, await Q(), await Ce(() => {
1869
1858
  P.value?.focus(), V.value.length ? I.value = 0 : I.value = -1;
1870
1859
  }));
1871
- }, ie = () => {
1860
+ }, ue = () => {
1872
1861
  c.value = !1, I.value = -1;
1873
- }, Ae = async (k) => {
1862
+ }, ze = async (y) => {
1874
1863
  if (a.value) return;
1875
- !c.value ? await we() : ie();
1876
- }, ke = async () => {
1877
- c.value ? P.value?.focus() : await we();
1864
+ !c.value ? await ke() : ue();
1865
+ }, _e = async () => {
1866
+ c.value ? P.value?.focus() : await ke();
1878
1867
  }, b = () => {
1879
- r.value ? (_.value = [], s.value = [], n("change", [])) : (v.value = null, s.value = null, n("change", null)), U.value = "", $e(() => P.value?.focus());
1880
- }, y = (k) => {
1881
- r.value && (_.value = _.value.filter((w) => w?.toString() !== k?.toString()), s.value = [..._.value], n("change", s.value), $e(() => P.value?.focus()));
1882
- }, T = (k) => {
1883
- r.value ? (m(k.id) || (_.value = [..._.value, k.id], s.value = [..._.value], n("change", s.value)), U.value = "", $e(() => {
1868
+ s.value ? (_.value = [], r.value = [], n("change", [])) : (v.value = null, r.value = null, n("change", null)), T.value = "", Ce(() => P.value?.focus());
1869
+ }, $ = (y) => {
1870
+ s.value && (_.value = _.value.filter((w) => w?.toString() !== y?.toString()), r.value = [..._.value], n("change", r.value), Ce(() => P.value?.focus()));
1871
+ }, O = (y) => {
1872
+ s.value ? (m(y.id) || (_.value = [..._.value, y.id], r.value = [..._.value], n("change", r.value)), T.value = "", Ce(() => {
1884
1873
  P.value?.focus(), I.value = Math.min(I.value, V.value.length - 1);
1885
- })) : (v.value = k, s.value = k.id, n("change", s.value), U.value = "", ie());
1886
- }, N = (k) => {
1887
- m(k.id) || T(k);
1888
- }, ee = (k, w) => {
1889
- if (!k || !w) return;
1890
- const O = k.offsetTop, W = O + k.offsetHeight, be = w.scrollTop, Le = be + w.clientHeight;
1891
- let ze = w.scrollTop;
1892
- O < be ? ze = O - 80 : W > Le && (ze = W - w.clientHeight + 4);
1893
- const it = w;
1894
- it.scrollTop = ze;
1895
- }, _e = async (k) => {
1896
- a.value || !c.value && (k.key === "ArrowDown" || k.key === "ArrowUp") && (k.preventDefault(), await we());
1897
- }, de = (k) => {
1874
+ })) : (v.value = y, r.value = y.id, n("change", r.value), T.value = "", ue());
1875
+ }, N = (y) => {
1876
+ m(y.id) || O(y);
1877
+ }, ee = (y, w) => {
1878
+ if (!y || !w) return;
1879
+ const z = y.offsetTop, J = z + y.offsetHeight, pe = w.scrollTop, xe = pe + w.clientHeight;
1880
+ let Ae = w.scrollTop;
1881
+ z < pe ? Ae = z - 80 : J > xe && (Ae = J - w.clientHeight + 4);
1882
+ const ut = w;
1883
+ ut.scrollTop = Ae;
1884
+ }, $e = async (y) => {
1885
+ a.value || !c.value && (y.key === "ArrowDown" || y.key === "ArrowUp") && (y.preventDefault(), await ke());
1886
+ }, de = (y) => {
1898
1887
  if (!c.value) return;
1899
- const { key: w } = k;
1888
+ const { key: w } = y;
1900
1889
  if (w === "ArrowDown")
1901
- k.preventDefault(), I.value + 1 < V.value.length && (I.value += 1, ee(F.value[I.value], f.value));
1890
+ y.preventDefault(), I.value + 1 < V.value.length && (I.value += 1, ee(U.value[I.value], f.value));
1902
1891
  else if (w === "ArrowUp")
1903
- k.preventDefault(), I.value > 0 && (I.value -= 1, ee(F.value[I.value], f.value));
1892
+ y.preventDefault(), I.value > 0 && (I.value -= 1, ee(U.value[I.value], f.value));
1904
1893
  else if (w === "Enter") {
1905
- k.preventDefault();
1906
- const O = V.value[I.value];
1907
- O && T(O);
1908
- } else w === "Escape" ? (k.preventDefault(), ie()) : w === "Backspace" ? r.value && U.value === "" && _.value.length && (_.value = _.value.slice(0, -1), s.value = [..._.value], n("change", s.value)) : w === "Home" ? (I.value = 0, ee(F.value[0], f.value)) : w === "End" ? (I.value = V.value.length - 1, ee(F.value[I.value], f.value)) : w === "Tab" && ie();
1909
- }, he = () => {
1910
- a.value || (g.value = !0);
1894
+ y.preventDefault();
1895
+ const z = V.value[I.value];
1896
+ z && O(z);
1897
+ } else w === "Escape" ? (y.preventDefault(), ue()) : w === "Backspace" ? s.value && T.value === "" && _.value.length && (_.value = _.value.slice(0, -1), r.value = [..._.value], n("change", r.value)) : w === "Home" ? (I.value = 0, ee(U.value[0], f.value)) : w === "End" ? (I.value = V.value.length - 1, ee(U.value[I.value], f.value)) : w === "Tab" && ue();
1911
1898
  }, ge = () => {
1912
- g.value = !1, U.value = "";
1913
- }, ce = (k) => {
1914
- k.key === "Escape" && c.value && ie();
1915
- }, Ue = (k) => {
1916
- d.value && (d.value.contains(k.target) || ie());
1917
- }, Te = (k) => {
1918
- c.value && f.value && !f.value.contains(k.target) && ie();
1899
+ a.value || (g.value = !0);
1900
+ }, be = () => {
1901
+ g.value = !1, T.value = "";
1902
+ }, ce = (y) => {
1903
+ y.key === "Escape" && c.value && ue();
1904
+ }, Te = (y) => {
1905
+ d.value && (d.value.contains(y.target) || ue());
1906
+ }, Re = (y) => {
1907
+ c.value && f.value && !f.value.contains(y.target) && ue();
1919
1908
  };
1920
- se(() => l.options, (k) => {
1921
- k?.length && (M.value = [...k]);
1909
+ re(() => t.options, (y) => {
1910
+ y?.length && (M.value = [...y]);
1922
1911
  }, { immediate: !0 });
1923
- const Re = async () => {
1924
- if (r.value)
1925
- Array.isArray(s.value) ? _.value = [...s.value] : (_.value = s.value == null ? [] : [s.value], s.value = [..._.value]), !l.options?.length && l.data && await ye(_.value);
1912
+ const Pe = async () => {
1913
+ if (s.value)
1914
+ Array.isArray(r.value) ? _.value = [...r.value] : (_.value = r.value == null ? [] : [r.value], r.value = [..._.value]), !t.options?.length && t.data && await ye(_.value);
1926
1915
  else {
1927
- if (Array.isArray(s.value)) {
1928
- const k = s.value[0] ?? null;
1929
- s.value = k ?? null;
1916
+ if (Array.isArray(r.value)) {
1917
+ const y = r.value[0] ?? null;
1918
+ r.value = y ?? null;
1930
1919
  }
1931
- v.value = await te(s.value);
1920
+ v.value = await te(r.value);
1932
1921
  }
1933
1922
  };
1934
- se(s, () => {
1935
- Re();
1936
- }), ue(async () => {
1937
- addEventListener("keydown", ce), addEventListener("scroll", Te, !0), document.addEventListener("click", Ue, !0), l.options?.length ? M.value = [...l.options] : l.data && (M.value = await z("")), await Re();
1938
- }), et(() => {
1939
- removeEventListener("keydown", ce), removeEventListener("scroll", Te, !0), document.removeEventListener("click", Ue, !0);
1923
+ re(r, () => {
1924
+ Pe();
1925
+ }), ne(async () => {
1926
+ addEventListener("keydown", ce), addEventListener("scroll", Re, !0), document.addEventListener("click", Te, !0), t.options?.length ? M.value = [...t.options] : t.data && (M.value = await E("")), await Pe();
1927
+ }), Fe(() => {
1928
+ removeEventListener("keydown", ce), removeEventListener("scroll", Re, !0), document.removeEventListener("click", Te, !0);
1940
1929
  });
1941
- async function nt() {
1942
- if (!l.add) return;
1943
- const k = await Ve({ form: l.add.form, mode: "add" });
1944
- k && (await fetch(`/api/table/${l.add.token}`, {
1930
+ async function it() {
1931
+ if (!t.add) return;
1932
+ const y = await Le({ form: t.add.form, mode: "add" });
1933
+ y && (await fetch(`/api/table/${t.add.token}`, {
1945
1934
  method: "POST",
1946
1935
  headers: { "Content-Type": "application/json" },
1947
- body: JSON.stringify(k)
1948
- }).then((w) => w.json()), !l.options?.length && l.data && (M.value = await z(U.value)));
1936
+ body: JSON.stringify(y)
1937
+ }).then((w) => w.json()), !t.options?.length && t.data && (M.value = await E(T.value)));
1949
1938
  }
1950
- return (k, w) => (i(), u("div", {
1939
+ return (y, w) => (i(), u("div", {
1951
1940
  class: "flex gap-1 w-full",
1952
1941
  ref_key: "selectRoot",
1953
1942
  ref: d,
1954
- onClick: w[2] || (w[2] = re(() => {
1943
+ onClick: w[2] || (w[2] = se(() => {
1955
1944
  }, ["stop"]))
1956
1945
  }, [
1957
- t("div", {
1958
- class: B(["relative w-full font-sans", l.customClass])
1946
+ l("div", {
1947
+ class: S(["relative w-full font-sans", t.customClass])
1959
1948
  }, [
1960
- w[7] || (w[7] = t("span", {
1949
+ w[7] || (w[7] = l("span", {
1961
1950
  id: "react-select-live-region",
1962
1951
  class: "sr-only"
1963
1952
  }, null, -1)),
1964
- w[8] || (w[8] = t("span", {
1953
+ w[8] || (w[8] = l("span", {
1965
1954
  "aria-live": "polite",
1966
1955
  "aria-atomic": "false",
1967
1956
  "aria-relevant": "additions text",
1968
1957
  role: "log",
1969
1958
  class: "sr-only"
1970
1959
  }, null, -1)),
1971
- t("div", {
1972
- class: B([
1960
+ l("div", {
1961
+ class: S([
1973
1962
  "flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
1974
1963
  "border-gray-300 hover:border-gray-400",
1975
1964
  c.value || g.value ? "border-blue-500 ring-1 ring-blue-500" : "",
@@ -1978,33 +1967,37 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
1978
1967
  role: "combobox",
1979
1968
  "aria-expanded": c.value,
1980
1969
  "aria-haspopup": "listbox",
1981
- onKeydown: _e,
1982
- onClick: ke,
1970
+ onKeydown: $e,
1971
+ onClick: _e,
1983
1972
  "data-focus": c.value || g.value ? "true" : "false"
1984
1973
  }, [
1985
- t("div", {
1986
- class: "flex flex-1 flex-wrap items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",
1974
+ l("div", {
1975
+ class: "flex flex-1 items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",
1987
1976
  ref_key: "triggerRef",
1988
1977
  ref: p
1989
1978
  }, [
1990
- r.value && _.value.length ? (i(!0), u(Q, { key: 0 }, Y(x.value, (O) => (i(), u("div", {
1979
+ s.value && _.value.length ? (i(!0), u(K, { key: 0 }, Y(x.value, (z) => (i(), u("div", {
1991
1980
  class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border",
1992
- key: O.id
1981
+ key: z.id
1993
1982
  }, [
1994
- t("div", ha, [
1995
- O?.color ? (i(), u("span", {
1983
+ l("div", ca, [
1984
+ z?.color ? (i(), u("span", {
1996
1985
  key: 0,
1997
1986
  class: "w-[16px] h-[16px] rounded-md block ml-1.5",
1998
- style: fe({ backgroundColor: O?.color })
1999
- }, null, 4)) : S("", !0),
2000
- t("div", ga, E(O.text), 1)
1987
+ style: ve({ backgroundColor: z?.color })
1988
+ }, null, 4)) : B("", !0),
1989
+ q((i(), u("div", pa, [
1990
+ oe(F(z.text), 1)
1991
+ ])), [
1992
+ [H(qe), z.text]
1993
+ ])
2001
1994
  ]),
2002
- t("div", {
1995
+ l("div", {
2003
1996
  role: "button",
2004
1997
  class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
2005
- onClick: re((W) => y(O.id), ["stop"])
1998
+ onClick: se((J) => $(z.id), ["stop"])
2006
1999
  }, w[3] || (w[3] = [
2007
- t("svg", {
2000
+ l("svg", {
2008
2001
  height: "14",
2009
2002
  width: "14",
2010
2003
  viewBox: "0 0 20 20",
@@ -2012,20 +2005,28 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
2012
2005
  focusable: "false",
2013
2006
  class: "inline-block fill-current stroke-current leading-none stroke-0"
2014
2007
  }, [
2015
- t("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" })
2008
+ 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" })
2016
2009
  ], -1)
2017
- ]), 8, ba)
2018
- ]))), 128)) : !r.value && v.value?.text && U.value === "" ? (i(), u("div", ya, [
2010
+ ]), 8, fa)
2011
+ ]))), 128)) : !s.value && !g.value && v.value?.text && T.value === "" ? q((i(), u("div", {
2012
+ key: 1,
2013
+ class: S(["truncate text-gray-900"]),
2014
+ title: v.value.text
2015
+ }, [
2019
2016
  v.value?.color ? (i(), u("span", {
2020
2017
  key: 0,
2021
- class: "w-[14px] h-[14px] rounded-md block mr-1 mt-0.5",
2022
- style: fe({ backgroundColor: v.value?.color })
2023
- }, null, 4)) : S("", !0),
2024
- oe(" " + E(v.value.text), 1)
2025
- ])) : S("", !0),
2026
- J.value ? (i(), u("div", xa, E(h.value), 1)) : S("", !0),
2027
- t("div", wa, [
2028
- !a.value && k.search ? K((i(), u("input", {
2018
+ class: "w-[14px] h-[14px] rounded-md block mr-1 mt-1 absolute",
2019
+ style: ve({ backgroundColor: v.value?.color })
2020
+ }, null, 4)) : B("", !0),
2021
+ l("span", {
2022
+ class: S({ "pl-5": v.value?.color })
2023
+ }, F(v.value.text), 3)
2024
+ ], 8, va)), [
2025
+ [H(qe), v.value.text]
2026
+ ]) : B("", !0),
2027
+ G.value ? (i(), u("div", ma, F(h.value), 1)) : B("", !0),
2028
+ l("div", ha, [
2029
+ !a.value && y.search ? q((i(), u("input", {
2029
2030
  key: 0,
2030
2031
  ref_key: "inputRef",
2031
2032
  ref: P,
@@ -2037,92 +2038,93 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
2037
2038
  type: "text",
2038
2039
  tabindex: "0",
2039
2040
  "aria-autocomplete": "list",
2040
- placeholder: r.value && _.value.length ? "" : void 0,
2041
- "onUpdate:modelValue": w[0] || (w[0] = (O) => U.value = O),
2042
- onFocus: he,
2043
- onBlur: ge,
2041
+ placeholder: (s.value && _.value.length ? " " : null) || (g.value && !T.value?.length ? v.value?.text : " "),
2042
+ "onUpdate:modelValue": w[0] || (w[0] = (z) => T.value = z),
2043
+ onFocus: ge,
2044
+ onBlur: be,
2044
2045
  onKeydown: de
2045
- }, null, 40, ka)), [
2046
- [ne, U.value]
2047
- ]) : S("", !0)
2046
+ }, null, 40, ga)), [
2047
+ [ie, T.value]
2048
+ ]) : B("", !0)
2048
2049
  ])
2049
2050
  ], 512),
2050
- t("div", _a, [
2051
+ l("div", ba, [
2051
2052
  C.value ? (i(), u("button", {
2052
2053
  key: 0,
2053
2054
  type: "button",
2054
2055
  class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
2055
2056
  "aria-hidden": "true",
2056
2057
  disabled: a.value,
2057
- onClick: re(b, ["stop"])
2058
+ onClick: se(b, ["stop"])
2058
2059
  }, w[4] || (w[4] = [
2059
- t("svg", {
2060
+ l("svg", {
2060
2061
  height: "20",
2061
2062
  width: "20",
2062
2063
  viewBox: "0 0 20 20",
2063
2064
  class: "fill-current"
2064
2065
  }, [
2065
- t("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" })
2066
+ 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" })
2066
2067
  ], -1)
2067
- ]), 8, $a)) : S("", !0),
2068
- w[6] || (w[6] = t("div", { class: "self-stretch w-px bg-[#ccc] my-[1px]" }, null, -1)),
2069
- t("button", {
2068
+ ]), 8, ya)) : B("", !0),
2069
+ w[6] || (w[6] = l("div", { class: "self-stretch w-px bg-[#ccc] my-[1px]" }, null, -1)),
2070
+ l("button", {
2070
2071
  type: "button",
2071
2072
  class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
2072
2073
  "aria-hidden": "true",
2073
2074
  disabled: a.value,
2074
- onClick: w[1] || (w[1] = re((O) => Ae(), ["stop"]))
2075
+ onClick: w[1] || (w[1] = se((z) => ze(), ["stop"]))
2075
2076
  }, w[5] || (w[5] = [
2076
- t("svg", {
2077
+ l("svg", {
2077
2078
  height: "20",
2078
2079
  width: "20",
2079
2080
  viewBox: "0 0 20 20",
2080
2081
  class: "fill-current"
2081
2082
  }, [
2082
- t("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" })
2083
+ 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" })
2083
2084
  ], -1)
2084
- ]), 8, Ca)
2085
+ ]), 8, xa)
2085
2086
  ])
2086
- ], 42, ma),
2087
- c.value ? (i(), u("div", Va, [
2088
- t("div", {
2087
+ ], 42, da),
2088
+ c.value ? (i(), u("div", wa, [
2089
+ l("div", {
2089
2090
  class: "max-h-[300px] overflow-y-auto py-1",
2090
2091
  ref_key: "listRef",
2091
2092
  ref: f
2092
2093
  }, [
2093
- V.value.length ? (i(!0), u(Q, { key: 0 }, Y(V.value, (O, W) => (i(), u("div", {
2094
- key: O.id,
2094
+ V.value.length ? (i(!0), u(K, { key: 0 }, Y(V.value, (z, J) => (i(), u("div", {
2095
+ key: z.id,
2095
2096
  ref_for: !0,
2096
- ref: (be) => F.value[W] = be,
2097
- class: B([
2097
+ ref: (pe) => U.value[J] = pe,
2098
+ class: S([
2098
2099
  "flex px-3 py-2 cursor-default select-none hover:bg-blue-300",
2099
- m(O.id) ? "text-white bg-blue-500" : "text-gray-900 bg-white"
2100
+ I.value === J ? "bg-blue-300" : "",
2101
+ m(z.id) ? "text-white bg-blue-500" : "text-gray-900 bg-white"
2100
2102
  ]),
2101
- "aria-disabled": m(O.id) ? "true" : "false",
2103
+ "aria-disabled": m(z.id) ? "true" : "false",
2102
2104
  role: "option",
2103
2105
  tabindex: "-1",
2104
- onClick: (be) => N(O)
2106
+ onClick: (pe) => N(z)
2105
2107
  }, [
2106
- O?.color ? (i(), u("span", {
2108
+ z?.color ? (i(), u("span", {
2107
2109
  key: 0,
2108
2110
  class: "w-[11px] h-[11px] rounded-full block mr-1 mt-1.5",
2109
- style: fe({ backgroundColor: O?.color })
2110
- }, null, 4)) : S("", !0),
2111
- t("div", {
2112
- class: B([
2111
+ style: ve({ backgroundColor: z?.color })
2112
+ }, null, 4)) : B("", !0),
2113
+ l("div", {
2114
+ class: S([
2113
2115
  "leading-[19px]",
2114
- I.value === O.id ? "text-white" : "",
2116
+ I.value === z.id ? "text-white" : "",
2115
2117
  // active style like react-select
2116
- (I.value === W, "")
2118
+ (I.value === J, "")
2117
2119
  ])
2118
- }, E(O.text), 3)
2119
- ], 10, Ma))), 128)) : (i(), u("div", La, " No options "))
2120
+ }, F(z.text), 3)
2121
+ ], 10, ka))), 128)) : (i(), u("div", _a, " No options "))
2120
2122
  ], 512)
2121
- ])) : S("", !0)
2123
+ ])) : B("", !0)
2122
2124
  ], 2),
2123
- l.add ? (i(), u("button", {
2125
+ t.add ? (i(), u("button", {
2124
2126
  key: 0,
2125
- onClick: nt,
2127
+ onClick: it,
2126
2128
  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",
2127
2129
  disabled: a.value,
2128
2130
  type: "button"
@@ -2131,13 +2133,13 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
2131
2133
  width: "16",
2132
2134
  height: "16"
2133
2135
  }),
2134
- w[9] || (w[9] = t("span", null, "Додати", -1))
2135
- ], 8, Ba)) : S("", !0)
2136
+ w[9] || (w[9] = l("span", null, "Додати", -1))
2137
+ ], 8, $a)) : B("", !0)
2136
2138
  ], 512));
2137
2139
  }
2138
- }), ja = ["placeholder", "disabled"], Ia = /* @__PURE__ */ A({
2140
+ }), Va = ["placeholder", "disabled"], La = /* @__PURE__ */ A({
2139
2141
  __name: "vs-input-textarea",
2140
- props: /* @__PURE__ */ q({
2142
+ props: /* @__PURE__ */ Z({
2141
2143
  style: { default: () => ({}) },
2142
2144
  customClass: { default: "" },
2143
2145
  disabled: { type: Boolean, default: !1 },
@@ -2151,21 +2153,21 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
2151
2153
  }),
2152
2154
  emits: ["update:modelValue"],
2153
2155
  setup(o) {
2154
- const e = o, { inputClass: l } = me(e.style), n = G(o, "modelValue");
2155
- return (r, a) => K((i(), u("textarea", {
2156
- "onUpdate:modelValue": a[0] || (a[0] = (s) => n.value = s),
2157
- placeholder: r.placeholder,
2158
- disabled: r.disabled,
2156
+ const e = o, { inputClass: t } = he(e.style), n = W(o, "modelValue");
2157
+ return (s, a) => q((i(), u("textarea", {
2158
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => n.value = r),
2159
+ placeholder: s.placeholder,
2160
+ disabled: s.disabled,
2159
2161
  row: "2",
2160
- class: B(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto", [H(l)]]),
2162
+ class: S(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto", [H(t)]]),
2161
2163
  style: {
2162
2164
  border: "1px solid #CFD9E0"
2163
2165
  }
2164
- }, null, 10, ja)), [
2165
- [ne, n.value]
2166
+ }, null, 10, Va)), [
2167
+ [ie, n.value]
2166
2168
  ]);
2167
2169
  }
2168
- }), Aa = {}, za = {
2170
+ }), Ma = {}, Sa = {
2169
2171
  xmlns: "http://www.w3.org/2000/svg",
2170
2172
  viewBox: "0 0 24 24",
2171
2173
  fill: "none",
@@ -2175,18 +2177,18 @@ const Vo = /* @__PURE__ */ R(_o, [["render", Co]]), Mo = { class: "flex flex-col
2175
2177
  "stroke-linejoin": "round",
2176
2178
  class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
2177
2179
  };
2178
- function Oa(o, e) {
2179
- return i(), u("svg", za, e[0] || (e[0] = [
2180
- t("path", {
2180
+ function Ba(o, e) {
2181
+ return i(), u("svg", Sa, e[0] || (e[0] = [
2182
+ l("path", {
2181
2183
  stroke: "none",
2182
2184
  d: "M0 0h24v24H0z",
2183
2185
  fill: "none"
2184
2186
  }, null, -1),
2185
- t("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }, null, -1),
2186
- t("path", { d: "M21 21l-6 -6" }, null, -1)
2187
+ l("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }, null, -1),
2188
+ l("path", { d: "M21 21l-6 -6" }, null, -1)
2187
2189
  ]));
2188
2190
  }
2189
- const Ea = /* @__PURE__ */ R(Aa, [["render", Oa]]), Fa = {}, Da = {
2191
+ const ja = /* @__PURE__ */ R(Ma, [["render", Ba]]), Ia = {}, za = {
2190
2192
  class: "flex-shrink-0 mt-0.5 size-3.5",
2191
2193
  xmlns: "http://www.w3.org/2000/svg",
2192
2194
  viewBox: "0 0 24 24",
@@ -2196,15 +2198,15 @@ const Ea = /* @__PURE__ */ R(Aa, [["render", Oa]]), Fa = {}, Da = {
2196
2198
  "stroke-linecap": "round",
2197
2199
  "stroke-linejoin": "round"
2198
2200
  };
2199
- function Ua(o, e) {
2200
- return i(), u("svg", Da, e[0] || (e[0] = [
2201
- t("path", { d: "m3 16 4 4 4-4" }, null, -1),
2202
- t("path", { d: "M7 20V4" }, null, -1),
2203
- t("path", { d: "m21 8-4-4-4 4" }, null, -1),
2204
- t("path", { d: "M17 4v16" }, null, -1)
2201
+ function Aa(o, e) {
2202
+ return i(), u("svg", za, e[0] || (e[0] = [
2203
+ l("path", { d: "m3 16 4 4 4-4" }, null, -1),
2204
+ l("path", { d: "M7 20V4" }, null, -1),
2205
+ l("path", { d: "m21 8-4-4-4 4" }, null, -1),
2206
+ l("path", { d: "M17 4v16" }, null, -1)
2205
2207
  ]));
2206
2208
  }
2207
- const Ta = /* @__PURE__ */ R(Fa, [["render", Ua]]), Ra = {}, Pa = {
2209
+ const Ea = /* @__PURE__ */ R(Ia, [["render", Aa]]), Fa = {}, Oa = {
2208
2210
  xmlns: "http://www.w3.org/2000/svg",
2209
2211
  width: "14",
2210
2212
  height: "14",
@@ -2215,19 +2217,19 @@ const Ta = /* @__PURE__ */ R(Fa, [["render", Ua]]), Ra = {}, Pa = {
2215
2217
  "stroke-linecap": "round",
2216
2218
  "stroke-linejoin": "round"
2217
2219
  };
2218
- function Na(o, e) {
2219
- return i(), u("svg", Pa, e[0] || (e[0] = [
2220
- t("path", {
2220
+ function Da(o, e) {
2221
+ return i(), u("svg", Oa, e[0] || (e[0] = [
2222
+ l("path", {
2221
2223
  stroke: "none",
2222
2224
  d: "M0 0h24v24H0z",
2223
2225
  fill: "none"
2224
2226
  }, null, -1),
2225
- t("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" }, null, -1),
2226
- t("path", { d: "M7 9l5 -5l5 5" }, null, -1),
2227
- t("path", { d: "M12 4l0 12" }, null, -1)
2227
+ l("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" }, null, -1),
2228
+ l("path", { d: "M7 9l5 -5l5 5" }, null, -1),
2229
+ l("path", { d: "M12 4l0 12" }, null, -1)
2228
2230
  ]));
2229
2231
  }
2230
- const Ha = /* @__PURE__ */ R(Ra, [["render", Na]]), qa = {}, Ga = {
2232
+ const Ua = /* @__PURE__ */ R(Fa, [["render", Da]]), Ta = {}, Ra = {
2231
2233
  xmlns: "http://www.w3.org/2000/svg",
2232
2234
  viewBox: "0 0 24 24",
2233
2235
  fill: "none",
@@ -2236,19 +2238,19 @@ const Ha = /* @__PURE__ */ R(Ra, [["render", Na]]), qa = {}, Ga = {
2236
2238
  "stroke-linecap": "round",
2237
2239
  "stroke-linejoin": "round"
2238
2240
  };
2239
- function Ja(o, e) {
2240
- return i(), u("svg", Ga, e[0] || (e[0] = [
2241
- t("path", {
2241
+ function Pa(o, e) {
2242
+ return i(), u("svg", Ra, e[0] || (e[0] = [
2243
+ l("path", {
2242
2244
  stroke: "none",
2243
2245
  d: "M0 0h24v24H0z",
2244
2246
  fill: "none"
2245
2247
  }, null, -1),
2246
- t("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" }, null, -1),
2247
- t("path", { d: "M7 11l5 5l5 -5" }, null, -1),
2248
- t("path", { d: "M12 4l0 12" }, null, -1)
2248
+ l("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" }, null, -1),
2249
+ l("path", { d: "M7 11l5 5l5 -5" }, null, -1),
2250
+ l("path", { d: "M12 4l0 12" }, null, -1)
2249
2251
  ]));
2250
2252
  }
2251
- const Ka = /* @__PURE__ */ R(qa, [["render", Ja]]), Za = {}, Wa = {
2253
+ const Na = /* @__PURE__ */ R(Ta, [["render", Pa]]), Ha = {}, qa = {
2252
2254
  xmlns: "http://www.w3.org/2000/svg",
2253
2255
  viewBox: "0 0 24 24",
2254
2256
  fill: "none",
@@ -2257,22 +2259,22 @@ const Ka = /* @__PURE__ */ R(qa, [["render", Ja]]), Za = {}, Wa = {
2257
2259
  "stroke-linecap": "round",
2258
2260
  "stroke-linejoin": "round"
2259
2261
  };
2260
- function Qa(o, e) {
2261
- return i(), u("svg", Wa, e[0] || (e[0] = [
2262
+ function Ga(o, e) {
2263
+ return i(), u("svg", qa, e[0] || (e[0] = [
2262
2264
  ae('<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)
2263
2265
  ]));
2264
2266
  }
2265
- const Ze = /* @__PURE__ */ R(Za, [["render", Qa]]), Xa = {}, Ya = {
2267
+ const Qe = /* @__PURE__ */ R(Ha, [["render", Ga]]), Ja = {}, Ka = {
2266
2268
  viewBox: "0 0 178 90",
2267
2269
  fill: "none",
2268
2270
  xmlns: "http://www.w3.org/2000/svg"
2269
2271
  };
2270
- function er(o, e) {
2271
- return i(), u("svg", Ya, e[0] || (e[0] = [
2272
+ function Za(o, e) {
2273
+ return i(), u("svg", Ka, e[0] || (e[0] = [
2272
2274
  ae('<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)
2273
2275
  ]));
2274
2276
  }
2275
- const tr = /* @__PURE__ */ R(Xa, [["render", er]]), lr = {}, or = {
2277
+ const Wa = /* @__PURE__ */ R(Ja, [["render", Za]]), Qa = {}, Xa = {
2276
2278
  xmlns: "http://www.w3.org/2000/svg",
2277
2279
  viewBox: "0 0 24 24",
2278
2280
  fill: "none",
@@ -2281,18 +2283,18 @@ const tr = /* @__PURE__ */ R(Xa, [["render", er]]), lr = {}, or = {
2281
2283
  "stroke-linecap": "round",
2282
2284
  "stroke-linejoin": "round"
2283
2285
  };
2284
- function ar(o, e) {
2285
- return i(), u("svg", or, e[0] || (e[0] = [
2286
- t("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)
2286
+ function Ya(o, e) {
2287
+ return i(), u("svg", Xa, e[0] || (e[0] = [
2288
+ 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)
2287
2289
  ]));
2288
2290
  }
2289
- const rr = /* @__PURE__ */ R(lr, [["render", ar]]), sr = { class: "vs-datatable border rounded-xl w-full flex-grow" }, nr = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, ir = { class: "relative w-full" }, ur = { class: "table-wrapper flex gap-2" }, dr = { class: "vs-popover inline-block text-slate-700" }, cr = { class: "text-center" }, pr = { class: "" }, fr = { 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" }, vr = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, mr = { class: "text-sm items-center text-gray-800 flex gap-1" }, hr = { class: "w-full overflow-x-auto" }, gr = { class: "w-full table-auto caption-bottom text-sm" }, br = { class: "[&_tr]:border-b" }, yr = { 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" }, xr = { 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" }, wr = {
2291
+ const es = /* @__PURE__ */ R(Qa, [["render", Ya]]), ts = { class: "vs-datatable border rounded-xl w-full flex-grow" }, ls = { class: "flex items-center npm gap-[16px] justify-between p-[20px] pb-[16px]" }, os = { class: "relative w-full" }, as = { class: "table-wrapper flex gap-2" }, ss = { class: "vs-popover inline-block text-slate-700" }, rs = { class: "text-center" }, ns = { class: "" }, is = { class: "py-1 px-0 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:text-neutral-200 dark:focus:bg-neutral-800 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, us = { class: "flex flex-col p-[1px] gap-[2px] w-[140px]" }, ds = { class: "text-sm items-center text-gray-800 flex gap-1" }, cs = { class: "w-full overflow-x-auto" }, ps = { class: "w-full table-auto caption-bottom text-sm" }, fs = { class: "[&_tr]:border-b" }, vs = { 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" }, hs = {
2290
2292
  key: 0,
2291
2293
  colspan: "100%",
2292
2294
  class: "text-center"
2293
- }, kr = { class: "w-full" }, _r = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, $r = ["onDragstart", "onDragover", "onDrop"], Cr = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, Vr = { class: "flex items-center justify-center" }, Mr = { 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" }, Lr = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]" }, Br = { class: "flex items-center justify-center gap-2" }, Sr = ["onClick"], jr = ["onClick"], Ir = /* @__PURE__ */ A({
2295
+ }, gs = { class: "w-full" }, bs = { class: "p-5 min-h-[200px] flex flex-col justify-center items-center text-center" }, ys = ["onDragstart", "onDragover", "onDrop"], xs = { class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] text-center" }, ws = { class: "flex items-center justify-center" }, ks = { 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" }, _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"], Ls = /* @__PURE__ */ A({
2294
2296
  __name: "vs-input-datatable",
2295
- props: /* @__PURE__ */ q({
2297
+ props: /* @__PURE__ */ Z({
2296
2298
  colModel: {},
2297
2299
  style: {},
2298
2300
  customClass: {},
@@ -2307,109 +2309,109 @@ const rr = /* @__PURE__ */ R(lr, [["render", ar]]), sr = { class: "vs-datatable
2307
2309
  }),
2308
2310
  emits: ["update:modelValue"],
2309
2311
  setup(o) {
2310
- const e = o, l = G(o, "modelValue"), n = $({}), r = $(""), a = D(() => {
2311
- if (!r.value) return l.value ?? [];
2312
- const C = r.value.toLowerCase();
2313
- return l.value.filter((m) => e.colModel?.some((V) => {
2314
- const z = m[V.key];
2315
- return z ? Array.isArray(z) ? z.join(", ").toLowerCase().includes(C) : String(z).toLowerCase().includes(C) : !1;
2312
+ const e = o, t = W(o, "modelValue"), n = k({}), s = k(""), a = D(() => {
2313
+ if (!s.value) return t.value ?? [];
2314
+ const C = s.value.toLowerCase();
2315
+ return t.value.filter((m) => e.colModel?.some((V) => {
2316
+ const E = m[V.key];
2317
+ return E ? Array.isArray(E) ? E.join(", ").toLowerCase().includes(C) : String(E).toLowerCase().includes(C) : !1;
2316
2318
  }));
2317
- }), s = $(null), d = $(null), p = $(!1), f = $(null), c = $({ top: 0, left: 0 }), g = (C) => {
2318
- s.value = C;
2319
+ }), r = k(null), d = k(null), p = k(!1), f = k(null), c = k({ top: 0, left: 0 }), g = (C) => {
2320
+ r.value = C;
2319
2321
  }, v = (C) => {
2320
2322
  d.value = C;
2321
2323
  }, M = (C) => {
2322
- if (s.value === null || s.value === C) {
2323
- s.value = null, d.value = null;
2324
+ if (r.value === null || r.value === C) {
2325
+ r.value = null, d.value = null;
2324
2326
  return;
2325
2327
  }
2326
- const m = [...l.value], [V] = m.splice(s.value, 1);
2327
- m.splice(C, 0, V), l.value = m, s.value = null, d.value = null;
2328
+ const m = [...t.value], [V] = m.splice(r.value, 1);
2329
+ m.splice(C, 0, V), t.value = m, r.value = null, d.value = null;
2328
2330
  }, I = (C) => {
2329
2331
  const V = C.currentTarget.getBoundingClientRect();
2330
2332
  c.value = { top: V.bottom + window.scrollY, left: V.left + window.scrollX }, p.value = !p.value;
2331
- }, F = () => {
2333
+ }, U = () => {
2332
2334
  f.value && f.value.click();
2333
- }, U = (C) => {
2335
+ }, T = (C) => {
2334
2336
  const V = C.target.files?.[0];
2335
2337
  if (!V) return;
2336
- const z = new FileReader();
2337
- z.onload = (Z) => {
2338
+ const E = new FileReader();
2339
+ E.onload = (Q) => {
2338
2340
  try {
2339
- const te = Z.target?.result;
2341
+ const te = Q.target?.result;
2340
2342
  if (typeof te == "string") {
2341
2343
  const ye = JSON.parse(te);
2342
- Array.isArray(ye) && l.value.push(...ye);
2344
+ Array.isArray(ye) && t.value.push(...ye);
2343
2345
  }
2344
2346
  } catch (te) {
2345
2347
  console.error("Error parsing file:", te);
2346
2348
  }
2347
- }, z.readAsText(V);
2349
+ }, E.readAsText(V);
2348
2350
  }, P = () => {
2349
- const C = JSON.stringify(l.value, null, 2), m = new Blob([C], { type: "application/json" }), V = URL.createObjectURL(m), z = document.createElement("a");
2350
- z.href = V, z.download = "data.json", z.click(), URL.revokeObjectURL(V);
2351
+ const C = JSON.stringify(t.value, null, 2), m = new Blob([C], { type: "application/json" }), V = URL.createObjectURL(m), E = document.createElement("a");
2352
+ E.href = V, E.download = "data.json", E.click(), URL.revokeObjectURL(V);
2351
2353
  };
2352
- ue(async () => {
2354
+ ne(async () => {
2353
2355
  const C = e.colModel?.filter((m) => m.data);
2354
2356
  C?.length && Promise.all(C.map(async (m) => {
2355
2357
  n.value[m.key] = await fetch(`/api/suggest/${m.data}`).then((V) => V.json());
2356
2358
  }));
2357
2359
  });
2358
2360
  async function _() {
2359
- const C = await Ve({
2361
+ const C = await Le({
2360
2362
  schema: e.colModel,
2361
2363
  mode: "add"
2362
2364
  });
2363
- C && (Array.isArray(l.value) ? l.value = [...l.value, C] : l.value = [C]);
2365
+ C && (Array.isArray(t.value) ? t.value = [...t.value, C] : t.value = [C]);
2364
2366
  }
2365
2367
  function x(C, m) {
2366
2368
  return n.value[m.key] && C[m.key] ? n.value[m.key].find((V) => V.id.toString() === C[m.key].toString())?.text ?? C[m.key] : C[m.key] || "-";
2367
2369
  }
2368
2370
  async function h(C, m) {
2369
- const V = await Ve({
2371
+ const V = await Le({
2370
2372
  schema: e.colModel,
2371
2373
  mode: "add",
2372
2374
  defaultValue: C
2373
2375
  });
2374
- V && (l.value = l.value.map((z, Z) => Z === m ? V : z));
2376
+ V && (t.value = t.value.map((E, Q) => Q === m ? V : E));
2375
2377
  }
2376
- function J(C) {
2377
- l.value = l.value.filter((m, V) => V !== C);
2378
+ function G(C) {
2379
+ t.value = t.value.filter((m, V) => V !== C);
2378
2380
  }
2379
- return (C, m) => (i(), u("div", sr, [
2380
- t("div", nr, [
2381
- t("div", ir, [
2382
- j(Ea, {
2381
+ return (C, m) => (i(), u("div", ts, [
2382
+ l("div", ls, [
2383
+ l("div", os, [
2384
+ j(ja, {
2383
2385
  width: "14",
2384
2386
  height: "14",
2385
2387
  class: "absolute left-3 top-1/2 transform -translate-y-1/2 text-stone-500"
2386
2388
  }),
2387
- K(t("input", {
2389
+ q(l("input", {
2388
2390
  type: "text",
2389
- "onUpdate:modelValue": m[0] || (m[0] = (V) => r.value = V),
2391
+ "onUpdate:modelValue": m[0] || (m[0] = (V) => s.value = V),
2390
2392
  placeholder: "Пошук",
2391
2393
  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"
2392
2394
  }, null, 512), [
2393
- [ne, r.value]
2395
+ [ie, s.value]
2394
2396
  ])
2395
2397
  ]),
2396
- t("div", ur, [
2397
- t("input", {
2398
+ l("div", as, [
2399
+ l("input", {
2398
2400
  ref_key: "fileInput",
2399
2401
  ref: f,
2400
- onChange: U,
2402
+ onChange: T,
2401
2403
  class: "hidden",
2402
2404
  accept: ".json",
2403
2405
  type: "file"
2404
2406
  }, null, 544),
2405
- t("div", dr, [
2406
- t("div", cr, [
2407
- t("div", pr, [
2408
- t("button", {
2407
+ l("div", ss, [
2408
+ l("div", rs, [
2409
+ l("div", ns, [
2410
+ l("button", {
2409
2411
  onClick: I,
2410
2412
  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"
2411
2413
  }, [
2412
- j(Ta, {
2414
+ j(Ea, {
2413
2415
  height: "16",
2414
2416
  width: "16"
2415
2417
  })
@@ -2418,31 +2420,31 @@ const rr = /* @__PURE__ */ R(lr, [["render", ar]]), sr = { class: "vs-datatable
2418
2420
  ])
2419
2421
  ])
2420
2422
  ]),
2421
- (i(), X(ft, { to: "body" }, [
2423
+ (i(), X(pt, { to: "body" }, [
2422
2424
  p.value ? (i(), u("div", {
2423
2425
  key: 0,
2424
2426
  class: "text-slate-700 vsTailwind vs-popover__content bottom",
2425
- style: fe([{ width: "fit-content", "z-index": "10002", position: "fixed" }, { position: "absolute", top: c.value.top + "px", left: c.value.left + "px" }])
2427
+ style: ve([{ width: "fit-content", "z-index": "10002", position: "fixed" }, { position: "absolute", top: c.value.top + "px", left: c.value.left + "px" }])
2426
2428
  }, [
2427
- t("div", fr, [
2428
- t("div", vr, [
2429
- t("button", {
2430
- onClick: F,
2429
+ l("div", is, [
2430
+ l("div", us, [
2431
+ l("button", {
2432
+ onClick: U,
2431
2433
  class: "text-slate-700 flex items-center gap-1 px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
2432
2434
  }, [
2433
- j(Ha, {
2435
+ j(Ua, {
2434
2436
  class: "text-black",
2435
2437
  width: "14",
2436
2438
  height: "14"
2437
2439
  }),
2438
2440
  m[1] || (m[1] = oe(" Імпортувати "))
2439
2441
  ]),
2440
- t("button", {
2442
+ l("button", {
2441
2443
  onClick: P,
2442
2444
  class: "text-slate-700 flex items-center px-3 py-2 rounded-md cursor-pointer group hover:bg-gray-100"
2443
2445
  }, [
2444
- t("span", mr, [
2445
- j(Ka, {
2446
+ l("span", ds, [
2447
+ j(Na, {
2446
2448
  class: "text-black",
2447
2449
  width: "14",
2448
2450
  height: "14"
@@ -2452,9 +2454,9 @@ const rr = /* @__PURE__ */ R(lr, [["render", ar]]), sr = { class: "vs-datatable
2452
2454
  ])
2453
2455
  ])
2454
2456
  ])
2455
- ], 4)) : S("", !0)
2457
+ ], 4)) : B("", !0)
2456
2458
  ])),
2457
- t("button", {
2459
+ l("button", {
2458
2460
  onClick: _,
2459
2461
  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"
2460
2462
  }, [
@@ -2462,78 +2464,78 @@ const rr = /* @__PURE__ */ R(lr, [["render", ar]]), sr = { class: "vs-datatable
2462
2464
  m[3] || (m[3] = oe(" Додати "))
2463
2465
  ])
2464
2466
  ]),
2465
- t("div", hr, [
2466
- t("table", gr, [
2467
- t("thead", br, [
2468
- t("tr", yr, [
2469
- t("th", xr, [
2470
- j(Ze, {
2467
+ l("div", cs, [
2468
+ l("table", ps, [
2469
+ l("thead", fs, [
2470
+ l("tr", vs, [
2471
+ l("th", ms, [
2472
+ j(Qe, {
2471
2473
  width: "24",
2472
2474
  height: "24",
2473
2475
  class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
2474
2476
  })
2475
2477
  ]),
2476
- (i(!0), u(Q, null, Y(C.colModel, (V) => (i(), u("th", {
2478
+ (i(!0), u(K, null, Y(C.colModel, (V) => (i(), u("th", {
2477
2479
  key: V.key,
2478
2480
  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]"
2479
- }, E(V.ua || V.label), 1))), 128)),
2480
- m[4] || (m[4] = t("th", { class: "h-10 px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 text-center" }, " Дії ", -1))
2481
+ }, F(V.ua || V.label), 1))), 128)),
2482
+ m[4] || (m[4] = l("th", { class: "h-10 px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] font-semibold text-slate-700 dark:text-slate-300 text-center" }, " Дії ", -1))
2481
2483
  ])
2482
2484
  ]),
2483
- t("tbody", {
2484
- class: B({ "[&_tr:last-child]:border-0": !d.value })
2485
+ l("tbody", {
2486
+ class: S({ "[&_tr:last-child]:border-0": !d.value })
2485
2487
  }, [
2486
- a.value.length === 0 ? (i(), u("td", wr, [
2487
- t("div", kr, [
2488
- t("div", _r, [
2489
- j(tr, { class: "w-48 mx-auto" }),
2490
- m[5] || (m[5] = t("div", { class: "max-w-sm mx-auto mt-6" }, [
2491
- t("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "Нічого не знайдено"),
2492
- t("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
2488
+ a.value.length === 0 ? (i(), u("td", hs, [
2489
+ l("div", gs, [
2490
+ l("div", bs, [
2491
+ j(Wa, { class: "w-48 mx-auto" }),
2492
+ m[5] || (m[5] = l("div", { class: "max-w-sm mx-auto mt-6" }, [
2493
+ l("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "Нічого не знайдено"),
2494
+ l("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
2493
2495
  ], -1))
2494
2496
  ])
2495
2497
  ])
2496
- ])) : S("", !0),
2497
- (i(!0), u(Q, null, Y(a.value, (V, z) => (i(), u("tr", {
2498
+ ])) : B("", !0),
2499
+ (i(!0), u(K, null, Y(a.value, (V, E) => (i(), u("tr", {
2498
2500
  key: V.id,
2499
- class: B(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move", {
2500
- "opacity-50": s.value === z,
2501
- "border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20": d.value === z
2501
+ class: S(["border-b data-[state=selected]:bg-muted transition-all duration-200 hover:bg-slate-50/60 dark:hover:bg-slate-700/60 cursor-move", {
2502
+ "opacity-50": r.value === E,
2503
+ "border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20": d.value === E
2502
2504
  }]),
2503
2505
  draggable: "true",
2504
- onDragstart: (Z) => g(z),
2505
- onDragover: re((Z) => v(z), ["prevent"]),
2506
- onDrop: (Z) => M(z)
2506
+ onDragstart: (Q) => g(E),
2507
+ onDragover: se((Q) => v(E), ["prevent"]),
2508
+ onDrop: (Q) => M(E)
2507
2509
  }, [
2508
- t("td", Cr, [
2509
- t("div", Vr, [
2510
- j(Ze, {
2510
+ l("td", xs, [
2511
+ l("div", ws, [
2512
+ j(Qe, {
2511
2513
  width: "24",
2512
2514
  height: "24",
2513
2515
  class: "w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"
2514
2516
  })
2515
2517
  ])
2516
2518
  ]),
2517
- (i(!0), u(Q, null, Y(C.colModel, (Z) => (i(), u("td", {
2518
- key: Z.key,
2519
+ (i(!0), u(K, null, Y(C.colModel, (Q) => (i(), u("td", {
2520
+ key: Q.key,
2519
2521
  class: "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]"
2520
2522
  }, [
2521
- t("div", Mr, E(x(V, Z)), 1)
2523
+ l("div", ks, F(x(V, Q)), 1)
2522
2524
  ]))), 128)),
2523
- t("td", Lr, [
2524
- t("div", Br, [
2525
- t("button", {
2526
- onClick: (Z) => h(V, z),
2525
+ l("td", _s, [
2526
+ l("div", $s, [
2527
+ l("button", {
2528
+ onClick: (Q) => h(V, E),
2527
2529
  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"
2528
2530
  }, [
2529
- j(rr, {
2531
+ j(es, {
2530
2532
  width: "24",
2531
2533
  height: "24",
2532
2534
  class: "w-3 h-3"
2533
2535
  })
2534
- ], 8, Sr),
2535
- t("button", {
2536
- onClick: (Z) => J(z),
2536
+ ], 8, Cs),
2537
+ l("button", {
2538
+ onClick: (Q) => G(E),
2537
2539
  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"
2538
2540
  }, [
2539
2541
  j(Ie, {
@@ -2541,16 +2543,16 @@ const rr = /* @__PURE__ */ R(lr, [["render", ar]]), sr = { class: "vs-datatable
2541
2543
  height: "24",
2542
2544
  class: "w-3 h-3"
2543
2545
  })
2544
- ], 8, jr)
2546
+ ], 8, Vs)
2545
2547
  ])
2546
2548
  ])
2547
- ], 42, $r))), 128))
2549
+ ], 42, ys))), 128))
2548
2550
  ], 2)
2549
2551
  ])
2550
2552
  ])
2551
2553
  ]));
2552
2554
  }
2553
- }), Ar = {
2555
+ }), Ms = {
2554
2556
  draw: {
2555
2557
  toolbar: {
2556
2558
  actions: {
@@ -2658,7 +2660,7 @@ const rr = /* @__PURE__ */ R(lr, [["render", ar]]), sr = { class: "vs-datatable
2658
2660
  }
2659
2661
  }
2660
2662
  };
2661
- function zr(o) {
2663
+ function Ss(o) {
2662
2664
  return o ? o.type === "FeatureCollection" || o.type === "Feature" ? o : o.geom ? {
2663
2665
  type: "Feature",
2664
2666
  geometry: {
@@ -2672,7 +2674,7 @@ function zr(o) {
2672
2674
  properties: {}
2673
2675
  } : null : null;
2674
2676
  }
2675
- const Or = {}, Er = {
2677
+ const Bs = {}, js = {
2676
2678
  xmlns: "http://www.w3.org/2000/svg",
2677
2679
  viewBox: "0 0 24 24",
2678
2680
  stroke: "currentColor",
@@ -2682,18 +2684,18 @@ const Or = {}, Er = {
2682
2684
  "stroke-linejoin": "round",
2683
2685
  class: "icon icon-tabler icons-tabler-outline icon-tabler-map-pin"
2684
2686
  };
2685
- function Fr(o, e) {
2686
- return i(), u("svg", Er, e[0] || (e[0] = [
2687
- t("path", {
2687
+ function Is(o, e) {
2688
+ return i(), u("svg", js, e[0] || (e[0] = [
2689
+ l("path", {
2688
2690
  stroke: "none",
2689
2691
  d: "M0 0h24v24H0z",
2690
2692
  fill: "none"
2691
2693
  }, null, -1),
2692
- t("path", { d: "M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" }, null, -1),
2693
- t("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)
2694
+ l("path", { d: "M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" }, null, -1),
2695
+ 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)
2694
2696
  ]));
2695
2697
  }
2696
- const Dr = /* @__PURE__ */ R(Or, [["render", Fr]]), Ur = {}, Tr = {
2698
+ const zs = /* @__PURE__ */ R(Bs, [["render", Is]]), As = {}, Es = {
2697
2699
  xmlns: "http://www.w3.org/2000/svg",
2698
2700
  viewBox: "0 0 24 24",
2699
2701
  fill: "none",
@@ -2703,19 +2705,19 @@ const Dr = /* @__PURE__ */ R(Or, [["render", Fr]]), Ur = {}, Tr = {
2703
2705
  "stroke-linejoin": "round",
2704
2706
  class: "icon icon-tabler icons-tabler-outline icon-tabler-line"
2705
2707
  };
2706
- function Rr(o, e) {
2707
- return i(), u("svg", Tr, e[0] || (e[0] = [
2708
- t("path", {
2708
+ function Fs(o, e) {
2709
+ return i(), u("svg", Es, e[0] || (e[0] = [
2710
+ l("path", {
2709
2711
  stroke: "none",
2710
2712
  d: "M0 0h24v24H0z",
2711
2713
  fill: "none"
2712
2714
  }, null, -1),
2713
- t("path", { d: "M6 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, null, -1),
2714
- t("path", { d: "M18 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, null, -1),
2715
- t("path", { d: "M7.5 16.5l9 -9" }, null, -1)
2715
+ l("path", { d: "M6 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, null, -1),
2716
+ l("path", { d: "M18 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, null, -1),
2717
+ l("path", { d: "M7.5 16.5l9 -9" }, null, -1)
2716
2718
  ]));
2717
2719
  }
2718
- const Pr = /* @__PURE__ */ R(Ur, [["render", Rr]]), Nr = {}, Hr = {
2720
+ const Os = /* @__PURE__ */ R(As, [["render", Fs]]), Ds = {}, Us = {
2719
2721
  xmlns: "http://www.w3.org/2000/svg",
2720
2722
  viewBox: "0 0 24 24",
2721
2723
  fill: "none",
@@ -2725,12 +2727,12 @@ const Pr = /* @__PURE__ */ R(Ur, [["render", Rr]]), Nr = {}, Hr = {
2725
2727
  "stroke-linejoin": "round",
2726
2728
  class: "icon icon-tabler icons-tabler-outline icon-tabler-polygon"
2727
2729
  };
2728
- function qr(o, e) {
2729
- return i(), u("svg", Hr, e[0] || (e[0] = [
2730
+ function Ts(o, e) {
2731
+ return i(), u("svg", Us, e[0] || (e[0] = [
2730
2732
  ae('<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)
2731
2733
  ]));
2732
2734
  }
2733
- const Gr = /* @__PURE__ */ R(Nr, [["render", qr]]), Jr = {}, Kr = {
2735
+ const Rs = /* @__PURE__ */ R(Ds, [["render", Ts]]), Ps = {}, Ns = {
2734
2736
  xmlns: "http://www.w3.org/2000/svg",
2735
2737
  viewBox: "0 0 24 24",
2736
2738
  fill: "none",
@@ -2740,12 +2742,12 @@ const Gr = /* @__PURE__ */ R(Nr, [["render", qr]]), Jr = {}, Kr = {
2740
2742
  "stroke-linejoin": "round",
2741
2743
  class: "icon icon-tabler icons-tabler-outline icon-tabler-topology-ring-3"
2742
2744
  };
2743
- function Zr(o, e) {
2744
- return i(), u("svg", Kr, e[0] || (e[0] = [
2745
+ function Hs(o, e) {
2746
+ return i(), u("svg", Ns, e[0] || (e[0] = [
2745
2747
  ae('<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)
2746
2748
  ]));
2747
2749
  }
2748
- const Wr = /* @__PURE__ */ R(Jr, [["render", Zr]]), Qr = {}, Xr = {
2750
+ const qs = /* @__PURE__ */ R(Ps, [["render", Hs]]), Gs = {}, Js = {
2749
2751
  version: "1.1",
2750
2752
  viewBox: "0 0 14 14",
2751
2753
  xmlns: "http://www.w3.org/2000/svg",
@@ -2753,28 +2755,28 @@ const Wr = /* @__PURE__ */ R(Jr, [["render", Zr]]), Qr = {}, Xr = {
2753
2755
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
2754
2756
  class: "fullscreen-icon"
2755
2757
  };
2756
- function Yr(o, e) {
2757
- return i(), u("svg", Xr, e[0] || (e[0] = [
2758
- t("title", null, null, -1),
2759
- t("desc", null, null, -1),
2760
- t("defs", null, null, -1),
2761
- t("g", {
2758
+ function Ks(o, e) {
2759
+ return i(), u("svg", Js, e[0] || (e[0] = [
2760
+ l("title", null, null, -1),
2761
+ l("desc", null, null, -1),
2762
+ l("defs", null, null, -1),
2763
+ l("g", {
2762
2764
  fill: "none",
2763
2765
  "fill-rule": "evenodd",
2764
2766
  id: "Page-1",
2765
2767
  stroke: "none",
2766
2768
  "stroke-width": "1"
2767
2769
  }, [
2768
- t("g", {
2770
+ l("g", {
2769
2771
  fill: "#000000",
2770
2772
  id: "Core",
2771
2773
  transform: "translate(-215.000000, -257.000000)"
2772
2774
  }, [
2773
- t("g", {
2775
+ l("g", {
2774
2776
  id: "fullscreen",
2775
2777
  transform: "translate(215.000000, 257.000000)"
2776
2778
  }, [
2777
- t("path", {
2779
+ l("path", {
2778
2780
  d: "M2,9 L0,9 L0,14 L5,14 L5,12 L2,12 L2,9 L2,9 Z M0,5 L2,5 L2,2 L5,2 L5,0 L0,0 L0,5 L0,5 Z M12,12 L9,12 L9,14 L14,14 L14,9 L12,9 L12,12 L12,12 Z M9,0 L9,2 L12,2 L12,5 L14,5 L14,0 L9,0 L9,0 Z",
2779
2781
  id: "Shape"
2780
2782
  })
@@ -2783,10 +2785,10 @@ function Yr(o, e) {
2783
2785
  ], -1)
2784
2786
  ]));
2785
2787
  }
2786
- const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__search" }, ls = { class: "map-search__input" }, os = { class: "flex flex-nowrap relative" }, as = { class: "form-autocomplete relative min-w-[6rem] vsTailwind map-search__select hidden" }, rs = { class: "flex items-center w-full" }, ss = { class: "max-w-[90%] truncate" }, ns = {
2788
+ const Zs = /* @__PURE__ */ R(Gs, [["render", Ks]]), Ws = { class: "form-geom__search" }, Qs = { class: "map-search__input" }, Xs = { class: "flex flex-nowrap relative" }, Ys = { class: "form-autocomplete relative min-w-[6rem] vsTailwind map-search__select hidden" }, er = { class: "flex items-center w-full" }, tr = { class: "max-w-[90%] truncate" }, lr = {
2787
2789
  key: 0,
2788
2790
  class: "absolute z-[3100] mt-0.5 left-0 right-0"
2789
- }, is = { class: "form-autocomplete__wrapper mt-[10px] z-50 w-full min-w-36 max-h-72 p-0 space-y-0.5 bg-white rounded-xl shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:bg-neutral-900 top-full opened" }, us = { class: "form-autocomplete__list vsTailwind px-2 pb-2 pt-0 max-h-200 relative [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-900" }, ds = ["onClick"], cs = { class: "flex justify-between items-center w-full" }, ps = { class: "flex items-center" }, fs = {
2791
+ }, or = { class: "form-autocomplete__wrapper mt-[10px] z-50 w-full min-w-36 max-h-72 p-0 space-y-0.5 bg-white rounded-xl shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:bg-neutral-900 top-full opened" }, ar = { class: "form-autocomplete__list vsTailwind px-2 pb-2 pt-0 max-h-200 relative [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-900" }, sr = ["onClick"], rr = { class: "flex justify-between items-center w-full" }, nr = { class: "flex items-center" }, ir = {
2790
2792
  key: 0,
2791
2793
  class: "flex-shrink-0 w-3.5 h-3.5 text-blue-600",
2792
2794
  width: "24",
@@ -2797,94 +2799,94 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
2797
2799
  "stroke-width": "2",
2798
2800
  "stroke-linecap": "round",
2799
2801
  "stroke-linejoin": "round"
2800
- }, vs = { class: "relative w-full" }, ms = { class: "vs-form-text relative bg-white rounded-lg" }, hs = {
2802
+ }, ur = { class: "relative w-full" }, dr = { class: "vs-form-text relative bg-white rounded-lg" }, cr = {
2801
2803
  key: 1,
2802
2804
  class: "absolute left-0 right-0 top-full z-[3200] bg-white border border-gray-200 rounded-b-lg shadow-lg max-h-72 overflow-auto"
2803
- }, gs = { key: 0 }, bs = ["onClick"], ys = {
2805
+ }, pr = { key: 0 }, fr = ["onClick"], vr = {
2804
2806
  key: 1,
2805
2807
  class: "px-3 py-2 text-xs text-gray-500"
2806
- }, xs = {
2808
+ }, mr = {
2807
2809
  key: 2,
2808
2810
  class: "px-3 py-2 text-xs text-gray-400"
2809
- }, ws = /* @__PURE__ */ A({
2811
+ }, hr = /* @__PURE__ */ A({
2810
2812
  __name: "map-search",
2811
2813
  props: {
2812
2814
  placeholder: { default: "50, 30" }
2813
2815
  },
2814
2816
  emits: ["goToCoordinates"],
2815
2817
  setup(o, { emit: e }) {
2816
- const l = e, n = $(!1), r = $("coordinates"), a = $(""), s = $([]), d = $(!1), p = $(!1);
2818
+ const t = e, n = k(!1), s = k("coordinates"), a = k(""), r = k([]), d = k(!1), p = k(!1);
2817
2819
  let f;
2818
2820
  const c = [
2819
2821
  { value: "coordinates", label: "Пошук по кординатам" },
2820
2822
  { value: "atu", label: "АТУ" },
2821
2823
  { value: "address", label: "Адресса" },
2822
2824
  { value: "search_here", label: "Пошук HERE" }
2823
- ], g = D(() => c.find((_) => _.value === r.value)?.label ?? "АТУ");
2825
+ ], g = D(() => c.find((_) => _.value === s.value)?.label ?? "АТУ");
2824
2826
  function v(_) {
2825
- r.value = _.value, n.value = !1, a.value = "", a.value && F();
2827
+ s.value = _.value, n.value = !1, a.value = "", a.value && U();
2826
2828
  }
2827
2829
  function M(_) {
2828
2830
  _.target.closest(".map-search__input") || (n.value = !1);
2829
2831
  }
2830
- ue(() => document.addEventListener("click", M)), et(() => document.removeEventListener("click", M));
2832
+ ne(() => document.addEventListener("click", M)), Fe(() => document.removeEventListener("click", M));
2831
2833
  async function I(_) {
2832
2834
  let x;
2833
- r.value === "atu" ? x = "/api/suggest/atu.nsdi.ato_level" : r.value === "address" ? x = "/api/suggest/map.address_id" : r.value === "search_here" && (x = "/api/gis-url-proxy");
2835
+ s.value === "atu" ? x = "/api/suggest/atu.nsdi.ato_level" : s.value === "address" ? x = "/api/suggest/map.address_id" : s.value === "search_here" && (x = "/api/gis-url-proxy");
2834
2836
  const h = new URL(x || "");
2835
- return r.value === "search_here" ? h.searchParams.set("searchtext", _) : (r.value === "atu" || r.value === "address") && h.searchParams.set("key", _), h.searchParams.set("limit", "20"), h.searchParams.set("q", _), (await fetch(h.toString())).json();
2837
+ return s.value === "search_here" ? h.searchParams.set("searchtext", _) : (s.value === "atu" || s.value === "address") && h.searchParams.set("key", _), h.searchParams.set("limit", "20"), h.searchParams.set("q", _), (await fetch(h.toString())).json();
2836
2838
  }
2837
- function F() {
2838
- if (d.value = !0, p.value = !0, r.value === "coordinates") {
2839
+ function U() {
2840
+ if (d.value = !0, p.value = !0, s.value === "coordinates") {
2839
2841
  const _ = a.value.trim().split(",");
2840
2842
  if (_.length === 2) {
2841
2843
  const x = parseFloat(_[0]), h = parseFloat(_[1]);
2842
- !Number.isNaN(x) && !Number.isNaN(h) && l("goToCoordinates", [x, h]);
2844
+ !Number.isNaN(x) && !Number.isNaN(h) && t("goToCoordinates", [x, h]);
2843
2845
  }
2844
2846
  return;
2845
2847
  }
2846
2848
  f && window.clearTimeout(f), f = window.setTimeout(async () => {
2847
2849
  const _ = a.value.trim();
2848
2850
  if (!_) {
2849
- s.value = [], p.value = !1;
2851
+ r.value = [], p.value = !1;
2850
2852
  return;
2851
2853
  }
2852
2854
  try {
2853
2855
  const x = await I(_);
2854
- s.value = Array.isArray(x.features) ? x.features : [];
2856
+ r.value = Array.isArray(x.features) ? x.features : [];
2855
2857
  } catch {
2856
- s.value = [];
2858
+ r.value = [];
2857
2859
  } finally {
2858
2860
  p.value = !1;
2859
2861
  }
2860
2862
  }, 300);
2861
2863
  }
2862
- function U() {
2863
- a.value = "", s.value = [], d.value = !1, p.value = !1;
2864
+ function T() {
2865
+ a.value = "", r.value = [], d.value = !1, p.value = !1;
2864
2866
  }
2865
2867
  function P(_) {
2866
- l("goToCoordinates", _), d.value = !1, p.value = !1, s.value = [];
2868
+ t("goToCoordinates", _), d.value = !1, p.value = !1, r.value = [];
2867
2869
  }
2868
- return (_, x) => (i(), u("div", ts, [
2869
- t("div", ls, [
2870
- t("div", os, [
2871
- t("div", as, [
2872
- t("button", {
2870
+ return (_, x) => (i(), u("div", Ws, [
2871
+ l("div", Qs, [
2872
+ l("div", Xs, [
2873
+ l("div", Ys, [
2874
+ l("button", {
2873
2875
  type: "button",
2874
2876
  onClick: x[0] || (x[0] = (h) => n.value = !n.value),
2875
2877
  class: "h-[40px] relative px-4 pe-9 flex text-nowrap w-full cursor-pointer bg-white border border-solid border-stone-200 rounded-lg text-start text-sm text-stone-800 focus:outline-none focus:ring-1 focus:ring-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200"
2876
2878
  }, [
2877
- t("div", rs, [
2878
- t("span", ss, E(g.value), 1)
2879
+ l("div", er, [
2880
+ l("span", tr, F(g.value), 1)
2879
2881
  ]),
2880
- x[3] || (x[3] = t("svg", {
2882
+ x[3] || (x[3] = l("svg", {
2881
2883
  class: "stroke-gray-500 absolute right-3 translate-y-1/2 bottom-1/2",
2882
2884
  width: "15",
2883
2885
  height: "15",
2884
2886
  viewBox: "0 0 24 24",
2885
2887
  fill: "none"
2886
2888
  }, [
2887
- t("path", {
2889
+ l("path", {
2888
2890
  d: "M6 9l6 6 6-6",
2889
2891
  "stroke-width": "2",
2890
2892
  "stroke-linecap": "round",
@@ -2892,44 +2894,44 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
2892
2894
  })
2893
2895
  ], -1))
2894
2896
  ]),
2895
- n.value ? (i(), u("div", ns, [
2896
- t("div", is, [
2897
- t("div", us, [
2898
- (i(), u(Q, null, Y(c, (h) => t("div", {
2899
- onClick: (J) => v(h),
2897
+ n.value ? (i(), u("div", lr, [
2898
+ l("div", or, [
2899
+ l("div", ar, [
2900
+ (i(), u(K, null, Y(c, (h) => l("div", {
2901
+ onClick: (G) => v(h),
2900
2902
  key: h.value,
2901
2903
  class: "form-autocomplete__item cursor-pointer hs-selected:bg-stone-100 dark:hs-selected:bg-neutral-800 py-2 px-4 w-full text-sm text-gray-800 hover:bg-gray-100 rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:hover:bg-neutral-800 dark:text-neutral-200 dark:focus:bg-neutral-800 cursor-default"
2902
2904
  }, [
2903
- t("div", cs, [
2904
- t("div", ps, [
2905
- t("div", null, E(h.label), 1)
2905
+ l("div", rr, [
2906
+ l("div", nr, [
2907
+ l("div", null, F(h.label), 1)
2906
2908
  ]),
2907
- h.value === r.value ? (i(), u("svg", fs, x[4] || (x[4] = [
2908
- t("polyline", { points: "20 6 9 17 4 12" }, null, -1)
2909
- ]))) : S("", !0)
2909
+ h.value === s.value ? (i(), u("svg", ir, x[4] || (x[4] = [
2910
+ l("polyline", { points: "20 6 9 17 4 12" }, null, -1)
2911
+ ]))) : B("", !0)
2910
2912
  ])
2911
- ], 8, ds)), 64))
2913
+ ], 8, sr)), 64))
2912
2914
  ])
2913
2915
  ])
2914
- ])) : S("", !0)
2916
+ ])) : B("", !0)
2915
2917
  ]),
2916
- t("div", vs, [
2917
- t("div", ms, [
2918
- x[6] || (x[6] = t("i", { class: "absolute bottom-1/2 translate-y-1/2 left-3 text-gray-500" }, [
2919
- t("svg", {
2918
+ l("div", ur, [
2919
+ l("div", dr, [
2920
+ x[6] || (x[6] = l("i", { class: "absolute bottom-1/2 translate-y-1/2 left-3 text-gray-500" }, [
2921
+ l("svg", {
2920
2922
  width: "16",
2921
2923
  height: "16",
2922
2924
  viewBox: "0 0 24 24",
2923
2925
  fill: "none",
2924
2926
  stroke: "currentColor"
2925
2927
  }, [
2926
- t("circle", {
2928
+ l("circle", {
2927
2929
  cx: "11",
2928
2930
  cy: "11",
2929
2931
  r: "8",
2930
2932
  "stroke-width": "2"
2931
2933
  }),
2932
- t("line", {
2934
+ l("line", {
2933
2935
  x1: "21",
2934
2936
  y1: "21",
2935
2937
  x2: "16.65",
@@ -2938,24 +2940,24 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
2938
2940
  })
2939
2941
  ])
2940
2942
  ], -1)),
2941
- K(t("input", {
2943
+ q(l("input", {
2942
2944
  type: "text",
2943
2945
  "onUpdate:modelValue": x[1] || (x[1] = (h) => a.value = h),
2944
- onInput: F,
2946
+ onInput: U,
2945
2947
  onFocus: x[2] || (x[2] = (h) => d.value = !0),
2946
- placeholder: "Пошук...",
2948
+ placeholder: "lat, lng ex. 50, 30",
2947
2949
  class: "bg-white h-[38px] text-sm py-2 px-3 ps-9 pe-8 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-lg text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
2948
2950
  }, null, 544), [
2949
- [ne, a.value]
2951
+ [ie, a.value]
2950
2952
  ]),
2951
2953
  a.value ? (i(), u("button", {
2952
2954
  key: 0,
2953
- onClick: U,
2955
+ onClick: T,
2954
2956
  class: "absolute right-2 bottom-1/2 translate-y-1/2 text-gray-500 hover:text-red-500",
2955
2957
  "aria-label": "Очистити",
2956
2958
  type: "button"
2957
2959
  }, x[5] || (x[5] = [
2958
- t("svg", {
2960
+ l("svg", {
2959
2961
  width: "15",
2960
2962
  height: "15",
2961
2963
  viewBox: "0 0 24 24",
@@ -2963,29 +2965,29 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
2963
2965
  stroke: "currentColor",
2964
2966
  "stroke-width": "2"
2965
2967
  }, [
2966
- t("path", {
2968
+ l("path", {
2967
2969
  d: "M18 6L6 18M6 6l12 12",
2968
2970
  "stroke-linecap": "round",
2969
2971
  "stroke-linejoin": "round"
2970
2972
  })
2971
2973
  ], -1)
2972
- ]))) : S("", !0),
2973
- d.value && r.value !== "coordinates" ? (i(), u("div", hs, [
2974
- s.value.length ? (i(), u("ul", gs, [
2975
- (i(!0), u(Q, null, Y(s.value, (h) => (i(), u("li", {
2974
+ ]))) : B("", !0),
2975
+ d.value && s.value !== "coordinates" ? (i(), u("div", cr, [
2976
+ r.value.length ? (i(), u("ul", pr, [
2977
+ (i(!0), u(K, null, Y(r.value, (h) => (i(), u("li", {
2976
2978
  key: h.properties.place_id,
2977
- onClick: (J) => P(h),
2979
+ onClick: (G) => P(h),
2978
2980
  class: "px-3 py-2 text-sm cursor-pointer hover:bg-gray-100"
2979
- }, E(h.properties.display_name), 9, bs))), 128))
2980
- ])) : p.value ? (i(), u("div", ys, "Шукаю…")) : (i(), u("div", xs, "Нічого не знайдено"))
2981
- ])) : S("", !0)
2981
+ }, F(h.properties.display_name), 9, fr))), 128))
2982
+ ])) : p.value ? (i(), u("div", vr, "Шукаю…")) : (i(), u("div", mr, "Нічого не знайдено"))
2983
+ ])) : B("", !0)
2982
2984
  ])
2983
2985
  ])
2984
2986
  ])
2985
2987
  ])
2986
2988
  ]));
2987
2989
  }
2988
- }), ks = { class: "bg-white/95 p-2 rounded-xl shadow border border-gray-200" }, _s = { class: "flex gap-2" }, $s = ["onClick", "title"], Cs = ["src"], Vs = /* @__PURE__ */ A({
2990
+ }), gr = { class: "bg-white/95 p-2 rounded-xl shadow border border-gray-200" }, br = { class: "flex gap-2" }, yr = ["onClick", "title"], xr = ["src"], wr = /* @__PURE__ */ A({
2989
2991
  __name: "map-layers",
2990
2992
  props: {
2991
2993
  basemaps: {},
@@ -2993,41 +2995,42 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
2993
2995
  },
2994
2996
  emits: ["onLayerChange"],
2995
2997
  setup(o, { emit: e }) {
2996
- const n = $(o.defaultLayer ?? ""), r = e;
2997
- function a(s) {
2998
- r("onLayerChange", s), n.value = s;
2998
+ const n = k(o.defaultLayer ?? ""), s = e;
2999
+ function a(r) {
3000
+ s("onLayerChange", r), n.value = r;
2999
3001
  }
3000
- return (s, d) => (i(), u("div", ks, [
3001
- t("div", _s, [
3002
- (i(!0), u(Q, null, Y(s.basemaps, (p, f) => (i(), u("div", {
3002
+ return (r, d) => (i(), u("div", gr, [
3003
+ l("div", br, [
3004
+ (i(!0), u(K, null, Y(r.basemaps, (p, f) => (i(), u("div", {
3003
3005
  key: f,
3004
- class: B(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": n.value === f }]),
3006
+ class: S(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": n.value === f }]),
3005
3007
  onClick: (c) => a(f),
3006
3008
  title: f,
3007
3009
  role: "button",
3008
3010
  tabindex: "0"
3009
3011
  }, [
3010
- t("img", {
3012
+ l("img", {
3011
3013
  src: p.preview,
3012
3014
  alt: "",
3013
3015
  class: "w-14 h-14 object-cover"
3014
- }, null, 8, Cs)
3015
- ], 10, $s))), 128))
3016
+ }, null, 8, xr)
3017
+ ], 10, yr))), 128))
3016
3018
  ])
3017
3019
  ]));
3018
3020
  }
3019
- }), Ms = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, Ls = { class: "form-geom__panel flex gap-1 items-start mt-2" }, Bs = { class: "flex items-center gap-1" }, Ss = ["disabled"], js = { class: "absolute top-4 right-4 z-[1000]" }, Is = { class: "flex flex-col gap-[2px]" }, As = ["aria-pressed"], zs = ["aria-pressed"], Os = ["aria-pressed"], Es = ["aria-pressed"], Fs = { 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" }, Ds = {
3021
+ }), kr = { class: "absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]" }, _r = { class: "form-geom__panel flex gap-1 items-start mt-2" }, $r = { class: "flex items-center gap-1" }, Cr = ["disabled"], Vr = { class: "absolute top-4 right-4 z-[1000]" }, Lr = { class: "flex flex-col gap-[2px]" }, Mr = ["aria-pressed"], Sr = ["aria-pressed"], Br = ["aria-pressed"], jr = ["aria-pressed"], Ir = { 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" }, zr = {
3020
3022
  key: 0,
3021
3023
  class: "form-geom__feature flex items-center text-xs transition-all gap-2 w-full"
3022
- }, Us = { class: "mr-auto" }, Ts = { class: "font-bold" }, Rs = { class: "flex items-center" }, Ps = { class: "text-xs mr-2" }, Ns = {
3024
+ }, Ar = { class: "mr-auto" }, Er = { class: "font-bold" }, Fr = { class: "flex items-center" }, Or = { class: "text-xs mr-2" }, Dr = {
3023
3025
  key: 0,
3024
3026
  class: "text-xs"
3025
- }, Hs = {
3027
+ }, Ur = {
3026
3028
  key: 1,
3027
3029
  class: "text-xs"
3028
- }, qs = /* @__PURE__ */ A({
3030
+ }, Tr = /* @__PURE__ */ A({
3029
3031
  __name: "vs-input-map",
3030
3032
  props: {
3033
+ tools: {},
3031
3034
  style: {},
3032
3035
  customClass: {},
3033
3036
  disabled: { type: Boolean },
@@ -3038,9 +3041,11 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3038
3041
  },
3039
3042
  emits: ["update:modelValue"],
3040
3043
  setup(o, { emit: e }) {
3041
- const l = o, n = e, r = $(null);
3042
- let a, s, d;
3043
- const p = $(null), f = $(null), c = $(6), g = $(0), v = $(null), M = {
3044
+ const t = o;
3045
+ console.log(t);
3046
+ const n = e, s = k(null);
3047
+ let a, r, d;
3048
+ const p = k(null), f = k(null), c = k(6), g = k(0), v = k(null), M = {
3044
3049
  topo100: {
3045
3050
  url: "https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",
3046
3051
  preview: "https://data.gki.com.ua/api-user/rtile/voyager/ua/13/4790/2762.png"
@@ -3055,52 +3060,52 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3055
3060
  }
3056
3061
  };
3057
3062
  let I;
3058
- const F = $("topo100");
3059
- function U() {
3060
- return new Promise((b, y) => {
3063
+ const U = k("topo100");
3064
+ function T() {
3065
+ return new Promise((b, $) => {
3061
3066
  window.L && window.L.Draw && b(0);
3062
- const T = (ee) => {
3063
- if (Array.from(document.styleSheets).some((he) => he?.href?.includes(ee))) return;
3067
+ const O = (ee) => {
3068
+ if (Array.from(document.styleSheets).some((ge) => ge?.href?.includes(ee))) return;
3064
3069
  const de = document.createElement("link");
3065
3070
  de.rel = "stylesheet", de.href = ee, document.head.appendChild(de);
3066
- }, N = (ee) => new Promise((_e, de) => {
3067
- const he = Array.from(document.scripts).find((ce) => ce.src === ee);
3068
- if (he) {
3069
- he.addEventListener("load", () => _e()), he.addEventListener("error", (ce) => de(ce));
3071
+ }, N = (ee) => new Promise(($e, de) => {
3072
+ const ge = Array.from(document.scripts).find((ce) => ce.src === ee);
3073
+ if (ge) {
3074
+ ge.addEventListener("load", () => $e()), ge.addEventListener("error", (ce) => de(ce));
3070
3075
  return;
3071
3076
  }
3072
- const ge = document.createElement("script");
3073
- ge.src = ee, ge.async = !0, ge.onload = () => _e(), ge.onerror = (ce) => de(ce), document.body.appendChild(ge);
3077
+ const be = document.createElement("script");
3078
+ be.src = ee, be.async = !0, be.onload = () => $e(), be.onerror = (ce) => de(ce), document.body.appendChild(be);
3074
3079
  });
3075
- T("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), T("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), N("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => N("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => b(0)).catch(y);
3080
+ O("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), O("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"), N("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(() => N("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(() => b(0)).catch($);
3076
3081
  });
3077
3082
  }
3078
3083
  function P() {
3079
- const b = s.toGeoJSON();
3080
- let y = null;
3081
- b?.features?.length && (y = b.features[0].geometry), n("update:modelValue", y), g.value = s.getLayers().length;
3084
+ const b = r.toGeoJSON();
3085
+ let $ = null;
3086
+ b?.features?.length && ($ = b.features[0].geometry), n("update:modelValue", $), g.value = r.getLayers().length;
3082
3087
  }
3083
3088
  function _(b = 30) {
3084
- const y = s.getLayers();
3085
- if (!y.length) return;
3086
- const N = L.featureGroup(y).getBounds();
3089
+ const $ = r.getLayers();
3090
+ if (!$.length) return;
3091
+ const N = L.featureGroup($).getBounds();
3087
3092
  N && N.isValid() && a.fitBounds(N, { padding: [b, b] });
3088
3093
  }
3089
3094
  function x() {
3090
3095
  p.value?.click();
3091
3096
  }
3092
- const h = $("");
3093
- function J(b) {
3097
+ const h = k("");
3098
+ function G(b) {
3094
3099
  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";
3095
3100
  }
3096
3101
  function C(b) {
3097
3102
  if (b instanceof L.Circle) {
3098
- const y = b.getRadius();
3099
- return Math.PI * (y * y) / 1e6;
3103
+ const $ = b.getRadius();
3104
+ return Math.PI * ($ * $) / 1e6;
3100
3105
  }
3101
3106
  if (b instanceof L.Polygon || b instanceof L.Rectangle)
3102
3107
  try {
3103
- const y = b.getLatLngs(), T = Array.isArray(y[0]) ? y[0] : y, N = L.GeometryUtil?.geodesicArea ? L.GeometryUtil.geodesicArea(T) : 0;
3108
+ const $ = b.getLatLngs(), O = Array.isArray($[0]) ? $[0] : $, N = L.GeometryUtil?.geodesicArea ? L.GeometryUtil.geodesicArea(O) : 0;
3104
3109
  return N ? N / 1e6 : 0;
3105
3110
  } catch {
3106
3111
  return null;
@@ -3111,44 +3116,46 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3111
3116
  return b instanceof L.Circle ? b.getLatLng() : b.getBounds ? b.getBounds().getCenter() : b.getLatLng ? b.getLatLng() : a.getCenter();
3112
3117
  }
3113
3118
  function V() {
3114
- const b = s.getLayers();
3119
+ const b = r.getLayers();
3115
3120
  if (!b.length) {
3116
3121
  v.value = null, g.value = 0;
3117
3122
  return;
3118
3123
  }
3119
- const y = b[b.length - 1], T = J(y), N = m(y), ee = C(y);
3124
+ const $ = b[b.length - 1], O = G($), N = m($), ee = C($);
3120
3125
  v.value = {
3121
- type: T,
3126
+ type: O,
3122
3127
  center: N,
3123
3128
  areaKm2: ee,
3124
- layer: y
3129
+ layer: $
3125
3130
  }, g.value = b.length;
3126
3131
  }
3127
- function z() {
3132
+ function E() {
3128
3133
  const b = v.value?.layer;
3129
3134
  b && (b instanceof L.Circle && b.getBounds ? a.fitBounds(b.getBounds(), { padding: [30, 30] }) : b.getBounds ? a.fitBounds(b.getBounds(), { padding: [30, 30] }) : b.getLatLng && a.setView(b.getLatLng(), Math.max(c.value, 14)));
3130
3135
  }
3131
- function Z() {
3136
+ function Q() {
3132
3137
  const b = v.value?.layer;
3133
- b && (s.removeLayer(b), P(), V());
3138
+ b && (r.removeLayer(b), P(), V());
3134
3139
  }
3135
- ue(async () => {
3136
- await U(), L.drawLocal = Ar, a = L.map(r.value, { zoomControl: !1 }).setView([50, 30], 10), L.control.zoom({ position: "bottomright" }).addTo(a), I = L.tileLayer(M.topo100.url, { maxZoom: 19, minZoom: 6 }).addTo(a), F.value = "topo100", s = new L.FeatureGroup().addTo(a), a.on(L.Draw.Event.CREATED, (y) => {
3137
- const { layer: T } = y;
3138
- s.clearLayers(), s.addLayer(T), P(), V(), _(), h.value = "";
3140
+ ne(async () => {
3141
+ await T(), L.drawLocal = Ms, a = L.map(s.value, { zoomControl: !1 }).setView([50, 30], 10), L.control.zoom({ position: "bottomright" }).addTo(a), I = L.tileLayer(M.topo100.url, { maxZoom: 19, minZoom: 6 }).addTo(a), U.value = "topo100", r = new L.FeatureGroup().addTo(a), a.on(L.Draw.Event.CREATED, (O) => {
3142
+ const { layer: N } = O;
3143
+ r.clearLayers(), r.addLayer(N), P(), V(), _(), h.value = "";
3139
3144
  }), a.on(L.Draw.Event.EDITED, () => {
3140
3145
  P(), V(), _();
3141
3146
  }), a.on(L.Draw.Event.DELETED, () => {
3142
3147
  P(), V(), _();
3143
- }), a.on("mousemove", (y) => {
3144
- f.value = y.latlng;
3148
+ });
3149
+ let b = !1;
3150
+ a.on("mousemove", (O) => {
3151
+ b || (a.invalidateSize(), b = !0), f.value = O.latlng;
3145
3152
  }), a.on("zoomend", () => {
3146
3153
  c.value = a.getZoom();
3147
3154
  });
3148
- const b = zr(l.modelValue);
3149
- if (b) {
3150
- const y = [];
3151
- L.geoJSON(b).eachLayer((T) => y.push(T)), y.length && s.addLayer(y[0]), P(), V(), _();
3155
+ const $ = Ss(t.modelValue);
3156
+ if ($) {
3157
+ const O = [];
3158
+ L.geoJSON($).eachLayer((N) => O.push(N)), O.length && r.addLayer(O[0]), P(), V(), _();
3152
3159
  }
3153
3160
  });
3154
3161
  function te(b) {
@@ -3174,173 +3181,175 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3174
3181
  }
3175
3182
  }
3176
3183
  function ye() {
3177
- const b = s.toGeoJSON(), y = new Blob([JSON.stringify(b, null, 2)], { type: "application/json" }), T = URL.createObjectURL(y), N = document.createElement("a");
3178
- N.href = T, N.download = "data.geojson", N.click(), URL.revokeObjectURL(T);
3184
+ const b = r.toGeoJSON(), $ = new Blob([JSON.stringify(b, null, 2)], { type: "application/json" }), O = URL.createObjectURL($), N = document.createElement("a");
3185
+ N.href = O, N.download = "data.geojson", N.click(), URL.revokeObjectURL(O);
3179
3186
  }
3180
- function we(b) {
3181
- const y = b.target.files?.[0];
3182
- if (!y) return;
3183
- const T = new FileReader();
3184
- T.onload = () => {
3185
- if (typeof T.result == "string")
3187
+ function ke(b) {
3188
+ const $ = b.target.files?.[0];
3189
+ if (!$) return;
3190
+ const O = new FileReader();
3191
+ O.onload = () => {
3192
+ if (typeof O.result == "string")
3186
3193
  try {
3187
- const N = JSON.parse(T.result);
3188
- s.clearLayers(), N && L.geoJSON({ type: "Feature", geometry: N }).eachLayer((ee) => {
3189
- s.addLayer(ee);
3194
+ const N = JSON.parse(O.result);
3195
+ r.clearLayers(), N && L.geoJSON({ type: "Feature", geometry: N }).eachLayer((ee) => {
3196
+ r.addLayer(ee);
3190
3197
  }), P(), V(), _();
3191
3198
  } finally {
3192
3199
  b.target.value = "";
3193
3200
  }
3194
- }, T.readAsText(y);
3201
+ }, O.readAsText($);
3195
3202
  }
3196
- function ie(b) {
3197
- a && (I && a.removeLayer(I), I = L.tileLayer(M[b].url, { maxZoom: 19, minZoom: 6 }).addTo(a), F.value = b);
3203
+ function ue(b) {
3204
+ a && (I && a.removeLayer(I), I = L.tileLayer(M[b].url, { maxZoom: 19, minZoom: 6 }).addTo(a), U.value = b);
3198
3205
  }
3199
- function Ae(b) {
3200
- const y = L.latLng(b[0], b[1]);
3201
- a.setView(y, 13);
3206
+ function ze(b) {
3207
+ const $ = L.latLng(b[0], b[1]);
3208
+ a.setView($, 13);
3202
3209
  }
3203
- se(
3204
- () => l.modelValue,
3210
+ re(
3211
+ () => t.modelValue,
3205
3212
  (b) => {
3206
- s.clearLayers(), b && L.geoJSON({ type: "Feature", geometry: b }).eachLayer((y) => {
3207
- s.addLayer(y);
3208
- }), g.value = s.getLayers().length, V(), _();
3213
+ r.clearLayers(), b && L.geoJSON({ type: "Feature", geometry: b }).eachLayer(($) => {
3214
+ r.addLayer($);
3215
+ }), g.value = r.getLayers().length, V(), _();
3209
3216
  }
3210
3217
  );
3211
- const ke = $(!1);
3212
- return (b, y) => (i(), u("div", {
3213
- class: B(["leaflet-map-wrapper relative w-full h-[600px]", { fullscreen: ke.value }])
3218
+ const _e = k(!1);
3219
+ return (b, $) => (i(), u("div", {
3220
+ class: S(["leaflet-map-wrapper relative w-full h-[400px]", { fullscreen: _e.value }])
3214
3221
  }, [
3215
- t("div", {
3222
+ l("div", {
3216
3223
  ref_key: "mapContainer",
3217
- ref: r,
3224
+ ref: s,
3218
3225
  class: "w-full h-full"
3219
3226
  }, null, 512),
3220
- t("div", Ms, [
3221
- j(ws, { onGoToCoordinates: Ae }),
3222
- t("div", Ls, [
3223
- t("div", Bs, [
3224
- t("button", {
3227
+ l("div", kr, [
3228
+ j(hr, { onGoToCoordinates: ze }),
3229
+ l("div", _r, [
3230
+ l("div", $r, [
3231
+ l("button", {
3225
3232
  type: "button",
3226
3233
  class: "vs-btn-row",
3227
3234
  onClick: x
3228
- }, "Імпорт"),
3229
- t("button", {
3235
+ }, "Import"),
3236
+ l("button", {
3230
3237
  type: "button",
3231
3238
  class: "vs-btn-row",
3232
3239
  onClick: ye,
3233
3240
  disabled: g.value === 0
3234
- }, "Експорт ", 8, Ss)
3241
+ }, "Export ", 8, Cr)
3235
3242
  ]),
3236
- t("input", {
3243
+ l("input", {
3237
3244
  ref_key: "importRef",
3238
3245
  ref: p,
3239
3246
  type: "file",
3240
- onChange: we,
3247
+ onChange: ke,
3241
3248
  accept: ".json,.geojson",
3242
3249
  class: "hidden"
3243
3250
  }, null, 544)
3244
3251
  ])
3245
3252
  ]),
3246
- t("div", js, [
3247
- t("div", Is, [
3248
- t("button", {
3249
- class: B(["vs-btn", { "vs-active": h.value === "marker" }]),
3253
+ l("div", Vr, [
3254
+ l("div", Lr, [
3255
+ l("button", {
3256
+ class: S(["vs-btn", { "vs-active": h.value === "marker" }]),
3250
3257
  "aria-pressed": h.value === "marker",
3251
3258
  title: "Point (P)",
3252
3259
  "aria-label": "Draw point",
3253
- onClick: y[0] || (y[0] = (T) => te("marker"))
3260
+ onClick: $[0] || ($[0] = (O) => te("marker"))
3254
3261
  }, [
3255
- j(Dr)
3256
- ], 10, As),
3257
- t("button", {
3258
- class: B(["vs-btn", { "vs-active": h.value === "polyline" }]),
3262
+ j(zs)
3263
+ ], 10, Mr),
3264
+ l("button", {
3265
+ class: S(["vs-btn", { "vs-active": h.value === "polyline" }]),
3259
3266
  "aria-pressed": h.value === "polyline",
3260
3267
  title: "Line (L)",
3261
3268
  "aria-label": "Draw polyline",
3262
- onClick: y[1] || (y[1] = (T) => te("polyline"))
3269
+ onClick: $[1] || ($[1] = (O) => te("polyline"))
3263
3270
  }, [
3264
- j(Pr)
3265
- ], 10, zs),
3266
- t("button", {
3267
- class: B(["vs-btn", { "vs-active": h.value === "polygon" }]),
3271
+ j(Os)
3272
+ ], 10, Sr),
3273
+ l("button", {
3274
+ class: S(["vs-btn", { "vs-active": h.value === "polygon" }]),
3268
3275
  "aria-pressed": h.value === "polygon",
3269
3276
  title: "Polygon (G)",
3270
3277
  "aria-label": "Draw polygon",
3271
- onClick: y[2] || (y[2] = (T) => te("polygon"))
3278
+ onClick: $[2] || ($[2] = (O) => te("polygon"))
3272
3279
  }, [
3273
- j(Gr)
3274
- ], 10, Os),
3275
- t("button", {
3276
- class: B(["vs-btn", { "vs-active": h.value === "rectangle" }]),
3280
+ j(Rs)
3281
+ ], 10, Br),
3282
+ l("button", {
3283
+ class: S(["vs-btn", { "vs-active": h.value === "rectangle" }]),
3277
3284
  "aria-pressed": h.value === "rectangle",
3278
3285
  title: "Rectangle (R)",
3279
3286
  "aria-label": "Draw rectangle",
3280
- onClick: y[3] || (y[3] = (T) => te("rectangle"))
3287
+ onClick: $[3] || ($[3] = (O) => te("rectangle"))
3281
3288
  }, [
3282
- j(Wr)
3283
- ], 10, Es),
3284
- t("button", {
3285
- class: "vs-btn",
3286
- onClick: y[4] || (y[4] = (T) => ke.value = !ke.value)
3289
+ j(qs)
3290
+ ], 10, jr),
3291
+ l("button", {
3292
+ class: "vs-btn mt-5",
3293
+ onClick: $[4] || ($[4] = (O) => _e.value = !_e.value),
3294
+ title: "Full Screen",
3295
+ "aria-label": "Full Screen"
3287
3296
  }, [
3288
- j(es, { style: { width: "12px", height: "12px" } })
3297
+ j(Zs, { style: { width: "12px", height: "12px" } })
3289
3298
  ])
3290
3299
  ])
3291
3300
  ]),
3292
- t("div", {
3293
- class: B(["absolute left-4 z-[1000]", v.value ? "bottom-8" : "bottom-4"])
3301
+ l("div", {
3302
+ class: S(["absolute left-4 z-[1000]", v.value ? "bottom-8" : "bottom-4"])
3294
3303
  }, [
3295
- j(Vs, {
3304
+ j(wr, {
3296
3305
  basemaps: M,
3297
3306
  "default-layer": "topo100",
3298
- onOnLayerChange: ie
3307
+ onOnLayerChange: ue
3299
3308
  })
3300
3309
  ], 2),
3301
- t("div", Fs, [
3302
- v.value ? (i(), u("div", Ds, [
3303
- t("div", Us, [
3304
- y[7] || (y[7] = oe(" Тип: ")),
3305
- t("span", Ts, E(v.value.type), 1)
3310
+ l("div", Ir, [
3311
+ v.value ? (i(), u("div", zr, [
3312
+ l("div", Ar, [
3313
+ $[7] || ($[7] = oe(" Тип: ")),
3314
+ l("span", Er, F(v.value.type), 1)
3306
3315
  ]),
3307
- t("div", Rs, [
3308
- t("div", Ps, [
3309
- y[8] || (y[8] = oe(" Центр: ")),
3310
- t("b", null, E(v.value.center.lat.toFixed(5)) + ", " + E(v.value.center.lng.toFixed(5)), 1)
3316
+ l("div", Fr, [
3317
+ l("div", Or, [
3318
+ $[8] || ($[8] = oe(" Центр: ")),
3319
+ l("b", null, F(v.value.center.lat.toFixed(5)) + ", " + F(v.value.center.lng.toFixed(5)), 1)
3311
3320
  ]),
3312
- v.value.areaKm2 !== null ? (i(), u("div", Ns, [
3313
- y[9] || (y[9] = oe(" Площа: ")),
3314
- t("b", null, E(v.value.areaKm2.toFixed(1)) + "км²", 1)
3315
- ])) : (i(), u("div", Hs, y[10] || (y[10] = [
3321
+ v.value.areaKm2 !== null ? (i(), u("div", Dr, [
3322
+ $[9] || ($[9] = oe(" Площа: ")),
3323
+ l("b", null, F(v.value.areaKm2.toFixed(1)) + "км²", 1)
3324
+ ])) : (i(), u("div", Ur, $[10] || ($[10] = [
3316
3325
  oe(" Площа: "),
3317
- t("b", null, "—", -1)
3326
+ l("b", null, "—", -1)
3318
3327
  ]))),
3319
- t("button", {
3328
+ l("button", {
3320
3329
  class: "tool bg-gray-100 py-1.5 px-2 rounded-lg text-md mr-1 cursor-pointer hover:bg-blue-500 hover:text-white transition-all",
3321
3330
  title: "Наблизити",
3322
- onClick: y[5] || (y[5] = (T) => z())
3323
- }, y[11] || (y[11] = [
3324
- ae('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-3 h-3" data-v-d73d6cfa><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" data-v-d73d6cfa></path><path d="M7 10l6 0" data-v-d73d6cfa></path><path d="M10 7l0 6" data-v-d73d6cfa></path><path d="M21 21l-6 -6" data-v-d73d6cfa></path></svg>', 1)
3331
+ onClick: $[5] || ($[5] = (O) => E())
3332
+ }, $[11] || ($[11] = [
3333
+ ae('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-3 h-3" data-v-55d330eb><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" data-v-55d330eb></path><path d="M7 10l6 0" data-v-55d330eb></path><path d="M10 7l0 6" data-v-55d330eb></path><path d="M21 21l-6 -6" data-v-55d330eb></path></svg>', 1)
3325
3334
  ])),
3326
- t("button", {
3335
+ l("button", {
3327
3336
  class: "tool bg-gray-100 py-1.5 px-2 rounded-lg text-md cursor-pointer hover:bg-blue-500 hover:text-white transition-all",
3328
3337
  title: "Видалити",
3329
- onClick: y[6] || (y[6] = (T) => Z())
3338
+ onClick: $[6] || ($[6] = (O) => Q())
3330
3339
  }, [
3331
3340
  j(Ie, { class: "w-3 h-3" })
3332
3341
  ])
3333
3342
  ])
3334
- ])) : S("", !0)
3343
+ ])) : B("", !0)
3335
3344
  ])
3336
3345
  ], 2));
3337
3346
  }
3338
- }), Gs = /* @__PURE__ */ R(qs, [["__scopeId", "data-v-d73d6cfa"]]), Js = ["data-focus"], Ks = { class: "flex items-center" }, Zs = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, Ws = ["onClick", "aria-label"], Qs = {
3347
+ }), Rr = /* @__PURE__ */ R(Tr, [["__scopeId", "data-v-55d330eb"]]), Pr = ["data-focus"], Nr = { class: "flex items-center" }, Hr = { class: "overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border" }, qr = ["onClick", "aria-label"], Gr = {
3339
3348
  key: 0,
3340
3349
  class: "absolute text-gray-500 truncate pl-2"
3341
- }, Xs = { class: "flex-1 min-w-[2px]" }, Ys = ["placeholder"], en = { class: "flex items-center shrink-0" }, tn = ["disabled"], ln = /* @__PURE__ */ A({
3350
+ }, Jr = { class: "flex-1 min-w-[2px]" }, Kr = ["placeholder"], Zr = { class: "flex items-center shrink-0" }, Wr = ["disabled"], Qr = /* @__PURE__ */ A({
3342
3351
  __name: "vs-input-tag",
3343
- props: /* @__PURE__ */ q({
3352
+ props: /* @__PURE__ */ Z({
3344
3353
  unique: { type: Boolean, default: !0 },
3345
3354
  style: { default: () => ({}) },
3346
3355
  customClass: { default: "" },
@@ -3353,18 +3362,18 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3353
3362
  modelValue: { default: [] },
3354
3363
  modelModifiers: {}
3355
3364
  }),
3356
- emits: /* @__PURE__ */ q(["update:modelValue"], ["update:modelValue"]),
3365
+ emits: /* @__PURE__ */ Z(["update:modelValue"], ["update:modelValue"]),
3357
3366
  setup(o, { emit: e }) {
3358
- const l = o, n = e;
3359
- me(l.style);
3360
- const r = $(null), a = $(null), s = $(null), d = $(!1), p = $(""), f = G(o, "modelValue"), c = D(() => l.placeholder || "Add tag…"), g = D(() => f.value?.length === 0 && p.value === ""), v = D(() => !l.disabled && f.value?.length > 0), M = D(() => l.disabled), I = async () => {
3361
- M.value || await $e(() => s.value?.focus());
3362
- }, F = (C) => {
3367
+ const t = o, n = e;
3368
+ he(t.style);
3369
+ const s = k(null), a = k(null), r = k(null), d = k(!1), p = k(""), f = W(o, "modelValue"), c = D(() => t.placeholder || "Add tag…"), g = D(() => f.value?.length === 0 && p.value === ""), v = D(() => !t.disabled && f.value?.length > 0), M = D(() => t.disabled), I = async () => {
3370
+ M.value || await Ce(() => r.value?.focus());
3371
+ }, U = (C) => {
3363
3372
  const m = C.trim();
3364
- m !== "" && (!f.value || !Array.isArray(f.value) ? f.value = [m] : l.unique ? f.value.includes(m) || (f.value = [...f.value, m]) : f.value = [...f.value, m], p.value = "");
3365
- }, U = () => {
3373
+ m !== "" && (!f.value || !Array.isArray(f.value) ? f.value = [m] : t.unique ? f.value.includes(m) || (f.value = [...f.value, m]) : f.value = [...f.value, m], p.value = "");
3374
+ }, T = () => {
3366
3375
  const C = p.value;
3367
- C.trim() !== "" && F(C), p.value = "";
3376
+ C.trim() !== "" && U(C), p.value = "";
3368
3377
  }, P = (C) => {
3369
3378
  const m = f.value.slice();
3370
3379
  m.splice(C, 1), n("update:modelValue", m);
@@ -3374,24 +3383,24 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3374
3383
  M.value || (d.value = !0);
3375
3384
  }, h = () => {
3376
3385
  d.value = !1;
3377
- }, J = (C) => {
3386
+ }, G = (C) => {
3378
3387
  const { key: m } = C;
3379
- m === "Enter" ? (C.preventDefault(), U()) : m === "Backspace" && p.value === "" && f.value.length > 0 && P(f.value.length - 1);
3388
+ m === "Enter" ? (C.preventDefault(), T()) : m === "Backspace" && p.value === "" && f.value.length > 0 && P(f.value.length - 1);
3380
3389
  };
3381
3390
  return (C, m) => (i(), u("div", {
3382
3391
  class: "flex gap-1 w-full",
3383
3392
  ref_key: "root",
3384
- ref: r,
3385
- onClick: m[1] || (m[1] = re(() => {
3393
+ ref: s,
3394
+ onClick: m[1] || (m[1] = se(() => {
3386
3395
  }, ["stop"]))
3387
3396
  }, [
3388
- t("div", {
3389
- class: B(["relative w-full font-sans", l.customClass]),
3397
+ l("div", {
3398
+ class: S(["relative w-full font-sans", t.customClass]),
3390
3399
  role: "group",
3391
3400
  "aria-label": "Tag input"
3392
3401
  }, [
3393
- t("div", {
3394
- class: B([
3402
+ l("div", {
3403
+ class: S([
3395
3404
  "flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
3396
3405
  "border-gray-300 hover:border-gray-400",
3397
3406
  d.value ? "border-blue-500 ring-1 ring-blue-500" : "",
@@ -3400,25 +3409,25 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3400
3409
  "data-focus": d.value ? "true" : "false",
3401
3410
  onClick: I
3402
3411
  }, [
3403
- t("div", {
3412
+ l("div", {
3404
3413
  class: "flex flex-1 flex-wrap items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",
3405
3414
  ref_key: "chipsRef",
3406
3415
  ref: a
3407
3416
  }, [
3408
- (i(!0), u(Q, null, Y(f.value, (V, z) => (i(), u("div", {
3409
- key: z,
3417
+ (i(!0), u(K, null, Y(f.value, (V, E) => (i(), u("div", {
3418
+ key: E,
3410
3419
  class: "flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"
3411
3420
  }, [
3412
- t("div", Ks, [
3413
- t("div", Zs, E(V), 1)
3421
+ l("div", Nr, [
3422
+ l("div", Hr, F(V), 1)
3414
3423
  ]),
3415
- t("div", {
3424
+ l("div", {
3416
3425
  role: "button",
3417
3426
  class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
3418
- onClick: re((Z) => P(z), ["stop"]),
3427
+ onClick: se((Q) => P(E), ["stop"]),
3419
3428
  "aria-label": `Remove ${V}`
3420
3429
  }, m[2] || (m[2] = [
3421
- t("svg", {
3430
+ l("svg", {
3422
3431
  height: "14",
3423
3432
  width: "14",
3424
3433
  viewBox: "0 0 20 20",
@@ -3426,16 +3435,16 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3426
3435
  focusable: "false",
3427
3436
  class: "inline-block fill-current stroke-current leading-none stroke-0"
3428
3437
  }, [
3429
- t("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" })
3438
+ 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" })
3430
3439
  ], -1)
3431
- ]), 8, Ws)
3440
+ ]), 8, qr)
3432
3441
  ]))), 128)),
3433
- g.value ? (i(), u("div", Qs, E(c.value), 1)) : S("", !0),
3434
- t("div", Xs, [
3435
- M.value ? S("", !0) : K((i(), u("input", {
3442
+ g.value ? (i(), u("div", Gr, F(c.value), 1)) : B("", !0),
3443
+ l("div", Jr, [
3444
+ M.value ? B("", !0) : q((i(), u("input", {
3436
3445
  key: 0,
3437
3446
  ref_key: "inputRef",
3438
- ref: s,
3447
+ ref: r,
3439
3448
  class: "pl-2 w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",
3440
3449
  autocapitalize: "none",
3441
3450
  autocomplete: "off",
@@ -3447,58 +3456,58 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3447
3456
  "onUpdate:modelValue": m[0] || (m[0] = (V) => p.value = V),
3448
3457
  onFocus: x,
3449
3458
  onBlur: h,
3450
- onKeydown: J,
3459
+ onKeydown: G,
3451
3460
  placeholder: f.value && f.value.length ? "" : void 0
3452
- }, null, 40, Ys)), [
3453
- [ne, p.value]
3461
+ }, null, 40, Kr)), [
3462
+ [ie, p.value]
3454
3463
  ])
3455
3464
  ])
3456
3465
  ], 512),
3457
- t("div", en, [
3466
+ l("div", Zr, [
3458
3467
  v.value ? (i(), u("button", {
3459
3468
  key: 0,
3460
3469
  type: "button",
3461
3470
  class: "px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50",
3462
3471
  "aria-label": "Clear all tags",
3463
3472
  disabled: M.value,
3464
- onClick: re(_, ["stop"])
3473
+ onClick: se(_, ["stop"])
3465
3474
  }, m[3] || (m[3] = [
3466
- t("svg", {
3475
+ l("svg", {
3467
3476
  height: "20",
3468
3477
  width: "20",
3469
3478
  viewBox: "0 0 20 20",
3470
3479
  class: "fill-current"
3471
3480
  }, [
3472
- t("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" })
3481
+ 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" })
3473
3482
  ], -1)
3474
- ]), 8, tn)) : S("", !0)
3483
+ ]), 8, Wr)) : B("", !0)
3475
3484
  ])
3476
- ], 10, Js)
3485
+ ], 10, Pr)
3477
3486
  ], 2)
3478
3487
  ], 512));
3479
3488
  }
3480
- }), on = {
3481
- VsInputText: He,
3482
- VsInputRadio: Ge,
3483
- "vs-input-text": He,
3484
- "vs-input-textarea": Ia,
3485
- "vs-input-mask": sl,
3486
- "vs-input-number": St,
3487
- "vs-input-radio": Ge,
3488
- "vs-input-select": Sa,
3489
- "vs-input-switcher": lt,
3490
- "vs-input-static": qe,
3489
+ }), Xr = {
3490
+ VsInputText: Ge,
3491
+ VsInputRadio: Ke,
3492
+ "vs-input-text": Ge,
3493
+ "vs-input-textarea": La,
3494
+ "vs-input-mask": rl,
3495
+ "vs-input-number": Bt,
3496
+ "vs-input-radio": Ke,
3497
+ "vs-input-select": Ca,
3498
+ "vs-input-switcher": ot,
3499
+ "vs-input-static": Je,
3491
3500
  "vs-input-container": na,
3492
3501
  "vs-input-date": xl,
3493
3502
  "vs-input-checkbox": bl,
3494
- "vs-input-file": ro,
3495
- "vs-input-html": qe,
3503
+ "vs-input-file": so,
3504
+ "vs-input-html": Je,
3496
3505
  "vs-input-email": ul,
3497
- "vs-input-datatable": Ir,
3498
- "vs-input-map": Gs,
3499
- "vs-input-file-list": Eo,
3500
- "vs-input-tag": ln
3501
- }, an = /* @__PURE__ */ A({
3506
+ "vs-input-datatable": Ls,
3507
+ "vs-input-map": Rr,
3508
+ "vs-input-file-list": Fo,
3509
+ "vs-input-tag": Qr
3510
+ }, Yr = /* @__PURE__ */ A({
3502
3511
  __name: "behavior",
3503
3512
  props: {
3504
3513
  api: {},
@@ -3508,31 +3517,31 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3508
3517
  value: {}
3509
3518
  },
3510
3519
  setup(o) {
3511
- const e = o, l = Se("values");
3520
+ const e = o, t = Be("values");
3512
3521
  async function n() {
3513
3522
  try {
3514
3523
  if (!e.api) return;
3515
- const r = e.api.replace("{{value}}", e.value), a = await fetch(r);
3524
+ const s = e.api.replace("{{value}}", e.value), a = await fetch(s);
3516
3525
  if (!a.ok) {
3517
- pe({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
3526
+ fe({ type: "warning", title: "Validation", message: "При спробі завантажити дані виникла помилка." });
3518
3527
  return;
3519
3528
  }
3520
- const s = await a.json();
3521
- if (!e.set || !l) return;
3529
+ const r = await a.json();
3530
+ if (!e.set || !t) return;
3522
3531
  for (const [d, p] of Object.entries(e.set))
3523
- l.value[d] = s.result[p];
3524
- } catch (r) {
3525
- console.error(e.error, r);
3532
+ t.value[d] = r.result[p];
3533
+ } catch (s) {
3534
+ console.error(e.error, s);
3526
3535
  }
3527
3536
  }
3528
- return (r, a) => (i(), u("button", {
3537
+ return (s, a) => (i(), u("button", {
3529
3538
  onClick: n,
3530
3539
  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"
3531
- }, E(r.button), 1));
3540
+ }, F(s.button), 1));
3532
3541
  }
3533
- }), rn = { class: "flex w-full" }, rt = /* @__PURE__ */ A({
3542
+ }), en = { class: "flex w-full" }, rt = /* @__PURE__ */ A({
3534
3543
  __name: "vs-compact-form-layout",
3535
- props: /* @__PURE__ */ q({
3544
+ props: /* @__PURE__ */ Z({
3536
3545
  item: { default: {} },
3537
3546
  layout: { default: "default" },
3538
3547
  style: { default: {} },
@@ -3544,55 +3553,55 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3544
3553
  }),
3545
3554
  emits: ["update:modelValue"],
3546
3555
  setup(o) {
3547
- const e = o, l = G(o, "modelValue"), n = D(() => Mt[`${e.layout}`]), r = D(() => on?.[`vs-input-${e.item.type}`]), a = D(() => {
3548
- const d = H(r);
3556
+ const e = o, t = W(o, "modelValue"), n = D(() => Lt[`${e.layout}`]), s = D(() => Xr?.[`vs-input-${e.item.type}`]), a = D(() => {
3557
+ const d = H(s);
3549
3558
  if (!d) return /* @__PURE__ */ new Set();
3550
3559
  const p = d.props ?? d.__vccOpts?.props;
3551
3560
  if (!p) return /* @__PURE__ */ new Set();
3552
3561
  const f = Array.isArray(p) ? p : Object.keys(p);
3553
3562
  return new Set(f);
3554
- }), s = D(() => {
3563
+ }), r = D(() => {
3555
3564
  const d = e.item ?? {}, p = a.value;
3556
3565
  return p.size ? Object.fromEntries(Object.entries(d).filter(([f]) => p.has(f))) : {};
3557
3566
  });
3558
- return (d, p) => (i(), X(xe(n.value), {
3567
+ return (d, p) => (i(), X(we(n.value), {
3559
3568
  ua: e.item.ua,
3560
3569
  error: e.error || "",
3561
3570
  item: d.item,
3562
3571
  label: e.item.label
3563
3572
  }, {
3564
3573
  default: Me(() => [
3565
- t("div", rn, [
3566
- (i(), X(xe(r.value), Ce(s.value, {
3567
- modelValue: l.value,
3568
- "onUpdate:modelValue": p[0] || (p[0] = (f) => l.value = f)
3574
+ l("div", en, [
3575
+ (i(), X(we(s.value), Ve(r.value, {
3576
+ modelValue: t.value,
3577
+ "onUpdate:modelValue": p[0] || (p[0] = (f) => t.value = f)
3569
3578
  }), null, 16, ["modelValue"])),
3570
- d.item.behavior ? (i(), X(an, Ce({ key: 0 }, d.item.behavior, { value: l.value }), null, 16, ["value"])) : S("", !0)
3579
+ d.item.behavior ? (i(), X(Yr, Ve({ key: 0 }, d.item.behavior, { value: t.value }), null, 16, ["value"])) : B("", !0)
3571
3580
  ])
3572
3581
  ]),
3573
3582
  _: 1
3574
3583
  }, 8, ["ua", "error", "item", "label"]));
3575
3584
  }
3576
- }), st = {
3585
+ }), nt = {
3577
3586
  required: "Це поле є обов’язковим",
3578
3587
  email: "Неправильний email"
3579
- }, sn = (o) => o ? !1 : st.required, nn = (o) => !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o) && o ? st.email : !1, un = (o, e) => {
3580
- const l = e.pattern ?? e.regexp;
3581
- return !(typeof l == "string" ? new RegExp(l) : l).test(o) && o ? e.message : !1;
3582
- }, dn = (o, e) => !1, cn = (o, e) => {
3588
+ }, tn = (o) => o ? !1 : nt.required, ln = (o) => !o && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o) ? nt.email : !1, on = (o, e) => {
3589
+ const t = e.pattern ?? e.regexp;
3590
+ return !(typeof t == "string" ? new RegExp(t) : t).test(o) && o ? e.message : !1;
3591
+ }, an = (o, e) => !1, sn = (o, e) => {
3583
3592
  switch (typeof e == "string" ? e : e.type) {
3584
3593
  case "required":
3585
- return sn(o);
3594
+ return tn(o);
3586
3595
  case "email":
3587
- return nn(o);
3596
+ return ln(o);
3588
3597
  case "regexp":
3589
- return un(o, e);
3598
+ return on(o, e);
3590
3599
  case "custom":
3591
- return dn();
3600
+ return an();
3592
3601
  default:
3593
3602
  return !1;
3594
3603
  }
3595
- }, pn = {
3604
+ }, rn = {
3596
3605
  autocomplete: "select",
3597
3606
  combobox: "select",
3598
3607
  datepicker: "date",
@@ -3604,63 +3613,63 @@ const es = /* @__PURE__ */ R(Qr, [["render", Yr]]), ts = { class: "form-geom__se
3604
3613
  file: "file"
3605
3614
  // mask: 'text',
3606
3615
  };
3607
- function We(o) {
3616
+ function Xe(o) {
3608
3617
  const e = o.toLowerCase();
3609
- return pn[e] || e;
3618
+ return rn[e] || e;
3610
3619
  }
3611
- function fn(o) {
3620
+ function nn(o) {
3612
3621
  if (Array.isArray(o)) {
3613
- const l = [];
3622
+ const t = [];
3614
3623
  return o.forEach((n) => {
3615
- const r = { ...n };
3616
- r.name = (n.name || n.id || n.key || "").toString(), r.type = We(n.type), r.label = n.label || n.ua, r.rules = n.rules || n.validators, n.data && (r.api = `/api/suggest/${n.data}`), l.push(r);
3617
- }), l;
3624
+ const s = { ...n };
3625
+ s.name = (n.name || n.id || n.key || "").toString(), s.type = Xe(n.type), s.label = n.label || n.ua, s.rules = n.rules || n.validators, n.data && (s.api = `/api/suggest/${n.data}`), t.push(s);
3626
+ }), t;
3618
3627
  }
3619
3628
  const e = [];
3620
- return Object.entries(o).forEach((l) => {
3629
+ return Object.entries(o).forEach((t) => {
3621
3630
  const n = {
3622
- name: l[0],
3623
- ...l[1],
3624
- type: We(l[1].type),
3625
- label: l[1].label || l[1].ua,
3626
- rules: l[1].rules || l[1].validators
3631
+ name: t[0],
3632
+ ...t[1],
3633
+ type: Xe(t[1].type),
3634
+ label: t[1].label || t[1].ua,
3635
+ rules: t[1].rules || t[1].validators
3627
3636
  };
3628
- l[1].type.includes("list") && (n.multiple = !0), l[1].data && (n.api = `/api/suggest/${l[1].data}`), e.push(n);
3637
+ t[1].type.includes("list") && (n.multiple = !0), t[1].data && (n.api = `/api/suggest/${t[1].data}`), e.push(n);
3629
3638
  }), e;
3630
3639
  }
3631
- function vn(o, e) {
3632
- const l = fn(e), n = $({});
3633
- function r(p) {
3640
+ function un(o, e) {
3641
+ const t = nn(e), n = k({});
3642
+ function s(p) {
3634
3643
  const f = p?.conditions;
3635
3644
  if (!f) return !0;
3636
3645
  const c = Array.isArray(f) ? f[0] : f, g = o?.value?.[c];
3637
- return at(g, f);
3646
+ return st(g, f);
3638
3647
  }
3639
- const a = (p = l, f = !0) => (p.forEach((c) => {
3648
+ const a = (p = t, f = !0) => (p.forEach((c) => {
3640
3649
  if (c.rules) {
3641
- if (!r(c)) {
3650
+ if (!s(c)) {
3642
3651
  delete n.value[c.name];
3643
3652
  return;
3644
3653
  }
3645
3654
  c.rules.forEach((g) => {
3646
- const v = cn(o.value[c.name], g);
3655
+ const v = sn(o.value[c.name], g);
3647
3656
  v ? n.value[c.name] = v : delete n.value[c.name];
3648
3657
  });
3649
3658
  }
3650
3659
  c.schema && a(c.schema, !1);
3651
- }), f && Object.values(n.value).some(Boolean) ? n.value : null), s = D(() => l?.filter((p) => r(p)));
3660
+ }), f && Object.values(n.value).some(Boolean) ? n.value : null), r = D(() => t?.filter((p) => s(p)));
3652
3661
  return {
3653
3662
  errors: n,
3654
3663
  validate: a,
3655
3664
  reset: () => {
3656
3665
  o.value = {}, n.value = {};
3657
3666
  },
3658
- visibleSchema: s
3667
+ visibleSchema: r
3659
3668
  };
3660
3669
  }
3661
- const Oe = /* @__PURE__ */ A({
3670
+ const Ee = /* @__PURE__ */ A({
3662
3671
  __name: "vs-compact-form",
3663
- props: /* @__PURE__ */ q({
3672
+ props: /* @__PURE__ */ Z({
3664
3673
  schema: { default: () => [] },
3665
3674
  style: { default: () => ({}) },
3666
3675
  modelValue: {},
@@ -3672,74 +3681,74 @@ const Oe = /* @__PURE__ */ A({
3672
3681
  values: { default: () => ({}) },
3673
3682
  valuesModifiers: {}
3674
3683
  }),
3675
- emits: /* @__PURE__ */ q(["handle-submit", "update:modelValue"], ["update:form", "update:values"]),
3676
- setup(o, { expose: e, emit: l }) {
3677
- const n = l, r = o, a = G(o, "form"), s = G(o, "values"), {
3684
+ emits: /* @__PURE__ */ Z(["handle-submit", "update:modelValue"], ["update:form", "update:values"]),
3685
+ setup(o, { expose: e, emit: t }) {
3686
+ const n = t, s = o, a = W(o, "form"), r = W(o, "values"), {
3678
3687
  errors: d,
3679
3688
  validate: p,
3680
3689
  reset: f,
3681
3690
  visibleSchema: c
3682
- } = vn(s, r.schema), g = () => {
3683
- n("update:modelValue", s.value), p(), n("handle-submit", s.value);
3691
+ } = un(r, s.schema), g = () => {
3692
+ n("update:modelValue", r.value), p(), n("handle-submit", r.value);
3684
3693
  };
3685
3694
  e({
3686
3695
  validate: p,
3687
3696
  reset: f,
3688
3697
  errors: d
3689
- }), ue(() => {
3690
- r.modelValue && (s.value = r.modelValue), a.value.value = s.value, a.value.errors = d.value, a.value.reset = f, a.value.validate = p, a.value.formId = r.formId;
3698
+ }), ne(() => {
3699
+ s.modelValue && (r.value = s.modelValue), a.value.value = r.value, a.value.errors = d.value, a.value.reset = f, a.value.validate = p, a.value.formId = s.formId;
3691
3700
  });
3692
3701
  function v(M, I) {
3693
3702
  if (M === I) return !0;
3694
3703
  if (typeof M != "object" || typeof I != "object" || !M || !I) return !1;
3695
- const F = Object.keys(M), U = Object.keys(I);
3696
- return F.length !== U.length ? !1 : F.every((P) => M[P] === I[P]);
3704
+ const U = Object.keys(M), T = Object.keys(I);
3705
+ return U.length !== T.length ? !1 : U.every((P) => M[P] === I[P]);
3697
3706
  }
3698
- return Ne("form", a), Ne("values", s), (M, I) => (i(), u("form", {
3699
- onSubmit: re(g, ["prevent"]),
3700
- class: B(["grid grid-cols-12", M.layout === "default" ? "gap-6" : "gap-4"])
3707
+ return He("form", a), He("values", r), (M, I) => (i(), u("form", {
3708
+ onSubmit: se(g, ["prevent"]),
3709
+ class: S(["grid grid-cols-12", M.layout === "default" ? "gap-6" : "gap-4"])
3701
3710
  }, [
3702
- (i(!0), u(Q, null, Y(H(c), (F) => (i(), X(rt, {
3703
- key: F.name,
3704
- class: B(M.layout === "horizontal" ? "col-span-12" : `col-span-${F.col || 12} `),
3705
- style: fe(M.style),
3706
- item: F,
3711
+ (i(!0), u(K, null, Y(H(c), (U) => (i(), X(rt, {
3712
+ key: U.name,
3713
+ class: S(M.layout === "horizontal" ? "col-span-12" : `col-span-${U.col || 12} `),
3714
+ style: ve(M.style),
3715
+ item: U,
3707
3716
  layout: M.layout,
3708
- "model-value": s.value[F.name],
3709
- "onUpdate:modelValue": (U) => {
3710
- const P = s.value[F.name];
3711
- v(P, U) || (s.value[F.name] = U);
3717
+ "model-value": r.value[U.name],
3718
+ "onUpdate:modelValue": (T) => {
3719
+ const P = r.value[U.name];
3720
+ v(P, T) || (r.value[U.name] = T);
3712
3721
  },
3713
- error: H(d)[F.name]
3722
+ error: H(d)[U.name]
3714
3723
  }, null, 8, ["class", "style", "item", "layout", "model-value", "onUpdate:modelValue", "error"]))), 128))
3715
3724
  ], 34));
3716
3725
  }
3717
3726
  });
3718
- Oe.install = function(e) {
3719
- e.component("VForm", Oe), Object.assign(e.config.globalProperties, {
3720
- $form: Ve
3721
- }), e.provide("form", Ve), window.v3plugin || (window.v3plugin = {});
3727
+ Ee.install = function(e) {
3728
+ e.component("VForm", Ee), Object.assign(e.config.globalProperties, {
3729
+ $form: Le
3730
+ }), e.provide("form", Le), window.v3plugin || (window.v3plugin = {});
3722
3731
  };
3723
3732
  export {
3724
- va as ModalEdit,
3725
- Oe as VForm,
3733
+ ua as ModalEdit,
3734
+ Ee as VForm,
3726
3735
  bl as VsInputCheckbox,
3727
3736
  na as VsInputContainer,
3728
3737
  xl as VsInputDate,
3729
3738
  ul as VsInputEmail,
3730
- ro as VsInputFile,
3731
- Eo as VsInputFileList,
3732
- sl as VsInputMask,
3733
- St as VsInputNumber,
3734
- Ge as VsInputRadio,
3735
- Sa as VsInputSelect,
3736
- qe as VsInputStatic,
3737
- lt as VsInputSwitcher,
3738
- ln as VsInputTag,
3739
- He as VsInputText,
3740
- Ia as VsInputTextarea,
3741
- Oe as default,
3742
- on as inputs,
3743
- Ir as vsInputDatatable,
3744
- Gs as vsInputMap
3739
+ so as VsInputFile,
3740
+ Fo as VsInputFileList,
3741
+ rl as VsInputMask,
3742
+ Bt as VsInputNumber,
3743
+ Ke as VsInputRadio,
3744
+ Ca as VsInputSelect,
3745
+ Je as VsInputStatic,
3746
+ ot as VsInputSwitcher,
3747
+ Qr as VsInputTag,
3748
+ Ge as VsInputText,
3749
+ La as VsInputTextarea,
3750
+ Ee as default,
3751
+ Xr as inputs,
3752
+ Ls as vsInputDatatable,
3753
+ Rr as vsInputMap
3745
3754
  };