@opengis/filter 0.1.25 → 0.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createElementBlock as w, openBlock as u, createElementVNode as d, defineComponent as W, ref as A, computed as O, withModifiers as se, normalizeClass as E, createCommentVNode as C, toDisplayString as B, createVNode as q, watch as T, createStaticVNode as Ne, Fragment as U, renderList as X, unref as e, createBlock as I, createTextVNode as Q, withDirectives as H, vShow as Z, getCurrentInstance as Pe, vModelText as ae, onBeforeUnmount as me, onMounted as ce, isRef as Ye, Teleport as ge, normalizeStyle as be, renderSlot as de, nextTick as fe, withCtx as ne, resolveDynamicComponent as re, mergeProps as J, toRaw as ue, cloneVNode as We, useSlots as pe, reactive as qe, withKeys as $e, createSlots as He, normalizeProps as Qe, guardReactiveProps as Ge } from "vue";
1
+ import { createElementBlock as w, openBlock as u, createElementVNode as d, defineComponent as W, ref as A, computed as K, withModifiers as se, normalizeClass as O, createCommentVNode as C, toDisplayString as B, createVNode as q, watch as T, createStaticVNode as Ne, Fragment as U, renderList as X, unref as e, createBlock as I, createTextVNode as Q, withDirectives as H, vShow as Z, getCurrentInstance as Pe, vModelText as ae, onBeforeUnmount as me, onMounted as ce, isRef as Ye, Teleport as ge, normalizeStyle as be, renderSlot as de, nextTick as fe, withCtx as ne, resolveDynamicComponent as re, mergeProps as J, toRaw as ue, cloneVNode as We, useSlots as pe, reactive as qe, withKeys as $e, createSlots as He, normalizeProps as Qe, guardReactiveProps as Ge } from "vue";
2
2
  import { notify as Ae } from "@opengis/core";
