@kong-ui-public/documentation 0.3.42 → 0.4.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 (155) hide show
  1. package/dist/Tableau10-GLA_9iAD-BMurskAd.js +9 -0
  2. package/dist/arc-BSRpyMf3-C5dasNo_.js +86 -0
  3. package/dist/array-CqVTtuYm-fKLgkG2b.js +6 -0
  4. package/dist/astro-mwoSwJnq-CNh-xuM0.js +27 -0
  5. package/dist/blockDiagram-6b2b5046-D02VCbQO-CPmGy0xX.js +1224 -0
  6. package/dist/c-eDnjw9rh-eDnjw9rh.js +87 -0
  7. package/dist/c4Diagram-b947cdbb-gYcL5VzP-DIDY83e1.js +1578 -0
  8. package/dist/channel-DHTQ8Ynn-7OPGex2S.js +5 -0
  9. package/dist/classDiagram-35230388-JdSKLSZv-D2crBRy-.js +217 -0
  10. package/dist/classDiagram-v2-412acd34-DFFRHXE_-B6aCxlD1.js +200 -0
  11. package/dist/clone-p6h9XXNm-3JQ-HRC6.js +8 -0
  12. package/dist/coffee-CRlSxcc3-CY091_1T.js +108 -0
  13. package/dist/cpp-DizfY48B-CA38N4Mn.js +208 -0
  14. package/dist/createText-423428c9-LivTKT7b-BXNfjcdp.js +2964 -0
  15. package/dist/csharp-uGDiXTZn-uGDiXTZn.js +762 -0
  16. package/dist/css-CAzixsid-CEpuX1HY.js +511 -0
  17. package/dist/csv-D4BoHddH-D4BoHddH.js +7 -0
  18. package/dist/diff-Bo5iyMQ2-Bo5iyMQ2.js +7 -0
  19. package/dist/docker-B10O2enb-B10O2enb.js +7 -0
  20. package/dist/documentation.es.js +5 -3130
  21. package/dist/documentation.umd.js +10152 -50
  22. package/dist/edges-d417c7a0-C1ggiwWz-Aj0OUf7e.js +1082 -0
  23. package/dist/erDiagram-0ea73325-mz0Z_-DA-Dr01LsTB.js +924 -0
  24. package/dist/flowDb-d35e309a-CPyxEMIt-lofeyUuw.js +1126 -0
  25. package/dist/flowDiagram-d949d7c1-DqCa0HNN-BK5wNO9Z.js +782 -0
  26. package/dist/flowDiagram-v2-49332944-UMosz1sZ-BG39AuNP.js +17 -0
  27. package/dist/flowchart-elk-definition-27cc417a-D2UKpS6N-r2p34307.js +48387 -0
  28. package/dist/ganttDiagram-5c869e3b-CVBHw4pG-CaG9QXQM.js +2490 -0
  29. package/dist/git-commit-CWf81VOF-DtOZSoIU.js +9 -0
  30. package/dist/git-rebase-sR-yVH_J-D5M2oE9O.js +9 -0
  31. package/dist/gitGraphDiagram-b9d81de9-BGm3fU0n-CbCpf-4j.js +1262 -0
  32. package/dist/go-BCCWZWY1-BCCWZWY1.js +7 -0
  33. package/dist/graph-4FyIWFHN-774TpNLL.js +870 -0
  34. package/dist/graphql-CT32SSoq-1pBWfpcR.js +18 -0
  35. package/dist/haml-8RvrfhLO-Bbc4xoLP.js +19 -0
  36. package/dist/handlebars-Cr5ro0bH-CLcCNLtV.js +15 -0
  37. package/dist/haskell-BfFu8DD8-BmkPJdLL.js +565 -0
  38. package/dist/html-BZB5lEhh-B74zAnWx.js +84 -0
  39. package/dist/html-derivative-0y7sV5Qc-D8-muTWn.js +9 -0
  40. package/dist/index-8fae9850-_CN7MNjP-Cq-s0PmS.js +373 -0
  41. package/dist/index-B-5DuDrq.js +29996 -0
  42. package/dist/infoDiagram-db7b18fc-V446j9uR-GSa8bniv.js +319 -0
  43. package/dist/ini-BsUFIxsI-BsUFIxsI.js +7 -0
  44. package/dist/init-DjUOC4st-C8Nwz6AJ.js +16 -0
  45. package/dist/java-Bk2JzfKB-Bk2JzfKB.js +74 -0
  46. package/dist/javascript-DqVBMyXe-DqVBMyXe.js +705 -0
  47. package/dist/journeyDiagram-d5636530-CFiu7dnV-DJMu6A22.js +803 -0
  48. package/dist/json-B12k4-6m-B12k4-6m.js +31 -0
  49. package/dist/json5-CvqQZK9I-CvqQZK9I.js +23 -0
  50. package/dist/jsonc-v2qGKRJY-v2qGKRJY.js +31 -0
  51. package/dist/jsonl-izxnMeZX-izxnMeZX.js +31 -0
  52. package/dist/jsx-aDp7j9_Z-aDp7j9_Z.js +705 -0
  53. package/dist/kotlin-NOMOielb-NOMOielb.js +7 -0
  54. package/dist/latex-Bw_ghldO-BlUAi6pB.js +339 -0
  55. package/dist/layout-2-aEcfuw-BqqWy5wB.js +1524 -0
  56. package/dist/less-CW2GmQHL-CW2GmQHL.js +165 -0
  57. package/dist/line-nVq5kEiy-DtZd3PHZ.js +34 -0
  58. package/dist/linear-Bz4oRFvQ-C869GXbm.js +447 -0
  59. package/dist/liquid-DJ2rh7oT-FwZwa67Y.js +28 -0
  60. package/dist/lua-5TZ-G8Be-CogscVHC.js +9 -0
  61. package/dist/make-whncTQWE-whncTQWE.js +7 -0
  62. package/dist/markdown-DYKdIx5--DYKdIx5-.js +135 -0
  63. package/dist/material-theme-lighter-BRE1Bis3-BRE1Bis3.js +769 -0
  64. package/dist/material-theme-palenight-Dhz61Tee-Dhz61Tee.js +769 -0
  65. package/dist/mdc-D0DPLwil-BfE3hy8_.js +88 -0
  66. package/dist/mdx-CKDMxEaL-CKDMxEaL.js +7 -0
  67. package/dist/mermaid-BxNM-z-u-BxNM-z-u.js +7 -0
  68. package/dist/mindmap-definition-377f8f1f-C2vFYDMs-B71SGbvx.js +19078 -0
  69. package/dist/nginx-C082G13W-vryM9k1W.js +9 -0
  70. package/dist/objective-c-BVtzkNiv-BVtzkNiv.js +115 -0
  71. package/dist/onig-BonMD2gC-BonMD2gC.js +4 -0
  72. package/dist/ordinal-MUacOSdK-B1MUT0BL.js +65 -0
  73. package/dist/pascal-CrvtytWS-CrvtytWS.js +7 -0
  74. package/dist/path-Crsf9Nsj-SiSjwXsf.js +91 -0
  75. package/dist/perl-D29UPKP6-Dez6-HRy.js +17 -0
  76. package/dist/php-D7Tl-iS7-BtPFrDEt.js +789 -0
  77. package/dist/pieDiagram-b0208e96-DhA_SoTh-CfDd9YdA.js +501 -0
  78. package/dist/plsql-8SPzZKaa-8SPzZKaa.js +7 -0
  79. package/dist/postcss-Cz2vjx_4-Cz2vjx_4.js +7 -0
  80. package/dist/powershell-B0buHCuS-B0buHCuS.js +7 -0
  81. package/dist/proto-6YaU_lta-6YaU_lta.js +7 -0
  82. package/dist/pug-DbFO7359-duYD8LVa.js +21 -0
  83. package/dist/python-BQXev0_W-BQXev0_W.js +524 -0
  84. package/dist/quadrantDiagram-0332be45-C8q96Ohm-DMblaqnx.js +903 -0
  85. package/dist/r-DU7Q70f1-DU7Q70f1.js +7 -0
  86. package/dist/reg-DoGLEyFr-DoGLEyFr.js +7 -0
  87. package/dist/requirementDiagram-bf7890df-D30zCZjB-B_JBC9RM.js +767 -0
  88. package/dist/rst-Bm1i8IkK-C9EaDq6g.js +26 -0
  89. package/dist/ruby-CZZKXaz8-BxaDEkRP.js +102 -0
  90. package/dist/rust-CIl6NRUt-CIl6NRUt.js +7 -0
  91. package/dist/sankeyDiagram-0acdec17-B4vNjMaS-Bauvtonp.js +816 -0
  92. package/dist/sass-LqXmC1Fh-LqXmC1Fh.js +8 -0
  93. package/dist/scss-DjxgF7f7-DGTzny6p.js +98 -0
  94. package/dist/sequenceDiagram-c18d009d-BniqGSPK-DuYYUmiZ.js +2201 -0
  95. package/dist/shellscript-CUUTQKn5-CUUTQKn5.js +7 -0
  96. package/dist/shellsession-BIPXtZci-D6avbCwN.js +9 -0
  97. package/dist/splunk-C0K00wNV-C0K00wNV.js +7 -0
  98. package/dist/sql-DkzN59UV-DkzN59UV.js +27 -0
  99. package/dist/ssh-config-BbWAW6SY-BbWAW6SY.js +7 -0
  100. package/dist/stateDiagram-43596fc0-F0V9suMd-L2Ywe-J_.js +266 -0
  101. package/dist/stateDiagram-v2-2ead4f9c-DUgJH8tF-BVo1q2i1.js +184 -0
  102. package/dist/style.css +1 -1
  103. package/dist/styles-6860f46c-Dflmq0ac-BRNSwis6.js +1089 -0
  104. package/dist/styles-7383a064-Dg7mXkpq-C4bItohl.js +430 -0
  105. package/dist/styles-b2c874b6-HpcOhE4Y-Bj0upXzO.js +960 -0
  106. package/dist/stylus-CAHdVuhm-CAHdVuhm.js +21 -0
  107. package/dist/svelte-DAxjO8Sh-D0e501jC.js +29 -0
  108. package/dist/svgDrawCommon-0ee1b4e9-CNkCfzsJ-Bz_doYLk.js +64 -0
  109. package/dist/swift-x2DVyVjN-Bz5PC9YM.js +550 -0
  110. package/dist/timeline-definition-d977decf-Cl38e_0g-D_Dlqa-R.js +794 -0
  111. package/dist/toml-Dbtbfmwk-Dbtbfmwk.js +75 -0
  112. package/dist/tsx-BmwsDeeh-BmwsDeeh.js +705 -0
  113. package/dist/twig-B_Gr-ODl-Cl9Q0GWo.js +58 -0
  114. package/dist/types/components/DocumentationContent.vue.d.ts +8 -1
  115. package/dist/types/components/DocumentationContent.vue.d.ts.map +1 -1
  116. package/dist/types/components/DocumentationDisplay.vue.d.ts +5 -1
  117. package/dist/types/components/DocumentationDisplay.vue.d.ts.map +1 -1
  118. package/dist/types/components/ProductDocumentModal.vue.d.ts +1 -1
  119. package/dist/types/components/ProductDocumentModal.vue.d.ts.map +1 -1
  120. package/dist/types/composables/useI18n.d.ts +4 -0
  121. package/dist/types/composables/useI18n.d.ts.map +1 -1
  122. package/dist/typescript-AEg-ehu7-AEg-ehu7.js +672 -0
  123. package/dist/v-BuvBsUKm-BuvBsUKm.js +7 -0
  124. package/dist/vb-cqjo5dul-cqjo5dul.js +7 -0
  125. package/dist/viml-h3ATW6He-h3ATW6He.js +7 -0
  126. package/dist/vue-Dz-azHaT-B9qBHMZi.js +71 -0
  127. package/dist/vue-html-DIGKAAs4-BeHSIJcx.js +11 -0
  128. package/dist/wasm-xOGcJ9Ts-xOGcJ9Ts.js +7 -0
  129. package/dist/wgsl-hGLOfCya-hGLOfCya.js +7 -0
  130. package/dist/xml-CfRpfi_B-BH3JRQfc.js +9 -0
  131. package/dist/xsl-BAqhSCYL-BTKPZRNQ.js +9 -0
  132. package/dist/xychartDiagram-e50adddc-JdLmRUgg-HmDalTeo.js +1282 -0
  133. package/dist/yaml-PGla5xPP-HJurM_FJ.js +206 -0
  134. package/package.json +13 -13
  135. package/dist/prism-bash.min-DDo5CyRs-DihCfXgx.js +0 -7
  136. package/dist/prism-css.min-BrrzZC7b-BrrzZC7b.js +0 -7
  137. package/dist/prism-docker.min-DnIEokC3-D0v8IWN_.js +0 -22
  138. package/dist/prism-go.min-C7UmK6TW-C7UmK6TW.js +0 -1
  139. package/dist/prism-http.min-CsU3-jB8-CQ8PCDXl.js +0 -23
  140. package/dist/prism-javascript.min-CEqHqgbm-CEqHqgbm.js +0 -8
  141. package/dist/prism-jq.min-Q555vXZm-Q555vXZm.js +0 -8
  142. package/dist/prism-json.min-B1GJqK1k-B1GJqK1k.js +0 -1
  143. package/dist/prism-log.min-SDopTpKN-SDopTpKN.js +0 -1
  144. package/dist/prism-lua.min-DwRnUVfS-DwRnUVfS.js +0 -1
  145. package/dist/prism-makefile.min-DyutknhE-DyutknhE.js +0 -1
  146. package/dist/prism-markdown.min-B7US-xc7-DB9aF_ZA.js +0 -63
  147. package/dist/prism-python.min-BIfpAh5K-BIfpAh5K.js +0 -1
  148. package/dist/prism-regex.min-f8DNqi8X-f8DNqi8X.js +0 -4
  149. package/dist/prism-rest.min-B6veHRJF-B6veHRJF.js +0 -1
  150. package/dist/prism-rust.min-Cb-Mi-h0-Cb-Mi-h0.js +0 -9
  151. package/dist/prism-scss.min-B0csyGJo-B0csyGJo.js +0 -1
  152. package/dist/prism-sql.min-BHXzX-c_-BHXzX-c_.js +0 -1
  153. package/dist/prism-typescript.min-oSVeWCAd-oSVeWCAd.js +0 -5
  154. package/dist/prism-xml-doc.min-yj0YzRGe-KgTQx-dc.js +0 -7
  155. package/dist/prism-yaml.min-CTetcdKA-C1YzP_OY.js +0 -28
