@stonecrop/aform 0.9.2 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/aform.js CHANGED
@@ -1,17 +1,17 @@
1
- import { defineComponent as ne, useTemplateRef as fe, ref as L, computed as $, openBlock as w, createElementBlock as k, unref as V, normalizeClass as ae, normalizeStyle as xe, createBlock as pe, resolveDynamicComponent as Ue, mergeProps as vt, toDisplayString as K, createElementVNode as y, withModifiers as Ie, withDirectives as J, Fragment as ue, renderList as me, vShow as Ce, createCommentVNode as q, renderSlot as he, createTextVNode as Dt, onMounted as Ee, watch as te, onBeforeUnmount as sn, nextTick as pt, toValue as E, shallowRef as ie, getCurrentScope as mt, onScopeDispose as ht, reactive as rn, vModelText as we, vModelCheckbox as un, vModelSelect as Cn, getCurrentInstance as gt, watchEffect as Qe, useCssVars as En, onUnmounted as An, useModel as ke, createVNode as dt, withCtx as Tt, mergeModels as Me, isRef as Tn, toRefs as $n, customRef as St, toRef as cn, readonly as Rt, resolveComponent as dn, withKeys as Ze } from "vue";
1
+ import { defineComponent as oe, useTemplateRef as fe, ref as L, computed as T, openBlock as h, createElementBlock as b, unref as V, normalizeClass as se, normalizeStyle as be, createBlock as pe, resolveDynamicComponent as Ue, mergeProps as ft, toDisplayString as N, createElementVNode as w, withModifiers as Ie, withDirectives as K, Fragment as X, renderList as ve, vShow as Ce, createCommentVNode as Y, renderSlot as he, createTextVNode as Dt, onMounted as Ee, watch as ne, onBeforeUnmount as sn, nextTick as vt, toValue as E, shallowRef as ue, getCurrentScope as mt, onScopeDispose as pt, reactive as rn, vModelText as we, vModelCheckbox as un, vModelSelect as Cn, getCurrentInstance as ht, watchEffect as gt, useCssVars as En, onUnmounted as An, useModel as Me, createVNode as ct, withCtx as $t, mergeModels as xe, isRef as $n, toRefs as Tn, customRef as St, toRef as cn, readonly as Rt, resolveComponent as dn, withKeys as Ze } from "vue";
2
2
  import { defineStore as Dn } from "pinia";
3
3
  import './assets/index.css';function fn(e, t) {
4
- return mt() ? (ht(e, t), !0) : !1;
4
+ return mt() ? (pt(e, t), !0) : !1;
5
5
  }
6
6
  const Sn = typeof window < "u" && typeof document < "u";
7
7
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
8
8
  const Rn = (e) => e != null, Ln = Object.prototype.toString, Hn = (e) => Ln.call(e) === "[object Object]", Vn = () => {
9
9
  };
