@blueking/ai-blueking 2.0.0-dev.2 → 2.0.0-dev.3

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 (183) hide show
  1. package/dist/vue2/_baseFor-DAbrc8SN.js +309 -0
  2. package/dist/vue2/arc-BqlAOiZb.js +78 -0
  3. package/dist/vue2/architecture-U656AL7Q-Dtuq8BzO.js +7 -0
  4. package/dist/vue2/architectureDiagram-VXUJARFQ-BQS5Ixrn.js +4052 -0
  5. package/dist/vue2/array-TB8zN_HT.js +5 -0
  6. package/dist/vue2/blockDiagram-VD42YOAC-Bp6L6c6e.js +3013 -0
  7. package/dist/vue2/c4Diagram-YG6GDRKO-B15ZDn3Z.js +2956 -0
  8. package/dist/vue2/channel-edTl5mpN.js +3 -0
  9. package/dist/vue2/chunk-4BX2VUAB-eAYYj1bL.js +6 -0
  10. package/dist/vue2/chunk-55IACEB6-CTzuTcHv.js +6 -0
  11. package/dist/vue2/chunk-76Q3JFCE-BrJX66ha.js +19 -0
  12. package/dist/vue2/chunk-ABZYJK2D-gsx40GnJ.js +1971 -0
  13. package/dist/vue2/chunk-ATLVNIR6-CTTwtx-5.js +65 -0
  14. package/dist/vue2/chunk-B4BG7PRW-D8o7VxRH.js +3108 -0
  15. package/dist/vue2/chunk-CVBHYZKI-Cs8lCw3u.js +10 -0
  16. package/dist/vue2/chunk-DI55MBZ5-Dl59YBtR.js +1994 -0
  17. package/dist/vue2/chunk-DNh5sLlG.js +18 -0
  18. package/dist/vue2/chunk-EXTU4WIE-BPc8ye_N.js +7 -0
  19. package/dist/vue2/chunk-FMBD7UC4-PFlLPz_s.js +3 -0
  20. package/dist/vue2/chunk-FPAJGGOC-DPvjUKQ8.js +13428 -0
  21. package/dist/vue2/chunk-FWNWRKHM-BlUTFsPK.js +56 -0
  22. package/dist/vue2/chunk-HN2XXSSU-DueSY85P.js +74 -0
  23. package/dist/vue2/chunk-JA3XYJ7Z-CRet4f6a.js +1845 -0
  24. package/dist/vue2/chunk-JZLCHNYA-Df0-MseJ.js +4861 -0
  25. package/dist/vue2/chunk-LBM3YZW2-B0-w2HZs.js +19 -0
  26. package/dist/vue2/chunk-LHMN2FUI-BOH3yE2u.js +19 -0
  27. package/dist/vue2/chunk-MI3HLSF2-6-T1J0MS.js +1140 -0
  28. package/dist/vue2/chunk-N4CR4FBY-jNnt5D3v.js +39 -0
  29. package/dist/vue2/chunk-O7ZBX7Z2-BEP34BEE.js +26 -0
  30. package/dist/vue2/chunk-QN33PNHL-DsC-XeM9.js +23 -0
  31. package/dist/vue2/chunk-QXUST7PY-DxFRymyS.js +486 -0
  32. package/dist/vue2/chunk-QZHKN3VN-D9B5jQvg.js +11 -0
  33. package/dist/vue2/chunk-S3R3BYOJ-Bs_r55Kk.js +1222 -0
  34. package/dist/vue2/chunk-S6J4BHB3-XXfWHJvh.js +19 -0
  35. package/dist/vue2/chunk-T53DSG4Q-CNvqP6Iy.js +24 -0
  36. package/dist/vue2/chunk-TZMSLE5B-C5ccYWGN.js +55 -0
  37. package/dist/vue2/chunk-XAJISQIX-XsDvU4jW.js +135 -0
  38. package/dist/vue2/classDiagram-2ON5EDUG-Cgf9yVXj.js +33 -0
  39. package/dist/vue2/classDiagram-v2-WZHVMYZB-BtF1_0UK.js +33 -0
  40. package/dist/vue2/clone-Bbr3WSpg.js +7 -0
  41. package/dist/vue2/cose-bilkent-S5V4N54A-Cmf6WLkk.js +2250 -0
  42. package/dist/vue2/cytoscape.esm-nrcriBSO.js +18100 -0
  43. package/dist/vue2/dagre-6UL2VRFP-CTl_U96l.js +298 -0
  44. package/dist/vue2/dagre-DUjlMe_B.js +1496 -0
  45. package/dist/vue2/defaultLocale-BLATqOV5.js +177 -0
  46. package/dist/vue2/diagram-PSM6KHXK-Bl7brR-1.js +497 -0
  47. package/dist/vue2/diagram-QEK2KX5R-CAeywSxy.js +226 -0
  48. package/dist/vue2/diagram-S2PKOQOG-6I6J4WRC.js +144 -0
  49. package/dist/vue2/dist-xWJvauxf.js +49 -0
  50. package/dist/vue2/erDiagram-Q2GNP2WA-C8EbfuTj.js +1603 -0
  51. package/dist/vue2/flatten-CfPhNHUL.js +34 -0
  52. package/dist/vue2/flowDiagram-NV44I4VS-lFr4G2WN.js +4132 -0
  53. package/dist/vue2/ganttDiagram-JELNMOA3-Bvtip7yn.js +3010 -0
  54. package/dist/vue2/gitGraph-F6HP7TQM-OQvD95bN.js +7 -0
  55. package/dist/vue2/gitGraphDiagram-NY62KEGX-Cjvy4fHM.js +634 -0
  56. package/dist/vue2/graphlib-KDKEjVHX.js +344 -0
  57. package/dist/vue2/index.es.min.js +26703 -786
  58. package/dist/vue2/index.umd.min.js +2796 -9
  59. package/dist/vue2/info-NVLQJR56-DBsOnIKy.js +7 -0
  60. package/dist/vue2/infoDiagram-WHAUD3N6-D_isj7oC.js +31 -0
  61. package/dist/vue2/init-hAkIK9Bd.js +13 -0
  62. package/dist/vue2/isEmpty-z27q3o-D.js +32 -0
  63. package/dist/vue2/journeyDiagram-XKPGCS4Q-DlXHMS3v.js +885 -0
  64. package/dist/vue2/kanban-definition-3W4ZIXB7-CV6572lv.js +971 -0
  65. package/dist/vue2/katex-CEAw-xiA.js +22097 -0
  66. package/dist/vue2/katex-D8o5-F7C.js +2 -0
  67. package/dist/vue2/line-wvheYP7S.js +30 -0
  68. package/dist/vue2/linear-STTevhnH.js +250 -0
  69. package/dist/vue2/math-DF_v6dOl.js +8 -0
  70. package/dist/vue2/mermaid-parser.core-VAa8Vi1g.js +48 -0
  71. package/dist/vue2/mermaid.core-vqI6KB9k.js +895 -0
  72. package/dist/vue2/mindmap-definition-VGOIOE7T-gtjvHqQ-.js +960 -0
  73. package/dist/vue2/ordinal-DOM6Fa9P.js +61 -0
  74. package/dist/vue2/packet-BFZMPI3H-CG049KmZ.js +7 -0
  75. package/dist/vue2/path-CW_-_Ti7.js +79 -0
  76. package/dist/vue2/pie-7BOR55EZ-BHq0KcLP.js +7 -0
  77. package/dist/vue2/pieDiagram-ADFJNKIX-CTUoM-kp.js +172 -0
  78. package/dist/vue2/purify.es-Cm_tUMzZ.js +547 -0
  79. package/dist/vue2/quadrantDiagram-AYHSOK5B-Njl7BMW7.js +1971 -0
  80. package/dist/vue2/radar-NHE76QYJ-CUoVtrAx.js +7 -0
  81. package/dist/vue2/reduce-BFKSG9Rs.js +451 -0
  82. package/dist/vue2/requirementDiagram-UZGBJVZJ-DKjE3cDK.js +2194 -0
  83. package/dist/vue2/sankeyDiagram-TZEHDZUN-DW2ap3zY.js +885 -0
  84. package/dist/vue2/sequenceDiagram-WL72ISMW-BjMq4OjH.js +3561 -0
  85. package/dist/vue2/src-VlKYSsxJ.js +1975 -0
  86. package/dist/vue2/stateDiagram-FKZM4ZOC-CnvtGM9U.js +224 -0
  87. package/dist/vue2/stateDiagram-v2-4FDKWEC3-C15xi-04.js +32 -0
  88. package/dist/vue2/style.css +1 -1
  89. package/dist/vue2/timeline-definition-IT6M3QCI-C7q6jdLA.js +831 -0
  90. package/dist/vue2/treemap-KMMF4GRG--FdijCcy.js +7 -0
  91. package/dist/vue2/xychartDiagram-PRI3JC2R-UcfQmj72.js +2022 -0
  92. package/dist/vue3/_baseFor-DAbrc8SN.js +309 -0
  93. package/dist/vue3/arc-BqlAOiZb.js +78 -0
  94. package/dist/vue3/architecture-U656AL7Q-Dtuq8BzO.js +7 -0
  95. package/dist/vue3/architectureDiagram-VXUJARFQ-BQS5Ixrn.js +4052 -0
  96. package/dist/vue3/array-TB8zN_HT.js +5 -0
  97. package/dist/vue3/blockDiagram-VD42YOAC-Bp6L6c6e.js +3013 -0
  98. package/dist/vue3/c4Diagram-YG6GDRKO-B15ZDn3Z.js +2956 -0
  99. package/dist/vue3/channel-edTl5mpN.js +3 -0
  100. package/dist/vue3/chunk-4BX2VUAB-eAYYj1bL.js +6 -0
  101. package/dist/vue3/chunk-55IACEB6-CTzuTcHv.js +6 -0
  102. package/dist/vue3/chunk-76Q3JFCE-BrJX66ha.js +19 -0
  103. package/dist/vue3/chunk-ABZYJK2D-gsx40GnJ.js +1971 -0
  104. package/dist/vue3/chunk-ATLVNIR6-CTTwtx-5.js +65 -0
  105. package/dist/vue3/chunk-B4BG7PRW-D8o7VxRH.js +3108 -0
  106. package/dist/vue3/chunk-CVBHYZKI-Cs8lCw3u.js +10 -0
  107. package/dist/vue3/chunk-DI55MBZ5-Dl59YBtR.js +1994 -0
  108. package/dist/vue3/chunk-DNh5sLlG.js +18 -0
  109. package/dist/vue3/chunk-EXTU4WIE-BPc8ye_N.js +7 -0
  110. package/dist/vue3/chunk-FMBD7UC4-PFlLPz_s.js +3 -0
  111. package/dist/vue3/chunk-FPAJGGOC-DPvjUKQ8.js +13428 -0
  112. package/dist/vue3/chunk-FWNWRKHM-BlUTFsPK.js +56 -0
  113. package/dist/vue3/chunk-HN2XXSSU-DueSY85P.js +74 -0
  114. package/dist/vue3/chunk-JA3XYJ7Z-CRet4f6a.js +1845 -0
  115. package/dist/vue3/chunk-JZLCHNYA-Df0-MseJ.js +4861 -0
  116. package/dist/vue3/chunk-LBM3YZW2-B0-w2HZs.js +19 -0
  117. package/dist/vue3/chunk-LHMN2FUI-BOH3yE2u.js +19 -0
  118. package/dist/vue3/chunk-MI3HLSF2-6-T1J0MS.js +1140 -0
  119. package/dist/vue3/chunk-N4CR4FBY-jNnt5D3v.js +39 -0
  120. package/dist/vue3/chunk-O7ZBX7Z2-BEP34BEE.js +26 -0
  121. package/dist/vue3/chunk-QN33PNHL-DsC-XeM9.js +23 -0
  122. package/dist/vue3/chunk-QXUST7PY-DxFRymyS.js +486 -0
  123. package/dist/vue3/chunk-QZHKN3VN-D9B5jQvg.js +11 -0
  124. package/dist/vue3/chunk-S3R3BYOJ-Bs_r55Kk.js +1222 -0
  125. package/dist/vue3/chunk-S6J4BHB3-XXfWHJvh.js +19 -0
  126. package/dist/vue3/chunk-T53DSG4Q-CNvqP6Iy.js +24 -0
  127. package/dist/vue3/chunk-TZMSLE5B-C5ccYWGN.js +55 -0
  128. package/dist/vue3/chunk-XAJISQIX-XsDvU4jW.js +135 -0
  129. package/dist/vue3/classDiagram-2ON5EDUG-Cgf9yVXj.js +33 -0
  130. package/dist/vue3/classDiagram-v2-WZHVMYZB-BtF1_0UK.js +33 -0
  131. package/dist/vue3/clone-Bbr3WSpg.js +7 -0
  132. package/dist/vue3/cose-bilkent-S5V4N54A-Cmf6WLkk.js +2250 -0
  133. package/dist/vue3/cytoscape.esm-nrcriBSO.js +18100 -0
  134. package/dist/vue3/dagre-6UL2VRFP-CTl_U96l.js +298 -0
  135. package/dist/vue3/dagre-DUjlMe_B.js +1496 -0
  136. package/dist/vue3/defaultLocale-BLATqOV5.js +177 -0
  137. package/dist/vue3/diagram-PSM6KHXK-Bl7brR-1.js +497 -0
  138. package/dist/vue3/diagram-QEK2KX5R-CAeywSxy.js +226 -0
  139. package/dist/vue3/diagram-S2PKOQOG-6I6J4WRC.js +144 -0
  140. package/dist/vue3/dist-xWJvauxf.js +49 -0
  141. package/dist/vue3/erDiagram-Q2GNP2WA-C8EbfuTj.js +1603 -0
  142. package/dist/vue3/flatten-CfPhNHUL.js +34 -0
  143. package/dist/vue3/flowDiagram-NV44I4VS-lFr4G2WN.js +4132 -0
  144. package/dist/vue3/ganttDiagram-JELNMOA3-Bvtip7yn.js +3010 -0
  145. package/dist/vue3/gitGraph-F6HP7TQM-OQvD95bN.js +7 -0
  146. package/dist/vue3/gitGraphDiagram-NY62KEGX-Cjvy4fHM.js +634 -0
  147. package/dist/vue3/graphlib-KDKEjVHX.js +344 -0
  148. package/dist/vue3/index.es.min.js +26730 -813
  149. package/dist/vue3/index.umd.min.js +2796 -9
  150. package/dist/vue3/info-NVLQJR56-DBsOnIKy.js +7 -0
  151. package/dist/vue3/infoDiagram-WHAUD3N6-D_isj7oC.js +31 -0
  152. package/dist/vue3/init-hAkIK9Bd.js +13 -0
  153. package/dist/vue3/isEmpty-z27q3o-D.js +32 -0
  154. package/dist/vue3/journeyDiagram-XKPGCS4Q-DlXHMS3v.js +885 -0
  155. package/dist/vue3/kanban-definition-3W4ZIXB7-CV6572lv.js +971 -0
  156. package/dist/vue3/katex-CEAw-xiA.js +22097 -0
  157. package/dist/vue3/katex-D8o5-F7C.js +2 -0
  158. package/dist/vue3/line-wvheYP7S.js +30 -0
  159. package/dist/vue3/linear-STTevhnH.js +250 -0
  160. package/dist/vue3/math-DF_v6dOl.js +8 -0
  161. package/dist/vue3/mermaid-parser.core-VAa8Vi1g.js +48 -0
  162. package/dist/vue3/mermaid.core-vqI6KB9k.js +895 -0
  163. package/dist/vue3/mindmap-definition-VGOIOE7T-gtjvHqQ-.js +960 -0
  164. package/dist/vue3/ordinal-DOM6Fa9P.js +61 -0
  165. package/dist/vue3/packet-BFZMPI3H-CG049KmZ.js +7 -0
  166. package/dist/vue3/path-CW_-_Ti7.js +79 -0
  167. package/dist/vue3/pie-7BOR55EZ-BHq0KcLP.js +7 -0
  168. package/dist/vue3/pieDiagram-ADFJNKIX-CTUoM-kp.js +172 -0
  169. package/dist/vue3/purify.es-Cm_tUMzZ.js +547 -0
  170. package/dist/vue3/quadrantDiagram-AYHSOK5B-Njl7BMW7.js +1971 -0
  171. package/dist/vue3/radar-NHE76QYJ-CUoVtrAx.js +7 -0
  172. package/dist/vue3/reduce-BFKSG9Rs.js +451 -0
  173. package/dist/vue3/requirementDiagram-UZGBJVZJ-DKjE3cDK.js +2194 -0
  174. package/dist/vue3/sankeyDiagram-TZEHDZUN-DW2ap3zY.js +885 -0
  175. package/dist/vue3/sequenceDiagram-WL72ISMW-BjMq4OjH.js +3561 -0
  176. package/dist/vue3/src-VlKYSsxJ.js +1975 -0
  177. package/dist/vue3/stateDiagram-FKZM4ZOC-CnvtGM9U.js +224 -0
  178. package/dist/vue3/stateDiagram-v2-4FDKWEC3-C15xi-04.js +32 -0
  179. package/dist/vue3/style.css +1 -1
  180. package/dist/vue3/timeline-definition-IT6M3QCI-C7q6jdLA.js +831 -0
  181. package/dist/vue3/treemap-KMMF4GRG--FdijCcy.js +7 -0
  182. package/dist/vue3/xychartDiagram-PRI3JC2R-UcfQmj72.js +2022 -0
  183. package/package.json +1 -1
