@opengis/form 0.0.151 → 0.0.153

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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as de, ref as D, createElementBlock as p, openBlock as i, Fragment as _e, createElementVNode as c, createBlock as be, renderSlot as et, createVNode as K, unref as E, Teleport as ll, createCommentVNode as z, normalizeStyle as Me, toDisplayString as ie, computed as w, mergeProps as zt, createTextVNode as ze, normalizeProps as en, guardReactiveProps as tn, onMounted as Qe, onUnmounted as fl, normalizeClass as te, mergeModels as Te, useModel as Oe, withDirectives as Ve, vModelText as qe, useAttrs as Nn, vModelCheckbox as jn, resolveDynamicComponent as ut, withCtx as lt, withModifiers as Be, onBeforeUnmount as Ht, watch as me, vModelRadio as Un, inject as st, renderList as De, reactive as ln, vModelDynamic as Ma, vShow as Pt, resolveComponent as wt, Transition as nn, isRef as Fl, nextTick as Xe, defineAsyncComponent as La, createStaticVNode as an, useSlots as Da, getCurrentInstance as zn, watchEffect as il, withKeys as Aa, toRef as Ia, provide as Kl } from "vue";
1
+ import { defineComponent as de, ref as D, createElementBlock as p, openBlock as i, Fragment as _e, createElementVNode as c, createBlock as be, renderSlot as et, createVNode as K, unref as E, Teleport as ll, createCommentVNode as z, normalizeStyle as Me, toDisplayString as ie, computed as w, mergeProps as zt, createTextVNode as ze, normalizeProps as en, guardReactiveProps as tn, onMounted as Qe, onUnmounted as fl, normalizeClass as le, mergeModels as Te, useModel as Oe, withDirectives as Ve, vModelText as qe, useAttrs as Nn, vModelCheckbox as jn, resolveDynamicComponent as ut, withCtx as lt, withModifiers as Be, onBeforeUnmount as Ht, watch as me, vModelRadio as Un, inject as st, renderList as De, reactive as ln, vModelDynamic as Ma, vShow as Pt, resolveComponent as wt, Transition as nn, isRef as Fl, nextTick as Xe, defineAsyncComponent as La, createStaticVNode as an, useSlots as Da, getCurrentInstance as zn, watchEffect as il, withKeys as Aa, toRef as Ia, provide as Kl } from "vue";
2
2
  import { Info as Zt, Check as Fa, Mail as Ta, Phone as Ea, Table as Ba, FileCode as Oa, FileText as Tl, FileArchive as Pa, Trash2 as Xt, Eye as Hn, Download as on, Plus as xt, Upload as qn, Search as rn, ChevronDown as pl, X as Vt, GripVertical as el, Pencil as Ra, Circle as Na, MapPin as Wn, Ruler as Kn, Maximize as ja, ZoomIn as Ua, LoaderCircle as za, Copy as Ha, ChevronRight as qa, ChevronLeft as Wa } from "lucide-vue-next";
3
3
  import { notify as Ce, VsModal as Bl, modal as Ka } from "@opengis/core";
4
4
  const Gn = /* @__PURE__ */ de({
@@ -200,10 +200,10 @@ const Gn = /* @__PURE__ */ de({
200
200
  }), fl(() => {
201
201
  window.removeEventListener("storage", s);
202
202
  }), (r, u) => (i(), p("div", {
203
- class: te(["w-full relative", { "opacity-60": r.item?.disabled }])
203
+ class: le(["w-full relative", { "opacity-60": r.item?.disabled }])
204
204
  }, [
205
205
  c("div", {
206
- class: te(["gap-2 md:flex-row md:items-center md:justify-between", [["switcher", "native-select"].includes(r.item.type) ? "flex flex-col" : ""]])
206
+ class: le(["gap-2 md:flex-row md:items-center md:justify-between", [["switcher", "native-select"].includes(r.item.type) ? "flex flex-col" : ""]])
207
207
  }, [
208
208
  c("div", so, [
209
209
  r.ua || r.label ? (i(), p("p", io, [
@@ -217,7 +217,7 @@ const Gn = /* @__PURE__ */ de({
217
217
  }, null, 8, fo)) : z("", !0)
218
218
  ]),
219
219
  c("div", {
220
- class: te(["w-full", ["select", "native-select"].includes(r.item.type) ? "md:w-[30%]" : "md:w-auto"])
220
+ class: le(["w-full", ["select", "native-select"].includes(r.item.type) ? "md:w-[30%]" : "md:w-auto"])
221
221
  }, [
222
222
  et(r.$slots, "default", en(tn(r.$attrs)))
223
223
  ], 2)
@@ -263,7 +263,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
263
263
  "onUpdate:modelValue": r[0] || (r[0] = (u) => a.value = u),
264
264
  placeholder: o.value,
265
265
  disabled: n.value,
266
- class: te(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [E(l), { "!border-red-600": s.error }]]),
266
+ class: le(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [E(l), { "!border-red-600": s.error }]]),
267
267
  style: {
268
268
  border: "1px solid #CFD9E0"
269
269
  }
@@ -301,7 +301,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
301
301
  maxlength: s.value,
302
302
  minlength: r.value,
303
303
  onBlur: u,
304
- class: te(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [f.customClass, E(l), { "!border-red-600": f.error }]]),
304
+ class: le(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [f.customClass, E(l), { "!border-red-600": f.error }]]),
305
305
  style: { border: "1px solid #CFD9E0" }
306
306
  }, null, 42, ho)), [
307
307
  [qe, a.value]
@@ -355,7 +355,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
355
355
  "onUpdate:modelValue": k[0] || (k[0] = ($) => n.value = $),
356
356
  placeholder: e.placeholder,
357
357
  disabled: o.value,
358
- class: te(["py-1.5 px-3 block w-full bg-white", [E(l)]]),
358
+ class: le(["py-1.5 px-3 block w-full bg-white", [E(l)]]),
359
359
  style: {
360
360
  border: "1px solid #CFD9E0"
361
361
  },
@@ -413,7 +413,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
413
413
  type: "checkbox",
414
414
  value: S.value,
415
415
  "onUpdate:modelValue": g[0] || (g[0] = (b) => n.value = b),
416
- class: te(["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": o.value }]),
416
+ class: le(["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": o.value }]),
417
417
  id: S.id,
418
418
  disabled: o.value
419
419
  }, null, 10, ko), [
@@ -421,10 +421,10 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
421
421
  ]),
