vx-vue 1.3.7 → 1.3.9

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/vxvue.es.js CHANGED
@@ -1,334 +1,347 @@
1
- import { useSlots as Me, ref as $, computed as B, onBeforeUpdate as Ve, createElementBlock as m, openBlock as c, Fragment as O, renderList as j, createBlock as Z, resolveDynamicComponent as de, createElementVNode as v, useAttrs as K, normalizeClass as C, unref as A, renderSlot as L, toValue as E, watch as X, getCurrentScope as De, onScopeDispose as Ae, onUpdated as Le, createCommentVNode as I, mergeProps as R, withKeys as se, withModifiers as _, toDisplayString as P, Transition as Te, withCtx as te, createVNode as Y, createTextVNode as J, nextTick as fe, withDirectives as re, vShow as me, vModelText as ze, onMounted as he, normalizeStyle as we, resolveComponent as Pe, createSlots as Be, toHandlers as ue } from "vue";
2
- const wl = {
1
+ import { useSlots as Le, ref as k, computed as I, onBeforeUpdate as Te, createElementBlock as m, openBlock as d, Fragment as O, renderList as Y, createBlock as H, resolveDynamicComponent as me, createElementVNode as c, useAttrs as K, normalizeClass as S, unref as L, renderSlot as T, Transition as Ve, withCtx as ee, toValue as F, watch as X, getCurrentScope as ze, onScopeDispose as Pe, mergeModels as Z, useModel as te, onUpdated as Be, createVNode as _, mergeProps as R, withKeys as re, withModifiers as j, createCommentVNode as B, toDisplayString as P, createTextVNode as Q, nextTick as be, withDirectives as le, vShow as fe, vModelText as Ie, onMounted as xe, vModelSelect as Ne, vModelCheckbox as Oe, normalizeStyle as Se, vModelDynamic as Ee, resolveComponent as Fe, createSlots as _e, toHandlers as ce } from "vue";
2
+ const Cl = {
3
3
  __name: "Accordion",
4
4
  props: { activeIndex: { type: [Number, Array], default: null } },
5
5
  emits: ["update:activeIndex"],
6
6
  setup(e, { emit: u }) {
7
- const t = e, n = u, a = Me(), l = $([]), i = (f) => l.value.push(f), s = B(
8
- () => a.default().reduce((f, x) => ((x.type.__name || x.type.name) === "AccordionPanel" && f.push(x), f), [])
7
+ const t = e, a = u, l = Le(), s = k([]), v = (f) => s.value.push(f), r = I(
8
+ () => l.default().reduce((f, b) => ((b.type.__name || b.type.name) === "AccordionPanel" && f.push(b), f), [])
9
9
  ), o = (f) => {
10
10
  if (Array.isArray(t.activeIndex)) {
11
- let x = [].concat(t.activeIndex), y = x.findIndex((b) => b === f);
12
- y === -1 ? n("update:activeIndex", [...x, f]) : (x.splice(y, 1), n("update:activeIndex", x));
11
+ let b = [].concat(t.activeIndex), w = b.findIndex((g) => g === f);
12
+ w === -1 ? a("update:activeIndex", [...b, f]) : (b.splice(w, 1), a("update:activeIndex", b));
13
13
  } else
14
- n("update:activeIndex", f === t.activeIndex ? -1 : f);
15
- }, r = (f) => {
16
- if (f = ++f % s.value.length, !l.value[f].disabled) {
17
- o(f), l.value[f].focus();
14
+ a("update:activeIndex", f === t.activeIndex ? -1 : f);
15
+ }, n = (f) => {
16
+ if (f = ++f % r.value.length, !s.value[f].disabled) {
17
+ o(f), s.value[f].focus();
18
18
  return;
19
19
  }
20
- r(f);
21
- }, d = (f) => {
22
- if (f = (f || s.value.length) - 1, !l.value[f].disabled) {
23
- o(f), l.value[f].focus();
20
+ n(f);
21
+ }, i = (f) => {
22
+ if (f = (f || r.value.length) - 1, !s.value[f].disabled) {
23
+ o(f), s.value[f].focus();
24
24
  return;
25
25
  }
26
- d(f);
26
+ i(f);
27
27
  };
28
- return Ve(() => l.value = []), (f, x) => (c(!0), m(O, null, j(s.value, (y, b) => {
29
- var T;
30
- return c(), Z(de(y), {
31
- key: b,
32
- ref_for: !0,
33
- ref: i,
34
- show: Array.isArray(e.activeIndex) ? (T = e.activeIndex) == null ? void 0 : T.includes(b) : e.activeIndex === b,
35
- onSelect: (p) => o(b),
36
- onKeydown: (p) => r(b),
37
- onKeyup: (p) => d(b)
38
- }, null, 40, ["show", "onSelect", "onKeydown", "onKeyup"]);
39
- }), 128));
28
+ return Te(() => s.value = []), (f, b) => (d(!0), m(O, null, Y(r.value, (w, g) => (d(), H(me(w), {
29
+ key: g,
30
+ ref_for: !0,
31
+ ref: v,
32
+ show: Array.isArray(e.activeIndex) ? e.activeIndex?.includes(g) : e.activeIndex === g,
33
+ onSelect: (M) => o(g),
34
+ onKeydown: (M) => n(g),
35
+ onKeyup: (M) => i(g)
36
+ }, null, 40, ["show", "onSelect", "onKeydown", "onKeyup"]))), 128));
40
37
  }
41
38
  };
42
- function Ie(e, u) {
43
- return c(), m("svg", {
39
+ function je(e, u) {
40
+ return d(), m("svg", {
44
41
  xmlns: "http://www.w3.org/2000/svg",
45
42
  viewBox: "0 0 24 24",
46
43
  fill: "currentColor",
47
44
  "aria-hidden": "true",
48
45
  "data-slot": "icon"
49
46
  }, [
50
- v("path", {
47
+ c("path", {
51
48
  "fill-rule": "evenodd",
52
49
  d: "M6.75 2.25A.75.75 0 0 1 7.5 3v1.5h9V3A.75.75 0 0 1 18 3v1.5h.75a3 3 0 0 1 3 3v11.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V7.5a3 3 0 0 1 3-3H6V3a.75.75 0 0 1 .75-.75Zm13.5 9a1.5 1.5 0 0 0-1.5-1.5H5.25a1.5 1.5 0 0 0-1.5 1.5v7.5a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5v-7.5Z",
53
50
  "clip-rule": "evenodd"
54
51
  })
55
52
  ]);
56
53
  }
57
- function Ne(e, u) {
58
- return c(), m("svg", {
54
+ function Ye(e, u) {
55
+ return d(), m("svg", {
59
56
  xmlns: "http://www.w3.org/2000/svg",
60
57
  viewBox: "0 0 24 24",
61
58
  fill: "currentColor",
62
59
  "aria-hidden": "true",
63
60
  "data-slot": "icon"
64
61
  }, [
65
- v("path", {
62
+ c("path", {
66
63
  "fill-rule": "evenodd",
67
64
  d: "M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",
68
65
  "clip-rule": "evenodd"
69
66
  })
70
67
  ]);
71
68
  }
72
- function ie(e, u) {
73
- return c(), m("svg", {
69
+ function ve(e, u) {
70
+ return d(), m("svg", {
74
71
  xmlns: "http://www.w3.org/2000/svg",
75
72
  viewBox: "0 0 24 24",
76
73
  fill: "currentColor",
77
74
  "aria-hidden": "true",
78
75
  "data-slot": "icon"
79
76
  }, [
80
- v("path", {
77
+ c("path", {
81
78
  "fill-rule": "evenodd",
82
79
  d: "M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",
83
80
  "clip-rule": "evenodd"
84
81
  })
85
82
  ]);
86
83
  }
87
- function oe(e, u) {
88
- return c(), m("svg", {
84
+ function ie(e, u) {
85
+ return d(), m("svg", {
89
86
  xmlns: "http://www.w3.org/2000/svg",
90
87
  viewBox: "0 0 24 24",
91
88
  fill: "currentColor",
92
89
  "aria-hidden": "true",
93
90
  "data-slot": "icon"
94
91
  }, [
95
- v("path", {
92
+ c("path", {
96
93
  "fill-rule": "evenodd",
97
94
  d: "M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",
98
95
  "clip-rule": "evenodd"
99
96
  })
100
97
  ]);
101
98
  }
102
- function Oe(e, u) {
103
- return c(), m("svg", {
99
+ function Re(e, u) {
100
+ return d(), m("svg", {
104
101
  xmlns: "http://www.w3.org/2000/svg",
105
102
  viewBox: "0 0 24 24",
106
103
  fill: "currentColor",
107
104
  "aria-hidden": "true",
108
105
  "data-slot": "icon"
109
106
  }, [
110
- v("path", {
107
+ c("path", {
111
108
  "fill-rule": "evenodd",
112
109
  d: "M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z",
113
110
  "clip-rule": "evenodd"
114
111
  })
115
112
  ]);
116
113
  }
117
- function Ee(e, u) {
118
- return c(), m("svg", {
114
+ function He(e, u) {
115
+ return d(), m("svg", {
119
116
  xmlns: "http://www.w3.org/2000/svg",
120
117
  viewBox: "0 0 24 24",
121
118
  fill: "currentColor",
122
119
  "aria-hidden": "true",
123
120
  "data-slot": "icon"
124
121
  }, [
125
- v("path", {
122
+ c("path", {
126
123
  "fill-rule": "evenodd",
127
124
  d: "M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z",
128
125
  "clip-rule": "evenodd"
129
126
  })
130
127
  ]);
131
128
  }
132
- function Fe(e, u) {
133
- return c(), m("svg", {
129
+ function Ze(e, u) {
130
+ return d(), m("svg", {
134
131
  xmlns: "http://www.w3.org/2000/svg",
135
132
  viewBox: "0 0 24 24",
136
133
  fill: "currentColor",
137
134
  "aria-hidden": "true",
138
135
  "data-slot": "icon"
139
136
  }, [
140
- v("path", {
137
+ c("path", {
141
138
  "fill-rule": "evenodd",
142
139
  d: "M4.25 12a.75.75 0 0 1 .75-.75h14a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1-.75-.75Z",
143
140
  "clip-rule": "evenodd"
144
141
  })
145
142
  ]);
146
143
  }
147
- function _e(e, u) {
148
- return c(), m("svg", {
144
+ function Ue(e, u) {
145
+ return d(), m("svg", {
149
146
  xmlns: "http://www.w3.org/2000/svg",
150
147
  viewBox: "0 0 24 24",
151
148
  fill: "currentColor",
152
149
  "aria-hidden": "true",
153
150
  "data-slot": "icon"
154
151
  }, [
155
- v("path", {
152
+ c("path", {
156
153
  "fill-rule": "evenodd",
157
154
  d: "M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",
158
155
  "clip-rule": "evenodd"
159
156
  })
160
157
  ]);
161
158
  }
162
- function pe(e, u) {
163
- return c(), m("svg", {
159
+ function ye(e, u) {
160
+ return d(), m("svg", {
164
161
  xmlns: "http://www.w3.org/2000/svg",
165
162
  viewBox: "0 0 24 24",
166
163
  fill: "currentColor",
167
164
  "aria-hidden": "true",
168
165
  "data-slot": "icon"
169
166
  }, [
170
- v("path", {
167
+ c("path", {
171
168
  "fill-rule": "evenodd",
172
169
  d: "M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",
173
170
  "clip-rule": "evenodd"
174
171
  })
175
172
  ]);
176
173
  }
177
- const je = ["id", "disabled", "aria-expanded", "aria-controls"], Ye = ["id", "aria-labelledby"], Re = { class: "overflow-hidden rounded-b" }, kl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
174
+ const We = ["id", "disabled", "aria-expanded", "aria-controls"], qe = ["id", "aria-labelledby"], Ke = { class: "overflow-hidden rounded-b" }, Ml = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
178
175
  __name: "AccordionPanel",
179
176
  props: { show: Boolean, disabled: Boolean },
180
177
  emits: ["select", "keyup", "keydown"],
181
178
  setup(e, { expose: u, emit: t }) {
182
- const n = t, a = e, l = K(), i = $(null), s = Math.random().toString(20).substring(2, 8), o = (d) => {
183
- if (!a.disabled) {
184
- const f = (/* @__PURE__ */ new Map([[40, "keydown"], [38, "keyup"]])).get(d.keyCode);
185
- f && (n(f), d.preventDefault());
179
+ const a = t, l = e, s = K(), v = k(null), r = Math.random().toString(20).substring(2, 8), o = (i) => {
180
+ if (!l.disabled) {
181
+ const f = (/* @__PURE__ */ new Map([[40, "keydown"], [38, "keyup"]])).get(i.keyCode);
182
+ f && (a(f), i.preventDefault());
186
183
  }
187
184
  };
188
- return u({ focus: () => i.value.focus(), disabled: a.disabled }), (d, f) => (c(), m("div", null, [
189
- v("button", {
190
- id: "ap-control-" + A(s),
185
+ return u({ focus: () => v.value.focus(), disabled: l.disabled }), (i, f) => (d(), m("div", null, [
186
+ c("button", {
187
+ id: "ap-control-" + L(r),
191
188
  ref_key: "btn",
192
- ref: i,
193
- class: C([
189
+ ref: v,
190
+ class: S([
194
191
  "flex items-center w-full space-x-2 px-4 py-2 ring-vxvue",
195
192
  e.show ? "rounded-t" : "rounded-sm",
196
193
  e.disabled ? "bg-slate-300 text-slate-700" : "bg-vxvue hover:bg-vxvue-600 text-white",
197
- A(l).class
194
+ L(s).class
198
195
  ]),
199
196
  disabled: e.disabled,
200
197
  "aria-expanded": e.show,
201
- "aria-controls": "ap-" + A(s),
198
+ "aria-controls": "ap-" + L(r),
202
199
  tabindex: "0",
203
- onClick: f[0] || (f[0] = (x) => n("select")),
200
+ onClick: f[0] || (f[0] = (b) => a("select")),
204
201
  onKeydown: o
205
202
  }, [
206
- e.disabled ? (c(), Z(A(pe), {
203
+ e.disabled ? (d(), H(L(ye), {
207
204
  key: 0,
208
205
  class: "size-5"
209
- })) : (c(), Z(A(oe), {
206
+ })) : (d(), H(L(ie), {
210
207
  key: 1,
211
- class: C(["size-5 transform-gpu transition-transform duration-300", { "rotate-90": e.show }])
208
+ class: S(["size-5 transform-gpu transition-transform duration-300", { "rotate-90": e.show }])
212
209
  }, null, 8, ["class"])),
213
- v("span", null, [
214
- L(d.$slots, "header")
210
+ c("span", null, [
211
+ T(i.$slots, "header")
215
212
  ])
216
- ], 42, je),
217
- v("div", {
218
- id: "ap-" + A(s),
219
- class: C(["grid transition-[grid-template-rows] duration-300 ease-in-out", e.show && !e.disabled ? "grid-rows-1" : "grid-rows-[repeat(1,minmax(0,0fr))]"]),
220
- "aria-labelledby": "ap-control-" + A(s)
213
+ ], 42, We),
214
+ c("div", {
215
+ id: "ap-" + L(r),
216
+ class: S(["grid transition-[grid-template-rows] duration-300 ease-in-out", e.show && !e.disabled ? "grid-rows-1" : "grid-rows-[repeat(1,minmax(0,0fr))]"]),
217
+ "aria-labelledby": "ap-control-" + L(r)
221
218
  }, [
222
- v("div", Re, [
223
- L(d.$slots, "default")
219
+ c("div", Ke, [
220
+ T(i.$slots, "default")
224
221
  ])
225
- ], 10, Ye)
222
+ ], 10, qe)
226
223
  ]));
227
224
  }
228
- }), He = ["viewBox"], Ze = ["cx", "cy", "r", "stroke-width"], We = ["cx", "cy", "r", "stroke-width", "stroke-dasharray"], ke = {
225
+ }), Xe = ["viewBox"], Ge = ["cx", "cy", "r", "stroke-width"], Je = ["cx", "cy", "r", "stroke-width", "stroke-dasharray"], Ce = {
229
226
  __name: "Spinner",
230
227
  props: { radius: { type: Number, default: 10 }, strokeWidth: { type: Number, default: 4 } },
231
228
  setup(e) {
232
- const u = e, t = B(() => u.radius + u.strokeWidth / 2), n = B(() => u.radius * 2 + u.strokeWidth), a = B(() => u.radius * Math.PI / 1.5);
233
- return (l, i) => (c(), m("svg", {
229
+ const u = e, t = I(() => u.radius + u.strokeWidth / 2), a = I(() => u.radius * 2 + u.strokeWidth), l = I(() => u.radius * Math.PI / 1.5);
230
+ return (s, v) => (d(), m("svg", {
234
231
  class: "animate-spin",
235
232
  xmlns: "http://www.w3.org/2000/svg",
236
233
  fill: "none",
237
- viewBox: "0 0 " + n.value + " " + n.value,
234
+ viewBox: "0 0 " + a.value + " " + a.value,
238
235
  role: "progressbar"
239
236
  }, [
240
- v("circle", {
237
+ c("circle", {
241
238
  class: "opacity-35",
242
239
  cx: t.value,
243
240
  cy: t.value,
244
241
  r: e.radius,
245
242
  stroke: "currentColor",
246
243
  "stroke-width": e.strokeWidth
247
- }, null, 8, Ze),
248
- v("circle", {
244
+ }, null, 8, Ge),
245
+ c("circle", {
249
246
  cx: t.value,
250
247
  cy: t.value,
251
248
  r: e.radius,
252
249
  stroke: "currentColor",
253
250
  "stroke-width": e.strokeWidth,
254
- "stroke-dasharray": a.value + " " + e.radius * 100,
251
+ "stroke-dasharray": l.value + " " + e.radius * 100,
255
252
  "stroke-linecap": "round"
256
- }, null, 8, We)
257
- ], 8, He));
253
+ }, null, 8, Je)
254
+ ], 8, Xe));
258
255
  }
259
- };
260
- function qe(e) {
261
- return De() ? (Ae(e), !0) : !1;
256
+ }, Me = (e, u) => {
257
+ const t = e.__vccOpts || e;
258
+ for (const [a, l] of u)
259
+ t[a] = l;
260
+ return t;
261
+ }, Qe = {
262
+ __name: "VxVueTransition",
263
+ props: { name: { type: String, required: !0, validator: (e) => ["appear", "vert-fade", "fade"].includes(e) } },
264
+ setup(e) {
265
+ return (u, t) => (d(), H(Ve, { name: e.name }, {
266
+ default: ee(() => [
267
+ T(u.$slots, "default", {}, void 0, !0)
268
+ ]),
269
+ _: 3
270
+ }, 8, ["name"]));
271
+ }
272
+ }, de = /* @__PURE__ */ Me(Qe, [["__scopeId", "data-v-f6b1631e"]]);
273
+ function et(e) {
274
+ return ze() ? (Pe(e), !0) : !1;
262
275
  }
263
- const $e = typeof window < "u" && typeof document < "u";
276
+ const De = typeof window < "u" && typeof document < "u";
264
277
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
265
- const Ue = Object.prototype.toString, Ke = (e) => Ue.call(e) === "[object Object]", le = () => {
266
- }, Xe = /* @__PURE__ */ Ge();
267
- function Ge() {
278
+ const tt = Object.prototype.toString, lt = (e) => tt.call(e) === "[object Object]", ne = () => {
279
+ }, at = /* @__PURE__ */ st();
280
+ function st() {
268
281
  var e, u;
269
- return $e && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((u = window == null ? void 0 : window.navigator) == null ? void 0 : u.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
282
+ return De && ((e = window?.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((u = window?.navigator) == null ? void 0 : u.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
270
283
  }
271
- function ce(e) {
284
+ function pe(e) {
272
285
  return Array.isArray(e) ? e : [e];
273
286
  }
274
- const Je = /[YMDHhms]o|\[([^\]]+)\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|z{1,4}|SSS/g;
275
- function Qe(e, u, t, n) {
276
- let a = e < 12 ? "AM" : "PM";
277
- return n && (a = a.split("").reduce((l, i) => l += `${i}.`, "")), t ? a.toLowerCase() : a;
287
+ const nt = /[YMDHhms]o|\[([^\]]+)\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|z{1,4}|SSS/g;
288
+ function ot(e, u, t, a) {
289
+ let l = e < 12 ? "AM" : "PM";
290
+ return a && (l = l.split("").reduce((s, v) => s += `${v}.`, "")), t ? l.toLowerCase() : l;
278
291
  }
279
- function ee(e) {
292
+ function se(e) {
280
293
  const u = ["th", "st", "nd", "rd"], t = e % 100;
281
294
  return e + (u[(t - 20) % 10] || u[t] || u[0]);
282
295
  }
283
- function xe(e, u, t = {}) {
284
- var n;
285
- const a = e.getFullYear(), l = e.getMonth(), i = e.getDate(), s = e.getHours(), o = e.getMinutes(), r = e.getSeconds(), d = e.getMilliseconds(), f = e.getDay(), x = (n = t.customMeridiem) != null ? n : Qe, y = (T) => {
286
- var p;
287
- return (p = T.split(" ")[1]) != null ? p : "";
288
- }, b = {
289
- Yo: () => ee(a),
290
- YY: () => String(a).slice(-2),
291
- YYYY: () => a,
292
- M: () => l + 1,
293
- Mo: () => ee(l + 1),
294
- MM: () => `${l + 1}`.padStart(2, "0"),
295
- MMM: () => e.toLocaleDateString(E(t.locales), { month: "short" }),
296
- MMMM: () => e.toLocaleDateString(E(t.locales), { month: "long" }),
297
- D: () => String(i),
298
- Do: () => ee(i),
299
- DD: () => `${i}`.padStart(2, "0"),
300
- H: () => String(s),
301
- Ho: () => ee(s),
302
- HH: () => `${s}`.padStart(2, "0"),
303
- h: () => `${s % 12 || 12}`.padStart(1, "0"),
304
- ho: () => ee(s % 12 || 12),
305
- hh: () => `${s % 12 || 12}`.padStart(2, "0"),
296
+ function ke(e, u, t = {}) {
297
+ var a;
298
+ const l = e.getFullYear(), s = e.getMonth(), v = e.getDate(), r = e.getHours(), o = e.getMinutes(), n = e.getSeconds(), i = e.getMilliseconds(), f = e.getDay(), b = (a = t.customMeridiem) != null ? a : ot, w = (M) => {
299
+ var y;
300
+ return (y = M.split(" ")[1]) != null ? y : "";
301
+ }, g = {
302
+ Yo: () => se(l),
303
+ YY: () => String(l).slice(-2),
304
+ YYYY: () => l,
305
+ M: () => s + 1,
306
+ Mo: () => se(s + 1),
307
+ MM: () => `${s + 1}`.padStart(2, "0"),
308
+ MMM: () => e.toLocaleDateString(F(t.locales), { month: "short" }),
309
+ MMMM: () => e.toLocaleDateString(F(t.locales), { month: "long" }),
310
+ D: () => String(v),
311
+ Do: () => se(v),
312
+ DD: () => `${v}`.padStart(2, "0"),
313
+ H: () => String(r),
314
+ Ho: () => se(r),
315
+ HH: () => `${r}`.padStart(2, "0"),
316
+ h: () => `${r % 12 || 12}`.padStart(1, "0"),
317
+ ho: () => se(r % 12 || 12),
318
+ hh: () => `${r % 12 || 12}`.padStart(2, "0"),
306
319
  m: () => String(o),
307
- mo: () => ee(o),
320
+ mo: () => se(o),
308
321
  mm: () => `${o}`.padStart(2, "0"),
309
- s: () => String(r),
310
- so: () => ee(r),
311
- ss: () => `${r}`.padStart(2, "0"),
312
- SSS: () => `${d}`.padStart(3, "0"),
322
+ s: () => String(n),
323
+ so: () => se(n),
324
+ ss: () => `${n}`.padStart(2, "0"),
325
+ SSS: () => `${i}`.padStart(3, "0"),
313
326
  d: () => f,
314
- dd: () => e.toLocaleDateString(E(t.locales), { weekday: "narrow" }),
315
- ddd: () => e.toLocaleDateString(E(t.locales), { weekday: "short" }),
316
- dddd: () => e.toLocaleDateString(E(t.locales), { weekday: "long" }),
317
- A: () => x(s, o),
318
- AA: () => x(s, o, !1, !0),
319
- a: () => x(s, o, !0),
320
- aa: () => x(s, o, !0, !0),
321
- z: () => y(e.toLocaleDateString(E(t.locales), { timeZoneName: "shortOffset" })),
322
- zz: () => y(e.toLocaleDateString(E(t.locales), { timeZoneName: "shortOffset" })),
323
- zzz: () => y(e.toLocaleDateString(E(t.locales), { timeZoneName: "shortOffset" })),
324
- zzzz: () => y(e.toLocaleDateString(E(t.locales), { timeZoneName: "longOffset" }))
327
+ dd: () => e.toLocaleDateString(F(t.locales), { weekday: "narrow" }),
328
+ ddd: () => e.toLocaleDateString(F(t.locales), { weekday: "short" }),
329
+ dddd: () => e.toLocaleDateString(F(t.locales), { weekday: "long" }),
330
+ A: () => b(r, o),
331
+ AA: () => b(r, o, !1, !0),
332
+ a: () => b(r, o, !0),
333
+ aa: () => b(r, o, !0, !0),
334
+ z: () => w(e.toLocaleDateString(F(t.locales), { timeZoneName: "shortOffset" })),
335
+ zz: () => w(e.toLocaleDateString(F(t.locales), { timeZoneName: "shortOffset" })),
336
+ zzz: () => w(e.toLocaleDateString(F(t.locales), { timeZoneName: "shortOffset" })),
337
+ zzzz: () => w(e.toLocaleDateString(F(t.locales), { timeZoneName: "longOffset" }))
325
338
  };
326
- return u.replace(Je, (T, p) => {
327
- var k, D;
328
- return (D = p ?? ((k = b[T]) == null ? void 0 : k.call(b))) != null ? D : T;
339
+ return u.replace(nt, (M, y) => {
340
+ var C, V;
341
+ return (V = y ?? ((C = g[M]) == null ? void 0 : C.call(g))) != null ? V : M;
329
342
  });
330
343
  }
331
- function et(e, u, t) {
344
+ function rt(e, u, t) {
332
345
  return X(
333
346
  e,
334
347
  u,
@@ -338,136 +351,138 @@ function et(e, u, t) {
338
351
  }
339
352
  );
340
353
  }
341
- const Se = $e ? window : void 0;
342
- function ne(e) {
354
+ const Ae = De ? window : void 0;
355
+ function ue(e) {
343
356
  var u;
344
- const t = E(e);
345
- return (u = t == null ? void 0 : t.$el) != null ? u : t;
357
+ const t = F(e);
358
+ return (u = t?.$el) != null ? u : t;
346
359
  }
347
- function ve(...e) {
360
+ function ge(...e) {
348
361
  const u = [], t = () => {
349
- u.forEach((s) => s()), u.length = 0;
350
- }, n = (s, o, r, d) => (s.addEventListener(o, r, d), () => s.removeEventListener(o, r, d)), a = B(() => {
351
- const s = ce(E(e[0])).filter((o) => o != null);
352
- return s.every((o) => typeof o != "string") ? s : void 0;
353
- }), l = et(
362
+ u.forEach((r) => r()), u.length = 0;
363
+ }, a = (r, o, n, i) => (r.addEventListener(o, n, i), () => r.removeEventListener(o, n, i)), l = I(() => {
364
+ const r = pe(F(e[0])).filter((o) => o != null);
365
+ return r.every((o) => typeof o != "string") ? r : void 0;
366
+ }), s = rt(
354
367
  () => {
355
- var s, o;
368
+ var r, o;
356
369
  return [
357
- (o = (s = a.value) == null ? void 0 : s.map((r) => ne(r))) != null ? o : [Se].filter((r) => r != null),
358
- ce(E(a.value ? e[1] : e[0])),
359
- ce(A(a.value ? e[2] : e[1])),
370
+ (o = (r = l.value) == null ? void 0 : r.map((n) => ue(n))) != null ? o : [Ae].filter((n) => n != null),
371
+ pe(F(l.value ? e[1] : e[0])),
372
+ pe(L(l.value ? e[2] : e[1])),
360
373
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
361
- E(a.value ? e[3] : e[2])
374
+ F(l.value ? e[3] : e[2])
362
375
  ];
363
376
  },
364
- ([s, o, r, d]) => {
365
- if (t(), !(s != null && s.length) || !(o != null && o.length) || !(r != null && r.length))
377
+ ([r, o, n, i]) => {
378
+ if (t(), !r?.length || !o?.length || !n?.length)
366
379
  return;
367
- const f = Ke(d) ? { ...d } : d;
380
+ const f = lt(i) ? { ...i } : i;
368
381
  u.push(
369
- ...s.flatMap(
370
- (x) => o.flatMap(
371
- (y) => r.map((b) => n(x, y, b, f))
382
+ ...r.flatMap(
383
+ (b) => o.flatMap(
384
+ (w) => n.map((g) => a(b, w, g, f))
372
385
  )
373
386
  )
374
387
  );
375
388
  },
376
389
  { flush: "post" }
377
- ), i = () => {
378
- l(), t();
390
+ ), v = () => {
391
+ s(), t();
379
392
  };
380
- return qe(t), i;
393
+ return et(t), v;
381
394
  }
382
- let ye = !1;
383
- function ge(e, u, t = {}) {
384
- const { window: n = Se, ignore: a = [], capture: l = !0, detectIframe: i = !1, controls: s = !1 } = t;
385
- if (!n)
386
- return s ? { stop: le, cancel: le, trigger: le } : le;
387
- if (Xe && !ye) {
388
- ye = !0;
389
- const p = { passive: !0 };
390
- Array.from(n.document.body.children).forEach((k) => k.addEventListener("click", le, p)), n.document.documentElement.addEventListener("click", le, p);
395
+ let $e = !1;
396
+ function we(e, u, t = {}) {
397
+ const { window: a = Ae, ignore: l = [], capture: s = !0, detectIframe: v = !1, controls: r = !1 } = t;
398
+ if (!a)
399
+ return r ? { stop: ne, cancel: ne, trigger: ne } : ne;
400
+ if (at && !$e) {
401
+ $e = !0;
402
+ const y = { passive: !0 };
403
+ Array.from(a.document.body.children).forEach((C) => C.addEventListener("click", ne, y)), a.document.documentElement.addEventListener("click", ne, y);
391
404
  }
392
405
  let o = !0;
393
- const r = (p) => E(a).some((k) => {
394
- if (typeof k == "string")
395
- return Array.from(n.document.querySelectorAll(k)).some((D) => D === p.target || p.composedPath().includes(D));
406
+ const n = (y) => F(l).some((C) => {
407
+ if (typeof C == "string")
408
+ return Array.from(a.document.querySelectorAll(C)).some((V) => V === y.target || y.composedPath().includes(V));
396
409
  {
397
- const D = ne(k);
398
- return D && (p.target === D || p.composedPath().includes(D));
410
+ const V = ue(C);
411
+ return V && (y.target === V || y.composedPath().includes(V));
399
412
  }
400
413
  });
401
- function d(p) {
402
- const k = E(p);
403
- return k && k.$.subTree.shapeFlag === 16;
414
+ function i(y) {
415
+ const C = F(y);
416
+ return C && C.$.subTree.shapeFlag === 16;
404
417
  }
405
- function f(p, k) {
406
- const D = E(p), W = D.$.subTree && D.$.subTree.children;
407
- return W == null || !Array.isArray(W) ? !1 : W.some((H) => H.el === k.target || k.composedPath().includes(H.el));
418
+ function f(y, C) {
419
+ const V = F(y), E = V.$.subTree && V.$.subTree.children;
420
+ return E == null || !Array.isArray(E) ? !1 : E.some((G) => G.el === C.target || C.composedPath().includes(G.el));
408
421
  }
409
- const x = (p) => {
410
- const k = ne(e);
411
- if (p.target != null && !(!(k instanceof Element) && d(e) && f(e, p)) && !(!k || k === p.target || p.composedPath().includes(k))) {
412
- if ("detail" in p && p.detail === 0 && (o = !r(p)), !o) {
422
+ const b = (y) => {
423
+ const C = ue(e);
424
+ if (y.target != null && !(!(C instanceof Element) && i(e) && f(e, y)) && !(!C || C === y.target || y.composedPath().includes(C))) {
425
+ if ("detail" in y && y.detail === 0 && (o = !n(y)), !o) {
413
426
  o = !0;
414
427
  return;
415
428
  }
416
- u(p);
429
+ u(y);
417
430
  }
418
431
  };
419
- let y = !1;
420
- const b = [
421
- ve(n, "click", (p) => {
422
- y || (y = !0, setTimeout(() => {
423
- y = !1;
424
- }, 0), x(p));
425
- }, { passive: !0, capture: l }),
426
- ve(n, "pointerdown", (p) => {
427
- const k = ne(e);
428
- o = !r(p) && !!(k && !p.composedPath().includes(k));
432
+ let w = !1;
433
+ const g = [
434
+ ge(a, "click", (y) => {
435
+ w || (w = !0, setTimeout(() => {
436
+ w = !1;
437
+ }, 0), b(y));
438
+ }, { passive: !0, capture: s }),
439
+ ge(a, "pointerdown", (y) => {
440
+ const C = ue(e);
441
+ o = !n(y) && !!(C && !y.composedPath().includes(C));
429
442
  }, { passive: !0 }),
430
- i && ve(n, "blur", (p) => {
443
+ v && ge(a, "blur", (y) => {
431
444
  setTimeout(() => {
432
- var k;
433
- const D = ne(e);
434
- ((k = n.document.activeElement) == null ? void 0 : k.tagName) === "IFRAME" && !(D != null && D.contains(n.document.activeElement)) && u(p);
445
+ var C;
446
+ const V = ue(e);
447
+ ((C = a.document.activeElement) == null ? void 0 : C.tagName) === "IFRAME" && !V?.contains(a.document.activeElement) && u(y);
435
448
  }, 0);
436
449
  }, { passive: !0 })
437
- ].filter(Boolean), T = () => b.forEach((p) => p());
438
- return s ? {
439
- stop: T,
450
+ ].filter(Boolean), M = () => g.forEach((y) => y());
451
+ return r ? {
452
+ stop: M,
440
453
  cancel: () => {
441
454
  o = !1;
442
455
  },
443
- trigger: (p) => {
444
- o = !0, x(p), o = !1;
456
+ trigger: (y) => {
457
+ o = !0, b(y), o = !1;
445
458
  }
446
- } : T;
459
+ } : M;
447
460
  }
448
- const tt = ["value", "onKeydown"], lt = { class: "flex absolute inset-y-0 right-0 items-center pr-3 text-vxvue-700" }, at = ["data-result-index"], $l = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
461
+ const ut = ["value", "onKeydown"], it = { class: "flex absolute inset-y-0 right-0 items-center pr-3 text-vxvue-700" }, dt = ["data-result-index"], Dl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
449
462
  __name: "Autocomplete",
450
- props: {
451
- modelValue: { type: String, default: "" },
463
+ props: /* @__PURE__ */ Z({
452
464
  search: { type: Function, required: !0 },
453
465
  resultListClass: { type: String, default: "result-list" },
454
466
  resultItemClass: { type: String, default: "result-list-item" },
455
467
  getResultValue: { type: Function, default: (e) => e },
456
468
  autoSelect: Boolean
457
- },
458
- emits: ["update:modelValue", "blur-sm", "submit"],
469
+ }, {
470
+ modelValue: { type: String, default: "" },
471
+ modelModifiers: {}
472
+ }),
473
+ emits: /* @__PURE__ */ Z(["blur-sm", "submit"], ["update:modelValue"]),
459
474
  setup(e, { emit: u }) {
460
- const t = u, n = e, a = K(), i = (/* @__PURE__ */ (() => {
461
- let V = 0;
462
- return (z) => (z || "") + ++V;
463
- })())((a.id || "autocomplete") + "-"), s = $([]), o = $(-1), r = $(0), d = $(!1), f = $(!1), x = $("top-0 translate-y-12"), y = $(!0), b = $(null), T = $(null), p = $(null), k = B(
464
- () => s.value.map((V, z) => ({
465
- id: (a.id || "autocomplete") + "-item-" + z,
466
- class: [n.resultItemClass, { "bg-vxvue-700 text-white": o.value === z }],
475
+ const t = u, a = e, l = te(e, "modelValue"), s = K(), r = (/* @__PURE__ */ (() => {
476
+ let A = 0;
477
+ return (z) => (z || "") + ++A;
478
+ })())((s.id || "autocomplete") + "-"), o = k([]), n = k(-1), i = k(0), f = k(!1), b = k(!1), w = k("top-0 translate-y-12"), g = k(!0), M = k(null), y = k(null), C = k(null), V = I(
479
+ () => o.value.map((A, z) => ({
480
+ id: (s.id || "autocomplete") + "-item-" + z,
481
+ class: [a.resultItemClass, { "bg-vxvue-700 text-white": n.value === z }],
467
482
  role: "option",
468
- ...o.value === z ? { "aria-selected": "true" } : {}
483
+ ...n.value === z ? { "aria-selected": "true" } : {}
469
484
  }))
470
- ), D = B(() => ({
485
+ ), E = I(() => ({
471
486
  role: "combobox",
472
487
  autocomplete: "off",
473
488
  autocapitalize: "off",
@@ -475,130 +490,118 @@ const tt = ["value", "onKeydown"], lt = { class: "flex absolute inset-y-0 right-
475
490
  spellcheck: "false",
476
491
  "aria-autocomplete": "list",
477
492
  "aria-haspopup": "listbox",
478
- "aria-owns": i,
479
- "aria-expanded": d.value ? "true" : "false",
480
- "aria-activedescendant": o.value > -1 ? k.value[o.value].id : "",
481
- ...a
482
- })), W = B(() => ({
483
- id: i,
484
- class: ["absolute min-w-full transform z-[var(--zIndex-dropdown)]", n.resultListClass, x.value],
493
+ "aria-owns": r,
494
+ "aria-expanded": f.value ? "true" : "false",
495
+ "aria-activedescendant": n.value > -1 ? V.value[n.value].id : "",
496
+ ...s
497
+ })), G = I(() => ({
498
+ id: r,
499
+ class: ["absolute min-w-full transform z-[var(--zIndex-dropdown)]", a.resultListClass, w.value],
485
500
  role: "listbox"
486
- })), H = () => {
487
- o.value = -1, s.value = [], d.value = !1, y.value = !0;
488
- }, S = (V) => {
489
- const z = n.search(V);
501
+ })), q = () => {
502
+ n.value = -1, o.value = [], f.value = !1, g.value = !0;
503
+ }, $ = (A) => {
504
+ const z = a.search(A);
490
505
  if (z instanceof Promise) {
491
- const G = ++r.value;
492
- f.value = !0, z.then((U) => {
493
- G === r.value && (s.value = U, f.value = !1, s.value.length ? (o.value = n.autoSelect ? 0 : -1, d.value = !0) : H());
506
+ const J = ++i.value;
507
+ b.value = !0, z.then((W) => {
508
+ J === i.value && (o.value = W, b.value = !1, o.value.length ? (n.value = a.autoSelect ? 0 : -1, f.value = !0) : q());
494
509
  });
495
510
  } else
496
- s.value = z, s.value.length === 0 ? H() : (o.value = n.autoSelect ? 0 : -1, d.value = !0);
497
- }, M = () => {
498
- const V = s.value[o.value];
499
- return V && t("update:modelValue", n.getResultValue(V)), H(), V;
500
- }, F = (V) => {
501
- t("update:modelValue", V), S(V);
502
- }, h = (V) => S(V.target.value), g = () => {
503
- H(), t("blur-sm");
504
- }, w = () => {
505
- const V = s.value.length;
506
- o.value = ((o.value - 1) % V + V) % V;
507
- }, N = (V) => {
508
- d.value || h(V);
509
- const z = s.value.length;
510
- o.value = ((o.value + 1) % z + z) % z;
511
- }, q = () => {
512
- H(), t("update:modelValue", "");
513
- }, ae = () => t("submit", M()), Q = (V) => {
514
- const z = V.target.closest("[data-result-index]");
515
- z && (o.value = parseInt(z.dataset.resultIndex, 10), t("submit", M()));
511
+ o.value = z, o.value.length === 0 ? q() : (n.value = a.autoSelect ? 0 : -1, f.value = !0);
512
+ }, D = () => {
513
+ const A = o.value[n.value];
514
+ return A && (l.value = a.getResultValue(A)), q(), A;
515
+ }, p = (A) => {
516
+ l.value = A, $(A);
517
+ }, h = (A) => $(A.target.value), x = () => {
518
+ q(), t("blur-sm");
519
+ }, N = () => {
520
+ const A = o.value.length;
521
+ n.value = ((n.value - 1) % A + A) % A;
522
+ }, U = (A) => {
523
+ f.value || h(A);
524
+ const z = o.value.length;
525
+ n.value = ((n.value + 1) % z + z) % z;
526
+ }, oe = () => {
527
+ q(), l.value = "";
528
+ }, ae = () => t("submit", D()), he = (A) => {
529
+ const z = A.target.closest("[data-result-index]");
530
+ z && (n.value = parseInt(z.dataset.resultIndex, 10), t("submit", D()));
516
531
  };
517
- return ge(p, H), Le(() => {
518
- if (b.value) {
519
- const V = T.value.getBoundingClientRect(), z = b.value.getBoundingClientRect();
520
- y.value && s.value.length && (y.value = !1, x.value = V.bottom + z.height > window.innerHeight && window.innerHeight - V.bottom < V.top && window.pageYOffset + V.top - z.height > 0 ? "bottom-0 -translate-y-12" : "top-0 translate-y-12");
521
- const G = b.value.querySelector('[data-result-index="' + o.value + '"]');
522
- if (G) {
523
- let U = G.getBoundingClientRect();
524
- U.top < z.top ? b.value.scrollTop -= z.top - U.top : U.bottom > z.bottom && (b.value.scrollTop += U.bottom - z.bottom);
532
+ return we(C, q), Be(() => {
533
+ if (M.value) {
534
+ const A = y.value.getBoundingClientRect(), z = M.value.getBoundingClientRect();
535
+ g.value && o.value.length && (g.value = !1, w.value = A.bottom + z.height > window.innerHeight && window.innerHeight - A.bottom < A.top && window.pageYOffset + A.top - z.height > 0 ? "bottom-0 -translate-y-12" : "top-0 translate-y-12");
536
+ const J = M.value.querySelector('[data-result-index="' + n.value + '"]');
537
+ if (J) {
538
+ let W = J.getBoundingClientRect();
539
+ W.top < z.top ? M.value.scrollTop -= z.top - W.top : W.bottom > z.bottom && (M.value.scrollTop += W.bottom - z.bottom);
525
540
  }
526
541
  }
527
- }), (V, z) => (c(), m("div", {
542
+ }), (A, z) => (d(), m("div", {
528
543
  ref_key: "container",
529
- ref: p,
530
- class: C(["inline-block relative", V.$attrs.class])
544
+ ref: C,
545
+ class: S(["inline-block relative", A.$attrs.class])
531
546
  }, [
532
- v("input", R({
547
+ c("input", R({
533
548
  ref_key: "input",
534
- ref: T,
549
+ ref: y,
535
550
  class: "block pr-10 w-full form-input focus:border-vxvue",
536
- value: e.modelValue
537
- }, D.value, {
538
- onInput: z[0] || (z[0] = (G) => F(G.target.value)),
551
+ value: l.value
552
+ }, E.value, {
553
+ onInput: z[0] || (z[0] = (J) => p(J.target.value)),
539
554
  onKeydown: [
540
- se(ae, ["enter"]),
541
- se(q, ["esc"]),
542
- se(M, ["tab"]),
543
- se(_(w, ["prevent"]), ["up"]),
544
- se(_(N, ["prevent"]), ["down"])
555
+ re(ae, ["enter"]),
556
+ re(oe, ["esc"]),
557
+ re(D, ["tab"]),
558
+ re(j(N, ["prevent"]), ["up"]),
559
+ re(j(U, ["prevent"]), ["down"])
545
560
  ],
546
561
  onFocus: h,
547
- onBlur: g
548
- }), null, 16, tt),
549
- v("span", lt, [
550
- f.value ? (c(), Z(ke, {
562
+ onBlur: x
563
+ }), null, 16, ut),
564
+ c("span", it, [
565
+ b.value ? (d(), H(Ce, {
551
566
  key: 0,
552
567
  class: "size-5"
553
- })) : I("", !0)
568
+ })) : B("", !0)
554
569
  ]),
555
- s.value.length ? (c(), m("div", R({
556
- key: 0,
557
- ref_key: "resultList",
558
- ref: b
559
- }, W.value, {
560
- onClick: Q,
561
- onMousedown: z[1] || (z[1] = _(() => {
562
- }, ["prevent"]))
563
- }), [
564
- (c(!0), m(O, null, j(s.value, (G, U) => (c(), m("div", { "data-result-index": U }, [
565
- L(V.$slots, "result", {
566
- result: G,
567
- props: k.value[U]
568
- }, () => [
569
- (c(), m("div", R({
570
- key: k.value[U].id,
571
- ref_for: !0
572
- }, k.value[U]), P(e.getResultValue(G)), 17))
573
- ])
574
- ], 8, at))), 256))
575
- ], 16)) : I("", !0)
570
+ _(de, { name: "fade" }, {
571
+ default: ee(() => [
572
+ o.value.length ? (d(), m("div", R({
573
+ key: 0,
574
+ ref_key: "resultList",
575
+ ref: M
576
+ }, G.value, {
577
+ onClick: he,
578
+ onMousedown: z[1] || (z[1] = j(() => {
579
+ }, ["prevent"]))
580
+ }), [
581
+ (d(!0), m(O, null, Y(o.value, (J, W) => (d(), m("div", { "data-result-index": W }, [
582
+ T(A.$slots, "result", {
583
+ result: J,
584
+ props: V.value[W]
585
+ }, () => [
586
+ (d(), m("div", R({
587
+ key: V.value[W].id
588
+ }, { ref_for: !0 }, V.value[W]), P(e.getResultValue(J)), 17))
589
+ ])
590
+ ], 8, dt))), 256))
591
+ ], 16)) : B("", !0)
592
+ ]),
593
+ _: 3
594
+ })
576
595
  ], 2));
577
596
  }
578
- }), Ce = (e, u) => {
579
- const t = e.__vccOpts || e;
580
- for (const [n, a] of u)
581
- t[n] = a;
582
- return t;
583
- }, st = {
584
- __name: "VxVueTransition",
585
- props: { name: { type: String, required: !0, validator: (e) => ["appear", "vert-fade"].includes(e) } },
586
- setup(e) {
587
- return (u, t) => (c(), Z(Te, { name: e.name }, {
588
- default: te(() => [
589
- L(u.$slots, "default", {}, void 0, !0)
590
- ]),
591
- _: 3
592
- }, 8, ["name"]));
593
- }
594
- }, be = /* @__PURE__ */ Ce(st, [["__scopeId", "data-v-edc3641f"]]), nt = {
597
+ }), ct = {
595
598
  key: 0,
596
599
  class: "fixed inset-0 z-[calc(var(--zIndex-confirm)-1)] bg-black/50 backdrop-blur-xs",
597
600
  "aria-hidden": "true"
598
- }, ot = {
601
+ }, vt = {
599
602
  key: 0,
600
603
  class: "overflow-y-auto fixed inset-0 z-[var(--zIndex-confirm)]"
601
- }, rt = { class: "flex justify-center items-center min-h-screen text-center sm:block sm:p-0" }, ut = { key: 0 }, it = { class: "inline-block overflow-hidden text-left align-bottom bg-white rounded-sm shadow-xl transition-all transform sm:my-8 sm:w-full sm:max-w-sm sm:align-middle lg:max-w-lg" }, dt = { class: "px-4 pb-4 mt-4 sm:px-6 sm:pb-6 sm:mt-5" }, ct = { class: "flex flex-row items-center" }, vt = { class: "shrink-0" }, mt = { class: "grow text-center" }, ft = ["onClick"], Sl = {
604
+ }, ft = { class: "flex justify-center items-center min-h-screen text-center sm:block sm:p-0" }, mt = { key: 0 }, ht = { class: "inline-block text-left align-bottom bg-white rounded-sm shadow-xl transition-all transform sm:my-8 sm:w-full sm:max-w-sm sm:align-middle lg:max-w-lg" }, pt = { class: "px-4 pb-4 mt-4 sm:px-6 sm:pb-6 sm:mt-5" }, gt = { class: "flex flex-row items-center" }, bt = { class: "shrink-0" }, xt = { class: "grow text-center" }, yt = ["onClick"], Al = {
602
605
  __name: "Confirm",
603
606
  props: {
604
607
  buttons: {
@@ -616,161 +619,159 @@ const tt = ["value", "onKeydown"], lt = { class: "flex absolute inset-y-0 right-
616
619
  }
617
620
  },
618
621
  setup(e, { expose: u }) {
619
- const t = e, n = $(""), a = $(""), l = $(!1);
620
- let i = null, s = null;
621
- const o = B(() => Array.isArray(t.buttons) ? t.buttons : [t.buttons]), r = $(null), d = (x, y) => {
622
- l.value = !1, x.value !== void 0 ? x.value ? i() : s() : y ? s() : i();
622
+ const t = e, a = k(""), l = k(""), s = k(!1);
623
+ let v = null, r = null;
624
+ const o = I(() => Array.isArray(t.buttons) ? t.buttons : [t.buttons]), n = k(null), i = (b, w) => {
625
+ s.value = !1, b.value !== void 0 ? b.value ? v() : r() : w ? r() : v();
623
626
  };
624
- return u({ open: (x, y) => (n.value = x, a.value = y, l.value = !0, fe(() => r.value.firstElementChild.focus()), new Promise((b, T) => {
625
- i = b, s = T;
626
- })) }), (x, y) => (c(), m(O, null, [
627
- l.value ? (c(), m("div", nt)) : I("", !0),
628
- Y(be, { name: "appear" }, {
629
- default: te(() => [
630
- l.value ? (c(), m("div", ot, [
631
- v("div", rt, [
632
- l.value ? (c(), m("div", ut, [
633
- y[0] || (y[0] = v("span", {
627
+ return u({ open: (b, w) => (a.value = b, l.value = w, s.value = !0, be(() => n.value.firstElementChild.focus()), new Promise((g, M) => {
628
+ v = g, r = M;
629
+ })) }), (b, w) => (d(), m(O, null, [
630
+ s.value ? (d(), m("div", ct)) : B("", !0),
631
+ _(de, { name: "appear" }, {
632
+ default: ee(() => [
633
+ s.value ? (d(), m("div", vt, [
634
+ c("div", ft, [
635
+ s.value ? (d(), m("div", mt, [
636
+ w[0] || (w[0] = c("span", {
634
637
  class: "hidden sm:inline-block sm:h-screen sm:align-middle",
635
638
  "aria-hidden": "true"
636
639
  }, "​", -1)),
637
- v("div", it, [
638
- n.value || x.$slots.title ? (c(), m("h3", {
640
+ c("div", ht, [
641
+ a.value || b.$slots.title ? (d(), m("h3", {
639
642
  key: 0,
640
- class: C(["py-4 pt-4 text-lg font-medium text-center sm:py-6", e.headerClass])
643
+ class: S(["py-4 pt-4 rounded-t-sm text-lg font-medium text-center sm:py-6", e.headerClass])
641
644
  }, [
642
- L(x.$slots, "title", { title: n.value }, () => [
643
- J(P(n.value), 1)
645
+ T(b.$slots, "title", { title: a.value }, () => [
646
+ Q(P(a.value), 1)
644
647
  ])
645
- ], 2)) : I("", !0),
646
- v("div", dt, [
647
- v("div", ct, [
648
- v("div", vt, [
649
- L(x.$slots, "icon")
648
+ ], 2)) : B("", !0),
649
+ c("div", pt, [
650
+ c("div", gt, [
651
+ c("div", bt, [
652
+ T(b.$slots, "icon")
650
653
  ]),
651
- v("p", mt, [
652
- L(x.$slots, "default", { message: a.value }, () => [
653
- J(P(a.value), 1)
654
+ c("p", xt, [
655
+ T(b.$slots, "default", { message: l.value }, () => [
656
+ Q(P(l.value), 1)
654
657
  ])
655
658
  ])
656
659
  ]),
657
- v("div", {
660
+ c("div", {
658
661
  ref_key: "buttonsContainer",
659
- ref: r,
662
+ ref: n,
660
663
  class: "flex justify-center mt-5 space-x-2 sm:mt-6"
661
664
  }, [
662
- (c(!0), m(O, null, j(o.value, (b, T) => (c(), m("button", {
663
- key: b.label,
664
- class: C([e.buttonClass, b.class]),
665
- onClick: _((p) => d(b, T), ["prevent"])
666
- }, P(b.label), 11, ft))), 128))
665
+ (d(!0), m(O, null, Y(o.value, (g, M) => (d(), m("button", {
666
+ key: g.label,
667
+ class: S([e.buttonClass, g.class]),
668
+ onClick: j((y) => i(g, M), ["prevent"])
669
+ }, P(g.label), 11, yt))), 128))
667
670
  ], 512)
668
671
  ])
669
672
  ])
670
- ])) : I("", !0)
673
+ ])) : B("", !0)
671
674
  ])
672
- ])) : I("", !0)
675
+ ])) : B("", !0)
673
676
  ]),
674
677
  _: 3
675
678
  })
676
679
  ], 64));
677
680
  }
678
681
  };
679
- function ht(e, u) {
680
- const t = $(!1), n = E(u);
681
- let a, l = n.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), i = [];
682
- if ((a = n.match(/\bd\b/gi)) && a.length === 1)
683
- l = l.replace("d", "(\\d{1,2})");
684
- else if ((a = n.match(/\bdd\b/gi)) && a.length === 1)
685
- l = l.replace("dd", "(\\d{2})");
682
+ function wt(e, u) {
683
+ const t = k(!1), a = F(u);
684
+ let l, s = a.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), v = [];
685
+ if ((l = a.match(/\bd\b/gi)) && l.length === 1)
686
+ s = s.replace("d", "(\\d{1,2})");
687
+ else if ((l = a.match(/\bdd\b/gi)) && l.length === 1)
688
+ s = s.replace("dd", "(\\d{2})");
686
689
  else
687
690
  return { date: t };
688
- if (i.push({ srcPos: n.toLowerCase().indexOf("d"), destPos: 2 }), (a = n.match(/\bm\b/gi)) && a.length === 1)
689
- l = l.replace("m", "(\\d{1,2})");
690
- else if ((a = n.match(/\bmm\b/gi)) && a.length === 1)
691
- l = l.replace("mm", "(\\d{2})");
691
+ if (v.push({ srcPos: a.toLowerCase().indexOf("d"), destPos: 2 }), (l = a.match(/\bm\b/gi)) && l.length === 1)
692
+ s = s.replace("m", "(\\d{1,2})");
693
+ else if ((l = a.match(/\bmm\b/gi)) && l.length === 1)
694
+ s = s.replace("mm", "(\\d{2})");
692
695
  else
693
696
  return { date: t };
694
- if (i.push({ srcPos: n.toLowerCase().indexOf("m"), destPos: 1 }), (a = n.match(/\byyyy\b/gi)) && a.length === 1)
695
- l = l.replace("yyyy", "(\\d{4})");
697
+ if (v.push({ srcPos: a.toLowerCase().indexOf("m"), destPos: 1 }), (l = a.match(/\byyyy\b/gi)) && l.length === 1)
698
+ s = s.replace("yyyy", "(\\d{4})");
696
699
  else
697
700
  return { date: t };
698
- if (i.push({ srcPos: n.toLowerCase().indexOf("y"), destPos: 0 }), !(a = E(e).match(l)))
701
+ if (v.push({ srcPos: a.toLowerCase().indexOf("y"), destPos: 0 }), !(l = F(e).match(s)))
699
702
  return { date: t };
700
- a.shift(), i.sort((d, f) => d.srcPos < f.srcPos ? -1 : 1);
701
- let s = [], o, r;
702
- for (; o = a.shift(); )
703
- r = i.shift(), s[r.destPos] = o;
704
- return s = Date.parse(s.join("-")), s && (s = new Date(s), t.value = new Date(s.getFullYear(), s.getMonth(), s.getDate(), 0, 0, 0)), { date: t };
703
+ l.shift(), v.sort((i, f) => i.srcPos < f.srcPos ? -1 : 1);
704
+ let r = [], o, n;
705
+ for (; o = l.shift(); )
706
+ n = v.shift(), r[n.destPos] = o;
707
+ return r = Date.parse(r.join("-")), r && (r = new Date(r), t.value = new Date(r.getFullYear(), r.getMonth(), r.getDate(), 0, 0, 0)), { date: t };
705
708
  }
706
- const pt = { class: "text-vxvue-700" }, gt = ["disabled"], bt = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
709
+ const kt = { class: "text-vxvue-700" }, $t = ["disabled"], St = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
707
710
  __name: "DateInput",
708
- props: {
711
+ props: /* @__PURE__ */ Z({
709
712
  outputFormat: { type: String, default: "YYYY-MM-DD" },
710
713
  inputFormat: { type: String, default: "YYYY-MM-DD" },
711
- showToggle: { type: Boolean, default: !1 },
712
- modelValue: Date
713
- },
714
- emits: ["update:modelValue", "toggle-datepicker"],
714
+ showToggle: { type: Boolean, default: !1 }
715
+ }, {
716
+ modelValue: { type: Date, default: null },
717
+ modelModifiers: {}
718
+ }),
719
+ emits: /* @__PURE__ */ Z(["toggle-datepicker"], ["update:modelValue"]),
715
720
  setup(e, { emit: u }) {
716
- const t = u, n = e, a = $(""), l = B(() => n.modelValue ? xe(n.modelValue, n.outputFormat) : ""), i = B(() => {
717
- let s = Object.assign({}, K());
718
- return delete s.class, s;
721
+ const t = u, a = e, l = te(e, "modelValue"), s = k(""), v = I(() => l.value ? ke(l.value, a.outputFormat) : ""), r = I(() => {
722
+ let o = Object.assign({}, K());
723
+ return delete o.class, o;
719
724
  });
720
- return X(() => n.modelValue, (s) => a.value = s ? xe(s, n.outputFormat) : ""), (s, o) => (c(), m("div", {
721
- class: C(["inline-block relative", s.$attrs.class])
725
+ return X(l, (o) => s.value === o ? ke(o, a.outputFormat) : ""), (o, n) => (d(), m("div", {
726
+ class: S(["inline-block relative", o.$attrs.class])
722
727
  }, [
723
- re(v("div", null, [
724
- v("div", {
725
- class: C(["block flex items-center w-full form-input bg-vxvue-50", { "pr-10": e.showToggle }])
728
+ le(c("div", null, [
729
+ c("div", {
730
+ class: S(["block flex items-center w-full form-input bg-vxvue-50", { "pr-10": e.showToggle }])
726
731
  }, [
727
- v("span", pt, P(l.value), 1),
728
- i.value.disabled ? I("", !0) : (c(), m("button", {
732
+ c("span", kt, P(v.value), 1),
733
+ r.value.disabled ? B("", !0) : (d(), m("button", {
729
734
  key: 0,
730
735
  class: "inline-flex shrink-0 justify-center items-center ml-2 rounded-full focus:text-white focus:outline-hidden size-4 text-vxvue hover:bg-vxvue-100 hover:text-vue-700 focus:bg-vxvue-700",
731
- onClick: o[0] || (o[0] = (r) => t("update:modelValue", null))
736
+ onClick: n[0] || (n[0] = (i) => l.value = null)
732
737
  }, [
733
- Y(A(pe), { class: "size-4" })
738
+ _(L(ye), { class: "size-4" })
734
739
  ]))
735
740
  ], 2)
736
741
  ], 512), [
737
- [me, l.value]
742
+ [fe, v.value]
738
743
  ]),
739
- re(v("div", null, [
740
- re(v("input", R({
741
- "onUpdate:modelValue": o[1] || (o[1] = (r) => a.value = r),
744
+ le(c("div", null, [
745
+ le(c("input", R({
746
+ "onUpdate:modelValue": n[1] || (n[1] = (i) => s.value = i),
742
747
  type: "text",
743
748
  class: ["block w-full form-input peer focus:border-vxvue", { "pr-10": e.showToggle }]
744
- }, i.value, {
745
- onBlur: o[2] || (o[2] = (r) => {
746
- var d;
747
- return t("update:modelValue", ((d = A(ht)(a.value, n.inputFormat).date) == null ? void 0 : d.value) || null);
748
- }),
749
- onInput: o[3] || (o[3] = _(() => {
749
+ }, r.value, {
750
+ onBlur: n[2] || (n[2] = (i) => l.value = L(wt)(s.value, a.inputFormat).date?.value || null),
751
+ onInput: n[3] || (n[3] = j(() => {
750
752
  }, ["prevent"]))
751
753
  }), null, 16), [
752
- [ze, a.value]
754
+ [Ie, s.value]
753
755
  ])
754
756
  ], 512), [
755
- [me, !l.value]
757
+ [fe, !v.value]
756
758
  ]),
757
- e.showToggle ? (c(), m("button", {
759
+ e.showToggle ? (d(), m("button", {
758
760
  key: 0,
759
761
  ref: "toggleButton",
760
- class: C(["flex absolute inset-y-0 right-0 items-center px-2 text-vxvue-700", i.value.disabled ? "cursor-not-allowed" : "hover:text-vxvue"]),
761
- disabled: i.value.disabled,
762
+ class: S(["flex absolute inset-y-0 right-0 items-center px-2 text-vxvue-700", r.value.disabled ? "cursor-not-allowed" : "hover:text-vxvue"]),
763
+ disabled: r.value.disabled,
762
764
  "aria-label": "datepicker-toggle",
763
- onClick: o[4] || (o[4] = _((r) => t("toggle-datepicker"), ["stop"]))
765
+ onClick: n[4] || (n[4] = j((i) => t("toggle-datepicker"), ["stop"]))
764
766
  }, [
765
- Y(A(Ie), { class: "size-6" })
766
- ], 10, gt)) : I("", !0),
767
- L(s.$slots, "default")
767
+ _(L(je), { class: "size-6" })
768
+ ], 10, $t)) : B("", !0),
769
+ T(o.$slots, "default")
768
770
  ], 2));
769
771
  }
770
- }), xt = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, yt = { class: "flex justify-between w-1/2" }, wt = { class: "flex justify-between w-1/2" }, kt = { class: "grid grid-cols-7 gap-0.5 p-0.5" }, $t = ["disabled", "onClick"], St = { class: "flex justify-between items-center py-2 px-3 text-white bg-vxvue-700" }, Ct = { class: "grid grid-cols-2 gap-0.5 p-0.5" }, Mt = ["onClick"], Cl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
772
+ }), Ct = { class: "flex items-center py-2 px-3 text-white bg-vxvue-700" }, Mt = { class: "flex justify-between w-1/2" }, Dt = { class: "flex justify-between w-1/2" }, At = { class: "grid grid-cols-7 gap-0.5 p-0.5" }, Lt = ["disabled", "onClick"], Tt = { class: "flex justify-between items-center py-2 px-3 text-white bg-vxvue-700" }, Vt = { class: "grid grid-cols-2 gap-0.5 p-0.5" }, zt = ["onClick"], Ll = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
771
773
  __name: "Datepicker",
772
- props: {
773
- modelValue: { type: [Date, Array], default: null, validator: (e, u) => e instanceof Date && u.maxNumberOfValues === 1 || e.every((t) => t instanceof Date || t === null) && e.length <= u.maxNumberOfValues },
774
+ props: /* @__PURE__ */ Z({
774
775
  shownMonth: Date,
775
776
  maxNumberOfValues: { type: Number, default: 1 },
776
777
  validFrom: Date,
@@ -780,302 +781,325 @@ const pt = { class: "text-vxvue-700" }, gt = ["disabled"], bt = /* @__PURE__ */
780
781
  locale: { type: String, default: "default" },
781
782
  startOfWeekIndex: { type: Number, default: 0, validator: (e) => e === 0 || e === 1 },
782
783
  hasInput: { type: Boolean, default: !0 }
783
- },
784
- emits: ["update:modelValue", "month-change", "year-change"],
784
+ }, {
785
+ modelValue: {
786
+ type: [Date, Array],
787
+ default: null,
788
+ validator: (e, u) => e instanceof Date && u.maxNumberOfValues === 1 || e.every((t) => t instanceof Date || t === null) && e.length <= u.maxNumberOfValues
789
+ },
790
+ modelModifiers: {}
791
+ }),
792
+ emits: /* @__PURE__ */ Z(["month-change", "year-change"], ["update:modelValue"]),
785
793
  setup(e, { emit: u }) {
786
- const t = e, n = u, a = (() => {
787
- const h = /* @__PURE__ */ new Date();
788
- return new Date(h.getFullYear(), h.getMonth(), h.getDate());
789
- })(), l = $(null), i = $([]), s = $(!1), o = $("days"), r = $(0), d = $({ horiz: "left-0", vert: "top-0" }), f = $(null), x = $(null), y = $(null), b = B(() => t.hasInput && t.maxNumberOfValues === 1), T = B(() => b.value ? { class: ["absolute", s.value ? "block" : "hidden"] } : {}), p = B(() => {
790
- const h = [], g = l.value.getFullYear(), w = l.value.getMonth(), N = new Date(g, w + 1, 0), q = new Date(g, w, 0).getDay() + 1 - t.startOfWeekIndex, ae = (6 + t.startOfWeekIndex - N.getDay()) % 7;
791
- for (let Q = -q, V = N.getDate() + ae; Q < V; ++Q)
792
- h.push(new Date(g, w, Q + 1));
793
- return h;
794
- }), k = B(() => t.startOfWeekIndex ? t.dayNames.slice(1).concat(t.dayNames[0]) : t.dayNames);
795
- X(() => t.modelValue, (h) => {
796
- if (h)
797
- if (Array.isArray(h)) {
798
- const g = [], w = i.value;
799
- h.forEach((N) => {
800
- N && g.push(new Date(N.getFullYear(), N.getMonth(), N.getDate()));
801
- }), (g.length !== w.length || ![.../* @__PURE__ */ new Set([...g, ...w])].every((N) => g.filter((q) => q.getTime() === N.getTime()).length === w.filter((q) => q.getTime() === N.getTime()).length)) && (i.value = g, l.value = new Date((g[0] || a).getTime()), l.value.setDate(1));
802
- } else
803
- i.value = [new Date(h.getFullYear(), h.getMonth(), h.getDate())], l.value = new Date(h.getFullYear(), h.getMonth(), 1);
804
- else
805
- i.value = [], l.value = new Date(a.getFullYear(), a.getMonth(), 1);
806
- }, { immediate: !0 }), X(() => t.shownMonth, (h) => {
807
- l.value = new Date((h || a).getTime()), l.value.setDate(1);
808
- }, { immediate: !0 }), X(s, (h) => {
809
- h && b.value && fe(() => {
810
- const g = f.value.$el.getBoundingClientRect(), w = x.value.getBoundingClientRect();
811
- d.value = {
812
- horiz: g.right - w.width < 0 ? "left-0" : "right-0",
813
- vert: g.bottom + w.height > window.innerHeight ? "bottom-0 -translate-y-12" : "top-0 translate-y-12"
814
- };
815
- });
816
- }), ge(x, () => {
817
- s.value = !1, o.value = "days";
818
- }, { ignore: [y] });
819
- const D = (h) => {
820
- l.value = new Date(l.value.getFullYear(), h, 1), n("month-change", l.value);
821
- }, W = (h) => {
822
- l.value = new Date(h, l.value.getMonth(), 1), n("year-change", l.value);
823
- }, H = (h) => n("update:modelValue", h), S = (h) => {
824
- if (s.value = !1, t.maxNumberOfValues === 1)
825
- n("update:modelValue", h);
794
+ const t = e, a = te(e, "modelValue"), l = u, s = (() => {
795
+ const p = /* @__PURE__ */ new Date();
796
+ return new Date(p.getFullYear(), p.getMonth(), p.getDate());
797
+ })(), v = k(null), r = k([]), o = k(!1), n = k("days"), i = k(0), f = k({ horiz: "left-0", vert: "top-0" }), b = k(null), w = k(null), g = k(null), M = I(() => t.hasInput && t.maxNumberOfValues === 1), y = I(() => {
798
+ const p = [], h = v.value.getFullYear(), x = v.value.getMonth(), N = new Date(h, x + 1, 0), U = new Date(h, x, 0).getDay() + 1 - t.startOfWeekIndex, oe = (6 + t.startOfWeekIndex - N.getDay()) % 7;
799
+ for (let ae = -U, he = N.getDate() + oe; ae < he; ++ae)
800
+ p.push(new Date(h, x, ae + 1));
801
+ return p;
802
+ }), C = I(() => t.startOfWeekIndex ? t.dayNames.slice(1).concat(t.dayNames[0]) : t.dayNames), V = (p) => {
803
+ v.value = new Date(v.value.getFullYear(), p, 1), l("month-change", v.value);
804
+ }, E = (p) => {
805
+ v.value = new Date(p, v.value.getMonth(), 1), l("year-change", v.value);
806
+ }, G = (p) => a.value = p, q = (p) => {
807
+ if (o.value = !1, t.maxNumberOfValues === 1)
808
+ a.value = p;
826
809
  else {
827
- const g = i.value;
828
- let w = g.findIndex((N) => N.getTime() === h.getTime());
829
- w !== -1 ? g.splice(w, 1) : g.length < t.maxNumberOfValues && g.push(h), n("update:modelValue", g);
810
+ const h = r.value;
811
+ let x = h.findIndex((N) => N.getTime() === p.getTime());
812
+ x !== -1 ? h.splice(x, 1) : h.length < t.maxNumberOfValues && h.push(p), a.value = h;
830
813
  }
831
- }, M = (h) => i.value.find((g) => (g == null ? void 0 : g.getTime()) === h.getTime()), F = (h) => {
832
- const g = h.getMonth() !== l.value.getMonth(), w = M(h), N = h.getTime() === a.getTime(), q = t.validFrom && t.validFrom > h || t.validUntil && t.validUntil < h, ae = !w && t.maxNumberOfValues > 1 && i.value.length === t.maxNumberOfValues, Q = t.highlightRange && h > Math.min(...i.value) && h < Math.max(...i.value);
814
+ }, $ = (p) => r.value.find((h) => h?.getTime() === p.getTime()), D = (p) => {
815
+ const h = p.getMonth() !== v.value.getMonth(), x = $(p), N = p.getTime() === s.getTime(), U = t.validFrom && t.validFrom > p || t.validUntil && t.validUntil < p, oe = !x && t.maxNumberOfValues > 1 && r.value.length === t.maxNumberOfValues, ae = t.highlightRange && p > Math.min(...r.value) && p < Math.max(...r.value);
833
816
  return {
834
- "cursor-not-allowed": q || ae,
835
- "text-vxvue-700": !q && !g && !N && !w,
836
- "text-error": q && !g,
837
- "text-gray-400": g && !N && !w,
838
- "bg-vxvue-alt-300 font-bold": N && !w,
839
- "bg-vxvue-700 text-white": w,
840
- "hover:ring-2 hover:ring-vxvue": !q,
841
- "bg-vxvue-100/50": Q && !N && !w
817
+ "cursor-not-allowed": U || oe,
818
+ "text-vxvue-700": !U && !h && !N && !x,
819
+ "text-error": U && !h,
820
+ "text-gray-400": h && !N && !x,
821
+ "bg-vxvue-alt-300 font-bold": N && !x,
822
+ "bg-vxvue-700 text-white": x,
823
+ "hover:ring-2 hover:ring-vxvue": !U,
824
+ "bg-vxvue-100/50": ae && !N && !x
842
825
  };
843
826
  };
844
- return he(() => {
845
- var h;
846
- return y.value = (h = f.value) == null ? void 0 : h.$refs.toggleButton;
847
- }), (h, g) => (c(), m("div", {
848
- class: C(["relative", h.$attrs.class])
827
+ return we(w, () => {
828
+ o.value = !1, n.value = "days";
829
+ }, { ignore: [g] }), xe(() => g.value = b.value?.$refs.toggleButton), X(o, (p) => {
830
+ p && M.value && be(() => {
831
+ const h = b.value.$el.getBoundingClientRect(), x = w.value.getBoundingClientRect();
832
+ f.value.horiz = h.right - x.width < 0 ? "left-0" : "right-0", f.value.vert = h.bottom + x.height > window.innerHeight ? "bottom-0 -translate-y-12" : "top-0 translate-y-12";
833
+ });
834
+ }), X(a, (p) => {
835
+ if (p)
836
+ if (Array.isArray(p)) {
837
+ const h = [], x = r.value;
838
+ p.forEach((N) => {
839
+ N && h.push(new Date(N.getFullYear(), N.getMonth(), N.getDate()));
840
+ }), (h.length !== x.length || ![.../* @__PURE__ */ new Set([...h, ...x])].every((N) => h.filter((U) => U.getTime() === N.getTime()).length === x.filter((U) => U.getTime() === N.getTime()).length)) && (r.value = h, v.value = new Date((h[0] || s).getTime()), v.value.setDate(1));
841
+ } else
842
+ r.value = [new Date(p.getFullYear(), p.getMonth(), p.getDate())], v.value = new Date(p.getFullYear(), p.getMonth(), 1);
843
+ else
844
+ r.value = [], v.value = new Date(s.getFullYear(), s.getMonth(), 1);
845
+ }, { immediate: !0 }), X(() => t.shownMonth, (p) => {
846
+ v.value = new Date((p || s).getTime()), v.value.setDate(1);
847
+ }, { immediate: !0 }), (p, h) => (d(), m("div", {
848
+ class: S(["relative", p.$attrs.class])
849
849
  }, [
850
- b.value ? (c(), Z(bt, R({ key: 0 }, h.$attrs, {
850
+ M.value ? (d(), H(St, R({ key: 0 }, p.$attrs, {
851
851
  ref_key: "input",
852
- ref: f,
853
- "model-value": i.value[0],
852
+ ref: b,
853
+ "model-value": r.value[0],
854
854
  "show-toggle": !0,
855
855
  class: "w-full",
856
- onToggleDatepicker: g[0] || (g[0] = (w) => s.value = !s.value),
857
- "onUpdate:modelValue": H
856
+ onToggleDatepicker: h[0] || (h[0] = (x) => o.value = !o.value),
857
+ "onUpdate:modelValue": G
858
858
  }), {
859
- default: te(() => [
860
- L(h.$slots, "default")
859
+ default: ee(() => [
860
+ T(p.$slots, "default")
861
861
  ]),
862
862
  _: 3
863
- }, 16, ["model-value"])) : I("", !0),
864
- v("div", R(T.value, {
865
- ref_key: "calendar",
866
- ref: x,
867
- class: ["overflow-hidden z-[var(--zIndex-dropdown)] bg-white rounded-sm shadow-md min-w-72 sm:min-w-80", [d.value.horiz, d.value.vert]]
868
- }), [
869
- o.value === "days" ? (c(), m(O, { key: 0 }, [
870
- v("div", xt, [
871
- v("div", yt, [
872
- v("button", {
873
- class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
874
- onClick: g[1] || (g[1] = _((w) => D(l.value.getMonth() - 1), ["stop"]))
875
- }, [
876
- Y(A(ie), { class: "size-6" })
863
+ }, 16, ["model-value"])) : B("", !0),
864
+ _(de, { name: "fade" }, {
865
+ default: ee(() => [
866
+ le(c("div", {
867
+ ref_key: "calendar",
868
+ ref: w,
869
+ class: S([
870
+ "overflow-hidden z-[var(--zIndex-dropdown)] bg-white rounded-sm shadow-md min-w-72 sm:min-w-80",
871
+ f.value.horiz,
872
+ f.value.vert,
873
+ {
874
+ absolute: M.value
875
+ }
876
+ ])
877
+ }, [
878
+ n.value === "days" ? (d(), m(O, { key: 0 }, [
879
+ c("div", Ct, [
880
+ c("div", Mt, [
881
+ c("button", {
882
+ class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
883
+ onClick: h[1] || (h[1] = j((x) => V(v.value.getMonth() - 1), ["stop"]))
884
+ }, [
885
+ _(L(ve), { class: "size-6" })
886
+ ]),
887
+ c("span", null, P(v.value.toLocaleString(e.locale, { month: "long" })), 1),
888
+ c("button", {
889
+ class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
890
+ onClick: h[2] || (h[2] = j((x) => V(v.value.getMonth() + 1), ["stop"]))
891
+ }, [
892
+ _(L(ie), { class: "size-6" })
893
+ ])
894
+ ]),
895
+ c("div", Dt, [
896
+ c("button", {
897
+ class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
898
+ onClick: h[3] || (h[3] = j((x) => E(v.value.getFullYear() - 1), ["stop"]))
899
+ }, [
900
+ _(L(ve), { class: "size-6" })
901
+ ]),
902
+ c("button", {
903
+ class: "text-vxvue-100 hover:text-vxvue-50",
904
+ onClick: h[4] || (h[4] = (x) => {
905
+ n.value = "years", i.value = v.value.getFullYear();
906
+ })
907
+ }, P(v.value.getFullYear()), 1),
908
+ c("button", {
909
+ class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
910
+ onClick: h[5] || (h[5] = j((x) => E(v.value.getFullYear() + 1), ["stop"]))
911
+ }, [
912
+ _(L(ie), { class: "size-6" })
913
+ ])
914
+ ])
877
915
  ]),
878
- v("span", null, P(l.value.toLocaleString(e.locale, { month: "long" })), 1),
879
- v("button", {
880
- class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
881
- onClick: g[2] || (g[2] = _((w) => D(l.value.getMonth() + 1), ["stop"]))
882
- }, [
883
- Y(A(oe), { class: "size-6" })
916
+ c("div", At, [
917
+ (d(!0), m(O, null, Y(C.value, (x, N) => (d(), m("div", {
918
+ key: N,
919
+ class: "py-2 text-center bg-gray-200"
920
+ }, P(x), 1))), 128)),
921
+ (d(!0), m(O, null, Y(y.value, (x) => (d(), m("button", {
922
+ key: x,
923
+ class: S(["py-2 rounded-xs block text-center", D(x)]),
924
+ disabled: e.validFrom && e.validFrom > x || e.validUntil && e.validUntil < x || e.maxNumberOfValues > 1 && r.value.length === e.maxNumberOfValues && !$(x),
925
+ onClick: j((N) => q(x), ["stop"])
926
+ }, P(x.getDate()), 11, Lt))), 128))
884
927
  ])
885
- ]),
886
- v("div", wt, [
887
- v("button", {
888
- class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
889
- onClick: g[3] || (g[3] = _((w) => W(l.value.getFullYear() - 1), ["stop"]))
890
- }, [
891
- Y(A(ie), { class: "size-6" })
928
+ ], 64)) : B("", !0),
929
+ n.value === "years" ? (d(), m(O, { key: 1 }, [
930
+ c("div", Tt, [
931
+ c("button", {
932
+ class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
933
+ onClick: h[6] || (h[6] = j((x) => i.value -= 10, ["stop"]))
934
+ }, [
935
+ _(L(ve), { class: "size-6" })
936
+ ]),
937
+ c("span", null, P(i.value) + " - " + P(i.value + 9), 1),
938
+ c("button", {
939
+ class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
940
+ onClick: h[7] || (h[7] = j((x) => i.value += 10, ["stop"]))
941
+ }, [
942
+ _(L(ie), { class: "size-6" })
943
+ ])
892
944
  ]),
893
- v("button", {
894
- class: "text-vxvue-100 hover:text-vxvue-50",
895
- onClick: g[4] || (g[4] = (w) => {
896
- o.value = "years", r.value = l.value.getFullYear();
897
- })
898
- }, P(l.value.getFullYear()), 1),
899
- v("button", {
900
- class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
901
- onClick: g[5] || (g[5] = _((w) => W(l.value.getFullYear() + 1), ["stop"]))
902
- }, [
903
- Y(A(oe), { class: "size-6" })
945
+ c("div", Vt, [
946
+ (d(), m(O, null, Y(10, (x) => c("div", {
947
+ key: x,
948
+ class: "text-center hover:ring-2 text-vxvue-700 hover:ring-vxvue"
949
+ }, [
950
+ c("button", {
951
+ class: "py-2 px-3",
952
+ onClick: j((N) => {
953
+ E(i.value + x - 1), n.value = "days";
954
+ }, ["stop"])
955
+ }, P(i.value + x - 1), 9, zt)
956
+ ])), 64))
904
957
  ])
905
- ])
906
- ]),
907
- v("div", kt, [
908
- (c(!0), m(O, null, j(k.value, (w, N) => (c(), m("div", {
909
- key: N,
910
- class: "py-2 text-center bg-gray-200"
911
- }, P(w), 1))), 128)),
912
- (c(!0), m(O, null, j(p.value, (w) => (c(), m("button", {
913
- key: w,
914
- class: C(["py-2 rounded-xs block text-center", F(w)]),
915
- disabled: e.validFrom && e.validFrom > w || e.validUntil && e.validUntil < w || e.maxNumberOfValues > 1 && i.value.length === e.maxNumberOfValues && !M(w),
916
- onClick: _((N) => S(w), ["stop"])
917
- }, P(w.getDate()), 11, $t))), 128))
958
+ ], 64)) : B("", !0)
959
+ ], 2), [
960
+ [fe, o.value]
918
961
  ])
919
- ], 64)) : I("", !0),
920
- o.value === "years" ? (c(), m(O, { key: 1 }, [
921
- v("div", St, [
922
- v("button", {
923
- class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
924
- onClick: g[6] || (g[6] = _((w) => r.value -= 10, ["stop"]))
925
- }, [
926
- Y(A(ie), { class: "size-6" })
927
- ]),
928
- v("span", null, P(r.value) + " - " + P(r.value + 9), 1),
929
- v("button", {
930
- class: "shrink-0 text-vxvue-100 hover:text-vxvue-50",
931
- onClick: g[7] || (g[7] = _((w) => r.value += 10, ["stop"]))
932
- }, [
933
- Y(A(oe), { class: "size-6" })
934
- ])
935
- ]),
936
- v("div", Ct, [
937
- (c(), m(O, null, j(10, (w) => v("div", {
938
- key: w,
939
- class: "text-center hover:ring-2 text-vxvue-700 hover:ring-vxvue"
940
- }, [
941
- v("button", {
942
- class: "py-2 px-3",
943
- onClick: _((N) => {
944
- W(r.value + w - 1), o.value = "days";
945
- }, ["stop"])
946
- }, P(r.value + w - 1), 9, Mt)
947
- ])), 64))
948
- ])
949
- ], 64)) : I("", !0)
950
- ], 16)
962
+ ]),
963
+ _: 1
964
+ })
951
965
  ], 2));
952
966
  }
953
- }), Vt = ["for"], Dt = ["id", "multiple", "accept"], Ml = {
967
+ }), Pt = ["for"], Bt = ["id", "multiple", "accept"], Tl = {
954
968
  __name: "FormFileButton",
955
- props: {
956
- modelValue: { type: Array, default: () => [] },
969
+ props: /* @__PURE__ */ Z({
957
970
  accept: { type: String, default: "*" },
958
971
  multiple: { type: Boolean, default: !1 },
959
972
  name: { type: String, default: "file" },
960
973
  id: { type: String, default: "form-file-button-" + Math.ceil(Math.random() * 1e3) }
961
- },
962
- emits: ["update:modelValue", "form-data"],
974
+ }, {
975
+ modelValue: { type: Array, default: () => [] },
976
+ modelModifiers: {}
977
+ }),
978
+ emits: /* @__PURE__ */ Z(["form-data"], ["update:modelValue"]),
963
979
  setup(e, { emit: u }) {
964
- const t = u, n = e, a = (i) => {
965
- const s = new FormData();
966
- for (let o of i)
967
- s.append(n.name, o, o.name);
968
- return s;
969
- }, l = (i) => {
970
- const s = i.target.files || i.dataTransfer.files;
971
- if (s) {
972
- const o = [...s];
973
- t("update:modelValue", o), t("form-data", a(o));
980
+ const t = u, a = e, l = te(e, "modelValue"), s = (r) => {
981
+ const o = new FormData();
982
+ for (let n of r)
983
+ o.append(a.name, n, n.name);
984
+ return o;
985
+ }, v = (r) => {
986
+ const o = r.target.files || r.dataTransfer.files;
987
+ if (o) {
988
+ const n = Array.from(o);
989
+ l.value = n, t("form-data", s(n));
974
990
  }
975
991
  };
976
- return (i, s) => (c(), m("label", { for: e.id }, [
977
- L(i.$slots, "default", {}, () => [
978
- s[0] || (s[0] = J("Upload"))
992
+ return (r, o) => (d(), m("label", { for: e.id }, [
993
+ T(r.$slots, "default", {}, () => [
994
+ o[0] || (o[0] = Q("Upload", -1))
979
995
  ]),
980
- v("input", {
996
+ c("input", {
981
997
  id: e.id,
982
998
  type: "file",
983
999
  multiple: e.multiple,
984
1000
  accept: e.accept,
985
1001
  class: "hidden",
986
- onChange: l
987
- }, null, 40, Dt)
988
- ], 8, Vt));
1002
+ onChange: v
1003
+ }, null, 40, Bt)
1004
+ ], 8, Pt));
989
1005
  }
990
- }, At = ["value"], Lt = {
1006
+ }, It = {
991
1007
  key: 0,
992
1008
  disabled: "",
993
1009
  value: ""
994
- }, Tt = ["selected", "value"], zt = {
1010
+ }, Nt = ["selected", "value"], Ot = {
995
1011
  __name: "FormSelect",
996
- props: {
1012
+ props: /* @__PURE__ */ Z({
997
1013
  options: { type: Array, default: () => [] },
998
- modelValue: { type: [String, Number], default: null },
999
1014
  disabledLabel: { type: String, default: "" }
1000
- },
1015
+ }, {
1016
+ modelValue: {},
1017
+ modelModifiers: {}
1018
+ }),
1001
1019
  emits: ["update:modelValue"],
1002
- setup(e, { emit: u }) {
1003
- const t = u;
1004
- return (n, a) => (c(), m("select", R(n.$attrs, {
1005
- value: e.modelValue,
1006
- class: "form-select",
1007
- onChange: a[0] || (a[0] = (l) => t("update:modelValue", l.target.value))
1020
+ setup(e) {
1021
+ const u = te(e, "modelValue");
1022
+ return (t, a) => le((d(), m("select", R(t.$attrs, {
1023
+ "onUpdate:modelValue": a[0] || (a[0] = (l) => u.value = l),
1024
+ class: "form-select"
1008
1025
  }), [
1009
- e.disabledLabel ? (c(), m("option", Lt, P(e.disabledLabel), 1)) : I("", !0),
1010
- (c(!0), m(O, null, j(e.options, (l) => (c(), m("option", {
1026
+ e.disabledLabel ? (d(), m("option", It, P(e.disabledLabel), 1)) : B("", !0),
1027
+ (d(!0), m(O, null, Y(e.options, (l) => (d(), m("option", {
1011
1028
  key: l.key !== void 0 ? l.key : l.label || l,
1012
- selected: (l.key !== void 0 ? l.key : l.label || l) === e.modelValue,
1029
+ selected: (l.key !== void 0 ? l.key : l.label || l) === u.value,
1013
1030
  value: l.key !== void 0 ? l.key : l.label || l
1014
- }, P(l.label || l), 9, Tt))), 128))
1015
- ], 16, At));
1031
+ }, P(l.label || l), 9, Nt))), 128))
1032
+ ], 16)), [
1033
+ [Ne, u.value]
1034
+ ]);
1016
1035
  }
1017
- }, Pt = ["aria-checked", "aria-label"], Bt = ["d"], It = ["checked"], Vl = {
1036
+ }, Et = ["aria-checked", "aria-label"], Ft = ["d"], Vl = {
1018
1037
  __name: "FormSwitch",
1019
- props: { modelValue: Boolean },
1038
+ props: {
1039
+ modelValue: {},
1040
+ modelModifiers: {}
1041
+ },
1020
1042
  emits: ["update:modelValue"],
1021
- setup(e, { emit: u }) {
1022
- const t = u, n = B(() => {
1043
+ setup(e) {
1044
+ const u = te(e, "modelValue"), t = I(() => {
1023
1045
  let l = Object.assign({}, K());
1024
1046
  return delete l.class, l;
1025
- }), a = B(() => K().disabled || K().disabled === "");
1026
- return (l, i) => (c(), m("label", {
1027
- class: C(l.$attrs.class),
1047
+ }), a = I(() => K().disabled || K().disabled === "");
1048
+ return (l, s) => (d(), m("label", {
1049
+ class: S(l.$attrs.class),
1028
1050
  tabindex: "0"
1029
1051
  }, [
1030
- v("span", {
1052
+ c("span", {
1031
1053
  role: "switch",
1032
- class: C([
1054
+ class: S([
1033
1055
  "inline-flex relative shrink-0 w-11 h-6 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out cursor-pointer focus:ring-2 focus:ring-offset-2 focus:outline-hidden focus:ring-vxvue",
1034
- a.value ? "bg-slate-200" : e.modelValue ? "bg-vxvue" : "bg-slate-300"
1056
+ a.value ? "bg-slate-200" : u.value ? "bg-vxvue" : "bg-slate-300"
1035
1057
  ]),
1036
- "aria-checked": e.modelValue,
1058
+ "aria-checked": u.value,
1037
1059
  "aria-label": l.$attrs["aria-label"]
1038
1060
  }, [
1039
- v("span", {
1061
+ c("span", {
1040
1062
  "aria-hidden": "true",
1041
- class: C([
1063
+ class: S([
1042
1064
  "block relative size-5 rounded-full ring-0 shadow-sm transition duration-200 ease-in-out transform pointer-events-none",
1043
- e.modelValue ? "translate-x-5" : "translate-x-0",
1065
+ u.value ? "translate-x-5" : "translate-x-0",
1044
1066
  a.value ? "bg-slate-100" : "bg-white"
1045
1067
  ])
1046
1068
  }, [
1047
- L(l.$slots, "handle", {}, () => [
1048
- (c(), m("svg", {
1069
+ T(l.$slots, "handle", {}, () => [
1070
+ (d(), m("svg", {
1049
1071
  xmlns: "http://www.w3.org/2000/svg",
1050
1072
  fill: "none",
1051
1073
  viewBox: "0 0 24 24",
1052
1074
  "stroke-width": "5",
1053
1075
  stroke: "currentColor",
1054
- class: C(["absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 size-3", e.modelValue && !a.value ? "text-vxvue" : "text-slate-300"])
1076
+ class: S(["absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 size-3", u.value && !a.value ? "text-vxvue" : "text-slate-300"])
1055
1077
  }, [
1056
- v("path", {
1078
+ c("path", {
1057
1079
  "stroke-linecap": "round",
1058
1080
  "stroke-linejoin": "round",
1059
- d: e.modelValue ? "M12 18 V6" : "m18.5 12 c0 3.5 -3 6.5 -6.5 6.5 -3.5 0 -6.5 -3 -6.5 -6.5 0 -3.5 3 -6.5 6.5 -6.5 3.5 0 6.5 3 6.5 6.5z"
1060
- }, null, 8, Bt)
1081
+ d: u.value ? "M12 18 V6" : "m18.5 12 c0 3.5 -3 6.5 -6.5 6.5 -3.5 0 -6.5 -3 -6.5 -6.5 0 -3.5 3 -6.5 6.5 -6.5 3.5 0 6.5 3 6.5 6.5z"
1082
+ }, null, 8, Ft)
1061
1083
  ], 2))
1062
1084
  ])
1063
1085
  ], 2),
1064
- v("input", R(n.value, {
1065
- checked: e.modelValue,
1086
+ le(c("input", R({
1087
+ "onUpdate:modelValue": s[0] || (s[0] = (v) => u.value = v)
1088
+ }, t.value, {
1066
1089
  class: "hidden",
1067
1090
  value: "1",
1068
- type: "checkbox",
1069
- onChange: i[0] || (i[0] = (s) => t("update:modelValue", s.target.checked))
1070
- }), null, 16, It)
1071
- ], 10, Pt),
1072
- L(l.$slots, "default")
1091
+ type: "checkbox"
1092
+ }), null, 16), [
1093
+ [Oe, u.value]
1094
+ ])
1095
+ ], 10, Et),
1096
+ T(l.$slots, "default")
1073
1097
  ], 2));
1074
1098
  }
1075
- }, Nt = {
1099
+ }, _t = {
1076
1100
  "aria-live": "assertive",
1077
1101
  class: "flex fixed inset-0 z-[var(--zIndex-toast)] items-start py-6 px-4 pointer-events-none sm:p-6"
1078
- }, Ot = { class: "flex flex-col items-center space-y-4 w-full" }, Et = { class: "p-4" }, Ft = { class: "flex items-start" }, _t = { class: "shrink-0" }, jt = { class: "flex-1 pt-0.5 ml-3 w-0" }, Yt = { class: "font-bold" }, Rt = { class: "mt-1" }, Ht = { class: "flex shrink-0 ml-4" }, Dl = /* @__PURE__ */ Object.assign({
1102
+ }, jt = { class: "flex flex-col items-center space-y-4 w-full" }, Yt = { class: "p-4" }, Rt = { class: "flex items-start" }, Ht = { class: "shrink-0" }, Zt = { class: "flex-1 pt-0.5 ml-3 w-0" }, Ut = { class: "font-bold" }, Wt = { class: "mt-1" }, qt = { class: "flex shrink-0 ml-4" }, zl = /* @__PURE__ */ Object.assign({
1079
1103
  inheritAttrs: !1
1080
1104
  }, {
1081
1105
  __name: "MessageToast",
@@ -1088,71 +1112,71 @@ const pt = { class: "text-vxvue-700" }, gt = ["disabled"], bt = /* @__PURE__ */
1088
1112
  },
1089
1113
  emits: ["timeout", "close"],
1090
1114
  setup(e, { emit: u }) {
1091
- const t = e, n = u, a = B(() => typeof t.message == "string" ? [t.message] : t.message), l = $(0);
1092
- let i = null;
1093
- const s = () => {
1094
- window.clearTimeout(i), l.value = 100, t.active && t.timeout && (i = window.setTimeout(() => {
1095
- n("timeout");
1096
- }, t.timeout), window.setTimeout(() => l.value = 0, 0));
1115
+ const t = e, a = u, l = I(() => typeof t.message == "string" ? [t.message] : t.message), s = k(0);
1116
+ let v = null;
1117
+ const r = () => {
1118
+ window.clearTimeout(v), s.value = 100, t.active && t.timeout && (v = window.setTimeout(() => {
1119
+ a("timeout");
1120
+ }, t.timeout), window.setTimeout(() => s.value = 0, 0));
1097
1121
  };
1098
- return X(() => t.active, s), he(s), (o, r) => (c(), m("div", Nt, [
1099
- v("div", Ot, [
1100
- Y(be, { name: "vert-fade" }, {
1101
- default: te(() => [
1102
- e.active ? (c(), m("div", {
1122
+ return X(() => t.active, r), xe(r), (o, n) => (d(), m("div", _t, [
1123
+ c("div", jt, [
1124
+ _(de, { name: "vert-fade" }, {
1125
+ default: ee(() => [
1126
+ e.active ? (d(), m("div", {
1103
1127
  key: 0,
1104
- class: C(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black/5 shadow-lg pointer-events-auto", o.$attrs.class])
1128
+ class: S(["overflow-hidden w-full max-w-sm rounded-md ring-1 ring-black/5 shadow-lg pointer-events-auto", o.$attrs.class])
1105
1129
  }, [
1106
- v("div", Et, [
1107
- v("div", Ft, [
1108
- v("div", _t, [
1109
- L(o.$slots, "icon")
1130
+ c("div", Yt, [
1131
+ c("div", Rt, [
1132
+ c("div", Ht, [
1133
+ T(o.$slots, "icon")
1110
1134
  ]),
1111
- v("div", jt, [
1112
- L(o.$slots, "title", {}, () => [
1113
- v("div", Yt, P(e.title), 1)
1135
+ c("div", Zt, [
1136
+ T(o.$slots, "title", {}, () => [
1137
+ c("div", Ut, P(e.title), 1)
1114
1138
  ]),
1115
- L(o.$slots, "default", {}, () => [
1116
- (c(!0), m(O, null, j(a.value, (d) => (c(), m("p", Rt, P(d), 1))), 256))
1139
+ T(o.$slots, "default", {}, () => [
1140
+ (d(!0), m(O, null, Y(l.value, (i) => (d(), m("p", Wt, P(i), 1))), 256))
1117
1141
  ])
1118
1142
  ]),
1119
- v("div", Ht, [
1120
- v("button", {
1143
+ c("div", qt, [
1144
+ c("button", {
1121
1145
  class: "inline-flex text-white bg-black/20 rounded-xs focus:ring-2 focus:outline-hidden hover:text-stone-200 focus:ring-stone-200",
1122
- onClick: r[0] || (r[0] = (d) => n("close"))
1146
+ onClick: n[0] || (n[0] = (i) => a("close"))
1123
1147
  }, [
1124
- r[1] || (r[1] = v("span", { class: "sr-only" }, "Close", -1)),
1125
- Y(A(pe), { class: "size-5" })
1148
+ n[1] || (n[1] = c("span", { class: "sr-only" }, "Close", -1)),
1149
+ _(L(ye), { class: "size-5" })
1126
1150
  ])
1127
1151
  ])
1128
1152
  ])
1129
1153
  ]),
1130
- e.showTimeoutProgress && e.timeout ? (c(), m("div", {
1154
+ e.showTimeoutProgress && e.timeout ? (d(), m("div", {
1131
1155
  key: 0,
1132
1156
  class: "h-1 transition-all ease-linear bg-vxvue-alt",
1133
- style: we({
1134
- width: l.value + "%",
1157
+ style: Se({
1158
+ width: s.value + "%",
1135
1159
  "transition-duration": e.timeout + "ms"
1136
1160
  }),
1137
1161
  role: "progressbar",
1138
1162
  "aria-hidden": "false",
1139
1163
  "aria-label": "notification timer"
1140
- }, null, 4)) : I("", !0)
1141
- ], 2)) : I("", !0)
1164
+ }, null, 4)) : B("", !0)
1165
+ ], 2)) : B("", !0)
1142
1166
  ]),
1143
1167
  _: 3
1144
1168
  })
1145
1169
  ])
1146
1170
  ]));
1147
1171
  }
1148
- }), Zt = {
1172
+ }), Kt = {
1149
1173
  key: 0,
1150
1174
  class: "fixed inset-0 z-[calc(var(--zIndex-modal)-1)] bg-white/50 backdrop-blur-xs",
1151
1175
  "aria-hidden": "true"
1152
- }, Wt = {
1176
+ }, Xt = {
1153
1177
  key: 0,
1154
1178
  class: "fixed inset-0 z-[var(--zIndex-modal)]"
1155
- }, qt = { class: "flex justify-center items-center h-screen" }, Al = {
1179
+ }, Gt = { class: "flex justify-center items-center h-screen" }, Pl = {
1156
1180
  __name: "Modal",
1157
1181
  props: {
1158
1182
  show: Boolean,
@@ -1165,40 +1189,40 @@ const pt = { class: "text-vxvue-700" }, gt = ["disabled"], bt = /* @__PURE__ */
1165
1189
  },
1166
1190
  emits: ["clicked-outside"],
1167
1191
  setup(e, { emit: u }) {
1168
- const t = u, n = $(null);
1169
- return ge(n, () => t("clicked-outside")), (a, l) => (c(), m(O, null, [
1170
- e.show ? (c(), m("div", Zt)) : I("", !0),
1171
- Y(be, { name: "appear" }, {
1172
- default: te(() => [
1173
- e.show ? (c(), m("div", Wt, [
1174
- v("div", qt, [
1175
- v("div", {
1192
+ const t = u, a = k(null);
1193
+ return we(a, () => t("clicked-outside")), (l, s) => (d(), m(O, null, [
1194
+ e.show ? (d(), m("div", Kt)) : B("", !0),
1195
+ _(de, { name: "appear" }, {
1196
+ default: ee(() => [
1197
+ e.show ? (d(), m("div", Xt, [
1198
+ c("div", Gt, [
1199
+ c("div", {
1176
1200
  ref_key: "container",
1177
- ref: n,
1178
- class: C([
1201
+ ref: a,
1202
+ class: S([
1179
1203
  "flex flex-col overflow-hidden max-w-full bg-white rounded-sm ring-1 ring-black/10 shadow-xl transition-all transform xl:max-w-(--breakpoint-xl)",
1180
1204
  e.containerClass
1181
1205
  ])
1182
1206
  }, [
1183
- v("div", {
1184
- class: C(["grow-0", e.headerClass])
1207
+ c("div", {
1208
+ class: S(["grow-0", e.headerClass])
1185
1209
  }, [
1186
- L(a.$slots, "title")
1210
+ T(l.$slots, "title")
1187
1211
  ], 2),
1188
- v("div", {
1189
- class: C(["overflow-y-auto h-full", e.contentClass])
1212
+ c("div", {
1213
+ class: S(["overflow-y-auto h-full", e.contentClass])
1190
1214
  }, [
1191
- L(a.$slots, "default")
1215
+ T(l.$slots, "default")
1192
1216
  ], 2)
1193
1217
  ], 2)
1194
1218
  ])
1195
- ])) : I("", !0)
1219
+ ])) : B("", !0)
1196
1220
  ]),
1197
1221
  _: 3
1198
1222
  })
1199
1223
  ], 64));
1200
1224
  }
1201
- }, Ut = { class: "flex justify-between items-center px-4 sm:px-0" }, Kt = { class: "flex flex-1 -mt-px w-0" }, Xt = ["disabled"], Gt = { class: "hidden md:flex md:-mt-px" }, Jt = { class: "flex flex-1 justify-end -mt-px w-0" }, Qt = ["disabled"], Ll = {
1225
+ }, Jt = { class: "flex justify-between items-center px-4 sm:px-0" }, Qt = { class: "flex flex-1 -mt-px w-0" }, el = ["disabled"], tl = { class: "hidden md:flex md:-mt-px" }, ll = { class: "flex flex-1 justify-end -mt-px w-0" }, al = ["disabled"], Bl = {
1202
1226
  __name: "Pagination",
1203
1227
  props: {
1204
1228
  page: { type: Number, default: 1 },
@@ -1212,74 +1236,74 @@ const pt = { class: "text-vxvue-700" }, gt = ["disabled"], bt = /* @__PURE__ */
1212
1236
  },
1213
1237
  emits: ["update:page"],
1214
1238
  setup(e, { emit: u }) {
1215
- const t = u, n = e, a = $(Math.ceil(n.total / n.perPage)), l = $(null), i = B(() => (n.markerPosition === "above" ? "border-t-4 -mt-[4px]" : "border-b-4 -mb-[4px]") + " py-4"), s = B(() => {
1216
- let d = [1];
1217
- if (n.showAllPages || a.value <= 7) {
1218
- for (let f = 2; f <= a.value; ++f)
1219
- d.push(f);
1220
- return d;
1239
+ const t = u, a = e, l = k(Math.ceil(a.total / a.perPage)), s = k(null), v = I(() => (a.markerPosition === "above" ? "border-t-4 -mt-[4px]" : "border-b-4 -mb-[4px]") + " py-4"), r = I(() => {
1240
+ let i = [1];
1241
+ if (a.showAllPages || l.value <= 7) {
1242
+ for (let f = 2; f <= l.value; ++f)
1243
+ i.push(f);
1244
+ return i;
1221
1245
  }
1222
- return l.value >= a.value ? d.push("dots", l.value - 2, l.value - 1) : l.value - 1 && l.value - 1 > 1 && (l.value > 1 && d.push("dots"), d.push(l.value - 1)), l.value > 1 && d.push(l.value), l.value + 1 < a.value && (d.push(l.value + 1), l.value <= 1 && d.push(l.value + 2), l.value + 2 < a.value && d.push("dots")), l.value < a.value && d.push(a.value), d;
1246
+ return s.value >= l.value ? i.push("dots", s.value - 2, s.value - 1) : s.value - 1 && s.value - 1 > 1 && (s.value > 1 && i.push("dots"), i.push(s.value - 1)), s.value > 1 && i.push(s.value), s.value + 1 < l.value && (i.push(s.value + 1), s.value <= 1 && i.push(s.value + 2), s.value + 2 < l.value && i.push("dots")), s.value < l.value && i.push(l.value), i;
1223
1247
  }), o = () => {
1224
- l.value > 1 && t("update:page", l.value - 1);
1225
- }, r = () => {
1226
- l.value < a.value && t("update:page", l.value + 1);
1248
+ s.value > 1 && t("update:page", s.value - 1);
1249
+ }, n = () => {
1250
+ s.value < l.value && t("update:page", s.value + 1);
1227
1251
  };
1228
- return X(() => n.page, (d) => l.value = Math.min(Math.max(d, 1), a.value), { immediate: !0 }), X(() => n.perPage, (d) => {
1229
- a.value = Math.ceil(n.total / n.perPage), t("update:page", 1);
1230
- }), X(() => n.total, (d) => {
1231
- a.value = Math.ceil(n.total / n.perPage), l.value > a.value && t("update:page", a.value);
1232
- }), (d, f) => (c(), m("nav", Ut, [
1233
- v("div", Kt, [
1234
- e.showNavButtons ? (c(), m("button", {
1252
+ return X(() => a.page, (i) => s.value = Math.min(Math.max(i, 1), l.value), { immediate: !0 }), X(() => a.perPage, (i) => {
1253
+ l.value = Math.ceil(a.total / a.perPage), t("update:page", 1);
1254
+ }), X(() => a.total, (i) => {
1255
+ l.value = Math.ceil(a.total / a.perPage), s.value > l.value && t("update:page", l.value);
1256
+ }), (i, f) => (d(), m("nav", Jt, [
1257
+ c("div", Qt, [
1258
+ e.showNavButtons ? (d(), m("button", {
1235
1259
  key: 0,
1236
- disabled: l.value <= 1,
1237
- class: C([
1238
- l.value <= 1 ? "pointer-events-none text-gray-500" : "text-vxvue-700",
1260
+ disabled: s.value <= 1,
1261
+ class: S([
1262
+ s.value <= 1 ? "pointer-events-none text-gray-500" : "text-vxvue-700",
1239
1263
  "inline-flex items-center pr-1 text-sm border-transparent hover:text-vxvue"
1240
1264
  ]),
1241
1265
  onClick: o
1242
1266
  }, [
1243
- Y(A(ie), { class: "size-5" }),
1244
- J(" " + P(e.prevText), 1)
1245
- ], 10, Xt)) : I("", !0)
1267
+ _(L(ve), { class: "size-5" }),
1268
+ Q(" " + P(e.prevText), 1)
1269
+ ], 10, el)) : B("", !0)
1246
1270
  ]),
1247
- v("div", Gt, [
1248
- (c(!0), m(O, null, j(s.value, (x, y) => (c(), Z(de(e.page !== "dots" ? "button" : "span"), {
1249
- key: y,
1250
- class: C([
1251
- { "pointer-events-none": x === "dots" },
1252
- x === l.value ? "border-vxvue text-vxvue font-bold" : "border-transparent text-gray-500 hover:border-gray-300",
1253
- i.value,
1271
+ c("div", tl, [
1272
+ (d(!0), m(O, null, Y(r.value, (b, w) => (d(), H(me(e.page !== "dots" ? "button" : "span"), {
1273
+ key: w,
1274
+ class: S([
1275
+ { "pointer-events-none": b === "dots" },
1276
+ b === s.value ? "border-vxvue text-vxvue font-bold" : "border-transparent text-gray-500 hover:border-gray-300",
1277
+ v.value,
1254
1278
  "inline-flex items-center px-4 text-sm"
1255
1279
  ]),
1256
- onClick: (b) => x !== "dots" ? t("update:page", x) : null
1280
+ onClick: (g) => b !== "dots" ? t("update:page", b) : null
1257
1281
  }, {
1258
- default: te(() => [
1259
- J(P(x !== "dots" ? x : "…"), 1)
1282
+ default: ee(() => [
1283
+ Q(P(b !== "dots" ? b : "…"), 1)
1260
1284
  ]),
1261
1285
  _: 2
1262
1286
  }, 1032, ["class", "onClick"]))), 128))
1263
1287
  ]),
1264
- v("div", Jt, [
1265
- e.showNavButtons ? (c(), m("button", {
1288
+ c("div", ll, [
1289
+ e.showNavButtons ? (d(), m("button", {
1266
1290
  key: 0,
1267
- disabled: l.value >= a.value,
1268
- class: C([
1269
- l.value >= a.value ? "pointer-events-none text-gray-500" : "text-vxvue-700",
1291
+ disabled: s.value >= l.value,
1292
+ class: S([
1293
+ s.value >= l.value ? "pointer-events-none text-gray-500" : "text-vxvue-700",
1270
1294
  "inline-flex items-center pr-1 text-sm border-transparent hover:text-vxvue"
1271
1295
  ]),
1272
- onClick: r
1296
+ onClick: n
1273
1297
  }, [
1274
- J(P(e.nextText) + " ", 1),
1275
- Y(A(oe), { class: "size-5" })
1276
- ], 10, Qt)) : I("", !0)
1298
+ Q(P(e.nextText) + " ", 1),
1299
+ _(L(ie), { class: "size-5" })
1300
+ ], 10, al)) : B("", !0)
1277
1301
  ])
1278
1302
  ]));
1279
1303
  }
1280
1304
  };
1281
- function el(e, u) {
1282
- return c(), m("svg", {
1305
+ function sl(e, u) {
1306
+ return d(), m("svg", {
1283
1307
  xmlns: "http://www.w3.org/2000/svg",
1284
1308
  fill: "none",
1285
1309
  viewBox: "0 0 24 24",
@@ -1288,15 +1312,15 @@ function el(e, u) {
1288
1312
  "aria-hidden": "true",
1289
1313
  "data-slot": "icon"
1290
1314
  }, [
1291
- v("path", {
1315
+ c("path", {
1292
1316
  "stroke-linecap": "round",
1293
1317
  "stroke-linejoin": "round",
1294
1318
  d: "M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"
1295
1319
  })
1296
1320
  ]);
1297
1321
  }
1298
- function tl(e, u) {
1299
- return c(), m("svg", {
1322
+ function nl(e, u) {
1323
+ return d(), m("svg", {
1300
1324
  xmlns: "http://www.w3.org/2000/svg",
1301
1325
  fill: "none",
1302
1326
  viewBox: "0 0 24 24",
@@ -1305,295 +1329,296 @@ function tl(e, u) {
1305
1329
  "aria-hidden": "true",
1306
1330
  "data-slot": "icon"
1307
1331
  }, [
1308
- v("path", {
1332
+ c("path", {
1309
1333
  "stroke-linecap": "round",
1310
1334
  "stroke-linejoin": "round",
1311
1335
  d: "M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"
1312
1336
  }),
1313
- v("path", {
1337
+ c("path", {
1314
1338
  "stroke-linecap": "round",
1315
1339
  "stroke-linejoin": "round",
1316
1340
  d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
1317
1341
  })
1318
1342
  ]);
1319
1343
  }
1320
- const ll = ["value", "type"], al = ["disabled"], Tl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1344
+ const ol = ["type"], rl = ["disabled"], Il = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1321
1345
  __name: "PasswordInput",
1322
- props: { modelValue: { type: String, default: "" } },
1346
+ props: {
1347
+ modelValue: {},
1348
+ modelModifiers: {}
1349
+ },
1323
1350
  emits: ["update:modelValue"],
1324
- setup(e, { emit: u }) {
1325
- const t = u, n = $(!1), a = B(() => {
1351
+ setup(e) {
1352
+ const u = te(e, "modelValue"), t = k(!1), a = I(() => {
1326
1353
  let l = Object.assign({}, K());
1327
1354
  return delete l.class, l;
1328
1355
  });
1329
- return (l, i) => (c(), m("div", {
1330
- class: C("inline-block relative " + K().class)
1356
+ return (l, s) => (d(), m("div", {
1357
+ class: S("inline-block relative " + K().class)
1331
1358
  }, [
1332
- v("input", R({
1333
- value: e.modelValue,
1334
- type: n.value ? "text" : "password"
1335
- }, a.value, {
1336
- class: "block pr-12 w-full form-input peer",
1337
- onInput: i[0] || (i[0] = (s) => t("update:modelValue", s.target.value))
1338
- }), null, 16, ll),
1339
- v("button", {
1359
+ le(c("input", R({
1360
+ "onUpdate:modelValue": s[0] || (s[0] = (v) => u.value = v),
1361
+ type: t.value ? "text" : "password"
1362
+ }, a.value, { class: "block pr-12 w-full form-input peer" }), null, 16, ol), [
1363
+ [Ee, u.value]
1364
+ ]),
1365
+ c("button", {
1340
1366
  class: "flex absolute inset-y-0 right-0 items-center px-3 text-brand-700 hover:text-brand",
1341
1367
  "aria-label": "show-password-toggle",
1342
1368
  disabled: K().disabled ?? !1,
1343
- onClick: i[1] || (i[1] = _((s) => n.value = !n.value, ["stop"]))
1369
+ onClick: s[1] || (s[1] = j((v) => t.value = !t.value, ["stop"]))
1344
1370
  }, [
1345
- n.value ? (c(), Z(A(el), {
1371
+ t.value ? (d(), H(L(sl), {
1346
1372
  key: 0,
1347
1373
  class: "size-5"
1348
- })) : (c(), Z(A(tl), {
1374
+ })) : (d(), H(L(nl), {
1349
1375
  key: 1,
1350
1376
  class: "size-5"
1351
1377
  }))
1352
- ], 8, al)
1378
+ ], 8, rl)
1353
1379
  ], 2));
1354
1380
  }
1355
- }), sl = { class: "flex items-center pb-1" }, nl = {
1381
+ }), ul = { class: "flex items-center pb-1" }, il = {
1356
1382
  key: 0,
1357
1383
  class: "ml-6"
1358
- }, zl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1384
+ }, Nl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1359
1385
  __name: "SimpleTree",
1360
- props: {
1361
- branch: { type: Object, default: () => ({}) },
1362
- modelValue: { type: Object, default: null }
1363
- },
1364
- emits: ["update:modelValue", "expand"],
1386
+ props: /* @__PURE__ */ Z({ branch: { type: Object, default: () => ({}) } }, {
1387
+ modelValue: { type: Object, default: null },
1388
+ modelModifiers: {}
1389
+ }),
1390
+ emits: /* @__PURE__ */ Z(["expand"], ["update:modelValue"]),
1365
1391
  setup(e, { emit: u }) {
1366
- const t = e, n = u, a = $(!1);
1367
- return he(() => {
1368
- t.branch === t.modelValue && n("expand", !0);
1369
- }), (l, i) => {
1370
- const s = Pe("simple-tree", !0);
1371
- return c(), m("div", {
1372
- class: C([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", l.$attrs.class])
1392
+ const t = e, a = u, l = te(e, "modelValue"), s = k(!1);
1393
+ return xe(() => {
1394
+ t.branch === l.value && a("expand", !0);
1395
+ }), (v, r) => {
1396
+ const o = Fe("simple-tree", !0);
1397
+ return d(), m("div", {
1398
+ class: S([!e.branch.branches || !e.branch.branches.length ? "terminates" : "", v.$attrs.class])
1373
1399
  }, [
1374
- v("div", sl, [
1375
- e.branch.branches && e.branch.branches.length ? (c(), m("button", {
1400
+ c("div", ul, [
1401
+ e.branch.branches && e.branch.branches.length ? (d(), m("button", {
1376
1402
  key: 0,
1377
1403
  class: "mr-2",
1378
- onClick: i[0] || (i[0] = (o) => a.value = !a.value)
1404
+ onClick: r[0] || (r[0] = (n) => s.value = !s.value)
1379
1405
  }, [
1380
- L(l.$slots, "toggle", {
1406
+ T(v.$slots, "toggle", {
1381
1407
  branch: e.branch,
1382
- expanded: a.value
1408
+ expanded: s.value
1383
1409
  }, () => [
1384
- (c(), Z(de(a.value ? A(Fe) : A(_e)), { class: "p-1 text-white rounded-xs size-5 bg-vxvue-700 hover:bg-vxvue" }))
1410
+ (d(), H(me(s.value ? L(Ze) : L(Ue)), { class: "p-0.5 text-white rounded size-5 bg-vxvue-700 hover:bg-vxvue" }))
1385
1411
  ])
1386
- ])) : I("", !0),
1387
- e.branch === e.modelValue ? L(l.$slots, "label-selected", {
1412
+ ])) : B("", !0),
1413
+ e.branch === l.value ? T(v.$slots, "label-selected", {
1388
1414
  key: 1,
1389
1415
  branch: e.branch
1390
1416
  }, () => [
1391
- v("strong", null, P(e.branch.label), 1)
1392
- ]) : (c(), m("button", {
1417
+ c("strong", null, P(e.branch.label), 1)
1418
+ ]) : (d(), m("button", {
1393
1419
  key: 2,
1394
- onClick: i[1] || (i[1] = (o) => n("update:modelValue", e.branch))
1420
+ onClick: r[1] || (r[1] = (n) => l.value = e.branch)
1395
1421
  }, [
1396
- L(l.$slots, "label", { branch: e.branch }, () => [
1397
- J(P(e.branch.label), 1)
1422
+ T(v.$slots, "label", { branch: e.branch }, () => [
1423
+ Q(P(e.branch.label), 1)
1398
1424
  ])
1399
1425
  ]))
1400
1426
  ]),
1401
- e.branch.branches && e.branch.branches.length ? re((c(), m("div", nl, [
1402
- (c(!0), m(O, null, j(e.branch.branches, (o) => (c(), Z(s, {
1403
- key: o.id || o.key || null,
1404
- branch: o,
1405
- "model-value": e.modelValue,
1406
- "onUpdate:modelValue": i[2] || (i[2] = (r) => n("update:modelValue", r)),
1407
- onExpand: i[3] || (i[3] = (r) => {
1408
- a.value = r, n("expand", r);
1427
+ e.branch.branches && e.branch.branches.length ? le((d(), m("div", il, [
1428
+ (d(!0), m(O, null, Y(e.branch.branches, (n) => (d(), H(o, {
1429
+ key: n.id || n.key || null,
1430
+ branch: n,
1431
+ modelValue: l.value,
1432
+ "onUpdate:modelValue": r[2] || (r[2] = (i) => l.value = i),
1433
+ onExpand: r[3] || (r[3] = (i) => {
1434
+ s.value = i, a("expand", i);
1409
1435
  })
1410
- }, Be({ _: 2 }, [
1411
- j(l.$slots, (r, d) => ({
1412
- name: d,
1413
- fn: te((f) => [
1414
- L(l.$slots, d, R({ ref_for: !0 }, f))
1436
+ }, _e({ _: 2 }, [
1437
+ Y(v.$slots, (i, f) => ({
1438
+ name: f,
1439
+ fn: ee((b) => [
1440
+ T(v.$slots, f, R({ ref_for: !0 }, b))
1415
1441
  ])
1416
1442
  }))
1417
- ]), 1032, ["branch", "model-value"]))), 128))
1443
+ ]), 1032, ["branch", "modelValue"]))), 128))
1418
1444
  ], 512)), [
1419
- [me, a.value]
1420
- ]) : I("", !0)
1445
+ [fe, s.value]
1446
+ ]) : B("", !0)
1421
1447
  ], 2);
1422
1448
  };
1423
1449
  }
1424
- }), Pl = {
1450
+ }), Ol = {
1425
1451
  __name: "Sizable",
1426
1452
  props: { vertical: Boolean },
1427
1453
  emits: ["dragStart", "dragStop"],
1428
1454
  setup(e, { emit: u }) {
1429
- const t = e, n = u, a = $(null), l = $(null);
1430
- let i = !1, s = {}, o = null, r = null, d = null;
1431
- const f = (b) => {
1432
- var T;
1433
- if (i) {
1434
- b.preventDefault();
1435
- const { pageX: p, pageY: k } = ((T = b.touches) == null ? void 0 : T[0]) ?? b;
1436
- t.vertical ? a.value.style.height = Math.min(r.height - d.height - (o.y - r.y), Math.max(0, o.height + k - s.y)) + "px" : a.value.style.width = Math.min(r.width - d.width - (o.x - r.x), Math.max(0, o.width + p - s.x)) + "px";
1455
+ const t = e, a = u, l = k(null), s = k(null);
1456
+ let v = !1, r = {}, o = null, n = null, i = null;
1457
+ const f = (g) => {
1458
+ if (v) {
1459
+ g.preventDefault();
1460
+ const { pageX: M, pageY: y } = g.touches?.[0] ?? g;
1461
+ t.vertical ? l.value.style.height = Math.min(n.height - i.height - (o.y - n.y), Math.max(0, o.height + y - r.y)) + "px" : l.value.style.width = Math.min(n.width - i.width - (o.x - n.x), Math.max(0, o.width + M - r.x)) + "px";
1437
1462
  }
1438
- }, x = (b) => {
1439
- var k;
1440
- b.preventDefault(), b.currentTarget.focus(), i = !0;
1441
- const { pageX: T, pageY: p } = ((k = b.touches) == null ? void 0 : k[0]) ?? b;
1442
- s = { x: T, y: p }, d = l.value.getBoundingClientRect(), o = a.value.getBoundingClientRect(), r = a.value.parentElement.getBoundingClientRect(), b.type === "mousedown" ? (document.addEventListener("mousemove", f), document.addEventListener("mouseup", y)) : (document.addEventListener("touchmove", f), document.addEventListener("touchend", y)), n("dragStart");
1443
- }, y = (b) => {
1444
- i && (i = !1, b.type === "mouseup" ? (document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", y)) : (document.removeEventListener("touchmove", f), document.removeEventListener("touchend", y)), setTimeout(() => n("dragStop"), 0));
1463
+ }, b = (g) => {
1464
+ g.preventDefault(), g.currentTarget.focus(), v = !0;
1465
+ const { pageX: M, pageY: y } = g.touches?.[0] ?? g;
1466
+ r = { x: M, y }, i = s.value.getBoundingClientRect(), o = l.value.getBoundingClientRect(), n = l.value.parentElement.getBoundingClientRect(), g.type === "mousedown" ? (document.addEventListener("mousemove", f), document.addEventListener("mouseup", w)) : (document.addEventListener("touchmove", f), document.addEventListener("touchend", w)), a("dragStart");
1467
+ }, w = (g) => {
1468
+ v && (v = !1, g.type === "mouseup" ? (document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", w)) : (document.removeEventListener("touchmove", f), document.removeEventListener("touchend", w)), setTimeout(() => a("dragStop"), 0));
1445
1469
  };
1446
- return (b, T) => (c(), m("div", {
1470
+ return (g, M) => (d(), m("div", {
1447
1471
  ref_key: "box",
1448
- ref: a,
1472
+ ref: l,
1449
1473
  class: "relative"
1450
1474
  }, [
1451
- L(b.$slots, "default"),
1452
- v("div", R({
1475
+ T(g.$slots, "default"),
1476
+ c("div", R({
1453
1477
  ref_key: "handle",
1454
- ref: l,
1478
+ ref: s,
1455
1479
  class: ["absolute flex", t.vertical ? "inset-x-0 top-full justify-center py-1 cursor-ns-resize" : "inset-y-0 left-full items-center px-1 cursor-ew-resize"]
1456
- }, ue({
1457
- touchstart: x,
1458
- mousedown: x,
1459
- touchend: y,
1460
- mouseup: y
1480
+ }, ce({
1481
+ touchstart: b,
1482
+ mousedown: b,
1483
+ touchend: w,
1484
+ mouseup: w
1461
1485
  }, !0)), [
1462
- L(b.$slots, "handle", {}, () => [
1463
- v("div", {
1464
- class: C(["rounded-full bg-vxvue", t.vertical ? "h-1.5 w-8" : "h-8 w-1.5"])
1486
+ T(g.$slots, "handle", {}, () => [
1487
+ c("div", {
1488
+ class: S(["rounded-full bg-vxvue", t.vertical ? "h-1.5 w-8" : "h-8 w-1.5"])
1465
1489
  }, null, 2)
1466
1490
  ])
1467
1491
  ], 16)
1468
1492
  ], 512));
1469
1493
  }
1470
- }, ol = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext"], rl = ["id"], ul = ["id", "aria-label"], Bl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1494
+ }, dl = ["aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext"], cl = ["id"], vl = ["id", "aria-label"], El = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1471
1495
  __name: "Slider",
1472
- props: {
1496
+ props: /* @__PURE__ */ Z({
1473
1497
  min: { type: Number, default: 0 },
1474
1498
  max: { type: Number, default: 100 },
1475
1499
  vertical: Boolean,
1476
- disabled: Boolean,
1477
- modelValue: { type: [Number, Array], default: null, validator(e) {
1478
- return typeof e == "number" || e.every((u) => typeof u == "number");
1479
- } }
1480
- },
1481
- emits: ["update:modelValue", "dragStart", "dragStop"],
1500
+ disabled: Boolean
1501
+ }, {
1502
+ modelValue: {
1503
+ type: [Number, Array],
1504
+ default: null,
1505
+ validator(e) {
1506
+ return typeof e == "number" || e.every((u) => typeof u == "number");
1507
+ }
1508
+ },
1509
+ modelModifiers: {}
1510
+ }),
1511
+ emits: /* @__PURE__ */ Z(["dragStart", "dragStop"], ["update:modelValue"]),
1482
1512
  setup(e, { emit: u }) {
1483
- const t = e, n = u, a = K(), l = { x: null, y: null }, i = { w: null, h: null };
1484
- let s = !1;
1485
- const o = $(null), r = $(0), d = B(() => {
1486
- const S = t.max, M = t.min;
1487
- return t.modelValue instanceof Array ? t.modelValue.map((F) => (Math.max(Math.min(F, S), M) - M) * 100 / (S - M)) : (Math.max(Math.min(t.modelValue, S), M) - M) * 100 / (S - M);
1488
- }), f = B(() => {
1489
- if (t.modelValue instanceof Array) {
1490
- const S = Math.min(...d.value) + "%", M = Math.max(...d.value) - Math.min(...d.value) + "%";
1491
- return t.vertical ? { bottom: S, height: M } : { left: S, width: M };
1513
+ const t = e, a = te(e, "modelValue"), l = u, s = K(), v = { x: null, y: null }, r = { w: null, h: null };
1514
+ let o = !1;
1515
+ const n = k(null), i = k(0), f = I(() => {
1516
+ const $ = t.max, D = t.min;
1517
+ return a.value instanceof Array ? a.value.map((p) => (Math.max(Math.min(p, $), D) - D) * 100 / ($ - D)) : (Math.max(Math.min(a.value, $), D) - D) * 100 / ($ - D);
1518
+ }), b = I(() => {
1519
+ if (a.value instanceof Array) {
1520
+ const $ = Math.min(...f.value) + "%", D = Math.max(...f.value) - Math.min(...f.value) + "%";
1521
+ return t.vertical ? { bottom: $, height: D } : { left: $, width: D };
1492
1522
  }
1493
- return t.vertical ? { bottom: 0, height: d.value + "%" } : { width: d.value + "%" };
1494
- }), x = $({
1523
+ return t.vertical ? { bottom: 0, height: f.value + "%" } : { width: f.value + "%" };
1524
+ }), w = k({
1495
1525
  class: (t.vertical ? "left-0 -translate-x-1.5 translate-y-2.5" : "top-0 -translate-x-2.5 -translate-y-1.5") + " touch-none absolute size-5 rounded-full border-2 bg-white transition-colors duration-200 " + (t.disabled ? "" : " focus:ring-4 focus:outline-hidden border-vxvue cursor-grab hover:bg-vxvue focus:ring-vxvue/50"),
1496
1526
  tabindex: 0
1497
- }), y = (S) => {
1498
- let M = parseFloat(S.toFixed(10));
1499
- if (M = Math.min(t.max, Math.max(t.min, M)), t.modelValue instanceof Array) {
1500
- let F = [...t.modelValue];
1501
- F[r.value] = M, n("update:modelValue", F);
1502
- } else
1503
- n("update:modelValue", M);
1504
- }, b = (S) => {
1505
- const { pageX: M, pageY: F } = S.touches ? S.touches[0] : S, h = t.vertical ? (-F + l.y) / i.h : (M - l.x) / i.w;
1506
- y(Math.floor((t.max - t.min) * h + t.min));
1507
- }, T = () => {
1508
- const { clientLeft: S, clientTop: M, scrollLeft: F, scrollTop: h } = document.documentElement, g = o.value.getBoundingClientRect();
1509
- l.x = g.left + F - S, l.y = g.bottom + h - M, i.w = o.value.offsetWidth, i.h = o.value.offsetHeight;
1510
- }, p = (S) => {
1511
- s && (S.preventDefault(), b(S));
1512
- }, k = (S) => {
1513
- S.preventDefault(), S.currentTarget.focus(), T(), s = !0, S.type === "mousedown" ? (document.addEventListener("mousemove", p), document.addEventListener("mouseup", D)) : (document.addEventListener("touchmove", p), document.addEventListener("touchend", D)), n("dragStart");
1514
- }, D = (S) => {
1515
- s && (s = !1, S.type === "mouseup" ? (document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", D)) : (document.removeEventListener("touchmove", p), document.removeEventListener("touchend", D)), setTimeout(() => n("dragStop"), 0));
1516
- }, W = (S) => {
1517
- S.keyCode >= 33 && S.keyCode <= 40 && S.preventDefault();
1518
- const M = t.modelValue[r.value] ?? t.modelValue;
1519
- switch (S.keyCode) {
1527
+ }), g = ($) => {
1528
+ let D = parseFloat($.toFixed(10));
1529
+ D = Math.min(t.max, Math.max(t.min, D)), a.value instanceof Array ? a.value[i.value] = D : a.value = D;
1530
+ }, M = ($) => {
1531
+ const { pageX: D, pageY: p } = $.touches ? $.touches[0] : $, h = t.vertical ? (-p + v.y) / r.h : (D - v.x) / r.w;
1532
+ g(Math.floor((t.max - t.min) * h + t.min));
1533
+ }, y = () => {
1534
+ const { clientLeft: $, clientTop: D, scrollLeft: p, scrollTop: h } = document.documentElement, x = n.value.getBoundingClientRect();
1535
+ v.x = x.left + p - $, v.y = x.bottom + h - D, r.w = n.value.offsetWidth, r.h = n.value.offsetHeight;
1536
+ }, C = ($) => {
1537
+ o && ($.preventDefault(), M($));
1538
+ }, V = ($) => {
1539
+ $.preventDefault(), $.currentTarget.focus(), y(), o = !0, $.type === "mousedown" ? (document.addEventListener("mousemove", C), document.addEventListener("mouseup", E)) : (document.addEventListener("touchmove", C), document.addEventListener("touchend", E)), l("dragStart");
1540
+ }, E = ($) => {
1541
+ o && (o = !1, $.type === "mouseup" ? (document.removeEventListener("mousemove", C), document.removeEventListener("mouseup", E)) : (document.removeEventListener("touchmove", C), document.removeEventListener("touchend", E)), setTimeout(() => l("dragStop"), 0));
1542
+ }, G = ($) => {
1543
+ $.keyCode >= 33 && $.keyCode <= 40 && $.preventDefault();
1544
+ const D = a.value[i.value] ?? a.value;
1545
+ switch ($.keyCode) {
1520
1546
  case 37:
1521
1547
  case 40:
1522
- y(M - 1);
1548
+ g(D - 1);
1523
1549
  break;
1524
1550
  case 39:
1525
1551
  case 38:
1526
- y(M + 1);
1552
+ g(D + 1);
1527
1553
  break;
1528
1554
  case 33:
1529
- y(M + (t.max - t.min) / 10);
1555
+ g(D + (t.max - t.min) / 10);
1530
1556
  break;
1531
1557
  case 34:
1532
- y(M - (t.max - t.min) / 10);
1558
+ g(D - (t.max - t.min) / 10);
1533
1559
  break;
1534
1560
  case 36:
1535
- y(t.min);
1561
+ g(t.min);
1536
1562
  break;
1537
1563
  case 35:
1538
- y(t.max);
1564
+ g(t.max);
1539
1565
  }
1540
- }, H = (S) => {
1541
- T(), b(S);
1566
+ }, q = ($) => {
1567
+ y(), M($);
1542
1568
  };
1543
- return (S, M) => (c(), m("div", R({
1569
+ return ($, D) => (d(), m("div", R({
1544
1570
  ref_key: "track",
1545
- ref: o,
1571
+ ref: n,
1546
1572
  class: ["relative bg-slate-300", e.vertical ? "h-full w-2 rounded-t-full rounded-b-full" : "w-full h-2 rounded-r-full rounded-l-full"],
1547
1573
  role: "slider",
1548
1574
  "aria-label": "slider-thumb",
1549
1575
  "aria-valuemin": e.min,
1550
- "aria-valuemax": t.max,
1551
- "aria-valuenow": e.modelValue[0] ?? e.modelValue,
1552
- "aria-valuetext": e.modelValue
1553
- }, ue(e.disabled ? {} : {
1554
- click: H
1576
+ "aria-valuemax": e.max,
1577
+ "aria-valuenow": a.value[0] ?? a.value,
1578
+ "aria-valuetext": a.value
1579
+ }, ce(e.disabled ? {} : {
1580
+ click: q
1555
1581
  }, !0)), [
1556
- e.disabled ? I("", !0) : (c(), m("div", {
1582
+ e.disabled ? B("", !0) : (d(), m("div", {
1557
1583
  key: 0,
1558
- class: C(["absolute bg-vxvue", e.vertical ? "w-full rounded-t-full rounded-b-full" : "h-full rounded-r-full rounded-l-full"]),
1559
- style: we(f.value)
1584
+ class: S(["absolute bg-vxvue", e.vertical ? "w-full rounded-t-full rounded-b-full" : "h-full rounded-r-full rounded-l-full"]),
1585
+ style: Se(b.value)
1560
1586
  }, null, 6)),
1561
- e.modelValue.length ? (c(!0), m(O, { key: 2 }, j(e.modelValue, (F, h) => (c(), m("button", R({
1562
- id: h ? null : A(a).id,
1563
- style: e.vertical ? { bottom: d.value[h] + "%" } : { left: d.value[h] + "%" },
1564
- "aria-label": "slider-thumb-" + (h + 1),
1565
- ref_for: !0
1566
- }, x.value, ue(e.disabled ? {} : {
1567
- focus: () => r.value = h,
1568
- keydown: W,
1569
- touchstart: (g) => {
1570
- r.value = h, k(g);
1587
+ a.value.length ? (d(!0), m(O, { key: 2 }, Y(a.value, (p, h) => (d(), m("button", R({
1588
+ id: h ? null : L(s).id,
1589
+ style: e.vertical ? { bottom: f.value[h] + "%" } : { left: f.value[h] + "%" },
1590
+ "aria-label": "slider-thumb-" + (h + 1)
1591
+ }, { ref_for: !0 }, w.value, ce(e.disabled ? {} : {
1592
+ focus: () => i.value = h,
1593
+ keydown: G,
1594
+ touchstart: (x) => {
1595
+ i.value = h, V(x);
1571
1596
  },
1572
- mousedown: (g) => {
1573
- r.value = h, k(g);
1597
+ mousedown: (x) => {
1598
+ i.value = h, V(x);
1574
1599
  },
1575
- touchend: D,
1576
- mouseup: D
1577
- }, !0)), null, 16, ul))), 256)) : (c(), m("button", R({
1600
+ touchend: E,
1601
+ mouseup: E
1602
+ }, !0)), null, 16, vl))), 256)) : (d(), m("button", R({
1578
1603
  key: 1,
1579
- id: A(a).id,
1580
- style: e.vertical ? { bottom: d.value + "%" } : { left: d.value + "%" },
1604
+ id: L(s).id,
1605
+ style: e.vertical ? { bottom: f.value + "%" } : { left: f.value + "%" },
1581
1606
  "aria-label": "slider-thumb"
1582
- }, x.value, ue(e.disabled ? {} : {
1583
- focus: () => r.value = 0,
1584
- keydown: W,
1585
- touchstart: (F) => {
1586
- r.value = 0, k(F);
1607
+ }, w.value, ce(e.disabled ? {} : {
1608
+ focus: () => i.value = 0,
1609
+ keydown: G,
1610
+ touchstart: (p) => {
1611
+ i.value = 0, V(p);
1587
1612
  },
1588
- mousedown: (F) => {
1589
- r.value = 0, k(F);
1613
+ mousedown: (p) => {
1614
+ i.value = 0, V(p);
1590
1615
  },
1591
- touchend: D,
1592
- mouseup: D
1593
- }, !0)), null, 16, rl))
1594
- ], 16, ol));
1616
+ touchend: E,
1617
+ mouseup: E
1618
+ }, !0)), null, 16, cl))
1619
+ ], 16, dl));
1595
1620
  }
1596
- }), il = ["data-active", "onClick"], dl = { class: "flex items-center space-x-1" }, cl = ["data-active"], Il = {
1621
+ }), fl = ["data-active", "onClick"], ml = { class: "flex items-center space-x-1" }, hl = ["data-active"], Fl = {
1597
1622
  __name: "Sortable",
1598
1623
  props: {
1599
1624
  columns: {
@@ -1617,68 +1642,68 @@ const ll = ["value", "type"], al = ["disabled"], Tl = /* @__PURE__ */ Object.ass
1617
1642
  },
1618
1643
  emits: ["before-sort", "after-sort"],
1619
1644
  setup(e, { emit: u }) {
1620
- const t = e, n = u, a = $(t.sortProp), l = $(t.sortDirection), i = B(() => {
1645
+ const t = e, a = u, l = k(t.sortProp), s = k(t.sortDirection), v = I(() => {
1621
1646
  let o = t.rows.slice();
1622
- const r = t.columns.find(({ prop: d }) => d === a.value);
1623
- return r && (l.value === "asc" && r.sortAscFunction ? o.sort(r.sortAscFunction) : l.value === "desc" && r.sortDescFunction ? o.sort(r.sortDescFunction) : o.sort((d, f) => d[a.value] < f[a.value] ? l.value === "asc" ? -1 : 1 : d[a.value] > f[a.value] ? l.value === "asc" ? 1 : -1 : 0)), o.slice(t.offset || 0, (t.offset || 0) + (t.count || o.length));
1624
- }), s = (o) => {
1625
- n("before-sort", { prop: a.value, dir: l.value }), a.value === o ? l.value = l.value === "asc" ? "desc" : "asc" : (a.value = o, l.value = l.value || "asc"), fe(() => n("after-sort", { prop: a.value, dir: l.value }));
1647
+ const n = t.columns.find(({ prop: i }) => i === l.value);
1648
+ return n && (s.value === "asc" && n.sortAscFunction ? o.sort(n.sortAscFunction) : s.value === "desc" && n.sortDescFunction ? o.sort(n.sortDescFunction) : o.sort((i, f) => i[l.value] < f[l.value] ? s.value === "asc" ? -1 : 1 : i[l.value] > f[l.value] ? s.value === "asc" ? 1 : -1 : 0)), o.slice(t.offset || 0, (t.offset || 0) + (t.count || o.length));
1649
+ }), r = (o) => {
1650
+ a("before-sort", { prop: l.value, dir: s.value }), l.value === o ? s.value = s.value === "asc" ? "desc" : "asc" : (l.value = o, s.value = s.value || "asc"), be(() => a("after-sort", { prop: l.value, dir: s.value }));
1626
1651
  };
1627
- return (o, r) => (c(), m("table", {
1628
- class: C(o.$attrs.class || "w-full divide-y divide-y-slate-900 table-fixed")
1652
+ return (o, n) => (d(), m("table", {
1653
+ class: S(o.$attrs.class || "w-full divide-y divide-y-slate-900 table-fixed")
1629
1654
  }, [
1630
- v("thead", {
1631
- class: C(e.headerClass)
1655
+ c("thead", {
1656
+ class: S(e.headerClass)
1632
1657
  }, [
1633
- v("tr", null, [
1634
- (c(!0), m(O, null, j(e.columns, (d) => (c(), m("th", {
1635
- key: d.prop,
1658
+ c("tr", null, [
1659
+ (d(!0), m(O, null, Y(e.columns, (i) => (d(), m("th", {
1660
+ key: i.prop,
1636
1661
  scope: "col",
1637
- "data-active": a.value === d.prop ? "active" : null,
1638
- class: C([
1662
+ "data-active": l.value === i.prop ? "active" : null,
1663
+ class: S([
1639
1664
  "py-3 px-6 text-left",
1640
- { "cursor-pointer": d.sortable },
1641
- d.cssClass
1665
+ { "cursor-pointer": i.sortable },
1666
+ i.cssClass
1642
1667
  ]),
1643
- onClick: (f) => d.sortable ? s(d.prop) : null
1668
+ onClick: (f) => i.sortable ? r(i.prop) : null
1644
1669
  }, [
1645
- L(o.$slots, d.prop + "-header", {
1646
- column: d,
1647
- sortDir: l.value,
1648
- sortProp: a.value
1670
+ T(o.$slots, i.prop + "-header", {
1671
+ column: i,
1672
+ sortDir: s.value,
1673
+ sortProp: l.value
1649
1674
  }, () => [
1650
- v("div", dl, [
1651
- v("span", null, P(d.label), 1),
1652
- d.sortable ? (c(), Z(de(a.value !== d.prop ? A(Oe) : l.value === "asc" ? A(Ne) : A(Ee)), {
1675
+ c("div", ml, [
1676
+ c("span", null, P(i.label), 1),
1677
+ i.sortable ? (d(), H(me(l.value !== i.prop ? L(Re) : s.value === "asc" ? L(Ye) : L(He)), {
1653
1678
  key: 0,
1654
1679
  class: "size-4"
1655
- })) : I("", !0)
1680
+ })) : B("", !0)
1656
1681
  ])
1657
1682
  ])
1658
- ], 10, il))), 128))
1683
+ ], 10, fl))), 128))
1659
1684
  ])
1660
1685
  ], 2),
1661
- v("tbody", {
1662
- class: C(e.bodyClass)
1686
+ c("tbody", {
1687
+ class: S(e.bodyClass)
1663
1688
  }, [
1664
- (c(!0), m(O, null, j(i.value, (d) => (c(), m("tr", {
1665
- key: d[e.keyProperty],
1666
- class: C(d.cssClass)
1689
+ (d(!0), m(O, null, Y(v.value, (i) => (d(), m("tr", {
1690
+ key: i[e.keyProperty],
1691
+ class: S(i.cssClass)
1667
1692
  }, [
1668
- (c(!0), m(O, null, j(e.columns, (f) => (c(), m("td", {
1693
+ (d(!0), m(O, null, Y(e.columns, (f) => (d(), m("td", {
1669
1694
  key: f.prop,
1670
- "data-active": a.value === f.prop ? "active" : null,
1695
+ "data-active": l.value === f.prop ? "active" : null,
1671
1696
  class: "overflow-hidden py-3 px-6 whitespace-nowrap text-ellipsis"
1672
1697
  }, [
1673
- L(o.$slots, f.prop, { row: d }, () => [
1674
- J(P(d[f.prop]), 1)
1698
+ T(o.$slots, f.prop, { row: i }, () => [
1699
+ Q(P(i[f.prop]), 1)
1675
1700
  ])
1676
- ], 8, cl))), 128))
1701
+ ], 8, hl))), 128))
1677
1702
  ], 2))), 128))
1678
1703
  ], 2)
1679
1704
  ], 2));
1680
1705
  }
1681
- }, vl = { class: "flex items-center space-x-2" }, ml = ["disabled"], fl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1706
+ }, pl = { class: "flex items-center space-x-2" }, gl = ["disabled"], bl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1682
1707
  __name: "SubmitButton",
1683
1708
  props: {
1684
1709
  busy: Boolean,
@@ -1688,25 +1713,25 @@ const ll = ["value", "type"], al = ["disabled"], Tl = /* @__PURE__ */ Object.ass
1688
1713
  emits: ["submit"],
1689
1714
  setup(e, { emit: u }) {
1690
1715
  const t = u;
1691
- return (n, a) => (c(), m("div", vl, [
1692
- v("button", {
1693
- class: C([n.$attrs.class, e.theme]),
1694
- disabled: n.$attrs.disabled || e.busy,
1716
+ return (a, l) => (d(), m("div", pl, [
1717
+ c("button", {
1718
+ class: S([a.$attrs.class, e.theme]),
1719
+ disabled: a.$attrs.disabled || e.busy,
1695
1720
  type: "button",
1696
- onClick: a[0] || (a[0] = (l) => t("submit"))
1721
+ onClick: l[0] || (l[0] = (s) => t("submit"))
1697
1722
  }, [
1698
- L(n.$slots, "default", {}, void 0, !0)
1699
- ], 10, ml),
1700
- e.busy ? (c(), Z(ke, {
1723
+ T(a.$slots, "default", {}, void 0, !0)
1724
+ ], 10, gl),
1725
+ e.busy ? (d(), H(Ce, {
1701
1726
  key: 0,
1702
- class: C(e.spinnerClass || ["size-5", { error: "text-error", success: "text-success", default: "text-vxvue" }[e.theme || "default"]])
1703
- }, null, 8, ["class"])) : I("", !0)
1727
+ class: S(e.spinnerClass || ["size-5", { error: "text-error", success: "text-success", default: "text-vxvue" }[e.theme || "default"]])
1728
+ }, null, 8, ["class"])) : B("", !0)
1704
1729
  ]));
1705
1730
  }
1706
- }), Nl = /* @__PURE__ */ Ce(fl, [["__scopeId", "data-v-55a337c8"]]), hl = { class: "sm:hidden" }, pl = { class: "hidden sm:block" }, gl = { class: "border-b border-gray-200" }, bl = {
1731
+ }), _l = /* @__PURE__ */ Me(bl, [["__scopeId", "data-v-646b7a90"]]), xl = { class: "sm:hidden" }, yl = { class: "hidden sm:block" }, wl = { class: "border-b border-gray-200" }, kl = {
1707
1732
  class: "flex -mb-px space-x-8",
1708
1733
  "aria-label": "Tabs"
1709
- }, xl = ["aria-current", "onClick"], Ol = {
1734
+ }, $l = ["aria-current", "onClick"], jl = {
1710
1735
  __name: "Tabs",
1711
1736
  props: {
1712
1737
  items: { type: Array, default: () => [] },
@@ -1714,119 +1739,117 @@ const ll = ["value", "type"], al = ["disabled"], Tl = /* @__PURE__ */ Object.ass
1714
1739
  },
1715
1740
  emits: ["update:activeIndex"],
1716
1741
  setup(e, { emit: u }) {
1717
- const t = e, n = u, a = $(t.items[t.activeIndex] || {}), l = B(() => {
1718
- let s = [];
1719
- return t.items.forEach((o, r) => {
1720
- o.disabled || s.push({ label: o.name, key: r });
1721
- }), s;
1742
+ const t = e, a = u, l = k(t.items[t.activeIndex] || {}), s = I(() => {
1743
+ let r = [];
1744
+ return t.items.forEach((o, n) => {
1745
+ o.disabled || r.push({ label: o.name, key: n });
1746
+ }), r;
1722
1747
  });
1723
- X(() => t.activeIndex, (s) => {
1724
- a.value = t.items[s] || {};
1748
+ X(() => t.activeIndex, (r) => {
1749
+ l.value = t.items[r] || {};
1725
1750
  });
1726
- const i = (s) => {
1727
- s.disabled || (a.value = s, n("update:activeIndex", t.items.indexOf(s)));
1751
+ const v = (r) => {
1752
+ r.disabled || (l.value = r, a("update:activeIndex", t.items.indexOf(r)));
1728
1753
  };
1729
- return (s, o) => (c(), m(O, null, [
1730
- v("div", hl, [
1731
- Y(zt, {
1732
- options: l.value,
1754
+ return (r, o) => (d(), m(O, null, [
1755
+ c("div", xl, [
1756
+ _(Ot, {
1757
+ options: s.value,
1733
1758
  "model-value": e.activeIndex,
1734
1759
  class: "w-full",
1735
- "onUpdate:modelValue": o[0] || (o[0] = (r) => n("update:activeIndex", r))
1760
+ "onUpdate:modelValue": o[0] || (o[0] = (n) => a("update:activeIndex", n))
1736
1761
  }, null, 8, ["options", "model-value"])
1737
1762
  ]),
1738
- v("div", pl, [
1739
- v("div", gl, [
1740
- v("nav", bl, [
1741
- (c(!0), m(O, null, j(e.items, (r) => (c(), m("a", {
1742
- key: r.name,
1763
+ c("div", yl, [
1764
+ c("div", wl, [
1765
+ c("nav", kl, [
1766
+ (d(!0), m(O, null, Y(e.items, (n) => (d(), m("a", {
1767
+ key: n.name,
1743
1768
  href: "#",
1744
- class: C([
1769
+ class: S([
1745
1770
  "group inline-flex items-center py-4 px-1 border-b-4 font-medium no-underline! border-transparent",
1746
1771
  {
1747
- "border-vxvue text-vxvue": a.value === r,
1748
- "cursor-not-allowed text-gray-400": r.disabled,
1749
- "text-gray-900 hover:text-vxvue-600 hover:border-vxvue-600": a.value !== r && !r.disabled
1772
+ "border-vxvue text-vxvue": l.value === n,
1773
+ "cursor-not-allowed text-gray-400": n.disabled,
1774
+ "text-gray-900 hover:text-vxvue-600 hover:border-vxvue-600": l.value !== n && !n.disabled
1750
1775
  }
1751
1776
  ]),
1752
- "aria-current": a.value === r ? "page" : void 0,
1753
- onClick: _((d) => i(r), ["prevent"])
1777
+ "aria-current": l.value === n ? "page" : void 0,
1778
+ onClick: j((i) => v(n), ["prevent"])
1754
1779
  }, [
1755
- L(s.$slots, "icon", { tab: r }),
1756
- v("span", null, [
1757
- L(s.$slots, "default", { tab: r }, () => [
1758
- J(P(r.name), 1)
1780
+ T(r.$slots, "icon", { tab: n }),
1781
+ c("span", null, [
1782
+ T(r.$slots, "default", { tab: n }, () => [
1783
+ Q(P(n.name), 1)
1759
1784
  ])
1760
1785
  ]),
1761
- L(s.$slots, "badge", { tab: r }, () => [
1762
- r.badge ? (c(), m("span", {
1786
+ T(r.$slots, "badge", { tab: n }, () => [
1787
+ n.badge ? (d(), m("span", {
1763
1788
  key: 0,
1764
- class: C([
1789
+ class: S([
1765
1790
  "hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block text-current",
1766
1791
  {
1767
- "bg-gray-100": r.disabled,
1768
- "bg-vxvue-50": a.value === r,
1769
- "bg-gray-200": a.value !== r && !r.disabled
1792
+ "bg-gray-100": n.disabled,
1793
+ "bg-vxvue-50": l.value === n,
1794
+ "bg-gray-200": l.value !== n && !n.disabled
1770
1795
  }
1771
1796
  ])
1772
- }, P(r.badge), 3)) : I("", !0)
1797
+ }, P(n.badge), 3)) : B("", !0)
1773
1798
  ])
1774
- ], 10, xl))), 128))
1799
+ ], 10, $l))), 128))
1775
1800
  ])
1776
1801
  ])
1777
1802
  ])
1778
1803
  ], 64));
1779
1804
  }
1780
- }, El = {
1805
+ }, Yl = {
1781
1806
  mounted: (e) => e.focus()
1782
- }, Fl = {
1807
+ }, Rl = {
1783
1808
  mounted: (e, u) => {
1784
- var t, n;
1785
1809
  if (!["INPUT", "TEXTAREA"].includes(e.nodeName)) {
1786
- let a = e.querySelector('input:not([type]),input[type="text"],input[type="search"],input[type="email"],input[type="password"],input[type="url"],input[type="tel"]');
1787
- a || (a = e.querySelector("textarea")), e = a;
1810
+ let t = e.querySelector('input:not([type]),input[type="text"],input[type="search"],input[type="email"],input[type="password"],input[type="url"],input[type="tel"]');
1811
+ t || (t = e.querySelector("textarea")), e = t;
1788
1812
  }
1789
1813
  if (e) {
1790
1814
  if (e.querySelector("label")) throw new Error("VFloatingLabel directive: LABEL element found.");
1791
- const a = Math.random().toString(36).substring(2), l = document.createElement("div");
1792
- l.classList.add("relative", "isolate");
1793
- const i = document.createElement("label");
1794
- i.classList.add(
1815
+ const t = Math.random().toString(36).substring(2), a = document.createElement("div");
1816
+ a.classList.add("relative", "isolate");
1817
+ const l = document.createElement("label");
1818
+ l.classList.add(
1795
1819
  ..."absolute px-2 left-1 top-2 scale-90 text-sm z-[var(--zIndex-label)] origin-[0] bg-white -translate-y-4 transform-gpu duration-200".split(" "),
1796
1820
  ..."peer-focus:top-2 peer-focus:scale-90 peer-focus:-translate-y-full".split(" "),
1797
1821
  ..."peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-1/2".split(" "),
1798
1822
  e.nodeName === "TEXTAREA" ? "peer-placeholder-shown:top-4" : "peer-placeholder-shown:top-1/2"
1799
- ), (t = u.value) != null && t.invalid ? i.classList.add("text-error", "peer-focus:text-error") : i.classList.add("peer-focus:text-blue-600"), e.getAttribute("required") !== null && i.classList.add("required"), i.setAttribute("for", e.getAttribute("id") || a + "-element"), i.innerHTML = ((n = u.value) == null ? void 0 : n.label) || e.getAttribute("placeholder") || a + "-label", e.classList.add("peer"), e.setAttribute("placeholder", " "), e.setAttribute("id", e.getAttribute("id") || a + "-element"), e.parentElement.replaceChild(l, e), l.appendChild(e), l.appendChild(i);
1823
+ ), u.value?.invalid ? l.classList.add("text-error", "peer-focus:text-error") : l.classList.add("peer-focus:text-blue-600"), e.getAttribute("required") !== null && l.classList.add("required"), l.setAttribute("for", e.getAttribute("id") || t + "-element"), l.innerHTML = u.value?.label || e.getAttribute("placeholder") || t + "-label", e.classList.add("peer"), e.setAttribute("placeholder", " "), e.setAttribute("id", e.getAttribute("id") || t + "-element"), e.parentElement.replaceChild(a, e), a.appendChild(e), a.appendChild(l);
1800
1824
  }
1801
1825
  },
1802
1826
  updated: (e, u) => {
1803
- var a, l, i;
1804
- const t = e.parentNode.querySelector("label"), n = (a = e.getAttribute("placeholder")) == null ? void 0 : a.trim();
1805
- t.innerHTML = ((l = u.value) == null ? void 0 : l.label) || n || t.innerHTML, n && e.setAttribute("placeholder", " "), (i = u.value) != null && i.invalid ? (t.classList.add("text-error", "peer-focus:text-error"), t.classList.remove("peer-focus:text-blue-600")) : (t.classList.remove("text-error", "peer-focus:text-error"), t.classList.add("peer-focus:text-blue-600")), t.classList[e.getAttribute("required") !== null ? "add" : "remove"]("required");
1827
+ const t = e.parentNode.querySelector("label"), a = e.getAttribute("placeholder")?.trim();
1828
+ t.innerHTML = u.value?.label || a || t.innerHTML, a && e.setAttribute("placeholder", " "), u.value?.invalid ? (t.classList.add("text-error", "peer-focus:text-error"), t.classList.remove("peer-focus:text-blue-600")) : (t.classList.remove("text-error", "peer-focus:text-error"), t.classList.add("peer-focus:text-blue-600")), t.classList[e.getAttribute("required") !== null ? "add" : "remove"]("required");
1806
1829
  },
1807
1830
  beforeUnmount: (e) => e.parentNode.parentNode.removeChild(e.parentNode)
1808
1831
  };
1809
1832
  export {
1810
- wl as Accordion,
1811
- kl as AccordionPanel,
1812
- $l as Autocomplete,
1813
- Sl as Confirm,
1814
- bt as DateInput,
1815
- Cl as Datepicker,
1816
- Ml as FormFileButton,
1817
- zt as FormSelect,
1833
+ Cl as Accordion,
1834
+ Ml as AccordionPanel,
1835
+ Dl as Autocomplete,
1836
+ Al as Confirm,
1837
+ St as DateInput,
1838
+ Ll as Datepicker,
1839
+ Tl as FormFileButton,
1840
+ Ot as FormSelect,
1818
1841
  Vl as FormSwitch,
1819
- Dl as MessageToast,
1820
- Al as Modal,
1821
- Ll as Pagination,
1822
- Tl as PasswordInput,
1823
- zl as SimpleTree,
1824
- Pl as Sizable,
1825
- Bl as Slider,
1826
- Il as Sortable,
1827
- ke as Spinner,
1828
- Nl as SubmitButton,
1829
- Ol as Tabs,
1830
- Fl as VFloatingLabel,
1831
- El as VFocus
1842
+ zl as MessageToast,
1843
+ Pl as Modal,
1844
+ Bl as Pagination,
1845
+ Il as PasswordInput,
1846
+ Nl as SimpleTree,
1847
+ Ol as Sizable,
1848
+ El as Slider,
1849
+ Fl as Sortable,
1850
+ Ce as Spinner,
1851
+ _l as SubmitButton,
1852
+ jl as Tabs,
1853
+ Rl as VFloatingLabel,
1854
+ Yl as VFocus
1832
1855
  };