vue-data-ui 2.6.1 → 2.6.2

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 (152) hide show
  1. package/dist/{Arrow-CG_4BSkT.js → Arrow-B4TCBt4-.js} +1 -1
  2. package/dist/{Arrow-DaCdeKAQ.cjs → Arrow-DnYsOsEt.cjs} +1 -1
  3. package/dist/{BaseIcon-zOOwakRm.js → BaseIcon-DTJIrD3k.js} +1 -1
  4. package/dist/{BaseIcon-CKMrYVdW.cjs → BaseIcon-Dn1igOva.cjs} +1 -1
  5. package/dist/{DataTable-DGgj14m-.js → DataTable-BWABkdIL.js} +2 -2
  6. package/dist/{DataTable-BLEXsQBY.cjs → DataTable-Cybmjq2W.cjs} +1 -1
  7. package/dist/{Legend-BvLLHGBp.cjs → Legend-Bf8J9KZk.cjs} +1 -1
  8. package/dist/{Legend-D8BbMFRZ.js → Legend-du4CJMG1.js} +2 -2
  9. package/dist/{PackageVersion-B7vHZ873.cjs → PackageVersion-Bmro6-lR.cjs} +1 -1
  10. package/dist/{PackageVersion-Bk5LVTq1.js → PackageVersion-Dqo8V-i_.js} +1 -1
  11. package/dist/{PenAndPaper-C2r4IIot.cjs → PenAndPaper-B7dv_ssy.cjs} +1 -1
  12. package/dist/{PenAndPaper-CQfs_lTN.js → PenAndPaper-QsaleY3R.js} +3 -3
  13. package/dist/{Shape-DRv28FRP.js → Shape-D_MGNYEa.js} +1 -1
  14. package/dist/{Shape-CMWPm64P.cjs → Shape-QydDpcqr.cjs} +1 -1
  15. package/dist/{Slicer-BTtwLXWn.js → Slicer-DKXIt2om.js} +2 -2
  16. package/dist/{Slicer-5eB08Bkj.cjs → Slicer-Vzo3baUi.cjs} +1 -1
  17. package/dist/{Title-ag6gXJcz.js → Title-MKfkLka7.js} +1 -1
  18. package/dist/{Title-DDaORN3r.cjs → Title-x7Hmi2zb.cjs} +1 -1
  19. package/dist/{Tooltip-95WjskR9.js → Tooltip-BUMgVEu0.js} +1 -1
  20. package/dist/{Tooltip-DwioWtpe.cjs → Tooltip-pA64woiQ.cjs} +1 -1
  21. package/dist/{index-DaaDBRRF.js → index-B8uVRkA1.js} +1 -1
  22. package/dist/{index-Dla35rDR.cjs → index-Bmq5HB9y.cjs} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/{useNestedProp-onENMM4v.cjs → useNestedProp-CivZENAh.cjs} +1 -1
  25. package/dist/{useNestedProp-ReVcQys2.js → useNestedProp-kStEZqtl.js} +1 -1
  26. package/dist/{usePrinter-cQwX-nf0.cjs → usePrinter-Cf6Zct5m.cjs} +1 -1
  27. package/dist/{usePrinter-DUVTMVcK.js → usePrinter-CppD6oY_.js} +1 -1
  28. package/dist/{vue-data-ui-S7WYrlMn.cjs → vue-data-ui-HGY4nSGa.cjs} +1 -1
  29. package/dist/{vue-data-ui-DBJxJRA8.js → vue-data-ui-ZZGY9nKv.js} +61 -61
  30. package/dist/vue-data-ui.cjs +1 -1
  31. package/dist/vue-data-ui.js +1 -1
  32. package/dist/{vue-ui-3d-bar-yWjl5iDC.cjs → vue-ui-3d-bar-BMZJgQzl.cjs} +1 -1
  33. package/dist/{vue-ui-3d-bar-C4Lf5ZsJ.js → vue-ui-3d-bar-DbhESYsC.js} +9 -9
  34. package/dist/{vue-ui-accordion-BJBt7sbb.js → vue-ui-accordion-CE2Pnpz3.js} +3 -3
  35. package/dist/{vue-ui-accordion-DcbFZ2D3.cjs → vue-ui-accordion-WWblnzaJ.cjs} +1 -1
  36. package/dist/{vue-ui-age-pyramid-CMLAz6Mp.js → vue-ui-age-pyramid-CxW84Zy4.js} +10 -10
  37. package/dist/{vue-ui-age-pyramid-CAh4pv9o.cjs → vue-ui-age-pyramid-DzPdTFTe.cjs} +1 -1
  38. package/dist/{vue-ui-annotator-Ccv0-AJJ.cjs → vue-ui-annotator-D5PCmH8u.cjs} +1 -1
  39. package/dist/{vue-ui-annotator-DgYKMAvZ.js → vue-ui-annotator-DuS_kY-C.js} +1 -1
  40. package/dist/{vue-ui-bullet-BPdkEe6M.js → vue-ui-bullet-CvB9cU_g.js} +8 -8
  41. package/dist/{vue-ui-bullet-BYvPZfEi.cjs → vue-ui-bullet-DND6LL0P.cjs} +1 -1
  42. package/dist/{vue-ui-candlestick-Bl48zOlH.cjs → vue-ui-candlestick-Bq4VyBVk.cjs} +1 -1
  43. package/dist/{vue-ui-candlestick-Dh8xqZUc.js → vue-ui-candlestick-C76ZVkkY.js} +11 -11
  44. package/dist/{vue-ui-carousel-table-54orau8Z.cjs → vue-ui-carousel-table-CdwSAavZ.cjs} +1 -1
  45. package/dist/{vue-ui-carousel-table-BGXTUQcI.js → vue-ui-carousel-table-DPlos7Us.js} +4 -4
  46. package/dist/{vue-ui-chestnut-DWW5UXQ_.js → vue-ui-chestnut-CB4BA3mx.js} +8 -8
  47. package/dist/{vue-ui-chestnut-BbK-8JcW.cjs → vue-ui-chestnut-CH1rO8yv.cjs} +1 -1
  48. package/dist/{vue-ui-circle-pack-Be3vnkLn.js → vue-ui-circle-pack-DslAztEw.js} +9 -9
  49. package/dist/{vue-ui-circle-pack-C6nsFaf9.cjs → vue-ui-circle-pack-T0baWnD4.cjs} +1 -1
  50. package/dist/{vue-ui-cursor-BMD9oXM_.js → vue-ui-cursor-CNrbLYcU.js} +2 -2
  51. package/dist/{vue-ui-cursor-Bd4WawYT.cjs → vue-ui-cursor-tyy0Lbsc.cjs} +1 -1
  52. package/dist/{vue-ui-dashboard-CIb57ZTu.cjs → vue-ui-dashboard-2EJIfom5.cjs} +1 -1
  53. package/dist/{vue-ui-dashboard-CRFAupNn.js → vue-ui-dashboard-BIQYUy0X.js} +2 -2
  54. package/dist/{vue-ui-digits-hKIjwNLE.cjs → vue-ui-digits-9j9HvJAE.cjs} +1 -1
  55. package/dist/{vue-ui-digits-DA1yrPSo.js → vue-ui-digits-B9zkzbxp.js} +2 -2
  56. package/dist/{vue-ui-donut-C6thkzA9.js → vue-ui-donut-CTTVwsjp.js} +12 -12
  57. package/dist/{vue-ui-donut-d-C5olqi.cjs → vue-ui-donut-MNv-tPgT.cjs} +1 -1
  58. package/dist/{vue-ui-donut-evolution-Dzv3ligP.cjs → vue-ui-donut-evolution-ByfZmrmA.cjs} +1 -1
  59. package/dist/{vue-ui-donut-evolution-CYAgFkE9.js → vue-ui-donut-evolution-QrqawlMF.js} +11 -11
  60. package/dist/{vue-ui-dumbbell-D7s7aDL9.js → vue-ui-dumbbell-DbJC4PQf.js} +10 -10
  61. package/dist/{vue-ui-dumbbell-oXJoC9vw.cjs → vue-ui-dumbbell-DdFhLM7x.cjs} +1 -1
  62. package/dist/{vue-ui-flow-D1M1iLei.cjs → vue-ui-flow-D3fu0o6H.cjs} +1 -1
  63. package/dist/{vue-ui-flow-C_UFS27X.js → vue-ui-flow-oXRtEqoD.js} +9 -9
  64. package/dist/{vue-ui-funnel-D-Ph4pEt.cjs → vue-ui-funnel-Btk9EM8C.cjs} +1 -1
  65. package/dist/{vue-ui-funnel-CyHc5q64.js → vue-ui-funnel-wG5mmmoA.js} +9 -9
  66. package/dist/{vue-ui-galaxy-CYVuaFx4.cjs → vue-ui-galaxy-D0chyXGV.cjs} +1 -1
  67. package/dist/{vue-ui-galaxy-C2B21QDs.js → vue-ui-galaxy-DKsUFAVZ.js} +11 -11
  68. package/dist/{vue-ui-gauge-DN7BfHVH.cjs → vue-ui-gauge-BgRQ_PbK.cjs} +1 -1
  69. package/dist/{vue-ui-gauge-BbCrRAcn.js → vue-ui-gauge-CVS_Ragk.js} +7 -7
  70. package/dist/{vue-ui-gizmo-BxmQXMMz.js → vue-ui-gizmo-D4BHhwJ8.js} +3 -3
  71. package/dist/{vue-ui-gizmo-BLi-aeOT.cjs → vue-ui-gizmo-Dhu6rJ9P.cjs} +1 -1
  72. package/dist/{vue-ui-heatmap-Di-4_KVj.js → vue-ui-heatmap-BGioOZJj.js} +10 -10
  73. package/dist/{vue-ui-heatmap-B5kk3ubl.cjs → vue-ui-heatmap-EGSWPEkM.cjs} +1 -1
  74. package/dist/{vue-ui-history-plot-BgQ7_nGB.js → vue-ui-history-plot-B18G7ARJ.js} +11 -11
  75. package/dist/{vue-ui-history-plot-C4Rh7d4A.cjs → vue-ui-history-plot-Be4mtSAH.cjs} +1 -1
  76. package/dist/{vue-ui-kpi-C_QMS2sW.cjs → vue-ui-kpi-B7rHhQ3H.cjs} +1 -1
  77. package/dist/{vue-ui-kpi-D5dlDIrE.js → vue-ui-kpi-BK1Vq6tA.js} +3 -3
  78. package/dist/{vue-ui-mini-loader-DC9WI9t6.cjs → vue-ui-mini-loader-DrWDl3Hc.cjs} +1 -1
  79. package/dist/{vue-ui-mini-loader-brOHSBkA.js → vue-ui-mini-loader-lAOgjMme.js} +2 -2
  80. package/dist/{vue-ui-molecule-BlZa7LFK.js → vue-ui-molecule-DEKmU-Mx.js} +11 -11
  81. package/dist/{vue-ui-molecule-Brrb0vRD.cjs → vue-ui-molecule-TSwsc6wZ.cjs} +1 -1
  82. package/dist/{vue-ui-mood-radar-bdoq5L0c.js → vue-ui-mood-radar-6XZfljIe.js} +11 -11
  83. package/dist/{vue-ui-mood-radar-ewQ9HT5w.cjs → vue-ui-mood-radar-vLXtDHcR.cjs} +1 -1
  84. package/dist/{vue-ui-nested-donuts-BrxC6lYZ.cjs → vue-ui-nested-donuts--A1qjixG.cjs} +1 -1
  85. package/dist/{vue-ui-nested-donuts-6bcJ22S6.js → vue-ui-nested-donuts-Cl8xdJU6.js} +11 -11
  86. package/dist/{vue-ui-onion-CPTPsRp_.cjs → vue-ui-onion-C32u8Ezk.cjs} +1 -1
  87. package/dist/{vue-ui-onion-Yff-DwJ0.js → vue-ui-onion-CPlqANiN.js} +11 -11
  88. package/dist/{vue-ui-parallel-coordinate-plot-BAGdY2ni.js → vue-ui-parallel-coordinate-plot-95RlJka2.js} +12 -12
  89. package/dist/{vue-ui-parallel-coordinate-plot-BBf4Stme.cjs → vue-ui-parallel-coordinate-plot-BY0t_Hc_.cjs} +1 -1
  90. package/dist/{vue-ui-quadrant-DpRKaZTi.cjs → vue-ui-quadrant-CWwHr8BX.cjs} +1 -1
  91. package/dist/{vue-ui-quadrant-BYkclEHK.js → vue-ui-quadrant-C_BIZcc8.js} +12 -12
  92. package/dist/{vue-ui-quick-chart-tOqfl8Wv.js → vue-ui-quick-chart-BZ5n0UQy.js} +9 -9
  93. package/dist/{vue-ui-quick-chart-DZ6tgwO-.cjs → vue-ui-quick-chart-CZYAIILY.cjs} +1 -1
  94. package/dist/{vue-ui-radar-THcYC_gY.cjs → vue-ui-radar-D4XBfJym.cjs} +1 -1
  95. package/dist/{vue-ui-radar-DGV_Qsfo.js → vue-ui-radar-Ddu3Dzxx.js} +12 -12
  96. package/dist/{vue-ui-rating-Cuou21Nk.js → vue-ui-rating-C7MH_wxf.js} +2 -2
  97. package/dist/{vue-ui-rating-ChvACa7-.cjs → vue-ui-rating-WjFEnnp5.cjs} +1 -1
  98. package/dist/{vue-ui-relation-circle-3c5hexW_.cjs → vue-ui-relation-circle-8Kw5PdZD.cjs} +1 -1
  99. package/dist/{vue-ui-relation-circle-Qikk7b8Z.js → vue-ui-relation-circle-B_xPyr_-.js} +7 -7
  100. package/dist/{vue-ui-rings-pwelBySH.cjs → vue-ui-rings-CuLwbEa2.cjs} +1 -1
  101. package/dist/{vue-ui-rings-DM1bBtQj.js → vue-ui-rings-pjfgnXyP.js} +12 -12
  102. package/dist/{vue-ui-scatter-tRzawjcj.cjs → vue-ui-scatter-YQ4zYJj0.cjs} +1 -1
  103. package/dist/{vue-ui-scatter-D3ZdlKut.js → vue-ui-scatter-x6zrT3IA.js} +12 -12
  104. package/dist/{vue-ui-screenshot-BpH4_ZD6.cjs → vue-ui-screenshot-D3k8rLXz.cjs} +1 -1
  105. package/dist/{vue-ui-screenshot-D7LdEMAv.js → vue-ui-screenshot-DeKe5Csw.js} +1 -1
  106. package/dist/{vue-ui-skeleton-Ce7b04xD.js → vue-ui-skeleton-BC7kQhlE.js} +3 -3
  107. package/dist/{vue-ui-skeleton-BIuKWqj2.cjs → vue-ui-skeleton-D5890icn.cjs} +1 -1
  108. package/dist/{vue-ui-smiley-vo6yPzcF.js → vue-ui-smiley-5evB5mWX.js} +2 -2
  109. package/dist/{vue-ui-smiley-BUJpZcSm.cjs → vue-ui-smiley-CNlhfa-H.cjs} +1 -1
  110. package/dist/{vue-ui-spark-trend-C7k3udvc.js → vue-ui-spark-trend-BgZ0JbXH.js} +5 -5
  111. package/dist/{vue-ui-spark-trend-C_MN59hc.cjs → vue-ui-spark-trend-CuqG_rtb.cjs} +1 -1
  112. package/dist/{vue-ui-sparkbar-CdENaD7Y.js → vue-ui-sparkbar-DkAi7xTy.js} +4 -4
  113. package/dist/{vue-ui-sparkbar-CPCZlpHO.cjs → vue-ui-sparkbar-DrG8Dq7-.cjs} +1 -1
  114. package/dist/{vue-ui-sparkgauge-B2uWPCJq.js → vue-ui-sparkgauge-BPhv4OLb.js} +4 -4
  115. package/dist/{vue-ui-sparkgauge-QZgcWK60.cjs → vue-ui-sparkgauge-C8JczQHv.cjs} +1 -1
  116. package/dist/{vue-ui-sparkhistogram-DCTnIVXe.js → vue-ui-sparkhistogram-CvhqCMzj.js} +5 -5
  117. package/dist/{vue-ui-sparkhistogram-DZabvSAV.cjs → vue-ui-sparkhistogram-e9JHVPef.cjs} +1 -1
  118. package/dist/{vue-ui-sparkline-BEWrNJvV.cjs → vue-ui-sparkline-DAaH0160.cjs} +1 -1
  119. package/dist/{vue-ui-sparkline-D3S5lo7r.js → vue-ui-sparkline-TSwCmhPw.js} +4 -4
  120. package/dist/{vue-ui-sparkstackbar-DWHqCmiK.js → vue-ui-sparkstackbar-BoS2_lla.js} +5 -5
  121. package/dist/{vue-ui-sparkstackbar-B5D0afLQ.cjs → vue-ui-sparkstackbar-r_awjtOp.cjs} +1 -1
  122. package/dist/{vue-ui-stackbar-q8Ibh-d4.js → vue-ui-stackbar-BEN8-V44.js} +13 -13
  123. package/dist/{vue-ui-stackbar-C9-V2SdI.cjs → vue-ui-stackbar-COZlH_nE.cjs} +1 -1
  124. package/dist/{vue-ui-strip-plot-D7foO-kq.js → vue-ui-strip-plot-Cbd43lkd.js} +11 -11
  125. package/dist/{vue-ui-strip-plot-DyGtwTEn.cjs → vue-ui-strip-plot-zTtIMHMC.cjs} +1 -1
  126. package/dist/{vue-ui-table-C6r6UbXb.js → vue-ui-table-Cdn-p4Sv.js} +1 -1
  127. package/dist/{vue-ui-table-DLR0ha2q.cjs → vue-ui-table-D3n9zK4_.cjs} +1 -1
  128. package/dist/{vue-ui-table-heatmap-DXZkNgsX.cjs → vue-ui-table-heatmap-1gluLlyr.cjs} +1 -1
  129. package/dist/{vue-ui-table-heatmap-Bs3RyLJ-.js → vue-ui-table-heatmap-DUoSqJAq.js} +4 -4
  130. package/dist/{vue-ui-table-sparkline-Dxy58OjL.js → vue-ui-table-sparkline-B6WbUZ-8.js} +5 -5
  131. package/dist/{vue-ui-table-sparkline-8jNNkRHl.cjs → vue-ui-table-sparkline-axmTWfsW.cjs} +1 -1
  132. package/dist/{vue-ui-thermometer-C0ebsziQ.js → vue-ui-thermometer-CYPaaRUL.js} +7 -7
  133. package/dist/{vue-ui-thermometer-CB82D9V2.cjs → vue-ui-thermometer-DO8jsmEA.cjs} +1 -1
  134. package/dist/{vue-ui-timer-C1SeltGj.cjs → vue-ui-timer-BxB-pqMO.cjs} +1 -1
  135. package/dist/{vue-ui-timer-2l2uA9ds.js → vue-ui-timer-DVDPJaIq.js} +5 -5
  136. package/dist/{vue-ui-tiremarks-B0Ko-3Nl.cjs → vue-ui-tiremarks-CHJQsXBn.cjs} +1 -1
  137. package/dist/{vue-ui-tiremarks-DqV4z-gF.js → vue-ui-tiremarks-LeiTjrNE.js} +7 -7
  138. package/dist/{vue-ui-treemap-VQLgKoFv.cjs → vue-ui-treemap-5vtoQA3B.cjs} +1 -1
  139. package/dist/{vue-ui-treemap-ZCkY5MIc.js → vue-ui-treemap-D1qUMxJQ.js} +11 -11
  140. package/dist/{vue-ui-vertical-bar-C7c4aoAE.js → vue-ui-vertical-bar-BjqeLwN6.js} +12 -12
  141. package/dist/{vue-ui-vertical-bar-D2fsnSXJ.cjs → vue-ui-vertical-bar-BvooiWAc.cjs} +1 -1
  142. package/dist/{vue-ui-waffle-D80rQuGH.js → vue-ui-waffle-DphHhyQF.js} +12 -12
  143. package/dist/{vue-ui-waffle-D6haAPI4.cjs → vue-ui-waffle-I9RUtRMp.cjs} +1 -1
  144. package/dist/{vue-ui-wheel-CoUOGnK9.js → vue-ui-wheel-BloNNVqT.js} +7 -7
  145. package/dist/{vue-ui-wheel-aifK19L_.cjs → vue-ui-wheel-KJdapRnF.cjs} +1 -1
  146. package/dist/{vue-ui-word-cloud-CyukymPI.cjs → vue-ui-word-cloud-BLpGQgdL.cjs} +1 -1
  147. package/dist/{vue-ui-word-cloud-D4ncvvGd.js → vue-ui-word-cloud-wxMpsmI9.js} +10 -10
  148. package/dist/{vue-ui-xy-xvt_IG7z.cjs → vue-ui-xy-BEgKs6jA.cjs} +2 -2
  149. package/dist/{vue-ui-xy-BxKSrC7D.js → vue-ui-xy-Zy60Z2c1.js} +90 -90
  150. package/dist/{vue-ui-xy-canvas-B4eBS-TN.cjs → vue-ui-xy-canvas-rKk7-Q2Q.cjs} +1 -1
  151. package/dist/{vue-ui-xy-canvas-IYFIfZxq.js → vue-ui-xy-canvas-zINzDQlN.js} +11 -11
  152. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Dla35rDR.cjs"),te=require("./useNestedProp-onENMM4v.cjs"),le=require("./usePrinter-cQwX-nf0.cjs"),be=require("./PackageVersion-B7vHZ873.cjs"),Ce=require("./Legend-BvLLHGBp.cjs"),we=require("./Title-DDaORN3r.cjs"),Be=require("./Tooltip-DwioWtpe.cjs"),Se=require("./DataTable-BLEXsQBY.cjs"),_e=require("./vue-ui-accordion-DcbFZ2D3.cjs"),Ne=require("./PenAndPaper-C2r4IIot.cjs"),ze=require("./vue-ui-skeleton-BIuKWqj2.cjs"),ae=require("./useResponsive-BJ7DTGpm.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),$e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ee=["id"],Me=["xmlns","viewBox"],Te=["x","y","width","height"],Ae={key:1},Pe=["id"],Ve=["stop-color"],Fe=["stop-color"],Oe=["stop-color"],De={key:2},Ie=["x1","x2","y1","y2","stroke","stroke-width"],Xe={key:3},Ye=["x","y","fill","font-size"],qe=["transform","font-size","fill","font-weight"],je={key:5},Ue=["x1","x2","y1","y2","stroke","stroke-width"],Re={key:6},He=["transform","fill","font-size","text-anchor"],We=["x","y","font-size","fill","font-weight"],Ge=["x1","x2","y1","y2","stroke","stroke-width"],Ze=["x1","x2","y1","y2","stroke","stroke-width"],Je=["d","stroke","stroke-width"],Ke=["d","stroke","stroke-width"],Qe=["cx","cy","fill","r"],et=["cx","cy","fill","r","stroke","stroke-width"],tt={key:1},lt=["x","y","font-size","fill","font-weight"],at={key:2},ot=["x","y","font-size","font-weight","fill"],st=["cx","cy","r","onMouseenter","onClick"],rt={key:5,class:"vue-data-ui-watermark"},nt=["onClick"],it=["innerHTML"],ut={__name:"vue-ui-history-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(oe,{expose:se,emit:re}){const{vue_ui_history_plot:ne}=r.useConfig(),c=oe,k=e.ref(null),M=e.ref(null),T=e.ref(0),A=e.ref(null),P=e.ref(0),V=e.ref(0),F=e.ref(0),w=e.ref(null),O=e.ref(null),b=e.ref(r.createUid()),N=e.ref(!1),z=e.ref(""),h=e.ref([]),B=e.ref(!1),f=e.ref(null),C=e.ref(!1),D=e.ref(null),y=e.computed({get:()=>!!c.dataset&&c.dataset.length,set:l=>l}),I=re;e.onMounted(X),e.onBeforeUnmount(()=>{w.value&&w.value.disconnect()});function X(){if(r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiHistoryPlot",type:"dataset"}):c.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{y.value=!1,r.error({componentName:"VueUiHistoryPlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ae.throttle(()=>{const{width:o,height:a}=ae.useResponsive({chart:k.value,title:t.value.style.chart.title.text?M.value:null,noTitle:O.value,legend:t.value.style.chart.legend.show?A.value:null,source:D.value});requestAnimationFrame(()=>{v.value.width=o,v.value.height=a,i.value.plots=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:3,fallback:3}),i.value.indexLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.indexLabels.fontSize,threshold:6,fallback:6}),i.value.labels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.labels.fontSize,threshold:6,fallback:6}),i.value.xAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.labels.fontSize,threshold:6,fallback:6}),i.value.xAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.name.fontSize,threshold:6,fallback:6}),i.value.yAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.labels.fontSize,threshold:6,fallback:6}),i.value.yAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.name.fontSize,threshold:6,fallback:6})})});w.value=new ResizeObserver(l),w.value.observe(k.value.parentNode)}}function Y(){const l=te.useNestedProp({userConfig:c.config,defaultConfig:ne});let o={};return l.theme?o={...te.useNestedProp({userConfig:r.themes.vue_ui_history_plot[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:o=l,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMin")?o.style.chart.axes.x.scaleMin=c.config.style.chart.axes.x.scaleMin:o.style.chart.axes.x.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMax")?o.style.chart.axes.x.scaleMax=c.config.style.chart.axes.x.scaleMax:o.style.chart.axes.x.scaleMax=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMin")?o.style.chart.axes.y.scaleMin=c.config.style.chart.axes.y.scaleMin:o.style.chart.axes.y.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMax")?o.style.chart.axes.y.scaleMax=c.config.style.chart.axes.y.scaleMax:o.style.chart.axes.y.scaleMax=null,o}const t=e.computed({get:()=>Y(),set:l=>l}),{userOptionsVisible:L,setUserOptionsVisibility:q,keepUserOptionState:j}=Le.useUserOptionState({config:t.value});e.watch(()=>c.config,l=>{t.value=Y(),L.value=!t.value.userOptions.showOnChartHover,X(),T.value+=1,V.value+=1,P.value+=1,v.value.height=t.value.style.chart.height,v.value.width=t.value.style.chart.width,i.value.plots=t.value.style.chart.plots.radius,i.value.indexLabels=t.value.style.chart.plots.indexLabels.fontSize,i.value.labels=t.value.style.chart.plots.labels.fontSize,i.value.xAxisLabels=t.value.style.chart.axes.x.labels.fontSize,i.value.xAxisName=t.value.style.chart.axes.x.name.fontSize,i.value.yAxisLabels=t.value.style.chart.axes.y.labels.fontSize,i.value.yAxisName=t.value.style.chart.axes.y.name.fontSize,p.value.showTable=t.value.table.show,p.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:U,isImaging:R,generatePdf:H,generateImage:W}=le.usePrinter({elementId:`history_plot_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-history-plot"}),ie=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ue=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),p=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),v=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),n=e.computed(()=>{const l=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:l,top:o,right:v.value.width-t.value.style.chart.padding.right,bottom:v.value.height-t.value.style.chart.padding.bottom,width:v.value.width-l-t.value.style.chart.padding.right,height:v.value.height-o-t.value.style.chart.padding.bottom}}),i=e.ref({plots:t.value.style.chart.plots.radius,indexLabels:t.value.style.chart.plots.indexLabels.fontSize,labels:t.value.style.chart.plots.labels.fontSize,xAxisLabels:t.value.style.chart.axes.x.labels.fontSize,xAxisName:t.value.style.chart.axes.x.name.fontSize,yAxisLabels:t.value.style.chart.axes.y.labels.fontSize,yAxisName:t.value.style.chart.axes.y.name.fontSize}),x=e.computed(()=>y.value?c.dataset.map((l,o)=>({...l,color:l.color?r.convertColorToHex(l.color):ue.value[o]||r.palette[o]||r.palette[o%r.palette.length],seriesIndex:o})):[]),ce=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.x))):1),ve=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.x)));return l<0?l:0}),de=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.y))):1),he=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.y)));return l<0?l:0}),d=e.computed(()=>{const l=r.calculateNiceScale(t.value.style.chart.axes.x.scaleMin===null?ve.value:t.value.style.chart.axes.x.scaleMin,t.value.style.chart.axes.x.scaleMax===null?ce.value:t.value.style.chart.axes.x.scaleMax,t.value.style.chart.axes.x.ticks),o=r.calculateNiceScale(t.value.style.chart.axes.y.scaleMin===null?he.value:t.value.style.chart.axes.y.scaleMin,t.value.style.chart.axes.y.scaleMax===null?de.value:t.value.style.chart.axes.y.scaleMax,t.value.style.chart.axes.y.ticks);return{x:l,y:o,tickX:l.ticks.map(a=>({x:n.value.left+(a-l.min)/(l.max-l.min)*n.value.width,y1:n.value.top,y2:n.value.bottom,value:a})),tickY:o.ticks.map(a=>({y:n.value.bottom-(a-o.min)/(o.max-o.min)*n.value.height,x1:n.value.left,x2:n.value.right,value:a}))}});function ye(l){const o=d.value.x.min<0?Math.abs(d.value.x.min):d.value.x.min>0?-d.value.x.min:0;return n.value.left+((l||0)+o)/(d.value.x.max+o)*n.value.width}function pe(l){const o=d.value.y.min<0?Math.abs(d.value.y.min):d.value.y.min>0?-d.value.y.min:0;return n.value.bottom-((l||0)+o)/(d.value.y.max+o)*n.value.height}const g=e.computed(()=>x.value.filter(l=>!h.value.includes(l.seriesIndex)).map((l,o)=>{const a=l.values.map((s,m)=>({valueX:s.x,valueY:s.y,label:s.label,x:ye(s.x),y:pe(s.y),color:l.color,seriesName:l.name,id:r.createUid()})),u=a.map(s=>`${s.x},${s.y} `).join("").trim();return{...l,plots:a,path:`M${u}`}}));function G(l){h.value.includes(l)?h.value=h.value.filter(o=>o!==l):h.value.push(l)}const Z=e.computed(()=>x.value.map(l=>({...l,opacity:h.value.includes(l.seriesIndex)?.5:1,segregate:()=>G(l.seriesIndex),isSegregated:h.value.includes(l.seriesIndex),shape:"circle"}))),me=e.computed(()=>({cy:"history-plot-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function fe(l){I("selectDatapoint",l)}function J(l){I("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function xe(l){B.value=l,F.value+=1}const $=e.ref(null);function ge({datapoint:l,plotIndex:o,seriesIndex:a}){$.value={datapoint:l,seriesIndex:a,plotIndex:o,config:t.value,series:x.value},f.value=l;const u=t.value.style.chart.tooltip.customFormat;if(C.value=!1,r.isFunction(u))try{const s=u({seriesIndex:a,datapoint:l,plotIndex:o,series:x.value,config:t.value});typeof s=="string"&&(z.value=s,C.value=!0)}catch{console.warn("Custom format cannot be applied."),C.value=!1}if(!C.value){let s="";s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};margin-bottom:3px;padding-bottom:6px;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg><span>${l.seriesName}</span></div>`,s+=`<div>${l.label}</div>`,s+=`<div>${t.value.style.chart.axes.x.name.text||"x"}: ${r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,l.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:l.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))}</div>`,s+=`<div>${t.value.style.chart.axes.y.name.text||"y"}: ${r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,l.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:l.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))}</div>`,z.value=`<div>${s}</div>`}N.value=!0}e.computed(()=>({head:g.value.map(o=>({name:o.name,color:o.color}))}));const S=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.datapoint,t.value.table.columnNames.x,t.value.table.columnNames.y],o=g.value.flatMap(u=>u.plots.map(s=>[{color:s.color,name:s.seriesName},s.label,r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,s.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:s.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding})),r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,s.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:s.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))])),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:o,config:a,colNames:l}});function K(){e.nextTick(()=>{const l=[[t.value.table.columnNames.series],[t.value.table.columnNames.datapoint],[t.value.table.columnNames.x],[t.value.table.columnNames.y]],o=g.value.flatMap(s=>s.plots.map(m=>[[m.seriesName],[m.label],[m.valueX],[m.valueY]])),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],l].concat(o),u=r.createCsvContent(a);r.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-history-plot"})})}const _=e.ref(!1);function E(){_.value=!_.value}function Q(){p.value.showTable=!p.value.showTable}function ee(){p.value.showTooltip=!p.value.showTooltip}function ke(){return g.value}return se({getData:ke,generatePdf:H,generateCsv:K,generateImage:W,toggleTable:Q,toggleTooltip:ee,toggleAnnotator:E}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{id:`history_plot_${b.value}`,ref_key:"historyPlotChart",ref:k,class:e.normalizeClass({"vue-ui-history-plot":!0,"vue-data-ui-wrapper-fullscreen":B.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(q)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(q)(!1))},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ne.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:_.value,onClose:E},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ie.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:O,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:M,class:"vue-ui-xy-title",style:e.normalizeStyle(`font-family:${t.value.style.fontFamily}`)},[(e.openBlock(),e.createBlock(we._sfc_main,{key:`title_${T.value}`,config:{title:{cy:"history-plot-div-title",...t.value.style.chart.title},subtitle:{cy:"history-plot-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value&&(e.unref(j)||e.unref(L))?(e.openBlock(),e.createBlock(le.UserOptions,{ref:"details",key:`user_option_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(R),uid:b.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,chartElement:k.value,position:t.value.userOptions.position,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:_.value,onToggleFullscreen:xe,onGeneratePdf:e.unref(H),onGenerateCsv:K,onGenerateImage:e.unref(W),onToggleTable:Q,onToggleTooltip:ee,onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(L)?"visible":"hidden":"visible"})},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:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:u})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:u})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${v.value.width<0?.1:v.value.width} ${v.value.height<0?.1:v.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(be._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:n.value.left,y:n.value.top,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Te)):e.createCommentVNode("",!0),t.value.style.chart.plots.gradient.show?(e.openBlock(),e.createElementBlock("defs",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${u}_${b.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(r.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Ve),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,Fe),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Oe)],8,Pe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalLines.show?(e.openBlock(),e.createElementBlock("g",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x,x2:a.x,y1:a.y1,y2:a.y2,stroke:t.value.style.chart.grid.verticalLines.stroke,"stroke-width":t.value.style.chart.grid.verticalLines.strokeWidth,"stroke-linecap":"round"},null,8,Ie))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.labels.show?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("text",{x:n.value.left+t.value.style.chart.axes.y.labels.offsetX-4,y:a.y+i.value.yAxisLabels/3,fill:t.value.style.chart.axes.y.labels.color,"font-size":i.value.yAxisLabels,"text-anchor":"end"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.y.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.y.labels.prefix,v:a.value,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))),9,Ye))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.name.text?(e.openBlock(),e.createElementBlock("text",{key:4,transform:`translate(${t.value.style.chart.axes.y.name.offsetX+i.value.yAxisName}, ${v.value.height/2+t.value.style.chart.axes.y.name.offsetY}), rotate(-90)`,"font-size":i.value.yAxisName,fill:t.value.style.chart.axes.y.name.color,"font-weight":t.value.style.chart.axes.y.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.y.name.text),9,qe)):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalLines.show?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalLines.stroke,"stroke-width":t.value.style.chart.grid.horizontalLines.strokeWidth,"stroke-linecap":"round"},null,8,Ue))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.labels.show?(e.openBlock(),e.createElementBlock("g",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("text",{transform:`translate(${a.x}, ${n.value.bottom+t.value.style.chart.axes.x.labels.offsetY+i.value.xAxisLabels}), rotate(${t.value.style.chart.axes.x.labels.rotation})`,fill:t.value.style.chart.axes.x.labels.color,"font-size":i.value.xAxisLabels,"text-anchor":t.value.style.chart.axes.x.labels.rotation>0?"start":t.value.style.chart.axes.x.labels.rotation<0?"end":"middle"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.x.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.x.labels.prefix,v:a.value,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))),9,He))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.name.text?(e.openBlock(),e.createElementBlock("text",{key:7,x:v.value.width/2+t.value.style.chart.axes.x.name.offsetX,y:v.value.height+t.value.style.chart.axes.x.name.offsetY,"font-size":i.value.xAxisName,fill:t.value.style.chart.axes.x.name.color,"font-weight":t.value.style.chart.axes.x.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.x.name.text),9,We)):e.createCommentVNode("",!0),t.value.style.chart.grid.xAxis.show?(e.openBlock(),e.createElementBlock("line",{key:8,x1:n.value.left,x2:n.value.left+n.value.width,y1:n.value.bottom,y2:n.value.bottom,stroke:t.value.style.chart.grid.xAxis.stroke,"stroke-width":t.value.style.chart.grid.xAxis.strokeWidth,"stroke-linecap":"round"},null,8,Ge)):e.createCommentVNode("",!0),t.value.style.chart.grid.yAxis.show?(e.openBlock(),e.createElementBlock("line",{key:9,x1:n.value.left,x2:n.value.left,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.chart.grid.yAxis.stroke,"stroke-width":t.value.style.chart.grid.yAxis.strokeWidth,"stroke-linecap":"round"},null,8,Ze)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.paths.show?(e.openBlock(),e.createElementBlock("g",{key:0,style:e.normalizeStyle({opacity:f.value===null?1:.3})},[e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.paths.strokeWidth+4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Je),e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.paths.useSerieColor?a.color:t.value.style.chart.paths.stroke,"stroke-width":t.value.style.chart.paths.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Ke)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.backgroundColor,r:i.value.plots,stroke:"none"},null,8,Qe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.plots.gradient.show?`url(#gradient_${u}_${b.value})`:s.color,r:i.value.plots,stroke:t.value.style.chart.plots.stroke,"stroke-width":t.value.style.chart.plots.strokeWidth,class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},null,14,et))),256)),t.value.style.chart.plots.labels.show?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.labels.offsetX,y:s.y+t.value.style.chart.plots.labels.offsetY+i.value.plots+i.value.labels,"font-size":i.value.labels,fill:t.value.style.chart.plots.labels.color,"font-weight":t.value.style.chart.plots.labels.bold?"bold":"normal","text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(s.label),15,lt))),256))])):e.createCommentVNode("",!0),t.value.style.chart.plots.indexLabels.show?(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(s,m)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.indexLabels.offsetX,y:s.y+t.value.style.chart.plots.indexLabels.offsetY+i.value.indexLabels/3,"font-size":i.value.indexLabels,"font-weight":t.value.style.chart.plots.indexLabels.bold?"bold":"normal",fill:t.value.style.chart.plots.indexLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(a.color):t.value.style.chart.plots.indexLabels.color,"text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(t.value.style.chart.plots.indexLabels.startAtZero?m:m+1),15,ot))),256))])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,a=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:"transparent",r:i.value.plots,stroke:"none",onMouseenter:m=>ge({datapoint:u,plotIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:o[0]||(o[0]=m=>{N.value=!1,f.value=null}),onClick:()=>fe(u)},null,40,st))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:v.value},void 0,!0)],12,Me)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",rt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ze.default,{key:6,config:{type:"historyPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,historyPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:A},[t.value.style.chart.legend.show&&y.value?(e.openBlock(),e.createBlock(Ce.Legend,{key:`legend_${P.value}`,legendSet:Z.value,config:me.value,onClickMarker:o[1]||(o[1]=({legend:a})=>{G(a.seriesIndex),J(a)})},{item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:s=>{a.segregate(),J(a)},style:e.normalizeStyle(`opacity:${h.value.includes(a.seriesIndex)?.5:1}`)},e.toDisplayString(a.name),13,nt)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:Z.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:D,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:p.value.showTooltip&&N.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:z.value,isCustom:C.value,isFullscreen:B.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...$.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...$.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),y.value?(e.openBlock(),e.createBlock(_e.default,{key:8,hideDetails:"",config:{open:p.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.openBlock(),e.createBlock(Se.DataTable,{key:`table_${V.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>p.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,it)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ee))}},ct=$e._export_sfc(ut,[["__scopeId","data-v-398c5a48"]]);exports.default=ct;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Bmq5HB9y.cjs"),te=require("./useNestedProp-CivZENAh.cjs"),le=require("./usePrinter-Cf6Zct5m.cjs"),be=require("./PackageVersion-Bmro6-lR.cjs"),Ce=require("./Legend-Bf8J9KZk.cjs"),we=require("./Title-x7Hmi2zb.cjs"),Be=require("./Tooltip-pA64woiQ.cjs"),Se=require("./DataTable-Cybmjq2W.cjs"),_e=require("./vue-ui-accordion-WWblnzaJ.cjs"),Ne=require("./PenAndPaper-B7dv_ssy.cjs"),ze=require("./vue-ui-skeleton-D5890icn.cjs"),ae=require("./useResponsive-BJ7DTGpm.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),$e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ee=["id"],Me=["xmlns","viewBox"],Te=["x","y","width","height"],Ae={key:1},Pe=["id"],Ve=["stop-color"],Fe=["stop-color"],Oe=["stop-color"],De={key:2},Ie=["x1","x2","y1","y2","stroke","stroke-width"],Xe={key:3},Ye=["x","y","fill","font-size"],qe=["transform","font-size","fill","font-weight"],je={key:5},Ue=["x1","x2","y1","y2","stroke","stroke-width"],Re={key:6},He=["transform","fill","font-size","text-anchor"],We=["x","y","font-size","fill","font-weight"],Ge=["x1","x2","y1","y2","stroke","stroke-width"],Ze=["x1","x2","y1","y2","stroke","stroke-width"],Je=["d","stroke","stroke-width"],Ke=["d","stroke","stroke-width"],Qe=["cx","cy","fill","r"],et=["cx","cy","fill","r","stroke","stroke-width"],tt={key:1},lt=["x","y","font-size","fill","font-weight"],at={key:2},ot=["x","y","font-size","font-weight","fill"],st=["cx","cy","r","onMouseenter","onClick"],rt={key:5,class:"vue-data-ui-watermark"},nt=["onClick"],it=["innerHTML"],ut={__name:"vue-ui-history-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(oe,{expose:se,emit:re}){const{vue_ui_history_plot:ne}=r.useConfig(),c=oe,k=e.ref(null),M=e.ref(null),T=e.ref(0),A=e.ref(null),P=e.ref(0),V=e.ref(0),F=e.ref(0),w=e.ref(null),O=e.ref(null),b=e.ref(r.createUid()),N=e.ref(!1),z=e.ref(""),h=e.ref([]),B=e.ref(!1),f=e.ref(null),C=e.ref(!1),D=e.ref(null),y=e.computed({get:()=>!!c.dataset&&c.dataset.length,set:l=>l}),I=re;e.onMounted(X),e.onBeforeUnmount(()=>{w.value&&w.value.disconnect()});function X(){if(r.objectIsEmpty(c.dataset)?r.error({componentName:"VueUiHistoryPlot",type:"dataset"}):c.dataset.forEach((l,o)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{y.value=!1,r.error({componentName:"VueUiHistoryPlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ae.throttle(()=>{const{width:o,height:a}=ae.useResponsive({chart:k.value,title:t.value.style.chart.title.text?M.value:null,noTitle:O.value,legend:t.value.style.chart.legend.show?A.value:null,source:D.value});requestAnimationFrame(()=>{v.value.width=o,v.value.height=a,i.value.plots=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:3,fallback:3}),i.value.indexLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.indexLabels.fontSize,threshold:6,fallback:6}),i.value.labels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.labels.fontSize,threshold:6,fallback:6}),i.value.xAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.labels.fontSize,threshold:6,fallback:6}),i.value.xAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.x.name.fontSize,threshold:6,fallback:6}),i.value.yAxisLabels=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.labels.fontSize,threshold:6,fallback:6}),i.value.yAxisName=r.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.axes.y.name.fontSize,threshold:6,fallback:6})})});w.value=new ResizeObserver(l),w.value.observe(k.value.parentNode)}}function Y(){const l=te.useNestedProp({userConfig:c.config,defaultConfig:ne});let o={};return l.theme?o={...te.useNestedProp({userConfig:r.themes.vue_ui_history_plot[l.theme]||c.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:o=l,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMin")?o.style.chart.axes.x.scaleMin=c.config.style.chart.axes.x.scaleMin:o.style.chart.axes.x.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.x.scaleMax")?o.style.chart.axes.x.scaleMax=c.config.style.chart.axes.x.scaleMax:o.style.chart.axes.x.scaleMax=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMin")?o.style.chart.axes.y.scaleMin=c.config.style.chart.axes.y.scaleMin:o.style.chart.axes.y.scaleMin=null,c.config&&r.hasDeepProperty(c.config,"style.chart.axes.y.scaleMax")?o.style.chart.axes.y.scaleMax=c.config.style.chart.axes.y.scaleMax:o.style.chart.axes.y.scaleMax=null,o}const t=e.computed({get:()=>Y(),set:l=>l}),{userOptionsVisible:L,setUserOptionsVisibility:q,keepUserOptionState:j}=Le.useUserOptionState({config:t.value});e.watch(()=>c.config,l=>{t.value=Y(),L.value=!t.value.userOptions.showOnChartHover,X(),T.value+=1,V.value+=1,P.value+=1,v.value.height=t.value.style.chart.height,v.value.width=t.value.style.chart.width,i.value.plots=t.value.style.chart.plots.radius,i.value.indexLabels=t.value.style.chart.plots.indexLabels.fontSize,i.value.labels=t.value.style.chart.plots.labels.fontSize,i.value.xAxisLabels=t.value.style.chart.axes.x.labels.fontSize,i.value.xAxisName=t.value.style.chart.axes.x.name.fontSize,i.value.yAxisLabels=t.value.style.chart.axes.y.labels.fontSize,i.value.yAxisName=t.value.style.chart.axes.y.name.fontSize,p.value.showTable=t.value.table.show,p.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:U,isImaging:R,generatePdf:H,generateImage:W}=le.usePrinter({elementId:`history_plot_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-history-plot"}),ie=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ue=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),p=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),v=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),n=e.computed(()=>{const l=t.value.style.chart.padding.left,o=t.value.style.chart.padding.top;return{left:l,top:o,right:v.value.width-t.value.style.chart.padding.right,bottom:v.value.height-t.value.style.chart.padding.bottom,width:v.value.width-l-t.value.style.chart.padding.right,height:v.value.height-o-t.value.style.chart.padding.bottom}}),i=e.ref({plots:t.value.style.chart.plots.radius,indexLabels:t.value.style.chart.plots.indexLabels.fontSize,labels:t.value.style.chart.plots.labels.fontSize,xAxisLabels:t.value.style.chart.axes.x.labels.fontSize,xAxisName:t.value.style.chart.axes.x.name.fontSize,yAxisLabels:t.value.style.chart.axes.y.labels.fontSize,yAxisName:t.value.style.chart.axes.y.name.fontSize}),x=e.computed(()=>y.value?c.dataset.map((l,o)=>({...l,color:l.color?r.convertColorToHex(l.color):ue.value[o]||r.palette[o]||r.palette[o%r.palette.length],seriesIndex:o})):[]),ce=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.x))):1),ve=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.x)));return l<0?l:0}),de=e.computed(()=>y.value?Math.max(...x.value.filter(l=>!h.value.includes(l.seriesIndex)).flatMap(l=>l.values.map(o=>o.y))):1),he=e.computed(()=>{if(!y.value)return 1;const l=Math.min(...x.value.filter(o=>!h.value.includes(o.seriesIndex)).flatMap(o=>o.values.map(a=>a.y)));return l<0?l:0}),d=e.computed(()=>{const l=r.calculateNiceScale(t.value.style.chart.axes.x.scaleMin===null?ve.value:t.value.style.chart.axes.x.scaleMin,t.value.style.chart.axes.x.scaleMax===null?ce.value:t.value.style.chart.axes.x.scaleMax,t.value.style.chart.axes.x.ticks),o=r.calculateNiceScale(t.value.style.chart.axes.y.scaleMin===null?he.value:t.value.style.chart.axes.y.scaleMin,t.value.style.chart.axes.y.scaleMax===null?de.value:t.value.style.chart.axes.y.scaleMax,t.value.style.chart.axes.y.ticks);return{x:l,y:o,tickX:l.ticks.map(a=>({x:n.value.left+(a-l.min)/(l.max-l.min)*n.value.width,y1:n.value.top,y2:n.value.bottom,value:a})),tickY:o.ticks.map(a=>({y:n.value.bottom-(a-o.min)/(o.max-o.min)*n.value.height,x1:n.value.left,x2:n.value.right,value:a}))}});function ye(l){const o=d.value.x.min<0?Math.abs(d.value.x.min):d.value.x.min>0?-d.value.x.min:0;return n.value.left+((l||0)+o)/(d.value.x.max+o)*n.value.width}function pe(l){const o=d.value.y.min<0?Math.abs(d.value.y.min):d.value.y.min>0?-d.value.y.min:0;return n.value.bottom-((l||0)+o)/(d.value.y.max+o)*n.value.height}const g=e.computed(()=>x.value.filter(l=>!h.value.includes(l.seriesIndex)).map((l,o)=>{const a=l.values.map((s,m)=>({valueX:s.x,valueY:s.y,label:s.label,x:ye(s.x),y:pe(s.y),color:l.color,seriesName:l.name,id:r.createUid()})),u=a.map(s=>`${s.x},${s.y} `).join("").trim();return{...l,plots:a,path:`M${u}`}}));function G(l){h.value.includes(l)?h.value=h.value.filter(o=>o!==l):h.value.push(l)}const Z=e.computed(()=>x.value.map(l=>({...l,opacity:h.value.includes(l.seriesIndex)?.5:1,segregate:()=>G(l.seriesIndex),isSegregated:h.value.includes(l.seriesIndex),shape:"circle"}))),me=e.computed(()=>({cy:"history-plot-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function fe(l){I("selectDatapoint",l)}function J(l){I("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function xe(l){B.value=l,F.value+=1}const $=e.ref(null);function ge({datapoint:l,plotIndex:o,seriesIndex:a}){$.value={datapoint:l,seriesIndex:a,plotIndex:o,config:t.value,series:x.value},f.value=l;const u=t.value.style.chart.tooltip.customFormat;if(C.value=!1,r.isFunction(u))try{const s=u({seriesIndex:a,datapoint:l,plotIndex:o,series:x.value,config:t.value});typeof s=="string"&&(z.value=s,C.value=!0)}catch{console.warn("Custom format cannot be applied."),C.value=!1}if(!C.value){let s="";s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};margin-bottom:3px;padding-bottom:6px;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg><span>${l.seriesName}</span></div>`,s+=`<div>${l.label}</div>`,s+=`<div>${t.value.style.chart.axes.x.name.text||"x"}: ${r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,l.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:l.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))}</div>`,s+=`<div>${t.value.style.chart.axes.y.name.text||"y"}: ${r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,l.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:l.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))}</div>`,z.value=`<div>${s}</div>`}N.value=!0}e.computed(()=>({head:g.value.map(o=>({name:o.name,color:o.color}))}));const S=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.datapoint,t.value.table.columnNames.x,t.value.table.columnNames.y],o=g.value.flatMap(u=>u.plots.map(s=>[{color:s.color,name:s.seriesName},s.label,r.applyDataLabel(t.value.style.chart.axes.x.labels.formatter,s.valueX,r.dataLabel({p:t.value.style.chart.axes.x.labels.prefix,v:s.valueX,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding})),r.applyDataLabel(t.value.style.chart.axes.y.labels.formatter,s.valueY,r.dataLabel({p:t.value.style.chart.axes.y.labels.prefix,v:s.valueY,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))])),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:o,config:a,colNames:l}});function K(){e.nextTick(()=>{const l=[[t.value.table.columnNames.series],[t.value.table.columnNames.datapoint],[t.value.table.columnNames.x],[t.value.table.columnNames.y]],o=g.value.flatMap(s=>s.plots.map(m=>[[m.seriesName],[m.label],[m.valueX],[m.valueY]])),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],l].concat(o),u=r.createCsvContent(a);r.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-history-plot"})})}const _=e.ref(!1);function E(){_.value=!_.value}function Q(){p.value.showTable=!p.value.showTable}function ee(){p.value.showTooltip=!p.value.showTooltip}function ke(){return g.value}return se({getData:ke,generatePdf:H,generateCsv:K,generateImage:W,toggleTable:Q,toggleTooltip:ee,toggleAnnotator:E}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{id:`history_plot_${b.value}`,ref_key:"historyPlotChart",ref:k,class:e.normalizeClass({"vue-ui-history-plot":!0,"vue-data-ui-wrapper-fullscreen":B.value}),style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(q)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(q)(!1))},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ne.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:_.value,onClose:E},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ie.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:O,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:M,class:"vue-ui-xy-title",style:e.normalizeStyle(`font-family:${t.value.style.fontFamily}`)},[(e.openBlock(),e.createBlock(we._sfc_main,{key:`title_${T.value}`,config:{title:{cy:"history-plot-div-title",...t.value.style.chart.title},subtitle:{cy:"history-plot-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value&&(e.unref(j)||e.unref(L))?(e.openBlock(),e.createBlock(le.UserOptions,{ref:"details",key:`user_option_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(R),uid:b.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:B.value,chartElement:k.value,position:t.value.userOptions.position,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:_.value,onToggleFullscreen:xe,onGeneratePdf:e.unref(H),onGenerateCsv:K,onGenerateImage:e.unref(W),onToggleTable:Q,onToggleTooltip:ee,onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(L)?"visible":"hidden":"visible"})},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:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:u})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:u})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","isTooltip","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${v.value.width<0?.1:v.value.width} ${v.value.height<0?.1:v.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(be._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:n.value.left,y:n.value.top,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Te)):e.createCommentVNode("",!0),t.value.style.chart.plots.gradient.show?(e.openBlock(),e.createElementBlock("defs",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${u}_${b.value}`,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(r.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Ve),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(r.darkenHexColor)(a.color,.1)},null,8,Fe),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Oe)],8,Pe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalLines.show?(e.openBlock(),e.createElementBlock("g",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x,x2:a.x,y1:a.y1,y2:a.y2,stroke:t.value.style.chart.grid.verticalLines.stroke,"stroke-width":t.value.style.chart.grid.verticalLines.strokeWidth,"stroke-linecap":"round"},null,8,Ie))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.labels.show?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("text",{x:n.value.left+t.value.style.chart.axes.y.labels.offsetX-4,y:a.y+i.value.yAxisLabels/3,fill:t.value.style.chart.axes.y.labels.color,"font-size":i.value.yAxisLabels,"text-anchor":"end"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.y.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.y.labels.prefix,v:a.value,s:t.value.style.chart.axes.y.labels.suffix,r:t.value.style.chart.axes.y.labels.rounding}))),9,Ye))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.y.name.text?(e.openBlock(),e.createElementBlock("text",{key:4,transform:`translate(${t.value.style.chart.axes.y.name.offsetX+i.value.yAxisName}, ${v.value.height/2+t.value.style.chart.axes.y.name.offsetY}), rotate(-90)`,"font-size":i.value.yAxisName,fill:t.value.style.chart.axes.y.name.color,"font-weight":t.value.style.chart.axes.y.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.y.name.text),9,qe)):e.createCommentVNode("",!0),t.value.style.chart.grid.horizontalLines.show?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickY,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalLines.stroke,"stroke-width":t.value.style.chart.grid.horizontalLines.strokeWidth,"stroke-linecap":"round"},null,8,Ue))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.labels.show?(e.openBlock(),e.createElementBlock("g",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.tickX,a=>(e.openBlock(),e.createElementBlock("text",{transform:`translate(${a.x}, ${n.value.bottom+t.value.style.chart.axes.x.labels.offsetY+i.value.xAxisLabels}), rotate(${t.value.style.chart.axes.x.labels.rotation})`,fill:t.value.style.chart.axes.x.labels.color,"font-size":i.value.xAxisLabels,"text-anchor":t.value.style.chart.axes.x.labels.rotation>0?"start":t.value.style.chart.axes.x.labels.rotation<0?"end":"middle"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.axes.x.labels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.axes.x.labels.prefix,v:a.value,s:t.value.style.chart.axes.x.labels.suffix,r:t.value.style.chart.axes.x.labels.rounding}))),9,He))),256))])):e.createCommentVNode("",!0),t.value.style.chart.axes.x.name.text?(e.openBlock(),e.createElementBlock("text",{key:7,x:v.value.width/2+t.value.style.chart.axes.x.name.offsetX,y:v.value.height+t.value.style.chart.axes.x.name.offsetY,"font-size":i.value.xAxisName,fill:t.value.style.chart.axes.x.name.color,"font-weight":t.value.style.chart.axes.x.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(t.value.style.chart.axes.x.name.text),9,We)):e.createCommentVNode("",!0),t.value.style.chart.grid.xAxis.show?(e.openBlock(),e.createElementBlock("line",{key:8,x1:n.value.left,x2:n.value.left+n.value.width,y1:n.value.bottom,y2:n.value.bottom,stroke:t.value.style.chart.grid.xAxis.stroke,"stroke-width":t.value.style.chart.grid.xAxis.strokeWidth,"stroke-linecap":"round"},null,8,Ge)):e.createCommentVNode("",!0),t.value.style.chart.grid.yAxis.show?(e.openBlock(),e.createElementBlock("line",{key:9,x1:n.value.left,x2:n.value.left,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.chart.grid.yAxis.stroke,"stroke-width":t.value.style.chart.grid.yAxis.strokeWidth,"stroke-linecap":"round"},null,8,Ze)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.paths.show?(e.openBlock(),e.createElementBlock("g",{key:0,style:e.normalizeStyle({opacity:f.value===null?1:.3})},[e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.paths.strokeWidth+4,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Je),e.createElementVNode("path",{d:a.path,stroke:t.value.style.chart.paths.useSerieColor?a.color:t.value.style.chart.paths.stroke,"stroke-width":t.value.style.chart.paths.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Ke)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.backgroundColor,r:i.value.plots,stroke:"none"},null,8,Qe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:t.value.style.chart.plots.gradient.show?`url(#gradient_${u}_${b.value})`:s.color,r:i.value.plots,stroke:t.value.style.chart.plots.stroke,"stroke-width":t.value.style.chart.plots.strokeWidth,class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},null,14,et))),256)),t.value.style.chart.plots.labels.show?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,s=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.labels.offsetX,y:s.y+t.value.style.chart.plots.labels.offsetY+i.value.plots+i.value.labels,"font-size":i.value.labels,fill:t.value.style.chart.plots.labels.color,"font-weight":t.value.style.chart.plots.labels.bold?"bold":"normal","text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(s.label),15,lt))),256))])):e.createCommentVNode("",!0),t.value.style.chart.plots.indexLabels.show?(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(s,m)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+t.value.style.chart.plots.indexLabels.offsetX,y:s.y+t.value.style.chart.plots.indexLabels.offsetY+i.value.indexLabels/3,"font-size":i.value.indexLabels,"font-weight":t.value.style.chart.plots.indexLabels.bold?"bold":"normal",fill:t.value.style.chart.plots.indexLabels.adaptColorToBackground?e.unref(r.adaptColorToBackground)(a.color):t.value.style.chart.plots.indexLabels.color,"text-anchor":"middle",class:e.normalizeClass({animated:t.value.useCssAnimation}),style:e.normalizeStyle({opacity:f.value===null||f.value.id===s.id?1:.3,transition:"opacity 0.2s ease-in-out"})},e.toDisplayString(t.value.style.chart.plots.indexLabels.startAtZero?m:m+1),15,ot))),256))])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,a=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:"transparent",r:i.value.plots,stroke:"none",onMouseenter:m=>ge({datapoint:u,plotIndex:s,seriesIndex:a.seriesIndex}),onMouseleave:o[0]||(o[0]=m=>{N.value=!1,f.value=null}),onClick:()=>fe(u)},null,40,st))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:v.value},void 0,!0)],12,Me)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",rt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ze.default,{key:6,config:{type:"historyPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,historyPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:A},[t.value.style.chart.legend.show&&y.value?(e.openBlock(),e.createBlock(Ce.Legend,{key:`legend_${P.value}`,legendSet:Z.value,config:me.value,onClickMarker:o[1]||(o[1]=({legend:a})=>{G(a.seriesIndex),J(a)})},{item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:s=>{a.segregate(),J(a)},style:e.normalizeStyle(`opacity:${h.value.includes(a.seriesIndex)?.5:1}`)},e.toDisplayString(a.name),13,nt)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:Z.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:D,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:p.value.showTooltip&&N.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:z.value,isCustom:C.value,isFullscreen:B.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...$.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...$.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","isFullscreen"]),y.value?(e.openBlock(),e.createBlock(_e.default,{key:8,hideDetails:"",config:{open:p.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.openBlock(),e.createBlock(Se.DataTable,{key:`table_${V.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>p.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,it)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ee))}},ct=$e._export_sfc(ut,[["__scopeId","data-v-398c5a48"]]);exports.default=ct;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./useNestedProp-onENMM4v.cjs"),u=require("./index-Dla35rDR.cjs"),y=require("./vue-ui-digits-hKIjwNLE.cjs"),C={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(n){const{vue_ui_kpi:m}=u.useConfig(),o=n,a=e.computed({get:()=>i(),set:t=>t}),f=e.useSlots();e.onMounted(()=>{f["chart-background"]&&console.warn("VueUiKpi does not support the #chart-background slot.")});function i(){return p.useNestedProp({userConfig:o.config,defaultConfig:m})}e.watch(()=>o.config,t=>{a.value=i(),r()},{deep:!0});const g=e.ref((typeof o.dataset=="number",o.dataset)),l=e.ref(a.value.useAnimation?a.value.animationValueStart:g.value),s=t=>{const v=a.value.animationFrames,c=Math.abs(t-l.value)/v;function d(){l.value<t?l.value=Math.min(l.value+c,t):l.value>t&&(l.value=Math.max(l.value-c,t)),l.value!==t&&requestAnimationFrame(d)}d()};e.onMounted(()=>{r()});function r(){a.value.useAnimation?(l.value=a.value.animationValueStart,s(o.dataset)):l.value=o.dataset}return e.watch(()=>o.dataset,t=>{a.value.useAnimation?s(t):l.value=t}),(t,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-kpi ${a.value.layoutClass}`),style:e.normalizeStyle(`background:${a.value.backgroundColor}; ${a.value.layoutCss}`)},[e.createElementVNode("div",{class:e.normalizeClass(`vue-ui-kpi-title ${a.value.titleClass}`),style:e.normalizeStyle(`font-family: ${a.value.fontFamily}; font-size:${a.value.titleFontSize}px; color:${a.value.titleColor}; font-weight:${a.value.titleBold?"bold":"normal"}; ${a.value.titleCss}`)},[e.renderSlot(t.$slots,"title",{comment:n.dataset}),e.createTextVNode(" "+e.toDisplayString(a.value.title),1)],6),e.renderSlot(t.$slots,"comment-before",{comment:n.dataset}),e.createElementVNode("div",{class:e.normalizeClass(`vue-ui-kpi-value ${a.value.valueClass}`),style:e.normalizeStyle(`font-family: ${a.value.fontFamily}; font-size:${a.value.valueFontSize}px; color:${a.value.valueColor}; font-weight:${a.value.valueBold?"bold":"normal"}; ${a.value.valueCss}`)},[e.renderSlot(t.$slots,"value",{comment:n.dataset}),a.value.analogDigits.show?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({height:a.value.analogDigits.height+"px"})},[e.createVNode(y.default,{dataset:Number(l.value.toFixed(a.value.valueRounding)),config:{backgroundColor:a.value.backgroundColor,digits:{color:a.value.analogDigits.color,skeletonColor:a.value.analogDigits.skeletonColor}}},null,8,["dataset","config"])],4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(u.applyDataLabel)(a.value.formatter,l.value,e.unref(u.dataLabel)({p:a.value.prefix,v:l.value,s:a.value.suffix,r:a.value.valueRounding}))),1)],64))],6),e.renderSlot(t.$slots,"comment-after",{comment:n.dataset})],6))}};exports.default=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./useNestedProp-CivZENAh.cjs"),u=require("./index-Bmq5HB9y.cjs"),y=require("./vue-ui-digits-9j9HvJAE.cjs"),C={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(n){const{vue_ui_kpi:m}=u.useConfig(),o=n,a=e.computed({get:()=>i(),set:t=>t}),f=e.useSlots();e.onMounted(()=>{f["chart-background"]&&console.warn("VueUiKpi does not support the #chart-background slot.")});function i(){return p.useNestedProp({userConfig:o.config,defaultConfig:m})}e.watch(()=>o.config,t=>{a.value=i(),r()},{deep:!0});const g=e.ref((typeof o.dataset=="number",o.dataset)),l=e.ref(a.value.useAnimation?a.value.animationValueStart:g.value),s=t=>{const v=a.value.animationFrames,c=Math.abs(t-l.value)/v;function d(){l.value<t?l.value=Math.min(l.value+c,t):l.value>t&&(l.value=Math.max(l.value-c,t)),l.value!==t&&requestAnimationFrame(d)}d()};e.onMounted(()=>{r()});function r(){a.value.useAnimation?(l.value=a.value.animationValueStart,s(o.dataset)):l.value=o.dataset}return e.watch(()=>o.dataset,t=>{a.value.useAnimation?s(t):l.value=t}),(t,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-kpi ${a.value.layoutClass}`),style:e.normalizeStyle(`background:${a.value.backgroundColor}; ${a.value.layoutCss}`)},[e.createElementVNode("div",{class:e.normalizeClass(`vue-ui-kpi-title ${a.value.titleClass}`),style:e.normalizeStyle(`font-family: ${a.value.fontFamily}; font-size:${a.value.titleFontSize}px; color:${a.value.titleColor}; font-weight:${a.value.titleBold?"bold":"normal"}; ${a.value.titleCss}`)},[e.renderSlot(t.$slots,"title",{comment:n.dataset}),e.createTextVNode(" "+e.toDisplayString(a.value.title),1)],6),e.renderSlot(t.$slots,"comment-before",{comment:n.dataset}),e.createElementVNode("div",{class:e.normalizeClass(`vue-ui-kpi-value ${a.value.valueClass}`),style:e.normalizeStyle(`font-family: ${a.value.fontFamily}; font-size:${a.value.valueFontSize}px; color:${a.value.valueColor}; font-weight:${a.value.valueBold?"bold":"normal"}; ${a.value.valueCss}`)},[e.renderSlot(t.$slots,"value",{comment:n.dataset}),a.value.analogDigits.show?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({height:a.value.analogDigits.height+"px"})},[e.createVNode(y.default,{dataset:Number(l.value.toFixed(a.value.valueRounding)),config:{backgroundColor:a.value.backgroundColor,digits:{color:a.value.analogDigits.color,skeletonColor:a.value.analogDigits.skeletonColor}}},null,8,["dataset","config"])],4)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(u.applyDataLabel)(a.value.formatter,l.value,e.unref(u.dataLabel)({p:a.value.prefix,v:l.value,s:a.value.suffix,r:a.value.valueRounding}))),1)],64))],6),e.renderSlot(t.$slots,"comment-after",{comment:n.dataset})],6))}};exports.default=C;
