zegantt 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/zegantt.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { jsx as t, jsxs as o, Fragment as de } from "react/jsx-runtime";
2
2
  import { createContext as et, useContext as tt, useRef as pe, useCallback as J, useEffect as ge, useMemo as ae, useState as P } from "react";
3
3
  import { Flag as Se, Clock as ke, MessageCircle as nt, Plus as ot, ChevronDown as Be, ChevronRight as Pe, Paperclip as Fe, AlertTriangle as rt, Eye as it, Edit2 as at, Trash2 as st, Loader2 as _e, Upload as dt, X as lt, Link2 as ct } from "lucide-react";
4
- const Ge = et(void 0);
4
+ const He = et(void 0);
5
5
  function pt({ children: n, value: c }) {
6
- return /* @__PURE__ */ t(Ge.Provider, { value: c, children: n });
6
+ return /* @__PURE__ */ t(He.Provider, { value: c, children: n });
7
7
  }
8
8
  function Ie() {
9
- const n = tt(Ge);
9
+ const n = tt(He);
10
10
  if (!n)
11
11
  throw new Error("useGanttContext must be used within a GanttProvider");
12
12
  return n;
13
13
  }
14
- const V = {
14
+ const G = {
15
15
  white: "#FFFFFF",
16
16
  dark_gray: "#4F4F4F",
17
17
  gray: "#7B7B7B",
@@ -24,45 +24,45 @@ const V = {
24
24
  red: "#FF0000"
25
25
  }, e = {
26
26
  pageBg: "#F8FAFB",
27
- surface: V.white,
27
+ surface: G.white,
28
28
  // #FFFFFF
29
29
  surfaceAlt: "#F7FAF8",
30
30
  // subtle alternating row
31
31
  headerBg: "#F2F5F3",
32
32
  // soft green-tinted header
33
- textTitle: V.dark_green,
33
+ textTitle: G.dark_green,
34
34
  // #1A3C30
35
- textPrimary: V.dark_gray,
35
+ textPrimary: G.dark_gray,
36
36
  // #4F4F4F
37
- textSecondary: V.gray,
37
+ textSecondary: G.gray,
38
38
  // #7B7B7B
39
- textMuted: V.light_gray,
39
+ textMuted: G.light_gray,
40
40
  // #D9D9D9
41
- group: V.dark_green,
41
+ group: G.dark_green,
42
42
  // #1A3C30
43
- groupLight: V.water_green,
43
+ groupLight: G.water_green,
44
44
  // #A0D8A8 (bar border)
45
- milestone: V.dark_green,
45
+ milestone: G.dark_green,
46
46
  // #1A3C30
47
- milestoneRing: V.light_green,
47
+ milestoneRing: G.light_green,
48
48
  // #A0D8A8
49
- event: V.orange,
49
+ event: G.orange,
50
50
  // yellow translucent
51
- note: V.yellow,
51
+ note: G.yellow,
52
52
  // #FFBB1C
53
- border: V.light_gray,
53
+ border: G.light_gray,
54
54
  // #D9D9D9
55
55
  borderLight: "#ECECEC",
56
56
  weekendBg: "#F4F6F5",
57
- today: V.red,
57
+ today: G.red,
58
58
  // #FF0000
59
59
  todayBg: "#FF000008",
60
60
  // today column tint
61
- arrow: V.gray,
61
+ arrow: G.gray,
62
62
  // #7B7B7B
63
- arrowHover: V.dark_green
63
+ arrowHover: G.dark_green
64
64
  // #1A3C30
65
- }, _ = 50, we = 32, gt = we * 2, ht = 460, te = 26, fe = 28, Le = 120, ut = 40, ft = 3.5, oe = [
65
+ }, _ = 50, we = 32, gt = we * 2, ht = 460, ne = 26, fe = 28, Le = 120, ut = 40, ft = 3.5, oe = [
66
66
  { bar: "#D1D8A0", barBorder: "#A0D8A8", progress: "#1A3C30" },
67
67
  // sistema (light_yellow)
68
68
  { bar: "#A0D8C8", barBorder: "#6BBFA8", progress: "#14534A" },
@@ -96,12 +96,12 @@ function yt() {
96
96
  viewMode: p,
97
97
  setViewMode: T,
98
98
  visibleTypes: h,
99
- setVisibleTypes: x,
100
- newActionOpen: w,
99
+ setVisibleTypes: w,
100
+ newActionOpen: x,
101
101
  setNewActionOpen: C,
102
- newActionRef: D
103
- } = Ie(), { projectName: u, onAddNewStage: $, onAddMilestone: b, onAddEvent: F, onAddNote: S } = n, B = (r) => {
104
- x((i) => {
102
+ newActionRef: M
103
+ } = Ie(), { projectName: f, onAddNewStage: E, onAddMilestone: b, onAddEvent: F, onAddNote: S } = n, B = (r) => {
104
+ w((i) => {
105
105
  const I = new Set(i);
106
106
  return I.has(r) ? I.delete(r) : I.add(r), I;
107
107
  });
@@ -123,7 +123,7 @@ function yt() {
123
123
  /* @__PURE__ */ t("h3", { style: { margin: 0, fontSize: 14, fontWeight: 700, textTransform: "uppercase", letterSpacing: "0.1em", color: e.textTitle }, children: c("planning.gantt", "Project Planning") }),
124
124
  /* @__PURE__ */ t("div", { style: { height: 2.5, width: 64, marginTop: 6, borderRadius: 9999, background: `linear-gradient(90deg, ${e.group}, ${e.milestoneRing})` } })
125
125
  ] }),
126
- u && /* @__PURE__ */ t(
126
+ f && /* @__PURE__ */ t(
127
127
  "span",
128
128
  {
129
129
  style: {
@@ -135,7 +135,7 @@ function yt() {
135
135
  background: e.surface,
136
136
  border: `1px solid ${e.border}`
137
137
  },
138
- children: u
138
+ children: f
139
139
  }
140
140
  )
141
141
  ] }),
@@ -190,7 +190,7 @@ function yt() {
190
190
  r.type
191
191
  );
192
192
  }) }),
