@stonecrop/atable 0.4.35 → 0.4.37

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