voiptime-components 0.0.29 → 1.0.1

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.es.js CHANGED
@@ -1,18 +1,18 @@
1
- import { createElementBlock as m, openBlock as p, createElementVNode as h, createStaticVNode as Ae, defineComponent as le, computed as x, createBlock as ae, createCommentVNode as D, resolveDynamicComponent as Oe, useSlots as je, resolveDirective as Ne, withDirectives as Le, normalizeClass as z, renderSlot as pe, Teleport as st, normalizeStyle as re, withModifiers as he, toDisplayString as te, watch as me, Fragment as ne, renderList as oe, vModelSelect as rt, createVNode as Z, withCtx as xe, createTextVNode as _e, ref as A, createApp as it, h as be, onMounted as ve, onUnmounted as $e, nextTick as at, mergeModels as Re, useModel as ct, reactive as ut, provide as dt, unref as q, inject as pt } from "vue";
1
+ import { createElementBlock as v, openBlock as p, createElementVNode as h, createStaticVNode as Oe, defineComponent as le, computed as x, createBlock as ae, createCommentVNode as D, resolveDynamicComponent as je, useSlots as Ne, resolveDirective as Fe, withDirectives as Le, normalizeClass as z, renderSlot as pe, Teleport as ct, normalizeStyle as re, withModifiers as he, toDisplayString as te, watch as me, Fragment as ne, renderList as oe, vModelSelect as ut, createVNode as Z, withCtx as xe, createTextVNode as _e, ref as A, createApp as dt, h as be, onMounted as ve, onUnmounted as $e, nextTick as pt, mergeModels as Te, useModel as ht, reactive as mt, provide as vt, unref as U, inject as ft } from "vue";
2
2
  const H = (t, e) => {
3
3
  const o = t.__vccOpts || t;
4
4
  for (const [n, s] of e)
5
5
  o[n] = s;
6
6
  return o;
7
- }, ht = {}, mt = {
7
+ }, _t = {}, gt = {
8
8
  width: "20",
9
9
  height: "20",
10
10
  viewBox: "0 0 20 20",
11
11
  fill: "none",
12
12
  xmlns: "http://www.w3.org/2000/svg"
13
13
  };