@@ -0,0 +1,1222 @@
1
+ import { C as isFunction_default, D as _root_default, O as eq_default, T as _baseGetTag_default, _ as _Uint8Array_default, a as _overArg_default, c as isTypedArray_default, f as _isIndex_default, g as isArray_default, h as isObjectLike_default, i as isArrayLike_default, m as isArguments_default, n as identity_default, o as _isPrototype_default, p as isBuffer_default, r as memoize_default, s as _arrayLikeKeys_default, t as _baseFor_default, v as _Stack_default, w as isObject_default, x as _getNative_default } from "./_baseFor-DAbrc8SN.js";
2
+ import { g as log, h as __name, p as select_default } from "./src-VlKYSsxJ.js";
3
+ import { F as sanitizeDirective, f as detectType, m as directiveRegex, r as assignWithDepth_default, s as common_default } from "./chunk-ABZYJK2D-gsx40GnJ.js";
4
+ import { o as epsilon } from "./math-DF_v6dOl.js";
5
+ import { t as require_dist } from "./dist-xWJvauxf.js";
6
+ function Linear(c) {
7
+ this._context = c;
8
+ }
9
+ Linear.prototype = {
10
+ areaStart: function() {
11
+ this._line = 0;
12
+ },
13
+ areaEnd: function() {
14
+ this._line = NaN;
15
+ },
16
+ lineStart: function() {
17
+ this._point = 0;
18
+ },
19
+ lineEnd: function() {
20
+ (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
21
+ },
22
+ point: function(c, L) {
23
+ switch (c = +c, L = +L, this._point) {
24
+ case 0:
25
+ this._point = 1, this._line ? this._context.lineTo(c, L) : this._context.moveTo(c, L);
26
+ break;
27
+ case 1: this._point = 2;
28
+ default:
29
+ this._context.lineTo(c, L);
30
+ break;
31
+ }
32
+ }
33
+ };
34
+ function linear_default(c) {
35
+ return new Linear(c);
36
+ }
37
+ var Bump = class {
38
+ constructor(c, L) {
39
+ this._context = c, this._x = L;
40
+ }
41
+ areaStart() {
42
+ this._line = 0;
43
+ }
44
+ areaEnd() {
45
+ this._line = NaN;
46
+ }
47
+ lineStart() {
48
+ this._point = 0;
49
+ }
50
+ lineEnd() {
51
+ (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
52
+ }
53
+ point(c, L) {
54
+ switch (c = +c, L = +L, this._point) {
55
+ case 0:
56
+ this._point = 1, this._line ? this._context.lineTo(c, L) : this._context.moveTo(c, L);
57
+ break;
58
+ case 1: this._point = 2;
59
+ default:
60
+ this._x ? this._context.bezierCurveTo(this._x0 = (this._x0 + c) / 2, this._y0, this._x0, L, c, L) : this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + L) / 2, c, this._y0, c, L);
61
+ break;
62
+ }
63
+ this._x0 = c, this._y0 = L;
64
+ }
65
+ };
66
+ function bumpX(c) {
67
+ return new Bump(c, !0);
68
+ }
69
+ function bumpY(c) {
70
+ return new Bump(c, !1);
71
+ }
72
+ function noop_default() {}
73
+ function point$3(c, L, R) {
74
+ c._context.bezierCurveTo((2 * c._x0 + c._x1) / 3, (2 * c._y0 + c._y1) / 3, (c._x0 + 2 * c._x1) / 3, (c._y0 + 2 * c._y1) / 3, (c._x0 + 4 * c._x1 + L) / 6, (c._y0 + 4 * c._y1 + R) / 6);
75
+ }
76
+ function Basis(c) {
77
+ this._context = c;
78
+ }
79
+ Basis.prototype = {
80
+ areaStart: function() {
81
+ this._line = 0;
82
+ },
83
+ areaEnd: function() {
84
+ this._line = NaN;
85
+ },
86
+ lineStart: function() {
87
+ this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0;
88
+ },
89
+ lineEnd: function() {
90
+ switch (this._point) {
91
+ case 3: point$3(this, this._x1, this._y1);
92
+ case 2:
93
+ this._context.lineTo(this._x1, this._y1);
94
+ break;
95
+ }
96
+ (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
97
+ },
98
+ point: function(c, L) {
99
+ switch (c = +c, L = +L, this._point) {
100
+ case 0:
101
+ this._point = 1, this._line ? this._context.lineTo(c, L) : this._context.moveTo(c, L);
102
+ break;
103
+ case 1:
104
+ this._point = 2;
105
+ break;
106
+ case 2: this._point = 3, this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
107
+ default:
108
+ point$3(this, c, L);
109
+ break;
110
+ }
111
+ this._x0 = this._x1, this._x1 = c, this._y0 = this._y1, this._y1 = L;
112
+ }
113
+ };
114
+ function basis_default(c) {
115
+ return new Basis(c);
116
+ }
117
+ function BasisClosed(c) {
118
+ this._context = c;
119
+ }
120
+ BasisClosed.prototype = {
121
+ areaStart: noop_default,
122
+ areaEnd: noop_default,
123
+ lineStart: function() {
124
+ this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN, this._point = 0;
125
+ },
126
+ lineEnd: function() {
127
+ switch (this._point) {
128
+ case 1:
129
+ this._context.moveTo(this._x2, this._y2), this._context.closePath();
130
+ break;
131
+ case 2:
132
+ this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3), this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3), this._context.closePath();
133
+ break;
134
+ case 3:
135
+ this.point(this._x2, this._y2), this.point(this._x3, this._y3), this.point(this._x4, this._y4);
136
+ break;
137
+ }
138
+ },
139
+ point: function(c, L) {
140
+ switch (c = +c, L = +L, this._point) {
141
+ case 0:
142
+ this._point = 1, this._x2 = c, this._y2 = L;
143
+ break;
144
+ case 1:
145
+ this._point = 2, this._x3 = c, this._y3 = L;
146
+ break;
147
+ case 2:
148
+ this._point = 3, this._x4 = c, this._y4 = L, this._context.moveTo((this._x0 + 4 * this._x1 + c) / 6, (this._y0 + 4 * this._y1 + L) / 6);
149
+ break;
150
+ default:
151
+ point$3(this, c, L);
152
+ break;
153
+ }
154
+ this._x0 = this._x1, this._x1 = c, this._y0 = this._y1, this._y1 = L;
155
+ }
156
+ };
157
+ function basisClosed_default(c) {
158
+ return new BasisClosed(c);
159
+ }
160
+ function BasisOpen(c) {
161
+ this._context = c;
162
+ }
163
+ BasisOpen.prototype = {
164
+ areaStart: function() {
165
+ this._line = 0;
166
+ },
167
+ areaEnd: function() {
168
+ this._line = NaN;
169
+ },
170
+ lineStart: function() {
171
+ this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0;
172
+ },
173
+ lineEnd: function() {
174
+ (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
175
+ },
176
+ point: function(c, L) {
177
+ switch (c = +c, L = +L, this._point) {
178
+ case 0:
179
+ this._point = 1;
180
+ break;
181
+ case 1:
182
+ this._point = 2;
183
+ break;
184
+ case 2:
185
+ this._point = 3;
186
+ var R = (this._x0 + 4 * this._x1 + c) / 6, z = (this._y0 + 4 * this._y1 + L) / 6;
187
+ this._line ? this._context.lineTo(R, z) : this._context.moveTo(R, z);
188
+ break;
189
+ case 3: this._point = 4;
190
+ default:
191
+ point$3(this, c, L);
192
+ break;
193
+ }
194
+ this._x0 = this._x1, this._x1 = c, this._y0 = this._y1, this._y1 = L;
195
+ }
196
+ };
197
+ function basisOpen_default(c) {
198
+ return new BasisOpen(c);
199
+ }
200
+ function Bundle(c, L) {
201
+ this._basis = new Basis(c), this._beta = L;
202
+ }
203
+ Bundle.prototype = {
204
+ lineStart: function() {
205
+ this._x = [], this._y = [], this._basis.lineStart();
206
+ },
207
+ lineEnd: function() {
208
+ var c = this._x, L = this._y, R = c.length - 1;
209
+ if (R > 0) for (var z = c[0], B = L[0], V = c[R] - z, H = L[R] - B, U = -1, W; ++U <= R;) W = U / R, this._basis.point(this._beta * c[U] + (1 - this._beta) * (z + W * V), this._beta * L[U] + (1 - this._beta) * (B + W * H));
210
+ this._x = this._y = null, this._basis.lineEnd();
211
+ },
212
+ point: function(c, L) {
213
+ this._x.push(+c), this._y.push(+L);
214
+ }
215
+ };
216
+ var bundle_default = (function c(L) {
217
+ function R(c) {
218
+ return L === 1 ? new Basis(c) : new Bundle(c, L);
219
+ }
220
+ return R.beta = function(L) {
221
+ return c(+L);
222
+ }, R;
223
+ })(.85);
224
+ function point$2(c, L, R) {
225
+ c._context.bezierCurveTo(c._x1 + c._k * (c._x2 - c._x0), c._y1 + c._k * (c._y2 - c._y0), c._x2 + c._k * (c._x1 - L), c._y2 + c._k * (c._y1 - R), c._x2, c._y2);
226
+ }
227
+ function Cardinal(c, L) {
228
+ this._context = c, this._k = (1 - L) / 6;
229
+ }
230
+ Cardinal.prototype = {
231
+ areaStart: function() {
232
+ this._line = 0;
233
+ },
234
+ areaEnd: function() {
235
+ this._line = NaN;
236
+ },
237
+ lineStart: function() {
238
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
239
+ },
240
+ lineEnd: function() {
241
+ switch (this._point) {
242
+ case 2:
243
+ this._context.lineTo(this._x2, this._y2);
244
+ break;
245
+ case 3:
246
+ point$2(this, this._x1, this._y1);
247
+ break;
248
+ }
249
+ (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
250
+ },
251
+ point: function(c, L) {
252
+ switch (c = +c, L = +L, this._point) {
253
+ case 0:
254
+ this._point = 1, this._line ? this._context.lineTo(c, L) : this._context.moveTo(c, L);
255
+ break;
256
+ case 1:
257
+ this._point = 2, this._x1 = c, this._y1 = L;
258
+ break;
259
+ case 2: this._point = 3;
260
+ default:
261
+ point$2(this, c, L);
262
+ break;
263
+ }
264
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = c, this._y0 = this._y1, this._y1 = this._y2, this._y2 = L;
265
+ }
266
+ };
267
+ var cardinal_default = (function c(L) {
268
+ function R(c) {
269
+ return new Cardinal(c, L);
270
+ }
271
+ return R.tension = function(L) {
272
+ return c(+L);
273
+ }, R;
274
+ })(0);
275
+ function CardinalClosed(c, L) {
276
+ this._context = c, this._k = (1 - L) / 6;
277
+ }
278
+ CardinalClosed.prototype = {
279
+ areaStart: noop_default,
280
+ areaEnd: noop_default,
281
+ lineStart: function() {
282
+ this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._point = 0;
283
+ },
284
+ lineEnd: function() {
285
+ switch (this._point) {
286
+ case 1:
287
+ this._context.moveTo(this._x3, this._y3), this._context.closePath();
288
+ break;
289
+ case 2:
290
+ this._context.lineTo(this._x3, this._y3), this._context.closePath();
291
+ break;
292
+ case 3:
293
+ this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5);
294
+ break;
295
+ }
296
+ },
297
+ point: function(c, L) {
298
+ switch (c = +c, L = +L, this._point) {
299
+ case 0:
300
+ this._point = 1, this._x3 = c, this._y3 = L;
301
+ break;
302
+ case 1:
303
+ this._point = 2, this._context.moveTo(this._x4 = c, this._y4 = L);
304
+ break;
305
+ case 2:
306
+ this._point = 3, this._x5 = c, this._y5 = L;
307
+ break;
308
+ default:
309
+ point$2(this, c, L);
310
+ break;
311
+ }
312
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = c, this._y0 = this._y1, this._y1 = this._y2, this._y2 = L;
313
+ }
314
+ };
315
+ var cardinalClosed_default = (function c(L) {
316
+ function R(c) {
317
+ return new CardinalClosed(c, L);
318
+ }
319
+ return R.tension = function(L) {
320
+ return c(+L);
321
+ }, R;
322
+ })(0);
323
+ function CardinalOpen(c, L) {
324
+ this._context = c, this._k = (1 - L) / 6;
325
+ }
326
+ CardinalOpen.prototype = {
327
+ areaStart: function() {
328
+ this._line = 0;
329
+ },
330
+ areaEnd: function() {
331
+ this._line = NaN;
332
+ },
333
+ lineStart: function() {
334
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
335
+ },
336
+ lineEnd: function() {
337
+ (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
338
+ },
339
+ point: function(c, L) {
340
+ switch (c = +c, L = +L, this._point) {
341
+ case 0:
342
+ this._point = 1;
343
+ break;
344
+ case 1:
345
+ this._point = 2;
346
+ break;
347
+ case 2:
348
+ this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
349
+ break;
350
+ case 3: this._point = 4;
351
+ default:
352
+ point$2(this, c, L);
353
+ break;
354
+ }
355
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = c, this._y0 = this._y1, this._y1 = this._y2, this._y2 = L;
356
+ }
357
+ };
358
+ var cardinalOpen_default = (function c(L) {
359
+ function R(c) {
360
+ return new CardinalOpen(c, L);
361
+ }
362
+ return R.tension = function(L) {
363
+ return c(+L);
364
+ }, R;
365
+ })(0);
366
+ function point$1(c, L, R) {
367
+ var z = c._x1, B = c._y1, V = c._x2, H = c._y2;
368
+ if (c._l01_a > 1e-12) {
369
+ var U = 2 * c._l01_2a + 3 * c._l01_a * c._l12_a + c._l12_2a, W = 3 * c._l01_a * (c._l01_a + c._l12_a);
370
+ z = (z * U - c._x0 * c._l12_2a + c._x2 * c._l01_2a) / W, B = (B * U - c._y0 * c._l12_2a + c._y2 * c._l01_2a) / W;
371
+ }
372
+ if (c._l23_a > 1e-12) {
373
+ var G = 2 * c._l23_2a + 3 * c._l23_a * c._l12_a + c._l12_2a, K = 3 * c._l23_a * (c._l23_a + c._l12_a);
374
+ V = (V * G + c._x1 * c._l23_2a - L * c._l12_2a) / K, H = (H * G + c._y1 * c._l23_2a - R * c._l12_2a) / K;
375
+ }
376
+ c._context.bezierCurveTo(z, B, V, H, c._x2, c._y2);
377
+ }
378
+ function CatmullRom(c, L) {
379
+ this._context = c, this._alpha = L;
380
+ }
381
+ CatmullRom.prototype = {
382
+ areaStart: function() {
383
+ this._line = 0;
384
+ },
385
+ areaEnd: function() {
386
+ this._line = NaN;
387
+ },
388
+ lineStart: function() {
389
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
390
+ },
391
+ lineEnd: function() {
392
+ switch (this._point) {
393
+ case 2:
394
+ this._context.lineTo(this._x2, this._y2);
395
+ break;
396
+ case 3:
397
+ this.point(this._x2, this._y2);
398
+ break;
399
+ }
400
+ (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
401
+ },
402
+ point: function(c, L) {
403
+ if (c = +c, L = +L, this._point) {
404
+ var R = this._x2 - c, z = this._y2 - L;
405
+ this._l23_a = Math.sqrt(this._l23_2a = (R * R + z * z) ** +this._alpha);
406
+ }
407
+ switch (this._point) {
408
+ case 0:
409
+ this._point = 1, this._line ? this._context.lineTo(c, L) : this._context.moveTo(c, L);
410
+ break;
411
+ case 1:
412
+ this._point = 2;
413
+ break;
414
+ case 2: this._point = 3;
415
+ default:
416
+ point$1(this, c, L);
417
+ break;
418
+ }
419
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = c, this._y0 = this._y1, this._y1 = this._y2, this._y2 = L;
420
+ }
421
+ };
422
+ var catmullRom_default = (function c(L) {
423
+ function R(c) {
424
+ return L ? new CatmullRom(c, L) : new Cardinal(c, 0);
425
+ }
426
+ return R.alpha = function(L) {
427
+ return c(+L);
428
+ }, R;
429
+ })(.5);
430
+ function CatmullRomClosed(c, L) {
431
+ this._context = c, this._alpha = L;
432
+ }
433
+ CatmullRomClosed.prototype = {
434
+ areaStart: noop_default,
435
+ areaEnd: noop_default,
436
+ lineStart: function() {
437
+ this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
438
+ },
439
+ lineEnd: function() {
440
+ switch (this._point) {
441
+ case 1:
442
+ this._context.moveTo(this._x3, this._y3), this._context.closePath();
443
+ break;
444
+ case 2:
445
+ this._context.lineTo(this._x3, this._y3), this._context.closePath();
446
+ break;
447
+ case 3:
448
+ this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5);
449
+ break;
450
+ }
451
+ },
452
+ point: function(c, L) {
453
+ if (c = +c, L = +L, this._point) {
454
+ var R = this._x2 - c, z = this._y2 - L;
455
+ this._l23_a = Math.sqrt(this._l23_2a = (R * R + z * z) ** +this._alpha);
456
+ }
457
+ switch (this._point) {
458
+ case 0:
459
+ this._point = 1, this._x3 = c, this._y3 = L;
460
+ break;
461
+ case 1:
462
+ this._point = 2, this._context.moveTo(this._x4 = c, this._y4 = L);
463
+ break;
464
+ case 2:
465
+ this._point = 3, this._x5 = c, this._y5 = L;
466
+ break;
467
+ default:
468
+ point$1(this, c, L);
469
+ break;
470
+ }
471
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = c, this._y0 = this._y1, this._y1 = this._y2, this._y2 = L;
472
+ }
473
+ };
474
+ var catmullRomClosed_default = (function c(L) {
475
+ function R(c) {
476
+ return L ? new CatmullRomClosed(c, L) : new CardinalClosed(c, 0);
477
+ }
478
+ return R.alpha = function(L) {
479
+ return c(+L);
480
+ }, R;
481
+ })(.5);
482
+ function CatmullRomOpen(c, L) {
483
+ this._context = c, this._alpha = L;
484
+ }
485
+ CatmullRomOpen.prototype = {
486
+ areaStart: function() {
487
+ this._line = 0;
488
+ },
489
+ areaEnd: function() {
490
+ this._line = NaN;
491
+ },
492
+ lineStart: function() {
493
+ this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
494
+ },
495
+ lineEnd: function() {
496
+ (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
497
+ },
498
+ point: function(c, L) {
499
+ if (c = +c, L = +L, this._point) {
500
+ var R = this._x2 - c, z = this._y2 - L;
501
+ this._l23_a = Math.sqrt(this._l23_2a = (R * R + z * z) ** +this._alpha);
502
+ }
503
+ switch (this._point) {
504
+ case 0:
505
+ this._point = 1;
506
+ break;
507
+ case 1:
508
+ this._point = 2;
509
+ break;
510
+ case 2:
511
+ this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
512
+ break;
513
+ case 3: this._point = 4;
514
+ default:
515
+ point$1(this, c, L);
516
+ break;
517
+ }
518
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = c, this._y0 = this._y1, this._y1 = this._y2, this._y2 = L;
519
+ }
520
+ };
521
+ var catmullRomOpen_default = (function c(L) {
522
+ function R(c) {
523
+ return L ? new CatmullRomOpen(c, L) : new CardinalOpen(c, 0);
524
+ }
525
+ return R.alpha = function(L) {
526
+ return c(+L);
527
+ }, R;
528
+ })(.5);
529
+ function LinearClosed(c) {
530
+ this._context = c;
531
+ }
532
+ LinearClosed.prototype = {
533
+ areaStart: noop_default,
534
+ areaEnd: noop_default,
535
+ lineStart: function() {
536
+ this._point = 0;
537
+ },
538
+ lineEnd: function() {
539
+ this._point && this._context.closePath();
540
+ },
541
+ point: function(c, L) {
542
+ c = +c, L = +L, this._point ? this._context.lineTo(c, L) : (this._point = 1, this._context.moveTo(c, L));
543
+ }
544
+ };
545
+ function linearClosed_default(c) {
546
+ return new LinearClosed(c);
547
+ }
548
+ function sign(c) {
549
+ return c < 0 ? -1 : 1;
550
+ }
551
+ function slope3(c, L, R) {
552
+ var z = c._x1 - c._x0, B = L - c._x1, V = (c._y1 - c._y0) / (z || B < 0 && -0), H = (R - c._y1) / (B || z < 0 && -0), U = (V * B + H * z) / (z + B);
553
+ return (sign(V) + sign(H)) * Math.min(Math.abs(V), Math.abs(H), .5 * Math.abs(U)) || 0;
554
+ }
555
+ function slope2(c, L) {
556
+ var R = c._x1 - c._x0;
557
+ return R ? (3 * (c._y1 - c._y0) / R - L) / 2 : L;
558
+ }
559
+ function point(c, L, R) {
560
+ var z = c._x0, B = c._y0, V = c._x1, H = c._y1, U = (V - z) / 3;
561
+ c._context.bezierCurveTo(z + U, B + U * L, V - U, H - U * R, V, H);
562
+ }
563
+ function MonotoneX(c) {
564
+ this._context = c;
565
+ }
566
+ MonotoneX.prototype = {
567
+ areaStart: function() {
568
+ this._line = 0;
569
+ },
570
+ areaEnd: function() {
571
+ this._line = NaN;
572
+ },
573
+ lineStart: function() {
574
+ this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN, this._point = 0;
575
+ },
576
+ lineEnd: function() {
577
+ switch (this._point) {
578
+ case 2:
579
+ this._context.lineTo(this._x1, this._y1);
580
+ break;
581
+ case 3:
582
+ point(this, this._t0, slope2(this, this._t0));
583
+ break;
584
+ }
585
+ (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
586
+ },
587
+ point: function(c, L) {
588
+ var R = NaN;
589
+ if (c = +c, L = +L, !(c === this._x1 && L === this._y1)) {
590
+ switch (this._point) {
591
+ case 0:
592
+ this._point = 1, this._line ? this._context.lineTo(c, L) : this._context.moveTo(c, L);
593
+ break;
594
+ case 1:
595
+ this._point = 2;
596
+ break;
597
+ case 2:
598
+ this._point = 3, point(this, slope2(this, R = slope3(this, c, L)), R);
599
+ break;
600
+ default:
601
+ point(this, this._t0, R = slope3(this, c, L));
602
+ break;
603
+ }
604
+ this._x0 = this._x1, this._x1 = c, this._y0 = this._y1, this._y1 = L, this._t0 = R;
605
+ }
606
+ }
607
+ };
608
+ function MonotoneY(c) {
609
+ this._context = new ReflectContext(c);
610
+ }
611
+ (MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(c, L) {
612
+ MonotoneX.prototype.point.call(this, L, c);
613
+ };
614
+ function ReflectContext(c) {
615
+ this._context = c;
616
+ }
617
+ ReflectContext.prototype = {
618
+ moveTo: function(c, L) {
619
+ this._context.moveTo(L, c);
620
+ },
621
+ closePath: function() {
622
+ this._context.closePath();
623
+ },
624
+ lineTo: function(c, L) {
625
+ this._context.lineTo(L, c);
626
+ },
627
+ bezierCurveTo: function(c, L, R, z, B, V) {
628
+ this._context.bezierCurveTo(L, c, z, R, V, B);
629
+ }
630
+ };
631
+ function monotoneX(c) {
632
+ return new MonotoneX(c);
633
+ }
634
+ function monotoneY(c) {
635
+ return new MonotoneY(c);
636
+ }
637
+ function Natural(c) {
638
+ this._context = c;
639
+ }
640
+ Natural.prototype = {
641
+ areaStart: function() {
642
+ this._line = 0;
643
+ },
644
+ areaEnd: function() {
645
+ this._line = NaN;
646
+ },
647
+ lineStart: function() {
648
+ this._x = [], this._y = [];
649
+ },
650
+ lineEnd: function() {
651
+ var c = this._x, L = this._y, R = c.length;
652
+ if (R) if (this._line ? this._context.lineTo(c[0], L[0]) : this._context.moveTo(c[0], L[0]), R === 2) this._context.lineTo(c[1], L[1]);
653
+ else for (var z = controlPoints(c), B = controlPoints(L), V = 0, H = 1; H < R; ++V, ++H) this._context.bezierCurveTo(z[0][V], B[0][V], z[1][V], B[1][V], c[H], L[H]);
654
+ (this._line || this._line !== 0 && R === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null;
655
+ },
656
+ point: function(c, L) {
657
+ this._x.push(+c), this._y.push(+L);
658
+ }
659
+ };
660
+ function controlPoints(c) {
661
+ var L, R = c.length - 1, z, B = Array(R), V = Array(R), H = Array(R);
662
+ for (B[0] = 0, V[0] = 2, H[0] = c[0] + 2 * c[1], L = 1; L < R - 1; ++L) B[L] = 1, V[L] = 4, H[L] = 4 * c[L] + 2 * c[L + 1];
663
+ for (B[R - 1] = 2, V[R - 1] = 7, H[R - 1] = 8 * c[R - 1] + c[R], L = 1; L < R; ++L) z = B[L] / V[L - 1], V[L] -= z, H[L] -= z * H[L - 1];
664
+ for (B[R - 1] = H[R - 1] / V[R - 1], L = R - 2; L >= 0; --L) B[L] = (H[L] - B[L + 1]) / V[L];
665
+ for (V[R - 1] = (c[R] + B[R - 1]) / 2, L = 0; L < R - 1; ++L) V[L] = 2 * c[L + 1] - B[L + 1];
666
+ return [B, V];
667
+ }
668
+ function natural_default(c) {
669
+ return new Natural(c);
670
+ }
671
+ function Step(c, L) {
672
+ this._context = c, this._t = L;
673
+ }
674
+ Step.prototype = {
675
+ areaStart: function() {
676
+ this._line = 0;
677
+ },
678
+ areaEnd: function() {
679
+ this._line = NaN;
680
+ },
681
+ lineStart: function() {
682
+ this._x = this._y = NaN, this._point = 0;
683
+ },
684
+ lineEnd: function() {
685
+ 0 < this._t && this._t < 1 && this._point === 2 && this._context.lineTo(this._x, this._y), (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line >= 0 && (this._t = 1 - this._t, this._line = 1 - this._line);
686
+ },
687
+ point: function(c, L) {
688
+ switch (c = +c, L = +L, this._point) {
689
+ case 0:
690
+ this._point = 1, this._line ? this._context.lineTo(c, L) : this._context.moveTo(c, L);
691
+ break;
692
+ case 1: this._point = 2;
693
+ default:
694
+ if (this._t <= 0) this._context.lineTo(this._x, L), this._context.lineTo(c, L);
695
+ else {
696
+ var R = this._x * (1 - this._t) + c * this._t;
697
+ this._context.lineTo(R, this._y), this._context.lineTo(R, L);
698
+ }
699
+ break;
700
+ }
701
+ this._x = c, this._y = L;
702
+ }
703
+ };
704
+ function step_default(c) {
705
+ return new Step(c, .5);
706
+ }
707
+ function stepBefore(c) {
708
+ return new Step(c, 0);
709
+ }
710
+ function stepAfter(c) {
711
+ return new Step(c, 1);
712
+ }
713
+ var _defineProperty_default = function() {
714
+ try {
715
+ var c = _getNative_default(Object, "defineProperty");
716
+ return c({}, "", {}), c;
717
+ } catch {}
718
+ }();
719
+ function baseAssignValue(c, L, R) {
720
+ L == "__proto__" && _defineProperty_default ? _defineProperty_default(c, L, {
721
+ configurable: !0,
722
+ enumerable: !0,
723
+ value: R,
724
+ writable: !0
725
+ }) : c[L] = R;
726
+ }
727
+ var _baseAssignValue_default = baseAssignValue;
728
+ function assignMergeValue(c, L, z) {
729
+ (z !== void 0 && !eq_default(c[L], z) || z === void 0 && !(L in c)) && _baseAssignValue_default(c, L, z);
730
+ }
731
+ var _assignMergeValue_default = assignMergeValue, freeExports = typeof exports == "object" && exports && !exports.nodeType && exports, freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module, Buffer = freeModule && freeModule.exports === freeExports ? _root_default.Buffer : void 0, allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0;
732
+ function cloneBuffer(c, L) {
733
+ if (L) return c.slice();
734
+ var R = c.length, z = allocUnsafe ? allocUnsafe(R) : new c.constructor(R);
735
+ return c.copy(z), z;
736
+ }
737
+ var _cloneBuffer_default = cloneBuffer;
738
+ function cloneArrayBuffer(c) {
739
+ var L = new c.constructor(c.byteLength);
740
+ return new _Uint8Array_default(L).set(new _Uint8Array_default(c)), L;
741
+ }
742
+ var _cloneArrayBuffer_default = cloneArrayBuffer;
743
+ function cloneTypedArray(c, L) {
744
+ var R = L ? _cloneArrayBuffer_default(c.buffer) : c.buffer;
745
+ return new c.constructor(R, c.byteOffset, c.length);
746
+ }
747
+ var _cloneTypedArray_default = cloneTypedArray;
748
+ function copyArray(c, L) {
749
+ var R = -1, z = c.length;
750
+ for (L ||= Array(z); ++R < z;) L[R] = c[R];
751
+ return L;
752
+ }
753
+ var _copyArray_default = copyArray, objectCreate = Object.create, _baseCreate_default = function() {
754
+ function c() {}
755
+ return function(L) {
756
+ if (!isObject_default(L)) return {};
757
+ if (objectCreate) return objectCreate(L);
758
+ c.prototype = L;
759
+ var R = new c();
760
+ return c.prototype = void 0, R;
761
+ };
762
+ }(), _getPrototype_default = _overArg_default(Object.getPrototypeOf, Object);
763
+ function initCloneObject(c) {
764
+ return typeof c.constructor == "function" && !_isPrototype_default(c) ? _baseCreate_default(_getPrototype_default(c)) : {};
765
+ }
766
+ var _initCloneObject_default = initCloneObject;
767
+ function isArrayLikeObject(c) {
768
+ return isObjectLike_default(c) && isArrayLike_default(c);
769
+ }
770
+ var isArrayLikeObject_default = isArrayLikeObject, objectTag = "[object Object]", funcProto = Function.prototype, objectProto = Object.prototype, funcToString = funcProto.toString, hasOwnProperty$2 = objectProto.hasOwnProperty, objectCtorString = funcToString.call(Object);
771
+ function isPlainObject(c) {
772
+ if (!isObjectLike_default(c) || _baseGetTag_default(c) != objectTag) return !1;
773
+ var L = _getPrototype_default(c);
774
+ if (L === null) return !0;
775
+ var R = hasOwnProperty$2.call(L, "constructor") && L.constructor;
776
+ return typeof R == "function" && R instanceof R && funcToString.call(R) == objectCtorString;
777
+ }
778
+ var isPlainObject_default = isPlainObject;
779
+ function safeGet(c, L) {
780
+ if (!(L === "constructor" && typeof c[L] == "function") && L != "__proto__") return c[L];
781
+ }
782
+ var _safeGet_default = safeGet, hasOwnProperty$1 = Object.prototype.hasOwnProperty;
783
+ function assignValue(c, L, z) {
784
+ var B = c[L];
785
+ (!(hasOwnProperty$1.call(c, L) && eq_default(B, z)) || z === void 0 && !(L in c)) && _baseAssignValue_default(c, L, z);
786
+ }
787
+ var _assignValue_default = assignValue;
788
+ function copyObject(c, L, R, z) {
789
+ var B = !R;
790
+ R ||= {};
791
+ for (var V = -1, H = L.length; ++V < H;) {
792
+ var U = L[V], W = z ? z(R[U], c[U], U, R, c) : void 0;
793
+ W === void 0 && (W = c[U]), B ? _baseAssignValue_default(R, U, W) : _assignValue_default(R, U, W);
794
+ }
795
+ return R;
796
+ }
797
+ var _copyObject_default = copyObject;
798
+ function nativeKeysIn(c) {
799
+ var L = [];
800
+ if (c != null) for (var R in Object(c)) L.push(R);
801
+ return L;
802
+ }
803
+ var _nativeKeysIn_default = nativeKeysIn, hasOwnProperty = Object.prototype.hasOwnProperty;
804
+ function baseKeysIn(c) {
805
+ if (!isObject_default(c)) return _nativeKeysIn_default(c);
806
+ var L = _isPrototype_default(c), R = [];
807
+ for (var z in c) z == "constructor" && (L || !hasOwnProperty.call(c, z)) || R.push(z);
808
+ return R;
809
+ }
810
+ var _baseKeysIn_default = baseKeysIn;
811
+ function keysIn(c) {
812
+ return isArrayLike_default(c) ? _arrayLikeKeys_default(c, !0) : _baseKeysIn_default(c);
813
+ }
814
+ var keysIn_default = keysIn;
815
+ function toPlainObject(c) {
816
+ return _copyObject_default(c, keysIn_default(c));
817
+ }
818
+ var toPlainObject_default = toPlainObject;
819
+ function baseMergeDeep(L, R, z, B, V, U, G) {
820
+ var K = _safeGet_default(L, z), q = _safeGet_default(R, z), J = G.get(q);
821
+ if (J) {
822
+ _assignMergeValue_default(L, z, J);
823
+ return;
824
+ }
825
+ var Y = U ? U(K, q, z + "", L, R, G) : void 0, X = Y === void 0;
826
+ if (X) {
827
+ var Z = isArray_default(q), Q = !Z && isBuffer_default(q), $ = !Z && !Q && isTypedArray_default(q);
828
+ Y = q, Z || Q || $ ? isArray_default(K) ? Y = K : isArrayLikeObject_default(K) ? Y = _copyArray_default(K) : Q ? (X = !1, Y = _cloneBuffer_default(q, !0)) : $ ? (X = !1, Y = _cloneTypedArray_default(q, !0)) : Y = [] : isPlainObject_default(q) || isArguments_default(q) ? (Y = K, isArguments_default(K) ? Y = toPlainObject_default(K) : (!isObject_default(K) || isFunction_default(K)) && (Y = _initCloneObject_default(q))) : X = !1;
829
+ }
830
+ X && (G.set(q, Y), V(Y, q, B, U, G), G.delete(q)), _assignMergeValue_default(L, z, Y);
831
+ }
832
+ var _baseMergeDeep_default = baseMergeDeep;
833
+ function baseMerge(c, L, R, z, B) {
834
+ c !== L && _baseFor_default(L, function(V, H) {
835
+ if (B ||= new _Stack_default(), isObject_default(V)) _baseMergeDeep_default(c, L, H, R, baseMerge, z, B);
836
+ else {
837
+ var U = z ? z(_safeGet_default(c, H), V, H + "", c, L, B) : void 0;
838
+ U === void 0 && (U = V), _assignMergeValue_default(c, H, U);
839
+ }
840
+ }, keysIn_default);
841
+ }
842
+ var _baseMerge_default = baseMerge;
843
+ function apply(c, L, R) {
844
+ switch (R.length) {
845
+ case 0: return c.call(L);
846
+ case 1: return c.call(L, R[0]);
847
+ case 2: return c.call(L, R[0], R[1]);
848
+ case 3: return c.call(L, R[0], R[1], R[2]);
849
+ }
850
+ return c.apply(L, R);
851
+ }
852
+ var _apply_default = apply, nativeMax = Math.max;
853
+ function overRest(c, L, R) {
854
+ return L = nativeMax(L === void 0 ? c.length - 1 : L, 0), function() {
855
+ for (var z = arguments, B = -1, V = nativeMax(z.length - L, 0), H = Array(V); ++B < V;) H[B] = z[L + B];
856
+ B = -1;
857
+ for (var U = Array(L + 1); ++B < L;) U[B] = z[B];
858
+ return U[L] = R(H), _apply_default(c, this, U);
859
+ };
860
+ }
861
+ var _overRest_default = overRest;
862
+ function constant(c) {
863
+ return function() {
864
+ return c;
865
+ };
866
+ }
867
+ var constant_default = constant, _baseSetToString_default = _defineProperty_default ? function(c, L) {
868
+ return _defineProperty_default(c, "toString", {
869
+ configurable: !0,
870
+ enumerable: !1,
871
+ value: constant_default(L),
872
+ writable: !0
873
+ });
874
+ } : identity_default, HOT_COUNT = 800, HOT_SPAN = 16, nativeNow = Date.now;
875
+ function shortOut(c) {
876
+ var L = 0, R = 0;
877
+ return function() {
878
+ var z = nativeNow(), B = HOT_SPAN - (z - R);
879
+ if (R = z, B > 0) {
880
+ if (++L >= HOT_COUNT) return arguments[0];
881
+ } else L = 0;
882
+ return c.apply(void 0, arguments);
883
+ };
884
+ }
885
+ var _setToString_default = shortOut(_baseSetToString_default);
886
+ function baseRest(c, L) {
887
+ return _setToString_default(_overRest_default(c, L, identity_default), c + "");
888
+ }
889
+ var _baseRest_default = baseRest;
890
+ function isIterateeCall(c, L, z) {
891
+ if (!isObject_default(z)) return !1;
892
+ var B = typeof L;
893
+ return (B == "number" ? isArrayLike_default(z) && _isIndex_default(L, z.length) : B == "string" && L in z) ? eq_default(z[L], c) : !1;
894
+ }
895
+ var _isIterateeCall_default = isIterateeCall;
896
+ function createAssigner(c) {
897
+ return _baseRest_default(function(L, R) {
898
+ var z = -1, B = R.length, V = B > 1 ? R[B - 1] : void 0, H = B > 2 ? R[2] : void 0;
899
+ for (V = c.length > 3 && typeof V == "function" ? (B--, V) : void 0, H && _isIterateeCall_default(R[0], R[1], H) && (V = B < 3 ? void 0 : V, B = 1), L = Object(L); ++z < B;) {
900
+ var U = R[z];
901
+ U && c(L, U, z, V);
902
+ }
903
+ return L;
904
+ });
905
+ }
906
+ var merge_default = createAssigner(function(c, L, R) {
907
+ _baseMerge_default(c, L, R);
908
+ }), import_dist = require_dist(), ZERO_WIDTH_SPACE = "​", d3CurveTypes = {
909
+ curveBasis: basis_default,
910
+ curveBasisClosed: basisClosed_default,
911
+ curveBasisOpen: basisOpen_default,
912
+ curveBumpX: bumpX,
913
+ curveBumpY: bumpY,
914
+ curveBundle: bundle_default,
915
+ curveCardinalClosed: cardinalClosed_default,
916
+ curveCardinalOpen: cardinalOpen_default,
917
+ curveCardinal: cardinal_default,
918
+ curveCatmullRomClosed: catmullRomClosed_default,
919
+ curveCatmullRomOpen: catmullRomOpen_default,
920
+ curveCatmullRom: catmullRom_default,
921
+ curveLinear: linear_default,
922
+ curveLinearClosed: linearClosed_default,
923
+ curveMonotoneX: monotoneX,
924
+ curveMonotoneY: monotoneY,
925
+ curveNatural: natural_default,
926
+ curveStep: step_default,
927
+ curveStepAfter: stepAfter,
928
+ curveStepBefore: stepBefore
929
+ }, directiveWithoutOpen = /\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi, detectInit = /* @__PURE__ */ __name(function(c, L) {
930
+ let R = detectDirective(c, /(?:init\b)|(?:initialize\b)/), z = {};
931
+ if (Array.isArray(R)) {
932
+ let c = R.map((c) => c.args);
933
+ sanitizeDirective(c), z = assignWithDepth_default(z, [...c]);
934
+ } else z = R.args;
935
+ if (!z) return;
936
+ let B = detectType(c, L), V = "config";
937
+ return z[V] !== void 0 && (B === "flowchart-v2" && (B = "flowchart"), z[B] = z[V], delete z[V]), z;
938
+ }, "detectInit"), detectDirective = /* @__PURE__ */ __name(function(c, L = null) {
939
+ try {
940
+ let R = RegExp(`[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).*
941
+ `, "ig");
942
+ c = c.trim().replace(R, "").replace(/'/gm, "\""), log.debug(`Detecting diagram directive${L === null ? "" : " type:" + L} based on the text:${c}`);
943
+ let z, B = [];
944
+ for (; (z = directiveRegex.exec(c)) !== null;) if (z.index === directiveRegex.lastIndex && directiveRegex.lastIndex++, z && !L || L && z[1]?.match(L) || L && z[2]?.match(L)) {
945
+ let c = z[1] ? z[1] : z[2], L = z[3] ? z[3].trim() : z[4] ? JSON.parse(z[4].trim()) : null;
946
+ B.push({
947
+ type: c,
948
+ args: L
949
+ });
950
+ }
951
+ return B.length === 0 ? {
952
+ type: c,
953
+ args: null
954
+ } : B.length === 1 ? B[0] : B;
955
+ } catch (R) {
956
+ return log.error(`ERROR: ${R.message} - Unable to parse directive type: '${L}' based on the text: '${c}'`), {
957
+ type: void 0,
958
+ args: null
959
+ };
960
+ }
961
+ }, "detectDirective"), removeDirectives = /* @__PURE__ */ __name(function(c) {
962
+ return c.replace(directiveRegex, "");
963
+ }, "removeDirectives"), isSubstringInArray = /* @__PURE__ */ __name(function(c, L) {
964
+ for (let [R, z] of L.entries()) if (z.match(c)) return R;
965
+ return -1;
966
+ }, "isSubstringInArray");
967
+ function interpolateToCurve(c, L) {
968
+ return c ? d3CurveTypes[`curve${c.charAt(0).toUpperCase() + c.slice(1)}`] ?? L : L;
969
+ }
970
+ __name(interpolateToCurve, "interpolateToCurve");
971
+ function formatUrl(c, L) {
972
+ let R = c.trim();
973
+ if (R) return L.securityLevel === "loose" ? R : (0, import_dist.sanitizeUrl)(R);
974
+ }
975
+ __name(formatUrl, "formatUrl");
976
+ var runFunc = /* @__PURE__ */ __name((c, ...L) => {
977
+ let R = c.split("."), z = R.length - 1, B = R[z], V = window;
978
+ for (let L = 0; L < z; L++) if (V = V[R[L]], !V) {
979
+ log.error(`Function name: ${c} not found in window`);
980
+ return;
981
+ }
982
+ V[B](...L);
983
+ }, "runFunc");
984
+ function distance(c, L) {
985
+ return !c || !L ? 0 : Math.sqrt((L.x - c.x) ** 2 + (L.y - c.y) ** 2);
986
+ }
987
+ __name(distance, "distance");
988
+ function traverseEdge(c) {
989
+ let L, R = 0;
990
+ return c.forEach((c) => {
991
+ R += distance(c, L), L = c;
992
+ }), calculatePoint(c, R / 2);
993
+ }
994
+ __name(traverseEdge, "traverseEdge");
995
+ function calcLabelPosition(c) {
996
+ return c.length === 1 ? c[0] : traverseEdge(c);
997
+ }
998
+ __name(calcLabelPosition, "calcLabelPosition");
999
+ var roundNumber = /* @__PURE__ */ __name((c, L = 2) => {
1000
+ let R = 10 ** L;
1001
+ return Math.round(c * R) / R;
1002
+ }, "roundNumber"), calculatePoint = /* @__PURE__ */ __name((c, L) => {
1003
+ let R, z = L;
1004
+ for (let L of c) {
1005
+ if (R) {
1006
+ let c = distance(L, R);
1007
+ if (c === 0) return R;
1008
+ if (c < z) z -= c;
1009
+ else {
1010
+ let B = z / c;
1011
+ if (B <= 0) return R;
1012
+ if (B >= 1) return {
1013
+ x: L.x,
1014
+ y: L.y
1015
+ };
1016
+ if (B > 0 && B < 1) return {
1017
+ x: roundNumber((1 - B) * R.x + B * L.x, 5),
1018
+ y: roundNumber((1 - B) * R.y + B * L.y, 5)
1019
+ };
1020
+ }
1021
+ }
1022
+ R = L;
1023
+ }
1024
+ throw Error("Could not find a suitable point for the given distance");
1025
+ }, "calculatePoint"), calcCardinalityPosition = /* @__PURE__ */ __name((c, L, R) => {
1026
+ log.info(`our points ${JSON.stringify(L)}`), L[0] !== R && (L = L.reverse());
1027
+ let z = calculatePoint(L, 25), B = c ? 10 : 5, V = Math.atan2(L[0].y - z.y, L[0].x - z.x), H = {
1028
+ x: 0,
1029
+ y: 0
1030
+ };
1031
+ return H.x = Math.sin(V) * B + (L[0].x + z.x) / 2, H.y = -Math.cos(V) * B + (L[0].y + z.y) / 2, H;
1032
+ }, "calcCardinalityPosition");
1033
+ function calcTerminalLabelPosition(c, L, R) {
1034
+ let z = structuredClone(R);
1035
+ log.info("our points", z), L !== "start_left" && L !== "start_right" && z.reverse();
1036
+ let B = calculatePoint(z, 25 + c), V = 10 + c * .5, H = Math.atan2(z[0].y - B.y, z[0].x - B.x), U = {
1037
+ x: 0,
1038
+ y: 0
1039
+ };
1040
+ return L === "start_left" ? (U.x = Math.sin(H + Math.PI) * V + (z[0].x + B.x) / 2, U.y = -Math.cos(H + Math.PI) * V + (z[0].y + B.y) / 2) : L === "end_right" ? (U.x = Math.sin(H - Math.PI) * V + (z[0].x + B.x) / 2 - 5, U.y = -Math.cos(H - Math.PI) * V + (z[0].y + B.y) / 2 - 5) : L === "end_left" ? (U.x = Math.sin(H) * V + (z[0].x + B.x) / 2 - 5, U.y = -Math.cos(H) * V + (z[0].y + B.y) / 2 - 5) : (U.x = Math.sin(H) * V + (z[0].x + B.x) / 2, U.y = -Math.cos(H) * V + (z[0].y + B.y) / 2), U;
1041
+ }
1042
+ __name(calcTerminalLabelPosition, "calcTerminalLabelPosition");
1043
+ function getStylesFromArray(c) {
1044
+ let L = "", R = "";
1045
+ for (let z of c) z !== void 0 && (z.startsWith("color:") || z.startsWith("text-align:") ? R = R + z + ";" : L = L + z + ";");
1046
+ return {
1047
+ style: L,
1048
+ labelStyle: R
1049
+ };
1050
+ }
1051
+ __name(getStylesFromArray, "getStylesFromArray");
1052
+ var cnt = 0, generateId = /* @__PURE__ */ __name(() => (cnt++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + cnt), "generateId");
1053
+ function makeRandomHex(c) {
1054
+ let L = "";
1055
+ for (let R = 0; R < c; R++) L += "0123456789abcdef".charAt(Math.floor(Math.random() * 16));
1056
+ return L;
1057
+ }
1058
+ __name(makeRandomHex, "makeRandomHex");
1059
+ var random = /* @__PURE__ */ __name((c) => makeRandomHex(c.length), "random"), getTextObj = /* @__PURE__ */ __name(function() {
1060
+ return {
1061
+ x: 0,
1062
+ y: 0,
1063
+ fill: void 0,
1064
+ anchor: "start",
1065
+ style: "#666",
1066
+ width: 100,
1067
+ height: 100,
1068
+ textMargin: 0,
1069
+ rx: 0,
1070
+ ry: 0,
1071
+ valign: void 0,
1072
+ text: ""
1073
+ };
1074
+ }, "getTextObj"), drawSimpleText = /* @__PURE__ */ __name(function(c, L) {
1075
+ let R = L.text.replace(common_default.lineBreakRegex, " "), [, z] = parseFontSize(L.fontSize), B = c.append("text");
1076
+ B.attr("x", L.x), B.attr("y", L.y), B.style("text-anchor", L.anchor), B.style("font-family", L.fontFamily), B.style("font-size", z), B.style("font-weight", L.fontWeight), B.attr("fill", L.fill), L.class !== void 0 && B.attr("class", L.class);
1077
+ let V = B.append("tspan");
1078
+ return V.attr("x", L.x + L.textMargin * 2), V.attr("fill", L.fill), V.text(R), B;
1079
+ }, "drawSimpleText"), wrapLabel = memoize_default((c, L, R) => {
1080
+ if (!c || (R = Object.assign({
1081
+ fontSize: 12,
1082
+ fontWeight: 400,
1083
+ fontFamily: "Arial",
1084
+ joinWith: "<br/>"
1085
+ }, R), common_default.lineBreakRegex.test(c))) return c;
1086
+ let z = c.split(" ").filter(Boolean), B = [], V = "";
1087
+ return z.forEach((c, H) => {
1088
+ let U = calculateTextWidth(`${c} `, R), W = calculateTextWidth(V, R);
1089
+ if (U > L) {
1090
+ let { hyphenatedStrings: z, remainingWord: H } = breakString(c, L, "-", R);
1091
+ B.push(V, ...z), V = H;
1092
+ } else W + U >= L ? (B.push(V), V = c) : V = [V, c].filter(Boolean).join(" ");
1093
+ H + 1 === z.length && B.push(V);
1094
+ }), B.filter((c) => c !== "").join(R.joinWith);
1095
+ }, (c, L, R) => `${c}${L}${R.fontSize}${R.fontWeight}${R.fontFamily}${R.joinWith}`), breakString = memoize_default((c, L, R = "-", z) => {
1096
+ z = Object.assign({
1097
+ fontSize: 12,
1098
+ fontWeight: 400,
1099
+ fontFamily: "Arial",
1100
+ margin: 0
1101
+ }, z);
1102
+ let B = [...c], V = [], H = "";
1103
+ return B.forEach((c, U) => {
1104
+ let W = `${H}${c}`;
1105
+ if (calculateTextWidth(W, z) >= L) {
1106
+ let c = U + 1, L = B.length === c, z = `${W}${R}`;
1107
+ V.push(L ? W : z), H = "";
1108
+ } else H = W;
1109
+ }), {
1110
+ hyphenatedStrings: V,
1111
+ remainingWord: H
1112
+ };
1113
+ }, (c, L, R = "-", z) => `${c}${L}${R}${z.fontSize}${z.fontWeight}${z.fontFamily}`);
1114
+ function calculateTextHeight(c, L) {
1115
+ return calculateTextDimensions(c, L).height;
1116
+ }
1117
+ __name(calculateTextHeight, "calculateTextHeight");
1118
+ function calculateTextWidth(c, L) {
1119
+ return calculateTextDimensions(c, L).width;
1120
+ }
1121
+ __name(calculateTextWidth, "calculateTextWidth");
1122
+ var calculateTextDimensions = memoize_default((c, L) => {
1123
+ let { fontSize: R = 12, fontFamily: z = "Arial", fontWeight: B = 400 } = L;
1124
+ if (!c) return {
1125
+ width: 0,
1126
+ height: 0
1127
+ };
1128
+ let [, V] = parseFontSize(R), H = ["sans-serif", z], U = c.split(common_default.lineBreakRegex), W = [], G = select_default("body");
1129
+ if (!G.remove) return {
1130
+ width: 0,
1131
+ height: 0,
1132
+ lineHeight: 0
1133
+ };
1134
+ let K = G.append("svg");
1135
+ for (let c of H) {
1136
+ let L = 0, R = {
1137
+ width: 0,
1138
+ height: 0,
1139
+ lineHeight: 0
1140
+ };
1141
+ for (let z of U) {
1142
+ let H = getTextObj();
1143
+ H.text = z || "​";
1144
+ let U = drawSimpleText(K, H).style("font-size", V).style("font-weight", B).style("font-family", c), W = (U._groups || U)[0][0].getBBox();
1145
+ if (W.width === 0 && W.height === 0) throw Error("svg element not in render tree");
1146
+ R.width = Math.round(Math.max(R.width, W.width)), L = Math.round(W.height), R.height += L, R.lineHeight = Math.round(Math.max(R.lineHeight, L));
1147
+ }
1148
+ W.push(R);
1149
+ }
1150
+ return K.remove(), W[isNaN(W[1].height) || isNaN(W[1].width) || isNaN(W[1].lineHeight) || W[0].height > W[1].height && W[0].width > W[1].width && W[0].lineHeight > W[1].lineHeight ? 0 : 1];
1151
+ }, (c, L) => `${c}${L.fontSize}${L.fontWeight}${L.fontFamily}`), InitIDGenerator = class {
1152
+ constructor(c = !1, L) {
1153
+ this.count = 0, this.count = L ? L.length : 0, this.next = c ? () => this.count++ : () => Date.now();
1154
+ }
1155
+ static #e = __name(this, "InitIDGenerator");
1156
+ }, decoder, entityDecode = /* @__PURE__ */ __name(function(c) {
1157
+ return decoder ||= document.createElement("div"), c = escape(c).replace(/%26/g, "&").replace(/%23/g, "#").replace(/%3B/g, ";"), decoder.innerHTML = c, unescape(decoder.textContent);
1158
+ }, "entityDecode");
1159
+ function isDetailedError(c) {
1160
+ return "str" in c;
1161
+ }
1162
+ __name(isDetailedError, "isDetailedError");
1163
+ var insertTitle = /* @__PURE__ */ __name((c, L, R, z) => {
1164
+ if (!z) return;
1165
+ let B = c.node()?.getBBox();
1166
+ B && c.append("text").text(z).attr("text-anchor", "middle").attr("x", B.x + B.width / 2).attr("y", -R).attr("class", L);
1167
+ }, "insertTitle"), parseFontSize = /* @__PURE__ */ __name((c) => {
1168
+ if (typeof c == "number") return [c, c + "px"];
1169
+ let L = parseInt(c ?? "", 10);
1170
+ return Number.isNaN(L) ? [void 0, void 0] : c === String(L) ? [L, c + "px"] : [L, c];
1171
+ }, "parseFontSize");
1172
+ function cleanAndMerge(c, L) {
1173
+ return merge_default({}, c, L);
1174
+ }
1175
+ __name(cleanAndMerge, "cleanAndMerge");
1176
+ var utils_default = {
1177
+ assignWithDepth: assignWithDepth_default,
1178
+ wrapLabel,
1179
+ calculateTextHeight,
1180
+ calculateTextWidth,
1181
+ calculateTextDimensions,
1182
+ cleanAndMerge,
1183
+ detectInit,
1184
+ detectDirective,
1185
+ isSubstringInArray,
1186
+ interpolateToCurve,
1187
+ calcLabelPosition,
1188
+ calcCardinalityPosition,
1189
+ calcTerminalLabelPosition,
1190
+ formatUrl,
1191
+ getStylesFromArray,
1192
+ generateId,
1193
+ random,
1194
+ runFunc,
1195
+ entityDecode,
1196
+ insertTitle,
1197
+ isLabelCoordinateInPath,
1198
+ parseFontSize,
1199
+ InitIDGenerator
1200
+ }, encodeEntities = /* @__PURE__ */ __name(function(c) {
1201
+ let L = c;
1202
+ return L = L.replace(/style.*:\S*#.*;/g, function(c) {
1203
+ return c.substring(0, c.length - 1);
1204
+ }), L = L.replace(/classDef.*:\S*#.*;/g, function(c) {
1205
+ return c.substring(0, c.length - 1);
1206
+ }), L = L.replace(/#\w+;/g, function(c) {
1207
+ let L = c.substring(1, c.length - 1);
1208
+ return /^\+?\d+$/.test(L) ? "fl°°" + L + "¶ß" : "fl°" + L + "¶ß";
1209
+ }), L;
1210
+ }, "encodeEntities"), decodeEntities = /* @__PURE__ */ __name(function(c) {
1211
+ return c.replace(/fl°°/g, "&#").replace(/fl°/g, "&").replace(/¶ß/g, ";");
1212
+ }, "decodeEntities"), getEdgeId = /* @__PURE__ */ __name((c, L, { counter: R = 0, prefix: z, suffix: B }, V) => V || `${z ? `${z}_` : ""}${c}_${L}_${R}${B ? `_${B}` : ""}`, "getEdgeId");
1213
+ function handleUndefinedAttr(c) {
1214
+ return c ?? null;
1215
+ }
1216
+ __name(handleUndefinedAttr, "handleUndefinedAttr");
1217
+ function isLabelCoordinateInPath(c, L) {
1218
+ let R = Math.round(c.x), z = Math.round(c.y), B = L.replace(/(\d+\.\d+)/g, (c) => Math.round(parseFloat(c)).toString());
1219
+ return B.includes(R.toString()) || B.includes(z.toString());
1220
+ }
1221
+ __name(isLabelCoordinateInPath, "isLabelCoordinateInPath");
1222
+ export { _copyArray_default as A, monotoneY as B, _overRest_default as C, isArrayLikeObject_default as D, _assignValue_default as E, stepAfter as F, bumpY as G, cardinal_default as H, stepBefore as I, linear_default as K, step_default as L, _cloneArrayBuffer_default as M, _cloneBuffer_default as N, _initCloneObject_default as O, _baseAssignValue_default as P, natural_default as R, constant_default as S, _copyObject_default as T, basis_default as U, catmullRom_default as V, bumpX as W, wrapLabel as _, decodeEntities as a, _baseRest_default as b, getEdgeId as c, interpolateToCurve as d, isDetailedError as f, utils_default as g, removeDirectives as h, cleanAndMerge as i, _cloneTypedArray_default as j, _getPrototype_default as k, getStylesFromArray as l, random as m, calculateTextHeight as n, encodeEntities as o, parseFontSize as p, calculateTextWidth as r, generateId as s, ZERO_WIDTH_SPACE as t, handleUndefinedAttr as u, merge_default as v, keysIn_default as w, _setToString_default as x, _isIterateeCall_default as y, monotoneX as z };