@@ -0,0 +1,1082 @@
1
+ import { p as R, c as w, d as F, an as G, h as _, l as f, y as N, ao as lt } from "./index-B-5DuDrq.js";
2
+ import { U as nt } from "./createText-423428c9-LivTKT7b-BXNfjcdp.js";
3
+ import { P as ot } from "./line-nVq5kEiy-DtZd3PHZ.js";
4
+ const dt = (e, t, a, s) => {
5
+ t.forEach((l) => {
6
+ bt[l](e, a, s);
7
+ });
8
+ }, ht = (e, t, a) => {
9
+ f.trace("Making markers for ", a), e.append("defs").append("marker").attr("id", a + "_" + t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
10
+ }, ct = (e, t, a) => {
11
+ e.append("defs").append("marker").attr("id", a + "_" + t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
12
+ }, yt = (e, t, a) => {
13
+ e.append("defs").append("marker").attr("id", a + "_" + t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
14
+ }, pt = (e, t, a) => {
15
+ e.append("defs").append("marker").attr("id", a + "_" + t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", a + "_" + t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
16
+ }, gt = (e, t, a) => {
17
+ e.append("defs").append("marker").attr("id", a + "_" + t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", a + "_" + t + "-lollipopEnd").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
18
+ }, xt = (e, t, a) => {
19
+ e.append("marker").attr("id", a + "_" + t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", a + "_" + t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
20
+ }, ft = (e, t, a) => {
21
+ e.append("marker").attr("id", a + "_" + t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", a + "_" + t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
22
+ }, ut = (e, t, a) => {
23
+ e.append("marker").attr("id", a + "_" + t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", a + "_" + t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
24
+ }, wt = (e, t, a) => {
25
+ e.append("defs").append("marker").attr("id", a + "_" + t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
26
+ }, bt = {
27
+ extension: ht,
28
+ composition: ct,
29
+ aggregation: yt,
30
+ dependency: pt,
31
+ lollipop: gt,
32
+ point: xt,
33
+ circle: ft,
34
+ cross: ut,
35
+ barb: wt
36
+ }, dr = dt;
37
+ function mt(e, t) {
38
+ t && e.attr("style", t);
39
+ }
40
+ function kt(e) {
41
+ const t = _(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), a = t.append("xhtml:div"), s = e.label, l = e.isNode ? "nodeLabel" : "edgeLabel";
42
+ return a.html(
43
+ '<span class="' + l + '" ' + (e.labelStyle ? 'style="' + e.labelStyle + '"' : "") + ">" + s + "</span>"
44
+ ), mt(a, e.labelStyle), a.style("display", "inline-block"), a.style("white-space", "nowrap"), a.attr("xmlns", "http://www.w3.org/1999/xhtml"), t.node();
45
+ }
46
+ const Lt = (e, t, a, s) => {
47
+ let l = e || "";
48
+ if (typeof l == "object" && (l = l[0]), R(w().flowchart.htmlLabels)) {
49
+ l = l.replace(/\\n|\n/g, "<br />"), f.debug("vertexText" + l);
50
+ const r = {
51
+ isNode: s,
52
+ label: G(l).replace(
53
+ /fa[blrs]?:fa-[\w-]+/g,
54
+ (n) => `<i class='${n.replace(":", " ")}'></i>`
55
+ ),
56
+ labelStyle: t.replace("fill:", "color:")
57
+ };
58
+ return kt(r);
59
+ } else {
60
+ const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
61
+ r.setAttribute("style", t.replace("color:", "fill:"));
62
+ let n = [];
63
+ typeof l == "string" ? n = l.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(l) ? n = l : n = [];
64
+ for (const i of n) {
65
+ const o = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
66
+ o.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), o.setAttribute("dy", "1em"), o.setAttribute("x", "0"), a ? o.setAttribute("class", "title-row") : o.setAttribute("class", "row"), o.textContent = i.trim(), r.appendChild(o);
67
+ }
68
+ return r;
69
+ }
70
+ }, P = Lt, M = async (e, t, a, s) => {
71
+ let l;
72
+ const r = t.useHtmlLabels || R(w().flowchart.htmlLabels);
73
+ a ? l = a : l = "node default";
74
+ const n = e.insert("g").attr("class", l).attr("id", t.domId || t.id), i = n.insert("g").attr("class", "label").attr("style", t.labelStyle);
75
+ let o;
76
+ t.labelText === void 0 ? o = "" : o = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
77
+ const h = i.node();
78
+ let d;
79
+ t.labelType === "markdown" ? d = nt(i, F(G(o), w()), {
80
+ useHtmlLabels: r,
81
+ width: t.width || w().flowchart.wrappingWidth,
82
+ classes: "markdown-node-label"
83
+ }) : d = h.appendChild(
84
+ P(
85
+ F(G(o), w()),
86
+ t.labelStyle,
87
+ !1,
88
+ s
89
+ )
90
+ );
91
+ let c = d.getBBox();
92
+ const p = t.padding / 2;
93
+ if (R(w().flowchart.htmlLabels)) {
94
+ const y = d.children[0], x = _(d), k = y.getElementsByTagName("img");
95
+ if (k) {
96
+ const g = o.replace(/<img[^>]*>/g, "").trim() === "";
97
+ await Promise.all(
98
+ [...k].map(
99
+ (u) => new Promise((S) => {
100
+ function B() {
101
+ if (u.style.display = "flex", u.style.flexDirection = "column", g) {
102
+ const C = w().fontSize ? w().fontSize : window.getComputedStyle(document.body).fontSize, Y = parseInt(C, 10) * 5 + "px";
103
+ u.style.minWidth = Y, u.style.maxWidth = Y;
104
+ } else
105
+ u.style.width = "100%";
106
+ S(u);
107
+ }
108
+ setTimeout(() => {
109
+ u.complete && B();
110
+ }), u.addEventListener("error", B), u.addEventListener("load", B);
111
+ })
112
+ )
113
+ );
114
+ }
115
+ c = y.getBoundingClientRect(), x.attr("width", c.width), x.attr("height", c.height);
116
+ }
117
+ return r ? i.attr("transform", "translate(" + -c.width / 2 + ", " + -c.height / 2 + ")") : i.attr("transform", "translate(0, " + -c.height / 2 + ")"), t.centerLabel && i.attr("transform", "translate(" + -c.width / 2 + ", " + -c.height / 2 + ")"), i.insert("rect", ":first-child"), { shapeSvg: n, bbox: c, halfPadding: p, label: i };
118
+ }, m = (e, t) => {
119
+ const a = t.node().getBBox();
120
+ e.width = a.width, e.height = a.height;
121
+ };
122
+ function W(e, t, a, s) {
123
+ return e.insert("polygon", ":first-child").attr(
124
+ "points",
125
+ s.map(function(l) {
126
+ return l.x + "," + l.y;
127
+ }).join(" ")
128
+ ).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + a / 2 + ")");
129
+ }
130
+ function vt(e, t) {
131
+ return e.intersect(t);
132
+ }
133
+ function st(e, t, a, s) {
134
+ var l = e.x, r = e.y, n = l - s.x, i = r - s.y, o = Math.sqrt(t * t * i * i + a * a * n * n), h = Math.abs(t * a * n / o);
135
+ s.x < l && (h = -h);
136
+ var d = Math.abs(t * a * i / o);
137
+ return s.y < r && (d = -d), { x: l + h, y: r + d };
138
+ }
139
+ function St(e, t, a) {
140
+ return st(e, t, t, a);
141
+ }
142
+ function Mt(e, t, a, s) {
143
+ var l, r, n, i, o, h, d, c, p, y, x, k, g, u, S;
144
+ if (l = t.y - e.y, n = e.x - t.x, o = t.x * e.y - e.x * t.y, p = l * a.x + n * a.y + o, y = l * s.x + n * s.y + o, !(p !== 0 && y !== 0 && J(p, y)) && (r = s.y - a.y, i = a.x - s.x, h = s.x * a.y - a.x * s.y, d = r * e.x + i * e.y + h, c = r * t.x + i * t.y + h, !(d !== 0 && c !== 0 && J(d, c)) && (x = l * i - r * n, x !== 0)))
145
+ return k = Math.abs(x / 2), g = n * h - i * o, u = g < 0 ? (g - k) / x : (g + k) / x, g = r * o - l * h, S = g < 0 ? (g - k) / x : (g + k) / x, { x: u, y: S };
146
+ }
147
+ function J(e, t) {
148
+ return e * t > 0;
149
+ }
150
+ function Tt(e, t, a) {
151
+ var s = e.x, l = e.y, r = [], n = Number.POSITIVE_INFINITY, i = Number.POSITIVE_INFINITY;
152
+ typeof t.forEach == "function" ? t.forEach(function(x) {
153
+ n = Math.min(n, x.x), i = Math.min(i, x.y);
154
+ }) : (n = Math.min(n, t.x), i = Math.min(i, t.y));
155
+ for (var o = s - e.width / 2 - n, h = l - e.height / 2 - i, d = 0; d < t.length; d++) {
156
+ var c = t[d], p = t[d < t.length - 1 ? d + 1 : 0], y = Mt(
157
+ e,
158
+ a,
159
+ { x: o + c.x, y: h + c.y },
160
+ { x: o + p.x, y: h + p.y }
161
+ );
162
+ y && r.push(y);
163
+ }
164
+ return r.length ? (r.length > 1 && r.sort(function(x, k) {
165
+ var g = x.x - a.x, u = x.y - a.y, S = Math.sqrt(g * g + u * u), B = k.x - a.x, C = k.y - a.y, Y = Math.sqrt(B * B + C * C);
166
+ return S < Y ? -1 : S === Y ? 0 : 1;
167
+ }), r[0]) : e;
168
+ }
169
+ const Bt = (e, t) => {
170
+ var a = e.x, s = e.y, l = t.x - a, r = t.y - s, n = e.width / 2, i = e.height / 2, o, h;
171
+ return Math.abs(r) * n > Math.abs(l) * i ? (r < 0 && (i = -i), o = r === 0 ? 0 : i * l / r, h = i) : (l < 0 && (n = -n), o = n, h = l === 0 ? 0 : n * r / l), { x: a + o, y: s + h };
172
+ }, _t = Bt, b = {
173
+ node: vt,
174
+ circle: St,
175
+ ellipse: st,
176
+ polygon: Tt,
177
+ rect: _t
178
+ }, Ct = async (e, t) => {
179
+ t.useHtmlLabels || w().flowchart.htmlLabels || (t.centerLabel = !0);
180
+ const { shapeSvg: a, bbox: s, halfPadding: l } = await M(
181
+ e,
182
+ t,
183
+ "node " + t.classes,
184
+ !0
185
+ );
186
+ f.info("Classes = ", t.classes);
187
+ const r = a.insert("rect", ":first-child");
188
+ return r.attr("rx", t.rx).attr("ry", t.ry).attr("x", -s.width / 2 - l).attr("y", -s.height / 2 - l).attr("width", s.width + t.padding).attr("height", s.height + t.padding), m(t, r), t.intersect = function(n) {
189
+ return b.rect(t, n);
190
+ }, a;
191
+ }, $t = Ct, Et = (e) => {
192
+ const t = /* @__PURE__ */ new Set();
193
+ for (const a of e)
194
+ switch (a) {
195
+ case "x":
196
+ t.add("right"), t.add("left");
197
+ break;
198
+ case "y":
199
+ t.add("up"), t.add("down");
200
+ break;
201
+ default:
202
+ t.add(a);
203
+ break;
204
+ }
205
+ return t;
206
+ }, Pt = (e, t, a) => {
207
+ const s = Et(e), l = 2, r = t.height + 2 * a.padding, n = r / l, i = t.width + 2 * n + a.padding, o = a.padding / 2;
208
+ return s.has("right") && s.has("left") && s.has("up") && s.has("down") ? [
209
+ // Bottom
210
+ { x: 0, y: 0 },
211
+ { x: n, y: 0 },
212
+ { x: i / 2, y: 2 * o },
213
+ { x: i - n, y: 0 },
214
+ { x: i, y: 0 },
215
+ // Right
216
+ { x: i, y: -r / 3 },
217
+ { x: i + 2 * o, y: -r / 2 },
218
+ { x: i, y: -2 * r / 3 },
219
+ { x: i, y: -r },
220
+ // Top
221
+ { x: i - n, y: -r },
222
+ { x: i / 2, y: -r - 2 * o },
223
+ { x: n, y: -r },
224
+ // Left
225
+ { x: 0, y: -r },
226
+ { x: 0, y: -2 * r / 3 },
227
+ { x: -2 * o, y: -r / 2 },
228
+ { x: 0, y: -r / 3 }
229
+ ] : s.has("right") && s.has("left") && s.has("up") ? [
230
+ { x: n, y: 0 },
231
+ { x: i - n, y: 0 },
232
+ { x: i, y: -r / 2 },
233
+ { x: i - n, y: -r },
234
+ { x: n, y: -r },
235
+ { x: 0, y: -r / 2 }
236
+ ] : s.has("right") && s.has("left") && s.has("down") ? [
237
+ { x: 0, y: 0 },
238
+ { x: n, y: -r },
239
+ { x: i - n, y: -r },
240
+ { x: i, y: 0 }
241
+ ] : s.has("right") && s.has("up") && s.has("down") ? [
242
+ { x: 0, y: 0 },
243
+ { x: i, y: -n },
244
+ { x: i, y: -r + n },
245
+ { x: 0, y: -r }
246
+ ] : s.has("left") && s.has("up") && s.has("down") ? [
247
+ { x: i, y: 0 },
248
+ { x: 0, y: -n },
249
+ { x: 0, y: -r + n },
250
+ { x: i, y: -r }
251
+ ] : s.has("right") && s.has("left") ? [
252
+ { x: n, y: 0 },
253
+ { x: n, y: -o },
254
+ { x: i - n, y: -o },
255
+ { x: i - n, y: 0 },
256
+ { x: i, y: -r / 2 },
257
+ { x: i - n, y: -r },
258
+ { x: i - n, y: -r + o },
259
+ { x: n, y: -r + o },
260
+ { x: n, y: -r },
261
+ { x: 0, y: -r / 2 }
262
+ ] : s.has("up") && s.has("down") ? [
263
+ // Bottom center
264
+ { x: i / 2, y: 0 },
265
+ // Left pont of bottom arrow
266
+ { x: 0, y: -o },
267
+ { x: n, y: -o },
268
+ // Left top over vertical section
269
+ { x: n, y: -r + o },
270
+ { x: 0, y: -r + o },
271
+ // Top of arrow
272
+ { x: i / 2, y: -r },
273
+ { x: i, y: -r + o },
274
+ // Top of right vertical bar
275
+ { x: i - n, y: -r + o },
276
+ { x: i - n, y: -o },
277
+ { x: i, y: -o }
278
+ ] : s.has("right") && s.has("up") ? [
279
+ { x: 0, y: 0 },
280
+ { x: i, y: -n },
281
+ { x: 0, y: -r }
282
+ ] : s.has("right") && s.has("down") ? [
283
+ { x: 0, y: 0 },
284
+ { x: i, y: 0 },
285
+ { x: 0, y: -r }
286
+ ] : s.has("left") && s.has("up") ? [
287
+ { x: i, y: 0 },
288
+ { x: 0, y: -n },
289
+ { x: i, y: -r }
290
+ ] : s.has("left") && s.has("down") ? [
291
+ { x: i, y: 0 },
292
+ { x: 0, y: 0 },
293
+ { x: i, y: -r }
294
+ ] : s.has("right") ? [
295
+ { x: n, y: -o },
296
+ { x: n, y: -o },
297
+ { x: i - n, y: -o },
298
+ { x: i - n, y: 0 },
299
+ { x: i, y: -r / 2 },
300
+ { x: i - n, y: -r },
301
+ { x: i - n, y: -r + o },
302
+ // top left corner of arrow
303
+ { x: n, y: -r + o },
304
+ { x: n, y: -r + o }
305
+ ] : s.has("left") ? [
306
+ { x: n, y: 0 },
307
+ { x: n, y: -o },
308
+ // Two points, the right corners
309
+ { x: i - n, y: -o },
310
+ { x: i - n, y: -r + o },
311
+ { x: n, y: -r + o },
312
+ { x: n, y: -r },
313
+ { x: 0, y: -r / 2 }
314
+ ] : s.has("up") ? [
315
+ // Bottom center
316
+ { x: n, y: -o },
317
+ // Left top over vertical section
318
+ { x: n, y: -r + o },
319
+ { x: 0, y: -r + o },
320
+ // Top of arrow
321
+ { x: i / 2, y: -r },
322
+ { x: i, y: -r + o },
323
+ // Top of right vertical bar
324
+ { x: i - n, y: -r + o },
325
+ { x: i - n, y: -o }
326
+ ] : s.has("down") ? [
327
+ // Bottom center
328
+ { x: i / 2, y: 0 },
329
+ // Left pont of bottom arrow
330
+ { x: 0, y: -o },
331
+ { x: n, y: -o },
332
+ // Left top over vertical section
333
+ { x: n, y: -r + o },
334
+ { x: i - n, y: -r + o },
335
+ { x: i - n, y: -o },
336
+ { x: i, y: -o }
337
+ ] : [{ x: 0, y: 0 }];
338
+ }, Q = (e) => e ? " " + e : "", E = (e, t) => `${t || "node default"}${Q(e.classes)} ${Q(
339
+ e.class
340
+ )}`, K = async (e, t) => {
341
+ const { shapeSvg: a, bbox: s } = await M(
342
+ e,
343
+ t,
344
+ E(t, void 0),
345
+ !0
346
+ ), l = s.width + t.padding, r = s.height + t.padding, n = l + r, i = [
347
+ { x: n / 2, y: 0 },
348
+ { x: n, y: -n / 2 },
349
+ { x: n / 2, y: -n },
350
+ { x: 0, y: -n / 2 }
351
+ ];
352
+ f.info("Question main (Circle)");
353
+ const o = W(a, n, n, i);
354
+ return o.attr("style", t.style), m(t, o), t.intersect = function(h) {
355
+ return f.warn("Intersect called"), b.polygon(t, i, h);
356
+ }, a;
357
+ }, Rt = (e, t) => {
358
+ const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), s = 28, l = [
359
+ { x: 0, y: s / 2 },
360
+ { x: s / 2, y: 0 },
361
+ { x: 0, y: -s / 2 },
362
+ { x: -s / 2, y: 0 }
363
+ ];
364
+ return a.insert("polygon", ":first-child").attr(
365
+ "points",
366
+ l.map(function(r) {
367
+ return r.x + "," + r.y;
368
+ }).join(" ")
369
+ ).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(r) {
370
+ return b.circle(t, 14, r);
371
+ }, a;
372
+ }, Wt = async (e, t) => {
373
+ const { shapeSvg: a, bbox: s } = await M(
374
+ e,
375
+ t,
376
+ E(t, void 0),
377
+ !0
378
+ ), l = 4, r = s.height + t.padding, n = r / l, i = s.width + 2 * n + t.padding, o = [
379
+ { x: n, y: 0 },
380
+ { x: i - n, y: 0 },
381
+ { x: i, y: -r / 2 },
382
+ { x: i - n, y: -r },
383
+ { x: n, y: -r },
384
+ { x: 0, y: -r / 2 }
385
+ ], h = W(a, i, r, o);
386
+ return h.attr("style", t.style), m(t, h), t.intersect = function(d) {
387
+ return b.polygon(t, o, d);
388
+ }, a;
389
+ }, Xt = async (e, t) => {
390
+ const { shapeSvg: a, bbox: s } = await M(e, t, void 0, !0), l = 2, r = s.height + 2 * t.padding, n = r / l, i = s.width + 2 * n + t.padding, o = Pt(t.directions, s, t), h = W(a, i, r, o);
391
+ return h.attr("style", t.style), m(t, h), t.intersect = function(d) {
392
+ return b.polygon(t, o, d);
393
+ }, a;
394
+ }, Yt = async (e, t) => {
395
+ const { shapeSvg: a, bbox: s } = await M(
396
+ e,
397
+ t,
398
+ E(t, void 0),
399
+ !0
400
+ ), l = s.width + t.padding, r = s.height + t.padding, n = [
401
+ { x: -r / 2, y: 0 },
402
+ { x: l, y: 0 },
403
+ { x: l, y: -r },
404
+ { x: -r / 2, y: -r },
405
+ { x: 0, y: -r / 2 }
406
+ ];
407
+ return W(a, l, r, n).attr("style", t.style), t.width = l + r, t.height = r, t.intersect = function(i) {
408
+ return b.polygon(t, n, i);
409
+ }, a;
410
+ }, Ot = async (e, t) => {
411
+ const { shapeSvg: a, bbox: s } = await M(e, t, E(t), !0), l = s.width + t.padding, r = s.height + t.padding, n = [
412
+ { x: -2 * r / 6, y: 0 },
413
+ { x: l - r / 6, y: 0 },
414
+ { x: l + 2 * r / 6, y: -r },
415
+ { x: r / 6, y: -r }
416
+ ], i = W(a, l, r, n);
417
+ return i.attr("style", t.style), m(t, i), t.intersect = function(o) {
418
+ return b.polygon(t, n, o);
419
+ }, a;
420
+ }, It = async (e, t) => {
421
+ const { shapeSvg: a, bbox: s } = await M(
422
+ e,
423
+ t,
424
+ E(t, void 0),
425
+ !0
426
+ ), l = s.width + t.padding, r = s.height + t.padding, n = [
427
+ { x: 2 * r / 6, y: 0 },
428
+ { x: l + r / 6, y: 0 },
429
+ { x: l - 2 * r / 6, y: -r },
430
+ { x: -r / 6, y: -r }
431
+ ], i = W(a, l, r, n);
432
+ return i.attr("style", t.style), m(t, i), t.intersect = function(o) {
433
+ return b.polygon(t, n, o);
434
+ }, a;
435
+ }, Dt = async (e, t) => {
436
+ const { shapeSvg: a, bbox: s } = await M(
437
+ e,
438
+ t,
439
+ E(t, void 0),
440
+ !0
441
+ ), l = s.width + t.padding, r = s.height + t.padding, n = [
442
+ { x: -2 * r / 6, y: 0 },
443
+ { x: l + 2 * r / 6, y: 0 },
444
+ { x: l - r / 6, y: -r },
445
+ { x: r / 6, y: -r }
446
+ ], i = W(a, l, r, n);
447
+ return i.attr("style", t.style), m(t, i), t.intersect = function(o) {
448
+ return b.polygon(t, n, o);
449
+ }, a;
450
+ }, Ht = async (e, t) => {
451
+ const { shapeSvg: a, bbox: s } = await M(
452
+ e,
453
+ t,
454
+ E(t, void 0),
455
+ !0
456
+ ), l = s.width + t.padding, r = s.height + t.padding, n = [
457
+ { x: r / 6, y: 0 },
458
+ { x: l - r / 6, y: 0 },
459
+ { x: l + 2 * r / 6, y: -r },
460
+ { x: -2 * r / 6, y: -r }
461
+ ], i = W(a, l, r, n);
462
+ return i.attr("style", t.style), m(t, i), t.intersect = function(o) {
463
+ return b.polygon(t, n, o);
464
+ }, a;
465
+ }, Nt = async (e, t) => {
466
+ const { shapeSvg: a, bbox: s } = await M(
467
+ e,
468
+ t,
469
+ E(t, void 0),
470
+ !0
471
+ ), l = s.width + t.padding, r = s.height + t.padding, n = [
472
+ { x: 0, y: 0 },
473
+ { x: l + r / 2, y: 0 },
474
+ { x: l, y: -r / 2 },
475
+ { x: l + r / 2, y: -r },
476
+ { x: 0, y: -r }
477
+ ], i = W(a, l, r, n);
478
+ return i.attr("style", t.style), m(t, i), t.intersect = function(o) {
479
+ return b.polygon(t, n, o);
480
+ }, a;
481
+ }, Ut = async (e, t) => {
482
+ const { shapeSvg: a, bbox: s } = await M(
483
+ e,
484
+ t,
485
+ E(t, void 0),
486
+ !0
487
+ ), l = s.width + t.padding, r = l / 2, n = r / (2.5 + l / 50), i = s.height + n + t.padding, o = "M 0," + n + " a " + r + "," + n + " 0,0,0 " + l + " 0 a " + r + "," + n + " 0,0,0 " + -l + " 0 l 0," + i + " a " + r + "," + n + " 0,0,0 " + l + " 0 l 0," + -i, h = a.attr("label-offset-y", n).insert("path", ":first-child").attr("style", t.style).attr("d", o).attr("transform", "translate(" + -l / 2 + "," + -(i / 2 + n) + ")");
488
+ return m(t, h), t.intersect = function(d) {
489
+ const c = b.rect(t, d), p = c.x - t.x;
490
+ if (r != 0 && (Math.abs(p) < t.width / 2 || Math.abs(p) == t.width / 2 && Math.abs(c.y - t.y) > t.height / 2 - n)) {
491
+ let y = n * n * (1 - p * p / (r * r));
492
+ y != 0 && (y = Math.sqrt(y)), y = n - y, d.y - t.y > 0 && (y = -y), c.y += y;
493
+ }
494
+ return c;
495
+ }, a;
496
+ }, jt = async (e, t) => {
497
+ const { shapeSvg: a, bbox: s, halfPadding: l } = await M(
498
+ e,
499
+ t,
500
+ "node " + t.classes + " " + t.class,
501
+ !0
502
+ ), r = a.insert("rect", ":first-child"), n = t.positioned ? t.width : s.width + t.padding, i = t.positioned ? t.height : s.height + t.padding, o = t.positioned ? -n / 2 : -s.width / 2 - l, h = t.positioned ? -i / 2 : -s.height / 2 - l;
503
+ if (r.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", o).attr("y", h).attr("width", n).attr("height", i), t.props) {
504
+ const d = new Set(Object.keys(t.props));
505
+ t.props.borders && (q(r, t.props.borders, n, i), d.delete("borders")), d.forEach((c) => {
506
+ f.warn(`Unknown node property ${c}`);
507
+ });
508
+ }
509
+ return m(t, r), t.intersect = function(d) {
510
+ return b.rect(t, d);
511
+ }, a;
512
+ }, At = async (e, t) => {
513
+ const { shapeSvg: a, bbox: s, halfPadding: l } = await M(
514
+ e,
515
+ t,
516
+ "node " + t.classes,
517
+ !0
518
+ ), r = a.insert("rect", ":first-child"), n = t.positioned ? t.width : s.width + t.padding, i = t.positioned ? t.height : s.height + t.padding, o = t.positioned ? -n / 2 : -s.width / 2 - l, h = t.positioned ? -i / 2 : -s.height / 2 - l;
519
+ if (r.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", o).attr("y", h).attr("width", n).attr("height", i), t.props) {
520
+ const d = new Set(Object.keys(t.props));
521
+ t.props.borders && (q(r, t.props.borders, n, i), d.delete("borders")), d.forEach((c) => {
522
+ f.warn(`Unknown node property ${c}`);
523
+ });
524
+ }
525
+ return m(t, r), t.intersect = function(d) {
526
+ return b.rect(t, d);
527
+ }, a;
528
+ }, Zt = async (e, t) => {
529
+ const { shapeSvg: a } = await M(e, t, "label", !0);
530
+ f.trace("Classes = ", t.class);
531
+ const s = a.insert("rect", ":first-child"), l = 0, r = 0;
532
+ if (s.attr("width", l).attr("height", r), a.attr("class", "label edgeLabel"), t.props) {
533
+ const n = new Set(Object.keys(t.props));
534
+ t.props.borders && (q(s, t.props.borders, l, r), n.delete("borders")), n.forEach((i) => {
535
+ f.warn(`Unknown node property ${i}`);
536
+ });
537
+ }
538
+ return m(t, s), t.intersect = function(n) {
539
+ return b.rect(t, n);
540
+ }, a;
541
+ };
542
+ function q(e, t, a, s) {
543
+ const l = [], r = (i) => {
544
+ l.push(i, 0);
545
+ }, n = (i) => {
546
+ l.push(0, i);
547
+ };
548
+ t.includes("t") ? (f.debug("add top border"), r(a)) : n(a), t.includes("r") ? (f.debug("add right border"), r(s)) : n(s), t.includes("b") ? (f.debug("add bottom border"), r(a)) : n(a), t.includes("l") ? (f.debug("add left border"), r(s)) : n(s), e.attr("stroke-dasharray", l.join(" "));
549
+ }
550
+ const zt = (e, t) => {
551
+ let a;
552
+ t.classes ? a = "node " + t.classes : a = "node default";
553
+ const s = e.insert("g").attr("class", a).attr("id", t.domId || t.id), l = s.insert("rect", ":first-child"), r = s.insert("line"), n = s.insert("g").attr("class", "label"), i = t.labelText.flat ? t.labelText.flat() : t.labelText;
554
+ let o = "";
555
+ typeof i == "object" ? o = i[0] : o = i, f.info("Label text abc79", o, i, typeof i == "object");
556
+ const h = n.node().appendChild(P(o, t.labelStyle, !0, !0));
557
+ let d = { width: 0, height: 0 };
558
+ if (R(w().flowchart.htmlLabels)) {
559
+ const k = h.children[0], g = _(h);
560
+ d = k.getBoundingClientRect(), g.attr("width", d.width), g.attr("height", d.height);
561
+ }
562
+ f.info("Text 2", i);
563
+ const c = i.slice(1, i.length);
564
+ let p = h.getBBox();
565
+ const y = n.node().appendChild(
566
+ P(c.join ? c.join("<br/>") : c, t.labelStyle, !0, !0)
567
+ );
568
+ if (R(w().flowchart.htmlLabels)) {
569
+ const k = y.children[0], g = _(y);
570
+ d = k.getBoundingClientRect(), g.attr("width", d.width), g.attr("height", d.height);
571
+ }
572
+ const x = t.padding / 2;
573
+ return _(y).attr(
574
+ "transform",
575
+ "translate( " + // (titleBox.width - bbox.width) / 2 +
576
+ (d.width > p.width ? 0 : (p.width - d.width) / 2) + ", " + (p.height + x + 5) + ")"
577
+ ), _(h).attr(
578
+ "transform",
579
+ "translate( " + // (titleBox.width - bbox.width) / 2 +
580
+ (d.width < p.width ? 0 : -(p.width - d.width) / 2) + ", 0)"
581
+ ), d = n.node().getBBox(), n.attr(
582
+ "transform",
583
+ "translate(" + -d.width / 2 + ", " + (-d.height / 2 - x + 3) + ")"
584
+ ), l.attr("class", "outer title-state").attr("x", -d.width / 2 - x).attr("y", -d.height / 2 - x).attr("width", d.width + t.padding).attr("height", d.height + t.padding), r.attr("class", "divider").attr("x1", -d.width / 2 - x).attr("x2", d.width / 2 + x).attr("y1", -d.height / 2 - x + p.height + x).attr("y2", -d.height / 2 - x + p.height + x), m(t, l), t.intersect = function(k) {
585
+ return b.rect(t, k);
586
+ }, s;
587
+ }, Gt = async (e, t) => {
588
+ const { shapeSvg: a, bbox: s } = await M(
589
+ e,
590
+ t,
591
+ E(t, void 0),
592
+ !0
593
+ ), l = s.height + t.padding, r = s.width + l / 4 + t.padding, n = a.insert("rect", ":first-child").attr("style", t.style).attr("rx", l / 2).attr("ry", l / 2).attr("x", -r / 2).attr("y", -l / 2).attr("width", r).attr("height", l);
594
+ return m(t, n), t.intersect = function(i) {
595
+ return b.rect(t, i);
596
+ }, a;
597
+ }, qt = async (e, t) => {
598
+ const { shapeSvg: a, bbox: s, halfPadding: l } = await M(
599
+ e,
600
+ t,
601
+ E(t, void 0),
602
+ !0
603
+ ), r = a.insert("circle", ":first-child");
604
+ return r.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", s.width / 2 + l).attr("width", s.width + t.padding).attr("height", s.height + t.padding), f.info("Circle main"), m(t, r), t.intersect = function(n) {
605
+ return f.info("Circle intersect", t, s.width / 2 + l, n), b.circle(t, s.width / 2 + l, n);
606
+ }, a;
607
+ }, Vt = async (e, t) => {
608
+ const { shapeSvg: a, bbox: s, halfPadding: l } = await M(
609
+ e,
610
+ t,
611
+ E(t, void 0),
612
+ !0
613
+ ), r = 5, n = a.insert("g", ":first-child"), i = n.insert("circle"), o = n.insert("circle");
614
+ return n.attr("class", t.class), i.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", s.width / 2 + l + r).attr("width", s.width + t.padding + r * 2).attr("height", s.height + t.padding + r * 2), o.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", s.width / 2 + l).attr("width", s.width + t.padding).attr("height", s.height + t.padding), f.info("DoubleCircle main"), m(t, i), t.intersect = function(h) {
615
+ return f.info("DoubleCircle intersect", t, s.width / 2 + l + r, h), b.circle(t, s.width / 2 + l + r, h);
616
+ }, a;
617
+ }, Ft = async (e, t) => {
618
+ const { shapeSvg: a, bbox: s } = await M(
619
+ e,
620
+ t,
621
+ E(t, void 0),
622
+ !0
623
+ ), l = s.width + t.padding, r = s.height + t.padding, n = [
624
+ { x: 0, y: 0 },
625
+ { x: l, y: 0 },
626
+ { x: l, y: -r },
627
+ { x: 0, y: -r },
628
+ { x: 0, y: 0 },
629
+ { x: -8, y: 0 },
630
+ { x: l + 8, y: 0 },
631
+ { x: l + 8, y: -r },
632
+ { x: -8, y: -r },
633
+ { x: -8, y: 0 }
634
+ ], i = W(a, l, r, n);
635
+ return i.attr("style", t.style), m(t, i), t.intersect = function(o) {
636
+ return b.polygon(t, n, o);
637
+ }, a;
638
+ }, Jt = (e, t) => {
639
+ const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), s = a.insert("circle", ":first-child");
640
+ return s.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), m(t, s), t.intersect = function(l) {
641
+ return b.circle(t, 7, l);
642
+ }, a;
643
+ }, tt = (e, t, a) => {
644
+ const s = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
645
+ let l = 70, r = 10;
646
+ a === "LR" && (l = 10, r = 70);
647
+ const n = s.append("rect").attr("x", -1 * l / 2).attr("y", -1 * r / 2).attr("width", l).attr("height", r).attr("class", "fork-join");
648
+ return m(t, n), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(i) {
649
+ return b.rect(t, i);
650
+ }, s;
651
+ }, Qt = (e, t) => {
652
+ const a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), s = a.insert("circle", ":first-child"), l = a.insert("circle", ":first-child");
653
+ return l.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), s.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), m(t, l), t.intersect = function(r) {
654
+ return b.circle(t, 7, r);
655
+ }, a;
656
+ }, Kt = (e, t) => {
657
+ const a = t.padding / 2, s = 4, l = 8;
658
+ let r;
659
+ t.classes ? r = "node " + t.classes : r = "node default";
660
+ const n = e.insert("g").attr("class", r).attr("id", t.domId || t.id), i = n.insert("rect", ":first-child"), o = n.insert("line"), h = n.insert("line");
661
+ let d = 0, c = s;
662
+ const p = n.insert("g").attr("class", "label");
663
+ let y = 0;
664
+ const x = t.classData.annotations && t.classData.annotations[0], k = t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", g = p.node().appendChild(P(k, t.labelStyle, !0, !0));
665
+ let u = g.getBBox();
666
+ if (R(w().flowchart.htmlLabels)) {
667
+ const L = g.children[0], v = _(g);
668
+ u = L.getBoundingClientRect(), v.attr("width", u.width), v.attr("height", u.height);
669
+ }
670
+ t.classData.annotations[0] && (c += u.height + s, d += u.width);
671
+ let S = t.classData.label;
672
+ t.classData.type !== void 0 && t.classData.type !== "" && (w().flowchart.htmlLabels ? S += "&lt;" + t.classData.type + "&gt;" : S += "<" + t.classData.type + ">");
673
+ const B = p.node().appendChild(P(S, t.labelStyle, !0, !0));
674
+ _(B).attr("class", "classTitle");
675
+ let C = B.getBBox();
676
+ if (R(w().flowchart.htmlLabels)) {
677
+ const L = B.children[0], v = _(B);
678
+ C = L.getBoundingClientRect(), v.attr("width", C.width), v.attr("height", C.height);
679
+ }
680
+ c += C.height + s, C.width > d && (d = C.width);
681
+ const Y = [];
682
+ t.classData.members.forEach((L) => {
683
+ const v = L.getDisplayDetails();
684
+ let I = v.displayText;
685
+ w().flowchart.htmlLabels && (I = I.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
686
+ const X = p.node().appendChild(
687
+ P(
688
+ I,
689
+ v.cssStyle ? v.cssStyle : t.labelStyle,
690
+ !0,
691
+ !0
692
+ )
693
+ );
694
+ let $ = X.getBBox();
695
+ if (R(w().flowchart.htmlLabels)) {
696
+ const z = X.children[0], H = _(X);
697
+ $ = z.getBoundingClientRect(), H.attr("width", $.width), H.attr("height", $.height);
698
+ }
699
+ $.width > d && (d = $.width), c += $.height + s, Y.push(X);
700
+ }), c += l;
701
+ const V = [];
702
+ if (t.classData.methods.forEach((L) => {
703
+ const v = L.getDisplayDetails();
704
+ let I = v.displayText;
705
+ w().flowchart.htmlLabels && (I = I.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
706
+ const X = p.node().appendChild(
707
+ P(
708
+ I,
709
+ v.cssStyle ? v.cssStyle : t.labelStyle,
710
+ !0,
711
+ !0
712
+ )
713
+ );
714
+ let $ = X.getBBox();
715
+ if (R(w().flowchart.htmlLabels)) {
716
+ const z = X.children[0], H = _(X);
717
+ $ = z.getBoundingClientRect(), H.attr("width", $.width), H.attr("height", $.height);
718
+ }
719
+ $.width > d && (d = $.width), c += $.height + s, V.push(X);
720
+ }), c += l, x) {
721
+ let L = (d - u.width) / 2;
722
+ _(g).attr(
723
+ "transform",
724
+ "translate( " + (-1 * d / 2 + L) + ", " + -1 * c / 2 + ")"
725
+ ), y = u.height + s;
726
+ }
727
+ let it = (d - C.width) / 2;
728
+ return _(B).attr(
729
+ "transform",
730
+ "translate( " + (-1 * d / 2 + it) + ", " + (-1 * c / 2 + y) + ")"
731
+ ), y += C.height + s, o.attr("class", "divider").attr("x1", -d / 2 - a).attr("x2", d / 2 + a).attr("y1", -c / 2 - a + l + y).attr("y2", -c / 2 - a + l + y), y += l, Y.forEach((L) => {
732
+ _(L).attr(
733
+ "transform",
734
+ "translate( " + -d / 2 + ", " + (-1 * c / 2 + y + l / 2) + ")"
735
+ );
736
+ const v = L == null ? void 0 : L.getBBox();
737
+ y += ((v == null ? void 0 : v.height) ?? 0) + s;
738
+ }), y += l, h.attr("class", "divider").attr("x1", -d / 2 - a).attr("x2", d / 2 + a).attr("y1", -c / 2 - a + l + y).attr("y2", -c / 2 - a + l + y), y += l, V.forEach((L) => {
739
+ _(L).attr(
740
+ "transform",
741
+ "translate( " + -d / 2 + ", " + (-1 * c / 2 + y) + ")"
742
+ );
743
+ const v = L == null ? void 0 : L.getBBox();
744
+ y += ((v == null ? void 0 : v.height) ?? 0) + s;
745
+ }), i.attr("style", t.style).attr("class", "outer title-state").attr("x", -d / 2 - a).attr("y", -(c / 2) - a).attr("width", d + t.padding).attr("height", c + t.padding), m(t, i), t.intersect = function(L) {
746
+ return b.rect(t, L);
747
+ }, n;
748
+ }, rt = {
749
+ rhombus: K,
750
+ composite: At,
751
+ question: K,
752
+ rect: jt,
753
+ labelRect: Zt,
754
+ rectWithTitle: zt,
755
+ choice: Rt,
756
+ circle: qt,
757
+ doublecircle: Vt,
758
+ stadium: Gt,
759
+ hexagon: Wt,
760
+ block_arrow: Xt,
761
+ rect_left_inv_arrow: Yt,
762
+ lean_right: Ot,
763
+ lean_left: It,
764
+ trapezoid: Dt,
765
+ inv_trapezoid: Ht,
766
+ rect_right_inv_arrow: Nt,
767
+ cylinder: Ut,
768
+ start: Jt,
769
+ end: Qt,
770
+ note: $t,
771
+ subroutine: Ft,
772
+ fork: tt,
773
+ join: tt,
774
+ class_box: Kt
775
+ };
776
+ let D = {};
777
+ const hr = async (e, t, a) => {
778
+ let s, l;
779
+ if (t.link) {
780
+ let r;
781
+ w().securityLevel === "sandbox" ? r = "_top" : t.linkTarget && (r = t.linkTarget || "_blank"), s = e.insert("svg:a").attr("xlink:href", t.link).attr("target", r), l = await rt[t.shape](s, t, a);
782
+ } else
783
+ l = await rt[t.shape](e, t, a), s = l;
784
+ return t.tooltip && l.attr("title", t.tooltip), t.class && l.attr("class", "node default " + t.class), s.attr("data-node", "true"), s.attr("data-id", t.id), D[t.id] = s, t.haveCallback && D[t.id].attr("class", D[t.id].attr("class") + " clickable"), s;
785
+ }, cr = (e, t) => {
786
+ D[t.id] = e;
787
+ }, yr = () => {
788
+ D = {};
789
+ }, pr = (e) => {
790
+ const t = D[e.id];
791
+ f.trace(
792
+ "Transforming node",
793
+ e.diff,
794
+ e,
795
+ "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")"
796
+ );
797
+ const a = 8, s = e.diff || 0;
798
+ return e.clusterNode ? t.attr(
799
+ "transform",
800
+ "translate(" + (e.x + s - e.width / 2) + ", " + (e.y - e.height / 2 - a) + ")"
801
+ ) : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), s;
802
+ }, tr = ({
803
+ flowchart: e
804
+ }) => {
805
+ var t, a;
806
+ const s = ((t = e == null ? void 0 : e.subGraphTitleMargin) == null ? void 0 : t.top) ?? 0, l = ((a = e == null ? void 0 : e.subGraphTitleMargin) == null ? void 0 : a.bottom) ?? 0, r = s + l;
807
+ return {
808
+ subGraphTitleTopMargin: s,
809
+ subGraphTitleBottomMargin: l,
810
+ subGraphTitleTotalMargin: r
811
+ };
812
+ }, O = {
813
+ aggregation: 18,
814
+ extension: 18,
815
+ composition: 18,
816
+ dependency: 6,
817
+ lollipop: 13.5,
818
+ arrow_point: 5.3
819
+ };
820
+ function U(e, t) {
821
+ if (e === void 0 || t === void 0)
822
+ return { angle: 0, deltaX: 0, deltaY: 0 };
823
+ e = A(e), t = A(t);
824
+ const [a, s] = [e.x, e.y], [l, r] = [t.x, t.y], n = l - a, i = r - s;
825
+ return { angle: Math.atan(i / n), deltaX: n, deltaY: i };
826
+ }
827
+ const A = (e) => Array.isArray(e) ? { x: e[0], y: e[1] } : e, rr = (e) => ({
828
+ x: function(t, a, s) {
829
+ let l = 0;
830
+ if (a === 0 && Object.hasOwn(O, e.arrowTypeStart)) {
831
+ const { angle: r, deltaX: n } = U(s[0], s[1]);
832
+ l = O[e.arrowTypeStart] * Math.cos(r) * (n >= 0 ? 1 : -1);
833
+ } else if (a === s.length - 1 && Object.hasOwn(O, e.arrowTypeEnd)) {
834
+ const { angle: r, deltaX: n } = U(
835
+ s[s.length - 1],
836
+ s[s.length - 2]
837
+ );
838
+ l = O[e.arrowTypeEnd] * Math.cos(r) * (n >= 0 ? 1 : -1);
839
+ }
840
+ return A(t).x + l;
841
+ },
842
+ y: function(t, a, s) {
843
+ let l = 0;
844
+ if (a === 0 && Object.hasOwn(O, e.arrowTypeStart)) {
845
+ const { angle: r, deltaY: n } = U(s[0], s[1]);
846
+ l = O[e.arrowTypeStart] * Math.abs(Math.sin(r)) * (n >= 0 ? 1 : -1);
847
+ } else if (a === s.length - 1 && Object.hasOwn(O, e.arrowTypeEnd)) {
848
+ const { angle: r, deltaY: n } = U(
849
+ s[s.length - 1],
850
+ s[s.length - 2]
851
+ );
852
+ l = O[e.arrowTypeEnd] * Math.abs(Math.sin(r)) * (n >= 0 ? 1 : -1);
853
+ }
854
+ return A(t).y + l;
855
+ }
856
+ }), ar = (e, t, a, s, l) => {
857
+ t.arrowTypeStart && at(e, "start", t.arrowTypeStart, a, s, l), t.arrowTypeEnd && at(e, "end", t.arrowTypeEnd, a, s, l);
858
+ }, er = {
859
+ arrow_cross: "cross",
860
+ arrow_point: "point",
861
+ arrow_barb: "barb",
862
+ arrow_circle: "circle",
863
+ aggregation: "aggregation",
864
+ extension: "extension",
865
+ composition: "composition",
866
+ dependency: "dependency",
867
+ lollipop: "lollipop"
868
+ }, at = (e, t, a, s, l, r) => {
869
+ const n = er[a];
870
+ if (!n) {
871
+ f.warn(`Unknown arrow type: ${a}`);
872
+ return;
873
+ }
874
+ const i = t === "start" ? "Start" : "End";
875
+ e.attr(`marker-${t}`, `url(${s}#${l}_${r}-${n}${i})`);
876
+ };
877
+ let Z = {}, T = {};
878
+ const gr = () => {
879
+ Z = {}, T = {};
880
+ }, xr = (e, t) => {
881
+ const a = R(w().flowchart.htmlLabels), s = t.labelType === "markdown" ? nt(e, t.label, {
882
+ style: t.labelStyle,
883
+ useHtmlLabels: a,
884
+ addSvgBackground: !0
885
+ }) : P(t.label, t.labelStyle), l = e.insert("g").attr("class", "edgeLabel"), r = l.insert("g").attr("class", "label");
886
+ r.node().appendChild(s);
887
+ let n = s.getBBox();
888
+ if (a) {
889
+ const o = s.children[0], h = _(s);
890
+ n = o.getBoundingClientRect(), h.attr("width", n.width), h.attr("height", n.height);
891
+ }
892
+ r.attr("transform", "translate(" + -n.width / 2 + ", " + -n.height / 2 + ")"), Z[t.id] = l, t.width = n.width, t.height = n.height;
893
+ let i;
894
+ if (t.startLabelLeft) {
895
+ const o = P(t.startLabelLeft, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), d = h.insert("g").attr("class", "inner");
896
+ i = d.node().appendChild(o);
897
+ const c = o.getBBox();
898
+ d.attr("transform", "translate(" + -c.width / 2 + ", " + -c.height / 2 + ")"), T[t.id] || (T[t.id] = {}), T[t.id].startLeft = h, j(i, t.startLabelLeft);
899
+ }
900
+ if (t.startLabelRight) {
901
+ const o = P(t.startLabelRight, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), d = h.insert("g").attr("class", "inner");
902
+ i = h.node().appendChild(o), d.node().appendChild(o);
903
+ const c = o.getBBox();
904
+ d.attr("transform", "translate(" + -c.width / 2 + ", " + -c.height / 2 + ")"), T[t.id] || (T[t.id] = {}), T[t.id].startRight = h, j(i, t.startLabelRight);
905
+ }
906
+ if (t.endLabelLeft) {
907
+ const o = P(t.endLabelLeft, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), d = h.insert("g").attr("class", "inner");
908
+ i = d.node().appendChild(o);
909
+ const c = o.getBBox();
910
+ d.attr("transform", "translate(" + -c.width / 2 + ", " + -c.height / 2 + ")"), h.node().appendChild(o), T[t.id] || (T[t.id] = {}), T[t.id].endLeft = h, j(i, t.endLabelLeft);
911
+ }
912
+ if (t.endLabelRight) {
913
+ const o = P(t.endLabelRight, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), d = h.insert("g").attr("class", "inner");
914
+ i = d.node().appendChild(o);
915
+ const c = o.getBBox();
916
+ d.attr("transform", "translate(" + -c.width / 2 + ", " + -c.height / 2 + ")"), h.node().appendChild(o), T[t.id] || (T[t.id] = {}), T[t.id].endRight = h, j(i, t.endLabelRight);
917
+ }
918
+ return s;
919
+ };
920
+ function j(e, t) {
921
+ w().flowchart.htmlLabels && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
922
+ }
923
+ const fr = (e, t) => {
924
+ f.debug("Moving label abc88 ", e.id, e.label, Z[e.id], t);
925
+ let a = t.updatedPath ? t.updatedPath : t.originalPath;
926
+ const s = w(), { subGraphTitleTotalMargin: l } = tr(s);
927
+ if (e.label) {
928
+ const r = Z[e.id];
929
+ let n = e.x, i = e.y;
930
+ if (a) {
931
+ const o = N.calcLabelPosition(a);
932
+ f.debug(
933
+ "Moving label " + e.label + " from (",
934
+ n,
935
+ ",",
936
+ i,
937
+ ") to (",
938
+ o.x,
939
+ ",",
940
+ o.y,
941
+ ") abc88"
942
+ ), t.updatedPath && (n = o.x, i = o.y);
943
+ }
944
+ r.attr("transform", `translate(${n}, ${i + l / 2})`);
945
+ }
946
+ if (e.startLabelLeft) {
947
+ const r = T[e.id].startLeft;
948
+ let n = e.x, i = e.y;
949
+ if (a) {
950
+ const o = N.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", a);
951
+ n = o.x, i = o.y;
952
+ }
953
+ r.attr("transform", `translate(${n}, ${i})`);
954
+ }
955
+ if (e.startLabelRight) {
956
+ const r = T[e.id].startRight;
957
+ let n = e.x, i = e.y;
958
+ if (a) {
959
+ const o = N.calcTerminalLabelPosition(
960
+ e.arrowTypeStart ? 10 : 0,
961
+ "start_right",
962
+ a
963
+ );
964
+ n = o.x, i = o.y;
965
+ }
966
+ r.attr("transform", `translate(${n}, ${i})`);
967
+ }
968
+ if (e.endLabelLeft) {
969
+ const r = T[e.id].endLeft;
970
+ let n = e.x, i = e.y;
971
+ if (a) {
972
+ const o = N.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", a);
973
+ n = o.x, i = o.y;
974
+ }
975
+ r.attr("transform", `translate(${n}, ${i})`);
976
+ }
977
+ if (e.endLabelRight) {
978
+ const r = T[e.id].endRight;
979
+ let n = e.x, i = e.y;
980
+ if (a) {
981
+ const o = N.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", a);
982
+ n = o.x, i = o.y;
983
+ }
984
+ r.attr("transform", `translate(${n}, ${i})`);
985
+ }
986
+ }, nr = (e, t) => {
987
+ const a = e.x, s = e.y, l = Math.abs(t.x - a), r = Math.abs(t.y - s), n = e.width / 2, i = e.height / 2;
988
+ return l >= n || r >= i;
989
+ }, sr = (e, t, a) => {
990
+ f.debug(`intersection calc abc89:
991
+ outsidePoint: ${JSON.stringify(t)}
992
+ insidePoint : ${JSON.stringify(a)}
993
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
994
+ const s = e.x, l = e.y, r = Math.abs(s - a.x), n = e.width / 2;
995
+ let i = a.x < t.x ? n - r : n + r;
996
+ const o = e.height / 2, h = Math.abs(t.y - a.y), d = Math.abs(t.x - a.x);
997
+ if (Math.abs(l - t.y) * n > Math.abs(s - t.x) * o) {
998
+ let c = a.y < t.y ? t.y - o - l : l - o - t.y;
999
+ i = d * c / h;
1000
+ const p = {
1001
+ x: a.x < t.x ? a.x + i : a.x - d + i,
1002
+ y: a.y < t.y ? a.y + h - c : a.y - h + c
1003
+ };
1004
+ return i === 0 && (p.x = t.x, p.y = t.y), d === 0 && (p.x = t.x), h === 0 && (p.y = t.y), f.debug(`abc89 topp/bott calc, Q ${h}, q ${c}, R ${d}, r ${i}`, p), p;
1005
+ } else {
1006
+ a.x < t.x ? i = t.x - n - s : i = s - n - t.x;
1007
+ let c = h * i / d, p = a.x < t.x ? a.x + d - i : a.x - d + i, y = a.y < t.y ? a.y + c : a.y - c;
1008
+ return f.debug(`sides calc abc89, Q ${h}, q ${c}, R ${d}, r ${i}`, { _x: p, _y: y }), i === 0 && (p = t.x, y = t.y), d === 0 && (p = t.x), h === 0 && (y = t.y), { x: p, y };
1009
+ }
1010
+ }, et = (e, t) => {
1011
+ f.debug("abc88 cutPathAtIntersect", e, t);
1012
+ let a = [], s = e[0], l = !1;
1013
+ return e.forEach((r) => {
1014
+ if (!nr(t, r) && !l) {
1015
+ const n = sr(t, s, r);
1016
+ let i = !1;
1017
+ a.forEach((o) => {
1018
+ i = i || o.x === n.x && o.y === n.y;
1019
+ }), a.some((o) => o.x === n.x && o.y === n.y) || a.push(n), l = !0;
1020
+ } else
1021
+ s = r, l || a.push(r);
1022
+ }), a;
1023
+ }, ur = function(e, t, a, s, l, r, n) {
1024
+ let i = a.points;
1025
+ f.debug("abc88 InsertEdge: edge=", a, "e=", t);
1026
+ let o = !1;
1027
+ const h = r.node(t.v);
1028
+ var d = r.node(t.w);
1029
+ d != null && d.intersect && h != null && h.intersect && (i = i.slice(1, a.points.length - 1), i.unshift(h.intersect(i[0])), i.push(d.intersect(i[i.length - 1]))), a.toCluster && (f.debug("to cluster abc88", s[a.toCluster]), i = et(a.points, s[a.toCluster].node), o = !0), a.fromCluster && (f.debug("from cluster abc88", s[a.fromCluster]), i = et(i.reverse(), s[a.fromCluster].node).reverse(), o = !0);
1030
+ const c = i.filter((C) => !Number.isNaN(C.y));
1031
+ let p = lt;
1032
+ a.curve && (l === "graph" || l === "flowchart") && (p = a.curve);
1033
+ const { x: y, y: x } = rr(a), k = ot().x(y).y(x).curve(p);
1034
+ let g;
1035
+ switch (a.thickness) {
1036
+ case "normal":
1037
+ g = "edge-thickness-normal";
1038
+ break;
1039
+ case "thick":
1040
+ g = "edge-thickness-thick";
1041
+ break;
1042
+ case "invisible":
1043
+ g = "edge-thickness-thick";
1044
+ break;
1045
+ default:
1046
+ g = "";
1047
+ }
1048
+ switch (a.pattern) {
1049
+ case "solid":
1050
+ g += " edge-pattern-solid";
1051
+ break;
1052
+ case "dotted":
1053
+ g += " edge-pattern-dotted";
1054
+ break;
1055
+ case "dashed":
1056
+ g += " edge-pattern-dashed";
1057
+ break;
1058
+ }
1059
+ const u = e.append("path").attr("d", k(c)).attr("id", a.id).attr("class", " " + g + (a.classes ? " " + a.classes : "")).attr("style", a.style);
1060
+ let S = "";
1061
+ (w().flowchart.arrowMarkerAbsolute || w().state.arrowMarkerAbsolute) && (S = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, S = S.replace(/\(/g, "\\("), S = S.replace(/\)/g, "\\)")), ar(u, a, S, n, l);
1062
+ let B = {};
1063
+ return o && (B.updatedPath = i), B.originalPath = a.points, B;
1064
+ };
1065
+ export {
1066
+ _t as E,
1067
+ M,
1068
+ P as R,
1069
+ ar as a,
1070
+ xr as d,
1071
+ pr as f,
1072
+ fr as g,
1073
+ dr as h,
1074
+ m,
1075
+ hr as o,
1076
+ yr as p,
1077
+ rr as r,
1078
+ tr as t,
1079
+ ur as u,
1080
+ gr as x,
1081
+ cr as y
1082
+ };