@loopstack/loopstack-studio 0.29.5 → 0.30.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.
Files changed (113) hide show
  1. package/dist/_virtual/rolldown_runtime.js +3 -1
  2. package/dist/api/config.js +5 -4
  3. package/dist/api/environments.js +5 -1
  4. package/dist/api/processor.js +4 -1
  5. package/dist/app/EnvironmentEmbedRoot.js +22 -30
  6. package/dist/components/ai-elements/code-block.js +4 -4
  7. package/dist/components/dynamic-form/CodeContent.js +1 -1
  8. package/dist/components/dynamic-form/FormBody.js +1 -1
  9. package/dist/components/motion/FadeIn.js +72 -0
  10. package/dist/components/motion/StreamingText.js +49 -0
  11. package/dist/components/ui/accordion.js +2 -2
  12. package/dist/components/ui-widgets/UiWidget.js +11 -10
  13. package/dist/components/ui-widgets/widgets/AiPromptInput.js +31 -28
  14. package/dist/events/sse-client-events.js +7 -1
  15. package/dist/features/code-explorer/components/FileContentViewer.js +2 -2
  16. package/dist/features/debug/components/WorkflowFlowViewer.js +49 -51
  17. package/dist/features/documents/DocumentRenderer.js +18 -17
  18. package/dist/features/documents/components/DocumentItem.js +42 -20
  19. package/dist/features/documents/components/DocumentList.js +34 -36
  20. package/dist/features/documents/components/DocumentMetadataPills.js +102 -49
  21. package/dist/features/documents/document-details/DocumentDetails.js +577 -377
  22. package/dist/features/documents/document-details/PromptDetails.js +118 -130
  23. package/dist/features/documents/document-details/document-debug-utils.js +100 -0
  24. package/dist/features/documents/renderers/ChoicesRenderer.js +41 -38
  25. package/dist/features/documents/renderers/ConfirmPromptRenderer.js +31 -28
  26. package/dist/features/documents/renderers/DocumentFormRenderer.js +62 -70
  27. package/dist/features/documents/renderers/LlmMessage.js +52 -47
  28. package/dist/features/documents/renderers/TextPromptRenderer.js +32 -29
  29. package/dist/features/documents/renderers/useDocumentTransition.js +4 -4
  30. package/dist/features/feature-registry/FeatureRegistryProvider.js +32 -10
  31. package/dist/features/feature-registry/available-features.js +12 -0
  32. package/dist/features/feature-registry/index.js +2 -1
  33. package/dist/features/file-explorer/components/FileExplorerPanel.js +55 -51
  34. package/dist/features/git/components/GitBranchBadge.js +31 -0
  35. package/dist/features/git/components/GitCommitList.js +46 -0
  36. package/dist/features/git/components/GitRemoteStatus.js +84 -0
  37. package/dist/features/git/components/WorkbenchGitPanel.js +81 -0
  38. package/dist/features/git/git-feature.js +12 -0
  39. package/dist/features/git/hooks/useGit.js +78 -0
  40. package/dist/features/git/index.js +1 -0
  41. package/dist/features/oauth/OAuthPromptRenderer.js +137 -142
  42. package/dist/features/runs/Runs.js +4 -4
  43. package/dist/features/secrets/components/WorkbenchSecretsPanel.js +1 -1
  44. package/dist/features/secrets/renderers/SecretInputRenderer.js +30 -29
  45. package/dist/features/workbench/Workbench.js +25 -33
  46. package/dist/features/workbench/WorkflowItem.js +9 -9
  47. package/dist/features/workbench/WorkflowList.js +61 -62
  48. package/dist/features/workbench/components/NewRunDialog.js +237 -209
  49. package/dist/features/workbench/components/RecentRunItem.js +3 -3
  50. package/dist/features/workbench/components/WorkbenchEnvironmentPanel.js +8 -8
  51. package/dist/features/workbench/components/WorkbenchIconSidebar.js +1 -1
  52. package/dist/features/workbench/components/WorkbenchSidebarShell.js +3 -3
  53. package/dist/features/workbench/components/WorkflowForms.js +11 -10
  54. package/dist/features/workbench/components/WorkflowHistoryItem.js +16 -36
  55. package/dist/features/workbench/components/WorkflowHistoryList.js +19 -17
  56. package/dist/features/workbench/components/buttons/WorkflowButtons.js +3 -3
  57. package/dist/features/workbench/hooks/useLlmStreamingDocuments.js +159 -0
  58. package/dist/features/workbench/hooks/useWorkflowData.js +58 -31
  59. package/dist/features/workbench/index.js +2 -2
  60. package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +53 -53
  61. package/dist/features/workspaces/Workspaces.js +134 -125
  62. package/dist/features/workspaces/components/CreateWorkspace.js +115 -107
  63. package/dist/features/workspaces/components/ExecutionTimeline.js +2 -2
  64. package/dist/features/workspaces/components/WorkflowRunForm.js +127 -104
  65. package/dist/features/workspaces/components/WorkspaceHomePage.js +6 -89
  66. package/dist/features/workspaces/components/workflow-form/ArgumentsView.js +1 -1
  67. package/dist/features/workspaces/components/workflow-form/SelectionView.js +15 -15
  68. package/dist/hooks/index.js +3 -2
  69. package/dist/hooks/query-keys.js +43 -30
  70. package/dist/hooks/useConfig.js +28 -22
  71. package/dist/hooks/useEnvironments.js +27 -2
  72. package/dist/hooks/useProcessor.js +14 -1
  73. package/dist/hooks/useWorkflows.js +4 -4
  74. package/dist/index.d.ts +116 -15
  75. package/dist/index.js +9 -8
  76. package/dist/node_modules/d3/src/index.js +13 -13
  77. package/dist/node_modules/d3-scale/src/continuous.js +16 -16
  78. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-3BPJPVTR.js +43 -43
  79. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-GPEHLZMM.js +270 -270
  80. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAUBKEIU.js +90 -90
  81. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-3OPIFGDE.js +458 -458
  82. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.js +3 -3
  83. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5ZQYHXKU.js +37 -37
  84. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-727SXJPM.js +208 -208
  85. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-KSCS5N6A.js +145 -145
  86. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ND2GUHAM.js +7 -7
  87. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-O5CBEL6O.js +41 -41
  88. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-WU5MYG2G.js +3 -3
  89. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.js +6 -6
  90. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-KO2AKTUF.js +30 -30
  91. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-OG6HWLK6.js +82 -82
  92. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-TEJ5UH35.js +65 -65
  93. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-I6XJVG4X.js +227 -227
  94. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-6RSMTGT7.js +104 -104
  95. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-PVQCEYII.js +104 -104
  96. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-JHISSGLW.js +49 -49
  97. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-W4KKPZXB.js +101 -101
  98. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-5OEKKPKP.js +20 -20
  99. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-3UESZ5HK.js +354 -354
  100. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-AJRCARHV.js +53 -53
  101. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-PNZ67QCA.js +113 -113
  102. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-CIIHVFJN.js +90 -90
  103. package/dist/node_modules/mermaid/dist/mermaid.core.js +156 -156
  104. package/dist/node_modules/motion/dist/es/react.js +9 -2
  105. package/dist/pages/DebugWorkflowDetailsPage.js +2 -2
  106. package/dist/pages/DebugWorkflowsPage.js +76 -106
  107. package/dist/pages/EmbedWorkbenchPage.js +1 -1
  108. package/dist/pages/PreviewWorkbenchPage.js +6 -6
  109. package/dist/pages/WorkbenchPage.js +43 -47
  110. package/dist/pages/WorkflowDebugPage.js +6 -12
  111. package/dist/pages/WorkspacePage.js +40 -66
  112. package/dist/pages/WorkspaceRunsPage.js +24 -31
  113. package/package.json +2 -2
