@xpyjs/gantt-core 0.0.1-alpha.5 → 0.0.1-beta.0

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/x-gantt.js CHANGED
@@ -2,10 +2,10 @@ var Bt = Object.defineProperty;
2
2
  var zt = (f, t, e) => t in f ? Bt(f, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : f[t] = e;
3
3
  var a = (f, t, e) => zt(f, typeof t != "symbol" ? t + "" : t, e);
4
4
  import H from "dayjs";
5
- import { default as si } from "dayjs";
6
- import { merge as ot, isArray as V, isString as U, isFunction as j, cloneDeep as J, isObject as Tt, isNumber as Pt, omit as gt, throttle as ft, isBoolean as mt, debounce as Yt } from "lodash-es";
7
- import v from "konva";
8
- const St = "0.0.1-alpha.5";
5
+ import { default as ni } from "dayjs";
6
+ import { merge as ot, isArray as U, isString as X, isFunction as j, cloneDeep as J, isObject as Tt, isNumber as Pt, omit as gt, throttle as ft, isBoolean as pt, debounce as Yt } from "lodash-es";
7
+ import y from "konva";
8
+ const St = "0.0.1-beta.0";
9
9
  function Nt() {
10
10
  const f = "#eca710", t = "#ffffff", e = "#e7209e", i = "#ffffff", s = "#1c42e8";
11
11
  [
@@ -24,20 +24,20 @@ function Nt() {
24
24
  `background-color: ${s}; color: ${i}; padding: 2px 4px; border-radius: 0 6px 6px 0; font-weight: normal; margin: 4px 0;`
25
25
  );
26
26
  }
27
- const z = class z {
27
+ const P = class P {
28
28
  /**
29
29
  * 设置日志配置
30
30
  * @param options - 新的日志配置
31
31
  */
32
32
  static setOptions(t) {
33
- z.options = { ...z.options, ...t };
33
+ P.options = { ...P.options, ...t };
34
34
  }
35
35
  /**
36
36
  * 获取当前日志级别
37
37
  * @returns 当前设置的日志级别
38
38
  */
39
39
  static getLevel() {
40
- return z.options.level;
40
+ return P.options.level;
41
41
  }
42
42
  /**
43
43
  * 输出 DEBUG 级别的日志
@@ -45,7 +45,7 @@ const z = class z {
45
45
  * @param args - 需要打印的参数
46
46
  */
47
47
  static debug(...t) {
48
- z.logWithLevel(1, console.debug, ...t);
48
+ P.logWithLevel(1, console.debug, ...t);
49
49
  }
50
50
  /**
51
51
  * 输出 INFO 级别的日志
@@ -53,7 +53,7 @@ const z = class z {
53
53
  * @param args - 需要打印的参数
54
54
  */
55
55
  static info(...t) {
56
- z.logWithLevel(2, console.info, ...t);
56
+ P.logWithLevel(2, console.info, ...t);
57
57
  }
58
58
  /**
59
59
  * 输出 WARN 级别的日志
@@ -61,7 +61,7 @@ const z = class z {
61
61
  * @param args - 需要打印的参数
62
62
  */
63
63
  static warn(...t) {
64
- z.logWithLevel(3, console.warn, ...t);
64
+ P.logWithLevel(3, console.warn, ...t);
65
65
  }
66
66
  /**
67
67
  * 输出 ERROR 级别的日志
@@ -69,7 +69,7 @@ const z = class z {
69
69
  * @param args - 需要打印的参数
70
70
  */
71
71
  static error(...t) {
72
- z.logWithLevel(4, console.error, ...t);
72
+ P.logWithLevel(4, console.error, ...t);
73
73
  }
74
74
  /**
75
75
  * 断言方法
@@ -78,8 +78,8 @@ const z = class z {
78
78
  * @param args - 断言失败时需要打印的参数
79
79
  */
80
80
  static assert(t, ...e) {
81
- if (!t && z.options.level <= 4) {
82
- const i = z.formatArgs("Assertion failed:", ...e);
81
+ if (!t && P.options.level <= 4) {
82
+ const i = P.formatArgs("Assertion failed:", ...e);
83
83
  console.error(...i);
84
84
  }
85
85
  }
@@ -87,13 +87,13 @@ const z = class z {
87
87
  * 返回日志信息
88
88
  */
89
89
  static getMessage(...t) {
90
- return z.formatArgs(...t).join("");
90
+ return P.formatArgs(...t).join("");
91
91
  }
92
92
  /**
93
93
  * 抛出异常
94
94
  */
95
95
  static exception(...t) {
96
- return new Error(z.getMessage(...t));
96
+ return new Error(P.getMessage(...t));
97
97
  }
98
98
  /**
99
99
  * 根据级别输出日志的核心方法
@@ -102,8 +102,8 @@ const z = class z {
102
102
  * @param args - 需要打印的参数
103
103
  */
104
104
  static logWithLevel(t, e, ...i) {
105
- if (z.options.level <= t) {
106
- const s = z.formatArgs(...i);
105
+ if (P.options.level <= t) {
106
+ const s = P.formatArgs(...i);
107
107
  e(...s);
108
108
  }
109
109
  }
@@ -113,17 +113,17 @@ const z = class z {
113
113
  * @returns 格式化后的日志参数数组
114
114
  */
115
115
  static formatArgs(...t) {
116
- const e = [z.Prefix];
117
- return z.options.showTimestamp && e.unshift(`[${H().format("YYYY-MM-DD HH:mm:ss.SSS")}]`), [e.join(""), ...t];
116
+ const e = [P.Prefix];
117
+ return P.options.showTimestamp && e.unshift(`[${H().format("YYYY-MM-DD HH:mm:ss.SSS")}]`), [e.join(""), ...t];
118
118
  }
119
119
  };
120
- a(z, "Prefix", "[XGantt]"), a(z, "options", {
120
+ a(P, "Prefix", "[XGantt]"), a(P, "options", {
121
121
  // 默认级别,INFO 及以上会被打印
122
122
  level: 2,
123
123
  // 默认不显示时间戳
124
124
  showTimestamp: !1
125
125
  });
126
- let L = z;
126
+ let D = P;
127
127
  const at = () => ({
128
128
  data: [],
129
129
  links: {
@@ -323,8 +323,28 @@ class Ut {
323
323
  return this.options;
324
324
  }
325
325
  setOptions(t, e = { merge: !0 }) {
326
- var i;
327
- this.options = e.merge ? ot(at(), this.options, t) : ot(at(), t), V((i = t.links) == null ? void 0 : i.data) && (this.options.links.data = t.links.data);
326
+ var i, s;
327
+ if (this.options = e.merge ? ot(at(), this.options, t) : ot(at(), t), U((i = t.links) == null ? void 0 : i.data) && (this.options.links.data = t.links.data), (s = t.holiday) != null && s.holidays && t.holiday.holidays.length > 0) {
328
+ const n = [];
329
+ t.holiday.holidays.forEach((o) => {
330
+ if (U(o.date)) {
331
+ const r = o.date.map((h) => H(h)).sort((h, l) => h.diff(l));
332
+ for (let h = 1; h < r.length; h++)
333
+ if (r[h].diff(r[h - 1], "day") > 1) {
334
+ n.push({
335
+ ...o,
336
+ date: r.slice(0, h).map((l) => l.valueOf())
337
+ }), r.splice(0, h);
338
+ break;
339
+ }
340
+ r.length > 0 && n.push({
341
+ ...o,
342
+ date: r.map((h) => h.valueOf())
343
+ });
344
+ } else
345
+ n.push(o);
346
+ }), this.options.holiday.holidays = n;
347
+ }
328
348
  }
329
349
  update(t) {
330
350
  this.setOptions(t);
@@ -333,7 +353,7 @@ class Ut {
333
353
  var s;
334
354
  let e = "";
335
355
  const i = (s = this.options.row) == null ? void 0 : s.backgroundColor;
336
- return U(i) ? e = i : V(i) && i.length > 0 ? e = i[t.level] : j(i) && (e = i(t.getEmitData())), e;
356
+ return X(i) ? e = i : U(i) && i.length > 0 ? e = i[t.level] : j(i) && (e = i(t.getEmitData())), e;
337
357
  }
338
358
  unpackFunc(t, e) {
339
359
  return j(t) ? t(e.getEmitData()) : t;
@@ -380,7 +400,7 @@ class Xt {
380
400
  this.events.clear();
381
401
  }
382
402
  }
383
- var y = /* @__PURE__ */ ((f) => (f.LOADED = "loaded", f.COLUMN_WIDTH_CHANGE = "column-width-change", f.MOVE_GUIDELINE = "move-guideline", f.SHOW_GUIDELINE = "show-guideline", f.HIDE_GUIDELINE = "hide-guideline", f.TOGGLE_COLLAPSE = "toggle-collapse", f.SCROLL = "scroll", f.CHART_OFFSET_CHANGE = "chart_offset_change", f.DATA_UPDATE = "data-update", f.VIEW_UPDATE = "view-update", f.UPDATE_TABLE_HEADER = "update_table_header", f.UPDATE_TABLE_BODY = "update_table_body", f.UPDATE_CHART_HEADER = "update_chart_header", f.UPDATE_TASK = "update_task", f.UPDATE_LINK = "update_link", f.CREATE_LINK = "create_link", f.TASK_SELECTED = "task_selected", f.TASK_UNSELECTED = "task_unselected", f.SELECT_LINK = "select_link", f.CHECK_TASK = "check_task", f.CONTEXT_LINK = "context_link", f.ROW_CLICK = "row-click", f.ROW_DBL_CLICK = "row-dbl-click", f.ROW_CONTEXTMENU = "row-contextmenu", f.SLIDER_CLICK = "slider-click", f.SLIDER_DBL_CLICK = "slider-dbl-click", f.SLIDER_CONTEXTMENU = "slider-contextmenu", f.SLIDER_MOVING = "slider-moving", f.SLIDER_HOVER = "slider-hover", f.SLIDER_LEAVE = "slider-leave", f.ROW_HIGHLIGHT = "row-highlight", f.ROW_UNHIGHLIGHT = "row-unhighlight", f.TASK_DRAG_START = "task-drag-start", f.TASK_DRAG_MOVE = "task-drag-move", f.TASK_DRAG_END = "task-drag-end", f.BASELINE_CLICK = "baseline-click", f.BASELINE_CONTEXTMENU = "baseline-contextmenu", f.BASELINE_MOUSEOVER = "baseline-mouseover", f.BASELINE_MOUSEOUT = "baseline-mouseout", f.ERROR = "error", f))(y || {}), q = /* @__PURE__ */ ((f) => (f.LINK_NOT_ALLOWED = "LINK_NOT_ALLOWED", f.LINK_SAME = "LINK_SAME", f.LINK_EXIST = "LINK_EXIST", f))(q || {});
403
+ var S = /* @__PURE__ */ ((f) => (f.LOADED = "loaded", f.COLUMN_WIDTH_CHANGE = "column-width-change", f.MOVE_GUIDELINE = "move-guideline", f.SHOW_GUIDELINE = "show-guideline", f.HIDE_GUIDELINE = "hide-guideline", f.TOGGLE_COLLAPSE = "toggle-collapse", f.SCROLL = "scroll", f.CHART_OFFSET_CHANGE = "chart_offset_change", f.DATA_UPDATE = "data-update", f.VIEW_UPDATE = "view-update", f.UPDATE_TABLE_HEADER = "update_table_header", f.UPDATE_TABLE_BODY = "update_table_body", f.UPDATE_CHART_HEADER = "update_chart_header", f.UPDATE_TASK = "update_task", f.UPDATE_LINK = "update_link", f.CREATE_LINK = "create_link", f.TASK_SELECTED = "task_selected", f.TASK_UNSELECTED = "task_unselected", f.SELECT_LINK = "select_link", f.CHECK_TASK = "check_task", f.CONTEXT_LINK = "context_link", f.ROW_CLICK = "row-click", f.ROW_DBL_CLICK = "row-dbl-click", f.ROW_CONTEXTMENU = "row-contextmenu", f.SLIDER_CLICK = "slider-click", f.SLIDER_DBL_CLICK = "slider-dbl-click", f.SLIDER_CONTEXTMENU = "slider-contextmenu", f.SLIDER_MOVING = "slider-moving", f.SLIDER_HOVER = "slider-hover", f.SLIDER_LEAVE = "slider-leave", f.ROW_HIGHLIGHT = "row-highlight", f.ROW_UNHIGHLIGHT = "row-unhighlight", f.TASK_DRAG_START = "task-drag-start", f.TASK_DRAG_MOVE = "task-drag-move", f.TASK_DRAG_END = "task-drag-end", f.BASELINE_CLICK = "baseline-click", f.BASELINE_CONTEXTMENU = "baseline-contextmenu", f.BASELINE_MOUSEOVER = "baseline-mouseover", f.BASELINE_MOUSEOUT = "baseline-mouseout", f.ERROR = "error", f))(S || {}), q = /* @__PURE__ */ ((f) => (f.LINK_NOT_ALLOWED = "LINK_NOT_ALLOWED", f.LINK_SAME = "LINK_SAME", f.LINK_EXIST = "LINK_EXIST", f))(q || {});
384
404
  function Z() {
385
405
  return Math.random().toString(36).substring(2, 15);
386
406
  }
@@ -447,7 +467,7 @@ class dt {
447
467
  this.store = t, this.event = e, this.fields = this.store.getOptionManager().getOptions().fields, this.id = n || i[this.fields.id] || Z(), this.data = i, this.name = i[this.fields.name] || "", this.type = i[this.fields.type] || "task", this.updateMode(), this.progress = i[this.fields.progress], this.expanded = this.store.getOptionManager().getOptions().expand.show ? this.store.getOptionManager().getOptions().expand.enabled : !0, this.children = [], this.level = s && s.level !== void 0 ? s.level + 1 : 0, this.parent = s, this.flatIndex = 0, this.store.updateTime(this.startTime, this.endTime);
448
468
  }
449
469
  getField(t) {
450
- if (!t || U(t) && t.trim() === "")
470
+ if (!t || X(t) && t.trim() === "")
451
471
  return;
452
472
  if (!t.includes("."))
453
473
  return this.data[t];
@@ -466,13 +486,13 @@ class dt {
466
486
  this.data[this.fields.startTime] && (this.startTime = H(this.data[this.fields.startTime])), this.data[this.fields.endTime] && (this.endTime = H(this.data[this.fields.endTime])), this.startTime && this.endTime && (this.duration = this.endTime.diff(this.startTime)), this.isMilestone() && (this.endTime = this.startTime);
467
487
  }
468
488
  updateData(t) {
469
- this.data = t, t[this.fields.name] && (this.name = t[this.fields.name]), t[this.fields.type] && (this.type = t[this.fields.type]), this.updateMode(), t[this.fields.progress] !== void 0 && (this.progress = t[this.fields.progress]), this.event.emit(y.UPDATE_TASK, this);
489
+ this.data = t, t[this.fields.name] && (this.name = t[this.fields.name]), t[this.fields.type] && (this.type = t[this.fields.type]), this.updateMode(), t[this.fields.progress] !== void 0 && (this.progress = t[this.fields.progress]), this.event.emit(S.UPDATE_TASK, this);
470
490
  }
471
491
  updateTime(t, e) {
472
492
  var s, n;
473
493
  this.startTime = t, this.endTime = this.isMilestone() ? t : e;
474
494
  const i = (n = (s = this.store) == null ? void 0 : s.getOptionManager().getOptions()) == null ? void 0 : n.dateFormat;
475
- this.data[this.fields.startTime || "startTime"] = this.startTime.format(i), this.isMilestone() ? this.data[this.fields.endTime || "endTime"] = this.startTime.add(this.duration).format(i) : this.data[this.fields.endTime || "endTime"] = this.endTime.format(i), this.event.emit(y.UPDATE_TASK, this);
495
+ this.data[this.fields.startTime || "startTime"] = this.startTime.format(i), this.isMilestone() ? this.data[this.fields.endTime || "endTime"] = this.startTime.add(this.duration).format(i) : this.data[this.fields.endTime || "endTime"] = this.endTime.format(i), this.event.emit(S.UPDATE_TASK, this);
476
496
  }
477
497
  clone() {
478
498
  return new dt(
@@ -493,7 +513,7 @@ class dt {
493
513
  getAllChildren() {
494
514
  const t = [], e = (i) => {
495
515
  i.forEach((s) => {
496
- t.push(s), V(s.children) && s.children.length > 0 && e(s.children);
516
+ t.push(s), U(s.children) && s.children.length > 0 && e(s.children);
497
517
  });
498
518
  };
499
519
  return e(this.children), t;
@@ -547,7 +567,7 @@ class Vt {
547
567
  if (!this.validate()) return null;
548
568
  const t = this.store.getDataManager().getTaskById(this.taskId);
549
569
  if (!t || !t.startTime || !t.endTime) return null;
550
- const e = this.store.getTimeAxis().getCellUnit(), i = this.startTime.diff(t.startTime, e, !0), s = this.endTime.diff(t.endTime, e, !0), n = this.store.getOptionManager().getOptions().baselines.compare.tolerance, o = i < -n ? "delayed" : i > n ? "ahead" : "ontime", r = s < -n ? "delayed" : s > n ? "ahead" : "ontime", l = this.endTime.diff(this.startTime, e, !0), c = t.endTime.diff(t.startTime, e, !0), g = l > 0 ? (c - l) / l * 100 : 0;
570
+ const e = this.store.getTimeAxis().getCellUnit(), i = this.startTime.diff(t.startTime, e, !0), s = this.endTime.diff(t.endTime, e, !0), n = this.store.getOptionManager().getOptions().baselines.compare.tolerance, o = i < -n ? "delayed" : i > n ? "ahead" : "ontime", r = s < -n ? "delayed" : s > n ? "ahead" : "ontime", h = this.endTime.diff(this.startTime, e, !0), l = t.endTime.diff(t.startTime, e, !0), g = h > 0 ? (l - h) / h * 100 : 0;
551
571
  return { startDiff: i, endDiff: s, startStatus: o, endStatus: r, progressDiff: g, unit: e };
552
572
  }
553
573
  }
@@ -592,13 +612,13 @@ class Kt {
592
612
  * 设置源数据并初始化任务
593
613
  */
594
614
  setData(t, e = !1) {
595
- this.rawData = t, this.initTasks(e), this.invalidateCache(), this.event.emit(y.DATA_UPDATE);
615
+ this.rawData = t, this.initTasks(e), this.invalidateCache(), this.event.emit(S.DATA_UPDATE);
596
616
  }
597
617
  /**
598
618
  * 初始化任务
599
619
  */
600
620
  initTasks(t = !1) {
601
- this.dataLevel = 0, t ? (this.tasks = [], this.taskMap.clear(), this.collapsedTaskIds.clear(), this.rawData.forEach((e) => {
621
+ t ? (this.dataLevel = 0, this.tasks = [], this.taskMap.clear(), this.collapsedTaskIds.clear(), this.rawData.forEach((e) => {
602
622
  this.tasks.push(this.createTask(e));
603
623
  })) : this.rawData.length > 0 ? this.updateTask(this.rawData, this.tasks) : (this.tasks = [], this.taskMap.clear(), this.collapsedTaskIds.clear());
604
624
  }
@@ -621,10 +641,10 @@ class Kt {
621
641
  if (o && o.children)
622
642
  this.updateTask(r, o.children, o);
623
643
  else {
624
- const l = r.map(
625
- (c) => this.createTask(c, e[s])
644
+ const h = r.map(
645
+ (l) => this.createTask(l, e[s])
626
646
  );
627
- e[s].children = l;
647
+ e[s].children = h;
628
648
  }
629
649
  } else o && o.children && (o.children = []);
630
650
  s++;
@@ -712,7 +732,7 @@ class Kt {
712
732
  const i = this.getTaskById(t);
713
733
  return i ? (i.expanded = !i.expanded, i.expanded ? this.collapsedTaskIds.delete(i.id) : this.collapsedTaskIds.add(i.id), e && i.children && i.children.length > 0 && i.children.forEach((s) => {
714
734
  this.expandTask(s.id, e);
715
- }), this.invalidateCache(), this.event.emit(y.VIEW_UPDATE), !0) : !1;
735
+ }), this.invalidateCache(), this.event.emit(S.VIEW_UPDATE), !0) : !1;
716
736
  }
717
737
  /**
718
738
  * 按条件筛选任务
@@ -770,7 +790,7 @@ class Kt {
770
790
  * 清空所有数据
771
791
  */
772
792
  clear() {
773
- this.rawData = [], this.tasks = [], this.taskMap.clear(), this.visibleTasksCache = [], this.isDirty = !0, this.collapsedTaskIds.clear(), this.event.emit(y.DATA_UPDATE);
793
+ this.rawData = [], this.tasks = [], this.taskMap.clear(), this.visibleTasksCache = [], this.isDirty = !0, this.collapsedTaskIds.clear(), this.event.emit(S.DATA_UPDATE);
774
794
  }
775
795
  /**
776
796
  * 更新子任务的层级
@@ -798,7 +818,7 @@ class Kt {
798
818
  */
799
819
  selectTask(t) {
800
820
  const e = this.getTaskById(t);
801
- return e ? (this.selectedTaskId === t || (this.unselectTask(), this.selectedTaskId = t, this.event.emit(y.TASK_SELECTED, e)), !0) : !1;
821
+ return e ? (this.selectedTaskId === t || (this.unselectTask(), this.selectedTaskId = t, this.event.emit(S.TASK_SELECTED, e)), !0) : !1;
802
822
  }
803
823
  /**
804
824
  * 取消任务选择
@@ -806,7 +826,7 @@ class Kt {
806
826
  unselectTask() {
807
827
  if (this.selectedTaskId) {
808
828
  const t = this.selectedTaskId;
809
- this.selectedTaskId = null, this.event.emit(y.TASK_UNSELECTED, t);
829
+ this.selectedTaskId = null, this.event.emit(S.TASK_UNSELECTED, t);
810
830
  }
811
831
  }
812
832
  /**
@@ -839,24 +859,24 @@ class Kt {
839
859
  }
840
860
  updateTaskTime(t, e, i, s, n = []) {
841
861
  let o = e, r = i;
842
- const l = this.store.getOptionManager().getOptions().bar.move.link.child, c = this.store.getOptionManager().getOptions().bar.move.link.parent, g = this.store.getTimeAxis().getCellUnit();
843
- let h = t.parent;
844
- for (; c !== "none" && h; ) {
845
- if (c === "expand") {
846
- let m = h.startTime || o, p = h.endTime || r;
847
- (!h.startTime || o.isBefore(h.startTime)) && (m = o), (!h.endTime || r.isAfter(h.endTime)) && (p = r), (h.startTime === void 0 || h.endTime === void 0 || !m.isSame(h.startTime) || !p.isSame(h.endTime)) && (n.findIndex((u) => u.id === h.id) === -1 && n.push(h.clone()), h.updateTime(m, p));
848
- } else c === "strict" && (h.startTime && o.isBefore(h.startTime) && (o = h.startTime, r.isSameOrBefore(o) && (r = o.add(1, g))), h.endTime && r.isAfter(h.endTime) && (r = h.endTime, o.isAfter(r) && (o = r.subtract(1, g))));
849
- h = h.parent;
862
+ const h = this.store.getOptionManager().getOptions().bar.move.link.child, l = this.store.getOptionManager().getOptions().bar.move.link.parent, g = this.store.getTimeAxis().getCellUnit();
863
+ let c = t.parent;
864
+ for (; l !== "none" && c; ) {
865
+ if (l === "expand") {
866
+ let p = c.startTime || o, m = c.endTime || r;
867
+ (!c.startTime || o.isBefore(c.startTime)) && (p = o), (!c.endTime || r.isAfter(c.endTime)) && (m = r), (c.startTime === void 0 || c.endTime === void 0 || !p.isSame(c.startTime) || !m.isSame(c.endTime)) && (n.findIndex((d) => d.id === c.id) === -1 && n.push(c.clone()), c.updateTime(p, m));
868
+ } else l === "strict" && (c.startTime && o.isBefore(c.startTime) && (o = c.startTime, r.isSameOrBefore(o) && (r = o.add(1, g))), c.endTime && r.isAfter(c.endTime) && (r = c.endTime, o.isAfter(r) && (o = r.subtract(1, g))));
869
+ c = c.parent;
850
870
  }
851
- let d = t.children || [];
852
- for (; l !== "none" && d.length > 0; ) {
853
- const m = [];
854
- d.forEach((p) => {
855
- let u = p.startTime || o, x = p.endTime || r, w = o.diff(t.startTime), E = r.diff(t.endTime);
856
- l === "scale" ? s === "both" ? (n.findIndex((T) => T.id === p.id) === -1 && n.push(p.clone()), p.updateTime(u.add(w), x.add(E))) : s === "left" ? (u = u.add(w), u.isSameOrAfter(x.subtract(1, g)) && (x.isBefore(t.endTime) ? x = u.add(1, g) : u = x.subtract(1, g), u.isSameOrBefore(o) && (o = u)), n.findIndex((T) => T.id === p.id) === -1 && n.push(p.clone()), p.updateTime(u, x)) : s === "right" && (x = x.add(E), x.isSameOrBefore(u.add(1, g)) && (u.isAfter(t.startTime) ? u = x.subtract(1, g) : x = u.add(1, g)), x.isSameOrAfter(r) && (r = x), n.findIndex((T) => T.id === p.id) === -1 && n.push(p.clone()), p.updateTime(u, x)) : l === "fixed" && (s === "both" ? (n.findIndex((T) => T.id === p.id) === -1 && n.push(p.clone()), p.updateTime(u.add(w), x.add(E))) : s === "left" ? u.isSameOrBefore(o) && (u = o, u.isSameOrAfter(x.subtract(1, g)) && (x.isBefore(t.endTime) ? x = u.add(1, g) : u = x.subtract(1, g), u.isSameOrBefore(o) && (o = u)), n.findIndex((T) => T.id === p.id) === -1 && n.push(p.clone()), p.updateTime(u, x)) : s === "right" && x.isSameOrAfter(r) && (x = r, x.isSameOrBefore(u.add(1, g)) && (u.isAfter(t.startTime) ? u = x.subtract(1, g) : x = u.add(1, g)), x.isSameOrAfter(r) && (r = x), n.findIndex((T) => T.id === p.id) === -1 && n.push(p.clone()), p.updateTime(u, x))), p.children && p.children.length > 0 && m.push(...p.children);
857
- }), d = m;
871
+ let u = t.children || [];
872
+ for (; h !== "none" && u.length > 0; ) {
873
+ const p = [];
874
+ u.forEach((m) => {
875
+ let d = m.startTime || o, x = m.endTime || r, w = o.diff(t.startTime), T = r.diff(t.endTime);
876
+ h === "scale" ? s === "both" ? (n.findIndex((v) => v.id === m.id) === -1 && n.push(m.clone()), m.updateTime(d.add(w), x.add(T))) : s === "left" ? (d = d.add(w), d.isSameOrAfter(x.subtract(1, g)) && (x.isBefore(t.endTime) ? x = d.add(1, g) : d = x.subtract(1, g), d.isSameOrBefore(o) && (o = d)), n.findIndex((v) => v.id === m.id) === -1 && n.push(m.clone()), m.updateTime(d, x)) : s === "right" && (x = x.add(T), x.isSameOrBefore(d.add(1, g)) && (d.isAfter(t.startTime) ? d = x.subtract(1, g) : x = d.add(1, g)), x.isSameOrAfter(r) && (r = x), n.findIndex((v) => v.id === m.id) === -1 && n.push(m.clone()), m.updateTime(d, x)) : h === "fixed" && (s === "both" ? (n.findIndex((v) => v.id === m.id) === -1 && n.push(m.clone()), m.updateTime(d.add(w), x.add(T))) : s === "left" ? d.isSameOrBefore(o) && (d = o, d.isSameOrAfter(x.subtract(1, g)) && (x.isBefore(t.endTime) ? x = d.add(1, g) : d = x.subtract(1, g), d.isSameOrBefore(o) && (o = d)), n.findIndex((v) => v.id === m.id) === -1 && n.push(m.clone()), m.updateTime(d, x)) : s === "right" && x.isSameOrAfter(r) && (x = r, x.isSameOrBefore(d.add(1, g)) && (d.isAfter(t.startTime) ? d = x.subtract(1, g) : x = d.add(1, g)), x.isSameOrAfter(r) && (r = x), n.findIndex((v) => v.id === m.id) === -1 && n.push(m.clone()), m.updateTime(d, x))), m.children && m.children.length > 0 && p.push(...m.children);
877
+ }), u = p;
858
878
  }
859
- n.findIndex((m) => m.id === t.id) === -1 && n.push(t.clone()), t.updateTime(o, r);
879
+ n.findIndex((p) => p.id === t.id) === -1 && n.push(t.clone()), t.updateTime(o, r);
860
880
  }
861
881
  //** 基线数据操作 */
862
882
  setBaselines(t) {
@@ -878,7 +898,7 @@ class Kt {
878
898
  return this.baselineTaskMap.get(t) || [];
879
899
  }
880
900
  }
881
- function G(f, t, e) {
901
+ function R(f, t, e) {
882
902
  if (!Number.isFinite(f) || !Number.isFinite(t) || !Number.isFinite(e))
883
903
  return Number.isFinite(t) ? t : 0;
884
904
  const i = Math.min(t, e), s = Math.max(t, e);
@@ -886,9 +906,9 @@ function G(f, t, e) {
886
906
  }
887
907
  function st(f, t) {
888
908
  let e = f;
889
- return U(e) && (/%$/.test(e) ? e = t * parseFloat(e) / 100 : e = parseFloat(e)), isNaN(e) ? 0 : e;
909
+ return X(e) && (/%$/.test(e) ? e = t * parseFloat(e) / 100 : e = parseFloat(e)), isNaN(e) ? 0 : e;
890
910
  }
891
- function pt(f, t) {
911
+ function mt(f, t) {
892
912
  if (t === 0)
893
913
  throw new Error("基准值不能为0");
894
914
  if (Math.abs(f) <= t / 2)
@@ -918,10 +938,10 @@ function xt(f, t = 16, e = 16) {
918
938
  return new Promise((i, s) => {
919
939
  let n = f;
920
940
  if (!/viewBox\s*=\s*["'][^"']*["']/.test(n)) {
921
- const g = n.match(/width\s*=\s*["']([^"']*)["']/), h = n.match(/height\s*=\s*["']([^"']*)["']/), d = g ? parseFloat(g[1]) : t, m = h ? parseFloat(h[1]) : e;
941
+ const g = n.match(/width\s*=\s*["']([^"']*)["']/), c = n.match(/height\s*=\s*["']([^"']*)["']/), u = g ? parseFloat(g[1]) : t, p = c ? parseFloat(c[1]) : e;
922
942
  n = n.replace(
923
943
  /<svg([^>]*)>/,
924
- `<svg$1 viewBox="0 0 ${d} ${m}">`
944
+ `<svg$1 viewBox="0 0 ${u} ${p}">`
925
945
  );
926
946
  }
927
947
  n = n.replace(/width\s*=\s*["'][^"']*["']/, `width="${t}"`), n = n.replace(/height\s*=\s*["'][^"']*["']/, `height="${e}"`), /width\s*=/.test(n) || (n = n.replace(/<svg/, `<svg width="${t}"`)), /height\s*=/.test(n) || (n = n.replace(/<svg/, `<svg height="${e}"`)), /preserveAspectRatio\s*=/.test(n) || (n = n.replace(
@@ -934,65 +954,65 @@ function xt(f, t = 16, e = 16) {
934
954
  }, r.onerror = (g) => {
935
955
  URL.revokeObjectURL(r.src), s(g);
936
956
  };
937
- const l = new Blob([n], { type: "image/svg+xml" }), c = URL.createObjectURL(l);
938
- r.src = c;
957
+ const h = new Blob([n], { type: "image/svg+xml" }), l = URL.createObjectURL(h);
958
+ r.src = l;
939
959
  });
940
960
  }
941
961
  function qt(f) {
942
962
  var s;
943
963
  if (typeof f == "object" && f !== null)
944
964
  return {
945
- r: G(f.r ?? 0, 0, 255),
946
- g: G(f.g ?? 0, 0, 255),
947
- b: G(f.b ?? 0, 0, 255),
948
- a: G(f.a ?? 1, 0, 1)
965
+ r: R(f.r ?? 0, 0, 255),
966
+ g: R(f.g ?? 0, 0, 255),
967
+ b: R(f.b ?? 0, 0, 255),
968
+ a: R(f.a ?? 1, 0, 1)
949
969
  };
950
970
  if (typeof f != "string")
951
- return L.warn(`Invalid color value type: ${typeof f}`), null;
971
+ return D.warn(`Invalid color value type: ${typeof f}`), null;
952
972
  let t = f.trim();
953
973
  const e = (s = document == null ? void 0 : document.createElement("canvas")) == null ? void 0 : s.getContext("2d");
954
974
  if (e && (e.fillStyle = t, t = e.fillStyle), t.startsWith("#")) {
955
975
  const n = t.slice(1);
956
- let o, r, l, c, g = 1;
976
+ let o, r, h, l, g = 1;
957
977
  try {
958
978
  o = parseInt(n, 16);
959
979
  } catch {
960
- return L.warn(`Invalid hex color: ${f}`), null;
980
+ return D.warn(`Invalid hex color: ${f}`), null;
961
981
  }
962
982
  if (n.length === 3)
963
- r = (o >> 8 & 15) * 17, l = (o >> 4 & 15) * 17, c = (o & 15) * 17;
983
+ r = (o >> 8 & 15) * 17, h = (o >> 4 & 15) * 17, l = (o & 15) * 17;
964
984
  else if (n.length === 6)
965
- r = o >> 16 & 255, l = o >> 8 & 255, c = o & 255;
985
+ r = o >> 16 & 255, h = o >> 8 & 255, l = o & 255;
966
986
  else if (n.length === 8)
967
- r = o >> 24 & 255, l = o >> 16 & 255, c = o >> 8 & 255, g = (o & 255) / 255;
987
+ r = o >> 24 & 255, h = o >> 16 & 255, l = o >> 8 & 255, g = (o & 255) / 255;
968
988
  else
969
- return L.warn(`Invalid hex color length: ${f}`), null;
970
- return { r, g: l, b: c, a: g };
989
+ return D.warn(`Invalid hex color length: ${f}`), null;
990
+ return { r, g: h, b: l, a: g };
971
991
  }
972
992
  let i = t.match(
973
993
  /rgba?\(\s*(\d+%?)\s*,\s*(\d+%?)\s*,\s*(\d+%?)\s*(?:,\s*([\d.]+)\s*)?\)/i
974
994
  );
975
995
  if (i) {
976
- const n = (o) => o.endsWith("%") ? G(parseFloat(o) / 100 * 255, 0, 255) : G(parseInt(o, 10), 0, 255);
996
+ const n = (o) => o.endsWith("%") ? R(parseFloat(o) / 100 * 255, 0, 255) : R(parseInt(o, 10), 0, 255);
977
997
  return {
978
998
  r: n(i[1]),
979
999
  g: n(i[2]),
980
1000
  b: n(i[3]),
981
- a: i[4] !== void 0 ? G(parseFloat(i[4]), 0, 1) : 1
1001
+ a: i[4] !== void 0 ? R(parseFloat(i[4]), 0, 1) : 1
982
1002
  };
983
1003
  }
984
- return L.warn(`Could not parse color: ${f}`), null;
1004
+ return D.warn(`Could not parse color: ${f}`), null;
985
1005
  }
986
1006
  function Qt(f, t, e, i, s = !1, n = !1) {
987
- const o = (d) => {
988
- const m = Math.round(G(d, 0, 255)).toString(16);
989
- return m.length === 1 ? "0" + m : m;
990
- }, r = o(f), l = o(t), c = o(e), g = o(i * 255);
991
- if (s && r[0] === r[1] && l[0] === l[1] && c[0] === c[1] && i === 1 && // Alpha 必须为 1 才能缩写
1007
+ const o = (u) => {
1008
+ const p = Math.round(R(u, 0, 255)).toString(16);
1009
+ return p.length === 1 ? "0" + p : p;
1010
+ }, r = o(f), h = o(t), l = o(e), g = o(i * 255);
1011
+ if (s && r[0] === r[1] && h[0] === h[1] && l[0] === l[1] && i === 1 && // Alpha 必须为 1 才能缩写
992
1012
  !n)
993
- return `#${r[0]}${l[0]}${c[0]}`;
994
- const h = `#${r}${l}${c}`;
995
- return n || i < 1 ? `${h}${g}` : h;
1013
+ return `#${r[0]}${h[0]}${l[0]}`;
1014
+ const c = `#${r}${h}${l}`;
1015
+ return n || i < 1 ? `${c}${g}` : c;
996
1016
  }
997
1017
  class tt {
998
1018
  /**
@@ -1008,7 +1028,7 @@ class tt {
1008
1028
  a(this, "_b");
1009
1029
  a(this, "_a");
1010
1030
  const e = qt(t);
1011
- e === null ? (L.error(`Failed to parse color: ${t}. Using default black.`), this._r = 0, this._g = 0, this._b = 0, this._a = 1) : (this._r = Math.round(e.r), this._g = Math.round(e.g), this._b = Math.round(e.b), this._a = e.a);
1031
+ e === null ? (D.error(`Failed to parse color: ${t}. Using default black.`), this._r = 0, this._g = 0, this._b = 0, this._a = 1) : (this._r = Math.round(e.r), this._g = Math.round(e.g), this._b = Math.round(e.b), this._a = e.a);
1012
1032
  }
1013
1033
  // --- Getters ---
1014
1034
  /** 获取 Red 通道值 (0-255) */
@@ -1028,16 +1048,16 @@ class tt {
1028
1048
  return this._a;
1029
1049
  }
1030
1050
  red(t) {
1031
- return t === void 0 ? this._r : (this._r = Math.round(G(t, 0, 255)), this);
1051
+ return t === void 0 ? this._r : (this._r = Math.round(R(t, 0, 255)), this);
1032
1052
  }
1033
1053
  green(t) {
1034
- return t === void 0 ? this._g : (this._g = Math.round(G(t, 0, 255)), this);
1054
+ return t === void 0 ? this._g : (this._g = Math.round(R(t, 0, 255)), this);
1035
1055
  }
1036
1056
  blue(t) {
1037
- return t === void 0 ? this._b : (this._b = Math.round(G(t, 0, 255)), this);
1057
+ return t === void 0 ? this._b : (this._b = Math.round(R(t, 0, 255)), this);
1038
1058
  }
1039
1059
  alpha(t) {
1040
- return t === void 0 ? this._a : (this._a = G(t, 0, 1), this);
1060
+ return t === void 0 ? this._a : (this._a = R(t, 0, 1), this);
1041
1061
  }
1042
1062
  // --- 输出方法 ---
1043
1063
  /**
@@ -1091,8 +1111,8 @@ class tt {
1091
1111
  */
1092
1112
  brighten(t = 10) {
1093
1113
  if (t < 0) return this.darken(-t);
1094
- const e = G(t, 0, 100) / 100;
1095
- return this._r = Math.round(G(this._r + (255 - this._r) * e, 0, 255)), this._g = Math.round(G(this._g + (255 - this._g) * e, 0, 255)), this._b = Math.round(G(this._b + (255 - this._b) * e, 0, 255)), this;
1114
+ const e = R(t, 0, 100) / 100;
1115
+ return this._r = Math.round(R(this._r + (255 - this._r) * e, 0, 255)), this._g = Math.round(R(this._g + (255 - this._g) * e, 0, 255)), this._b = Math.round(R(this._b + (255 - this._b) * e, 0, 255)), this;
1096
1116
  }
1097
1117
  /**
1098
1118
  * 降低颜色亮度 (变暗)。
@@ -1101,8 +1121,8 @@ class tt {
1101
1121
  */
1102
1122
  darken(t = 10) {
1103
1123
  if (t < 0) return this.brighten(-t);
1104
- const e = G(t, 0, 100) / 100;
1105
- return this._r = Math.round(G(this._r * (1 - e), 0, 255)), this._g = Math.round(G(this._g * (1 - e), 0, 255)), this._b = Math.round(G(this._b * (1 - e), 0, 255)), this;
1124
+ const e = R(t, 0, 100) / 100;
1125
+ return this._r = Math.round(R(this._r * (1 - e), 0, 255)), this._g = Math.round(R(this._g * (1 - e), 0, 255)), this._b = Math.round(R(this._b * (1 - e), 0, 255)), this;
1106
1126
  }
1107
1127
  /**
1108
1128
  * 判断颜色是否偏亮。
@@ -1126,14 +1146,14 @@ class tt {
1126
1146
  * @returns 当前 Colorjs 实例。
1127
1147
  */
1128
1148
  mix(t, e = 50) {
1129
- const i = G(e, 0, 100) / 100, s = F(t);
1149
+ const i = R(e, 0, 100) / 100, s = F(t);
1130
1150
  return this._r = Math.round(
1131
- G(this._r * (1 - i) + s.R * i, 0, 255)
1151
+ R(this._r * (1 - i) + s.R * i, 0, 255)
1132
1152
  ), this._g = Math.round(
1133
- G(this._g * (1 - i) + s.G * i, 0, 255)
1153
+ R(this._g * (1 - i) + s.G * i, 0, 255)
1134
1154
  ), this._b = Math.round(
1135
- G(this._b * (1 - i) + s.B * i, 0, 255)
1136
- ), this._a = G(this._a * (1 - i) + s.A * i, 0, 1), this;
1155
+ R(this._b * (1 - i) + s.B * i, 0, 255)
1156
+ ), this._a = R(this._a * (1 - i) + s.A * i, 0, 1), this;
1137
1157
  }
1138
1158
  /**
1139
1159
  * 创建当前颜色对象的副本。
@@ -1154,13 +1174,13 @@ class tt {
1154
1174
  * @param option - 传递给插件的选项 (可选)。
1155
1175
  */
1156
1176
  static extend(t, e) {
1157
- typeof t == "function" ? t(e, tt, F) : L.warn(
1177
+ typeof t == "function" ? t(e, tt, F) : D.warn(
1158
1178
  "Invalid plugin provided to Colorjs.extend. Expected a function."
1159
1179
  );
1160
1180
  }
1161
1181
  }
1162
1182
  const F = (f) => f instanceof tt ? f : new tt(f);
1163
- class Et {
1183
+ class kt {
1164
1184
  constructor(t, e, i) {
1165
1185
  a(this, "element");
1166
1186
  a(this, "iconElement");
@@ -1237,14 +1257,14 @@ class Et {
1237
1257
  )) : (this.context.store.getDataManager().updateCheckedList(!0, this.task), this.setState(
1238
1258
  1
1239
1259
  /* CHECKED */
1240
- )), this.context.event.emit(y.CHECK_TASK, [this.task], !e);
1260
+ )), this.context.event.emit(S.CHECK_TASK, [this.task], !e);
1241
1261
  } else {
1242
1262
  const e = this.context.store.getDataManager().getCheckedList().length === this.context.store.getDataManager().getVisibleSize();
1243
1263
  this.setState(
1244
1264
  e ? 1 : 0
1245
1265
  /* UNCHECKED */
1246
1266
  ), this.context.store.getDataManager().toggleAllChecked(!e), this.context.event.emit(
1247
- y.CHECK_TASK,
1267
+ S.CHECK_TASK,
1248
1268
  this.context.store.getDataManager().getVisibleTasks(),
1249
1269
  !e
1250
1270
  );
@@ -1267,14 +1287,14 @@ class Et {
1267
1287
  }), this.setState(
1268
1288
  1
1269
1289
  /* CHECKED */
1270
- )), this.context.event.emit(y.CHECK_TASK, e, !i);
1290
+ )), this.context.event.emit(S.CHECK_TASK, e, !i);
1271
1291
  } else {
1272
1292
  const e = this.context.store.getDataManager().getCheckedList().length === this.context.store.getDataManager().getVisibleSize();
1273
1293
  this.setState(
1274
1294
  e ? 1 : 0
1275
1295
  /* UNCHECKED */
1276
1296
  ), this.context.store.getDataManager().toggleAllChecked(!e), this.context.event.emit(
1277
- y.CHECK_TASK,
1297
+ S.CHECK_TASK,
1278
1298
  this.context.store.getDataManager().getVisibleTasks(),
1279
1299
  !e
1280
1300
  );
@@ -1282,7 +1302,7 @@ class Et {
1282
1302
  });
1283
1303
  }
1284
1304
  registerEvents() {
1285
- this.context.event.on(y.CHECK_TASK, this.updateState.bind(this));
1305
+ this.context.event.on(S.CHECK_TASK, this.updateState.bind(this));
1286
1306
  }
1287
1307
  /** 获取元素 */
1288
1308
  getElement() {
@@ -1353,35 +1373,35 @@ class Jt {
1353
1373
  */
1354
1374
  processColumns(t, e = [], i, s = 1) {
1355
1375
  t.forEach((n, o) => {
1356
- var p;
1357
- const r = "children" in n && Array.isArray(n.children) && n.children.length > 0, l = !r;
1358
- let c = "";
1359
- r ? c = `group-${o}` : c = `field-${n.field}`;
1360
- const g = [...(i == null ? void 0 : i.path) || [], c];
1361
- c = "column-" + o + "-" + g.join("-");
1362
- const h = n.label || (l ? n.field : ""), d = l ? ((p = this.temporaryLeafColumns.find((u) => u.key === c)) == null ? void 0 : p.width) || n.width || 100 : "auto", m = {
1363
- label: h,
1376
+ var m;
1377
+ const r = "children" in n && Array.isArray(n.children) && n.children.length > 0, h = !r;
1378
+ let l = "";
1379
+ r ? l = `group-${o}` : l = `field-${n.field}`;
1380
+ const g = [...(i == null ? void 0 : i.path) || [], l];
1381
+ l = "column-" + o + "-" + g.join("-");
1382
+ const c = n.label || (h ? n.field : ""), u = h ? ((m = this.temporaryLeafColumns.find((d) => d.key === l)) == null ? void 0 : m.width) || n.width || 100 : "auto", p = {
1383
+ label: c,
1364
1384
  level: s,
1365
1385
  maxLevel: s,
1366
1386
  column: n,
1367
1387
  children: [],
1368
1388
  path: g,
1369
- key: c,
1370
- isLeaf: l,
1371
- width: d
1389
+ key: l,
1390
+ isLeaf: h,
1391
+ width: u
1372
1392
  };
1373
- if (e.push(m), l)
1374
- this.leafColumns.push(m);
1393
+ if (e.push(p), h)
1394
+ this.leafColumns.push(p);
1375
1395
  else if (r) {
1376
- const u = n.children;
1396
+ const d = n.children;
1377
1397
  this.processColumns(
1378
- u,
1379
- m.children,
1380
- m,
1398
+ d,
1399
+ p.children,
1400
+ p,
1381
1401
  s + 1
1382
- ), m.maxLevel = Math.max(
1383
- m.maxLevel,
1384
- m.children.reduce((x, w) => Math.max(x, w.maxLevel), 0)
1402
+ ), p.maxLevel = Math.max(
1403
+ p.maxLevel,
1404
+ p.children.reduce((x, w) => Math.max(x, w.maxLevel), 0)
1385
1405
  );
1386
1406
  }
1387
1407
  }), this.temporaryLeafColumns = J(this.leafColumns);
@@ -1414,7 +1434,7 @@ class Jt {
1414
1434
  }
1415
1435
  setColumnWidth(t, e) {
1416
1436
  const i = this.leafColumns.find((s) => s.key === t);
1417
- i && (i.width = e), this.context.event.emit(y.COLUMN_WIDTH_CHANGE, t, e);
1437
+ i && (i.width = e), this.context.event.emit(S.COLUMN_WIDTH_CHANGE, t, e);
1418
1438
  }
1419
1439
  isLastColumn(t) {
1420
1440
  return this.leafColumns.findIndex((i) => i.key === t) === this.leafColumns.length - 1;
@@ -1443,7 +1463,7 @@ class Jt {
1443
1463
  customStyle: {
1444
1464
  paddingLeft: this.context.store.getOptionManager().getOptions().expand.show ? "8px" : 0
1445
1465
  },
1446
- headerRender: () => this.context.store.getOptionManager().getOptions().selection.enabled ? new Et(this.context).getElement() : null,
1466
+ headerRender: () => this.context.store.getOptionManager().getOptions().selection.enabled ? new kt(this.context).getElement() : null,
1447
1467
  ellipsis: !1
1448
1468
  },
1449
1469
  children: [],
@@ -1457,7 +1477,7 @@ class Jt {
1457
1477
  return this.columns.some((t) => t.maxLevel > 1);
1458
1478
  }
1459
1479
  collapse() {
1460
- this.collapseTable = !this.collapseTable, this.context.event.emit(y.TOGGLE_COLLAPSE);
1480
+ this.collapseTable = !this.collapseTable, this.context.event.emit(S.TOGGLE_COLLAPSE);
1461
1481
  }
1462
1482
  isCollapsed() {
1463
1483
  return this.collapseTable;
@@ -1467,137 +1487,137 @@ var Y = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : ty
1467
1487
  function N(f) {
1468
1488
  return f && f.__esModule && Object.prototype.hasOwnProperty.call(f, "default") ? f.default : f;
1469
1489
  }
1470
- var kt = { exports: {} };
1490
+ var Et = { exports: {} };
1471
1491
  (function(f, t) {
1472
1492
  (function(e, i) {
1473
1493
  f.exports = i();
1474
1494
  })(Y, function() {
1475
- var e, i, s = 1e3, n = 6e4, o = 36e5, r = 864e5, l = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, c = 31536e6, g = 2628e6, h = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, d = { years: c, months: g, days: r, hours: o, minutes: n, seconds: s, milliseconds: 1, weeks: 6048e5 }, m = function(k) {
1476
- return k instanceof O;
1477
- }, p = function(k, S, b) {
1478
- return new O(k, b, S.$l);
1479
- }, u = function(k) {
1480
- return i.p(k) + "s";
1481
- }, x = function(k) {
1482
- return k < 0;
1483
- }, w = function(k) {
1484
- return x(k) ? Math.ceil(k) : Math.floor(k);
1485
- }, E = function(k) {
1486
- return Math.abs(k);
1487
- }, T = function(k, S) {
1488
- return k ? x(k) ? { negative: !0, format: "" + E(k) + S } : { negative: !1, format: "" + k + S } : { negative: !1, format: "" };
1489
- }, O = function() {
1490
- function k(b, D, I) {
1495
+ var e, i, s = 1e3, n = 6e4, o = 36e5, r = 864e5, h = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, l = 31536e6, g = 2628e6, c = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, u = { years: l, months: g, days: r, hours: o, minutes: n, seconds: s, milliseconds: 1, weeks: 6048e5 }, p = function(M) {
1496
+ return M instanceof b;
1497
+ }, m = function(M, E, k) {
1498
+ return new b(M, k, E.$l);
1499
+ }, d = function(M) {
1500
+ return i.p(M) + "s";
1501
+ }, x = function(M) {
1502
+ return M < 0;
1503
+ }, w = function(M) {
1504
+ return x(M) ? Math.ceil(M) : Math.floor(M);
1505
+ }, T = function(M) {
1506
+ return Math.abs(M);
1507
+ }, v = function(M, E) {
1508
+ return M ? x(M) ? { negative: !0, format: "" + T(M) + E } : { negative: !1, format: "" + M + E } : { negative: !1, format: "" };
1509
+ }, b = function() {
1510
+ function M(k, L, A) {
1491
1511
  var _ = this;
1492
- if (this.$d = {}, this.$l = I, b === void 0 && (this.$ms = 0, this.parseFromMilliseconds()), D) return p(b * d[u(D)], this);
1493
- if (typeof b == "number") return this.$ms = b, this.parseFromMilliseconds(), this;
1494
- if (typeof b == "object") return Object.keys(b).forEach(function(B) {
1495
- _.$d[u(B)] = b[B];
1512
+ if (this.$d = {}, this.$l = A, k === void 0 && (this.$ms = 0, this.parseFromMilliseconds()), L) return m(k * u[d(L)], this);
1513
+ if (typeof k == "number") return this.$ms = k, this.parseFromMilliseconds(), this;
1514
+ if (typeof k == "object") return Object.keys(k).forEach(function(B) {
1515
+ _.$d[d(B)] = k[B];
1496
1516
  }), this.calMilliseconds(), this;
1497
- if (typeof b == "string") {
1498
- var M = b.match(h);
1499
- if (M) {
1500
- var A = M.slice(2).map(function(B) {
1517
+ if (typeof k == "string") {
1518
+ var C = k.match(c);
1519
+ if (C) {
1520
+ var I = C.slice(2).map(function(B) {
1501
1521
  return B != null ? Number(B) : 0;
1502
1522
  });
1503
- return this.$d.years = A[0], this.$d.months = A[1], this.$d.weeks = A[2], this.$d.days = A[3], this.$d.hours = A[4], this.$d.minutes = A[5], this.$d.seconds = A[6], this.calMilliseconds(), this;
1523
+ return this.$d.years = I[0], this.$d.months = I[1], this.$d.weeks = I[2], this.$d.days = I[3], this.$d.hours = I[4], this.$d.minutes = I[5], this.$d.seconds = I[6], this.calMilliseconds(), this;
1504
1524
  }
1505
1525
  }
1506
1526
  return this;
1507
1527
  }
1508
- var S = k.prototype;
1509
- return S.calMilliseconds = function() {
1510
- var b = this;
1511
- this.$ms = Object.keys(this.$d).reduce(function(D, I) {
1512
- return D + (b.$d[I] || 0) * d[I];
1528
+ var E = M.prototype;
1529
+ return E.calMilliseconds = function() {
1530
+ var k = this;
1531
+ this.$ms = Object.keys(this.$d).reduce(function(L, A) {
1532
+ return L + (k.$d[A] || 0) * u[A];
1513
1533
  }, 0);
1514
- }, S.parseFromMilliseconds = function() {
1515
- var b = this.$ms;
1516
- this.$d.years = w(b / c), b %= c, this.$d.months = w(b / g), b %= g, this.$d.days = w(b / r), b %= r, this.$d.hours = w(b / o), b %= o, this.$d.minutes = w(b / n), b %= n, this.$d.seconds = w(b / s), b %= s, this.$d.milliseconds = b;
1517
- }, S.toISOString = function() {
1518
- var b = T(this.$d.years, "Y"), D = T(this.$d.months, "M"), I = +this.$d.days || 0;
1519
- this.$d.weeks && (I += 7 * this.$d.weeks);
1520
- var _ = T(I, "D"), M = T(this.$d.hours, "H"), A = T(this.$d.minutes, "M"), B = this.$d.seconds || 0;
1534
+ }, E.parseFromMilliseconds = function() {
1535
+ var k = this.$ms;
1536
+ this.$d.years = w(k / l), k %= l, this.$d.months = w(k / g), k %= g, this.$d.days = w(k / r), k %= r, this.$d.hours = w(k / o), k %= o, this.$d.minutes = w(k / n), k %= n, this.$d.seconds = w(k / s), k %= s, this.$d.milliseconds = k;
1537
+ }, E.toISOString = function() {
1538
+ var k = v(this.$d.years, "Y"), L = v(this.$d.months, "M"), A = +this.$d.days || 0;
1539
+ this.$d.weeks && (A += 7 * this.$d.weeks);
1540
+ var _ = v(A, "D"), C = v(this.$d.hours, "H"), I = v(this.$d.minutes, "M"), B = this.$d.seconds || 0;
1521
1541
  this.$d.milliseconds && (B += this.$d.milliseconds / 1e3, B = Math.round(1e3 * B) / 1e3);
1522
- var $ = T(B, "S"), R = b.negative || D.negative || _.negative || M.negative || A.negative || $.negative, W = M.format || A.format || $.format ? "T" : "", P = (R ? "-" : "") + "P" + b.format + D.format + _.format + W + M.format + A.format + $.format;
1523
- return P === "P" || P === "-P" ? "P0D" : P;
1524
- }, S.toJSON = function() {
1542
+ var $ = v(B, "S"), G = k.negative || L.negative || _.negative || C.negative || I.negative || $.negative, W = C.format || I.format || $.format ? "T" : "", z = (G ? "-" : "") + "P" + k.format + L.format + _.format + W + C.format + I.format + $.format;
1543
+ return z === "P" || z === "-P" ? "P0D" : z;
1544
+ }, E.toJSON = function() {
1525
1545
  return this.toISOString();
1526
- }, S.format = function(b) {
1527
- var D = b || "YYYY-MM-DDTHH:mm:ss", I = { Y: this.$d.years, YY: i.s(this.$d.years, 2, "0"), YYYY: i.s(this.$d.years, 4, "0"), M: this.$d.months, MM: i.s(this.$d.months, 2, "0"), D: this.$d.days, DD: i.s(this.$d.days, 2, "0"), H: this.$d.hours, HH: i.s(this.$d.hours, 2, "0"), m: this.$d.minutes, mm: i.s(this.$d.minutes, 2, "0"), s: this.$d.seconds, ss: i.s(this.$d.seconds, 2, "0"), SSS: i.s(this.$d.milliseconds, 3, "0") };
1528
- return D.replace(l, function(_, M) {
1529
- return M || String(I[_]);
1546
+ }, E.format = function(k) {
1547
+ var L = k || "YYYY-MM-DDTHH:mm:ss", A = { Y: this.$d.years, YY: i.s(this.$d.years, 2, "0"), YYYY: i.s(this.$d.years, 4, "0"), M: this.$d.months, MM: i.s(this.$d.months, 2, "0"), D: this.$d.days, DD: i.s(this.$d.days, 2, "0"), H: this.$d.hours, HH: i.s(this.$d.hours, 2, "0"), m: this.$d.minutes, mm: i.s(this.$d.minutes, 2, "0"), s: this.$d.seconds, ss: i.s(this.$d.seconds, 2, "0"), SSS: i.s(this.$d.milliseconds, 3, "0") };
1548
+ return L.replace(h, function(_, C) {
1549
+ return C || String(A[_]);
1530
1550
  });
1531
- }, S.as = function(b) {
1532
- return this.$ms / d[u(b)];
1533
- }, S.get = function(b) {
1534
- var D = this.$ms, I = u(b);
1535
- return I === "milliseconds" ? D %= 1e3 : D = I === "weeks" ? w(D / d[I]) : this.$d[I], D || 0;
1536
- }, S.add = function(b, D, I) {
1551
+ }, E.as = function(k) {
1552
+ return this.$ms / u[d(k)];
1553
+ }, E.get = function(k) {
1554
+ var L = this.$ms, A = d(k);
1555
+ return A === "milliseconds" ? L %= 1e3 : L = A === "weeks" ? w(L / u[A]) : this.$d[A], L || 0;
1556
+ }, E.add = function(k, L, A) {
1537
1557
  var _;
1538
- return _ = D ? b * d[u(D)] : m(b) ? b.$ms : p(b, this).$ms, p(this.$ms + _ * (I ? -1 : 1), this);
1539
- }, S.subtract = function(b, D) {
1540
- return this.add(b, D, !0);
1541
- }, S.locale = function(b) {
1542
- var D = this.clone();
1543
- return D.$l = b, D;
1544
- }, S.clone = function() {
1545
- return p(this.$ms, this);
1546
- }, S.humanize = function(b) {
1547
- return e().add(this.$ms, "ms").locale(this.$l).fromNow(!b);
1548
- }, S.valueOf = function() {
1558
+ return _ = L ? k * u[d(L)] : p(k) ? k.$ms : m(k, this).$ms, m(this.$ms + _ * (A ? -1 : 1), this);
1559
+ }, E.subtract = function(k, L) {
1560
+ return this.add(k, L, !0);
1561
+ }, E.locale = function(k) {
1562
+ var L = this.clone();
1563
+ return L.$l = k, L;
1564
+ }, E.clone = function() {
1565
+ return m(this.$ms, this);
1566
+ }, E.humanize = function(k) {
1567
+ return e().add(this.$ms, "ms").locale(this.$l).fromNow(!k);
1568
+ }, E.valueOf = function() {
1549
1569
  return this.asMilliseconds();
1550
- }, S.milliseconds = function() {
1570
+ }, E.milliseconds = function() {
1551
1571
  return this.get("milliseconds");
1552
- }, S.asMilliseconds = function() {
1572
+ }, E.asMilliseconds = function() {
1553
1573
  return this.as("milliseconds");
1554
- }, S.seconds = function() {
1574
+ }, E.seconds = function() {
1555
1575
  return this.get("seconds");
1556
- }, S.asSeconds = function() {
1576
+ }, E.asSeconds = function() {
1557
1577
  return this.as("seconds");
1558
- }, S.minutes = function() {
1578
+ }, E.minutes = function() {
1559
1579
  return this.get("minutes");
1560
- }, S.asMinutes = function() {
1580
+ }, E.asMinutes = function() {
1561
1581
  return this.as("minutes");
1562
- }, S.hours = function() {
1582
+ }, E.hours = function() {
1563
1583
  return this.get("hours");
1564
- }, S.asHours = function() {
1584
+ }, E.asHours = function() {
1565
1585
  return this.as("hours");
1566
- }, S.days = function() {
1586
+ }, E.days = function() {
1567
1587
  return this.get("days");
1568
- }, S.asDays = function() {
1588
+ }, E.asDays = function() {
1569
1589
  return this.as("days");
1570
- }, S.weeks = function() {
1590
+ }, E.weeks = function() {
1571
1591
  return this.get("weeks");
1572
- }, S.asWeeks = function() {
1592
+ }, E.asWeeks = function() {
1573
1593
  return this.as("weeks");
1574
- }, S.months = function() {
1594
+ }, E.months = function() {
1575
1595
  return this.get("months");
1576
- }, S.asMonths = function() {
1596
+ }, E.asMonths = function() {
1577
1597
  return this.as("months");
1578
- }, S.years = function() {
1598
+ }, E.years = function() {
1579
1599
  return this.get("years");
1580
- }, S.asYears = function() {
1600
+ }, E.asYears = function() {
1581
1601
  return this.as("years");
1582
- }, k;
1583
- }(), C = function(k, S, b) {
1584
- return k.add(S.years() * b, "y").add(S.months() * b, "M").add(S.days() * b, "d").add(S.hours() * b, "h").add(S.minutes() * b, "m").add(S.seconds() * b, "s").add(S.milliseconds() * b, "ms");
1602
+ }, M;
1603
+ }(), O = function(M, E, k) {
1604
+ return M.add(E.years() * k, "y").add(E.months() * k, "M").add(E.days() * k, "d").add(E.hours() * k, "h").add(E.minutes() * k, "m").add(E.seconds() * k, "s").add(E.milliseconds() * k, "ms");
1585
1605
  };
1586
- return function(k, S, b) {
1587
- e = b, i = b().$utils(), b.duration = function(_, M) {
1588
- var A = b.locale();
1589
- return p(_, { $l: A }, M);
1590
- }, b.isDuration = m;
1591
- var D = S.prototype.add, I = S.prototype.subtract;
1592
- S.prototype.add = function(_, M) {
1593
- return m(_) ? C(this, _, 1) : D.bind(this)(_, M);
1594
- }, S.prototype.subtract = function(_, M) {
1595
- return m(_) ? C(this, _, -1) : I.bind(this)(_, M);
1606
+ return function(M, E, k) {
1607
+ e = k, i = k().$utils(), k.duration = function(_, C) {
1608
+ var I = k.locale();
1609
+ return m(_, { $l: I }, C);
1610
+ }, k.isDuration = p;
1611
+ var L = E.prototype.add, A = E.prototype.subtract;
1612
+ E.prototype.add = function(_, C) {
1613
+ return p(_) ? O(this, _, 1) : L.bind(this)(_, C);
1614
+ }, E.prototype.subtract = function(_, C) {
1615
+ return p(_) ? O(this, _, -1) : A.bind(this)(_, C);
1596
1616
  };
1597
1617
  };
1598
1618
  });
1599
- })(kt);
1600
- var Zt = kt.exports;
1619
+ })(Et);
1620
+ var Zt = Et.exports;
1601
1621
  const te = /* @__PURE__ */ N(Zt);
1602
1622
  var Ot = { exports: {} };
1603
1623
  (function(f, t) {
@@ -1605,9 +1625,9 @@ var Ot = { exports: {} };
1605
1625
  f.exports = i();
1606
1626
  })(Y, function() {
1607
1627
  return function(e, i, s) {
1608
- i.prototype.isBetween = function(n, o, r, l) {
1609
- var c = s(n), g = s(o), h = (l = l || "()")[0] === "(", d = l[1] === ")";
1610
- return (h ? this.isAfter(c, r) : !this.isBefore(c, r)) && (d ? this.isBefore(g, r) : !this.isAfter(g, r)) || (h ? this.isBefore(c, r) : !this.isAfter(c, r)) && (d ? this.isAfter(g, r) : !this.isBefore(g, r));
1628
+ i.prototype.isBetween = function(n, o, r, h) {
1629
+ var l = s(n), g = s(o), c = (h = h || "()")[0] === "(", u = h[1] === ")";
1630
+ return (c ? this.isAfter(l, r) : !this.isBefore(l, r)) && (u ? this.isBefore(g, r) : !this.isAfter(g, r)) || (c ? this.isBefore(l, r) : !this.isAfter(l, r)) && (u ? this.isAfter(g, r) : !this.isBefore(g, r));
1611
1631
  };
1612
1632
  };
1613
1633
  });
@@ -1648,49 +1668,49 @@ var Ct = { exports: {} };
1648
1668
  f.exports = i();
1649
1669
  })(Y, function() {
1650
1670
  return function(e, i, s) {
1651
- var n = i.prototype, o = function(h) {
1652
- return h && (h.indexOf ? h : h.s);
1653
- }, r = function(h, d, m, p, u) {
1654
- var x = h.name ? h : h.$locale(), w = o(x[d]), E = o(x[m]), T = w || E.map(function(C) {
1655
- return C.slice(0, p);
1671
+ var n = i.prototype, o = function(c) {
1672
+ return c && (c.indexOf ? c : c.s);
1673
+ }, r = function(c, u, p, m, d) {
1674
+ var x = c.name ? c : c.$locale(), w = o(x[u]), T = o(x[p]), v = w || T.map(function(O) {
1675
+ return O.slice(0, m);
1656
1676
  });
1657
- if (!u) return T;
1658
- var O = x.weekStart;
1659
- return T.map(function(C, k) {
1660
- return T[(k + (O || 0)) % 7];
1677
+ if (!d) return v;
1678
+ var b = x.weekStart;
1679
+ return v.map(function(O, M) {
1680
+ return v[(M + (b || 0)) % 7];
1661
1681
  });
1662
- }, l = function() {
1682
+ }, h = function() {
1663
1683
  return s.Ls[s.locale()];
1664
- }, c = function(h, d) {
1665
- return h.formats[d] || function(m) {
1666
- return m.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(p, u, x) {
1667
- return u || x.slice(1);
1684
+ }, l = function(c, u) {
1685
+ return c.formats[u] || function(p) {
1686
+ return p.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(m, d, x) {
1687
+ return d || x.slice(1);
1668
1688
  });
1669
- }(h.formats[d.toUpperCase()]);
1689
+ }(c.formats[u.toUpperCase()]);
1670
1690
  }, g = function() {
1671
- var h = this;
1672
- return { months: function(d) {
1673
- return d ? d.format("MMMM") : r(h, "months");
1674
- }, monthsShort: function(d) {
1675
- return d ? d.format("MMM") : r(h, "monthsShort", "months", 3);
1691
+ var c = this;
1692
+ return { months: function(u) {
1693
+ return u ? u.format("MMMM") : r(c, "months");
1694
+ }, monthsShort: function(u) {
1695
+ return u ? u.format("MMM") : r(c, "monthsShort", "months", 3);
1676
1696
  }, firstDayOfWeek: function() {
1677
- return h.$locale().weekStart || 0;
1678
- }, weekdays: function(d) {
1679
- return d ? d.format("dddd") : r(h, "weekdays");
1680
- }, weekdaysMin: function(d) {
1681
- return d ? d.format("dd") : r(h, "weekdaysMin", "weekdays", 2);
1682
- }, weekdaysShort: function(d) {
1683
- return d ? d.format("ddd") : r(h, "weekdaysShort", "weekdays", 3);
1684
- }, longDateFormat: function(d) {
1685
- return c(h.$locale(), d);
1697
+ return c.$locale().weekStart || 0;
1698
+ }, weekdays: function(u) {
1699
+ return u ? u.format("dddd") : r(c, "weekdays");
1700
+ }, weekdaysMin: function(u) {
1701
+ return u ? u.format("dd") : r(c, "weekdaysMin", "weekdays", 2);
1702
+ }, weekdaysShort: function(u) {
1703
+ return u ? u.format("ddd") : r(c, "weekdaysShort", "weekdays", 3);
1704
+ }, longDateFormat: function(u) {
1705
+ return l(c.$locale(), u);
1686
1706
  }, meridiem: this.$locale().meridiem, ordinal: this.$locale().ordinal };
1687
1707
  };
1688
1708
  n.localeData = function() {
1689
1709
  return g.bind(this)();
1690
1710
  }, s.localeData = function() {
1691
- var h = l();
1711
+ var c = h();
1692
1712
  return { firstDayOfWeek: function() {
1693
- return h.weekStart || 0;
1713
+ return c.weekStart || 0;
1694
1714
  }, weekdays: function() {
1695
1715
  return s.weekdays();
1696
1716
  }, weekdaysShort: function() {
@@ -1701,19 +1721,19 @@ var Ct = { exports: {} };
1701
1721
  return s.months();
1702
1722
  }, monthsShort: function() {
1703
1723
  return s.monthsShort();
1704
- }, longDateFormat: function(d) {
1705
- return c(h, d);
1706
- }, meridiem: h.meridiem, ordinal: h.ordinal };
1724
+ }, longDateFormat: function(u) {
1725
+ return l(c, u);
1726
+ }, meridiem: c.meridiem, ordinal: c.ordinal };
1707
1727
  }, s.months = function() {
1708
- return r(l(), "months");
1728
+ return r(h(), "months");
1709
1729
  }, s.monthsShort = function() {
1710
- return r(l(), "monthsShort", "months", 3);
1711
- }, s.weekdays = function(h) {
1712
- return r(l(), "weekdays", null, null, h);
1713
- }, s.weekdaysShort = function(h) {
1714
- return r(l(), "weekdaysShort", "weekdays", 3, h);
1715
- }, s.weekdaysMin = function(h) {
1716
- return r(l(), "weekdaysMin", "weekdays", 2, h);
1730
+ return r(h(), "monthsShort", "months", 3);
1731
+ }, s.weekdays = function(c) {
1732
+ return r(h(), "weekdays", null, null, c);
1733
+ }, s.weekdaysShort = function(c) {
1734
+ return r(h(), "weekdaysShort", "weekdays", 3, c);
1735
+ }, s.weekdaysMin = function(c) {
1736
+ return r(h(), "weekdaysMin", "weekdays", 2, c);
1717
1737
  };
1718
1738
  };
1719
1739
  });
@@ -1728,17 +1748,17 @@ var Dt = { exports: {} };
1728
1748
  var e = "week", i = "year";
1729
1749
  return function(s, n, o) {
1730
1750
  var r = n.prototype;
1731
- r.week = function(l) {
1732
- if (l === void 0 && (l = null), l !== null) return this.add(7 * (l - this.week()), "day");
1733
- var c = this.$locale().yearStart || 1;
1751
+ r.week = function(h) {
1752
+ if (h === void 0 && (h = null), h !== null) return this.add(7 * (h - this.week()), "day");
1753
+ var l = this.$locale().yearStart || 1;
1734
1754
  if (this.month() === 11 && this.date() > 25) {
1735
- var g = o(this).startOf(i).add(1, i).date(c), h = o(this).endOf(e);
1736
- if (g.isBefore(h)) return 1;
1755
+ var g = o(this).startOf(i).add(1, i).date(l), c = o(this).endOf(e);
1756
+ if (g.isBefore(c)) return 1;
1737
1757
  }
1738
- var d = o(this).startOf(i).date(c).startOf(e).subtract(1, "millisecond"), m = this.diff(d, e, !0);
1739
- return m < 0 ? o(this).startOf("week").week() : Math.ceil(m);
1740
- }, r.weeks = function(l) {
1741
- return l === void 0 && (l = null), this.week(l);
1758
+ var u = o(this).startOf(i).date(l).startOf(e).subtract(1, "millisecond"), p = this.diff(u, e, !0);
1759
+ return p < 0 ? o(this).startOf("week").week() : Math.ceil(p);
1760
+ }, r.weeks = function(h) {
1761
+ return h === void 0 && (h = null), this.week(h);
1742
1762
  };
1743
1763
  };
1744
1764
  });
@@ -1768,29 +1788,29 @@ var Ht = { exports: {} };
1768
1788
  return function(e, i) {
1769
1789
  var s = i.prototype, n = s.format;
1770
1790
  s.format = function(o) {
1771
- var r = this, l = this.$locale();
1791
+ var r = this, h = this.$locale();
1772
1792
  if (!this.isValid()) return n.bind(this)(o);
1773
- var c = this.$utils(), g = (o || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(h) {
1774
- switch (h) {
1793
+ var l = this.$utils(), g = (o || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(c) {
1794
+ switch (c) {
1775
1795
  case "Q":
1776
1796
  return Math.ceil((r.$M + 1) / 3);
1777
1797
  case "Do":
1778
- return l.ordinal(r.$D);
1798
+ return h.ordinal(r.$D);
1779
1799
  case "gggg":
1780
1800
  return r.weekYear();
1781
1801
  case "GGGG":
1782
1802
  return r.isoWeekYear();
1783
1803
  case "wo":
1784
- return l.ordinal(r.week(), "W");
1804
+ return h.ordinal(r.week(), "W");
1785
1805
  case "w":
1786
1806
  case "ww":
1787
- return c.s(r.week(), h === "w" ? 1 : 2, "0");
1807
+ return l.s(r.week(), c === "w" ? 1 : 2, "0");
1788
1808
  case "W":
1789
1809
  case "WW":
1790
- return c.s(r.isoWeek(), h === "W" ? 1 : 2, "0");
1810
+ return l.s(r.isoWeek(), c === "W" ? 1 : 2, "0");
1791
1811
  case "k":
1792
1812
  case "kk":
1793
- return c.s(String(r.$H === 0 ? 24 : r.$H), h === "k" ? 1 : 2, "0");
1813
+ return l.s(String(r.$H === 0 ? 24 : r.$H), c === "k" ? 1 : 2, "0");
1794
1814
  case "X":
1795
1815
  return Math.floor(r.$d.getTime() / 1e3);
1796
1816
  case "x":
@@ -1800,7 +1820,7 @@ var Ht = { exports: {} };
1800
1820
  case "zzz":
1801
1821
  return "[" + r.offsetName("long") + "]";
1802
1822
  default:
1803
- return h;
1823
+ return c;
1804
1824
  }
1805
1825
  });
1806
1826
  return n.bind(this)(g);
@@ -1818,15 +1838,15 @@ var At = { exports: {} };
1818
1838
  return function(e, i, s) {
1819
1839
  s.updateLocale = function(n, o) {
1820
1840
  var r = s.Ls[n];
1821
- if (r) return (o ? Object.keys(o) : []).forEach(function(l) {
1822
- r[l] = o[l];
1841
+ if (r) return (o ? Object.keys(o) : []).forEach(function(h) {
1842
+ r[h] = o[h];
1823
1843
  }), r;
1824
1844
  };
1825
1845
  };
1826
1846
  });
1827
1847
  })(At);
1828
- var me = At.exports;
1829
- const pe = /* @__PURE__ */ N(me);
1848
+ var pe = At.exports;
1849
+ const me = /* @__PURE__ */ N(pe);
1830
1850
  var It = { exports: {} };
1831
1851
  (function(f, t) {
1832
1852
  (function(e, i) {
@@ -1834,22 +1854,22 @@ var It = { exports: {} };
1834
1854
  })(Y, function() {
1835
1855
  var e = "day";
1836
1856
  return function(i, s, n) {
1837
- var o = function(c) {
1838
- return c.add(4 - c.isoWeekday(), e);
1857
+ var o = function(l) {
1858
+ return l.add(4 - l.isoWeekday(), e);
1839
1859
  }, r = s.prototype;
1840
1860
  r.isoWeekYear = function() {
1841
1861
  return o(this).year();
1842
- }, r.isoWeek = function(c) {
1843
- if (!this.$utils().u(c)) return this.add(7 * (c - this.isoWeek()), e);
1844
- var g, h, d, m, p = o(this), u = (g = this.isoWeekYear(), h = this.$u, d = (h ? n.utc : n)().year(g).startOf("year"), m = 4 - d.isoWeekday(), d.isoWeekday() > 4 && (m += 7), d.add(m, e));
1845
- return p.diff(u, "week") + 1;
1846
- }, r.isoWeekday = function(c) {
1847
- return this.$utils().u(c) ? this.day() || 7 : this.day(this.day() % 7 ? c : c - 7);
1862
+ }, r.isoWeek = function(l) {
1863
+ if (!this.$utils().u(l)) return this.add(7 * (l - this.isoWeek()), e);
1864
+ var g, c, u, p, m = o(this), d = (g = this.isoWeekYear(), c = this.$u, u = (c ? n.utc : n)().year(g).startOf("year"), p = 4 - u.isoWeekday(), u.isoWeekday() > 4 && (p += 7), u.add(p, e));
1865
+ return m.diff(d, "week") + 1;
1866
+ }, r.isoWeekday = function(l) {
1867
+ return this.$utils().u(l) ? this.day() || 7 : this.day(this.day() % 7 ? l : l - 7);
1848
1868
  };
1849
- var l = r.startOf;
1850
- r.startOf = function(c, g) {
1851
- var h = this.$utils(), d = !!h.u(g) || g;
1852
- return h.p(c) === "isoweek" ? d ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : l.bind(this)(c, g);
1869
+ var h = r.startOf;
1870
+ r.startOf = function(l, g) {
1871
+ var c = this.$utils(), u = !!c.u(g) || g;
1872
+ return c.p(l) === "isoweek" ? u ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : h.bind(this)(l, g);
1853
1873
  };
1854
1874
  };
1855
1875
  });
@@ -1863,56 +1883,56 @@ var Gt = { exports: {} };
1863
1883
  })(Y, function() {
1864
1884
  var e = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, i = {};
1865
1885
  return function(s, n, o) {
1866
- var r, l = function(d, m, p) {
1867
- p === void 0 && (p = {});
1868
- var u = new Date(d), x = function(w, E) {
1869
- E === void 0 && (E = {});
1870
- var T = E.timeZoneName || "short", O = w + "|" + T, C = i[O];
1871
- return C || (C = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: w, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: T }), i[O] = C), C;
1872
- }(m, p);
1873
- return x.formatToParts(u);
1874
- }, c = function(d, m) {
1875
- for (var p = l(d, m), u = [], x = 0; x < p.length; x += 1) {
1876
- var w = p[x], E = w.type, T = w.value, O = e[E];
1877
- O >= 0 && (u[O] = parseInt(T, 10));
1886
+ var r, h = function(u, p, m) {
1887
+ m === void 0 && (m = {});
1888
+ var d = new Date(u), x = function(w, T) {
1889
+ T === void 0 && (T = {});
1890
+ var v = T.timeZoneName || "short", b = w + "|" + v, O = i[b];
1891
+ return O || (O = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: w, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: v }), i[b] = O), O;
1892
+ }(p, m);
1893
+ return x.formatToParts(d);
1894
+ }, l = function(u, p) {
1895
+ for (var m = h(u, p), d = [], x = 0; x < m.length; x += 1) {
1896
+ var w = m[x], T = w.type, v = w.value, b = e[T];
1897
+ b >= 0 && (d[b] = parseInt(v, 10));
1878
1898
  }
1879
- var C = u[3], k = C === 24 ? 0 : C, S = u[0] + "-" + u[1] + "-" + u[2] + " " + k + ":" + u[4] + ":" + u[5] + ":000", b = +d;
1880
- return (o.utc(S).valueOf() - (b -= b % 1e3)) / 6e4;
1899
+ var O = d[3], M = O === 24 ? 0 : O, E = d[0] + "-" + d[1] + "-" + d[2] + " " + M + ":" + d[4] + ":" + d[5] + ":000", k = +u;
1900
+ return (o.utc(E).valueOf() - (k -= k % 1e3)) / 6e4;
1881
1901
  }, g = n.prototype;
1882
- g.tz = function(d, m) {
1883
- d === void 0 && (d = r);
1884
- var p, u = this.utcOffset(), x = this.toDate(), w = x.toLocaleString("en-US", { timeZone: d }), E = Math.round((x - new Date(w)) / 1e3 / 60), T = 15 * -Math.round(x.getTimezoneOffset() / 15) - E;
1885
- if (!Number(T)) p = this.utcOffset(0, m);
1886
- else if (p = o(w, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(T, !0), m) {
1887
- var O = p.utcOffset();
1888
- p = p.add(u - O, "minute");
1902
+ g.tz = function(u, p) {
1903
+ u === void 0 && (u = r);
1904
+ var m, d = this.utcOffset(), x = this.toDate(), w = x.toLocaleString("en-US", { timeZone: u }), T = Math.round((x - new Date(w)) / 1e3 / 60), v = 15 * -Math.round(x.getTimezoneOffset() / 15) - T;
1905
+ if (!Number(v)) m = this.utcOffset(0, p);
1906
+ else if (m = o(w, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(v, !0), p) {
1907
+ var b = m.utcOffset();
1908
+ m = m.add(d - b, "minute");
1889
1909
  }
1890
- return p.$x.$timezone = d, p;
1891
- }, g.offsetName = function(d) {
1892
- var m = this.$x.$timezone || o.tz.guess(), p = l(this.valueOf(), m, { timeZoneName: d }).find(function(u) {
1893
- return u.type.toLowerCase() === "timezonename";
1910
+ return m.$x.$timezone = u, m;
1911
+ }, g.offsetName = function(u) {
1912
+ var p = this.$x.$timezone || o.tz.guess(), m = h(this.valueOf(), p, { timeZoneName: u }).find(function(d) {
1913
+ return d.type.toLowerCase() === "timezonename";
1894
1914
  });
1895
- return p && p.value;
1915
+ return m && m.value;
1896
1916
  };
1897
- var h = g.startOf;
1898
- g.startOf = function(d, m) {
1899
- if (!this.$x || !this.$x.$timezone) return h.call(this, d, m);
1900
- var p = o(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
1901
- return h.call(p, d, m).tz(this.$x.$timezone, !0);
1902
- }, o.tz = function(d, m, p) {
1903
- var u = p && m, x = p || m || r, w = c(+o(), x);
1904
- if (typeof d != "string") return o(d).tz(x);
1905
- var E = function(k, S, b) {
1906
- var D = k - 60 * S * 1e3, I = c(D, b);
1907
- if (S === I) return [D, S];
1908
- var _ = c(D -= 60 * (I - S) * 1e3, b);
1909
- return I === _ ? [D, I] : [k - 60 * Math.min(I, _) * 1e3, Math.max(I, _)];
1910
- }(o.utc(d, u).valueOf(), w, x), T = E[0], O = E[1], C = o(T).utcOffset(O);
1911
- return C.$x.$timezone = x, C;
1917
+ var c = g.startOf;
1918
+ g.startOf = function(u, p) {
1919
+ if (!this.$x || !this.$x.$timezone) return c.call(this, u, p);
1920
+ var m = o(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
1921
+ return c.call(m, u, p).tz(this.$x.$timezone, !0);
1922
+ }, o.tz = function(u, p, m) {
1923
+ var d = m && p, x = m || p || r, w = l(+o(), x);
1924
+ if (typeof u != "string") return o(u).tz(x);
1925
+ var T = function(M, E, k) {
1926
+ var L = M - 60 * E * 1e3, A = l(L, k);
1927
+ if (E === A) return [L, E];
1928
+ var _ = l(L -= 60 * (A - E) * 1e3, k);
1929
+ return A === _ ? [L, A] : [M - 60 * Math.min(A, _) * 1e3, Math.max(A, _)];
1930
+ }(o.utc(u, d).valueOf(), w, x), v = T[0], b = T[1], O = o(v).utcOffset(b);
1931
+ return O.$x.$timezone = x, O;
1912
1932
  }, o.tz.guess = function() {
1913
1933
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
1914
- }, o.tz.setDefault = function(d) {
1915
- r = d;
1934
+ }, o.tz.setDefault = function(u) {
1935
+ r = u;
1916
1936
  };
1917
1937
  };
1918
1938
  });
@@ -1926,69 +1946,69 @@ var Rt = { exports: {} };
1926
1946
  })(Y, function() {
1927
1947
  var e = "minute", i = /[+-]\d\d(?::?\d\d)?/g, s = /([+-]|\d\d)/g;
1928
1948
  return function(n, o, r) {
1929
- var l = o.prototype;
1930
- r.utc = function(u) {
1931
- var x = { date: u, utc: !0, args: arguments };
1949
+ var h = o.prototype;
1950
+ r.utc = function(d) {
1951
+ var x = { date: d, utc: !0, args: arguments };
1932
1952
  return new o(x);
1933
- }, l.utc = function(u) {
1953
+ }, h.utc = function(d) {
1934
1954
  var x = r(this.toDate(), { locale: this.$L, utc: !0 });
1935
- return u ? x.add(this.utcOffset(), e) : x;
1936
- }, l.local = function() {
1955
+ return d ? x.add(this.utcOffset(), e) : x;
1956
+ }, h.local = function() {
1937
1957
  return r(this.toDate(), { locale: this.$L, utc: !1 });
1938
1958
  };
1939
- var c = l.parse;
1940
- l.parse = function(u) {
1941
- u.utc && (this.$u = !0), this.$utils().u(u.$offset) || (this.$offset = u.$offset), c.call(this, u);
1959
+ var l = h.parse;
1960
+ h.parse = function(d) {
1961
+ d.utc && (this.$u = !0), this.$utils().u(d.$offset) || (this.$offset = d.$offset), l.call(this, d);
1942
1962
  };
1943
- var g = l.init;
1944
- l.init = function() {
1963
+ var g = h.init;
1964
+ h.init = function() {
1945
1965
  if (this.$u) {
1946
- var u = this.$d;
1947
- this.$y = u.getUTCFullYear(), this.$M = u.getUTCMonth(), this.$D = u.getUTCDate(), this.$W = u.getUTCDay(), this.$H = u.getUTCHours(), this.$m = u.getUTCMinutes(), this.$s = u.getUTCSeconds(), this.$ms = u.getUTCMilliseconds();
1966
+ var d = this.$d;
1967
+ this.$y = d.getUTCFullYear(), this.$M = d.getUTCMonth(), this.$D = d.getUTCDate(), this.$W = d.getUTCDay(), this.$H = d.getUTCHours(), this.$m = d.getUTCMinutes(), this.$s = d.getUTCSeconds(), this.$ms = d.getUTCMilliseconds();
1948
1968
  } else g.call(this);
1949
1969
  };
1950
- var h = l.utcOffset;
1951
- l.utcOffset = function(u, x) {
1970
+ var c = h.utcOffset;
1971
+ h.utcOffset = function(d, x) {
1952
1972
  var w = this.$utils().u;
1953
- if (w(u)) return this.$u ? 0 : w(this.$offset) ? h.call(this) : this.$offset;
1954
- if (typeof u == "string" && (u = function(C) {
1955
- C === void 0 && (C = "");
1956
- var k = C.match(i);
1957
- if (!k) return null;
1958
- var S = ("" + k[0]).match(s) || ["-", 0, 0], b = S[0], D = 60 * +S[1] + +S[2];
1959
- return D === 0 ? 0 : b === "+" ? D : -D;
1960
- }(u), u === null)) return this;
1961
- var E = Math.abs(u) <= 16 ? 60 * u : u, T = this;
1962
- if (x) return T.$offset = E, T.$u = u === 0, T;
1963
- if (u !== 0) {
1964
- var O = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
1965
- (T = this.local().add(E + O, e)).$offset = E, T.$x.$localOffset = O;
1966
- } else T = this.utc();
1967
- return T;
1973
+ if (w(d)) return this.$u ? 0 : w(this.$offset) ? c.call(this) : this.$offset;
1974
+ if (typeof d == "string" && (d = function(O) {
1975
+ O === void 0 && (O = "");
1976
+ var M = O.match(i);
1977
+ if (!M) return null;
1978
+ var E = ("" + M[0]).match(s) || ["-", 0, 0], k = E[0], L = 60 * +E[1] + +E[2];
1979
+ return L === 0 ? 0 : k === "+" ? L : -L;
1980
+ }(d), d === null)) return this;
1981
+ var T = Math.abs(d) <= 16 ? 60 * d : d, v = this;
1982
+ if (x) return v.$offset = T, v.$u = d === 0, v;
1983
+ if (d !== 0) {
1984
+ var b = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
1985
+ (v = this.local().add(T + b, e)).$offset = T, v.$x.$localOffset = b;
1986
+ } else v = this.utc();
1987
+ return v;
1968
1988
  };
1969
- var d = l.format;
1970
- l.format = function(u) {
1971
- var x = u || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
1972
- return d.call(this, x);
1973
- }, l.valueOf = function() {
1974
- var u = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
1975
- return this.$d.valueOf() - 6e4 * u;
1976
- }, l.isUTC = function() {
1989
+ var u = h.format;
1990
+ h.format = function(d) {
1991
+ var x = d || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
1992
+ return u.call(this, x);
1993
+ }, h.valueOf = function() {
1994
+ var d = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
1995
+ return this.$d.valueOf() - 6e4 * d;
1996
+ }, h.isUTC = function() {
1977
1997
  return !!this.$u;
1978
- }, l.toISOString = function() {
1998
+ }, h.toISOString = function() {
1979
1999
  return this.toDate().toISOString();
1980
- }, l.toString = function() {
2000
+ }, h.toString = function() {
1981
2001
  return this.toDate().toUTCString();
1982
2002
  };
1983
- var m = l.toDate;
1984
- l.toDate = function(u) {
1985
- return u === "s" && this.$offset ? r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : m.call(this);
2003
+ var p = h.toDate;
2004
+ h.toDate = function(d) {
2005
+ return d === "s" && this.$offset ? r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : p.call(this);
1986
2006
  };
1987
- var p = l.diff;
1988
- l.diff = function(u, x, w) {
1989
- if (u && this.$u === u.$u) return p.call(this, u, x, w);
1990
- var E = this.local(), T = r(u).local();
1991
- return p.call(E, T, x, w);
2007
+ var m = h.diff;
2008
+ h.diff = function(d, x, w) {
2009
+ if (d && this.$u === d.$u) return m.call(this, d, x, w);
2010
+ var T = this.local(), v = r(d).local();
2011
+ return m.call(T, v, x, w);
1992
2012
  };
1993
2013
  };
1994
2014
  });
@@ -2006,7 +2026,7 @@ var Se = { exports: {} };
2006
2026
  } };
2007
2027
  });
2008
2028
  })(Se);
2009
- var Ee = { exports: {} };
2029
+ var ke = { exports: {} };
2010
2030
  (function(f, t) {
2011
2031
  (function(e, i) {
2012
2032
  f.exports = i(H);
@@ -2017,13 +2037,13 @@ var Ee = { exports: {} };
2017
2037
  var s = i(e), n = { name: "zh", weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin: "日_一_二_三_四_五_六".split("_"), months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), ordinal: function(o, r) {
2018
2038
  return r === "W" ? o + "周" : o + "日";
2019
2039
  }, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s后", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(o, r) {
2020
- var l = 100 * o + r;
2021
- return l < 600 ? "凌晨" : l < 900 ? "早上" : l < 1100 ? "上午" : l < 1300 ? "中午" : l < 1800 ? "下午" : "晚上";
2040
+ var h = 100 * o + r;
2041
+ return h < 600 ? "凌晨" : h < 900 ? "早上" : h < 1100 ? "上午" : h < 1300 ? "中午" : h < 1800 ? "下午" : "晚上";
2022
2042
  } };
2023
2043
  return s.default.locale(n, null, !0), n;
2024
2044
  });
2025
- })(Ee);
2026
- const ke = (f, t) => {
2045
+ })(ke);
2046
+ const Ee = (f, t) => {
2027
2047
  const e = t.prototype;
2028
2048
  e.setLocale = function(s) {
2029
2049
  return this.$locale = s || H().locale(), this.$L = this.$locale, this;
@@ -2041,18 +2061,18 @@ H.extend(ce);
2041
2061
  H.extend(he);
2042
2062
  H.extend(ue);
2043
2063
  H.extend(fe);
2044
- H.extend(pe);
2064
+ H.extend(me);
2045
2065
  H.extend(ye);
2046
2066
  H.extend(be);
2047
2067
  H.extend(Te);
2048
- H.extend(ke);
2068
+ H.extend(Ee);
2049
2069
  function wt(f) {
2050
2070
  try {
2051
2071
  if (H.locale() === f) return;
2052
2072
  if (H.locale(f) !== f) throw Error();
2053
- L.info(`Locale set to ${f}`);
2073
+ D.info(`Locale set to ${f}`);
2054
2074
  } catch {
2055
- L.warn(`Failed to set locale ${f}, fallback to en`), H.locale("en");
2075
+ D.warn(`Failed to set locale ${f}, fallback to en`), H.locale("en");
2056
2076
  }
2057
2077
  }
2058
2078
  const ht = () => ({
@@ -2088,8 +2108,6 @@ class Oe {
2088
2108
  a(this, "strictStart", !1);
2089
2109
  /** 固定截止日期 */
2090
2110
  a(this, "strictEnd", !1);
2091
- /** 是否锁定时间范围 */
2092
- a(this, "isStrict", !1);
2093
2111
  /** 是否自适应宽度 */
2094
2112
  a(this, "isAuto", !1);
2095
2113
  /** 表头的日期列表 */
@@ -2154,7 +2172,7 @@ class Oe {
2154
2172
  return this.startTime.add(n, "second");
2155
2173
  }
2156
2174
  init(t) {
2157
- this.isDirty = !0;
2175
+ this.isDirty = !0, this.isFirstTime = !0;
2158
2176
  const { unit: e, chart: i } = t;
2159
2177
  this.isAuto = !!i.autoCellWidth;
2160
2178
  const s = {
@@ -2164,13 +2182,13 @@ class Oe {
2164
2182
  month: "month",
2165
2183
  quarter: "quarter"
2166
2184
  }[e];
2167
- s || L.warn(`Unknown unit: [${e}]. Falling back to "day".`), this.unit = s || "day", i.startTime && (this.startTime = H(i.startTime).startOf(this.getFinelyUnit()), this.strictStart = !0), i.endTime && (this.endTime = H(i.endTime).endOf(this.getFinelyUnit()), this.strictEnd = !0), this.isStrict = this.strictStart && this.strictEnd, i.cellWidth && (Pt(i.cellWidth) ? this.cellWidth = {
2185
+ s || D.warn(`Unknown unit: [${e}]. Falling back to "day".`), this.unit = s || "day", i.startTime && (this.startTime = H(i.startTime).startOf(this.getFinelyUnit()), this.strictStart = !0), i.endTime && (this.endTime = H(i.endTime).endOf(this.getFinelyUnit()), this.strictEnd = !0), i.cellWidth && (Pt(i.cellWidth) ? this.cellWidth = {
2168
2186
  hour: i.cellWidth,
2169
2187
  day: i.cellWidth,
2170
2188
  week: i.cellWidth,
2171
2189
  month: i.cellWidth,
2172
2190
  quarter: i.cellWidth
2173
- } : U(i.cellWidth) ? this.cellWidth = J(
2191
+ } : X(i.cellWidth) ? this.cellWidth = J(
2174
2192
  ht()[i.cellWidth] || ht().normal
2175
2193
  ) : Tt(i.cellWidth) && (this.cellWidth = Object.assign(this.cellWidth, i.cellWidth))), this.headerCellFormat = i.headerCellFormat, this.headerGroupFormat = i.headerGroupFormat;
2176
2194
  }
@@ -2178,7 +2196,7 @@ class Oe {
2178
2196
  this.init(t), this.endTime = this.targetEnd.clone();
2179
2197
  }
2180
2198
  setDate(t, e) {
2181
- this.isStrict || (!this.strictStart && t && (this.isFirstTime || t.isBefore(this.startTime)) && (this.startTime = t.startOf(this.getFinelyUnit())), !this.strictEnd && e && (this.isFirstTime || e.isAfter(this.endTime)) && (this.endTime = e.endOf(this.getFinelyUnit())), this.targetEnd = this.endTime.clone(), this.isFirstTime = !1, this.invalidateCache());
2199
+ this.strictStart || t && (this.isFirstTime || t.isBefore(this.startTime)) && (this.startTime = t.startOf(this.getFinelyUnit())), this.strictEnd || e && (this.isFirstTime || e.isAfter(this.endTime)) && (this.endTime = e.endOf(this.getFinelyUnit())), this.targetEnd = this.endTime.clone(), this.isFirstTime = !1, this.invalidateCache();
2182
2200
  }
2183
2201
  /** 获取表头的日期列表 */
2184
2202
  getTimeline() {
@@ -2250,7 +2268,7 @@ class Oe {
2250
2268
  const i = this.headerGroupFormat(t.toDate(), this.unit);
2251
2269
  if (i) return i;
2252
2270
  }
2253
- if (U(this.headerGroupFormat))
2271
+ if (X(this.headerGroupFormat))
2254
2272
  return t.format(this.headerGroupFormat);
2255
2273
  switch (this.getGroupUnit()) {
2256
2274
  case "month":
@@ -2270,7 +2288,7 @@ class Oe {
2270
2288
  const i = this.headerCellFormat(t.toDate(), this.unit);
2271
2289
  if (i) return i;
2272
2290
  }
2273
- if (U(this.headerCellFormat))
2291
+ if (X(this.headerCellFormat))
2274
2292
  return t.format(this.headerCellFormat);
2275
2293
  switch (this.getChildUnit()) {
2276
2294
  case "hour":
@@ -2316,8 +2334,8 @@ class Me {
2316
2334
  var n;
2317
2335
  this.context = t;
2318
2336
  const i = gt(e, ["data"]), s = e == null ? void 0 : e.data;
2319
- if (s && !V(s))
2320
- throw L.exception("Data should be a array.");
2337
+ if (s && !U(s))
2338
+ throw D.exception("Data should be a array.");
2321
2339
  this.optionManager = new Ut(), this.optionManager.setOptions(i), i.locale && wt(i.locale), this.timeAxis = new Oe(), this.timeAxis.init(this.optionManager.getOptions()), this.columnManager = new Jt(this.context), i.table && i.table.columns && this.columnManager.init(i.table.columns), this.dataManager = new Kt(this, this.context.event), s && this.dataManager.setData(s, !0), (n = e == null ? void 0 : e.baselines) != null && n.data && this.dataManager.setBaselines(e.baselines.data);
2322
2340
  }
2323
2341
  getOptionManager() {
@@ -2337,7 +2355,7 @@ class Me {
2337
2355
  const i = gt(t, ["data"]), s = t == null ? void 0 : t.data;
2338
2356
  this.optionManager.setOptions(i, e), ((n = i.milestone) == null ? void 0 : n.show) !== void 0 && this.dataManager.getVisibleTasks().forEach((r) => {
2339
2357
  r.updateMode();
2340
- }), V(s) && this.dataManager.setData(s, !1), V((o = t.baselines) == null ? void 0 : o.data) && this.dataManager.setBaselines(t.baselines.data), i.locale && wt(i.locale), i.table && i.table.columns && this.columnManager.update(i.table.columns), this.timeAxis.update(this.optionManager.getOptions());
2358
+ }), U(s) && this.dataManager.setData(s, !1), U((o = t.baselines) == null ? void 0 : o.data) && this.dataManager.setBaselines(t.baselines.data), i.locale && wt(i.locale), i.table && i.table.columns && this.columnManager.update(i.table.columns), this.timeAxis.update(this.optionManager.getOptions());
2341
2359
  }
2342
2360
  updateTime(t, e) {
2343
2361
  this.timeAxis.setDate(t, e);
@@ -2411,14 +2429,14 @@ class Le {
2411
2429
  a(this, "handleHorizontalTrackMouseDown", (t) => {
2412
2430
  if (t.target !== this.hScrollbar) return;
2413
2431
  t.preventDefault();
2414
- const e = this.hScrollbar.getBoundingClientRect(), i = this.hScrollThumb.offsetWidth, s = t.clientX - e.left, n = this.hScrollbar.clientWidth, o = this.contentWidth - this.viewportWidth, r = n - i, l = (s - i / 2) / r * o;
2415
- this.scrollTo({ x: l, y: this.scrollTop }, "track");
2432
+ const e = this.hScrollbar.getBoundingClientRect(), i = this.hScrollThumb.offsetWidth, s = t.clientX - e.left, n = this.hScrollbar.clientWidth, o = this.contentWidth - this.viewportWidth, r = n - i, h = (s - i / 2) / r * o;
2433
+ this.scrollTo({ x: h, y: this.scrollTop }, "track");
2416
2434
  });
2417
2435
  a(this, "handleVerticalTrackMouseDown", (t) => {
2418
2436
  if (t.target !== this.vScrollbar) return;
2419
2437
  t.preventDefault();
2420
- const e = this.vScrollbar.getBoundingClientRect(), i = this.vScrollThumb.offsetHeight, s = t.clientY - e.top, n = this.vScrollbar.clientHeight, o = this.contentHeight - this.viewportHeight, r = n - i, l = (s - i / 2) / r * o;
2421
- this.scrollTo({ x: this.scrollLeft, y: l }, "track");
2438
+ const e = this.vScrollbar.getBoundingClientRect(), i = this.vScrollThumb.offsetHeight, s = t.clientY - e.top, n = this.vScrollbar.clientHeight, o = this.contentHeight - this.viewportHeight, r = n - i, h = (s - i / 2) / r * o;
2439
+ this.scrollTo({ x: this.scrollLeft, y: h }, "track");
2422
2440
  });
2423
2441
  a(this, "handleMouseUp", () => {
2424
2442
  if (this.isDraggingHScroll || this.isDraggingVScroll) {
@@ -2429,8 +2447,8 @@ class Le {
2429
2447
  // --- 动画处理 ---
2430
2448
  a(this, "animationStep", (t) => {
2431
2449
  if (!this.isAnimating) return;
2432
- const e = t - this.animationStartTime, i = this.options.animationDuration, s = Math.min(1, e / i), n = s * (2 - s), o = this.animationStartScrollLeft + (this.animationTargetScrollLeft - this.animationStartScrollLeft) * n, r = this.animationStartScrollTop + (this.animationTargetScrollTop - this.animationStartScrollTop) * n, l = this.scrollLeft !== o, c = this.scrollTop !== r;
2433
- (l || c) && this.emit(this.animationSource, o, r), s < 1 ? this.animationFrameId = requestAnimationFrame(this.animationStep) : (this.isAnimating = !1, this.animationFrameId = null, (this.scrollLeft !== this.animationTargetScrollLeft || this.scrollTop !== this.animationTargetScrollTop) && this.emit(this.animationSource, this.animationTargetScrollLeft, this.animationTargetScrollTop), this.scheduleHide());
2450
+ const e = t - this.animationStartTime, i = this.options.animationDuration, s = Math.min(1, e / i), n = s * (2 - s), o = this.animationStartScrollLeft + (this.animationTargetScrollLeft - this.animationStartScrollLeft) * n, r = this.animationStartScrollTop + (this.animationTargetScrollTop - this.animationStartScrollTop) * n, h = this.scrollLeft !== o, l = this.scrollTop !== r;
2451
+ (h || l) && this.emit(this.animationSource, o, r), s < 1 ? this.animationFrameId = requestAnimationFrame(this.animationStep) : (this.isAnimating = !1, this.animationFrameId = null, (this.scrollLeft !== this.animationTargetScrollLeft || this.scrollTop !== this.animationTargetScrollTop) && this.emit(this.animationSource, this.animationTargetScrollLeft, this.animationTargetScrollTop), this.scheduleHide());
2434
2452
  });
2435
2453
  this.root = t, this.rootElement = e, this.options = ot(
2436
2454
  {
@@ -2550,7 +2568,7 @@ class Le {
2550
2568
  }
2551
2569
  // --- 事件处理 ---
2552
2570
  emit(t, e, i) {
2553
- this.scrollLeft = G(e, 0, this.contentWidth - this.viewportWidth), this.scrollTop = G(i, 0, this.contentHeight - this.viewportHeight), this.updateThumbStyles(), this.root.event.emit(y.SCROLL, {
2571
+ this.scrollLeft = R(e, 0, this.contentWidth - this.viewportWidth), this.scrollTop = R(i, 0, this.contentHeight - this.viewportHeight), this.updateThumbStyles(), this.root.event.emit(S.SCROLL, {
2554
2572
  x: this.scrollLeft,
2555
2573
  y: this.scrollTop,
2556
2574
  source: t
@@ -2561,8 +2579,8 @@ class Le {
2561
2579
  if (this.scheduleShow(), this.isDraggingHScroll) {
2562
2580
  const e = t.clientX - this.dragStartX, i = this.hScrollbar.clientWidth, s = this.hScrollThumb.offsetWidth, n = Math.max(0, i - s), o = Math.max(0, this.contentWidth - this.viewportWidth);
2563
2581
  if (n === 0 || o === 0) return;
2564
- const r = e / n * o, l = this.thumbStartScrollLeft + r;
2565
- this.scrollTo({ x: l, y: this.scrollTop }, "drag");
2582
+ const r = e / n * o, h = this.thumbStartScrollLeft + r;
2583
+ this.scrollTo({ x: h, y: this.scrollTop }, "drag");
2566
2584
  }
2567
2585
  if (this.isDraggingVScroll) {
2568
2586
  const e = t.clientY - this.dragStartY, i = this.vScrollbar.clientHeight, s = this.vScrollThumb.offsetHeight, n = Math.max(0, i - s), o = Math.max(
@@ -2570,17 +2588,17 @@ class Le {
2570
2588
  this.contentHeight - this.viewportHeight
2571
2589
  );
2572
2590
  if (n === 0 || o === 0) return;
2573
- const r = e / n * o, l = this.thumbStartScrollTop + r;
2574
- this.scrollTo({ x: this.scrollLeft, y: l }, "drag");
2591
+ const r = e / n * o, h = this.thumbStartScrollTop + r;
2592
+ this.scrollTo({ x: this.scrollLeft, y: h }, "drag");
2575
2593
  }
2576
2594
  }
2577
2595
  }
2578
2596
  handleWheel(t) {
2579
- if (t.target !== this.rootElement && !this.rootElement.contains(t.target) && L.debug(
2597
+ if (t.target !== this.rootElement && !this.rootElement.contains(t.target) && D.debug(
2580
2598
  "Wheel event ignored, target not root or descendant:",
2581
2599
  t.target
2582
2600
  ), !this.isMouseOverRoot && !this.isMouseOverScrollbar) {
2583
- L.debug("Wheel event ignored, mouse not over root or scrollbar");
2601
+ D.debug("Wheel event ignored, mouse not over root or scrollbar");
2584
2602
  return;
2585
2603
  }
2586
2604
  const e = this.canScrollHorizontal(), i = this.canScrollVertical();
@@ -2604,8 +2622,8 @@ class Le {
2604
2622
  this.isAnimating = !0, this.animationStartTime = performance.now(), this.animationStartScrollLeft = this.scrollLeft, this.animationStartScrollTop = this.scrollTop, this.animationTargetScrollLeft = i.x, this.animationTargetScrollTop = i.y, this.animationSource = "wheel";
2605
2623
  const s = 150, n = (o) => {
2606
2624
  if (!this.isAnimating) return;
2607
- const r = o - this.animationStartTime, l = Math.min(1, r / s), c = l * (2 - l), g = this.animationStartScrollLeft + (this.animationTargetScrollLeft - this.animationStartScrollLeft) * c, h = this.animationStartScrollTop + (this.animationTargetScrollTop - this.animationStartScrollTop) * c, d = this.scrollLeft !== g, m = this.scrollTop !== h;
2608
- (d || m) && this.emit("wheel", g, h), l < 1 ? this.animationFrameId = requestAnimationFrame(n) : (this.isAnimating = !1, this.animationFrameId = null, (this.scrollLeft !== this.animationTargetScrollLeft || this.scrollTop !== this.animationTargetScrollTop) && this.emit("wheel", this.animationTargetScrollLeft, this.animationTargetScrollTop), this.scheduleHide());
2625
+ const r = o - this.animationStartTime, h = Math.min(1, r / s), l = h * (2 - h), g = this.animationStartScrollLeft + (this.animationTargetScrollLeft - this.animationStartScrollLeft) * l, c = this.animationStartScrollTop + (this.animationTargetScrollTop - this.animationStartScrollTop) * l, u = this.scrollLeft !== g, p = this.scrollTop !== c;
2626
+ (u || p) && this.emit("wheel", g, c), h < 1 ? this.animationFrameId = requestAnimationFrame(n) : (this.isAnimating = !1, this.animationFrameId = null, (this.scrollLeft !== this.animationTargetScrollLeft || this.scrollTop !== this.animationTargetScrollTop) && this.emit("wheel", this.animationTargetScrollLeft, this.animationTargetScrollTop), this.scheduleHide());
2609
2627
  };
2610
2628
  this.animationFrameId = requestAnimationFrame(n);
2611
2629
  }
@@ -2653,23 +2671,23 @@ class Le {
2653
2671
  */
2654
2672
  updateSize(t, e, i, s, n = 0, o = 0) {
2655
2673
  this.viewportWidth = Math.max(0, t), this.viewportHeight = Math.max(0, e), this.contentWidth = Math.max(this.viewportWidth, i), this.contentHeight = Math.max(this.viewportHeight, s);
2656
- const r = this.canScrollHorizontal() && this.options.showHorizontal, l = this.canScrollVertical() && this.options.showVertical;
2674
+ const r = this.canScrollHorizontal() && this.options.showHorizontal, h = this.canScrollVertical() && this.options.showVertical;
2657
2675
  if (r) {
2658
- const g = this.viewportWidth - (l ? this.options.track.size : 0);
2659
- this.hScrollbar.style.display = "block", this.hScrollbar.style.left = `${n}px`, this.hScrollbar.style.width = `${Math.max(0, g)}px`, this.hScrollbar.style.bottom = "0px", this.hScrollbar.style.right = l ? `${this.options.track.size}px` : "0px";
2676
+ const g = this.viewportWidth - (h ? this.options.track.size : 0);
2677
+ this.hScrollbar.style.display = "block", this.hScrollbar.style.left = `${n}px`, this.hScrollbar.style.width = `${Math.max(0, g)}px`, this.hScrollbar.style.bottom = "0px", this.hScrollbar.style.right = h ? `${this.options.track.size}px` : "0px";
2660
2678
  } else
2661
2679
  this.hScrollbar.style.display = "none";
2662
- if (l) {
2680
+ if (h) {
2663
2681
  const g = this.viewportHeight - o - (r ? this.options.track.size : 0);
2664
2682
  this.vScrollbar.style.display = "block", this.vScrollbar.style.top = `${o}px`, this.vScrollbar.style.height = `${Math.max(0, g)}px`, this.vScrollbar.style.right = "0px", this.vScrollbar.style.bottom = r ? `${this.options.track.size}px` : "0px";
2665
2683
  } else
2666
2684
  this.vScrollbar.style.display = "none";
2667
2685
  this.updateThumbStyles();
2668
- const c = this.clampScroll({
2686
+ const l = this.clampScroll({
2669
2687
  x: this.scrollLeft,
2670
2688
  y: this.scrollTop
2671
2689
  });
2672
- (c.x !== this.scrollLeft || c.y !== this.scrollTop) && this.emit("api", c.x, c.y), this.isMouseOverRoot || this.isDraggingHScroll || this.isDraggingVScroll ? this.scheduleShow() : !r && !l ? this.hideScrollbars(!0) : this.isVisible ? this.scheduleShow() : this.hideScrollbars(!0);
2690
+ (l.x !== this.scrollLeft || l.y !== this.scrollTop) && this.emit("api", l.x, l.y), this.isMouseOverRoot || this.isDraggingHScroll || this.isDraggingVScroll ? this.scheduleShow() : !r && !h ? this.hideScrollbars(!0) : this.isVisible ? this.scheduleShow() : this.hideScrollbars(!0);
2673
2691
  }
2674
2692
  updateThumbStyles() {
2675
2693
  if (this.canScrollHorizontal() && this.options.showHorizontal) {
@@ -2749,7 +2767,7 @@ class Le {
2749
2767
  }
2750
2768
  // --- 销毁 ---
2751
2769
  destroy() {
2752
- this.unbindEvents(), this.clearTimeouts(), this.cancelAnimation(), this.scrollbarContainer.parentNode && this.scrollbarContainer.parentNode.removeChild(this.scrollbarContainer), this.rootElement = null, this.eventManager = null, this.hScrollbar = null, this.vScrollbar = null, this.hScrollThumb = null, this.vScrollThumb = null, this.scrollbarContainer = null, L.debug("Scrollbar destroyed");
2770
+ this.unbindEvents(), this.clearTimeouts(), this.cancelAnimation(), this.scrollbarContainer.parentNode && this.scrollbarContainer.parentNode.removeChild(this.scrollbarContainer), this.rootElement = null, this.eventManager = null, this.hScrollbar = null, this.vScrollbar = null, this.hScrollThumb = null, this.vScrollThumb = null, this.scrollbarContainer = null, D.debug("Scrollbar destroyed");
2753
2771
  }
2754
2772
  }
2755
2773
  function Q(f, t = "") {
@@ -2787,11 +2805,11 @@ class it {
2787
2805
  * @param colspan 横向合并的列数
2788
2806
  * @param rowspan 纵向合并的行数
2789
2807
  */
2790
- constructor(t, e, i, s, n, o, r = 1, l = 1, c) {
2808
+ constructor(t, e, i, s, n, o, r = 1, h = 1, l) {
2791
2809
  a(this, "element");
2792
2810
  a(this, "isEmpty", !1);
2793
2811
  a(this, "isHandler", !1);
2794
- this.context = t, this.container = e, this.column = i, this.task = s, this.rowIndex = n, this.colIndex = o, this.colspan = r, this.rowspan = l, this.isEmpty = c === "empty", this.isHandler = c === "handler", this.element = document.createElement("div"), this.element.className = "x-gantt-table-cell", this.element.style.boxSizing = "border-box", this.element.style.display = "inline-flex", this.element.style.flexShrink = "0", this.element.style.flexGrow = "0", this.element.style.flexBasis = "auto", this.element.style.pointerEvents = "all", this.element.style.setProperty(
2812
+ this.context = t, this.container = e, this.column = i, this.task = s, this.rowIndex = n, this.colIndex = o, this.colspan = r, this.rowspan = h, this.isEmpty = l === "empty", this.isHandler = l === "handler", this.element = document.createElement("div"), this.element.className = "x-gantt-table-cell", this.element.style.boxSizing = "border-box", this.element.style.display = "inline-flex", this.element.style.flexShrink = "0", this.element.style.flexGrow = "0", this.element.style.flexBasis = "auto", this.element.style.pointerEvents = "all", this.element.style.setProperty(
2795
2813
  "border-color",
2796
2814
  this.context.getOptions().border.color,
2797
2815
  "important"
@@ -2809,12 +2827,12 @@ class it {
2809
2827
  )), typeof this.column.column.render == "function")
2810
2828
  try {
2811
2829
  const e = this.column.column.render(this.task.getEmitData());
2812
- typeof e == "string" ? t.innerHTML = e : e instanceof HTMLElement ? t.appendChild(e) : L.warn(
2830
+ typeof e == "string" ? t.innerHTML = e : e instanceof HTMLElement ? t.appendChild(e) : D.warn(
2813
2831
  "Table cell render function does not return a valid value.",
2814
2832
  e
2815
2833
  );
2816
2834
  } catch (e) {
2817
- L.error("Table cell render error:", e), t.textContent = this.task.getField(this.column.column.field) ?? this.context.getOptions().table.emptyText;
2835
+ D.error("Table cell render error:", e), t.textContent = this.task.getField(this.column.column.field) ?? this.context.getOptions().table.emptyText;
2818
2836
  }
2819
2837
  else
2820
2838
  t.textContent = this.task.getField(this.column.column.field) ?? this.context.getOptions().table.emptyText;
@@ -2824,7 +2842,7 @@ class it {
2824
2842
  const t = document.createElement("div");
2825
2843
  if (t.className = "x-gantt-table-cell__content", t.style.overflow = "hidden", t.style.whiteSpace = "nowrap", t.style.display = "inline-flex", t.style.flex = "1", t.style.height = "100%", this.context.getOptions().selection.enabled) {
2826
2844
  const e = document.createElement("div");
2827
- e.style.display = "flex", e.style.flex = "0.5", e.style.justifyContent = "center", e.style.alignItems = "center", new Et(this.context, e, this.task), t.appendChild(e);
2845
+ e.style.display = "flex", e.style.flex = "0.5", e.style.justifyContent = "center", e.style.alignItems = "center", new kt(this.context, e, this.task), t.appendChild(e);
2828
2846
  }
2829
2847
  if (this.context.getOptions().expand.show && this.task.children && this.task.children.length > 0) {
2830
2848
  const e = document.createElement("div");
@@ -2880,28 +2898,28 @@ class bt {
2880
2898
  */
2881
2899
  bindEvents() {
2882
2900
  this.element.addEventListener("mouseenter", () => {
2883
- this.context.event.emit(y.ROW_HIGHLIGHT, this.task.id);
2901
+ this.context.event.emit(S.ROW_HIGHLIGHT, this.task.id);
2884
2902
  }), this.element.addEventListener("mouseleave", () => {
2885
- this.context.event.emit(y.ROW_UNHIGHLIGHT, this.task.id);
2903
+ this.context.event.emit(S.ROW_UNHIGHLIGHT, this.task.id);
2886
2904
  }), this.element.addEventListener("click", (t) => {
2887
- this.context.store.getDataManager().isTaskSelected(this.task.id) || (this.context.store.getDataManager().selectTask(this.task.id), this.context.event.emit(y.ROW_CLICK, t, this.task));
2905
+ this.context.store.getDataManager().isTaskSelected(this.task.id) || (this.context.store.getDataManager().selectTask(this.task.id), this.context.event.emit(S.ROW_CLICK, t, this.task));
2888
2906
  }), this.element.addEventListener("dblclick", (t) => {
2889
- this.context.event.emit(y.ROW_DBL_CLICK, t, this.task);
2907
+ this.context.event.emit(S.ROW_DBL_CLICK, t, this.task);
2890
2908
  }), this.element.addEventListener("contextmenu", (t) => {
2891
- t.preventDefault(), this.context.store.getDataManager().selectTask(this.task.id), this.context.event.emit(y.ROW_CONTEXTMENU, t, this.task.id);
2909
+ t.preventDefault(), this.context.store.getDataManager().selectTask(this.task.id), this.context.event.emit(S.ROW_CONTEXTMENU, t, this.task.id);
2892
2910
  });
2893
2911
  }
2894
2912
  /**
2895
2913
  * 注册全局接收事件
2896
2914
  */
2897
2915
  registerEvents() {
2898
- this.context.event.on(y.ROW_HIGHLIGHT, (t) => {
2916
+ this.context.event.on(S.ROW_HIGHLIGHT, (t) => {
2899
2917
  this.task.id === t ? this.element.classList.add("hover") : this.element.classList.remove("hover");
2900
- }), this.context.event.on(y.ROW_UNHIGHLIGHT, (t) => {
2918
+ }), this.context.event.on(S.ROW_UNHIGHLIGHT, (t) => {
2901
2919
  this.task.id === t && this.element.classList.remove("hover");
2902
- }), this.context.event.on(y.TASK_SELECTED, (t) => {
2920
+ }), this.context.event.on(S.TASK_SELECTED, (t) => {
2903
2921
  this.task.id === t.id && this.element.classList.add("selected");
2904
- }), this.context.event.on(y.TASK_UNSELECTED, (t) => {
2922
+ }), this.context.event.on(S.TASK_UNSELECTED, (t) => {
2905
2923
  this.task.id === t && this.element.classList.remove("selected");
2906
2924
  });
2907
2925
  }
@@ -2951,7 +2969,7 @@ class bt {
2951
2969
  const o = e[n], r = this.context.store.getColumnManager().getMergeInfo(this.task.id, n);
2952
2970
  if (r) {
2953
2971
  if (r.task.id !== this.task.id) {
2954
- const l = new it(
2972
+ const h = new it(
2955
2973
  this.context,
2956
2974
  this.element,
2957
2975
  o,
@@ -2962,9 +2980,9 @@ class bt {
2962
2980
  1,
2963
2981
  "empty"
2964
2982
  );
2965
- this.element.style.backgroundColor = "transparent", this.raise(), this.cells.push(l);
2983
+ this.element.style.backgroundColor = "transparent", this.raise(), this.cells.push(h);
2966
2984
  } else if (r.originColumnIndex === n) {
2967
- const l = new it(
2985
+ const h = new it(
2968
2986
  this.context,
2969
2987
  this.element,
2970
2988
  o,
@@ -2974,10 +2992,10 @@ class bt {
2974
2992
  r.colspan,
2975
2993
  r.rowspan
2976
2994
  );
2977
- this.cells.push(l);
2995
+ this.cells.push(h);
2978
2996
  }
2979
2997
  } else {
2980
- let l = 1, c = 1;
2998
+ let h = 1, l = 1;
2981
2999
  const g = (s = (i = o.column).merge) == null ? void 0 : s.call(
2982
3000
  i,
2983
3001
  this.task.getField(o.column.field),
@@ -2985,42 +3003,42 @@ class bt {
2985
3003
  n,
2986
3004
  this.task.level + 1
2987
3005
  );
2988
- if (g && (typeof g.col != "number" ? L.error("colspan function must returned a number") : l = g.col, typeof g.row != "number" ? L.error("rowspan function must returned a number") : c = g.row), l > 1 || c > 1) {
2989
- if (c > 1)
2990
- for (let p = 1; p < c; p++) {
2991
- const u = this.context.store.getDataManager().getVisibleTasks()[this.task.flatIndex + p];
2992
- if (u && this.task.level !== u.level) {
2993
- c = p;
3006
+ if (g && (typeof g.col != "number" ? D.error("colspan function must returned a number") : h = g.col, typeof g.row != "number" ? D.error("rowspan function must returned a number") : l = g.row), h > 1 || l > 1) {
3007
+ if (l > 1)
3008
+ for (let m = 1; m < l; m++) {
3009
+ const d = this.context.store.getDataManager().getVisibleTasks()[this.task.flatIndex + m];
3010
+ if (d && this.task.level !== d.level) {
3011
+ l = m;
2994
3012
  break;
2995
3013
  }
2996
3014
  }
2997
- const d = {
3015
+ const u = {
2998
3016
  task: this.task,
2999
3017
  originColumnIndex: n,
3000
- colspan: l,
3001
- rowspan: c
3018
+ colspan: h,
3019
+ rowspan: l
3002
3020
  };
3003
- let m = this.task;
3004
- for (let p = c; p > 0; p--)
3005
- if (m) {
3006
- for (let u = 0; u < l; u++)
3007
- this.context.store.getColumnManager().addMergeInfo(m.id, u + n, d);
3008
- m = this.context.store.getDataManager().getVisibleTasks().at(m.flatIndex + 1);
3021
+ let p = this.task;
3022
+ for (let m = l; m > 0; m--)
3023
+ if (p) {
3024
+ for (let d = 0; d < h; d++)
3025
+ this.context.store.getColumnManager().addMergeInfo(p.id, d + n, u);
3026
+ p = this.context.store.getDataManager().getVisibleTasks().at(p.flatIndex + 1);
3009
3027
  }
3010
- for (let p = 0; p < l; p++)
3011
- this.context.store.getColumnManager().addMergeInfo(this.task.id, p + n, d);
3028
+ for (let m = 0; m < h; m++)
3029
+ this.context.store.getColumnManager().addMergeInfo(this.task.id, m + n, u);
3012
3030
  }
3013
- const h = new it(
3031
+ const c = new it(
3014
3032
  this.context,
3015
3033
  this.element,
3016
3034
  o,
3017
3035
  this.task,
3018
3036
  this.task.flatIndex,
3019
3037
  n,
3020
- l,
3021
- c
3038
+ h,
3039
+ l
3022
3040
  );
3023
- this.cells.push(h);
3041
+ this.cells.push(c);
3024
3042
  }
3025
3043
  }
3026
3044
  this.context.store.getDataManager().isTaskSelected(this.task.id) && this.element.classList.add("selected");
@@ -3073,25 +3091,25 @@ class Ce {
3073
3091
  }), e.forEach((n, o) => {
3074
3092
  const r = n.id;
3075
3093
  if (this.rows.has(r)) {
3076
- const l = this.rows.get(r);
3077
- l.update(n), l.updateTop(t);
3094
+ const h = this.rows.get(r);
3095
+ h.update(n), h.updateTop(t);
3078
3096
  } else {
3079
- const l = new bt(this.context, this.element, n, t);
3080
- l.create(), this.rows.set(r, l);
3097
+ const h = new bt(this.context, this.element, n, t);
3098
+ h.create(), this.rows.set(r, h);
3081
3099
  }
3082
- this.context.store.getColumnManager().getLeafColumns().forEach((l, c) => {
3083
- const g = this.context.store.getColumnManager().getMergeInfo(n.id, c);
3100
+ this.context.store.getColumnManager().getLeafColumns().forEach((h, l) => {
3101
+ const g = this.context.store.getColumnManager().getMergeInfo(n.id, l);
3084
3102
  if (g && g.rowspan > 1) {
3085
- const h = g.task.id;
3086
- if (!this.rows.has(h) && !this.mergeRows.has(h)) {
3087
- const d = new bt(
3103
+ const c = g.task.id;
3104
+ if (!this.rows.has(c) && !this.mergeRows.has(c)) {
3105
+ const u = new bt(
3088
3106
  this.context,
3089
3107
  this.element,
3090
3108
  g.task,
3091
3109
  t,
3092
3110
  !0
3093
3111
  );
3094
- d.create(), this.mergeRows.set(h, d);
3112
+ u.create(), this.mergeRows.set(c, u);
3095
3113
  }
3096
3114
  }
3097
3115
  });
@@ -3169,19 +3187,19 @@ class ct {
3169
3187
  const t = document.createElement("div");
3170
3188
  t.className = "x-gantt-column-resize-handle", t.style.position = "absolute", t.style.top = "0", t.style.right = "0", t.style.width = "5px", t.style.height = "100%", t.style.cursor = "col-resize", t.style.zIndex = "2", this.columnElement.appendChild(t);
3171
3189
  let e = 0, i = 0, s = null, n = 0;
3172
- const o = (c) => {
3173
- c.preventDefault(), c.stopPropagation(), e = c.clientX, i = this.columnElement.offsetWidth, s = this.root.getBoundingClientRect();
3174
- const g = (d) => r(d), h = (d) => l(d, g, h);
3175
- document.addEventListener("mousemove", g), document.addEventListener("mouseup", h), n = e - s.left, this.context.event.emit(y.SHOW_GUIDELINE, n);
3176
- }, r = (c) => {
3177
- if (c.preventDefault(), !s) return;
3178
- const g = c.clientX - e, h = i + g, d = Math.max(50, h), m = e - s.left - i, u = this.root.clientWidth - 20;
3179
- let x = m + d;
3180
- x = Math.min(u, x), this.context.event.emit(y.MOVE_GUIDELINE, x);
3181
- }, l = (c, g, h) => {
3182
- document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", h), this.context.event.emit(y.HIDE_GUIDELINE);
3183
- const d = c.clientX - e, m = Math.max(50, i + d);
3184
- this.setWidth(m);
3190
+ const o = (l) => {
3191
+ l.preventDefault(), l.stopPropagation(), e = l.clientX, i = this.columnElement.offsetWidth, s = this.root.getBoundingClientRect();
3192
+ const g = (u) => r(u), c = (u) => h(u, g, c);
3193
+ document.addEventListener("mousemove", g), document.addEventListener("mouseup", c), n = e - s.left, this.context.event.emit(S.SHOW_GUIDELINE, n);
3194
+ }, r = (l) => {
3195
+ if (l.preventDefault(), !s) return;
3196
+ const g = l.clientX - e, c = i + g, u = Math.max(50, c), p = e - s.left - i, d = this.root.clientWidth - 20;
3197
+ let x = p + u;
3198
+ x = Math.min(d, x), this.context.event.emit(S.MOVE_GUIDELINE, x);
3199
+ }, h = (l, g, c) => {
3200
+ document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", c), this.context.event.emit(S.HIDE_GUIDELINE);
3201
+ const u = l.clientX - e, p = Math.max(50, i + u);
3202
+ this.setWidth(p);
3185
3203
  };
3186
3204
  t.addEventListener("mousedown", o);
3187
3205
  }
@@ -3310,9 +3328,9 @@ class _e {
3310
3328
  this.tableBody.updateTask(t);
3311
3329
  }
3312
3330
  listenEvents() {
3313
- this.context.event.on(y.UPDATE_TABLE_HEADER, () => {
3331
+ this.context.event.on(S.UPDATE_TABLE_HEADER, () => {
3314
3332
  this.tableHeader.render();
3315
- }), this.context.event.on(y.UPDATE_TABLE_BODY, () => {
3333
+ }), this.context.event.on(S.UPDATE_TABLE_BODY, () => {
3316
3334
  this.tableBody.update();
3317
3335
  });
3318
3336
  }
@@ -3331,10 +3349,10 @@ class He {
3331
3349
  a(this, "width", 0);
3332
3350
  a(this, "height", 0);
3333
3351
  a(this, "offsetX", 0);
3334
- this.context = t, this.stage = e, this.layer = new v.Layer(), this.stage.add(this.layer), this.background = new v.Rect({
3352
+ this.context = t, this.stage = e, this.layer = new y.Layer(), this.stage.add(this.layer), this.background = new y.Rect({
3335
3353
  fill: this.context.getOptions().header.backgroundColor || this.context.getOptions().primaryColor,
3336
3354
  name: "header-background"
3337
- }), this.layer.add(this.background), this.groupHeader = new v.Group({ name: "primary-header" }), this.cellHeader = new v.Group({ name: "secondary-header" }), this.layer.add(this.groupHeader), this.layer.add(this.cellHeader), this.resize(this.stage.width()), this.registerEvents();
3355
+ }), this.layer.add(this.background), this.groupHeader = new y.Group({ name: "primary-header" }), this.cellHeader = new y.Group({ name: "secondary-header" }), this.layer.add(this.groupHeader), this.layer.add(this.cellHeader), this.resize(this.stage.width()), this.registerEvents();
3338
3356
  }
3339
3357
  /**
3340
3358
  * 调整表头大小
@@ -3353,11 +3371,11 @@ class He {
3353
3371
  * 注册事件监听
3354
3372
  */
3355
3373
  registerEvents() {
3356
- this.context.event.on(y.ROW_HIGHLIGHT, (t) => {
3374
+ this.context.event.on(S.ROW_HIGHLIGHT, (t) => {
3357
3375
  this.highlightDate(t);
3358
- }), this.context.event.on(y.ROW_UNHIGHLIGHT, (t) => {
3376
+ }), this.context.event.on(S.ROW_UNHIGHLIGHT, (t) => {
3359
3377
  this.unhighlightDate(t);
3360
- }), this.context.event.on(y.UPDATE_TASK, (t) => {
3378
+ }), this.context.event.on(S.UPDATE_TASK, (t) => {
3361
3379
  this.highlightDate(t.id);
3362
3380
  });
3363
3381
  }
@@ -3371,81 +3389,81 @@ class He {
3371
3389
  * 计算并绘制表头
3372
3390
  */
3373
3391
  calculateHeader() {
3374
- var c;
3392
+ var l;
3375
3393
  this.clearHeader();
3376
3394
  const t = this.context.store.getTimeAxis(), e = t.getCellWidth(), i = Math.max(0, -this.offsetX), s = i + this.width, n = Math.floor(this.height / 2), o = this.context.getOptions().border.color;
3377
3395
  this.layer.add(
3378
- new v.Line({
3396
+ new y.Line({
3379
3397
  points: [0, n, this.width, n],
3380
3398
  stroke: o,
3381
3399
  strokeWidth: 1
3382
3400
  })
3383
3401
  ), this.layer.add(
3384
- new v.Line({
3402
+ new y.Line({
3385
3403
  points: [0, this.height, this.width, this.height],
3386
3404
  stroke: o,
3387
3405
  strokeWidth: 1
3388
3406
  })
3389
3407
  );
3390
3408
  const r = t.getTimeline();
3391
- let l = 0;
3409
+ let h = 0;
3392
3410
  for (let g = 0; g < r.length; g++) {
3393
- const h = r[g], d = e * (((c = h.children) == null ? void 0 : c.length) ?? 0);
3394
- if (l + d < i) {
3395
- l += d;
3411
+ const c = r[g], u = e * (((l = c.children) == null ? void 0 : l.length) ?? 0);
3412
+ if (h + u < i) {
3413
+ h += u;
3396
3414
  continue;
3397
3415
  }
3398
- if (l > s)
3416
+ if (h > s)
3399
3417
  break;
3400
- const p = this.createCell(
3401
- `group-${h.date.format("YYYY-MM-DD")}`,
3402
- l,
3418
+ const m = this.createCell(
3419
+ `group-${c.date.format("YYYY-MM-DD")}`,
3420
+ h,
3403
3421
  0,
3404
- d,
3422
+ u,
3405
3423
  n,
3406
3424
  o,
3407
- h.label
3425
+ c.label
3408
3426
  );
3409
- if (this.groupHeader.add(p), V(h.children) && h.children.length > 0) {
3410
- let u = l;
3411
- for (let x = 0; x < h.children.length; ) {
3412
- const w = h.children[x];
3413
- let E = 1;
3414
- for (; h.children[x + E] && w.label === h.children[x + E].label; )
3415
- E++;
3416
- if (x += E, x >= h.children.length && r[g + 1] && r[g + 1].children) {
3417
- let k = 0;
3418
- for (; r[g + 1].children[k] && w.label === r[g + 1].children[k].label; )
3419
- r[g + 1].children[k].hide = !0, k++;
3420
- k > 0 && (E += k);
3427
+ if (this.groupHeader.add(m), U(c.children) && c.children.length > 0) {
3428
+ let d = h;
3429
+ for (let x = 0; x < c.children.length; ) {
3430
+ const w = c.children[x];
3431
+ let T = 1;
3432
+ for (; c.children[x + T] && w.label === c.children[x + T].label; )
3433
+ T++;
3434
+ if (x += T, x >= c.children.length && r[g + 1] && r[g + 1].children) {
3435
+ let M = 0;
3436
+ for (; r[g + 1].children[M] && w.label === r[g + 1].children[M].label; )
3437
+ r[g + 1].children[M].hide = !0, M++;
3438
+ M > 0 && (T += M);
3421
3439
  }
3422
- const T = e * E;
3423
- if (u + T < i) {
3424
- u += T;
3440
+ const v = e * T;
3441
+ if (d + v < i) {
3442
+ d += v;
3425
3443
  continue;
3426
3444
  }
3427
- if (u > s)
3445
+ if (d > s)
3428
3446
  break;
3429
- const C = this.createCell(
3447
+ const O = this.createCell(
3430
3448
  `cell-${w.date.format("YYYY-MM-DD")}`,
3431
- u,
3449
+ d,
3432
3450
  n,
3433
- T,
3451
+ v,
3434
3452
  n,
3435
3453
  w.hide ? "transparent" : o,
3436
3454
  w.hide ? "" : w.label
3437
3455
  );
3438
- this.cellHeader.add(C), w.hide && C.visible(!1), u += T;
3456
+ this.cellHeader.add(O), w.hide && O.visible(!1), d += v;
3439
3457
  }
3440
3458
  }
3441
- l += d;
3459
+ h += u;
3442
3460
  }
3443
3461
  this.layer.batchDraw();
3444
3462
  }
3445
3463
  createCell(t, e, i, s, n, o, r) {
3446
- const l = new v.Group();
3447
- l.x(e), l.y(i);
3448
- const c = new v.Rect({
3464
+ const h = new y.Group();
3465
+ h.x(e), h.y(i);
3466
+ const l = new y.Rect({
3449
3467
  id: t,
3450
3468
  x: 0,
3451
3469
  y: 0,
@@ -3454,17 +3472,17 @@ class He {
3454
3472
  fill: this.context.getOptions().header.backgroundColor || this.context.getOptions().primaryColor,
3455
3473
  name: "header-cell-bg"
3456
3474
  });
3457
- l.add(c);
3475
+ h.add(l);
3458
3476
  let g = this.context.getOptions().header.fontSize;
3459
- t.startsWith("cell-") && (this.cellCache.set(t, c), g -= 2);
3460
- const h = new v.Line({
3477
+ t.startsWith("cell-") && (this.cellCache.set(t, l), g -= 2);
3478
+ const c = new y.Line({
3461
3479
  points: [s, 0, s, n],
3462
3480
  stroke: o,
3463
3481
  strokeWidth: 1,
3464
3482
  name: "header-cell-right-border"
3465
3483
  });
3466
- l.add(h);
3467
- const d = new v.Text({
3484
+ h.add(c);
3485
+ const u = new y.Text({
3468
3486
  x: 0,
3469
3487
  y: 0,
3470
3488
  width: s,
@@ -3480,7 +3498,7 @@ class He {
3480
3498
  ellipsis: !0,
3481
3499
  name: "header-cell-text"
3482
3500
  });
3483
- return l.add(d), l;
3501
+ return h.add(u), h;
3484
3502
  }
3485
3503
  /**
3486
3504
  * 清除表头内容
@@ -3517,17 +3535,17 @@ class He {
3517
3535
  ), s = this.cellCache.get(
3518
3536
  `cell-${(r = e == null ? void 0 : e.endTime) == null ? void 0 : r.format("YYYY-MM-DD")}`
3519
3537
  ), n = this.context.getOptions().header.backgroundColor || this.context.getOptions().primaryColor;
3520
- n && (this.cellCache.forEach((l) => {
3521
- new v.Tween({
3522
- node: l,
3538
+ n && (this.cellCache.forEach((h) => {
3539
+ new y.Tween({
3540
+ node: h,
3523
3541
  fill: n,
3524
3542
  duration: 0.02
3525
3543
  }).play();
3526
- }), t === "in" && (i && new v.Tween({
3544
+ }), t === "in" && (i && new y.Tween({
3527
3545
  node: i,
3528
3546
  fill: F(n).brighten(30).toHex(),
3529
3547
  duration: 0.02
3530
- }).play(), s && new v.Tween({
3548
+ }).play(), s && new y.Tween({
3531
3549
  node: s,
3532
3550
  fill: F(n).brighten(30).toHex(),
3533
3551
  duration: 0
@@ -3544,7 +3562,7 @@ class Ae {
3544
3562
  a(this, "height", 0);
3545
3563
  a(this, "offsetX", 0);
3546
3564
  a(this, "offsetY", 0);
3547
- this.context = t, this.layer = e, this.verticalLines = new v.Group({ name: "vertical-grid-lines" }), this.horizontalLines = new v.Group({ name: "horizontal-grid-lines" }), this.layer.add(this.verticalLines), this.layer.add(this.horizontalLines);
3565
+ this.context = t, this.layer = e, this.verticalLines = new y.Group({ name: "vertical-grid-lines" }), this.horizontalLines = new y.Group({ name: "horizontal-grid-lines" }), this.layer.add(this.verticalLines), this.layer.add(this.horizontalLines);
3548
3566
  }
3549
3567
  /**
3550
3568
  * 调整网格大小
@@ -3578,10 +3596,10 @@ class Ae {
3578
3596
  const t = this.context.getOptions().header.height, e = this.width, i = this.context.store.getTimeAxis().getCellWidth(), s = this.context.getOptions().row.height, n = this.context.store.getDataManager().getVisibleSize(), o = n * s, r = Math.max(
3579
3597
  0,
3580
3598
  Math.floor(-this.offsetX / i) - 2
3581
- ), l = Math.min(
3599
+ ), h = Math.min(
3582
3600
  this.context.store.getTimeAxis().getCellCount(),
3583
3601
  Math.ceil((-this.offsetX + this.width) / i) + 2
3584
- ), c = Math.max(
3602
+ ), l = Math.max(
3585
3603
  0,
3586
3604
  Math.floor((-this.offsetY + t) / s) - 2
3587
3605
  ), g = Math.min(
@@ -3589,23 +3607,23 @@ class Ae {
3589
3607
  Math.ceil((-this.offsetY + this.height) / s) + 2
3590
3608
  );
3591
3609
  if (this.context.getOptions().border.show && ["day", "hour"].includes(this.context.getOptions().unit))
3592
- for (let h = r; h <= l; h++) {
3593
- const d = h * i, m = new v.Line({
3594
- points: [d, t, d, o + t],
3610
+ for (let c = r; c <= h; c++) {
3611
+ const u = c * i, p = new y.Line({
3612
+ points: [u, t, u, o + t],
3595
3613
  stroke: this.context.getOptions().border.color,
3596
3614
  strokeWidth: 0.5,
3597
3615
  name: "vertical-grid-line"
3598
3616
  });
3599
- this.verticalLines.add(m);
3617
+ this.verticalLines.add(p);
3600
3618
  }
3601
- for (let h = c; h <= g; h++) {
3602
- const d = h * s + t, m = new v.Line({
3603
- points: [0, d, Math.max(this.width, e), d],
3619
+ for (let c = l; c <= g; c++) {
3620
+ const u = c * s + t, p = new y.Line({
3621
+ points: [0, u, Math.max(this.width, e), u],
3604
3622
  stroke: this.context.getOptions().border.color,
3605
3623
  strokeWidth: 0.5,
3606
3624
  name: "horizontal-grid-line"
3607
3625
  });
3608
- this.horizontalLines.add(m);
3626
+ this.horizontalLines.add(p);
3609
3627
  }
3610
3628
  }
3611
3629
  /**
@@ -3645,7 +3663,7 @@ class Ie {
3645
3663
  a(this, "draggingDirection", "none");
3646
3664
  // 记录拖拽时的原始数据
3647
3665
  a(this, "oldTasks", []);
3648
- this.context = t, this.x = e, this.y = i, this.task = s, this.rowWidth = n, this.sliderGroup = new v.Group({
3666
+ this.context = t, this.x = e, this.y = i, this.task = s, this.rowWidth = n, this.sliderGroup = new y.Group({
3649
3667
  x: e,
3650
3668
  y: i,
3651
3669
  id: `chart-slider-bar-${s.id}`
@@ -3662,169 +3680,169 @@ class Ie {
3662
3680
  return this.context.store.getOptionManager().unpackFunc(t, this.task);
3663
3681
  }
3664
3682
  render() {
3665
- var p, u, x, w, E, T, O, C, k, S, b, D, I;
3683
+ var m, d, x, w, T, v, b, O, M, E, k, L, A;
3666
3684
  if (!this.task.startTime || !this.task.endTime) return;
3667
3685
  if (this.task.endTime.isBefore(this.task.startTime)) {
3668
- L.error("The endTime of the current task is earlier than the startTime.", this.task);
3686
+ D.error("The endTime of the current task is earlier than the startTime.", this.task);
3669
3687
  return;
3670
3688
  }
3671
3689
  const t = this.context.getOptions().row.height, e = st(
3672
3690
  this.unpackFunc(this.context.getOptions().bar.height),
3673
3691
  t
3674
- ), i = (t - e) / 2, s = this.context.store.getTimeAxis().getTimeLeft(this.task.startTime), o = this.context.store.getTimeAxis().getTimeLeft(this.task.endTime) - s, r = this.unpackFunc(this.context.getOptions().bar.backgroundColor) || this.context.getOptions().primaryColor, l = nt(
3692
+ ), i = (t - e) / 2, s = this.context.store.getTimeAxis().getTimeLeft(this.task.startTime), o = this.context.store.getTimeAxis().getTimeLeft(this.task.endTime) - s, r = this.unpackFunc(this.context.getOptions().bar.backgroundColor) || this.context.getOptions().primaryColor, h = nt(
3675
3693
  this.unpackFunc(this.context.getOptions().bar.radius)
3676
- ), c = this.unpackFunc(this.context.getOptions().bar.shadowColor) || "rgba(0, 0, 0, 0.2)", g = this.unpackFunc(this.context.getOptions().bar.shadowBlur) || 0, h = this.unpackFunc(this.context.getOptions().bar.shadowOffsetX) || 0, d = this.unpackFunc(this.context.getOptions().bar.shadowOffsetY) || 0;
3677
- this.slider || (this.slider = new v.Group({
3694
+ ), l = this.unpackFunc(this.context.getOptions().bar.shadowColor) || "rgba(0, 0, 0, 0.2)", g = this.unpackFunc(this.context.getOptions().bar.shadowBlur) || 0, c = this.unpackFunc(this.context.getOptions().bar.shadowOffsetX) || 0, u = this.unpackFunc(this.context.getOptions().bar.shadowOffsetY) || 0;
3695
+ this.slider || (this.slider = new y.Group({
3678
3696
  dragBoundFunc: (_) => {
3679
- let M = 0, A = Math.abs(this.rowWidth - this.slider.width());
3697
+ let C = 0, I = Math.abs(this.rowWidth - this.slider.width());
3680
3698
  if (this.context.getOptions().bar.move.link.parent === "strict" && this.task.parent) {
3681
3699
  if (this.task.parent.startTime) {
3682
3700
  const $ = this.task.parent.startTime;
3683
- M = this.context.store.getTimeAxis().getTimeLeft($);
3701
+ C = this.context.store.getTimeAxis().getTimeLeft($);
3684
3702
  }
3685
3703
  if (this.task.parent.endTime) {
3686
- const $ = this.task.parent.endTime, R = this.context.store.getTimeAxis().getTimeLeft($);
3687
- A = Math.abs(R - this.slider.width());
3704
+ const $ = this.task.parent.endTime, G = this.context.store.getTimeAxis().getTimeLeft($);
3705
+ I = Math.abs(G - this.slider.width());
3688
3706
  }
3689
3707
  }
3690
3708
  return {
3691
- x: G(_.x, M, A),
3709
+ x: R(_.x, C, I),
3692
3710
  y: this.y + i + this.offsetY
3693
3711
  };
3694
3712
  }
3695
3713
  })), this.slider.position({ x: s, y: i }), this.slider.size({ width: o, height: e });
3696
- const m = !!this.unpackFunc(this.context.getOptions().bar.move.enabled) && (this.task.isSummary() ? this.context.getOptions().summary.move.enabled : !0);
3697
- if (this.slider.draggable(m), this.slider.on("mouseover", (_) => {
3698
- m && !this.isDragging && (_.target.getStage().container().style.cursor = "grab"), this.handleBarHighlight({
3699
- shadowColor: F(c).alpha(F(c).alpha() + 0.1).toHex(),
3714
+ const p = !!this.unpackFunc(this.context.getOptions().bar.move.enabled) && (this.task.isSummary() ? this.context.getOptions().summary.move.enabled : !0);
3715
+ if (this.slider.draggable(p), this.slider.on("mouseover", (_) => {
3716
+ p && !this.isDragging && (_.target.getStage().container().style.cursor = "grab"), this.handleBarHighlight({
3717
+ shadowColor: F(l).alpha(F(l).alpha() + 0.1).toHex(),
3700
3718
  shadowBlur: Math.max((g || 1) * 2, 4),
3701
- shadowOffsetX: Math.max(h || 1, 2),
3702
- shadowOffsetY: Math.max((d || 1) * 1.5, 4)
3703
- }), this.context.event.emit(y.SLIDER_HOVER, _.evt, this.task);
3719
+ shadowOffsetX: Math.max(c || 1, 2),
3720
+ shadowOffsetY: Math.max((u || 1) * 1.5, 4)
3721
+ }), this.context.event.emit(S.SLIDER_HOVER, _.evt, this.task);
3704
3722
  }), this.slider.on("mouseout", (_) => {
3705
- m && !this.isDragging && (_.target.getStage().container().style.cursor = "default"), this.isDragging || this.handleBarHighlight({
3706
- shadowColor: c,
3723
+ p && !this.isDragging && (_.target.getStage().container().style.cursor = "default"), this.isDragging || this.handleBarHighlight({
3724
+ shadowColor: l,
3707
3725
  shadowBlur: g,
3708
- shadowOffsetX: h,
3709
- shadowOffsetY: d
3710
- }), this.context.event.emit(y.SLIDER_LEAVE, _.evt, this.task);
3726
+ shadowOffsetX: c,
3727
+ shadowOffsetY: u
3728
+ }), this.context.event.emit(S.SLIDER_LEAVE, _.evt, this.task);
3711
3729
  }), this.task.isMilestone()) {
3712
3730
  this.sliderBar && !this.sliderType.startsWith("milestone") && (this.slider.destroyChildren(), this.sliderBar = null, this.progressGroup = null, this.leftHandleGroup = null, this.rightHandleGroup = null);
3713
- const _ = this.unpackFunc(this.context.getOptions().milestone.size), M = Math.min(_ || e, t / 2), A = this.unpackFunc(this.context.getOptions().milestone.color) || r, B = this.unpackFunc(this.context.getOptions().milestone.border.color), $ = this.unpackFunc(this.context.getOptions().milestone.border.width), R = this.unpackFunc(this.context.getOptions().milestone.shape);
3731
+ const _ = this.unpackFunc(this.context.getOptions().milestone.size), C = Math.min(_ || e, t / 2), I = this.unpackFunc(this.context.getOptions().milestone.color) || r, B = this.unpackFunc(this.context.getOptions().milestone.border.color), $ = this.unpackFunc(this.context.getOptions().milestone.border.width), G = this.unpackFunc(this.context.getOptions().milestone.shape);
3714
3732
  if (!this.sliderBar) {
3715
- switch (R) {
3733
+ switch (G) {
3716
3734
  case "triangle":
3717
- this.sliderBar = new v.RegularPolygon({
3735
+ this.sliderBar = new y.RegularPolygon({
3718
3736
  sides: 3,
3719
- radius: M,
3737
+ radius: C,
3720
3738
  rotation: 0,
3721
- fill: A,
3739
+ fill: I,
3722
3740
  stroke: B,
3723
3741
  strokeWidth: $,
3724
- y: M / 3 * 2
3742
+ y: C / 3 * 2
3725
3743
  // 居中
3726
3744
  });
3727
3745
  break;
3728
3746
  case "circle":
3729
- this.sliderBar = new v.Circle({
3730
- radius: M,
3731
- fill: A,
3747
+ this.sliderBar = new y.Circle({
3748
+ radius: C,
3749
+ fill: I,
3732
3750
  stroke: B,
3733
3751
  strokeWidth: $,
3734
- y: M / 2
3752
+ y: C / 2
3735
3753
  // 居中
3736
3754
  });
3737
3755
  break;
3738
3756
  case "star":
3739
- this.sliderBar = new v.Star({
3757
+ this.sliderBar = new y.Star({
3740
3758
  numPoints: 5,
3741
- innerRadius: M / 2,
3742
- outerRadius: M,
3743
- fill: A,
3759
+ innerRadius: C / 2,
3760
+ outerRadius: C,
3761
+ fill: I,
3744
3762
  stroke: B,
3745
3763
  strokeWidth: $,
3746
- y: M / 2
3764
+ y: C / 2
3747
3765
  // 居中
3748
3766
  });
3749
3767
  break;
3750
3768
  case "diamond":
3751
3769
  default:
3752
- this.sliderBar = new v.RegularPolygon({
3770
+ this.sliderBar = new y.RegularPolygon({
3753
3771
  sides: 4,
3754
- radius: M,
3772
+ radius: C,
3755
3773
  rotation: 0,
3756
- fill: A,
3774
+ fill: I,
3757
3775
  stroke: B,
3758
3776
  strokeWidth: $,
3759
- y: M / 2
3777
+ y: C / 2
3760
3778
  // 居中
3761
3779
  });
3762
3780
  }
3763
3781
  if (this.slider.add(this.sliderBar), this.unpackFunc(this.context.getOptions().milestone.label.show)) {
3764
- const W = this.unpackFunc(this.context.getOptions().milestone.label.text), P = this.unpackFunc(this.context.getOptions().milestone.label.position), K = this.unpackFunc(this.context.getOptions().milestone.label.fontSize), $t = this.unpackFunc(this.context.getOptions().milestone.label.fontFamily), Ft = this.unpackFunc(this.context.getOptions().milestone.label.color), et = new v.Text({
3782
+ const W = this.unpackFunc(this.context.getOptions().milestone.label.text), z = this.unpackFunc(this.context.getOptions().milestone.label.position), K = this.unpackFunc(this.context.getOptions().milestone.label.fontSize), $t = this.unpackFunc(this.context.getOptions().milestone.label.fontFamily), Ft = this.unpackFunc(this.context.getOptions().milestone.label.color), et = new y.Text({
3765
3783
  height: e,
3766
3784
  text: W,
3767
- fill: Ft || A,
3785
+ fill: Ft || I,
3768
3786
  fontSize: K,
3769
3787
  fontFamily: $t
3770
3788
  }), rt = et.measureSize(W);
3771
3789
  et.width(rt.width);
3772
- const X = { x: 0, y: 0 };
3773
- switch (P) {
3790
+ const V = { x: 0, y: 0 };
3791
+ switch (z) {
3774
3792
  case "top-left":
3775
- X.x = -(12 + rt.width), X.y = -8;
3793
+ V.x = -(12 + rt.width), V.y = -8;
3776
3794
  break;
3777
3795
  case "bottom-left":
3778
- X.x = -(12 + rt.width), X.y = 10;
3796
+ V.x = -(12 + rt.width), V.y = 10;
3779
3797
  break;
3780
3798
  case "bottom-right":
3781
- X.x = 12, X.y = 10;
3799
+ V.x = 12, V.y = 10;
3782
3800
  break;
3783
3801
  case "top-right":
3784
3802
  default:
3785
- X.x = 12, X.y = -8;
3803
+ V.x = 12, V.y = -8;
3786
3804
  break;
3787
3805
  }
3788
- et.setAttrs(X), this.slider.add(et);
3806
+ et.setAttrs(V), this.slider.add(et);
3789
3807
  }
3790
3808
  }
3791
3809
  this.sliderType = "milestone";
3792
3810
  } else if (this.task.isSummary() && (this.context.getOptions().summary.mode === "always" || this.task.expanded)) {
3793
3811
  this.sliderBar && this.sliderType !== "summary" && (this.slider.destroyChildren(), this.sliderBar = null, this.progressGroup = null, this.leftHandleGroup = null, this.rightHandleGroup = null);
3794
- const _ = this.unpackFunc(this.context.getOptions().summary.color) || r, M = t * 0.2, A = t * 0.3, B = ($) => new v.Shape({
3795
- sceneFunc: (R, W) => {
3796
- const P = A * 0.5;
3797
- R.beginPath(), R.moveTo(0, (t - M) / 2), R.lineTo(P, (t - M) / 2), R.lineTo(P, (t - M) / 2 + M), R.lineTo(0, (t - M) / 2 + M + A), R.lineTo(0, (t - M) / 2), R.rect(P, (t - M) / 2, $ - 2 * P, M), R.moveTo($ - P, (t - M) / 2), R.lineTo($, (t - M) / 2), R.lineTo($, (t - M) / 2 + M + A), R.lineTo($ - P, (t - M) / 2 + M), R.lineTo($ - P, (t - M) / 2), R.fillStrokeShape(W);
3812
+ const _ = this.unpackFunc(this.context.getOptions().summary.color) || r, C = t * 0.2, I = t * 0.3, B = ($) => new y.Shape({
3813
+ sceneFunc: (G, W) => {
3814
+ const z = I * 0.5;
3815
+ G.beginPath(), G.moveTo(0, (t - C) / 2), G.lineTo(z, (t - C) / 2), G.lineTo(z, (t - C) / 2 + C), G.lineTo(0, (t - C) / 2 + C + I), G.lineTo(0, (t - C) / 2), G.rect(z, (t - C) / 2, $ - 2 * z, C), G.moveTo($ - z, (t - C) / 2), G.lineTo($, (t - C) / 2), G.lineTo($, (t - C) / 2 + C + I), G.lineTo($ - z, (t - C) / 2 + C), G.lineTo($ - z, (t - C) / 2), G.fillStrokeShape(W);
3798
3816
  },
3799
3817
  width: $,
3800
3818
  fill: _,
3801
- shadowColor: c,
3819
+ shadowColor: l,
3802
3820
  shadowBlur: g,
3803
- shadowOffsetX: h,
3804
- shadowOffsetY: d,
3805
- y: -(A + M) / 2 - i / 2
3821
+ shadowOffsetX: c,
3822
+ shadowOffsetY: u,
3823
+ y: -(I + C) / 2 - i / 2
3806
3824
  });
3807
3825
  !this.sliderBar || this.sliderBar.width() !== o ? (this.sliderBar && this.sliderBar.destroy(), this.sliderBar = B(o), this.slider.add(this.sliderBar)) : this.sliderBar.setAttrs({
3808
3826
  fill: _,
3809
- shadowColor: c,
3827
+ shadowColor: l,
3810
3828
  shadowBlur: g,
3811
- shadowOffsetX: h,
3812
- shadowOffsetY: d
3829
+ shadowOffsetX: c,
3830
+ shadowOffsetY: u
3813
3831
  }), this.sliderType = "summary";
3814
3832
  } else {
3815
- this.sliderBar && this.sliderType !== "bar" && (this.slider.destroyChildren(), this.sliderBar = null), this.sliderBar || (this.sliderBar = new v.Rect({
3833
+ this.sliderBar && this.sliderType !== "bar" && (this.slider.destroyChildren(), this.sliderBar = null), this.sliderBar || (this.sliderBar = new y.Rect({
3816
3834
  x: 0,
3817
3835
  y: 0
3818
3836
  }), this.slider.add(this.sliderBar), this.sliderType = "bar"), this.sliderBar.setAttrs({
3819
3837
  width: o,
3820
3838
  height: e,
3821
3839
  fill: r,
3822
- cornerRadius: l
3840
+ cornerRadius: h
3823
3841
  }), this.renderProgress(o, e);
3824
- const _ = (p = this.context.getOptions().bar.move.single) == null ? void 0 : p.icon, M = (u = this.context.getOptions().bar.move.single) == null ? void 0 : u.backgroundColor, A = M ? F(M).alpha(((x = this.context.getOptions().bar.move.single) == null ? void 0 : x.opacity) ?? 1).toHex() : F(r).brighten(30 * (this.unpackFunc((w = this.context.getOptions().bar.progress) == null ? void 0 : w.show) ? -1 : 1)).alpha(((E = this.context.getOptions().bar.move.single) == null ? void 0 : E.opacity) ?? 1).toHex();
3825
- if (!!this.unpackFunc((T = this.context.getOptions().bar.move.single) == null ? void 0 : T.left)) {
3842
+ const _ = (m = this.context.getOptions().bar.move.single) == null ? void 0 : m.icon, C = (d = this.context.getOptions().bar.move.single) == null ? void 0 : d.backgroundColor, I = C ? F(C).alpha(((x = this.context.getOptions().bar.move.single) == null ? void 0 : x.opacity) ?? 1).toHex() : F(r).brighten(30 * (this.unpackFunc((w = this.context.getOptions().bar.progress) == null ? void 0 : w.show) ? -1 : 1)).alpha(((T = this.context.getOptions().bar.move.single) == null ? void 0 : T.opacity) ?? 1).toHex();
3843
+ if (!!this.unpackFunc((v = this.context.getOptions().bar.move.single) == null ? void 0 : v.left)) {
3826
3844
  if (!this.leftHandleGroup) {
3827
- this.leftHandleGroup = new v.Group({
3845
+ this.leftHandleGroup = new y.Group({
3828
3846
  x: 0,
3829
3847
  y: 0,
3830
3848
  opacity: 0
@@ -3837,37 +3855,37 @@ class Ie {
3837
3855
  }), this.leftHandleGroup.on("mouseout", (W) => {
3838
3856
  this.isDragging || (W.target.getStage().container().style.cursor = "default");
3839
3857
  });
3840
- const R = new v.Rect({
3858
+ const G = new y.Rect({
3841
3859
  x: 0,
3842
3860
  y: 0
3843
3861
  });
3844
- this.leftHandleGroup.add(R), _ !== null && xt(_ || vt, this.handlerWidth, e).then((W) => {
3862
+ this.leftHandleGroup.add(G), _ !== null && xt(_ || vt, this.handlerWidth, e).then((W) => {
3845
3863
  var K;
3846
- const P = new v.Image({
3864
+ const z = new y.Image({
3847
3865
  image: W,
3848
3866
  x: 0,
3849
3867
  y: (e - this.handlerWidth) / 2,
3850
3868
  width: this.handlerWidth,
3851
3869
  height: this.handlerWidth
3852
3870
  });
3853
- (K = this.leftHandleGroup) == null || K.add(P);
3871
+ (K = this.leftHandleGroup) == null || K.add(z);
3854
3872
  });
3855
3873
  }
3856
- (O = this.leftHandleGroup.findOne("Rect")) == null || O.setAttrs({
3874
+ (b = this.leftHandleGroup.findOne("Rect")) == null || b.setAttrs({
3857
3875
  width: this.handlerWidth,
3858
3876
  height: e,
3859
- fill: A,
3860
- cornerRadius: [l[0], 0, 0, l[3]]
3861
- }), (C = this.leftHandleGroup.findOne("Image")) == null || C.setAttrs({
3877
+ fill: I,
3878
+ cornerRadius: [h[0], 0, 0, h[3]]
3879
+ }), (O = this.leftHandleGroup.findOne("Image")) == null || O.setAttrs({
3862
3880
  x: 0,
3863
3881
  y: (e - this.handlerWidth) / 2,
3864
3882
  width: this.handlerWidth,
3865
3883
  height: this.handlerWidth
3866
3884
  });
3867
3885
  } else this.leftHandleGroup && (this.leftHandleGroup.remove(), this.leftHandleGroup = null);
3868
- if (!!this.unpackFunc((k = this.context.getOptions().bar.move.single) == null ? void 0 : k.right)) {
3886
+ if (!!this.unpackFunc((M = this.context.getOptions().bar.move.single) == null ? void 0 : M.right)) {
3869
3887
  if (!this.rightHandleGroup) {
3870
- this.rightHandleGroup = new v.Group({
3888
+ this.rightHandleGroup = new y.Group({
3871
3889
  x: 0,
3872
3890
  y: 0,
3873
3891
  opacity: 0
@@ -3880,47 +3898,47 @@ class Ie {
3880
3898
  }), this.rightHandleGroup.on("mouseout", (W) => {
3881
3899
  this.isDragging || (W.target.getStage().container().style.cursor = "default");
3882
3900
  });
3883
- const R = new v.Rect({
3901
+ const G = new y.Rect({
3884
3902
  x: 0,
3885
3903
  y: 0
3886
3904
  });
3887
- this.rightHandleGroup.add(R), _ !== null && xt(_ || vt, this.handlerWidth, e).then((W) => {
3905
+ this.rightHandleGroup.add(G), _ !== null && xt(_ || vt, this.handlerWidth, e).then((W) => {
3888
3906
  var K;
3889
- const P = new v.Image({
3907
+ const z = new y.Image({
3890
3908
  image: W,
3891
3909
  x: o - this.handlerWidth,
3892
3910
  y: (e - this.handlerWidth) / 2,
3893
3911
  width: this.handlerWidth,
3894
3912
  height: this.handlerWidth
3895
3913
  });
3896
- (K = this.rightHandleGroup) == null || K.add(P);
3914
+ (K = this.rightHandleGroup) == null || K.add(z);
3897
3915
  });
3898
3916
  }
3899
- (S = this.rightHandleGroup.findOne("Rect")) == null || S.setAttrs({
3917
+ (E = this.rightHandleGroup.findOne("Rect")) == null || E.setAttrs({
3900
3918
  x: o - this.handlerWidth,
3901
3919
  width: this.handlerWidth,
3902
3920
  height: e,
3903
- fill: A,
3904
- cornerRadius: [0, l[1], l[2], 0]
3905
- }), (b = this.rightHandleGroup.findOne("Image")) == null || b.setAttrs({
3921
+ fill: I,
3922
+ cornerRadius: [0, h[1], h[2], 0]
3923
+ }), (k = this.rightHandleGroup.findOne("Image")) == null || k.setAttrs({
3906
3924
  x: o - this.handlerWidth,
3907
3925
  y: (e - this.handlerWidth) / 2,
3908
3926
  width: this.handlerWidth,
3909
3927
  height: this.handlerWidth
3910
3928
  });
3911
3929
  } else this.rightHandleGroup && (this.rightHandleGroup.remove(), this.rightHandleGroup = null);
3912
- this.renderText(o, e), (D = this.leftHandleGroup) == null || D.moveToTop(), (I = this.rightHandleGroup) == null || I.moveToTop();
3930
+ this.renderText(o, e), (L = this.leftHandleGroup) == null || L.moveToTop(), (A = this.rightHandleGroup) == null || A.moveToTop();
3913
3931
  }
3914
3932
  this.isDragging || this.sliderBar.setAttrs({
3915
- shadowColor: c,
3933
+ shadowColor: l,
3916
3934
  shadowBlur: g,
3917
- shadowOffsetX: h,
3918
- shadowOffsetY: d
3935
+ shadowOffsetX: c,
3936
+ shadowOffsetY: u
3919
3937
  }), this.sliderGroup.add(this.slider), this.unpackFunc(this.context.getOptions().bar.show) === !1 ? this.sliderGroup.hide() : this.sliderGroup.show();
3920
3938
  }
3921
3939
  renderText(t, e) {
3922
3940
  const i = `chart-slider-text-${this.task.id}`, s = () => {
3923
- this.slider.find(`#${i}`) && this.slider.find(`#${i}`).forEach((l) => l.remove());
3941
+ this.slider.find(`#${i}`) && this.slider.find(`#${i}`).forEach((h) => h.remove());
3924
3942
  };
3925
3943
  if (!this.context.getOptions().bar.field && !this.context.getOptions().bar.label) {
3926
3944
  s();
@@ -3931,7 +3949,7 @@ class Ie {
3931
3949
  n ? o = this.unpackFunc(n) : this.context.getOptions().bar.field && (o = this.task.getField(this.context.getOptions().bar.field)), s();
3932
3950
  const r = t - (this.leftHandleGroup ? this.handlerWidth : 0) - (this.rightHandleGroup ? this.handlerWidth : 0);
3933
3951
  if (r > 20) {
3934
- const l = new v.Text({
3952
+ const h = new y.Text({
3935
3953
  id: i,
3936
3954
  x: this.leftHandleGroup ? 10 : 0,
3937
3955
  y: 0,
@@ -3946,66 +3964,66 @@ class Ie {
3946
3964
  verticalAlign: this.unpackFunc(this.context.getOptions().bar.verticalAlign) || "middle",
3947
3965
  ellipsis: !0
3948
3966
  });
3949
- this.slider.add(l);
3967
+ this.slider.add(h);
3950
3968
  }
3951
3969
  }
3952
3970
  renderProgress(t, e) {
3953
- var i, s, n, o, r, l, c, g, h, d, m, p;
3971
+ var i, s, n, o, r, h, l, g, c, u, p, m;
3954
3972
  if (!this.unpackFunc((i = this.context.getOptions().bar.progress) == null ? void 0 : i.show)) {
3955
3973
  this.progressGroup && (this.progressGroup.destroy(), this.progressGroup = null);
3956
3974
  return;
3957
3975
  }
3958
3976
  if (this.task.progress) {
3959
- const u = jt(
3977
+ const d = jt(
3960
3978
  this.task.progress,
3961
3979
  ((s = this.context.getOptions().bar.progress) == null ? void 0 : s.targetVal) ?? 100
3962
3980
  );
3963
- if (u === 0) return;
3981
+ if (d === 0) return;
3964
3982
  const x = this.unpackFunc(
3965
3983
  this.context.getOptions().bar.backgroundColor
3966
- ) || this.context.getOptions().primaryColor, w = this.unpackFunc((n = this.context.getOptions().bar.progress) == null ? void 0 : n.backgroundColor) || F(x).brighten(((o = this.context.getOptions().bar.progress) == null ? void 0 : o.amount) || 30).toHex(), E = nt(
3984
+ ) || this.context.getOptions().primaryColor, w = this.unpackFunc((n = this.context.getOptions().bar.progress) == null ? void 0 : n.backgroundColor) || F(x).brighten(((o = this.context.getOptions().bar.progress) == null ? void 0 : o.amount) || 30).toHex(), T = nt(
3967
3985
  this.unpackFunc(this.context.getOptions().bar.radius)
3968
- ), T = nt(
3986
+ ), v = nt(
3969
3987
  this.unpackFunc((r = this.context.getOptions().bar.progress) == null ? void 0 : r.radius),
3970
3988
  2
3971
3989
  // 默认 2
3972
3990
  );
3973
- T[0] = E[0], T[3] = E[3], u === 1 && (T[1] = E[1], T[2] = E[2]);
3974
- const O = t * u;
3975
- this.progressGroup ? (this.progressGroup.width(O), this.progressGroup.destroyChildren()) : (this.progressGroup = new v.Group({
3991
+ v[0] = T[0], v[3] = T[3], d === 1 && (v[1] = T[1], v[2] = T[2]);
3992
+ const b = t * d;
3993
+ this.progressGroup ? (this.progressGroup.width(b), this.progressGroup.destroyChildren()) : (this.progressGroup = new y.Group({
3976
3994
  x: 0,
3977
3995
  y: 0,
3978
- width: O,
3996
+ width: b,
3979
3997
  height: e,
3980
3998
  listening: !1
3981
3999
  }), this.slider.add(this.progressGroup));
3982
- const C = new v.Rect({
4000
+ const O = new y.Rect({
3983
4001
  x: 0,
3984
4002
  y: 0,
3985
- width: O,
4003
+ width: b,
3986
4004
  height: e,
3987
4005
  fill: w,
3988
- cornerRadius: T,
3989
- opacity: this.unpackFunc((l = this.context.getOptions().bar.progress) == null ? void 0 : l.opacity)
4006
+ cornerRadius: v,
4007
+ opacity: this.unpackFunc((h = this.context.getOptions().bar.progress) == null ? void 0 : h.opacity)
3990
4008
  });
3991
- this.progressGroup.add(C);
3992
- const k = `${lt(
3993
- u * 100,
3994
- (c = this.context.getOptions().bar.progress) == null ? void 0 : c.decimal
3995
- )}%`, S = new v.Text().measureSize(k).width, b = this.unpackFunc((g = this.context.getOptions().bar.progress) == null ? void 0 : g.textAlign), D = new v.Text({
4009
+ this.progressGroup.add(O);
4010
+ const M = `${lt(
4011
+ d * 100,
4012
+ (l = this.context.getOptions().bar.progress) == null ? void 0 : l.decimal
4013
+ )}%`, E = new y.Text().measureSize(M).width, k = this.unpackFunc((g = this.context.getOptions().bar.progress) == null ? void 0 : g.textAlign), L = new y.Text({
3996
4014
  x: 0,
3997
- y: b === "top" ? -e : 0,
3998
- width: b === "right" ? O + S : Math.max(O, S),
4015
+ y: k === "top" ? -e : 0,
4016
+ width: k === "right" ? b + E : Math.max(b, E),
3999
4017
  height: e,
4000
- fill: this.unpackFunc((h = this.context.getOptions().bar.progress) == null ? void 0 : h.color) || F("#000000").mix(w, 50).alpha(0.7).toHex(),
4001
- text: k,
4002
- fontSize: this.unpackFunc((d = this.context.getOptions().bar.progress) == null ? void 0 : d.fontSize) || 10,
4003
- fontStyle: this.unpackFunc((m = this.context.getOptions().bar.progress) == null ? void 0 : m.fontStyle) || "italic",
4018
+ fill: this.unpackFunc((c = this.context.getOptions().bar.progress) == null ? void 0 : c.color) || F("#000000").mix(w, 50).alpha(0.7).toHex(),
4019
+ text: M,
4020
+ fontSize: this.unpackFunc((u = this.context.getOptions().bar.progress) == null ? void 0 : u.fontSize) || 10,
4021
+ fontStyle: this.unpackFunc((p = this.context.getOptions().bar.progress) == null ? void 0 : p.fontStyle) || "italic",
4004
4022
  fontFamily: "Arial",
4005
- verticalAlign: b === "top" ? "bottom" : "middle",
4023
+ verticalAlign: k === "top" ? "bottom" : "middle",
4006
4024
  align: "right"
4007
4025
  });
4008
- (p = this.progressGroup) == null || p.add(D);
4026
+ (m = this.progressGroup) == null || m.add(L);
4009
4027
  }
4010
4028
  }
4011
4029
  // 绑定事件,包括拖拽和边缘检测
@@ -4019,11 +4037,11 @@ class Ie {
4019
4037
  const e = t.target.getStage();
4020
4038
  e && this.slider.draggable() && (e.container().style.cursor = "grab");
4021
4039
  }), this.slider.on("click", (t) => {
4022
- t.evt.button === 0 && (t.cancelBubble = !0, this.isDragging = !1, this.context.event.emit(y.SLIDER_CLICK, t.evt, this.task));
4040
+ t.evt.button === 0 && (t.cancelBubble = !0, this.isDragging = !1, this.context.event.emit(S.SLIDER_CLICK, t.evt, this.task));
4023
4041
  }), this.slider.on("contextmenu", (t) => {
4024
- t.cancelBubble = !0, t.evt.stopPropagation(), t.evt.preventDefault(), this.context.event.emit(y.SLIDER_CONTEXTMENU, t.evt, this.task);
4042
+ t.cancelBubble = !0, t.evt.stopPropagation(), t.evt.preventDefault(), this.context.event.emit(S.SLIDER_CONTEXTMENU, t.evt, this.task);
4025
4043
  }), this.slider.on("dblclick", (t) => {
4026
- t.evt.button === 0 && (t.cancelBubble = !0, this.context.event.emit(y.SLIDER_DBL_CLICK, t.evt, this.task));
4044
+ t.evt.button === 0 && (t.cancelBubble = !0, this.context.event.emit(S.SLIDER_DBL_CLICK, t.evt, this.task));
4027
4045
  }));
4028
4046
  }
4029
4047
  /**
@@ -4035,18 +4053,18 @@ class Ie {
4035
4053
  }
4036
4054
  handleDragStart(t) {
4037
4055
  const e = t.target.getStage();
4038
- e && (this.isDragging = !0, this.oldTasks = [], this.context.event.emit(y.SLIDER_MOVING, !0), e.container().style.cursor = "grabbing", this.handleMove(t, e));
4056
+ e && (this.isDragging = !0, this.oldTasks = [], this.context.event.emit(S.SLIDER_MOVING, !0), e.container().style.cursor = "grabbing", this.handleMove(t, e));
4039
4057
  }
4040
4058
  handleDragMove(t) {
4041
4059
  if (!this.isDragging) return;
4042
4060
  if (t.evt.movementX > 0 ? this.draggingDirection = "right" : t.evt.movementX < 0 && (this.draggingDirection = "left"), !!this.context.getOptions().bar.move.byUnit) {
4043
- const i = t.target.x(), s = this.context.store.getTimeAxis().getCellWidth(), n = pt(i, s);
4061
+ const i = t.target.x(), s = this.context.store.getTimeAxis().getCellWidth(), n = mt(i, s);
4044
4062
  t.target.x(n);
4045
4063
  }
4046
4064
  }
4047
4065
  handleDragEnd(t) {
4048
4066
  this.stopAutoMove(), this.stopAutoScroll(), this.stopAutoExpand(), this.isDragging = !1, this.draggingDirection = "none", this.oldTasks.length > 0 && (this.context.event.emit(
4049
- y.TASK_DRAG_END,
4067
+ S.TASK_DRAG_END,
4050
4068
  this.task,
4051
4069
  this.oldTasks
4052
4070
  ), this.oldTasks = []);
@@ -4056,41 +4074,41 @@ class Ie {
4056
4074
  if (i) {
4057
4075
  const s = this.context.getOptions().row.height, n = this.y + this.offsetY, o = n + s;
4058
4076
  if (i.y < n || i.y > o) {
4059
- const r = this.unpackFunc(this.context.getOptions().bar.shadowColor) || "rgba(0, 0, 0, 0.2)", l = this.unpackFunc(this.context.getOptions().bar.shadowBlur) || 0, c = this.unpackFunc(this.context.getOptions().bar.shadowOffsetX) || 0, g = this.unpackFunc(this.context.getOptions().bar.shadowOffsetY) || 0;
4077
+ const r = this.unpackFunc(this.context.getOptions().bar.shadowColor) || "rgba(0, 0, 0, 0.2)", h = this.unpackFunc(this.context.getOptions().bar.shadowBlur) || 0, l = this.unpackFunc(this.context.getOptions().bar.shadowOffsetX) || 0, g = this.unpackFunc(this.context.getOptions().bar.shadowOffsetY) || 0;
4060
4078
  this.handleBarHighlight({
4061
4079
  shadowColor: r,
4062
- shadowBlur: l,
4063
- shadowOffsetX: c,
4080
+ shadowBlur: h,
4081
+ shadowOffsetX: l,
4064
4082
  shadowOffsetY: g
4065
4083
  }), this.handleResizeHighlight(0), e.container().style.cursor = "default";
4066
4084
  }
4067
4085
  }
4068
4086
  }
4069
- this.context.event.emit(y.SLIDER_MOVING, !1);
4087
+ this.context.event.emit(S.SLIDER_MOVING, !1);
4070
4088
  }
4071
4089
  handleMove(t, e) {
4072
4090
  const i = e.width(), s = !!this.context.getOptions().bar.move.lock, n = !!this.context.getOptions().bar.move.byUnit, o = this.context.store.getTimeAxis().getCellWidth();
4073
4091
  this.autoMoveTimer = window.setInterval(() => {
4074
- const r = t.target.width(), l = t.target.x() - this.offsetX, c = l + r, g = -this.offsetX, h = g + i, d = l <= g - this.offsetX + this.EDGE_THRESHOLD, m = c >= h - this.offsetX - this.EDGE_THRESHOLD;
4075
- if (d)
4092
+ const r = t.target.width(), h = t.target.x() - this.offsetX, l = h + r, g = -this.offsetX, c = g + i, u = h <= g - this.offsetX + this.EDGE_THRESHOLD, p = l >= c - this.offsetX - this.EDGE_THRESHOLD;
4093
+ if (u)
4076
4094
  if (g <= 0)
4077
4095
  t.target.x(0), this.stopAutoScroll(), s || (this.draggingDirection === "left" ? this.startAutoExpand("left") : this.stopAutoExpand());
4078
4096
  else if (this.draggingDirection === "left") {
4079
- const p = n ? -o : -this.SCROLL_STEP;
4080
- this.startAutoScroll(p, n, () => {
4081
- t.target.x(t.target.x() + p);
4097
+ const m = n ? -o : -this.SCROLL_STEP;
4098
+ this.startAutoScroll(m, n, () => {
4099
+ t.target.x(t.target.x() + m);
4082
4100
  });
4083
4101
  } else
4084
4102
  this.stopAutoScroll();
4085
- else if (m)
4086
- if (h >= this.context.store.getTimeAxis().getTotalWidth())
4103
+ else if (p)
4104
+ if (c >= this.context.store.getTimeAxis().getTotalWidth())
4087
4105
  t.target.x(
4088
4106
  this.context.store.getTimeAxis().getTotalWidth() - r
4089
4107
  ), this.stopAutoScroll(), s || (this.draggingDirection === "right" ? this.startAutoExpand("right") : this.stopAutoExpand());
4090
4108
  else if (this.draggingDirection === "right") {
4091
- const p = n ? o : this.SCROLL_STEP;
4092
- this.startAutoScroll(p, n, () => {
4093
- t.target.x(t.target.x() + p);
4109
+ const m = n ? o : this.SCROLL_STEP;
4110
+ this.startAutoScroll(m, n, () => {
4111
+ t.target.x(t.target.x() + m);
4094
4112
  });
4095
4113
  } else
4096
4114
  this.stopAutoScroll();
@@ -4105,67 +4123,67 @@ class Ie {
4105
4123
  t.cancelBubble = !0;
4106
4124
  const i = t.target.getStage();
4107
4125
  if (!i) return;
4108
- this.isDragging = !0, this.context.event.emit(y.SLIDER_MOVING, !0);
4126
+ this.isDragging = !0, this.context.event.emit(S.SLIDER_MOVING, !0);
4109
4127
  let s = ((x = i.getPointerPosition()) == null ? void 0 : x.x) || 0;
4110
- const n = !!this.context.getOptions().bar.move.byUnit, o = this.context.store.getTimeAxis().getCellWidth(), r = !!this.context.getOptions().bar.move.lock, l = i.width();
4111
- let c = 0, g = 0;
4128
+ const n = !!this.context.getOptions().bar.move.byUnit, o = this.context.store.getTimeAxis().getCellWidth(), r = !!this.context.getOptions().bar.move.lock, h = i.width();
4129
+ let l = 0, g = 0;
4112
4130
  this.autoMoveTimer = window.setInterval(() => {
4113
- const w = this.slider.width(), E = this.slider.x(), T = E + w, O = -this.offsetX, C = O + l, k = E <= O + this.EDGE_THRESHOLD, S = T >= C - this.EDGE_THRESHOLD;
4114
- if (k && e === "left") {
4115
- if (O <= 0)
4131
+ const w = this.slider.width(), T = this.slider.x(), v = T + w, b = -this.offsetX, O = b + h, M = T <= b + this.EDGE_THRESHOLD, E = v >= O - this.EDGE_THRESHOLD;
4132
+ if (M && e === "left") {
4133
+ if (b <= 0)
4116
4134
  this.slider.x(0), this.stopAutoScroll(), r || (this.draggingDirection === "left" ? this.startAutoExpand("left") : this.stopAutoExpand());
4117
4135
  else if (this.draggingDirection === "left") {
4118
- const b = n ? -o : -this.SCROLL_STEP;
4119
- this.startAutoScroll(b, n, () => {
4120
- c += b, this.slider.x(this.slider.x() + b);
4136
+ const k = n ? -o : -this.SCROLL_STEP;
4137
+ this.startAutoScroll(k, n, () => {
4138
+ l += k, this.slider.x(this.slider.x() + k);
4121
4139
  });
4122
4140
  } else
4123
4141
  this.stopAutoScroll();
4124
4142
  this.emitUpdate("left");
4125
- } else if (S && e === "right") {
4126
- if (C >= this.context.store.getTimeAxis().getTotalWidth())
4143
+ } else if (E && e === "right") {
4144
+ if (O >= this.context.store.getTimeAxis().getTotalWidth())
4127
4145
  this.slider.width(
4128
4146
  this.context.store.getTimeAxis().getTotalWidth() - this.slider.x()
4129
4147
  ), this.stopAutoScroll(), r || (this.draggingDirection === "right" ? this.startAutoExpand("right") : this.stopAutoExpand());
4130
4148
  else if (this.draggingDirection === "right") {
4131
- const b = n ? o : this.SCROLL_STEP;
4132
- this.startAutoScroll(b, n, () => {
4133
- g += b, this.slider.x(this.slider.x() + b);
4149
+ const k = n ? o : this.SCROLL_STEP;
4150
+ this.startAutoScroll(k, n, () => {
4151
+ g += k, this.slider.x(this.slider.x() + k);
4134
4152
  });
4135
4153
  } else
4136
4154
  this.stopAutoScroll();
4137
4155
  this.emitUpdate("right");
4138
- } else if (e === "right" && E <= O && T <= O + this.EDGE_THRESHOLD + o) {
4139
- const b = n ? -o : -this.SCROLL_STEP;
4140
- this.startAutoScroll(b, n, () => {
4141
- g += b, this.slider.width(Math.max(this.slider.width(), o)), this.slider.width() > o && this.slider.x(this.slider.x() + b), this.emitUpdate("right");
4156
+ } else if (e === "right" && T <= b && v <= b + this.EDGE_THRESHOLD + o) {
4157
+ const k = n ? -o : -this.SCROLL_STEP;
4158
+ this.startAutoScroll(k, n, () => {
4159
+ g += k, this.slider.width(Math.max(this.slider.width(), o)), this.slider.width() > o && this.slider.x(this.slider.x() + k), this.emitUpdate("right");
4142
4160
  });
4143
- } else if (e === "left" && T >= C && E >= C - this.EDGE_THRESHOLD - o) {
4144
- const b = n ? o : this.SCROLL_STEP;
4145
- this.startAutoScroll(b, n, () => {
4146
- c += b, this.slider.width(Math.max(this.slider.width(), o)), this.slider.width() > o && this.slider.x(this.slider.x() + b), this.emitUpdate("left");
4161
+ } else if (e === "left" && v >= O && T >= O - this.EDGE_THRESHOLD - o) {
4162
+ const k = n ? o : this.SCROLL_STEP;
4163
+ this.startAutoScroll(k, n, () => {
4164
+ l += k, this.slider.width(Math.max(this.slider.width(), o)), this.slider.width() > o && this.slider.x(this.slider.x() + k), this.emitUpdate("left");
4147
4165
  });
4148
4166
  } else
4149
4167
  this.stopAutoExpand(), this.stopAutoScroll();
4150
4168
  }, this.MOVE_INTERVAL);
4151
- let h;
4152
- const d = this.slider.x(), m = this.slider.width(), p = (w) => {
4153
- var O;
4169
+ let c;
4170
+ const u = this.slider.x(), p = this.slider.width(), m = (w) => {
4171
+ var b;
4154
4172
  w.movementX > 0 ? this.draggingDirection = "right" : w.movementX < 0 && (this.draggingDirection = "left");
4155
- const E = Math.max(((O = i.getPointerPosition()) == null ? void 0 : O.x) || 0, 0);
4156
- let T = E - s;
4157
- n && (T = pt(T, o)), (h === void 0 || h !== T) && (e === "left" ? m - T - c >= o && E < l - this.EDGE_THRESHOLD && (this.slider.width(m - T - c), this.slider.x(d + T + c), this.emitUpdate("left")) : m + T + g >= o && E > this.EDGE_THRESHOLD && (this.slider.width(m + T + g), this.emitUpdate("right")), h = T);
4158
- }, u = () => {
4159
- this.handleDragEnd(t), document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", u);
4173
+ const T = Math.max(((b = i.getPointerPosition()) == null ? void 0 : b.x) || 0, 0);
4174
+ let v = T - s;
4175
+ n && (v = mt(v, o)), (c === void 0 || c !== v) && (e === "left" ? p - v - l >= o && T < h - this.EDGE_THRESHOLD && (this.slider.width(p - v - l), this.slider.x(u + v + l), this.emitUpdate("left")) : p + v + g >= o && T > this.EDGE_THRESHOLD && (this.slider.width(p + v + g), this.emitUpdate("right")), c = v);
4176
+ }, d = () => {
4177
+ this.handleDragEnd(t), document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", d);
4160
4178
  };
4161
- document.addEventListener("mousemove", p), document.addEventListener("mouseup", u);
4179
+ document.addEventListener("mousemove", m), document.addEventListener("mouseup", d);
4162
4180
  }
4163
4181
  // 开始自动扩展
4164
4182
  startAutoExpand(t) {
4165
4183
  if (this.autoExpandTimer) return;
4166
4184
  const e = this.context.store.getTimeAxis();
4167
4185
  this.autoExpandTimer = window.setInterval(() => {
4168
- e.expand(t, 1), this.context.event.emit(y.CHART_OFFSET_CHANGE), t === "left" && this.slider.x(0);
4186
+ e.expand(t, 1), this.context.event.emit(S.CHART_OFFSET_CHANGE), t === "left" && this.slider.x(0);
4169
4187
  }, this.AUTO_EXPAND_INTERVAL);
4170
4188
  }
4171
4189
  // 开始自动滚动
@@ -4202,11 +4220,11 @@ class Ie {
4202
4220
  }
4203
4221
  // 拖拽块的高亮动画
4204
4222
  handleResizeHighlight(t) {
4205
- this.leftHandleGroup && new v.Tween({
4223
+ this.leftHandleGroup && new y.Tween({
4206
4224
  node: this.leftHandleGroup,
4207
4225
  opacity: t,
4208
4226
  duration: 0.2
4209
- }).play(), this.rightHandleGroup && new v.Tween({
4227
+ }).play(), this.rightHandleGroup && new y.Tween({
4210
4228
  node: this.rightHandleGroup,
4211
4229
  opacity: t,
4212
4230
  duration: 0.2
@@ -4214,7 +4232,7 @@ class Ie {
4214
4232
  }
4215
4233
  /** 鼠标移入高亮 */
4216
4234
  handleBarHighlight(t) {
4217
- this.sliderBar && new v.Tween({
4235
+ this.sliderBar && new y.Tween({
4218
4236
  ...t,
4219
4237
  node: this.sliderBar,
4220
4238
  duration: 0.2
@@ -4226,8 +4244,8 @@ class Ge {
4226
4244
  a(this, "row");
4227
4245
  a(this, "slider");
4228
4246
  a(this, "cacheKey", "");
4229
- this.context = t, this.task = e, this.width = o, this.height = r, this.row = new v.Group();
4230
- const l = new v.Rect({
4247
+ this.context = t, this.task = e, this.width = o, this.height = r, this.row = new y.Group();
4248
+ const h = new y.Rect({
4231
4249
  x: s,
4232
4250
  y: n,
4233
4251
  width: o,
@@ -4235,7 +4253,7 @@ class Ge {
4235
4253
  id: i,
4236
4254
  listening: !1
4237
4255
  });
4238
- this.row.add(l), this.slider = new Ie(this.context, 0, n, this.task, this.width), this.row.add(this.slider.sliderGroup);
4256
+ this.row.add(h), this.slider = new Ie(this.context, 0, n, this.task, this.width), this.row.add(this.slider.sliderGroup);
4239
4257
  }
4240
4258
  update(t, e) {
4241
4259
  this.slider.update(t, e);
@@ -4265,7 +4283,7 @@ class Re {
4265
4283
  // 选中相关
4266
4284
  a(this, "selectedRowId", null);
4267
4285
  a(this, "selectedRect", null);
4268
- this.context = t, this.stage = e, this.layer = i, this.bgLayer = s, this.rowsGroup = new v.Group({ name: "chart-body-rows" }), this.layer.add(this.rowsGroup), this.rowBgGroup = new v.Group({ name: "chart-body-row-bgs" }), this.bgLayer.add(this.rowBgGroup), this.registerEvents(), this.bindEvents();
4286
+ this.context = t, this.stage = e, this.layer = i, this.bgLayer = s, this.rowsGroup = new y.Group({ name: "chart-body-rows" }), this.layer.add(this.rowsGroup), this.rowBgGroup = new y.Group({ name: "chart-body-row-bgs" }), this.bgLayer.add(this.rowBgGroup), this.registerEvents(), this.bindEvents();
4269
4287
  }
4270
4288
  /**
4271
4289
  * 调整大小
@@ -4289,19 +4307,19 @@ class Re {
4289
4307
  this.rowBgGroup.destroyChildren(), t.forEach((s, n) => {
4290
4308
  const o = `chart-row-${s.id}`;
4291
4309
  let r = this.rowsCache.get(o);
4292
- const c = s.flatIndex * e + this.context.getOptions().header.height;
4293
- r ? (r.update(0, c), r.setOffset(this.offsetX, this.offsetY)) : (r = new Ge(
4310
+ const l = s.flatIndex * e + this.context.getOptions().header.height;
4311
+ r ? (r.update(0, l), r.setOffset(this.offsetX, this.offsetY)) : (r = new Ge(
4294
4312
  this.context,
4295
4313
  s,
4296
4314
  o,
4297
4315
  0,
4298
- c,
4316
+ l,
4299
4317
  this.width,
4300
4318
  e
4301
4319
  ), r.setOffset(this.offsetX, this.offsetY), this.rowsGroup.add(r.row), this.rowsCache.set(o, r)), r.cacheKey = i, this.context.store.getDataManager().isTaskSelected(s.id) && this.selectRow(s.id);
4302
- const g = new v.Rect({
4320
+ const g = new y.Rect({
4303
4321
  x: 0,
4304
- y: c + this.offsetY,
4322
+ y: l + this.offsetY,
4305
4323
  width: this.width,
4306
4324
  height: e,
4307
4325
  fill: this.context.store.getOptionManager().getRowBackgroundColor(s),
@@ -4334,13 +4352,13 @@ class Re {
4334
4352
  * 注册事件监听
4335
4353
  */
4336
4354
  registerEvents() {
4337
- this.context.event.on(y.ROW_HIGHLIGHT, (t) => {
4355
+ this.context.event.on(S.ROW_HIGHLIGHT, (t) => {
4338
4356
  this.highlightRow(t);
4339
- }), this.context.event.on(y.ROW_UNHIGHLIGHT, (t) => {
4357
+ }), this.context.event.on(S.ROW_UNHIGHLIGHT, (t) => {
4340
4358
  this.unhighlightRow(t);
4341
- }), this.context.event.on(y.TASK_SELECTED, (t) => {
4359
+ }), this.context.event.on(S.TASK_SELECTED, (t) => {
4342
4360
  this.selectRow(t.id);
4343
- }), this.context.event.on(y.TASK_UNSELECTED, (t) => {
4361
+ }), this.context.event.on(S.TASK_UNSELECTED, (t) => {
4344
4362
  this.unselectRow(t);
4345
4363
  });
4346
4364
  }
@@ -4352,9 +4370,9 @@ class Re {
4352
4370
  if (!e) return;
4353
4371
  const i = this.getTaskByPosition(e);
4354
4372
  this.highlightedRowId && i && i.id !== this.highlightedRowId && this.context.event.emit(
4355
- y.ROW_UNHIGHLIGHT,
4373
+ S.ROW_UNHIGHLIGHT,
4356
4374
  this.highlightedRowId
4357
- ), i && this.context.event.emit(y.ROW_HIGHLIGHT, i.id);
4375
+ ), i && this.context.event.emit(S.ROW_HIGHLIGHT, i.id);
4358
4376
  }
4359
4377
  /**
4360
4378
  * 处理鼠标离开
@@ -4372,7 +4390,7 @@ class Re {
4372
4390
  const i = this.getTaskByPosition(e);
4373
4391
  if (i) {
4374
4392
  if (this.context.store.getDataManager().isTaskSelected(i.id)) return;
4375
- this.context.store.getDataManager().selectTask(i.id), this.context.event.emit(y.ROW_CLICK, t.evt, i);
4393
+ this.context.store.getDataManager().selectTask(i.id), this.context.event.emit(S.ROW_CLICK, t.evt, i);
4376
4394
  }
4377
4395
  }
4378
4396
  /**
@@ -4383,7 +4401,7 @@ class Re {
4383
4401
  const e = this.stage.getPointerPosition();
4384
4402
  if (!e) return;
4385
4403
  const i = this.getTaskByPosition(e);
4386
- i && this.context.event.emit(y.ROW_DBL_CLICK, t.evt, i);
4404
+ i && this.context.event.emit(S.ROW_DBL_CLICK, t.evt, i);
4387
4405
  }
4388
4406
  /**
4389
4407
  * 处理右键菜单
@@ -4394,7 +4412,7 @@ class Re {
4394
4412
  const e = this.stage.getPointerPosition();
4395
4413
  if (!e) return;
4396
4414
  const i = this.getTaskByPosition(e);
4397
- i && this.context.event.emit(y.ROW_CONTEXTMENU, t.evt, i);
4415
+ i && this.context.event.emit(S.ROW_CONTEXTMENU, t.evt, i);
4398
4416
  }
4399
4417
  /**
4400
4418
  * 按照位置获取任务
@@ -4417,7 +4435,7 @@ class Re {
4417
4435
  if (!e) return;
4418
4436
  this.highlightRect && this.highlightRect.destroy();
4419
4437
  const s = e.task.flatIndex * this.context.getOptions().row.height + this.context.getOptions().header.height;
4420
- this.selectedRowId !== t && (this.highlightRect = new v.Rect({
4438
+ this.selectedRowId !== t && (this.highlightRect = new y.Rect({
4421
4439
  x: 0,
4422
4440
  y: s + this.offsetY,
4423
4441
  width: this.width,
@@ -4466,7 +4484,7 @@ class Re {
4466
4484
  if (!e) return;
4467
4485
  this.selectedRect && this.selectedRect.destroy(), this.selectedRowId === this.highlightedRowId && ((n = this.highlightRect) == null || n.fill("transparent"));
4468
4486
  const s = e.task.flatIndex * this.context.getOptions().row.height + this.context.getOptions().header.height;
4469
- this.selectedRect = new v.Rect({
4487
+ this.selectedRect = new y.Rect({
4470
4488
  x: 0,
4471
4489
  y: s + this.offsetY,
4472
4490
  width: this.width,
@@ -4536,38 +4554,38 @@ class Wt {
4536
4554
  angle: s = (t == null ? void 0 : t.angle) ?? 30,
4537
4555
  spacing: n = (t == null ? void 0 : t.spacing) || 10
4538
4556
  } = t || {}, o = s % 180, r = o * Math.PI / 180;
4539
- let l, c;
4540
- o === 0 ? (l = n, c = i + n) : o === 90 ? (l = i + n, c = n) : (l = Math.abs(Math.ceil((i + n) / Math.sin(r))), c = Math.abs(Math.ceil((i + n) / Math.cos(r))));
4541
- const g = new v.Stage({
4557
+ let h, l;
4558
+ o === 0 ? (h = n, l = i + n) : o === 90 ? (h = i + n, l = n) : (h = Math.abs(Math.ceil((i + n) / Math.sin(r))), l = Math.abs(Math.ceil((i + n) / Math.cos(r))));
4559
+ const g = new y.Stage({
4542
4560
  container: document.createElement("div"),
4543
- width: l,
4544
- height: c
4545
- }), h = new v.Layer();
4546
- g.add(h);
4547
- const d = new v.Group();
4561
+ width: h,
4562
+ height: l
4563
+ }), c = new y.Layer();
4564
+ g.add(c);
4565
+ const u = new y.Group();
4548
4566
  if (o === 0 || o === 90) {
4549
- const p = new v.Line({
4550
- points: [0, 0, o === 0 ? l : 0, o === 0 ? 0 : c],
4567
+ const m = new y.Line({
4568
+ points: [0, 0, o === 0 ? h : 0, o === 0 ? 0 : l],
4551
4569
  stroke: e,
4552
4570
  strokeWidth: i,
4553
4571
  perfectDrawEnabled: !0
4554
4572
  });
4555
- d.add(p);
4573
+ u.add(m);
4556
4574
  } else
4557
- for (let p = -l; p < l * 2; p += l) {
4558
- const u = p + i / 2, x = 0, w = p + i / 2 + (Math.cos(r) < 0 ? -l : l), E = c, T = new v.Line({
4559
- points: [Math.ceil(u), Math.ceil(x), Math.ceil(w), Math.ceil(E)],
4575
+ for (let m = -h; m < h * 2; m += h) {
4576
+ const d = m + i / 2, x = 0, w = m + i / 2 + (Math.cos(r) < 0 ? -h : h), T = l, v = new y.Line({
4577
+ points: [Math.ceil(d), Math.ceil(x), Math.ceil(w), Math.ceil(T)],
4560
4578
  stroke: e,
4561
4579
  strokeWidth: i,
4562
4580
  perfectDrawEnabled: !0,
4563
4581
  lineCap: "square",
4564
4582
  lineJoin: "miter"
4565
4583
  });
4566
- d.add(T);
4584
+ u.add(v);
4567
4585
  }
4568
- h.add(d), h.draw();
4569
- const m = new Image();
4570
- return m.src = g.toDataURL(), g.destroy(), m;
4586
+ c.add(u), c.draw();
4587
+ const p = new Image();
4588
+ return p.src = g.toDataURL(), g.destroy(), p;
4571
4589
  }
4572
4590
  /**
4573
4591
  * 创建圆点图案
@@ -4577,12 +4595,12 @@ class Wt {
4577
4595
  color: e = (t == null ? void 0 : t.color) || "#f9f9f9",
4578
4596
  width: i = (t == null ? void 0 : t.width) || 2,
4579
4597
  spacing: s = (t == null ? void 0 : t.spacing) || 4
4580
- } = t || {}, n = i * 2 + s * 2, o = n, r = F(e), l = new v.Stage({
4598
+ } = t || {}, n = i * 2 + s * 2, o = n, r = F(e), h = new y.Stage({
4581
4599
  container: document.createElement("div"),
4582
4600
  width: n,
4583
4601
  height: o
4584
- }), c = new v.Layer();
4585
- l.add(c), [
4602
+ }), l = new y.Layer();
4603
+ h.add(l), [
4586
4604
  { x: s / 2 + i / 2, y: s / 2 + i / 2 },
4587
4605
  {
4588
4606
  x: n - s / 2 - i / 2,
@@ -4596,17 +4614,17 @@ class Wt {
4596
4614
  x: n - s / 2 - i / 2,
4597
4615
  y: o - s / 2 - i / 2
4598
4616
  }
4599
- ].forEach((d) => {
4600
- const m = new v.Circle({
4601
- x: d.x,
4602
- y: d.y,
4617
+ ].forEach((u) => {
4618
+ const p = new y.Circle({
4619
+ x: u.x,
4620
+ y: u.y,
4603
4621
  radius: i / 2,
4604
4622
  fill: r.toString()
4605
4623
  });
4606
- c.add(m);
4607
- }), c.draw();
4608
- const h = new Image();
4609
- return h.src = l.toDataURL(), l.destroy(), h;
4624
+ l.add(p);
4625
+ }), l.draw();
4626
+ const c = new Image();
4627
+ return c.src = h.toDataURL(), h.destroy(), c;
4610
4628
  }
4611
4629
  /**
4612
4630
  * 创建网格图案
@@ -4616,30 +4634,30 @@ class Wt {
4616
4634
  color: e = (t == null ? void 0 : t.color) || "#f9f9f9",
4617
4635
  width: i = (t == null ? void 0 : t.width) || 1,
4618
4636
  spacing: s = (t == null ? void 0 : t.spacing) || 20
4619
- } = t || {}, n = i + s, o = n, r = n, l = new v.Stage({
4637
+ } = t || {}, n = i + s, o = n, r = n, h = new y.Stage({
4620
4638
  container: document.createElement("div"),
4621
4639
  width: o,
4622
4640
  height: r
4623
- }), c = new v.Layer();
4624
- l.add(c);
4625
- const g = new v.Group();
4641
+ }), l = new y.Layer();
4642
+ h.add(l);
4643
+ const g = new y.Group();
4626
4644
  g.add(
4627
- new v.Line({
4645
+ new y.Line({
4628
4646
  points: [0, 0, o, r],
4629
4647
  stroke: e,
4630
4648
  strokeWidth: i,
4631
4649
  perfectDrawEnabled: !0
4632
4650
  })
4633
4651
  ), g.add(
4634
- new v.Line({
4652
+ new y.Line({
4635
4653
  points: [0, r, o, 0],
4636
4654
  stroke: e,
4637
4655
  strokeWidth: i,
4638
4656
  perfectDrawEnabled: !0
4639
4657
  })
4640
- ), c.add(g), c.draw();
4641
- const h = new Image();
4642
- return h.src = l.toDataURL(), l.destroy(), h;
4658
+ ), l.add(g), l.draw();
4659
+ const c = new Image();
4660
+ return c.src = h.toDataURL(), h.destroy(), c;
4643
4661
  }
4644
4662
  }
4645
4663
  class We {
@@ -4652,7 +4670,7 @@ class We {
4652
4670
  // 保存周末
4653
4671
  a(this, "weekendGroup");
4654
4672
  a(this, "patternImage", null);
4655
- this.context = t, this.layer = e, this.weekendGroup = new v.Group(), this.layer.add(this.weekendGroup);
4673
+ this.context = t, this.layer = e, this.weekendGroup = new y.Group(), this.layer.add(this.weekendGroup);
4656
4674
  }
4657
4675
  /**
4658
4676
  * 检查日期是否为周末
@@ -4692,26 +4710,26 @@ class We {
4692
4710
  */
4693
4711
  async calculateWeekend() {
4694
4712
  if (this.clearWeekend(), !this.context.getOptions().weekend.show) return;
4695
- const t = this.context.store.getTimeAxis().getStartTime(), e = this.context.store.getTimeAxis().getEndTime(), i = this.context.store.getTimeAxis().getCellUnit(), s = this.context.store.getTimeAxis().getCellWidth(), n = this.context.getOptions().header.height, o = this.context.getOptions().row.height, l = this.context.store.getDataManager().getVisibleSize() * o, c = Math.max(0, -this.offsetX), g = c + this.width;
4696
- for (let h = t; h <= e; ) {
4697
- let d = s;
4698
- if (d = s * 2 * (i === "day" ? 1 : 24), this.isWeekend(h)) {
4699
- const m = this.context.store.getTimeAxis().getTimeLeft(h), p = n, u = l;
4700
- if (m + d < c) {
4701
- h = h.add(2, "day");
4713
+ const t = this.context.store.getTimeAxis().getStartTime(), e = this.context.store.getTimeAxis().getEndTime(), i = this.context.store.getTimeAxis().getCellUnit(), s = this.context.store.getTimeAxis().getCellWidth(), n = this.context.getOptions().header.height, o = this.context.getOptions().row.height, h = this.context.store.getDataManager().getVisibleSize() * o, l = Math.max(0, -this.offsetX), g = l + this.width;
4714
+ for (let c = t; c <= e; ) {
4715
+ let u = s;
4716
+ if (u = s * 2 * (i === "day" ? 1 : 24), this.isWeekend(c)) {
4717
+ const p = this.context.store.getTimeAxis().getTimeLeft(c), m = n, d = h;
4718
+ if (p + u < l) {
4719
+ c = c.add(2, "day");
4702
4720
  continue;
4703
4721
  }
4704
- if (m > g)
4722
+ if (p > g)
4705
4723
  break;
4706
4724
  !this.patternImage && this.context.getOptions().weekend.pattern && (this.patternImage = await Wt.createPattern(
4707
4725
  this.context.getOptions().weekend
4708
4726
  ));
4709
- const w = new v.Rect({
4727
+ const w = new y.Rect({
4710
4728
  name: "weekend-rect",
4711
- x: m,
4712
- y: p,
4713
- width: d,
4714
- height: u,
4729
+ x: p,
4730
+ y: m,
4731
+ width: u,
4732
+ height: d,
4715
4733
  // 根据模式设置填充
4716
4734
  ...this.patternImage ? {
4717
4735
  fillPatternImage: this.patternImage,
@@ -4723,9 +4741,9 @@ class We {
4723
4741
  },
4724
4742
  opacity: this.context.getOptions().weekend.opacity
4725
4743
  });
4726
- this.weekendGroup.add(w), h = h.add(2, "day");
4744
+ this.weekendGroup.add(w), c = c.add(2, "day");
4727
4745
  } else
4728
- h = h.add(1, "day");
4746
+ c = c.add(1, "day");
4729
4747
  }
4730
4748
  this.layer.batchDraw();
4731
4749
  }
@@ -4734,6 +4752,7 @@ class $e {
4734
4752
  constructor(t, e, i) {
4735
4753
  a(this, "arrowAnimation");
4736
4754
  a(this, "todayLine");
4755
+ a(this, "todayTextGroup");
4737
4756
  a(this, "triangle");
4738
4757
  // 状态变量
4739
4758
  a(this, "width", 0);
@@ -4758,6 +4777,7 @@ class $e {
4758
4777
  * 渲染今日线
4759
4778
  */
4760
4779
  render() {
4780
+ var c, u, p, m, d, x, w;
4761
4781
  const t = Object.assign(
4762
4782
  {
4763
4783
  show: !0,
@@ -4772,31 +4792,76 @@ class $e {
4772
4792
  let e = H();
4773
4793
  const i = this.context.store.getTimeAxis().getCellUnit();
4774
4794
  t.type === "block" && (e = e.startOf(i));
4775
- const s = this.context.store.getTimeAxis().getTimeLeft(e), n = this.context.store.getTimeAxis().getCellWidth(), o = this.context.getOptions().header.height, r = F(t.backgroundColor).alpha(t.opacity).toHex(), l = (t.type === "block" ? s + n / 2 : s) + this.offsetX, c = [l, o, l, this.height], g = t.type === "line" ? t.width : n;
4776
- this.todayLine ? (this.todayLine.points(c), this.todayLine.stroke(r), this.todayLine.strokeWidth(g)) : (this.todayLine = new v.Line({
4777
- points: c,
4795
+ const s = this.context.store.getTimeAxis().getTimeLeft(e), n = this.context.store.getTimeAxis().getCellWidth(), o = this.context.getOptions().header.height, r = F(t.backgroundColor).alpha(t.opacity).toHex(), h = (t.type === "block" ? s + n / 2 : s) + this.offsetX, l = [h, o, h, this.height], g = t.type === "line" ? t.width : n;
4796
+ if (this.todayLine ? (this.todayLine.points(l), this.todayLine.stroke(r), this.todayLine.strokeWidth(g)) : (this.todayLine = new y.Line({
4797
+ points: l,
4778
4798
  stroke: r,
4779
4799
  strokeWidth: g
4780
- }), this.bgLayer.add(this.todayLine)), t.type === "line" && (this.triangle ? (this.triangle.x(l), this.triangle.fill(r)) : (this.triangle = new v.RegularPolygon({
4781
- x: l,
4800
+ }), this.bgLayer.add(this.todayLine)), (c = this.context.getOptions().today.text) != null && c.show) {
4801
+ const T = ((u = this.context.getOptions().today.text) == null ? void 0 : u.fontSize) || 10, v = ((p = this.context.getOptions().today.text) == null ? void 0 : p.fontFamily) || "Arial", b = ((m = this.context.getOptions().today.text) == null ? void 0 : m.content) || "今天", O = new y.Text({ fontSize: T, fontFamily: v }).measureSize(b), M = ((d = this.context.getOptions().today.text) == null ? void 0 : d.color) || "white", E = ((x = this.context.getOptions().today.text) == null ? void 0 : x.backgroundColor) || r;
4802
+ if (!this.todayTextGroup)
4803
+ this.todayTextGroup = new y.Group({
4804
+ x: s + this.offsetX + g,
4805
+ y: o,
4806
+ opacity: (w = this.context.getOptions().today.text) == null ? void 0 : w.opacity
4807
+ }), this.todayTextGroup.add(new y.Rect({
4808
+ x: 0,
4809
+ y: 0,
4810
+ width: O.width + 12,
4811
+ height: O.height + 8,
4812
+ fill: E,
4813
+ cornerRadius: 0,
4814
+ name: "today-text-bg"
4815
+ })), this.todayTextGroup.add(new y.Text({
4816
+ x: 0,
4817
+ y: 0,
4818
+ text: b,
4819
+ fontSize: T,
4820
+ fontFamily: v,
4821
+ padding: 5,
4822
+ fill: M,
4823
+ align: "center",
4824
+ verticalAlign: "middle",
4825
+ name: "today-text"
4826
+ })), this.bgLayer.add(this.todayTextGroup);
4827
+ else {
4828
+ this.todayTextGroup.x(s + this.offsetX + g);
4829
+ const k = this.todayTextGroup.findOne(".today-text");
4830
+ k == null || k.setAttrs({
4831
+ text: b,
4832
+ fill: M,
4833
+ fontSize: T,
4834
+ fontFamily: v,
4835
+ padding: 5
4836
+ });
4837
+ const L = this.todayTextGroup.findOne(".today-text-bg");
4838
+ L == null || L.setAttrs({
4839
+ width: O.width + 12,
4840
+ height: O.height + 8,
4841
+ fill: E
4842
+ });
4843
+ }
4844
+ } else this.todayTextGroup && (this.todayTextGroup.destroy(), this.todayTextGroup = void 0);
4845
+ t.type === "line" && (this.triangle ? (this.triangle.x(h), this.triangle.fill(r)) : (this.triangle = new y.RegularPolygon({
4846
+ x: h,
4782
4847
  y: o - 8,
4783
4848
  sides: 3,
4784
4849
  radius: 8,
4785
4850
  fill: r,
4786
4851
  rotation: 180,
4787
4852
  name: "today-triangle"
4788
- }), this.arrowAnimation = new v.Animation((h) => {
4789
- var m;
4790
- const d = Math.sin(h.time * 4 * Math.PI / 2e3) + o - 8;
4791
- (m = this.triangle) == null || m.y(d);
4853
+ }), this.arrowAnimation = new y.Animation((T) => {
4854
+ var b;
4855
+ const v = Math.sin(T.time * 4 * Math.PI / 2e3) + o - 8;
4856
+ (b = this.triangle) == null || b.y(v);
4792
4857
  }, this.headerLayer), this.headerLayer.add(this.triangle), this.triangle.moveToTop(), this.arrowAnimation.start())), this.bgLayer.batchDraw();
4793
4858
  }
4794
4859
  /**
4795
4860
  * 销毁今日线
4796
4861
  */
4797
4862
  destroy() {
4798
- var t, e, i;
4799
- (t = this.todayLine) == null || t.destroy(), (e = this.triangle) == null || e.destroy(), (i = this.arrowAnimation) == null || i.stop(), this.arrowAnimation = void 0;
4863
+ var t, e, i, s;
4864
+ (t = this.todayLine) == null || t.destroy(), (e = this.triangle) == null || e.destroy(), (i = this.todayTextGroup) == null || i.destroy(), (s = this.arrowAnimation) == null || s.stop(), this.arrowAnimation = void 0;
4800
4865
  }
4801
4866
  }
4802
4867
  class Fe {
@@ -4809,7 +4874,7 @@ class Fe {
4809
4874
  // 保存假期
4810
4875
  a(this, "holidayGroup");
4811
4876
  a(this, "patternImage", /* @__PURE__ */ new WeakMap());
4812
- this.context = t, this.layer = e, this.holidayGroup = new v.Group(), this.layer.add(this.holidayGroup);
4877
+ this.context = t, this.layer = e, this.holidayGroup = new y.Group(), this.layer.add(this.holidayGroup);
4813
4878
  }
4814
4879
  /**
4815
4880
  * 调整假期大小
@@ -4821,7 +4886,7 @@ class Fe {
4821
4886
  * 设置偏移量 (响应滚动)
4822
4887
  */
4823
4888
  setOffset(t, e) {
4824
- this.offsetX = t, this.offsetY = e, this.holidayGroup.x(t), this.holidayGroup.y(e), this.calculateHoliday();
4889
+ this.offsetX = t, this.offsetY = e, this.holidayGroup.x(t), this.calculateHoliday();
4825
4890
  }
4826
4891
  /**
4827
4892
  * 渲染假期
@@ -4842,59 +4907,210 @@ class Fe {
4842
4907
  * 计算假期
4843
4908
  */
4844
4909
  async calculateHoliday() {
4910
+ var c, u, p, m, d, x, w, T;
4845
4911
  if (this.clearHoliday(), !this.context.getOptions().holiday.show) return;
4846
4912
  const t = this.context.getOptions().holiday.holidays;
4847
4913
  if (!t || t.length === 0) return;
4848
4914
  const e = Math.max(0, -this.offsetX), i = e + this.width, s = this.context.store.getTimeAxis().getStartTime(), n = this.context.store.getTimeAxis().getEndTime();
4849
4915
  this.context.store.getTimeAxis().getCellUnit();
4850
- const o = this.context.store.getTimeAxis().getCellWidth(), r = this.context.getOptions().header.height, l = this.context.getOptions().row.height, g = this.context.store.getDataManager().getVisibleSize() * l;
4851
- for (let h = s; h <= n; h = h.add(1, "day")) {
4852
- const d = t.find((m) => {
4853
- if (V(m.date)) {
4854
- if (m.date.some((p) => H(p).isSame(h, "day")))
4855
- return m;
4856
- } else if (H(m.date).isSame(h, "day"))
4857
- return m;
4916
+ const o = this.context.store.getTimeAxis().getCellWidth(), r = this.context.getOptions().header.height, h = this.context.getOptions().row.height, g = this.context.store.getDataManager().getVisibleSize() * h;
4917
+ for (let v = s; v <= n; v = v.add(1, "day")) {
4918
+ const b = t.find((O) => {
4919
+ if (U(O.date)) {
4920
+ if (O.date.some((M) => H(M).isSame(v, "day")))
4921
+ return O;
4922
+ } else if (H(O.date).isSame(v, "day"))
4923
+ return O;
4858
4924
  });
4859
- if (d) {
4860
- const m = this.context.store.getTimeAxis().getTimeLeft(h), p = r, u = g;
4861
- if (m + o < e)
4925
+ if (b) {
4926
+ const O = this.context.store.getTimeAxis().getTimeLeft(v), M = r, E = g;
4927
+ if (O + o < e)
4862
4928
  continue;
4863
- if (m > i)
4929
+ if (O > i)
4864
4930
  break;
4865
- !this.patternImage.has(d) && (d.pattern || this.context.getOptions().holiday.pattern) && this.patternImage.set(
4866
- d,
4931
+ !this.patternImage.has(b) && (b.pattern || this.context.getOptions().holiday.pattern) && this.patternImage.set(
4932
+ b,
4867
4933
  await Wt.createPattern({
4868
4934
  backgroundColor: this.context.getOptions().primaryColor,
4869
- ...d,
4935
+ ...b,
4870
4936
  ...this.context.getOptions().holiday
4871
4937
  })
4872
4938
  );
4873
- const w = new v.Rect({
4939
+ const L = new y.Rect({
4874
4940
  name: "holiday-rect",
4875
- x: m,
4876
- y: p,
4941
+ x: O,
4942
+ y: M,
4877
4943
  width: o,
4878
- height: u,
4944
+ height: E,
4879
4945
  // 根据模式设置填充
4880
- ...this.patternImage.get(d) ? {
4881
- fillPatternImage: this.patternImage.get(d) ?? void 0,
4946
+ ...this.patternImage.get(b) ? {
4947
+ fillPatternImage: this.patternImage.get(b) ?? void 0,
4882
4948
  fillPatternRepeat: "repeat",
4883
4949
  fillPatternOffset: { x: 0, y: 0 },
4884
4950
  fillPatternScale: { x: 1, y: 1 },
4885
- opacity: d.opacity || this.context.getOptions().holiday.opacity
4951
+ opacity: b.opacity || this.context.getOptions().holiday.opacity
4886
4952
  } : {
4887
- fill: d.backgroundColor || this.context.getOptions().holiday.backgroundColor || this.context.getOptions().primaryColor,
4888
- opacity: d.opacity || this.context.getOptions().holiday.opacity
4953
+ fill: b.backgroundColor || this.context.getOptions().holiday.backgroundColor || this.context.getOptions().primaryColor,
4954
+ opacity: b.opacity || this.context.getOptions().holiday.opacity
4889
4955
  }
4890
4956
  });
4891
- this.holidayGroup.add(w);
4957
+ if (this.holidayGroup.add(L), (c = b.text) != null && c.show) {
4958
+ if (U(b.date) && !H(b.date[0]).isSame(v, "day"))
4959
+ continue;
4960
+ const A = ((u = b.text) == null ? void 0 : u.fontSize) || 10, _ = ((p = b.text) == null ? void 0 : p.fontFamily) || "Arial", C = ((m = b.text) == null ? void 0 : m.content) || "", I = new y.Text({ fontSize: A, fontFamily: _ }).measureSize(C), B = ((d = b.text) == null ? void 0 : d.color) || "white", $ = ((x = b.text) == null ? void 0 : x.backgroundColor) || b.backgroundColor || ((w = this.context.getOptions().holiday) == null ? void 0 : w.backgroundColor) || this.context.getOptions().primaryColor, G = new y.Group({
4961
+ name: "holiday-text-group",
4962
+ x: O,
4963
+ y: M,
4964
+ opacity: (T = b.text) == null ? void 0 : T.opacity
4965
+ }), W = new y.Text({
4966
+ text: C,
4967
+ fill: B,
4968
+ fontSize: A,
4969
+ fontFamily: _,
4970
+ padding: 5
4971
+ }), z = new y.Rect({
4972
+ x: 0,
4973
+ y: 0,
4974
+ width: I.width + 12,
4975
+ height: I.height + 8,
4976
+ fill: $
4977
+ });
4978
+ G.add(z), G.add(W), this.holidayGroup.add(G);
4979
+ }
4892
4980
  }
4893
4981
  }
4894
4982
  this.layer.batchDraw();
4895
4983
  }
4896
4984
  }
4897
4985
  class Be {
4986
+ constructor(t, e) {
4987
+ // 状态变量
4988
+ a(this, "width", 0);
4989
+ a(this, "height", 0);
4990
+ a(this, "offsetX", 0);
4991
+ a(this, "offsetY", 0);
4992
+ // 保存标志日期渲染组
4993
+ a(this, "flagGroup");
4994
+ this.context = t, this.layer = e, this.flagGroup = new y.Group(), this.layer.add(this.flagGroup);
4995
+ }
4996
+ /**
4997
+ * 调整标志日期大小
4998
+ */
4999
+ resize(t, e) {
5000
+ this.width = t, this.height = e, this.calculateFlag();
5001
+ }
5002
+ /**
5003
+ * 设置偏移量 (响应滚动)
5004
+ */
5005
+ setOffset(t, e) {
5006
+ this.offsetX = t, this.offsetY = e, this.flagGroup.x(t), this.calculateFlag();
5007
+ }
5008
+ /**
5009
+ * 渲染标志日期
5010
+ */
5011
+ render() {
5012
+ this.layer.batchDraw();
5013
+ }
5014
+ /**
5015
+ * 销毁标志日期层
5016
+ */
5017
+ destroy() {
5018
+ this.flagGroup.destroy();
5019
+ }
5020
+ clearFlag() {
5021
+ this.flagGroup.destroyChildren();
5022
+ }
5023
+ /**
5024
+ * 计算标志日期
5025
+ */
5026
+ async calculateFlag() {
5027
+ var c, u, p, m, d, x, w;
5028
+ if (this.clearFlag(), !((c = this.context.getOptions().flag) != null && c.show)) return;
5029
+ const t = (u = this.context.getOptions().flag) == null ? void 0 : u.data;
5030
+ if (!t || t.length === 0) return;
5031
+ const e = ((p = this.context.getOptions().flag) == null ? void 0 : p.backgroundColor) || this.context.getOptions().primaryColor, i = ((m = this.context.getOptions().flag) == null ? void 0 : m.opacity) || 1, s = ((d = this.context.getOptions().flag) == null ? void 0 : d.color) || (F(e).isDark() ? "white" : "black"), n = ((x = this.context.getOptions().flag) == null ? void 0 : x.fontFamily) || "Arial", o = ((w = this.context.getOptions().flag) == null ? void 0 : w.fontSize) || 10, r = Math.max(0, -this.offsetX), h = r + this.width, l = this.context.store.getTimeAxis().getCellWidth(), g = this.context.getOptions().header.height;
5032
+ this.context.getOptions().row.height, this.context.store.getDataManager().getVisibleSize(), t.forEach((T) => {
5033
+ const v = H(T.date), b = this.context.store.getTimeAxis().getTimeLeft(v), O = g;
5034
+ if (b + l < r || b > h)
5035
+ return;
5036
+ const E = [b, g, b, this.height], k = new y.Line({
5037
+ points: E,
5038
+ stroke: T.backgroundColor || e,
5039
+ opacity: T.opacity || i,
5040
+ strokeWidth: 1
5041
+ });
5042
+ this.flagGroup.add(k);
5043
+ const L = T.content || "";
5044
+ if (L) {
5045
+ const A = new y.Text({
5046
+ text: L,
5047
+ x: b + 5,
5048
+ // 添加一些内边距
5049
+ y: O + 5,
5050
+ // 添加一些内边距
5051
+ fontSize: o,
5052
+ fontFamily: n,
5053
+ fill: T.color || s,
5054
+ verticalAlign: "middle",
5055
+ align: "left"
5056
+ }), _ = new y.Rect({
5057
+ x: b,
5058
+ y: O,
5059
+ width: A.measureSize(L).width + 12,
5060
+ height: A.measureSize(L).height + 8,
5061
+ fill: T.backgroundColor || e
5062
+ });
5063
+ this.flagGroup.add(_), this.flagGroup.add(A);
5064
+ } else if (T.flag)
5065
+ switch (T.flag) {
5066
+ case "banner":
5067
+ this.flagGroup.add(new y.Rect({
5068
+ x: b,
5069
+ y: O,
5070
+ width: 20,
5071
+ height: 10,
5072
+ fill: T.backgroundColor || e,
5073
+ opacity: T.opacity || i
5074
+ }));
5075
+ break;
5076
+ case "pennant":
5077
+ this.flagGroup.add(new y.Line({
5078
+ points: [b, O, b + 20, O + 5, b, O + 10],
5079
+ fill: T.backgroundColor || e,
5080
+ opacity: T.opacity || i,
5081
+ closed: !0
5082
+ }));
5083
+ break;
5084
+ case "tag":
5085
+ this.flagGroup.add(new y.Line({
5086
+ points: [b, O, b + 20, O, b + 15, O + 5, b + 20, O + 10, b, O + 10],
5087
+ fill: T.backgroundColor || e,
5088
+ opacity: T.opacity || i,
5089
+ closed: !0
5090
+ }));
5091
+ break;
5092
+ case "wedge":
5093
+ this.flagGroup.add(new y.Line({
5094
+ points: [b, O, b + 20, O, b + 25, O + 5, b + 20, O + 10, b, O + 10],
5095
+ fill: T.backgroundColor || e,
5096
+ opacity: T.opacity || i,
5097
+ closed: !0
5098
+ }));
5099
+ break;
5100
+ case "ribbon":
5101
+ this.flagGroup.add(new y.Line({
5102
+ points: [b, O, b + 15, O + 2, b + 20, O, b + 20, O + 10, b + 15, O + 12, b, O + 10],
5103
+ fill: T.backgroundColor || e,
5104
+ opacity: T.opacity || i,
5105
+ closed: !0,
5106
+ tension: 0.1
5107
+ }));
5108
+ break;
5109
+ }
5110
+ }), this.layer.batchDraw();
5111
+ }
5112
+ }
5113
+ class ze {
4898
5114
  constructor(t, e, i) {
4899
5115
  a(this, "tasks", []);
4900
5116
  // 创建点组
@@ -4912,7 +5128,7 @@ class Be {
4912
5128
  a(this, "height", 0);
4913
5129
  a(this, "offsetX", 0);
4914
5130
  a(this, "offsetY", 0);
4915
- this.context = t, this.stage = e, this.layer = i, this.linksGroup = new v.Group({ name: "links-group" }), this.pointGroup = new v.Group({ name: "point-group" }), this.templateArrow = new v.Arrow({
5131
+ this.context = t, this.stage = e, this.layer = i, this.linksGroup = new y.Group({ name: "links-group" }), this.pointGroup = new y.Group({ name: "point-group" }), this.templateArrow = new y.Arrow({
4916
5132
  points: [],
4917
5133
  stroke: this.context.getOptions().links.color || this.context.getOptions().primaryColor,
4918
5134
  strokeWidth: this.context.getOptions().links.width,
@@ -4931,11 +5147,11 @@ class Be {
4931
5147
  * 注册事件
4932
5148
  */
4933
5149
  registerEvents() {
4934
- this.context.event.on(y.ROW_HIGHLIGHT, (t) => {
5150
+ this.context.event.on(S.ROW_HIGHLIGHT, (t) => {
4935
5151
  this.highlightPoint(t);
4936
- }), this.context.event.on(y.ROW_UNHIGHLIGHT, (t) => {
5152
+ }), this.context.event.on(S.ROW_UNHIGHLIGHT, (t) => {
4937
5153
  this.unhighlightPoint(t);
4938
- }), this.context.event.on(y.SLIDER_MOVING, (t) => {
5154
+ }), this.context.event.on(S.SLIDER_MOVING, (t) => {
4939
5155
  this.isSliderMoving = t;
4940
5156
  });
4941
5157
  }
@@ -4974,47 +5190,47 @@ class Be {
4974
5190
  */
4975
5191
  calculatePoints() {
4976
5192
  if (this.pointGroup.destroyChildren(), !this.context.getOptions().links.create.enabled) return;
4977
- const t = this.context.getOptions().header.height, e = this.context.getOptions().row.height, i = e / 2 + t, s = this.context.getOptions().links.create.radius, n = this.context.getOptions().links.create.mode === "always" ? 0.5 : 0, o = this.context.getOptions().links.create.color || this.context.getOptions().primaryColor, r = F(o).alpha(this.context.getOptions().links.create.opacity ?? 1).toHex(), l = this.context.getOptions().links.create.width;
4978
- this.tasks.forEach((c) => {
4979
- if (this.context.store.getOptionManager().unpackFunc(this.context.getOptions().bar.show, c) && this.context.store.getDataManager().isTaskVisible(c) && c.startTime && c.endTime) {
4980
- const g = this.context.store.getTimeAxis().getTimeLeft(c.startTime), h = this.context.store.getTimeAxis().getTimeLeft(c.endTime);
4981
- let d = this.context.getOptions().links.gap;
4982
- c.isMilestone() && (d += e / 2);
4983
- const m = i + e * c.flatIndex;
4984
- let p = !0, u = !0, x = this.context.store.getOptionManager().unpackFunc(this.context.getOptions().links.create.from, c);
4985
- if (mt(x) ? p = u = x : U(x) && (p = x === "S", u = x === "F"), p) {
4986
- const w = new v.Circle({
4987
- id: `point-${c.id}-left`,
4988
- x: g - d,
4989
- y: m,
5193
+ const t = this.context.getOptions().header.height, e = this.context.getOptions().row.height, i = e / 2 + t, s = this.context.getOptions().links.create.radius, n = this.context.getOptions().links.create.mode === "always" ? 0.5 : 0, o = this.context.getOptions().links.create.color || this.context.getOptions().primaryColor, r = F(o).alpha(this.context.getOptions().links.create.opacity ?? 1).toHex(), h = this.context.getOptions().links.create.width;
5194
+ this.tasks.forEach((l) => {
5195
+ if (this.context.store.getOptionManager().unpackFunc(this.context.getOptions().bar.show, l) && this.context.store.getDataManager().isTaskVisible(l) && l.startTime && l.endTime) {
5196
+ const g = this.context.store.getTimeAxis().getTimeLeft(l.startTime), c = this.context.store.getTimeAxis().getTimeLeft(l.endTime);
5197
+ let u = this.context.getOptions().links.gap;
5198
+ l.isMilestone() && (u += e / 2);
5199
+ const p = i + e * l.flatIndex;
5200
+ let m = !0, d = !0, x = this.context.store.getOptionManager().unpackFunc(this.context.getOptions().links.create.from, l);
5201
+ if (pt(x) ? m = d = x : X(x) && (m = x === "S", d = x === "F"), m) {
5202
+ const w = new y.Circle({
5203
+ id: `point-${l.id}-left`,
5204
+ x: g - u,
5205
+ y: p,
4990
5206
  radius: s,
4991
5207
  opacity: n,
4992
5208
  stroke: r,
4993
- strokeWidth: l
5209
+ strokeWidth: h
4994
5210
  });
4995
- this.pointGroup.add(w), w.on("mousedown", (E) => {
4996
- this.isDragging = !0, this.createLink(E, "S", o, [g - d, m], c.id);
4997
- }), w.on("mouseover", (E) => {
5211
+ this.pointGroup.add(w), w.on("mousedown", (T) => {
5212
+ this.isDragging = !0, this.createLink(T, "S", o, [g - u, p], l.id);
5213
+ }), w.on("mouseover", (T) => {
4998
5214
  this.isSliderMoving || (this.stage.container().style.cursor = "pointer");
4999
- }), w.on("mouseout", (E) => {
5215
+ }), w.on("mouseout", (T) => {
5000
5216
  this.isDragging || this.isSliderMoving || (this.stage.container().style.cursor = "default");
5001
5217
  });
5002
5218
  }
5003
- if (u) {
5004
- const w = new v.Circle({
5005
- id: `point-${c.id}-right`,
5006
- x: h + d,
5007
- y: m,
5219
+ if (d) {
5220
+ const w = new y.Circle({
5221
+ id: `point-${l.id}-right`,
5222
+ x: c + u,
5223
+ y: p,
5008
5224
  radius: s,
5009
5225
  opacity: n,
5010
5226
  stroke: r,
5011
- strokeWidth: l
5227
+ strokeWidth: h
5012
5228
  });
5013
- this.pointGroup.add(w), w.on("mousedown", (E) => {
5014
- this.isDragging = !0, this.createLink(E, "F", o, [h + d, m], c.id);
5015
- }), w.on("mouseover", (E) => {
5229
+ this.pointGroup.add(w), w.on("mousedown", (T) => {
5230
+ this.isDragging = !0, this.createLink(T, "F", o, [c + u, p], l.id);
5231
+ }), w.on("mouseover", (T) => {
5016
5232
  this.isSliderMoving || (this.stage.container().style.cursor = "pointer");
5017
- }), w.on("mouseout", (E) => {
5233
+ }), w.on("mouseout", (T) => {
5018
5234
  this.isDragging || this.isSliderMoving || (this.stage.container().style.cursor = "default");
5019
5235
  });
5020
5236
  }
@@ -5033,102 +5249,102 @@ class Be {
5033
5249
  }), this.selectedMap.forEach((i, s) => {
5034
5250
  e.includes(s) || this.selectedMap.delete(s);
5035
5251
  }), t.forEach((i) => {
5036
- var o, r, l;
5252
+ var o, r, h;
5037
5253
  const s = this.context.store.getDataManager().getTaskById(i.from), n = this.context.store.getDataManager().getTaskById(i.to);
5038
- if (s || L.warn(
5254
+ if (s || D.warn(
5039
5255
  `No corresponding FROM task [${i.from}] was found for the link. Info:`,
5040
5256
  i
5041
- ), n || L.warn(
5257
+ ), n || D.warn(
5042
5258
  `No corresponding TO task [${i.to}] was found for the link. Info:`,
5043
5259
  i
5044
5260
  ), s && this.context.store.getOptionManager().unpackFunc(this.context.getOptions().bar.show, s) && this.context.store.getDataManager().isTaskVisible(s) && n && this.context.store.getOptionManager().unpackFunc(this.context.getOptions().bar.show, n) && this.context.store.getDataManager().isTaskVisible(n)) {
5045
- const c = this.getPoints(s, n, i);
5046
- if (c.length <= 2)
5047
- L.warn("The link position has some error.", i);
5261
+ const l = this.getPoints(s, n, i);
5262
+ if (l.length <= 2)
5263
+ D.warn("The link position has some error.", i);
5048
5264
  else {
5049
- const g = this.createId(i), h = i.radius ?? this.context.getOptions().links.radius, d = ((o = i.arrow) == null ? void 0 : o.width) ?? this.context.getOptions().links.arrow.width, m = ((r = i.arrow) == null ? void 0 : r.height) ?? this.context.getOptions().links.arrow.height, p = i.width ?? this.context.getOptions().links.width, u = new v.Group({ id: g }), x = new v.Circle({
5050
- radius: h,
5265
+ const g = this.createId(i), c = i.radius ?? this.context.getOptions().links.radius, u = ((o = i.arrow) == null ? void 0 : o.width) ?? this.context.getOptions().links.arrow.width, p = ((r = i.arrow) == null ? void 0 : r.height) ?? this.context.getOptions().links.arrow.height, m = i.width ?? this.context.getOptions().links.width, d = new y.Group({ id: g }), x = new y.Circle({
5266
+ radius: c,
5051
5267
  fill: i.color || this.context.getOptions().links.color || this.context.getOptions().primaryColor,
5052
- x: c[0],
5053
- y: c[1]
5268
+ x: l[0],
5269
+ y: l[1]
5054
5270
  });
5055
- u.add(x);
5056
- const w = Math.floor(c.length / 2), E = w % 2 === 0 ? w : w - 1, T = c.slice(0, E + 2), O = c.slice(E), C = new v.Line({
5057
- points: T,
5271
+ d.add(x);
5272
+ const w = Math.floor(l.length / 2), T = w % 2 === 0 ? w : w - 1, v = l.slice(0, T + 2), b = l.slice(T), O = new y.Line({
5273
+ points: v,
5058
5274
  stroke: i.color || this.context.getOptions().links.color || this.context.getOptions().primaryColor,
5059
- strokeWidth: p,
5275
+ strokeWidth: m,
5060
5276
  lineCap: "round",
5061
5277
  lineJoin: "round",
5062
5278
  dash: i.dash || this.context.getOptions().links.dash,
5063
5279
  hitStrokeWidth: 10,
5064
5280
  // 增加点击区域
5065
5281
  draggable: !0,
5066
- dragBoundFunc: (S) => ({ x: 0, y: 0 })
5282
+ dragBoundFunc: (E) => ({ x: 0, y: 0 })
5067
5283
  });
5068
- u.add(C), C.on("dragstart", (S) => {
5284
+ d.add(O), O.on("dragstart", (E) => {
5069
5285
  this.handleDrag(
5070
- S,
5286
+ E,
5071
5287
  i,
5072
5288
  "S",
5073
- [c[c.length - 2], c[c.length - 1]],
5289
+ [l[l.length - 2], l[l.length - 1]],
5074
5290
  g
5075
5291
  );
5076
5292
  });
5077
- const k = new v.Arrow({
5078
- points: O,
5293
+ const M = new y.Arrow({
5294
+ points: b,
5079
5295
  stroke: i.color || this.context.getOptions().links.color || this.context.getOptions().primaryColor,
5080
- strokeWidth: p,
5081
- pointerLength: m,
5082
- pointerWidth: d,
5083
- fill: ((l = i.arrow) == null ? void 0 : l.color) || this.context.getOptions().links.arrow.color || i.color || this.context.getOptions().links.color || this.context.getOptions().primaryColor,
5296
+ strokeWidth: m,
5297
+ pointerLength: p,
5298
+ pointerWidth: u,
5299
+ fill: ((h = i.arrow) == null ? void 0 : h.color) || this.context.getOptions().links.arrow.color || i.color || this.context.getOptions().links.color || this.context.getOptions().primaryColor,
5084
5300
  // 箭头填充色
5085
5301
  lineJoin: "round",
5086
5302
  dash: i.dash || this.context.getOptions().links.dash,
5087
5303
  hitStrokeWidth: 10,
5088
5304
  // 增加点击区域
5089
5305
  draggable: !0,
5090
- dragBoundFunc: (S) => ({ x: 0, y: 0 })
5306
+ dragBoundFunc: (E) => ({ x: 0, y: 0 })
5091
5307
  });
5092
- u.add(k), k.on("dragstart", (S) => {
5093
- this.handleDrag(S, i, "F", [c[0], c[1]], g);
5094
- }), this.linksGroup.add(u), u.on("mouseover", (S) => {
5095
- S.target.moveToTop(), this.context.getOptions().links.move.enabled === !0 && (this.stage.container().style.cursor = "pointer"), this.selectedMap.has(g) || this.handleHighlight(
5096
- u,
5097
- h,
5308
+ d.add(M), M.on("dragstart", (E) => {
5309
+ this.handleDrag(E, i, "F", [l[0], l[1]], g);
5310
+ }), this.linksGroup.add(d), d.on("mouseover", (E) => {
5311
+ E.target.moveToTop(), this.context.getOptions().links.move.enabled === !0 && (this.stage.container().style.cursor = "pointer"), this.selectedMap.has(g) || this.handleHighlight(
5098
5312
  d,
5099
- m,
5313
+ c,
5314
+ u,
5100
5315
  p,
5316
+ m,
5101
5317
  2
5102
5318
  );
5103
- }), u.on("mouseout", (S) => {
5319
+ }), d.on("mouseout", (E) => {
5104
5320
  this.selectedMap.has(g) || this.handleHighlight(
5105
- u,
5106
- h,
5107
5321
  d,
5108
- m,
5322
+ c,
5323
+ u,
5109
5324
  p,
5325
+ m,
5110
5326
  0
5111
5327
  ), !this.isDragging && (this.stage.container().style.cursor = "default");
5112
- }), u.on("mousedown", (S) => {
5328
+ }), d.on("mousedown", (E) => {
5113
5329
  this.isDragging = !0;
5114
- }), u.on("click", (S) => {
5115
- S.cancelBubble = !0, this.isDragging = !1, u.moveToTop(), S.evt.button === 0 ? this.selectedMap.has(g) ? (this.selectedMap.delete(g), this.context.event.emit(
5116
- y.SELECT_LINK,
5330
+ }), d.on("click", (E) => {
5331
+ E.cancelBubble = !0, this.isDragging = !1, d.moveToTop(), E.evt.button === 0 ? this.selectedMap.has(g) ? (this.selectedMap.delete(g), this.context.event.emit(
5332
+ S.SELECT_LINK,
5117
5333
  null,
5118
5334
  i,
5119
5335
  this.selectedMap.values().toArray()
5120
5336
  )) : (this.selectedMap.set(g, i), this.context.event.emit(
5121
- y.SELECT_LINK,
5337
+ S.SELECT_LINK,
5122
5338
  i,
5123
5339
  null,
5124
5340
  this.selectedMap.values().toArray()
5125
- )) : S.evt.button === 2 && this.context.event.emit(y.CONTEXT_LINK, S.evt, i);
5341
+ )) : E.evt.button === 2 && this.context.event.emit(S.CONTEXT_LINK, E.evt, i);
5126
5342
  }), this.selectedMap.has(g) && this.handleHighlight(
5127
- u,
5128
- h,
5129
5343
  d,
5130
- m,
5344
+ c,
5345
+ u,
5131
5346
  p,
5347
+ m,
5132
5348
  2,
5133
5349
  !0
5134
5350
  );
@@ -5141,121 +5357,121 @@ class Be {
5141
5357
  }
5142
5358
  getPoints(t, e, i) {
5143
5359
  if (t.startTime && t.endTime && e.startTime && e.endTime) {
5144
- const s = this.context.getOptions().row.height, n = t.isMilestone() ? s / 2 : 0, o = this.context.store.getTimeAxis().getTimeLeft(t.startTime) - n, r = this.context.store.getTimeAxis().getTimeLeft(t.endTime) + n, l = e.isMilestone() ? s / 2 : 0, c = this.context.store.getTimeAxis().getTimeLeft(e.startTime) - l, g = this.context.store.getTimeAxis().getTimeLeft(e.endTime) + l;
5145
- let h = [];
5360
+ const s = this.context.getOptions().row.height, n = t.isMilestone() ? s / 2 : 0, o = this.context.store.getTimeAxis().getTimeLeft(t.startTime) - n, r = this.context.store.getTimeAxis().getTimeLeft(t.endTime) + n, h = e.isMilestone() ? s / 2 : 0, l = this.context.store.getTimeAxis().getTimeLeft(e.startTime) - h, g = this.context.store.getTimeAxis().getTimeLeft(e.endTime) + h;
5361
+ let c = [];
5146
5362
  switch (i.type || "FS") {
5147
5363
  case "FF":
5148
- h = this.createFF(i, t, e, o, r, c, g);
5364
+ c = this.createFF(i, t, e, o, r, l, g);
5149
5365
  break;
5150
5366
  case "SS":
5151
- h = this.createSS(i, t, e, o, r, c, g);
5367
+ c = this.createSS(i, t, e, o, r, l, g);
5152
5368
  break;
5153
5369
  case "SF":
5154
- h = this.createSF(i, t, e, o, r, c, g);
5370
+ c = this.createSF(i, t, e, o, r, l, g);
5155
5371
  break;
5156
5372
  case "FS":
5157
5373
  default:
5158
- h = this.createFS(i, t, e, o, r, c, g);
5374
+ c = this.createFS(i, t, e, o, r, l, g);
5159
5375
  }
5160
- return h;
5376
+ return c;
5161
5377
  }
5162
5378
  return [];
5163
5379
  }
5164
5380
  /** 生成 FS 连线 */
5165
5381
  createFS(t, e, i, s, n, o, r) {
5166
- const l = this.context.getOptions().header.height, c = this.context.getOptions().row.height, g = c / 2 + l, h = t.gap || this.context.getOptions().links.gap, d = [
5167
- n + h,
5168
- 0.05 + g + c * e.flatIndex
5382
+ const h = this.context.getOptions().header.height, l = this.context.getOptions().row.height, g = l / 2 + h, c = t.gap || this.context.getOptions().links.gap, u = [
5383
+ n + c,
5384
+ 0.05 + g + l * e.flatIndex
5169
5385
  ];
5170
5386
  {
5171
- const m = t.distance ? parseInt(t.distance) : this.context.getOptions().links.distance;
5172
- if (isNaN(m))
5173
- L.error("Link's distance must be a Numeric");
5387
+ const p = t.distance ? parseInt(t.distance) : this.context.getOptions().links.distance;
5388
+ if (isNaN(p))
5389
+ D.error("Link's distance must be a Numeric");
5174
5390
  else {
5175
- const p = n + h + m, u = o - h - m, x = [
5176
- Math.max(p, u),
5177
- g + c * e.flatIndex
5391
+ const m = n + c + p, d = o - c - p, x = [
5392
+ Math.max(m, d),
5393
+ g + l * e.flatIndex
5178
5394
  ];
5179
- d.push(...x);
5180
- const w = c * e.flatIndex + l + (e.flatIndex <= i.flatIndex ? c : 0);
5181
- d.push(x[0], w), d.push(u, w), d.push(u, g + c * i.flatIndex);
5395
+ u.push(...x);
5396
+ const w = l * e.flatIndex + h + (e.flatIndex <= i.flatIndex ? l : 0);
5397
+ u.push(x[0], w), u.push(d, w), u.push(d, g + l * i.flatIndex);
5182
5398
  }
5183
5399
  }
5184
- return d.push(o - h, g + c * i.flatIndex), d;
5400
+ return u.push(o - c, g + l * i.flatIndex), u;
5185
5401
  }
5186
5402
  /** 生成 FF 连线 */
5187
5403
  createFF(t, e, i, s, n, o, r) {
5188
- const l = this.context.getOptions().header.height, c = this.context.getOptions().row.height, g = c / 2 + l, h = t.gap || this.context.getOptions().links.gap, d = [
5189
- n + h,
5190
- 0.05 + g + c * e.flatIndex
5404
+ const h = this.context.getOptions().header.height, l = this.context.getOptions().row.height, g = l / 2 + h, c = t.gap || this.context.getOptions().links.gap, u = [
5405
+ n + c,
5406
+ 0.05 + g + l * e.flatIndex
5191
5407
  ];
5192
5408
  {
5193
- const m = t.distance ? parseInt(t.distance) : this.context.getOptions().links.distance;
5194
- if (isNaN(m))
5195
- L.error("Link's distance must be a Numeric");
5409
+ const p = t.distance ? parseInt(t.distance) : this.context.getOptions().links.distance;
5410
+ if (isNaN(p))
5411
+ D.error("Link's distance must be a Numeric");
5196
5412
  else {
5197
- const p = n + h + m, u = r + h + m, x = [
5198
- p <= u ? u : p,
5199
- g + c * e.flatIndex
5413
+ const m = n + c + p, d = r + c + p, x = [
5414
+ m <= d ? d : m,
5415
+ g + l * e.flatIndex
5200
5416
  ];
5201
- d.push(...x), d.push(
5202
- Math.max(u, p),
5203
- g + c * i.flatIndex
5417
+ u.push(...x), u.push(
5418
+ Math.max(d, m),
5419
+ g + l * i.flatIndex
5204
5420
  );
5205
5421
  }
5206
5422
  }
5207
- return d.push(r + h, g + c * i.flatIndex), d;
5423
+ return u.push(r + c, g + l * i.flatIndex), u;
5208
5424
  }
5209
5425
  /** 生成 SS 连线 */
5210
5426
  createSS(t, e, i, s, n, o, r) {
5211
- const l = this.context.getOptions().header.height, c = this.context.getOptions().row.height, g = c / 2 + l, h = t.gap || this.context.getOptions().links.gap, d = [
5212
- s - h,
5213
- 0.05 + g + c * e.flatIndex
5427
+ const h = this.context.getOptions().header.height, l = this.context.getOptions().row.height, g = l / 2 + h, c = t.gap || this.context.getOptions().links.gap, u = [
5428
+ s - c,
5429
+ 0.05 + g + l * e.flatIndex
5214
5430
  ];
5215
5431
  {
5216
- const m = t.distance ? parseInt(t.distance) : this.context.getOptions().links.distance;
5217
- if (isNaN(m))
5218
- L.error("Link's distance must be a Numeric");
5432
+ const p = t.distance ? parseInt(t.distance) : this.context.getOptions().links.distance;
5433
+ if (isNaN(p))
5434
+ D.error("Link's distance must be a Numeric");
5219
5435
  else {
5220
- const p = s - h - m, u = o - h - m;
5221
- d.push(
5222
- Math.min(u, p),
5223
- g + c * e.flatIndex
5224
- ), d.push(
5225
- Math.min(u, p),
5226
- g + c * i.flatIndex
5436
+ const m = s - c - p, d = o - c - p;
5437
+ u.push(
5438
+ Math.min(d, m),
5439
+ g + l * e.flatIndex
5440
+ ), u.push(
5441
+ Math.min(d, m),
5442
+ g + l * i.flatIndex
5227
5443
  );
5228
5444
  }
5229
5445
  }
5230
- return d.push(o - h, g + c * i.flatIndex), d;
5446
+ return u.push(o - c, g + l * i.flatIndex), u;
5231
5447
  }
5232
5448
  /** 生成 SF 连线 */
5233
5449
  createSF(t, e, i, s, n, o, r) {
5234
- const l = this.context.getOptions().header.height, c = this.context.getOptions().row.height, g = c / 2 + l, h = t.gap || this.context.getOptions().links.gap, d = [
5235
- s - h,
5236
- 0.05 + g + c * e.flatIndex
5450
+ const h = this.context.getOptions().header.height, l = this.context.getOptions().row.height, g = l / 2 + h, c = t.gap || this.context.getOptions().links.gap, u = [
5451
+ s - c,
5452
+ 0.05 + g + l * e.flatIndex
5237
5453
  ];
5238
5454
  {
5239
- const m = t.distance ? parseInt(t.distance) : this.context.getOptions().links.distance;
5240
- if (isNaN(m))
5241
- L.error("Link's distance must be a Numeric");
5455
+ const p = t.distance ? parseInt(t.distance) : this.context.getOptions().links.distance;
5456
+ if (isNaN(p))
5457
+ D.error("Link's distance must be a Numeric");
5242
5458
  else {
5243
- const p = s - h - m, u = r + h + m, x = [
5244
- Math.min(p, u),
5245
- g + c * e.flatIndex
5459
+ const m = s - c - p, d = r + c + p, x = [
5460
+ Math.min(m, d),
5461
+ g + l * e.flatIndex
5246
5462
  ];
5247
- d.push(...x);
5248
- const w = c * e.flatIndex + l + (e.flatIndex <= i.flatIndex ? c : 0);
5249
- d.push(x[0], w), d.push(u, w), d.push(u, g + c * i.flatIndex);
5463
+ u.push(...x);
5464
+ const w = l * e.flatIndex + h + (e.flatIndex <= i.flatIndex ? l : 0);
5465
+ u.push(x[0], w), u.push(d, w), u.push(d, g + l * i.flatIndex);
5250
5466
  }
5251
5467
  }
5252
- return d.push(r + h, g + c * i.flatIndex), d;
5468
+ return u.push(r + c, g + l * i.flatIndex), u;
5253
5469
  }
5254
5470
  /**
5255
5471
  * 处理连线被点击后的移动
5256
5472
  */
5257
5473
  handleDrag(t, e, i, s, n) {
5258
- var x, w, E;
5474
+ var x, w, T;
5259
5475
  if (!this.isDragging || this.context.getOptions().links.move.enabled !== !0) return;
5260
5476
  this.stage.container().style.cursor = "pointer";
5261
5477
  const o = this.linksGroup.findOne(`#${n}`);
@@ -5266,45 +5482,45 @@ class Be {
5266
5482
  // 箭头长度
5267
5483
  pointerWidth: ((w = e.arrow) == null ? void 0 : w.width) ?? this.context.getOptions().links.arrow.width,
5268
5484
  // 箭头宽度
5269
- fill: ((E = e.arrow) == null ? void 0 : E.color) || this.context.getOptions().links.arrow.color || e.color || this.context.getOptions().links.color || this.context.getOptions().primaryColor,
5485
+ fill: ((T = e.arrow) == null ? void 0 : T.color) || this.context.getOptions().links.arrow.color || e.color || this.context.getOptions().links.color || this.context.getOptions().primaryColor,
5270
5486
  // 箭头填充色
5271
5487
  lineJoin: "round",
5272
5488
  dash: e.data || this.context.getOptions().links.dash
5273
5489
  }), this.templateArrow.visible(!1);
5274
5490
  let r = null;
5275
- const l = this.context.getOptions().header.height, c = this.context.getOptions().row.height, g = c / 2 + l, h = e.gap || this.context.getOptions().links.gap;
5276
- let d = null;
5277
- const m = () => {
5278
- const T = this.stage.getPointerPosition();
5279
- if (!T || (d = this.getTaskByPosition(T), !d)) return;
5280
- const { allowLeft: O, allowRight: C } = this.isAllowDrop(d, e.from);
5281
- if (this.templateArrow.visible(!0), o == null || o.visible(!1), d != null && d.startTime && (d != null && d.endTime)) {
5282
- const k = this.context.store.getTimeAxis().getTimeLeft(d.startTime), S = this.context.store.getTimeAxis().getTimeLeft(d.endTime), b = (S + k) / 2 + this.offsetX;
5283
- let D = k - h;
5284
- T.x <= b ? r = "S" : (r = "F", D = S + h), i === "S" ? (this.templateArrow.points([
5285
- D,
5286
- g + c * d.flatIndex,
5491
+ const h = this.context.getOptions().header.height, l = this.context.getOptions().row.height, g = l / 2 + h, c = e.gap || this.context.getOptions().links.gap;
5492
+ let u = null;
5493
+ const p = () => {
5494
+ const v = this.stage.getPointerPosition();
5495
+ if (!v || (u = this.getTaskByPosition(v), !u)) return;
5496
+ const { allowLeft: b, allowRight: O } = this.isAllowDrop(u, e.from);
5497
+ if (this.templateArrow.visible(!0), o == null || o.visible(!1), u != null && u.startTime && (u != null && u.endTime)) {
5498
+ const M = this.context.store.getTimeAxis().getTimeLeft(u.startTime), E = this.context.store.getTimeAxis().getTimeLeft(u.endTime), k = (E + M) / 2 + this.offsetX;
5499
+ let L = M - c;
5500
+ v.x <= k ? r = "S" : (r = "F", L = E + c), i === "S" ? (this.templateArrow.points([
5501
+ L,
5502
+ g + l * u.flatIndex,
5287
5503
  ...s
5288
- ]), C ? this.stage.container().style.cursor = "pointer" : this.stage.container().style.cursor = "not-allowed") : i === "F" && (this.templateArrow.points([
5504
+ ]), O ? this.stage.container().style.cursor = "pointer" : this.stage.container().style.cursor = "not-allowed") : i === "F" && (this.templateArrow.points([
5289
5505
  ...s,
5290
- D,
5291
- g + c * d.flatIndex
5292
- ]), O ? this.stage.container().style.cursor = "pointer" : this.stage.container().style.cursor = "not-allowed");
5506
+ L,
5507
+ g + l * u.flatIndex
5508
+ ]), b ? this.stage.container().style.cursor = "pointer" : this.stage.container().style.cursor = "not-allowed");
5293
5509
  }
5294
- }, p = () => {
5295
- var C, k;
5296
- let T;
5297
- const O = J(e);
5298
- if (r && d && (i === "S" ? (T = `${r}${(e.type || "FS")[1]}`, O.from = d.id) : i === "F" && (T = `${(e.type || "FS")[0]}${r}`, O.to = d.id)), T && d && !(O.from === O.to && ["FF", "SS"].includes(T))) {
5299
- const { allowLeft: S, allowRight: b } = this.isAllowDrop(d, O.from);
5300
- O.type = T, ((C = O.type) == null ? void 0 : C.slice(1)) === "S" && S || ((k = O.type) == null ? void 0 : k.slice(1)) === "F" && b ? this.context.event.emit(y.UPDATE_LINK, O) : this.context.event.emit(y.ERROR, q.LINK_NOT_ALLOWED);
5510
+ }, m = () => {
5511
+ var O, M;
5512
+ let v;
5513
+ const b = J(e);
5514
+ if (r && u && (i === "S" ? (v = `${r}${(e.type || "FS")[1]}`, b.from = u.id) : i === "F" && (v = `${(e.type || "FS")[0]}${r}`, b.to = u.id)), v && u && !(b.from === b.to && ["FF", "SS"].includes(v))) {
5515
+ const { allowLeft: E, allowRight: k } = this.isAllowDrop(u, b.from);
5516
+ b.type = v, ((O = b.type) == null ? void 0 : O.slice(1)) === "S" && E || ((M = b.type) == null ? void 0 : M.slice(1)) === "F" && k ? this.context.event.emit(S.UPDATE_LINK, b) : this.context.event.emit(S.ERROR, q.LINK_NOT_ALLOWED);
5301
5517
  } else
5302
- this.context.event.emit(y.ERROR, q.LINK_SAME);
5303
- this.templateArrow.visible(!1), this.stage.container().style.cursor = "default", this.isDragging = !1, this.calculateLinks(), document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", p);
5304
- }, u = (T) => {
5305
- T.key === "Escape" && (this.templateArrow.visible(!1), this.stage.container().style.cursor = "default", this.isDragging = !1, o == null || o.visible(!0), document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", p), document.removeEventListener("keydown", u));
5518
+ this.context.event.emit(S.ERROR, q.LINK_SAME);
5519
+ this.templateArrow.visible(!1), this.stage.container().style.cursor = "default", this.isDragging = !1, this.calculateLinks(), document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", m);
5520
+ }, d = (v) => {
5521
+ v.key === "Escape" && (this.templateArrow.visible(!1), this.stage.container().style.cursor = "default", this.isDragging = !1, o == null || o.visible(!0), document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", m), document.removeEventListener("keydown", d));
5306
5522
  };
5307
- document.addEventListener("mousemove", m), document.addEventListener("mouseup", p), document.addEventListener("keydown", u);
5523
+ document.addEventListener("mousemove", p), document.addEventListener("mouseup", m), document.addEventListener("keydown", d);
5308
5524
  }
5309
5525
  /**
5310
5526
  * 处理连线被点击后的移动
@@ -5322,45 +5538,45 @@ class Be {
5322
5538
  dash: this.context.getOptions().links.dash
5323
5539
  }), this.templateArrow.visible(!1);
5324
5540
  let o = null;
5325
- const r = this.context.getOptions().header.height, l = this.context.getOptions().row.height, c = l / 2 + r, g = this.context.getOptions().links.gap;
5326
- let h = null;
5327
- const d = () => {
5328
- const u = this.stage.getPointerPosition();
5329
- if (!u || (h = this.getTaskByPosition(u), !h)) return;
5330
- const { allowLeft: x, allowRight: w } = this.isAllowDrop(h, n);
5331
- if (this.templateArrow.visible(!0), h.startTime && h.endTime) {
5332
- const E = this.context.store.getTimeAxis().getTimeLeft(h.startTime), T = this.context.store.getTimeAxis().getTimeLeft(h.endTime), O = (T + E) / 2 + this.offsetX;
5333
- let C = E - g;
5334
- u.x <= O ? o = "S" : (o = "F", C = T + g), this.templateArrow.points([
5541
+ const r = this.context.getOptions().header.height, h = this.context.getOptions().row.height, l = h / 2 + r, g = this.context.getOptions().links.gap;
5542
+ let c = null;
5543
+ const u = () => {
5544
+ const d = this.stage.getPointerPosition();
5545
+ if (!d || (c = this.getTaskByPosition(d), !c)) return;
5546
+ const { allowLeft: x, allowRight: w } = this.isAllowDrop(c, n);
5547
+ if (this.templateArrow.visible(!0), c.startTime && c.endTime) {
5548
+ const T = this.context.store.getTimeAxis().getTimeLeft(c.startTime), v = this.context.store.getTimeAxis().getTimeLeft(c.endTime), b = (v + T) / 2 + this.offsetX;
5549
+ let O = T - g;
5550
+ d.x <= b ? o = "S" : (o = "F", O = v + g), this.templateArrow.points([
5335
5551
  ...s,
5336
- C,
5337
- c + l * h.flatIndex
5552
+ O,
5553
+ l + h * c.flatIndex
5338
5554
  ]), o === "S" && !x ? this.stage.container().style.cursor = "not-allowed" : o === "F" && !w ? this.stage.container().style.cursor = "not-allowed" : this.stage.container().style.cursor = "pointer";
5339
5555
  }
5340
- }, m = () => {
5341
- let u;
5342
- if (o && (u = `${e}${o}`), u && h)
5343
- if (this.context.getOptions().links.data.some((x) => x.from === n && x.to === h.id && x.type === u))
5344
- this.context.event.emit(y.ERROR, q.LINK_EXIST);
5345
- else if (n === h.id && e === o)
5346
- this.context.event.emit(y.ERROR, q.LINK_SAME);
5556
+ }, p = () => {
5557
+ let d;
5558
+ if (o && (d = `${e}${o}`), d && c)
5559
+ if (this.context.getOptions().links.data.some((x) => x.from === n && x.to === c.id && x.type === d))
5560
+ this.context.event.emit(S.ERROR, q.LINK_EXIST);
5561
+ else if (n === c.id && e === o)
5562
+ this.context.event.emit(S.ERROR, q.LINK_SAME);
5347
5563
  else {
5348
- const { allowLeft: x, allowRight: w } = this.isAllowDrop(h, n);
5349
- o === "S" && x || o === "F" && w ? this.context.event.emit(y.CREATE_LINK, {
5564
+ const { allowLeft: x, allowRight: w } = this.isAllowDrop(c, n);
5565
+ o === "S" && x || o === "F" && w ? this.context.event.emit(S.CREATE_LINK, {
5350
5566
  from: n,
5351
- to: h.id,
5352
- type: u,
5567
+ to: c.id,
5568
+ type: d,
5353
5569
  color: i
5354
5570
  }) : this.context.event.emit(
5355
- y.ERROR,
5571
+ S.ERROR,
5356
5572
  q.LINK_NOT_ALLOWED
5357
5573
  );
5358
5574
  }
5359
- this.templateArrow.visible(!1), this.stage.container().style.cursor = "default", this.isDragging = !1, this.calculateLinks(), document.removeEventListener("mousemove", d), document.removeEventListener("mouseup", m);
5360
- }, p = (u) => {
5361
- u.key === "Escape" && (this.templateArrow.visible(!1), this.stage.container().style.cursor = "default", this.isDragging = !1, document.removeEventListener("mousemove", d), document.removeEventListener("mouseup", m), document.removeEventListener("keydown", p));
5575
+ this.templateArrow.visible(!1), this.stage.container().style.cursor = "default", this.isDragging = !1, this.calculateLinks(), document.removeEventListener("mousemove", u), document.removeEventListener("mouseup", p);
5576
+ }, m = (d) => {
5577
+ d.key === "Escape" && (this.templateArrow.visible(!1), this.stage.container().style.cursor = "default", this.isDragging = !1, document.removeEventListener("mousemove", u), document.removeEventListener("mouseup", p), document.removeEventListener("keydown", m));
5362
5578
  };
5363
- document.addEventListener("mousemove", d), document.addEventListener("mouseup", m), document.addEventListener("keydown", p);
5579
+ document.addEventListener("mousemove", u), document.addEventListener("mouseup", p), document.addEventListener("keydown", m);
5364
5580
  }
5365
5581
  /**
5366
5582
  * 按照位置获取任务
@@ -5381,7 +5597,7 @@ class Be {
5381
5597
  return j(n) && (n = n(
5382
5598
  t.getEmitData(),
5383
5599
  this.context.store.getDataManager().getTaskById(e).getEmitData()
5384
- )), mt(n) ? i = s = n : U(n) && (i = n === "S", s = n === "F"), {
5600
+ )), pt(n) ? i = s = n : X(n) && (i = n === "S", s = n === "F"), {
5385
5601
  allowLeft: i,
5386
5602
  allowRight: s
5387
5603
  };
@@ -5390,18 +5606,18 @@ class Be {
5390
5606
  * 操作高亮关联线
5391
5607
  */
5392
5608
  handleHighlight(t, e, i, s, n, o, r = !1) {
5393
- const l = t.findOne("Circle"), c = t.findOne("Arrow"), g = t.findOne("Line");
5394
- l && new v.Tween({
5395
- node: l,
5609
+ const h = t.findOne("Circle"), l = t.findOne("Arrow"), g = t.findOne("Line");
5610
+ h && new y.Tween({
5611
+ node: h,
5396
5612
  radius: e + o,
5397
5613
  duration: r ? 0 : 0.1
5398
- }).play(), c && new v.Tween({
5399
- node: c,
5614
+ }).play(), l && new y.Tween({
5615
+ node: l,
5400
5616
  pointerWidth: i + o,
5401
5617
  pointerLength: s + o,
5402
5618
  strokeWidth: n + o,
5403
5619
  duration: r ? 0 : 0.1
5404
- }).play(), g && new v.Tween({
5620
+ }).play(), g && new y.Tween({
5405
5621
  node: g,
5406
5622
  strokeWidth: n + o,
5407
5623
  duration: r ? 0 : 0.1
@@ -5419,18 +5635,18 @@ class Be {
5419
5635
  /** 操作创建点的高亮 */
5420
5636
  handlePointHighlight(t, e) {
5421
5637
  const i = this.pointGroup.findOne(`#point-${t}-left`), s = this.pointGroup.findOne(`#point-${t}-right`);
5422
- i && new v.Tween({
5638
+ i && new y.Tween({
5423
5639
  node: i,
5424
5640
  opacity: e,
5425
5641
  duration: 0.1
5426
- }).play(), s && new v.Tween({
5642
+ }).play(), s && new y.Tween({
5427
5643
  node: s,
5428
5644
  opacity: e,
5429
5645
  duration: 0.1
5430
5646
  }).play();
5431
5647
  }
5432
5648
  }
5433
- class ze {
5649
+ class Pe {
5434
5650
  constructor(t, e, i) {
5435
5651
  a(this, "tasks", []);
5436
5652
  a(this, "chartBaselineGroup");
@@ -5441,7 +5657,7 @@ class ze {
5441
5657
  a(this, "height", 0);
5442
5658
  a(this, "offsetX", 0);
5443
5659
  a(this, "offsetY", 0);
5444
- this.context = t, this.stage = e, this.layer = i, this.chartBaselineGroup = new v.Group({ name: "chart-baseline-group" }), this.baselineGroup = new v.Group({ name: "baseline-group" }), this.chartBaselineGroup.add(this.baselineGroup), this.indicatorGroup = new v.Group({ name: "baseline-indicator-group" }), this.chartBaselineGroup.add(this.indicatorGroup), this.layer.add(this.chartBaselineGroup), this.registerEvents();
5660
+ this.context = t, this.stage = e, this.layer = i, this.chartBaselineGroup = new y.Group({ name: "chart-baseline-group" }), this.baselineGroup = new y.Group({ name: "baseline-group" }), this.chartBaselineGroup.add(this.baselineGroup), this.indicatorGroup = new y.Group({ name: "baseline-indicator-group" }), this.chartBaselineGroup.add(this.indicatorGroup), this.layer.add(this.chartBaselineGroup), this.registerEvents();
5445
5661
  }
5446
5662
  /**
5447
5663
  * 注册事件
@@ -5488,155 +5704,155 @@ class ze {
5488
5704
  ), n = this.context.getOptions().baselines.opacity, o = this.context.getOptions().baselines.backgroundColor;
5489
5705
  this.tasks.forEach((r) => {
5490
5706
  if (this.context.store.getOptionManager().unpackFunc(this.context.getOptions().bar.show, r) && this.context.store.getDataManager().isTaskVisible(r)) {
5491
- const l = this.context.store.getDataManager().getBaselinesByTaskId(r.id), c = st(
5707
+ const h = this.context.store.getDataManager().getBaselinesByTaskId(r.id), l = st(
5492
5708
  this.context.getOptions().baselines.height || this.context.store.getOptionManager().unpackFunc(this.context.getOptions().bar.height, r),
5493
5709
  e
5494
5710
  ), g = this.context.getOptions().baselines.offset ?? 0;
5495
- l.forEach((h, d) => {
5496
- if (!h.validate()) return;
5497
- const m = this.context.store.getTimeAxis().getTimeLeft(h.startTime), p = this.context.store.getTimeAxis().getTimeLeft(h.endTime), u = new v.Group({ id: `baseline-group-${h.id}` });
5498
- this.renderBaselineBar(u, r, h, m, p, i, e, c, t, o, n, s, g);
5499
- const x = this.context.getOptions().baselines.compare, w = h.getTimeDiff();
5711
+ h.forEach((c, u) => {
5712
+ if (!c.validate()) return;
5713
+ const p = this.context.store.getTimeAxis().getTimeLeft(c.startTime), m = this.context.store.getTimeAxis().getTimeLeft(c.endTime), d = new y.Group({ id: `baseline-group-${c.id}` });
5714
+ this.renderBaselineBar(d, r, c, p, m, i, e, l, t, o, n, s, g);
5715
+ const x = this.context.getOptions().baselines.compare, w = c.getTimeDiff();
5500
5716
  if (!x.enabled || !w) return;
5501
- const E = x.mode;
5502
- h.highlight && (E === "highlight" || E === "both") && this.renderCompareHighlight(u, r, h, w), d === 0 && (E === "indicator" || E === "both") && this.renderCompareIndicator(r, h, w), this.bindEvents(u, r, h), this.baselineGroup.add(u);
5717
+ const T = x.mode;
5718
+ c.highlight && (T === "highlight" || T === "both") && this.renderCompareHighlight(d, r, c, w), u === 0 && (T === "indicator" || T === "both") && this.renderCompareIndicator(r, c, w), this.bindEvents(d, r, c), this.baselineGroup.add(d);
5503
5719
  });
5504
5720
  }
5505
5721
  });
5506
5722
  }
5507
- renderBaselineBar(t, e, i, s, n, o, r, l, c, g, h, d, m) {
5723
+ renderBaselineBar(t, e, i, s, n, o, r, h, l, g, c, u, p) {
5508
5724
  if (this.context.getOptions().baselines.mode === "shadow") {
5509
- const p = o + r * e.flatIndex - l / 2 + m, u = new v.Rect({
5725
+ const m = o + r * e.flatIndex - h / 2 + p, d = new y.Rect({
5510
5726
  id: `baseline-item-${i.id}`,
5511
5727
  x: s,
5512
- y: p,
5728
+ y: m,
5513
5729
  width: n - s,
5514
- height: l,
5515
- cornerRadius: d,
5730
+ height: h,
5731
+ cornerRadius: u,
5516
5732
  fill: g,
5517
- opacity: h
5733
+ opacity: c
5518
5734
  });
5519
- t.add(u), this.renderText(t, e, i, s, n, p, l);
5735
+ t.add(d), this.renderText(t, e, i, s, n, m, h);
5520
5736
  } else if (this.context.getOptions().baselines.mode === "line") {
5521
- const p = st(this.context.getOptions().baselines.height ?? 5, r);
5522
- let u = c + r * e.flatIndex + m;
5737
+ const m = st(this.context.getOptions().baselines.height ?? 5, r);
5738
+ let d = l + r * e.flatIndex + p;
5523
5739
  const x = this.context.getOptions().baselines.position;
5524
5740
  let w = "";
5525
- x === "top" ? (u += +p / 2, w = "line_top") : x === "center" ? (u += r / 2, w = "line_center") : (u += r - p / 2, w = "line_bottom");
5526
- const E = new v.Line({
5741
+ x === "top" ? (d += +m / 2, w = "line_top") : x === "center" ? (d += r / 2, w = "line_center") : (d += r - m / 2, w = "line_bottom");
5742
+ const T = new y.Line({
5527
5743
  id: `baseline-item-${i.id}`,
5528
- points: [s, u, n, u],
5744
+ points: [s, d, n, d],
5529
5745
  stroke: g,
5530
- opacity: h,
5531
- strokeWidth: p,
5746
+ opacity: c,
5747
+ strokeWidth: m,
5532
5748
  lineCap: "butt",
5533
5749
  lineJoin: "round"
5534
5750
  });
5535
- t.add(E), this.renderText(t, e, i, s, n, u, p, w);
5751
+ t.add(T), this.renderText(t, e, i, s, n, d, m, w);
5536
5752
  }
5537
5753
  }
5538
- renderText(t, e, i, s, n, o, r, l) {
5539
- const c = `chart-baseline-text-${i.id}`;
5754
+ renderText(t, e, i, s, n, o, r, h) {
5755
+ const l = `chart-baseline-text-${i.id}`;
5540
5756
  if ((() => {
5541
- this.baselineGroup.find(`#${c}`) && this.baselineGroup.find(`#${c}`).forEach((w) => w.remove());
5757
+ this.baselineGroup.find(`#${l}`) && this.baselineGroup.find(`#${l}`).forEach((w) => w.remove());
5542
5758
  })(), !this.context.getOptions().baselines.label.show) return;
5543
- const h = this.context.getOptions().baselines.label.field, d = h ? i.getField(h) : i.name;
5544
- if (!d || d === "") return;
5545
- const m = n - s - 10, p = Math.max(this.context.getOptions().baselines.label.fontSize, r), u = new v.Text({
5546
- text: d,
5547
- id: c,
5759
+ const c = this.context.getOptions().baselines.label.field, u = c ? i.getField(c) : i.name;
5760
+ if (!u || u === "") return;
5761
+ const p = n - s - 10, m = Math.max(this.context.getOptions().baselines.label.fontSize, r), d = new y.Text({
5762
+ text: u,
5763
+ id: l,
5548
5764
  x: s + 5,
5549
5765
  y: o,
5550
- width: m,
5551
- height: p,
5766
+ width: p,
5767
+ height: m,
5552
5768
  fill: this.context.getOptions().baselines.label.color,
5553
5769
  fontSize: this.context.getOptions().baselines.label.fontSize,
5554
5770
  fontFamily: this.context.getOptions().baselines.label.fontFamily || "Arial",
5555
5771
  align: this.context.getOptions().baselines.label.position,
5556
5772
  verticalAlign: "bottom"
5557
5773
  });
5558
- l === "line_bottom" ? u.setAttrs({
5559
- y: o - p / 2,
5774
+ h === "line_bottom" ? d.setAttrs({
5775
+ y: o - m / 2,
5560
5776
  verticalAlign: "top"
5561
- }) : l === "line_center" ? u.setAttrs({
5562
- y: o - p / 2,
5777
+ }) : h === "line_center" ? d.setAttrs({
5778
+ y: o - m / 2,
5563
5779
  verticalAlign: "middle"
5564
- }) : l === "line_top" && u.setAttrs({
5780
+ }) : h === "line_top" && d.setAttrs({
5565
5781
  y: o - r / 2,
5566
5782
  verticalAlign: "bottom"
5567
- }), r >= p && u.setAttrs({
5783
+ }), r >= m && d.setAttrs({
5568
5784
  verticalAlign: "middle"
5569
5785
  });
5570
- const x = u.measureSize(d);
5571
- (this.context.getOptions().baselines.label.forceDisplay || m > x.width) && t.add(u);
5786
+ const x = d.measureSize(u);
5787
+ (this.context.getOptions().baselines.label.forceDisplay || p > x.width) && t.add(d);
5572
5788
  }
5573
5789
  renderCompareHighlight(t, e, i, s) {
5574
5790
  const n = s[`${this.context.getOptions().baselines.compare.target}Status`];
5575
5791
  if (!n || n === "ontime") return;
5576
5792
  const o = t.findOne(`#baseline-item-${i.id}`);
5577
5793
  if (!o) return;
5578
- const r = this.context.getOptions().baselines.compare, l = this.context.getOptions().baselines.mode, c = { fill: "", stroke: "", opacity: r[n].opacity };
5579
- if (l === "shadow")
5580
- c.fill = r[n].backgroundColor;
5581
- else if (l === "line")
5582
- c.stroke = r[n].backgroundColor;
5794
+ const r = this.context.getOptions().baselines.compare, h = this.context.getOptions().baselines.mode, l = { fill: "", stroke: "", opacity: r[n].opacity };
5795
+ if (h === "shadow")
5796
+ l.fill = r[n].backgroundColor;
5797
+ else if (h === "line")
5798
+ l.stroke = r[n].backgroundColor;
5583
5799
  else
5584
5800
  return;
5585
- o.setAttrs(c);
5801
+ o.setAttrs(l);
5586
5802
  }
5587
5803
  renderCompareIndicator(t, e, i) {
5588
5804
  const s = this.context.getOptions().baselines, n = s.compare.indicator;
5589
5805
  if (!n || !n.show) return;
5590
- const o = this.context.getOptions().header.height, r = this.context.getOptions().row.height, l = st(
5806
+ const o = this.context.getOptions().header.height, r = this.context.getOptions().row.height, h = st(
5591
5807
  this.context.store.getOptionManager().unpackFunc(this.context.getOptions().bar.height, t),
5592
5808
  r
5593
5809
  );
5594
- let c = s.backgroundColor;
5595
- const g = this.context.store.getTimeAxis().getTimeLeft(t.startTime), h = this.context.store.getTimeAxis().getTimeLeft(t.endTime);
5596
- let d = (r - l) / 2 + r * t.flatIndex + o;
5597
- if (n.position === "bottom" && (d += l), n.show === "start" || n.show === "both" || n.show === !0) {
5598
- const m = i.startStatus;
5599
- if (m && s.compare.indicator[m].show) {
5600
- c = F(s.compare.indicator[m].color).alpha(s.compare.indicator[m].opacity).toHex();
5601
- const p = new v.Circle({
5810
+ let l = s.backgroundColor;
5811
+ const g = this.context.store.getTimeAxis().getTimeLeft(t.startTime), c = this.context.store.getTimeAxis().getTimeLeft(t.endTime);
5812
+ let u = (r - h) / 2 + r * t.flatIndex + o;
5813
+ if (n.position === "bottom" && (u += h), n.show === "start" || n.show === "both" || n.show === !0) {
5814
+ const p = i.startStatus;
5815
+ if (p && s.compare.indicator[p].show) {
5816
+ l = F(s.compare.indicator[p].color).alpha(s.compare.indicator[p].opacity).toHex();
5817
+ const m = new y.Circle({
5602
5818
  x: g - n.size,
5603
- y: d,
5604
- fill: c,
5819
+ y: u,
5820
+ fill: l,
5605
5821
  radius: n.size / 2
5606
5822
  });
5607
- this.indicatorGroup.add(p);
5608
- let u = `${lt(i.startDiff)}${i.unit} ${m}`;
5609
- const x = s.compare.indicator[m].text;
5610
- j(x) ? u = x(i.startDiff, { ...t.getEmitData(), baseline: e }) : U(x) && (u = x);
5611
- const w = new v.Text({
5612
- y: d - n.fontSize / 2,
5613
- text: u,
5614
- fill: c,
5823
+ this.indicatorGroup.add(m);
5824
+ let d = `${lt(i.startDiff)}${i.unit} ${p}`;
5825
+ const x = s.compare.indicator[p].text;
5826
+ j(x) ? d = x(i.startDiff, { ...t.getEmitData(), baseline: e }) : X(x) && (d = x);
5827
+ const w = new y.Text({
5828
+ y: u - n.fontSize / 2,
5829
+ text: d,
5830
+ fill: l,
5615
5831
  fontSize: n.fontSize,
5616
5832
  fontFamily: n.fontFamily || "Arial"
5617
- }), E = w.measureSize(u);
5618
- w.x(g - n.size - E.width - 5), this.indicatorGroup.add(w);
5833
+ }), T = w.measureSize(d);
5834
+ w.x(g - n.size - T.width - 5), this.indicatorGroup.add(w);
5619
5835
  }
5620
5836
  }
5621
5837
  if (n.show === "end" || n.show === "both" || n.show === !0) {
5622
- const m = i.endStatus;
5623
- if (m && s.compare.indicator[m].show) {
5624
- c = F(s.compare.indicator[m].color).alpha(s.compare.indicator[m].opacity).toHex();
5625
- const p = new v.Circle({
5626
- x: h + n.size,
5627
- y: d,
5628
- fill: c,
5838
+ const p = i.endStatus;
5839
+ if (p && s.compare.indicator[p].show) {
5840
+ l = F(s.compare.indicator[p].color).alpha(s.compare.indicator[p].opacity).toHex();
5841
+ const m = new y.Circle({
5842
+ x: c + n.size,
5843
+ y: u,
5844
+ fill: l,
5629
5845
  radius: n.size / 2
5630
5846
  });
5631
- this.indicatorGroup.add(p);
5632
- let u = `${lt(i.endDiff)}${i.unit} ${m}`;
5633
- const x = s.compare.indicator[m].text;
5634
- j(x) ? u = x(i.endDiff, { ...t.getEmitData(), baseline: e }) : U(x) && (u = x);
5635
- const w = new v.Text({
5636
- x: h + n.size + 5,
5637
- y: d - n.fontSize / 2,
5638
- text: u,
5639
- fill: c,
5847
+ this.indicatorGroup.add(m);
5848
+ let d = `${lt(i.endDiff)}${i.unit} ${p}`;
5849
+ const x = s.compare.indicator[p].text;
5850
+ j(x) ? d = x(i.endDiff, { ...t.getEmitData(), baseline: e }) : X(x) && (d = x);
5851
+ const w = new y.Text({
5852
+ x: c + n.size + 5,
5853
+ y: u - n.fontSize / 2,
5854
+ text: d,
5855
+ fill: l,
5640
5856
  fontSize: n.fontSize,
5641
5857
  fontFamily: n.fontFamily || "Arial"
5642
5858
  });
@@ -5646,15 +5862,15 @@ class ze {
5646
5862
  }
5647
5863
  bindEvents(t, e, i) {
5648
5864
  t.on("mouseover", (s) => {
5649
- this.context.event.emit(y.BASELINE_MOUSEOVER, s.evt, e, i);
5865
+ this.context.event.emit(S.BASELINE_MOUSEOVER, s.evt, e, i);
5650
5866
  }), t.on("mouseout", (s) => {
5651
- this.context.event.emit(y.BASELINE_MOUSEOUT, s.evt, e, i);
5867
+ this.context.event.emit(S.BASELINE_MOUSEOUT, s.evt, e, i);
5652
5868
  }), t.on("click", (s) => {
5653
- s.cancelBubble = !0, s.evt.button === 0 ? this.context.event.emit(y.BASELINE_CLICK, s.evt, e, i) : s.evt.button === 2 && this.context.event.emit(y.BASELINE_CONTEXTMENU, s.evt, e, i);
5869
+ s.cancelBubble = !0, s.evt.button === 0 ? this.context.event.emit(S.BASELINE_CLICK, s.evt, e, i) : s.evt.button === 2 && this.context.event.emit(S.BASELINE_CONTEXTMENU, s.evt, e, i);
5654
5870
  });
5655
5871
  }
5656
5872
  }
5657
- class Pe {
5873
+ class Ye {
5658
5874
  constructor(t, e) {
5659
5875
  // Konva 元素
5660
5876
  a(this, "stage");
@@ -5663,6 +5879,7 @@ class Pe {
5663
5879
  a(this, "gridGroup");
5664
5880
  a(this, "weekendGroup");
5665
5881
  a(this, "holidayGroup");
5882
+ a(this, "flagGroup");
5666
5883
  a(this, "todayLayer");
5667
5884
  a(this, "linkGroup");
5668
5885
  a(this, "baselineGroup");
@@ -5670,15 +5887,15 @@ class Pe {
5670
5887
  a(this, "bodyLayer");
5671
5888
  a(this, "width", 0);
5672
5889
  a(this, "height", 0);
5673
- this.context = t, this.container = e, this.stage = new v.Stage({
5890
+ this.context = t, this.container = e, this.stage = new y.Stage({
5674
5891
  container: this.container,
5675
5892
  width: this.container.clientWidth,
5676
5893
  height: this.container.clientHeight
5677
- }), this.bgLayer = new v.Layer(), this.weekendGroup = new We(this.context, this.bgLayer), this.holidayGroup = new Fe(this.context, this.bgLayer), this.gridGroup = new Ae(this.context, this.bgLayer), this.stage.add(this.bgLayer), this.headerLayer = new He(this.context, this.stage), this.todayLayer = new $e(
5894
+ }), this.bgLayer = new y.Layer(), this.weekendGroup = new We(this.context, this.bgLayer), this.holidayGroup = new Fe(this.context, this.bgLayer), this.flagGroup = new Be(this.context, this.bgLayer), this.gridGroup = new Ae(this.context, this.bgLayer), this.stage.add(this.bgLayer), this.headerLayer = new He(this.context, this.stage), this.todayLayer = new $e(
5678
5895
  this.context,
5679
5896
  this.bgLayer,
5680
5897
  this.headerLayer.layer
5681
- ), this.bodyLayer = new v.Layer(), this.linkGroup = new Be(this.context, this.stage, this.bodyLayer), this.baselineGroup = new ze(this.context, this.stage, this.bodyLayer), this.bodyGroup = new Re(
5898
+ ), this.bodyLayer = new y.Layer(), this.linkGroup = new ze(this.context, this.stage, this.bodyLayer), this.baselineGroup = new Pe(this.context, this.stage, this.bodyLayer), this.bodyGroup = new Re(
5682
5899
  this.context,
5683
5900
  this.stage,
5684
5901
  this.bodyLayer,
@@ -5689,10 +5906,10 @@ class Pe {
5689
5906
  * 调整大小
5690
5907
  */
5691
5908
  resize(t, e) {
5692
- this.width = t, this.height = e, this.context.store.getTimeAxis().setAllWidth(t), this.stage.width(t), this.stage.height(e), this.headerLayer.resize(t), this.gridGroup.resize(t, e), this.linkGroup.resize(t, e), this.baselineGroup.resize(t, e), this.holidayGroup.resize(t, e), this.weekendGroup.resize(t, e), this.bodyGroup.resize(t, e), this.todayLayer.resize(t, e);
5909
+ this.width = t, this.height = e, this.context.store.getTimeAxis().setAllWidth(t), this.stage.width(t), this.stage.height(e), this.headerLayer.resize(t), this.gridGroup.resize(t, e), this.linkGroup.resize(t, e), this.baselineGroup.resize(t, e), this.holidayGroup.resize(t, e), this.flagGroup.resize(t, e), this.weekendGroup.resize(t, e), this.bodyGroup.resize(t, e), this.todayLayer.resize(t, e);
5693
5910
  }
5694
5911
  render(t, e, i) {
5695
- this.headerLayer.setOffset(-t, 0), this.gridGroup.setOffset(-t, -e), this.linkGroup.setOffset(-t, -e), this.baselineGroup.setOffset(-t, -e), this.weekendGroup.setOffset(-t, -e), this.holidayGroup.setOffset(-t, -e), this.bodyGroup.setOffset(-t, -e), this.todayLayer.setOffset(-t, -e), this.gridGroup.render(), this.holidayGroup.render(), this.weekendGroup.render(), this.linkGroup.render(i), this.baselineGroup.render(i), this.bodyGroup.render(i), this.headerLayer.render(), this.todayLayer.render();
5912
+ this.headerLayer.setOffset(-t, 0), this.gridGroup.setOffset(-t, -e), this.linkGroup.setOffset(-t, -e), this.baselineGroup.setOffset(-t, -e), this.weekendGroup.setOffset(-t, -e), this.holidayGroup.setOffset(-t, -e), this.flagGroup.setOffset(-t, -e), this.bodyGroup.setOffset(-t, -e), this.todayLayer.setOffset(-t, -e), this.gridGroup.render(), this.holidayGroup.render(), this.flagGroup.render(), this.weekendGroup.render(), this.linkGroup.render(i), this.baselineGroup.render(i), this.bodyGroup.render(i), this.headerLayer.render(), this.todayLayer.render();
5696
5913
  }
5697
5914
  /**
5698
5915
  * 刷新图表(用于滚动或局部更新时的高效渲染)
@@ -5707,11 +5924,11 @@ class Pe {
5707
5924
  this.bodyGroup.updateTask(t), this.linkGroup.update(), this.baselineGroup.update();
5708
5925
  }
5709
5926
  destroy() {
5710
- this.headerLayer.destroy(), this.gridGroup.destroy(), this.bodyLayer.destroy(), this.todayLayer.destroy(), this.holidayGroup.destroy(), this.weekendGroup.destroy(), this.linkGroup.destroy(), this.baselineGroup.destroy(), this.bgLayer.destroy(), this.stage.destroy();
5927
+ this.headerLayer.destroy(), this.gridGroup.destroy(), this.bodyLayer.destroy(), this.todayLayer.destroy(), this.holidayGroup.destroy(), this.flagGroup.destroy(), this.weekendGroup.destroy(), this.linkGroup.destroy(), this.baselineGroup.destroy(), this.bgLayer.destroy(), this.stage.destroy();
5711
5928
  }
5712
5929
  }
5713
- const Ye = '<svg style="transition: all 0.3s" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="none" fill-rule="evenodd"><path d="M24 0v24H0V0zM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.019-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"/><path fill="currentColor" d="M8.293 12.707a1 1 0 0 1 0-1.414l5.657-5.657a1 1 0 1 1 1.414 1.414L10.414 12l4.95 4.95a1 1 0 0 1-1.414 1.414z"/></g></svg>';
5714
- class Ne {
5930
+ const Ne = '<svg style="transition: all 0.3s" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="none" fill-rule="evenodd"><path d="M24 0v24H0V0zM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.019-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"/><path fill="currentColor" d="M8.293 12.707a1 1 0 0 1 0-1.414l5.657-5.657a1 1 0 1 1 1.414 1.414L10.414 12l4.95 4.95a1 1 0 0 1-1.414 1.414z"/></g></svg>';
5931
+ class Ue {
5715
5932
  constructor(t, e) {
5716
5933
  a(this, "line");
5717
5934
  a(this, "initialX", 0);
@@ -5721,7 +5938,7 @@ class Ne {
5721
5938
  "border-left-color",
5722
5939
  this.root.store.getOptionManager().getOptions().border.color,
5723
5940
  "important"
5724
- ), this.line.style.cursor = "col-resize", this.collapseButton = document.createElement("div"), this.collapseButton.className = "x-gantt-collapse-button", this.collapseButton.style.position = "absolute", this.collapseButton.style.top = "50%", this.collapseButton.style.left = "0", this.collapseButton.style.transform = "translateY(-50%)", this.collapseButton.style.cursor = "pointer", this.collapseButton.style.width = "16px", this.collapseButton.style.height = "30px", this.collapseButton.style.backgroundColor = "#fff", this.collapseButton.style.borderRadius = "0 6px 6px 0", this.collapseButton.style.boxShadow = "0 0 2px rgba(0, 0, 0, 0.2)", this.collapseButton.style.display = "flex", this.collapseButton.style.alignItems = "center", this.collapseButton.style.justifyContent = "center", this.collapseButton.innerHTML = Ye, this.collapseButton.addEventListener("click", (i) => {
5941
+ ), this.line.style.cursor = "col-resize", this.collapseButton = document.createElement("div"), this.collapseButton.className = "x-gantt-collapse-button", this.collapseButton.style.position = "absolute", this.collapseButton.style.top = "50%", this.collapseButton.style.left = "0", this.collapseButton.style.transform = "translateY(-50%)", this.collapseButton.style.cursor = "pointer", this.collapseButton.style.width = "16px", this.collapseButton.style.height = "30px", this.collapseButton.style.backgroundColor = "#fff", this.collapseButton.style.borderRadius = "0 6px 6px 0", this.collapseButton.style.boxShadow = "0 0 2px rgba(0, 0, 0, 0.2)", this.collapseButton.style.display = "flex", this.collapseButton.style.alignItems = "center", this.collapseButton.style.justifyContent = "center", this.collapseButton.innerHTML = Ne, this.collapseButton.addEventListener("click", (i) => {
5725
5942
  i.stopPropagation(), this.root.store.getColumnManager().collapse();
5726
5943
  }), this.line.appendChild(this.collapseButton), this.container.appendChild(this.line), this.addDragEvents();
5727
5944
  }
@@ -5733,29 +5950,29 @@ class Ne {
5733
5950
  */
5734
5951
  addDragEvents() {
5735
5952
  let t = 0, e = null;
5736
- const i = this.root.store.getColumnManager(), s = i.getLeafColumns(), n = (l) => {
5737
- l.preventDefault(), l.stopPropagation(), t = l.clientX, e = this.container.getBoundingClientRect();
5738
- const c = s[s.length - 1].key;
5739
- this.initialWidth = i.getColumnWidth(c);
5953
+ const i = this.root.store.getColumnManager(), s = i.getLeafColumns(), n = (h) => {
5954
+ h.preventDefault(), h.stopPropagation(), t = h.clientX, e = this.container.getBoundingClientRect();
5955
+ const l = s[s.length - 1].key;
5956
+ this.initialWidth = i.getColumnWidth(l);
5740
5957
  const g = parseInt(this.line.style.left) + 2;
5741
- this.root.event.emit(y.SHOW_GUIDELINE, g);
5742
- const h = (m) => o(m), d = (m) => r(m, h, d);
5743
- document.addEventListener("mousemove", h), document.addEventListener("mouseup", d);
5744
- }, o = (l) => {
5745
- if (l.preventDefault(), !e) return;
5746
- const c = l.clientX - t;
5958
+ this.root.event.emit(S.SHOW_GUIDELINE, g);
5959
+ const c = (p) => o(p), u = (p) => r(p, c, u);
5960
+ document.addEventListener("mousemove", c), document.addEventListener("mouseup", u);
5961
+ }, o = (h) => {
5962
+ if (h.preventDefault(), !e) return;
5963
+ const l = h.clientX - t;
5747
5964
  s[s.length - 1].key;
5748
- const g = 50 - this.initialWidth, d = e.width - 20 - this.initialX, m = Math.max(g, Math.min(d, c)), p = this.initialX + m;
5749
- this.root.event.emit(y.MOVE_GUIDELINE, p);
5750
- }, r = (l, c, g) => {
5751
- document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", g), this.root.event.emit(y.HIDE_GUIDELINE);
5752
- const h = l.clientX - t, d = s[s.length - 1].key, m = Math.max(50, this.initialWidth + h);
5753
- i.setColumnWidth(d, m), this.root.event.emit(y.UPDATE_TABLE_HEADER);
5965
+ const g = 50 - this.initialWidth, u = e.width - 20 - this.initialX, p = Math.max(g, Math.min(u, l)), m = this.initialX + p;
5966
+ this.root.event.emit(S.MOVE_GUIDELINE, m);
5967
+ }, r = (h, l, g) => {
5968
+ document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", g), this.root.event.emit(S.HIDE_GUIDELINE);
5969
+ const c = h.clientX - t, u = s[s.length - 1].key, p = Math.max(50, this.initialWidth + c);
5970
+ i.setColumnWidth(u, p), this.root.event.emit(S.UPDATE_TABLE_HEADER);
5754
5971
  };
5755
5972
  this.line.addEventListener("mousedown", n);
5756
5973
  }
5757
5974
  }
5758
- class Ue {
5975
+ class Xe {
5759
5976
  /**
5760
5977
  * @param container 指示线的容器元素
5761
5978
  */
@@ -5781,11 +5998,11 @@ class Ue {
5781
5998
  * 初始化事件监听
5782
5999
  */
5783
6000
  initEvents() {
5784
- this.context.event.on(y.SHOW_GUIDELINE, (t) => {
6001
+ this.context.event.on(S.SHOW_GUIDELINE, (t) => {
5785
6002
  this.show(t);
5786
- }), this.context.event.on(y.HIDE_GUIDELINE, () => {
6003
+ }), this.context.event.on(S.HIDE_GUIDELINE, () => {
5787
6004
  this.hide();
5788
- }), this.context.event.on(y.MOVE_GUIDELINE, (t) => {
6005
+ }), this.context.event.on(S.MOVE_GUIDELINE, (t) => {
5789
6006
  this.setLeft(t);
5790
6007
  });
5791
6008
  }
@@ -5830,7 +6047,7 @@ class Ue {
5830
6047
  return this.element.offsetLeft;
5831
6048
  }
5832
6049
  }
5833
- class Xe {
6050
+ class Ve {
5834
6051
  constructor(t = 16) {
5835
6052
  a(this, "taskQueue", /* @__PURE__ */ new Map());
5836
6053
  // 使用 Map 避免同类型重复任务
@@ -5850,7 +6067,7 @@ class Xe {
5850
6067
  * @param handler 处理器配置
5851
6068
  */
5852
6069
  registerHandler(t, e) {
5853
- this.taskHandlers.set(t, e), L.debug(`RenderScheduler: 注册任务处理器 ${t}`);
6070
+ this.taskHandlers.set(t, e), D.debug(`RenderScheduler: 注册任务处理器 ${t}`);
5854
6071
  }
5855
6072
  /**
5856
6073
  * 注册任务处理器(简化版本,只传回调函数)
@@ -5870,7 +6087,7 @@ class Xe {
5870
6087
  scheduleTask(t, e = [], i = {}) {
5871
6088
  const s = this.taskHandlers.get(t);
5872
6089
  if (!s) {
5873
- L.warn(`RenderScheduler: 未找到任务类型 ${t} 的处理器`);
6090
+ D.warn(`RenderScheduler: 未找到任务类型 ${t} 的处理器`);
5874
6091
  return;
5875
6092
  }
5876
6093
  const n = {
@@ -5881,10 +6098,10 @@ class Xe {
5881
6098
  immediate: i.immediate ?? s.immediate ?? !1
5882
6099
  };
5883
6100
  if (n.immediate) {
5884
- L.debug(`RenderScheduler: 立即执行任务 ${t}`), this.executeTask(n);
6101
+ D.debug(`RenderScheduler: 立即执行任务 ${t}`), this.executeTask(n);
5885
6102
  return;
5886
6103
  }
5887
- this.taskQueue.set(t, n), L.debug(`RenderScheduler: 添加任务到队列 ${t}`), this.debouncedFlush();
6104
+ this.taskQueue.set(t, n), D.debug(`RenderScheduler: 添加任务到队列 ${t}`), this.debouncedFlush();
5888
6105
  }
5889
6106
  /**
5890
6107
  * 立即执行指定类型的任务(跳过队列)
@@ -5895,10 +6112,10 @@ class Xe {
5895
6112
  immediateExecuteTask(t, e = [], i = !1) {
5896
6113
  const s = this.taskHandlers.get(t);
5897
6114
  if (!s) {
5898
- L.warn(`RenderScheduler: 未找到任务类型 ${t} 的处理器`);
6115
+ D.warn(`RenderScheduler: 未找到任务类型 ${t} 的处理器`);
5899
6116
  return;
5900
6117
  }
5901
- L.debug(`RenderScheduler: 立即执行任务 ${t}`);
6118
+ D.debug(`RenderScheduler: 立即执行任务 ${t}`);
5902
6119
  const n = {
5903
6120
  type: t,
5904
6121
  refresh: i,
@@ -5912,7 +6129,7 @@ class Xe {
5912
6129
  * 立即执行所有队列中的任务
5913
6130
  */
5914
6131
  immediateFlushAll() {
5915
- L.debug("RenderScheduler: 立即执行所有队列任务"), this.cancelScheduled(), this.flushTaskQueue();
6132
+ D.debug("RenderScheduler: 立即执行所有队列任务"), this.cancelScheduled(), this.flushTaskQueue();
5916
6133
  }
5917
6134
  /**
5918
6135
  * 执行单个任务
@@ -5922,7 +6139,7 @@ class Xe {
5922
6139
  try {
5923
6140
  t.callback(...t.args || []);
5924
6141
  } catch (e) {
5925
- L.error(`RenderScheduler: 执行任务 ${t.type} 时出错:`, e);
6142
+ D.error(`RenderScheduler: 执行任务 ${t.type} 时出错:`, e);
5926
6143
  }
5927
6144
  }
5928
6145
  /**
@@ -5931,7 +6148,7 @@ class Xe {
5931
6148
  flushTaskQueue() {
5932
6149
  if (this.taskQueue.size === 0)
5933
6150
  return;
5934
- L.debug(
6151
+ D.debug(
5935
6152
  `RenderScheduler: 执行任务队列,任务数量: ${this.taskQueue.size}`
5936
6153
  );
5937
6154
  const t = Array.from(this.taskQueue.values()).sort((e, i) => e.immediate !== i.immediate ? e.immediate ? -1 : 1 : e.refresh !== i.refresh ? e.refresh ? -1 : 1 : 0);
@@ -5950,7 +6167,7 @@ class Xe {
5950
6167
  * @param taskType 任务类型
5951
6168
  */
5952
6169
  unregisterHandler(t) {
5953
- this.taskHandlers.delete(t), this.taskQueue.delete(t), L.debug(`RenderScheduler: 移除任务处理器 ${t}`);
6170
+ this.taskHandlers.delete(t), this.taskQueue.delete(t), D.debug(`RenderScheduler: 移除任务处理器 ${t}`);
5954
6171
  }
5955
6172
  /**
5956
6173
  * 获取当前队列中的任务数量
@@ -5968,10 +6185,10 @@ class Xe {
5968
6185
  * 销毁调度器
5969
6186
  */
5970
6187
  destroy() {
5971
- this.cancelScheduled(), this.taskHandlers.clear(), L.debug("RenderScheduler: 已销毁");
6188
+ this.cancelScheduled(), this.taskHandlers.clear(), D.debug("RenderScheduler: 已销毁");
5972
6189
  }
5973
6190
  }
5974
- class Ve {
6191
+ class Ke {
5975
6192
  constructor(t, e) {
5976
6193
  a(this, "scrollbar");
5977
6194
  a(this, "rootElement");
@@ -6039,12 +6256,12 @@ class Ve {
6039
6256
  a(this, "handleColumnWidthChange", () => {
6040
6257
  this.table.updateWidth(), this.updateSize();
6041
6258
  });
6042
- this.context = t, this.container = e, this.rootElement = document.createElement("div"), this.rootElement.id = `x-gantt-${this._id}`, this.rootElement.className = "x-gantt", this.rootElement.style.overflow = "hidden", this.rootElement.style.display = "flex", this.rootElement.style.position = "relative", this.container.appendChild(this.rootElement), this.tableContainer = document.createElement("div"), this.tableContainer.className = "x-gantt-table", this.rootElement.appendChild(this.tableContainer), new Ue(this.context, this.container), this.middleLine = new Ne(this.context, this.rootElement), this.chartContainer = document.createElement("div"), this.chartContainer.className = "x-gantt-chart", this.rootElement.appendChild(this.chartContainer), this.table = new _e(this.context, this.tableContainer), this.chart = new Pe(this.context, this.chartContainer), this.scrollbar = new Le(
6259
+ this.context = t, this.container = e, this.rootElement = document.createElement("div"), this.rootElement.id = `x-gantt-${this._id}`, this.rootElement.className = "x-gantt", this.rootElement.style.overflow = "hidden", this.rootElement.style.display = "flex", this.rootElement.style.position = "relative", this.container.appendChild(this.rootElement), this.tableContainer = document.createElement("div"), this.tableContainer.className = "x-gantt-table", this.rootElement.appendChild(this.tableContainer), new Xe(this.context, this.container), this.middleLine = new Ue(this.context, this.rootElement), this.chartContainer = document.createElement("div"), this.chartContainer.className = "x-gantt-chart", this.rootElement.appendChild(this.chartContainer), this.table = new _e(this.context, this.tableContainer), this.chart = new Ye(this.context, this.chartContainer), this.scrollbar = new Le(
6043
6260
  this.context,
6044
6261
  this.rootElement,
6045
6262
  this.context.store.getOptionManager().getOptions().scrollbar || {}
6046
6263
  // 传入配置项
6047
- ), this.renderScheduler = new Xe(16), this.setupTaskHandlers(), this.updateSize(), this.setupEventListeners();
6264
+ ), this.renderScheduler = new Ve(16), this.setupTaskHandlers(), this.updateSize(), this.setupEventListeners();
6048
6265
  }
6049
6266
  getScrollbar() {
6050
6267
  return this.scrollbar;
@@ -6082,21 +6299,21 @@ class Ve {
6082
6299
  * 设置事件监听器
6083
6300
  */
6084
6301
  setupEventListeners() {
6085
- this.context.event.on(y.DATA_UPDATE, () => {
6302
+ this.context.event.on(S.DATA_UPDATE, () => {
6086
6303
  this.renderScheduler.scheduleTask("DATA_UPDATE", [!0]);
6087
- }), this.context.event.on(y.SCROLL, () => {
6304
+ }), this.context.event.on(S.SCROLL, () => {
6088
6305
  this.renderScheduler.scheduleTask("SCROLL", [!0], { immediate: !0 });
6089
- }), this.context.event.on(y.COLUMN_WIDTH_CHANGE, () => {
6306
+ }), this.context.event.on(S.COLUMN_WIDTH_CHANGE, () => {
6090
6307
  this.renderScheduler.scheduleTask("COLUMN_WIDTH_CHANGE");
6091
- }), this.context.event.on(y.VIEW_UPDATE, () => {
6308
+ }), this.context.event.on(S.VIEW_UPDATE, () => {
6092
6309
  this.renderScheduler.scheduleTask("VIEW_UPDATE", [!0]);
6093
- }), this.context.event.on(y.UPDATE_TASK, (t) => {
6310
+ }), this.context.event.on(S.UPDATE_TASK, (t) => {
6094
6311
  this.renderScheduler.scheduleTask("UPDATE_TASK", [t], {
6095
6312
  immediate: !0
6096
6313
  });
6097
- }), this.context.event.on(y.CHART_OFFSET_CHANGE, () => {
6314
+ }), this.context.event.on(S.CHART_OFFSET_CHANGE, () => {
6098
6315
  this.renderScheduler.scheduleTask("CHART_OFFSET_CHANGE", [!1]);
6099
- }), this.context.event.on(y.TOGGLE_COLLAPSE, () => {
6316
+ }), this.context.event.on(S.TOGGLE_COLLAPSE, () => {
6100
6317
  this.renderScheduler.scheduleTask("CHART_OFFSET_CHANGE", [!1]);
6101
6318
  });
6102
6319
  }
@@ -6106,8 +6323,8 @@ class Ve {
6106
6323
  */
6107
6324
  performRender(t = !1) {
6108
6325
  this.setStyleValue();
6109
- const { x: e, y: i } = this.scrollbar.getScrollPosition(), s = this.context.store.getOptionManager().getOptions().row.height, n = this.context.store.getOptionManager().getOptions().header.height, o = Math.floor(i / s), r = Math.ceil((this.height - n) / s), l = 2, c = Math.max(0, o), g = r + l, h = this.context.store.getDataManager().getVisibleTasks().slice(c, c + g);
6110
- this.updateSize(), t ? (this.table.refresh(i, h), this.chart.refresh(e, i, h)) : (this.table.render(i, h), this.chart.render(e, i, h)), this.isInitialized && (this.context.event.emit(y.LOADED), this.isInitialized = !1), L.debug("execute render");
6326
+ const { x: e, y: i } = this.scrollbar.getScrollPosition(), s = this.context.store.getOptionManager().getOptions().row.height, n = this.context.store.getOptionManager().getOptions().header.height, o = Math.floor(i / s), r = Math.ceil((this.height - n) / s), h = 2, l = Math.max(0, o), g = r + h, c = this.context.store.getDataManager().getVisibleTasks().slice(l, l + g);
6327
+ this.updateSize(), t ? (this.table.refresh(i, c), this.chart.refresh(e, i, c)) : (this.table.render(i, c), this.chart.render(e, i, c)), this.isInitialized && (this.context.event.emit(S.LOADED), this.isInitialized = !1), D.debug("execute render");
6111
6328
  }
6112
6329
  /**
6113
6330
  * 公共渲染方法,向后兼容
@@ -6128,16 +6345,16 @@ class Ve {
6128
6345
  );
6129
6346
  }
6130
6347
  destroy() {
6131
- L.debug("Renderer destroy"), this.renderScheduler.destroy(), this.scrollbar.destroy(), this.context.event.offAll();
6348
+ D.debug("Renderer destroy"), this.renderScheduler.destroy(), this.scrollbar.destroy(), this.context.event.offAll();
6132
6349
  }
6133
6350
  }
6134
- class Ke {
6351
+ class je {
6135
6352
  constructor(t, e, i) {
6136
6353
  a(this, "_id", Z());
6137
6354
  a(this, "store");
6138
6355
  a(this, "event", new Xt());
6139
6356
  a(this, "renderer");
6140
- this.container = t, this.events = e, this.container.innerHTML = "", this.store = new Me(this, i), this.renderer = new Ve(this, this.container), this.render(), this.registerEvents(), L.debug(
6357
+ this.container = t, this.events = e, this.container.innerHTML = "", this.store = new Me(this, i), this.renderer = new Ke(this, this.container), this.render(), this.registerEvents(), D.debug(
6141
6358
  "----Gantt initialized for element:",
6142
6359
  this._id,
6143
6360
  this.container
@@ -6158,10 +6375,10 @@ class Ke {
6158
6375
  this.renderer.render();
6159
6376
  }
6160
6377
  updateOptions(t, e) {
6161
- this.setOptions(t, e), L.debug("GanttChart options updated"), this.render();
6378
+ this.setOptions(t, e), D.debug("GanttChart options updated"), this.render();
6162
6379
  }
6163
6380
  destroy() {
6164
- L.debug("Gantt destroying..."), this.event.offAll(), this.renderer.destroy(), this.container.innerHTML = "";
6381
+ D.debug("Gantt destroying..."), this.event.offAll(), this.renderer.destroy(), this.container.innerHTML = "";
6165
6382
  }
6166
6383
  /**
6167
6384
  * 跳转到指定日期。默认为今天
@@ -6186,11 +6403,11 @@ class Ke {
6186
6403
  }
6187
6404
  // 注册对外事件
6188
6405
  registerEvents() {
6189
- this.event.on(y.ERROR, (t) => {
6406
+ this.event.on(S.ERROR, (t) => {
6190
6407
  this._emit("error", t);
6191
- }), this.event.on(y.LOADED, () => {
6408
+ }), this.event.on(S.LOADED, () => {
6192
6409
  this._emit("loaded");
6193
- }), this.event.on(y.TASK_DRAG_END, (t, e) => {
6410
+ }), this.event.on(S.TASK_DRAG_END, (t, e) => {
6194
6411
  this._emit(
6195
6412
  "move",
6196
6413
  e.map((i) => {
@@ -6201,57 +6418,57 @@ class Ke {
6201
6418
  };
6202
6419
  })
6203
6420
  );
6204
- }), this.event.on(y.CHECK_TASK, (t, e) => {
6421
+ }), this.event.on(S.CHECK_TASK, (t, e) => {
6205
6422
  this._emit(
6206
6423
  "select",
6207
6424
  t.map((i) => i.data),
6208
6425
  e,
6209
6426
  this.store.getDataManager().getCheckedList().map((i) => i.data)
6210
6427
  );
6211
- }), this.event.on(y.UPDATE_LINK, (t) => {
6428
+ }), this.event.on(S.UPDATE_LINK, (t) => {
6212
6429
  this._emit("update:link", t);
6213
- }), this.event.on(y.CREATE_LINK, (t) => {
6430
+ }), this.event.on(S.CREATE_LINK, (t) => {
6214
6431
  this._emit("create:link", t);
6215
6432
  }), this.event.on(
6216
- y.SELECT_LINK,
6433
+ S.SELECT_LINK,
6217
6434
  (t, e, i) => {
6218
6435
  this._emit("select:link", t, e, i);
6219
6436
  }
6220
- ), this.event.on(y.CONTEXT_LINK, (t, e) => {
6437
+ ), this.event.on(S.CONTEXT_LINK, (t, e) => {
6221
6438
  this._emit("contextmenu:link", t, e);
6222
- }), this.event.on(y.ROW_CLICK, (t, e) => {
6439
+ }), this.event.on(S.ROW_CLICK, (t, e) => {
6223
6440
  this._emit("click:row", t, e.data);
6224
- }), this.event.on(y.ROW_DBL_CLICK, (t, e) => {
6441
+ }), this.event.on(S.ROW_DBL_CLICK, (t, e) => {
6225
6442
  this._emit("dblclick:row", t, e.data);
6226
- }), this.event.on(y.ROW_CONTEXTMENU, (t, e) => {
6443
+ }), this.event.on(S.ROW_CONTEXTMENU, (t, e) => {
6227
6444
  this._emit("contextmenu:row", t, e.data);
6228
- }), this.event.on(y.SLIDER_CLICK, (t, e) => {
6445
+ }), this.event.on(S.SLIDER_CLICK, (t, e) => {
6229
6446
  this._emit("click:slider", t, e.data);
6230
- }), this.event.on(y.SLIDER_DBL_CLICK, (t, e) => {
6447
+ }), this.event.on(S.SLIDER_DBL_CLICK, (t, e) => {
6231
6448
  this._emit("dblclick:slider", t, e.data);
6232
- }), this.event.on(y.SLIDER_CONTEXTMENU, (t, e) => {
6449
+ }), this.event.on(S.SLIDER_CONTEXTMENU, (t, e) => {
6233
6450
  this._emit("contextmenu:slider", t, e.data);
6234
- }), this.event.on(y.SLIDER_HOVER, (t, e) => {
6451
+ }), this.event.on(S.SLIDER_HOVER, (t, e) => {
6235
6452
  this._emit("hover:slider", t, e.data);
6236
- }), this.event.on(y.SLIDER_LEAVE, (t, e) => {
6453
+ }), this.event.on(S.SLIDER_LEAVE, (t, e) => {
6237
6454
  this._emit("leave:slider", t, e.data);
6238
- }), this.event.on(y.BASELINE_CLICK, (t, e, i) => {
6455
+ }), this.event.on(S.BASELINE_CLICK, (t, e, i) => {
6239
6456
  this._emit("click:baseline", t, e.data, i.data);
6240
- }), this.event.on(y.BASELINE_CONTEXTMENU, (t, e, i) => {
6457
+ }), this.event.on(S.BASELINE_CONTEXTMENU, (t, e, i) => {
6241
6458
  this._emit("contextmenu:baseline", t, e.data, i.data);
6242
- }), this.event.on(y.BASELINE_MOUSEOVER, (t, e, i) => {
6459
+ }), this.event.on(S.BASELINE_MOUSEOVER, (t, e, i) => {
6243
6460
  this._emit("hover:baseline", t, e.data, i.data);
6244
- }), this.event.on(y.BASELINE_MOUSEOUT, (t, e, i) => {
6461
+ }), this.event.on(S.BASELINE_MOUSEOUT, (t, e, i) => {
6245
6462
  this._emit("leave:baseline", t, e.data, i.data);
6246
6463
  });
6247
6464
  }
6248
6465
  }
6249
- class Ze {
6466
+ class ti {
6250
6467
  constructor(t, e) {
6251
6468
  a(this, "context");
6252
6469
  // 管理对外事件
6253
6470
  a(this, "events", /* @__PURE__ */ new Map());
6254
- e != null && e.logLevel && L.setOptions({
6471
+ e != null && e.logLevel && D.setOptions({
6255
6472
  showTimestamp: e.logLevel === "debug",
6256
6473
  level: {
6257
6474
  debug: 1,
@@ -6263,8 +6480,8 @@ class Ze {
6263
6480
  });
6264
6481
  const i = typeof t == "string" ? document.querySelector(t) : t;
6265
6482
  if (!i)
6266
- throw L.exception(`Container ${t} not found or invalid.`);
6267
- i.innerHTML = "", i.classList.add("x-gantt-container"), this.context = new Ke(i, this.events, e);
6483
+ throw D.exception(`Container ${t} not found or invalid.`);
6484
+ i.innerHTML = "", i.classList.add("x-gantt-container"), this.context = new je(i, this.events, e);
6268
6485
  }
6269
6486
  // *** Public API Methods ***/
6270
6487
  /**
@@ -6318,7 +6535,7 @@ class Ze {
6318
6535
  * @description 此方法通常不需要主动调用,初始化以及 `update` 中都会自动更新。 如果你需要强制刷新页面,可以在合适的时候调用此方法
6319
6536
  */
6320
6537
  render() {
6321
- this.context.render(), L.info("Gantt rendered successfully.");
6538
+ this.context.render(), D.info("Gantt rendered successfully.");
6322
6539
  }
6323
6540
  /**
6324
6541
  * 销毁甘特图实例,清理所有资源
@@ -6355,7 +6572,7 @@ class Ze {
6355
6572
  * @warning 销毁后的实例不能再次使用,调用任何方法都可能导致错误
6356
6573
  */
6357
6574
  destroy() {
6358
- L.info("Gantt destroying..."), this.events.clear(), this.context.destroy(), L.info("Gantt destroyed successfully.");
6575
+ D.info("Gantt destroying..."), this.events.clear(), this.context.destroy(), D.info("Gantt destroyed successfully.");
6359
6576
  }
6360
6577
  /**
6361
6578
  * 跳转到指定日期
@@ -6482,11 +6699,11 @@ class Ze {
6482
6699
  }
6483
6700
  }
6484
6701
  Nt();
6485
- const ti = St;
6702
+ const ei = St;
6486
6703
  export {
6487
- Ze as XGantt,
6704
+ ti as XGantt,
6488
6705
  F as colorjs,
6489
- si as dayjs,
6706
+ ni as dayjs,
6490
6707
  Z as generateId,
6491
- ti as version
6708
+ ei as version
6492
6709
  };