@draftably/editor 0.0.0-stage → 0.1.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 (185) hide show
  1. package/README.md +26 -2
  2. package/dist/LICENSE +21 -0
  3. package/dist/assets/engine.worker-DmHew5f6.js +6813 -0
  4. package/dist/assets/import-d2.worker-CnXfFXoa.js +5395 -0
  5. package/dist/chunks/abnfDiagram-WEYOIA3C-llcpthp5.js +87 -0
  6. package/dist/chunks/arc-rJj0TtXf.js +83 -0
  7. package/dist/chunks/architectureDiagram-ZHVYKT53-CfiXg0Lk.js +4781 -0
  8. package/dist/chunks/blockDiagram-RJAE7QA3-CO-14jWz.js +1440 -0
  9. package/dist/chunks/browser-iNhbPsGc.js +40 -0
  10. package/dist/chunks/c4Diagram-XDPPPE54-DYKuxA4n.js +1524 -0
  11. package/dist/chunks/channel-qMvPU6eH.js +5 -0
  12. package/dist/chunks/chunk-2E7WHVMD-BEZwsFS3.js +670 -0
  13. package/dist/chunks/chunk-2Q5K7J3B-gqtzQ8ux.js +18 -0
  14. package/dist/chunks/chunk-4EMNKR2T-MC54CXVe.js +262 -0
  15. package/dist/chunks/chunk-55XCU76K-DkZUAaqC.js +68 -0
  16. package/dist/chunks/chunk-5VM5RSS4-CaKe4sjM.js +19 -0
  17. package/dist/chunks/chunk-JWPE2WC7-CnAFS2xF.js +8 -0
  18. package/dist/chunks/chunk-VQ5W62QI-CXRv7FiX.js +19 -0
  19. package/dist/chunks/chunk-XXDRQBXY-B-AMQgD2.js +8 -0
  20. package/dist/chunks/chunk-ZCHMQSOR-BALpdc3g.js +451 -0
  21. package/dist/chunks/classDiagram-v2-4MYWR3UA-wPjgJTg4.js +1570 -0
  22. package/dist/chunks/cose-bilkent-JH36ORCC-Bbh5ggBc.js +2608 -0
  23. package/dist/chunks/cynefin-EF2NZ3EQ-Bt6b88hY.js +22361 -0
  24. package/dist/chunks/cynefinDiagram-WF24UDRP-BHWZvxoF.js +299 -0
  25. package/dist/chunks/cytoscape.esm-CRsF_JA3.js +18791 -0
  26. package/dist/chunks/dagre-NK4GIZVX-Cz37yPrT.js +2157 -0
  27. package/dist/chunks/defaultLocale-BgPVtth8.js +171 -0
  28. package/dist/chunks/diagram-CBK3MWTC-Q2R6FJ0B.js +531 -0
  29. package/dist/chunks/diagram-I5XIIV2D-a2Kdu_wA.js +153 -0
  30. package/dist/chunks/diagram-ODIL2UCW-DTWXxcOn.js +346 -0
  31. package/dist/chunks/diagram-PFBEJUXE-DIAQQ5KX.js +480 -0
  32. package/dist/chunks/diagram-RJA3I4VV-BPD0GghS.js +219 -0
  33. package/dist/chunks/diagram-TYUNFSNR-BmdkONfG.js +2586 -0
  34. package/dist/chunks/dot-importer-B23jwEkx.js +1547 -0
  35. package/dist/chunks/ebnfDiagram-V4P3TTPT-C5IKvYlb.js +109 -0
  36. package/dist/chunks/elk-QONTBCTQ-CtdQFvh2.js +49229 -0
  37. package/dist/chunks/erDiagram-KYQIGQAA-5wguK9Dx.js +1064 -0
  38. package/dist/chunks/flowDiagram-IUGLLWBU-BijvFPku.js +1771 -0
  39. package/dist/chunks/ganttDiagram-R7GPNTJY-BaqGPz-O.js +2729 -0
  40. package/dist/chunks/gitGraphDiagram-PDYL7XHY-DZfMGyHE.js +815 -0
  41. package/dist/chunks/graph-CKJmgLki.js +1541 -0
  42. package/dist/chunks/import-core-C-I1wGfw.js +145 -0
  43. package/dist/chunks/infoDiagram-MVDRKAX5-C2vH_59e.js +24 -0
  44. package/dist/chunks/init-DjUOC4st.js +16 -0
  45. package/dist/chunks/ishikawaDiagram-HPEHV2GE-q149MFlV.js +624 -0
  46. package/dist/chunks/journeyDiagram-BOSHW7O7-D-2Z3VtR.js +834 -0
  47. package/dist/chunks/kanban-definition-FNSA4HC5-wvAjV5ub.js +724 -0
  48. package/dist/chunks/katex-BsrBVQKd.js +11314 -0
  49. package/dist/chunks/linear-4t7D_ros.js +259 -0
  50. package/dist/chunks/mermaid-facade-BoLWBerE.js +289 -0
  51. package/dist/chunks/mermaid-importer-Cgx1IhmR.js +478 -0
  52. package/dist/chunks/mermaid.core-DXv6D2Sm.js +19244 -0
  53. package/dist/chunks/mindmap-definition-6OY57UG3-r9wTKul_.js +837 -0
  54. package/dist/chunks/mount-C1Xk_GQz.js +22131 -0
  55. package/dist/chunks/ordinal-DfAQgscy.js +61 -0
  56. package/dist/chunks/pegDiagram-ECIUJNBX-CmKlFWiP.js +95 -0
  57. package/dist/chunks/pieDiagram-GNMPY74T-DNTw_qan.js +208 -0
  58. package/dist/chunks/quadrantDiagram-D57K4MC3-CT_tvVub.js +1029 -0
  59. package/dist/chunks/railroadDiagram-Y72NRBL7-C5TUvZBe.js +77 -0
  60. package/dist/chunks/requirementDiagram-EQYSW5RA-C_c65aCa.js +889 -0
  61. package/dist/chunks/sankeyDiagram-SY24JHO5-CKcbizM1.js +859 -0
  62. package/dist/chunks/sequenceDiagram-BLEHNHQU-GpVnHOjf.js +2972 -0
  63. package/dist/chunks/sizeCapture-INFHLROL-CToN3JSu.js +46 -0
  64. package/dist/chunks/stateDiagram-v2-A6IESKWZ-rJYd2FfM.js +1520 -0
  65. package/dist/chunks/swimlanes-B3ENRKFQ-C7w5pfxG.js +4991 -0
  66. package/dist/chunks/swimlanesDiagram-AYQRV4AK-BpGY_bvE.js +13 -0
  67. package/dist/chunks/timeline-definition-JXYKGLGB-ChKFPBKc.js +1058 -0
  68. package/dist/chunks/usecaseDiagram-WPOLBNNX-skXH8Dcu.js +7945 -0
  69. package/dist/chunks/vennDiagram-Q3Y3IDCW-C5KknmJf.js +1578 -0
  70. package/dist/chunks/wardleyDiagram-IVAIDKWA-DY4Lkfpu.js +678 -0
  71. package/dist/chunks/xychartDiagram-4URNHDU4-BHScsL7h.js +1536 -0
  72. package/dist/element.js +36 -0
  73. package/dist/index.js +4 -0
  74. package/dist/types/src/cli/links.d.ts +4 -0
  75. package/dist/types/src/cli/pdf.d.ts +29 -0
  76. package/dist/types/src/cli/png.d.ts +23 -0
  77. package/dist/types/src/cli/svg.d.ts +4 -0
  78. package/dist/types/src/components/Icon.d.ts +14 -0
  79. package/dist/types/src/components/LayoutPreviewBar.d.ts +2 -0
  80. package/dist/types/src/components/canvas/Canvas.d.ts +15 -0
  81. package/dist/types/src/components/canvas/Frame.d.ts +22 -0
  82. package/dist/types/src/components/canvas/InlineEditor.d.ts +2 -0
  83. package/dist/types/src/components/canvas/Notes.d.ts +5 -0
  84. package/dist/types/src/components/canvas/Overlay.d.ts +2 -0
  85. package/dist/types/src/components/canvas/StateBar.d.ts +5 -0
  86. package/dist/types/src/components/canvas/TextHits.d.ts +6 -0
  87. package/dist/types/src/components/canvas/ZoomControls.d.ts +1 -0
  88. package/dist/types/src/components/canvas/text-boxes.d.ts +24 -0
  89. package/dist/types/src/components/controls.d.ts +88 -0
  90. package/dist/types/src/components/scene/EdgeView.d.ts +22 -0
  91. package/dist/types/src/components/scene/GroupView.d.ts +22 -0
  92. package/dist/types/src/components/scene/Lifelines.d.ts +15 -0
  93. package/dist/types/src/components/scene/LinkMark.d.ts +11 -0
  94. package/dist/types/src/components/scene/NodeView.d.ts +18 -0
  95. package/dist/types/src/components/scene/parts.d.ts +50 -0
  96. package/dist/types/src/components/sculpt/BrushDock.d.ts +2 -0
  97. package/dist/types/src/components/sculpt/TimelineDeck.d.ts +2 -0
  98. package/dist/types/src/components/session-context.d.ts +486 -0
  99. package/dist/types/src/dsl/cells.d.ts +91 -0
  100. package/dist/types/src/dsl/channels.d.ts +53 -0
  101. package/dist/types/src/dsl/compile.d.ts +162 -0
  102. package/dist/types/src/dsl/frame.d.ts +38 -0
  103. package/dist/types/src/dsl/lanes.d.ts +23 -0
  104. package/dist/types/src/dsl/layout-edits.d.ts +58 -0
  105. package/dist/types/src/dsl/legend-notes.d.ts +3 -0
  106. package/dist/types/src/dsl/project.d.ts +39 -0
  107. package/dist/types/src/dsl/source-edits.d.ts +37 -0
  108. package/dist/types/src/dsl/syntax.d.ts +317 -0
  109. package/dist/types/src/dsl/translate.d.ts +69 -0
  110. package/dist/types/src/editor/Editor.d.ts +6 -0
  111. package/dist/types/src/editor/element.d.ts +15 -0
  112. package/dist/types/src/editor/mount.d.ts +23 -0
  113. package/dist/types/src/import/browser.d.ts +3 -0
  114. package/dist/types/src/import/detect.d.ts +31 -0
  115. package/dist/types/src/import/dot-importer.d.ts +3 -0
  116. package/dist/types/src/import/import-core.d.ts +105 -0
  117. package/dist/types/src/import/mermaid-facade.d.ts +120 -0
  118. package/dist/types/src/import/mermaid-importer.d.ts +4 -0
  119. package/dist/types/src/import/mermaid-sequence.d.ts +8 -0
  120. package/dist/types/src/import/scratch.d.ts +3 -0
  121. package/dist/types/src/lib/engine-tasks.d.ts +88 -0
  122. package/dist/types/src/lib/font-data.d.ts +9 -0
  123. package/dist/types/src/lib/saved-diagram.d.ts +4 -0
  124. package/dist/types/src/lib/scene-cache.d.ts +4 -0
  125. package/dist/types/src/lib/source-hash.d.ts +7 -0
  126. package/dist/types/src/lib/svg-export.d.ts +15 -0
  127. package/dist/types/src/model/appearance.d.ts +209 -0
  128. package/dist/types/src/model/bounds.d.ts +19 -0
  129. package/dist/types/src/model/camera.d.ts +21 -0
  130. package/dist/types/src/model/candidates.d.ts +53 -0
  131. package/dist/types/src/model/colors.d.ts +22 -0
  132. package/dist/types/src/model/document.d.ts +24 -0
  133. package/dist/types/src/model/edits.d.ts +133 -0
  134. package/dist/types/src/model/embed.d.ts +17 -0
  135. package/dist/types/src/model/examples.d.ts +15 -0
  136. package/dist/types/src/model/font-faces.d.ts +24 -0
  137. package/dist/types/src/model/fonts.d.ts +47 -0
  138. package/dist/types/src/model/footnote.d.ts +34 -0
  139. package/dist/types/src/model/frame.d.ts +71 -0
  140. package/dist/types/src/model/geometry.d.ts +29 -0
  141. package/dist/types/src/model/graph.d.ts +53 -0
  142. package/dist/types/src/model/heading.d.ts +38 -0
  143. package/dist/types/src/model/icons.d.ts +2 -0
  144. package/dist/types/src/model/label-hits.d.ts +27 -0
  145. package/dist/types/src/model/labels.d.ts +88 -0
  146. package/dist/types/src/model/legend.d.ts +25 -0
  147. package/dist/types/src/model/link.d.ts +63 -0
  148. package/dist/types/src/model/markers.d.ts +47 -0
  149. package/dist/types/src/model/note.d.ts +75 -0
  150. package/dist/types/src/model/panels.d.ts +11 -0
  151. package/dist/types/src/model/rich-text.d.ts +24 -0
  152. package/dist/types/src/model/routes.d.ts +170 -0
  153. package/dist/types/src/model/samples.d.ts +11 -0
  154. package/dist/types/src/model/stack.d.ts +8 -0
  155. package/dist/types/src/model/static-scene.d.ts +15 -0
  156. package/dist/types/src/model/status.d.ts +84 -0
  157. package/dist/types/src/model/styles.d.ts +13 -0
  158. package/dist/types/src/model/surface.d.ts +31 -0
  159. package/dist/types/src/model/types.d.ts +277 -0
  160. package/dist/types/src/runtime/svg-renderer.d.ts +38 -0
  161. package/dist/types/src/server/file-session.d.ts +19 -0
  162. package/dist/types/src/server/workspace.d.ts +21 -0
  163. package/dist/types/src/state/active-session.d.ts +479 -0
  164. package/dist/types/src/state/commands.d.ts +529 -0
  165. package/dist/types/src/state/comparison.d.ts +151 -0
  166. package/dist/types/src/state/files.d.ts +61 -0
  167. package/dist/types/src/state/keyboard.d.ts +6 -0
  168. package/dist/types/src/state/keys.d.ts +5 -0
  169. package/dist/types/src/state/launch.d.ts +61 -0
  170. package/dist/types/src/state/links.d.ts +11 -0
  171. package/dist/types/src/state/session/actions.d.ts +77 -0
  172. package/dist/types/src/state/session/canvas-text.d.ts +24 -0
  173. package/dist/types/src/state/session/document.d.ts +84 -0
  174. package/dist/types/src/state/session/editor.d.ts +81 -0
  175. package/dist/types/src/state/session/emphasis.d.ts +11 -0
  176. package/dist/types/src/state/session/file-session.d.ts +98 -0
  177. package/dist/types/src/state/session/index.d.ts +496 -0
  178. package/dist/types/src/state/session/layout.d.ts +79 -0
  179. package/dist/types/src/state/session/pointer.d.ts +19 -0
  180. package/dist/types/src/state/session/routing.d.ts +20 -0
  181. package/dist/types/src/state/session/scene.d.ts +144 -0
  182. package/dist/types/src/state/session/sculpt.d.ts +70 -0
  183. package/dist/types/src/state/toast.d.ts +14 -0
  184. package/dist/types/src/state/ui.d.ts +39 -0
  185. package/package.json +41 -3
