@opengis/filter 0.1.20 → 0.1.22

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