vue-data-ui 2.4.2 → 2.4.4

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 (200) hide show
  1. package/README.md +3 -1
  2. package/dist/{Arrow-JuK2z9IB.js → Arrow-AxsI-FAh.js} +1 -1
  3. package/dist/{Arrow-DLTRnzcG.cjs → Arrow-W6XO2WVI.cjs} +1 -1
  4. package/dist/{BaseIcon-BGExhz6v.cjs → BaseIcon-BTn_oML7.cjs} +1 -1
  5. package/dist/{BaseIcon-rRli6Sfv.js → BaseIcon-BX3x6oa7.js} +1 -1
  6. package/dist/{DataTable-DTk7C4Pr.js → DataTable-BI1tjiA_.js} +2 -2
  7. package/dist/{DataTable-DJzhv96s.cjs → DataTable-RUQ1G_6L.cjs} +1 -1
  8. package/dist/{Legend-YZ7Hz3o1.cjs → Legend-B86sMXn7.cjs} +1 -1
  9. package/dist/{Legend-CYF2gpXG.js → Legend-CRMHjbGw.js} +1 -1
  10. package/dist/{PackageVersion-CvCRsT5_.js → PackageVersion-Clrfvyd8.js} +1 -1
  11. package/dist/{PackageVersion-DVZtsuy4.cjs → PackageVersion-CowXQ4IM.cjs} +1 -1
  12. package/dist/{PenAndPaper-Jb0pLt3G.js → PenAndPaper-BQzgk5kO.js} +2 -2
  13. package/dist/{PenAndPaper-CyXm-yVL.cjs → PenAndPaper-DBSxk9Xk.cjs} +1 -1
  14. package/dist/{Shape-BpPn4eWR.js → Shape-DYNtRer6.js} +1 -1
  15. package/dist/{Shape-X2F-QV_B.cjs → Shape-qK3MNdTg.cjs} +1 -1
  16. package/dist/{Slicer-CU7dRZR0.js → Slicer-DFPDip5U.js} +3 -3
  17. package/dist/{Slicer-CL0tP5a5.cjs → Slicer-NlxLkUso.cjs} +1 -1
  18. package/dist/{Title-5VmBwT4i.js → Title-710895ks.js} +1 -1
  19. package/dist/{Title-Co5jI5ed.cjs → Title-CUN1T6KC.cjs} +1 -1
  20. package/dist/{Tooltip-Bl6W8Zn7.cjs → Tooltip-BapDtYOM.cjs} +1 -1
  21. package/dist/{Tooltip-Cj4EF7v1.js → Tooltip-CPlG_yQU.js} +1 -1
  22. package/dist/index-CcykRspI.cjs +9 -0
  23. package/dist/{index-DnVHQ2xI.js → index-DCsPHn9C.js} +4 -1
  24. package/dist/style.css +1 -1
  25. package/dist/types/vue-data-ui.d.cts +4 -1
  26. package/dist/types/vue-data-ui.d.ts +4 -1
  27. package/dist/{useNestedProp-Cox0K0Y5.js → useNestedProp-DdSlLeTW.js} +1 -1
  28. package/dist/{useNestedProp-q7byAAIJ.cjs → useNestedProp-XtPlFP9O.cjs} +1 -1
  29. package/dist/{usePrinter-BCAFeO_J.cjs → usePrinter-BcE45wW6.cjs} +1 -1
  30. package/dist/{usePrinter-BEeNAqS5.js → usePrinter-siG3sKWo.js} +1 -1
  31. package/dist/useResponsive-BJ7DTGpm.cjs +1 -0
  32. package/dist/useResponsive-CoxXLe23.js +189 -0
  33. package/dist/{vue-data-ui-CRLLZpt0.cjs → vue-data-ui-C0o1kZzC.cjs} +1 -1
  34. package/dist/{vue-data-ui-W7nnqn0v.js → vue-data-ui-D_MTGc8j.js} +58 -58
  35. package/dist/vue-data-ui.cjs +1 -1
  36. package/dist/vue-data-ui.js +1 -1
  37. package/dist/{vue-ui-3d-bar-BwBrUabe.js → vue-ui-3d-bar-BdzWvy4d.js} +41 -34
  38. package/dist/{vue-ui-3d-bar-bD_n6qL_.cjs → vue-ui-3d-bar-C298Bf3V.cjs} +2 -2
  39. package/dist/{vue-ui-accordion-xXgqfR2l.cjs → vue-ui-accordion-B7PTyFVk.cjs} +1 -1
  40. package/dist/{vue-ui-accordion-DspS4q3f.js → vue-ui-accordion-D4Er5Dy5.js} +3 -3
  41. package/dist/vue-ui-age-pyramid-BIcB5vtU.cjs +1 -0
  42. package/dist/{vue-ui-age-pyramid-CxBvm3uM.js → vue-ui-age-pyramid-CHEdFQb7.js} +185 -168
  43. package/dist/{vue-ui-annotator-BOofWpzv.js → vue-ui-annotator-CqM_1HlB.js} +1 -1
  44. package/dist/{vue-ui-annotator-C6T5_7ZV.cjs → vue-ui-annotator-eGtZcHeb.cjs} +1 -1
  45. package/dist/{vue-ui-bullet-DraC-oFu.js → vue-ui-bullet-DBk50kIe.js} +195 -158
  46. package/dist/vue-ui-bullet-DURgZGgp.cjs +34 -0
  47. package/dist/{vue-ui-candlestick-DQZ5eT1f.js → vue-ui-candlestick-Bo41qkGe.js} +263 -246
  48. package/dist/vue-ui-candlestick-CP4Z-29b.cjs +2 -0
  49. package/dist/{vue-ui-carousel-table-PdLjpH1p.js → vue-ui-carousel-table-CkNOqa9q.js} +76 -69
  50. package/dist/vue-ui-carousel-table-lMqx64wd.cjs +1 -0
  51. package/dist/{vue-ui-chestnut-ByI_O5hB.js → vue-ui-chestnut-CNWq-epB.js} +299 -286
  52. package/dist/vue-ui-chestnut-qxzF2ND7.cjs +6 -0
  53. package/dist/{vue-ui-cursor-BM74l93B.js → vue-ui-cursor-B4m30Gqz.js} +2 -2
  54. package/dist/{vue-ui-cursor-BvadpA2m.cjs → vue-ui-cursor-BEv39HVY.cjs} +1 -1
  55. package/dist/{vue-ui-dashboard-CoANBhAM.js → vue-ui-dashboard-BL9IgDDx.js} +2 -2
  56. package/dist/{vue-ui-dashboard-OP51Gs8I.cjs → vue-ui-dashboard-DnoXstlp.cjs} +1 -1
  57. package/dist/{vue-ui-digits-DioaBnkB.js → vue-ui-digits-CVPDJ6tl.js} +2 -2
  58. package/dist/{vue-ui-digits-C7jJJg9k.cjs → vue-ui-digits-D1RaU4V-.cjs} +1 -1
  59. package/dist/{vue-ui-donut-ldqSm_JV.js → vue-ui-donut-C65SAJKb.js} +374 -357
  60. package/dist/vue-ui-donut-CMC92CXL.cjs +1 -0
  61. package/dist/vue-ui-donut-evolution-7gIM4bVk.cjs +1 -0
  62. package/dist/{vue-ui-donut-evolution-DAb1xzNd.js → vue-ui-donut-evolution-BFbBlmBx.js} +240 -226
  63. package/dist/{vue-ui-dumbbell-Dg7PkiKJ.js → vue-ui-dumbbell-BnxRfvv0.js} +227 -210
  64. package/dist/vue-ui-dumbbell-OCo67ZKp.cjs +9 -0
  65. package/dist/vue-ui-flow-BPnpYrzb.cjs +1 -0
  66. package/dist/{vue-ui-flow-DKT7ZEnr.js → vue-ui-flow-Cra_F-tK.js} +150 -137
  67. package/dist/vue-ui-galaxy-3zTk9Pr1.cjs +1 -0
  68. package/dist/{vue-ui-galaxy-qAA9be3S.js → vue-ui-galaxy-DlJ7v0aD.js} +145 -132
  69. package/dist/{vue-ui-gauge-D8yVTIgP.js → vue-ui-gauge-CsqVvNxE.js} +210 -193
  70. package/dist/vue-ui-gauge-DcUNJZI1.cjs +1 -0
  71. package/dist/{vue-ui-gizmo-W6bTkg59.cjs → vue-ui-gizmo-BkkLoCyx.cjs} +1 -1
  72. package/dist/{vue-ui-gizmo-DC0uUwI3.js → vue-ui-gizmo-Peyy8li7.js} +3 -3
  73. package/dist/vue-ui-heatmap-DYb831An.cjs +1 -0
  74. package/dist/{vue-ui-heatmap-u1raIzBQ.js → vue-ui-heatmap-i4HFM04D.js} +203 -189
  75. package/dist/{vue-ui-kpi-DY_2WF7U.cjs → vue-ui-kpi-CCrdcv3r.cjs} +1 -1
  76. package/dist/{vue-ui-kpi-C-iTxMD2.js → vue-ui-kpi-gSKVVqZg.js} +3 -3
  77. package/dist/{vue-ui-mini-loader-Bfq2MNWu.cjs → vue-ui-mini-loader-CqutMcQI.cjs} +1 -1
  78. package/dist/{vue-ui-mini-loader-C7x7S0hi.js → vue-ui-mini-loader-D7Jk1LJb.js} +2 -2
  79. package/dist/{vue-ui-molecule-BFnOIxxs.js → vue-ui-molecule-CgdepnhM.js} +164 -151
  80. package/dist/vue-ui-molecule-CwUObXAx.cjs +1 -0
  81. package/dist/{vue-ui-mood-radar-CR1v5v2x.js → vue-ui-mood-radar-Bxro4962.js} +217 -203
  82. package/dist/vue-ui-mood-radar-RQFKS7Br.cjs +1 -0
  83. package/dist/{vue-ui-nested-donuts-DEiloQzq.js → vue-ui-nested-donuts-B7dXBejH.js} +342 -325
  84. package/dist/vue-ui-nested-donuts-D8ZGqIGC.cjs +17 -0
  85. package/dist/vue-ui-onion-Dtt0kw8E.cjs +5 -0
  86. package/dist/{vue-ui-onion-LsEhBe4x.js → vue-ui-onion-i52wztm0.js} +267 -250
  87. package/dist/vue-ui-parallel-coordinate-plot-DNK0BrBy.cjs +8 -0
  88. package/dist/{vue-ui-parallel-coordinate-plot-CTlIjJqG.js → vue-ui-parallel-coordinate-plot-DUssrm08.js} +241 -224
  89. package/dist/{vue-ui-quadrant-DKVVFufb.js → vue-ui-quadrant-BORPtgQO.js} +236 -219
  90. package/dist/vue-ui-quadrant-a_I5E71f.cjs +1 -0
  91. package/dist/vue-ui-quick-chart-BpPDfK78.cjs +15 -0
  92. package/dist/{vue-ui-quick-chart-8vJikiGH.js → vue-ui-quick-chart-yb1FzVdt.js} +469 -452
  93. package/dist/{vue-ui-radar-20QhOUer.js → vue-ui-radar-CoCbl19A.js} +198 -181
  94. package/dist/vue-ui-radar-DZMngiqq.cjs +1 -0
  95. package/dist/{vue-ui-rating-DRWJsve1.js → vue-ui-rating-D-zwuvLK.js} +2 -2
  96. package/dist/{vue-ui-rating-Bbzm5nUK.cjs → vue-ui-rating-nTJ8DDhG.cjs} +1 -1
  97. package/dist/vue-ui-relation-circle-CW9qozhJ.js +366 -0
  98. package/dist/vue-ui-relation-circle-Wj_yrVJc.cjs +1 -0
  99. package/dist/vue-ui-rings-BZaZIGEz.cjs +2 -0
  100. package/dist/{vue-ui-rings-DG8GCi3y.js → vue-ui-rings-Bx2GEh6d.js} +221 -204
  101. package/dist/{vue-ui-scatter-Hqu5-F2H.js → vue-ui-scatter-BARiPzro.js} +375 -358
  102. package/dist/vue-ui-scatter-C-i1NZgz.cjs +1 -0
  103. package/dist/{vue-ui-screenshot-cjiqbtLK.js → vue-ui-screenshot-CuiJqlfo.js} +1 -1
  104. package/dist/{vue-ui-screenshot-D8nxd5RV.cjs → vue-ui-screenshot-CwOoftGV.cjs} +1 -1
  105. package/dist/{vue-ui-skeleton-aZmkNzAe.js → vue-ui-skeleton-DNuwx6_y.js} +419 -379
  106. package/dist/vue-ui-skeleton-DpfJbsNA.cjs +41 -0
  107. package/dist/{vue-ui-smiley-ChNvxygm.js → vue-ui-smiley-BnX27B0k.js} +2 -2
  108. package/dist/{vue-ui-smiley-B1TA19Hv.cjs → vue-ui-smiley-DGE9NFBY.cjs} +1 -1
  109. package/dist/{vue-ui-spark-trend-CQxELQcf.js → vue-ui-spark-trend-CgCLrMox.js} +86 -79
  110. package/dist/vue-ui-spark-trend-aW-de-rX.cjs +1 -0
  111. package/dist/vue-ui-sparkbar-BLUXUlTY.cjs +1 -0
  112. package/dist/{vue-ui-sparkbar-0ixbKZzf.js → vue-ui-sparkbar-BXku33sq.js} +90 -83
  113. package/dist/{vue-ui-sparkgauge-pdYb7OwH.js → vue-ui-sparkgauge-Doi0iu0L.js} +57 -50
  114. package/dist/vue-ui-sparkgauge-RTiKvSMp.cjs +1 -0
  115. package/dist/{vue-ui-sparkhistogram-N69h2q0U.js → vue-ui-sparkhistogram-BnMvXlAP.js} +74 -67
  116. package/dist/vue-ui-sparkhistogram-C6AgJH1C.cjs +1 -0
  117. package/dist/{vue-ui-sparkline-2BKYZMOb.js → vue-ui-sparkline-DI7fq_MR.js} +134 -125
  118. package/dist/vue-ui-sparkline-DpVCQ6W9.cjs +1 -0
  119. package/dist/vue-ui-sparkstackbar-Bvuq2sLW.cjs +1 -0
  120. package/dist/{vue-ui-sparkstackbar-sh03cuOU.js → vue-ui-sparkstackbar-oNnE5z1C.js} +84 -77
  121. package/dist/{vue-ui-stackbar-B1si-1RM.js → vue-ui-stackbar-6g7b3yyu.js} +205 -196
  122. package/dist/{vue-ui-stackbar-Dy_saeSe.cjs → vue-ui-stackbar-aWJDGIKV.cjs} +2 -2
  123. package/dist/{vue-ui-strip-plot-BYn-QrTQ.js → vue-ui-strip-plot-BFM8HIM8.js} +265 -248
  124. package/dist/vue-ui-strip-plot-GdjjVxMN.cjs +1 -0
  125. package/dist/{vue-ui-table-DQORPCDJ.js → vue-ui-table-Cw4Yz-IE.js} +1 -1
  126. package/dist/{vue-ui-table-Ce4waJaj.cjs → vue-ui-table-XOPmDCOB.cjs} +1 -1
  127. package/dist/vue-ui-table-heatmap-Bh48bMuU.cjs +1 -0
  128. package/dist/{vue-ui-table-heatmap-Csp7Tx8N.js → vue-ui-table-heatmap-DeRCR8l6.js} +55 -48
  129. package/dist/vue-ui-table-sparkline-C25qj1w_.cjs +1 -0
  130. package/dist/{vue-ui-table-sparkline-DdwVrfUj.js → vue-ui-table-sparkline-w3H-od91.js} +88 -81
  131. package/dist/{vue-ui-thermometer-I6ZnlfAv.js → vue-ui-thermometer-BySEVhT8.js} +162 -149
  132. package/dist/vue-ui-thermometer-DZrusaGY.cjs +1 -0
  133. package/dist/{vue-ui-timer-COOXcn14.cjs → vue-ui-timer-1p6J6hTn.cjs} +1 -1
  134. package/dist/{vue-ui-timer-pi1SazTU.js → vue-ui-timer-BN-9a2lj.js} +6 -6
  135. package/dist/vue-ui-tiremarks-CvIJeWKE.cjs +1 -0
  136. package/dist/vue-ui-tiremarks-EzYdOMyf.js +317 -0
  137. package/dist/vue-ui-treemap-CzNOr1iR.cjs +1 -0
  138. package/dist/{vue-ui-treemap-3FNUlKxL.js → vue-ui-treemap-Da0f6vaF.js} +283 -266
  139. package/dist/vue-ui-vertical-bar-B9shdfqo.cjs +4 -0
  140. package/dist/vue-ui-vertical-bar-D1cBfu5p.js +869 -0
  141. package/dist/vue-ui-waffle-Cg-7Fazv.cjs +1 -0
  142. package/dist/{vue-ui-waffle-XecHJIc-.js → vue-ui-waffle-DM2LsEP7.js} +258 -241
  143. package/dist/vue-ui-wheel-B9cmixxi.js +299 -0
  144. package/dist/vue-ui-wheel-C-JukdTy.cjs +1 -0
  145. package/dist/vue-ui-word-cloud-BLMWYOPy.cjs +1 -0
  146. package/dist/{vue-ui-word-cloud-DnhXUn5x.js → vue-ui-word-cloud-Baz7RXN2.js} +192 -183
  147. package/dist/vue-ui-xy-BHeSkJQ3.cjs +3 -0
  148. package/dist/{vue-ui-xy-CqlRuFMc.js → vue-ui-xy-DVnzVSqE.js} +339 -319
  149. package/dist/{vue-ui-xy-canvas-C8c2X5fk.js → vue-ui-xy-canvas-A7PKnWBs.js} +255 -246
  150. package/dist/vue-ui-xy-canvas-DAd-B98z.cjs +9 -0
  151. package/package.json +1 -1
  152. package/dist/index-FfZRtJ6A.cjs +0 -9
  153. package/dist/useResponsive-B3TrDDIG.cjs +0 -1
  154. package/dist/useResponsive-NZB-WLRF.js +0 -187
  155. package/dist/vue-ui-age-pyramid-BZcAwcVQ.cjs +0 -1
  156. package/dist/vue-ui-bullet-ChaEgXvR.cjs +0 -23
  157. package/dist/vue-ui-candlestick--hPCfMFH.cjs +0 -2
  158. package/dist/vue-ui-carousel-table-DpRQklDZ.cjs +0 -1
  159. package/dist/vue-ui-chestnut-ae6x87wl.cjs +0 -6
  160. package/dist/vue-ui-donut-CplNylps.cjs +0 -1
  161. package/dist/vue-ui-donut-evolution-CQpr-6IS.cjs +0 -1
  162. package/dist/vue-ui-dumbbell-_ijaYr8W.cjs +0 -9
  163. package/dist/vue-ui-flow-BPt35d5K.cjs +0 -1
  164. package/dist/vue-ui-galaxy-e06PkTmp.cjs +0 -1
  165. package/dist/vue-ui-gauge-DiZVIU0D.cjs +0 -1
  166. package/dist/vue-ui-heatmap-CbZcv_2I.cjs +0 -1
  167. package/dist/vue-ui-molecule-CbKMLrDT.cjs +0 -1
  168. package/dist/vue-ui-mood-radar-6LmFXuiw.cjs +0 -1
  169. package/dist/vue-ui-nested-donuts-DS0fjiLi.cjs +0 -17
  170. package/dist/vue-ui-onion-CLvvu4Ku.cjs +0 -5
  171. package/dist/vue-ui-parallel-coordinate-plot-BWg8OFqH.cjs +0 -8
  172. package/dist/vue-ui-quadrant-OM5J1mG3.cjs +0 -1
  173. package/dist/vue-ui-quick-chart-gG5Ar8-i.cjs +0 -15
  174. package/dist/vue-ui-radar-CAaHjDO7.cjs +0 -1
  175. package/dist/vue-ui-relation-circle-BoGAFXuS.cjs +0 -1
  176. package/dist/vue-ui-relation-circle-I45_Sk5l.js +0 -349
  177. package/dist/vue-ui-rings-B9WQ7S5m.cjs +0 -2
  178. package/dist/vue-ui-scatter-BZfg1YIN.cjs +0 -1
  179. package/dist/vue-ui-skeleton-Djv08J67.cjs +0 -41
  180. package/dist/vue-ui-spark-trend-BqrPr63O.cjs +0 -1
  181. package/dist/vue-ui-sparkbar-CrTEPTU5.cjs +0 -1
  182. package/dist/vue-ui-sparkgauge-BYxpe_WV.cjs +0 -1
  183. package/dist/vue-ui-sparkhistogram-D21XDUH2.cjs +0 -1
  184. package/dist/vue-ui-sparkline-Cf4m-Fxo.cjs +0 -1
  185. package/dist/vue-ui-sparkstackbar-dAS8XoJs.cjs +0 -1
  186. package/dist/vue-ui-strip-plot-D53LABpZ.cjs +0 -1
  187. package/dist/vue-ui-table-heatmap-EqHt-O7Y.cjs +0 -1
  188. package/dist/vue-ui-table-sparkline-DONmVOMh.cjs +0 -1
  189. package/dist/vue-ui-thermometer-hQBkMa7u.cjs +0 -1
  190. package/dist/vue-ui-tiremarks-hdNqoGyd.cjs +0 -1
  191. package/dist/vue-ui-tiremarks-vdPQYiDp.js +0 -303
  192. package/dist/vue-ui-treemap-Cv0TSFQa.cjs +0 -1
  193. package/dist/vue-ui-vertical-bar-C--Ma0Dw.cjs +0 -4
  194. package/dist/vue-ui-vertical-bar-DwxpB46q.js +0 -852
  195. package/dist/vue-ui-waffle-CKM0QyJN.cjs +0 -1
  196. package/dist/vue-ui-wheel-Bbih5sSL.js +0 -282
  197. package/dist/vue-ui-wheel-C0dJrzOJ.cjs +0 -1
  198. package/dist/vue-ui-word-cloud-Cfd2wxsT.cjs +0 -1
  199. package/dist/vue-ui-xy-BDpqVzAq.cjs +0 -3
  200. package/dist/vue-ui-xy-canvas-Cansjd3L.cjs +0 -9
