@copilotkitnext/react 0.0.22-alpha.7 → 0.0.22-alpha.8

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 (236) hide show
  1. package/package.json +4 -4
  2. package/dist/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
  3. package/dist/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
  4. package/dist/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
  5. package/dist/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
  6. package/dist/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
  7. package/dist/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
  8. package/dist/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
  9. package/dist/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
  10. package/dist/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
  11. package/dist/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
  12. package/dist/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
  13. package/dist/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
  14. package/dist/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
  15. package/dist/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
  16. package/dist/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
  17. package/dist/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
  18. package/dist/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
  19. package/dist/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
  20. package/dist/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
  21. package/dist/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
  22. package/dist/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
  23. package/dist/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
  24. package/dist/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
  25. package/dist/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
  26. package/dist/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
  27. package/dist/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
  28. package/dist/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
  29. package/dist/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
  30. package/dist/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
  31. package/dist/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
  32. package/dist/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
  33. package/dist/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
  34. package/dist/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
  35. package/dist/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
  36. package/dist/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
  37. package/dist/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
  38. package/dist/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
  39. package/dist/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
  40. package/dist/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
  41. package/dist/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
  42. package/dist/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
  43. package/dist/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
  44. package/dist/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
  45. package/dist/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
  46. package/dist/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
  47. package/dist/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
  48. package/dist/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
  49. package/dist/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
  50. package/dist/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
  51. package/dist/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
  52. package/dist/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
  53. package/dist/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
  54. package/dist/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
  55. package/dist/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
  56. package/dist/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
  57. package/dist/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
  58. package/dist/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
  59. package/dist/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
  60. package/dist/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
  61. package/dist/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
  62. package/dist/angular-html-LD6QEAZE.mjs +0 -7
  63. package/dist/angular-html-LD6QEAZE.mjs.map +0 -1
  64. package/dist/angular-ts-FGK7I2F5.mjs +0 -37
  65. package/dist/angular-ts-FGK7I2F5.mjs.map +0 -1
  66. package/dist/angular-ts-XZTE5LQS.mjs +0 -37
  67. package/dist/angular-ts-XZTE5LQS.mjs.map +0 -1
  68. package/dist/apl-VB2EG5RZ.mjs +0 -22
  69. package/dist/apl-VB2EG5RZ.mjs.map +0 -1
  70. package/dist/architectureDiagram-VXUJARFQ-PPLKSFYC.mjs +0 -8712
  71. package/dist/architectureDiagram-VXUJARFQ-PPLKSFYC.mjs.map +0 -1
  72. package/dist/blade-EZDWULER.mjs +0 -26
  73. package/dist/blade-EZDWULER.mjs.map +0 -1
  74. package/dist/blade-HS4Z7O3Y.mjs +0 -26
  75. package/dist/blade-HS4Z7O3Y.mjs.map +0 -1
  76. package/dist/blockDiagram-VD42YOAC-7SIEWHYD.mjs +0 -3618
  77. package/dist/blockDiagram-VD42YOAC-7SIEWHYD.mjs.map +0 -1
  78. package/dist/c4Diagram-YG6GDRKO-G2UUBRHQ.mjs +0 -2495
  79. package/dist/c4Diagram-YG6GDRKO-G2UUBRHQ.mjs.map +0 -1
  80. package/dist/chunk-2BAFECUC.mjs +0 -28
  81. package/dist/chunk-2BAFECUC.mjs.map +0 -1
  82. package/dist/chunk-BF5LDW2L.mjs +0 -65
  83. package/dist/chunk-BF5LDW2L.mjs.map +0 -1
  84. package/dist/chunk-BUEC2HNL.mjs +0 -762
  85. package/dist/chunk-BUEC2HNL.mjs.map +0 -1
  86. package/dist/chunk-CRGJ2YCV.mjs +0 -109
  87. package/dist/chunk-CRGJ2YCV.mjs.map +0 -1
  88. package/dist/chunk-DKZXT4VQ.mjs +0 -19
  89. package/dist/chunk-DKZXT4VQ.mjs.map +0 -1
  90. package/dist/chunk-DYQXFOGA.mjs +0 -34
  91. package/dist/chunk-DYQXFOGA.mjs.map +0 -1
  92. package/dist/chunk-ENI667QL.mjs +0 -806
  93. package/dist/chunk-ENI667QL.mjs.map +0 -1
  94. package/dist/chunk-GEUZOPED.mjs +0 -1834
  95. package/dist/chunk-GEUZOPED.mjs.map +0 -1
  96. package/dist/chunk-GU7334FJ.mjs +0 -538
  97. package/dist/chunk-GU7334FJ.mjs.map +0 -1
  98. package/dist/chunk-HNKEYT4A.mjs +0 -4693
  99. package/dist/chunk-HNKEYT4A.mjs.map +0 -1
  100. package/dist/chunk-HTMHAYGC.mjs +0 -14
  101. package/dist/chunk-HTMHAYGC.mjs.map +0 -1
  102. package/dist/chunk-JRLFMJ6U.mjs +0 -1923
  103. package/dist/chunk-JRLFMJ6U.mjs.map +0 -1
  104. package/dist/chunk-JYRND4DC.mjs +0 -22
  105. package/dist/chunk-JYRND4DC.mjs.map +0 -1
  106. package/dist/chunk-KFEPUFID.mjs +0 -52
  107. package/dist/chunk-KFEPUFID.mjs.map +0 -1
  108. package/dist/chunk-M3UH7XZX.mjs +0 -6222
  109. package/dist/chunk-M3UH7XZX.mjs.map +0 -1
  110. package/dist/chunk-ND4RYWG7.mjs +0 -12
  111. package/dist/chunk-ND4RYWG7.mjs.map +0 -1
  112. package/dist/chunk-VLSLBZME.mjs +0 -51
  113. package/dist/chunk-VLSLBZME.mjs.map +0 -1
  114. package/dist/chunk-WJBV3P3K.mjs +0 -55
  115. package/dist/chunk-WJBV3P3K.mjs.map +0 -1
  116. package/dist/chunk-X2TQ2HDS.mjs +0 -44
  117. package/dist/chunk-X2TQ2HDS.mjs.map +0 -1
  118. package/dist/chunk-YIDZOZG3.mjs +0 -103
  119. package/dist/chunk-YIDZOZG3.mjs.map +0 -1
  120. package/dist/chunk-YLW7IP7V.mjs +0 -14525
  121. package/dist/chunk-YLW7IP7V.mjs.map +0 -1
  122. package/dist/classDiagram-2ON5EDUG-WUV4PTK5.mjs +0 -38
  123. package/dist/classDiagram-2ON5EDUG-WUV4PTK5.mjs.map +0 -1
  124. package/dist/classDiagram-v2-WZHVMYZB-J4QNVYPE.mjs +0 -38
  125. package/dist/classDiagram-v2-WZHVMYZB-J4QNVYPE.mjs.map +0 -1
  126. package/dist/cobol-PNTKRG5I.mjs +0 -17
  127. package/dist/cobol-PNTKRG5I.mjs.map +0 -1
  128. package/dist/crystal-BSMHK65A.mjs +0 -23
  129. package/dist/crystal-BSMHK65A.mjs.map +0 -1
  130. package/dist/dagre-6UL2VRFP-XN667C7N.mjs +0 -710
  131. package/dist/dagre-6UL2VRFP-XN667C7N.mjs.map +0 -1
  132. package/dist/diagram-PSM6KHXK-VA2CF5LZ.mjs +0 -538
  133. package/dist/diagram-PSM6KHXK-VA2CF5LZ.mjs.map +0 -1
  134. package/dist/diagram-QEK2KX5R-H3EHES33.mjs +0 -319
  135. package/dist/diagram-QEK2KX5R-H3EHES33.mjs.map +0 -1
  136. package/dist/diagram-S2PKOQOG-FOQYPB22.mjs +0 -231
  137. package/dist/diagram-S2PKOQOG-FOQYPB22.mjs.map +0 -1
  138. package/dist/edge-JOI74UJM.mjs +0 -19
  139. package/dist/edge-JOI74UJM.mjs.map +0 -1
  140. package/dist/elixir-FEL6DDPJ.mjs +0 -15
  141. package/dist/elixir-FEL6DDPJ.mjs.map +0 -1
  142. package/dist/erDiagram-Q2GNP2WA-IXNJSD2A.mjs +0 -1175
  143. package/dist/erDiagram-Q2GNP2WA-IXNJSD2A.mjs.map +0 -1
  144. package/dist/erb-Q2D6FWX3.mjs +0 -32
  145. package/dist/erb-Q2D6FWX3.mjs.map +0 -1
  146. package/dist/flowDiagram-NV44I4VS-ISKGEBMD.mjs +0 -2349
  147. package/dist/flowDiagram-NV44I4VS-ISKGEBMD.mjs.map +0 -1
  148. package/dist/ganttDiagram-LVOFAZNH-OAL7V7IR.mjs +0 -2344
  149. package/dist/ganttDiagram-LVOFAZNH-OAL7V7IR.mjs.map +0 -1
  150. package/dist/gitGraphDiagram-NY62KEGX-RKN2CCAZ.mjs +0 -1221
  151. package/dist/gitGraphDiagram-NY62KEGX-RKN2CCAZ.mjs.map +0 -1
  152. package/dist/glimmer-js-B32LCGFA.mjs +0 -19
  153. package/dist/glimmer-js-B32LCGFA.mjs.map +0 -1
  154. package/dist/glimmer-ts-4PHFAQCG.mjs +0 -19
  155. package/dist/glimmer-ts-4PHFAQCG.mjs.map +0 -1
  156. package/dist/hack-3ZNSL4KD.mjs +0 -17
  157. package/dist/hack-3ZNSL4KD.mjs.map +0 -1
  158. package/dist/handlebars-ICBC3AZK.mjs +0 -19
  159. package/dist/handlebars-ICBC3AZK.mjs.map +0 -1
  160. package/dist/html-BGY5P773.mjs +0 -6
  161. package/dist/html-BGY5P773.mjs.map +0 -1
  162. package/dist/html-derivative-3HGXHHFE.mjs +0 -7
  163. package/dist/html-derivative-3HGXHHFE.mjs.map +0 -1
  164. package/dist/index.css +0 -2385
  165. package/dist/index.css.map +0 -1
  166. package/dist/infoDiagram-F6ZHWCRC-Z7KMJJ45.mjs +0 -49
  167. package/dist/infoDiagram-F6ZHWCRC-Z7KMJJ45.mjs.map +0 -1
  168. package/dist/jinja-WL6HNMB5.mjs +0 -22
  169. package/dist/jinja-WL6HNMB5.mjs.map +0 -1
  170. package/dist/journeyDiagram-XKPGCS4Q-BMTOBHZ4.mjs +0 -1259
  171. package/dist/journeyDiagram-XKPGCS4Q-BMTOBHZ4.mjs.map +0 -1
  172. package/dist/kanban-definition-3W4ZIXB7-MVFRARF4.mjs +0 -1062
  173. package/dist/kanban-definition-3W4ZIXB7-MVFRARF4.mjs.map +0 -1
  174. package/dist/katex-4R42CMCB.mjs +0 -4
  175. package/dist/katex-4R42CMCB.mjs.map +0 -1
  176. package/dist/liquid-YS3YPW54.mjs +0 -19
  177. package/dist/liquid-YS3YPW54.mjs.map +0 -1
  178. package/dist/logo-mark-OHF64HAY.svg +0 -8
  179. package/dist/mdc-A66KLOT4.mjs +0 -20
  180. package/dist/mdc-A66KLOT4.mjs.map +0 -1
  181. package/dist/mermaid.core-4OWTNZSL.mjs +0 -1587
  182. package/dist/mermaid.core-4OWTNZSL.mjs.map +0 -1
  183. package/dist/mermaid.core-7AUE4M6E.mjs +0 -1587
  184. package/dist/mermaid.core-7AUE4M6E.mjs.map +0 -1
  185. package/dist/mindmap-definition-VGOIOE7T-7FMA2CPY.mjs +0 -1112
  186. package/dist/mindmap-definition-VGOIOE7T-7FMA2CPY.mjs.map +0 -1
  187. package/dist/mindmap-definition-VGOIOE7T-VNF7JZOY.mjs +0 -1112
  188. package/dist/mindmap-definition-VGOIOE7T-VNF7JZOY.mjs.map +0 -1
  189. package/dist/nim-HUBKBJHZ.mjs +0 -26
  190. package/dist/nim-HUBKBJHZ.mjs.map +0 -1
  191. package/dist/perl-QHAMWWQ5.mjs +0 -22
  192. package/dist/perl-QHAMWWQ5.mjs.map +0 -1
  193. package/dist/php-FS5GKSPN.mjs +0 -11
  194. package/dist/php-FS5GKSPN.mjs.map +0 -1
  195. package/dist/pieDiagram-ADFJNKIX-EER3WTCU.mjs +0 -200
  196. package/dist/pieDiagram-ADFJNKIX-EER3WTCU.mjs.map +0 -1
  197. package/dist/pug-WTY5FMEA.mjs +0 -17
  198. package/dist/pug-WTY5FMEA.mjs.map +0 -1
  199. package/dist/quadrantDiagram-AYHSOK5B-WQCIRJOK.mjs +0 -1344
  200. package/dist/quadrantDiagram-AYHSOK5B-WQCIRJOK.mjs.map +0 -1
  201. package/dist/razor-BAB7LFWZ.mjs +0 -17
  202. package/dist/razor-BAB7LFWZ.mjs.map +0 -1
  203. package/dist/requirementDiagram-UZGBJVZJ-RVM6Q2TT.mjs +0 -1179
  204. package/dist/requirementDiagram-UZGBJVZJ-RVM6Q2TT.mjs.map +0 -1
  205. package/dist/rst-AY7U27YM.mjs +0 -41
  206. package/dist/rst-AY7U27YM.mjs.map +0 -1
  207. package/dist/rst-Y2VLYMJI.mjs +0 -41
  208. package/dist/rst-Y2VLYMJI.mjs.map +0 -1
  209. package/dist/ruby-K4BNEYWG.mjs +0 -22
  210. package/dist/ruby-K4BNEYWG.mjs.map +0 -1
  211. package/dist/sankeyDiagram-TZEHDZUN-H7BVEXGO.mjs +0 -1230
  212. package/dist/sankeyDiagram-TZEHDZUN-H7BVEXGO.mjs.map +0 -1
  213. package/dist/sequenceDiagram-WL72ISMW-XBGZSOYI.mjs +0 -3885
  214. package/dist/sequenceDiagram-WL72ISMW-XBGZSOYI.mjs.map +0 -1
  215. package/dist/soy-5QMQV2KL.mjs +0 -15
  216. package/dist/soy-5QMQV2KL.mjs.map +0 -1
  217. package/dist/stateDiagram-FKZM4ZOC-WRIBVFSJ.mjs +0 -467
  218. package/dist/stateDiagram-FKZM4ZOC-WRIBVFSJ.mjs.map +0 -1
  219. package/dist/stateDiagram-v2-4FDKWEC3-SPDO7R6D.mjs +0 -37
  220. package/dist/stateDiagram-v2-4FDKWEC3-SPDO7R6D.mjs.map +0 -1
  221. package/dist/templ-VSARRSO2.mjs +0 -17
  222. package/dist/templ-VSARRSO2.mjs.map +0 -1
  223. package/dist/timeline-definition-IT6M3QCI-PX4A2RIH.mjs +0 -1226
  224. package/dist/timeline-definition-IT6M3QCI-PX4A2RIH.mjs.map +0 -1
  225. package/dist/ts-tags-YK3Q2LIW.mjs +0 -68
  226. package/dist/ts-tags-YK3Q2LIW.mjs.map +0 -1
  227. package/dist/twig-HNMWLN6H.mjs +0 -40
  228. package/dist/twig-HNMWLN6H.mjs.map +0 -1
  229. package/dist/vue-7OSX6ZY5.mjs +0 -10
  230. package/dist/vue-7OSX6ZY5.mjs.map +0 -1
  231. package/dist/vue-html-AQH2V2EU.mjs +0 -20
  232. package/dist/vue-html-AQH2V2EU.mjs.map +0 -1
  233. package/dist/vue-vine-GCYT2IGV.mjs +0 -29
  234. package/dist/vue-vine-GCYT2IGV.mjs.map +0 -1
  235. package/dist/xychartDiagram-PRI3JC2R-65KZQZDU.mjs +0 -1865
  236. package/dist/xychartDiagram-PRI3JC2R-65KZQZDU.mjs.map +0 -1
