@ianicdev/datatables2 0.10.3 → 0.10.5

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.
Files changed (33) hide show
  1. package/dist/{Columns-B2I3fQK-.cjs → Columns-CPCKKIx3.cjs} +1 -1
  2. package/dist/{Columns-Cul89zUK.js → Columns-ZxF5CuL6.js} +1 -1
  3. package/dist/{Comparison-DqBhxa7w.js → Comparison-CMTDEfUJ.js} +6 -6
  4. package/dist/{Comparison-BR_UI0MQ.cjs → Comparison-DfPeTvCT.cjs} +1 -1
  5. package/dist/{Datepicker-B-Whoyb7.js → Datepicker-BLYCUwKH.js} +2 -2
  6. package/dist/{Datepicker-DAsmREFO.cjs → Datepicker-CbsULJsG.cjs} +1 -1
  7. package/dist/{Download-eF23Wfl5.js → Download-CBodg9GI.js} +1 -1
  8. package/dist/{Download-CaYGcN68.cjs → Download-CjD4NWhV.cjs} +1 -1
  9. package/dist/{Options-DKcffgvi.js → Options-BHx4o8aa.js} +1 -1
  10. package/dist/{Options-DjlXBvIh.cjs → Options-e0hJOpF8.cjs} +1 -1
  11. package/dist/{RefreshTable-DLAVYGly.cjs → RefreshTable-CyPWCK3e.cjs} +1 -1
  12. package/dist/{RefreshTable-BdKbgZ6r.js → RefreshTable-DlG8UH4c.js} +2 -2
  13. package/dist/{Search-RSFNzOye.cjs → Search-D4UmoZpS.cjs} +1 -1
  14. package/dist/{Search-3cdgX6ng.js → Search-DDRz2N_S.js} +2 -2
  15. package/dist/{Table-CMF3XY7Y.cjs → Table-ACmKFpAk.cjs} +1 -1
  16. package/dist/{Table-DDIeeeXR.js → Table-QxreAQB1.js} +8 -8
  17. package/dist/{TableServer-CgG-cidx.js → TableServer-BQUFKBeQ.js} +134 -134
  18. package/dist/{TableServer-BorxYj9a.cjs → TableServer-pRzLKhVw.cjs} +1 -1
  19. package/dist/{cellRender-Cf0NNgl8.js → cellRender-B3IOPLJf.js} +854 -951
  20. package/dist/cellRender-CA6S9KvF.cjs +1 -0
  21. package/dist/{dataTables-Dh14DLi7.cjs → dataTables-BbXv6am2.cjs} +3 -3
  22. package/dist/{dataTables-BcX90H2j.js → dataTables-Be-U1RVV.js} +133 -130
  23. package/dist/datatables.cjs +1 -1
  24. package/dist/datatables.js +1 -1
  25. package/dist/datatables2.css +1 -1
  26. package/dist/{index-DyARQ6Al.js → index-5WIEduUN.js} +20 -20
  27. package/dist/index-BAxGZLuh.js +4533 -0
  28. package/dist/{index-B8YkxY0t.cjs → index-CDteNa2i.cjs} +1 -1
  29. package/dist/index-m_LBTAkz.cjs +1 -0
  30. package/package.json +6 -6
  31. package/dist/cellRender-BjvgzE1x.cjs +0 -1
  32. package/dist/index-BSSvj4Pj.cjs +0 -1
  33. package/dist/index-BhA2W09j.js +0 -4078