@@ -1,7 +1,7 @@
1
1
  import { computed as D, useSlots as x, onMounted as g, watch as C, ref as $, createElementBlock as i, openBlock as s, normalizeStyle as u, normalizeClass as r, createElementVNode as k, renderSlot as n, createTextVNode as y, toDisplayString as h, createVNode as z, Fragment as A, unref as b } from "vue";
2
- import { u as w } from "./useNestedProp-ReVcQys2.js";
3
- import { u as B, i as L, f as M } from "./index-DaaDBRRF.js";
4
- import E from "./vue-ui-digits-DA1yrPSo.js";
2
+ import { u as w } from "./useNestedProp-kStEZqtl.js";
3
+ import { u as B, i as L, f as M } from "./index-B8uVRkA1.js";
4
+ import E from "./vue-ui-digits-B9zkzbxp.js";
5
5
  const G = {
6
6
  __name: "vue-ui-kpi",
7
7
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-onENMM4v.cjs"),n=require("./index-Dla35rDR.cjs"),m=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=["xmlns","viewBox"],C={key:0},_=["stroke"],h=["stroke"],M=["stroke"],y={key:1},B=["stroke"],f={key:2},L=["stroke"],b={__name:"vue-ui-mini-loader",props:{config:{type:Object,default(){return{}}}},setup(u){e.useCssVars(k=>({"221651ee":c.value,d11bae38:d.value,d85c00de:p.value}));const{vue_ui_mini_loader:a}=n.useConfig(),i=u,t=e.computed(()=>v.useNestedProp({userConfig:i.config,defaultConfig:a})),s=e.ref({onion:"-10 -10 84 84",line:"-10 -10 112 84",bar:"-10 -10 106 84"}),r=e.computed(()=>({gutter:`stroke:${t.value.line.gutterColor};opacity:${t.value.line.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.line.gutterBlur}px);`})),l=e.computed(()=>({gutter:`stroke:${t.value.bar.gutterColor};opacity:${t.value.bar.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.bar.gutterBlur}px);`})),o=e.computed(()=>({gutter:`stroke:${t.value.onion.gutterColor};opacity:${t.value.onion.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.onion.gutterBlur}px);`})),c=e.computed(()=>`blur(${t.value.onion.trackBlur}px) hue-rotate(${t.value.onion.trackHueRotate}deg)`),d=e.computed(()=>`blur(${t.value.line.trackBlur}px) hue-rotate(${t.value.line.trackHueRotate}deg)`),p=e.computed(()=>`blur(${t.value.bar.trackBlur}px) hue-rotate(${t.value.bar.trackHueRotate}deg)`);return(k,x)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.XMLNS),viewBox:s.value[t.value.type],style:{background:"transparent"},width:"100%"},[t.value.type==="onion"?(e.openBlock(),e.createElementBlock("g",C,[e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,_),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,h),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,M)])):e.createCommentVNode("",!0),t.value.type==="line"?(e.openBlock(),e.createElementBlock("g",y,[e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(r.value.gutter+r.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5",stroke:t.value.line.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"line-animated"},null,8,B)])):e.createCommentVNode("",!0),t.value.type==="bar"?(e.openBlock(),e.createElementBlock("g",f,[e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(l.value.gutter+l.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5",stroke:t.value.bar.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"bar-animated"},null,8,L)])):e.createCommentVNode("",!0)],8,g))}},N=m._export_sfc(b,[["__scopeId","data-v-20f54e0e"]]);exports.default=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-CivZENAh.cjs"),n=require("./index-Bmq5HB9y.cjs"),m=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=["xmlns","viewBox"],C={key:0},_=["stroke"],h=["stroke"],M=["stroke"],y={key:1},B=["stroke"],f={key:2},L=["stroke"],b={__name:"vue-ui-mini-loader",props:{config:{type:Object,default(){return{}}}},setup(u){e.useCssVars(k=>({"221651ee":c.value,d11bae38:d.value,d85c00de:p.value}));const{vue_ui_mini_loader:a}=n.useConfig(),i=u,t=e.computed(()=>v.useNestedProp({userConfig:i.config,defaultConfig:a})),s=e.ref({onion:"-10 -10 84 84",line:"-10 -10 112 84",bar:"-10 -10 106 84"}),r=e.computed(()=>({gutter:`stroke:${t.value.line.gutterColor};opacity:${t.value.line.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.line.gutterBlur}px);`})),l=e.computed(()=>({gutter:`stroke:${t.value.bar.gutterColor};opacity:${t.value.bar.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.bar.gutterBlur}px);`})),o=e.computed(()=>({gutter:`stroke:${t.value.onion.gutterColor};opacity:${t.value.onion.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.onion.gutterBlur}px);`})),c=e.computed(()=>`blur(${t.value.onion.trackBlur}px) hue-rotate(${t.value.onion.trackHueRotate}deg)`),d=e.computed(()=>`blur(${t.value.line.trackBlur}px) hue-rotate(${t.value.line.trackHueRotate}deg)`),p=e.computed(()=>`blur(${t.value.bar.trackBlur}px) hue-rotate(${t.value.bar.trackHueRotate}deg)`);return(k,x)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.XMLNS),viewBox:s.value[t.value.type],style:{background:"transparent"},width:"100%"},[t.value.type==="onion"?(e.openBlock(),e.createElementBlock("g",C,[e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,_),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,h),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,M)])):e.createCommentVNode("",!0),t.value.type==="line"?(e.openBlock(),e.createElementBlock("g",y,[e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(r.value.gutter+r.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5",stroke:t.value.line.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"line-animated"},null,8,B)])):e.createCommentVNode("",!0),t.value.type==="bar"?(e.openBlock(),e.createElementBlock("g",f,[e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(l.value.gutter+l.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5",stroke:t.value.bar.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"bar-animated"},null,8,L)])):e.createCommentVNode("",!0)],8,g))}},N=m._export_sfc(b,[["__scopeId","data-v-20f54e0e"]]);exports.default=N;
@@ -1,6 +1,6 @@
1
1
  import { useCssVars as h, computed as r, ref as f, createElementBlock as n, openBlock as u, unref as M, createCommentVNode as a, createElementVNode as t, normalizeStyle as l } from "vue";