@@ -1,1230 +0,0 @@
1
- import { setDiagramTitle, getDiagramTitle, setAccDescription, getAccDescription, setAccTitle, getAccTitle, clear, common_default, getConfig2, defaultConfig2, setupGraphViewbox } from './chunk-HNKEYT4A.mjs';
2
- import { __name, select_default, ordinal, Tableau10_default } from './chunk-WHXHCOFP.mjs';
3
- import './chunk-SH6YXSHR.mjs';
4
-
5
- // ../../node_modules/.pnpm/d3-array@2.12.1/node_modules/d3-array/src/max.js
6
- function max(values, valueof) {
7
- let max2;
8
- if (valueof === void 0) {
9
- for (const value2 of values) {
10
- if (value2 != null && (max2 < value2 || max2 === void 0 && value2 >= value2)) {
11
- max2 = value2;
12
- }
13
- }
14
- } else {
15
- let index = -1;
16
- for (let value2 of values) {
17
- if ((value2 = valueof(value2, ++index, values)) != null && (max2 < value2 || max2 === void 0 && value2 >= value2)) {
18
- max2 = value2;
19
- }
20
- }
21
- }
22
- return max2;
23
- }
24
-
25
- // ../../node_modules/.pnpm/d3-array@2.12.1/node_modules/d3-array/src/min.js
26
- function min(values, valueof) {
27
- let min2;
28
- if (valueof === void 0) {
29
- for (const value2 of values) {
30
- if (value2 != null && (min2 > value2 || min2 === void 0 && value2 >= value2)) {
31
- min2 = value2;
32
- }
33
- }
34
- } else {
35
- let index = -1;
36
- for (let value2 of values) {
37
- if ((value2 = valueof(value2, ++index, values)) != null && (min2 > value2 || min2 === void 0 && value2 >= value2)) {
38
- min2 = value2;
39
- }
40
- }
41
- }
42
- return min2;
43
- }
44
-
45
- // ../../node_modules/.pnpm/d3-array@2.12.1/node_modules/d3-array/src/sum.js
46
- function sum(values, valueof) {
47
- let sum2 = 0;
48
- if (valueof === void 0) {
49
- for (let value2 of values) {
50
- if (value2 = +value2) {
51
- sum2 += value2;
52
- }
53
- }
54
- } else {
55
- let index = -1;
56
- for (let value2 of values) {
57
- if (value2 = +valueof(value2, ++index, values)) {
58
- sum2 += value2;
59
- }
60
- }
61
- }
62
- return sum2;
63
- }
64
-
65
- // ../../node_modules/.pnpm/d3-sankey@0.12.3/node_modules/d3-sankey/src/align.js
66
- function targetDepth(d) {
67
- return d.target.depth;
68
- }
69
- function left(node) {
70
- return node.depth;
71
- }
72
- function right(node, n) {
73
- return n - 1 - node.height;
74
- }
75
- function justify(node, n) {
76
- return node.sourceLinks.length ? node.depth : n - 1;
77
- }
78
- function center(node) {
79
- return node.targetLinks.length ? node.depth : node.sourceLinks.length ? min(node.sourceLinks, targetDepth) - 1 : 0;
80
- }
81
-
82
- // ../../node_modules/.pnpm/d3-sankey@0.12.3/node_modules/d3-sankey/src/constant.js
83
- function constant(x2) {
84
- return function() {
85
- return x2;
86
- };
87
- }
88
-
89
- // ../../node_modules/.pnpm/d3-sankey@0.12.3/node_modules/d3-sankey/src/sankey.js
90
- function ascendingSourceBreadth(a, b) {
91
- return ascendingBreadth(a.source, b.source) || a.index - b.index;
92
- }
93
- function ascendingTargetBreadth(a, b) {
94
- return ascendingBreadth(a.target, b.target) || a.index - b.index;
95
- }
96
- function ascendingBreadth(a, b) {
97
- return a.y0 - b.y0;
98
- }
99
- function value(d) {
100
- return d.value;
101
- }
102
- function defaultId(d) {
103
- return d.index;
104
- }
105
- function defaultNodes(graph) {
106
- return graph.nodes;
107
- }
108
- function defaultLinks(graph) {
109
- return graph.links;
110
- }
111
- function find(nodeById, id) {
112
- const node = nodeById.get(id);
113
- if (!node) throw new Error("missing: " + id);
114
- return node;
115
- }
116
- function computeLinkBreadths({ nodes: nodes2 }) {
117
- for (const node of nodes2) {
118
- let y0 = node.y0;
119
- let y1 = y0;
120
- for (const link2 of node.sourceLinks) {
121
- link2.y0 = y0 + link2.width / 2;
122
- y0 += link2.width;
123
- }
124
- for (const link2 of node.targetLinks) {
125
- link2.y1 = y1 + link2.width / 2;
126
- y1 += link2.width;
127
- }
128
- }
129
- }
130
- function Sankey() {
131
- let x0 = 0, y0 = 0, x1 = 1, y1 = 1;
132
- let dx = 24;
133
- let dy = 8, py;
134
- let id = defaultId;
135
- let align = justify;
136
- let sort;
137
- let linkSort;
138
- let nodes2 = defaultNodes;
139
- let links2 = defaultLinks;
140
- let iterations = 6;
141
- function sankey() {
142
- const graph = { nodes: nodes2.apply(null, arguments), links: links2.apply(null, arguments) };
143
- computeNodeLinks(graph);
144
- computeNodeValues(graph);
145
- computeNodeDepths(graph);
146
- computeNodeHeights(graph);
147
- computeNodeBreadths(graph);
148
- computeLinkBreadths(graph);
149
- return graph;
150
- }
151
- sankey.update = function(graph) {
152
- computeLinkBreadths(graph);
153
- return graph;
154
- };
155
- sankey.nodeId = function(_) {
156
- return arguments.length ? (id = typeof _ === "function" ? _ : constant(_), sankey) : id;
157
- };
158
- sankey.nodeAlign = function(_) {
159
- return arguments.length ? (align = typeof _ === "function" ? _ : constant(_), sankey) : align;
160
- };
161
- sankey.nodeSort = function(_) {
162
- return arguments.length ? (sort = _, sankey) : sort;
163
- };
164
- sankey.nodeWidth = function(_) {
165
- return arguments.length ? (dx = +_, sankey) : dx;
166
- };
167
- sankey.nodePadding = function(_) {
168
- return arguments.length ? (dy = py = +_, sankey) : dy;
169
- };
170
- sankey.nodes = function(_) {
171
- return arguments.length ? (nodes2 = typeof _ === "function" ? _ : constant(_), sankey) : nodes2;
172
- };
173
- sankey.links = function(_) {
174
- return arguments.length ? (links2 = typeof _ === "function" ? _ : constant(_), sankey) : links2;
175
- };
176
- sankey.linkSort = function(_) {
177
- return arguments.length ? (linkSort = _, sankey) : linkSort;
178
- };
179
- sankey.size = function(_) {
180
- return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], sankey) : [x1 - x0, y1 - y0];
181
- };
182
- sankey.extent = function(_) {
183
- return arguments.length ? (x0 = +_[0][0], x1 = +_[1][0], y0 = +_[0][1], y1 = +_[1][1], sankey) : [[x0, y0], [x1, y1]];
184
- };
185
- sankey.iterations = function(_) {
186
- return arguments.length ? (iterations = +_, sankey) : iterations;
187
- };
188
- function computeNodeLinks({ nodes: nodes3, links: links3 }) {
189
- for (const [i, node] of nodes3.entries()) {
190
- node.index = i;
191
- node.sourceLinks = [];
192
- node.targetLinks = [];
193
- }
194
- const nodeById = new Map(nodes3.map((d, i) => [id(d, i, nodes3), d]));
195
- for (const [i, link2] of links3.entries()) {
196
- link2.index = i;
197
- let { source, target } = link2;
198
- if (typeof source !== "object") source = link2.source = find(nodeById, source);
199
- if (typeof target !== "object") target = link2.target = find(nodeById, target);
200
- source.sourceLinks.push(link2);
201
- target.targetLinks.push(link2);
202
- }
203
- if (linkSort != null) {
204
- for (const { sourceLinks, targetLinks } of nodes3) {
205
- sourceLinks.sort(linkSort);
206
- targetLinks.sort(linkSort);
207
- }
208
- }
209
- }
210
- function computeNodeValues({ nodes: nodes3 }) {
211
- for (const node of nodes3) {
212
- node.value = node.fixedValue === void 0 ? Math.max(sum(node.sourceLinks, value), sum(node.targetLinks, value)) : node.fixedValue;
213
- }
214
- }
215
- function computeNodeDepths({ nodes: nodes3 }) {
216
- const n = nodes3.length;
217
- let current = new Set(nodes3);
218
- let next = /* @__PURE__ */ new Set();
219
- let x2 = 0;
220
- while (current.size) {
221
- for (const node of current) {
222
- node.depth = x2;
223
- for (const { target } of node.sourceLinks) {
224
- next.add(target);
225
- }
226
- }
227
- if (++x2 > n) throw new Error("circular link");
228
- current = next;
229
- next = /* @__PURE__ */ new Set();
230
- }
231
- }
232
- function computeNodeHeights({ nodes: nodes3 }) {
233
- const n = nodes3.length;
234
- let current = new Set(nodes3);
235
- let next = /* @__PURE__ */ new Set();
236
- let x2 = 0;
237
- while (current.size) {
238
- for (const node of current) {
239
- node.height = x2;
240
- for (const { source } of node.targetLinks) {
241
- next.add(source);
242
- }
243
- }
244
- if (++x2 > n) throw new Error("circular link");
245
- current = next;
246
- next = /* @__PURE__ */ new Set();
247
- }
248
- }
249
- function computeNodeLayers({ nodes: nodes3 }) {
250
- const x2 = max(nodes3, (d) => d.depth) + 1;
251
- const kx = (x1 - x0 - dx) / (x2 - 1);
252
- const columns = new Array(x2);
253
- for (const node of nodes3) {
254
- const i = Math.max(0, Math.min(x2 - 1, Math.floor(align.call(null, node, x2))));
255
- node.layer = i;
256
- node.x0 = x0 + i * kx;
257
- node.x1 = node.x0 + dx;
258
- if (columns[i]) columns[i].push(node);
259
- else columns[i] = [node];
260
- }
261
- if (sort) for (const column of columns) {
262
- column.sort(sort);
263
- }
264
- return columns;
265
- }
266
- function initializeNodeBreadths(columns) {
267
- const ky = min(columns, (c) => (y1 - y0 - (c.length - 1) * py) / sum(c, value));
268
- for (const nodes3 of columns) {
269
- let y2 = y0;
270
- for (const node of nodes3) {
271
- node.y0 = y2;
272
- node.y1 = y2 + node.value * ky;
273
- y2 = node.y1 + py;
274
- for (const link2 of node.sourceLinks) {
275
- link2.width = link2.value * ky;
276
- }
277
- }
278
- y2 = (y1 - y2 + py) / (nodes3.length + 1);
279
- for (let i = 0; i < nodes3.length; ++i) {
280
- const node = nodes3[i];
281
- node.y0 += y2 * (i + 1);
282
- node.y1 += y2 * (i + 1);
283
- }
284
- reorderLinks(nodes3);
285
- }
286
- }
287
- function computeNodeBreadths(graph) {
288
- const columns = computeNodeLayers(graph);
289
- py = Math.min(dy, (y1 - y0) / (max(columns, (c) => c.length) - 1));
290
- initializeNodeBreadths(columns);
291
- for (let i = 0; i < iterations; ++i) {
292
- const alpha = Math.pow(0.99, i);
293
- const beta = Math.max(1 - alpha, (i + 1) / iterations);
294
- relaxRightToLeft(columns, alpha, beta);
295
- relaxLeftToRight(columns, alpha, beta);
296
- }
297
- }
298
- function relaxLeftToRight(columns, alpha, beta) {
299
- for (let i = 1, n = columns.length; i < n; ++i) {
300
- const column = columns[i];
301
- for (const target of column) {
302
- let y2 = 0;
303
- let w = 0;
304
- for (const { source, value: value2 } of target.targetLinks) {
305
- let v = value2 * (target.layer - source.layer);
306
- y2 += targetTop(source, target) * v;
307
- w += v;
308
- }
309
- if (!(w > 0)) continue;
310
- let dy2 = (y2 / w - target.y0) * alpha;
311
- target.y0 += dy2;
312
- target.y1 += dy2;
313
- reorderNodeLinks(target);
314
- }
315
- if (sort === void 0) column.sort(ascendingBreadth);
316
- resolveCollisions(column, beta);
317
- }
318
- }
319
- function relaxRightToLeft(columns, alpha, beta) {
320
- for (let n = columns.length, i = n - 2; i >= 0; --i) {
321
- const column = columns[i];
322
- for (const source of column) {
323
- let y2 = 0;
324
- let w = 0;
325
- for (const { target, value: value2 } of source.sourceLinks) {
326
- let v = value2 * (target.layer - source.layer);
327
- y2 += sourceTop(source, target) * v;
328
- w += v;
329
- }
330
- if (!(w > 0)) continue;
331
- let dy2 = (y2 / w - source.y0) * alpha;
332
- source.y0 += dy2;
333
- source.y1 += dy2;
334
- reorderNodeLinks(source);
335
- }
336
- if (sort === void 0) column.sort(ascendingBreadth);
337
- resolveCollisions(column, beta);
338
- }
339
- }
340
- function resolveCollisions(nodes3, alpha) {
341
- const i = nodes3.length >> 1;
342
- const subject = nodes3[i];
343
- resolveCollisionsBottomToTop(nodes3, subject.y0 - py, i - 1, alpha);
344
- resolveCollisionsTopToBottom(nodes3, subject.y1 + py, i + 1, alpha);
345
- resolveCollisionsBottomToTop(nodes3, y1, nodes3.length - 1, alpha);
346
- resolveCollisionsTopToBottom(nodes3, y0, 0, alpha);
347
- }
348
- function resolveCollisionsTopToBottom(nodes3, y2, i, alpha) {
349
- for (; i < nodes3.length; ++i) {
350
- const node = nodes3[i];
351
- const dy2 = (y2 - node.y0) * alpha;
352
- if (dy2 > 1e-6) node.y0 += dy2, node.y1 += dy2;
353
- y2 = node.y1 + py;
354
- }
355
- }
356
- function resolveCollisionsBottomToTop(nodes3, y2, i, alpha) {
357
- for (; i >= 0; --i) {
358
- const node = nodes3[i];
359
- const dy2 = (node.y1 - y2) * alpha;
360
- if (dy2 > 1e-6) node.y0 -= dy2, node.y1 -= dy2;
361
- y2 = node.y0 - py;
362
- }
363
- }
364
- function reorderNodeLinks({ sourceLinks, targetLinks }) {
365
- if (linkSort === void 0) {
366
- for (const { source: { sourceLinks: sourceLinks2 } } of targetLinks) {
367
- sourceLinks2.sort(ascendingTargetBreadth);
368
- }
369
- for (const { target: { targetLinks: targetLinks2 } } of sourceLinks) {
370
- targetLinks2.sort(ascendingSourceBreadth);
371
- }
372
- }
373
- }
374
- function reorderLinks(nodes3) {
375
- if (linkSort === void 0) {
376
- for (const { sourceLinks, targetLinks } of nodes3) {
377
- sourceLinks.sort(ascendingTargetBreadth);
378
- targetLinks.sort(ascendingSourceBreadth);
379
- }
380
- }
381
- }
382
- function targetTop(source, target) {
383
- let y2 = source.y0 - (source.sourceLinks.length - 1) * py / 2;
384
- for (const { target: node, width } of source.sourceLinks) {
385
- if (node === target) break;
386
- y2 += width + py;
387
- }
388
- for (const { source: node, width } of target.targetLinks) {
389
- if (node === source) break;
390
- y2 -= width;
391
- }
392
- return y2;
393
- }
394
- function sourceTop(source, target) {
395
- let y2 = target.y0 - (target.targetLinks.length - 1) * py / 2;
396
- for (const { source: node, width } of target.targetLinks) {
397
- if (node === source) break;
398
- y2 += width + py;
399
- }
400
- for (const { target: node, width } of source.sourceLinks) {
401
- if (node === target) break;
402
- y2 -= width;
403
- }
404
- return y2;
405
- }
406
- return sankey;
407
- }
408
-
409
- // ../../node_modules/.pnpm/d3-path@1.0.9/node_modules/d3-path/src/path.js
410
- var pi = Math.PI;
411
- var tau = 2 * pi;
412
- var epsilon = 1e-6;
413
- var tauEpsilon = tau - epsilon;
414
- function Path() {
415
- this._x0 = this._y0 = // start of current subpath
416
- this._x1 = this._y1 = null;
417
- this._ = "";
418
- }
419
- function path() {
420
- return new Path();
421
- }
422
- Path.prototype = path.prototype = {
423
- constructor: Path,
424
- moveTo: function(x2, y2) {
425
- this._ += "M" + (this._x0 = this._x1 = +x2) + "," + (this._y0 = this._y1 = +y2);
426
- },
427
- closePath: function() {
428
- if (this._x1 !== null) {
429
- this._x1 = this._x0, this._y1 = this._y0;
430
- this._ += "Z";
431
- }
432
- },
433
- lineTo: function(x2, y2) {
434
- this._ += "L" + (this._x1 = +x2) + "," + (this._y1 = +y2);
435
- },
436
- quadraticCurveTo: function(x1, y1, x2, y2) {
437
- this._ += "Q" + +x1 + "," + +y1 + "," + (this._x1 = +x2) + "," + (this._y1 = +y2);
438
- },
439
- bezierCurveTo: function(x1, y1, x2, y2, x3, y3) {
440
- this._ += "C" + +x1 + "," + +y1 + "," + +x2 + "," + +y2 + "," + (this._x1 = +x3) + "," + (this._y1 = +y3);
441
- },
442
- arcTo: function(x1, y1, x2, y2, r) {
443
- x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
444
- var x0 = this._x1, y0 = this._y1, x21 = x2 - x1, y21 = y2 - y1, x01 = x0 - x1, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01;
445
- if (r < 0) throw new Error("negative radius: " + r);
446
- if (this._x1 === null) {
447
- this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1);
448
- } else if (!(l01_2 > epsilon)) ;
449
- else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {
450
- this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1);
451
- } else {
452
- var x20 = x2 - x0, y20 = y2 - y0, l21_2 = x21 * x21 + y21 * y21, l20_2 = x20 * x20 + y20 * y20, l21 = Math.sqrt(l21_2), l01 = Math.sqrt(l01_2), l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), t01 = l / l01, t21 = l / l21;
453
- if (Math.abs(t01 - 1) > epsilon) {
454
- this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01);
455
- }
456
- this._ += "A" + r + "," + r + ",0,0," + +(y01 * x20 > x01 * y20) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21);
457
- }
458
- },
459
- arc: function(x2, y2, r, a0, a1, ccw) {
460
- x2 = +x2, y2 = +y2, r = +r, ccw = !!ccw;
461
- var dx = r * Math.cos(a0), dy = r * Math.sin(a0), x0 = x2 + dx, y0 = y2 + dy, cw = 1 ^ ccw, da = ccw ? a0 - a1 : a1 - a0;
462
- if (r < 0) throw new Error("negative radius: " + r);
463
- if (this._x1 === null) {
464
- this._ += "M" + x0 + "," + y0;
465
- } else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {
466
- this._ += "L" + x0 + "," + y0;
467
- }
468
- if (!r) return;
469
- if (da < 0) da = da % tau + tau;
470
- if (da > tauEpsilon) {
471
- this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x2 - dx) + "," + (y2 - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0);
472
- } else if (da > epsilon) {
473
- this._ += "A" + r + "," + r + ",0," + +(da >= pi) + "," + cw + "," + (this._x1 = x2 + r * Math.cos(a1)) + "," + (this._y1 = y2 + r * Math.sin(a1));
474
- }
475
- },
476
- rect: function(x2, y2, w, h) {
477
- this._ += "M" + (this._x0 = this._x1 = +x2) + "," + (this._y0 = this._y1 = +y2) + "h" + +w + "v" + +h + "h" + -w + "Z";
478
- },
479
- toString: function() {
480
- return this._;
481
- }
482
- };
483
- var path_default = path;
484
-
485
- // ../../node_modules/.pnpm/d3-shape@1.3.7/node_modules/d3-shape/src/constant.js
486
- function constant_default(x2) {
487
- return function constant2() {
488
- return x2;
489
- };
490
- }
491
-
492
- // ../../node_modules/.pnpm/d3-shape@1.3.7/node_modules/d3-shape/src/point.js
493
- function x(p) {
494
- return p[0];
495
- }
496
- function y(p) {
497
- return p[1];
498
- }
499
-
500
- // ../../node_modules/.pnpm/d3-shape@1.3.7/node_modules/d3-shape/src/array.js
501
- var slice = Array.prototype.slice;
502
-
503
- // ../../node_modules/.pnpm/d3-shape@1.3.7/node_modules/d3-shape/src/link/index.js
504
- function linkSource(d) {
505
- return d.source;
506
- }
507
- function linkTarget(d) {
508
- return d.target;
509
- }
510
- function link(curve) {
511
- var source = linkSource, target = linkTarget, x2 = x, y2 = y, context = null;
512
- function link2() {
513
- var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);
514
- if (!context) context = buffer = path_default();
515
- curve(context, +x2.apply(this, (argv[0] = s, argv)), +y2.apply(this, argv), +x2.apply(this, (argv[0] = t, argv)), +y2.apply(this, argv));
516
- if (buffer) return context = null, buffer + "" || null;
517
- }
518
- link2.source = function(_) {
519
- return arguments.length ? (source = _, link2) : source;
520
- };
521
- link2.target = function(_) {
522
- return arguments.length ? (target = _, link2) : target;
523
- };
524
- link2.x = function(_) {
525
- return arguments.length ? (x2 = typeof _ === "function" ? _ : constant_default(+_), link2) : x2;
526
- };
527
- link2.y = function(_) {
528
- return arguments.length ? (y2 = typeof _ === "function" ? _ : constant_default(+_), link2) : y2;
529
- };
530
- link2.context = function(_) {
531
- return arguments.length ? (context = _ == null ? null : _, link2) : context;
532
- };
533
- return link2;
534
- }
535
- function curveHorizontal(context, x0, y0, x1, y1) {
536
- context.moveTo(x0, y0);
537
- context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);
538
- }
539
- function linkHorizontal() {
540
- return link(curveHorizontal);
541
- }
542
-
543
- // ../../node_modules/.pnpm/d3-sankey@0.12.3/node_modules/d3-sankey/src/sankeyLinkHorizontal.js
544
- function horizontalSource(d) {
545
- return [d.source.x1, d.y0];
546
- }
547
- function horizontalTarget(d) {
548
- return [d.target.x0, d.y1];
549
- }
550
- function sankeyLinkHorizontal_default() {
551
- return linkHorizontal().source(horizontalSource).target(horizontalTarget);
552
- }
553
-
554
- // ../../node_modules/.pnpm/mermaid@11.12.0/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-TZEHDZUN.mjs
555
- var parser = function() {
556
- var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
557
- for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
558
- return o2;
559
- }, "o"), $V0 = [1, 9], $V1 = [1, 10], $V2 = [1, 5, 10, 12];
560
- var parser2 = {
561
- trace: /* @__PURE__ */ __name(function trace() {
562
- }, "trace"),
563
- yy: {},
564
- symbols_: { "error": 2, "start": 3, "SANKEY": 4, "NEWLINE": 5, "csv": 6, "opt_eof": 7, "record": 8, "csv_tail": 9, "EOF": 10, "field[source]": 11, "COMMA": 12, "field[target]": 13, "field[value]": 14, "field": 15, "escaped": 16, "non_escaped": 17, "DQUOTE": 18, "ESCAPED_TEXT": 19, "NON_ESCAPED_TEXT": 20, "$accept": 0, "$end": 1 },
565
- terminals_: { 2: "error", 4: "SANKEY", 5: "NEWLINE", 10: "EOF", 11: "field[source]", 12: "COMMA", 13: "field[target]", 14: "field[value]", 18: "DQUOTE", 19: "ESCAPED_TEXT", 20: "NON_ESCAPED_TEXT" },
566
- productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]],
567
- performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
568
- var $0 = $$.length - 1;
569
- switch (yystate) {
570
- case 7:
571
- const source = yy.findOrCreateNode($$[$0 - 4].trim().replaceAll('""', '"'));
572
- const target = yy.findOrCreateNode($$[$0 - 2].trim().replaceAll('""', '"'));
573
- const value2 = parseFloat($$[$0].trim());
574
- yy.addLink(source, target, value2);
575
- break;
576
- case 8:
577
- case 9:
578
- case 11:
579
- this.$ = $$[$0];
580
- break;
581
- case 10:
582
- this.$ = $$[$0 - 1];
583
- break;
584
- }
585
- }, "anonymous"),
586
- table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 1: [2, 6], 7: 11, 10: [1, 12] }, o($V1, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, o($V2, [2, 8]), o($V2, [2, 9]), { 19: [1, 16] }, o($V2, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, o($V1, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 15: 18, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 18: [1, 19] }, o($V1, [2, 3]), { 12: [1, 20] }, o($V2, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: $V0, 20: $V1 }, o([1, 5, 10], [2, 7])],
587
- defaultActions: { 11: [2, 1], 12: [2, 5] },
588
- parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
589
- if (hash.recoverable) {
590
- this.trace(str);
591
- } else {
592
- var error = new Error(str);
593
- error.hash = hash;
594
- throw error;
595
- }
596
- }, "parseError"),
597
- parse: /* @__PURE__ */ __name(function parse(input) {
598
- var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
599
- var args = lstack.slice.call(arguments, 1);
600
- var lexer2 = Object.create(this.lexer);
601
- var sharedState = { yy: {} };
602
- for (var k in this.yy) {
603
- if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
604
- sharedState.yy[k] = this.yy[k];
605
- }
606
- }
607
- lexer2.setInput(input, sharedState.yy);
608
- sharedState.yy.lexer = lexer2;
609
- sharedState.yy.parser = this;
610
- if (typeof lexer2.yylloc == "undefined") {
611
- lexer2.yylloc = {};
612
- }
613
- var yyloc = lexer2.yylloc;
614
- lstack.push(yyloc);
615
- var ranges = lexer2.options && lexer2.options.ranges;
616
- if (typeof sharedState.yy.parseError === "function") {
617
- this.parseError = sharedState.yy.parseError;
618
- } else {
619
- this.parseError = Object.getPrototypeOf(this).parseError;
620
- }
621
- function popStack(n) {
622
- stack.length = stack.length - 2 * n;
623
- vstack.length = vstack.length - n;
624
- lstack.length = lstack.length - n;
625
- }
626
- __name(popStack, "popStack");
627
- function lex() {
628
- var token;
629
- token = tstack.pop() || lexer2.lex() || EOF;
630
- if (typeof token !== "number") {
631
- if (token instanceof Array) {
632
- tstack = token;
633
- token = tstack.pop();
634
- }
635
- token = self.symbols_[token] || token;
636
- }
637
- return token;
638
- }
639
- __name(lex, "lex");
640
- var symbol, state, action, r, yyval = {}, p, len, newState, expected;
641
- while (true) {
642
- state = stack[stack.length - 1];
643
- if (this.defaultActions[state]) {
644
- action = this.defaultActions[state];
645
- } else {
646
- if (symbol === null || typeof symbol == "undefined") {
647
- symbol = lex();
648
- }
649
- action = table[state] && table[state][symbol];
650
- }
651
- if (typeof action === "undefined" || !action.length || !action[0]) {
652
- var errStr = "";
653
- expected = [];
654
- for (p in table[state]) {
655
- if (this.terminals_[p] && p > TERROR) {
656
- expected.push("'" + this.terminals_[p] + "'");
657
- }
658
- }
659
- if (lexer2.showPosition) {
660
- errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
661
- } else {
662
- errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
663
- }
664
- this.parseError(errStr, {
665
- text: lexer2.match,
666
- token: this.terminals_[symbol] || symbol,
667
- line: lexer2.yylineno,
668
- loc: yyloc,
669
- expected
670
- });
671
- }
672
- if (action[0] instanceof Array && action.length > 1) {
673
- throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
674
- }
675
- switch (action[0]) {
676
- case 1:
677
- stack.push(symbol);
678
- vstack.push(lexer2.yytext);
679
- lstack.push(lexer2.yylloc);
680
- stack.push(action[1]);
681
- symbol = null;
682
- {
683
- yyleng = lexer2.yyleng;
684
- yytext = lexer2.yytext;
685
- yylineno = lexer2.yylineno;
686
- yyloc = lexer2.yylloc;
687
- }
688
- break;
689
- case 2:
690
- len = this.productions_[action[1]][1];
691
- yyval.$ = vstack[vstack.length - len];
692
- yyval._$ = {
693
- first_line: lstack[lstack.length - (len || 1)].first_line,
694
- last_line: lstack[lstack.length - 1].last_line,
695
- first_column: lstack[lstack.length - (len || 1)].first_column,
696
- last_column: lstack[lstack.length - 1].last_column
697
- };
698
- if (ranges) {
699
- yyval._$.range = [
700
- lstack[lstack.length - (len || 1)].range[0],
701
- lstack[lstack.length - 1].range[1]
702
- ];
703
- }
704
- r = this.performAction.apply(yyval, [
705
- yytext,
706
- yyleng,
707
- yylineno,
708
- sharedState.yy,
709
- action[1],
710
- vstack,
711
- lstack
712
- ].concat(args));
713
- if (typeof r !== "undefined") {
714
- return r;
715
- }
716
- if (len) {
717
- stack = stack.slice(0, -1 * len * 2);
718
- vstack = vstack.slice(0, -1 * len);
719
- lstack = lstack.slice(0, -1 * len);
720
- }
721
- stack.push(this.productions_[action[1]][0]);
722
- vstack.push(yyval.$);
723
- lstack.push(yyval._$);
724
- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
725
- stack.push(newState);
726
- break;
727
- case 3:
728
- return true;
729
- }
730
- }
731
- return true;
732
- }, "parse")
733
- };
734
- var lexer = /* @__PURE__ */ function() {
735
- var lexer2 = {
736
- EOF: 1,
737
- parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
738
- if (this.yy.parser) {
739
- this.yy.parser.parseError(str, hash);
740
- } else {
741
- throw new Error(str);
742
- }
743
- }, "parseError"),
744
- // resets the lexer, sets new input
745
- setInput: /* @__PURE__ */ __name(function(input, yy) {
746
- this.yy = yy || this.yy || {};
747
- this._input = input;
748
- this._more = this._backtrack = this.done = false;
749
- this.yylineno = this.yyleng = 0;
750
- this.yytext = this.matched = this.match = "";
751
- this.conditionStack = ["INITIAL"];
752
- this.yylloc = {
753
- first_line: 1,
754
- first_column: 0,
755
- last_line: 1,
756
- last_column: 0
757
- };
758
- if (this.options.ranges) {
759
- this.yylloc.range = [0, 0];
760
- }
761
- this.offset = 0;
762
- return this;
763
- }, "setInput"),
764
- // consumes and returns one char from the input
765
- input: /* @__PURE__ */ __name(function() {
766
- var ch = this._input[0];
767
- this.yytext += ch;
768
- this.yyleng++;
769
- this.offset++;
770
- this.match += ch;
771
- this.matched += ch;
772
- var lines = ch.match(/(?:\r\n?|\n).*/g);
773
- if (lines) {
774
- this.yylineno++;
775
- this.yylloc.last_line++;
776
- } else {
777
- this.yylloc.last_column++;
778
- }
779
- if (this.options.ranges) {
780
- this.yylloc.range[1]++;
781
- }
782
- this._input = this._input.slice(1);
783
- return ch;
784
- }, "input"),
785
- // unshifts one char (or a string) into the input
786
- unput: /* @__PURE__ */ __name(function(ch) {
787
- var len = ch.length;
788
- var lines = ch.split(/(?:\r\n?|\n)/g);
789
- this._input = ch + this._input;
790
- this.yytext = this.yytext.substr(0, this.yytext.length - len);
791
- this.offset -= len;
792
- var oldLines = this.match.split(/(?:\r\n?|\n)/g);
793
- this.match = this.match.substr(0, this.match.length - 1);
794
- this.matched = this.matched.substr(0, this.matched.length - 1);
795
- if (lines.length - 1) {
796
- this.yylineno -= lines.length - 1;
797
- }
798
- var r = this.yylloc.range;
799
- this.yylloc = {
800
- first_line: this.yylloc.first_line,
801
- last_line: this.yylineno + 1,
802
- first_column: this.yylloc.first_column,
803
- last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
804
- };
805
- if (this.options.ranges) {
806
- this.yylloc.range = [r[0], r[0] + this.yyleng - len];
807
- }
808
- this.yyleng = this.yytext.length;
809
- return this;
810
- }, "unput"),
811
- // When called from action, caches matched text and appends it on next action
812
- more: /* @__PURE__ */ __name(function() {
813
- this._more = true;
814
- return this;
815
- }, "more"),
816
- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
817
- reject: /* @__PURE__ */ __name(function() {
818
- if (this.options.backtrack_lexer) {
819
- this._backtrack = true;
820
- } else {
821
- 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(), {
822
- text: "",
823
- token: null,
824
- line: this.yylineno
825
- });
826
- }
827
- return this;
828
- }, "reject"),
829
- // retain first n characters of the match
830
- less: /* @__PURE__ */ __name(function(n) {
831
- this.unput(this.match.slice(n));
832
- }, "less"),
833
- // displays already matched input, i.e. for error messages
834
- pastInput: /* @__PURE__ */ __name(function() {
835
- var past = this.matched.substr(0, this.matched.length - this.match.length);
836
- return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
837
- }, "pastInput"),
838
- // displays upcoming input, i.e. for error messages
839
- upcomingInput: /* @__PURE__ */ __name(function() {
840
- var next = this.match;
841
- if (next.length < 20) {
842
- next += this._input.substr(0, 20 - next.length);
843
- }
844
- return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
845
- }, "upcomingInput"),
846
- // displays the character position where the lexing error occurred, i.e. for error messages
847
- showPosition: /* @__PURE__ */ __name(function() {
848
- var pre = this.pastInput();
849
- var c = new Array(pre.length + 1).join("-");
850
- return pre + this.upcomingInput() + "\n" + c + "^";
851
- }, "showPosition"),
852
- // test the lexed token: return FALSE when not a match, otherwise return token
853
- test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
854
- var token, lines, backup;
855
- if (this.options.backtrack_lexer) {
856
- backup = {
857
- yylineno: this.yylineno,
858
- yylloc: {
859
- first_line: this.yylloc.first_line,
860
- last_line: this.last_line,
861
- first_column: this.yylloc.first_column,
862
- last_column: this.yylloc.last_column
863
- },
864
- yytext: this.yytext,
865
- match: this.match,
866
- matches: this.matches,
867
- matched: this.matched,
868
- yyleng: this.yyleng,
869
- offset: this.offset,
870
- _more: this._more,
871
- _input: this._input,
872
- yy: this.yy,
873
- conditionStack: this.conditionStack.slice(0),
874
- done: this.done
875
- };
876
- if (this.options.ranges) {
877
- backup.yylloc.range = this.yylloc.range.slice(0);
878
- }
879
- }
880
- lines = match[0].match(/(?:\r\n?|\n).*/g);
881
- if (lines) {
882
- this.yylineno += lines.length;
883
- }
884
- this.yylloc = {
885
- first_line: this.yylloc.last_line,
886
- last_line: this.yylineno + 1,
887
- first_column: this.yylloc.last_column,
888
- last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
889
- };
890
- this.yytext += match[0];
891
- this.match += match[0];
892
- this.matches = match;
893
- this.yyleng = this.yytext.length;
894
- if (this.options.ranges) {
895
- this.yylloc.range = [this.offset, this.offset += this.yyleng];
896
- }
897
- this._more = false;
898
- this._backtrack = false;
899
- this._input = this._input.slice(match[0].length);
900
- this.matched += match[0];
901
- token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
902
- if (this.done && this._input) {
903
- this.done = false;
904
- }
905
- if (token) {
906
- return token;
907
- } else if (this._backtrack) {
908
- for (var k in backup) {
909
- this[k] = backup[k];
910
- }
911
- return false;
912
- }
913
- return false;
914
- }, "test_match"),
915
- // return next match in input
916
- next: /* @__PURE__ */ __name(function() {
917
- if (this.done) {
918
- return this.EOF;
919
- }
920
- if (!this._input) {
921
- this.done = true;
922
- }
923
- var token, match, tempMatch, index;
924
- if (!this._more) {
925
- this.yytext = "";
926
- this.match = "";
927
- }
928
- var rules = this._currentRules();
929
- for (var i = 0; i < rules.length; i++) {
930
- tempMatch = this._input.match(this.rules[rules[i]]);
931
- if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
932
- match = tempMatch;
933
- index = i;
934
- if (this.options.backtrack_lexer) {
935
- token = this.test_match(tempMatch, rules[i]);
936
- if (token !== false) {
937
- return token;
938
- } else if (this._backtrack) {
939
- match = false;
940
- continue;
941
- } else {
942
- return false;
943
- }
944
- } else if (!this.options.flex) {
945
- break;
946
- }
947
- }
948
- }
949
- if (match) {
950
- token = this.test_match(match, rules[index]);
951
- if (token !== false) {
952
- return token;
953
- }
954
- return false;
955
- }
956
- if (this._input === "") {
957
- return this.EOF;
958
- } else {
959
- return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
960
- text: "",
961
- token: null,
962
- line: this.yylineno
963
- });
964
- }
965
- }, "next"),
966
- // return next match that has a token
967
- lex: /* @__PURE__ */ __name(function lex() {
968
- var r = this.next();
969
- if (r) {
970
- return r;
971
- } else {
972
- return this.lex();
973
- }
974
- }, "lex"),
975
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
976
- begin: /* @__PURE__ */ __name(function begin(condition) {
977
- this.conditionStack.push(condition);
978
- }, "begin"),
979
- // pop the previously active lexer condition state off the condition stack
980
- popState: /* @__PURE__ */ __name(function popState() {
981
- var n = this.conditionStack.length - 1;
982
- if (n > 0) {
983
- return this.conditionStack.pop();
984
- } else {
985
- return this.conditionStack[0];
986
- }
987
- }, "popState"),
988
- // produce the lexer rule set which is active for the currently active lexer condition state
989
- _currentRules: /* @__PURE__ */ __name(function _currentRules() {
990
- if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
991
- return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
992
- } else {
993
- return this.conditions["INITIAL"].rules;
994
- }
995
- }, "_currentRules"),
996
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
997
- topState: /* @__PURE__ */ __name(function topState(n) {
998
- n = this.conditionStack.length - 1 - Math.abs(n || 0);
999
- if (n >= 0) {
1000
- return this.conditionStack[n];
1001
- } else {
1002
- return "INITIAL";
1003
- }
1004
- }, "topState"),
1005
- // alias for begin(condition)
1006
- pushState: /* @__PURE__ */ __name(function pushState(condition) {
1007
- this.begin(condition);
1008
- }, "pushState"),
1009
- // return the number of states currently on the stack
1010
- stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
1011
- return this.conditionStack.length;
1012
- }, "stateStackSize"),
1013
- options: { "case-insensitive": true },
1014
- performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
1015
- switch ($avoiding_name_collisions) {
1016
- case 0:
1017
- this.pushState("csv");
1018
- return 4;
1019
- case 1:
1020
- this.pushState("csv");
1021
- return 4;
1022
- case 2:
1023
- return 10;
1024
- case 3:
1025
- return 5;
1026
- case 4:
1027
- return 12;
1028
- case 5:
1029
- this.pushState("escaped_text");
1030
- return 18;
1031
- case 6:
1032
- return 20;
1033
- case 7:
1034
- this.popState("escaped_text");
1035
- return 18;
1036
- case 8:
1037
- return 19;
1038
- }
1039
- }, "anonymous"),
1040
- rules: [/^(?:sankey-beta\b)/i, /^(?:sankey\b)/i, /^(?:$)/i, /^(?:((\u000D\u000A)|(\u000A)))/i, /^(?:(\u002C))/i, /^(?:(\u0022))/i, /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i, /^(?:(\u0022)(?!(\u0022)))/i, /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],
1041
- conditions: { "csv": { "rules": [2, 3, 4, 5, 6, 7, 8], "inclusive": false }, "escaped_text": { "rules": [7, 8], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8], "inclusive": true } }
1042
- };
1043
- return lexer2;
1044
- }();
1045
- parser2.lexer = lexer;
1046
- function Parser() {
1047
- this.yy = {};
1048
- }
1049
- __name(Parser, "Parser");
1050
- Parser.prototype = parser2;
1051
- parser2.Parser = Parser;
1052
- return new Parser();
1053
- }();
1054
- parser.parser = parser;
1055
- var sankey_default = parser;
1056
- var links = [];
1057
- var nodes = [];
1058
- var nodesMap = /* @__PURE__ */ new Map();
1059
- var clear2 = /* @__PURE__ */ __name(() => {
1060
- links = [];
1061
- nodes = [];
1062
- nodesMap = /* @__PURE__ */ new Map();
1063
- clear();
1064
- }, "clear");
1065
- var SankeyLink = class {
1066
- constructor(source, target, value2 = 0) {
1067
- this.source = source;
1068
- this.target = target;
1069
- this.value = value2;
1070
- }
1071
- static {
1072
- __name(this, "SankeyLink");
1073
- }
1074
- };
1075
- var addLink = /* @__PURE__ */ __name((source, target, value2) => {
1076
- links.push(new SankeyLink(source, target, value2));
1077
- }, "addLink");
1078
- var SankeyNode = class {
1079
- constructor(ID) {
1080
- this.ID = ID;
1081
- }
1082
- static {
1083
- __name(this, "SankeyNode");
1084
- }
1085
- };
1086
- var findOrCreateNode = /* @__PURE__ */ __name((ID) => {
1087
- ID = common_default.sanitizeText(ID, getConfig2());
1088
- let node = nodesMap.get(ID);
1089
- if (node === void 0) {
1090
- node = new SankeyNode(ID);
1091
- nodesMap.set(ID, node);
1092
- nodes.push(node);
1093
- }
1094
- return node;
1095
- }, "findOrCreateNode");
1096
- var getNodes = /* @__PURE__ */ __name(() => nodes, "getNodes");
1097
- var getLinks = /* @__PURE__ */ __name(() => links, "getLinks");
1098
- var getGraph = /* @__PURE__ */ __name(() => ({
1099
- nodes: nodes.map((node) => ({ id: node.ID })),
1100
- links: links.map((link2) => ({
1101
- source: link2.source.ID,
1102
- target: link2.target.ID,
1103
- value: link2.value
1104
- }))
1105
- }), "getGraph");
1106
- var sankeyDB_default = {
1107
- nodesMap,
1108
- getConfig: /* @__PURE__ */ __name(() => getConfig2().sankey, "getConfig"),
1109
- getNodes,
1110
- getLinks,
1111
- getGraph,
1112
- addLink,
1113
- findOrCreateNode,
1114
- getAccTitle,
1115
- setAccTitle,
1116
- getAccDescription,
1117
- setAccDescription,
1118
- getDiagramTitle,
1119
- setDiagramTitle,
1120
- clear: clear2
1121
- };
1122
- var Uid = class _Uid {
1123
- static {
1124
- __name(this, "Uid");
1125
- }
1126
- static {
1127
- this.count = 0;
1128
- }
1129
- static next(name) {
1130
- return new _Uid(name + ++_Uid.count);
1131
- }
1132
- constructor(id) {
1133
- this.id = id;
1134
- this.href = `#${id}`;
1135
- }
1136
- toString() {
1137
- return "url(" + this.href + ")";
1138
- }
1139
- };
1140
- var alignmentsMap = {
1141
- left,
1142
- right,
1143
- center,
1144
- justify
1145
- };
1146
- var draw = /* @__PURE__ */ __name(function(text, id, _version, diagObj) {
1147
- const { securityLevel, sankey: conf } = getConfig2();
1148
- const defaultSankeyConfig = defaultConfig2.sankey;
1149
- let sandboxElement;
1150
- if (securityLevel === "sandbox") {
1151
- sandboxElement = select_default("#i" + id);
1152
- }
1153
- const root = securityLevel === "sandbox" ? select_default(sandboxElement.nodes()[0].contentDocument.body) : select_default("body");
1154
- const svg = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : select_default(`[id="${id}"]`);
1155
- const width = conf?.width ?? defaultSankeyConfig.width;
1156
- const height = conf?.height ?? defaultSankeyConfig.width;
1157
- const useMaxWidth = conf?.useMaxWidth ?? defaultSankeyConfig.useMaxWidth;
1158
- const nodeAlignment = conf?.nodeAlignment ?? defaultSankeyConfig.nodeAlignment;
1159
- const prefix = conf?.prefix ?? defaultSankeyConfig.prefix;
1160
- const suffix = conf?.suffix ?? defaultSankeyConfig.suffix;
1161
- const showValues = conf?.showValues ?? defaultSankeyConfig.showValues;
1162
- const graph = diagObj.db.getGraph();
1163
- const nodeAlign = alignmentsMap[nodeAlignment];
1164
- const nodeWidth = 10;
1165
- const sankey = Sankey().nodeId((d) => d.id).nodeWidth(nodeWidth).nodePadding(10 + (showValues ? 15 : 0)).nodeAlign(nodeAlign).extent([
1166
- [0, 0],
1167
- [width, height]
1168
- ]);
1169
- sankey(graph);
1170
- const colorScheme = ordinal(Tableau10_default);
1171
- svg.append("g").attr("class", "nodes").selectAll(".node").data(graph.nodes).join("g").attr("class", "node").attr("id", (d) => (d.uid = Uid.next("node-")).id).attr("transform", function(d) {
1172
- return "translate(" + d.x0 + "," + d.y0 + ")";
1173
- }).attr("x", (d) => d.x0).attr("y", (d) => d.y0).append("rect").attr("height", (d) => {
1174
- return d.y1 - d.y0;
1175
- }).attr("width", (d) => d.x1 - d.x0).attr("fill", (d) => colorScheme(d.id));
1176
- const getText = /* @__PURE__ */ __name(({ id: id2, value: value2 }) => {
1177
- if (!showValues) {
1178
- return id2;
1179
- }
1180
- return `${id2}
1181
- ${prefix}${Math.round(value2 * 100) / 100}${suffix}`;
1182
- }, "getText");
1183
- svg.append("g").attr("class", "node-labels").attr("font-size", 14).selectAll("text").data(graph.nodes).join("text").attr("x", (d) => d.x0 < width / 2 ? d.x1 + 6 : d.x0 - 6).attr("y", (d) => (d.y1 + d.y0) / 2).attr("dy", `${showValues ? "0" : "0.35"}em`).attr("text-anchor", (d) => d.x0 < width / 2 ? "start" : "end").text(getText);
1184
- const link2 = svg.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(graph.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply");
1185
- const linkColor = conf?.linkColor ?? "gradient";
1186
- if (linkColor === "gradient") {
1187
- const gradient = link2.append("linearGradient").attr("id", (d) => (d.uid = Uid.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (d) => d.source.x1).attr("x2", (d) => d.target.x0);
1188
- gradient.append("stop").attr("offset", "0%").attr("stop-color", (d) => colorScheme(d.source.id));
1189
- gradient.append("stop").attr("offset", "100%").attr("stop-color", (d) => colorScheme(d.target.id));
1190
- }
1191
- let coloring;
1192
- switch (linkColor) {
1193
- case "gradient":
1194
- coloring = /* @__PURE__ */ __name((d) => d.uid, "coloring");
1195
- break;
1196
- case "source":
1197
- coloring = /* @__PURE__ */ __name((d) => colorScheme(d.source.id), "coloring");
1198
- break;
1199
- case "target":
1200
- coloring = /* @__PURE__ */ __name((d) => colorScheme(d.target.id), "coloring");
1201
- break;
1202
- default:
1203
- coloring = linkColor;
1204
- }
1205
- link2.append("path").attr("d", sankeyLinkHorizontal_default()).attr("stroke", coloring).attr("stroke-width", (d) => Math.max(1, d.width));
1206
- setupGraphViewbox(void 0, svg, 0, useMaxWidth);
1207
- }, "draw");
1208
- var sankeyRenderer_default = {
1209
- draw
1210
- };
1211
- var prepareTextForParsing = /* @__PURE__ */ __name((text) => {
1212
- const textToParse = text.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, "\n").trim();
1213
- return textToParse;
1214
- }, "prepareTextForParsing");
1215
- var getStyles = /* @__PURE__ */ __name((options) => `.label {
1216
- font-family: ${options.fontFamily};
1217
- }`, "getStyles");
1218
- var styles_default = getStyles;
1219
- var originalParse = sankey_default.parse.bind(sankey_default);
1220
- sankey_default.parse = (text) => originalParse(prepareTextForParsing(text));
1221
- var diagram = {
1222
- styles: styles_default,
1223
- parser: sankey_default,
1224
- db: sankeyDB_default,
1225
- renderer: sankeyRenderer_default
1226
- };
1227
-
1228
- export { diagram };
1229
- //# sourceMappingURL=sankeyDiagram-TZEHDZUN-H7BVEXGO.mjs.map
1230
- //# sourceMappingURL=sankeyDiagram-TZEHDZUN-H7BVEXGO.mjs.map