@@ -1,187 +0,0 @@
1
- function b(e, i, o, t = {}) {
2
- if (o <= 0) return;
3
- e.save();
4
- const {
5
- color: s = "black",
6
- lineWidth: u = 1,
7
- lineCap: d = "round",
8
- lineJoin: f = "round",
9
- lineDash: w = null,
10
- lineDashoffset: r = 0,
11
- shadowColor: l = null,
12
- shadowBlur: a = 0,
13
- shadowOffsetX: y = 0,
14
- shadowOffsetY: g = 0,
15
- fillStyle: N = "#FFFFFF"
16
- } = t;
17
- e.beginPath(), e.arc(i.x, i.y, o, 0, 2 * Math.PI), e.strokeStyle = s, e.lineWidth = u, e.lineCap = d, e.lineJoin = f, w && (e.setLineDash(w), e.lineDashoffset = r), l && (e.shadowColor = l, e.shadowOffsetX = y, e.shadowOffsetY = g), a && (e.shadowBlur = a), N && (e.fillStyle = N), e.fillStyle && e.fill(), e.stroke(), e.restore();
18
- }
19
- function C(e, i, o = {}) {
20
- if (!i.length) return;
21
- e.save();
22
- const {
23
- color: t = "black",
24
- lineWidth: s = 1,
25
- lineCap: u = "round",
26
- lineJoin: d = "round",
27
- lineDash: f = null,
28
- lineDashoffset: w = 0,
29
- shadowColor: r = null,
30
- shadowBlur: l = 0,
31
- shadowOffsetX: a = 0,
32
- shadowOffsetY: y = 0
33
- } = o;
34
- e.beginPath(), e.moveTo(i[0].x, i[0].y);
35
- for (let g = 1; g < i.length; g += 1)
36
- e.lineTo(i[g].x, i[g].y);
37
- e.strokeStyle = t, e.lineWidth = s, e.lineCap = u, e.lineJoin = d, f && (e.setLineDash(f), e.lineDashoffset = w), r && (e.shadowColor = r, e.shadowOffsetX = a, e.shadowOffsetY = y), l && (e.shadowBlur = l), e.stroke(), e.restore();
38
- }
39
- function m(e, i, o = {}) {
40
- if (!i.length) return;
41
- e.save();
42
- const {
43
- strokeColor: t = "black",
44
- lineWidth: s = 1,
45
- lineCap: u = "round",
46
- lineJoin: d = "round",
47
- lineDash: f = null,
48
- lineDashoffset: w = 0,
49
- fillColor: r = null,
50
- gradient: l = null,
51
- shadowColor: a = null,
52
- shadowBlur: y = 0,
53
- shadowOffsetX: g = 0,
54
- shadowOffsetY: N = 0
55
- } = o;
56
- e.beginPath(), e.moveTo(i[0].x, i[0].y);
57
- for (let n = 1; n < i.length; n += 1)
58
- e.lineTo(i[n].x, i[n].y);
59
- if (e.closePath(), e.strokeStyle = t, e.lineWidth = s, e.lineCap = u, e.lineJoin = d, f && (e.setLineDash(f), e.lineDashoffset = w), a && (e.shadowColor = a, e.shadowBlur = y, e.shadowOffsetX = g, e.shadowOffsetY = N), l) {
60
- let n;
61
- l.type === "linear" ? n = e.createLinearGradient(
62
- h(l.start.x, Number.MIN_VALUE),
63
- h(l.start.y, Number.MIN_VALUE),
64
- h(l.end.x, Number.MIN_VALUE * 2),
65
- h(l.end.y, Number.MIN_VALUE * 2)
66
- ) : l.type === "radial" && (n = e.createRadialGradient(
67
- h(l.start.x, Number.MIN_VALUE),
68
- h(l.start.y, Number.MIN_VALUE),
69
- l.start.r || 0,
70
- h(l.end.x, Number.MIN_VALUE * 2),
71
- h(l.end.y, Number.MIN_VALUE * 2),
72
- l.end.r || 0
73
- )), n && l.stops && (l.stops.forEach((p) => {
74
- n.addColorStop(p.offset, p.color);
75
- }), e.fillStyle = n);
76
- } else r && (e.fillStyle = r);
77
- e.fillStyle && e.fill(), t && e.stroke(), e.restore();
78
- }
79
- function L(e, i, o = {}) {
80
- if (!i.length) return;
81
- e.save();
82
- const {
83
- strokeColor: t = "black",
84
- lineWidth: s = 1,
85
- lineCap: u = "round",
86
- lineJoin: d = "round",
87
- lineDash: f = null,
88
- lineDashoffset: w = 0,
89
- fillColor: r = null,
90
- gradient: l = null,
91
- shadowColor: a = null,
92
- shadowBlur: y = 0,
93
- shadowOffsetX: g = 0,
94
- shadowOffsetY: N = 0
95
- } = o;
96
- e.beginPath(), e.moveTo(i[0].x, i[0].y);
97
- for (let n = 1; n < i.length; n += 1)
98
- e.lineTo(i[n].x, i[n].y);
99
- if (e.closePath(), e.strokeStyle = t, e.lineWidth = s, e.lineCap = u, e.lineJoin = d, f && (e.setLineDash(f), e.lineDashoffset = w), a && (e.shadowColor = a, e.shadowBlur = y, e.shadowOffsetX = g, e.shadowOffsetY = N), l) {
100
- let n;
101
- l.type === "linear" ? n = e.createLinearGradient(
102
- h(l.start.x, Number.MIN_VALUE),
103
- h(l.start.y, Number.MIN_VALUE),
104
- h(l.end.x, Number.MIN_VALUE * 2),
105
- h(l.end.y, Number.MIN_VALUE * 2)
106
- ) : l.type === "radial" && (n = e.createRadialGradient(
107
- h(l.start.x, Number.MIN_VALUE),
108
- h(l.start.y, Number.MIN_VALUE),
109
- l.start.r || 0,
110
- h(l.end.x, Number.MIN_VALUE * 2),
111
- h(l.end.y, Number.MIN_VALUE * 2),
112
- l.end.r || 0
113
- )), n && l.stops && (l.stops.forEach((p) => {
114
- n.addColorStop(p.offset, p.color);
115
- }), e.fillStyle = n);
116
- } else r && (e.fillStyle = r);
117
- e.fillStyle && e.fill(), t && e.stroke(), e.restore();
118
- }
119
- function I(e, i, o, t, s = {}) {
120
- e.save();
121
- const {
122
- font: u = "16px sans-serif",
123
- color: d = "black",
124
- align: f = "start",
125
- baseline: w = "alphabetic",
126
- maxWidth: r = void 0,
127
- rotation: l = 0,
128
- shadowColor: a = null,
129
- shadowBlur: y = 0,
130
- shadowOffsetX: g = 0,
131
- shadowOffsetY: N = 0,
132
- strokeColor: n = null,
133
- lineWidth: p = 1
134
- } = s;
135
- e.font = u, e.fillStyle = d, e.textAlign = f, e.textBaseline = w, a && (e.shadowColor = a, e.shadowBlur = y, e.shadowOffsetX = g, e.shadowOffsetY = N), n && (e.strokeStyle = n, e.lineWidth = p), l !== 0 && (e.translate(o, t), e.rotate(Math.PI / 180 * l), e.translate(-o, -t)), e.fillText(i, o, t, r), n && e.strokeText(i, o, t, r), e.restore();
136
- }
137
- function O(e, i = 20) {
138
- let o;
139
- return function(...t) {
140
- const s = this;
141
- o || (e.apply(s, t), o = !0, setTimeout(() => o = !1, i));
142
- };
143
- }
144
- function E(e, i, o = !1) {
145
- let t;
146
- return function(...s) {
147
- const u = this, d = function() {
148
- t = null, o || e.apply(u, s);
149
- }, f = o && !t;
150
- clearTimeout(t), t = setTimeout(d, i), f && e.apply(u, s);
151
- };
152
- }
153
- function k(e) {
154
- const i = document.createElement("canvas");
155
- return i.width = e.width || 1, i.height = e.height || 1, e.width || (e.width = 1), e.height || (e.height = 1), i.getContext("2d").drawImage(e, 0, 0), i;
156
- }
157
- function h(e, i) {
158
- return [null, void 0, NaN, 1 / 0, -1 / 0].includes(e) ? i : e;
159
- }
160
- function M({
161
- chart: e,
162
- title: i = null,
163
- slicer: o = null,
164
- legend: t = null
165
- }) {
166
- let s = 0, u = 0;
167
- if (e) {
168
- const d = e.parentNode, { height: f, width: w } = d.getBoundingClientRect();
169
- let r = 0, l = 0, a = 0;
170
- i && (r = i.getBoundingClientRect().height), o && (l = o.getBoundingClientRect().height), t && (a = t.getBoundingClientRect().height), s = f - r - l - a, u = w;
171
- }
172
- return {
173
- width: u,
174
- height: s
175
- };
176
- }
177
- export {
178
- b as a,
179
- I as b,
180
- k as c,
181
- E as d,
182
- C as l,
183
- m as p,
184
- L as r,
185
- O as t,
186
- M as u
187
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-FfZRtJ6A.cjs"),G=require("./useResponsive-B3TrDDIG.cjs"),ee=require("./Title-Co5jI5ed.cjs"),U=require("./usePrinter-BCAFeO_J.cjs"),te=require("./Tooltip-Bl6W8Zn7.cjs"),le=require("./DataTable-DJzhv96s.cjs"),ae=require("./vue-ui-skeleton-Djv08J67.cjs"),oe=require("./vue-ui-accordion-xXgqfR2l.cjs"),W=require("./useNestedProp-q7byAAIJ.cjs"),se=require("./PackageVersion-DVZtsuy4.cjs"),re=require("./PenAndPaper-CyXm-yVL.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ue=["id"],ne=["xmlns","viewBox"],de=["id"],ce=["stop-color"],ve=["stop-color"],ye=["id"],he=["stop-color"],fe=["stop-color"],pe=["x","y","width","height","fill","rx"],ge=["x","y","width","height","fill","rx"],be=["x","y","width","height","fill","rx"],me=["x","y","width","height","fill","rx"],xe={key:0},ke=["x","y","fill","font-size","font-weight"],we=["x","y","fill","font-size","font-weight"],Ce={key:1},_e=["x","y","font-size","fill","font-weight"],Ne={key:2},Le={key:0},Se=["x1","x2","y1","y2","stroke","stroke-width"],Te=["x1","x2","y1","y2","stroke","stroke-width"],Be=["x1","x2","y1","y2","stroke","stroke-width"],Ae=["x","y","font-size","fill","font-weight"],$e=["x1","x2","y1","y2","stroke","stroke-width"],Ee=["x","y","font-size","fill","font-weight"],ze=["x","y","font-size","fill","font-weight"],Ve=["x","y","width","height","fill","onMouseover"],Pe={key:4,class:"vue-data-ui-watermark"},Ie={__name:"vue-ui-age-pyramid",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(S,{expose:H}){const n=S,{vue_ui_age_pyramid:X}=s.useConfig(),m=e.computed(()=>!!n.dataset&&n.dataset.length),c=e.ref(s.createUid()),j=e.ref(null),C=e.ref(!1),_=e.ref(""),x=e.ref(null),T=e.ref(0),y=e.ref(null),B=e.ref(null),A=e.ref(0),$=e.ref(0),t=e.computed({get:()=>E(),set:l=>l});function E(){const l=W.useNestedProp({userConfig:n.config,defaultConfig:X});return l.theme?{...W.useNestedProp({userConfig:s.themes.vue_ui_age_pyramid[l.theme]||n.config,defaultConfig:l})}:l}e.watch(()=>n.config,l=>{t.value=E(),V(),A.value+=1,$.value+=1},{deep:!0});const z=e.ref(null);e.onMounted(()=>{V()});function V(){if(s.objectIsEmpty(n.dataset)&&s.error({componentName:"VueUiAgePyramid",type:"dataset"}),t.value.responsive){const l=G.throttle(()=>{const{width:i,height:a}=G.useResponsive({chart:y.value,title:t.value.style.title.text?B.value:null});d.value.width=i,d.value.height=a});z.value=new ResizeObserver(l),z.value.observe(y.value.parentNode)}}const{isPrinting:P,isImaging:I,generatePdf:O,generateImage:F}=U.usePrinter({elementId:`vue-ui-age-pyramid_${c.value}`,fileName:t.value.style.title.text||"vue-ui-age-pyramid"}),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),d=e.ref({height:t.value.style.height,width:t.value.style.width}),r=e.computed(()=>{const l=d.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left,i=t.value.style.layout.padding.left,a=d.value.width-t.value.style.layout.padding.right;return{top:t.value.style.layout.padding.top,left:i,right:a,bottom:d.value.height-t.value.style.layout.padding.bottom,width:l,height:d.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,centerX:t.value.style.layout.padding.left+l/2,leftChart:{width:l/2-t.value.style.layout.centerSlit.width,right:i+l/2-t.value.style.layout.centerSlit.width},rightChart:{width:l/2-t.value.style.layout.centerSlit.width,left:i+l/2+t.value.style.layout.centerSlit.width}}}),Y=e.computed(()=>n.dataset.map(l=>t.value.style.layout.dataLabels.yAxis.display==="age"?l[1]:l[0])),h=e.computed(()=>{const l=J(g.value/5),i=[],a=[];for(let o=0;o<=5;o+=1){const u=l*o,q=l*(o-5);i.push({value:u,x:r.value.left+r.value.width/2+t.value.style.layout.centerSlit.width+u/g.value*r.value.leftChart.width}),a.push({value:Math.abs(q),x:r.value.left+r.value.width/2+q/g.value*r.value.leftChart.width-t.value.style.layout.centerSlit.width})}return{right:i,left:a}});function J(l){if(l===0)return 0;const a=10**Math.floor(Math.log10(Math.abs(l)));let o;return l<0,o=Math.round(l/a)*a,o}const g=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.slice(-2).map(i=>s.checkNaN(i))))),f=e.computed(()=>n.dataset.length),K=e.computed(()=>n.dataset.map(l=>({segment:l[0],age:l[1],left:{value:l[2],proportionToMax:l[2]/g.value},right:{value:l[3],proportionToMax:l[3]/g.value}}))),p=e.computed(()=>K.value.map((l,i)=>{const a=r.value.top+r.value.height/f.value*i,o=r.value.height/f.value-t.value.style.layout.bars.gap;return{segment:l.segment,age:l.age,left:{...l.left,y:a,color:t.value.style.layout.bars.left.color,x:r.value.leftChart.right-l.left.proportionToMax*r.value.leftChart.width,width:s.checkNaN(l.left.proportionToMax*r.value.leftChart.width),height:o},right:{...l.right,y:a,color:t.value.style.layout.bars.right.color,x:r.value.rightChart.left,width:s.checkNaN(l.right.proportionToMax*r.value.rightChart.width),height:o}}})),N=e.ref(null);function Q(l,i){x.value=l,N.value={datapoint:i,seriesIndex:l,series:p.value,config:t.value};const a=t.value.style.tooltip.customFormat;if(s.isFunction(a)&&s.functionReturnsString(()=>a({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:p.value,config:t.value})))_.value=a({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:p.value,config:t.value});else{let o="";const u=p.value[l];o+=`<div><b>${u.segment}</b></div>`,o+=`<div>${t.value.translations.age}: ${s.applyDataLabel(t.value.style.layout.dataLabels.yAxis.formatter,s.checkNaN(u.age),s.dataLabel({v:s.checkNaN(u.age)}),{datapoint:i,seriesIndex:l})}</div>`,o+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,o+='<div style="display:flex; flex-direction:row;gap:12px">',o+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${c.value})`:t.value.style.layout.bars.left.color}"/></svg><div>${t.value.translations.female}</div><div><b>${s.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,s.checkNaN(u.left.value),s.dataLabel({v:s.checkNaN(u.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,o+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${c.value})`:t.value.style.layout.bars.right.color}"/></svg><div>${t.value.translations.male}</div><div><b>${s.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,s.checkNaN(u.right.value),s.dataLabel({v:s.checkNaN(u.right.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,o+="</div>",o+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}"><div>${t.value.translations.total}</div><div><b>${s.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,s.checkNaN(u.right.value)+s.checkNaN(u.left.value),s.dataLabel({v:s.checkNaN(u.right.value)+s.checkNaN(u.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,o+="</div>",_.value=`<div>${o}</div>`}C.value=!0}function D(){e.nextTick(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=n.dataset.map(u=>[u[0],u[1],u[2],u[3],u[2]+u[3]]),a=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(i),o=s.createCsvContent(a);s.downloadCsv({csvContent:o,title:t.value.style.title.text||"vue-ui-heatmap"})})}const k=e.computed(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=n.dataset.map(o=>[o[0],o[1],o[2].toLocaleString(),o[3].toLocaleString(),(o[2]+o[3]).toLocaleString()]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:i,config:a,colNames:l}}),b=e.ref(!1);function Z(l){b.value=l,T.value+=1}function M(){v.value.showTable=!v.value.showTable}function R(){v.value.showTooltip=!v.value.showTooltip}const w=e.ref(!1);function L(){w.value=!w.value}return H({generatePdf:O,generateCsv:D,generateImage:F,toggleTable:M,toggleTooltip:R,toggleAnnotator:L}),(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-age-pyramid ${b.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"agePyramid",ref:y,id:`vue-ui-age-pyramid_${c.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(re.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:w.value,onClose:L},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:B,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ee._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"pyramid-div-title",...t.value.style.title},subtitle:{cy:"pyramid-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(U.UserOptions,{ref_key:"details",ref:j,key:`user_options_${T.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(I),isPrinting:e.unref(P),uid:c.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:Z,onGeneratePdf:e.unref(O),onGenerateCsv:D,onGenerateImage:e.unref(F),onToggleTable:M,onToggleTooltip:R,onToggleAnnotator:L},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:o})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:o})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),viewBox:`0 0 ${d.value.width<=0?10:d.value.width} ${d.value.height<=0?10:d.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(se._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`age_pyramid_left_${c.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.bars.left.color},null,8,ce),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(s.setOpacity)(e.unref(s.shiftHue)(t.value.style.layout.bars.left.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,ve)],8,de),e.createElementVNode("linearGradient",{id:`age_pyramid_right_${c.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(s.setOpacity)(e.unref(s.shiftHue)(t.value.style.layout.bars.right.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,he),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.bars.right.color},null,8,fe)],8,ye)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.left.x,y:a.left.y,width:e.unref(s.checkNaN)(a.left.width<=0?1e-4:a.left.width),height:a.left.height<=0?1e-4:a.left.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,pe),e.createElementVNode("rect",{x:a.left.x,y:a.left.y,width:a.left.width<=0?1e-4:a.left.width,height:a.left.height<=0?1e-4:a.left.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${c.value})`:a.left.color,rx:t.value.style.layout.bars.borderRadius},null,8,ge),e.createElementVNode("rect",{x:a.right.x,y:a.right.y,width:a.right.width<=0?1e-4:a.right.width,height:a.right.height<=0?1e-4:a.right.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,be),e.createElementVNode("rect",{x:a.right.x,y:a.right.y,width:a.right.width<=0?1e-4:a.right.width,height:a.right.height<=0?1e-4:a.right.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${c.value})`:a.right.color,rx:t.value.style.layout.bars.borderRadius},null,8,me)]))),256)),e.createElementVNode("g",null,[t.value.style.layout.dataLabels.sideTitles.show?(e.openBlock(),e.createElementBlock("g",xe,[e.createElementVNode("text",{x:r.value.left,y:r.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.left.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"start","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.female),9,ke),e.createElementVNode("text",{x:r.value.right,y:r.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.right.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.male),9,we)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",Ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Y.value,(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o%t.value.style.layout.dataLabels.yAxis.showEvery===0?(e.openBlock(),e.createElementBlock("text",{key:0,x:r.value.centerX,y:r.value.top+r.value.height/f.value*o+t.value.style.layout.dataLabels.yAxis.fontSize/3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.dataLabels.yAxis.formatter,a,e.unref(s.dataLabel)({v:a}),{datapoint:a,seriesIndex:o})),9,_e)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ne,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Le,[e.createElementVNode("line",{x1:h.value.right[0].x,x2:h.value.right.at(-1).x,y1:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Se),e.createElementVNode("line",{x1:h.value.left[0].x,x2:h.value.left.at(-1).x,y1:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Te)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.right,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:a.x,y1:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Be)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:a.x,y:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,a.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(s.dataLabel)({v:a.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:a,seriesIndex:o})),9,Ae)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.left,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:a.x,y1:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,$e)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:a.x,y:r.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,a.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(s.dataLabel)({v:a.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:a,seriesIndex:o})),9,Ee)]))),256)),e.createElementVNode("text",{x:r.value.right,y:d.value.height,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.translation),9,ze)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.dataset,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:r.value.left,y:r.value.top+r.value.height/f.value*o-t.value.style.layout.bars.gap/2,width:r.value.width<=0?1e-4:r.value.width,height:r.value.height/f.value<=0?1e-4:r.value.height/f.value,fill:x.value!==null&&x.value===o?e.unref(s.setOpacity)(t.value.style.highlighter.color,t.value.style.highlighter.opacity):"transparent",onMouseover:u=>Q(o,a),onMouseleave:i[0]||(i[0]=u=>{x.value=null,C.value=!1})},null,40,Ve)]))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,ne)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Pe,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(P)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ae.default,{key:5,config:{type:"pyramid",style:{backgroundColor:t.value.style.backgroundColor,pyramid:{color:"#CCCCCC"}}}},null,8,["config"])),e.renderSlot(l.$slots,"legend",{legend:p.value},void 0,!0),e.createVNode(te._sfc_main,{show:v.value.showTooltip&&C.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:y.value,content:_.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),m.value?(e.openBlock(),e.createBlock(oe.default,{key:6,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(le.DataTable,{key:`table_${$.value}`,colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:i[1]||(i[1]=a=>v.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ue))}},Oe=ie._export_sfc(Ie,[["__scopeId","data-v-c501abdc"]]);exports.default=Oe;
@@ -1,23 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-FfZRtJ6A.cjs"),A=require("./useNestedProp-q7byAAIJ.cjs"),U=require("./Title-Co5jI5ed.cjs"),j=require("./Legend-YZ7Hz3o1.cjs"),$=require("./usePrinter-BCAFeO_J.cjs"),G=require("./PackageVersion-DVZtsuy4.cjs"),X=require("./PenAndPaper-CyXm-yVL.cjs"),Y=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),J=["id"],K=["xmlns","viewBox"],Q={key:0},Z=["x","y","height","width","fill","stroke"],ee=["x","y","height","width","rx","fill","stroke","stroke-width"],te=["x","y","height","width","fill","stroke","stroke-width"],ae=["x","y","font-size","font-weight","fill"],le=["x","y","height","width","rx","fill","stroke","stroke-width"],re={key:3},oe=["x","y","fill","font-size","font-weight"],se={key:4},ne=["x1","x2","y1","y2","stroke"],ue={key:4,class:"vue-data-ui-watermark"},ie={class:"vue-ui-bullet-legend-item",dir:"auto"},ce={style:{"margin-right":"2px"}},he={__name:"vue-ui-bullet",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(F,{expose:V}){const n=F,{vue_ui_bullet:I}=s.useConfig(),f=e.ref(null),z=e.ref(null),w=e.ref(0),H=e.ref(null),O=e.ref(0),y=e.computed({get:()=>!0,set:a=>a}),d=e.computed(()=>n.dataset.segments?Array.isArray(n.dataset.segments)?n.dataset.segments.length?!0:(console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
2
-
3
- segments: [
4
- {
5
- name: string;
6
- from: number;
7
- to: number;
8
- color?: string;
9
- },
10
- {...}
11
- ]
12
- `),!1):(console.warn(`VueUiBullet: dataset segments must be an array of objects with this datastructure:
13
-
14
- segments: [
15
- {
16
- name: string;
17
- from: number;
18
- to: number;
19
- color?: string;
20
- },
21
- {...}
22
- ]
23
- `),!1):!1);e.onMounted(x);function x(){s.objectIsEmpty(n.dataset)?s.error({componentName:"VueUiBullet",type:"dataset"}):d.value&&n.dataset.segments.forEach((a,o)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","from","to"]}).forEach(l=>{y.value=!1,s.error({componentName:"VueUiBullet segment",type:"datasetSerieAttribute",property:l,index:o})})}),t.value.style.chart.animation.show&&C(n.dataset.value||0)}const p=e.ref(s.createUid());function B(){const a=A.useNestedProp({userConfig:n.config,defaultConfig:I});return a.theme?{...A.useNestedProp({userConfig:s.themes.vue_ui_bullet[a.theme]||n.config,defaultConfig:a})}:a}const t=e.computed({get:()=>B(),set:a=>a});e.watch(()=>n.config,a=>{t.value=B(),x(),w.value+=1},{deep:!0});const r=e.computed(()=>{const a=t.value.style.chart.height,o=t.value.style.chart.width,l=t.value.style.chart.padding.left,h=o-t.value.style.chart.padding.right,g=t.value.style.chart.padding.top,i=a-t.value.style.chart.padding.bottom;return{height:a,width:o,left:l,right:h,top:g,bottom:i,chartWidth:h-l,chartHeight:i-g}}),T=e.computed(()=>{if(!d.value)return[];const a=[];for(let o=0;o<n.dataset.segments.length;o+=1)a.push(s.lightenHexColor(t.value.style.chart.segments.baseColor,o/n.dataset.segments.length));return a}),k=e.computed(()=>d.value?{min:Math.min(...n.dataset.segments.map(a=>a.from)),max:Math.max(...n.dataset.segments.map(a=>a.to))}:{min:0,max:1}),u=e.ref(M());e.watch(()=>n.dataset,a=>{t.value.style.chart.animation.show?C(a.value||0):u.value=a.value||0},{deep:!0});function M(){return t.value.style.chart.animation.show?k.value.min:n.dataset.value||0}const _=e.ref(null);function C(a){const o=Math.abs(a-u.value)/t.value.style.chart.animation.animationFrames;function l(){u.value<a?u.value=Math.min(u.value+o,a):u.value>a&&(u.value=Math.max(u.value-o,a)),u.value!==a&&(_.value=requestAnimationFrame(l))}l()}e.onBeforeUnmount(()=>{cancelAnimationFrame(_.value)});const c=e.computed(()=>{if(!d.value)return[];const a=s.calculateNiceScale(k.value.min,k.value.max,t.value.style.chart.segments.ticks.divisions),o=a.min>=0?0:Math.abs(a.min),l={x:r.value.left+(n.dataset.target+o)/(a.max+o)*r.value.chartWidth-t.value.style.chart.target.width/2},h={width:(u.value+o)/(a.max+o)*r.value.chartWidth},g=a.ticks.map(i=>({value:i,y:r.value.bottom+t.value.style.chart.segments.dataLabels.fontSize+3+t.value.style.chart.segments.dataLabels.offsetY,x:r.value.left+(i+o)/(a.max+o)*r.value.chartWidth}));return{scale:a,target:l,value:h,ticks:g,chunks:n.dataset.segments.map((i,R)=>({...i,color:i.color?s.convertColorToHex(i.color):T.value[R],x:r.value.left+r.value.chartWidth*((i.from+o)/(a.max+o)),y:r.value.top,height:r.value.chartHeight,width:r.value.chartWidth*(Math.abs(i.to-i.from)/(a.max+o))}))}}),L=e.computed(()=>c.value.chunks.map(a=>{const o=s.applyDataLabel(t.value.style.chart.segments.dataLabels.formatter,a.from,s.dataLabel({p:t.value.style.chart.segments.dataLabels.prefix,v:a.from,s:t.value.style.chart.segments.dataLabels.suffix,r:t.value.style.chart.segments.dataLabels.rounding})),l=s.applyDataLabel(t.value.style.chart.segments.dataLabels.formatter,a.to,s.dataLabel({p:t.value.style.chart.segments.dataLabels.prefix,v:a.to,s:t.value.style.chart.segments.dataLabels.suffix,r:t.value.style.chart.segments.dataLabels.rounding}));return{...a,shape:"square",value:`${o} - ${l}`}})),q=e.computed(()=>({cy:"bullet-div-legend",backgroundColor:"transparent",color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:6,fontWeight:t.value.style.chart.legend.bold?"bold":""})),{isPrinting:P,isImaging:N,generatePdf:S,generateImage:E}=$.usePrinter({elementId:`bullet_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-bullet"}),v=e.ref(!1);function D(a){v.value=a,O.value+=1}function W(){return c.value}const m=e.ref(!1);function b(){m.value=!m.value}return V({getData:W,generatePdf:S,generateImage:E,toggleAnnotator:b}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"bulletChart",ref:f,class:e.normalizeClass(`vue-ui-bullet ${v.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%;background:${t.value.style.chart.backgroundColor}`),id:`bullet_${p.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(X.PenAndPaper,{key:0,parent:f.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:m.value,onClose:b},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;"},[(e.openBlock(),e.createBlock(U._sfc_main,{lineHeight:"1.3rem",key:`title_${w.value}`,config:{title:{cy:"bullet-div-title",...t.value.style.chart.title},subtitle:{cy:"bullet-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value?(e.openBlock(),e.createBlock($.UserOptions,{key:2,ref:"details",backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(P),isImaging:e.unref(N),uid:p.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:!1,hasTable:!1,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:v.value,chartElement:f.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:m.value,onToggleFullscreen:D,onGeneratePdf:e.unref(S),onGenerateImage:e.unref(E),onToggleAnnotator:b},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:h})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:h})),void 0,!0)]),key:"2"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:h})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:h})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":v.value,"vue-data-ui-fulscreen--off":!v.value,"vue-ui-bullet-svg":!0}),viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:e.normalizeStyle(`width: 100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(G._sfc_main),d.value?(e.openBlock(),e.createElementBlock("g",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.chunks,l=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,height:l.height,width:l.width,fill:l.color,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,Z))),256)),t.value.style.chart.target.onTop?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,x:c.value.target.x,y:r.value.top+(r.value.chartHeight-r.value.chartHeight*t.value.style.chart.target.heightRatio)/2,height:r.value.chartHeight*t.value.style.chart.target.heightRatio,width:t.value.style.chart.target.width,rx:t.value.style.chart.target.rounded?t.value.style.chart.target.width/2:0,fill:t.value.style.chart.target.color,stroke:t.value.style.chart.target.stroke,"stroke-width":t.value.style.chart.target.strokeWidth},null,8,ee)),e.createElementVNode("rect",{x:r.value.left,y:r.value.top+(r.value.chartHeight-r.value.chartHeight*t.value.style.chart.valueBar.heightRatio)/2,height:r.value.chartHeight*t.value.style.chart.valueBar.heightRatio,width:c.value.value.width,fill:t.value.style.chart.valueBar.color,stroke:t.value.style.chart.valueBar.stroke,"stroke-width":t.value.style.chart.valueBar.strokeWidth},null,8,te),t.value.style.chart.valueBar.label.show?(e.openBlock(),e.createElementBlock("text",{key:1,x:r.value.left+c.value.value.width,y:r.value.top-6+t.value.style.chart.valueBar.label.offsetY,"font-size":t.value.style.chart.valueBar.label.fontSize,"font-weight":t.value.style.chart.valueBar.label.bold?"bold":"normal",fill:t.value.style.chart.valueBar.label.color,"text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.segments.dataLabels.formatter,u.value,e.unref(s.dataLabel)({p:t.value.style.chart.segments.dataLabels.prefix,v:u.value,s:t.value.style.chart.segments.dataLabels.suffix,r:t.value.style.chart.segments.dataLabels.rounding}))),9,ae)):e.createCommentVNode("",!0),t.value.style.chart.target.onTop?(e.openBlock(),e.createElementBlock("rect",{key:2,x:c.value.target.x,y:r.value.top+(r.value.chartHeight-r.value.chartHeight*t.value.style.chart.target.heightRatio)/2,height:r.value.chartHeight*t.value.style.chart.target.heightRatio,width:t.value.style.chart.target.width,rx:t.value.style.chart.target.rounded?t.value.style.chart.target.width/2:0,fill:t.value.style.chart.target.color,stroke:t.value.style.chart.target.stroke,"stroke-width":t.value.style.chart.target.strokeWidth},null,8,le)):e.createCommentVNode("",!0),t.value.style.chart.segments.dataLabels.show?(e.openBlock(),e.createElementBlock("g",re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,l=>(e.openBlock(),e.createElementBlock("text",{x:l.x,y:l.y,"text-anchor":"middle",fill:t.value.style.chart.segments.dataLabels.color,"font-size":t.value.style.chart.segments.dataLabels.fontSize+"px","font-weight":t.value.style.chart.segments.dataLabels.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.segments.dataLabels.formatter,l.value,e.unref(s.dataLabel)({p:t.value.style.chart.segments.dataLabels.prefix,v:l.value,s:t.value.style.chart.segments.dataLabels.suffix,r:t.value.style.chart.segments.dataLabels.rounding}))),9,oe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.segments.dataLabels.show&&t.value.style.chart.segments.ticks.show?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.ticks,l=>(e.openBlock(),e.createElementBlock("line",{x1:l.x,x2:l.x,y1:r.value.bottom,y2:r.value.bottom+3,stroke:t.value.style.chart.segments.ticks.stroke,"stroke-width":1,"stroke-linecap":"round"},null,8,ne))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:r.value},void 0,!0)],14,K)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ue,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(P)||e.unref(N)})),void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartLegend",ref:H},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(j.Legend,{key:0,clickable:!1,legendSet:L.value,config:q.value},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",ie,[e.createElementVNode("span",ce,e.toDisplayString(l.name)+":",1),e.createElementVNode("span",null,e.toDisplayString(l.value),1)])]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:L.value},void 0,!0)],512)],14,J))}},de=Y._export_sfc(he,[["__scopeId","data-v-b87e4949"]]);exports.default=de;
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-FfZRtJ6A.cjs"),le=require("./useResponsive-B3TrDDIG.cjs"),ke=require("./Title-Co5jI5ed.cjs"),oe=require("./usePrinter-BCAFeO_J.cjs"),xe=require("./Tooltip-Bl6W8Zn7.cjs"),be=require("./DataTable-DJzhv96s.cjs"),we=require("./vue-ui-skeleton-Djv08J67.cjs"),Ce=require("./Slicer-CL0tP5a5.cjs"),Ne=require("./vue-ui-accordion-xXgqfR2l.cjs"),ae=require("./useNestedProp-q7byAAIJ.cjs"),$e=require("./PackageVersion-DVZtsuy4.cjs"),_e=require("./PenAndPaper-CyXm-yVL.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Ve=["xmlns","viewBox"],Ee={key:0},ze=["id"],Ae=["stop-color"],Te=["stop-color"],Fe=["stop-color"],Le=["id"],Pe=["stop-color"],Re=["stop-color"],Oe=["stop-color"],Ie={key:0},Me=["x1","x2","y1","y2","stroke","stroke-width"],Ue=["x1","x2","y1","y2","stroke","stroke-width"],qe={key:1},De=["x1","x2","y1","y2","stroke","stroke-width"],We=["x","y","font-size","fill","font-weight"],Ge={key:2},He=["transform","text-anchor","font-size","fill","font-weight"],je=["x1","x2","y1","y2","stroke","stroke-width"],Xe={key:0},Ye=["cx","cy","r","fill"],Je=["cx","cy","r","fill"],Ke={key:1},Qe=["x1","x2","y1","y2","stroke","stroke-width"],Ze=["x1","x2","y1","y2","stroke","stroke-width"],et=["x","y","height","width","fill","rx"],tt=["x","y","height","width","fill","rx","stroke","stroke-width"],lt=["x","y","height","width","fill","onMouseover"],ot={key:4,class:"vue-data-ui-watermark"},at=["innerHTML"],nt={__name:"vue-ui-candlestick",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(f,{expose:ne}){const h=f,{vue_ui_candlestick:ue}=u.useConfig(),k=e.computed(()=>!!h.dataset&&h.dataset.length),y=e.ref(u.createUid()),re=e.ref(null),S=e.ref(!1),V=e.ref(""),E=e.ref(void 0),L=e.ref(0),m=e.ref(null),P=e.ref(null),R=e.ref(null),O=e.ref(null),b=e.ref(0),I=e.ref(0),M=e.ref(0),t=e.computed({get:()=>U(),set:l=>l});function U(){const l=ae.useNestedProp({userConfig:h.config,defaultConfig:ue});return l.theme?{...ae.useNestedProp({userConfig:u.themes.vue_ui_candlestick[l.theme]||h.config,defaultConfig:l})}:l}e.watch(()=>h.config,l=>{t.value=U(),q(),b.value+=1,M.value+=1,I.value+=1},{deep:!0}),e.watch(()=>h.dataset,l=>{d.value.start=0,d.value.end=l.length,b.value+=1},{deep:!0});const i=e.ref({height:t.value.style.height,width:t.value.style.width,xAxisFontSize:t.value.style.layout.grid.xAxis.dataLabels.fontSize,yAxisFontSize:t.value.style.layout.grid.yAxis.dataLabels.fontSize}),w=e.ref(null);e.onMounted(()=>{q()});function q(){if(u.objectIsEmpty(h.dataset)&&u.error({componentName:"VueUiCandlestick",type:"dataset"}),t.value.responsive){const l=le.throttle(()=>{const{width:n,height:o}=le.useResponsive({chart:m.value,title:t.value.style.title.text?P.value:null,slicer:O.value,legend:R.value});i.value.width=n,i.value.height=o,i.value.xAxisFontSize=u.translateSize({relator:Math.min(n,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.xAxis.dataLabels.fontSize,threshold:6,fallback:6}),i.value.yAxisFontSize=u.translateSize({relator:Math.min(n,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.yAxis.dataLabels.fontSize,threshold:6,fallback:6})});w.value=new ResizeObserver(l),w.value.observe(m.value.parentNode)}}e.onBeforeUnmount(()=>{w.value&&w.value.disconnect()});const{isPrinting:D,isImaging:W,generatePdf:G,generateImage:H}=oe.usePrinter({elementId:`vue-ui-candlestick_${y.value}`,fileName:t.value.style.title.text||"vue-ui-candlestick"}),p=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),r=e.computed(()=>{const{top:l,right:n,bottom:o,left:a}=t.value.style.layout.padding;return{top:l,right:i.value.width-n,left:a,bottom:i.value.height-o,width:i.value.width-a-n,height:i.value.height-l-o}}),z=e.computed(()=>h.dataset.length),d=e.ref({start:0,end:z.value}),j=e.computed(()=>h.dataset.slice(d.value.start,d.value.end)),A=e.computed(()=>(h.dataset.forEach((l,n)=>{[null,void 0].includes(l[0])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"period (index 0)",index:n}),[null,void 0].includes(l[1])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"open (index 1)",index:n}),[null,void 0].includes(l[2])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"high (index 2)",index:n}),[null,void 0].includes(l[3])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"low (index 3)",index:n}),[null,void 0].includes(l[4])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"last (index 4)",index:n}),[null,void 0].includes(l[5])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"volume (index 5)",index:n})}),j.value.map(l=>({period:l[0],open:l[1],high:l[2],low:l[3],last:l[4],volume:l[5]})))),s=e.computed(()=>r.value.width/j.value.length),X=e.computed(()=>({max:Math.max(...A.value.map(l=>l.high)),min:0})),g=e.computed(()=>u.calculateNiceScale(X.value.min,X.value.max,t.value.style.layout.grid.yAxis.dataLabels.steps));function C(l,n){return{...l,x:u.checkNaN(r.value.left+n*s.value+s.value/2),y:u.checkNaN(r.value.top+(1-l/g.value.max)*r.value.height),value:u.checkNaN(l)}}const c=e.computed(()=>A.value.map((l,n)=>{const o=C(l.open,n),a=C(l.high,n),v=C(l.low,n),_=C(l.last,n),B=l.last>l.open;return{period:l.period,open:o,high:a,low:v,last:_,volume:l.volume,isBullish:B}}));function se(l){return u.checkNaN(l/g.value.max)}const ie=e.computed(()=>g.value.ticks.map(l=>({y:r.value.bottom-r.value.height*se(l),value:u.checkNaN(l)}))),de=e.computed(()=>A.value.map(l=>l.period)),T=e.ref(null);function ce(l,n){E.value=l,T.value={datapoint:n,seriesIndex:l,series:c.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(u.isFunction(o)&&u.functionReturnsString(()=>o({seriesIndex:l,datapoint:n,series:c.value,config:t.value})))V.value=o({seriesIndex:l,datapoint:n,series:c.value,config:t.value});else if(t.value.style.tooltip.show){let a="";const{period:v,open:_,high:B,low:Q,last:Z,volume:ee,isBullish:te}=c.value[l],{period:rt,open:he,high:pe,low:fe,last:ge,volume:me}=t.value.translations;a+=`<div><svg style="margin-right:6px" viewBox="0 0 12 12" height="12" width="12"><rect x="0" y="0" height="12" width="12" rx="${t.value.style.layout.candle.borderRadius*3}" stroke="${t.value.style.layout.candle.stroke}" stroke-width="${t.value.style.layout.candle.strokeWidth}"
2
- fill="${t.value.style.layout.candle.gradient.show?te?`url(#bullish_gradient_${y.value})`:`url(#bearish_gradient_${y.value})`:te?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg>${v}</div>`,a+=`${me} : <b>${isNaN(ee)?"-":Number(ee.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()}</b>`,a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,a+=`<div>${he}: <b>${t.value.style.tooltip.prefix} ${isNaN(_.value)?"-":Number(_.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+=`<div>${pe}: <b>${t.value.style.tooltip.prefix} ${isNaN(B.value)?"-":Number(B.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+=`<div>${fe}: <b>${t.value.style.tooltip.prefix} ${isNaN(Q.value)?"-":Number(Q.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+=`<div>${ge}: <b>${t.value.style.tooltip.prefix} ${isNaN(Z.value)?"-":Number(Z.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+="</div>",V.value=`<div style="text-align:right">${a}</div>`}S.value=!0}function ve(){d.value={start:0,end:z.value},b.value+=1}function Y(){e.nextTick(()=>{const l=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume],n=c.value.map(v=>[v.period,v.open.value,v.high.value,v.low.value,v.last.value,v.volume]),o=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(n),a=u.createCsvContent(o);u.downloadCsv({csvContent:a,title:t.value.style.title.text||"vue-ui-candlestick"})})}const N=e.computed(()=>{const l=c.value.map(a=>[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" height="12" width="12" style="margin-right: 6px"><rect x="0" y="0" height="12" width="12" :rx="${t.value.style.layout.candle.borderRadius*3}" fill="${t.value.style.layout.candle.gradient.show?a.isBullish?`url(#bullish_gradient_${y.value}`:`url(#bearish_gradient_${y.value})`:a.isBullish?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg> ${a.period}`,`${t.value.table.td.prefix} ${isNaN(a.open.value)?"-":Number(a.open.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(a.high.value)?"-":Number(a.high.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(a.low.value)?"-":Number(a.low.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(a.last.value)?"-":Number(a.last.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${isNaN(a.volume)?"-":a.volume.toLocaleString()}`]),n={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},o=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume];return{head:o,body:l,config:n,colNames:o}}),x=e.ref(!1);function ye(l){x.value=l,L.value+=1}function J(){p.value.showTable=!p.value.showTable}function K(){p.value.showTooltip=!p.value.showTooltip}const $=e.ref(!1);function F(){$.value=!$.value}return ne({generatePdf:G,generateCsv:Y,generateImage:H,toggleTable:J,toggleTooltip:K,toggleAnnotator:F}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"candlestickChart",ref:m,class:e.normalizeClass(`vue-ui-candlestick ${x.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`position:relative;font-family:${t.value.style.fontFamily}; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}; ${t.value.responsive?"height: 100%":""}`),id:`vue-ui-candlestick_${y.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(_e.PenAndPaper,{key:0,parent:m.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:$.value,onClose:F},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:P,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ke._sfc_main,{key:`title_${M.value}`,config:{title:{cy:"candlestick-div-title",...t.value.style.title},subtitle:{cy:"candlestick-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value?(e.openBlock(),e.createBlock(oe.UserOptions,{ref_key:"details",ref:re,key:`user_options_${L.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(W),isPrinting:e.unref(D),uid:y.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:x.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(G),onGenerateCsv:Y,onGenerateImage:e.unref(H),onToggleTable:J,onToggleTooltip:K,onToggleAnnotator:F},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:a})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:a})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:a})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:a})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${i.value.height<=0?10:i.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode($e._sfc_main),c.value.length>0?(e.openBlock(),e.createElementBlock("g",Ee,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`bearish_gradient_${y.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bearish},null,8,Ae),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bearish,.02)}DE`},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bearish,.05)}66`},null,8,Fe)],8,ze),e.createElementVNode("linearGradient",{id:`bullish_gradient_${y.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bullish},null,8,Pe),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bullish,.02)}DE`},null,8,Re),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bullish,.05)}66`},null,8,Oe)],8,Le)]),t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ie,[e.createElementVNode("line",{x1:r.value.left,x2:r.value.left,y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Me),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ue)])):e.createCommentVNode("",!0),t.value.style.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[o.value>=g.value.min&&o.value<=g.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:r.value.left,x2:r.value.left-5,y1:o.y,y2:o.y,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,De)):e.createCommentVNode("",!0),o.value>=g.value.min&&o.value<=g.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:r.value.left-8+t.value.style.layout.grid.yAxis.dataLabels.offsetX,y:o.y+i.value.yAxisFontSize/3,"font-size":i.value.yAxisFontSize,"text-anchor":"end",fill:t.value.style.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.prefix)+" "+e.toDisplayString(e.unref(u.canShowValue)(o.value)?o.value.toFixed(t.value.style.layout.grid.yAxis.dataLabels.roundingValue):"")+" "+e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.suffix),9,We)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),t.value.style.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(de.value,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{transform:`translate(${r.value.left+s.value*a+s.value/2}, ${r.value.bottom+i.value.xAxisFontSize*2+t.value.style.layout.grid.xAxis.dataLabels.offsetY}), rotate(${t.value.style.layout.grid.xAxis.dataLabels.rotation})`,"text-anchor":t.value.style.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":i.value.xAxisFontSize,fill:t.value.style.layout.grid.xAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.xAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(o),9,He)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("line",{x1:o.open.x,x2:o.open.x,y1:o.high.y,y2:o.low.y,stroke:t.value.style.layout.wick.stroke,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,je),t.value.style.layout.wick.extremity.shape==="circle"?(e.openBlock(),e.createElementBlock("g",Xe,[e.createElementVNode("circle",{cx:o.high.x,cy:o.high.y,r:t.value.style.layout.wick.extremity.size==="auto"?s.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,Ye),e.createElementVNode("circle",{cx:o.low.x,cy:o.low.y,r:t.value.style.layout.wick.extremity.size==="auto"?s.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,Je)])):e.createCommentVNode("",!0),t.value.style.layout.wick.extremity.shape==="line"?(e.openBlock(),e.createElementBlock("g",Ke,[e.createElementVNode("line",{x1:o.high.x-(t.value.style.layout.wick.extremity.size==="auto"?s.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:o.high.x+(t.value.style.layout.wick.extremity.size==="auto"?s.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:o.high.y,y2:o.high.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,Qe),e.createElementVNode("line",{x1:o.low.x-(t.value.style.layout.wick.extremity.size==="auto"?s.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:o.low.x+(t.value.style.layout.wick.extremity.size==="auto"?s.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:o.low.y,y2:o.low.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,Ze)])):e.createCommentVNode("",!0)]))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,a)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-s.value/2+s.value*(1-t.value.style.layout.candle.widthRatio)/2,y:o.isBullish?o.last.y:o.open.y,height:Math.abs(o.last.y-o.open.y)<=0?1e-4:Math.abs(o.last.y-o.open.y),width:s.value*t.value.style.layout.candle.widthRatio<=0?1e-4:s.value*t.value.style.layout.candle.widthRatio,fill:t.value.style.layout.candle.gradient.underlayer,rx:t.value.style.layout.candle.borderRadius,stroke:"none"},null,8,et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,a)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-s.value/2+s.value*(1-t.value.style.layout.candle.widthRatio)/2,y:o.isBullish?o.last.y:o.open.y,height:Math.abs(o.last.y-o.open.y)<=0?1e-4:Math.abs(o.last.y-o.open.y),width:s.value*t.value.style.layout.candle.widthRatio<=0?1e-4:s.value*t.value.style.layout.candle.widthRatio,fill:o.isBullish?t.value.style.layout.candle.gradient.show?`url(#bullish_gradient_${y.value})`:t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.gradient.show?`url(#bearish_gradient_${y.value})`:t.value.style.layout.candle.colors.bearish,rx:t.value.style.layout.candle.borderRadius,stroke:t.value.style.layout.candle.stroke,"stroke-width":t.value.style.layout.candle.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,tt))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,a)=>(e.openBlock(),e.createElementBlock("rect",{x:r.value.left+a*s.value,y:r.value.top,height:r.value.height<=0?1e-4:r.value.height,width:s.value<=0?1e-4:s.value,fill:E.value===a?e.unref(u.setOpacity)(t.value.style.layout.selector.color,t.value.style.layout.selector.opacity):"transparent",onMouseover:v=>ce(a,o),onMouseleave:n[0]||(n[0]=v=>{E.value=void 0,S.value=!1})},null,40,lt))),256))])])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,Ve)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ot,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(D)||e.unref(W)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:5,config:{type:"candlesticks",style:{backgroundColor:t.value.style.backgroundColor,candlesticks:{axis:{color:"#CCCCCC"},candle:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.zoom.show&&k.value?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"chartSlicer",ref:O},[(e.openBlock(),e.createBlock(Ce.Slicer,{key:`slicer_${b.value}`,background:t.value.style.zoom.color,borderColor:t.value.style.backgroundColor,fontSize:t.value.style.zoom.fontSize,useResetSlot:t.value.style.zoom.useResetSlot,labelLeft:f.dataset[d.value.start]?f.dataset[d.value.start][0]:f.dataset[0][0],labelRight:f.dataset[d.value.end-1]?f.dataset[d.value.end-1][0]:f.dataset.at(-1)[0],textColor:t.value.style.color,inputColor:t.value.style.zoom.color,selectColor:t.value.style.zoom.highlightColor,max:z.value,min:0,valueStart:d.value.start,valueEnd:d.value.end,start:d.value.start,"onUpdate:start":n[1]||(n[1]=o=>d.value.start=o),end:d.value.end,"onUpdate:end":n[2]||(n[2]=o=>d.value.end=o),onReset:ve},{"reset-action":e.withCtx(({reset:o})=>[e.renderSlot(l.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:o})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"]))],512)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartLegend",ref:R},[e.renderSlot(l.$slots,"legend",{legend:c.value},void 0,!0)],512),e.createVNode(xe._sfc_main,{show:p.value.showTooltip&&S.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:m.value,content:V.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),k.value?(e.openBlock(),e.createBlock(Ne.default,{key:7,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(be.DataTable,{key:`table_${I.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:n[3]||(n[3]=o=>p.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createElementVNode("div",{innerHTML:o},null,8,at)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Se))}},ut=Be._export_sfc(nt,[["__scopeId","data-v-3c46f286"]]);exports.default=ut;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-FfZRtJ6A.cjs"),ae=require("./useNestedProp-q7byAAIJ.cjs"),j=require("./usePrinter-BCAFeO_J.cjs"),ne=require("./vue-ui-skeleton-Djv08J67.cjs"),le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),re=["id"],ie=["height"],ue=["data-cell","height"],se={__name:"vue-ui-carousel-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(p,{expose:X}){const l=p,{vue_ui_carousel_table:_}=u.useConfig(),A=e.ref(u.createUid()),I=e.ref(!1),g=e.ref(!!l.dataset);e.onMounted(()=>{P()});function P(){u.objectIsEmpty(l.dataset)?u.error({componentName:"VueUiCarouselTable",type:"dataset"}):((!l.dataset.head||u.objectIsEmpty(l.dataset.head))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"head"}),g.value=!1),(!l.dataset.body||u.objectIsEmpty(l.dataset.body))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"body"}),g.value=!1))}const t=e.computed({get:()=>F(),set:o=>o});function F(){return ae.useNestedProp({userConfig:l.config,defaultConfig:_})}e.watch(()=>l.config,o=>{t.value=F(),P()},{deep:!0}),e.watch(()=>l.dataset,o=>{S()},{deep:!0});const{isPrinting:N,isImaging:O,generatePdf:J,generateImage:R}=j.usePrinter({elementId:`carousel-table_${A.value}`,fileName:t.value.caption.text||"vue-ui-carousel-table"}),s=e.ref({showAnimation:t.value.animation.use}),i=e.ref(null),V=e.ref(null),b=e.ref(null),y=e.ref(null),C=e.ref(0),B=e.ref(0),$=e.ref(!1),k=e.ref(null),v=e.ref(null),T=e.ref(0);function S(){k.value&&(v.value={elements:k.value.getElementsByTagName("tr"),heights:Array.from(k.value.getElementsByTagName("tr")).map(o=>o.getBoundingClientRect().height)})}e.onMounted(S);const K=e.computed(()=>!v.value||!v.value.heights.length?0:Math.max(...v.value.heights)+C.value+B.value),Q=e.computed(()=>l.dataset.body?t.value.tbody.tr.visible<=l.dataset.body.length?t.value.tbody.tr.visible:l.dataset.body.length:0),W=e.computed(()=>(t.value.tbody.tr.height+t.value.tbody.tr.td.padding.top+t.value.tbody.tr.td.padding.bottom+t.value.tbody.tr.border.size*2)*Q.value+C.value+B.value),w=e.ref(0),x=e.ref(null),f=e.ref(0),m=e.ref(!1),L=e.ref(0);e.onMounted(()=>{b.value&&(C.value=b.value.getBoundingClientRect().height),y.value&&(B.value=y.value.getBoundingClientRect().height),s.value.showAnimation&&v.value&&M()}),e.onMounted(()=>{if(i.value){let a=function(){const r=o.getBoundingClientRect().bottom;n.forEach(d=>{d.getBoundingClientRect().top<r?d.style.visibility="hidden":d.style.visibility="visible"})};const o=i.value.querySelector("thead"),n=Array.from(k.value.querySelectorAll("tr"));i.value.addEventListener("scroll",a),a(),e.onBeforeUnmount(()=>{i.value.removeEventListener("scroll",a)})}});function Y(o){I.value=o,L.value+=1}function M(){!x.value&&!m.value&&(x.value=requestAnimationFrame(q))}function Z(){if(!i.value)return!1;const{scrollTop:o,scrollHeight:n,clientHeight:a}=i.value;return o+a>=n}function q(o){if(m.value)return;f.value||(f.value=o),o-f.value>=t.value.animation.speedMs&&(w.value+=v.value.heights[T.value],(Z()||T.value>=v.value.heights.length)&&(w.value=0,T.value=-1),T.value+=1,i.value&&i.value.scrollTo({top:w.value,behavior:"smooth"}),f.value=o),x.value=requestAnimationFrame(q)}function c(){m.value=!0,cancelAnimationFrame(x.value),x.value=null}e.onBeforeUnmount(c);function h(){!m.value||!s.value.showAnimation||(m.value=!1,f.value=0,M())}function ee(){t.value.animation.pauseOnHover&&c()}const E=e.ref(null);function te(){c(),clearTimeout(E.value)}function H(){clearTimeout(E.value),E.value=setTimeout(h,1e3)}e.watch(()=>t.value.animation.use,o=>{o?(s.value.showAnimation=!0,h()):(s.value.showAnimation=!1,c())});const oe=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{const o=new ResizeObserver(n=>{n.forEach(a=>{$.value=a.contentRect.width<oe.value}),C.value=b.value?b.value.getBoundingClientRect().height:0,B.value=y.value?y.value.getBoundingClientRect().height:0,T.value=0,e.nextTick(()=>{c(),f.value=0,w.value=0,S(),h()})});i.value&&o.observe(i.value)});function U(){J()}function D(){s.value.showAnimation=!s.value.showAnimation,s.value.showAnimation?h():c()}function G(){e.nextTick(()=>{const o=l.dataset.head.map((r,d)=>[[l.dataset.body[d]]]),n=[[t.value.caption.text],[l.dataset.head.map(r=>[r])]].concat(o),a=u.createCsvContent(n);u.downloadCsv({csvContent:a,title:t.value.caption.text||"vue-ui-carousel-table"})})}return X({pauseAnimation:c,resumeAnimation:h,toggleAnimation:D,generateCsv:G,generatePdf:U,generateImage:R}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:{position:"relative",overflow:"visible"},ref_key:"chartContainer",ref:V},[e.createElementVNode("div",{ref_key:"tableContainer",ref:i,id:`carousel-table_${A.value}`,style:e.normalizeStyle({height:e.unref(N)||e.unref(O)?"auto":`${Math.max(W.value,K.value)}px`,containerType:"inline-size",position:"relative",overflow:"auto",fontFamily:t.value.fontFamily}),class:e.normalizeClass({"vue-ui-responsive":$.value,"is-playing":!m.value}),onMouseover:n[0]||(n[0]=a=>ee()),onMouseleave:n[1]||(n[1]=a=>h()),onTouchstart:n[2]||(n[2]=a=>te()),onTouchend:n[3]||(n[3]=a=>H()),onTouchcancel:n[4]||(n[4]=a=>H())},[g.value?(e.openBlock(),e.createElementBlock("table",{key:0,class:"vue-data-ui-carousel-table",style:e.normalizeStyle({...t.value.style,border:`${t.value.border.size}px solid ${t.value.border.color}`,width:"100%",borderCollapse:"collapse"})},[e.createElementVNode("caption",{ref_key:"caption",ref:b,class:"vue-data-ui-carousel-table-caption",style:e.normalizeStyle({...t.value.caption.style,fontFamily:"inherit",position:"sticky",top:0,zIndex:2,paddingTop:t.value.caption.padding.top+"px",paddingRight:t.value.caption.padding.right+"px",paddingBottom:t.value.caption.padding.bottom+"px",paddingLeft:t.value.caption.padding.left+"px",boxShadow:$.value?t.value.thead.tr.style.boxShadow:"none",minHeight:"36px"})},[e.createTextVNode(e.toDisplayString(t.value.caption.text&&!o.$slots.caption?t.value.caption.text:"")+" ",1),e.renderSlot(o.$slots,"caption",{},void 0,!0)],4),e.createElementVNode("thead",{style:e.normalizeStyle({...t.value.thead.style,position:"sticky",top:`${C.value}px`,zIndex:1})},[e.createElementVNode("tr",{ref_key:"tableRow",ref:y,role:"row",style:e.normalizeStyle({...t.value.thead.tr.style,border:t.value.thead.tr.border.size?`${t.value.thead.tr.border.size}px solid ${t.value.thead.tr.border.color}`:"none",boxShadow:$.value?"none":t.value.thead.tr.style.boxShadow}),height:`${t.value.thead.tr.height}px`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.dataset.head,(a,r)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",key:`th_${r}`,style:e.normalizeStyle({...t.value.thead.tr.th.style,border:t.value.thead.tr.th.border.size?`${t.value.thead.tr.th.border.size}px solid ${t.value.thead.tr.th.border.color}`:"none",paddingTop:t.value.thead.tr.th.padding.top+"px",paddingRight:t.value.thead.tr.th.padding.right+"px",paddingBottom:t.value.thead.tr.th.padding.bottom+"px",paddingLeft:t.value.thead.tr.th.padding.left+"px"})},[e.createTextVNode(e.toDisplayString(o.$slots.th?"":a)+" ",1),e.renderSlot(o.$slots,"th",e.normalizeProps(e.guardReactiveProps({th:a,colIndex:r})),void 0,!0)],4))),128))],12,ie)],4),p.dataset.body&&p.dataset.head?(e.openBlock(),e.createElementBlock("tbody",{key:0,ref_key:"tbody",ref:k,style:e.normalizeStyle({clipPath:"inset(0,0,0,0)"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.dataset.body,(a,r)=>(e.openBlock(),e.createElementBlock("tr",{style:e.normalizeStyle({...t.value.tbody.tr.style,border:`${t.value.tbody.tr.border.size}px solid ${t.value.tbody.tr.border.color}`,verticalAlign:"middle"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(d,z)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":p.dataset.head[z]||"",style:e.normalizeStyle({...t.value.tbody.tr.td.style,border:`${t.value.tbody.tr.td.border.size}px solid ${t.value.tbody.tr.td.border.color}`,backgroundColor:e.unref(u.setOpacity)(t.value.tbody.tr.td.style.backgroundColor,r%2===0&&t.value.tbody.tr.td.alternateColor?t.value.tbody.tr.td.alternateOpacity*100:100),paddingTop:t.value.tbody.tr.td.padding.top+"px",paddingRight:t.value.tbody.tr.td.padding.right+"px",paddingBottom:t.value.tbody.tr.td.padding.bottom+"px",paddingLeft:t.value.tbody.tr.td.padding.left+"px",verticalAlign:"middle"}),height:`${t.value.tbody.tr.height}px`},[e.createTextVNode(e.toDisplayString(o.$slots.td?"":d)+" ",1),e.renderSlot(o.$slots,"td",e.normalizeProps(e.guardReactiveProps({td:d,rowIndex:r,colIndex:z})),void 0,!0)],12,ue))),256))],4))),256))],4)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],46,re),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ne.default,{key:0,config:{type:"table"}})),t.value.userOptions.show&&g.value?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_option_${L.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isPrinting:e.unref(N),isImaging:e.unref(O),uid:A.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:!1,hasLabel:!1,hasAnimation:t.value.userOptions.buttons.animation,isAnimation:!s.value.showAnimation,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:I.value,chartElement:V.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},zIndex:3,offsetX:12,onGeneratePdf:U,onGenerateCsv:G,onGenerateImage:e.unref(R),onToggleAnimation:D,onToggleFullscreen:Y},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionAnimation?{name:"optionAnimation",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionAnimation",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasAnimation","isAnimation","hasFullscreen","isFullscreen","chartElement","position","titles","onGenerateImage"])):e.createCommentVNode("",!0)],512))}},de=le._export_sfc(se,[["__scopeId","data-v-9f07c041"]]);exports.default=de;
@@ -1,6 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-FfZRtJ6A.cjs"),K=require("./usePrinter-BCAFeO_J.cjs"),ve=require("./vue-ui-skeleton-Djv08J67.cjs"),he=require("./BaseIcon-BGExhz6v.cjs"),pe=require("./vue-ui-accordion-xXgqfR2l.cjs"),J=require("./useNestedProp-q7byAAIJ.cjs"),fe=require("./PackageVersion-DVZtsuy4.cjs"),me=require("./PenAndPaper-CyXm-yVL.cjs"),be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ge=["id"],ke=["xmlns","viewBox"],_e={key:0},xe=["fill","font-weight","font-size","x","y"],Be=["fill","font-weight","font-size","x","y"],Ee=["id"],Ne=["stop-color"],Se=["stop-color"],Ce=["id"],ze=["stop-color"],we=["stop-color"],Ve=["id"],$e=["stop-color"],Te=["stop-color"],Fe=["stop-color"],Le=["id"],De=["stop-color"],Oe=["stop-color"],Pe=["stop-color"],Ie=["id"],Me=["stop-color"],Re=["stop-color"],Xe=["stop-color"],Ae={key:1},je=["x","y","font-size","font-weight","fill"],Ge=["x","y","font-size","font-weight","fill"],qe=["d","stroke"],Ue=["cx","cy","r","fill"],Ye=["cx","cy","r","fill","stroke","stroke-width","onClick"],He={key:2},We=["x","y","font-size","fill","onClick"],Ke={key:0},Je=["x","y","fill","font-size","font-weight"],Qe=["x","y","height","width","fill","rx","onClick"],Ze=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],et={key:3},tt=["x","y","fill","font-size","onClick"],lt=["d","stroke"],at=["fill","cx","cy","r","onClick"],ot={key:4},nt=["x","y","font-size","font-weight","fill"],rt=["x1","x2","y1","y2","stroke","stroke-width"],st=["y","height","width"],ut={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},ct={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},it={viewBox:"0 0 20 20",height:"16",width:"16"},dt=["fill"],yt={key:6},vt=["y","height","width"],ht={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},pt={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},ft={viewBox:"0 0 20 20",height:"16",width:"16"},mt=["fill"],bt=["cx","cy","fill"],gt=["d","stroke"],kt=["cx","cy","fill"],_t=["d","stroke"],xt=["cx","cy","fill"],Bt=["cx","cy","fill"],Et=["x","y","fill","font-size","font-weight"],Nt=["x","y","fill","font-size","font-weight"],St=["x","text-anchor","y","fill","font-size"],Ct=["x","text-anchor","y","fill","font-size"],zt=["x","text-anchor","y","fill","font-size"],wt=["x","text-anchor","y","fill","font-size"],Vt=["x","text-anchor","y","fill","font-size"],$t=["x","y","font-size","fill"],Tt=["x","y","font-size","fill"],Ft=["x","y","font-size","fill"],Lt={key:3,class:"vue-data-ui-watermark"},Dt={style:{"padding-top":"36px",position:"relative"}},Ot={class:"vue-ui-data-table"},Pt={key:0},It=["data-cell"],Mt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Rt={key:0},Xt={key:1},At=["data-cell"],jt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Gt={key:0},qt={key:1},Ut=["data-cell"],Yt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ht={key:0},Wt={key:1},Kt=["data-cell"],Jt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Qt={key:0},Zt={key:1},el=["data-cell"],tl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ll={key:0},al={key:1},ol=["data-cell"],nl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},rl={key:0},sl={key:1},ul=["data-cell"],cl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},il={key:0},dl={key:1},yl=["data-cell"],vl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},hl=["data-cell"],pl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},fl=["data-cell"],ml={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},bl=["data-cell"],gl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},kl=["data-cell"],_l={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},xl={__name:"vue-ui-chestnut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectRoot","selectBranch","selectNut"],setup(Q,{expose:Z,emit:S}){const k=Q;e.useCssVars(a=>({"91833a3a":a.tdo}));const{vue_ui_chestnut:ee}=o.useConfig(),z=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(o.createUid()),T=e.ref(null),te=e.ref(null),I=e.ref(0),t=e.computed({get:()=>M(),set:a=>a});function M(){const a=J.useNestedProp({userConfig:k.config,defaultConfig:ee});return a.theme?{...J.useNestedProp({userConfig:o.themes.vue_ui_chestnut[a.theme]||k.config,defaultConfig:a}),customPalette:o.themePalettes[a.theme]||o.palette}:a}e.watch(()=>k.config,a=>{t.value=M(),Y()},{deep:!0});const{isPrinting:R,isImaging:X,generatePdf:A,generateImage:j}=K.usePrinter({elementId:`vue-ui-chestnut_${h.value}`,fileName:t.value.style.chart.layout.title.text||"vue-ui-chestnut"}),F=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),w=e.ref({showTable:t.value.table.show}),L=e.ref(null),G=e.ref(!1),le=e.computed(()=>t.value.table.responsiveBreakpoint),r=e.ref({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),f=e.computed(()=>({left:r.value.padding.left,top:r.value.padding.top,right:r.value.width-r.value.padding.right,bottom:r.value.height-r.value.padding.bottom,width:r.value.width-(r.value.padding.left+r.value.padding.right),height:r.value.height-(r.value.padding.top+r.value.padding.bottom),seedX:r.value.padding.left+64})),_=e.computed(()=>z.value?k.dataset.flatMap(a=>(a.branches||[]).map(s=>s.value||0)).reduce((a,s)=>a+s,0):0),m=e.computed(()=>(k.dataset.forEach((a,s)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","branches"]}).forEach(l=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:l,index:s})}),a.branches&&a.branches.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(d=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:d,index:`${s} - ${n}`})}),l.breakdown&&l.breakdown.forEach((d,i)=>{o.getMissingDatasetAttributes({datasetObject:d,requiredAttributes:["name","value"]}).forEach(y=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:y,index:`${s} - ${n} - ${i}`})})})})}),k.dataset.map((a,s)=>{const l=(a.branches||[]).map(n=>n.value||0).reduce((n,d)=>n+d,0);return{...a,color:o.convertColorToHex(a.color)||F.value[s]||o.palette[s]||o.palette[s%o.palette.length],id:a.id||`root_${s}_${h.value}`,type:"root",total:l,rootIndex:s,branches:(a.branches||[]).map((n,d)=>({...n,rootName:a.name,rootIndex:s,color:o.convertColorToHex(a.color)||F.value[s]||o.palette[s]||o.palette[s%o.palette.length],value:n.value>=0?n.value:0,id:n.id||`branch_${s}_${d}_${h.value}`,proportionToRoot:n.value/l,type:"branch",breakdown:(n.breakdown||[]).map((i,y)=>({table:{rootName:a.name,rootValue:l,rootToTotal:l/_.value,branchName:n.name,branchValue:n.value,branchToTotal:n.value/_.value,branchToRoot:n.value/l,nutName:i.name,nutValue:i.value,nutToTotal:i.value/_.value,nutToRoot:i.value/l,nutToBranch:i.value/n.value},...i,type:"nut",branchName:n.name,rootName:a.name,branchTotal:n.value>=0?n.value:0,proportionToBranch:i.value/n.value,proportionToRoot:i.value/l,proportionToTree:i.value/_.value,rootIndex:s,id:i.id||`nut_${s}_${d}_${y}_${h.value}`,color:o.convertColorToHex(i.color)||F.value[y]||o.palette[y]||o.palette[y%o.palette.length],value:i.value>=0?i.value:0}))}))}})));function ae(){return m.value}const oe=e.computed(()=>m.value.flatMap(a=>a.branches).length),ne=e.computed(()=>Math.max(...m.value.map(a=>a.branches.map(s=>s.value).reduce((s,l)=>s+l,0)))),re=e.computed(()=>Math.max(...m.value.flatMap(a=>a.branches.map(s=>s.value)))),q=e.computed(()=>256+r.value.padding.left),B=e.computed(()=>m.value.sort((a,s)=>s.total-a.total).map((a,s)=>{const l=f.value.height/m.value.length/2,n=a.total/ne.value*(l>64?64:l);return{...a,x:f.value.seedX,y:f.value.top+f.value.height/m.value.length*(s+1)-(f.value.height/m.value.length/2+r.value.gap/2),r:n<r.value.branchSize/2?r.value.branchSize/2:n}})),se=e.computed(()=>t.value.style.chart.layout.branches.widthRatio<=0?.1:t.value.style.chart.layout.branches.widthRatio>1.8?1.8:t.value.style.chart.layout.branches.widthRatio),ue=e.computed(()=>B.value.flatMap(a=>a.branches)),E=e.computed(()=>ue.value.sort((a,s)=>s.value-a.value).map((a,s)=>({...a,y1:s*r.value.branchSize+f.value.top+s*r.value.gap,y2:s*r.value.branchSize+r.value.branchSize,x1:q.value,x2:384*a.value/re.value*se.value+q.value})));function D(a){const s=B.value.find(l=>l.rootIndex===a.rootIndex);return{x:s.x,y:s.y,r:s.r}}const u=e.ref(null),x=e.ref(null),v=e.ref(null),b=e.ref(null);function p(){u.value=null,v.value=null,b.value=null}function g(a){return b.value?b.value===null?!0:a.type==="root"?a.id===b.value.id:a.rootIndex===b.value.rootIndex:u.value===null&&v.value===null?!0:a.type==="nut"?u.value.id===a.id:a.type==="branch"?v.value.id===a.id:a.type==="root"?v.value&&v.value.rootIndex===a.rootIndex||u.value&&u.value.rootIndex===a.rootIndex:!1}function ce(a){p(),e.nextTick(()=>{u.value=a,v.value=a,x.value=o.makeDonut({series:a.breakdown,base:1},a.x2+24+t.value.style.chart.layout.nuts.offsetX,a.y1+r.value.branchSize/2,80,80),S("selectNut",a.breakdown)})}function N(){u.value=null,x.value=null,S("selectNut",null)}function O(a){v.value&&v.value.id===a.id?(v.value=null,p(),S("selectBranch",null)):(p(),v.value=a,S("selectBranch",a))}function U(a){b.value&&b.value.id===a.id?(p(),S("selectRoot",null)):(p(),b.value=a,S("selectRoot",a))}function ie(){return f.value.bottom-(u.value.y1+180)<0?0:f.value.bottom}function C(a){return a.proportion*100>t.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}function de(){const a=new ResizeObserver(s=>{s.forEach(l=>{G.value=l.contentRect.width<le.value})});L.value&&a.observe(L.value)}e.onMounted(()=>{Y()});function Y(){o.objectIsEmpty(k.dataset)&&o.error({componentName:"VueUiChestnut",type:"dataset"});const a=oe.value*(r.value.branchSize+r.value.gap)+r.value.padding.top+r.value.padding.bottom;r.value.height=a,de()}const c=e.computed(()=>{const a=[t.value.table.th.translations.rootName,t.value.table.th.translations.rootValue,t.value.table.th.translations.rootToTotal,t.value.table.th.translations.branchName,t.value.table.th.translations.branchValue,t.value.table.th.translations.branchToRoot,t.value.table.th.translations.branchToTotal,t.value.table.th.translations.nutName,t.value.table.th.translations.nutValue,t.value.table.th.translations.nutToBranch,t.value.table.th.translations.nutToRoot,t.value.table.th.translations.nutToTotal],s=m.value.flatMap((l,n)=>l.branches.flatMap((d,i)=>d.breakdown.flatMap((y,El)=>y.table)));return{head:a,body:s}});function H(){e.nextTick(()=>{const a=[[t.value.style.chart.layout.title.text],[t.value.style.chart.layout.title.subtitle.text],[""],["Grand total",_.value],[""]],s=c.value.head,l=c.value.body.map((i,y)=>[c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootName,c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootValue,c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootToTotal,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchName,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchValue,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchToRoot,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchToTotal,i.nutName,i.nutValue,i.nutToBranch,i.nutToRoot,i.nutToTotal]),n=a.concat([s]).concat(l),d=o.createCsvContent(n);o.downloadCsv({csvContent:d,title:t.value.style.chart.layout.title.text||"vue-ui-chestnut"})})}const V=e.ref(!1);function ye(a){V.value=a,I.value+=1}function W(){w.value.showTable=!w.value.showTable}const $=e.ref(!1);function P(){$.value=!$.value}return Z({getData:ae,generatePdf:A,generateCsv:H,generateImage:j,toggleTable:W,toggleAnnotator:P}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-chestnut ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"chestnutChart",ref:T,id:`vue-ui-chestnut_${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;padding-top:36px;background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(me.PenAndPaper,{key:0,parent:T.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:P},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.userOptions.show&&z.value?(e.openBlock(),e.createBlock(K.UserOptions,{ref_key:"details",ref:te,key:`user_options_${I.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(X),isPrinting:e.unref(R),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:T.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(A),onGenerateCsv:H,onGenerateImage:e.unref(j),onToggleTable:W,onToggleAnnotator:P},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"4"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),r.value.height>0&&z.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(fe._sfc_main),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("g",_e,[t.value.style.chart.layout.title.text?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",fill:t.value.style.chart.layout.title.color,"font-weight":t.value.style.chart.layout.title.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.fontSize,x:r.value.width/2,y:12+t.value.style.chart.layout.title.fontSize+t.value.style.chart.layout.title.offsetY,onClick:p},e.toDisplayString(t.value.style.chart.layout.title.text),9,xe)):e.createCommentVNode("",!0),t.value.style.chart.layout.title.subtitle.text?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",fill:t.value.style.chart.layout.title.subtitle.color,"font-weight":t.value.style.chart.layout.title.subtitle.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.subtitle.fontSize,x:r.value.width/2,y:48+t.value.style.chart.layout.title.subtitle.fontSize+t.value.style.chart.layout.title.subtitle.offsetY,onClick:p},e.toDisplayString(t.value.style.chart.layout.title.subtitle.text),9,Be)):e.createCommentVNode("",!0)])),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`root_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(l.color,.05),100-t.value.style.chart.layout.roots.gradientIntensity)},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,Se)],8,Ee))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,l=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`branch_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,ze),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(l.color,.02),100-t.value.style.chart.layout.branches.gradientIntensity)},null,8,we)],8,Ce))),256)),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nutpick_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,$e),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.selected.gradientIntensity)},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Fe)],8,Ve),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,De),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.gradientIntensity)},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Pe)],8,Le),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_underlayer_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,100)},null,8,Me),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,60)},null,8,Re),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,0)},null,8,Xe)],8,Ie)]),t.value.style.chart.layout.grandTotal.show?(e.openBlock(),e.createElementBlock("g",Ae,[e.createElementVNode("text",{x:f.value.seedX,y:32+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:p},e.toDisplayString(t.value.style.chart.layout.grandTotal.text),9,je),e.createElementVNode("text",{x:f.value.seedX,y:38+t.value.style.chart.layout.grandTotal.fontSize+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:p},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.grandTotal.formatter,_.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.grandTotal.prefix,v:_.value,s:t.value.style.chart.layout.grandTotal.suffix,r:t.value.style.chart.layout.grandTotal.roundingValue}))),9,Ge)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.branchSize,(n,d)=>(e.openBlock(),e.createElementBlock("path",{d:`M
2
- ${l.x1},${l.y1+d}
3
- C${l.x1-20},${l.y1+d}
4
- ${l.x1-80},${l.y1+d}
5
- ${D(l).x+D(l).r/2}, ${D(l).y}
6
- `,stroke:e.unref(o.setOpacity)(l.color,t.value.style.chart.layout.links.opacity),fill:"none","stroke-width":"2","shape-rendering":"cirspEdges",style:e.normalizeStyle(`opacity:${g(l)?1:0}`),onClick:p},null,12,qe))),256))]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,l=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,r:l.r,fill:t.value.style.chart.layout.roots.underlayerColor,stroke:"none",style:e.normalizeStyle(`cursor:pointer; opacity:${g(l)?1:.05}`)},null,12,Ue))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(l,n)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,r:l.r,fill:t.value.style.chart.layout.roots.useGradient?`url(#root_gradient_${h.value}_${l.rootIndex})`:l.color,stroke:t.value.style.chart.layout.roots.stroke,"stroke-width":t.value.style.chart.layout.roots.strokeWidth,style:e.normalizeStyle(`cursor:pointer; opacity:${g(l)?1:.05}`),onClick:d=>U(l)},null,12,Ye))),256)),t.value.style.chart.layout.roots.labels.show?(e.openBlock(),e.createElementBlock("g",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(l,n)=>(e.openBlock(),e.createElementBlock("text",{x:l.x,y:l.y+t.value.style.chart.layout.roots.labels.fontSize/2.6,"text-anchor":"middle","font-size":t.value.style.chart.layout.roots.labels.fontSize,fill:t.value.style.chart.layout.roots.labels.adaptColorToBackground?e.unref(o.adaptColorToBackground)(l.color):t.value.style.chart.layout.roots.labels.color,"font-weight":"bold",style:e.normalizeStyle(`cursor:pointer; opacity:${g(l)?1:.05}`),onClick:d=>U(l)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.roots.labels.formatter,l.total,e.unref(o.dataLabel)({p:t.value.style.chart.layout.roots.labels.prefix,v:l.total,s:t.value.style.chart.layout.roots.labels.suffix,r:t.value.style.chart.layout.roots.labels.roundingValue}),{datapoint:l})),13,We))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,l=>(e.openBlock(),e.createElementBlock("g",null,[u.value&&l.rootIndex===u.value.rootIndex||v.value&&l.rootIndex===v.value.rootIndex||b.value&&l.rootIndex===b.value.rootIndex?(e.openBlock(),e.createElementBlock("g",Ke,[e.createElementVNode("text",{x:l.x,y:l.y+l.r+24,"text-anchor":"middle",fill:t.value.style.chart.layout.roots.labels.name.color,"font-size":t.value.style.chart.layout.roots.labels.name.fontSize,"font-weight":t.value.style.chart.layout.roots.labels.name.bold?"bold":"normal",onClick:p},e.toDisplayString(l.name),9,Je)])):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("rect",{x:l.x1,y:l.y1,height:r.value.branchSize,width:l.x2-l.x1,fill:t.value.style.chart.layout.branches.underlayerColor,rx:t.value.style.chart.layout.branches.borderRadius,stroke:"none",style:e.normalizeStyle(`opacity:${g(l)?1:.05}`),onClick:n=>O(l)},null,12,Qe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(l,n)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x1,y:l.y1,height:r.value.branchSize,width:l.x2-l.x1,fill:t.value.style.chart.layout.branches.useGradient?`url(#branch_gradient_${h.value}_${l.rootIndex})`:l.color,rx:t.value.style.chart.layout.branches.borderRadius,stroke:t.value.style.chart.layout.branches.stroke,"stroke-width":t.value.style.chart.layout.branches.strokeWidth,style:e.normalizeStyle(`cursor:pointer; opacity:${g(l)?1:.05}`),onClick:d=>O(l)},null,12,Ze))),256)),t.value.style.chart.layout.branches.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("g",null,[l.proportionToRoot*100>t.value.style.chart.layout.branches.labels.dataLabels.hideUnderValue?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.x1+6,y:l.y1+r.value.branchSize/1.5,"text-anchor":"start",fill:e.unref(o.adaptColorToBackground)(l.color),"font-size":t.value.style.chart.layout.branches.labels.dataLabels.fontSize,"font-weight":"bold",style:e.normalizeStyle(`cursor:pointer; opacity:${g(l)?1:.05}`),onClick:n=>O(l)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.branches.labels.dataLabels.formatter,l.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.branches.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.branches.labels.dataLabels.suffix,r:t.value.style.chart.layout.branches.labels.dataLabels.roundingValue}),{datapoint:l})),13,tt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o.makeDonut)({series:l.breakdown,base:1},l.x2+24+t.value.style.chart.layout.nuts.offsetX,l.y1+r.value.branchSize/2,r.value.branchSize/3,r.value.branchSize/3),(d,i)=>(e.openBlock(),e.createElementBlock("path",{d:d.path,stroke:d.color,"stroke-width":10,fill:"none",style:e.normalizeStyle(`opacity:${g(l)?1:.1}`)},null,12,lt))),256)),e.createElementVNode("circle",{fill:t.value.style.chart.layout.nuts.useGradient?`url(#nut_${h.value})`:"transparent",cx:l.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:l.y1+r.value.branchSize/2,r:r.value.branchSize/2+2,onClick:d=>ce(l),style:e.normalizeStyle(`cursor:pointer;opacity:${g(l)?1:.1}`)},null,12,at)]))),256)),t.value.style.chart.layout.branches.labels.show&&!v.value?(e.openBlock(),e.createElementBlock("g",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("text",{x:l.x2+r.value.branchSize+24+t.value.style.chart.layout.nuts.offsetX,y:l.y1+r.value.branchSize/2+5,"font-size":t.value.style.chart.layout.branches.labels.fontSize,"font-weight":t.value.style.chart.layout.branches.labels.bold?"bold":"normal",fill:t.value.style.chart.layout.branches.labels.color,"text-anchor":"start",style:e.normalizeStyle(`opacity:${g(l)?1:.1}`)},e.toDisplayString(l.name),13,nt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:256+r.value.padding.left,x2:256+r.value.padding.left,y1:f.value.top,y2:f.value.bottom,stroke:t.value.style.chart.layout.verticalSeparator.stroke,"stroke-width":t.value.style.chart.layout.verticalSeparator.strokeWidth},null,8,rt),!u.value&&!v.value?(e.openBlock(),e.createElementBlock("foreignObject",{key:5,x:0,y:f.value.bottom,height:r.value.height-f.value.bottom,width:r.value.width,style:{overflow:"visible"},onClick:p},[e.createElementVNode("div",ut,[e.createElementVNode("div",ct,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,l=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`display:flex;align-items:center;gap:3px;flex-direction:row;font-size:${t.value.style.chart.layout.legend.fontSize}px;`)},[(e.openBlock(),e.createElementBlock("svg",it,[e.createElementVNode("circle",{cx:"10",cy:"10",r:"10",fill:l.color,stroke:"none"},null,8,dt)])),e.createElementVNode("span",null,e.toDisplayString(l.name)+":",1),e.createElementVNode("b",null,e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.roots.labels.formatter,l.total,e.unref(o.dataLabel)({p:t.value.style.chart.layout.legend.prefix,v:l.total,s:t.value.style.chart.layout.legend.suffix,r:t.value.style.chart.layout.legend.roundingValue}),{datapoint:l})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(o.dataLabel)({v:l.total/_.value*100,s:"%",r:t.value.style.chart.layout.legend.roundingPercentage}))+") ",1)],4))),256))])])],8,st)):e.createCommentVNode("",!0),u.value&&x.value?(e.openBlock(),e.createElementBlock("g",yt,[(e.openBlock(),e.createElementBlock("foreignObject",{x:0,y:ie(),height:r.value.height-f.value.bottom,width:r.value.width,style:{overflow:"visible"},onClick:p},[e.createElementVNode("div",ht,[e.createElementVNode("b",null,e.toDisplayString(u.value.name),1),e.createElementVNode("div",pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.breakdown,(l,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`display:flex;align-items:center;gap:6px;flex-direction:row;font-size:${t.value.style.chart.layout.legend.fontSize}px;`)},[(e.openBlock(),e.createElementBlock("svg",ft,[e.createElementVNode("circle",{cx:"10",cy:"10",r:"10",fill:l.color,stroke:"none"},null,8,mt)])),e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(l.name)+": ",1),e.createElementVNode("b",null,e.toDisplayString(t.value.style.chart.layout.legend.prefix)+" "+e.toDisplayString(l.value.toFixed(t.value.style.chart.layout.nuts.selected.labels.roundingValue))+" "+e.toDisplayString(t.value.style.chart.layout.legend.suffix),1),e.createTextVNode(" ("+e.toDisplayString((l.proportionToBranch*100).toFixed(t.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"%)",1)])],4))),256))])])],8,vt)),e.createElementVNode("circle",{cx:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:u.value.y1+r.value.branchSize/2,r:256,fill:`url(#nut_underlayer_${h.value})`,onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,bt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,l=>(e.openBlock(),e.createElementBlock("g",null,[C(l)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(o.calcNutArrowPath)(l,{x:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,y:u.value.y1+r.value.branchSize/2},16,16,!1,!1,64),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,gt)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("circle",{cx:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:u.value.y1+r.value.branchSize/2,r:118,fill:t.value.style.chart.backgroundColor,onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,kt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,l=>(e.openBlock(),e.createElementBlock("path",{d:l.path,stroke:l.color,"stroke-width":64,fill:"none",onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,_t))),256)),e.createElementVNode("circle",{cx:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:u.value.y1+r.value.branchSize/2,r:100,fill:`url(#nutpick_${h.value})`,onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,xt),e.createElementVNode("circle",{cx:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:u.value.y1+r.value.branchSize/2,r:48,fill:t.value.style.chart.backgroundColor,onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,Bt),e.createElementVNode("text",{x:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,y:u.value.y1+8,fill:t.value.style.chart.layout.nuts.selected.labels.core.total.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.core.total.fontSize,"font-weight":t.value.style.chart.layout.nuts.selected.labels.core.total.bold?"bold":"normal","text-anchor":"middle",onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(t.value.translations.total),11,Et),e.createElementVNode("text",{x:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,y:u.value.y1+36,fill:t.value.style.chart.layout.nuts.selected.labels.core.value.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.core.value.fontSize,"font-weight":t.value.style.chart.layout.nuts.selected.labels.core.value.bold?"bold":"normal","text-anchor":"middle",onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.nuts.selected.labels.dataLabels.formatter,u.value.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.nuts.selected.labels.core.value.prefix,v:u.value.value,s:t.value.style.chart.layout.nuts.selected.labels.core.value.suffix,r:t.value.style.chart.layout.nuts.selected.roundingValue}),{datapoint:u.value})),11,Nt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[C(l)?(e.openBlock(),e.createElementBlock("text",{key:0,x:e.unref(o.calcMarkerOffsetX)(l).x,"text-anchor":e.unref(o.calcMarkerOffsetX)(l).anchor,y:e.unref(o.calcMarkerOffsetY)(l),fill:l.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")}," ⬤ ",14,St)):e.createCommentVNode("",!0),C(l)?(e.openBlock(),e.createElementBlock("text",{key:1,x:e.unref(o.calcMarkerOffsetX)(l,!0).x,"text-anchor":e.unref(o.calcMarkerOffsetX)(l,!0).anchor,y:e.unref(o.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(u.value.breakdown[n].name),15,Ct)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[C(l)?(e.openBlock(),e.createElementBlock("text",{key:0,x:e.unref(o.calcMarkerOffsetX)(l,!0).x,"text-anchor":e.unref(o.calcMarkerOffsetX)(l).anchor,y:e.unref(o.calcMarkerOffsetY)(l)+t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(e.unref(o.dataLabel)({v:u.value.breakdown[n].value/u.value.value*100,s:"%",r:t.value.style.chart.layout.nuts.selected.labels.roundingPercentage}))+" "+e.toDisplayString(t.value.translations.of)+" "+e.toDisplayString(u.value.breakdown[n].branchName)+" "+e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.nuts.selected.labels.dataLabels.formatter,u.value.breakdown[n].value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.nuts.selected.labels.dataLabels.prefix,v:u.value.breakdown[n].value,s:t.value.style.chart.layout.nuts.selected.labels.dataLabels.suffix,r:t.value.style.chart.layout.nuts.selected.roundingValue}),{datapoint:x.value,seriesIndex:n})),15,zt)):e.createCommentVNode("",!0),C(l)?(e.openBlock(),e.createElementBlock("text",{key:1,x:e.unref(o.calcMarkerOffsetX)(l,!0).x,"text-anchor":e.unref(o.calcMarkerOffsetX)(l).anchor,y:e.unref(o.calcMarkerOffsetY)(l)+t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize*2,fill:t.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(e.unref(o.dataLabel)({v:u.value.breakdown[n].proportionToRoot*100,s:"%",r:t.value.style.chart.layout.nuts.selected.labels.roundingPercentage}))+" "+e.toDisplayString(t.value.translations.of)+" "+e.toDisplayString(u.value.breakdown[n].rootName),15,wt)):e.createCommentVNode("",!0),C(l)?(e.openBlock(),e.createElementBlock("text",{key:2,x:e.unref(o.calcMarkerOffsetX)(l,!0).x,"text-anchor":e.unref(o.calcMarkerOffsetX)(l).anchor,y:e.unref(o.calcMarkerOffsetY)(l)+t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize*3,fill:t.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(e.unref(o.dataLabel)({v:u.value.breakdown[n].proportionToTree*100,s:"%",r:t.value.style.chart.layout.nuts.selected.labels.roundingPercentage}))+" "+e.toDisplayString(t.value.translations.proportionToTree),15,Vt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("g",null,[v.value&&v.value.id===l.id&&!u.value?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.x1+6,y:l.y1+r.value.branchSize+24,"font-weight":"bold","text-anchor":"start","font-size":t.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.branches.labels.color,onClick:p},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.branches.labels.dataLabels.formatter,l.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.branches.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.branches.labels.dataLabels.suffix,r:t.value.style.chart.layout.branches.labels.dataLabels.roundingValue}),{datapoint:l})),9,$t)):e.createCommentVNode("",!0),v.value&&v.value.id===l.id&&!u.value?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.x1+6,y:l.y1+r.value.branchSize+48,"text-anchor":"start","font-size":t.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.branches.labels.color,onClick:p},e.toDisplayString(e.unref(o.dataLabel)({v:l.proportionToRoot*100,s:"%",r:t.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage}))+" "+e.toDisplayString(t.value.translations.of)+" "+e.toDisplayString(l.rootName),9,Tt)):e.createCommentVNode("",!0),v.value&&v.value.id===l.id&&!u.value?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.x1+6,y:l.y1+r.value.branchSize+72,"text-anchor":"start","font-size":t.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.branches.labels.color,onClick:p},e.toDisplayString(e.unref(o.dataLabel)({v:l.value/_.value*100,s:"%",r:t.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage}))+" "+e.toDisplayString(t.value.translations.proportionToTree),9,Ft)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(a.$slots,"svg",{svg:r.value},void 0,!0)],14,ke)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Lt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||e.unref(X)})),void 0,!0)])):e.createCommentVNode("",!0),z.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:4,config:{type:"chestnut",style:{backgroundColor:t.value.style.chart.backgroundColor,chestnut:{color:"#CCCCCC"}}}},null,8,["config"])),e.renderSlot(a.$slots,"legend",{legend:m.value},void 0,!0),z.value?(e.openBlock(),e.createBlock(pe.default,{key:5,hideDetails:"",config:{open:w.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:L,class:"vue-ui-chestnut-table"},[e.createElementVNode("div",Dt,[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:s[0]||(s[0]=l=>w.value.showTable=!1),onKeypress:s[1]||(s[1]=e.withKeys(l=>w.value.showTable=!1,["enter"]))},[e.createVNode(he.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("div",{style:{width:"100%"},class:e.normalizeClass({"vue-ui-responsive":G.value})},[e.createElementVNode("table",Ot,[e.createElementVNode("caption",{style:e.normalizeStyle({backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline}),class:"vue-ui-data-table__caption"},[e.createTextVNode(e.toDisplayString(t.value.style.chart.layout.title.text)+" ",1),t.value.style.chart.layout.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",Pt,e.toDisplayString(t.value.style.chart.layout.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.head,l=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline}`)},e.toDisplayString(l),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.body,(l,n)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[0]},[e.createElementVNode("div",Mt,[c.value.body[n-1]&&c.value.body[n-1].rootName===l.rootName?(e.openBlock(),e.createElementBlock("span",Rt)):(e.openBlock(),e.createElementBlock("span",Xt,e.toDisplayString(l.rootName),1))])],12,It),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[1]},[e.createElementVNode("div",jt,[c.value.body[n-1]&&c.value.body[n-1].rootName===l.rootName?(e.openBlock(),e.createElementBlock("span",Gt)):(e.openBlock(),e.createElementBlock("span",qt,e.toDisplayString(l.rootValue.toFixed(t.value.table.td.roundingValue)),1))])],12,At),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[2]},[e.createElementVNode("div",Yt,[c.value.body[n-1]&&c.value.body[n-1].rootName===l.rootName?(e.openBlock(),e.createElementBlock("span",Ht)):(e.openBlock(),e.createElementBlock("span",Wt,e.toDisplayString((l.rootToTotal*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1))])],12,Ut),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[3]},[e.createElementVNode("div",Jt,[c.value.body[n-1]&&c.value.body[n-1].branchName===l.branchName?(e.openBlock(),e.createElementBlock("span",Qt)):(e.openBlock(),e.createElementBlock("span",Zt,e.toDisplayString(l.branchName),1))])],12,Kt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[4]},[e.createElementVNode("div",tl,[c.value.body[n-1]&&c.value.body[n-1].branchName===l.branchName?(e.openBlock(),e.createElementBlock("span",ll)):(e.openBlock(),e.createElementBlock("span",al,e.toDisplayString(l.branchValue.toFixed(t.value.table.td.roundingValue)),1))])],12,el),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[5]},[e.createElementVNode("div",nl,[c.value.body[n-1]&&c.value.body[n-1].branchName===l.branchName?(e.openBlock(),e.createElementBlock("span",rl)):(e.openBlock(),e.createElementBlock("span",sl,e.toDisplayString((l.branchToRoot*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1))])],12,ol),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[6]},[e.createElementVNode("div",cl,[c.value.body[n-1]&&c.value.body[n-1].branchName===l.branchName?(e.openBlock(),e.createElementBlock("span",il)):(e.openBlock(),e.createElementBlock("span",dl,e.toDisplayString((l.branchToTotal*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1))])],12,ul),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[7]},[e.createElementVNode("div",vl,e.toDisplayString(l.nutName),1)],12,yl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[8]},[e.createElementVNode("div",pl,e.toDisplayString(l.nutValue.toFixed(t.value.table.td.roundingValue)),1)],12,hl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[9]},[e.createElementVNode("div",ml,e.toDisplayString((l.nutToBranch*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1)],12,fl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[10]},[e.createElementVNode("div",gl,e.toDisplayString((l.nutToRoot*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1)],12,bl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[11]},[e.createElementVNode("div",_l,e.toDisplayString((l.nutToTotal*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1)],12,kl)],6))),256))])])],2)])],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ge))}},Bl=be._export_sfc(xl,[["__scopeId","data-v-ee92c440"]]);exports.default=Bl;