@@ -1,4078 +0,0 @@
1
- import { ref as M, inject as he, computed as V, watch as ie, nextTick as be, createVNode as d, normalizeStyle as pe, normalizeClass as oe, createElementVNode as S, Fragment as se, toDisplayString as Ge, shallowRef as te, withDirectives as Be, mergeProps as U, useId as Ee, toRef as F, provide as Oe, onScopeDispose as ut, unref as O, onBeforeMount as Ul, onBeforeUnmount as jl, onMounted as Ne, createBlock as fe, openBlock as J, isRef as Re, withCtx as ee, createElementBlock as $e, renderList as wt, vShow as rt, mergeModels as _t, useModel as ct, cloneVNode as ql, watchEffect as Kt, toValue as Wt, createTextVNode as Gl, defineAsyncComponent as xe, resolveDynamicComponent as we, createCommentVNode as je } from "vue";
2
- import { S as Kl } from "./sortablejs-C0WJhxmJ.js";
3
- import { defineStore as il } from "pinia";
4
- import { g as X, p as L, a as Pt, u as Q, m as Ie, b as ce, c as Wl, V as Ke, d as ye, e as ke, f as Xe, I as re, R as Me, h as Le, i as At, j as sl, k as dt, l as Ye, n as Ft, o as ul, q as Tt, r as rl, s as Qe, t as cl, v as dl, w as Jl, L as vl, x as Dt, y as Te, z as fl, A as Ze, B as ml, C as Bt, D as gl, E as Et, F as et, G as Ot, H as Ae, J as qe, K as Se, M as $t, N as De, O as vt, P as ft, Q as kt, S as He, T as ze, U as yl, W as Nt, X as mt, Y as bl, Z as hl, _ as pl, $ as Ct, a0 as gt, a1 as Xl, a2 as tt, a3 as Yl, a4 as Jt, a5 as Ql, a6 as Sl, a7 as Fe, a8 as _e, a9 as Rt, aa as at, ab as Vt, ac as kl, ad as Pe, ae as Zl, af as en, ag as tn, ah as Cl, ai as Vl, aj as ot, ak as it, al as Xt, am as xl, an as ln, ao as nn, ap as an, aq as Yt, ar as Il, as as on, at as sn, au as un, av as rn, aw as cn, ax as Ue, ay as Qt, az as dn, aA as vn, aB as fn, aC as mn, aD as gn, aE as yn, aF as bn, aG as hn, aH as Zt, aI as pn, aJ as Sn, aK as kn, aL as Cn, aM as Vn, aN as xn, aO as In } from "./dataTables-BcX90H2j.js";
5
- import { createSharedComposable as wn } from "@vueuse/core";
6
- const yt = il("datatables", () => {
7
- const e = M([]), o = ({ table_id: u }) => {
8
- const f = e.value.findIndex(
9
- (i) => i.id === u
10
- ), a = {
11
- search: {
12
- query: ""
13
- },
14
- advancedFilters: {
15
- query: {}
16
- },
17
- hardFilters: {
18
- query: {}
19
- },
20
- options: {
21
- hash: null,
22
- columns: {},
23
- state: {}
24
- }
25
- };
26
- f !== -1 && e.value.splice(f, 1), e.value.push({ id: u, ...a });
27
- }, n = async (u) => {
28
- const a = new TextEncoder().encode(u), i = await crypto.subtle.digest("SHA-256", a);
29
- return Array.from(new Uint8Array(i)).map((b) => b.toString(16).padStart(2, "0")).join("");
30
- }, t = ({ table_id: u, headers: f }) => {
31
- n(JSON.stringify(f ?? [])).then((a) => {
32
- l({ table_id: u, name: "options", value: { hash: a } });
33
- });
34
- }, l = ({ table_id: u, name: f, value: a }) => {
35
- e.value = e.value.map((i) => {
36
- if (i.id === u && i.hasOwnProperty(f)) {
37
- const m = i[f];
38
- if (m && typeof a == "object")
39
- for (const y in a)
40
- y in m && (m[y] = a[y]);
41
- }
42
- return i;
43
- });
44
- };
45
- return {
46
- // Store Data
47
- tables: e,
48
- // Store Methods
49
- addTable: o,
50
- setData: l,
51
- restoreData: ({ table_id: u, data: f }) => {
52
- e.value = e.value.map((a) => (a.id === u && (a = f), a));
53
- },
54
- getCurrentTable: (u) => e.value.find((f) => f.id === u),
55
- // Hash
56
- hashString: n,
57
- setTableHash: t
58
- };
59
- });
60
- function lt() {
61
- const { setData: e, getCurrentTable: o } = yt(), n = he("table_props"), t = V(() => o(n.id)), l = V(() => t.value.search?.query), s = V(() => {
62
- if (!n?.headers.length) return null;
63
- const f = t.value.options?.columns.selected ?? [];
64
- return (t.value.options?.columns.sorted ?? []).filter((m) => f.includes(m)).map(
65
- (m) => n.headers.find((y) => y.key === m)
66
- );
67
- }), c = V(() => t.value.hardFilters?.query), r = V(() => t.value.advancedFilters?.query);
68
- return {
69
- tableState: t,
70
- searchState: l,
71
- advancedFiltersState: r,
72
- hardFiltersState: c,
73
- headersState: s,
74
- saveTableOptions: (f) => {
75
- e({
76
- table_id: n.id,
77
- name: "options",
78
- value: {
79
- state: f
80
- }
81
- });
82
- }
83
- };
84
- }
85
- function wl(e) {
86
- const o = yt(), { getCurrentTable: n, setTableHash: t, hashString: l } = o, s = M(!1), c = 5, r = V(() => n(e.id));
87
- ie(
88
- r,
89
- async (y) => {
90
- y.options.hash && await u(y);
91
- },
92
- {
93
- deep: !0
94
- }
95
- );
96
- const u = async (y) => {
97
- if (s.value) return;
98
- s.value = !0, await be();
99
- const b = f(), h = b.findIndex(
100
- (p) => p.id === e.id
101
- );
102
- h > -1 ? b[h] = y : b.push(y), localStorage.setItem("datatables-state", JSON.stringify(b)), s.value = !1;
103
- }, f = () => {
104
- const y = localStorage.getItem("datatables-state");
105
- return JSON.parse(y ?? "[]");
106
- }, a = () => f().find((h) => h.id === e.id);
107
- return {
108
- saving: s,
109
- dataStateGet: a,
110
- tableDataState: r,
111
- checkTableState: async () => {
112
- const y = localStorage.getItem("datatables-state-v");
113
- parseInt(y) !== parseInt(c) && (localStorage.removeItem("datatables-state"), localStorage.setItem("datatables-state-v", c));
114
- const h = a()?.options.hash;
115
- if (h) {
116
- const p = await l(JSON.stringify(e.headers ?? []));
117
- h !== p && localStorage.removeItem("datatables-state");
118
- }
119
- t({ table_id: e.id, headers: e.headers });
120
- },
121
- deleteDataStorage: () => {
122
- localStorage.removeItem("datatables-state"), localStorage.removeItem("datatables-state-v");
123
- }
124
- };
125
- }
126
- const _n = L({
127
- ...ce(),
128
- ...Ie()
129
- }, "VCardActions"), Mt = X()({
130
- name: "VCardActions",
131
- props: _n(),
132
- setup(e, o) {
133
- let {
134
- slots: n
135
- } = o;
136
- return Pt({
137
- VBtn: {
138
- slim: !0,
139
- variant: "text"
140
- }
141
- }), Q(() => d(e.tag, {
142
- class: oe(["v-card-actions", e.class]),
143
- style: pe(e.style)
144
- }, n)), {};
145
- }
146
- }), Pn = L({
147
- opacity: [Number, String],
148
- ...ce(),
149
- ...Ie()
150
- }, "VCardSubtitle"), An = X()({
151
- name: "VCardSubtitle",
152
- props: Pn(),
153
- setup(e, o) {
154
- let {
155
- slots: n
156
- } = o;
157
- return Q(() => d(e.tag, {
158
- class: oe(["v-card-subtitle", e.class]),
159
- style: pe([{
160
- "--v-card-subtitle-opacity": e.opacity
161
- }, e.style])
162
- }, n)), {};
163
- }
164
- }), bt = Wl("v-card-title"), Fn = L({
165
- appendAvatar: String,
166
- appendIcon: re,
167
- prependAvatar: String,
168
- prependIcon: re,
169
- subtitle: {
170
- type: [String, Number, Boolean],
171
- default: void 0
172
- },
173
- title: {
174
- type: [String, Number, Boolean],
175
- default: void 0
176
- },
177
- ...ce(),
178
- ...Xe(),
179
- ...Ie()
180
- }, "VCardItem"), Tn = X()({
181
- name: "VCardItem",
182
- props: Fn(),
183
- setup(e, o) {
184
- let {
185
- slots: n
186
- } = o;
187
- return Q(() => {
188
- const t = !!(e.prependAvatar || e.prependIcon), l = !!(t || n.prepend), s = !!(e.appendAvatar || e.appendIcon), c = !!(s || n.append), r = !!(e.title != null || n.title), u = !!(e.subtitle != null || n.subtitle);
189
- return d(e.tag, {
190
- class: oe(["v-card-item", e.class]),
191
- style: pe(e.style)
192
- }, {
193
- default: () => [l && S("div", {
194
- key: "prepend",
195
- class: "v-card-item__prepend"
196
- }, [n.prepend ? d(ke, {
197
- key: "prepend-defaults",
198
- disabled: !t,
199
- defaults: {
200
- VAvatar: {
201
- density: e.density,
202
- image: e.prependAvatar
203
- },
204
- VIcon: {
205
- density: e.density,
206
- icon: e.prependIcon
207
- }
208
- }
209
- }, n.prepend) : S(se, null, [e.prependAvatar && d(Ke, {
210
- key: "prepend-avatar",
211
- density: e.density,
212
- image: e.prependAvatar
213
- }, null), e.prependIcon && d(ye, {
214
- key: "prepend-icon",
215
- density: e.density,
216
- icon: e.prependIcon
217
- }, null)])]), S("div", {
218
- class: "v-card-item__content"
219
- }, [r && d(bt, {
220
- key: "title"
221
- }, {
222
- default: () => [n.title?.() ?? Ge(e.title)]
223
- }), u && d(An, {
224
- key: "subtitle"
225
- }, {
226
- default: () => [n.subtitle?.() ?? Ge(e.subtitle)]
227
- }), n.default?.()]), c && S("div", {
228
- key: "append",
229
- class: "v-card-item__append"
230
- }, [n.append ? d(ke, {
231
- key: "append-defaults",
232
- disabled: !s,
233
- defaults: {
234
- VAvatar: {
235
- density: e.density,
236
- image: e.appendAvatar
237
- },
238
- VIcon: {
239
- density: e.density,
240
- icon: e.appendIcon
241
- }
242
- }
243
- }, n.append) : S(se, null, [e.appendIcon && d(ye, {
244
- key: "append-icon",
245
- density: e.density,
246
- icon: e.appendIcon
247
- }, null), e.appendAvatar && d(Ke, {
248
- key: "append-avatar",
249
- density: e.density,
250
- image: e.appendAvatar
251
- }, null)])])]
252
- });
253
- }), {};
254
- }
255
- }), Dn = L({
256
- opacity: [Number, String],
257
- ...ce(),
258
- ...Ie()
259
- }, "VCardText"), ht = X()({
260
- name: "VCardText",
261
- props: Dn(),
262
- setup(e, o) {
263
- let {
264
- slots: n
265
- } = o;
266
- return Q(() => d(e.tag, {
267
- class: oe(["v-card-text", e.class]),
268
- style: pe([{
269
- "--v-card-text-opacity": e.opacity
270
- }, e.style])
271
- }, n)), {};
272
- }
273
- }), Bn = L({
274
- appendAvatar: String,
275
- appendIcon: re,
276
- disabled: Boolean,
277
- flat: Boolean,
278
- hover: Boolean,
279
- image: String,
280
- link: {
281
- type: Boolean,
282
- default: void 0
283
- },
284
- prependAvatar: String,
285
- prependIcon: re,
286
- ripple: {
287
- type: [Boolean, Object],
288
- default: !0
289
- },
290
- subtitle: {
291
- type: [String, Number, Boolean],
292
- default: void 0
293
- },
294
- text: {
295
- type: [String, Number, Boolean],
296
- default: void 0
297
- },
298
- title: {
299
- type: [String, Number, Boolean],
300
- default: void 0
301
- },
302
- ...Ot(),
303
- ...ce(),
304
- ...Xe(),
305
- ...et(),
306
- ...Et(),
307
- ...gl(),
308
- ...Bt(),
309
- ...ml(),
310
- ...Ze(),
311
- ...fl(),
312
- ...Ie(),
313
- ...Te(),
314
- ...Dt({
315
- variant: "elevated"
316
- })
317
- }, "VCard"), Lt = X()({
318
- name: "VCard",
319
- directives: {
320
- vRipple: Me
321
- },
322
- props: Bn(),
323
- setup(e, o) {
324
- let {
325
- attrs: n,
326
- slots: t
327
- } = o;
328
- const {
329
- themeClasses: l
330
- } = Le(e), {
331
- borderClasses: s
332
- } = At(e), {
333
- colorClasses: c,
334
- colorStyles: r,
335
- variantClasses: u
336
- } = sl(e), {
337
- densityClasses: f
338
- } = dt(e), {
339
- dimensionStyles: a
340
- } = Ye(e), {
341
- elevationClasses: i
342
- } = Ft(e), {
343
- loaderClasses: m
344
- } = ul(e), {
345
- locationStyles: y
346
- } = Tt(e), {
347
- positionClasses: b
348
- } = rl(e), {
349
- roundedClasses: h
350
- } = Qe(e), p = cl(e, n), k = te(void 0);
351
- return ie(() => e.loading, (_, I) => {
352
- k.value = !_ && typeof I == "string" ? I : typeof _ == "boolean" ? void 0 : _;
353
- }, {
354
- immediate: !0
355
- }), Q(() => {
356
- const _ = e.link !== !1 && p.isLink.value, I = !e.disabled && e.link !== !1 && (e.link || p.isClickable.value), T = _ ? "a" : e.tag, B = !!(t.title || e.title != null), P = !!(t.subtitle || e.subtitle != null), w = B || P, x = !!(t.append || e.appendAvatar || e.appendIcon), $ = !!(t.prepend || e.prependAvatar || e.prependIcon), H = !!(t.image || e.image), G = w || $ || x, z = !!(t.text || e.text != null);
357
- return Be(d(T, U(p.linkProps, {
358
- class: ["v-card", {
359
- "v-card--disabled": e.disabled,
360
- "v-card--flat": e.flat,
361
- "v-card--hover": e.hover && !(e.disabled || e.flat),
362
- "v-card--link": I
363
- }, l.value, s.value, c.value, f.value, i.value, m.value, b.value, h.value, u.value, e.class],
364
- style: [r.value, a.value, y.value, e.style],
365
- onClick: I && p.navigate,
366
- tabindex: e.disabled ? -1 : void 0
367
- }), {
368
- default: () => [H && S("div", {
369
- key: "image",
370
- class: "v-card__image"
371
- }, [t.image ? d(ke, {
372
- key: "image-defaults",
373
- disabled: !e.image,
374
- defaults: {
375
- VImg: {
376
- cover: !0,
377
- src: e.image
378
- }
379
- }
380
- }, t.image) : d(Jl, {
381
- key: "image-img",
382
- cover: !0,
383
- src: e.image
384
- }, null)]), d(vl, {
385
- name: "v-card",
386
- active: !!e.loading,
387
- color: k.value
388
- }, {
389
- default: t.loader
390
- }), G && d(Tn, {
391
- key: "item",
392
- prependAvatar: e.prependAvatar,
393
- prependIcon: e.prependIcon,
394
- title: e.title,
395
- subtitle: e.subtitle,
396
- appendAvatar: e.appendAvatar,
397
- appendIcon: e.appendIcon
398
- }, {
399
- default: t.item,
400
- prepend: t.prepend,
401
- title: t.title,
402
- subtitle: t.subtitle,
403
- append: t.append
404
- }), z && d(ht, {
405
- key: "text"
406
- }, {
407
- default: () => [t.text?.() ?? e.text]
408
- }), t.default?.(), t.actions && d(Mt, null, {
409
- default: t.actions
410
- }), dl(I, "v-card")]
411
- }), [[Me, I && e.ripple]]);
412
- }), {};
413
- }
414
- }), En = L({
415
- text: String,
416
- onClick: Ae(),
417
- ...ce(),
418
- ...Te()
419
- }, "VLabel"), _l = X()({
420
- name: "VLabel",
421
- props: En(),
422
- setup(e, o) {
423
- let {
424
- slots: n
425
- } = o;
426
- return Q(() => S("label", {
427
- class: oe(["v-label", {
428
- "v-label--clickable": !!e.onClick
429
- }, e.class]),
430
- style: pe(e.style),
431
- onClick: e.onClick
432
- }, [e.text, n.default?.()])), {};
433
- }
434
- }), Pl = Symbol.for("vuetify:selection-control-group"), Al = L({
435
- color: String,
436
- disabled: {
437
- type: Boolean,
438
- default: null
439
- },
440
- defaultsTarget: String,
441
- error: Boolean,
442
- id: String,
443
- inline: Boolean,
444
- falseIcon: re,
445
- trueIcon: re,
446
- ripple: {
447
- type: [Boolean, Object],
448
- default: !0
449
- },
450
- multiple: {
451
- type: Boolean,
452
- default: null
453
- },
454
- name: String,
455
- readonly: {
456
- type: Boolean,
457
- default: null
458
- },
459
- modelValue: null,
460
- type: String,
461
- valueComparator: {
462
- type: Function,
463
- default: qe
464
- },
465
- ...ce(),
466
- ...Xe(),
467
- ...Te()
468
- }, "SelectionControlGroup"), On = L({
469
- ...Al({
470
- defaultsTarget: "VSelectionControl"
471
- })
472
- }, "VSelectionControlGroup");
473
- X()({
474
- name: "VSelectionControlGroup",
475
- props: On(),
476
- emits: {
477
- "update:modelValue": (e) => !0
478
- },
479
- setup(e, o) {
480
- let {
481
- slots: n
482
- } = o;
483
- const t = Se(e, "modelValue"), l = Ee(), s = F(() => e.id || `v-selection-control-group-${l}`), c = F(() => e.name || s.value), r = /* @__PURE__ */ new Set();
484
- return Oe(Pl, {
485
- modelValue: t,
486
- forceUpdate: () => {
487
- r.forEach((u) => u());
488
- },
489
- onForceUpdate: (u) => {
490
- r.add(u), ut(() => {
491
- r.delete(u);
492
- });
493
- }
494
- }), Pt({
495
- [e.defaultsTarget]: {
496
- color: F(() => e.color),
497
- disabled: F(() => e.disabled),
498
- density: F(() => e.density),
499
- error: F(() => e.error),
500
- inline: F(() => e.inline),
501
- modelValue: t,
502
- multiple: F(() => !!e.multiple || e.multiple == null && Array.isArray(t.value)),
503
- name: c,
504
- falseIcon: F(() => e.falseIcon),
505
- trueIcon: F(() => e.trueIcon),
506
- readonly: F(() => e.readonly),
507
- ripple: F(() => e.ripple),
508
- type: F(() => e.type),
509
- valueComparator: F(() => e.valueComparator)
510
- }
511
- }), Q(() => S("div", {
512
- class: oe(["v-selection-control-group", {
513
- "v-selection-control-group--inline": e.inline
514
- }, e.class]),
515
- style: pe(e.style),
516
- role: e.type === "radio" ? "radiogroup" : void 0
517
- }, [n.default?.()])), {};
518
- }
519
- });
520
- const Fl = L({
521
- label: String,
522
- baseColor: String,
523
- trueValue: null,
524
- falseValue: null,
525
- value: null,
526
- ...ce(),
527
- ...Al()
528
- }, "VSelectionControl");
529
- function $n(e) {
530
- const o = he(Pl, void 0), {
531
- densityClasses: n
532
- } = dt(e), t = Se(e, "modelValue"), l = V(() => e.trueValue !== void 0 ? e.trueValue : e.value !== void 0 ? e.value : !0), s = V(() => e.falseValue !== void 0 ? e.falseValue : !1), c = V(() => !!e.multiple || e.multiple == null && Array.isArray(t.value)), r = V({
533
- get() {
534
- const y = o ? o.modelValue.value : t.value;
535
- return c.value ? De(y).some((b) => e.valueComparator(b, l.value)) : e.valueComparator(y, l.value);
536
- },
537
- set(y) {
538
- if (e.readonly) return;
539
- const b = y ? l.value : s.value;
540
- let h = b;
541
- c.value && (h = y ? [...De(t.value), b] : De(t.value).filter((p) => !e.valueComparator(p, l.value))), o ? o.modelValue.value = h : t.value = h;
542
- }
543
- }), {
544
- textColorClasses: u,
545
- textColorStyles: f
546
- } = vt(() => {
547
- if (!(e.error || e.disabled))
548
- return r.value ? e.color : e.baseColor;
549
- }), {
550
- backgroundColorClasses: a,
551
- backgroundColorStyles: i
552
- } = ft(() => r.value && !e.error && !e.disabled ? e.color : e.baseColor), m = V(() => r.value ? e.trueIcon : e.falseIcon);
553
- return {
554
- group: o,
555
- densityClasses: n,
556
- trueValue: l,
557
- falseValue: s,
558
- model: r,
559
- textColorClasses: u,
560
- textColorStyles: f,
561
- backgroundColorClasses: a,
562
- backgroundColorStyles: i,
563
- icon: m
564
- };
565
- }
566
- const el = X()({
567
- name: "VSelectionControl",
568
- directives: {
569
- vRipple: Me
570
- },
571
- inheritAttrs: !1,
572
- props: Fl(),
573
- emits: {
574
- "update:modelValue": (e) => !0
575
- },
576
- setup(e, o) {
577
- let {
578
- attrs: n,
579
- slots: t
580
- } = o;
581
- const {
582
- group: l,
583
- densityClasses: s,
584
- icon: c,
585
- model: r,
586
- textColorClasses: u,
587
- textColorStyles: f,
588
- backgroundColorClasses: a,
589
- backgroundColorStyles: i,
590
- trueValue: m
591
- } = $n(e), y = Ee(), b = te(!1), h = te(!1), p = M(), k = F(() => e.id || `input-${y}`), _ = F(() => !e.disabled && !e.readonly);
592
- l?.onForceUpdate(() => {
593
- p.value && (p.value.checked = r.value);
594
- });
595
- function I(w) {
596
- _.value && (b.value = !0, kt(w.target, ":focus-visible") !== !1 && (h.value = !0));
597
- }
598
- function T() {
599
- b.value = !1, h.value = !1;
600
- }
601
- function B(w) {
602
- w.stopPropagation();
603
- }
604
- function P(w) {
605
- if (!_.value) {
606
- p.value && (p.value.checked = r.value);
607
- return;
608
- }
609
- e.readonly && l && be(() => l.forceUpdate()), r.value = w.target.checked;
610
- }
611
- return Q(() => {
612
- const w = t.label ? t.label({
613
- label: e.label,
614
- props: {
615
- for: k.value
616
- }
617
- }) : e.label, [x, $] = $t(n), H = S("input", U({
618
- ref: p,
619
- checked: r.value,
620
- disabled: !!e.disabled,
621
- id: k.value,
622
- onBlur: T,
623
- onFocus: I,
624
- onInput: P,
625
- "aria-disabled": !!e.disabled,
626
- "aria-label": e.label,
627
- type: e.type,
628
- value: m.value,
629
- name: e.name,
630
- "aria-checked": e.type === "checkbox" ? r.value : void 0
631
- }, $), null);
632
- return S("div", U({
633
- class: ["v-selection-control", {
634
- "v-selection-control--dirty": r.value,
635
- "v-selection-control--disabled": e.disabled,
636
- "v-selection-control--error": e.error,
637
- "v-selection-control--focused": b.value,
638
- "v-selection-control--focus-visible": h.value,
639
- "v-selection-control--inline": e.inline
640
- }, s.value, e.class]
641
- }, x, {
642
- style: e.style
643
- }), [S("div", {
644
- class: oe(["v-selection-control__wrapper", u.value]),
645
- style: pe(f.value)
646
- }, [t.default?.({
647
- backgroundColorClasses: a,
648
- backgroundColorStyles: i
649
- }), Be(S("div", {
650
- class: oe(["v-selection-control__input"])
651
- }, [t.input?.({
652
- model: r,
653
- textColorClasses: u,
654
- textColorStyles: f,
655
- backgroundColorClasses: a,
656
- backgroundColorStyles: i,
657
- inputNode: H,
658
- icon: c.value,
659
- props: {
660
- onFocus: I,
661
- onBlur: T,
662
- id: k.value
663
- }
664
- }) ?? S(se, null, [c.value && d(ye, {
665
- key: "icon",
666
- icon: c.value
667
- }, null), H])]), [[Me, !e.disabled && !e.readonly && e.ripple, null, {
668
- center: !0,
669
- circle: !0
670
- }]])]), w && d(_l, {
671
- for: k.value,
672
- onClick: B
673
- }, {
674
- default: () => [w]
675
- })]);
676
- }), {
677
- isFocused: b,
678
- input: p
679
- };
680
- }
681
- }), Tl = L({
682
- indeterminate: Boolean,
683
- indeterminateIcon: {
684
- type: re,
685
- default: "$checkboxIndeterminate"
686
- },
687
- ...Fl({
688
- falseIcon: "$checkboxOff",
689
- trueIcon: "$checkboxOn"
690
- })
691
- }, "VCheckboxBtn"), xt = X()({
692
- name: "VCheckboxBtn",
693
- props: Tl(),
694
- emits: {
695
- "update:modelValue": (e) => !0,
696
- "update:indeterminate": (e) => !0
697
- },
698
- setup(e, o) {
699
- let {
700
- slots: n
701
- } = o;
702
- const t = Se(e, "indeterminate"), l = Se(e, "modelValue");
703
- function s(u) {
704
- t.value && (t.value = !1);
705
- }
706
- const c = F(() => t.value ? e.indeterminateIcon : e.falseIcon), r = F(() => t.value ? e.indeterminateIcon : e.trueIcon);
707
- return Q(() => {
708
- const u = He(el.filterProps(e), ["modelValue"]);
709
- return d(el, U(u, {
710
- modelValue: l.value,
711
- "onUpdate:modelValue": [(f) => l.value = f, s],
712
- class: ["v-checkbox-btn", e.class],
713
- style: e.style,
714
- type: "checkbox",
715
- falseIcon: c.value,
716
- trueIcon: r.value,
717
- "aria-checked": t.value ? "mixed" : void 0
718
- }), n);
719
- }), {};
720
- }
721
- });
722
- function Dl(e) {
723
- const {
724
- t: o
725
- } = ze();
726
- function n(t) {
727
- let {
728
- name: l,
729
- color: s,
730
- ...c
731
- } = t;
732
- const r = {
733
- prepend: "prependAction",
734
- prependInner: "prependAction",
735
- append: "appendAction",
736
- appendInner: "appendAction",
737
- clear: "clear"
738
- }[l], u = e[`onClick:${l}`];
739
- function f(i) {
740
- i.key !== "Enter" && i.key !== " " || (i.preventDefault(), i.stopPropagation(), yl(u, new PointerEvent("click", i)));
741
- }
742
- const a = u && r ? o(`$vuetify.input.${r}`, e.label ?? "") : void 0;
743
- return d(ye, U({
744
- icon: e[`${l}Icon`],
745
- "aria-label": a,
746
- onClick: u,
747
- onKeydown: f,
748
- color: s
749
- }, c), null);
750
- }
751
- return {
752
- InputIcon: n
753
- };
754
- }
755
- const Nn = L({
756
- active: Boolean,
757
- color: String,
758
- messages: {
759
- type: [Array, String],
760
- default: () => []
761
- },
762
- ...ce(),
763
- ...mt({
764
- transition: {
765
- component: bl,
766
- leaveAbsolute: !0,
767
- group: !0
768
- }
769
- })
770
- }, "VMessages"), Rn = X()({
771
- name: "VMessages",
772
- props: Nn(),
773
- setup(e, o) {
774
- let {
775
- slots: n
776
- } = o;
777
- const t = V(() => De(e.messages)), {
778
- textColorClasses: l,
779
- textColorStyles: s
780
- } = vt(() => e.color);
781
- return Q(() => d(Nt, {
782
- transition: e.transition,
783
- tag: "div",
784
- class: oe(["v-messages", l.value, e.class]),
785
- style: pe([s.value, e.style])
786
- }, {
787
- default: () => [e.active && t.value.map((c, r) => S("div", {
788
- class: "v-messages__message",
789
- key: `${r}-${t.value}`
790
- }, [n.message ? n.message({
791
- message: c
792
- }) : c]))]
793
- })), {};
794
- }
795
- }), Bl = L({
796
- focused: Boolean,
797
- "onUpdate:focused": Ae()
798
- }, "focus");
799
- function Ht(e) {
800
- let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : hl();
801
- const n = Se(e, "focused"), t = F(() => ({
802
- [`${o}--focused`]: n.value
803
- }));
804
- function l() {
805
- n.value = !0;
806
- }
807
- function s() {
808
- n.value = !1;
809
- }
810
- return {
811
- focusClasses: t,
812
- isFocused: n,
813
- focus: l,
814
- blur: s
815
- };
816
- }
817
- const Mn = Symbol.for("vuetify:form");
818
- function zt(e) {
819
- const o = he(Mn, null);
820
- return {
821
- ...o,
822
- isReadonly: V(() => !!(e?.readonly ?? o?.isReadonly.value)),
823
- isDisabled: V(() => !!(e?.disabled ?? o?.isDisabled.value))
824
- };
825
- }
826
- const Ln = Symbol.for("vuetify:rules");
827
- function Hn(e) {
828
- const o = he(Ln, null);
829
- if (!e) {
830
- if (!o)
831
- throw new Error("Could not find Vuetify rules injection");
832
- return o.aliases;
833
- }
834
- return o?.resolve(e) ?? F(e);
835
- }
836
- const zn = L({
837
- disabled: {
838
- type: Boolean,
839
- default: null
840
- },
841
- error: Boolean,
842
- errorMessages: {
843
- type: [Array, String],
844
- default: () => []
845
- },
846
- maxErrors: {
847
- type: [Number, String],
848
- default: 1
849
- },
850
- name: String,
851
- label: String,
852
- readonly: {
853
- type: Boolean,
854
- default: null
855
- },
856
- rules: {
857
- type: Array,
858
- default: () => []
859
- },
860
- modelValue: null,
861
- validateOn: String,
862
- validationValue: null,
863
- ...Bl()
864
- }, "validation");
865
- function Un(e) {
866
- let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : hl(), n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ee();
867
- const t = Se(e, "modelValue"), l = V(() => e.validationValue === void 0 ? t.value : e.validationValue), s = zt(e), c = Hn(() => e.rules), r = M([]), u = te(!0), f = V(() => !!(De(t.value === "" ? null : t.value).length || De(l.value === "" ? null : l.value).length)), a = V(() => e.errorMessages?.length ? De(e.errorMessages).concat(r.value).slice(0, Math.max(0, Number(e.maxErrors))) : r.value), i = V(() => {
868
- let T = (e.validateOn ?? s.validateOn?.value) || "input";
869
- T === "lazy" && (T = "input lazy"), T === "eager" && (T = "input eager");
870
- const B = new Set(T?.split(" ") ?? []);
871
- return {
872
- input: B.has("input"),
873
- blur: B.has("blur") || B.has("input") || B.has("invalid-input"),
874
- invalidInput: B.has("invalid-input"),
875
- lazy: B.has("lazy"),
876
- eager: B.has("eager")
877
- };
878
- }), m = V(() => e.error || e.errorMessages?.length ? !1 : e.rules.length ? u.value ? r.value.length || i.value.lazy ? null : !0 : !r.value.length : !0), y = te(!1), b = V(() => ({
879
- [`${o}--error`]: m.value === !1,
880
- [`${o}--dirty`]: f.value,
881
- [`${o}--disabled`]: s.isDisabled.value,
882
- [`${o}--readonly`]: s.isReadonly.value
883
- })), h = pl("validation"), p = V(() => e.name ?? O(n));
884
- Ul(() => {
885
- s.register?.({
886
- id: p.value,
887
- vm: h,
888
- validate: I,
889
- reset: k,
890
- resetValidation: _
891
- });
892
- }), jl(() => {
893
- s.unregister?.(p.value);
894
- }), Ne(async () => {
895
- i.value.lazy || await I(!i.value.eager), s.update?.(p.value, m.value, a.value);
896
- }), Ct(() => i.value.input || i.value.invalidInput && m.value === !1, () => {
897
- ie(l, () => {
898
- if (l.value != null)
899
- I();
900
- else if (e.focused) {
901
- const T = ie(() => e.focused, (B) => {
902
- B || I(), T();
903
- });
904
- }
905
- });
906
- }), Ct(() => i.value.blur, () => {
907
- ie(() => e.focused, (T) => {
908
- T || I();
909
- });
910
- }), ie([m, a], () => {
911
- s.update?.(p.value, m.value, a.value);
912
- });
913
- async function k() {
914
- t.value = null, await be(), await _();
915
- }
916
- async function _() {
917
- u.value = !0, i.value.lazy ? r.value = [] : await I(!i.value.eager);
918
- }
919
- async function I() {
920
- let T = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
921
- const B = [];
922
- y.value = !0;
923
- for (const P of c.value) {
924
- if (B.length >= Number(e.maxErrors ?? 1))
925
- break;
926
- const x = await (typeof P == "function" ? P : () => P)(l.value);
927
- if (x !== !0) {
928
- if (x !== !1 && typeof x != "string") {
929
- console.warn(`${x} is not a valid value. Rule functions must return boolean true or a string.`);
930
- continue;
931
- }
932
- B.push(x || "");
933
- }
934
- }
935
- return r.value = B, y.value = !1, u.value = T, r.value;
936
- }
937
- return {
938
- errorMessages: a,
939
- isDirty: f,
940
- isDisabled: s.isDisabled,
941
- isReadonly: s.isReadonly,
942
- isPristine: u,
943
- isValid: m,
944
- isValidating: y,
945
- reset: k,
946
- resetValidation: _,
947
- validate: I,
948
- validationClasses: b
949
- };
950
- }
951
- const Ut = L({
952
- id: String,
953
- appendIcon: re,
954
- baseColor: String,
955
- centerAffix: {
956
- type: Boolean,
957
- default: !0
958
- },
959
- color: String,
960
- glow: Boolean,
961
- iconColor: [Boolean, String],
962
- prependIcon: re,
963
- hideDetails: [Boolean, String],
964
- hideSpinButtons: Boolean,
965
- hint: String,
966
- persistentHint: Boolean,
967
- messages: {
968
- type: [Array, String],
969
- default: () => []
970
- },
971
- direction: {
972
- type: String,
973
- default: "horizontal",
974
- validator: (e) => ["horizontal", "vertical"].includes(e)
975
- },
976
- "onClick:prepend": Ae(),
977
- "onClick:append": Ae(),
978
- ...ce(),
979
- ...Xe(),
980
- ...Xl(et(), ["maxWidth", "minWidth", "width"]),
981
- ...Te(),
982
- ...zn()
983
- }, "VInput"), st = X()({
984
- name: "VInput",
985
- props: {
986
- ...Ut()
987
- },
988
- emits: {
989
- "update:modelValue": (e) => !0
990
- },
991
- setup(e, o) {
992
- let {
993
- attrs: n,
994
- slots: t,
995
- emit: l
996
- } = o;
997
- const {
998
- densityClasses: s
999
- } = dt(e), {
1000
- dimensionStyles: c
1001
- } = Ye(e), {
1002
- themeClasses: r
1003
- } = Le(e), {
1004
- rtlClasses: u
1005
- } = gt(), {
1006
- InputIcon: f
1007
- } = Dl(e), a = Ee(), i = V(() => e.id || `input-${a}`), {
1008
- errorMessages: m,
1009
- isDirty: y,
1010
- isDisabled: b,
1011
- isReadonly: h,
1012
- isPristine: p,
1013
- isValid: k,
1014
- isValidating: _,
1015
- reset: I,
1016
- resetValidation: T,
1017
- validate: B,
1018
- validationClasses: P
1019
- } = Un(e, "v-input", i), w = V(() => e.errorMessages?.length || !p.value && m.value.length ? m.value : e.hint && (e.persistentHint || e.focused) ? e.hint : e.messages), x = F(() => w.value.length > 0), $ = F(() => !e.hideDetails || e.hideDetails === "auto" && (x.value || !!t.details)), H = V(() => $.value ? `${i.value}-messages` : void 0), G = V(() => ({
1020
- id: i,
1021
- messagesId: H,
1022
- isDirty: y,
1023
- isDisabled: b,
1024
- isReadonly: h,
1025
- isPristine: p,
1026
- isValid: k,
1027
- isValidating: _,
1028
- hasDetails: $,
1029
- reset: I,
1030
- resetValidation: T,
1031
- validate: B
1032
- })), z = F(() => e.error || e.disabled ? void 0 : e.focused ? e.color : e.baseColor), me = F(() => {
1033
- if (e.iconColor)
1034
- return e.iconColor === !0 ? z.value : e.iconColor;
1035
- });
1036
- return Q(() => {
1037
- const j = !!(t.prepend || e.prependIcon), Y = !!(t.append || e.appendIcon);
1038
- return S("div", {
1039
- class: oe(["v-input", `v-input--${e.direction}`, {
1040
- "v-input--center-affix": e.centerAffix,
1041
- "v-input--focused": e.focused,
1042
- "v-input--glow": e.glow,
1043
- "v-input--hide-spin-buttons": e.hideSpinButtons
1044
- }, s.value, r.value, u.value, P.value, e.class]),
1045
- style: pe([c.value, e.style])
1046
- }, [j && S("div", {
1047
- key: "prepend",
1048
- class: "v-input__prepend"
1049
- }, [t.prepend?.(G.value), e.prependIcon && d(f, {
1050
- key: "prepend-icon",
1051
- name: "prepend",
1052
- color: me.value
1053
- }, null)]), t.default && S("div", {
1054
- class: "v-input__control"
1055
- }, [t.default?.(G.value)]), Y && S("div", {
1056
- key: "append",
1057
- class: "v-input__append"
1058
- }, [e.appendIcon && d(f, {
1059
- key: "append-icon",
1060
- name: "append",
1061
- color: me.value
1062
- }, null), t.append?.(G.value)]), $.value && S("div", {
1063
- id: H.value,
1064
- class: "v-input__details",
1065
- role: "alert",
1066
- "aria-live": "polite"
1067
- }, [d(Rn, {
1068
- active: x.value,
1069
- messages: w.value
1070
- }, {
1071
- message: t.message
1072
- }), t.details?.(G.value)])]);
1073
- }), {
1074
- reset: I,
1075
- resetValidation: T,
1076
- validate: B,
1077
- isValid: k,
1078
- errorMessages: m
1079
- };
1080
- }
1081
- }), jn = L({
1082
- ...Ut(),
1083
- ...He(Tl(), ["inline"])
1084
- }, "VCheckbox"), qn = X()({
1085
- name: "VCheckbox",
1086
- inheritAttrs: !1,
1087
- props: jn(),
1088
- emits: {
1089
- "update:modelValue": (e) => !0,
1090
- "update:focused": (e) => !0
1091
- },
1092
- setup(e, o) {
1093
- let {
1094
- attrs: n,
1095
- slots: t
1096
- } = o;
1097
- const l = Se(e, "modelValue"), {
1098
- isFocused: s,
1099
- focus: c,
1100
- blur: r
1101
- } = Ht(e), u = M(), f = Ee();
1102
- return Q(() => {
1103
- const [a, i] = $t(n), m = st.filterProps(e), y = xt.filterProps(e);
1104
- return d(st, U({
1105
- ref: u,
1106
- class: ["v-checkbox", e.class]
1107
- }, a, m, {
1108
- modelValue: l.value,
1109
- "onUpdate:modelValue": (b) => l.value = b,
1110
- id: e.id || `checkbox-${f}`,
1111
- focused: s.value,
1112
- style: e.style
1113
- }), {
1114
- ...t,
1115
- default: (b) => {
1116
- let {
1117
- id: h,
1118
- messagesId: p,
1119
- isDisabled: k,
1120
- isReadonly: _,
1121
- isValid: I
1122
- } = b;
1123
- return d(xt, U(y, {
1124
- id: h.value,
1125
- "aria-describedby": p.value,
1126
- disabled: k.value,
1127
- readonly: _.value
1128
- }, i, {
1129
- error: I.value === !1,
1130
- modelValue: l.value,
1131
- "onUpdate:modelValue": (T) => l.value = T,
1132
- onFocus: c,
1133
- onBlur: r
1134
- }), t);
1135
- }
1136
- });
1137
- }), tt({}, u);
1138
- }
1139
- }), Gn = L({
1140
- fullscreen: Boolean,
1141
- scrollable: Boolean,
1142
- ...He(Ql({
1143
- captureFocus: !0,
1144
- origin: "center center",
1145
- scrollStrategy: "block",
1146
- transition: {
1147
- component: Sl
1148
- },
1149
- zIndex: 2400,
1150
- retainFocus: !0
1151
- }), ["disableInitialFocus"])
1152
- }, "VDialog"), jt = X()({
1153
- name: "VDialog",
1154
- props: Gn(),
1155
- emits: {
1156
- "update:modelValue": (e) => !0,
1157
- afterEnter: () => !0,
1158
- afterLeave: () => !0
1159
- },
1160
- setup(e, o) {
1161
- let {
1162
- emit: n,
1163
- slots: t
1164
- } = o;
1165
- const l = Se(e, "modelValue"), {
1166
- scopeId: s
1167
- } = Yl(), c = M();
1168
- function r() {
1169
- n("afterEnter"), (e.scrim || e.retainFocus) && c.value?.contentEl && !c.value.contentEl.contains(document.activeElement) && c.value.contentEl.focus({
1170
- preventScroll: !0
1171
- });
1172
- }
1173
- function u() {
1174
- n("afterLeave");
1175
- }
1176
- return ie(l, async (f) => {
1177
- f || (await be(), c.value.activatorEl?.focus({
1178
- preventScroll: !0
1179
- }));
1180
- }), Q(() => {
1181
- const f = Jt.filterProps(e), a = U({
1182
- "aria-haspopup": "dialog"
1183
- }, e.activatorProps), i = U({
1184
- tabindex: -1
1185
- }, e.contentProps);
1186
- return d(Jt, U({
1187
- ref: c,
1188
- class: ["v-dialog", {
1189
- "v-dialog--fullscreen": e.fullscreen,
1190
- "v-dialog--scrollable": e.scrollable
1191
- }, e.class],
1192
- style: e.style
1193
- }, f, {
1194
- modelValue: l.value,
1195
- "onUpdate:modelValue": (m) => l.value = m,
1196
- "aria-modal": "true",
1197
- activatorProps: a,
1198
- contentProps: i,
1199
- height: e.fullscreen ? void 0 : e.height,
1200
- width: e.fullscreen ? void 0 : e.width,
1201
- maxHeight: e.fullscreen ? void 0 : e.maxHeight,
1202
- maxWidth: e.fullscreen ? void 0 : e.maxWidth,
1203
- role: "dialog",
1204
- onAfterEnter: r,
1205
- onAfterLeave: u
1206
- }, s), {
1207
- activator: t.activator,
1208
- default: function() {
1209
- for (var m = arguments.length, y = new Array(m), b = 0; b < m; b++)
1210
- y[b] = arguments[b];
1211
- return d(ke, {
1212
- root: "VDialog"
1213
- }, {
1214
- default: () => [t.default?.(...y)]
1215
- });
1216
- }
1217
- });
1218
- }), tt({}, c);
1219
- }
1220
- }), Kn = { class: "text-medium-emphasis ps-2" }, Wn = {
1221
- __name: "index",
1222
- setup(e, { expose: o }) {
1223
- const n = he("table_props"), t = he("datatablesPluginOptions"), { tableState: l } = lt(), { tableDataState: s } = wl(n), c = M(0), r = M(null), u = M(!1), f = M([]), a = M([]), i = M([]), m = () => {
1224
- u.value = !0;
1225
- };
1226
- Ne(async () => {
1227
- await be(), Kl.create(r.value.$el, {
1228
- onEnd: async (b) => {
1229
- const h = Array.from(b.from.children).map(function(p) {
1230
- return p.getAttribute("header-keys");
1231
- });
1232
- JSON.stringify(h) !== JSON.stringify(i.value) && (i.value = h);
1233
- }
1234
- }), a.value = l.value.options.columns?.selected, i.value = l.value.options.columns?.sorted, f.value = i.value.map((b) => n.headers.find((h) => h.key === b));
1235
- });
1236
- const y = () => {
1237
- (JSON.stringify(a.value) !== JSON.stringify(l.value.options.columns?.selected) || JSON.stringify(i.value) !== JSON.stringify(l.value.options.columns?.sorted)) && (s.value.options.columns.selected = a.value, s.value.options.columns.sorted = i.value), u.value = !1;
1238
- };
1239
- return o({ openDialog: m }), (b, h) => (J(), fe(jt, {
1240
- modelValue: O(u),
1241
- "onUpdate:modelValue": h[1] || (h[1] = (p) => Re(u) ? u.value = p : null),
1242
- "max-width": "500",
1243
- eager: "",
1244
- "retain-focus": !1
1245
- }, {
1246
- default: ee(({ isActive: p }) => [
1247
- d(Lt, { rounded: "lg" }, {
1248
- default: ee(() => [
1249
- d(bt, { class: "d-flex justify-space-between align-center" }, {
1250
- default: ee(() => [
1251
- S("div", Kn, Ge(b.$t("$datatables.selectColumns")), 1),
1252
- d(Fe, {
1253
- icon: O(t).header.icons.close,
1254
- variant: "text",
1255
- onClick: (k) => p.value = !1
1256
- }, null, 8, ["icon", "onClick"])
1257
- ]),
1258
- _: 2
1259
- }, 1024),
1260
- d(_e),
1261
- d(ht, { class: "overflow-auto pt-8" }, {
1262
- default: ee(() => [
1263
- d(Rt, {
1264
- ref_key: "list",
1265
- ref: r
1266
- }, {
1267
- default: ee(() => [
1268
- (J(!0), $e(se, null, wt(O(f), (k, _) => (J(), fe(at, {
1269
- key: `${O(c)}-${_}`,
1270
- title: k?.title,
1271
- "header-keys": k?.key,
1272
- onClick: () => {
1273
- }
1274
- }, {
1275
- prepend: ee(() => [
1276
- d(qn, {
1277
- modelValue: O(a),
1278
- "onUpdate:modelValue": h[0] || (h[0] = (I) => Re(a) ? a.value = I : null),
1279
- value: k?.key,
1280
- "hide-details": ""
1281
- }, null, 8, ["modelValue", "value"])
1282
- ]),
1283
- append: ee(() => [
1284
- d(ye, {
1285
- icon: O(t).header.icons.drag
1286
- }, null, 8, ["icon"])
1287
- ]),
1288
- _: 2
1289
- }, 1032, ["title", "header-keys"]))), 128))
1290
- ]),
1291
- _: 1
1292
- }, 512)
1293
- ]),
1294
- _: 1
1295
- }),
1296
- d(_e, { class: "mt-2" }),
1297
- d(Mt, { class: "my-2 d-flex justify-end" }, {
1298
- default: ee(() => [
1299
- d(Fe, {
1300
- class: "text-none",
1301
- text: b.$t("$datatables.cancel"),
1302
- onClick: (k) => p.value = !1
1303
- }, null, 8, ["text", "onClick"]),
1304
- d(Fe, {
1305
- class: "text-none",
1306
- color: "primary",
1307
- text: b.$t("$datatables.submit"),
1308
- variant: "flat",
1309
- onClick: y
1310
- }, null, 8, ["text"])
1311
- ]),
1312
- _: 2
1313
- }, 1024)
1314
- ]),
1315
- _: 2
1316
- }, 1024)
1317
- ]),
1318
- _: 1
1319
- }, 8, ["modelValue"]));
1320
- }
1321
- }, Jn = Symbol.for("vuetify:goto");
1322
- function Xn() {
1323
- return {
1324
- container: void 0,
1325
- duration: 300,
1326
- layout: !1,
1327
- offset: 0,
1328
- easing: "easeInOutCubic",
1329
- patterns: en
1330
- };
1331
- }
1332
- function Yn(e) {
1333
- return qt(e) ?? (document.scrollingElement || document.body);
1334
- }
1335
- function qt(e) {
1336
- return typeof e == "string" ? document.querySelector(e) : tn(e);
1337
- }
1338
- function pt(e, o, n) {
1339
- if (typeof e == "number") return o && n ? -e : e;
1340
- let t = qt(e), l = 0;
1341
- for (; t; )
1342
- l += o ? t.offsetLeft : t.offsetTop, t = t.offsetParent;
1343
- return l;
1344
- }
1345
- async function tl(e, o, n, t) {
1346
- const l = n ? "scrollLeft" : "scrollTop", s = Vt(t?.options ?? Xn(), o), c = t?.rtl.value, r = (typeof e == "number" ? e : qt(e)) ?? 0, u = s.container === "parent" && r instanceof HTMLElement ? r.parentElement : Yn(s.container), f = kl() ? s.patterns.instant : typeof s.easing == "function" ? s.easing : s.patterns[s.easing];
1347
- if (!f) throw new TypeError(`Easing function "${s.easing}" not found.`);
1348
- let a;
1349
- if (typeof r == "number")
1350
- a = pt(r, n, c);
1351
- else if (a = pt(r, n, c) - pt(u, n, c), s.layout) {
1352
- const b = window.getComputedStyle(r).getPropertyValue("--v-layout-top");
1353
- b && (a -= parseInt(b, 10));
1354
- }
1355
- a += s.offset, a = Zn(u, a, !!c, !!n);
1356
- const i = u[l] ?? 0;
1357
- if (a === i) return Promise.resolve(a);
1358
- const m = performance.now();
1359
- return new Promise((y) => requestAnimationFrame(function b(h) {
1360
- const k = (h - m) / s.duration, _ = Math.floor(i + (a - i) * f(Pe(k, 0, 1)));
1361
- if (u[l] = _, k >= 1 && Math.abs(_ - u[l]) < 10)
1362
- return y(a);
1363
- if (k > 2)
1364
- return Zl("Scroll target is not reachable"), y(u[l]);
1365
- requestAnimationFrame(b);
1366
- }));
1367
- }
1368
- function Qn() {
1369
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1370
- const o = he(Jn), {
1371
- isRtl: n
1372
- } = gt();
1373
- if (!o) throw new Error("[Vuetify] Could not find injected goto instance");
1374
- const t = {
1375
- ...o,
1376
- // can be set via VLocaleProvider
1377
- rtl: F(() => o.rtl.value || n.value)
1378
- };
1379
- async function l(s, c) {
1380
- return tl(s, Vt(e, c), !1, t);
1381
- }
1382
- return l.horizontal = async (s, c) => tl(s, Vt(e, c), !0, t), l;
1383
- }
1384
- function Zn(e, o, n, t) {
1385
- const {
1386
- scrollWidth: l,
1387
- scrollHeight: s
1388
- } = e, [c, r] = e === document.scrollingElement ? [window.innerWidth, window.innerHeight] : [e.offsetWidth, e.offsetHeight];
1389
- let u, f;
1390
- return t ? n ? (u = -(l - c), f = 0) : (u = 0, f = l - c) : (u = 0, f = s + -r), Pe(o, u, f);
1391
- }
1392
- function ea(e) {
1393
- let {
1394
- selectedElement: o,
1395
- containerElement: n,
1396
- isRtl: t,
1397
- isHorizontal: l
1398
- } = e;
1399
- const s = We(l, n), c = El(l, t, n), r = We(l, o), u = Ol(l, o), f = r * 0.4;
1400
- return c > u ? u - f : c + s < u + r ? u - s + r + f : c;
1401
- }
1402
- function ta(e) {
1403
- let {
1404
- selectedElement: o,
1405
- containerElement: n,
1406
- isHorizontal: t
1407
- } = e;
1408
- const l = We(t, n), s = Ol(t, o), c = We(t, o);
1409
- return s - l / 2 + c / 2;
1410
- }
1411
- function ll(e, o) {
1412
- return o?.[e ? "scrollWidth" : "scrollHeight"] || 0;
1413
- }
1414
- function la(e, o) {
1415
- return o?.[e ? "clientWidth" : "clientHeight"] || 0;
1416
- }
1417
- function El(e, o, n) {
1418
- if (!n)
1419
- return 0;
1420
- const {
1421
- scrollLeft: t,
1422
- offsetWidth: l,
1423
- scrollWidth: s
1424
- } = n;
1425
- return e ? o ? s - l + t : t : n.scrollTop;
1426
- }
1427
- function We(e, o) {
1428
- return o?.[e ? "offsetWidth" : "offsetHeight"] || 0;
1429
- }
1430
- function Ol(e, o) {
1431
- return o?.[e ? "offsetLeft" : "offsetTop"] || 0;
1432
- }
1433
- const $l = Symbol.for("vuetify:v-slide-group"), Nl = L({
1434
- centerActive: Boolean,
1435
- scrollToActive: {
1436
- type: Boolean,
1437
- default: !0
1438
- },
1439
- contentClass: null,
1440
- direction: {
1441
- type: String,
1442
- default: "horizontal"
1443
- },
1444
- symbol: {
1445
- type: null,
1446
- default: $l
1447
- },
1448
- nextIcon: {
1449
- type: re,
1450
- default: "$next"
1451
- },
1452
- prevIcon: {
1453
- type: re,
1454
- default: "$prev"
1455
- },
1456
- showArrows: {
1457
- type: [Boolean, String],
1458
- validator: (e) => typeof e == "boolean" || ["always", "desktop", "mobile"].includes(e)
1459
- },
1460
- ...ce(),
1461
- ...ln({
1462
- mobile: null
1463
- }),
1464
- ...Ie(),
1465
- ...xl({
1466
- selectedClass: "v-slide-group-item--active"
1467
- })
1468
- }, "VSlideGroup"), nl = X()({
1469
- name: "VSlideGroup",
1470
- props: Nl(),
1471
- emits: {
1472
- "update:modelValue": (e) => !0
1473
- },
1474
- setup(e, o) {
1475
- let {
1476
- slots: n
1477
- } = o;
1478
- const {
1479
- isRtl: t
1480
- } = gt(), {
1481
- displayClasses: l,
1482
- mobile: s
1483
- } = Cl(e), c = Vl(e, e.symbol), r = te(!1), u = te(0), f = te(0), a = te(0), i = V(() => e.direction === "horizontal"), {
1484
- resizeRef: m,
1485
- contentRect: y
1486
- } = ot(), {
1487
- resizeRef: b,
1488
- contentRect: h
1489
- } = ot(), p = Qn(), k = V(() => ({
1490
- container: m.el,
1491
- duration: 200,
1492
- easing: "easeOutQuart"
1493
- })), _ = V(() => c.selected.value.length ? c.items.value.findIndex((C) => C.id === c.selected.value[0]) : -1), I = V(() => c.selected.value.length ? c.items.value.findIndex((C) => C.id === c.selected.value[c.selected.value.length - 1]) : -1);
1494
- if (it) {
1495
- let C = -1;
1496
- ie(() => [c.selected.value, y.value, h.value, i.value], () => {
1497
- cancelAnimationFrame(C), C = requestAnimationFrame(() => {
1498
- if (y.value && h.value) {
1499
- const v = i.value ? "width" : "height";
1500
- f.value = y.value[v], a.value = h.value[v], r.value = f.value + 1 < a.value;
1501
- }
1502
- if (e.scrollToActive && _.value >= 0 && b.el) {
1503
- const v = b.el.children[I.value];
1504
- B(v, e.centerActive);
1505
- }
1506
- });
1507
- });
1508
- }
1509
- const T = te(!1);
1510
- function B(C, v) {
1511
- let g = 0;
1512
- v ? g = ta({
1513
- containerElement: m.el,
1514
- isHorizontal: i.value,
1515
- selectedElement: C
1516
- }) : g = ea({
1517
- containerElement: m.el,
1518
- isHorizontal: i.value,
1519
- isRtl: t.value,
1520
- selectedElement: C
1521
- }), P(g);
1522
- }
1523
- function P(C) {
1524
- if (!it || !m.el) return;
1525
- const v = We(i.value, m.el), g = El(i.value, t.value, m.el);
1526
- if (!(ll(i.value, m.el) <= v || // Prevent scrolling by only a couple of pixels, which doesn't look smooth
1527
- Math.abs(C - g) < 16)) {
1528
- if (i.value && t.value && m.el) {
1529
- const {
1530
- scrollWidth: R,
1531
- offsetWidth: Z
1532
- } = m.el;
1533
- C = R - Z - C;
1534
- }
1535
- i.value ? p.horizontal(C, k.value) : p(C, k.value);
1536
- }
1537
- }
1538
- function w(C) {
1539
- const {
1540
- scrollTop: v,
1541
- scrollLeft: g
1542
- } = C.target;
1543
- u.value = i.value ? g : v;
1544
- }
1545
- function x(C) {
1546
- if (T.value = !0, !(!r.value || !b.el)) {
1547
- for (const v of C.composedPath())
1548
- for (const g of b.el.children)
1549
- if (g === v) {
1550
- B(g);
1551
- return;
1552
- }
1553
- }
1554
- }
1555
- function $(C) {
1556
- T.value = !1;
1557
- }
1558
- let H = !1;
1559
- function G(C) {
1560
- !H && !T.value && !(C.relatedTarget && b.el?.contains(C.relatedTarget)) && Y(), H = !1;
1561
- }
1562
- function z() {
1563
- H = !0;
1564
- }
1565
- function me(C) {
1566
- if (!b.el) return;
1567
- function v(g) {
1568
- C.preventDefault(), Y(g);
1569
- }
1570
- i.value ? C.key === "ArrowRight" ? v(t.value ? "prev" : "next") : C.key === "ArrowLeft" && v(t.value ? "next" : "prev") : C.key === "ArrowDown" ? v("next") : C.key === "ArrowUp" && v("prev"), C.key === "Home" ? v("first") : C.key === "End" && v("last");
1571
- }
1572
- function j(C, v) {
1573
- if (!C) return;
1574
- let g = C;
1575
- do
1576
- g = g?.[v === "next" ? "nextElementSibling" : "previousElementSibling"];
1577
- while (g?.hasAttribute("disabled"));
1578
- return g;
1579
- }
1580
- function Y(C) {
1581
- if (!b.el) return;
1582
- let v;
1583
- if (!C)
1584
- v = nn(b.el)[0];
1585
- else if (C === "next") {
1586
- if (v = j(b.el.querySelector(":focus"), C), !v) return Y("first");
1587
- } else if (C === "prev") {
1588
- if (v = j(b.el.querySelector(":focus"), C), !v) return Y("last");
1589
- } else C === "first" ? (v = b.el.firstElementChild, v?.hasAttribute("disabled") && (v = j(v, "next"))) : C === "last" && (v = b.el.lastElementChild, v?.hasAttribute("disabled") && (v = j(v, "prev")));
1590
- v && v.focus({
1591
- preventScroll: !0
1592
- });
1593
- }
1594
- function K(C) {
1595
- const v = i.value && t.value ? -1 : 1, g = (C === "prev" ? -v : v) * f.value;
1596
- let D = u.value + g;
1597
- if (i.value && t.value && m.el) {
1598
- const {
1599
- scrollWidth: R,
1600
- offsetWidth: Z
1601
- } = m.el;
1602
- D += R - Z;
1603
- }
1604
- P(D);
1605
- }
1606
- const le = V(() => ({
1607
- next: c.next,
1608
- prev: c.prev,
1609
- select: c.select,
1610
- isSelected: c.isSelected
1611
- })), W = V(() => r.value || Math.abs(u.value) > 0), ue = V(() => {
1612
- switch (e.showArrows) {
1613
- // Always show arrows on desktop & mobile
1614
- case "always":
1615
- return !0;
1616
- // Always show arrows on desktop
1617
- case "desktop":
1618
- return !s.value;
1619
- // Show arrows on mobile when overflowing.
1620
- // This matches the default 2.2 behavior
1621
- case !0:
1622
- return W.value;
1623
- // Always show on mobile
1624
- case "mobile":
1625
- return s.value || W.value;
1626
- // https://material.io/components/tabs#scrollable-tabs
1627
- // Always show arrows when
1628
- // overflowed on desktop
1629
- default:
1630
- return !s.value && W.value;
1631
- }
1632
- }), A = V(() => Math.abs(u.value) > 1), N = V(() => {
1633
- if (!m.value || !W.value) return !1;
1634
- const C = ll(i.value, m.el), v = la(i.value, m.el);
1635
- return C - v - Math.abs(u.value) > 1;
1636
- });
1637
- return Q(() => d(e.tag, {
1638
- class: oe(["v-slide-group", {
1639
- "v-slide-group--vertical": !i.value,
1640
- "v-slide-group--has-affixes": ue.value,
1641
- "v-slide-group--is-overflowing": r.value
1642
- }, l.value, e.class]),
1643
- style: pe(e.style),
1644
- tabindex: T.value || c.selected.value.length ? -1 : 0,
1645
- onFocus: G
1646
- }, {
1647
- default: () => [ue.value && S("div", {
1648
- key: "prev",
1649
- class: oe(["v-slide-group__prev", {
1650
- "v-slide-group__prev--disabled": !A.value
1651
- }]),
1652
- onMousedown: z,
1653
- onClick: () => A.value && K("prev")
1654
- }, [n.prev?.(le.value) ?? d(Xt, null, {
1655
- default: () => [d(ye, {
1656
- icon: t.value ? e.nextIcon : e.prevIcon
1657
- }, null)]
1658
- })]), S("div", {
1659
- key: "container",
1660
- ref: m,
1661
- class: oe(["v-slide-group__container", e.contentClass]),
1662
- onScroll: w
1663
- }, [S("div", {
1664
- ref: b,
1665
- class: "v-slide-group__content",
1666
- onFocusin: x,
1667
- onFocusout: $,
1668
- onKeydown: me
1669
- }, [n.default?.(le.value)])]), ue.value && S("div", {
1670
- key: "next",
1671
- class: oe(["v-slide-group__next", {
1672
- "v-slide-group__next--disabled": !N.value
1673
- }]),
1674
- onMousedown: z,
1675
- onClick: () => N.value && K("next")
1676
- }, [n.next?.(le.value) ?? d(Xt, null, {
1677
- default: () => [d(ye, {
1678
- icon: t.value ? e.prevIcon : e.nextIcon
1679
- }, null)]
1680
- })])]
1681
- })), {
1682
- selected: c.selected,
1683
- scrollTo: K,
1684
- scrollOffset: u,
1685
- focus: Y,
1686
- hasPrev: A,
1687
- hasNext: N
1688
- };
1689
- }
1690
- }), Rl = Symbol.for("vuetify:v-chip-group"), na = L({
1691
- baseColor: String,
1692
- column: Boolean,
1693
- filter: Boolean,
1694
- valueComparator: {
1695
- type: Function,
1696
- default: qe
1697
- },
1698
- ...Nl({
1699
- scrollToActive: !1
1700
- }),
1701
- ...ce(),
1702
- ...xl({
1703
- selectedClass: "v-chip--selected"
1704
- }),
1705
- ...Ie(),
1706
- ...Te(),
1707
- ...Dt({
1708
- variant: "tonal"
1709
- })
1710
- }, "VChipGroup"), aa = X()({
1711
- name: "VChipGroup",
1712
- props: na(),
1713
- emits: {
1714
- "update:modelValue": (e) => !0
1715
- },
1716
- setup(e, o) {
1717
- let {
1718
- slots: n
1719
- } = o;
1720
- const {
1721
- themeClasses: t
1722
- } = Le(e), {
1723
- isSelected: l,
1724
- select: s,
1725
- next: c,
1726
- prev: r,
1727
- selected: u
1728
- } = Vl(e, Rl);
1729
- return Pt({
1730
- VChip: {
1731
- baseColor: F(() => e.baseColor),
1732
- color: F(() => e.color),
1733
- disabled: F(() => e.disabled),
1734
- filter: F(() => e.filter),
1735
- variant: F(() => e.variant)
1736
- }
1737
- }), Q(() => {
1738
- const f = nl.filterProps(e);
1739
- return d(nl, U(f, {
1740
- class: ["v-chip-group", {
1741
- "v-chip-group--column": e.column
1742
- }, t.value, e.class],
1743
- style: e.style
1744
- }), {
1745
- default: () => [n.default?.({
1746
- isSelected: l,
1747
- select: s,
1748
- next: c,
1749
- prev: r,
1750
- selected: u.value
1751
- })]
1752
- });
1753
- }), {};
1754
- }
1755
- }), oa = L({
1756
- activeClass: String,
1757
- appendAvatar: String,
1758
- appendIcon: re,
1759
- baseColor: String,
1760
- closable: Boolean,
1761
- closeIcon: {
1762
- type: re,
1763
- default: "$delete"
1764
- },
1765
- closeLabel: {
1766
- type: String,
1767
- default: "$vuetify.close"
1768
- },
1769
- draggable: Boolean,
1770
- filter: Boolean,
1771
- filterIcon: {
1772
- type: re,
1773
- default: "$complete"
1774
- },
1775
- label: Boolean,
1776
- link: {
1777
- type: Boolean,
1778
- default: void 0
1779
- },
1780
- pill: Boolean,
1781
- prependAvatar: String,
1782
- prependIcon: re,
1783
- ripple: {
1784
- type: [Boolean, Object],
1785
- default: !0
1786
- },
1787
- text: {
1788
- type: [String, Number, Boolean],
1789
- default: void 0
1790
- },
1791
- modelValue: {
1792
- type: Boolean,
1793
- default: !0
1794
- },
1795
- onClick: Ae(),
1796
- onClickOnce: Ae(),
1797
- ...Ot(),
1798
- ...ce(),
1799
- ...Xe(),
1800
- ...Et(),
1801
- ...sn(),
1802
- ...Ze(),
1803
- ...fl(),
1804
- ...on(),
1805
- ...Ie({
1806
- tag: "span"
1807
- }),
1808
- ...Te(),
1809
- ...Dt({
1810
- variant: "tonal"
1811
- })
1812
- }, "VChip"), It = X()({
1813
- name: "VChip",
1814
- directives: {
1815
- vRipple: Me
1816
- },
1817
- props: oa(),
1818
- emits: {
1819
- "click:close": (e) => !0,
1820
- "update:modelValue": (e) => !0,
1821
- "group:selected": (e) => !0,
1822
- click: (e) => !0
1823
- },
1824
- setup(e, o) {
1825
- let {
1826
- attrs: n,
1827
- emit: t,
1828
- slots: l
1829
- } = o;
1830
- const {
1831
- t: s
1832
- } = ze(), {
1833
- borderClasses: c
1834
- } = At(e), {
1835
- densityClasses: r
1836
- } = dt(e), {
1837
- elevationClasses: u
1838
- } = Ft(e), {
1839
- roundedClasses: f
1840
- } = Qe(e), {
1841
- sizeClasses: a
1842
- } = an(e), {
1843
- themeClasses: i
1844
- } = Le(e), m = Se(e, "modelValue"), y = Yt(e, Rl, !1), b = Yt(e, $l, !1), h = cl(e, n), p = F(() => e.link !== !1 && h.isLink.value), k = V(() => !e.disabled && e.link !== !1 && (!!y || e.link || h.isClickable.value)), _ = F(() => ({
1845
- "aria-label": s(e.closeLabel),
1846
- disabled: e.disabled,
1847
- onClick(x) {
1848
- x.preventDefault(), x.stopPropagation(), m.value = !1, t("click:close", x);
1849
- }
1850
- }));
1851
- ie(m, (x) => {
1852
- x ? (y?.register(), b?.register()) : (y?.unregister(), b?.unregister());
1853
- });
1854
- const {
1855
- colorClasses: I,
1856
- colorStyles: T,
1857
- variantClasses: B
1858
- } = sl(() => ({
1859
- color: !y || y.isSelected.value ? e.color ?? e.baseColor : e.baseColor,
1860
- variant: e.variant
1861
- }));
1862
- function P(x) {
1863
- t("click", x), k.value && (h.navigate?.(x), y?.toggle());
1864
- }
1865
- function w(x) {
1866
- (x.key === "Enter" || x.key === " ") && (x.preventDefault(), P(x));
1867
- }
1868
- return () => {
1869
- const x = h.isLink.value ? "a" : e.tag, $ = !!(e.appendIcon || e.appendAvatar), H = !!($ || l.append), G = !!(l.close || e.closable), z = !!(l.filter || e.filter) && y, me = !!(e.prependIcon || e.prependAvatar), j = !!(me || l.prepend);
1870
- return m.value && Be(d(x, U(h.linkProps, {
1871
- class: ["v-chip", {
1872
- "v-chip--disabled": e.disabled,
1873
- "v-chip--label": e.label,
1874
- "v-chip--link": k.value,
1875
- "v-chip--filter": z,
1876
- "v-chip--pill": e.pill,
1877
- [`${e.activeClass}`]: e.activeClass && h.isActive?.value
1878
- }, i.value, c.value, I.value, r.value, u.value, f.value, a.value, B.value, y?.selectedClass.value, e.class],
1879
- style: [T.value, e.style],
1880
- disabled: e.disabled || void 0,
1881
- draggable: e.draggable,
1882
- tabindex: k.value ? 0 : void 0,
1883
- onClick: P,
1884
- onKeydown: k.value && !p.value && w
1885
- }), {
1886
- default: () => [dl(k.value, "v-chip"), z && d(Il, {
1887
- key: "filter"
1888
- }, {
1889
- default: () => [Be(S("div", {
1890
- class: "v-chip__filter"
1891
- }, [l.filter ? d(ke, {
1892
- key: "filter-defaults",
1893
- disabled: !e.filterIcon,
1894
- defaults: {
1895
- VIcon: {
1896
- icon: e.filterIcon
1897
- }
1898
- }
1899
- }, l.filter) : d(ye, {
1900
- key: "filter-icon",
1901
- icon: e.filterIcon
1902
- }, null)]), [[rt, y.isSelected.value]])]
1903
- }), j && S("div", {
1904
- key: "prepend",
1905
- class: "v-chip__prepend"
1906
- }, [l.prepend ? d(ke, {
1907
- key: "prepend-defaults",
1908
- disabled: !me,
1909
- defaults: {
1910
- VAvatar: {
1911
- image: e.prependAvatar,
1912
- start: !0
1913
- },
1914
- VIcon: {
1915
- icon: e.prependIcon,
1916
- start: !0
1917
- }
1918
- }
1919
- }, l.prepend) : S(se, null, [e.prependIcon && d(ye, {
1920
- key: "prepend-icon",
1921
- icon: e.prependIcon,
1922
- start: !0
1923
- }, null), e.prependAvatar && d(Ke, {
1924
- key: "prepend-avatar",
1925
- image: e.prependAvatar,
1926
- start: !0
1927
- }, null)])]), S("div", {
1928
- class: "v-chip__content",
1929
- "data-no-activator": ""
1930
- }, [l.default?.({
1931
- isSelected: y?.isSelected.value,
1932
- selectedClass: y?.selectedClass.value,
1933
- select: y?.select,
1934
- toggle: y?.toggle,
1935
- value: y?.value.value,
1936
- disabled: e.disabled
1937
- }) ?? Ge(e.text)]), H && S("div", {
1938
- key: "append",
1939
- class: "v-chip__append"
1940
- }, [l.append ? d(ke, {
1941
- key: "append-defaults",
1942
- disabled: !$,
1943
- defaults: {
1944
- VAvatar: {
1945
- end: !0,
1946
- image: e.appendAvatar
1947
- },
1948
- VIcon: {
1949
- end: !0,
1950
- icon: e.appendIcon
1951
- }
1952
- }
1953
- }, l.append) : S(se, null, [e.appendIcon && d(ye, {
1954
- key: "append-icon",
1955
- end: !0,
1956
- icon: e.appendIcon
1957
- }, null), e.appendAvatar && d(Ke, {
1958
- key: "append-avatar",
1959
- end: !0,
1960
- image: e.appendAvatar
1961
- }, null)])]), G && S("button", U({
1962
- key: "close",
1963
- class: "v-chip__close",
1964
- type: "button",
1965
- "data-testid": "close-chip"
1966
- }, _.value), [l.close ? d(ke, {
1967
- key: "close-defaults",
1968
- defaults: {
1969
- VIcon: {
1970
- icon: e.closeIcon,
1971
- size: "x-small"
1972
- }
1973
- }
1974
- }, l.close) : d(ye, {
1975
- key: "close-icon",
1976
- icon: e.closeIcon,
1977
- size: "x-small"
1978
- }, null)])]
1979
- }), [[Me, k.value && e.ripple, null]]);
1980
- };
1981
- }
1982
- }), ia = L({
1983
- color: String,
1984
- ...Ot(),
1985
- ...ce(),
1986
- ...et(),
1987
- ...Et(),
1988
- ...Bt(),
1989
- ...ml(),
1990
- ...Ze(),
1991
- ...Ie(),
1992
- ...Te()
1993
- }, "VSheet"), sa = X()({
1994
- name: "VSheet",
1995
- props: ia(),
1996
- setup(e, o) {
1997
- let {
1998
- slots: n
1999
- } = o;
2000
- const {
2001
- themeClasses: t
2002
- } = Le(e), {
2003
- backgroundColorClasses: l,
2004
- backgroundColorStyles: s
2005
- } = ft(() => e.color), {
2006
- borderClasses: c
2007
- } = At(e), {
2008
- dimensionStyles: r
2009
- } = Ye(e), {
2010
- elevationClasses: u
2011
- } = Ft(e), {
2012
- locationStyles: f
2013
- } = Tt(e), {
2014
- positionClasses: a
2015
- } = rl(e), {
2016
- roundedClasses: i
2017
- } = Qe(e);
2018
- return Q(() => d(e.tag, {
2019
- class: oe(["v-sheet", t.value, l.value, c.value, u.value, a.value, i.value, e.class]),
2020
- style: pe([s.value, r.value, f.value, e.style])
2021
- }, n)), {};
2022
- }
2023
- }), ua = {
2024
- __name: "Selected",
2025
- props: {
2026
- modelValue: {},
2027
- modelModifiers: {}
2028
- },
2029
- emits: /* @__PURE__ */ _t("save", ["update:modelValue"]),
2030
- setup(e, { emit: o }) {
2031
- const { advancedFiltersState: n } = lt(), t = he("table_props"), l = ct(e, "modelValue"), s = (u, f) => {
2032
- const a = t.headers.find((b) => (b.advancedFilter?.key ?? b.key) === f), i = u.comparison === "=" ? ":" : " " + u.comparison, m = Array.isArray(u.value) ? u.value : [u.value], y = m.filter((b, h) => !(a.advancedFilter?.component === "datepicker" && h !== 0 && h !== m.length - 1)).map((b) => {
2033
- const h = a.advancedFilter?.options?.items ?? [];
2034
- let p = b, k;
2035
- return h.length && (k = h.find((_) => _.value === b), k && (p = k.title)), typeof a.advancedFilter?.valueFormatter == "function" && (p = a.advancedFilter.valueFormatter({
2036
- item: k,
2037
- value: b
2038
- })), p;
2039
- });
2040
- return `${a.title}${i} ${y.join(", ")}`;
2041
- }, c = (u) => {
2042
- l.value[u] = { comparison: "=", value: null }, r("save");
2043
- }, r = o;
2044
- return (u, f) => (J(), fe(sa, null, {
2045
- default: ee(() => [
2046
- d(aa, null, {
2047
- default: ee(() => [
2048
- (J(!0), $e(se, null, wt(O(n), (a, i) => (J(), fe(It, {
2049
- key: i,
2050
- class: "my-0",
2051
- text: s(a, i),
2052
- closable: "",
2053
- value: a,
2054
- density: "comfortable",
2055
- "onClick:close": (m) => c(i)
2056
- }, null, 8, ["text", "value", "onClick:close"]))), 128))
2057
- ]),
2058
- _: 1
2059
- })
2060
- ]),
2061
- _: 1
2062
- }));
2063
- }
2064
- }, ra = L({
2065
- active: Boolean,
2066
- disabled: Boolean,
2067
- max: [Number, String],
2068
- value: {
2069
- type: [Number, String],
2070
- default: 0
2071
- },
2072
- ...ce(),
2073
- ...mt({
2074
- transition: {
2075
- component: bl
2076
- }
2077
- })
2078
- }, "VCounter"), ca = X()({
2079
- name: "VCounter",
2080
- functional: !0,
2081
- props: ra(),
2082
- setup(e, o) {
2083
- let {
2084
- slots: n
2085
- } = o;
2086
- const t = F(() => e.max ? `${e.value} / ${e.max}` : String(e.value));
2087
- return Q(() => d(Nt, {
2088
- transition: e.transition
2089
- }, {
2090
- default: () => [Be(S("div", {
2091
- class: oe(["v-counter", {
2092
- "text-error": e.max && !e.disabled && parseFloat(e.value) > parseFloat(e.max)
2093
- }, e.class]),
2094
- style: pe(e.style)
2095
- }, [n.default ? n.default({
2096
- counter: t.value,
2097
- max: e.max,
2098
- value: e.value
2099
- }) : t.value]), [[rt, e.active]])]
2100
- })), {};
2101
- }
2102
- }), da = L({
2103
- floating: Boolean,
2104
- ...ce()
2105
- }, "VFieldLabel"), nt = X()({
2106
- name: "VFieldLabel",
2107
- props: da(),
2108
- setup(e, o) {
2109
- let {
2110
- slots: n
2111
- } = o;
2112
- return Q(() => d(_l, {
2113
- class: oe(["v-field-label", {
2114
- "v-field-label--floating": e.floating
2115
- }, e.class]),
2116
- style: pe(e.style)
2117
- }, n)), {};
2118
- }
2119
- }), va = ["underlined", "outlined", "filled", "solo", "solo-inverted", "solo-filled", "plain"], Ml = L({
2120
- appendInnerIcon: re,
2121
- bgColor: String,
2122
- clearable: Boolean,
2123
- clearIcon: {
2124
- type: re,
2125
- default: "$clear"
2126
- },
2127
- active: Boolean,
2128
- centerAffix: {
2129
- type: Boolean,
2130
- default: void 0
2131
- },
2132
- color: String,
2133
- baseColor: String,
2134
- dirty: Boolean,
2135
- disabled: {
2136
- type: Boolean,
2137
- default: null
2138
- },
2139
- glow: Boolean,
2140
- error: Boolean,
2141
- flat: Boolean,
2142
- iconColor: [Boolean, String],
2143
- label: String,
2144
- persistentClear: Boolean,
2145
- prependInnerIcon: re,
2146
- reverse: Boolean,
2147
- singleLine: Boolean,
2148
- variant: {
2149
- type: String,
2150
- default: "filled",
2151
- validator: (e) => va.includes(e)
2152
- },
2153
- "onClick:clear": Ae(),
2154
- "onClick:appendInner": Ae(),
2155
- "onClick:prependInner": Ae(),
2156
- ...ce(),
2157
- ...gl(),
2158
- ...Ze(),
2159
- ...Te()
2160
- }, "VField"), al = X()({
2161
- name: "VField",
2162
- inheritAttrs: !1,
2163
- props: {
2164
- id: String,
2165
- details: Boolean,
2166
- ...Bl(),
2167
- ...Ml()
2168
- },
2169
- emits: {
2170
- "update:focused": (e) => !0,
2171
- "update:modelValue": (e) => !0
2172
- },
2173
- setup(e, o) {
2174
- let {
2175
- attrs: n,
2176
- emit: t,
2177
- slots: l
2178
- } = o;
2179
- const {
2180
- themeClasses: s
2181
- } = Le(e), {
2182
- loaderClasses: c
2183
- } = ul(e), {
2184
- focusClasses: r,
2185
- isFocused: u,
2186
- focus: f,
2187
- blur: a
2188
- } = Ht(e), {
2189
- InputIcon: i
2190
- } = Dl(e), {
2191
- roundedClasses: m
2192
- } = Qe(e), {
2193
- rtlClasses: y
2194
- } = gt(), b = F(() => e.dirty || e.active), h = F(() => !!(e.label || l.label)), p = F(() => !e.singleLine && h.value), k = Ee(), _ = V(() => e.id || `input-${k}`), I = F(() => e.details ? `${_.value}-messages` : void 0), T = M(), B = M(), P = M(), w = V(() => ["plain", "underlined"].includes(e.variant)), x = V(() => e.error || e.disabled ? void 0 : b.value && u.value ? e.color : e.baseColor), $ = V(() => {
2195
- if (!(!e.iconColor || e.glow && !u.value))
2196
- return e.iconColor === !0 ? x.value : e.iconColor;
2197
- }), {
2198
- backgroundColorClasses: H,
2199
- backgroundColorStyles: G
2200
- } = ft(() => e.bgColor), {
2201
- textColorClasses: z,
2202
- textColorStyles: me
2203
- } = vt(x);
2204
- ie(b, (K) => {
2205
- if (p.value && !kl()) {
2206
- const le = T.value.$el, W = B.value.$el;
2207
- requestAnimationFrame(() => {
2208
- const ue = un(le), A = W.getBoundingClientRect(), N = A.x - ue.x, C = A.y - ue.y - (ue.height / 2 - A.height / 2), v = A.width / 0.75, g = Math.abs(v - ue.width) > 1 ? {
2209
- maxWidth: Ue(v)
2210
- } : void 0, D = getComputedStyle(le), R = getComputedStyle(W), Z = parseFloat(D.transitionDuration) * 1e3 || 150, ne = parseFloat(R.getPropertyValue("--v-field-label-scale")), E = R.getPropertyValue("color");
2211
- le.style.visibility = "visible", W.style.visibility = "hidden", rn(le, {
2212
- transform: `translate(${N}px, ${C}px) scale(${ne})`,
2213
- color: E,
2214
- ...g
2215
- }, {
2216
- duration: Z,
2217
- easing: cn,
2218
- direction: K ? "normal" : "reverse"
2219
- }).finished.then(() => {
2220
- le.style.removeProperty("visibility"), W.style.removeProperty("visibility");
2221
- });
2222
- });
2223
- }
2224
- }, {
2225
- flush: "post"
2226
- });
2227
- const j = V(() => ({
2228
- isActive: b,
2229
- isFocused: u,
2230
- controlRef: P,
2231
- blur: a,
2232
- focus: f
2233
- }));
2234
- function Y(K) {
2235
- K.target !== document.activeElement && K.preventDefault();
2236
- }
2237
- return Q(() => {
2238
- const K = e.variant === "outlined", le = !!(l["prepend-inner"] || e.prependInnerIcon), W = !!(e.clearable || l.clear) && !e.disabled, ue = !!(l["append-inner"] || e.appendInnerIcon || W), A = () => l.label ? l.label({
2239
- ...j.value,
2240
- label: e.label,
2241
- props: {
2242
- for: _.value
2243
- }
2244
- }) : e.label;
2245
- return S("div", U({
2246
- class: ["v-field", {
2247
- "v-field--active": b.value,
2248
- "v-field--appended": ue,
2249
- "v-field--center-affix": e.centerAffix ?? !w.value,
2250
- "v-field--disabled": e.disabled,
2251
- "v-field--dirty": e.dirty,
2252
- "v-field--error": e.error,
2253
- "v-field--glow": e.glow,
2254
- "v-field--flat": e.flat,
2255
- "v-field--has-background": !!e.bgColor,
2256
- "v-field--persistent-clear": e.persistentClear,
2257
- "v-field--prepended": le,
2258
- "v-field--reverse": e.reverse,
2259
- "v-field--single-line": e.singleLine,
2260
- "v-field--no-label": !A(),
2261
- [`v-field--variant-${e.variant}`]: !0
2262
- }, s.value, H.value, r.value, c.value, m.value, y.value, e.class],
2263
- style: [G.value, e.style],
2264
- onClick: Y
2265
- }, n), [S("div", {
2266
- class: "v-field__overlay"
2267
- }, null), d(vl, {
2268
- name: "v-field",
2269
- active: !!e.loading,
2270
- color: e.error ? "error" : typeof e.loading == "string" ? e.loading : e.color
2271
- }, {
2272
- default: l.loader
2273
- }), le && S("div", {
2274
- key: "prepend",
2275
- class: "v-field__prepend-inner"
2276
- }, [e.prependInnerIcon && d(i, {
2277
- key: "prepend-icon",
2278
- name: "prependInner",
2279
- color: $.value
2280
- }, null), l["prepend-inner"]?.(j.value)]), S("div", {
2281
- class: "v-field__field",
2282
- "data-no-activator": ""
2283
- }, [["filled", "solo", "solo-inverted", "solo-filled"].includes(e.variant) && p.value && d(nt, {
2284
- key: "floating-label",
2285
- ref: B,
2286
- class: oe([z.value]),
2287
- floating: !0,
2288
- for: _.value,
2289
- "aria-hidden": !b.value,
2290
- style: pe(me.value)
2291
- }, {
2292
- default: () => [A()]
2293
- }), h.value && d(nt, {
2294
- key: "label",
2295
- ref: T,
2296
- for: _.value
2297
- }, {
2298
- default: () => [A()]
2299
- }), l.default?.({
2300
- ...j.value,
2301
- props: {
2302
- id: _.value,
2303
- class: "v-field__input",
2304
- "aria-describedby": I.value
2305
- },
2306
- focus: f,
2307
- blur: a
2308
- }) ?? S("div", {
2309
- id: _.value,
2310
- class: "v-field__input",
2311
- "aria-describedby": I.value
2312
- }, null)]), W && d(Il, {
2313
- key: "clear"
2314
- }, {
2315
- default: () => [Be(S("div", {
2316
- class: "v-field__clearable",
2317
- onMousedown: (N) => {
2318
- N.preventDefault(), N.stopPropagation();
2319
- }
2320
- }, [d(ke, {
2321
- defaults: {
2322
- VIcon: {
2323
- icon: e.clearIcon
2324
- }
2325
- }
2326
- }, {
2327
- default: () => [l.clear ? l.clear({
2328
- ...j.value,
2329
- props: {
2330
- onFocus: f,
2331
- onBlur: a,
2332
- onClick: e["onClick:clear"],
2333
- tabindex: -1
2334
- }
2335
- }) : d(i, {
2336
- name: "clear",
2337
- onFocus: f,
2338
- onBlur: a,
2339
- tabindex: -1
2340
- }, null)]
2341
- })]), [[rt, e.dirty]])]
2342
- }), ue && S("div", {
2343
- key: "append",
2344
- class: "v-field__append-inner"
2345
- }, [l["append-inner"]?.(j.value), e.appendInnerIcon && d(i, {
2346
- key: "append-icon",
2347
- name: "appendInner",
2348
- color: $.value
2349
- }, null)]), S("div", {
2350
- class: oe(["v-field__outline", z.value]),
2351
- style: pe(me.value)
2352
- }, [K && S(se, null, [S("div", {
2353
- class: "v-field__outline__start"
2354
- }, null), p.value && S("div", {
2355
- class: "v-field__outline__notch"
2356
- }, [d(nt, {
2357
- ref: B,
2358
- floating: !0,
2359
- for: _.value,
2360
- "aria-hidden": !b.value
2361
- }, {
2362
- default: () => [A()]
2363
- })]), S("div", {
2364
- class: "v-field__outline__end"
2365
- }, null)]), w.value && p.value && d(nt, {
2366
- ref: B,
2367
- floating: !0,
2368
- for: _.value,
2369
- "aria-hidden": !b.value
2370
- }, {
2371
- default: () => [A()]
2372
- })])]);
2373
- }), {
2374
- controlRef: P,
2375
- fieldIconColor: $
2376
- };
2377
- }
2378
- }), fa = L({
2379
- autocomplete: String
2380
- }, "autocomplete");
2381
- function Ll(e) {
2382
- const o = Ee(), n = te(0), t = F(() => e.autocomplete === "suppress"), l = F(() => {
2383
- if (e.name)
2384
- return t.value ? `${e.name}-${o}-${n.value}` : e.name;
2385
- }), s = F(() => t.value ? "off" : e.autocomplete);
2386
- return {
2387
- isSuppressing: t,
2388
- fieldAutocomplete: s,
2389
- fieldName: l,
2390
- update: () => n.value = (/* @__PURE__ */ new Date()).getTime()
2391
- };
2392
- }
2393
- function ma(e) {
2394
- function o(n, t) {
2395
- !e.autofocus || !n || t[0].target?.focus?.();
2396
- }
2397
- return {
2398
- onIntersect: o
2399
- };
2400
- }
2401
- const ga = ["color", "file", "time", "date", "datetime-local", "week", "month"], Gt = L({
2402
- autofocus: Boolean,
2403
- counter: [Boolean, Number, String],
2404
- counterValue: [Number, Function],
2405
- prefix: String,
2406
- placeholder: String,
2407
- persistentPlaceholder: Boolean,
2408
- persistentCounter: Boolean,
2409
- suffix: String,
2410
- role: String,
2411
- type: {
2412
- type: String,
2413
- default: "text"
2414
- },
2415
- modelModifiers: Object,
2416
- ...fa(),
2417
- ...Ut(),
2418
- ...Ml()
2419
- }, "VTextField"), Je = X()({
2420
- name: "VTextField",
2421
- directives: {
2422
- vIntersect: Qt
2423
- },
2424
- inheritAttrs: !1,
2425
- props: Gt(),
2426
- emits: {
2427
- "click:control": (e) => !0,
2428
- "mousedown:control": (e) => !0,
2429
- "update:focused": (e) => !0,
2430
- "update:modelValue": (e) => !0
2431
- },
2432
- setup(e, o) {
2433
- let {
2434
- attrs: n,
2435
- emit: t,
2436
- slots: l
2437
- } = o;
2438
- const s = Se(e, "modelValue"), {
2439
- isFocused: c,
2440
- focus: r,
2441
- blur: u
2442
- } = Ht(e), {
2443
- onIntersect: f
2444
- } = ma(e), a = V(() => typeof e.counterValue == "function" ? e.counterValue(s.value) : typeof e.counterValue == "number" ? e.counterValue : (s.value ?? "").toString().length), i = V(() => {
2445
- if (n.maxlength) return n.maxlength;
2446
- if (!(!e.counter || typeof e.counter != "number" && typeof e.counter != "string"))
2447
- return e.counter;
2448
- }), m = V(() => ["plain", "underlined"].includes(e.variant)), y = M(), b = M(), h = M(), p = Ll(e), k = V(() => ga.includes(e.type) || e.persistentPlaceholder || c.value || e.active);
2449
- function _() {
2450
- p.isSuppressing.value && p.update(), c.value || r(), be(() => {
2451
- h.value !== document.activeElement && h.value?.focus();
2452
- });
2453
- }
2454
- function I(w) {
2455
- t("mousedown:control", w), w.target !== h.value && (_(), w.preventDefault());
2456
- }
2457
- function T(w) {
2458
- t("click:control", w);
2459
- }
2460
- function B(w, x) {
2461
- w.stopPropagation(), _(), be(() => {
2462
- x(), yl(e["onClick:clear"], w);
2463
- });
2464
- }
2465
- function P(w) {
2466
- const x = w.target;
2467
- if (!(e.modelModifiers?.trim && ["text", "search", "password", "tel", "url"].includes(e.type))) {
2468
- s.value = x.value;
2469
- return;
2470
- }
2471
- const $ = x.value, H = x.selectionStart, G = x.selectionEnd;
2472
- s.value = $, be(() => {
2473
- let z = 0;
2474
- $.trimStart().length === x.value.length && (z = $.length - x.value.length), H != null && (x.selectionStart = H - z), G != null && (x.selectionEnd = G - z);
2475
- });
2476
- }
2477
- return Q(() => {
2478
- const w = !!(l.counter || e.counter !== !1 && e.counter != null), x = !!(w || l.details), [$, H] = $t(n), {
2479
- modelValue: G,
2480
- ...z
2481
- } = st.filterProps(e), me = al.filterProps(e);
2482
- return d(st, U({
2483
- ref: y,
2484
- modelValue: s.value,
2485
- "onUpdate:modelValue": (j) => s.value = j,
2486
- class: ["v-text-field", {
2487
- "v-text-field--prefixed": e.prefix,
2488
- "v-text-field--suffixed": e.suffix,
2489
- "v-input--plain-underlined": m.value
2490
- }, e.class],
2491
- style: e.style
2492
- }, $, z, {
2493
- centerAffix: !m.value,
2494
- focused: c.value
2495
- }), {
2496
- ...l,
2497
- default: (j) => {
2498
- let {
2499
- id: Y,
2500
- isDisabled: K,
2501
- isDirty: le,
2502
- isReadonly: W,
2503
- isValid: ue,
2504
- hasDetails: A,
2505
- reset: N
2506
- } = j;
2507
- return d(al, U({
2508
- ref: b,
2509
- onMousedown: I,
2510
- onClick: T,
2511
- "onClick:clear": (C) => B(C, N),
2512
- role: e.role
2513
- }, He(me, ["onClick:clear"]), {
2514
- id: Y.value,
2515
- active: k.value || le.value,
2516
- dirty: le.value || e.dirty,
2517
- disabled: K.value,
2518
- focused: c.value,
2519
- details: A.value,
2520
- error: ue.value === !1
2521
- }), {
2522
- ...l,
2523
- default: (C) => {
2524
- let {
2525
- props: {
2526
- class: v,
2527
- ...g
2528
- },
2529
- controlRef: D
2530
- } = C;
2531
- const R = Be(S("input", U({
2532
- ref: (Z) => h.value = D.value = Z,
2533
- value: s.value,
2534
- onInput: P,
2535
- autofocus: e.autofocus,
2536
- readonly: W.value,
2537
- disabled: K.value,
2538
- name: p.fieldName.value,
2539
- autocomplete: p.fieldAutocomplete.value,
2540
- placeholder: e.placeholder,
2541
- size: 1,
2542
- role: e.role,
2543
- type: e.type,
2544
- onFocus: r,
2545
- onBlur: u
2546
- }, g, H), null), [[Qt, {
2547
- handler: f
2548
- }, null, {
2549
- once: !0
2550
- }]]);
2551
- return S(se, null, [e.prefix && S("span", {
2552
- class: "v-text-field__prefix"
2553
- }, [S("span", {
2554
- class: "v-text-field__prefix__text"
2555
- }, [e.prefix])]), l.default ? S("div", {
2556
- class: oe(v),
2557
- "data-no-activator": ""
2558
- }, [l.default(), R]) : ql(R, {
2559
- class: v
2560
- }), e.suffix && S("span", {
2561
- class: "v-text-field__suffix"
2562
- }, [S("span", {
2563
- class: "v-text-field__suffix__text"
2564
- }, [e.suffix])])]);
2565
- }
2566
- });
2567
- },
2568
- details: x ? (j) => S(se, null, [l.details?.(j), w && S(se, null, [S("span", null, null), d(ca, {
2569
- active: e.persistentCounter || c.value,
2570
- value: a.value,
2571
- max: i.value,
2572
- disabled: e.disabled
2573
- }, l.counter)])]) : void 0
2574
- });
2575
- }), tt({}, y, b, h);
2576
- }
2577
- }), ya = L({
2578
- renderless: Boolean,
2579
- ...ce()
2580
- }, "VVirtualScrollItem"), ba = X()({
2581
- name: "VVirtualScrollItem",
2582
- inheritAttrs: !1,
2583
- props: ya(),
2584
- emits: {
2585
- "update:height": (e) => !0
2586
- },
2587
- setup(e, o) {
2588
- let {
2589
- attrs: n,
2590
- emit: t,
2591
- slots: l
2592
- } = o;
2593
- const {
2594
- resizeRef: s,
2595
- contentRect: c
2596
- } = ot(void 0, "border");
2597
- ie(() => c.value?.height, (r) => {
2598
- r != null && t("update:height", r);
2599
- }), Q(() => e.renderless ? S(se, null, [l.default?.({
2600
- itemRef: s
2601
- })]) : S("div", U({
2602
- ref: s,
2603
- class: ["v-virtual-scroll__item", e.class],
2604
- style: e.style
2605
- }, n), [l.default?.()]));
2606
- }
2607
- }), ha = -1, pa = 1, St = 100, Sa = L({
2608
- itemHeight: {
2609
- type: [Number, String],
2610
- default: null
2611
- },
2612
- itemKey: {
2613
- type: [String, Array, Function],
2614
- default: null
2615
- },
2616
- height: [Number, String]
2617
- }, "virtual");
2618
- function ka(e, o) {
2619
- const n = Cl(), t = te(0);
2620
- Kt(() => {
2621
- t.value = parseFloat(e.itemHeight || 0);
2622
- });
2623
- const l = te(0), s = te(Math.ceil(
2624
- // Assume 16px items filling the entire screen height if
2625
- // not provided. This is probably incorrect but it minimises
2626
- // the chance of ending up with empty space at the bottom.
2627
- // The default value is set here to avoid poisoning getSize()
2628
- (parseInt(e.height) || n.height.value) / (t.value || 16)
2629
- ) || 1), c = te(0), r = te(0), u = M(), f = M();
2630
- let a = 0;
2631
- const {
2632
- resizeRef: i,
2633
- contentRect: m
2634
- } = ot();
2635
- Kt(() => {
2636
- i.value = u.value;
2637
- });
2638
- const y = V(() => u.value === document.documentElement ? n.height.value : m.value?.height || parseInt(e.height) || 0), b = V(() => !!(u.value && f.value && y.value && t.value));
2639
- let h = Array.from({
2640
- length: o.value.length
2641
- }), p = Array.from({
2642
- length: o.value.length
2643
- });
2644
- const k = te(0);
2645
- let _ = -1;
2646
- function I(A) {
2647
- return h[A] || t.value;
2648
- }
2649
- const T = dn(() => {
2650
- const A = performance.now();
2651
- p[0] = 0;
2652
- const N = o.value.length;
2653
- for (let C = 1; C <= N; C++)
2654
- p[C] = (p[C - 1] || 0) + I(C - 1);
2655
- k.value = Math.max(k.value, performance.now() - A);
2656
- }, k), B = ie(b, (A) => {
2657
- A && (B(), a = f.value.offsetTop, T.immediate(), K(), ~_ && be(() => {
2658
- it && window.requestAnimationFrame(() => {
2659
- W(_), _ = -1;
2660
- });
2661
- }));
2662
- });
2663
- ut(() => {
2664
- T.clear();
2665
- });
2666
- function P(A, N) {
2667
- const C = h[A], v = t.value;
2668
- t.value = v ? Math.min(t.value, N) : N, (C !== N || v !== t.value) && (h[A] = N, T());
2669
- }
2670
- function w(A) {
2671
- A = Pe(A, 0, o.value.length);
2672
- const N = Math.floor(A), C = A % 1, v = N + 1, g = p[N] || 0, D = p[v] || g;
2673
- return g + (D - g) * C;
2674
- }
2675
- function x(A) {
2676
- return Ca(p, A);
2677
- }
2678
- let $ = 0, H = 0, G = 0;
2679
- ie(y, (A, N) => {
2680
- N && (K(), A < N && requestAnimationFrame(() => {
2681
- H = 0, K();
2682
- }));
2683
- });
2684
- let z = -1;
2685
- function me() {
2686
- if (!u.value || !f.value) return;
2687
- const A = u.value.scrollTop, N = performance.now();
2688
- N - G > 500 ? (H = Math.sign(A - $), a = f.value.offsetTop) : H = A - $, $ = A, G = N, window.clearTimeout(z), z = window.setTimeout(j, 500), K();
2689
- }
2690
- function j() {
2691
- !u.value || !f.value || (H = 0, G = 0, window.clearTimeout(z), K());
2692
- }
2693
- let Y = -1;
2694
- function K() {
2695
- cancelAnimationFrame(Y), Y = requestAnimationFrame(le);
2696
- }
2697
- function le() {
2698
- if (!u.value || !y.value || !t.value) return;
2699
- const A = $ - a, N = Math.sign(H), C = Math.max(0, A - St), v = Pe(x(C), 0, o.value.length), g = A + y.value + St, D = Pe(x(g) + 1, v + 1, o.value.length);
2700
- if (
2701
- // Only update the side we're scrolling towards,
2702
- // the other side will be updated incidentally
2703
- (N !== ha || v < l.value) && (N !== pa || D > s.value)
2704
- ) {
2705
- const R = w(l.value) - w(v), Z = w(D) - w(s.value);
2706
- Math.max(R, Z) > St ? (l.value = v, s.value = D) : (v <= 0 && (l.value = v), D >= o.value.length && (s.value = D));
2707
- }
2708
- c.value = w(l.value), r.value = w(o.value.length) - w(s.value);
2709
- }
2710
- function W(A) {
2711
- const N = w(A);
2712
- !u.value || A && !N ? _ = A : u.value.scrollTop = N;
2713
- }
2714
- const ue = V(() => o.value.slice(l.value, s.value).map((A, N) => {
2715
- const C = N + l.value;
2716
- return {
2717
- raw: A,
2718
- index: C,
2719
- key: vn(A, e.itemKey, C)
2720
- };
2721
- }));
2722
- return ie(o, () => {
2723
- h = Array.from({
2724
- length: o.value.length
2725
- }), p = Array.from({
2726
- length: o.value.length
2727
- }), T.immediate(), K();
2728
- }, {
2729
- deep: 1
2730
- }), {
2731
- calculateVisibleItems: K,
2732
- containerRef: u,
2733
- markerRef: f,
2734
- computedItems: ue,
2735
- paddingTop: c,
2736
- paddingBottom: r,
2737
- scrollToIndex: W,
2738
- handleScroll: me,
2739
- handleScrollend: j,
2740
- handleItemResize: P
2741
- };
2742
- }
2743
- function Ca(e, o) {
2744
- let n = e.length - 1, t = 0, l = 0, s = null, c = -1;
2745
- if (e[n] < o)
2746
- return n;
2747
- for (; t <= n; )
2748
- if (l = t + n >> 1, s = e[l], s > o)
2749
- n = l - 1;
2750
- else if (s < o)
2751
- c = l, t = l + 1;
2752
- else return s === o ? l : t;
2753
- return c;
2754
- }
2755
- const Va = L({
2756
- items: {
2757
- type: Array,
2758
- default: () => []
2759
- },
2760
- renderless: Boolean,
2761
- ...Sa(),
2762
- ...ce(),
2763
- ...et()
2764
- }, "VVirtualScroll"), xa = X()({
2765
- name: "VVirtualScroll",
2766
- props: Va(),
2767
- setup(e, o) {
2768
- let {
2769
- slots: n
2770
- } = o;
2771
- const t = pl("VVirtualScroll"), {
2772
- dimensionStyles: l
2773
- } = Ye(e), {
2774
- calculateVisibleItems: s,
2775
- containerRef: c,
2776
- markerRef: r,
2777
- handleScroll: u,
2778
- handleScrollend: f,
2779
- handleItemResize: a,
2780
- scrollToIndex: i,
2781
- paddingTop: m,
2782
- paddingBottom: y,
2783
- computedItems: b
2784
- } = ka(e, F(() => e.items));
2785
- return Ct(() => e.renderless, () => {
2786
- function h() {
2787
- const k = (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1) ? "addEventListener" : "removeEventListener";
2788
- c.value === document.documentElement ? (document[k]("scroll", u, {
2789
- passive: !0
2790
- }), document[k]("scrollend", f)) : (c.value?.[k]("scroll", u, {
2791
- passive: !0
2792
- }), c.value?.[k]("scrollend", f));
2793
- }
2794
- Ne(() => {
2795
- c.value = fn(t.vnode.el, !0), h(!0);
2796
- }), ut(h);
2797
- }), Q(() => {
2798
- const h = b.value.map((p) => d(ba, {
2799
- key: p.key,
2800
- renderless: e.renderless,
2801
- "onUpdate:height": (k) => a(p.index, k)
2802
- }, {
2803
- default: (k) => n.default?.({
2804
- item: p.raw,
2805
- index: p.index,
2806
- ...k
2807
- })
2808
- }));
2809
- return e.renderless ? S(se, null, [S("div", {
2810
- ref: r,
2811
- class: "v-virtual-scroll__spacer",
2812
- style: {
2813
- paddingTop: Ue(m.value)
2814
- }
2815
- }, null), h, S("div", {
2816
- class: "v-virtual-scroll__spacer",
2817
- style: {
2818
- paddingBottom: Ue(y.value)
2819
- }
2820
- }, null)]) : S("div", {
2821
- ref: c,
2822
- class: oe(["v-virtual-scroll", e.class]),
2823
- onScrollPassive: u,
2824
- onScrollend: f,
2825
- style: pe([l.value, e.style])
2826
- }, [S("div", {
2827
- ref: r,
2828
- class: "v-virtual-scroll__container",
2829
- style: {
2830
- paddingTop: Ue(m.value),
2831
- paddingBottom: Ue(y.value)
2832
- }
2833
- }, [h])]);
2834
- }), {
2835
- calculateVisibleItems: s,
2836
- scrollToIndex: i
2837
- };
2838
- }
2839
- });
2840
- function Ia(e, o) {
2841
- const n = te(!1);
2842
- let t;
2843
- function l(r) {
2844
- cancelAnimationFrame(t), n.value = !0, t = requestAnimationFrame(() => {
2845
- t = requestAnimationFrame(() => {
2846
- n.value = !1;
2847
- });
2848
- });
2849
- }
2850
- async function s() {
2851
- await new Promise((r) => requestAnimationFrame(r)), await new Promise((r) => requestAnimationFrame(r)), await new Promise((r) => requestAnimationFrame(r)), await new Promise((r) => {
2852
- if (n.value) {
2853
- const u = ie(n, () => {
2854
- u(), r();
2855
- });
2856
- } else r();
2857
- });
2858
- }
2859
- async function c(r) {
2860
- if (r.key === "Tab" && o.value?.focus(), !["PageDown", "PageUp", "Home", "End"].includes(r.key)) return;
2861
- const u = e.value?.$el;
2862
- if (!u) return;
2863
- (r.key === "Home" || r.key === "End") && u.scrollTo({
2864
- top: r.key === "Home" ? 0 : u.scrollHeight,
2865
- behavior: "smooth"
2866
- }), await s();
2867
- const f = u.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");
2868
- if (r.key === "PageDown" || r.key === "Home") {
2869
- const a = u.getBoundingClientRect().top;
2870
- for (const i of f)
2871
- if (i.getBoundingClientRect().top >= a) {
2872
- i.focus();
2873
- break;
2874
- }
2875
- } else {
2876
- const a = u.getBoundingClientRect().bottom;
2877
- for (const i of [...f].reverse())
2878
- if (i.getBoundingClientRect().bottom <= a) {
2879
- i.focus();
2880
- break;
2881
- }
2882
- }
2883
- }
2884
- return {
2885
- onScrollPassive: l,
2886
- onKeydown: c
2887
- };
2888
- }
2889
- const wa = L({
2890
- closeText: {
2891
- type: String,
2892
- default: "$vuetify.close"
2893
- },
2894
- openText: {
2895
- type: String,
2896
- default: "$vuetify.open"
2897
- }
2898
- }, "autocomplete");
2899
- function _a(e, o) {
2900
- const {
2901
- t: n
2902
- } = ze(), t = Ee(), l = V(() => `menu-${t}`), s = F(() => Wt(o)), c = F(() => l.value), r = F(() => n(Wt(o) ? e.closeText : e.openText));
2903
- return {
2904
- menuId: l,
2905
- ariaExpanded: s,
2906
- ariaControls: c,
2907
- ariaLabel: r
2908
- };
2909
- }
2910
- const Pa = L({
2911
- chips: Boolean,
2912
- closableChips: Boolean,
2913
- eager: Boolean,
2914
- hideNoData: Boolean,
2915
- hideSelected: Boolean,
2916
- listProps: {
2917
- type: Object
2918
- },
2919
- menu: Boolean,
2920
- menuIcon: {
2921
- type: re,
2922
- default: "$dropdown"
2923
- },
2924
- menuProps: {
2925
- type: Object
2926
- },
2927
- multiple: Boolean,
2928
- noDataText: {
2929
- type: String,
2930
- default: "$vuetify.noDataText"
2931
- },
2932
- openOnClear: Boolean,
2933
- itemColor: String,
2934
- noAutoScroll: Boolean,
2935
- ...wa(),
2936
- ...pn({
2937
- itemChildren: !1
2938
- })
2939
- }, "Select"), Aa = L({
2940
- ...Pa(),
2941
- ...He(Gt({
2942
- modelValue: null,
2943
- role: "combobox"
2944
- }), ["validationValue", "dirty", "appendInnerIcon"]),
2945
- ...mt({
2946
- transition: {
2947
- component: Sl
2948
- }
2949
- })
2950
- }, "VSelect"), Fa = X()({
2951
- name: "VSelect",
2952
- props: Aa(),
2953
- emits: {
2954
- "update:focused": (e) => !0,
2955
- "update:modelValue": (e) => !0,
2956
- "update:menu": (e) => !0
2957
- },
2958
- setup(e, o) {
2959
- let {
2960
- slots: n
2961
- } = o;
2962
- const {
2963
- t
2964
- } = ze(), l = M(), s = M(), c = M(), {
2965
- items: r,
2966
- transformIn: u,
2967
- transformOut: f
2968
- } = mn(e), a = Se(e, "modelValue", [], (g) => u(g === null ? [null] : De(g)), (g) => {
2969
- const D = f(g);
2970
- return e.multiple ? D : D[0] ?? null;
2971
- }), i = V(() => typeof e.counterValue == "function" ? e.counterValue(a.value) : typeof e.counterValue == "number" ? e.counterValue : a.value.length), m = zt(e), y = Ll(e), b = V(() => a.value.map((g) => g.value)), h = te(!1);
2972
- let p = "", k = -1, _;
2973
- const I = V(() => e.hideSelected ? r.value.filter((g) => !a.value.some((D) => (e.valueComparator || qe)(D, g))) : r.value), T = V(() => e.hideNoData && !I.value.length || m.isReadonly.value || m.isDisabled.value), B = Se(e, "menu"), P = V({
2974
- get: () => B.value,
2975
- set: (g) => {
2976
- B.value && !g && s.value?.ΨopenChildren.size || g && T.value || (B.value = g);
2977
- }
2978
- }), {
2979
- menuId: w,
2980
- ariaExpanded: x,
2981
- ariaControls: $,
2982
- ariaLabel: H
2983
- } = _a(e, P), G = V(() => ({
2984
- ...e.menuProps,
2985
- activatorProps: {
2986
- ...e.menuProps?.activatorProps || {},
2987
- "aria-haspopup": "listbox"
2988
- // Set aria-haspopup to 'listbox'
2989
- }
2990
- })), z = M(), me = Ia(z, l);
2991
- function j(g) {
2992
- e.openOnClear && (P.value = !0);
2993
- }
2994
- function Y() {
2995
- T.value || (P.value = !P.value);
2996
- }
2997
- function K(g) {
2998
- Zt(g) && le(g);
2999
- }
3000
- function le(g) {
3001
- if (!g.key || m.isReadonly.value) return;
3002
- ["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(g.key) && g.preventDefault(), ["Enter", "ArrowDown", " "].includes(g.key) && (P.value = !0), ["Escape", "Tab"].includes(g.key) && (P.value = !1), g.key === "Home" ? z.value?.focus("first") : g.key === "End" && z.value?.focus("last");
3003
- const D = 1e3;
3004
- if (!Zt(g)) return;
3005
- const R = performance.now();
3006
- R - _ > D && (p = "", k = -1), p += g.key.toLowerCase(), _ = R;
3007
- const Z = I.value;
3008
- function ne() {
3009
- let ae = E();
3010
- return ae || p.at(-1) === p.at(-2) && (p = p.slice(0, -1), ae = E(), ae) || (k = -1, ae = E(), ae) ? ae : (p = g.key.toLowerCase(), E());
3011
- }
3012
- function E() {
3013
- for (let ae = k + 1; ae < Z.length; ae++) {
3014
- const de = Z[ae];
3015
- if (de.title.toLowerCase().startsWith(p))
3016
- return [de, ae];
3017
- }
3018
- }
3019
- const q = ne();
3020
- if (!q) return;
3021
- const [ge, Ve] = q;
3022
- k = Ve, z.value?.focus(Ve), e.multiple || (a.value = [ge]);
3023
- }
3024
- function W(g) {
3025
- let D = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
3026
- if (!g.props.disabled)
3027
- if (e.multiple) {
3028
- const R = a.value.findIndex((ne) => (e.valueComparator || qe)(ne.value, g.value)), Z = D ?? !~R;
3029
- if (~R) {
3030
- const ne = Z ? [...a.value, g] : [...a.value];
3031
- ne.splice(R, 1), a.value = ne;
3032
- } else Z && (a.value = [...a.value, g]);
3033
- } else {
3034
- const R = D !== !1;
3035
- a.value = R ? [g] : [], be(() => {
3036
- P.value = !1;
3037
- });
3038
- }
3039
- }
3040
- function ue(g) {
3041
- z.value?.$el.contains(g.relatedTarget) || (P.value = !1);
3042
- }
3043
- function A() {
3044
- e.eager && c.value?.calculateVisibleItems();
3045
- }
3046
- function N() {
3047
- h.value && l.value?.focus();
3048
- }
3049
- function C(g) {
3050
- h.value = !0;
3051
- }
3052
- function v(g) {
3053
- if (g == null) a.value = [];
3054
- else if (kt(l.value, ":autofill") || kt(l.value, ":-webkit-autofill")) {
3055
- const D = r.value.find((R) => R.title === g);
3056
- D && W(D);
3057
- } else l.value && (l.value.value = "");
3058
- }
3059
- return ie(P, () => {
3060
- if (!e.hideSelected && P.value && a.value.length) {
3061
- const g = I.value.findIndex((D) => a.value.some((R) => (e.valueComparator || qe)(R.value, D.value)));
3062
- it && !e.noAutoScroll && window.requestAnimationFrame(() => {
3063
- g >= 0 && c.value?.scrollToIndex(g);
3064
- });
3065
- }
3066
- }), ie(r, (g, D) => {
3067
- P.value || h.value && e.hideNoData && !D.length && g.length && (P.value = !0);
3068
- }), Q(() => {
3069
- const g = !!(e.chips || n.chip), D = !!(!e.hideNoData || I.value.length || n["prepend-item"] || n["append-item"] || n["no-data"]), R = a.value.length > 0, Z = Je.filterProps(e), ne = R || !h.value && e.label && !e.persistentPlaceholder ? void 0 : e.placeholder;
3070
- return d(Je, U({
3071
- ref: l
3072
- }, Z, {
3073
- modelValue: a.value.map((E) => E.props.title).join(", "),
3074
- name: void 0,
3075
- "onUpdate:modelValue": v,
3076
- focused: h.value,
3077
- "onUpdate:focused": (E) => h.value = E,
3078
- validationValue: a.externalValue,
3079
- counterValue: i.value,
3080
- dirty: R,
3081
- class: ["v-select", {
3082
- "v-select--active-menu": P.value,
3083
- "v-select--chips": !!e.chips,
3084
- [`v-select--${e.multiple ? "multiple" : "single"}`]: !0,
3085
- "v-select--selected": a.value.length,
3086
- "v-select--selection-slot": !!n.selection
3087
- }, e.class],
3088
- style: e.style,
3089
- inputmode: "none",
3090
- placeholder: ne,
3091
- "onClick:clear": j,
3092
- "onMousedown:control": Y,
3093
- onBlur: ue,
3094
- onKeydown: le,
3095
- "aria-expanded": x.value,
3096
- "aria-controls": $.value,
3097
- "aria-label": H.value,
3098
- title: H.value
3099
- }), {
3100
- ...n,
3101
- default: () => S(se, null, [S("select", {
3102
- hidden: !0,
3103
- multiple: e.multiple,
3104
- name: y.fieldName.value
3105
- }, [r.value.map((E) => S("option", {
3106
- key: E.value,
3107
- value: E.value,
3108
- selected: b.value.includes(E.value)
3109
- }, null))]), d(gn, U({
3110
- id: w.value,
3111
- ref: s,
3112
- modelValue: P.value,
3113
- "onUpdate:modelValue": (E) => P.value = E,
3114
- activator: "parent",
3115
- contentClass: "v-select__content",
3116
- disabled: T.value,
3117
- eager: e.eager,
3118
- maxHeight: 310,
3119
- openOnClick: !1,
3120
- closeOnContentClick: !1,
3121
- transition: e.transition,
3122
- onAfterEnter: A,
3123
- onAfterLeave: N
3124
- }, G.value), {
3125
- default: () => [D && d(Rt, U({
3126
- ref: z,
3127
- selected: b.value,
3128
- selectStrategy: e.multiple ? "independent" : "single-independent",
3129
- onMousedown: (E) => E.preventDefault(),
3130
- onKeydown: K,
3131
- onFocusin: C,
3132
- tabindex: "-1",
3133
- selectable: !0,
3134
- "aria-live": "polite",
3135
- "aria-label": `${e.label}-list`,
3136
- color: e.itemColor ?? e.color
3137
- }, me, e.listProps), {
3138
- default: () => [n["prepend-item"]?.(), !I.value.length && !e.hideNoData && (n["no-data"]?.() ?? d(at, {
3139
- key: "no-data",
3140
- title: t(e.noDataText)
3141
- }, null)), d(xa, {
3142
- ref: c,
3143
- renderless: !0,
3144
- items: I.value,
3145
- itemKey: "value"
3146
- }, {
3147
- default: (E) => {
3148
- let {
3149
- item: q,
3150
- index: ge,
3151
- itemRef: Ve
3152
- } = E;
3153
- const ae = yn(q.props), de = U(q.props, {
3154
- ref: Ve,
3155
- key: q.value,
3156
- onClick: () => W(q, null)
3157
- });
3158
- return q.type === "divider" ? n.divider?.({
3159
- props: q.raw,
3160
- index: ge
3161
- }) ?? d(_e, U(q.props, {
3162
- key: `divider-${ge}`
3163
- }), null) : q.type === "subheader" ? n.subheader?.({
3164
- props: q.raw,
3165
- index: ge
3166
- }) ?? d(bn, U(q.props, {
3167
- key: `subheader-${ge}`
3168
- }), null) : n.item?.({
3169
- item: q,
3170
- index: ge,
3171
- props: de
3172
- }) ?? d(at, U(de, {
3173
- role: "option"
3174
- }), {
3175
- prepend: (ve) => {
3176
- let {
3177
- isSelected: Ce
3178
- } = ve;
3179
- return S(se, null, [e.multiple && !e.hideSelected ? d(xt, {
3180
- key: q.value,
3181
- modelValue: Ce,
3182
- ripple: !1,
3183
- tabindex: "-1",
3184
- onClick: (zl) => zl.preventDefault()
3185
- }, null) : void 0, ae.prependAvatar && d(Ke, {
3186
- image: ae.prependAvatar
3187
- }, null), ae.prependIcon && d(ye, {
3188
- icon: ae.prependIcon
3189
- }, null)]);
3190
- }
3191
- });
3192
- }
3193
- }), n["append-item"]?.()]
3194
- })]
3195
- }), a.value.map((E, q) => {
3196
- function ge(ve) {
3197
- ve.stopPropagation(), ve.preventDefault(), W(E, !1);
3198
- }
3199
- const Ve = U(It.filterProps(E.props), {
3200
- "onClick:close": ge,
3201
- onKeydown(ve) {
3202
- ve.key !== "Enter" && ve.key !== " " || (ve.preventDefault(), ve.stopPropagation(), ge(ve));
3203
- },
3204
- onMousedown(ve) {
3205
- ve.preventDefault(), ve.stopPropagation();
3206
- },
3207
- modelValue: !0,
3208
- "onUpdate:modelValue": void 0
3209
- }), ae = g ? !!n.chip : !!n.selection, de = ae ? hn(g ? n.chip({
3210
- item: E,
3211
- index: q,
3212
- props: Ve
3213
- }) : n.selection({
3214
- item: E,
3215
- index: q
3216
- })) : void 0;
3217
- if (!(ae && !de))
3218
- return S("div", {
3219
- key: E.value,
3220
- class: "v-select__selection"
3221
- }, [g ? n.chip ? d(ke, {
3222
- key: "chip-defaults",
3223
- defaults: {
3224
- VChip: {
3225
- closable: e.closableChips,
3226
- size: "small",
3227
- text: E.title
3228
- }
3229
- }
3230
- }, {
3231
- default: () => [de]
3232
- }) : d(It, U({
3233
- key: "chip",
3234
- closable: e.closableChips,
3235
- size: "small",
3236
- text: E.title,
3237
- disabled: E.props.disabled
3238
- }, Ve), null) : de ?? S("span", {
3239
- class: "v-select__selection-text"
3240
- }, [E.title, e.multiple && q < a.value.length - 1 && S("span", {
3241
- class: "v-select__selection-comma"
3242
- }, [Gl(",")])])]);
3243
- })]),
3244
- "append-inner": function() {
3245
- for (var E = arguments.length, q = new Array(E), ge = 0; ge < E; ge++)
3246
- q[ge] = arguments[ge];
3247
- return S(se, null, [n["append-inner"]?.(...q), e.menuIcon ? d(ye, {
3248
- class: "v-select__menu-icon",
3249
- color: l.value?.fieldIconColor,
3250
- icon: e.menuIcon
3251
- }, null) : void 0]);
3252
- }
3253
- });
3254
- }), tt({
3255
- isFocused: h,
3256
- menu: P,
3257
- select: W
3258
- }, l);
3259
- }
3260
- }), Ta = L({
3261
- bordered: Boolean,
3262
- color: String,
3263
- content: [Number, String],
3264
- dot: Boolean,
3265
- floating: Boolean,
3266
- icon: re,
3267
- inline: Boolean,
3268
- label: {
3269
- type: String,
3270
- default: "$vuetify.badge"
3271
- },
3272
- max: [Number, String],
3273
- modelValue: {
3274
- type: Boolean,
3275
- default: !0
3276
- },
3277
- offsetX: [Number, String],
3278
- offsetY: [Number, String],
3279
- textColor: String,
3280
- ...ce(),
3281
- ...Bt({
3282
- location: "top end"
3283
- }),
3284
- ...Ze(),
3285
- ...Ie(),
3286
- ...Te(),
3287
- ...mt({
3288
- transition: "scale-rotate-transition"
3289
- }),
3290
- ...et()
3291
- }, "VBadge"), Da = X()({
3292
- name: "VBadge",
3293
- inheritAttrs: !1,
3294
- props: Ta(),
3295
- setup(e, o) {
3296
- const {
3297
- backgroundColorClasses: n,
3298
- backgroundColorStyles: t
3299
- } = ft(() => e.color), {
3300
- roundedClasses: l
3301
- } = Qe(e), {
3302
- t: s
3303
- } = ze(), {
3304
- textColorClasses: c,
3305
- textColorStyles: r
3306
- } = vt(() => e.textColor), {
3307
- themeClasses: u
3308
- } = Sn(), {
3309
- locationStyles: f
3310
- } = Tt(e, !0, (i) => (e.floating ? e.dot ? 2 : 4 : e.dot ? 8 : 12) + (["top", "bottom"].includes(i) ? Number(e.offsetY ?? 0) : ["left", "right"].includes(i) ? Number(e.offsetX ?? 0) : 0)), {
3311
- dimensionStyles: a
3312
- } = Ye(e);
3313
- return Q(() => {
3314
- const i = Number(e.content), m = !e.max || isNaN(i) ? e.content : i <= Number(e.max) ? i : `${e.max}+`, [y, b] = kn(o.attrs, ["aria-atomic", "aria-label", "aria-live", "role", "title"]);
3315
- return d(e.tag, U({
3316
- class: ["v-badge", {
3317
- "v-badge--bordered": e.bordered,
3318
- "v-badge--dot": e.dot,
3319
- "v-badge--floating": e.floating,
3320
- "v-badge--inline": e.inline
3321
- }, e.class]
3322
- }, b, {
3323
- style: e.style
3324
- }), {
3325
- default: () => [S("div", {
3326
- class: "v-badge__wrapper"
3327
- }, [o.slots.default?.(), d(Nt, {
3328
- transition: e.transition
3329
- }, {
3330
- default: () => [Be(S("span", U({
3331
- class: ["v-badge__badge", u.value, n.value, l.value, c.value],
3332
- style: [t.value, r.value, a.value, e.inline ? {} : f.value],
3333
- "aria-atomic": "true",
3334
- "aria-label": s(e.label, i),
3335
- "aria-live": "polite",
3336
- role: "status"
3337
- }, y), [e.dot ? void 0 : o.slots.badge ? o.slots.badge?.() : e.icon ? d(ye, {
3338
- icon: e.icon
3339
- }, null) : m]), [[rt, e.modelValue]])]
3340
- })])]
3341
- });
3342
- }), {};
3343
- }
3344
- }), Ba = 50, Ea = 500;
3345
- function Oa(e) {
3346
- let {
3347
- toggleUpDown: o
3348
- } = e, n = -1, t = -1;
3349
- ut(s);
3350
- function l(r) {
3351
- s(), c(r), window.addEventListener("pointerup", s), document.addEventListener("blur", s), n = window.setTimeout(() => {
3352
- t = window.setInterval(() => c(r), Ba);
3353
- }, Ea);
3354
- }
3355
- function s() {
3356
- window.clearTimeout(n), window.clearInterval(t), window.removeEventListener("pointerup", s), document.removeEventListener("blur", s);
3357
- }
3358
- function c(r) {
3359
- o(r === "up");
3360
- }
3361
- return {
3362
- holdStart: l,
3363
- holdStop: s
3364
- };
3365
- }
3366
- const $a = L({
3367
- controlVariant: {
3368
- type: String,
3369
- default: "default"
3370
- },
3371
- inset: Boolean,
3372
- hideInput: Boolean,
3373
- modelValue: {
3374
- type: Number,
3375
- default: null
3376
- },
3377
- min: {
3378
- type: Number,
3379
- default: Number.MIN_SAFE_INTEGER
3380
- },
3381
- max: {
3382
- type: Number,
3383
- default: Number.MAX_SAFE_INTEGER
3384
- },
3385
- step: {
3386
- type: Number,
3387
- default: 1
3388
- },
3389
- precision: {
3390
- type: Number,
3391
- default: 0
3392
- },
3393
- minFractionDigits: {
3394
- type: Number,
3395
- default: null
3396
- },
3397
- decimalSeparator: {
3398
- type: String,
3399
- validator: (e) => !e || e.length === 1
3400
- },
3401
- ...He(Gt(), ["modelValue", "validationValue"])
3402
- }, "VNumberInput"), Na = X()({
3403
- name: "VNumberInput",
3404
- props: {
3405
- ...$a()
3406
- },
3407
- emits: {
3408
- "update:focused": (e) => !0,
3409
- "update:modelValue": (e) => !0
3410
- },
3411
- setup(e, o) {
3412
- let {
3413
- slots: n
3414
- } = o;
3415
- const t = M(), {
3416
- holdStart: l,
3417
- holdStop: s
3418
- } = Oa({
3419
- toggleUpDown: G
3420
- }), c = zt(e), r = V(() => c.isDisabled.value || c.isReadonly.value), u = te(e.focused), {
3421
- decimalSeparator: f
3422
- } = ze(), a = V(() => e.decimalSeparator?.[0] || f.value);
3423
- function i(v) {
3424
- let g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e.precision, D = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
3425
- const R = g == null ? String(v) : v.toFixed(g);
3426
- if (u.value && D)
3427
- return Number(R).toString().replace(".", a.value);
3428
- if (e.minFractionDigits === null || g !== null && g < e.minFractionDigits)
3429
- return R.replace(".", a.value);
3430
- let [Z, ne] = R.split(".");
3431
- return ne = (ne ?? "").padEnd(e.minFractionDigits, "0").replace(new RegExp(`(?<=\\d{${e.minFractionDigits}})0+$`, "g"), ""), [Z, ne].filter(Boolean).join(a.value);
3432
- }
3433
- const m = Se(e, "modelValue", null, (v) => v ?? null, (v) => v == null ? v ?? null : Pe(Number(v), e.min, e.max)), y = te(null), b = te(null);
3434
- ie(m, (v) => {
3435
- u.value && !r.value && Number(y.value?.replace(a.value, ".")) === v || (v == null ? (y.value = null, b.value = null) : isNaN(v) || (y.value = i(v), b.value = Number(y.value.replace(a.value, "."))));
3436
- }, {
3437
- immediate: !0
3438
- });
3439
- const h = V({
3440
- get: () => y.value,
3441
- set(v) {
3442
- if (v === null || v === "") {
3443
- m.value = null, y.value = null, b.value = null;
3444
- return;
3445
- }
3446
- const g = Number(v.replace(a.value, "."));
3447
- isNaN(g) || (y.value = v, b.value = g, g <= e.max && g >= e.min && (m.value = g));
3448
- }
3449
- }), p = V(() => {
3450
- if (b.value === null) return !1;
3451
- const v = Number(y.value);
3452
- return v !== Pe(v, e.min, e.max);
3453
- }), k = V(() => r.value ? !1 : (m.value ?? 0) + e.step <= e.max), _ = V(() => r.value ? !1 : (m.value ?? 0) - e.step >= e.min), I = V(() => e.hideInput ? "stacked" : e.controlVariant), T = F(() => I.value === "split" ? "$plus" : "$collapse"), B = F(() => I.value === "split" ? "$minus" : "$expand"), P = F(() => I.value === "split" ? "default" : "small"), w = F(() => I.value === "stacked" ? "auto" : "100%"), x = {
3454
- props: {
3455
- onClick: j,
3456
- onPointerup: Y,
3457
- onPointerdown: K,
3458
- onPointercancel: Y
3459
- }
3460
- }, $ = {
3461
- props: {
3462
- onClick: j,
3463
- onPointerup: Y,
3464
- onPointerdown: le,
3465
- onPointercancel: Y
3466
- }
3467
- };
3468
- ie(() => e.precision, () => ue()), ie(() => e.minFractionDigits, () => ue()), Ne(() => {
3469
- W();
3470
- });
3471
- function H(v) {
3472
- if (v == null) return 0;
3473
- const g = v.toString(), D = g.indexOf(".");
3474
- return ~D ? g.length - D : 0;
3475
- }
3476
- function G() {
3477
- let v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
3478
- if (r.value) return;
3479
- if (m.value == null) {
3480
- h.value = i(Pe(0, e.min, e.max));
3481
- return;
3482
- }
3483
- let g = Math.max(H(m.value), H(e.step));
3484
- e.precision != null && (g = Math.max(g, e.precision)), v ? k.value && (h.value = i(m.value + e.step, g)) : _.value && (h.value = i(m.value - e.step, g));
3485
- }
3486
- function z(v) {
3487
- if (!v.data) return;
3488
- const g = v.target, {
3489
- value: D,
3490
- selectionStart: R,
3491
- selectionEnd: Z
3492
- } = g ?? {}, ne = D ? D.slice(0, R) + v.data + D.slice(Z) : v.data, E = Cn(ne, e.precision, a.value);
3493
- if (new RegExp(`^-?\\d*${Vn(a.value)}?\\d*$`).test(ne) || (v.preventDefault(), g.value = E, be(() => h.value = E)), e.precision != null) {
3494
- if (ne.split(a.value)[1]?.length > e.precision) {
3495
- v.preventDefault(), g.value = E, be(() => h.value = E);
3496
- const q = (R ?? 0) + v.data.length;
3497
- g.setSelectionRange(q, q);
3498
- }
3499
- e.precision === 0 && ne.endsWith(a.value) && (v.preventDefault(), g.value = E, be(() => h.value = E));
3500
- }
3501
- }
3502
- async function me(v) {
3503
- ["Enter", "ArrowLeft", "ArrowRight", "Backspace", "Delete", "Tab"].includes(v.key) || v.ctrlKey || ["ArrowDown", "ArrowUp"].includes(v.key) && (v.preventDefault(), v.stopPropagation(), W(), await be(), v.key === "ArrowDown" ? G(!1) : G());
3504
- }
3505
- function j(v) {
3506
- v.stopPropagation();
3507
- }
3508
- function Y(v) {
3509
- v.currentTarget?.releasePointerCapture(v.pointerId), v.preventDefault(), s();
3510
- }
3511
- function K(v) {
3512
- v.currentTarget?.setPointerCapture(v.pointerId), v.preventDefault(), v.stopPropagation(), l("up");
3513
- }
3514
- function le(v) {
3515
- v.currentTarget?.setPointerCapture(v.pointerId), v.preventDefault(), v.stopPropagation(), l("down");
3516
- }
3517
- function W() {
3518
- if (r.value || !t.value) return;
3519
- const v = t.value.value, g = Number(v.replace(a.value, "."));
3520
- v && !isNaN(g) ? h.value = i(Pe(g, e.min, e.max)) : h.value = null;
3521
- }
3522
- function ue() {
3523
- r.value || (h.value = m.value !== null && !isNaN(m.value) ? i(m.value, e.precision, !1) : null);
3524
- }
3525
- function A() {
3526
- if (!r.value) {
3527
- if (m.value === null || isNaN(m.value)) {
3528
- h.value = null;
3529
- return;
3530
- }
3531
- h.value = m.value.toString().replace(".", a.value);
3532
- }
3533
- }
3534
- function N() {
3535
- A();
3536
- }
3537
- function C() {
3538
- W();
3539
- }
3540
- return Q(() => {
3541
- const {
3542
- modelValue: v,
3543
- type: g,
3544
- ...D
3545
- } = Je.filterProps(e);
3546
- function R() {
3547
- return n.increment ? d(ke, {
3548
- key: "increment-defaults",
3549
- defaults: {
3550
- VBtn: {
3551
- disabled: !k.value,
3552
- height: w.value,
3553
- size: P.value,
3554
- icon: T.value,
3555
- variant: "text"
3556
- }
3557
- }
3558
- }, {
3559
- default: () => [n.increment(x)]
3560
- }) : d(Fe, {
3561
- "aria-hidden": "true",
3562
- "data-testid": "increment",
3563
- disabled: !k.value,
3564
- height: w.value,
3565
- icon: T.value,
3566
- key: "increment-btn",
3567
- onClick: j,
3568
- onPointerdown: K,
3569
- onPointerup: Y,
3570
- onPointercancel: Y,
3571
- size: P.value,
3572
- variant: "text",
3573
- tabindex: "-1"
3574
- }, null);
3575
- }
3576
- function Z() {
3577
- return n.decrement ? d(ke, {
3578
- key: "decrement-defaults",
3579
- defaults: {
3580
- VBtn: {
3581
- disabled: !_.value,
3582
- height: w.value,
3583
- size: P.value,
3584
- icon: B.value,
3585
- variant: "text"
3586
- }
3587
- }
3588
- }, {
3589
- default: () => [n.decrement($)]
3590
- }) : d(Fe, {
3591
- "aria-hidden": "true",
3592
- "data-testid": "decrement",
3593
- disabled: !_.value,
3594
- height: w.value,
3595
- icon: B.value,
3596
- key: "decrement-btn",
3597
- onClick: j,
3598
- onPointerdown: le,
3599
- onPointerup: Y,
3600
- onPointercancel: Y,
3601
- size: P.value,
3602
- variant: "text",
3603
- tabindex: "-1"
3604
- }, null);
3605
- }
3606
- function ne() {
3607
- return S("div", {
3608
- class: "v-number-input__control"
3609
- }, [Z(), d(_e, {
3610
- vertical: I.value !== "stacked"
3611
- }, null), R()]);
3612
- }
3613
- function E() {
3614
- return !e.hideInput && !e.inset ? d(_e, {
3615
- vertical: !0
3616
- }, null) : void 0;
3617
- }
3618
- const q = I.value === "split" ? S("div", {
3619
- class: "v-number-input__control"
3620
- }, [d(_e, {
3621
- vertical: !0
3622
- }, null), R()]) : e.reverse || I.value === "hidden" ? void 0 : S(se, null, [E(), ne()]), ge = n["append-inner"] || q, Ve = I.value === "split" ? S("div", {
3623
- class: "v-number-input__control"
3624
- }, [Z(), d(_e, {
3625
- vertical: !0
3626
- }, null)]) : e.reverse && I.value !== "hidden" ? S(se, null, [ne(), E()]) : void 0, ae = n["prepend-inner"] || Ve;
3627
- return d(Je, U({
3628
- ref: t
3629
- }, D, {
3630
- modelValue: h.value,
3631
- "onUpdate:modelValue": (de) => h.value = de,
3632
- focused: u.value,
3633
- "onUpdate:focused": (de) => u.value = de,
3634
- validationValue: m.value,
3635
- error: p.value || void 0,
3636
- onBeforeinput: z,
3637
- onFocus: N,
3638
- onBlur: C,
3639
- onKeydown: me,
3640
- class: ["v-number-input", {
3641
- "v-number-input--default": I.value === "default",
3642
- "v-number-input--hide-input": e.hideInput,
3643
- "v-number-input--inset": e.inset,
3644
- "v-number-input--reverse": e.reverse,
3645
- "v-number-input--split": I.value === "split",
3646
- "v-number-input--stacked": I.value === "stacked"
3647
- }, e.class],
3648
- style: e.style,
3649
- inputmode: "decimal"
3650
- }), {
3651
- ...n,
3652
- "append-inner": ge ? function() {
3653
- for (var de = arguments.length, ve = new Array(de), Ce = 0; Ce < de; Ce++)
3654
- ve[Ce] = arguments[Ce];
3655
- return S(se, null, [n["append-inner"]?.(...ve), q]);
3656
- } : void 0,
3657
- "prepend-inner": ae ? function() {
3658
- for (var de = arguments.length, ve = new Array(de), Ce = 0; Ce < de; Ce++)
3659
- ve[Ce] = arguments[Ce];
3660
- return S(se, null, [Ve, n["prepend-inner"]?.(...ve)]);
3661
- } : void 0
3662
- });
3663
- }), tt({}, t);
3664
- }
3665
- }), Ra = { class: "text-medium-emphasis ps-2" }, Ma = ["id"], La = {
3666
- __name: "index",
3667
- props: {
3668
- modelValue: {},
3669
- modelModifiers: {}
3670
- },
3671
- emits: /* @__PURE__ */ _t(["closeDialog", "save"], ["update:modelValue"]),
3672
- setup(e, { emit: o }) {
3673
- const n = he("table_props"), t = he("datatablesPluginOptions"), l = ct(e, "modelValue"), s = o, c = {
3674
- textfield: Je,
3675
- select: Fa,
3676
- number: Na,
3677
- datepicker: xe(
3678
- () => import("./Datepicker-B-Whoyb7.js")
3679
- ),
3680
- comparison: xe(
3681
- () => import("./Comparison-DqBhxa7w.js")
3682
- )
3683
- }, r = V(() => n.headers.filter((f) => f.advancedFilter !== !1 && !f.hidden)), u = (f) => f ? typeof f == "string" ? c[f] : f : c.textfield;
3684
- return ie(
3685
- r,
3686
- (f) => {
3687
- f.forEach((a) => {
3688
- const i = a.advancedFilter?.key ?? a.key;
3689
- Object.hasOwn(l.value, i) || (l.value[i] = {
3690
- comparison: "=",
3691
- value: null
3692
- });
3693
- });
3694
- },
3695
- { immediate: !0 }
3696
- ), Ne(async () => {
3697
- await n.options.advancedFilters?.onMounted();
3698
- }), (f, a) => (J(), fe(Lt, { rounded: "lg" }, {
3699
- default: ee(() => [
3700
- d(bt, { class: "d-flex justify-space-between align-center" }, {
3701
- default: ee(() => [
3702
- S("div", Ra, Ge(f.$t("$datatables.advancedFilters")), 1),
3703
- d(Fe, {
3704
- icon: O(t).header.icons.close,
3705
- variant: "text",
3706
- onClick: a[0] || (a[0] = (i) => s("closeDialog"))
3707
- }, null, 8, ["icon"])
3708
- ]),
3709
- _: 1
3710
- }),
3711
- d(_e),
3712
- d(ht, { class: "overflow-auto pt-8" }, {
3713
- default: ee(() => [
3714
- (J(!0), $e(se, null, wt(O(r), (i, m) => (J(), $e("div", {
3715
- id: `advanced-filter-${i.key}`,
3716
- key: `filter-${m}`,
3717
- class: oe(`advanced-filter advanced-filter--${i.key}`)
3718
- }, [
3719
- (J(), fe(we(u(i.advancedFilter?.component)), U({
3720
- modelValue: l.value[i.advancedFilter?.key ?? i.key].value,
3721
- "onUpdate:modelValue": (y) => l.value[i.advancedFilter?.key ?? i.key].value = y,
3722
- comparison: l.value[i.advancedFilter?.key ?? i.key].comparison,
3723
- "onUpdate:comparison": (y) => l.value[i.advancedFilter?.key ?? i.key].comparison = y
3724
- }, { ref_for: !0 }, i.advancedFilter?.options, {
3725
- label: i.title,
3726
- variant: "underlined",
3727
- clearable: ""
3728
- }), null, 16, ["modelValue", "onUpdate:modelValue", "comparison", "onUpdate:comparison", "label"]))
3729
- ], 10, Ma))), 128))
3730
- ]),
3731
- _: 1
3732
- }),
3733
- d(_e, { class: "mt-2" }),
3734
- d(Mt, { class: "my-2 d-flex justify-end" }, {
3735
- default: ee(() => [
3736
- d(Fe, {
3737
- class: "text-none",
3738
- text: f.$t("$datatables.cancel"),
3739
- onClick: a[1] || (a[1] = (i) => s("closeDialog"))
3740
- }, null, 8, ["text"]),
3741
- d(Fe, {
3742
- class: "text-none",
3743
- color: "primary",
3744
- text: f.$t("$datatables.submit"),
3745
- variant: "flat",
3746
- onClick: a[2] || (a[2] = (i) => s("save"))
3747
- }, null, 8, ["text"])
3748
- ]),
3749
- _: 1
3750
- })
3751
- ]),
3752
- _: 1
3753
- }));
3754
- }
3755
- };
3756
- function ol(e) {
3757
- return JSON.parse(JSON.stringify(e));
3758
- }
3759
- const Ha = {
3760
- __name: "index",
3761
- props: {
3762
- modelValue: { required: !0 },
3763
- modelModifiers: {}
3764
- },
3765
- emits: ["update:modelValue"],
3766
- setup(e) {
3767
- const o = yt(), { advancedFiltersState: n } = lt(), { setData: t } = o, l = ct(e, "modelValue"), s = M({}), c = he("table_props"), r = he("busEmits"), u = () => {
3768
- const f = Object.entries(s.value).filter(([, a]) => {
3769
- const i = a.value;
3770
- return Array.isArray(i) || typeof i == "string" ? i.length > 0 : i != null && i !== "";
3771
- }).reduce((a, [i, m]) => (a[i] = m, a), {});
3772
- JSON.stringify(f) !== JSON.stringify(n.value) && (t({
3773
- table_id: c.id,
3774
- name: "advancedFilters",
3775
- value: { query: ol(f) }
3776
- }), r("advancedFilters:update", f)), l.value = !1;
3777
- };
3778
- return Ne(() => {
3779
- s.value = ol(n.value);
3780
- }), (f, a) => {
3781
- const i = La, m = ua;
3782
- return J(), $e("div", null, [
3783
- d(jt, {
3784
- modelValue: l.value,
3785
- "onUpdate:modelValue": a[1] || (a[1] = (y) => l.value = y),
3786
- "max-width": "550"
3787
- }, {
3788
- default: ee(({ isActive: y }) => [
3789
- d(i, {
3790
- modelValue: O(s),
3791
- "onUpdate:modelValue": a[0] || (a[0] = (b) => Re(s) ? s.value = b : null),
3792
- onSave: u,
3793
- onCloseDialog: (b) => y.value = !1
3794
- }, null, 8, ["modelValue", "onCloseDialog"])
3795
- ]),
3796
- _: 1
3797
- }, 8, ["modelValue"]),
3798
- Object.keys(O(n)).length ? (J(), fe(m, {
3799
- key: 0,
3800
- modelValue: O(s),
3801
- "onUpdate:modelValue": a[2] || (a[2] = (y) => Re(s) ? s.value = y : null),
3802
- onSave: u
3803
- }, null, 8, ["modelValue"])) : je("", !0)
3804
- ]);
3805
- };
3806
- }
3807
- }, za = {
3808
- class: "d-flex align-center",
3809
- style: { gap: "0.75rem" }
3810
- }, Ua = { class: "ms-auto" }, ja = {
3811
- __name: "index",
3812
- setup(e) {
3813
- const o = xe(() => import("./Search-3cdgX6ng.js")), n = xe(() => import("./RefreshTable-BdKbgZ6r.js")), t = xe(() => import("./Options-DKcffgvi.js")), l = xe(() => import("./index-DyARQ6Al.js")), s = xe(() => import("./Columns-Cul89zUK.js")), c = xe(() => import("./Download-eF23Wfl5.js")), r = he("table_props"), u = he("datatablesPluginOptions"), { advancedFiltersState: f } = lt(), a = M(null), i = M(!1), m = r.options?.header?.components ?? {}, y = V(() => Object.keys(f.value).length);
3814
- return (b, h) => {
3815
- const p = Ha, k = Wn;
3816
- return J(), $e("div", null, [
3817
- S("div", za, [
3818
- d(Fe, {
3819
- variant: "text",
3820
- icon: O(u).header.icons.advancedFilters,
3821
- color: O(y) ? "primary" : "dark",
3822
- density: "comfortable",
3823
- onClick: h[0] || (h[0] = (_) => i.value = !0)
3824
- }, {
3825
- default: ee(() => [
3826
- O(y) ? (J(), fe(Da, {
3827
- key: 0,
3828
- color: "primary",
3829
- content: O(y)
3830
- }, {
3831
- default: ee(() => [
3832
- d(ye)
3833
- ]),
3834
- _: 1
3835
- }, 8, ["content"])) : (J(), fe(ye, { key: 1 }))
3836
- ]),
3837
- _: 1
3838
- }, 8, ["icon", "color"]),
3839
- O(r).hardFilters.length ? (J(), fe(we(O(m).hardFilters ?? O(l)), {
3840
- key: 0,
3841
- id: "header-hardFilters"
3842
- })) : je("", !0),
3843
- d(p, {
3844
- modelValue: O(i),
3845
- "onUpdate:modelValue": h[1] || (h[1] = (_) => Re(i) ? i.value = _ : null)
3846
- }, null, 8, ["modelValue"]),
3847
- (J(), fe(we(O(m).toolbar), { id: "header-toolbar" })),
3848
- S("div", Ua, [
3849
- (J(), fe(we(O(m).search ?? O(o)), { id: "header-search" })),
3850
- (J(), fe(we(O(m).columns ?? O(s)), {
3851
- id: "header-columns",
3852
- "component-refs": { columns: O(a) }
3853
- }, null, 8, ["component-refs"])),
3854
- (J(), fe(we(O(m).download ?? O(c)), { id: "header-download" })),
3855
- (J(), fe(we(O(m).refreshTable ?? O(n)), { id: "header-refreshTable" })),
3856
- (J(), fe(we(O(m).options ?? O(t)), {
3857
- id: "header-options",
3858
- "component-refs": { columns: O(a) }
3859
- }, null, 8, ["component-refs"]))
3860
- ])
3861
- ]),
3862
- d(k, {
3863
- ref_key: "columns",
3864
- ref: a
3865
- }, null, 512)
3866
- ]);
3867
- };
3868
- }
3869
- }, Hl = wn(() => {
3870
- const e = te({}), o = te({});
3871
- return {
3872
- storeOptions: {
3873
- state: e,
3874
- columns: o
3875
- },
3876
- setUserOptions: ({
3877
- state: l = null,
3878
- columns: s = null
3879
- }) => {
3880
- l && (e.value = l), s && (o.value = s);
3881
- }
3882
- };
3883
- }), qa = {
3884
- key: 0,
3885
- class: "datatables-v2"
3886
- }, Ga = { class: "pe-4" }, Ka = {
3887
- __name: "Blueprint",
3888
- props: {
3889
- modelValue: {},
3890
- modelModifiers: {}
3891
- },
3892
- emits: /* @__PURE__ */ _t(["refreshTable", "refetchData", "advancedFilters:update", "hardFilters:update"], ["update:modelValue"]),
3893
- setup(e, { expose: o, emit: n }) {
3894
- const t = xe(() => import("./Table-DDIeeeXR.js")), l = xe(() => import("./TableServer-CgG-cidx.js")), { storeOptions: s } = Hl(), { saveTableOptions: c } = lt(), r = ct(e, "modelValue"), u = he("table_props"), f = he("datatablesPluginOptions"), a = M(null), i = M(!1), m = M(!1), y = M(!1), b = n, h = yt(), { dataStateGet: p, tableDataState: k, checkTableState: _ } = wl(u), { addTable: I, restoreData: T } = h, B = V(() => {
3895
- const P = u.options?.header;
3896
- return P === void 0 || typeof P == "object" && P !== null;
3897
- });
3898
- return Ne(async () => {
3899
- I({ table_id: u.id }), await _();
3900
- const P = p();
3901
- if (P)
3902
- T({ table_id: u.id, data: P });
3903
- else {
3904
- const x = k.value.options.columns;
3905
- x.selected = u.headers.filter(($) => !$.hidden).map(($) => $.key), x.sorted = u.headers.map(($) => $.key);
3906
- }
3907
- c(xn(s.state.value, k.value.options.state)), m.value = !0, await be(), y.value = !0;
3908
- }), Oe("busEmits", b), Oe("tableRef", a), Oe("tableState", k), Oe("downloadModal", i), o({ tableRef: a }), (P, w) => {
3909
- const x = ja;
3910
- return O(m) ? (J(), $e("div", qa, [
3911
- d(Lt, null, {
3912
- default: ee(() => [
3913
- O(B) ? (J(), fe(bt, { key: 0 }, {
3914
- default: ee(() => [
3915
- d(x)
3916
- ]),
3917
- _: 1
3918
- })) : je("", !0),
3919
- d(ht, { class: "pa-0" }, {
3920
- default: ee(() => [
3921
- O(y) ? (J(), fe(we(O(u).api ? O(l) : O(t)), {
3922
- key: 0,
3923
- ref_key: "tableRef",
3924
- ref: a,
3925
- modelValue: r.value,
3926
- "onUpdate:modelValue": w[0] || (w[0] = ($) => r.value = $)
3927
- }, null, 8, ["modelValue"])) : je("", !0)
3928
- ]),
3929
- _: 1
3930
- })
3931
- ]),
3932
- _: 1
3933
- }),
3934
- d(jt, {
3935
- modelValue: O(i),
3936
- "onUpdate:modelValue": w[1] || (w[1] = ($) => Re(i) ? i.value = $ : null),
3937
- "max-width": "350",
3938
- persistent: ""
3939
- }, {
3940
- default: ee(() => [
3941
- d(Rt, {
3942
- class: "py-2",
3943
- color: "primary",
3944
- elevation: "12",
3945
- rounded: "lg"
3946
- }, {
3947
- default: ee(() => [
3948
- d(at, {
3949
- "prepend-icon": O(f).header.icons.download,
3950
- title: P.$t("$datatables.preparing_download_file")
3951
- }, {
3952
- prepend: ee(() => [
3953
- S("div", Ga, [
3954
- d(ye, {
3955
- color: "primary",
3956
- size: "x-large"
3957
- })
3958
- ])
3959
- ]),
3960
- append: ee(() => [
3961
- d(In, {
3962
- color: "primary",
3963
- indeterminate: "disable-shrink",
3964
- size: "16",
3965
- width: "2"
3966
- })
3967
- ]),
3968
- _: 1
3969
- }, 8, ["prepend-icon", "title"])
3970
- ]),
3971
- _: 1
3972
- })
3973
- ]),
3974
- _: 1
3975
- }, 8, ["modelValue"])
3976
- ])) : je("", !0);
3977
- };
3978
- }
3979
- }, Wa = il("datatablesHooks", () => {
3980
- const e = M({});
3981
- return {
3982
- hooks: e,
3983
- registerHook: (t, l) => {
3984
- Object.assign(e.value, { [t]: l });
3985
- },
3986
- triggerHook: (t, l) => {
3987
- e.value.hasOwnProperty(t) && e.value[t](l);
3988
- }
3989
- };
3990
- }), Ja = {
3991
- __name: "index",
3992
- props: {
3993
- id: {
3994
- type: String,
3995
- required: !0
3996
- },
3997
- api: {
3998
- type: Object,
3999
- default: () => {
4000
- }
4001
- },
4002
- data: {
4003
- type: Array,
4004
- default: () => []
4005
- },
4006
- options: {
4007
- type: Object,
4008
- default: () => ({})
4009
- },
4010
- params: {
4011
- type: Object,
4012
- default: () => ({})
4013
- },
4014
- hardFilters: {
4015
- type: Array,
4016
- default: () => []
4017
- },
4018
- headers: {
4019
- type: Array,
4020
- default: () => []
4021
- },
4022
- loading: {
4023
- type: Boolean,
4024
- default: !1
4025
- },
4026
- locale: {
4027
- type: String,
4028
- default: "en"
4029
- },
4030
- title: {
4031
- type: String,
4032
- default: ""
4033
- }
4034
- },
4035
- emits: ["refreshTable", "refetchData"],
4036
- setup(e, { expose: o, emit: n }) {
4037
- const t = e, { triggerHook: l } = Wa(), { storeOptions: s, setUserOptions: c } = Hl(), r = M(null), u = M(0), f = async (m = {}) => {
4038
- c(m), u.value < 99 && (i("refreshTable"), await be(), u.value++);
4039
- }, a = (m = {}) => {
4040
- c(m), r.value.tableRef.hasOwnProperty("reloadItems") && (r.value.tableRef.reloadItems(s.state.value), i("refetchData"));
4041
- }, i = n;
4042
- return o({ refreshTable: f, refetchData: a, triggerHook: l }), Oe("table_props", t), Oe("triggerHook", l), (m, y) => {
4043
- const b = Ka;
4044
- return J(), fe(b, {
4045
- id: e.id,
4046
- ref_key: "table",
4047
- ref: r,
4048
- key: `${e.id}-${O(u)}`,
4049
- onRefreshTable: f,
4050
- onRefetchData: a
4051
- }, null, 8, ["id"]);
4052
- };
4053
- }
4054
- }, to = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4055
- __proto__: null,
4056
- default: Ja
4057
- }, Symbol.toStringTag, { value: "Module" }));
4058
- export {
4059
- Fa as V,
4060
- It as a,
4061
- xt as b,
4062
- yt as c,
4063
- ol as d,
4064
- Lt as e,
4065
- ht as f,
4066
- Je as g,
4067
- wl as h,
4068
- Wa as i,
4069
- sa as j,
4070
- aa as k,
4071
- Da as l,
4072
- ia as m,
4073
- Gt as n,
4074
- Bl as o,
4075
- Na as p,
4076
- to as q,
4077
- lt as u
4078
- };