@pi-outpost/embed 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 (250) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +63 -0
  3. package/dist/abnfDiagram-VRR7QNED-BPTALLb_.cjs +1 -0
  4. package/dist/abnfDiagram-VRR7QNED-DlAvVtuC.js +89 -0
  5. package/dist/arc-BBnpgwVQ.js +80 -0
  6. package/dist/arc-DcUn9_NX.cjs +1 -0
  7. package/dist/architecture-TIHT7OUA-D-35jO9Y.cjs +1 -0
  8. package/dist/architecture-TIHT7OUA-DDyMqjR1.js +3 -0
  9. package/dist/architectureDiagram-ZJ3FMSHR-Bh5-VPPg.cjs +36 -0
  10. package/dist/architectureDiagram-ZJ3FMSHR-D7UsY5ua.js +4120 -0
  11. package/dist/array-CApNbSU9.js +6 -0
  12. package/dist/array-DZSRzHA_.cjs +1 -0
  13. package/dist/bash-BLBHkRa_.js +169 -0
  14. package/dist/bash-DHJu-DNv.cjs +1 -0
  15. package/dist/blockDiagram-677ZJIJ3-BrXgigdO.cjs +132 -0
  16. package/dist/blockDiagram-677ZJIJ3-s-fanRPN.js +3160 -0
  17. package/dist/c-4QgYfi8K.cjs +1 -0
  18. package/dist/c-Cw4FsAeJ.js +176 -0
  19. package/dist/c4Diagram-LMCZKHZV-BbZFAi_K.js +2962 -0
  20. package/dist/c4Diagram-LMCZKHZV-DFBVQ9Uo.cjs +10 -0
  21. package/dist/channel-DV0ST12Z.js +5 -0
  22. package/dist/channel-DkMGzfUR.cjs +1 -0
  23. package/dist/chunk-2Q5K7J3B-B8v9mTdK.cjs +1 -0
  24. package/dist/chunk-2Q5K7J3B-DqJF2oYF.js +15 -0
  25. package/dist/chunk-32BRIVSS-Byu3FrKX.js +61 -0
  26. package/dist/chunk-32BRIVSS-oWSJWk-u.cjs +1 -0
  27. package/dist/chunk-52WLFC77-C9zQbcGs.js +590 -0
  28. package/dist/chunk-52WLFC77-D9PTsiCj.cjs +10 -0
  29. package/dist/chunk-5VM5RSS4-BMfgdMFU.js +5 -0
  30. package/dist/chunk-5VM5RSS4-CwDmQ9T_.cjs +15 -0
  31. package/dist/chunk-7BUUIJ7U-BFUeQBoS.js +82 -0
  32. package/dist/chunk-7BUUIJ7U-MzS1pW_S.cjs +1 -0
  33. package/dist/chunk-C7G6YPKG-CDjkH_UW.cjs +1 -0
  34. package/dist/chunk-C7G6YPKG-GTlyrFFt.js +67 -0
  35. package/dist/chunk-EX3LRPZG-BBldDxGh.js +2046 -0
  36. package/dist/chunk-EX3LRPZG-u-BKCEWO.cjs +231 -0
  37. package/dist/chunk-FWX5IMBZ-h3GfgkP2.js +57 -0
  38. package/dist/chunk-FWX5IMBZ-nqBth1J9.cjs +1 -0
  39. package/dist/chunk-HOUHSVGY-CgfXy94u.cjs +1 -0
  40. package/dist/chunk-HOUHSVGY-CtRCnz1G.js +277 -0
  41. package/dist/chunk-ICXQ74PX-BmEfYj-r.cjs +2 -0
  42. package/dist/chunk-ICXQ74PX-CC59NQmW.js +1366 -0
  43. package/dist/chunk-JWPE2WC7-B_J6qwQL.js +8 -0
  44. package/dist/chunk-JWPE2WC7-Cs1kjq8S.cjs +1 -0
  45. package/dist/chunk-KEIR6QF5-BVnxrdHo.js +21388 -0
  46. package/dist/chunk-KEIR6QF5-Cy_QBNG6.cjs +161 -0
  47. package/dist/chunk-MOJQB5TN-D6YxvkUY.js +490 -0
  48. package/dist/chunk-MOJQB5TN-H2vwz-oQ.cjs +88 -0
  49. package/dist/chunk-OGEWGWER-BGdqgMza.js +32 -0
  50. package/dist/chunk-OGEWGWER-BP4o8A-v.cjs +1 -0
  51. package/dist/chunk-PUDLZKDR-C8jMDFq6.js +4142 -0
  52. package/dist/chunk-PUDLZKDR-DtzwSdxX.cjs +156 -0
  53. package/dist/chunk-Q4XR5HBZ-Bk18cMuk.js +1628 -0
  54. package/dist/chunk-Q4XR5HBZ-COrrWZzi.cjs +70 -0
  55. package/dist/chunk-RYQCIY6F-27FDzaaE.cjs +1 -0
  56. package/dist/chunk-RYQCIY6F-C-YC3QS_.js +239 -0
  57. package/dist/chunk-V7JOEXUC-BROsdKzY.js +3357 -0
  58. package/dist/chunk-V7JOEXUC-Cfrm5GQn.cjs +206 -0
  59. package/dist/chunk-VAUOI2AC-05FwamOA.js +10 -0
  60. package/dist/chunk-VAUOI2AC-CBXi4Di2.cjs +1 -0
  61. package/dist/chunk-VR4S4FIN-CSU_1xTZ.cjs +1 -0
  62. package/dist/chunk-VR4S4FIN-Ci491c8N.js +26 -0
  63. package/dist/chunk-WYO6CB5R-BTvDzbWd.cjs +127 -0
  64. package/dist/chunk-WYO6CB5R-Y9HJHB3Q.js +3739 -0
  65. package/dist/chunk-XXDRQBXY-DsVp5qjg.js +9 -0
  66. package/dist/chunk-XXDRQBXY-gWcN0uCZ.cjs +1 -0
  67. package/dist/chunk-Y2CYZVJY-CnmLqFtv.cjs +1 -0
  68. package/dist/chunk-Y2CYZVJY-CwsV_8W4.js +12 -0
  69. package/dist/chunk-ZGVPDNZ5-CDTkXY1G.js +3736 -0
  70. package/dist/chunk-ZGVPDNZ5-COEQX4AZ.cjs +62 -0
  71. package/dist/chunk-ZIRB5QZD-BU6XQUGC.cjs +32 -0
  72. package/dist/chunk-ZIRB5QZD-Cj-y77rH.js +1146 -0
  73. package/dist/classDiagram-OUVF2IWQ-Avsu6OKn.cjs +1 -0
  74. package/dist/classDiagram-OUVF2IWQ-eC72Wwol.js +30 -0
  75. package/dist/classDiagram-v2-EOCWNBFH-Avsu6OKn.cjs +1 -0
  76. package/dist/classDiagram-v2-EOCWNBFH-DsRoQgCt.js +30 -0
  77. package/dist/core-2nR1zkKb.cjs +3 -0
  78. package/dist/core-BO2hTFeF.js +845 -0
  79. package/dist/cose-bilkent-JH36ORCC-AyWV1dUo.cjs +1 -0
  80. package/dist/cose-bilkent-JH36ORCC-BFo5zomD.js +2251 -0
  81. package/dist/cpp-BUtp-HE2.cjs +1 -0
  82. package/dist/cpp-CeyO6lBG.js +225 -0
  83. package/dist/csharp-BJu4kEpt.cjs +1 -0
  84. package/dist/csharp-Ck6Fet_o.js +260 -0
  85. package/dist/css-ClSGJRju.js +140 -0
  86. package/dist/css-DeFr0lev.cjs +1 -0
  87. package/dist/cynefin-VYW2F7L2-DHhUPDgc.cjs +1 -0
  88. package/dist/cynefin-VYW2F7L2-DwiVqvhg.js +3 -0
  89. package/dist/cynefinDiagram-TSTJHNR4-BRUl09PN.js +349 -0
  90. package/dist/cynefinDiagram-TSTJHNR4-rKPqxFde.cjs +62 -0
  91. package/dist/cytoscape.esm-ByjvpCPI.cjs +321 -0
  92. package/dist/cytoscape.esm-asYnbYTy.js +18148 -0
  93. package/dist/dagre-BBlCxSvR.cjs +1 -0
  94. package/dist/dagre-BpqwxFKp.js +1701 -0
  95. package/dist/dagre-VKFMJZFB-BsfMZfPu.cjs +4 -0
  96. package/dist/dagre-VKFMJZFB-ChTkS14y.js +328 -0
  97. package/dist/defaultLocale-u9yUoUmE.cjs +1 -0
  98. package/dist/defaultLocale-up9-vqhM.js +201 -0
  99. package/dist/diagram-FQU43EPY-BnAYoLDy.js +432 -0
  100. package/dist/diagram-FQU43EPY-CdbwLZpm.cjs +3 -0
  101. package/dist/diagram-G47NLZAW-C1ZiELQG.js +525 -0
  102. package/dist/diagram-G47NLZAW-CtWKuxkf.cjs +24 -0
  103. package/dist/diagram-NH7WQ7WH-Be0KXo6w.js +134 -0
  104. package/dist/diagram-NH7WQ7WH-CG6VWVza.cjs +24 -0
  105. package/dist/diagram-OA4YK3LP-B7avlqjG.js +300 -0
  106. package/dist/diagram-OA4YK3LP-Drq_GA6o.cjs +30 -0
  107. package/dist/diagram-WEI45ONY-CoPX6-sx.js +214 -0
  108. package/dist/diagram-WEI45ONY-SJmgVL59.cjs +41 -0
  109. package/dist/dist-D6LMt8nW.js +59 -0
  110. package/dist/dist-DNGlMOWd.cjs +1 -0
  111. package/dist/dockerfile-O4rAswfG.js +34 -0
  112. package/dist/dockerfile-YBgAWga3.cjs +1 -0
  113. package/dist/ebnfDiagram-CCIWWBDH-B-T4_JnX.js +100 -0
  114. package/dist/ebnfDiagram-CCIWWBDH-BY7L3HVQ.cjs +1 -0
  115. package/dist/erDiagram-Q63AITRT-DPgZpeaH.js +1727 -0
  116. package/dist/erDiagram-Q63AITRT-w4C1PxYd.cjs +85 -0
  117. package/dist/eventmodeling-45OFAUF4-COTtdYDJ.js +3 -0
  118. package/dist/eventmodeling-45OFAUF4-CPEyr9kU.cjs +1 -0
  119. package/dist/flowDiagram-23GEKE2U-CQxPdUX4.cjs +1 -0
  120. package/dist/flowDiagram-23GEKE2U-ClCSBl2p.js +17 -0
  121. package/dist/ganttDiagram-NO4QXBWP-BcBp028S.cjs +292 -0
  122. package/dist/ganttDiagram-NO4QXBWP-Cf12fLfa.js +3083 -0
  123. package/dist/gitGraph-TEB2WS4Q-C3qBT0GM.js +3 -0
  124. package/dist/gitGraph-TEB2WS4Q-a8KsoPmR.cjs +1 -0
  125. package/dist/gitGraphDiagram-IHSO6WYX-13ahKewT.js +729 -0
  126. package/dist/gitGraphDiagram-IHSO6WYX-BTtNkGkN.cjs +106 -0
  127. package/dist/go-D-pz-dmd.cjs +1 -0
  128. package/dist/go-rg7jg1mu.js +140 -0
  129. package/dist/graphlib-B0GbLif1.js +1267 -0
  130. package/dist/graphlib-CkkG5MuS.cjs +1 -0
  131. package/dist/info-DKCQHKI2-BEYhR6ip.cjs +1 -0
  132. package/dist/info-DKCQHKI2-BPF6-pOb.js +3 -0
  133. package/dist/infoDiagram-FWYZ7A6U-20rh0VNL.cjs +2 -0
  134. package/dist/infoDiagram-FWYZ7A6U-DcV-eSsb.js +20 -0
  135. package/dist/ini-C1q3_1-Q.js +88 -0
  136. package/dist/ini-nVcUEghj.cjs +1 -0
  137. package/dist/init-07zIhv_j.cjs +1 -0
  138. package/dist/init-CirqLVcp.js +15 -0
  139. package/dist/ishikawaDiagram-FXEZZL3T-BTaBCHIG.js +719 -0
  140. package/dist/ishikawaDiagram-FXEZZL3T-BUq5kcFI.cjs +70 -0
  141. package/dist/java-CUN_usaq.cjs +1 -0
  142. package/dist/java-HguKEfA2.js +169 -0
  143. package/dist/javascript-C8NCH8DE.js +436 -0
  144. package/dist/javascript-UZXSyUuu.cjs +1 -0
  145. package/dist/journeyDiagram-5HDEW3XC-Cl9Z4b58.js +884 -0
  146. package/dist/journeyDiagram-5HDEW3XC-XQa-rhY_.cjs +139 -0
  147. package/dist/json-Cp01TR_B.js +36 -0
  148. package/dist/json-usH_MUzR.cjs +1 -0
  149. package/dist/kanban-definition-HUTT4EX6-CtWnZ0nS.js +975 -0
  150. package/dist/kanban-definition-HUTT4EX6-DVHXUPOt.cjs +89 -0
  151. package/dist/line-Ca8dE_lT.cjs +1 -0
  152. package/dist/line-O2xx2vVQ.js +34 -0
  153. package/dist/linear-CVhyaVzf.js +289 -0
  154. package/dist/linear-Cl2-QuPP.cjs +1 -0
  155. package/dist/map-CwPlMWPw.cjs +1 -0
  156. package/dist/map-DU12fF3s.js +241 -0
  157. package/dist/markdown-CzgRofaE.js +181 -0
  158. package/dist/markdown-qeo95R0i.cjs +1 -0
  159. package/dist/mermaid-parser.core-B8DQcCaz.js +638 -0
  160. package/dist/mermaid-parser.core-Cgsz0CdK.cjs +6 -0
  161. package/dist/mermaid.core-BR-iKb2Q.js +1064 -0
  162. package/dist/mermaid.core-DQrbAA--.cjs +10 -0
  163. package/dist/mindmap-definition-LN4V7U3C-C0I9iWmq.cjs +96 -0
  164. package/dist/mindmap-definition-LN4V7U3C-lkSmRsIC.js +1008 -0
  165. package/dist/mount.d.ts +31 -0
  166. package/dist/ordinal-CCTD6_le.js +65 -0
  167. package/dist/ordinal-CUPR-p0T.cjs +1 -0
  168. package/dist/packet-7NZHBO7P-DqvBYJTR.js +3 -0
  169. package/dist/packet-7NZHBO7P-Dz0O2bgq.cjs +1 -0
  170. package/dist/path-Kklx0M1v.cjs +1 -0
  171. package/dist/path-mKa7UESy.js +85 -0
  172. package/dist/pegDiagram-2B236MQR-BgRCQTZd.js +94 -0
  173. package/dist/pegDiagram-2B236MQR-hlmRl_PA.cjs +1 -0
  174. package/dist/php-C9FOMGEA.js +294 -0
  175. package/dist/php-j6EhDZDE.cjs +2 -0
  176. package/dist/pi-outpost-embed.cjs +305 -0
  177. package/dist/pi-outpost-embed.js +40942 -0
  178. package/dist/pie-RZYD4A2V-Hi9UdoE3.cjs +1 -0
  179. package/dist/pie-RZYD4A2V-qnruo9sH.js +3 -0
  180. package/dist/pieDiagram-ENE6RG2P-BVi7ck2I.js +205 -0
  181. package/dist/pieDiagram-ENE6RG2P-Buuvrs-h.cjs +39 -0
  182. package/dist/plaintext-BYYAHR3Z.js +10 -0
  183. package/dist/plaintext-DmnjizxG.cjs +1 -0
  184. package/dist/python-BYJzTRkK.cjs +1 -0
  185. package/dist/python-DKAazMIE.js +238 -0
  186. package/dist/quadrantDiagram-ABIIQ3AL-DeU97c2B.js +2001 -0
  187. package/dist/quadrantDiagram-ABIIQ3AL-LCbC0LEt.cjs +7 -0
  188. package/dist/radar-I7S5WNFK-Dqdssa34.cjs +1 -0
  189. package/dist/radar-I7S5WNFK-np_pJCO-.js +3 -0
  190. package/dist/railroad-3IZDKUUU-NILjDQft.cjs +1 -0
  191. package/dist/railroad-3IZDKUUU-sjKBeXxB.js +3 -0
  192. package/dist/railroad-abnf-AHOZXSZD-BojH9sxV.cjs +1 -0
  193. package/dist/railroad-abnf-AHOZXSZD-x5cC_e_R.js +3 -0
  194. package/dist/railroad-ebnf-EBAXGLYW-2mlWpz38.js +3 -0
  195. package/dist/railroad-ebnf-EBAXGLYW-BKCSut1M.cjs +1 -0
  196. package/dist/railroad-peg-LSFZ7HO6-CsH-gnsp.cjs +1 -0
  197. package/dist/railroad-peg-LSFZ7HO6-D5vguo03.js +3 -0
  198. package/dist/railroadDiagram-RFXS5EU6-CMTDNjsw.cjs +1 -0
  199. package/dist/railroadDiagram-RFXS5EU6-DNSNpLmQ.js +76 -0
  200. package/dist/requirementDiagram-TGXJPOKE-CdspXMgv.js +2223 -0
  201. package/dist/requirementDiagram-TGXJPOKE-irImpO8w.cjs +84 -0
  202. package/dist/rolldown-runtime-Dqa2HsxW.js +20 -0
  203. package/dist/rolldown-runtime-mLOUI7ql.cjs +1 -0
  204. package/dist/rough.esm-C5XyeDCN.js +1352 -0
  205. package/dist/rough.esm-r0QOSzHM.cjs +1 -0
  206. package/dist/ruby-BAUeZQKZ.js +262 -0
  207. package/dist/ruby-ClR4zp-1.cjs +1 -0
  208. package/dist/rust-DiTjMjP5.js +169 -0
  209. package/dist/rust-ghVvEWhm.cjs +1 -0
  210. package/dist/sankeyDiagram-HTMAVEWB-B0ZJBVpN.cjs +40 -0
  211. package/dist/sankeyDiagram-HTMAVEWB-BQcvUCMA.js +970 -0
  212. package/dist/scss-CKxh5HRg.cjs +1 -0
  213. package/dist/scss-CckAvQOx.js +150 -0
  214. package/dist/sequenceDiagram-DBY2YBRQ-BQFP2DGs.js +4168 -0
  215. package/dist/sequenceDiagram-DBY2YBRQ-C5WukkcA.cjs +162 -0
  216. package/dist/sizeCapture-X5ZJPWSS-DKbHZNyz.js +46 -0
  217. package/dist/sizeCapture-X5ZJPWSS-bJ2ZX4Du.cjs +1 -0
  218. package/dist/sql-B-Rnc2C3.js +118 -0
  219. package/dist/sql-B7syKcd8.cjs +1 -0
  220. package/dist/src-CR--T_NF.cjs +1 -0
  221. package/dist/src-DJ4x3y2O.js +2142 -0
  222. package/dist/stateDiagram-2N3HPSRC-4aBQt5dk.js +220 -0
  223. package/dist/stateDiagram-2N3HPSRC-YbRd67eD.cjs +1 -0
  224. package/dist/stateDiagram-v2-6OUMAXLB-D-c6D5za.js +30 -0
  225. package/dist/stateDiagram-v2-6OUMAXLB-ciXN_270.cjs +1 -0
  226. package/dist/swimlanes-5IMT3BWC-C8zkS7yx.cjs +1 -0
  227. package/dist/swimlanes-5IMT3BWC-aKH3Xgob.js +5066 -0
  228. package/dist/swimlanesDiagram-G3AALYLV-BcgsG1in.js +31 -0
  229. package/dist/swimlanesDiagram-G3AALYLV-CBjVJdH0.cjs +8 -0
  230. package/dist/timeline-definition-FHXFAJF6-DS-X0FCl.cjs +120 -0
  231. package/dist/timeline-definition-FHXFAJF6-Lnag6wiw.js +1069 -0
  232. package/dist/treeView-QDETBFTQ-Cpg_YeQ4.cjs +1 -0
  233. package/dist/treeView-QDETBFTQ-DdpEhzZX.js +3 -0
  234. package/dist/treemap-6X3UGDF4-BeCuRpkA.js +3 -0
  235. package/dist/treemap-6X3UGDF4-CFAmnKaf.cjs +1 -0
  236. package/dist/typescript-clWeqIBY.cjs +1 -0
  237. package/dist/typescript-mdYq8uqf.js +521 -0
  238. package/dist/vennDiagram-L72KCM5P-CF7lC7jn.js +1880 -0
  239. package/dist/vennDiagram-L72KCM5P-DYZP8jT_.cjs +34 -0
  240. package/dist/wardley-OPB4EBWU-B0jnKd8x.cjs +1 -0
  241. package/dist/wardley-OPB4EBWU-DlIk2K0J.js +3 -0
  242. package/dist/wardleyDiagram-EHGQE667-CbtWlMOa.js +645 -0
  243. package/dist/wardleyDiagram-EHGQE667-Dxewrpeh.cjs +78 -0
  244. package/dist/xml-BamqaQOf.cjs +1 -0
  245. package/dist/xml-DVYfB8uY.js +166 -0
  246. package/dist/xychartDiagram-FW5EYKEG-BAnVfMdN.cjs +7 -0
  247. package/dist/xychartDiagram-FW5EYKEG-DmdGPSi6.js +2102 -0
  248. package/dist/yaml-_1BORZTQ.js +144 -0
  249. package/dist/yaml-bAgWofBg.cjs +1 -0
  250. package/package.json +72 -0