14
- function vt(t, e) {
15
- return p(), m("svg", mt, e[0] || (e[0] = [
14
+ function Ct(t, e) {
15
+ return p(), v("svg", gt, e[0] || (e[0] = [
16
16
  h("path", {
17
17
  d: "M14 8L10 12L6 8",
18
18
  stroke: "currentColor",
@@ -22,15 +22,15 @@ function vt(t, e) {
22
22
  }, null, -1)
23
23
  ]));
24
24
  }
25
- const ft = /* @__PURE__ */ H(ht, [["render", vt]]), _t = {}, gt = {
25
+ const wt = /* @__PURE__ */ H(_t, [["render", Ct]]), kt = {}, bt = {
26
26
  width: "20",
27
27
  height: "20",
28
28
  viewBox: "0 0 20 20",
29
29
  fill: "none",
30
30
  xmlns: "http://www.w3.org/2000/svg"
31
31
  };
32
- function Ct(t, e) {
33
- return p(), m("svg", gt, e[0] || (e[0] = [
32
+ function yt(t, e) {
33
+ return p(), v("svg", bt, e[0] || (e[0] = [
34
34
  h("path", {
35
35
  d: "M6 12L10 8L14 12",
36
36
  stroke: "currentColor",
@@ -40,15 +40,15 @@ function Ct(t, e) {
40
40
  }, null, -1)
41
41
  ]));
42
42
  }
43
- const wt = /* @__PURE__ */ H(_t, [["render", Ct]]), kt = {}, bt = {
43
+ const xt = /* @__PURE__ */ H(kt, [["render", yt]]), Mt = {}, Lt = {
44
44
  width: "14",
45
45
  height: "15",
46
46
  viewBox: "0 0 14 15",
47
47
  fill: "none",
48
48
  xmlns: "http://www.w3.org/2000/svg"
49
49
  };
50
- function yt(t, e) {
51
- return p(), m("svg", bt, e[0] || (e[0] = [
50
+ function $t(t, e) {
51
+ return p(), v("svg", Lt, e[0] || (e[0] = [
52
52
  h("path", {
53
53
  d: "M11.8789 4.90517L11.2561 4.20124C10.4045 3.33504 9.28504 2.7626 8.06789 2.5709C6.85074 2.3792 5.60245 2.57874 4.5127 3.13917C3.42296 3.69961 2.55134 4.59032 2.03031 5.67593C1.50928 6.76155 1.36732 7.98272 1.626 9.15387C1.88469 10.325 2.52987 11.3821 3.46351 12.1645C4.39716 12.9469 5.56821 13.4119 6.79871 13.4887C8.02921 13.5655 9.25189 13.25 10.2809 12.5901C11.31 11.9302 12.0891 10.962 12.5 9.83266",
54
54
  stroke: "currentColor",
@@ -62,15 +62,15 @@ function yt(t, e) {
62
62
  }, null, -1)
63
63
  ]));
64
64
  }
65
- const xt = /* @__PURE__ */ H(kt, [["render", yt]]), Mt = {}, Lt = {
65
+ const St = /* @__PURE__ */ H(Mt, [["render", $t]]), It = {}, Vt = {
66
66
  width: "21",
67
67
  height: "20",
68
68
  viewBox: "0 0 21 20",
69
69
  fill: "none",
70
70
  xmlns: "http://www.w3.org/2000/svg"
71
71
  };
72
- function $t(t, e) {
73
- return p(), m("svg", Lt, e[0] || (e[0] = [
72
+ function Bt(t, e) {
73
+ return p(), v("svg", Vt, e[0] || (e[0] = [
74
74
  h("path", {
75
75
  d: "M8.60352 6L12.6035 10L8.60352 14",
76
76
  stroke: "currentColor",
@@ -80,15 +80,15 @@ function $t(t, e) {
80
80
  }, null, -1)
81
81
  ]));
82
82
  }
83
- const St = /* @__PURE__ */ H(Mt, [["render", $t]]), It = {}, Vt = {
83
+ const Rt = /* @__PURE__ */ H(It, [["render", Bt]]), Tt = {}, Et = {
84
84
  width: "21",
85
85
  height: "20",
86
86
  viewBox: "0 0 21 20",
87
87
  fill: "none",
88
88
  xmlns: "http://www.w3.org/2000/svg"
89
89
  };
90
- function Bt(t, e) {
91
- return p(), m("svg", Vt, e[0] || (e[0] = [
90
+ function zt(t, e) {
91
+ return p(), v("svg", Et, e[0] || (e[0] = [
92
92
  h("path", {
93
93
  d: "M12.3984 14L8.39844 10L12.3984 6",
94
94
  stroke: "currentColor",
@@ -98,15 +98,15 @@ function Bt(t, e) {
98
98
  }, null, -1)
99
99
  ]));
100
100
  }
101
- const Rt = /* @__PURE__ */ H(It, [["render", Bt]]), Tt = {}, Et = {
101
+ const Ht = /* @__PURE__ */ H(Tt, [["render", zt]]), Wt = {}, Dt = {
102
102
  width: "20",
103
103
  height: "20",
104
104
  viewBox: "0 0 20 20",
105
105
  fill: "none",
106
106
  xmlns: "http://www.w3.org/2000/svg"
107
107
  };
108
- function zt(t, e) {
109
- return p(), m("svg", Et, e[0] || (e[0] = [
108
+ function Pt(t, e) {
109
+ return p(), v("svg", Dt, e[0] || (e[0] = [
110
110
  h("path", {
111
111
  d: "M12.5 1.66406L11.1783 2.94156C10.6233 3.47906 10.345 3.7474 10 3.7474C9.655 3.7474 9.37667 3.47906 8.82167 2.94156L7.5 1.66406M14.5833 5.83073C15.7533 5.83073 16.3392 5.83073 16.7592 6.11156C16.9412 6.23319 17.0975 6.3895 17.2192 6.57156C17.5 6.99156 17.5 7.5774 17.5 8.7474V15.4141C17.5 16.5841 17.5 17.1699 17.2192 17.5899C17.0975 17.772 16.9412 17.9283 16.7592 18.0499C16.3392 18.3307 15.7533 18.3307 14.5833 18.3307C13.4133 18.3307 12.8275 18.3307 12.4075 18.0499C12.2254 17.9283 12.0691 17.772 11.9475 17.5899C11.6667 17.1699 11.6667 16.5841 11.6667 15.4141V8.7474C11.6667 7.5774 11.6667 6.99156 11.9475 6.57156C12.0691 6.3895 12.2254 6.23319 12.4075 6.11156C12.8275 5.83073 13.4133 5.83073 14.5833 5.83073ZM5.41667 5.83073C6.58667 5.83073 7.1725 5.83073 7.5925 6.11156C7.77456 6.23319 7.93087 6.3895 8.0525 6.57156C8.33333 6.99156 8.33333 7.5774 8.33333 8.7474V15.4141C8.33333 16.5841 8.33333 17.1699 8.0525 17.5899C7.93087 17.772 7.77456 17.9283 7.5925 18.0499C7.1725 18.3307 6.58667 18.3307 5.41667 18.3307C4.24667 18.3307 3.66083 18.3307 3.24083 18.0499C3.05877 17.9283 2.90246 17.772 2.78083 17.5899C2.5 17.1699 2.5 16.5841 2.5 15.4141V8.7474C2.5 7.5774 2.5 6.99156 2.78083 6.57156C2.90246 6.3895 3.05877 6.23319 3.24083 6.11156C3.66083 5.83073 4.24667 5.83073 5.41667 5.83073Z",
112
112
  stroke: "currentColor",
@@ -116,15 +116,15 @@ function zt(t, e) {
116
116
  }, null, -1)
117
117
  ]));
118
118
  }
119
- const Ht = /* @__PURE__ */ H(Tt, [["render", zt]]), Wt = {}, Dt = {
119
+ const At = /* @__PURE__ */ H(Wt, [["render", Pt]]), Ot = {}, jt = {
120
120
  width: "20",
121
121
  height: "20",
122
122
  viewBox: "0 0 20 20",
123
123
  fill: "none",
124
124
  xmlns: "http://www.w3.org/2000/svg"
125
125
  };
126
- function Pt(t, e) {
127
- return p(), m("svg", Dt, e[0] || (e[0] = [
126
+ function Nt(t, e) {
127
+ return p(), v("svg", jt, e[0] || (e[0] = [
128
128
  h("path", {
129
129
  d: "M8 3V5.2225M8 5.2225V10.7775M8 5.2225L9.875 4.25M8 5.2225L6.125 4.25M8 10.7775V13M8 10.7775L6.125 11.75M8 10.7775L9.875 11.75M13 8H10.7775M10.7775 8H5.2225M10.7775 8L11.75 9.875M10.7775 8L11.75 6.125M5.2225 8H3M5.2225 8L4.25 6.125M5.2225 8L4.25 9.875",
130
130
  stroke: "currentColor",
@@ -140,15 +140,15 @@ function Pt(t, e) {
140
140
  }, null, -1)
141
141
  ]));
142
142
  }
143
- const At = /* @__PURE__ */ H(Wt, [["render", Pt]]), Ot = {}, jt = {
143
+ const Ft = /* @__PURE__ */ H(Ot, [["render", Nt]]), Zt = {}, Ut = {
144
144
  width: "20",
145
145
  height: "20",
146
146
  viewBox: "0 0 20 20",
147
147
  fill: "none",
148
148
  xmlns: "http://www.w3.org/2000/svg"
149
149
  };
150
- function Nt(t, e) {
151
- return p(), m("svg", jt, e[0] || (e[0] = [
150
+ function qt(t, e) {
151
+ return p(), v("svg", Ut, e[0] || (e[0] = [
152
152
  h("path", {
153
153
  d: "M8 3V5.2225M8 5.2225V10.7775M8 5.2225L9.875 4.25M8 5.2225L6.125 4.25M8 10.7775V13M8 10.7775L6.125 11.75M8 10.7775L9.875 11.75M13 8H10.7775M10.7775 8H5.2225M10.7775 8L11.75 9.875M10.7775 8L11.75 6.125M5.2225 8H3M5.2225 8L4.25 6.125M5.2225 8L4.25 9.875",
154
154
  stroke: "currentColor",
@@ -164,15 +164,15 @@ function Nt(t, e) {
164
164
  }, null, -1)
165
165
  ]));
166
166
  }
167
- const Ft = /* @__PURE__ */ H(Ot, [["render", Nt]]), Zt = {}, Ut = {
167
+ const Kt = /* @__PURE__ */ H(Zt, [["render", qt]]), Xt = {}, Gt = {
168
168
  xmlns: "http://www.w3.org/2000/svg",
169
169
  width: "60",
170
170
  height: "60",
171
171
  viewBox: "0 0 60 60",
172
172
  fill: "none"
173
173
  };
174
- function qt(t, e) {
175
- return p(), m("svg", Ut, e[0] || (e[0] = [
174
+ function Yt(t, e) {
175
+ return p(), v("svg", Gt, e[0] || (e[0] = [
176
176
  h("path", {
177
177
  d: "M24.195 7H18.625C17.1332 7 15.7024 7.59263 14.6475 8.64752C13.5926 9.70242 13 11.1332 13 12.625V46.375C13 47.8668 13.5926 49.2976 14.6475 50.3525C15.7024 51.4074 17.1332 52 18.625 52H41.125C42.6168 52 44.0476 51.4074 45.1025 50.3525C46.1574 49.2976 46.75 47.8668 46.75 46.375V29.5M24.195 7C27.3025 7 29.875 9.5175 29.875 12.625V18.25C29.875 19.7418 30.4676 21.1726 31.5225 22.2275C32.5774 23.2824 34.0082 23.875 35.5 23.875H41.125C42.6168 23.875 44.0476 24.4676 45.1025 25.5225C46.1574 26.5774 46.75 28.0082 46.75 29.5M24.195 7C33.42 7 46.75 20.4 46.75 29.5",
178
178
  stroke: "currentColor",
@@ -182,15 +182,15 @@ function qt(t, e) {
182
182
  }, null, -1)
183
183
  ]));
184
184
  }
185
- const Xt = /* @__PURE__ */ H(Zt, [["render", qt]]), Gt = {}, Kt = {
185
+ const Jt = /* @__PURE__ */ H(Xt, [["render", Yt]]), Qt = {}, en = {
186
186
  width: "20",
187
187
  height: "20",
188
188
  viewBox: "0 0 20 20",
189
189
  fill: "none",
190
190
  xmlns: "http://www.w3.org/2000/svg"
191
191
  };
192
- function Yt(t, e) {
193
- return p(), m("svg", Kt, e[0] || (e[0] = [
192
+ function tn(t, e) {
193
+ return p(), v("svg", en, e[0] || (e[0] = [
194
194
  h("path", {
195
195
  "fill-rule": "evenodd",
196
196
  "clip-rule": "evenodd",
@@ -205,15 +205,15 @@ function Yt(t, e) {
205
205
  }, null, -1)
206
206
  ]));
207
207
  }
208
- const Jt = /* @__PURE__ */ H(Gt, [["render", Yt]]), Qt = {}, en = {
208
+ const nn = /* @__PURE__ */ H(Qt, [["render", tn]]), on = {}, ln = {
209
209
  width: "20",
210
210
  height: "20",
211
211
  viewBox: "0 0 20 20",
212
212
  fill: "none",
213
213
  xmlns: "http://www.w3.org/2000/svg"
214
214
  };
215
- function tn(t, e) {
216
- return p(), m("svg", en, e[0] || (e[0] = [
215
+ function sn(t, e) {
216
+ return p(), v("svg", ln, e[0] || (e[0] = [
217
217
  h("path", {
218
218
  "fill-rule": "evenodd",
219
219
  "clip-rule": "evenodd",
@@ -222,15 +222,15 @@ function tn(t, e) {
222
222
  }, null, -1)
223
223
  ]));
224
224
  }
225
- const nn = /* @__PURE__ */ H(Qt, [["render", tn]]), on = {}, ln = {
225
+ const rn = /* @__PURE__ */ H(on, [["render", sn]]), an = {}, cn = {
226
226
  width: "21",
227
227
  height: "20",
228
228
  viewBox: "0 0 21 20",
229
229
  fill: "none",
230
230
  xmlns: "http://www.w3.org/2000/svg"
231
231
  };
232
- function sn(t, e) {
233
- return p(), m("svg", ln, e[0] || (e[0] = [
232
+ function un(t, e) {
233
+ return p(), v("svg", cn, e[0] || (e[0] = [
234
234
  h("path", {
235
235
  "fill-rule": "evenodd",
236
236
  "clip-rule": "evenodd",
@@ -239,15 +239,15 @@ function sn(t, e) {
239
239
  }, null, -1)
240
240
  ]));
241
241
  }
242
- const rn = /* @__PURE__ */ H(on, [["render", sn]]), an = {}, cn = {
242
+ const dn = /* @__PURE__ */ H(an, [["render", un]]), pn = {}, hn = {
243
243
  width: "20",
244
244
  height: "20",
245
245
  viewBox: "0 0 20 20",
246
246
  fill: "none",
247
247
  xmlns: "http://www.w3.org/2000/svg"
248
248
  };
249
- function un(t, e) {
250
- return p(), m("svg", cn, e[0] || (e[0] = [
249
+ function mn(t, e) {
250
+ return p(), v("svg", hn, e[0] || (e[0] = [
251
251
  h("path", {
252
252
  d: "M6 14L10 10M10 10L14 6M10 10L6 6M10 10L14 14",
253
253
  stroke: "currentColor",
@@ -257,15 +257,15 @@ function un(t, e) {
257
257
  }, null, -1)
258
258
  ]));
259
259
  }
260
- const dn = /* @__PURE__ */ H(an, [["render", un]]), pn = {}, hn = {
260
+ const vn = /* @__PURE__ */ H(pn, [["render", mn]]), fn = {}, _n = {
261
261
  width: "20",
262
262
  height: "20",
263
263
  viewBox: "0 0 20 20",
264
264
  fill: "none",
265
265
  xmlns: "http://www.w3.org/2000/svg"
266
266
  };
267
- function mn(t, e) {
268
- return p(), m("svg", hn, e[0] || (e[0] = [
267
+ function gn(t, e) {
268
+ return p(), v("svg", _n, e[0] || (e[0] = [
269
269
  h("path", {
270
270
  d: "M9.31732 16.8976L7.50065 17.5026V10.4193L3.76732 6.3126C3.48852 6.00588 3.33403 5.60627 3.33398 5.19177V3.33594H16.6673V5.14594C16.6672 5.58793 16.4916 6.01178 16.179 6.32427L12.5007 10.0026V12.5026M12.5007 15.8359L14.1673 17.5026L17.5007 14.1693",
271
271
  stroke: "currentColor",
@@ -275,15 +275,15 @@ function mn(t, e) {
275
275
  }, null, -1)
276
276
  ]));
277
277
  }
278
- const vn = /* @__PURE__ */ H(pn, [["render", mn]]), fn = {}, _n = {
278
+ const Cn = /* @__PURE__ */ H(fn, [["render", gn]]), wn = {}, kn = {
279
279
  width: "20",
280
280
  height: "20",
281
281
  viewBox: "0 0 20 20",
282
282
  fill: "none",
283
283
  xmlns: "http://www.w3.org/2000/svg"
284
284
  };
285
- function gn(t, e) {
286
- return p(), m("svg", _n, e[0] || (e[0] = [
285
+ function bn(t, e) {
286
+ return p(), v("svg", kn, e[0] || (e[0] = [
287
287
  h("path", {
288
288
  d: "M11.4657 16.1809L7.50065 17.5026V10.4193L3.76732 6.3126C3.48852 6.00588 3.33403 5.60627 3.33398 5.19177V3.33594H16.6673V5.14594C16.6672 5.58793 16.4916 6.01178 16.179 6.32427L12.5007 10.0026V11.2526M18.334 18.3359L14.1673 14.1693M14.1673 18.3359L18.334 14.1693",
289
289
  stroke: "currentColor",
@@ -293,15 +293,15 @@ function gn(t, e) {
293
293
  }, null, -1)
294
294
  ]));
295
295
  }
296
- const Cn = /* @__PURE__ */ H(fn, [["render", gn]]), wn = {}, kn = {
296
+ const yn = /* @__PURE__ */ H(wn, [["render", bn]]), xn = {}, Mn = {
297
297
  width: "20",
298
298
  height: "20",
299
299
  viewBox: "0 0 20 20",
300
300
  fill: "none",
301
301
  xmlns: "http://www.w3.org/2000/svg"
302
302
  };
303
- function bn(t, e) {
304
- return p(), m("svg", kn, e[0] || (e[0] = [
303
+ function Ln(t, e) {
304
+ return p(), v("svg", Mn, e[0] || (e[0] = [
305
305
  h("path", {
306
306
  d: "M9.4676 15.1809L5.5026 16.5026V9.41927L1.76927 5.3126C1.49048 5.00588 1.33598 4.60627 1.33594 4.19177V2.33594H14.6693V4.14594C14.6692 4.58793 14.4935 5.01178 14.1809 5.32427L10.5026 9.0026V10.2526",
307
307
  stroke: "currentColor",
@@ -316,27 +316,27 @@ function bn(t, e) {
316
316
  }, null, -1)
317
317
  ]));
318
318
  }
319
- const yn = /* @__PURE__ */ H(wn, [["render", bn]]), xn = {}, Mn = {
319
+ const $n = /* @__PURE__ */ H(xn, [["render", Ln]]), Sn = {}, In = {
320
320
  width: "20",
321
321
  height: "20",
322
322
  viewBox: "0 0 20 20",
323
323
  fill: "none",
324
324
  xmlns: "http://www.w3.org/2000/svg"
325
325
  };
326
- function Ln(t, e) {
327
- return p(), m("svg", Mn, e[0] || (e[0] = [
328
- Ae('<path d="M10.5 5.5H17.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="M10.5 10H17.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="M10.5 15H17.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="M3 15.083L4.042 16.125L7.167 13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 6.083L4.042 7.125L7.167 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>', 5)
326
+ function Vn(t, e) {
327
+ return p(), v("svg", In, e[0] || (e[0] = [
328
+ Oe('<path d="M10.5 5.5H17.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="M10.5 10H17.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="M10.5 15H17.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="M3 15.083L4.042 16.125L7.167 13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 6.083L4.042 7.125L7.167 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>', 5)
329
329
  ]));
330
330
  }
331
- const $n = /* @__PURE__ */ H(xn, [["render", Ln]]), Sn = {}, In = {
331
+ const Bn = /* @__PURE__ */ H(Sn, [["render", Vn]]), Rn = {}, Tn = {
332
332
  width: "20",
333
333
  height: "20",
334
334
  viewBox: "0 0 20 20",
335
335
  fill: "none",
336
336
  xmlns: "http://www.w3.org/2000/svg"
337
337
  };
338
- function Vn(t, e) {
339
- return p(), m("svg", In, e[0] || (e[0] = [
338
+ function En(t, e) {
339
+ return p(), v("svg", Tn, e[0] || (e[0] = [
340
340
  h("path", {
341
341
  d: "M16.6673 5.83594L6.66732 5.83594M16.6673 5.83594L13.7507 8.7526M16.6673 5.83594L13.7507 2.91927M14.1673 14.1693L3.33398 14.1693M3.33398 14.1693L6.25065 17.0859M3.33398 14.1693L6.25065 11.2526",
342
342
  stroke: "currentColor",
@@ -346,15 +346,15 @@ function Vn(t, e) {
346
346
  }, null, -1)
347
347
  ]));
348
348
  }
349
- const Bn = /* @__PURE__ */ H(Sn, [["render", Vn]]), Rn = {}, Tn = {
349
+ const zn = /* @__PURE__ */ H(Rn, [["render", En]]), Hn = {}, Wn = {
350
350
  width: "20",
351
351
  height: "20",
352
352
  viewBox: "0 0 20 20",
353
353
  fill: "none",
354
354
  xmlns: "http://www.w3.org/2000/svg"
355
355
  };
356
- function En(t, e) {
357
- return p(), m("svg", Tn, e[0] || (e[0] = [
356
+ function Dn(t, e) {
357
+ return p(), v("svg", Wn, e[0] || (e[0] = [
358
358
  h("path", {
359
359
  d: "M11.1667 10.9167V9.66667L14.845 5.98833C15.1576 5.67585 15.3332 5.25199 15.3333 4.81V3H2V4.85583C2.00004 5.27033 2.15454 5.66994 2.43333 5.97667L6.16667 10.0833V17.1667C6.16667 17.1667 7.37495 16.7639 8.14917 16.5058",
360
360
  stroke: "currentColor",
@@ -374,15 +374,15 @@ function En(t, e) {
374
374
  }, null, -1)
375
375
  ]));
376
376
  }
377
- const zn = /* @__PURE__ */ H(Rn, [["render", En]]), Hn = {}, Wn = {
377
+ const Pn = /* @__PURE__ */ H(Hn, [["render", Dn]]), An = {}, On = {
378
378
  width: "20",
379
379
  height: "20",
380
380
  viewBox: "0 0 20 20",
381
381
  fill: "none",
382
382
  xmlns: "http://www.w3.org/2000/svg"
383
383
  };
384
- function Dn(t, e) {
385
- return p(), m("svg", Wn, e[0] || (e[0] = [
384
+ function jn(t, e) {
385
+ return p(), v("svg", On, e[0] || (e[0] = [
386
386
  h("path", {
387
387
  d: "M6.2832 15.8359H3.3332C3.11222 15.8359 2.90029 15.7482 2.74404 15.5919C2.58778 15.4356 2.5 15.2237 2.5 15.0027V4.16954C2.49995 4.06009 2.52146 3.9517 2.56331 3.85056C2.60516 3.74943 2.66652 3.65753 2.7439 3.58012C2.82127 3.50271 2.91314 3.4413 3.01426 3.3994C3.11537 3.3575 3.22375 3.33594 3.3332 3.33594H16.6668C16.7763 3.33594 16.8846 3.3575 16.9857 3.3994C17.0869 3.4413 17.1787 3.50271 17.2561 3.58012C17.3335 3.65753 17.3948 3.74943 17.4367 3.85056C17.4785 3.9517 17.5001 4.06009 17.5 4.16954V15.0027C17.5 15.2237 17.4122 15.4356 17.256 15.5919C17.0997 15.7482 16.8878 15.8359 16.6668 15.8359H5.38347",
388
388
  stroke: "currentColor",
@@ -399,27 +399,27 @@ function Dn(t, e) {
399
399
  }, null, -1)
400
400
  ]));
401
401
  }
402
- const Pn = /* @__PURE__ */ H(Hn, [["render", Dn]]), An = {}, On = {
402
+ const Nn = /* @__PURE__ */ H(An, [["render", jn]]), Fn = {}, Zn = {
403
403
  width: "20",
404
404
  height: "20",
405
405
  viewBox: "0 0 20 20",
406
406
  fill: "none",
407
407
  xmlns: "http://www.w3.org/2000/svg"
408
408
  };
409
- function jn(t, e) {
410
- return p(), m("svg", On, e[0] || (e[0] = [
411
- Ae('<circle cx="4.5" cy="12.5" r="1.5" stroke="currentColor" stroke-width="1.5"></circle><circle cx="9.5" cy="8.5" r="1.5" transform="rotate(-180 9.5 8.5)" stroke="currentColor" stroke-width="1.5"></circle><circle cx="14.5" cy="12.5" r="1.5" stroke="currentColor" stroke-width="1.5"></circle><path d="M4.55469 10.5V2" stroke="currentColor" stroke-width="1.5"></path><path d="M9.44531 9.5L9.44531 18" stroke="currentColor" stroke-width="1.5"></path><path d="M14.5547 10.5V2" stroke="currentColor" stroke-width="1.5"></path><path d="M4.55469 18V15.5" stroke="currentColor" stroke-width="1.5"></path><path d="M9.44531 2L9.44531 5.5" stroke="currentColor" stroke-width="1.5"></path><path d="M14.5547 18V15.5" stroke="currentColor" stroke-width="1.5"></path>', 9)
409
+ function Un(t, e) {
410
+ return p(), v("svg", Zn, e[0] || (e[0] = [
411
+ Oe('<circle cx="4.5" cy="12.5" r="1.5" stroke="currentColor" stroke-width="1.5"></circle><circle cx="9.5" cy="8.5" r="1.5" transform="rotate(-180 9.5 8.5)" stroke="currentColor" stroke-width="1.5"></circle><circle cx="14.5" cy="12.5" r="1.5" stroke="currentColor" stroke-width="1.5"></circle><path d="M4.55469 10.5V2" stroke="currentColor" stroke-width="1.5"></path><path d="M9.44531 9.5L9.44531 18" stroke="currentColor" stroke-width="1.5"></path><path d="M14.5547 10.5V2" stroke="currentColor" stroke-width="1.5"></path><path d="M4.55469 18V15.5" stroke="currentColor" stroke-width="1.5"></path><path d="M9.44531 2L9.44531 5.5" stroke="currentColor" stroke-width="1.5"></path><path d="M14.5547 18V15.5" stroke="currentColor" stroke-width="1.5"></path>', 9)
412
412
  ]));
413
413
  }
414
- const Nn = /* @__PURE__ */ H(An, [["render", jn]]), Fn = {}, Zn = {
414
+ const qn = /* @__PURE__ */ H(Fn, [["render", Un]]), Kn = {}, Xn = {
415
415
  width: "20",
416
416
  height: "20",
417
417
  viewBox: "0 0 20 20",
418
418
  fill: "none",
419
419
  xmlns: "http://www.w3.org/2000/svg"
420
420
  };
421
- function Un(t, e) {
422
- return p(), m("svg", Zn, e[0] || (e[0] = [
421
+ function Gn(t, e) {
422
+ return p(), v("svg", Xn, e[0] || (e[0] = [
423
423
  h("path", {
424
424
  d: "M9.4676 15.1809L5.5026 16.5026V9.41927L1.76927 5.3126C1.49048 5.00588 1.33598 4.60627 1.33594 4.19177V2.33594H14.6693V4.14594C14.6692 4.58793 14.4935 5.01178 14.1809 5.32427L10.5026 9.0026V10.2526",
425
425
  stroke: "currentColor",
@@ -436,47 +436,47 @@ function Un(t, e) {
436
436
  }, null, -1)
437
437
  ]));
438
438
  }
439
- const qn = /* @__PURE__ */ H(Fn, [["render", Un]]), Xn = {
439
+ const Yn = /* @__PURE__ */ H(Kn, [["render", Gn]]), Jn = {
440
440
  // arrow icons
441
- arrowDown: ft,
442
- arrowTop: wt,
443
- arrowRight: St,
444
- arrowLeft: Rt,
445
- arrowReload: xt,
441
+ arrowDown: wt,
442
+ arrowTop: xt,
443
+ arrowRight: Rt,
444
+ arrowLeft: Ht,
445
+ arrowReload: St,
446
446
  // table icons
447
- columnInsert: Ht,
448
- freeze: At,
449
- unfreeze: Ft,
450
- columnsMove: Jt,
451
- empty: Xt,
447
+ columnInsert: At,
448
+ freeze: Ft,
449
+ unfreeze: Kt,
450
+ columnsMove: nn,
451
+ empty: Jt,
452
452
  // actions icons
453
- listBullet: nn,
454
- listBulletHorizontal: rn,
455
- close: dn,
453
+ listBullet: rn,
454
+ listBulletHorizontal: dn,
455
+ close: vn,
456
456
  // filter icons
457
- filterSave: vn,
458
- filterReset: Cn,
459
- filterNew: yn,
460
- filterMultiselect: $n,
461
- filterExchange: Bn,
462
- filterEdit: zn,
463
- filterDateCheck: Pn,
464
- filterAdvanced: Nn,
465
- filterAdd: qn
457
+ filterSave: Cn,
458
+ filterReset: yn,
459
+ filterNew: $n,
460
+ filterMultiselect: Bn,
461
+ filterExchange: zn,
462
+ filterEdit: Pn,
463
+ filterDateCheck: Nn,
464
+ filterAdvanced: qn,
465
+ filterAdd: Yn
466
466
  }, Y = /* @__PURE__ */ le({
467
467
  __name: "VIcon",
468
468
  props: {
469
469
  name: {}
470
470
  },
471
471
  setup(t) {
472
- const e = t, o = x(() => Xn[e.name]);
473
- return (n, s) => o.value ? (p(), ae(Oe(o.value), { key: 0 })) : D("", !0);
472
+ const e = t, o = x(() => Jn[e.name]);
473
+ return (n, s) => o.value ? (p(), ae(je(o.value), { key: 0 })) : D("", !0);
474
474
  }
475
- }), Gn = {}, Kn = { class: "vt-loader" };
476
- function Yn(t, e) {
477
- return p(), m("span", Kn);
475
+ }), Qn = {}, eo = { class: "vt-loader" };
476
+ function to(t, e) {
477
+ return p(), v("span", eo);
478
478
  }
479
- const Fe = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "data-placement"], Qn = {
479
+ const Ze = /* @__PURE__ */ H(Qn, [["render", to]]), no = ["disabled", "type", "data-placement"], oo = {
480
480
  key: 2,
481
481
  class: "vt-button__content"
482
482
  }, ge = /* @__PURE__ */ le({
@@ -493,11 +493,11 @@ const Fe = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "d
493
493
  },
494
494
  emits: ["click"],
495
495
  setup(t, { emit: e }) {
496
- const o = t, n = e, s = je(), l = x(() => !!(o.icon && o.shape)), a = x(() => {
497
- var b, M;
498
- const c = s.default ? s.default({}) : null;
499
- return ((M = (b = c == null ? void 0 : c[0]) == null ? void 0 : b.children) == null ? void 0 : M.toString()) ?? "";
500
- }), r = x(() => [
496
+ const o = t, n = e, s = Ne(), l = x(() => !!(o.icon && o.shape)), c = x(() => {
497
+ var y, M;
498
+ const u = s.default ? s.default({}) : null;
499
+ return ((M = (y = u == null ? void 0 : u[0]) == null ? void 0 : y.children) == null ? void 0 : M.toString()) ?? "";
500
+ }), i = x(() => [
501
501
  "vt-button",
502
502
  `vt-button--${o.type}`,
503
503
  {
@@ -506,19 +506,19 @@ const Fe = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "d
506
506
  "vt-button--disabled": o.disabled || o.loading,
507
507
  "vt-button--loading": o.loading
508
508
  }
509
- ]), i = x(() => l.value && o.tooltip ? a.value : null), u = (c) => {
510
- !o.disabled && !o.loading && n("click", c);
509
+ ]), a = x(() => l.value && o.tooltip ? c.value : null), d = (u) => {
510
+ !o.disabled && !o.loading && n("click", u);
511
511
  };
512
- return (c, b) => {
513
- const M = Ne("tooltip");
514
- return Le((p(), m("button", {
515
- class: z(r.value),
512
+ return (u, y) => {
513
+ const M = Fe("tooltip");
514
+ return Le((p(), v("button", {
515
+ class: z(i.value),
516
516
  disabled: o.disabled || o.loading,
517
517
  type: o.htmlType,
518
518
  "data-placement": o.tooltipPlacement,
519
- onClick: u
519
+ onClick: d
520
520
  }, [
521
- o.loading ? (p(), ae(Fe, {
521
+ o.loading ? (p(), ae(Ze, {
522
522
  key: 0,
523
523
  class: "vt-button__icon"
524
524
  })) : o.icon ? (p(), ae(Y, {
@@ -526,21 +526,21 @@ const Fe = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "d
526
526
  name: o.icon,
527
527
  class: "vt-button__icon"
528
528
  }, null, 8, ["name"])) : D("", !0),
529
- l.value ? D("", !0) : (p(), m("span", Qn, [
530
- pe(c.$slots, "default")
529
+ l.value ? D("", !0) : (p(), v("span", oo, [
530
+ pe(u.$slots, "default")
531
531
  ]))
532
- ], 10, Jn)), [
533
- [M, i.value]
532
+ ], 10, no)), [
533
+ [M, a.value]
534
534
  ]);
535
535
  };
536
536
  }
537
- }), eo = {
537
+ }), lo = {
538
538
  key: 0,
539
539
  class: "vt-modal__header"
540
- }, to = {
540
+ }, so = {
541
541
  key: 0,
542
542
  class: "vt-modal__title"
543
- }, no = { class: "vt-modal__content" }, Ze = /* @__PURE__ */ le({
543
+ }, ro = { class: "vt-modal__content" }, Ue = /* @__PURE__ */ le({
544
544
  __name: "VModal",
545
545
  props: {
546
546
  modelValue: { type: Boolean },
@@ -554,40 +554,40 @@ const Fe = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "d
554
554
  setup(t, { emit: e }) {
555
555
  const o = t, n = e, s = x(() => ["vt-modal__container", `vt-modal__container--${o.size}`]), l = x(() => ({
556
556
  zIndex: o.zIndex
557
- })), a = () => {
557
+ })), c = () => {
558
558
  n("update:modelValue", !1), n("close");
559
- }, r = () => {
560
- o.closeOnBackdropClick && a();
559
+ }, i = () => {
560
+ o.closeOnBackdropClick && c();
561
561
  };
562
- return (i, u) => (p(), ae(st, { to: "body" }, [
563
- i.modelValue ? (p(), m("div", {
562
+ return (a, d) => (p(), ae(ct, { to: "body" }, [
563
+ a.modelValue ? (p(), v("div", {
564
564
  key: 0,
565
565
  class: "vt-modal__backdrop",
566
566
  style: re(l.value),
567
- onClick: r
567
+ onClick: i
568
568
  }, [
569
569
  h("div", {
570
570
  class: z(s.value),
571
- onClick: u[0] || (u[0] = he(() => {
571
+ onClick: d[0] || (d[0] = he(() => {
572
572
  }, ["stop"]))
573
573
  }, [
574
- i.title || i.showCloseButton ? (p(), m("div", eo, [
575
- i.title ? (p(), m("h2", to, te(i.title), 1)) : D("", !0),
576
- i.showCloseButton ? (p(), ae(Y, {
574
+ a.title || a.showCloseButton ? (p(), v("div", lo, [
575
+ a.title ? (p(), v("h2", so, te(a.title), 1)) : D("", !0),
576
+ a.showCloseButton ? (p(), ae(Y, {
577
577
  key: 1,
578
578
  name: "close",
579
579
  class: "vt-modal__close",
580
- onClick: a
580
+ onClick: c
581
581
  })) : D("", !0)
582
582
  ])) : D("", !0),
583
- h("div", no, [
584
- pe(i.$slots, "default")
583
+ h("div", ro, [
584
+ pe(a.$slots, "default")
585
585
  ])
586
586
  ], 2)
587
587
  ], 4)) : D("", !0)
588
588
  ]));
589
589
  }
590
- }), oo = { class: "vt-pagination" }, lo = { class: "vt-pagination__info" }, so = { class: "vt-pagination__rows-per-page" }, ro = ["value"], io = { class: "vt-pagination__navigation" }, ao = ["disabled"], co = ["onClick"], uo = ["disabled"], po = /* @__PURE__ */ le({
590
+ }), io = { class: "vt-pagination" }, ao = { class: "vt-pagination__info" }, co = { class: "vt-pagination__rows-per-page" }, uo = ["value"], po = { class: "vt-pagination__navigation" }, ho = ["disabled"], mo = ["onClick"], vo = ["disabled"], fo = /* @__PURE__ */ le({
591
591
  __name: "VPagination",
592
592
  props: {
593
593
  totalItems: {},
@@ -600,90 +600,90 @@ const Fe = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "d
600
600
  setup(t, { emit: e }) {
601
601
  const o = t, n = e, s = x({
602
602
  get: () => o.currentPage,
603
- set: (L) => n("update:currentPage", L)
603
+ set: (V) => n("update:currentPage", V)
604
604
  }), l = x({
605
605
  get: () => o.pageSize,
606
- set: (L) => n("update:pageSize", L)
607
- }), a = x(() => Math.ceil(o.totalItems / l.value)), r = x(() => o.totalItems === 0 ? 0 : (s.value - 1) * l.value + 1), i = x(() => Math.min(s.value * l.value, o.totalItems)), u = x(() => s.value <= 1), c = x(() => s.value >= a.value), b = x(() => {
608
- const L = [], W = a.value, B = s.value, G = o.maxVisiblePages;
609
- if (W <= G)
610
- for (let y = 1; y <= W; y++)
611
- L.push(y);
606
+ set: (V) => n("update:pageSize", V)
607
+ }), c = x(() => Math.ceil(o.totalItems / l.value)), i = x(() => o.totalItems === 0 ? 0 : (s.value - 1) * l.value + 1), a = x(() => Math.min(s.value * l.value, o.totalItems)), d = x(() => s.value <= 1), u = x(() => s.value >= c.value), y = x(() => {
608
+ const V = [], W = c.value, L = s.value, O = o.maxVisiblePages;
609
+ if (W <= O)
610
+ for (let b = 1; b <= W; b++)
611
+ V.push(b);
612
612
  else {
613
- L.push(1);
614
- const y = Math.max(2, B - Math.floor(G / 2)), E = Math.min(W - 1, B + Math.floor(G / 2));
615
- y > 2 && L.push("...");
616
- for (let $ = y; $ <= E; $++)
617
- L.push($);
618
- E < W - 1 && L.push("..."), W > 1 && L.push(W);
613
+ V.push(1);
614
+ const b = Math.max(2, L - Math.floor(O / 2)), T = Math.min(W - 1, L + Math.floor(O / 2));
615
+ b > 2 && V.push("...");
616
+ for (let E = b; E <= T; E++)
617
+ V.push(E);
618
+ T < W - 1 && V.push("..."), W > 1 && V.push(W);
619
619
  }
620
- return L;
620
+ return V;
621
621
  }), M = () => {
622
622
  n("pageChange", {
623
623
  page: s.value,
624
624
  pageSize: l.value
625
625
  });
626
- }, X = (L) => {
627
- typeof L == "number" && L !== s.value && (s.value = L, M());
628
- }, N = () => {
629
- u.value || (s.value--, M());
630
- }, Q = () => {
631
- c.value || (s.value++, M());
632
- }, U = () => {
633
- s.value = 1, M();
626
+ }, q = (V) => {
627
+ typeof V == "number" && V !== s.value && (s.value = V, M());
634
628
  }, F = () => {
629
+ d.value || (s.value--, M());
630
+ }, X = () => {
631
+ u.value || (s.value++, M());
632
+ }, ee = () => {
633
+ s.value = 1, M();
634
+ }, G = () => {
635
635
  n("reloadData", s.value);
636
636
  };
637
637
  return me(
638
638
  () => o.totalItems,
639
639
  () => {
640
- s.value > a.value && a.value > 0 && (s.value = a.value, M());
640
+ s.value > c.value && c.value > 0 && (s.value = c.value, M());
641
641
  }
642
- ), (L, W) => (p(), m("div", oo, [
643
- h("div", lo, [
644
- h("div", so, [
642
+ ), (V, W) => (p(), v("div", io, [
643
+ h("div", ao, [
644
+ h("div", co, [
645
645
  W[1] || (W[1] = h("label", {
646
646
  for: "rowsSelect",
647
647
  class: "vt-pagination__label"
648
648
  }, "Рядків на сторінку:", -1)),
649
649
  Le(h("select", {
650
650
  id: "rowsSelect",
651
- "onUpdate:modelValue": W[0] || (W[0] = (B) => l.value = B),
652
- onChange: U,
651
+ "onUpdate:modelValue": W[0] || (W[0] = (L) => l.value = L),
652
+ onChange: ee,
653
653
  class: "vt-pagination__select"
654
654
  }, [
655
- (p(!0), m(ne, null, oe(L.pageSizeOptions, (B) => (p(), m("option", {
656
- key: B,
657
- value: B
658
- }, te(B), 9, ro))), 128))
655
+ (p(!0), v(ne, null, oe(V.pageSizeOptions, (L) => (p(), v("option", {
656
+ key: L,
657
+ value: L
658
+ }, te(L), 9, uo))), 128))
659
659
  ], 544), [
660
- [rt, l.value]
660
+ [ut, l.value]
661
661
  ])
662
662
  ]),
663
- h("span", null, te(r.value) + " - " + te(i.value) + " з " + te(L.totalItems), 1)
663
+ h("span", null, te(i.value) + " - " + te(a.value) + " з " + te(V.totalItems), 1)
664
664
  ]),
665
- h("div", io, [
665
+ h("div", po, [
666
666
  h("button", {
667
- onClick: N,
668
- disabled: u.value,
669
- class: z({ "vt-pagination__nav-button": !0, "has-items": !u.value })
667
+ onClick: F,
668
+ disabled: d.value,
669
+ class: z({ "vt-pagination__nav-button": !0, "has-items": !d.value })
670
670
  }, [
671
671
  Z(Y, { name: "arrowLeft" })
672
- ], 10, ao),
673
- (p(!0), m(ne, null, oe(b.value, (B) => (p(), m("button", {
674
- key: B,
675
- onClick: (G) => X(B),
672
+ ], 10, ho),
673
+ (p(!0), v(ne, null, oe(y.value, (L) => (p(), v("button", {
674
+ key: L,
675
+ onClick: (O) => q(L),
676
676
  class: z(["vt-pagination__nav-button", {
677
- "vt-pagination__nav-button--active": B === s.value
677
+ "vt-pagination__nav-button--active": L === s.value
678
678
  }])
679
- }, te(B), 11, co))), 128)),
679
+ }, te(L), 11, mo))), 128)),
680
680
  h("button", {
681
- onClick: Q,
682
- disabled: c.value,
683
- class: z({ "vt-pagination__nav-button": !0, "has-items": !c.value })
681
+ onClick: X,
682
+ disabled: u.value,
683
+ class: z({ "vt-pagination__nav-button": !0, "has-items": !u.value })
684
684
  }, [
685
685
  Z(Y, { name: "arrowRight" })
686
- ], 10, uo)
686
+ ], 10, vo)
687
687
  ]),
688
688
  h("div", null, [
689
689
  Z(ge, {
@@ -691,7 +691,7 @@ const Fe = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "d
691
691
  shape: "circle",
692
692
  tooltip: "",
693
693
  tooltipPlacement: "left",
694
- onClick: F
694
+ onClick: G
695
695
  }, {
696
696
  default: xe(() => W[2] || (W[2] = [
697
697
  _e("Оновити дані ", -1)
@@ -702,7 +702,7 @@ const Fe = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "d
702
702
  ])
703
703
  ]));
704
704
  }
705
- }), ho = ["for"], mo = ["id", "name", "value", "checked", "disabled", "required", ".indeterminate"], ue = /* @__PURE__ */ le({
705
+ }), _o = ["for"], go = ["id", "name", "value", "checked", "disabled", "required", ".indeterminate"], ue = /* @__PURE__ */ le({
706
706
  __name: "VCheckbox",
707
707
  props: {
708
708
  modelValue: { type: Boolean, default: void 0 },
@@ -720,58 +720,58 @@ const Fe = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "d
720
720
  },
721
721
  emits: ["update:modelValue", "change", "focus", "blur"],
722
722
  setup(t, { emit: e }) {
723
- const o = t, n = e, s = () => `vt-checkbox-${Math.random().toString(36).substr(2, 9)}`, l = x(() => o.id || s()), a = x(() => o.modelValue ?? o.checked), r = (c) => {
723
+ const o = t, n = e, s = () => `vt-checkbox-${Math.random().toString(36).substr(2, 9)}`, l = x(() => o.id || s()), c = x(() => o.modelValue ?? o.checked), i = (u) => {
724
724
  if (o.disabled) return;
725
- const M = c.target.checked;
726
- n("update:modelValue", M), n("change", M, c);
727
- }, i = (c) => {
728
- n("focus", c);
729
- }, u = (c) => {
730
- n("blur", c);
725
+ const M = u.target.checked;
726
+ n("update:modelValue", M), n("change", M, u);
727
+ }, a = (u) => {
728
+ n("focus", u);
729
+ }, d = (u) => {
730
+ n("blur", u);
731
731
  };
732
- return (c, b) => (p(), m("label", {
732
+ return (u, y) => (p(), v("label", {
733
733
  class: z([
734
734
  "vt-checkbox",
735
- `vt-checkbox--${c.size}`,
736
- `vt-checkbox--${c.variant}`,
735
+ `vt-checkbox--${u.size}`,
736
+ `vt-checkbox--${u.variant}`,
737
737
  {
738
- "vt-checkbox--disabled": c.disabled,
739
- "vt-checkbox--double": c.isDouble
738
+ "vt-checkbox--disabled": u.disabled,
739
+ "vt-checkbox--double": u.isDouble
740
740
  }
741
741
  ]),
742
742
  for: l.value
743
743
  }, [
744
744
  h("input", {
745
745
  id: l.value,
746
- name: c.name,
747
- value: c.value,
748
- checked: a.value,
749
- disabled: c.disabled,
750
- required: c.required,
751
- ".indeterminate": c.indeterminate,
746
+ name: u.name,
747
+ value: u.value,
748
+ checked: c.value,
749
+ disabled: u.disabled,
750
+ required: u.required,
751
+ ".indeterminate": u.indeterminate,
752
752
  type: "checkbox",
753
753
  class: "vt-checkbox__input",
754
- onChange: r,
755
- onFocus: i,
756
- onBlur: u
757
- }, null, 40, mo),
754
+ onChange: i,
755
+ onFocus: a,
756
+ onBlur: d
757
+ }, null, 40, go),
758
758
  h("div", {
759
759
  class: z([
760
760
  "vt-checkbox__box",
761
761
  {
762
- "vt-checkbox__box--checked": a.value && !c.indeterminate && !c.isDouble,
763
- "vt-checkbox__box--indeterminate": c.indeterminate,
764
- "vt-checkbox__box--double": c.isDouble && a.value,
765
- "vt-checkbox__box--disabled": c.disabled
762
+ "vt-checkbox__box--checked": c.value && !u.indeterminate && !u.isDouble,
763
+ "vt-checkbox__box--indeterminate": u.indeterminate,
764
+ "vt-checkbox__box--double": u.isDouble && c.value,
765
+ "vt-checkbox__box--disabled": u.disabled
766
766
  }
767
767
  ])
768
768
  }, [
769
- !c.indeterminate && !c.isDouble ? (p(), m("svg", {
769
+ !u.indeterminate && !u.isDouble ? (p(), v("svg", {
770
770
  key: 0,
771
771
  class: z([
772
772
  "vt-checkbox__checkmark",
773
773
  {
774
- "vt-checkbox__checkmark--checked": a.value
774
+ "vt-checkbox__checkmark--checked": c.value
775
775
  }
776
776
  ]),
777
777
  width: "10",
@@ -779,7 +779,7 @@ const Fe = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "d
779
779
  viewBox: "0 0 10 9",
780
780
  fill: "none",
781
781
  xmlns: "http://www.w3.org/2000/svg"
782
- }, b[0] || (b[0] = [
782
+ }, y[0] || (y[0] = [
783
783
  h("path", {
784
784
  d: "M1 5L3.58264 7.58264C3.80112 7.80112 4.16348 7.77113 4.34306 7.51971L9 1",
785
785
  stroke: "currentColor",
@@ -787,12 +787,12 @@ const Fe = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "d
787
787
  "stroke-linecap": "round"
788
788
  }, null, -1)
789
789
  ]), 2)) : D("", !0),
790
- c.isDouble && a.value ? (p(), m("svg", {
790
+ u.isDouble && c.value ? (p(), v("svg", {
791
791
  key: 1,
792
792
  class: z([
793
793
  "vt-checkbox__checkmark",
794
794
  {
795
- "vt-checkbox__checkmark--checked": a.value
795
+ "vt-checkbox__checkmark--checked": c.value
796
796
  }
797
797
  ]),
798
798
  width: "13",
@@ -800,7 +800,7 @@ const Fe = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "d
800
800
  viewBox: "0 0 13 6",
801
801
  fill: "none",
802
802
  xmlns: "http://www.w3.org/2000/svg"
803
- }, b[1] || (b[1] = [
803
+ }, y[1] || (y[1] = [
804
804
  h("path", {
805
805
  d: "M6 3L8.25 5L12 1",
806
806
  stroke: "currentColor",
@@ -816,198 +816,198 @@ const Fe = /* @__PURE__ */ H(Gn, [["render", Yn]]), Jn = ["disabled", "type", "d
816
816
  "stroke-linejoin": "round"
817
817
  }, null, -1)
818
818
  ]), 2)) : D("", !0),
819
- c.indeterminate ? (p(), m("div", {
819
+ u.indeterminate ? (p(), v("div", {
820
820
  key: 2,
821
821
  class: z([
822
822
  "vt-checkbox__indeterminate-mark",
823
823
  {
824
- "vt-checkbox__indeterminate-mark--visible": c.indeterminate
824
+ "vt-checkbox__indeterminate-mark--visible": u.indeterminate
825
825
  }
826
826
  ])
827
827
  }, null, 2)) : D("", !0)
828
828
  ], 2),
829
- c.label || c.$slots.label || c.$slots.default ? (p(), m("span", {
829
+ u.label || u.$slots.label || u.$slots.default ? (p(), v("span", {
830
830
  key: 0,
831
831
  class: z([
832
832
  "vt-checkbox__label",
833
833
  {
834
- "vt-checkbox__label--disabled": c.disabled
834
+ "vt-checkbox__label--disabled": u.disabled
835
835
  }
836
836
  ])
837
837
  }, [
838
- pe(c.$slots, "label", {}, () => [
839
- pe(c.$slots, "default", {}, () => [
840
- _e(te(c.label), 1)
838
+ pe(u.$slots, "label", {}, () => [
839
+ pe(u.$slots, "default", {}, () => [
840
+ _e(te(u.label), 1)
841
841
  ])
842
842
  ])
843
843
  ], 2)) : D("", !0)
844
- ], 10, ho));
844
+ ], 10, _o));
845
845
  }
846
846
  });
847
- function vo(t) {
847
+ function Co(t) {
848
848
  const e = x(() => [...t].sort((s, l) => s.pinnedLeft && !l.pinnedLeft ? -1 : !s.pinnedLeft && l.pinnedLeft || s.pinnedRight && !l.pinnedRight ? 1 : !s.pinnedRight && l.pinnedRight ? -1 : 0)), o = () => {
849
- const s = e.value.length, l = e.value.filter((c) => c.width || c.minWidth), a = l.reduce((c, b) => c + (b.width || b.minWidth || 0), 0), r = s - l.length;
850
- if (r === 0) return 150;
851
- const u = Math.max(800 - a, r * 80);
852
- return Math.max(Math.floor(u / r), 120);
849
+ const s = e.value.length, l = e.value.filter((u) => u.width || u.minWidth), c = l.reduce((u, y) => u + (y.width || y.minWidth || 0), 0), i = s - l.length;
850
+ if (i === 0) return 150;
851
+ const d = Math.max(800 - c, i * 80);
852
+ return Math.max(Math.floor(d / i), 120);
853
853
  };
854
854
  return {
855
855
  sortedColumns: e,
856
856
  getDefaultColumnWidth: o,
857
- getStickyOffset: (s, l, a = !1) => {
858
- const r = e.value;
859
- let i = 0;
857
+ getStickyOffset: (s, l, c = !1) => {
858
+ const i = e.value;
859
+ let a = 0;
860
860
  if (s === "left") {
861
- a && (i += 50);
862
- for (let u = 0; u < l; u++) {
863
- const c = r[u];
864
- c.pinnedLeft && (i += c.width || c.minWidth || o());
861
+ c && (a += 50);
862
+ for (let d = 0; d < l; d++) {
863
+ const u = i[d];
864
+ u.pinnedLeft && (a += u.width || u.minWidth || o());
865
865
  }
866
866
  } else
867
- for (let u = r.length - 1; u > l; u--) {
868
- const c = r[u];
869
- c.pinnedRight && (i += c.width || c.minWidth || o());
867
+ for (let d = i.length - 1; d > l; d--) {
868
+ const u = i[d];
869
+ u.pinnedRight && (a += u.width || u.minWidth || o());
870
870
  }
871
- return i;
871
+ return a;
872
872
  }
873
873
  };
874
874
  }
875
- function fo(t) {
875
+ function wo(t) {
876
876
  const e = () => {
877
877
  const l = {};
878
878
  return t.maxHeight && (l.maxHeight = `${t.maxHeight}px`), l;
879
- }, o = (l, a, r, i) => {
880
- const u = {};
879
+ }, o = (l, c, i, a) => {
880
+ const d = {};
881
881
  if (l.width)
882
- u.width = `${l.width}px`, u.minWidth = `${l.width}px`, u.maxWidth = `${l.width}px`;
882
+ d.width = `${l.width}px`, d.minWidth = `${l.width}px`, d.maxWidth = `${l.width}px`;
883
883
  else if (l.minWidth)
884
- u.minWidth = `${l.minWidth}px`, u.width = `${l.minWidth}px`, u.maxWidth = "none";
884
+ d.minWidth = `${l.minWidth}px`, d.width = `${l.minWidth}px`, d.maxWidth = "none";
885
885
  else {
886
- const c = i();
887
- u.width = `${c}px`, u.minWidth = "80px", u.maxWidth = "none";
886
+ const u = a();
887
+ d.width = `${u}px`, d.minWidth = "80px", d.maxWidth = "none";
888
888
  }
889
- return l.pinnedLeft ? (u.position = "sticky", u.left = `${r("left", a, t.selectable)}px`, u.zIndex = "10") : l.pinnedRight && (u.position = "sticky", u.right = `${r("right", a, !1)}px`, u.zIndex = "10"), u;
889
+ return l.pinnedLeft ? (d.position = "sticky", d.left = `${i("left", c, t.selectable)}px`, d.zIndex = "10") : l.pinnedRight && (d.position = "sticky", d.right = `${i("right", c, !1)}px`, d.zIndex = "10"), d;
890
890
  };
891
891
  return {
892
892
  getTableWrapperStyle: e,
893
893
  getColumnStyle: o,
894
- getHeaderStyle: (l, a, r, i) => {
895
- const u = o(l, a, r, i);
896
- return t.maxHeight && (u.position = "sticky", u.top = "0", l.pinnedLeft || l.pinnedRight ? u.zIndex = "12" : u.zIndex = "11"), u;
894
+ getHeaderStyle: (l, c, i, a) => {
895
+ const d = o(l, c, i, a);
896
+ return t.maxHeight && (d.position = "sticky", d.top = "0", l.pinnedLeft || l.pinnedRight ? d.zIndex = "12" : d.zIndex = "11"), d;
897
897
  },
898
- getFooterStyle: (l, a, r, i) => {
899
- const u = o(l, a, r, i);
900
- return t.maxHeight && (u.position = "sticky", u.bottom = "0", l.pinnedLeft || l.pinnedRight ? u.zIndex = "12" : u.zIndex = "11"), u;
898
+ getFooterStyle: (l, c, i, a) => {
899
+ const d = o(l, c, i, a);
900
+ return t.maxHeight && (d.position = "sticky", d.bottom = "0", l.pinnedLeft || l.pinnedRight ? d.zIndex = "12" : d.zIndex = "11"), d;
901
901
  }
902
902
  };
903
903
  }
904
- function _o() {
904
+ function ko() {
905
905
  const t = A({
906
906
  resizingCol: null,
907
907
  startX: 0,
908
908
  startWidth: 0
909
909
  }), e = `url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><path d='M5 13L2 10L5 7' stroke='%23828282' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/><path d='M15 7L18 10L15 13' stroke='%23828282' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/><path d='M10 3L10 17' stroke='%23828282' stroke-width='3' stroke-linecap='round'/></svg>") 10 10, col-resize`;
910
910
  return {
911
- onMouseDown: (n, s, l, a) => {
911
+ onMouseDown: (n, s, l, c) => {
912
912
  n.preventDefault(), n.stopPropagation(), t.value.resizingCol = s, t.value.startX = n.clientX, t.value.startWidth = s.width || s.minWidth || l(s.prop);
913
- const r = (u) => {
914
- const { resizingCol: c, startX: b, startWidth: M } = t.value;
915
- if (!c) return;
916
- document.querySelectorAll(`[data-resizer="${c.prop}"]`).forEach((F) => {
917
- F.classList.add("vt-table__resizer--active");
913
+ const i = (d) => {
914
+ const { resizingCol: u, startX: y, startWidth: M } = t.value;
915
+ if (!u) return;
916
+ document.querySelectorAll(`[data-resizer="${u.prop}"]`).forEach((G) => {
917
+ G.classList.add("vt-table__resizer--active");
918
918
  });
919
- const X = u.clientX - b, N = c.minWidth || 50, Q = c.maxWidth || 1e3, U = Math.max(Math.min(M + X, Q), N);
920
- c.width = U;
921
- }, i = () => {
922
- const { resizingCol: u } = t.value;
923
- document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i), document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("vt-table-resizing"), u && (document.querySelectorAll(`[data-resizer="${u.prop}"]`).forEach((c) => {
924
- c.classList.remove("vt-table__resizer--active");
925
- }), a && u.width && a(u.width)), t.value.resizingCol = null;
919
+ const q = d.clientX - y, F = u.minWidth || 50, X = u.maxWidth || 1e3, ee = Math.max(Math.min(M + q, X), F);
920
+ u.width = ee;
921
+ }, a = () => {
922
+ const { resizingCol: d } = t.value;
923
+ document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", a), document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("vt-table-resizing"), d && (document.querySelectorAll(`[data-resizer="${d.prop}"]`).forEach((u) => {
924
+ u.classList.remove("vt-table__resizer--active");
925
+ }), c && d.width && c(d.width)), t.value.resizingCol = null;
926
926
  };
927
- document.addEventListener("mousemove", r), document.addEventListener("mouseup", i), document.body.style.cursor = e, document.body.style.userSelect = "none", document.body.classList.add("vt-table-resizing");
927
+ document.addEventListener("mousemove", i), document.addEventListener("mouseup", a), document.body.style.cursor = e, document.body.style.userSelect = "none", document.body.classList.add("vt-table-resizing");
928
928
  },
929
929
  resizeState: t
930
930
  };
931
931
  }
932
- function go(t, e, o, n) {
932
+ function bo(t, e, o, n) {
933
933
  var J;
934
- const s = t.selectionKey || "id", l = A([]), a = A(null), r = A(!1);
934
+ const s = t.selectionKey || "id", l = A([]), c = A(null), i = A(!1);
935
935
  (J = t.defaultSelection) != null && J.length && (l.value = [...t.defaultSelection]);
936
- const i = (v) => v[s], u = (v) => r.value ? !0 : l.value.some((O) => i(O) === i(v)), c = x(() => e.value.filter((v) => u(v)).length), b = x(() => e.value.length > 0 && c.value === e.value.length), M = x(() => {
937
- if (r.value) return !1;
938
- const v = c.value;
939
- return v > 0 && v < e.value.length;
940
- }), X = x(() => r.value ? !0 : b.value && !M.value), N = x(() => r.value), Q = (v, O) => {
941
- const R = i(v), K = l.value.some((_) => i(_) === i(v)), d = O !== void 0 ? O : !K;
942
- if (r.value && !d) {
943
- r.value = !1, n != null && n.value && (l.value = n.value.filter((_) => i(_) !== R)), $(v, !1);
936
+ const a = (C) => C[s], d = (C) => i.value ? !0 : l.value.some((j) => a(j) === a(C)), u = x(() => e.value.filter((C) => d(C)).length), y = x(() => e.value.length > 0 && u.value === e.value.length), M = x(() => {
937
+ if (i.value) return !1;
938
+ const C = u.value;
939
+ return C > 0 && C < e.value.length;
940
+ }), q = x(() => i.value ? !0 : y.value && !M.value), F = x(() => i.value), X = (C, j) => {
941
+ const $ = a(C), K = l.value.some((f) => a(f) === a(C)), r = j !== void 0 ? j : !K;
942
+ if (i.value && !r) {
943
+ i.value = !1, n != null && n.value && (l.value = n.value.filter((f) => a(f) !== $)), E(C, !1);
944
944
  return;
945
945
  }
946
- r.value && d || (d && !K ? l.value.push(v) : !d && K && (l.value = l.value.filter((_) => i(_) !== R)), t.selectOnClickRow && O === void 0 && G(d ? v : null), $(v, d));
947
- }, U = () => {
948
- switch (F()) {
946
+ i.value && r || (r && !K ? l.value.push(C) : !r && K && (l.value = l.value.filter((f) => a(f) !== $)), t.selectOnClickRow && j === void 0 && O(r ? C : null), E(C, r));
947
+ }, ee = () => {
948
+ switch (G()) {
949
949
  case "none":
950
950
  case "partial":
951
- L();
951
+ V();
952
952
  break;
953
953
  case "allVisible":
954
954
  W();
955
955
  break;
956
956
  case "absoluteAll":
957
- B();
957
+ L();
958
958
  break;
959
959
  }
960
- }, F = () => r.value ? "absoluteAll" : b.value ? "allVisible" : c.value > 0 ? "partial" : "none", L = () => {
961
- const v = [], O = new Set(l.value.map((R) => i(R)));
962
- l.value.forEach((R) => {
963
- v.push(R);
964
- }), e.value.forEach((R) => {
965
- O.has(i(R)) || v.push(R);
966
- }), l.value = v, r.value = !1, $();
960
+ }, G = () => i.value ? "absoluteAll" : y.value ? "allVisible" : u.value > 0 ? "partial" : "none", V = () => {
961
+ const C = [], j = new Set(l.value.map(($) => a($)));
962
+ l.value.forEach(($) => {
963
+ C.push($);
964
+ }), e.value.forEach(($) => {
965
+ j.has(a($)) || C.push($);
966
+ }), l.value = C, i.value = !1, E();
967
967
  }, W = () => {
968
- r.value = !0, n != null && n.value ? l.value = [...n.value] : l.value = [...e.value], $(void 0, void 0, !0);
969
- }, B = () => {
970
- l.value = [], r.value = !1, a.value = null, $();
971
- }, G = (v) => {
972
- const O = a.value;
973
- a.value = v, o("current-change", {
974
- currentRow: a.value,
975
- oldCurrentRow: O
968
+ i.value = !0, n != null && n.value ? l.value = [...n.value] : l.value = [...e.value], E(void 0, void 0, !0);
969
+ }, L = () => {
970
+ l.value = [], i.value = !1, c.value = null, E();
971
+ }, O = (C) => {
972
+ const j = c.value;
973
+ c.value = C, o("current-change", {
974
+ currentRow: c.value,
975
+ oldCurrentRow: j
976
976
  });
977
- }, y = () => [...l.value], E = (v) => {
978
- l.value = [...v], r.value = !1, $();
979
- }, $ = (v, O, R = !1) => {
977
+ }, b = () => [...l.value], T = (C) => {
978
+ l.value = [...C], i.value = !1, E();
979
+ }, E = (C, j, $ = !1) => {
980
980
  const K = {
981
981
  selection: [...l.value],
982
- row: v,
983
- selected: O,
984
- isAllSelected: R || r.value
982
+ row: C,
983
+ selected: j,
984
+ isAllSelected: $ || i.value
985
985
  };
986
986
  o("selection-change", K);
987
987
  };
988
988
  return me(
989
989
  () => t.defaultSelection,
990
- (v) => {
991
- v != null && v.length && (l.value = [...v]);
990
+ (C) => {
991
+ C != null && C.length && (l.value = [...C]);
992
992
  }
993
993
  ), {
994
994
  selectedRows: l,
995
- currentRow: a,
996
- isRowSelected: u,
997
- isAllSelected: X,
995
+ currentRow: c,
996
+ isRowSelected: d,
997
+ isAllSelected: q,
998
998
  isIndeterminate: M,
999
- isDoubleCheck: N,
1000
- isFullSelection: r,
1001
- toggleRowSelection: Q,
1002
- toggleAllSelection: U,
1003
- clearSelection: B,
1004
- setCurrentRow: G,
1005
- getSelectionRows: y,
1006
- setSelectionRows: E,
999
+ isDoubleCheck: F,
1000
+ isFullSelection: i,
1001
+ toggleRowSelection: X,
1002
+ toggleAllSelection: ee,
1003
+ clearSelection: L,
1004
+ setCurrentRow: O,
1005
+ getSelectionRows: b,
1006
+ setSelectionRows: T,
1007
1007
  selectAbsolutelyAll: W
1008
1008
  };
1009
1009
  }
1010
- function Co(t, e) {
1010
+ function yo(t, e) {
1011
1011
  if (!t)
1012
1012
  return String(e.value ?? "");
1013
1013
  try {
@@ -1017,62 +1017,62 @@ function Co(t, e) {
1017
1017
  return console.error("Error rendering table slot:", o), String(e.value ?? "");
1018
1018
  }
1019
1019
  }
1020
- const wo = (t, e, o = "asc") => {
1020
+ const xo = (t, e, o = "asc") => {
1021
1021
  if (t == null && e == null) return 0;
1022
1022
  if (t == null) return o === "asc" ? 1 : -1;
1023
1023
  if (e == null) return o === "asc" ? -1 : 1;
1024
1024
  if (t === e) return 0;
1025
1025
  let n = 0;
1026
1026
  const s = Number(t), l = Number(e);
1027
- return !isNaN(s) && !isNaN(l) ? n = s - l : Te(t) && Te(e) ? n = new Date(t).getTime() - new Date(e).getTime() : typeof t == "boolean" && typeof e == "boolean" ? n = t === e ? 0 : t ? -1 : 1 : n = String(t).localeCompare(String(e), void 0, {
1027
+ return !isNaN(s) && !isNaN(l) ? n = s - l : Ee(t) && Ee(e) ? n = new Date(t).getTime() - new Date(e).getTime() : typeof t == "boolean" && typeof e == "boolean" ? n = t === e ? 0 : t ? -1 : 1 : n = String(t).localeCompare(String(e), void 0, {
1028
1028
  numeric: !0,
1029
1029
  sensitivity: "base"
1030
1030
  }), o === "desc" ? -n : n;
1031
- }, Te = (t) => t instanceof Date ? !isNaN(t.getTime()) : typeof t == "string" && /\d{4}-\d{2}-\d{2}|\//.test(t) ? !isNaN(new Date(t).getTime()) : !1, ko = (t, e, o) => {
1031
+ }, Ee = (t) => t instanceof Date ? !isNaN(t.getTime()) : typeof t == "string" && /\d{4}-\d{2}-\d{2}|\//.test(t) ? !isNaN(new Date(t).getTime()) : !1, Mo = (t, e, o) => {
1032
1032
  t.sortable && o({
1033
1033
  prop: t.prop,
1034
1034
  direction: e
1035
1035
  });
1036
- }, Ee = (t, e) => {
1036
+ }, ze = (t, e) => {
1037
1037
  const o = (e == null ? void 0 : e.prop) === t.prop, n = e == null ? void 0 : e.direction;
1038
1038
  return {
1039
1039
  asc: ["vt-th__sort-icon", o && n === "asc" && "vt-th__sortable-active"].filter(Boolean).join(" "),
1040
1040
  desc: ["vt-th__sort-icon", o && n === "desc" && "vt-th__sortable-active"].filter(Boolean).join(" ")
1041
1041
  };
1042
- }, bo = (t, e, o) => {
1042
+ }, Lo = (t, e, o) => {
1043
1043
  if (!e) return [...t];
1044
1044
  const n = o.find((l) => l.prop === e.prop);
1045
1045
  if (!(n != null && n.sortable)) return [...t];
1046
- const s = n.sortMethod || wo;
1047
- return [...t].sort((l, a) => {
1048
- const r = l[n.prop], i = a[n.prop];
1049
- return s(r, i, e.direction);
1046
+ const s = n.sortMethod || xo;
1047
+ return [...t].sort((l, c) => {
1048
+ const i = l[n.prop], a = c[n.prop];
1049
+ return s(i, a, e.direction);
1050
1050
  });
1051
1051
  };
1052
- class yo {
1052
+ class $o {
1053
1053
  constructor() {
1054
1054
  this.modalStack = [], this.baseZIndex = 1e3;
1055
1055
  }
1056
1056
  open(e = {}) {
1057
1057
  const o = `modal-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, n = document.createElement("div");
1058
1058
  n.setAttribute("data-vt-modal", o), document.body.appendChild(n);
1059
- const s = A(!0), l = this.baseZIndex + this.modalStack.length * 10, a = it({
1059
+ const s = A(!0), l = this.baseZIndex + this.modalStack.length * 10, c = dt({
1060
1060
  setup() {
1061
- const i = () => {
1061
+ const a = () => {
1062
1062
  s.value = !1, setTimeout(() => {
1063
1063
  ie.closeById(o);
1064
1064
  }, 100);
1065
1065
  };
1066
1066
  return () => be(
1067
- Ze,
1067
+ Ue,
1068
1068
  {
1069
1069
  modelValue: s.value,
1070
- "onUpdate:modelValue": i,
1070
+ "onUpdate:modelValue": a,
1071
1071
  title: e.title,
1072
1072
  size: e.size || "medium",
1073
1073
  showCloseButton: e.showCloseButton !== !1,
1074
1074
  closeOnBackdropClick: e.closeOnBackdropClick !== !1,
1075
- onClose: i,
1075
+ onClose: a,
1076
1076
  zIndex: l
1077
1077
  },
1078
1078
  {
@@ -1081,14 +1081,14 @@ class yo {
1081
1081
  );
1082
1082
  }
1083
1083
  });
1084
- a.mount(n);
1085
- const r = {
1084
+ c.mount(n);
1085
+ const i = {
1086
1086
  id: o,
1087
- app: a,
1087
+ app: c,
1088
1088
  container: n,
1089
1089
  isOpen: s
1090
1090
  };
1091
- return this.modalStack.push(r), o;
1091
+ return this.modalStack.push(i), o;
1092
1092
  }
1093
1093
  close() {
1094
1094
  if (this.modalStack.length > 0) {
@@ -1118,7 +1118,7 @@ class yo {
1118
1118
  recalculateZIndices() {
1119
1119
  }
1120
1120
  }
1121
- const ie = new yo(), xo = {
1121
+ const ie = new $o(), So = {
1122
1122
  install(t) {
1123
1123
  t.config.globalProperties.$modal = ie, t.config.globalProperties.$modalStack = {
1124
1124
  closeAll: () => ie.closeAll(),
@@ -1126,16 +1126,16 @@ const ie = new yo(), xo = {
1126
1126
  closeById: (e) => ie.closeById(e)
1127
1127
  };
1128
1128
  }
1129
- }, Mo = { class: "vt-columns-selector-body" }, Lo = { class: "vt-columns-selector" }, $o = { class: "vt-columns-selector__panel" }, So = ["draggable", "onDragstart", "onDragover", "onDrop"], Io = {
1129
+ }, Io = { class: "vt-columns-selector-body" }, Vo = { class: "vt-columns-selector" }, Bo = { class: "vt-columns-selector__panel" }, Ro = ["draggable", "onDragstart", "onDragover", "onDrop"], To = {
1130
1130
  key: 0,
1131
1131
  class: "vt-columns-selector__panel-item-pinned"
1132
- }, Vo = { class: "vt-columns-selector__available" }, Bo = ["onClick"], Ro = {
1132
+ }, Eo = { class: "vt-columns-selector__available" }, zo = ["onClick"], Ho = {
1133
1133
  key: 0,
1134
1134
  class: "vt-columns-selector__group-columns"
1135
- }, To = {
1135
+ }, Wo = {
1136
1136
  key: 0,
1137
1137
  class: "vt-columns-selector__pinned-note"
1138
- }, Eo = { class: "vt-modal__content-button" }, zo = /* @__PURE__ */ le({
1138
+ }, Do = { class: "vt-modal__content-button" }, Po = /* @__PURE__ */ le({
1139
1139
  __name: "VTableColumnSelector",
1140
1140
  props: {
1141
1141
  columns: {},
@@ -1143,118 +1143,118 @@ const ie = new yo(), xo = {
1143
1143
  },
1144
1144
  emits: ["update-columns"],
1145
1145
  setup(t, { emit: e }) {
1146
- const o = t, n = e, s = A([]), l = A(/* @__PURE__ */ new Set()), a = A(-1), r = A(-1), i = A("before"), u = x(() => {
1147
- const d = {};
1148
- return o.columnsSelector.forEach((_) => {
1149
- if (_.name === "removed")
1146
+ const o = t, n = e, s = A([]), l = A(/* @__PURE__ */ new Set()), c = A(-1), i = A(-1), a = A("before"), d = x(() => {
1147
+ const r = {};
1148
+ return o.columnsSelector.forEach((f) => {
1149
+ if (f.name === "removed")
1150
1150
  return;
1151
- const g = _.columns.map((V) => V.prop), k = s.value.filter((V) => g.includes(V.prop));
1152
- k.length === 0 ? d[_.name] = { checked: !1, indeterminate: !1 } : k.length === _.columns.length ? d[_.name] = { checked: !0, indeterminate: !1 } : d[_.name] = { checked: !1, indeterminate: !0 };
1153
- }), d;
1154
- }), c = x(() => o.columnsSelector.filter((d) => d.name !== "removed")), b = (d) => d.pinnedLeft || d.pinnedRight, M = (d) => !b(d), X = () => {
1155
- const d = s.value;
1156
- let _ = -1;
1157
- for (let k = 0; k < d.length; k++)
1158
- d[k].pinnedLeft && (_ = k);
1159
- let g = d.length;
1160
- for (let k = 0; k < d.length; k++)
1161
- if (d[k].pinnedRight) {
1151
+ const g = f.columns.map((S) => S.prop), k = s.value.filter((S) => g.includes(S.prop));
1152
+ k.length === 0 ? r[f.name] = { checked: !1, indeterminate: !1 } : k.length === f.columns.length ? r[f.name] = { checked: !0, indeterminate: !1 } : r[f.name] = { checked: !1, indeterminate: !0 };
1153
+ }), r;
1154
+ }), u = x(() => o.columnsSelector.filter((r) => r.name !== "removed")), y = (r) => r.pinnedLeft || r.pinnedRight, M = (r) => !y(r), q = () => {
1155
+ const r = s.value;
1156
+ let f = -1;
1157
+ for (let k = 0; k < r.length; k++)
1158
+ r[k].pinnedLeft && (f = k);
1159
+ let g = r.length;
1160
+ for (let k = 0; k < r.length; k++)
1161
+ if (r[k].pinnedRight) {
1162
1162
  g = k;
1163
1163
  break;
1164
1164
  }
1165
1165
  return {
1166
- minIndex: _ + 1,
1166
+ minIndex: f + 1,
1167
1167
  maxIndex: g - 1
1168
1168
  };
1169
- }, N = (d) => {
1170
- const _ = X();
1171
- return !(d < _.minIndex || d > _.maxIndex + 1);
1172
- }, Q = (d, _) => {
1173
- const g = s.value[_];
1169
+ }, F = (r) => {
1170
+ const f = q();
1171
+ return !(r < f.minIndex || r > f.maxIndex + 1);
1172
+ }, X = (r, f) => {
1173
+ const g = s.value[f];
1174
1174
  if (!M(g)) {
1175
- d.preventDefault();
1175
+ r.preventDefault();
1176
1176
  return;
1177
1177
  }
1178
- a.value = _, d.dataTransfer && (d.dataTransfer.effectAllowed = "move", d.dataTransfer.setData("text/plain", g.prop)), document.body.style.cursor = "grabbing";
1179
- }, U = (d, _) => {
1180
- if (a.value === -1) return;
1181
- d.preventDefault();
1182
- const g = d.currentTarget.getBoundingClientRect(), k = d.clientY, V = g.top + g.height / 2;
1183
- let S = _, ee = "before";
1184
- k < V ? (S = _, ee = "before") : (S = _ + 1, ee = "after"), a.value < S && S--, N(S) ? (r.value = _, i.value = ee, d.dataTransfer.dropEffect = "move") : (r.value = -1, d.dataTransfer.dropEffect = "none");
1185
- }, F = () => {
1178
+ c.value = f, r.dataTransfer && (r.dataTransfer.effectAllowed = "move", r.dataTransfer.setData("text/plain", g.prop)), document.body.style.cursor = "grabbing";
1179
+ }, ee = (r, f) => {
1180
+ if (c.value === -1) return;
1181
+ r.preventDefault();
1182
+ const g = r.currentTarget.getBoundingClientRect(), k = r.clientY, S = g.top + g.height / 2;
1183
+ let B = f, Q = "before";
1184
+ k < S ? (B = f, Q = "before") : (B = f + 1, Q = "after"), c.value < B && B--, F(B) ? (i.value = f, a.value = Q, r.dataTransfer.dropEffect = "move") : (i.value = -1, r.dataTransfer.dropEffect = "none");
1185
+ }, G = () => {
1186
1186
  setTimeout(() => {
1187
- a.value === -1 && (r.value = -1);
1187
+ c.value === -1 && (i.value = -1);
1188
1188
  }, 50);
1189
- }, L = (d, _) => {
1190
- if (d.preventDefault(), a.value === -1 || r.value === -1) {
1191
- B();
1189
+ }, V = (r, f) => {
1190
+ if (r.preventDefault(), c.value === -1 || i.value === -1) {
1191
+ L();
1192
1192
  return;
1193
1193
  }
1194
- const g = d.currentTarget.getBoundingClientRect(), k = d.clientY, V = g.top + g.height / 2;
1195
- let S = _;
1196
- if (k >= V && (S = _ + 1), a.value < S && S--, !N(S) || S === a.value) {
1197
- B();
1194
+ const g = r.currentTarget.getBoundingClientRect(), k = r.clientY, S = g.top + g.height / 2;
1195
+ let B = f;
1196
+ if (k >= S && (B = f + 1), c.value < B && B--, !F(B) || B === c.value) {
1197
+ L();
1198
1198
  return;
1199
1199
  }
1200
- const ee = [...s.value], [Ce] = ee.splice(a.value, 1);
1201
- ee.splice(S, 0, Ce), s.value = ee, B();
1200
+ const Q = [...s.value], [Ce] = Q.splice(c.value, 1);
1201
+ Q.splice(B, 0, Ce), s.value = Q, L();
1202
1202
  }, W = () => {
1203
- B();
1204
- }, B = () => {
1205
- a.value = -1, r.value = -1, i.value = "before", document.body.style.cursor = "";
1206
- }, G = (d) => {
1207
- const _ = ["vt-columns-selector__panel-item"];
1208
- return a.value === d && _.push("vt-columns-selector__panel-item--dragging"), r.value === d && i.value === "before" && _.push("vt-columns-selector__panel-item--drop-before"), r.value === d && i.value === "after" && _.push("vt-columns-selector__panel-item--drop-after"), _;
1209
- }, y = () => {
1210
- s.value = [...o.columns.map((d) => ({ ...d }))], o.columnsSelector.forEach((d) => {
1211
- d.name !== "removed" && l.value.add(d.name);
1203
+ L();
1204
+ }, L = () => {
1205
+ c.value = -1, i.value = -1, a.value = "before", document.body.style.cursor = "";
1206
+ }, O = (r) => {
1207
+ const f = ["vt-columns-selector__panel-item"];
1208
+ return c.value === r && f.push("vt-columns-selector__panel-item--dragging"), i.value === r && a.value === "before" && f.push("vt-columns-selector__panel-item--drop-before"), i.value === r && a.value === "after" && f.push("vt-columns-selector__panel-item--drop-after"), f;
1209
+ }, b = () => {
1210
+ s.value = [...o.columns.map((r) => ({ ...r }))], o.columnsSelector.forEach((r) => {
1211
+ r.name !== "removed" && l.value.add(r.name);
1212
1212
  });
1213
- }, E = (d, _) => {
1214
- if (_)
1215
- s.value.some((g) => g.prop === d.prop) || s.value.push({ ...d });
1213
+ }, T = (r, f) => {
1214
+ if (f)
1215
+ s.value.some((g) => g.prop === r.prop) || s.value.push({ ...r });
1216
1216
  else {
1217
- if (b(d))
1217
+ if (y(r))
1218
1218
  return;
1219
- s.value = s.value.filter((g) => g.prop !== d.prop);
1219
+ s.value = s.value.filter((g) => g.prop !== r.prop);
1220
1220
  }
1221
- }, $ = (d, _) => {
1222
- if (_)
1223
- d.columns.forEach((g) => {
1221
+ }, E = (r, f) => {
1222
+ if (f)
1223
+ r.columns.forEach((g) => {
1224
1224
  s.value.some((k) => k.prop === g.prop) || s.value.push({ ...g });
1225
1225
  });
1226
1226
  else {
1227
1227
  const g = [];
1228
- d.columns.forEach((k) => {
1229
- const V = s.value.find((S) => S.prop === k.prop);
1230
- V && !b(V) && g.push(V);
1228
+ r.columns.forEach((k) => {
1229
+ const S = s.value.find((B) => B.prop === k.prop);
1230
+ S && !y(S) && g.push(S);
1231
1231
  }), s.value = s.value.filter(
1232
- (k) => !g.some((V) => V.prop === k.prop)
1232
+ (k) => !g.some((S) => S.prop === k.prop)
1233
1233
  );
1234
1234
  }
1235
- }, J = (d) => s.value.some((_) => _.prop === d.prop), v = (d) => {
1236
- const _ = s.value.find((g) => g.prop === d.prop);
1237
- return !_ || !b(_);
1238
- }, O = (d) => {
1239
- l.value.has(d) ? l.value.delete(d) : l.value.add(d);
1240
- }, R = () => {
1235
+ }, J = (r) => s.value.some((f) => f.prop === r.prop), C = (r) => {
1236
+ const f = s.value.find((g) => g.prop === r.prop);
1237
+ return !f || !y(f);
1238
+ }, j = (r) => {
1239
+ l.value.has(r) ? l.value.delete(r) : l.value.add(r);
1240
+ }, $ = () => {
1241
1241
  n("update-columns", [...s.value]), ie.close();
1242
1242
  }, K = () => {
1243
1243
  ie.close();
1244
1244
  };
1245
1245
  return ve(() => {
1246
- y();
1247
- }), (d, _) => (p(), m("div", Mo, [
1248
- h("div", Lo, [
1249
- h("div", $o, [
1250
- (p(!0), m(ne, null, oe(s.value, (g, k) => (p(), m("div", {
1246
+ b();
1247
+ }), (r, f) => (p(), v("div", Io, [
1248
+ h("div", Vo, [
1249
+ h("div", Bo, [
1250
+ (p(!0), v(ne, null, oe(s.value, (g, k) => (p(), v("div", {
1251
1251
  key: g.prop,
1252
- class: z(G(k)),
1252
+ class: z(O(k)),
1253
1253
  draggable: M(g),
1254
- onDragstart: (V) => Q(V, k),
1255
- onDragover: (V) => U(V, k),
1256
- onDragleave: F,
1257
- onDrop: (V) => L(V, k),
1254
+ onDragstart: (S) => X(S, k),
1255
+ onDragover: (S) => ee(S, k),
1256
+ onDragleave: G,
1257
+ onDrop: (S) => V(S, k),
1258
1258
  onDragend: W
1259
1259
  }, [
1260
1260
  Z(Y, {
@@ -1264,31 +1264,31 @@ const ie = new yo(), xo = {
1264
1264
  Z(ue, {
1265
1265
  label: g.label,
1266
1266
  checked: !0,
1267
- disabled: b(g),
1268
- onChange: (V) => E(g, V),
1269
- onClick: _[0] || (_[0] = he(() => {
1267
+ disabled: y(g),
1268
+ onChange: (S) => T(g, S),
1269
+ onClick: f[0] || (f[0] = he(() => {
1270
1270
  }, ["stop"]))
1271
1271
  }, null, 8, ["label", "disabled", "onChange"]),
1272
- b(g) ? (p(), m("span", Io, "pinned")) : D("", !0)
1273
- ], 42, So))), 128))
1272
+ y(g) ? (p(), v("span", To, "pinned")) : D("", !0)
1273
+ ], 42, Ro))), 128))
1274
1274
  ]),
1275
- h("div", Vo, [
1276
- (p(!0), m(ne, null, oe(c.value, (g) => {
1277
- var k, V;
1278
- return p(), m("div", {
1275
+ h("div", Eo, [
1276
+ (p(!0), v(ne, null, oe(u.value, (g) => {
1277
+ var k, S;
1278
+ return p(), v("div", {
1279
1279
  key: g.name,
1280
1280
  class: "vt-columns-selector__group"
1281
1281
  }, [
1282
1282
  h("div", {
1283
1283
  class: "vt-columns-selector__group-header",
1284
- onClick: (S) => O(g.name)
1284
+ onClick: (B) => j(g.name)
1285
1285
  }, [
1286
1286
  Z(ue, {
1287
1287
  label: g.label,
1288
- checked: ((k = u.value[g.name]) == null ? void 0 : k.checked) || !1,
1289
- indeterminate: ((V = u.value[g.name]) == null ? void 0 : V.indeterminate) || !1,
1290
- onChange: (S) => $(g, S),
1291
- onClick: _[1] || (_[1] = he(() => {
1288
+ checked: ((k = d.value[g.name]) == null ? void 0 : k.checked) || !1,
1289
+ indeterminate: ((S = d.value[g.name]) == null ? void 0 : S.indeterminate) || !1,
1290
+ onChange: (B) => E(g, B),
1291
+ onClick: f[1] || (f[1] = he(() => {
1292
1292
  }, ["stop"]))
1293
1293
  }, null, 8, ["label", "checked", "indeterminate", "onChange"]),
1294
1294
  g.icon ? (p(), ae(Y, {
@@ -1296,28 +1296,28 @@ const ie = new yo(), xo = {
1296
1296
  name: g.icon,
1297
1297
  class: "vt-columns-selector__group-icon"
1298
1298
  }, null, 8, ["name"])) : D("", !0)
1299
- ], 8, Bo),
1300
- l.value.has(g.name) ? (p(), m("div", Ro, [
1301
- (p(!0), m(ne, null, oe(g.columns, (S) => (p(), m("div", {
1302
- key: S.prop,
1299
+ ], 8, zo),
1300
+ l.value.has(g.name) ? (p(), v("div", Ho, [
1301
+ (p(!0), v(ne, null, oe(g.columns, (B) => (p(), v("div", {
1302
+ key: B.prop,
1303
1303
  class: "vt-columns-selector__group-column"
1304
1304
  }, [
1305
1305
  Z(ue, {
1306
- label: S.label,
1307
- checked: J(S),
1308
- disabled: !v(S),
1309
- onChange: (ee) => E(S, ee)
1306
+ label: B.label,
1307
+ checked: J(B),
1308
+ disabled: !C(B),
1309
+ onChange: (Q) => T(B, Q)
1310
1310
  }, null, 8, ["label", "checked", "disabled", "onChange"]),
1311
- v(S) ? D("", !0) : (p(), m("span", To, " (закріплена) "))
1311
+ C(B) ? D("", !0) : (p(), v("span", Wo, " (закріплена) "))
1312
1312
  ]))), 128))
1313
1313
  ])) : D("", !0)
1314
1314
  ]);
1315
1315
  }), 128))
1316
1316
  ])
1317
1317
  ]),
1318
- h("div", Eo, [
1318
+ h("div", Do, [
1319
1319
  Z(ge, { onClick: K }, {
1320
- default: xe(() => _[2] || (_[2] = [
1320
+ default: xe(() => f[2] || (f[2] = [
1321
1321
  _e("Скасувати", -1)
1322
1322
  ])),
1323
1323
  _: 1,
@@ -1325,9 +1325,9 @@ const ie = new yo(), xo = {
1325
1325
  }),
1326
1326
  Z(ge, {
1327
1327
  type: "primary",
1328
- onClick: R
1328
+ onClick: $
1329
1329
  }, {
1330
- default: xe(() => _[3] || (_[3] = [
1330
+ default: xe(() => f[3] || (f[3] = [
1331
1331
  _e("Зберегти", -1)
1332
1332
  ])),
1333
1333
  _: 1,
@@ -1336,7 +1336,7 @@ const ie = new yo(), xo = {
1336
1336
  ])
1337
1337
  ]));
1338
1338
  }
1339
- }), Ho = /* @__PURE__ */ le({
1339
+ }), Ao = /* @__PURE__ */ le({
1340
1340
  __name: "ColumnActions",
1341
1341
  props: {
1342
1342
  column: {},
@@ -1345,109 +1345,109 @@ const ie = new yo(), xo = {
1345
1345
  },
1346
1346
  emits: ["pin", "update-columns"],
1347
1347
  setup(t, { emit: e }) {
1348
- const o = t, n = e, s = A(), l = A(), a = A(), r = A(!1), i = A(!1), u = A([]), c = async () => {
1349
- if (await at(), !s.value || !l.value) return;
1350
- const y = l.value.getBoundingClientRect(), E = s.value, $ = E.offsetWidth, J = y.left + y.width / 2;
1351
- E.style.top = `${y.bottom - 20}px`, E.style.left = `${J - $ / 2}px`;
1352
- const v = E.getBoundingClientRect();
1353
- v.right > window.innerWidth && (E.style.left = `${window.innerWidth - $ - 8}px`), v.left < 0 && (E.style.left = "8px");
1354
- }, b = (y) => {
1355
- y.stopPropagation(), !i.value && (r.value ? X() : M());
1348
+ const o = t, n = e, s = A(), l = A(), c = A(), i = A(!1), a = A(!1), d = A([]), u = async () => {
1349
+ if (await pt(), !s.value || !l.value) return;
1350
+ const b = l.value.getBoundingClientRect(), T = s.value, E = T.offsetWidth, J = b.left + b.width / 2;
1351
+ T.style.top = `${b.bottom - 20}px`, T.style.left = `${J - E / 2}px`;
1352
+ const C = T.getBoundingClientRect();
1353
+ C.right > window.innerWidth && (T.style.left = `${window.innerWidth - E - 8}px`), C.left < 0 && (T.style.left = "8px");
1354
+ }, y = (b) => {
1355
+ b.stopPropagation(), !a.value && (i.value ? q() : M());
1356
1356
  }, M = () => {
1357
- i.value || (r.value = !0, c(), a.value && (a.value.style.zIndex = "22"));
1358
- }, X = () => {
1359
- i.value = !0, r.value = !1, a.value && a.value.style.removeProperty("z-index"), setTimeout(() => {
1360
- i.value = !1;
1357
+ a.value || (i.value = !0, u(), c.value && (c.value.style.zIndex = "22"));
1358
+ }, q = () => {
1359
+ a.value = !0, i.value = !1, c.value && c.value.style.removeProperty("z-index"), setTimeout(() => {
1360
+ a.value = !1;
1361
1361
  }, 100);
1362
- }, N = (y) => {
1363
- var E, $;
1364
- !((E = l.value) != null && E.contains(y.target)) && !(($ = s.value) != null && $.contains(y.target)) && X();
1365
- }, Q = () => {
1366
- G() ? (n("pin", o.column, "none"), console.log(`Колонка "${o.column.label}" відкріплена`)) : (n("pin", o.column, "left"), console.log(`Колонка "${o.column.label}" прикріплена зліва`)), X();
1367
- }, U = (y) => ({
1362
+ }, F = (b) => {
1363
+ var T, E;
1364
+ !((T = l.value) != null && T.contains(b.target)) && !((E = s.value) != null && E.contains(b.target)) && q();
1365
+ }, X = () => {
1366
+ O() ? (n("pin", o.column, "none"), console.log(`Колонка "${o.column.label}" відкріплена`)) : (n("pin", o.column, "left"), console.log(`Колонка "${o.column.label}" прикріплена зліва`)), q();
1367
+ }, ee = (b) => ({
1368
1368
  name: "removed",
1369
1369
  label: "Видалені колонки",
1370
1370
  order: 999,
1371
1371
  // Найвищий порядок, щоб відображались останніми
1372
- columns: y
1373
- }), F = (y) => {
1374
- var O;
1375
- const E = new Set(y.map((R) => R.prop)), $ = /* @__PURE__ */ new Set();
1376
- (O = o.columnsSelector) == null || O.forEach((R) => {
1377
- R.columns.forEach((K) => $.add(K.prop));
1378
- }), o.allColumns.forEach((R) => $.add(R.prop));
1372
+ columns: b
1373
+ }), G = (b) => {
1374
+ var j;
1375
+ const T = new Set(b.map(($) => $.prop)), E = /* @__PURE__ */ new Set();
1376
+ (j = o.columnsSelector) == null || j.forEach(($) => {
1377
+ $.columns.forEach((K) => E.add(K.prop));
1378
+ }), o.allColumns.forEach(($) => E.add($.prop));
1379
1379
  const J = [];
1380
- $.forEach((R) => {
1380
+ E.forEach(($) => {
1381
1381
  var K;
1382
- if (!E.has(R)) {
1383
- let d;
1384
- (K = o.columnsSelector) == null || K.forEach((_) => {
1385
- const g = _.columns.find((k) => k.prop === R);
1386
- g && (d = g);
1387
- }), d || (d = o.allColumns.find((_) => _.prop === R)), d && J.push(d);
1382
+ if (!T.has($)) {
1383
+ let r;
1384
+ (K = o.columnsSelector) == null || K.forEach((f) => {
1385
+ const g = f.columns.find((k) => k.prop === $);
1386
+ g && (r = g);
1387
+ }), r || (r = o.allColumns.find((f) => f.prop === $)), r && J.push(r);
1388
1388
  }
1389
1389
  });
1390
- const v = [...o.columnsSelector || []];
1391
- J.length > 0 && v.push(U(J)), u.value = v;
1392
- }, L = () => {
1393
- F(o.allColumns), ie.open({
1394
- component: zo,
1390
+ const C = [...o.columnsSelector || []];
1391
+ J.length > 0 && C.push(ee(J)), d.value = C;
1392
+ }, V = () => {
1393
+ G(o.allColumns), ie.open({
1394
+ component: Po,
1395
1395
  title: "Управління колонками таблиці",
1396
1396
  props: {
1397
1397
  columns: o.allColumns,
1398
1398
  // Передаємо всі колонки
1399
- columnsSelector: u.value,
1399
+ columnsSelector: d.value,
1400
1400
  // Передаємо оновлені доступні колонки
1401
- "onUpdate-columns": (y) => {
1402
- console.log("ColumnActions отримав оновлені колонки:", y), n("update-columns", y), F(y);
1401
+ "onUpdate-columns": (b) => {
1402
+ console.log("ColumnActions отримав оновлені колонки:", b), n("update-columns", b), G(b);
1403
1403
  }
1404
1404
  },
1405
1405
  size: "large",
1406
1406
  closeOnBackdropClick: !1
1407
- }), X();
1408
- }, W = () => o.column.pinnedLeft, B = () => o.column.pinnedRight, G = () => W() || B();
1407
+ }), q();
1408
+ }, W = () => o.column.pinnedLeft, L = () => o.column.pinnedRight, O = () => W() || L();
1409
1409
  return ve(() => {
1410
- document.addEventListener("click", N), l.value && (a.value = l.value.closest("th")), F(o.allColumns);
1410
+ document.addEventListener("click", F), l.value && (c.value = l.value.closest("th")), G(o.allColumns);
1411
1411
  }), $e(() => {
1412
- document.removeEventListener("click", N);
1413
- }), (y, E) => (p(), m("div", {
1412
+ document.removeEventListener("click", F);
1413
+ }), (b, T) => (p(), v("div", {
1414
1414
  ref_key: "triggerRef",
1415
1415
  ref: l,
1416
1416
  class: "vt-table-header-actions",
1417
- onClick: b
1417
+ onClick: y
1418
1418
  }, [
1419
1419
  Z(Y, { name: "listBullet" }),
1420
- r.value ? (p(), m("ul", {
1420
+ i.value ? (p(), v("ul", {
1421
1421
  key: 0,
1422
1422
  ref_key: "menuRef",
1423
1423
  ref: s,
1424
- class: z(["dropdown-menu", "vt-table-dropdown", { visible: r.value }])
1424
+ class: z(["dropdown-menu", "vt-table-dropdown", { visible: i.value }])
1425
1425
  }, [
1426
- h("li", { onClick: Q }, [
1426
+ h("li", { onClick: X }, [
1427
1427
  Z(Y, {
1428
- name: G() ? "unfreeze" : "freeze"
1428
+ name: O() ? "unfreeze" : "freeze"
1429
1429
  }, null, 8, ["name"]),
1430
- h("span", null, te(G() ? "Розморозити" : "Заморозити"), 1)
1430
+ h("span", null, te(O() ? "Розморозити" : "Заморозити"), 1)
1431
1431
  ]),
1432
- h("li", { onClick: L }, [
1432
+ h("li", { onClick: V }, [
1433
1433
  Z(Y, { name: "columnInsert" }),
1434
- E[0] || (E[0] = h("span", null, "Колонки", -1))
1434
+ T[0] || (T[0] = h("span", null, "Колонки", -1))
1435
1435
  ])
1436
1436
  ], 2)) : D("", !0)
1437
1437
  ], 512));
1438
1438
  }
1439
- }), Wo = { class: "vt-table" }, Do = { class: "vt-th__content" }, Po = { class: "vt-th__content" }, Ao = { class: "vt-th__label" }, Oo = {
1439
+ }), Oo = { class: "vt-table" }, jo = { class: "vt-th__content" }, No = { class: "vt-th__content" }, Fo = { class: "vt-th__label" }, Zo = {
1440
1440
  key: 0,
1441
1441
  class: "vt-th__sortable"
1442
- }, jo = ["data-resizer", "onMousedown"], No = {
1442
+ }, Uo = ["data-resizer", "onMousedown"], qo = {
1443
1443
  key: 0,
1444
1444
  class: "vt-table__empty-row"
1445
- }, Fo = ["colspan"], Zo = { class: "vt-table__empty-content" }, Uo = ["onClick"], qo = { class: "vt-table__cell-content" }, Xo = { class: "vt-table__cell-content vt-table__cell-content--ellipsis" }, Go = { key: 1 }, Ko = ["data-resizer", "onMousedown"], Yo = {
1445
+ }, Ko = ["colspan"], Xo = { class: "vt-table__empty-content" }, Go = ["onClick"], Yo = { class: "vt-table__cell-content" }, Jo = { class: "vt-table__cell-content vt-table__cell-content--ellipsis" }, Qo = { key: 1 }, el = ["data-resizer", "onMousedown"], tl = {
1446
1446
  key: 0,
1447
1447
  class: "vt-table__summary"
1448
- }, Jo = { class: "vt-table__cell-content vt-table__cell-content--summary" }, ye = 50, Qo = /* @__PURE__ */ le({
1448
+ }, nl = { class: "vt-table__cell-content vt-table__cell-content--summary" }, ye = 50, ol = /* @__PURE__ */ le({
1449
1449
  __name: "VTable",
1450
- props: /* @__PURE__ */ Re({
1450
+ props: /* @__PURE__ */ Te({
1451
1451
  data: {},
1452
1452
  maxHeight: { default: void 0 },
1453
1453
  defaultSort: {},
@@ -1468,198 +1468,213 @@ const ie = new yo(), xo = {
1468
1468
  },
1469
1469
  columnsModifiers: {}
1470
1470
  }),
1471
- emits: /* @__PURE__ */ Re(["sort-change", "selection-change", "current-change", "row-click", "update:columns", "column-pin", "column-resize", "column-visibility", "column-sort", "columns-change", "infinity-scroll"], ["update:columns"]),
1471
+ emits: /* @__PURE__ */ Te(["sort-change", "selection-change", "current-change", "row-click", "update:columns", "column-pin", "column-resize", "column-visibility", "column-sort", "columns-change", "infinity-scroll"], ["update:columns"]),
1472
1472
  setup(t, { expose: e, emit: o }) {
1473
- const n = t, s = o, l = ct(t, "columns"), a = A({}), r = A(), i = ut([]), u = A(n.defaultSort || null), c = x(() => l.value !== void 0), b = x(() => n.data && n.data.length > 0), M = A(!1), X = A(0);
1474
- let N = null;
1475
- const Q = () => {
1476
- c.value && l.value ? i.splice(0, i.length, ...l.value) : n.columns && n.columns.length > 0 && i.splice(0, i.length, ...n.columns);
1473
+ const n = t, s = o, l = ht(t, "columns"), c = A({}), i = A(), a = mt([]), d = A(n.defaultSort || null), u = x(() => l.value !== void 0), y = x(() => n.data && n.data.length > 0), M = A(!1), q = A(0);
1474
+ let F;
1475
+ const X = /* @__PURE__ */ new WeakMap();
1476
+ let ee = 0;
1477
+ const G = (m) => {
1478
+ if (X.has(m))
1479
+ return X.get(m);
1480
+ const _ = `row_${++ee}_${Date.now()}`;
1481
+ return X.set(m, _), _;
1482
+ }, V = x(() => $.value.map((m) => {
1483
+ const _ = G(m);
1484
+ return Object.defineProperty(m, "_vueKey", {
1485
+ value: _,
1486
+ enumerable: !1,
1487
+ // Не показуємо в JSON.stringify
1488
+ configurable: !0
1489
+ });
1490
+ })), W = () => {
1491
+ u.value && l.value ? a.splice(0, a.length, ...l.value) : n.columns && n.columns.length > 0 && a.splice(0, a.length, ...n.columns);
1477
1492
  };
1478
1493
  me(
1479
1494
  () => l.value,
1480
- (f) => {
1481
- f && c.value && i.splice(0, i.length, ...f);
1495
+ (m) => {
1496
+ m && u.value && a.splice(0, a.length, ...m);
1482
1497
  },
1483
1498
  { deep: !0 }
1484
1499
  ), me(
1485
1500
  () => n.columns,
1486
- (f) => {
1487
- f && !c.value && i.splice(0, i.length, ...f);
1501
+ (m) => {
1502
+ m && !u.value && a.splice(0, a.length, ...m);
1488
1503
  },
1489
1504
  { deep: !0 }
1490
- ), dt("vt-table-columns", i);
1491
- const { sortedColumns: U, getDefaultColumnWidth: F, getStickyOffset: L } = vo(i), { getTableWrapperStyle: W, getColumnStyle: B, getHeaderStyle: G, getFooterStyle: y } = fo(n), { onMouseDown: E } = _o(), $ = x(() => bo(n.data, u.value, i)), J = x(() => n.allData || n.data), v = n.selectable ? go(n, $, s, J) : null, O = () => ({
1505
+ ), vt("vt-table-columns", a);
1506
+ const { sortedColumns: L, getDefaultColumnWidth: O, getStickyOffset: b } = Co(a), { getTableWrapperStyle: T, getColumnStyle: E, getHeaderStyle: J, getFooterStyle: C } = wo(n), { onMouseDown: j } = ko(), $ = x(() => Lo(n.data, d.value, a)), K = x(() => n.allData || n.data), r = n.selectable ? bo(n, $, s, K) : null, f = () => ({
1492
1507
  width: `${ye}px`,
1493
1508
  minWidth: `${ye}px`,
1494
1509
  maxWidth: `${ye}px`,
1495
1510
  left: "0px",
1496
1511
  position: "sticky",
1497
1512
  zIndex: 10
1498
- }), R = () => {
1499
- const f = O();
1513
+ }), g = () => {
1514
+ const m = f();
1500
1515
  return n.maxHeight ? {
1501
- ...f,
1516
+ ...m,
1502
1517
  top: "0px",
1503
1518
  zIndex: 11
1504
1519
  // Вищий z-index для header
1505
- } : f;
1506
- }, K = () => {
1507
- const f = O();
1520
+ } : m;
1521
+ }, k = () => {
1522
+ const m = f();
1508
1523
  return n.maxHeight ? {
1509
- ...f,
1524
+ ...m,
1510
1525
  bottom: "0px",
1511
1526
  zIndex: 11
1512
1527
  // Вищий z-index для footer
1513
- } : f;
1514
- }, d = () => {
1515
- if (!r.value || M.value) return;
1516
- const f = r.value, C = f.scrollTop, I = f.scrollHeight, T = f.clientHeight, P = 30;
1517
- N && clearTimeout(N), N = setTimeout(() => {
1518
- const fe = C - X.value > 1, w = I - C - T <= P, ce = I - C - T <= 5;
1519
- X.value = C, fe && (w || ce) && (M.value = !0, s("infinity-scroll"), setTimeout(() => {
1528
+ } : m;
1529
+ }, S = () => {
1530
+ if (!i.value || M.value) return;
1531
+ const m = i.value, _ = m.scrollTop, I = m.scrollHeight, R = m.clientHeight, P = 30;
1532
+ F && clearTimeout(F), F = setTimeout(() => {
1533
+ const fe = _ - q.value > 1, w = I - _ - R <= P, ce = I - _ - R <= 5;
1534
+ q.value = _, fe && (w || ce) && (M.value = !0, s("infinity-scroll"), setTimeout(() => {
1520
1535
  M.value = !1;
1521
1536
  }, 1e3));
1522
1537
  }, 50);
1523
- }, _ = () => {
1538
+ }, B = () => {
1524
1539
  M.value = !1;
1525
1540
  };
1526
1541
  ve(() => {
1527
- r.value && r.value.addEventListener("scroll", d);
1542
+ i.value && i.value.addEventListener("scroll", S);
1528
1543
  }), $e(() => {
1529
- N && clearTimeout(N), r.value && r.value.removeEventListener("scroll", d);
1544
+ F && clearTimeout(F), i.value && i.value.removeEventListener("scroll", S);
1530
1545
  });
1531
- const g = (f, C) => {
1532
- ko(f, C, (I) => {
1533
- var T, P;
1534
- ((T = u.value) == null ? void 0 : T.prop) === f.prop && u.value.direction === C ? u.value = null : u.value = I, s("sort-change", {
1535
- column: f,
1536
- direction: ((P = u.value) == null ? void 0 : P.direction) || null,
1537
- prop: f.prop,
1546
+ const Q = (m, _) => {
1547
+ Mo(m, _, (I) => {
1548
+ var R, P;
1549
+ ((R = d.value) == null ? void 0 : R.prop) === m.prop && d.value.direction === _ ? d.value = null : d.value = I, s("sort-change", {
1550
+ column: m,
1551
+ direction: ((P = d.value) == null ? void 0 : P.direction) || null,
1552
+ prop: m.prop,
1538
1553
  sortedData: $.value
1539
1554
  });
1540
1555
  });
1541
- }, k = (f, C) => {
1556
+ }, Ce = (m, _) => {
1542
1557
  const I = {
1543
- pinnedLeft: C === "left",
1544
- pinnedRight: C === "right"
1558
+ pinnedLeft: _ === "left",
1559
+ pinnedRight: _ === "right"
1545
1560
  };
1546
- S(f.prop, I), s("column-pin", { column: { ...f, ...I }, position: C });
1547
- }, V = (f) => {
1548
- i.splice(0, i.length, ...f), c.value && (l.value = [...f]), s("columns-change", [...f]);
1549
- }, S = (f, C) => {
1550
- const I = i.findIndex((T) => T.prop === f);
1561
+ Se(m.prop, I), s("column-pin", { column: { ...m, ...I }, position: _ });
1562
+ }, qe = (m) => {
1563
+ a.splice(0, a.length, ...m), u.value && (l.value = [...m]), s("columns-change", [...m]);
1564
+ }, Se = (m, _) => {
1565
+ const I = a.findIndex((R) => R.prop === m);
1551
1566
  if (I !== -1) {
1552
- if (Object.assign(i[I], C), c.value && l.value) {
1553
- const T = l.value.findIndex((P) => P.prop === f);
1554
- if (T !== -1) {
1567
+ if (Object.assign(a[I], _), u.value && l.value) {
1568
+ const R = l.value.findIndex((P) => P.prop === m);
1569
+ if (R !== -1) {
1555
1570
  const P = [...l.value];
1556
- P[T] = { ...P[T], ...C }, l.value = P;
1571
+ P[R] = { ...P[R], ..._ }, l.value = P;
1557
1572
  }
1558
1573
  }
1559
- s("columns-change", [...i]);
1574
+ s("columns-change", [...a]);
1560
1575
  } else
1561
1576
  console.error(
1562
1577
  "Колонку не знайдено:",
1563
- f,
1578
+ m,
1564
1579
  "Доступні колонки:",
1565
- i.map((T) => T.prop)
1580
+ a.map((R) => R.prop)
1566
1581
  );
1567
- }, ee = (f, C, I) => {
1568
- s("row-click", { row: f, column: C, event: I }), n.highlightCurrentRow && v && v.setCurrentRow(f);
1569
- }, Ce = (f, C, I) => {
1570
- I.stopPropagation(), v && v.toggleRowSelection(C, f);
1571
- }, Ue = (f, C) => {
1572
- C.stopPropagation(), v && v.toggleAllSelection();
1573
- }, Se = (f, C) => {
1574
- f && (a.value[C] = f);
1575
- }, Ie = (f, C) => {
1576
- const I = C.width || F();
1577
- E(f, C, F, (T) => {
1578
- S(C.prop, { width: T }), s("column-resize", {
1579
- column: { ...C, width: T },
1580
- width: T,
1582
+ }, Ke = (m, _, I) => {
1583
+ s("row-click", { row: m, column: _, event: I }), n.highlightCurrentRow && r && r.setCurrentRow(m);
1584
+ }, Xe = (m, _, I) => {
1585
+ I.stopPropagation(), r && r.toggleRowSelection(_, m);
1586
+ }, Ge = (m, _) => {
1587
+ _.stopPropagation(), r && r.toggleAllSelection();
1588
+ }, Ie = (m, _) => {
1589
+ m && (c.value[_] = m);
1590
+ }, Ve = (m, _) => {
1591
+ const I = _.width || O();
1592
+ j(m, _, O, (R) => {
1593
+ Se(_.prop, { width: R }), s("column-resize", {
1594
+ column: { ..._, width: R },
1595
+ width: R,
1581
1596
  oldWidth: I
1582
1597
  });
1583
1598
  });
1584
- }, qe = (f, C) => B(f, C, L, F), Xe = (f, C) => G(f, C, L, F), Ge = (f, C) => y(f, C, L, F), Ke = (f, C) => {
1585
- if (!C || !C.prop) return "";
1586
- const I = f[C.prop];
1599
+ }, Ye = (m, _) => E(m, _, b, O), Je = (m, _) => J(m, _, b, O), Qe = (m, _) => C(m, _, b, O), et = (m, _) => {
1600
+ if (!_ || !_.prop) return "";
1601
+ const I = m[_.prop];
1587
1602
  return I == null ? "" : String(I);
1588
- }, Ye = x(() => {
1589
- if (!n.showSummary || !b.value) return {};
1590
- const f = i;
1603
+ }, tt = x(() => {
1604
+ if (!n.showSummary || !y.value) return {};
1605
+ const m = a;
1591
1606
  if (typeof n.summaryMethod == "function") {
1592
- const C = n.summaryMethod({ columns: f, data: $.value });
1593
- return f.reduce(
1594
- (I, T, P) => (I[T.prop] = C[P], I),
1607
+ const _ = n.summaryMethod({ columns: m, data: $.value });
1608
+ return m.reduce(
1609
+ (I, R, P) => (I[R.prop] = _[P], I),
1595
1610
  {}
1596
1611
  );
1597
1612
  }
1598
- return f.reduce(
1599
- (C, I) => {
1600
- const T = $.value.map((P) => P[I.prop]);
1601
- return C[I.prop] = T.every((P) => typeof P == "number") ? T.reduce((P, de) => P + de, 0) : "", C;
1613
+ return m.reduce(
1614
+ (_, I) => {
1615
+ const R = $.value.map((P) => P[I.prop]);
1616
+ return _[I.prop] = R.every((P) => typeof P == "number") ? R.reduce((P, de) => P + de, 0) : "", _;
1602
1617
  },
1603
1618
  {}
1604
1619
  );
1605
- }), Je = x(() => n.showSummary && b.value), Qe = (f, C) => {
1606
- v && v.toggleRowSelection(f, C);
1607
- }, et = () => {
1608
- v && v.toggleAllSelection();
1609
- }, tt = () => {
1610
- v && v.selectAbsolutelyAll();
1611
- }, nt = () => {
1612
- v && v.clearSelection();
1613
- }, ot = () => v ? v.getSelectionRows() : [], lt = (f) => {
1614
- v && v.setSelectionRows(f);
1620
+ }), nt = x(() => n.showSummary && y.value), ot = (m, _) => {
1621
+ r && r.toggleRowSelection(m, _);
1622
+ }, lt = () => {
1623
+ r && r.toggleAllSelection();
1624
+ }, st = () => {
1625
+ r && r.selectAbsolutelyAll();
1626
+ }, rt = () => {
1627
+ r && r.clearSelection();
1628
+ }, it = () => r ? r.getSelectionRows() : [], at = (m) => {
1629
+ r && r.setSelectionRows(m);
1615
1630
  };
1616
1631
  return ve(() => {
1617
- Q();
1632
+ W();
1618
1633
  }), e({
1619
- toggleRowSelection: Qe,
1620
- toggleAllSelection: et,
1621
- selectAbsolutelyAll: tt,
1622
- clearSelection: nt,
1623
- getSelectionRows: ot,
1624
- setSelectionRows: lt,
1625
- resetInfinityScroll: _
1634
+ toggleRowSelection: ot,
1635
+ toggleAllSelection: lt,
1636
+ selectAbsolutelyAll: st,
1637
+ clearSelection: rt,
1638
+ getSelectionRows: it,
1639
+ setSelectionRows: at,
1640
+ resetInfinityScroll: B
1626
1641
  // Додаємо метод для скидання infinity scroll
1627
- }), (f, C) => {
1628
- var T, P, de, fe;
1629
- const I = Ne("tooltip");
1630
- return p(), m("div", {
1642
+ }), (m, _) => {
1643
+ var R, P, de, fe;
1644
+ const I = Fe("tooltip");
1645
+ return p(), v("div", {
1631
1646
  ref_key: "tableWrapperRef",
1632
- ref: r,
1647
+ ref: i,
1633
1648
  class: "vt-table-wrapper",
1634
- style: re(q(W)()),
1635
- onScroll: d
1649
+ style: re(U(T)()),
1650
+ onScroll: S
1636
1651
  }, [
1637
- pe(f.$slots, "default"),
1638
- h("table", Wo, [
1652
+ pe(m.$slots, "default"),
1653
+ h("table", Oo, [
1639
1654
  h("thead", null, [
1640
1655
  h("tr", null, [
1641
- n.selectable ? (p(), m("th", {
1656
+ n.selectable ? (p(), v("th", {
1642
1657
  key: 0,
1643
1658
  class: z(["vt-table__th vt-table__th--selection", {
1644
1659
  "vt-table__th--sticky": n.maxHeight,
1645
1660
  "vt-table__th--pinned-left": !0
1646
1661
  }]),
1647
- style: re(R())
1662
+ style: re(g())
1648
1663
  }, [
1649
- h("div", Do, [
1664
+ h("div", jo, [
1650
1665
  Z(ue, {
1651
- checked: (T = q(v)) == null ? void 0 : T.isAllSelected.value,
1652
- indeterminate: (P = q(v)) == null ? void 0 : P.isIndeterminate.value,
1653
- "is-double": (fe = (de = q(v)) == null ? void 0 : de.isDoubleCheck) == null ? void 0 : fe.value,
1654
- onChange: Ue
1666
+ checked: (R = U(r)) == null ? void 0 : R.isAllSelected.value,
1667
+ indeterminate: (P = U(r)) == null ? void 0 : P.isIndeterminate.value,
1668
+ "is-double": (fe = (de = U(r)) == null ? void 0 : de.isDoubleCheck) == null ? void 0 : fe.value,
1669
+ onChange: Ge
1655
1670
  }, null, 8, ["checked", "indeterminate", "is-double"])
1656
1671
  ])
1657
1672
  ], 6)) : D("", !0),
1658
- (p(!0), m(ne, null, oe(q(U), (w, ce) => (p(), m("th", {
1673
+ (p(!0), v(ne, null, oe(U(L), (w, ce) => (p(), v("th", {
1659
1674
  key: w.prop,
1660
1675
  ref_for: !0,
1661
- ref: (se) => Se(se, w.prop),
1662
- style: re(Xe(w, ce)),
1676
+ ref: (se) => Ie(se, w.prop),
1677
+ style: re(Je(w, ce)),
1663
1678
  class: z([
1664
1679
  "vt-table__th",
1665
1680
  {
@@ -1670,120 +1685,120 @@ const ie = new yo(), xo = {
1670
1685
  }
1671
1686
  ])
1672
1687
  }, [
1673
- h("div", Po, [
1674
- h("div", Ao, te(w.label), 1),
1675
- w.sortable ? (p(), m("div", Oo, [
1688
+ h("div", No, [
1689
+ h("div", Fo, te(w.label), 1),
1690
+ w.sortable ? (p(), v("div", Zo, [
1676
1691
  Z(Y, {
1677
1692
  name: "arrowTop",
1678
- class: z(q(Ee)(w, u.value).asc),
1679
- onClick: he((se) => g(w, "asc"), ["stop"])
1693
+ class: z(U(ze)(w, d.value).asc),
1694
+ onClick: he((se) => Q(w, "asc"), ["stop"])
1680
1695
  }, null, 8, ["class", "onClick"]),
1681
1696
  Z(Y, {
1682
1697
  name: "arrowDown",
1683
- class: z(q(Ee)(w, u.value).desc),
1684
- onClick: he((se) => g(w, "desc"), ["stop"])
1698
+ class: z(U(ze)(w, d.value).desc),
1699
+ onClick: he((se) => Q(w, "desc"), ["stop"])
1685
1700
  }, null, 8, ["class", "onClick"])
1686
1701
  ])) : D("", !0),
1687
- w.actionColumn ? (p(), ae(Ho, {
1702
+ w.actionColumn ? (p(), ae(Ao, {
1688
1703
  key: 1,
1689
1704
  column: w,
1690
- "all-columns": q(U),
1705
+ "all-columns": U(L),
1691
1706
  columnsSelector: n.columnsSelector,
1692
- onPin: k,
1693
- onUpdateColumns: V
1707
+ onPin: Ce,
1708
+ onUpdateColumns: qe
1694
1709
  }, null, 8, ["column", "all-columns", "columnsSelector"])) : D("", !0)
1695
1710
  ]),
1696
1711
  h("div", {
1697
1712
  class: "vt-table__resizer",
1698
1713
  "data-resizer": w.prop,
1699
- onMousedown: (se) => Ie(se, w)
1700
- }, null, 40, jo)
1714
+ onMousedown: (se) => Ve(se, w)
1715
+ }, null, 40, Uo)
1701
1716
  ], 6))), 128))
1702
1717
  ])
1703
1718
  ]),
1704
1719
  h("tbody", null, [
1705
- b.value ? (p(!0), m(ne, { key: 1 }, oe($.value, (w, ce) => {
1706
- var se, Ve, Be;
1707
- return p(), m("tr", {
1708
- key: w.id,
1720
+ y.value ? (p(!0), v(ne, { key: 1 }, oe(V.value, (w, ce) => {
1721
+ var se, Be, Re;
1722
+ return p(), v("tr", {
1723
+ key: w._key,
1709
1724
  class: z([
1710
1725
  "vt-table__row",
1711
1726
  {
1712
- "vt-table__row--selected": (se = q(v)) == null ? void 0 : se.isRowSelected(w),
1713
- "vt-table__row--current": ((Ve = q(v)) == null ? void 0 : Ve.currentRow.value) === w,
1727
+ "vt-table__row--selected": (se = U(r)) == null ? void 0 : se.isRowSelected(w),
1728
+ "vt-table__row--current": ((Be = U(r)) == null ? void 0 : Be.currentRow.value) === w,
1714
1729
  "vt-table__row--clickable": n.selectOnClickRow || n.highlightCurrentRow
1715
1730
  }
1716
1731
  ]),
1717
- onClick: (j) => ee(w, q(U)[0], j)
1732
+ onClick: (N) => Ke(w, U(L)[0], N)
1718
1733
  }, [
1719
- n.selectable ? (p(), m("td", {
1734
+ n.selectable ? (p(), v("td", {
1720
1735
  key: 0,
1721
1736
  class: z(["vt-table__td vt-table__td--selection", {
1722
1737
  "vt-table__td--pinned-left": !0
1723
1738
  }]),
1724
- style: re(O())
1739
+ style: re(f())
1725
1740
  }, [
1726
- h("div", qo, [
1741
+ h("div", Yo, [
1727
1742
  Z(ue, {
1728
- checked: (Be = q(v)) == null ? void 0 : Be.isRowSelected(w),
1729
- onChange: (j, we) => Ce(j, w, we)
1743
+ checked: (Re = U(r)) == null ? void 0 : Re.isRowSelected(w),
1744
+ onChange: (N, we) => Xe(N, w, we)
1730
1745
  }, null, 8, ["checked", "onChange"])
1731
1746
  ])
1732
1747
  ], 4)) : D("", !0),
1733
- (p(!0), m(ne, null, oe(q(U), (j, we) => (p(), m("td", {
1734
- key: j.prop,
1748
+ (p(!0), v(ne, null, oe(U(L), (N, we) => (p(), v("td", {
1749
+ key: N.prop,
1735
1750
  ref_for: !0,
1736
- ref: (ke) => Se(ke, j.prop),
1737
- style: re(qe(j, we)),
1751
+ ref: (ke) => Ie(ke, N.prop),
1752
+ style: re(Ye(N, we)),
1738
1753
  class: z([
1739
1754
  "vt-table__td",
1740
1755
  {
1741
- "vt-table__td--pinned-left": j.pinnedLeft,
1742
- "vt-table__td--pinned-right": j.pinnedRight
1756
+ "vt-table__td--pinned-left": N.pinnedLeft,
1757
+ "vt-table__td--pinned-right": N.pinnedRight
1743
1758
  }
1744
1759
  ])
1745
1760
  }, [
1746
- Le((p(), m("div", Xo, [
1747
- j.renderSlot ? (p(), ae(Oe(() => q(Co)(j.renderSlot, { row: w, column: j, value: w[j.prop], index: ce })), { key: 0 })) : (p(), m("span", Go, te(w[j.prop]), 1))
1761
+ Le((p(), v("div", Jo, [
1762
+ N.renderSlot ? (p(), ae(je(() => U(yo)(N.renderSlot, { row: w, column: N, value: w[N.prop], index: ce })), { key: 0 })) : (p(), v("span", Qo, te(w[N.prop]), 1))
1748
1763
  ])), [
1749
- [I, j.showOverflowTooltip ? Ke(w, j) : null]
1764
+ [I, N.showOverflowTooltip ? et(w, N) : null]
1750
1765
  ]),
1751
1766
  h("div", {
1752
1767
  class: "vt-table__resizer",
1753
- "data-resizer": j.prop,
1754
- onMousedown: (ke) => Ie(ke, j)
1755
- }, null, 40, Ko)
1768
+ "data-resizer": N.prop,
1769
+ onMousedown: (ke) => Ve(ke, N)
1770
+ }, null, 40, el)
1756
1771
  ], 6))), 128))
1757
- ], 10, Uo);
1758
- }), 128)) : (p(), m("tr", No, [
1772
+ ], 10, Go);
1773
+ }), 128)) : (p(), v("tr", qo, [
1759
1774
  h("td", {
1760
- colspan: q(U).length + (n.selectable ? 1 : 0),
1775
+ colspan: U(L).length + (n.selectable ? 1 : 0),
1761
1776
  class: "vt-table__empty-cell"
1762
1777
  }, [
1763
- h("div", Zo, [
1778
+ h("div", Xo, [
1764
1779
  Z(Y, {
1765
1780
  name: "empty",
1766
1781
  class: "vt-table__empty-icon"
1767
1782
  }),
1768
- C[0] || (C[0] = h("span", { class: "vt-table__empty-text" }, "Немає даних!", -1))
1783
+ _[0] || (_[0] = h("span", { class: "vt-table__empty-text" }, "Немає даних!", -1))
1769
1784
  ])
1770
- ], 8, Fo)
1785
+ ], 8, Ko)
1771
1786
  ]))
1772
1787
  ]),
1773
- Je.value ? (p(), m("tfoot", Yo, [
1788
+ nt.value ? (p(), v("tfoot", tl, [
1774
1789
  h("tr", null, [
1775
- n.selectable ? (p(), m("td", {
1790
+ n.selectable ? (p(), v("td", {
1776
1791
  key: 0,
1777
1792
  class: z(["vt-table__td", {
1778
1793
  "vt-table__td--pinned-left": !0
1779
1794
  }]),
1780
- style: re(K())
1781
- }, C[1] || (C[1] = [
1795
+ style: re(k())
1796
+ }, _[1] || (_[1] = [
1782
1797
  h("div", { class: "vt-table__cell-content vt-table__cell-content--summary" }, null, -1)
1783
1798
  ]), 4)) : D("", !0),
1784
- (p(!0), m(ne, null, oe(q(U), (w, ce) => (p(), m("td", {
1799
+ (p(!0), v(ne, null, oe(U(L), (w, ce) => (p(), v("td", {
1785
1800
  key: w.prop,
1786
- style: re(Ge(w, ce)),
1801
+ style: re(Qe(w, ce)),
1787
1802
  class: z([
1788
1803
  "vt-table__td",
1789
1804
  {
@@ -1792,7 +1807,7 @@ const ie = new yo(), xo = {
1792
1807
  }
1793
1808
  ])
1794
1809
  }, [
1795
- h("div", Jo, te(Ye.value[w.prop]), 1)
1810
+ h("div", nl, te(tt.value[w.prop]), 1)
1796
1811
  ], 6))), 128))
1797
1812
  ])
1798
1813
  ])) : D("", !0)
@@ -1800,7 +1815,7 @@ const ie = new yo(), xo = {
1800
1815
  ], 36);
1801
1816
  };
1802
1817
  }
1803
- }), el = /* @__PURE__ */ le({
1818
+ }), ll = /* @__PURE__ */ le({
1804
1819
  __name: "VTableColumn",
1805
1820
  props: {
1806
1821
  prop: {},
@@ -1818,7 +1833,7 @@ const ie = new yo(), xo = {
1818
1833
  sortMethod: {}
1819
1834
  },
1820
1835
  setup(t) {
1821
- const e = t, o = je(), n = pt("vt-table-columns");
1836
+ const e = t, o = Ne(), n = ft("vt-table-columns");
1822
1837
  n || console.error(
1823
1838
  "VTableColumn: не знайдено контекст таблиці. Переконайтеся, що компонент використовується всередині VTable."
1824
1839
  );
@@ -1840,8 +1855,8 @@ const ie = new yo(), xo = {
1840
1855
  let l = -1;
1841
1856
  return ve(() => {
1842
1857
  if (n) {
1843
- const a = s();
1844
- n.push(a), l = n.length - 1;
1858
+ const c = s();
1859
+ n.push(c), l = n.length - 1;
1845
1860
  }
1846
1861
  }), me(
1847
1862
  () => [
@@ -1858,26 +1873,26 @@ const ie = new yo(), xo = {
1858
1873
  ],
1859
1874
  () => {
1860
1875
  if (n && l !== -1) {
1861
- const a = n.findIndex((r) => r.prop === e.prop);
1862
- if (a !== -1) {
1863
- const r = n[a], i = {
1876
+ const c = n.findIndex((i) => i.prop === e.prop);
1877
+ if (c !== -1) {
1878
+ const i = n[c], a = {
1864
1879
  ...s(),
1865
- renderSlot: r.renderSlot
1880
+ renderSlot: i.renderSlot
1866
1881
  // Зберігаємо існуючий renderSlot
1867
1882
  };
1868
- n[a] = i;
1883
+ n[c] = a;
1869
1884
  }
1870
1885
  }
1871
1886
  },
1872
1887
  { deep: !0 }
1873
1888
  ), $e(() => {
1874
1889
  if (n) {
1875
- const a = n.findIndex((r) => r.prop === e.prop);
1876
- a > -1 && n.splice(a, 1);
1890
+ const c = n.findIndex((i) => i.prop === e.prop);
1891
+ c > -1 && n.splice(c, 1);
1877
1892
  }
1878
- }), (a, r) => null;
1893
+ }), (c, i) => null;
1879
1894
  }
1880
- }), ze = (t, e) => {
1895
+ }), He = (t, e) => {
1881
1896
  const o = document.createElement("div");
1882
1897
  o.className = `vt-tooltip vt-tooltip--${e}`, o.innerText = t, Object.assign(o.style, {
1883
1898
  position: "absolute",
@@ -1944,45 +1959,45 @@ const ie = new yo(), xo = {
1944
1959
  }
1945
1960
  return o.appendChild(n), o;
1946
1961
  }, Me = (t, e, o) => {
1947
- const n = e.getBoundingClientRect(), s = t.getBoundingClientRect(), l = window.pageXOffset || document.documentElement.scrollLeft, a = window.pageYOffset || document.documentElement.scrollTop;
1948
- let r = 0, i = 0;
1962
+ const n = e.getBoundingClientRect(), s = t.getBoundingClientRect(), l = window.pageXOffset || document.documentElement.scrollLeft, c = window.pageYOffset || document.documentElement.scrollTop;
1963
+ let i = 0, a = 0;
1949
1964
  switch (o) {
1950
1965
  case "top":
1951
- r = n.top + a - s.height - 8, i = n.left + l + (n.width - s.width) / 2;
1966
+ i = n.top + c - s.height - 8, a = n.left + l + (n.width - s.width) / 2;
1952
1967
  break;
1953
1968
  case "bottom":
1954
- r = n.bottom + a + 8, i = n.left + l + (n.width - s.width) / 2;
1969
+ i = n.bottom + c + 8, a = n.left + l + (n.width - s.width) / 2;
1955
1970
  break;
1956
1971
  case "left":
1957
- r = n.top + a + (n.height - s.height) / 2, i = n.left + l - s.width - 8;
1972
+ i = n.top + c + (n.height - s.height) / 2, a = n.left + l - s.width - 8;
1958
1973
  break;
1959
1974
  case "right":
1960
- r = n.top + a + (n.height - s.height) / 2, i = n.right + l + 8;
1975
+ i = n.top + c + (n.height - s.height) / 2, a = n.right + l + 8;
1961
1976
  break;
1962
1977
  }
1963
- const u = window.innerWidth, c = window.innerHeight;
1964
- i < 8 ? i = 8 : i + s.width > u - 8 && (i = u - s.width - 8), r < a + 8 ? o === "top" ? r = n.bottom + a + 8 : r = a + 8 : r + s.height > a + c - 8 && (o === "bottom" ? r = n.top + a - s.height - 8 : r = a + c - s.height - 8), t.style.top = `${r}px`, t.style.left = `${i}px`;
1965
- }, He = (t, e, o) => {
1978
+ const d = window.innerWidth, u = window.innerHeight;
1979
+ a < 8 ? a = 8 : a + s.width > d - 8 && (a = d - s.width - 8), i < c + 8 ? o === "top" ? i = n.bottom + c + 8 : i = c + 8 : i + s.height > c + u - 8 && (o === "bottom" ? i = n.top + c - s.height - 8 : i = c + u - s.height - 8), t.style.top = `${i}px`, t.style.left = `${a}px`;
1980
+ }, We = (t, e, o) => {
1966
1981
  t.parentElement || document.body.appendChild(t), t.style.visibility = "visible", Me(t, e, o), requestAnimationFrame(() => {
1967
1982
  t.style.opacity = "1";
1968
1983
  });
1969
- }, We = (t) => {
1984
+ }, De = (t) => {
1970
1985
  t.style.opacity = "0", t.style.visibility = "hidden";
1971
- }, De = (t) => t.scrollWidth > t.clientWidth || t.scrollHeight > t.clientHeight, Pe = (t) => !!t.closest(".vt-table, table"), tl = {
1986
+ }, Pe = (t) => t.scrollWidth > t.clientWidth || t.scrollHeight > t.clientHeight, Ae = (t) => !!t.closest(".vt-table, table"), sl = {
1972
1987
  mounted(t, e) {
1973
- var i;
1974
- const o = (i = e.value) == null ? void 0 : i.trim();
1988
+ var a;
1989
+ const o = (a = e.value) == null ? void 0 : a.trim();
1975
1990
  if (!o) return;
1976
- const n = t.dataset.placement || "top", s = ze(o, n);
1991
+ const n = t.dataset.placement || "top", s = He(o, n);
1977
1992
  t.__tooltipEl = s;
1978
1993
  const l = () => {
1979
- (Pe(t) ? De(t) : !0) && He(s, t, n);
1980
- }, a = () => {
1981
- We(s);
1982
- }, r = () => {
1994
+ (Ae(t) ? Pe(t) : !0) && We(s, t, n);
1995
+ }, c = () => {
1996
+ De(s);
1997
+ }, i = () => {
1983
1998
  s.style.opacity === "1" && Me(s, t, n);
1984
1999
  };
1985
- t.__mouseenterHandler = l, t.__mouseleaveHandler = a, t.__scrollHandler = r, t.addEventListener("mouseenter", l), t.addEventListener("mouseleave", a), window.addEventListener("scroll", r, !0), window.addEventListener("resize", r);
2000
+ t.__mouseenterHandler = l, t.__mouseleaveHandler = c, t.__scrollHandler = i, t.addEventListener("mouseenter", l), t.addEventListener("mouseleave", c), window.addEventListener("scroll", i, !0), window.addEventListener("resize", i);
1986
2001
  },
1987
2002
  updated(t, e) {
1988
2003
  var n;
@@ -1990,47 +2005,47 @@ const ie = new yo(), xo = {
1990
2005
  if (t.__tooltipEl)
1991
2006
  o ? t.__tooltipEl.firstChild.textContent = o : (t.__tooltipEl.parentElement && t.__tooltipEl.parentElement.removeChild(t.__tooltipEl), delete t.__tooltipEl);
1992
2007
  else if (o) {
1993
- const s = t.dataset.placement || "top", l = ze(o, s);
2008
+ const s = t.dataset.placement || "top", l = He(o, s);
1994
2009
  t.__tooltipEl = l;
1995
- const a = () => {
1996
- (Pe(t) ? De(t) : !0) && He(l, t, s);
1997
- }, r = () => {
1998
- We(l);
2010
+ const c = () => {
2011
+ (Ae(t) ? Pe(t) : !0) && We(l, t, s);
1999
2012
  }, i = () => {
2013
+ De(l);
2014
+ }, a = () => {
2000
2015
  l.style.opacity === "1" && Me(l, t, s);
2001
2016
  };
2002
- t.__mouseenterHandler = a, t.__mouseleaveHandler = r, t.__scrollHandler = i, t.addEventListener("mouseenter", a), t.addEventListener("mouseleave", r), window.addEventListener("scroll", i, !0), window.addEventListener("resize", i);
2017
+ t.__mouseenterHandler = c, t.__mouseleaveHandler = i, t.__scrollHandler = a, t.addEventListener("mouseenter", c), t.addEventListener("mouseleave", i), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a);
2003
2018
  }
2004
2019
  },
2005
2020
  beforeUnmount(t) {
2006
2021
  t.__tooltipEl && t.__tooltipEl.parentElement && (t.__tooltipEl.parentElement.removeChild(t.__tooltipEl), delete t.__tooltipEl), t.__mouseenterHandler && (t.removeEventListener("mouseenter", t.__mouseenterHandler), delete t.__mouseenterHandler), t.__mouseleaveHandler && (t.removeEventListener("mouseleave", t.__mouseleaveHandler), delete t.__mouseleaveHandler), t.__scrollHandler && (window.removeEventListener("scroll", t.__scrollHandler, !0), window.removeEventListener("resize", t.__scrollHandler), delete t.__scrollHandler);
2007
2022
  }
2008
- }, ll = {
2023
+ }, al = {
2009
2024
  sortable: !0,
2010
2025
  actionColumn: !1,
2011
2026
  showOverflowTooltip: !0,
2012
2027
  visible: !0,
2013
2028
  pinnedLeft: !1,
2014
2029
  pinnedRight: !1
2015
- }, nl = {
2030
+ }, rl = {
2016
2031
  install(t, e = {}) {
2017
2032
  const { prefix: o = "V", modal: n = !0 } = e;
2018
- t.component(`${o}Button`, ge), t.component(`${o}Icon`, Y), t.component(`${o}Loader`, Fe), t.component(`${o}Modal`, Ze), t.component(`${o}Pagination`, po), t.component(`${o}Checkbox`, ue), t.component(`${o}Table`, Qo), t.component(`${o}TableColumn`, el), t.directive("tooltip", tl), n && t.use(xo);
2033
+ t.component(`${o}Button`, ge), t.component(`${o}Icon`, Y), t.component(`${o}Loader`, Ze), t.component(`${o}Modal`, Ue), t.component(`${o}Pagination`, fo), t.component(`${o}Checkbox`, ue), t.component(`${o}Table`, ol), t.component(`${o}TableColumn`, ll), t.directive("tooltip", sl), n && t.use(So);
2019
2034
  }
2020
- }, sl = nl.install;
2035
+ }, cl = rl.install;
2021
2036
  export {
2022
- ll as DEFAULT_COLUMN_CONFIG,
2037
+ al as DEFAULT_COLUMN_CONFIG,
2023
2038
  ge as VButton,
2024
2039
  ue as VCheckbox,
2025
2040
  Y as VIcon,
2026
- Fe as VLoader,
2027
- Ze as VModal,
2028
- xo as VModalPlugin,
2029
- po as VPagination,
2030
- Qo as VTable,
2031
- el as VTableColumn,
2032
- nl as default,
2033
- sl as install,
2041
+ Ze as VLoader,
2042
+ Ue as VModal,
2043
+ So as VModalPlugin,
2044
+ fo as VPagination,
2045
+ ol as VTable,
2046
+ ll as VTableColumn,
2047
+ rl as default,
2048
+ cl as install,
2034
2049
  ie as modalManager,
2035
- tl as tooltipDirective
2050
+ sl as tooltipDirective
2036
2051
  };