@@ -0,0 +1,262 @@
1
+ import { au as B, _ as y } from "./mermaid.core-DXv6D2Sm.js";
2
+ var w = 5, O = 1e-5, X = 2, Y = 0.6, R = 1e-6;
3
+ function N(t) {
4
+ const e = [];
5
+ for (let s = 0; s < t.length - 1; s++)
6
+ e.push({ a: t[s], b: t[s + 1] });
7
+ return e;
8
+ }
9
+ y(N, "buildSegmentList");
10
+ function T(t, e, s, a) {
11
+ const r = e.x - t.x, o = e.y - t.y, i = a.x - s.x, d = a.y - s.y, u = r * d - o * i;
12
+ if (u === 0)
13
+ return null;
14
+ const n = s.x - t.x, c = s.y - t.y, p = (n * d - c * i) / u, f = (n * o - c * r) / u;
15
+ return p <= R || p >= 1 - R || f <= R || f >= 1 - R ? null : {
16
+ point: { x: t.x + p * r, y: t.y + p * o },
17
+ tA: p,
18
+ tB: f
19
+ };
20
+ }
21
+ y(T, "segmentIntersection");
22
+ function P(t) {
23
+ return Math.abs(t.b.x - t.a.x) >= Math.abs(t.b.y - t.a.y);
24
+ }
25
+ y(P, "isHorizontalSeg");
26
+ function v(t, e, s) {
27
+ if (t.curve !== "rounded")
28
+ return !1;
29
+ const a = t.points, r = a[e], o = a[e + 1];
30
+ if (!r || !o)
31
+ return !1;
32
+ const i = Math.hypot(o.x - r.x, o.y - r.y), d = s * i, u = e > 0 ? L(a[e - 1], r, o, w) : null;
33
+ if (u && d < u.cutLen)
34
+ return !0;
35
+ const n = e + 2 < a.length ? L(r, o, a[e + 2], w) : null;
36
+ return n !== null && i - d < n.cutLen;
37
+ }
38
+ y(v, "crossingSitsInRoundedCorner");
39
+ function _(t) {
40
+ const e = [];
41
+ for (let s = 0; s < t.length; s++) {
42
+ const a = t[s], r = N(a.points);
43
+ for (let o = s + 1; o < t.length; o++) {
44
+ const i = t[o], d = N(i.points);
45
+ for (const [u, n] of r.entries())
46
+ for (const [c, p] of d.entries()) {
47
+ const f = T(n.a, n.b, p.a, p.b);
48
+ if (!f || v(a, u, f.tA) || v(i, c, f.tB))
49
+ continue;
50
+ const g = P(n), S = P(p);
51
+ (g !== S ? g : !1) ? e.push({
52
+ jumpEdgeId: a.id,
53
+ otherEdgeId: i.id,
54
+ segIndex: u,
55
+ t: f.tA,
56
+ point: f.point
57
+ }) : e.push({
58
+ jumpEdgeId: i.id,
59
+ otherEdgeId: a.id,
60
+ segIndex: c,
61
+ t: f.tB,
62
+ point: f.point
63
+ });
64
+ }
65
+ }
66
+ }
67
+ return e;
68
+ }
69
+ y(_, "findEdgeIntersections");
70
+ function M(t) {
71
+ const e = Math.round(t * 1e3) / 1e3;
72
+ return Number.isInteger(e) ? `${e}` : `${e}`;
73
+ }
74
+ y(M, "fmt");
75
+ function A(t) {
76
+ return `${M(t.x)},${M(t.y)}`;
77
+ }
78
+ y(A, "pointToString");
79
+ function C(t) {
80
+ const e = t.b.x - t.a.x, s = t.b.y - t.a.y;
81
+ return Math.abs(e) >= Math.abs(s) ? e >= 0 ? 1 : 0 : s >= 0 ? 1 : 0;
82
+ }
83
+ y(C, "getArcSweepFlag");
84
+ function D(t, e) {
85
+ if (t.length < 2)
86
+ return t.map((o) => ({ ...o }));
87
+ const s = t.map((o) => ({ ...o })), a = e.arrowTypeStart && B[e.arrowTypeStart];
88
+ if (a) {
89
+ const o = t[0], i = t[1], d = Math.atan2(i.y - o.y, i.x - o.x);
90
+ s[0].x = o.x + a * Math.cos(d), s[0].y = o.y + a * Math.sin(d);
91
+ }
92
+ const r = e.arrowTypeEnd && B[e.arrowTypeEnd];
93
+ if (r) {
94
+ const o = t.length, i = t[o - 2], d = t[o - 1], u = Math.atan2(d.y - i.y, d.x - i.x);
95
+ s[o - 1].x = d.x - r * Math.cos(u), s[o - 1].y = d.y - r * Math.sin(u);
96
+ }
97
+ return s;
98
+ }
99
+ y(D, "applyMarkerOffsets");
100
+ function k(t, e, s, a, r) {
101
+ const o = t.point.x, i = t.point.y, d = { x: o - e * t.r, y: i - s * t.r }, u = { x: o + e * t.r, y: i + s * t.r }, n = [`L${A(d)}`];
102
+ return r === "arc" ? n.push(`A${M(t.r)},${M(t.r)} 0 0 ${a} ${A(u)}`) : n.push(`M${A(u)}`), n;
103
+ }
104
+ y(k, "emitJump");
105
+ function L(t, e, s, a) {
106
+ const r = e.x - t.x, o = e.y - t.y, i = s.x - e.x, d = s.y - e.y, u = Math.hypot(r, o), n = Math.hypot(i, d);
107
+ if (u < O || n < O)
108
+ return null;
109
+ const c = r / u, p = o / u, f = i / n, g = d / n, S = c * f + p * g, b = Math.max(-1, Math.min(1, S)), m = Math.acos(b);
110
+ if (m < O || Math.abs(Math.PI - m) < O)
111
+ return null;
112
+ const h = Math.min(a / Math.sin(m / 2), u / 2, n / 2);
113
+ return {
114
+ startX: e.x - c * h,
115
+ startY: e.y - p * h,
116
+ endX: e.x + f * h,
117
+ endY: e.y + g * h,
118
+ ctrlX: e.x,
119
+ ctrlY: e.y,
120
+ cutLen: h
121
+ };
122
+ }
123
+ y(L, "computeRoundedCorner");
124
+ function H(t, e, s) {
125
+ const a = t.points;
126
+ if (a.length < 2)
127
+ return "";
128
+ const r = D(a, t), o = t.curve === "rounded", i = N(r), d = /* @__PURE__ */ new Map();
129
+ for (const n of e) {
130
+ const c = i[n.segIndex];
131
+ if (!c)
132
+ continue;
133
+ const p = Math.hypot(c.b.x - c.a.x, c.b.y - c.a.y), f = d.get(n.segIndex) ?? [];
134
+ f.push({
135
+ t: n.t,
136
+ point: n.point,
137
+ d: n.t * p,
138
+ r: s.jumpRadius
139
+ }), d.set(n.segIndex, f);
140
+ }
141
+ const u = [`M${A(r[0])}`];
142
+ for (let n = 0; n < i.length; n++) {
143
+ const c = i[n], p = Math.hypot(c.b.x - c.a.x, c.b.y - c.a.y), f = p === 0 ? 0 : (c.b.x - c.a.x) / p, g = p === 0 ? 0 : (c.b.y - c.a.y) / p, S = C(c);
144
+ let b = 0;
145
+ if (o && n > 0) {
146
+ const l = L(
147
+ r[n - 1],
148
+ r[n],
149
+ r[n + 1] ?? r[n],
150
+ w
151
+ );
152
+ l && (b = l.cutLen);
153
+ }
154
+ let m = p, h = null;
155
+ o && n < i.length - 1 && (h = L(
156
+ r[n],
157
+ r[n + 1],
158
+ r[n + 2] ?? r[n + 1],
159
+ w
160
+ ), h && (m = p - h.cutLen));
161
+ const $ = s.jumpRadius * Y, x = [...d.get(n) ?? []].sort((l, E) => l.t - E.t).filter((l) => {
162
+ const E = Math.min(l.d - b, m - l.d) - X;
163
+ return l.r = Math.min(l.r, E), l.r >= $;
164
+ });
165
+ for (let l = 0; l < x.length - 1; l++) {
166
+ const E = x[l + 1].d - x[l].d;
167
+ if (x[l].r + x[l + 1].r > E) {
168
+ const I = E / 2;
169
+ x[l].r = Math.min(x[l].r, I), x[l + 1].r = Math.min(x[l + 1].r, I);
170
+ }
171
+ }
172
+ for (const l of x)
173
+ l.r < $ || u.push(...k(l, f, g, S, s.jumpStyle));
174
+ o && h ? (u.push(`L${M(h.startX)},${M(h.startY)}`), u.push(
175
+ `Q${M(h.ctrlX)},${M(h.ctrlY)} ${M(h.endX)},${M(h.endY)}`
176
+ )) : u.push(`L${A(c.b)}`);
177
+ }
178
+ return u.join(" ");
179
+ }
180
+ y(H, "rewriteEdgePath");
181
+ function J(t) {
182
+ return /^[\d\s+,.LMelm-]*$/.test(t);
183
+ }
184
+ y(J, "isStraightPath");
185
+ function U(t) {
186
+ return t ? t === "linear" || t === "rounded" || t === "step" || t === "stepBefore" || t === "stepAfter" : !0;
187
+ }
188
+ y(U, "curveSupportsLineHops");
189
+ function j(t) {
190
+ if (!t)
191
+ return null;
192
+ try {
193
+ const e = typeof atob == "function" ? atob(t) : Buffer.from(t, "base64").toString(), s = JSON.parse(e);
194
+ if (!Array.isArray(s))
195
+ return null;
196
+ const a = [];
197
+ for (const r of s)
198
+ r && typeof r.x == "number" && typeof r.y == "number" && a.push({ x: r.x, y: r.y });
199
+ return a.length >= 2 ? a : null;
200
+ } catch {
201
+ return null;
202
+ }
203
+ }
204
+ y(j, "decodeDataPoints");
205
+ function F(t, e, s) {
206
+ if (!s.enabled)
207
+ return;
208
+ const a = t.node();
209
+ if (!a)
210
+ return;
211
+ const r = /* @__PURE__ */ new Map();
212
+ for (const n of e)
213
+ r.set(n.id, n);
214
+ const o = /* @__PURE__ */ new Map();
215
+ for (const n of a.querySelectorAll("path[data-id]")) {
216
+ const c = n.getAttribute("data-id");
217
+ c !== null && !o.has(c) && o.set(c, n);
218
+ }
219
+ const i = [];
220
+ for (const n of e) {
221
+ const c = o.get(n.id);
222
+ if (!c)
223
+ continue;
224
+ const f = j(c.getAttribute("data-points")) ?? n.points;
225
+ i.push({ ...n, points: f });
226
+ }
227
+ const d = _(i);
228
+ if (d.length === 0)
229
+ return;
230
+ const u = /* @__PURE__ */ new Map();
231
+ for (const n of d) {
232
+ const c = u.get(n.jumpEdgeId) ?? [];
233
+ c.push(n), u.set(n.jumpEdgeId, c);
234
+ }
235
+ for (const n of i) {
236
+ const c = u.get(n.id);
237
+ if (!c || c.length === 0)
238
+ continue;
239
+ const f = r.get(n.id)?.curve;
240
+ if (f !== void 0 && !U(f))
241
+ continue;
242
+ const g = o.get(n.id);
243
+ if (!g)
244
+ continue;
245
+ if (f === void 0) {
246
+ const x = g.getAttribute("d") ?? "";
247
+ if (!J(x))
248
+ continue;
249
+ }
250
+ const S = g.getAttribute("style") ?? "", b = /stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(
251
+ S
252
+ ), m = b ? Number.parseFloat(b[1]) : null, h = b ? Number.parseFloat(b[2]) : null, $ = H(n, c, s);
253
+ if (g.setAttribute("d", $), m !== null && h !== null && typeof g.getTotalLength == "function") {
254
+ const x = g.getTotalLength(), l = Math.max(0, x - m - h), E = `0 ${m} ${l} ${h}`, I = S.replace(/stroke-dasharray\s*:[^;]*;?/g, `stroke-dasharray: ${E};`).replace(/;\s*;+/g, ";");
255
+ g.setAttribute("style", I);
256
+ }
257
+ }
258
+ }
259
+ y(F, "applyLineJumpsToSvg");
260
+ export {
261
+ F as a
262
+ };
@@ -0,0 +1,68 @@
1
+ import { _ as i, k as l, a0 as d, S as o } from "./mermaid.core-DXv6D2Sm.js";
2
+ var x = /* @__PURE__ */ i((r, t) => {
3
+ const e = r.append("rect");
4
+ if (e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), t.name && e.attr("name", t.name), t.rx && e.attr("rx", t.rx), t.ry && e.attr("ry", t.ry), t.attrs !== void 0)
5
+ for (const s in t.attrs)
6
+ e.attr(s, t.attrs[s]);
7
+ return t.class && e.attr("class", t.class), e;
8
+ }, "drawRect"), p = /* @__PURE__ */ i((r, t) => {
9
+ const e = {
10
+ x: t.startx,
11
+ y: t.starty,
12
+ width: t.stopx - t.startx,
13
+ height: t.stopy - t.starty,
14
+ fill: t.fill,
15
+ stroke: t.stroke,
16
+ class: "rect"
17
+ };
18
+ x(r, e).lower();
19
+ }, "drawBackgroundRect"), y = /* @__PURE__ */ i((r, t) => {
20
+ const e = t.text.replace(d, " "), s = r.append("text");
21
+ s.attr("x", t.x), s.attr("y", t.y), s.attr("class", "legend"), s.style("text-anchor", t.anchor), t.class && s.attr("class", t.class);
22
+ const a = s.append("tspan");
23
+ return a.attr("x", t.x + t.textMargin * 2), a.text(e), s;
24
+ }, "drawText"), m = /* @__PURE__ */ i((r, t, e, s) => {
25
+ const a = r.append("image");
26
+ a.attr("x", t), a.attr("y", e);
27
+ const n = o.sanitizeUrl(s);
28
+ a.attr("xlink:href", n);
29
+ }, "drawImage"), g = /* @__PURE__ */ i((r, t, e, s) => {
30
+ const a = r.append("use");
31
+ a.attr("x", t), a.attr("y", e);
32
+ const n = o.sanitizeUrl(s);
33
+ a.attr("xlink:href", `#${n}`);
34
+ }, "drawEmbeddedImage"), h = /* @__PURE__ */ i(() => ({
35
+ x: 0,
36
+ y: 0,
37
+ width: 100,
38
+ height: 100,
39
+ fill: "#EDF2AE",
40
+ stroke: "#666",
41
+ anchor: "start",
42
+ rx: 0,
43
+ ry: 0
44
+ }), "getNoteRect"), f = /* @__PURE__ */ i(() => ({
45
+ x: 0,
46
+ y: 0,
47
+ width: 100,
48
+ height: 100,
49
+ "text-anchor": "start",
50
+ style: "#666",
51
+ textMargin: 0,
52
+ rx: 0,
53
+ ry: 0,
54
+ tspan: !0
55
+ }), "getTextObj"), w = /* @__PURE__ */ i(() => {
56
+ let r = l(".mermaidTooltip");
57
+ return r.empty() && (r = l("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0).style("position", "absolute").style("text-align", "center").style("max-width", "200px").style("padding", "2px").style("font-size", "12px").style("background", "#ffffde").style("border", "1px solid #333").style("border-radius", "2px").style("pointer-events", "none").style("z-index", "100")), r;
58
+ }, "createTooltip");
59
+ export {
60
+ p as a,
61
+ h as b,
62
+ w as c,
63
+ x as d,
64
+ g as e,
65
+ m as f,
66
+ f as g,
67
+ y as h
68
+ };
@@ -0,0 +1,19 @@
1
+ import { _ as e } from "./mermaid.core-DXv6D2Sm.js";
2
+ var l = /* @__PURE__ */ e(() => `
3
+ /* Font Awesome icon styling - consolidated */
4
+ .label-icon {
5
+ display: inline-block;
6
+ height: 1em;
7
+ overflow: visible;
8
+ vertical-align: -0.125em;
9
+ }
10
+
11
+ .node .label-icon path {
12
+ fill: currentColor;
13
+ stroke: revert;
14
+ stroke-width: revert;
15
+ }
16
+ `, "getIconStyles");
17
+ export {
18
+ l as g
19
+ };
@@ -0,0 +1,8 @@
1
+ import { _ as i } from "./mermaid.core-DXv6D2Sm.js";
2
+ function t(c, e) {
3
+ c.accDescr && e.setAccDescription?.(c.accDescr), c.accTitle && e.setAccTitle?.(c.accTitle), c.title && e.setDiagramTitle?.(c.title);
4
+ }
5
+ i(t, "populateCommonDb");
6
+ export {
7
+ t as p
8
+ };
@@ -0,0 +1,19 @@
1
+ import { _ as a, d as w, l as x } from "./mermaid.core-DXv6D2Sm.js";
2
+ var B = /* @__PURE__ */ a((e, t, i, r) => {
3
+ e.attr("class", i);
4
+ const { width: o, height: h, x: n, y: c } = u(e, t);
5
+ w(e, h, o, r);
6
+ const s = d(n, c, o, h, t);
7
+ e.attr("viewBox", s), x.debug(`viewBox configured: ${s} with padding: ${t}`);
8
+ }, "setupViewPortForSVG"), u = /* @__PURE__ */ a((e, t) => {
9
+ const i = e.node()?.getBBox() || { width: 0, height: 0, x: 0, y: 0 };
10
+ return {
11
+ width: i.width + t * 2,
12
+ height: i.height + t * 2,
13
+ x: i.x,
14
+ y: i.y
15
+ };
16
+ }, "calculateDimensionsWithPadding"), d = /* @__PURE__ */ a((e, t, i, r, o) => `${e - o} ${t - o} ${i} ${r}`, "createViewBox");
17
+ export {
18
+ B as s
19
+ };
@@ -0,0 +1,8 @@
1
+ import { _ as a, k as o } from "./mermaid.core-DXv6D2Sm.js";
2
+ var g = /* @__PURE__ */ a((t, e) => {
3
+ let n;
4
+ return e === "sandbox" && (n = o("#i" + t)), (e === "sandbox" ? o(n.nodes()[0].contentDocument.body) : o("body")).select(`[id="${t}"]`);
5
+ }, "getDiagramElement");
6
+ export {
7
+ g
8
+ };