voiptime-components 1.0.17 → 1.0.19

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 Ne, defineComponent as se, computed as L, createBlock as ce, createCommentVNode as A, resolveDynamicComponent as Fe, useSlots as Ze, resolveDirective as Ue, withDirectives as $e, normalizeClass as D, renderSlot as pe, Teleport as ut, normalizeStyle as ie, withModifiers as he, toDisplayString as te, watch as me, Fragment as oe, renderList as le, vModelSelect as dt, createVNode as F, withCtx as Me, createTextVNode as ge, ref as O, createApp as pt, h as ye, onMounted as ve, onUnmounted as Se, nextTick as ht, mergeModels as ze, useModel as mt, reactive as vt, provide as ft, unref as Z, isMemoSame as _t, inject as gt } from "vue";
2
- const P = (t, e) => {
1
+ import { createElementBlock as v, openBlock as p, createElementVNode as h, createStaticVNode as je, defineComponent as te, computed as S, createBlock as ne, createCommentVNode as W, resolveDynamicComponent as Ne, useSlots as $e, resolveDirective as Fe, withDirectives as Se, normalizeClass as z, renderSlot as de, Teleport as Ze, normalizeStyle as se, withModifiers as he, toDisplayString as ee, watch as ve, Fragment as re, renderList as ie, vModelSelect as pt, createVNode as F, withCtx as ue, createTextVNode as ge, ref as P, provide as Ye, onMounted as fe, onUnmounted as Ve, nextTick as ht, inject as Ue, createApp as mt, h as ye, mergeModels as Re, useModel as vt, reactive as ft, unref as X } from "vue";
2
+ const D = (t, e) => {
3
3
  const o = t.__vccOpts || t;
4
- for (const [n, s] of e)
5
- o[n] = s;
4
+ for (const [n, l] of e)
5
+ o[n] = l;
6
6
  return o;
7
- }, Ct = {}, wt = {
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 kt(t, e) {
15
- return p(), m("svg", wt, e[0] || (e[0] = [
14
+ function wt(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 kt(t, e) {
22
22
  }, null, -1)
23
23
  ]));
24
24
  }
25
- const bt = /* @__PURE__ */ P(Ct, [["render", kt]]), yt = {}, xt = {
25
+ const Ct = /* @__PURE__ */ D(_t, [["render", wt]]), 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 Mt(t, e) {
33
- return p(), m("svg", xt, 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 Mt(t, e) {
40
40
  }, null, -1)
41
41
  ]));
42
42
  }
43
- const Lt = /* @__PURE__ */ P(yt, [["render", Mt]]), $t = {}, St = {
43
+ const xt = /* @__PURE__ */ D(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 It(t, e) {
51
- return p(), m("svg", St, 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 It(t, e) {
62
62
  }, null, -1)
63
63
  ]));
64
64
  }
