@taskctrl/canvas-timeline 0.8.0 → 0.8.1

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.
@@ -1,8 +1,8 @@
1
- import { jsx as le, jsxs as Ve, Fragment as ti } from "react/jsx-runtime";
2
- import me, { useRef as U, useMemo as ee, useCallback as oe, useEffect as ce, forwardRef as Hi, useState as Ze, useImperativeHandle as Di } from "react";
3
- import { flushSync as Ii } from "react-dom";
1
+ import { jsx as ne, jsxs as Ve, Fragment as ni } from "react/jsx-runtime";
2
+ import ce, { useRef as A, useMemo as K, useCallback as Q, useEffect as le, forwardRef as Oi, useState as Ue, useImperativeHandle as Pi } from "react";
3
+ import { flushSync as Xi } from "react-dom";
4
4
  import We from "dayjs";
5
- const He = {
5
+ const Ce = {
6
6
  primary: "#269bf7",
7
7
  trainColors: {},
8
8
  status: { red: "#EF5350", yellow: "#FBBF24", green: "#31c48d" },
@@ -12,7 +12,7 @@ const He = {
12
12
  sidebar: { bg: "#F9FAFB", border: "#E5E7EB", text: "#6c737f" },
13
13
  header: { bg: "#F9FAFB", border: "#E5E7EB", text: "#6c737f" }
14
14
  };
15
- class yt {
15
+ class Tt {
16
16
  constructor(e) {
17
17
  Object.defineProperty(this, "visibleTimeStart", {
18
18
  enumerable: !0,
@@ -89,8 +89,8 @@ class yt {
89
89
  const e = new Array(this.groupCount + 1);
90
90
  e[0] = 0;
91
91
  for (let n = 0; n < this.groupCount; n++) {
92
- const o = ((t = this.groupHeights) == null ? void 0 : t[n]) ?? this.lineHeight;
93
- e[n + 1] = e[n] + o;
92
+ const r = ((t = this.groupHeights) == null ? void 0 : t[n]) ?? this.lineHeight;
93
+ e[n + 1] = e[n] + r;
94
94
  }
95
95
  this.groupYOffsets = e;
96
96
  }
@@ -108,10 +108,10 @@ class yt {
108
108
  return 0;
109
109
  if (t >= this.groupYOffsets[this.groupCount])
110
110
  return this.groupCount - 1;
111
- let n = 0, o = this.groupCount - 1;
112
- for (; n < o; ) {
113
- const d = n + o >>> 1;
114
- this.groupYOffsets[d + 1] > t ? o = d : n = d + 1;
111
+ let n = 0, r = this.groupCount - 1;
112
+ for (; n < r; ) {
113
+ const d = n + r >>> 1;
114
+ this.groupYOffsets[d + 1] > t ? r = d : n = d + 1;
115
115
  }
116
116
  return n;
117
117
  }
@@ -143,7 +143,7 @@ class yt {
143
143
  return this.groupYOffsets[this.groupCount] ?? 0;
144
144
  }
145
145
  }
146
- class Ri {
146
+ class $i {
147
147
  constructor() {
148
148
  Object.defineProperty(this, "root", {
149
149
  enumerable: !0,
@@ -153,26 +153,26 @@ class Ri {
153
153
  });
154
154
  }
155
155
  buildFromItems(e, t, n) {
156
- const o = e.map((d) => ({
156
+ const r = e.map((d) => ({
157
157
  item: d,
158
158
  start: t(d),
159
159
  end: n(d)
160
160
  }));
161
- this.root = this.buildNode(o);
161
+ this.root = this.buildNode(r);
162
162
  }
163
163
  buildNode(e) {
164
164
  if (e.length === 0)
165
165
  return null;
166
166
  let t = 1 / 0, n = -1 / 0;
167
- for (const a of e)
168
- a.start < t && (t = a.start), a.end > n && (n = a.end);
169
- const o = (t + n) / 2, d = [], s = [], c = [];
170
- for (const a of e)
171
- a.end < o ? d.push(a) : a.start > o ? s.push(a) : c.push(a);
167
+ for (const l of e)
168
+ l.start < t && (t = l.start), l.end > n && (n = l.end);
169
+ const r = (t + n) / 2, d = [], o = [], c = [];
170
+ for (const l of e)
171
+ l.end < r ? d.push(l) : l.start > r ? o.push(l) : c.push(l);
172
172
  return {
173
- center: o,
173
+ center: r,
174
174
  left: this.buildNode(d),
175
- right: this.buildNode(s),
175
+ right: this.buildNode(o),
176
176
  overlapping: c
177
177
  };
178
178
  }
@@ -180,15 +180,15 @@ class Ri {
180
180
  const n = [];
181
181
  return this.queryNode(this.root, e, t, n), n;
182
182
  }
183
- queryNode(e, t, n, o) {
183
+ queryNode(e, t, n, r) {
184
184
  if (e !== null) {
185
185
  for (const d of e.overlapping)
186
- d.start <= n && d.end >= t && o.push(d.item);
187
- t <= e.center && e.left !== null && this.queryNode(e.left, t, n, o), n >= e.center && e.right !== null && this.queryNode(e.right, t, n, o);
186
+ d.start <= n && d.end >= t && r.push(d.item);
187
+ t <= e.center && e.left !== null && this.queryNode(e.left, t, n, r), n >= e.center && e.right !== null && this.queryNode(e.right, t, n, r);
188
188
  }
189
189
  }
190
190
  }
191
- class Oi {
191
+ class _i {
192
192
  constructor(e, t) {
193
193
  Object.defineProperty(this, "lineHeight", {
194
194
  enumerable: !0,
@@ -214,65 +214,65 @@ class Oi {
214
214
  }
215
215
  computeLayout(e, t, n) {
216
216
  this.layoutCache = /* @__PURE__ */ new Map(), this.groupMaxStack = /* @__PURE__ */ new Map();
217
- const o = this.lineHeight * this.itemHeightRatio, d = o * 0.6;
217
+ const r = this.lineHeight * this.itemHeightRatio, d = r * 0.6;
218
218
  if (!t) {
219
219
  for (const c of e) {
220
- const a = (n == null ? void 0 : n.isParent(c.id)) ?? !1;
221
- this.layoutCache.set(c.id, { stackLevel: 0, itemHeight: a ? d : o }), this.groupMaxStack.set(c.group, 0);
220
+ const l = (n == null ? void 0 : n.isParent(c.id)) ?? !1;
221
+ this.layoutCache.set(c.id, { stackLevel: 0, itemHeight: l ? d : r }), this.groupMaxStack.set(c.group, 0);
222
222
  }
223
223
  return this.layoutCache;
224
224
  }
225
- const s = /* @__PURE__ */ new Map();
225
+ const o = /* @__PURE__ */ new Map();
226
226
  for (const c of e) {
227
- let a = s.get(c.group);
228
- a || (a = [], s.set(c.group, a)), a.push(c);
227
+ let l = o.get(c.group);
228
+ l || (l = [], o.set(c.group, l)), l.push(c);
229
229
  }
230
- for (const [c, a] of s)
231
- n ? this.computeHierarchyLayout(a, n, o, d, c) : this.computeFlatLayout(a, o, c);
230
+ for (const [c, l] of o)
231
+ n ? this.computeHierarchyLayout(l, n, r, d, c) : this.computeFlatLayout(l, r, c);
232
232
  return this.layoutCache;
233
233
  }
234
234
  computeFlatLayout(e, t, n) {
235
- e.sort((s, c) => {
236
- const a = s.start_time - c.start_time;
237
- return a !== 0 ? a : c.end_time - c.start_time - (s.end_time - s.start_time);
235
+ e.sort((o, c) => {
236
+ const l = o.start_time - c.start_time;
237
+ return l !== 0 ? l : c.end_time - c.start_time - (o.end_time - o.start_time);
238
238
  });
239
- const o = [];
239
+ const r = [];
240
240
  let d = 0;
241
- for (const s of e) {
241
+ for (const o of e) {
242
242
  let c = -1;
243
- for (let a = 0; a < o.length; a++)
244
- if (o[a] <= s.start_time) {
245
- c = a;
243
+ for (let l = 0; l < r.length; l++)
244
+ if (r[l] <= o.start_time) {
245
+ c = l;
246
246
  break;
247
247
  }
248
- c === -1 ? (c = o.length, o.push(s.end_time)) : o[c] = s.end_time, c > d && (d = c), this.layoutCache.set(s.id, { stackLevel: c, itemHeight: t });
248
+ c === -1 ? (c = r.length, r.push(o.end_time)) : r[c] = o.end_time, c > d && (d = c), this.layoutCache.set(o.id, { stackLevel: c, itemHeight: t });
249
249
  }
250
250
  this.groupMaxStack.set(n, d);
251
251
  }
252
- computeHierarchyLayout(e, t, n, o, d) {
253
- const s = [], c = [];
254
- for (const p of e)
255
- t.isParent(p.id) ? c.push(p) : s.push(p);
256
- s.sort((p, f) => {
257
- const w = p.start_time - f.start_time;
258
- return w !== 0 ? w : f.end_time - f.start_time - (p.end_time - p.start_time);
252
+ computeHierarchyLayout(e, t, n, r, d) {
253
+ const o = [], c = [];
254
+ for (const h of e)
255
+ t.isParent(h.id) ? c.push(h) : o.push(h);
256
+ o.sort((h, f) => {
257
+ const M = h.start_time - f.start_time;
258
+ return M !== 0 ? M : f.end_time - f.start_time - (h.end_time - h.start_time);
259
259
  });
260
- const a = [];
261
- let b = 0;
262
- for (const p of s) {
260
+ const l = [];
261
+ let v = 0;
262
+ for (const h of o) {
263
263
  let f = -1;
264
- for (let w = 0; w < a.length; w++)
265
- if (a[w] <= p.start_time) {
266
- f = w;
264
+ for (let M = 0; M < l.length; M++)
265
+ if (l[M] <= h.start_time) {
266
+ f = M;
267
267
  break;
268
268
  }
269
- f === -1 ? (f = a.length, a.push(p.end_time)) : a[f] = p.end_time, f > b && (b = f), this.layoutCache.set(p.id, { stackLevel: f, itemHeight: n });
269
+ f === -1 ? (f = l.length, l.push(h.end_time)) : l[f] = h.end_time, f > v && (v = f), this.layoutCache.set(h.id, { stackLevel: f, itemHeight: n });
270
270
  }
271
- c.sort((p, f) => t.getNestingDepth(f.id) - t.getNestingDepth(p.id));
272
- let H = s.length > 0 ? b + 1 : 0;
273
- for (const p of c)
274
- this.layoutCache.set(p.id, { stackLevel: H, itemHeight: o }), H > b && (b = H), H++;
275
- this.groupMaxStack.set(d, b);
271
+ c.sort((h, f) => t.getNestingDepth(f.id) - t.getNestingDepth(h.id));
272
+ let C = o.length > 0 ? v + 1 : 0;
273
+ for (const h of c)
274
+ this.layoutCache.set(h.id, { stackLevel: C, itemHeight: r }), C > v && (v = C), C++;
275
+ this.groupMaxStack.set(d, v);
276
276
  }
277
277
  getLayout(e) {
278
278
  return this.layoutCache.get(e);
@@ -281,7 +281,7 @@ class Oi {
281
281
  return ((this.groupMaxStack.get(e) ?? 0) + 1) * this.lineHeight;
282
282
  }
283
283
  }
284
- class Pi {
284
+ class Yi {
285
285
  constructor() {
286
286
  Object.defineProperty(this, "parentToChildren", {
287
287
  enumerable: !0,
@@ -317,19 +317,19 @@ class Pi {
317
317
  }
318
318
  for (const t of this.childToParent.keys()) {
319
319
  const n = /* @__PURE__ */ new Set();
320
- let o = t;
321
- for (; o !== void 0; ) {
322
- if (n.has(o)) {
320
+ let r = t;
321
+ for (; r !== void 0; ) {
322
+ if (n.has(r)) {
323
323
  const d = this.childToParent.get(t);
324
324
  this.childToParent.delete(t);
325
- const s = this.parentToChildren.get(d);
326
- if (s) {
327
- const c = s.indexOf(t);
328
- c !== -1 && s.splice(c, 1), s.length === 0 && this.parentToChildren.delete(d);
325
+ const o = this.parentToChildren.get(d);
326
+ if (o) {
327
+ const c = o.indexOf(t);
328
+ c !== -1 && o.splice(c, 1), o.length === 0 && this.parentToChildren.delete(d);
329
329
  }
330
330
  break;
331
331
  }
332
- n.add(o), o = this.childToParent.get(o);
332
+ n.add(r), r = this.childToParent.get(r);
333
333
  }
334
334
  }
335
335
  }
@@ -346,9 +346,9 @@ class Pi {
346
346
  getDescendants(e) {
347
347
  const t = [], n = [...this.getChildren(e)];
348
348
  for (; n.length > 0; ) {
349
- const o = n.pop();
350
- t.push(o);
351
- const d = this.parentToChildren.get(o);
349
+ const r = n.pop();
350
+ t.push(r);
351
+ const d = this.parentToChildren.get(r);
352
352
  d && n.push(...d);
353
353
  }
354
354
  return t;
@@ -357,31 +357,31 @@ class Pi {
357
357
  const t = this.itemMap.get(e);
358
358
  if (!t)
359
359
  return { start: 0, end: 0 };
360
- let n = t.start_time, o = t.end_time;
360
+ let n = t.start_time, r = t.end_time;
361
361
  const d = this.getDescendants(e);
362
- for (const s of d) {
363
- const c = this.itemMap.get(s);
364
- c && (c.start_time < n && (n = c.start_time), c.end_time > o && (o = c.end_time));
362
+ for (const o of d) {
363
+ const c = this.itemMap.get(o);
364
+ c && (c.start_time < n && (n = c.start_time), c.end_time > r && (r = c.end_time));
365
365
  }
366
- return { start: n, end: o };
366
+ return { start: n, end: r };
367
367
  }
368
368
  getNestingDepth(e) {
369
369
  const t = this.depthCache.get(e);
370
370
  if (t !== void 0)
371
371
  return t;
372
- let n = 0, o = this.childToParent.get(e);
373
- for (; o !== void 0; )
374
- n++, o = this.childToParent.get(o);
372
+ let n = 0, r = this.childToParent.get(e);
373
+ for (; r !== void 0; )
374
+ n++, r = this.childToParent.get(r);
375
375
  return this.depthCache.set(e, n), n;
376
376
  }
377
377
  getMoveDelta(e, t) {
378
378
  const n = this.itemMap.get(e);
379
379
  if (!n)
380
380
  return [];
381
- const o = t - n.start_time;
382
- return this.getDescendants(e).map((s) => {
383
- const c = this.itemMap.get(s);
384
- return { itemId: s, newStart: c.start_time + o };
381
+ const r = t - n.start_time;
382
+ return this.getDescendants(e).map((o) => {
383
+ const c = this.itemMap.get(o);
384
+ return { itemId: o, newStart: c.start_time + r };
385
385
  });
386
386
  }
387
387
  getResizeConstraint(e, t) {
@@ -389,84 +389,88 @@ class Pi {
389
389
  if (n.length === 0)
390
390
  return t === "left" ? { min: -1 / 0, max: 1 / 0 } : { min: -1 / 0, max: 1 / 0 };
391
391
  if (t === "left") {
392
- let o = 1 / 0;
392
+ let r = 1 / 0;
393
393
  for (const d of n) {
394
- const s = this.itemMap.get(d);
395
- s && s.start_time < o && (o = s.start_time);
394
+ const o = this.itemMap.get(d);
395
+ o && o.start_time < r && (r = o.start_time);
396
396
  }
397
- return { min: -1 / 0, max: o };
397
+ return { min: -1 / 0, max: r };
398
398
  } else {
399
- let o = -1 / 0;
399
+ let r = -1 / 0;
400
400
  for (const d of n) {
401
- const s = this.itemMap.get(d);
402
- s && s.end_time > o && (o = s.end_time);
401
+ const o = this.itemMap.get(d);
402
+ o && o.end_time > r && (r = o.end_time);
403
403
  }
404
- return { min: o, max: 1 / 0 };
404
+ return { min: r, max: 1 / 0 };
405
405
  }
406
406
  }
407
407
  }
408
- function Xi(i, e, t, n, o, d) {
409
- const { x: s, y: c, width: a, height: b } = t, H = d.primary;
410
- i.globalAlpha = 0.15, i.fillStyle = H, i.fillRect(s, c, a, b), i.globalAlpha = 1, i.strokeStyle = H, i.lineWidth = 1.5, i.strokeRect(s, c, a, b);
411
- const p = Math.min(b * 0.5, 6), f = c + b / 2;
412
- i.fillStyle = H, i.beginPath(), i.moveTo(s, f), i.lineTo(s + p, f - p), i.lineTo(s + p * 2, f), i.lineTo(s + p, f + p), i.closePath(), i.fill(), i.beginPath(), i.moveTo(s + a, f), i.lineTo(s + a - p, f - p), i.lineTo(s + a - p * 2, f), i.lineTo(s + a - p, f + p), i.closePath(), i.fill();
413
- const w = e.title;
414
- if (w && a > 30) {
408
+ function Fi(i, e, t, n, r, d) {
409
+ const { x: o, y: c, width: l, height: v } = t, C = d.primary;
410
+ i.globalAlpha = 0.15, i.fillStyle = C, i.fillRect(o, c, l, v), i.globalAlpha = 1, i.strokeStyle = C, i.lineWidth = 1.5, i.strokeRect(o, c, l, v);
411
+ const h = Math.min(v * 0.5, 6), f = c + v / 2;
412
+ i.fillStyle = C, i.beginPath(), i.moveTo(o, f), i.lineTo(o + h, f - h), i.lineTo(o + h * 2, f), i.lineTo(o + h, f + h), i.closePath(), i.fill(), i.beginPath(), i.moveTo(o + l, f), i.lineTo(o + l - h, f - h), i.lineTo(o + l - h * 2, f), i.lineTo(o + l - h, f + h), i.closePath(), i.fill();
413
+ const M = e.title;
414
+ if (M && l > 30) {
415
415
  i.fillStyle = d.item.text, i.font = '500 11px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', i.textBaseline = "middle";
416
- const T = i.measureText(w).width, h = a - p * 4 - 4;
417
- if (h > 20) {
418
- const E = T > h ? w.slice(0, Math.floor(w.length * h / T)) + "..." : w;
419
- i.fillText(E, s + a / 2 - Math.min(T, h) / 2, f);
416
+ const T = i.measureText(M).width, m = l - h * 4 - 4;
417
+ if (m > 20) {
418
+ const E = T > m ? M.slice(0, Math.floor(M.length * m / T)) + "..." : M;
419
+ i.fillText(E, o + l / 2 - Math.min(T, m) / 2, f);
420
420
  }
421
421
  }
422
- n.selected && (i.strokeStyle = d.item.selectedRing, i.lineWidth = 2, i.strokeRect(s - 1, c - 1, a + 2, b + 2));
422
+ n.selected && (i.strokeStyle = d.item.selectedRing, i.lineWidth = 2, i.strokeRect(o - 1, c - 1, l + 2, v + 2));
423
423
  }
424
- function Ue(i, e, t, n, o, d) {
425
- const s = t.xToTime(i), c = /* @__PURE__ */ new Map();
426
- for (let p = 0; p < d.length; p++)
427
- c.set(d[p].id, p);
428
- const a = n.query(s, s);
429
- let b = null, H = -1 / 0;
430
- for (const p of a) {
431
- const f = c.get(p.group);
424
+ function Ze(i, e, t, n, r, d) {
425
+ const o = t.xToTime(i), c = /* @__PURE__ */ new Map();
426
+ for (let h = 0; h < d.length; h++)
427
+ c.set(d[h].id, h);
428
+ const l = n.query(o, o);
429
+ let v = null, C = -1 / 0;
430
+ for (const h of l) {
431
+ const f = c.get(h.group);
432
432
  if (f === void 0)
433
433
  continue;
434
- const w = o.getLayout(p.id);
435
- if (!w)
434
+ const M = r.getLayout(h.id);
435
+ if (!M)
436
436
  continue;
437
- const T = t.timeToX(p.start_time), h = t.timeToX(p.end_time) - T;
438
- if (i < T || i > T + h)
437
+ const T = t.timeToX(h.start_time), m = t.timeToX(h.end_time) - T;
438
+ if (i < T || i > T + m)
439
439
  continue;
440
- const P = t.groupIndexToY(f) + w.stackLevel * t.lineHeight + (t.lineHeight - w.itemHeight) / 2, W = w.itemHeight;
441
- e < P || e > P + W || P > H && (H = P, b = p);
440
+ const P = t.groupIndexToY(f) + M.stackLevel * t.lineHeight + (t.lineHeight - M.itemHeight) / 2, Y = M.itemHeight;
441
+ e < P || e > P + Y || P > C && (C = P, v = h);
442
442
  }
443
- return b;
443
+ return v;
444
444
  }
445
- function Tt(i, e, t) {
445
+ function St(i, e, t) {
446
446
  const n = e.yToGroupIndex(i);
447
447
  return t[n] ?? null;
448
448
  }
449
- function Gt(i, e, t, n = 6) {
450
- const o = t.timeToX(e.start_time), d = t.timeToX(e.end_time);
451
- return i - o <= n ? "left" : d - i <= n ? "right" : "body";
449
+ function Zt(i, e, t, n = 6) {
450
+ const r = t.timeToX(e.start_time), d = t.timeToX(e.end_time);
451
+ return i - r <= n ? "left" : d - i <= n ? "right" : "body";
452
452
  }
453
- function Nt(i, e) {
453
+ function Wi(i, e) {
454
454
  return i.canResize ?? e;
455
455
  }
456
- function Zt(i, e) {
456
+ function Bi(i, e) {
457
457
  return i.canMove ?? e;
458
458
  }
459
- function St(i, e, t) {
460
- const n = window.devicePixelRatio || 1, o = Math.round(e * n), d = Math.round(t * n);
461
- (i.width !== o || i.height !== d) && (i.width = o, i.height = d, i.style.width = `${e}px`, i.style.height = `${t}px`);
462
- const s = i.getContext("2d");
463
- return s.setTransform(n, 0, 0, n, 0, 0), s;
459
+ function Vt(i, e, t, n) {
460
+ const r = Wi(i, t);
461
+ return e === "left" && (r === "left" || r === "both") ? "resize-left" : e === "right" && (r === "right" || r === "both") ? "resize-right" : i.canResize === !1 && e !== "body" ? null : Bi(i, n) ? "move" : null;
462
+ }
463
+ function Mt(i, e, t) {
464
+ const n = window.devicePixelRatio || 1, r = Math.round(e * n), d = Math.round(t * n);
465
+ (i.width !== r || i.height !== d) && (i.width = r, i.height = d, i.style.width = `${e}px`, i.style.height = `${t}px`);
466
+ const o = i.getContext("2d");
467
+ return o.setTransform(n, 0, 0, n, 0, 0), o;
464
468
  }
465
- function Mt(i, e) {
469
+ function wt(i, e) {
466
470
  const t = window.devicePixelRatio || 1;
467
471
  i.clearRect(0, 0, e.width / t, e.height / t);
468
472
  }
469
- class $i {
473
+ class zi {
470
474
  constructor(e) {
471
475
  Object.defineProperty(this, "dirty", {
472
476
  enumerable: !0,
@@ -506,244 +510,244 @@ var lt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
506
510
  function at(i) {
507
511
  return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
508
512
  }
509
- var ii = { exports: {} };
513
+ var ri = { exports: {} };
510
514
  (function(i, e) {
511
515
  (function(t, n) {
512
516
  i.exports = n();
513
517
  })(lt, function() {
514
- var t = "minute", n = /[+-]\d\d(?::?\d\d)?/g, o = /([+-]|\d\d)/g;
515
- return function(d, s, c) {
516
- var a = s.prototype;
517
- c.utc = function(h) {
518
- var E = { date: h, utc: !0, args: arguments };
519
- return new s(E);
520
- }, a.utc = function(h) {
518
+ var t = "minute", n = /[+-]\d\d(?::?\d\d)?/g, r = /([+-]|\d\d)/g;
519
+ return function(d, o, c) {
520
+ var l = o.prototype;
521
+ c.utc = function(m) {
522
+ var E = { date: m, utc: !0, args: arguments };
523
+ return new o(E);
524
+ }, l.utc = function(m) {
521
525
  var E = c(this.toDate(), { locale: this.$L, utc: !0 });
522
- return h ? E.add(this.utcOffset(), t) : E;
523
- }, a.local = function() {
526
+ return m ? E.add(this.utcOffset(), t) : E;
527
+ }, l.local = function() {
524
528
  return c(this.toDate(), { locale: this.$L, utc: !1 });
525
529
  };
526
- var b = a.parse;
527
- a.parse = function(h) {
528
- h.utc && (this.$u = !0), this.$utils().u(h.$offset) || (this.$offset = h.$offset), b.call(this, h);
530
+ var v = l.parse;
531
+ l.parse = function(m) {
532
+ m.utc && (this.$u = !0), this.$utils().u(m.$offset) || (this.$offset = m.$offset), v.call(this, m);
529
533
  };
530
- var H = a.init;
531
- a.init = function() {
534
+ var C = l.init;
535
+ l.init = function() {
532
536
  if (this.$u) {
533
- var h = this.$d;
534
- this.$y = h.getUTCFullYear(), this.$M = h.getUTCMonth(), this.$D = h.getUTCDate(), this.$W = h.getUTCDay(), this.$H = h.getUTCHours(), this.$m = h.getUTCMinutes(), this.$s = h.getUTCSeconds(), this.$ms = h.getUTCMilliseconds();
535
- } else H.call(this);
537
+ var m = this.$d;
538
+ this.$y = m.getUTCFullYear(), this.$M = m.getUTCMonth(), this.$D = m.getUTCDate(), this.$W = m.getUTCDay(), this.$H = m.getUTCHours(), this.$m = m.getUTCMinutes(), this.$s = m.getUTCSeconds(), this.$ms = m.getUTCMilliseconds();
539
+ } else C.call(this);
536
540
  };
537
- var p = a.utcOffset;
538
- a.utcOffset = function(h, E) {
541
+ var h = l.utcOffset;
542
+ l.utcOffset = function(m, E) {
539
543
  var P = this.$utils().u;
540
- if (P(h)) return this.$u ? 0 : P(this.$offset) ? p.call(this) : this.$offset;
541
- if (typeof h == "string" && (h = function(k) {
542
- k === void 0 && (k = "");
543
- var $ = k.match(n);
544
+ if (P(m)) return this.$u ? 0 : P(this.$offset) ? h.call(this) : this.$offset;
545
+ if (typeof m == "string" && (m = function(w) {
546
+ w === void 0 && (w = "");
547
+ var $ = w.match(n);
544
548
  if (!$) return null;
545
- var B = ("" + $[0]).match(o) || ["-", 0, 0], I = B[0], A = 60 * +B[1] + +B[2];
546
- return A === 0 ? 0 : I === "+" ? A : -A;
547
- }(h), h === null)) return this;
548
- var W = Math.abs(h) <= 16 ? 60 * h : h;
549
- if (W === 0) return this.utc(E);
549
+ var B = ("" + $[0]).match(r) || ["-", 0, 0], I = B[0], x = 60 * +B[1] + +B[2];
550
+ return x === 0 ? 0 : I === "+" ? x : -x;
551
+ }(m), m === null)) return this;
552
+ var Y = Math.abs(m) <= 16 ? 60 * m : m;
553
+ if (Y === 0) return this.utc(E);
550
554
  var y = this.clone();
551
- if (E) return y.$offset = W, y.$u = !1, y;
552
- var D = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
553
- return (y = this.local().add(W + D, t)).$offset = W, y.$x.$localOffset = D, y;
555
+ if (E) return y.$offset = Y, y.$u = !1, y;
556
+ var H = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
557
+ return (y = this.local().add(Y + H, t)).$offset = Y, y.$x.$localOffset = H, y;
554
558
  };
555
- var f = a.format;
556
- a.format = function(h) {
557
- var E = h || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
559
+ var f = l.format;
560
+ l.format = function(m) {
561
+ var E = m || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
558
562
  return f.call(this, E);
559
- }, a.valueOf = function() {
560
- var h = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
561
- return this.$d.valueOf() - 6e4 * h;
562
- }, a.isUTC = function() {
563
+ }, l.valueOf = function() {
564
+ var m = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
565
+ return this.$d.valueOf() - 6e4 * m;
566
+ }, l.isUTC = function() {
563
567
  return !!this.$u;
564
- }, a.toISOString = function() {
568
+ }, l.toISOString = function() {
565
569
  return this.toDate().toISOString();
566
- }, a.toString = function() {
570
+ }, l.toString = function() {
567
571
  return this.toDate().toUTCString();
568
572
  };
569
- var w = a.toDate;
570
- a.toDate = function(h) {
571
- return h === "s" && this.$offset ? c(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : w.call(this);
573
+ var M = l.toDate;
574
+ l.toDate = function(m) {
575
+ return m === "s" && this.$offset ? c(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : M.call(this);
572
576
  };
573
- var T = a.diff;
574
- a.diff = function(h, E, P) {
575
- if (h && this.$u === h.$u) return T.call(this, h, E, P);
576
- var W = this.local(), y = c(h).local();
577
- return T.call(W, y, E, P);
577
+ var T = l.diff;
578
+ l.diff = function(m, E, P) {
579
+ if (m && this.$u === m.$u) return T.call(this, m, E, P);
580
+ var Y = this.local(), y = c(m).local();
581
+ return T.call(Y, y, E, P);
578
582
  };
579
583
  };
580
584
  });
581
- })(ii);
582
- var Fi = ii.exports;
583
- const Yi = /* @__PURE__ */ at(Fi);
584
- var ni = { exports: {} };
585
+ })(ri);
586
+ var Li = ri.exports;
587
+ const xi = /* @__PURE__ */ at(Li);
588
+ var oi = { exports: {} };
585
589
  (function(i, e) {
586
590
  (function(t, n) {
587
591
  i.exports = n();
588
592
  })(lt, function() {
589
593
  var t = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, n = {};
590
- return function(o, d, s) {
591
- var c, a = function(f, w, T) {
594
+ return function(r, d, o) {
595
+ var c, l = function(f, M, T) {
592
596
  T === void 0 && (T = {});
593
- var h = new Date(f), E = function(P, W) {
594
- W === void 0 && (W = {});
595
- var y = W.timeZoneName || "short", D = P + "|" + y, k = n[D];
596
- return k || (k = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: P, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: y }), n[D] = k), k;
597
- }(w, T);
598
- return E.formatToParts(h);
599
- }, b = function(f, w) {
600
- for (var T = a(f, w), h = [], E = 0; E < T.length; E += 1) {
601
- var P = T[E], W = P.type, y = P.value, D = t[W];
602
- D >= 0 && (h[D] = parseInt(y, 10));
597
+ var m = new Date(f), E = function(P, Y) {
598
+ Y === void 0 && (Y = {});
599
+ var y = Y.timeZoneName || "short", H = P + "|" + y, w = n[H];
600
+ return w || (w = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: P, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: y }), n[H] = w), w;
601
+ }(M, T);
602
+ return E.formatToParts(m);
603
+ }, v = function(f, M) {
604
+ for (var T = l(f, M), m = [], E = 0; E < T.length; E += 1) {
605
+ var P = T[E], Y = P.type, y = P.value, H = t[Y];
606
+ H >= 0 && (m[H] = parseInt(y, 10));
603
607
  }
604
- var k = h[3], $ = k === 24 ? 0 : k, B = h[0] + "-" + h[1] + "-" + h[2] + " " + $ + ":" + h[4] + ":" + h[5] + ":000", I = +f;
605
- return (s.utc(B).valueOf() - (I -= I % 1e3)) / 6e4;
606
- }, H = d.prototype;
607
- H.tz = function(f, w) {
608
+ var w = m[3], $ = w === 24 ? 0 : w, B = m[0] + "-" + m[1] + "-" + m[2] + " " + $ + ":" + m[4] + ":" + m[5] + ":000", I = +f;
609
+ return (o.utc(B).valueOf() - (I -= I % 1e3)) / 6e4;
610
+ }, C = d.prototype;
611
+ C.tz = function(f, M) {
608
612
  f === void 0 && (f = c);
609
- var T, h = this.utcOffset(), E = this.toDate(), P = E.toLocaleString("en-US", { timeZone: f }), W = Math.round((E - new Date(P)) / 1e3 / 60), y = 15 * -Math.round(E.getTimezoneOffset() / 15) - W;
610
- if (!Number(y)) T = this.utcOffset(0, w);
611
- else if (T = s(P, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(y, !0), w) {
612
- var D = T.utcOffset();
613
- T = T.add(h - D, "minute");
613
+ var T, m = this.utcOffset(), E = this.toDate(), P = E.toLocaleString("en-US", { timeZone: f }), Y = Math.round((E - new Date(P)) / 1e3 / 60), y = 15 * -Math.round(E.getTimezoneOffset() / 15) - Y;
614
+ if (!Number(y)) T = this.utcOffset(0, M);
615
+ else if (T = o(P, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(y, !0), M) {
616
+ var H = T.utcOffset();
617
+ T = T.add(m - H, "minute");
614
618
  }
615
619
  return T.$x.$timezone = f, T;
616
- }, H.offsetName = function(f) {
617
- var w = this.$x.$timezone || s.tz.guess(), T = a(this.valueOf(), w, { timeZoneName: f }).find(function(h) {
618
- return h.type.toLowerCase() === "timezonename";
620
+ }, C.offsetName = function(f) {
621
+ var M = this.$x.$timezone || o.tz.guess(), T = l(this.valueOf(), M, { timeZoneName: f }).find(function(m) {
622
+ return m.type.toLowerCase() === "timezonename";
619
623
  });
620
624
  return T && T.value;
621
625
  };
622
- var p = H.startOf;
623
- H.startOf = function(f, w) {
624
- if (!this.$x || !this.$x.$timezone) return p.call(this, f, w);
625
- var T = s(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
626
- return p.call(T, f, w).tz(this.$x.$timezone, !0);
627
- }, s.tz = function(f, w, T) {
628
- var h = T && w, E = T || w || c, P = b(+s(), E);
629
- if (typeof f != "string") return s(f).tz(E);
630
- var W = function($, B, I) {
631
- var A = $ - 60 * B * 1e3, F = b(A, I);
632
- if (B === F) return [A, B];
633
- var se = b(A -= 60 * (F - B) * 1e3, I);
634
- return F === se ? [A, F] : [$ - 60 * Math.min(F, se) * 1e3, Math.max(F, se)];
635
- }(s.utc(f, h).valueOf(), P, E), y = W[0], D = W[1], k = s(y).utcOffset(D);
636
- return k.$x.$timezone = E, k;
637
- }, s.tz.guess = function() {
626
+ var h = C.startOf;
627
+ C.startOf = function(f, M) {
628
+ if (!this.$x || !this.$x.$timezone) return h.call(this, f, M);
629
+ var T = o(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
630
+ return h.call(T, f, M).tz(this.$x.$timezone, !0);
631
+ }, o.tz = function(f, M, T) {
632
+ var m = T && M, E = T || M || c, P = v(+o(), E);
633
+ if (typeof f != "string") return o(f).tz(E);
634
+ var Y = function($, B, I) {
635
+ var x = $ - 60 * B * 1e3, _ = v(x, I);
636
+ if (B === _) return [x, B];
637
+ var ee = v(x -= 60 * (_ - B) * 1e3, I);
638
+ return _ === ee ? [x, _] : [$ - 60 * Math.min(_, ee) * 1e3, Math.max(_, ee)];
639
+ }(o.utc(f, m).valueOf(), P, E), y = Y[0], H = Y[1], w = o(y).utcOffset(H);
640
+ return w.$x.$timezone = E, w;
641
+ }, o.tz.guess = function() {
638
642
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
639
- }, s.tz.setDefault = function(f) {
643
+ }, o.tz.setDefault = function(f) {
640
644
  c = f;
641
645
  };
642
646
  };
643
647
  });
644
- })(ni);
645
- var _i = ni.exports;
646
- const Wi = /* @__PURE__ */ at(_i);
647
- We.extend(Yi);
648
- We.extend(Wi);
649
- function Te(i, e) {
648
+ })(oi);
649
+ var Ai = oi.exports;
650
+ const ji = /* @__PURE__ */ at(Ai);
651
+ We.extend(xi);
652
+ We.extend(ji);
653
+ function pe(i, e) {
650
654
  return e ? We(i).tz(e) : We(i);
651
655
  }
652
- class Bi {
653
- draw(e, t, n, o, d, s, c, a) {
654
- const { firstVisible: b, lastVisible: H } = t.getVisibleGroupRange();
655
- for (let y = b; y <= H; y++) {
656
- const D = t.groupIndexToY(y), k = t.groupIndexToHeight(y), $ = n[y];
656
+ class Gi {
657
+ draw(e, t, n, r, d, o, c, l) {
658
+ const { firstVisible: v, lastVisible: C } = t.getVisibleGroupRange();
659
+ for (let y = v; y <= C; y++) {
660
+ const H = t.groupIndexToY(y), w = t.groupIndexToHeight(y), $ = n[y];
657
661
  if (!$)
658
662
  continue;
659
663
  let B;
660
- const I = s == null ? void 0 : s($);
661
- I != null && I.backgroundColor ? B = I.backgroundColor : B = y % 2 === 0 ? "#FFFFFF" : o.grid.rowAlt, e.fillStyle = B, e.fillRect(0, D, t.canvasWidth, k), e.strokeStyle = (I == null ? void 0 : I.borderBottomColor) ?? o.grid.line, e.lineWidth = 0.5, e.beginPath(), e.moveTo(0, D + k), e.lineTo(t.canvasWidth, D + k), e.stroke();
664
+ const I = o == null ? void 0 : o($);
665
+ I != null && I.backgroundColor ? B = I.backgroundColor : B = y % 2 === 0 ? "#FFFFFF" : r.grid.rowAlt, e.fillStyle = B, e.fillRect(0, H, t.canvasWidth, w), e.strokeStyle = (I == null ? void 0 : I.borderBottomColor) ?? r.grid.line, e.lineWidth = 0.5, e.beginPath(), e.moveTo(0, H + w), e.lineTo(t.canvasWidth, H + w), e.stroke();
662
666
  }
663
667
  if (c && c.length > 0)
664
668
  for (const y of c) {
665
- const D = t.timeToX(y.start), k = t.timeToX(y.end);
666
- if (k < 0 || D > t.canvasWidth)
669
+ const H = t.timeToX(y.start), w = t.timeToX(y.end);
670
+ if (w < 0 || H > t.canvasWidth)
667
671
  continue;
668
- const $ = Math.max(0, D), B = Math.min(t.canvasWidth, k) - $, I = y.opacity ?? 0.12, A = parseInt(y.color.slice(1, 3), 16), F = parseInt(y.color.slice(3, 5), 16), se = parseInt(y.color.slice(5, 7), 16);
669
- e.fillStyle = `rgb(${Math.round(A * I + 255 * (1 - I))},${Math.round(F * I + 255 * (1 - I))},${Math.round(se * I + 255 * (1 - I))})`, e.fillRect($, 0, B, t.canvasHeight);
672
+ const $ = Math.max(0, H), B = Math.min(t.canvasWidth, w) - $, I = y.opacity ?? 0.12, x = parseInt(y.color.slice(1, 3), 16), _ = parseInt(y.color.slice(3, 5), 16), ee = parseInt(y.color.slice(5, 7), 16);
673
+ e.fillStyle = `rgb(${Math.round(x * I + 255 * (1 - I))},${Math.round(_ * I + 255 * (1 - I))},${Math.round(ee * I + 255 * (1 - I))})`, e.fillRect($, 0, B, t.canvasHeight);
670
674
  }
671
- const p = t.visibleTimeStart, f = t.visibleTimeEnd, h = 864e5 / (f - p) * t.canvasWidth;
675
+ const h = t.visibleTimeStart, f = t.visibleTimeEnd, m = 864e5 / (f - h) * t.canvasWidth;
672
676
  let E = "day";
673
- h < 2 ? E = "month" : h < 8 && (E = "week");
677
+ m < 2 ? E = "month" : m < 8 && (E = "week");
674
678
  {
675
- let y = Te(p, a).startOf("day");
676
- const D = Te(f, a).endOf("day");
677
- let k = null, $ = 1, B = 0;
678
- const I = [], A = (F) => {
679
- k !== null && (e.fillStyle = k, $ !== 1 && (e.globalAlpha = $), e.fillRect(B, 0, F - B, t.canvasHeight), $ !== 1 && (e.globalAlpha = 1), k = null, $ = 1);
679
+ let y = pe(h, l).startOf("day");
680
+ const H = pe(f, l).endOf("day");
681
+ let w = null, $ = 1, B = 0;
682
+ const I = [], x = (_) => {
683
+ w !== null && (e.fillStyle = w, $ !== 1 && (e.globalAlpha = $), e.fillRect(B, 0, _ - B, t.canvasHeight), $ !== 1 && (e.globalAlpha = 1), w = null, $ = 1);
680
684
  };
681
- for (; y.isBefore(D); ) {
682
- const F = t.timeToX(y.valueOf()), se = y.toDate(), K = d == null ? void 0 : d(se);
683
- let te = null, be = 1;
684
- if (K != null && K.backgroundColor)
685
- te = K.backgroundColor, be = K.opacity ?? 1;
685
+ for (; y.isBefore(H); ) {
686
+ const _ = t.timeToX(y.valueOf()), ee = y.toDate(), U = d == null ? void 0 : d(ee);
687
+ let J = null, he = 1;
688
+ if (U != null && U.backgroundColor)
689
+ J = U.backgroundColor, he = U.opacity ?? 1;
686
690
  else {
687
- const Se = y.day();
688
- (Se === 0 || Se === 6) && (te = o.grid.weekend);
691
+ const ve = y.day();
692
+ (ve === 0 || ve === 6) && (J = r.grid.weekend);
689
693
  }
690
- K != null && K.borderColor && I.push({ x: F, color: K.borderColor }), te === k && be === $ || (A(F), te !== null && (k = te, $ = be, B = F)), y = y.add(1, "day");
694
+ U != null && U.borderColor && I.push({ x: _, color: U.borderColor }), J === w && he === $ || (x(_), J !== null && (w = J, $ = he, B = _)), y = y.add(1, "day");
691
695
  }
692
- k !== null && A(t.timeToX(y.valueOf()));
693
- for (const F of I)
694
- e.strokeStyle = F.color, e.lineWidth = 0.5, e.beginPath(), e.moveTo(F.x, 0), e.lineTo(F.x, t.canvasHeight), e.stroke();
696
+ w !== null && x(t.timeToX(y.valueOf()));
697
+ for (const _ of I)
698
+ e.strokeStyle = _.color, e.lineWidth = 0.5, e.beginPath(), e.moveTo(_.x, 0), e.lineTo(_.x, t.canvasHeight), e.stroke();
695
699
  }
696
- let P = Te(p, a).startOf(E);
697
- const W = Te(f, a).add(1, E);
698
- for (e.strokeStyle = o.grid.line, e.lineWidth = 0.5, e.beginPath(); P.isBefore(W); ) {
700
+ let P = pe(h, l).startOf(E);
701
+ const Y = pe(f, l).add(1, E);
702
+ for (e.strokeStyle = r.grid.line, e.lineWidth = 0.5, e.beginPath(); P.isBefore(Y); ) {
699
703
  const y = t.timeToX(P.valueOf());
700
704
  e.moveTo(y, 0), e.lineTo(y, t.canvasHeight), P = P.add(1, E);
701
705
  }
702
706
  if (e.stroke(), c && c.length > 0)
703
707
  for (const y of c) {
704
- const D = t.timeToX(y.start), k = t.timeToX(y.end);
705
- if (!(k < 0 || D > t.canvasWidth) && (e.strokeStyle = y.color, e.globalAlpha = 0.4, e.lineWidth = 1, e.beginPath(), D >= 0 && D <= t.canvasWidth && (e.moveTo(D, 0), e.lineTo(D, t.canvasHeight)), k >= 0 && k <= t.canvasWidth && (e.moveTo(k, 0), e.lineTo(k, t.canvasHeight)), e.stroke(), e.globalAlpha = 1, y.label)) {
706
- const $ = Math.max(0, D), B = Math.min(t.canvasWidth, k) - $;
708
+ const H = t.timeToX(y.start), w = t.timeToX(y.end);
709
+ if (!(w < 0 || H > t.canvasWidth) && (e.strokeStyle = y.color, e.globalAlpha = 0.4, e.lineWidth = 1, e.beginPath(), H >= 0 && H <= t.canvasWidth && (e.moveTo(H, 0), e.lineTo(H, t.canvasHeight)), w >= 0 && w <= t.canvasWidth && (e.moveTo(w, 0), e.lineTo(w, t.canvasHeight)), e.stroke(), e.globalAlpha = 1, y.label)) {
710
+ const $ = Math.max(0, H), B = Math.min(t.canvasWidth, w) - $;
707
711
  e.save(), e.font = '600 10px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';
708
- const I = e.measureText(y.label).width, A = 6, F = I + A * 2, se = 18, K = $ + (B - F) / 2, te = 4;
709
- e.fillStyle = y.color, e.globalAlpha = 0.9, e.beginPath(), e.roundRect(K, te, F, se, 3), e.fill(), e.globalAlpha = 1, e.fillStyle = "#FFFFFF", e.textBaseline = "middle", e.fillText(y.label, K + A, te + se / 2), e.restore();
712
+ const I = e.measureText(y.label).width, x = 6, _ = I + x * 2, ee = 18, U = $ + (B - _) / 2, J = 4;
713
+ e.fillStyle = y.color, e.globalAlpha = 0.9, e.beginPath(), e.roundRect(U, J, _, ee, 3), e.fill(), e.globalAlpha = 1, e.fillStyle = "#FFFFFF", e.textBaseline = "middle", e.fillText(y.label, U + x, J + ee / 2), e.restore();
710
714
  }
711
715
  }
712
716
  }
713
717
  }
714
- const Ut = '500 12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';
715
- function ri(i, e) {
718
+ const qt = '500 12px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';
719
+ function si(i, e) {
716
720
  return {
717
721
  /**
718
722
  * Draws a filled rounded rectangle.
719
723
  * Default corner radius is 3px.
720
724
  */
721
- roundRect(t, n, o, d, s = 3) {
722
- i.beginPath(), i.roundRect(t, n, o, d, s), i.fill();
725
+ roundRect(t, n, r, d, o = 3) {
726
+ i.beginPath(), i.roundRect(t, n, r, d, o), i.fill();
723
727
  },
724
728
  /**
725
729
  * Draws text at (x, y) using the standard item font.
726
730
  * If maxWidth is provided and the text is too wide, binary-search truncates it
727
731
  * and appends '...' so it fits within maxWidth.
728
732
  */
729
- fillText(t, n, o, d) {
730
- if (i.font = Ut, d !== void 0 && i.measureText(t).width > d) {
731
- let s = 0, c = t.length;
732
- for (; s < c; ) {
733
- const a = Math.ceil((s + c) / 2), b = t.slice(0, a) + "...";
734
- i.measureText(b).width <= d ? s = a : c = a - 1;
733
+ fillText(t, n, r, d) {
734
+ if (i.font = qt, d !== void 0 && i.measureText(t).width > d) {
735
+ let o = 0, c = t.length;
736
+ for (; o < c; ) {
737
+ const l = Math.ceil((o + c) / 2), v = t.slice(0, l) + "...";
738
+ i.measureText(v).width <= d ? o = l : c = l - 1;
735
739
  }
736
- i.fillText(t.slice(0, s) + "...", n, o);
740
+ i.fillText(t.slice(0, o) + "...", n, r);
737
741
  } else
738
- i.fillText(t, n, o);
742
+ i.fillText(t, n, r);
739
743
  },
740
744
  /**
741
745
  * Creates a 50/50 linear gradient from color1 (0%–50%) to color2 (50%–100%)
742
746
  * spanning the given x position and width.
743
747
  */
744
- gradient(t, n, o, d) {
745
- const s = i.createLinearGradient(t, 0, t + n, 0);
746
- return s.addColorStop(0, o), s.addColorStop(0.5, o), s.addColorStop(0.5, d), s.addColorStop(1, d), s;
748
+ gradient(t, n, r, d) {
749
+ const o = i.createLinearGradient(t, 0, t + n, 0);
750
+ return o.addColorStop(0, r), o.addColorStop(0.5, r), o.addColorStop(0.5, d), o.addColorStop(1, d), o;
747
751
  },
748
752
  /**
749
753
  * Draws a vertical colored bar on the left edge of the item bounds.
@@ -757,124 +761,124 @@ function ri(i, e) {
757
761
  * Supported types: 'check', 'danger-red', 'danger-yellow'.
758
762
  * Default size is 14px.
759
763
  */
760
- icon(t, n, o, d = 14) {
764
+ icon(t, n, r, d = 14) {
761
765
  i.save();
762
- const s = d / 2;
766
+ const o = d / 2;
763
767
  if (t === "check") {
764
- i.fillStyle = "#31c48d", i.beginPath(), i.arc(n + s, o + s, s, 0, Math.PI * 2), i.fill(), i.strokeStyle = "#ffffff", i.lineWidth = d * 0.12, i.beginPath();
765
- const c = n + s, a = o + s;
766
- i.moveTo(c - s * 0.45, a), i.lineTo(c - s * 0.1, a + s * 0.42), i.lineTo(c + s * 0.45, a - s * 0.35), i.stroke();
768
+ i.fillStyle = "#31c48d", i.beginPath(), i.arc(n + o, r + o, o, 0, Math.PI * 2), i.fill(), i.strokeStyle = "#ffffff", i.lineWidth = d * 0.12, i.beginPath();
769
+ const c = n + o, l = r + o;
770
+ i.moveTo(c - o * 0.45, l), i.lineTo(c - o * 0.1, l + o * 0.42), i.lineTo(c + o * 0.45, l - o * 0.35), i.stroke();
767
771
  } else if (t === "danger-red" || t === "danger-yellow") {
768
772
  const c = t === "danger-red" ? "#EF5350" : "#FBBF24";
769
- i.fillStyle = c, i.beginPath(), i.moveTo(n + s, o), i.lineTo(n + d, o + d), i.lineTo(n, o + d), i.closePath(), i.fill(), i.fillStyle = "#ffffff";
770
- const a = d * 0.12, b = n + s - a / 2;
771
- i.fillRect(b, o + d * 0.35, a, d * 0.35), i.beginPath(), i.arc(n + s, o + d * 0.82, a * 0.7, 0, Math.PI * 2), i.fill();
773
+ i.fillStyle = c, i.beginPath(), i.moveTo(n + o, r), i.lineTo(n + d, r + d), i.lineTo(n, r + d), i.closePath(), i.fill(), i.fillStyle = "#ffffff";
774
+ const l = d * 0.12, v = n + o - l / 2;
775
+ i.fillRect(v, r + d * 0.35, l, d * 0.35), i.beginPath(), i.arc(n + o, r + d * 0.82, l * 0.7, 0, Math.PI * 2), i.fill();
772
776
  }
773
777
  i.restore();
774
778
  },
775
779
  /**
776
780
  * Draws a pill-shaped badge with centered white text on a colored background.
777
781
  */
778
- badge(t, n, o, d) {
779
- i.save(), i.font = Ut;
780
- const c = i.measureText(t).width, a = 8, H = 12 + 3 * 2, p = c + a * 2, f = H / 2;
781
- i.fillStyle = d, i.beginPath(), i.roundRect(n, o, p, H, f), i.fill(), i.fillStyle = "#ffffff", i.textAlign = "center", i.textBaseline = "middle", i.fillText(t, n + p / 2, o + H / 2), i.restore();
782
+ badge(t, n, r, d) {
783
+ i.save(), i.font = qt;
784
+ const c = i.measureText(t).width, l = 8, C = 12 + 3 * 2, h = c + l * 2, f = C / 2;
785
+ i.fillStyle = d, i.beginPath(), i.roundRect(n, r, h, C, f), i.fill(), i.fillStyle = "#ffffff", i.textAlign = "center", i.textBaseline = "middle", i.fillText(t, n + h / 2, r + C / 2), i.restore();
782
786
  }
783
787
  };
784
788
  }
785
- class Li {
786
- draw(e, t, n, o, d, s, c, a, b, H, p, f, w, T) {
787
- const h = (t.visibleTimeEnd - t.visibleTimeStart) * 0.1, E = t.visibleTimeStart - h, P = t.visibleTimeEnd + h, W = d.query(E, P), y = /* @__PURE__ */ new Map();
789
+ class Ni {
790
+ draw(e, t, n, r, d, o, c, l, v, C, h, f, M, T) {
791
+ const m = (t.visibleTimeEnd - t.visibleTimeStart) * 0.1, E = t.visibleTimeStart - m, P = t.visibleTimeEnd + m, Y = d.query(E, P), y = /* @__PURE__ */ new Map();
788
792
  for (let I = 0; I < n.length; I++)
789
793
  y.set(n[I].id, I);
790
- const D = new Set(H), k = /* @__PURE__ */ new Map(), $ = -t.lineHeight, B = t.canvasHeight + t.lineHeight;
791
- for (const I of W) {
792
- const A = y.get(I.group);
793
- if (A === void 0)
794
+ const H = new Set(C), w = /* @__PURE__ */ new Map(), $ = -t.lineHeight, B = t.canvasHeight + t.lineHeight;
795
+ for (const I of Y) {
796
+ const x = y.get(I.group);
797
+ if (x === void 0)
794
798
  continue;
795
- const F = s.getLayout(I.id);
796
- if (!F)
799
+ const _ = o.getLayout(I.id);
800
+ if (!_)
797
801
  continue;
798
- const K = t.groupIndexToY(A) + F.stackLevel * t.lineHeight + (t.lineHeight - F.itemHeight) / 2, te = F.itemHeight;
799
- if (K + te < $ || K > B)
802
+ const U = t.groupIndexToY(x) + _.stackLevel * t.lineHeight + (t.lineHeight - _.itemHeight) / 2, J = _.itemHeight;
803
+ if (U + J < $ || U > B)
800
804
  continue;
801
- const be = t.timeToX(I.start_time), Se = t.timeToX(I.end_time) - be, Me = { x: be, y: K, width: Se, height: te };
802
- k.set(I.id, Me);
803
- const Xe = {
804
- selected: D.has(I.id),
805
- hovered: p === I.id,
805
+ const he = t.timeToX(I.start_time), ve = t.timeToX(I.end_time) - he, be = { x: he, y: U, width: ve, height: J };
806
+ w.set(I.id, be);
807
+ const Pe = {
808
+ selected: H.has(I.id),
809
+ hovered: h === I.id,
806
810
  dragging: !1,
807
811
  filtered: I.filtered !== !1
808
812
  };
809
813
  e.save();
810
- const qe = ri(e, Me);
811
- let De;
812
- w && (T != null && T.isParent(I.id)) ? De = w : a && (I.type === "control_area_group" || I.type === "construction_train") ? De = a : De = c, De(e, I, Me, Xe, qe), e.restore();
814
+ const qe = si(e, be);
815
+ let Ee;
816
+ M && (T != null && T.isParent(I.id)) ? Ee = M : l && (I.type === "control_area_group" || I.type === "construction_train") ? Ee = l : Ee = c, Ee(e, I, be, Pe, qe), e.restore();
813
817
  }
814
818
  if (f && f.length > 0) {
815
819
  const I = /* @__PURE__ */ new Set();
816
- for (const A of f)
817
- k.has(A.fromItemId) || I.add(A.fromItemId), k.has(A.toItemId) || I.add(A.toItemId);
820
+ for (const x of f)
821
+ w.has(x.fromItemId) || I.add(x.fromItemId), w.has(x.toItemId) || I.add(x.toItemId);
818
822
  if (I.size > 0) {
819
- const A = /* @__PURE__ */ new Map();
820
- for (const F of o)
821
- I.has(F.id) && A.set(F.id, F);
822
- for (const [F, se] of A) {
823
- const K = y.get(se.group);
824
- if (K === void 0)
823
+ const x = /* @__PURE__ */ new Map();
824
+ for (const _ of r)
825
+ I.has(_.id) && x.set(_.id, _);
826
+ for (const [_, ee] of x) {
827
+ const U = y.get(ee.group);
828
+ if (U === void 0)
825
829
  continue;
826
- const te = s.getLayout(F);
827
- if (!te)
830
+ const J = o.getLayout(_);
831
+ if (!J)
828
832
  continue;
829
- const Se = t.groupIndexToY(K) + te.stackLevel * t.lineHeight + (t.lineHeight - te.itemHeight) / 2, Me = t.timeToX(se.start_time), Xe = t.timeToX(se.end_time) - Me;
830
- k.set(F, { x: Me, y: Se, width: Xe, height: te.itemHeight });
833
+ const ve = t.groupIndexToY(U) + J.stackLevel * t.lineHeight + (t.lineHeight - J.itemHeight) / 2, be = t.timeToX(ee.start_time), Pe = t.timeToX(ee.end_time) - be;
834
+ w.set(_, { x: be, y: ve, width: Pe, height: J.itemHeight });
831
835
  }
832
836
  }
833
- this.drawDependencies(e, f, k, p, b);
837
+ this.drawDependencies(e, f, w, h, v);
834
838
  }
835
839
  }
836
- drawDependencies(e, t, n, o, d) {
837
- for (const s of t) {
838
- const c = n.get(s.fromItemId), a = n.get(s.toItemId);
839
- if (!c || !a)
840
+ drawDependencies(e, t, n, r, d) {
841
+ for (const o of t) {
842
+ const c = n.get(o.fromItemId), l = n.get(o.toItemId);
843
+ if (!c || !l)
840
844
  continue;
841
- const b = o === s.fromItemId || o === s.toItemId;
842
- e.strokeStyle = b ? d.primary : s.color ?? "#94A3B8", e.lineWidth = b ? 2 : 1.5, e.setLineDash([]);
843
- const H = c.x + c.width, p = c.y + c.height / 2, f = a.x, w = a.y + a.height / 2, T = Math.abs(f - H), h = Math.max(T * 0.4, 30);
844
- e.beginPath(), e.moveTo(H, p), e.bezierCurveTo(H + h, p, f - h, w, f, w), e.stroke();
845
+ const v = r === o.fromItemId || r === o.toItemId;
846
+ e.strokeStyle = v ? d.primary : o.color ?? "#94A3B8", e.lineWidth = v ? 2 : 1.5, e.setLineDash([]);
847
+ const C = c.x + c.width, h = c.y + c.height / 2, f = l.x, M = l.y + l.height / 2, T = Math.abs(f - C), m = Math.max(T * 0.4, 30);
848
+ e.beginPath(), e.moveTo(C, h), e.bezierCurveTo(C + m, h, f - m, M, f, M), e.stroke();
845
849
  const E = 6;
846
- e.fillStyle = e.strokeStyle, e.beginPath(), e.moveTo(f, w), e.lineTo(f - E, w - E / 2), e.lineTo(f - E, w + E / 2), e.closePath(), e.fill();
850
+ e.fillStyle = e.strokeStyle, e.beginPath(), e.moveTo(f, M), e.lineTo(f - E, M - E / 2), e.lineTo(f - E, M + E / 2), e.closePath(), e.fill();
847
851
  }
848
852
  }
849
853
  }
850
- class zi {
851
- draw(e, t, n, o) {
852
- const { cursorX: d, snapX: s, markers: c, interaction: a } = o;
854
+ class Ui {
855
+ draw(e, t, n, r) {
856
+ const { cursorX: d, snapX: o, markers: c, interaction: l } = r;
853
857
  if (c)
854
- for (const b of c) {
855
- const H = t.timeToX(b.date);
856
- if (e.fillStyle = b.color, e.fillRect(H - b.width / 2, 0, b.width, t.canvasHeight), b.label) {
858
+ for (const v of c) {
859
+ const C = t.timeToX(v.date);
860
+ if (e.fillStyle = v.color, e.fillRect(C - v.width / 2, 0, v.width, t.canvasHeight), v.label) {
857
861
  e.save(), e.font = '500 10px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';
858
- const p = e.measureText(b.label).width, f = 8, w = 200, T = Math.min(p + f * 2, w), h = 20, E = H - T / 2, P = 4;
859
- e.fillStyle = b.color, e.beginPath(), e.roundRect(E, P, T, h, 3), e.fill(), e.fillStyle = "#FFFFFF", e.textBaseline = "middle";
860
- const W = w - f * 2, y = p > W ? b.label.slice(0, Math.floor(b.label.length * W / p)) + "…" : b.label;
861
- e.fillText(y, E + f, P + h / 2), e.restore();
862
+ const h = e.measureText(v.label).width, f = 8, M = 200, T = Math.min(h + f * 2, M), m = 20, E = C - T / 2, P = 4;
863
+ e.fillStyle = v.color, e.beginPath(), e.roundRect(E, P, T, m, 3), e.fill(), e.fillStyle = "#FFFFFF", e.textBaseline = "middle";
864
+ const Y = M - f * 2, y = h > Y ? v.label.slice(0, Math.floor(v.label.length * Y / h)) + "…" : v.label;
865
+ e.fillText(y, E + f, P + m / 2), e.restore();
862
866
  }
863
867
  }
864
- if (d != null && (e.strokeStyle = n.marker.cursor, e.lineWidth = 1, e.beginPath(), e.moveTo(d, 0), e.lineTo(d, t.canvasHeight), e.stroke()), s != null && (e.strokeStyle = n.primary, e.lineWidth = 1, e.setLineDash([4, 4]), e.beginPath(), e.moveTo(s, 0), e.lineTo(s, t.canvasHeight), e.stroke(), e.setLineDash([])), a) {
865
- a.groupChanged && a.targetGroupY !== void 0 && (e.fillStyle = "rgba(59, 130, 246, 0.08)", e.fillRect(0, a.targetGroupY, t.canvasWidth, t.lineHeight)), e.save(), e.globalAlpha = 0.5;
866
- const b = ri(e, a.bounds);
867
- a.renderer(e, a.item, a.bounds, { selected: !1, hovered: !1, dragging: !0, filtered: !0 }, b), e.restore();
868
+ if (d != null && (e.strokeStyle = n.marker.cursor, e.lineWidth = 1, e.beginPath(), e.moveTo(d, 0), e.lineTo(d, t.canvasHeight), e.stroke()), o != null && (e.strokeStyle = n.primary, e.lineWidth = 1, e.setLineDash([4, 4]), e.beginPath(), e.moveTo(o, 0), e.lineTo(o, t.canvasHeight), e.stroke(), e.setLineDash([])), l) {
869
+ l.groupChanged && l.targetGroupY !== void 0 && (e.fillStyle = "rgba(59, 130, 246, 0.08)", e.fillRect(0, l.targetGroupY, t.canvasWidth, t.lineHeight)), e.save(), e.globalAlpha = 0.5;
870
+ const v = si(e, l.bounds);
871
+ l.renderer(e, l.item, l.bounds, { selected: !1, hovered: !1, dragging: !0, filtered: !0 }, v), e.restore();
868
872
  }
869
873
  }
870
874
  }
871
- const Vt = 120;
872
- function xi(i) {
875
+ const Kt = 120;
876
+ function Zi(i) {
873
877
  let e = i.deltaY || i.deltaX;
874
- return i.deltaMode === 1 ? e *= 15 : i.deltaMode === 2 && (e *= 800), Math.max(-Vt, Math.min(Vt, e));
878
+ return i.deltaMode === 1 ? e *= 15 : i.deltaMode === 2 && (e *= 800), Math.max(-Kt, Math.min(Kt, e));
875
879
  }
876
- class Ai {
877
- constructor(e, t, n, o, d) {
880
+ class Vi {
881
+ constructor(e, t, n, r, d) {
878
882
  Object.defineProperty(this, "onZoom", {
879
883
  enumerable: !0,
880
884
  configurable: !0,
@@ -900,21 +904,21 @@ class Ai {
900
904
  configurable: !0,
901
905
  writable: !0,
902
906
  value: void 0
903
- }), this.onZoom = e, this.visibleTimeStart = t, this.visibleTimeEnd = n, this.minZoom = o, this.maxZoom = d;
907
+ }), this.onZoom = e, this.visibleTimeStart = t, this.visibleTimeEnd = n, this.minZoom = r, this.maxZoom = d;
904
908
  }
905
909
  updateBounds(e, t) {
906
910
  this.visibleTimeStart = e, this.visibleTimeEnd = t;
907
911
  }
908
912
  handleWheelZoom(e, t) {
909
- const n = xi(e), o = e.ctrlKey ? 10 : e.metaKey ? 3 : 1, d = n > 0 ? 1 + o * n / 500 : 1 / (1 + o * -n / 500), s = this.visibleTimeEnd - this.visibleTimeStart;
910
- let c = Math.round(s * d);
913
+ const n = Zi(e), r = e.ctrlKey ? 10 : e.metaKey ? 3 : 1, d = n > 0 ? 1 + r * n / 500 : 1 / (1 + r * -n / 500), o = this.visibleTimeEnd - this.visibleTimeStart;
914
+ let c = Math.round(o * d);
911
915
  c = Math.max(this.minZoom, Math.min(this.maxZoom, c));
912
- const a = Math.round(this.visibleTimeStart + (s - c) * t), b = a + c;
913
- this.onZoom(a, b);
916
+ const l = Math.round(this.visibleTimeStart + (o - c) * t), v = l + c;
917
+ this.onZoom(l, v);
914
918
  }
915
919
  }
916
- const ji = 4;
917
- class Gi {
920
+ const qi = 4;
921
+ class Ki {
918
922
  constructor(e) {
919
923
  Object.defineProperty(this, "state", {
920
924
  enumerable: !0,
@@ -933,21 +937,21 @@ class Gi {
933
937
  value: !1
934
938
  }), this.dragSnap = e;
935
939
  }
936
- startInteraction(e, t, n, o) {
940
+ startInteraction(e, t, n, r) {
937
941
  this.state = {
938
942
  item: e,
939
943
  mode: t,
940
944
  startX: n,
941
- startY: o,
945
+ startY: r,
942
946
  currentX: n,
943
- currentY: o,
947
+ currentY: r,
944
948
  deltaX: 0,
945
949
  originalGroup: e.group,
946
950
  currentGroup: e.group
947
951
  }, this.activated = !1;
948
952
  }
949
953
  update(e, t) {
950
- this.state && (this.state.currentX = e, this.state.currentY = t, this.state.deltaX = e - this.state.startX, !this.activated && Math.abs(this.state.deltaX) >= ji && (this.activated = !0));
954
+ this.state && (this.state.currentX = e, this.state.currentY = t, this.state.deltaX = e - this.state.startX, !this.activated && Math.abs(this.state.deltaX) >= qi && (this.activated = !0));
951
955
  }
952
956
  setCurrentGroup(e) {
953
957
  this.state && (this.state.currentGroup = e);
@@ -955,14 +959,14 @@ class Gi {
955
959
  endMove(e) {
956
960
  if (!this.state)
957
961
  return null;
958
- const t = this.state.deltaX / e, n = this.state.item.start_time + t, o = Math.round(n / this.dragSnap) * this.dragSnap, d = this.state.currentGroup;
959
- return this.state = null, this.activated = !1, { newStartTime: o, newGroupId: d };
962
+ const t = this.state.deltaX / e, n = this.state.item.start_time + t, r = Math.round(n / this.dragSnap) * this.dragSnap, d = this.state.currentGroup;
963
+ return this.state = null, this.activated = !1, { newStartTime: r, newGroupId: d };
960
964
  }
961
965
  endResize(e) {
962
966
  if (!this.state)
963
967
  return null;
964
- const t = this.state.deltaX / e, n = this.state.mode === "resize-left" ? "left" : "right", d = (n === "left" ? this.state.item.start_time : this.state.item.end_time) + t, s = Math.round(d / this.dragSnap) * this.dragSnap;
965
- return this.state = null, this.activated = !1, { newTime: s, edge: n };
968
+ const t = this.state.deltaX / e, n = this.state.mode === "resize-left" ? "left" : "right", d = (n === "left" ? this.state.item.start_time : this.state.item.end_time) + t, o = Math.round(d / this.dragSnap) * this.dragSnap;
969
+ return this.state = null, this.activated = !1, { newTime: o, edge: n };
966
970
  }
967
971
  cancel() {
968
972
  this.state = null, this.activated = !1;
@@ -981,85 +985,106 @@ class Gi {
981
985
  return this.state !== null;
982
986
  }
983
987
  }
984
- function wt(i, e, t) {
988
+ function kt(i, e, t) {
985
989
  const n = [];
986
- for (const o of i)
987
- o.id !== e && (n.push(t(o.start_time)), n.push(t(o.end_time)));
990
+ for (const r of i)
991
+ r.id !== e && (n.push(t(r.start_time)), n.push(t(r.end_time)));
988
992
  return n;
989
993
  }
990
- function st(i, e, t, n, o) {
994
+ function st(i, e, t, n, r) {
991
995
  if (e.length === 0)
992
996
  return null;
993
- let d = e[0], s = Math.abs(i - d);
997
+ let d = e[0], o = Math.abs(i - d);
994
998
  for (let c = 1; c < e.length; c++) {
995
- const a = Math.abs(i - e[c]);
996
- a < s && (s = a, d = e[c]);
999
+ const l = Math.abs(i - e[c]);
1000
+ l < o && (o = l, d = e[c]);
997
1001
  }
998
- return s <= t ? d : null;
1002
+ return o <= t ? d : null;
999
1003
  }
1000
- var oi = { exports: {} };
1004
+ function li(i, e, t) {
1005
+ const n = t.canvasWidth / (e.visibleTimeEnd - e.visibleTimeStart), r = i.deltaX / n, d = i.item.start_time + r, o = (e.visibleTimeEnd - e.visibleTimeStart) * 0.1, c = t.intervalTree.query(e.visibleTimeStart - o, e.visibleTimeEnd + o), l = kt(c, i.item.id, (h) => e.timeToX(h)), v = st(e.timeToX(d), l, 8, n, t.dragSnap);
1006
+ if (v !== null)
1007
+ return e.xToTime(v);
1008
+ const C = st(e.timeToX(i.item.end_time + r), l, 8, n, t.dragSnap);
1009
+ return C !== null ? e.xToTime(C) - (i.item.end_time - i.item.start_time) : Math.round(d / t.dragSnap) * t.dragSnap;
1010
+ }
1011
+ function ai(i, e, t) {
1012
+ const n = t.canvasWidth / (e.visibleTimeEnd - e.visibleTimeStart), r = i.deltaX / n, d = i.mode === "resize-left" ? "left" : "right", o = (d === "left" ? i.item.start_time : i.item.end_time) + r, c = (e.visibleTimeEnd - e.visibleTimeStart) * 0.1, l = t.intervalTree.query(e.visibleTimeStart - c, e.visibleTimeEnd + c), v = kt(l, i.item.id, (M) => e.timeToX(M)), C = st(e.timeToX(o), v, 8, n, t.dragSnap);
1013
+ let h = C !== null ? e.xToTime(C) : Math.round(o / t.dragSnap) * t.dragSnap;
1014
+ const f = t.hierarchyEngine.getResizeConstraint(i.item.id, d);
1015
+ return d === "left" && h > f.max ? h = f.max : d === "right" && h < f.min && (h = f.min), { edge: d, time: h };
1016
+ }
1017
+ function Ji(i, e, t, n) {
1018
+ if (i.mode === "move") {
1019
+ const l = li(i, e, t), v = i.item.end_time - i.item.start_time;
1020
+ return { itemId: i.item.id, mode: "move", time: l, startTime: l, endTime: l + v, pointerX: n.x, pointerY: n.y };
1021
+ }
1022
+ const { edge: r, time: d } = ai(i, e, t), o = r === "left" ? d : i.item.start_time, c = r === "right" ? d : i.item.end_time;
1023
+ return { itemId: i.item.id, mode: i.mode, edge: r, time: d, startTime: o, endTime: c, pointerX: n.x, pointerY: n.y };
1024
+ }
1025
+ var ui = { exports: {} };
1001
1026
  (function(i, e) {
1002
1027
  (function(t, n) {
1003
1028
  i.exports = n();
1004
1029
  })(lt, function() {
1005
1030
  var t = "day";
1006
- return function(n, o, d) {
1007
- var s = function(b) {
1008
- return b.add(4 - b.isoWeekday(), t);
1009
- }, c = o.prototype;
1031
+ return function(n, r, d) {
1032
+ var o = function(v) {
1033
+ return v.add(4 - v.isoWeekday(), t);
1034
+ }, c = r.prototype;
1010
1035
  c.isoWeekYear = function() {
1011
- return s(this).year();
1012
- }, c.isoWeek = function(b) {
1013
- if (!this.$utils().u(b)) return this.add(7 * (b - this.isoWeek()), t);
1014
- var H, p, f, w, T = s(this), h = (H = this.isoWeekYear(), p = this.$u, f = (p ? d.utc : d)().year(H).startOf("year"), w = 4 - f.isoWeekday(), f.isoWeekday() > 4 && (w += 7), f.add(w, t));
1015
- return T.diff(h, "week") + 1;
1016
- }, c.isoWeekday = function(b) {
1017
- return this.$utils().u(b) ? this.day() || 7 : this.day(this.day() % 7 ? b : b - 7);
1036
+ return o(this).year();
1037
+ }, c.isoWeek = function(v) {
1038
+ if (!this.$utils().u(v)) return this.add(7 * (v - this.isoWeek()), t);
1039
+ var C, h, f, M, T = o(this), m = (C = this.isoWeekYear(), h = this.$u, f = (h ? d.utc : d)().year(C).startOf("year"), M = 4 - f.isoWeekday(), f.isoWeekday() > 4 && (M += 7), f.add(M, t));
1040
+ return T.diff(m, "week") + 1;
1041
+ }, c.isoWeekday = function(v) {
1042
+ return this.$utils().u(v) ? this.day() || 7 : this.day(this.day() % 7 ? v : v - 7);
1018
1043
  };
1019
- var a = c.startOf;
1020
- c.startOf = function(b, H) {
1021
- var p = this.$utils(), f = !!p.u(H) || H;
1022
- return p.p(b) === "isoweek" ? f ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : a.bind(this)(b, H);
1044
+ var l = c.startOf;
1045
+ c.startOf = function(v, C) {
1046
+ var h = this.$utils(), f = !!h.u(C) || C;
1047
+ return h.p(v) === "isoweek" ? f ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : l.bind(this)(v, C);
1023
1048
  };
1024
1049
  };
1025
1050
  });
1026
- })(oi);
1027
- var Ni = oi.exports;
1028
- const Zi = /* @__PURE__ */ at(Ni), qt = 200;
1029
- function Kt({ groups: i, width: e, lineHeight: t, groupHeights: n, scrollTop: o, canvasHeight: d, theme: s, groupRenderer: c, onScroll: a }) {
1051
+ })(ui);
1052
+ var Qi = ui.exports;
1053
+ const en = /* @__PURE__ */ at(Qi), Jt = 200;
1054
+ function Qt({ groups: i, width: e, lineHeight: t, groupHeights: n, scrollTop: r, canvasHeight: d, theme: o, groupRenderer: c, onScroll: l }) {
1030
1055
  var y;
1031
- const b = U(null), H = U(!1), p = ee(() => {
1032
- const D = new Array(i.length + 1);
1033
- D[0] = 0;
1034
- for (let k = 0; k < i.length; k++)
1035
- D[k + 1] = D[k] + ((n == null ? void 0 : n[k]) ?? t);
1036
- return D;
1037
- }, [i.length, n, t]), f = p[i.length] ?? 0, w = d, T = oe((D) => {
1038
- if (i.length === 0 || D <= 0)
1056
+ const v = A(null), C = A(!1), h = K(() => {
1057
+ const H = new Array(i.length + 1);
1058
+ H[0] = 0;
1059
+ for (let w = 0; w < i.length; w++)
1060
+ H[w + 1] = H[w] + ((n == null ? void 0 : n[w]) ?? t);
1061
+ return H;
1062
+ }, [i.length, n, t]), f = h[i.length] ?? 0, M = d, T = Q((H) => {
1063
+ if (i.length === 0 || H <= 0)
1039
1064
  return 0;
1040
- if (D >= f)
1065
+ if (H >= f)
1041
1066
  return i.length - 1;
1042
- let k = 0, $ = i.length - 1;
1043
- for (; k < $; ) {
1044
- const B = k + $ >>> 1;
1045
- p[B + 1] > D ? $ = B : k = B + 1;
1067
+ let w = 0, $ = i.length - 1;
1068
+ for (; w < $; ) {
1069
+ const B = w + $ >>> 1;
1070
+ h[B + 1] > H ? $ = B : w = B + 1;
1046
1071
  }
1047
- return k;
1048
- }, [i.length, p, f]), h = T(o - qt), E = T(o + d + qt), P = oe((D) => {
1049
- H.current || a(D.currentTarget.scrollTop);
1050
- }, [a]);
1051
- ce(() => {
1052
- b.current && (H.current = !0, b.current.scrollTop = o, requestAnimationFrame(() => {
1053
- H.current = !1;
1072
+ return w;
1073
+ }, [i.length, h, f]), m = T(r - Jt), E = T(r + d + Jt), P = Q((H) => {
1074
+ C.current || l(H.currentTarget.scrollTop);
1075
+ }, [l]);
1076
+ le(() => {
1077
+ v.current && (C.current = !0, v.current.scrollTop = r, requestAnimationFrame(() => {
1078
+ C.current = !1;
1054
1079
  }));
1055
- }, [o]);
1056
- const W = [];
1057
- for (let D = h; D <= E; D++) {
1058
- const k = i[D];
1059
- if (!k)
1080
+ }, [r]);
1081
+ const Y = [];
1082
+ for (let H = m; H <= E; H++) {
1083
+ const w = i[H];
1084
+ if (!w)
1060
1085
  continue;
1061
- const $ = p[D], B = p[D + 1] - $;
1062
- W.push(le("div", { style: {
1086
+ const $ = h[H], B = h[H + 1] - $;
1087
+ Y.push(ne("div", { style: {
1063
1088
  position: "absolute",
1064
1089
  top: $,
1065
1090
  height: B,
@@ -1067,35 +1092,35 @@ function Kt({ groups: i, width: e, lineHeight: t, groupHeights: n, scrollTop: o,
1067
1092
  overflow: "hidden",
1068
1093
  display: "flex",
1069
1094
  alignItems: "stretch",
1070
- borderBottom: `1px solid ${((y = s.grid) == null ? void 0 : y.line) ?? "#E5E5E5"}`,
1095
+ borderBottom: `1px solid ${((y = o.grid) == null ? void 0 : y.line) ?? "#E5E5E5"}`,
1071
1096
  boxSizing: "border-box"
1072
- }, children: c(k) }, k.id));
1097
+ }, children: c(w) }, w.id));
1073
1098
  }
1074
- return le("div", { ref: b, onScroll: P, style: {
1099
+ return ne("div", { ref: v, onScroll: P, style: {
1075
1100
  width: e,
1076
- height: w,
1101
+ height: M,
1077
1102
  overflowY: f > d ? "auto" : "hidden",
1078
1103
  overflowX: "hidden",
1079
1104
  position: "relative",
1080
- borderRight: `1px solid ${s.sidebar.border}`,
1081
- backgroundColor: s.sidebar.bg
1082
- }, children: le("div", { style: { height: f, position: "relative" }, children: W }) });
1105
+ borderRight: `1px solid ${o.sidebar.border}`,
1106
+ backgroundColor: o.sidebar.bg
1107
+ }, children: ne("div", { style: { height: f, position: "relative" }, children: Y }) });
1083
1108
  }
1084
- function Ui(i) {
1109
+ function tn(i) {
1085
1110
  return null;
1086
1111
  }
1087
- Ui.displayName = "TodayMarker";
1088
- function Jt(i) {
1112
+ tn.displayName = "TodayMarker";
1113
+ function ei(i) {
1089
1114
  return { date: Math.floor(Date.now() / 6e4) * 6e4, color: i.color ?? "#FD7171", width: i.width ?? 6, label: i.label };
1090
1115
  }
1091
- function Vi(i) {
1116
+ function nn(i) {
1092
1117
  return i.interval ?? 1e4;
1093
1118
  }
1094
- function qi(i) {
1119
+ function rn(i) {
1095
1120
  return null;
1096
1121
  }
1097
- qi.displayName = "CustomMarker";
1098
- function Qt(i) {
1122
+ rn.displayName = "CustomMarker";
1123
+ function ti(i) {
1099
1124
  return {
1100
1125
  date: i.date,
1101
1126
  color: i.color ?? "#3B82F6",
@@ -1103,583 +1128,569 @@ function Qt(i) {
1103
1128
  label: i.label
1104
1129
  };
1105
1130
  }
1106
- We.extend(Zi);
1107
- function Ki(i) {
1131
+ We.extend(en);
1132
+ function on(i) {
1108
1133
  return i ? {
1109
- ...He,
1134
+ ...Ce,
1110
1135
  ...i,
1111
- status: { ...He.status, ...i.status },
1112
- grid: { ...He.grid, ...i.grid },
1113
- item: { ...He.item, ...i.item },
1114
- marker: { ...He.marker, ...i.marker },
1115
- sidebar: { ...He.sidebar, ...i.sidebar },
1116
- header: { ...He.header, ...i.header }
1117
- } : He;
1136
+ status: { ...Ce.status, ...i.status },
1137
+ grid: { ...Ce.grid, ...i.grid },
1138
+ item: { ...Ce.item, ...i.item },
1139
+ marker: { ...Ce.marker, ...i.marker },
1140
+ sidebar: { ...Ce.sidebar, ...i.sidebar },
1141
+ header: { ...Ce.header, ...i.header }
1142
+ } : Ce;
1118
1143
  }
1119
- const ei = 32, fn = me.memo(Hi(function(e, t) {
1120
- const { groups: n, items: o, defaultTimeStart: d, defaultTimeEnd: s, sidebarWidth: c, lineHeight: a, itemHeightRatio: b, stackItems: H, canMove: p, canChangeGroup: f, canResize: w, dragSnap: T, minZoom: h, maxZoom: E, theme: P, dayStyle: W, rowStyle: y, showCursorLine: D, itemRenderer: k, groupRenderer: $, sidebarGroupRenderer: B, dependencies: I, highlights: A, onItemClick: F, onItemDoubleClick: se, onItemContextMenu: K, onItemMove: te, onItemResize: be, moveResizeValidator: Se, onItemHover: Me, onCanvasDoubleClick: Xe, onCanvasContextMenu: qe, onTimeChange: De, onZoom: kt, selected: Ct = [], rightSidebarWidth: ut, rightSidebarGroupRenderer: Et, onReady: Ke, maxHeight: Be, timezone: Je, devBadge: li, children: ke } = e, we = ee(() => Ki(P), [P]), Ht = oe((r, l) => {
1121
- for (let m = 0; m < l.length; m++)
1122
- if (l[m].id === r)
1123
- return m;
1144
+ const ii = 32, yn = ce.memo(Oi(function(e, t) {
1145
+ const { groups: n, items: r, defaultTimeStart: d, defaultTimeEnd: o, sidebarWidth: c, lineHeight: l, itemHeightRatio: v, stackItems: C, canMove: h, canChangeGroup: f, canResize: M, dragSnap: T, minZoom: m, maxZoom: E, theme: P, dayStyle: Y, rowStyle: y, showCursorLine: H, itemRenderer: w, groupRenderer: $, sidebarGroupRenderer: B, dependencies: I, highlights: x, onItemClick: _, onItemDoubleClick: ee, onItemContextMenu: U, onItemMove: J, onItemResize: he, moveResizeValidator: ve, onItemHover: be, onInteractionUpdate: Pe, onCanvasDoubleClick: qe, onCanvasContextMenu: Ee, onTimeChange: Ct, onZoom: Et, selected: Ht = [], rightSidebarWidth: ut, rightSidebarGroupRenderer: It, onReady: Ke, maxHeight: Be, timezone: Je, devBadge: di, children: Me } = e, ye = K(() => on(P), [P]), Dt = Q((s, a) => {
1146
+ for (let g = 0; g < a.length; g++)
1147
+ if (a[g].id === s)
1148
+ return g;
1124
1149
  return 0;
1125
- }, []), ai = Ct.join(","), ct = ee(() => Ct, [ai]), Dt = U(null), It = U(null), Rt = U(null), Le = U(null), Ot = U(null), Pt = U(null), [ui, ci] = Ze(800), [di, fi] = Ze(null);
1126
- ce(() => {
1127
- const r = Ot.current;
1128
- if (!r)
1150
+ }, []), fi = Ht.join(","), ct = K(() => Ht, [fi]), Rt = A(null), Ot = A(null), Pt = A(null), ze = A(null), Xt = A(null), $t = A(null), [hi, mi] = Ue(800), [gi, pi] = Ue(null);
1151
+ le(() => {
1152
+ const s = Xt.current;
1153
+ if (!s)
1129
1154
  return;
1130
- const l = new ResizeObserver((m) => {
1131
- const g = m[0];
1132
- g && ci(g.contentRect.width);
1155
+ const a = new ResizeObserver((g) => {
1156
+ const p = g[0];
1157
+ p && mi(p.contentRect.width);
1133
1158
  });
1134
- return l.observe(r), () => l.disconnect();
1135
- }, []), ce(() => {
1136
- const r = Pt.current;
1137
- if (!r || !Be)
1159
+ return a.observe(s), () => a.disconnect();
1160
+ }, []), le(() => {
1161
+ const s = $t.current;
1162
+ if (!s || !Be)
1138
1163
  return;
1139
- const l = new ResizeObserver((m) => {
1140
- const g = m[0];
1141
- g && fi(g.contentRect.height);
1164
+ const a = new ResizeObserver((g) => {
1165
+ const p = g[0];
1166
+ p && pi(p.contentRect.height);
1142
1167
  });
1143
- return l.observe(r), () => l.disconnect();
1168
+ return a.observe(s), () => a.disconnect();
1144
1169
  }, [Be]);
1145
- const Ce = Math.max(0, ui - c - (ut ?? 0)), Ie = ee(() => {
1146
- const r = new Pi();
1147
- return r.rebuild(o), r;
1148
- }, [o]), dt = ee(() => {
1149
- const r = new Ri();
1150
- return r.buildFromItems(o, (l) => Ie.getEffectiveSpan(l.id).start, (l) => Ie.getEffectiveSpan(l.id).end), r;
1151
- }, [o, Ie]), ze = ee(() => {
1152
- const r = new Oi(a, b);
1153
- return r.computeLayout(o, H, Ie), r;
1154
- }, [o, a, b, H, Ie]), Re = ee(() => n.map((r) => ze.getGroupHeight(r.id)), [n, ze]), Qe = ee(() => Re.reduce((r, l) => r + l, 0), [Re]), Xt = typeof Be == "number" ? Be : di, ye = Xt ? Math.min(Qe, Xt) : Qe, L = U(new yt({
1170
+ const we = Math.max(0, hi - c - (ut ?? 0)), He = K(() => {
1171
+ const s = new Yi();
1172
+ return s.rebuild(r), s;
1173
+ }, [r]), dt = K(() => {
1174
+ const s = new $i();
1175
+ return s.buildFromItems(r, (a) => He.getEffectiveSpan(a.id).start, (a) => He.getEffectiveSpan(a.id).end), s;
1176
+ }, [r, He]), Le = K(() => {
1177
+ const s = new _i(l, v);
1178
+ return s.computeLayout(r, C, He), s;
1179
+ }, [r, l, v, C, He]), Ie = K(() => n.map((s) => Le.getGroupHeight(s.id)), [n, Le]), Qe = K(() => Ie.reduce((s, a) => s + a, 0), [Ie]), _t = typeof Be == "number" ? Be : gi, me = _t ? Math.min(Qe, _t) : Qe, L = A(new Tt({
1155
1180
  visibleTimeStart: e.visibleTimeStart ?? d,
1156
- visibleTimeEnd: e.visibleTimeEnd ?? s,
1157
- canvasWidth: Ce,
1158
- canvasHeight: ye,
1181
+ visibleTimeEnd: e.visibleTimeEnd ?? o,
1182
+ canvasWidth: we,
1183
+ canvasHeight: me,
1159
1184
  sidebarWidth: c,
1160
- lineHeight: a,
1185
+ lineHeight: l,
1161
1186
  groupCount: n.length,
1162
1187
  buffer: e.buffer ?? 3,
1163
1188
  scrollTop: 0,
1164
- groupHeights: Re
1165
- })), ft = U(null), xe = U(void 0), ve = U(null), Oe = U(!1), $t = 4, [Ft, hi] = Ze(e.visibleTimeStart ?? d), [Yt, mi] = Ze(e.visibleTimeEnd ?? s), [_t, et] = Ze(0), Ae = U(null), $e = oe(() => {
1166
- const r = L.current;
1167
- hi(r.visibleTimeStart), mi(r.visibleTimeEnd), et(r.scrollTop), Ae.current = null;
1168
- }, []), ht = oe(() => {
1169
- Ae.current === null && (Ae.current = setTimeout($e, ei));
1170
- }, [$e]);
1171
- ce(() => () => {
1189
+ groupHeights: Ie
1190
+ })), ft = A(null), xe = A(void 0), Yt = A({ x: 0, y: 0 }), ht = A(!1), de = A(null), De = A(!1), Ft = 4, [Wt, vi] = Ue(e.visibleTimeStart ?? d), [Bt, bi] = Ue(e.visibleTimeEnd ?? o), [zt, et] = Ue(0), Ae = A(null), Xe = Q(() => {
1191
+ const s = L.current;
1192
+ vi(s.visibleTimeStart), bi(s.visibleTimeEnd), et(s.scrollTop), Ae.current = null;
1193
+ }, []), mt = Q(() => {
1194
+ Ae.current === null && (Ae.current = setTimeout(Xe, ii));
1195
+ }, [Xe]);
1196
+ le(() => () => {
1172
1197
  Ae.current !== null && clearTimeout(Ae.current);
1173
1198
  }, []);
1174
- const Wt = ee(() => e.summaryRenderer ? e.summaryRenderer : (r, l, m, g, u) => {
1175
- Xi(r, l, m, g, u, we);
1176
- }, [e.summaryRenderer, we]), Fe = ee(() => new Bi(), []), Ye = ee(() => new Li(), []), _e = ee(() => new zi(), []), ie = ee(() => new Gi(T), [T]), tt = ee(() => {
1177
- const r = [];
1178
- return me.Children.forEach(ke, (l) => {
1179
- var g;
1180
- if (!me.isValidElement(l))
1199
+ const Lt = K(() => e.summaryRenderer ? e.summaryRenderer : (s, a, g, p, u) => {
1200
+ Fi(s, a, g, p, u, ye);
1201
+ }, [e.summaryRenderer, ye]), $e = K(() => new Gi(), []), _e = K(() => new Ni(), []), Ye = K(() => new Ui(), []), ie = K(() => new Ki(T), [T]), tt = K(() => {
1202
+ const s = [];
1203
+ return ce.Children.forEach(Me, (a) => {
1204
+ var p;
1205
+ if (!ce.isValidElement(a))
1181
1206
  return;
1182
- const m = (g = l.type) == null ? void 0 : g.displayName;
1183
- m === "TodayMarker" ? r.push(Jt(l.props)) : m === "CustomMarker" && r.push(Qt(l.props));
1184
- }), r;
1185
- }, [ke]), it = ee(() => tt.map((r) => `${r.date}|${r.color}|${r.width}|${r.label ?? ""}`).join(";"), [tt]), je = U(tt);
1207
+ const g = (p = a.type) == null ? void 0 : p.displayName;
1208
+ g === "TodayMarker" ? s.push(ei(a.props)) : g === "CustomMarker" && s.push(ti(a.props));
1209
+ }), s;
1210
+ }, [Me]), it = K(() => tt.map((s) => `${s.date}|${s.color}|${s.width}|${s.label ?? ""}`).join(";"), [tt]), je = A(tt);
1186
1211
  je.current = tt;
1187
- const mt = ee(() => {
1188
- let r = 0;
1189
- return me.Children.forEach(ke, (l) => {
1190
- var g;
1191
- if (!me.isValidElement(l))
1212
+ const gt = K(() => {
1213
+ let s = 0;
1214
+ return ce.Children.forEach(Me, (a) => {
1215
+ var p;
1216
+ if (!ce.isValidElement(a))
1192
1217
  return;
1193
- ((g = l.type) == null ? void 0 : g.displayName) === "TodayMarker" && (r = Vi(l.props));
1194
- }), r;
1195
- }, [ke]), x = U({
1218
+ ((p = a.type) == null ? void 0 : p.displayName) === "TodayMarker" && (s = nn(a.props));
1219
+ }), s;
1220
+ }, [Me]), j = A({
1196
1221
  groups: n,
1197
- items: o,
1222
+ items: r,
1198
1223
  intervalTree: dt,
1199
- layoutEngine: ze,
1200
- itemRenderer: k,
1224
+ layoutEngine: Le,
1225
+ itemRenderer: w,
1201
1226
  groupRenderer: $,
1202
- theme: we,
1227
+ theme: ye,
1203
1228
  selected: ct,
1204
1229
  dependencies: I,
1205
- highlights: A,
1206
- dayStyle: W,
1230
+ highlights: x,
1231
+ dayStyle: Y,
1207
1232
  rowStyle: y,
1208
- showCursorLine: D,
1209
- canvasWidth: Ce,
1210
- canvasHeight: ye,
1211
- lineHeight: a,
1212
- itemHeightRatio: b,
1213
- onTimeChange: De,
1214
- onZoom: kt,
1215
- onItemHover: Me,
1216
- onItemClick: F,
1217
- onItemDoubleClick: se,
1218
- onItemContextMenu: K,
1219
- onItemMove: te,
1220
- onItemResize: be,
1221
- onCanvasDoubleClick: Xe,
1222
- onCanvasContextMenu: qe,
1223
- canMove: p,
1224
- canResize: w,
1233
+ showCursorLine: H,
1234
+ canvasWidth: we,
1235
+ canvasHeight: me,
1236
+ lineHeight: l,
1237
+ itemHeightRatio: v,
1238
+ onTimeChange: Ct,
1239
+ onZoom: Et,
1240
+ onItemHover: be,
1241
+ onItemClick: _,
1242
+ onItemDoubleClick: ee,
1243
+ onItemContextMenu: U,
1244
+ onItemMove: J,
1245
+ onItemResize: he,
1246
+ onInteractionUpdate: Pe,
1247
+ onCanvasDoubleClick: qe,
1248
+ onCanvasContextMenu: Ee,
1249
+ canMove: h,
1250
+ canResize: M,
1225
1251
  canChangeGroup: f,
1226
1252
  dragSnap: T,
1227
1253
  sidebarWidth: c,
1228
- moveResizeValidator: Se,
1229
- summaryRenderer: Wt,
1230
- hierarchyEngine: Ie,
1254
+ moveResizeValidator: ve,
1255
+ summaryRenderer: Lt,
1256
+ hierarchyEngine: He,
1231
1257
  timezone: Je
1232
1258
  });
1233
- x.current = {
1259
+ j.current = {
1234
1260
  groups: n,
1235
- items: o,
1261
+ items: r,
1236
1262
  intervalTree: dt,
1237
- layoutEngine: ze,
1238
- itemRenderer: k,
1263
+ layoutEngine: Le,
1264
+ itemRenderer: w,
1239
1265
  groupRenderer: $,
1240
- theme: we,
1266
+ theme: ye,
1241
1267
  selected: ct,
1242
1268
  dependencies: I,
1243
- highlights: A,
1244
- dayStyle: W,
1269
+ highlights: x,
1270
+ dayStyle: Y,
1245
1271
  rowStyle: y,
1246
- showCursorLine: D,
1247
- canvasWidth: Ce,
1248
- canvasHeight: ye,
1249
- lineHeight: a,
1250
- itemHeightRatio: b,
1251
- onTimeChange: De,
1252
- onZoom: kt,
1253
- onItemHover: Me,
1254
- onItemClick: F,
1255
- onItemDoubleClick: se,
1256
- onItemContextMenu: K,
1257
- onItemMove: te,
1258
- onItemResize: be,
1259
- onCanvasDoubleClick: Xe,
1260
- onCanvasContextMenu: qe,
1261
- canMove: p,
1262
- canResize: w,
1272
+ showCursorLine: H,
1273
+ canvasWidth: we,
1274
+ canvasHeight: me,
1275
+ lineHeight: l,
1276
+ itemHeightRatio: v,
1277
+ onTimeChange: Ct,
1278
+ onZoom: Et,
1279
+ onItemHover: be,
1280
+ onItemClick: _,
1281
+ onItemDoubleClick: ee,
1282
+ onItemContextMenu: U,
1283
+ onItemMove: J,
1284
+ onItemResize: he,
1285
+ onInteractionUpdate: Pe,
1286
+ onCanvasDoubleClick: qe,
1287
+ onCanvasContextMenu: Ee,
1288
+ canMove: h,
1289
+ canResize: M,
1263
1290
  canChangeGroup: f,
1264
1291
  dragSnap: T,
1265
1292
  sidebarWidth: c,
1266
- moveResizeValidator: Se,
1267
- summaryRenderer: Wt,
1268
- hierarchyEngine: Ie,
1293
+ moveResizeValidator: ve,
1294
+ summaryRenderer: Lt,
1295
+ hierarchyEngine: He,
1269
1296
  timezone: Je
1270
1297
  };
1271
- const gi = oe(() => {
1272
- const r = Dt.current;
1273
- if (!r)
1298
+ const yi = Q(() => {
1299
+ const s = Rt.current;
1300
+ if (!s)
1274
1301
  return;
1275
- const l = x.current, m = St(r, l.canvasWidth, l.canvasHeight);
1276
- Mt(m, r), Fe.draw(m, L.current, l.groups, l.theme, l.dayStyle, l.rowStyle, l.highlights, l.timezone);
1277
- }, [Fe]), pi = oe(() => {
1278
- const r = It.current;
1279
- if (!r)
1302
+ const a = j.current, g = Mt(s, a.canvasWidth, a.canvasHeight);
1303
+ wt(g, s), $e.draw(g, L.current, a.groups, a.theme, a.dayStyle, a.rowStyle, a.highlights, a.timezone);
1304
+ }, [$e]), Ti = Q(() => {
1305
+ const s = Ot.current;
1306
+ if (!s)
1280
1307
  return;
1281
- const l = x.current, m = St(r, l.canvasWidth, l.canvasHeight);
1282
- Mt(m, r), Ye.draw(m, L.current, l.groups, l.items, l.intervalTree, l.layoutEngine, l.itemRenderer, l.groupRenderer, l.theme, l.selected, xe.current, l.dependencies, l.summaryRenderer, l.hierarchyEngine);
1283
- }, [Ye]), Bt = oe((r, l, m) => {
1284
- const g = L.current, u = x.current, v = u.canvasWidth / (g.visibleTimeEnd - g.visibleTimeStart), M = l / v, R = [];
1285
- m === "move" ? (R.push(g.timeToX(r.start_time + M)), R.push(g.timeToX(r.end_time + M))) : m === "resize-left" ? R.push(g.timeToX(r.start_time + M)) : R.push(g.timeToX(r.end_time + M));
1286
- const X = (g.visibleTimeEnd - g.visibleTimeStart) * 0.1, Y = u.intervalTree.query(g.visibleTimeStart - X, g.visibleTimeEnd + X), N = wt(Y, r.id, (J) => g.timeToX(J));
1287
- for (const J of R) {
1288
- const q = st(J, N, 8, v, u.dragSnap);
1289
- if (q !== null)
1290
- return q;
1308
+ const a = j.current, g = Mt(s, a.canvasWidth, a.canvasHeight);
1309
+ wt(g, s), _e.draw(g, L.current, a.groups, a.items, a.intervalTree, a.layoutEngine, a.itemRenderer, a.groupRenderer, a.theme, a.selected, xe.current, a.dependencies, a.summaryRenderer, a.hierarchyEngine);
1310
+ }, [_e]), xt = Q((s, a, g) => {
1311
+ const p = L.current, u = j.current, b = u.canvasWidth / (p.visibleTimeEnd - p.visibleTimeStart), k = a / b, D = [];
1312
+ g === "move" ? (D.push(p.timeToX(s.start_time + k)), D.push(p.timeToX(s.end_time + k))) : g === "resize-left" ? D.push(p.timeToX(s.start_time + k)) : D.push(p.timeToX(s.end_time + k));
1313
+ const X = (p.visibleTimeEnd - p.visibleTimeStart) * 0.1, F = u.intervalTree.query(p.visibleTimeStart - X, p.visibleTimeEnd + X), W = kt(F, s.id, (V) => p.timeToX(V));
1314
+ for (const V of D) {
1315
+ const N = st(V, W, 8, b, u.dragSnap);
1316
+ if (N !== null)
1317
+ return N;
1291
1318
  }
1292
- const ne = m === "resize-right" ? r.end_time + M : r.start_time + M, z = Math.round(ne / u.dragSnap) * u.dragSnap;
1293
- return g.timeToX(z);
1294
- }, []), vi = oe(() => {
1295
- const r = Rt.current;
1296
- if (!r)
1319
+ const Z = g === "resize-right" ? s.end_time + k : s.start_time + k, oe = Math.round(Z / u.dragSnap) * u.dragSnap;
1320
+ return p.timeToX(oe);
1321
+ }, []), Si = Q(() => {
1322
+ const s = Pt.current;
1323
+ if (!s)
1297
1324
  return;
1298
- const l = x.current, m = St(r, l.canvasWidth, l.canvasHeight);
1299
- Mt(m, r);
1300
- const g = L.current, u = ie.getState();
1301
- let v = null;
1325
+ const a = j.current, g = Mt(s, a.canvasWidth, a.canvasHeight);
1326
+ wt(g, s);
1327
+ const p = L.current, u = ie.getState();
1328
+ let b = null;
1302
1329
  if (u) {
1303
- const M = g.timeToX(u.item.start_time), R = g.timeToX(u.item.end_time) - M;
1304
- let X, Y;
1305
- u.mode === "resize-left" ? (X = M + u.deltaX, Y = R - u.deltaX) : u.mode === "resize-right" ? (X = M, Y = R + u.deltaX) : (X = M + u.deltaX, Y = R);
1306
- const N = Ht(u.currentGroup, l.groups), ne = g.groupIndexToY(N), z = u.currentGroup !== u.originalGroup;
1307
- v = {
1330
+ const k = p.timeToX(u.item.start_time), D = p.timeToX(u.item.end_time) - k;
1331
+ let X, F;
1332
+ u.mode === "resize-left" ? (X = k + u.deltaX, F = D - u.deltaX) : u.mode === "resize-right" ? (X = k, F = D + u.deltaX) : (X = k + u.deltaX, F = D);
1333
+ const W = Dt(u.currentGroup, a.groups), Z = p.groupIndexToY(W), oe = u.currentGroup !== u.originalGroup;
1334
+ b = {
1308
1335
  item: u.item,
1309
1336
  mode: u.mode,
1310
- bounds: { x: X, y: ne + (l.lineHeight - l.lineHeight * l.itemHeightRatio) / 2, width: Y, height: l.lineHeight * l.itemHeightRatio },
1311
- renderer: l.itemRenderer,
1312
- targetGroupY: ne,
1313
- groupChanged: z
1337
+ bounds: { x: X, y: Z + (a.lineHeight - a.lineHeight * a.itemHeightRatio) / 2, width: F, height: a.lineHeight * a.itemHeightRatio },
1338
+ renderer: a.itemRenderer,
1339
+ targetGroupY: Z,
1340
+ groupChanged: oe
1314
1341
  };
1315
1342
  }
1316
- _e.draw(m, g, l.theme, {
1317
- cursorX: l.showCursorLine ? ft.current : null,
1318
- snapX: u ? Bt(u.item, u.deltaX, u.mode) : null,
1343
+ Ye.draw(g, p, a.theme, {
1344
+ cursorX: a.showCursorLine ? ft.current : null,
1345
+ snapX: u ? xt(u.item, u.deltaX, u.mode) : null,
1319
1346
  markers: je.current,
1320
- interaction: v
1321
- });
1322
- }, [_e, ie, Bt, Ht]), gt = U(null);
1323
- gt.current || (gt.current = new $i((r) => {
1324
- r.grid && gi(), r.items && pi(), r.overlay && vi();
1347
+ interaction: b
1348
+ }), a.onInteractionUpdate && (u ? (a.onInteractionUpdate(Ji(u, p, a, Yt.current)), ht.current = !0) : ht.current && (ht.current = !1, a.onInteractionUpdate(null)));
1349
+ }, [Ye, ie, xt, Dt]), pt = A(null);
1350
+ pt.current || (pt.current = new zi((s) => {
1351
+ s.grid && yi(), s.items && Ti(), s.overlay && Si();
1325
1352
  }));
1326
- const O = gt.current;
1327
- ce(() => () => O.dispose(), [O]), ce(() => {
1328
- if (!mt)
1353
+ const R = pt.current;
1354
+ le(() => () => R.dispose(), [R]), le(() => {
1355
+ if (!gt)
1329
1356
  return;
1330
- const r = setInterval(() => {
1331
- const l = [];
1332
- me.Children.forEach(ke, (m) => {
1357
+ const s = setInterval(() => {
1358
+ const a = [];
1359
+ ce.Children.forEach(Me, (g) => {
1333
1360
  var u;
1334
- if (!me.isValidElement(m))
1361
+ if (!ce.isValidElement(g))
1335
1362
  return;
1336
- const g = (u = m.type) == null ? void 0 : u.displayName;
1337
- g === "TodayMarker" ? l.push(Jt(m.props)) : g === "CustomMarker" && l.push(Qt(m.props));
1338
- }), je.current = l, O.markDirty("overlay");
1339
- }, mt);
1340
- return () => clearInterval(r);
1341
- }, [mt, ke, O]), ce(() => {
1363
+ const p = (u = g.type) == null ? void 0 : u.displayName;
1364
+ p === "TodayMarker" ? a.push(ei(g.props)) : p === "CustomMarker" && a.push(ti(g.props));
1365
+ }), je.current = a, R.markDirty("overlay");
1366
+ }, gt);
1367
+ return () => clearInterval(s);
1368
+ }, [gt, Me, R]), le(() => {
1342
1369
  L.current.update({
1343
- canvasWidth: Ce,
1344
- canvasHeight: ye,
1370
+ canvasWidth: we,
1371
+ canvasHeight: me,
1345
1372
  sidebarWidth: c,
1346
- lineHeight: a,
1373
+ lineHeight: l,
1347
1374
  groupCount: n.length,
1348
- groupHeights: Re
1349
- }), O.markAllDirty();
1350
- }, [Ce, ye, c, a, n.length, Re, O]), ce(() => {
1351
- O.markDirty("grid"), O.markDirty("items");
1352
- }, [o, n, ct, we, W, y, dt, ze, O]);
1353
- const nt = ee(() => {
1354
- var r;
1355
- return ((r = e.highlights) == null ? void 0 : r.map((l) => `${l.start}|${l.end}|${l.color}|${l.label ?? ""}|${l.opacity ?? ""}`).join(";")) ?? "";
1356
- }, [e.highlights]), Lt = U(nt);
1357
- ce(() => {
1358
- nt !== Lt.current && (Lt.current = nt, O.markDirty("grid"));
1359
- }, [nt, O]);
1360
- const zt = U(it);
1361
- ce(() => {
1362
- it !== zt.current && (zt.current = it, O.markDirty("overlay"));
1363
- }, [it, O]);
1364
- const xt = U(e.visibleTimeStart), At = U(e.visibleTimeEnd);
1365
- e.visibleTimeStart !== void 0 && e.visibleTimeStart !== xt.current && (xt.current = e.visibleTimeStart, L.current.update({ visibleTimeStart: e.visibleTimeStart }), O.markAllDirty()), e.visibleTimeEnd !== void 0 && e.visibleTimeEnd !== At.current && (At.current = e.visibleTimeEnd, L.current.update({ visibleTimeEnd: e.visibleTimeEnd }), O.markAllDirty());
1366
- const Ge = U(null), pt = oe((r) => {
1375
+ groupHeights: Ie
1376
+ }), R.markAllDirty();
1377
+ }, [we, me, c, l, n.length, Ie, R]), le(() => {
1378
+ R.markDirty("grid"), R.markDirty("items");
1379
+ }, [r, n, ct, ye, Y, y, dt, Le, R]);
1380
+ const nt = K(() => {
1381
+ var s;
1382
+ return ((s = e.highlights) == null ? void 0 : s.map((a) => `${a.start}|${a.end}|${a.color}|${a.label ?? ""}|${a.opacity ?? ""}`).join(";")) ?? "";
1383
+ }, [e.highlights]), At = A(nt);
1384
+ le(() => {
1385
+ nt !== At.current && (At.current = nt, R.markDirty("grid"));
1386
+ }, [nt, R]);
1387
+ const jt = A(it);
1388
+ le(() => {
1389
+ it !== jt.current && (jt.current = it, R.markDirty("overlay"));
1390
+ }, [it, R]);
1391
+ const Gt = A(e.visibleTimeStart), Nt = A(e.visibleTimeEnd);
1392
+ e.visibleTimeStart !== void 0 && e.visibleTimeStart !== Gt.current && (Gt.current = e.visibleTimeStart, L.current.update({ visibleTimeStart: e.visibleTimeStart }), R.markAllDirty()), e.visibleTimeEnd !== void 0 && e.visibleTimeEnd !== Nt.current && (Nt.current = e.visibleTimeEnd, L.current.update({ visibleTimeEnd: e.visibleTimeEnd }), R.markAllDirty());
1393
+ const Ge = A(null), vt = Q((s) => {
1367
1394
  Ge.current === null && (Ge.current = setTimeout(() => {
1368
- var g, u;
1395
+ var p, u;
1369
1396
  Ge.current = null;
1370
- const l = L.current, m = x.current;
1371
- r === "zoom" ? (g = m.onZoom) == null || g.call(m, l.visibleTimeStart, l.visibleTimeEnd) : (u = m.onTimeChange) == null || u.call(m, l.visibleTimeStart, l.visibleTimeEnd);
1372
- }, ei));
1397
+ const a = L.current, g = j.current;
1398
+ s === "zoom" ? (p = g.onZoom) == null || p.call(g, a.visibleTimeStart, a.visibleTimeEnd) : (u = g.onTimeChange) == null || u.call(g, a.visibleTimeStart, a.visibleTimeEnd);
1399
+ }, ii));
1373
1400
  }, []);
1374
- ce(() => () => {
1401
+ le(() => () => {
1375
1402
  Ge.current !== null && clearTimeout(Ge.current);
1376
1403
  }, []);
1377
- const rt = U(null), vt = ee(() => new Ai((r, l) => {
1378
- var m;
1379
- L.current.update({ visibleTimeStart: r, visibleTimeEnd: l }), (m = rt.current) == null || m.updateBounds(r, l), O.markAllDirty(), ht(), pt("zoom");
1380
- }, d, s, h, E), []);
1381
- rt.current = vt;
1382
- const ot = oe((r) => {
1383
- const l = L.current, m = l.getTotalHeight(), g = Math.max(0, m - l.canvasHeight), u = Math.max(0, Math.min(g, l.scrollTop + r));
1384
- u !== l.scrollTop && (l.update({ scrollTop: u }), O.markDirty("grid"), O.markDirty("items"), O.markDirty("overlay"), et(u));
1385
- }, [O]), Ne = oe((r) => {
1386
- var M, R, X;
1387
- const l = L.current, m = l.canvasWidth / (l.visibleTimeEnd - l.visibleTimeStart), g = r / m, u = l.visibleTimeStart + g, v = l.visibleTimeEnd + g;
1388
- l.update({ visibleTimeStart: u, visibleTimeEnd: v }), (M = rt.current) == null || M.updateBounds(u, v), O.markAllDirty(), Ii(() => $e()), (X = (R = x.current).onTimeChange) == null || X.call(R, u, v);
1389
- }, [O, $e]);
1390
- ce(() => {
1391
- const r = Le.current;
1392
- if (!r)
1404
+ const rt = A(null), bt = K(() => new Vi((s, a) => {
1405
+ var g;
1406
+ L.current.update({ visibleTimeStart: s, visibleTimeEnd: a }), (g = rt.current) == null || g.updateBounds(s, a), R.markAllDirty(), mt(), vt("zoom");
1407
+ }, d, o, m, E), []);
1408
+ rt.current = bt;
1409
+ const ot = Q((s) => {
1410
+ const a = L.current, g = a.getTotalHeight(), p = Math.max(0, g - a.canvasHeight), u = Math.max(0, Math.min(p, a.scrollTop + s));
1411
+ u !== a.scrollTop && (a.update({ scrollTop: u }), R.markDirty("grid"), R.markDirty("items"), R.markDirty("overlay"), et(u));
1412
+ }, [R]), Ne = Q((s) => {
1413
+ var k, D, X;
1414
+ const a = L.current, g = a.canvasWidth / (a.visibleTimeEnd - a.visibleTimeStart), p = s / g, u = a.visibleTimeStart + p, b = a.visibleTimeEnd + p;
1415
+ a.update({ visibleTimeStart: u, visibleTimeEnd: b }), (k = rt.current) == null || k.updateBounds(u, b), R.markAllDirty(), Xi(() => Xe()), (X = (D = j.current).onTimeChange) == null || X.call(D, u, b);
1416
+ }, [R, Xe]);
1417
+ le(() => {
1418
+ const s = ze.current;
1419
+ if (!s)
1393
1420
  return;
1394
- const l = (m) => {
1395
- if (m.ctrlKey || m.metaKey || m.altKey) {
1396
- m.preventDefault();
1397
- const g = r.getBoundingClientRect(), u = (m.clientX - g.left) / g.width;
1398
- vt.handleWheelZoom(m, u);
1399
- } else if (m.shiftKey)
1400
- m.preventDefault(), Ne(m.deltaY || m.deltaX);
1421
+ const a = (g) => {
1422
+ if (g.ctrlKey || g.metaKey || g.altKey) {
1423
+ g.preventDefault();
1424
+ const p = s.getBoundingClientRect(), u = (g.clientX - p.left) / p.width;
1425
+ bt.handleWheelZoom(g, u);
1426
+ } else if (g.shiftKey)
1427
+ g.preventDefault(), Ne(g.deltaY || g.deltaX);
1401
1428
  else {
1402
- const g = m.deltaX;
1403
- g !== 0 && Math.abs(g) > Math.abs(m.deltaY) ? (m.preventDefault(), Ne(g)) : m.deltaY !== 0 && (Qe > ye && m.preventDefault(), ot(m.deltaY));
1429
+ const p = g.deltaX;
1430
+ p !== 0 && Math.abs(p) > Math.abs(g.deltaY) ? (g.preventDefault(), Ne(p)) : g.deltaY !== 0 && (Qe > me && g.preventDefault(), ot(g.deltaY));
1404
1431
  }
1405
1432
  };
1406
- return r.addEventListener("wheel", l, { passive: !1 }), () => r.removeEventListener("wheel", l);
1407
- }, [vt, ot, Ne, Qe, ye]);
1408
- const Ee = U({ lastDistance: null, lastCenter: null });
1409
- ce(() => {
1410
- const r = Le.current;
1411
- if (!r)
1433
+ return s.addEventListener("wheel", a, { passive: !1 }), () => s.removeEventListener("wheel", a);
1434
+ }, [bt, ot, Ne, Qe, me]);
1435
+ const ke = A({ lastDistance: null, lastCenter: null });
1436
+ le(() => {
1437
+ const s = ze.current;
1438
+ if (!s)
1412
1439
  return;
1413
- const l = (M, R) => Math.abs(M.clientX - R.clientX), m = (M, R, X) => (M.clientX + R.clientX) / 2 - X.left, g = (M) => {
1414
- M.touches.length === 2 && (M.preventDefault(), Ee.current.lastDistance = l(M.touches[0], M.touches[1]), Ee.current.lastCenter = null);
1415
- }, u = (M) => {
1416
- var R;
1417
- if (M.touches.length === 2 && Ee.current.lastDistance !== null) {
1418
- M.preventDefault();
1419
- const X = l(M.touches[0], M.touches[1]), Y = r.getBoundingClientRect(), ne = m(M.touches[0], M.touches[1], Y) / Y.width;
1420
- if (X !== 0 && Ee.current.lastDistance !== 0) {
1421
- const z = Ee.current.lastDistance / X, J = L.current, q = J.visibleTimeEnd - J.visibleTimeStart;
1422
- let de = q * z;
1423
- de = Math.max(h, Math.min(E, de));
1424
- const Z = J.visibleTimeStart + q * ne, C = Z - de * ne, S = Z + de * (1 - ne);
1425
- J.update({ visibleTimeStart: C, visibleTimeEnd: S }), (R = rt.current) == null || R.updateBounds(C, S), O.markAllDirty(), ht(), pt("zoom");
1440
+ const a = (k, D) => Math.abs(k.clientX - D.clientX), g = (k, D, X) => (k.clientX + D.clientX) / 2 - X.left, p = (k) => {
1441
+ k.touches.length === 2 && (k.preventDefault(), ke.current.lastDistance = a(k.touches[0], k.touches[1]), ke.current.lastCenter = null);
1442
+ }, u = (k) => {
1443
+ var D;
1444
+ if (k.touches.length === 2 && ke.current.lastDistance !== null) {
1445
+ k.preventDefault();
1446
+ const X = a(k.touches[0], k.touches[1]), F = s.getBoundingClientRect(), Z = g(k.touches[0], k.touches[1], F) / F.width;
1447
+ if (X !== 0 && ke.current.lastDistance !== 0) {
1448
+ const oe = ke.current.lastDistance / X, V = L.current, N = V.visibleTimeEnd - V.visibleTimeStart;
1449
+ let se = N * oe;
1450
+ se = Math.max(m, Math.min(E, se));
1451
+ const te = V.visibleTimeStart + N * Z, O = te - se * Z, S = te + se * (1 - Z);
1452
+ V.update({ visibleTimeStart: O, visibleTimeEnd: S }), (D = rt.current) == null || D.updateBounds(O, S), R.markAllDirty(), mt(), vt("zoom");
1426
1453
  }
1427
- Ee.current.lastDistance = X;
1454
+ ke.current.lastDistance = X;
1428
1455
  }
1429
- }, v = () => {
1430
- Ee.current.lastDistance = null, Ee.current.lastCenter = null;
1456
+ }, b = () => {
1457
+ ke.current.lastDistance = null, ke.current.lastCenter = null;
1431
1458
  };
1432
- return r.addEventListener("touchstart", g, { passive: !1 }), r.addEventListener("touchmove", u, { passive: !1 }), r.addEventListener("touchend", v), () => {
1433
- r.removeEventListener("touchstart", g), r.removeEventListener("touchmove", u), r.removeEventListener("touchend", v);
1459
+ return s.addEventListener("touchstart", p, { passive: !1 }), s.addEventListener("touchmove", u, { passive: !1 }), s.addEventListener("touchend", b), () => {
1460
+ s.removeEventListener("touchstart", p), s.removeEventListener("touchmove", u), s.removeEventListener("touchend", b);
1434
1461
  };
1435
- }, [O, ht, pt]);
1436
- const bi = oe((r) => {
1462
+ }, [R, mt, vt]);
1463
+ const Mi = Q((s) => {
1437
1464
  var X;
1438
- const l = r.currentTarget, m = l.getBoundingClientRect(), g = r.clientX - m.left, u = r.clientY - m.top;
1439
- if (ft.current = g, ve.current) {
1440
- const Y = r.clientX - ve.current.startX, N = r.clientY - ve.current.startY;
1441
- if (!Oe.current && (Math.abs(Y) >= $t || Math.abs(N) >= $t) && (Oe.current = !0, l.style.cursor = "grabbing", l.setPointerCapture(r.pointerId)), Oe.current) {
1442
- const ne = r.clientX - ve.current.lastX, z = r.clientY - ve.current.lastY;
1443
- ve.current.lastX = r.clientX, ve.current.lastY = r.clientY, Math.abs(ne) > 0 && Ne(-ne), Math.abs(z) > 0 && ot(-z);
1465
+ const a = s.currentTarget, g = a.getBoundingClientRect(), p = s.clientX - g.left, u = s.clientY - g.top;
1466
+ if (ft.current = p, Yt.current = { x: s.clientX, y: s.clientY }, de.current) {
1467
+ const F = s.clientX - de.current.startX, W = s.clientY - de.current.startY;
1468
+ if (!De.current && (Math.abs(F) >= Ft || Math.abs(W) >= Ft) && (De.current = !0, a.style.cursor = "grabbing", a.setPointerCapture(s.pointerId)), De.current) {
1469
+ const Z = s.clientX - de.current.lastX, oe = s.clientY - de.current.lastY;
1470
+ de.current.lastX = s.clientX, de.current.lastY = s.clientY, Math.abs(Z) > 0 && Ne(-Z), Math.abs(oe) > 0 && ot(-oe);
1444
1471
  }
1445
1472
  return;
1446
1473
  }
1447
1474
  if (ie.isPending()) {
1448
- if (ie.update(g, u), ie.isActive()) {
1449
- const Y = ie.getState();
1450
- if (Y && Y.mode === "move" && x.current.canChangeGroup) {
1451
- const N = Tt(u, L.current, x.current.groups);
1452
- N && ie.setCurrentGroup(N.id);
1475
+ if (ie.update(p, u), ie.isActive()) {
1476
+ const F = ie.getState();
1477
+ if (F && F.mode === "move" && j.current.canChangeGroup) {
1478
+ const W = St(u, L.current, j.current.groups);
1479
+ W && ie.setCurrentGroup(W.id);
1453
1480
  }
1454
- O.markDirty("overlay");
1481
+ R.markDirty("overlay");
1455
1482
  }
1456
1483
  return;
1457
1484
  }
1458
- x.current.showCursorLine && O.markDirty("overlay");
1459
- const v = x.current, M = Ue(g, u, L.current, v.intervalTree, v.layoutEngine, v.groups), R = M == null ? void 0 : M.id;
1460
- if (R !== xe.current && (xe.current = R, O.markDirty("items"), (X = v.onItemHover) == null || X.call(v, R ?? null, r.nativeEvent)), M) {
1461
- const Y = Gt(g, M, L.current), N = Nt(M, v.canResize);
1462
- Y === "left" && (N === "left" || N === "both") || Y === "right" && (N === "right" || N === "both") ? l.style.cursor = "col-resize" : Zt(M, v.canMove) ? l.style.cursor = "grab" : l.style.cursor = "default";
1485
+ j.current.showCursorLine && R.markDirty("overlay");
1486
+ const b = j.current, k = Ze(p, u, L.current, b.intervalTree, b.layoutEngine, b.groups), D = k == null ? void 0 : k.id;
1487
+ if (D !== xe.current && (xe.current = D, R.markDirty("items"), (X = b.onItemHover) == null || X.call(b, D ?? null, s.nativeEvent)), k) {
1488
+ const F = Zt(p, k, L.current), W = Vt(k, F, b.canResize, b.canMove);
1489
+ a.style.cursor = W === "resize-left" || W === "resize-right" ? "col-resize" : W === "move" ? "grab" : "default";
1463
1490
  } else
1464
- l.style.cursor = "default";
1465
- }, [ie, O, Ne, ot]), yi = oe((r) => {
1466
- const l = x.current, m = r.currentTarget.getBoundingClientRect(), g = r.clientX - m.left, u = r.clientY - m.top, v = Ue(g, u, L.current, l.intervalTree, l.layoutEngine, l.groups);
1467
- if (!v) {
1468
- ve.current = { startX: r.clientX, startY: r.clientY, lastX: r.clientX, lastY: r.clientY }, Oe.current = !1;
1491
+ a.style.cursor = "default";
1492
+ }, [ie, R, Ne, ot]), wi = Q((s) => {
1493
+ const a = j.current, g = s.currentTarget.getBoundingClientRect(), p = s.clientX - g.left, u = s.clientY - g.top, b = Ze(p, u, L.current, a.intervalTree, a.layoutEngine, a.groups);
1494
+ if (!b) {
1495
+ de.current = { startX: s.clientX, startY: s.clientY, lastX: s.clientX, lastY: s.clientY }, De.current = !1;
1469
1496
  return;
1470
1497
  }
1471
- const M = Gt(g, v, L.current), R = Nt(v, l.canResize);
1472
- M === "left" && (R === "left" || R === "both") ? ie.startInteraction(v, "resize-left", g, u) : M === "right" && (R === "right" || R === "both") ? ie.startInteraction(v, "resize-right", g, u) : Zt(v, l.canMove) && ie.startInteraction(v, "move", g, u);
1473
- }, [ie]), Ti = oe((r) => {
1474
- var M, R, X, Y, N, ne;
1475
- const l = r.currentTarget;
1476
- if (ve.current) {
1477
- const z = Oe.current;
1478
- if (ve.current = null, Oe.current = !1, l.style.cursor = "default", z)
1498
+ const k = Zt(p, b, L.current), D = Vt(b, k, a.canResize, a.canMove);
1499
+ D && ie.startInteraction(b, D, p, u);
1500
+ }, [ie]), ki = Q((s) => {
1501
+ var k, D, X, F;
1502
+ const a = s.currentTarget;
1503
+ if (de.current) {
1504
+ const W = De.current;
1505
+ if (de.current = null, De.current = !1, a.style.cursor = "default", W)
1479
1506
  return;
1480
1507
  }
1481
1508
  if (ie.isActive()) {
1482
- const z = ie.getState(), J = L.current, q = J.canvasWidth / (J.visibleTimeEnd - J.visibleTimeStart);
1483
- if (z) {
1484
- const de = x.current.moveResizeValidator;
1485
- if (z.mode === "move") {
1486
- const Z = ie.endMove(q);
1487
- if (Z) {
1488
- const C = L.current, S = x.current, ge = z.deltaX / q, j = C.timeToX(z.item.start_time + ge), he = C.timeToX(z.item.end_time + ge), ue = (C.visibleTimeEnd - C.visibleTimeStart) * 0.1, _ = S.intervalTree.query(C.visibleTimeStart - ue, C.visibleTimeEnd + ue), re = wt(_, z.item.id, (fe) => C.timeToX(fe));
1489
- let V = Z.newStartTime;
1490
- const G = st(j, re, 8, q, S.dragSnap);
1491
- if (G !== null)
1492
- V = C.xToTime(G);
1493
- else {
1494
- const fe = st(he, re, 8, q, S.dragSnap);
1495
- if (fe !== null) {
1496
- const pe = z.item.end_time - z.item.start_time;
1497
- V = C.xToTime(fe) - pe;
1498
- }
1499
- }
1500
- const Q = de ? de("move", z.item.id, V) : V, ae = x.current.hierarchyEngine.getMoveDelta(z.item.id, Q);
1501
- (R = (M = x.current).onItemMove) == null || R.call(M, z.item.id, Q, Z.newGroupId, ae.length > 0 ? ae : void 0);
1509
+ const W = ie.getState(), Z = L.current, oe = Z.canvasWidth / (Z.visibleTimeEnd - Z.visibleTimeStart);
1510
+ if (W) {
1511
+ const V = j.current.moveResizeValidator, N = j.current;
1512
+ if (W.mode === "move") {
1513
+ const se = li(W, Z, N), te = ie.endMove(oe);
1514
+ if (te) {
1515
+ const O = V ? V("move", W.item.id, se) : se, S = N.hierarchyEngine.getMoveDelta(W.item.id, O);
1516
+ (k = N.onItemMove) == null || k.call(N, W.item.id, O, te.newGroupId, S.length > 0 ? S : void 0);
1502
1517
  }
1503
1518
  } else {
1504
- const Z = ie.endResize(q);
1505
- if (Z) {
1506
- const C = L.current, S = x.current, ge = z.deltaX / q, j = Z.edge === "left" ? z.item.start_time + ge : z.item.end_time + ge, he = C.timeToX(j), ue = (C.visibleTimeEnd - C.visibleTimeStart) * 0.1, _ = S.intervalTree.query(C.visibleTimeStart - ue, C.visibleTimeEnd + ue), re = wt(_, z.item.id, (fe) => C.timeToX(fe)), V = st(he, re, 8, q, S.dragSnap);
1507
- let G = V !== null ? C.xToTime(V) : Z.newTime;
1508
- const Q = x.current.hierarchyEngine.getResizeConstraint(z.item.id, Z.edge);
1509
- Z.edge === "left" && G > Q.max ? G = Q.max : Z.edge === "right" && G < Q.min && (G = Q.min);
1510
- const ae = de ? de("resize", z.item.id, G, Z.edge) : G;
1511
- (Y = (X = x.current).onItemResize) == null || Y.call(X, z.item.id, ae, Z.edge);
1519
+ const { edge: se, time: te } = ai(W, Z, N);
1520
+ if (ie.endResize(oe)) {
1521
+ const S = V ? V("resize", W.item.id, te, se) : te;
1522
+ (D = N.onItemResize) == null || D.call(N, W.item.id, S, se);
1512
1523
  }
1513
1524
  }
1514
1525
  }
1515
- l.style.cursor = "default", O.markDirty("overlay");
1526
+ a.style.cursor = "default", R.markDirty("overlay");
1516
1527
  return;
1517
1528
  }
1518
1529
  ie.isPending() && ie.cancel();
1519
- const m = l.getBoundingClientRect(), g = r.clientX - m.left, u = r.clientY - m.top, v = Ue(g, u, L.current, x.current.intervalTree, x.current.layoutEngine, x.current.groups);
1520
- v && ((ne = (N = x.current).onItemClick) == null || ne.call(N, v.id, r.nativeEvent));
1521
- }, [ie, O]), Si = oe((r) => {
1522
- var M, R;
1523
- const l = r.currentTarget.getBoundingClientRect(), m = r.clientX - l.left, g = r.clientY - l.top, u = x.current, v = Ue(m, g, L.current, u.intervalTree, u.layoutEngine, u.groups);
1524
- if (v)
1525
- (M = u.onItemDoubleClick) == null || M.call(u, v.id, r.nativeEvent);
1530
+ const g = a.getBoundingClientRect(), p = s.clientX - g.left, u = s.clientY - g.top, b = Ze(p, u, L.current, j.current.intervalTree, j.current.layoutEngine, j.current.groups);
1531
+ b && ((F = (X = j.current).onItemClick) == null || F.call(X, b.id, s.nativeEvent));
1532
+ }, [ie, R]), Ci = Q((s) => {
1533
+ var k, D;
1534
+ const a = s.currentTarget.getBoundingClientRect(), g = s.clientX - a.left, p = s.clientY - a.top, u = j.current, b = Ze(g, p, L.current, u.intervalTree, u.layoutEngine, u.groups);
1535
+ if (b)
1536
+ (k = u.onItemDoubleClick) == null || k.call(u, b.id, s.nativeEvent);
1526
1537
  else {
1527
- const X = Tt(g, L.current, u.groups), Y = L.current.xToTime(m);
1528
- X && ((R = u.onCanvasDoubleClick) == null || R.call(u, X.id, Y));
1538
+ const X = St(p, L.current, u.groups), F = L.current.xToTime(g);
1539
+ X && ((D = u.onCanvasDoubleClick) == null || D.call(u, X.id, F));
1529
1540
  }
1530
- }, []), Mi = oe((r) => {
1531
- var M, R;
1532
- r.preventDefault();
1533
- const l = r.currentTarget.getBoundingClientRect(), m = r.clientX - l.left, g = r.clientY - l.top, u = x.current, v = Ue(m, g, L.current, u.intervalTree, u.layoutEngine, u.groups);
1534
- if (v)
1535
- (M = u.onItemContextMenu) == null || M.call(u, v.id, r.nativeEvent);
1541
+ }, []), Ei = Q((s) => {
1542
+ var k, D;
1543
+ s.preventDefault();
1544
+ const a = s.currentTarget.getBoundingClientRect(), g = s.clientX - a.left, p = s.clientY - a.top, u = j.current, b = Ze(g, p, L.current, u.intervalTree, u.layoutEngine, u.groups);
1545
+ if (b)
1546
+ (k = u.onItemContextMenu) == null || k.call(u, b.id, s.nativeEvent);
1536
1547
  else {
1537
- const X = Tt(g, L.current, u.groups), Y = L.current.xToTime(m);
1538
- X && ((R = u.onCanvasContextMenu) == null || R.call(u, X.id, Y, r.nativeEvent));
1548
+ const X = St(p, L.current, u.groups), F = L.current.xToTime(g);
1549
+ X && ((D = u.onCanvasContextMenu) == null || D.call(u, X.id, F, s.nativeEvent));
1539
1550
  }
1540
- }, []), wi = oe(() => {
1541
- var r, l;
1542
- ve.current = null, Oe.current = !1, ft.current = null, Le.current && (Le.current.style.cursor = "default"), xe.current !== void 0 && (xe.current = void 0, O.markDirty("items"), (l = (r = x.current).onItemHover) == null || l.call(r, null, new PointerEvent("pointerleave"))), x.current.showCursorLine && O.markDirty("overlay");
1543
- }, [O]), ki = ee(() => {
1544
- const r = [];
1545
- return me.Children.forEach(ke, (l) => {
1546
- var g;
1547
- if (!me.isValidElement(l))
1551
+ }, []), Hi = Q(() => {
1552
+ var s, a;
1553
+ de.current = null, De.current = !1, ft.current = null, ze.current && (ze.current.style.cursor = "default"), xe.current !== void 0 && (xe.current = void 0, R.markDirty("items"), (a = (s = j.current).onItemHover) == null || a.call(s, null, new PointerEvent("pointerleave"))), j.current.showCursorLine && R.markDirty("overlay");
1554
+ }, [R]), Ii = K(() => {
1555
+ const s = [];
1556
+ return ce.Children.forEach(Me, (a) => {
1557
+ var p;
1558
+ if (!ce.isValidElement(a))
1548
1559
  return;
1549
- if (((g = l.type) == null ? void 0 : g.displayName) === "TimelineHeaders") {
1550
- const u = l.props;
1551
- r.push(me.cloneElement(l, {
1552
- visibleTimeStart: u.visibleTimeStart ?? Ft,
1553
- visibleTimeEnd: u.visibleTimeEnd ?? Yt,
1554
- canvasWidth: u.canvasWidth ?? Ce,
1560
+ if (((p = a.type) == null ? void 0 : p.displayName) === "TimelineHeaders") {
1561
+ const u = a.props;
1562
+ s.push(ce.cloneElement(a, {
1563
+ visibleTimeStart: u.visibleTimeStart ?? Wt,
1564
+ visibleTimeEnd: u.visibleTimeEnd ?? Bt,
1565
+ canvasWidth: u.canvasWidth ?? we,
1555
1566
  sidebarWidth: u.sidebarWidth ?? c,
1556
- theme: u.theme ?? we,
1567
+ theme: u.theme ?? ye,
1557
1568
  timezone: u.timezone ?? Je,
1558
- onZoomToInterval: u.onZoomToInterval ?? ((v, M) => {
1559
- var R, X, Y, N;
1560
- L.current.update({ visibleTimeStart: v, visibleTimeEnd: M }), O.markAllDirty(), $e(), (X = (R = x.current).onTimeChange) == null || X.call(R, v, M), (N = (Y = x.current).onZoom) == null || N.call(Y, v, M);
1569
+ onZoomToInterval: u.onZoomToInterval ?? ((b, k) => {
1570
+ var D, X, F, W;
1571
+ L.current.update({ visibleTimeStart: b, visibleTimeEnd: k }), R.markAllDirty(), Xe(), (X = (D = j.current).onTimeChange) == null || X.call(D, b, k), (W = (F = j.current).onZoom) == null || W.call(F, b, k);
1561
1572
  })
1562
1573
  }));
1563
1574
  }
1564
- }), r;
1565
- }, [ke, Ft, Yt, Ce, c, we, Je, O, $e]), jt = U(!1);
1566
- ce(() => {
1567
- jt.current || (jt.current = !0, O.markAllDirty());
1568
- }, [O]), Di(t, () => ({
1569
- captureToCanvas({ timeStart: r, timeEnd: l, scale: m, sidebarWidth: g }) {
1570
- const u = x.current, v = 28, M = v * 3, R = u.groups.map((j) => u.layoutEngine.getGroupHeight(j.id)), X = [0];
1571
- for (let j = 0; j < R.length; j++)
1572
- X.push(X[j] + R[j]);
1573
- const Y = X[R.length], N = L.current, ne = u.canvasWidth / (N.visibleTimeEnd - N.visibleTimeStart), z = l - r, J = Math.max(u.canvasWidth, Math.round(z * ne)), q = (g + J) * m, de = (M + Y) * m, Z = document.createElement("canvas");
1574
- Z.width = q, Z.height = de;
1575
- const C = Z.getContext("2d");
1576
- C.scale(m, m);
1577
- for (let j = 0; j < u.groups.length; j++) {
1578
- const he = u.groups[j], ue = R[j], _ = M + X[j];
1575
+ }), s;
1576
+ }, [Me, Wt, Bt, we, c, ye, Je, R, Xe]), Ut = A(!1);
1577
+ le(() => {
1578
+ Ut.current || (Ut.current = !0, R.markAllDirty());
1579
+ }, [R]), Pi(t, () => ({
1580
+ captureToCanvas({ timeStart: s, timeEnd: a, scale: g, sidebarWidth: p }) {
1581
+ const u = j.current, b = 28, k = b * 3, D = u.groups.map((G) => u.layoutEngine.getGroupHeight(G.id)), X = [0];
1582
+ for (let G = 0; G < D.length; G++)
1583
+ X.push(X[G] + D[G]);
1584
+ const F = X[D.length], W = L.current, Z = u.canvasWidth / (W.visibleTimeEnd - W.visibleTimeStart), oe = a - s, V = Math.max(u.canvasWidth, Math.round(oe * Z)), N = (p + V) * g, se = (k + F) * g, te = document.createElement("canvas");
1585
+ te.width = N, te.height = se;
1586
+ const O = te.getContext("2d");
1587
+ O.scale(g, g);
1588
+ for (let G = 0; G < u.groups.length; G++) {
1589
+ const Te = u.groups[G], Se = D[G], z = k + X[G];
1579
1590
  if (u.rowStyle) {
1580
- const Q = u.rowStyle(he);
1581
- Q != null && Q.backgroundColor && (C.fillStyle = Q.backgroundColor, C.fillRect(0, _, g, ue));
1591
+ const ue = u.rowStyle(Te);
1592
+ ue != null && ue.backgroundColor && (O.fillStyle = ue.backgroundColor, O.fillRect(0, z, p, Se));
1582
1593
  }
1583
- const re = he.type;
1584
- let V = "400", G = 8;
1585
- re === "project" ? V = "700" : re === "CAG" ? V = "600" : re === "CA" && (V = "400", G = 24), C.fillStyle = "#111", C.font = `${V} 12px sans-serif`, C.textBaseline = "middle", C.fillText(he.title, G, _ + ue / 2, g - G - 4);
1594
+ const ae = Te.type;
1595
+ let re = "400", q = 8;
1596
+ ae === "project" ? re = "700" : ae === "CAG" ? re = "600" : ae === "CA" && (re = "400", q = 24), O.fillStyle = "#111", O.font = `${re} 12px sans-serif`, O.textBaseline = "middle", O.fillText(Te.title, q, z + Se / 2, p - q - 4);
1586
1597
  }
1587
- const S = (j, he, ue) => {
1588
- var V, G;
1589
- C.fillStyle = ((V = u.theme.header) == null ? void 0 : V.bg) ?? "#f5f5f5", C.fillRect(g, j, J, v), C.strokeStyle = ((G = u.theme.grid) == null ? void 0 : G.line) ?? "#e0e0e0", C.lineWidth = 1, C.strokeRect(g, j, J, v);
1590
- let _ = Te(r, u.timezone).startOf(ue);
1591
- _.valueOf() < r && (_ = _.add(1, ue));
1592
- const re = J / (l - r);
1593
- for (; _.valueOf() < l; ) {
1594
- const Q = _.add(1, ue), ae = g + (_.valueOf() - r) * re, pe = g + (Math.min(Q.valueOf(), l) - r) * re - ae;
1595
- C.beginPath(), C.moveTo(ae, j), C.lineTo(ae, j + v), C.stroke(), C.fillStyle = "#333", C.font = "600 11px sans-serif", C.textBaseline = "middle", C.textAlign = "center", C.fillText(he(_), ae + pe / 2, j + v / 2, pe - 4), _ = Q;
1598
+ const S = (G, Te, Se) => {
1599
+ var re, q;
1600
+ O.fillStyle = ((re = u.theme.header) == null ? void 0 : re.bg) ?? "#f5f5f5", O.fillRect(p, G, V, b), O.strokeStyle = ((q = u.theme.grid) == null ? void 0 : q.line) ?? "#e0e0e0", O.lineWidth = 1, O.strokeRect(p, G, V, b);
1601
+ let z = pe(s, u.timezone).startOf(Se);
1602
+ z.valueOf() < s && (z = z.add(1, Se));
1603
+ const ae = V / (a - s);
1604
+ for (; z.valueOf() < a; ) {
1605
+ const ue = z.add(1, Se), fe = p + (z.valueOf() - s) * ae, ge = p + (Math.min(ue.valueOf(), a) - s) * ae - fe;
1606
+ O.beginPath(), O.moveTo(fe, G), O.lineTo(fe, G + b), O.stroke(), O.fillStyle = "#333", O.font = "600 11px sans-serif", O.textBaseline = "middle", O.textAlign = "center", O.fillText(Te(z), fe + ge / 2, G + b / 2, ge - 4), z = ue;
1596
1607
  }
1597
- C.textAlign = "start";
1608
+ O.textAlign = "start";
1598
1609
  };
1599
- S(0, (j) => j.format("YYYY"), "year"), S(v, (j) => j.format("MM"), "month"), S(v * 2, (j) => String(j.isoWeek()), "week");
1600
- const ge = new yt({
1601
- visibleTimeStart: r,
1602
- visibleTimeEnd: l,
1603
- canvasWidth: J,
1604
- canvasHeight: Y,
1610
+ S(0, (G) => G.format("YYYY"), "year"), S(b, (G) => G.format("MM"), "month"), S(b * 2, (G) => String(G.isoWeek()), "week");
1611
+ const Fe = new Tt({
1612
+ visibleTimeStart: s,
1613
+ visibleTimeEnd: a,
1614
+ canvasWidth: V,
1615
+ canvasHeight: F,
1605
1616
  sidebarWidth: 0,
1606
1617
  lineHeight: u.lineHeight,
1607
1618
  groupCount: u.groups.length,
1608
1619
  buffer: 1,
1609
1620
  scrollTop: 0,
1610
- groupHeights: R
1621
+ groupHeights: D
1611
1622
  });
1612
- return C.save(), C.translate(g, M), C.beginPath(), C.rect(0, 0, J, Y), C.clip(), Fe.draw(C, ge, u.groups, u.theme, u.dayStyle, u.rowStyle, u.highlights, u.timezone), Ye.draw(C, ge, u.groups, u.items, u.intervalTree, u.layoutEngine, u.itemRenderer, u.groupRenderer, u.theme, u.selected, void 0, u.dependencies, u.summaryRenderer, u.hierarchyEngine), _e.draw(C, ge, u.theme, {
1623
+ return O.save(), O.translate(p, k), O.beginPath(), O.rect(0, 0, V, F), O.clip(), $e.draw(O, Fe, u.groups, u.theme, u.dayStyle, u.rowStyle, u.highlights, u.timezone), _e.draw(O, Fe, u.groups, u.items, u.intervalTree, u.layoutEngine, u.itemRenderer, u.groupRenderer, u.theme, u.selected, void 0, u.dependencies, u.summaryRenderer, u.hierarchyEngine), Ye.draw(O, Fe, u.theme, {
1613
1624
  cursorX: null,
1614
1625
  snapX: null,
1615
1626
  markers: je.current,
1616
1627
  interaction: null
1617
- }), C.restore(), Z;
1628
+ }), O.restore(), te;
1618
1629
  }
1619
- }), [Fe, Ye, _e]), ce(() => {
1620
- const r = {
1621
- captureToCanvas({ timeStart: l, timeEnd: m, scale: g, sidebarWidth: u }) {
1622
- var ue;
1623
- const v = x.current, M = 28, R = M * 3, X = v.groups.map((_) => v.layoutEngine.getGroupHeight(_.id)), Y = [0];
1624
- for (let _ = 0; _ < X.length; _++)
1625
- Y.push(Y[_] + X[_]);
1626
- const N = Y[X.length], ne = L.current, z = v.canvasWidth / (ne.visibleTimeEnd - ne.visibleTimeStart), J = m - l, q = Math.max(v.canvasWidth, Math.round(J * z)), de = u + q, Z = R + N, C = document.createElement("canvas");
1627
- C.width = de * g, C.height = Z * g;
1628
- const S = C.getContext("2d");
1629
- S.scale(g, g), S.fillStyle = "#FFFFFF", S.fillRect(0, 0, de, Z), S.save(), S.beginPath(), S.rect(0, 0, u, Z), S.clip(), S.fillStyle = "#F9FAFB", S.fillRect(0, 0, u, R), S.strokeStyle = "#E5E7EB", S.lineWidth = 1, S.strokeRect(0, 0, u, R);
1630
- for (let _ = 0; _ < v.groups.length; _++) {
1631
- const re = v.groups[_], V = X[_], G = R + Y[_], Q = (ue = v.rowStyle) == null ? void 0 : ue.call(v, re);
1632
- S.fillStyle = (Q == null ? void 0 : Q.backgroundColor) ?? (_ % 2 === 0 ? "#FFFFFF" : "#F7F7F7"), S.fillRect(0, G, u, V), S.strokeStyle = "#E5E5E5", S.lineWidth = 0.5, S.beginPath(), S.moveTo(0, G + V), S.lineTo(u, G + V), S.stroke();
1633
- const ae = re.type ?? "";
1634
- let fe = 8, pe = "400", Pe = 11;
1635
- ae === "project" ? (pe = "700", Pe = 12) : ae === "control_area_group" ? pe = "600" : ae === "control_area" && (fe = 24), S.fillStyle = "#374151", S.font = `${pe} ${Pe}px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`, S.textBaseline = "middle";
1636
- const Ei = typeof re.title == "string" ? re.title : String(re.title);
1637
- S.fillText(Ei, fe, G + V / 2, u - fe - 8);
1630
+ }), [$e, _e, Ye]), le(() => {
1631
+ const s = {
1632
+ captureToCanvas({ timeStart: a, timeEnd: g, scale: p, sidebarWidth: u }) {
1633
+ var Se;
1634
+ const b = j.current, k = 28, D = k * 3, X = b.groups.map((z) => b.layoutEngine.getGroupHeight(z.id)), F = [0];
1635
+ for (let z = 0; z < X.length; z++)
1636
+ F.push(F[z] + X[z]);
1637
+ const W = F[X.length], Z = L.current, oe = b.canvasWidth / (Z.visibleTimeEnd - Z.visibleTimeStart), V = g - a, N = Math.max(b.canvasWidth, Math.round(V * oe)), se = u + N, te = D + W, O = document.createElement("canvas");
1638
+ O.width = se * p, O.height = te * p;
1639
+ const S = O.getContext("2d");
1640
+ S.scale(p, p), S.fillStyle = "#FFFFFF", S.fillRect(0, 0, se, te), S.save(), S.beginPath(), S.rect(0, 0, u, te), S.clip(), S.fillStyle = "#F9FAFB", S.fillRect(0, 0, u, D), S.strokeStyle = "#E5E7EB", S.lineWidth = 1, S.strokeRect(0, 0, u, D);
1641
+ for (let z = 0; z < b.groups.length; z++) {
1642
+ const ae = b.groups[z], re = X[z], q = D + F[z], ue = (Se = b.rowStyle) == null ? void 0 : Se.call(b, ae);
1643
+ S.fillStyle = (ue == null ? void 0 : ue.backgroundColor) ?? (z % 2 === 0 ? "#FFFFFF" : "#F7F7F7"), S.fillRect(0, q, u, re), S.strokeStyle = "#E5E5E5", S.lineWidth = 0.5, S.beginPath(), S.moveTo(0, q + re), S.lineTo(u, q + re), S.stroke();
1644
+ const fe = ae.type ?? "";
1645
+ let Re = 8, ge = "400", Oe = 11;
1646
+ fe === "project" ? (ge = "700", Oe = 12) : fe === "control_area_group" ? ge = "600" : fe === "control_area" && (Re = 24), S.fillStyle = "#374151", S.font = `${ge} ${Oe}px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`, S.textBaseline = "middle";
1647
+ const Ri = typeof ae.title == "string" ? ae.title : String(ae.title);
1648
+ S.fillText(Ri, Re, q + re / 2, u - Re - 8);
1638
1649
  }
1639
- S.strokeStyle = "#E5E7EB", S.lineWidth = 1, S.beginPath(), S.moveTo(u, 0), S.lineTo(u, Z), S.stroke(), S.restore(), S.save(), S.beginPath(), S.rect(u, 0, q, R), S.clip();
1640
- const ge = m - l, j = [
1650
+ S.strokeStyle = "#E5E7EB", S.lineWidth = 1, S.beginPath(), S.moveTo(u, 0), S.lineTo(u, te), S.stroke(), S.restore(), S.save(), S.beginPath(), S.rect(u, 0, N, D), S.clip();
1651
+ const Fe = g - a, G = [
1641
1652
  { unit: "year", row: 0 },
1642
1653
  { unit: "month", row: 1 },
1643
1654
  { unit: "week", row: 2 }
1644
1655
  ];
1645
- for (const { unit: _, row: re } of j) {
1646
- const V = re * M;
1647
- S.fillStyle = "#F9FAFB", S.fillRect(u, V, q, M);
1648
- let G = Te(l, v.timezone).startOf(_);
1649
- const Q = Te(m, v.timezone).add(1, _);
1650
- for (; G.isBefore(Q); ) {
1651
- const ae = G.add(1, _), fe = u + (G.valueOf() - l) / ge * q, pe = (ae.valueOf() - G.valueOf()) / ge * q;
1652
- S.strokeStyle = "#E5E7EB", S.lineWidth = 0.5, S.strokeRect(fe, V, pe, M);
1653
- let Pe;
1654
- _ === "year" ? Pe = G.format("YYYY") : _ === "month" ? Pe = G.format("MM") : Pe = `${G.week()}`, S.fillStyle = "#6c737f", S.font = _ === "year" ? '600 11px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif' : '400 11px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', S.textBaseline = "middle", S.textAlign = "center", pe > 20 && S.fillText(Pe, fe + pe / 2, V + M / 2), G = ae;
1656
+ for (const { unit: z, row: ae } of G) {
1657
+ const re = ae * k;
1658
+ S.fillStyle = "#F9FAFB", S.fillRect(u, re, N, k);
1659
+ let q = pe(a, b.timezone).startOf(z);
1660
+ const ue = pe(g, b.timezone).add(1, z);
1661
+ for (; q.isBefore(ue); ) {
1662
+ const fe = q.add(1, z), Re = u + (q.valueOf() - a) / Fe * N, ge = (fe.valueOf() - q.valueOf()) / Fe * N;
1663
+ S.strokeStyle = "#E5E7EB", S.lineWidth = 0.5, S.strokeRect(Re, re, ge, k);
1664
+ let Oe;
1665
+ z === "year" ? Oe = q.format("YYYY") : z === "month" ? Oe = q.format("MM") : Oe = `${q.week()}`, S.fillStyle = "#6c737f", S.font = z === "year" ? '600 11px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif' : '400 11px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif', S.textBaseline = "middle", S.textAlign = "center", ge > 20 && S.fillText(Oe, Re + ge / 2, re + k / 2), q = fe;
1655
1666
  }
1656
1667
  }
1657
- S.textAlign = "start", S.restore(), S.save(), S.beginPath(), S.rect(u, R, q, N), S.clip(), S.translate(u, R);
1658
- const he = new yt({
1659
- visibleTimeStart: l,
1660
- visibleTimeEnd: m,
1661
- canvasWidth: q,
1662
- canvasHeight: N,
1668
+ S.textAlign = "start", S.restore(), S.save(), S.beginPath(), S.rect(u, D, N, W), S.clip(), S.translate(u, D);
1669
+ const Te = new Tt({
1670
+ visibleTimeStart: a,
1671
+ visibleTimeEnd: g,
1672
+ canvasWidth: N,
1673
+ canvasHeight: W,
1663
1674
  sidebarWidth: 0,
1664
- lineHeight: v.lineHeight,
1665
- groupCount: v.groups.length,
1675
+ lineHeight: b.lineHeight,
1676
+ groupCount: b.groups.length,
1666
1677
  buffer: 1,
1667
1678
  scrollTop: 0,
1668
1679
  groupHeights: X
1669
1680
  });
1670
- return Fe.draw(S, he, v.groups, v.theme, v.dayStyle, v.rowStyle, v.highlights, v.timezone), Ye.draw(S, he, v.groups, v.items, v.intervalTree, v.layoutEngine, v.itemRenderer, v.groupRenderer, v.theme, v.selected, void 0, v.dependencies, v.summaryRenderer, v.hierarchyEngine), _e.draw(S, he, v.theme, { cursorX: null, markers: je.current }), S.restore(), C;
1681
+ return $e.draw(S, Te, b.groups, b.theme, b.dayStyle, b.rowStyle, b.highlights, b.timezone), _e.draw(S, Te, b.groups, b.items, b.intervalTree, b.layoutEngine, b.itemRenderer, b.groupRenderer, b.theme, b.selected, void 0, b.dependencies, b.summaryRenderer, b.hierarchyEngine), Ye.draw(S, Te, b.theme, { cursorX: null, markers: je.current }), S.restore(), O;
1671
1682
  }
1672
1683
  };
1673
- Ke == null || Ke(r);
1674
- }, [Ke, Fe, Ye, _e]);
1675
- const Ci = {
1684
+ Ke == null || Ke(s);
1685
+ }, [Ke, $e, _e, Ye]);
1686
+ const Di = {
1676
1687
  position: "relative",
1677
- width: Ce,
1678
- height: ye,
1688
+ width: we,
1689
+ height: me,
1679
1690
  overflow: "hidden",
1680
1691
  cursor: "default"
1681
- }, bt = { position: "absolute", top: 0, left: 0 };
1682
- return Ve("div", { ref: Ot, style: { display: "flex", flexDirection: "column", width: "100%", position: "relative" }, children: [li ? Ve("div", { style: {
1692
+ }, yt = { position: "absolute", top: 0, left: 0 };
1693
+ return Ve("div", { ref: Xt, style: { display: "flex", flexDirection: "column", width: "100%", position: "relative" }, children: [di ? Ve("div", { style: {
1683
1694
  position: "absolute",
1684
1695
  top: 0,
1685
1696
  left: 0,
@@ -1693,31 +1704,31 @@ const ei = 32, fn = me.memo(Hi(function(e, t) {
1693
1704
  borderBottomRightRadius: 4,
1694
1705
  pointerEvents: "none",
1695
1706
  userSelect: "none"
1696
- }, children: ["v", "0.8.0", " · ", "08:36:05"] }) : null, ki, Ve("div", { ref: Pt, style: { display: "flex", overflow: "hidden", maxHeight: Be ?? void 0 }, children: [le(Kt, { groups: n, width: c, lineHeight: a, groupHeights: Re, scrollTop: _t, canvasHeight: ye, theme: we, groupRenderer: B, onScroll: (r) => {
1697
- L.current.update({ scrollTop: r }), O.markDirty("grid"), O.markDirty("items"), O.markDirty("overlay"), et(r);
1698
- } }), Ve("div", { ref: Le, style: Ci, onPointerMove: bi, onPointerDown: yi, onPointerUp: Ti, onDoubleClick: Si, onContextMenu: Mi, onPointerLeave: wi, children: [le("canvas", { ref: Dt, style: { ...bt, zIndex: 0 } }), le("canvas", { ref: It, style: { ...bt, zIndex: 1 } }), le("canvas", { ref: Rt, style: { ...bt, zIndex: 2 } })] }), ut && Et ? le(Kt, { groups: n, width: ut, lineHeight: a, groupHeights: Re, scrollTop: _t, canvasHeight: ye, theme: we, groupRenderer: Et, onScroll: (r) => {
1699
- L.current.update({ scrollTop: r }), O.markDirty("grid"), O.markDirty("items"), O.markDirty("overlay"), et(r);
1707
+ }, children: ["v", "0.8.1", " · ", "08:37:39"] }) : null, Ii, Ve("div", { ref: $t, style: { display: "flex", overflow: "hidden", maxHeight: Be ?? void 0 }, children: [ne(Qt, { groups: n, width: c, lineHeight: l, groupHeights: Ie, scrollTop: zt, canvasHeight: me, theme: ye, groupRenderer: B, onScroll: (s) => {
1708
+ L.current.update({ scrollTop: s }), R.markDirty("grid"), R.markDirty("items"), R.markDirty("overlay"), et(s);
1709
+ } }), Ve("div", { ref: ze, style: Di, onPointerMove: Mi, onPointerDown: wi, onPointerUp: ki, onDoubleClick: Ci, onContextMenu: Ei, onPointerLeave: Hi, children: [ne("canvas", { ref: Rt, style: { ...yt, zIndex: 0 } }), ne("canvas", { ref: Ot, style: { ...yt, zIndex: 1 } }), ne("canvas", { ref: Pt, style: { ...yt, zIndex: 2 } })] }), ut && It ? ne(Qt, { groups: n, width: ut, lineHeight: l, groupHeights: Ie, scrollTop: zt, canvasHeight: me, theme: ye, groupRenderer: It, onScroll: (s) => {
1710
+ L.current.update({ scrollTop: s }), R.markDirty("grid"), R.markDirty("items"), R.markDirty("overlay"), et(s);
1700
1711
  } }) : null] })] });
1701
1712
  }));
1702
- function Ji({ children: i, theme: e, className: t, classNames: n, style: o, visibleTimeStart: d, visibleTimeEnd: s, canvasWidth: c, sidebarWidth: a = 0, onZoomToInterval: b, timezone: H }) {
1703
- const p = me.Children.map(i, (f) => {
1713
+ function sn({ children: i, theme: e, className: t, classNames: n, style: r, visibleTimeStart: d, visibleTimeEnd: o, canvasWidth: c, sidebarWidth: l = 0, onZoomToInterval: v, timezone: C }) {
1714
+ const h = ce.Children.map(i, (f) => {
1704
1715
  var T;
1705
- if (!me.isValidElement(f))
1716
+ if (!ce.isValidElement(f))
1706
1717
  return f;
1707
1718
  if (((T = f.type) == null ? void 0 : T.displayName) === "DateHeader") {
1708
- const h = f.props, E = me.cloneElement(f, {
1709
- visibleTimeStart: h.visibleTimeStart ?? d,
1710
- visibleTimeEnd: h.visibleTimeEnd ?? s,
1711
- canvasWidth: h.canvasWidth ?? c,
1712
- theme: h.theme ?? e,
1713
- onZoomToInterval: h.onIntervalClick ?? h.onZoomToInterval ?? b,
1714
- timezone: h.timezone ?? H
1719
+ const m = f.props, E = ce.cloneElement(f, {
1720
+ visibleTimeStart: m.visibleTimeStart ?? d,
1721
+ visibleTimeEnd: m.visibleTimeEnd ?? o,
1722
+ canvasWidth: m.canvasWidth ?? c,
1723
+ theme: m.theme ?? e,
1724
+ onZoomToInterval: m.onIntervalClick ?? m.onZoomToInterval ?? v,
1725
+ timezone: m.timezone ?? C
1715
1726
  });
1716
- return Ve("div", { style: { display: "flex" }, children: [le("div", { style: { width: a, flexShrink: 0 } }), le("div", { style: { flex: 1, overflow: "hidden" }, children: E })] });
1727
+ return Ve("div", { style: { display: "flex" }, children: [ne("div", { style: { width: l, flexShrink: 0 } }), ne("div", { style: { flex: 1, overflow: "hidden" }, children: E })] });
1717
1728
  }
1718
1729
  return f;
1719
1730
  });
1720
- return le("div", { className: t, style: {
1731
+ return ne("div", { className: t, style: {
1721
1732
  position: "sticky",
1722
1733
  top: 0,
1723
1734
  zIndex: 20,
@@ -1726,65 +1737,65 @@ function Ji({ children: i, theme: e, className: t, classNames: n, style: o, visi
1726
1737
  backgroundColor: (e == null ? void 0 : e.header.bg) ?? "#F9FAFB",
1727
1738
  borderTop: `1px solid ${(e == null ? void 0 : e.header.border) ?? "#E5E7EB"}`,
1728
1739
  borderBottom: `1px solid ${(e == null ? void 0 : e.header.border) ?? "#E5E7EB"}`,
1729
- ...o
1730
- }, children: p });
1740
+ ...r
1741
+ }, children: h });
1731
1742
  }
1732
- Ji.displayName = "TimelineHeaders";
1733
- var si = { exports: {} };
1743
+ sn.displayName = "TimelineHeaders";
1744
+ var ci = { exports: {} };
1734
1745
  (function(i, e) {
1735
1746
  (function(t, n) {
1736
1747
  i.exports = n();
1737
1748
  })(lt, function() {
1738
1749
  var t = "week", n = "year";
1739
- return function(o, d, s) {
1750
+ return function(r, d, o) {
1740
1751
  var c = d.prototype;
1741
- c.week = function(a) {
1742
- if (a === void 0 && (a = null), a !== null) return this.add(7 * (a - this.week()), "day");
1743
- var b = this.$locale().yearStart || 1;
1752
+ c.week = function(l) {
1753
+ if (l === void 0 && (l = null), l !== null) return this.add(7 * (l - this.week()), "day");
1754
+ var v = this.$locale().yearStart || 1;
1744
1755
  if (this.month() === 11 && this.date() > 25) {
1745
- var H = s(this).startOf(n).add(1, n).date(b), p = s(this).endOf(t);
1746
- if (H.isBefore(p)) return 1;
1756
+ var C = o(this).startOf(n).add(1, n).date(v), h = o(this).endOf(t);
1757
+ if (C.isBefore(h)) return 1;
1747
1758
  }
1748
- var f = s(this).startOf(n).date(b).startOf(t).subtract(1, "millisecond"), w = this.diff(f, t, !0);
1749
- return w < 0 ? s(this).startOf("week").week() : Math.ceil(w);
1750
- }, c.weeks = function(a) {
1751
- return a === void 0 && (a = null), this.week(a);
1759
+ var f = o(this).startOf(n).date(v).startOf(t).subtract(1, "millisecond"), M = this.diff(f, t, !0);
1760
+ return M < 0 ? o(this).startOf("week").week() : Math.ceil(M);
1761
+ }, c.weeks = function(l) {
1762
+ return l === void 0 && (l = null), this.week(l);
1752
1763
  };
1753
1764
  };
1754
1765
  });
1755
- })(si);
1756
- var Qi = si.exports;
1757
- const en = /* @__PURE__ */ at(Qi);
1758
- We.extend(en);
1759
- const tn = {
1766
+ })(ci);
1767
+ var ln = ci.exports;
1768
+ const an = /* @__PURE__ */ at(ln);
1769
+ We.extend(an);
1770
+ const un = {
1760
1771
  year: 30,
1761
1772
  month: 30,
1762
1773
  week: 20,
1763
1774
  day: 15,
1764
1775
  hour: 30
1765
1776
  };
1766
- function nn({ unit: i, visibleTimeStart: e = 0, visibleTimeEnd: t = 0, canvasWidth: n = 0, theme: o, height: d = 28, className: s, labelFormat: c, onIntervalClick: a, minCellWidth: b, onZoomToInterval: H, timezone: p }) {
1767
- const f = ee(() => {
1777
+ function cn({ unit: i, visibleTimeStart: e = 0, visibleTimeEnd: t = 0, canvasWidth: n = 0, theme: r, height: d = 28, className: o, labelFormat: c, onIntervalClick: l, minCellWidth: v, onZoomToInterval: C, timezone: h }) {
1778
+ const f = K(() => {
1768
1779
  if (!e || !t || !n)
1769
1780
  return [];
1770
- const T = t - e, h = b ?? tn[i];
1771
- if (h > 0) {
1772
- const y = Te(e, p).startOf(i);
1773
- if ((y.add(1, i).valueOf() - y.valueOf()) / T * n < h)
1781
+ const T = t - e, m = v ?? un[i];
1782
+ if (m > 0) {
1783
+ const y = pe(e, h).startOf(i);
1784
+ if ((y.add(1, i).valueOf() - y.valueOf()) / T * n < m)
1774
1785
  return [];
1775
1786
  }
1776
1787
  const E = [];
1777
- let P = Te(e, p).startOf(i).subtract(1, i);
1778
- const W = Te(t, p).add(2, i).valueOf();
1779
- for (; P.valueOf() < W; ) {
1780
- const y = P.add(1, i), D = P.valueOf(), k = y.valueOf(), $ = (D - e) / T * n, B = (k - D) / T * n, I = rn(P, y, i, c);
1781
- E.push({ start: D, end: k, label: I, left: $, width: B }), P = y;
1788
+ let P = pe(e, h).startOf(i).subtract(1, i);
1789
+ const Y = pe(t, h).add(2, i).valueOf();
1790
+ for (; P.valueOf() < Y; ) {
1791
+ const y = P.add(1, i), H = P.valueOf(), w = y.valueOf(), $ = (H - e) / T * n, B = (w - H) / T * n, I = dn(P, y, i, c);
1792
+ E.push({ start: H, end: w, label: I, left: $, width: B }), P = y;
1782
1793
  }
1783
1794
  return E;
1784
- }, [e, t, n, i, c, b, p]), w = oe((T, h) => {
1785
- a ? a(T, h) : H && H(T, h);
1786
- }, [a, H]);
1787
- return f.length === 0 ? null : le("div", { style: { display: "flex", position: "relative", height: d, overflow: "hidden" }, children: f.map((T) => le("div", { className: s, onClick: () => w(T.start, T.end), style: {
1795
+ }, [e, t, n, i, c, v, h]), M = Q((T, m) => {
1796
+ l ? l(T, m) : C && C(T, m);
1797
+ }, [l, C]);
1798
+ return f.length === 0 ? null : ne("div", { style: { display: "flex", position: "relative", height: d, overflow: "hidden" }, children: f.map((T) => ne("div", { className: o, onClick: () => M(T.start, T.end), style: {
1788
1799
  position: "absolute",
1789
1800
  left: T.left,
1790
1801
  width: T.width,
@@ -1792,24 +1803,24 @@ function nn({ unit: i, visibleTimeStart: e = 0, visibleTimeEnd: t = 0, canvasWid
1792
1803
  display: "flex",
1793
1804
  alignItems: "center",
1794
1805
  justifyContent: "center",
1795
- borderRight: `1px solid ${(o == null ? void 0 : o.header.border) ?? "#E5E7EB"}`,
1796
- borderBottom: `1px solid ${(o == null ? void 0 : o.header.border) ?? "#E5E7EB"}`,
1806
+ borderRight: `1px solid ${(r == null ? void 0 : r.header.border) ?? "#E5E7EB"}`,
1807
+ borderBottom: `1px solid ${(r == null ? void 0 : r.header.border) ?? "#E5E7EB"}`,
1797
1808
  fontSize: 12,
1798
- color: (o == null ? void 0 : o.header.text) ?? "#6c737f",
1799
- backgroundColor: (o == null ? void 0 : o.header.bg) ?? "#F9FAFB",
1809
+ color: (r == null ? void 0 : r.header.text) ?? "#6c737f",
1810
+ backgroundColor: (r == null ? void 0 : r.header.bg) ?? "#F9FAFB",
1800
1811
  overflow: "hidden",
1801
1812
  whiteSpace: "nowrap",
1802
1813
  cursor: "pointer",
1803
1814
  userSelect: "none",
1804
1815
  padding: "0 4px",
1805
1816
  boxSizing: "border-box"
1806
- }, children: le("span", { children: T.label }) }, T.start)) });
1817
+ }, children: ne("span", { children: T.label }) }, T.start)) });
1807
1818
  }
1808
- nn.displayName = "DateHeader";
1809
- function rn(i, e, t, n, o) {
1810
- return typeof n == "function" ? n(i.toDate(), e.toDate(), t) : typeof n == "string" ? i.format(n) : on(i, t);
1819
+ cn.displayName = "DateHeader";
1820
+ function dn(i, e, t, n, r) {
1821
+ return typeof n == "function" ? n(i.toDate(), e.toDate(), t) : typeof n == "string" ? i.format(n) : fn(i, t);
1811
1822
  }
1812
- function on(i, e) {
1823
+ function fn(i, e) {
1813
1824
  switch (e) {
1814
1825
  case "year":
1815
1826
  return i.format("YYYY");
@@ -1823,24 +1834,24 @@ function on(i, e) {
1823
1834
  return i.format("HH:mm");
1824
1835
  }
1825
1836
  }
1826
- function sn({ width: i, children: e, style: t }) {
1837
+ function hn({ width: i, children: e, style: t }) {
1827
1838
  const n = () => ({ style: { width: i, ...t } });
1828
- return e ? le(ti, { children: e({ getRootProps: n }) }) : le("div", { style: { width: i } });
1839
+ return e ? ne(ni, { children: e({ getRootProps: n }) }) : ne("div", { style: { width: i } });
1829
1840
  }
1830
- sn.displayName = "SidebarHeader";
1831
- function ln({ children: i }) {
1832
- return le(ti, { children: i });
1841
+ hn.displayName = "SidebarHeader";
1842
+ function mn({ children: i }) {
1843
+ return ne(ni, { children: i });
1833
1844
  }
1834
- ln.displayName = "CustomHeader";
1845
+ mn.displayName = "CustomHeader";
1835
1846
  export {
1836
- fn as CanvasTimeline,
1837
- ln as CustomHeader,
1838
- qi as CustomMarker,
1839
- He as DEFAULT_THEME,
1840
- nn as DateHeader,
1841
- Pi as HierarchyEngine,
1842
- sn as SidebarHeader,
1843
- Ji as TimelineHeaders,
1844
- Ui as TodayMarker
1847
+ yn as CanvasTimeline,
1848
+ mn as CustomHeader,
1849
+ rn as CustomMarker,
1850
+ Ce as DEFAULT_THEME,
1851
+ cn as DateHeader,
1852
+ Yi as HierarchyEngine,
1853
+ hn as SidebarHeader,
1854
+ sn as TimelineHeaders,
1855
+ tn as TodayMarker
1845
1856
  };
1846
1857
  //# sourceMappingURL=canvas-timeline.es.js.map