422
422
  c("label", {
423
423
  for: S.id,
424
- class: te(["flex flex-1 checkbox-label items-center gap-x-2 cursor-pointer text-sm text-gray-800 dark:text-neutral-300", { "!cursor-not-allowed": o.value }])
424
+ class: le(["flex flex-1 checkbox-label items-center gap-x-2 cursor-pointer text-sm text-gray-800 dark:text-neutral-300", { "!cursor-not-allowed": o.value }])
425
425
  }, [
426
426
  c("div", {
427
- class: te(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [n.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", S.error ? "border-red-600" : ""]])
427
+ class: le(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [n.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", S.error ? "border-red-600" : ""]])
428
428
  }, [
429
429
  K(E(Fa), { class: "h-4 w-4" })
430
430
  ], 2),
@@ -508,7 +508,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
508
508
  };
509
509
  });
510
510
  return (b, h) => (i(), p("label", {
511
- class: te(["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, o.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
511
+ class: le(["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, o.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
512
512
  }, [
513
513
  Ve(c("input", {
514
514
  type: "checkbox",
@@ -653,13 +653,13 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
653
653
  ])) : (i(), p("button", {
654
654
  key: 1,
655
655
  type: "button",
656
- class: te(["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-${a.style?.primaryColor || "blue"}-500` : "bg-stone-200", a.customClass]]),
656
+ class: le(["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-${a.style?.primaryColor || "blue"}-500` : "bg-stone-200", a.customClass]]),
657
657
  disabled: a.disabled,
658
658
  onClick: n[2] || (n[2] = (o) => l.value = !l.value)
659
659
  }, [
660
660
  c("span", {
661
661
  "data-state": "checked",
662
- class: te(["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"]])
662
+ class: le(["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"]])
663
663
  }, null, 2)
664
664
  ], 10, Po));
665
665
  }
@@ -681,7 +681,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
681
681
  setup(e) {
682
682
  return (t, l) => (i(), p("div", {
683
683
  id: t.name,
684
- class: te(["text-gray-900", t.customClass]),
684
+ class: le(["text-gray-900", t.customClass]),
685
685
  innerHTML: t.html ? t.html : t.text
686
686
  }, null, 10, Ro));
687
687
  }
@@ -752,7 +752,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
752
752
  placeholder: r.placeholder,
753
753
  disabled: r.disabled,
754
754
  name: r.name,
755
- class: te(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [E(l)]]),
755
+ class: le(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [E(l)]]),
756
756
  style: {
757
757
  border: "1px solid #CFD9E0"
758
758
  }
@@ -786,7 +786,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
786
786
  "onUpdate:modelValue": o[0] || (o[0] = (s) => a.value = s),
787
787
  placeholder: n.placeholder,
788
788
  disabled: n.disabled,
789
- class: te(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [E(l), { "!border-red-600": n.error }]]),
789
+ class: le(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [E(l), { "!border-red-600": n.error }]]),
790
790
  style: {
791
791
  border: "1px solid #CFD9E0"
792
792
  }
@@ -836,7 +836,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
836
836
  maxlength: "15",
837
837
  placeholder: r.placeholder,
838
838
  disabled: r.disabled,
839
- class: te(["!pl-10 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [E(l), { "!border-red-600": r.error }]]),
839
+ class: le(["!pl-10 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [E(l), { "!border-red-600": r.error }]]),
840
840
  style: {
841
841
  border: "1px solid #CFD9E0"
842
842
  }
@@ -883,7 +883,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
883
883
  };
884
884
  });
885
885
  return (k, $) => (i(), p("label", {
886
- class: te(["flex items-center gap-0", [t.customClass, a.value ? "cursor-not-allowed opacity-60" : ""]])
886
+ class: le(["flex items-center gap-0", [t.customClass, a.value ? "cursor-not-allowed opacity-60" : ""]])
887
887
  }, [
888
888
  Ve(c("input", {
889
889
  "onUpdate:modelValue": $[0] || ($[0] = (S) => l.value = S),
@@ -895,14 +895,14 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
895
895
  [Un, l.value]
896
896
  ]),
897
897
  c("span", {
898
- class: te(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]", [
898
+ class: le(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]", [
899
899
  `border-${t.style?.primaryColor || "blue"}-500`,
900
900
  a.value ? "opacity-50 cursor-not-allowed" : ""
901
901
  ]])
902
902
  }, [
903
903
  l.value == t.value ? (i(), p("span", {
904
904
  key: 0,
905
- class: te(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${t.style?.primaryColor || "blue"}-500`]])
905
+ class: le(["w-[12px] h-[12px] shrink-0 rounded-full", [`bg-${t.style?.primaryColor || "blue"}-500`]])
906
906
  }, null, 2)) : z("", !0)
907
907
  ], 2),
908
908
  t.html ? (i(), p("div", {
@@ -975,7 +975,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
975
975
  };
976
976
  });
977
977
  return (k, $) => (i(), p("label", {
978
- class: te(["flex h-full w-full items-center border rounded-lg px-2 py-1", [
978
+ class: le(["flex h-full w-full items-center border rounded-lg px-2 py-1", [
979
979
  l.value == t.value ? `ring-2 ring-ring ring-${t.style?.primaryColor || "blue"}-500` : "",
980
980
  t.customClass,
981
981
  a.value ? "cursor-not-allowed opacity-60" : ""
@@ -1137,11 +1137,11 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
1137
1137
  return Qe(async () => {
1138
1138
  await $();
1139
1139
  }), (S, g) => (i(), p("div", {
1140
- class: te(u.value)
1140
+ class: le(u.value)
1141
1141
  }, [
1142
1142
  (i(!0), p(_e, null, De(E(k), (b) => (i(), p("div", {
1143
1143
  key: b?.id,
1144
- class: te(["flex items-stretch", S.position === "horizontal" ? t.customClass : ""]),
1144
+ class: le(["flex items-stretch", S.position === "horizontal" ? t.customClass : ""]),
1145
1145
  style: Me(f.value)
1146
1146
  }, [
1147
1147
  (i(), be(ut(a.value), zt({
@@ -1218,10 +1218,10 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
1218
1218
  const W = y.get(F) || [];
1219
1219
  if (!W.length)
1220
1220
  return null;
1221
- const H = F === null ? "group-null" : `group-${String(F)}`, ee = F === null ? fr : String(F);
1221
+ const H = F === null ? "group-null" : `group-${String(F)}`, te = F === null ? fr : String(F);
1222
1222
  return _.add(F), {
1223
1223
  key: H,
1224
- label: ee,
1224
+ label: te,
1225
1225
  options: W
1226
1226
  };
1227
1227
  }, R = [];
@@ -1283,13 +1283,13 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
1283
1283
  }, [
1284
1284
  _.label ? (i(), p("span", cr, ie(_.label), 1)) : z("", !0),
1285
1285
  c("div", {
1286
- class: te(["p-0 w-full gap-[12px]", b.value])
1286
+ class: le(["p-0 w-full gap-[12px]", b.value])
1287
1287
  }, [
1288
1288
  (i(!0), p(_e, null, De(_.options, (I) => (i(), be(Zl, {
1289
1289
  modelValue: n[f(I)],
1290
1290
  "onUpdate:modelValue": (R) => n[f(I)] = R,
1291
1291
  value: f(I),
1292
- class: te(g(y.colSpan)),
1292
+ class: le(g(y.colSpan)),
1293
1293
  disabled: l.disabled || I.disabled,
1294
1294
  label: S(I),
1295
1295
  labelHtml: k.value ? $(I) : "",
@@ -1303,13 +1303,13 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
1303
1303
  ]))), 128))
1304
1304
  ])) : (i(), p("div", {
1305
1305
  key: 0,
1306
- class: te(["p-0 w-full gap-[10px]", b.value])
1306
+ class: le(["p-0 w-full gap-[10px]", b.value])
1307
1307
  }, [
1308
1308
  (i(!0), p(_e, null, De(u.value, (_) => (i(), be(Zl, {
1309
1309
  modelValue: n[f(_)],
1310
1310
  "onUpdate:modelValue": (I) => n[f(_)] = I,
1311
1311
  value: f(_),
1312
- class: te(g(y.colSpan)),
1312
+ class: le(g(y.colSpan)),
1313
1313
  disabled: l.disabled || _.disabled,
1314
1314
  label: S(_),
1315
1315
  labelHtml: k.value ? $(_) : "",
@@ -1356,7 +1356,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
1356
1356
  placeholder: f.value,
1357
1357
  disabled: u.value,
1358
1358
  ref: "date",
1359
- class: te(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [v.modelValue ? "" : "text-opacity-50", E(n)].join(" ")]),
1359
+ class: le(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [v.modelValue ? "" : "text-opacity-50", E(n)].join(" ")]),
1360
1360
  style: {
1361
1361
  border: "1px solid #CFD9E0"
1362
1362
  }
@@ -1559,12 +1559,12 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
1559
1559
  if (!I) return;
1560
1560
  const [R, F] = I.split("="), W = R?.trim(), H = F?.trim();
1561
1561
  if (!W || !H) return;
1562
- const ee = _[H];
1563
- if (ee == null || ee === "") {
1562
+ const te = _[H];
1563
+ if (te == null || te === "") {
1564
1564
  V.push(H);
1565
1565
  return;
1566
1566
  }
1567
- y[W] = ee;
1567
+ y[W] = te;
1568
1568
  }), { params: y, missingSources: V };
1569
1569
  }), S = () => {
1570
1570
  const { params: y } = $.value;
@@ -1616,8 +1616,8 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
1616
1616
  return;
1617
1617
  }
1618
1618
  W.length < F.length && b("Деякі файли не вдалося завантажити. Перевірте їх та спробуйте знову.");
1619
- const H = W.map((X) => X.file_path), ee = Array.isArray(a.value) ? a.value : [];
1620
- a.value = [...ee, ...H], n("change", a.value);
1619
+ const H = W.map((X) => X.file_path), te = Array.isArray(a.value) ? a.value : [];
1620
+ a.value = [...te, ...H], n("change", a.value);
1621
1621
  } else {
1622
1622
  const R = V[0], F = await Sn(R, S());
1623
1623
  if (!F?.file_path) {
@@ -1660,7 +1660,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
1660
1660
  }, null, 8, ["multiple", "value", "item"]))), 128)),
1661
1661
  c("div", {
1662
1662
  onClick: h,
1663
- class: te([
1663
+ class: le([
1664
1664
  "relative 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",
1665
1665
  y.disabled || r.value ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
1666
1666
  ])
@@ -1674,7 +1674,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
1674
1674
  y.multiple ? z("", !0) : (i(), p("div", {
1675
1675
  key: 2,
1676
1676
  onClick: h,
1677
- class: te([y.disabled || r.value ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500", "relative 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"])
1677
+ class: le([y.disabled || r.value ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500", "relative 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"])
1678
1678
  }, [
1679
1679
  r.value ? (i(), p("div", Mr)) : (i(), be(E(xt), {
1680
1680
  key: 0,
@@ -1716,58 +1716,58 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
1716
1716
  }),
1717
1717
  emits: ["update:modelValue"],
1718
1718
  setup(e) {
1719
- const t = e, l = Oe(e, "modelValue"), a = D(null), n = D(null), o = D(""), s = D(0), r = D(!1), u = D(""), f = D(null), v = st("values"), k = w(() => t.format ? t.format.split(",").map((oe) => oe.trim().toLowerCase()).filter(Boolean) : []), $ = w(() => !n.value || !n.value.size ? 0 : Math.min(100, Math.round(s.value / n.value.size * 100))), S = w(() => n.value ? `${h(s.value)} / ${h(n.value.size)}` : ""), g = w(() => t.disabled ? "opacity-50 cursor-not-allowed" : r.value ? "cursor-default text-blue-500" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50 hover:text-blue-500"), b = () => {
1719
+ const t = e, l = Oe(e, "modelValue"), a = D(null), n = D(null), o = D(""), s = D(0), r = D(!1), u = D(""), f = D(null), v = st("values"), k = w(() => t.format ? t.format.split(",").map((re) => re.trim().toLowerCase()).filter(Boolean) : []), $ = w(() => !n.value || !n.value.size ? 0 : Math.min(100, Math.round(s.value / n.value.size * 100))), S = w(() => n.value ? `${h(s.value)} / ${h(n.value.size)}` : ""), g = w(() => t.disabled ? "opacity-50 cursor-not-allowed" : r.value ? "cursor-default text-blue-500" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50 hover:text-blue-500"), b = () => {
1720
1720
  t.disabled || r.value || _() && a.value?.click();
1721
- }, h = (oe) => {
1722
- if (!Number.isFinite(oe)) return "0 B";
1723
- const ne = ["B", "KB", "MB", "GB"];
1724
- let Y = 0, G = oe;
1725
- for (; G >= 1024 && Y < ne.length - 1; )
1721
+ }, h = (re) => {
1722
+ if (!Number.isFinite(re)) return "0 B";
1723
+ const ae = ["B", "KB", "MB", "GB"];
1724
+ let Y = 0, G = re;
1725
+ for (; G >= 1024 && Y < ae.length - 1; )
1726
1726
  G /= 1024, Y += 1;
1727
- return `${G.toFixed(Y === 0 ? 0 : 1)} ${ne[Y]}`;
1728
- }, C = (oe) => {
1727
+ return `${G.toFixed(Y === 0 ? 0 : 1)} ${ae[Y]}`;
1728
+ }, C = (re) => {
1729
1729
  if (!t.max_size) return !0;
1730
- const ne = t.max_size * 1024 * 1024;
1731
- return oe.size > ne ? (Ce({
1730
+ const ae = t.max_size * 1024 * 1024;
1731
+ return re.size > ae ? (Ce({
1732
1732
  type: "error",
1733
1733
  title: "Файл занадто великий",
1734
1734
  message: `Максимальний розмір ${t.max_size} МБ`,
1735
1735
  position: "right-bottom"
1736
1736
  }), !1) : !0;
1737
- }, y = (oe) => {
1737
+ }, y = (re) => {
1738
1738
  if (!k.value.length) return !0;
1739
- const ne = `.${oe.name.split(".").pop()?.toLowerCase() || ""}`;
1740
- return k.value.includes(ne) ? !0 : (Ce({
1739
+ const ae = `.${re.name.split(".").pop()?.toLowerCase() || ""}`;
1740
+ return k.value.includes(ae) ? !0 : (Ce({
1741
1741
  type: "error",
1742
1742
  title: "Непідтримуваний формат",
1743
1743
  message: `Дозволені формати: ${k.value.join(", ")}`,
1744
1744
  position: "right-bottom"
1745
1745
  }), !1);
1746
1746
  }, V = w(() => {
1747
- const oe = {}, ne = [];
1748
- if (!t.customParams?.length) return { params: oe, missing: ne };
1747
+ const re = {}, ae = [];
1748
+ if (!t.customParams?.length) return { params: re, missing: ae };
1749
1749
  const Y = v?.value ?? {};
1750
1750
  return t.customParams.forEach((G) => {
1751
1751
  if (!G) return;
1752
- const [O, ae] = G.split("="), ue = O?.trim(), he = ae?.trim();
1752
+ const [O, oe] = G.split("="), ue = O?.trim(), he = oe?.trim();
1753
1753
  if (!ue || !he) return;
1754
1754
  const $e = Y[he];
1755
- $e == null || $e === "" ? ne.push(he) : oe[ue] = $e;
1756
- }), { params: oe, missing: ne };
1755
+ $e == null || $e === "" ? ae.push(he) : re[ue] = $e;
1756
+ }), { params: re, missing: ae };
1757
1757
  }), _ = () => V.value.missing.length ? (Ce({
1758
1758
  type: "warning",
1759
1759
  title: "Заповніть поля",
1760
1760
  message: `Потрібні значення: ${V.value.missing.join(", ")}`,
1761
1761
  position: "right-bottom"
1762
- }), !1) : !0, I = (oe) => {
1763
- const ne = oe.target, Y = ne.files?.[0];
1762
+ }), !1) : !0, I = (re) => {
1763
+ const ae = re.target, Y = ae.files?.[0];
1764
1764
  if (Y) {
1765
1765
  if (!_()) {
1766
- ne.value = "";
1766
+ ae.value = "";
1767
1767
  return;
1768
1768
  }
1769
1769
  if (!C(Y) || !y(Y)) {
1770
- ne.value = "";
1770
+ ae.value = "";
1771
1771
  return;
1772
1772
  }
1773
1773
  n.value = Y, s.value = 0, o.value = "", u.value = "";
@@ -1779,44 +1779,44 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
1779
1779
  }
1780
1780
  try {
1781
1781
  u.value = "";
1782
- const oe = {
1782
+ const re = {
1783
1783
  id: o.value || "",
1784
1784
  fileName: n.value.name,
1785
1785
  subdir: t.subdir,
1786
1786
  size: n.value.size,
1787
1787
  ...V.value.params
1788
- }, ne = await fetch("/api/file/upload2/start", {
1788
+ }, ae = await fetch("/api/file/upload2/start", {
1789
1789
  method: "POST",
1790
1790
  headers: { "Content-Type": "application/json" },
1791
- body: JSON.stringify(oe)
1791
+ body: JSON.stringify(re)
1792
1792
  });
1793
- if (!ne.ok) throw new Error("Не вдалося ініціалізувати завантаження");
1794
- const Y = await ne.json();
1793
+ if (!ae.ok) throw new Error("Не вдалося ініціалізувати завантаження");
1794
+ const Y = await ae.json();
1795
1795
  o.value = Y.id || o.value, s.value = Y.uploaded || 0, await F();
1796
- } catch (oe) {
1797
- u.value = oe?.message || "Помилка при старті завантаження";
1796
+ } catch (re) {
1797
+ u.value = re?.message || "Помилка при старті завантаження";
1798
1798
  }
1799
1799
  }, F = async () => {
1800
1800
  if (!(!n.value || !o.value)) {
1801
1801
  r.value = !0;
1802
1802
  try {
1803
1803
  for (; s.value < n.value.size; ) {
1804
- const oe = s.value, ne = Math.min(oe + t.chunkSize, n.value.size), Y = n.value.slice(oe, ne);
1804
+ const re = s.value, ae = Math.min(re + t.chunkSize, n.value.size), Y = n.value.slice(re, ae);
1805
1805
  f.value = new AbortController();
1806
1806
  const G = await fetch(`/api/file/upload2/${o.value}`, {
1807
1807
  method: "PATCH",
1808
1808
  headers: {
1809
- "Content-Range": `bytes ${oe}-${ne - 1}/${n.value.size}`
1809
+ "Content-Range": `bytes ${re}-${ae - 1}/${n.value.size}`
1810
1810
  },
1811
1811
  body: Y,
1812
1812
  signal: f.value.signal
1813
1813
  });
1814
1814
  if (!G.ok) throw new Error("Помилка завантаження частини");
1815
1815
  const O = await G.json().catch(() => ({}));
1816
- if (O.uploaded != null ? s.value = Number(O.uploaded) : s.value = ne, O.finished || s.value >= n.value.size) {
1816
+ if (O.uploaded != null ? s.value = Number(O.uploaded) : s.value = ae, O.finished || s.value >= n.value.size) {
1817
1817
  r.value = !1;
1818
- const ae = O.file_path || O.url || o.value;
1819
- l.value = { file_id: O.file_id ?? o.value ?? ae, file_path: ae }, Ce({
1818
+ const oe = O.file_path || O.url || o.value;
1819
+ l.value = { file_id: O.file_id ?? o.value ?? oe, file_path: oe }, Ce({
1820
1820
  type: "success",
1821
1821
  title: "Файл завантажено",
1822
1822
  message: n.value.name,
@@ -1825,9 +1825,9 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
1825
1825
  return;
1826
1826
  }
1827
1827
  }
1828
- } catch (oe) {
1829
- if (oe?.name === "AbortError") return;
1830
- u.value = oe?.message || "Помилка при завантаженні", r.value = !1;
1828
+ } catch (re) {
1829
+ if (re?.name === "AbortError") return;
1830
+ u.value = re?.message || "Помилка при завантаженні", r.value = !1;
1831
1831
  } finally {
1832
1832
  f.value = null, r.value = !1;
1833
1833
  }
@@ -1842,13 +1842,13 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
1842
1842
  }
1843
1843
  await F();
1844
1844
  }
1845
- }, ee = () => {
1845
+ }, te = () => {
1846
1846
  f.value?.abort(), f.value = null, X();
1847
1847
  }, X = () => {
1848
- const oe = a.value;
1849
- oe && (oe.value = ""), n.value = null, o.value = "", s.value = 0, u.value = "";
1848
+ const re = a.value;
1849
+ re && (re.value = ""), n.value = null, o.value = "", s.value = 0, u.value = "";
1850
1850
  };
1851
- return (oe, ne) => (i(), p("div", Ar, [
1851
+ return (re, ae) => (i(), p("div", Ar, [
1852
1852
  c("div", Ir, [
1853
1853
  c("input", {
1854
1854
  ref_key: "fileInput",
@@ -1862,16 +1862,16 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
1862
1862
  l.value ? (i(), be(Jl, {
1863
1863
  key: 0,
1864
1864
  item: l.value,
1865
- "onUpdate:item": ne[0] || (ne[0] = (Y) => l.value = Y),
1865
+ "onUpdate:item": ae[0] || (ae[0] = (Y) => l.value = Y),
1866
1866
  value: l.value,
1867
- "onUpdate:value": ne[1] || (ne[1] = (Y) => l.value = Y)
1867
+ "onUpdate:value": ae[1] || (ae[1] = (Y) => l.value = Y)
1868
1868
  }, null, 8, ["item", "value"])) : (i(), p("div", {
1869
1869
  key: 1,
1870
1870
  onClick: b,
1871
- class: te(["relative h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg flex items-center justify-center transition-all duration-300", g.value])
1871
+ class: le(["relative h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg flex items-center justify-center transition-all duration-300", g.value])
1872
1872
  }, [
1873
1873
  r.value ? (i(), p("div", Tr, [
1874
- ne[2] || (ne[2] = c("div", { class: "loader" }, null, -1)),
1874
+ ae[2] || (ae[2] = c("div", { class: "loader" }, null, -1)),
1875
1875
  c("span", null, ie($.value) + "%", 1)
1876
1876
  ])) : (i(), be(E(xt), {
1877
1877
  key: 1,
@@ -1915,7 +1915,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
1915
1915
  c("button", {
1916
1916
  type: "button",
1917
1917
  class: "rounded border border-rose-200 px-3 py-1 text-rose-600",
1918
- onClick: ee
1918
+ onClick: te
1919
1919
  }, " Cancel ")
1920
1920
  ]),
1921
1921
  u.value ? (i(), p("p", zr, ie(u.value), 1)) : z("", !0)
@@ -2284,7 +2284,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
2284
2284
  class: "flex items-center gap-2"
2285
2285
  }, [
2286
2286
  K(E(pl), {
2287
- class: te(["h-4 w-4 duration-300", [l.value ? "-rotate-180" : ""]])
2287
+ class: le(["h-4 w-4 duration-300", [l.value ? "-rotate-180" : ""]])
2288
2288
  }, null, 8, ["class"]),
2289
2289
  c("span", Cs, ie(e.title), 1)
2290
2290
  ]),
@@ -2535,7 +2535,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
2535
2535
  set: (o) => a("update:keyWord", o)
2536
2536
  });
2537
2537
  return (o, s) => (i(), p("div", {
2538
- class: te([
2538
+ class: le([
2539
2539
  "vs-input-select__control flex min-h-[38px] items-center justify-between rounded transition-colors bg-white",
2540
2540
  o.disabled ? "bg-gray-100 text-gray-400 cursor-not-allowed" : ""
2541
2541
  ]),
@@ -2563,7 +2563,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
2563
2563
  }, null, 4)) : z("", !0),
2564
2564
  !o.optionTemplate && o.optionHasIcon(r) ? (i(), p("span", {
2565
2565
  key: 1,
2566
- class: te(o.iconWrapperClass),
2566
+ class: le(o.iconWrapperClass),
2567
2567
  style: Me(o.getIconColorStyle(r)),
2568
2568
  "aria-hidden": "true"
2569
2569
  }, [
@@ -2632,7 +2632,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
2632
2632
  }, null, 4)) : z("", !0),
2633
2633
  !o.optionTemplate && o.optionHasIcon(o.selectedOption) ? (i(), p("span", {
2634
2634
  key: 1,
2635
- class: te(o.iconWrapperClass),
2635
+ class: le(o.iconWrapperClass),
2636
2636
  style: Me(o.getIconColorStyle(o.selectedOption)),
2637
2637
  "aria-hidden": "true"
2638
2638
  }, [
@@ -2746,7 +2746,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
2746
2746
  key: a.id,
2747
2747
  ref_for: !0,
2748
2748
  ref: (o) => t.setItemRef(o, n),
2749
- class: te([
2749
+ class: le([
2750
2750
  "flex px-3 py-2 gap-2 cursor-pointer select-none text-gray-900",
2751
2751
  t.isSelected(a.id) ? "bg-[#2684ff] text-white" : "bg-white hover:bg-[#deebff] hover:text-[#172b4d]",
2752
2752
  t.selectedNavIndex === n && !t.isSelected(a.id) ? "bg-[#deebff] text-[#172b4d]" : ""
@@ -2763,7 +2763,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
2763
2763
  }, null, 4)) : z("", !0),
2764
2764
  !t.optionTemplate && t.optionHasIcon(a) ? (i(), p("span", {
2765
2765
  key: 1,
2766
- class: te(t.iconWrapperClass),
2766
+ class: le(t.iconWrapperClass),
2767
2767
  style: Me(t.getIconColorStyle(a)),
2768
2768
  "aria-hidden": "true"
2769
2769
  }, [
@@ -2832,52 +2832,52 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
2832
2832
  k.value = T;
2833
2833
  }, R = (T) => {
2834
2834
  v.value = T;
2835
- }, F = (T, Q) => {
2836
- h.value[Q] = T;
2837
- }, W = D({}), H = D([]), ee = w(() => {
2835
+ }, F = (T, ee) => {
2836
+ h.value[ee] = T;
2837
+ }, W = D({}), H = D([]), te = w(() => {
2838
2838
  if (!H.value.length) return [];
2839
- const T = Ee.value, Q = new Map(T.map((ve) => [ve.id?.toString(), ve]));
2840
- return H.value.map((ve) => Q.get(ve?.toString())).filter((ve) => !!ve);
2841
- }), X = w(() => l.placeholder || "Select..."), oe = w(() => $e(g.value)), ne = w(() => o.value ? !1 : n.value ? H.value.length > 0 : !!r.value), Y = (T) => n.value ? H.value.some((Q) => Q?.toString() === T?.toString()) : r.value?.toString() === T?.toString(), G = w(() => {
2839
+ const T = Ee.value, ee = new Map(T.map((ve) => [ve.id?.toString(), ve]));
2840
+ return H.value.map((ve) => ee.get(ve?.toString())).filter((ve) => !!ve);
2841
+ }), X = w(() => l.placeholder || "Select..."), re = w(() => $e(g.value)), ae = w(() => o.value ? !1 : n.value ? H.value.length > 0 : !!r.value), Y = (T) => n.value ? H.value.some((ee) => ee?.toString() === T?.toString()) : r.value?.toString() === T?.toString(), G = w(() => {
2842
2842
  let T = Ee.value ?? [];
2843
2843
  if (!l.data && C.value.trim() !== "") {
2844
- const Q = C.value.toLowerCase();
2844
+ const ee = C.value.toLowerCase();
2845
2845
  T = T.filter((ve) => {
2846
2846
  const Ae = $e(ve).toLowerCase(), Ge = ve.text?.toLowerCase?.() || "";
2847
- return Ae.includes(Q) || Ge.includes(Q);
2847
+ return Ae.includes(ee) || Ge.includes(ee);
2848
2848
  });
2849
2849
  }
2850
2850
  if (n.value && H.value.length) {
2851
- const Q = new Set(H.value.map((ve) => ve?.toString()));
2852
- T = T.filter((ve) => !Q.has(ve.id?.toString()));
2851
+ const ee = new Set(H.value.map((ve) => ve?.toString()));
2852
+ T = T.filter((ve) => !ee.has(ve.id?.toString()));
2853
2853
  }
2854
2854
  return T;
2855
- }), O = st("values"), ae = st("field-props"), ue = w(() => l.slot ?? l?.optionTemplate ?? ""), he = (T) => Ol(T, ue.value), $e = (T) => cn(T, ue.value), Ze = w(() => sn(ue.value)), He = (T) => vl(T), re = (T) => !!(!Ze.value && tl(T) && !He(T)), ge = (T) => {
2856
- const Q = tl(T);
2857
- return Q ? { color: Q } : void 0;
2858
- }, Ie = (T) => !!(!Ze.value && (ml(T) || He(T))), xe = (T, Q, ve) => {
2859
- if (!ae) return !1;
2860
- const Ae = ae.value?.[T] ?? {}, Ge = (Ke, gt, At) => {
2855
+ }), O = st("values"), oe = st("field-props"), ue = w(() => l.slot ?? l?.optionTemplate ?? ""), he = (T) => Ol(T, ue.value), $e = (T) => cn(T, ue.value), Ze = w(() => sn(ue.value)), He = (T) => vl(T), se = (T) => !!(!Ze.value && tl(T) && !He(T)), ge = (T) => {
2856
+ const ee = tl(T);
2857
+ return ee ? { color: ee } : void 0;
2858
+ }, Ie = (T) => !!(!Ze.value && (ml(T) || He(T))), xe = (T, ee, ve) => {
2859
+ if (!oe) return !1;
2860
+ const Ae = oe.value?.[T] ?? {}, Ge = (Ke, gt, At) => {
2861
2861
  if (!gt.length) return Ke;
2862
2862
  const [yt, ...$t] = gt, ht = { ...Ke };
2863
2863
  if (!$t.length)
2864
2864
  return ht[yt] = At, ht;
2865
2865
  const ol = typeof Ke[yt] == "object" && Ke[yt] !== null ? Ke[yt] : {};
2866
2866
  return ht[yt] = Ge(ol, $t, At), ht;
2867
- }, Je = Ge(Ae, Q, ve);
2868
- return ae.value = {
2869
- ...ae.value || {},
2867
+ }, Je = Ge(Ae, ee, ve);
2868
+ return oe.value = {
2869
+ ...oe.value || {},
2870
2870
  [T]: Je
2871
2871
  }, !0;
2872
2872
  }, Se = (T) => {
2873
2873
  if (!l.set) return;
2874
- const Q = O?.value;
2875
- !Q && !ae || Object.entries(l.set).forEach(([ve, Ae]) => {
2874
+ const ee = O?.value;
2875
+ !ee && !oe || Object.entries(l.set).forEach(([ve, Ae]) => {
2876
2876
  if (!ve) return;
2877
2877
  const Ge = T ? T[Ae] : null, Je = ve.split(".").map((At) => At.trim()).filter(Boolean);
2878
2878
  if (!Je.length) return;
2879
2879
  const [Ke, ...gt] = Je;
2880
- gt.length && xe(Ke, gt, Ge ?? null) || Q && (Q[Ke] = Ge ?? null);
2880
+ gt.length && xe(Ke, gt, Ge ?? null) || ee && (ee[Ke] = Ge ?? null);
2881
2881
  });
2882
2882
  }, {
2883
2883
  optionsList: Ee,
@@ -2899,36 +2899,36 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
2899
2899
  Ee.value = T;
2900
2900
  return;
2901
2901
  }
2902
- const Q = new Set(T.map((Ae) => Ne(Ae.id)).filter(Boolean));
2902
+ const ee = new Set(T.map((Ae) => Ne(Ae.id)).filter(Boolean));
2903
2903
  if (n.value) {
2904
2904
  const Ae = new Set(H.value.map((Je) => Ne(Je)).filter(Boolean)), Ge = (Ee.value ?? []).filter((Je) => {
2905
2905
  const Ke = Ne(Je.id);
2906
- return !Ke || !Ae.has(Ke) ? !1 : !Q.has(Ke);
2906
+ return !Ke || !Ae.has(Ke) ? !1 : !ee.has(Ke);
2907
2907
  });
2908
2908
  Ee.value = [...Ge, ...T];
2909
2909
  return;
2910
2910
  }
2911
2911
  const ve = Ne(g.value?.id);
2912
- if (ve && !Q.has(ve)) {
2912
+ if (ve && !ee.has(ve)) {
2913
2913
  Ee.value = [g.value, ...T];
2914
2914
  return;
2915
2915
  }
2916
2916
  Ee.value = T;
2917
- }, le = async () => {
2917
+ }, Q = async () => {
2918
2918
  if (l.data) {
2919
2919
  const T = await it(C.value);
2920
2920
  return N(T), Ee.value;
2921
2921
  }
2922
2922
  return _t();
2923
- }, se = async (T) => {
2923
+ }, ne = async (T) => {
2924
2924
  if (T == null || T === "") return null;
2925
- const Q = Ee.value?.find((ve) => ve?.id?.toString() === String(T));
2926
- return Q || kt(T);
2925
+ const ee = Ee.value?.find((ve) => ve?.id?.toString() === String(T));
2926
+ return ee || kt(T);
2927
2927
  }, we = async (T) => {
2928
- const Q = new Set(Ee.value.map((Ae) => Ae.id?.toString())), ve = T.filter((Ae) => !Q.has(Ae?.toString()));
2928
+ const ee = new Set(Ee.value.map((Ae) => Ae.id?.toString())), ve = T.filter((Ae) => !ee.has(Ae?.toString()));
2929
2929
  ve.length && await ve.reduce(async (Ae, Ge) => {
2930
2930
  await Ae;
2931
- const Je = await se(Ge);
2931
+ const Je = await ne(Ge);
2932
2932
  Je && Ee.value.push(Je);
2933
2933
  }, Promise.resolve());
2934
2934
  }, ke = () => {
@@ -2938,14 +2938,14 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
2938
2938
  }
2939
2939
  let T = 0;
2940
2940
  if (!n.value && g.value) {
2941
- const Q = g.value.id?.toString(), ve = G.value.findIndex((Ae) => Ae.id?.toString() === Q);
2941
+ const ee = g.value.id?.toString(), ve = G.value.findIndex((Ae) => Ae.id?.toString() === ee);
2942
2942
  ve >= 0 && (T = ve);
2943
2943
  }
2944
2944
  b.value = T, Xe(() => {
2945
2945
  P(h.value[T], v.value);
2946
2946
  });
2947
2947
  }, Pe = async () => {
2948
- o.value || ($.value = !0, await le(), await Xe(() => {
2948
+ o.value || ($.value = !0, await Q(), await Xe(() => {
2949
2949
  j(), y.value?.focus();
2950
2950
  }), ke());
2951
2951
  }, Fe = () => {
@@ -2968,9 +2968,9 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
2968
2968
  y.value?.focus(), $.value || Pe();
2969
2969
  });
2970
2970
  }, fe = (T) => {
2971
- n.value && (H.value = H.value.filter((Q) => Q?.toString() !== T?.toString()), r.value = [...H.value], a("change", r.value), We(null), Xe(() => y.value?.focus()));
2972
- }, We = (T, Q) => {
2973
- const ve = Q ?? (n.value ? [...H.value] : T?.id ?? null);
2971
+ n.value && (H.value = H.value.filter((ee) => ee?.toString() !== T?.toString()), r.value = [...H.value], a("change", r.value), We(null), Xe(() => y.value?.focus()));
2972
+ }, We = (T, ee) => {
2973
+ const ve = ee ?? (n.value ? [...H.value] : T?.id ?? null);
2974
2974
  a("value-selected", {
2975
2975
  name: l.name,
2976
2976
  value: ve,
@@ -2986,27 +2986,27 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
2986
2986
  return;
2987
2987
  }
2988
2988
  B(T);
2989
- }, P = (T, Q) => {
2990
- if (!T || !Q) return;
2991
- const ve = T.offsetTop, Ae = ve + T.offsetHeight, Ge = Q.scrollTop, Je = Ge + Q.clientHeight;
2992
- let Ke = Q.scrollTop;
2993
- ve < Ge ? Ke = ve - 80 : Ae > Je && (Ke = Ae - Q.clientHeight + 4);
2994
- const gt = Q;
2989
+ }, P = (T, ee) => {
2990
+ if (!T || !ee) return;
2991
+ const ve = T.offsetTop, Ae = ve + T.offsetHeight, Ge = ee.scrollTop, Je = Ge + ee.clientHeight;
2992
+ let Ke = ee.scrollTop;
2993
+ ve < Ge ? Ke = ve - 80 : Ae > Je && (Ke = Ae - ee.clientHeight + 4);
2994
+ const gt = ee;
2995
2995
  gt.scrollTop = Ke;
2996
2996
  }, L = (T) => {
2997
- let Q = T.parentElement;
2998
- for (; Q; ) {
2999
- if (Q.classList.contains("ui-dialog__content"))
3000
- return Q;
3001
- const ve = window.getComputedStyle(Q), Ae = ve.overflow + ve.overflowY + ve.overflowX;
3002
- if (Ae.includes("auto") || Ae.includes("scroll") || Q === document.body || Q === document.documentElement)
3003
- return Q;
3004
- Q = Q.parentElement;
2997
+ let ee = T.parentElement;
2998
+ for (; ee; ) {
2999
+ if (ee.classList.contains("ui-dialog__content"))
3000
+ return ee;
3001
+ const ve = window.getComputedStyle(ee), Ae = ve.overflow + ve.overflowY + ve.overflowX;
3002
+ if (Ae.includes("auto") || Ae.includes("scroll") || ee === document.body || ee === document.documentElement)
3003
+ return ee;
3004
+ ee = ee.parentElement;
3005
3005
  }
3006
3006
  return document.body;
3007
3007
  }, j = () => {
3008
3008
  if (!f.value) return;
3009
- const T = f.value.getBoundingClientRect(), Q = window.innerHeight || document.documentElement.clientHeight, ve = window.innerWidth || document.documentElement.clientWidth, Ae = 8, Ge = 8, Je = l.maxHeight || 300, Ke = Q - T.bottom - Ge - Ae, gt = T.top - Ge - Ae, At = Ke >= gt, yt = Math.max(ve - Ae * 2, 0);
3009
+ const T = f.value.getBoundingClientRect(), ee = window.innerHeight || document.documentElement.clientHeight, ve = window.innerWidth || document.documentElement.clientWidth, Ae = 8, Ge = 8, Je = l.maxHeight || 300, Ke = ee - T.bottom - Ge - Ae, gt = T.top - Ge - Ae, At = Ke >= gt, yt = Math.max(ve - Ae * 2, 0);
3010
3010
  let { width: $t } = T;
3011
3011
  yt > 0 && $t > yt && ($t = yt);
3012
3012
  let { left: ht } = T;
@@ -3027,16 +3027,16 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
3027
3027
  o.value || !$.value && (T.key === "ArrowDown" || T.key === "ArrowUp") && (T.preventDefault(), await Pe());
3028
3028
  }, pe = (T) => {
3029
3029
  if (!$.value) return;
3030
- const { key: Q } = T;
3031
- if (Q === "ArrowDown")
3030
+ const { key: ee } = T;
3031
+ if (ee === "ArrowDown")
3032
3032
  T.preventDefault(), b.value + 1 < G.value.length && (b.value += 1, P(h.value[b.value], v.value));
3033
- else if (Q === "ArrowUp")
3033
+ else if (ee === "ArrowUp")
3034
3034
  T.preventDefault(), b.value > 0 && (b.value -= 1, P(h.value[b.value], v.value));
3035
- else if (Q === "Enter") {
3035
+ else if (ee === "Enter") {
3036
3036
  T.preventDefault();
3037
3037
  const ve = G.value[b.value];
3038
3038
  ve && B(ve), y.value?.blur();
3039
- } else Q === "Escape" ? (T.preventDefault(), Fe()) : Q === "Backspace" ? n.value && C.value === "" && H.value.length && (H.value = H.value.slice(0, -1), r.value = [...H.value], a("change", r.value)) : Q === "Home" ? (b.value = 0, P(h.value[0], v.value)) : Q === "End" ? (b.value = G.value.length - 1, P(h.value[b.value], v.value)) : Q === "Tab" && Fe();
3039
+ } else ee === "Escape" ? (T.preventDefault(), Fe()) : ee === "Backspace" ? n.value && C.value === "" && H.value.length && (H.value = H.value.slice(0, -1), r.value = [...H.value], a("change", r.value)) : ee === "Home" ? (b.value = 0, P(h.value[0], v.value)) : ee === "End" ? (b.value = G.value.length - 1, P(h.value[b.value], v.value)) : ee === "Tab" && Fe();
3040
3040
  }, Le = () => {
3041
3041
  o.value || (S.value = !0);
3042
3042
  }, ct = () => {
@@ -3044,8 +3044,8 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
3044
3044
  }, ot = (T) => {
3045
3045
  T.key === "Escape" && $.value && Fe();
3046
3046
  }, Mt = (T) => {
3047
- const Q = T.target;
3048
- u.value?.contains(Q) || k.value?.contains(Q) || Fe();
3047
+ const ee = T.target;
3048
+ u.value?.contains(ee) || k.value?.contains(ee) || Fe();
3049
3049
  }, nt = (T) => {
3050
3050
  $.value && v.value && !v.value.contains(T.target) && j();
3051
3051
  }, rt = () => {
@@ -3061,7 +3061,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
3061
3061
  const T = r.value[0] ?? null;
3062
3062
  r.value = T ?? null;
3063
3063
  }
3064
- r.value != null && (g.value = await se(r.value)), Se(g.value ?? null);
3064
+ r.value != null && (g.value = await ne(r.value)), Se(g.value ?? null);
3065
3065
  }
3066
3066
  }
3067
3067
  me(r, () => {
@@ -3086,10 +3086,10 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
3086
3086
  selectedOption: g,
3087
3087
  modelValue: r
3088
3088
  });
3089
- function Ul(T, Q = 200) {
3089
+ function Ul(T, ee = 200) {
3090
3090
  let ve;
3091
3091
  return (...Ae) => {
3092
- ve && clearTimeout(ve), ve = window.setTimeout(() => T(...Ae), Q);
3092
+ ve && clearTimeout(ve), ve = window.setTimeout(() => T(...Ae), ee);
3093
3093
  };
3094
3094
  }
3095
3095
  const al = Ul(async (T) => {
@@ -3102,14 +3102,14 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
3102
3102
  }, { immediate: !0 });
3103
3103
  const ft = D(!0);
3104
3104
  return me(Re, async () => {
3105
- if (l.data && (ft.value || (n.value ? (H.value = [], r.value = [], a("change", [])) : (g.value = null, r.value = null, a("change", null))), await le(), l.auto === 1 && Re.value && Ee.value.length > 0)) {
3105
+ if (l.data && (ft.value || (n.value ? (H.value = [], r.value = [], a("change", [])) : (g.value = null, r.value = null, a("change", null))), await Q(), l.auto === 1 && Re.value && Ee.value.length > 0)) {
3106
3106
  const T = Ee.value[0];
3107
3107
  T && B(T);
3108
3108
  }
3109
- }), (T, Q) => (i(), p(_e, null, [
3109
+ }), (T, ee) => (i(), p(_e, null, [
3110
3110
  K(E(Bl), {
3111
3111
  visible: E(qt),
3112
- "onUpdate:visible": Q[1] || (Q[1] = (ve) => Fl(qt) ? qt.value = ve : null),
3112
+ "onUpdate:visible": ee[1] || (ee[1] = (ve) => Fl(qt) ? qt.value = ve : null),
3113
3113
  class: "z-[1000]",
3114
3114
  title: E(Wt),
3115
3115
  buttonText: "Додати",
@@ -3120,7 +3120,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
3120
3120
  K(Rt, {
3121
3121
  schema: E(Nl),
3122
3122
  modelValue: E(Nt),
3123
- "onUpdate:modelValue": Q[0] || (Q[0] = (ve) => Fl(Nt) ? Nt.value = ve : null),
3123
+ "onUpdate:modelValue": ee[0] || (ee[0] = (ve) => Fl(Nt) ? Nt.value = ve : null),
3124
3124
  ref_key: "addForm",
3125
3125
  ref: jt
3126
3126
  }, null, 8, ["schema", "modelValue"])
@@ -3131,17 +3131,17 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
3131
3131
  class: "flex gap-1 w-full",
3132
3132
  ref_key: "selectRoot",
3133
3133
  ref: u,
3134
- onClick: Q[4] || (Q[4] = Be(() => {
3134
+ onClick: ee[4] || (ee[4] = Be(() => {
3135
3135
  }, ["stop"]))
3136
3136
  }, [
3137
3137
  c("div", {
3138
- class: te(["relative w-full font-sans", l.customClass])
3138
+ class: le(["relative w-full font-sans", l.customClass])
3139
3139
  }, [
3140
- Q[5] || (Q[5] = c("span", {
3140
+ ee[5] || (ee[5] = c("span", {
3141
3141
  id: "react-select-live-region",
3142
3142
  class: "sr-only"
3143
3143
  }, null, -1)),
3144
- Q[6] || (Q[6] = c("span", {
3144
+ ee[6] || (ee[6] = c("span", {
3145
3145
  "aria-live": "polite",
3146
3146
  "aria-atomic": "false",
3147
3147
  "aria-relevant": "additions text",
@@ -3150,23 +3150,23 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
3150
3150
  }, null, -1)),
3151
3151
  K(ui, {
3152
3152
  keyWord: C.value,
3153
- "onUpdate:keyWord": Q[2] || (Q[2] = (ve) => C.value = ve),
3153
+ "onUpdate:keyWord": ee[2] || (ee[2] = (ve) => C.value = ve),
3154
3154
  disabled: o.value,
3155
3155
  "is-open": $.value,
3156
3156
  "input-focus": S.value,
3157
3157
  "is-multi": n.value,
3158
- "selected-options": ee.value,
3158
+ "selected-options": te.value,
3159
3159
  "selected-ids": H.value,
3160
3160
  placeholder: X.value,
3161
3161
  search: s.value,
3162
3162
  "option-template": ue.value,
3163
3163
  "icon-wrapper-class": Mn,
3164
- "selected-option-label": oe.value,
3164
+ "selected-option-label": re.value,
3165
3165
  "selected-option": g.value,
3166
- "show-clear": ne.value,
3166
+ "show-clear": ae.value,
3167
3167
  "set-trigger-ref": V,
3168
3168
  "set-input-ref": _,
3169
- "should-show-color-dot": re,
3169
+ "should-show-color-dot": se,
3170
3170
  "option-has-icon": Ie,
3171
3171
  "get-icon-color-style": ge,
3172
3172
  "resolve-option-icon": He,
@@ -3193,7 +3193,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
3193
3193
  "set-item-ref": F,
3194
3194
  "is-selected": Y,
3195
3195
  "on-option-click": U,
3196
- "should-show-color-dot": re,
3196
+ "should-show-color-dot": se,
3197
3197
  "option-has-icon": Ie,
3198
3198
  "get-icon-color-style": ge,
3199
3199
  "resolve-option-icon": He,
@@ -3202,14 +3202,14 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
3202
3202
  ], 2),
3203
3203
  l.add ? (i(), p("button", {
3204
3204
  key: 0,
3205
- onClick: Q[3] || (Q[3] = //@ts-ignore
3205
+ onClick: ee[3] || (ee[3] = //@ts-ignore
3206
3206
  (...ve) => E(Dt) && E(Dt)(...ve)),
3207
3207
  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",
3208
3208
  disabled: o.value,
3209
3209
  type: "button"
3210
3210
  }, [
3211
3211
  K(E(xt), { class: "h-4 w-4" }),
3212
- Q[7] || (Q[7] = c("span", null, "Додати", -1))
3212
+ ee[7] || (ee[7] = c("span", null, "Додати", -1))
3213
3213
  ], 8, vi)) : z("", !0)
3214
3214
  ], 512)
3215
3215
  ], 64));
@@ -3242,7 +3242,7 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
3242
3242
  disabled: n.value,
3243
3243
  row: "2",
3244
3244
  onBlur: s,
3245
- class: te(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto bg-white", [E(l)]]),
3245
+ class: le(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto bg-white", [E(l)]]),
3246
3246
  style: {
3247
3247
  border: "1px solid #CFD9E0"
3248
3248
  }
@@ -3270,13 +3270,13 @@ const go = ["placeholder", "disabled"], yo = /* @__PURE__ */ de({
3270
3270
  }),
3271
3271
  emits: ["update:modelValue"],
3272
3272
  setup(e) {
3273
- const t = La(() => import("./vs-richtext-C-awlwuu.js")), l = e, { inputClass: a } = at(l.style), n = Oe(e, "modelValue"), o = w(() => !!l.disabled), s = w(() => l.placeholder ?? ""), r = w(() => ({
3273
+ const t = La(() => import("./vs-richtext-BJZllwDF.js")), l = e, { inputClass: a } = at(l.style), n = Oe(e, "modelValue"), o = w(() => !!l.disabled), s = w(() => l.placeholder ?? ""), r = w(() => ({
3274
3274
  height: l.richtextProps.height || "300px",
3275
3275
  format: l.format,
3276
3276
  ...l.richtextProps
3277
3277
  }));
3278
3278
  return (u, f) => (i(), p("div", {
3279
- class: te(["!h-full", [u.customClass, E(a)]]),
3279
+ class: le(["!h-full", [u.customClass, E(a)]]),
3280
3280
  style: Me(o.value ? { pointerEvents: "none", opacity: 0.6 } : {})
3281
3281
  }, [
3282
3282
  K(E(t), zt({
@@ -3342,15 +3342,15 @@ const _i = /* @__PURE__ */ je(wi, [["render", ki]]), $i = { class: "bg-white rou
3342
3342
  emits: ["update:modelValue"],
3343
3343
  setup(e) {
3344
3344
  const t = e, l = Da(), a = (N) => t.actions === void 0 ? !0 : t.actions.includes(N), n = ["search", "import", "export", "add"], o = w(() => n.some((N) => a(N))), s = Oe(e, "modelValue"), r = D({}), u = D(""), f = D(null), v = D("asc"), k = w(() => {
3345
- const N = s.value ?? [], le = u.value ? N.filter((ke) => $.value?.some((Pe) => {
3345
+ const N = s.value ?? [], Q = u.value ? N.filter((ke) => $.value?.some((Pe) => {
3346
3346
  const Fe = Pe.key || Pe.name;
3347
3347
  if (!Fe) return !1;
3348
3348
  const Ue = ke[Fe];
3349
3349
  return Ue ? Array.isArray(Ue) ? Ue.join(", ").toLowerCase().includes(u.value.toLowerCase()) : String(Ue).toLowerCase().includes(u.value.toLowerCase()) : !1;
3350
3350
  })) : N;
3351
- if (!f.value) return le;
3352
- const se = f.value, we = [...le].sort((ke, Pe) => {
3353
- const Fe = ge(ke?.[se]), Ue = ge(Pe?.[se]);
3351
+ if (!f.value) return Q;
3352
+ const ne = f.value, we = [...Q].sort((ke, Pe) => {
3353
+ const Fe = ge(ke?.[ne]), Ue = ge(Pe?.[ne]);
3354
3354
  return typeof Fe == "number" && typeof Ue == "number" ? Fe - Ue : String(Fe).localeCompare(String(Ue));
3355
3355
  });
3356
3356
  return v.value === "asc" ? we : we.reverse();
@@ -3363,16 +3363,16 @@ const _i = /* @__PURE__ */ je(wi, [["render", ki]]), $i = { class: "bg-white rou
3363
3363
  S.value = null, g.value = null;
3364
3364
  return;
3365
3365
  }
3366
- const le = [...s.value], [se] = le.splice(S.value, 1);
3367
- le.splice(N, 0, se), s.value = le, S.value = null, g.value = null;
3366
+ const Q = [...s.value], [ne] = Q.splice(S.value, 1);
3367
+ Q.splice(N, 0, ne), s.value = Q, S.value = null, g.value = null;
3368
3368
  }, V = () => {
3369
3369
  b.value && b.value.click();
3370
3370
  }, _ = (N) => {
3371
- const le = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tiff", ".tif"], se = N.toLowerCase();
3372
- return le.some((we) => se.endsWith(we));
3371
+ const Q = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico", ".tiff", ".tif"], ne = N.toLowerCase();
3372
+ return Q.some((we) => ne.endsWith(we));
3373
3373
  }, I = (N) => {
3374
- const se = N.target.files?.[0];
3375
- if (!se) return;
3374
+ const ne = N.target.files?.[0];
3375
+ if (!ne) return;
3376
3376
  const we = new FileReader();
3377
3377
  we.onload = (ke) => {
3378
3378
  try {
@@ -3384,47 +3384,47 @@ const _i = /* @__PURE__ */ je(wi, [["render", ki]]), $i = { class: "bg-white rou
3384
3384
  } catch (Pe) {
3385
3385
  console.error("Error parsing file:", Pe);
3386
3386
  }
3387
- }, we.readAsText(se);
3387
+ }, we.readAsText(ne);
3388
3388
  }, R = () => {
3389
- const N = JSON.stringify(s.value, null, 2), le = new Blob([N], { type: "application/json" }), se = URL.createObjectURL(le), we = document.createElement("a");
3390
- we.href = se, we.download = "data.json", we.click(), URL.revokeObjectURL(se);
3389
+ const N = JSON.stringify(s.value, null, 2), Q = new Blob([N], { type: "application/json" }), ne = URL.createObjectURL(Q), we = document.createElement("a");
3390
+ we.href = ne, we.download = "data.json", we.click(), URL.revokeObjectURL(ne);
3391
3391
  }, F = /* @__PURE__ */ new Set([
3392
3392
  "autocomplete",
3393
3393
  "select",
3394
3394
  "radio",
3395
3395
  "checkbox",
3396
3396
  "combobox"
3397
- ]), W = /* @__PURE__ */ new Map(), H = (N, le) => {
3398
- const se = `/api/suggest/${N}`, we = se.includes("?") ? "&" : "?", ke = le ? `&val=${le}` : "";
3399
- return `${se}${we}json=1${ke}`;
3400
- }, ee = (N) => N == null || N === "" ? null : typeof N == "object" ? N?.id !== void 0 && N.id !== null && N.id !== "" ? N.id : null : N, X = (N) => {
3401
- const le = /* @__PURE__ */ new Set();
3402
- return Array.isArray(s.value) && s.value.forEach((se) => {
3403
- const we = se?.[N];
3397
+ ]), W = /* @__PURE__ */ new Map(), H = (N, Q) => {
3398
+ const ne = `/api/suggest/${N}`, we = ne.includes("?") ? "&" : "?", ke = Q ? `&val=${Q}` : "";
3399
+ return `${ne}${we}json=1${ke}`;
3400
+ }, te = (N) => N == null || N === "" ? null : typeof N == "object" ? N?.id !== void 0 && N.id !== null && N.id !== "" ? N.id : null : N, X = (N) => {
3401
+ const Q = /* @__PURE__ */ new Set();
3402
+ return Array.isArray(s.value) && s.value.forEach((ne) => {
3403
+ const we = ne?.[N];
3404
3404
  if (we == null || we === "") return;
3405
3405
  if (Array.isArray(we)) {
3406
3406
  we.forEach((Pe) => {
3407
- const Fe = ee(Pe);
3408
- Fe !== null && le.add(Fe);
3407
+ const Fe = te(Pe);
3408
+ Fe !== null && Q.add(Fe);
3409
3409
  });
3410
3410
  return;
3411
3411
  }
3412
- const ke = ee(we);
3413
- ke !== null && le.add(ke);
3414
- }), le;
3415
- }, oe = async () => {
3412
+ const ke = te(we);
3413
+ ke !== null && Q.add(ke);
3414
+ }), Q;
3415
+ }, re = async () => {
3416
3416
  if (!t.colModel?.length) return;
3417
- const N = t.colModel.filter((le) => le.data && F.has(le.type?.toLowerCase() || ""));
3418
- N.length && await Promise.all(N.map(async (le) => {
3419
- const se = le.key || le.name;
3420
- if (!se) return;
3421
- const we = X(se), ke = Array.from(we).map((Ue) => String(Ue)).sort(), Pe = ke.join(",");
3422
- if (!ke.length || W.get(se) === Pe) return;
3423
- W.set(se, Pe);
3417
+ const N = t.colModel.filter((Q) => Q.data && F.has(Q.type?.toLowerCase() || ""));
3418
+ N.length && await Promise.all(N.map(async (Q) => {
3419
+ const ne = Q.key || Q.name;
3420
+ if (!ne) return;
3421
+ const we = X(ne), ke = Array.from(we).map((Ue) => String(Ue)).sort(), Pe = ke.join(",");
3422
+ if (!ke.length || W.get(ne) === Pe) return;
3423
+ W.set(ne, Pe);
3424
3424
  const Fe = ke.map(encodeURIComponent).join(",");
3425
3425
  try {
3426
- const dt = await (await fetch(H(le.data, Fe))).json();
3427
- r.value[se] = dt?.data ?? dt;
3426
+ const dt = await (await fetch(H(Q.data, Fe))).json();
3427
+ r.value[ne] = dt?.data ?? dt;
3428
3428
  } catch (Ue) {
3429
3429
  console.error("Failed to fetch column values", Ue);
3430
3430
  }
@@ -3433,14 +3433,17 @@ const _i = /* @__PURE__ */ je(wi, [["render", ki]]), $i = { class: "bg-white rou
3433
3433
  me(
3434
3434
  [() => t.colModel, () => s.value],
3435
3435
  () => {
3436
- oe();
3436
+ re();
3437
3437
  },
3438
3438
  { immediate: !0, deep: !0 }
3439
3439
  );
3440
- const ne = D(""), Y = D(!1);
3440
+ const ae = D(""), Y = D(!1);
3441
3441
  let G = "edit", O = 0;
3442
- const ae = (N) => (N?.format || N?.type || "").toString().toLowerCase(), ue = w(() => t.colModel?.filter((N) => ae(N) !== "slot") ?? []), he = D({}), $e = D({}), Ze = (N) => typeof N != "string" ? !1 : !!l[N], He = (N, le) => le ? le.split(".").reduce((se, we) => se == null ? se : se[we.trim()], N) : N, re = (N, le) => typeof N != "string" ? "" : N.replace(/{{\s*([^}]+)\s*}}/g, (se, we) => {
3443
- const ke = He(le, we.trim());
3442
+ const oe = (N) => (N?.format || N?.type || "").toString().toLowerCase(), ue = w(() => (t.colModel?.filter((Q) => oe(Q) !== "slot") ?? []).map((Q) => {
3443
+ const ne = Q.key || Q.name;
3444
+ return ne ? { ...Q, name: ne, key: ne } : Q;
3445
+ })), he = D({}), $e = D({}), Ze = (N) => typeof N != "string" ? !1 : !!l[N], He = (N, Q) => Q ? Q.split(".").reduce((ne, we) => ne == null ? ne : ne[we.trim()], N) : N, se = (N, Q) => typeof N != "string" ? "" : N.replace(/{{\s*([^}]+)\s*}}/g, (ne, we) => {
3446
+ const ke = He(Q, we.trim());
3444
3447
  return ke ?? "";
3445
3448
  }), ge = (N) => {
3446
3449
  if (N == null || N === "") return "";
@@ -3448,7 +3451,7 @@ const _i = /* @__PURE__ */ je(wi, [["render", ki]]), $i = { class: "bg-white rou
3448
3451
  if (typeof N == "boolean") return N ? 1 : 0;
3449
3452
  if (typeof N == "string") return N.toLowerCase();
3450
3453
  if (Array.isArray(N))
3451
- return N.map((le) => ge(le)).join(", ");
3454
+ return N.map((Q) => ge(Q)).join(", ");
3452
3455
  if (typeof N == "object") {
3453
3456
  if (N.text !== void 0) return String(N.text).toLowerCase();
3454
3457
  if (N.label !== void 0) return String(N.label).toLowerCase();
@@ -3456,28 +3459,28 @@ const _i = /* @__PURE__ */ je(wi, [["render", ki]]), $i = { class: "bg-white rou
3456
3459
  }
3457
3460
  return String(N).toLowerCase();
3458
3461
  }, Ie = (N) => {
3459
- const le = N.key || N.name;
3460
- if (le) {
3461
- if (f.value === le) {
3462
+ const Q = N.key || N.name;
3463
+ if (Q) {
3464
+ if (f.value === Q) {
3462
3465
  v.value = v.value === "asc" ? "desc" : "asc";
3463
3466
  return;
3464
3467
  }
3465
- f.value = le, v.value = "asc";
3468
+ f.value = Q, v.value = "asc";
3466
3469
  }
3467
3470
  };
3468
3471
  async function xe() {
3469
- ne.value = "Додати", Y.value = !0, G = "add", he.value = {};
3472
+ ae.value = "Додати", Y.value = !0, G = "add", he.value = {};
3470
3473
  }
3471
- function Se(N, le) {
3474
+ function Se(N, Q) {
3472
3475
  if (!N?.length) return null;
3473
- const se = typeof le == "object" ? le?.id : le;
3474
- return se == null || se === "" ? null : N.find((we) => we?.id?.toString() === se.toString())?.text ?? null;
3476
+ const ne = typeof Q == "object" ? Q?.id : Q;
3477
+ return ne == null || ne === "" ? null : N.find((we) => we?.id?.toString() === ne.toString())?.text ?? null;
3475
3478
  }
3476
3479
  function Ee(N) {
3477
- return N == null || N === "" ? "-" : Array.isArray(N) ? N.map((le) => typeof le == "object" ? le?.text ?? le?.id ?? "-" : le).join(", ") : typeof N == "object" ? N?.text ?? N?.id ?? "-" : N;
3480
+ return N == null || N === "" ? "-" : Array.isArray(N) ? N.map((Q) => typeof Q == "object" ? Q?.text ?? Q?.id ?? "-" : Q).join(", ") : typeof N == "object" ? N?.text ?? N?.id ?? "-" : N;
3478
3481
  }
3479
- function Re(N, le) {
3480
- const se = le.key || le.name, we = N?.[se], ke = r.value[se];
3482
+ function Re(N, Q) {
3483
+ const ne = Q.key || Q.name, we = N?.[ne], ke = r.value[ne];
3481
3484
  if (!we) return "-";
3482
3485
  if (Array.isArray(we)) {
3483
3486
  const Fe = we.map((Ue) => Se(ke, Ue)).filter(Boolean);
@@ -3486,31 +3489,31 @@ const _i = /* @__PURE__ */ je(wi, [["render", ki]]), $i = { class: "bg-white rou
3486
3489
  const Pe = Se(ke, we);
3487
3490
  return Pe || Ee(we);
3488
3491
  }
3489
- async function it(N, le) {
3490
- ne.value = "Редагувати", Y.value = !0, G = "edit", O = le, he.value = { ...N };
3492
+ async function it(N, Q) {
3493
+ ae.value = "Редагувати", Y.value = !0, G = "edit", O = Q, he.value = { ...N };
3491
3494
  }
3492
3495
  function kt() {
3493
3496
  const N = $e.value.validate();
3494
3497
  if (N) {
3495
- Ce({ type: "warning", title: "Помилка валідації", message: Object.entries(N).map(([le, se]) => `${le}: ${se}`).join(`
3498
+ Ce({ type: "warning", title: "Помилка валідації", message: Object.entries(N).map(([Q, ne]) => `${Q}: ${ne}`).join(`
3496
3499
  `) });
3497
3500
  return;
3498
3501
  }
3499
- G === "add" ? Array.isArray(s.value) ? s.value = [...s.value, he.value] : s.value = [he.value] : s.value = s.value.map((le, se) => se === O ? he.value : le), Y.value = !1;
3502
+ G === "add" ? Array.isArray(s.value) ? s.value = [...s.value, he.value] : s.value = [he.value] : s.value = s.value.map((Q, ne) => ne === O ? he.value : Q), Y.value = !1;
3500
3503
  }
3501
3504
  function _t(N) {
3502
- s.value = s.value.filter((le, se) => se !== N);
3505
+ s.value = s.value.filter((Q, ne) => ne !== N);
3503
3506
  }
3504
3507
  function Ne() {
3505
3508
  Y.value = !1;
3506
3509
  }
3507
- return (N, le) => (i(), p("div", $i, [
3510
+ return (N, Q) => (i(), p("div", $i, [
3508
3511
  o.value ? (i(), p("div", Ci, [
3509
3512
  a("search") ? (i(), p("div", Si, [
3510
3513
  K(E(rn), { class: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400" }),
3511
3514
  Ve(c("input", {
3512
3515
  type: "text",
3513
- "onUpdate:modelValue": le[0] || (le[0] = (se) => u.value = se),
3516
+ "onUpdate:modelValue": Q[0] || (Q[0] = (ne) => u.value = ne),
3514
3517
  placeholder: "Пошук",
3515
3518
  class: "w-full rounded-md border border-gray-200 bg-white pl-10 pr-3 py-2 text-sm text-gray-900 placeholder:text-gray-400 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-100"
3516
3519
  }, null, 512), [
@@ -3534,7 +3537,7 @@ const _i = /* @__PURE__ */ je(wi, [["render", ki]]), $i = { class: "bg-white rou
3534
3537
  class: "inline-flex items-center gap-2 rounded-md border border-gray-200 bg-white px-3 py-2 text-sm font-medium text-gray-700 hover:border-gray-300 hover:bg-gray-50 transition-colors"
3535
3538
  }, [
3536
3539
  K(E(qn), { class: "h-4 w-4 text-gray-700" }),
3537
- le[4] || (le[4] = ze(" Імпорт ", -1))
3540
+ Q[4] || (Q[4] = ze(" Імпорт ", -1))
3538
3541
  ])) : z("", !0),
3539
3542
  a("export") ? (i(), p("button", {
3540
3543
  key: 2,
@@ -3543,7 +3546,7 @@ const _i = /* @__PURE__ */ je(wi, [["render", ki]]), $i = { class: "bg-white rou
3543
3546
  class: "inline-flex items-center gap-2 rounded-md border border-gray-200 bg-white px-3 py-2 text-sm font-medium text-gray-700 hover:border-gray-300 hover:bg-gray-50 transition-colors"
3544
3547
  }, [
3545
3548
  K(E(on), { class: "h-4 w-4 text-gray-700" }),
3546
- le[5] || (le[5] = ze(" Експорт ", -1))
3549
+ Q[5] || (Q[5] = ze(" Експорт ", -1))
3547
3550
  ])) : z("", !0),
3548
3551
  a("add") ? (i(), p("button", {
3549
3552
  key: 3,
@@ -3552,7 +3555,7 @@ const _i = /* @__PURE__ */ je(wi, [["render", ki]]), $i = { class: "bg-white rou
3552
3555
  class: "inline-flex items-center gap-2 rounded-md bg-blue-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-600 transition-colors"
3553
3556
  }, [
3554
3557
  K(E(xt), { class: "h-4 w-4 text-white" }),
3555
- le[6] || (le[6] = ze(" Додати ", -1))
3558
+ Q[6] || (Q[6] = ze(" Додати ", -1))
3556
3559
  ])) : z("", !0)
3557
3560
  ])
3558
3561
  ])) : z("", !0),
@@ -3563,39 +3566,39 @@ const _i = /* @__PURE__ */ je(wi, [["render", ki]]), $i = { class: "bg-white rou
3563
3566
  c("th", Ii, [
3564
3567
  K(E(el), { class: "mx-auto h-4 w-4 text-gray-400" })
3565
3568
  ]),
3566
- (i(!0), p(_e, null, De($.value, (se) => (i(), p("th", {
3567
- key: se.key,
3569
+ (i(!0), p(_e, null, De($.value, (ne) => (i(), p("th", {
3570
+ key: ne.key,
3568
3571
  class: "px-4 py-3 text-left text-xs font-semibold text-gray-900"
3569
3572
  }, [
3570
3573
  c("button", {
3571
3574
  type: "button",
3572
- onClick: (we) => Ie(se),
3575
+ onClick: (we) => Ie(ne),
3573
3576
  class: "flex items-center gap-1 text-xs font-semibold text-gray-700 hover:text-gray-900 transition-colors"
3574
3577
  }, [
3575
- c("span", null, ie(se.ua || se.label), 1),
3576
- f.value === (se.key || se.name) ? (i(), p("span", Ti, ie(v.value === "asc" ? "▲" : "▼"), 1)) : z("", !0)
3578
+ c("span", null, ie(ne.ua || ne.label), 1),
3579
+ f.value === (ne.key || ne.name) ? (i(), p("span", Ti, ie(v.value === "asc" ? "▲" : "▼"), 1)) : z("", !0)
3577
3580
  ], 8, Fi)
3578
3581
  ]))), 128)),
3579
- le[7] || (le[7] = c("th", { class: "px-4 py-3 text-left text-xs font-semibold text-gray-900 text-center w-[1%] whitespace-nowrap" }, " Дії ", -1))
3582
+ Q[7] || (Q[7] = c("th", { class: "px-4 py-3 text-left text-xs font-semibold text-gray-900 text-center w-[1%] whitespace-nowrap" }, " Дії ", -1))
3580
3583
  ])
3581
3584
  ]),
3582
3585
  c("tbody", {
3583
- class: te(["divide-y divide-gray-200", { "[&_tr:last-child]:border-0": !g.value }])
3586
+ class: le(["divide-y divide-gray-200", { "[&_tr:last-child]:border-0": !g.value }])
3584
3587
  }, [
3585
3588
  k.value.length === 0 ? (i(), p("td", Ei, [
3586
3589
  c("div", Bi, [
3587
3590
  c("div", Oi, [
3588
3591
  K(_i, { class: "w-48 mx-auto" }),
3589
- le[8] || (le[8] = c("div", { class: "max-w-sm mx-auto mt-6" }, [
3592
+ Q[8] || (Q[8] = c("div", { class: "max-w-sm mx-auto mt-6" }, [
3590
3593
  c("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "Нічого не знайдено"),
3591
3594
  c("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
3592
3595
  ], -1))
3593
3596
  ])
3594
3597
  ])
3595
3598
  ])) : z("", !0),
3596
- (i(!0), p(_e, null, De(k.value, (se, we) => (i(), p("tr", {
3597
- key: se.id,
3598
- class: te(["border-b transition-colors hover:bg-gray-50 cursor-move text-sm text-gray-700", {
3599
+ (i(!0), p(_e, null, De(k.value, (ne, we) => (i(), p("tr", {
3600
+ key: ne.id,
3601
+ class: le(["border-b transition-colors hover:bg-gray-50 cursor-move text-sm text-gray-700", {
3599
3602
  "opacity-50": S.value === we,
3600
3603
  "border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20": g.value === we
3601
3604
  }]),
@@ -3613,22 +3616,22 @@ const _i = /* @__PURE__ */ je(wi, [["render", ki]]), $i = { class: "bg-white rou
3613
3616
  key: ke.key,
3614
3617
  class: "px-4 py-3 align-middle"
3615
3618
  }, [
3616
- ae(ke) === "slot" ? (i(), p(_e, { key: 0 }, [
3619
+ oe(ke) === "slot" ? (i(), p(_e, { key: 0 }, [
3617
3620
  Ze(ke.slot) ? et(N.$slots, ke.slot, {
3618
3621
  key: 0,
3619
- row: se,
3620
- value: se[ke.key],
3622
+ row: ne,
3623
+ value: ne[ke.key],
3621
3624
  column: ke
3622
3625
  }) : (i(), p("div", {
3623
3626
  key: 1,
3624
3627
  class: "text-sm text-gray-900",
3625
- innerHTML: re(ke.slot, se)
3628
+ innerHTML: se(ke.slot, ne)
3626
3629
  }, null, 8, ji))
3627
3630
  ], 64)) : (i(), p(_e, { key: 1 }, [
3628
- ae(ke) === "file" ? (i(), p("div", Ui, [
3629
- _(Re(se, ke)) ? (i(), p("div", zi, [
3631
+ oe(ke) === "file" ? (i(), p("div", Ui, [
3632
+ _(Re(ne, ke)) ? (i(), p("div", zi, [
3630
3633
  c("img", {
3631
- src: Re(se, ke),
3634
+ src: Re(ne, ke),
3632
3635
  alt: "alt",
3633
3636
  width: "45",
3634
3637
  class: "rounded-md max-w-[45px] h-[45px] object-cover"
@@ -3636,18 +3639,18 @@ const _i = /* @__PURE__ */ je(wi, [["render", ki]]), $i = { class: "bg-white rou
3636
3639
  ])) : (i(), p("div", qi, [
3637
3640
  K(E(Tl), { class: "h-4 w-4 min-w-4" })
3638
3641
  ]))
3639
- ])) : ae(ke) === "color" ? (i(), p("div", Wi, [
3642
+ ])) : oe(ke) === "color" ? (i(), p("div", Wi, [
3640
3643
  c("span", {
3641
3644
  class: "inline-flex h-6 w-6 rounded border border-gray-200",
3642
- style: Me({ backgroundColor: Re(se, ke) || "#ffffff" })
3645
+ style: Me({ backgroundColor: Re(ne, ke) || "#ffffff" })
3643
3646
  }, null, 4)
3644
- ])) : (i(), p("div", Ki, ie(Re(se, ke)), 1))
3647
+ ])) : (i(), p("div", Ki, ie(Re(ne, ke)), 1))
3645
3648
  ], 64))
3646
3649
  ]))), 128)),
3647
3650
  c("td", Gi, [
3648
3651
  c("div", Yi, [
3649
3652
  c("button", {
3650
- onClick: (ke) => it(se, we),
3653
+ onClick: (ke) => it(ne, we),
3651
3654
  class: "p-1.5 text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded transition-colors"
3652
3655
  }, [
3653
3656
  K(E(Ra), { class: "h-4 w-4" })
@@ -3666,7 +3669,7 @@ const _i = /* @__PURE__ */ je(wi, [["render", ki]]), $i = { class: "bg-white rou
3666
3669
  ]),
3667
3670
  K(E(Bl), {
3668
3671
  visible: Y.value,
3669
- title: ne.value,
3672
+ title: ae.value,
3670
3673
  size: "lg",
3671
3674
  onClose: Ne,
3672
3675
  teleport: "#modal"
@@ -3674,15 +3677,16 @@ const _i = /* @__PURE__ */ je(wi, [["render", ki]]), $i = { class: "bg-white rou
3674
3677
  default: lt(() => [
3675
3678
  K(Rt, {
3676
3679
  schema: ue.value,
3680
+ "form-id": "datatable-row",
3677
3681
  values: he.value,
3678
- "onUpdate:values": le[1] || (le[1] = (se) => he.value = se),
3682
+ "onUpdate:values": Q[1] || (Q[1] = (ne) => he.value = ne),
3679
3683
  form: $e.value,
3680
- "onUpdate:form": le[2] || (le[2] = (se) => $e.value = se)
3684
+ "onUpdate:form": Q[2] || (Q[2] = (ne) => $e.value = ne)
3681
3685
  }, null, 8, ["schema", "values", "form"]),
3682
3686
  c("div", Xi, [
3683
3687
  c("button", {
3684
3688
  type: "button",
3685
- onClick: le[3] || (le[3] = (se) => Y.value = !1),
3689
+ onClick: Q[3] || (Q[3] = (ne) => Y.value = !1),
3686
3690
  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"
3687
3691
  }, " Скасувати "),
3688
3692
  c("button", {
@@ -3777,7 +3781,7 @@ const cu = /* @__PURE__ */ je(iu, [["render", du]]), fu = { class: "bg-white/30
3777
3781
  c("div", pu, [
3778
3782
  (i(!0), p(_e, null, De(u.basemaps, (v, k) => (i(), p("div", {
3779
3783
  key: k,
3780
- class: te(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": a.value === k }]),
3784
+ class: le(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm", { "ring-2 ring-blue-500 border-blue-300": a.value === k }]),
3781
3785
  onClick: ($) => o(k),
3782
3786
  title: v.name || k,
3783
3787
  role: "button",
@@ -4058,9 +4062,9 @@ const $u = ["title"], Cu = {
4058
4062
  });
4059
4063
  const b = D(""), h = D(!1), C = D(null), y = D(null), V = D(null), _ = D(null), I = D([]), R = D(null), F = D(!1), W = D([]), H = w(
4060
4064
  () => (g.value === "address" || g.value === "nominatim") && F.value
4061
- ), ee = w(() => a.config?.addressDebounceMs ?? 1e3);
4065
+ ), te = w(() => a.config?.addressDebounceMs ?? 1e3);
4062
4066
  let X = null;
4063
- const oe = D(!1), ne = w(() => b.value.trim().length > 0 ? I.value : W.value), Y = w(() => b.value.trim().length ? `Знайдено ${I.value.length}` : "Історія пошуку"), G = w(
4067
+ const re = D(!1), ae = w(() => b.value.trim().length > 0 ? I.value : W.value), Y = w(() => b.value.trim().length ? `Знайдено ${I.value.length}` : "Історія пошуку"), G = w(
4064
4068
  () => b.value.trim().length ? "Нічого не знайдено" : "Історія порожня"
4065
4069
  );
4066
4070
  function O() {
@@ -4074,12 +4078,12 @@ const $u = ["title"], Cu = {
4074
4078
  return [];
4075
4079
  }
4076
4080
  }
4077
- function ae(B) {
4081
+ function oe(B) {
4078
4082
  typeof window > "u" || window.localStorage?.setItem?.(In, JSON.stringify(B));
4079
4083
  }
4080
4084
  function ue(B) {
4081
4085
  const P = [B, ...W.value.filter((L) => L.id !== B.id)].slice(0, 10);
4082
- W.value = P, ae(P);
4086
+ W.value = P, oe(P);
4083
4087
  }
4084
4088
  const he = ln({
4085
4089
  position: "absolute",
@@ -4100,7 +4104,7 @@ const $u = ["title"], Cu = {
4100
4104
  X && (clearTimeout(X), X = null);
4101
4105
  }
4102
4106
  me(g, () => {
4103
- b.value = "", h.value = !1, I.value = [], F.value = !1, He(), oe.value = !1;
4107
+ b.value = "", h.value = !1, I.value = [], F.value = !1, He(), re.value = !1;
4104
4108
  }), me(H, (B) => {
4105
4109
  B ? Xe(() => {
4106
4110
  $e();
@@ -4119,9 +4123,9 @@ const $u = ["title"], Cu = {
4119
4123
  const P = U?.message || "Помилка пошуку адреси";
4120
4124
  Ce({ type: "error", title: "Пошук адреси", message: P });
4121
4125
  });
4122
- }, ee.value);
4126
+ }, te.value);
4123
4127
  });
4124
- function re(B) {
4128
+ function se(B) {
4125
4129
  const U = [];
4126
4130
  y.value && U.push(y.value), B instanceof HTMLElement && U.push(B), C.value?.querySelectorAll("li")?.forEach((L) => {
4127
4131
  U.push(L);
@@ -4130,19 +4134,19 @@ const $u = ["title"], Cu = {
4130
4134
  });
4131
4135
  }
4132
4136
  function ge(B) {
4133
- h.value && re(B.target), h.value = !h.value;
4137
+ h.value && se(B.target), h.value = !h.value;
4134
4138
  }
4135
4139
  function Ie(B, U) {
4136
- re(U?.target), g.value = B;
4140
+ se(U?.target), g.value = B;
4137
4141
  }
4138
4142
  function xe() {
4139
- b.value = "", I.value = [], F.value = !1, oe.value = !1;
4143
+ b.value = "", I.value = [], F.value = !1, re.value = !1;
4140
4144
  }
4141
4145
  function Se(B) {
4142
4146
  const U = B.target;
4143
4147
  if (h.value) {
4144
4148
  const P = C.value;
4145
- P && !P.contains(U) && (re(U), h.value = !1);
4149
+ P && !P.contains(U) && (se(U), h.value = !1);
4146
4150
  }
4147
4151
  if (H.value) {
4148
4152
  const P = R.value, L = _.value;
@@ -4223,7 +4227,7 @@ const $u = ["title"], Cu = {
4223
4227
  const U = Number(B);
4224
4228
  return Number.isFinite(U) ? U : null;
4225
4229
  }
4226
- function le(B) {
4230
+ function Q(B) {
4227
4231
  const U = N(B.lng) ?? N(B.lon) ?? N(B.longitude) ?? N(B.x), P = N(B.lat) ?? N(B.latitude) ?? N(B.y);
4228
4232
  if (U != null && P != null)
4229
4233
  return { lat: P, lng: U };
@@ -4234,9 +4238,9 @@ const $u = ["title"], Cu = {
4234
4238
  }
4235
4239
  return null;
4236
4240
  }
4237
- function se(B) {
4241
+ function ne(B) {
4238
4242
  return (Array.isArray(B?.data) ? B.data : []).map((P, L) => {
4239
- const j = le(P), J = String(
4243
+ const j = Q(P), J = String(
4240
4244
  P.text ?? P.title ?? P.label ?? P.name ?? P.address ?? P.display_name ?? P.id ?? "Адреса"
4241
4245
  ), pe = String(P.id ?? P.code ?? P.value ?? L);
4242
4246
  return j ? { id: pe, title: J, ...j } : { id: pe, title: J };
@@ -4260,7 +4264,7 @@ const $u = ["title"], Cu = {
4260
4264
  const P = await fetch(U);
4261
4265
  if (!P.ok) throw new Error(`HTTP ${P.status}`);
4262
4266
  const L = await P.json();
4263
- return se(L);
4267
+ return ne(L);
4264
4268
  }
4265
4269
  async function Pe(B) {
4266
4270
  const U = new URL(Ou);
@@ -4322,7 +4326,7 @@ const $u = ["title"], Cu = {
4322
4326
  );
4323
4327
  }
4324
4328
  function fe(B) {
4325
- n("goToCoordinates", [B.lat, B.lng]), oe.value = !0;
4329
+ n("goToCoordinates", [B.lat, B.lng]), re.value = !0;
4326
4330
  }
4327
4331
  async function We() {
4328
4332
  const B = b.value.trim();
@@ -4406,7 +4410,7 @@ const $u = ["title"], Cu = {
4406
4410
  [l, Re(g.value)]
4407
4411
  ]),
4408
4412
  (i(), p("svg", {
4409
- class: te(["w-4 h-4 text-gray-500 transition-transform", { "rotate-180": h.value }]),
4413
+ class: le(["w-4 h-4 text-gray-500 transition-transform", { "rotate-180": h.value }]),
4410
4414
  viewBox: "0 0 24 24",
4411
4415
  fill: "none",
4412
4416
  xmlns: "http://www.w3.org/2000/svg"
@@ -4444,13 +4448,13 @@ const $u = ["title"], Cu = {
4444
4448
  modelValue: b.value,
4445
4449
  "onUpdate:modelValue": U[0] || (U[0] = (P) => b.value = P),
4446
4450
  mask: "0000000000:00:000:0000",
4447
- class: te(["vs-input !h-[34px] transition-all border block w-full border-gray-200 rounded-md focus:border-blue-100 border-solid py-1.5 pl-3 text-sm", oe.value ? "!pr-14" : "!pr-8"])
4451
+ class: le(["vs-input !h-[34px] transition-all border block w-full border-gray-200 rounded-md focus:border-blue-100 border-solid py-1.5 pl-3 text-sm", re.value ? "!pr-14" : "!pr-8"])
4448
4452
  }, null, 8, ["modelValue", "class"])) : Ve((i(), p("input", {
4449
4453
  key: 1,
4450
4454
  "onUpdate:modelValue": U[1] || (U[1] = (P) => b.value = P),
4451
4455
  placeholder: S.value,
4452
4456
  type: "text",
4453
- class: te(["vs-input transition-all border block w-full border-gray-200 rounded-md focus:border-blue-100 border-solid py-1.5 pl-3 text-sm", oe.value ? "!pr-14" : "!pr-8"]),
4457
+ class: le(["vs-input transition-all border block w-full border-gray-200 rounded-md focus:border-blue-100 border-solid py-1.5 pl-3 text-sm", re.value ? "!pr-14" : "!pr-8"]),
4454
4458
  onFocus: dt
4455
4459
  }, null, 42, Vu)), [
4456
4460
  [
@@ -4461,7 +4465,7 @@ const $u = ["title"], Cu = {
4461
4465
  ]
4462
4466
  ]),
4463
4467
  c("div", Mu, [
4464
- oe.value ? (i(), p("button", {
4468
+ re.value ? (i(), p("button", {
4465
4469
  key: 0,
4466
4470
  type: "button",
4467
4471
  class: "flex items-center text-gray-400 hover:text-gray-600",
@@ -4524,8 +4528,8 @@ const $u = ["title"], Cu = {
4524
4528
  }, " ✕ ")
4525
4529
  ]),
4526
4530
  c("div", Au, [
4527
- ne.value.length ? (i(), p("ul", Iu, [
4528
- (i(!0), p(_e, null, De(ne.value, (P) => (i(), p("li", {
4531
+ ae.value.length ? (i(), p("ul", Iu, [
4532
+ (i(!0), p(_e, null, De(ae.value, (P) => (i(), p("li", {
4529
4533
  key: P.id,
4530
4534
  class: "px-3 py-2 cursor-pointer hover:bg-gray-50",
4531
4535
  onClick: (L) => Ue(P)
@@ -4748,7 +4752,7 @@ const Ku = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
4748
4752
  type: "button",
4749
4753
  class: "ruler-row w-full flex items-center gap-2 cursor-pointer group text-left"
4750
4754
  }, Qu = {
4751
- class: /* @__PURE__ */ te([
4755
+ class: /* @__PURE__ */ le([
4752
4756
  "flex items-center justify-center w-5 h-5 rounded-full shrink-0 transition-colors pointer-events-none"
4753
4757
  ]),
4754
4758
  title: "Сумарна довжина всіх відрізків",
@@ -4757,7 +4761,7 @@ const Ku = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
4757
4761
  type: "button",
4758
4762
  class: "w-full flex items-center gap-2 cursor-pointer group text-left"
4759
4763
  }, nd = {
4760
- class: /* @__PURE__ */ te([
4764
+ class: /* @__PURE__ */ le([
4761
4765
  "flex items-center justify-center w-5 h-5 rounded-full shrink-0 transition-colors pointer-events-none"
4762
4766
  ]),
4763
4767
  title: "Площа замкнутого контуру",
@@ -4769,7 +4773,7 @@ const Ku = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
4769
4773
  key: 1,
4770
4774
  class: "text-xs text-gray-400"
4771
4775
  }, ud = { class: "ruler-row flex items-center gap-2 cursor-pointer" }, dd = {
4772
- class: /* @__PURE__ */ te([
4776
+ class: /* @__PURE__ */ le([
4773
4777
  "flex items-center justify-center w-5 h-5 rounded-full shrink-0 transition-colors pointer-events-none"
4774
4778
  ]),
4775
4779
  title: "Список точок",
@@ -4871,7 +4875,7 @@ const Ku = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
4871
4875
  (i(), p(_e, null, De(n, (h, C) => c("button", {
4872
4876
  key: h.id,
4873
4877
  type: "button",
4874
- class: te([
4878
+ class: le([
4875
4879
  "px-2.5 py-1 text-xs font-medium transition-colors border-r border-gray-200 last:border-r-0",
4876
4880
  C === 0 && "rounded-l-md",
4877
4881
  C === n.length - 1 && "rounded-r-md",
@@ -4994,8 +4998,8 @@ const Ku = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
4994
4998
  ],
4995
4999
  setup(e, { expose: t, emit: l }) {
4996
5000
  const a = l, n = D([]), o = w(() => n.value.length > 0), s = D(!1), r = D(!1), u = D("general");
4997
- function f(ee) {
4998
- u.value = ee, a("tab-change", ee);
5001
+ function f(te) {
5002
+ u.value = te, a("tab-change", te);
4999
5003
  }
5000
5004
  Qe(() => {
5001
5005
  a("tab-change", u.value);
@@ -5004,36 +5008,36 @@ const Ku = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
5004
5008
  () => n.value.length >= 3 && !r.value
5005
5009
  );
5006
5010
  let k = 1;
5007
- const $ = () => n.value.map((ee) => ({ id: ee.id, coords: { ...ee.coords } })), S = () => {
5011
+ const $ = () => n.value.map((te) => ({ id: te.id, coords: { ...te.coords } })), S = () => {
5008
5012
  n.value.length < 3 && r.value && (r.value = !1, a("shape-closed-change", !1)), a("points-change", $());
5009
5013
  }, g = () => {
5010
- const ee = k;
5011
- return k += 1, ee;
5012
- }, b = (ee) => {
5014
+ const te = k;
5015
+ return k += 1, te;
5016
+ }, b = (te) => {
5013
5017
  n.value = [
5014
5018
  ...n.value,
5015
- { id: g(), coords: { lat: ee.lat, lng: ee.lng } }
5019
+ { id: g(), coords: { lat: te.lat, lng: te.lng } }
5016
5020
  ], S();
5017
5021
  }, h = ({
5018
- id: ee,
5022
+ id: te,
5019
5023
  coords: X
5020
5024
  }) => {
5021
- const oe = n.value.findIndex((Y) => Y.id === ee);
5022
- if (oe === -1) return;
5023
- const ne = [...n.value];
5024
- ne[oe] = { id: ee, coords: { ...X } }, n.value = ne, S();
5025
- }, C = (ee) => {
5026
- n.value = n.value.filter((X) => X.id !== ee), S();
5025
+ const re = n.value.findIndex((Y) => Y.id === te);
5026
+ if (re === -1) return;
5027
+ const ae = [...n.value];
5028
+ ae[re] = { id: te, coords: { ...X } }, n.value = ae, S();
5029
+ }, C = (te) => {
5030
+ n.value = n.value.filter((X) => X.id !== te), S();
5027
5031
  }, y = () => {
5028
5032
  n.value = [], r.value && (r.value = !1, a("shape-closed-change", !1)), S();
5029
- }, V = (ee) => {
5030
- h(ee);
5031
- }, _ = (ee) => {
5032
- C(ee);
5033
+ }, V = (te) => {
5034
+ h(te);
5035
+ }, _ = (te) => {
5036
+ C(te);
5033
5037
  }, I = () => {
5034
5038
  s.value = !0, a("add-request");
5035
- }, R = (ee) => {
5036
- b(ee), s.value = !1;
5039
+ }, R = (te) => {
5040
+ b(te), s.value = !1;
5037
5041
  }, F = () => {
5038
5042
  s.value = !1;
5039
5043
  }, W = () => {
@@ -5044,7 +5048,7 @@ const Ku = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
5044
5048
  return t({
5045
5049
  addPoint: b,
5046
5050
  clearPoints: y
5047
- }), (ee, X) => (i(), p("div", kd, [
5051
+ }), (te, X) => (i(), p("div", kd, [
5048
5052
  c("div", _d, [
5049
5053
  c("div", $d, [
5050
5054
  c("div", Cd, [
@@ -5072,19 +5076,19 @@ const Ku = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
5072
5076
  c("div", Vd, [
5073
5077
  c("button", {
5074
5078
  type: "button",
5075
- class: te([
5079
+ class: le([
5076
5080
  "flex-1 px-3 py-2 text-xs font-medium transition-colors",
5077
5081
  u.value === "general" ? "text-blue-600 border-b-2 border-blue-500 bg-blue-50/50" : "text-gray-500 hover:text-gray-700"
5078
5082
  ]),
5079
- onClick: X[0] || (X[0] = (oe) => f("general"))
5083
+ onClick: X[0] || (X[0] = (re) => f("general"))
5080
5084
  }, " Загальна ", 2),
5081
5085
  c("button", {
5082
5086
  type: "button",
5083
- class: te([
5087
+ class: le([
5084
5088
  "flex-1 px-3 py-2 text-xs font-medium transition-colors",
5085
5089
  u.value === "topoint" ? "text-blue-600 border-b-2 border-blue-500 bg-blue-50/50" : "text-gray-500 hover:text-gray-700"
5086
5090
  ]),
5087
- onClick: X[1] || (X[1] = (oe) => f("topoint"))
5091
+ onClick: X[1] || (X[1] = (re) => f("topoint"))
5088
5092
  }, " До точки ", 2)
5089
5093
  ]),
5090
5094
  u.value === "general" ? (i(), p(_e, { key: 0 }, [
@@ -5446,17 +5450,17 @@ const Ed = {
5446
5450
  () => I("center") ? l.center : V.center ?? l.center
5447
5451
  ), H = w(
5448
5452
  () => I("zoom") ? l.zoom : V.zoom ?? l.zoom
5449
- ), ee = w(
5453
+ ), te = w(
5450
5454
  () => I("katottg") ? String(l.katottg ?? "") : String(V.katottg ?? l.katottg ?? "")
5451
- ), X = w(() => I("layers") ? l.layers ?? [] : V.layers ?? l.layers ?? []), oe = w(() => I("bounds") ? l.bounds : V.bounds ?? l.bounds), ne = D(
5455
+ ), X = w(() => I("layers") ? l.layers ?? [] : V.layers ?? l.layers ?? []), re = w(() => I("bounds") ? l.bounds : V.bounds ?? l.bounds), ae = D(
5452
5456
  Array.isArray(W.value) && W.value.length === 2 ? [...W.value] : R
5453
5457
  ), Y = D(
5454
5458
  typeof H.value == "number" ? H.value : F
5455
- ), G = D(l.modelValue), O = D(null), ae = D(null), ue = D([]), he = D(!1), $e = D(!1), Ze = D([]), He = D({
5459
+ ), G = D(l.modelValue), O = D(null), oe = D(null), ue = D([]), he = D(!1), $e = D(!1), Ze = D([]), He = D({
5456
5460
  coordinates: "",
5457
5461
  format: "decimal",
5458
5462
  order: "lat-lon"
5459
- }), re = {
5463
+ }), se = {
5460
5464
  coordinates: {
5461
5465
  type: "Textarea",
5462
5466
  label: "Координати вершин полігону (3-100 точок)",
@@ -5533,7 +5537,7 @@ const Ed = {
5533
5537
  const m = window?.location?.origin ?? "", x = d.replace(/^\/+/, "");
5534
5538
  return x ? m ? `${m}/${x}` : `/${x}` : m;
5535
5539
  }
5536
- function le() {
5540
+ function Q() {
5537
5541
  const d = Array.isArray(V.basemaps) && V.basemaps.length ? V.basemaps : y.basemaps;
5538
5542
  if (Array.isArray(d) && d.length) {
5539
5543
  const x = d.map((M, A) => {
@@ -5567,7 +5571,7 @@ const Ed = {
5567
5571
  }
5568
5572
  };
5569
5573
  }
5570
- const se = le(), we = Object.keys(se), ke = D(we.length ? we[0] : "");
5574
+ const ne = Q(), we = Object.keys(ne), ke = D(we.length ? we[0] : "");
5571
5575
  async function Pe() {
5572
5576
  if (typeof window > "u") return null;
5573
5577
  const d = window;
@@ -5818,7 +5822,7 @@ const Ed = {
5818
5822
  ];
5819
5823
  function ot() {
5820
5824
  const d = ke.value;
5821
- return !d || !se[d]?.url ? "" : se[d].url;
5825
+ return !d || !ne[d]?.url ? "" : ne[d].url;
5822
5826
  }
5823
5827
  function Mt(d, m) {
5824
5828
  return d?.id ? String(d.id) : d?.url ? `${d.url}-${m}` : `layer-${m}`;
@@ -5883,7 +5887,7 @@ const Ed = {
5883
5887
  }
5884
5888
  function Nl(d, m) {
5885
5889
  if (!Z) return [];
5886
- const x = `vs-ov-bounds-src-${m}`, M = `vs-ov-bounds-line-${m}`, A = d.bounds ?? oe.value ?? ue.value, q = vt(A);
5890
+ const x = `vs-ov-bounds-src-${m}`, M = `vs-ov-bounds-line-${m}`, A = d.bounds ?? re.value ?? ue.value, q = vt(A);
5887
5891
  if (!q.length) return [];
5888
5892
  const ce = {
5889
5893
  type: "FeatureCollection",
@@ -6015,7 +6019,7 @@ const Ed = {
6015
6019
  if (!Z) return;
6016
6020
  const m = {
6017
6021
  type: "FeatureCollection",
6018
- features: vt(oe.value ?? ue.value).map((x) => ({
6022
+ features: vt(re.value ?? ue.value).map((x) => ({
6019
6023
  type: "Feature",
6020
6024
  properties: {},
6021
6025
  geometry: { type: "LineString", coordinates: x }
@@ -6060,7 +6064,7 @@ const Ed = {
6060
6064
  });
6061
6065
  }
6062
6066
  function Ul(d) {
6063
- if (!se[d] || (ke.value = d, !Z)) return;
6067
+ if (!ne[d] || (ke.value = d, !Z)) return;
6064
6068
  const m = ot();
6065
6069
  if (!m) return;
6066
6070
  const x = Z.getCenter?.(), M = Z.getZoom?.(), A = fe?.getAll?.();
@@ -6101,7 +6105,7 @@ const Ed = {
6101
6105
  geometry: m
6102
6106
  } : null;
6103
6107
  }
6104
- function Q(d) {
6108
+ function ee(d) {
6105
6109
  if (!d) return [];
6106
6110
  const m = (A, q) => {
6107
6111
  if (!A?.type) return [];
@@ -6125,7 +6129,7 @@ const Ed = {
6125
6129
  return (d.features ?? []).flatMap(x).filter(Boolean);
6126
6130
  if (Array.isArray(d))
6127
6131
  return d.flatMap(
6128
- (A) => A?.type === "FeatureCollection" ? Q(A) : [x(A)]
6132
+ (A) => A?.type === "FeatureCollection" ? ee(A) : [x(A)]
6129
6133
  ).flat().filter(Boolean);
6130
6134
  const M = x(d);
6131
6135
  return M ? Array.isArray(M) ? M : [M] : [];
@@ -6396,7 +6400,7 @@ const Ed = {
6396
6400
  }
6397
6401
  function hl(d) {
6398
6402
  if (!fe) return;
6399
- const m = Q(d), x = o.value ? m : m.slice(0, 1);
6403
+ const m = ee(d), x = o.value ? m : m.slice(0, 1);
6400
6404
  ge = !0, yl(), x.forEach((q) => {
6401
6405
  try {
6402
6406
  fe.add(q);
@@ -6484,7 +6488,7 @@ const Ed = {
6484
6488
  }
6485
6489
  function xn(d) {
6486
6490
  if (!he.value) return;
6487
- const m = ae.value;
6491
+ const m = oe.value;
6488
6492
  m && !m.contains(d.target) && (he.value = !1);
6489
6493
  }
6490
6494
  function xa() {
@@ -6541,7 +6545,7 @@ const Ed = {
6541
6545
  M.onload = () => {
6542
6546
  try {
6543
6547
  const A = JSON.parse(String(M.result));
6544
- if (!Q(A).length) {
6548
+ if (!ee(A).length) {
6545
6549
  Ce({
6546
6550
  type: "warning",
6547
6551
  title: "Імпорт файлу",
@@ -6580,7 +6584,7 @@ const Ed = {
6580
6584
  m && (Z = new Ue.Map({
6581
6585
  container: u.value,
6582
6586
  style: Fe(m),
6583
- center: [ne.value[0], ne.value[1]],
6587
+ center: [ae.value[0], ae.value[1]],
6584
6588
  zoom: Y.value,
6585
6589
  attributionControl: !1
6586
6590
  }), S.value = Z, Z.addControl(new Ue.NavigationControl({ showCompass: !0 }), "bottom-right"), Z.on("load", () => {
@@ -6692,7 +6696,7 @@ const Ed = {
6692
6696
  return;
6693
6697
  }
6694
6698
  const m = ve(
6695
- (o.value ? Q(d) : Q(d).slice(0, 1)) || []
6699
+ (o.value ? ee(d) : ee(d).slice(0, 1)) || []
6696
6700
  ), x = Ae(m);
6697
6701
  if (U && x === U) {
6698
6702
  U = null;
@@ -6730,7 +6734,7 @@ const Ed = {
6730
6734
  },
6731
6735
  { immediate: !0, deep: !0 }
6732
6736
  ), me(
6733
- () => oe.value,
6737
+ () => re.value,
6734
6738
  () => {
6735
6739
  Z && (Wt(), Se.value.forEach((d) => {
6736
6740
  const m = xe[d];
@@ -6739,7 +6743,7 @@ const Ed = {
6739
6743
  },
6740
6744
  { deep: !0 }
6741
6745
  ), me(
6742
- () => ee.value,
6746
+ () => te.value,
6743
6747
  async (d) => {
6744
6748
  if (ue.value = [], !d) {
6745
6749
  Z && (Wt(), Se.value.forEach((m) => {
@@ -6769,9 +6773,9 @@ const Ed = {
6769
6773
  (d) => {
6770
6774
  if (!Array.isArray(d) || d.length !== 2) return;
6771
6775
  const m = [Number(d[0]), Number(d[1])];
6772
- if (hn(ne.value, m) || (ne.value = [...m], !Z)) return;
6776
+ if (hn(ae.value, m) || (ae.value = [...m], !Z)) return;
6773
6777
  const x = Z.getCenter?.();
6774
- x && hn([x.lng, x.lat], ne.value) || Z.easeTo({ center: [ne.value[0], ne.value[1]] });
6778
+ x && hn([x.lng, x.lat], ae.value) || Z.easeTo({ center: [ae.value[0], ae.value[1]] });
6775
6779
  },
6776
6780
  { deep: !0 }
6777
6781
  ), me(
@@ -6796,7 +6800,7 @@ const Ed = {
6796
6800
  disabled: !r.value
6797
6801
  }, [
6798
6802
  c("div", {
6799
- class: te(["vs-map-wrapper relative w-full h-[400px]", { fullscreen: r.value }])
6803
+ class: le(["vs-map-wrapper relative w-full h-[400px]", { fullscreen: r.value }])
6800
6804
  }, [
6801
6805
  c("div", {
6802
6806
  ref_key: "mapContainer",
@@ -6813,7 +6817,7 @@ const Ed = {
6813
6817
  Ne.value.import ? (i(), p("div", {
6814
6818
  key: 0,
6815
6819
  ref_key: "importMenuRef",
6816
- ref: ae,
6820
+ ref: oe,
6817
6821
  class: "relative"
6818
6822
  }, [
6819
6823
  c("button", {
@@ -6824,7 +6828,7 @@ const Ed = {
6824
6828
  }, [
6825
6829
  m[8] || (m[8] = ze(" Імпорт ", -1)),
6826
6830
  K(E(pl), {
6827
- class: te(["h-4 w-4 transition-transform", { "rotate-180": he.value }])
6831
+ class: le(["h-4 w-4 transition-transform", { "rotate-180": he.value }])
6828
6832
  }, null, 8, ["class"])
6829
6833
  ], 8, Pd),
6830
6834
  he.value ? (i(), p("div", Rd, [
@@ -6869,7 +6873,7 @@ const Ed = {
6869
6873
  }, {
6870
6874
  default: lt(() => [
6871
6875
  K(Rt, {
6872
- schema: re,
6876
+ schema: se,
6873
6877
  values: He.value,
6874
6878
  "onUpdate:values": m[0] || (m[0] = (x) => He.value = x)
6875
6879
  }, null, 8, ["values"]),
@@ -6893,7 +6897,7 @@ const Ed = {
6893
6897
  c("div", qd, [
6894
6898
  Ne.value.point ? (i(), p("button", {
6895
6899
  key: 0,
6896
- class: te(["vs-btn", { "vs-active": v.value === "marker" }]),
6900
+ class: le(["vs-btn", { "vs-active": v.value === "marker" }]),
6897
6901
  title: "Point",
6898
6902
  onClick: m[2] || (m[2] = (x) => bl("marker")),
6899
6903
  disabled: s.value
@@ -6902,7 +6906,7 @@ const Ed = {
6902
6906
  ], 10, Wd)) : z("", !0),
6903
6907
  Ne.value.line ? (i(), p("button", {
6904
6908
  key: 1,
6905
- class: te(["vs-btn", { "vs-active": v.value === "polyline" }]),
6909
+ class: le(["vs-btn", { "vs-active": v.value === "polyline" }]),
6906
6910
  title: "Line",
6907
6911
  onClick: m[3] || (m[3] = (x) => bl("polyline")),
6908
6912
  disabled: s.value
@@ -6911,7 +6915,7 @@ const Ed = {
6911
6915
  ], 10, Kd)) : z("", !0),
6912
6916
  Ne.value.polygon ? (i(), p("button", {
6913
6917
  key: 2,
6914
- class: te(["vs-btn", { "vs-active": v.value === "polygon" }]),
6918
+ class: le(["vs-btn", { "vs-active": v.value === "polygon" }]),
6915
6919
  title: "Polygon",
6916
6920
  onClick: m[4] || (m[4] = (x) => bl("polygon")),
6917
6921
  disabled: s.value
@@ -6920,7 +6924,7 @@ const Ed = {
6920
6924
  ], 10, Gd)) : z("", !0),
6921
6925
  Ne.value.rectangle ? (i(), p("button", {
6922
6926
  key: 3,
6923
- class: te(["vs-btn", { "vs-active": v.value === "rectangle" }]),
6927
+ class: le(["vs-btn", { "vs-active": v.value === "rectangle" }]),
6924
6928
  title: "Rectangle",
6925
6929
  onClick: m[5] || (m[5] = (x) => bl("rectangle")),
6926
6930
  disabled: s.value
@@ -6929,7 +6933,7 @@ const Ed = {
6929
6933
  ], 10, Yd)) : z("", !0),
6930
6934
  Ne.value.ruler ? (i(), p("button", {
6931
6935
  key: 4,
6932
- class: te(["vs-btn mt-3", { "vs-active": E(b).isRulerActive.value }]),
6936
+ class: le(["vs-btn mt-3", { "vs-active": E(b).isRulerActive.value }]),
6933
6937
  title: "Ruler",
6934
6938
  onClick: h
6935
6939
  }, [
@@ -6980,7 +6984,7 @@ const Ed = {
6980
6984
  c("div", ec, [
6981
6985
  c("div", tc, [
6982
6986
  K(gu, {
6983
- basemaps: E(se),
6987
+ basemaps: E(ne),
6984
6988
  onOnLayerChange: Ul
6985
6989
  }, null, 8, ["basemaps"]),
6986
6990
  Ee.value.length ? (i(), p("div", lc, [
@@ -7013,7 +7017,7 @@ const Ed = {
7013
7017
  }, [
7014
7018
  c("button", {
7015
7019
  type: "button",
7016
- class: te([
7020
+ class: le([
7017
7021
  "font-bold underline-offset-2",
7018
7022
  x.id === E(P) ? "text-blue-700 underline" : "text-gray-700 hover:text-blue-700 hover:underline"
7019
7023
  ]),
@@ -7111,12 +7115,12 @@ const Ed = {
7111
7115
  }, ["stop"]))
7112
7116
  }, [
7113
7117
  c("div", {
7114
- class: te(["relative w-full font-sans", l.customClass]),
7118
+ class: le(["relative w-full font-sans", l.customClass]),
7115
7119
  role: "group",
7116
7120
  "aria-label": "Tag input"
7117
7121
  }, [
7118
7122
  c("div", {
7119
- class: te([
7123
+ class: le([
7120
7124
  "flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white",
7121
7125
  "border-gray-300 hover:border-gray-400",
7122
7126
  r.value ? "border-blue-500 ring-1 ring-blue-500" : "",
@@ -7140,7 +7144,7 @@ const Ed = {
7140
7144
  c("div", {
7141
7145
  role: "button",
7142
7146
  class: "flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",
7143
- onClick: Be((ee) => C(H), ["stop"]),
7147
+ onClick: Be((te) => C(H), ["stop"]),
7144
7148
  "aria-label": `Remove ${W}`
7145
7149
  }, [
7146
7150
  K(E(Vt), {
@@ -7393,7 +7397,7 @@ const Ed = {
7393
7397
  c("div", qc, [
7394
7398
  (i(!0), p(_e, null, De(u.value, (y, V) => (i(), p("div", {
7395
7399
  key: y.id,
7396
- class: te(["flex items-center gap-2 w-full", { "opacity-50": f.value === V }]),
7400
+ class: le(["flex items-center gap-2 w-full", { "opacity-50": f.value === V }]),
7397
7401
  draggable: "true",
7398
7402
  onDragstart: (_) => k(V),
7399
7403
  onDragover: C[0] || (C[0] = Be(() => {
@@ -7504,7 +7508,7 @@ const Ed = {
7504
7508
  c("div", nf, [
7505
7509
  (i(!0), p(_e, null, De(a.value, (y, V) => (i(), p("div", {
7506
7510
  key: y.id,
7507
- class: te(["flex items-center gap-2 w-full", { "opacity-50": n.value === V }]),
7511
+ class: le(["flex items-center gap-2 w-full", { "opacity-50": n.value === V }]),
7508
7512
  draggable: "true",
7509
7513
  onDragstart: (_) => g(V),
7510
7514
  onDragover: C[0] || (C[0] = Be(() => {
@@ -7598,7 +7602,7 @@ const Ed = {
7598
7602
  "onUpdate:modelValue": u[0] || (u[0] = (f) => o.value = f),
7599
7603
  disabled: s.value,
7600
7604
  ref: "color",
7601
- class: te(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]", [r.modelValue ? "" : "text-opacity-50", E(a)].join(" ")]),
7605
+ class: le(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]", [r.modelValue ? "" : "text-opacity-50", E(a)].join(" ")]),
7602
7606
  style: { border: "1px solid #CFD9E0" }
7603
7607
  }, null, 10, vf), [
7604
7608
  [qe, o.value]
@@ -7651,7 +7655,7 @@ const Ed = {
7651
7655
  step: v.step,
7652
7656
  disabled: f.value,
7653
7657
  ref: "range",
7654
- class: te(["w-full cursor-pointer accent-blue-500", [v.modelValue ? "" : "text-opacity-50", E(a)].join(" ")])
7658
+ class: le(["w-full cursor-pointer accent-blue-500", [v.modelValue ? "" : "text-opacity-50", E(a)].join(" ")])
7655
7659
  }, null, 10, bf), [
7656
7660
  [qe, s.value]
7657
7661
  ]),
@@ -7770,7 +7774,7 @@ const Ed = {
7770
7774
  f.value[C] && f.value[C].value !== h && (f.value[C].value = h || "");
7771
7775
  });
7772
7776
  }, { deep: !0 }), (b, h) => (i(), p("div", {
7773
- class: te(["grid gap-2", `grid-cols-${a.value}`])
7777
+ class: le(["grid gap-2", `grid-cols-${a.value}`])
7774
7778
  }, [
7775
7779
  (i(!0), p(_e, null, De(l.value, (C) => (i(), p("div", {
7776
7780
  key: C,
@@ -7784,7 +7788,7 @@ const Ed = {
7784
7788
  placeholder: b.placeholder,
7785
7789
  disabled: b.disabled,
7786
7790
  name: `${b.name}[${C - 1}]`,
7787
- class: te(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [E(n), { "!border-red-600": b.error }]]),
7791
+ class: le(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [E(n), { "!border-red-600": b.error }]]),
7788
7792
  style: {
7789
7793
  border: "1px solid #CFD9E0"
7790
7794
  }
@@ -7795,7 +7799,7 @@ const Ed = {
7795
7799
  onInput: (y) => $(y, C - 1),
7796
7800
  placeholder: r.value,
7797
7801
  disabled: s.value,
7798
- class: te(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [E(n), { "!border-red-600": b.error }]]),
7802
+ class: le(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white", [E(n), { "!border-red-600": b.error }]]),
7799
7803
  style: {
7800
7804
  border: "1px solid #CFD9E0"
7801
7805
  }
@@ -7859,21 +7863,21 @@ const Ed = {
7859
7863
  const _ = st("values"), I = w(() => !!l.disabled), R = w(() => l.placeholder ?? "Оберіть значення"), F = w(() => l.search !== !1), W = w(() => {
7860
7864
  const L = l.parent ?? l.parentValue;
7861
7865
  return L ? String(L) : "";
7862
- }), H = w(() => W.value ? _?.value?.[W.value] ?? null : null), ee = (L) => L == null ? "__null__" : String(L), X = (L) => {
7866
+ }), H = w(() => W.value ? _?.value?.[W.value] ?? null : null), te = (L) => L == null ? "__null__" : String(L), X = (L) => {
7863
7867
  if (!L) return "";
7864
7868
  const j = L.label ?? L.text ?? L.name ?? L.ua ?? L.en;
7865
7869
  return j ? String(j) : L.id !== void 0 && L.id !== null ? String(L.id) : "";
7866
- }, oe = (L) => {
7867
- const j = ee(L);
7870
+ }, re = (L) => {
7871
+ const j = te(L);
7868
7872
  return u.value[j] || (u.value[j] = `array-select-${j}-${Math.random().toString(36).slice(2, 8)}`), u.value[j];
7869
- }, ne = w(() => new Set(o.value.map((L) => ee(L.id)))), Y = w(() => {
7870
- const L = ne.value;
7873
+ }, ae = w(() => new Set(o.value.map((L) => te(L.id)))), Y = w(() => {
7874
+ const L = ae.value;
7871
7875
  let j = [...s.value];
7872
7876
  if (!l.data && v.value.trim()) {
7873
7877
  const J = v.value.toLowerCase();
7874
7878
  j = j.filter((pe) => X(pe).toLowerCase().includes(J));
7875
7879
  }
7876
- return j.filter((J) => !L.has(ee(J.id)));
7880
+ return j.filter((J) => !L.has(te(J.id)));
7877
7881
  }), G = () => {
7878
7882
  if (!l.data) return "";
7879
7883
  const L = l.prefix ?? "api", j = l.api ?? `/${L}/suggest/${l.data}`;
@@ -7881,19 +7885,19 @@ const Ed = {
7881
7885
  }, O = () => {
7882
7886
  o.value.length && (y = !0, o.value = o.value.map((L) => ({
7883
7887
  ...L,
7884
- text: r.value[ee(L.id)] ?? L.text
7888
+ text: r.value[te(L.id)] ?? L.text
7885
7889
  })));
7886
- }, ae = (L) => {
7887
- const j = ee(L.id), J = X(L);
7890
+ }, oe = (L) => {
7891
+ const j = te(L.id), J = X(L);
7888
7892
  J && (r.value[j] = J);
7889
7893
  }, ue = (L) => {
7890
- s.value = L ? [...L] : [], L?.forEach(ae), O();
7894
+ s.value = L ? [...L] : [], L?.forEach(oe), O();
7891
7895
  }, he = (L) => {
7892
7896
  if (!L.length) return;
7893
- const j = new Map(s.value.map((J) => [ee(J.id), J]));
7897
+ const j = new Map(s.value.map((J) => [te(J.id), J]));
7894
7898
  L.forEach((J) => {
7895
- const pe = ee(J.id);
7896
- j.set(pe, J), ae(J);
7899
+ const pe = te(J.id);
7900
+ j.set(pe, J), oe(J);
7897
7901
  }), s.value = Array.from(j.values()), O();
7898
7902
  }, $e = async (L = "") => {
7899
7903
  if (!l.data) return [];
@@ -7910,7 +7914,7 @@ const Ed = {
7910
7914
  if (!l.data || !L.length) return [];
7911
7915
  const j = G();
7912
7916
  if (!j) return [];
7913
- const J = Array.from(new Set(L.map((Le) => ee(Le)))), pe = new URLSearchParams();
7917
+ const J = Array.from(new Set(L.map((Le) => te(Le)))), pe = new URLSearchParams();
7914
7918
  pe.set("json", "1"), pe.set("val", J.join(",")), l.start === 1 && pe.set("start", "1"), H.value !== null && H.value !== void 0 && H.value !== "" && pe.set("parent", String(H.value));
7915
7919
  try {
7916
7920
  const ot = (await (await fetch(`${j}?${pe.toString()}`)).json())?.data ?? [];
@@ -7920,11 +7924,11 @@ const Ed = {
7920
7924
  }
7921
7925
  }, He = async (L) => {
7922
7926
  if (L == null || L === "") return null;
7923
- const j = ee(L), J = s.value.find((Le) => ee(Le.id) === j);
7927
+ const j = te(L), J = s.value.find((Le) => te(Le.id) === j);
7924
7928
  if (J) return J;
7925
7929
  const [pe] = await Ze([L]);
7926
7930
  return pe ?? null;
7927
- }, re = async (L = "", { force: j = !1 } = {}) => {
7931
+ }, se = async (L = "", { force: j = !1 } = {}) => {
7928
7932
  if (!l.data) return;
7929
7933
  const J = H.value ?? null;
7930
7934
  if (!j && f.value.keyword === L && f.value.parent === J && s.value.length > 0) return;
@@ -7937,7 +7941,7 @@ const Ed = {
7937
7941
  J && clearTimeout(J), J = setTimeout(() => L(...pe), j);
7938
7942
  };
7939
7943
  })(async (L) => {
7940
- l.data && await re(L, { force: !0 });
7944
+ l.data && await se(L, { force: !0 });
7941
7945
  }, 250), xe = D(null), Se = () => {
7942
7946
  if (!g.value) return;
7943
7947
  const L = g.value.getBoundingClientRect(), j = window.innerHeight ?? document.documentElement.clientHeight, J = window.innerWidth ?? document.documentElement.clientWidth, pe = 8, Le = 8, ct = l.maxHeight ?? 280, ot = j - L.bottom - Le - pe, Mt = L.top - Le - pe, nt = ot >= Mt, rt = Math.max(J - pe * 2, 0);
@@ -7958,7 +7962,7 @@ const Ed = {
7958
7962
  top: nt ? `${L.bottom + Le}px` : `${L.top - Le}px`
7959
7963
  };
7960
7964
  }, Ee = async (L = "click") => {
7961
- I.value || k.value || (xe.value = L, await re(v.value.trim()), k.value = !0, await Xe(), Se(), h.value?.focus());
7965
+ I.value || k.value || (xe.value = L, await se(v.value.trim()), k.value = !0, await Xe(), Se(), h.value?.focus());
7962
7966
  }, Re = () => {
7963
7967
  k.value = !1, xe.value = null, Xe(() => {
7964
7968
  h.value?.blur();
@@ -7992,22 +7996,22 @@ const Ed = {
7992
7996
  if (L.key === "Enter") {
7993
7997
  L.preventDefault();
7994
7998
  const j = Y.value[0];
7995
- j && le(j);
7999
+ j && Q(j);
7996
8000
  }
7997
- }, le = (L) => {
8001
+ }, Q = (L) => {
7998
8002
  if (!L) return;
7999
- const j = ee(L.id);
8000
- if (ne.value.has(j)) return;
8001
- ae(L);
8003
+ const j = te(L.id);
8004
+ if (ae.value.has(j)) return;
8005
+ oe(L);
8002
8006
  const J = {
8003
8007
  id: L.id,
8004
8008
  text: X(L) || String(L.id ?? ""),
8005
- key: oe(L.id)
8009
+ key: re(L.id)
8006
8010
  };
8007
- o.value = [...o.value, J], se(L), v.value = "", Xe(() => {
8011
+ o.value = [...o.value, J], ne(L), v.value = "", Xe(() => {
8008
8012
  h.value?.focus();
8009
8013
  });
8010
- }, se = (L) => {
8014
+ }, ne = (L) => {
8011
8015
  const j = o.value.map((J) => J.id);
8012
8016
  a("value-selected", {
8013
8017
  name: l.name,
@@ -8016,7 +8020,7 @@ const Ed = {
8016
8020
  });
8017
8021
  }, we = (L) => {
8018
8022
  if (I.value) return;
8019
- const j = o.value.filter((J) => ee(J.id) !== ee(L));
8023
+ const j = o.value.filter((J) => te(J.id) !== te(L));
8020
8024
  o.value = j;
8021
8025
  }, {
8022
8026
  isOpenAdd: ke,
@@ -8034,14 +8038,14 @@ const Ed = {
8034
8038
  modelValue: n,
8035
8039
  onCreated: async (L, j) => {
8036
8040
  const J = L ?? await He(j), pe = J?.id ?? j;
8037
- ne.value.has(ee(pe)) || (J && ae(J), o.value = [
8041
+ ae.value.has(te(pe)) || (J && oe(J), o.value = [
8038
8042
  ...o.value,
8039
8043
  {
8040
8044
  id: pe,
8041
8045
  text: J ? X(J) : String(pe),
8042
- key: oe(pe)
8046
+ key: re(pe)
8043
8047
  }
8044
- ], se(J ?? null));
8048
+ ], ne(J ?? null));
8045
8049
  }
8046
8050
  }), We = (L) => {
8047
8051
  I.value || ($.value = L);
@@ -8052,13 +8056,13 @@ const Ed = {
8052
8056
  }, U = async () => {
8053
8057
  const j = (Array.isArray(n.value) ? [...n.value] : []).filter((pe) => pe != null);
8054
8058
  if (l.data && j.length) {
8055
- const pe = j.filter((Le) => !r.value[ee(Le)]);
8059
+ const pe = j.filter((Le) => !r.value[te(Le)]);
8056
8060
  pe.length && await Ze(pe);
8057
8061
  }
8058
8062
  const J = j.map((pe) => ({
8059
8063
  id: pe,
8060
- text: r.value[ee(pe)] ?? String(pe),
8061
- key: oe(pe)
8064
+ text: r.value[te(pe)] ?? String(pe),
8065
+ key: re(pe)
8062
8066
  }));
8063
8067
  y = !0, o.value = J;
8064
8068
  };
@@ -8082,7 +8086,7 @@ const Ed = {
8082
8086
  }), me(() => l.options, async (L) => {
8083
8087
  l.data || (ue(L ?? []), await U());
8084
8088
  }, { immediate: !0, deep: !0 }), me(() => l.data, async (L) => {
8085
- L && (await re(v.value.trim()), await U());
8089
+ L && (await se(v.value.trim()), await U());
8086
8090
  }, { immediate: !0 });
8087
8091
  const P = D(!1);
8088
8092
  return me(H, async () => {
@@ -8091,7 +8095,7 @@ const Ed = {
8091
8095
  P.value = !0;
8092
8096
  return;
8093
8097
  }
8094
- o.value = [], await re(v.value.trim()), await U();
8098
+ o.value = [], await se(v.value.trim()), await U();
8095
8099
  }
8096
8100
  }), Qe(async () => {
8097
8101
  document.addEventListener("click", Ne, !0), window.addEventListener("keydown", kt), window.addEventListener("scroll", _t, !0), await U();
@@ -8131,7 +8135,7 @@ const Ed = {
8131
8135
  c("div", {
8132
8136
  ref_key: "triggerRef",
8133
8137
  ref: g,
8134
- class: te([
8138
+ class: le([
8135
8139
  "flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white px-3",
8136
8140
  "border-gray-300 hover:border-[#b3d4ff]",
8137
8141
  k.value ? "border-[#2684ff] ring-1 ring-[#2684ff] shadow-[0_0_0_1px_rgba(38,132,255,0.5)]" : "",
@@ -8157,7 +8161,7 @@ const Ed = {
8157
8161
  [qe, v.value]
8158
8162
  ]),
8159
8163
  c("span", {
8160
- class: te(["text-stone-400 transition-transform duration-150", k.value ? "rotate-180" : ""]),
8164
+ class: le(["text-stone-400 transition-transform duration-150", k.value ? "rotate-180" : ""]),
8161
8165
  "aria-hidden": "true"
8162
8166
  }, [
8163
8167
  K(E(pl), { class: "h-4 w-4" })
@@ -8175,10 +8179,10 @@ const Ed = {
8175
8179
  }, [
8176
8180
  c("div", Lf, [
8177
8181
  (i(!0), p(_e, null, De(Y.value, (J) => (i(), p("button", {
8178
- key: ee(J.id),
8182
+ key: te(J.id),
8179
8183
  type: "button",
8180
8184
  class: "w-full px-3 py-2 text-left text-sm text-stone-900 hover:bg-stone-100 disabled:opacity-50",
8181
- onClick: Be((pe) => le(J), ["stop"]),
8185
+ onClick: Be((pe) => Q(J), ["stop"]),
8182
8186
  disabled: I.value
8183
8187
  }, ie(X(J)), 9, Df))), 128)),
8184
8188
  Y.value.length === 0 ? (i(), p("p", Af, " Немає варіантів ")) : z("", !0)
@@ -8204,7 +8208,7 @@ const Ed = {
8204
8208
  c("div", Ff, [
8205
8209
  (i(!0), p(_e, null, De(o.value, (J, pe) => (i(), p("div", {
8206
8210
  key: J.key,
8207
- class: te(["flex items-center gap-2 rounded-md border border-stone-200 bg-white px-2 py-2", { "opacity-60": $.value === pe }]),
8211
+ class: le(["flex items-center gap-2 rounded-md border border-stone-200 bg-white px-2 py-2", { "opacity-60": $.value === pe }]),
8208
8212
  draggable: "true",
8209
8213
  onDragstart: (Le) => We(pe),
8210
8214
  onDragover: j[6] || (j[6] = Be(() => {
@@ -8294,8 +8298,8 @@ const Ed = {
8294
8298
  }), h = w(() => {
8295
8299
  const F = b.value;
8296
8300
  if (!F) return "";
8297
- const [W, H, ee, X] = F;
8298
- return `${W},${Math.max(H, X)},${ee},${Math.min(H, X)}`;
8301
+ const [W, H, te, X] = F;
8302
+ return `${W},${Math.max(H, X)},${te},${Math.min(H, X)}`;
8299
8303
  });
8300
8304
  w(() => h.value ? "1" : "0");
8301
8305
  const C = st("values");
@@ -8307,8 +8311,8 @@ const Ed = {
8307
8311
  if (!F) return;
8308
8312
  let W = F;
8309
8313
  if (a.includes?.length && C?.value) {
8310
- const ee = a.includes.map((X) => C.value?.[X]).filter(Boolean);
8311
- ee.length && (W = `${ee.join(", ")}, ${F}`);
8314
+ const te = a.includes.map((X) => C.value?.[X]).filter(Boolean);
8315
+ te.length && (W = `${te.join(", ")}, ${F}`);
8312
8316
  }
8313
8317
  const H = R(W);
8314
8318
  if (H) {
@@ -8316,8 +8320,8 @@ const Ed = {
8316
8320
  try {
8317
8321
  const X = await (await fetch(H)).json();
8318
8322
  f.value = Array.isArray(X) ? X : [], v.value = !0;
8319
- } catch (ee) {
8320
- console.error("Address search error:", ee);
8323
+ } catch (te) {
8324
+ console.error("Address search error:", te);
8321
8325
  } finally {
8322
8326
  u.value = !1;
8323
8327
  }
@@ -8329,11 +8333,11 @@ const Ed = {
8329
8333
  function I(F) {
8330
8334
  if (!F) return;
8331
8335
  v.value = !1;
8332
- const W = parseFloat(F.lat), ee = {
8336
+ const W = parseFloat(F.lat), te = {
8333
8337
  type: "Point",
8334
8338
  coordinates: [parseFloat(F.lon), W]
8335
8339
  };
8336
- a.geom && C?.value && (C.value[a.geom] = ee), n("update:geom", ee);
8340
+ a.geom && C?.value && (C.value[a.geom] = te), n("update:geom", te);
8337
8341
  }
8338
8342
  function R(F) {
8339
8343
  if (!a.api) return "";
@@ -8341,7 +8345,7 @@ const Ed = {
8341
8345
  value: encodeURIComponent(F),
8342
8346
  bbox: b.value ? b.value.join(",") : ""
8343
8347
  };
8344
- return a.api.replace(l, (H, ee) => W[ee.trim()] ?? "");
8348
+ return a.api.replace(l, (H, te) => W[te.trim()] ?? "");
8345
8349
  }
8346
8350
  return (F, W) => (i(), p("div", Nf, [
8347
8351
  c("div", jf, [
@@ -8350,7 +8354,7 @@ const Ed = {
8350
8354
  "onUpdate:modelValue": W[0] || (W[0] = (H) => r.value = H),
8351
8355
  placeholder: $.value,
8352
8356
  disabled: S.value,
8353
- class: te(["py-1.5 px-3 block w-full bg-white border rounded-md placeholder:text-gray-400 focus:ring-2 focus:ring-blue-500", [E(o), { "!border-red-600": a.error }]]),
8357
+ class: le(["py-1.5 px-3 block w-full bg-white border rounded-md placeholder:text-gray-400 focus:ring-2 focus:ring-blue-500", [E(o), { "!border-red-600": a.error }]]),
8354
8358
  style: { border: "1px solid #CFD9E0" },
8355
8359
  onKeydown: Aa(Be(y, ["prevent"]), ["enter"])
8356
8360
  }, null, 42, Uf), [
@@ -8394,8 +8398,8 @@ const Ed = {
8394
8398
  ])
8395
8399
  ]),
8396
8400
  c("ul", null, [
8397
- (i(!0), p(_e, null, De(f.value, (H, ee) => (i(), p("li", {
8398
- key: ee,
8401
+ (i(!0), p(_e, null, De(f.value, (H, te) => (i(), p("li", {
8402
+ key: te,
8399
8403
  onClick: (X) => I(H),
8400
8404
  class: "px-3 py-2 cursor-pointer hover:bg-gray-100 border-b text-sm"
8401
8405
  }, ie(H.display_name), 9, Kf))), 128))
@@ -8533,141 +8537,141 @@ const Ed = {
8533
8537
  }),
8534
8538
  emits: ["update:modelValue"],
8535
8539
  setup(e) {
8536
- const t = e, l = Oe(e, "modelValue"), a = D([]), n = D([]), o = D(0), s = D(null), r = D(null), u = D(null), f = w(() => t.groupLabel ?? "Group"), v = w(() => t.emptyLabel ?? "Ще немає груп"), k = w(() => t.schema?.map((re) => ({
8537
- ...re,
8538
- disabled: t.disabled || re.disabled
8539
- })) ?? []), $ = w(() => k.value.map((re) => H(re))), S = w(() => t.view === "accordion"), g = w(() => !!(t.collapsible || S.value)), b = w(() => t.draggable !== !1), h = w(() => t.disabled ? !1 : t.maxGroups ? l.value.length < t.maxGroups : !0), C = w(() => t.disabled || l.value.length <= (t.minGroups || 0));
8540
+ const t = e, l = Oe(e, "modelValue"), a = D([]), n = D([]), o = D(0), s = D(null), r = D(null), u = D(null), f = w(() => t.groupLabel ?? "Group"), v = w(() => t.emptyLabel ?? "Ще немає груп"), k = w(() => t.schema?.map((se) => ({
8541
+ ...se,
8542
+ disabled: t.disabled || se.disabled
8543
+ })) ?? []), $ = w(() => k.value.map((se) => H(se))), S = w(() => t.view === "accordion"), g = w(() => !!(t.collapsible || S.value)), b = w(() => t.draggable !== !1), h = w(() => t.disabled ? !1 : t.maxGroups ? l.value.length < t.maxGroups : !0), C = w(() => t.disabled || l.value.length <= (t.minGroups || 0));
8540
8544
  me(() => l.value.length, () => {
8541
8545
  y(), V(), _();
8542
8546
  }, { immediate: !0 }), me(() => t.schema, _, { immediate: !0, deep: !0 }), me(() => t.view, () => {
8543
8547
  V();
8544
8548
  }, { immediate: !0 });
8545
8549
  function y() {
8546
- const re = l.value.length;
8547
- a.value.length < re ? a.value = [...a.value, ...Array.from({ length: re - a.value.length }, () => na())] : a.value.length > re && a.value.splice(re);
8550
+ const se = l.value.length;
8551
+ a.value.length < se ? a.value = [...a.value, ...Array.from({ length: se - a.value.length }, () => na())] : a.value.length > se && a.value.splice(se);
8548
8552
  }
8549
8553
  function V() {
8550
- const re = l.value.length;
8551
- S.value ? re === 0 ? o.value = -1 : o.value >= re ? o.value = re - 1 : o.value < 0 && (o.value = 0) : n.value.length < re ? n.value = [...n.value, ...Array.from({ length: re - n.value.length }, () => !1)] : n.value.length > re && n.value.splice(re);
8554
+ const se = l.value.length;
8555
+ S.value ? se === 0 ? o.value = -1 : o.value >= se ? o.value = se - 1 : o.value < 0 && (o.value = 0) : n.value.length < se ? n.value = [...n.value, ...Array.from({ length: se - n.value.length }, () => !1)] : n.value.length > se && n.value.splice(se);
8552
8556
  }
8553
8557
  function _() {
8554
8558
  if (!t.minGroups || l.value.length >= t.minGroups) return;
8555
- const re = t.minGroups - l.value.length, ge = Array.from({ length: re }, I);
8559
+ const se = t.minGroups - l.value.length, ge = Array.from({ length: se }, I);
8556
8560
  l.value = [...l.value, ...ge], V();
8557
8561
  }
8558
8562
  function I() {
8559
- const re = {};
8563
+ const se = {};
8560
8564
  return k.value.forEach((ge) => {
8561
- re[ge.name] = ge?.default ?? null;
8562
- }), re;
8565
+ se[ge.name] = ge?.default ?? null;
8566
+ }), se;
8563
8567
  }
8564
8568
  function R() {
8565
8569
  h.value && (l.value = [...l.value, I()], y(), V());
8566
8570
  }
8567
- function F(re) {
8568
- C.value || (l.value = l.value.filter((ge, Ie) => Ie !== re), y(), S.value ? o.value >= l.value.length && (o.value = l.value.length - 1) : n.value.splice(re, 1), _());
8571
+ function F(se) {
8572
+ C.value || (l.value = l.value.filter((ge, Ie) => Ie !== se), y(), S.value ? o.value >= l.value.length && (o.value = l.value.length - 1) : n.value.splice(se, 1), _());
8569
8573
  }
8570
- function W(re) {
8574
+ function W(se) {
8571
8575
  if (t.disabled) return;
8572
- const ge = JSON.parse(JSON.stringify(l.value[re] ?? {}));
8576
+ const ge = JSON.parse(JSON.stringify(l.value[se] ?? {}));
8573
8577
  l.value = [
8574
- ...l.value.slice(0, re + 1),
8578
+ ...l.value.slice(0, se + 1),
8575
8579
  ge,
8576
- ...l.value.slice(re + 1)
8577
- ], y(), S.value ? o.value > re && (o.value += 1) : n.value.splice(re + 1, 0, n.value[re] ?? !1);
8580
+ ...l.value.slice(se + 1)
8581
+ ], y(), S.value ? o.value > se && (o.value += 1) : n.value.splice(se + 1, 0, n.value[se] ?? !1);
8578
8582
  }
8579
- function H(re) {
8583
+ function H(se) {
8580
8584
  return {
8581
- ...re
8585
+ ...se
8582
8586
  };
8583
8587
  }
8584
- function ee(re) {
8585
- return S.value ? o.value === -1 && re === 0 ? !1 : o.value !== re : !!n.value[re];
8588
+ function te(se) {
8589
+ return S.value ? o.value === -1 && se === 0 ? !1 : o.value !== se : !!n.value[se];
8586
8590
  }
8587
- function X(re) {
8591
+ function X(se) {
8588
8592
  if (g.value) {
8589
8593
  if (S.value) {
8590
- o.value = re;
8594
+ o.value = se;
8591
8595
  return;
8592
8596
  }
8593
- n.value[re] = !n.value[re];
8597
+ n.value[se] = !n.value[se];
8594
8598
  }
8595
8599
  }
8596
- function oe(re, ge) {
8600
+ function re(se, ge) {
8597
8601
  if (!b.value || t.disabled) {
8598
8602
  ge.preventDefault();
8599
8603
  return;
8600
8604
  }
8601
- s.value = re, r.value = re, u.value = {
8605
+ s.value = se, r.value = se, u.value = {
8602
8606
  groups: JSON.parse(JSON.stringify(l.value)),
8603
8607
  keys: [...a.value],
8604
8608
  states: [...n.value]
8605
- }, ge.dataTransfer?.setData("text/plain", String(re)), ge.dataTransfer?.setDragImage?.(ge.currentTarget, 0, 0);
8609
+ }, ge.dataTransfer?.setData("text/plain", String(se)), ge.dataTransfer?.setDragImage?.(ge.currentTarget, 0, 0);
8606
8610
  }
8607
- function ne(re, ge) {
8608
- !b.value || t.disabled || s.value !== null && he(re, ge);
8611
+ function ae(se, ge) {
8612
+ !b.value || t.disabled || s.value !== null && he(se, ge);
8609
8613
  }
8610
- function Y(re, ge) {
8611
- he(re, ge);
8614
+ function Y(se, ge) {
8615
+ he(se, ge);
8612
8616
  }
8613
- function G(re) {
8617
+ function G(se) {
8614
8618
  !b.value || t.disabled || He();
8615
8619
  }
8616
8620
  function O() {
8617
8621
  u.value && ue(), s.value = null, r.value = null, u.value = null;
8618
8622
  }
8619
- function ae(re, ge) {
8620
- const Ie = [...l.value], [xe] = Ie.splice(re, 1);
8623
+ function oe(se, ge) {
8624
+ const Ie = [...l.value], [xe] = Ie.splice(se, 1);
8621
8625
  Ie.splice(ge, 0, xe), l.value = Ie;
8622
- const Se = [...a.value], [Ee] = Se.splice(re, 1);
8626
+ const Se = [...a.value], [Ee] = Se.splice(se, 1);
8623
8627
  if (Se.splice(ge, 0, Ee), a.value = Se, S.value)
8624
- o.value === re && (o.value = ge);
8628
+ o.value === se && (o.value = ge);
8625
8629
  else {
8626
- const Re = [...n.value], [it] = Re.splice(re, 1);
8630
+ const Re = [...n.value], [it] = Re.splice(se, 1);
8627
8631
  Re.splice(ge, 0, it), n.value = Re;
8628
8632
  }
8629
8633
  }
8630
8634
  function ue() {
8631
8635
  u.value && (l.value = u.value.groups, a.value = u.value.keys, n.value = u.value.states, u.value = null, r.value = null);
8632
8636
  }
8633
- function he(re, ge) {
8637
+ function he(se, ge) {
8634
8638
  if (s.value === null) return;
8635
- const Ie = $e(re, ge);
8639
+ const Ie = $e(se, ge);
8636
8640
  r.value = Ie, Ze(Ie);
8637
8641
  }
8638
- function $e(re, ge) {
8639
- if (!ge?.currentTarget) return re;
8640
- const Ie = ge.currentTarget.getBoundingClientRect(), Se = ge.clientY - Ie.top > Ie.height / 2 ? re + 1 : re;
8642
+ function $e(se, ge) {
8643
+ if (!ge?.currentTarget) return se;
8644
+ const Ie = ge.currentTarget.getBoundingClientRect(), Se = ge.clientY - Ie.top > Ie.height / 2 ? se + 1 : se;
8641
8645
  return Math.max(0, Math.min(Se, l.value.length));
8642
8646
  }
8643
- function Ze(re) {
8647
+ function Ze(se) {
8644
8648
  const ge = s.value;
8645
8649
  if (ge === null) return;
8646
- let Ie = re;
8650
+ let Ie = se;
8647
8651
  if (Ie > l.value.length && (Ie = l.value.length), Ie === ge || Ie === ge + 1) return;
8648
8652
  const xe = Ie > ge ? Ie - 1 : Ie;
8649
- ae(ge, xe), s.value = xe, r.value = Ie > ge ? xe + 1 : xe;
8653
+ oe(ge, xe), s.value = xe, r.value = Ie > ge ? xe + 1 : xe;
8650
8654
  }
8651
8655
  function He() {
8652
8656
  u.value = null, s.value = null, r.value = null;
8653
8657
  }
8654
- return (re, ge) => (i(), p("div", np, [
8658
+ return (se, ge) => (i(), p("div", np, [
8655
8659
  (i(!0), p(_e, null, De(l.value, (Ie, xe) => (i(), p("div", {
8656
8660
  key: a.value[xe],
8657
- class: te(["relative border border-gray-200 rounded-lg bg-white transition vs-dataform__group", [
8658
- t.view === "accordion" ? "overflow-hidden" : ee(xe) ? "pt-6 px-6" : "p-6"
8661
+ class: le(["relative border border-gray-200 rounded-lg bg-white transition vs-dataform__group", [
8662
+ t.view === "accordion" ? "overflow-hidden" : te(xe) ? "pt-6 px-6" : "p-6"
8659
8663
  ]]),
8660
8664
  draggable: b.value && !t.disabled,
8661
- onDragstart: (Se) => oe(xe, Se),
8665
+ onDragstart: (Se) => re(xe, Se),
8662
8666
  onDragend: O,
8663
- onDragover: Be((Se) => ne(xe, Se), ["prevent"]),
8667
+ onDragover: Be((Se) => ae(xe, Se), ["prevent"]),
8664
8668
  onDragenter: Be((Se) => Y(xe, Se), ["prevent"]),
8665
8669
  onDrop: Be((Se) => G(), ["prevent"])
8666
8670
  }, [
8667
8671
  c("div", {
8668
- class: te(["flex items-center justify-between gap-2 border-b border-gray-100 px-4 py-3", [
8672
+ class: le(["flex items-center justify-between gap-2 border-b border-gray-100 px-4 py-3", [
8669
8673
  t.view !== "accordion" ? "-mx-6 -mt-6 px-6" : "",
8670
- t.view !== "accordion" && !ee(xe) ? "rounded-t-lg" : "rounded-lg"
8674
+ t.view !== "accordion" && !te(xe) ? "rounded-t-lg" : "rounded-lg"
8671
8675
  ]])
8672
8676
  }, [
8673
8677
  c("div", op, [
@@ -8683,7 +8687,7 @@ const Ed = {
8683
8687
  onClick: (Se) => X(xe)
8684
8688
  }, [
8685
8689
  K(E(pl), {
8686
- class: te(["h-4 w-4 transition", ee(xe) ? "-rotate-90" : "rotate-0"])
8690
+ class: le(["h-4 w-4 transition", te(xe) ? "-rotate-90" : "rotate-0"])
8687
8691
  }, null, 8, ["class"])
8688
8692
  ], 8, rp)) : z("", !0),
8689
8693
  c("div", sp, ie(`${f.value} (${xe + 1})`), 1)
@@ -8712,7 +8716,7 @@ const Ed = {
8712
8716
  ])
8713
8717
  ], 2),
8714
8718
  Ve(c("div", {
8715
- class: te(t.view === "accordion" ? "p-6" : "pt-6")
8719
+ class: le(t.view === "accordion" ? "p-6" : "pt-6")
8716
8720
  }, [
8717
8721
  K(Rt, {
8718
8722
  class: "vs-dataform__form",
@@ -8725,7 +8729,7 @@ const Ed = {
8725
8729
  disabled: t.disabled
8726
8730
  }, null, 8, ["schema", "values", "onUpdate:values", "form-id", "disabled"])
8727
8731
  ], 2), [
8728
- [Pt, !ee(xe)]
8732
+ [Pt, !te(xe)]
8729
8733
  ])
8730
8734
  ], 42, ap))), 128)),
8731
8735
  l.value.length === 0 ? (i(), p("div", cp, ie(v.value), 1)) : z("", !0),
@@ -9044,7 +9048,7 @@ const Ed = {
9044
9048
  }, {
9045
9049
  default: lt(() => [
9046
9050
  c("div", {
9047
- class: te(["flex w-full", `${l.item.type}-component`])
9051
+ class: le(["flex w-full", `${l.item.type}-component`])
9048
9052
  }, [
9049
9053
  c("div", hp, [
9050
9054
  (i(), be(ut(f.value), zt(S.value, {
@@ -9081,8 +9085,8 @@ const Ed = {
9081
9085
  ]), u = w(() => {
9082
9086
  const X = l.width;
9083
9087
  if (X == null) return {};
9084
- const oe = typeof X == "number" ? `${X}px` : `${X}`;
9085
- return { width: oe, minWidth: oe };
9088
+ const re = typeof X == "number" ? `${X}px` : `${X}`;
9089
+ return { width: re, minWidth: re };
9086
9090
  });
9087
9091
  let f = null, v = 0, k = 0, $ = null, S = null, g = null;
9088
9092
  const b = () => H(), h = () => y();
@@ -9111,15 +9115,15 @@ const Ed = {
9111
9115
  }), Ht(() => {
9112
9116
  R(), C(null, !0), $ = null, typeof window < "u" && (v && window.cancelAnimationFrame(v), k && window.cancelAnimationFrame(k));
9113
9117
  });
9114
- function C(X, oe = !1) {
9115
- if (g && (g(), g = null), oe) {
9118
+ function C(X, re = !1) {
9119
+ if (g && (g(), g = null), re) {
9116
9120
  S = null;
9117
9121
  return;
9118
9122
  }
9119
9123
  if (S = X ?? null, typeof window > "u") return;
9120
- const ne = X ?? window, Y = window;
9121
- ne.addEventListener("scroll", b, { passive: !0 }), Y.addEventListener("resize", h), g = () => {
9122
- ne.removeEventListener("scroll", b), Y.removeEventListener("resize", h);
9124
+ const ae = X ?? window, Y = window;
9125
+ ae.addEventListener("scroll", b, { passive: !0 }), Y.addEventListener("resize", h), g = () => {
9126
+ ae.removeEventListener("scroll", b), Y.removeEventListener("resize", h);
9123
9127
  };
9124
9128
  }
9125
9129
  function y() {
@@ -9132,21 +9136,21 @@ const Ed = {
9132
9136
  }
9133
9137
  function V() {
9134
9138
  if (!s.value || !$) return;
9135
- const X = Array.from($.querySelectorAll("h1, h2")), oe = /* @__PURE__ */ new Set(), ne = [];
9139
+ const X = Array.from($.querySelectorAll("h1, h2")), re = /* @__PURE__ */ new Set(), ae = [];
9136
9140
  X.forEach((Y, G) => {
9137
9141
  const O = Y.textContent?.trim() ?? "";
9138
9142
  if (!O) return;
9139
- let ae = (Y.getAttribute("id") ?? "").trim();
9140
- ae || (ae = _(O) || `heading-${G + 1}`);
9141
- let ue = ae, he = 1;
9142
- for (; oe.has(ue); )
9143
- ue = `${ae}-${he += 1}`;
9144
- Y.id !== ue && Object.assign(Y, { id: ue }), oe.add(ue), ne.push({
9143
+ let oe = (Y.getAttribute("id") ?? "").trim();
9144
+ oe || (oe = _(O) || `heading-${G + 1}`);
9145
+ let ue = oe, he = 1;
9146
+ for (; re.has(ue); )
9147
+ ue = `${oe}-${he += 1}`;
9148
+ Y.id !== ue && Object.assign(Y, { id: ue }), re.add(ue), ae.push({
9145
9149
  id: ue,
9146
9150
  text: O,
9147
9151
  level: Y.tagName.toLowerCase() === "h1" ? 1 : 2
9148
9152
  });
9149
- }), a.value = ne, ne.length || (n.value = ""), W();
9153
+ }), a.value = ae, ae.length || (n.value = ""), W();
9150
9154
  }
9151
9155
  function _(X) {
9152
9156
  return X.toLowerCase().replace(/[^a-z0-9\s-]/g, "").trim().replace(/\s+/g, "-");
@@ -9158,64 +9162,64 @@ const Ed = {
9158
9162
  f && (f.disconnect(), f = null);
9159
9163
  }
9160
9164
  function F(X) {
9161
- const oe = S;
9162
- if (!oe)
9165
+ const re = S;
9166
+ if (!re)
9163
9167
  return typeof window > "u" ? X.offsetTop : X.getBoundingClientRect().top + window.scrollY;
9164
- const ne = X.getBoundingClientRect(), Y = oe.getBoundingClientRect();
9165
- return ne.top - Y.top + oe.scrollTop;
9168
+ const ae = X.getBoundingClientRect(), Y = re.getBoundingClientRect();
9169
+ return ae.top - Y.top + re.scrollTop;
9166
9170
  }
9167
9171
  function W() {
9168
9172
  if (!s.value || !a.value.length) return;
9169
- const X = S, oe = (X ? X.scrollTop : null) || (typeof window < "u" ? window.scrollY : 0), ne = (X ? X.clientHeight : null) || (typeof window < "u" ? window.innerHeight : 0), Y = oe + ne;
9173
+ const X = S, re = (X ? X.scrollTop : null) || (typeof window < "u" ? window.scrollY : 0), ae = (X ? X.clientHeight : null) || (typeof window < "u" ? window.innerHeight : 0), Y = re + ae;
9170
9174
  let G = null;
9171
- for (let ae = 0; ae < a.value.length; ae += 1) {
9172
- const ue = a.value[ae], he = document.getElementById(ue.id);
9175
+ for (let oe = 0; oe < a.value.length; oe += 1) {
9176
+ const ue = a.value[oe], he = document.getElementById(ue.id);
9173
9177
  if (he) {
9174
9178
  const $e = F(he);
9175
- $e + he.offsetHeight > oe && $e < Y && (G = ue.id);
9179
+ $e + he.offsetHeight > re && $e < Y && (G = ue.id);
9176
9180
  }
9177
9181
  }
9178
9182
  !G && o.value && (G = o.value), G && (o.value = G);
9179
9183
  const O = X ? X.scrollHeight - X.clientHeight : document.documentElement.scrollHeight - window.innerHeight;
9180
- oe + 5 >= O && (G = a.value[a.value.length - 1].id), G && (n.value = G);
9184
+ re + 5 >= O && (G = a.value[a.value.length - 1].id), G && (n.value = G);
9181
9185
  }
9182
9186
  function H() {
9183
9187
  s.value && (k && window.cancelAnimationFrame(k), k = window.requestAnimationFrame(() => {
9184
9188
  W(), k = 0;
9185
9189
  }));
9186
9190
  }
9187
- function ee(X) {
9191
+ function te(X) {
9188
9192
  if (!s.value) return;
9189
- const oe = document.getElementById(X);
9190
- if (!oe) return;
9191
- const ne = S, Y = Math.max(0, F(oe));
9192
- ne ? ne.scrollTo({ top: Y, behavior: "smooth" }) : typeof window < "u" && window.scrollTo({ top: Y, behavior: "smooth" });
9193
+ const re = document.getElementById(X);
9194
+ if (!re) return;
9195
+ const ae = S, Y = Math.max(0, F(re));
9196
+ ae ? ae.scrollTo({ top: Y, behavior: "smooth" }) : typeof window < "u" && window.scrollTo({ top: Y, behavior: "smooth" });
9193
9197
  }
9194
- return t({ refresh: y }), (X, oe) => s.value && a.value.length ? (i(), p("div", {
9198
+ return t({ refresh: y }), (X, re) => s.value && a.value.length ? (i(), p("div", {
9195
9199
  key: 0,
9196
- class: te(r.value),
9200
+ class: le(r.value),
9197
9201
  style: Me(u.value)
9198
9202
  }, [
9199
9203
  c("h2", wp, ie(X.title), 1),
9200
9204
  c("div", xp, [
9201
- (i(!0), p(_e, null, De(a.value, (ne) => (i(), p("div", {
9202
- key: ne.id,
9203
- class: te([
9205
+ (i(!0), p(_e, null, De(a.value, (ae) => (i(), p("div", {
9206
+ key: ae.id,
9207
+ class: le([
9204
9208
  "vs-compact-form-navigation__item relative",
9205
- ne.level === 2 ? "vs-compact-form-navigation__item--nested" : "",
9206
- ne.id === n.value ? "vs-compact-form-navigation__item--active" : ""
9209
+ ae.level === 2 ? "vs-compact-form-navigation__item--nested" : "",
9210
+ ae.id === n.value ? "vs-compact-form-navigation__item--active" : ""
9207
9211
  ])
9208
9212
  }, [
9209
9213
  c("button", {
9210
9214
  type: "button",
9211
- onClick: (Y) => ee(ne.id),
9212
- class: te([
9215
+ onClick: (Y) => te(ae.id),
9216
+ class: le([
9213
9217
  "vs-compact-form-navigation__button flex gap-x-3 py-[6px] pr-3 text-sm duration-200 hover:text-gray-800",
9214
- ne.level === 2 ? "pl-[15px]" : "pl-[18px]",
9215
- ne.id === n.value ? "text-gray-800" : "text-gray-500"
9218
+ ae.level === 2 ? "pl-[15px]" : "pl-[18px]",
9219
+ ae.id === n.value ? "text-gray-800" : "text-gray-500"
9216
9220
  ])
9217
9221
  }, [
9218
- c("span", null, ie(ne.text), 1)
9222
+ c("span", null, ie(ae.text), 1)
9219
9223
  ], 10, kp)
9220
9224
  ], 2))), 128))
9221
9225
  ])
@@ -9405,7 +9409,7 @@ const Op = { class: "flex w-full h-full min-h-0 gap-6" }, Pp = {
9405
9409
  visibleSchema: $
9406
9410
  } = Bp(u, n.schema, Ia(n, "disabled")), S = D(null), g = D(null), b = D({}), h = w(() => n.navigation), C = w(() => n.navWidth), y = w(() => n.style?.columns), V = Object.freeze({ container: 12, label: 3 }), _ = w(() => n.columns ?? y.value ?? V), I = w(() => n.columns != null || y.value != null), R = w(() => I.value ? "horizontal" : n.layout), F = (Y) => Y?.columns ? "horizontal" : R.value, W = (Y) => Y?.columns ?? _.value, H = () => {
9407
9411
  !n.formId && u.value && delete u.value.id, a("update:modelValue", u.value), v(), a("handle-submit", u.value);
9408
- }, ee = (Y) => {
9412
+ }, te = (Y) => {
9409
9413
  a("value-selected", Y);
9410
9414
  };
9411
9415
  t({
@@ -9424,23 +9428,23 @@ const Op = { class: "flex w-full h-full min-h-0 gap-6" }, Pp = {
9424
9428
  function X(Y, G) {
9425
9429
  if (Y === G) return !0;
9426
9430
  if (typeof Y != "object" || typeof G != "object" || !Y || !G) return !1;
9427
- const O = Object.keys(Y), ae = Object.keys(G);
9428
- return O.length !== ae.length ? !1 : O.every((ue) => Y[ue] === G[ue]);
9431
+ const O = Object.keys(Y), oe = Object.keys(G);
9432
+ return O.length !== oe.length ? !1 : O.every((ue) => Y[ue] === G[ue]);
9429
9433
  }
9430
- function oe(Y) {
9434
+ function re(Y) {
9431
9435
  return Array.isArray(Y) ? [...Y] : Y && typeof Y == "object" ? { ...Y } : Y;
9432
9436
  }
9433
- function ne(Y) {
9437
+ function ae(Y) {
9434
9438
  Array.isArray(Y) && Y.forEach((G) => {
9435
9439
  if (!G) return;
9436
- const O = G.name, ae = G.default !== void 0;
9437
- O && ae && u.value[O] === void 0 && (u.value[O] = oe(G.default)), Array.isArray(G.schema) && ne(G.schema);
9440
+ const O = G.name, oe = G.default !== void 0;
9441
+ O && oe && u.value[O] === void 0 && (u.value[O] = re(G.default)), Array.isArray(G.schema) && ae(G.schema);
9438
9442
  });
9439
9443
  }
9440
9444
  return me(
9441
9445
  $,
9442
9446
  (Y) => {
9443
- ne(Y);
9447
+ ae(Y);
9444
9448
  },
9445
9449
  { immediate: !0, deep: !0 }
9446
9450
  ), Kl("form", o), Kl("values", u), Kl("field-props", b), (Y, G) => (i(), p("div", Op, [
@@ -9453,11 +9457,11 @@ const Op = { class: "flex w-full h-full min-h-0 gap-6" }, Pp = {
9453
9457
  ref_key: "formRef",
9454
9458
  ref: S,
9455
9459
  onSubmit: Be(H, ["prevent"]),
9456
- class: te(["grid grid-cols-12 p-1", R.value === "default" ? "gap-6" : "gap-4"])
9460
+ class: le(["grid grid-cols-12 p-1", R.value === "default" ? "gap-6" : "gap-4"])
9457
9461
  }, [
9458
- (i(!0), p(_e, null, De(E($), (O, ae) => (i(), p("div", {
9462
+ (i(!0), p(_e, null, De(E($), (O, oe) => (i(), p("div", {
9459
9463
  key: O.name,
9460
- class: te(F(O) === "horizontal" ? "col-span-12" : `col-span-${O.col || 12}`)
9464
+ class: le(F(O) === "horizontal" ? "col-span-12" : `col-span-${O.col || 12}`)
9461
9465
  }, [
9462
9466
  K(aa, {
9463
9467
  style: Me(Y.style),
@@ -9471,9 +9475,9 @@ const Op = { class: "flex w-full h-full min-h-0 gap-6" }, Pp = {
9471
9475
  X(he, ue) || (u.value[O.name] = ue);
9472
9476
  },
9473
9477
  error: E(f)[O.name],
9474
- onValueSelected: ee
9478
+ onValueSelected: te
9475
9479
  }, null, 8, ["style", "item", "layout", "columns", "model-value", "onUpdate:modelValue", "error"]),
9476
- F(O) === "settings" && ae + 1 !== E($).length ? (i(), p("div", Pp)) : z("", !0)
9480
+ F(O) === "settings" && oe + 1 !== E($).length ? (i(), p("div", Pp)) : z("", !0)
9477
9481
  ], 2))), 128))
9478
9482
  ], 34)
9479
9483
  ], 512),
@@ -9895,7 +9899,7 @@ const cm = ["year", "month", "day", "time", "custom"], fm = de({
9895
9899
  function wm(e, t, l, a, n, o) {
9896
9900
  const s = wt("ChevronLeft"), r = wt("ChevronRight");
9897
9901
  return i(), p("div", {
9898
- class: te(["v3dp__popout", `v3dp__popout-${e.viewMode}`]),
9902
+ class: le(["v3dp__popout", `v3dp__popout-${e.viewMode}`]),
9899
9903
  style: Me({ "--popout-column-definition": `repeat(${e.columnCount}, 1fr)` }),
9900
9904
  onMousedown: t[3] || (t[3] = Be(() => {
9901
9905
  }, ["prevent"]))
@@ -9941,7 +9945,7 @@ function wm(e, t, l, a, n, o) {
9941
9945
  (i(!0), p(_e, null, De(e.items, (u) => (i(), p("button", {
9942
9946
  key: u.key,
9943
9947
  disabled: u.disabled,
9944
- class: te([
9948
+ class: le([
9945
9949
  {
9946
9950
  selected: u.selected,
9947
9951
  current: u.current
@@ -10243,7 +10247,7 @@ function Mm(e, t, l, a, n, o) {
10243
10247
  subheading: lt(() => [
10244
10248
  (i(!0), p(_e, null, De(e.weekDays, (r, u) => (i(), p("span", {
10245
10249
  key: r,
10246
- class: te(`v3dp__subheading__weekday__${u}`)
10250
+ class: le(`v3dp__subheading__weekday__${u}`)
10247
10251
  }, ie(r), 3))), 128))
10248
10252
  ]),
10249
10253
  _: 1
@@ -10369,7 +10373,7 @@ function Em(e, t, l, a, n, o) {
10369
10373
  key: r.value,
10370
10374
  ref_for: !0,
10371
10375
  ref: r.ref,
10372
- class: te([{ selected: r.selected }, "v3dp__element_button__hour"]),
10376
+ class: le([{ selected: r.selected }, "v3dp__element_button__hour"]),
10373
10377
  disabled: !e.isEnabled(r.date),
10374
10378
  onClick: Be((u) => e.hours = r.value, ["stop", "prevent"])
10375
10379
  }, [
@@ -10381,7 +10385,7 @@ function Em(e, t, l, a, n, o) {
10381
10385
  key: r.value,
10382
10386
  ref_for: !0,
10383
10387
  ref: r.ref,
10384
- class: te([{ selected: r.selected }, "v3dp__element_button__minute"]),
10388
+ class: le([{ selected: r.selected }, "v3dp__element_button__minute"]),
10385
10389
  disabled: !e.isEnabled(r.date),
10386
10390
  onClick: Be((u) => e.selectMinutes(r), ["stop", "prevent"])
10387
10391
  }, [
@@ -10635,7 +10639,7 @@ const Bm = /* @__PURE__ */ je(Dm, [["render", Em], ["__scopeId", "data-v-610b89e
10635
10639
  e.clearable && (h("none"), t("update:modelValue", null), n.value = e.startingViewDate);
10636
10640
  }, F = () => s.value = !0, W = () => h(X.value), H = () => {
10637
10641
  s.value = !1, h();
10638
- }, ee = (G) => {
10642
+ }, te = (G) => {
10639
10643
  const O = G.keyCode ? G.keyCode : G.which;
10640
10644
  if ([
10641
10645
  27,
@@ -10649,9 +10653,9 @@ const Bm = /* @__PURE__ */ je(Dm, [["render", Em], ["__scopeId", "data-v-610b89e
10649
10653
  }, X = w(() => {
10650
10654
  const G = Al.indexOf(e.startingView), O = Al.indexOf(e.minimumView);
10651
10655
  return G < O ? e.minimumView : e.startingView;
10652
- }), oe = (G) => Object.fromEntries(
10653
- Object.entries(G ?? {}).filter(([O, ae]) => O.startsWith("--"))
10654
- ), ne = w(() => e.weekDayNames?.length === 7 ? e.weekDayNames : void 0);
10656
+ }), re = (G) => Object.fromEntries(
10657
+ Object.entries(G ?? {}).filter(([O, oe]) => O.startsWith("--"))
10658
+ ), ae = w(() => e.weekDayNames?.length === 7 ? e.weekDayNames : void 0);
10655
10659
  return {
10656
10660
  blur: H,
10657
10661
  focus: W,
@@ -10665,14 +10669,14 @@ const Bm = /* @__PURE__ */ je(Dm, [["render", Em], ["__scopeId", "data-v-610b89e
10665
10669
  selectMonth: V,
10666
10670
  selectDay: _,
10667
10671
  selectTime: I,
10668
- keyUp: ee,
10669
- normalizedWeekdayNames: ne,
10672
+ keyUp: te,
10673
+ normalizedWeekdayNames: ae,
10670
10674
  viewShown: a,
10671
10675
  goBackFromTimepicker: () => e.startingView === "time" && e.minimumView === "time" ? null : a.value = "day",
10672
10676
  clearModelValue: R,
10673
10677
  initialView: X,
10674
10678
  log: (G) => console.log(G),
10675
- variables: oe
10679
+ variables: re
10676
10680
  };
10677
10681
  }
10678
10682
  }), Rm = { class: "v3dp__input_wrapper" }, Nm = ["readonly", "placeholder", "disabled", "tabindex"], jm = { class: "v3dp__clearable" };
@@ -10806,8 +10810,8 @@ const zm = /* @__PURE__ */ je(Pm, [["render", Um]]), Hm = /* @__PURE__ */ de({
10806
10810
  if (l.dayNames?.length)
10807
10811
  return l.dayNames.length === 7 ? l.dayNames : k;
10808
10812
  }), S = w(() => {
10809
- const O = l.weekStart, ae = typeof O == "string" ? Number(O) : O;
10810
- return ae === void 0 || Number.isNaN(ae) ? 1 : Math.min(6, Math.max(0, ae));
10813
+ const O = l.weekStart, oe = typeof O == "string" ? Number(O) : O;
10814
+ return oe === void 0 || Number.isNaN(oe) ? 1 : Math.min(6, Math.max(0, oe));
10811
10815
  }), g = w(() => {
10812
10816
  switch (o.value) {
10813
10817
  case "time":
@@ -10845,12 +10849,12 @@ const zm = /* @__PURE__ */ je(Pm, [["render", Um]]), Hm = /* @__PURE__ */ de({
10845
10849
  ), il(() => {
10846
10850
  l.now && !l.modelValue && !y.value && (a("update:modelValue", _(/* @__PURE__ */ new Date(), o.value)), y.value = !0);
10847
10851
  });
10848
- function V(O, ae) {
10852
+ function V(O, oe) {
10849
10853
  if (!O) return null;
10850
10854
  if (O instanceof Date && !Number.isNaN(O.getTime()))
10851
10855
  return O;
10852
10856
  if (typeof O != "string") return null;
10853
- switch (ae) {
10857
+ switch (oe) {
10854
10858
  case "datetime":
10855
10859
  return W(O);
10856
10860
  case "time":
@@ -10858,19 +10862,19 @@ const zm = /* @__PURE__ */ je(Pm, [["render", Um]]), Hm = /* @__PURE__ */ de({
10858
10862
  case "month":
10859
10863
  return H(O);
10860
10864
  case "year":
10861
- return ee(O);
10865
+ return te(O);
10862
10866
  case "week":
10863
- return oe(O);
10867
+ return re(O);
10864
10868
  case "date":
10865
10869
  default:
10866
10870
  return F(O);
10867
10871
  }
10868
10872
  }
10869
- function _(O, ae) {
10873
+ function _(O, oe) {
10870
10874
  if (!O) return null;
10871
- const ue = O instanceof Date ? O : V(O, ae);
10875
+ const ue = O instanceof Date ? O : V(O, oe);
10872
10876
  if (!ue) return null;
10873
- switch (ae) {
10877
+ switch (oe) {
10874
10878
  case "datetime":
10875
10879
  return `${I(ue)}T${R(ue)}`;
10876
10880
  case "time":
@@ -10880,7 +10884,7 @@ const zm = /* @__PURE__ */ je(Pm, [["render", Um]]), Hm = /* @__PURE__ */ de({
10880
10884
  case "year":
10881
10885
  return `${ue.getFullYear()}`;
10882
10886
  case "week": {
10883
- const { year: he, week: $e } = ne(ue);
10887
+ const { year: he, week: $e } = ae(ue);
10884
10888
  return `${he}-W${G($e)}`;
10885
10889
  }
10886
10890
  case "date":
@@ -10895,56 +10899,56 @@ const zm = /* @__PURE__ */ je(Pm, [["render", Um]]), Hm = /* @__PURE__ */ de({
10895
10899
  return `${G(O.getHours())}:${G(O.getMinutes())}`;
10896
10900
  }
10897
10901
  function F(O) {
10898
- const ae = O.split("-");
10899
- if (ae.length < 3) return null;
10900
- const [ue, he, $e] = ae.map(Number);
10902
+ const oe = O.split("-");
10903
+ if (oe.length < 3) return null;
10904
+ const [ue, he, $e] = oe.map(Number);
10901
10905
  return !ue || !he || !$e ? null : new Date(ue, he - 1, $e);
10902
10906
  }
10903
10907
  function W(O) {
10904
- const ae = O.includes("T") ? O : O.replace(" ", "T"), ue = new Date(ae);
10908
+ const oe = O.includes("T") ? O : O.replace(" ", "T"), ue = new Date(oe);
10905
10909
  return Number.isNaN(ue.getTime()) ? null : ue;
10906
10910
  }
10907
10911
  function H(O) {
10908
- const [ae, ue] = O.split("-").map(Number);
10909
- return !ae || Number.isNaN(ue) ? null : new Date(ae, (ue || 1) - 1, 1);
10912
+ const [oe, ue] = O.split("-").map(Number);
10913
+ return !oe || Number.isNaN(ue) ? null : new Date(oe, (ue || 1) - 1, 1);
10910
10914
  }
10911
- function ee(O) {
10912
- const ae = Number(O);
10913
- return ae ? new Date(ae, 0, 1) : null;
10915
+ function te(O) {
10916
+ const oe = Number(O);
10917
+ return oe ? new Date(oe, 0, 1) : null;
10914
10918
  }
10915
10919
  function X(O) {
10916
- const ae = O.match(/^(\d{1,2}):(\d{2})$/);
10917
- if (!ae) return null;
10918
- const [, ue, he] = ae, $e = /* @__PURE__ */ new Date();
10920
+ const oe = O.match(/^(\d{1,2}):(\d{2})$/);
10921
+ if (!oe) return null;
10922
+ const [, ue, he] = oe, $e = /* @__PURE__ */ new Date();
10919
10923
  return $e.setHours(Number(ue), Number(he), 0, 0), $e;
10920
10924
  }
10921
- function oe(O) {
10922
- const ae = O.match(/^(\d{4})-W(\d{2})$/);
10923
- if (!ae) return null;
10924
- const [, ue, he] = ae, $e = Number(he);
10925
+ function re(O) {
10926
+ const oe = O.match(/^(\d{4})-W(\d{2})$/);
10927
+ if (!oe) return null;
10928
+ const [, ue, he] = oe, $e = Number(he);
10925
10929
  return Y(Number(ue), $e);
10926
10930
  }
10927
- function ne(O) {
10928
- const ae = new Date(Date.UTC(O.getFullYear(), O.getMonth(), O.getDate())), ue = ae.getUTCDay() || 7;
10929
- ae.setUTCDate(ae.getUTCDate() + 4 - ue);
10930
- const he = new Date(Date.UTC(ae.getUTCFullYear(), 0, 1)), $e = Math.ceil(((ae.getTime() - he.getTime()) / 864e5 + 1) / 7);
10931
- return { year: ae.getUTCFullYear(), week: $e };
10931
+ function ae(O) {
10932
+ const oe = new Date(Date.UTC(O.getFullYear(), O.getMonth(), O.getDate())), ue = oe.getUTCDay() || 7;
10933
+ oe.setUTCDate(oe.getUTCDate() + 4 - ue);
10934
+ const he = new Date(Date.UTC(oe.getUTCFullYear(), 0, 1)), $e = Math.ceil(((oe.getTime() - he.getTime()) / 864e5 + 1) / 7);
10935
+ return { year: oe.getUTCFullYear(), week: $e };
10932
10936
  }
10933
- function Y(O, ae) {
10934
- if (!O || !ae) return null;
10935
- const ue = new Date(O, 0, 1 + (ae - 1) * 7), he = ue.getDay(), $e = ue;
10937
+ function Y(O, oe) {
10938
+ if (!O || !oe) return null;
10939
+ const ue = new Date(O, 0, 1 + (oe - 1) * 7), he = ue.getDay(), $e = ue;
10936
10940
  return he <= 4 ? $e.setDate(ue.getDate() - ue.getDay() + 1) : $e.setDate(ue.getDate() + 8 - ue.getDay()), $e;
10937
10941
  }
10938
10942
  function G(O) {
10939
10943
  return String(O).padStart(2, "0");
10940
10944
  }
10941
- return (O, ae) => (i(), p("div", {
10942
- class: te(["vs-date-picker", l.customClass]),
10945
+ return (O, oe) => (i(), p("div", {
10946
+ class: le(["vs-date-picker", l.customClass]),
10943
10947
  style: Me(C.value)
10944
10948
  }, [
10945
10949
  K(zm, {
10946
10950
  modelValue: v.value,
10947
- "onUpdate:modelValue": ae[0] || (ae[0] = (ue) => v.value = ue),
10951
+ "onUpdate:modelValue": oe[0] || (oe[0] = (ue) => v.value = ue),
10948
10952
  placeholder: r.value,
10949
10953
  disabled: l.disabled,
10950
10954
  clearable: l.clearable,
@@ -10955,7 +10959,7 @@ const zm = /* @__PURE__ */ je(Pm, [["render", Um]]), Hm = /* @__PURE__ */ de({
10955
10959
  "minimum-view": g.value.minimumView,
10956
10960
  "input-format": h.value,
10957
10961
  name: l.name,
10958
- class: te(u.value)
10962
+ class: le(u.value)
10959
10963
  }, null, 8, ["modelValue", "placeholder", "disabled", "clearable", "typeable", "week-day-names", "week-starts-on", "starting-view", "minimum-view", "input-format", "name", "class"])
10960
10964
  ], 6));
10961
10965
  }