@opengis/filter 0.1.22 → 0.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { createElementBlock as w, openBlock as i, createElementVNode as u, defineComponent as q, ref as A, computed as O, withModifiers as se, normalizeClass as L, createCommentVNode as _, toDisplayString as S, createVNode as Q, watch as E, createStaticVNode as Ne, Fragment as U, renderList as X, unref as e, createBlock as I, createTextVNode as G, withDirectives as W, vShow as Z, getCurrentInstance as Pe, vModelText as ee, 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 Qe, normalizeProps as He, guardReactiveProps as Ge } from "vue";
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";
2
2
  import { notify as Ae } from "@opengis/core";
3
- const te = (m, o) => {
3
+ const ee = (m, n) => {
4
4
  const y = m.__vccOpts || m;
5
- for (const [t, a] of o)
6
- y[t] = a;
5
+ for (const [t, s] of n)
6
+ y[t] = s;
7
7
  return y;
8
8
  }, Xe = {}, Je = {
9
9
  xmlns: "http://www.w3.org/2000/svg",
@@ -17,18 +17,18 @@ const te = (m, o) => {
17
17
  "stroke-linejoin": "round",
18
18
  class: "icon icon-tabler icons-tabler-outline icon-tabler-reload absolute inline mr-1 text-gray-800 transition-all cursor-pointer active:rotate-90 right-1 top-1 hover:text-blue-500"
19
19
  };
20
- function Ze(m, o) {
21
- return i(), w("svg", Je, o[0] || (o[0] = [
22
- u("path", {
20
+ function Ze(m, n) {
21
+ return u(), w("svg", Je, n[0] || (n[0] = [
22
+ d("path", {
23
23
  stroke: "none",
24
24
  d: "M0 0h24v24H0z",
25
25
  fill: "none"
26
26
  }, null, -1),
27
- u("path", { d: "M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747" }, null, -1),
28
- u("path", { d: "M20 4v5h-5" }, null, -1)
27
+ d("path", { d: "M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747" }, null, -1),
28
+ d("path", { d: "M20 4v5h-5" }, null, -1)
29
29
  ]));
30
30
  }
31
- const et = /* @__PURE__ */ te(Xe, [["render", Ze]]), tt = {}, lt = {
31
+ const et = /* @__PURE__ */ ee(Xe, [["render", Ze]]), tt = {}, lt = {
32
32
  xmlns: "http://www.w3.org/2000/svg",
33
33
  width: "24",
34
34
  height: "24",
@@ -40,12 +40,12 @@ const et = /* @__PURE__ */ te(Xe, [["render", Ze]]), tt = {}, lt = {
40
40
  "stroke-linejoin": "round",
41
41
  class: "text-blue-600 w-[16px] h-[16px]"
42
42
  };
43
- function ot(m, o) {
44
- return i(), w("svg", lt, o[0] || (o[0] = [
45
- u("path", { d: "M20 6 9 17l-5-5" }, null, -1)
43
+ function ot(m, n) {
44
+ return u(), w("svg", lt, n[0] || (n[0] = [
45
+ d("path", { d: "M20 6 9 17l-5-5" }, null, -1)
46
46
  ]));
47
47
  }
48
- const ae = /* @__PURE__ */ te(tt, [["render", ot]]), at = { class: "flex items-center justify-between w-full text-sm" }, nt = { class: "flex items-center cursor-pointer w-full" }, rt = {
48
+ const oe = /* @__PURE__ */ ee(tt, [["render", ot]]), at = { class: "flex items-center justify-between w-full text-sm" }, nt = { class: "flex items-center cursor-pointer w-full" }, rt = {
49
49
  key: 0,
50
50
  width: "16",
51
51
  height: "auto",
@@ -56,7 +56,7 @@ const ae = /* @__PURE__ */ te(tt, [["render", ot]]), at = { class: "flex items-c
56
56
  }, dt = {
57
57
  key: 1,
58
58
  class: "absolute right-2 flex size-3.5 items-center justify-center"
59
- }, he = /* @__PURE__ */ q({
59
+ }, he = /* @__PURE__ */ W({
60
60
  __name: "list-item",
61
61
  props: {
62
62
  layout: {},
@@ -69,107 +69,107 @@ const ae = /* @__PURE__ */ te(tt, [["render", ot]]), at = { class: "flex items-c
69
69
  highlighted: { type: Boolean }
70
70
  },
71
71
  emits: ["itemClick"],
72
- setup(m, { expose: o, emit: y }) {
73
- const t = m, a = y;
74
- function l() {
75
- a("itemClick", t.value);
72
+ setup(m, { expose: n, emit: y }) {
73
+ const t = m, s = y;
74
+ function o() {
75
+ s("itemClick", t.value);
76
76
  }
77
77
  const g = A(null), p = O(() => t.layout === "inline" && t.type === "radio");
78
- return o({ el: g }), (n, x) => (i(), w("div", {
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",
81
81
  ref: g
82
82
  }, [
83
- u("div", at, [
84
- u("div", nt, [
85
- u("label", {
83
+ d("div", at, [
84
+ d("div", nt, [
85
+ d("label", {
86
86
  for: "radio-9740",
87
- class: L([
88
- ["inline", "popover"].includes(n.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
- { "bg-blue-100": n.highlighted, relative: p.value }
87
+ class: E([
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
+ { "bg-blue-100": r.highlighted, relative: p.value }
90
90
  ]),
91
- onClick: se(l, ["stop", "prevent"])
91
+ onClick: se(o, ["stop", "prevent"])
92
92
  }, [
93
- p.value ? _("", !0) : (i(), w("div", {
93
+ p.value ? C("", !0) : (u(), w("div", {
94
94
  key: 0,
95
- class: L(["w-[18px] h-[18px] border flex items-center justify-center", [
96
- n.type === "checkbox" ? "rounded-[4px]" : "rounded-full",
97
- n.color ? `bg-[${n.color}] border-[#ffffff]` : n.isSelected ? "bg-[#2563eb] border-[#ffffff]" : "bg-[#ffffff] border-[#d9d9d9]"
95
+ class: E(["w-[18px] h-[18px] border flex items-center justify-center", [
96
+ r.type === "checkbox" ? "rounded-[4px]" : "rounded-full",
97
+ r.color ? `bg-[${r.color}] border-[#ffffff]` : r.isSelected ? "bg-[#2563eb] border-[#ffffff]" : "bg-[#ffffff] border-[#d9d9d9]"
98
98
  ]])
99
99
  }, [
100
- n.isSelected ? (i(), w("img", rt)) : _("", !0)
100
+ r.isSelected ? (u(), w("img", rt)) : C("", !0)
101
101
  ], 2)),
102
- u("input", {
102
+ d("input", {
103
103
  type: "checkbox",
104
104
  class: "hidden",
105
105
  id: "radio-9740",
106
- value: n.value
106
+ value: r.value
107
107
  }, null, 8, st),
108
- u("div", {
109
- class: L(["flex flex-1 flex-row items-center justify-between", p.value ? "pl-1 pr-6" : "w-[calc(100%-18px)] pl-[10px]"])
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]"])
110
110
  }, [
111
- u("span", it, S(n.label ?? "Відсутні дані"), 1),
112
- n.count ? (i(), w("div", ut, " (" + S(n.count) + ") ", 1)) : _("", !0)
111
+ d("span", it, B(r.label ?? "Відсутні дані"), 1),
112
+ r.count ? (u(), w("div", ut, " (" + B(r.count) + ") ", 1)) : C("", !0)
113
113
  ], 2),
114
- p.value && n.isSelected ? (i(), w("span", dt, [
115
- Q(ae)
116
- ])) : _("", !0)
114
+ p.value && r.isSelected ? (u(), w("span", dt, [
115
+ q(oe)
116
+ ])) : C("", !0)
117
117
  ], 2)
118
118
  ])
119
119
  ])
120
120
  ], 512));
121
121
  }
122
122
  });
123
- function xe(m, o) {
123
+ function xe(m, n) {
124
124
  const {
125
125
  options: y = [],
126
126
  limit: t = 20
127
127
  } = m;
128
- function a(b) {
128
+ function s(b) {
129
129
  return Array.isArray(b) ? b[0] : b;
130
130
  }
131
- const l = A(a(m.modelValue)), g = A(""), p = A(!1), n = A([]), x = A("id"), d = A("text"), v = A(!1), c = A(m.layout !== "popover" && y.length > t);
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
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
134
  return { autoValueKey: K, autoLabelKey: M };
135
135
  }
136
136
  if (y.length > 0) {
137
137
  const b = k(y);
138
- x.value = b.autoValueKey, d.value = b.autoLabelKey;
138
+ x.value = b.autoValueKey, c.value = b.autoLabelKey;
139
139
  }
140
- const V = O(() => {
141
- const b = n.value;
140
+ const _ = O(() => {
141
+ const b = r.value;
142
142
  return m.layout === "popover" || v.value ? b : b.slice(0, t);
143
143
  });
144
- E(() => m.modelValue, (b) => {
145
- l.value = a(b);
146
- }, { immediate: !0 }), n.value = [...y].sort((b, h) => m.sort === "count" ? h.count && b.count ? h.count - b.count : 0 : m.sort === "name" ? String(b[d.value] ?? "").localeCompare(String(h[d.value] ?? "")) : 0);
147
- function C(b) {
148
- return l.value === b[x.value];
144
+ T(() => m.modelValue, (b) => {
145
+ o.value = s(b);
146
+ }, { immediate: !0 }), r.value = [...y].sort((b, h) => m.sort === "count" ? h.count && b.count ? h.count - b.count : 0 : m.sort === "name" ? String(b[c.value] ?? "").localeCompare(String(h[c.value] ?? "")) : 0);
147
+ function V(b) {
148
+ return o.value === b[x.value];
149
149
  }
150
- function f(b) {
151
- l.value = b[x.value], o("update:modelValue", l.value), o("change", { name: m.name, value: l.value });
150
+ function i(b) {
151
+ o.value = b[x.value], n("update:modelValue", o.value), n("change", { name: m.name, value: o.value });
152
152
  }
153
- function r() {
154
- l.value = void 0, o("update:modelValue", l.value), o("clear", m.name);
153
+ function l() {
154
+ o.value = void 0, n("update:modelValue", o.value), n("clear", m.name);
155
155
  }
156
- function s() {
156
+ function a() {
157
157
  v.value = !v.value;
158
158
  }
159
159
  return {
160
- innerValue: l,
160
+ innerValue: o,
161
161
  searchTerm: g,
162
- filteredOptions: V,
163
- isSelected: C,
164
- selectItem: f,
165
- clear: r,
166
- toggleShowAll: s,
162
+ filteredOptions: _,
163
+ isSelected: V,
164
+ selectItem: i,
165
+ clear: l,
166
+ toggleShowAll: a,
167
167
  isReqProc: p,
168
168
  showAll: v,
169
- isEnableShowAll: c,
170
- labelKey: d,
169
+ isEnableShowAll: f,
170
+ labelKey: c,
171
171
  valueKey: x,
172
- allOptions: n
172
+ allOptions: r
173
173
  };
174
174
  }
175
175
  const ct = {}, ft = {
@@ -178,12 +178,12 @@ const ct = {}, ft = {
178
178
  fill: "none",
179
179
  xmlns: "http://www.w3.org/2000/svg"
180
180
  };
181
- function pt(m, o) {
182
- return i(), w("svg", ft, o[0] || (o[0] = [
181
+ function pt(m, n) {
182
+ return u(), w("svg", ft, n[0] || (n[0] = [
183
183
  Ne('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>', 12)
184
184
  ]));
185
185
  }
186
- const we = /* @__PURE__ */ te(ct, [["render", pt]]), mt = {}, vt = {
186
+ const we = /* @__PURE__ */ ee(ct, [["render", pt]]), mt = {}, vt = {
187
187
  xmlns: "http://www.w3.org/2000/svg",
188
188
  width: "24",
189
189
  height: "24",
@@ -195,17 +195,17 @@ const we = /* @__PURE__ */ te(ct, [["render", pt]]), mt = {}, vt = {
195
195
  "stroke-linejoin": "round",
196
196
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate"
197
197
  };
198
- function yt(m, o) {
199
- return i(), w("svg", vt, o[0] || (o[0] = [
200
- u("path", {
198
+ function yt(m, n) {
199
+ return u(), w("svg", vt, n[0] || (n[0] = [
200
+ d("path", {
201
201
  stroke: "none",
202
202
  d: "M0 0h24v24H0z",
203
203
  fill: "none"
204
204
  }, null, -1),
205
- u("path", { d: "M6 9l6 6l6 -6" }, null, -1)
205
+ d("path", { d: "M6 9l6 6l6 -6" }, null, -1)
206
206
  ]));
207
207
  }
208
- const ve = /* @__PURE__ */ te(mt, [["render", yt]]), gt = {}, bt = {
208
+ const ve = /* @__PURE__ */ ee(mt, [["render", yt]]), gt = {}, bt = {
209
209
  xmlns: "http://www.w3.org/2000/svg",
210
210
  width: "24",
211
211
  height: "24",
@@ -217,17 +217,17 @@ const ve = /* @__PURE__ */ te(mt, [["render", yt]]), gt = {}, bt = {
217
217
  "stroke-linejoin": "round",
218
218
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down w-[14px] rotate-[180deg]"
219
219
  };
220
- function ht(m, o) {
221
- return i(), w("svg", bt, o[0] || (o[0] = [
222
- u("path", {
220
+ function ht(m, n) {
221
+ return u(), w("svg", bt, n[0] || (n[0] = [
222
+ d("path", {
223
223
  stroke: "none",
224
224
  d: "M0 0h24v24H0z",
225
225
  fill: "none"
226
226
  }, null, -1),
227
- u("path", { d: "M6 9l6 6l6 -6" }, null, -1)
227
+ d("path", { d: "M6 9l6 6l6 -6" }, null, -1)
228
228
  ]));
229
229
  }
230
- const ke = /* @__PURE__ */ te(gt, [["render", ht]]), xt = {
230
+ const ke = /* @__PURE__ */ ee(gt, [["render", ht]]), xt = {
231
231
  key: 0,
232
232
  class: "w-full"
233
233
  }, wt = { class: "flex flex-col items-center justify-center p-5 text-center" }, kt = {
@@ -236,7 +236,7 @@ const ke = /* @__PURE__ */ te(gt, [["render", ht]]), xt = {
236
236
  }, Ct = {
237
237
  key: 1,
238
238
  class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
239
- }, Vt = /* @__PURE__ */ q({
239
+ }, Vt = /* @__PURE__ */ W({
240
240
  __name: "radio",
241
241
  props: {
242
242
  id: {},
@@ -265,158 +265,158 @@ const ke = /* @__PURE__ */ te(gt, [["render", ht]]), xt = {
265
265
  itemClass: {}
266
266
  },
267
267
  emits: ["update:modelValue", "change", "clear"],
268
- setup(m, { expose: o, emit: y }) {
269
- const t = m, a = A(null), l = y, {
268
+ setup(m, { expose: n, emit: y }) {
269
+ const t = m, s = A(null), o = y, {
270
270
  innerValue: g,
271
271
  filteredOptions: p,
272
- isSelected: n,
272
+ isSelected: r,
273
273
  selectItem: x,
274
- clear: d,
274
+ clear: c,
275
275
  toggleShowAll: v,
276
- isReqProc: c,
276
+ isReqProc: f,
277
277
  showAll: k,
278
- isEnableShowAll: V,
279
- labelKey: C,
280
- valueKey: f,
281
- allOptions: r
278
+ isEnableShowAll: _,
279
+ labelKey: V,
280
+ valueKey: i,
281
+ allOptions: l
282
282
  } = xe({
283
283
  ...t,
284
284
  modelValue: t.modelValue ?? t.default ?? ""
285
- }, l);
286
- return o({
287
- clear: d,
288
- inputTextRef: a
289
- }), E(
285
+ }, o);
286
+ return n({
287
+ clear: c,
288
+ inputTextRef: s
289
+ }), T(
290
290
  () => t.modelValue,
291
- (s) => {
292
- s === void 0 && (g.value = void 0);
291
+ (a) => {
292
+ a === void 0 && (g.value = void 0);
293
293
  }
294
- ), (s, b) => (i(), w("div", {
295
- class: L([s.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox"])
294
+ ), (a, b) => (u(), w("div", {
295
+ class: E([a.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox"])
296
296
  }, [
297
- u("div", {
298
- class: L([
299
- s.layout === "popover" ? "flex-1 overflow-y-auto p-2" : "",
300
- s.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
297
+ d("div", {
298
+ class: E([
299
+ a.layout === "popover" ? "flex-1 overflow-y-auto p-2" : "",
300
+ a.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
301
301
  ])
302
302
  }, [
303
- (i(!0), w(U, null, X(e(p), (h) => (i(), I(he, {
304
- layout: s.layout,
305
- key: h[e(f)],
303
+ (u(!0), w(U, null, X(e(p), (h) => (u(), I(he, {
304
+ layout: a.layout,
305
+ key: h[e(i)],
306
306
  count: h.count,
307
- label: h[e(C)],
307
+ label: h[e(V)],
308
308
  color: h.color,
309
309
  type: "radio",
310
- value: h[e(f)],
311
- "is-selected": e(n)(h),
310
+ value: h[e(i)],
311
+ "is-selected": e(r)(h),
312
312
  onItemClick: (K) => e(x)(h)
313
313
  }, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 128))
314
314
  ], 2),
315
- s.type === "select" && e(p).length === 0 && !e(c) ? (i(), w("div", xt, [
316
- u("div", wt, [
317
- Q(we),
318
- b[4] || (b[4] = u("div", { class: "max-w-sm mx-auto mt-6" }, [
319
- u("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
320
- u("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
315
+ a.type === "select" && e(p).length === 0 && !e(f) ? (u(), w("div", xt, [
316
+ d("div", wt, [
317
+ q(we),
318
+ b[4] || (b[4] = d("div", { class: "max-w-sm mx-auto mt-6" }, [
319
+ d("p", { class: "font-medium text-gray-800 dark:text-neutral-200" }, "За вашим запитом нічого не знайдено"),
320
+ d("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" })
321
321
  ], -1))
322
322
  ])
323
- ])) : _("", !0),
324
- s.layout !== "popover" && s.type !== "select" ? (i(), w(U, { key: 1 }, [
325
- !e(k) && e(V) ? (i(), w("div", {
323
+ ])) : C("", !0),
324
+ a.layout !== "popover" && a.type !== "select" ? (u(), w(U, { key: 1 }, [
325
+ !e(k) && e(_) ? (u(), w("div", {
326
326
  key: 0,
327
327
  onClick: b[0] || (b[0] = //@ts-ignore
328
328
  (...h) => e(v) && e(v)(...h)),
329
329
  class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
330
330
  }, [
331
- b[5] || (b[5] = G(" Показати більше ", -1)),
332
- Q(ve)
333
- ])) : _("", !0),
334
- e(k) ? (i(), w("div", {
331
+ b[5] || (b[5] = Q(" Показати більше ", -1)),
332
+ q(ve)
333
+ ])) : C("", !0),
334
+ e(k) ? (u(), w("div", {
335
335
  key: 1,
336
336
  onClick: b[1] || (b[1] = //@ts-ignore
337
337
  (...h) => e(v) && e(v)(...h)),
338
338
  class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
339
339
  }, [
340
- b[6] || (b[6] = G(" Показати менше ", -1)),
341
- Q(ke)
342
- ])) : _("", !0)
343
- ], 64)) : _("", !0),
344
- s.cleanable ? (i(), w(U, { key: 2 }, [
345
- s.layout === "inline" ? (i(), w("div", kt, [
346
- G(S(e(g) || e(g) === null ? 1 : 0) + " з " + S(e(r).length) + " обрано ", 1),
347
- W(u("button", {
340
+ b[6] || (b[6] = Q(" Показати менше ", -1)),
341
+ q(ke)
342
+ ])) : C("", !0)
343
+ ], 64)) : C("", !0),
344
+ a.cleanable ? (u(), w(U, { key: 2 }, [
345
+ a.layout === "inline" ? (u(), w("div", kt, [
346
+ Q(B(e(g) || e(g) === null ? 1 : 0) + " з " + B(e(l).length) + " обрано ", 1),
347
+ H(d("button", {
348
348
  class: "text-gray-600 hover:text-gray-800",
349
349
  onClick: b[2] || (b[2] = //@ts-ignore
350
- (...h) => e(d) && e(d)(...h))
350
+ (...h) => e(c) && e(c)(...h))
351
351
  }, " Очистити ", 512), [
352
352
  [Z, e(g) !== "" && e(g) !== void 0]
353
353
  ])
354
- ])) : _("", !0),
355
- s.layout === "popover" ? (i(), w("div", Ct, [
356
- u("span", null, S(e(g) || e(g) === null ? 1 : 0) + " з " + S(e(r).length) + " обрано", 1),
357
- W(u("button", {
354
+ ])) : C("", !0),
355
+ a.layout === "popover" ? (u(), w("div", Ct, [
356
+ d("span", null, B(e(g) || e(g) === null ? 1 : 0) + " з " + B(e(l).length) + " обрано", 1),
357
+ H(d("button", {
358
358
  class: "text-gray-600 hover:text-gray-800",
359
359
  onClick: b[3] || (b[3] = //@ts-ignore
360
- (...h) => e(d) && e(d)(...h))
360
+ (...h) => e(c) && e(c)(...h))
361
361
  }, " Очистити ", 512), [
362
362
  [Z, e(g) !== "" && e(g) !== void 0]
363
363
  ])
364
- ])) : _("", !0)
365
- ], 64)) : _("", !0)
364
+ ])) : C("", !0)
365
+ ], 64)) : C("", !0)
366
366
  ], 2));
367
367
  }
368
368
  });
369
- function Me(m, o) {
369
+ function Me(m, n) {
370
370
  const {
371
371
  options: y = [],
372
372
  limit: t = 20
373
373
  } = m;
374
- function a(b) {
374
+ function s(b) {
375
375
  return Array.isArray(b) ? b : b ? [b] : [];
376
376
  }
377
- const l = A(a(m.modelValue)), g = A(""), p = A(!1), n = A([]), x = A("id"), d = A("text"), v = A(!1), c = A(m.layout !== "popover" && y.length > t);
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
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
380
  return { autoValueKey: K, autoLabelKey: M };
381
381
  }
382
382
  if (y.length > 0) {
383
383
  const b = k(y);
384
- x.value = b.autoValueKey, d.value = b.autoLabelKey;
384
+ x.value = b.autoValueKey, c.value = b.autoLabelKey;
385
385
  }
386
- const V = O(() => {
387
- const b = n.value;
386
+ const _ = O(() => {
387
+ const b = r.value;
388
388
  return m.layout === "popover" || v.value ? b : b.slice(0, t);
389
389
  });
390
- E(() => m.modelValue, (b) => {
391
- l.value = a(b);
392
- }, { immediate: !0 }), n.value = [...y].sort((b, h) => m.sort === "count" ? h.count && b.count ? h.count - b.count : 0 : m.sort === "name" ? String(b[d.value]).localeCompare(String(h[d.value])) : 0);
393
- function C(b) {
394
- return l.value && l.value.includes(b[x.value]);
390
+ T(() => m.modelValue, (b) => {
391
+ o.value = s(b);
392
+ }, { immediate: !0 }), r.value = [...y].sort((b, h) => m.sort === "count" ? h.count && b.count ? h.count - b.count : 0 : m.sort === "name" ? String(b[c.value]).localeCompare(String(h[c.value])) : 0);
393
+ function V(b) {
394
+ return o.value && o.value.includes(b[x.value]);
395
395
  }
396
- function f(b) {
397
- const h = l.value.includes(b[x.value]);
398
- l.value = h ? l.value.filter((K) => K !== b[x.value]) : [...l.value, b[x.value]], o("update:modelValue", l.value), o("change", { name: m.name, value: l.value });
396
+ function i(b) {
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 });
399
399
  }
400
- function r() {
401
- l.value = [], o("update:modelValue", l.value), o("clear", m.name);
400
+ function l() {
401
+ o.value = [], n("update:modelValue", o.value), n("clear", m.name);
402
402
  }
403
- function s() {
403
+ function a() {
404
404
  v.value = !v.value;
405
405
  }
406
406
  return {
407
- innerValue: l,
407
+ innerValue: o,
408
408
  searchTerm: g,
409
- filteredOptions: V,
410
- isSelected: C,
411
- selectItem: f,
412
- clear: r,
413
- toggleShowAll: s,
409
+ filteredOptions: _,
410
+ isSelected: V,
411
+ selectItem: i,
412
+ clear: l,
413
+ toggleShowAll: a,
414
414
  isReqProc: p,
415
415
  showAll: v,
416
- isEnableShowAll: c,
417
- labelKey: d,
416
+ isEnableShowAll: f,
417
+ labelKey: c,
418
418
  valueKey: x,
419
- allOptions: n
419
+ allOptions: r
420
420
  };
421
421
  }
422
422
  const Se = {
@@ -431,6 +431,8 @@ const Se = {
431
431
  period: "Period",
432
432
  today: "Today",
433
433
  week: "Week",
434
+ max: "max",
435
+ min: "min",
434
436
  month: "Month",
435
437
  quarter: "Quarter",
436
438
  year: "Year",
@@ -450,6 +452,8 @@ const Se = {
450
452
  period: "Період",
451
453
  today: "Сьогодні",
452
454
  week: "Тиждень",
455
+ max: "макс",
456
+ min: "мін",
453
457
  month: "Місяць",
454
458
  quarter: "Квартал",
455
459
  year: "Рік",
@@ -460,15 +464,15 @@ const Se = {
460
464
  }
461
465
  };
462
466
  function Be(m) {
463
- const o = m.split(".")[1], y = typeof window < "u" && window.localStorage ? localStorage.locale : null;
464
- return (Se[y || navigator.language] || Se.uk)[o];
467
+ const n = m.split(".")[1], y = typeof window < "u" && window.localStorage ? localStorage.locale : null;
468
+ return (Se[y || navigator.language] || Se.uk)[n];
465
469
  }
466
- function oe() {
470
+ function le() {
467
471
  const m = Pe();
468
472
  if (!m.appContext.config.globalProperties.$i18n) return Be;
469
- const o = m.appContext.config.globalProperties.$t;
473
+ const n = m.appContext.config.globalProperties.$t;
470
474
  return (y) => {
471
- const t = o(y);
475
+ const t = n(y);
472
476
  return t === y ? Be(y) : t;
473
477
  };
474
478
  }
@@ -481,7 +485,7 @@ const _t = {
481
485
  }, jt = {
482
486
  key: 1,
483
487
  class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
484
- }, je = /* @__PURE__ */ q({
488
+ }, je = /* @__PURE__ */ W({
485
489
  __name: "checkbox",
486
490
  props: {
487
491
  id: {},
@@ -510,102 +514,102 @@ const _t = {
510
514
  itemClass: {}
511
515
  },
512
516
  emits: ["update:modelValue", "change", "clear"],
513
- setup(m, { expose: o, emit: y }) {
514
- const t = oe(), a = m, l = y, {
517
+ setup(m, { expose: n, emit: y }) {
518
+ const t = le(), s = m, o = y, {
515
519
  innerValue: g,
516
520
  filteredOptions: p,
517
- isSelected: n,
521
+ isSelected: r,
518
522
  selectItem: x,
519
- clear: d,
523
+ clear: c,
520
524
  toggleShowAll: v,
521
- isReqProc: c,
525
+ isReqProc: f,
522
526
  showAll: k,
523
- isEnableShowAll: V,
524
- labelKey: C,
525
- valueKey: f,
526
- allOptions: r
527
+ isEnableShowAll: _,
528
+ labelKey: V,
529
+ valueKey: i,
530
+ allOptions: l
527
531
  } = Me({
528
- ...a,
529
- modelValue: a.modelValue
530
- }, l);
531
- return E(
532
- () => a.modelValue,
533
- (s) => {
534
- s === void 0 && (g.value = []);
532
+ ...s,
533
+ modelValue: s.modelValue
534
+ }, o);
535
+ return T(
536
+ () => s.modelValue,
537
+ (a) => {
538
+ a === void 0 && (g.value = []);
535
539
  }
536
- ), o({
537
- clear: d
538
- }), (s, b) => (i(), w("div", {
539
- class: L([s.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
540
+ ), n({
541
+ clear: c
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"])
540
544
  }, [
541
- u("div", {
542
- class: L([
543
- s.layout === "popover" ? "flex-1 overflow-y-auto p-2" : "",
544
- s.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
545
+ d("div", {
546
+ class: E([
547
+ a.layout === "popover" ? "flex-1 overflow-y-auto p-2" : "",
548
+ a.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
545
549
  ])
546
550
  }, [
547
- (i(!0), w(U, null, X(e(p), (h) => (i(), I(he, {
548
- layout: s.layout,
551
+ (u(!0), w(U, null, X(e(p), (h) => (u(), I(he, {
552
+ layout: a.layout,
549
553
  count: h.count,
550
- label: h[e(C)],
554
+ label: h[e(V)],
551
555
  color: h.color,
552
556
  type: "checkbox",
553
- value: h[e(f)],
554
- "is-selected": e(n)(h),
557
+ value: h[e(i)],
558
+ "is-selected": e(r)(h),
555
559
  onItemClick: (K) => e(x)(h)
556
560
  }, null, 8, ["layout", "count", "label", "color", "value", "is-selected", "onItemClick"]))), 256))
557
561
  ], 2),
558
- s.type === "select" && e(p).length === 0 && !e(c) ? (i(), w("div", _t, [
559
- u("div", $t, [
560
- Q(we),
561
- u("div", At, [
562
- u("p", St, S(e(t)("filter.notfound")), 1),
563
- b[4] || (b[4] = u("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" }, null, -1))
562
+ a.type === "select" && e(p).length === 0 && !e(f) ? (u(), w("div", _t, [
563
+ d("div", $t, [
564
+ q(we),
565
+ d("div", At, [
566
+ d("p", St, B(e(t)("filter.notfound")), 1),
567
+ b[4] || (b[4] = d("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" }, null, -1))
564
568
  ])
565
569
  ])
566
- ])) : _("", !0),
567
- s.layout !== "popover" && s.type !== "select" ? (i(), w(U, { key: 1 }, [
568
- !e(k) && e(V) ? (i(), w("div", {
570
+ ])) : C("", !0),
571
+ a.layout !== "popover" && a.type !== "select" ? (u(), w(U, { key: 1 }, [
572
+ !e(k) && e(_) ? (u(), w("div", {
569
573
  key: 0,
570
574
  onClick: b[0] || (b[0] = //@ts-ignore
571
575
  (...h) => e(v) && e(v)(...h)),
572
576
  class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
573
577
  }, [
574
- G(S(e(t)("filter.more")) + " ", 1),
575
- Q(ve)
576
- ])) : _("", !0),
577
- e(k) ? (i(), w("div", {
578
+ Q(B(e(t)("filter.more")) + " ", 1),
579
+ q(ve)
580
+ ])) : C("", !0),
581
+ e(k) ? (u(), w("div", {
578
582
  key: 1,
579
583
  onClick: b[1] || (b[1] = //@ts-ignore
580
584
  (...h) => e(v) && e(v)(...h)),
581
585
  class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
582
586
  }, [
583
- G(S(e(t)("filter.less")) + " ", 1),
584
- Q(ke)
585
- ])) : _("", !0)
586
- ], 64)) : _("", !0),
587
- s.cleanable ? (i(), w(U, { key: 2 }, [
588
- s.layout === "inline" ? (i(), w("div", Bt, [
589
- G(S(e(g).length) + " / " + S(e(r).length) + " " + S(e(t)("filter.selected")) + " ", 1),
590
- W(u("button", {
587
+ Q(B(e(t)("filter.less")) + " ", 1),
588
+ q(ke)
589
+ ])) : C("", !0)
590
+ ], 64)) : C("", !0),
591
+ a.cleanable ? (u(), w(U, { key: 2 }, [
592
+ a.layout === "inline" ? (u(), w("div", Bt, [
593
+ Q(B(e(g).length) + " / " + B(e(l).length) + " " + B(e(t)("filter.selected")) + " ", 1),
594
+ H(d("button", {
591
595
  class: "text-gray-600 hover:text-gray-800",
592
596
  onClick: b[2] || (b[2] = //@ts-ignore
593
- (...h) => e(d) && e(d)(...h))
594
- }, S(e(t)("filter.clear")), 513), [
597
+ (...h) => e(c) && e(c)(...h))
598
+ }, B(e(t)("filter.clear")), 513), [
595
599
  [Z, e(g).length !== 0]
596
600
  ])
597
- ])) : _("", !0),
598
- s.layout === "popover" ? (i(), w("div", jt, [
599
- u("span", null, S(e(g).length) + " / " + S(e(r).length) + " " + S(e(t)("filter.selected")), 1),
600
- W(u("button", {
601
+ ])) : C("", !0),
602
+ a.layout === "popover" ? (u(), w("div", jt, [
603
+ d("span", null, B(e(g).length) + " / " + B(e(l).length) + " " + B(e(t)("filter.selected")), 1),
604
+ H(d("button", {
601
605
  class: "text-gray-600 hover:text-gray-800",
602
606
  onClick: b[3] || (b[3] = //@ts-ignore
603
- (...h) => e(d) && e(d)(...h))
604
- }, S(e(t)("filter.clear")), 513), [
607
+ (...h) => e(c) && e(c)(...h))
608
+ }, B(e(t)("filter.clear")), 513), [
605
609
  [Z, e(g).length !== 0]
606
610
  ])
607
- ])) : _("", !0)
608
- ], 64)) : _("", !0)
611
+ ])) : C("", !0)
612
+ ], 64)) : C("", !0)
609
613
  ], 2));
610
614
  }
611
615
  }), Dt = {}, Rt = {
@@ -620,18 +624,18 @@ const _t = {
620
624
  "stroke-linejoin": "round",
621
625
  class: "icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"
622
626
  };
623
- function Ft(m, o) {
624
- return i(), w("svg", Rt, o[0] || (o[0] = [
625
- u("path", {
627
+ function Ft(m, n) {
628
+ return u(), w("svg", Rt, n[0] || (n[0] = [
629
+ d("path", {
626
630
  stroke: "none",
627
631
  d: "M0 0h24v24H0z",
628
632
  fill: "none"
629
633
  }, null, -1),
630
- u("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }, null, -1),
631
- u("path", { d: "M21 21l-6 -6" }, null, -1)
634
+ d("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" }, null, -1),
635
+ d("path", { d: "M21 21l-6 -6" }, null, -1)
632
636
  ]));
633
637
  }
634
- const Le = /* @__PURE__ */ te(Dt, [["render", Ft]]), Kt = {}, Mt = {
638
+ const Le = /* @__PURE__ */ ee(Dt, [["render", Ft]]), Kt = {}, Mt = {
635
639
  xmlns: "http://www.w3.org/2000/svg",
636
640
  viewBox: "0 0 24 24",
637
641
  fill: "none",
@@ -643,24 +647,24 @@ const Le = /* @__PURE__ */ te(Dt, [["render", Ft]]), Kt = {}, Mt = {
643
647
  width: "15px",
644
648
  height: "15px"
645
649
  };
646
- function Lt(m, o) {
647
- return i(), w("svg", Mt, o[0] || (o[0] = [
648
- u("path", {
650
+ function Lt(m, n) {
651
+ return u(), w("svg", Mt, n[0] || (n[0] = [
652
+ d("path", {
649
653
  stroke: "none",
650
654
  d: "M0 0h24v24H0z",
651
655
  fill: "none"
652
656
  }, null, -1),
653
- u("path", { d: "M18 6l-12 12" }, null, -1),
654
- u("path", { d: "M6 6l12 12" }, null, -1)
657
+ d("path", { d: "M18 6l-12 12" }, null, -1),
658
+ d("path", { d: "M6 6l12 12" }, null, -1)
655
659
  ]));
656
660
  }
657
- const Ce = /* @__PURE__ */ te(Kt, [["render", Lt]]);
658
- class Oe {
659
- static getWidthClass(o) {
660
- return typeof o == "number" ? `max-w-[${o}px] min-w-[${o}px]` : typeof o == "string" ? o.endsWith("%") || o.endsWith("px") ? `max-w-[${o}]` : `max-w-${o}` : "w-full";
661
+ const Ce = /* @__PURE__ */ ee(Kt, [["render", Lt]]);
662
+ class Ee {
663
+ static getWidthClass(n) {
664
+ return typeof n == "number" ? `max-w-[${n}px] min-w-[${n}px]` : typeof n == "string" ? n.endsWith("%") || n.endsWith("px") ? `max-w-[${n}]` : `max-w-${n}` : "w-full";
661
665
  }
662
666
  }
663
- const Ot = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3" }, Et = ["placeholder"], Tt = /* @__PURE__ */ q({
667
+ const Et = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3" }, Ot = ["placeholder"], Tt = /* @__PURE__ */ W({
664
668
  __name: "text-input",
665
669
  props: {
666
670
  id: {},
@@ -689,56 +693,56 @@ const Ot = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3"
689
693
  itemClass: {}
690
694
  },
691
695
  emits: ["update:modelValue", "change", "clear"],
692
- setup(m, { emit: o }) {
693
- const y = m, t = A((y.placeholder || y.label || y.title || y.name || "search").toString()), a = o, l = A(y.modelValue?.toString() ?? "");
694
- E(
696
+ setup(m, { emit: n }) {
697
+ const y = m, t = A((y.placeholder || y.label || y.title || y.name || "search").toString()), s = n, o = A(y.modelValue?.toString() ?? "");
698
+ T(
695
699
  () => y.modelValue,
696
700
  (x) => {
697
- x !== l.value && (l.value = x?.toString() ?? "");
701
+ x !== o.value && (o.value = x?.toString() ?? "");
698
702
  }
699
703
  );
700
704
  let g = null;
701
705
  function p() {
702
- if (l.value = l.value.trimStart(), l.value.length === 0) {
703
- n();
706
+ if (o.value = o.value.trimStart(), o.value.length === 0) {
707
+ r();
704
708
  return;
705
709
  }
706
710
  g && clearTimeout(g), g = setTimeout(() => {
707
- a("update:modelValue", l.value), a("change", { name: y.name, value: l.value });
711
+ s("update:modelValue", o.value), s("change", { name: y.name, value: o.value });
708
712
  }, 300);
709
713
  }
710
- function n() {
711
- l.value = "", a("update:modelValue", ""), a("clear", y.name);
714
+ function r() {
715
+ o.value = "", s("update:modelValue", ""), s("clear", y.name);
712
716
  }
713
- return (x, d) => (i(), w("div", {
714
- class: L([
717
+ return (x, c) => (u(), w("div", {
718
+ class: E([
715
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",
716
- x.layout === "inline" ? e(Oe).getWidthClass(x.width) : "mb-2" + (x.layout === "popover" ? " m-2" : "")
720
+ x.layout === "inline" ? e(Ee).getWidthClass(x.width) : "mb-2" + (x.layout === "popover" ? " m-2" : "")
717
721
  ])
718
722
  }, [
719
- u("div", Ot, [
720
- Q(Le)
723
+ d("div", Et, [
724
+ q(Le)
721
725
  ]),
722
- l.value !== "" ? (i(), w("div", {
726
+ o.value !== "" ? (u(), w("div", {
723
727
  key: 0,
724
- onClick: n,
728
+ onClick: r,
725
729
  class: "absolute bottom-2/4 translate-y-2/4 right-3 cursor-pointer"
726
730
  }, [
727
- Q(Ce)
728
- ])) : _("", !0),
729
- W(u("input", {
731
+ q(Ce)
732
+ ])) : C("", !0),
733
+ H(d("input", {
730
734
  type: "text",
731
- "onUpdate:modelValue": d[0] || (d[0] = (v) => l.value = v),
735
+ "onUpdate:modelValue": c[0] || (c[0] = (v) => o.value = v),
732
736
  onInput: p,
733
737
  placeholder: t.value,
734
738
  class: "!pr-7 !pl-8 bg-white h-[38px] min-w-[100px] text-sm py-2 px-3 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-sm text-sm text-stone-800 placeholder:text-stone-400 focus:border-2 focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"
735
- }, null, 40, Et), [
736
- [ee, l.value]
739
+ }, null, 40, Ot), [
740
+ [ae, o.value]
737
741
  ])
738
742
  ], 2));
739
743
  }
740
744
  });
741
- function Ee(m = { color: "blue" }) {
745
+ function Oe(m = { color: "blue" }) {
742
746
  return O(() => {
743
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
744
748
  text-gray-800 bg-white dark:text-neutral-300 dark:bg-neutral-800 dark:border-neutral-600`;
@@ -764,7 +768,7 @@ const zt = {
764
768
  key: 0,
765
769
  class: "block text-xs font-medium text-gray-600 mb-1"
766
770
  }, Wt = ["placeholder", "disabled"], qt = ["disabled"];
767
- const Qt = /* @__PURE__ */ q({
771
+ const Ht = /* @__PURE__ */ W({
768
772
  __name: "range-input",
769
773
  props: {
770
774
  id: {},
@@ -793,206 +797,206 @@ const Qt = /* @__PURE__ */ q({
793
797
  itemClass: {}
794
798
  },
795
799
  emits: ["update:modelValue", "change", "clear"],
796
- setup(m, { expose: o, emit: y }) {
797
- const t = Ee(), a = It(), l = oe(), g = m, p = A(
800
+ setup(m, { expose: n, emit: y }) {
801
+ const t = Oe(), s = It(), o = le(), g = m, p = A(
798
802
  g.modelValue ?? g.default ?? []
799
- ), n = y, x = O({
803
+ ), r = y, x = O({
800
804
  get: () => g.modelValue ?? p.value,
801
- set: (c) => {
802
- g.modelValue !== void 0 ? n("update:modelValue", c) : p.value = c;
805
+ set: (f) => {
806
+ g.modelValue !== void 0 ? r("update:modelValue", f) : p.value = f;
803
807
  }
804
808
  });
805
- function d() {
806
- n("change", { name: g.name, value: x.value || p.value });
809
+ function c() {
810
+ r("change", { name: g.name, value: x.value || p.value });
807
811
  }
808
812
  function v() {
809
- p.value = [], x.value = p.value, n("clear", g.name);
813
+ p.value = [], x.value = p.value, r("clear", g.name);
810
814
  }
811
- return E(() => g.modelValue, (c) => {
812
- c !== void 0 && g.layout !== "popover" ? (p.value = c, n("update:modelValue", c)) : p.value = [];
813
- }), o({
815
+ return T(() => g.modelValue, (f) => {
816
+ f !== void 0 && g.layout !== "popover" ? (p.value = f, r("update:modelValue", f)) : p.value = [];
817
+ }), n({
814
818
  clear: v,
815
819
  currentValue: x
816
- }), (c, k) => (i(), w(U, null, [
817
- u("div", null, [
818
- u("div", {
819
- class: L(c.layout === "vertical" ? "inline-flex items-center gap-2" : "space-y-3 p-2")
820
+ }), (f, k) => (u(), w(U, null, [
821
+ d("div", null, [
822
+ d("div", {
823
+ class: E(f.layout === "vertical" ? "inline-flex items-center gap-2" : "space-y-3 p-2")
820
824
  }, [
821
- u("div", null, [
822
- c.layout !== "vertical" ? (i(), w("label", zt, S(e(l)("filter.from")), 1)) : _("", !0),
823
- W(u("input", {
825
+ d("div", null, [
826
+ f.layout !== "vertical" ? (u(), w("label", zt, B(e(o)("filter.from")), 1)) : C("", !0),
827
+ H(d("input", {
824
828
  type: "number",
825
- class: L(e(t)),
826
- placeholder: c.placeholder?.[0] ?? "min",
829
+ class: E(e(t)),
830
+ placeholder: f.placeholder?.[0] ?? e(o)("filter.min"),
827
831
  step: "1",
828
832
  style: { outline: "none" },
829
- "onUpdate:modelValue": k[0] || (k[0] = (V) => x.value[0] = V),
830
- disabled: c.disabled
833
+ "onUpdate:modelValue": k[0] || (k[0] = (_) => x.value[0] = _),
834
+ disabled: f.disabled
831
835
  }, null, 10, Nt), [
832
- [ee, x.value[0]]
836
+ [ae, x.value[0]]
833
837
  ])
834
838
  ]),
835
- c.layout === "vertical" ? (i(), w("label", Pt, " - ")) : _("", !0),
836
- u("div", null, [
837
- c.layout !== "vertical" ? (i(), w("label", Yt, S(e(l)("filter.to")), 1)) : _("", !0),
838
- W(u("input", {
839
+ f.layout === "vertical" ? (u(), w("label", Pt, " - ")) : C("", !0),
840
+ d("div", null, [
841
+ f.layout !== "vertical" ? (u(), w("label", Yt, B(e(o)("filter.to")), 1)) : C("", !0),
842
+ H(d("input", {
839
843
  type: "number",
840
- class: L(e(t)),
841
- placeholder: c.placeholder?.[1] ?? "max",
844
+ class: E(e(t)),
845
+ placeholder: f.placeholder?.[1] ?? e(o)("filter.max"),
842
846
  min: "0",
843
847
  max: "1000000000000000",
844
848
  step: "1",
845
849
  style: { outline: "none" },
846
- "onUpdate:modelValue": k[1] || (k[1] = (V) => x.value[1] = V),
847
- disabled: c.disabled
850
+ "onUpdate:modelValue": k[1] || (k[1] = (_) => x.value[1] = _),
851
+ disabled: f.disabled
848
852
  }, null, 10, Wt), [
849
- [ee, x.value[1]]
853
+ [ae, x.value[1]]
850
854
  ])
851
855
  ]),
852
- ["popover", "inline", "vertical"].includes(c.layout) ? (i(), w("button", {
856
+ ["popover", "inline", "vertical"].includes(f.layout) ? (u(), w("button", {
853
857
  key: 1,
854
- onClick: d,
855
- class: L(e(a) + (c.layout === "vertical" ? " w-[50px]" : " bg-blue-100 hover:bg-blue-200"))
856
- }, S(c.layout === "vertical" ? "Ok" : e(l)("filter.apply")), 3)) : _("", !0),
857
- ["popover", "inline"].includes(c.layout) ? (i(), w("button", {
858
+ onClick: c,
859
+ class: E(e(s) + (f.layout === "vertical" ? " w-[50px]" : " bg-blue-100 hover:bg-blue-200"))
860
+ }, B(f.layout === "vertical" ? "Ok" : e(o)("filter.apply")), 3)) : C("", !0),
861
+ ["popover", "inline"].includes(f.layout) ? (u(), w("button", {
858
862
  key: 2,
859
863
  disabled: !(x.value[0] || x.value[1]),
860
864
  onClick: v,
861
- class: L(e(a) + " hover:bg-gray-100")
862
- }, S(e(l)("filter.clear")), 11, qt)) : _("", !0)
865
+ class: E(e(s) + " hover:bg-gray-100")
866
+ }, B(e(o)("filter.clear")), 11, qt)) : C("", !0)
863
867
  ], 2)
864
868
  ]),
865
- (c.cleanable && p.value.length, _("", !0))
869
+ (f.cleanable && p.value.length, C("", !0))
866
870
  ], 64));
867
871
  }
868
872
  });
869
- class H {
870
- static format(o) {
871
- const y = o.getFullYear(), t = (o.getMonth() + 1).toString().padStart(2, "0"), a = o.getDate().toString().padStart(2, "0");
872
- return `${y}-${t}-${a}`;
873
+ class G {
874
+ static format(n) {
875
+ const y = n.getFullYear(), t = (n.getMonth() + 1).toString().padStart(2, "0"), s = n.getDate().toString().padStart(2, "0");
876
+ return `${y}-${t}-${s}`;
873
877
  }
874
- static getShiftedDay(o, y = 0) {
875
- const t = o ? new Date(o) : /* @__PURE__ */ new Date();
878
+ static getShiftedDay(n, y = 0) {
879
+ const t = n ? new Date(n) : /* @__PURE__ */ new Date();
876
880
  return t.setDate(t.getDate() + y), this.format(t);
877
881
  }
878
- static getLastWeekRange(o, y, t = 0) {
879
- if (o && y) {
880
- const x = new Date(o), d = new Date(y);
881
- return x.setDate(x.getDate() + t * 7), d.setDate(d.getDate() + t * 7), [this.format(x), this.format(d)];
882
+ static getLastWeekRange(n, y, t = 0) {
883
+ if (n && y) {
884
+ const x = new Date(n), c = new Date(y);
885
+ return x.setDate(x.getDate() + t * 7), c.setDate(c.getDate() + t * 7), [this.format(x), this.format(c)];
882
886
  }
883
- const a = /* @__PURE__ */ new Date(), l = a.getDay(), g = l === 0 ? 13 : l - 1 + 7, p = new Date(a);
884
- p.setDate(a.getDate() - g + t * 7);
885
- const n = new Date(p);
886
- return n.setDate(p.getDate() + 6), [this.format(p), this.format(n)];
887
- }
888
- static getMonthRange(o, y, t = 0) {
889
- let a;
890
- o ? a = new Date(o) : a = /* @__PURE__ */ new Date(), a = new Date(a.getFullYear(), a.getMonth() + t, 1);
891
- const l = a, g = new Date(a.getFullYear(), a.getMonth() + 1, 0);
892
- return [this.format(l), this.format(g)];
893
- }
894
- static getQuarterRange(o, y, t = 0) {
895
- const a = o || y, l = a ? new Date(a) : /* @__PURE__ */ new Date();
896
- let g = Math.floor(l.getMonth() / 3);
887
+ const s = /* @__PURE__ */ new Date(), o = s.getDay(), g = o === 0 ? 13 : o - 1 + 7, p = new Date(s);
888
+ p.setDate(s.getDate() - g + t * 7);
889
+ const r = new Date(p);
890
+ return r.setDate(p.getDate() + 6), [this.format(p), this.format(r)];
891
+ }
892
+ static getMonthRange(n, y, t = 0) {
893
+ let s;
894
+ n ? s = new Date(n) : s = /* @__PURE__ */ new Date(), s = new Date(s.getFullYear(), s.getMonth() + t, 1);
895
+ const o = s, g = new Date(s.getFullYear(), s.getMonth() + 1, 0);
896
+ return [this.format(o), this.format(g)];
897
+ }
898
+ static getQuarterRange(n, y, t = 0) {
899
+ const s = n || y, o = s ? new Date(s) : /* @__PURE__ */ new Date();
900
+ let g = Math.floor(o.getMonth() / 3);
897
901
  g += t;
898
- const p = (g % 4 + 4) % 4 * 3, n = l.getFullYear() + Math.floor(g / 4), x = new Date(n, p, 1), d = new Date(n, p + 3, 0);
899
- return [this.format(x), this.format(d)];
902
+ const p = (g % 4 + 4) % 4 * 3, r = o.getFullYear() + Math.floor(g / 4), x = new Date(r, p, 1), c = new Date(r, p + 3, 0);
903
+ return [this.format(x), this.format(c)];
900
904
  }
901
- static getYear(o, y = 0) {
905
+ static getYear(n, y = 0) {
902
906
  let t;
903
- return o && /^\d{4}$/.test(o) ? t = parseInt(o, 10) : o ? t = new Date(o).getFullYear() : t = (/* @__PURE__ */ new Date()).getFullYear(), String(t + y);
907
+ return n && /^\d{4}$/.test(n) ? t = parseInt(n, 10) : n ? t = new Date(n).getFullYear() : t = (/* @__PURE__ */ new Date()).getFullYear(), String(t + y);
904
908
  }
905
- static getYearRange(o, y = 0) {
909
+ static getYearRange(n, y = 0) {
906
910
  let t;
907
- return o && /^\d{4}$/.test(o) ? t = parseInt(o, 10) : o ? t = new Date(o).getFullYear() : t = (/* @__PURE__ */ new Date()).getFullYear(), [
911
+ return n && /^\d{4}$/.test(n) ? t = parseInt(n, 10) : n ? t = new Date(n).getFullYear() : t = (/* @__PURE__ */ new Date()).getFullYear(), [
908
912
  this.format(new Date(t + y, 0, 1)),
909
913
  this.format(new Date(t + y + 1, 0, 0))
910
914
  ];
911
915
  }
912
- static getRangeFromDaysBefore(o) {
916
+ static getRangeFromDaysBefore(n) {
913
917
  const y = /* @__PURE__ */ new Date(), t = new Date(y.getTime());
914
- return t.setDate(y.getDate() - o), [this.format(t), this.format(y)];
918
+ return t.setDate(y.getDate() - n), [this.format(t), this.format(y)];
915
919
  }
916
920
  }
917
- function Ie(m, o) {
921
+ function Ie(m, n) {
918
922
  const {
919
923
  popoverRef: y
920
- } = m, t = oe(), a = A(""), l = A(
924
+ } = m, t = le(), s = A(""), o = A(
921
925
  m.modelValue ?? m.default ?? []
922
926
  ), g = A(0);
923
927
  function p() {
924
- const r = H.getRangeFromDaysBefore(g.value);
925
- return l.value = [...r], o("change", { name: m.name, value: l.value }), o("update:modelValue", l.value), r;
928
+ const l = G.getRangeFromDaysBefore(g.value);
929
+ return o.value = [...l], n("change", { name: m.name, value: o.value }), n("update:modelValue", o.value), l;
926
930
  }
927
- function n(r) {
928
- a.value = r, y.value?.close();
929
- const s = [];
930
- switch (a.value) {
931
+ function r(l) {
932
+ s.value = l, y.value?.close();
933
+ const a = [];
934
+ switch (s.value) {
931
935
  case "today":
932
- s.push(H.getShiftedDay()), s.push(H.getShiftedDay());
936
+ a.push(G.getShiftedDay()), a.push(G.getShiftedDay());
933
937
  break;
934
938
  case "week":
935
- s.push(...H.getLastWeekRange());
939
+ a.push(...G.getLastWeekRange());
936
940
  break;
937
941
  case "month":
938
- s.push(...H.getMonthRange());
942
+ a.push(...G.getMonthRange());
939
943
  break;
940
944
  case "quarter":
941
- s.push(...H.getQuarterRange());
945
+ a.push(...G.getQuarterRange());
942
946
  break;
943
947
  case "year":
944
- s.push(...H.getYearRange());
948
+ a.push(...G.getYearRange());
945
949
  break;
946
950
  case "last_7_days":
947
951
  g.value = 7, p();
948
952
  break;
949
953
  case "range":
950
- g.value = 7, s.push(...p());
954
+ g.value = 7, a.push(...p());
951
955
  break;
952
956
  }
953
- l.value = [...s], o("change", { name: m.name, value: l.value }), o("update:modelValue", l.value);
957
+ o.value = [...a], n("change", { name: m.name, value: o.value }), n("update:modelValue", o.value);
954
958
  }
955
959
  function x() {
956
- const r = [];
957
- switch (a.value) {
960
+ const l = [];
961
+ switch (s.value) {
958
962
  case "today":
959
- r.push(H.getShiftedDay(l.value[0], 1));
963
+ l.push(G.getShiftedDay(o.value[0], 1));
960
964
  break;
961
965
  case "week":
962
- r.push(...H.getLastWeekRange(l.value[0], l.value[1], 1));
966
+ l.push(...G.getLastWeekRange(o.value[0], o.value[1], 1));
963
967
  break;
964
968
  case "month":
965
- r.push(...H.getMonthRange(l.value[0], l.value[1], 1));
969
+ l.push(...G.getMonthRange(o.value[0], o.value[1], 1));
966
970
  break;
967
971
  case "quarter":
968
- r.push(...H.getQuarterRange(l.value[0], l.value[1], 1));
972
+ l.push(...G.getQuarterRange(o.value[0], o.value[1], 1));
969
973
  break;
970
974
  case "year":
971
- r.push(...H.getYearRange(l.value[0], 1));
975
+ l.push(...G.getYearRange(o.value[0], 1));
972
976
  break;
973
977
  }
974
- l.value = [...r], o("change", { name: m.name, value: l.value }), o("update:modelValue", l.value);
978
+ o.value = [...l], n("change", { name: m.name, value: o.value }), n("update:modelValue", o.value);
975
979
  }
976
- function d() {
977
- const r = [];
978
- switch (a.value) {
980
+ function c() {
981
+ const l = [];
982
+ switch (s.value) {
979
983
  case "today":
980
- r.push(H.getShiftedDay(l.value[0], -1));
984
+ l.push(G.getShiftedDay(o.value[0], -1));
981
985
  break;
982
986
  case "week":
983
- r.push(...H.getLastWeekRange(l.value[0], l.value[1], -1));
987
+ l.push(...G.getLastWeekRange(o.value[0], o.value[1], -1));
984
988
  break;
985
989
  case "month":
986
- r.push(...H.getMonthRange(l.value[0], l.value[1], -1));
990
+ l.push(...G.getMonthRange(o.value[0], o.value[1], -1));
987
991
  break;
988
992
  case "quarter":
989
- r.push(...H.getQuarterRange(l.value[0], l.value[1], -1));
993
+ l.push(...G.getQuarterRange(o.value[0], o.value[1], -1));
990
994
  break;
991
995
  case "year":
992
- r.push(...H.getYearRange(l.value[0], -1));
996
+ l.push(...G.getYearRange(o.value[0], -1));
993
997
  break;
994
998
  }
995
- l.value = [...r], o("change", { name: m.name, value: l.value }), o("update:modelValue", l.value);
999
+ o.value = [...l], n("change", { name: m.name, value: o.value }), n("update:modelValue", o.value);
996
1000
  }
997
1001
  const v = [
998
1002
  "Січень",
@@ -1008,63 +1012,63 @@ function Ie(m, o) {
1008
1012
  "Листопад",
1009
1013
  "Грудень"
1010
1014
  ];
1011
- function c(r) {
1012
- const [s, b, h] = r.split("-");
1013
- return `${h}.${b}.${s}`;
1015
+ function f(l) {
1016
+ const [a, b, h] = l.split("-");
1017
+ return `${h}.${b}.${a}`;
1014
1018
  }
1015
- function k(r, s = "long") {
1016
- const b = new Date(Date.UTC(2e3, r - 1, 1));
1017
- return new Intl.DateTimeFormat(localStorage.locale, { month: s, timeZone: "UTC" }).format(b);
1019
+ function k(l, a = "long") {
1020
+ const b = new Date(Date.UTC(2e3, l - 1, 1));
1021
+ return new Intl.DateTimeFormat(localStorage.locale, { month: a, timeZone: "UTC" }).format(b);
1018
1022
  }
1019
- function V(r) {
1020
- const { value: s } = l;
1021
- switch (r) {
1023
+ function _(l) {
1024
+ const { value: a } = o;
1025
+ switch (l) {
1022
1026
  case "today":
1023
- return c(s[0]);
1027
+ return f(a[0]);
1024
1028
  case "range":
1025
1029
  return "Період";
1026
1030
  case "week":
1027
- return s[0] && s[1] ? `${c(s[0])} – ${c(s[1])}` : "";
1031
+ return a[0] && a[1] ? `${f(a[0])} – ${f(a[1])}` : "";
1028
1032
  case "quarter":
1029
- if (s[0]) {
1030
- const b = new Date(s[0]), h = b.getFullYear(), K = b.getMonth();
1033
+ if (a[0]) {
1034
+ const b = new Date(a[0]), h = b.getFullYear(), K = b.getMonth();
1031
1035
  return `${Math.floor(K / 3) + 1} ${t("filter.quarter")} ${h}`;
1032
1036
  }
1033
1037
  return "";
1034
1038
  case "month":
1035
- if (s[0]) {
1036
- const [b, h] = s[0].split("-");
1039
+ if (a[0]) {
1040
+ const [b, h] = a[0].split("-");
1037
1041
  return `${k(parseInt(h, 10))} ${b}`;
1038
1042
  }
1039
1043
  return "";
1040
1044
  case "year":
1041
- return s[0] || "";
1045
+ return a[0] || "";
1042
1046
  case "last_7_days":
1043
1047
  return "За останні дні";
1044
1048
  default:
1045
1049
  return m.label ?? "";
1046
1050
  }
1047
1051
  }
1048
- const C = O(() => a.value ? V(a.value) : m.label ?? "");
1049
- function f() {
1050
- a.value = "", l.value = [], o("update:modelValue", []), o("clear", m.name);
1052
+ const V = O(() => s.value ? _(s.value) : m.label ?? "");
1053
+ function i() {
1054
+ s.value = "", o.value = [], n("update:modelValue", []), n("clear", m.name);
1051
1055
  }
1052
1056
  return {
1053
- activeMode: a,
1054
- innerValue: l,
1057
+ activeMode: s,
1058
+ innerValue: o,
1055
1059
  daysBefore: g,
1056
1060
  onDaysBeforeChange: p,
1057
- onSelectChange: n,
1061
+ onSelectChange: r,
1058
1062
  nextClick: x,
1059
- prevClick: d,
1063
+ prevClick: c,
1060
1064
  ukMonths: v,
1061
- formatDisplayDate: c,
1062
- getModeLabel: V,
1063
- currentLabel: C,
1064
- clear: f
1065
+ formatDisplayDate: f,
1066
+ getModeLabel: _,
1067
+ currentLabel: V,
1068
+ clear: i
1065
1069
  };
1066
1070
  }
1067
- const Ht = {
1071
+ const Qt = {
1068
1072
  key: 0,
1069
1073
  class: "relative flex w-full h-auto gap-2 filter-date m-2 flex-wrap"
1070
1074
  }, Gt = {
@@ -1080,7 +1084,7 @@ const Ht = {
1080
1084
  key: 0,
1081
1085
  class: "block text-xs font-medium text-gray-600 mb-1"
1082
1086
  }, ol = ["min", "disabled"], al = { class: "flex gap-1 pt-2" }, nl = ["onClick"];
1083
- const rl = /* @__PURE__ */ q({
1087
+ const rl = /* @__PURE__ */ W({
1084
1088
  __name: "date-input",
1085
1089
  props: {
1086
1090
  id: {},
@@ -1109,213 +1113,214 @@ const rl = /* @__PURE__ */ q({
1109
1113
  itemClass: {}
1110
1114
  },
1111
1115
  emits: ["update:modelValue", "change", "clear"],
1112
- setup(m, { expose: o, emit: y }) {
1113
- const t = m, a = Ee(), l = Ut(), g = oe(), p = y, n = A(null), {
1116
+ setup(m, { expose: n, emit: y }) {
1117
+ const t = m, s = Oe(), o = Ut(), g = le(), p = y, r = A(null), {
1114
1118
  activeMode: x,
1115
- innerValue: d,
1119
+ innerValue: c,
1116
1120
  onSelectChange: v,
1117
- nextClick: c,
1121
+ nextClick: f,
1118
1122
  prevClick: k,
1119
- clear: V
1123
+ clear: _
1120
1124
  } = Ie(
1121
1125
  {
1122
1126
  ...t,
1123
- popoverRef: n
1127
+ popoverRef: r
1124
1128
  },
1125
1129
  p
1126
1130
  );
1127
- return E(
1131
+ return T(
1128
1132
  () => t.modelValue,
1129
- (C) => {
1130
- C !== void 0 ? (d.value = C, p("update:modelValue", C)) : (x.value = "", d.value = []);
1133
+ (V) => {
1134
+ V !== void 0 ? (c.value = V, p("update:modelValue", V)) : (x.value = "", c.value = []);
1131
1135
  }
1132
- ), E(
1133
- d,
1134
- (C) => {
1135
- p("update:modelValue", C), p("change", { name: t.name, value: C });
1136
+ ), T(
1137
+ c,
1138
+ (V) => {
1139
+ p("update:modelValue", V), p("change", { name: t.name, value: V });
1136
1140
  },
1137
1141
  { deep: !0 }
1138
- ), o({
1139
- clear: V,
1140
- popoverRef: n
1141
- }), (C, f) => (i(), w(U, null, [
1142
- C.layout === "inline" ? (i(), w("div", Ht, [
1143
- e(x) !== "" && e(x) === "range" ? (i(), w("div", Gt, [
1144
- W(u("input", {
1142
+ ), n({
1143
+ clear: _,
1144
+ popoverRef: r
1145
+ }), (V, i) => (u(), w(U, null, [
1146
+ V.layout === "inline" ? (u(), w("div", Qt, [
1147
+ e(x) !== "" && e(x) === "range" ? (u(), w("div", Gt, [
1148
+ i[7] || (i[7] = Q(" 1111 ", -1)),
1149
+ H(d("input", {
1145
1150
  type: "date",
1146
- max: e(d)[1],
1151
+ max: e(c)[1],
1147
1152
  locale: "uk-UA",
1148
- "onUpdate:modelValue": f[0] || (f[0] = (r) => e(d)[0] = r),
1153
+ "onUpdate:modelValue": i[0] || (i[0] = (l) => e(c)[0] = l),
1149
1154
  class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-sm focus:outline-blue-600",
1150
- disabled: C.disabled
1155
+ disabled: V.disabled
1151
1156
  }, null, 8, Xt), [
1152
- [ee, e(d)[0]]
1157
+ [ae, e(c)[0]]
1153
1158
  ]),
1154
- W(u("input", {
1159
+ H(d("input", {
1155
1160
  type: "date",
1156
- min: e(d)[0],
1161
+ min: e(c)[0],
1157
1162
  locale: "uk-UA",
1158
- "onUpdate:modelValue": f[1] || (f[1] = (r) => e(d)[1] = r),
1163
+ "onUpdate:modelValue": i[1] || (i[1] = (l) => e(c)[1] = l),
1159
1164
  class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-sm focus:outline-blue-600 appearance-auto",
1160
- disabled: C.disabled
1165
+ disabled: V.disabled
1161
1166
  }, null, 8, Jt), [
1162
- [ee, e(d)[1]]
1167
+ [ae, e(c)[1]]
1163
1168
  ])
1164
- ])) : _("", !0)
1165
- ])) : _("", !0),
1166
- u("div", {
1167
- class: L(C.layout === "popover" ? "space-y-3 p-2" : "flex items-center gap-2")
1169
+ ])) : C("", !0)
1170
+ ])) : C("", !0),
1171
+ d("div", {
1172
+ class: E(V.layout === "popover" ? "space-y-3 p-2" : "flex items-center gap-2")
1168
1173
  }, [
1169
- u("div", {
1170
- class: L(C.layout !== "popover" ? "w-[48%]" : "")
1174
+ d("div", {
1175
+ class: E(V.layout !== "popover" ? "w-[48%]" : "")
1171
1176
  }, [
1172
- C.layout === "popover" ? (i(), w("label", Zt, S(e(g)("filter.from")), 1)) : _("", !0),
1173
- W(u("input", {
1177
+ V.layout === "popover" ? (u(), w("label", Zt, B(e(g)("filter.from")), 1)) : C("", !0),
1178
+ H(d("input", {
1174
1179
  type: "date",
1175
- max: e(d)[1],
1180
+ max: e(c)[1],
1176
1181
  locale: "uk-UA",
1177
- "onUpdate:modelValue": f[2] || (f[2] = (r) => e(d)[0] = r),
1178
- class: L(e(a)),
1179
- disabled: C.disabled
1182
+ "onUpdate:modelValue": i[2] || (i[2] = (l) => e(c)[0] = l),
1183
+ class: E(e(s)),
1184
+ disabled: V.disabled
1180
1185
  }, null, 10, el), [
1181
- [ee, e(d)[0]]
1186
+ [ae, e(c)[0]]
1182
1187
  ])
1183
1188
  ], 2),
1184
- C.layout !== "popover" ? (i(), w("label", tl, " - ")) : _("", !0),
1185
- u("div", {
1186
- class: L(C.layout !== "popover" ? "w-[48%]" : "")
1189
+ V.layout !== "popover" ? (u(), w("label", tl, " - ")) : C("", !0),
1190
+ d("div", {
1191
+ class: E(V.layout !== "popover" ? "w-[48%]" : "")
1187
1192
  }, [
1188
- C.layout === "popover" ? (i(), w("label", ll, S(e(g)("filter.to")), 1)) : _("", !0),
1189
- W(u("input", {
1193
+ V.layout === "popover" ? (u(), w("label", ll, B(e(g)("filter.to")), 1)) : C("", !0),
1194
+ H(d("input", {
1190
1195
  type: "date",
1191
- min: e(d)[0],
1196
+ min: e(c)[0],
1192
1197
  locale: "uk-UA",
1193
- "onUpdate:modelValue": f[3] || (f[3] = (r) => e(d)[1] = r),
1194
- class: L(e(a)),
1195
- disabled: C.disabled
1198
+ "onUpdate:modelValue": i[3] || (i[3] = (l) => e(c)[1] = l),
1199
+ class: E(e(s)),
1200
+ disabled: V.disabled
1196
1201
  }, null, 10, ol), [
1197
- [ee, e(d)[1]]
1202
+ [ae, e(c)[1]]
1198
1203
  ])
1199
1204
  ], 2)
1200
1205
  ], 2),
1201
- u("div", al, [
1202
- (i(), w(U, null, X(["today", "week", "month", "quarter", "year"], (r) => u("button", {
1203
- key: r,
1204
- class: L(e(l) + (e(x) === r ? " bg-blue-100" : "")),
1205
- onClick: (s) => e(v)(r)
1206
- }, S(e(g)("filter." + r)), 11, nl)), 64)),
1207
- u("button", {
1208
- class: L(e(l)),
1209
- onClick: f[4] || (f[4] = //@ts-ignore
1210
- (...r) => e(k) && e(k)(...r))
1206
+ d("div", al, [
1207
+ (u(), w(U, null, X(["today", "week", "month", "quarter", "year"], (l) => d("button", {
1208
+ key: l,
1209
+ class: E(e(o) + (e(x) === l ? " bg-blue-100" : "")),
1210
+ onClick: (a) => e(v)(l)
1211
+ }, B(e(g)("filter." + l)), 11, nl)), 64)),
1212
+ d("button", {
1213
+ class: E(e(o)),
1214
+ onClick: i[4] || (i[4] = //@ts-ignore
1215
+ (...l) => e(k) && e(k)(...l))
1211
1216
  }, "<", 2),
1212
- u("button", {
1213
- class: L(e(l)),
1214
- onClick: f[5] || (f[5] = //@ts-ignore
1215
- (...r) => e(c) && e(c)(...r))
1217
+ d("button", {
1218
+ class: E(e(o)),
1219
+ onClick: i[5] || (i[5] = //@ts-ignore
1220
+ (...l) => e(f) && e(f)(...l))
1216
1221
  }, ">", 2)
1217
1222
  ]),
1218
- (C.cleanable, _("", !0))
1223
+ (V.cleanable, C("", !0))
1219
1224
  ], 64));
1220
1225
  }
1221
1226
  });
1222
- function sl(m, o) {
1227
+ function sl(m, n) {
1223
1228
  const {
1224
1229
  api: y,
1225
1230
  options: t = [],
1226
- limit: a = 20,
1227
- dataKey: l = "data"
1231
+ limit: s = 20,
1232
+ dataKey: o = "data"
1228
1233
  } = m, g = m.multi;
1229
1234
  function p(j) {
1230
1235
  return g ? Array.isArray(j) ? j : j ? [j] : [] : Array.isArray(j) ? j[0] : j;
1231
1236
  }
1232
- const n = A(p(m.modelValue)), x = A(""), d = A(!1), v = A(t), c = A("id"), k = A("text"), V = A(!1), C = A(m.layout !== "popover" && t.length > a), f = A([]), r = A(0);
1233
- function s(j) {
1234
- const T = j.find(Boolean) ?? {}, P = ["id", "value", "code", "key"].find((ie) => ie in T) ?? "id", Y = ["text", "label", "name", "title"].find((ie) => ie in T) ?? "text";
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
+ 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";
1235
1240
  return { autoValueKey: P, autoLabelKey: Y };
1236
1241
  }
1237
1242
  if (t.length > 0) {
1238
- const j = s(t);
1239
- c.value = j.autoValueKey, k.value = j.autoLabelKey;
1243
+ const j = a(t);
1244
+ f.value = j.autoValueKey, k.value = j.autoLabelKey;
1240
1245
  }
1241
1246
  const b = O(() => {
1242
1247
  if (y) return v.value;
1243
1248
  const j = v.value;
1244
1249
  if (m.layout === "popover") return j;
1245
1250
  if (!x.value)
1246
- return V.value ? j : j.slice(0, a);
1247
- const T = x.value.toLowerCase();
1248
- return j.filter((P) => P[k.value].toLowerCase().includes(T));
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));
1249
1254
  });
1250
1255
  let h = null;
1251
1256
  async function K(j) {
1252
1257
  if (y) {
1253
- d.value = !0;
1258
+ c.value = !0;
1254
1259
  try {
1255
- const T = new URL(y, window.location.origin);
1256
- T.searchParams.set("json", "1"), T.searchParams.set("key", j), T.searchParams.set("limit", a.toString());
1257
- const P = await fetch(T.toString());
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());
1258
1263
  if (!P.ok) {
1259
1264
  Ae({ type: "error", title: "Error", message: "Failed to fetch remote options" }), v.value = [];
1260
1265
  return;
1261
1266
  }
1262
1267
  const Y = await P.json();
1263
- if (!Y[l]) {
1268
+ if (!Y[o]) {
1264
1269
  Ae({ type: "error", title: "Error", message: Y }), v.value = [];
1265
1270
  return;
1266
1271
  }
1267
- if (v.value = Y[l], v.value.length > 0) {
1268
- const ie = s(v.value);
1269
- c.value = ie.autoValueKey, k.value = ie.autoLabelKey;
1272
+ if (v.value = Y[o], v.value.length > 0) {
1273
+ const ie = a(v.value);
1274
+ f.value = ie.autoValueKey, k.value = ie.autoLabelKey;
1270
1275
  }
1271
- r.value = Y.total;
1272
- } catch (T) {
1273
- console.error("Failed to fetch remote options:", T);
1276
+ l.value = Y.total;
1277
+ } catch (L) {
1278
+ console.error("Failed to fetch remote options:", L);
1274
1279
  } finally {
1275
- d.value = !1;
1280
+ c.value = !1;
1276
1281
  }
1277
1282
  }
1278
1283
  }
1279
- E(x, (j) => {
1284
+ T(x, (j) => {
1280
1285
  y && (h && clearTimeout(h), h = setTimeout(() => {
1281
1286
  K(j);
1282
1287
  }, 200));
1283
- }), E(() => m.modelValue, (j) => {
1284
- n.value = p(j);
1288
+ }), T(() => m.modelValue, (j) => {
1289
+ r.value = p(j);
1285
1290
  }, { immediate: !0 });
1286
1291
  function M(j) {
1287
- return g && Array.isArray(n.value) ? n.value.includes(j[c.value]) : n.value && n.value === j[c.value];
1292
+ return g && Array.isArray(r.value) ? r.value.includes(j[f.value]) : r.value && r.value === j[f.value];
1288
1293
  }
1289
1294
  function $(j) {
1290
- if (g && !Array.isArray(n.value) && (n.value = []), g && Array.isArray(n.value)) {
1291
- const T = n.value.includes(j[c.value]);
1292
- n.value = T ? n.value.filter((P) => P !== j[c.value]) : [...n.value, j[c.value]], f.value = T ? f.value.filter((P) => P !== j[k.value]) : [...f.value, j[k.value]];
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]];
1293
1298
  } else
1294
- n.value = j[c.value], f.value = j[k.value];
1295
- o("update:modelValue", n.value), o("change", { name: m.name, value: n.value });
1299
+ r.value = j[f.value], i.value = j[k.value];
1300
+ n("update:modelValue", r.value), n("change", { name: m.name, value: r.value });
1296
1301
  }
1297
- function B() {
1298
- g ? (n.value = [], f.value = []) : (n.value = void 0, f.value = []), o("update:modelValue", n.value), o("clear", m.name);
1302
+ function S() {
1303
+ g ? (r.value = [], i.value = []) : (r.value = void 0, i.value = []), n("update:modelValue", r.value), n("clear", m.name);
1299
1304
  }
1300
1305
  function F() {
1301
- h && clearTimeout(h), x.value = "", V.value = !1;
1306
+ h && clearTimeout(h), x.value = "", _.value = !1;
1302
1307
  }
1303
1308
  function D() {
1304
- V.value = !V.value;
1309
+ _.value = !_.value;
1305
1310
  }
1306
1311
  me(() => {
1307
1312
  h && clearTimeout(h);
1308
1313
  });
1309
1314
  const R = A(-1);
1310
- E(b, () => {
1315
+ T(b, () => {
1311
1316
  R.value = b.value.length > 0 ? 0 : -1;
1312
1317
  });
1313
1318
  function N(j) {
1314
- const T = b.value.length;
1319
+ const L = b.value.length;
1315
1320
  if (j.key === "ArrowDown")
1316
- j.preventDefault(), R.value = (R.value + 1) % T;
1321
+ j.preventDefault(), R.value = (R.value + 1) % L;
1317
1322
  else if (j.key === "ArrowUp")
1318
- j.preventDefault(), R.value = (R.value - 1 + T) % T;
1323
+ j.preventDefault(), R.value = (R.value - 1 + L) % L;
1319
1324
  else if (j.key === "Enter" && (j.preventDefault(), R.value >= 0 && R.value < b.value.length)) {
1320
1325
  const P = b.value[R.value];
1321
1326
  $(P);
@@ -1325,24 +1330,24 @@ function sl(m, o) {
1325
1330
  y && v.value.length === 0 && x.value.length === 0 && K(x.value);
1326
1331
  }
1327
1332
  return {
1328
- innerValue: n,
1333
+ innerValue: r,
1329
1334
  searchTerm: x,
1330
1335
  filteredOptions: b,
1331
1336
  isSelected: M,
1332
1337
  selectItem: $,
1333
- clear: B,
1338
+ clear: S,
1334
1339
  resetSearch: F,
1335
1340
  toggleShowAll: D,
1336
- isReqProc: d,
1337
- showAll: V,
1338
- isEnableShowAll: C,
1341
+ isReqProc: c,
1342
+ showAll: _,
1343
+ isEnableShowAll: V,
1339
1344
  labelKey: k,
1340
- valueKey: c,
1345
+ valueKey: f,
1341
1346
  allOptions: v,
1342
1347
  highlightedIndex: R,
1343
1348
  onKeyDown: N,
1344
- selectedLabels: f,
1345
- totalCount: r,
1349
+ selectedLabels: i,
1350
+ totalCount: l,
1346
1351
  loadData: z
1347
1352
  };
1348
1353
  }
@@ -1355,7 +1360,7 @@ const il = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1355
1360
  }, vl = {
1356
1361
  key: 1,
1357
1362
  class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
1358
- }, yl = /* @__PURE__ */ q({
1363
+ }, yl = /* @__PURE__ */ W({
1359
1364
  __name: "select",
1360
1365
  props: {
1361
1366
  id: {},
@@ -1384,57 +1389,57 @@ const il = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1384
1389
  itemClass: {}
1385
1390
  },
1386
1391
  emits: ["update:modelValue", "change", "clear"],
1387
- setup(m, { expose: o, emit: y }) {
1388
- const t = oe(), a = m, l = y, g = A(null), {
1392
+ setup(m, { expose: n, emit: y }) {
1393
+ const t = le(), s = m, o = y, g = A(null), {
1389
1394
  innerValue: p,
1390
- filteredOptions: n,
1395
+ filteredOptions: r,
1391
1396
  isSelected: x,
1392
- selectItem: d,
1397
+ selectItem: c,
1393
1398
  clear: v,
1394
- resetSearch: c,
1399
+ resetSearch: f,
1395
1400
  toggleShowAll: k,
1396
- isReqProc: V,
1397
- showAll: C,
1398
- isEnableShowAll: f,
1399
- searchTerm: r,
1400
- labelKey: s,
1401
+ isReqProc: _,
1402
+ showAll: V,
1403
+ isEnableShowAll: i,
1404
+ searchTerm: l,
1405
+ labelKey: a,
1401
1406
  valueKey: b,
1402
1407
  highlightedIndex: h,
1403
1408
  onKeyDown: K,
1404
1409
  selectedLabels: M,
1405
1410
  totalCount: $,
1406
- loadData: B
1411
+ loadData: S
1407
1412
  } = sl({
1408
- ...a,
1409
- modelValue: a.modelValue
1410
- }, l);
1413
+ ...s,
1414
+ modelValue: s.modelValue
1415
+ }, o);
1411
1416
  ce(() => {
1412
- c(), a.layout !== "inline" && (B(), g.value && a.layout === "popover" && g.value.focus());
1413
- }), E(
1414
- () => a.modelValue,
1417
+ f(), s.layout !== "inline" && (S(), g.value && s.layout === "popover" && g.value.focus());
1418
+ }), T(
1419
+ () => s.modelValue,
1415
1420
  (D) => {
1416
- D === void 0 && (a.multi ? p.value = [] : p.value = void 0);
1421
+ D === void 0 && (s.multi ? p.value = [] : p.value = void 0);
1417
1422
  }
1418
1423
  );
1419
1424
  const F = A([]);
1420
- return E(h, (D) => {
1425
+ return T(h, (D) => {
1421
1426
  D >= 0 && F.value[D] && F.value[D]?.scrollIntoView({
1422
1427
  block: "nearest",
1423
1428
  behavior: "smooth"
1424
1429
  });
1425
- }), E(n, () => {
1430
+ }), T(r, () => {
1426
1431
  F.value = [];
1427
- }), o({
1432
+ }), n({
1428
1433
  clear: v,
1429
1434
  inputTextRef: g,
1430
1435
  selectedLabels: M,
1431
- loadData: B
1432
- }), (D, R) => (i(), w("div", {
1433
- class: L([D.layout === "popover" ? "flex flex-col h-full" : "flex flex-col vs-filter-checkbox space-y-0.5"])
1436
+ loadData: S
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"])
1434
1439
  }, [
1435
- u("div", il, [
1436
- W(u("input", {
1437
- "onUpdate:modelValue": R[0] || (R[0] = (N) => Ye(r) ? r.value = N : null),
1440
+ d("div", il, [
1441
+ H(d("input", {
1442
+ "onUpdate:modelValue": R[0] || (R[0] = (N) => Ye(l) ? l.value = N : null),
1438
1443
  onKeydown: R[1] || (R[1] = //@ts-ignore
1439
1444
  (...N) => e(K) && e(K)(...N)),
1440
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",
@@ -1443,86 +1448,86 @@ const il = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1443
1448
  ref_key: "inputTextRef",
1444
1449
  ref: g
1445
1450
  }, null, 40, ul), [
1446
- [ee, e(r)]
1451
+ [ae, e(l)]
1447
1452
  ]),
1448
- Q(Le, { class: "absolute text-gray-400 -translate-y-1/2 left-4 top-1/2" }),
1449
- e(r) != "" ? (i(), I(Ce, {
1453
+ q(Le, { class: "absolute text-gray-400 -translate-y-1/2 left-4 top-1/2" }),
1454
+ e(l) != "" ? (u(), I(Ce, {
1450
1455
  key: 0,
1451
- onClick: R[2] || (R[2] = (N) => r.value = ""),
1456
+ onClick: R[2] || (R[2] = (N) => l.value = ""),
1452
1457
  class: "absolute text-gray-400 -translate-y-1/2 cursor-pointer hover:text-red-500 right-4 top-1/2"
1453
- })) : _("", !0)
1458
+ })) : C("", !0)
1454
1459
  ]),
1455
- u("div", {
1456
- class: L([
1460
+ d("div", {
1461
+ class: E([
1457
1462
  D.layout === "popover" ? "flex-1 overflow-y-auto p-2" : "",
1458
1463
  D.layout === "inline" ? "flex-1 overflow-y-auto max-h-80" : ""
1459
1464
  ])
1460
1465
  }, [
1461
- (i(!0), w(U, null, X(e(n), (N, z) => (i(), I(he, {
1466
+ (u(!0), w(U, null, X(e(r), (N, z) => (u(), I(he, {
1462
1467
  layout: D.layout,
1463
1468
  count: N.count,
1464
- label: N[e(s)],
1469
+ label: N[e(a)],
1465
1470
  color: N.color,
1466
1471
  type: D.multi ? "checkbox" : "radio",
1467
1472
  value: N[e(b)],
1468
1473
  "is-selected": e(x)(N),
1469
1474
  highlighted: z === e(h),
1470
- onItemClick: (j) => e(d)(N),
1475
+ onItemClick: (j) => e(c)(N),
1471
1476
  ref_for: !0,
1472
1477
  ref: (j) => F.value[z] = j?.el
1473
1478
  }, null, 8, ["layout", "count", "label", "color", "type", "value", "is-selected", "highlighted", "onItemClick"]))), 256))
1474
1479
  ], 2),
1475
- D.type === "select" && e(n).length === 0 && !e(V) ? (i(), w("div", dl, [
1476
- u("div", cl, [
1477
- Q(we),
1478
- u("div", fl, [
1479
- u("p", pl, S(e(t)("filter.notfound")), 1),
1480
- R[7] || (R[7] = u("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" }, null, -1))
1480
+ D.type === "select" && e(r).length === 0 && !e(_) ? (u(), w("div", dl, [
1481
+ d("div", cl, [
1482
+ q(we),
1483
+ d("div", fl, [
1484
+ d("p", pl, B(e(t)("filter.notfound")), 1),
1485
+ R[7] || (R[7] = d("p", { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" }, null, -1))
1481
1486
  ])
1482
1487
  ])
1483
- ])) : _("", !0),
1484
- D.layout !== "popover" && D.type !== "select" ? (i(), w(U, { key: 1 }, [
1485
- !e(C) && e(f) ? (i(), w("div", {
1488
+ ])) : C("", !0),
1489
+ D.layout !== "popover" && D.type !== "select" ? (u(), w(U, { key: 1 }, [
1490
+ !e(V) && e(i) ? (u(), w("div", {
1486
1491
  key: 0,
1487
1492
  onClick: R[3] || (R[3] = //@ts-ignore
1488
1493
  (...N) => e(k) && e(k)(...N)),
1489
1494
  class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
1490
1495
  }, [
1491
- G(S(e(t)("filter.more")) + " ", 1),
1492
- Q(ve)
1493
- ])) : _("", !0),
1494
- e(C) ? (i(), w("div", {
1496
+ Q(B(e(t)("filter.more")) + " ", 1),
1497
+ q(ve)
1498
+ ])) : C("", !0),
1499
+ e(V) ? (u(), w("div", {
1495
1500
  key: 1,
1496
1501
  onClick: R[4] || (R[4] = //@ts-ignore
1497
1502
  (...N) => e(k) && e(k)(...N)),
1498
1503
  class: "inline-flex cursor-pointer items-center gap-x-1.5 text-[13px] text-gray-800 underline underline-offset-4 hover:text-blue-600 focus:outline-none focus:text-blue-600 mt-1 px-2"
1499
1504
  }, [
1500
- G(S(e(t)("filter.less")) + " ", 1),
1501
- Q(ke)
1502
- ])) : _("", !0)
1503
- ], 64)) : _("", !0),
1504
- D.cleanable ? (i(), w(U, { key: 2 }, [
1505
- D.layout === "inline" ? (i(), w("div", ml, [
1506
- G(S(D.multi && Array.isArray(e(p)) ? e(p)?.length : e(p) !== void 0 && (e(p) || e(p) === null) ? 1 : 0) + " / " + S(e($)) + " " + S(e(t)("filter.selected")) + " ", 1),
1507
- W(u("button", {
1505
+ Q(B(e(t)("filter.less")) + " ", 1),
1506
+ q(ke)
1507
+ ])) : C("", !0)
1508
+ ], 64)) : C("", !0),
1509
+ D.cleanable ? (u(), w(U, { key: 2 }, [
1510
+ D.layout === "inline" ? (u(), w("div", ml, [
1511
+ Q(B(D.multi && Array.isArray(e(p)) ? e(p)?.length : e(p) !== void 0 && (e(p) || e(p) === null) ? 1 : 0) + " / " + B(e($)) + " " + B(e(t)("filter.selected")) + " ", 1),
1512
+ H(d("button", {
1508
1513
  class: "text-gray-600 hover:text-gray-800",
1509
1514
  onClick: R[5] || (R[5] = //@ts-ignore
1510
1515
  (...N) => e(v) && e(v)(...N))
1511
- }, S(e(t)("filter.clear")), 513), [
1516
+ }, B(e(t)("filter.clear")), 513), [
1512
1517
  [Z, e(p) !== "" && e(p) !== void 0 || e(p)]
1513
1518
  ])
1514
- ])) : _("", !0),
1515
- D.layout === "popover" ? (i(), w("div", vl, [
1516
- u("span", null, S(D.multi && Array.isArray(e(p)) ? e(p)?.length : e(p) !== void 0 && (e(p) || e(p) === null) ? 1 : 0) + " / " + S(e($)) + " " + S(e(t)("filter.selected")), 1),
1517
- W(u("button", {
1519
+ ])) : C("", !0),
1520
+ D.layout === "popover" ? (u(), w("div", vl, [
1521
+ d("span", null, B(D.multi && Array.isArray(e(p)) ? e(p)?.length : e(p) !== void 0 && (e(p) || e(p) === null) ? 1 : 0) + " / " + B(e($)) + " " + B(e(t)("filter.selected")), 1),
1522
+ H(d("button", {
1518
1523
  class: "text-gray-600 hover:text-gray-800",
1519
1524
  onClick: R[6] || (R[6] = //@ts-ignore
1520
1525
  (...N) => e(v) && e(v)(...N))
1521
- }, S(e(t)("filter.clear")), 513), [
1526
+ }, B(e(t)("filter.clear")), 513), [
1522
1527
  [Z, e(p) !== "" && e(p) !== void 0 || e(p)]
1523
1528
  ])
1524
- ])) : _("", !0)
1525
- ], 64)) : _("", !0)
1529
+ ])) : C("", !0)
1530
+ ], 64)) : C("", !0)
1526
1531
  ], 2));
1527
1532
  }
1528
1533
  }), gl = ["for", "onClick"], bl = ["id", "name", "value"], hl = { class: "block" }, xl = {
@@ -1531,7 +1536,7 @@ const il = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1531
1536
  }, wl = {
1532
1537
  key: 1,
1533
1538
  class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
1534
- }, kl = /* @__PURE__ */ q({
1539
+ }, kl = /* @__PURE__ */ W({
1535
1540
  __name: "tag-field",
1536
1541
  props: {
1537
1542
  id: {},
@@ -1560,77 +1565,77 @@ const il = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1560
1565
  itemClass: {}
1561
1566
  },
1562
1567
  emits: ["update:modelValue", "change", "clear"],
1563
- setup(m, { expose: o, emit: y }) {
1564
- const t = m, a = y, {
1565
- innerValue: l,
1568
+ setup(m, { expose: n, emit: y }) {
1569
+ const t = m, s = y, {
1570
+ innerValue: o,
1566
1571
  isSelected: g,
1567
1572
  selectItem: p,
1568
- clear: n,
1573
+ clear: r,
1569
1574
  labelKey: x,
1570
- valueKey: d,
1575
+ valueKey: c,
1571
1576
  allOptions: v
1572
1577
  } = t.multi ? Me({
1573
1578
  ...t,
1574
1579
  modelValue: t.modelValue ?? t.default ?? []
1575
- }, a) : xe({
1580
+ }, s) : xe({
1576
1581
  ...t,
1577
1582
  modelValue: t.modelValue !== void 0 ? t.modelValue : t.default ?? ""
1578
- }, a);
1579
- return o({
1580
- clear: n
1581
- }), E(
1583
+ }, s);
1584
+ return n({
1585
+ clear: r
1586
+ }), T(
1582
1587
  () => t.modelValue,
1583
- (c) => {
1584
- c === void 0 && (t.multi ? l.value = [] : l.value = void 0);
1588
+ (f) => {
1589
+ f === void 0 && (t.multi ? o.value = [] : o.value = void 0);
1585
1590
  }
1586
- ), (c, k) => (i(), w(U, null, [
1587
- u("div", {
1588
- class: L(["grid grid-cols-3 gap-2 mx-[1px]", c.layout === "popover" ? "m-1" : "mb-1"])
1591
+ ), (f, k) => (u(), w(U, null, [
1592
+ d("div", {
1593
+ class: E(["grid grid-cols-3 gap-2 mx-[1px]", f.layout === "popover" ? "m-1" : "mb-1"])
1589
1594
  }, [
1590
- (i(!0), w(U, null, X(e(v), (V) => (i(), w("label", {
1591
- key: `item-${V[e(d)]}`,
1592
- for: `item-${V[e(d)]}`,
1593
- onClick: se((C) => e(p)(V), ["stop", "prevent"]),
1594
- class: L([e(g)(V) ? "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%)]"])
1595
+ (u(!0), w(U, null, X(e(v), (_) => (u(), w("label", {
1596
+ key: `item-${_[e(c)]}`,
1597
+ for: `item-${_[e(c)]}`,
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%)]"])
1595
1600
  }, [
1596
- u("input", {
1601
+ d("input", {
1597
1602
  type: "checkbox",
1598
- id: `item-${V[e(d)]}`,
1603
+ id: `item-${_[e(c)]}`,
1599
1604
  class: "hidden w4poy border-gray-200 g41z1 g22e3 axcnw dark:text-indigo-500 dark:border-neutral-700 dark:focus:ring-neutral-900",
1600
- name: `item-${V[e(d)]}`,
1601
- value: V[e(d)]
1605
+ name: `item-${_[e(c)]}`,
1606
+ value: _[e(c)]
1602
1607
  }, null, 8, bl),
1603
- u("span", hl, S(V[e(x)]), 1)
1608
+ d("span", hl, B(_[e(x)]), 1)
1604
1609
  ], 10, gl))), 128))
1605
1610
  ], 2),
1606
- c.cleanable ? (i(), w(U, { key: 0 }, [
1607
- c.layout === "inline" ? (i(), w("div", xl, [
1608
- G(S(c.multi && Array.isArray(e(l)) ? e(l)?.length : e(l) !== void 0 && (e(l) || e(l) === null) ? 1 : 0) + " з " + S(e(v).length) + " обрано ", 1),
1609
- W(u("button", {
1611
+ f.cleanable ? (u(), w(U, { key: 0 }, [
1612
+ f.layout === "inline" ? (u(), w("div", xl, [
1613
+ Q(B(f.multi && Array.isArray(e(o)) ? e(o)?.length : e(o) !== void 0 && (e(o) || e(o) === null) ? 1 : 0) + " з " + B(e(v).length) + " обрано ", 1),
1614
+ H(d("button", {
1610
1615
  class: "text-gray-600 hover:text-gray-800",
1611
1616
  onClick: k[0] || (k[0] = //@ts-ignore
1612
- (...V) => e(n) && e(n)(...V))
1617
+ (..._) => e(r) && e(r)(..._))
1613
1618
  }, " Очистити ", 512), [
1614
- [Z, e(l) !== "" && e(l) !== void 0 || e(l)]
1619
+ [Z, e(o) !== "" && e(o) !== void 0 || e(o)]
1615
1620
  ])
1616
- ])) : _("", !0),
1617
- c.layout === "popover" ? (i(), w("div", wl, [
1618
- u("span", null, S(c.multi && Array.isArray(e(l)) ? e(l)?.length : e(l) !== void 0 && (e(l) || e(l) === null) ? 1 : 0) + " з " + S(e(v).length) + " обрано", 1),
1619
- W(u("button", {
1621
+ ])) : C("", !0),
1622
+ f.layout === "popover" ? (u(), w("div", wl, [
1623
+ d("span", null, B(f.multi && Array.isArray(e(o)) ? e(o)?.length : e(o) !== void 0 && (e(o) || e(o) === null) ? 1 : 0) + " з " + B(e(v).length) + " обрано", 1),
1624
+ H(d("button", {
1620
1625
  class: "text-gray-600 hover:text-gray-800",
1621
1626
  onClick: k[1] || (k[1] = //@ts-ignore
1622
- (...V) => e(n) && e(n)(...V))
1627
+ (..._) => e(r) && e(r)(..._))
1623
1628
  }, " Очистити ", 512), [
1624
- [Z, e(l) !== void 0 && e(l) !== "" || e(l)]
1629
+ [Z, e(o) !== void 0 && e(o) !== "" || e(o)]
1625
1630
  ])
1626
- ])) : _("", !0)
1627
- ], 64)) : _("", !0)
1631
+ ])) : C("", !0)
1632
+ ], 64)) : C("", !0)
1628
1633
  ], 64));
1629
1634
  }
1630
1635
  }), Cl = ["disabled", "title"], Vl = { class: "flex w-full items-center justify-between gap-1 overflow-hidden text-left" }, _l = { class: "truncate text-ellipsis text-sm" }, $l = {
1631
1636
  key: 0,
1632
1637
  class: "inline-flex min-h-[18px] min-w-[18px] items-center justify-center rounded-sm bg-blue-100 px-2 text-[11px] font-semibold text-blue-600"
1633
- }, Al = { class: "w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-sm focus:outline-none focus:bg-stone-100 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, Sl = { class: "w-[360px] max-h-[500px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 before:w-full p-2" }, Ve = /* @__PURE__ */ q({
1638
+ }, Al = { class: "w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-sm focus:outline-none focus:bg-stone-100 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, Sl = { class: "w-[360px] max-h-[500px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 before:w-full p-2" }, Ve = /* @__PURE__ */ W({
1634
1639
  __name: "popover-field",
1635
1640
  props: {
1636
1641
  disabled: { type: Boolean, default: !1 },
@@ -1647,88 +1652,93 @@ const il = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1647
1652
  mode: {},
1648
1653
  layout: {}
1649
1654
  },
1650
- setup(m, { expose: o }) {
1651
- const y = m, t = O(() => Te(y.mode)), a = A(!1), l = A({ top: 0, left: 0 }), g = A(null), p = A(null), n = A(null);
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);
1652
1657
  function x() {
1653
- const h = p.value, K = n.value;
1658
+ const h = p.value, K = r.value;
1654
1659
  if (!h || !K) return;
1655
- const M = h.getBoundingClientRect(), $ = K.offsetWidth, B = window.innerWidth, F = M.bottom + 8;
1656
- let { left: D } = M;
1657
- D + $ > B && (D = Math.max(B - $ - 10, 10)), l.value = { top: F, left: D };
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;
1662
+ const j = Math.max(F - $ - 10, 10);
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);
1666
+ }
1667
+ N < 10 && (N = 10), o.value = { top: N, left: z };
1658
1668
  }
1659
- function d() {
1660
- a.value = !a.value, a.value && fe(() => {
1669
+ function c() {
1670
+ s.value = !s.value, s.value && fe(() => {
1661
1671
  x(), y.fieldRef?.inputTextRef && y.fieldRef?.inputTextRef?.focus?.(), y.fieldRef?.loadData && y.fieldRef?.loadData?.();
1662
1672
  });
1663
1673
  }
1664
1674
  function v(h) {
1665
- !g.value?.contains(h.target) && !n.value?.contains(h.target) && !p.value?.contains(h.target) && (a.value = !1);
1675
+ !g.value?.contains(h.target) && !r.value?.contains(h.target) && !p.value?.contains(h.target) && (s.value = !1);
1666
1676
  }
1667
- function c(h) {
1668
- h.key === "Escape" && (a.value = !1);
1677
+ function f(h) {
1678
+ h.key === "Escape" && (s.value = !1);
1669
1679
  }
1670
- const k = A(!1), V = A("ua"), C = (h) => {
1671
- h.detail.key === "locale" && (V.value = h.detail.newValue);
1680
+ const k = A(!1), _ = A("ua"), V = (h) => {
1681
+ h.detail.key === "locale" && (_.value = h.detail.newValue);
1672
1682
  };
1673
1683
  ce(() => {
1674
- k.value = !0, V.value = localStorage.locale, window.addEventListener("storage", C), document.addEventListener("click", v, !0), document.addEventListener("keydown", c), window.addEventListener("scroll", x, !0);
1684
+ k.value = !0, _.value = localStorage.locale, window.addEventListener("storage", V), document.addEventListener("click", v, !0), document.addEventListener("keydown", f), window.addEventListener("scroll", x, !0);
1675
1685
  }), me(() => {
1676
- window.removeEventListener("resize", C), document.removeEventListener("click", v, !0), document.removeEventListener("keydown", c), window.removeEventListener("scroll", x, !0);
1686
+ window.removeEventListener("resize", V), document.removeEventListener("click", v, !0), document.removeEventListener("keydown", f), window.removeEventListener("scroll", x, !0);
1677
1687
  });
1678
- function f() {
1679
- a.value = !1;
1688
+ function i() {
1689
+ s.value = !1;
1680
1690
  }
1681
- o({ close: f });
1682
- function r(h) {
1691
+ n({ close: i });
1692
+ function l(h) {
1683
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;
1684
1694
  }
1685
- const s = O(() => {
1686
- const h = y.fieldRef?.selectedLabels, K = r(h);
1687
- return K > 0 ? K : r(y.currentValue);
1695
+ const a = O(() => {
1696
+ const h = y.fieldRef?.selectedLabels, K = l(h);
1697
+ return K > 0 ? K : l(y.currentValue);
1688
1698
  }), b = O(() => {
1689
1699
  const h = y.fieldRef?.selectedLabels;
1690
- return !h || ["inline"].includes(y.layout || "") ? y[V.value] || (y.label ?? "") : Array.isArray(h) ? h.length > 0 ? h.join(", ") : y.label ?? "" : String(h);
1700
+ return !h || ["inline"].includes(y.layout || "") ? y[_.value] || (y.label ?? "") : Array.isArray(h) ? h.length > 0 ? h.join(", ") : y.label ?? "" : String(h);
1691
1701
  });
1692
- return (h, K) => (i(), w("div", null, [
1693
- u("button", {
1694
- onClick: d,
1702
+ return (h, K) => (u(), w("div", null, [
1703
+ d("button", {
1704
+ onClick: c,
1695
1705
  disabled: h.disabled,
1696
1706
  ref_key: "triggerRef",
1697
1707
  ref: p,
1698
1708
  title: h.label,
1699
- class: L([
1709
+ class: E([
1700
1710
  t.value,
1701
- h.width ? e(Oe).getWidthClass(h.width) : "w-full",
1702
- h.layout === "inline" && s.value > 0 ? "border border-blue-400 bg-blue-50 text-blue-600" : ""
1711
+ h.width ? e(Ee).getWidthClass(h.width) : "w-full",
1712
+ h.layout === "inline" && a.value > 0 ? "border border-blue-400 bg-blue-50 text-blue-600" : ""
1703
1713
  ]),
1704
1714
  type: "button"
1705
1715
  }, [
1706
- u("span", Vl, [
1707
- u("span", _l, S(b.value), 1),
1708
- h.layout === "inline" && s.value > 0 ? (i(), w("span", $l, S(s.value), 1)) : _("", !0)
1716
+ d("span", Vl, [
1717
+ d("span", _l, B(b.value), 1),
1718
+ h.layout === "inline" && a.value > 0 ? (u(), w("span", $l, B(a.value), 1)) : C("", !0)
1709
1719
  ]),
1710
- Q(ve, { class: "h-4 w-4 text-neutral-500" })
1720
+ q(ve, { class: "h-4 w-4 text-neutral-500" })
1711
1721
  ], 10, Cl),
1712
- k.value ? (i(), I(ge, {
1722
+ k.value ? (u(), I(ge, {
1713
1723
  key: 0,
1714
1724
  to: "body"
1715
1725
  }, [
1716
- W(u("div", {
1726
+ H(d("div", {
1717
1727
  ref_key: "popperRef",
1718
- ref: n,
1728
+ ref: r,
1719
1729
  class: "vsTailwind vs-popover__content bottom-right w-fit fixed z-[1000]",
1720
- style: be({ top: `${l.value.top}px`, left: `${l.value.left}px` }),
1730
+ style: be({ top: `${o.value.top}px`, left: `${o.value.left}px` }),
1721
1731
  "data-inside-popover": ""
1722
1732
  }, [
1723
- u("div", Al, [
1724
- u("div", Sl, [
1733
+ d("div", Al, [
1734
+ d("div", Sl, [
1725
1735
  de(h.$slots, "default")
1726
1736
  ])
1727
1737
  ])
1728
1738
  ], 4), [
1729
- [Z, a.value]
1739
+ [Z, s.value]
1730
1740
  ])
1731
- ])) : _("", !0)
1741
+ ])) : C("", !0)
1732
1742
  ]));
1733
1743
  }
1734
1744
  }), Bl = {}, jl = {
@@ -1743,17 +1753,17 @@ const il = { class: "h-[45px] shrink-0 px-[6px] py-[4px] flex items-center relat
1743
1753
  "stroke-linejoin": "round",
1744
1754
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down text-gray-800 rotate-[90deg]"
1745
1755
  };
1746
- function Dl(m, o) {
1747
- return i(), w("svg", jl, o[0] || (o[0] = [
1748
- u("path", {
1756
+ function Dl(m, n) {
1757
+ return u(), w("svg", jl, n[0] || (n[0] = [
1758
+ d("path", {
1749
1759
  stroke: "none",
1750
1760
  d: "M0 0h24v24H0z",
1751
1761
  fill: "none"
1752
1762
  }, null, -1),
1753
- u("path", { d: "M6 9l6 6l6 -6" }, null, -1)
1763
+ d("path", { d: "M6 9l6 6l6 -6" }, null, -1)
1754
1764
  ]));
1755
1765
  }
1756
- const Rl = /* @__PURE__ */ te(Bl, [["render", Dl]]), Fl = {}, Kl = {
1766
+ const Rl = /* @__PURE__ */ ee(Bl, [["render", Dl]]), Fl = {}, Kl = {
1757
1767
  xmlns: "http://www.w3.org/2000/svg",
1758
1768
  width: "15px",
1759
1769
  height: "24",
@@ -1765,21 +1775,21 @@ const Rl = /* @__PURE__ */ te(Bl, [["render", Dl]]), Fl = {}, Kl = {
1765
1775
  "stroke-linejoin": "round",
1766
1776
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down text-gray-800 rotate-[270deg]"
1767
1777
  };
1768
- function Ml(m, o) {
1769
- return i(), w("svg", Kl, o[0] || (o[0] = [
1770
- u("path", {
1778
+ function Ml(m, n) {
1779
+ return u(), w("svg", Kl, n[0] || (n[0] = [
1780
+ d("path", {
1771
1781
  stroke: "none",
1772
1782
  d: "M0 0h24v24H0z",
1773
1783
  fill: "none"
1774
1784
  }, null, -1),
1775
- u("path", { d: "M6 9l6 6l6 -6" }, null, -1)
1785
+ d("path", { d: "M6 9l6 6l6 -6" }, null, -1)
1776
1786
  ]));
1777
1787
  }
1778
- const Ll = /* @__PURE__ */ te(Fl, [["render", Ml]]), Ol = { class: "flex gap-1" }, El = { class: "mb-1" }, Tl = { class: "mb-1" }, Il = { class: "inline-flex rounded-sm shrink-0 pl-1" }, Ul = ["title"], zl = { class: "inline-flex rounded-sm shrink-0 pl-1" }, Nl = ["title"], Pl = {
1788
+ const Ll = /* @__PURE__ */ ee(Fl, [["render", Ml]]), El = { class: "flex gap-1" }, Ol = { class: "mb-1" }, Tl = { class: "mb-1" }, Il = { class: "inline-flex rounded-sm shrink-0 pl-1" }, Ul = ["title"], zl = { class: "inline-flex rounded-sm shrink-0 pl-1" }, Nl = ["title"], Pl = {
1779
1789
  key: 1,
1780
1790
  class: "flex gap-1 !w-[75%] rounded-sm"
1781
- }, Yl = ["max", "disabled"], Wl = ["min", "disabled"];
1782
- const ql = /* @__PURE__ */ q({
1791
+ }, Yl = ["max", "value", "disabled"], Wl = ["min", "value", "disabled"];
1792
+ const ql = /* @__PURE__ */ W({
1783
1793
  __name: "date-input-inline",
1784
1794
  props: {
1785
1795
  id: {},
@@ -1808,175 +1818,182 @@ const ql = /* @__PURE__ */ q({
1808
1818
  itemClass: {}
1809
1819
  },
1810
1820
  emits: ["update:modelValue", "change", "clear"],
1811
- setup(m, { expose: o, emit: y }) {
1812
- const t = oe(), a = m, l = y, g = A(null), {
1821
+ setup(m, { expose: n, emit: y }) {
1822
+ const t = le(), s = m, o = y, g = A(null), {
1813
1823
  activeMode: p,
1814
- innerValue: n,
1824
+ innerValue: r,
1815
1825
  onSelectChange: x,
1816
- nextClick: d,
1826
+ nextClick: c,
1817
1827
  prevClick: v,
1818
- currentLabel: c,
1828
+ currentLabel: f,
1819
1829
  clear: k
1820
1830
  } = Ie({
1821
- ...a,
1831
+ ...s,
1822
1832
  popoverRef: g
1823
- }, l);
1824
- return E(() => a.modelValue, (V) => {
1825
- V !== void 0 ? (n.value = V, l("update:modelValue", V)) : (p.value = "", n.value = []);
1826
- }), E(
1827
- n,
1828
- (V) => {
1829
- l("update:modelValue", V), l("change", { name: a.name, value: V });
1833
+ }, o);
1834
+ T(() => s.modelValue, (i) => {
1835
+ i !== void 0 ? (r.value = i, o("update:modelValue", i)) : (p.value = "", r.value = []);
1836
+ }), T(
1837
+ r,
1838
+ (i) => {
1839
+ o("update:modelValue", i), o("change", { name: s.name, value: i });
1830
1840
  },
1831
1841
  { deep: !0 }
1832
- ), o({
1842
+ );
1843
+ function _(i) {
1844
+ const l = Array.isArray(r.value) ? [...r.value] : [];
1845
+ r.value = [i, l[1] || ""];
1846
+ }
1847
+ function V(i) {
1848
+ const l = Array.isArray(r.value) ? [...r.value] : [];
1849
+ r.value = [l[0] || "", i];
1850
+ }
1851
+ return n({
1833
1852
  clear: k,
1834
1853
  popoverRef: g
1835
- }), (V, C) => (i(), w(U, null, [
1836
- u("div", Ol, [
1837
- Q(Ve, {
1854
+ }), (i, l) => (u(), w(U, null, [
1855
+ d("div", El, [
1856
+ q(Ve, {
1838
1857
  ref_key: "popoverRef",
1839
1858
  ref: g,
1840
- label: e(c),
1841
- "current-value": e(n),
1842
- mode: V.mode,
1843
- width: typeof V.width == "number" && e(n).length ? V.width - 70 : V.width,
1859
+ label: e(f),
1860
+ "current-value": e(r),
1861
+ mode: i.mode,
1862
+ width: typeof i.width == "number" && e(r).length ? i.width - 70 : i.width,
1844
1863
  onClear: e(k),
1845
- layout: V.layout,
1846
- class: L(V.itemClass)
1864
+ layout: i.layout,
1865
+ class: E(i.itemClass)
1847
1866
  }, {
1848
1867
  default: ne(() => [
1849
- u("div", null, [
1850
- u("button", {
1868
+ d("div", null, [
1869
+ d("button", {
1851
1870
  type: "button",
1852
- onClick: C[0] || (C[0] = (f) => e(x)("range")),
1871
+ onClick: l[0] || (l[0] = (a) => e(x)("range")),
1853
1872
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1854
1873
  }, [
1855
- G(S(e(t)("filter.period")) + " ", 1),
1856
- e(p) === "range" ? (i(), I(ae, { key: 0 })) : _("", !0)
1874
+ Q(B(e(t)("filter.period")) + " ", 1),
1875
+ e(p) === "range" ? (u(), I(oe, { key: 0 })) : C("", !0)
1857
1876
  ])
1858
1877
  ]),
1859
- C[12] || (C[12] = u("div", null, [
1860
- u("div", { class: "pt-1 mt-1 border-t" })
1878
+ l[12] || (l[12] = d("div", null, [
1879
+ d("div", { class: "pt-1 mt-1 border-t" })
1861
1880
  ], -1)),
1862
- u("div", null, [
1863
- u("button", {
1881
+ d("div", null, [
1882
+ d("button", {
1864
1883
  type: "button",
1865
- onClick: C[1] || (C[1] = (f) => e(x)("today")),
1884
+ onClick: l[1] || (l[1] = (a) => e(x)("today")),
1866
1885
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1867
1886
  }, [
1868
- G(S(e(t)("filter.today")) + " ", 1),
1869
- e(p) === "today" ? (i(), I(ae, { key: 0 })) : _("", !0)
1887
+ Q(B(e(t)("filter.today")) + " ", 1),
1888
+ e(p) === "today" ? (u(), I(oe, { key: 0 })) : C("", !0)
1870
1889
  ])
1871
1890
  ]),
1872
- u("div", null, [
1873
- u("button", {
1891
+ d("div", null, [
1892
+ d("button", {
1874
1893
  type: "button",
1875
- onClick: C[2] || (C[2] = (f) => e(x)("week")),
1894
+ onClick: l[2] || (l[2] = (a) => e(x)("week")),
1876
1895
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1877
1896
  }, [
1878
- G(S(e(t)("filter.week")) + " ", 1),
1879
- e(p) === "week" ? (i(), I(ae, { key: 0 })) : _("", !0)
1897
+ Q(B(e(t)("filter.week")) + " ", 1),
1898
+ e(p) === "week" ? (u(), I(oe, { key: 0 })) : C("", !0)
1880
1899
  ])
1881
1900
  ]),
1882
- u("div", null, [
1883
- u("button", {
1901
+ d("div", null, [
1902
+ d("button", {
1884
1903
  type: "button",
1885
- onClick: C[3] || (C[3] = (f) => e(x)("month")),
1904
+ onClick: l[3] || (l[3] = (a) => e(x)("month")),
1886
1905
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1887
1906
  }, [
1888
- G(S(e(t)("filter.month")) + " ", 1),
1889
- e(p) === "month" ? (i(), I(ae, { key: 0 })) : _("", !0)
1907
+ Q(B(e(t)("filter.month")) + " ", 1),
1908
+ e(p) === "month" ? (u(), I(oe, { key: 0 })) : C("", !0)
1890
1909
  ])
1891
1910
  ]),
1892
- u("div", null, [
1893
- u("button", {
1911
+ d("div", null, [
1912
+ d("button", {
1894
1913
  type: "button",
1895
- onClick: C[4] || (C[4] = (f) => e(x)("quarter")),
1914
+ onClick: l[4] || (l[4] = (a) => e(x)("quarter")),
1896
1915
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1897
1916
  }, [
1898
- G(S(e(t)("filter.quarter")) + " ", 1),
1899
- e(p) === "quarter" ? (i(), I(ae, { key: 0 })) : _("", !0)
1917
+ Q(B(e(t)("filter.quarter")) + " ", 1),
1918
+ e(p) === "quarter" ? (u(), I(oe, { key: 0 })) : C("", !0)
1900
1919
  ])
1901
1920
  ]),
1902
- u("div", El, [
1903
- u("button", {
1921
+ d("div", Ol, [
1922
+ d("button", {
1904
1923
  type: "button",
1905
- onClick: C[5] || (C[5] = (f) => e(x)("year")),
1924
+ onClick: l[5] || (l[5] = (a) => e(x)("year")),
1906
1925
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1907
1926
  }, [
1908
- G(S(e(t)("filter.year")) + " ", 1),
1909
- e(p) === "year" ? (i(), I(ae, { key: 0 })) : _("", !0)
1927
+ Q(B(e(t)("filter.year")) + " ", 1),
1928
+ e(p) === "year" ? (u(), I(oe, { key: 0 })) : C("", !0)
1910
1929
  ])
1911
1930
  ]),
1912
- u("div", Tl, [
1913
- u("button", {
1931
+ d("div", Tl, [
1932
+ d("button", {
1914
1933
  type: "button",
1915
- onClick: C[6] || (C[6] = (f) => e(k)()),
1934
+ onClick: l[6] || (l[6] = (a) => e(k)()),
1916
1935
  class: "flex items-center justify-between w-full px-4 py-2 text-sm text-left rounded-sm cursor-pointer filter-date__item hs-selected:bg-stone-100 text-stone-800 hover:bg-stone-100 focus:outline-none focus:bg-stone-100"
1917
1936
  }, [
1918
- G(S(e(t)("filter.alltime")) + " ", 1),
1919
- e(n)[0] ? _("", !0) : (i(), I(ae, { key: 0 }))
1937
+ Q(B(e(t)("filter.alltime")) + " ", 1),
1938
+ e(r)[0] ? C("", !0) : (u(), I(oe, { key: 0 }))
1920
1939
  ])
1921
1940
  ])
1922
1941
  ]),
1923
1942
  _: 1,
1924
1943
  __: [12]
1925
1944
  }, 8, ["label", "current-value", "mode", "width", "onClear", "layout", "class"]),
1926
- e(p) !== "" && e(p) !== "range" && e(p) !== "last_7_days" ? (i(), w(U, { key: 0 }, [
1927
- u("div", Il, [
1928
- u("button", {
1945
+ e(p) !== "" && e(p) !== "range" && e(p) !== "last_7_days" ? (u(), w(U, { key: 0 }, [
1946
+ d("div", Il, [
1947
+ d("button", {
1929
1948
  type: "button",
1930
1949
  title: e(t)("filter.prev"),
1931
1950
  class: "inline-flex h-[38px] items-center px-2 text-sm text-gray-800 bg-gray-100 gap-x-2 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg focus:z-10 hover:bg-gray-200 focus:bg-gray-200 duration-300",
1932
- onClick: C[7] || (C[7] = //@ts-ignore
1933
- (...f) => e(v) && e(v)(...f))
1951
+ onClick: l[7] || (l[7] = //@ts-ignore
1952
+ (...a) => e(v) && e(v)(...a))
1934
1953
  }, [
1935
- Q(Rl)
1954
+ q(Rl)
1936
1955
  ], 8, Ul)
1937
1956
  ]),
1938
- u("div", zl, [
1939
- u("button", {
1957
+ d("div", zl, [
1958
+ d("button", {
1940
1959
  type: "button",
1941
1960
  title: e(t)("filter.next"),
1942
1961
  class: "inline-flex h-[38px] items-center px-2 text-sm text-gray-800 gap-x-2 bg-gray-100 -ms-px first:rounded-s-lg first:ms-0 last:rounded-e-lg focus:z-10 hover:bg-gray-200 focus:bg-gray-200 duration-300",
1943
- onClick: C[8] || (C[8] = //@ts-ignore
1944
- (...f) => e(d) && e(d)(...f))
1962
+ onClick: l[8] || (l[8] = //@ts-ignore
1963
+ (...a) => e(c) && e(c)(...a))
1945
1964
  }, [
1946
- Q(Ll)
1965
+ q(Ll)
1947
1966
  ], 8, Nl)
1948
1967
  ])
1949
- ], 64)) : _("", !0),
1950
- e(p) !== "" && e(p) === "range" ? (i(), w("div", Pl, [
1951
- W(u("input", {
1968
+ ], 64)) : C("", !0),
1969
+ e(p) !== "" && e(p) === "range" ? (u(), w("div", Pl, [
1970
+ d("input", {
1952
1971
  type: "date",
1953
- max: e(n)[1],
1972
+ max: e(r)[1],
1954
1973
  locale: "uk-UA",
1955
- "onUpdate:modelValue": C[9] || (C[9] = (f) => e(n)[0] = f),
1974
+ value: e(r)[0],
1975
+ onInput: l[9] || (l[9] = (a) => _(a.target.value)),
1956
1976
  class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-sm focus:outline-blue-600",
1957
- disabled: V.disabled
1958
- }, null, 8, Yl), [
1959
- [ee, e(n)[0]]
1960
- ]),
1961
- W(u("input", {
1977
+ disabled: i.disabled
1978
+ }, null, 40, Yl),
1979
+ d("input", {
1962
1980
  type: "date",
1963
- min: e(n)[0],
1981
+ min: e(r)[0],
1964
1982
  locale: "uk-UA",
1965
- "onUpdate:modelValue": C[10] || (C[10] = (f) => e(n)[1] = f),
1983
+ value: e(r)[1],
1984
+ onInput: l[10] || (l[10] = (a) => V(a.target.value)),
1966
1985
  class: "px-2 p-0 border text-[12px] max-w-[calc(50%-5px)] h-[38px] rounded-sm focus:outline-blue-600 appearance-auto",
1967
- disabled: V.disabled
1968
- }, null, 8, Wl), [
1969
- [ee, e(n)[1]]
1970
- ])
1971
- ])) : _("", !0)
1986
+ disabled: i.disabled
1987
+ }, null, 40, Wl)
1988
+ ])) : C("", !0)
1972
1989
  ]),
1973
- (V.cleanable, _("", !0))
1990
+ (i.cleanable, C("", !0))
1974
1991
  ], 64));
1975
1992
  }
1976
- }), Ql = { class: "flex flex-wrap items-center gap-2" }, Hl = ["disabled", "onClick"], Gl = {
1993
+ }), Hl = { class: "flex flex-wrap items-center gap-2" }, Ql = ["disabled", "onClick"], Gl = {
1977
1994
  key: 0,
1978
1995
  class: "flex justify-between items-center text-xs text-gray-500 p-1 border-t"
1979
- }, Xl = /* @__PURE__ */ q({
1996
+ }, Xl = /* @__PURE__ */ W({
1980
1997
  __name: "button-field",
1981
1998
  props: {
1982
1999
  id: {},
@@ -2005,52 +2022,52 @@ const ql = /* @__PURE__ */ q({
2005
2022
  itemClass: {}
2006
2023
  },
2007
2024
  emits: ["update:modelValue", "change", "clear"],
2008
- setup(m, { expose: o, emit: y }) {
2009
- const t = m, a = y, {
2010
- innerValue: l,
2025
+ setup(m, { expose: n, emit: y }) {
2026
+ const t = m, s = y, {
2027
+ innerValue: o,
2011
2028
  isSelected: g,
2012
2029
  selectItem: p,
2013
- clear: n,
2030
+ clear: r,
2014
2031
  labelKey: x,
2015
- valueKey: d,
2032
+ valueKey: c,
2016
2033
  allOptions: v
2017
2034
  } = xe({
2018
2035
  ...t,
2019
2036
  modelValue: t.modelValue ?? t.default ?? ""
2020
- }, a), c = O(() => l.value !== void 0 && !(typeof l.value == "string" && l.value === "")), k = O(() => c.value ? 1 : 0);
2021
- function V(f) {
2022
- return g(f) ? ["bg-blue-600 text-white"].filter((r) => typeof r == "string" && r.trim().length > 0).join(" ") : ["text-gray-700 hover:bg-gray-200 bg-gray-50 "].filter((r) => typeof r == "string" && r.trim().length > 0).join(" ");
2037
+ }, s), f = O(() => o.value !== void 0 && !(typeof o.value == "string" && o.value === "")), k = O(() => f.value ? 1 : 0);
2038
+ function _(i) {
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(" ");
2023
2040
  }
2024
- function C(f) {
2025
- t.disabled || p(f);
2041
+ function V(i) {
2042
+ t.disabled || p(i);
2026
2043
  }
2027
- return o({
2028
- clear: n
2029
- }), E(
2044
+ return n({
2045
+ clear: r
2046
+ }), T(
2030
2047
  () => t.modelValue,
2031
- (f) => {
2032
- f === void 0 && (l.value = void 0);
2048
+ (i) => {
2049
+ i === void 0 && (o.value = void 0);
2033
2050
  }
2034
- ), (f, r) => (i(), w(U, null, [
2035
- u("div", Ql, [
2036
- (i(!0), w(U, null, X(e(v), (s) => (i(), w("button", {
2037
- key: s[e(d)],
2051
+ ), (i, l) => (u(), w(U, null, [
2052
+ d("div", Hl, [
2053
+ (u(!0), w(U, null, X(e(v), (a) => (u(), w("button", {
2054
+ key: a[e(c)],
2038
2055
  type: "button",
2039
- class: L(["px-3 py-2 text-sm font-medium rounded-md transition-colors", V(s)]),
2040
- disabled: f.disabled,
2041
- onClick: (b) => C(s)
2042
- }, S(s[e(x)]), 11, Hl))), 128))
2056
+ class: E(["px-3 py-2 text-sm font-medium rounded-md transition-colors", _(a)]),
2057
+ disabled: i.disabled,
2058
+ onClick: (b) => V(a)
2059
+ }, B(a[e(x)]), 11, Ql))), 128))
2043
2060
  ]),
2044
- f.cleanable && f.layout === "popover" ? (i(), w("div", Gl, [
2045
- u("span", null, S(k.value) + " з " + S(e(v).length) + " обрано", 1),
2046
- W(u("button", {
2061
+ i.cleanable && i.layout === "popover" ? (u(), w("div", Gl, [
2062
+ d("span", null, B(k.value) + " з " + B(e(v).length) + " обрано", 1),
2063
+ H(d("button", {
2047
2064
  class: "text-gray-600 hover:text-gray-800",
2048
- onClick: r[0] || (r[0] = //@ts-ignore
2049
- (...s) => e(n) && e(n)(...s))
2065
+ onClick: l[0] || (l[0] = //@ts-ignore
2066
+ (...a) => e(r) && e(r)(...a))
2050
2067
  }, " Очистити ", 512), [
2051
- [Z, c.value]
2068
+ [Z, f.value]
2052
2069
  ])
2053
- ])) : _("", !0)
2070
+ ])) : C("", !0)
2054
2071
  ], 64));
2055
2072
  }
2056
2073
  }), De = {
@@ -2058,14 +2075,14 @@ const ql = /* @__PURE__ */ q({
2058
2075
  checkbox: je,
2059
2076
  check: je,
2060
2077
  text: Tt,
2061
- range: Qt,
2078
+ range: Ht,
2062
2079
  date: rl,
2063
2080
  select: yl,
2064
2081
  tag: kl,
2065
2082
  button: Xl,
2066
2083
  "date:inline": ql
2067
2084
  };
2068
- function _e(m, o) {
2085
+ function _e(m, n) {
2069
2086
  let y;
2070
2087
  switch (m.toLowerCase()) {
2071
2088
  case "autocomplete":
@@ -2077,12 +2094,12 @@ function _e(m, o) {
2077
2094
  default:
2078
2095
  y = m?.toString().toLowerCase();
2079
2096
  }
2080
- return y === "date" && o && o === "inline" && (y = "date:inline"), {
2097
+ return y === "date" && n && n === "inline" && (y = "date:inline"), {
2081
2098
  component: De[y] || De.text,
2082
2099
  type: y
2083
2100
  };
2084
2101
  }
2085
- const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } }, Zl = { class: "relative w-full mb-2 p-4 bg-white rounded-lg shadow-sm" }, eo = { class: "block mb-3 text-sm font-medium text-gray-800 dark:text-neutral-200" }, to = { class: "flex items-center" }, lo = { class: "text-sm font-medium max-w-[80%] text-gray-800 flex items-center gap-x-1" }, oo = { class: "filter-layout__body" }, ao = /* @__PURE__ */ q({
2102
+ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } }, Zl = { class: "relative w-full mb-2 p-4 bg-white rounded-lg shadow-sm" }, eo = { class: "block mb-3 text-sm font-medium text-gray-800 dark:text-neutral-200" }, to = { class: "flex items-center" }, lo = { class: "text-sm font-medium max-w-[80%] text-gray-800 flex items-center gap-x-1" }, oo = { class: "filter-layout__body" }, ao = /* @__PURE__ */ W({
2086
2103
  __name: "vertical-layout",
2087
2104
  props: {
2088
2105
  id: {},
@@ -2111,71 +2128,71 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2111
2128
  itemClass: {}
2112
2129
  },
2113
2130
  emits: ["update:modelValue", "change", "clear"],
2114
- setup(m, { expose: o, emit: y }) {
2115
- const t = m, a = y, l = A(), g = _e(t.type, t.layout), p = O({
2131
+ setup(m, { expose: n, emit: y }) {
2132
+ const t = m, s = y, o = A(), g = _e(t.type, t.layout), p = O({
2116
2133
  get: () => t.modelValue,
2117
- set: (v) => a("update:modelValue", v)
2134
+ set: (v) => s("update:modelValue", v)
2118
2135
  });
2119
- function n(v) {
2120
- a("clear", v);
2136
+ function r(v) {
2137
+ s("clear", v);
2121
2138
  }
2122
- function x(v, c) {
2123
- a("change", { name: v, value: c }), t.modelValue !== void 0 && a("update:modelValue", c);
2139
+ function x(v, f) {
2140
+ s("change", { name: v, value: f }), t.modelValue !== void 0 && s("update:modelValue", f);
2124
2141
  }
2125
- function d() {
2126
- a("clear", t.name);
2142
+ function c() {
2143
+ s("clear", t.name);
2127
2144
  }
2128
- return E(
2145
+ return T(
2129
2146
  () => t.default,
2130
2147
  (v) => {
2131
2148
  p.value = v;
2132
2149
  }
2133
- ), E(
2150
+ ), T(
2134
2151
  () => t.modelValue,
2135
2152
  (v) => {
2136
2153
  p.value = v;
2137
2154
  }
2138
- ), o({
2139
- filterRef: l
2140
- }), (v, c) => (i(), w("div", Jl, [
2141
- u("div", Zl, [
2142
- u("div", eo, [
2143
- u("div", to, [
2144
- u("span", lo, S(v.label), 1)
2155
+ ), n({
2156
+ filterRef: o
2157
+ }), (v, f) => (u(), w("div", Jl, [
2158
+ d("div", Zl, [
2159
+ d("div", eo, [
2160
+ d("div", to, [
2161
+ d("span", lo, B(v.label), 1)
2145
2162
  ]),
2146
- typeof p.value == "string" && p.value.trim() !== "" || Array.isArray(p.value) && p.value.length > 0 && p.value.some((k) => k !== void 0) || p.value === null ? (i(), I(et, {
2163
+ typeof p.value == "string" && p.value.trim() !== "" || Array.isArray(p.value) && p.value.length > 0 && p.value.some((k) => k !== void 0) || p.value === null ? (u(), I(et, {
2147
2164
  key: 0,
2148
- onClick: d
2149
- })) : _("", !0)
2165
+ onClick: c
2166
+ })) : C("", !0)
2150
2167
  ]),
2151
- u("div", oo, [
2152
- e(g)?.type !== "select" ? (i(), I(re(e(g)?.component), J({ key: 0 }, t, {
2168
+ d("div", oo, [
2169
+ e(g)?.type !== "select" ? (u(), I(re(e(g)?.component), J({ key: 0 }, t, {
2153
2170
  type: e(g)?.type,
2154
2171
  class: t.itemClass,
2155
- onChange: c[0] || (c[0] = (k) => x(k.name, k.value)),
2156
- onClear: c[1] || (c[1] = (k) => n(k)),
2172
+ onChange: f[0] || (f[0] = (k) => x(k.name, k.value)),
2173
+ onClear: f[1] || (f[1] = (k) => r(k)),
2157
2174
  ref_key: "filterRef",
2158
- ref: l
2159
- }), null, 16, ["type", "class"])) : (i(), I(Ve, {
2175
+ ref: o
2176
+ }), null, 16, ["type", "class"])) : (u(), I(Ve, {
2160
2177
  key: 1,
2161
2178
  "current-value": p.value,
2162
2179
  label: v.label,
2163
2180
  mode: v.mode,
2164
- onClear: d,
2165
- fieldRef: l.value,
2181
+ onClear: c,
2182
+ fieldRef: o.value,
2166
2183
  width: void 0,
2167
2184
  disabled: v.disabled,
2168
2185
  layout: "vertical"
2169
2186
  }, {
2170
2187
  default: ne(() => [
2171
- (i(), I(re(e(g)?.component), J({
2188
+ (u(), I(re(e(g)?.component), J({
2172
2189
  ref_key: "filterRef",
2173
- ref: l
2190
+ ref: o
2174
2191
  }, t, {
2175
2192
  type: e(g)?.type,
2176
2193
  class: t.itemClass,
2177
- onChange: c[2] || (c[2] = (k) => x(k.name, k.value)),
2178
- onClear: c[3] || (c[3] = (k) => n(k))
2194
+ onChange: f[2] || (f[2] = (k) => x(k.name, k.value)),
2195
+ onClear: f[3] || (f[3] = (k) => r(k))
2179
2196
  }), null, 16, ["type", "class"]))
2180
2197
  ]),
2181
2198
  _: 1
@@ -2184,7 +2201,7 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2184
2201
  ])
2185
2202
  ]));
2186
2203
  }
2187
- }), Re = /* @__PURE__ */ q({
2204
+ }), Re = /* @__PURE__ */ W({
2188
2205
  __name: "inline-layout",
2189
2206
  props: {
2190
2207
  id: {},
@@ -2213,65 +2230,65 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2213
2230
  itemClass: {}
2214
2231
  },
2215
2232
  emits: ["update:modelValue", "change", "clear"],
2216
- setup(m, { expose: o, emit: y }) {
2217
- const t = m, a = y, l = A(), g = _e(t.type, t.layout), p = O({
2233
+ setup(m, { expose: n, emit: y }) {
2234
+ const t = m, s = y, o = A(), g = _e(t.type, t.layout), p = O({
2218
2235
  get: () => t.modelValue,
2219
- set: (d) => a("update:modelValue", d)
2236
+ set: (c) => s("update:modelValue", c)
2220
2237
  });
2221
- function n(d = t.name) {
2222
- a("clear", d);
2238
+ function r(c = t.name) {
2239
+ s("clear", c);
2223
2240
  }
2224
- function x(d, v) {
2225
- a("change", { name: d, value: v }), t.modelValue !== void 0 && a("update:modelValue", v);
2241
+ function x(c, v) {
2242
+ s("change", { name: c, value: v }), t.modelValue !== void 0 && s("update:modelValue", v);
2226
2243
  }
2227
- return E(
2244
+ return T(
2228
2245
  () => t.default,
2229
- (d) => {
2230
- p.value = d;
2246
+ (c) => {
2247
+ p.value = c;
2231
2248
  }
2232
- ), E(
2249
+ ), T(
2233
2250
  () => t.modelValue,
2234
- (d) => {
2235
- p.value = d;
2251
+ (c) => {
2252
+ p.value = c;
2236
2253
  }
2237
- ), o({
2238
- filterRef: l
2239
- }), (d, v) => ["text", "date", "button"].includes(d.type.toLocaleLowerCase()) ? (i(), I(re(e(g)?.component), J({ key: 0 }, t, {
2254
+ ), n({
2255
+ filterRef: o
2256
+ }), (c, v) => ["text", "date", "button"].includes(c.type.toLocaleLowerCase()) ? (u(), I(re(e(g)?.component), J({ key: 0 }, t, {
2240
2257
  type: e(g)?.type,
2241
- class: d.itemClass,
2242
- onChange: v[0] || (v[0] = (c) => x(c.name, c.value)),
2243
- onClear: v[1] || (v[1] = (c) => n(c)),
2244
- disabled: d.disabled,
2258
+ class: c.itemClass,
2259
+ onChange: v[0] || (v[0] = (f) => x(f.name, f.value)),
2260
+ onClear: v[1] || (v[1] = (f) => r(f)),
2261
+ disabled: c.disabled,
2245
2262
  modelValue: p.value,
2246
- "onUpdate:modelValue": v[2] || (v[2] = (c) => p.value = c)
2247
- }), null, 16, ["type", "class", "disabled", "modelValue"])) : (i(), I(Ve, {
2263
+ "onUpdate:modelValue": v[2] || (v[2] = (f) => p.value = f)
2264
+ }), null, 16, ["type", "class", "disabled", "modelValue"])) : (u(), I(Ve, {
2248
2265
  key: 1,
2249
2266
  "current-value": p.value,
2250
- label: d.label,
2251
- mode: d.mode,
2252
- onClear: n,
2253
- fieldRef: l.value,
2267
+ label: c.label,
2268
+ mode: c.mode,
2269
+ onClear: r,
2270
+ fieldRef: o.value,
2254
2271
  width: t.width,
2255
- disabled: d.disabled,
2272
+ disabled: c.disabled,
2256
2273
  layout: "inline"
2257
2274
  }, {
2258
2275
  default: ne(() => [
2259
- (i(), I(re(e(g)?.component), J({
2276
+ (u(), I(re(e(g)?.component), J({
2260
2277
  ref_key: "filterRef",
2261
- ref: l
2278
+ ref: o
2262
2279
  }, t, {
2263
2280
  modelValue: p.value,
2264
- "onUpdate:modelValue": v[3] || (v[3] = (c) => p.value = c),
2281
+ "onUpdate:modelValue": v[3] || (v[3] = (f) => p.value = f),
2265
2282
  type: e(g)?.type,
2266
2283
  class: t.itemClass,
2267
- onChange: v[4] || (v[4] = (c) => x(c.name, c.value)),
2268
- onClear: v[5] || (v[5] = (c) => n(c))
2284
+ onChange: v[4] || (v[4] = (f) => x(f.name, f.value)),
2285
+ onClear: v[5] || (v[5] = (f) => r(f))
2269
2286
  }), null, 16, ["modelValue", "type", "class"]))
2270
2287
  ]),
2271
2288
  _: 1
2272
2289
  }, 8, ["current-value", "label", "mode", "fieldRef", "width", "disabled"]));
2273
2290
  }
2274
- }), no = /* @__PURE__ */ q({
2291
+ }), no = /* @__PURE__ */ W({
2275
2292
  __name: "popover-layout",
2276
2293
  props: {
2277
2294
  id: {},
@@ -2300,46 +2317,46 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2300
2317
  itemClass: {}
2301
2318
  },
2302
2319
  emits: ["update:modelValue", "change", "clear"],
2303
- setup(m, { expose: o, emit: y }) {
2304
- const t = m, a = y, l = A(), g = A(_e(t.type, t.layout)), p = O({
2320
+ setup(m, { expose: n, emit: y }) {
2321
+ const t = m, s = y, o = A(), g = A(_e(t.type, t.layout)), p = O({
2305
2322
  get: () => t.modelValue,
2306
- set: (d) => a("update:modelValue", d)
2323
+ set: (c) => s("update:modelValue", c)
2307
2324
  });
2308
- function n(d) {
2309
- a("clear", d);
2325
+ function r(c) {
2326
+ s("clear", c);
2310
2327
  }
2311
- function x(d, v) {
2312
- a("change", { name: d, value: v }), t.modelValue !== void 0 && a("update:modelValue", v);
2328
+ function x(c, v) {
2329
+ s("change", { name: c, value: v }), t.modelValue !== void 0 && s("update:modelValue", v);
2313
2330
  }
2314
- return E(
2331
+ return T(
2315
2332
  () => t.default,
2316
- (d) => {
2317
- p.value = d;
2333
+ (c) => {
2334
+ p.value = c;
2318
2335
  }
2319
- ), E(
2336
+ ), T(
2320
2337
  () => t.modelValue,
2321
- (d) => {
2322
- p.value = d;
2338
+ (c) => {
2339
+ p.value = c;
2323
2340
  }
2324
- ), E(
2341
+ ), T(
2325
2342
  () => t,
2326
- (d) => {
2327
- p.value = d;
2343
+ (c) => {
2344
+ p.value = c;
2328
2345
  }
2329
- ), o({
2330
- filterRef: l
2331
- }), (d, v) => (i(), I(re(g.value?.component), J(t, {
2346
+ ), n({
2347
+ filterRef: o
2348
+ }), (c, v) => (u(), I(re(g.value?.component), J(t, {
2332
2349
  type: g.value?.type,
2333
2350
  class: t.itemClass,
2334
2351
  modelValue: p.value,
2335
- "onUpdate:modelValue": v[0] || (v[0] = (c) => p.value = c),
2336
- onChange: v[1] || (v[1] = (c) => x(c.name, c.value)),
2337
- onClear: v[2] || (v[2] = (c) => n(c)),
2352
+ "onUpdate:modelValue": v[0] || (v[0] = (f) => p.value = f),
2353
+ onChange: v[1] || (v[1] = (f) => x(f.name, f.value)),
2354
+ onClear: v[2] || (v[2] = (f) => r(f)),
2338
2355
  ref_key: "filterRef",
2339
- ref: l
2356
+ ref: o
2340
2357
  }), null, 16, ["type", "class", "modelValue"]));
2341
2358
  }
2342
- }), le = /* @__PURE__ */ q({
2359
+ }), te = /* @__PURE__ */ W({
2343
2360
  __name: "filter-field",
2344
2361
  props: {
2345
2362
  id: {},
@@ -2368,29 +2385,29 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2368
2385
  itemClass: {}
2369
2386
  },
2370
2387
  emits: ["update:modelValue", "change", "clear"],
2371
- setup(m, { expose: o, emit: y }) {
2372
- const t = m, a = y, l = A(), g = O({
2388
+ setup(m, { expose: n, emit: y }) {
2389
+ const t = m, s = y, o = A(), g = O({
2373
2390
  get: () => t.modelValue,
2374
- set: (d) => a("update:modelValue", d)
2391
+ set: (c) => s("update:modelValue", c)
2375
2392
  });
2376
- function p(d) {
2377
- a("clear", d);
2393
+ function p(c) {
2394
+ s("clear", c);
2378
2395
  }
2379
- function n(d, v) {
2380
- a("change", { name: d, value: v }), t.modelValue !== void 0 && a("update:modelValue", v);
2396
+ function r(c, v) {
2397
+ s("change", { name: c, value: v }), t.modelValue !== void 0 && s("update:modelValue", v);
2381
2398
  }
2382
- E(
2399
+ T(
2383
2400
  () => t.default,
2384
- (d) => {
2385
- g.value = d;
2401
+ (c) => {
2402
+ g.value = c;
2386
2403
  }
2387
- ), E(
2404
+ ), T(
2388
2405
  () => t.modelValue,
2389
- (d) => {
2390
- g.value = d;
2406
+ (c) => {
2407
+ g.value = c;
2391
2408
  }
2392
- ), o({
2393
- filterRef: l
2409
+ ), n({
2410
+ filterRef: o
2394
2411
  });
2395
2412
  function x() {
2396
2413
  switch (t.layout) {
@@ -2404,143 +2421,143 @@ const Jl = { style: { display: "inline-flex", margin: "0px", width: "100%" } },
2404
2421
  return Re;
2405
2422
  }
2406
2423
  }
2407
- return (d, v) => (i(), I(re(x()), J(t, {
2408
- onChange: v[0] || (v[0] = (c) => n(c.name, c.value)),
2409
- onClear: v[1] || (v[1] = (c) => p(c)),
2424
+ return (c, v) => (u(), I(re(x()), J(t, {
2425
+ onChange: v[0] || (v[0] = (f) => r(f.name, f.value)),
2426
+ onClear: v[1] || (v[1] = (f) => p(f)),
2410
2427
  modelValue: g.value,
2411
- "onUpdate:modelValue": v[2] || (v[2] = (c) => g.value = c)
2428
+ "onUpdate:modelValue": v[2] || (v[2] = (f) => g.value = f)
2412
2429
  }), null, 16, ["modelValue"]));
2413
2430
  }
2414
2431
  });
2415
- function ye(m, o) {
2432
+ function ye(m, n) {
2416
2433
  const {
2417
2434
  slots: y
2418
- } = m, t = (r) => r ? JSON.parse(JSON.stringify(ue(r))) : {}, a = A(t(m.value));
2419
- E(
2435
+ } = m, t = (l) => l ? JSON.parse(JSON.stringify(ue(l))) : {}, s = A(t(m.value));
2436
+ T(
2420
2437
  () => m.value,
2421
- (r) => {
2422
- a.value = t(r);
2438
+ (l) => {
2439
+ s.value = t(l);
2423
2440
  },
2424
2441
  { deep: !0, immediate: !0 }
2425
2442
  );
2426
- const l = O(() => (ue(y?.default?.()) ?? []).flatMap((s) => Array.isArray(s.children) ? s.children : [s]));
2427
- function g(r) {
2428
- delete a.value[r], o("clear", {
2429
- data: ue(a.value),
2430
- name: r
2443
+ const o = O(() => (ue(y?.default?.()) ?? []).flatMap((a) => Array.isArray(a.children) ? a.children : [a]));
2444
+ function g(l) {
2445
+ delete s.value[l], n("clear", {
2446
+ data: ue(s.value),
2447
+ name: l
2431
2448
  });
2432
2449
  }
2433
- function p(r, s) {
2434
- s === void 0 ? g(r) : a.value = {
2435
- ...a.value,
2436
- [r]: s
2437
- }, o("change", {
2438
- data: ue(a.value),
2439
- name: r,
2440
- value: s
2450
+ function p(l, a) {
2451
+ a === void 0 ? g(l) : s.value = {
2452
+ ...s.value,
2453
+ [l]: a
2454
+ }, n("change", {
2455
+ data: ue(s.value),
2456
+ name: l,
2457
+ value: a
2441
2458
  });
2442
2459
  }
2443
- const n = O(() => l.value.map((r) => {
2444
- const s = r.props?.name;
2445
- return We(r, {
2446
- ...r.props,
2460
+ const r = O(() => o.value.map((l) => {
2461
+ const a = l.props?.name;
2462
+ return We(l, {
2463
+ ...l.props,
2447
2464
  layout: m.view,
2448
2465
  showClean: !0,
2449
- modelValue: a.value[s],
2466
+ modelValue: s.value[a],
2450
2467
  "onUpdate:modelValue": (b) => {
2451
- p(s, b);
2468
+ p(a, b);
2452
2469
  },
2453
- onClear: () => g(s),
2454
- class: [m.itemClass, r.props?.class],
2455
- itemClass: [m.itemClass, r.props?.itemClass].filter((b) => typeof b == "string" && b.trim().length > 0).join(" ") || void 0
2470
+ onClear: () => g(a),
2471
+ class: [m.itemClass, l.props?.class],
2472
+ itemClass: [m.itemClass, l.props?.itemClass].filter((b) => typeof b == "string" && b.trim().length > 0).join(" ") || void 0
2456
2473
  });
2457
2474
  })), x = O(
2458
2475
  () => new Map(
2459
- n.value.map((r) => {
2460
- const s = r.props?.name;
2461
- return s ? [s, r] : null;
2462
- }).filter((r) => r !== null)
2476
+ r.value.map((l) => {
2477
+ const a = l.props?.name;
2478
+ return a ? [a, l] : null;
2479
+ }).filter((l) => l !== null)
2463
2480
  )
2464
2481
  );
2465
- function d(r = !1) {
2466
- a.value = {}, r || o("clearAll", {
2467
- data: ue(a.value),
2482
+ function c(l = !1) {
2483
+ s.value = {}, l || n("clearAll", {
2484
+ data: ue(s.value),
2468
2485
  name: "ALL"
2469
2486
  });
2470
2487
  }
2471
- const v = A(""), c = O(() => m.schema?.value ? Object.entries(a.value).filter(([r, s]) => m.schema && !(r in m.schema.value) ? !1 : Array.isArray(s) ? s.some((b) => b !== "" && b !== void 0) : s !== "" && s !== void 0).length : 0), k = A();
2472
- E(v, async () => {
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();
2489
+ T(v, async () => {
2473
2490
  await fe(), k?.value?.filterRef?.inputTextRef && k.value.filterRef.inputTextRef.focus();
2474
2491
  });
2475
- const V = O(() => m.schema?.value ? Object.fromEntries(Object.entries(m.schema?.value).slice(0, m.limit)) : {}), C = O(() => {
2476
- if (n.value.length === 0) return [];
2477
- let r = 0;
2492
+ const _ = O(() => m.schema?.value ? Object.fromEntries(Object.entries(m.schema?.value).slice(0, m.limit)) : {}), V = O(() => {
2493
+ if (r.value.length === 0) return [];
2494
+ let l = 0;
2478
2495
  if (m.schema?.value) {
2479
- const s = Object.entries(m.schema.value).length;
2480
- m.limit && s < m.limit ? r = m.limit - s : r = 0;
2496
+ const a = Object.entries(m.schema.value).length;
2497
+ m.limit && a < m.limit ? l = m.limit - a : l = 0;
2481
2498
  }
2482
- return n.value.slice(0, r);
2483
- }), f = O(() => n.value.length === 0 ? [] : m.view !== "inline" ? n.value : n.value.slice(C.value.length));
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));
2484
2501
  return {
2485
- activeFilter: a,
2486
- activeFilterCount: c,
2502
+ activeFilter: s,
2503
+ activeFilterCount: f,
2487
2504
  onFilterChange: p,
2488
2505
  clearFilter: g,
2489
- clearAllFilters: d,
2490
- limitedSchema: V,
2491
- filtersSlot: n,
2492
- limitedFiltersSlot: C,
2493
- popoverFiltersSlot: f,
2506
+ clearAllFilters: c,
2507
+ limitedSchema: _,
2508
+ filtersSlot: r,
2509
+ limitedFiltersSlot: V,
2510
+ popoverFiltersSlot: i,
2494
2511
  vnodeMap: x,
2495
2512
  selectedFilter: v,
2496
2513
  filterRef: k
2497
2514
  };
2498
2515
  }
2499
- const ro = /* @__PURE__ */ q({
2516
+ const ro = /* @__PURE__ */ W({
2500
2517
  __name: "popover",
2501
2518
  emits: ["open", "close"],
2502
- setup(m, { emit: o }) {
2503
- const y = A(!1), t = A(null), a = A(null), l = A(null), g = A({ top: "0px", left: "0px", position: "absolute" });
2519
+ setup(m, { emit: n }) {
2520
+ const y = A(!1), t = A(null), s = A(null), o = A(null), g = A({ top: "0px", left: "0px", position: "absolute" });
2504
2521
  function p() {
2505
2522
  y.value = !y.value;
2506
2523
  }
2507
- function n() {
2508
- const k = l.value, V = t.value;
2509
- if (!k || !V) return;
2510
- const C = k.getBoundingClientRect(), f = V.offsetWidth, r = window.innerWidth - C.left;
2511
- let s = C.left + window.scrollX;
2512
- f > r && (s = window.innerWidth - f - 8, s < 8 && (s = 8)), g.value = {
2524
+ function r() {
2525
+ const k = o.value, _ = t.value;
2526
+ if (!k || !_) return;
2527
+ const V = k.getBoundingClientRect(), i = _.offsetWidth, l = window.innerWidth - V.left;
2528
+ let a = V.left + window.scrollX;
2529
+ i > l && (a = window.innerWidth - i - 8, a < 8 && (a = 8)), g.value = {
2513
2530
  position: "absolute",
2514
- top: `${C.bottom + window.scrollY + 8}px`,
2515
- left: `${s}px`
2531
+ top: `${V.bottom + window.scrollY + 8}px`,
2532
+ left: `${a}px`
2516
2533
  };
2517
2534
  }
2518
2535
  const x = O(() => Object.entries(g.value).map((k) => k.join(":")).join(";"));
2519
- function d(k) {
2520
- const V = k.target;
2521
- !l.value?.contains(k.target) && !t.value?.contains(k.target) && !V.closest("[data-inside-popover]") && (y.value = !1);
2536
+ function c(k) {
2537
+ const _ = k.target;
2538
+ !o.value?.contains(k.target) && !t.value?.contains(k.target) && !_.closest("[data-inside-popover]") && (y.value = !1);
2522
2539
  }
2523
2540
  const v = A(!1);
2524
2541
  ce(() => {
2525
2542
  v.value = !0;
2526
2543
  }), ce(() => {
2527
- l.value = a.value?.querySelector("[data-popover-trigger]") || null, l.value?.addEventListener("click", p), document.addEventListener("click", d), window.addEventListener("resize", n), window.addEventListener("scroll", n, !0);
2544
+ o.value = s.value?.querySelector("[data-popover-trigger]") || null, o.value?.addEventListener("click", p), document.addEventListener("click", c), window.addEventListener("resize", r), window.addEventListener("scroll", r, !0);
2528
2545
  }), me(() => {
2529
- l.value?.removeEventListener("click", p), document.removeEventListener("click", d), window.removeEventListener("resize", n), window.removeEventListener("scroll", n, !0);
2546
+ o.value?.removeEventListener("click", p), document.removeEventListener("click", c), window.removeEventListener("resize", r), window.removeEventListener("scroll", r, !0);
2530
2547
  });
2531
- const c = o;
2532
- return E(y, async (k) => {
2533
- k ? (c("open"), await fe(), n()) : c("close");
2534
- }), (k, V) => (i(), w("div", {
2548
+ const f = n;
2549
+ return T(y, async (k) => {
2550
+ k ? (f("open"), await fe(), r()) : f("close");
2551
+ }), (k, _) => (u(), w("div", {
2535
2552
  ref_key: "wrapperRef",
2536
- ref: a
2553
+ ref: s
2537
2554
  }, [
2538
2555
  de(k.$slots, "trigger"),
2539
- v.value ? (i(), I(ge, {
2556
+ v.value ? (u(), I(ge, {
2540
2557
  key: 0,
2541
2558
  to: "body"
2542
2559
  }, [
2543
- W(u("div", {
2560
+ H(d("div", {
2544
2561
  ref_key: "popoverRef",
2545
2562
  ref: t,
2546
2563
  class: "absolute z-[50] w-[600px] rounded-md border bg-white shadow-md",
@@ -2550,7 +2567,7 @@ const ro = /* @__PURE__ */ q({
2550
2567
  ], 4), [
2551
2568
  [Z, y.value]
2552
2569
  ])
2553
- ])) : _("", !0)
2570
+ ])) : C("", !0)
2554
2571
  ], 512));
2555
2572
  }
2556
2573
  }), so = {}, io = {
@@ -2565,12 +2582,12 @@ const ro = /* @__PURE__ */ q({
2565
2582
  "stroke-linejoin": "round",
2566
2583
  class: "lucide lucide-filter h-4 w-4"
2567
2584
  };
2568
- function uo(m, o) {
2569
- return i(), w("svg", io, o[0] || (o[0] = [
2570
- u("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }, null, -1)
2585
+ function uo(m, n) {
2586
+ return u(), w("svg", io, n[0] || (n[0] = [
2587
+ d("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" }, null, -1)
2571
2588
  ]));
2572
2589
  }
2573
- const Ue = /* @__PURE__ */ te(so, [["render", uo]]), co = { class: "flex items-center gap-2 overflow-hidden" }, fo = {
2590
+ const Ue = /* @__PURE__ */ ee(so, [["render", uo]]), co = { class: "flex items-center gap-2 overflow-hidden" }, fo = {
2574
2591
  key: 0,
2575
2592
  class: "inline-flex min-h-[18px] min-w-[18px] items-center justify-center rounded-[4px] bg-blue-500 px-1 text-[11px] font-semibold text-white"
2576
2593
  }, po = { class: "flex max-h-[400px]" }, mo = { class: "w-64 border-r border-gray-200 overflow-y-auto" }, vo = { class: "p-4 border-b" }, yo = { class: "text-sm text-gray-600" }, go = { class: "p-2" }, bo = ["onClick"], ho = { class: "flex items-center gap-2" }, xo = { class: "text-sm font-medium" }, wo = {
@@ -2585,7 +2602,7 @@ const Ue = /* @__PURE__ */ te(so, [["render", uo]]), co = { class: "flex items-c
2585
2602
  }, Ao = { class: "flex-1 min-h-[300px] overflow-y-auto" }, So = {
2586
2603
  key: 0,
2587
2604
  class: "flex items-center justify-center h-full text-gray-500"
2588
- }, Bo = { class: "text-sm" }, ze = /* @__PURE__ */ q({
2605
+ }, Bo = { class: "text-sm" }, ze = /* @__PURE__ */ W({
2589
2606
  __name: "popover-filter-layout",
2590
2607
  props: {
2591
2608
  badgeCount: {},
@@ -2602,163 +2619,163 @@ const Ue = /* @__PURE__ */ te(so, [["render", uo]]), co = { class: "flex items-c
2602
2619
  itemClass: {}
2603
2620
  },
2604
2621
  emits: ["change", "clear", "clearAll"],
2605
- setup(m, { expose: o, emit: y }) {
2606
- const t = oe(), a = m, l = Te(a.mode), g = pe(), p = y, n = A({}), x = O(() => n?.value ? a.view !== "inline" ? n?.value : Object.fromEntries(Object.entries(n?.value).slice(a.limit)) : {}), {
2607
- activeFilter: d,
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)) : {}), {
2624
+ activeFilter: c,
2608
2625
  activeFilterCount: v,
2609
- onFilterChange: c,
2626
+ onFilterChange: f,
2610
2627
  clearFilter: k,
2611
- clearAllFilters: V,
2612
- popoverFiltersSlot: C,
2613
- selectedFilter: f,
2614
- filterRef: r
2628
+ clearAllFilters: _,
2629
+ popoverFiltersSlot: V,
2630
+ selectedFilter: i,
2631
+ filterRef: l
2615
2632
  } = ye({
2616
- ...a,
2617
- schema: n,
2633
+ ...s,
2634
+ schema: r,
2618
2635
  slots: g
2619
- }, p), s = O(() => a.badgeCount ?? v.value);
2636
+ }, p), a = O(() => s.badgeCount ?? v.value);
2620
2637
  function b(M) {
2621
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;
2622
2639
  }
2623
2640
  function h(M) {
2624
- return d.value ? b(d.value[M]) : 0;
2641
+ return c.value ? b(c.value[M]) : 0;
2625
2642
  }
2626
2643
  function K() {
2627
2644
  if (x.value) {
2628
2645
  const [M] = Object.keys(x.value);
2629
- f.value = M;
2630
- } else C.value.length > 0 ? f.value = C.value[0].props.name : f.value = "";
2646
+ i.value = M;
2647
+ } else V.value.length > 0 ? i.value = V.value[0].props.name : i.value = "";
2631
2648
  }
2632
- return E(
2633
- () => a.schema,
2649
+ return T(
2650
+ () => s.schema,
2634
2651
  (M) => {
2635
- n.value = M ?? {};
2652
+ r.value = M ?? {};
2636
2653
  },
2637
2654
  { deep: !0, immediate: !0 }
2638
- ), o({
2655
+ ), n({
2639
2656
  clearFilter: k,
2640
- clearAllFilters: V
2641
- }), (M, $) => (i(), I(ro, {
2657
+ clearAllFilters: _
2658
+ }), (M, $) => (u(), I(ro, {
2642
2659
  onOpen: K,
2643
- onClose: $[5] || ($[5] = (B) => f.value = "")
2660
+ onClose: $[5] || ($[5] = (S) => i.value = "")
2644
2661
  }, {
2645
2662
  trigger: ne(() => [
2646
- u("button", {
2663
+ d("button", {
2647
2664
  "data-popover-trigger": "",
2648
2665
  "aria-haspopup": "dialog",
2649
2666
  "aria-expanded": "false",
2650
- class: L([
2667
+ class: E([
2651
2668
  M.itemClass,
2652
- e(l),
2669
+ e(o),
2653
2670
  "flex items-center justify-between gap-2",
2654
- s.value > 0 ? "border border-blue-400 bg-blue-50 text-blue-600 hover:border-blue-500" : "text-neutral-700 hover:border-neutral-400"
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"
2655
2672
  ]),
2656
2673
  type: "button"
2657
2674
  }, [
2658
- u("span", co, [
2659
- Q(Ue, { class: "h-4 w-4" }),
2660
- $[6] || ($[6] = u("span", { class: "text-sm font-medium" }, "Фільтр", -1))
2675
+ d("span", co, [
2676
+ q(Ue, { class: "h-4 w-4" }),
2677
+ $[6] || ($[6] = d("span", { class: "text-sm font-medium" }, "Фільтр", -1))
2661
2678
  ]),
2662
- s.value > 0 ? (i(), w("span", fo, S(s.value), 1)) : _("", !0)
2679
+ a.value > 0 ? (u(), w("span", fo, B(a.value), 1)) : C("", !0)
2663
2680
  ], 2)
2664
2681
  ]),
2665
2682
  default: ne(() => [
2666
- u("div", po, [
2667
- u("div", mo, [
2668
- u("div", vo, [
2669
- u("p", yo, S(e(t)("filter.selectFieldHelp")), 1)
2683
+ d("div", po, [
2684
+ d("div", mo, [
2685
+ d("div", vo, [
2686
+ d("p", yo, B(e(t)("filter.selectFieldHelp")), 1)
2670
2687
  ]),
2671
- u("div", go, [
2672
- M.schema ? (i(!0), w(U, { key: 0 }, X(Object.entries(x.value), ([B, F]) => (i(), w("button", {
2673
- key: B,
2688
+ d("div", go, [
2689
+ M.schema ? (u(!0), w(U, { key: 0 }, X(Object.entries(x.value), ([S, F]) => (u(), w("button", {
2690
+ key: S,
2674
2691
  onClick: () => {
2675
- f.value = B;
2692
+ i.value = S;
2676
2693
  },
2677
- class: L([
2694
+ class: E([
2678
2695
  "flex w-full items-center justify-between px-3 py-2 text-left transition-colors hover:bg-gray-50",
2679
- e(f) === B ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : "text-neutral-700"
2696
+ e(i) === S ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : "text-neutral-700"
2680
2697
  ])
2681
2698
  }, [
2682
- u("div", ho, [
2683
- u("span", xo, S(F.label), 1)
2699
+ d("div", ho, [
2700
+ d("span", xo, B(F.label), 1)
2684
2701
  ]),
2685
- h(B) > 0 ? (i(), w("div", wo, S(h(B)), 1)) : _("", !0)
2686
- ], 10, bo))), 128)) : _("", !0),
2687
- (i(!0), w(U, null, X(e(C), (B, F) => (i(), w("button", {
2702
+ h(S) > 0 ? (u(), w("div", wo, B(h(S)), 1)) : C("", !0)
2703
+ ], 10, bo))), 128)) : C("", !0),
2704
+ (u(!0), w(U, null, X(e(V), (S, F) => (u(), w("button", {
2688
2705
  key: "slot-" + F,
2689
- onClick: (D) => f.value = B.props.name,
2690
- class: L([
2706
+ onClick: (D) => i.value = S.props.name,
2707
+ class: E([
2691
2708
  "flex items-center justify-between px-3 py-2 text-left transition-colors hover:bg-gray-50",
2692
- e(f) === B.props.name ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : "text-neutral-700"
2709
+ e(i) === S.props.name ? "bg-blue-50 text-blue-700 border-l-2 border-blue-500" : "text-neutral-700"
2693
2710
  ])
2694
2711
  }, [
2695
- u("div", Co, [
2696
- u("span", Vo, S(B.props.label), 1)
2712
+ d("div", Co, [
2713
+ d("span", Vo, B(S.props.label), 1)
2697
2714
  ]),
2698
- h(B.props.name) > 0 ? (i(), w("div", _o, S(h(B.props.name)), 1)) : _("", !0)
2715
+ h(S.props.name) > 0 ? (u(), w("div", _o, B(h(S.props.name)), 1)) : C("", !0)
2699
2716
  ], 10, ko))), 128))
2700
2717
  ]),
2701
- e(v) > 0 ? (i(), w("div", $o, [
2702
- u("button", {
2703
- class: L([M.itemClass, "w-full px-3 py-2 text-left text-sm text-gray-600 hover:bg-gray-50 transition-colors"]),
2704
- onClick: $[0] || ($[0] = (B) => e(V)()),
2718
+ e(v) > 0 ? (u(), w("div", $o, [
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"]),
2721
+ onClick: $[0] || ($[0] = (S) => e(_)()),
2705
2722
  "data-inside-popover": ""
2706
2723
  }, " Очистити всі ", 2)
2707
- ])) : _("", !0)
2724
+ ])) : C("", !0)
2708
2725
  ]),
2709
- u("div", Ao, [
2710
- e(f) === "" ? (i(), w("div", So, [
2711
- u("p", Bo, S(e(t)("filter.selectFieldHelp")), 1)
2712
- ])) : _("", !0),
2713
- e(f) ? (i(), w(U, { key: 1 }, [
2714
- x.value ? (i(!0), w(U, { key: 0 }, X(Object.entries(x.value), ([B, F]) => (i(), w(U, null, [
2715
- e(f) === B ? (i(), I(le, J({
2716
- key: B,
2726
+ d("div", Ao, [
2727
+ e(i) === "" ? (u(), w("div", So, [
2728
+ d("p", Bo, B(e(t)("filter.selectFieldHelp")), 1)
2729
+ ])) : C("", !0),
2730
+ e(i) ? (u(), w(U, { key: 1 }, [
2731
+ x.value ? (u(!0), w(U, { key: 0 }, X(Object.entries(x.value), ([S, F]) => (u(), w(U, null, [
2732
+ e(i) === S ? (u(), I(te, J({
2733
+ key: S,
2717
2734
  layout: "popover",
2718
2735
  ref_for: !0,
2719
2736
  ref_key: "filterRef",
2720
- ref: r
2737
+ ref: l
2721
2738
  }, { ref_for: !0 }, F, {
2722
2739
  class: [M.itemClass, F?.class],
2723
2740
  "item-class": [M.itemClass, F?.itemClass].filter(Boolean).join(" ") || void 0,
2724
- onChange: $[1] || ($[1] = (D) => e(c)(D.name, D.value)),
2741
+ onChange: $[1] || ($[1] = (D) => e(f)(D.name, D.value)),
2725
2742
  onClear: $[2] || ($[2] = (D) => {
2726
- e(k)(D), e(c)(D, void 0);
2743
+ e(k)(D), e(f)(D, void 0);
2727
2744
  }),
2728
- modelValue: e(d)[B],
2729
- "onUpdate:modelValue": (D) => e(d)[B] = D,
2745
+ modelValue: e(c)[S],
2746
+ "onUpdate:modelValue": (D) => e(c)[S] = D,
2730
2747
  cleanable: !0
2731
- }), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"])) : _("", !0)
2732
- ], 64))), 256)) : _("", !0),
2733
- (i(!0), w(U, null, X(e(C), (B, F) => (i(), w(U, {
2748
+ }), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"])) : C("", !0)
2749
+ ], 64))), 256)) : C("", !0),
2750
+ (u(!0), w(U, null, X(e(V), (S, F) => (u(), w(U, {
2734
2751
  key: "slot-" + F
2735
2752
  }, [
2736
- e(f) === B.props.name ? (i(), I(le, J({
2753
+ e(i) === S.props.name ? (u(), I(te, J({
2737
2754
  key: 0,
2738
2755
  layout: "popover"
2739
- }, { ref_for: !0 }, B.props, {
2756
+ }, { ref_for: !0 }, S.props, {
2740
2757
  ref_for: !0,
2741
2758
  ref_key: "filterRef",
2742
- ref: r,
2743
- class: [M.itemClass, B.props?.class],
2744
- "item-class": [M.itemClass, B.props?.itemClass].filter(Boolean).join(" ") || void 0,
2745
- onChange: $[3] || ($[3] = (D) => e(c)(D.name, D.value)),
2759
+ ref: l,
2760
+ class: [M.itemClass, S.props?.class],
2761
+ "item-class": [M.itemClass, S.props?.itemClass].filter(Boolean).join(" ") || void 0,
2762
+ onChange: $[3] || ($[3] = (D) => e(f)(D.name, D.value)),
2746
2763
  onClear: $[4] || ($[4] = (D) => {
2747
- e(k)(D), e(c)(D, void 0);
2764
+ e(k)(D), e(f)(D, void 0);
2748
2765
  }),
2749
- modelValue: e(d)[B.props.name],
2750
- "onUpdate:modelValue": (D) => e(d)[B.props.name] = D,
2766
+ modelValue: e(c)[S.props.name],
2767
+ "onUpdate:modelValue": (D) => e(c)[S.props.name] = D,
2751
2768
  cleanable: !0
2752
- }), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"])) : _("", !0)
2769
+ }), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"])) : C("", !0)
2753
2770
  ], 64))), 128))
2754
- ], 64)) : _("", !0)
2771
+ ], 64)) : C("", !0)
2755
2772
  ])
2756
2773
  ])
2757
2774
  ]),
2758
2775
  _: 1
2759
2776
  }));
2760
2777
  }
2761
- }), jo = { class: "flex gap-1 items-center flex-wrap" }, Fe = /* @__PURE__ */ q({
2778
+ }), jo = { class: "flex gap-1 items-center flex-wrap" }, Fe = /* @__PURE__ */ W({
2762
2779
  __name: "inline-filter-layout",
2763
2780
  props: {
2764
2781
  schema: {},
@@ -2774,81 +2791,81 @@ const Ue = /* @__PURE__ */ te(so, [["render", uo]]), co = { class: "flex items-c
2774
2791
  itemClass: {}
2775
2792
  },
2776
2793
  emits: ["change", "clear", "clearAll"],
2777
- setup(m, { expose: o, emit: y }) {
2778
- const t = oe(), a = m, l = y, g = pe(), p = A({}), n = O(() => Object.keys(a.schema).length > a.limit), {
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), {
2779
2796
  activeFilter: x,
2780
- activeFilterCount: d,
2797
+ activeFilterCount: c,
2781
2798
  onFilterChange: v,
2782
- clearFilter: c,
2799
+ clearFilter: f,
2783
2800
  clearAllFilters: k,
2784
- limitedSchema: V,
2785
- filtersSlot: C,
2786
- limitedFiltersSlot: f
2801
+ limitedSchema: _,
2802
+ filtersSlot: V,
2803
+ limitedFiltersSlot: i
2787
2804
  } = ye(
2788
2805
  {
2789
- ...a,
2806
+ ...s,
2790
2807
  schema: p,
2791
2808
  slots: g
2792
2809
  },
2793
- l
2810
+ o
2794
2811
  );
2795
- function r($) {
2796
- return Array.isArray($) ? $.some((B) => B !== "" && B !== void 0 && B !== null) : $ === null ? !0 : $ && typeof $ == "object" ? Object.values($).some((B) => B !== "" && B !== void 0 && B !== null) : $ !== "" && $ !== void 0;
2812
+ function l($) {
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;
2797
2814
  }
2798
- const s = O(() => {
2799
- const $ = Object.keys(V.value ?? {}), B = f.value.map((F) => F.props?.name).filter((F) => typeof F == "string");
2800
- return /* @__PURE__ */ new Set([...$, ...B]);
2801
- }), b = O(() => Object.entries(x.value ?? {}).filter(([$, B]) => s.value.has($) && r(B)).length), h = O(() => {
2802
- const $ = d.value ?? 0, B = b.value ?? 0;
2803
- return Math.max($ - B, 0);
2815
+ const a = O(() => {
2816
+ const $ = Object.keys(_.value ?? {}), S = i.value.map((F) => F.props?.name).filter((F) => typeof F == "string");
2817
+ return /* @__PURE__ */ new Set([...$, ...S]);
2818
+ }), b = O(() => Object.entries(x.value ?? {}).filter(([$, S]) => a.value.has($) && l(S)).length), h = O(() => {
2819
+ const $ = c.value ?? 0, S = b.value ?? 0;
2820
+ return Math.max($ - S, 0);
2804
2821
  }), K = A();
2805
2822
  function M() {
2806
2823
  K.value && K.value.clearAllFilters(!0), k();
2807
2824
  }
2808
- return E(
2809
- () => a.schema,
2825
+ return T(
2826
+ () => s.schema,
2810
2827
  ($) => {
2811
2828
  p.value = $;
2812
2829
  },
2813
2830
  { deep: !0, immediate: !0 }
2814
- ), o({
2815
- clearFilter: c,
2831
+ ), n({
2832
+ clearFilter: f,
2816
2833
  clearAllFilters: k
2817
- }), ($, B) => (i(), w("div", jo, [
2818
- $.schema ? (i(!0), w(U, { key: 0 }, X(Object.entries(e(V)), ([F, D]) => (i(), I(le, J({
2834
+ }), ($, S) => (u(), w("div", jo, [
2835
+ $.schema ? (u(!0), w(U, { key: 0 }, X(Object.entries(e(_)), ([F, D]) => (u(), I(te, J({
2819
2836
  key: F,
2820
2837
  mode: $.mode,
2821
2838
  width: $.width ? $.width : D?.width
2822
2839
  }, { ref_for: !0 }, D, {
2823
2840
  class: [$.itemClass, D?.class],
2824
2841
  "item-class": [$.itemClass, D?.itemClass].filter(Boolean).join(" ") || void 0,
2825
- onChange: B[0] || (B[0] = (R) => e(v)(R.name, R.value)),
2826
- onClear: e(c),
2842
+ onChange: S[0] || (S[0] = (R) => e(v)(R.name, R.value)),
2843
+ onClear: e(f),
2827
2844
  layout: "inline",
2828
2845
  cleanable: !0,
2829
2846
  modelValue: e(x)[F],
2830
2847
  "onUpdate:modelValue": (R) => e(x)[F] = R
2831
- }), null, 16, ["mode", "width", "class", "item-class", "onClear", "modelValue", "onUpdate:modelValue"]))), 128)) : _("", !0),
2832
- (i(!0), w(U, null, X(e(f), (F, D) => (i(), I(le, J({
2848
+ }), null, 16, ["mode", "width", "class", "item-class", "onClear", "modelValue", "onUpdate:modelValue"]))), 128)) : C("", !0),
2849
+ (u(!0), w(U, null, X(e(i), (F, D) => (u(), I(te, J({
2833
2850
  key: "slot-" + D,
2834
2851
  layout: "inline"
2835
2852
  }, { ref_for: !0 }, F.props, {
2836
2853
  class: [$.itemClass, F.props?.class],
2837
2854
  "item-class": [$.itemClass, F.props?.itemClass].filter(Boolean).join(" ") || void 0,
2838
- onChange: B[1] || (B[1] = (R) => e(v)(R.name, R.value)),
2839
- onClear: B[2] || (B[2] = (R) => {
2840
- e(c)(R), e(v)(R, void 0);
2855
+ onChange: S[1] || (S[1] = (R) => e(v)(R.name, R.value)),
2856
+ onClear: S[2] || (S[2] = (R) => {
2857
+ e(f)(R), e(v)(R, void 0);
2841
2858
  }),
2842
2859
  cleanable: !0,
2843
2860
  modelValue: e(x)[F.props.name],
2844
2861
  "onUpdate:modelValue": (R) => e(x)[F.props.name] = R
2845
2862
  }), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"]))), 128)),
2846
- n.value ? (i(), I(ze, J({ key: 1 }, a, {
2863
+ r.value ? (u(), I(ze, J({ key: 1 }, s, {
2847
2864
  schema: $.schema,
2848
2865
  limit: $.limit,
2849
- onChange: B[3] || (B[3] = (F) => e(v)(F.name, F.value)),
2850
- onClearAll: B[4] || (B[4] = (F) => e(k)()),
2851
- onClear: B[5] || (B[5] = (F) => e(c)(F.name)),
2866
+ onChange: S[3] || (S[3] = (F) => e(v)(F.name, F.value)),
2867
+ onClearAll: S[4] || (S[4] = (F) => e(k)()),
2868
+ onClear: S[5] || (S[5] = (F) => e(f)(F.name)),
2852
2869
  mode: $.mode,
2853
2870
  ref_key: "popoverRef",
2854
2871
  ref: K,
@@ -2856,24 +2873,24 @@ const Ue = /* @__PURE__ */ te(so, [["render", uo]]), co = { class: "flex items-c
2856
2873
  "badge-count": h.value
2857
2874
  }), {
2858
2875
  default: ne(() => [
2859
- (i(!0), w(U, null, X(e(C), (F, D) => (i(), I(re(F), J({
2876
+ (u(!0), w(U, null, X(e(V), (F, D) => (u(), I(re(F), J({
2860
2877
  key: "slot-" + D,
2861
2878
  layout: "popover"
2862
2879
  }, { ref_for: !0 }, F.props, { cleanable: !0 }), null, 16))), 128))
2863
2880
  ]),
2864
2881
  _: 1
2865
- }, 16, ["schema", "limit", "mode", "badge-count"])) : _("", !0),
2866
- e(d) > 0 ? (i(), w("button", {
2882
+ }, 16, ["schema", "limit", "mode", "badge-count"])) : C("", !0),
2883
+ e(c) > 0 ? (u(), w("button", {
2867
2884
  key: 2,
2868
2885
  onClick: M,
2869
- class: L([$.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"])
2870
- }, S(e(t)("filter.clear")), 3)) : _("", !0)
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"])
2887
+ }, B(e(t)("filter.clear")), 3)) : C("", !0)
2871
2888
  ]));
2872
2889
  }
2873
2890
  }), Do = {
2874
2891
  key: 0,
2875
2892
  class: "p-2 overflow-y-auto overflow-hidden [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 dark:bg-neutral-800 max-h-[calc(100%-142px)] h-full bg-gray-100"
2876
- }, Ro = { class: "flex items-center vst-filters vsTailwind flex-col w-full" }, Fo = /* @__PURE__ */ q({
2893
+ }, Ro = { class: "flex items-center vst-filters vsTailwind flex-col w-full" }, Fo = /* @__PURE__ */ W({
2877
2894
  __name: "vertical-filter-layout",
2878
2895
  props: {
2879
2896
  schema: {},
@@ -2889,67 +2906,67 @@ const Ue = /* @__PURE__ */ te(so, [["render", uo]]), co = { class: "flex items-c
2889
2906
  itemClass: {}
2890
2907
  },
2891
2908
  emits: ["change", "clear", "clearAll"],
2892
- setup(m, { expose: o, emit: y }) {
2893
- const t = m, a = y, l = pe(), {
2909
+ setup(m, { expose: n, emit: y }) {
2910
+ const t = m, s = y, o = pe(), {
2894
2911
  activeFilter: g,
2895
2912
  activeFilterCount: p,
2896
- onFilterChange: n,
2913
+ onFilterChange: r,
2897
2914
  clearFilter: x,
2898
- clearAllFilters: d,
2915
+ clearAllFilters: c,
2899
2916
  filtersSlot: v
2900
2917
  } = ye({
2901
2918
  ...t,
2902
- slots: l
2903
- }, a);
2904
- return o({
2919
+ slots: o
2920
+ }, s);
2921
+ return n({
2905
2922
  clearFilter: x,
2906
- clearAllFilters: d
2907
- }), (c, k) => c.view === "vertical" ? (i(), w("div", Do, [
2908
- u("div", Ro, [
2909
- e(p) > 0 ? (i(), w("button", {
2923
+ clearAllFilters: c
2924
+ }), (f, k) => f.view === "vertical" ? (u(), w("div", Do, [
2925
+ d("div", Ro, [
2926
+ e(p) > 0 ? (u(), w("button", {
2910
2927
  key: 0,
2911
- onClick: k[0] || (k[0] = (V) => e(d)()),
2928
+ onClick: k[0] || (k[0] = (_) => e(c)()),
2912
2929
  "data-popover-trigger": "",
2913
2930
  "aria-haspopup": "dialog",
2914
2931
  "aria-expanded": "false",
2915
- class: L([c.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: 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"]),
2916
2933
  type: "button"
2917
- }, " Очистити ", 2)) : _("", !0),
2918
- c.schema ? (i(!0), w(U, { key: 1 }, X(Object.entries(c.schema), ([V, C]) => (i(), I(le, J({ layout: "vertical" }, { ref_for: !0 }, C, {
2919
- class: [c.itemClass, C?.class],
2920
- "item-class": [c.itemClass, C?.itemClass].filter(Boolean).join(" ") || void 0,
2921
- onChange: k[1] || (k[1] = (f) => e(n)(f.name, f.value)),
2922
- onClear: k[2] || (k[2] = (f) => {
2923
- e(x)(f), e(n)(f, void 0);
2934
+ }, " Очистити ", 2)) : C("", !0),
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, {
2936
+ class: [f.itemClass, V?.class],
2937
+ "item-class": [f.itemClass, V?.itemClass].filter(Boolean).join(" ") || void 0,
2938
+ onChange: k[1] || (k[1] = (i) => e(r)(i.name, i.value)),
2939
+ onClear: k[2] || (k[2] = (i) => {
2940
+ e(x)(i), e(r)(i, void 0);
2924
2941
  }),
2925
- modelValue: e(g)[V],
2926
- "onUpdate:modelValue": (f) => e(g)[V] = f,
2942
+ modelValue: e(g)[_],
2943
+ "onUpdate:modelValue": (i) => e(g)[_] = i,
2927
2944
  showClean: !0
2928
- }), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"]))), 256)) : _("", !0),
2929
- (i(!0), w(U, null, X(e(v), (V, C) => (i(), I(le, J({
2930
- key: "slot-" + C,
2945
+ }), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"]))), 256)) : C("", !0),
2946
+ (u(!0), w(U, null, X(e(v), (_, V) => (u(), I(te, J({
2947
+ key: "slot-" + V,
2931
2948
  layout: "vertical"
2932
- }, { ref_for: !0 }, V.props, {
2933
- class: [c.itemClass, V.props?.class],
2934
- "item-class": [c.itemClass, V.props?.itemClass].filter(Boolean).join(" ") || void 0,
2935
- onChange: k[3] || (k[3] = (f) => e(n)(f.name, f.value)),
2936
- onClear: k[4] || (k[4] = (f) => {
2937
- e(x)(f), e(n)(f, void 0);
2949
+ }, { ref_for: !0 }, _.props, {
2950
+ class: [f.itemClass, _.props?.class],
2951
+ "item-class": [f.itemClass, _.props?.itemClass].filter(Boolean).join(" ") || void 0,
2952
+ onChange: k[3] || (k[3] = (i) => e(r)(i.name, i.value)),
2953
+ onClear: k[4] || (k[4] = (i) => {
2954
+ e(x)(i), e(r)(i, void 0);
2938
2955
  }),
2939
- modelValue: e(g)[V.props.name],
2940
- "onUpdate:modelValue": (f) => e(g)[V.props.name] = f,
2956
+ modelValue: e(g)[_.props.name],
2957
+ "onUpdate:modelValue": (i) => e(g)[_.props.name] = i,
2941
2958
  showClean: !0
2942
2959
  }), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"]))), 128))
2943
2960
  ])
2944
- ])) : _("", !0);
2961
+ ])) : C("", !0);
2945
2962
  }
2946
2963
  }), Ko = ["onKeydown"], Mo = ["disabled"], Lo = {
2947
2964
  key: 0,
2948
2965
  class: "ml-2 inline-flex min-h-[18px] min-w-[18px] items-center justify-center rounded-full bg-blue-500 px-1.5 text-[11px] font-semibold text-white"
2949
- }, Oo = { class: "rounded-2xl border border-slate-300/35 bg-white/95 p-4 shadow-2xl backdrop-blur-sm" }, Eo = { class: "mb-3 flex items-center justify-between" }, To = { class: "text-[15px] font-semibold text-slate-800" }, Io = { "aria-hidden": "true" }, Uo = { class: "flex max-h-80 flex-col gap-1 overflow-y-auto" }, zo = {
2966
+ }, Eo = { class: "rounded-2xl border border-slate-300/35 bg-white/95 p-4 shadow-2xl backdrop-blur-sm" }, Oo = { class: "mb-3 flex items-center justify-between" }, To = { class: "text-[15px] font-semibold text-slate-800" }, Io = { "aria-hidden": "true" }, Uo = { class: "flex max-h-80 flex-col gap-1 overflow-y-auto" }, zo = {
2950
2967
  key: 0,
2951
2968
  class: "mt-3 flex justify-end"
2952
- }, No = /* @__PURE__ */ q({
2969
+ }, No = /* @__PURE__ */ W({
2953
2970
  __name: "popover-inline-filter-layout",
2954
2971
  props: {
2955
2972
  schema: {},
@@ -2965,47 +2982,47 @@ const Ue = /* @__PURE__ */ te(so, [["render", uo]]), co = { class: "flex items-c
2965
2982
  itemClass: {}
2966
2983
  },
2967
2984
  emits: ["change", "clear", "clearAll"],
2968
- setup(m, { emit: o }) {
2969
- const y = oe(), t = m, a = o, l = A({}), g = pe(), {
2985
+ setup(m, { emit: n }) {
2986
+ const y = le(), t = m, s = n, o = A({}), g = pe(), {
2970
2987
  activeFilter: p,
2971
- activeFilterCount: n,
2988
+ activeFilterCount: r,
2972
2989
  onFilterChange: x,
2973
- clearFilter: d,
2990
+ clearFilter: c,
2974
2991
  clearAllFilters: v,
2975
- filtersSlot: c
2992
+ filtersSlot: f
2976
2993
  } = ye(
2977
2994
  {
2978
2995
  ...t,
2979
- schema: l.value,
2996
+ schema: o.value,
2980
2997
  slots: g
2981
2998
  },
2982
- a
2983
- ), k = A(null), V = A(null), C = qe({ open: !1, top: 0, left: 0 }), f = O(() => C.open), r = O(() => !!t.disabled), s = O(() => l.value || {}), b = O(() => t.title ?? "Фільтр"), h = O(() => !!g.trigger), K = O(() => [
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(() => [
2984
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",
2985
- r.value ? "cursor-not-allowed opacity-60" : "cursor-pointer"
2986
- ]), M = O(() => C.open ? {
3002
+ l.value ? "cursor-not-allowed opacity-60" : "cursor-pointer"
3003
+ ]), M = O(() => V.open ? {
2987
3004
  position: "absolute",
2988
- top: `${C.top}px`,
2989
- left: `${C.left}px`,
3005
+ top: `${V.top}px`,
3006
+ left: `${V.left}px`,
2990
3007
  transform: "translateX(-50%)",
2991
3008
  zIndex: 1e3
2992
3009
  } : { display: "none" });
2993
3010
  function $() {
2994
- C.open = !1;
3011
+ V.open = !1;
2995
3012
  }
2996
- function B() {
3013
+ function S() {
2997
3014
  if (!k.value) return;
2998
3015
  const z = k.value.getBoundingClientRect();
2999
- C.top = z.bottom + window.scrollY + 8, C.left = z.left + z.width / 2 + window.scrollX;
3016
+ V.top = z.bottom + window.scrollY + 8, V.left = z.left + z.width / 2 + window.scrollX;
3000
3017
  }
3001
3018
  function F() {
3002
- C.open = !C.open, C.open && fe(B);
3019
+ V.open = !V.open, V.open && fe(S);
3003
3020
  }
3004
3021
  function D() {
3005
- r.value || F();
3022
+ l.value || F();
3006
3023
  }
3007
3024
  function R() {
3008
- C.open && B();
3025
+ V.open && S();
3009
3026
  }
3010
3027
  function N() {
3011
3028
  v();
@@ -3014,37 +3031,37 @@ const Ue = /* @__PURE__ */ te(so, [["render", uo]]), co = { class: "flex items-c
3014
3031
  window.addEventListener("resize", R), window.addEventListener("scroll", R, !0);
3015
3032
  }), me(() => {
3016
3033
  window.removeEventListener("resize", R), window.removeEventListener("scroll", R, !0);
3017
- }), E(
3034
+ }), T(
3018
3035
  () => t.schema,
3019
3036
  (z) => {
3020
3037
  if (!z) {
3021
- l.value = {};
3038
+ o.value = {};
3022
3039
  return;
3023
3040
  }
3024
3041
  if (Array.isArray(z)) {
3025
- const j = z.filter((T) => T && (T.name || T.id)).map((T) => {
3026
- const P = T.name || T.id;
3027
- return [P, { ...T, name: P }];
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 }];
3028
3045
  });
3029
- l.value = Object.fromEntries(j);
3046
+ o.value = Object.fromEntries(j);
3030
3047
  return;
3031
3048
  }
3032
- l.value = z;
3049
+ o.value = z;
3033
3050
  },
3034
3051
  { deep: !0, immediate: !0 }
3035
- ), E(
3052
+ ), T(
3036
3053
  () => t.disabled,
3037
3054
  (z) => {
3038
3055
  z && $();
3039
3056
  }
3040
- ), (z, j) => (i(), w("div", {
3057
+ ), (z, j) => (u(), w("div", {
3041
3058
  class: "relative inline-flex",
3042
3059
  ref_key: "anchor",
3043
3060
  ref: k
3044
3061
  }, [
3045
- h.value ? (i(), w("span", {
3062
+ h.value ? (u(), w("span", {
3046
3063
  key: 0,
3047
- class: L(["inline-flex", r.value ? "cursor-not-allowed opacity-60 pointer-events-none" : "cursor-pointer"]),
3064
+ class: E(["inline-flex", l.value ? "cursor-not-allowed opacity-60 pointer-events-none" : "cursor-pointer"]),
3048
3065
  role: "button",
3049
3066
  tabindex: "0",
3050
3067
  "data-popover-trigger": "",
@@ -3056,86 +3073,86 @@ const Ue = /* @__PURE__ */ te(so, [["render", uo]]), co = { class: "flex items-c
3056
3073
  }, [
3057
3074
  de(z.$slots, "trigger", {
3058
3075
  toggle: D,
3059
- open: f.value,
3060
- disabled: r.value,
3061
- activeCount: e(n)
3076
+ open: i.value,
3077
+ disabled: l.value,
3078
+ activeCount: e(r)
3062
3079
  })
3063
- ], 42, Ko)) : (i(), w("button", {
3080
+ ], 42, Ko)) : (u(), w("button", {
3064
3081
  key: 1,
3065
- class: L(K.value),
3082
+ class: E(K.value),
3066
3083
  type: "button",
3067
- disabled: r.value,
3084
+ disabled: l.value,
3068
3085
  onClick: se(D, ["prevent", "stop"]),
3069
3086
  "data-popover-trigger": ""
3070
3087
  }, [
3071
- Q(Ue, { class: "h-4 w-4" }),
3072
- e(n) > 0 ? (i(), w("div", Lo, S(e(n)), 1)) : _("", !0)
3088
+ q(Ue, { class: "h-4 w-4" }),
3089
+ e(r) > 0 ? (u(), w("div", Lo, B(e(r)), 1)) : C("", !0)
3073
3090
  ], 10, Mo)),
3074
- (i(), I(ge, { to: "body" }, [
3075
- f.value ? (i(), w("div", {
3091
+ (u(), I(ge, { to: "body" }, [
3092
+ i.value ? (u(), w("div", {
3076
3093
  key: 0,
3077
- class: L(["absolute", typeof z.width == "number" ? `min-w-[${z.width + 32 + (Object.keys(s.value).length > 7 ? 20 : 0)}px]` : "min-w-[268px] "]),
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] "]),
3078
3095
  style: be(M.value),
3079
3096
  ref_key: "panel",
3080
- ref: V,
3097
+ ref: _,
3081
3098
  onClick: j[4] || (j[4] = se(() => {
3082
3099
  }, ["stop"]))
3083
3100
  }, [
3084
- u("div", Oo, [
3085
- u("div", Eo, [
3086
- u("h3", To, S(b.value), 1),
3087
- u("button", {
3101
+ d("div", Eo, [
3102
+ d("div", Oo, [
3103
+ d("h3", To, B(b.value), 1),
3104
+ d("button", {
3088
3105
  type: "button",
3089
3106
  class: "inline-flex h-6 w-6 items-center justify-center rounded-full border-0 bg-slate-300/40 text-slate-600 transition-colors hover:bg-blue-200/60 hover:text-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-200",
3090
3107
  onClick: $
3091
3108
  }, [
3092
- u("span", Io, [
3093
- Q(Ce, { class: "h-4 w-4" })
3109
+ d("span", Io, [
3110
+ q(Ce, { class: "h-4 w-4" })
3094
3111
  ]),
3095
- j[5] || (j[5] = u("span", { class: "sr-only" }, "Закрити", -1))
3112
+ j[5] || (j[5] = d("span", { class: "sr-only" }, "Закрити", -1))
3096
3113
  ])
3097
3114
  ]),
3098
- u("div", Uo, [
3099
- Object.keys(s.value).length ? (i(!0), w(U, { key: 0 }, X(Object.entries(s.value), ([T, P]) => (i(), I(le, J({ key: T }, { ref_for: !0 }, { ...P, layout: "inline" }, {
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" }, {
3100
3117
  width: z.width ? z.width : P?.width,
3101
3118
  class: [z.itemClass, P?.class],
3102
3119
  "item-class": [z.itemClass, P?.itemClass].filter(Boolean).join(" ") || void 0,
3103
3120
  cleanable: !0,
3104
- modelValue: e(p)[T],
3105
- "onUpdate:modelValue": (Y) => e(p)[T] = Y,
3121
+ modelValue: e(p)[L],
3122
+ "onUpdate:modelValue": (Y) => e(p)[L] = Y,
3106
3123
  onChange: j[0] || (j[0] = (Y) => e(x)(Y.name, Y.value)),
3107
3124
  onClear: j[1] || (j[1] = (Y) => {
3108
- e(d)(Y), e(x)(Y, void 0);
3125
+ e(c)(Y), e(x)(Y, void 0);
3109
3126
  })
3110
- }), null, 16, ["width", "class", "item-class", "modelValue", "onUpdate:modelValue"]))), 128)) : _("", !0),
3111
- (i(!0), w(U, null, X(e(c), (T, P) => (i(), I(le, J({
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({
3112
3129
  key: "slot-" + P,
3113
3130
  ref_for: !0
3114
- }, { ...T.props, layout: "inline" }, {
3115
- class: [z.itemClass, T.props?.class],
3116
- "item-class": [z.itemClass, T.props?.itemClass].filter(Boolean).join(" ") || void 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,
3117
3134
  cleanable: !0,
3118
- modelValue: e(p)[T.props.name],
3119
- "onUpdate:modelValue": (Y) => e(p)[T.props.name] = Y,
3135
+ modelValue: e(p)[L.props.name],
3136
+ "onUpdate:modelValue": (Y) => e(p)[L.props.name] = Y,
3120
3137
  onChange: j[2] || (j[2] = (Y) => e(x)(Y.name, Y.value)),
3121
3138
  onClear: j[3] || (j[3] = (Y) => {
3122
- e(d)(Y), e(x)(Y, void 0);
3139
+ e(c)(Y), e(x)(Y, void 0);
3123
3140
  })
3124
3141
  }), null, 16, ["class", "item-class", "modelValue", "onUpdate:modelValue"]))), 128))
3125
3142
  ]),
3126
- e(n) > 0 ? (i(), w("div", zo, [
3127
- u("button", {
3143
+ e(r) > 0 ? (u(), w("div", zo, [
3144
+ d("button", {
3128
3145
  type: "button",
3129
- class: L([z.itemClass, "text-sm font-semibold text-blue-600 transition-colors hover:text-blue-700 focus:outline-none"]),
3146
+ class: E([z.itemClass, "text-sm font-semibold text-blue-600 transition-colors hover:text-blue-700 focus:outline-none"]),
3130
3147
  onClick: N
3131
- }, S(e(y)("filter.clear")), 3)
3132
- ])) : _("", !0)
3148
+ }, B(e(y)("filter.clear")), 3)
3149
+ ])) : C("", !0)
3133
3150
  ])
3134
- ], 6)) : _("", !0)
3151
+ ], 6)) : C("", !0)
3135
3152
  ]))
3136
3153
  ], 512));
3137
3154
  }
3138
- }), Ke = /* @__PURE__ */ q({
3155
+ }), Ke = /* @__PURE__ */ W({
3139
3156
  __name: "filter",
3140
3157
  props: {
3141
3158
  schema: {},
@@ -3151,58 +3168,58 @@ const Ue = /* @__PURE__ */ te(so, [["render", uo]]), co = { class: "flex items-c
3151
3168
  itemClass: {}
3152
3169
  },
3153
3170
  emits: ["change", "clear", "clearAll"],
3154
- setup(m, { expose: o, emit: y }) {
3155
- const t = m, a = A(n(t.value ?? {}));
3156
- E(
3171
+ setup(m, { expose: n, emit: y }) {
3172
+ const t = m, s = A(r(t.value ?? {}));
3173
+ T(
3157
3174
  () => t.value,
3158
- async (f) => {
3159
- a.value = n(f ?? {}), (!f || Object.keys(f).length === 0) && (await fe(), g.value?.clearAllFilters?.(!0));
3175
+ async (i) => {
3176
+ s.value = r(i ?? {}), (!i || Object.keys(i).length === 0) && (await fe(), g.value?.clearAllFilters?.(!0));
3160
3177
  },
3161
3178
  { deep: !0, immediate: !0 }
3162
3179
  );
3163
- const l = y, g = A(), p = pe();
3164
- function n(f) {
3165
- if (Array.isArray(f))
3166
- return f.map((r) => n(r));
3167
- if (f !== null && typeof f == "object") {
3168
- const r = ue(f), s = {};
3169
- for (const b in r)
3170
- s[b] = n(r[b]);
3171
- return s;
3180
+ const o = y, g = A(), p = pe();
3181
+ function r(i) {
3182
+ if (Array.isArray(i))
3183
+ return i.map((l) => r(l));
3184
+ if (i !== null && typeof i == "object") {
3185
+ const l = ue(i), a = {};
3186
+ for (const b in l)
3187
+ a[b] = r(l[b]);
3188
+ return a;
3172
3189
  }
3173
- return f;
3190
+ return i;
3174
3191
  }
3175
- function x(f, r) {
3176
- r !== void 0 ? a.value = {
3177
- ...a.value,
3178
- [f]: r
3179
- } : delete a.value[f], l("change", {
3180
- data: n(a.value),
3181
- name: f,
3182
- value: n(r)
3192
+ function x(i, l) {
3193
+ l !== void 0 ? s.value = {
3194
+ ...s.value,
3195
+ [i]: l
3196
+ } : delete s.value[i], o("change", {
3197
+ data: r(s.value),
3198
+ name: i,
3199
+ value: r(l)
3183
3200
  });
3184
3201
  }
3185
- function d(f) {
3186
- delete a.value[f], l("clear", {
3187
- data: n(a.value),
3188
- name: f
3189
- }), l("change", {
3190
- data: n(a.value),
3191
- name: f,
3202
+ function c(i) {
3203
+ delete s.value[i], o("clear", {
3204
+ data: r(s.value),
3205
+ name: i
3206
+ }), o("change", {
3207
+ data: r(s.value),
3208
+ name: i,
3192
3209
  value: null
3193
3210
  });
3194
3211
  }
3195
3212
  function v() {
3196
- a.value = {}, l("clear", {
3197
- data: n(a.value),
3213
+ s.value = {}, o("clear", {
3214
+ data: r(s.value),
3198
3215
  name: "ALL"
3199
- }), l("change", {
3200
- data: n(a.value),
3216
+ }), o("change", {
3217
+ data: r(s.value),
3201
3218
  name: "ALL",
3202
3219
  value: null
3203
3220
  });
3204
3221
  }
3205
- const c = A({});
3222
+ const f = A({});
3206
3223
  function k() {
3207
3224
  switch (t.view) {
3208
3225
  case "inline":
@@ -3217,75 +3234,75 @@ const Ue = /* @__PURE__ */ te(so, [["render", uo]]), co = { class: "flex items-c
3217
3234
  return Fe;
3218
3235
  }
3219
3236
  }
3220
- E(
3237
+ T(
3221
3238
  () => t.schema,
3222
- (f) => {
3223
- if (!f) {
3224
- c.value = {};
3239
+ (i) => {
3240
+ if (!i) {
3241
+ f.value = {};
3225
3242
  return;
3226
3243
  }
3227
- if (Array.isArray(f) && !f.length) {
3228
- c.value = {};
3244
+ if (Array.isArray(i) && !i.length) {
3245
+ f.value = {};
3229
3246
  return;
3230
3247
  }
3231
- Array.isArray(f) ? c.value = f.filter((r) => r.type).reduce((r, s) => (Object.assign(s, {
3232
- name: s.id || s.name,
3233
- type: { datepicker: "date" }[s.type.toLowerCase()] || s.type.toLowerCase(),
3234
- label: s.label || s.ua
3235
- }), r[s.name] = s, s.data && !s.api && !s.options && Object.assign(s, { api: `/api/suggest/${s.data}` }), r), {}) : (Object.entries(f).forEach(([r, s]) => {
3236
- Object.assign(s, { name: r || s.name || s.id, type: s.type.toLowerCase() });
3237
- }), c.value = { ...f });
3248
+ Array.isArray(i) ? f.value = i.filter((l) => l.type).reduce((l, a) => (Object.assign(a, {
3249
+ name: a.id || a.name,
3250
+ type: { datepicker: "date" }[a.type.toLowerCase()] || a.type.toLowerCase(),
3251
+ label: a.label || a.ua
3252
+ }), l[a.name] = a, a.data && !a.api && !a.options && Object.assign(a, { api: `/api/suggest/${a.data}` }), l), {}) : (Object.entries(i).forEach(([l, a]) => {
3253
+ Object.assign(a, { name: l || a.name || a.id, type: a.type.toLowerCase() });
3254
+ }), f.value = { ...i });
3238
3255
  },
3239
3256
  { immediate: !0, deep: !0 }
3240
3257
  );
3241
- function V(f) {
3242
- g.value.clearFilter(f), d(f);
3258
+ function _(i) {
3259
+ g.value.clearFilter(i), c(i);
3243
3260
  }
3244
- function C() {
3261
+ function V() {
3245
3262
  g.value.clearAllFilters(), v();
3246
3263
  }
3247
- return E(
3248
- () => a.value,
3249
- (f) => {
3264
+ return T(
3265
+ () => s.value,
3266
+ (i) => {
3250
3267
  if (t.history) {
3251
- const r = new URL(window.location.href), s = new URLSearchParams(window.location.search);
3252
- Object.keys(f).length > 0 ? s.set(
3268
+ const l = new URL(window.location.href), a = new URLSearchParams(window.location.search);
3269
+ Object.keys(i).length > 0 ? a.set(
3253
3270
  "filter",
3254
- Object.entries(f).filter(([, b]) => b).map(([b, h]) => `${b}=${h}`).join("|")
3255
- ) : s.delete("filter"), r.search = decodeURI(s.toString()), window.history.pushState({}, "", r);
3271
+ Object.entries(i).filter(([, b]) => b).map(([b, h]) => `${b}=${h}`).join("|")
3272
+ ) : a.delete("filter"), l.search = decodeURI(a.toString()), window.history.pushState({}, "", l);
3256
3273
  }
3257
3274
  }
3258
- ), o({
3259
- clearAllFilters: C,
3260
- clearFilter: V
3261
- }), (f, r) => (i(), I(re(k()), J(t, {
3262
- schema: c.value,
3263
- onChange: r[0] || (r[0] = (s) => x(s.name, s.value)),
3264
- onClear: r[1] || (r[1] = (s) => d(s.name)),
3275
+ ), n({
3276
+ clearAllFilters: V,
3277
+ clearFilter: _
3278
+ }), (i, l) => (u(), I(re(k()), J(t, {
3279
+ schema: f.value,
3280
+ onChange: l[0] || (l[0] = (a) => x(a.name, a.value)),
3281
+ onClear: l[1] || (l[1] = (a) => c(a.name)),
3265
3282
  onClearAll: v,
3266
3283
  ref_key: "filterRef",
3267
3284
  ref: g
3268
- }), Qe({
3285
+ }), He({
3269
3286
  default: ne(() => [
3270
- de(f.$slots, "default")
3287
+ de(i.$slots, "default")
3271
3288
  ]),
3272
3289
  _: 2
3273
3290
  }, [
3274
3291
  e(p).trigger ? {
3275
3292
  name: "trigger",
3276
- fn: ne((s) => [
3277
- de(f.$slots, "trigger", He(Ge(s)))
3293
+ fn: ne((a) => [
3294
+ de(i.$slots, "trigger", Qe(Ge(a)))
3278
3295
  ]),
3279
3296
  key: "0"
3280
3297
  } : void 0
3281
3298
  ]), 1040, ["schema"]));
3282
3299
  }
3283
3300
  });
3284
- Ke.install = function(o) {
3285
- o.component("Filter", Ke), o.component("FilterField", le);
3301
+ Ke.install = function(n) {
3302
+ n.component("Filter", Ke), n.component("FilterField", te);
3286
3303
  };
3287
3304
  export {
3288
3305
  Ke as Filter,
3289
- le as FilterField,
3306
+ te as FilterField,
3290
3307
  Ke as default
3291
3308
  };