@@ -0,0 +1,970 @@
1
+ import { n as e } from "./chunk-Y2CYZVJY-CwsV_8W4.js";
2
+ import { p as t } from "./src-DJ4x3y2O.js";
3
+ import { H as n, J as r, K as i, U as a, a as o, d as s, s as c, v as l, w as u, x as d, y as f } from "./chunk-WYO6CB5R-Y9HJHB3Q.js";
4
+ import { t as p } from "./ordinal-CCTD6_le.js";
5
+ //#region ../node_modules/d3-scale-chromatic/src/colors.js
6
+ function m(e) {
7
+ for (var t = e.length / 6 | 0, n = Array(t), r = 0; r < t;) n[r] = "#" + e.slice(r * 6, ++r * 6);
8
+ return n;
9
+ }
10
+ //#endregion
11
+ //#region ../node_modules/d3-scale-chromatic/src/categorical/Tableau10.js
12
+ var h = m("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
13
+ //#endregion
14
+ //#region ../node_modules/d3-sankey/node_modules/d3-array/src/max.js
15
+ function g(e, t) {
16
+ let n;
17
+ if (t === void 0) for (let t of e) t != null && (n < t || n === void 0 && t >= t) && (n = t);
18
+ else {
19
+ let r = -1;
20
+ for (let i of e) (i = t(i, ++r, e)) != null && (n < i || n === void 0 && i >= i) && (n = i);
21
+ }
22
+ return n;
23
+ }
24
+ //#endregion
25
+ //#region ../node_modules/d3-sankey/node_modules/d3-array/src/min.js
26
+ function _(e, t) {
27
+ let n;
28
+ if (t === void 0) for (let t of e) t != null && (n > t || n === void 0 && t >= t) && (n = t);
29
+ else {
30
+ let r = -1;
31
+ for (let i of e) (i = t(i, ++r, e)) != null && (n > i || n === void 0 && i >= i) && (n = i);
32
+ }
33
+ return n;
34
+ }
35
+ //#endregion
36
+ //#region ../node_modules/d3-sankey/node_modules/d3-array/src/sum.js
37
+ function v(e, t) {
38
+ let n = 0;
39
+ if (t === void 0) for (let t of e) (t = +t) && (n += t);
40
+ else {
41
+ let r = -1;
42
+ for (let i of e) (i = +t(i, ++r, e)) && (n += i);
43
+ }
44
+ return n;
45
+ }
46
+ //#endregion
47
+ //#region ../node_modules/d3-sankey/src/align.js
48
+ function y(e) {
49
+ return e.target.depth;
50
+ }
51
+ function b(e) {
52
+ return e.depth;
53
+ }
54
+ function x(e, t) {
55
+ return t - 1 - e.height;
56
+ }
57
+ function S(e, t) {
58
+ return e.sourceLinks.length ? e.depth : t - 1;
59
+ }
60
+ function C(e) {
61
+ return e.targetLinks.length ? e.depth : e.sourceLinks.length ? _(e.sourceLinks, y) - 1 : 0;
62
+ }
63
+ //#endregion
64
+ //#region ../node_modules/d3-sankey/src/constant.js
65
+ function w(e) {
66
+ return function() {
67
+ return e;
68
+ };
69
+ }
70
+ //#endregion
71
+ //#region ../node_modules/d3-sankey/src/sankey.js
72
+ function T(e, t) {
73
+ return D(e.source, t.source) || e.index - t.index;
74
+ }
75
+ function E(e, t) {
76
+ return D(e.target, t.target) || e.index - t.index;
77
+ }
78
+ function D(e, t) {
79
+ return e.y0 - t.y0;
80
+ }
81
+ function O(e) {
82
+ return e.value;
83
+ }
84
+ function k(e) {
85
+ return e.index;
86
+ }
87
+ function A(e) {
88
+ return e.nodes;
89
+ }
90
+ function j(e) {
91
+ return e.links;
92
+ }
93
+ function M(e, t) {
94
+ let n = e.get(t);
95
+ if (!n) throw Error("missing: " + t);
96
+ return n;
97
+ }
98
+ function N({ nodes: e }) {
99
+ for (let t of e) {
100
+ let e = t.y0, n = e;
101
+ for (let n of t.sourceLinks) n.y0 = e + n.width / 2, e += n.width;
102
+ for (let e of t.targetLinks) e.y1 = n + e.width / 2, n += e.width;
103
+ }
104
+ }
105
+ function P() {
106
+ let e = 0, t = 0, n = 1, r = 1, i = 24, a = 8, o, s = k, c = S, l, u, d = A, f = j, p = 6;
107
+ function m() {
108
+ let e = {
109
+ nodes: d.apply(null, arguments),
110
+ links: f.apply(null, arguments)
111
+ };
112
+ return h(e), y(e), b(e), x(e), F(e), N(e), e;
113
+ }
114
+ m.update = function(e) {
115
+ return N(e), e;
116
+ }, m.nodeId = function(e) {
117
+ return arguments.length ? (s = typeof e == "function" ? e : w(e), m) : s;
118
+ }, m.nodeAlign = function(e) {
119
+ return arguments.length ? (c = typeof e == "function" ? e : w(e), m) : c;
120
+ }, m.nodeSort = function(e) {
121
+ return arguments.length ? (l = e, m) : l;
122
+ }, m.nodeWidth = function(e) {
123
+ return arguments.length ? (i = +e, m) : i;
124
+ }, m.nodePadding = function(e) {
125
+ return arguments.length ? (a = o = +e, m) : a;
126
+ }, m.nodes = function(e) {
127
+ return arguments.length ? (d = typeof e == "function" ? e : w(e), m) : d;
128
+ }, m.links = function(e) {
129
+ return arguments.length ? (f = typeof e == "function" ? e : w(e), m) : f;
130
+ }, m.linkSort = function(e) {
131
+ return arguments.length ? (u = e, m) : u;
132
+ }, m.size = function(i) {
133
+ return arguments.length ? (e = t = 0, n = +i[0], r = +i[1], m) : [n - e, r - t];
134
+ }, m.extent = function(i) {
135
+ return arguments.length ? (e = +i[0][0], n = +i[1][0], t = +i[0][1], r = +i[1][1], m) : [[e, t], [n, r]];
136
+ }, m.iterations = function(e) {
137
+ return arguments.length ? (p = +e, m) : p;
138
+ };
139
+ function h({ nodes: e, links: t }) {
140
+ for (let [t, n] of e.entries()) n.index = t, n.sourceLinks = [], n.targetLinks = [];
141
+ let n = new Map(e.map((t, n) => [s(t, n, e), t]));
142
+ for (let [e, r] of t.entries()) {
143
+ r.index = e;
144
+ let { source: t, target: i } = r;
145
+ typeof t != "object" && (t = r.source = M(n, t)), typeof i != "object" && (i = r.target = M(n, i)), t.sourceLinks.push(r), i.targetLinks.push(r);
146
+ }
147
+ if (u != null) for (let { sourceLinks: t, targetLinks: n } of e) t.sort(u), n.sort(u);
148
+ }
149
+ function y({ nodes: e }) {
150
+ for (let t of e) t.value = t.fixedValue === void 0 ? Math.max(v(t.sourceLinks, O), v(t.targetLinks, O)) : t.fixedValue;
151
+ }
152
+ function b({ nodes: e }) {
153
+ let t = e.length, n = new Set(e), r = /* @__PURE__ */ new Set(), i = 0;
154
+ for (; n.size;) {
155
+ for (let e of n) {
156
+ e.depth = i;
157
+ for (let { target: t } of e.sourceLinks) r.add(t);
158
+ }
159
+ if (++i > t) throw Error("circular link");
160
+ n = r, r = /* @__PURE__ */ new Set();
161
+ }
162
+ }
163
+ function x({ nodes: e }) {
164
+ let t = e.length, n = new Set(e), r = /* @__PURE__ */ new Set(), i = 0;
165
+ for (; n.size;) {
166
+ for (let e of n) {
167
+ e.height = i;
168
+ for (let { source: t } of e.targetLinks) r.add(t);
169
+ }
170
+ if (++i > t) throw Error("circular link");
171
+ n = r, r = /* @__PURE__ */ new Set();
172
+ }
173
+ }
174
+ function C({ nodes: t }) {
175
+ let r = g(t, (e) => e.depth) + 1, a = (n - e - i) / (r - 1), o = Array(r);
176
+ for (let n of t) {
177
+ let t = Math.max(0, Math.min(r - 1, Math.floor(c.call(null, n, r))));
178
+ n.layer = t, n.x0 = e + t * a, n.x1 = n.x0 + i, o[t] ? o[t].push(n) : o[t] = [n];
179
+ }
180
+ if (l) for (let e of o) e.sort(l);
181
+ return o;
182
+ }
183
+ function P(e) {
184
+ let n = _(e, (e) => (r - t - (e.length - 1) * o) / v(e, O));
185
+ for (let i of e) {
186
+ let e = t;
187
+ for (let t of i) {
188
+ t.y0 = e, t.y1 = e + t.value * n, e = t.y1 + o;
189
+ for (let e of t.sourceLinks) e.width = e.value * n;
190
+ }
191
+ e = (r - e + o) / (i.length + 1);
192
+ for (let t = 0; t < i.length; ++t) {
193
+ let n = i[t];
194
+ n.y0 += e * (t + 1), n.y1 += e * (t + 1);
195
+ }
196
+ H(i);
197
+ }
198
+ }
199
+ function F(e) {
200
+ let n = C(e);
201
+ o = Math.min(a, (r - t) / (g(n, (e) => e.length) - 1)), P(n);
202
+ for (let e = 0; e < p; ++e) {
203
+ let t = .99 ** e, r = Math.max(1 - t, (e + 1) / p);
204
+ L(n, t, r), I(n, t, r);
205
+ }
206
+ }
207
+ function I(e, t, n) {
208
+ for (let r = 1, i = e.length; r < i; ++r) {
209
+ let i = e[r];
210
+ for (let e of i) {
211
+ let n = 0, r = 0;
212
+ for (let { source: t, value: i } of e.targetLinks) {
213
+ let a = i * (e.layer - t.layer);
214
+ n += U(t, e) * a, r += a;
215
+ }
216
+ if (!(r > 0)) continue;
217
+ let i = (n / r - e.y0) * t;
218
+ e.y0 += i, e.y1 += i, V(e);
219
+ }
220
+ l === void 0 && i.sort(D), R(i, n);
221
+ }
222
+ }
223
+ function L(e, t, n) {
224
+ for (let r = e.length - 2; r >= 0; --r) {
225
+ let i = e[r];
226
+ for (let e of i) {
227
+ let n = 0, r = 0;
228
+ for (let { target: t, value: i } of e.sourceLinks) {
229
+ let a = i * (t.layer - e.layer);
230
+ n += W(e, t) * a, r += a;
231
+ }
232
+ if (!(r > 0)) continue;
233
+ let i = (n / r - e.y0) * t;
234
+ e.y0 += i, e.y1 += i, V(e);
235
+ }
236
+ l === void 0 && i.sort(D), R(i, n);
237
+ }
238
+ }
239
+ function R(e, n) {
240
+ let i = e.length >> 1, a = e[i];
241
+ B(e, a.y0 - o, i - 1, n), z(e, a.y1 + o, i + 1, n), B(e, r, e.length - 1, n), z(e, t, 0, n);
242
+ }
243
+ function z(e, t, n, r) {
244
+ for (; n < e.length; ++n) {
245
+ let i = e[n], a = (t - i.y0) * r;
246
+ a > 1e-6 && (i.y0 += a, i.y1 += a), t = i.y1 + o;
247
+ }
248
+ }
249
+ function B(e, t, n, r) {
250
+ for (; n >= 0; --n) {
251
+ let i = e[n], a = (i.y1 - t) * r;
252
+ a > 1e-6 && (i.y0 -= a, i.y1 -= a), t = i.y0 - o;
253
+ }
254
+ }
255
+ function V({ sourceLinks: e, targetLinks: t }) {
256
+ if (u === void 0) {
257
+ for (let { source: { sourceLinks: e } } of t) e.sort(E);
258
+ for (let { target: { targetLinks: t } } of e) t.sort(T);
259
+ }
260
+ }
261
+ function H(e) {
262
+ if (u === void 0) for (let { sourceLinks: t, targetLinks: n } of e) t.sort(E), n.sort(T);
263
+ }
264
+ function U(e, t) {
265
+ let n = e.y0 - (e.sourceLinks.length - 1) * o / 2;
266
+ for (let { target: r, width: i } of e.sourceLinks) {
267
+ if (r === t) break;
268
+ n += i + o;
269
+ }
270
+ for (let { source: r, width: i } of t.targetLinks) {
271
+ if (r === e) break;
272
+ n -= i;
273
+ }
274
+ return n;
275
+ }
276
+ function W(e, t) {
277
+ let n = t.y0 - (t.targetLinks.length - 1) * o / 2;
278
+ for (let { source: r, width: i } of t.targetLinks) {
279
+ if (r === e) break;
280
+ n += i + o;
281
+ }
282
+ for (let { target: r, width: i } of e.sourceLinks) {
283
+ if (r === t) break;
284
+ n -= i;
285
+ }
286
+ return n;
287
+ }
288
+ return m;
289
+ }
290
+ //#endregion
291
+ //#region ../node_modules/d3-sankey/node_modules/d3-path/src/path.js
292
+ var F = Math.PI, I = 2 * F, L = 1e-6, R = I - L;
293
+ function z() {
294
+ this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "";
295
+ }
296
+ function B() {
297
+ return new z();
298
+ }
299
+ z.prototype = B.prototype = {
300
+ constructor: z,
301
+ moveTo: function(e, t) {
302
+ this._ += "M" + (this._x0 = this._x1 = +e) + "," + (this._y0 = this._y1 = +t);
303
+ },
304
+ closePath: function() {
305
+ this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
306
+ },
307
+ lineTo: function(e, t) {
308
+ this._ += "L" + (this._x1 = +e) + "," + (this._y1 = +t);
309
+ },
310
+ quadraticCurveTo: function(e, t, n, r) {
311
+ this._ += "Q" + +e + "," + +t + "," + (this._x1 = +n) + "," + (this._y1 = +r);
312
+ },
313
+ bezierCurveTo: function(e, t, n, r, i, a) {
314
+ this._ += "C" + +e + "," + +t + "," + +n + "," + +r + "," + (this._x1 = +i) + "," + (this._y1 = +a);
315
+ },
316
+ arcTo: function(e, t, n, r, i) {
317
+ e = +e, t = +t, n = +n, r = +r, i = +i;
318
+ var a = this._x1, o = this._y1, s = n - e, c = r - t, l = a - e, u = o - t, d = l * l + u * u;
319
+ if (i < 0) throw Error("negative radius: " + i);
320
+ if (this._x1 === null) this._ += "M" + (this._x1 = e) + "," + (this._y1 = t);
321
+ else if (d > L) if (!(Math.abs(u * s - c * l) > L) || !i) this._ += "L" + (this._x1 = e) + "," + (this._y1 = t);
322
+ else {
323
+ var f = n - a, p = r - o, m = s * s + c * c, h = f * f + p * p, g = Math.sqrt(m), _ = Math.sqrt(d), v = i * Math.tan((F - Math.acos((m + d - h) / (2 * g * _))) / 2), y = v / _, b = v / g;
324
+ Math.abs(y - 1) > L && (this._ += "L" + (e + y * l) + "," + (t + y * u)), this._ += "A" + i + "," + i + ",0,0," + +(u * f > l * p) + "," + (this._x1 = e + b * s) + "," + (this._y1 = t + b * c);
325
+ }
326
+ },
327
+ arc: function(e, t, n, r, i, a) {
328
+ e = +e, t = +t, n = +n, a = !!a;
329
+ var o = n * Math.cos(r), s = n * Math.sin(r), c = e + o, l = t + s, u = 1 ^ a, d = a ? r - i : i - r;
330
+ if (n < 0) throw Error("negative radius: " + n);
331
+ this._x1 === null ? this._ += "M" + c + "," + l : (Math.abs(this._x1 - c) > L || Math.abs(this._y1 - l) > L) && (this._ += "L" + c + "," + l), n && (d < 0 && (d = d % I + I), d > R ? this._ += "A" + n + "," + n + ",0,1," + u + "," + (e - o) + "," + (t - s) + "A" + n + "," + n + ",0,1," + u + "," + (this._x1 = c) + "," + (this._y1 = l) : d > L && (this._ += "A" + n + "," + n + ",0," + +(d >= F) + "," + u + "," + (this._x1 = e + n * Math.cos(i)) + "," + (this._y1 = t + n * Math.sin(i))));
332
+ },
333
+ rect: function(e, t, n, r) {
334
+ this._ += "M" + (this._x0 = this._x1 = +e) + "," + (this._y0 = this._y1 = +t) + "h" + +n + "v" + +r + "h" + -n + "Z";
335
+ },
336
+ toString: function() {
337
+ return this._;
338
+ }
339
+ };
340
+ //#endregion
341
+ //#region ../node_modules/d3-sankey/node_modules/d3-shape/src/constant.js
342
+ function V(e) {
343
+ return function() {
344
+ return e;
345
+ };
346
+ }
347
+ //#endregion
348
+ //#region ../node_modules/d3-sankey/node_modules/d3-shape/src/point.js
349
+ function H(e) {
350
+ return e[0];
351
+ }
352
+ function U(e) {
353
+ return e[1];
354
+ }
355
+ //#endregion
356
+ //#region ../node_modules/d3-sankey/node_modules/d3-shape/src/array.js
357
+ var W = Array.prototype.slice;
358
+ //#endregion
359
+ //#region ../node_modules/d3-sankey/node_modules/d3-shape/src/link/index.js
360
+ function G(e) {
361
+ return e.source;
362
+ }
363
+ function ee(e) {
364
+ return e.target;
365
+ }
366
+ function te(e) {
367
+ var t = G, n = ee, r = H, i = U, a = null;
368
+ function o() {
369
+ var o, s = W.call(arguments), c = t.apply(this, s), l = n.apply(this, s);
370
+ if (a ||= o = B(), e(a, +r.apply(this, (s[0] = c, s)), +i.apply(this, s), +r.apply(this, (s[0] = l, s)), +i.apply(this, s)), o) return a = null, o + "" || null;
371
+ }
372
+ return o.source = function(e) {
373
+ return arguments.length ? (t = e, o) : t;
374
+ }, o.target = function(e) {
375
+ return arguments.length ? (n = e, o) : n;
376
+ }, o.x = function(e) {
377
+ return arguments.length ? (r = typeof e == "function" ? e : V(+e), o) : r;
378
+ }, o.y = function(e) {
379
+ return arguments.length ? (i = typeof e == "function" ? e : V(+e), o) : i;
380
+ }, o.context = function(e) {
381
+ return arguments.length ? (a = e ?? null, o) : a;
382
+ }, o;
383
+ }
384
+ function ne(e, t, n, r, i) {
385
+ e.moveTo(t, n), e.bezierCurveTo(t = (t + r) / 2, n, t, i, r, i);
386
+ }
387
+ function re() {
388
+ return te(ne);
389
+ }
390
+ //#endregion
391
+ //#region ../node_modules/d3-sankey/src/sankeyLinkHorizontal.js
392
+ function ie(e) {
393
+ return [e.source.x1, e.y0];
394
+ }
395
+ function ae(e) {
396
+ return [e.target.x0, e.y1];
397
+ }
398
+ function K() {
399
+ return re().source(ie).target(ae);
400
+ }
401
+ //#endregion
402
+ //#region ../node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-HTMAVEWB.mjs
403
+ var q = (function() {
404
+ var t = /* @__PURE__ */ e(function(e, t, n, r) {
405
+ for (n ||= {}, r = e.length; r--; n[e[r]] = t);
406
+ return n;
407
+ }, "o"), n = [1, 9], r = [1, 10], i = [
408
+ 1,
409
+ 5,
410
+ 10,
411
+ 12
412
+ ], a = {
413
+ trace: /* @__PURE__ */ e(function() {}, "trace"),
414
+ yy: {},
415
+ symbols_: {
416
+ error: 2,
417
+ start: 3,
418
+ SANKEY: 4,
419
+ NEWLINE: 5,
420
+ csv: 6,
421
+ opt_eof: 7,
422
+ record: 8,
423
+ csv_tail: 9,
424
+ EOF: 10,
425
+ "field[source]": 11,
426
+ COMMA: 12,
427
+ "field[target]": 13,
428
+ "field[value]": 14,
429
+ field: 15,
430
+ escaped: 16,
431
+ non_escaped: 17,
432
+ DQUOTE: 18,
433
+ ESCAPED_TEXT: 19,
434
+ NON_ESCAPED_TEXT: 20,
435
+ $accept: 0,
436
+ $end: 1
437
+ },
438
+ terminals_: {
439
+ 2: "error",
440
+ 4: "SANKEY",
441
+ 5: "NEWLINE",
442
+ 10: "EOF",
443
+ 11: "field[source]",
444
+ 12: "COMMA",
445
+ 13: "field[target]",
446
+ 14: "field[value]",
447
+ 18: "DQUOTE",
448
+ 19: "ESCAPED_TEXT",
449
+ 20: "NON_ESCAPED_TEXT"
450
+ },
451
+ productions_: [
452
+ 0,
453
+ [3, 4],
454
+ [6, 2],
455
+ [9, 2],
456
+ [9, 0],
457
+ [7, 1],
458
+ [7, 0],
459
+ [8, 5],
460
+ [15, 1],
461
+ [15, 1],
462
+ [16, 3],
463
+ [17, 1]
464
+ ],
465
+ performAction: /* @__PURE__ */ e(function(e, t, n, r, i, a, o) {
466
+ var s = a.length - 1;
467
+ switch (i) {
468
+ case 7:
469
+ let e = r.findOrCreateNode(a[s - 4].trim().replaceAll("\"\"", "\"")), t = r.findOrCreateNode(a[s - 2].trim().replaceAll("\"\"", "\"")), n = parseFloat(a[s].trim());
470
+ r.addLink(e, t, n);
471
+ break;
472
+ case 8:
473
+ case 9:
474
+ case 11:
475
+ this.$ = a[s];
476
+ break;
477
+ case 10:
478
+ this.$ = a[s - 1];
479
+ break;
480
+ }
481
+ }, "anonymous"),
482
+ table: [
483
+ {
484
+ 3: 1,
485
+ 4: [1, 2]
486
+ },
487
+ { 1: [3] },
488
+ { 5: [1, 3] },
489
+ {
490
+ 6: 4,
491
+ 8: 5,
492
+ 15: 6,
493
+ 16: 7,
494
+ 17: 8,
495
+ 18: n,
496
+ 20: r
497
+ },
498
+ {
499
+ 1: [2, 6],
500
+ 7: 11,
501
+ 10: [1, 12]
502
+ },
503
+ t(r, [2, 4], {
504
+ 9: 13,
505
+ 5: [1, 14]
506
+ }),
507
+ { 12: [1, 15] },
508
+ t(i, [2, 8]),
509
+ t(i, [2, 9]),
510
+ { 19: [1, 16] },
511
+ t(i, [2, 11]),
512
+ { 1: [2, 1] },
513
+ { 1: [2, 5] },
514
+ t(r, [2, 2]),
515
+ {
516
+ 6: 17,
517
+ 8: 5,
518
+ 15: 6,
519
+ 16: 7,
520
+ 17: 8,
521
+ 18: n,
522
+ 20: r
523
+ },
524
+ {
525
+ 15: 18,
526
+ 16: 7,
527
+ 17: 8,
528
+ 18: n,
529
+ 20: r
530
+ },
531
+ { 18: [1, 19] },
532
+ t(r, [2, 3]),
533
+ { 12: [1, 20] },
534
+ t(i, [2, 10]),
535
+ {
536
+ 15: 21,
537
+ 16: 7,
538
+ 17: 8,
539
+ 18: n,
540
+ 20: r
541
+ },
542
+ t([
543
+ 1,
544
+ 5,
545
+ 10
546
+ ], [2, 7])
547
+ ],
548
+ defaultActions: {
549
+ 11: [2, 1],
550
+ 12: [2, 5]
551
+ },
552
+ parseError: /* @__PURE__ */ e(function(e, t) {
553
+ if (t.recoverable) this.trace(e);
554
+ else {
555
+ var n = Error(e);
556
+ throw n.hash = t, n;
557
+ }
558
+ }, "parseError"),
559
+ parse: /* @__PURE__ */ e(function(t) {
560
+ var n = this, r = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
561
+ for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
562
+ h.setInput(t, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
563
+ var v = h.yylloc;
564
+ o.push(v);
565
+ var y = h.options && h.options.ranges;
566
+ typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
567
+ function b(e) {
568
+ r.length -= 2 * e, a.length -= e, o.length -= e;
569
+ }
570
+ e(b, "popStack");
571
+ function x() {
572
+ var e = i.pop() || h.lex() || p;
573
+ return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = n.symbols_[e] || e), e;
574
+ }
575
+ e(x, "lex");
576
+ for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
577
+ if (w = r[r.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
578
+ var M = "";
579
+ for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
580
+ M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
581
+ text: h.match,
582
+ token: this.terminals_[S] || S,
583
+ line: h.yylineno,
584
+ loc: v,
585
+ expected: j
586
+ });
587
+ }
588
+ if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
589
+ switch (T[0]) {
590
+ case 1:
591
+ r.push(S), a.push(h.yytext), o.push(h.yylloc), r.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
592
+ break;
593
+ case 2:
594
+ if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
595
+ first_line: o[o.length - (k || 1)].first_line,
596
+ last_line: o[o.length - 1].last_line,
597
+ first_column: o[o.length - (k || 1)].first_column,
598
+ last_column: o[o.length - 1].last_column
599
+ }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
600
+ c,
601
+ u,
602
+ l,
603
+ g.yy,
604
+ T[1],
605
+ a,
606
+ o
607
+ ].concat(m)), E !== void 0) return E;
608
+ k && (r = r.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), r.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), A = s[r[r.length - 2]][r[r.length - 1]], r.push(A);
609
+ break;
610
+ case 3: return !0;
611
+ }
612
+ }
613
+ return !0;
614
+ }, "parse")
615
+ };
616
+ a.lexer = /* @__PURE__ */ (function() {
617
+ return {
618
+ EOF: 1,
619
+ parseError: /* @__PURE__ */ e(function(e, t) {
620
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
621
+ else throw Error(e);
622
+ }, "parseError"),
623
+ setInput: /* @__PURE__ */ e(function(e, t) {
624
+ return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
625
+ first_line: 1,
626
+ first_column: 0,
627
+ last_line: 1,
628
+ last_column: 0
629
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
630
+ }, "setInput"),
631
+ input: /* @__PURE__ */ e(function() {
632
+ var e = this._input[0];
633
+ return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
634
+ }, "input"),
635
+ unput: /* @__PURE__ */ e(function(e) {
636
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
637
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
638
+ var r = this.match.split(/(?:\r\n?|\n)/g);
639
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
640
+ var i = this.yylloc.range;
641
+ return this.yylloc = {
642
+ first_line: this.yylloc.first_line,
643
+ last_line: this.yylineno + 1,
644
+ first_column: this.yylloc.first_column,
645
+ last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
646
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
647
+ }, "unput"),
648
+ more: /* @__PURE__ */ e(function() {
649
+ return this._more = !0, this;
650
+ }, "more"),
651
+ reject: /* @__PURE__ */ e(function() {
652
+ if (this.options.backtrack_lexer) this._backtrack = !0;
653
+ else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
654
+ text: "",
655
+ token: null,
656
+ line: this.yylineno
657
+ });
658
+ return this;
659
+ }, "reject"),
660
+ less: /* @__PURE__ */ e(function(e) {
661
+ this.unput(this.match.slice(e));
662
+ }, "less"),
663
+ pastInput: /* @__PURE__ */ e(function() {
664
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
665
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
666
+ }, "pastInput"),
667
+ upcomingInput: /* @__PURE__ */ e(function() {
668
+ var e = this.match;
669
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
670
+ }, "upcomingInput"),
671
+ showPosition: /* @__PURE__ */ e(function() {
672
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
673
+ return e + this.upcomingInput() + "\n" + t + "^";
674
+ }, "showPosition"),
675
+ test_match: /* @__PURE__ */ e(function(e, t) {
676
+ var n, r, i;
677
+ if (this.options.backtrack_lexer && (i = {
678
+ yylineno: this.yylineno,
679
+ yylloc: {
680
+ first_line: this.yylloc.first_line,
681
+ last_line: this.last_line,
682
+ first_column: this.yylloc.first_column,
683
+ last_column: this.yylloc.last_column
684
+ },
685
+ yytext: this.yytext,
686
+ match: this.match,
687
+ matches: this.matches,
688
+ matched: this.matched,
689
+ yyleng: this.yyleng,
690
+ offset: this.offset,
691
+ _more: this._more,
692
+ _input: this._input,
693
+ yy: this.yy,
694
+ conditionStack: this.conditionStack.slice(0),
695
+ done: this.done
696
+ }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
697
+ first_line: this.yylloc.last_line,
698
+ last_line: this.yylineno + 1,
699
+ first_column: this.yylloc.last_column,
700
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
701
+ }, this.yytext += e[0], this.match += e[0], this.matches = e, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
702
+ if (this._backtrack) {
703
+ for (var a in i) this[a] = i[a];
704
+ return !1;
705
+ }
706
+ return !1;
707
+ }, "test_match"),
708
+ next: /* @__PURE__ */ e(function() {
709
+ if (this.done) return this.EOF;
710
+ this._input || (this.done = !0);
711
+ var e, t, n, r;
712
+ this._more || (this.yytext = "", this.match = "");
713
+ for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
714
+ if (t = n, r = a, this.options.backtrack_lexer) {
715
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
716
+ if (this._backtrack) {
717
+ t = !1;
718
+ continue;
719
+ } else return !1;
720
+ } else if (!this.options.flex) break;
721
+ }
722
+ return t ? (e = this.test_match(t, i[r]), e === !1 ? !1 : e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
723
+ text: "",
724
+ token: null,
725
+ line: this.yylineno
726
+ });
727
+ }, "next"),
728
+ lex: /* @__PURE__ */ e(function() {
729
+ return this.next() || this.lex();
730
+ }, "lex"),
731
+ begin: /* @__PURE__ */ e(function(e) {
732
+ this.conditionStack.push(e);
733
+ }, "begin"),
734
+ popState: /* @__PURE__ */ e(function() {
735
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
736
+ }, "popState"),
737
+ _currentRules: /* @__PURE__ */ e(function() {
738
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
739
+ }, "_currentRules"),
740
+ topState: /* @__PURE__ */ e(function(e) {
741
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
742
+ }, "topState"),
743
+ pushState: /* @__PURE__ */ e(function(e) {
744
+ this.begin(e);
745
+ }, "pushState"),
746
+ stateStackSize: /* @__PURE__ */ e(function() {
747
+ return this.conditionStack.length;
748
+ }, "stateStackSize"),
749
+ options: { "case-insensitive": !0 },
750
+ performAction: /* @__PURE__ */ e(function(e, t, n, r) {
751
+ switch (n) {
752
+ case 0: return this.pushState("csv"), 4;
753
+ case 1: return this.pushState("csv"), 4;
754
+ case 2: return 10;
755
+ case 3: return 5;
756
+ case 4: return 12;
757
+ case 5: return this.pushState("escaped_text"), 18;
758
+ case 6: return 20;
759
+ case 7: return this.popState("escaped_text"), 18;
760
+ case 8: return 19;
761
+ }
762
+ }, "anonymous"),
763
+ rules: [
764
+ /^(?:sankey-beta\b)/i,
765
+ /^(?:sankey\b)/i,
766
+ /^(?:$)/i,
767
+ /^(?:((\u000D\u000A)|(\u000A)))/i,
768
+ /^(?:(\u002C))/i,
769
+ /^(?:(\u0022))/i,
770
+ /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,
771
+ /^(?:(\u0022)(?!(\u0022)))/i,
772
+ /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i
773
+ ],
774
+ conditions: {
775
+ csv: {
776
+ rules: [
777
+ 2,
778
+ 3,
779
+ 4,
780
+ 5,
781
+ 6,
782
+ 7,
783
+ 8
784
+ ],
785
+ inclusive: !1
786
+ },
787
+ escaped_text: {
788
+ rules: [7, 8],
789
+ inclusive: !1
790
+ },
791
+ INITIAL: {
792
+ rules: [
793
+ 0,
794
+ 1,
795
+ 2,
796
+ 3,
797
+ 4,
798
+ 5,
799
+ 6,
800
+ 7,
801
+ 8
802
+ ],
803
+ inclusive: !0
804
+ }
805
+ }
806
+ };
807
+ })();
808
+ function o() {
809
+ this.yy = {};
810
+ }
811
+ return e(o, "Parser"), o.prototype = a, a.Parser = o, new o();
812
+ })();
813
+ q.parser = q;
814
+ var J = q, Y = [], X = [], Z = /* @__PURE__ */ new Map(), oe = /* @__PURE__ */ e(() => {
815
+ Y = [], X = [], Z = /* @__PURE__ */ new Map(), o();
816
+ }, "clear"), se = class {
817
+ constructor(e, t, n = 0) {
818
+ this.source = e, this.target = t, this.value = n;
819
+ }
820
+ static {
821
+ e(this, "SankeyLink");
822
+ }
823
+ }, ce = /* @__PURE__ */ e((e, t, n) => {
824
+ Y.push(new se(e, t, n));
825
+ }, "addLink"), le = class {
826
+ constructor(e) {
827
+ this.ID = e;
828
+ }
829
+ static {
830
+ e(this, "SankeyNode");
831
+ }
832
+ }, ue = {
833
+ nodesMap: Z,
834
+ getConfig: /* @__PURE__ */ e(() => d().sankey, "getConfig"),
835
+ getNodes: /* @__PURE__ */ e(() => X, "getNodes"),
836
+ getLinks: /* @__PURE__ */ e(() => Y, "getLinks"),
837
+ getGraph: /* @__PURE__ */ e(() => ({
838
+ nodes: X.map((e) => ({ id: e.ID })),
839
+ links: Y.map((e) => ({
840
+ source: e.source.ID,
841
+ target: e.target.ID,
842
+ value: e.value
843
+ }))
844
+ }), "getGraph"),
845
+ addLink: ce,
846
+ findOrCreateNode: /* @__PURE__ */ e((e) => {
847
+ e = c.sanitizeText(e, d());
848
+ let t = Z.get(e);
849
+ return t === void 0 && (t = new le(e), Z.set(e, t), X.push(t)), t;
850
+ }, "findOrCreateNode"),
851
+ getAccTitle: f,
852
+ setAccTitle: a,
853
+ getAccDescription: l,
854
+ setAccDescription: n,
855
+ getDiagramTitle: u,
856
+ setDiagramTitle: i,
857
+ clear: oe
858
+ }, Q = class t {
859
+ static {
860
+ e(this, "Uid");
861
+ }
862
+ static {
863
+ this.count = 0;
864
+ }
865
+ static next(e) {
866
+ return new t(e + ++t.count);
867
+ }
868
+ constructor(e) {
869
+ this.id = e, this.href = `#${e}`;
870
+ }
871
+ toString() {
872
+ return "url(" + this.href + ")";
873
+ }
874
+ }, $ = {
875
+ left: b,
876
+ right: x,
877
+ center: C,
878
+ justify: S
879
+ }, de = /* @__PURE__ */ e((e) => {
880
+ let t = 0, n = 0;
881
+ for (let r of e) {
882
+ let e = r.value ?? 0;
883
+ e > t && (t = e, n = r.layer ?? 0);
884
+ }
885
+ return n;
886
+ }, "findCentralNodeLayer"), fe = { draw: /* @__PURE__ */ e(function(n, i, a, o) {
887
+ let { securityLevel: c, sankey: l } = d(), u = s.sankey, f;
888
+ c === "sandbox" && (f = t("#i" + i));
889
+ let m = t(c === "sandbox" ? f.nodes()[0].contentDocument.body : "body"), g = c === "sandbox" ? m.select(`[id="${i}"]`) : t(`[id="${i}"]`), _ = l?.width ?? u.width, v = l?.height ?? u.width, y = l?.useMaxWidth ?? u.useMaxWidth, b = l?.nodeAlignment ?? u.nodeAlignment, x = l?.prefix ?? u.prefix, S = l?.suffix ?? u.suffix, C = l?.showValues ?? u.showValues, w = l?.nodeWidth ?? u.nodeWidth ?? 10, T = l?.nodePadding ?? u.nodePadding ?? 12, E = l?.labelStyle ?? u.labelStyle ?? "legacy", D = l?.nodeColors ?? {}, O = o.db.getGraph(), k = $[b];
890
+ P().nodeId((e) => e.id).nodeWidth(w).nodePadding(T + (C ? 15 : 0)).nodeAlign(k).extent([[0, 0], [_, v]])(O);
891
+ let A = de(O.nodes), j = p(h), M = /* @__PURE__ */ e((e) => D[e] ?? j(e), "getNodeColor");
892
+ g.append("g").attr("class", "nodes").selectAll(".node").data(O.nodes).join("g").attr("class", "node").attr("id", (e) => (e.uid = Q.next("node-")).id).attr("transform", function(e) {
893
+ return "translate(" + e.x0 + "," + e.y0 + ")";
894
+ }).attr("x", (e) => e.x0).attr("y", (e) => e.y0).append("rect").attr("height", (e) => e.y1 - e.y0).attr("width", (e) => e.x1 - e.x0).attr("fill", (e) => M(e.id));
895
+ let N = /* @__PURE__ */ e(({ id: e, value: t }) => C ? `${e}
896
+ ${x}${Math.round(t * 100) / 100}${S}` : e, "getText"), F = /* @__PURE__ */ e((e) => E === "outlined" ? (e.layer ?? 0) < A ? {
897
+ x: e.x0 - 6,
898
+ anchor: "end"
899
+ } : {
900
+ x: e.x1 + 6,
901
+ anchor: "start"
902
+ } : e.x0 < _ / 2 ? {
903
+ x: e.x1 + 6,
904
+ anchor: "start"
905
+ } : {
906
+ x: e.x0 - 6,
907
+ anchor: "end"
908
+ }, "getLabelPosition"), I = g.append("g").attr("class", "node-labels").attr("font-size", 14), L = /* @__PURE__ */ e((e) => I.selectAll(e ? `.${e}` : "text").data(O.nodes).join("text").attr("class", e ?? null).attr("x", (e) => F(e).x).attr("y", (e) => (e.y1 + e.y0) / 2).attr("dy", `${C ? "0" : "0.35"}em`).attr("text-anchor", (e) => F(e).anchor).text(N), "appendLabel");
909
+ E === "outlined" ? (L("sankey-label-bg"), L("sankey-label-fg")) : L();
910
+ let R = g.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", .5).selectAll(".link").data(O.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply"), z = l?.linkColor ?? "gradient";
911
+ if (z === "gradient") {
912
+ let e = R.append("linearGradient").attr("id", (e) => (e.uid = Q.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (e) => e.source.x1).attr("x2", (e) => e.target.x0);
913
+ e.append("stop").attr("offset", "0%").attr("stop-color", (e) => M(e.source.id)), e.append("stop").attr("offset", "100%").attr("stop-color", (e) => M(e.target.id));
914
+ }
915
+ let B;
916
+ switch (z) {
917
+ case "gradient":
918
+ B = /* @__PURE__ */ e((e) => e.uid, "coloring");
919
+ break;
920
+ case "source":
921
+ B = /* @__PURE__ */ e((e) => M(e.source.id), "coloring");
922
+ break;
923
+ case "target":
924
+ B = /* @__PURE__ */ e((e) => M(e.target.id), "coloring");
925
+ break;
926
+ default: B = z;
927
+ }
928
+ R.append("path").attr("d", K()).attr("stroke", B).attr("stroke-width", (e) => Math.max(1, e.width)), r(void 0, g, 0, y);
929
+ }, "draw") }, pe = /* @__PURE__ */ e((e) => e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, "\n").trim(), "prepareTextForParsing"), me = /* @__PURE__ */ e((e) => `.label {
930
+ font-family: ${e.fontFamily};
931
+ }
932
+
933
+ .node-labels {
934
+ font-family: ${e.fontFamily};
935
+ }
936
+
937
+ /* Outlined label style - background stroke for better readability */
938
+ .sankey-label-bg {
939
+ stroke: ${e.mainBkg || e.background || "#fff"};
940
+ stroke-width: 4px;
941
+ stroke-linejoin: round;
942
+ paint-order: stroke;
943
+ }
944
+
945
+ /* Foreground label text */
946
+ .sankey-label-fg {
947
+ fill: ${e.textColor};
948
+ }
949
+
950
+ /* Node styling */
951
+ .node rect {
952
+ shape-rendering: crispEdges;
953
+ }
954
+
955
+ /* Link styling */
956
+ .link {
957
+ fill: none;
958
+ stroke-opacity: 0.5;
959
+ mix-blend-mode: multiply;
960
+ }
961
+ `, "getStyles"), he = J.parse.bind(J);
962
+ J.parse = (e) => he(pe(e));
963
+ var ge = {
964
+ styles: me,
965
+ parser: J,
966
+ db: ue,
967
+ renderer: fe
968
+ };
969
+ //#endregion
970
+ export { ge as diagram };