193
- $ && /* @__PURE__ */ o("div", { ref: D, style: { position: "relative" }, children: [
193
+ E && /* @__PURE__ */ o("div", { ref: M, style: { position: "relative" }, children: [
194
194
  /* @__PURE__ */ o(
195
195
  "button",
196
196
  {
@@ -212,11 +212,11 @@ function yt() {
212
212
  children: [
213
213
  /* @__PURE__ */ t(ot, { size: 16 }),
214
214
  /* @__PURE__ */ t("span", { children: c("charts.gantt.newAction", "New Action") }),
215
- /* @__PURE__ */ t(Be, { size: 14, style: { opacity: 0.7, transform: w ? "rotate(180deg)" : "none", transition: "transform 0.18s" } })
215
+ /* @__PURE__ */ t(Be, { size: 14, style: { opacity: 0.7, transform: x ? "rotate(180deg)" : "none", transition: "transform 0.18s" } })
216
216
  ]
217
217
  }
218
218
  ),
219
- w && /* @__PURE__ */ t(
219
+ x && /* @__PURE__ */ t(
220
220
  "div",
221
221
  {
222
222
  style: {
@@ -238,7 +238,7 @@ function yt() {
238
238
  label: c("gantt.newAction.step", "Step"),
239
239
  icon: /* @__PURE__ */ t("div", { style: { width: 14, height: 14, borderRadius: 3, background: oe[0].bar, border: `1.5px solid ${oe[0].barBorder}`, flexShrink: 0 } }),
240
240
  action: () => {
241
- $(), C(!1);
241
+ E(), C(!1);
242
242
  }
243
243
  },
244
244
  {
@@ -303,7 +303,7 @@ function yt() {
303
303
  }
304
304
  );
305
305
  }
306
- const Ve = 864e5, Q = (n, c) => new Date(n.getTime() + c * Ve), ye = (n, c) => Math.round((c.getTime() - n.getTime()) / Ve), Ye = (n) => new Date(n.getFullYear(), n.getMonth(), 1), ze = (n) => new Date(n.getFullYear(), n.getMonth() + 1, 0), ne = (n) => `${String(n.getDate()).padStart(2, "0")}/${String(n.getMonth() + 1).padStart(2, "0")}/${n.getFullYear()}`, Xe = (n, c = "en") => new Intl.DateTimeFormat(c, { month: "long" }).format(n).toUpperCase();
306
+ const Ge = 864e5, Z = (n, c) => new Date(n.getTime() + c * Ge), ye = (n, c) => Math.round((c.getTime() - n.getTime()) / Ge), Ye = (n) => new Date(n.getFullYear(), n.getMonth(), 1), We = (n) => new Date(n.getFullYear(), n.getMonth() + 1, 0), Q = (n) => `${String(n.getDate()).padStart(2, "0")}/${String(n.getMonth() + 1).padStart(2, "0")}/${n.getFullYear()}`, Oe = (n, c = "en") => new Intl.DateTimeFormat(c, { month: "long" }).format(n).toUpperCase();
307
307
  function xt() {
308
308
  const {
309
309
  props: n,
@@ -311,12 +311,12 @@ function xt() {
311
311
  displayRows: p,
312
312
  leftBodyRef: T,
313
313
  handleLeftScroll: h,
314
- toggleProject: x,
315
- toggleGroup: w,
314
+ toggleProject: w,
315
+ toggleGroup: x,
316
316
  hoveredTaskId: C,
317
- setHoveredTaskId: D,
318
- selectedTaskId: u,
319
- setSelectedTaskId: $,
317
+ setHoveredTaskId: M,
318
+ selectedTaskId: f,
319
+ setSelectedTaskId: E,
320
320
  delayedIds: b,
321
321
  criticalIds: F,
322
322
  relatedIds: S
@@ -369,7 +369,7 @@ function xt() {
369
369
  borderBottom: `1.5px solid ${e.group}44`,
370
370
  background: `${e.group}0E`
371
371
  },
372
- onClick: () => x(r.projectId),
372
+ onClick: () => w(r.projectId),
373
373
  children: /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: 8, flex: 1, minWidth: 0 }, children: [
374
374
  r.collapsed ? /* @__PURE__ */ t(Pe, { size: 15, style: { color: e.group, flexShrink: 0 } }) : /* @__PURE__ */ t(Be, { size: 15, style: { color: e.group, flexShrink: 0 } }),
375
375
  /* @__PURE__ */ t("span", { style: {
@@ -401,7 +401,7 @@ function xt() {
401
401
  borderBottom: `1px solid ${e.border}`,
402
402
  background: e.headerBg
403
403
  },
404
- onClick: () => w(A),
404
+ onClick: () => x(A),
405
405
  children: /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: 8, flex: 1, minWidth: 0 }, children: [
406
406
  r.collapsed ? /* @__PURE__ */ t(Pe, { size: 14, style: { color: e.textSecondary, flexShrink: 0 } }) : /* @__PURE__ */ t(Be, { size: 14, style: { color: e.textSecondary, flexShrink: 0 } }),
407
407
  /* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: 700, textTransform: "uppercase", letterSpacing: "0.05em", color: e.textTitle }, children: c(`gantt.group.${r.groupType}`, r.label) }),
@@ -411,7 +411,7 @@ function xt() {
411
411
  `g-${A}`
412
412
  );
413
413
  }
414
- const i = r.task, I = u === i.id, l = C === i.id, E = i.originalType !== "step", f = b.has(i.id), M = F.has(i.id), s = u !== null && i.id !== u && !S.has(i.id), y = u !== null && S.has(i.id), N = f ? "#FFF5F5" : I ? e.groupLight : y ? `${e.groupLight}99` : l ? e.pageBg : e.surface;
414
+ const i = r.task, I = f === i.id, l = C === i.id, $ = i.originalType !== "step", u = b.has(i.id), D = F.has(i.id), s = f !== null && i.id !== f && !S.has(i.id), y = f !== null && S.has(i.id), N = u ? "#FFF5F5" : I ? e.groupLight : y ? `${e.groupLight}99` : l ? e.pageBg : e.surface;
415
415
  return /* @__PURE__ */ o(
416
416
  "div",
417
417
  {
@@ -424,13 +424,13 @@ function xt() {
424
424
  height: _,
425
425
  borderBottom: `1px solid ${e.borderLight}`,
426
426
  background: N,
427
- borderLeft: I ? `3px solid ${e.group}` : y ? `3px solid ${e.group}66` : M ? `3px solid ${e.today}` : void 0,
427
+ borderLeft: I ? `3px solid ${e.group}` : y ? `3px solid ${e.group}66` : D ? `3px solid ${e.today}` : void 0,
428
428
  opacity: s ? 0.3 : 1
429
429
  },
430
- onClick: () => $((A) => A === i.id ? null : i.id),
430
+ onClick: () => E((A) => A === i.id ? null : i.id),
431
431
  onDoubleClick: () => n.onTaskClick?.(B(i)),
432
- onMouseEnter: () => D(i.id),
433
- onMouseLeave: () => D(null),
432
+ onMouseEnter: () => M(i.id),
433
+ onMouseLeave: () => M(null),
434
434
  children: [
435
435
  /* @__PURE__ */ o("div", { style: { flex: 1, display: "flex", alignItems: "center", gap: 8, minWidth: 0, paddingRight: 8 }, children: [
436
436
  i.originalType === "step" && /* @__PURE__ */ t("div", { style: { flexShrink: 0, borderRadius: 4, width: 14, height: 14, background: oe[i.colorIdx ?? 0].bar, border: `1.5px solid ${oe[i.colorIdx ?? 0].barBorder}` } }),
@@ -445,7 +445,7 @@ function xt() {
445
445
  fontSize: 13,
446
446
  fontWeight: 500,
447
447
  lineHeight: 1.25,
448
- color: I ? e.group : f ? e.today : e.textPrimary,
448
+ color: I ? e.group : u ? e.today : e.textPrimary,
449
449
  overflow: "hidden",
450
450
  textOverflow: "ellipsis",
451
451
  whiteSpace: "nowrap"
@@ -477,10 +477,10 @@ function xt() {
477
477
  /* @__PURE__ */ t(Fe, { size: 9 }),
478
478
  i.filesCount
479
479
  ] }),
480
- f && /* @__PURE__ */ t(rt, { size: 12, style: { flexShrink: 0, color: e.today } })
480
+ u && /* @__PURE__ */ t(rt, { size: 12, style: { flexShrink: 0, color: e.today } })
481
481
  ] }),
482
- /* @__PURE__ */ t("div", { style: { width: 80, fontSize: 11, fontWeight: 500, textAlign: "center", fontVariantNumeric: "tabular-nums", color: f ? e.today : e.textMuted }, children: ne(i.start) }),
483
- /* @__PURE__ */ t("div", { style: { width: 80, fontSize: 11, fontWeight: 500, textAlign: "center", fontVariantNumeric: "tabular-nums", color: f ? e.today : e.textMuted }, children: E ? "—" : ne(i.end) })
482
+ /* @__PURE__ */ t("div", { style: { width: 80, fontSize: 11, fontWeight: 500, textAlign: "center", fontVariantNumeric: "tabular-nums", color: u ? e.today : e.textMuted }, children: Q(i.start) }),
483
+ /* @__PURE__ */ t("div", { style: { width: 80, fontSize: 11, fontWeight: 500, textAlign: "center", fontVariantNumeric: "tabular-nums", color: u ? e.today : e.textMuted }, children: $ ? "—" : Q(i.end) })
484
484
  ]
485
485
  },
486
486
  i.id
@@ -493,57 +493,57 @@ function xt() {
493
493
  function bt(n, c, p = "en") {
494
494
  const T = c === "day" ? ut : ft, h = (r, i) => {
495
495
  const I = [], l = (/* @__PURE__ */ new Date()).toDateString();
496
- let E = -1;
497
- for (let f = 0; f < i; f++) {
498
- const M = Q(r, f), s = M.toDateString() === l;
499
- s && (E = f), I.push({
500
- date: M,
496
+ let $ = -1;
497
+ for (let u = 0; u < i; u++) {
498
+ const D = Z(r, u), s = D.toDateString() === l;
499
+ s && ($ = u), I.push({
500
+ date: D,
501
501
  isToday: s,
502
- isWeekend: M.getDay() === 0 || M.getDay() === 6
502
+ isWeekend: D.getDay() === 0 || D.getDay() === 6
503
503
  });
504
504
  }
505
- return { daysArr: I, todayIndex: E };
505
+ return { daysArr: I, todayIndex: $ };
506
506
  };
507
507
  if (n.length === 0) {
508
- const r = /* @__PURE__ */ new Date(), i = Ye(r), I = ze(r), l = ye(i, I) + 1, { daysArr: E, todayIndex: f } = h(i, l);
508
+ const r = /* @__PURE__ */ new Date(), i = Ye(r), I = We(r), l = ye(i, I) + 1, { daysArr: $, todayIndex: u } = h(i, l);
509
509
  return {
510
510
  start: i,
511
511
  end: I,
512
512
  totalDays: l,
513
513
  dayWidth: T,
514
514
  totalWidth: l * T,
515
- months: [{ date: i, label: `${Xe(i, p)} ${i.getFullYear()}`, startDay: 0, days: l, width: l * T }],
515
+ months: [{ date: i, label: `${Oe(i, p)} ${i.getFullYear()}`, startDay: 0, days: l, width: l * T }],
516
516
  years: [{ label: i.getFullYear().toString(), width: l * T }],
517
- days: E,
518
- todayIndex: f
517
+ days: $,
518
+ todayIndex: u
519
519
  };
520
520
  }
521
- let x = new Date(n[0].start), w = new Date(n[0].end);
521
+ let w = new Date(n[0].start), x = new Date(n[0].end);
522
522
  n.forEach((r) => {
523
- r.start < x && (x = new Date(r.start)), r.end > w && (w = new Date(r.end));
523
+ r.start < w && (w = new Date(r.start)), r.end > x && (x = new Date(r.end));
524
524
  });
525
- const C = Ye(Q(x, -14)), D = ze(Q(w, 14)), u = ye(C, D) + 1, $ = [];
525
+ const C = Ye(Z(w, -14)), M = We(Z(x, 14)), f = ye(C, M) + 1, E = [];
526
526
  let b = new Date(C);
527
- for (; b <= D; ) {
528
- const r = ze(b), i = r > D ? D : r, I = ye(C, b), l = ye(b, i) + 1;
529
- $.push({
527
+ for (; b <= M; ) {
528
+ const r = We(b), i = r > M ? M : r, I = ye(C, b), l = ye(b, i) + 1;
529
+ E.push({
530
530
  date: new Date(b),
531
- label: `${Xe(b, p)} ${b.getFullYear()}`,
531
+ label: `${Oe(b, p)} ${b.getFullYear()}`,
532
532
  startDay: I,
533
533
  days: l,
534
534
  width: l * T
535
535
  }), b = new Date(b.getFullYear(), b.getMonth() + 1, 1);
536
536
  }
537
- const { daysArr: F, todayIndex: S } = h(C, u), B = [];
537
+ const { daysArr: F, todayIndex: S } = h(C, f), B = [];
538
538
  if (c === "month") {
539
539
  let r = "", i = 0;
540
- for (const I of $) {
540
+ for (const I of E) {
541
541
  const l = I.date.getFullYear().toString();
542
542
  l !== r ? (r && B.push({ label: r, width: i * T }), r = l, i = I.days) : i += I.days;
543
543
  }
544
544
  r && B.push({ label: r, width: i * T });
545
545
  }
546
- return { start: C, end: D, totalDays: u, dayWidth: T, totalWidth: u * T, months: $, years: B, days: F, todayIndex: S };
546
+ return { start: C, end: M, totalDays: f, dayWidth: T, totalWidth: f * T, months: E, years: B, days: F, todayIndex: S };
547
547
  }
548
548
  function se(n, c) {
549
549
  return ye(c.start, n) * c.dayWidth;
@@ -554,12 +554,12 @@ function mt({
554
554
  y: p,
555
555
  w: T,
556
556
  progW: h,
557
- isHov: x,
558
- isDrag: w,
557
+ isHov: w,
558
+ isDrag: x,
559
559
  isResize: C,
560
- isCritical: D,
561
- isDelayed: u,
562
- isConnectTarget: $,
560
+ isCritical: M,
561
+ isDelayed: f,
562
+ isConnectTarget: E,
563
563
  showDots: b,
564
564
  isBarDimmed: F,
565
565
  isBarHighlighted: S,
@@ -569,12 +569,12 @@ function mt({
569
569
  }) {
570
570
  const { timeline: I, viewMode: l } = Ie();
571
571
  if (n.originalType === "step") {
572
- const E = oe[n.colorIdx ?? 0], f = p + (_ - te) / 2, M = !!(n.previsionStart && n.previsionEnd), s = M ? se(n.previsionStart, I) : 0, y = M ? Math.max(se(n.previsionEnd, I) - s, l === "month" ? I.dayWidth : 6) : 0, N = f + te + 3;
572
+ const $ = oe[n.colorIdx ?? 0], u = p + (_ - ne) / 2, D = !!(n.previsionStart && n.previsionEnd), s = D ? se(n.previsionStart, I) : 0, y = D ? Math.max(se(n.previsionEnd, I) - s, l === "month" ? I.dayWidth : 6) : 0, N = u + ne + 3;
573
573
  return /* @__PURE__ */ o(de, { children: [
574
- M && /* @__PURE__ */ t(
574
+ D && /* @__PURE__ */ t(
575
575
  "div",
576
576
  {
577
- title: `Previsto: ${ne(n.previsionStart)} → ${ne(n.previsionEnd)}`,
577
+ title: `Previsto: ${Q(n.previsionStart)} → ${Q(n.previsionEnd)}`,
578
578
  style: {
579
579
  position: "absolute",
580
580
  left: s,
@@ -582,9 +582,9 @@ function mt({
582
582
  width: y,
583
583
  height: 5,
584
584
  borderRadius: 3,
585
- background: `${E.progress}33`,
586
- border: `1.5px solid ${E.progress}66`,
587
- boxShadow: `inset 0 0 0 1px ${E.progress}22`,
585
+ background: `${$.progress}33`,
586
+ border: `1.5px solid ${$.progress}66`,
587
+ boxShadow: `inset 0 0 0 1px ${$.progress}22`,
588
588
  pointerEvents: "none",
589
589
  zIndex: 5
590
590
  }
@@ -598,31 +598,31 @@ function mt({
598
598
  style: {
599
599
  position: "absolute",
600
600
  left: c,
601
- top: f,
601
+ top: u,
602
602
  width: T,
603
- height: te,
604
- borderRadius: te / 2,
605
- background: u ? "linear-gradient(135deg, #fdd, #fee)" : E.bar,
606
- border: D ? `2px solid ${e.today}` : u ? `1.5px solid ${e.today}88` : `1.5px solid ${E.barBorder}`,
607
- cursor: w || C ? "grabbing" : "grab",
608
- zIndex: x || $ ? 20 : 10,
609
- boxShadow: $ ? `0 0 0 2px ${e.group}, 0 4px 16px ${e.group}33` : D ? `0 0 0 1px ${e.today}44, 0 3px 12px ${e.today}22` : S && !x ? `0 0 0 2px ${e.group}99, 0 3px 14px ${e.group}33` : x ? `0 3px 12px ${E.progress}22` : "none",
610
- transform: x ? "scaleY(1.06)" : "scaleY(1)",
603
+ height: ne,
604
+ borderRadius: ne / 2,
605
+ background: f ? "linear-gradient(135deg, #fdd, #fee)" : $.bar,
606
+ border: M ? `2px solid ${e.today}` : f ? `1.5px solid ${e.today}88` : `1.5px solid ${$.barBorder}`,
607
+ cursor: x || C ? "grabbing" : "grab",
608
+ zIndex: w || E ? 20 : 10,
609
+ boxShadow: E ? `0 0 0 2px ${e.group}, 0 4px 16px ${e.group}33` : M ? `0 0 0 1px ${e.today}44, 0 3px 12px ${e.today}22` : S && !w ? `0 0 0 2px ${e.group}99, 0 3px 14px ${e.group}33` : w ? `0 3px 12px ${$.progress}22` : "none",
610
+ transform: w ? "scaleY(1.06)" : "scaleY(1)",
611
611
  opacity: F ? 0.15 : 1,
612
- transition: w || C ? "none" : "box-shadow 0.2s, transform 0.15s, opacity 0.18s",
612
+ transition: x || C ? "none" : "box-shadow 0.2s, transform 0.15s, opacity 0.18s",
613
613
  overflow: "visible"
614
614
  },
615
615
  children: [
616
- /* @__PURE__ */ o("div", { style: { position: "absolute", left: 0, top: 0, width: T, height: "100%", borderRadius: te / 2, overflow: "hidden", pointerEvents: "none" }, children: [
616
+ /* @__PURE__ */ o("div", { style: { position: "absolute", left: 0, top: 0, width: T, height: "100%", borderRadius: ne / 2, overflow: "hidden", pointerEvents: "none" }, children: [
617
617
  /* @__PURE__ */ t("div", { style: {
618
618
  position: "absolute",
619
619
  left: 0,
620
620
  top: 0,
621
621
  width: h,
622
622
  height: "100%",
623
- background: u ? `linear-gradient(90deg, ${e.today}cc, ${e.today}88)` : `linear-gradient(90deg, ${E.progress}, ${E.progress}cc)`,
624
- borderRadius: `${te / 2}px 0 0 ${te / 2}px`,
625
- transition: w || C ? "none" : "width 0.3s"
623
+ background: f ? `linear-gradient(90deg, ${e.today}cc, ${e.today}88)` : `linear-gradient(90deg, ${$.progress}, ${$.progress}cc)`,
624
+ borderRadius: `${ne / 2}px 0 0 ${ne / 2}px`,
625
+ transition: x || C ? "none" : "width 0.3s"
626
626
  } }),
627
627
  T > 50 && /* @__PURE__ */ o("span", { style: {
628
628
  position: "absolute",
@@ -633,7 +633,7 @@ function mt({
633
633
  fontSize: 10,
634
634
  fontWeight: 700,
635
635
  letterSpacing: "0.05em",
636
- color: n.progress > 50 ? "#fff" : u ? e.today : E.progress,
636
+ color: n.progress > 50 ? "#fff" : f ? e.today : $.progress,
637
637
  zIndex: 1,
638
638
  pointerEvents: "none"
639
639
  }, children: [
@@ -641,8 +641,8 @@ function mt({
641
641
  "%"
642
642
  ] })
643
643
  ] }),
644
- /* @__PURE__ */ t("div", { onMouseDown: (A) => r(A, n, "left"), style: { position: "absolute", left: 0, top: 0, width: 8, height: "100%", cursor: "col-resize", zIndex: 2, borderRadius: `${te / 2}px 0 0 ${te / 2}px` } }),
645
- /* @__PURE__ */ t("div", { onMouseDown: (A) => r(A, n, "right"), style: { position: "absolute", right: 0, top: 0, width: 8, height: "100%", cursor: "col-resize", zIndex: 2, borderRadius: `0 ${te / 2}px ${te / 2}px 0` } }),
644
+ /* @__PURE__ */ t("div", { onMouseDown: (A) => r(A, n, "left"), style: { position: "absolute", left: 0, top: 0, width: 8, height: "100%", cursor: "col-resize", zIndex: 2, borderRadius: `${ne / 2}px 0 0 ${ne / 2}px` } }),
645
+ /* @__PURE__ */ t("div", { onMouseDown: (A) => r(A, n, "right"), style: { position: "absolute", right: 0, top: 0, width: 8, height: "100%", cursor: "col-resize", zIndex: 2, borderRadius: `0 ${ne / 2}px ${ne / 2}px 0` } }),
646
646
  b && /* @__PURE__ */ o(de, { children: [
647
647
  /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (A) => i(A, n, "left"), style: { position: "absolute", left: -7, top: "50%", transform: "translateY(-50%)", width: 14, height: 14, borderRadius: "50%", background: e.group, border: "2.5px solid #fff", boxShadow: "0 1px 4px rgba(0,0,0,0.25)", cursor: "crosshair", zIndex: 30 } }),
648
648
  /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (A) => i(A, n, "right"), style: { position: "absolute", right: -7, top: "50%", transform: "translateY(-50%)", width: 14, height: 14, borderRadius: "50%", background: e.group, border: "2.5px solid #fff", boxShadow: "0 1px 4px rgba(0,0,0,0.25)", cursor: "crosshair", zIndex: 30 } })
@@ -653,7 +653,7 @@ function mt({
653
653
  ] });
654
654
  }
655
655
  if (n.originalType === "milestone") {
656
- const E = p + (_ - fe) / 2;
656
+ const $ = p + (_ - fe) / 2;
657
657
  return /* @__PURE__ */ o(
658
658
  "div",
659
659
  {
@@ -662,40 +662,40 @@ function mt({
662
662
  style: {
663
663
  position: "absolute",
664
664
  left: c - 6,
665
- top: E,
665
+ top: $,
666
666
  height: fe,
667
667
  minWidth: Le,
668
668
  borderRadius: fe / 2,
669
- background: D ? "linear-gradient(135deg, #fee, #fff5f5)" : "linear-gradient(135deg, #e8f5ee, #f0f8f4)",
670
- border: $ ? `2px solid ${e.group}` : D ? `2px solid ${e.today}` : `1.5px solid ${e.milestoneRing}`,
669
+ background: M ? "linear-gradient(135deg, #fee, #fff5f5)" : "linear-gradient(135deg, #e8f5ee, #f0f8f4)",
670
+ border: E ? `2px solid ${e.group}` : M ? `2px solid ${e.today}` : `1.5px solid ${e.milestoneRing}`,
671
671
  display: "flex",
672
672
  alignItems: "center",
673
673
  gap: 6,
674
674
  paddingLeft: 4,
675
675
  paddingRight: 12,
676
- cursor: w ? "grabbing" : "grab",
677
- zIndex: x || $ ? 20 : 10,
678
- boxShadow: $ ? `0 0 0 2px ${e.group}, 0 4px 16px ${e.group}33` : D ? `0 0 0 1px ${e.today}44, 0 3px 12px ${e.today}22` : S && !x ? `0 0 0 2px ${e.group}99, 0 3px 14px ${e.group}33` : x ? `0 3px 12px ${e.milestone}22` : "0 1px 3px rgba(0,0,0,0.06)",
676
+ cursor: x ? "grabbing" : "grab",
677
+ zIndex: w || E ? 20 : 10,
678
+ boxShadow: E ? `0 0 0 2px ${e.group}, 0 4px 16px ${e.group}33` : M ? `0 0 0 1px ${e.today}44, 0 3px 12px ${e.today}22` : S && !w ? `0 0 0 2px ${e.group}99, 0 3px 14px ${e.group}33` : w ? `0 3px 12px ${e.milestone}22` : "0 1px 3px rgba(0,0,0,0.06)",
679
679
  opacity: F ? 0.15 : 1,
680
680
  transition: "box-shadow 0.2s, transform 0.15s, opacity 0.18s",
681
- transform: x ? "translateY(-1px)" : "none",
681
+ transform: w ? "translateY(-1px)" : "none",
682
682
  whiteSpace: "nowrap",
683
683
  overflow: "visible"
684
684
  },
685
685
  children: [
686
- /* @__PURE__ */ t("div", { style: { width: 20, height: 20, borderRadius: "50%", background: D ? e.today : e.milestone, display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ t(Se, { size: 11, color: "#fff", strokeWidth: 2.5 }) }),
687
- /* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: 600, color: D ? e.today : e.milestone, overflow: "hidden", textOverflow: "ellipsis", maxWidth: 130 }, children: n.name }),
686
+ /* @__PURE__ */ t("div", { style: { width: 20, height: 20, borderRadius: "50%", background: M ? e.today : e.milestone, display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ t(Se, { size: 11, color: "#fff", strokeWidth: 2.5 }) }),
687
+ /* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: 600, color: M ? e.today : e.milestone, overflow: "hidden", textOverflow: "ellipsis", maxWidth: 130 }, children: n.name }),
688
688
  n.progress >= 100 && /* @__PURE__ */ t("span", { style: { fontSize: 9, fontWeight: 700, color: "#fff", background: e.milestoneRing, borderRadius: 6, padding: "1px 5px" }, children: "✓" }),
689
689
  b && /* @__PURE__ */ o(de, { children: [
690
- /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (f) => i(f, n, "left"), style: { position: "absolute", left: -7, top: "50%", transform: "translateY(-50%)", width: 14, height: 14, borderRadius: "50%", background: e.group, border: "2.5px solid #fff", boxShadow: "0 1px 4px rgba(0,0,0,0.25)", cursor: "crosshair", zIndex: 30 } }),
691
- /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (f) => i(f, n, "right"), style: { position: "absolute", right: -7, top: "50%", transform: "translateY(-50%)", width: 14, height: 14, borderRadius: "50%", background: e.group, border: "2.5px solid #fff", boxShadow: "0 1px 4px rgba(0,0,0,0.25)", cursor: "crosshair", zIndex: 30 } })
690
+ /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (u) => i(u, n, "left"), style: { position: "absolute", left: -7, top: "50%", transform: "translateY(-50%)", width: 14, height: 14, borderRadius: "50%", background: e.group, border: "2.5px solid #fff", boxShadow: "0 1px 4px rgba(0,0,0,0.25)", cursor: "crosshair", zIndex: 30 } }),
691
+ /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (u) => i(u, n, "right"), style: { position: "absolute", right: -7, top: "50%", transform: "translateY(-50%)", width: 14, height: 14, borderRadius: "50%", background: e.group, border: "2.5px solid #fff", boxShadow: "0 1px 4px rgba(0,0,0,0.25)", cursor: "crosshair", zIndex: 30 } })
692
692
  ] })
693
693
  ]
694
694
  }
695
695
  );
696
696
  }
697
697
  if (n.originalType === "event") {
698
- const E = p + (_ - fe) / 2;
698
+ const $ = p + (_ - fe) / 2;
699
699
  return /* @__PURE__ */ o(
700
700
  "div",
701
701
  {
@@ -704,40 +704,40 @@ function mt({
704
704
  style: {
705
705
  position: "absolute",
706
706
  left: c - 6,
707
- top: E,
707
+ top: $,
708
708
  height: fe,
709
709
  minWidth: Le,
710
710
  borderRadius: fe / 2,
711
- background: D ? "linear-gradient(135deg, #fee, #fff5f5)" : "linear-gradient(135deg, #fff7ed, #ffedd5)",
712
- border: $ ? `2px solid ${e.group}` : D ? `2px solid ${e.today}` : `1.5px solid ${e.event}`,
711
+ background: M ? "linear-gradient(135deg, #fee, #fff5f5)" : "linear-gradient(135deg, #fff7ed, #ffedd5)",
712
+ border: E ? `2px solid ${e.group}` : M ? `2px solid ${e.today}` : `1.5px solid ${e.event}`,
713
713
  display: "flex",
714
714
  alignItems: "center",
715
715
  gap: 6,
716
716
  paddingLeft: 4,
717
717
  paddingRight: 12,
718
- cursor: w ? "grabbing" : "grab",
719
- zIndex: x || $ ? 20 : 10,
720
- boxShadow: $ ? `0 0 0 2px ${e.group}, 0 4px 16px ${e.group}33` : D ? `0 0 0 1px ${e.today}44, 0 3px 12px ${e.today}22` : S && !x ? `0 0 0 2px ${e.group}99, 0 3px 14px ${e.group}33` : x ? `0 3px 12px ${e.event}33` : "0 1px 3px rgba(0,0,0,0.06)",
718
+ cursor: x ? "grabbing" : "grab",
719
+ zIndex: w || E ? 20 : 10,
720
+ boxShadow: E ? `0 0 0 2px ${e.group}, 0 4px 16px ${e.group}33` : M ? `0 0 0 1px ${e.today}44, 0 3px 12px ${e.today}22` : S && !w ? `0 0 0 2px ${e.group}99, 0 3px 14px ${e.group}33` : w ? `0 3px 12px ${e.event}33` : "0 1px 3px rgba(0,0,0,0.06)",
721
721
  opacity: F ? 0.15 : 1,
722
722
  transition: "box-shadow 0.2s, transform 0.15s, opacity 0.18s",
723
- transform: x ? "translateY(-1px)" : "none",
723
+ transform: w ? "translateY(-1px)" : "none",
724
724
  whiteSpace: "nowrap",
725
725
  overflow: "visible"
726
726
  },
727
727
  children: [
728
- /* @__PURE__ */ t("div", { style: { width: 20, height: 20, borderRadius: "50%", background: D ? e.today : e.event, display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ t(ke, { size: 11, color: "#fff", strokeWidth: 2.5 }) }),
729
- /* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: 600, color: D ? e.today : e.event, overflow: "hidden", textOverflow: "ellipsis", maxWidth: 130 }, children: n.name }),
728
+ /* @__PURE__ */ t("div", { style: { width: 20, height: 20, borderRadius: "50%", background: M ? e.today : e.event, display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ t(ke, { size: 11, color: "#fff", strokeWidth: 2.5 }) }),
729
+ /* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: 600, color: M ? e.today : e.event, overflow: "hidden", textOverflow: "ellipsis", maxWidth: 130 }, children: n.name }),
730
730
  n.progress >= 100 && /* @__PURE__ */ t("span", { style: { fontSize: 9, fontWeight: 700, color: "#fff", background: e.event, borderRadius: 6, padding: "1px 5px" }, children: "✓" }),
731
731
  b && /* @__PURE__ */ o(de, { children: [
732
- /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (f) => i(f, n, "left"), style: { position: "absolute", left: -7, top: "50%", transform: "translateY(-50%)", width: 14, height: 14, borderRadius: "50%", background: e.group, border: "2.5px solid #fff", boxShadow: "0 1px 4px rgba(0,0,0,0.25)", cursor: "crosshair", zIndex: 30 } }),
733
- /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (f) => i(f, n, "right"), style: { position: "absolute", right: -7, top: "50%", transform: "translateY(-50%)", width: 14, height: 14, borderRadius: "50%", background: e.group, border: "2.5px solid #fff", boxShadow: "0 1px 4px rgba(0,0,0,0.25)", cursor: "crosshair", zIndex: 30 } })
732
+ /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (u) => i(u, n, "left"), style: { position: "absolute", left: -7, top: "50%", transform: "translateY(-50%)", width: 14, height: 14, borderRadius: "50%", background: e.group, border: "2.5px solid #fff", boxShadow: "0 1px 4px rgba(0,0,0,0.25)", cursor: "crosshair", zIndex: 30 } }),
733
+ /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (u) => i(u, n, "right"), style: { position: "absolute", right: -7, top: "50%", transform: "translateY(-50%)", width: 14, height: 14, borderRadius: "50%", background: e.group, border: "2.5px solid #fff", boxShadow: "0 1px 4px rgba(0,0,0,0.25)", cursor: "crosshair", zIndex: 30 } })
734
734
  ] })
735
735
  ]
736
736
  }
737
737
  );
738
738
  }
739
739
  if (n.originalType === "note") {
740
- const M = p + (_ - 44) / 2, s = n.noteColor || e.note;
740
+ const u = p + 4, D = n.noteColor || "#FEF08A", s = n.filesCount || 0;
741
741
  return /* @__PURE__ */ o(
742
742
  "div",
743
743
  {
@@ -745,53 +745,73 @@ function mt({
745
745
  ...B,
746
746
  style: {
747
747
  position: "absolute",
748
- left: c - 36 / 2,
749
- top: M,
750
- width: 36,
751
- height: 44,
752
- background: s,
753
- borderRadius: 2,
754
- cursor: w ? "grabbing" : "grab",
755
- zIndex: x || $ ? 20 : 10,
756
- boxShadow: $ ? `0 0 0 2px ${e.group}, 0 4px 16px ${e.group}33` : S && !x ? `0 0 0 2px ${e.group}99, 0 3px 14px ${e.group}33` : x ? "3px 4px 12px rgba(0,0,0,0.2)" : "1px 2px 5px rgba(0,0,0,0.15)",
748
+ left: c,
749
+ top: u,
750
+ width: 148,
751
+ minHeight: 72,
752
+ background: D,
753
+ borderRadius: 3,
754
+ cursor: x ? "grabbing" : "grab",
755
+ zIndex: w || E ? 20 : 10,
756
+ boxShadow: E ? `0 0 0 2px ${e.group}, 4px 6px 16px rgba(0,0,0,0.22)` : S && !w ? `0 0 0 2px ${e.group}99, 3px 4px 14px rgba(0,0,0,0.18)` : w ? "4px 6px 18px rgba(0,0,0,0.22)" : "2px 3px 8px rgba(0,0,0,0.13)",
757
757
  opacity: F ? 0.2 : 1,
758
- transition: "box-shadow 0.2s, transform 0.15s, opacity 0.18s",
759
- transform: x ? "rotate(-2deg) scale(1.05)" : "none",
760
- overflow: "visible",
758
+ transition: x ? "none" : "box-shadow 0.2s, transform 0.15s, opacity 0.18s",
759
+ transform: w ? "rotate(-1.5deg) scale(1.03) translateY(-2px)" : "rotate(0deg)",
760
+ border: "1px solid rgba(0,0,0,0.06)",
761
+ padding: "12px 10px 10px",
761
762
  display: "flex",
762
763
  flexDirection: "column",
763
- border: "1px solid rgba(0,0,0,0.04)"
764
+ gap: 2,
765
+ userSelect: "none"
764
766
  },
765
767
  children: [
766
- /* @__PURE__ */ t("div", { style: { position: "absolute", top: -5, left: "50%", transform: "translateX(-50%)", width: 18, height: 6, background: "rgba(255,255,255,0.6)", borderRadius: 1, boxShadow: "0 1px 2px rgba(0,0,0,0.05)" } }),
767
- /* @__PURE__ */ o("div", { style: { padding: "6px 4px 2px", flex: 1, overflow: "hidden" }, children: [
768
- /* @__PURE__ */ t("div", { style: { width: "80%", height: 2, background: "rgba(0,0,0,0.1)", borderRadius: 1, marginBottom: 3 } }),
769
- /* @__PURE__ */ t("div", { style: { width: "60%", height: 2, background: "rgba(0,0,0,0.1)", borderRadius: 1, marginBottom: 3 } }),
770
- /* @__PURE__ */ t("div", { style: { width: "90%", height: 2, background: "rgba(0,0,0,0.1)", borderRadius: 1 } })
771
- ] }),
772
- (n.filesCount || 0) > 0 && /* @__PURE__ */ t("div", { style: { position: "absolute", bottom: -5, right: -5, background: e.headerBg, color: e.textSecondary, borderRadius: "50%", border: `1px solid ${e.borderLight}`, width: 16, height: 16, display: "flex", alignItems: "center", justifyContent: "center", boxShadow: "0 1px 3px rgba(0,0,0,0.1)", zIndex: 2 }, children: /* @__PURE__ */ t(Fe, { size: 8 }) }),
773
768
  /* @__PURE__ */ t("div", { style: {
774
769
  position: "absolute",
775
- top: "100%",
770
+ top: -6,
776
771
  left: "50%",
777
772
  transform: "translateX(-50%)",
778
- marginTop: 6,
779
- background: "rgba(255,255,255,0.95)",
780
- padding: "3px 8px",
781
- borderRadius: 4,
782
- border: `1px solid ${e.borderLight}`,
783
- fontSize: 10,
784
- fontWeight: 500,
785
- color: e.textPrimary,
786
- whiteSpace: "nowrap",
787
- pointerEvents: "none",
788
- opacity: x ? 1 : 0,
789
- transition: "opacity 0.15s",
790
- boxShadow: "0 2px 8px rgba(0,0,0,0.08)"
773
+ width: 40,
774
+ height: 11,
775
+ background: "rgba(255,255,255,0.55)",
776
+ borderRadius: 2,
777
+ boxShadow: "0 1px 3px rgba(0,0,0,0.08)"
778
+ } }),
779
+ /* @__PURE__ */ t("span", { style: {
780
+ fontSize: 13,
781
+ fontWeight: 700,
782
+ color: "#1a1a1a",
783
+ lineHeight: "1.3",
784
+ wordBreak: "break-word",
785
+ display: "-webkit-box",
786
+ WebkitLineClamp: 2,
787
+ WebkitBoxOrient: "vertical",
788
+ overflow: "hidden"
791
789
  }, children: n.name }),
790
+ n.projectTitle && /* @__PURE__ */ t("span", { style: {
791
+ fontSize: 10,
792
+ fontWeight: 400,
793
+ color: "rgba(0,0,0,0.55)",
794
+ overflow: "hidden",
795
+ textOverflow: "ellipsis",
796
+ whiteSpace: "nowrap"
797
+ }, children: n.projectTitle }),
798
+ /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginTop: 2 }, children: [
799
+ /* @__PURE__ */ t("span", { style: { fontSize: 9, fontWeight: 500, color: "rgba(0,0,0,0.45)" }, children: Q(n.start) }),
800
+ s > 0 && /* @__PURE__ */ o("span", { style: {
801
+ display: "flex",
802
+ alignItems: "center",
803
+ gap: 2,
804
+ fontSize: 9,
805
+ color: "rgba(0,0,0,0.45)"
806
+ }, children: [
807
+ /* @__PURE__ */ t(Fe, { size: 8 }),
808
+ " ",
809
+ s
810
+ ] })
811
+ ] }),
792
812
  b && /* @__PURE__ */ o(de, { children: [
793
- /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (y) => i(y, n, "left"), style: { position: "absolute", left: -10, top: "50%", transform: "translateY(-50%)", width: 14, height: 14, borderRadius: "50%", background: e.group, border: "2.5px solid #fff", boxShadow: "0 1px 4px rgba(0,0,0,0.25)", cursor: "crosshair", zIndex: 30 } }),
794
- /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (y) => i(y, n, "right"), style: { position: "absolute", right: -10, top: "50%", transform: "translateY(-50%)", width: 14, height: 14, borderRadius: "50%", background: e.group, border: "2.5px solid #fff", boxShadow: "0 1px 4px rgba(0,0,0,0.25)", cursor: "crosshair", zIndex: 30 } })
813
+ /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (y) => i(y, n, "left"), style: { position: "absolute", left: -7, top: "50%", transform: "translateY(-50%)", width: 14, height: 14, borderRadius: "50%", background: e.group, border: "2.5px solid #fff", boxShadow: "0 1px 4px rgba(0,0,0,0.25)", cursor: "crosshair", zIndex: 30 } }),
814
+ /* @__PURE__ */ t("div", { "data-task-id": n.id, onMouseDown: (y) => i(y, n, "right"), style: { position: "absolute", right: -7, top: "50%", transform: "translateY(-50%)", width: 14, height: 14, borderRadius: "50%", background: e.group, border: "2.5px solid #fff", boxShadow: "0 1px 4px rgba(0,0,0,0.25)", cursor: "crosshair", zIndex: 30 } })
795
815
  ] })
796
816
  ]
797
817
  }
@@ -806,16 +826,16 @@ function vt() {
806
826
  selectedTaskId: p,
807
827
  relatedIds: T
808
828
  } = Ie();
809
- return /* @__PURE__ */ t(de, { children: n.map((h, x) => {
810
- const w = c === h.predId || c === h.succId, C = !p || h.predId === p || h.succId === p || T.has(h.predId) || T.has(h.succId), D = p !== null && C, u = w ? e.arrowHover : D ? e.group : e.arrow;
811
- return /* @__PURE__ */ o("g", { style: { opacity: C ? D ? 1 : void 0 : 0.08, transition: "opacity 0.18s" }, children: [
829
+ return /* @__PURE__ */ t(de, { children: n.map((h, w) => {
830
+ const x = c === h.predId || c === h.succId, C = !p || h.predId === p || h.succId === p || T.has(h.predId) || T.has(h.succId), M = p !== null && C, f = x ? e.arrowHover : M ? e.group : e.arrow;
831
+ return /* @__PURE__ */ o("g", { style: { opacity: C ? M ? 1 : void 0 : 0.08, transition: "opacity 0.18s" }, children: [
812
832
  /* @__PURE__ */ t(
813
833
  "path",
814
834
  {
815
835
  d: h.path,
816
836
  fill: "none",
817
- stroke: u,
818
- strokeWidth: D ? 2.5 : w ? 2 : 1.5,
837
+ stroke: f,
838
+ strokeWidth: M ? 2.5 : x ? 2 : 1.5,
819
839
  style: { transition: "stroke 0.2s, stroke-width 0.2s" }
820
840
  }
821
841
  ),
@@ -823,14 +843,14 @@ function vt() {
823
843
  "polygon",
824
844
  {
825
845
  points: `${h.headX},${h.headY} ${h.headX - 6},${h.headY - 4} ${h.headX - 6},${h.headY + 4}`,
826
- fill: u,
846
+ fill: f,
827
847
  style: { transition: "fill 0.2s" }
828
848
  }
829
849
  )
830
- ] }, x);
850
+ ] }, w);
831
851
  }) });
832
852
  }
833
- const We = (n) => ({
853
+ const ze = (n) => ({
834
854
  id: n.id,
835
855
  name: n.name,
836
856
  start: n.start,
@@ -858,12 +878,12 @@ function wt() {
858
878
  timeline: p,
859
879
  displayRows: T,
860
880
  dragState: h,
861
- resizeState: x,
862
- connectState: w,
881
+ resizeState: w,
882
+ connectState: x,
863
883
  pendingConnection: C,
864
- setPendingConnection: D,
865
- depModalType: u,
866
- setDepModalType: $,
884
+ setPendingConnection: M,
885
+ depModalType: f,
886
+ setDepModalType: E,
867
887
  depModalLag: b,
868
888
  setDepModalLag: F,
869
889
  depCreating: S,
@@ -872,41 +892,41 @@ function wt() {
872
892
  chartMenu: i,
873
893
  setChartMenu: I,
874
894
  rightBodyRef: l,
875
- timeHeaderRef: E,
876
- handleChartMouseDown: f,
877
- handleChartWheel: M,
895
+ timeHeaderRef: $,
896
+ handleChartMouseDown: u,
897
+ handleChartWheel: D,
878
898
  openChartMenu: s,
879
899
  hoveredTaskId: y,
880
900
  setHoveredTaskId: N,
881
901
  selectedTaskId: A,
882
- setSelectedTaskId: Z,
902
+ setSelectedTaskId: ee,
883
903
  tooltip: k,
884
904
  setTooltip: g,
885
905
  popupState: Y,
886
- setPopupState: H,
906
+ setPopupState: V,
887
907
  criticalIds: q,
888
- delayedIds: G,
908
+ delayedIds: H,
889
909
  relatedIds: ie,
890
910
  handleBarMouseDown: xe,
891
911
  handleResizeMouseDown: Te,
892
912
  handleConnectDotMouseDown: be,
893
- handleCreateDependency: De
913
+ handleCreateDependency: Me
894
914
  } = Ie(), {
895
915
  translations: le,
896
916
  onViewStage: me,
897
- onEditStage: Me,
917
+ onEditStage: De,
898
918
  onDeleteStage: j,
899
- onDeleteDependency: O,
919
+ onDeleteDependency: X,
900
920
  onAddNewStage: Re,
901
921
  onAddMilestone: Ce,
902
- onAddEvent: $e,
903
- onAddNote: Ee
904
- } = n, R = (m, a) => le ? typeof le == "function" ? le(m, a) : le[m] || a : a, he = (m, a) => Math.round((a.getTime() - m.getTime()) / 864e5) + 1, re = Math.max(T.length * _, 400), ue = () => H({ isOpen: !1, position: { x: 0, y: 0 }, task: null });
922
+ onAddEvent: Ee,
923
+ onAddNote: $e
924
+ } = n, R = (m, a) => le ? typeof le == "function" ? le(m, a) : le[m] || a : a, he = (m, a) => Math.round((a.getTime() - m.getTime()) / 864e5) + 1, re = Math.max(T.length * _, 400) + 80, ue = () => V({ isOpen: !1, position: { x: 0, y: 0 }, task: null });
905
925
  return /* @__PURE__ */ o("div", { style: { flex: 1, width: "100%", background: "#FAFAFA", display: "flex", flexDirection: "column", position: "relative", overflow: "hidden", borderLeft: `1px solid ${e.borderLight}` }, children: [
906
926
  /* @__PURE__ */ t(
907
927
  "div",
908
928
  {
909
- ref: E,
929
+ ref: $,
910
930
  style: {
911
931
  height: we * 2,
912
932
  background: e.headerBg,
@@ -916,7 +936,7 @@ function wt() {
916
936
  flexShrink: 0,
917
937
  boxShadow: "0 1px 3px rgba(0,0,0,0.02)"
918
938
  },
919
- onWheel: M,
939
+ onWheel: D,
920
940
  children: /* @__PURE__ */ o("div", { style: { width: p.totalWidth, height: "100%", position: "relative" }, children: [
921
941
  /* @__PURE__ */ o("div", { style: { position: "absolute", top: 0, left: 0, right: 0, height: we, display: "flex" }, children: [
922
942
  c === "day" && p.months.map((m, a) => /* @__PURE__ */ t("div", { style: { width: m.width, position: "relative", height: "100%", borderRight: `1px solid ${e.borderLight}`, paddingLeft: 12, display: "flex", alignItems: "flex-end", paddingBottom: 6 }, children: /* @__PURE__ */ t("span", { style: { fontSize: 13, fontWeight: 700, color: e.textTitle, letterSpacing: "0.02em" }, children: m.label }) }, a)),
@@ -938,8 +958,8 @@ function wt() {
938
958
  ref: l,
939
959
  className: "zg-no-scrollbar",
940
960
  style: { flex: 1, overflow: "auto", background: "#fff", position: "relative" },
941
- onMouseDown: f,
942
- onWheel: M,
961
+ onMouseDown: u,
962
+ onWheel: D,
943
963
  onContextMenu: s,
944
964
  children: /* @__PURE__ */ o("div", { style: { width: p.totalWidth, height: re, position: "relative" }, children: [
945
965
  /* @__PURE__ */ o("svg", { width: p.totalWidth, height: re, style: { position: "absolute", top: 0, left: 0, pointerEvents: "none" }, children: [
@@ -969,10 +989,10 @@ function wt() {
969
989
  /* @__PURE__ */ o("div", { style: { position: "absolute", inset: 0 }, children: [
970
990
  T.map((m, a) => {
971
991
  if (m.kind !== "task") return null;
972
- const d = m.task, v = h?.task.id === d.id, W = x?.task.id === d.id, L = v || W && x.edge === "left" ? Q(d.start, v ? h.offsetDays : x.offsetDays) : d.start, z = v || W && x.edge === "right" ? Q(d.end, v ? h.offsetDays : x.offsetDays) : d.end, X = d.originalType !== "step";
973
- let ce = se(L, p), U = 0, ee = 0;
974
- X || (U = Math.max(se(z, p) - ce, p.dayWidth), ee = U * (d.progress / 100));
975
- const je = y === d.id, Ae = A === d.id, He = G.has(d.id), Ue = q.has(d.id), qe = !!A && !Ae && !ie.has(d.id), Ke = Ae || !!A && ie.has(d.id), Je = w?.hoverTargetId === d.id, Qe = je || Ae, Ze = a * _;
992
+ const d = m.task, v = h?.task.id === d.id, z = w?.task.id === d.id, L = v || z && w.edge === "left" ? Z(d.start, v ? h.offsetDays : w.offsetDays) : d.start, W = v || z && w.edge === "right" ? Z(d.end, v ? h.offsetDays : w.offsetDays) : d.end, O = d.originalType !== "step";
993
+ let ce = se(L, p), U = 0, te = 0;
994
+ O || (U = Math.max(se(W, p) - ce, p.dayWidth), te = U * (d.progress / 100));
995
+ const je = y === d.id, Ae = A === d.id, Ve = H.has(d.id), Ue = q.has(d.id), qe = !!A && !Ae && !ie.has(d.id), Ke = Ae || !!A && ie.has(d.id), Je = x?.hoverTargetId === d.id, Qe = je || Ae, Ze = a * _;
976
996
  return /* @__PURE__ */ t(
977
997
  mt,
978
998
  {
@@ -980,28 +1000,28 @@ function wt() {
980
1000
  x: ce,
981
1001
  y: Ze,
982
1002
  w: U,
983
- progW: ee,
1003
+ progW: te,
984
1004
  isHov: je,
985
1005
  isDrag: v,
986
- isResize: W,
1006
+ isResize: z,
987
1007
  isCritical: Ue,
988
- isDelayed: He,
1008
+ isDelayed: Ve,
989
1009
  isConnectTarget: Je,
990
1010
  showDots: Qe,
991
1011
  isBarDimmed: qe,
992
1012
  isBarHighlighted: Ke,
993
1013
  commonEvents: {
994
1014
  onMouseEnter: (K) => {
995
- N(d.id), !h && !x && g({ task: d, x: K.clientX, y: K.clientY });
1015
+ N(d.id), !h && !w && g({ task: d, x: K.clientX, y: K.clientY });
996
1016
  },
997
1017
  onMouseMove: (K) => {
998
- y === d.id && !h && !x && g({ task: d, x: K.clientX, y: K.clientY });
1018
+ y === d.id && !h && !w && g({ task: d, x: K.clientX, y: K.clientY });
999
1019
  },
1000
1020
  onMouseLeave: () => {
1001
1021
  N(null), g(null);
1002
1022
  },
1003
1023
  onClick: (K) => {
1004
- K.stopPropagation(), Z(d.id), K.detail === 2 && me?.(We(d)), H(!Y.isOpen || Y.task?.id !== d.id ? {
1024
+ K.stopPropagation(), ee(d.id), K.detail === 2 && me?.(ze(d)), V(!Y.isOpen || Y.task?.id !== d.id ? {
1005
1025
  isOpen: !0,
1006
1026
  position: { x: K.clientX, y: K.clientY },
1007
1027
  task: d
@@ -1044,14 +1064,14 @@ function wt() {
1044
1064
  R("gantt.tooltip.start", "Start"),
1045
1065
  ":"
1046
1066
  ] }),
1047
- /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(k.task.previsionStart) })
1067
+ /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: Q(k.task.previsionStart) })
1048
1068
  ] }),
1049
1069
  /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1050
1070
  /* @__PURE__ */ o("span", { children: [
1051
1071
  R("gantt.tooltip.end", "End"),
1052
1072
  ":"
1053
1073
  ] }),
1054
- /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(k.task.previsionEnd) })
1074
+ /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: Q(k.task.previsionEnd) })
1055
1075
  ] }),
1056
1076
  /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1057
1077
  /* @__PURE__ */ o("span", { children: [
@@ -1074,14 +1094,14 @@ function wt() {
1074
1094
  R("gantt.tooltip.start", "Start"),
1075
1095
  ":"
1076
1096
  ] }),
1077
- /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(k.task.start) })
1097
+ /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: Q(k.task.start) })
1078
1098
  ] }),
1079
1099
  /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1080
1100
  /* @__PURE__ */ o("span", { children: [
1081
1101
  R("gantt.tooltip.end", "End"),
1082
1102
  ":"
1083
1103
  ] }),
1084
- /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(k.task.end) })
1104
+ /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: Q(k.task.end) })
1085
1105
  ] }),
1086
1106
  /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1087
1107
  /* @__PURE__ */ o("span", { children: [
@@ -1114,7 +1134,7 @@ function wt() {
1114
1134
  R("gantt.tooltip.date", "Date"),
1115
1135
  ":"
1116
1136
  ] }),
1117
- /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(k.task.start) })
1137
+ /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: Q(k.task.start) })
1118
1138
  ] }),
1119
1139
  (k.task.filesCount || 0) > 0 && /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", gap: 16 }, children: [
1120
1140
  /* @__PURE__ */ o("span", { children: [
@@ -1131,7 +1151,7 @@ function wt() {
1131
1151
  R("charts.gantt.start", "Start"),
1132
1152
  ":"
1133
1153
  ] }),
1134
- /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: ne(k.task.start) })
1154
+ /* @__PURE__ */ t("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums", color: e.textPrimary }, children: Q(k.task.start) })
1135
1155
  ] }) })
1136
1156
  ]
1137
1157
  }
@@ -1141,25 +1161,25 @@ function wt() {
1141
1161
  }
1142
1162
  ),
1143
1163
  Y.task && Y.isOpen && (() => {
1144
- const m = Y.task, a = (n.dependencies || []).filter((z) => z.predecessorId === m.id || z.successorId === m.id), d = { FS: R("gantt.depType.fs", "Finish to Start"), SS: R("gantt.depType.ss", "Start to Start"), FF: R("gantt.depType.ff", "Finish to Finish"), SF: R("gantt.depType.sf", "Start to Finish") }, v = a.length > 0 ? 300 : 220, W = Math.min(Y.position.x, window.innerWidth - v - 16), L = Y.position.y + 8;
1164
+ const m = Y.task, a = (n.dependencies || []).filter((W) => W.predecessorId === m.id || W.successorId === m.id), d = { FS: R("gantt.depType.fs", "Finish to Start"), SS: R("gantt.depType.ss", "Start to Start"), FF: R("gantt.depType.ff", "Finish to Finish"), SF: R("gantt.depType.sf", "Start to Finish") }, v = a.length > 0 ? 300 : 220, z = Math.min(Y.position.x, window.innerWidth - v - 16), L = Y.position.y + 8;
1145
1165
  return /* @__PURE__ */ o(
1146
1166
  "div",
1147
1167
  {
1148
1168
  "data-popup": "gantt-action",
1149
- style: { position: "fixed", left: W, top: L, zIndex: 9999, background: "#fff", borderRadius: 4, boxShadow: "0 12px 40px rgba(0,0,0,0.14), 0 3px 10px rgba(0,0,0,0.07)", border: `1.5px solid ${e.borderLight}`, width: v, overflow: "hidden" },
1150
- onMouseDown: (z) => z.stopPropagation(),
1169
+ style: { position: "fixed", left: z, top: L, zIndex: 9999, background: "#fff", borderRadius: 4, boxShadow: "0 12px 40px rgba(0,0,0,0.14), 0 3px 10px rgba(0,0,0,0.07)", border: `1.5px solid ${e.borderLight}`, width: v, overflow: "hidden" },
1170
+ onMouseDown: (W) => W.stopPropagation(),
1151
1171
  children: [
1152
1172
  /* @__PURE__ */ t("div", { style: { padding: "12px 14px 10px", borderBottom: `1px solid ${e.borderLight}` }, children: /* @__PURE__ */ t("p", { style: { fontSize: 13, fontWeight: 700, color: e.group, margin: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, title: m.name, children: m.name }) }),
1153
1173
  /* @__PURE__ */ o("div", { style: { display: "flex", flexDirection: "column", gap: 2, padding: "8px 6px" }, children: [
1154
1174
  /* @__PURE__ */ o("button", { onClick: () => {
1155
- me?.(We(m)), ue();
1175
+ me?.(ze(m)), ue();
1156
1176
  }, className: "zg-popup-btn", children: [
1157
1177
  /* @__PURE__ */ t(it, { size: 15 }),
1158
1178
  " ",
1159
1179
  /* @__PURE__ */ t("span", { children: R("gantt.popup.viewDetails", "View details") })
1160
1180
  ] }),
1161
1181
  /* @__PURE__ */ o("button", { onClick: () => {
1162
- Me?.(We(m)), ue();
1182
+ De?.(ze(m)), ue();
1163
1183
  }, className: "zg-popup-btn", children: [
1164
1184
  /* @__PURE__ */ t(at, { size: 15 }),
1165
1185
  " ",
@@ -1180,26 +1200,26 @@ function wt() {
1180
1200
  a.length,
1181
1201
  ")"
1182
1202
  ] }),
1183
- /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 5 }, children: a.map((z) => {
1184
- const X = z.predecessorId === m.id, ce = X ? z.successorName : z.predecessorName, U = B === z.id;
1203
+ /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", gap: 5 }, children: a.map((W) => {
1204
+ const O = W.predecessorId === m.id, ce = O ? W.successorName : W.predecessorName, U = B === W.id;
1185
1205
  return /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: 8, padding: "6px 8px", borderRadius: 8, background: "#f8fafb", border: `1px solid ${e.borderLight}` }, children: [
1186
1206
  /* @__PURE__ */ o("div", { style: { flex: 1, minWidth: 0 }, children: [
1187
1207
  /* @__PURE__ */ o("div", { style: { fontSize: 10, fontWeight: 700, color: e.group, marginBottom: 2 }, children: [
1188
- /* @__PURE__ */ t("span", { style: { background: `${e.group}15`, borderRadius: 4, padding: "1px 5px" }, children: z.type }),
1208
+ /* @__PURE__ */ t("span", { style: { background: `${e.group}15`, borderRadius: 4, padding: "1px 5px" }, children: W.type }),
1189
1209
  " ",
1190
- /* @__PURE__ */ t("span", { style: { color: e.textSecondary, fontWeight: 500 }, children: X ? "→ " : "← " }),
1191
- /* @__PURE__ */ t("span", { style: { color: e.textMuted, fontWeight: 400, fontSize: 9 }, children: d[z.type] ?? z.type })
1210
+ /* @__PURE__ */ t("span", { style: { color: e.textSecondary, fontWeight: 500 }, children: O ? "→ " : "← " }),
1211
+ /* @__PURE__ */ t("span", { style: { color: e.textMuted, fontWeight: 400, fontSize: 9 }, children: d[W.type] ?? W.type })
1192
1212
  ] }),
1193
1213
  /* @__PURE__ */ t("div", { style: { fontSize: 11, color: e.textPrimary, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, title: ce, children: ce })
1194
1214
  ] }),
1195
- O && /* @__PURE__ */ t(
1215
+ X && /* @__PURE__ */ t(
1196
1216
  "button",
1197
1217
  {
1198
1218
  disabled: !!U,
1199
1219
  onClick: async () => {
1200
- r(z.id);
1220
+ r(W.id);
1201
1221
  try {
1202
- await O(z.id);
1222
+ await X(W.id);
1203
1223
  } finally {
1204
1224
  r(null);
1205
1225
  }
@@ -1208,7 +1228,7 @@ function wt() {
1208
1228
  children: U ? "⟳" : "🗑"
1209
1229
  }
1210
1230
  )
1211
- ] }, z.id);
1231
+ ] }, W.id);
1212
1232
  }) })
1213
1233
  ] })
1214
1234
  ]
@@ -1236,7 +1256,7 @@ function wt() {
1236
1256
  /* @__PURE__ */ t("div", { style: { padding: "9px 13px 8px", borderBottom: `1px solid ${e.borderLight}`, background: e.headerBg }, children: /* @__PURE__ */ o("p", { style: { margin: 0, fontSize: 10, fontWeight: 700, color: e.textSecondary, textTransform: "uppercase", letterSpacing: "0.08em" }, children: [
1237
1257
  R("gantt.chart.addOn", "Add on"),
1238
1258
  " ",
1239
- ne(i.date)
1259
+ Q(i.date)
1240
1260
  ] }) }),
1241
1261
  /* @__PURE__ */ t("div", { style: { padding: "5px 5px" }, children: [
1242
1262
  { label: R("gantt.newAction.step", "Step"), icon: ve("step", 0), action: () => {
@@ -1246,10 +1266,10 @@ function wt() {
1246
1266
  Ce?.(i.date, i.projectId), I(null);
1247
1267
  } },
1248
1268
  { label: R("gantt.newAction.event", "Event"), icon: ve("event"), action: () => {
1249
- $e?.(i.date, i.projectId), I(null);
1269
+ Ee?.(i.date, i.projectId), I(null);
1250
1270
  } },
1251
1271
  { label: R("gantt.newAction.note", "Note"), icon: ve("note"), action: () => {
1252
- Ee?.(i.date, i.projectId), I(null);
1272
+ $e?.(i.date, i.projectId), I(null);
1253
1273
  } }
1254
1274
  ].map((m) => /* @__PURE__ */ o(
1255
1275
  "button",
@@ -1268,11 +1288,11 @@ function wt() {
1268
1288
  ]
1269
1289
  }
1270
1290
  ),
1271
- w && /* @__PURE__ */ o("svg", { style: { position: "fixed", inset: 0, width: "100vw", height: "100vh", pointerEvents: "none", zIndex: 99999 }, children: [
1291
+ x && /* @__PURE__ */ o("svg", { style: { position: "fixed", inset: 0, width: "100vw", height: "100vh", pointerEvents: "none", zIndex: 99999 }, children: [
1272
1292
  /* @__PURE__ */ t("defs", { children: /* @__PURE__ */ t("marker", { id: "connect-arrow", markerWidth: "8", markerHeight: "8", refX: "6", refY: "3", orient: "auto", children: /* @__PURE__ */ t("path", { d: "M0,0 L0,6 L6,3 z", fill: e.group }) }) }),
1273
- /* @__PURE__ */ t("line", { x1: w.fromScreenX, y1: w.fromScreenY, x2: w.currentScreenX, y2: w.currentScreenY, stroke: e.group, strokeWidth: 2.5, strokeDasharray: "8 5", markerEnd: "url(#connect-arrow)", opacity: 0.85, style: { animation: "zg-dash 0.5s linear infinite" } })
1293
+ /* @__PURE__ */ t("line", { x1: x.fromScreenX, y1: x.fromScreenY, x2: x.currentScreenX, y2: x.currentScreenY, stroke: e.group, strokeWidth: 2.5, strokeDasharray: "8 5", markerEnd: "url(#connect-arrow)", opacity: 0.85, style: { animation: "zg-dash 0.5s linear infinite" } })
1274
1294
  ] }),
1275
- C && /* @__PURE__ */ t("div", { style: { position: "fixed", inset: 0, background: "rgba(0,0,0,0.35)", backdropFilter: "blur(4px)", display: "flex", alignItems: "center", justifyContent: "center", zIndex: 99998 }, onClick: () => D(null), children: /* @__PURE__ */ o("div", { style: { background: "#fff", borderRadius: 20, padding: "32px 36px", width: 420, boxShadow: "0 24px 80px rgba(0,0,0,0.18), 0 6px 24px rgba(0,0,0,0.08)" }, onClick: (m) => m.stopPropagation(), children: [
1295
+ C && /* @__PURE__ */ t("div", { style: { position: "fixed", inset: 0, background: "rgba(0,0,0,0.35)", backdropFilter: "blur(4px)", display: "flex", alignItems: "center", justifyContent: "center", zIndex: 99998 }, onClick: () => M(null), children: /* @__PURE__ */ o("div", { style: { background: "#fff", borderRadius: 20, padding: "32px 36px", width: 420, boxShadow: "0 24px 80px rgba(0,0,0,0.18), 0 6px 24px rgba(0,0,0,0.08)" }, onClick: (m) => m.stopPropagation(), children: [
1276
1296
  /* @__PURE__ */ o("div", { style: { marginBottom: 20 }, children: [
1277
1297
  /* @__PURE__ */ t("h3", { style: { fontSize: 18, fontWeight: 700, color: e.textTitle, marginBottom: 4 }, children: R("gantt.depModal.title", "Relation Type") }),
1278
1298
  /* @__PURE__ */ t("p", { style: { fontSize: 13, color: e.textSecondary }, children: R("gantt.depModal.subtitle", "Choose how the two tasks relate") })
@@ -1282,8 +1302,8 @@ function wt() {
1282
1302
  { type: "SS", label: R("gantt.depModal.ss", "Start to Start"), desc: R("gantt.depModal.ssDesc", "A and B start together") },
1283
1303
  { type: "FF", label: R("gantt.depModal.ff", "Finish to Finish"), desc: R("gantt.depModal.ffDesc", "A and B finish together") },
1284
1304
  { type: "SF", label: R("gantt.depModal.sf", "Start to Finish"), desc: R("gantt.depModal.sfDesc", "B finishes when A starts") }
1285
- ].map((m) => /* @__PURE__ */ o("button", { onClick: () => $(m.type), style: { border: u === m.type ? `2px solid ${e.group}` : `1.5px solid ${e.borderLight}`, borderRadius: 12, padding: "12px 14px", textAlign: "left", cursor: "pointer", background: u === m.type ? `${e.group}0d` : "#fafafa" }, children: [
1286
- /* @__PURE__ */ t("div", { style: { fontSize: 11, fontFamily: "monospace", fontWeight: 700, color: e.group, marginBottom: 4, background: u === m.type ? `${e.group}20` : `${e.group}0d`, borderRadius: 6, padding: "2px 6px", display: "inline-block" }, children: m.type }),
1305
+ ].map((m) => /* @__PURE__ */ o("button", { onClick: () => E(m.type), style: { border: f === m.type ? `2px solid ${e.group}` : `1.5px solid ${e.borderLight}`, borderRadius: 12, padding: "12px 14px", textAlign: "left", cursor: "pointer", background: f === m.type ? `${e.group}0d` : "#fafafa" }, children: [
1306
+ /* @__PURE__ */ t("div", { style: { fontSize: 11, fontFamily: "monospace", fontWeight: 700, color: e.group, marginBottom: 4, background: f === m.type ? `${e.group}20` : `${e.group}0d`, borderRadius: 6, padding: "2px 6px", display: "inline-block" }, children: m.type }),
1287
1307
  /* @__PURE__ */ t("div", { style: { fontSize: 13, fontWeight: 600, color: e.textTitle, marginBottom: 2 }, children: m.label }),
1288
1308
  /* @__PURE__ */ t("div", { style: { fontSize: 11, color: e.textSecondary }, children: m.desc })
1289
1309
  ] }, m.type)) }),
@@ -1292,58 +1312,58 @@ function wt() {
1292
1312
  /* @__PURE__ */ t("input", { type: "number", value: b, onChange: (m) => F(parseInt(m.target.value) || 0), style: { width: "100%", padding: "10px 12px", border: `1.5px solid ${e.borderLight}`, borderRadius: 8, fontSize: 14 } })
1293
1313
  ] }),
1294
1314
  /* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "flex-end", gap: 12 }, children: [
1295
- /* @__PURE__ */ t("button", { onClick: () => D(null), style: { padding: "10px 16px", borderRadius: 8, border: `1px solid ${e.borderLight}`, background: "#fff", cursor: "pointer", fontWeight: 600 }, children: R("gantt.depModal.cancel", "Cancel") }),
1296
- /* @__PURE__ */ t("button", { onClick: De, disabled: S, style: { padding: "10px 16px", borderRadius: 8, border: "none", background: e.group, color: "#fff", cursor: S ? "wait" : "pointer", fontWeight: 600 }, children: S ? R("gantt.depModal.saving", "Saving...") : R("gantt.depModal.create", "Create Dependency") })
1315
+ /* @__PURE__ */ t("button", { onClick: () => M(null), style: { padding: "10px 16px", borderRadius: 8, border: `1px solid ${e.borderLight}`, background: "#fff", cursor: "pointer", fontWeight: 600 }, children: R("gantt.depModal.cancel", "Cancel") }),
1316
+ /* @__PURE__ */ t("button", { onClick: Me, disabled: S, style: { padding: "10px 16px", borderRadius: 8, border: "none", background: e.group, color: "#fff", cursor: S ? "wait" : "pointer", fontWeight: 600 }, children: S ? R("gantt.depModal.saving", "Saving...") : R("gantt.depModal.create", "Create Dependency") })
1297
1317
  ] })
1298
1318
  ] }) })
1299
1319
  ] });
1300
1320
  }
1301
1321
  function St(n) {
1302
- const c = pe(null), p = pe(null), T = pe(null), h = pe(!1), x = J(() => {
1322
+ const c = pe(null), p = pe(null), T = pe(null), h = pe(!1), w = J(() => {
1303
1323
  if (h.current) return;
1304
1324
  h.current = !0;
1305
- const u = p.current;
1306
- u && c.current && (c.current.scrollTop = u.scrollTop), u && T.current && (T.current.scrollLeft = u.scrollLeft), h.current = !1;
1307
- }, []), w = J(() => {
1325
+ const f = p.current;
1326
+ f && c.current && (c.current.scrollTop = f.scrollTop), f && T.current && (T.current.scrollLeft = f.scrollLeft), h.current = !1;
1327
+ }, []), x = J(() => {
1308
1328
  h.current || (h.current = !0, c.current && p.current && (p.current.scrollTop = c.current.scrollTop), h.current = !1);
1309
1329
  }, []), C = pe(!1);
1310
1330
  ge(() => {
1311
1331
  if (C.current || !n.totalWidth) return;
1312
- const u = p.current;
1313
- if (!u) return;
1314
- const $ = se(/* @__PURE__ */ new Date(), n);
1315
- if ($ >= 0 && $ <= n.totalWidth) {
1316
- const b = $ - u.clientWidth / 2;
1317
- u.scrollLeft = Math.max(0, b), T.current && (T.current.scrollLeft = u.scrollLeft), C.current = !0;
1332
+ const f = p.current;
1333
+ if (!f) return;
1334
+ const E = se(/* @__PURE__ */ new Date(), n);
1335
+ if (E >= 0 && E <= n.totalWidth) {
1336
+ const b = E - f.clientWidth / 2;
1337
+ f.scrollLeft = Math.max(0, b), T.current && (T.current.scrollLeft = f.scrollLeft), C.current = !0;
1318
1338
  }
1319
1339
  }, [n]);
1320
- const D = J((u) => {
1321
- const $ = p.current;
1322
- if ($)
1323
- if (u.preventDefault(), u.shiftKey || Math.abs(u.deltaX) > Math.abs(u.deltaY)) {
1324
- const b = u.shiftKey ? u.deltaY : u.deltaX;
1325
- $.scrollLeft += b, T.current && (T.current.scrollLeft = $.scrollLeft);
1340
+ const M = J((f) => {
1341
+ const E = p.current;
1342
+ if (E)
1343
+ if (f.preventDefault(), f.shiftKey || Math.abs(f.deltaX) > Math.abs(f.deltaY)) {
1344
+ const b = f.shiftKey ? f.deltaY : f.deltaX;
1345
+ E.scrollLeft += b, T.current && (T.current.scrollLeft = E.scrollLeft);
1326
1346
  } else
1327
- $.scrollTop += u.deltaY, c.current && (c.current.scrollTop = $.scrollTop);
1347
+ E.scrollTop += f.deltaY, c.current && (c.current.scrollTop = E.scrollTop);
1328
1348
  }, []);
1329
1349
  return {
1330
1350
  leftBodyRef: c,
1331
1351
  rightBodyRef: p,
1332
1352
  timeHeaderRef: T,
1333
- handleRightScroll: x,
1334
- handleLeftScroll: w,
1335
- handleChartWheel: D
1353
+ handleRightScroll: w,
1354
+ handleLeftScroll: x,
1355
+ handleChartWheel: M
1336
1356
  };
1337
1357
  }
1338
1358
  function kt(n, c, p, T) {
1339
1359
  const h = /* @__PURE__ */ new Map();
1340
- return n.forEach((x) => h.set(x.id, x)), c.map((x) => {
1341
- const w = h.get(x.predecessorId), C = h.get(x.successorId);
1342
- if (!w || !C) return null;
1343
- const D = T.get(w.id), u = T.get(C.id);
1344
- if (D == null || u == null) return null;
1345
- const $ = w.originalType !== "step", b = C.originalType !== "step", F = $ ? se(w.start, p) + Le : se(w.end, p), S = D * _ + _ / 2, B = b ? se(C.start, p) - 10 : se(C.start, p), r = u * _ + _ / 2, i = 14, I = Math.max(F + i, B - i), l = S === r ? `M${F},${S} L${B - 6},${r}` : `M${F},${S} L${I},${S} L${I},${r} L${B - 6},${r}`;
1346
- return { predId: w.id, succId: C.id, path: l, headX: B - 6, headY: r };
1360
+ return n.forEach((w) => h.set(w.id, w)), c.map((w) => {
1361
+ const x = h.get(w.predecessorId), C = h.get(w.successorId);
1362
+ if (!x || !C) return null;
1363
+ const M = T.get(x.id), f = T.get(C.id);
1364
+ if (M == null || f == null) return null;
1365
+ const E = x.originalType !== "step", b = C.originalType !== "step", F = E ? se(x.start, p) + Le : se(x.end, p), S = M * _ + _ / 2, B = b ? se(C.start, p) - 10 : se(C.start, p), r = f * _ + _ / 2, i = 14, I = Math.max(F + i, B - i), l = S === r ? `M${F},${S} L${B - 6},${r}` : `M${F},${S} L${I},${S} L${I},${r} L${B - 6},${r}`;
1366
+ return { predId: x.id, succId: C.id, path: l, headX: B - 6, headY: r };
1347
1367
  }).filter(Boolean);
1348
1368
  }
1349
1369
  function It(n, c) {
@@ -1352,43 +1372,43 @@ function It(n, c) {
1352
1372
  n.forEach((l) => p.set(l.id, l));
1353
1373
  const T = new Set(n.map((l) => l.id)), h = c.filter((l) => T.has(l.predecessorId) && T.has(l.successorId));
1354
1374
  if (h.length === 0) return /* @__PURE__ */ new Set();
1355
- const x = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map();
1375
+ const w = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map();
1356
1376
  h.forEach((l) => {
1357
- x.has(l.predecessorId) || x.set(l.predecessorId, []), x.get(l.predecessorId).push(l.successorId), w.has(l.successorId) || w.set(l.successorId, []), w.get(l.successorId).push(l.predecessorId);
1377
+ w.has(l.predecessorId) || w.set(l.predecessorId, []), w.get(l.predecessorId).push(l.successorId), x.has(l.successorId) || x.set(l.successorId, []), x.get(l.successorId).push(l.predecessorId);
1358
1378
  });
1359
- const C = (l) => Math.max(1, ye(l.start, l.end)), D = /* @__PURE__ */ new Set(), u = [];
1360
- function $(l) {
1361
- D.has(l) || (D.add(l), (x.get(l) || []).forEach($), u.unshift(l));
1379
+ const C = (l) => Math.max(1, ye(l.start, l.end)), M = /* @__PURE__ */ new Set(), f = [];
1380
+ function E(l) {
1381
+ M.has(l) || (M.add(l), (w.get(l) || []).forEach(E), f.unshift(l));
1362
1382
  }
1363
- n.forEach((l) => $(l.id));
1383
+ n.forEach((l) => E(l.id));
1364
1384
  const b = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map();
1365
- for (const l of u) {
1366
- const E = p.get(l), f = w.get(l) || [];
1367
- let M = 0;
1368
- for (const y of f) M = Math.max(M, F.get(y) || 0);
1369
- const s = f.length > 0 ? M : 0;
1370
- b.set(l, s), F.set(l, s + C(E));
1385
+ for (const l of f) {
1386
+ const $ = p.get(l), u = x.get(l) || [];
1387
+ let D = 0;
1388
+ for (const y of u) D = Math.max(D, F.get(y) || 0);
1389
+ const s = u.length > 0 ? D : 0;
1390
+ b.set(l, s), F.set(l, s + C($));
1371
1391
  }
1372
1392
  let S = 0;
1373
1393
  F.forEach((l) => {
1374
1394
  l > S && (S = l);
1375
1395
  });
1376
1396
  const B = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
1377
- for (let l = u.length - 1; l >= 0; l--) {
1378
- const E = u[l], f = p.get(E), M = x.get(E) || [];
1397
+ for (let l = f.length - 1; l >= 0; l--) {
1398
+ const $ = f[l], u = p.get($), D = w.get($) || [];
1379
1399
  let s = S;
1380
- for (const y of M) s = Math.min(s, B.get(y) ?? S);
1381
- r.set(E, M.length > 0 ? s : S), B.set(E, (r.get(E) || 0) - C(f));
1400
+ for (const y of D) s = Math.min(s, B.get(y) ?? S);
1401
+ r.set($, D.length > 0 ? s : S), B.set($, (r.get($) || 0) - C(u));
1382
1402
  }
1383
1403
  const i = /* @__PURE__ */ new Set();
1384
1404
  h.forEach((l) => {
1385
1405
  i.add(l.predecessorId), i.add(l.successorId);
1386
1406
  });
1387
1407
  const I = /* @__PURE__ */ new Set();
1388
- for (const l of u) {
1408
+ for (const l of f) {
1389
1409
  if (!i.has(l)) continue;
1390
- const E = (B.get(l) || 0) - (b.get(l) || 0);
1391
- Math.abs(E) < 0.5 && I.add(l);
1410
+ const $ = (B.get(l) || 0) - (b.get(l) || 0);
1411
+ Math.abs($) < 0.5 && I.add(l);
1392
1412
  }
1393
1413
  return I;
1394
1414
  }
@@ -1398,50 +1418,50 @@ function Tt({
1398
1418
  events: p,
1399
1419
  notes: T,
1400
1420
  dependencies: h,
1401
- viewMode: x,
1402
- locale: w,
1421
+ viewMode: w,
1422
+ locale: x,
1403
1423
  groupByProject: C,
1404
- visibleTypes: D,
1405
- collapsedGroups: u,
1406
- collapsedProjects: $,
1424
+ visibleTypes: M,
1425
+ collapsedGroups: f,
1426
+ collapsedProjects: E,
1407
1427
  selectedTaskId: b
1408
1428
  }) {
1409
1429
  const F = ae(() => {
1410
- const f = [];
1411
- let M = 0;
1430
+ const u = [];
1431
+ let D = 0;
1412
1432
  return n.forEach((s) => {
1413
1433
  const y = !!(s.startDate && s.finishDate), N = s.startDate || s.previsionStartDate, A = s.finishDate || s.previsionFinishDate;
1414
1434
  if (!N || !A) return;
1415
- const Z = new Date(N), k = new Date(A);
1416
- if (isNaN(Z.getTime()) || isNaN(k.getTime())) return;
1417
- k <= Z && k.setDate(k.getDate() + 1);
1435
+ const ee = new Date(N), k = new Date(A);
1436
+ if (isNaN(ee.getTime()) || isNaN(k.getTime())) return;
1437
+ k <= ee && k.setDate(k.getDate() + 1);
1418
1438
  let g, Y;
1419
1439
  if (s.previsionStartDate && s.previsionFinishDate) {
1420
- const G = new Date(s.previsionStartDate), ie = new Date(s.previsionFinishDate);
1421
- !isNaN(G.getTime()) && !isNaN(ie.getTime()) && (g = G, Y = ie <= G ? Q(G, 1) : ie);
1440
+ const H = new Date(s.previsionStartDate), ie = new Date(s.previsionFinishDate);
1441
+ !isNaN(H.getTime()) && !isNaN(ie.getTime()) && (g = H, Y = ie <= H ? Z(H, 1) : ie);
1422
1442
  }
1423
- const H = h?.filter((G) => G.successorId === s.id).map((G) => G.predecessorId) || [], q = s.conclusionPercent != null ? Number(s.conclusionPercent) : 0;
1424
- f.push({
1443
+ const V = h?.filter((H) => H.successorId === s.id).map((H) => H.predecessorId) || [], q = s.conclusionPercent != null ? Number(s.conclusionPercent) : 0;
1444
+ u.push({
1425
1445
  id: s.id,
1426
1446
  name: s.name,
1427
- start: Z,
1447
+ start: ee,
1428
1448
  end: k,
1429
1449
  progress: q > 1 ? Math.min(q, 100) : q * 100,
1430
1450
  originalType: "step",
1431
- deps: H,
1432
- colorIdx: M % oe.length,
1451
+ deps: V,
1452
+ colorIdx: D % oe.length,
1433
1453
  previsionStart: g,
1434
1454
  previsionEnd: Y,
1435
1455
  hasActualDates: y,
1436
1456
  projectId: s.projectId || void 0,
1437
1457
  projectTitle: s.projectTitle || void 0
1438
- }), M++;
1458
+ }), D++;
1439
1459
  }), c?.forEach((s) => {
1440
1460
  if (!s.date) return;
1441
1461
  const y = new Date(s.date);
1442
1462
  if (isNaN(y.getTime())) return;
1443
1463
  const N = h?.filter((A) => A.successorId === s.id).map((A) => A.predecessorId) || [];
1444
- f.push({
1464
+ u.push({
1445
1465
  id: s.id,
1446
1466
  name: s.name,
1447
1467
  start: y,
@@ -1457,7 +1477,7 @@ function Tt({
1457
1477
  const y = new Date(s.date);
1458
1478
  if (isNaN(y.getTime())) return;
1459
1479
  const N = h?.filter((A) => A.successorId === s.id).map((A) => A.predecessorId) || [];
1460
- f.push({
1480
+ u.push({
1461
1481
  id: s.id,
1462
1482
  name: s.title,
1463
1483
  start: y,
@@ -1471,7 +1491,7 @@ function Tt({
1471
1491
  }), T?.forEach((s) => {
1472
1492
  if (!s.date) return;
1473
1493
  const y = new Date(s.date);
1474
- isNaN(y.getTime()) || f.push({
1494
+ isNaN(y.getTime()) || u.push({
1475
1495
  id: s.id,
1476
1496
  name: s.title || "Note",
1477
1497
  start: y,
@@ -1486,58 +1506,58 @@ function Tt({
1486
1506
  projectId: s.projectId || void 0,
1487
1507
  projectTitle: s.projectTitle || void 0
1488
1508
  });
1489
- }), f;
1490
- }, [n, c, p, T, h]), S = ae(() => bt(F, x, w), [F, x, w]), B = ae(() => {
1491
- const f = [], M = ["step", "milestone", "event", "note"];
1509
+ }), u;
1510
+ }, [n, c, p, T, h]), S = ae(() => bt(F, w, x), [F, w, x]), B = ae(() => {
1511
+ const u = [], D = ["step", "milestone", "event", "note"];
1492
1512
  if (C) {
1493
1513
  const s = /* @__PURE__ */ new Map();
1494
1514
  F.forEach((y) => {
1495
1515
  y.projectId && !s.has(y.projectId) && s.set(y.projectId, y.projectTitle || y.projectId);
1496
1516
  });
1497
1517
  for (const [y, N] of Array.from(s.entries())) {
1498
- const A = $.has(y);
1499
- if (f.push({ kind: "projectHeader", projectId: y, projectTitle: N, collapsed: A }), !A) {
1500
- const Z = F.filter((k) => k.projectId === y);
1501
- for (const k of M) {
1502
- if (!D.has(k)) continue;
1503
- const g = Z.filter((q) => q.originalType === k);
1518
+ const A = E.has(y);
1519
+ if (u.push({ kind: "projectHeader", projectId: y, projectTitle: N, collapsed: A }), !A) {
1520
+ const ee = F.filter((k) => k.projectId === y);
1521
+ for (const k of D) {
1522
+ if (!M.has(k)) continue;
1523
+ const g = ee.filter((q) => q.originalType === k);
1504
1524
  if (g.length === 0) continue;
1505
- const Y = `${y}-${k}`, H = u.has(Y);
1506
- f.push({ kind: "group", groupType: k, label: Ne[k], count: g.length, collapsed: H, projectId: y }), H || g.forEach((q) => f.push({ kind: "task", task: q }));
1525
+ const Y = `${y}-${k}`, V = f.has(Y);
1526
+ u.push({ kind: "group", groupType: k, label: Ne[k], count: g.length, collapsed: V, projectId: y }), V || g.forEach((q) => u.push({ kind: "task", task: q }));
1507
1527
  }
1508
1528
  }
1509
1529
  }
1510
1530
  } else
1511
- for (const s of M) {
1512
- if (!D.has(s)) continue;
1531
+ for (const s of D) {
1532
+ if (!M.has(s)) continue;
1513
1533
  const y = F.filter((A) => A.originalType === s);
1514
1534
  if (y.length === 0) continue;
1515
- const N = u.has(s);
1516
- f.push({ kind: "group", groupType: s, label: Ne[s], count: y.length, collapsed: N }), N || y.forEach((A) => f.push({ kind: "task", task: A }));
1535
+ const N = f.has(s);
1536
+ u.push({ kind: "group", groupType: s, label: Ne[s], count: y.length, collapsed: N }), N || y.forEach((A) => u.push({ kind: "task", task: A }));
1517
1537
  }
1518
- return f;
1519
- }, [F, D, u, $, C]), r = ae(() => {
1520
- const f = /* @__PURE__ */ new Map();
1521
- return B.forEach((M, s) => {
1522
- M.kind === "task" && f.set(M.task.id, s);
1523
- }), f;
1538
+ return u;
1539
+ }, [F, M, f, E, C]), r = ae(() => {
1540
+ const u = /* @__PURE__ */ new Map();
1541
+ return B.forEach((D, s) => {
1542
+ D.kind === "task" && u.set(D.task.id, s);
1543
+ }), u;
1524
1544
  }, [B]), i = ae(
1525
1545
  () => kt(F, h || [], S, r),
1526
1546
  [F, h, S, r]
1527
1547
  ), I = ae(() => It(F, h || []), [F, h]), l = ae(() => {
1528
- const f = /* @__PURE__ */ new Set(), M = /* @__PURE__ */ new Date();
1548
+ const u = /* @__PURE__ */ new Set(), D = /* @__PURE__ */ new Date();
1529
1549
  return F.forEach((s) => {
1530
- s.originalType === "step" && s.end < M && s.progress < 100 && f.add(s.id);
1531
- }), f;
1532
- }, [F]), E = ae(() => {
1550
+ s.originalType === "step" && s.end < D && s.progress < 100 && u.add(s.id);
1551
+ }), u;
1552
+ }, [F]), $ = ae(() => {
1533
1553
  if (!b || !h?.length) return /* @__PURE__ */ new Set();
1534
- const f = /* @__PURE__ */ new Set(), M = [b];
1535
- for (; M.length; ) {
1536
- const s = M.shift();
1554
+ const u = /* @__PURE__ */ new Set(), D = [b];
1555
+ for (; D.length; ) {
1556
+ const s = D.shift();
1537
1557
  for (const y of h)
1538
- y.predecessorId === s && !f.has(y.successorId) && (f.add(y.successorId), M.push(y.successorId)), y.successorId === s && !f.has(y.predecessorId) && (f.add(y.predecessorId), M.push(y.predecessorId));
1558
+ y.predecessorId === s && !u.has(y.successorId) && (u.add(y.successorId), D.push(y.successorId)), y.successorId === s && !u.has(y.predecessorId) && (u.add(y.predecessorId), D.push(y.predecessorId));
1539
1559
  }
1540
- return f;
1560
+ return u;
1541
1561
  }, [b, h]);
1542
1562
  return {
1543
1563
  tasks: F,
@@ -1547,15 +1567,15 @@ function Tt({
1547
1567
  arrows: i,
1548
1568
  criticalIds: I,
1549
1569
  delayedIds: l,
1550
- relatedIds: E
1570
+ relatedIds: $
1551
1571
  };
1552
1572
  }
1553
- function Et(n) {
1554
- const [c, p] = P("day"), [T, h] = P(null), [x, w] = P(null), [C, D] = P(null), [u, $] = P({
1573
+ function $t(n) {
1574
+ const [c, p] = P("day"), [T, h] = P(null), [w, x] = P(null), [C, M] = P(null), [f, E] = P({
1555
1575
  isOpen: !1,
1556
1576
  position: { x: 0, y: 0 },
1557
1577
  task: null
1558
- }), [b, F] = P(null), [S, B] = P(null), [r, i] = P(null), [I, l] = P(null), [E, f] = P("FS"), [M, s] = P(0), [y, N] = P(!1), [A, Z] = P(null), [k, g] = P(null), [Y, H] = P(!1), q = pe(null), [G, ie] = P(/* @__PURE__ */ new Set(["step", "milestone", "event", "note"])), [xe, Te] = P(/* @__PURE__ */ new Set()), [be, De] = P(/* @__PURE__ */ new Set()), le = J((a) => {
1578
+ }), [b, F] = P(null), [S, B] = P(null), [r, i] = P(null), [I, l] = P(null), [$, u] = P("FS"), [D, s] = P(0), [y, N] = P(!1), [A, ee] = P(null), [k, g] = P(null), [Y, V] = P(!1), q = pe(null), [H, ie] = P(/* @__PURE__ */ new Set(["step", "milestone", "event", "note"])), [xe, Te] = P(/* @__PURE__ */ new Set()), [be, Me] = P(/* @__PURE__ */ new Set()), le = J((a) => {
1559
1579
  ie((d) => {
1560
1580
  const v = new Set(d);
1561
1581
  return v.has(a) ? v.delete(a) : v.add(a), v;
@@ -1565,8 +1585,8 @@ function Et(n) {
1565
1585
  const v = new Set(d);
1566
1586
  return v.has(a) ? v.delete(a) : v.add(a), v;
1567
1587
  });
1568
- }, []), Me = J((a) => {
1569
- De((d) => {
1588
+ }, []), De = J((a) => {
1589
+ Me((d) => {
1570
1590
  const v = new Set(d);
1571
1591
  return v.has(a) ? v.delete(a) : v.add(a), v;
1572
1592
  });
@@ -1578,40 +1598,40 @@ function Et(n) {
1578
1598
  dependencies: n.dependencies,
1579
1599
  viewMode: c,
1580
1600
  locale: n.locale,
1581
- visibleTypes: G,
1601
+ visibleTypes: H,
1582
1602
  collapsedGroups: xe,
1583
1603
  collapsedProjects: be,
1584
1604
  groupByProject: n.groupByProject,
1585
- selectedTaskId: x || null
1586
- }), O = St(j.timeline), Re = J((a, d) => {
1605
+ selectedTaskId: w || null
1606
+ }), X = St(j.timeline), Re = J((a, d) => {
1587
1607
  a.preventDefault(), a.stopPropagation(), F({ task: d, startMouseX: a.clientX, originalStart: new Date(d.start), originalEnd: new Date(d.end), offsetDays: 0 });
1588
1608
  }, []), Ce = J((a, d, v) => {
1589
1609
  a.preventDefault(), a.stopPropagation(), B({ task: d, edge: v, startMouseX: a.clientX, originalStart: new Date(d.start), originalEnd: new Date(d.end), offsetDays: 0 });
1590
- }, []), $e = J((a, d, v) => {
1610
+ }, []), Ee = J((a, d, v) => {
1591
1611
  a.preventDefault(), a.stopPropagation(), i({ fromTaskId: d.id, fromEdge: v, fromScreenX: a.clientX, fromScreenY: a.clientY, currentScreenX: a.clientX, currentScreenY: a.clientY, hoverTargetId: null });
1592
- }, []), Ee = J(async () => {
1612
+ }, []), $e = J(async () => {
1593
1613
  if (!I || !n.onCreateDependency) return;
1594
- const a = new Map(j.tasks.map((X) => [X.id, X])), d = a.get(I.fromTaskId), v = a.get(I.toTaskId);
1614
+ const a = new Map(j.tasks.map((O) => [O.id, O])), d = a.get(I.fromTaskId), v = a.get(I.toTaskId);
1595
1615
  if (!d || !v) return;
1596
- const W = (X) => X.originalType === "step" ? "STEP" : "MILESTONE", L = I.fromEdge === "right" ? d : v, z = I.fromEdge === "right" ? v : d;
1616
+ const z = (O) => O.originalType === "step" ? "STEP" : "MILESTONE", L = I.fromEdge === "right" ? d : v, W = I.fromEdge === "right" ? v : d;
1597
1617
  N(!0);
1598
1618
  try {
1599
- await n.onCreateDependency({ predecessorId: L.id, predecessorType: W(L), successorId: z.id, successorType: W(z), type: E, lag: M }), l(null);
1619
+ await n.onCreateDependency({ predecessorId: L.id, predecessorType: z(L), successorId: W.id, successorType: z(W), type: $, lag: D }), l(null);
1600
1620
  } finally {
1601
1621
  N(!1);
1602
1622
  }
1603
- }, [I, j.tasks, n.onCreateDependency, E, M]);
1623
+ }, [I, j.tasks, n.onCreateDependency, $, D]);
1604
1624
  ge(() => {
1605
1625
  if (!b) return;
1606
1626
  const a = (v) => {
1607
- const W = v.clientX - b.startMouseX, L = Math.round(W / j.timeline.dayWidth);
1608
- L !== b.offsetDays && F((z) => z ? { ...z, offsetDays: L } : null);
1627
+ const z = v.clientX - b.startMouseX, L = Math.round(z / j.timeline.dayWidth);
1628
+ L !== b.offsetDays && F((W) => W ? { ...W, offsetDays: L } : null);
1609
1629
  }, d = () => {
1610
1630
  b.offsetDays !== 0 && n.onTaskChange && n.onTaskChange({
1611
1631
  id: b.task.id,
1612
1632
  name: b.task.name,
1613
- start: Q(b.originalStart, b.offsetDays),
1614
- end: Q(b.originalEnd, b.offsetDays),
1633
+ start: Z(b.originalStart, b.offsetDays),
1634
+ end: Z(b.originalEnd, b.offsetDays),
1615
1635
  type: b.task.originalType === "step" ? "task" : "milestone",
1616
1636
  progress: b.task.progress
1617
1637
  }), F(null);
@@ -1622,12 +1642,12 @@ function Et(n) {
1622
1642
  }, [b, j.timeline.dayWidth, n.onTaskChange]), ge(() => {
1623
1643
  if (!S) return;
1624
1644
  const a = (v) => {
1625
- const W = v.clientX - S.startMouseX, L = Math.round(W / j.timeline.dayWidth);
1626
- L !== S.offsetDays && B((z) => z ? { ...z, offsetDays: L } : null);
1645
+ const z = v.clientX - S.startMouseX, L = Math.round(z / j.timeline.dayWidth);
1646
+ L !== S.offsetDays && B((W) => W ? { ...W, offsetDays: L } : null);
1627
1647
  }, d = () => {
1628
1648
  if (S.offsetDays !== 0 && n.onTaskChange) {
1629
- const v = S.edge === "left" ? Q(S.originalStart, S.offsetDays) : S.originalStart, W = S.edge === "right" ? Q(S.originalEnd, S.offsetDays) : S.originalEnd;
1630
- W > v && n.onTaskChange({ id: S.task.id, name: S.task.name, start: v, end: W, type: "task", progress: S.task.progress });
1649
+ const v = S.edge === "left" ? Z(S.originalStart, S.offsetDays) : S.originalStart, z = S.edge === "right" ? Z(S.originalEnd, S.offsetDays) : S.originalEnd;
1650
+ z > v && n.onTaskChange({ id: S.task.id, name: S.task.name, start: v, end: z, type: "task", progress: S.task.progress });
1631
1651
  }
1632
1652
  B(null);
1633
1653
  };
@@ -1637,25 +1657,25 @@ function Et(n) {
1637
1657
  }, [S, j.timeline.dayWidth, n.onTaskChange]), ge(() => {
1638
1658
  if (!r) return;
1639
1659
  const a = (v) => {
1640
- let W = null;
1660
+ let z = null;
1641
1661
  for (const L of document.elementsFromPoint(v.clientX, v.clientY)) {
1642
- const z = L.dataset?.taskId;
1643
- if (z && z !== r.fromTaskId) {
1644
- W = z;
1662
+ const W = L.dataset?.taskId;
1663
+ if (W && W !== r.fromTaskId) {
1664
+ z = W;
1645
1665
  break;
1646
1666
  }
1647
1667
  }
1648
- i((L) => L ? { ...L, currentScreenX: v.clientX, currentScreenY: v.clientY, hoverTargetId: W } : null);
1668
+ i((L) => L ? { ...L, currentScreenX: v.clientX, currentScreenY: v.clientY, hoverTargetId: z } : null);
1649
1669
  }, d = (v) => {
1650
- let W = null;
1670
+ let z = null;
1651
1671
  for (const L of document.elementsFromPoint(v.clientX, v.clientY)) {
1652
- const z = L.dataset?.taskId;
1653
- if (z && z !== r.fromTaskId) {
1654
- W = z;
1672
+ const W = L.dataset?.taskId;
1673
+ if (W && W !== r.fromTaskId) {
1674
+ z = W;
1655
1675
  break;
1656
1676
  }
1657
1677
  }
1658
- W && n.onCreateDependency && (l({ fromTaskId: r.fromTaskId, fromEdge: r.fromEdge, toTaskId: W }), f("FS"), s(0)), i(null);
1678
+ z && n.onCreateDependency && (l({ fromTaskId: r.fromTaskId, fromEdge: r.fromEdge, toTaskId: z }), u("FS"), s(0)), i(null);
1659
1679
  };
1660
1680
  return document.addEventListener("mousemove", a), document.addEventListener("mouseup", d), () => {
1661
1681
  document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", d);
@@ -1663,46 +1683,46 @@ function Et(n) {
1663
1683
  }, [r?.fromTaskId, r?.fromEdge, n.onCreateDependency]);
1664
1684
  const [R, he] = P(null), re = J((a) => {
1665
1685
  if (S || b || a.button === 2) return;
1666
- const d = O.rightBodyRef.current;
1686
+ const d = X.rightBodyRef.current;
1667
1687
  d && (a.preventDefault(), he({ startX: a.clientX, startY: a.clientY, scrollLeft: d.scrollLeft, scrollTop: d.scrollTop }));
1668
- }, [S, b, O.rightBodyRef]);
1688
+ }, [S, b, X.rightBodyRef]);
1669
1689
  ge(() => {
1670
1690
  if (!R) return;
1671
1691
  const a = (v) => {
1672
- const W = O.rightBodyRef.current;
1673
- W && (W.scrollLeft = R.scrollLeft - (v.clientX - R.startX), W.scrollTop = R.scrollTop - (v.clientY - R.startY), O.leftBodyRef.current && (O.leftBodyRef.current.scrollTop = W.scrollTop), O.timeHeaderRef.current && (O.timeHeaderRef.current.scrollLeft = W.scrollLeft));
1692
+ const z = X.rightBodyRef.current;
1693
+ z && (z.scrollLeft = R.scrollLeft - (v.clientX - R.startX), z.scrollTop = R.scrollTop - (v.clientY - R.startY), X.leftBodyRef.current && (X.leftBodyRef.current.scrollTop = z.scrollTop), X.timeHeaderRef.current && (X.timeHeaderRef.current.scrollLeft = z.scrollLeft));
1674
1694
  }, d = () => he(null);
1675
1695
  return document.addEventListener("mousemove", a), document.addEventListener("mouseup", d), () => {
1676
1696
  document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", d);
1677
1697
  };
1678
- }, [R, O.rightBodyRef, O.leftBodyRef, O.timeHeaderRef]);
1698
+ }, [R, X.rightBodyRef, X.leftBodyRef, X.timeHeaderRef]);
1679
1699
  const ue = J((a) => {
1680
1700
  a.preventDefault(), a.stopPropagation();
1681
- const d = (W) => {
1682
- const L = O.rightBodyRef.current;
1701
+ const d = (z) => {
1702
+ const L = X.rightBodyRef.current;
1683
1703
  if (!L) return /* @__PURE__ */ new Date();
1684
- const z = L.getBoundingClientRect(), X = W - z.left + L.scrollLeft;
1685
- return Q(j.timeline.start, Math.max(0, Math.floor(X / j.timeline.dayWidth)));
1686
- }, v = (W) => {
1704
+ const W = L.getBoundingClientRect(), O = z - W.left + L.scrollLeft;
1705
+ return Z(j.timeline.start, Math.max(0, Math.floor(O / j.timeline.dayWidth)));
1706
+ }, v = (z) => {
1687
1707
  if (!n.groupByProject) return;
1688
- const L = O.leftBodyRef.current;
1708
+ const L = X.leftBodyRef.current;
1689
1709
  if (!L) return;
1690
- const z = L.getBoundingClientRect(), X = W - z.top + L.scrollTop, ce = Math.max(0, Math.floor(X / 50));
1710
+ const W = L.getBoundingClientRect(), O = z - W.top + L.scrollTop, ce = Math.max(0, Math.floor(O / 50));
1691
1711
  for (let U = Math.min(ce, j.displayRows.length - 1); U >= 0; U--) {
1692
- const ee = j.displayRows[U];
1693
- if (ee.kind === "projectHeader") return ee.projectId;
1694
- if (ee.kind === "task" && ee.task.projectId) return ee.task.projectId;
1695
- if (ee.kind === "group" && ee.projectId) return ee.projectId;
1712
+ const te = j.displayRows[U];
1713
+ if (te.kind === "projectHeader") return te.projectId;
1714
+ if (te.kind === "task" && te.task.projectId) return te.task.projectId;
1715
+ if (te.kind === "group" && te.projectId) return te.projectId;
1696
1716
  }
1697
1717
  };
1698
1718
  g({ x: a.clientX, y: a.clientY, date: d(a.clientX), projectId: v(a.clientY) }), he(null);
1699
- }, [j.timeline, j.displayRows, n.groupByProject, O.rightBodyRef, O.leftBodyRef]);
1719
+ }, [j.timeline, j.displayRows, n.groupByProject, X.rightBodyRef, X.leftBodyRef]);
1700
1720
  ge(() => {
1701
1721
  if (!k) return;
1702
- const a = (W) => {
1703
- W.key === "Escape" && g(null);
1704
- }, d = (W) => {
1705
- W.target.closest('[data-menu="chart-create"]') || g(null);
1722
+ const a = (z) => {
1723
+ z.key === "Escape" && g(null);
1724
+ }, d = (z) => {
1725
+ z.target.closest('[data-menu="chart-create"]') || g(null);
1706
1726
  }, v = () => g(null);
1707
1727
  return document.addEventListener("keydown", a), document.addEventListener("click", d), window.addEventListener("scroll", v, !0), () => {
1708
1728
  document.removeEventListener("keydown", a), document.removeEventListener("click", d), window.removeEventListener("scroll", v, !0);
@@ -1715,41 +1735,41 @@ function Et(n) {
1715
1735
  setViewMode: p,
1716
1736
  hoveredTaskId: T,
1717
1737
  setHoveredTaskId: h,
1718
- selectedTaskId: x,
1719
- setSelectedTaskId: w,
1738
+ selectedTaskId: w,
1739
+ setSelectedTaskId: x,
1720
1740
  tooltip: C,
1721
- setTooltip: D,
1722
- popupState: u,
1723
- setPopupState: $,
1741
+ setTooltip: M,
1742
+ popupState: f,
1743
+ setPopupState: E,
1724
1744
  dragState: b,
1725
1745
  setDragState: F,
1726
1746
  resizeState: S,
1727
1747
  setResizeState: B,
1728
1748
  connectState: r,
1729
1749
  setConnectState: i,
1730
- visibleTypes: G,
1750
+ visibleTypes: H,
1731
1751
  setVisibleTypes: ie,
1732
1752
  toggleVisibility: le,
1733
1753
  collapsedGroups: xe,
1734
1754
  setCollapsedGroups: Te,
1735
1755
  toggleGroup: me,
1736
1756
  collapsedProjects: be,
1737
- setCollapsedProjects: De,
1738
- toggleProject: Me,
1757
+ setCollapsedProjects: Me,
1758
+ toggleProject: De,
1739
1759
  pendingConnection: I,
1740
1760
  setPendingConnection: l,
1741
- depModalType: E,
1742
- setDepModalType: f,
1743
- depModalLag: M,
1761
+ depModalType: $,
1762
+ setDepModalType: u,
1763
+ depModalLag: D,
1744
1764
  setDepModalLag: s,
1745
1765
  depCreating: y,
1746
1766
  setDepCreating: N,
1747
1767
  deletingDepId: A,
1748
- setDeletingDepId: Z,
1768
+ setDeletingDepId: ee,
1749
1769
  chartMenu: k,
1750
1770
  setChartMenu: g,
1751
1771
  newActionOpen: Y,
1752
- setNewActionOpen: H,
1772
+ setNewActionOpen: V,
1753
1773
  tasks: j.tasks,
1754
1774
  timeline: j.timeline,
1755
1775
  displayRows: j.displayRows,
@@ -1758,63 +1778,63 @@ function Et(n) {
1758
1778
  criticalIds: j.criticalIds,
1759
1779
  delayedIds: j.delayedIds,
1760
1780
  relatedIds: j.relatedIds,
1761
- ...O,
1781
+ ...X,
1762
1782
  newActionRef: q,
1763
1783
  screenXToDate: (a) => {
1764
- const d = O.rightBodyRef.current;
1784
+ const d = X.rightBodyRef.current;
1765
1785
  if (!d) return /* @__PURE__ */ new Date();
1766
- const v = d.getBoundingClientRect(), W = a - v.left + d.scrollLeft;
1767
- return Q(j.timeline.start, Math.max(0, Math.floor(W / j.timeline.dayWidth)));
1786
+ const v = d.getBoundingClientRect(), z = a - v.left + d.scrollLeft;
1787
+ return Z(j.timeline.start, Math.max(0, Math.floor(z / j.timeline.dayWidth)));
1768
1788
  },
1769
1789
  screenYToProjectId: (a) => {
1770
1790
  if (!n.groupByProject) return;
1771
- const d = O.leftBodyRef.current;
1791
+ const d = X.leftBodyRef.current;
1772
1792
  if (!d) return;
1773
- const v = d.getBoundingClientRect(), W = a - v.top + d.scrollTop, L = Math.max(0, Math.floor(W / 50));
1774
- for (let z = Math.min(L, j.displayRows.length - 1); z >= 0; z--) {
1775
- const X = j.displayRows[z];
1776
- if (X.kind === "projectHeader") return X.projectId;
1777
- if (X.kind === "task" && X.task.projectId) return X.task.projectId;
1778
- if (X.kind === "group" && X.projectId) return X.projectId;
1793
+ const v = d.getBoundingClientRect(), z = a - v.top + d.scrollTop, L = Math.max(0, Math.floor(z / 50));
1794
+ for (let W = Math.min(L, j.displayRows.length - 1); W >= 0; W--) {
1795
+ const O = j.displayRows[W];
1796
+ if (O.kind === "projectHeader") return O.projectId;
1797
+ if (O.kind === "task" && O.task.projectId) return O.task.projectId;
1798
+ if (O.kind === "group" && O.projectId) return O.projectId;
1779
1799
  }
1780
1800
  },
1781
1801
  handleChartMouseDown: re,
1782
1802
  openChartMenu: ue,
1783
1803
  handleBarMouseDown: Re,
1784
1804
  handleResizeMouseDown: Ce,
1785
- handleConnectDotMouseDown: $e,
1786
- handleCreateDependency: Ee
1805
+ handleConnectDotMouseDown: Ee,
1806
+ handleCreateDependency: $e
1787
1807
  }), [
1788
1808
  n,
1789
1809
  c,
1790
1810
  T,
1791
- x,
1811
+ w,
1792
1812
  C,
1793
- u,
1813
+ f,
1794
1814
  b,
1795
1815
  S,
1796
1816
  r,
1797
- G,
1817
+ H,
1798
1818
  xe,
1799
1819
  be,
1800
1820
  I,
1801
- E,
1802
- M,
1821
+ $,
1822
+ D,
1803
1823
  y,
1804
1824
  A,
1805
1825
  k,
1806
1826
  Y,
1807
1827
  j,
1808
- O,
1828
+ X,
1809
1829
  le,
1810
1830
  me,
1811
- Me,
1831
+ De,
1812
1832
  re,
1813
1833
  ue,
1814
1834
  Re,
1815
1835
  Ce,
1816
- $e,
1817
- Ee
1836
+ Ee,
1837
+ $e
1818
1838
  ]);
1819
1839
  return n.loading ? /* @__PURE__ */ t("div", { style: { padding: 48, display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", color: e.textSecondary }, children: /* @__PURE__ */ t(_e, { size: 32, style: { animation: "zg-spin 1.5s linear infinite", color: e.group } }) }) : /* @__PURE__ */ t(pt, { value: m, children: /* @__PURE__ */ o(
1820
1840
  "div",
@@ -1843,7 +1863,7 @@ function Et(n) {
1843
1863
  }
1844
1864
  ) });
1845
1865
  }
1846
- const Dt = [
1866
+ const Mt = [
1847
1867
  { label: "Yellow", value: "#FEF08A" },
1848
1868
  { label: "Green", value: "#BBF7D0" },
1849
1869
  { label: "Blue", value: "#BFDBFE" },
@@ -1851,7 +1871,7 @@ const Dt = [
1851
1871
  { label: "Purple", value: "#E9D5FF" },
1852
1872
  { label: "Orange", value: "#FED7AA" },
1853
1873
  { label: "White", value: "#FFFFFF" }
1854
- ], Oe = {
1874
+ ], Xe = {
1855
1875
  FS: "Finish → Start (FS)",
1856
1876
  SS: "Start → Start (SS)",
1857
1877
  FF: "Finish → Finish (FF)",
@@ -1863,34 +1883,34 @@ function Ft({
1863
1883
  availableMilestones: p = [],
1864
1884
  initialDate: T,
1865
1885
  translations: h,
1866
- onSaveNote: x
1886
+ onSaveNote: w
1867
1887
  }) {
1868
- const w = (g, Y) => h ? typeof h == "function" ? h(g, Y) : h[g] || Y : Y, [C, D] = P(""), [u, $] = P(""), [b, F] = P("#FEF08A"), [S, B] = P(""), [r, i] = P(""), [I, l] = P("FS"), [E, f] = P(!1), [M, s] = P([]), [y, N] = P(""), A = pe(null);
1888
+ const x = (g, Y) => h ? typeof h == "function" ? h(g, Y) : h[g] || Y : Y, [C, M] = P(""), [f, E] = P(""), [b, F] = P("#FEF08A"), [S, B] = P(""), [r, i] = P(""), [I, l] = P("FS"), [$, u] = P(!1), [D, s] = P([]), [y, N] = P(""), A = pe(null);
1869
1889
  ge(() => {
1870
- n && (D(""), $(""), F("#FEF08A"), B(T ?? (/* @__PURE__ */ new Date()).toISOString().split("T")[0]), i(""), l("FS"), s([]), N(""));
1890
+ n && (M(""), E(""), F("#FEF08A"), B(T ?? (/* @__PURE__ */ new Date()).toISOString().split("T")[0]), i(""), l("FS"), s([]), N(""));
1871
1891
  }, [n, T]);
1872
- const Z = [
1892
+ const ee = [
1873
1893
  ...p.map((g) => ({ id: g.id, name: g.name, type: "MILESTONE" }))
1874
1894
  ], k = async () => {
1875
- if (!C.trim() && !u.trim()) {
1876
- N(w("noteModal.errorEmpty", "Please provide a title or content for the note."));
1895
+ if (!C.trim() && !f.trim()) {
1896
+ N(x("noteModal.errorEmpty", "Please provide a title or content for the note."));
1877
1897
  return;
1878
1898
  }
1879
1899
  N("");
1880
1900
  try {
1881
- f(!0), await x({
1882
- title: C || w("noteModal.untitled", "Untitled"),
1883
- description: u,
1901
+ u(!0), await w({
1902
+ title: C || x("noteModal.untitled", "Untitled"),
1903
+ description: f,
1884
1904
  color: b,
1885
1905
  date: S ? `${S}T00:00:00` : (/* @__PURE__ */ new Date()).toISOString(),
1886
1906
  predecessorId: r,
1887
1907
  dependencyType: I,
1888
- files: M
1908
+ files: D
1889
1909
  }), c();
1890
1910
  } catch (g) {
1891
- console.error(g), N(w("noteModal.errorSave", "Error creating note."));
1911
+ console.error(g), N(x("noteModal.errorSave", "Error creating note."));
1892
1912
  } finally {
1893
- f(!1);
1913
+ u(!1);
1894
1914
  }
1895
1915
  };
1896
1916
  return n ? /* @__PURE__ */ t("div", { style: { position: "fixed", inset: 0, background: "rgba(0,0,0,0.2)", backdropFilter: "blur(2px)", display: "flex", alignItems: "center", justifyContent: "center", zIndex: 9999, padding: 16 }, onClick: c, children: /* @__PURE__ */ o("div", { onClick: (g) => g.stopPropagation(), style: {
@@ -1925,8 +1945,8 @@ function Ft({
1925
1945
  {
1926
1946
  type: "text",
1927
1947
  value: C,
1928
- onChange: (g) => D(g.target.value),
1929
- placeholder: w("noteModal.titlePlaceholder", "Note title..."),
1948
+ onChange: (g) => M(g.target.value),
1949
+ placeholder: x("noteModal.titlePlaceholder", "Note title..."),
1930
1950
  style: {
1931
1951
  width: "100%",
1932
1952
  background: "transparent",
@@ -1947,10 +1967,10 @@ function Ft({
1947
1967
  /* @__PURE__ */ t(
1948
1968
  "textarea",
1949
1969
  {
1950
- value: u,
1951
- onChange: (g) => $(g.target.value),
1970
+ value: f,
1971
+ onChange: (g) => E(g.target.value),
1952
1972
  rows: 6,
1953
- placeholder: w("noteModal.contentPlaceholder", "Write your note here..."),
1973
+ placeholder: x("noteModal.contentPlaceholder", "Write your note here..."),
1954
1974
  style: {
1955
1975
  width: "100%",
1956
1976
  background: "transparent",
@@ -1977,7 +1997,7 @@ function Ft({
1977
1997
  multiple: !0,
1978
1998
  onChange: (g) => {
1979
1999
  const Y = g.target.files ? Array.from(g.target.files) : [];
1980
- Y.length > 0 && s((H) => [...H, ...Y]), A.current && (A.current.value = "");
2000
+ Y.length > 0 && s((V) => [...V, ...Y]), A.current && (A.current.value = "");
1981
2001
  },
1982
2002
  style: { display: "none" }
1983
2003
  }
@@ -2007,11 +2027,11 @@ function Ft({
2007
2027
  onMouseLeave: (g) => g.currentTarget.style.background = "rgba(0,0,0,0.05)",
2008
2028
  children: [
2009
2029
  /* @__PURE__ */ t(dt, { size: 13 }),
2010
- w("noteModal.attachFiles", "Attach files")
2030
+ x("noteModal.attachFiles", "Attach files")
2011
2031
  ]
2012
2032
  }
2013
2033
  ),
2014
- M.length > 0 && /* @__PURE__ */ t("div", { style: { marginTop: 8, display: "flex", flexDirection: "column", gap: 4 }, children: M.map((g, Y) => /* @__PURE__ */ o("div", { style: {
2034
+ D.length > 0 && /* @__PURE__ */ t("div", { style: { marginTop: 8, display: "flex", flexDirection: "column", gap: 4 }, children: D.map((g, Y) => /* @__PURE__ */ o("div", { style: {
2015
2035
  display: "flex",
2016
2036
  alignItems: "center",
2017
2037
  gap: 6,
@@ -2031,9 +2051,9 @@ function Ft({
2031
2051
  "button",
2032
2052
  {
2033
2053
  type: "button",
2034
- onClick: () => s((H) => H.filter((q, G) => G !== Y)),
2054
+ onClick: () => s((V) => V.filter((q, H) => H !== Y)),
2035
2055
  style: { background: "none", border: "none", cursor: "pointer", padding: 2, display: "flex", color: "#ef4444" },
2036
- title: w("noteModal.removeFile", "Remove"),
2056
+ title: x("noteModal.removeFile", "Remove"),
2037
2057
  children: /* @__PURE__ */ t(lt, { size: 12 })
2038
2058
  }
2039
2059
  )
@@ -2060,7 +2080,7 @@ function Ft({
2060
2080
  }
2061
2081
  }
2062
2082
  ),
2063
- /* @__PURE__ */ t("div", { style: { display: "flex", gap: 6, alignItems: "center", flexWrap: "wrap", justifyContent: "flex-end" }, children: Dt.map((g) => /* @__PURE__ */ t(
2083
+ /* @__PURE__ */ t("div", { style: { display: "flex", gap: 6, alignItems: "center", flexWrap: "wrap", justifyContent: "flex-end" }, children: Mt.map((g) => /* @__PURE__ */ t(
2064
2084
  "button",
2065
2085
  {
2066
2086
  type: "button",
@@ -2082,10 +2102,10 @@ function Ft({
2082
2102
  g.value
2083
2103
  )) })
2084
2104
  ] }),
2085
- Z.length > 0 && /* @__PURE__ */ o("div", { style: { marginTop: 12, paddingTop: 12, borderTop: "1px solid rgba(0,0,0,0.08)" }, children: [
2105
+ ee.length > 0 && /* @__PURE__ */ o("div", { style: { marginTop: 12, paddingTop: 12, borderTop: "1px solid rgba(0,0,0,0.08)" }, children: [
2086
2106
  /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", gap: 6, marginBottom: 8 }, children: [
2087
2107
  /* @__PURE__ */ t(ct, { size: 14, style: { color: "rgba(58,58,58,0.5)" } }),
2088
- /* @__PURE__ */ t("span", { style: { fontSize: 11, color: "rgba(58,58,58,0.5)", fontWeight: 600 }, children: w("noteModal.dependency", "Dependency") })
2108
+ /* @__PURE__ */ t("span", { style: { fontSize: 11, color: "rgba(58,58,58,0.5)", fontWeight: 600 }, children: x("noteModal.dependency", "Dependency") })
2089
2109
  ] }),
2090
2110
  /* @__PURE__ */ o(
2091
2111
  "select",
@@ -2105,8 +2125,8 @@ function Ft({
2105
2125
  cursor: "pointer"
2106
2126
  },
2107
2127
  children: [
2108
- /* @__PURE__ */ t("option", { value: "", children: w("noteModal.none", "None") }),
2109
- p.length > 0 && /* @__PURE__ */ t("optgroup", { label: w("noteModal.milestones", "Milestones"), children: p.map((g) => /* @__PURE__ */ t("option", { value: g.id, children: g.name }, g.id)) })
2128
+ /* @__PURE__ */ t("option", { value: "", children: x("noteModal.none", "None") }),
2129
+ p.length > 0 && /* @__PURE__ */ t("optgroup", { label: x("noteModal.milestones", "Milestones"), children: p.map((g) => /* @__PURE__ */ t("option", { value: g.id, children: g.name }, g.id)) })
2110
2130
  ]
2111
2131
  }
2112
2132
  ),
@@ -2128,7 +2148,7 @@ function Ft({
2128
2148
  cursor: "pointer",
2129
2149
  marginTop: 6
2130
2150
  },
2131
- children: Object.keys(Oe).map((g) => /* @__PURE__ */ t("option", { value: g, children: Oe[g] }, g))
2151
+ children: Object.keys(Xe).map((g) => /* @__PURE__ */ t("option", { value: g, children: Xe[g] }, g))
2132
2152
  }
2133
2153
  )
2134
2154
  ] }),
@@ -2138,18 +2158,18 @@ function Ft({
2138
2158
  {
2139
2159
  onClick: c,
2140
2160
  style: { padding: "8px 16px", fontSize: 13, color: "#3a3a3a", background: "rgba(255,255,255,0.5)", border: "1px solid rgba(0,0,0,0.1)", borderRadius: 8, cursor: "pointer" },
2141
- children: w("noteModal.cancel", "Cancel")
2161
+ children: x("noteModal.cancel", "Cancel")
2142
2162
  }
2143
2163
  ),
2144
2164
  /* @__PURE__ */ o(
2145
2165
  "button",
2146
2166
  {
2147
2167
  onClick: k,
2148
- disabled: E,
2149
- style: { padding: "8px 20px", fontSize: 13, color: "#fff", background: "#1A3C30", border: "none", borderRadius: 8, cursor: "pointer", display: "flex", alignItems: "center", gap: 6, opacity: E ? 0.5 : 1 },
2168
+ disabled: $,
2169
+ style: { padding: "8px 20px", fontSize: 13, color: "#fff", background: "#1A3C30", border: "none", borderRadius: 8, cursor: "pointer", display: "flex", alignItems: "center", gap: 6, opacity: $ ? 0.5 : 1 },
2150
2170
  children: [
2151
- E && /* @__PURE__ */ t(_e, { size: 16, style: { animation: "zg-spin 1s linear infinite" } }),
2152
- w("noteModal.create", "Create Note")
2171
+ $ && /* @__PURE__ */ t(_e, { size: 16, style: { animation: "zg-spin 1s linear infinite" } }),
2172
+ x("noteModal.create", "Create Note")
2153
2173
  ]
2154
2174
  }
2155
2175
  )
@@ -2232,6 +2252,6 @@ const At = {
2232
2252
  };
2233
2253
  export {
2234
2254
  Ft as NoteModal,
2235
- Et as ProjectGantt,
2255
+ $t as ProjectGantt,
2236
2256
  At as ptBR
2237
2257
  };