65
- const Vt = /* @__PURE__ */ P($t, [["render", It]]), Bt = {}, Rt = {
65
+ const St = /* @__PURE__ */ D(Mt, [["render", $t]]), Vt = {}, It = {
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 Tt(t, e) {
73
- return p(), m("svg", Rt, e[0] || (e[0] = [
72
+ function Bt(t, e) {
73
+ return p(), v("svg", It, 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 Tt(t, e) {
80
80
  }, null, -1)
81
81
  ]));
82
82
  }
83
- const Et = /* @__PURE__ */ P(Bt, [["render", Tt]]), zt = {}, Ht = {
83
+ const Tt = /* @__PURE__ */ D(Vt, [["render", Bt]]), Et = {}, Rt = {
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 Wt(t, e) {
91
- return p(), m("svg", Ht, e[0] || (e[0] = [
90
+ function zt(t, e) {
91
+ return p(), v("svg", Rt, 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 Wt(t, e) {
98
98
  }, null, -1)
99
99
  ]));
100
100
  }
101
- const Dt = /* @__PURE__ */ P(zt, [["render", Wt]]), Pt = {}, At = {
101
+ const Ht = /* @__PURE__ */ D(Et, [["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 Ot(t, e) {
109
- return p(), m("svg", At, 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 Ot(t, e) {
116
116
  }, null, -1)
117
117
  ]));
118
118
  }
119
- const jt = /* @__PURE__ */ P(Pt, [["render", Ot]]), Nt = {}, Ft = {
119
+ const At = /* @__PURE__ */ D(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 Zt(t, e) {
127
- return p(), m("svg", Ft, 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 Zt(t, e) {
140
140
  }, null, -1)
141
141
  ]));
142
142
  }
143
- const Ut = /* @__PURE__ */ P(Nt, [["render", Zt]]), Kt = {}, qt = {
143
+ const Ft = /* @__PURE__ */ D(Ot, [["render", Nt]]), Zt = {}, Yt = {
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 Xt(t, e) {
151
- return p(), m("svg", qt, e[0] || (e[0] = [
150
+ function Ut(t, e) {
151
+ return p(), v("svg", Yt, 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 Xt(t, e) {
164
164
  }, null, -1)
165
165
  ]));
166
166
  }
167
- const Gt = /* @__PURE__ */ P(Kt, [["render", Xt]]), Yt = {}, Jt = {
167
+ const Xt = /* @__PURE__ */ D(Zt, [["render", Ut]]), Kt = {}, qt = {
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", Jt, e[0] || (e[0] = [
174
+ function Gt(t, e) {
175
+ return p(), v("svg", qt, 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 en = /* @__PURE__ */ P(Yt, [["render", Qt]]), tn = {}, nn = {
185
+ const Jt = /* @__PURE__ */ D(Kt, [["render", Gt]]), 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 on(t, e) {
193
- return p(), m("svg", nn, 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 on(t, e) {
205
205
  }, null, -1)
206
206
  ]));
207
207
  }
208
- const ln = /* @__PURE__ */ P(tn, [["render", on]]), sn = {}, rn = {
208
+ const nn = /* @__PURE__ */ D(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 an(t, e) {
216
- return p(), m("svg", rn, 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 an(t, e) {
222
222
  }, null, -1)
223
223
  ]));
224
224
  }
225
- const cn = /* @__PURE__ */ P(sn, [["render", an]]), un = {}, dn = {
225
+ const rn = /* @__PURE__ */ D(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 pn(t, e) {
233
- return p(), m("svg", dn, e[0] || (e[0] = [
232
+ function dn(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 pn(t, e) {
239
239
  }, null, -1)
240
240
  ]));
241
241
  }
242
- const hn = /* @__PURE__ */ P(un, [["render", pn]]), mn = {}, vn = {
242
+ const un = /* @__PURE__ */ D(an, [["render", dn]]), 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 fn(t, e) {
250
- return p(), m("svg", vn, 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 fn(t, e) {
257
257
  }, null, -1)
258
258
  ]));
259
259
  }
260
- const _n = /* @__PURE__ */ P(mn, [["render", fn]]), gn = {}, Cn = {
260
+ const vn = /* @__PURE__ */ D(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 wn(t, e) {
268
- return p(), m("svg", Cn, 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 wn(t, e) {
275
275
  }, null, -1)
276
276
  ]));
277
277
  }
278
- const kn = /* @__PURE__ */ P(gn, [["render", wn]]), bn = {}, yn = {
278
+ const wn = /* @__PURE__ */ D(fn, [["render", gn]]), Cn = {}, 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 xn(t, e) {
286
- return p(), m("svg", yn, 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 xn(t, e) {
293
293
  }, null, -1)
294
294
  ]));
295
295
  }
296
- const Mn = /* @__PURE__ */ P(bn, [["render", xn]]), Ln = {}, $n = {
296
+ const yn = /* @__PURE__ */ D(Cn, [["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 Sn(t, e) {
304
- return p(), m("svg", $n, 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 Sn(t, e) {
316
316
  }, null, -1)
317
317
  ]));
318
318
  }
319
- const In = /* @__PURE__ */ P(Ln, [["render", Sn]]), Vn = {}, Bn = {
319
+ const $n = /* @__PURE__ */ D(xn, [["render", Ln]]), Sn = {}, Vn = {
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 Rn(t, e) {
327
- return p(), m("svg", Bn, e[0] || (e[0] = [
328
- Ne('<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 In(t, e) {
327
+ return p(), v("svg", Vn, e[0] || (e[0] = [
328
+ je('<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 Tn = /* @__PURE__ */ P(Vn, [["render", Rn]]), En = {}, zn = {
331
+ const Bn = /* @__PURE__ */ D(Sn, [["render", In]]), Tn = {}, En = {
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 Hn(t, e) {
339
- return p(), m("svg", zn, e[0] || (e[0] = [
338
+ function Rn(t, e) {
339
+ return p(), v("svg", En, 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 Hn(t, e) {
346
346
  }, null, -1)
347
347
  ]));
348
348
  }
349
- const Wn = /* @__PURE__ */ P(En, [["render", Hn]]), Dn = {}, Pn = {
349
+ const zn = /* @__PURE__ */ D(Tn, [["render", Rn]]), 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 An(t, e) {
357
- return p(), m("svg", Pn, 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 An(t, e) {
374
374
  }, null, -1)
375
375
  ]));
376
376
  }
377
- const On = /* @__PURE__ */ P(Dn, [["render", An]]), jn = {}, Nn = {
377
+ const Pn = /* @__PURE__ */ D(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 Fn(t, e) {
385
- return p(), m("svg", Nn, 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 Fn(t, e) {
399
399
  }, null, -1)
400
400
  ]));
401
401
  }
402
- const Zn = /* @__PURE__ */ P(jn, [["render", Fn]]), Un = {}, Kn = {
402
+ const Nn = /* @__PURE__ */ D(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 qn(t, e) {
410
- return p(), m("svg", Kn, e[0] || (e[0] = [
411
- Ne('<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 Yn(t, e) {
410
+ return p(), v("svg", Zn, e[0] || (e[0] = [
411
+ je('<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 Xn = /* @__PURE__ */ P(Un, [["render", qn]]), Gn = {}, Yn = {
414
+ const Un = /* @__PURE__ */ D(Fn, [["render", Yn]]), Xn = {}, Kn = {
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 Jn(t, e) {
422
- return p(), m("svg", Yn, e[0] || (e[0] = [
421
+ function qn(t, e) {
422
+ return p(), v("svg", Kn, 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,50 +436,50 @@ function Jn(t, e) {
436
436
  }, null, -1)
437
437
  ]));
438
438
  }
439
- const Qn = /* @__PURE__ */ P(Gn, [["render", Jn]]), eo = {
439
+ const Gn = /* @__PURE__ */ D(Xn, [["render", qn]]), Jn = {
440
440
  // arrow icons
441
- arrowDown: bt,
442
- arrowTop: Lt,
443
- arrowRight: Et,
444
- arrowLeft: Dt,
445
- arrowReload: Vt,
441
+ arrowDown: Ct,
442
+ arrowTop: xt,
443
+ arrowRight: Tt,
444
+ arrowLeft: Ht,
445
+ arrowReload: St,
446
446
  // table icons
447
- columnInsert: jt,
448
- freeze: Ut,
449
- unfreeze: Gt,
450
- columnsMove: ln,
451
- empty: en,
447
+ columnInsert: At,
448
+ freeze: Ft,
449
+ unfreeze: Xt,
450
+ columnsMove: nn,
451
+ empty: Jt,
452
452
  // actions icons
453
- listBullet: cn,
454
- listBulletHorizontal: hn,
455
- close: _n,
453
+ listBullet: rn,
454
+ listBulletHorizontal: un,
455
+ close: vn,
456
456
  // filter icons
457
- filterSave: kn,
458
- filterReset: Mn,
459
- filterNew: In,
460
- filterMultiselect: Tn,
461
- filterExchange: Wn,
462
- filterEdit: On,
463
- filterDateCheck: Zn,
464
- filterAdvanced: Xn,
465
- filterAdd: Qn
466
- }, J = /* @__PURE__ */ se({
457
+ filterSave: wn,
458
+ filterReset: yn,
459
+ filterNew: $n,
460
+ filterMultiselect: Bn,
461
+ filterExchange: zn,
462
+ filterEdit: Pn,
463
+ filterDateCheck: Nn,
464
+ filterAdvanced: Un,
465
+ filterAdd: Gn
466
+ }, G = /* @__PURE__ */ te({
467
467
  __name: "VIcon",
468
468
  props: {
469
469
  name: {}
470
470
  },
471
471
  setup(t) {
472
- const e = t, o = L(() => eo[e.name]);
473
- return (n, s) => o.value ? (p(), ce(Fe(o.value), { key: 0 })) : A("", !0);
472
+ const e = t, o = S(() => Jn[e.name]);
473
+ return (n, l) => o.value ? (p(), ne(Ne(o.value), { key: 0 })) : W("", !0);
474
474
  }
475
- }), to = {}, no = { class: "vt-loader" };
476
- function oo(t, e) {
477
- return p(), m("span", no);
475
+ }), Qn = {}, eo = { class: "vt-loader" };
476
+ function to(t, e) {
477
+ return p(), v("span", eo);
478
478
  }
479
- const Ke = /* @__PURE__ */ P(to, [["render", oo]]), lo = ["disabled", "type", "data-placement"], so = {
479
+ const Xe = /* @__PURE__ */ D(Qn, [["render", to]]), no = ["disabled", "type", "data-placement"], oo = {
480
480
  key: 2,
481
481
  class: "vt-button__content"
482
- }, Ce = /* @__PURE__ */ se({
482
+ }, we = /* @__PURE__ */ te({
483
483
  __name: "VButton",
484
484
  props: {
485
485
  type: { default: "default" },
@@ -493,54 +493,54 @@ const Ke = /* @__PURE__ */ P(to, [["render", oo]]), lo = ["disabled", "type", "d
493
493
  },
494
494
  emits: ["click"],
495
495
  setup(t, { emit: e }) {
496
- const o = t, n = e, s = Ze(), l = L(() => !!(o.icon && o.shape)), a = L(() => {
497
- var y, $;
498
- const c = s.default ? s.default({}) : null;
499
- return (($ = (y = c == null ? void 0 : c[0]) == null ? void 0 : y.children) == null ? void 0 : $.toString()) ?? "";
500
- }), r = L(() => [
496
+ const o = t, n = e, l = $e(), s = S(() => !!(o.icon && o.shape)), i = S(() => {
497
+ var C, L;
498
+ const r = l.default ? l.default({}) : null;
499
+ return ((L = (C = r == null ? void 0 : r[0]) == null ? void 0 : C.children) == null ? void 0 : L.toString()) ?? "";
500
+ }), c = S(() => [
501
501
  "vt-button",
502
502
  `vt-button--${o.type}`,
503
503
  {
504
504
  [`vt-button--${o.shape}`]: o.shape,
505
- "vt-button--icon-only": l.value,
505
+ "vt-button--icon-only": s.value,
506
506
  "vt-button--disabled": o.disabled || o.loading,
507
507
  "vt-button--loading": o.loading
508
508
  }
509
- ]), i = L(() => l.value && o.tooltip ? a.value : null), u = (c) => {
510
- !o.disabled && !o.loading && n("click", c);
509
+ ]), a = S(() => s.value && o.tooltip ? i.value : null), u = (r) => {
510
+ !o.disabled && !o.loading && n("click", r);
511
511
  };
512
- return (c, y) => {
513
- const $ = Ue("tooltip");
514
- return $e((p(), m("button", {
515
- class: D(r.value),
512
+ return (r, C) => {
513
+ const L = Fe("tooltip");
514
+ return Se((p(), v("button", {
515
+ class: z(c.value),
516
516
  disabled: o.disabled || o.loading,
517
517
  type: o.htmlType,
518
518
  "data-placement": o.tooltipPlacement,
519
519
  onClick: u
520
520
  }, [
521
- o.loading ? (p(), ce(Ke, {
521
+ o.loading ? (p(), ne(Xe, {
522
522
  key: 0,
523
523
  class: "vt-button__icon"
524
- })) : o.icon ? (p(), ce(J, {
524
+ })) : o.icon ? (p(), ne(G, {
525
525
  key: 1,
526
526
  name: o.icon,
527
527
  class: "vt-button__icon"
528
- }, null, 8, ["name"])) : A("", !0),
529
- l.value ? A("", !0) : (p(), m("span", so, [
530
- pe(c.$slots, "default")
528
+ }, null, 8, ["name"])) : W("", !0),
529
+ s.value ? W("", !0) : (p(), v("span", oo, [
530
+ de(r.$slots, "default")
531
531
  ]))
532
- ], 10, lo)), [
533
- [$, i.value]
532
+ ], 10, no)), [
533
+ [L, a.value]
534
534
  ]);
535
535
  };
536
536
  }
537
- }), ro = {
537
+ }), lo = {
538
538
  key: 0,
539
539
  class: "vt-modal__header"
540
- }, io = {
540
+ }, so = {
541
541
  key: 0,
542
542
  class: "vt-modal__title"
543
- }, ao = { class: "vt-modal__content" }, qe = /* @__PURE__ */ se({
543
+ }, ro = { class: "vt-modal__content" }, Ke = /* @__PURE__ */ te({
544
544
  __name: "VModal",
545
545
  props: {
546
546
  modelValue: { type: Boolean },
@@ -552,42 +552,42 @@ const Ke = /* @__PURE__ */ P(to, [["render", oo]]), lo = ["disabled", "type", "d
552
552
  },
553
553
  emits: ["update:modelValue", "close"],
554
554
  setup(t, { emit: e }) {
555
- const o = t, n = e, s = L(() => ["vt-modal__container", `vt-modal__container--${o.size}`]), l = L(() => ({
555
+ const o = t, n = e, l = S(() => ["vt-modal__container", `vt-modal__container--${o.size}`]), s = S(() => ({
556
556
  zIndex: o.zIndex
557
- })), a = () => {
557
+ })), i = () => {
558
558
  n("update:modelValue", !1), n("close");
559
- }, r = () => {
560
- o.closeOnBackdropClick && a();
559
+ }, c = () => {
560
+ o.closeOnBackdropClick && i();
561
561
  };
562
- return (i, u) => (p(), ce(ut, { to: "body" }, [
563
- i.modelValue ? (p(), m("div", {
562
+ return (a, u) => (p(), ne(Ze, { to: "body" }, [
563
+ a.modelValue ? (p(), v("div", {
564
564
  key: 0,
565
565
  class: "vt-modal__backdrop",
566
- style: ie(l.value),
567
- onClick: r
566
+ style: se(s.value),
567
+ onClick: c
568
568
  }, [
569
569
  h("div", {
570
- class: D(s.value),
570
+ class: z(l.value),
571
571
  onClick: u[0] || (u[0] = he(() => {
572
572
  }, ["stop"]))
573
573
  }, [
574
- i.title || i.showCloseButton ? (p(), m("div", ro, [
575
- i.title ? (p(), m("h2", io, te(i.title), 1)) : A("", !0),
576
- i.showCloseButton ? (p(), ce(J, {
574
+ a.title || a.showCloseButton ? (p(), v("div", lo, [
575
+ a.title ? (p(), v("h2", so, ee(a.title), 1)) : W("", !0),
576
+ a.showCloseButton ? (p(), ne(G, {
577
577
  key: 1,
578
578
  name: "close",
579
579
  class: "vt-modal__close",
580
- onClick: a
581
- })) : A("", !0)
582
- ])) : A("", !0),
583
- h("div", ao, [
584
- pe(i.$slots, "default")
580
+ onClick: i
581
+ })) : W("", !0)
582
+ ])) : W("", !0),
583
+ h("div", ro, [
584
+ de(a.$slots, "default")
585
585
  ])
586
586
  ], 2)
587
- ], 4)) : A("", !0)
587
+ ], 4)) : W("", !0)
588
588
  ]));
589
589
  }
590
- }), co = { class: "vt-pagination" }, uo = { class: "vt-pagination__info" }, po = { class: "vt-pagination__rows-per-page" }, ho = ["value"], mo = { class: "vt-pagination__navigation" }, vo = ["disabled"], fo = ["onClick"], _o = ["disabled"], go = /* @__PURE__ */ se({
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__ */ te({
591
591
  __name: "VPagination",
592
592
  props: {
593
593
  totalItems: {},
@@ -598,102 +598,102 @@ const Ke = /* @__PURE__ */ P(to, [["render", oo]]), lo = ["disabled", "type", "d
598
598
  },
599
599
  emits: ["update:currentPage", "update:pageSize", "pageChange", "reloadData"],
600
600
  setup(t, { emit: e }) {
601
- const o = t, n = e, s = L({
601
+ const o = t, n = e, l = S({
602
602
  get: () => o.currentPage,
603
- set: (x) => n("update:currentPage", x)
604
- }), l = L({
603
+ set: (b) => n("update:currentPage", b)
604
+ }), s = S({
605
605
  get: () => o.pageSize,
606
- set: (x) => n("update:pageSize", x)
607
- }), a = L(() => Math.ceil(o.totalItems / l.value)), r = L(() => o.totalItems === 0 ? 0 : (s.value - 1) * l.value + 1), i = L(() => Math.min(s.value * l.value, o.totalItems)), u = L(() => s.value <= 1), c = L(() => s.value >= a.value), y = L(() => {
608
- const x = [], B = a.value, I = s.value, K = o.maxVisiblePages;
609
- if (B <= K)
610
- for (let M = 1; M <= B; M++)
611
- x.push(M);
606
+ set: (b) => n("update:pageSize", b)
607
+ }), i = S(() => Math.ceil(o.totalItems / s.value)), c = S(() => o.totalItems === 0 ? 0 : (l.value - 1) * s.value + 1), a = S(() => Math.min(l.value * s.value, o.totalItems)), u = S(() => l.value <= 1), r = S(() => l.value >= i.value), C = S(() => {
608
+ const b = [], I = i.value, V = l.value, K = o.maxVisiblePages;
609
+ if (I <= K)
610
+ for (let q = 1; q <= I; q++)
611
+ b.push(q);
612
612
  else {
613
- x.push(1);
614
- const M = Math.max(2, I - Math.floor(K / 2)), z = Math.min(B - 1, I + Math.floor(K / 2));
615
- M > 2 && x.push("...");
616
- for (let H = M; H <= z; H++)
617
- x.push(H);
618
- z < B - 1 && x.push("..."), B > 1 && x.push(B);
613
+ b.push(1);
614
+ const q = Math.max(2, V - Math.floor(K / 2)), Q = Math.min(I - 1, V + Math.floor(K / 2));
615
+ q > 2 && b.push("...");
616
+ for (let U = q; U <= Q; U++)
617
+ b.push(U);
618
+ Q < I - 1 && b.push("..."), I > 1 && b.push(I);
619
619
  }
620
- return x;
621
- }), $ = () => {
620
+ return b;
621
+ }), L = () => {
622
622
  n("pageChange", {
623
- page: s.value,
624
- pageSize: l.value
623
+ page: l.value,
624
+ pageSize: s.value
625
625
  });
626
- }, N = (x) => {
627
- typeof x == "number" && x !== s.value && (s.value = x, $());
628
- }, q = () => {
629
- u.value || (s.value--, $());
630
- }, U = () => {
631
- c.value || (s.value++, $());
632
- }, G = () => {
633
- s.value = 1, $();
626
+ }, j = (b) => {
627
+ typeof b == "number" && b !== l.value && (l.value = b, L());
634
628
  }, Y = () => {
635
- n("reloadData", s.value);
629
+ u.value || (l.value--, L());
630
+ }, N = () => {
631
+ r.value || (l.value++, L());
632
+ }, R = () => {
633
+ l.value = 1, L();
634
+ }, A = () => {
635
+ n("reloadData", l.value);
636
636
  };
637
- return me(
637
+ return ve(
638
638
  () => o.totalItems,
639
639
  () => {
640
- s.value > a.value && a.value > 0 && (s.value = a.value, $());
640
+ l.value > i.value && i.value > 0 && (l.value = i.value, L());
641
641
  }
642
- ), (x, B) => (p(), m("div", co, [
643
- h("div", uo, [
644
- h("div", po, [
645
- B[1] || (B[1] = h("label", {
642
+ ), (b, I) => (p(), v("div", io, [
643
+ h("div", ao, [
644
+ h("div", co, [
645
+ I[1] || (I[1] = h("label", {
646
646
  for: "rowsSelect",
647
647
  class: "vt-pagination__label"
648
648
  }, "Рядків на сторінку:", -1)),
649
- $e(h("select", {
649
+ Se(h("select", {
650
650
  id: "rowsSelect",
651
- "onUpdate:modelValue": B[0] || (B[0] = (I) => l.value = I),
652
- onChange: G,
651
+ "onUpdate:modelValue": I[0] || (I[0] = (V) => s.value = V),
652
+ onChange: R,
653
653
  class: "vt-pagination__select"
654
654
  }, [
655
- (p(!0), m(oe, null, le(x.pageSizeOptions, (I) => (p(), m("option", {
656
- key: I,
657
- value: I
658
- }, te(I), 9, ho))), 128))
655
+ (p(!0), v(re, null, ie(b.pageSizeOptions, (V) => (p(), v("option", {
656
+ key: V,
657
+ value: V
658
+ }, ee(V), 9, uo))), 128))
659
659
  ], 544), [
660
- [dt, l.value]
660
+ [pt, s.value]
661
661
  ])
662
662
  ]),
663
- h("span", null, te(r.value) + " - " + te(i.value) + " з " + te(x.totalItems), 1)
663
+ h("span", null, ee(c.value) + " - " + ee(a.value) + " з " + ee(b.totalItems), 1)
664
664
  ]),
665
- h("div", mo, [
665
+ h("div", po, [
666
666
  h("button", {
667
- onClick: q,
667
+ onClick: Y,
668
668
  disabled: u.value,
669
- class: D({ "vt-pagination__nav-button": !0, "has-items": !u.value })
669
+ class: z({ "vt-pagination__nav-button": !0, "has-items": !u.value })
670
670
  }, [
671
- F(J, { name: "arrowLeft" })
672
- ], 10, vo),
673
- (p(!0), m(oe, null, le(y.value, (I) => (p(), m("button", {
674
- key: I,
675
- onClick: (K) => N(I),
676
- class: D(["vt-pagination__nav-button", {
677
- "vt-pagination__nav-button--active": I === s.value
671
+ F(G, { name: "arrowLeft" })
672
+ ], 10, ho),
673
+ (p(!0), v(re, null, ie(C.value, (V) => (p(), v("button", {
674
+ key: V,
675
+ onClick: (K) => j(V),
676
+ class: z(["vt-pagination__nav-button", {
677
+ "vt-pagination__nav-button--active": V === l.value
678
678
  }])
679
- }, te(I), 11, fo))), 128)),
679
+ }, ee(V), 11, mo))), 128)),
680
680
  h("button", {
681
- onClick: U,
682
- disabled: c.value,
683
- class: D({ "vt-pagination__nav-button": !0, "has-items": !c.value })
681
+ onClick: N,
682
+ disabled: r.value,
683
+ class: z({ "vt-pagination__nav-button": !0, "has-items": !r.value })
684
684
  }, [
685
- F(J, { name: "arrowRight" })
686
- ], 10, _o)
685
+ F(G, { name: "arrowRight" })
686
+ ], 10, vo)
687
687
  ]),
688
688
  h("div", null, [
689
- F(Ce, {
689
+ F(we, {
690
690
  icon: "arrowReload",
691
691
  shape: "circle",
692
692
  tooltip: "",
693
693
  tooltipPlacement: "left",
694
- onClick: Y
694
+ onClick: A
695
695
  }, {
696
- default: Me(() => B[2] || (B[2] = [
696
+ default: ue(() => I[2] || (I[2] = [
697
697
  ge("Оновити дані ", -1)
698
698
  ])),
699
699
  _: 1,
@@ -702,7 +702,7 @@ const Ke = /* @__PURE__ */ P(to, [["render", oo]]), lo = ["disabled", "type", "d
702
702
  ])
703
703
  ]));
704
704
  }
705
- }), Co = ["for"], wo = ["id", "name", "value", "checked", "disabled", "required", ".indeterminate"], ue = /* @__PURE__ */ se({
705
+ }), _o = ["for"], go = ["id", "name", "value", "checked", "disabled", "required", ".indeterminate"], pe = /* @__PURE__ */ te({
706
706
  __name: "VCheckbox",
707
707
  props: {
708
708
  modelValue: { type: Boolean, default: void 0 },
@@ -720,58 +720,58 @@ const Ke = /* @__PURE__ */ P(to, [["render", oo]]), lo = ["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 = L(() => o.id || s()), a = L(() => o.modelValue ?? o.checked), r = (c) => {
723
+ const o = t, n = e, l = () => `vt-checkbox-${Math.random().toString(36).substr(2, 9)}`, s = S(() => o.id || l()), i = S(() => o.modelValue ?? o.checked), c = (r) => {
724
724
  if (o.disabled) return;
725
- const $ = c.target.checked;
726
- n("update:modelValue", $), n("change", $, c);
727
- }, i = (c) => {
728
- n("focus", c);
729
- }, u = (c) => {
730
- n("blur", c);
725
+ const L = r.target.checked;
726
+ n("update:modelValue", L), n("change", L, r);
727
+ }, a = (r) => {
728
+ n("focus", r);
729
+ }, u = (r) => {
730
+ n("blur", r);
731
731
  };
732
- return (c, y) => (p(), m("label", {
733
- class: D([
732
+ return (r, C) => (p(), v("label", {
733
+ class: z([
734
734
  "vt-checkbox",
735
- `vt-checkbox--${c.size}`,
736
- `vt-checkbox--${c.variant}`,
735
+ `vt-checkbox--${r.size}`,
736
+ `vt-checkbox--${r.variant}`,
737
737
  {
738
- "vt-checkbox--disabled": c.disabled,
739
- "vt-checkbox--double": c.isDouble
738
+ "vt-checkbox--disabled": r.disabled,
739
+ "vt-checkbox--double": r.isDouble
740
740
  }
741
741
  ]),
742
- for: l.value
742
+ for: s.value
743
743
  }, [
744
744
  h("input", {
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,
745
+ id: s.value,
746
+ name: r.name,
747
+ value: r.value,
748
+ checked: i.value,
749
+ disabled: r.disabled,
750
+ required: r.required,
751
+ ".indeterminate": r.indeterminate,
752
752
  type: "checkbox",
753
753
  class: "vt-checkbox__input",
754
- onChange: r,
755
- onFocus: i,
754
+ onChange: c,
755
+ onFocus: a,
756
756
  onBlur: u
757
- }, null, 40, wo),
757
+ }, null, 40, go),
758
758
  h("div", {
759
- class: D([
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": i.value && !r.indeterminate && !r.isDouble,
763
+ "vt-checkbox__box--indeterminate": r.indeterminate,
764
+ "vt-checkbox__box--double": r.isDouble && i.value,
765
+ "vt-checkbox__box--disabled": r.disabled
766
766
  }
767
767
  ])
768
768
  }, [
769
- !c.indeterminate && !c.isDouble ? (p(), m("svg", {
769
+ !r.indeterminate && !r.isDouble ? (p(), v("svg", {
770
770
  key: 0,
771
- class: D([
771
+ class: z([
772
772
  "vt-checkbox__checkmark",
773
773
  {
774
- "vt-checkbox__checkmark--checked": a.value
774
+ "vt-checkbox__checkmark--checked": i.value
775
775
  }
776
776
  ]),
777
777
  width: "10",
@@ -779,20 +779,20 @@ const Ke = /* @__PURE__ */ P(to, [["render", oo]]), lo = ["disabled", "type", "d
779
779
  viewBox: "0 0 10 9",
780
780
  fill: "none",
781
781
  xmlns: "http://www.w3.org/2000/svg"
782
- }, y[0] || (y[0] = [
782
+ }, C[0] || (C[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",
786
786
  "stroke-width": "2",
787
787
  "stroke-linecap": "round"
788
788
  }, null, -1)
789
- ]), 2)) : A("", !0),
790
- c.isDouble && a.value ? (p(), m("svg", {
789
+ ]), 2)) : W("", !0),
790
+ r.isDouble && i.value ? (p(), v("svg", {
791
791
  key: 1,
792
- class: D([
792
+ class: z([
793
793
  "vt-checkbox__checkmark",
794
794
  {
795
- "vt-checkbox__checkmark--checked": a.value
795
+ "vt-checkbox__checkmark--checked": i.value
796
796
  }
797
797
  ]),
798
798
  width: "13",
@@ -800,7 +800,7 @@ const Ke = /* @__PURE__ */ P(to, [["render", oo]]), lo = ["disabled", "type", "d
800
800
  viewBox: "0 0 13 6",
801
801
  fill: "none",
802
802
  xmlns: "http://www.w3.org/2000/svg"
803
- }, y[1] || (y[1] = [
803
+ }, C[1] || (C[1] = [
804
804
  h("path", {
805
805
  d: "M6 3L8.25 5L12 1",
806
806
  stroke: "currentColor",
@@ -815,199 +815,199 @@ const Ke = /* @__PURE__ */ P(to, [["render", oo]]), lo = ["disabled", "type", "d
815
815
  "stroke-linecap": "round",
816
816
  "stroke-linejoin": "round"
817
817
  }, null, -1)
818
- ]), 2)) : A("", !0),
819
- c.indeterminate ? (p(), m("div", {
818
+ ]), 2)) : W("", !0),
819
+ r.indeterminate ? (p(), v("div", {
820
820
  key: 2,
821
- class: D([
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": r.indeterminate
825
825
  }
826
826
  ])
827
- }, null, 2)) : A("", !0)
827
+ }, null, 2)) : W("", !0)
828
828
  ], 2),
829
- c.label || c.$slots.label || c.$slots.default ? (p(), m("span", {
829
+ r.label || r.$slots.label || r.$slots.default ? (p(), v("span", {
830
830
  key: 0,
831
- class: D([
831
+ class: z([
832
832
  "vt-checkbox__label",
833
833
  {
834
- "vt-checkbox__label--disabled": c.disabled
834
+ "vt-checkbox__label--disabled": r.disabled
835
835
  }
836
836
  ])
837
837
  }, [
838
- pe(c.$slots, "label", {}, () => [
839
- pe(c.$slots, "default", {}, () => [
840
- ge(te(c.label), 1)
838
+ de(r.$slots, "label", {}, () => [
839
+ de(r.$slots, "default", {}, () => [
840
+ ge(ee(r.label), 1)
841
841
  ])
842
842
  ])
843
- ], 2)) : A("", !0)
844
- ], 10, Co));
843
+ ], 2)) : W("", !0)
844
+ ], 10, _o));
845
845
  }
846
846
  });
847
- function ko(t) {
848
- const e = L(() => [...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, y) => c + (y.width || y.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);
847
+ function wo(t) {
848
+ const e = S(() => [...t].sort((l, s) => l.pinnedLeft && !s.pinnedLeft ? -1 : !l.pinnedLeft && s.pinnedLeft || l.pinnedRight && !s.pinnedRight ? 1 : !l.pinnedRight && s.pinnedRight ? -1 : 0)), o = () => {
849
+ const l = e.value.length, s = e.value.filter((r) => r.width || r.minWidth), i = s.reduce((r, C) => r + (C.width || C.minWidth || 0), 0), c = l - s.length;
850
+ if (c === 0) return 150;
851
+ const u = Math.max(800 - i, c * 80);
852
+ return Math.max(Math.floor(u / c), 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;
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());
857
+ getStickyOffset: (l, s, i = !1) => {
858
+ const c = e.value;
859
+ let a = 0;
860
+ if (l === "left") {
861
+ i && (a += 50);
862
+ for (let u = 0; u < s; u++) {
863
+ const r = c[u];
864
+ r.pinnedLeft && (a += r.width || r.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 u = c.length - 1; u > s; u--) {
868
+ const r = c[u];
869
+ r.pinnedRight && (a += r.width || r.minWidth || o());
870
870
  }
871
- return i;
871
+ return a;
872
872
  }
873
873
  };
874
874
  }
875
- function bo(t) {
875
+ function Co(t) {
876
876
  const e = () => {
877
- const l = {};
878
- return t.maxHeight && (l.maxHeight = `${t.maxHeight}px`), l;
879
- }, o = (l, a, r, i) => {
877
+ const s = {};
878
+ return t.maxHeight && (s.maxHeight = `${t.maxHeight}px`), s;
879
+ }, o = (s, i, c, a) => {
880
880
  const u = {};
881
- if (l.width)
882
- u.width = `${l.width}px`, u.minWidth = `${l.width}px`, u.maxWidth = `${l.width}px`;
883
- else if (l.minWidth)
884
- u.minWidth = `${l.minWidth}px`, u.width = `${l.minWidth}px`, u.maxWidth = "none";
881
+ if (s.width)
882
+ u.width = `${s.width}px`, u.minWidth = `${s.width}px`, u.maxWidth = `${s.width}px`;
883
+ else if (s.minWidth)
884
+ u.minWidth = `${s.minWidth}px`, u.width = `${s.minWidth}px`, u.maxWidth = "none";
885
885
  else {
886
- const c = i();
887
- u.width = `${c}px`, u.minWidth = "80px", u.maxWidth = "none";
886
+ const r = a();
887
+ u.width = `${r}px`, u.minWidth = "80px", u.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 s.pinnedLeft ? (u.position = "sticky", u.left = `${c("left", i, t.selectable)}px`, u.zIndex = "10") : s.pinnedRight && (u.position = "sticky", u.right = `${c("right", i, !1)}px`, u.zIndex = "10"), u;
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: (s, i, c, a) => {
895
+ const u = o(s, i, c, a);
896
+ return t.maxHeight && (u.position = "sticky", u.top = "0", s.pinnedLeft || s.pinnedRight ? u.zIndex = "12" : u.zIndex = "11"), u;
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: (s, i, c, a) => {
899
+ const u = o(s, i, c, a);
900
+ return t.maxHeight && (u.position = "sticky", u.bottom = "0", s.pinnedLeft || s.pinnedRight ? u.zIndex = "12" : u.zIndex = "11"), u;
901
901
  }
902
902
  };
903
903
  }
904
- function yo() {
905
- const t = O({
904
+ function ko() {
905
+ const t = P({
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) => {
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: y, startWidth: $ } = t.value;
915
- if (!c) return;
916
- document.querySelectorAll(`[data-resizer="${c.prop}"]`).forEach((Y) => {
917
- Y.classList.add("vt-table__resizer--active");
911
+ onMouseDown: (n, l, s, i) => {
912
+ n.preventDefault(), n.stopPropagation(), t.value.resizingCol = l, t.value.startX = n.clientX, t.value.startWidth = l.width || l.minWidth || s(l.prop);
913
+ const c = (u) => {
914
+ const { resizingCol: r, startX: C, startWidth: L } = t.value;
915
+ if (!r) return;
916
+ document.querySelectorAll(`[data-resizer="${r.prop}"]`).forEach((A) => {
917
+ A.classList.add("vt-table__resizer--active");
918
918
  });
919
- const N = u.clientX - y, q = c.minWidth || 50, U = c.maxWidth || 1e3, G = Math.max(Math.min($ + N, U), q);
920
- c.width = G;
921
- }, i = () => {
919
+ const j = u.clientX - C, Y = r.minWidth || 50, N = r.maxWidth || 1e3, R = Math.max(Math.min(L + j, N), Y);
920
+ r.width = R;
921
+ }, a = () => {
922
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;
923
+ document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", a), document.body.style.cursor = "", document.body.style.userSelect = "", document.body.classList.remove("vt-table-resizing"), u && (document.querySelectorAll(`[data-resizer="${u.prop}"]`).forEach((r) => {
924
+ r.classList.remove("vt-table__resizer--active");
925
+ }), i && u.width && i(u.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", c), 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 xo(t, e, o, n) {
933
- var Q;
934
- const s = t.selectionKey || "id", l = O([]), a = O(null), r = O(!1);
935
- (Q = t.defaultSelection) != null && Q.length && (l.value = [...t.defaultSelection]);
936
- const i = (w) => w[s], u = (w) => r.value ? !0 : l.value.some((C) => i(C) === i(w)), c = L(() => e.value.filter((w) => u(w)).length), y = L(() => e.value.length > 0 && c.value === e.value.length), $ = L(() => {
937
- if (r.value) return !1;
938
- const w = c.value;
939
- return w > 0 && w < e.value.length;
940
- }), N = L(() => r.value ? !0 : y.value && !$.value), q = L(() => r.value), U = (w, C) => {
941
- const V = i(w), X = l.value.some((f) => i(f) === i(w)), d = C !== void 0 ? C : !X;
942
- if (r.value && !d) {
943
- r.value = !1, n != null && n.value && (l.value = n.value.filter((f) => i(f) !== V)), H(w, !1);
932
+ function bo(t, e, o, n) {
933
+ var oe;
934
+ const l = t.selectionKey || "id", s = P([]), i = P(null), c = P(!1);
935
+ (oe = t.defaultSelection) != null && oe.length && (s.value = [...t.defaultSelection]);
936
+ const a = (k) => k[l], u = (k) => c.value ? !0 : s.value.some((m) => a(m) === a(k)), r = S(() => e.value.filter((k) => u(k)).length), C = S(() => e.value.length > 0 && r.value === e.value.length), L = S(() => {
937
+ if (c.value) return !1;
938
+ const k = r.value;
939
+ return k > 0 && k < e.value.length;
940
+ }), j = S(() => c.value ? !0 : C.value && !L.value), Y = S(() => c.value), N = (k, m) => {
941
+ const y = a(k), M = s.value.some((_) => a(_) === a(k)), d = m !== void 0 ? m : !M;
942
+ if (c.value && !d) {
943
+ c.value = !1, n != null && n.value && (s.value = n.value.filter((_) => a(_) !== y)), U(k, !1);
944
944
  return;
945
945
  }
946
- r.value && d || (d && !X ? l.value.push(w) : !d && X && (l.value = l.value.filter((f) => i(f) !== V)), t.selectOnClickRow && C === void 0 && K(d ? w : null), H(w, d));
947
- }, G = () => {
948
- switch (Y()) {
946
+ c.value && d || (d && !M ? s.value.push(k) : !d && M && (s.value = s.value.filter((_) => a(_) !== y)), t.selectOnClickRow && m === void 0 && K(d ? k : null), U(k, d));
947
+ }, R = () => {
948
+ switch (A()) {
949
949
  case "none":
950
950
  case "partial":
951
- x();
951
+ b();
952
952
  break;
953
953
  case "allVisible":
954
- B();
954
+ I();
955
955
  break;
956
956
  case "absoluteAll":
957
- I();
957
+ V();
958
958
  break;
959
959
  }
960
- }, Y = () => r.value ? "absoluteAll" : y.value ? "allVisible" : c.value > 0 ? "partial" : "none", x = () => {
961
- const w = [], C = new Set(l.value.map((V) => i(V)));
962
- l.value.forEach((V) => {
963
- w.push(V);
964
- }), e.value.forEach((V) => {
965
- C.has(i(V)) || w.push(V);
966
- }), l.value = w, r.value = !1, H();
967
- }, B = () => {
968
- r.value = !0, n != null && n.value ? l.value = [...n.value] : l.value = [...e.value], H(void 0, void 0, !0);
960
+ }, A = () => c.value ? "absoluteAll" : C.value ? "allVisible" : r.value > 0 ? "partial" : "none", b = () => {
961
+ const k = [], m = new Set(s.value.map((y) => a(y)));
962
+ s.value.forEach((y) => {
963
+ k.push(y);
964
+ }), e.value.forEach((y) => {
965
+ m.has(a(y)) || k.push(y);
966
+ }), s.value = k, c.value = !1, U();
969
967
  }, I = () => {
970
- l.value = [], r.value = !1, a.value = null, H();
971
- }, K = (w) => {
972
- const C = a.value;
973
- a.value = w, o("current-change", {
974
- currentRow: a.value,
975
- oldCurrentRow: C
968
+ c.value = !0, n != null && n.value ? s.value = [...n.value] : s.value = [...e.value], U(void 0, void 0, !0);
969
+ }, V = () => {
970
+ s.value = [], c.value = !1, i.value = null, U();
971
+ }, K = (k) => {
972
+ const m = i.value;
973
+ i.value = k, o("current-change", {
974
+ currentRow: i.value,
975
+ oldCurrentRow: m
976
976
  });
977
- }, M = () => [...l.value], z = (w) => {
978
- l.value = [...w], r.value = !1, H();
979
- }, H = (w, C, V = !1) => {
980
- const X = {
981
- selection: [...l.value],
982
- row: w,
983
- selected: C,
984
- isAllSelected: V || r.value
977
+ }, q = () => [...s.value], Q = (k) => {
978
+ s.value = [...k], c.value = !1, U();
979
+ }, U = (k, m, y = !1) => {
980
+ const M = {
981
+ selection: [...s.value],
982
+ row: k,
983
+ selected: m,
984
+ isAllSelected: y || c.value
985
985
  };
986
- o("selection-change", X);
986
+ o("selection-change", M);
987
987
  };
988
- return me(
988
+ return ve(
989
989
  () => t.defaultSelection,
990
- (w) => {
991
- w != null && w.length && (l.value = [...w]);
990
+ (k) => {
991
+ k != null && k.length && (s.value = [...k]);
992
992
  }
993
993
  ), {
994
- selectedRows: l,
995
- currentRow: a,
994
+ selectedRows: s,
995
+ currentRow: i,
996
996
  isRowSelected: u,
997
- isAllSelected: N,
998
- isIndeterminate: $,
999
- isDoubleCheck: q,
1000
- isFullSelection: r,
1001
- toggleRowSelection: U,
1002
- toggleAllSelection: G,
1003
- clearSelection: I,
997
+ isAllSelected: j,
998
+ isIndeterminate: L,
999
+ isDoubleCheck: Y,
1000
+ isFullSelection: c,
1001
+ toggleRowSelection: N,
1002
+ toggleAllSelection: R,
1003
+ clearSelection: V,
1004
1004
  setCurrentRow: K,
1005
- getSelectionRows: M,
1006
- setSelectionRows: z,
1007
- selectAbsolutelyAll: B
1005
+ getSelectionRows: q,
1006
+ setSelectionRows: Q,
1007
+ selectAbsolutelyAll: I
1008
1008
  };
1009
1009
  }
1010
- function Mo(t, e) {
1010
+ function yo(t, e) {
1011
1011
  if (!t)
1012
1012
  return String(e.value ?? "");
1013
1013
  try {
@@ -1017,63 +1017,238 @@ function Mo(t, e) {
1017
1017
  return console.error("Error rendering table slot:", o), String(e.value ?? "");
1018
1018
  }
1019
1019
  }
1020
- const Lo = (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
- const s = Number(t), l = Number(e);
1027
- return !isNaN(s) && !isNaN(l) ? n = s - l : He(t) && He(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, {
1026
+ const l = Number(t), s = Number(e);
1027
+ return !isNaN(l) && !isNaN(s) ? n = l - s : ze(t) && ze(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
- }, He = (t) => t instanceof Date ? !isNaN(t.getTime()) : typeof t == "string" && /\d{4}-\d{2}-\d{2}|\//.test(t) ? !isNaN(new Date(t).getTime()) : !1, $o = (t, e, o) => {
1031
+ }, ze = (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
- }, We = (t, e) => {
1036
+ }, He = (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
- }, So = (t, e, o) => {
1042
+ }, Lo = (t, e, o) => {
1043
1043
  if (!e) return [...t];
1044
- const n = o.find((l) => l.prop === e.prop);
1044
+ const n = o.find((s) => s.prop === e.prop);
1045
1045
  if (!(n != null && n.sortable)) return [...t];
1046
- const s = n.sortMethod || Lo;
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 l = n.sortMethod || xo;
1047
+ return [...t].sort((s, i) => {
1048
+ const c = s[n.prop], a = i[n.prop];
1049
+ return l(c, a, e.direction);
1050
1050
  });
1051
- };
1052
- class Io {
1051
+ }, qe = Symbol("dropdown-context"), Ge = /* @__PURE__ */ te({
1052
+ __name: "VDropdown",
1053
+ props: {
1054
+ trigger: { default: "hover" },
1055
+ placement: { default: "bottom-start" },
1056
+ disabled: { type: Boolean, default: !1 },
1057
+ splitButton: { type: Boolean, default: !1 },
1058
+ hideOnClick: { type: Boolean, default: !0 },
1059
+ showTimeout: { default: 250 },
1060
+ hideTimeout: { default: 150 },
1061
+ tabindex: { default: 0 }
1062
+ },
1063
+ emits: ["visible-change", "click", "command"],
1064
+ setup(t, { expose: e, emit: o }) {
1065
+ const n = t, l = o, s = P(), i = P(), c = P(), a = P(!1), u = P(null), r = P([]), C = P({
1066
+ position: "absolute",
1067
+ top: "0px",
1068
+ left: "0px",
1069
+ zIndex: 2e3,
1070
+ transformOrigin: "center top"
1071
+ });
1072
+ $e();
1073
+ const L = (m) => {
1074
+ const y = [];
1075
+ let M = m.parentElement;
1076
+ for (; M && M !== document.body; ) {
1077
+ const d = window.getComputedStyle(M), _ = d.overflowY, w = d.overflowX;
1078
+ (["scroll", "auto"].includes(_) || ["scroll", "auto"].includes(w) || M.scrollHeight > M.clientHeight || M.scrollWidth > M.clientWidth) && y.push(M), M = M.parentElement;
1079
+ }
1080
+ return y.push(window), y;
1081
+ }, j = async () => {
1082
+ if (await ht(), !i.value || !c.value) return;
1083
+ const m = i.value.getBoundingClientRect(), y = c.value.getBoundingClientRect();
1084
+ let M = 0, d = 0;
1085
+ switch (n.placement) {
1086
+ case "bottom":
1087
+ M = m.bottom + window.scrollY + 5, d = m.left + window.scrollX + (m.width - y.width) / 2;
1088
+ break;
1089
+ case "bottom-start":
1090
+ M = m.bottom + window.scrollY + 5, d = m.left + window.scrollX;
1091
+ break;
1092
+ case "bottom-end":
1093
+ M = m.bottom + window.scrollY + 5, d = m.right + window.scrollX - y.width;
1094
+ break;
1095
+ case "top":
1096
+ M = m.top + window.scrollY - y.height - 5, d = m.left + window.scrollX + (m.width - y.width) / 2;
1097
+ break;
1098
+ case "top-start":
1099
+ M = m.top + window.scrollY - y.height - 5, d = m.left + window.scrollX;
1100
+ break;
1101
+ case "top-end":
1102
+ M = m.top + window.scrollY - y.height - 5, d = m.right + window.scrollX - y.width;
1103
+ break;
1104
+ }
1105
+ d + y.width > window.innerWidth && (d = window.innerWidth - y.width - 10), d < 10 && (d = 10), M + y.height > window.innerHeight + window.scrollY && (M = m.top + window.scrollY - y.height - 5), M < window.scrollY + 10 && (M = window.scrollY + 10), C.value.top = `${M}px`, C.value.left = `${d}px`;
1106
+ }, Y = () => {
1107
+ i.value && (r.value = L(i.value), r.value.forEach((m) => {
1108
+ m.addEventListener("scroll", k, { passive: !0 });
1109
+ }), window.addEventListener("resize", k));
1110
+ }, N = () => {
1111
+ r.value.forEach((m) => {
1112
+ m.removeEventListener("scroll", k);
1113
+ }), window.removeEventListener("resize", k), r.value = [];
1114
+ }, R = () => {
1115
+ n.disabled || a.value || (b(), u.value = window.setTimeout(
1116
+ async () => {
1117
+ a.value = !0, await j(), Y(), l("visible-change", !0);
1118
+ },
1119
+ n.trigger === "hover" ? n.showTimeout : 0
1120
+ ));
1121
+ }, A = () => {
1122
+ a.value && (b(), u.value = window.setTimeout(
1123
+ () => {
1124
+ a.value = !1, N(), l("visible-change", !1);
1125
+ },
1126
+ n.trigger === "hover" ? n.hideTimeout : 0
1127
+ ));
1128
+ }, b = () => {
1129
+ u.value && (window.clearTimeout(u.value), u.value = null);
1130
+ };
1131
+ Ye(qe, {
1132
+ handleCommand: (m) => {
1133
+ console.log("VDropdown handleCommand called:", m), l("command", m), n.hideOnClick && A();
1134
+ },
1135
+ hideOnClick: n.hideOnClick
1136
+ });
1137
+ const V = (m) => {
1138
+ n.disabled || (console.log("VDropdown click triggered"), l("click", m), n.trigger === "click" && (a.value ? A() : R()));
1139
+ }, K = () => {
1140
+ n.trigger === "hover" && R();
1141
+ }, q = () => {
1142
+ n.trigger === "hover" && A();
1143
+ }, Q = () => {
1144
+ n.trigger === "hover" && b();
1145
+ }, U = () => {
1146
+ n.trigger === "hover" && A();
1147
+ }, oe = (m) => {
1148
+ var M, d;
1149
+ if (!a.value) return;
1150
+ const y = m.target;
1151
+ (M = s.value) != null && M.contains(y) || (d = c.value) != null && d.contains(y) || A();
1152
+ }, k = () => {
1153
+ a.value && j();
1154
+ };
1155
+ return e({
1156
+ show: R,
1157
+ hide: A,
1158
+ visible: a
1159
+ }), fe(() => {
1160
+ document.addEventListener("click", oe);
1161
+ }), Ve(() => {
1162
+ document.removeEventListener("click", oe), N(), b();
1163
+ }), (m, y) => (p(), v("div", {
1164
+ ref_key: "dropdownRef",
1165
+ ref: s,
1166
+ class: "vt-dropdown",
1167
+ onClick: V,
1168
+ onMouseenter: K,
1169
+ onMouseleave: q
1170
+ }, [
1171
+ h("div", {
1172
+ ref_key: "triggerRef",
1173
+ ref: i,
1174
+ class: "vt-dropdown__trigger"
1175
+ }, [
1176
+ de(m.$slots, "default")
1177
+ ], 512),
1178
+ a.value ? (p(), ne(Ze, {
1179
+ key: 0,
1180
+ to: "body"
1181
+ }, [
1182
+ h("div", {
1183
+ ref_key: "menuRef",
1184
+ ref: c,
1185
+ style: se(C.value),
1186
+ class: "vt-dropdown-menu",
1187
+ onMouseenter: Q,
1188
+ onMouseleave: U,
1189
+ onClick: y[0] || (y[0] = he(() => {
1190
+ }, ["stop"]))
1191
+ }, [
1192
+ de(m.$slots, "dropdown")
1193
+ ], 36)
1194
+ ])) : W("", !0)
1195
+ ], 544));
1196
+ }
1197
+ }), Me = /* @__PURE__ */ te({
1198
+ __name: "VDropdownItem",
1199
+ props: {
1200
+ command: {},
1201
+ disabled: { type: Boolean },
1202
+ divided: { type: Boolean },
1203
+ icon: {}
1204
+ },
1205
+ emits: ["click"],
1206
+ setup(t, { emit: e }) {
1207
+ const o = t, n = e, l = Ue(qe);
1208
+ l || console.warn("VDropdownItem must be used within VDropdown");
1209
+ const s = (i) => {
1210
+ o.disabled || (console.log("VDropdownItem click:", o.command), n("click", i), o.command !== void 0 && l && (console.log("Calling handleCommand with:", o.command), l.handleCommand(o.command)));
1211
+ };
1212
+ return (i, c) => (p(), v("li", {
1213
+ class: z(["vt-dropdown-item", {
1214
+ "is-disabled": i.disabled,
1215
+ "vt-dropdown-item--divided": i.divided
1216
+ }]),
1217
+ onClick: s
1218
+ }, [
1219
+ i.icon ? (p(), v("i", {
1220
+ key: 0,
1221
+ class: z([i.icon, "vt-dropdown-item__icon"])
1222
+ }, null, 2)) : W("", !0),
1223
+ de(i.$slots, "default")
1224
+ ], 2));
1225
+ }
1226
+ });
1227
+ class $o {
1053
1228
  constructor() {
1054
1229
  this.modalStack = [], this.baseZIndex = 1e3;
1055
1230
  }
1056
1231
  open(e = {}) {
1057
1232
  const o = `modal-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, n = document.createElement("div");
1058
1233
  n.setAttribute("data-vt-modal", o), document.body.appendChild(n);
1059
- const s = O(!0), l = this.baseZIndex + this.modalStack.length * 10, a = pt({
1234
+ const l = P(!0), s = this.baseZIndex + this.modalStack.length * 10, i = mt({
1060
1235
  setup() {
1061
- const i = () => {
1062
- s.value = !1, setTimeout(() => {
1063
- ae.closeById(o);
1236
+ const a = () => {
1237
+ l.value = !1, setTimeout(() => {
1238
+ ce.closeById(o);
1064
1239
  }, 100);
1065
1240
  };
1066
1241
  return () => ye(
1067
- qe,
1242
+ Ke,
1068
1243
  {
1069
- modelValue: s.value,
1070
- "onUpdate:modelValue": i,
1244
+ modelValue: l.value,
1245
+ "onUpdate:modelValue": a,
1071
1246
  title: e.title,
1072
1247
  size: e.size || "medium",
1073
1248
  showCloseButton: e.showCloseButton !== !1,
1074
1249
  closeOnBackdropClick: e.closeOnBackdropClick !== !1,
1075
- onClose: i,
1076
- zIndex: l
1250
+ onClose: a,
1251
+ zIndex: s
1077
1252
  },
1078
1253
  {
1079
1254
  default: () => e.component ? ye(e.component, e.props || {}) : e.content ? ye("div", { innerHTML: e.content }) : null
@@ -1081,14 +1256,14 @@ class Io {
1081
1256
  );
1082
1257
  }
1083
1258
  });
1084
- a.mount(n);
1085
- const r = {
1259
+ i.mount(n);
1260
+ const c = {
1086
1261
  id: o,
1087
- app: a,
1262
+ app: i,
1088
1263
  container: n,
1089
- isOpen: s
1264
+ isOpen: l
1090
1265
  };
1091
- return this.modalStack.push(r), o;
1266
+ return this.modalStack.push(c), o;
1092
1267
  }
1093
1268
  close() {
1094
1269
  if (this.modalStack.length > 0) {
@@ -1118,24 +1293,24 @@ class Io {
1118
1293
  recalculateZIndices() {
1119
1294
  }
1120
1295
  }
1121
- const ae = new Io(), Vo = {
1296
+ const ce = new $o(), So = {
1122
1297
  install(t) {
1123
- t.config.globalProperties.$modal = ae, t.config.globalProperties.$modalStack = {
1124
- closeAll: () => ae.closeAll(),
1125
- getCount: () => ae.getOpenModalsCount(),
1126
- closeById: (e) => ae.closeById(e)
1298
+ t.config.globalProperties.$modal = ce, t.config.globalProperties.$modalStack = {
1299
+ closeAll: () => ce.closeAll(),
1300
+ getCount: () => ce.getOpenModalsCount(),
1301
+ closeById: (e) => ce.closeById(e)
1127
1302
  };
1128
1303
  }
1129
- }, Bo = { class: "vt-columns-selector-body" }, Ro = { class: "vt-columns-selector" }, To = { class: "vt-columns-selector__panel" }, Eo = ["draggable", "onDragstart", "onDragover", "onDrop"], zo = {
1304
+ }, Vo = { class: "vt-columns-selector-body" }, Io = { class: "vt-columns-selector" }, Bo = { class: "vt-columns-selector__panel" }, To = ["draggable", "onDragstart", "onDragover", "onDrop"], Eo = {
1130
1305
  key: 0,
1131
1306
  class: "vt-columns-selector__panel-item-pinned"
1132
- }, Ho = { class: "vt-columns-selector__available" }, Wo = ["onClick"], Do = {
1307
+ }, Ro = { class: "vt-columns-selector__available" }, zo = ["onClick"], Ho = {
1133
1308
  key: 0,
1134
1309
  class: "vt-columns-selector__group-columns"
1135
- }, Po = {
1310
+ }, Wo = {
1136
1311
  key: 0,
1137
1312
  class: "vt-columns-selector__pinned-note"
1138
- }, Ao = { class: "vt-modal__content-button" }, Oo = /* @__PURE__ */ se({
1313
+ }, Do = { class: "vt-modal__content-button" }, Po = /* @__PURE__ */ te({
1139
1314
  __name: "VTableColumnSelector",
1140
1315
  props: {
1141
1316
  columns: {},
@@ -1143,191 +1318,191 @@ const ae = new Io(), Vo = {
1143
1318
  },
1144
1319
  emits: ["update-columns"],
1145
1320
  setup(t, { emit: e }) {
1146
- const o = t, n = e, s = O([]), l = O(/* @__PURE__ */ new Set()), a = O(-1), r = O(-1), i = O("before"), u = L(() => {
1321
+ const o = t, n = e, l = P([]), s = P(/* @__PURE__ */ new Set()), i = P(-1), c = P(-1), a = P("before"), u = S(() => {
1147
1322
  const d = {};
1148
- return o.columnsSelector.forEach((f) => {
1149
- if (f.name === "removed")
1323
+ return o.columnsSelector.forEach((_) => {
1324
+ if (_.name === "removed")
1150
1325
  return;
1151
- const g = f.columns.map((R) => R.prop), b = s.value.filter((R) => g.includes(R.prop));
1152
- b.length === 0 ? d[f.name] = { checked: !1, indeterminate: !1 } : b.length === f.columns.length ? d[f.name] = { checked: !0, indeterminate: !1 } : d[f.name] = { checked: !1, indeterminate: !0 };
1326
+ const w = _.columns.map((T) => T.prop), $ = l.value.filter((T) => w.includes(T.prop));
1327
+ $.length === 0 ? d[_.name] = { checked: !1, indeterminate: !1 } : $.length === _.columns.length ? d[_.name] = { checked: !0, indeterminate: !1 } : d[_.name] = { checked: !1, indeterminate: !0 };
1153
1328
  }), d;
1154
- }), c = L(() => o.columnsSelector.filter((d) => d.name !== "removed")), y = (d) => d.pinnedLeft || d.pinnedRight, $ = (d) => !y(d), N = () => {
1155
- const d = s.value;
1156
- let f = -1;
1157
- for (let b = 0; b < d.length; b++)
1158
- d[b].pinnedLeft && (f = b);
1159
- let g = d.length;
1160
- for (let b = 0; b < d.length; b++)
1161
- if (d[b].pinnedRight) {
1162
- g = b;
1329
+ }), r = S(() => o.columnsSelector.filter((d) => d.name !== "removed")), C = (d) => d.pinnedLeft || d.pinnedRight, L = (d) => !C(d), j = () => {
1330
+ const d = l.value;
1331
+ let _ = -1;
1332
+ for (let $ = 0; $ < d.length; $++)
1333
+ d[$].pinnedLeft && (_ = $);
1334
+ let w = d.length;
1335
+ for (let $ = 0; $ < d.length; $++)
1336
+ if (d[$].pinnedRight) {
1337
+ w = $;
1163
1338
  break;
1164
1339
  }
1165
1340
  return {
1166
- minIndex: f + 1,
1167
- maxIndex: g - 1
1341
+ minIndex: _ + 1,
1342
+ maxIndex: w - 1
1168
1343
  };
1169
- }, q = (d) => {
1170
- const f = N();
1171
- return !(d < f.minIndex || d > f.maxIndex + 1);
1172
- }, U = (d, f) => {
1173
- const g = s.value[f];
1174
- if (!$(g)) {
1344
+ }, Y = (d) => {
1345
+ const _ = j();
1346
+ return !(d < _.minIndex || d > _.maxIndex + 1);
1347
+ }, N = (d, _) => {
1348
+ const w = l.value[_];
1349
+ if (!L(w)) {
1175
1350
  d.preventDefault();
1176
1351
  return;
1177
1352
  }
1178
- a.value = f, d.dataTransfer && (d.dataTransfer.effectAllowed = "move", d.dataTransfer.setData("text/plain", g.prop)), document.body.style.cursor = "grabbing";
1179
- }, G = (d, f) => {
1180
- if (a.value === -1) return;
1353
+ i.value = _, d.dataTransfer && (d.dataTransfer.effectAllowed = "move", d.dataTransfer.setData("text/plain", w.prop)), document.body.style.cursor = "grabbing";
1354
+ }, R = (d, _) => {
1355
+ if (i.value === -1) return;
1181
1356
  d.preventDefault();
1182
- const g = d.currentTarget.getBoundingClientRect(), b = d.clientY, R = g.top + g.height / 2;
1183
- let T = f, ee = "before";
1184
- b < R ? (T = f, ee = "before") : (T = f + 1, ee = "after"), a.value < T && T--, q(T) ? (r.value = f, i.value = ee, d.dataTransfer.dropEffect = "move") : (r.value = -1, d.dataTransfer.dropEffect = "none");
1185
- }, Y = () => {
1357
+ const w = d.currentTarget.getBoundingClientRect(), $ = d.clientY, T = w.top + w.height / 2;
1358
+ let E = _, J = "before";
1359
+ $ < T ? (E = _, J = "before") : (E = _ + 1, J = "after"), i.value < E && E--, Y(E) ? (c.value = _, a.value = J, d.dataTransfer.dropEffect = "move") : (c.value = -1, d.dataTransfer.dropEffect = "none");
1360
+ }, A = () => {
1186
1361
  setTimeout(() => {
1187
- a.value === -1 && (r.value = -1);
1362
+ i.value === -1 && (c.value = -1);
1188
1363
  }, 50);
1189
- }, x = (d, f) => {
1190
- if (d.preventDefault(), a.value === -1 || r.value === -1) {
1191
- I();
1364
+ }, b = (d, _) => {
1365
+ if (d.preventDefault(), i.value === -1 || c.value === -1) {
1366
+ V();
1192
1367
  return;
1193
1368
  }
1194
- const g = d.currentTarget.getBoundingClientRect(), b = d.clientY, R = g.top + g.height / 2;
1195
- let T = f;
1196
- if (b >= R && (T = f + 1), a.value < T && T--, !q(T) || T === a.value) {
1197
- I();
1369
+ const w = d.currentTarget.getBoundingClientRect(), $ = d.clientY, T = w.top + w.height / 2;
1370
+ let E = _;
1371
+ if ($ >= T && (E = _ + 1), i.value < E && E--, !Y(E) || E === i.value) {
1372
+ V();
1198
1373
  return;
1199
1374
  }
1200
- const ee = [...s.value], [we] = ee.splice(a.value, 1);
1201
- ee.splice(T, 0, we), s.value = ee, I();
1202
- }, B = () => {
1203
- I();
1375
+ const J = [...l.value], [Ce] = J.splice(i.value, 1);
1376
+ J.splice(E, 0, Ce), l.value = J, V();
1204
1377
  }, I = () => {
1205
- a.value = -1, r.value = -1, i.value = "before", document.body.style.cursor = "";
1378
+ V();
1379
+ }, V = () => {
1380
+ i.value = -1, c.value = -1, a.value = "before", document.body.style.cursor = "";
1206
1381
  }, K = (d) => {
1207
- const f = ["vt-columns-selector__panel-item"];
1208
- return a.value === d && f.push("vt-columns-selector__panel-item--dragging"), r.value === d && i.value === "before" && f.push("vt-columns-selector__panel-item--drop-before"), r.value === d && i.value === "after" && f.push("vt-columns-selector__panel-item--drop-after"), f;
1209
- }, M = () => {
1210
- s.value = [...o.columns.map((d) => ({ ...d }))], o.columnsSelector.forEach((d) => {
1211
- d.name !== "removed" && l.value.add(d.name);
1382
+ const _ = ["vt-columns-selector__panel-item"];
1383
+ return i.value === d && _.push("vt-columns-selector__panel-item--dragging"), c.value === d && a.value === "before" && _.push("vt-columns-selector__panel-item--drop-before"), c.value === d && a.value === "after" && _.push("vt-columns-selector__panel-item--drop-after"), _;
1384
+ }, q = () => {
1385
+ l.value = [...o.columns.map((d) => ({ ...d }))], o.columnsSelector.forEach((d) => {
1386
+ d.name !== "removed" && s.value.add(d.name);
1212
1387
  });
1213
- }, z = (d, f) => {
1214
- if (f)
1215
- s.value.some((g) => g.prop === d.prop) || s.value.push({ ...d });
1388
+ }, Q = (d, _) => {
1389
+ if (_)
1390
+ l.value.some((w) => w.prop === d.prop) || l.value.push({ ...d });
1216
1391
  else {
1217
- if (y(d))
1392
+ if (C(d))
1218
1393
  return;
1219
- s.value = s.value.filter((g) => g.prop !== d.prop);
1394
+ l.value = l.value.filter((w) => w.prop !== d.prop);
1220
1395
  }
1221
- }, H = (d, f) => {
1222
- if (f)
1223
- d.columns.forEach((g) => {
1224
- s.value.some((b) => b.prop === g.prop) || s.value.push({ ...g });
1396
+ }, U = (d, _) => {
1397
+ if (_)
1398
+ d.columns.forEach((w) => {
1399
+ l.value.some(($) => $.prop === w.prop) || l.value.push({ ...w });
1225
1400
  });
1226
1401
  else {
1227
- const g = [];
1228
- d.columns.forEach((b) => {
1229
- const R = s.value.find((T) => T.prop === b.prop);
1230
- R && !y(R) && g.push(R);
1231
- }), s.value = s.value.filter(
1232
- (b) => !g.some((R) => R.prop === b.prop)
1402
+ const w = [];
1403
+ d.columns.forEach(($) => {
1404
+ const T = l.value.find((E) => E.prop === $.prop);
1405
+ T && !C(T) && w.push(T);
1406
+ }), l.value = l.value.filter(
1407
+ ($) => !w.some((T) => T.prop === $.prop)
1233
1408
  );
1234
1409
  }
1235
- }, Q = (d) => s.value.some((f) => f.prop === d.prop), w = (d) => {
1236
- const f = s.value.find((g) => g.prop === d.prop);
1237
- return !f || !y(f);
1238
- }, C = (d) => {
1239
- l.value.has(d) ? l.value.delete(d) : l.value.add(d);
1240
- }, V = () => {
1241
- n("update-columns", [...s.value]), ae.close();
1242
- }, X = () => {
1243
- ae.close();
1410
+ }, oe = (d) => l.value.some((_) => _.prop === d.prop), k = (d) => {
1411
+ const _ = l.value.find((w) => w.prop === d.prop);
1412
+ return !_ || !C(_);
1413
+ }, m = (d) => {
1414
+ s.value.has(d) ? s.value.delete(d) : s.value.add(d);
1415
+ }, y = () => {
1416
+ n("update-columns", [...l.value]), ce.close();
1417
+ }, M = () => {
1418
+ ce.close();
1244
1419
  };
1245
- return ve(() => {
1246
- M();
1247
- }), (d, f) => (p(), m("div", Bo, [
1248
- h("div", Ro, [
1249
- h("div", To, [
1250
- (p(!0), m(oe, null, le(s.value, (g, b) => (p(), m("div", {
1251
- key: g.prop,
1252
- class: D(K(b)),
1253
- draggable: $(g),
1254
- onDragstart: (R) => U(R, b),
1255
- onDragover: (R) => G(R, b),
1256
- onDragleave: Y,
1257
- onDrop: (R) => x(R, b),
1258
- onDragend: B
1420
+ return fe(() => {
1421
+ q();
1422
+ }), (d, _) => (p(), v("div", Vo, [
1423
+ h("div", Io, [
1424
+ h("div", Bo, [
1425
+ (p(!0), v(re, null, ie(l.value, (w, $) => (p(), v("div", {
1426
+ key: w.prop,
1427
+ class: z(K($)),
1428
+ draggable: L(w),
1429
+ onDragstart: (T) => N(T, $),
1430
+ onDragover: (T) => R(T, $),
1431
+ onDragleave: A,
1432
+ onDrop: (T) => b(T, $),
1433
+ onDragend: I
1259
1434
  }, [
1260
- F(J, {
1261
- name: $(g) ? "columnsMove" : "freeze",
1262
- class: D(["vt-columns-selector__panel-item-icon", { "vt-columns-selector__panel-item-icon--draggable": $(g) }])
1435
+ F(G, {
1436
+ name: L(w) ? "columnsMove" : "freeze",
1437
+ class: z(["vt-columns-selector__panel-item-icon", { "vt-columns-selector__panel-item-icon--draggable": L(w) }])
1263
1438
  }, null, 8, ["name", "class"]),
1264
- F(ue, {
1265
- label: g.label,
1439
+ F(pe, {
1440
+ label: w.label,
1266
1441
  checked: !0,
1267
- disabled: y(g),
1268
- onChange: (R) => z(g, R),
1269
- onClick: f[0] || (f[0] = he(() => {
1442
+ disabled: C(w),
1443
+ onChange: (T) => Q(w, T),
1444
+ onClick: _[0] || (_[0] = he(() => {
1270
1445
  }, ["stop"]))
1271
1446
  }, null, 8, ["label", "disabled", "onChange"]),
1272
- y(g) ? (p(), m("span", zo, "pinned")) : A("", !0)
1273
- ], 42, Eo))), 128))
1447
+ C(w) ? (p(), v("span", Eo, "pinned")) : W("", !0)
1448
+ ], 42, To))), 128))
1274
1449
  ]),
1275
- h("div", Ho, [
1276
- (p(!0), m(oe, null, le(c.value, (g) => {
1277
- var b, R;
1278
- return p(), m("div", {
1279
- key: g.name,
1450
+ h("div", Ro, [
1451
+ (p(!0), v(re, null, ie(r.value, (w) => {
1452
+ var $, T;
1453
+ return p(), v("div", {
1454
+ key: w.name,
1280
1455
  class: "vt-columns-selector__group"
1281
1456
  }, [
1282
1457
  h("div", {
1283
1458
  class: "vt-columns-selector__group-header",
1284
- onClick: (T) => C(g.name)
1459
+ onClick: (E) => m(w.name)
1285
1460
  }, [
1286
- F(ue, {
1287
- label: g.label,
1288
- checked: ((b = u.value[g.name]) == null ? void 0 : b.checked) || !1,
1289
- indeterminate: ((R = u.value[g.name]) == null ? void 0 : R.indeterminate) || !1,
1290
- onChange: (T) => H(g, T),
1291
- onClick: f[1] || (f[1] = he(() => {
1461
+ F(pe, {
1462
+ label: w.label,
1463
+ checked: (($ = u.value[w.name]) == null ? void 0 : $.checked) || !1,
1464
+ indeterminate: ((T = u.value[w.name]) == null ? void 0 : T.indeterminate) || !1,
1465
+ onChange: (E) => U(w, E),
1466
+ onClick: _[1] || (_[1] = he(() => {
1292
1467
  }, ["stop"]))
1293
1468
  }, null, 8, ["label", "checked", "indeterminate", "onChange"]),
1294
- g.icon ? (p(), ce(J, {
1469
+ w.icon ? (p(), ne(G, {
1295
1470
  key: 0,
1296
- name: g.icon,
1471
+ name: w.icon,
1297
1472
  class: "vt-columns-selector__group-icon"
1298
- }, null, 8, ["name"])) : A("", !0)
1299
- ], 8, Wo),
1300
- l.value.has(g.name) ? (p(), m("div", Do, [
1301
- (p(!0), m(oe, null, le(g.columns, (T) => (p(), m("div", {
1302
- key: T.prop,
1473
+ }, null, 8, ["name"])) : W("", !0)
1474
+ ], 8, zo),
1475
+ s.value.has(w.name) ? (p(), v("div", Ho, [
1476
+ (p(!0), v(re, null, ie(w.columns, (E) => (p(), v("div", {
1477
+ key: E.prop,
1303
1478
  class: "vt-columns-selector__group-column"
1304
1479
  }, [
1305
- F(ue, {
1306
- label: T.label,
1307
- checked: Q(T),
1308
- disabled: !w(T),
1309
- onChange: (ee) => z(T, ee)
1480
+ F(pe, {
1481
+ label: E.label,
1482
+ checked: oe(E),
1483
+ disabled: !k(E),
1484
+ onChange: (J) => Q(E, J)
1310
1485
  }, null, 8, ["label", "checked", "disabled", "onChange"]),
1311
- w(T) ? A("", !0) : (p(), m("span", Po, " (закріплена) "))
1486
+ k(E) ? W("", !0) : (p(), v("span", Wo, " (закріплена) "))
1312
1487
  ]))), 128))
1313
- ])) : A("", !0)
1488
+ ])) : W("", !0)
1314
1489
  ]);
1315
1490
  }), 128))
1316
1491
  ])
1317
1492
  ]),
1318
- h("div", Ao, [
1319
- F(Ce, { onClick: X }, {
1320
- default: Me(() => f[2] || (f[2] = [
1493
+ h("div", Do, [
1494
+ F(we, { onClick: M }, {
1495
+ default: ue(() => _[2] || (_[2] = [
1321
1496
  ge("Скасувати", -1)
1322
1497
  ])),
1323
1498
  _: 1,
1324
1499
  __: [2]
1325
1500
  }),
1326
- F(Ce, {
1501
+ F(we, {
1327
1502
  type: "primary",
1328
- onClick: V
1503
+ onClick: y
1329
1504
  }, {
1330
- default: Me(() => f[3] || (f[3] = [
1505
+ default: ue(() => _[3] || (_[3] = [
1331
1506
  ge("Зберегти", -1)
1332
1507
  ])),
1333
1508
  _: 1,
@@ -1336,7 +1511,7 @@ const ae = new Io(), Vo = {
1336
1511
  ])
1337
1512
  ]));
1338
1513
  }
1339
- }), jo = /* @__PURE__ */ se({
1514
+ }), Ao = { class: "vt-table-header-actions" }, Oo = /* @__PURE__ */ te({
1340
1515
  __name: "ColumnActions",
1341
1516
  props: {
1342
1517
  column: {},
@@ -1345,109 +1520,105 @@ const ae = new Io(), Vo = {
1345
1520
  },
1346
1521
  emits: ["pin", "update-columns"],
1347
1522
  setup(t, { emit: e }) {
1348
- const o = t, n = e, s = O(), l = O(), a = O(), r = O(!1), i = O(!1), u = O([]), c = async () => {
1349
- if (await ht(), !s.value || !l.value) return;
1350
- const M = l.value.getBoundingClientRect(), z = s.value, H = z.offsetWidth, Q = M.left + M.width / 2;
1351
- z.style.top = `${M.bottom - 20}px`, z.style.left = `${Q - H / 2}px`;
1352
- const w = z.getBoundingClientRect();
1353
- w.right > window.innerWidth && (z.style.left = `${window.innerWidth - H - 8}px`), w.left < 0 && (z.style.left = "8px");
1354
- }, y = (M) => {
1355
- M.stopPropagation(), !i.value && (r.value ? N() : $());
1356
- }, $ = () => {
1357
- i.value || (r.value = !0, c(), a.value && (a.value.style.zIndex = "22"));
1358
- }, N = () => {
1359
- i.value = !0, r.value = !1, a.value && a.value.style.removeProperty("z-index"), setTimeout(() => {
1360
- i.value = !1;
1361
- }, 100);
1362
- }, q = (M) => {
1363
- var z, H;
1364
- !((z = l.value) != null && z.contains(M.target)) && !((H = s.value) != null && H.contains(M.target)) && N();
1365
- }, U = () => {
1366
- K() ? (n("pin", o.column, "none"), console.log(`Колонка "${o.column.label}" відкріплена`)) : (n("pin", o.column, "left"), console.log(`Колонка "${o.column.label}" прикріплена зліва`)), N();
1367
- }, G = (M) => ({
1523
+ const o = t, n = e, l = () => !!(o.column.pinnedLeft || o.column.pinnedRight), s = (r) => {
1524
+ switch (console.log("ColumnActions - Command received:", r, typeof r), String(r)) {
1525
+ case "pin":
1526
+ console.log("Executing pin command"), i();
1527
+ break;
1528
+ case "columns":
1529
+ console.log("Executing columns command"), u();
1530
+ break;
1531
+ default:
1532
+ console.warn("Unknown command:", r);
1533
+ }
1534
+ }, i = () => {
1535
+ const r = l();
1536
+ console.log("handlePin called, isPinned:", r), r ? n("pin", o.column, "none") : n("pin", o.column, "left");
1537
+ }, c = (r) => ({
1368
1538
  name: "removed",
1369
1539
  label: "Видалені колонки",
1370
1540
  order: 999,
1371
- // Найвищий порядок, щоб відображались останніми
1372
- columns: M
1373
- }), Y = (M) => {
1374
- var C;
1375
- const z = new Set(M.map((V) => V.prop)), H = /* @__PURE__ */ new Set();
1376
- (C = o.columnsSelector) == null || C.forEach((V) => {
1377
- V.columns.forEach((X) => H.add(X.prop));
1378
- }), o.allColumns.forEach((V) => H.add(V.prop));
1379
- const Q = [];
1380
- H.forEach((V) => {
1381
- var X;
1382
- if (!z.has(V)) {
1383
- let d;
1384
- (X = o.columnsSelector) == null || X.forEach((f) => {
1385
- const g = f.columns.find((b) => b.prop === V);
1386
- g && (d = g);
1387
- }), d || (d = o.allColumns.find((f) => f.prop === V)), d && Q.push(d);
1541
+ columns: r
1542
+ }), a = (r) => {
1543
+ var N;
1544
+ const C = new Set(r.map((R) => R.prop)), L = /* @__PURE__ */ new Set();
1545
+ (N = o.columnsSelector) == null || N.forEach((R) => {
1546
+ R.columns.forEach((A) => L.add(A.prop));
1547
+ }), o.allColumns.forEach((R) => L.add(R.prop));
1548
+ const j = [];
1549
+ L.forEach((R) => {
1550
+ var A;
1551
+ if (!C.has(R)) {
1552
+ let b;
1553
+ (A = o.columnsSelector) == null || A.forEach((I) => {
1554
+ const V = I.columns.find((K) => K.prop === R);
1555
+ V && (b = V);
1556
+ }), b || (b = o.allColumns.find((I) => I.prop === R)), b && j.push(b);
1388
1557
  }
1389
1558
  });
1390
- const w = [...o.columnsSelector || []];
1391
- Q.length > 0 && w.push(G(Q)), u.value = w;
1392
- }, x = () => {
1393
- Y(o.allColumns), ae.open({
1394
- component: Oo,
1559
+ const Y = [...o.columnsSelector || []];
1560
+ return j.length > 0 && Y.push(c(j)), Y;
1561
+ }, u = () => {
1562
+ console.log("handleToggleVisibility called");
1563
+ const r = a(o.allColumns);
1564
+ ce.open({
1565
+ component: Po,
1395
1566
  title: "Управління колонками таблиці",
1396
1567
  props: {
1397
1568
  columns: o.allColumns,
1398
- // Передаємо всі колонки
1399
- columnsSelector: u.value,
1400
- // Передаємо оновлені доступні колонки
1401
- "onUpdate-columns": (M) => {
1402
- console.log("ColumnActions отримав оновлені колонки:", M), n("update-columns", M), Y(M);
1569
+ columnsSelector: r,
1570
+ "onUpdate-columns": (C) => {
1571
+ n("update-columns", C);
1403
1572
  }
1404
1573
  },
1405
1574
  size: "large",
1406
1575
  closeOnBackdropClick: !1
1407
- }), N();
1408
- }, B = () => o.column.pinnedLeft, I = () => o.column.pinnedRight, K = () => B() || I();
1409
- return ve(() => {
1410
- document.addEventListener("click", q), l.value && (a.value = l.value.closest("th")), Y(o.allColumns);
1411
- }), Se(() => {
1412
- document.removeEventListener("click", q);
1413
- }), (M, z) => (p(), m("div", {
1414
- ref_key: "triggerRef",
1415
- ref: l,
1416
- class: "vt-table-header-actions",
1417
- onClick: y
1418
- }, [
1419
- F(J, { name: "listBullet" }),
1420
- r.value ? (p(), m("ul", {
1421
- key: 0,
1422
- ref_key: "menuRef",
1423
- ref: s,
1424
- class: D(["dropdown-menu", "vt-table-dropdown", { visible: r.value }])
1425
- }, [
1426
- h("li", { onClick: U }, [
1427
- F(J, {
1428
- name: K() ? "unfreeze" : "freeze"
1429
- }, null, 8, ["name"]),
1430
- h("span", null, te(K() ? "Розморозити" : "Заморозити"), 1)
1431
- ]),
1432
- h("li", { onClick: x }, [
1433
- F(J, { name: "columnInsert" }),
1434
- z[0] || (z[0] = h("span", null, "Колонки", -1))
1576
+ });
1577
+ };
1578
+ return (r, C) => (p(), ne(Ge, {
1579
+ trigger: "click",
1580
+ placement: "bottom-start",
1581
+ onCommand: s
1582
+ }, {
1583
+ dropdown: ue(() => [
1584
+ F(Me, { command: "pin" }, {
1585
+ default: ue(() => [
1586
+ F(G, {
1587
+ name: l() ? "unfreeze" : "freeze"
1588
+ }, null, 8, ["name"]),
1589
+ h("div", null, ee(l() ? "Розморозити" : "Заморозити"), 1)
1590
+ ]),
1591
+ _: 1
1592
+ }),
1593
+ F(Me, { command: "columns" }, {
1594
+ default: ue(() => [
1595
+ F(G, { name: "columnInsert" }),
1596
+ C[0] || (C[0] = h("div", null, "Колонки", -1))
1597
+ ]),
1598
+ _: 1,
1599
+ __: [0]
1600
+ })
1601
+ ]),
1602
+ default: ue(() => [
1603
+ h("div", Ao, [
1604
+ F(G, { name: "listBullet" })
1435
1605
  ])
1436
- ], 2)) : A("", !0)
1437
- ], 512));
1606
+ ]),
1607
+ _: 1
1608
+ }));
1438
1609
  }
1439
- }), No = { class: "vt-table" }, Fo = { class: "vt-th__content" }, Zo = { class: "vt-th__content" }, Uo = { class: "vt-th__label" }, Ko = {
1610
+ }), jo = { class: "vt-table" }, No = { class: "vt-th__content" }, Fo = { class: "vt-th__content" }, Zo = { class: "vt-th__label" }, Yo = {
1440
1611
  key: 0,
1441
1612
  class: "vt-th__sortable"
1442
- }, qo = ["data-resizer", "onMousedown"], Xo = {
1613
+ }, Uo = ["data-resizer", "onMousedown"], Xo = {
1443
1614
  key: 0,
1444
1615
  class: "vt-table__empty-row"
1445
- }, Go = ["colspan"], Yo = { class: "vt-table__empty-content" }, Jo = ["onClick"], Qo = { class: "vt-table__cell-content" }, el = { class: "vt-table__cell-content vt-table__cell-content--ellipsis" }, tl = { key: 1 }, nl = ["data-resizer", "onMousedown"], ol = {
1616
+ }, Ko = ["colspan"], qo = { class: "vt-table__empty-content" }, Go = ["onClick"], Jo = { class: "vt-table__cell-content" }, Qo = { class: "vt-table__cell-content vt-table__cell-content--ellipsis" }, el = { key: 1 }, tl = ["data-resizer", "onMousedown"], nl = {
1446
1617
  key: 0,
1447
1618
  class: "vt-table__summary"
1448
- }, ll = { class: "vt-table__cell-content vt-table__cell-content--summary" }, xe = 50, sl = /* @__PURE__ */ se({
1619
+ }, ol = { class: "vt-table__cell-content vt-table__cell-content--summary" }, xe = 50, ll = /* @__PURE__ */ te({
1449
1620
  __name: "VTable",
1450
- props: /* @__PURE__ */ ze({
1621
+ props: /* @__PURE__ */ Re({
1451
1622
  data: {},
1452
1623
  maxHeight: { default: void 0 },
1453
1624
  rowKey: { default: "id" },
@@ -1469,338 +1640,330 @@ const ae = new Io(), Vo = {
1469
1640
  },
1470
1641
  columnsModifiers: {}
1471
1642
  }),
1472
- emits: /* @__PURE__ */ ze(["sort-change", "selection-change", "current-change", "row-click", "update:columns", "column-pin", "column-resize", "column-visibility", "column-sort", "columns-change", "infinity-scroll"], ["update:columns"]),
1643
+ 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"]),
1473
1644
  setup(t, { expose: e, emit: o }) {
1474
- const n = t, s = o, l = mt(t, "columns"), a = O({}), r = O(), i = vt([]), u = O(n.defaultSort || null), c = L(() => So(n.data || [], u.value, i)), y = L(() => l.value !== void 0), $ = L(() => n.data && n.data.length > 0), N = O(!1), q = O(0);
1475
- let U;
1476
- const G = (v, _) => n.rowKey && v[n.rowKey] != null ? String(v[n.rowKey]) : String(_), Y = () => {
1477
- y.value && l.value ? i.splice(0, i.length, ...l.value) : n.columns && n.columns.length > 0 && i.splice(0, i.length, ...n.columns);
1645
+ const n = t, l = o, s = vt(t, "columns"), i = P({}), c = P(), a = ft([]), u = P(n.defaultSort || null), r = S(() => Lo(n.data || [], u.value, a)), C = S(() => s.value !== void 0), L = S(() => n.data && n.data.length > 0), j = P(!1), Y = P(0);
1646
+ let N;
1647
+ const R = (f, g) => n.rowKey && f[n.rowKey] != null ? String(f[n.rowKey]) : String(g), A = () => {
1648
+ C.value && s.value ? a.splice(0, a.length, ...s.value) : n.columns && n.columns.length > 0 && a.splice(0, a.length, ...n.columns);
1478
1649
  };
1479
- me(
1480
- () => l.value,
1481
- (v) => {
1482
- v && y.value && i.splice(0, i.length, ...v);
1650
+ ve(
1651
+ () => s.value,
1652
+ (f) => {
1653
+ f && C.value && a.splice(0, a.length, ...f);
1483
1654
  },
1484
1655
  { deep: !0 }
1485
- ), me(
1656
+ ), ve(
1486
1657
  () => n.columns,
1487
- (v) => {
1488
- v && !y.value && i.splice(0, i.length, ...v);
1658
+ (f) => {
1659
+ f && !C.value && a.splice(0, a.length, ...f);
1489
1660
  },
1490
1661
  { deep: !0 }
1491
- ), ft("vt-table-columns", i);
1492
- const { sortedColumns: x, getDefaultColumnWidth: B, getStickyOffset: I } = ko(i), { getTableWrapperStyle: K, getColumnStyle: M, getHeaderStyle: z, getFooterStyle: H } = bo(n), { onMouseDown: Q } = yo(), w = L(() => n.allData || n.data), C = n.selectable ? xo(n, c, s, w) : null, V = () => ({
1662
+ ), Ye("vt-table-columns", a);
1663
+ const { sortedColumns: b, getDefaultColumnWidth: I, getStickyOffset: V } = wo(a), { getTableWrapperStyle: K, getColumnStyle: q, getHeaderStyle: Q, getFooterStyle: U } = Co(n), { onMouseDown: oe } = ko(), k = S(() => n.allData || n.data), m = n.selectable ? bo(n, r, l, k) : null, y = () => ({
1493
1664
  width: `${xe}px`,
1494
1665
  minWidth: `${xe}px`,
1495
1666
  maxWidth: `${xe}px`,
1496
1667
  left: "0px",
1497
1668
  position: "sticky",
1498
1669
  zIndex: 10
1499
- }), X = () => {
1500
- const v = V();
1670
+ }), M = () => {
1671
+ const f = y();
1501
1672
  return n.maxHeight ? {
1502
- ...v,
1673
+ ...f,
1503
1674
  top: "0px",
1504
1675
  zIndex: 11
1505
- } : v;
1676
+ } : f;
1506
1677
  }, d = () => {
1507
- const v = V();
1678
+ const f = y();
1508
1679
  return n.maxHeight ? {
1509
- ...v,
1680
+ ...f,
1510
1681
  bottom: "0px",
1511
1682
  zIndex: 11
1512
- } : v;
1513
- }, f = () => {
1514
- if (!r.value || N.value) return;
1515
- const v = r.value, _ = v.scrollTop, S = v.scrollHeight, E = v.clientHeight, W = 30;
1516
- U && clearTimeout(U), U = setTimeout(() => {
1517
- const fe = _ - q.value > 1, k = S - _ - E <= W, ne = S - _ - E <= 5;
1518
- q.value = _, fe && (k || ne) && (N.value = !0, s("infinity-scroll"), setTimeout(() => {
1519
- N.value = !1;
1683
+ } : f;
1684
+ }, _ = () => {
1685
+ if (!c.value || j.value) return;
1686
+ const f = c.value, g = f.scrollTop, B = f.scrollHeight, H = f.clientHeight, O = 30;
1687
+ N && clearTimeout(N), N = setTimeout(() => {
1688
+ const _e = g - Y.value > 1, x = B - g - H <= O, le = B - g - H <= 5;
1689
+ Y.value = g, _e && (x || le) && (j.value = !0, l("infinity-scroll"), setTimeout(() => {
1690
+ j.value = !1;
1520
1691
  }, 1e3));
1521
1692
  }, 50);
1522
- }, g = () => {
1523
- N.value = !1;
1693
+ }, w = () => {
1694
+ j.value = !1;
1524
1695
  };
1525
- ve(() => {
1526
- r.value && r.value.addEventListener("scroll", f);
1527
- }), Se(() => {
1528
- U && clearTimeout(U), r.value && r.value.removeEventListener("scroll", f);
1696
+ fe(() => {
1697
+ c.value && c.value.addEventListener("scroll", _);
1698
+ }), Ve(() => {
1699
+ N && clearTimeout(N), c.value && c.value.removeEventListener("scroll", _);
1529
1700
  });
1530
- const b = (v, _) => {
1531
- $o(v, _, (S) => {
1532
- var E, W;
1533
- ((E = u.value) == null ? void 0 : E.prop) === v.prop && u.value.direction === _ ? u.value = null : u.value = S, s("sort-change", {
1534
- column: v,
1535
- direction: ((W = u.value) == null ? void 0 : W.direction) || null,
1536
- prop: v.prop,
1537
- sortedData: c.value
1701
+ const $ = (f, g) => {
1702
+ Mo(f, g, (B) => {
1703
+ var H, O;
1704
+ ((H = u.value) == null ? void 0 : H.prop) === f.prop && u.value.direction === g ? u.value = null : u.value = B, l("sort-change", {
1705
+ column: f,
1706
+ direction: ((O = u.value) == null ? void 0 : O.direction) || null,
1707
+ prop: f.prop,
1708
+ sortedData: r.value
1538
1709
  });
1539
1710
  });
1540
- }, R = (v, _) => {
1541
- const S = {
1542
- pinnedLeft: _ === "left",
1543
- pinnedRight: _ === "right"
1711
+ }, T = (f, g) => {
1712
+ const B = {
1713
+ pinnedLeft: g === "left",
1714
+ pinnedRight: g === "right"
1544
1715
  };
1545
- ee(v.prop, S), s("column-pin", { column: { ...v, ...S }, position: _ });
1546
- }, T = (v) => {
1547
- i.splice(0, i.length, ...v), y.value && (l.value = [...v]), s("columns-change", [...v]);
1548
- }, ee = (v, _) => {
1549
- const S = i.findIndex((E) => E.prop === v);
1550
- if (S !== -1) {
1551
- if (Object.assign(i[S], _), y.value && l.value) {
1552
- const E = l.value.findIndex((W) => W.prop === v);
1553
- if (E !== -1) {
1554
- const W = [...l.value];
1555
- W[E] = { ...W[E], ..._ }, l.value = W;
1716
+ J(f.prop, B), l("column-pin", { column: { ...f, ...B }, position: g });
1717
+ }, E = (f) => {
1718
+ a.splice(0, a.length, ...f), C.value && (s.value = [...f]), l("columns-change", [...f]);
1719
+ }, J = (f, g) => {
1720
+ const B = a.findIndex((H) => H.prop === f);
1721
+ if (B !== -1) {
1722
+ if (Object.assign(a[B], g), C.value && s.value) {
1723
+ const H = s.value.findIndex((O) => O.prop === f);
1724
+ if (H !== -1) {
1725
+ const O = [...s.value];
1726
+ O[H] = { ...O[H], ...g }, s.value = O;
1556
1727
  }
1557
1728
  }
1558
- s("columns-change", [...i]);
1729
+ l("columns-change", [...a]);
1559
1730
  }
1560
- }, we = (v, _, S) => {
1561
- s("row-click", { row: v, column: _, event: S }), n.highlightCurrentRow && C && C.setCurrentRow(v);
1562
- }, Xe = (v, _, S) => {
1563
- S.stopPropagation(), C && C.toggleRowSelection(_, v);
1564
- }, Ge = (v, _) => {
1565
- _.stopPropagation(), C && C.toggleAllSelection();
1566
- }, Ie = (v, _) => {
1567
- v && (a.value[_] = v);
1568
- }, Ve = (v, _) => {
1569
- const S = _.width || B();
1570
- Q(v, _, B, (E) => {
1571
- ee(_.prop, { width: E }), s("column-resize", {
1572
- column: { ..._, width: E },
1573
- width: E,
1574
- oldWidth: S
1731
+ }, Ce = (f, g, B) => {
1732
+ l("row-click", { row: f, column: g, event: B }), n.highlightCurrentRow && m && m.setCurrentRow(f);
1733
+ }, Je = (f, g, B) => {
1734
+ B.stopPropagation(), m && m.toggleRowSelection(g, f);
1735
+ }, Qe = (f, g) => {
1736
+ g.stopPropagation(), m && m.toggleAllSelection();
1737
+ }, Ie = (f, g) => {
1738
+ f && (i.value[g] = f);
1739
+ }, Be = (f, g) => {
1740
+ const B = g.width || I();
1741
+ oe(f, g, I, (H) => {
1742
+ J(g.prop, { width: H }), l("column-resize", {
1743
+ column: { ...g, width: H },
1744
+ width: H,
1745
+ oldWidth: B
1575
1746
  });
1576
1747
  });
1577
- }, Ye = (v, _) => M(v, _, I, B), Je = (v, _) => z(v, _, I, B), Qe = (v, _) => H(v, _, I, B), et = (v, _) => {
1578
- if (!_ || !_.prop) return "";
1579
- const S = v[_.prop];
1580
- return S == null ? "" : String(S);
1581
- }, tt = (v, _, S) => {
1582
- const E = v[_.prop], W = (C == null ? void 0 : C.isRowSelected(v)) || !1;
1583
- return [E, W];
1584
- }, nt = L(() => {
1585
- if (!n.showSummary || !$.value) return {};
1586
- const v = i;
1748
+ }, et = (f, g) => q(f, g, V, I), tt = (f, g) => Q(f, g, V, I), nt = (f, g) => U(f, g, V, I), ot = (f, g) => {
1749
+ if (!g || !g.prop) return "";
1750
+ const B = f[g.prop];
1751
+ return B == null ? "" : String(B);
1752
+ }, lt = S(() => {
1753
+ if (!n.showSummary || !L.value) return {};
1754
+ const f = a;
1587
1755
  if (typeof n.summaryMethod == "function") {
1588
- const _ = n.summaryMethod({ columns: v, data: c.value });
1589
- return v.reduce(
1590
- (S, E, W) => (S[E.prop] = _[W], S),
1756
+ const g = n.summaryMethod({ columns: f, data: r.value });
1757
+ return f.reduce(
1758
+ (B, H, O) => (B[H.prop] = g[O], B),
1591
1759
  {}
1592
1760
  );
1593
1761
  }
1594
- return v.reduce(
1595
- (_, S) => {
1596
- const E = c.value.map((W) => W[S.prop]);
1597
- return _[S.prop] = E.every((W) => typeof W == "number") ? E.reduce((W, de) => W + de, 0) : "", _;
1762
+ return f.reduce(
1763
+ (g, B) => {
1764
+ const H = r.value.map((O) => O[B.prop]);
1765
+ return g[B.prop] = H.every((O) => typeof O == "number") ? H.reduce((O, me) => O + me, 0) : "", g;
1598
1766
  },
1599
1767
  {}
1600
1768
  );
1601
- }), ot = L(() => n.showSummary && $.value), lt = (v, _) => {
1602
- C && C.toggleRowSelection(v, _);
1603
- }, st = () => {
1604
- C && C.toggleAllSelection();
1605
- }, rt = () => {
1606
- C && C.selectAbsolutelyAll();
1769
+ }), st = S(() => n.showSummary && L.value), rt = (f, g) => {
1770
+ m && m.toggleRowSelection(f, g);
1607
1771
  }, it = () => {
1608
- C && C.clearSelection();
1609
- }, at = () => C ? C.getSelectionRows() : [], ct = (v) => {
1610
- C && C.setSelectionRows(v);
1772
+ m && m.toggleAllSelection();
1773
+ }, at = () => {
1774
+ m && m.selectAbsolutelyAll();
1775
+ }, ct = () => {
1776
+ m && m.clearSelection();
1777
+ }, dt = () => m ? m.getSelectionRows() : [], ut = (f) => {
1778
+ m && m.setSelectionRows(f);
1611
1779
  };
1612
- return ve(() => {
1613
- Y();
1780
+ return fe(() => {
1781
+ A();
1614
1782
  }), e({
1615
- toggleRowSelection: lt,
1616
- toggleAllSelection: st,
1617
- selectAbsolutelyAll: rt,
1618
- clearSelection: it,
1619
- getSelectionRows: at,
1620
- setSelectionRows: ct,
1621
- resetInfinityScroll: g
1622
- }), (v, _) => {
1623
- var E, W, de, fe;
1624
- const S = Ue("tooltip");
1625
- return p(), m("div", {
1783
+ toggleRowSelection: rt,
1784
+ toggleAllSelection: it,
1785
+ selectAbsolutelyAll: at,
1786
+ clearSelection: ct,
1787
+ getSelectionRows: dt,
1788
+ setSelectionRows: ut,
1789
+ resetInfinityScroll: w
1790
+ }), (f, g) => {
1791
+ var H, O, me, _e;
1792
+ const B = Fe("tooltip");
1793
+ return p(), v("div", {
1626
1794
  ref_key: "tableWrapperRef",
1627
- ref: r,
1795
+ ref: c,
1628
1796
  class: "vt-table-wrapper",
1629
- style: ie(Z(K)()),
1630
- onScroll: f
1797
+ style: se(X(K)()),
1798
+ onScroll: _
1631
1799
  }, [
1632
- pe(v.$slots, "default"),
1633
- h("table", No, [
1800
+ de(f.$slots, "default"),
1801
+ h("table", jo, [
1634
1802
  h("thead", null, [
1635
1803
  h("tr", null, [
1636
- n.selectable ? (p(), m("th", {
1804
+ n.selectable ? (p(), v("th", {
1637
1805
  key: 0,
1638
- class: D(["vt-table__th vt-table__th--selection", {
1806
+ class: z(["vt-table__th vt-table__th--selection", {
1639
1807
  "vt-table__th--sticky": n.maxHeight,
1640
1808
  "vt-table__th--pinned-left": !0
1641
1809
  }]),
1642
- style: ie(X())
1810
+ style: se(M())
1643
1811
  }, [
1644
- h("div", Fo, [
1645
- F(ue, {
1646
- checked: (E = Z(C)) == null ? void 0 : E.isAllSelected.value,
1647
- indeterminate: (W = Z(C)) == null ? void 0 : W.isIndeterminate.value,
1648
- "is-double": (fe = (de = Z(C)) == null ? void 0 : de.isDoubleCheck) == null ? void 0 : fe.value,
1649
- onChange: Ge
1812
+ h("div", No, [
1813
+ F(pe, {
1814
+ checked: (H = X(m)) == null ? void 0 : H.isAllSelected.value,
1815
+ indeterminate: (O = X(m)) == null ? void 0 : O.isIndeterminate.value,
1816
+ "is-double": (_e = (me = X(m)) == null ? void 0 : me.isDoubleCheck) == null ? void 0 : _e.value,
1817
+ onChange: Qe
1650
1818
  }, null, 8, ["checked", "indeterminate", "is-double"])
1651
1819
  ])
1652
- ], 6)) : A("", !0),
1653
- (p(!0), m(oe, null, le(Z(x), (k, ne) => (p(), m("th", {
1654
- key: k.prop,
1820
+ ], 6)) : W("", !0),
1821
+ (p(!0), v(re, null, ie(X(b), (x, le) => (p(), v("th", {
1822
+ key: x.prop,
1655
1823
  ref_for: !0,
1656
- ref: (re) => Ie(re, k.prop),
1657
- style: ie(Je(k, ne)),
1658
- class: D([
1824
+ ref: (ae) => Ie(ae, x.prop),
1825
+ style: se(tt(x, le)),
1826
+ class: z([
1659
1827
  "vt-table__th",
1660
1828
  {
1661
1829
  "vt-table__th--sticky": n.maxHeight,
1662
- "vt-table__th--pinned-left": k.pinnedLeft,
1663
- "vt-table__th--pinned-right": k.pinnedRight,
1664
- "vt-table__th--sortable": k.sortable
1830
+ "vt-table__th--pinned-left": x.pinnedLeft,
1831
+ "vt-table__th--pinned-right": x.pinnedRight,
1832
+ "vt-table__th--sortable": x.sortable
1665
1833
  }
1666
1834
  ])
1667
1835
  }, [
1668
- h("div", Zo, [
1669
- h("div", Uo, te(k.label), 1),
1670
- k.sortable ? (p(), m("div", Ko, [
1671
- F(J, {
1836
+ h("div", Fo, [
1837
+ h("div", Zo, ee(x.label), 1),
1838
+ x.sortable ? (p(), v("div", Yo, [
1839
+ F(G, {
1672
1840
  name: "arrowTop",
1673
- class: D(Z(We)(k, u.value).asc),
1674
- onClick: he((re) => b(k, "asc"), ["stop"])
1841
+ class: z(X(He)(x, u.value).asc),
1842
+ onClick: he((ae) => $(x, "asc"), ["stop"])
1675
1843
  }, null, 8, ["class", "onClick"]),
1676
- F(J, {
1844
+ F(G, {
1677
1845
  name: "arrowDown",
1678
- class: D(Z(We)(k, u.value).desc),
1679
- onClick: he((re) => b(k, "desc"), ["stop"])
1846
+ class: z(X(He)(x, u.value).desc),
1847
+ onClick: he((ae) => $(x, "desc"), ["stop"])
1680
1848
  }, null, 8, ["class", "onClick"])
1681
- ])) : A("", !0),
1682
- k.actionColumn ? (p(), ce(jo, {
1849
+ ])) : W("", !0),
1850
+ x.actionColumn ? (p(), ne(Oo, {
1683
1851
  key: 1,
1684
- column: k,
1685
- "all-columns": Z(x),
1852
+ column: x,
1853
+ "all-columns": X(b),
1686
1854
  columnsSelector: n.columnsSelector,
1687
- onPin: R,
1688
- onUpdateColumns: T
1689
- }, null, 8, ["column", "all-columns", "columnsSelector"])) : A("", !0)
1855
+ onPin: T,
1856
+ onUpdateColumns: E
1857
+ }, null, 8, ["column", "all-columns", "columnsSelector"])) : W("", !0)
1690
1858
  ]),
1691
1859
  h("div", {
1692
1860
  class: "vt-table__resizer",
1693
- "data-resizer": k.prop,
1694
- onMousedown: (re) => Ve(re, k)
1695
- }, null, 40, qo)
1861
+ "data-resizer": x.prop,
1862
+ onMousedown: (ae) => Be(ae, x)
1863
+ }, null, 40, Uo)
1696
1864
  ], 6))), 128))
1697
1865
  ])
1698
1866
  ]),
1699
1867
  h("tbody", null, [
1700
- $.value ? (p(!0), m(oe, { key: 1 }, le(c.value, (k, ne) => {
1701
- var re, Be, Re;
1702
- return p(), m("tr", {
1703
- key: G(k, ne),
1704
- class: D([
1868
+ L.value ? (p(!0), v(re, { key: 1 }, ie(r.value, (x, le) => {
1869
+ var ae, Te, Ee;
1870
+ return p(), v("tr", {
1871
+ key: R(x, le),
1872
+ class: z([
1705
1873
  "vt-table__row",
1706
1874
  {
1707
- "vt-table__row--selected": (re = Z(C)) == null ? void 0 : re.isRowSelected(k),
1708
- "vt-table__row--current": ((Be = Z(C)) == null ? void 0 : Be.currentRow.value) === k,
1875
+ "vt-table__row--selected": (ae = X(m)) == null ? void 0 : ae.isRowSelected(x),
1876
+ "vt-table__row--current": ((Te = X(m)) == null ? void 0 : Te.currentRow.value) === x,
1709
1877
  "vt-table__row--clickable": n.selectOnClickRow || n.highlightCurrentRow
1710
1878
  }
1711
1879
  ]),
1712
- onClick: (j) => we(k, Z(x)[0], j)
1880
+ onClick: (Z) => Ce(x, X(b)[0], Z)
1713
1881
  }, [
1714
- n.selectable ? (p(), m("td", {
1882
+ n.selectable ? (p(), v("td", {
1715
1883
  key: 0,
1716
- class: D(["vt-table__td vt-table__td--selection", {
1884
+ class: z(["vt-table__td vt-table__td--selection", {
1717
1885
  "vt-table__td--pinned-left": !0
1718
1886
  }]),
1719
- style: ie(V())
1887
+ style: se(y())
1720
1888
  }, [
1721
- h("div", Qo, [
1722
- F(ue, {
1723
- checked: (Re = Z(C)) == null ? void 0 : Re.isRowSelected(k),
1724
- onChange: (j, ke) => Xe(j, k, ke)
1889
+ h("div", Jo, [
1890
+ F(pe, {
1891
+ checked: (Ee = X(m)) == null ? void 0 : Ee.isRowSelected(x),
1892
+ onChange: (Z, ke) => Je(Z, x, ke)
1725
1893
  }, null, 8, ["checked", "onChange"])
1726
1894
  ])
1727
- ], 4)) : A("", !0),
1728
- (p(!0), m(oe, null, le(Z(x), (j, ke, cl, _e) => {
1729
- const Te = tt(k, j);
1730
- if (_e && _e.key === `${G(k, ne)}-${j.prop}` && _t(_e, Te)) return _e;
1731
- const Ee = (p(), m("td", {
1732
- key: `${G(k, ne)}-${j.prop}`,
1733
- ref_for: !0,
1734
- ref: (be) => Ie(be, j.prop),
1735
- style: ie(Ye(j, ke)),
1736
- class: D([
1737
- "vt-table__td",
1738
- {
1739
- "vt-table__td--pinned-left": j.pinnedLeft,
1740
- "vt-table__td--pinned-right": j.pinnedRight
1741
- }
1742
- ])
1743
- }, [
1744
- $e((p(), m("div", el, [
1745
- j.renderSlot ? (p(), ce(Fe(() => Z(Mo)(j.renderSlot, { row: k, column: j, value: k[j.prop], index: ne })), { key: 0 })) : (p(), m("span", tl, te(k[j.prop]), 1))
1746
- ])), [
1747
- [S, j.showOverflowTooltip ? et(k, j) : null]
1748
- ]),
1749
- h("div", {
1750
- class: "vt-table__resizer",
1751
- "data-resizer": j.prop,
1752
- onMousedown: (be) => Ve(be, j)
1753
- }, null, 40, nl)
1754
- ], 6));
1755
- return Ee.memo = Te, Ee;
1756
- }, _, 0), 128))
1757
- ], 10, Jo);
1758
- }), 128)) : (p(), m("tr", Xo, [
1895
+ ], 4)) : W("", !0),
1896
+ (p(!0), v(re, null, ie(X(b), (Z, ke) => (p(), v("td", {
1897
+ key: `${R(x, le)}-${Z.prop}`,
1898
+ ref_for: !0,
1899
+ ref: (be) => Ie(be, Z.prop),
1900
+ style: se(et(Z, ke)),
1901
+ class: z([
1902
+ "vt-table__td",
1903
+ {
1904
+ "vt-table__td--pinned-left": Z.pinnedLeft,
1905
+ "vt-table__td--pinned-right": Z.pinnedRight
1906
+ }
1907
+ ])
1908
+ }, [
1909
+ Se((p(), v("div", Qo, [
1910
+ Z.renderSlot ? (p(), ne(Ne(() => X(yo)(Z.renderSlot, { row: x, column: Z, value: x[Z.prop], index: le })), { key: 0 })) : (p(), v("span", el, ee(x[Z.prop]), 1))
1911
+ ])), [
1912
+ [B, Z.showOverflowTooltip ? ot(x, Z) : null]
1913
+ ]),
1914
+ h("div", {
1915
+ class: "vt-table__resizer",
1916
+ "data-resizer": Z.prop,
1917
+ onMousedown: (be) => Be(be, Z)
1918
+ }, null, 40, tl)
1919
+ ], 6))), 128))
1920
+ ], 10, Go);
1921
+ }), 128)) : (p(), v("tr", Xo, [
1759
1922
  h("td", {
1760
- colspan: Z(x).length + (n.selectable ? 1 : 0),
1923
+ colspan: X(b).length + (n.selectable ? 1 : 0),
1761
1924
  class: "vt-table__empty-cell"
1762
1925
  }, [
1763
- h("div", Yo, [
1764
- F(J, {
1926
+ h("div", qo, [
1927
+ F(G, {
1765
1928
  name: "empty",
1766
1929
  class: "vt-table__empty-icon"
1767
1930
  }),
1768
- _[2] || (_[2] = h("span", { class: "vt-table__empty-text" }, "Немає даних!", -1))
1931
+ g[0] || (g[0] = h("span", { class: "vt-table__empty-text" }, "Немає даних!", -1))
1769
1932
  ])
1770
- ], 8, Go)
1933
+ ], 8, Ko)
1771
1934
  ]))
1772
1935
  ]),
1773
- ot.value ? (p(), m("tfoot", ol, [
1936
+ st.value ? (p(), v("tfoot", nl, [
1774
1937
  h("tr", null, [
1775
- n.selectable ? (p(), m("td", {
1938
+ n.selectable ? (p(), v("td", {
1776
1939
  key: 0,
1777
- class: D(["vt-table__td", {
1940
+ class: z(["vt-table__td", {
1778
1941
  "vt-table__td--pinned-left": !0
1779
1942
  }]),
1780
- style: ie(d())
1781
- }, _[3] || (_[3] = [
1943
+ style: se(d())
1944
+ }, g[1] || (g[1] = [
1782
1945
  h("div", { class: "vt-table__cell-content vt-table__cell-content--summary" }, null, -1)
1783
- ]), 4)) : A("", !0),
1784
- (p(!0), m(oe, null, le(Z(x), (k, ne) => (p(), m("td", {
1785
- key: k.prop,
1786
- style: ie(Qe(k, ne)),
1787
- class: D([
1946
+ ]), 4)) : W("", !0),
1947
+ (p(!0), v(re, null, ie(X(b), (x, le) => (p(), v("td", {
1948
+ key: x.prop,
1949
+ style: se(nt(x, le)),
1950
+ class: z([
1788
1951
  "vt-table__td",
1789
1952
  {
1790
- "vt-table__td--pinned-left": k.pinnedLeft,
1791
- "vt-table__td--pinned-right": k.pinnedRight
1953
+ "vt-table__td--pinned-left": x.pinnedLeft,
1954
+ "vt-table__td--pinned-right": x.pinnedRight
1792
1955
  }
1793
1956
  ])
1794
1957
  }, [
1795
- h("div", ll, te(nt.value[k.prop]), 1)
1958
+ h("div", ol, ee(lt.value[x.prop]), 1)
1796
1959
  ], 6))), 128))
1797
1960
  ])
1798
- ])) : A("", !0)
1961
+ ])) : W("", !0)
1799
1962
  ])
1800
1963
  ], 36);
1801
1964
  };
1802
1965
  }
1803
- }), rl = /* @__PURE__ */ se({
1966
+ }), sl = /* @__PURE__ */ te({
1804
1967
  __name: "VTableColumn",
1805
1968
  props: {
1806
1969
  prop: {},
@@ -1818,11 +1981,11 @@ const ae = new Io(), Vo = {
1818
1981
  sortMethod: {}
1819
1982
  },
1820
1983
  setup(t) {
1821
- const e = t, o = Ze(), n = gt("vt-table-columns");
1984
+ const e = t, o = $e(), n = Ue("vt-table-columns");
1822
1985
  n || console.error(
1823
1986
  "VTableColumn: не знайдено контекст таблиці. Переконайтеся, що компонент використовується всередині VTable."
1824
1987
  );
1825
- const s = () => ({
1988
+ const l = () => ({
1826
1989
  prop: e.prop,
1827
1990
  label: e.label,
1828
1991
  width: e.width,
@@ -1837,13 +2000,13 @@ const ae = new Io(), Vo = {
1837
2000
  // Зберігаємо слот - пріоритет: назва колонки -> default -> slot
1838
2001
  renderSlot: o[e.prop] ?? o.default ?? o.slot
1839
2002
  });
1840
- let l = -1;
1841
- return ve(() => {
2003
+ let s = -1;
2004
+ return fe(() => {
1842
2005
  if (n) {
1843
- const a = s();
1844
- n.push(a), l = n.length - 1;
2006
+ const i = l();
2007
+ n.push(i), s = n.length - 1;
1845
2008
  }
1846
- }), me(
2009
+ }), ve(
1847
2010
  () => [
1848
2011
  e.width,
1849
2012
  e.minWidth,
@@ -1857,27 +2020,27 @@ const ae = new Io(), Vo = {
1857
2020
  e.label
1858
2021
  ],
1859
2022
  () => {
1860
- if (n && l !== -1) {
1861
- const a = n.findIndex((r) => r.prop === e.prop);
1862
- if (a !== -1) {
1863
- const r = n[a], i = {
1864
- ...s(),
1865
- renderSlot: r.renderSlot
2023
+ if (n && s !== -1) {
2024
+ const i = n.findIndex((c) => c.prop === e.prop);
2025
+ if (i !== -1) {
2026
+ const c = n[i], a = {
2027
+ ...l(),
2028
+ renderSlot: c.renderSlot
1866
2029
  // Зберігаємо існуючий renderSlot
1867
2030
  };
1868
- n[a] = i;
2031
+ n[i] = a;
1869
2032
  }
1870
2033
  }
1871
2034
  },
1872
2035
  { deep: !0 }
1873
- ), Se(() => {
2036
+ ), Ve(() => {
1874
2037
  if (n) {
1875
- const a = n.findIndex((r) => r.prop === e.prop);
1876
- a > -1 && n.splice(a, 1);
2038
+ const i = n.findIndex((c) => c.prop === e.prop);
2039
+ i > -1 && n.splice(i, 1);
1877
2040
  }
1878
- }), (a, r) => null;
2041
+ }), (i, c) => null;
1879
2042
  }
1880
- }), De = (t, e) => {
2043
+ }), We = (t, e) => {
1881
2044
  const o = document.createElement("div");
1882
2045
  o.className = `vt-tooltip vt-tooltip--${e}`, o.innerText = t, Object.assign(o.style, {
1883
2046
  position: "absolute",
@@ -1944,45 +2107,45 @@ const ae = new Io(), Vo = {
1944
2107
  }
1945
2108
  return o.appendChild(n), o;
1946
2109
  }, Le = (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;
2110
+ const n = e.getBoundingClientRect(), l = t.getBoundingClientRect(), s = window.pageXOffset || document.documentElement.scrollLeft, i = window.pageYOffset || document.documentElement.scrollTop;
2111
+ let c = 0, a = 0;
1949
2112
  switch (o) {
1950
2113
  case "top":
1951
- r = n.top + a - s.height - 8, i = n.left + l + (n.width - s.width) / 2;
2114
+ c = n.top + i - l.height - 8, a = n.left + s + (n.width - l.width) / 2;
1952
2115
  break;
1953
2116
  case "bottom":
1954
- r = n.bottom + a + 8, i = n.left + l + (n.width - s.width) / 2;
2117
+ c = n.bottom + i + 8, a = n.left + s + (n.width - l.width) / 2;
1955
2118
  break;
1956
2119
  case "left":
1957
- r = n.top + a + (n.height - s.height) / 2, i = n.left + l - s.width - 8;
2120
+ c = n.top + i + (n.height - l.height) / 2, a = n.left + s - l.width - 8;
1958
2121
  break;
1959
2122
  case "right":
1960
- r = n.top + a + (n.height - s.height) / 2, i = n.right + l + 8;
2123
+ c = n.top + i + (n.height - l.height) / 2, a = n.right + s + 8;
1961
2124
  break;
1962
2125
  }
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
- }, Pe = (t, e, o) => {
2126
+ const u = window.innerWidth, r = window.innerHeight;
2127
+ a < 8 ? a = 8 : a + l.width > u - 8 && (a = u - l.width - 8), c < i + 8 ? o === "top" ? c = n.bottom + i + 8 : c = i + 8 : c + l.height > i + r - 8 && (o === "bottom" ? c = n.top + i - l.height - 8 : c = i + r - l.height - 8), t.style.top = `${c}px`, t.style.left = `${a}px`;
2128
+ }, De = (t, e, o) => {
1966
2129
  t.parentElement || document.body.appendChild(t), t.style.visibility = "visible", Le(t, e, o), requestAnimationFrame(() => {
1967
2130
  t.style.opacity = "1";
1968
2131
  });
1969
- }, Ae = (t) => {
2132
+ }, Pe = (t) => {
1970
2133
  t.style.opacity = "0", t.style.visibility = "hidden";
1971
- }, Oe = (t) => t.scrollWidth > t.clientWidth || t.scrollHeight > t.clientHeight, je = (t) => !!t.closest(".vt-table, table"), il = {
2134
+ }, Ae = (t) => t.scrollWidth > t.clientWidth || t.scrollHeight > t.clientHeight, Oe = (t) => !!t.closest(".vt-table, table"), rl = {
1972
2135
  mounted(t, e) {
1973
- var i;
1974
- const o = (i = e.value) == null ? void 0 : i.trim();
2136
+ var a;
2137
+ const o = (a = e.value) == null ? void 0 : a.trim();
1975
2138
  if (!o) return;
1976
- const n = t.dataset.placement || "top", s = De(o, n);
1977
- t.__tooltipEl = s;
1978
- const l = () => {
1979
- (je(t) ? Oe(t) : !0) && Pe(s, t, n);
1980
- }, a = () => {
1981
- Ae(s);
1982
- }, r = () => {
1983
- s.style.opacity === "1" && Le(s, t, n);
2139
+ const n = t.dataset.placement || "top", l = We(o, n);
2140
+ t.__tooltipEl = l;
2141
+ const s = () => {
2142
+ (Oe(t) ? Ae(t) : !0) && De(l, t, n);
2143
+ }, i = () => {
2144
+ Pe(l);
2145
+ }, c = () => {
2146
+ l.style.opacity === "1" && Le(l, t, n);
1984
2147
  };
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);
2148
+ t.__mouseenterHandler = s, t.__mouseleaveHandler = i, t.__scrollHandler = c, t.addEventListener("mouseenter", s), t.addEventListener("mouseleave", i), window.addEventListener("scroll", c, !0), window.addEventListener("resize", c);
1986
2149
  },
1987
2150
  updated(t, e) {
1988
2151
  var n;
@@ -1990,47 +2153,50 @@ const ae = new Io(), Vo = {
1990
2153
  if (t.__tooltipEl)
1991
2154
  o ? t.__tooltipEl.firstChild.textContent = o : (t.__tooltipEl.parentElement && t.__tooltipEl.parentElement.removeChild(t.__tooltipEl), delete t.__tooltipEl);
1992
2155
  else if (o) {
1993
- const s = t.dataset.placement || "top", l = De(o, s);
1994
- t.__tooltipEl = l;
1995
- const a = () => {
1996
- (je(t) ? Oe(t) : !0) && Pe(l, t, s);
1997
- }, r = () => {
1998
- Ae(l);
1999
- }, i = () => {
2000
- l.style.opacity === "1" && Le(l, t, s);
2156
+ const l = t.dataset.placement || "top", s = We(o, l);
2157
+ t.__tooltipEl = s;
2158
+ const i = () => {
2159
+ (Oe(t) ? Ae(t) : !0) && De(s, t, l);
2160
+ }, c = () => {
2161
+ Pe(s);
2162
+ }, a = () => {
2163
+ s.style.opacity === "1" && Le(s, t, l);
2001
2164
  };
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);
2165
+ t.__mouseenterHandler = i, t.__mouseleaveHandler = c, t.__scrollHandler = a, t.addEventListener("mouseenter", i), t.addEventListener("mouseleave", c), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a);
2003
2166
  }
2004
2167
  },
2005
2168
  beforeUnmount(t) {
2006
2169
  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
2170
  }
2008
- }, dl = {
2171
+ }, cl = {
2009
2172
  sortable: !0,
2010
2173
  actionColumn: !1,
2011
2174
  showOverflowTooltip: !0,
2012
2175
  visible: !0,
2013
2176
  pinnedLeft: !1,
2014
2177
  pinnedRight: !1
2015
- }, al = {
2178
+ }, il = {
2016
2179
  install(t, e = {}) {
2017
2180
  const { prefix: o = "V", modal: n = !0 } = e;
2018
- t.component(`${o}Button`, Ce), t.component(`${o}Icon`, J), t.component(`${o}Loader`, Ke), t.component(`${o}Modal`, qe), t.component(`${o}Pagination`, go), t.component(`${o}Checkbox`, ue), t.component(`${o}Table`, sl), t.component(`${o}TableColumn`, rl), t.directive("tooltip", il), n && t.use(Vo);
2181
+ t.component(`${o}Button`, we), t.component(`${o}Icon`, G), t.component(`${o}Loader`, Xe), t.component(`${o}Modal`, Ke), t.component(`${o}Pagination`, fo), t.component(`${o}Checkbox`, pe), t.component(`${o}Table`, ll), t.component(`${o}TableColumn`, sl), t.component(`${o}Dropdown`, Ge), t.component(`${o}DropdownItem`, Me), t.directive("tooltip", rl), n && t.use(So);
2019
2182
  }
2020
- }, pl = al.install;
2183
+ }, dl = il.install;
2021
2184
  export {
2022
- dl as DEFAULT_COLUMN_CONFIG,
2023
- Ce as VButton,
2024
- ue as VCheckbox,
2025
- J as VIcon,
2026
- Ke as VLoader,
2027
- qe as VModal,
2028
- Vo as VModalPlugin,
2029
- go as VPagination,
2030
- sl as VTable,
2031
- rl as VTableColumn,
2032
- al as default,
2033
- pl as install,
2034
- ae as modalManager,
2035
- il as tooltipDirective
2185
+ cl as DEFAULT_COLUMN_CONFIG,
2186
+ qe as DropdownContextKey,
2187
+ we as VButton,
2188
+ pe as VCheckbox,
2189
+ Ge as VDropdown,
2190
+ Me as VDropdownItem,
2191
+ G as VIcon,
2192
+ Xe as VLoader,
2193
+ Ke as VModal,
2194
+ So as VModalPlugin,
2195
+ fo as VPagination,
2196
+ ll as VTable,
2197
+ sl as VTableColumn,
2198
+ il as default,
2199
+ dl as install,
2200
+ ce as modalManager,
2201
+ rl as tooltipDirective
2036
2202
  };