@stonecrop/atable 0.4.29 → 0.4.30

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/atable.js CHANGED
@@ -1,17 +1,17 @@
1
- import { onMounted as ae, ref as D, watch as G, onBeforeUnmount as At, computed as M, shallowRef as N, toValue as k, watchEffect as Ot, getCurrentScope as ht, onScopeDispose as pt, unref as E, getCurrentInstance as Me, nextTick as wt, isRef as Tt, toRefs as Ht, customRef as xt, toRef as Dt, readonly as Pt, defineComponent as ee, useTemplateRef as j, createElementBlock as T, openBlock as S, normalizeClass as U, normalizeStyle as K, createBlock as ie, resolveDynamicComponent as Ce, mergeProps as Xe, toDisplayString as ce, Fragment as oe, createElementVNode as P, createCommentVNode as _, renderSlot as F, useCssVars as Lt, onUnmounted as Bt, withModifiers as ke, withDirectives as $e, vShow as yt, renderList as he, createTextVNode as zt, mergeModels as ot, useModel as lt, createVNode as at, withCtx as st } from "vue";
1
+ import { onMounted as ae, ref as H, watch as V, onBeforeUnmount as At, computed as S, shallowRef as N, toValue as $, watchEffect as Dt, getCurrentScope as gt, onScopeDispose as pt, unref as k, getCurrentInstance as Se, nextTick as wt, isRef as Ot, toRefs as Tt, customRef as yt, toRef as Ht, readonly as Pt, defineComponent as ee, useTemplateRef as j, createElementBlock as O, openBlock as M, normalizeClass as U, normalizeStyle as _, createBlock as re, resolveDynamicComponent as Ie, mergeProps as Ge, toDisplayString as ie, Fragment as oe, createElementVNode as z, createCommentVNode as q, renderSlot as F, useCssVars as Lt, onUnmounted as Bt, withModifiers as $e, withDirectives as Me, vShow as xt, renderList as ge, createTextVNode as zt, mergeModels as ot, useModel as lt, createVNode as at, withCtx as st } from "vue";
2
2
  import { defineStore as Wt } from "pinia";
3
3
  import './assets/index.css';function Ne(e) {
4
- return ht() ? (pt(e), !0) : !1;
4
+ return gt() ? (pt(e), !0) : !1;
5
5
  }
6
6
  const Xt = typeof window < "u" && typeof document < "u";
