@stonecrop/atable 0.4.30 → 0.4.32

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