@@ -1,9 +1,9 @@
1
+ import select_default from "../../../../d3-selection/src/select.js";
1
2
  import { __export, __name, log } from "./chunk-AGHRB4JF.js";
2
3
  import is_dark_default from "../../../../khroma/dist/methods/is_dark.js";
3
4
  import lighten_default from "../../../../khroma/dist/methods/lighten.js";
4
5
  import darken_default from "../../../../khroma/dist/methods/darken.js";
5
6
  import { clear, commonDb_exports, getConfig, getConfig2, setupGraphViewbox } from "./chunk-CSCIHK7Q.js";
6
- import select_default from "../../../../d3-selection/src/select.js";
7
7
  import arc_default from "../../../../d3-shape/src/arc.js";
8
8
  import "../../../../d3/src/index.js";
9
9
  import { selectSvgElement } from "./chunk-WU5MYG2G.js";
@@ -12,7 +12,7 @@ var parser = (function() {
12
12
  var e = /* @__PURE__ */ __name(function(e, b, x, S) {
13
13
  for (x ||= {}, S = e.length; S--; x[e[S]] = b);
14
14
  return x;
15
- }, "o"), x = [
15
+ }, "o"), b = [
16
16
  6,
17
17
  11,
18
18
  13,
@@ -147,10 +147,10 @@ var parser = (function() {
147
147
  9: [1, 5]
148
148
  },
149
149
  { 1: [3] },
150
- e(x, [2, 5], { 5: 6 }),
151
- e(x, [2, 2]),
152
- e(x, [2, 3]),
153
- e(x, [2, 4]),
150
+ e(b, [2, 5], { 5: 6 }),
151
+ e(b, [2, 2]),
152
+ e(b, [2, 3]),
153
+ e(b, [2, 4]),
154
154
  {
155
155
  6: [1, 7],
156
156
  10: 8,
@@ -167,8 +167,8 @@ var parser = (function() {
167
167
  23: D,
168
168
  24: O
169
169
  },
170
- e(x, [2, 10], { 1: [2, 1] }),
171
- e(x, [2, 6]),
170
+ e(b, [2, 10], { 1: [2, 1] }),
171
+ e(b, [2, 6]),
172
172
  {
173
173
  12: 21,
174
174
  14: S,
@@ -181,20 +181,20 @@ var parser = (function() {
181
181
  23: D,
182
182
  24: O
183
183
  },
184
- e(x, [2, 8]),
185
- e(x, [2, 9]),
186
- e(x, [2, 11]),
184
+ e(b, [2, 8]),
185
+ e(b, [2, 9]),
186
+ e(b, [2, 11]),
187
187
  { 16: [1, 22] },
188
188
  { 18: [1, 23] },
189
- e(x, [2, 14]),
190
- e(x, [2, 15]),
191
- e(x, [2, 16]),
192
- e(x, [2, 17]),
193
- e(x, [2, 18]),
194
- e(x, [2, 19]),
195
- e(x, [2, 7]),
196
- e(x, [2, 12]),
197
- e(x, [2, 13])
189
+ e(b, [2, 14]),
190
+ e(b, [2, 15]),
191
+ e(b, [2, 16]),
192
+ e(b, [2, 17]),
193
+ e(b, [2, 18]),
194
+ e(b, [2, 19]),
195
+ e(b, [2, 7]),
196
+ e(b, [2, 12]),
197
+ e(b, [2, 13])
198
198
  ],
199
199
  defaultActions: {},
200
200
  parseError: /* @__PURE__ */ __name(function(e, b) {
@@ -205,7 +205,7 @@ var parser = (function() {
205
205
  }
206
206
  }, "parseError"),
207
207
  parse: /* @__PURE__ */ __name(function(e) {
208
- var x = this, S = [0], C = [], w = [null], T = [], E = this.table, D = "", O = 0, k = 0, A = 0, j = 2, M = 1, N = T.slice.call(arguments, 1), P = Object.create(this.lexer), F = { yy: {} };
208
+ var b = this, S = [0], C = [], w = [null], T = [], E = this.table, D = "", O = 0, k = 0, A = 0, j = 2, M = 1, N = T.slice.call(arguments, 1), P = Object.create(this.lexer), F = { yy: {} };
209
209
  for (var I in this.yy) Object.prototype.hasOwnProperty.call(this.yy, I) && (F.yy[I] = this.yy[I]);
210
210
  P.setInput(e, F.yy), F.yy.lexer = P, F.yy.parser = this, P.yylloc === void 0 && (P.yylloc = {});
211
211
  var L = P.yylloc;
@@ -218,7 +218,7 @@ var parser = (function() {
218
218
  __name(z, "popStack");
219
219
  function B() {
220
220
  var e = C.pop() || P.lex() || M;
221
- return typeof e != "number" && (e instanceof Array && (C = e, e = C.pop()), e = x.symbols_[e] || e), e;
221
+ return typeof e != "number" && (e instanceof Array && (C = e, e = C.pop()), e = b.symbols_[e] || e), e;
222
222
  }
223
223
  __name(B, "lex");
224
224
  for (var V, H, U, W, G, K = {}, q, J, Y, X;;) {
@@ -543,9 +543,9 @@ var currentSection = "", currentTaskId = 0, direction = "LR", sections = [], tas
543
543
  }, "addTaskOrg"), compileTasks = /* @__PURE__ */ __name(function() {
544
544
  let e = /* @__PURE__ */ __name(function(e) {
545
545
  return rawTasks[e].processed;
546
- }, "compileTask"), x = !0;
547
- for (let [b, S] of rawTasks.entries()) e(b), x &&= S.processed;
548
- return x;
546
+ }, "compileTask"), b = !0;
547
+ for (let [x, S] of rawTasks.entries()) e(x), b &&= S.processed;
548
+ return b;
549
549
  }, "compileTasks"), timelineDb_default = {
550
550
  clear: clear2,
551
551
  getCommonDb,
@@ -560,23 +560,23 @@ var currentSection = "", currentTaskId = 0, direction = "LR", sections = [], tas
560
560
  }, nodeCount = 0, drawRect = /* @__PURE__ */ __name(function(e, b) {
561
561
  let x = e.append("rect");
562
562
  return x.attr("x", b.x), x.attr("y", b.y), x.attr("fill", b.fill), x.attr("stroke", b.stroke), x.attr("width", b.width), x.attr("height", b.height), x.attr("rx", b.rx), x.attr("ry", b.ry), b.class !== void 0 && x.attr("class", b.class), x;
563
- }, "drawRect"), drawFace = /* @__PURE__ */ __name(function(e, x) {
564
- let S = e.append("circle").attr("cx", x.cx).attr("cy", x.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), C = e.append("g");
565
- C.append("circle").attr("cx", x.cx - 15 / 3).attr("cy", x.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), C.append("circle").attr("cx", x.cx + 15 / 3).attr("cy", x.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
563
+ }, "drawRect"), drawFace = /* @__PURE__ */ __name(function(e, b) {
564
+ let S = e.append("circle").attr("cx", b.cx).attr("cy", b.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), C = e.append("g");
565
+ C.append("circle").attr("cx", b.cx - 15 / 3).attr("cy", b.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), C.append("circle").attr("cx", b.cx + 15 / 3).attr("cy", b.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
566
566
  function w(e) {
567
- let b = arc_default().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(15 / 2).outerRadius(15 / 2.2);
568
- e.append("path").attr("class", "mouth").attr("d", b).attr("transform", "translate(" + x.cx + "," + (x.cy + 2) + ")");
567
+ let x = arc_default().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(15 / 2).outerRadius(15 / 2.2);
568
+ e.append("path").attr("class", "mouth").attr("d", x).attr("transform", "translate(" + b.cx + "," + (b.cy + 2) + ")");
569
569
  }
570
570
  __name(w, "smile");
571
571
  function T(e) {
572
- let b = arc_default().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(15 / 2).outerRadius(15 / 2.2);
573
- e.append("path").attr("class", "mouth").attr("d", b).attr("transform", "translate(" + x.cx + "," + (x.cy + 7) + ")");
572
+ let x = arc_default().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(15 / 2).outerRadius(15 / 2.2);
573
+ e.append("path").attr("class", "mouth").attr("d", x).attr("transform", "translate(" + b.cx + "," + (b.cy + 7) + ")");
574
574
  }
575
575
  __name(T, "sad");
576
576
  function E(e) {
577
- e.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", x.cx - 5).attr("y1", x.cy + 7).attr("x2", x.cx + 5).attr("y2", x.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
577
+ e.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", b.cx - 5).attr("y1", b.cy + 7).attr("x2", b.cx + 5).attr("y2", b.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
578
578
  }
579
- return __name(E, "ambivalent"), x.score > 3 ? w(C) : x.score < 3 ? T(C) : E(C), S;
579
+ return __name(E, "ambivalent"), b.score > 3 ? w(C) : b.score < 3 ? T(C) : E(C), S;
580
580
  }, "drawFace"), drawCircle = /* @__PURE__ */ __name(function(e, b) {
581
581
  let x = e.append("circle");
582
582
  return x.attr("cx", b.cx), x.attr("cy", b.cy), x.attr("class", "actor-" + b.pos), x.attr("fill", b.fill), x.attr("stroke", b.stroke), x.attr("r", b.r), x.class !== void 0 && x.attr("class", x.class), b.title !== void 0 && x.append("title").text(b.title), x;
@@ -585,13 +585,13 @@ var currentSection = "", currentTaskId = 0, direction = "LR", sections = [], tas
585
585
  S.attr("x", b.x), S.attr("y", b.y), S.attr("class", "legend"), S.style("text-anchor", b.anchor), b.class !== void 0 && S.attr("class", b.class);
586
586
  let C = S.append("tspan");
587
587
  return C.attr("x", b.x + b.textMargin * 2), C.text(x), S;
588
- }, "drawText"), drawLabel = /* @__PURE__ */ __name(function(e, x) {
588
+ }, "drawText"), drawLabel = /* @__PURE__ */ __name(function(e, b) {
589
589
  function S(e, b, x, S, C) {
590
590
  return e + "," + b + " " + (e + x) + "," + b + " " + (e + x) + "," + (b + S - C) + " " + (e + x - C * 1.2) + "," + (b + S) + " " + e + "," + (b + S);
591
591
  }
592
592
  __name(S, "genPoints");
593
593
  let C = e.append("polygon");
594
- C.attr("points", S(x.x, x.y, 50, 20, 7)), C.attr("class", "labelBox"), x.y += x.labelMargin, x.x += .5 * x.labelMargin, drawText(e, x);
594
+ C.attr("points", S(b.x, b.y, 50, 20, 7)), C.attr("class", "labelBox"), b.y += b.labelMargin, b.x += .5 * b.labelMargin, drawText(e, b);
595
595
  }, "drawLabel"), drawSection = /* @__PURE__ */ __name(function(e, b, x) {
596
596
  let S = e.append("g"), C = getNoteRect();
597
597
  C.x = b.x, C.y = b.y, C.fill = b.fill, C.width = x.width, C.height = x.height, C.class = "journey-section section-type-" + b.num, C.rx = 3, C.ry = 3, drawRect(S, C), _drawTextCandidateFunc(x)(b.text, S, C.x, C.y, C.width, C.height, { class: "journey-section section-type-" + b.num }, x, b.colour);
@@ -640,47 +640,47 @@ var currentSection = "", currentTaskId = 0, direction = "LR", sections = [], tas
640
640
  C(b.append("text").attr("x", x + w / 2).attr("y", S + T / 2 + 5).style("font-color", D).style("text-anchor", "middle").text(e), E);
641
641
  }
642
642
  __name(e, "byText");
643
- function x(e, b, x, S, w, T, E, D, O) {
643
+ function b(e, b, x, S, w, T, E, D, O) {
644
644
  let { taskFontSize: k, taskFontFamily: A } = D, j = e.split(/<br\s*\/?>/gi);
645
645
  for (let e = 0; e < j.length; e++) {
646
646
  let D = e * k - k * (j.length - 1) / 2, M = b.append("text").attr("x", x + w / 2).attr("y", S).attr("fill", O).style("text-anchor", "middle").style("font-size", k).style("font-family", A);
647
647
  M.append("tspan").attr("x", x + w / 2).attr("dy", D).text(j[e]), M.attr("y", S + T / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), C(M, E);
648
648
  }
649
649
  }
650
- __name(x, "byTspan");
651
- function S(e, b, S, w, T, E, D, O) {
652
- let k = b.append("switch"), A = k.append("foreignObject").attr("x", S).attr("y", w).attr("width", T).attr("height", E).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
653
- A.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(e), x(e, k, S, w, T, E, D, O), C(A, D);
650
+ __name(b, "byTspan");
651
+ function S(e, x, S, w, T, E, D, O) {
652
+ let k = x.append("switch"), A = k.append("foreignObject").attr("x", S).attr("y", w).attr("width", T).attr("height", E).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
653
+ A.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(e), b(e, k, S, w, T, E, D, O), C(A, D);
654
654
  }
655
655
  __name(S, "byFo");
656
656
  function C(e, b) {
657
657
  for (let x in b) x in b && e.attr(x, b[x]);
658
658
  }
659
- return __name(C, "_setTextAttrs"), function(b) {
660
- return b.textPlacement === "fo" ? S : b.textPlacement === "old" ? e : x;
659
+ return __name(C, "_setTextAttrs"), function(x) {
660
+ return x.textPlacement === "fo" ? S : x.textPlacement === "old" ? e : b;
661
661
  };
662
662
  })(), initGraphics = /* @__PURE__ */ __name(function(e, b) {
663
663
  nodeCount = 0, taskCount = -1, e.append("defs").append("marker").attr("id", b + "-arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
664
664
  }, "initGraphics");
665
- function wrap(e, b) {
666
- e.each(function() {
667
- var e = select_default(this), x = e.text().split(/(\s+|<br>)/).reverse(), S, C = [], w = 1.1, T = e.attr("y"), E = parseFloat(e.attr("dy")), D = e.text(null).append("tspan").attr("x", 0).attr("y", T).attr("dy", E + "em");
668
- for (let E = 0; E < x.length; E++) S = x[x.length - 1 - E], C.push(S), D.text(C.join(" ").trim()), (D.node().getComputedTextLength() > b || S === "<br>") && (C.pop(), D.text(C.join(" ").trim()), C = S === "<br>" ? [""] : [S], D = e.append("tspan").attr("x", 0).attr("y", T).attr("dy", w + "em").text(S));
665
+ function wrap(b, x) {
666
+ b.each(function() {
667
+ var b = select_default(this), S = b.text().split(/(\s+|<br>)/).reverse(), C, w = [], T = 1.1, E = b.attr("y"), D = parseFloat(b.attr("dy")), O = b.text(null).append("tspan").attr("x", 0).attr("y", E).attr("dy", D + "em");
668
+ for (let e = 0; e < S.length; e++) C = S[S.length - 1 - e], w.push(C), O.text(w.join(" ").trim()), (O.node().getComputedTextLength() > x || C === "<br>") && (w.pop(), O.text(w.join(" ").trim()), w = C === "<br>" ? [""] : [C], O = b.append("tspan").attr("x", 0).attr("y", E).attr("dy", T + "em").text(C));
669
669
  });
670
670
  }
671
671
  __name(wrap, "wrap");
672
- var drawNode = /* @__PURE__ */ __name(function(e, b, x, S, C, w = !1) {
673
- let { theme: T, look: E } = S, D = T?.includes("redux"), O = x % (S?.themeVariables?.THEME_COLOR_LIMIT ?? 12) - 1, k = e.append("g");
674
- b.section = O, k.attr("class", (b.class ? b.class + " " : "") + "timeline-node " + ("section-" + O));
675
- let j = k.append("g"), M = k.append("g"), N = M.append("text").text(b.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, b.width).node().getBBox(), P = S.fontSize?.replace ? S.fontSize.replace("px", "") : S.fontSize;
676
- if (b.height = N.height + P * 1.1 * .5 + b.padding, b.height = Math.max(b.height, b.maxHeight), b.width += 2 * b.padding, M.attr("transform", "translate(" + b.width / 2 + ", " + b.padding / 2 + ")"), D && M.attr("transform", `translate(${b.width / 2}, ${w ? b.padding / 2 + 3 : b.padding})`), defaultBkg(j, b, O, C, S), E === "neo" && (k.attr("data-look", "neo"), D)) {
677
- let b = T.includes("dark"), x = select_default(e.node()?.ownerSVGElement ?? e.node()), S = x.attr("id") ?? "", C = S ? `${S}-drop-shadow` : "drop-shadow";
678
- if (x.select(`#${C}`).empty()) {
679
- let e = x.select("defs");
680
- (e.empty() ? x.append("defs") : e).append("filter").attr("id", C).attr("height", "130%").attr("width", "130%").append("feDropShadow").attr("dx", "4").attr("dy", "4").attr("stdDeviation", 0).attr("flood-opacity", b ? "0.2" : "0.06").attr("flood-color", b ? "#FFFFFF" : "#000000");
672
+ var drawNode = /* @__PURE__ */ __name(function(b, x, S, C, w, T = !1) {
673
+ let { theme: E, look: D } = C, O = E?.includes("redux"), k = S % (C?.themeVariables?.THEME_COLOR_LIMIT ?? 12) - 1, A = b.append("g");
674
+ x.section = k, A.attr("class", (x.class ? x.class + " " : "") + "timeline-node " + ("section-" + k));
675
+ let j = A.append("g"), M = A.append("g"), N = M.append("text").text(x.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, x.width).node().getBBox(), P = C.fontSize?.replace ? C.fontSize.replace("px", "") : C.fontSize;
676
+ if (x.height = N.height + P * 1.1 * .5 + x.padding, x.height = Math.max(x.height, x.maxHeight), x.width += 2 * x.padding, M.attr("transform", "translate(" + x.width / 2 + ", " + x.padding / 2 + ")"), O && M.attr("transform", `translate(${x.width / 2}, ${T ? x.padding / 2 + 3 : x.padding})`), defaultBkg(j, x, k, w, C), D === "neo" && (A.attr("data-look", "neo"), O)) {
677
+ let x = E.includes("dark"), S = select_default(b.node()?.ownerSVGElement ?? b.node()), C = S.attr("id") ?? "", w = C ? `${C}-drop-shadow` : "drop-shadow";
678
+ if (S.select(`#${w}`).empty()) {
679
+ let e = S.select("defs");
680
+ (e.empty() ? S.append("defs") : e).append("filter").attr("id", w).attr("height", "130%").attr("width", "130%").append("feDropShadow").attr("dx", "4").attr("dy", "4").attr("stdDeviation", 0).attr("flood-opacity", x ? "0.2" : "0.06").attr("flood-color", x ? "#FFFFFF" : "#000000");
681
681
  }
682
682
  }
683
- return b;
683
+ return x;
684
684
  }, "drawNode"), getVirtualNodeHeight = /* @__PURE__ */ __name(function(e, b, x) {
685
685
  let S = e.append("g"), C = S.append("text").text(b.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, b.width).node().getBBox(), w = x.fontSize?.replace ? x.fontSize.replace("px", "") : x.fontSize;
686
686
  return S.remove(), C.height + w * 1.1 * .5 + b.padding;
@@ -700,16 +700,16 @@ var drawNode = /* @__PURE__ */ __name(function(e, b, x, S, C, w = !1) {
700
700
  initGraphics,
701
701
  drawNode,
702
702
  getVirtualNodeHeight
703
- }, draw = /* @__PURE__ */ __name(function(e, b, S, C) {
704
- let w = getConfig2(), { look: T, theme: E, themeVariables: D } = w, { useGradient: j, gradientStart: M, gradientStop: N } = D, P = w.timeline?.leftMargin ?? 50;
705
- log.debug("timeline", C.db);
706
- let F = w.securityLevel, I;
707
- F === "sandbox" && (I = select_default("#i" + b));
708
- let L = select_default(F === "sandbox" ? I.nodes()[0].contentDocument.body : "body").select("#" + b);
703
+ }, draw = /* @__PURE__ */ __name(function(b, x, C, w) {
704
+ let T = getConfig2(), { look: E, theme: D, themeVariables: O } = T, { useGradient: j, gradientStart: M, gradientStop: N } = O, P = T.timeline?.leftMargin ?? 50;
705
+ log.debug("timeline", w.db);
706
+ let F = T.securityLevel, I;
707
+ F === "sandbox" && (I = select_default("#i" + x));
708
+ let L = select_default(F === "sandbox" ? I.nodes()[0].contentDocument.body : "body").select("#" + x);
709
709
  L.append("g");
710
- let R = C.db.getTasks(), z = C.db.getCommonDb().getDiagramTitle();
711
- log.debug("task", R), svgDraw_default.initGraphics(L, b);
712
- let B = C.db.getSections();
710
+ let R = w.db.getTasks(), z = w.db.getCommonDb().getDiagramTitle();
711
+ log.debug("task", R), svgDraw_default.initGraphics(L, x);
712
+ let B = w.db.getSections();
713
713
  log.debug("sections", B);
714
714
  let V = 0, H = 0, U = 0, W = 0, G = 50 + P, K = 50;
715
715
  W = 50;
@@ -722,22 +722,22 @@ var drawNode = /* @__PURE__ */ __name(function(e, b, x, S, C, w = !1) {
722
722
  width: 150,
723
723
  padding: 20,
724
724
  maxHeight: V
725
- }, S = svgDraw_default.getVirtualNodeHeight(L, b, w);
726
- log.debug("sectionHeight before draw", S), V = Math.max(V, S + 20);
725
+ }, x = svgDraw_default.getVirtualNodeHeight(L, b, T);
726
+ log.debug("sectionHeight before draw", x), V = Math.max(V, x + 20);
727
727
  });
728
728
  let Y = 0, X = 0;
729
729
  log.debug("tasks.length", R.length);
730
730
  for (let [e, b] of R.entries()) {
731
- let S = {
731
+ let x = {
732
732
  number: e,
733
733
  descr: b,
734
734
  section: b.section,
735
735
  width: 150,
736
736
  padding: 20,
737
737
  maxHeight: H
738
- }, C = svgDraw_default.getVirtualNodeHeight(L, S, w);
738
+ }, C = svgDraw_default.getVirtualNodeHeight(L, x, T);
739
739
  log.debug("taskHeight before draw", C), H = Math.max(H, C + 20), Y = Math.max(Y, b.events.length);
740
- let T = 0;
740
+ let w = 0;
741
741
  for (let e of b.events) {
742
742
  let x = {
743
743
  descr: e,
@@ -747,74 +747,74 @@ var drawNode = /* @__PURE__ */ __name(function(e, b, x, S, C, w = !1) {
747
747
  padding: 20,
748
748
  maxHeight: 50
749
749
  };
750
- T += svgDraw_default.getVirtualNodeHeight(L, x, w);
750
+ w += svgDraw_default.getVirtualNodeHeight(L, x, T);
751
751
  }
752
- b.events.length > 0 && (T += (b.events.length - 1) * 10), X = Math.max(X, T);
752
+ b.events.length > 0 && (w += (b.events.length - 1) * 10), X = Math.max(X, w);
753
753
  }
754
754
  log.debug("maxSectionHeight before draw", V), log.debug("maxTaskHeight before draw", H), B && B.length > 0 ? B.forEach((e) => {
755
- let S = R.filter((b) => b.section === e), C = {
755
+ let b = R.filter((b) => b.section === e), C = {
756
756
  number: q,
757
757
  descr: e,
758
758
  section: q,
759
- width: 200 * Math.max(S.length, 1) - 50,
759
+ width: 200 * Math.max(b.length, 1) - 50,
760
760
  padding: 20,
761
761
  maxHeight: V
762
762
  };
763
763
  log.debug("sectionNode", C);
764
- let T = L.append("g"), E = svgDraw_default.drawNode(T, C, q, w, b);
765
- log.debug("sectionNode output", E), T.attr("transform", `translate(${G}, ${W})`), K += V + 50, S.length > 0 && drawTasks(L, S, q, G, K, H, w, Y, X, V, !1, b), G += 200 * Math.max(S.length, 1), K = W, q++;
766
- }) : (J = !1, drawTasks(L, R, q, G, K, H, w, Y, X, V, !0, b));
764
+ let w = L.append("g"), E = svgDraw_default.drawNode(w, C, q, T, x);
765
+ log.debug("sectionNode output", E), w.attr("transform", `translate(${G}, ${W})`), K += V + 50, b.length > 0 && drawTasks(L, b, q, G, K, H, T, Y, X, V, !1, x), G += 200 * Math.max(b.length, 1), K = W, q++;
766
+ }) : (J = !1, drawTasks(L, R, q, G, K, H, T, Y, X, V, !0, x));
767
767
  let Z = L.node().getBBox();
768
- if (log.debug("bounds", Z), z && L.append("text").text(z).attr("x", T === "neo" ? Z.x * 2 + P : Z.width / 2 - P).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), U = J ? V + H + 150 : H + 100, L.append("g").attr("class", "lineWrapper").append("line").attr("x1", P).attr("y1", U).attr("x2", Z.width + 3 * P).attr("y2", U).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", `url(#${b}-arrowhead)`), T === "neo" && j && E !== "neutral") {
768
+ if (log.debug("bounds", Z), z && L.append("text").text(z).attr("x", E === "neo" ? Z.x * 2 + P : Z.width / 2 - P).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), U = J ? V + H + 150 : H + 100, L.append("g").attr("class", "lineWrapper").append("line").attr("x1", P).attr("y1", U).attr("x2", Z.width + 3 * P).attr("y2", U).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", `url(#${x}-arrowhead)`), E === "neo" && j && D !== "neutral") {
769
769
  let e = L.select("defs"), b = (e.empty() ? L.append("defs") : e).append("linearGradient").attr("id", L.attr("id") + "-gradient").attr("gradientUnits", "objectBoundingBox").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
770
770
  b.append("stop").attr("offset", "0%").attr("stop-color", M).attr("stop-opacity", 1), b.append("stop").attr("offset", "100%").attr("stop-color", N).attr("stop-opacity", 1);
771
771
  }
772
- setupGraphViewbox(void 0, L, w.timeline?.padding ?? 50, w.timeline?.useMaxWidth ?? !1);
773
- }, "draw"), drawTasks = /* @__PURE__ */ __name(function(e, b, S, C, w, T, E, D, O, k, A, j) {
772
+ setupGraphViewbox(void 0, L, T.timeline?.padding ?? 50, T.timeline?.useMaxWidth ?? !1);
773
+ }, "draw"), drawTasks = /* @__PURE__ */ __name(function(e, b, x, C, w, T, E, D, O, k, A, j) {
774
774
  for (let D of b) {
775
775
  let b = {
776
776
  descr: D.task,
777
- section: S,
778
- number: S,
777
+ section: x,
778
+ number: x,
779
779
  width: 150,
780
780
  padding: 20,
781
781
  maxHeight: T
782
782
  };
783
783
  log.debug("taskNode", b);
784
- let k = e.append("g").attr("class", "taskWrapper"), M = svgDraw_default.drawNode(k, b, S, E, j).height;
784
+ let k = e.append("g").attr("class", "taskWrapper"), M = svgDraw_default.drawNode(k, b, x, E, j).height;
785
785
  if (log.debug("taskHeight after draw", M), k.attr("transform", `translate(${C}, ${w})`), T = Math.max(T, M), D.events) {
786
- let b = e.append("g").attr("class", "lineWrapper"), x = T;
787
- w += 100, x += drawEvents(e, D.events, S, C, w, E, j), w -= 100, b.append("line").attr("x1", C + 190 / 2).attr("y1", w + T).attr("x2", C + 190 / 2).attr("y2", w + T + 100 + O + 100).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", `url(#${j}-arrowhead)`).attr("stroke-dasharray", "5,5");
786
+ let b = e.append("g").attr("class", "lineWrapper"), S = T;
787
+ w += 100, S += drawEvents(e, D.events, x, C, w, E, j), w -= 100, b.append("line").attr("x1", C + 190 / 2).attr("y1", w + T).attr("x2", C + 190 / 2).attr("y2", w + T + 100 + O + 100).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", `url(#${j}-arrowhead)`).attr("stroke-dasharray", "5,5");
788
788
  }
789
- C += 200, A && !E.timeline?.disableMulticolor && S++;
789
+ C += 200, A && !E.timeline?.disableMulticolor && x++;
790
790
  }
791
791
  w -= 10;
792
- }, "drawTasks"), drawEvents = /* @__PURE__ */ __name(function(e, b, S, C, w, T, E) {
792
+ }, "drawTasks"), drawEvents = /* @__PURE__ */ __name(function(e, b, x, C, w, T, E) {
793
793
  let D = 0, O = w;
794
794
  w += 100;
795
795
  for (let O of b) {
796
796
  let b = {
797
797
  descr: O,
798
- section: S,
799
- number: S,
798
+ section: x,
799
+ number: x,
800
800
  width: 150,
801
801
  padding: 20,
802
802
  maxHeight: 50
803
803
  };
804
804
  log.debug("eventNode", b);
805
- let k = e.append("g").attr("class", "eventWrapper"), A = svgDraw_default.drawNode(k, b, S, T, E, !0).height;
805
+ let k = e.append("g").attr("class", "eventWrapper"), A = svgDraw_default.drawNode(k, b, x, T, E, !0).height;
806
806
  D += A, k.attr("transform", `translate(${C}, ${w})`), w = w + 10 + A;
807
807
  }
808
808
  return w = O, D;
809
809
  }, "drawEvents"), timelineRenderer_default = {
810
810
  setConf: /* @__PURE__ */ __name(() => {}, "setConf"),
811
811
  draw
812
- }, NODE_WIDTH = 200, NODE_PADDING = 5, NODE_TOTAL_WIDTH = NODE_WIDTH + NODE_PADDING * 2, EVENT_WIDTH = NODE_WIDTH + 100, EVENT_TOTAL_WIDTH = EVENT_WIDTH + NODE_PADDING * 2, EVENT_SPACING = 10, EVENT_VERTICAL_GAP = 0, SECTION_TASK_GAP = 20, TASK_AXIS_GAP = 20, TASK_VERTICAL_GAP = 30, EVENT_AXIS_GAP = 50, draw2 = /* @__PURE__ */ __name(function(e, b, S, C) {
812
+ }, NODE_WIDTH = 200, NODE_PADDING = 5, NODE_TOTAL_WIDTH = NODE_WIDTH + NODE_PADDING * 2, EVENT_WIDTH = NODE_WIDTH + 100, EVENT_TOTAL_WIDTH = EVENT_WIDTH + NODE_PADDING * 2, EVENT_SPACING = 10, EVENT_VERTICAL_GAP = 0, SECTION_TASK_GAP = 20, TASK_AXIS_GAP = 20, TASK_VERTICAL_GAP = 30, EVENT_AXIS_GAP = 50, draw2 = /* @__PURE__ */ __name(function(e, b, x, C) {
813
813
  let w = getConfig2(), T = w.timeline?.leftMargin ?? 50;
814
814
  log.debug("timeline", C.db);
815
815
  let E = selectSvgElement(b);
816
816
  E.append("g");
817
- let D = C.db.getTasks(), A = C.db.getCommonDb().getDiagramTitle();
817
+ let D = C.db.getTasks(), O = C.db.getCommonDb().getDiagramTitle();
818
818
  log.debug("task", D), svgDraw_default.initGraphics(E);
819
819
  let j = C.db.getSections();
820
820
  log.debug("sections", j);
@@ -827,20 +827,20 @@ var drawNode = /* @__PURE__ */ __name(function(e, b, x, S, C, w = !1) {
827
827
  width: K,
828
828
  padding: NODE_PADDING,
829
829
  maxHeight: P
830
- }, S = svgDraw_default.getVirtualNodeHeight(E, b, w);
831
- log.debug("sectionHeight before draw", S), P = Math.max(P, S);
830
+ }, x = svgDraw_default.getVirtualNodeHeight(E, b, w);
831
+ log.debug("sectionHeight before draw", x), P = Math.max(P, x);
832
832
  });
833
833
  let q = 0;
834
834
  log.debug("tasks.length", D.length);
835
835
  for (let [e, b] of D.entries()) {
836
- let S = {
836
+ let x = {
837
837
  number: e,
838
838
  descr: b,
839
839
  section: b.section,
840
840
  width: NODE_WIDTH,
841
841
  padding: NODE_PADDING,
842
842
  maxHeight: F
843
- }, C = svgDraw_default.getVirtualNodeHeight(E, S, w);
843
+ }, C = svgDraw_default.getVirtualNodeHeight(E, x, w);
844
844
  log.debug("taskHeight before draw", C), F = Math.max(F, C);
845
845
  let T = 0;
846
846
  for (let e of b.events) {
@@ -859,7 +859,7 @@ var drawNode = /* @__PURE__ */ __name(function(e, b, x, S, C, w = !1) {
859
859
  log.debug("maxSectionHeight before draw", P), log.debug("maxTaskHeight before draw", F);
860
860
  let J = Math.max(F, q) + TASK_VERTICAL_GAP;
861
861
  W ? j.forEach((e) => {
862
- let b = D.filter((b) => b.section === e), S = {
862
+ let b = D.filter((b) => b.section === e), x = {
863
863
  number: U,
864
864
  descr: e,
865
865
  section: U,
@@ -867,8 +867,8 @@ var drawNode = /* @__PURE__ */ __name(function(e, b, x, S, C, w = !1) {
867
867
  padding: NODE_PADDING,
868
868
  maxHeight: P
869
869
  };
870
- log.debug("sectionNode", S);
871
- let C = E.append("g"), T = svgDraw_default.drawNode(C, S, U, w);
870
+ log.debug("sectionNode", x);
871
+ let C = E.append("g"), T = svgDraw_default.drawNode(C, x, U, w);
872
872
  log.debug("sectionNode output", T);
873
873
  let O = G - B;
874
874
  C.attr("transform", `translate(${O}, ${L})`);
@@ -879,45 +879,45 @@ var drawNode = /* @__PURE__ */ __name(function(e, b, x, S, C, w = !1) {
879
879
  }) : drawTasks2(E, D, U, G, L, F, w, J, !0);
880
880
  let Y = E.node()?.getBBox();
881
881
  if (!Y) throw Error("bbox not found");
882
- if (log.debug("bounds", Y), A) {
883
- if (E.append("text").text(A).attr("x", Y.width / 2 - T).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), Y = E.node()?.getBBox(), !Y) throw Error("bbox not found");
882
+ if (log.debug("bounds", Y), O) {
883
+ if (E.append("text").text(O).attr("x", Y.width / 2 - T).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), Y = E.node()?.getBBox(), !Y) throw Error("bbox not found");
884
884
  log.debug("bounds after title", Y);
885
885
  }
886
886
  let [X] = parseFontSize(w.fontSize), Z = (X ?? 16) * 2, Q = (X ?? 16) * .5 + 20, $ = E.append("g").attr("class", "lineWrapper");
887
887
  $.append("line").attr("x1", G).attr("y1", R - Z).attr("x2", G).attr("y2", Y.y + Y.height + Q).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), $.lower(), setupGraphViewbox(void 0, E, w.timeline?.padding ?? 50, w.timeline?.useMaxWidth ?? !1);
888
- }, "draw"), drawTasks2 = /* @__PURE__ */ __name(function(e, b, S, C, w, T, E, D, O) {
888
+ }, "draw"), drawTasks2 = /* @__PURE__ */ __name(function(e, b, x, C, w, T, E, D, O) {
889
889
  for (let k of b) {
890
890
  let b = {
891
891
  descr: k.task,
892
- section: S,
893
- number: S,
892
+ section: x,
893
+ number: x,
894
894
  width: NODE_WIDTH,
895
895
  padding: NODE_PADDING,
896
896
  maxHeight: T
897
897
  };
898
898
  log.debug("taskNode", b);
899
- let A = e.append("g").attr("class", "taskWrapper"), j = svgDraw_default.drawNode(A, b, S, E), M = j.height;
899
+ let A = e.append("g").attr("class", "taskWrapper"), j = svgDraw_default.drawNode(A, b, x, E), M = j.height;
900
900
  log.debug("taskHeight after draw", M);
901
901
  let N = C - TASK_AXIS_GAP - j.width;
902
902
  if (A.attr("transform", `translate(${N}, ${w})`), T = Math.max(T, M), k.events && k.events.length > 0) {
903
- let b = w, x = C + EVENT_AXIS_GAP;
904
- drawEvents2(e, k.events, S, C, x, b, E);
903
+ let b = w, S = C + EVENT_AXIS_GAP;
904
+ drawEvents2(e, k.events, x, C, S, b, E);
905
905
  }
906
- w += D, O && !E.timeline?.disableMulticolor && S++;
906
+ w += D, O && !E.timeline?.disableMulticolor && x++;
907
907
  }
908
- }, "drawTasks"), drawEvents2 = /* @__PURE__ */ __name(function(e, b, S, C, w, T, E) {
908
+ }, "drawTasks"), drawEvents2 = /* @__PURE__ */ __name(function(e, b, x, C, w, T, E) {
909
909
  let D = T;
910
910
  for (let T of b) {
911
911
  let b = {
912
912
  descr: T,
913
- section: S,
914
- number: S,
913
+ section: x,
914
+ number: x,
915
915
  width: EVENT_WIDTH,
916
916
  padding: NODE_PADDING,
917
917
  maxHeight: 0
918
918
  };
919
919
  log.debug("eventNode", b);
920
- let O = e.append("g").attr("class", "eventWrapper"), k = svgDraw_default.drawNode(O, b, S, E).height;
920
+ let O = e.append("g").attr("class", "eventWrapper"), k = svgDraw_default.drawNode(O, b, x, E).height;
921
921
  O.attr("transform", `translate(${w}, ${D})`);
922
922
  let A = e.append("g").attr("class", "lineWrapper"), j = D + k / 2;
923
923
  A.append("line").attr("x1", C).attr("y1", j).attr("x2", w).attr("y2", j).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5"), D = D + k + EVENT_SPACING;