3
3
  const ee = (m, n) => {
4
4
  const y = m.__vccOpts || m;
@@ -74,7 +74,7 @@ const oe = /* @__PURE__ */ ee(tt, [["render", ot]]), at = { class: "flex items-c
74
74
  function o() {
75
75
  s("itemClick", t.value);
76
76
  }
77
- const g = A(null), p = O(() => t.layout === "inline" && t.type === "radio");
77
+ const g = A(null), p = K(() => t.layout === "inline" && t.type === "radio");
78
78
  return n({ el: g }), (r, x) => (u(), w("div", {
79
79
  class: "flex items-center w-full rounded-sm group hover:bg-gray-100",
80
80
  ref_key: "el",
@@ -84,7 +84,7 @@ const oe = /* @__PURE__ */ ee(tt, [["render", ot]]), at = { class: "flex items-c
84
84
  d("div", nt, [
85
85
  d("label", {
86
86
  for: "radio-9740",
87
- class: E([
87
+ class: O([
88
88
  ["inline", "popover"].includes(r.layout) ? "text-sm text-gray-500 px-2 w-full py-2 cursor-pointer !flex flex-row items-center" : "flex flex-row items-center w-full px-2 py-2 text-sm text-gray-500 cursor-pointer",
89
89
  { "bg-blue-100": r.highlighted, relative: p.value }
90
90
  ]),
@@ -92,7 +92,7 @@ const oe = /* @__PURE__ */ ee(tt, [["render", ot]]), at = { class: "flex items-c
92
92
  }, [
93
93
  p.value ? C("", !0) : (u(), w("div", {
94
94
  key: 0,
95
- class: E(["w-[18px] h-[18px] border flex items-center justify-center", [
95
+ class: O(["w-[18px] h-[18px] border flex items-center justify-center", [
96
96
  r.type === "checkbox" ? "rounded-[4px]" : "rounded-full",
97
97
  r.color ? `bg-[${r.color}] border-[#ffffff]` : r.isSelected ? "bg-[#2563eb] border-[#ffffff]" : "bg-[#ffffff] border-[#d9d9d9]"
98
98
  ]])
@@ -106,7 +106,7 @@ const oe = /* @__PURE__ */ ee(tt, [["render", ot]]), at = { class: "flex items-c
106
106
  value: r.value
107
107
  }, null, 8, st),
108
108
  d("div", {
109
- class: E(["flex flex-1 flex-row items-center justify-between", p.value ? "pl-1 pr-6" : "w-[calc(100%-18px)] pl-[10px]"])
109
+ class: O(["flex flex-1 flex-row items-center justify-between", p.value ? "pl-1 pr-6" : "w-[calc(100%-18px)] pl-[10px]"])
110
110
  }, [
111
111
  d("span", it, B(r.label ?? "Відсутні дані"), 1),
112
112
  r.count ? (u(), w("div", ut, " (" + B(r.count) + ") ", 1)) : C("", !0)
@@ -130,14 +130,14 @@ function xe(m, n) {
130
130
  }
131
131
  const o = A(s(m.modelValue)), g = A(""), p = A(!1), r = A([]), x = A("id"), c = A("text"), v = A(!1), f = A(m.layout !== "popover" && y.length > t);
132
132
  function k(b) {
133
- const h = b.find(Boolean) ?? {}, K = ["id", "value", "code", "key"].find(($) => $ in h) ?? "id", M = ["text", "label", "name", "title"].find(($) => $ in h) ?? "text";
134
- return { autoValueKey: K, autoLabelKey: M };
133
+ const h = b.find(Boolean) ?? {}, M = ["id", "value", "code", "key"].find(($) => $ in h) ?? "id", L = ["text", "label", "name", "title"].find(($) => $ in h) ?? "text";
134
+ return { autoValueKey: M, autoLabelKey: L };
135
135
  }
136
136
  if (y.length > 0) {
137
137
  const b = k(y);
138
138
  x.value = b.autoValueKey, c.value = b.autoLabelKey;
139
139
  }
140
- const _ = O(() => {
140
+ const _ = K(() => {
141
141
  const b = r.value;
142
142
  return m.layout === "popover" || v.value ? b : b.slice(0, t);
143
143
  });
@@ -292,10 +292,10 @@ const ke = /* @__PURE__ */ ee(gt, [["render", ht]]), xt = {
292
292
  a === void 0 && (g.value = void 0);
293
293
  }
294
294
  ), (a, b) => (u(), w("div", {
295
- class: E([a.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox"])
295
+ class: O([a.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox"])
296
296
  }, [
297
297
  d("div", {
298
- class: E([
298
+ class: O([
299
299
  a.layout === "popover" ? "flex-1 overflow-y-auto p-2" : "",
300
300
  a.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
301
301
  ])
@@ -309,7 +309,7 @@ const ke = /* @__PURE__ */ ee(gt, [["render", ht]]), xt = {
309
309
  type: "radio",
310
310
  value: h[e(i)],
311
311
  "is-selected": e(r)(h),
312
- onItemClick: (K) => e(x)(h)
312
+ onItemClick: (M) => e(x)(h)
313
313
  }, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 128))
314
314
  ], 2),
315
315
  a.type === "select" && e(p).length === 0 && !e(f) ? (u(), w("div", xt, [
@@ -376,14 +376,14 @@ function Me(m, n) {
376
376
  }
377
377
  const o = A(s(m.modelValue)), g = A(""), p = A(!1), r = A([]), x = A("id"), c = A("text"), v = A(!1), f = A(m.layout !== "popover" && y.length > t);
378
378
  function k(b) {
379
- const h = b.find(Boolean) ?? {}, K = ["id", "value", "code", "key"].find(($) => $ in h) ?? "id", M = ["text", "label", "name", "title"].find(($) => $ in h) ?? "text";
380
- return { autoValueKey: K, autoLabelKey: M };
379
+ const h = b.find(Boolean) ?? {}, M = ["id", "value", "code", "key"].find(($) => $ in h) ?? "id", L = ["text", "label", "name", "title"].find(($) => $ in h) ?? "text";
380
+ return { autoValueKey: M, autoLabelKey: L };
381
381
  }
382
382
  if (y.length > 0) {
383
383
  const b = k(y);
384
384
  x.value = b.autoValueKey, c.value = b.autoLabelKey;
385
385
  }
386
- const _ = O(() => {
386
+ const _ = K(() => {
387
387
  const b = r.value;
388
388
  return m.layout === "popover" || v.value ? b : b.slice(0, t);
389
389
  });
@@ -395,7 +395,7 @@ function Me(m, n) {
395
395
  }
396
396
  function i(b) {
397
397
  const h = o.value.includes(b[x.value]);
398
- o.value = h ? o.value.filter((K) => K !== b[x.value]) : [...o.value, b[x.value]], n("update:modelValue", o.value), n("change", { name: m.name, value: o.value });
398
+ o.value = h ? o.value.filter((M) => M !== b[x.value]) : [...o.value, b[x.value]], n("update:modelValue", o.value), n("change", { name: m.name, value: o.value });
399
399
  }
400
400
  function l() {
401
401
  o.value = [], n("update:modelValue", o.value), n("clear", m.name);
@@ -540,10 +540,10 @@ const _t = {
540
540
  ), n({
541
541
  clear: c
542
542
  }), (a, b) => (u(), w("div", {
543
- class: E([a.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
543
+ class: O([a.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
544
544
  }, [
545
545
  d("div", {
546
- class: E([
546
+ class: O([
547
547
  a.layout === "popover" ? "flex-1 overflow-y-auto p-2" : "",
548
548
  a.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
549
549
  ])
@@ -556,7 +556,7 @@ const _t = {
556
556
  type: "checkbox",
557
557
  value: h[e(i)],
558
558
  "is-selected": e(r)(h),
559
- onItemClick: (K) => e(x)(h)
559
+ onItemClick: (M) => e(x)(h)
560
560
  }, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 256))
561
561
  ], 2),
562
562
  a.type === "select" && e(p).length === 0 && !e(f) ? (u(), w("div", _t, [
@@ -715,7 +715,7 @@ const Et = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
715
715
  o.value = "", s("update:modelValue", ""), s("clear", y.name);
716
716
  }
717
717
  return (x, c) => (u(), w("div", {
718
- class: E([
718
+ class: O([
719
719
  "vs-form-text relative bg-white rounded-sm [&>input]:py-[7px] [&>input]:max-h-[38px] [&>input]:ps-10 [&>input]:pe-8 [&>input]:block [&>input]:w-full [&>input]:bg-gray-100 [&>input]:border-transparent [&>input]:rounded-sm [&>input]:text-sm [&>input]:focus:bg-white [&>input]:focus:border-blue-500 [&>input]:focus:ring-blue-500 [&>input]:disabled:opacity-50 [&>input]:disabled:pointer-events-none [&>input]:dark:bg-neutral-700 [&>input]:dark:border-transparent [&>input]:dark:text-neutral-400 [&>input]:dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",
720
720
  x.layout === "inline" ? e(Ee).getWidthClass(x.width) : "mb-2" + (x.layout === "popover" ? " m-2" : "")
721
721
  ])
@@ -743,7 +743,7 @@ const Et = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
743
743
  }
744
744
  });
745
745
  function Oe(m = { color: "blue" }) {
746
- return O(() => {
746
+ return K(() => {
747
747
  const y = `w-full px-3 py-2 border-solid border text-black border-gray-300 text-sm rounded focus:outline-none focus:ring-2 focus:ring-${m.color}-500 focus:border-transparent
748
748
  text-gray-800 bg-white dark:text-neutral-300 dark:bg-neutral-800 dark:border-neutral-600`;
749
749
  return m?.size === "sm" ? `${y}h-[32px]` : `${y}h-[38px]`;
@@ -800,7 +800,7 @@ const Ht = /* @__PURE__ */ W({
800
800
  setup(m, { expose: n, emit: y }) {
801
801
  const t = Oe(), s = It(), o = le(), g = m, p = A(
802
802
  g.modelValue ?? g.default ?? []
803
- ), r = y, x = O({
803
+ ), r = y, x = K({
804
804
  get: () => g.modelValue ?? p.value,
805
805
  set: (f) => {
806
806
  g.modelValue !== void 0 ? r("update:modelValue", f) : p.value = f;
@@ -820,13 +820,13 @@ const Ht = /* @__PURE__ */ W({
820
820
  }), (f, k) => (u(), w(U, null, [
821
821
  d("div", null, [
822
822
  d("div", {
823
- class: E(f.layout === "vertical" ? "inline-flex items-center gap-2" : "space-y-3 p-2")
823
+ class: O(f.layout === "vertical" ? "inline-flex items-center gap-2" : "space-y-3 p-2")
824
824
  }, [
825
825
  d("div", null, [
826
826
  f.layout !== "vertical" ? (u(), w("label", zt, B(e(o)("filter.from")), 1)) : C("", !0),
827
827
  H(d("input", {
828
828
  type: "number",
829
- class: E(e(t)),
829
+ class: O(e(t)),
830
830
  placeholder: f.placeholder?.[0] ?? e(o)("filter.min"),
831
831
  step: "1",
832
832
  style: { outline: "none" },
@@ -841,7 +841,7 @@ const Ht = /* @__PURE__ */ W({
841
841
  f.layout !== "vertical" ? (u(), w("label", Yt, B(e(o)("filter.to")), 1)) : C("", !0),
842
842
  H(d("input", {
843
843
  type: "number",
844
- class: E(e(t)),
844
+ class: O(e(t)),
845
845
  placeholder: f.placeholder?.[1] ?? e(o)("filter.max"),
846
846
  min: "0",
847
847
  max: "1000000000000000",
@@ -856,13 +856,13 @@ const Ht = /* @__PURE__ */ W({
856
856
  ["popover", "inline", "vertical"].includes(f.layout) ? (u(), w("button", {
857
857
  key: 1,
858
858
  onClick: c,
859
- class: E(e(s) + (f.layout === "vertical" ? " w-[50px]" : " bg-blue-100 hover:bg-blue-200"))
859
+ class: O(e(s) + (f.layout === "vertical" ? " w-[50px]" : " bg-blue-100 hover:bg-blue-200"))
860
860
  }, B(f.layout === "vertical" ? "Ok" : e(o)("filter.apply")), 3)) : C("", !0),
861
861
  ["popover", "inline"].includes(f.layout) ? (u(), w("button", {
862
862
  key: 2,
863
863
  disabled: !(x.value[0] || x.value[1]),
864
864
  onClick: v,
865
- class: E(e(s) + " hover:bg-gray-100")
865
+ class: O(e(s) + " hover:bg-gray-100")
866
866
  }, B(e(o)("filter.clear")), 11, qt)) : C("", !0)
867
867
  ], 2)
868
868
  ]),
@@ -1031,8 +1031,8 @@ function Ie(m, n) {
1031
1031
  return a[0] && a[1] ? `${f(a[0])} – ${f(a[1])}` : "";
1032
1032
  case "quarter":
1033
1033
  if (a[0]) {
1034
- const b = new Date(a[0]), h = b.getFullYear(), K = b.getMonth();
1035
- return `${Math.floor(K / 3) + 1} ${t("filter.quarter")} ${h}`;
1034
+ const b = new Date(a[0]), h = b.getFullYear(), M = b.getMonth();
1035
+ return `${Math.floor(M / 3) + 1} ${t("filter.quarter")} ${h}`;
1036
1036
  }
1037
1037
  return "";
1038
1038
  case "month":
@@ -1049,7 +1049,7 @@ function Ie(m, n) {
1049
1049
  return m.label ?? "";
1050
1050
  }
1051
1051
  }
1052
- const V = O(() => s.value ? _(s.value) : m.label ?? "");
1052
+ const V = K(() => s.value ? _(s.value) : m.label ?? "");
1053
1053
  function i() {
1054
1054
  s.value = "", o.value = [], n("update:modelValue", []), n("clear", m.name);
1055
1055
  }
@@ -1169,10 +1169,10 @@ const rl = /* @__PURE__ */ W({
1169
1169
  ])) : C("", !0)
1170
1170
  ])) : C("", !0),
1171
1171
  d("div", {
1172
- class: E(V.layout === "popover" ? "space-y-3 p-2" : "flex items-center gap-2")
1172
+ class: O(V.layout === "popover" ? "space-y-3 p-2" : "flex items-center gap-2")
1173
1173
  }, [
1174
1174
  d("div", {
1175
- class: E(V.layout !== "popover" ? "w-[48%]" : "")
1175
+ class: O(V.layout !== "popover" ? "w-[48%]" : "")
1176
1176
  }, [
1177
1177
  V.layout === "popover" ? (u(), w("label", Zt, B(e(g)("filter.from")), 1)) : C("", !0),
1178
1178
  H(d("input", {
@@ -1180,7 +1180,7 @@ const rl = /* @__PURE__ */ W({
1180
1180
  max: e(c)[1],
1181
1181
  locale: "uk-UA",
1182
1182
  "onUpdate:modelValue": i[2] || (i[2] = (l) => e(c)[0] = l),
1183
- class: E(e(s)),
1183
+ class: O(e(s)),
1184
1184
  disabled: V.disabled
1185
1185
  }, null, 10, el), [
1186
1186
  [ae, e(c)[0]]
@@ -1188,7 +1188,7 @@ const rl = /* @__PURE__ */ W({
1188
1188
  ], 2),
1189
1189
  V.layout !== "popover" ? (u(), w("label", tl, " - ")) : C("", !0),
1190
1190
  d("div", {
1191
- class: E(V.layout !== "popover" ? "w-[48%]" : "")
1191
+ class: O(V.layout !== "popover" ? "w-[48%]" : "")
1192
1192
  }, [
1193
1193
  V.layout === "popover" ? (u(), w("label", ll, B(e(g)("filter.to")), 1)) : C("", !0),
1194
1194
  H(d("input", {
@@ -1196,7 +1196,7 @@ const rl = /* @__PURE__ */ W({
1196
1196
  min: e(c)[0],
1197
1197
  locale: "uk-UA",
1198
1198
  "onUpdate:modelValue": i[3] || (i[3] = (l) => e(c)[1] = l),
1199
- class: E(e(s)),
1199
+ class: O(e(s)),
1200
1200
  disabled: V.disabled
1201
1201
  }, null, 10, ol), [
1202
1202
  [ae, e(c)[1]]
@@ -1206,16 +1206,16 @@ const rl = /* @__PURE__ */ W({
1206
1206
  d("div", al, [
1207
1207
  (u(), w(U, null, X(["today", "week", "month", "quarter", "year"], (l) => d("button", {
1208
1208
  key: l,
1209
- class: E(e(o) + (e(x) === l ? " bg-blue-100" : "")),
1209
+ class: O(e(o) + (e(x) === l ? " bg-blue-100" : "")),
1210
1210
  onClick: (a) => e(v)(l)
1211
1211
  }, B(e(g)("filter." + l)), 11, nl)), 64)),
1212
1212
  d("button", {
1213
- class: E(e(o)),
1213
+ class: O(e(o)),
1214
1214
  onClick: i[4] || (i[4] = //@ts-ignore
1215
1215
  (...l) => e(k) && e(k)(...l))
1216
1216
  }, "<", 2),
1217
1217
  d("button", {
1218
- class: E(e(o)),
1218
+ class: O(e(o)),
1219
1219
  onClick: i[5] || (i[5] = //@ts-ignore
1220
1220
  (...l) => e(f) && e(f)(...l))
1221
1221
  }, ">", 2)
@@ -1236,30 +1236,30 @@ function sl(m, n) {
1236
1236
  }
1237
1237
  const r = A(p(m.modelValue)), x = A(""), c = A(!1), v = A(t), f = A("id"), k = A("text"), _ = A(!1), V = A(m.layout !== "popover" && t.length > s), i = A([]), l = A(0);
1238
1238
  function a(j) {
1239
- const L = j.find(Boolean) ?? {}, P = ["id", "value", "code", "key"].find((ie) => ie in L) ?? "id", Y = ["text", "label", "name", "title"].find((ie) => ie in L) ?? "text";
1239
+ const E = j.find(Boolean) ?? {}, P = ["id", "value", "code", "key"].find((ie) => ie in E) ?? "id", Y = ["text", "label", "name", "title"].find((ie) => ie in E) ?? "text";
1240
1240
  return { autoValueKey: P, autoLabelKey: Y };
1241
1241
  }
1242
1242
  if (t.length > 0) {
1243
1243
  const j = a(t);
1244
1244
  f.value = j.autoValueKey, k.value = j.autoLabelKey;
1245
1245
  }
1246
- const b = O(() => {
1246
+ const b = K(() => {
1247
1247
  if (y) return v.value;
1248
1248
  const j = v.value;
1249
1249
  if (m.layout === "popover") return j;
1250
1250
  if (!x.value)
1251
1251
  return _.value ? j : j.slice(0, s);
1252
- const L = x.value.toLowerCase();
1253
- return j.filter((P) => P[k.value].toLowerCase().includes(L));
1252
+ const E = x.value.toLowerCase();
1253
+ return j.filter((P) => P[k.value].toLowerCase().includes(E));
1254
1254
  });
1255
1255
  let h = null;
1256
- async function K(j) {
1256
+ async function M(j) {
1257
1257
  if (y) {
1258
1258
  c.value = !0;
1259
1259
  try {
1260
- const L = new URL(y, window.location.origin);
1261
- L.searchParams.set("json", "1"), L.searchParams.set("key", j), L.searchParams.set("limit", s.toString());
1262
- const P = await fetch(L.toString());
1260
+ const E = new URL(y, window.location.origin);
1261
+ E.searchParams.set("json", "1"), E.searchParams.set("key", j), E.searchParams.set("limit", s.toString());
1262
+ const P = await fetch(E.toString());
1263
1263
  if (!P.ok) {
1264
1264
  Ae({ type: "error", title: "Error", message: "Failed to fetch remote options" }), v.value = [];
1265
1265
  return;
@@ -1274,8 +1274,8 @@ function sl(m, n) {
1274
1274
  f.value = ie.autoValueKey, k.value = ie.autoLabelKey;
1275
1275
  }
1276
1276
  l.value = Y.total;
1277
- } catch (L) {
1278
- console.error("Failed to fetch remote options:", L);
1277
+ } catch (E) {
1278
+ console.error("Failed to fetch remote options:", E);
1279
1279
  } finally {
1280
1280
  c.value = !1;
1281
1281
  }
@@ -1283,18 +1283,18 @@ function sl(m, n) {
1283
1283
  }
1284
1284
  T(x, (j) => {
1285
1285
  y && (h && clearTimeout(h), h = setTimeout(() => {
1286
- K(j);
1286
+ M(j);
1287
1287
  }, 200));
1288
1288
  }), T(() => m.modelValue, (j) => {
1289
1289
  r.value = p(j);
1290
1290
  }, { immediate: !0 });
1291
- function M(j) {
1291
+ function L(j) {
1292
1292
  return g && Array.isArray(r.value) ? r.value.includes(j[f.value]) : r.value && r.value === j[f.value];
1293
1293
  }
1294
1294
  function $(j) {
1295
1295
  if (g && !Array.isArray(r.value) && (r.value = []), g && Array.isArray(r.value)) {
1296
- const L = r.value.includes(j[f.value]);
1297
- r.value = L ? r.value.filter((P) => P !== j[f.value]) : [...r.value, j[f.value]], i.value = L ? i.value.filter((P) => P !== j[k.value]) : [...i.value, j[k.value]];
1296
+ const E = r.value.includes(j[f.value]);
1297
+ r.value = E ? r.value.filter((P) => P !== j[f.value]) : [...r.value, j[f.value]], i.value = E ? i.value.filter((P) => P !== j[k.value]) : [...i.value, j[k.value]];
1298
1298
  } else
1299
1299
  r.value = j[f.value], i.value = j[k.value];
1300
1300
  n("update:modelValue", r.value), n("change", { name: m.name, value: r.value });
@@ -1316,24 +1316,24 @@ function sl(m, n) {
1316
1316
  R.value = b.value.length > 0 ? 0 : -1;
1317
1317
  });
1318
1318
  function N(j) {
1319
- const L = b.value.length;
1319
+ const E = b.value.length;
1320
1320
  if (j.key === "ArrowDown")
1321
- j.preventDefault(), R.value = (R.value + 1) % L;
1321
+ j.preventDefault(), R.value = (R.value + 1) % E;
1322
1322
  else if (j.key === "ArrowUp")
1323
- j.preventDefault(), R.value = (R.value - 1 + L) % L;
1323
+ j.preventDefault(), R.value = (R.value - 1 + E) % E;
1324
1324
  else if (j.key === "Enter" && (j.preventDefault(), R.value >= 0 && R.value < b.value.length)) {
1325
1325
  const P = b.value[R.value];
1326
1326
  $(P);
1327
1327
  }
1328
1328
  }
1329
1329
  function z() {
1330
- y && v.value.length === 0 && x.value.length === 0 && K(x.value);
1330
+ y && v.value.length === 0 && x.value.length === 0 && M(x.value);
1331
1331
  }
1332
1332
  return {
1333
1333
  innerValue: r,
1334
1334
  searchTerm: x,
1335
1335
  filteredOptions: b,
1336
- isSelected: M,
1336
+ isSelected: L,
1337
1337
  selectItem: $,
1338
1338
  clear: S,
1339
1339
  resetSearch: F,
@@ -1405,8 +1405,8 @@ const il = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1405
1405
  labelKey: a,
1406
1406
  valueKey: b,
1407
1407
  highlightedIndex: h,
1408
- onKeyDown: K,
1409
- selectedLabels: M,
1408
+ onKeyDown: M,
1409
+ selectedLabels: L,
1410
1410
  totalCount: $,
1411
1411
  loadData: S
1412
1412
  } = sl({
@@ -1432,16 +1432,16 @@ const il = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1432
1432
  }), n({
1433
1433
  clear: v,
1434
1434
  inputTextRef: g,
1435
- selectedLabels: M,
1435
+ selectedLabels: L,
1436
1436
  loadData: S
1437
1437
  }), (D, R) => (u(), w("div", {
1438
- class: E([D.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
1438
+ class: O([D.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
1439
1439
  }, [
1440
1440
  d("div", il, [
1441
1441
  H(d("input", {
1442
1442
  "onUpdate:modelValue": R[0] || (R[0] = (N) => Ye(l) ? l.value = N : null),
1443
1443
  onKeydown: R[1] || (R[1] = //@ts-ignore
1444
- (...N) => e(K) && e(K)(...N)),
1444
+ (...N) => e(M) && e(M)(...N)),
1445
1445
  class: "w-full h-full text-[13px] px-4 border rounded-sm pl-9 focus:outline-none focus:ring-ring focus:ring-1 focus:ring-blue-500 text-gray-700",
1446
1446
  placeholder: e(t)("filter.search"),
1447
1447
  type: "text",
@@ -1458,7 +1458,7 @@ const il = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1458
1458
  })) : C("", !0)
1459
1459
  ]),
1460
1460
  d("div", {
1461
- class: E([
1461
+ class: O([
1462
1462
  D.layout === "popover" ? "flex-1 overflow-y-auto p-2" : "",
1463
1463
  D.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
1464
1464
  ])
@@ -1590,13 +1590,13 @@ const il = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1590
1590
  }
1591
1591
  ), (f, k) => (u(), w(U, null, [
1592
1592
  d("div", {
1593
- class: E(["grid grid-cols-3 gap-2 mx-[1px]", f.layout === "popover" ? "m-1" : "mb-1"])
1593
+ class: O(["grid grid-cols-3 gap-2 mx-[1px]", f.layout === "popover" ? "m-1" : "mb-1"])
1594
1594
  }, [
1595
1595
  (u(!0), w(U, null, X(e(v), (_) => (u(), w("label", {
1596
1596
  key: `item-${_[e(c)]}`,
1597
1597
  for: `item-${_[e(c)]}`,
1598
1598
  onClick: se((V) => e(p)(_), ["stop", "prevent"]),
1599
- class: E([e(g)(_) ? "ring-2 ring-indigo-600" : "", "p-2.5 group relative flex justify-center items-center gap-x-12 text-center text-xs bg-white text-gray-800 border border-gray-200 cursor-pointer rounded-sm dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-200 peer-checked:text-indigo-600 dark:has-checked:text-indigo-500 peer-checked:border-indigo-600 dark:has-checked:border-indigo-500 peer-checked:ring peer-checked:shadow focus:ring dark:has-checked:ring-indigo-500 has-disabled:pointer-events-none has-disabled:text-gray-200 dark:has-disabled:text-neutral-700 has-disabled:after:absolute has-disabled:after:inset-0 has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-gray-200)_calc(50%-1px),var(--color-gray-200)_50%,transparent_50%)] dark:has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-neutral-700)_calc(50%-1px),var(--color-neutral-700)_50%,transparent_50%)]"])
1599
+ class: O([e(g)(_) ? "ring-2 ring-indigo-600" : "", "p-2.5 group relative flex justify-center items-center gap-x-12 text-center text-xs bg-white text-gray-800 border border-gray-200 cursor-pointer rounded-sm dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-200 peer-checked:text-indigo-600 dark:has-checked:text-indigo-500 peer-checked:border-indigo-600 dark:has-checked:border-indigo-500 peer-checked:ring peer-checked:shadow focus:ring dark:has-checked:ring-indigo-500 has-disabled:pointer-events-none has-disabled:text-gray-200 dark:has-disabled:text-neutral-700 has-disabled:after:absolute has-disabled:after:inset-0 has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-gray-200)_calc(50%-1px),var(--color-gray-200)_50%,transparent_50%)] dark:has-disabled:after:bg-[linear-gradient(to_right_bottom,transparent_calc(50%-1px),var(--color-neutral-700)_calc(50%-1px),var(--color-neutral-700)_50%,transparent_50%)]"])
1600
1600
  }, [
1601
1601
  d("input", {
1602
1602
  type: "checkbox",
@@ -1653,16 +1653,16 @@ const il = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1653
1653
  layout: {}
1654
1654
  },
1655
1655
  setup(m, { expose: n }) {
1656
- const y = m, t = O(() => Te(y.mode)), s = A(!1), o = A({ top: 0, left: 0 }), g = A(null), p = A(null), r = A(null);
1656
+ const y = m, t = K(() => Te(y.mode)), s = A(!1), o = A({ top: 0, left: 0 }), g = A(null), p = A(null), r = A(null);
1657
1657
  function x() {
1658
- const h = p.value, K = r.value;
1659
- if (!h || !K) return;
1660
- const M = h.getBoundingClientRect(), $ = K.offsetWidth, S = K.offsetHeight, F = window.innerWidth, D = window.innerHeight, R = 8;
1661
- let N = M.bottom + R, { left: z } = M;
1658
+ const h = p.value, M = r.value;
1659
+ if (!h || !M) return;
1660
+ const L = h.getBoundingClientRect(), $ = M.offsetWidth, S = M.offsetHeight, F = window.innerWidth, D = window.innerHeight, R = 8;
1661
+ let N = L.bottom + R, { left: z } = L;
1662
1662
  const j = Math.max(F - $ - 10, 10);
1663
1663
  if (z = Math.min(z, j), z = Math.max(z, 10), N + S > D - 10) {
1664
- const L = M.top - S - R;
1665
- N = L >= 10 ? L : Math.max(D - S - 10, 10);
1664
+ const E = L.top - S - R;
1665
+ N = E >= 10 ? E : Math.max(D - S - 10, 10);
1666
1666
  }
1667
1667
  N < 10 && (N = 10), o.value = { top: N, left: z };
1668
1668
  }
@@ -1690,23 +1690,23 @@ const il = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1690
1690
  }
1691
1691
  n({ close: i });
1692
1692
  function l(h) {
1693
- return Array.isArray(h) ? h.filter((K) => K != null && K !== "").length : h && typeof h == "object" ? Object.values(h).filter((K) => K != null && K !== "").length : typeof h == "string" ? h.trim() === "" ? 0 : 1 : typeof h == "number" ? Number.isNaN(h) ? 0 : 1 : h === null || h !== void 0 ? 1 : 0;
1693
+ return Array.isArray(h) ? h.filter((M) => M != null && M !== "").length : h && typeof h == "object" ? Object.values(h).filter((M) => M != null && M !== "").length : typeof h == "string" ? h.trim() === "" ? 0 : 1 : typeof h == "number" ? Number.isNaN(h) ? 0 : 1 : h === null || h !== void 0 ? 1 : 0;
1694
1694
  }
1695
- const a = O(() => {
1696
- const h = y.fieldRef?.selectedLabels, K = l(h);
1697
- return K > 0 ? K : l(y.currentValue);
1698
- }), b = O(() => {
1695
+ const a = K(() => {
1696
+ const h = y.fieldRef?.selectedLabels, M = l(h);
1697
+ return M > 0 ? M : l(y.currentValue);
1698
+ }), b = K(() => {
1699
1699
  const h = y.fieldRef?.selectedLabels;
1700
1700
  return !h || ["inline"].includes(y.layout || "") ? y[_.value] || (y.label ?? "") : Array.isArray(h) ? h.length > 0 ? h.join(", ") : y.label ?? "" : String(h);
1701
1701
  });
1702
- return (h, K) => (u(), w("div", null, [
1702
+ return (h, M) => (u(), w("div", null, [
1703
1703
  d("button", {
1704
1704
  onClick: c,
1705
1705
  disabled: h.disabled,
1706
1706
  ref_key: "triggerRef",
1707
1707
  ref: p,
1708
1708
  title: h.label,
1709
- class: E([
1709
+ class: O([
1710
1710
  t.value,
1711
1711
  h.width ? e(Ee).getWidthClass(h.width) : "w-full",
1712
1712
  h.layout === "inline" && a.value > 0 ? "border border-blue-400 bg-blue-50 text-blue-600" : ""
@@ -1862,7 +1862,7 @@ const ql = /* @__PURE__ */ W({
1862
1862
  width: typeof i.width == "number" && e(r).length ? i.width - 70 : i.width,
1863
1863
  onClear: e(k),
1864
1864
  layout: i.layout,
1865
- class: E(i.itemClass)
1865
+ class: O(i.itemClass)
1866
1866
  }, {
1867
1867
  default: ne(() => [
1868
1868
  d("div", null, [
@@ -2034,7 +2034,7 @@ const ql = /* @__PURE__ */ W({
2034
2034
  } = xe({
2035
2035
  ...t,
2036
2036
  modelValue: t.modelValue ?? t.default ?? ""
2037
- }, s), f = O(() => o.value !== void 0 && !(typeof o.value == "string" && o.value === "")), k = O(() => f.value ? 1 : 0);
2037
+ }, s), f = K(() => o.value !== void 0 && !(typeof o.value == "string" && o.value === "")), k = K(() => f.value ? 1 : 0);
2038
2038
  function _(i) {
2039
2039
  return g(i) ? ["bg-blue-600 text-white"].filter((l) => typeof l == "string" && l.trim().length > 0).join(" ") : ["text-gray-700 hover:bg-gray-200 bg-gray-50 "].filter((l) => typeof l == "string" && l.trim().length > 0).join(" ");
2040
2040
  }
@@ -2053,7 +2053,7 @@ const ql = /* @__PURE__ */ W({
2053
2053
  (u(!0), w(U, null, X(e(v), (a) => (u(), w("button", {
2054
2054
  key: a[e(c)],
2055
2055
  type: "button",
2056
- class: E(["px-3 py-2 text-sm font-medium rounded-md transition-colors", _(a)]),
2056
+ class: O(["px-3 py-2 text-sm font-medium rounded-md transition-colors", _(a)]),
2057
2057
  disabled: i.disabled,
2058
2058
  onClick: (b) => V(a)
2059
2059
  }, B(a[e(x)]), 11, Ql))), 128))
@@ -2129,7 +2129,7 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2129
2129
  },
2130
2130
  emits: ["update:modelValue", "change", "clear"],
2131
2131
  setup(m, { expose: n, emit: y }) {
2132
- const t = m, s = y, o = A(), g = _e(t.type, t.layout), p = O({
2132
+ const t = m, s = y, o = A(), g = K(() => _e(t.type, t.layout)), p = K({
2133
2133
  get: () => t.modelValue,
2134
2134
  set: (v) => s("update:modelValue", v)
2135
2135
  });
@@ -2166,8 +2166,8 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2166
2166
  })) : C("", !0)
2167
2167
  ]),
2168
2168
  d("div", oo, [
2169
- e(g)?.type !== "select" ? (u(), I(re(e(g)?.component), J({ key: 0 }, t, {
2170
- type: e(g)?.type,
2169
+ g.value?.type !== "select" ? (u(), I(re(g.value?.component), J({ key: 0 }, t, {
2170
+ type: g.value?.type,
2171
2171
  class: t.itemClass,
2172
2172
  onChange: f[0] || (f[0] = (k) => x(k.name, k.value)),
2173
2173
  onClear: f[1] || (f[1] = (k) => r(k)),
@@ -2185,11 +2185,11 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2185
2185
  layout: "vertical"
2186
2186
  }, {
2187
2187
  default: ne(() => [
2188
- (u(), I(re(e(g)?.component), J({
2188
+ (u(), I(re(g.value?.component), J({
2189
2189
  ref_key: "filterRef",
2190
2190
  ref: o
2191
2191
  }, t, {
2192
- type: e(g)?.type,
2192
+ type: g.value?.type,
2193
2193
  class: t.itemClass,
2194
2194
  onChange: f[2] || (f[2] = (k) => x(k.name, k.value)),
2195
2195
  onClear: f[3] || (f[3] = (k) => r(k))
@@ -2231,7 +2231,7 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2231
2231
  },
2232
2232
  emits: ["update:modelValue", "change", "clear"],
2233
2233
  setup(m, { expose: n, emit: y }) {
2234
- const t = m, s = y, o = A(), g = _e(t.type, t.layout), p = O({
2234
+ const t = m, s = y, o = A(), g = K(() => _e(t.type, t.layout)), p = K({
2235
2235
  get: () => t.modelValue,
2236
2236
  set: (c) => s("update:modelValue", c)
2237
2237
  });
@@ -2253,8 +2253,8 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2253
2253
  }
2254
2254
  ), n({
2255
2255
  filterRef: o
2256
- }), (c, v) => ["text", "date", "button"].includes(c.type.toLocaleLowerCase()) ? (u(), I(re(e(g)?.component), J({ key: 0 }, t, {
2257
- type: e(g)?.type,
2256
+ }), (c, v) => ["text", "date", "button"].includes(c.type.toLocaleLowerCase()) ? (u(), I(re(g.value?.component), J({ key: 0 }, t, {
2257
+ type: g.value?.type,
2258
2258
  class: c.itemClass,
2259
2259
  onChange: v[0] || (v[0] = (f) => x(f.name, f.value)),
2260
2260
  onClear: v[1] || (v[1] = (f) => r(f)),
@@ -2273,13 +2273,13 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2273
2273
  layout: "inline"
2274
2274
  }, {
2275
2275
  default: ne(() => [
2276
- (u(), I(re(e(g)?.component), J({
2276
+ (u(), I(re(g.value?.component), J({
2277
2277
  ref_key: "filterRef",
2278
2278
  ref: o
2279
2279
  }, t, {
2280
2280
  modelValue: p.value,
2281
2281
  "onUpdate:modelValue": v[3] || (v[3] = (f) => p.value = f),
2282
- type: e(g)?.type,
2282
+ type: g.value?.type,
2283
2283
  class: t.itemClass,
2284
2284
  onChange: v[4] || (v[4] = (f) => x(f.name, f.value)),
2285
2285
  onClear: v[5] || (v[5] = (f) => r(f))
@@ -2318,7 +2318,7 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2318
2318
  },
2319
2319
  emits: ["update:modelValue", "change", "clear"],
2320
2320
  setup(m, { expose: n, emit: y }) {
2321
- const t = m, s = y, o = A(), g = A(_e(t.type, t.layout)), p = O({
2321
+ const t = m, s = y, o = A(), g = K(() => _e(t.type, t.layout)), p = K({
2322
2322
  get: () => t.modelValue,
2323
2323
  set: (c) => s("update:modelValue", c)
2324
2324
  });
@@ -2386,7 +2386,7 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2386
2386
  },
2387
2387
  emits: ["update:modelValue", "change", "clear"],
2388
2388
  setup(m, { expose: n, emit: y }) {
2389
- const t = m, s = y, o = A(), g = O({
2389
+ const t = m, s = y, o = A(), g = K({
2390
2390
  get: () => t.modelValue,
2391
2391
  set: (c) => s("update:modelValue", c)
2392
2392
  });
@@ -2440,7 +2440,7 @@ function ye(m, n) {
2440
2440
  },
2441
2441
  { deep: !0, immediate: !0 }
2442
2442
  );
2443
- const o = O(() => (ue(y?.default?.()) ?? []).flatMap((a) => Array.isArray(a.children) ? a.children : [a]));
2443
+ const o = K(() => (ue(y?.default?.()) ?? []).flatMap((a) => Array.isArray(a.children) ? a.children : [a]));
2444
2444
  function g(l) {
2445
2445
  delete s.value[l], n("clear", {
2446
2446
  data: ue(s.value),
@@ -2457,7 +2457,7 @@ function ye(m, n) {
2457
2457
  value: a
2458
2458
  });
2459
2459
  }
2460
- const r = O(() => o.value.map((l) => {
2460
+ const r = K(() => o.value.map((l) => {
2461
2461
  const a = l.props?.name;
2462
2462
  return We(l, {
2463
2463
  ...l.props,
@@ -2471,7 +2471,7 @@ function ye(m, n) {
2471
2471
  class: [m.itemClass, l.props?.class],
2472
2472
  itemClass: [m.itemClass, l.props?.itemClass].filter((b) => typeof b == "string" && b.trim().length > 0).join(" ") || void 0
2473
2473
  });
2474
- })), x = O(
2474
+ })), x = K(
2475
2475
  () => new Map(
2476
2476
  r.value.map((l) => {
2477
2477
  const a = l.props?.name;
@@ -2485,11 +2485,11 @@ function ye(m, n) {
2485
2485
  name: "ALL"
2486
2486
  });
2487
2487
  }
2488
- const v = A(""), f = O(() => m.schema?.value ? Object.entries(s.value).filter(([l, a]) => m.schema && !(l in m.schema.value) ? !1 : Array.isArray(a) ? a.some((b) => b !== "" && b !== void 0) : a !== "" && a !== void 0).length : 0), k = A();
2488
+ const v = A(""), f = K(() => m.schema?.value ? Object.entries(s.value).filter(([l, a]) => m.schema && !(l in m.schema.value) ? !1 : Array.isArray(a) ? a.some((b) => b !== "" && b !== void 0) : a !== "" && a !== void 0).length : 0), k = A();
2489
2489
  T(v, async () => {
2490
2490
  await fe(), k?.value?.filterRef?.inputTextRef && k.value.filterRef.inputTextRef.focus();
2491
2491
  });
2492
- const _ = O(() => m.schema?.value ? Object.fromEntries(Object.entries(m.schema?.value).slice(0, m.limit)) : {}), V = O(() => {
2492
+ const _ = K(() => m.schema?.value ? Object.fromEntries(Object.entries(m.schema?.value).slice(0, m.limit)) : {}), V = K(() => {
2493
2493
  if (r.value.length === 0) return [];
2494
2494
  let l = 0;
2495
2495
  if (m.schema?.value) {
@@ -2497,7 +2497,7 @@ function ye(m, n) {
2497
2497
  m.limit && a < m.limit ? l = m.limit - a : l = 0;
2498
2498
  }
2499
2499
  return r.value.slice(0, l);
2500
- }), i = O(() => r.value.length === 0 ? [] : m.view !== "inline" ? r.value : r.value.slice(V.value.length));
2500
+ }), i = K(() => r.value.length === 0 ? [] : m.view !== "inline" ? r.value : r.value.slice(V.value.length));
2501
2501
  return {
2502
2502
  activeFilter: s,
2503
2503
  activeFilterCount: f,
@@ -2526,13 +2526,13 @@ const ro = /* @__PURE__ */ W({
2526
2526
  if (!k || !_) return;
2527
2527
  const V = k.getBoundingClientRect(), i = _.offsetWidth, l = window.innerWidth - V.left;
2528
2528
  let a = V.left + window.scrollX;
2529
- i > l && (a = window.innerWidth - i - 8, a < 8 && (a = 8)), g.value = {
2529
+ i > l && (a = window.innerWidth - i - 18, a < 18 && (a = 18)), g.value = {
2530
2530
  position: "absolute",
2531
- top: `${V.bottom + window.scrollY + 8}px`,
2531
+ top: `${V.bottom + window.scrollY + 18}px`,
2532
2532
  left: `${a}px`
2533
2533
  };
2534
2534
  }
2535
- const x = O(() => Object.entries(g.value).map((k) => k.join(":")).join(";"));
2535
+ const x = K(() => Object.entries(g.value).map((k) => k.join(":")).join(";"));
2536
2536
  function c(k) {
2537
2537
  const _ = k.target;
2538
2538
  !o.value?.contains(k.target) && !t.value?.contains(k.target) && !_.closest("[data-inside-popover]") && (y.value = !1);
@@ -2620,7 +2620,7 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
2620
2620
  },
2621
2621
  emits: ["change", "clear", "clearAll"],
2622
2622
  setup(m, { expose: n, emit: y }) {
2623
- const t = le(), s = m, o = Te(s.mode), g = pe(), p = y, r = A({}), x = O(() => r?.value ? s.view !== "inline" ? r?.value : Object.fromEntries(Object.entries(r?.value).slice(s.limit)) : {}), {
2623
+ const t = le(), s = m, o = Te(s.mode), g = pe(), p = y, r = A({}), x = K(() => r?.value ? s.view !== "inline" ? r?.value : Object.fromEntries(Object.entries(r?.value).slice(s.limit)) : {}), {
2624
2624
  activeFilter: c,
2625
2625
  activeFilterCount: v,
2626
2626
  onFilterChange: f,
@@ -2633,30 +2633,30 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
2633
2633
  ...s,
2634
2634
  schema: r,
2635
2635
  slots: g
2636
- }, p), a = O(() => s.badgeCount ?? v.value);
2637
- function b(M) {
2638
- return Array.isArray(M) ? M.filter(($) => $ != null && $ !== "").length : M && typeof M == "object" ? Object.values(M).filter(($) => $ != null && $ !== "").length : M === null || M !== void 0 && M !== "" ? 1 : 0;
2636
+ }, p), a = K(() => s.badgeCount ?? v.value);
2637
+ function b(L) {
2638
+ return Array.isArray(L) ? L.filter(($) => $ != null && $ !== "").length : L && typeof L == "object" ? Object.values(L).filter(($) => $ != null && $ !== "").length : L === null || L !== void 0 && L !== "" ? 1 : 0;
2639
2639
  }
2640
- function h(M) {
2641
- return c.value ? b(c.value[M]) : 0;
2640
+ function h(L) {
2641
+ return c.value ? b(c.value[L]) : 0;
2642
2642
  }
2643
- function K() {
2643
+ function M() {
2644
2644
  if (x.value) {
2645
- const [M] = Object.keys(x.value);
2646
- i.value = M;
2645
+ const [L] = Object.keys(x.value);
2646
+ i.value = L;
2647
2647
  } else V.value.length > 0 ? i.value = V.value[0].props.name : i.value = "";
2648
2648
  }
2649
2649
  return T(
2650
2650
  () => s.schema,
2651
- (M) => {
2652
- r.value = M ?? {};
2651
+ (L) => {
2652
+ r.value = L ?? {};
2653
2653
  },
2654
2654
  { deep: !0, immediate: !0 }
2655
2655
  ), n({
2656
2656
  clearFilter: k,
2657
2657
  clearAllFilters: _
2658
- }), (M, $) => (u(), I(ro, {
2659
- onOpen: K,
2658
+ }), (L, $) => (u(), I(ro, {
2659
+ onOpen: M,
2660
2660
  onClose: $[5] || ($[5] = (S) => i.value = "")
2661
2661
  }, {
2662
2662
  trigger: ne(() => [
@@ -2664,8 +2664,8 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
2664
2664
  "data-popover-trigger": "",
2665
2665
  "aria-haspopup": "dialog",
2666
2666
  "aria-expanded": "false",
2667
- class: E([
2668
- M.itemClass,
2667
+ class: O([
2668
+ L.itemClass,
2669
2669
  e(o),
2670
2670
  "flex items-center justify-between gap-2",
2671
2671
  a.value > 0 ? "border border-blue-400 bg-blue-50 text-blue-600 hover:border-blue-500" : "text-neutral-700 hover:border-neutral-400"
@@ -2686,12 +2686,12 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
2686
2686
  d("p", yo, B(e(t)("filter.selectFieldHelp")), 1)
2687
2687
  ]),
2688
2688
  d("div", go, [
2689
- M.schema ? (u(!0), w(U, { key: 0 }, X(Object.entries(x.value), ([S, F]) => (u(), w("button", {
2689
+ L.schema ? (u(!0), w(U, { key: 0 }, X(Object.entries(x.value), ([S, F]) => (u(), w("button", {
2690
2690
  key: S,
2691
2691
  onClick: () => {
2692
2692
  i.value = S;
2693
2693
  },
2694
- class: E([
2694
+ class: O([
2695
2695
  "flex w-full items-center justify-between px-3 py-2 text-left transition-colors hover:bg-gray-50",
2696
2696
  e(i) === S ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : "text-neutral-700"
2697
2697
  ])
@@ -2704,7 +2704,7 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
2704
2704
  (u(!0), w(U, null, X(e(V), (S, F) => (u(), w("button", {
2705
2705
  key: "slot-" + F,
2706
2706
  onClick: (D) => i.value = S.props.name,
2707
- class: E([
2707
+ class: O([
2708
2708
  "flex items-center justify-between px-3 py-2 text-left transition-colors hover:bg-gray-50",
2709
2709
  e(i) === S.props.name ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : "text-neutral-700"
2710
2710
  ])
@@ -2717,7 +2717,7 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
2717
2717
  ]),
2718
2718
  e(v) > 0 ? (u(), w("div", $o, [
2719
2719
  d("button", {
2720
- class: E([M.itemClass, "w-full px-3 py-2 text-left text-sm text-gray-600 hover:bg-gray-50 transition-colors"]),
2720
+ class: O([L.itemClass, "w-full px-3 py-2 text-left text-sm text-gray-600 hover:bg-gray-50 transition-colors"]),
2721
2721
  onClick: $[0] || ($[0] = (S) => e(_)()),
2722
2722
  "data-inside-popover": ""
2723
2723
  }, " Очистити всі ", 2)
@@ -2736,8 +2736,8 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
2736
2736
  ref_key: "filterRef",
2737
2737
  ref: l
2738
2738
  }, { ref_for: !0 }, F, {
2739
- class: [M.itemClass, F?.class],
2740
- "item-class": [M.itemClass, F?.itemClass].filter(Boolean).join(" ") || void 0,
2739
+ class: [L.itemClass, F?.class],
2740
+ "item-class": [L.itemClass, F?.itemClass].filter(Boolean).join(" ") || void 0,
2741
2741
  onChange: $[1] || ($[1] = (D) => e(f)(D.name, D.value)),
2742
2742
  onClear: $[2] || ($[2] = (D) => {
2743
2743
  e(k)(D), e(f)(D, void 0);
@@ -2757,8 +2757,8 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
2757
2757
  ref_for: !0,
2758
2758
  ref_key: "filterRef",
2759
2759
  ref: l,
2760
- class: [M.itemClass, S.props?.class],
2761
- "item-class": [M.itemClass, S.props?.itemClass].filter(Boolean).join(" ") || void 0,
2760
+ class: [L.itemClass, S.props?.class],
2761
+ "item-class": [L.itemClass, S.props?.itemClass].filter(Boolean).join(" ") || void 0,
2762
2762
  onChange: $[3] || ($[3] = (D) => e(f)(D.name, D.value)),
2763
2763
  onClear: $[4] || ($[4] = (D) => {
2764
2764
  e(k)(D), e(f)(D, void 0);
@@ -2792,7 +2792,7 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
2792
2792
  },
2793
2793
  emits: ["change", "clear", "clearAll"],
2794
2794
  setup(m, { expose: n, emit: y }) {
2795
- const t = le(), s = m, o = y, g = pe(), p = A({}), r = O(() => Object.keys(s.schema).length > s.limit), {
2795
+ const t = le(), s = m, o = y, g = pe(), p = A({}), r = K(() => Object.keys(s.schema).length > s.limit), {
2796
2796
  activeFilter: x,
2797
2797
  activeFilterCount: c,
2798
2798
  onFilterChange: v,
@@ -2812,15 +2812,15 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
2812
2812
  function l($) {
2813
2813
  return Array.isArray($) ? $.some((S) => S !== "" && S !== void 0 && S !== null) : $ === null ? !0 : $ && typeof $ == "object" ? Object.values($).some((S) => S !== "" && S !== void 0 && S !== null) : $ !== "" && $ !== void 0;
2814
2814
  }
2815
- const a = O(() => {
2815
+ const a = K(() => {
2816
2816
  const $ = Object.keys(_.value ?? {}), S = i.value.map((F) => F.props?.name).filter((F) => typeof F == "string");
2817
2817
  return /* @__PURE__ */ new Set([...$, ...S]);
2818
- }), b = O(() => Object.entries(x.value ?? {}).filter(([$, S]) => a.value.has($) && l(S)).length), h = O(() => {
2818
+ }), b = K(() => Object.entries(x.value ?? {}).filter(([$, S]) => a.value.has($) && l(S)).length), h = K(() => {
2819
2819
  const $ = c.value ?? 0, S = b.value ?? 0;
2820
2820
  return Math.max($ - S, 0);
2821
- }), K = A();
2822
- function M() {
2823
- K.value && K.value.clearAllFilters(!0), k();
2821
+ }), M = A();
2822
+ function L() {
2823
+ M.value && M.value.clearAllFilters(!0), k();
2824
2824
  }
2825
2825
  return T(
2826
2826
  () => s.schema,
@@ -2868,7 +2868,7 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
2868
2868
  onClear: S[5] || (S[5] = (F) => e(f)(F.name)),
2869
2869
  mode: $.mode,
2870
2870
  ref_key: "popoverRef",
2871
- ref: K,
2871
+ ref: M,
2872
2872
  cleanable: !0,
2873
2873
  "badge-count": h.value
2874
2874
  }), {
@@ -2882,8 +2882,8 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
2882
2882
  }, 16, ["schema", "limit", "mode", "badge-count"])) : C("", !0),
2883
2883
  e(c) > 0 ? (u(), w("button", {
2884
2884
  key: 2,
2885
- onClick: M,
2886
- class: E([$.itemClass, "relative py-2 px-3 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-md bg-gray-50 border text-gray-800 hover:bg-gray-200 focus:bg-gray-200"])
2885
+ onClick: L,
2886
+ class: O([$.itemClass, "relative py-2 px-3 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-md bg-gray-50 border text-gray-800 hover:bg-gray-200 focus:bg-gray-200"])
2887
2887
  }, B(e(t)("filter.clear")), 3)) : C("", !0)
2888
2888
  ]));
2889
2889
  }
@@ -2929,7 +2929,7 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
2929
2929
  "data-popover-trigger": "",
2930
2930
  "aria-haspopup": "dialog",
2931
2931
  "aria-expanded": "false",
2932
- class: E([f.itemClass, "w-full ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground border h-10 px-4 py-2 gap-2 m-2 bg-white text-gray-800 hover:bg-gray-200 focus:bg-gray-200"]),
2932
+ class: O([f.itemClass, "w-full ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:text-accent-foreground border h-10 px-4 py-2 gap-2 m-2 bg-white text-gray-800 hover:bg-gray-200 focus:bg-gray-200"]),
2933
2933
  type: "button"
2934
2934
  }, " Очистити ", 2)) : C("", !0),
2935
2935
  f.schema ? (u(!0), w(U, { key: 1 }, X(Object.entries(f.schema), ([_, V]) => (u(), I(te, J({ layout: "vertical" }, { ref_for: !0 }, V, {
@@ -2997,10 +2997,10 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
2997
2997
  slots: g
2998
2998
  },
2999
2999
  s
3000
- ), k = A(null), _ = A(null), V = qe({ open: !1, top: 0, left: 0 }), i = O(() => V.open), l = O(() => !!t.disabled), a = O(() => o.value || {}), b = O(() => t.title ?? "Фільтр"), h = O(() => !!g.trigger), K = O(() => [
3000
+ ), k = A(null), _ = A(null), V = qe({ open: !1, top: 0, left: 0 }), i = K(() => V.open), l = K(() => !!t.disabled), a = K(() => o.value || {}), b = K(() => t.title ?? "Фільтр"), h = K(() => !!g.trigger), M = K(() => [
3001
3001
  "inline-flex h-9 items-center justify-center gap-2 rounded-lg border border-transparent bg-slate-200/70 px-3 text-sm font-medium text-slate-700 transition-colors hover:bg-blue-100 hover:text-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-200 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-slate-200/70 disabled:hover:text-slate-700",
3002
3002
  l.value ? "cursor-not-allowed opacity-60" : "cursor-pointer"
3003
- ]), M = O(() => V.open ? {
3003
+ ]), L = K(() => V.open ? {
3004
3004
  position: "absolute",
3005
3005
  top: `${V.top}px`,
3006
3006
  left: `${V.left}px`,
@@ -3039,9 +3039,9 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
3039
3039
  return;
3040
3040
  }
3041
3041
  if (Array.isArray(z)) {
3042
- const j = z.filter((L) => L && (L.name || L.id)).map((L) => {
3043
- const P = L.name || L.id;
3044
- return [P, { ...L, name: P }];
3042
+ const j = z.filter((E) => E && (E.name || E.id)).map((E) => {
3043
+ const P = E.name || E.id;
3044
+ return [P, { ...E, name: P }];
3045
3045
  });
3046
3046
  o.value = Object.fromEntries(j);
3047
3047
  return;
@@ -3061,7 +3061,7 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
3061
3061
  }, [
3062
3062
  h.value ? (u(), w("span", {
3063
3063
  key: 0,
3064
- class: E(["inline-flex", l.value ? "cursor-not-allowed opacity-60 pointer-events-none" : "cursor-pointer"]),
3064
+ class: O(["inline-flex", l.value ? "cursor-not-allowed opacity-60 pointer-events-none" : "cursor-pointer"]),
3065
3065
  role: "button",
3066
3066
  tabindex: "0",
3067
3067
  "data-popover-trigger": "",
@@ -3079,7 +3079,7 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
3079
3079
  })
3080
3080
  ], 42, Ko)) : (u(), w("button", {
3081
3081
  key: 1,
3082
- class: E(K.value),
3082
+ class: O(M.value),
3083
3083
  type: "button",
3084
3084
  disabled: l.value,
3085
3085
  onClick: se(D, ["prevent", "stop"]),
@@ -3091,8 +3091,8 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
3091
3091
  (u(), I(ge, { to: "body" }, [
3092
3092
  i.value ? (u(), w("div", {
3093
3093
  key: 0,
3094
- class: E(["absolute", typeof z.width == "number" ? `min-w-[${z.width + 32 + (Object.keys(a.value).length > 7 ? 20 : 0)}px]` : "min-w-[268px] "]),
3095
- style: be(M.value),
3094
+ class: O(["absolute", typeof z.width == "number" ? `min-w-[${z.width + 32 + (Object.keys(a.value).length > 7 ? 20 : 0)}px]` : "min-w-[268px] "]),
3095
+ style: be(L.value),
3096
3096
  ref_key: "panel",
3097
3097
  ref: _,
3098
3098
  onClick: j[4] || (j[4] = se(() => {
@@ -3113,27 +3113,27 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
3113
3113
  ])
3114
3114
  ]),
3115
3115
  d("div", Uo, [
3116
- Object.keys(a.value).length ? (u(!0), w(U, { key: 0 }, X(Object.entries(a.value), ([L, P]) => (u(), I(te, J({ key: L }, { ref_for: !0 }, { ...P, layout: "inline" }, {
3116
+ Object.keys(a.value).length ? (u(!0), w(U, { key: 0 }, X(Object.entries(a.value), ([E, P]) => (u(), I(te, J({ key: E }, { ref_for: !0 }, { ...P, layout: "inline" }, {
3117
3117
  width: z.width ? z.width : P?.width,
3118
3118
  class: [z.itemClass, P?.class],
3119
3119
  "item-class": [z.itemClass, P?.itemClass].filter(Boolean).join(" ") || void 0,
3120
3120
  cleanable: !0,
3121
- modelValue: e(p)[L],
3122
- "onUpdate:modelValue": (Y) => e(p)[L] = Y,
3121
+ modelValue: e(p)[E],
3122
+ "onUpdate:modelValue": (Y) => e(p)[E] = Y,
3123
3123
  onChange: j[0] || (j[0] = (Y) => e(x)(Y.name, Y.value)),
3124
3124
  onClear: j[1] || (j[1] = (Y) => {
3125
3125
  e(c)(Y), e(x)(Y, void 0);
3126
3126
  })
3127
3127
  }), null, 16, ["width", "class", "item-class", "modelValue", "onUpdate:modelValue"]))), 128)) : C("", !0),
3128
- (u(!0), w(U, null, X(e(f), (L, P) => (u(), I(te, J({
3128
+ (u(!0), w(U, null, X(e(f), (E, P) => (u(), I(te, J({
3129
3129
  key: "slot-" + P,
3130
3130
  ref_for: !0
3131
- }, { ...L.props, layout: "inline" }, {
3132
- class: [z.itemClass, L.props?.class],
3133
- "item-class": [z.itemClass, L.props?.itemClass].filter(Boolean).join(" ") || void 0,
3131
+ }, { ...E.props, layout: "inline" }, {
3132
+ class: [z.itemClass, E.props?.class],
3133
+ "item-class": [z.itemClass, E.props?.itemClass].filter(Boolean).join(" ") || void 0,
3134
3134
  cleanable: !0,
3135
- modelValue: e(p)[L.props.name],
3136
- "onUpdate:modelValue": (Y) => e(p)[L.props.name] = Y,
3135
+ modelValue: e(p)[E.props.name],
3136
+ "onUpdate:modelValue": (Y) => e(p)[E.props.name] = Y,
3137
3137
  onChange: j[2] || (j[2] = (Y) => e(x)(Y.name, Y.value)),
3138
3138
  onClear: j[3] || (j[3] = (Y) => {
3139
3139
  e(c)(Y), e(x)(Y, void 0);
@@ -3143,7 +3143,7 @@ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-c
3143
3143
  e(r) > 0 ? (u(), w("div", zo, [
3144
3144
  d("button", {
3145
3145
  type: "button",
3146
- class: E([z.itemClass, "text-sm font-semibold text-blue-600 transition-colors hover:text-blue-700 focus:outline-none"]),
3146
+ class: O([z.itemClass, "text-sm font-semibold text-blue-600 transition-colors hover:text-blue-700 focus:outline-none"]),
3147
3147
  onClick: N
3148
3148
  }, B(e(y)("filter.clear")), 3)
3149
3149
  ])) : C("", !0)