7
7
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
8
- const Nt = (e) => e != null, Gt = Object.prototype.toString, Vt = (e) => Gt.call(e) === "[object Object]", Ft = () => {
8
+ const Gt = (e) => e != null, Nt = Object.prototype.toString, Vt = (e) => Nt.call(e) === "[object Object]", Ft = () => {
9
9
  };
10
- function Ie(e) {
10
+ function Ee(e) {
11
11
  return Array.isArray(e) ? e : [e];
12
12
  }
13
13
  function Yt(e, t, o) {
14
- return G(
14
+ return V(
15
15
  e,
16
16
  t,
17
17
  {
@@ -20,36 +20,36 @@ function Yt(e, t, o) {
20
20
  }
21
21
  );
22
22
  }
23
- const fe = Xt ? window : void 0;
24
- function ue(e) {
23
+ const de = Xt ? window : void 0;
24
+ function ce(e) {
25
25
  var t;
26
- const o = k(e);
26
+ const o = $(e);
27
27
  return (t = o == null ? void 0 : o.$el) != null ? t : o;
28
28
  }
29
29
  function pe(...e) {
30
30
  const t = [], o = () => {
31
31
  t.forEach((n) => n()), t.length = 0;
32
- }, l = (n, s, d, f) => (n.addEventListener(s, d, f), () => n.removeEventListener(s, d, f)), r = M(() => {
33
- const n = Ie(k(e[0])).filter((s) => s != null);
34
- return n.every((s) => typeof s != "string") ? n : void 0;
35
- }), u = Yt(
32
+ }, l = (n, a, d, f) => (n.addEventListener(a, d, f), () => n.removeEventListener(a, d, f)), s = S(() => {
33
+ const n = Ee($(e[0])).filter((a) => a != null);
34
+ return n.every((a) => typeof a != "string") ? n : void 0;
35
+ }), c = Yt(
36
36
  () => {
37
- var n, s;
37
+ var n, a;
38
38
  return [
39
- (s = (n = r.value) == null ? void 0 : n.map((d) => ue(d))) != null ? s : [fe].filter((d) => d != null),
40
- Ie(k(r.value ? e[1] : e[0])),
41
- Ie(E(r.value ? e[2] : e[1])),
39
+ (a = (n = s.value) == null ? void 0 : n.map((d) => ce(d))) != null ? a : [de].filter((d) => d != null),
40
+ Ee($(s.value ? e[1] : e[0])),
41
+ Ee(k(s.value ? e[2] : e[1])),
42
42
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
43
- k(r.value ? e[3] : e[2])
43
+ $(s.value ? e[3] : e[2])
44
44
  ];
45
45
  },
46
- ([n, s, d, f]) => {
47
- if (o(), !(n != null && n.length) || !(s != null && s.length) || !(d != null && d.length))
46
+ ([n, a, d, f]) => {
47
+ if (o(), !(n != null && n.length) || !(a != null && a.length) || !(d != null && d.length))
48
48
  return;
49
49
  const p = Vt(f) ? { ...f } : f;
50
50
  t.push(
51
51
  ...n.flatMap(
52
- (y) => s.flatMap(
52
+ (y) => a.flatMap(
53
53
  (m) => d.map((C) => l(y, m, C, p))
54
54
  )
55
55
  )
@@ -57,35 +57,35 @@ function pe(...e) {
57
57
  },
58
58
  { flush: "post" }
59
59
  ), i = () => {
60
- u(), o();
60
+ c(), o();
61
61
  };
62
62
  return Ne(o), i;
63
63
  }
64
64
  function jt() {
65
- const e = N(!1), t = Me();
65
+ const e = N(!1), t = Se();
66
66
  return t && ae(() => {
67
67
  e.value = !0;
68
68
  }, t), e;
69
69
  }
70
70
  function Ut(e) {
71
71
  const t = jt();
72
- return M(() => (t.value, !!e()));
72
+ return S(() => (t.value, !!e()));
73
73
  }
74
74
  function qt(e, t, o = {}) {
75
- const { window: l = fe, ...r } = o;
76
- let u;
75
+ const { window: l = de, ...s } = o;
76
+ let c;
77
77
  const i = Ut(() => l && "MutationObserver" in l), n = () => {
78
- u && (u.disconnect(), u = void 0);
79
- }, s = M(() => {
80
- const y = k(e), m = Ie(y).map(ue).filter(Nt);
78
+ c && (c.disconnect(), c = void 0);
79
+ }, a = S(() => {
80
+ const y = $(e), m = Ee(y).map(ce).filter(Gt);
81
81
  return new Set(m);
82
- }), d = G(
83
- () => s.value,
82
+ }), d = V(
83
+ () => a.value,
84
84
  (y) => {
85
- n(), i.value && y.size && (u = new MutationObserver(t), y.forEach((m) => u.observe(m, r)));
85
+ n(), i.value && y.size && (c = new MutationObserver(t), y.forEach((m) => c.observe(m, s)));
86
86
  },
87
87
  { immediate: !0, flush: "post" }
88
- ), f = () => u == null ? void 0 : u.takeRecords(), p = () => {
88
+ ), f = () => c == null ? void 0 : c.takeRecords(), p = () => {
89
89
  d(), n();
90
90
  };
91
91
  return Ne(p), {
@@ -96,20 +96,20 @@ function qt(e, t, o = {}) {
96
96
  }
97
97
  function Jt(e, t, o = {}) {
98
98
  const {
99
- window: l = fe,
100
- document: r = l == null ? void 0 : l.document,
101
- flush: u = "sync"
99
+ window: l = de,
100
+ document: s = l == null ? void 0 : l.document,
101
+ flush: c = "sync"
102
102
  } = o;
103
- if (!l || !r)
103
+ if (!l || !s)
104
104
  return Ft;
105
105
  let i;
106
106
  const n = (f) => {
107
107
  i == null || i(), i = f;
108
- }, s = Ot(() => {
109
- const f = ue(e);
108
+ }, a = Dt(() => {
109
+ const f = ce(e);
110
110
  if (f) {
111
111
  const { stop: p } = qt(
112
- r,
112
+ s,
113
113
  (y) => {
114
114
  y.map((m) => [...m.removedNodes]).flat().some((m) => m === f || m.contains(f)) && t(y);
115
115
  },
@@ -121,25 +121,25 @@ function Jt(e, t, o = {}) {
121
121
  );
122
122
  n(p);
123
123
  }
124
- }, { flush: u }), d = () => {
125
- s(), n();
124
+ }, { flush: c }), d = () => {
125
+ a(), n();
126
126
  };
127
127
  return Ne(d), d;
128
128
  }
129
129
  function Zt(e = {}) {
130
130
  var t;
131
131
  const {
132
- window: o = fe,
132
+ window: o = de,
133
133
  deep: l = !0,
134
- triggerOnRemoval: r = !1
135
- } = e, u = (t = e.document) != null ? t : o == null ? void 0 : o.document, i = () => {
134
+ triggerOnRemoval: s = !1
135
+ } = e, c = (t = e.document) != null ? t : o == null ? void 0 : o.document, i = () => {
136
136
  var d;
137
- let f = u == null ? void 0 : u.activeElement;
137
+ let f = c == null ? void 0 : c.activeElement;
138
138
  if (l)
139
139
  for (; f != null && f.shadowRoot; )
140
140
  f = (d = f == null ? void 0 : f.shadowRoot) == null ? void 0 : d.activeElement;
141
141
  return f;
142
- }, n = N(), s = () => {
142
+ }, n = N(), a = () => {
143
143
  n.value = i();
144
144
  };
145
145
  if (o) {
@@ -151,126 +151,126 @@ function Zt(e = {}) {
151
151
  o,
152
152
  "blur",
153
153
  (f) => {
154
- f.relatedTarget === null && s();
154
+ f.relatedTarget === null && a();
155
155
  },
156
156
  d
157
157
  ), pe(
158
158
  o,
159
159
  "focus",
160
- s,
160
+ a,
161
161
  d
162
162
  );
163
163
  }
164
- return r && Jt(n, s, { document: u }), s(), n;
164
+ return s && Jt(n, a, { document: c }), a(), n;
165
165
  }
166
166
  const Qt = "focusin", Kt = "focusout", _t = ":focus-within";
167
167
  function en(e, t = {}) {
168
- const { window: o = fe } = t, l = M(() => ue(e)), r = N(!1), u = M(() => r.value), i = Zt(t);
168
+ const { window: o = de } = t, l = S(() => ce(e)), s = N(!1), c = S(() => s.value), i = Zt(t);
169
169
  if (!o || !i.value)
170
- return { focused: u };
170
+ return { focused: c };
171
171
  const n = { passive: !0 };
172
- return pe(l, Qt, () => r.value = !0, n), pe(l, Kt, () => {
173
- var s, d, f;
174
- return r.value = (f = (d = (s = l.value) == null ? void 0 : s.matches) == null ? void 0 : d.call(s, _t)) != null ? f : !1;
175
- }, n), { focused: u };
172
+ return pe(l, Qt, () => s.value = !0, n), pe(l, Kt, () => {
173
+ var a, d, f;
174
+ return s.value = (f = (d = (a = l.value) == null ? void 0 : a.matches) == null ? void 0 : d.call(a, _t)) != null ? f : !1;
175
+ }, n), { focused: c };
176
176
  }
177
- function tn(e, { window: t = fe, scrollTarget: o } = {}) {
178
- const l = D(!1), r = () => {
177
+ function tn(e, { window: t = de, scrollTarget: o } = {}) {
178
+ const l = H(!1), s = () => {
179
179
  if (!t) return;
180
- const u = t.document, i = ue(e);
180
+ const c = t.document, i = ce(e);
181
181
  if (!i)
182
182
  l.value = !1;
183
183
  else {
184
184
  const n = i.getBoundingClientRect();
185
- l.value = n.top <= (t.innerHeight || u.documentElement.clientHeight) && n.left <= (t.innerWidth || u.documentElement.clientWidth) && n.bottom >= 0 && n.right >= 0;
185
+ l.value = n.top <= (t.innerHeight || c.documentElement.clientHeight) && n.left <= (t.innerWidth || c.documentElement.clientWidth) && n.bottom >= 0 && n.right >= 0;
186
186
  }
187
187
  };
188
- return G(
189
- () => ue(e),
190
- () => r(),
188
+ return V(
189
+ () => ce(e),
190
+ () => s(),
191
191
  { immediate: !0, flush: "post" }
192
- ), t && pe(o || t, "scroll", r, {
192
+ ), t && pe(o || t, "scroll", s, {
193
193
  capture: !1,
194
194
  passive: !0
195
195
  }), l;
196
196
  }
197
- const J = (e) => {
197
+ const Z = (e) => {
198
198
  let t = tn(e).value;
199
199
  return t = t && e.offsetHeight > 0, t;
200
- }, Z = (e) => e.tabIndex >= 0, rt = (e) => {
200
+ }, Q = (e) => e.tabIndex >= 0, rt = (e) => {
201
201
  const t = e.target;
202
- return Ge(t);
203
- }, Ge = (e) => {
202
+ return Ve(t);
203
+ }, Ve = (e) => {
204
204
  var t;
205
205
  let o;
206
206
  if (e instanceof HTMLTableCellElement) {
207
207
  const l = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
208
208
  if (l) {
209
- const r = Array.from(l.children)[e.cellIndex];
210
- r && (o = r);
209
+ const s = Array.from(l.children)[e.cellIndex];
210
+ s && (o = s);
211
211
  }
212
212
  } else if (e instanceof HTMLTableRowElement) {
213
213
  const l = e.previousElementSibling;
214
214
  l && (o = l);
215
215
  }
216
- return o && (!Z(o) || !J(o)) ? Ge(o) : o;
216
+ return o && (!Q(o) || !Z(o)) ? Ve(o) : o;
217
217
  }, nn = (e) => {
218
218
  var t;
219
219
  const o = e.target;
220
220
  let l;
221
221
  if (o instanceof HTMLTableCellElement) {
222
- const r = (t = o.parentElement) == null ? void 0 : t.parentElement;
223
- if (r) {
224
- const u = r.firstElementChild, i = u == null ? void 0 : u.children[o.cellIndex];
222
+ const s = (t = o.parentElement) == null ? void 0 : t.parentElement;
223
+ if (s) {
224
+ const c = s.firstElementChild, i = c == null ? void 0 : c.children[o.cellIndex];
225
225
  i && (l = i);
226
226
  }
227
227
  } else if (o instanceof HTMLTableRowElement) {
228
- const r = o.parentElement;
229
- if (r) {
230
- const u = r.firstElementChild;
231
- u && (l = u);
228
+ const s = o.parentElement;
229
+ if (s) {
230
+ const c = s.firstElementChild;
231
+ c && (l = c);
232
232
  }
233
233
  }
234
- return l && (!Z(l) || !J(l)) ? Ve(l) : l;
234
+ return l && (!Q(l) || !Z(l)) ? Fe(l) : l;
235
235
  }, it = (e) => {
236
236
  const t = e.target;
237
- return Ve(t);
238
- }, Ve = (e) => {
237
+ return Fe(t);
238
+ }, Fe = (e) => {
239
239
  var t;
240
240
  let o;
241
241
  if (e instanceof HTMLTableCellElement) {
242
242
  const l = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
243
243
  if (l) {
244
- const r = Array.from(l.children)[e.cellIndex];
245
- r && (o = r);
244
+ const s = Array.from(l.children)[e.cellIndex];
245
+ s && (o = s);
246
246
  }
247
247
  } else if (e instanceof HTMLTableRowElement) {
248
248
  const l = e.nextElementSibling;
249
249
  l && (o = l);
250
250
  }
251
- return o && (!Z(o) || !J(o)) ? Ve(o) : o;
251
+ return o && (!Q(o) || !Z(o)) ? Fe(o) : o;
252
252
  }, on = (e) => {
253
253
  var t;
254
254
  const o = e.target;
255
255
  let l;
256
256
  if (o instanceof HTMLTableCellElement) {
257
- const r = (t = o.parentElement) == null ? void 0 : t.parentElement;
258
- if (r) {
259
- const u = r.lastElementChild, i = u == null ? void 0 : u.children[o.cellIndex];
257
+ const s = (t = o.parentElement) == null ? void 0 : t.parentElement;
258
+ if (s) {
259
+ const c = s.lastElementChild, i = c == null ? void 0 : c.children[o.cellIndex];
260
260
  i && (l = i);
261
261
  }
262
262
  } else if (o instanceof HTMLTableRowElement) {
263
- const r = o.parentElement;
264
- if (r) {
265
- const u = r.lastElementChild;
266
- u && (l = u);
263
+ const s = o.parentElement;
264
+ if (s) {
265
+ const c = s.lastElementChild;
266
+ c && (l = c);
267
267
  }
268
268
  }
269
- return l && (!Z(l) || !J(l)) ? Ge(l) : l;
269
+ return l && (!Q(l) || !Z(l)) ? Ve(l) : l;
270
270
  }, ct = (e) => {
271
271
  const t = e.target;
272
- return Fe(t);
273
- }, Fe = (e) => {
272
+ return Ye(t);
273
+ }, Ye = (e) => {
274
274
  var t;
275
275
  let o;
276
276
  if (e.previousElementSibling)
@@ -279,11 +279,11 @@ const J = (e) => {
279
279
  const l = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
280
280
  o = l == null ? void 0 : l.lastElementChild;
281
281
  }
282
- return o && (!Z(o) || !J(o)) ? Fe(o) : o;
282
+ return o && (!Q(o) || !Z(o)) ? Ye(o) : o;
283
283
  }, ut = (e) => {
284
284
  const t = e.target;
285
- return Ye(t);
286
- }, Ye = (e) => {
285
+ return je(t);
286
+ }, je = (e) => {
287
287
  var t;
288
288
  let o;
289
289
  if (e.nextElementSibling)
@@ -292,19 +292,19 @@ const J = (e) => {
292
292
  const l = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
293
293
  o = l == null ? void 0 : l.firstElementChild;
294
294
  }
295
- return o && (!Z(o) || !J(o)) ? Ye(o) : o;
295
+ return o && (!Q(o) || !Z(o)) ? je(o) : o;
296
296
  }, dt = (e) => {
297
297
  const t = e.target.parentElement, o = t == null ? void 0 : t.firstElementChild;
298
- return o && (!Z(o) || !J(o)) ? Ye(o) : o;
298
+ return o && (!Q(o) || !Z(o)) ? je(o) : o;
299
299
  }, ft = (e) => {
300
300
  const t = e.target.parentElement, o = t == null ? void 0 : t.lastElementChild;
301
- return o && (!Z(o) || !J(o)) ? Fe(o) : o;
302
- }, ye = ["alt", "control", "shift", "meta"], ln = {
301
+ return o && (!Q(o) || !Z(o)) ? Ye(o) : o;
302
+ }, be = ["alt", "control", "shift", "meta"], ln = {
303
303
  ArrowUp: "up",
304
304
  ArrowDown: "down",
305
305
  ArrowLeft: "left",
306
306
  ArrowRight: "right"
307
- }, je = {
307
+ }, Ue = {
308
308
  "keydown.up": (e) => {
309
309
  const t = rt(e);
310
310
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
@@ -368,16 +368,16 @@ const J = (e) => {
368
368
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
369
369
  }
370
370
  };
371
- function Ue(e) {
371
+ function qe(e) {
372
372
  const t = (i) => {
373
373
  let n = null;
374
374
  return i.parent && (typeof i.parent == "string" ? n = document.querySelector(i.parent) : i.parent instanceof HTMLElement ? n = i.parent : n = i.parent.value), n;
375
375
  }, o = (i) => {
376
376
  var n;
377
- const s = t(i);
377
+ const a = t(i);
378
378
  let d = [];
379
379
  if (typeof i.selectors == "string")
380
- d = s ? Array.from(s.querySelectorAll(i.selectors)) : Array.from(document.querySelectorAll(i.selectors));
380
+ d = a ? Array.from(a.querySelectorAll(i.selectors)) : Array.from(document.querySelectorAll(i.selectors));
381
381
  else if (Array.isArray(i.selectors))
382
382
  for (const f of i.selectors)
383
383
  f instanceof HTMLElement ? d.push(f) : d.push(f.$el);
@@ -392,85 +392,85 @@ function Ue(e) {
392
392
  return d;
393
393
  }, l = (i) => {
394
394
  const n = t(i);
395
- let s = [];
396
- return i.selectors ? s = o(i) : n && (s = Array.from(n.children).filter((d) => Z(d) && J(d))), s;
397
- }, r = (i) => (n) => {
398
- const s = ln[n.key] || n.key.toLowerCase();
399
- if (ye.includes(s)) return;
400
- const d = i.handlers || je;
395
+ let a = [];
396
+ return i.selectors ? a = o(i) : n && (a = Array.from(n.children).filter((d) => Q(d) && Z(d))), a;
397
+ }, s = (i) => (n) => {
398
+ const a = ln[n.key] || n.key.toLowerCase();
399
+ if (be.includes(a)) return;
400
+ const d = i.handlers || Ue;
401
401
  for (const f of Object.keys(d)) {
402
402
  const [p, ...y] = f.split(".");
403
- if (p === "keydown" && y.includes(s)) {
404
- const m = d[f], C = y.filter((v) => ye.includes(v)), b = ye.some((v) => {
405
- const g = v.charAt(0).toUpperCase() + v.slice(1);
406
- return n.getModifierState(g);
403
+ if (p === "keydown" && y.includes(a)) {
404
+ const m = d[f], C = y.filter((v) => be.includes(v)), x = be.some((v) => {
405
+ const h = v.charAt(0).toUpperCase() + v.slice(1);
406
+ return n.getModifierState(h);
407
407
  });
408
408
  if (C.length > 0) {
409
- if (b) {
410
- for (const v of ye)
409
+ if (x) {
410
+ for (const v of be)
411
411
  if (y.includes(v)) {
412
- const g = v.charAt(0).toUpperCase() + v.slice(1);
413
- n.getModifierState(g) && m(n);
412
+ const h = v.charAt(0).toUpperCase() + v.slice(1);
413
+ n.getModifierState(h) && m(n);
414
414
  }
415
415
  }
416
416
  } else
417
- b || m(n);
417
+ x || m(n);
418
418
  }
419
419
  }
420
- }, u = [];
420
+ }, c = [];
421
421
  ae(() => {
422
422
  for (const i of e) {
423
- const n = t(i), s = l(i), d = r(i), f = n ? [n] : s;
423
+ const n = t(i), a = l(i), d = s(i), f = n ? [n] : a;
424
424
  for (const p of f) {
425
- const { focused: y } = en(D(p)), m = G(y, (C) => {
425
+ const { focused: y } = en(H(p)), m = V(y, (C) => {
426
426
  C ? p.addEventListener("keydown", d) : p.removeEventListener("keydown", d);
427
427
  });
428
- u.push(m);
428
+ c.push(m);
429
429
  }
430
430
  }
431
431
  }), At(() => {
432
- for (const i of u)
432
+ for (const i of c)
433
433
  i();
434
434
  });
435
435
  }
436
- function ve(e) {
437
- return ht() ? (pt(e), !0) : !1;
436
+ function fe(e) {
437
+ return gt() ? (pt(e), !0) : !1;
438
438
  }
439
- const Se = typeof window < "u" && typeof document < "u";
439
+ const Re = typeof window < "u" && typeof document < "u";
440
440
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
441
- const an = (e) => e != null, sn = Object.prototype.toString, bt = (e) => sn.call(e) === "[object Object]", q = () => {
442
- }, We = /* @__PURE__ */ rn();
441
+ const an = (e) => e != null, sn = Object.prototype.toString, bt = (e) => sn.call(e) === "[object Object]", J = () => {
442
+ }, Xe = /* @__PURE__ */ rn();
443
443
  function rn() {
444
444
  var e, t;
445
- return Se && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
445
+ return Re && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
446
446
  }
447
447
  function cn(...e) {
448
448
  if (e.length !== 1)
449
- return Dt(...e);
449
+ return Ht(...e);
450
450
  const t = e[0];
451
- return typeof t == "function" ? Pt(xt(() => ({ get: t, set: q }))) : D(t);
451
+ return typeof t == "function" ? Pt(yt(() => ({ get: t, set: J }))) : H(t);
452
452
  }
453
453
  function un(e, t) {
454
454
  function o(...l) {
455
- return new Promise((r, u) => {
456
- Promise.resolve(e(() => t.apply(this, l), { fn: t, thisArg: this, args: l })).then(r).catch(u);
455
+ return new Promise((s, c) => {
456
+ Promise.resolve(e(() => t.apply(this, l), { fn: t, thisArg: this, args: l })).then(s).catch(c);
457
457
  });
458
458
  }
459
459
  return o;
460
460
  }
461
461
  function dn(e, t = {}) {
462
- let o, l, r = q;
463
- const u = (s) => {
464
- clearTimeout(s), r(), r = q;
462
+ let o, l, s = J;
463
+ const c = (a) => {
464
+ clearTimeout(a), s(), s = J;
465
465
  };
466
466
  let i;
467
- return (s) => {
468
- const d = k(e), f = k(t.maxWait);
469
- return o && u(o), d <= 0 || f !== void 0 && f <= 0 ? (l && (u(l), l = void 0), Promise.resolve(s())) : new Promise((p, y) => {
470
- r = t.rejectOnCancel ? y : p, i = s, f && !l && (l = setTimeout(() => {
471
- o && u(o), l = void 0, p(i());
467
+ return (a) => {
468
+ const d = $(e), f = $(t.maxWait);
469
+ return o && c(o), d <= 0 || f !== void 0 && f <= 0 ? (l && (c(l), l = void 0), Promise.resolve(a())) : new Promise((p, y) => {
470
+ s = t.rejectOnCancel ? y : p, i = a, f && !l && (l = setTimeout(() => {
471
+ o && c(o), l = void 0, p(i());
472
472
  }, f)), o = setTimeout(() => {
473
- l && u(l), l = void 0, p(s());
473
+ l && c(l), l = void 0, p(a());
474
474
  }, d);
475
475
  });
476
476
  };
@@ -479,7 +479,7 @@ function le(e) {
479
479
  return Array.isArray(e) ? e : [e];
480
480
  }
481
481
  function fn(e) {
482
- return Me();
482
+ return Se();
483
483
  }
484
484
  function vn(e, t = 200, o = {}) {
485
485
  return un(
@@ -488,35 +488,35 @@ function vn(e, t = 200, o = {}) {
488
488
  );
489
489
  }
490
490
  function mn(e, t = {}) {
491
- if (!Tt(e))
492
- return Ht(e);
491
+ if (!Ot(e))
492
+ return Tt(e);
493
493
  const o = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
494
494
  for (const l in e.value)
495
- o[l] = xt(() => ({
495
+ o[l] = yt(() => ({
496
496
  get() {
497
497
  return e.value[l];
498
498
  },
499
- set(r) {
500
- var u;
501
- if ((u = k(t.replaceRef)) != null ? u : !0)
499
+ set(s) {
500
+ var c;
501
+ if ((c = $(t.replaceRef)) != null ? c : !0)
502
502
  if (Array.isArray(e.value)) {
503
503
  const n = [...e.value];
504
- n[l] = r, e.value = n;
504
+ n[l] = s, e.value = n;
505
505
  } else {
506
- const n = { ...e.value, [l]: r };
506
+ const n = { ...e.value, [l]: s };
507
507
  Object.setPrototypeOf(n, Object.getPrototypeOf(e.value)), e.value = n;
508
508
  }
509
509
  else
510
- e.value[l] = r;
510
+ e.value[l] = s;
511
511
  }
512
512
  }));
513
513
  return o;
514
514
  }
515
- function gn(e, t = !0, o) {
515
+ function hn(e, t = !0, o) {
516
516
  fn() ? ae(e, o) : t ? e() : wt(e);
517
517
  }
518
518
  function Ct(e, t, o) {
519
- return G(
519
+ return V(
520
520
  e,
521
521
  t,
522
522
  {
@@ -525,36 +525,36 @@ function Ct(e, t, o) {
525
525
  }
526
526
  );
527
527
  }
528
- const Re = Se ? window : void 0;
529
- function de(e) {
528
+ const Ae = Re ? window : void 0;
529
+ function ue(e) {
530
530
  var t;
531
- const o = k(e);
531
+ const o = $(e);
532
532
  return (t = o == null ? void 0 : o.$el) != null ? t : o;
533
533
  }
534
- function ge(...e) {
534
+ function he(...e) {
535
535
  const t = [], o = () => {
536
536
  t.forEach((n) => n()), t.length = 0;
537
- }, l = (n, s, d, f) => (n.addEventListener(s, d, f), () => n.removeEventListener(s, d, f)), r = M(() => {
538
- const n = le(k(e[0])).filter((s) => s != null);
539
- return n.every((s) => typeof s != "string") ? n : void 0;
540
- }), u = Ct(
537
+ }, l = (n, a, d, f) => (n.addEventListener(a, d, f), () => n.removeEventListener(a, d, f)), s = S(() => {
538
+ const n = le($(e[0])).filter((a) => a != null);
539
+ return n.every((a) => typeof a != "string") ? n : void 0;
540
+ }), c = Ct(
541
541
  () => {
542
- var n, s;
542
+ var n, a;
543
543
  return [
544
- (s = (n = r.value) == null ? void 0 : n.map((d) => de(d))) != null ? s : [Re].filter((d) => d != null),
545
- le(k(r.value ? e[1] : e[0])),
546
- le(E(r.value ? e[2] : e[1])),
544
+ (a = (n = s.value) == null ? void 0 : n.map((d) => ue(d))) != null ? a : [Ae].filter((d) => d != null),
545
+ le($(s.value ? e[1] : e[0])),
546
+ le(k(s.value ? e[2] : e[1])),
547
547
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
548
- k(r.value ? e[3] : e[2])
548
+ $(s.value ? e[3] : e[2])
549
549
  ];
550
550
  },
551
- ([n, s, d, f]) => {
552
- if (o(), !(n != null && n.length) || !(s != null && s.length) || !(d != null && d.length))
551
+ ([n, a, d, f]) => {
552
+ if (o(), !(n != null && n.length) || !(a != null && a.length) || !(d != null && d.length))
553
553
  return;
554
554
  const p = bt(f) ? { ...f } : f;
555
555
  t.push(
556
556
  ...n.flatMap(
557
- (y) => s.flatMap(
557
+ (y) => a.flatMap(
558
558
  (m) => d.map((C) => l(y, m, C, p))
559
559
  )
560
560
  )
@@ -562,125 +562,125 @@ function ge(...e) {
562
562
  },
563
563
  { flush: "post" }
564
564
  ), i = () => {
565
- u(), o();
565
+ c(), o();
566
566
  };
567
- return ve(o), i;
567
+ return fe(o), i;
568
568
  }
569
- function hn() {
570
- const e = N(!1), t = Me();
569
+ function gn() {
570
+ const e = N(!1), t = Se();
571
571
  return t && ae(() => {
572
572
  e.value = !0;
573
573
  }, t), e;
574
574
  }
575
575
  function It(e) {
576
- const t = hn();
577
- return M(() => (t.value, !!e()));
576
+ const t = gn();
577
+ return S(() => (t.value, !!e()));
578
578
  }
579
579
  function Et(e, t, o = {}) {
580
- const { window: l = Re, ...r } = o;
581
- let u;
580
+ const { window: l = Ae, ...s } = o;
581
+ let c;
582
582
  const i = It(() => l && "MutationObserver" in l), n = () => {
583
- u && (u.disconnect(), u = void 0);
584
- }, s = M(() => {
585
- const y = k(e), m = le(y).map(de).filter(an);
583
+ c && (c.disconnect(), c = void 0);
584
+ }, a = S(() => {
585
+ const y = $(e), m = le(y).map(ue).filter(an);
586
586
  return new Set(m);
587
- }), d = G(
588
- () => s.value,
587
+ }), d = V(
588
+ () => a.value,
589
589
  (y) => {
590
- n(), i.value && y.size && (u = new MutationObserver(t), y.forEach((m) => u.observe(m, r)));
590
+ n(), i.value && y.size && (c = new MutationObserver(t), y.forEach((m) => c.observe(m, s)));
591
591
  },
592
592
  { immediate: !0, flush: "post" }
593
- ), f = () => u == null ? void 0 : u.takeRecords(), p = () => {
593
+ ), f = () => c == null ? void 0 : c.takeRecords(), p = () => {
594
594
  d(), n();
595
595
  };
596
- return ve(p), {
596
+ return fe(p), {
597
597
  isSupported: i,
598
598
  stop: p,
599
599
  takeRecords: f
600
600
  };
601
601
  }
602
- function Pe(e, t = {}) {
602
+ function Le(e, t = {}) {
603
603
  var o;
604
604
  const {
605
605
  pointerTypes: l,
606
- preventDefault: r,
607
- stopPropagation: u,
606
+ preventDefault: s,
607
+ stopPropagation: c,
608
608
  exact: i,
609
609
  onMove: n,
610
- onEnd: s,
610
+ onEnd: a,
611
611
  onStart: d,
612
612
  initialValue: f,
613
613
  axis: p = "both",
614
- draggingElement: y = Re,
614
+ draggingElement: y = Ae,
615
615
  containerElement: m,
616
616
  handle: C = e,
617
- buttons: b = [0]
618
- } = t, v = D(
619
- (o = k(f)) != null ? o : { x: 0, y: 0 }
620
- ), g = D(), w = (R) => l ? l.includes(R.pointerType) : !0, I = (R) => {
621
- k(r) && R.preventDefault(), k(u) && R.stopPropagation();
617
+ buttons: x = [0]
618
+ } = t, v = H(
619
+ (o = $(f)) != null ? o : { x: 0, y: 0 }
620
+ ), h = H(), w = (R) => l ? l.includes(R.pointerType) : !0, E = (R) => {
621
+ $(s) && R.preventDefault(), $(c) && R.stopPropagation();
622
622
  }, A = (R) => {
623
623
  var L;
624
- if (!k(b).includes(R.button) || k(t.disabled) || !w(R) || k(i) && R.target !== k(e))
624
+ if (!$(x).includes(R.button) || $(t.disabled) || !w(R) || $(i) && R.target !== $(e))
625
625
  return;
626
- const X = k(m), Y = (L = X == null ? void 0 : X.getBoundingClientRect) == null ? void 0 : L.call(X), B = k(e).getBoundingClientRect(), Q = {
627
- x: R.clientX - (X ? B.left - Y.left + X.scrollLeft : B.left),
628
- y: R.clientY - (X ? B.top - Y.top + X.scrollTop : B.top)
626
+ const G = $(m), Y = (L = G == null ? void 0 : G.getBoundingClientRect) == null ? void 0 : L.call(G), B = $(e).getBoundingClientRect(), K = {
627
+ x: R.clientX - (G ? B.left - Y.left + G.scrollLeft : B.left),
628
+ y: R.clientY - (G ? B.top - Y.top + G.scrollTop : B.top)
629
629
  };
630
- (d == null ? void 0 : d(Q, R)) !== !1 && (g.value = Q, I(R));
631
- }, W = (R) => {
632
- if (k(t.disabled) || !w(R) || !g.value)
630
+ (d == null ? void 0 : d(K, R)) !== !1 && (h.value = K, E(R));
631
+ }, X = (R) => {
632
+ if ($(t.disabled) || !w(R) || !h.value)
633
633
  return;
634
- const L = k(m), X = k(e).getBoundingClientRect();
634
+ const L = $(m), G = $(e).getBoundingClientRect();
635
635
  let { x: Y, y: B } = v.value;
636
- (p === "x" || p === "both") && (Y = R.clientX - g.value.x, L && (Y = Math.min(Math.max(0, Y), L.scrollWidth - X.width))), (p === "y" || p === "both") && (B = R.clientY - g.value.y, L && (B = Math.min(Math.max(0, B), L.scrollHeight - X.height))), v.value = {
636
+ (p === "x" || p === "both") && (Y = R.clientX - h.value.x, L && (Y = Math.min(Math.max(0, Y), L.scrollWidth - G.width))), (p === "y" || p === "both") && (B = R.clientY - h.value.y, L && (B = Math.min(Math.max(0, B), L.scrollHeight - G.height))), v.value = {
637
637
  x: Y,
638
638
  y: B
639
- }, n == null || n(v.value, R), I(R);
640
- }, H = (R) => {
641
- k(t.disabled) || !w(R) || g.value && (g.value = void 0, s == null || s(v.value, R), I(R));
639
+ }, n == null || n(v.value, R), E(R);
640
+ }, T = (R) => {
641
+ $(t.disabled) || !w(R) || h.value && (h.value = void 0, a == null || a(v.value, R), E(R));
642
642
  };
643
- if (Se) {
643
+ if (Re) {
644
644
  const R = () => {
645
645
  var L;
646
646
  return {
647
647
  capture: (L = t.capture) != null ? L : !0,
648
- passive: !k(r)
648
+ passive: !$(s)
649
649
  };
650
650
  };
651
- ge(C, "pointerdown", A, R), ge(y, "pointermove", W, R), ge(y, "pointerup", H, R);
651
+ he(C, "pointerdown", A, R), he(y, "pointermove", X, R), he(y, "pointerup", T, R);
652
652
  }
653
653
  return {
654
654
  ...mn(v),
655
655
  position: v,
656
- isDragging: M(() => !!g.value),
657
- style: M(
656
+ isDragging: S(() => !!h.value),
657
+ style: S(
658
658
  () => `left:${v.value.x}px;top:${v.value.y}px;`
659
659
  )
660
660
  };
661
661
  }
662
662
  function pn(e, t, o = {}) {
663
- const { window: l = Re, ...r } = o;
664
- let u;
663
+ const { window: l = Ae, ...s } = o;
664
+ let c;
665
665
  const i = It(() => l && "ResizeObserver" in l), n = () => {
666
- u && (u.disconnect(), u = void 0);
667
- }, s = M(() => {
668
- const p = k(e);
669
- return Array.isArray(p) ? p.map((y) => de(y)) : [de(p)];
670
- }), d = G(
671
- s,
666
+ c && (c.disconnect(), c = void 0);
667
+ }, a = S(() => {
668
+ const p = $(e);
669
+ return Array.isArray(p) ? p.map((y) => ue(y)) : [ue(p)];
670
+ }), d = V(
671
+ a,
672
672
  (p) => {
673
673
  if (n(), i.value && l) {
674
- u = new ResizeObserver(t);
674
+ c = new ResizeObserver(t);
675
675
  for (const y of p)
676
- y && u.observe(y, r);
676
+ y && c.observe(y, s);
677
677
  }
678
678
  },
679
679
  { immediate: !0, flush: "post" }
680
680
  ), f = () => {
681
681
  n(), d();
682
682
  };
683
- return ve(f), {
683
+ return fe(f), {
684
684
  isSupported: i,
685
685
  stop: f
686
686
  };
@@ -689,29 +689,29 @@ function te(e, t = {}) {
689
689
  const {
690
690
  reset: o = !0,
691
691
  windowResize: l = !0,
692
- windowScroll: r = !0,
693
- immediate: u = !0,
692
+ windowScroll: s = !0,
693
+ immediate: c = !0,
694
694
  updateTiming: i = "sync"
695
- } = t, n = N(0), s = N(0), d = N(0), f = N(0), p = N(0), y = N(0), m = N(0), C = N(0);
696
- function b() {
697
- const g = de(e);
698
- if (!g) {
699
- o && (n.value = 0, s.value = 0, d.value = 0, f.value = 0, p.value = 0, y.value = 0, m.value = 0, C.value = 0);
695
+ } = t, n = N(0), a = N(0), d = N(0), f = N(0), p = N(0), y = N(0), m = N(0), C = N(0);
696
+ function x() {
697
+ const h = ue(e);
698
+ if (!h) {
699
+ o && (n.value = 0, a.value = 0, d.value = 0, f.value = 0, p.value = 0, y.value = 0, m.value = 0, C.value = 0);
700
700
  return;
701
701
  }
702
- const w = g.getBoundingClientRect();
703
- n.value = w.height, s.value = w.bottom, d.value = w.left, f.value = w.right, p.value = w.top, y.value = w.width, m.value = w.x, C.value = w.y;
702
+ const w = h.getBoundingClientRect();
703
+ n.value = w.height, a.value = w.bottom, d.value = w.left, f.value = w.right, p.value = w.top, y.value = w.width, m.value = w.x, C.value = w.y;
704
704
  }
705
705
  function v() {
706
- i === "sync" ? b() : i === "next-frame" && requestAnimationFrame(() => b());
706
+ i === "sync" ? x() : i === "next-frame" && requestAnimationFrame(() => x());
707
707
  }
708
- return pn(e, v), G(() => de(e), (g) => !g && v()), Et(e, v, {
708
+ return pn(e, v), V(() => ue(e), (h) => !h && v()), Et(e, v, {
709
709
  attributeFilter: ["style", "class"]
710
- }), r && ge("scroll", v, { capture: !0, passive: !0 }), l && ge("resize", v, { passive: !0 }), gn(() => {
711
- u && v();
710
+ }), s && he("scroll", v, { capture: !0, passive: !0 }), l && he("resize", v, { passive: !0 }), hn(() => {
711
+ c && v();
712
712
  }), {
713
713
  height: n,
714
- bottom: s,
714
+ bottom: a,
715
715
  left: d,
716
716
  right: f,
717
717
  top: p,
@@ -724,7 +724,7 @@ function te(e, t = {}) {
724
724
  const wn = (e) => {
725
725
  const t = new DOMParser().parseFromString(e, "text/html");
726
726
  return Array.from(t.body.childNodes).some((o) => o.nodeType === 1);
727
- }, xn = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), yn = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], bn = ["innerHTML"], Cn = { key: 2 }, In = /* @__PURE__ */ ee({
727
+ }, yn = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), xn = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], bn = ["innerHTML"], Cn = { key: 2 }, In = /* @__PURE__ */ ee({
728
728
  __name: "ACell",
729
729
  props: {
730
730
  colIndex: {},
@@ -736,26 +736,26 @@ const wn = (e) => {
736
736
  debounce: { default: 300 }
737
737
  },
738
738
  setup(e, { expose: t }) {
739
- const o = j("cell"), l = e.store.getCellData(e.colIndex, e.rowIndex), r = D(""), u = D(!1), i = e.store.columns[e.colIndex], n = e.store.rows[e.rowIndex], s = i.align || "center", d = i.width || "40ch", f = M(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), p = M(() => typeof f.value == "string" ? wn(f.value) : !1), y = M(() => {
739
+ const o = j("cell"), l = e.store.getCellData(e.colIndex, e.rowIndex), s = H(""), c = H(!1), i = e.store.columns[e.colIndex], n = e.store.rows[e.rowIndex], a = i.align || "center", d = i.width || "40ch", f = S(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), p = S(() => typeof f.value == "string" ? wn(f.value) : !1), y = S(() => {
740
740
  var w;
741
741
  return {
742
- textAlign: s,
742
+ textAlign: a,
743
743
  width: d,
744
- fontWeight: u.value ? "bold" : "inherit",
744
+ fontWeight: c.value ? "bold" : "inherit",
745
745
  paddingLeft: e.store.getIndent(e.colIndex, (w = e.store.display[e.rowIndex]) == null ? void 0 : w.indent)
746
746
  };
747
- }), m = M(() => ({
747
+ }), m = S(() => ({
748
748
  "sticky-column": e.pinned,
749
- "cell-modified": u.value
749
+ "cell-modified": c.value
750
750
  })), C = () => {
751
- const { left: w, bottom: I, width: A, height: W } = te(o);
752
- i.mask, i.modalComponent && e.store.$patch((H) => {
753
- H.modal.visible = !0, H.modal.colIndex = e.colIndex, H.modal.rowIndex = e.rowIndex, H.modal.left = w, H.modal.bottom = I, H.modal.width = A, H.modal.height = W, H.modal.cell = o.value, typeof i.modalComponent == "function" ? H.modal.component = i.modalComponent({ table: H.table, row: n, column: i }) : H.modal.component = i.modalComponent, H.modal.componentProps = i.modalComponentExtraProps;
751
+ const { left: w, bottom: E, width: A, height: X } = te(o);
752
+ i.mask, i.modalComponent && e.store.$patch((T) => {
753
+ T.modal.visible = !0, T.modal.colIndex = e.colIndex, T.modal.rowIndex = e.rowIndex, T.modal.left = w, T.modal.bottom = E, T.modal.width = A, T.modal.height = X, T.modal.cell = o.value, typeof i.modalComponent == "function" ? T.modal.component = i.modalComponent({ table: T.table, row: n, column: i }) : T.modal.component = i.modalComponent, T.modal.componentProps = i.modalComponentExtraProps;
754
754
  });
755
755
  };
756
756
  if (e.addNavigation) {
757
757
  let w = {
758
- ...je,
758
+ ...Ue,
759
759
  "keydown.f2": C,
760
760
  "keydown.alt.up": C,
761
761
  "keydown.alt.down": C,
@@ -765,45 +765,45 @@ const wn = (e) => {
765
765
  typeof e.addNavigation == "object" && (w = {
766
766
  ...w,
767
767
  ...e.addNavigation
768
- }), Ue([
768
+ }), qe([
769
769
  {
770
770
  selectors: o,
771
771
  handlers: w
772
772
  }
773
773
  ]);
774
774
  }
775
- const b = () => {
776
- o.value && (r.value = o.value.textContent);
775
+ const x = () => {
776
+ o.value && (s.value = o.value.textContent);
777
777
  }, v = (w) => {
778
- const I = w.target;
779
- I.textContent !== r.value && (r.value = I.textContent, i.format ? (u.value = I.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, l), e.store.setCellText(e.colIndex, e.rowIndex, I.textContent)) : (u.value = I.textContent !== l, e.store.setCellData(e.colIndex, e.rowIndex, I.textContent)));
780
- }, g = vn(v, e.debounce);
778
+ const E = w.target;
779
+ E.textContent !== s.value && (s.value = E.textContent, i.format ? (c.value = E.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, l), e.store.setCellText(e.colIndex, e.rowIndex, E.textContent)) : (c.value = E.textContent !== l, e.store.setCellData(e.colIndex, e.rowIndex, E.textContent)));
780
+ }, h = vn(v, e.debounce);
781
781
  return t({
782
- currentData: r
783
- }), (w, I) => (S(), T("td", {
782
+ currentData: s
783
+ }), (w, E) => (M(), O("td", {
784
784
  ref: "cell",
785
785
  "data-colindex": w.colIndex,
786
786
  "data-rowindex": w.rowIndex,
787
- "data-editable": E(i).edit,
788
- contenteditable: E(i).edit,
787
+ "data-editable": k(i).edit,
788
+ contenteditable: k(i).edit,
789
789
  tabindex: w.tabIndex,
790
790
  spellcheck: !1,
791
- style: K(y.value),
792
- onFocus: b,
791
+ style: _(y.value),
792
+ onFocus: x,
793
793
  onPaste: v,
794
- onInput: I[0] || (I[0] = //@ts-ignore
795
- (...A) => E(g) && E(g)(...A)),
794
+ onInput: E[0] || (E[0] = //@ts-ignore
795
+ (...A) => k(h) && k(h)(...A)),
796
796
  onClick: C,
797
797
  class: U(["atable-cell", m.value])
798
798
  }, [
799
- E(i).cellComponent ? (S(), ie(Ce(E(i).cellComponent), Xe({
799
+ k(i).cellComponent ? (M(), re(Ie(k(i).cellComponent), Ge({
800
800
  key: 0,
801
801
  value: f.value
802
- }, E(i).cellComponentProps), null, 16, ["value"])) : p.value ? (S(), T("span", {
802
+ }, k(i).cellComponentProps), null, 16, ["value"])) : p.value ? (M(), O("span", {
803
803
  key: 1,
804
804
  innerHTML: f.value
805
- }, null, 8, bn)) : (S(), T("span", Cn, ce(f.value), 1))
806
- ], 46, yn));
805
+ }, null, 8, bn)) : (M(), O("span", Cn, ie(f.value), 1))
806
+ ], 46, xn));
807
807
  }
808
808
  }), En = ["tabindex"], kn = ["tabindex"], $n = ["colspan"], Mn = /* @__PURE__ */ ee({
809
809
  __name: "AExpansionRow",
@@ -814,61 +814,61 @@ const wn = (e) => {
814
814
  addNavigation: { type: [Boolean, Object] }
815
815
  },
816
816
  setup(e) {
817
- const t = j("rowEl"), o = M(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
817
+ const t = j("rowEl"), o = S(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
818
818
  if (e.addNavigation) {
819
819
  const l = {
820
- "keydown.control.g": (r) => {
821
- r.stopPropagation(), r.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
820
+ "keydown.control.g": (s) => {
821
+ s.stopPropagation(), s.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
822
822
  }
823
823
  };
824
- typeof e.addNavigation == "object" && Object.assign(l, e.addNavigation), Ue([
824
+ typeof e.addNavigation == "object" && Object.assign(l, e.addNavigation), qe([
825
825
  {
826
826
  selectors: t,
827
827
  handlers: l
828
828
  }
829
829
  ]);
830
830
  }
831
- return (l, r) => (S(), T(oe, null, [
832
- P("tr", Xe(l.$attrs, {
831
+ return (l, s) => (M(), O(oe, null, [
832
+ z("tr", Ge(l.$attrs, {
833
833
  ref: "rowEl",
834
834
  tabindex: l.tabIndex,
835
835
  class: "expandable-row"
836
836
  }), [
837
- P("td", {
837
+ z("td", {
838
838
  tabIndex: -1,
839
- onClick: r[0] || (r[0] = (u) => l.store.toggleRowExpand(l.rowIndex)),
839
+ onClick: s[0] || (s[0] = (c) => l.store.toggleRowExpand(l.rowIndex)),
840
840
  class: "row-index"
841
- }, ce(o.value), 1),
841
+ }, ie(o.value), 1),
842
842
  F(l.$slots, "row", {}, void 0, !0)
843
843
  ], 16, En),
844
- l.store.display[l.rowIndex].expanded ? (S(), T("tr", {
844
+ l.store.display[l.rowIndex].expanded ? (M(), O("tr", {
845
845
  key: 0,
846
846
  ref: "rowExpanded",
847
847
  tabindex: l.tabIndex,
848
848
  class: "expanded-row"
849
849
  }, [
850
- P("td", {
850
+ z("td", {
851
851
  tabIndex: -1,
852
852
  colspan: l.store.columns.length + 1,
853
853
  class: "expanded-row-content"
854
854
  }, [
855
855
  F(l.$slots, "content", {}, void 0, !0)
856
856
  ], 8, $n)
857
- ], 8, kn)) : _("", !0)
857
+ ], 8, kn)) : q("", !0)
858
858
  ], 64));
859
859
  }
860
860
  }), se = (e, t) => {
861
861
  const o = e.__vccOpts || e;
862
- for (const [l, r] of t)
863
- o[l] = r;
862
+ for (const [l, s] of t)
863
+ o[l] = s;
864
864
  return o;
865
865
  }, Sn = /* @__PURE__ */ se(Mn, [["__scopeId", "data-v-5ad4bb41"]]), Rn = ["colspan"], An = {
866
866
  ref: "container",
867
867
  class: "gantt-container"
868
- }, On = ["data-rowindex", "data-colindex"], Tn = {
869
- key: 0,
868
+ }, Dn = ["data-rowindex", "data-colindex"], On = {
869
+ key: 2,
870
870
  class: "gantt-label"
871
- }, Hn = ["x1", "y1", "x2", "y2"], Dn = /* @__PURE__ */ ee({
871
+ }, Tn = ["x1", "y1", "x2", "y2"], Hn = /* @__PURE__ */ ee({
872
872
  __name: "AGanttCell",
873
873
  props: {
874
874
  store: {},
@@ -883,18 +883,18 @@ const wn = (e) => {
883
883
  },
884
884
  emits: ["connection:create"],
885
885
  setup(e, { expose: t, emit: o }) {
886
- Lt((a) => ({
887
- 52017849: r.value,
888
- "0d200c71": a.colspan
886
+ Lt((I) => ({
887
+ "17bc2643": s.value,
888
+ "0a8a9192": I.colspan
889
889
  }));
890
- const l = o, r = D(e.color.length >= 6 ? e.color : "#cccccc"), u = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, i = j("container"), n = j("bar"), s = j("leftResizeHandle"), d = j("rightResizeHandle"), f = j("leftConnectionHandle"), p = j("rightConnectionHandle"), { width: y } = te(i), { left: m, right: C } = te(n), b = D(e.start), v = D(e.end || b.value + e.colspan), g = D(!1), w = D(!1), I = D(!1), A = D(!1), W = D(!1), H = D({ startX: 0, startY: 0, endX: 0, endY: 0 }), R = M(() => we.value || Q.value || me.value), L = M(() => e.colspan > 0 ? y.value / e.colspan : 0), X = M(() => {
891
- const a = b.value / e.colspan * 100, c = v.value / e.colspan * 100;
890
+ const l = o, s = H(e.color.length >= 6 ? e.color : "#cccccc"), c = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, i = j("container"), n = j("bar"), a = j("leftResizeHandle"), d = j("rightResizeHandle"), f = j("leftConnectionHandle"), p = j("rightConnectionHandle"), { width: y } = te(i), { left: m, right: C } = te(n), x = H(e.start), v = H(e.end || x.value + e.colspan), h = H(!1), w = H(!1), E = H(!1), A = H(!1), X = H(!1), T = H({ startX: 0, startY: 0, endX: 0, endY: 0 }), R = S(() => we.value || K.value || ve.value), L = S(() => e.colspan > 0 ? y.value / e.colspan : 0), G = S(() => {
891
+ const I = x.value / e.colspan * 100, r = v.value / e.colspan * 100;
892
892
  return {
893
- left: `${a}%`,
894
- width: `${c - a}%`,
895
- backgroundColor: r.value
893
+ left: `${I}%`,
894
+ width: `${r - I}%`,
895
+ backgroundColor: s.value
896
896
  };
897
- }), Y = M(
897
+ }), Y = S(
898
898
  () => ({
899
899
  position: "fixed",
900
900
  top: 0,
@@ -904,235 +904,237 @@ const wn = (e) => {
904
904
  pointerEvents: "none",
905
905
  zIndex: 1e3
906
906
  })
907
- ), B = D({ startX: 0, startPos: 0 }), { isDragging: Q } = Pe(s, {
907
+ ), B = H({ startX: 0, startPos: 0 }), { isDragging: K } = Le(a, {
908
908
  axis: "x",
909
- onStart: () => re(m.value, b.value),
910
- onMove: ({ x: a }) => Ae(a),
911
- onEnd: ({ x: a }) => xe(a)
912
- }), { isDragging: me } = Pe(d, {
909
+ onStart: () => me(m.value, x.value),
910
+ onMove: ({ x: I }) => ye(I),
911
+ onEnd: ({ x: I }) => De(I)
912
+ }), { isDragging: ve } = Le(d, {
913
913
  axis: "x",
914
- onStart: () => re(C.value, v.value),
915
- onMove: ({ x: a }) => Je(a),
916
- onEnd: ({ x: a }) => Ze(a)
917
- }), { isDragging: we } = Pe(n, {
914
+ onStart: () => me(C.value, v.value),
915
+ onMove: ({ x: I }) => xe(I),
916
+ onEnd: ({ x: I }) => Ze(I)
917
+ }), { isDragging: we } = Le(n, {
918
918
  exact: !0,
919
919
  axis: "x",
920
- onStart: () => re(m.value, b.value),
921
- onMove: ({ x: a }) => Qe(a),
922
- onEnd: ({ x: a }) => Ke(a)
920
+ onStart: () => me(m.value, x.value),
921
+ onMove: ({ x: I }) => Qe(I),
922
+ onEnd: ({ x: I }) => Ke(I)
923
923
  });
924
924
  ae(() => {
925
925
  _e();
926
926
  }), Bt(() => {
927
927
  et();
928
928
  });
929
- function re(a, c) {
930
- n.value && (n.value.style.transition = "none"), B.value = { startX: a, startPos: c };
929
+ function me(I, r) {
930
+ n.value && (n.value.style.transition = "none"), B.value = { startX: I, startPos: r };
931
931
  }
932
- function Ae(a) {
933
- if (!Q.value || !n.value) return;
934
- const h = (a - B.value.startX) / L.value, x = Math.max(0, Math.min(v.value - 1, B.value.startPos + h));
935
- n.value.style.left = `${x / e.colspan * 100}%`, n.value.style.width = `${(v.value - x) / e.colspan * 100}%`;
932
+ function ye(I) {
933
+ if (!K.value || !n.value) return;
934
+ const u = (I - B.value.startX) / L.value, g = Math.max(0, Math.min(v.value - 1, B.value.startPos + u));
935
+ n.value.style.left = `${g / e.colspan * 100}%`, n.value.style.width = `${(v.value - g) / e.colspan * 100}%`;
936
936
  }
937
- function xe(a) {
937
+ function De(I) {
938
938
  if (!n.value) return;
939
- const c = a - B.value.startX, h = Math.round(c / L.value), x = b.value, $ = Math.max(0, Math.min(v.value - 1, B.value.startPos + h));
940
- b.value = $, e.store.updateGanttBar({
939
+ const r = I - B.value.startX, u = Math.round(r / L.value), g = x.value, b = Math.max(0, Math.min(v.value - 1, B.value.startPos + u));
940
+ x.value = b, e.store.updateGanttBar({
941
941
  rowIndex: e.rowIndex,
942
942
  colIndex: e.colIndex,
943
943
  type: "resize",
944
944
  edge: "start",
945
- oldStart: x,
946
- newStart: $,
945
+ oldStart: g,
946
+ newStart: b,
947
947
  end: v.value,
948
- delta: h,
949
- oldColspan: v.value - x,
950
- newColspan: v.value - $
948
+ delta: u,
949
+ oldColspan: v.value - g,
950
+ newColspan: v.value - b
951
951
  });
952
952
  }
953
- function Je(a) {
954
- if (!me.value || !n.value) return;
955
- const h = (a - B.value.startX) / L.value, x = Math.max(b.value + 1, Math.min(e.columnsCount, B.value.startPos + h));
956
- n.value.style.width = `${(x - b.value) / e.colspan * 100}%`;
953
+ function xe(I) {
954
+ if (!ve.value || !n.value) return;
955
+ const u = (I - B.value.startX) / L.value, g = Math.max(x.value + 1, Math.min(e.columnsCount, B.value.startPos + u));
956
+ n.value.style.width = `${(g - x.value) / e.colspan * 100}%`;
957
957
  }
958
- function Ze(a) {
958
+ function Ze(I) {
959
959
  if (!n.value) return;
960
- const c = a - B.value.startX, h = Math.round(c / L.value), x = v.value, $ = Math.max(b.value + 1, Math.min(e.columnsCount, B.value.startPos + h));
961
- v.value = $, e.store.updateGanttBar({
960
+ const r = I - B.value.startX, u = Math.round(r / L.value), g = v.value, b = Math.max(x.value + 1, Math.min(e.columnsCount, B.value.startPos + u));
961
+ v.value = b, e.store.updateGanttBar({
962
962
  rowIndex: e.rowIndex,
963
963
  colIndex: e.colIndex,
964
964
  type: "resize",
965
965
  edge: "end",
966
- oldEnd: x,
967
- newEnd: $,
968
- start: b.value,
969
- delta: h,
970
- oldColspan: x - b.value,
971
- newColspan: $ - b.value
966
+ oldEnd: g,
967
+ newEnd: b,
968
+ start: x.value,
969
+ delta: u,
970
+ oldColspan: g - x.value,
971
+ newColspan: b - x.value
972
972
  });
973
973
  }
974
- function Qe(a) {
974
+ function Qe(I) {
975
975
  if (!we.value || !n.value) return;
976
- const h = (a - B.value.startX) / L.value, x = v.value - b.value, $ = Math.max(0, Math.min(B.value.startPos + h, e.columnsCount - x));
977
- n.value.style.left = `${$ / e.colspan * 100}%`;
976
+ const u = (I - B.value.startX) / L.value, g = v.value - x.value, b = Math.max(0, Math.min(B.value.startPos + u, e.columnsCount - g));
977
+ n.value.style.left = `${b / e.colspan * 100}%`;
978
978
  }
979
- function Ke(a) {
979
+ function Ke(I) {
980
980
  if (!n.value) return;
981
- const c = a - B.value.startX, h = Math.round(c / L.value), x = v.value - b.value, $ = b.value, O = v.value;
982
- let z = B.value.startPos + h, V = z + x;
983
- z < 0 ? (z = 0, V = x) : V > e.columnsCount && (V = e.columnsCount, z = V - x), b.value = z, v.value = V, e.store.updateGanttBar({
981
+ const r = I - B.value.startX, u = Math.round(r / L.value), g = v.value - x.value, b = x.value, D = v.value;
982
+ let P = B.value.startPos + u, W = P + g;
983
+ P < 0 ? (P = 0, W = g) : W > e.columnsCount && (W = e.columnsCount, P = W - g), x.value = P, v.value = W, e.store.updateGanttBar({
984
984
  rowIndex: e.rowIndex,
985
985
  colIndex: e.colIndex,
986
986
  type: "bar",
987
- oldStart: $,
988
- oldEnd: O,
989
- newStart: z,
990
- newEnd: V,
991
- delta: h,
992
- colspan: V - z
987
+ oldStart: b,
988
+ oldEnd: D,
989
+ newStart: P,
990
+ newEnd: W,
991
+ delta: u,
992
+ colspan: W - P
993
993
  });
994
994
  }
995
995
  function _e() {
996
- const { x: a, y: c } = te(n), { x: h, y: x } = te(f), { x: $, y: O } = te(p);
996
+ const { x: I, y: r } = te(n), { x: u, y: g } = te(f), { x: b, y: D } = te(p);
997
997
  e.store.registerGanttBar({
998
- id: u,
998
+ id: c,
999
999
  rowIndex: e.rowIndex,
1000
1000
  colIndex: e.colIndex,
1001
- startIndex: b,
1001
+ startIndex: x,
1002
1002
  endIndex: v,
1003
- color: r,
1003
+ color: s,
1004
1004
  label: e.label,
1005
- position: { x: a, y: c }
1006
- }), e.store.registerConnectionHandle({
1007
- id: `${u}-connection-left`,
1005
+ position: { x: I, y: r }
1006
+ }), e.store.isDependencyGraphEnabled && (e.store.registerConnectionHandle({
1007
+ id: `${c}-connection-left`,
1008
1008
  rowIndex: e.rowIndex,
1009
1009
  colIndex: e.colIndex,
1010
1010
  side: "left",
1011
- position: { x: h, y: x },
1012
- visible: g,
1013
- barId: u
1011
+ position: { x: u, y: g },
1012
+ visible: h,
1013
+ barId: c
1014
1014
  }), e.store.registerConnectionHandle({
1015
- id: `${u}-connection-right`,
1015
+ id: `${c}-connection-right`,
1016
1016
  rowIndex: e.rowIndex,
1017
1017
  colIndex: e.colIndex,
1018
1018
  side: "right",
1019
- position: { x: $, y: O },
1019
+ position: { x: b, y: D },
1020
1020
  visible: w,
1021
- barId: u
1022
- });
1021
+ barId: c
1022
+ }));
1023
1023
  }
1024
1024
  function et() {
1025
- e.store.unregisterGanttBar(u), e.store.unregisterConnectionHandle(`${u}-connection-left`), e.store.unregisterConnectionHandle(`${u}-connection-right`);
1025
+ e.store.unregisterGanttBar(c), e.store.isDependencyGraphEnabled && (e.store.unregisterConnectionHandle(`${c}-connection-left`), e.store.unregisterConnectionHandle(`${c}-connection-right`));
1026
1026
  }
1027
1027
  function tt() {
1028
- g.value = !0, w.value = !0;
1028
+ e.store.isDependencyGraphEnabled && (h.value = !0, w.value = !0);
1029
1029
  }
1030
1030
  function Oe() {
1031
- !I.value && !A.value && (g.value = !1, w.value = !1);
1031
+ !E.value && !A.value && (h.value = !1, w.value = !1);
1032
1032
  }
1033
- function Te(a, c) {
1034
- c.preventDefault(), c.stopPropagation(), W.value = !0, a === "left" ? I.value = !0 : A.value = !0;
1035
- const h = a === "left" ? f.value : p.value;
1036
- if (h) {
1037
- const O = h.getBoundingClientRect(), z = O.left + O.width / 2, V = O.top + O.height / 2;
1038
- H.value = { startX: z, startY: V, endX: z, endY: V };
1033
+ function Te(I, r) {
1034
+ r.preventDefault(), r.stopPropagation(), X.value = !0, I === "left" ? E.value = !0 : A.value = !0;
1035
+ const u = I === "left" ? f.value : p.value;
1036
+ if (u) {
1037
+ const D = u.getBoundingClientRect(), P = D.left + D.width / 2, W = D.top + D.height / 2;
1038
+ T.value = { startX: P, startY: W, endX: P, endY: W };
1039
1039
  }
1040
- const x = (O) => {
1041
- H.value.endX = O.clientX, H.value.endY = O.clientY;
1042
- }, $ = (O) => {
1043
- He(O, a), De(x, $);
1040
+ const g = (D) => {
1041
+ T.value.endX = D.clientX, T.value.endY = D.clientY;
1042
+ }, b = (D) => {
1043
+ He(D, I), Pe(g, b);
1044
1044
  };
1045
- document.addEventListener("mousemove", x), document.addEventListener("mouseup", $);
1045
+ document.addEventListener("mousemove", g), document.addEventListener("mouseup", b);
1046
1046
  }
1047
- function He(a, c) {
1048
- const h = document.elementFromPoint(a.clientX, a.clientY), x = h == null ? void 0 : h.closest(".connection-handle");
1049
- if (x && x !== (c === "left" ? f.value : p.value)) {
1050
- const $ = x.closest(".gantt-bar");
1051
- if ($) {
1052
- const O = parseInt($.getAttribute("data-rowindex") || "0"), z = parseInt($.getAttribute("data-colindex") || "0"), V = x.classList.contains("left-connection-handle") ? "left" : "right", Rt = `gantt-bar-row-${O}-col-${z}`, nt = e.store.createConnection(
1053
- `${u}-connection-${c}`,
1054
- `${Rt}-connection-${V}`
1047
+ function He(I, r) {
1048
+ const u = document.elementFromPoint(I.clientX, I.clientY), g = u == null ? void 0 : u.closest(".connection-handle");
1049
+ if (g && g !== (r === "left" ? f.value : p.value)) {
1050
+ const b = g.closest(".gantt-bar");
1051
+ if (b) {
1052
+ const D = parseInt(b.getAttribute("data-rowindex") || "0"), P = parseInt(b.getAttribute("data-colindex") || "0"), W = g.classList.contains("left-connection-handle") ? "left" : "right", Rt = `gantt-bar-row-${D}-col-${P}`, nt = e.store.createConnection(
1053
+ `${c}-connection-${r}`,
1054
+ `${Rt}-connection-${W}`
1055
1055
  );
1056
1056
  nt && l("connection:create", nt);
1057
1057
  }
1058
1058
  }
1059
1059
  }
1060
- function De(a, c) {
1061
- var h;
1062
- W.value = !1, I.value = !1, A.value = !1, document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", c), (h = n.value) != null && h.matches(":hover") || Oe();
1060
+ function Pe(I, r) {
1061
+ var u;
1062
+ X.value = !1, E.value = !1, A.value = !1, document.removeEventListener("mousemove", I), document.removeEventListener("mouseup", r), (u = n.value) != null && u.matches(":hover") || Oe();
1063
1063
  }
1064
1064
  return t({
1065
- barStyle: X,
1066
- cleanupConnectionDrag: De,
1065
+ barStyle: G,
1066
+ cleanupConnectionDrag: Pe,
1067
1067
  currentEnd: v,
1068
1068
  handleConnectionDrop: He,
1069
- isLeftConnectionDragging: I,
1070
- isLeftConnectionVisible: g,
1069
+ isLeftConnectionDragging: E,
1070
+ isLeftConnectionVisible: h,
1071
1071
  isRightConnectionDragging: A,
1072
1072
  isRightConnectionVisible: w,
1073
- showDragPreview: W
1074
- }), (a, c) => (S(), T("td", {
1073
+ showDragPreview: X
1074
+ }), (I, r) => (M(), O("td", {
1075
1075
  class: "aganttcell",
1076
- colspan: a.colspan
1076
+ colspan: I.colspan
1077
1077
  }, [
1078
- P("div", An, [
1079
- P("div", {
1078
+ z("div", An, [
1079
+ z("div", {
1080
1080
  ref: "bar",
1081
- "data-rowindex": a.rowIndex,
1082
- "data-colindex": a.colIndex,
1081
+ "data-rowindex": I.rowIndex,
1082
+ "data-colindex": I.colIndex,
1083
1083
  class: U(["gantt-bar", { "is-dragging": R.value }]),
1084
- style: K(X.value),
1084
+ style: _(G.value),
1085
1085
  onMouseenter: tt,
1086
1086
  onMouseleave: Oe
1087
1087
  }, [
1088
- P("div", {
1088
+ I.store.isDependencyGraphEnabled ? (M(), O("div", {
1089
+ key: 0,
1089
1090
  ref: "leftConnectionHandle",
1090
- class: U(["connection-handle left-connection-handle", { visible: g.value, "is-dragging": I.value }]),
1091
- onMousedown: c[0] || (c[0] = ke((h) => Te("left", h), ["stop"]))
1092
- }, c[2] || (c[2] = [
1093
- P("div", { class: "connection-dot" }, null, -1)
1094
- ]), 34),
1095
- P("div", {
1091
+ class: U(["connection-handle left-connection-handle", { visible: h.value, "is-dragging": E.value }]),
1092
+ onMousedown: r[0] || (r[0] = $e((u) => Te("left", u), ["stop"]))
1093
+ }, r[2] || (r[2] = [
1094
+ z("div", { class: "connection-dot" }, null, -1)
1095
+ ]), 34)) : q("", !0),
1096
+ I.store.isDependencyGraphEnabled ? (M(), O("div", {
1097
+ key: 1,
1096
1098
  ref: "rightConnectionHandle",
1097
1099
  class: U(["connection-handle right-connection-handle", { visible: w.value, "is-dragging": A.value }]),
1098
- onMousedown: c[1] || (c[1] = ke((h) => Te("right", h), ["stop"]))
1099
- }, c[3] || (c[3] = [
1100
- P("div", { class: "connection-dot" }, null, -1)
1101
- ]), 34),
1102
- P("div", {
1100
+ onMousedown: r[1] || (r[1] = $e((u) => Te("right", u), ["stop"]))
1101
+ }, r[3] || (r[3] = [
1102
+ z("div", { class: "connection-dot" }, null, -1)
1103
+ ]), 34)) : q("", !0),
1104
+ z("div", {
1103
1105
  ref: "leftResizeHandle",
1104
- class: U(["resize-handle left-resize-handle", { "is-dragging": E(Q) }])
1105
- }, c[4] || (c[4] = [
1106
- P("div", { class: "handle-grip" }, null, -1),
1107
- P("div", { class: "vertical-indicator left-indicator" }, null, -1)
1106
+ class: U(["resize-handle left-resize-handle", { "is-dragging": k(K) }])
1107
+ }, r[4] || (r[4] = [
1108
+ z("div", { class: "handle-grip" }, null, -1),
1109
+ z("div", { class: "vertical-indicator left-indicator" }, null, -1)
1108
1110
  ]), 2),
1109
- a.label ? (S(), T("label", Tn, ce(a.label), 1)) : _("", !0),
1110
- P("div", {
1111
+ I.label ? (M(), O("label", On, ie(I.label), 1)) : q("", !0),
1112
+ z("div", {
1111
1113
  ref: "rightResizeHandle",
1112
- class: U(["resize-handle right-resize-handle", { "is-dragging": E(me) }])
1113
- }, c[5] || (c[5] = [
1114
- P("div", { class: "handle-grip" }, null, -1),
1115
- P("div", { class: "vertical-indicator right-indicator" }, null, -1)
1114
+ class: U(["resize-handle right-resize-handle", { "is-dragging": k(ve) }])
1115
+ }, r[5] || (r[5] = [
1116
+ z("div", { class: "handle-grip" }, null, -1),
1117
+ z("div", { class: "vertical-indicator right-indicator" }, null, -1)
1116
1118
  ]), 2)
1117
- ], 46, On)
1119
+ ], 46, Dn)
1118
1120
  ], 512),
1119
- W.value ? (S(), T("svg", {
1121
+ I.store.isDependencyGraphEnabled && X.value ? (M(), O("svg", {
1120
1122
  key: 0,
1121
- style: K(Y.value)
1123
+ style: _(Y.value)
1122
1124
  }, [
1123
- P("line", {
1124
- x1: H.value.startX,
1125
- y1: H.value.startY,
1126
- x2: H.value.endX,
1127
- y2: H.value.endY,
1125
+ z("line", {
1126
+ x1: T.value.startX,
1127
+ y1: T.value.startY,
1128
+ x2: T.value.endX,
1129
+ y2: T.value.endY,
1128
1130
  stroke: "#2196f3",
1129
1131
  "stroke-width": "2",
1130
1132
  "stroke-dasharray": "5,5"
1131
- }, null, 8, Hn)
1132
- ], 4)) : _("", !0)
1133
+ }, null, 8, Tn)
1134
+ ], 4)) : q("", !0)
1133
1135
  ], 8, Rn));
1134
1136
  }
1135
- }), Pn = /* @__PURE__ */ se(Dn, [["__scopeId", "data-v-a77cc6d2"]]), Ln = ["tabindex"], Bn = /* @__PURE__ */ ee({
1137
+ }), Pn = /* @__PURE__ */ se(Hn, [["__scopeId", "data-v-52febd32"]]), Ln = ["tabindex"], Bn = /* @__PURE__ */ ee({
1136
1138
  __name: "ARow",
1137
1139
  props: {
1138
1140
  rowIndex: {},
@@ -1141,71 +1143,71 @@ const wn = (e) => {
1141
1143
  addNavigation: { type: [Boolean, Object], default: !1 }
1142
1144
  },
1143
1145
  setup(e) {
1144
- const t = j("rowEl"), o = M(() => e.store.isRowVisible(e.rowIndex)), l = M(() => e.store.getRowExpandSymbol(e.rowIndex));
1146
+ const t = j("rowEl"), o = S(() => e.store.isRowVisible(e.rowIndex)), l = S(() => e.store.getRowExpandSymbol(e.rowIndex));
1145
1147
  if (e.addNavigation) {
1146
- let r = je;
1147
- typeof e.addNavigation == "object" && (r = {
1148
- ...r,
1148
+ let s = Ue;
1149
+ typeof e.addNavigation == "object" && (s = {
1150
+ ...s,
1149
1151
  ...e.addNavigation
1150
- }), Ue([
1152
+ }), qe([
1151
1153
  {
1152
1154
  selectors: t,
1153
- handlers: r
1155
+ handlers: s
1154
1156
  }
1155
1157
  ]);
1156
1158
  }
1157
- return (r, u) => $e((S(), T("tr", {
1159
+ return (s, c) => Me((M(), O("tr", {
1158
1160
  ref: "rowEl",
1159
- tabindex: r.tabIndex,
1161
+ tabindex: s.tabIndex,
1160
1162
  class: "atable-row"
1161
1163
  }, [
1162
- r.store.config.view !== "uncounted" ? F(r.$slots, "index", { key: 0 }, () => [
1163
- r.store.config.view === "list" ? (S(), T("td", {
1164
+ s.store.config.view !== "uncounted" ? F(s.$slots, "index", { key: 0 }, () => [
1165
+ s.store.config.view === "list" ? (M(), O("td", {
1164
1166
  key: 0,
1165
1167
  tabIndex: -1,
1166
- class: U(["list-index", r.store.hasPinnedColumns ? "sticky-index" : ""])
1167
- }, ce(r.rowIndex + 1), 3)) : r.store.isTreeView ? (S(), T("td", {
1168
+ class: U(["list-index", s.store.hasPinnedColumns ? "sticky-index" : ""])
1169
+ }, ie(s.rowIndex + 1), 3)) : s.store.isTreeView ? (M(), O("td", {
1168
1170
  key: 1,
1169
1171
  tabIndex: -1,
1170
- class: U(["tree-index", r.store.hasPinnedColumns ? "sticky-index" : ""]),
1171
- onClick: u[0] || (u[0] = (i) => r.store.toggleRowExpand(r.rowIndex))
1172
- }, ce(l.value), 3)) : _("", !0)
1173
- ], !0) : _("", !0),
1174
- F(r.$slots, "default", {}, void 0, !0)
1172
+ class: U(["tree-index", s.store.hasPinnedColumns ? "sticky-index" : ""]),
1173
+ onClick: c[0] || (c[0] = (i) => s.store.toggleRowExpand(s.rowIndex))
1174
+ }, ie(l.value), 3)) : q("", !0)
1175
+ ], !0) : q("", !0),
1176
+ F(s.$slots, "default", {}, void 0, !0)
1175
1177
  ], 8, Ln)), [
1176
- [yt, o.value]
1178
+ [xt, o.value]
1177
1179
  ]);
1178
1180
  }
1179
- }), kt = /* @__PURE__ */ se(Bn, [["__scopeId", "data-v-c554ee0f"]]), qe = Se ? window : void 0;
1181
+ }), kt = /* @__PURE__ */ se(Bn, [["__scopeId", "data-v-c554ee0f"]]), Je = Re ? window : void 0;
1180
1182
  function ne(e) {
1181
1183
  var t;
1182
- const o = k(e);
1184
+ const o = $(e);
1183
1185
  return (t = o == null ? void 0 : o.$el) != null ? t : o;
1184
1186
  }
1185
- function Ee(...e) {
1187
+ function ke(...e) {
1186
1188
  const t = [], o = () => {
1187
1189
  t.forEach((n) => n()), t.length = 0;
1188
- }, l = (n, s, d, f) => (n.addEventListener(s, d, f), () => n.removeEventListener(s, d, f)), r = M(() => {
1189
- const n = le(k(e[0])).filter((s) => s != null);
1190
- return n.every((s) => typeof s != "string") ? n : void 0;
1191
- }), u = Ct(
1190
+ }, l = (n, a, d, f) => (n.addEventListener(a, d, f), () => n.removeEventListener(a, d, f)), s = S(() => {
1191
+ const n = le($(e[0])).filter((a) => a != null);
1192
+ return n.every((a) => typeof a != "string") ? n : void 0;
1193
+ }), c = Ct(
1192
1194
  () => {
1193
- var n, s;
1195
+ var n, a;
1194
1196
  return [
1195
- (s = (n = r.value) == null ? void 0 : n.map((d) => ne(d))) != null ? s : [qe].filter((d) => d != null),
1196
- le(k(r.value ? e[1] : e[0])),
1197
- le(E(r.value ? e[2] : e[1])),
1197
+ (a = (n = s.value) == null ? void 0 : n.map((d) => ne(d))) != null ? a : [Je].filter((d) => d != null),
1198
+ le($(s.value ? e[1] : e[0])),
1199
+ le(k(s.value ? e[2] : e[1])),
1198
1200
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
1199
- k(r.value ? e[3] : e[2])
1201
+ $(s.value ? e[3] : e[2])
1200
1202
  ];
1201
1203
  },
1202
- ([n, s, d, f]) => {
1203
- if (o(), !(n != null && n.length) || !(s != null && s.length) || !(d != null && d.length))
1204
+ ([n, a, d, f]) => {
1205
+ if (o(), !(n != null && n.length) || !(a != null && a.length) || !(d != null && d.length))
1204
1206
  return;
1205
1207
  const p = bt(f) ? { ...f } : f;
1206
1208
  t.push(
1207
1209
  ...n.flatMap(
1208
- (y) => s.flatMap(
1210
+ (y) => a.flatMap(
1209
1211
  (m) => d.map((C) => l(y, m, C, p))
1210
1212
  )
1211
1213
  )
@@ -1213,42 +1215,42 @@ function Ee(...e) {
1213
1215
  },
1214
1216
  { flush: "post" }
1215
1217
  ), i = () => {
1216
- u(), o();
1218
+ c(), o();
1217
1219
  };
1218
- return ve(o), i;
1220
+ return fe(o), i;
1219
1221
  }
1220
1222
  let vt = !1;
1221
1223
  function mt(e, t, o = {}) {
1222
- const { window: l = qe, ignore: r = [], capture: u = !0, detectIframe: i = !1, controls: n = !1 } = o;
1224
+ const { window: l = Je, ignore: s = [], capture: c = !0, detectIframe: i = !1, controls: n = !1 } = o;
1223
1225
  if (!l)
1224
- return n ? { stop: q, cancel: q, trigger: q } : q;
1225
- if (We && !vt) {
1226
+ return n ? { stop: J, cancel: J, trigger: J } : J;
1227
+ if (Xe && !vt) {
1226
1228
  vt = !0;
1227
1229
  const v = { passive: !0 };
1228
- Array.from(l.document.body.children).forEach((g) => g.addEventListener("click", q, v)), l.document.documentElement.addEventListener("click", q, v);
1230
+ Array.from(l.document.body.children).forEach((h) => h.addEventListener("click", J, v)), l.document.documentElement.addEventListener("click", J, v);
1229
1231
  }
1230
- let s = !0;
1231
- const d = (v) => k(r).some((g) => {
1232
- if (typeof g == "string")
1233
- return Array.from(l.document.querySelectorAll(g)).some((w) => w === v.target || v.composedPath().includes(w));
1232
+ let a = !0;
1233
+ const d = (v) => $(s).some((h) => {
1234
+ if (typeof h == "string")
1235
+ return Array.from(l.document.querySelectorAll(h)).some((w) => w === v.target || v.composedPath().includes(w));
1234
1236
  {
1235
- const w = ne(g);
1237
+ const w = ne(h);
1236
1238
  return w && (v.target === w || v.composedPath().includes(w));
1237
1239
  }
1238
1240
  });
1239
1241
  function f(v) {
1240
- const g = k(v);
1241
- return g && g.$.subTree.shapeFlag === 16;
1242
+ const h = $(v);
1243
+ return h && h.$.subTree.shapeFlag === 16;
1242
1244
  }
1243
- function p(v, g) {
1244
- const w = k(v), I = w.$.subTree && w.$.subTree.children;
1245
- return I == null || !Array.isArray(I) ? !1 : I.some((A) => A.el === g.target || g.composedPath().includes(A.el));
1245
+ function p(v, h) {
1246
+ const w = $(v), E = w.$.subTree && w.$.subTree.children;
1247
+ return E == null || !Array.isArray(E) ? !1 : E.some((A) => A.el === h.target || h.composedPath().includes(A.el));
1246
1248
  }
1247
1249
  const y = (v) => {
1248
- const g = ne(e);
1249
- if (v.target != null && !(!(g instanceof Element) && f(e) && p(e, v)) && !(!g || g === v.target || v.composedPath().includes(g))) {
1250
- if ("detail" in v && v.detail === 0 && (s = !d(v)), !s) {
1251
- s = !0;
1250
+ const h = ne(e);
1251
+ if (v.target != null && !(!(h instanceof Element) && f(e) && p(e, v)) && !(!h || h === v.target || v.composedPath().includes(h))) {
1252
+ if ("detail" in v && v.detail === 0 && (a = !d(v)), !a) {
1253
+ a = !0;
1252
1254
  return;
1253
1255
  }
1254
1256
  t(v);
@@ -1256,92 +1258,92 @@ function mt(e, t, o = {}) {
1256
1258
  };
1257
1259
  let m = !1;
1258
1260
  const C = [
1259
- Ee(l, "click", (v) => {
1261
+ ke(l, "click", (v) => {
1260
1262
  m || (m = !0, setTimeout(() => {
1261
1263
  m = !1;
1262
1264
  }, 0), y(v));
1263
- }, { passive: !0, capture: u }),
1264
- Ee(l, "pointerdown", (v) => {
1265
- const g = ne(e);
1266
- s = !d(v) && !!(g && !v.composedPath().includes(g));
1265
+ }, { passive: !0, capture: c }),
1266
+ ke(l, "pointerdown", (v) => {
1267
+ const h = ne(e);
1268
+ a = !d(v) && !!(h && !v.composedPath().includes(h));
1267
1269
  }, { passive: !0 }),
1268
- i && Ee(l, "blur", (v) => {
1270
+ i && ke(l, "blur", (v) => {
1269
1271
  setTimeout(() => {
1270
- var g;
1272
+ var h;
1271
1273
  const w = ne(e);
1272
- ((g = l.document.activeElement) == null ? void 0 : g.tagName) === "IFRAME" && !(w != null && w.contains(l.document.activeElement)) && t(v);
1274
+ ((h = l.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(w != null && w.contains(l.document.activeElement)) && t(v);
1273
1275
  }, 0);
1274
1276
  }, { passive: !0 })
1275
- ].filter(Boolean), b = () => C.forEach((v) => v());
1277
+ ].filter(Boolean), x = () => C.forEach((v) => v());
1276
1278
  return n ? {
1277
- stop: b,
1279
+ stop: x,
1278
1280
  cancel: () => {
1279
- s = !1;
1281
+ a = !1;
1280
1282
  },
1281
1283
  trigger: (v) => {
1282
- s = !0, y(v), s = !1;
1284
+ a = !0, y(v), a = !1;
1283
1285
  }
1284
- } : b;
1286
+ } : x;
1285
1287
  }
1286
- const Le = /* @__PURE__ */ new WeakMap(), zn = {
1288
+ const Be = /* @__PURE__ */ new WeakMap(), zn = {
1287
1289
  mounted(e, t) {
1288
1290
  const o = !t.modifiers.bubble;
1289
1291
  let l;
1290
1292
  if (typeof t.value == "function")
1291
1293
  l = mt(e, t.value, { capture: o });
1292
1294
  else {
1293
- const [r, u] = t.value;
1294
- l = mt(e, r, Object.assign({ capture: o }, u));
1295
+ const [s, c] = t.value;
1296
+ l = mt(e, s, Object.assign({ capture: o }, c));
1295
1297
  }
1296
- Le.set(e, l);
1298
+ Be.set(e, l);
1297
1299
  },
1298
1300
  unmounted(e) {
1299
- const t = Le.get(e);
1300
- t && typeof t == "function" ? t() : t == null || t.stop(), Le.delete(e);
1301
+ const t = Be.get(e);
1302
+ t && typeof t == "function" ? t() : t == null || t.stop(), Be.delete(e);
1301
1303
  }
1302
1304
  };
1303
1305
  function Wn() {
1304
- const e = N(!1), t = Me();
1306
+ const e = N(!1), t = Se();
1305
1307
  return t && ae(() => {
1306
1308
  e.value = !0;
1307
1309
  }, t), e;
1308
1310
  }
1309
1311
  function Xn(e) {
1310
1312
  const t = Wn();
1311
- return M(() => (t.value, !!e()));
1313
+ return S(() => (t.value, !!e()));
1312
1314
  }
1313
- function gt(e, t, o = {}) {
1314
- const { window: l = qe, ...r } = o;
1315
- let u;
1315
+ function ht(e, t, o = {}) {
1316
+ const { window: l = Je, ...s } = o;
1317
+ let c;
1316
1318
  const i = Xn(() => l && "ResizeObserver" in l), n = () => {
1317
- u && (u.disconnect(), u = void 0);
1318
- }, s = M(() => {
1319
- const p = k(e);
1319
+ c && (c.disconnect(), c = void 0);
1320
+ }, a = S(() => {
1321
+ const p = $(e);
1320
1322
  return Array.isArray(p) ? p.map((y) => ne(y)) : [ne(p)];
1321
- }), d = G(
1322
- s,
1323
+ }), d = V(
1324
+ a,
1323
1325
  (p) => {
1324
1326
  if (n(), i.value && l) {
1325
- u = new ResizeObserver(t);
1327
+ c = new ResizeObserver(t);
1326
1328
  for (const y of p)
1327
- y && u.observe(y, r);
1329
+ y && c.observe(y, s);
1328
1330
  }
1329
1331
  },
1330
1332
  { immediate: !0, flush: "post" }
1331
1333
  ), f = () => {
1332
1334
  n(), d();
1333
1335
  };
1334
- return ve(f), {
1336
+ return fe(f), {
1335
1337
  isSupported: i,
1336
1338
  stop: f
1337
1339
  };
1338
1340
  }
1339
- function Be(e) {
1341
+ function ze(e) {
1340
1342
  return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
1341
1343
  }
1342
- const Nn = {
1344
+ const Gn = {
1343
1345
  mounted(e, t) {
1344
- typeof t.value == "function" ? gt(e, t.value) : gt(e, ...t.value);
1346
+ typeof t.value == "function" ? ht(e, t.value) : ht(e, ...t.value);
1345
1347
  }
1346
1348
  };
1347
1349
  function $t(e) {
@@ -1353,19 +1355,19 @@ function $t(e) {
1353
1355
  return !o || o.tagName === "BODY" ? !1 : $t(o);
1354
1356
  }
1355
1357
  }
1356
- function Gn(e) {
1358
+ function Nn(e) {
1357
1359
  const t = e || window.event, o = t.target;
1358
1360
  return $t(o) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
1359
1361
  }
1360
- const ze = /* @__PURE__ */ new WeakMap();
1362
+ const We = /* @__PURE__ */ new WeakMap();
1361
1363
  function Vn(e, t = !1) {
1362
1364
  const o = N(t);
1363
- let l = null, r = "";
1364
- G(cn(e), (n) => {
1365
- const s = Be(k(n));
1366
- if (s) {
1367
- const d = s;
1368
- if (ze.get(d) || ze.set(d, d.style.overflow), d.style.overflow !== "hidden" && (r = d.style.overflow), d.style.overflow === "hidden")
1365
+ let l = null, s = "";
1366
+ V(cn(e), (n) => {
1367
+ const a = ze($(n));
1368
+ if (a) {
1369
+ const d = a;
1370
+ if (We.get(d) || We.set(d, d.style.overflow), d.style.overflow !== "hidden" && (s = d.style.overflow), d.style.overflow === "hidden")
1369
1371
  return o.value = !0;
1370
1372
  if (o.value)
1371
1373
  return d.style.overflow = "hidden";
@@ -1373,26 +1375,26 @@ function Vn(e, t = !1) {
1373
1375
  }, {
1374
1376
  immediate: !0
1375
1377
  });
1376
- const u = () => {
1377
- const n = Be(k(e));
1378
- !n || o.value || (We && (l = Ee(
1378
+ const c = () => {
1379
+ const n = ze($(e));
1380
+ !n || o.value || (Xe && (l = ke(
1379
1381
  n,
1380
1382
  "touchmove",
1381
- (s) => {
1382
- Gn(s);
1383
+ (a) => {
1384
+ Nn(a);
1383
1385
  },
1384
1386
  { passive: !1 }
1385
1387
  )), n.style.overflow = "hidden", o.value = !0);
1386
1388
  }, i = () => {
1387
- const n = Be(k(e));
1388
- !n || !o.value || (We && (l == null || l()), n.style.overflow = r, ze.delete(n), o.value = !1);
1389
+ const n = ze($(e));
1390
+ !n || !o.value || (Xe && (l == null || l()), n.style.overflow = s, We.delete(n), o.value = !1);
1389
1391
  };
1390
- return ve(i), M({
1392
+ return fe(i), S({
1391
1393
  get() {
1392
1394
  return o.value;
1393
1395
  },
1394
1396
  set(n) {
1395
- n ? u() : i();
1397
+ n ? c() : i();
1396
1398
  }
1397
1399
  });
1398
1400
  }
@@ -1403,8 +1405,8 @@ function Fn() {
1403
1405
  if (t.value = l.value, e)
1404
1406
  return;
1405
1407
  e = !0;
1406
- const r = Vn(o, l.value);
1407
- G(t, (u) => r.value = u);
1408
+ const s = Vn(o, l.value);
1409
+ V(t, (c) => s.value = c);
1408
1410
  };
1409
1411
  }
1410
1412
  Fn();
@@ -1419,39 +1421,39 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
1419
1421
  pointerEvents: "none",
1420
1422
  zIndex: 1
1421
1423
  }
1422
- }, Un = ["d", "stroke-width", "onDblclick"], qn = ["d", "stroke", "stroke-width", "id", "onDblclick"], Jn = 0.25, be = 16, Zn = /* @__PURE__ */ ee({
1424
+ }, Un = ["d", "stroke-width", "onDblclick"], qn = ["d", "stroke", "stroke-width", "id", "onDblclick"], Jn = 0.25, Ce = 16, Zn = /* @__PURE__ */ ee({
1423
1425
  __name: "AGanttConnection",
1424
1426
  props: {
1425
1427
  store: {}
1426
1428
  },
1427
1429
  emits: ["connection:delete"],
1428
1430
  setup(e, { emit: t }) {
1429
- const o = t, l = M(() => e.store.connectionPaths.filter((i) => {
1430
- const n = e.store.ganttBars.find((d) => d.id === i.from.barId), s = e.store.ganttBars.find((d) => d.id === i.to.barId);
1431
- return n && s;
1432
- })), r = (i, n = !1) => {
1433
- const s = e.store.connectionHandles.find(
1431
+ const o = t, l = S(() => e.store.connectionPaths.filter((i) => {
1432
+ const n = e.store.ganttBars.find((d) => d.id === i.from.barId), a = e.store.ganttBars.find((d) => d.id === i.to.barId);
1433
+ return n && a;
1434
+ })), s = (i, n = !1) => {
1435
+ const a = e.store.connectionHandles.find(
1434
1436
  (L) => L.barId === i.from.barId && L.side === i.from.side
1435
1437
  ), d = e.store.connectionHandles.find(
1436
1438
  (L) => L.barId === i.to.barId && L.side === i.to.side
1437
1439
  );
1438
- if (!s || !d) return "";
1439
- const f = s.position.x + be / 2, p = s.position.y + be / 2, y = d.position.x + be / 2, m = d.position.y + be / 2, C = Math.abs(y - f), b = Math.max(C * Jn, 50), v = f + (i.from.side === "left" ? -b : b), g = y + (i.to.side === "left" ? -b : b), w = { x: 0.5 * f + 0.5 * v, y: 0.5 * p + 0.5 * p }, I = { x: 0.5 * v + 0.5 * g, y: 0.5 * p + 0.5 * m }, A = { x: 0.5 * g + 0.5 * y, y: 0.5 * m + 0.5 * m }, W = { x: 0.5 * w.x + 0.5 * I.x, y: 0.5 * w.y + 0.5 * I.y }, H = { x: 0.5 * I.x + 0.5 * A.x, y: 0.5 * I.y + 0.5 * A.y }, R = { x: 0.5 * W.x + 0.5 * H.x, y: 0.5 * W.y + 0.5 * H.y };
1440
- return `M ${f} ${p} Q ${v} ${p}, ${R.x} ${R.y} Q ${g} ${m}, ${y} ${m}`;
1441
- }, u = (i) => {
1440
+ if (!a || !d) return "";
1441
+ const f = a.position.x + Ce / 2, p = a.position.y + Ce / 2, y = d.position.x + Ce / 2, m = d.position.y + Ce / 2, C = Math.abs(y - f), x = Math.max(C * Jn, 50), v = f + (i.from.side === "left" ? -x : x), h = y + (i.to.side === "left" ? -x : x), w = { x: 0.5 * f + 0.5 * v, y: 0.5 * p + 0.5 * p }, E = { x: 0.5 * v + 0.5 * h, y: 0.5 * p + 0.5 * m }, A = { x: 0.5 * h + 0.5 * y, y: 0.5 * m + 0.5 * m }, X = { x: 0.5 * w.x + 0.5 * E.x, y: 0.5 * w.y + 0.5 * E.y }, T = { x: 0.5 * E.x + 0.5 * A.x, y: 0.5 * E.y + 0.5 * A.y }, R = { x: 0.5 * X.x + 0.5 * T.x, y: 0.5 * X.y + 0.5 * T.y };
1442
+ return `M ${f} ${p} Q ${v} ${p}, ${R.x} ${R.y} Q ${h} ${m}, ${y} ${m}`;
1443
+ }, c = (i) => {
1442
1444
  e.store.deleteConnection(i.id) && o("connection:delete", i);
1443
1445
  };
1444
- return (i, n) => (S(), T("div", Yn, [
1445
- (S(), T("svg", jn, [
1446
- n[0] || (n[0] = P("defs", null, [
1447
- P("path", {
1446
+ return (i, n) => (M(), O("div", Yn, [
1447
+ (M(), O("svg", jn, [
1448
+ n[0] || (n[0] = z("defs", null, [
1449
+ z("path", {
1448
1450
  id: "arrowhead",
1449
1451
  d: "M 0 -7 L 20 0 L 0 7Z",
1450
1452
  stroke: "black",
1451
1453
  "stroke-width": "1",
1452
1454
  fill: "currentColor"
1453
1455
  }),
1454
- P("marker", {
1456
+ z("marker", {
1455
1457
  id: "arrowhead-marker",
1456
1458
  markerWidth: "10",
1457
1459
  markerHeight: "7",
@@ -1460,36 +1462,36 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
1460
1462
  orient: "auto",
1461
1463
  markerUnits: "strokeWidth"
1462
1464
  }, [
1463
- P("polygon", {
1465
+ z("polygon", {
1464
1466
  points: "0 0, 10 3.5, 0 7",
1465
1467
  fill: "currentColor"
1466
1468
  })
1467
1469
  ])
1468
1470
  ], -1)),
1469
- (S(!0), T(oe, null, he(l.value, (s) => {
1471
+ (M(!0), O(oe, null, ge(l.value, (a) => {
1470
1472
  var d;
1471
- return S(), T("path", {
1472
- key: `${s.id}-hitbox`,
1473
- d: r(s),
1473
+ return M(), O("path", {
1474
+ key: `${a.id}-hitbox`,
1475
+ d: s(a),
1474
1476
  stroke: "transparent",
1475
- "stroke-width": (((d = s.style) == null ? void 0 : d.width) || 2) + 10,
1477
+ "stroke-width": (((d = a.style) == null ? void 0 : d.width) || 2) + 10,
1476
1478
  fill: "none",
1477
1479
  class: "connection-hitbox",
1478
- onDblclick: (f) => u(s)
1480
+ onDblclick: (f) => c(a)
1479
1481
  }, null, 40, Un);
1480
1482
  }), 128)),
1481
- (S(!0), T(oe, null, he(l.value, (s) => {
1483
+ (M(!0), O(oe, null, ge(l.value, (a) => {
1482
1484
  var d, f;
1483
- return S(), T("path", {
1484
- key: s.id,
1485
- d: r(s),
1486
- stroke: ((d = s.style) == null ? void 0 : d.color) || "#666",
1487
- "stroke-width": ((f = s.style) == null ? void 0 : f.width) || 2,
1485
+ return M(), O("path", {
1486
+ key: a.id,
1487
+ d: s(a),
1488
+ stroke: ((d = a.style) == null ? void 0 : d.color) || "#666",
1489
+ "stroke-width": ((f = a.style) == null ? void 0 : f.width) || 2,
1488
1490
  fill: "none",
1489
1491
  "marker-mid": "url(#arrowhead-marker)",
1490
- id: s.id,
1492
+ id: a.id,
1491
1493
  class: "connection-path animated-path",
1492
- onDblclick: (p) => u(s)
1494
+ onDblclick: (p) => c(a)
1493
1495
  }, null, 40, qn);
1494
1496
  }), 128))
1495
1497
  ]))
@@ -1507,15 +1509,15 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
1507
1509
  setup(e) {
1508
1510
  const t = (o) => {
1509
1511
  var l;
1510
- for (const r of o) {
1511
- if (r.borderBoxSize.length === 0) continue;
1512
- const i = r.borderBoxSize[0].inlineSize, n = Number(r.target.dataset.colindex), s = (l = e.store.columns[n]) == null ? void 0 : l.width;
1513
- typeof s == "number" && s !== i && e.store.resizeColumn(n, i);
1512
+ for (const s of o) {
1513
+ if (s.borderBoxSize.length === 0) continue;
1514
+ const i = s.borderBoxSize[0].inlineSize, n = Number(s.target.dataset.colindex), a = (l = e.store.columns[n]) == null ? void 0 : l.width;
1515
+ typeof a == "number" && a !== i && e.store.resizeColumn(n, i);
1514
1516
  }
1515
1517
  };
1516
- return (o, l) => o.columns.length ? (S(), T("thead", Kn, [
1517
- P("tr", _n, [
1518
- o.store.zeroColumn ? (S(), T("th", {
1518
+ return (o, l) => o.columns.length ? (M(), O("thead", Kn, [
1519
+ z("tr", _n, [
1520
+ o.store.zeroColumn ? (M(), O("th", {
1519
1521
  key: 0,
1520
1522
  id: "header-index",
1521
1523
  class: U([[
@@ -1523,22 +1525,22 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
1523
1525
  o.store.isTreeView ? "tree-index" : "",
1524
1526
  o.store.config.view === "list-expansion" ? "list-expansion-index" : ""
1525
1527
  ], "list-index"])
1526
- }, null, 2)) : _("", !0),
1527
- (S(!0), T(oe, null, he(o.columns, (r, u) => $e((S(), T("th", {
1528
- key: r.name,
1529
- "data-colindex": u,
1528
+ }, null, 2)) : q("", !0),
1529
+ (M(!0), O(oe, null, ge(o.columns, (s, c) => Me((M(), O("th", {
1530
+ key: s.name,
1531
+ "data-colindex": c,
1530
1532
  tabindex: "-1",
1531
- style: K(o.store.getHeaderCellStyle(r)),
1532
- class: U(r.pinned ? "sticky-column" : "")
1533
+ style: _(o.store.getHeaderCellStyle(s)),
1534
+ class: U(s.pinned ? "sticky-column" : "")
1533
1535
  }, [
1534
1536
  F(o.$slots, "default", {}, () => [
1535
- zt(ce(r.label || String.fromCharCode(u + 97).toUpperCase()), 1)
1537
+ zt(ie(s.label || String.fromCharCode(c + 97).toUpperCase()), 1)
1536
1538
  ])
1537
1539
  ], 14, eo)), [
1538
- [E(Nn), t]
1540
+ [k(Gn), t]
1539
1541
  ])), 128))
1540
1542
  ])
1541
- ])) : _("", !0);
1543
+ ])) : q("", !0);
1542
1544
  }
1543
1545
  }), St = /* @__PURE__ */ ee({
1544
1546
  __name: "ATableModal",
@@ -1546,228 +1548,229 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
1546
1548
  store: {}
1547
1549
  },
1548
1550
  setup(e) {
1549
- const t = j("amodal"), { width: o, height: l } = te(t), r = M(() => {
1551
+ const t = j("amodal"), { width: o, height: l } = te(t), s = S(() => {
1550
1552
  var p, y, m, C;
1551
1553
  if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return;
1552
- const u = (p = e.store.modal.cell) == null ? void 0 : p.closest("table"), i = u.offsetHeight || 0, n = u.offsetWidth || 0;
1553
- let s = ((y = e.store.modal.cell) == null ? void 0 : y.offsetTop) || 0;
1554
- const d = ((m = u.querySelector("thead")) == null ? void 0 : m.offsetHeight) || 0;
1555
- s += d, s = s + l.value < i ? s : s - (l.value + e.store.modal.height);
1554
+ const c = (p = e.store.modal.cell) == null ? void 0 : p.closest("table"), i = c.offsetHeight || 0, n = c.offsetWidth || 0;
1555
+ let a = ((y = e.store.modal.cell) == null ? void 0 : y.offsetTop) || 0;
1556
+ const d = ((m = c.querySelector("thead")) == null ? void 0 : m.offsetHeight) || 0;
1557
+ a += d, a = a + l.value < i ? a : a - (l.value + e.store.modal.height);
1556
1558
  let f = ((C = e.store.modal.cell) == null ? void 0 : C.offsetLeft) || 0;
1557
1559
  return f = f + o.value <= n ? f : f - (o.value - e.store.modal.width), {
1558
1560
  left: `${f}px`,
1559
- top: `${s}px`
1561
+ top: `${a}px`
1560
1562
  };
1561
1563
  });
1562
- return (u, i) => (S(), T("div", {
1564
+ return (c, i) => (M(), O("div", {
1563
1565
  class: "amodal",
1564
1566
  ref: "amodal",
1565
1567
  tabindex: "-1",
1566
- onClick: i[0] || (i[0] = ke(() => {
1568
+ onClick: i[0] || (i[0] = $e(() => {
1567
1569
  }, ["stop"])),
1568
- onInput: i[1] || (i[1] = ke(() => {
1570
+ onInput: i[1] || (i[1] = $e(() => {
1569
1571
  }, ["stop"])),
1570
- style: K(r.value)
1572
+ style: _(s.value)
1571
1573
  }, [
1572
- F(u.$slots, "default")
1574
+ F(c.$slots, "default")
1573
1575
  ], 36));
1574
1576
  }
1575
1577
  }), to = (e) => {
1576
- const t = e.id || xn();
1578
+ const t = e.id || yn();
1577
1579
  return Wt(`table-${t}`, () => {
1578
1580
  const l = () => {
1579
- const a = [Object.assign({}, { rowModified: !1 })], c = /* @__PURE__ */ new Set();
1580
- for (let h = 0; h < u.value.length; h++) {
1581
- const x = u.value[h];
1582
- x.parent !== null && x.parent !== void 0 && c.add(x.parent);
1581
+ const r = [Object.assign({}, { rowModified: !1 })], u = /* @__PURE__ */ new Set();
1582
+ for (let g = 0; g < c.value.length; g++) {
1583
+ const b = c.value[g];
1584
+ b.parent !== null && b.parent !== void 0 && u.add(b.parent);
1583
1585
  }
1584
- for (let h = 0; h < u.value.length; h++) {
1585
- const x = u.value[h];
1586
- a[h] = {
1586
+ for (let g = 0; g < c.value.length; g++) {
1587
+ const b = c.value[g];
1588
+ r[g] = {
1587
1589
  childrenOpen: !1,
1588
1590
  expanded: !1,
1589
- indent: x.indent || 0,
1590
- isParent: c.has(h),
1591
- isRoot: x.parent === null || x.parent === void 0,
1591
+ indent: b.indent || 0,
1592
+ isParent: u.has(g),
1593
+ isRoot: b.parent === null || b.parent === void 0,
1592
1594
  rowModified: !1,
1593
- open: x.parent === null || x.parent === void 0,
1594
- parent: x.parent
1595
+ open: b.parent === null || b.parent === void 0,
1596
+ parent: b.parent
1595
1597
  };
1596
1598
  }
1597
- return a;
1598
- }, r = D(e.columns), u = D(e.rows), i = D(e.config || {}), n = D({}), s = D({}), d = M(() => {
1599
- const a = {};
1600
- for (const [c, h] of r.value.entries())
1601
- for (const [x, $] of u.value.entries())
1602
- a[`${c}:${x}`] = $[h.name];
1603
- return a;
1604
- }), f = M({
1599
+ return r;
1600
+ }, s = H(e.columns), c = H(e.rows), i = H(e.config || {}), n = H({}), a = H({}), d = S(() => {
1601
+ const r = {};
1602
+ for (const [u, g] of s.value.entries())
1603
+ for (const [b, D] of c.value.entries())
1604
+ r[`${u}:${b}`] = D[g.name];
1605
+ return r;
1606
+ }), f = S({
1605
1607
  get: () => {
1606
- const a = l();
1607
- for (let c = 0; c < a.length; c++)
1608
- n.value[c] && (a[c].rowModified = n.value[c]), s.value[c] && (s.value[c].childrenOpen !== void 0 && (a[c].childrenOpen = s.value[c].childrenOpen), s.value[c].expanded !== void 0 && (a[c].expanded = s.value[c].expanded));
1608
+ const r = l();
1609
+ for (let u = 0; u < r.length; u++)
1610
+ n.value[u] && (r[u].rowModified = n.value[u]), a.value[u] && (a.value[u].childrenOpen !== void 0 && (r[u].childrenOpen = a.value[u].childrenOpen), a.value[u].expanded !== void 0 && (r[u].expanded = a.value[u].expanded));
1609
1611
  if (w.value) {
1610
- const c = (h, x) => {
1611
- const $ = x[h];
1612
- if ($.isRoot || $.parent === null || $.parent === void 0)
1612
+ const u = (g, b) => {
1613
+ const D = b[g];
1614
+ if (D.isRoot || D.parent === null || D.parent === void 0)
1613
1615
  return !0;
1614
- const O = $.parent;
1615
- return O < 0 || O >= x.length ? !1 : (x[O].childrenOpen || !1) && c(O, x);
1616
+ const P = D.parent;
1617
+ return P < 0 || P >= b.length ? !1 : (b[P].childrenOpen || !1) && u(P, b);
1616
1618
  };
1617
- for (let h = 0; h < a.length; h++)
1618
- a[h].isRoot || (a[h].open = c(h, a));
1619
+ for (let g = 0; g < r.length; g++)
1620
+ r[g].isRoot || (r[g].open = u(g, r));
1619
1621
  }
1620
- return a;
1622
+ return r;
1621
1623
  },
1622
- set: (a) => {
1623
- JSON.stringify(a) !== JSON.stringify(f.value) && (f.value = a);
1624
+ set: (r) => {
1625
+ JSON.stringify(r) !== JSON.stringify(f.value) && (f.value = r);
1624
1626
  }
1625
- }), p = D(e.modal || { visible: !1 }), y = D({}), m = D([]), C = D([]), b = D([]), v = M(() => r.value.some((a) => a.pinned)), g = M(() => i.value.view === "gantt" || i.value.view === "tree-gantt"), w = M(() => i.value.view === "tree" || i.value.view === "tree-gantt"), I = M(() => `${Math.ceil(u.value.length / 100 + 1)}ch`), A = M(
1627
+ }), p = H(e.modal || { visible: !1 }), y = H({}), m = H([]), C = H([]), x = H([]), v = S(() => s.value.some((r) => r.pinned)), h = S(() => i.value.view === "gantt" || i.value.view === "tree-gantt"), w = S(() => i.value.view === "tree" || i.value.view === "tree-gantt"), E = S(() => i.value.dependencyGraph !== !1), A = S(() => `${Math.ceil(c.value.length / 100 + 1)}ch`), X = S(
1626
1628
  () => i.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(i.value.view) : !1
1627
- ), W = (a, c) => d.value[`${a}:${c}`], H = (a, c, h) => {
1628
- const x = `${a}:${c}`, $ = r.value[a];
1629
- d.value[x] !== h && (n.value[c] = !0), d.value[x] = h, u.value[c] = {
1630
- ...u.value[c],
1631
- [$.name]: h
1629
+ ), T = (r, u) => d.value[`${r}:${u}`], R = (r, u, g) => {
1630
+ const b = `${r}:${u}`, D = s.value[r];
1631
+ d.value[b] !== g && (n.value[u] = !0), d.value[b] = g, c.value[u] = {
1632
+ ...c.value[u],
1633
+ [D.name]: g
1632
1634
  };
1633
- }, R = (a) => {
1634
- u.value = a;
1635
- }, L = (a, c, h) => {
1636
- const x = `${a}:${c}`;
1637
- d.value[x] !== h && (n.value[c] = !0, y.value[x] = h);
1638
- }, X = (a) => {
1639
- const c = r.value.indexOf(a) === r.value.length - 1, h = i.value.fullWidth ? a.resizable && !c : a.resizable;
1635
+ }, L = (r) => {
1636
+ c.value = r;
1637
+ }, G = (r, u, g) => {
1638
+ const b = `${r}:${u}`;
1639
+ d.value[b] !== g && (n.value[u] = !0, y.value[b] = g);
1640
+ }, Y = (r) => {
1641
+ const u = s.value.indexOf(r) === s.value.length - 1, g = i.value.fullWidth ? r.resizable && !u : r.resizable;
1640
1642
  return {
1641
- width: a.width || "40ch",
1642
- textAlign: a.align || "center",
1643
- ...h && {
1643
+ width: r.width || "40ch",
1644
+ textAlign: r.align || "center",
1645
+ ...g && {
1644
1646
  resize: "horizontal",
1645
1647
  overflow: "hidden",
1646
1648
  whiteSpace: "nowrap"
1647
1649
  }
1648
1650
  };
1649
- }, Y = (a, c) => {
1650
- if (a < 0 || a >= r.value.length) return;
1651
- const x = Math.max(c, 40);
1652
- r.value[a] = {
1653
- ...r.value[a],
1654
- width: `${x}px`
1651
+ }, B = (r, u) => {
1652
+ if (r < 0 || r >= s.value.length) return;
1653
+ const b = Math.max(u, 40);
1654
+ s.value[r] = {
1655
+ ...s.value[r],
1656
+ width: `${b}px`
1655
1657
  };
1656
- }, B = (a) => {
1657
- const c = u.value[a];
1658
- return g.value && c.gantt !== void 0;
1659
- }, Q = (a) => !w.value || f.value[a].isRoot || f.value[a].open, me = (a) => !w.value && i.value.view !== "list-expansion" ? "" : w.value && (f.value[a].isRoot || f.value[a].isParent) ? f.value[a].childrenOpen ? "▼" : "►" : i.value.view === "list-expansion" ? f.value[a].expanded ? "▼" : "►" : "", we = (a) => {
1658
+ }, K = (r) => {
1659
+ const u = c.value[r];
1660
+ return h.value && u.gantt !== void 0;
1661
+ }, ve = (r) => !w.value || f.value[r].isRoot || f.value[r].open, we = (r) => !w.value && i.value.view !== "list-expansion" ? "" : w.value && (f.value[r].isRoot || f.value[r].isParent) ? f.value[r].childrenOpen ? "▼" : "►" : i.value.view === "list-expansion" ? f.value[r].expanded ? "▼" : "►" : "", me = (r) => {
1660
1662
  if (w.value) {
1661
- const c = s.value[a] || {}, x = !(c.childrenOpen ?? f.value[a].childrenOpen);
1662
- s.value[a] = {
1663
- ...c,
1664
- childrenOpen: x
1665
- }, x || re(a);
1663
+ const u = a.value[r] || {}, b = !(u.childrenOpen ?? f.value[r].childrenOpen);
1664
+ a.value[r] = {
1665
+ ...u,
1666
+ childrenOpen: b
1667
+ }, b || ye(r);
1666
1668
  } else if (i.value.view === "list-expansion") {
1667
- const c = s.value[a] || {}, h = c.expanded ?? f.value[a].expanded;
1668
- s.value[a] = {
1669
- ...c,
1670
- expanded: !h
1669
+ const u = a.value[r] || {}, g = u.expanded ?? f.value[r].expanded;
1670
+ a.value[r] = {
1671
+ ...u,
1672
+ expanded: !g
1671
1673
  };
1672
1674
  }
1673
- }, re = (a) => {
1674
- for (let c = 0; c < u.value.length; c++)
1675
- if (f.value[c].parent === a) {
1676
- const h = s.value[c] || {};
1677
- s.value[c] = {
1678
- ...h,
1675
+ }, ye = (r) => {
1676
+ for (let u = 0; u < c.value.length; u++)
1677
+ if (f.value[u].parent === r) {
1678
+ const g = a.value[u] || {};
1679
+ a.value[u] = {
1680
+ ...g,
1679
1681
  childrenOpen: !1
1680
- }, re(c);
1682
+ }, ye(u);
1681
1683
  }
1682
- }, Ae = (a, c) => {
1683
- const h = W(a, c);
1684
- return xe(a, c, h);
1685
- }, xe = (a, c, h) => {
1686
- const x = r.value[a], $ = u.value[c], O = x.format;
1687
- return O ? typeof O == "function" ? O(h, { table: d.value, row: $, column: x }) : typeof O == "string" ? Function(`"use strict";return (${O})`)()(h, { table: d.value, row: $, column: x }) : h : h;
1684
+ }, De = (r, u) => {
1685
+ const g = T(r, u);
1686
+ return xe(r, u, g);
1687
+ }, xe = (r, u, g) => {
1688
+ const b = s.value[r], D = c.value[u], P = b.format;
1689
+ return P ? typeof P == "function" ? P(g, { table: d.value, row: D, column: b }) : typeof P == "string" ? Function(`"use strict";return (${P})`)()(g, { table: d.value, row: D, column: b }) : g : g;
1688
1690
  };
1689
1691
  return {
1690
1692
  // state
1691
- columns: r,
1693
+ columns: s,
1692
1694
  config: i,
1693
1695
  connectionHandles: C,
1694
- connectionPaths: b,
1696
+ connectionPaths: x,
1695
1697
  display: f,
1696
1698
  ganttBars: m,
1697
1699
  modal: p,
1698
- rows: u,
1700
+ rows: c,
1699
1701
  table: d,
1700
1702
  updates: y,
1701
1703
  // getters
1702
1704
  hasPinnedColumns: v,
1703
- isGanttView: g,
1705
+ isGanttView: h,
1704
1706
  isTreeView: w,
1705
- numberedRowWidth: I,
1706
- zeroColumn: A,
1707
+ isDependencyGraphEnabled: E,
1708
+ numberedRowWidth: A,
1709
+ zeroColumn: X,
1707
1710
  // actions
1708
- closeModal: (a) => {
1709
- var c;
1710
- a.target instanceof Node && (c = p.value.parent) != null && c.contains(a.target) || p.value.visible && (p.value.visible = !1);
1711
+ closeModal: (r) => {
1712
+ var u;
1713
+ r.target instanceof Node && (u = p.value.parent) != null && u.contains(r.target) || p.value.visible && (p.value.visible = !1);
1711
1714
  },
1712
- createConnection: (a, c, h) => {
1713
- const x = C.value.find((z) => z.id === a), $ = C.value.find((z) => z.id === c);
1714
- if (!x || !$)
1715
+ createConnection: (r, u, g) => {
1716
+ const b = C.value.find((W) => W.id === r), D = C.value.find((W) => W.id === u);
1717
+ if (!b || !D)
1715
1718
  return console.warn("Cannot create connection: handle not found"), null;
1716
- const O = {
1717
- id: `connection-${a}-${c}`,
1719
+ const P = {
1720
+ id: `connection-${r}-${u}`,
1718
1721
  from: {
1719
- barId: x.barId,
1720
- side: x.side
1722
+ barId: b.barId,
1723
+ side: b.side
1721
1724
  },
1722
1725
  to: {
1723
- barId: $.barId,
1724
- side: $.side
1726
+ barId: D.barId,
1727
+ side: D.side
1725
1728
  },
1726
- style: h == null ? void 0 : h.style,
1727
- label: h == null ? void 0 : h.label
1729
+ style: g == null ? void 0 : g.style,
1730
+ label: g == null ? void 0 : g.label
1728
1731
  };
1729
- return b.value.push(O), O;
1732
+ return x.value.push(P), P;
1730
1733
  },
1731
- deleteConnection: (a) => {
1732
- const c = b.value.findIndex((h) => h.id === a);
1733
- return c >= 0 ? (b.value.splice(c, 1), !0) : !1;
1734
+ deleteConnection: (r) => {
1735
+ const u = x.value.findIndex((g) => g.id === r);
1736
+ return u >= 0 ? (x.value.splice(u, 1), !0) : !1;
1734
1737
  },
1735
- getCellData: W,
1736
- getCellDisplayValue: Ae,
1737
- getConnectionsForBar: (a) => b.value.filter((c) => c.from.barId === a || c.to.barId === a),
1738
+ getCellData: T,
1739
+ getCellDisplayValue: De,
1740
+ getConnectionsForBar: (r) => x.value.filter((u) => u.from.barId === r || u.to.barId === r),
1738
1741
  getFormattedValue: xe,
1739
- getHandlesForBar: (a) => C.value.filter((c) => c.barId === a),
1740
- getHeaderCellStyle: X,
1741
- getIndent: (a, c) => c && a === 0 && c > 0 ? `${c}ch` : "inherit",
1742
- getRowExpandSymbol: me,
1743
- isRowGantt: B,
1744
- isRowVisible: Q,
1745
- registerConnectionHandle: (a) => {
1746
- const c = C.value.findIndex((h) => h.id === a.id);
1747
- c >= 0 ? C.value[c] = a : C.value.push(a);
1742
+ getHandlesForBar: (r) => C.value.filter((u) => u.barId === r),
1743
+ getHeaderCellStyle: Y,
1744
+ getIndent: (r, u) => u && r === 0 && u > 0 ? `${u}ch` : "inherit",
1745
+ getRowExpandSymbol: we,
1746
+ isRowGantt: K,
1747
+ isRowVisible: ve,
1748
+ registerConnectionHandle: (r) => {
1749
+ const u = C.value.findIndex((g) => g.id === r.id);
1750
+ u >= 0 ? C.value[u] = r : C.value.push(r);
1748
1751
  },
1749
- registerGanttBar: (a) => {
1750
- const c = m.value.findIndex((h) => h.id === a.id);
1751
- c >= 0 ? m.value[c] = a : m.value.push(a);
1752
+ registerGanttBar: (r) => {
1753
+ const u = m.value.findIndex((g) => g.id === r.id);
1754
+ u >= 0 ? m.value[u] = r : m.value.push(r);
1752
1755
  },
1753
- resizeColumn: Y,
1754
- setCellData: H,
1755
- setCellText: L,
1756
- toggleRowExpand: we,
1757
- unregisterConnectionHandle: (a) => {
1758
- const c = C.value.findIndex((h) => h.id === a);
1759
- c >= 0 && C.value.splice(c, 1);
1756
+ resizeColumn: B,
1757
+ setCellData: R,
1758
+ setCellText: G,
1759
+ toggleRowExpand: me,
1760
+ unregisterConnectionHandle: (r) => {
1761
+ const u = C.value.findIndex((g) => g.id === r);
1762
+ u >= 0 && C.value.splice(u, 1);
1760
1763
  },
1761
- unregisterGanttBar: (a) => {
1762
- const c = m.value.findIndex((h) => h.id === a);
1763
- c >= 0 && m.value.splice(c, 1);
1764
+ unregisterGanttBar: (r) => {
1765
+ const u = m.value.findIndex((g) => g.id === r);
1766
+ u >= 0 && m.value.splice(u, 1);
1764
1767
  },
1765
- updateGanttBar: (a) => {
1766
- var h;
1767
- const c = (h = u.value[a.rowIndex]) == null ? void 0 : h.gantt;
1768
- c && (a.type === "resize" ? a.edge === "start" ? (c.startIndex = a.newStart, c.endIndex = a.end, c.colspan = c.endIndex - c.startIndex) : a.edge === "end" && (c.startIndex = a.start, c.endIndex = a.newEnd, c.colspan = c.endIndex - c.startIndex) : a.type === "bar" && (c.startIndex = a.newStart, c.endIndex = a.newEnd, c.colspan = c.endIndex - c.startIndex));
1768
+ updateGanttBar: (r) => {
1769
+ var g;
1770
+ const u = (g = c.value[r.rowIndex]) == null ? void 0 : g.gantt;
1771
+ u && (r.type === "resize" ? r.edge === "start" ? (u.startIndex = r.newStart, u.endIndex = r.end, u.colspan = u.endIndex - u.startIndex) : r.edge === "end" && (u.startIndex = r.start, u.endIndex = r.newEnd, u.colspan = u.endIndex - u.startIndex) : r.type === "bar" && (u.startIndex = r.newStart, u.endIndex = r.newEnd, u.colspan = u.endIndex - u.startIndex));
1769
1772
  },
1770
- updateRows: R
1773
+ updateRows: L
1771
1774
  };
1772
1775
  })();
1773
1776
  }, no = {
@@ -1786,49 +1789,49 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
1786
1789
  }),
1787
1790
  emits: /* @__PURE__ */ ot(["cellUpdate", "gantt:drag", "connection:event", "columns:update"], ["update:rows", "update:columns"]),
1788
1791
  setup(e, { expose: t, emit: o }) {
1789
- const l = lt(e, "rows"), r = lt(e, "columns"), u = o, i = j("table"), n = to({ columns: r.value, rows: l.value, id: e.id, config: e.config });
1790
- n.$onAction(({ name: m, store: C, args: b, after: v }) => {
1792
+ const l = lt(e, "rows"), s = lt(e, "columns"), c = o, i = j("table"), n = to({ columns: s.value, rows: l.value, id: e.id, config: e.config });
1793
+ n.$onAction(({ name: m, store: C, args: x, after: v }) => {
1791
1794
  if (m === "setCellData" || m === "setCellText") {
1792
- const [g, w, I] = b, A = C.getCellData(g, w);
1795
+ const [h, w, E] = x, A = C.getCellData(h, w);
1793
1796
  v(() => {
1794
- l.value = [...C.rows], u("cellUpdate", { colIndex: g, rowIndex: w, newValue: I, oldValue: A });
1797
+ l.value = [...C.rows], c("cellUpdate", { colIndex: h, rowIndex: w, newValue: E, oldValue: A });
1795
1798
  });
1796
1799
  } else if (m === "updateGanttBar") {
1797
- const [g] = b;
1800
+ const [h] = x;
1798
1801
  let w = !1;
1799
- g.type === "resize" ? w = g.oldColspan !== g.newColspan : g.type === "bar" && (w = g.oldStart !== g.newStart || g.oldEnd !== g.newEnd), w && v(() => {
1800
- u("gantt:drag", g);
1802
+ h.type === "resize" ? w = h.oldColspan !== h.newColspan : h.type === "bar" && (w = h.oldStart !== h.newStart || h.oldEnd !== h.newEnd), w && v(() => {
1803
+ c("gantt:drag", h);
1801
1804
  });
1802
1805
  } else m === "resizeColumn" && v(() => {
1803
- r.value = [...C.columns], u("columns:update", [...C.columns]);
1806
+ s.value = [...C.columns], c("columns:update", [...C.columns]);
1804
1807
  });
1805
- }), G(
1808
+ }), V(
1806
1809
  () => l.value,
1807
1810
  (m) => {
1808
1811
  JSON.stringify(m) !== JSON.stringify(n.rows) && (n.rows = [...m]);
1809
1812
  },
1810
1813
  { deep: !0 }
1811
- ), G(
1812
- r,
1814
+ ), V(
1815
+ s,
1813
1816
  (m) => {
1814
- JSON.stringify(m) !== JSON.stringify(n.columns) && (n.columns = [...m], u("columns:update", [...m]));
1817
+ JSON.stringify(m) !== JSON.stringify(n.columns) && (n.columns = [...m], c("columns:update", [...m]));
1815
1818
  },
1816
1819
  { deep: !0 }
1817
1820
  ), ae(() => {
1818
- r.value.some((m) => m.pinned) && (d(), n.isTreeView && Et(i, d, { childList: !0, subtree: !0 }));
1821
+ s.value.some((m) => m.pinned) && (d(), n.isTreeView && Et(i, d, { childList: !0, subtree: !0 }));
1819
1822
  });
1820
- const s = M(() => n.columns.filter((m) => m.pinned).length), d = () => {
1821
- const m = i.value, C = m == null ? void 0 : m.rows[0], b = m == null ? void 0 : m.rows[1], v = C ? Array.from(C.cells) : [];
1822
- for (const [g, w] of v.entries()) {
1823
- const I = b == null ? void 0 : b.cells[g];
1824
- I && (w.style.width = `${I.offsetWidth}px`);
1823
+ const a = S(() => n.columns.filter((m) => m.pinned).length), d = () => {
1824
+ const m = i.value, C = m == null ? void 0 : m.rows[0], x = m == null ? void 0 : m.rows[1], v = C ? Array.from(C.cells) : [];
1825
+ for (const [h, w] of v.entries()) {
1826
+ const E = x == null ? void 0 : x.cells[h];
1827
+ E && (w.style.width = `${E.offsetWidth}px`);
1825
1828
  }
1826
- for (const g of (m == null ? void 0 : m.rows) || []) {
1829
+ for (const h of (m == null ? void 0 : m.rows) || []) {
1827
1830
  let w = 0;
1828
- const I = [];
1829
- for (const A of g.cells)
1830
- (A.classList.contains("sticky-column") || A.classList.contains("sticky-index")) && (A.style.left = `${w}px`, w += A.offsetWidth, I.push(A));
1831
- I.length > 0 && I[I.length - 1].classList.add("sticky-column-edge");
1831
+ const E = [];
1832
+ for (const A of h.cells)
1833
+ (A.classList.contains("sticky-column") || A.classList.contains("sticky-index")) && (A.style.left = `${w}px`, w += A.offsetWidth, E.push(A));
1834
+ E.length > 0 && E[E.length - 1].classList.add("sticky-column-edge");
1832
1835
  }
1833
1836
  };
1834
1837
  window.addEventListener("keydown", (m) => {
@@ -1841,26 +1844,26 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
1841
1844
  }
1842
1845
  });
1843
1846
  const f = (m) => {
1844
- var b;
1845
- if (!m.gantt || s.value === 0)
1847
+ var x;
1848
+ if (!m.gantt || a.value === 0)
1846
1849
  return n.columns;
1847
1850
  const C = [];
1848
- for (let v = 0; v < s.value; v++) {
1849
- const g = { ...n.columns[v] };
1850
- g.originalIndex = v, C.push(g);
1851
+ for (let v = 0; v < a.value; v++) {
1852
+ const h = { ...n.columns[v] };
1853
+ h.originalIndex = v, C.push(h);
1851
1854
  }
1852
1855
  return C.push({
1853
- ...n.columns[s.value],
1856
+ ...n.columns[a.value],
1854
1857
  isGantt: !0,
1855
- colspan: ((b = m.gantt) == null ? void 0 : b.colspan) || n.columns.length - s.value,
1856
- originalIndex: s.value,
1858
+ colspan: ((x = m.gantt) == null ? void 0 : x.colspan) || n.columns.length - a.value,
1859
+ originalIndex: a.value,
1857
1860
  width: "auto"
1858
1861
  // TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
1859
1862
  }), C;
1860
1863
  }, p = (m) => {
1861
- u("connection:event", { type: "create", connection: m });
1864
+ c("connection:event", { type: "create", connection: m });
1862
1865
  }, y = (m) => {
1863
- u("connection:event", { type: "delete", connection: m });
1866
+ c("connection:event", { type: "delete", connection: m });
1864
1867
  };
1865
1868
  return t({
1866
1869
  store: n,
@@ -1868,60 +1871,60 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
1868
1871
  deleteConnection: n.deleteConnection,
1869
1872
  getConnectionsForBar: n.getConnectionsForBar,
1870
1873
  getHandlesForBar: n.getHandlesForBar
1871
- }), (m, C) => (S(), T("div", no, [
1872
- $e((S(), T("table", {
1874
+ }), (m, C) => (M(), O("div", no, [
1875
+ Me((M(), O("table", {
1873
1876
  ref: "table",
1874
1877
  class: "atable",
1875
- style: K({
1876
- width: E(n).config.fullWidth ? "100%" : "auto"
1878
+ style: _({
1879
+ width: k(n).config.fullWidth ? "100%" : "auto"
1877
1880
  })
1878
1881
  }, [
1879
- F(m.$slots, "header", { data: E(n) }, () => [
1882
+ F(m.$slots, "header", { data: k(n) }, () => [
1880
1883
  at(Mt, {
1881
- columns: E(n).columns,
1882
- store: E(n)
1884
+ columns: k(n).columns,
1885
+ store: k(n)
1883
1886
  }, null, 8, ["columns", "store"])
1884
1887
  ], !0),
1885
- P("tbody", null, [
1886
- F(m.$slots, "body", { data: E(n) }, () => [
1887
- (S(!0), T(oe, null, he(E(n).rows, (b, v) => (S(), ie(kt, {
1888
- key: b.id,
1889
- row: b,
1888
+ z("tbody", null, [
1889
+ F(m.$slots, "body", { data: k(n) }, () => [
1890
+ (M(!0), O(oe, null, ge(k(n).rows, (x, v) => (M(), re(kt, {
1891
+ key: x.id,
1892
+ row: x,
1890
1893
  rowIndex: v,
1891
- store: E(n)
1894
+ store: k(n)
1892
1895
  }, {
1893
1896
  default: st(() => [
1894
- (S(!0), T(oe, null, he(f(b), (g, w) => {
1895
- var I, A, W;
1896
- return S(), T(oe, {
1897
- key: g.name
1897
+ (M(!0), O(oe, null, ge(f(x), (h, w) => {
1898
+ var E, A, X;
1899
+ return M(), O(oe, {
1900
+ key: h.name
1898
1901
  }, [
1899
- g.isGantt ? (S(), ie(Ce(g.ganttComponent || "AGanttCell"), {
1902
+ h.isGantt ? (M(), re(Ie(h.ganttComponent || "AGanttCell"), {
1900
1903
  key: 0,
1901
- store: E(n),
1902
- columnsCount: E(n).columns.length - s.value,
1903
- color: (I = b.gantt) == null ? void 0 : I.color,
1904
- start: (A = b.gantt) == null ? void 0 : A.startIndex,
1905
- end: (W = b.gantt) == null ? void 0 : W.endIndex,
1906
- colspan: g.colspan,
1907
- pinned: g.pinned,
1904
+ store: k(n),
1905
+ columnsCount: k(n).columns.length - a.value,
1906
+ color: (E = x.gantt) == null ? void 0 : E.color,
1907
+ start: (A = x.gantt) == null ? void 0 : A.startIndex,
1908
+ end: (X = x.gantt) == null ? void 0 : X.endIndex,
1909
+ colspan: h.colspan,
1910
+ pinned: h.pinned,
1908
1911
  rowIndex: v,
1909
- colIndex: g.originalIndex ?? w,
1910
- style: K({
1911
- textAlign: (g == null ? void 0 : g.align) || "center",
1912
- minWidth: (g == null ? void 0 : g.width) || "40ch",
1913
- width: E(n).config.fullWidth ? "auto" : null
1912
+ colIndex: h.originalIndex ?? w,
1913
+ style: _({
1914
+ textAlign: (h == null ? void 0 : h.align) || "center",
1915
+ minWidth: (h == null ? void 0 : h.width) || "40ch",
1916
+ width: k(n).config.fullWidth ? "auto" : null
1914
1917
  }),
1915
1918
  "onConnection:create": p
1916
- }, null, 40, ["store", "columnsCount", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (S(), ie(Ce(g.cellComponent || "ACell"), {
1919
+ }, null, 40, ["store", "columnsCount", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (M(), re(Ie(h.cellComponent || "ACell"), {
1917
1920
  key: 1,
1918
- store: E(n),
1919
- pinned: g.pinned,
1921
+ store: k(n),
1922
+ pinned: h.pinned,
1920
1923
  rowIndex: v,
1921
1924
  colIndex: w,
1922
- style: K({
1923
- textAlign: (g == null ? void 0 : g.align) || "center",
1924
- width: E(n).config.fullWidth ? "auto" : null
1925
+ style: _({
1926
+ textAlign: (h == null ? void 0 : h.align) || "center",
1927
+ width: k(n).config.fullWidth ? "auto" : null
1925
1928
  }),
1926
1929
  spellcheck: "false"
1927
1930
  }, null, 8, ["store", "pinned", "rowIndex", "colIndex", "style"]))
@@ -1932,53 +1935,53 @@ const Yn = { class: "gantt-connection-overlay" }, jn = {
1932
1935
  }, 1032, ["row", "rowIndex", "store"]))), 128))
1933
1936
  ], !0)
1934
1937
  ]),
1935
- F(m.$slots, "footer", { data: E(n) }, void 0, !0),
1936
- F(m.$slots, "modal", { data: E(n) }, () => [
1937
- $e(at(St, { store: E(n) }, {
1938
+ F(m.$slots, "footer", { data: k(n) }, void 0, !0),
1939
+ F(m.$slots, "modal", { data: k(n) }, () => [
1940
+ Me(at(St, { store: k(n) }, {
1938
1941
  default: st(() => [
1939
- (S(), ie(Ce(E(n).modal.component), Xe({
1940
- key: `${E(n).modal.rowIndex}:${E(n).modal.colIndex}`,
1941
- colIndex: E(n).modal.colIndex,
1942
- rowIndex: E(n).modal.rowIndex,
1943
- store: E(n)
1944
- }, E(n).modal.componentProps), null, 16, ["colIndex", "rowIndex", "store"]))
1942
+ (M(), re(Ie(k(n).modal.component), Ge({
1943
+ key: `${k(n).modal.rowIndex}:${k(n).modal.colIndex}`,
1944
+ colIndex: k(n).modal.colIndex,
1945
+ rowIndex: k(n).modal.rowIndex,
1946
+ store: k(n)
1947
+ }, k(n).modal.componentProps), null, 16, ["colIndex", "rowIndex", "store"]))
1945
1948
  ]),
1946
1949
  _: 1
1947
1950
  }, 8, ["store"]), [
1948
- [yt, E(n).modal.visible]
1951
+ [xt, k(n).modal.visible]
1949
1952
  ])
1950
1953
  ], !0)
1951
1954
  ], 4)), [
1952
- [E(zn), E(n).closeModal]
1955
+ [k(zn), k(n).closeModal]
1953
1956
  ]),
1954
- E(n).isGanttView ? (S(), ie(Qn, {
1957
+ k(n).isGanttView && k(n).isDependencyGraphEnabled ? (M(), re(Qn, {
1955
1958
  key: 0,
1956
- store: E(n),
1959
+ store: k(n),
1957
1960
  "onConnection:delete": y
1958
- }, null, 8, ["store"])) : _("", !0)
1961
+ }, null, 8, ["store"])) : q("", !0)
1959
1962
  ]));
1960
1963
  }
1961
- }), lo = /* @__PURE__ */ se(oo, [["__scopeId", "data-v-7b5f2870"]]), ao = {}, so = { class: "aloading" }, ro = { class: "aloading-header" };
1964
+ }), lo = /* @__PURE__ */ se(oo, [["__scopeId", "data-v-51a03d16"]]), ao = {}, so = { class: "aloading" }, ro = { class: "aloading-header" };
1962
1965
  function io(e, t) {
1963
- return S(), T("div", so, [
1964
- P("h2", ro, [
1966
+ return M(), O("div", so, [
1967
+ z("h2", ro, [
1965
1968
  F(e.$slots, "default", {}, void 0, !0)
1966
1969
  ]),
1967
- t[0] || (t[0] = P("div", { class: "aloading-bar" }, null, -1))
1970
+ t[0] || (t[0] = z("div", { class: "aloading-bar" }, null, -1))
1968
1971
  ]);
1969
1972
  }
1970
1973
  const co = /* @__PURE__ */ se(ao, [["render", io], ["__scopeId", "data-v-a930a25b"]]), uo = {}, fo = { class: "aloading" }, vo = { class: "aloading-header" };
1971
1974
  function mo(e, t) {
1972
- return S(), T("div", fo, [
1973
- P("h2", vo, [
1975
+ return M(), O("div", fo, [
1976
+ z("h2", vo, [
1974
1977
  F(e.$slots, "default", {}, void 0, !0)
1975
1978
  ]),
1976
- t[0] || (t[0] = P("div", { class: "aloading-bar" }, null, -1))
1979
+ t[0] || (t[0] = z("div", { class: "aloading-bar" }, null, -1))
1977
1980
  ]);
1978
1981
  }
1979
- const go = /* @__PURE__ */ se(uo, [["render", mo], ["__scopeId", "data-v-e1165876"]]);
1982
+ const ho = /* @__PURE__ */ se(uo, [["render", mo], ["__scopeId", "data-v-e1165876"]]);
1980
1983
  function wo(e) {
1981
- e.component("ACell", In), e.component("AExpansionRow", Sn), e.component("AGanttCell", Pn), e.component("ARow", kt), e.component("ATable", lo), e.component("ATableHeader", Mt), e.component("ATableLoading", co), e.component("ATableLoadingBar", go), e.component("ATableModal", St);
1984
+ e.component("ACell", In), e.component("AExpansionRow", Sn), e.component("AGanttCell", Pn), e.component("ARow", kt), e.component("ATable", lo), e.component("ATableHeader", Mt), e.component("ATableLoading", co), e.component("ATableLoadingBar", ho), e.component("ATableModal", St);
1982
1985
  }
1983
1986
  export {
1984
1987
  In as ACell,
@@ -1988,7 +1991,7 @@ export {
1988
1991
  lo as ATable,
1989
1992
  Mt as ATableHeader,
1990
1993
  co as ATableLoading,
1991
- go as ATableLoadingBar,
1994
+ ho as ATableLoadingBar,
1992
1995
  St as ATableModal,
1993
1996
  to as createTableStore,
1994
1997
  wo as install