10
- function rt(e) {
10
+ function st(e) {
11
11
  return Array.isArray(e) ? e : [e];
12
12
  }
13
- function Pn(e, t, n) {
14
- return te(e, t, {
13
+ function _n(e, t, n) {
14
+ return ne(e, t, {
15
15
  ...n,
16
16
  immediate: !0
17
17
  });
@@ -22,58 +22,58 @@ function We(e) {
22
22
  const n = E(e);
23
23
  return (t = n?.$el) !== null && t !== void 0 ? t : n;
24
24
  }
25
- function Ke(...e) {
26
- const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n = $(() => {
27
- const o = rt(E(e[0])).filter((a) => a != null);
25
+ function Qe(...e) {
26
+ const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n = T(() => {
27
+ const o = st(E(e[0])).filter((a) => a != null);
28
28
  return o.every((a) => typeof a != "string") ? o : void 0;
29
29
  });
30
- return Pn(() => {
30
+ return _n(() => {
31
31
  var o, a;
32
32
  return [
33
33
  (o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) => We(r))) !== null && o !== void 0 ? o : [ze].filter((r) => r != null),
34
- rt(E(n.value ? e[1] : e[0])),
35
- rt(V(n.value ? e[2] : e[1])),
34
+ st(E(n.value ? e[1] : e[0])),
35
+ st(V(n.value ? e[2] : e[1])),
36
36
  E(n.value ? e[3] : e[2])
37
37
  ];
38
38
  }, ([o, a, r, s], l, u) => {
39
39
  if (!o?.length || !a?.length || !r?.length) return;
40
- const i = Hn(s) ? { ...s } : s, c = o.flatMap((p) => a.flatMap((m) => r.map((I) => t(p, m, I, i))));
40
+ const i = Hn(s) ? { ...s } : s, d = o.flatMap((m) => a.flatMap((p) => r.map((I) => t(m, p, I, i))));
41
41
  u(() => {
42
- c.forEach((p) => p());
42
+ d.forEach((m) => m());
43
43
  });
44
44
  }, { flush: "post" });
45
45
  }
46
46
  // @__NO_SIDE_EFFECTS__
47
- function _n() {
48
- const e = ie(!1), t = gt();
47
+ function Pn() {
48
+ const e = ue(!1), t = ht();
49
49
  return t && Ee(() => {
50
50
  e.value = !0;
51
51
  }, t), e;
52
52
  }
53
53
  // @__NO_SIDE_EFFECTS__
54
54
  function On(e) {
55
- const t = /* @__PURE__ */ _n();
56
- return $(() => (t.value, !!e()));
55
+ const t = /* @__PURE__ */ Pn();
56
+ return T(() => (t.value, !!e()));
57
57
  }
58
58
  function Bn(e, t, n = {}) {
59
59
  const { window: o = ze, ...a } = n;
60
60
  let r;
61
61
  const s = /* @__PURE__ */ On(() => o && "MutationObserver" in o), l = () => {
62
62
  r && (r.disconnect(), r = void 0);
63
- }, u = te($(() => {
64
- const p = rt(E(e)).map(We).filter(Rn);
65
- return new Set(p);
66
- }), (p) => {
67
- l(), s.value && p.size && (r = new MutationObserver(t), p.forEach((m) => r.observe(m, a)));
63
+ }, u = ne(T(() => {
64
+ const m = st(E(e)).map(We).filter(Rn);
65
+ return new Set(m);
66
+ }), (m) => {
67
+ l(), s.value && m.size && (r = new MutationObserver(t), m.forEach((p) => r.observe(p, a)));
68
68
  }, {
69
69
  immediate: !0,
70
70
  flush: "post"
71
- }), i = () => r?.takeRecords(), c = () => {
71
+ }), i = () => r?.takeRecords(), d = () => {
72
72
  u(), l();
73
73
  };
74
- return fn(c), {
74
+ return fn(d), {
75
75
  isSupported: s,
76
- stop: c,
76
+ stop: d,
77
77
  takeRecords: i
78
78
  };
79
79
  }
@@ -81,19 +81,19 @@ function Fn(e, t, n = {}) {
81
81
  const { window: o = ze, document: a = o?.document, flush: r = "sync" } = n;
82
82
  if (!o || !a) return Vn;
83
83
  let s;
84
- const l = (c) => {
85
- s?.(), s = c;
86
- }, u = Qe(() => {
87
- const c = We(e);
88
- if (c) {
89
- const { stop: p } = Bn(a, (m) => {
90
- m.map((I) => [...I.removedNodes]).flat().some((I) => I === c || I.contains(c)) && t(m);
84
+ const l = (d) => {
85
+ s?.(), s = d;
86
+ }, u = gt(() => {
87
+ const d = We(e);
88
+ if (d) {
89
+ const { stop: m } = Bn(a, (p) => {
90
+ p.map((I) => [...I.removedNodes]).flat().some((I) => I === d || I.contains(d)) && t(p);
91
91
  }, {
92
92
  window: o,
93
93
  childList: !0,
94
94
  subtree: !0
95
95
  });
96
- l(p);
96
+ l(m);
97
97
  }
98
98
  }, { flush: r }), i = () => {
99
99
  u(), l();
@@ -106,9 +106,9 @@ function Zn(e = {}) {
106
106
  const { window: n = ze, deep: o = !0, triggerOnRemoval: a = !1 } = e, r = (t = e.document) !== null && t !== void 0 ? t : n?.document, s = () => {
107
107
  let i = r?.activeElement;
108
108
  if (o)
109
- for (var c; i?.shadowRoot; ) i = i == null || (c = i.shadowRoot) === null || c === void 0 ? void 0 : c.activeElement;
109
+ for (var d; i?.shadowRoot; ) i = i == null || (d = i.shadowRoot) === null || d === void 0 ? void 0 : d.activeElement;
110
110
  return i;
111
- }, l = ie(), u = () => {
111
+ }, l = ue(), u = () => {
112
112
  l.value = s();
113
113
  };
114
114
  if (n) {
@@ -116,18 +116,18 @@ function Zn(e = {}) {
116
116
  capture: !0,
117
117
  passive: !0
118
118
  };
119
- Ke(n, "blur", (c) => {
120
- c.relatedTarget === null && u();
121
- }, i), Ke(n, "focus", u, i);
119
+ Qe(n, "blur", (d) => {
120
+ d.relatedTarget === null && u();
121
+ }, i), Qe(n, "focus", u, i);
122
122
  }
123
123
  return a && Fn(l, u, { document: r }), u(), l;
124
124
  }
125
125
  const Nn = "focusin", Un = "focusout", Wn = ":focus-within";
126
126
  function Gn(e, t = {}) {
127
- const { window: n = ze } = t, o = $(() => We(e)), a = ie(!1), r = $(() => a.value);
127
+ const { window: n = ze } = t, o = T(() => We(e)), a = ue(!1), r = T(() => a.value);
128
128
  if (!n || !(/* @__PURE__ */ Zn(t)).value) return { focused: r };
129
129
  const s = { passive: !0 };
130
- return Ke(o, Nn, () => a.value = !0, s), Ke(o, Un, () => {
130
+ return Qe(o, Nn, () => a.value = !0, s), Qe(o, Un, () => {
131
131
  var l, u, i;
132
132
  return a.value = (l = (u = o.value) === null || u === void 0 || (i = u.matches) === null || i === void 0 ? void 0 : i.call(u, Wn)) !== null && l !== void 0 ? l : !1;
133
133
  }, s), { focused: r };
@@ -143,11 +143,11 @@ function zn(e, { window: t = ze, scrollTarget: n } = {}) {
143
143
  o.value = l.top <= (t.innerHeight || r.documentElement.clientHeight) && l.left <= (t.innerWidth || r.documentElement.clientWidth) && l.bottom >= 0 && l.right >= 0;
144
144
  }
145
145
  };
146
- return te(
146
+ return ne(
147
147
  () => We(e),
148
148
  () => a(),
149
149
  { immediate: !0, flush: "post" }
150
- ), t && Ke(n || t, "scroll", a, {
150
+ ), t && Qe(n || t, "scroll", a, {
151
151
  capture: !1,
152
152
  passive: !0
153
153
  }), o;
@@ -155,7 +155,7 @@ function zn(e, { window: t = ze, scrollTarget: n } = {}) {
155
155
  const Ae = (e) => {
156
156
  let t = zn(e).value;
157
157
  return t = t && e.offsetHeight > 0, t;
158
- }, Te = (e) => e.tabIndex >= 0, Wt = (e) => {
158
+ }, $e = (e) => e.tabIndex >= 0, Wt = (e) => {
159
159
  const t = e.target;
160
160
  return Lt(t);
161
161
  }, Lt = (e) => {
@@ -170,7 +170,7 @@ const Ae = (e) => {
170
170
  const n = e.previousElementSibling;
171
171
  n && (t = n);
172
172
  }
173
- return t && (!Te(t) || !Ae(t)) ? Lt(t) : t;
173
+ return t && (!$e(t) || !Ae(t)) ? Lt(t) : t;
174
174
  }, qn = (e) => {
175
175
  const t = e.target;
176
176
  let n;
@@ -187,7 +187,7 @@ const Ae = (e) => {
187
187
  a && (n = a);
188
188
  }
189
189
  }
190
- return n && (!Te(n) || !Ae(n)) ? Ht(n) : n;
190
+ return n && (!$e(n) || !Ae(n)) ? Ht(n) : n;
191
191
  }, Gt = (e) => {
192
192
  const t = e.target;
193
193
  return Ht(t);
@@ -203,7 +203,7 @@ const Ae = (e) => {
203
203
  const n = e.nextElementSibling;
204
204
  n && (t = n);
205
205
  }
206
- return t && (!Te(t) || !Ae(t)) ? Ht(t) : t;
206
+ return t && (!$e(t) || !Ae(t)) ? Ht(t) : t;
207
207
  }, Yn = (e) => {
208
208
  const t = e.target;
209
209
  let n;
@@ -220,26 +220,26 @@ const Ae = (e) => {
220
220
  a && (n = a);
221
221
  }
222
222
  }
223
- return n && (!Te(n) || !Ae(n)) ? Lt(n) : n;
223
+ return n && (!$e(n) || !Ae(n)) ? Lt(n) : n;
224
224
  }, zt = (e) => {
225
225
  const t = e.target;
226
226
  return Vt(t);
227
227
  }, Vt = (e) => {
228
228
  let t;
229
- return e.previousElementSibling ? t = e.previousElementSibling : t = e.parentElement?.previousElementSibling?.lastElementChild, t && (!Te(t) || !Ae(t)) ? Vt(t) : t;
229
+ return e.previousElementSibling ? t = e.previousElementSibling : t = e.parentElement?.previousElementSibling?.lastElementChild, t && (!$e(t) || !Ae(t)) ? Vt(t) : t;
230
230
  }, qt = (e) => {
231
231
  const t = e.target;
232
- return Pt(t);
233
- }, Pt = (e) => {
232
+ return _t(t);
233
+ }, _t = (e) => {
234
234
  let t;
235
- return e.nextElementSibling ? t = e.nextElementSibling : t = e.parentElement?.nextElementSibling?.firstElementChild, t && (!Te(t) || !Ae(t)) ? Pt(t) : t;
235
+ return e.nextElementSibling ? t = e.nextElementSibling : t = e.parentElement?.nextElementSibling?.firstElementChild, t && (!$e(t) || !Ae(t)) ? _t(t) : t;
236
236
  }, Yt = (e) => {
237
237
  const t = e.target.parentElement?.firstElementChild;
238
- return t && (!Te(t) || !Ae(t)) ? Pt(t) : t;
238
+ return t && (!$e(t) || !Ae(t)) ? _t(t) : t;
239
239
  }, Xt = (e) => {
240
240
  const t = e.target.parentElement?.lastElementChild;
241
- return t && (!Te(t) || !Ae(t)) ? Vt(t) : t;
242
- }, ot = ["alt", "control", "shift", "meta"], Xn = {
241
+ return t && (!$e(t) || !Ae(t)) ? Vt(t) : t;
242
+ }, nt = ["alt", "control", "shift", "meta"], Xn = {
243
243
  ArrowUp: "up",
244
244
  ArrowDown: "down",
245
245
  ArrowLeft: "left",
@@ -308,7 +308,7 @@ const Ae = (e) => {
308
308
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
309
309
  }
310
310
  };
311
- function _t(e) {
311
+ function Pt(e) {
312
312
  const t = (s) => {
313
313
  let l = null;
314
314
  return s.parent && (typeof s.parent == "string" ? l = document.querySelector(s.parent) : s.parent instanceof HTMLElement ? l = s.parent : l = s.parent.value), l;
@@ -332,37 +332,37 @@ function _t(e) {
332
332
  }, o = (s) => {
333
333
  const l = t(s);
334
334
  let u = [];
335
- return s.selectors ? u = n(s) : l && (u = Array.from(l.children).filter((i) => Te(i) && Ae(i))), u;
335
+ return s.selectors ? u = n(s) : l && (u = Array.from(l.children).filter((i) => $e(i) && Ae(i))), u;
336
336
  }, a = (s) => (l) => {
337
337
  const u = Xn[l.key] || l.key.toLowerCase();
338
- if (ot.includes(u)) return;
338
+ if (nt.includes(u)) return;
339
339
  const i = s.handlers || wt;
340
- for (const c of Object.keys(i)) {
341
- const [p, ...m] = c.split(".");
342
- if (p === "keydown" && m.includes(u)) {
343
- const I = i[c], b = m.filter((f) => ot.includes(f)), x = ot.some((f) => {
344
- const h = f.charAt(0).toUpperCase() + f.slice(1);
345
- return l.getModifierState(h);
340
+ for (const d of Object.keys(i)) {
341
+ const [m, ...p] = d.split(".");
342
+ if (m === "keydown" && p.includes(u)) {
343
+ const I = i[d], y = p.filter((f) => nt.includes(f)), k = nt.some((f) => {
344
+ const g = f.charAt(0).toUpperCase() + f.slice(1);
345
+ return l.getModifierState(g);
346
346
  });
347
- if (b.length > 0) {
348
- if (x) {
349
- for (const f of ot)
350
- if (m.includes(f)) {
351
- const h = f.charAt(0).toUpperCase() + f.slice(1);
352
- l.getModifierState(h) && I(l);
347
+ if (y.length > 0) {
348
+ if (k) {
349
+ for (const f of nt)
350
+ if (p.includes(f)) {
351
+ const g = f.charAt(0).toUpperCase() + f.slice(1);
352
+ l.getModifierState(g) && I(l);
353
353
  }
354
354
  }
355
355
  } else
356
- x || I(l);
356
+ k || I(l);
357
357
  }
358
358
  }
359
359
  }, r = [];
360
360
  Ee(() => {
361
361
  for (const s of e) {
362
- const l = t(s), u = o(s), i = a(s), c = l ? [l] : u;
363
- for (const p of c) {
364
- const { focused: m } = Gn(L(p)), I = te(m, (b) => {
365
- b ? p.addEventListener("keydown", i) : p.removeEventListener("keydown", i);
362
+ const l = t(s), u = o(s), i = a(s), d = l ? [l] : u;
363
+ for (const m of d) {
364
+ const { focused: p } = Gn(L(m)), I = ne(p, (y) => {
365
+ y ? m.addEventListener("keydown", i) : m.removeEventListener("keydown", i);
366
366
  });
367
367
  r.push(I);
368
368
  }
@@ -373,18 +373,18 @@ function _t(e) {
373
373
  });
374
374
  }
375
375
  function Ot(e, t) {
376
- return mt() ? (ht(e, t), !0) : !1;
376
+ return mt() ? (pt(e, t), !0) : !1;
377
377
  }
378
378
  const vn = typeof window < "u" && typeof document < "u";
379
379
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
380
- const jn = (e) => e != null, Jn = Object.prototype.toString, Qn = (e) => Jn.call(e) === "[object Object]", _e = () => {
380
+ const jn = (e) => e != null, Jn = Object.prototype.toString, Qn = (e) => Jn.call(e) === "[object Object]", Pe = () => {
381
381
  };
382
382
  function Kn(...e) {
383
383
  if (e.length !== 1) return cn(...e);
384
384
  const t = e[0];
385
385
  return typeof t == "function" ? Rt(St(() => ({
386
386
  get: t,
387
- set: _e
387
+ set: Pe
388
388
  }))) : L(t);
389
389
  }
390
390
  function eo(e, t) {
@@ -400,34 +400,34 @@ function eo(e, t) {
400
400
  return n;
401
401
  }
402
402
  function to(e, t = {}) {
403
- let n, o, a = _e;
403
+ let n, o, a = Pe;
404
404
  const r = (l) => {
405
- clearTimeout(l), a(), a = _e;
405
+ clearTimeout(l), a(), a = Pe;
406
406
  };
407
407
  let s;
408
408
  return (l) => {
409
409
  const u = E(e), i = E(t.maxWait);
410
- return n && r(n), u <= 0 || i !== void 0 && i <= 0 ? (o && (r(o), o = void 0), Promise.resolve(l())) : new Promise((c, p) => {
411
- a = t.rejectOnCancel ? p : c, s = l, i && !o && (o = setTimeout(() => {
412
- n && r(n), o = void 0, c(s());
410
+ return n && r(n), u <= 0 || i !== void 0 && i <= 0 ? (o && (r(o), o = void 0), Promise.resolve(l())) : new Promise((d, m) => {
411
+ a = t.rejectOnCancel ? m : d, s = l, i && !o && (o = setTimeout(() => {
412
+ n && r(n), o = void 0, d(s());
413
413
  }, i)), n = setTimeout(() => {
414
- o && r(o), o = void 0, c(l());
414
+ o && r(o), o = void 0, d(l());
415
415
  }, u);
416
416
  });
417
417
  };
418
418
  }
419
- function it(e) {
419
+ function rt(e) {
420
420
  return Array.isArray(e) ? e : [e];
421
421
  }
422
422
  function no(e) {
423
- return gt();
423
+ return ht();
424
424
  }
425
425
  // @__NO_SIDE_EFFECTS__
426
426
  function oo(e, t = 200, n = {}) {
427
427
  return eo(to(t, n), e);
428
428
  }
429
429
  function lo(e, t = {}) {
430
- if (!Tn(e)) return $n(e);
430
+ if (!$n(e)) return Tn(e);
431
431
  const n = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
432
432
  for (const o in e.value) n[o] = St(() => ({
433
433
  get() {
@@ -451,67 +451,67 @@ function lo(e, t = {}) {
451
451
  return n;
452
452
  }
453
453
  function ao(e, t = !0, n) {
454
- no() ? Ee(e, n) : t ? e() : pt(e);
454
+ no() ? Ee(e, n) : t ? e() : vt(e);
455
455
  }
456
456
  function so(e, t, n) {
457
- return te(e, t, {
457
+ return ne(e, t, {
458
458
  ...n,
459
459
  immediate: !0
460
460
  });
461
461
  }
462
- const tt = vn ? window : void 0;
462
+ const et = vn ? window : void 0;
463
463
  function ye(e) {
464
464
  var t;
465
465
  const n = E(e);
466
466
  return (t = n?.$el) !== null && t !== void 0 ? t : n;
467
467
  }
468
468
  function He(...e) {
469
- const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n = $(() => {
470
- const o = it(E(e[0])).filter((a) => a != null);
469
+ const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n = T(() => {
470
+ const o = rt(E(e[0])).filter((a) => a != null);
471
471
  return o.every((a) => typeof a != "string") ? o : void 0;
472
472
  });
473
473
  return so(() => {
474
474
  var o, a;
475
475
  return [
476
- (o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) => ye(r))) !== null && o !== void 0 ? o : [tt].filter((r) => r != null),
477
- it(E(n.value ? e[1] : e[0])),
478
- it(V(n.value ? e[2] : e[1])),
476
+ (o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) => ye(r))) !== null && o !== void 0 ? o : [et].filter((r) => r != null),
477
+ rt(E(n.value ? e[1] : e[0])),
478
+ rt(V(n.value ? e[2] : e[1])),
479
479
  E(n.value ? e[3] : e[2])
480
480
  ];
481
481
  }, ([o, a, r, s], l, u) => {
482
482
  if (!o?.length || !a?.length || !r?.length) return;
483
- const i = Qn(s) ? { ...s } : s, c = o.flatMap((p) => a.flatMap((m) => r.map((I) => t(p, m, I, i))));
483
+ const i = Qn(s) ? { ...s } : s, d = o.flatMap((m) => a.flatMap((p) => r.map((I) => t(m, p, I, i))));
484
484
  u(() => {
485
- c.forEach((p) => p());
485
+ d.forEach((m) => m());
486
486
  });
487
487
  }, { flush: "post" });
488
488
  }
489
- function $t(e, t, n = {}) {
490
- const { window: o = tt, ignore: a = [], capture: r = !0, detectIframe: s = !1, controls: l = !1 } = n;
489
+ function Tt(e, t, n = {}) {
490
+ const { window: o = et, ignore: a = [], capture: r = !0, detectIframe: s = !1, controls: l = !1 } = n;
491
491
  if (!o) return l ? {
492
- stop: _e,
493
- cancel: _e,
494
- trigger: _e
495
- } : _e;
492
+ stop: Pe,
493
+ cancel: Pe,
494
+ trigger: Pe
495
+ } : Pe;
496
496
  let u = !0;
497
- const i = (f) => E(a).some((h) => {
498
- if (typeof h == "string") return Array.from(o.document.querySelectorAll(h)).some((g) => g === f.target || f.composedPath().includes(g));
497
+ const i = (f) => E(a).some((g) => {
498
+ if (typeof g == "string") return Array.from(o.document.querySelectorAll(g)).some((x) => x === f.target || f.composedPath().includes(x));
499
499
  {
500
- const g = ye(h);
501
- return g && (f.target === g || f.composedPath().includes(g));
500
+ const x = ye(g);
501
+ return x && (f.target === x || f.composedPath().includes(x));
502
502
  }
503
503
  });
504
- function c(f) {
505
- const h = E(f);
506
- return h && h.$.subTree.shapeFlag === 16;
504
+ function d(f) {
505
+ const g = E(f);
506
+ return g && g.$.subTree.shapeFlag === 16;
507
507
  }
508
- function p(f, h) {
509
- const g = E(f), C = g.$.subTree && g.$.subTree.children;
510
- return C == null || !Array.isArray(C) ? !1 : C.some((T) => T.el === h.target || h.composedPath().includes(T.el));
508
+ function m(f, g) {
509
+ const x = E(f), C = x.$.subTree && x.$.subTree.children;
510
+ return C == null || !Array.isArray(C) ? !1 : C.some(($) => $.el === g.target || g.composedPath().includes($.el));
511
511
  }
512
- const m = (f) => {
513
- const h = ye(e);
514
- if (f.target != null && !(!(h instanceof Element) && c(e) && p(e, f)) && !(!h || h === f.target || f.composedPath().includes(h))) {
512
+ const p = (f) => {
513
+ const g = ye(e);
514
+ if (f.target != null && !(!(g instanceof Element) && d(e) && m(e, f)) && !(!g || g === f.target || f.composedPath().includes(g))) {
515
515
  if ("detail" in f && f.detail === 0 && (u = !i(f)), !u) {
516
516
  u = !0;
517
517
  return;
@@ -520,72 +520,72 @@ function $t(e, t, n = {}) {
520
520
  }
521
521
  };
522
522
  let I = !1;
523
- const b = [
523
+ const y = [
524
524
  He(o, "click", (f) => {
525
525
  I || (I = !0, setTimeout(() => {
526
526
  I = !1;
527
- }, 0), m(f));
527
+ }, 0), p(f));
528
528
  }, {
529
529
  passive: !0,
530
530
  capture: r
531
531
  }),
532
532
  He(o, "pointerdown", (f) => {
533
- const h = ye(e);
534
- u = !i(f) && !!(h && !f.composedPath().includes(h));
533
+ const g = ye(e);
534
+ u = !i(f) && !!(g && !f.composedPath().includes(g));
535
535
  }, { passive: !0 }),
536
536
  s && He(o, "blur", (f) => {
537
537
  setTimeout(() => {
538
- var h;
539
- const g = ye(e);
540
- ((h = o.document.activeElement) === null || h === void 0 ? void 0 : h.tagName) === "IFRAME" && !g?.contains(o.document.activeElement) && t(f);
538
+ var g;
539
+ const x = ye(e);
540
+ ((g = o.document.activeElement) === null || g === void 0 ? void 0 : g.tagName) === "IFRAME" && !x?.contains(o.document.activeElement) && t(f);
541
541
  }, 0);
542
542
  }, { passive: !0 })
543
- ].filter(Boolean), x = () => b.forEach((f) => f());
543
+ ].filter(Boolean), k = () => y.forEach((f) => f());
544
544
  return l ? {
545
- stop: x,
545
+ stop: k,
546
546
  cancel: () => {
547
547
  u = !1;
548
548
  },
549
549
  trigger: (f) => {
550
- u = !0, m(f), u = !1;
550
+ u = !0, p(f), u = !1;
551
551
  }
552
- } : x;
552
+ } : k;
553
553
  }
554
554
  // @__NO_SIDE_EFFECTS__
555
555
  function ro() {
556
- const e = ie(!1), t = gt();
556
+ const e = ue(!1), t = ht();
557
557
  return t && Ee(() => {
558
558
  e.value = !0;
559
559
  }, t), e;
560
560
  }
561
561
  // @__NO_SIDE_EFFECTS__
562
- function pn(e) {
562
+ function mn(e) {
563
563
  const t = /* @__PURE__ */ ro();
564
- return $(() => (t.value, !!e()));
564
+ return T(() => (t.value, !!e()));
565
565
  }
566
- function mn(e, t, n = {}) {
567
- const { window: o = tt, ...a } = n;
566
+ function pn(e, t, n = {}) {
567
+ const { window: o = et, ...a } = n;
568
568
  let r;
569
- const s = /* @__PURE__ */ pn(() => o && "MutationObserver" in o), l = () => {
569
+ const s = /* @__PURE__ */ mn(() => o && "MutationObserver" in o), l = () => {
570
570
  r && (r.disconnect(), r = void 0);
571
- }, u = te($(() => {
572
- const p = it(E(e)).map(ye).filter(jn);
573
- return new Set(p);
574
- }), (p) => {
575
- l(), s.value && p.size && (r = new MutationObserver(t), p.forEach((m) => r.observe(m, a)));
571
+ }, u = ne(T(() => {
572
+ const m = rt(E(e)).map(ye).filter(jn);
573
+ return new Set(m);
574
+ }), (m) => {
575
+ l(), s.value && m.size && (r = new MutationObserver(t), m.forEach((p) => r.observe(p, a)));
576
576
  }, {
577
577
  immediate: !0,
578
578
  flush: "post"
579
- }), i = () => r?.takeRecords(), c = () => {
579
+ }), i = () => r?.takeRecords(), d = () => {
580
580
  u(), l();
581
581
  };
582
- return Ot(c), {
582
+ return Ot(d), {
583
583
  isSupported: s,
584
- stop: c,
584
+ stop: d,
585
585
  takeRecords: i
586
586
  };
587
587
  }
588
- const lt = {
588
+ const ot = {
589
589
  speed: 2,
590
590
  margin: 30,
591
591
  direction: "both"
@@ -595,21 +595,21 @@ function io(e) {
595
595
  }
596
596
  function yt(e, t = {}) {
597
597
  var n, o, a, r;
598
- const { pointerTypes: s, preventDefault: l, stopPropagation: u, exact: i, onMove: c, onEnd: p, onStart: m, initialValue: I, axis: b = "both", draggingElement: x = tt, containerElement: f, handle: h = e, buttons: g = [0], restrictInView: C, autoScroll: T = !1 } = t, R = L((n = E(I)) !== null && n !== void 0 ? n : {
598
+ const { pointerTypes: s, preventDefault: l, stopPropagation: u, exact: i, onMove: d, onEnd: m, onStart: p, initialValue: I, axis: y = "both", draggingElement: k = et, containerElement: f, handle: g = e, buttons: x = [0], restrictInView: C, autoScroll: $ = !1 } = t, R = L((n = E(I)) !== null && n !== void 0 ? n : {
599
599
  x: 0,
600
600
  y: 0
601
- }), S = L(), O = (D) => s ? s.includes(D.pointerType) : !0, U = (D) => {
601
+ }), S = L(), O = (D) => s ? s.includes(D.pointerType) : !0, W = (D) => {
602
602
  E(l) && D.preventDefault(), E(u) && D.stopPropagation();
603
- }, ve = E(T), Y = typeof ve == "object" ? {
604
- speed: (o = E(ve.speed)) !== null && o !== void 0 ? o : lt.speed,
605
- margin: (a = E(ve.margin)) !== null && a !== void 0 ? a : lt.margin,
606
- direction: (r = ve.direction) !== null && r !== void 0 ? r : lt.direction
607
- } : lt, X = (D) => typeof D == "number" ? [D, D] : [D.x, D.y], ge = (D, F, W) => {
608
- const { clientWidth: j, clientHeight: z, scrollLeft: se, scrollTop: be, scrollWidth: Le, scrollHeight: _ } = D, [B, G] = X(Y.margin), [Q, oe] = X(Y.speed);
609
- let ee = 0, re = 0;
610
- (Y.direction === "x" || Y.direction === "both") && (W.x < B && se > 0 ? ee = -Q : W.x + F.width > j - B && se < Le - j && (ee = Q)), (Y.direction === "y" || Y.direction === "both") && (W.y < G && be > 0 ? re = -oe : W.y + F.height > z - G && be < _ - z && (re = oe)), (ee || re) && D.scrollBy({
611
- left: ee,
612
- top: re,
603
+ }, me = E($), j = typeof me == "object" ? {
604
+ speed: (o = E(me.speed)) !== null && o !== void 0 ? o : ot.speed,
605
+ margin: (a = E(me.margin)) !== null && a !== void 0 ? a : ot.margin,
606
+ direction: (r = me.direction) !== null && r !== void 0 ? r : ot.direction
607
+ } : ot, J = (D) => typeof D == "number" ? [D, D] : [D.x, D.y], ge = (D, F, G) => {
608
+ const { clientWidth: Q, clientHeight: q, scrollLeft: re, scrollTop: ke, scrollWidth: Le, scrollHeight: P } = D, [B, z] = J(j.margin), [ee, le] = J(j.speed);
609
+ let te = 0, ie = 0;
610
+ (j.direction === "x" || j.direction === "both") && (G.x < B && re > 0 ? te = -ee : G.x + F.width > Q - B && re < Le - Q && (te = ee)), (j.direction === "y" || j.direction === "both") && (G.y < z && ke > 0 ? ie = -le : G.y + F.height > q - z && ke < P - q && (ie = le)), (te || ie) && D.scrollBy({
611
+ left: te,
612
+ top: ie,
613
613
  behavior: "auto"
614
614
  });
615
615
  };
@@ -617,61 +617,61 @@ function yt(e, t = {}) {
617
617
  const Oe = () => {
618
618
  const D = E(f);
619
619
  D && !de && (de = setInterval(() => {
620
- const F = E(e).getBoundingClientRect(), { x: W, y: j } = R.value, z = {
621
- x: W - D.scrollLeft,
622
- y: j - D.scrollTop
620
+ const F = E(e).getBoundingClientRect(), { x: G, y: Q } = R.value, q = {
621
+ x: G - D.scrollLeft,
622
+ y: Q - D.scrollTop
623
623
  };
624
- z.x >= 0 && z.y >= 0 && (ge(D, F, z), z.x += D.scrollLeft, z.y += D.scrollTop, R.value = z);
624
+ q.x >= 0 && q.y >= 0 && (ge(D, F, q), q.x += D.scrollLeft, q.y += D.scrollTop, R.value = q);
625
625
  }, 1e3 / 60));
626
626
  }, Re = () => {
627
627
  de && (clearInterval(de), de = null);
628
- }, Ye = (D, F, W, j) => {
629
- const [z, se] = typeof W == "number" ? [W, W] : [W.x, W.y], { clientWidth: be, clientHeight: Le } = F;
630
- return D.x < z || D.x + j.width > be - z || D.y < se || D.y + j.height > Le - se;
628
+ }, Ye = (D, F, G, Q) => {
629
+ const [q, re] = typeof G == "number" ? [G, G] : [G.x, G.y], { clientWidth: ke, clientHeight: Le } = F;
630
+ return D.x < q || D.x + Q.width > ke - q || D.y < re || D.y + Q.height > Le - re;
631
631
  }, Xe = () => {
632
632
  if (E(t.disabled) || !S.value) return;
633
633
  const D = E(f);
634
634
  if (!D) return;
635
- const F = E(e).getBoundingClientRect(), { x: W, y: j } = R.value;
635
+ const F = E(e).getBoundingClientRect(), { x: G, y: Q } = R.value;
636
636
  Ye({
637
- x: W - D.scrollLeft,
638
- y: j - D.scrollTop
639
- }, D, Y.margin, F) ? Oe() : Re();
637
+ x: G - D.scrollLeft,
638
+ y: Q - D.scrollTop
639
+ }, D, j.margin, F) ? Oe() : Re();
640
640
  };
641
- E(T) && te(R, Xe);
641
+ E($) && ne(R, Xe);
642
642
  const Be = (D) => {
643
643
  var F;
644
- if (!E(g).includes(D.button) || E(t.disabled) || !O(D) || E(i) && D.target !== E(e)) return;
645
- const W = E(f), j = W == null || (F = W.getBoundingClientRect) === null || F === void 0 ? void 0 : F.call(W), z = E(e).getBoundingClientRect(), se = {
646
- x: D.clientX - (W ? z.left - j.left + (T ? 0 : W.scrollLeft) : z.left),
647
- y: D.clientY - (W ? z.top - j.top + (T ? 0 : W.scrollTop) : z.top)
644
+ if (!E(x).includes(D.button) || E(t.disabled) || !O(D) || E(i) && D.target !== E(e)) return;
645
+ const G = E(f), Q = G == null || (F = G.getBoundingClientRect) === null || F === void 0 ? void 0 : F.call(G), q = E(e).getBoundingClientRect(), re = {
646
+ x: D.clientX - (G ? q.left - Q.left + ($ ? 0 : G.scrollLeft) : q.left),
647
+ y: D.clientY - (G ? q.top - Q.top + ($ ? 0 : G.scrollTop) : q.top)
648
648
  };
649
- m?.(se, D) !== !1 && (S.value = se, U(D));
649
+ p?.(re, D) !== !1 && (S.value = re, W(D));
650
650
  }, je = (D) => {
651
651
  if (E(t.disabled) || !O(D) || !S.value) return;
652
652
  const F = E(f);
653
653
  F instanceof HTMLElement && io(F);
654
- const W = E(e).getBoundingClientRect();
655
- let { x: j, y: z } = R.value;
656
- if ((b === "x" || b === "both") && (j = D.clientX - S.value.x, F && (j = Math.min(Math.max(0, j), F.scrollWidth - W.width))), (b === "y" || b === "both") && (z = D.clientY - S.value.y, F && (z = Math.min(Math.max(0, z), F.scrollHeight - W.height))), E(T) && F && (de === null && ge(F, W, {
657
- x: j,
658
- y: z
659
- }), j += F.scrollLeft, z += F.scrollTop), F && (C || T)) {
660
- if (b !== "y") {
661
- const se = j - F.scrollLeft;
662
- se < 0 ? j = F.scrollLeft : se > F.clientWidth - W.width && (j = F.clientWidth - W.width + F.scrollLeft);
654
+ const G = E(e).getBoundingClientRect();
655
+ let { x: Q, y: q } = R.value;
656
+ if ((y === "x" || y === "both") && (Q = D.clientX - S.value.x, F && (Q = Math.min(Math.max(0, Q), F.scrollWidth - G.width))), (y === "y" || y === "both") && (q = D.clientY - S.value.y, F && (q = Math.min(Math.max(0, q), F.scrollHeight - G.height))), E($) && F && (de === null && ge(F, G, {
657
+ x: Q,
658
+ y: q
659
+ }), Q += F.scrollLeft, q += F.scrollTop), F && (C || $)) {
660
+ if (y !== "y") {
661
+ const re = Q - F.scrollLeft;
662
+ re < 0 ? Q = F.scrollLeft : re > F.clientWidth - G.width && (Q = F.clientWidth - G.width + F.scrollLeft);
663
663
  }
664
- if (b !== "x") {
665
- const se = z - F.scrollTop;
666
- se < 0 ? z = F.scrollTop : se > F.clientHeight - W.height && (z = F.clientHeight - W.height + F.scrollTop);
664
+ if (y !== "x") {
665
+ const re = q - F.scrollTop;
666
+ re < 0 ? q = F.scrollTop : re > F.clientHeight - G.height && (q = F.clientHeight - G.height + F.scrollTop);
667
667
  }
668
668
  }
669
669
  R.value = {
670
- x: j,
671
- y: z
672
- }, c?.(R.value, D), U(D);
670
+ x: Q,
671
+ y: q
672
+ }, d?.(R.value, D), W(D);
673
673
  }, Fe = (D) => {
674
- E(t.disabled) || !O(D) || S.value && (S.value = void 0, T && Re(), p?.(R.value, D), U(D));
674
+ E(t.disabled) || !O(D) || S.value && (S.value = void 0, $ && Re(), m?.(R.value, D), W(D));
675
675
  };
676
676
  if (vn) {
677
677
  const D = () => {
@@ -681,31 +681,31 @@ function yt(e, t = {}) {
681
681
  passive: !E(l)
682
682
  };
683
683
  };
684
- He(h, "pointerdown", Be, D), He(x, "pointermove", je, D), He(x, "pointerup", Fe, D);
684
+ He(g, "pointerdown", Be, D), He(k, "pointermove", je, D), He(k, "pointerup", Fe, D);
685
685
  }
686
686
  return {
687
687
  ...lo(R),
688
688
  position: R,
689
- isDragging: $(() => !!S.value),
690
- style: $(() => `
689
+ isDragging: T(() => !!S.value),
690
+ style: T(() => `
691
691
  left: ${R.value.x}px;
692
692
  top: ${R.value.y}px;
693
- ${T ? "text-wrap: nowrap;" : ""}
693
+ ${$ ? "text-wrap: nowrap;" : ""}
694
694
  `)
695
695
  };
696
696
  }
697
- function ft(e, t, n = {}) {
698
- const { window: o = tt, ...a } = n;
697
+ function dt(e, t, n = {}) {
698
+ const { window: o = et, ...a } = n;
699
699
  let r;
700
- const s = /* @__PURE__ */ pn(() => o && "ResizeObserver" in o), l = () => {
700
+ const s = /* @__PURE__ */ mn(() => o && "ResizeObserver" in o), l = () => {
701
701
  r && (r.disconnect(), r = void 0);
702
- }, u = te($(() => {
703
- const c = E(e);
704
- return Array.isArray(c) ? c.map((p) => ye(p)) : [ye(c)];
705
- }), (c) => {
702
+ }, u = ne(T(() => {
703
+ const d = E(e);
704
+ return Array.isArray(d) ? d.map((m) => ye(m)) : [ye(d)];
705
+ }), (d) => {
706
706
  if (l(), s.value && o) {
707
707
  r = new ResizeObserver(t);
708
- for (const p of c) p && r.observe(p, a);
708
+ for (const m of d) m && r.observe(m, a);
709
709
  }
710
710
  }, {
711
711
  immediate: !0,
@@ -718,21 +718,21 @@ function ft(e, t, n = {}) {
718
718
  stop: i
719
719
  };
720
720
  }
721
- function Pe(e, t = {}) {
722
- const { reset: n = !0, windowResize: o = !0, windowScroll: a = !0, immediate: r = !0, updateTiming: s = "sync" } = t, l = ie(0), u = ie(0), i = ie(0), c = ie(0), p = ie(0), m = ie(0), I = ie(0), b = ie(0);
723
- function x() {
724
- const h = ye(e);
725
- if (!h) {
726
- n && (l.value = 0, u.value = 0, i.value = 0, c.value = 0, p.value = 0, m.value = 0, I.value = 0, b.value = 0);
721
+ function _e(e, t = {}) {
722
+ const { reset: n = !0, windowResize: o = !0, windowScroll: a = !0, immediate: r = !0, updateTiming: s = "sync" } = t, l = ue(0), u = ue(0), i = ue(0), d = ue(0), m = ue(0), p = ue(0), I = ue(0), y = ue(0);
723
+ function k() {
724
+ const g = ye(e);
725
+ if (!g) {
726
+ n && (l.value = 0, u.value = 0, i.value = 0, d.value = 0, m.value = 0, p.value = 0, I.value = 0, y.value = 0);
727
727
  return;
728
728
  }
729
- const g = h.getBoundingClientRect();
730
- l.value = g.height, u.value = g.bottom, i.value = g.left, c.value = g.right, p.value = g.top, m.value = g.width, I.value = g.x, b.value = g.y;
729
+ const x = g.getBoundingClientRect();
730
+ l.value = x.height, u.value = x.bottom, i.value = x.left, d.value = x.right, m.value = x.top, p.value = x.width, I.value = x.x, y.value = x.y;
731
731
  }
732
732
  function f() {
733
- s === "sync" ? x() : s === "next-frame" && requestAnimationFrame(() => x());
733
+ s === "sync" ? k() : s === "next-frame" && requestAnimationFrame(() => k());
734
734
  }
735
- return ft(e, f), te(() => ye(e), (h) => !h && f()), mn(e, f, { attributeFilter: ["style", "class"] }), a && He("scroll", f, {
735
+ return dt(e, f), ne(() => ye(e), (g) => !g && f()), pn(e, f, { attributeFilter: ["style", "class"] }), a && He("scroll", f, {
736
736
  capture: !0,
737
737
  passive: !0
738
738
  }), o && He("resize", f, { passive: !0 }), ao(() => {
@@ -741,37 +741,37 @@ function Pe(e, t = {}) {
741
741
  height: l,
742
742
  bottom: u,
743
743
  left: i,
744
- right: c,
745
- top: p,
746
- width: m,
744
+ right: d,
745
+ top: m,
746
+ width: p,
747
747
  x: I,
748
- y: b,
748
+ y,
749
749
  update: f
750
750
  };
751
751
  }
752
- function xt(e) {
752
+ function bt(e) {
753
753
  return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
754
754
  }
755
- const bt = /* @__PURE__ */ new WeakMap();
755
+ const xt = /* @__PURE__ */ new WeakMap();
756
756
  function uo(e, t = !1) {
757
- const n = ie(t);
757
+ const n = ue(t);
758
758
  let o = "";
759
- te(Kn(e), (s) => {
760
- const l = xt(E(s));
759
+ ne(Kn(e), (s) => {
760
+ const l = bt(E(s));
761
761
  if (l) {
762
762
  const u = l;
763
- if (bt.get(u) || bt.set(u, u.style.overflow), u.style.overflow !== "hidden" && (o = u.style.overflow), u.style.overflow === "hidden") return n.value = !0;
763
+ if (xt.get(u) || xt.set(u, u.style.overflow), u.style.overflow !== "hidden" && (o = u.style.overflow), u.style.overflow === "hidden") return n.value = !0;
764
764
  if (n.value) return u.style.overflow = "hidden";
765
765
  }
766
766
  }, { immediate: !0 });
767
767
  const a = () => {
768
- const s = xt(E(e));
768
+ const s = bt(E(e));
769
769
  !s || n.value || (s.style.overflow = "hidden", n.value = !0);
770
770
  }, r = () => {
771
- const s = xt(E(e));
772
- !s || !n.value || (s.style.overflow = o, bt.delete(s), n.value = !1);
771
+ const s = bt(E(e));
772
+ !s || !n.value || (s.style.overflow = o, xt.delete(s), n.value = !1);
773
773
  };
774
- return Ot(r), $({
774
+ return Ot(r), T({
775
775
  get() {
776
776
  return n.value;
777
777
  },
@@ -783,7 +783,7 @@ function uo(e, t = !1) {
783
783
  const co = (e) => {
784
784
  const t = new DOMParser().parseFromString(e, "text/html");
785
785
  return Array.from(t.body.childNodes).some((n) => n.nodeType === 1);
786
- }, fo = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), vo = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], po = ["innerHTML"], mo = { key: 2 }, ho = /* @__PURE__ */ ne({
786
+ }, fo = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), vo = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], mo = ["innerHTML"], po = { key: 2 }, ho = /* @__PURE__ */ oe({
787
787
  __name: "ACell",
788
788
  props: {
789
789
  colIndex: {},
@@ -795,35 +795,35 @@ const co = (e) => {
795
795
  debounce: { default: 300 }
796
796
  },
797
797
  setup(e, { expose: t }) {
798
- const n = fe("cell"), o = e.store.getCellData(e.colIndex, e.rowIndex), a = L(""), r = L(!1), s = e.store.columns[e.colIndex], l = e.store.rows[e.rowIndex], u = s.align || "center", i = s.width || "40ch", c = $(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), p = $(() => typeof c.value == "string" ? co(c.value) : !1), m = $(() => ({
798
+ const n = fe("cell"), o = e.store.getCellData(e.colIndex, e.rowIndex), a = L(""), r = L(!1), s = e.store.columns[e.colIndex], l = e.store.rows[e.rowIndex], u = s.align || "center", i = s.width || "40ch", d = T(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), m = T(() => typeof d.value == "string" ? co(d.value) : !1), p = T(() => ({
799
799
  textAlign: u,
800
800
  width: i,
801
801
  fontWeight: r.value ? "bold" : "inherit",
802
802
  paddingLeft: e.store.getIndent(e.colIndex, e.store.display[e.rowIndex]?.indent)
803
- })), I = $(() => ({
803
+ })), I = T(() => ({
804
804
  "sticky-column": e.pinned,
805
805
  "cell-modified": r.value
806
- })), b = () => {
807
- f(), x();
808
- }, x = () => {
809
- const { left: S, bottom: O, width: U, height: ve } = Pe(n);
810
- s.mask, s.modalComponent && e.store.$patch((Y) => {
811
- Y.modal.visible = !0, Y.modal.colIndex = e.colIndex, Y.modal.rowIndex = e.rowIndex, Y.modal.left = S, Y.modal.bottom = O, Y.modal.width = U, Y.modal.height = ve, Y.modal.cell = n.value, typeof s.modalComponent == "function" ? Y.modal.component = s.modalComponent({ table: Y.table, row: l, column: s }) : Y.modal.component = s.modalComponent, Y.modal.componentProps = s.modalComponentExtraProps;
806
+ })), y = () => {
807
+ f(), k();
808
+ }, k = () => {
809
+ const { left: S, bottom: O, width: W, height: me } = _e(n);
810
+ s.mask, s.modalComponent && e.store.$patch((j) => {
811
+ j.modal.visible = !0, j.modal.colIndex = e.colIndex, j.modal.rowIndex = e.rowIndex, j.modal.left = S, j.modal.bottom = O, j.modal.width = W, j.modal.height = me, j.modal.cell = n.value, typeof s.modalComponent == "function" ? j.modal.component = s.modalComponent({ table: j.table, row: l, column: s }) : j.modal.component = s.modalComponent, j.modal.componentProps = s.modalComponentExtraProps;
812
812
  });
813
813
  };
814
814
  if (e.addNavigation) {
815
815
  let S = {
816
816
  ...wt,
817
- "keydown.f2": x,
818
- "keydown.alt.up": x,
819
- "keydown.alt.down": x,
820
- "keydown.alt.left": x,
821
- "keydown.alt.right": x
817
+ "keydown.f2": k,
818
+ "keydown.alt.up": k,
819
+ "keydown.alt.down": k,
820
+ "keydown.alt.left": k,
821
+ "keydown.alt.right": k
822
822
  };
823
823
  typeof e.addNavigation == "object" && (S = {
824
824
  ...S,
825
825
  ...e.addNavigation
826
- }), _t([
826
+ }), Pt([
827
827
  {
828
828
  selectors: n,
829
829
  handlers: S
@@ -840,15 +840,15 @@ const co = (e) => {
840
840
  } catch {
841
841
  }
842
842
  }
843
- }, h = () => {
844
- n.value && (a.value = n.value.textContent, f());
845
843
  }, g = () => {
844
+ n.value && (a.value = n.value.textContent, f());
845
+ }, x = () => {
846
846
  try {
847
847
  const S = window.getSelection();
848
848
  if (S && S.rangeCount > 0 && n.value) {
849
- const O = S.getRangeAt(0), U = O.cloneRange();
850
- if (U.selectNodeContents && U.setEnd)
851
- return U.selectNodeContents(n.value), U.setEnd(O.endContainer, O.endOffset), U.toString().length;
849
+ const O = S.getRangeAt(0), W = O.cloneRange();
850
+ if (W.selectNodeContents && W.setEnd)
851
+ return W.selectNodeContents(n.value), W.setEnd(O.endContainer, O.endOffset), W.toString().length;
852
852
  }
853
853
  } catch {
854
854
  }
@@ -858,34 +858,34 @@ const co = (e) => {
858
858
  try {
859
859
  const O = window.getSelection();
860
860
  if (!O) return;
861
- let U = 0;
862
- const ve = document.createTreeWalker ? document.createTreeWalker(n.value, NodeFilter.SHOW_TEXT, null) : null;
863
- if (!ve) return;
864
- let Y, X = null;
865
- for (; Y = ve.nextNode(); ) {
866
- const ge = Y, de = U + ge.textContent.length;
867
- if (S <= de && (X = document.createRange(), X.setStart && X.setEnd)) {
868
- X.setStart(ge, S - U), X.setEnd(ge, S - U);
861
+ let W = 0;
862
+ const me = document.createTreeWalker ? document.createTreeWalker(n.value, NodeFilter.SHOW_TEXT, null) : null;
863
+ if (!me) return;
864
+ let j, J = null;
865
+ for (; j = me.nextNode(); ) {
866
+ const ge = j, de = W + ge.textContent.length;
867
+ if (S <= de && (J = document.createRange(), J.setStart && J.setEnd)) {
868
+ J.setStart(ge, S - W), J.setEnd(ge, S - W);
869
869
  break;
870
870
  }
871
- U = de;
871
+ W = de;
872
872
  }
873
- X && O.removeAllRanges && O.addRange && (O.removeAllRanges(), O.addRange(X));
873
+ J && O.removeAllRanges && O.addRange && (O.removeAllRanges(), O.addRange(J));
874
874
  } catch {
875
875
  }
876
- }, T = (S) => {
876
+ }, $ = (S) => {
877
877
  if (!s.edit) return;
878
878
  const O = S.target;
879
879
  if (O.textContent === a.value)
880
880
  return;
881
- const U = g();
882
- a.value = O.textContent, s.format ? (r.value = O.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, o), e.store.setCellText(e.colIndex, e.rowIndex, O.textContent)) : (r.value = O.textContent !== o, e.store.setCellData(e.colIndex, e.rowIndex, O.textContent)), pt().then(() => {
883
- C(U);
881
+ const W = x();
882
+ a.value = O.textContent, s.format ? (r.value = O.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, o), e.store.setCellText(e.colIndex, e.rowIndex, O.textContent)) : (r.value = O.textContent !== o, e.store.setCellData(e.colIndex, e.rowIndex, O.textContent)), vt().then(() => {
883
+ C(W);
884
884
  });
885
- }, R = /* @__PURE__ */ oo(T, e.debounce);
885
+ }, R = /* @__PURE__ */ oo($, e.debounce);
886
886
  return t({
887
887
  currentData: a
888
- }), (S, O) => (w(), k("td", {
888
+ }), (S, O) => (h(), b("td", {
889
889
  ref: "cell",
890
890
  "data-colindex": e.colIndex,
891
891
  "data-rowindex": e.rowIndex,
@@ -893,24 +893,24 @@ const co = (e) => {
893
893
  contenteditable: V(s).edit,
894
894
  tabindex: e.tabIndex,
895
895
  spellcheck: !1,
896
- style: xe(m.value),
897
- class: ae(["atable-cell", I.value]),
898
- onFocus: h,
899
- onPaste: T,
896
+ style: be(p.value),
897
+ class: se(["atable-cell", I.value]),
898
+ onFocus: g,
899
+ onPaste: $,
900
900
  onInput: O[0] || (O[0] = //@ts-ignore
901
- (...U) => V(R) && V(R)(...U)),
902
- onClick: b
901
+ (...W) => V(R) && V(R)(...W)),
902
+ onClick: y
903
903
  }, [
904
- V(s).cellComponent ? (w(), pe(Ue(V(s).cellComponent), vt({
904
+ V(s).cellComponent ? (h(), pe(Ue(V(s).cellComponent), ft({
905
905
  key: 0,
906
- value: c.value
907
- }, V(s).cellComponentProps), null, 16, ["value"])) : p.value ? (w(), k("span", {
906
+ value: d.value
907
+ }, V(s).cellComponentProps), null, 16, ["value"])) : m.value ? (h(), b("span", {
908
908
  key: 1,
909
- innerHTML: c.value
910
- }, null, 8, po)) : (w(), k("span", mo, K(c.value), 1))
909
+ innerHTML: d.value
910
+ }, null, 8, mo)) : (h(), b("span", po, N(d.value), 1))
911
911
  ], 46, vo));
912
912
  }
913
- }), go = ["tabindex"], wo = ["tabindex"], yo = ["colspan"], xo = /* @__PURE__ */ ne({
913
+ }), go = ["tabindex"], wo = ["tabindex"], yo = ["colspan"], bo = /* @__PURE__ */ oe({
914
914
  __name: "AExpansionRow",
915
915
  props: {
916
916
  rowIndex: {},
@@ -919,47 +919,47 @@ const co = (e) => {
919
919
  addNavigation: { type: [Boolean, Object], default: () => wt }
920
920
  },
921
921
  setup(e) {
922
- const t = fe("rowEl"), n = $(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
922
+ const t = fe("rowEl"), n = T(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
923
923
  if (e.addNavigation) {
924
924
  const o = {
925
925
  "keydown.control.g": (a) => {
926
926
  a.stopPropagation(), a.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
927
927
  }
928
928
  };
929
- typeof e.addNavigation == "object" && Object.assign(o, e.addNavigation), _t([
929
+ typeof e.addNavigation == "object" && Object.assign(o, e.addNavigation), Pt([
930
930
  {
931
931
  selectors: t,
932
932
  handlers: o
933
933
  }
934
934
  ]);
935
935
  }
936
- return (o, a) => (w(), k(ue, null, [
937
- y("tr", vt(o.$attrs, {
936
+ return (o, a) => (h(), b(X, null, [
937
+ w("tr", ft(o.$attrs, {
938
938
  ref: "rowEl",
939
939
  tabindex: e.tabIndex,
940
940
  class: "expandable-row"
941
941
  }), [
942
- y("td", {
942
+ w("td", {
943
943
  tabIndex: -1,
944
944
  class: "row-index",
945
945
  onClick: a[0] || (a[0] = (r) => e.store.toggleRowExpand(e.rowIndex))
946
- }, K(n.value), 1),
946
+ }, N(n.value), 1),
947
947
  he(o.$slots, "row", {}, void 0, !0)
948
948
  ], 16, go),
949
- e.store.display[e.rowIndex].expanded ? (w(), k("tr", {
949
+ e.store.display[e.rowIndex].expanded ? (h(), b("tr", {
950
950
  key: 0,
951
951
  ref: "rowExpanded",
952
952
  tabindex: e.tabIndex,
953
953
  class: "expanded-row"
954
954
  }, [
955
- y("td", {
955
+ w("td", {
956
956
  tabIndex: -1,
957
957
  colspan: e.store.columns.length + 1,
958
958
  class: "expanded-row-content"
959
959
  }, [
960
960
  he(o.$slots, "content", {}, void 0, !0)
961
961
  ], 8, yo)
962
- ], 8, wo)) : q("", !0)
962
+ ], 8, wo)) : Y("", !0)
963
963
  ], 64));
964
964
  }
965
965
  }), Ve = (e, t) => {
@@ -967,13 +967,13 @@ const co = (e) => {
967
967
  for (const [o, a] of t)
968
968
  n[o] = a;
969
969
  return n;
970
- }, bo = /* @__PURE__ */ Ve(xo, [["__scopeId", "data-v-a42297c7"]]), Io = ["colspan"], ko = {
970
+ }, xo = /* @__PURE__ */ Ve(bo, [["__scopeId", "data-v-a42297c7"]]), ko = ["colspan"], Io = {
971
971
  ref: "container",
972
972
  class: "gantt-container"
973
973
  }, Mo = ["data-rowindex", "data-colindex"], Co = {
974
974
  key: 2,
975
975
  class: "gantt-label"
976
- }, Eo = ["x1", "y1", "x2", "y2"], Ao = /* @__PURE__ */ ne({
976
+ }, Eo = ["x1", "y1", "x2", "y2"], Ao = /* @__PURE__ */ oe({
977
977
  __name: "AGanttCell",
978
978
  props: {
979
979
  store: {},
@@ -988,18 +988,18 @@ const co = (e) => {
988
988
  },
989
989
  emits: ["connection:create"],
990
990
  setup(e, { expose: t, emit: n }) {
991
- En((_) => ({
991
+ En((P) => ({
992
992
  v6d722296: a.value,
993
- v260b36f8: _.colspan
993
+ v260b36f8: P.colspan
994
994
  }));
995
- const o = n, a = L(e.color.length >= 6 ? e.color : "#cccccc"), r = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, s = fe("container"), l = fe("bar"), u = fe("leftResizeHandle"), i = fe("rightResizeHandle"), c = fe("leftConnectionHandle"), p = fe("rightConnectionHandle"), { width: m } = Pe(s), { left: I, right: b } = Pe(l), x = L(e.start), f = L(e.end || x.value + e.colspan), h = L(!1), g = L(!1), C = L(!1), T = L(!1), R = L(!1), S = L({ startX: 0, startY: 0, endX: 0, endY: 0 }), O = $(() => Oe.value || ge.value || de.value), U = $(() => e.colspan > 0 ? m.value / e.colspan : 0), ve = $(() => {
996
- const _ = x.value / e.colspan * 100, B = f.value / e.colspan * 100;
995
+ const o = n, a = L(e.color.length >= 6 ? e.color : "#cccccc"), r = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, s = fe("container"), l = fe("bar"), u = fe("leftResizeHandle"), i = fe("rightResizeHandle"), d = fe("leftConnectionHandle"), m = fe("rightConnectionHandle"), { width: p } = _e(s), { left: I, right: y } = _e(l), k = L(e.start), f = L(e.end || k.value + e.colspan), g = L(!1), x = L(!1), C = L(!1), $ = L(!1), R = L(!1), S = L({ startX: 0, startY: 0, endX: 0, endY: 0 }), O = T(() => Oe.value || ge.value || de.value), W = T(() => e.colspan > 0 ? p.value / e.colspan : 0), me = T(() => {
996
+ const P = k.value / e.colspan * 100, B = f.value / e.colspan * 100;
997
997
  return {
998
- left: `${_}%`,
999
- width: `${B - _}%`,
998
+ left: `${P}%`,
999
+ width: `${B - P}%`,
1000
1000
  backgroundColor: a.value
1001
1001
  };
1002
- }), Y = $(
1002
+ }), j = T(
1003
1003
  () => ({
1004
1004
  position: "fixed",
1005
1005
  top: 0,
@@ -1009,224 +1009,224 @@ const co = (e) => {
1009
1009
  pointerEvents: "none",
1010
1010
  zIndex: 1e3
1011
1011
  })
1012
- ), X = L({ startX: 0, startPos: 0 }), { isDragging: ge } = yt(u, {
1012
+ ), J = L({ startX: 0, startPos: 0 }), { isDragging: ge } = yt(u, {
1013
1013
  axis: "x",
1014
- onStart: () => Re(I.value, x.value),
1015
- onMove: ({ x: _ }) => Ye(_),
1016
- onEnd: ({ x: _ }) => Xe(_)
1014
+ onStart: () => Re(I.value, k.value),
1015
+ onMove: ({ x: P }) => Ye(P),
1016
+ onEnd: ({ x: P }) => Xe(P)
1017
1017
  }), { isDragging: de } = yt(i, {
1018
1018
  axis: "x",
1019
- onStart: () => Re(b.value, f.value),
1020
- onMove: ({ x: _ }) => Be(_),
1021
- onEnd: ({ x: _ }) => je(_)
1019
+ onStart: () => Re(y.value, f.value),
1020
+ onMove: ({ x: P }) => Be(P),
1021
+ onEnd: ({ x: P }) => je(P)
1022
1022
  }), { isDragging: Oe } = yt(l, {
1023
1023
  exact: !0,
1024
1024
  axis: "x",
1025
- onStart: () => Re(I.value, x.value),
1026
- onMove: ({ x: _ }) => Fe(_),
1027
- onEnd: ({ x: _ }) => D(_)
1025
+ onStart: () => Re(I.value, k.value),
1026
+ onMove: ({ x: P }) => Fe(P),
1027
+ onEnd: ({ x: P }) => D(P)
1028
1028
  });
1029
1029
  Ee(() => {
1030
1030
  F();
1031
1031
  }), An(() => {
1032
- W();
1032
+ G();
1033
1033
  });
1034
- function Re(_, B) {
1035
- l.value && (l.value.style.transition = "none"), X.value = { startX: _, startPos: B };
1034
+ function Re(P, B) {
1035
+ l.value && (l.value.style.transition = "none"), J.value = { startX: P, startPos: B };
1036
1036
  }
1037
- function Ye(_) {
1037
+ function Ye(P) {
1038
1038
  if (!ge.value || !l.value) return;
1039
- const B = (_ - X.value.startX) / U.value, G = Math.max(0, Math.min(f.value - 1, X.value.startPos + B));
1040
- l.value.style.left = `${G / e.colspan * 100}%`, l.value.style.width = `${(f.value - G) / e.colspan * 100}%`;
1039
+ const B = (P - J.value.startX) / W.value, z = Math.max(0, Math.min(f.value - 1, J.value.startPos + B));
1040
+ l.value.style.left = `${z / e.colspan * 100}%`, l.value.style.width = `${(f.value - z) / e.colspan * 100}%`;
1041
1041
  }
1042
- function Xe(_) {
1042
+ function Xe(P) {
1043
1043
  if (!l.value) return;
1044
- const B = _ - X.value.startX, G = Math.round(B / U.value), Q = x.value, oe = Math.max(0, Math.min(f.value - 1, X.value.startPos + G));
1045
- x.value = oe, e.store.updateGanttBar({
1044
+ const B = P - J.value.startX, z = Math.round(B / W.value), ee = k.value, le = Math.max(0, Math.min(f.value - 1, J.value.startPos + z));
1045
+ k.value = le, e.store.updateGanttBar({
1046
1046
  rowIndex: e.rowIndex,
1047
1047
  colIndex: e.colIndex,
1048
1048
  type: "resize",
1049
1049
  edge: "start",
1050
- oldStart: Q,
1051
- newStart: oe,
1050
+ oldStart: ee,
1051
+ newStart: le,
1052
1052
  end: f.value,
1053
- delta: G,
1054
- oldColspan: f.value - Q,
1055
- newColspan: f.value - oe
1053
+ delta: z,
1054
+ oldColspan: f.value - ee,
1055
+ newColspan: f.value - le
1056
1056
  });
1057
1057
  }
1058
- function Be(_) {
1058
+ function Be(P) {
1059
1059
  if (!de.value || !l.value) return;
1060
- const B = (_ - X.value.startX) / U.value, G = Math.max(x.value + 1, Math.min(e.columnsCount, X.value.startPos + B));
1061
- l.value.style.width = `${(G - x.value) / e.colspan * 100}%`;
1060
+ const B = (P - J.value.startX) / W.value, z = Math.max(k.value + 1, Math.min(e.columnsCount, J.value.startPos + B));
1061
+ l.value.style.width = `${(z - k.value) / e.colspan * 100}%`;
1062
1062
  }
1063
- function je(_) {
1063
+ function je(P) {
1064
1064
  if (!l.value) return;
1065
- const B = _ - X.value.startX, G = Math.round(B / U.value), Q = f.value, oe = Math.max(x.value + 1, Math.min(e.columnsCount, X.value.startPos + G));
1066
- f.value = oe, e.store.updateGanttBar({
1065
+ const B = P - J.value.startX, z = Math.round(B / W.value), ee = f.value, le = Math.max(k.value + 1, Math.min(e.columnsCount, J.value.startPos + z));
1066
+ f.value = le, e.store.updateGanttBar({
1067
1067
  rowIndex: e.rowIndex,
1068
1068
  colIndex: e.colIndex,
1069
1069
  type: "resize",
1070
1070
  edge: "end",
1071
- oldEnd: Q,
1072
- newEnd: oe,
1073
- start: x.value,
1074
- delta: G,
1075
- oldColspan: Q - x.value,
1076
- newColspan: oe - x.value
1071
+ oldEnd: ee,
1072
+ newEnd: le,
1073
+ start: k.value,
1074
+ delta: z,
1075
+ oldColspan: ee - k.value,
1076
+ newColspan: le - k.value
1077
1077
  });
1078
1078
  }
1079
- function Fe(_) {
1079
+ function Fe(P) {
1080
1080
  if (!Oe.value || !l.value) return;
1081
- const B = (_ - X.value.startX) / U.value, G = f.value - x.value, Q = Math.max(0, Math.min(X.value.startPos + B, e.columnsCount - G));
1082
- l.value.style.left = `${Q / e.colspan * 100}%`;
1081
+ const B = (P - J.value.startX) / W.value, z = f.value - k.value, ee = Math.max(0, Math.min(J.value.startPos + B, e.columnsCount - z));
1082
+ l.value.style.left = `${ee / e.colspan * 100}%`;
1083
1083
  }
1084
- function D(_) {
1084
+ function D(P) {
1085
1085
  if (!l.value) return;
1086
- const B = _ - X.value.startX, G = Math.round(B / U.value), Q = f.value - x.value, oe = x.value, ee = f.value;
1087
- let re = X.value.startPos + G, ce = re + Q;
1088
- re < 0 ? (re = 0, ce = Q) : ce > e.columnsCount && (ce = e.columnsCount, re = ce - Q), x.value = re, f.value = ce, e.store.updateGanttBar({
1086
+ const B = P - J.value.startX, z = Math.round(B / W.value), ee = f.value - k.value, le = k.value, te = f.value;
1087
+ let ie = J.value.startPos + z, ce = ie + ee;
1088
+ ie < 0 ? (ie = 0, ce = ee) : ce > e.columnsCount && (ce = e.columnsCount, ie = ce - ee), k.value = ie, f.value = ce, e.store.updateGanttBar({
1089
1089
  rowIndex: e.rowIndex,
1090
1090
  colIndex: e.colIndex,
1091
1091
  type: "bar",
1092
- oldStart: oe,
1093
- oldEnd: ee,
1094
- newStart: re,
1092
+ oldStart: le,
1093
+ oldEnd: te,
1094
+ newStart: ie,
1095
1095
  newEnd: ce,
1096
- delta: G,
1097
- colspan: ce - re
1096
+ delta: z,
1097
+ colspan: ce - ie
1098
1098
  });
1099
1099
  }
1100
1100
  function F() {
1101
- const { x: _, y: B } = Pe(l), { x: G, y: Q } = Pe(c), { x: oe, y: ee } = Pe(p);
1101
+ const { x: P, y: B } = _e(l), { x: z, y: ee } = _e(d), { x: le, y: te } = _e(m);
1102
1102
  e.store.registerGanttBar({
1103
1103
  id: r,
1104
1104
  rowIndex: e.rowIndex,
1105
1105
  colIndex: e.colIndex,
1106
- startIndex: x,
1106
+ startIndex: k,
1107
1107
  endIndex: f,
1108
1108
  color: a,
1109
1109
  label: e.label,
1110
- position: { x: _, y: B }
1110
+ position: { x: P, y: B }
1111
1111
  }), e.store.isDependencyGraphEnabled && (e.store.registerConnectionHandle({
1112
1112
  id: `${r}-connection-left`,
1113
1113
  rowIndex: e.rowIndex,
1114
1114
  colIndex: e.colIndex,
1115
1115
  side: "left",
1116
- position: { x: G, y: Q },
1117
- visible: h,
1116
+ position: { x: z, y: ee },
1117
+ visible: g,
1118
1118
  barId: r
1119
1119
  }), e.store.registerConnectionHandle({
1120
1120
  id: `${r}-connection-right`,
1121
1121
  rowIndex: e.rowIndex,
1122
1122
  colIndex: e.colIndex,
1123
1123
  side: "right",
1124
- position: { x: oe, y: ee },
1125
- visible: g,
1124
+ position: { x: le, y: te },
1125
+ visible: x,
1126
1126
  barId: r
1127
1127
  }));
1128
1128
  }
1129
- function W() {
1129
+ function G() {
1130
1130
  e.store.unregisterGanttBar(r), e.store.isDependencyGraphEnabled && (e.store.unregisterConnectionHandle(`${r}-connection-left`), e.store.unregisterConnectionHandle(`${r}-connection-right`));
1131
1131
  }
1132
- function j() {
1133
- e.store.isDependencyGraphEnabled && (h.value = !0, g.value = !0);
1132
+ function Q() {
1133
+ e.store.isDependencyGraphEnabled && (g.value = !0, x.value = !0);
1134
1134
  }
1135
- function z() {
1136
- !C.value && !T.value && (h.value = !1, g.value = !1);
1135
+ function q() {
1136
+ !C.value && !$.value && (g.value = !1, x.value = !1);
1137
1137
  }
1138
- function se(_, B) {
1139
- B.preventDefault(), B.stopPropagation(), R.value = !0, _ === "left" ? C.value = !0 : T.value = !0;
1140
- const G = _ === "left" ? c.value : p.value;
1141
- if (G) {
1142
- const ee = G.getBoundingClientRect(), re = ee.left + ee.width / 2, ce = ee.top + ee.height / 2;
1143
- S.value = { startX: re, startY: ce, endX: re, endY: ce };
1138
+ function re(P, B) {
1139
+ B.preventDefault(), B.stopPropagation(), R.value = !0, P === "left" ? C.value = !0 : $.value = !0;
1140
+ const z = P === "left" ? d.value : m.value;
1141
+ if (z) {
1142
+ const te = z.getBoundingClientRect(), ie = te.left + te.width / 2, ce = te.top + te.height / 2;
1143
+ S.value = { startX: ie, startY: ce, endX: ie, endY: ce };
1144
1144
  }
1145
- const Q = (ee) => {
1146
- S.value.endX = ee.clientX, S.value.endY = ee.clientY;
1147
- }, oe = (ee) => {
1148
- be(ee, _), Le(Q, oe);
1145
+ const ee = (te) => {
1146
+ S.value.endX = te.clientX, S.value.endY = te.clientY;
1147
+ }, le = (te) => {
1148
+ ke(te, P), Le(ee, le);
1149
1149
  };
1150
- document.addEventListener("mousemove", Q), document.addEventListener("mouseup", oe);
1150
+ document.addEventListener("mousemove", ee), document.addEventListener("mouseup", le);
1151
1151
  }
1152
- function be(_, B) {
1153
- const G = document.elementFromPoint(_.clientX, _.clientY)?.closest(".connection-handle");
1154
- if (G && G !== (B === "left" ? c.value : p.value)) {
1155
- const Q = G.closest(".gantt-bar");
1156
- if (Q) {
1157
- const oe = parseInt(Q.getAttribute("data-rowindex") || "0"), ee = parseInt(Q.getAttribute("data-colindex") || "0"), re = G.classList.contains("left-connection-handle") ? "left" : "right", ce = `gantt-bar-row-${oe}-col-${ee}`, d = e.store.createConnection(
1152
+ function ke(P, B) {
1153
+ const z = document.elementFromPoint(P.clientX, P.clientY)?.closest(".connection-handle");
1154
+ if (z && z !== (B === "left" ? d.value : m.value)) {
1155
+ const ee = z.closest(".gantt-bar");
1156
+ if (ee) {
1157
+ const le = parseInt(ee.getAttribute("data-rowindex") || "0"), te = parseInt(ee.getAttribute("data-colindex") || "0"), ie = z.classList.contains("left-connection-handle") ? "left" : "right", ce = `gantt-bar-row-${le}-col-${te}`, c = e.store.createConnection(
1158
1158
  `${r}-connection-${B}`,
1159
- `${ce}-connection-${re}`
1159
+ `${ce}-connection-${ie}`
1160
1160
  );
1161
- d && o("connection:create", d);
1161
+ c && o("connection:create", c);
1162
1162
  }
1163
1163
  }
1164
1164
  }
1165
- function Le(_, B) {
1166
- R.value = !1, C.value = !1, T.value = !1, document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", B), l.value?.matches(":hover") || z();
1165
+ function Le(P, B) {
1166
+ R.value = !1, C.value = !1, $.value = !1, document.removeEventListener("mousemove", P), document.removeEventListener("mouseup", B), l.value?.matches(":hover") || q();
1167
1167
  }
1168
1168
  return t({
1169
- barStyle: ve,
1169
+ barStyle: me,
1170
1170
  cleanupConnectionDrag: Le,
1171
1171
  currentEnd: f,
1172
- handleConnectionDrop: be,
1172
+ handleConnectionDrop: ke,
1173
1173
  isLeftConnectionDragging: C,
1174
- isLeftConnectionVisible: h,
1175
- isRightConnectionDragging: T,
1176
- isRightConnectionVisible: g,
1174
+ isLeftConnectionVisible: g,
1175
+ isRightConnectionDragging: $,
1176
+ isRightConnectionVisible: x,
1177
1177
  showDragPreview: R
1178
- }), (_, B) => (w(), k("td", {
1178
+ }), (P, B) => (h(), b("td", {
1179
1179
  class: "aganttcell",
1180
1180
  colspan: e.colspan
1181
1181
  }, [
1182
- y("div", ko, [
1183
- y("div", {
1182
+ w("div", Io, [
1183
+ w("div", {
1184
1184
  ref: "bar",
1185
1185
  "data-rowindex": e.rowIndex,
1186
1186
  "data-colindex": e.colIndex,
1187
- class: ae(["gantt-bar", { "is-dragging": O.value }]),
1188
- style: xe(ve.value),
1189
- onMouseenter: j,
1190
- onMouseleave: z
1187
+ class: se(["gantt-bar", { "is-dragging": O.value }]),
1188
+ style: be(me.value),
1189
+ onMouseenter: Q,
1190
+ onMouseleave: q
1191
1191
  }, [
1192
- e.store.isDependencyGraphEnabled ? (w(), k("div", {
1192
+ e.store.isDependencyGraphEnabled ? (h(), b("div", {
1193
1193
  key: 0,
1194
1194
  ref: "leftConnectionHandle",
1195
- class: ae(["connection-handle left-connection-handle", { visible: h.value, "is-dragging": C.value }]),
1196
- onMousedown: B[0] || (B[0] = Ie((G) => se("left", G), ["stop"]))
1195
+ class: se(["connection-handle left-connection-handle", { visible: g.value, "is-dragging": C.value }]),
1196
+ onMousedown: B[0] || (B[0] = Ie((z) => re("left", z), ["stop"]))
1197
1197
  }, [...B[2] || (B[2] = [
1198
- y("div", { class: "connection-dot" }, null, -1)
1199
- ])], 34)) : q("", !0),
1200
- e.store.isDependencyGraphEnabled ? (w(), k("div", {
1198
+ w("div", { class: "connection-dot" }, null, -1)
1199
+ ])], 34)) : Y("", !0),
1200
+ e.store.isDependencyGraphEnabled ? (h(), b("div", {
1201
1201
  key: 1,
1202
1202
  ref: "rightConnectionHandle",
1203
- class: ae(["connection-handle right-connection-handle", { visible: g.value, "is-dragging": T.value }]),
1204
- onMousedown: B[1] || (B[1] = Ie((G) => se("right", G), ["stop"]))
1203
+ class: se(["connection-handle right-connection-handle", { visible: x.value, "is-dragging": $.value }]),
1204
+ onMousedown: B[1] || (B[1] = Ie((z) => re("right", z), ["stop"]))
1205
1205
  }, [...B[3] || (B[3] = [
1206
- y("div", { class: "connection-dot" }, null, -1)
1207
- ])], 34)) : q("", !0),
1208
- y("div", {
1206
+ w("div", { class: "connection-dot" }, null, -1)
1207
+ ])], 34)) : Y("", !0),
1208
+ w("div", {
1209
1209
  ref: "leftResizeHandle",
1210
- class: ae(["resize-handle left-resize-handle", { "is-dragging": V(ge) }])
1210
+ class: se(["resize-handle left-resize-handle", { "is-dragging": V(ge) }])
1211
1211
  }, [...B[4] || (B[4] = [
1212
- y("div", { class: "handle-grip" }, null, -1),
1213
- y("div", { class: "vertical-indicator left-indicator" }, null, -1)
1212
+ w("div", { class: "handle-grip" }, null, -1),
1213
+ w("div", { class: "vertical-indicator left-indicator" }, null, -1)
1214
1214
  ])], 2),
1215
- e.label ? (w(), k("label", Co, K(e.label), 1)) : q("", !0),
1216
- y("div", {
1215
+ e.label ? (h(), b("label", Co, N(e.label), 1)) : Y("", !0),
1216
+ w("div", {
1217
1217
  ref: "rightResizeHandle",
1218
- class: ae(["resize-handle right-resize-handle", { "is-dragging": V(de) }])
1218
+ class: se(["resize-handle right-resize-handle", { "is-dragging": V(de) }])
1219
1219
  }, [...B[5] || (B[5] = [
1220
- y("div", { class: "handle-grip" }, null, -1),
1221
- y("div", { class: "vertical-indicator right-indicator" }, null, -1)
1220
+ w("div", { class: "handle-grip" }, null, -1),
1221
+ w("div", { class: "vertical-indicator right-indicator" }, null, -1)
1222
1222
  ])], 2)
1223
1223
  ], 46, Mo)
1224
1224
  ], 512),
1225
- e.store.isDependencyGraphEnabled && R.value ? (w(), k("svg", {
1225
+ e.store.isDependencyGraphEnabled && R.value ? (h(), b("svg", {
1226
1226
  key: 0,
1227
- style: xe(Y.value)
1227
+ style: be(j.value)
1228
1228
  }, [
1229
- y("line", {
1229
+ w("line", {
1230
1230
  x1: S.value.startX,
1231
1231
  y1: S.value.startY,
1232
1232
  x2: S.value.endX,
@@ -1235,10 +1235,10 @@ const co = (e) => {
1235
1235
  "stroke-width": "2",
1236
1236
  "stroke-dasharray": "5,5"
1237
1237
  }, null, 8, Eo)
1238
- ], 4)) : q("", !0)
1239
- ], 8, Io));
1238
+ ], 4)) : Y("", !0)
1239
+ ], 8, ko));
1240
1240
  }
1241
- }), To = /* @__PURE__ */ Ve(Ao, [["__scopeId", "data-v-8917a8a3"]]), $o = `<?xml version="1.0" encoding="UTF-8"?>
1241
+ }), $o = /* @__PURE__ */ Ve(Ao, [["__scopeId", "data-v-8917a8a3"]]), To = `<?xml version="1.0" encoding="UTF-8"?>
1242
1242
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
1243
1243
  <path d="M32,64C14.35,64,0,49.65,0,32S14.35,0,32,0s32,14.35,32,32-14.35,32-32,32ZM32,4c-15.44,0-28,12.56-28,28s12.56,28,28,28,28-12.56,28-28S47.44,4,32,4Z" style="fill: #000; stroke-width: 0px;"/>
1244
1244
  <polygon points="34 18 30 18 30 30 18 30 18 34 30 34 30 46 34 46 34 34 46 34 46 30 34 30 34 18" style="fill: #000; stroke-width: 0px;"/>
@@ -1283,19 +1283,19 @@ const co = (e) => {
1283
1283
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70.67 70.64">
1284
1284
  <path d="M70.08,33.9l-9.75-9.75-2.83,2.83,6.33,6.33h-26.51V6.81l6.33,6.33,2.83-2.83L36.75.56c-.75-.75-2.08-.75-2.83,0l-9.75,9.75,2.83,2.83,6.33-6.33v26.5H6.83l6.33-6.33-2.83-2.83L.59,33.9c-.38.38-.59.88-.59,1.41s.21,1.04.59,1.41l9.75,9.75,2.83-2.83-6.33-6.33h26.5v26.51l-6.33-6.33-2.83,2.83,9.75,9.75c.38.38.88.59,1.41.59s1.04-.21,1.41-.59l9.75-9.75-2.83-2.83-6.33,6.33v-26.51h26.51l-6.33,6.33,2.83,2.83,9.75-9.75c.38-.38.59-.88.59-1.41s-.21-1.04-.59-1.41Z" style="fill: #000; stroke-width: 0px;"/>
1285
1285
  </svg>`, Vo = {
1286
- add: $o,
1286
+ add: To,
1287
1287
  delete: Do,
1288
1288
  duplicate: So,
1289
1289
  insertAbove: Ro,
1290
1290
  insertBelow: Lo,
1291
1291
  move: Ho
1292
- }, Po = {
1292
+ }, _o = {
1293
1293
  key: 0,
1294
1294
  class: "row-actions-dropdown"
1295
- }, _o = ["aria-expanded"], Oo = ["onClick"], Bo = ["innerHTML"], Fo = { class: "action-label" }, Zo = {
1295
+ }, Po = ["aria-expanded"], Oo = ["onClick"], Bo = ["innerHTML"], Fo = { class: "action-label" }, Zo = {
1296
1296
  key: 1,
1297
1297
  class: "row-actions-icons"
1298
- }, No = ["title", "aria-label", "onClick"], Uo = ["innerHTML"], ut = /* @__PURE__ */ ne({
1298
+ }, No = ["title", "aria-label", "onClick"], Uo = ["innerHTML"], it = /* @__PURE__ */ oe({
1299
1299
  __name: "ARowActions",
1300
1300
  props: {
1301
1301
  rowIndex: {},
@@ -1305,27 +1305,27 @@ const co = (e) => {
1305
1305
  },
1306
1306
  emits: ["action"],
1307
1307
  setup(e, { emit: t }) {
1308
- const n = e, o = t, a = fe("actionsCell"), r = fe("toggleButton"), s = L(0), l = L(!1), u = L(!1), i = L({ top: 0, left: 0 }), c = {
1308
+ const n = e, o = t, a = fe("actionsCell"), r = fe("toggleButton"), s = L(0), l = L(!1), u = L(!1), i = L({ top: 0, left: 0 }), d = {
1309
1309
  add: "Add Row",
1310
1310
  delete: "Delete Row",
1311
1311
  duplicate: "Duplicate Row",
1312
1312
  insertAbove: "Insert Above",
1313
1313
  insertBelow: "Insert Below",
1314
1314
  move: "Move Row"
1315
- }, p = $(() => {
1316
- const h = [], g = n.config.actions || {}, C = ["add", "delete", "duplicate", "insertAbove", "insertBelow", "move"];
1317
- for (const T of C) {
1318
- const R = g[T];
1315
+ }, m = T(() => {
1316
+ const g = [], x = n.config.actions || {}, C = ["add", "delete", "duplicate", "insertAbove", "insertBelow", "move"];
1317
+ for (const $ of C) {
1318
+ const R = x[$];
1319
1319
  if (R === !1 || R === void 0) continue;
1320
- let S = !0, O = c[T], U = Vo[T];
1321
- typeof R == "object" && (S = R.enabled !== !1, O = R.label || O, U = R.icon || U), S && h.push({ type: T, label: O, icon: U });
1320
+ let S = !0, O = d[$], W = Vo[$];
1321
+ typeof R == "object" && (S = R.enabled !== !1, O = R.label || O, W = R.icon || W), S && g.push({ type: $, label: O, icon: W });
1322
1322
  }
1323
- return h;
1324
- }), m = $(() => {
1323
+ return g;
1324
+ }), p = T(() => {
1325
1325
  if (n.config.forceDropdown) return !0;
1326
- const h = n.config.dropdownThreshold ?? 150;
1327
- return h === 0 ? !1 : s.value > 0 && s.value < h;
1328
- }), I = $(() => l.value ? u.value ? {
1326
+ const g = n.config.dropdownThreshold ?? 150;
1327
+ return g === 0 ? !1 : s.value > 0 && s.value < g;
1328
+ }), I = T(() => l.value ? u.value ? {
1329
1329
  position: "fixed",
1330
1330
  bottom: `${window.innerHeight - i.value.top}px`,
1331
1331
  left: `${i.value.left}px`,
@@ -1335,77 +1335,77 @@ const co = (e) => {
1335
1335
  top: `${i.value.top}px`,
1336
1336
  left: `${i.value.left}px`
1337
1337
  } : {});
1338
- ft(a, (h) => {
1339
- const g = h[0];
1340
- g && (s.value = g.contentRect.width);
1338
+ dt(a, (g) => {
1339
+ const x = g[0];
1340
+ x && (s.value = x.contentRect.width);
1341
1341
  });
1342
- const b = () => {
1343
- l.value || x(), l.value = !l.value;
1344
- }, x = () => {
1342
+ const y = () => {
1343
+ l.value || k(), l.value = !l.value;
1344
+ }, k = () => {
1345
1345
  if (!r.value) return;
1346
- const h = r.value.getBoundingClientRect(), g = window.innerHeight, C = p.value.length * 40 + 16, T = g - h.bottom, R = h.top;
1347
- u.value = T < C && R > C, u.value ? i.value = {
1348
- top: h.top,
1349
- left: h.left
1346
+ const g = r.value.getBoundingClientRect(), x = window.innerHeight, C = m.value.length * 40 + 16, $ = x - g.bottom, R = g.top;
1347
+ u.value = $ < C && R > C, u.value ? i.value = {
1348
+ top: g.top,
1349
+ left: g.left
1350
1350
  } : i.value = {
1351
- top: h.bottom,
1352
- left: h.left
1351
+ top: g.bottom,
1352
+ left: g.left
1353
1353
  };
1354
1354
  };
1355
- $t(a, () => {
1355
+ Tt(a, () => {
1356
1356
  l.value = !1;
1357
1357
  });
1358
- const f = (h) => {
1358
+ const f = (g) => {
1359
1359
  l.value = !1;
1360
- const g = n.config.actions?.[h];
1361
- typeof g == "object" && g.handler && g.handler(n.rowIndex, n.store) === !1 || o("action", h, n.rowIndex);
1360
+ const x = n.config.actions?.[g];
1361
+ typeof x == "object" && x.handler && x.handler(n.rowIndex, n.store) === !1 || o("action", g, n.rowIndex);
1362
1362
  };
1363
- return (h, g) => (w(), k("td", {
1363
+ return (g, x) => (h(), b("td", {
1364
1364
  ref: "actionsCell",
1365
- class: ae(["atable-row-actions", { "sticky-column": e.position === "before-index", "dropdown-active": l.value }])
1365
+ class: se(["atable-row-actions", { "sticky-column": e.position === "before-index", "dropdown-active": l.value }])
1366
1366
  }, [
1367
- m.value ? (w(), k("div", Po, [
1368
- y("button", {
1367
+ p.value ? (h(), b("div", _o, [
1368
+ w("button", {
1369
1369
  ref: "toggleButton",
1370
1370
  type: "button",
1371
1371
  class: "row-actions-toggle",
1372
1372
  "aria-expanded": l.value,
1373
1373
  "aria-haspopup": "true",
1374
- onClick: Ie(b, ["stop"])
1375
- }, [...g[0] || (g[0] = [
1376
- y("span", { class: "dropdown-icon" }, "⋮", -1)
1377
- ])], 8, _o),
1378
- J(y("div", {
1379
- class: ae(["row-actions-menu", { "menu-flipped": u.value }]),
1380
- style: xe(I.value),
1374
+ onClick: Ie(y, ["stop"])
1375
+ }, [...x[0] || (x[0] = [
1376
+ w("span", { class: "dropdown-icon" }, "⋮", -1)
1377
+ ])], 8, Po),
1378
+ K(w("div", {
1379
+ class: se(["row-actions-menu", { "menu-flipped": u.value }]),
1380
+ style: be(I.value),
1381
1381
  role: "menu"
1382
1382
  }, [
1383
- (w(!0), k(ue, null, me(p.value, (C) => (w(), k("button", {
1383
+ (h(!0), b(X, null, ve(m.value, (C) => (h(), b("button", {
1384
1384
  key: C.type,
1385
1385
  type: "button",
1386
1386
  class: "row-action-menu-item",
1387
1387
  role: "menuitem",
1388
- onClick: Ie((T) => f(C.type), ["stop"])
1388
+ onClick: Ie(($) => f(C.type), ["stop"])
1389
1389
  }, [
1390
- y("span", {
1390
+ w("span", {
1391
1391
  class: "action-icon",
1392
1392
  innerHTML: C.icon
1393
1393
  }, null, 8, Bo),
1394
- y("span", Fo, K(C.label), 1)
1394
+ w("span", Fo, N(C.label), 1)
1395
1395
  ], 8, Oo))), 128))
1396
1396
  ], 6), [
1397
1397
  [Ce, l.value]
1398
1398
  ])
1399
- ])) : (w(), k("div", Zo, [
1400
- (w(!0), k(ue, null, me(p.value, (C) => (w(), k("button", {
1399
+ ])) : (h(), b("div", Zo, [
1400
+ (h(!0), b(X, null, ve(m.value, (C) => (h(), b("button", {
1401
1401
  key: C.type,
1402
1402
  type: "button",
1403
1403
  class: "row-action-btn",
1404
1404
  title: C.label,
1405
1405
  "aria-label": C.label,
1406
- onClick: Ie((T) => f(C.type), ["stop"])
1406
+ onClick: Ie(($) => f(C.type), ["stop"])
1407
1407
  }, [
1408
- y("span", {
1408
+ w("span", {
1409
1409
  class: "action-icon",
1410
1410
  innerHTML: C.icon
1411
1411
  }, null, 8, Uo)
@@ -1413,7 +1413,7 @@ const co = (e) => {
1413
1413
  ]))
1414
1414
  ], 2));
1415
1415
  }
1416
- }), Wo = ["tabindex"], Go = /* @__PURE__ */ ne({
1416
+ }), Wo = ["tabindex"], Go = /* @__PURE__ */ oe({
1417
1417
  __name: "ARow",
1418
1418
  props: {
1419
1419
  rowIndex: {},
@@ -1423,93 +1423,93 @@ const co = (e) => {
1423
1423
  },
1424
1424
  emits: ["row:action"],
1425
1425
  setup(e, { emit: t }) {
1426
- const n = t, o = fe("rowEl"), a = $(() => e.store.isRowVisible(e.rowIndex)), r = $(() => e.store.getRowExpandSymbol(e.rowIndex)), s = $(() => e.store.config.rowActions || { enabled: !1 }), l = $(() => s.value.enabled), u = $(() => s.value.position || "before-index"), i = (c, p) => {
1427
- n("row:action", c, p);
1426
+ const n = t, o = fe("rowEl"), a = T(() => e.store.isRowVisible(e.rowIndex)), r = T(() => e.store.getRowExpandSymbol(e.rowIndex)), s = T(() => e.store.config.rowActions || { enabled: !1 }), l = T(() => s.value.enabled), u = T(() => s.value.position || "before-index"), i = (d, m) => {
1427
+ n("row:action", d, m);
1428
1428
  };
1429
1429
  if (e.addNavigation) {
1430
- let c = wt;
1431
- typeof e.addNavigation == "object" && (c = {
1432
- ...c,
1430
+ let d = wt;
1431
+ typeof e.addNavigation == "object" && (d = {
1432
+ ...d,
1433
1433
  ...e.addNavigation
1434
- }), _t([
1434
+ }), Pt([
1435
1435
  {
1436
1436
  selectors: o,
1437
- handlers: c
1437
+ handlers: d
1438
1438
  }
1439
1439
  ]);
1440
1440
  }
1441
- return (c, p) => J((w(), k("tr", {
1441
+ return (d, m) => K((h(), b("tr", {
1442
1442
  ref: "rowEl",
1443
1443
  tabindex: e.tabIndex,
1444
1444
  class: "atable-row"
1445
1445
  }, [
1446
- l.value && u.value === "before-index" ? (w(), pe(ut, {
1446
+ l.value && u.value === "before-index" ? (h(), pe(it, {
1447
1447
  key: 0,
1448
1448
  "row-index": e.rowIndex,
1449
1449
  store: e.store,
1450
1450
  config: s.value,
1451
1451
  position: u.value,
1452
1452
  onAction: i
1453
- }, null, 8, ["row-index", "store", "config", "position"])) : q("", !0),
1454
- e.store.config.view !== "uncounted" ? he(c.$slots, "index", { key: 1 }, () => [
1455
- e.store.config.view === "list" ? (w(), k("td", {
1453
+ }, null, 8, ["row-index", "store", "config", "position"])) : Y("", !0),
1454
+ e.store.config.view !== "uncounted" ? he(d.$slots, "index", { key: 1 }, () => [
1455
+ e.store.config.view === "list" ? (h(), b("td", {
1456
1456
  key: 0,
1457
1457
  tabIndex: -1,
1458
- class: ae(["list-index", e.store.hasPinnedColumns ? "sticky-index" : ""])
1459
- }, K(e.rowIndex + 1), 3)) : e.store.isTreeView ? (w(), k("td", {
1458
+ class: se(["list-index", e.store.hasPinnedColumns ? "sticky-index" : ""])
1459
+ }, N(e.rowIndex + 1), 3)) : e.store.isTreeView ? (h(), b("td", {
1460
1460
  key: 1,
1461
1461
  tabIndex: -1,
1462
- class: ae(["tree-index", e.store.hasPinnedColumns ? "sticky-index" : ""]),
1463
- onClick: p[0] || (p[0] = (m) => e.store.toggleRowExpand(e.rowIndex))
1464
- }, K(r.value), 3)) : q("", !0)
1465
- ], !0) : q("", !0),
1466
- l.value && u.value === "after-index" ? (w(), pe(ut, {
1462
+ class: se(["tree-index", e.store.hasPinnedColumns ? "sticky-index" : ""]),
1463
+ onClick: m[0] || (m[0] = (p) => e.store.toggleRowExpand(e.rowIndex))
1464
+ }, N(r.value), 3)) : Y("", !0)
1465
+ ], !0) : Y("", !0),
1466
+ l.value && u.value === "after-index" ? (h(), pe(it, {
1467
1467
  key: 2,
1468
1468
  "row-index": e.rowIndex,
1469
1469
  store: e.store,
1470
1470
  config: s.value,
1471
1471
  position: u.value,
1472
1472
  onAction: i
1473
- }, null, 8, ["row-index", "store", "config", "position"])) : q("", !0),
1474
- he(c.$slots, "default", {}, void 0, !0),
1475
- l.value && u.value === "end" ? (w(), pe(ut, {
1473
+ }, null, 8, ["row-index", "store", "config", "position"])) : Y("", !0),
1474
+ he(d.$slots, "default", {}, void 0, !0),
1475
+ l.value && u.value === "end" ? (h(), pe(it, {
1476
1476
  key: 3,
1477
1477
  "row-index": e.rowIndex,
1478
1478
  store: e.store,
1479
1479
  config: s.value,
1480
1480
  position: u.value,
1481
1481
  onAction: i
1482
- }, null, 8, ["row-index", "store", "config", "position"])) : q("", !0)
1482
+ }, null, 8, ["row-index", "store", "config", "position"])) : Y("", !0)
1483
1483
  ], 8, Wo)), [
1484
1484
  [Ce, a.value]
1485
1485
  ]);
1486
1486
  }
1487
- }), hn = /* @__PURE__ */ Ve(Go, [["__scopeId", "data-v-2e038a9c"]]), It = /* @__PURE__ */ new WeakMap(), zo = {
1487
+ }), hn = /* @__PURE__ */ Ve(Go, [["__scopeId", "data-v-2e038a9c"]]), kt = /* @__PURE__ */ new WeakMap(), zo = {
1488
1488
  mounted(e, t) {
1489
1489
  const n = !t.modifiers.bubble;
1490
1490
  let o;
1491
- if (typeof t.value == "function") o = $t(e, t.value, { capture: n });
1491
+ if (typeof t.value == "function") o = Tt(e, t.value, { capture: n });
1492
1492
  else {
1493
1493
  const [a, r] = t.value;
1494
- o = $t(e, a, Object.assign({ capture: n }, r));
1494
+ o = Tt(e, a, Object.assign({ capture: n }, r));
1495
1495
  }
1496
- It.set(e, o);
1496
+ kt.set(e, o);
1497
1497
  },
1498
1498
  unmounted(e) {
1499
- const t = It.get(e);
1500
- t && typeof t == "function" ? t() : t?.stop(), It.delete(e);
1499
+ const t = kt.get(e);
1500
+ t && typeof t == "function" ? t() : t?.stop(), kt.delete(e);
1501
1501
  }
1502
1502
  }, qo = { mounted(e, t) {
1503
- typeof t.value == "function" ? ft(e, t.value) : ft(e, ...t.value);
1503
+ typeof t.value == "function" ? dt(e, t.value) : dt(e, ...t.value);
1504
1504
  } };
1505
1505
  function Yo() {
1506
1506
  let e = !1;
1507
- const t = ie(!1);
1507
+ const t = ue(!1);
1508
1508
  return (n, o) => {
1509
1509
  if (t.value = o.value, e) return;
1510
1510
  e = !0;
1511
1511
  const a = uo(n, o.value);
1512
- te(t, (r) => a.value = r);
1512
+ ne(t, (r) => a.value = r);
1513
1513
  };
1514
1514
  }
1515
1515
  Yo();
@@ -1524,14 +1524,14 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
1524
1524
  pointerEvents: "none",
1525
1525
  zIndex: 1
1526
1526
  }
1527
- }, Jo = ["d", "stroke-width", "onDblclick"], Qo = ["id", "d", "stroke", "stroke-width", "onDblclick"], Ko = 0.25, at = 16, el = /* @__PURE__ */ ne({
1527
+ }, Jo = ["d", "stroke-width", "onDblclick"], Qo = ["id", "d", "stroke", "stroke-width", "onDblclick"], Ko = 0.25, lt = 16, el = /* @__PURE__ */ oe({
1528
1528
  __name: "AGanttConnection",
1529
1529
  props: {
1530
1530
  store: {}
1531
1531
  },
1532
1532
  emits: ["connection:delete"],
1533
1533
  setup(e, { emit: t }) {
1534
- const n = t, o = $(() => e.store.connectionPaths.filter((s) => {
1534
+ const n = t, o = T(() => e.store.connectionPaths.filter((s) => {
1535
1535
  const l = e.store.ganttBars.find((i) => i.id === s.from.barId), u = e.store.ganttBars.find((i) => i.id === s.to.barId);
1536
1536
  return l && u;
1537
1537
  })), a = (s) => {
@@ -1541,22 +1541,22 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
1541
1541
  (O) => O.barId === s.to.barId && O.side === s.to.side
1542
1542
  );
1543
1543
  if (!l || !u) return "";
1544
- const i = l.position.x + at / 2, c = l.position.y + at / 2, p = u.position.x + at / 2, m = u.position.y + at / 2, I = Math.abs(p - i), b = Math.max(I * Ko, 50), x = i + (s.from.side === "left" ? -b : b), f = p + (s.to.side === "left" ? -b : b), h = { x: 0.5 * i + 0.5 * x, y: 0.5 * c + 0.5 * c }, g = { x: 0.5 * x + 0.5 * f, y: 0.5 * c + 0.5 * m }, C = { x: 0.5 * f + 0.5 * p, y: 0.5 * m + 0.5 * m }, T = { x: 0.5 * h.x + 0.5 * g.x, y: 0.5 * h.y + 0.5 * g.y }, R = { x: 0.5 * g.x + 0.5 * C.x, y: 0.5 * g.y + 0.5 * C.y }, S = { x: 0.5 * T.x + 0.5 * R.x, y: 0.5 * T.y + 0.5 * R.y };
1545
- return `M ${i} ${c} Q ${x} ${c}, ${S.x} ${S.y} Q ${f} ${m}, ${p} ${m}`;
1544
+ const i = l.position.x + lt / 2, d = l.position.y + lt / 2, m = u.position.x + lt / 2, p = u.position.y + lt / 2, I = Math.abs(m - i), y = Math.max(I * Ko, 50), k = i + (s.from.side === "left" ? -y : y), f = m + (s.to.side === "left" ? -y : y), g = { x: 0.5 * i + 0.5 * k, y: 0.5 * d + 0.5 * d }, x = { x: 0.5 * k + 0.5 * f, y: 0.5 * d + 0.5 * p }, C = { x: 0.5 * f + 0.5 * m, y: 0.5 * p + 0.5 * p }, $ = { x: 0.5 * g.x + 0.5 * x.x, y: 0.5 * g.y + 0.5 * x.y }, R = { x: 0.5 * x.x + 0.5 * C.x, y: 0.5 * x.y + 0.5 * C.y }, S = { x: 0.5 * $.x + 0.5 * R.x, y: 0.5 * $.y + 0.5 * R.y };
1545
+ return `M ${i} ${d} Q ${k} ${d}, ${S.x} ${S.y} Q ${f} ${p}, ${m} ${p}`;
1546
1546
  }, r = (s) => {
1547
1547
  e.store.deleteConnection(s.id) && n("connection:delete", s);
1548
1548
  };
1549
- return (s, l) => (w(), k("div", Xo, [
1550
- (w(), k("svg", jo, [
1551
- l[0] || (l[0] = y("defs", null, [
1552
- y("path", {
1549
+ return (s, l) => (h(), b("div", Xo, [
1550
+ (h(), b("svg", jo, [
1551
+ l[0] || (l[0] = w("defs", null, [
1552
+ w("path", {
1553
1553
  id: "arrowhead",
1554
1554
  d: "M 0 -7 L 20 0 L 0 7Z",
1555
1555
  stroke: "black",
1556
1556
  "stroke-width": "1",
1557
1557
  fill: "currentColor"
1558
1558
  }),
1559
- y("marker", {
1559
+ w("marker", {
1560
1560
  id: "arrowhead-marker",
1561
1561
  markerWidth: "10",
1562
1562
  markerHeight: "7",
@@ -1565,13 +1565,13 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
1565
1565
  orient: "auto",
1566
1566
  markerUnits: "strokeWidth"
1567
1567
  }, [
1568
- y("polygon", {
1568
+ w("polygon", {
1569
1569
  points: "0 0, 10 3.5, 0 7",
1570
1570
  fill: "currentColor"
1571
1571
  })
1572
1572
  ])
1573
1573
  ], -1)),
1574
- (w(!0), k(ue, null, me(o.value, (u) => (w(), k("path", {
1574
+ (h(!0), b(X, null, ve(o.value, (u) => (h(), b("path", {
1575
1575
  key: `${u.id}-hitbox`,
1576
1576
  d: a(u),
1577
1577
  stroke: "transparent",
@@ -1580,7 +1580,7 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
1580
1580
  class: "connection-hitbox",
1581
1581
  onDblclick: (i) => r(u)
1582
1582
  }, null, 40, Jo))), 128)),
1583
- (w(!0), k(ue, null, me(o.value, (u) => (w(), k("path", {
1583
+ (h(!0), b(X, null, ve(o.value, (u) => (h(), b("path", {
1584
1584
  id: u.id,
1585
1585
  key: u.id,
1586
1586
  d: a(u),
@@ -1600,7 +1600,7 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
1600
1600
  }, ll = ["value"], al = {
1601
1601
  key: 5,
1602
1602
  class: "date-range-filter"
1603
- }, sl = /* @__PURE__ */ ne({
1603
+ }, sl = /* @__PURE__ */ oe({
1604
1604
  __name: "ATableColumnFilter",
1605
1605
  props: {
1606
1606
  column: {},
@@ -1614,14 +1614,14 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
1614
1614
  }), o = (u) => {
1615
1615
  if (u.filterOptions) return u.filterOptions;
1616
1616
  const i = /* @__PURE__ */ new Set();
1617
- return e.store.rows.forEach((c) => {
1618
- const p = c[u.name];
1619
- p != null && p !== "" && i.add(p);
1620
- }), Array.from(i).map((c) => ({
1621
- value: c,
1622
- label: String(c)
1617
+ return e.store.rows.forEach((d) => {
1618
+ const m = d[u.name];
1619
+ m != null && m !== "" && i.add(m);
1620
+ }), Array.from(i).map((d) => ({
1621
+ value: d,
1622
+ label: String(d)
1623
1623
  }));
1624
- }, a = $(() => !!(t.value || n.startValue || n.endValue)), r = (u) => {
1624
+ }, a = T(() => !!(t.value || n.startValue || n.endValue)), r = (u) => {
1625
1625
  !u && e.column.filterType !== "checkbox" ? (e.store.clearFilter(e.colIndex), t.value = "") : (t.value = u, e.store.setFilter(e.colIndex, { value: u }));
1626
1626
  }, s = (u, i) => {
1627
1627
  u === "start" ? n.startValue = i : n.endValue = i, !n.startValue && !n.endValue ? e.store.clearFilter(e.colIndex) : e.store.setFilter(e.colIndex, {
@@ -1632,86 +1632,86 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
1632
1632
  }, l = () => {
1633
1633
  t.value = "", n.startValue = "", n.endValue = "", e.store.clearFilter(e.colIndex);
1634
1634
  };
1635
- return (u, i) => (w(), k("div", nl, [
1636
- (e.column.filterType || "text") === "text" ? J((w(), k("input", {
1635
+ return (u, i) => (h(), b("div", nl, [
1636
+ (e.column.filterType || "text") === "text" ? K((h(), b("input", {
1637
1637
  key: 0,
1638
- "onUpdate:modelValue": i[0] || (i[0] = (c) => t.value = c),
1638
+ "onUpdate:modelValue": i[0] || (i[0] = (d) => t.value = d),
1639
1639
  type: "text",
1640
1640
  class: "filter-input",
1641
- onInput: i[1] || (i[1] = (c) => r(t.value))
1641
+ onInput: i[1] || (i[1] = (d) => r(t.value))
1642
1642
  }, null, 544)), [
1643
1643
  [we, t.value]
1644
- ]) : e.column.filterType === "number" ? J((w(), k("input", {
1644
+ ]) : e.column.filterType === "number" ? K((h(), b("input", {
1645
1645
  key: 1,
1646
- "onUpdate:modelValue": i[2] || (i[2] = (c) => t.value = c),
1646
+ "onUpdate:modelValue": i[2] || (i[2] = (d) => t.value = d),
1647
1647
  type: "number",
1648
1648
  class: "filter-input",
1649
- onInput: i[3] || (i[3] = (c) => r(t.value))
1649
+ onInput: i[3] || (i[3] = (d) => r(t.value))
1650
1650
  }, null, 544)), [
1651
1651
  [we, t.value]
1652
- ]) : e.column.filterType === "checkbox" ? (w(), k("label", ol, [
1653
- J(y("input", {
1654
- "onUpdate:modelValue": i[4] || (i[4] = (c) => t.value = c),
1652
+ ]) : e.column.filterType === "checkbox" ? (h(), b("label", ol, [
1653
+ K(w("input", {
1654
+ "onUpdate:modelValue": i[4] || (i[4] = (d) => t.value = d),
1655
1655
  type: "checkbox",
1656
1656
  class: "filter-checkbox",
1657
- onChange: i[5] || (i[5] = (c) => r(t.value))
1657
+ onChange: i[5] || (i[5] = (d) => r(t.value))
1658
1658
  }, null, 544), [
1659
1659
  [un, t.value]
1660
1660
  ]),
1661
- y("span", null, K(e.column.label), 1)
1662
- ])) : e.column.filterType === "select" ? J((w(), k("select", {
1661
+ w("span", null, N(e.column.label), 1)
1662
+ ])) : e.column.filterType === "select" ? K((h(), b("select", {
1663
1663
  key: 3,
1664
- "onUpdate:modelValue": i[6] || (i[6] = (c) => t.value = c),
1664
+ "onUpdate:modelValue": i[6] || (i[6] = (d) => t.value = d),
1665
1665
  class: "filter-select",
1666
- onChange: i[7] || (i[7] = (c) => r(t.value))
1666
+ onChange: i[7] || (i[7] = (d) => r(t.value))
1667
1667
  }, [
1668
- i[15] || (i[15] = y("option", { value: "" }, "All", -1)),
1669
- (w(!0), k(ue, null, me(o(e.column), (c) => (w(), k("option", {
1670
- key: c.value || c,
1671
- value: c.value || c
1672
- }, K(c.label || c), 9, ll))), 128))
1668
+ i[15] || (i[15] = w("option", { value: "" }, "All", -1)),
1669
+ (h(!0), b(X, null, ve(o(e.column), (d) => (h(), b("option", {
1670
+ key: d.value || d,
1671
+ value: d.value || d
1672
+ }, N(d.label || d), 9, ll))), 128))
1673
1673
  ], 544)), [
1674
1674
  [Cn, t.value]
1675
- ]) : e.column.filterType === "date" ? J((w(), k("input", {
1675
+ ]) : e.column.filterType === "date" ? K((h(), b("input", {
1676
1676
  key: 4,
1677
- "onUpdate:modelValue": i[8] || (i[8] = (c) => t.value = c),
1677
+ "onUpdate:modelValue": i[8] || (i[8] = (d) => t.value = d),
1678
1678
  type: "date",
1679
1679
  class: "filter-input",
1680
- onChange: i[9] || (i[9] = (c) => r(t.value))
1680
+ onChange: i[9] || (i[9] = (d) => r(t.value))
1681
1681
  }, null, 544)), [
1682
1682
  [we, t.value]
1683
- ]) : e.column.filterType === "dateRange" ? (w(), k("div", al, [
1684
- J(y("input", {
1685
- "onUpdate:modelValue": i[10] || (i[10] = (c) => n.startValue = c),
1683
+ ]) : e.column.filterType === "dateRange" ? (h(), b("div", al, [
1684
+ K(w("input", {
1685
+ "onUpdate:modelValue": i[10] || (i[10] = (d) => n.startValue = d),
1686
1686
  type: "date",
1687
1687
  class: "filter-input",
1688
- onChange: i[11] || (i[11] = (c) => s("start", n.startValue))
1688
+ onChange: i[11] || (i[11] = (d) => s("start", n.startValue))
1689
1689
  }, null, 544), [
1690
1690
  [we, n.startValue]
1691
1691
  ]),
1692
- i[16] || (i[16] = y("span", { class: "date-separator" }, "-", -1)),
1693
- J(y("input", {
1694
- "onUpdate:modelValue": i[12] || (i[12] = (c) => n.endValue = c),
1692
+ i[16] || (i[16] = w("span", { class: "date-separator" }, "-", -1)),
1693
+ K(w("input", {
1694
+ "onUpdate:modelValue": i[12] || (i[12] = (d) => n.endValue = d),
1695
1695
  type: "date",
1696
1696
  class: "filter-input",
1697
- onChange: i[13] || (i[13] = (c) => s("end", n.endValue))
1697
+ onChange: i[13] || (i[13] = (d) => s("end", n.endValue))
1698
1698
  }, null, 544), [
1699
1699
  [we, n.endValue]
1700
1700
  ])
1701
- ])) : e.column.filterType === "component" && e.column.filterComponent ? (w(), pe(Ue(e.column.filterComponent), {
1701
+ ])) : e.column.filterType === "component" && e.column.filterComponent ? (h(), pe(Ue(e.column.filterComponent), {
1702
1702
  key: 6,
1703
1703
  value: t.value,
1704
1704
  column: e.column,
1705
1705
  colIndex: e.colIndex,
1706
1706
  store: e.store,
1707
- "onUpdate:value": i[14] || (i[14] = (c) => r(c))
1708
- }, null, 40, ["value", "column", "colIndex", "store"])) : q("", !0),
1709
- a.value ? (w(), k("button", {
1707
+ "onUpdate:value": i[14] || (i[14] = (d) => r(d))
1708
+ }, null, 40, ["value", "column", "colIndex", "store"])) : Y("", !0),
1709
+ a.value ? (h(), b("button", {
1710
1710
  key: 7,
1711
1711
  onClick: l,
1712
1712
  class: "clear-btn",
1713
1713
  title: "Clear"
1714
- }, "×")) : q("", !0)
1714
+ }, "×")) : Y("", !0)
1715
1715
  ]));
1716
1716
  }
1717
1717
  }), rl = /* @__PURE__ */ Ve(sl, [["__scopeId", "data-v-8487462d"]]), il = { key: 0 }, ul = {
@@ -1726,95 +1726,95 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
1726
1726
  }, vl = {
1727
1727
  key: 0,
1728
1728
  class: "atable-filters-row"
1729
- }, pl = {
1729
+ }, ml = {
1730
1730
  key: 2,
1731
1731
  class: "row-actions-header"
1732
- }, ml = {
1732
+ }, pl = {
1733
1733
  key: 3,
1734
1734
  class: "row-actions-header"
1735
- }, gn = /* @__PURE__ */ ne({
1735
+ }, gn = /* @__PURE__ */ oe({
1736
1736
  __name: "ATableHeader",
1737
1737
  props: {
1738
1738
  columns: {},
1739
1739
  store: {}
1740
1740
  },
1741
1741
  setup(e) {
1742
- const t = e, n = $(() => t.columns.filter((l) => l.filterable)), o = $(() => t.store.config.value?.rowActions?.enabled ?? !1), a = $(() => t.store.config.value?.rowActions?.position ?? "before-index"), r = (l) => t.store.sortByColumn(l), s = (l) => {
1742
+ const t = e, n = T(() => t.columns.filter((l) => l.filterable)), o = T(() => t.store.config.value?.rowActions?.enabled ?? !1), a = T(() => t.store.config.value?.rowActions?.position ?? "before-index"), r = (l) => t.store.sortByColumn(l), s = (l) => {
1743
1743
  for (const u of l) {
1744
1744
  if (u.borderBoxSize.length === 0) continue;
1745
- const i = u.borderBoxSize[0].inlineSize, c = Number(u.target.dataset.colindex), p = t.store.columns[c]?.width;
1746
- typeof p == "number" && p !== i && t.store.resizeColumn(c, i);
1745
+ const i = u.borderBoxSize[0].inlineSize, d = Number(u.target.dataset.colindex), m = t.store.columns[d]?.width;
1746
+ typeof m == "number" && m !== i && t.store.resizeColumn(d, i);
1747
1747
  }
1748
1748
  };
1749
- return (l, u) => t.columns.length ? (w(), k("thead", il, [
1750
- y("tr", ul, [
1751
- o.value && a.value === "before-index" ? (w(), k("th", {
1749
+ return (l, u) => t.columns.length ? (h(), b("thead", il, [
1750
+ w("tr", ul, [
1751
+ o.value && a.value === "before-index" ? (h(), b("th", {
1752
1752
  key: 0,
1753
- class: ae(["row-actions-header", { "sticky-column": a.value === "before-index" }])
1754
- }, null, 2)) : q("", !0),
1755
- t.store.zeroColumn ? (w(), k("th", {
1753
+ class: se(["row-actions-header", { "sticky-column": a.value === "before-index" }])
1754
+ }, null, 2)) : Y("", !0),
1755
+ t.store.zeroColumn ? (h(), b("th", {
1756
1756
  key: 1,
1757
1757
  id: "header-index",
1758
- class: ae([[
1758
+ class: se([[
1759
1759
  t.store.hasPinnedColumns ? "sticky-index" : "",
1760
1760
  t.store.isTreeView ? "tree-index" : "",
1761
1761
  t.store.config.view === "list-expansion" ? "list-expansion-index" : ""
1762
1762
  ], "list-index"])
1763
- }, null, 2)) : q("", !0),
1764
- o.value && a.value === "after-index" ? (w(), k("th", cl)) : q("", !0),
1765
- (w(!0), k(ue, null, me(t.columns, (i, c) => J((w(), k("th", {
1763
+ }, null, 2)) : Y("", !0),
1764
+ o.value && a.value === "after-index" ? (h(), b("th", cl)) : Y("", !0),
1765
+ (h(!0), b(X, null, ve(t.columns, (i, d) => K((h(), b("th", {
1766
1766
  key: i.name,
1767
- "data-colindex": c,
1767
+ "data-colindex": d,
1768
1768
  tabindex: "-1",
1769
- style: xe(t.store.getHeaderCellStyle(i)),
1770
- class: ae(`${i.pinned ? "sticky-column" : ""} ${i.sortable === !1 ? "" : "cursor-pointer"}`),
1771
- onClick: (p) => i.sortable !== !1 ? r(c) : void 0
1769
+ style: be(t.store.getHeaderCellStyle(i)),
1770
+ class: se(`${i.pinned ? "sticky-column" : ""} ${i.sortable === !1 ? "" : "cursor-pointer"}`),
1771
+ onClick: (m) => i.sortable !== !1 ? r(d) : void 0
1772
1772
  }, [
1773
1773
  he(l.$slots, "default", {}, () => [
1774
- Dt(K(i.label || String.fromCharCode(c + 97).toUpperCase()), 1)
1774
+ Dt(N(i.label || String.fromCharCode(d + 97).toUpperCase()), 1)
1775
1775
  ])
1776
1776
  ], 14, dl)), [
1777
1777
  [V(qo), s]
1778
1778
  ])), 128)),
1779
- o.value && a.value === "end" ? (w(), k("th", fl)) : q("", !0)
1779
+ o.value && a.value === "end" ? (h(), b("th", fl)) : Y("", !0)
1780
1780
  ]),
1781
- n.value.length > 0 ? (w(), k("tr", vl, [
1782
- o.value && a.value === "before-index" ? (w(), k("th", {
1781
+ n.value.length > 0 ? (h(), b("tr", vl, [
1782
+ o.value && a.value === "before-index" ? (h(), b("th", {
1783
1783
  key: 0,
1784
- class: ae(["row-actions-header", { "sticky-column": a.value === "before-index" }])
1785
- }, null, 2)) : q("", !0),
1786
- t.store.zeroColumn ? (w(), k("th", {
1784
+ class: se(["row-actions-header", { "sticky-column": a.value === "before-index" }])
1785
+ }, null, 2)) : Y("", !0),
1786
+ t.store.zeroColumn ? (h(), b("th", {
1787
1787
  key: 1,
1788
- class: ae([[
1788
+ class: se([[
1789
1789
  t.store.hasPinnedColumns ? "sticky-index" : "",
1790
1790
  t.store.isTreeView ? "tree-index" : "",
1791
1791
  t.store.config.view === "list-expansion" ? "list-expansion-index" : ""
1792
1792
  ], "list-index"])
1793
- }, null, 2)) : q("", !0),
1794
- o.value && a.value === "after-index" ? (w(), k("th", pl)) : q("", !0),
1795
- (w(!0), k(ue, null, me(t.columns, (i, c) => (w(), k("th", {
1793
+ }, null, 2)) : Y("", !0),
1794
+ o.value && a.value === "after-index" ? (h(), b("th", ml)) : Y("", !0),
1795
+ (h(!0), b(X, null, ve(t.columns, (i, d) => (h(), b("th", {
1796
1796
  key: `filter-${i.name}`,
1797
- class: ae(`${i.pinned ? "sticky-column" : ""}`),
1798
- style: xe(t.store.getHeaderCellStyle(i))
1797
+ class: se(`${i.pinned ? "sticky-column" : ""}`),
1798
+ style: be(t.store.getHeaderCellStyle(i))
1799
1799
  }, [
1800
- i.filterable ? (w(), pe(rl, {
1800
+ i.filterable ? (h(), pe(rl, {
1801
1801
  key: 0,
1802
1802
  column: i,
1803
- "col-index": c,
1803
+ "col-index": d,
1804
1804
  store: t.store
1805
- }, null, 8, ["column", "col-index", "store"])) : q("", !0)
1805
+ }, null, 8, ["column", "col-index", "store"])) : Y("", !0)
1806
1806
  ], 6))), 128)),
1807
- o.value && a.value === "end" ? (w(), k("th", ml)) : q("", !0)
1808
- ])) : q("", !0)
1809
- ])) : q("", !0);
1807
+ o.value && a.value === "end" ? (h(), b("th", pl)) : Y("", !0)
1808
+ ])) : Y("", !0)
1809
+ ])) : Y("", !0);
1810
1810
  }
1811
- }), wn = /* @__PURE__ */ ne({
1811
+ }), wn = /* @__PURE__ */ oe({
1812
1812
  __name: "ATableModal",
1813
1813
  props: {
1814
1814
  store: {}
1815
1815
  },
1816
1816
  setup(e) {
1817
- const t = fe("amodal"), { width: n, height: o } = Pe(t), a = $(() => {
1817
+ const t = fe("amodal"), { width: n, height: o } = _e(t), a = T(() => {
1818
1818
  if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return;
1819
1819
  const r = e.store.modal.cell?.closest("table");
1820
1820
  if (!r) return {};
@@ -1822,17 +1822,17 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
1822
1822
  let u = e.store.modal.cell?.offsetTop || 0;
1823
1823
  const i = r.querySelector("thead")?.offsetHeight || 0;
1824
1824
  u += i, u = u + o.value < s ? u : u - (o.value + e.store.modal.height);
1825
- let c = e.store.modal.cell?.offsetLeft || 0;
1826
- return c = c + n.value <= l ? c : c - (n.value - e.store.modal.width), {
1827
- left: `${c}px`,
1825
+ let d = e.store.modal.cell?.offsetLeft || 0;
1826
+ return d = d + n.value <= l ? d : d - (n.value - e.store.modal.width), {
1827
+ left: `${d}px`,
1828
1828
  top: `${u}px`
1829
1829
  };
1830
1830
  });
1831
- return (r, s) => (w(), k("div", {
1831
+ return (r, s) => (h(), b("div", {
1832
1832
  ref: "amodal",
1833
1833
  class: "amodal",
1834
1834
  tabindex: "-1",
1835
- style: xe(a.value),
1835
+ style: be(a.value),
1836
1836
  onClick: s[0] || (s[0] = Ie(() => {
1837
1837
  }, ["stop"])),
1838
1838
  onInput: s[1] || (s[1] = Ie(() => {
@@ -1845,25 +1845,25 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
1845
1845
  const t = e.id || fo();
1846
1846
  return Dn(`table-${t}`, () => {
1847
1847
  const n = () => {
1848
- const d = [Object.assign({}, { rowModified: !1 })], v = /* @__PURE__ */ new Set();
1848
+ const c = [Object.assign({}, { rowModified: !1 })], v = /* @__PURE__ */ new Set();
1849
1849
  for (let A = 0; A < a.value.length; A++) {
1850
1850
  const H = a.value[A];
1851
1851
  H.parent !== null && H.parent !== void 0 && v.add(H.parent);
1852
1852
  }
1853
- const M = (A) => a.value[A]?.gantt !== void 0, P = (A) => {
1853
+ const M = (A) => a.value[A]?.gantt !== void 0, _ = (A) => {
1854
1854
  for (let H = 0; H < a.value.length; H++)
1855
- if (a.value[H].parent === A && (M(H) || P(H)))
1855
+ if (a.value[H].parent === A && (M(H) || _(H)))
1856
1856
  return !0;
1857
1857
  return !1;
1858
1858
  }, Z = (A) => {
1859
- const H = r.value, N = H.view === "tree" || H.view === "tree-gantt" ? H.defaultTreeExpansion : void 0;
1860
- if (!N) return !0;
1861
- switch (N) {
1859
+ const H = r.value, U = H.view === "tree" || H.view === "tree-gantt" ? H.defaultTreeExpansion : void 0;
1860
+ if (!U) return !0;
1861
+ switch (U) {
1862
1862
  case "root":
1863
1863
  return !1;
1864
1864
  // Only root nodes are visible, all children start collapsed
1865
1865
  case "branch":
1866
- return P(A);
1866
+ return _(A);
1867
1867
  case "leaf":
1868
1868
  return !0;
1869
1869
  // All nodes should be expanded
@@ -1872,168 +1872,168 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
1872
1872
  }
1873
1873
  };
1874
1874
  for (let A = 0; A < a.value.length; A++) {
1875
- const H = a.value[A], N = H.parent === null || H.parent === void 0, le = v.has(A);
1876
- d[A] = {
1875
+ const H = a.value[A], U = H.parent === null || H.parent === void 0, ae = v.has(A);
1876
+ c[A] = {
1877
1877
  childrenOpen: Z(A),
1878
1878
  expanded: !1,
1879
1879
  indent: H.indent || 0,
1880
- isParent: le,
1881
- isRoot: N,
1880
+ isParent: ae,
1881
+ isRoot: U,
1882
1882
  rowModified: !1,
1883
- open: N,
1883
+ open: U,
1884
1884
  // This will be recalculated later for non-root nodes
1885
1885
  parent: H.parent
1886
1886
  };
1887
1887
  }
1888
- return d;
1889
- }, o = L(e.columns), a = L(e.rows), r = L(e.config || {}), s = L({}), l = L({}), u = $(() => {
1890
- const d = {};
1888
+ return c;
1889
+ }, o = L(e.columns), a = L(e.rows), r = L(e.config || {}), s = L({}), l = L({}), u = T(() => {
1890
+ const c = {};
1891
1891
  for (const [v, M] of o.value.entries())
1892
- for (const [P, Z] of a.value.entries())
1893
- d[`${v}:${P}`] = Z[M.name];
1894
- return d;
1895
- }), i = $({
1892
+ for (const [_, Z] of a.value.entries())
1893
+ c[`${v}:${_}`] = Z[M.name];
1894
+ return c;
1895
+ }), i = T({
1896
1896
  get: () => {
1897
- const d = n();
1898
- for (let v = 0; v < d.length; v++)
1899
- s.value[v] && (d[v].rowModified = s.value[v]), l.value[v] && (l.value[v].childrenOpen !== void 0 && (d[v].childrenOpen = l.value[v].childrenOpen), l.value[v].expanded !== void 0 && (d[v].expanded = l.value[v].expanded));
1897
+ const c = n();
1898
+ for (let v = 0; v < c.length; v++)
1899
+ s.value[v] && (c[v].rowModified = s.value[v]), l.value[v] && (l.value[v].childrenOpen !== void 0 && (c[v].childrenOpen = l.value[v].childrenOpen), l.value[v].expanded !== void 0 && (c[v].expanded = l.value[v].expanded));
1900
1900
  if (C.value) {
1901
- const v = (M, P) => {
1902
- const Z = P[M];
1901
+ const v = (M, _) => {
1902
+ const Z = _[M];
1903
1903
  if (Z.isRoot || Z.parent === null || Z.parent === void 0)
1904
1904
  return !0;
1905
1905
  const A = Z.parent;
1906
- return A < 0 || A >= P.length ? !1 : (P[A].childrenOpen || !1) && v(A, P);
1906
+ return A < 0 || A >= _.length ? !1 : (_[A].childrenOpen || !1) && v(A, _);
1907
1907
  };
1908
- for (let M = 0; M < d.length; M++)
1909
- d[M].isRoot || (d[M].open = v(M, d));
1908
+ for (let M = 0; M < c.length; M++)
1909
+ c[M].isRoot || (c[M].open = v(M, c));
1910
1910
  }
1911
- return d;
1911
+ return c;
1912
1912
  },
1913
- set: (d) => {
1914
- JSON.stringify(d) !== JSON.stringify(i.value) && (i.value = d);
1913
+ set: (c) => {
1914
+ JSON.stringify(c) !== JSON.stringify(i.value) && (i.value = c);
1915
1915
  }
1916
- }), c = L(e.modal || { visible: !1 }), p = L({}), m = L([]), I = L([]), b = L([]), x = L({
1916
+ }), d = L(e.modal || { visible: !1 }), m = L({}), p = L([]), I = L([]), y = L([]), k = L({
1917
1917
  column: null,
1918
1918
  direction: null
1919
- }), f = L({}), h = $(() => o.value.some((d) => d.pinned)), g = $(() => r.value.view === "gantt" || r.value.view === "tree-gantt"), C = $(() => r.value.view === "tree" || r.value.view === "tree-gantt"), T = $(() => {
1920
- const d = r.value;
1921
- return d.view === "gantt" || d.view === "tree-gantt" ? d.dependencyGraph !== !1 : !0;
1922
- }), R = $(() => `${Math.ceil(a.value.length / 100 + 1)}ch`), S = $(
1919
+ }), f = L({}), g = T(() => o.value.some((c) => c.pinned)), x = T(() => r.value.view === "gantt" || r.value.view === "tree-gantt"), C = T(() => r.value.view === "tree" || r.value.view === "tree-gantt"), $ = T(() => {
1920
+ const c = r.value;
1921
+ return c.view === "gantt" || c.view === "tree-gantt" ? c.dependencyGraph !== !1 : !0;
1922
+ }), R = T(() => `${Math.ceil(a.value.length / 100 + 1)}ch`), S = T(
1923
1923
  () => r.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(r.value.view) : !1
1924
- ), O = $(() => {
1925
- let d = a.value.map((v, M) => ({
1924
+ ), O = T(() => {
1925
+ let c = a.value.map((v, M) => ({
1926
1926
  ...v,
1927
1927
  originalIndex: M
1928
1928
  }));
1929
1929
  if (Object.entries(f.value).forEach(([v, M]) => {
1930
- const P = parseInt(v), Z = o.value[P];
1931
- !Z || !(M.value || M.startValue || M.endValue || Z.filterType === "checkbox" && M.value !== void 0) || (d = d.filter((A) => {
1930
+ const _ = parseInt(v), Z = o.value[_];
1931
+ !Z || !(M.value || M.startValue || M.endValue || Z.filterType === "checkbox" && M.value !== void 0) || (c = c.filter((A) => {
1932
1932
  const H = A[Z.name];
1933
- return oe(H, M, Z);
1933
+ return le(H, M, Z);
1934
1934
  }));
1935
- }), x.value.column !== null && x.value.direction) {
1936
- const v = o.value[x.value.column], M = x.value.direction;
1937
- d.sort((P, Z) => {
1938
- let A = P[v.name], H = Z[v.name];
1935
+ }), k.value.column !== null && k.value.direction) {
1936
+ const v = o.value[k.value.column], M = k.value.direction;
1937
+ c.sort((_, Z) => {
1938
+ let A = _[v.name], H = Z[v.name];
1939
1939
  A == null && (A = ""), H == null && (H = "");
1940
- const N = Number(A), le = Number(H);
1941
- if (!isNaN(N) && !isNaN(le) && A !== "" && H !== "")
1942
- return M === "asc" ? N - le : le - N;
1940
+ const U = Number(A), ae = Number(H);
1941
+ if (!isNaN(U) && !isNaN(ae) && A !== "" && H !== "")
1942
+ return M === "asc" ? U - ae : ae - U;
1943
1943
  {
1944
- const nt = String(A).toLowerCase(), Ut = String(H).toLowerCase();
1945
- return M === "asc" ? nt.localeCompare(Ut) : Ut.localeCompare(nt);
1944
+ const tt = String(A).toLowerCase(), Ut = String(H).toLowerCase();
1945
+ return M === "asc" ? tt.localeCompare(Ut) : Ut.localeCompare(tt);
1946
1946
  }
1947
1947
  });
1948
1948
  }
1949
- return d;
1950
- }), U = (d, v) => u.value[`${d}:${v}`], ve = (d, v, M) => {
1951
- const P = `${d}:${v}`, Z = o.value[d];
1952
- u.value[P] !== M && (s.value[v] = !0), u.value[P] = M, a.value[v] = {
1949
+ return c;
1950
+ }), W = (c, v) => u.value[`${c}:${v}`], me = (c, v, M) => {
1951
+ const _ = `${c}:${v}`, Z = o.value[c];
1952
+ u.value[_] !== M && (s.value[v] = !0), u.value[_] = M, a.value[v] = {
1953
1953
  ...a.value[v],
1954
1954
  [Z.name]: M
1955
1955
  };
1956
- }, Y = (d) => {
1957
- a.value = d;
1958
- }, X = (d, v, M) => {
1959
- const P = `${d}:${v}`;
1960
- u.value[P] !== M && (s.value[v] = !0, p.value[P] = M);
1961
- }, ge = (d) => {
1962
- const v = o.value.indexOf(d) === o.value.length - 1, M = r.value.fullWidth ? d.resizable && !v : d.resizable;
1956
+ }, j = (c) => {
1957
+ a.value = c;
1958
+ }, J = (c, v, M) => {
1959
+ const _ = `${c}:${v}`;
1960
+ u.value[_] !== M && (s.value[v] = !0, m.value[_] = M);
1961
+ }, ge = (c) => {
1962
+ const v = o.value.indexOf(c) === o.value.length - 1, M = r.value.fullWidth ? c.resizable && !v : c.resizable;
1963
1963
  return {
1964
- width: d.width || "40ch",
1965
- textAlign: d.align || "center",
1964
+ width: c.width || "40ch",
1965
+ textAlign: c.align || "center",
1966
1966
  ...M && {
1967
1967
  resize: "horizontal",
1968
1968
  overflow: "hidden",
1969
1969
  whiteSpace: "nowrap"
1970
1970
  }
1971
1971
  };
1972
- }, de = (d, v) => {
1973
- if (d < 0 || d >= o.value.length) return;
1972
+ }, de = (c, v) => {
1973
+ if (c < 0 || c >= o.value.length) return;
1974
1974
  const M = Math.max(v, 40);
1975
- o.value[d] = {
1976
- ...o.value[d],
1975
+ o.value[c] = {
1976
+ ...o.value[c],
1977
1977
  width: `${M}px`
1978
1978
  };
1979
- }, Oe = (d) => {
1980
- const v = a.value[d];
1981
- return g.value && v.gantt !== void 0;
1982
- }, Re = (d) => !C.value || i.value[d].isRoot || i.value[d].open, Ye = (d) => !C.value && r.value.view !== "list-expansion" ? "" : C.value && (i.value[d].isRoot || i.value[d].isParent) ? i.value[d].childrenOpen ? "▼" : "►" : r.value.view === "list-expansion" ? i.value[d].expanded ? "▼" : "►" : "", Xe = (d) => {
1979
+ }, Oe = (c) => {
1980
+ const v = a.value[c];
1981
+ return x.value && v.gantt !== void 0;
1982
+ }, Re = (c) => !C.value || i.value[c].isRoot || i.value[c].open, Ye = (c) => !C.value && r.value.view !== "list-expansion" ? "" : C.value && (i.value[c].isRoot || i.value[c].isParent) ? i.value[c].childrenOpen ? "▼" : "►" : r.value.view === "list-expansion" ? i.value[c].expanded ? "▼" : "►" : "", Xe = (c) => {
1983
1983
  if (C.value) {
1984
- const v = l.value[d] || {}, M = !(v.childrenOpen ?? i.value[d].childrenOpen);
1985
- l.value[d] = {
1984
+ const v = l.value[c] || {}, M = !(v.childrenOpen ?? i.value[c].childrenOpen);
1985
+ l.value[c] = {
1986
1986
  ...v,
1987
1987
  childrenOpen: M
1988
- }, M || Be(d);
1988
+ }, M || Be(c);
1989
1989
  } else if (r.value.view === "list-expansion") {
1990
- const v = l.value[d] || {}, M = v.expanded ?? i.value[d].expanded;
1991
- l.value[d] = {
1990
+ const v = l.value[c] || {}, M = v.expanded ?? i.value[c].expanded;
1991
+ l.value[c] = {
1992
1992
  ...v,
1993
1993
  expanded: !M
1994
1994
  };
1995
1995
  }
1996
- }, Be = (d) => {
1996
+ }, Be = (c) => {
1997
1997
  for (let v = 0; v < a.value.length; v++)
1998
- if (i.value[v].parent === d) {
1998
+ if (i.value[v].parent === c) {
1999
1999
  const M = l.value[v] || {};
2000
2000
  l.value[v] = {
2001
2001
  ...M,
2002
2002
  childrenOpen: !1
2003
2003
  }, Be(v);
2004
2004
  }
2005
- }, je = (d, v) => {
2006
- const M = U(d, v);
2007
- return Fe(d, v, M);
2008
- }, Fe = (d, v, M) => {
2009
- const P = o.value[d], Z = a.value[v], A = P.format;
2010
- return A ? typeof A == "function" ? A(M, { table: u.value, row: Z, column: P }) : typeof A == "string" ? Function(`"use strict";return (${A})`)()(M, { table: u.value, row: Z, column: P }) : M : M;
2011
- }, D = (d) => {
2012
- d.target instanceof Node && c.value.parent?.contains(d.target) || c.value.visible && (c.value.visible = !1);
2013
- }, F = (d, v) => v && d === 0 && v > 0 ? `${v}ch` : "inherit", W = (d) => {
2014
- const v = a.value[d.rowIndex]?.gantt;
2015
- v && (d.type === "resize" ? d.edge === "start" ? (v.startIndex = d.newStart, v.endIndex = d.end, v.colspan = v.endIndex - v.startIndex) : d.edge === "end" && (v.startIndex = d.start, v.endIndex = d.newEnd, v.colspan = v.endIndex - v.startIndex) : d.type === "bar" && (v.startIndex = d.newStart, v.endIndex = d.newEnd, v.colspan = v.endIndex - v.startIndex));
2016
- }, j = (d) => {
2017
- const v = m.value.findIndex((M) => M.id === d.id);
2018
- v >= 0 ? m.value[v] = d : m.value.push(d);
2019
- }, z = (d) => {
2020
- const v = m.value.findIndex((M) => M.id === d);
2021
- v >= 0 && m.value.splice(v, 1);
2022
- }, se = (d) => {
2023
- const v = I.value.findIndex((M) => M.id === d.id);
2024
- v >= 0 ? I.value[v] = d : I.value.push(d);
2025
- }, be = (d) => {
2026
- const v = I.value.findIndex((M) => M.id === d);
2005
+ }, je = (c, v) => {
2006
+ const M = W(c, v);
2007
+ return Fe(c, v, M);
2008
+ }, Fe = (c, v, M) => {
2009
+ const _ = o.value[c], Z = a.value[v], A = _.format;
2010
+ return A ? typeof A == "function" ? A(M, { table: u.value, row: Z, column: _ }) : typeof A == "string" ? Function(`"use strict";return (${A})`)()(M, { table: u.value, row: Z, column: _ }) : M : M;
2011
+ }, D = (c) => {
2012
+ c.target instanceof Node && d.value.parent?.contains(c.target) || d.value.visible && (d.value.visible = !1);
2013
+ }, F = (c, v) => v && c === 0 && v > 0 ? `${v}ch` : "inherit", G = (c) => {
2014
+ const v = a.value[c.rowIndex]?.gantt;
2015
+ v && (c.type === "resize" ? c.edge === "start" ? (v.startIndex = c.newStart, v.endIndex = c.end, v.colspan = v.endIndex - v.startIndex) : c.edge === "end" && (v.startIndex = c.start, v.endIndex = c.newEnd, v.colspan = v.endIndex - v.startIndex) : c.type === "bar" && (v.startIndex = c.newStart, v.endIndex = c.newEnd, v.colspan = v.endIndex - v.startIndex));
2016
+ }, Q = (c) => {
2017
+ const v = p.value.findIndex((M) => M.id === c.id);
2018
+ v >= 0 ? p.value[v] = c : p.value.push(c);
2019
+ }, q = (c) => {
2020
+ const v = p.value.findIndex((M) => M.id === c);
2021
+ v >= 0 && p.value.splice(v, 1);
2022
+ }, re = (c) => {
2023
+ const v = I.value.findIndex((M) => M.id === c.id);
2024
+ v >= 0 ? I.value[v] = c : I.value.push(c);
2025
+ }, ke = (c) => {
2026
+ const v = I.value.findIndex((M) => M.id === c);
2027
2027
  v >= 0 && I.value.splice(v, 1);
2028
- }, Le = (d, v, M) => {
2029
- const P = I.value.find((H) => H.id === d), Z = I.value.find((H) => H.id === v);
2030
- if (!P || !Z)
2028
+ }, Le = (c, v, M) => {
2029
+ const _ = I.value.find((H) => H.id === c), Z = I.value.find((H) => H.id === v);
2030
+ if (!_ || !Z)
2031
2031
  return console.warn("Cannot create connection: handle not found"), null;
2032
2032
  const A = {
2033
- id: `connection-${d}-${v}`,
2033
+ id: `connection-${c}-${v}`,
2034
2034
  from: {
2035
- barId: P.barId,
2036
- side: P.side
2035
+ barId: _.barId,
2036
+ side: _.side
2037
2037
  },
2038
2038
  to: {
2039
2039
  barId: Z.barId,
@@ -2042,172 +2042,172 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
2042
2042
  style: M?.style,
2043
2043
  label: M?.label
2044
2044
  };
2045
- return b.value.push(A), A;
2046
- }, _ = (d) => {
2047
- const v = b.value.findIndex((M) => M.id === d);
2048
- return v >= 0 ? (b.value.splice(v, 1), !0) : !1;
2049
- }, B = (d) => b.value.filter((v) => v.from.barId === d || v.to.barId === d), G = (d) => I.value.filter((v) => v.barId === d), Q = (d) => {
2050
- if (o.value[d].sortable === !1) return;
2045
+ return y.value.push(A), A;
2046
+ }, P = (c) => {
2047
+ const v = y.value.findIndex((M) => M.id === c);
2048
+ return v >= 0 ? (y.value.splice(v, 1), !0) : !1;
2049
+ }, B = (c) => y.value.filter((v) => v.from.barId === c || v.to.barId === c), z = (c) => I.value.filter((v) => v.barId === c), ee = (c) => {
2050
+ if (o.value[c].sortable === !1) return;
2051
2051
  let v;
2052
- x.value.column === d && x.value.direction === "asc" ? v = "desc" : v = "asc", x.value.column = d, x.value.direction = v;
2053
- }, oe = (d, v, M) => {
2054
- const P = M.filterType || "text", Z = v.value;
2055
- if (!Z && P !== "dateRange" && P !== "checkbox") return !0;
2056
- switch (P) {
2052
+ k.value.column === c && k.value.direction === "asc" ? v = "desc" : v = "asc", k.value.column = c, k.value.direction = v;
2053
+ }, le = (c, v, M) => {
2054
+ const _ = M.filterType || "text", Z = v.value;
2055
+ if (!Z && _ !== "dateRange" && _ !== "checkbox") return !0;
2056
+ switch (_) {
2057
2057
  case "text": {
2058
2058
  let A = "";
2059
- return typeof d == "object" && d !== null ? A = Object.values(d).join(" ") : A = String(d || ""), A.toLowerCase().includes(String(Z).toLowerCase());
2059
+ return typeof c == "object" && c !== null ? A = Object.values(c).join(" ") : A = String(c || ""), A.toLowerCase().includes(String(Z).toLowerCase());
2060
2060
  }
2061
2061
  case "number": {
2062
- const A = Number(d), H = Number(Z);
2062
+ const A = Number(c), H = Number(Z);
2063
2063
  return !isNaN(A) && !isNaN(H) && A === H;
2064
2064
  }
2065
2065
  case "select":
2066
- return d === Z;
2066
+ return c === Z;
2067
2067
  case "checkbox":
2068
- return Z === !0 ? !!d : !0;
2068
+ return Z === !0 ? !!c : !0;
2069
2069
  case "date": {
2070
2070
  let A;
2071
- if (typeof d == "number") {
2072
- const N = new Date(d), le = (/* @__PURE__ */ new Date()).getFullYear();
2073
- A = new Date(le, N.getMonth(), N.getDate());
2071
+ if (typeof c == "number") {
2072
+ const U = new Date(c), ae = (/* @__PURE__ */ new Date()).getFullYear();
2073
+ A = new Date(ae, U.getMonth(), U.getDate());
2074
2074
  } else
2075
- A = new Date(String(d));
2075
+ A = new Date(String(c));
2076
2076
  const H = new Date(String(Z));
2077
2077
  return A.toDateString() === H.toDateString();
2078
2078
  }
2079
2079
  case "dateRange": {
2080
2080
  const A = v.startValue, H = v.endValue;
2081
2081
  if (!A && !H) return !0;
2082
- let N;
2083
- if (typeof d == "number") {
2084
- const le = new Date(d), nt = (/* @__PURE__ */ new Date()).getFullYear();
2085
- N = new Date(nt, le.getMonth(), le.getDate());
2082
+ let U;
2083
+ if (typeof c == "number") {
2084
+ const ae = new Date(c), tt = (/* @__PURE__ */ new Date()).getFullYear();
2085
+ U = new Date(tt, ae.getMonth(), ae.getDate());
2086
2086
  } else
2087
- N = new Date(String(d));
2088
- return !(A && N < new Date(String(A)) || H && N > new Date(String(H)));
2087
+ U = new Date(String(c));
2088
+ return !(A && U < new Date(String(A)) || H && U > new Date(String(H)));
2089
2089
  }
2090
2090
  default:
2091
2091
  return !0;
2092
2092
  }
2093
- }, ee = (d, v) => {
2094
- !v.value && !v.startValue && !v.endValue ? delete f.value[d] : f.value[d] = v;
2095
- }, re = (d) => {
2096
- delete f.value[d];
2097
- }, ce = (d, v = "end") => {
2093
+ }, te = (c, v) => {
2094
+ !v.value && !v.startValue && !v.endValue ? delete f.value[c] : f.value[c] = v;
2095
+ }, ie = (c) => {
2096
+ delete f.value[c];
2097
+ }, ce = (c, v = "end") => {
2098
2098
  const M = {};
2099
2099
  for (const Z of o.value)
2100
2100
  M[Z.name] = "";
2101
- d && Object.assign(M, d);
2102
- let P;
2103
- return v === "start" ? (P = 0, a.value.unshift(M)) : v === "end" ? (P = a.value.length, a.value.push(M)) : (P = Math.max(0, Math.min(v, a.value.length)), a.value.splice(P, 0, M)), P;
2101
+ c && Object.assign(M, c);
2102
+ let _;
2103
+ return v === "start" ? (_ = 0, a.value.unshift(M)) : v === "end" ? (_ = a.value.length, a.value.push(M)) : (_ = Math.max(0, Math.min(v, a.value.length)), a.value.splice(_, 0, M)), _;
2104
2104
  };
2105
2105
  return {
2106
2106
  // state
2107
2107
  columns: o,
2108
2108
  config: r,
2109
2109
  connectionHandles: I,
2110
- connectionPaths: b,
2110
+ connectionPaths: y,
2111
2111
  display: i,
2112
2112
  filterState: f,
2113
- ganttBars: m,
2114
- modal: c,
2113
+ ganttBars: p,
2114
+ modal: d,
2115
2115
  rows: a,
2116
- sortState: x,
2116
+ sortState: k,
2117
2117
  table: u,
2118
- updates: p,
2118
+ updates: m,
2119
2119
  // getters
2120
2120
  filteredRows: O,
2121
- hasPinnedColumns: h,
2122
- isGanttView: g,
2121
+ hasPinnedColumns: g,
2122
+ isGanttView: x,
2123
2123
  isTreeView: C,
2124
- isDependencyGraphEnabled: T,
2124
+ isDependencyGraphEnabled: $,
2125
2125
  numberedRowWidth: R,
2126
2126
  zeroColumn: S,
2127
2127
  // actions
2128
2128
  addRow: ce,
2129
- clearFilter: re,
2129
+ clearFilter: ie,
2130
2130
  closeModal: D,
2131
2131
  createConnection: Le,
2132
- deleteConnection: _,
2133
- deleteRow: (d) => {
2134
- if (d < 0 || d >= a.value.length)
2132
+ deleteConnection: P,
2133
+ deleteRow: (c) => {
2134
+ if (c < 0 || c >= a.value.length)
2135
2135
  return null;
2136
- const [v] = a.value.splice(d, 1);
2137
- delete s.value[d], delete l.value[d];
2138
- const M = {}, P = {};
2136
+ const [v] = a.value.splice(c, 1);
2137
+ delete s.value[c], delete l.value[c];
2138
+ const M = {}, _ = {};
2139
2139
  for (const [Z, A] of Object.entries(s.value)) {
2140
2140
  const H = parseInt(Z);
2141
- H > d ? M[H - 1] = A : M[H] = A;
2141
+ H > c ? M[H - 1] = A : M[H] = A;
2142
2142
  }
2143
2143
  for (const [Z, A] of Object.entries(l.value)) {
2144
2144
  const H = parseInt(Z);
2145
- H > d ? P[H - 1] = A : P[H] = A;
2145
+ H > c ? _[H - 1] = A : _[H] = A;
2146
2146
  }
2147
- return s.value = M, l.value = P, v;
2147
+ return s.value = M, l.value = _, v;
2148
2148
  },
2149
- duplicateRow: (d) => {
2150
- if (d < 0 || d >= a.value.length)
2149
+ duplicateRow: (c) => {
2150
+ if (c < 0 || c >= a.value.length)
2151
2151
  return -1;
2152
- const v = a.value[d], M = JSON.parse(JSON.stringify(v)), P = d + 1;
2153
- return a.value.splice(P, 0, M), P;
2152
+ const v = a.value[c], M = JSON.parse(JSON.stringify(v)), _ = c + 1;
2153
+ return a.value.splice(_, 0, M), _;
2154
2154
  },
2155
- getCellData: U,
2155
+ getCellData: W,
2156
2156
  getCellDisplayValue: je,
2157
2157
  getConnectionsForBar: B,
2158
2158
  getFormattedValue: Fe,
2159
- getHandlesForBar: G,
2159
+ getHandlesForBar: z,
2160
2160
  getHeaderCellStyle: ge,
2161
2161
  getIndent: F,
2162
2162
  getRowExpandSymbol: Ye,
2163
- insertRowAbove: (d, v) => {
2164
- const M = Math.max(0, d);
2163
+ insertRowAbove: (c, v) => {
2164
+ const M = Math.max(0, c);
2165
2165
  return ce(v, M);
2166
2166
  },
2167
- insertRowBelow: (d, v) => {
2168
- const M = Math.min(d + 1, a.value.length);
2167
+ insertRowBelow: (c, v) => {
2168
+ const M = Math.min(c + 1, a.value.length);
2169
2169
  return ce(v, M);
2170
2170
  },
2171
2171
  isRowGantt: Oe,
2172
2172
  isRowVisible: Re,
2173
- moveRow: (d, v) => {
2174
- if (d < 0 || d >= a.value.length || v < 0 || v >= a.value.length || d === v)
2173
+ moveRow: (c, v) => {
2174
+ if (c < 0 || c >= a.value.length || v < 0 || v >= a.value.length || c === v)
2175
2175
  return !1;
2176
- const [M] = a.value.splice(d, 1);
2176
+ const [M] = a.value.splice(c, 1);
2177
2177
  a.value.splice(v, 0, M);
2178
- const P = {}, Z = {};
2178
+ const _ = {}, Z = {};
2179
2179
  for (const [A, H] of Object.entries(s.value)) {
2180
- const N = parseInt(A);
2181
- let le = N;
2182
- N === d ? le = v : d < v ? N > d && N <= v && (le = N - 1) : N >= v && N < d && (le = N + 1), P[le] = H;
2180
+ const U = parseInt(A);
2181
+ let ae = U;
2182
+ U === c ? ae = v : c < v ? U > c && U <= v && (ae = U - 1) : U >= v && U < c && (ae = U + 1), _[ae] = H;
2183
2183
  }
2184
2184
  for (const [A, H] of Object.entries(l.value)) {
2185
- const N = parseInt(A);
2186
- let le = N;
2187
- N === d ? le = v : d < v ? N > d && N <= v && (le = N - 1) : N >= v && N < d && (le = N + 1), Z[le] = H;
2185
+ const U = parseInt(A);
2186
+ let ae = U;
2187
+ U === c ? ae = v : c < v ? U > c && U <= v && (ae = U - 1) : U >= v && U < c && (ae = U + 1), Z[ae] = H;
2188
2188
  }
2189
- return s.value = P, l.value = Z, !0;
2189
+ return s.value = _, l.value = Z, !0;
2190
2190
  },
2191
- registerConnectionHandle: se,
2192
- registerGanttBar: j,
2191
+ registerConnectionHandle: re,
2192
+ registerGanttBar: Q,
2193
2193
  resizeColumn: de,
2194
- setCellData: ve,
2195
- setCellText: X,
2196
- setFilter: ee,
2197
- sortByColumn: Q,
2194
+ setCellData: me,
2195
+ setCellText: J,
2196
+ setFilter: te,
2197
+ sortByColumn: ee,
2198
2198
  toggleRowExpand: Xe,
2199
- unregisterConnectionHandle: be,
2200
- unregisterGanttBar: z,
2201
- updateGanttBar: W,
2202
- updateRows: Y
2199
+ unregisterConnectionHandle: ke,
2200
+ unregisterGanttBar: q,
2201
+ updateGanttBar: G,
2202
+ updateRows: j
2203
2203
  };
2204
2204
  })();
2205
2205
  }, gl = {
2206
2206
  class: "atable-container",
2207
2207
  style: { position: "relative" }
2208
- }, wl = /* @__PURE__ */ ne({
2208
+ }, wl = /* @__PURE__ */ oe({
2209
2209
  __name: "ATable",
2210
- props: /* @__PURE__ */ Me({
2210
+ props: /* @__PURE__ */ xe({
2211
2211
  id: { default: "" },
2212
2212
  config: { default: () => new Object() }
2213
2213
  }, {
@@ -2216,114 +2216,114 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
2216
2216
  columns: { required: !0 },
2217
2217
  columnsModifiers: {}
2218
2218
  }),
2219
- emits: /* @__PURE__ */ Me(["cellUpdate", "gantt:drag", "connection:event", "columns:update", "row:add", "row:delete", "row:duplicate", "row:insert-above", "row:insert-below", "row:move"], ["update:rows", "update:columns"]),
2219
+ emits: /* @__PURE__ */ xe(["cellUpdate", "gantt:drag", "connection:event", "columns:update", "row:add", "row:delete", "row:duplicate", "row:insert-above", "row:insert-below", "row:move"], ["update:rows", "update:columns"]),
2220
2220
  setup(e, { expose: t, emit: n }) {
2221
- const o = ke(e, "rows"), a = ke(e, "columns"), r = n, s = fe("table"), l = hl({ columns: a.value, rows: o.value, id: e.id, config: e.config });
2222
- l.$onAction(({ name: b, store: x, args: f, after: h }) => {
2223
- if (b === "setCellData" || b === "setCellText") {
2224
- const [g, C, T] = f, R = x.getCellData(g, C);
2225
- h(() => {
2226
- o.value = [...x.rows], r("cellUpdate", { colIndex: g, rowIndex: C, newValue: T, oldValue: R });
2221
+ const o = Me(e, "rows"), a = Me(e, "columns"), r = n, s = fe("table"), l = hl({ columns: a.value, rows: o.value, id: e.id, config: e.config });
2222
+ l.$onAction(({ name: y, store: k, args: f, after: g }) => {
2223
+ if (y === "setCellData" || y === "setCellText") {
2224
+ const [x, C, $] = f, R = k.getCellData(x, C);
2225
+ g(() => {
2226
+ o.value = [...k.rows], r("cellUpdate", { colIndex: x, rowIndex: C, newValue: $, oldValue: R });
2227
2227
  });
2228
- } else if (b === "updateGanttBar") {
2229
- const [g] = f;
2228
+ } else if (y === "updateGanttBar") {
2229
+ const [x] = f;
2230
2230
  let C = !1;
2231
- g.type === "resize" ? C = g.oldColspan !== g.newColspan : g.type === "bar" && (C = g.oldStart !== g.newStart || g.oldEnd !== g.newEnd), C && h(() => {
2232
- r("gantt:drag", g);
2231
+ x.type === "resize" ? C = x.oldColspan !== x.newColspan : x.type === "bar" && (C = x.oldStart !== x.newStart || x.oldEnd !== x.newEnd), C && g(() => {
2232
+ r("gantt:drag", x);
2233
2233
  });
2234
- } else b === "resizeColumn" && h(() => {
2235
- a.value = [...x.columns], r("columns:update", [...x.columns]);
2234
+ } else y === "resizeColumn" && g(() => {
2235
+ a.value = [...k.columns], r("columns:update", [...k.columns]);
2236
2236
  });
2237
- }), te(
2237
+ }), ne(
2238
2238
  () => o.value,
2239
- (b) => {
2240
- JSON.stringify(b) !== JSON.stringify(l.rows) && (l.rows = [...b]);
2239
+ (y) => {
2240
+ JSON.stringify(y) !== JSON.stringify(l.rows) && (l.rows = [...y]);
2241
2241
  },
2242
2242
  { deep: !0 }
2243
- ), te(
2243
+ ), ne(
2244
2244
  a,
2245
- (b) => {
2246
- JSON.stringify(b) !== JSON.stringify(l.columns) && (l.columns = [...b], r("columns:update", [...b]));
2245
+ (y) => {
2246
+ JSON.stringify(y) !== JSON.stringify(l.columns) && (l.columns = [...y], r("columns:update", [...y]));
2247
2247
  },
2248
2248
  { deep: !0 }
2249
2249
  ), Ee(() => {
2250
- a.value.some((b) => b.pinned) && (i(), l.isTreeView && mn(s, i, { childList: !0, subtree: !0 }));
2250
+ a.value.some((y) => y.pinned) && (i(), l.isTreeView && pn(s, i, { childList: !0, subtree: !0 }));
2251
2251
  });
2252
- const u = $(() => l.columns.filter((b) => b.pinned).length), i = () => {
2253
- const b = s.value, x = b?.rows[0], f = b?.rows[1], h = x ? Array.from(x.cells) : [];
2254
- for (const [g, C] of h.entries()) {
2255
- const T = f?.cells[g];
2256
- T && (C.style.width = `${T.offsetWidth}px`);
2252
+ const u = T(() => l.columns.filter((y) => y.pinned).length), i = () => {
2253
+ const y = s.value, k = y?.rows[0], f = y?.rows[1], g = k ? Array.from(k.cells) : [];
2254
+ for (const [x, C] of g.entries()) {
2255
+ const $ = f?.cells[x];
2256
+ $ && (C.style.width = `${$.offsetWidth}px`);
2257
2257
  }
2258
- for (const g of b?.rows || []) {
2258
+ for (const x of y?.rows || []) {
2259
2259
  let C = 0;
2260
- const T = [];
2261
- for (const R of g.cells)
2262
- (R.classList.contains("sticky-column") || R.classList.contains("sticky-index")) && (R.style.left = `${C}px`, C += R.offsetWidth, T.push(R));
2263
- T.length > 0 && T[T.length - 1].classList.add("sticky-column-edge");
2260
+ const $ = [];
2261
+ for (const R of x.cells)
2262
+ (R.classList.contains("sticky-column") || R.classList.contains("sticky-index")) && (R.style.left = `${C}px`, C += R.offsetWidth, $.push(R));
2263
+ $.length > 0 && $[$.length - 1].classList.add("sticky-column-edge");
2264
2264
  }
2265
2265
  };
2266
- window.addEventListener("keydown", (b) => {
2267
- if (b.key === "Escape" && l.modal.visible) {
2266
+ window.addEventListener("keydown", (y) => {
2267
+ if (y.key === "Escape" && l.modal.visible) {
2268
2268
  l.modal.visible = !1;
2269
- const x = l.modal.parent;
2270
- x && pt().then(() => {
2271
- x.focus();
2269
+ const k = l.modal.parent;
2270
+ k && vt().then(() => {
2271
+ k.focus();
2272
2272
  });
2273
2273
  }
2274
2274
  });
2275
- const c = (b) => {
2276
- if (!b.gantt || u.value === 0)
2275
+ const d = (y) => {
2276
+ if (!y.gantt || u.value === 0)
2277
2277
  return l.columns;
2278
- const x = [];
2278
+ const k = [];
2279
2279
  for (let f = 0; f < u.value; f++) {
2280
- const h = { ...l.columns[f] };
2281
- h.originalIndex = f, x.push(h);
2280
+ const g = { ...l.columns[f] };
2281
+ g.originalIndex = f, k.push(g);
2282
2282
  }
2283
- return x.push({
2283
+ return k.push({
2284
2284
  ...l.columns[u.value],
2285
2285
  isGantt: !0,
2286
- colspan: b.gantt?.colspan || l.columns.length - u.value,
2286
+ colspan: y.gantt?.colspan || l.columns.length - u.value,
2287
2287
  originalIndex: u.value,
2288
2288
  width: "auto"
2289
2289
  // TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
2290
- }), x;
2291
- }, p = (b) => {
2292
- r("connection:event", { type: "create", connection: b });
2293
- }, m = (b) => {
2294
- r("connection:event", { type: "delete", connection: b });
2295
- }, I = (b, x) => {
2296
- switch (b) {
2290
+ }), k;
2291
+ }, m = (y) => {
2292
+ r("connection:event", { type: "create", connection: y });
2293
+ }, p = (y) => {
2294
+ r("connection:event", { type: "delete", connection: y });
2295
+ }, I = (y, k) => {
2296
+ switch (y) {
2297
2297
  case "add": {
2298
- const f = l.addRow({}, x + 1), h = l.rows[f];
2299
- o.value = [...l.rows], r("row:add", { rowIndex: f, row: h });
2298
+ const f = l.addRow({}, k + 1), g = l.rows[f];
2299
+ o.value = [...l.rows], r("row:add", { rowIndex: f, row: g });
2300
2300
  break;
2301
2301
  }
2302
2302
  case "delete": {
2303
- const f = l.deleteRow(x);
2304
- f && (o.value = [...l.rows], r("row:delete", { rowIndex: x, row: f }));
2303
+ const f = l.deleteRow(k);
2304
+ f && (o.value = [...l.rows], r("row:delete", { rowIndex: k, row: f }));
2305
2305
  break;
2306
2306
  }
2307
2307
  case "duplicate": {
2308
- const f = l.duplicateRow(x);
2308
+ const f = l.duplicateRow(k);
2309
2309
  if (f >= 0) {
2310
- const h = l.rows[f];
2311
- o.value = [...l.rows], r("row:duplicate", { sourceIndex: x, newIndex: f, row: h });
2310
+ const g = l.rows[f];
2311
+ o.value = [...l.rows], r("row:duplicate", { sourceIndex: k, newIndex: f, row: g });
2312
2312
  }
2313
2313
  break;
2314
2314
  }
2315
2315
  case "insertAbove": {
2316
- const f = l.insertRowAbove(x), h = l.rows[f];
2317
- o.value = [...l.rows], r("row:insert-above", { targetIndex: x, newIndex: f, row: h });
2316
+ const f = l.insertRowAbove(k), g = l.rows[f];
2317
+ o.value = [...l.rows], r("row:insert-above", { targetIndex: k, newIndex: f, row: g });
2318
2318
  break;
2319
2319
  }
2320
2320
  case "insertBelow": {
2321
- const f = l.insertRowBelow(x), h = l.rows[f];
2322
- o.value = [...l.rows], r("row:insert-below", { targetIndex: x, newIndex: f, row: h });
2321
+ const f = l.insertRowBelow(k), g = l.rows[f];
2322
+ o.value = [...l.rows], r("row:insert-below", { targetIndex: k, newIndex: f, row: g });
2323
2323
  break;
2324
2324
  }
2325
2325
  case "move": {
2326
- r("row:move", { fromIndex: x, toIndex: -1 });
2326
+ r("row:move", { fromIndex: k, toIndex: -1 });
2327
2327
  break;
2328
2328
  }
2329
2329
  }
@@ -2341,58 +2341,58 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
2341
2341
  insertRowAbove: l.insertRowAbove,
2342
2342
  insertRowBelow: l.insertRowBelow,
2343
2343
  moveRow: l.moveRow
2344
- }), (b, x) => (w(), k("div", gl, [
2345
- J((w(), k("table", {
2344
+ }), (y, k) => (h(), b("div", gl, [
2345
+ K((h(), b("table", {
2346
2346
  ref: "table",
2347
2347
  class: "atable",
2348
- style: xe({
2348
+ style: be({
2349
2349
  width: V(l).config.fullWidth ? "100%" : "auto"
2350
2350
  })
2351
2351
  }, [
2352
- he(b.$slots, "header", { data: V(l) }, () => [
2353
- dt(gn, {
2352
+ he(y.$slots, "header", { data: V(l) }, () => [
2353
+ ct(gn, {
2354
2354
  columns: V(l).columns,
2355
2355
  store: V(l)
2356
2356
  }, null, 8, ["columns", "store"])
2357
2357
  ], !0),
2358
- y("tbody", null, [
2359
- he(b.$slots, "body", { data: V(l) }, () => [
2360
- (w(!0), k(ue, null, me(V(l).filteredRows, (f, h) => (w(), pe(hn, {
2361
- key: `${f.originalIndex}-${h}`,
2358
+ w("tbody", null, [
2359
+ he(y.$slots, "body", { data: V(l) }, () => [
2360
+ (h(!0), b(X, null, ve(V(l).filteredRows, (f, g) => (h(), pe(hn, {
2361
+ key: `${f.originalIndex}-${g}`,
2362
2362
  row: f,
2363
2363
  rowIndex: f.originalIndex,
2364
2364
  store: V(l),
2365
2365
  "onRow:action": I
2366
2366
  }, {
2367
- default: Tt(() => [
2368
- (w(!0), k(ue, null, me(c(f), (g, C) => (w(), k(ue, {
2369
- key: g.name
2367
+ default: $t(() => [
2368
+ (h(!0), b(X, null, ve(d(f), (x, C) => (h(), b(X, {
2369
+ key: x.name
2370
2370
  }, [
2371
- g.isGantt ? (w(), pe(Ue(g.ganttComponent || "AGanttCell"), {
2371
+ x.isGantt ? (h(), pe(Ue(x.ganttComponent || "AGanttCell"), {
2372
2372
  key: 0,
2373
2373
  store: V(l),
2374
2374
  "columns-count": V(l).columns.length - u.value,
2375
2375
  color: f.gantt?.color,
2376
2376
  start: f.gantt?.startIndex,
2377
2377
  end: f.gantt?.endIndex,
2378
- colspan: g.colspan,
2379
- pinned: g.pinned,
2378
+ colspan: x.colspan,
2379
+ pinned: x.pinned,
2380
2380
  rowIndex: f.originalIndex,
2381
- colIndex: g.originalIndex ?? C,
2382
- style: xe({
2383
- textAlign: g?.align || "center",
2384
- minWidth: g?.width || "40ch",
2381
+ colIndex: x.originalIndex ?? C,
2382
+ style: be({
2383
+ textAlign: x?.align || "center",
2384
+ minWidth: x?.width || "40ch",
2385
2385
  width: V(l).config.fullWidth ? "auto" : null
2386
2386
  }),
2387
- "onConnection:create": p
2388
- }, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (w(), pe(Ue(g.cellComponent || "ACell"), {
2387
+ "onConnection:create": m
2388
+ }, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (h(), pe(Ue(x.cellComponent || "ACell"), {
2389
2389
  key: 1,
2390
2390
  store: V(l),
2391
- pinned: g.pinned,
2391
+ pinned: x.pinned,
2392
2392
  rowIndex: f.originalIndex,
2393
2393
  colIndex: C,
2394
- style: xe({
2395
- textAlign: g?.align || "center",
2394
+ style: be({
2395
+ textAlign: x?.align || "center",
2396
2396
  width: V(l).config.fullWidth ? "auto" : null
2397
2397
  }),
2398
2398
  spellcheck: "false"
@@ -2403,11 +2403,11 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
2403
2403
  }, 1032, ["row", "rowIndex", "store"]))), 128))
2404
2404
  ], !0)
2405
2405
  ]),
2406
- he(b.$slots, "footer", { data: V(l) }, void 0, !0),
2407
- he(b.$slots, "modal", { data: V(l) }, () => [
2408
- J(dt(wn, { store: V(l) }, {
2409
- default: Tt(() => [
2410
- (w(), pe(Ue(V(l).modal.component), vt({
2406
+ he(y.$slots, "footer", { data: V(l) }, void 0, !0),
2407
+ he(y.$slots, "modal", { data: V(l) }, () => [
2408
+ K(ct(wn, { store: V(l) }, {
2409
+ default: $t(() => [
2410
+ (h(), pe(Ue(V(l).modal.component), ft({
2411
2411
  key: `${V(l).modal.rowIndex}:${V(l).modal.colIndex}`,
2412
2412
  "col-index": V(l).modal.colIndex,
2413
2413
  "row-index": V(l).modal.rowIndex,
@@ -2422,43 +2422,43 @@ const Xo = { class: "gantt-connection-overlay" }, jo = {
2422
2422
  ], 4)), [
2423
2423
  [V(zo), V(l).closeModal]
2424
2424
  ]),
2425
- V(l).isGanttView && V(l).isDependencyGraphEnabled ? (w(), pe(tl, {
2425
+ V(l).isGanttView && V(l).isDependencyGraphEnabled ? (h(), pe(tl, {
2426
2426
  key: 0,
2427
2427
  store: V(l),
2428
- "onConnection:delete": m
2429
- }, null, 8, ["store"])) : q("", !0)
2428
+ "onConnection:delete": p
2429
+ }, null, 8, ["store"])) : Y("", !0)
2430
2430
  ]));
2431
2431
  }
2432
- }), yl = /* @__PURE__ */ Ve(wl, [["__scopeId", "data-v-3d00d51b"]]), xl = {}, bl = { class: "aloading" }, Il = { class: "aloading-header" };
2433
- function kl(e, t) {
2434
- return w(), k("div", bl, [
2435
- y("h2", Il, [
2432
+ }), yl = /* @__PURE__ */ Ve(wl, [["__scopeId", "data-v-3d00d51b"]]), bl = {}, xl = { class: "aloading" }, kl = { class: "aloading-header" };
2433
+ function Il(e, t) {
2434
+ return h(), b("div", xl, [
2435
+ w("h2", kl, [
2436
2436
  he(e.$slots, "default", {}, void 0, !0)
2437
2437
  ]),
2438
- t[0] || (t[0] = y("div", { class: "aloading-bar" }, null, -1))
2438
+ t[0] || (t[0] = w("div", { class: "aloading-bar" }, null, -1))
2439
2439
  ]);
2440
2440
  }
2441
- const Ml = /* @__PURE__ */ Ve(xl, [["render", kl], ["__scopeId", "data-v-a930a25b"]]), Cl = {}, El = { class: "aloading" }, Al = { class: "aloading-header" };
2442
- function Tl(e, t) {
2443
- return w(), k("div", El, [
2444
- y("h2", Al, [
2441
+ const Ml = /* @__PURE__ */ Ve(bl, [["render", Il], ["__scopeId", "data-v-a930a25b"]]), Cl = {}, El = { class: "aloading" }, Al = { class: "aloading-header" };
2442
+ function $l(e, t) {
2443
+ return h(), b("div", El, [
2444
+ w("h2", Al, [
2445
2445
  he(e.$slots, "default", {}, void 0, !0)
2446
2446
  ]),
2447
- t[0] || (t[0] = y("div", { class: "aloading-bar" }, null, -1))
2447
+ t[0] || (t[0] = w("div", { class: "aloading-bar" }, null, -1))
2448
2448
  ]);
2449
2449
  }
2450
- const $l = /* @__PURE__ */ Ve(Cl, [["render", Tl], ["__scopeId", "data-v-e1165876"]]);
2450
+ const Tl = /* @__PURE__ */ Ve(Cl, [["render", $l], ["__scopeId", "data-v-e1165876"]]);
2451
2451
  function Dl(e) {
2452
- e.component("ACell", ho), e.component("AExpansionRow", bo), e.component("AGanttCell", To), e.component("ARow", hn), e.component("ARowActions", ut), e.component("ATable", yl), e.component("ATableHeader", gn), e.component("ATableLoading", Ml), e.component("ATableLoadingBar", $l), e.component("ATableModal", wn);
2452
+ e.component("ACell", ho), e.component("AExpansionRow", xo), e.component("AGanttCell", $o), e.component("ARow", hn), e.component("ARowActions", it), e.component("ATable", yl), e.component("ATableHeader", gn), e.component("ATableLoading", Ml), e.component("ATableLoadingBar", Tl), e.component("ATableModal", wn);
2453
2453
  }
2454
- const Sl = { class: "aform_form-element" }, Rl = ["for"], Ll = { class: "aform_checkbox-container aform_input-field" }, Hl = ["id", "readonly", "required"], Vl = ["innerHTML"], Pl = /* @__PURE__ */ ne({
2454
+ const Sl = { class: "aform_form-element" }, Rl = { class: "aform_field-label" }, Ll = { class: "aform_display-value" }, Hl = ["for"], Vl = { class: "aform_checkbox-container aform_input-field" }, _l = ["id", "disabled", "required"], Pl = ["innerHTML"], Ol = /* @__PURE__ */ oe({
2455
2455
  __name: "ACheckbox",
2456
- props: /* @__PURE__ */ Me({
2456
+ props: /* @__PURE__ */ xe({
2457
2457
  schema: {},
2458
2458
  label: {},
2459
2459
  mask: {},
2460
2460
  required: { type: Boolean },
2461
- readOnly: { type: Boolean },
2461
+ mode: {},
2462
2462
  uuid: {},
2463
2463
  validation: { default: () => ({ errorMessage: "&nbsp;" }) }
2464
2464
  }, {
@@ -2467,67 +2467,83 @@ const Sl = { class: "aform_form-element" }, Rl = ["for"], Ll = { class: "aform_c
2467
2467
  }),
2468
2468
  emits: ["update:modelValue"],
2469
2469
  setup(e) {
2470
- const t = ke(e, "modelValue");
2471
- return (n, o) => (w(), k("div", Sl, [
2472
- y("label", {
2473
- class: "aform_field-label",
2474
- for: e.uuid
2475
- }, K(e.label), 9, Rl),
2476
- y("span", Ll, [
2477
- J(y("input", {
2478
- id: e.uuid,
2479
- "onUpdate:modelValue": o[0] || (o[0] = (a) => t.value = a),
2480
- type: "checkbox",
2481
- class: "aform_checkbox",
2482
- readonly: e.readOnly,
2483
- required: e.required
2484
- }, null, 8, Hl), [
2485
- [un, t.value]
2470
+ const t = Me(e, "modelValue");
2471
+ return (n, o) => (h(), b("div", Sl, [
2472
+ e.mode === "display" ? (h(), b(X, { key: 0 }, [
2473
+ w("label", Rl, N(e.label), 1),
2474
+ w("span", Ll, N(t.value ? "✓" : "✗"), 1)
2475
+ ], 64)) : (h(), b(X, { key: 1 }, [
2476
+ w("label", {
2477
+ class: "aform_field-label",
2478
+ for: e.uuid
2479
+ }, N(e.label), 9, Hl),
2480
+ w("span", Vl, [
2481
+ K(w("input", {
2482
+ id: e.uuid,
2483
+ "onUpdate:modelValue": o[0] || (o[0] = (a) => t.value = a),
2484
+ type: "checkbox",
2485
+ class: "aform_checkbox",
2486
+ disabled: e.mode === "read",
2487
+ required: e.required
2488
+ }, null, 8, _l), [
2489
+ [un, t.value]
2490
+ ])
2491
+ ]),
2492
+ K(w("p", {
2493
+ class: "aform_error",
2494
+ innerHTML: e.validation.errorMessage
2495
+ }, null, 8, Pl), [
2496
+ [Ce, e.validation.errorMessage]
2486
2497
  ])
2487
- ]),
2488
- J(y("p", {
2489
- class: "aform_error",
2490
- innerHTML: e.validation.errorMessage
2491
- }, null, 8, Vl), [
2492
- [Ce, e.validation.errorMessage]
2493
- ])
2498
+ ], 64))
2494
2499
  ]));
2495
2500
  }
2496
- }), $e = (e, t) => {
2501
+ }), Te = (e, t) => {
2497
2502
  const n = e.__vccOpts || e;
2498
2503
  for (const [o, a] of t)
2499
2504
  n[o] = a;
2500
2505
  return n;
2501
- }, _l = /* @__PURE__ */ $e(Pl, [["__scopeId", "data-v-f13fd4d6"]]), Ol = /* @__PURE__ */ ne({
2506
+ }, Bl = /* @__PURE__ */ Te(Ol, [["__scopeId", "data-v-cc185b72"]]), Fl = /* @__PURE__ */ oe({
2502
2507
  __name: "AComboBox",
2503
- props: ["event", "cellData", "tableID"],
2508
+ props: {
2509
+ schema: {},
2510
+ label: {},
2511
+ mask: {},
2512
+ required: { type: Boolean },
2513
+ mode: {},
2514
+ uuid: {},
2515
+ validation: {},
2516
+ event: {},
2517
+ cellData: {},
2518
+ tableID: {}
2519
+ },
2504
2520
  setup(e) {
2505
2521
  return (t, n) => {
2506
2522
  const o = dn("ATableModal");
2507
- return w(), pe(o, {
2523
+ return h(), pe(o, {
2508
2524
  event: e.event,
2509
2525
  "cell-data": e.cellData,
2510
2526
  class: "amodal"
2511
2527
  }, {
2512
- default: Tt(() => [...n[0] || (n[0] = [
2513
- y("div", null, [
2514
- y("input", { type: "text" }),
2515
- y("input", { type: "text" }),
2516
- y("input", { type: "text" })
2528
+ default: $t(() => [...n[0] || (n[0] = [
2529
+ w("div", null, [
2530
+ w("input", { type: "text" }),
2531
+ w("input", { type: "text" }),
2532
+ w("input", { type: "text" })
2517
2533
  ], -1)
2518
2534
  ])]),
2519
2535
  _: 1
2520
2536
  }, 8, ["event", "cell-data"]);
2521
2537
  };
2522
2538
  }
2523
- }), Bl = ["id", "disabled", "required"], Fl = ["for"], Zl = ["innerHTML"], Nl = /* @__PURE__ */ ne({
2539
+ }), Zl = { class: "aform_display-value" }, Nl = ["id", "disabled", "required"], Ul = ["for"], Wl = ["innerHTML"], Gl = /* @__PURE__ */ oe({
2524
2540
  __name: "ADate",
2525
- props: /* @__PURE__ */ Me({
2541
+ props: /* @__PURE__ */ xe({
2526
2542
  schema: {},
2527
2543
  label: { default: "Date" },
2528
2544
  mask: {},
2529
2545
  required: { type: Boolean },
2530
- readOnly: { type: Boolean },
2546
+ mode: {},
2531
2547
  uuid: {},
2532
2548
  validation: { default: () => ({ errorMessage: "&nbsp;" }) }
2533
2549
  }, {
@@ -2538,35 +2554,40 @@ const Sl = { class: "aform_form-element" }, Rl = ["for"], Ll = { class: "aform_c
2538
2554
  }),
2539
2555
  emits: ["update:modelValue"],
2540
2556
  setup(e) {
2541
- const t = ke(e, "modelValue", {
2557
+ const t = Me(e, "modelValue", {
2542
2558
  // format the date to be compatible with the native input datepicker
2543
2559
  set: (a) => new Date(a).toISOString().split("T")[0]
2544
2560
  }), n = fe("date"), o = () => {
2545
2561
  n.value && "showPicker" in HTMLInputElement.prototype && n.value.showPicker();
2546
2562
  };
2547
- return (a, r) => (w(), k("div", null, [
2548
- J(y("input", {
2549
- id: e.uuid,
2550
- ref: "date",
2551
- "onUpdate:modelValue": r[0] || (r[0] = (s) => t.value = s),
2552
- type: "date",
2553
- disabled: e.readOnly,
2554
- required: e.required,
2555
- onClick: o
2556
- }, null, 8, Bl), [
2557
- [we, t.value]
2558
- ]),
2559
- y("label", { for: e.uuid }, K(e.label), 9, Fl),
2560
- J(y("p", {
2561
- innerHTML: e.validation.errorMessage
2562
- }, null, 8, Zl), [
2563
- [Ce, e.validation.errorMessage]
2564
- ])
2563
+ return (a, r) => (h(), b("div", null, [
2564
+ e.mode === "display" ? (h(), b(X, { key: 0 }, [
2565
+ w("span", Zl, N(t.value ? new Date(t.value).toLocaleDateString() : ""), 1),
2566
+ w("label", null, N(e.label), 1)
2567
+ ], 64)) : (h(), b(X, { key: 1 }, [
2568
+ K(w("input", {
2569
+ id: e.uuid,
2570
+ ref: "date",
2571
+ "onUpdate:modelValue": r[0] || (r[0] = (s) => t.value = s),
2572
+ type: "date",
2573
+ disabled: e.mode === "read",
2574
+ required: e.required,
2575
+ onClick: o
2576
+ }, null, 8, Nl), [
2577
+ [we, t.value]
2578
+ ]),
2579
+ w("label", { for: e.uuid }, N(e.label), 9, Ul),
2580
+ K(w("p", {
2581
+ innerHTML: e.validation.errorMessage
2582
+ }, null, 8, Wl), [
2583
+ [Ce, e.validation.errorMessage]
2584
+ ])
2585
+ ], 64))
2565
2586
  ]));
2566
2587
  }
2567
- }), Ul = /* @__PURE__ */ $e(Nl, [["__scopeId", "data-v-a15ed922"]]);
2588
+ }), zl = /* @__PURE__ */ Te(Gl, [["__scopeId", "data-v-425aef3c"]]);
2568
2589
  function yn(e, t) {
2569
- return mt() ? (ht(e, t), !0) : !1;
2590
+ return mt() ? (pt(e, t), !0) : !1;
2570
2591
  }
2571
2592
  // @__NO_SIDE_EFFECTS__
2572
2593
  function jt() {
@@ -2586,11 +2607,11 @@ function jt() {
2586
2607
  }
2587
2608
  };
2588
2609
  }
2589
- const xn = typeof window < "u" && typeof document < "u";
2610
+ const bn = typeof window < "u" && typeof document < "u";
2590
2611
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
2591
- const Wl = Object.prototype.toString, Gl = (e) => Wl.call(e) === "[object Object]", Je = () => {
2592
- }, zl = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
2593
- function ql(...e) {
2612
+ const ql = Object.prototype.toString, Yl = (e) => ql.call(e) === "[object Object]", Je = () => {
2613
+ }, Xl = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
2614
+ function jl(...e) {
2594
2615
  if (e.length !== 1) return cn(...e);
2595
2616
  const t = e[0];
2596
2617
  return typeof t == "function" ? Rt(St(() => ({
@@ -2598,68 +2619,68 @@ function ql(...e) {
2598
2619
  set: Je
2599
2620
  }))) : L(t);
2600
2621
  }
2601
- function kt(e) {
2622
+ function It(e) {
2602
2623
  return Array.isArray(e) ? e : [e];
2603
2624
  }
2604
- function Yl(e, t, n) {
2605
- return te(e, t, {
2625
+ function Jl(e, t, n) {
2626
+ return ne(e, t, {
2606
2627
  ...n,
2607
2628
  immediate: !0
2608
2629
  });
2609
2630
  }
2610
- const bn = xn ? window : void 0, Xl = xn ? window.document : void 0;
2631
+ const xn = bn ? window : void 0, Ql = bn ? window.document : void 0;
2611
2632
  function Ne(e) {
2612
2633
  var t;
2613
2634
  const n = E(e);
2614
2635
  return (t = n?.$el) !== null && t !== void 0 ? t : n;
2615
2636
  }
2616
2637
  function Mt(...e) {
2617
- const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n = $(() => {
2618
- const o = kt(E(e[0])).filter((a) => a != null);
2638
+ const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n = T(() => {
2639
+ const o = It(E(e[0])).filter((a) => a != null);
2619
2640
  return o.every((a) => typeof a != "string") ? o : void 0;
2620
2641
  });
2621
- return Yl(() => {
2642
+ return Jl(() => {
2622
2643
  var o, a;
2623
2644
  return [
2624
- (o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) => Ne(r))) !== null && o !== void 0 ? o : [bn].filter((r) => r != null),
2625
- kt(E(n.value ? e[1] : e[0])),
2626
- kt(V(n.value ? e[2] : e[1])),
2645
+ (o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) => Ne(r))) !== null && o !== void 0 ? o : [xn].filter((r) => r != null),
2646
+ It(E(n.value ? e[1] : e[0])),
2647
+ It(V(n.value ? e[2] : e[1])),
2627
2648
  E(n.value ? e[3] : e[2])
2628
2649
  ];
2629
2650
  }, ([o, a, r, s], l, u) => {
2630
2651
  if (!o?.length || !a?.length || !r?.length) return;
2631
- const i = Gl(s) ? { ...s } : s, c = o.flatMap((p) => a.flatMap((m) => r.map((I) => t(p, m, I, i))));
2652
+ const i = Yl(s) ? { ...s } : s, d = o.flatMap((m) => a.flatMap((p) => r.map((I) => t(m, p, I, i))));
2632
2653
  u(() => {
2633
- c.forEach((p) => p());
2654
+ d.forEach((m) => m());
2634
2655
  });
2635
2656
  }, { flush: "post" });
2636
2657
  }
2637
2658
  function Jt(e, t, n = {}) {
2638
- const { window: o = bn, ignore: a = [], capture: r = !0, detectIframe: s = !1, controls: l = !1 } = n;
2659
+ const { window: o = xn, ignore: a = [], capture: r = !0, detectIframe: s = !1, controls: l = !1 } = n;
2639
2660
  if (!o) return l ? {
2640
2661
  stop: Je,
2641
2662
  cancel: Je,
2642
2663
  trigger: Je
2643
2664
  } : Je;
2644
2665
  let u = !0;
2645
- const i = (f) => E(a).some((h) => {
2646
- if (typeof h == "string") return Array.from(o.document.querySelectorAll(h)).some((g) => g === f.target || f.composedPath().includes(g));
2666
+ const i = (f) => E(a).some((g) => {
2667
+ if (typeof g == "string") return Array.from(o.document.querySelectorAll(g)).some((x) => x === f.target || f.composedPath().includes(x));
2647
2668
  {
2648
- const g = Ne(h);
2649
- return g && (f.target === g || f.composedPath().includes(g));
2669
+ const x = Ne(g);
2670
+ return x && (f.target === x || f.composedPath().includes(x));
2650
2671
  }
2651
2672
  });
2652
- function c(f) {
2653
- const h = E(f);
2654
- return h && h.$.subTree.shapeFlag === 16;
2673
+ function d(f) {
2674
+ const g = E(f);
2675
+ return g && g.$.subTree.shapeFlag === 16;
2655
2676
  }
2656
- function p(f, h) {
2657
- const g = E(f), C = g.$.subTree && g.$.subTree.children;
2658
- return C == null || !Array.isArray(C) ? !1 : C.some((T) => T.el === h.target || h.composedPath().includes(T.el));
2677
+ function m(f, g) {
2678
+ const x = E(f), C = x.$.subTree && x.$.subTree.children;
2679
+ return C == null || !Array.isArray(C) ? !1 : C.some(($) => $.el === g.target || g.composedPath().includes($.el));
2659
2680
  }
2660
- const m = (f) => {
2661
- const h = Ne(e);
2662
- if (f.target != null && !(!(h instanceof Element) && c(e) && p(e, f)) && !(!h || h === f.target || f.composedPath().includes(h))) {
2681
+ const p = (f) => {
2682
+ const g = Ne(e);
2683
+ if (f.target != null && !(!(g instanceof Element) && d(e) && m(e, f)) && !(!g || g === f.target || f.composedPath().includes(g))) {
2663
2684
  if ("detail" in f && f.detail === 0 && (u = !i(f)), !u) {
2664
2685
  u = !0;
2665
2686
  return;
@@ -2668,79 +2689,79 @@ function Jt(e, t, n = {}) {
2668
2689
  }
2669
2690
  };
2670
2691
  let I = !1;
2671
- const b = [
2692
+ const y = [
2672
2693
  Mt(o, "click", (f) => {
2673
2694
  I || (I = !0, setTimeout(() => {
2674
2695
  I = !1;
2675
- }, 0), m(f));
2696
+ }, 0), p(f));
2676
2697
  }, {
2677
2698
  passive: !0,
2678
2699
  capture: r
2679
2700
  }),
2680
2701
  Mt(o, "pointerdown", (f) => {
2681
- const h = Ne(e);
2682
- u = !i(f) && !!(h && !f.composedPath().includes(h));
2702
+ const g = Ne(e);
2703
+ u = !i(f) && !!(g && !f.composedPath().includes(g));
2683
2704
  }, { passive: !0 }),
2684
2705
  s && Mt(o, "blur", (f) => {
2685
2706
  setTimeout(() => {
2686
- var h;
2687
- const g = Ne(e);
2688
- ((h = o.document.activeElement) === null || h === void 0 ? void 0 : h.tagName) === "IFRAME" && !g?.contains(o.document.activeElement) && t(f);
2707
+ var g;
2708
+ const x = Ne(e);
2709
+ ((g = o.document.activeElement) === null || g === void 0 ? void 0 : g.tagName) === "IFRAME" && !x?.contains(o.document.activeElement) && t(f);
2689
2710
  }, 0);
2690
2711
  }, { passive: !0 })
2691
- ].filter(Boolean), x = () => b.forEach((f) => f());
2712
+ ].filter(Boolean), k = () => y.forEach((f) => f());
2692
2713
  return l ? {
2693
- stop: x,
2714
+ stop: k,
2694
2715
  cancel: () => {
2695
2716
  u = !1;
2696
2717
  },
2697
2718
  trigger: (f) => {
2698
- u = !0, m(f), u = !1;
2719
+ u = !0, p(f), u = !1;
2699
2720
  }
2700
- } : x;
2721
+ } : k;
2701
2722
  }
2702
- const jl = {
2723
+ const Kl = {
2703
2724
  multiple: !0,
2704
2725
  accept: "*",
2705
2726
  reset: !1,
2706
2727
  directory: !1
2707
2728
  };
2708
- function Jl(e) {
2729
+ function ea(e) {
2709
2730
  if (!e) return null;
2710
2731
  if (e instanceof FileList) return e;
2711
2732
  const t = new DataTransfer();
2712
2733
  for (const n of e) t.items.add(n);
2713
2734
  return t.files;
2714
2735
  }
2715
- function Ql(e = {}) {
2716
- const { document: t = Xl } = e, n = L(Jl(e.initialFiles)), { on: o, trigger: a } = /* @__PURE__ */ jt(), { on: r, trigger: s } = /* @__PURE__ */ jt(), l = $(() => {
2717
- var p;
2718
- const m = (p = Ne(e.input)) !== null && p !== void 0 ? p : t ? t.createElement("input") : void 0;
2719
- return m && (m.type = "file", m.onchange = (I) => {
2736
+ function ta(e = {}) {
2737
+ const { document: t = Ql } = e, n = L(ea(e.initialFiles)), { on: o, trigger: a } = /* @__PURE__ */ jt(), { on: r, trigger: s } = /* @__PURE__ */ jt(), l = T(() => {
2738
+ var m;
2739
+ const p = (m = Ne(e.input)) !== null && m !== void 0 ? m : t ? t.createElement("input") : void 0;
2740
+ return p && (p.type = "file", p.onchange = (I) => {
2720
2741
  n.value = I.target.files, a(n.value);
2721
- }, m.oncancel = () => {
2742
+ }, p.oncancel = () => {
2722
2743
  s();
2723
- }), m;
2744
+ }), p;
2724
2745
  }), u = () => {
2725
2746
  n.value = null, l.value && l.value.value && (l.value.value = "", a(null));
2726
- }, i = (p) => {
2727
- const m = l.value;
2728
- m && (m.multiple = E(p.multiple), m.accept = E(p.accept), m.webkitdirectory = E(p.directory), zl(p, "capture") && (m.capture = E(p.capture)));
2729
- }, c = (p) => {
2730
- const m = l.value;
2731
- if (!m) return;
2747
+ }, i = (m) => {
2748
+ const p = l.value;
2749
+ p && (p.multiple = E(m.multiple), p.accept = E(m.accept), p.webkitdirectory = E(m.directory), Xl(m, "capture") && (p.capture = E(m.capture)));
2750
+ }, d = (m) => {
2751
+ const p = l.value;
2752
+ if (!p) return;
2732
2753
  const I = {
2733
- ...jl,
2754
+ ...Kl,
2734
2755
  ...e,
2735
- ...p
2756
+ ...m
2736
2757
  };
2737
- i(I), E(I.reset) && u(), m.click();
2758
+ i(I), E(I.reset) && u(), p.click();
2738
2759
  };
2739
- return Qe(() => {
2760
+ return gt(() => {
2740
2761
  i(e);
2741
2762
  }), {
2742
2763
  files: Rt(n),
2743
- open: c,
2764
+ open: d,
2744
2765
  reset: u,
2745
2766
  onCancel: r,
2746
2767
  onChange: o
@@ -2750,10 +2771,10 @@ function Ct(e) {
2750
2771
  return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
2751
2772
  }
2752
2773
  const Et = /* @__PURE__ */ new WeakMap();
2753
- function Kl(e, t = !1) {
2754
- const n = ie(t);
2774
+ function na(e, t = !1) {
2775
+ const n = ue(t);
2755
2776
  let o = "";
2756
- te(ql(e), (s) => {
2777
+ ne(jl(e), (s) => {
2757
2778
  const l = Ct(E(s));
2758
2779
  if (l) {
2759
2780
  const u = l;
@@ -2768,7 +2789,7 @@ function Kl(e, t = !1) {
2768
2789
  const s = Ct(E(e));
2769
2790
  !s || !n.value || (s.style.overflow = o, Et.delete(s), n.value = !1);
2770
2791
  };
2771
- return yn(r), $({
2792
+ return yn(r), T({
2772
2793
  get() {
2773
2794
  return n.value;
2774
2795
  },
@@ -2777,7 +2798,7 @@ function Kl(e, t = !1) {
2777
2798
  }
2778
2799
  });
2779
2800
  }
2780
- const At = /* @__PURE__ */ new WeakMap(), ea = {
2801
+ const At = /* @__PURE__ */ new WeakMap(), oa = {
2781
2802
  mounted(e, t) {
2782
2803
  const n = !t.modifiers.bubble;
2783
2804
  let o;
@@ -2793,27 +2814,36 @@ const At = /* @__PURE__ */ new WeakMap(), ea = {
2793
2814
  t && typeof t == "function" ? t() : t?.stop(), At.delete(e);
2794
2815
  }
2795
2816
  };
2796
- function ta() {
2817
+ function la() {
2797
2818
  let e = !1;
2798
- const t = ie(!1);
2819
+ const t = ue(!1);
2799
2820
  return (n, o) => {
2800
2821
  if (t.value = o.value, e) return;
2801
2822
  e = !0;
2802
- const a = Kl(n, o.value);
2803
- te(t, (r) => a.value = r);
2823
+ const a = na(n, o.value);
2824
+ ne(t, (r) => a.value = r);
2804
2825
  };
2805
2826
  }
2806
- ta();
2807
- const na = { class: "input-wrapper" }, oa = {
2827
+ la();
2828
+ const aa = {
2829
+ key: 0,
2830
+ class: "input-wrapper"
2831
+ }, sa = { class: "aform_display-value" }, ra = { class: "input-wrapper" }, ia = ["disabled"], ua = {
2808
2832
  id: "autocomplete-results",
2809
2833
  class: "autocomplete-results"
2810
- }, la = {
2834
+ }, ca = {
2811
2835
  key: 0,
2812
2836
  class: "loading autocomplete-result"
2813
- }, aa = ["onClick"], sa = /* @__PURE__ */ ne({
2837
+ }, da = ["onClick"], fa = /* @__PURE__ */ oe({
2814
2838
  __name: "ADropdown",
2815
- props: /* @__PURE__ */ Me({
2839
+ props: /* @__PURE__ */ xe({
2840
+ schema: {},
2816
2841
  label: {},
2842
+ mask: {},
2843
+ required: { type: Boolean },
2844
+ mode: {},
2845
+ uuid: {},
2846
+ validation: {},
2817
2847
  items: { default: () => [] },
2818
2848
  isAsync: { type: Boolean, default: !1 },
2819
2849
  filterFunction: { type: Function, default: void 0 }
@@ -2823,7 +2853,7 @@ const na = { class: "input-wrapper" }, oa = {
2823
2853
  }),
2824
2854
  emits: ["update:modelValue"],
2825
2855
  setup(e) {
2826
- const t = ke(e, "modelValue"), n = rn({
2856
+ const t = Me(e, "modelValue"), n = rn({
2827
2857
  activeItemIndex: null,
2828
2858
  open: !1,
2829
2859
  loading: !1,
@@ -2832,8 +2862,8 @@ const na = { class: "input-wrapper" }, oa = {
2832
2862
  if (n.open = !0, n.activeItemIndex = null, e.filterFunction) {
2833
2863
  e.isAsync && (n.loading = !0);
2834
2864
  try {
2835
- const m = await e.filterFunction(t.value || "");
2836
- n.results = m || [];
2865
+ const p = await e.filterFunction(t.value || "");
2866
+ n.results = p || [];
2837
2867
  } catch {
2838
2868
  n.results = [];
2839
2869
  } finally {
@@ -2841,179 +2871,184 @@ const na = { class: "input-wrapper" }, oa = {
2841
2871
  }
2842
2872
  } else
2843
2873
  u();
2844
- }, r = (m) => {
2845
- t.value = m, l(m);
2874
+ }, r = (p) => {
2875
+ t.value = p, l(p);
2846
2876
  }, s = () => {
2847
2877
  n.activeItemIndex = e.isAsync ? null : t.value && e.items?.indexOf(t.value) || null, n.open = !0, n.results = e.isAsync ? [] : e.items;
2848
- }, l = (m) => {
2849
- n.activeItemIndex = null, n.open = !1, e.items?.includes(m || t.value || "") || (t.value = "");
2878
+ }, l = (p) => {
2879
+ n.activeItemIndex = null, n.open = !1, e.items?.includes(p || t.value || "") || (t.value = "");
2850
2880
  }, u = () => {
2851
- t.value ? n.results = e.items?.filter((m) => m.toLowerCase().includes((t.value ?? "").toLowerCase())) : n.results = e.items;
2881
+ t.value ? n.results = e.items?.filter((p) => p.toLowerCase().includes((t.value ?? "").toLowerCase())) : n.results = e.items;
2852
2882
  }, i = () => {
2853
- const m = n.results?.length || 0;
2883
+ const p = n.results?.length || 0;
2854
2884
  if (n.activeItemIndex != null) {
2855
2885
  const I = isNaN(n.activeItemIndex) ? 0 : n.activeItemIndex;
2856
- n.activeItemIndex = (I + 1) % m;
2886
+ n.activeItemIndex = (I + 1) % p;
2857
2887
  } else
2858
2888
  n.activeItemIndex = 0;
2859
- }, c = () => {
2860
- const m = n.results?.length || 0;
2889
+ }, d = () => {
2890
+ const p = n.results?.length || 0;
2861
2891
  if (n.activeItemIndex != null) {
2862
2892
  const I = isNaN(n.activeItemIndex) ? 0 : n.activeItemIndex;
2863
2893
  I === 0 ? n.activeItemIndex = null : n.activeItemIndex = I - 1;
2864
2894
  } else
2865
- n.activeItemIndex = m - 1;
2866
- }, p = () => {
2895
+ n.activeItemIndex = p - 1;
2896
+ }, m = () => {
2867
2897
  if (n.results) {
2868
- const m = n.activeItemIndex || 0, I = n.results[m];
2898
+ const p = n.activeItemIndex || 0, I = n.results[p];
2869
2899
  r(I);
2870
2900
  }
2871
2901
  n.activeItemIndex = 0;
2872
2902
  };
2873
- return (m, I) => J((w(), k("div", {
2874
- class: ae(["autocomplete", { isOpen: n.open }])
2903
+ return (p, I) => e.mode === "display" ? (h(), b("div", aa, [
2904
+ w("span", sa, N(t.value ?? ""), 1),
2905
+ w("label", null, N(e.label), 1)
2906
+ ])) : K((h(), b("div", {
2907
+ key: 1,
2908
+ class: se(["autocomplete", { isOpen: n.open }])
2875
2909
  }, [
2876
- y("div", na, [
2877
- J(y("input", {
2878
- "onUpdate:modelValue": I[0] || (I[0] = (b) => t.value = b),
2910
+ w("div", ra, [
2911
+ K(w("input", {
2912
+ "onUpdate:modelValue": I[0] || (I[0] = (y) => t.value = y),
2879
2913
  type: "text",
2914
+ disabled: e.mode === "read",
2880
2915
  onInput: a,
2881
2916
  onFocus: s,
2882
2917
  onKeydown: [
2883
2918
  Ze(i, ["down"]),
2884
- Ze(c, ["up"]),
2885
- Ze(p, ["enter"]),
2919
+ Ze(d, ["up"]),
2920
+ Ze(m, ["enter"]),
2886
2921
  Ze(o, ["esc"]),
2887
2922
  Ze(o, ["tab"])
2888
2923
  ]
2889
- }, null, 544), [
2924
+ }, null, 40, ia), [
2890
2925
  [we, t.value]
2891
2926
  ]),
2892
- J(y("ul", oa, [
2893
- n.loading ? (w(), k("li", la, "Loading results...")) : (w(!0), k(ue, { key: 1 }, me(n.results, (b, x) => (w(), k("li", {
2894
- key: b,
2895
- class: ae(["autocomplete-result", { "is-active": x === n.activeItemIndex }]),
2896
- onClick: Ie((f) => r(b), ["stop"])
2897
- }, K(b), 11, aa))), 128))
2927
+ K(w("ul", ua, [
2928
+ n.loading ? (h(), b("li", ca, "Loading results...")) : (h(!0), b(X, { key: 1 }, ve(n.results, (y, k) => (h(), b("li", {
2929
+ key: y,
2930
+ class: se(["autocomplete-result", { "is-active": k === n.activeItemIndex }]),
2931
+ onClick: Ie((f) => r(y), ["stop"])
2932
+ }, N(y), 11, da))), 128))
2898
2933
  ], 512), [
2899
2934
  [Ce, n.open]
2900
2935
  ]),
2901
- y("label", null, K(e.label), 1)
2936
+ w("label", null, N(e.label), 1)
2902
2937
  ])
2903
2938
  ], 2)), [
2904
- [V(ea), o]
2939
+ [V(oa), o]
2905
2940
  ]);
2906
2941
  }
2907
- }), ra = /* @__PURE__ */ $e(sa, [["__scopeId", "data-v-31a6db8c"]]);
2908
- function In(e, t) {
2909
- return mt() ? (ht(e, t), !0) : !1;
2942
+ }), va = /* @__PURE__ */ Te(fa, [["__scopeId", "data-v-8728dc72"]]);
2943
+ function kn(e, t) {
2944
+ return mt() ? (pt(e, t), !0) : !1;
2910
2945
  }
2911
- const ia = typeof window < "u" && typeof document < "u";
2946
+ const ma = typeof window < "u" && typeof document < "u";
2912
2947
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
2913
- const ua = (e) => e != null, ca = Object.prototype.toString, da = (e) => ca.call(e) === "[object Object]", fa = () => {
2948
+ const pa = (e) => e != null, ha = Object.prototype.toString, ga = (e) => ha.call(e) === "[object Object]", wa = () => {
2914
2949
  };
2915
- function ct(e) {
2950
+ function ut(e) {
2916
2951
  return Array.isArray(e) ? e : [e];
2917
2952
  }
2918
- function va(e, t, n) {
2919
- return te(e, t, {
2953
+ function ya(e, t, n) {
2954
+ return ne(e, t, {
2920
2955
  ...n,
2921
2956
  immediate: !0
2922
2957
  });
2923
2958
  }
2924
- const qe = ia ? window : void 0;
2959
+ const qe = ma ? window : void 0;
2925
2960
  function Ge(e) {
2926
2961
  var t;
2927
2962
  const n = E(e);
2928
2963
  return (t = n?.$el) !== null && t !== void 0 ? t : n;
2929
2964
  }
2930
- function et(...e) {
2931
- const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n = $(() => {
2932
- const o = ct(E(e[0])).filter((a) => a != null);
2965
+ function Ke(...e) {
2966
+ const t = (o, a, r, s) => (o.addEventListener(a, r, s), () => o.removeEventListener(a, r, s)), n = T(() => {
2967
+ const o = ut(E(e[0])).filter((a) => a != null);
2933
2968
  return o.every((a) => typeof a != "string") ? o : void 0;
2934
2969
  });
2935
- return va(() => {
2970
+ return ya(() => {
2936
2971
  var o, a;
2937
2972
  return [
2938
2973
  (o = (a = n.value) === null || a === void 0 ? void 0 : a.map((r) => Ge(r))) !== null && o !== void 0 ? o : [qe].filter((r) => r != null),
2939
- ct(E(n.value ? e[1] : e[0])),
2940
- ct(V(n.value ? e[2] : e[1])),
2974
+ ut(E(n.value ? e[1] : e[0])),
2975
+ ut(V(n.value ? e[2] : e[1])),
2941
2976
  E(n.value ? e[3] : e[2])
2942
2977
  ];
2943
2978
  }, ([o, a, r, s], l, u) => {
2944
2979
  if (!o?.length || !a?.length || !r?.length) return;
2945
- const i = da(s) ? { ...s } : s, c = o.flatMap((p) => a.flatMap((m) => r.map((I) => t(p, m, I, i))));
2980
+ const i = ga(s) ? { ...s } : s, d = o.flatMap((m) => a.flatMap((p) => r.map((I) => t(m, p, I, i))));
2946
2981
  u(() => {
2947
- c.forEach((p) => p());
2982
+ d.forEach((m) => m());
2948
2983
  });
2949
2984
  }, { flush: "post" });
2950
2985
  }
2951
2986
  // @__NO_SIDE_EFFECTS__
2952
- function pa() {
2953
- const e = ie(!1), t = gt();
2987
+ function ba() {
2988
+ const e = ue(!1), t = ht();
2954
2989
  return t && Ee(() => {
2955
2990
  e.value = !0;
2956
2991
  }, t), e;
2957
2992
  }
2958
2993
  // @__NO_SIDE_EFFECTS__
2959
- function ma(e) {
2960
- const t = /* @__PURE__ */ pa();
2961
- return $(() => (t.value, !!e()));
2994
+ function xa(e) {
2995
+ const t = /* @__PURE__ */ ba();
2996
+ return T(() => (t.value, !!e()));
2962
2997
  }
2963
- function ha(e, t, n = {}) {
2998
+ function ka(e, t, n = {}) {
2964
2999
  const { window: o = qe, ...a } = n;
2965
3000
  let r;
2966
- const s = /* @__PURE__ */ ma(() => o && "MutationObserver" in o), l = () => {
3001
+ const s = /* @__PURE__ */ xa(() => o && "MutationObserver" in o), l = () => {
2967
3002
  r && (r.disconnect(), r = void 0);
2968
- }, u = te($(() => {
2969
- const p = ct(E(e)).map(Ge).filter(ua);
2970
- return new Set(p);
2971
- }), (p) => {
2972
- l(), s.value && p.size && (r = new MutationObserver(t), p.forEach((m) => r.observe(m, a)));
3003
+ }, u = ne(T(() => {
3004
+ const m = ut(E(e)).map(Ge).filter(pa);
3005
+ return new Set(m);
3006
+ }), (m) => {
3007
+ l(), s.value && m.size && (r = new MutationObserver(t), m.forEach((p) => r.observe(p, a)));
2973
3008
  }, {
2974
3009
  immediate: !0,
2975
3010
  flush: "post"
2976
- }), i = () => r?.takeRecords(), c = () => {
3011
+ }), i = () => r?.takeRecords(), d = () => {
2977
3012
  u(), l();
2978
3013
  };
2979
- return In(c), {
3014
+ return kn(d), {
2980
3015
  isSupported: s,
2981
- stop: c,
3016
+ stop: d,
2982
3017
  takeRecords: i
2983
3018
  };
2984
3019
  }
2985
- function ga(e, t, n = {}) {
3020
+ function Ia(e, t, n = {}) {
2986
3021
  const { window: o = qe, document: a = o?.document, flush: r = "sync" } = n;
2987
- if (!o || !a) return fa;
3022
+ if (!o || !a) return wa;
2988
3023
  let s;
2989
- const l = (c) => {
2990
- s?.(), s = c;
2991
- }, u = Qe(() => {
2992
- const c = Ge(e);
2993
- if (c) {
2994
- const { stop: p } = ha(a, (m) => {
2995
- m.map((I) => [...I.removedNodes]).flat().some((I) => I === c || I.contains(c)) && t(m);
3024
+ const l = (d) => {
3025
+ s?.(), s = d;
3026
+ }, u = gt(() => {
3027
+ const d = Ge(e);
3028
+ if (d) {
3029
+ const { stop: m } = ka(a, (p) => {
3030
+ p.map((I) => [...I.removedNodes]).flat().some((I) => I === d || I.contains(d)) && t(p);
2996
3031
  }, {
2997
3032
  window: o,
2998
3033
  childList: !0,
2999
3034
  subtree: !0
3000
3035
  });
3001
- l(p);
3036
+ l(m);
3002
3037
  }
3003
3038
  }, { flush: r }), i = () => {
3004
3039
  u(), l();
3005
3040
  };
3006
- return In(i), i;
3041
+ return kn(i), i;
3007
3042
  }
3008
3043
  // @__NO_SIDE_EFFECTS__
3009
- function wa(e = {}) {
3044
+ function Ma(e = {}) {
3010
3045
  var t;
3011
3046
  const { window: n = qe, deep: o = !0, triggerOnRemoval: a = !1 } = e, r = (t = e.document) !== null && t !== void 0 ? t : n?.document, s = () => {
3012
3047
  let i = r?.activeElement;
3013
3048
  if (o)
3014
- for (var c; i?.shadowRoot; ) i = i == null || (c = i.shadowRoot) === null || c === void 0 ? void 0 : c.activeElement;
3049
+ for (var d; i?.shadowRoot; ) i = i == null || (d = i.shadowRoot) === null || d === void 0 ? void 0 : d.activeElement;
3015
3050
  return i;
3016
- }, l = ie(), u = () => {
3051
+ }, l = ue(), u = () => {
3017
3052
  l.value = s();
3018
3053
  };
3019
3054
  if (n) {
@@ -3021,23 +3056,23 @@ function wa(e = {}) {
3021
3056
  capture: !0,
3022
3057
  passive: !0
3023
3058
  };
3024
- et(n, "blur", (c) => {
3025
- c.relatedTarget === null && u();
3026
- }, i), et(n, "focus", u, i);
3059
+ Ke(n, "blur", (d) => {
3060
+ d.relatedTarget === null && u();
3061
+ }, i), Ke(n, "focus", u, i);
3027
3062
  }
3028
- return a && ga(l, u, { document: r }), u(), l;
3063
+ return a && Ia(l, u, { document: r }), u(), l;
3029
3064
  }
3030
- const ya = "focusin", xa = "focusout", ba = ":focus-within";
3031
- function Ia(e, t = {}) {
3032
- const { window: n = qe } = t, o = $(() => Ge(e)), a = ie(!1), r = $(() => a.value);
3033
- if (!n || !(/* @__PURE__ */ wa(t)).value) return { focused: r };
3065
+ const Ca = "focusin", Ea = "focusout", Aa = ":focus-within";
3066
+ function $a(e, t = {}) {
3067
+ const { window: n = qe } = t, o = T(() => Ge(e)), a = ue(!1), r = T(() => a.value);
3068
+ if (!n || !(/* @__PURE__ */ Ma(t)).value) return { focused: r };
3034
3069
  const s = { passive: !0 };
3035
- return et(o, ya, () => a.value = !0, s), et(o, xa, () => {
3070
+ return Ke(o, Ca, () => a.value = !0, s), Ke(o, Ea, () => {
3036
3071
  var l, u, i;
3037
- return a.value = (l = (u = o.value) === null || u === void 0 || (i = u.matches) === null || i === void 0 ? void 0 : i.call(u, ba)) !== null && l !== void 0 ? l : !1;
3072
+ return a.value = (l = (u = o.value) === null || u === void 0 || (i = u.matches) === null || i === void 0 ? void 0 : i.call(u, Aa)) !== null && l !== void 0 ? l : !1;
3038
3073
  }, s), { focused: r };
3039
3074
  }
3040
- function ka(e, { window: t = qe, scrollTarget: n } = {}) {
3075
+ function Ta(e, { window: t = qe, scrollTarget: n } = {}) {
3041
3076
  const o = L(!1), a = () => {
3042
3077
  if (!t) return;
3043
3078
  const r = t.document, s = Ge(e);
@@ -3048,17 +3083,17 @@ function ka(e, { window: t = qe, scrollTarget: n } = {}) {
3048
3083
  o.value = l.top <= (t.innerHeight || r.documentElement.clientHeight) && l.left <= (t.innerWidth || r.documentElement.clientWidth) && l.bottom >= 0 && l.right >= 0;
3049
3084
  }
3050
3085
  };
3051
- return te(
3086
+ return ne(
3052
3087
  () => Ge(e),
3053
3088
  () => a(),
3054
3089
  { immediate: !0, flush: "post" }
3055
- ), t && et(n || t, "scroll", a, {
3090
+ ), t && Ke(n || t, "scroll", a, {
3056
3091
  capture: !1,
3057
3092
  passive: !0
3058
3093
  }), o;
3059
3094
  }
3060
3095
  const De = (e) => {
3061
- let t = ka(e).value;
3096
+ let t = Ta(e).value;
3062
3097
  return t = t && e.offsetHeight > 0, t;
3063
3098
  }, Se = (e) => e.tabIndex >= 0, Qt = (e) => {
3064
3099
  const t = e.target;
@@ -3076,7 +3111,7 @@ const De = (e) => {
3076
3111
  n && (t = n);
3077
3112
  }
3078
3113
  return t && (!Se(t) || !De(t)) ? Bt(t) : t;
3079
- }, Ma = (e) => {
3114
+ }, Da = (e) => {
3080
3115
  const t = e.target;
3081
3116
  let n;
3082
3117
  if (t instanceof HTMLTableCellElement) {
@@ -3109,7 +3144,7 @@ const De = (e) => {
3109
3144
  n && (t = n);
3110
3145
  }
3111
3146
  return t && (!Se(t) || !De(t)) ? Ft(t) : t;
3112
- }, Ca = (e) => {
3147
+ }, Sa = (e) => {
3113
3148
  const t = e.target;
3114
3149
  let n;
3115
3150
  if (t instanceof HTMLTableCellElement) {
@@ -3144,12 +3179,12 @@ const De = (e) => {
3144
3179
  }, on = (e) => {
3145
3180
  const t = e.target.parentElement?.lastElementChild;
3146
3181
  return t && (!Se(t) || !De(t)) ? Zt(t) : t;
3147
- }, st = ["alt", "control", "shift", "meta"], Ea = {
3182
+ }, at = ["alt", "control", "shift", "meta"], Ra = {
3148
3183
  ArrowUp: "up",
3149
3184
  ArrowDown: "down",
3150
3185
  ArrowLeft: "left",
3151
3186
  ArrowRight: "right"
3152
- }, kn = {
3187
+ }, In = {
3153
3188
  "keydown.up": (e) => {
3154
3189
  const t = Qt(e);
3155
3190
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
@@ -3167,11 +3202,11 @@ const De = (e) => {
3167
3202
  e.preventDefault(), e.stopPropagation(), t && t.focus();
3168
3203
  },
3169
3204
  "keydown.control.up": (e) => {
3170
- const t = Ma(e);
3205
+ const t = Da(e);
3171
3206
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
3172
3207
  },
3173
3208
  "keydown.control.down": (e) => {
3174
- const t = Ca(e);
3209
+ const t = Sa(e);
3175
3210
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
3176
3211
  },
3177
3212
  "keydown.control.left": (e) => {
@@ -3213,7 +3248,7 @@ const De = (e) => {
3213
3248
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
3214
3249
  }
3215
3250
  };
3216
- function Aa(e) {
3251
+ function La(e) {
3217
3252
  const t = (s) => {
3218
3253
  let l = null;
3219
3254
  return s.parent && (typeof s.parent == "string" ? l = document.querySelector(s.parent) : s.parent instanceof HTMLElement ? l = s.parent : l = s.parent.value), l;
@@ -3239,35 +3274,35 @@ function Aa(e) {
3239
3274
  let u = [];
3240
3275
  return s.selectors ? u = n(s) : l && (u = Array.from(l.children).filter((i) => Se(i) && De(i))), u;
3241
3276
  }, a = (s) => (l) => {
3242
- const u = Ea[l.key] || l.key.toLowerCase();
3243
- if (st.includes(u)) return;
3244
- const i = s.handlers || kn;
3245
- for (const c of Object.keys(i)) {
3246
- const [p, ...m] = c.split(".");
3247
- if (p === "keydown" && m.includes(u)) {
3248
- const I = i[c], b = m.filter((f) => st.includes(f)), x = st.some((f) => {
3249
- const h = f.charAt(0).toUpperCase() + f.slice(1);
3250
- return l.getModifierState(h);
3277
+ const u = Ra[l.key] || l.key.toLowerCase();
3278
+ if (at.includes(u)) return;
3279
+ const i = s.handlers || In;
3280
+ for (const d of Object.keys(i)) {
3281
+ const [m, ...p] = d.split(".");
3282
+ if (m === "keydown" && p.includes(u)) {
3283
+ const I = i[d], y = p.filter((f) => at.includes(f)), k = at.some((f) => {
3284
+ const g = f.charAt(0).toUpperCase() + f.slice(1);
3285
+ return l.getModifierState(g);
3251
3286
  });
3252
- if (b.length > 0) {
3253
- if (x) {
3254
- for (const f of st)
3255
- if (m.includes(f)) {
3256
- const h = f.charAt(0).toUpperCase() + f.slice(1);
3257
- l.getModifierState(h) && I(l);
3287
+ if (y.length > 0) {
3288
+ if (k) {
3289
+ for (const f of at)
3290
+ if (p.includes(f)) {
3291
+ const g = f.charAt(0).toUpperCase() + f.slice(1);
3292
+ l.getModifierState(g) && I(l);
3258
3293
  }
3259
3294
  }
3260
3295
  } else
3261
- x || I(l);
3296
+ k || I(l);
3262
3297
  }
3263
3298
  }
3264
3299
  }, r = [];
3265
3300
  Ee(() => {
3266
3301
  for (const s of e) {
3267
- const l = t(s), u = o(s), i = a(s), c = l ? [l] : u;
3268
- for (const p of c) {
3269
- const { focused: m } = Ia(L(p)), I = te(m, (b) => {
3270
- b ? p.addEventListener("keydown", i) : p.removeEventListener("keydown", i);
3302
+ const l = t(s), u = o(s), i = a(s), d = l ? [l] : u;
3303
+ for (const m of d) {
3304
+ const { focused: p } = $a(L(m)), I = ne(p, (y) => {
3305
+ y ? m.addEventListener("keydown", i) : m.removeEventListener("keydown", i);
3271
3306
  });
3272
3307
  r.push(I);
3273
3308
  }
@@ -3277,276 +3312,316 @@ function Aa(e) {
3277
3312
  s();
3278
3313
  });
3279
3314
  }
3280
- const Ta = {
3315
+ const Ha = { class: "aform_display-value" }, Va = { key: 0 }, _a = {
3316
+ key: 1,
3281
3317
  ref: "datepicker",
3282
3318
  class: "adatepicker",
3283
3319
  tabindex: "0"
3284
- }, $a = {
3320
+ }, Pa = {
3285
3321
  colspan: "5",
3286
3322
  tabindex: -1
3287
- }, Da = ["onClick", "onKeydown"], Sa = 6, ln = 7, Ra = /* @__PURE__ */ ne({
3323
+ }, Oa = ["onClick", "onKeydown"], Ba = 6, ln = 7, Fa = /* @__PURE__ */ oe({
3288
3324
  __name: "ADatePicker",
3289
- props: {
3325
+ props: /* @__PURE__ */ xe({
3326
+ schema: {},
3327
+ label: {},
3328
+ mask: {},
3329
+ required: { type: Boolean },
3330
+ mode: {},
3331
+ uuid: {},
3332
+ validation: {}
3333
+ }, {
3290
3334
  modelValue: { default: /* @__PURE__ */ new Date() },
3291
3335
  modelModifiers: {}
3292
- },
3336
+ }),
3293
3337
  emits: ["update:modelValue"],
3294
3338
  setup(e, { expose: t }) {
3295
- const n = ke(e, "modelValue"), o = L(new Date(n.value)), a = L(o.value.getMonth()), r = L(o.value.getFullYear()), s = L([]), l = fe("datepicker");
3339
+ const n = Me(e, "modelValue"), o = L(new Date(n.value)), a = L(o.value.getMonth()), r = L(o.value.getFullYear()), s = L([]), l = fe("datepicker");
3296
3340
  Ee(async () => {
3297
- u(), await pt();
3341
+ u(), await vt();
3298
3342
  const C = document.getElementsByClassName("selectedDate");
3299
3343
  if (C.length > 0)
3300
3344
  C[0].focus();
3301
3345
  else {
3302
- const T = document.getElementsByClassName("todaysDate");
3303
- T.length > 0 && T[0].focus();
3346
+ const $ = document.getElementsByClassName("todaysDate");
3347
+ $.length > 0 && $[0].focus();
3304
3348
  }
3305
3349
  });
3306
3350
  const u = () => {
3307
3351
  s.value = [];
3308
- const C = new Date(r.value, a.value, 1), T = C.getDay(), R = C.setDate(C.getDate() - T);
3352
+ const C = new Date(r.value, a.value, 1), $ = C.getDay(), R = C.setDate(C.getDate() - $);
3309
3353
  for (const S of Array(43).keys())
3310
3354
  s.value.push(R + S * 864e5);
3311
3355
  };
3312
- te([a, r], u);
3313
- const i = () => r.value -= 1, c = () => r.value += 1, p = () => {
3356
+ ne([a, r], u);
3357
+ const i = () => r.value -= 1, d = () => r.value += 1, m = () => {
3314
3358
  a.value == 0 ? (a.value = 11, i()) : a.value -= 1;
3315
- }, m = () => {
3316
- a.value == 11 ? (a.value = 0, c()) : a.value += 1;
3359
+ }, p = () => {
3360
+ a.value == 11 ? (a.value = 0, d()) : a.value += 1;
3317
3361
  }, I = (C) => {
3318
- const T = /* @__PURE__ */ new Date();
3319
- if (a.value === T.getMonth())
3320
- return T.toDateString() === new Date(C).toDateString();
3321
- }, b = (C) => new Date(C).toDateString() === new Date(o.value).toDateString(), x = (C, T) => (C - 1) * ln + T, f = (C, T) => s.value[x(C, T)], h = (C) => {
3362
+ const $ = /* @__PURE__ */ new Date();
3363
+ if (a.value === $.getMonth())
3364
+ return $.toDateString() === new Date(C).toDateString();
3365
+ }, y = (C) => new Date(C).toDateString() === new Date(o.value).toDateString(), k = (C, $) => (C - 1) * ln + $, f = (C, $) => s.value[k(C, $)], g = (C) => {
3322
3366
  n.value = o.value = new Date(s.value[C]);
3323
- }, g = $(() => new Date(r.value, a.value, 1).toLocaleDateString(void 0, {
3367
+ }, x = T(() => new Date(r.value, a.value, 1).toLocaleDateString(void 0, {
3324
3368
  year: "numeric",
3325
3369
  month: "long"
3326
3370
  }));
3327
- return Aa([
3371
+ return La([
3328
3372
  {
3329
3373
  parent: l,
3330
3374
  selectors: "td",
3331
3375
  handlers: {
3332
- ...kn,
3333
- "keydown.pageup": p,
3376
+ ...In,
3377
+ "keydown.pageup": m,
3334
3378
  "keydown.shift.pageup": i,
3335
- "keydown.pagedown": m,
3336
- "keydown.shift.pagedown": c,
3379
+ "keydown.pagedown": p,
3380
+ "keydown.shift.pagedown": d,
3337
3381
  // TODO: this is a hack to override the stonecrop enter handler;
3338
3382
  // store context inside the component so that handlers can be setup consistently
3339
3383
  "keydown.enter": () => {
3340
3384
  }
3341
3385
  }
3342
3386
  }
3343
- ]), t({ currentMonth: a, currentYear: r, selectedDate: o }), (C, T) => (w(), k("div", Ta, [
3344
- y("table", null, [
3345
- y("tbody", null, [
3346
- y("tr", null, [
3347
- y("td", {
3387
+ ]), t({ currentMonth: a, currentYear: r, selectedDate: o }), (C, $) => e.mode === "display" || e.mode === "read" ? (h(), b(X, { key: 0 }, [
3388
+ w("span", Ha, N(n.value ? new Date(n.value).toLocaleDateString() : ""), 1),
3389
+ e.label ? (h(), b("label", Va, N(e.label), 1)) : Y("", !0)
3390
+ ], 64)) : (h(), b("div", _a, [
3391
+ w("table", null, [
3392
+ w("tbody", null, [
3393
+ w("tr", null, [
3394
+ w("td", {
3348
3395
  id: "previous-month-btn",
3349
3396
  tabindex: -1,
3350
- onClick: p
3397
+ onClick: m
3351
3398
  }, "<"),
3352
- y("th", $a, K(g.value), 1),
3353
- y("td", {
3399
+ w("th", Pa, N(x.value), 1),
3400
+ w("td", {
3354
3401
  id: "next-month-btn",
3355
3402
  tabindex: -1,
3356
- onClick: m
3403
+ onClick: p
3357
3404
  }, ">")
3358
3405
  ]),
3359
- T[0] || (T[0] = y("tr", { class: "days-header" }, [
3360
- y("td", null, "M"),
3361
- y("td", null, "T"),
3362
- y("td", null, "W"),
3363
- y("td", null, "T"),
3364
- y("td", null, "F"),
3365
- y("td", null, "S"),
3366
- y("td", null, "S")
3406
+ $[0] || ($[0] = w("tr", { class: "days-header" }, [
3407
+ w("td", null, "M"),
3408
+ w("td", null, "T"),
3409
+ w("td", null, "W"),
3410
+ w("td", null, "T"),
3411
+ w("td", null, "F"),
3412
+ w("td", null, "S"),
3413
+ w("td", null, "S")
3367
3414
  ], -1)),
3368
- (w(), k(ue, null, me(Sa, (R) => y("tr", { key: R }, [
3369
- (w(), k(ue, null, me(ln, (S) => y("td", {
3415
+ (h(), b(X, null, ve(Ba, (R) => w("tr", { key: R }, [
3416
+ (h(), b(X, null, ve(ln, (S) => w("td", {
3370
3417
  ref_for: !0,
3371
3418
  ref: "celldate",
3372
- key: x(R, S),
3419
+ key: k(R, S),
3373
3420
  contenteditable: !1,
3374
3421
  spellcheck: !1,
3375
3422
  tabindex: 0,
3376
- class: ae({
3423
+ class: se({
3377
3424
  todaysDate: I(f(R, S)),
3378
- selectedDate: b(f(R, S))
3425
+ selectedDate: y(f(R, S))
3379
3426
  }),
3380
- onClick: Ie((O) => h(x(R, S)), ["prevent", "stop"]),
3381
- onKeydown: Ze((O) => h(x(R, S)), ["enter"])
3382
- }, K(new Date(f(R, S)).getDate()), 43, Da)), 64))
3427
+ onClick: Ie((O) => g(k(R, S)), ["prevent", "stop"]),
3428
+ onKeydown: Ze((O) => g(k(R, S)), ["enter"])
3429
+ }, N(new Date(f(R, S)).getDate()), 43, Oa)), 64))
3383
3430
  ])), 64))
3384
3431
  ])
3385
3432
  ])
3386
3433
  ], 512));
3387
3434
  }
3388
- }), La = /* @__PURE__ */ $e(Ra, [["__scopeId", "data-v-056d2b5e"]]), Ha = /* @__PURE__ */ ne({
3435
+ }), Za = /* @__PURE__ */ Te(Fa, [["__scopeId", "data-v-9da05d06"]]), Na = /* @__PURE__ */ oe({
3389
3436
  __name: "CollapseButton",
3390
3437
  props: {
3391
3438
  collapsed: { type: Boolean }
3392
3439
  },
3393
3440
  setup(e) {
3394
- return (t, n) => (w(), k("button", {
3395
- class: ae(["collapse-button", e.collapsed ? "rotated" : "unrotated"])
3441
+ return (t, n) => (h(), b("button", {
3442
+ class: se(["collapse-button", e.collapsed ? "rotated" : "unrotated"])
3396
3443
  }, "×", 2));
3397
3444
  }
3398
- }), Va = /* @__PURE__ */ $e(Ha, [["__scopeId", "data-v-6f1c1b45"]]), Pa = { class: "aform" }, _a = {
3445
+ }), Ua = /* @__PURE__ */ Te(Na, [["__scopeId", "data-v-6f1c1b45"]]), Wa = { class: "aform" }, Ga = {
3399
3446
  key: 0,
3400
3447
  class: "aform-nested-section"
3401
- }, Oa = {
3448
+ }, za = {
3402
3449
  key: 0,
3403
3450
  class: "aform-nested-label"
3404
- }, Ba = /* @__PURE__ */ ne({
3451
+ }, qa = /* @__PURE__ */ oe({
3405
3452
  __name: "AForm",
3406
- props: /* @__PURE__ */ Me({
3453
+ props: /* @__PURE__ */ xe({
3407
3454
  schema: {},
3408
- readOnly: { type: Boolean }
3455
+ mode: { default: "edit" }
3409
3456
  }, {
3410
3457
  data: { required: !0 },
3411
3458
  dataModifiers: {}
3412
3459
  }),
3413
- emits: /* @__PURE__ */ Me(["update:schema", "update:data"], ["update:data"]),
3460
+ emits: /* @__PURE__ */ xe(["update:schema", "update:data"], ["update:data"]),
3414
3461
  setup(e, { emit: t }) {
3415
- const n = t, o = ke(e, "data"), a = L({});
3416
- te(
3462
+ const n = t, o = Me(e, "data"), a = L({});
3463
+ ne(
3417
3464
  () => o.value,
3418
- (i) => {
3419
- !e.schema || !i || e.schema.forEach((c) => {
3420
- "schema" in c && Array.isArray(c.schema) && c.schema.length > 0 && (a.value[c.fieldname] = i[c.fieldname] ?? {});
3465
+ (m) => {
3466
+ !e.schema || !m || e.schema.forEach((p) => {
3467
+ "schema" in p && Array.isArray(p.schema) && p.schema.length > 0 && (a.value[p.fieldname] = m[p.fieldname] ?? {});
3421
3468
  });
3422
3469
  },
3423
3470
  { immediate: !0 }
3424
3471
  );
3425
- const r = (i, c) => {
3426
- a.value[i] = c, o.value && (o.value[i] = c, n("update:data", o.value));
3427
- };
3428
- Qe(() => {
3429
- o.value && e.schema && e.schema.forEach((i) => {
3430
- i.fieldname && o.value[i.fieldname] !== void 0 && (i.value = o.value[i.fieldname]);
3431
- });
3432
- });
3433
- const s = (i) => {
3434
- const c = {};
3435
- for (const [p, m] of Object.entries(i))
3436
- ["component", "fieldtype"].includes(p) || (c[p] = m), p === "rows" && (!m || Array.isArray(m) && m.length === 0) && (c.rows = o.value[i.fieldname] || []);
3437
- return c;
3438
- }, l = L([]);
3439
- Qe(() => {
3440
- e.schema && l.value.length !== e.schema.length && (l.value = e.schema.map((i, c) => $({
3472
+ const r = (m, p) => {
3473
+ a.value[m] = p, o.value && (o.value[m] = p, n("update:data", { ...o.value }));
3474
+ }, s = (m) => {
3475
+ const p = {};
3476
+ for (const [I, y] of Object.entries(m))
3477
+ ["component", "fieldtype", "mode"].includes(I) || (p[I] = y), I === "rows" && (!y || Array.isArray(y) && y.length === 0) && (p.rows = o.value[m.fieldname] || []);
3478
+ return p;
3479
+ }, l = T(() => e.mode ?? "edit");
3480
+ function u(m) {
3481
+ const p = m.mode;
3482
+ return p || l.value;
3483
+ }
3484
+ const i = L([]);
3485
+ gt(() => {
3486
+ e.schema && i.value.length !== e.schema.length && (i.value = e.schema.map((m, p) => T({
3441
3487
  get() {
3442
- return i.value;
3488
+ return o.value?.[e.schema[p].fieldname];
3443
3489
  },
3444
- set: (p) => {
3445
- const m = e.schema[c].fieldname;
3446
- e.schema[c].value = p, m && o.value && (o.value[m] = p, n("update:data", o.value)), n("update:schema", e.schema);
3490
+ set: (I) => {
3491
+ const y = e.schema[p].fieldname;
3492
+ y && o.value && (o.value[y] = I, n("update:data", { ...o.value })), n("update:schema", e.schema);
3447
3493
  }
3448
3494
  })));
3449
3495
  });
3450
- const u = $(() => l.value);
3451
- return (i, c) => {
3452
- const p = dn("AForm", !0);
3453
- return w(), k("form", Pa, [
3454
- (w(!0), k(ue, null, me(e.schema, (m, I) => (w(), k(ue, { key: I }, [
3455
- "schema" in m && Array.isArray(m.schema) && m.schema.length > 0 ? (w(), k("div", _a, [
3456
- m.label ? (w(), k("h4", Oa, K(m.label), 1)) : q("", !0),
3457
- dt(p, {
3458
- data: a.value[m.fieldname],
3459
- "onUpdate:data": (b) => r(m.fieldname, b),
3460
- schema: m.schema,
3461
- "read-only": e.readOnly || m.readOnly
3462
- }, null, 8, ["data", "onUpdate:data", "schema", "read-only"])
3463
- ])) : (w(), pe(Ue(m.component), vt({
3496
+ const d = T(() => i.value);
3497
+ return (m, p) => {
3498
+ const I = dn("AForm", !0);
3499
+ return h(), b("form", Wa, [
3500
+ (h(!0), b(X, null, ve(e.schema, (y, k) => (h(), b(X, { key: k }, [
3501
+ "schema" in y && Array.isArray(y.schema) && y.schema.length > 0 ? (h(), b("div", Ga, [
3502
+ y.label ? (h(), b("h4", za, N(y.label), 1)) : Y("", !0),
3503
+ ct(I, {
3504
+ data: a.value[y.fieldname],
3505
+ mode: u(y),
3506
+ schema: y.schema,
3507
+ "onUpdate:data": (f) => r(y.fieldname, f)
3508
+ }, null, 8, ["data", "mode", "schema", "onUpdate:data"])
3509
+ ])) : (h(), pe(Ue(y.component), ft({
3464
3510
  key: 1,
3465
- modelValue: u.value[I].value,
3466
- "onUpdate:modelValue": (b) => u.value[I].value = b,
3467
- schema: m,
3468
- data: o.value[m.fieldname],
3469
- "read-only": e.readOnly
3470
- }, { ref_for: !0 }, s(m)), null, 16, ["modelValue", "onUpdate:modelValue", "schema", "data", "read-only"]))
3511
+ modelValue: d.value[k].value,
3512
+ "onUpdate:modelValue": (f) => d.value[k].value = f,
3513
+ schema: y,
3514
+ data: o.value[y.fieldname],
3515
+ mode: u(y)
3516
+ }, { ref_for: !0 }, s(y)), null, 16, ["modelValue", "onUpdate:modelValue", "schema", "data", "mode"]))
3471
3517
  ], 64))), 128))
3472
3518
  ]);
3473
3519
  };
3474
3520
  }
3475
- }), Mn = /* @__PURE__ */ $e(Ba, [["__scopeId", "data-v-a3cba83d"]]), Fa = /* @__PURE__ */ ne({
3521
+ }), Mn = /* @__PURE__ */ Te(qa, [["__scopeId", "data-v-5c01cea5"]]), Ya = /* @__PURE__ */ oe({
3476
3522
  __name: "AFieldset",
3477
3523
  props: {
3478
3524
  schema: {},
3479
3525
  label: {},
3480
3526
  collapsible: { type: Boolean },
3481
- data: { default: () => ({}) }
3527
+ data: { default: () => ({}) },
3528
+ mode: { default: "edit" }
3482
3529
  },
3483
3530
  setup(e, { expose: t }) {
3484
3531
  const n = L(!1), o = L(e.data || []), a = L(e.schema), r = (s) => {
3485
3532
  s.preventDefault(), e.collapsible && (n.value = !n.value);
3486
3533
  };
3487
- return t({ collapsed: n }), (s, l) => (w(), k("fieldset", null, [
3488
- y("legend", {
3534
+ return t({ collapsed: n }), (s, l) => (h(), b("fieldset", null, [
3535
+ w("legend", {
3489
3536
  onClick: r,
3490
3537
  onSubmit: r
3491
3538
  }, [
3492
- Dt(K(e.label) + " ", 1),
3493
- e.collapsible ? (w(), pe(Va, {
3539
+ Dt(N(e.label) + " ", 1),
3540
+ e.collapsible ? (h(), pe(Ua, {
3494
3541
  key: 0,
3495
3542
  collapsed: n.value
3496
- }, null, 8, ["collapsed"])) : q("", !0)
3543
+ }, null, 8, ["collapsed"])) : Y("", !0)
3497
3544
  ], 32),
3498
3545
  he(s.$slots, "default", { collapsed: n.value }, () => [
3499
- J(dt(Mn, {
3500
- schema: a.value,
3546
+ K(ct(Mn, {
3501
3547
  data: o.value,
3502
- "onUpdate:data": l[0] || (l[0] = (u) => o.value = u)
3503
- }, null, 8, ["schema", "data"]), [
3548
+ "onUpdate:data": l[0] || (l[0] = (u) => o.value = u),
3549
+ schema: a.value,
3550
+ mode: e.mode
3551
+ }, null, 8, ["data", "schema", "mode"]), [
3504
3552
  [Ce, !n.value]
3505
3553
  ])
3506
3554
  ], !0)
3507
3555
  ]));
3508
3556
  }
3509
- }), Za = /* @__PURE__ */ $e(Fa, [["__scopeId", "data-v-18fd6c61"]]), Na = { class: "aform_form-element aform_file-attach aform__grid--full" }, Ua = {
3557
+ }), Xa = /* @__PURE__ */ Te(Ya, [["__scopeId", "data-v-a3606386"]]), ja = { class: "aform_form-element aform_file-attach aform__grid--full" }, Ja = {
3510
3558
  key: 0,
3511
3559
  class: "aform_file-attach-feedback"
3512
- }, Wa = ["disabled"], Ga = /* @__PURE__ */ ne({
3560
+ }, Qa = {
3561
+ key: 1,
3562
+ class: "aform_display-value"
3563
+ }, Ka = {
3564
+ key: 0,
3565
+ class: "aform_file-attach-feedback"
3566
+ }, es = ["disabled"], ts = ["disabled"], ns = /* @__PURE__ */ oe({
3513
3567
  __name: "AFileAttach",
3514
3568
  props: {
3515
- label: {}
3569
+ schema: {},
3570
+ label: {},
3571
+ mask: {},
3572
+ required: { type: Boolean },
3573
+ mode: {},
3574
+ uuid: {},
3575
+ validation: {}
3516
3576
  },
3517
3577
  setup(e) {
3518
- const { files: t, open: n, reset: o, onChange: a } = Ql(), r = $(() => `${t.value.length} ${t.value.length === 1 ? "file" : "files"}`);
3519
- return a((s) => s), (s, l) => (w(), k("div", Na, [
3520
- V(t) ? (w(), k("div", Ua, [
3521
- y("p", null, [
3522
- l[2] || (l[2] = Dt(" You have selected: ", -1)),
3523
- y("b", null, K(r.value), 1)
3524
- ]),
3525
- (w(!0), k(ue, null, me(V(t), (u) => (w(), k("li", {
3526
- key: u.name
3527
- }, K(u.name), 1))), 128))
3528
- ])) : q("", !0),
3529
- y("button", {
3530
- type: "button",
3531
- class: "aform_form-btn",
3532
- onClick: l[0] || (l[0] = (u) => V(n)())
3533
- }, K(e.label), 1),
3534
- y("button", {
3535
- type: "button",
3536
- disabled: !V(t),
3537
- class: "aform_form-btn",
3538
- onClick: l[1] || (l[1] = (u) => V(o)())
3539
- }, "Reset", 8, Wa)
3578
+ const { files: t, open: n, reset: o, onChange: a } = ta(), r = T(() => {
3579
+ const s = t.value?.length ?? 0;
3580
+ return `${s} ${s === 1 ? "file" : "files"}`;
3581
+ });
3582
+ return a((s) => s), (s, l) => (h(), b("div", ja, [
3583
+ e.mode === "display" ? (h(), b(X, { key: 0 }, [
3584
+ V(t) ? (h(), b("div", Ja, [
3585
+ w("p", null, [
3586
+ w("b", null, N(r.value), 1)
3587
+ ]),
3588
+ (h(!0), b(X, null, ve(V(t), (u) => (h(), b("li", {
3589
+ key: u.name
3590
+ }, N(u.name), 1))), 128))
3591
+ ])) : (h(), b("span", Qa, "No file selected"))
3592
+ ], 64)) : (h(), b(X, { key: 1 }, [
3593
+ V(t) ? (h(), b("div", Ka, [
3594
+ w("p", null, [
3595
+ l[2] || (l[2] = Dt(" You have selected: ", -1)),
3596
+ w("b", null, N(r.value), 1)
3597
+ ]),
3598
+ (h(!0), b(X, null, ve(V(t), (u) => (h(), b("li", {
3599
+ key: u.name
3600
+ }, N(u.name), 1))), 128))
3601
+ ])) : Y("", !0),
3602
+ w("button", {
3603
+ type: "button",
3604
+ class: "aform_form-btn",
3605
+ disabled: e.mode === "read",
3606
+ onClick: l[0] || (l[0] = (u) => V(n)())
3607
+ }, N(e.label), 9, es),
3608
+ w("button", {
3609
+ type: "button",
3610
+ disabled: !V(t) || e.mode === "read",
3611
+ class: "aform_form-btn",
3612
+ onClick: l[1] || (l[1] = (u) => V(o)())
3613
+ }, "Reset", 8, ts)
3614
+ ], 64))
3540
3615
  ]));
3541
3616
  }
3542
- }), za = /* @__PURE__ */ $e(Ga, [["__scopeId", "data-v-b700734f"]]), qa = { class: "aform_form-element" }, Ya = ["id", "disabled", "required"], Xa = ["for"], ja = ["innerHTML"], Ja = /* @__PURE__ */ ne({
3617
+ }), os = /* @__PURE__ */ Te(ns, [["__scopeId", "data-v-6543d39a"]]), ls = { class: "aform_form-element" }, as = { class: "aform_display-value" }, ss = { class: "aform_field-label" }, rs = ["id", "disabled", "required"], is = ["for"], us = ["innerHTML"], cs = /* @__PURE__ */ oe({
3543
3618
  __name: "ANumericInput",
3544
- props: /* @__PURE__ */ Me({
3619
+ props: /* @__PURE__ */ xe({
3545
3620
  schema: {},
3546
3621
  label: {},
3547
3622
  mask: {},
3548
3623
  required: { type: Boolean },
3549
- readOnly: { type: Boolean },
3624
+ mode: {},
3550
3625
  uuid: {},
3551
3626
  validation: { default: () => ({ errorMessage: "&nbsp;" }) }
3552
3627
  }, {
@@ -3555,28 +3630,33 @@ const Ta = {
3555
3630
  }),
3556
3631
  emits: ["update:modelValue"],
3557
3632
  setup(e) {
3558
- const t = ke(e, "modelValue");
3559
- return (n, o) => (w(), k("div", qa, [
3560
- J(y("input", {
3561
- id: e.uuid,
3562
- "onUpdate:modelValue": o[0] || (o[0] = (a) => t.value = a),
3563
- class: "aform_input-field",
3564
- type: "number",
3565
- disabled: e.readOnly,
3566
- required: e.required
3567
- }, null, 8, Ya), [
3568
- [we, t.value]
3569
- ]),
3570
- y("label", {
3571
- class: "aform_field-label",
3572
- for: e.uuid
3573
- }, K(e.label), 9, Xa),
3574
- J(y("p", {
3575
- class: "aform_error",
3576
- innerHTML: e.validation.errorMessage
3577
- }, null, 8, ja), [
3578
- [Ce, e.validation.errorMessage]
3579
- ])
3633
+ const t = Me(e, "modelValue");
3634
+ return (n, o) => (h(), b("div", ls, [
3635
+ e.mode === "display" ? (h(), b(X, { key: 0 }, [
3636
+ w("span", as, N(t.value ?? ""), 1),
3637
+ w("label", ss, N(e.label), 1)
3638
+ ], 64)) : (h(), b(X, { key: 1 }, [
3639
+ K(w("input", {
3640
+ id: e.uuid,
3641
+ "onUpdate:modelValue": o[0] || (o[0] = (a) => t.value = a),
3642
+ class: "aform_input-field",
3643
+ type: "number",
3644
+ disabled: e.mode === "read",
3645
+ required: e.required
3646
+ }, null, 8, rs), [
3647
+ [we, t.value]
3648
+ ]),
3649
+ w("label", {
3650
+ class: "aform_field-label",
3651
+ for: e.uuid
3652
+ }, N(e.label), 9, is),
3653
+ K(w("p", {
3654
+ class: "aform_error",
3655
+ innerHTML: e.validation.errorMessage
3656
+ }, null, 8, us), [
3657
+ [Ce, e.validation.errorMessage]
3658
+ ])
3659
+ ], 64))
3580
3660
  ]));
3581
3661
  }
3582
3662
  }), an = {
@@ -3587,16 +3667,16 @@ const Ta = {
3587
3667
  phone: "(###) ### - ####",
3588
3668
  card: "#### #### #### ####"
3589
3669
  };
3590
- function Qa(e) {
3670
+ function ds(e) {
3591
3671
  try {
3592
3672
  return Function(`"use strict";return (${e})`)();
3593
3673
  } catch {
3594
3674
  }
3595
3675
  }
3596
- function Ka(e) {
3676
+ function fs(e) {
3597
3677
  let t = e.value;
3598
3678
  if (t) {
3599
- const n = Qa(t);
3679
+ const n = ds(t);
3600
3680
  if (n) {
3601
3681
  const o = e.instance?.locale;
3602
3682
  t = n(o);
@@ -3607,14 +3687,14 @@ function Ka(e) {
3607
3687
  }
3608
3688
  return t;
3609
3689
  }
3610
- function es(e, t) {
3690
+ function vs(e, t) {
3611
3691
  let n = e;
3612
3692
  const o = [t, "/", "-", "(", ")", " "];
3613
3693
  for (const a of o)
3614
3694
  n = n.replaceAll(a, "");
3615
3695
  return n;
3616
3696
  }
3617
- function ts(e, t, n) {
3697
+ function ms(e, t, n) {
3618
3698
  let o = t;
3619
3699
  for (const a of e) {
3620
3700
  const r = o.indexOf(n);
@@ -3625,24 +3705,24 @@ function ts(e, t, n) {
3625
3705
  }
3626
3706
  return o.slice(0, t.length);
3627
3707
  }
3628
- function ns(e, t) {
3629
- const n = Ka(t);
3708
+ function ps(e, t) {
3709
+ const n = fs(t);
3630
3710
  if (!n) return;
3631
- const o = "#", a = e.value, r = es(a, o);
3711
+ const o = "#", a = e.value, r = vs(a, o);
3632
3712
  if (r) {
3633
- const s = ts(r, n, o);
3713
+ const s = ms(r, n, o);
3634
3714
  t.instance?.maskFilled && (t.instance.maskFilled = !s.includes(o)), e.value = s;
3635
3715
  } else
3636
3716
  e.value = n;
3637
3717
  }
3638
- const os = { class: "aform_form-element" }, ls = ["id", "disabled", "maxlength", "required"], as = ["for"], ss = ["innerHTML"], rs = /* @__PURE__ */ ne({
3718
+ const hs = { class: "aform_form-element" }, gs = { class: "aform_display-value" }, ws = { class: "aform_field-label" }, ys = ["id", "disabled", "maxlength", "required"], bs = ["for"], xs = ["innerHTML"], ks = /* @__PURE__ */ oe({
3639
3719
  __name: "ATextInput",
3640
- props: /* @__PURE__ */ Me({
3720
+ props: /* @__PURE__ */ xe({
3641
3721
  schema: {},
3642
3722
  label: {},
3643
3723
  mask: {},
3644
3724
  required: { type: Boolean },
3645
- readOnly: { type: Boolean },
3725
+ mode: {},
3646
3726
  uuid: {},
3647
3727
  validation: { default: () => ({ errorMessage: "&nbsp;" }) }
3648
3728
  }, {
@@ -3651,35 +3731,40 @@ const os = { class: "aform_form-element" }, ls = ["id", "disabled", "maxlength",
3651
3731
  }),
3652
3732
  emits: ["update:modelValue"],
3653
3733
  setup(e) {
3654
- const t = L(!0), n = ke(e, "modelValue");
3655
- return (o, a) => (w(), k("div", os, [
3656
- J(y("input", {
3657
- id: e.uuid,
3658
- "onUpdate:modelValue": a[0] || (a[0] = (r) => n.value = r),
3659
- class: "aform_input-field",
3660
- disabled: e.readOnly,
3661
- maxlength: e.mask && t.value ? e.mask.length : void 0,
3662
- required: e.required
3663
- }, null, 8, ls), [
3664
- [we, n.value],
3665
- [V(ns), e.mask]
3666
- ]),
3667
- y("label", {
3668
- class: "aform_field-label",
3669
- for: e.uuid
3670
- }, K(e.label), 9, as),
3671
- J(y("p", {
3672
- class: "aform_error",
3673
- innerHTML: e.validation.errorMessage
3674
- }, null, 8, ss), [
3675
- [Ce, e.validation.errorMessage]
3676
- ])
3734
+ const t = L(!0), n = Me(e, "modelValue");
3735
+ return (o, a) => (h(), b("div", hs, [
3736
+ e.mode === "display" ? (h(), b(X, { key: 0 }, [
3737
+ w("span", gs, N(n.value ?? ""), 1),
3738
+ w("label", ws, N(e.label), 1)
3739
+ ], 64)) : (h(), b(X, { key: 1 }, [
3740
+ K(w("input", {
3741
+ id: e.uuid,
3742
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => n.value = r),
3743
+ class: "aform_input-field",
3744
+ disabled: e.mode === "read",
3745
+ maxlength: e.mask && t.value ? e.mask.length : void 0,
3746
+ required: e.required
3747
+ }, null, 8, ys), [
3748
+ [we, n.value],
3749
+ [V(ps), e.mask]
3750
+ ]),
3751
+ w("label", {
3752
+ class: "aform_field-label",
3753
+ for: e.uuid
3754
+ }, N(e.label), 9, bs),
3755
+ K(w("p", {
3756
+ class: "aform_error",
3757
+ innerHTML: e.validation.errorMessage
3758
+ }, null, 8, xs), [
3759
+ [Ce, e.validation.errorMessage]
3760
+ ])
3761
+ ], 64))
3677
3762
  ]));
3678
3763
  }
3679
- }), is = { class: "login-container" }, us = { class: "account-container" }, cs = { class: "account-header" }, ds = { id: "account-title" }, fs = { id: "account-subtitle" }, vs = { class: "login-form-container" }, ps = { class: "login-form-email aform_form-element" }, ms = ["disabled"], hs = { class: "login-form-password aform_form-element" }, gs = ["disabled"], ws = ["disabled"], ys = {
3764
+ }), Is = { class: "login-container" }, Ms = { class: "account-container" }, Cs = { class: "account-header" }, Es = { id: "account-title" }, As = { id: "account-subtitle" }, $s = { class: "login-form-container" }, Ts = { class: "login-form-email aform_form-element" }, Ds = ["disabled"], Ss = { class: "login-form-password aform_form-element" }, Rs = ["disabled"], Ls = ["disabled"], Hs = {
3680
3765
  key: 0,
3681
3766
  class: "material-symbols-outlined loading-icon"
3682
- }, xs = /* @__PURE__ */ ne({
3767
+ }, Vs = /* @__PURE__ */ oe({
3683
3768
  __name: "Login",
3684
3769
  props: {
3685
3770
  headerTitle: { default: "Login" },
@@ -3695,24 +3780,24 @@ const os = { class: "aform_form-element" }, ls = ["id", "disabled", "maxlength",
3695
3780
  }
3696
3781
  r.value = !1, n("loginSuccess");
3697
3782
  }
3698
- return (u, i) => (w(), k("div", is, [
3699
- y("div", null, [
3700
- y("div", us, [
3701
- y("div", cs, [
3702
- y("h1", ds, K(e.headerTitle), 1),
3703
- y("p", fs, K(e.headerSubtitle), 1)
3783
+ return (u, i) => (h(), b("div", Is, [
3784
+ w("div", null, [
3785
+ w("div", Ms, [
3786
+ w("div", Cs, [
3787
+ w("h1", Es, N(e.headerTitle), 1),
3788
+ w("p", As, N(e.headerSubtitle), 1)
3704
3789
  ]),
3705
- y("form", { onSubmit: l }, [
3706
- y("div", vs, [
3707
- y("div", ps, [
3708
- i[2] || (i[2] = y("label", {
3790
+ w("form", { onSubmit: l }, [
3791
+ w("div", $s, [
3792
+ w("div", Ts, [
3793
+ i[2] || (i[2] = w("label", {
3709
3794
  id: "login-email",
3710
3795
  for: "email",
3711
3796
  class: "aform_field-label"
3712
3797
  }, "Email", -1)),
3713
- J(y("input", {
3798
+ K(w("input", {
3714
3799
  id: "email",
3715
- "onUpdate:modelValue": i[0] || (i[0] = (c) => o.value = c),
3800
+ "onUpdate:modelValue": i[0] || (i[0] = (d) => o.value = d),
3716
3801
  class: "aform_input-field",
3717
3802
  name: "email",
3718
3803
  placeholder: "name@example.com",
@@ -3721,60 +3806,60 @@ const os = { class: "aform_form-element" }, ls = ["id", "disabled", "maxlength",
3721
3806
  "auto-complete": "email",
3722
3807
  "auto-correct": "off",
3723
3808
  disabled: r.value
3724
- }, null, 8, ms), [
3809
+ }, null, 8, Ds), [
3725
3810
  [we, o.value]
3726
3811
  ])
3727
3812
  ]),
3728
- y("div", hs, [
3729
- i[3] || (i[3] = y("label", {
3813
+ w("div", Ss, [
3814
+ i[3] || (i[3] = w("label", {
3730
3815
  id: "login-password",
3731
3816
  for: "password",
3732
3817
  class: "aform_field-label"
3733
3818
  }, "Password", -1)),
3734
- J(y("input", {
3819
+ K(w("input", {
3735
3820
  id: "password",
3736
- "onUpdate:modelValue": i[1] || (i[1] = (c) => a.value = c),
3821
+ "onUpdate:modelValue": i[1] || (i[1] = (d) => a.value = d),
3737
3822
  class: "aform_input-field",
3738
3823
  name: "password",
3739
3824
  type: "password",
3740
3825
  disabled: r.value
3741
- }, null, 8, gs), [
3826
+ }, null, 8, Rs), [
3742
3827
  [we, a.value]
3743
3828
  ])
3744
3829
  ]),
3745
- y("button", {
3830
+ w("button", {
3746
3831
  class: "btn",
3747
3832
  disabled: r.value || !o.value || !a.value,
3748
3833
  onClick: l
3749
3834
  }, [
3750
- r.value ? (w(), k("span", ys, "progress_activity")) : q("", !0),
3751
- i[4] || (i[4] = y("span", { id: "login-form-button" }, "Login", -1))
3752
- ], 8, ws)
3835
+ r.value ? (h(), b("span", Hs, "progress_activity")) : Y("", !0),
3836
+ i[4] || (i[4] = w("span", { id: "login-form-button" }, "Login", -1))
3837
+ ], 8, Ls)
3753
3838
  ])
3754
3839
  ], 32),
3755
- i[5] || (i[5] = y("button", { class: "btn" }, [
3756
- y("span", { id: "forgot-password-button" }, "Forgot password?")
3840
+ i[5] || (i[5] = w("button", { class: "btn" }, [
3841
+ w("span", { id: "forgot-password-button" }, "Forgot password?")
3757
3842
  ], -1))
3758
3843
  ])
3759
3844
  ])
3760
3845
  ]));
3761
3846
  }
3762
- }), ks = /* @__PURE__ */ $e(xs, [["__scopeId", "data-v-d9ffd0a7"]]);
3763
- function Ms(e) {
3764
- e.use(Dl), e.component("ACheckbox", _l), e.component("ACombobox", Ol), e.component("ADate", Ul), e.component("ADropdown", ra), e.component("ADatePicker", La), e.component("AFieldset", Za), e.component("AFileAttach", za), e.component("AForm", Mn), e.component("ANumericInput", Ja), e.component("ATextInput", rs);
3847
+ }), Os = /* @__PURE__ */ Te(Vs, [["__scopeId", "data-v-d9ffd0a7"]]);
3848
+ function Bs(e) {
3849
+ e.use(Dl), e.component("ACheckbox", Bl), e.component("ACombobox", Fl), e.component("ADate", zl), e.component("ADropdown", va), e.component("ADatePicker", Za), e.component("AFieldset", Xa), e.component("AFileAttach", os), e.component("AForm", Mn), e.component("ANumericInput", cs), e.component("ATextInput", ks);
3765
3850
  }
3766
3851
  export {
3767
- _l as ACheckbox,
3768
- Ol as AComboBox,
3769
- Ul as ADate,
3770
- La as ADatePicker,
3771
- ra as ADropdown,
3772
- Za as AFieldset,
3773
- za as AFileAttach,
3852
+ Bl as ACheckbox,
3853
+ Fl as AComboBox,
3854
+ zl as ADate,
3855
+ Za as ADatePicker,
3856
+ va as ADropdown,
3857
+ Xa as AFieldset,
3858
+ os as AFileAttach,
3774
3859
  Mn as AForm,
3775
- Ja as ANumericInput,
3776
- rs as ATextInput,
3777
- ks as Login,
3778
- Ms as install
3860
+ cs as ANumericInput,
3861
+ ks as ATextInput,
3862
+ Os as Login,
3863
+ Bs as install
3779
3864
  };
3780
3865
  //# sourceMappingURL=aform.js.map