2
- import { u as m } from "./useNestedProp-ReVcQys2.js";
3
- import { u as y, X as L } from "./index-DaaDBRRF.js";
2
+ import { u as m } from "./useNestedProp-kStEZqtl.js";
3
+ import { u as y, X as L } from "./index-B8uVRkA1.js";
4
4
  import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const b = ["xmlns", "viewBox"], x = { key: 0 }, $ = ["stroke"], w = ["stroke"], A = ["stroke"], N = { key: 1 }, O = ["stroke"], S = { key: 2 }, F = ["stroke"], I = {
6
6
  __name: "vue-ui-mini-loader",
@@ -1,15 +1,15 @@
1
1
  import { toRef as ce, resolveComponent as de, createElementBlock as n, openBlock as a, Fragment as m, renderList as A, createCommentVNode as f, createBlock as S, withModifiers as z, createElementVNode as F, toDisplayString as Ie, normalizeStyle as _, createVNode as L, computed as D, onMounted as tt, ref as v, watch as ot, unref as C, normalizeClass as Oe, createSlots as lt, withCtx as x, renderSlot as $, normalizeProps as q, guardReactiveProps as Z, createTextVNode as at, nextTick as Le } from "vue";
2
- import { u as st, o as nt, e as rt, c as Ue, t as it, p as De, a as ut, b as ct, X as dt, l as vt, P as ht, q as ft, r as pt, x as gt, y as yt } from "./index-DaaDBRRF.js";
3
- import { _ as mt } from "./Title-ag6gXJcz.js";
4
- import { u as bt, U as kt } from "./usePrinter-DUVTMVcK.js";
5
- import { D as Ct } from "./DataTable-DGgj14m-.js";
6
- import { _ as $t } from "./Tooltip-95WjskR9.js";
7
- import J from "./BaseIcon-zOOwakRm.js";
8
- import wt from "./vue-ui-skeleton-Ce7b04xD.js";
9
- import xt from "./vue-ui-accordion-BJBt7sbb.js";
10
- import { u as Ae } from "./useNestedProp-ReVcQys2.js";
11
- import { _ as Pt } from "./PackageVersion-Bk5LVTq1.js";
12
- import { P as Tt } from "./PenAndPaper-CQfs_lTN.js";
2
+ import { u as st, o as nt, e as rt, c as Ue, t as it, p as De, a as ut, b as ct, X as dt, l as vt, P as ht, q as ft, r as pt, x as gt, y as yt } from "./index-B8uVRkA1.js";
3
+ import { _ as mt } from "./Title-MKfkLka7.js";
4
+ import { u as bt, U as kt } from "./usePrinter-CppD6oY_.js";
5
+ import { D as Ct } from "./DataTable-BWABkdIL.js";
6
+ import { _ as $t } from "./Tooltip-BUMgVEu0.js";
7
+ import J from "./BaseIcon-DTJIrD3k.js";
8
+ import wt from "./vue-ui-skeleton-BC7kQhlE.js";
9
+ import xt from "./vue-ui-accordion-CE2Pnpz3.js";
10
+ import { u as Ae } from "./useNestedProp-kStEZqtl.js";
11
+ import { _ as Pt } from "./PackageVersion-Dqo8V-i_.js";
12
+ import { P as Tt } from "./PenAndPaper-QsaleY3R.js";
13
13
  import { u as Ft } from "./useUserOptionState-BIvW1Kz7.js";
14
14
  import { _ as Rt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
15
  const St = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], Ot = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-Dla35rDR.cjs"),Le=require("./Title-DDaORN3r.cjs"),pe=require("./usePrinter-cQwX-nf0.cjs"),Oe=require("./DataTable-BLEXsQBY.cjs"),ze=require("./Tooltip-DwioWtpe.cjs"),z=require("./BaseIcon-CKMrYVdW.cjs"),Ue=require("./vue-ui-skeleton-BIuKWqj2.cjs"),Me=require("./vue-ui-accordion-DcbFZ2D3.cjs"),fe=require("./useNestedProp-onENMM4v.cjs"),De=require("./PackageVersion-B7vHZ873.cjs"),Ae=require("./PenAndPaper-C2r4IIot.cjs"),Ie=require("./useUserOptionState-BgepsfED.cjs"),He=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),qe=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],je={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(r,{emit:w}){const k=r,v=w;function a(s){v("zoom",s)}function h(s){v("hover",s)}return e.toRef(k,"dataset").value.forEach(s=>{s.nodes&&s.nodes.length>0&&s.nodes.forEach(b=>{b.ancestor=s})}),(s,b)=>{const P=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,d=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[d.polygonPath&&d.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.polygonPath.coordinates,(F,N)=>(e.openBlock(),e.createElementBlock("circle",{cx:F.x,cy:F.y,r:d.circleRadius,fill:`url(#gradient_${d.color})`,stroke:r.hoveredUid&&r.hoveredUid===d.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===d.uid?d.circleRadius/6:d.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(g=>a(d),["stop"]),onMouseover:g=>h(d),onMouseleave:b[0]||(b[0]=g=>h(null))},null,40,qe))),256)),d.nodes&&d.nodes.length>0?(e.openBlock(),e.createBlock(P,{key:0,dataset:d.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:a,onHover:h},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ge=["x1","y1","x2","y2","stroke","stroke-width"],Xe=["x1","y1","x2","y2","stroke","stroke-width"],Ye={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const w=r;return e.toRef(w,"dataset").value.forEach(v=>{v.nodes&&v.nodes.length>0&&v.nodes.forEach(a=>{a.ancestor=v})}),(v,a)=>{const h=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,u=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.polygonPath&&u.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u.polygonPath.coordinates,(s,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.ancestor&&u.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:s.x,y1:s.y,x2:u.ancestor.polygonPath.coordinates[0].x,y2:u.ancestor.polygonPath.coordinates[0].y,stroke:r.backgroundColor,"stroke-width":u.circleRadius/1.5},null,8,Ge),e.createElementVNode("line",{x1:s.x,y1:s.y,x2:u.ancestor.polygonPath.coordinates[0].x,y2:u.ancestor.polygonPath.coordinates[0].y,stroke:r.color,"stroke-width":u.circleRadius/2},null,8,Xe)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,u=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.polygonPath&&u.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[u.nodes&&u.nodes.length>0?(e.openBlock(),e.createBlock(h,{key:0,dataset:u.nodes,color:r.color,backgroundColor:r.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},We=["x","y","fill","font-size"],Ze={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:w}){const k=r;return e.toRef(k,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(h=>{h.ancestor=a})}),(a,h)=>{const u=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,s=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.polygonPath&&s.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.polygonPath.coordinates,b=>(e.openBlock(),e.createElementBlock("text",{x:b.x,y:b.y+s.circleRadius*2,fill:r.color,"font-size":s.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(s.name),9,We))),256)),s.nodes&&s.nodes.length>0?(e.openBlock(),e.createBlock(u,{key:0,dataset:s.nodes,color:r.color,hoveredUid:r.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Je={style:{position:"relative",height:"100%",width:"100%"}},Ke={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:w}){const k=w;return(v,a)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${r.isFullscreen?"fixed":"absolute"};bottom:0;right:${r.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",Je,[e.createElementVNode("button",{onClick:a[0]||(a[0]=e.withModifiers(h=>k("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:a[1]||(a[1]=e.withModifiers(h=>k("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:a[2]||(a[2]=e.withModifiers(h=>k("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:a[3]||(a[3]=e.withModifiers(h=>k("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:a[4]||(a[4]=e.withModifiers(h=>k("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},Qe=["id"],_e={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},et={key:2,style:"width:100%;background:transparent;"},tt=["xmlns","viewBox"],ot=["width","height"],lt=["id"],nt=["stop-color"],rt=["stop-color"],at={key:6,class:"vue-data-ui-watermark"},st={key:8,ref:"source",dir:"auto"},it=["innerHTML"],ut={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:w}){const{vue_ui_molecule:k}=m.useConfig(),v=r,a=e.computed(()=>!!v.dataset&&v.dataset.length);e.onMounted(()=>{h()});function h(){m.objectIsEmpty(v.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const u=e.ref(m.createUid()),s=e.ref(null),b=e.ref(!1),P=e.ref(""),d=e.ref(null),F=e.ref(null),N=e.ref(!1),g=e.ref(null),Z=e.ref(null),D=e.ref(0),J=e.ref(0),K=e.ref(0),o=e.computed({get:()=>ee(),set:t=>t}),{userOptionsVisible:A,setUserOptionsVisibility:Q,keepUserOptionState:_}=Ie.useUserOptionState({config:o.value});function ee(){const t=fe.useNestedProp({userConfig:v.config,defaultConfig:k});return t.theme?{...fe.useNestedProp({userConfig:m.themes.vue_ui_molecule[t.theme]||v.config,defaultConfig:t}),customPalette:m.themePalettes[t.theme]||m.palette}:t}e.watch(()=>v.config,t=>{o.value=ee(),A.value=!o.value.userOptions.showOnChartHover,h(),J.value+=1,K.value+=1,y.value.showTable=o.value.table.show,y.value.showTooltip=o.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:te,isImaging:oe,generatePdf:le,generateImage:ne}=pe.usePrinter({elementId:`cluster_${u.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),me=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),he=e.computed(()=>m.convertCustomPalette(o.value.customPalette)),y=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function re(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?re(t[0].nodes,l+1):l}function ge(){const t=re(v.dataset);let l=100,n=l;for(let c=0;c<t;c+=1)l/=1,n+=l;return{height:n,width:n}}const C=e.ref(ge()),I=e.ref(`0 0 ${C.value.width} ${C.value.height}`);function ae(t,l={x:-C.value.width/2.43,y:C.value.height/2},n=C.value.width/1.1,c=24,i=0,p=0,R="#BBBBBB"){if(t&&t.length>0){const Y=m.createPolygonPath({plot:l,radius:n,sides:t.length,rotation:i});t.forEach((f,$)=>{const L=Y.coordinates[$];let x;if(f.ancestor?f.ancestor.ancestor?x=f.ancestor.color||R:(x=he.value[p]||m.palette[p]||R,p+=1):x=R,f.polygonPath={coordinates:[L]},f.circleRadius=c,f.color=x,f.uid=m.createUid(),f.nodes&&f.nodes.length>0){const W=!f.ancestor||!f.ancestor.ancestor?p:0;f.nodes=ae(f.nodes,L,n/2.9,c/2.2,i+Math.PI*$/f.nodes.length,W,x)}})}return t}function ye(t){const l=new Set;function n(i){i.forEach(p=>{p.color&&!l.has(p.color)&&l.add(p.color),p.nodes&&p.nodes.length>0&&n(p.nodes)})}n(t);const c={};return Array.from(l).forEach((i,p)=>{c[i]=`gradient_${p}`}),c}const ke=e.computed(()=>ye(B.value)),B=e.computed(()=>ae(v.dataset));function H(){N.value=!1,F.value=null,Z.value=null,g.value=null,j({polygonPath:{coordinates:[{x:C.value.width/2,y:C.value.height/2}]},circleRadius:24})}const q=e.ref(null);function j(t){d.value.focus(),e.nextTick(()=>{q.value&&cancelAnimationFrame(q.value);const l=I.value.split(" "),n=parseFloat(l[0]),c=parseFloat(l[1]),i=parseFloat(l[2]),p=parseFloat(l[3]),{x:R,y:Y}=t.polygonPath.coordinates[0],{circleRadius:f}=t,$=8.34,L=R-f*$,x=Y-f*$,W=f*$*2,Ne=f*$*2,Te=Math.sqrt((L-n)**2+(x-c)**2),O=Math.min(1200,Math.max(20,Math.floor(Te/10))),Ee=(L-n)/O,Se=(x-c)/O,Ve=(W-i)/O,Re=(Ne-p)/O;let S=0;function ve(){I.value=`${n+Ee*S} ${c+Se*S} ${i+Ve*S} ${p+Re*S}`,S+=o.value.style.chart.zoom.speed,S<=O&&(q.value=requestAnimationFrame(ve))}ve()})}function be(t){F.value===t.uid?H():(F.value=t.uid,Z.value=t,g.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},j(t),N.value=t.uid!==B.value[0].uid)}function Ce(t){if(t.target.nodeName!=="circle")H(),N.value=!1;else return}const G=e.ref(null);function Be(t){G.value={datapoint:t,seriesIndex:-1,series:B.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(m.isFunction(l)&&m.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:B.value,config:o.value})))P.value=l({seriesIndex:-1,datapoint:t,series:B.value,config:o.value});else{let n="";n+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(n+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),P.value=`<div style="font-family:inherit">${n}</div>`}}const se=e.ref(null),V=e.ref(null);function we(t){se.value=t,t?(b.value=!0,Be(t),V.value=t.uid):(b.value=!1,P.value="",V.value=null)}function U(t){t==="right"&&(g.value.polygonPath.coordinates[0].x+=g.value.circleRadius),t==="left"&&(g.value.polygonPath.coordinates[0].x-=g.value.circleRadius),t==="top"&&(g.value.polygonPath.coordinates[0].y-=g.value.circleRadius),t==="bottom"&&(g.value.polygonPath.coordinates[0].y+=g.value.circleRadius),j(g.value)}function xe(t){const l=[];function n(c){c.forEach(i=>{const p={name:i.name,details:i.details||"-",ancestor:i.ancestor&&i.ancestor.name||"-",color:i.color||""};l.push(p),i.nodes&&i.nodes.length>0&&n(i.nodes,i.name)})}return n(t),l}const $e=e.computed(()=>xe(B.value)),T=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=$e.value.map((i,p)=>[{color:i.color,name:i.name},i.details,i.ancestor||""]),n={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},c=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:n,colNames:c}});function ie(){e.nextTick(()=>{const t=T.value.body.map((c,i)=>[[c[0].name],[c[1]],[c[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...T.value.head]]].concat(t),n=m.createCsvContent(l);m.downloadCsv({csvContent:n,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function Pe(){return B.value}const E=e.ref(!1);function Fe(t){E.value=t,D.value+=1}function ue(){y.value.showTable=!y.value.showTable}function ce(){y.value.showDataLabels=!y.value.showDataLabels}function de(){y.value.showTooltip=!y.value.showTooltip}const M=e.ref(!1);function X(){M.value=!M.value}return w({getData:Pe,generatePdf:le,generateCsv:ie,generateImage:ne,toggleTable:ue,toggleLabels:ce,toggleTooltip:de,toggleAnnotator:X}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"moleculeChart",ref:d,class:e.normalizeClass(`vue-ui-molecule ${E.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${u.value}`,onMouseleave:l[7]||(l[7]=n=>{se.value=null,V.value=null,e.unref(Q)(!1)}),onMouseenter:l[8]||(l[8]=()=>e.unref(Q)(!0))},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ae.PenAndPaper,{key:0,parent:d.value,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:M.value,onClose:X},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),me.value?(e.openBlock(),e.createElementBlock("div",_e,null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",et,[(e.openBlock(),e.createBlock(Le._sfc_main,{key:`title_${J.value}`,config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),o.value.userOptions.show&&a.value&&(e.unref(_)||e.unref(A))?(e.openBlock(),e.createBlock(pe.UserOptions,{ref_key:"details",ref:s,key:`user_options_${D.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(te),isImaging:e.unref(oe),uid:u.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:y.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:d.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:M.value,onToggleFullscreen:Fe,onGeneratePdf:e.unref(le),onGenerateCsv:ie,onGenerateImage:e.unref(ne),onToggleTable:ue,onToggleLabels:ce,onToggleTooltip:de,onToggleAnnotator:X,style:e.normalizeStyle({visibility:e.unref(_)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:c})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:c})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:n,isAnnotator:c})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:n,isAnnotator:c})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(m.XMLNS),viewBox:I.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":E.value,"vue-data-ui-fulscreen--off":!E.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(n=>Ce(n),["stop"]))},[e.createVNode(De._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:C.value.width<=0?10:C.value.width,height:C.value.height<=0?10:C.value.height,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,ot)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ke.value),n=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${n}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(m.lightenHexColor)(n,.5)},null,8,nt),e.createElementVNode("stop",{offset:"100%","stop-color":n},null,8,rt)],8,lt))),256))]),e.createVNode(Ye,{dataset:B.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(je,{dataset:B.value,hoveredUid:V.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:be,onHover:we},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),y.value.showDataLabels?(e.openBlock(),e.createBlock(Ze,{key:1,dataset:B.value,color:o.value.style.chart.color,hoveredUid:V.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:C.value},void 0,!0)],14,tt)):e.createCommentVNode("",!0),N.value?(e.openBlock(),e.createBlock(Ke,{key:`direction_pad_${D.value}`,color:o.value.style.chart.color,isFullscreen:E.value,onMoveLeft:l[1]||(l[1]=n=>U("left")),onMoveRight:l[2]||(l[2]=n=>U("right")),onMoveTop:l[3]||(l[3]=n=>U("top")),onMoveBottom:l[4]||(l[4]=n=>U("bottom")),onReset:l[5]||(l[5]=n=>{H(),N.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(te)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),a.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ue.default,{key:7,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),t.$slots.source?(e.openBlock(),e.createElementBlock("div",st,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:y.value.showTooltip&&b.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:d.value,content:P.value,isFullscreen:E.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),a.value?(e.openBlock(),e.createBlock(Me.default,{key:9,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Oe.DataTable,{key:`table_${K.value}`,colNames:T.value.colNames,head:T.value.head,body:T.value.body,config:T.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:l[6]||(l[6]=n=>y.value.showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n,style:{display:"flex","align-items":"center"}},null,8,it)]),td:e.withCtx(({td:n})=>[e.createTextVNode(e.toDisplayString(n.name||n),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Qe))}},ct=He._export_sfc(ut,[["__scopeId","data-v-c9ee14bc"]]);exports.default=ct;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-Bmq5HB9y.cjs"),Le=require("./Title-x7Hmi2zb.cjs"),pe=require("./usePrinter-Cf6Zct5m.cjs"),Oe=require("./DataTable-Cybmjq2W.cjs"),ze=require("./Tooltip-pA64woiQ.cjs"),z=require("./BaseIcon-Dn1igOva.cjs"),Ue=require("./vue-ui-skeleton-D5890icn.cjs"),Me=require("./vue-ui-accordion-WWblnzaJ.cjs"),fe=require("./useNestedProp-CivZENAh.cjs"),De=require("./PackageVersion-Bmro6-lR.cjs"),Ae=require("./PenAndPaper-B7dv_ssy.cjs"),Ie=require("./useUserOptionState-BgepsfED.cjs"),He=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),qe=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],je={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(r,{emit:w}){const k=r,v=w;function a(s){v("zoom",s)}function h(s){v("hover",s)}return e.toRef(k,"dataset").value.forEach(s=>{s.nodes&&s.nodes.length>0&&s.nodes.forEach(b=>{b.ancestor=s})}),(s,b)=>{const P=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,d=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[d.polygonPath&&d.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.polygonPath.coordinates,(F,N)=>(e.openBlock(),e.createElementBlock("circle",{cx:F.x,cy:F.y,r:d.circleRadius,fill:`url(#gradient_${d.color})`,stroke:r.hoveredUid&&r.hoveredUid===d.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===d.uid?d.circleRadius/6:d.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(g=>a(d),["stop"]),onMouseover:g=>h(d),onMouseleave:b[0]||(b[0]=g=>h(null))},null,40,qe))),256)),d.nodes&&d.nodes.length>0?(e.openBlock(),e.createBlock(P,{key:0,dataset:d.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:a,onHover:h},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ge=["x1","y1","x2","y2","stroke","stroke-width"],Xe=["x1","y1","x2","y2","stroke","stroke-width"],Ye={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const w=r;return e.toRef(w,"dataset").value.forEach(v=>{v.nodes&&v.nodes.length>0&&v.nodes.forEach(a=>{a.ancestor=v})}),(v,a)=>{const h=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,u=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.polygonPath&&u.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u.polygonPath.coordinates,(s,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.ancestor&&u.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:s.x,y1:s.y,x2:u.ancestor.polygonPath.coordinates[0].x,y2:u.ancestor.polygonPath.coordinates[0].y,stroke:r.backgroundColor,"stroke-width":u.circleRadius/1.5},null,8,Ge),e.createElementVNode("line",{x1:s.x,y1:s.y,x2:u.ancestor.polygonPath.coordinates[0].x,y2:u.ancestor.polygonPath.coordinates[0].y,stroke:r.color,"stroke-width":u.circleRadius/2},null,8,Xe)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,u=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.polygonPath&&u.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[u.nodes&&u.nodes.length>0?(e.openBlock(),e.createBlock(h,{key:0,dataset:u.nodes,color:r.color,backgroundColor:r.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},We=["x","y","fill","font-size"],Ze={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:w}){const k=r;return e.toRef(k,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(h=>{h.ancestor=a})}),(a,h)=>{const u=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,s=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.polygonPath&&s.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.polygonPath.coordinates,b=>(e.openBlock(),e.createElementBlock("text",{x:b.x,y:b.y+s.circleRadius*2,fill:r.color,"font-size":s.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(s.name),9,We))),256)),s.nodes&&s.nodes.length>0?(e.openBlock(),e.createBlock(u,{key:0,dataset:s.nodes,color:r.color,hoveredUid:r.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Je={style:{position:"relative",height:"100%",width:"100%"}},Ke={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:w}){const k=w;return(v,a)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${r.isFullscreen?"fixed":"absolute"};bottom:0;right:${r.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",Je,[e.createElementVNode("button",{onClick:a[0]||(a[0]=e.withModifiers(h=>k("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:a[1]||(a[1]=e.withModifiers(h=>k("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:a[2]||(a[2]=e.withModifiers(h=>k("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:a[3]||(a[3]=e.withModifiers(h=>k("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:a[4]||(a[4]=e.withModifiers(h=>k("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},Qe=["id"],_e={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},et={key:2,style:"width:100%;background:transparent;"},tt=["xmlns","viewBox"],ot=["width","height"],lt=["id"],nt=["stop-color"],rt=["stop-color"],at={key:6,class:"vue-data-ui-watermark"},st={key:8,ref:"source",dir:"auto"},it=["innerHTML"],ut={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:w}){const{vue_ui_molecule:k}=m.useConfig(),v=r,a=e.computed(()=>!!v.dataset&&v.dataset.length);e.onMounted(()=>{h()});function h(){m.objectIsEmpty(v.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const u=e.ref(m.createUid()),s=e.ref(null),b=e.ref(!1),P=e.ref(""),d=e.ref(null),F=e.ref(null),N=e.ref(!1),g=e.ref(null),Z=e.ref(null),D=e.ref(0),J=e.ref(0),K=e.ref(0),o=e.computed({get:()=>ee(),set:t=>t}),{userOptionsVisible:A,setUserOptionsVisibility:Q,keepUserOptionState:_}=Ie.useUserOptionState({config:o.value});function ee(){const t=fe.useNestedProp({userConfig:v.config,defaultConfig:k});return t.theme?{...fe.useNestedProp({userConfig:m.themes.vue_ui_molecule[t.theme]||v.config,defaultConfig:t}),customPalette:m.themePalettes[t.theme]||m.palette}:t}e.watch(()=>v.config,t=>{o.value=ee(),A.value=!o.value.userOptions.showOnChartHover,h(),J.value+=1,K.value+=1,y.value.showTable=o.value.table.show,y.value.showTooltip=o.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:te,isImaging:oe,generatePdf:le,generateImage:ne}=pe.usePrinter({elementId:`cluster_${u.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),me=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),he=e.computed(()=>m.convertCustomPalette(o.value.customPalette)),y=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function re(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?re(t[0].nodes,l+1):l}function ge(){const t=re(v.dataset);let l=100,n=l;for(let c=0;c<t;c+=1)l/=1,n+=l;return{height:n,width:n}}const C=e.ref(ge()),I=e.ref(`0 0 ${C.value.width} ${C.value.height}`);function ae(t,l={x:-C.value.width/2.43,y:C.value.height/2},n=C.value.width/1.1,c=24,i=0,p=0,R="#BBBBBB"){if(t&&t.length>0){const Y=m.createPolygonPath({plot:l,radius:n,sides:t.length,rotation:i});t.forEach((f,$)=>{const L=Y.coordinates[$];let x;if(f.ancestor?f.ancestor.ancestor?x=f.ancestor.color||R:(x=he.value[p]||m.palette[p]||R,p+=1):x=R,f.polygonPath={coordinates:[L]},f.circleRadius=c,f.color=x,f.uid=m.createUid(),f.nodes&&f.nodes.length>0){const W=!f.ancestor||!f.ancestor.ancestor?p:0;f.nodes=ae(f.nodes,L,n/2.9,c/2.2,i+Math.PI*$/f.nodes.length,W,x)}})}return t}function ye(t){const l=new Set;function n(i){i.forEach(p=>{p.color&&!l.has(p.color)&&l.add(p.color),p.nodes&&p.nodes.length>0&&n(p.nodes)})}n(t);const c={};return Array.from(l).forEach((i,p)=>{c[i]=`gradient_${p}`}),c}const ke=e.computed(()=>ye(B.value)),B=e.computed(()=>ae(v.dataset));function H(){N.value=!1,F.value=null,Z.value=null,g.value=null,j({polygonPath:{coordinates:[{x:C.value.width/2,y:C.value.height/2}]},circleRadius:24})}const q=e.ref(null);function j(t){d.value.focus(),e.nextTick(()=>{q.value&&cancelAnimationFrame(q.value);const l=I.value.split(" "),n=parseFloat(l[0]),c=parseFloat(l[1]),i=parseFloat(l[2]),p=parseFloat(l[3]),{x:R,y:Y}=t.polygonPath.coordinates[0],{circleRadius:f}=t,$=8.34,L=R-f*$,x=Y-f*$,W=f*$*2,Ne=f*$*2,Te=Math.sqrt((L-n)**2+(x-c)**2),O=Math.min(1200,Math.max(20,Math.floor(Te/10))),Ee=(L-n)/O,Se=(x-c)/O,Ve=(W-i)/O,Re=(Ne-p)/O;let S=0;function ve(){I.value=`${n+Ee*S} ${c+Se*S} ${i+Ve*S} ${p+Re*S}`,S+=o.value.style.chart.zoom.speed,S<=O&&(q.value=requestAnimationFrame(ve))}ve()})}function be(t){F.value===t.uid?H():(F.value=t.uid,Z.value=t,g.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},j(t),N.value=t.uid!==B.value[0].uid)}function Ce(t){if(t.target.nodeName!=="circle")H(),N.value=!1;else return}const G=e.ref(null);function Be(t){G.value={datapoint:t,seriesIndex:-1,series:B.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(m.isFunction(l)&&m.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:B.value,config:o.value})))P.value=l({seriesIndex:-1,datapoint:t,series:B.value,config:o.value});else{let n="";n+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(n+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),P.value=`<div style="font-family:inherit">${n}</div>`}}const se=e.ref(null),V=e.ref(null);function we(t){se.value=t,t?(b.value=!0,Be(t),V.value=t.uid):(b.value=!1,P.value="",V.value=null)}function U(t){t==="right"&&(g.value.polygonPath.coordinates[0].x+=g.value.circleRadius),t==="left"&&(g.value.polygonPath.coordinates[0].x-=g.value.circleRadius),t==="top"&&(g.value.polygonPath.coordinates[0].y-=g.value.circleRadius),t==="bottom"&&(g.value.polygonPath.coordinates[0].y+=g.value.circleRadius),j(g.value)}function xe(t){const l=[];function n(c){c.forEach(i=>{const p={name:i.name,details:i.details||"-",ancestor:i.ancestor&&i.ancestor.name||"-",color:i.color||""};l.push(p),i.nodes&&i.nodes.length>0&&n(i.nodes,i.name)})}return n(t),l}const $e=e.computed(()=>xe(B.value)),T=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=$e.value.map((i,p)=>[{color:i.color,name:i.name},i.details,i.ancestor||""]),n={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},c=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:n,colNames:c}});function ie(){e.nextTick(()=>{const t=T.value.body.map((c,i)=>[[c[0].name],[c[1]],[c[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...T.value.head]]].concat(t),n=m.createCsvContent(l);m.downloadCsv({csvContent:n,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function Pe(){return B.value}const E=e.ref(!1);function Fe(t){E.value=t,D.value+=1}function ue(){y.value.showTable=!y.value.showTable}function ce(){y.value.showDataLabels=!y.value.showDataLabels}function de(){y.value.showTooltip=!y.value.showTooltip}const M=e.ref(!1);function X(){M.value=!M.value}return w({getData:Pe,generatePdf:le,generateCsv:ie,generateImage:ne,toggleTable:ue,toggleLabels:ce,toggleTooltip:de,toggleAnnotator:X}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"moleculeChart",ref:d,class:e.normalizeClass(`vue-ui-molecule ${E.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${u.value}`,onMouseleave:l[7]||(l[7]=n=>{se.value=null,V.value=null,e.unref(Q)(!1)}),onMouseenter:l[8]||(l[8]=()=>e.unref(Q)(!0))},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ae.PenAndPaper,{key:0,parent:d.value,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:M.value,onClose:X},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),me.value?(e.openBlock(),e.createElementBlock("div",_e,null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",et,[(e.openBlock(),e.createBlock(Le._sfc_main,{key:`title_${J.value}`,config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),o.value.userOptions.show&&a.value&&(e.unref(_)||e.unref(A))?(e.openBlock(),e.createBlock(pe.UserOptions,{ref_key:"details",ref:s,key:`user_options_${D.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(te),isImaging:e.unref(oe),uid:u.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:y.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:d.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:M.value,onToggleFullscreen:Fe,onGeneratePdf:e.unref(le),onGenerateCsv:ie,onGenerateImage:e.unref(ne),onToggleTable:ue,onToggleLabels:ce,onToggleTooltip:de,onToggleAnnotator:X,style:e.normalizeStyle({visibility:e.unref(_)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:c})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:c})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:n,isAnnotator:c})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:n,isAnnotator:c})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(m.XMLNS),viewBox:I.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":E.value,"vue-data-ui-fulscreen--off":!E.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(n=>Ce(n),["stop"]))},[e.createVNode(De._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:C.value.width<=0?10:C.value.width,height:C.value.height<=0?10:C.value.height,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,ot)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ke.value),n=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${n}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(m.lightenHexColor)(n,.5)},null,8,nt),e.createElementVNode("stop",{offset:"100%","stop-color":n},null,8,rt)],8,lt))),256))]),e.createVNode(Ye,{dataset:B.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(je,{dataset:B.value,hoveredUid:V.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:be,onHover:we},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),y.value.showDataLabels?(e.openBlock(),e.createBlock(Ze,{key:1,dataset:B.value,color:o.value.style.chart.color,hoveredUid:V.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:C.value},void 0,!0)],14,tt)):e.createCommentVNode("",!0),N.value?(e.openBlock(),e.createBlock(Ke,{key:`direction_pad_${D.value}`,color:o.value.style.chart.color,isFullscreen:E.value,onMoveLeft:l[1]||(l[1]=n=>U("left")),onMoveRight:l[2]||(l[2]=n=>U("right")),onMoveTop:l[3]||(l[3]=n=>U("top")),onMoveBottom:l[4]||(l[4]=n=>U("bottom")),onReset:l[5]||(l[5]=n=>{H(),N.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(te)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),a.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ue.default,{key:7,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),t.$slots.source?(e.openBlock(),e.createElementBlock("div",st,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:y.value.showTooltip&&b.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:d.value,content:P.value,isFullscreen:E.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),a.value?(e.openBlock(),e.createBlock(Me.default,{key:9,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Oe.DataTable,{key:`table_${K.value}`,colNames:T.value.colNames,head:T.value.head,body:T.value.body,config:T.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:l[6]||(l[6]=n=>y.value.showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n,style:{display:"flex","align-items":"center"}},null,8,it)]),td:e.withCtx(({td:n})=>[e.createTextVNode(e.toDisplayString(n.name||n),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Qe))}},ct=He._export_sfc(ut,[["__scopeId","data-v-c9ee14bc"]]);exports.default=ct;
@@ -1,15 +1,15 @@
1
1
  import { computed as c, onMounted as Ce, ref as v, watch as we, createElementBlock as y, openBlock as r, unref as a, normalizeStyle as L, normalizeClass as Z, createBlock as p, createCommentVNode as u, renderSlot as h, createVNode as U, createSlots as xe, withCtx as m, normalizeProps as B, guardReactiveProps as D, createElementVNode as s, Fragment as ee, renderList as te, toDisplayString as P, createTextVNode as oe, nextTick as _e } from "vue";
2
- import { u as $e, o as Me, e as le, c as Pe, a as Ne, P as Ae, X as Oe, s as C, w as Te, Q as Le, i as ae, f as I, q as Ie, r as Fe } from "./index-DaaDBRRF.js";
3
- import { _ as Se } from "./Title-ag6gXJcz.js";
4
- import { u as Ve, U as je } from "./usePrinter-DUVTMVcK.js";
5
- import { L as Ue } from "./Legend-D8BbMFRZ.js";
6
- import N from "./BaseIcon-zOOwakRm.js";
7
- import { D as Be } from "./DataTable-DGgj14m-.js";
8
- import De from "./vue-ui-skeleton-Ce7b04xD.js";
9
- import We from "./vue-ui-accordion-BJBt7sbb.js";
10
- import { u as se } from "./useNestedProp-ReVcQys2.js";
11
- import { _ as ze } from "./PackageVersion-Bk5LVTq1.js";
12
- import { P as Ee } from "./PenAndPaper-CQfs_lTN.js";
2
+ import { u as $e, o as Me, e as le, c as Pe, a as Ne, P as Ae, X as Oe, s as C, w as Te, Q as Le, i as ae, f as I, q as Ie, r as Fe } from "./index-B8uVRkA1.js";
3
+ import { _ as Se } from "./Title-MKfkLka7.js";
4
+ import { u as Ve, U as je } from "./usePrinter-CppD6oY_.js";
5
+ import { L as Ue } from "./Legend-du4CJMG1.js";
6
+ import N from "./BaseIcon-DTJIrD3k.js";
7
+ import { D as Be } from "./DataTable-BWABkdIL.js";
8
+ import De from "./vue-ui-skeleton-BC7kQhlE.js";
9
+ import We from "./vue-ui-accordion-CE2Pnpz3.js";
10
+ import { u as se } from "./useNestedProp-kStEZqtl.js";
11
+ import { _ as ze } from "./PackageVersion-Dqo8V-i_.js";
12
+ import { P as Ee } from "./PenAndPaper-QsaleY3R.js";
13
13
  import { u as Ge } from "./useUserOptionState-BIvW1Kz7.js";
14
14
  import { _ as He } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
15
  const Re = ["id"], Xe = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Dla35rDR.cjs"),te=require("./Title-DDaORN3r.cjs"),F=require("./usePrinter-cQwX-nf0.cjs"),oe=require("./Legend-BvLLHGBp.cjs"),k=require("./BaseIcon-CKMrYVdW.cjs"),le=require("./DataTable-BLEXsQBY.cjs"),ae=require("./vue-ui-skeleton-BIuKWqj2.cjs"),re=require("./vue-ui-accordion-DcbFZ2D3.cjs"),q=require("./useNestedProp-onENMM4v.cjs"),ne=require("./PackageVersion-B7vHZ873.cjs"),se=require("./PenAndPaper-C2r4IIot.cjs"),ue=require("./useUserOptionState-BgepsfED.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],de={key:2,style:"width:100%;background:transparent"},ve=["xmlns","viewBox"],ye=["width","height"],me=["id"],he=["stop-color"],pe=["stop-color"],fe=["x1","y1","x2","y2","stroke","stroke-width"],ke=["d","stroke","stroke-width"],ge=["stroke"],be=["fill"],Ce=["stroke"],Ne=["fill"],we=["stroke"],xe=["fill"],Ve=["stroke"],_e=["fill"],Be=["stroke"],Pe=["fill"],$e=["d","stroke","stroke-width","fill"],Me=["x1","y1","stroke"],Ee=["cx","cy","fill","stroke"],Oe=["fill","stroke"],Se=["y","fill","font-weight"],Ae=["y","fill"],Te={key:5,class:"vue-data-ui-watermark"},Le=["onClick"],Ie={style:{"font-weight":"bold"}},Fe={key:8,ref:"source",dir:"auto"},qe=["innerHTML"],ze={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(z,{expose:D}){const{vue_ui_mood_radar:j}=r.useConfig(),s=z,m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),N=e.ref(null),U=e.ref(null),n=e.ref(null),W=e.ref(null),G=e.ref(0),H=e.ref(0),B=e.ref(0),t=e.computed({get:()=>M(),set:l=>l}),{userOptionsVisible:w,setUserOptionsVisibility:P,keepUserOptionState:$}=ue.useUserOptionState({config:t.value});function M(){const l=q.useNestedProp({userConfig:s.config,defaultConfig:j});return l.theme?{...q.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=M(),w.value=!t.value.userOptions.showOnChartHover,_(),G.value+=1,H.value+=1,B.value+=1,p.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:E,isImaging:O,generatePdf:S,generateImage:A}=F.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),R=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),p=e.ref({showTable:t.value.table.show}),i=e.computed(()=>({height:256,width:256})),x=e.computed(()=>r.createPolygonPath({plot:{x:128,y:i.value.height/2},radius:90,sides:5,rotation:11}));function X({centerX:l,centerY:a,apexX:o,apexY:u,proportion:d,key:f,value:ee}){return{x:l+(o-l)*d,y:a+(u-a)*d,key:f,value:ee}}const K=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),y=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),c=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/y.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),T=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),x.value.coordinates.map((l,a)=>{const o=X({centerX:i.value.width/2,centerY:i.value.height/2,apexX:l.x,apexY:l.y,proportion:c.value[a].value/K.value,key:c.value[a].key,value:c.value[a].value});return{...l,plots:o,key:c.value[a].key}})):[]),Y=e.computed(()=>({cy:"mood-radar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function J(l){l===n.value?n.value=null:n.value=l}const v=e.computed(()=>{const l=c.value.map(o=>({name:o.key,color:o.color})),a=c.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function L(){e.nextTick(()=>{const l=v.value.head.map((u,d)=>[[u.name],[v.value.body[d]],[isNaN(v.value.body[d]/y.value)?"-":v.value.body[d]/y.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(y.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=v.value.head.map((d,f)=>[{color:d.color,name:d.name},v.value.body[f].toFixed(t.value.table.td.roundingValue),isNaN(v.value.body[f]/y.value)?"-":(v.value.body[f]/y.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={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},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:u}});function Q(){return c.value}function I(){p.value.showTable=!p.value.showTable}const b=e.ref(!1);function Z(l){b.value=l}const C=e.ref(!1);function V(){C.value=!C.value}return D({getData:Q,generatePdf:S,generateCsv:L,generateImage:A,toggleTable:I,toggleAnnotator:V}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:N,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[11]||(a[11]=()=>e.unref(P)(!0)),onMouseleave:a[12]||(a[12]=()=>e.unref(P)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(se.PenAndPaper,{key:0,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:V},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),R.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:W,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",de,[e.createVNode(te._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref($)||e.unref(w))?(e.openBlock(),e.createBlock(F.UserOptions,{key:3,ref_key:"details",ref:U,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(E),isImaging:e.unref(O),uid:h.value,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,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:Z,onGeneratePdf:e.unref(S),onGenerateCsv:L,onGenerateImage:e.unref(A),onToggleTable:I,onToggleAnnotator:V,style:e.normalizeStyle({visibility:e.unref($)?e.unref(w)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${i.value.width} ${i.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ne._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:i.value.width,height:i.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,ye)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,he),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,pe)],8,me)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:i.value.width/2,y1:i.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,fe))),256)),e.createElementVNode("path",{d:x.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,ke),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,ge),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,be),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,Ce),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,Ne),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,we),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,xe),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,Ve),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,_e),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,Be),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,Pe),e.createElementVNode("path",{d:e.unref(r.makePath)(T.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,$e),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value.map(o=>o.plots),(o,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,Me),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Ee),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Oe),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),9,Se),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/y.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,Ae)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,ve)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Te,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(E)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ae.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(oe.Legend,{legendSet:c.value,config:Y.value,key:`legend_${B.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>J(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(k.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(k.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(k.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(k.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(k.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",Ie,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Le)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:c.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(re.default,{key:9,hideDetails:"",config:{open:p.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.createVNode(le.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[10]||(a[10]=o=>p.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,qe)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ce))}},De=ie._export_sfc(ze,[["__scopeId","data-v-171d740b"]]);exports.default=De;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Bmq5HB9y.cjs"),te=require("./Title-x7Hmi2zb.cjs"),F=require("./usePrinter-Cf6Zct5m.cjs"),oe=require("./Legend-Bf8J9KZk.cjs"),k=require("./BaseIcon-Dn1igOva.cjs"),le=require("./DataTable-Cybmjq2W.cjs"),ae=require("./vue-ui-skeleton-D5890icn.cjs"),re=require("./vue-ui-accordion-WWblnzaJ.cjs"),q=require("./useNestedProp-CivZENAh.cjs"),ne=require("./PackageVersion-Bmro6-lR.cjs"),se=require("./PenAndPaper-B7dv_ssy.cjs"),ue=require("./useUserOptionState-BgepsfED.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],de={key:2,style:"width:100%;background:transparent"},ve=["xmlns","viewBox"],ye=["width","height"],me=["id"],he=["stop-color"],pe=["stop-color"],fe=["x1","y1","x2","y2","stroke","stroke-width"],ke=["d","stroke","stroke-width"],ge=["stroke"],be=["fill"],Ce=["stroke"],Ne=["fill"],we=["stroke"],xe=["fill"],Ve=["stroke"],_e=["fill"],Be=["stroke"],Pe=["fill"],$e=["d","stroke","stroke-width","fill"],Me=["x1","y1","stroke"],Ee=["cx","cy","fill","stroke"],Oe=["fill","stroke"],Se=["y","fill","font-weight"],Ae=["y","fill"],Te={key:5,class:"vue-data-ui-watermark"},Le=["onClick"],Ie={style:{"font-weight":"bold"}},Fe={key:8,ref:"source",dir:"auto"},qe=["innerHTML"],ze={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(z,{expose:D}){const{vue_ui_mood_radar:j}=r.useConfig(),s=z,m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),N=e.ref(null),U=e.ref(null),n=e.ref(null),W=e.ref(null),G=e.ref(0),H=e.ref(0),B=e.ref(0),t=e.computed({get:()=>M(),set:l=>l}),{userOptionsVisible:w,setUserOptionsVisibility:P,keepUserOptionState:$}=ue.useUserOptionState({config:t.value});function M(){const l=q.useNestedProp({userConfig:s.config,defaultConfig:j});return l.theme?{...q.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=M(),w.value=!t.value.userOptions.showOnChartHover,_(),G.value+=1,H.value+=1,B.value+=1,p.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:E,isImaging:O,generatePdf:S,generateImage:A}=F.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),R=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),p=e.ref({showTable:t.value.table.show}),i=e.computed(()=>({height:256,width:256})),x=e.computed(()=>r.createPolygonPath({plot:{x:128,y:i.value.height/2},radius:90,sides:5,rotation:11}));function X({centerX:l,centerY:a,apexX:o,apexY:u,proportion:d,key:f,value:ee}){return{x:l+(o-l)*d,y:a+(u-a)*d,key:f,value:ee}}const K=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),y=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),c=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/y.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),T=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),x.value.coordinates.map((l,a)=>{const o=X({centerX:i.value.width/2,centerY:i.value.height/2,apexX:l.x,apexY:l.y,proportion:c.value[a].value/K.value,key:c.value[a].key,value:c.value[a].value});return{...l,plots:o,key:c.value[a].key}})):[]),Y=e.computed(()=>({cy:"mood-radar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function J(l){l===n.value?n.value=null:n.value=l}const v=e.computed(()=>{const l=c.value.map(o=>({name:o.key,color:o.color})),a=c.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function L(){e.nextTick(()=>{const l=v.value.head.map((u,d)=>[[u.name],[v.value.body[d]],[isNaN(v.value.body[d]/y.value)?"-":v.value.body[d]/y.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(y.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=v.value.head.map((d,f)=>[{color:d.color,name:d.name},v.value.body[f].toFixed(t.value.table.td.roundingValue),isNaN(v.value.body[f]/y.value)?"-":(v.value.body[f]/y.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={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},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:u}});function Q(){return c.value}function I(){p.value.showTable=!p.value.showTable}const b=e.ref(!1);function Z(l){b.value=l}const C=e.ref(!1);function V(){C.value=!C.value}return D({getData:Q,generatePdf:S,generateCsv:L,generateImage:A,toggleTable:I,toggleAnnotator:V}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:N,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[11]||(a[11]=()=>e.unref(P)(!0)),onMouseleave:a[12]||(a[12]=()=>e.unref(P)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(se.PenAndPaper,{key:0,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:V},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),R.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:W,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",de,[e.createVNode(te._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref($)||e.unref(w))?(e.openBlock(),e.createBlock(F.UserOptions,{key:3,ref_key:"details",ref:U,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(E),isImaging:e.unref(O),uid:h.value,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,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:Z,onGeneratePdf:e.unref(S),onGenerateCsv:L,onGenerateImage:e.unref(A),onToggleTable:I,onToggleAnnotator:V,style:e.normalizeStyle({visibility:e.unref($)?e.unref(w)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${i.value.width} ${i.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ne._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:i.value.width,height:i.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,ye)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,he),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,pe)],8,me)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:i.value.width/2,y1:i.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,fe))),256)),e.createElementVNode("path",{d:x.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,ke),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,ge),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,be),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,Ce),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,Ne),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,we),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,xe),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,Ve),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,_e),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,Be),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,Pe),e.createElementVNode("path",{d:e.unref(r.makePath)(T.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,$e),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value.map(o=>o.plots),(o,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,Me),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Ee),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Oe),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),9,Se),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/y.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,Ae)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,ve)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Te,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(E)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ae.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(oe.Legend,{legendSet:c.value,config:Y.value,key:`legend_${B.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>J(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(k.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(k.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(k.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(k.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(k.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",Ie,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Le)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:c.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(re.default,{key:9,hideDetails:"",config:{open:p.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.createVNode(le.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[10]||(a[10]=o=>p.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,qe)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ce))}},De=ie._export_sfc(ze,[["__scopeId","data-v-171d740b"]]);exports.default=De;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Dla35rDR.cjs"),he=require("./useResponsive-BJ7DTGpm.cjs"),Ee=require("./Title-DDaORN3r.cjs"),ye=require("./usePrinter-cQwX-nf0.cjs"),Fe=require("./DataTable-BLEXsQBY.cjs"),Te=require("./Tooltip-DwioWtpe.cjs"),Oe=require("./Legend-BvLLHGBp.cjs"),Pe=require("./vue-ui-skeleton-BIuKWqj2.cjs"),ze=require("./vue-ui-accordion-DcbFZ2D3.cjs"),me=require("./useNestedProp-onENMM4v.cjs"),De=require("./PackageVersion-B7vHZ873.cjs"),Ae=require("./PenAndPaper-C2r4IIot.cjs"),Ie=require("./useUserOptionState-BgepsfED.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ue=["id"],qe=["xmlns","viewBox"],Re=["width","height"],Ye=["id"],Xe=["offset","stop-color"],Ge=["offset","stop-opacity"],He=["id"],We=["id"],Je=["id"],Ke=["flood-color"],Qe=["d","fill","stroke","stroke-width","filter"],Ze={key:1},je=["d","fill"],et={key:2},tt=["x","y","font-size","font-weight","fill"],lt={key:3},at=["filter"],ot=["text-anchor","x","y","fill","font-size","font-weight"],nt=["text-anchor","x","y","fill","font-size","font-weight"],rt=["text-anchor","x","y","fill","font-size","font-weight"],st=["d","fill","onMouseenter","onClick"],ut={key:5,class:"vue-data-ui-watermark"},it={key:0,class:"vue-ui-nested-donuts-legend-title"},ct=["onClick"],dt=["innerHTML"],vt={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(be,{expose:ge,emit:ke}){const{vue_ui_nested_donuts:Ce}=r.useConfig(),k=be,x=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(r.createUid()),F=e.ref(!1),T=e.ref(""),we=e.ref(null),q=e.ref(0),L=e.ref(null),R=e.ref(null),O=e.ref(null),Y=e.ref(null),X=e.ref(null),G=e.ref(0),H=e.ref(0),W=e.ref(0),B=e.ref(!1);function Le(l){B.value=l,q.value+=1}const t=e.computed({get:()=>Q(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:J,keepUserOptionState:K}=Ie.useUserOptionState({config:t.value});function Q(){const l=me.useNestedProp({userConfig:k.config,defaultConfig:Ce});return l.theme?{...me.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>k.config,l=>{t.value=Q(),P.value=!t.value.userOptions.showOnChartHover,Z(),G.value+=1,H.value+=1,W.value+=1,v.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const $=e.ref(null);e.onMounted(()=>{Z()});function Z(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=he.throttle(()=>{const{width:s,height:o}=he.useResponsive({chart:L.value,title:t.value.style.chart.title.text?R.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:Y.value,noTitle:X.value});requestAnimationFrame(()=>{c.value.width=s,c.value.height=o})});$.value=new ResizeObserver(l),$.value.observe(L.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:j,isImaging:ee,generatePdf:te,generateImage:le}=ye.usePrinter({elementId:`nested_donuts_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),xe=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),c=e.ref({height:512,width:512}),ae=ke;function $e({datapoint:l,index:s}){ae("selectDatapoint",{datapoint:l,index:s})}const f=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,s)=>({...l,total:l.series.filter(o=>!f.value.includes(o.id)).map(o=>r.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:s,id:`${h.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${h.value}_${s}`,id:`${h.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||xe.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:r.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),oe=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!f.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!f.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function Ne(l,s,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<s}const d=e.ref(oe.value);e.watch(()=>oe.value,l=>d.value=l);const ne=e.ref(null),re=e.ref(null);function z(l){ae("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=d.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),p=Ne(u,u.length-1,f.value);if(f.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(ne.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),ne.value=requestAnimationFrame(i))};f.value=f.value.filter(y=>y!==l.id),i()}else if(p){let i=function(){a<.1?(cancelAnimationFrame(re.value),f.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:0}:w)}))):(a/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:a}:w)})),re.value=requestAnimationFrame(i))};i()}}const D=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),se=e.computed(()=>d.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>d.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,D.value)}})),ue=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),ie=e.ref(null),S=e.ref(null),_=e.ref(null),A=e.ref(null);function Se({datapoint:l,_relativeIndex:s,seriesIndex:o}){ie.value=l.arcOfId,S.value=l.id,_.value=o,A.value={datapoint:l,seriesIndex:o,series:d.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:d.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:d.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0){const u=d.value.map(p=>p.series.find(i=>i.seriesIndex===o));u.forEach((p,i)=>{if(!p)return"";a+=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Bmq5HB9y.cjs"),he=require("./useResponsive-BJ7DTGpm.cjs"),Ee=require("./Title-x7Hmi2zb.cjs"),ye=require("./usePrinter-Cf6Zct5m.cjs"),Fe=require("./DataTable-Cybmjq2W.cjs"),Te=require("./Tooltip-pA64woiQ.cjs"),Oe=require("./Legend-Bf8J9KZk.cjs"),Pe=require("./vue-ui-skeleton-D5890icn.cjs"),ze=require("./vue-ui-accordion-WWblnzaJ.cjs"),me=require("./useNestedProp-CivZENAh.cjs"),De=require("./PackageVersion-Bmro6-lR.cjs"),Ae=require("./PenAndPaper-B7dv_ssy.cjs"),Ie=require("./useUserOptionState-BgepsfED.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ue=["id"],qe=["xmlns","viewBox"],Re=["width","height"],Ye=["id"],Xe=["offset","stop-color"],Ge=["offset","stop-opacity"],He=["id"],We=["id"],Je=["id"],Ke=["flood-color"],Qe=["d","fill","stroke","stroke-width","filter"],Ze={key:1},je=["d","fill"],et={key:2},tt=["x","y","font-size","font-weight","fill"],lt={key:3},at=["filter"],ot=["text-anchor","x","y","fill","font-size","font-weight"],nt=["text-anchor","x","y","fill","font-size","font-weight"],rt=["text-anchor","x","y","fill","font-size","font-weight"],st=["d","fill","onMouseenter","onClick"],ut={key:5,class:"vue-data-ui-watermark"},it={key:0,class:"vue-ui-nested-donuts-legend-title"},ct=["onClick"],dt=["innerHTML"],vt={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(be,{expose:ge,emit:ke}){const{vue_ui_nested_donuts:Ce}=r.useConfig(),k=be,x=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(r.createUid()),F=e.ref(!1),T=e.ref(""),we=e.ref(null),q=e.ref(0),L=e.ref(null),R=e.ref(null),O=e.ref(null),Y=e.ref(null),X=e.ref(null),G=e.ref(0),H=e.ref(0),W=e.ref(0),B=e.ref(!1);function Le(l){B.value=l,q.value+=1}const t=e.computed({get:()=>Q(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:J,keepUserOptionState:K}=Ie.useUserOptionState({config:t.value});function Q(){const l=me.useNestedProp({userConfig:k.config,defaultConfig:Ce});return l.theme?{...me.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>k.config,l=>{t.value=Q(),P.value=!t.value.userOptions.showOnChartHover,Z(),G.value+=1,H.value+=1,W.value+=1,v.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const $=e.ref(null);e.onMounted(()=>{Z()});function Z(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=he.throttle(()=>{const{width:s,height:o}=he.useResponsive({chart:L.value,title:t.value.style.chart.title.text?R.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:Y.value,noTitle:X.value});requestAnimationFrame(()=>{c.value.width=s,c.value.height=o})});$.value=new ResizeObserver(l),$.value.observe(L.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:j,isImaging:ee,generatePdf:te,generateImage:le}=ye.usePrinter({elementId:`nested_donuts_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),xe=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),c=e.ref({height:512,width:512}),ae=ke;function $e({datapoint:l,index:s}){ae("selectDatapoint",{datapoint:l,index:s})}const f=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,s)=>({...l,total:l.series.filter(o=>!f.value.includes(o.id)).map(o=>r.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:s,id:`${h.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${h.value}_${s}`,id:`${h.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||xe.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:r.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),oe=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!f.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!f.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function Ne(l,s,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<s}const d=e.ref(oe.value);e.watch(()=>oe.value,l=>d.value=l);const ne=e.ref(null),re=e.ref(null);function z(l){ae("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=d.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),p=Ne(u,u.length-1,f.value);if(f.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(ne.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),ne.value=requestAnimationFrame(i))};f.value=f.value.filter(y=>y!==l.id),i()}else if(p){let i=function(){a<.1?(cancelAnimationFrame(re.value),f.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:0}:w)}))):(a/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:a}:w)})),re.value=requestAnimationFrame(i))};i()}}const D=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),se=e.computed(()=>d.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>d.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,D.value)}})),ue=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),ie=e.ref(null),S=e.ref(null),_=e.ref(null),A=e.ref(null);function Se({datapoint:l,_relativeIndex:s,seriesIndex:o}){ie.value=l.arcOfId,S.value=l.id,_.value=o,A.value={datapoint:l,seriesIndex:o,series:d.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:d.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:d.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0){const u=d.value.map(p=>p.series.find(i=>i.seriesIndex===o));u.forEach((p,i)=>{if(!p)return"";a+=`
2
2
  <div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
3
3
  <div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
4
4
  <svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">