vue-data-ui 2.3.91 → 2.3.92

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 (149) hide show
  1. package/README.md +3 -2
  2. package/dist/{Arrow-CHTslrAF.js → Arrow-16rQhq4i.js} +1 -1
  3. package/dist/{Arrow-DpuaFuue.cjs → Arrow-CdJD01md.cjs} +1 -1
  4. package/dist/{BaseIcon-DfaCNBgc.js → BaseIcon-CAmYNoaf.js} +1 -1
  5. package/dist/{BaseIcon-JWGtHqTA.cjs → BaseIcon-dYWMubrH.cjs} +1 -1
  6. package/dist/{DataTable-BKc3r3k3.js → DataTable-BXnbua0J.js} +2 -2
  7. package/dist/{DataTable-CnkdsvIo.cjs → DataTable-oa0Srfuc.cjs} +1 -1
  8. package/dist/{Legend-WNL92WSx.js → Legend-Cr1hulgT.js} +1 -1
  9. package/dist/{Legend-BQJV6Xk4.cjs → Legend-Dhm9_peB.cjs} +1 -1
  10. package/dist/{PackageVersion-D9PU8glB.js → PackageVersion-BVZfgDqm.js} +1 -1
  11. package/dist/{PackageVersion-LdLhc8hQ.cjs → PackageVersion-BkgJVmj1.cjs} +1 -1
  12. package/dist/{Shape-DPvoEBm9.js → Shape-D75m5xWM.js} +1 -1
  13. package/dist/{Shape-CgW0V2Og.cjs → Shape-hGbEoQOv.cjs} +1 -1
  14. package/dist/{Slicer-Dma3nlzi.cjs → Slicer-B7ya0m2Q.cjs} +1 -1
  15. package/dist/{Slicer-DE9nFM_c.js → Slicer-Bx8AozB8.js} +2 -2
  16. package/dist/{Title-CECK1w9L.js → Title-1Sw6EmHy.js} +1 -1
  17. package/dist/{Title-Bg_BK11V.cjs → Title-Bjrh7khe.cjs} +1 -1
  18. package/dist/{Tooltip-lM1Jzkza.cjs → Tooltip-CPATjuur.cjs} +1 -1
  19. package/dist/{Tooltip-Ci3AprCm.js → Tooltip-EJf3VBPR.js} +1 -1
  20. package/dist/documentation/installation.md +1 -1
  21. package/dist/index-D09qCApg.cjs +4 -0
  22. package/dist/{index-mBy4elhB.js → index-DhJby8wL.js} +8 -3
  23. package/dist/style.css +1 -1
  24. package/dist/types/vue-data-ui.d.cts +16 -0
  25. package/dist/types/vue-data-ui.d.ts +16 -0
  26. package/dist/{useNestedProp-m8IH8hWW.cjs → useNestedProp-Bwd7mK1Z.cjs} +1 -1
  27. package/dist/{useNestedProp-BrIRtQj1.js → useNestedProp-CrHvyupb.js} +1 -1
  28. package/dist/{usePrinter-Ck-yukK2.js → usePrinter-Bwm8J3RQ.js} +1 -1
  29. package/dist/{usePrinter-B8jr_V3b.cjs → usePrinter-DdsPm5a4.cjs} +1 -1
  30. package/dist/{vue-data-ui-BuL-2aYA.js → vue-data-ui-CLxne31S.js} +57 -57
  31. package/dist/{vue-data-ui-BgaY7Noy.cjs → vue-data-ui-ZitCqVgG.cjs} +1 -1
  32. package/dist/vue-data-ui.cjs +1 -1
  33. package/dist/vue-data-ui.js +1 -1
  34. package/dist/{vue-ui-3d-bar-C9a-AsIX.cjs → vue-ui-3d-bar-DAv5cYGJ.cjs} +1 -1
  35. package/dist/{vue-ui-3d-bar-Cv-56A3m.js → vue-ui-3d-bar-Dg87_AAm.js} +8 -8
  36. package/dist/{vue-ui-accordion-Bzq1iTL2.cjs → vue-ui-accordion-BAHX7KzB.cjs} +1 -1
  37. package/dist/{vue-ui-accordion-dyF20BlD.js → vue-ui-accordion-Cn5Jbplg.js} +3 -3
  38. package/dist/{vue-ui-age-pyramid-DDPU8QV8.cjs → vue-ui-age-pyramid-GzHwQzsH.cjs} +1 -1
  39. package/dist/{vue-ui-age-pyramid-BqsDR6uw.js → vue-ui-age-pyramid-PlamQWqC.js} +9 -9
  40. package/dist/{vue-ui-annotator-B9HxrEVE.cjs → vue-ui-annotator-DGgQwl-K.cjs} +1 -1
  41. package/dist/{vue-ui-annotator-CkJsRR0r.js → vue-ui-annotator-Dd5KF_cy.js} +1 -1
  42. package/dist/{vue-ui-candlestick-DbbbJa-d.cjs → vue-ui-candlestick-BIEB2J1w.cjs} +1 -1
  43. package/dist/{vue-ui-candlestick-B8eYA2g0.js → vue-ui-candlestick-DTzwPhV5.js} +10 -10
  44. package/dist/{vue-ui-carousel-table-CCWGcKb7.cjs → vue-ui-carousel-table-HNTf5AYY.cjs} +1 -1
  45. package/dist/{vue-ui-carousel-table-BCiTg3Ok.js → vue-ui-carousel-table-YEfvPESA.js} +4 -4
  46. package/dist/{vue-ui-chestnut-rsWP_sXY.cjs → vue-ui-chestnut-DzjdAYsT.cjs} +1 -1
  47. package/dist/{vue-ui-chestnut-DI-N69Ad.js → vue-ui-chestnut-PzMOM7mp.js} +7 -7
  48. package/dist/{vue-ui-cursor-wY14Z-Vd.cjs → vue-ui-cursor-C5rsiCdn.cjs} +1 -1
  49. package/dist/{vue-ui-cursor-BUzJk1oC.js → vue-ui-cursor-DWea2yXV.js} +2 -2
  50. package/dist/{vue-ui-dashboard-Cf8TYbAr.cjs → vue-ui-dashboard-BqXhoS8m.cjs} +1 -1
  51. package/dist/{vue-ui-dashboard-CiG3kXLl.js → vue-ui-dashboard-CVespiTo.js} +2 -2
  52. package/dist/{vue-ui-digits-DZJI0YuX.js → vue-ui-digits-gNKgZqYU.js} +2 -2
  53. package/dist/{vue-ui-digits-BBho1-xO.cjs → vue-ui-digits-wmDN7Vkf.cjs} +1 -1
  54. package/dist/{vue-ui-donut-evolution-BtTiBfLb.js → vue-ui-donut-evolution-Ch6HH0ja.js} +10 -10
  55. package/dist/{vue-ui-donut-evolution-BVnSrr-b.cjs → vue-ui-donut-evolution-DhDxLZ1J.cjs} +1 -1
  56. package/dist/{vue-ui-donut-D4WpeX9W.cjs → vue-ui-donut-n37BZPxr.cjs} +1 -1
  57. package/dist/{vue-ui-donut-CBG9ECp8.js → vue-ui-donut-sQunZI1L.js} +10 -10
  58. package/dist/{vue-ui-dumbbell-BQKiB9yH.cjs → vue-ui-dumbbell-B9Z_pjnG.cjs} +1 -1
  59. package/dist/{vue-ui-dumbbell-DlEN2c_X.js → vue-ui-dumbbell-lFlZX8Yi.js} +9 -9
  60. package/dist/{vue-ui-flow-DfMNmttZ.cjs → vue-ui-flow-BaFpUJg-.cjs} +1 -1
  61. package/dist/{vue-ui-flow-CXqGztWj.js → vue-ui-flow-CSIOC-JR.js} +8 -8
  62. package/dist/{vue-ui-galaxy-CGn5nkD5.cjs → vue-ui-galaxy-BIR5GxIc.cjs} +1 -1
  63. package/dist/{vue-ui-galaxy-xI38Kf-S.js → vue-ui-galaxy-DL2mnel_.js} +10 -10
  64. package/dist/{vue-ui-gauge-BEludqYn.js → vue-ui-gauge-BMq7KT3t.js} +6 -6
  65. package/dist/{vue-ui-gauge-Bz-OSNOJ.cjs → vue-ui-gauge-r_qvpwE7.cjs} +1 -1
  66. package/dist/{vue-ui-gizmo-CZZB7YgY.cjs → vue-ui-gizmo-DBas_Sw_.cjs} +1 -1
  67. package/dist/{vue-ui-gizmo-BB28OTr1.js → vue-ui-gizmo-Dj7zvNI1.js} +3 -3
  68. package/dist/{vue-ui-heatmap-mywZXUV8.js → vue-ui-heatmap-pqBYIrxm.js} +9 -9
  69. package/dist/{vue-ui-heatmap-BtUvE7rK.cjs → vue-ui-heatmap-qPgEhAzc.cjs} +1 -1
  70. package/dist/{vue-ui-kpi-CEAGjnkj.cjs → vue-ui-kpi-Cmo9J7wp.cjs} +1 -1
  71. package/dist/{vue-ui-kpi-zr721ux9.js → vue-ui-kpi-ZPBinMiF.js} +3 -3
  72. package/dist/{vue-ui-mini-loader-DBFAzGb2.cjs → vue-ui-mini-loader-Ce-jbgMT.cjs} +1 -1
  73. package/dist/{vue-ui-mini-loader-9zyuKIpT.js → vue-ui-mini-loader-DOTWhLi9.js} +2 -2
  74. package/dist/{vue-ui-molecule-DltNL0kV.cjs → vue-ui-molecule-D429iwPP.cjs} +1 -1
  75. package/dist/{vue-ui-molecule-Bv_ppQig.js → vue-ui-molecule-RDpgNrHQ.js} +10 -10
  76. package/dist/{vue-ui-mood-radar-CIK2Xohn.js → vue-ui-mood-radar-CD5L8WCU.js} +10 -10
  77. package/dist/{vue-ui-mood-radar-CQkF2Rp1.cjs → vue-ui-mood-radar-CdLJxrkT.cjs} +1 -1
  78. package/dist/{vue-ui-nested-donuts-f-cMx3iQ.js → vue-ui-nested-donuts-A-tid5cQ.js} +10 -10
  79. package/dist/{vue-ui-nested-donuts-vHr23QlH.cjs → vue-ui-nested-donuts-DyM3uc7x.cjs} +1 -1
  80. package/dist/{vue-ui-onion-B6ZrryDW.cjs → vue-ui-onion-BKql8oal.cjs} +1 -1
  81. package/dist/{vue-ui-onion-CmUXelhy.js → vue-ui-onion-Cap01Ehu.js} +10 -10
  82. package/dist/{vue-ui-parallel-coordinate-plot-BU0yoxD9.cjs → vue-ui-parallel-coordinate-plot-B0zMgtnq.cjs} +1 -1
  83. package/dist/{vue-ui-parallel-coordinate-plot-h9dS2u_k.js → vue-ui-parallel-coordinate-plot-CcDKe4L0.js} +11 -11
  84. package/dist/{vue-ui-quadrant-DNT_0fTL.js → vue-ui-quadrant-BDEfAeyJ.js} +11 -11
  85. package/dist/{vue-ui-quadrant-DPPXilUd.cjs → vue-ui-quadrant-CZzdpeQ2.cjs} +1 -1
  86. package/dist/{vue-ui-quick-chart-T6C0BTyw.js → vue-ui-quick-chart-DlAUYg5u.js} +8 -8
  87. package/dist/{vue-ui-quick-chart-1gG267X0.cjs → vue-ui-quick-chart-DpGYUyhq.cjs} +1 -1
  88. package/dist/{vue-ui-radar-CfCHXIYJ.js → vue-ui-radar-CbTln7gs.js} +11 -11
  89. package/dist/{vue-ui-radar-DpzjMFZD.cjs → vue-ui-radar-oBeaHlpT.cjs} +1 -1
  90. package/dist/{vue-ui-rating-DYcT_LS-.cjs → vue-ui-rating-BU7-F3_e.cjs} +1 -1
  91. package/dist/{vue-ui-rating-DuRLpMwk.js → vue-ui-rating-BkDncqow.js} +2 -2
  92. package/dist/{vue-ui-relation-circle-WmZMKqHL.js → vue-ui-relation-circle-C5B6UNGd.js} +6 -6
  93. package/dist/{vue-ui-relation-circle-BMrPtD2n.cjs → vue-ui-relation-circle-IWiJWgcB.cjs} +1 -1
  94. package/dist/{vue-ui-rings-Ce0Z_osd.js → vue-ui-rings-BujVUJ90.js} +10 -10
  95. package/dist/{vue-ui-rings-CkYl3uce.cjs → vue-ui-rings-Df2cRgD8.cjs} +1 -1
  96. package/dist/{vue-ui-scatter-DY9EpoGP.js → vue-ui-scatter-D6yqZJ7s.js} +11 -11
  97. package/dist/{vue-ui-scatter-Cjie2D-t.cjs → vue-ui-scatter-jFTeM2hW.cjs} +1 -1
  98. package/dist/{vue-ui-screenshot-lQLJHBQ2.js → vue-ui-screenshot-CHAySwpv.js} +1 -1
  99. package/dist/{vue-ui-screenshot-BCFym6go.cjs → vue-ui-screenshot-CVu8IM33.cjs} +1 -1
  100. package/dist/{vue-ui-skeleton-DDhwPZd_.js → vue-ui-skeleton-ASX40MGk.js} +3 -3
  101. package/dist/{vue-ui-skeleton-Cf89QIhl.cjs → vue-ui-skeleton-CAlTn_Cg.cjs} +1 -1
  102. package/dist/{vue-ui-smiley-xxMwBT9c.js → vue-ui-smiley-DGVzhza2.js} +2 -2
  103. package/dist/{vue-ui-smiley-DMA6fgGr.cjs → vue-ui-smiley-dwCqhB0r.cjs} +1 -1
  104. package/dist/{vue-ui-spark-trend-Btj_H6fa.cjs → vue-ui-spark-trend-A1EHFK_r.cjs} +1 -1
  105. package/dist/{vue-ui-spark-trend-CLHTqp94.js → vue-ui-spark-trend-B7XhDvTj.js} +5 -5
  106. package/dist/{vue-ui-sparkbar-Btk6snt4.js → vue-ui-sparkbar-BuNcvi66.js} +4 -4
  107. package/dist/{vue-ui-sparkbar-CKrbBVKQ.cjs → vue-ui-sparkbar-CwNjHOjD.cjs} +1 -1
  108. package/dist/{vue-ui-sparkgauge-DfWLtFYS.cjs → vue-ui-sparkgauge-ISu154lS.cjs} +1 -1
  109. package/dist/{vue-ui-sparkgauge-DKJtFTSv.js → vue-ui-sparkgauge-JY2kB9WX.js} +4 -4
  110. package/dist/{vue-ui-sparkhistogram-wHJ-8zVV.cjs → vue-ui-sparkhistogram-C8zyC-ii.cjs} +1 -1
  111. package/dist/{vue-ui-sparkhistogram-JRLlw9EX.js → vue-ui-sparkhistogram-DyEPWxkP.js} +5 -5
  112. package/dist/{vue-ui-sparkline-DElVaalm.cjs → vue-ui-sparkline-DL3Thtc4.cjs} +1 -1
  113. package/dist/{vue-ui-sparkline-tBF9iaNm.js → vue-ui-sparkline-DYC3sdvQ.js} +4 -4
  114. package/dist/{vue-ui-sparkstackbar-BS9I8en7.js → vue-ui-sparkstackbar-7TmtP3WR.js} +4 -4
  115. package/dist/{vue-ui-sparkstackbar-tZa2IYHP.cjs → vue-ui-sparkstackbar-ChIM9bn2.cjs} +1 -1
  116. package/dist/{vue-ui-stackbar-UiX8q4yL.js → vue-ui-stackbar-CP5C6Gb_.js} +11 -11
  117. package/dist/{vue-ui-stackbar-rOa0atA9.cjs → vue-ui-stackbar-DrtiSaNc.cjs} +1 -1
  118. package/dist/{vue-ui-strip-plot-hRy6QRHK.cjs → vue-ui-strip-plot-BMYMIHGu.cjs} +1 -1
  119. package/dist/{vue-ui-strip-plot-BOkfg5vB.js → vue-ui-strip-plot-DJQCq_KE.js} +10 -10
  120. package/dist/{vue-ui-table-B9dc0l0k.cjs → vue-ui-table-D6hvgMif.cjs} +1 -1
  121. package/dist/{vue-ui-table-Dtfv71zG.js → vue-ui-table-IJi0xaVg.js} +1 -1
  122. package/dist/{vue-ui-table-heatmap-DUQEHohs.cjs → vue-ui-table-heatmap-BZNKXZNs.cjs} +1 -1
  123. package/dist/{vue-ui-table-heatmap-BMl-sP5Q.js → vue-ui-table-heatmap-Ls8_xq0D.js} +4 -4
  124. package/dist/{vue-ui-table-sparkline-BVnGb-lu.cjs → vue-ui-table-sparkline-BQFK30H1.cjs} +1 -1
  125. package/dist/{vue-ui-table-sparkline-BeunspIj.js → vue-ui-table-sparkline-BeuvdssX.js} +5 -5
  126. package/dist/{vue-ui-thermometer-A3Xxn5Ly.cjs → vue-ui-thermometer-DKm8SXlE.cjs} +1 -1
  127. package/dist/{vue-ui-thermometer-Cb9ALBj_.js → vue-ui-thermometer-DPWIvG92.js} +6 -6
  128. package/dist/{vue-ui-timer-2PRDq1w6.js → vue-ui-timer-CEzDvZf7.js} +5 -5
  129. package/dist/{vue-ui-timer-DltmIdrq.cjs → vue-ui-timer-n6lv7oTx.cjs} +1 -1
  130. package/dist/{vue-ui-tiremarks-BTlJcW4v.cjs → vue-ui-tiremarks-B33mHXZN.cjs} +1 -1
  131. package/dist/{vue-ui-tiremarks-Bse3PMGV.js → vue-ui-tiremarks-BUGoY22W.js} +6 -6
  132. package/dist/{vue-ui-treemap-Cv_mHK8H.cjs → vue-ui-treemap-DPxBZUUr.cjs} +1 -1
  133. package/dist/{vue-ui-treemap-D8fjVYq0.js → vue-ui-treemap-DmOYjJ_F.js} +10 -10
  134. package/dist/{vue-ui-vertical-bar-ZgJq3_CI.cjs → vue-ui-vertical-bar-BJMYX8t4.cjs} +1 -1
  135. package/dist/{vue-ui-vertical-bar-BVldPT8k.js → vue-ui-vertical-bar-BpVKdSY5.js} +10 -10
  136. package/dist/{vue-ui-waffle-BpeGEjCl.cjs → vue-ui-waffle-DGcueccy.cjs} +1 -1
  137. package/dist/{vue-ui-waffle-wikAjwZY.js → vue-ui-waffle-ULg6SwPx.js} +10 -10
  138. package/dist/{vue-ui-wheel-BlgfdULS.cjs → vue-ui-wheel-CWKq-CFW.cjs} +1 -1
  139. package/dist/{vue-ui-wheel-D5qyBs0Y.js → vue-ui-wheel-DlmgZd-_.js} +6 -6
  140. package/dist/vue-ui-word-cloud-BhHWdmqP.cjs +1 -0
  141. package/dist/vue-ui-word-cloud-DWyboczt.js +574 -0
  142. package/dist/{vue-ui-xy-FHLTc7xG.cjs → vue-ui-xy-Cz81fw_E.cjs} +1 -1
  143. package/dist/{vue-ui-xy-CUjllUSv.js → vue-ui-xy-V13Ns1gv.js} +13 -13
  144. package/dist/{vue-ui-xy-canvas-BkOlPU8e.js → vue-ui-xy-canvas-B9cRe5gT.js} +10 -10
  145. package/dist/{vue-ui-xy-canvas-BJUnRVuf.cjs → vue-ui-xy-canvas-GiuHOyj5.cjs} +1 -1
  146. package/package.json +1 -1
  147. package/dist/index-BhH89oF0.cjs +0 -4
  148. package/dist/vue-ui-word-cloud-Bcdl2iE-.js +0 -515
  149. package/dist/vue-ui-word-cloud-sNzfl_Tq.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-BhH89oF0.cjs"),ne=require("./Title-Bg_BK11V.cjs"),J=require("./usePrinter-B8jr_V3b.cjs"),re=require("./Tooltip-lM1Jzkza.cjs"),ie=require("./vue-ui-skeleton-Cf89QIhl.cjs"),de=require("./BaseIcon-JWGtHqTA.cjs"),ce=require("./vue-ui-accordion-Bzq1iTL2.cjs"),Q=require("./useNestedProp-m8IH8hWW.cjs"),ve=require("./PackageVersion-LdLhc8hQ.cjs"),ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),pe=["id"],he={key:0,style:"width:100%;background:transparent"},ge=["xmlns","viewBox"],fe=["x","y","width","height","fill","stroke","stroke-width"],me=["x","y","width","height","fill","stroke","stroke-width"],be=["font-size","font-weight","fill","x","y"],xe=["x","y","width","height","onMouseover"],ke={key:0},we=["font-size","fill","x","y","font-weight"],_e={key:0},Ce=["text-anchor","font-size","fill","font-weight","transform"],Ne={key:1},Le=["x","y","width","height","stroke","stroke-width"],Be={key:2},Ve=["id"],$e=["stop-color"],Ee=["stop-color"],Se=["x","y","font-size","fill"],ze=["x","y","height","rx","fill"],Ae=["x","y","font-size","fill"],Te=["stroke","x1","x2","y1","y2"],Me=["fill","d"],Pe={key:3},Fe={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Oe=["stop-color"],De=["stop-color"],Ie=["x","y","width","height","rx"],Re=["x","y","font-size","fill"],qe=["x","y","font-size","fill"],He=["stroke","x1","x2","y1","y2"],Ue=["fill","d"],Ge={key:3,class:"vue-data-ui-watermark"},Xe={class:"vue-ui-data-table"},je={key:0},Ye=["data-cell"],We={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ke=["data-cell"],Je={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Qe={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(B,{expose:Z}){const n=B;e.useCssVars(l=>({"1678b056":l.tdo}));const{vue_ui_heatmap:ee}=o.useConfig(),V=e.computed(()=>!!n.dataset&&n.dataset.length);o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiHeatmap",type:"dataset"});const k=e.ref(o.createUid()),S=e.ref(null),te=e.ref(null),z=e.ref(!1),A=e.ref(""),O=e.ref(void 0),w=e.ref(null),D=e.ref(0),I=e.ref(null),R=e.ref(!1),q=e.ref(0),t=e.computed({get:()=>H(),set:l=>l});function H(){const l=Q.useNestedProp({userConfig:n.config,defaultConfig:ee});let s={};return l.theme?s={...Q.useNestedProp({userConfig:o.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:s=l,n.config&&o.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?s.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:s.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,s}e.watch(()=>n.config,l=>{t.value=H(),T(),q.value+=1},{deep:!0}),e.watch(()=>n.dataset,()=>{T()},{deep:!0});const{isPrinting:U,isImaging:G,generatePdf:X,generateImage:j}=J.usePrinter({elementId:`heatmap__${k.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),le=e.computed(()=>t.value.table.responsiveBreakpoint);function ae(){new ResizeObserver(s=>{s.forEach(u=>{R.value=u.contentRect.width<le.value})}).observe(I.value)}e.onMounted(T);function T(){ae()}const x=e.computed(()=>Math.max(...n.dataset.flatMap(l=>(l.values||[]).length))),p=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+n.dataset.length*t.value.style.layout.cells.height,s=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(x.value<n.dataset.length?n.dataset.length:x.value)*t.value.style.layout.cells.height,u=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:u,width:s}}),$=e.computed(()=>t.value.style.legend.position),a=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:p.value.width-t.value.style.layout.padding.right-($.value==="right"&&t.value.style.legend.show?92:0),bottom:p.value.height-t.value.style.layout.padding.bottom,height:p.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:p.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-($.value==="right"&&t.value.style.legend.show?92:0)})),M=e.computed(()=>i.value.height*n.dataset.length),v=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:a.value.width/x.value,height:a.value.width/(x.value<n.dataset.length?n.dataset.length:x.value)})),h=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:n.dataset.map(u=>u.name),s=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:s.slice(0,x.value)}}),E=e.computed(()=>(n.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{o.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:s})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((s,u)=>s>=b.value?{side:"up",color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),ratio:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value))>1?1:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value)),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(s)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(s)/Math.abs(b.value)),color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`})})))),g=e.ref(null),_=e.ref(null);function oe(l,s,u,r){w.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:f,id:ue}=l;O.value=ue,g.value=d,_.value={datapoint:l,seriesIndex:s,series:E.value,config:t.value},z.value=!0;let P="";const F=t.value.style.tooltip.customFormat;o.isFunction(F)&&o.functionReturnsString(()=>F({datapoint:l,seriesIndex:s,series:E.value,config:t.value}))?A.value=F({datapoint:l,seriesIndex:s,series:E.value,config:t.value}):(P+=`<div>${c} ${f?`${f}`:""}</div>`,P+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,d)}">⬤</span><span>${isNaN(d)?"-":o.applyDataLabel(t.value.style.layout.cells.value.formatter,d,o.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:s})}</span></div>`,A.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${P}</div>`)}const C=e.computed(()=>a.value.top+M.value*(1-g.value/v.value)),N=e.computed(()=>a.value.left+(p.value.width-a.value.left-t.value.style.layout.padding.right)*(g.value/v.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),s=n.dataset.map(u=>u.values);return{head:l,body:s}});function Y(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],s=[];for(let d=0;d<h.value.xLabels.length;d+=1){const c=[h.value.xLabels[d]];for(let f=0;f<n.dataset.length;f+=1)c.push([n.dataset[f].values[d]]);s.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(s),r=o.createCsvContent(u);o.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const L=e.ref(!1);function se(l){L.value=l,D.value+=1}function W(){y.value.showTable=!y.value.showTable}function K(){y.value.showTooltip=!y.value.showTooltip}return Z({generatePdf:X,generateCsv:Y,generateImage:j,toggleTable:W,toggleTooltip:K}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:S,class:e.normalizeClass(`vue-ui-heatmap ${L.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}`),id:`heatmap__${k.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",he,[(e.openBlock(),e.createBlock(ne._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value?(e.openBlock(),e.createBlock(J.UserOptions,{ref_key:"details",ref:te,key:`user_options_${D.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(G),isPrinting:e.unref(U),uid:k.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:L.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:S.value,position:t.value.userOptions.position,onToggleFullscreen:se,onGeneratePdf:e.unref(X),onGenerateCsv:Y,onGenerateImage:e.unref(j),onToggleTable:W,onToggleTooltip:K},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:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":L.value,"vue-data-ui-fulscreen--off":!L.value}),viewBox:`0 0 ${p.value.width} ${p.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(ve._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(u,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,fe),e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,me),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(o.adaptColorToBackground)(d.color),x:a.value.left+i.value.width*c+i.value.width/2,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:d})),9,be)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c,y:a.value.top+i.value.height*r,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:f=>oe(d,r,a.value.left+i.value.width*c,a.value.top+i.value.height*r),onMouseout:s[0]||(s[0]=f=>{z.value=!1,O.value=void 0,g.value=null,w.value=null})},null,40,xe)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",ke,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:a.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(h.value.yLabels[r]),9,we)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&r%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+i.value.width/2+a.value.width/h.value.xLabels.length*r+t.value.style.layout.dataLabels.xAxis.offsetX}, ${a.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,Ce)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("g",Ne,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:w.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:w.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:i.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,Le)])):e.createCommentVNode("",!0),t.value.style.legend.show&&$.value==="right"?(e.openBlock(),e.createElementBlock("g",Be,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${k.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,$e),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Ee)],8,Ve)]),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Se),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:M.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${k.value})`},null,8,ze),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+M.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ae),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:C.value,y2:C.value},null,8,Te)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${a.value.right+36},${C.value} ${a.value.right+26},${C.value-8} ${a.value.right+26},${C.value+8}z`},null,8,Me)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&$.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Pe,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Fe,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,De)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height,width:p.value.width-a.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,Ie),e.createElementVNode("text",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Re),e.createElementVNode("text",{x:a.value.right,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,qe),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:N.value,x2:N.value,y1:a.value.bottom+t.value.style.layout.cells.height,y2:a.value.bottom+t.value.style.layout.cells.height*2},null,8,He)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${N.value},${a.value.bottom+t.value.style.layout.cells.height} ${N.value-12},${a.value.bottom+t.value.style.layout.cells.height-20} ${N.value+12},${a.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,Ue)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:p.value},void 0,!0)],14,ge)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:4,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(re._sfc_main,{show:y.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:S.value,content:A.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.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","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),V.value?(e.openBlock(),e.createBlock(ce.default,{key:5,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:I,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":R.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:s[1]||(s[1]=u=>y.value.showTable=!1),onKeypress:s[2]||(s[2]=e.withKeys(u=>y.value.showTable=!1,["enter"]))},[e.createVNode(de.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Xe,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",je,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(u,r)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(u.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",We,e.toDisplayString(u),1)],12,Ye),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":B.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",Je,e.toDisplayString(isNaN(d.values[r])?"-":e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[r],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,Ke))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,pe))}},Ze=ye._export_sfc(Qe,[["__scopeId","data-v-c67467bd"]]);exports.default=Ze;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-D09qCApg.cjs"),ne=require("./Title-Bjrh7khe.cjs"),J=require("./usePrinter-DdsPm5a4.cjs"),re=require("./Tooltip-CPATjuur.cjs"),ie=require("./vue-ui-skeleton-CAlTn_Cg.cjs"),de=require("./BaseIcon-dYWMubrH.cjs"),ce=require("./vue-ui-accordion-BAHX7KzB.cjs"),Q=require("./useNestedProp-Bwd7mK1Z.cjs"),ve=require("./PackageVersion-BkgJVmj1.cjs"),ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),pe=["id"],he={key:0,style:"width:100%;background:transparent"},ge=["xmlns","viewBox"],fe=["x","y","width","height","fill","stroke","stroke-width"],me=["x","y","width","height","fill","stroke","stroke-width"],be=["font-size","font-weight","fill","x","y"],xe=["x","y","width","height","onMouseover"],ke={key:0},we=["font-size","fill","x","y","font-weight"],_e={key:0},Ce=["text-anchor","font-size","fill","font-weight","transform"],Ne={key:1},Le=["x","y","width","height","stroke","stroke-width"],Be={key:2},Ve=["id"],$e=["stop-color"],Ee=["stop-color"],Se=["x","y","font-size","fill"],ze=["x","y","height","rx","fill"],Ae=["x","y","font-size","fill"],Te=["stroke","x1","x2","y1","y2"],Me=["fill","d"],Pe={key:3},Fe={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Oe=["stop-color"],De=["stop-color"],Ie=["x","y","width","height","rx"],Re=["x","y","font-size","fill"],qe=["x","y","font-size","fill"],He=["stroke","x1","x2","y1","y2"],Ue=["fill","d"],Ge={key:3,class:"vue-data-ui-watermark"},Xe={class:"vue-ui-data-table"},je={key:0},Ye=["data-cell"],We={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ke=["data-cell"],Je={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Qe={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(B,{expose:Z}){const n=B;e.useCssVars(l=>({"1678b056":l.tdo}));const{vue_ui_heatmap:ee}=o.useConfig(),V=e.computed(()=>!!n.dataset&&n.dataset.length);o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiHeatmap",type:"dataset"});const k=e.ref(o.createUid()),S=e.ref(null),te=e.ref(null),z=e.ref(!1),A=e.ref(""),O=e.ref(void 0),w=e.ref(null),D=e.ref(0),I=e.ref(null),R=e.ref(!1),q=e.ref(0),t=e.computed({get:()=>H(),set:l=>l});function H(){const l=Q.useNestedProp({userConfig:n.config,defaultConfig:ee});let s={};return l.theme?s={...Q.useNestedProp({userConfig:o.themes.vue_ui_heatmap[l.theme]||n.config,defaultConfig:l})}:s=l,n.config&&o.hasDeepProperty(n.config,"style.layout.dataLabels.xAxis.showOnlyAtModulo")?s.style.layout.dataLabels.xAxis.showOnlyAtModulo=n.config.style.layout.dataLabels.xAxis.showOnlyAtModulo:s.style.layout.dataLabels.xAxis.showOnlyAtModulo=null,s}e.watch(()=>n.config,l=>{t.value=H(),T(),q.value+=1},{deep:!0}),e.watch(()=>n.dataset,()=>{T()},{deep:!0});const{isPrinting:U,isImaging:G,generatePdf:X,generateImage:j}=J.usePrinter({elementId:`heatmap__${k.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),le=e.computed(()=>t.value.table.responsiveBreakpoint);function ae(){new ResizeObserver(s=>{s.forEach(u=>{R.value=u.contentRect.width<le.value})}).observe(I.value)}e.onMounted(T);function T(){ae()}const x=e.computed(()=>Math.max(...n.dataset.flatMap(l=>(l.values||[]).length))),p=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+n.dataset.length*t.value.style.layout.cells.height,s=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(x.value<n.dataset.length?n.dataset.length:x.value)*t.value.style.layout.cells.height,u=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:u,width:s}}),$=e.computed(()=>t.value.style.legend.position),a=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:p.value.width-t.value.style.layout.padding.right-($.value==="right"&&t.value.style.legend.show?92:0),bottom:p.value.height-t.value.style.layout.padding.bottom,height:p.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:p.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-($.value==="right"&&t.value.style.legend.show?92:0)})),M=e.computed(()=>i.value.height*n.dataset.length),v=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.values))),m=e.computed(()=>Math.min(...n.dataset.flatMap(l=>l.values))),b=e.computed(()=>{const l=n.dataset.flatMap(u=>u.values);return l.reduce((u,r)=>u+r,0)/l.length}),i=e.computed(()=>({width:a.value.width/x.value,height:a.value.width/(x.value<n.dataset.length?n.dataset.length:x.value)})),h=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:n.dataset.map(u=>u.name),s=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:s.slice(0,x.value)}}),E=e.computed(()=>(n.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(u=>{o.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:s})})}),n.dataset.map(l=>({...l,temperatures:(l.values||[]).map((s,u)=>s>=b.value?{side:"up",color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),ratio:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value))>1?1:Math.abs(Math.abs(s-b.value)/Math.abs(v.value-b.value)),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(s)/Math.abs(b.value))>1?1:Math.abs(1-Math.abs(s)/Math.abs(b.value)),color:o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,s),value:s,yAxisName:l.name,xAxisName:h.value.xLabels[u],id:`vue-data-ui-heatmap-cell-${o.createUid()}`})})))),g=e.ref(null),_=e.ref(null);function oe(l,s,u,r){w.value={x:u,y:r};const{value:d,yAxisName:c,xAxisName:f,id:ue}=l;O.value=ue,g.value=d,_.value={datapoint:l,seriesIndex:s,series:E.value,config:t.value},z.value=!0;let P="";const F=t.value.style.tooltip.customFormat;o.isFunction(F)&&o.functionReturnsString(()=>F({datapoint:l,seriesIndex:s,series:E.value,config:t.value}))?A.value=F({datapoint:l,seriesIndex:s,series:E.value,config:t.value}):(P+=`<div>${c} ${f?`${f}`:""}</div>`,P+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${o.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,m.value,v.value,d)}">⬤</span><span>${isNaN(d)?"-":o.applyDataLabel(t.value.style.layout.cells.value.formatter,d,o.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:l,seriesIndex:s})}</span></div>`,A.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${P}</div>`)}const C=e.computed(()=>a.value.top+M.value*(1-g.value/v.value)),N=e.computed(()=>a.value.left+(p.value.width-a.value.left-t.value.style.layout.padding.right)*(g.value/v.value));e.computed(()=>{const l=n.dataset.map(u=>({name:u.name})),s=n.dataset.map(u=>u.values);return{head:l,body:s}});function Y(){e.nextTick(()=>{const l=["",...n.dataset.map((d,c)=>d.name)],s=[];for(let d=0;d<h.value.xLabels.length;d+=1){const c=[h.value.xLabels[d]];for(let f=0;f<n.dataset.length;f+=1)c.push([n.dataset[f].values[d]]);s.push(c)}const u=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(s),r=o.createCsvContent(u);o.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const L=e.ref(!1);function se(l){L.value=l,D.value+=1}function W(){y.value.showTable=!y.value.showTable}function K(){y.value.showTooltip=!y.value.showTooltip}return Z({generatePdf:X,generateCsv:Y,generateImage:j,toggleTable:W,toggleTooltip:K}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:S,class:e.normalizeClass(`vue-ui-heatmap ${L.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}`),id:`heatmap__${k.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",he,[(e.openBlock(),e.createBlock(ne._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value?(e.openBlock(),e.createBlock(J.UserOptions,{ref_key:"details",ref:te,key:`user_options_${D.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(G),isPrinting:e.unref(U),uid:k.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:L.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:S.value,position:t.value.userOptions.position,onToggleFullscreen:se,onGeneratePdf:e.unref(X),onGenerateCsv:Y,onGenerateImage:e.unref(j),onToggleTable:W,onToggleTooltip:K},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:u,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":L.value,"vue-data-ui-fulscreen--off":!L.value}),viewBox:`0 0 ${p.value.width} ${p.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(ve._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(u,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,fe),e.createElementVNode("rect",{x:a.value.left+i.value.width*c+t.value.style.layout.cells.spacing/2,y:a.value.top+i.value.height*r+t.value.style.layout.cells.spacing/2,width:i.value.width-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,me),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(o.adaptColorToBackground)(d.color),x:a.value.left+i.value.width*c+i.value.width/2,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,d.value,e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.value,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.layout.cells.value.roundingValue}),{datapoint:d})),9,be)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.value.left+i.value.width*c,y:a.value.top+i.value.height*r,width:i.value.width,height:i.value.height,fill:"transparent",stroke:"none",onMouseover:f=>oe(d,r,a.value.left+i.value.width*c,a.value.top+i.value.height*r),onMouseout:s[0]||(s[0]=f=>{z.value=!1,O.value=void 0,g.value=null,w.value=null})},null,40,xe)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",ke,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:a.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:a.value.top+i.value.height*r+i.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(h.value.yLabels[r]),9,we)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo||t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo&&r%t.value.style.layout.dataLabels.xAxis.showOnlyAtModulo===0?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":t.value.style.layout.dataLabels.xAxis.rotation===0?"middle":t.value.style.layout.dataLabels.xAxis.rotation<0?"start":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",transform:`translate(${a.value.left+i.value.width/2+a.value.width/h.value.xLabels.length*r+t.value.style.layout.dataLabels.xAxis.offsetX}, ${a.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6}), rotate(${t.value.style.layout.dataLabels.xAxis.rotation})`},e.toDisplayString(u),9,Ce)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("g",Ne,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:w.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:w.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:i.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:i.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,Le)])):e.createCommentVNode("",!0),t.value.style.legend.show&&$.value==="right"?(e.openBlock(),e.createElementBlock("g",Be,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${k.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,$e),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Ee)],8,Ve)]),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Se),e.createElementVNode("rect",{x:a.value.right+36,y:a.value.top,width:36,height:M.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${k.value})`},null,8,ze),e.createElementVNode("text",{x:a.value.right+36+18,y:a.value.top+M.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Ae),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:a.value.right+36,x2:a.value.right+72,y1:C.value,y2:C.value},null,8,Te)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${a.value.right+36},${C.value} ${a.value.right+26},${C.value-8} ${a.value.right+26},${C.value+8}z`},null,8,Me)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&$.value==="bottom"?(e.openBlock(),e.createElementBlock("g",Pe,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Fe,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,De)])]),e.createElementVNode("rect",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height,width:p.value.width-a.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,Ie),e.createElementVNode("text",{x:a.value.left,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(m.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(m.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,Re),e.createElementVNode("text",{x:a.value.right,y:a.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.layout.cells.value.formatter,e.unref(o.checkNaN)(v.value),e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:e.unref(o.checkNaN)(v.value),s:t.value.style.layout.dataLabels.suffix,r:t.value.style.legend.roundingValue}))),9,qe),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(o.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:N.value,x2:N.value,y1:a.value.bottom+t.value.style.layout.cells.height,y2:a.value.bottom+t.value.style.layout.cells.height*2},null,8,He)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${N.value},${a.value.bottom+t.value.style.layout.cells.height} ${N.value-12},${a.value.bottom+t.value.style.layout.cells.height-20} ${N.value+12},${a.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,Ue)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:p.value},void 0,!0)],14,ge)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:4,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(re._sfc_main,{show:y.value.showTooltip&&z.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:S.value,content:A.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.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","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),V.value?(e.openBlock(),e.createBlock(ce.default,{key:5,hideDetails:"",config:{open:y.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:I,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":R.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:s[1]||(s[1]=u=>y.value.showTable=!1),onKeypress:s[2]||(s[2]=e.withKeys(u=>y.value.showTable=!1,["enter"]))},[e.createVNode(de.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Xe,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",je,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(u,r)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(u.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.xLabels,(u,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",We,e.toDisplayString(u),1)],12,Ye),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":B.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",Je,e.toDisplayString(isNaN(d.values[r])?"-":e.unref(o.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[r],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,Ke))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,pe))}},Ze=ye._export_sfc(Qe,[["__scopeId","data-v-c67467bd"]]);exports.default=Ze;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),g=require("./useNestedProp-m8IH8hWW.cjs"),u=require("./index-BhH89oF0.cjs"),p=require("./vue-ui-digits-BBho1-xO.cjs"),y={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(n){const o=n,{vue_ui_kpi:m}=u.useConfig(),e=a.computed({get:()=>i(),set:t=>t});function i(){return g.useNestedProp({userConfig:o.config,defaultConfig:m})}a.watch(()=>o.config,t=>{e.value=i(),r()},{deep:!0});const f=a.ref((typeof o.dataset=="number",o.dataset)),l=a.ref(e.value.useAnimation?e.value.animationValueStart:f.value),s=t=>{const v=e.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()};a.onMounted(()=>{r()});function r(){e.value.useAnimation?(l.value=e.value.animationValueStart,s(o.dataset)):l.value=o.dataset}return a.watch(()=>o.dataset,t=>{e.value.useAnimation?s(t):l.value=t}),(t,v)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(`vue-ui-kpi ${e.value.layoutClass}`),style:a.normalizeStyle(`background:${e.value.backgroundColor}; ${e.value.layoutCss}`)},[a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-title ${e.value.titleClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.titleFontSize}px; color:${e.value.titleColor}; font-weight:${e.value.titleBold?"bold":"normal"}; ${e.value.titleCss}`)},[a.renderSlot(t.$slots,"title",{comment:n.dataset}),a.createTextVNode(" "+a.toDisplayString(e.value.title),1)],6),a.renderSlot(t.$slots,"comment-before",{comment:n.dataset}),a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-value ${e.value.valueClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.valueFontSize}px; color:${e.value.valueColor}; font-weight:${e.value.valueBold?"bold":"normal"}; ${e.value.valueCss}`)},[a.renderSlot(t.$slots,"value",{comment:n.dataset}),e.value.analogDigits.show?(a.openBlock(),a.createElementBlock("div",{key:0,style:a.normalizeStyle({height:e.value.analogDigits.height+"px"})},[a.createVNode(p.default,{dataset:Number(l.value.toFixed(e.value.valueRounding)),config:{backgroundColor:e.value.backgroundColor,digits:{color:e.value.analogDigits.color,skeletonColor:e.value.analogDigits.skeletonColor}}},null,8,["dataset","config"])],4)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(a.unref(u.applyDataLabel)(e.value.formatter,l.value,a.unref(u.dataLabel)({p:e.value.prefix,v:l.value,s:e.value.suffix,r:e.value.valueRounding}))),1)],64))],6),a.renderSlot(t.$slots,"comment-after",{comment:n.dataset})],6))}};exports.default=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),g=require("./useNestedProp-Bwd7mK1Z.cjs"),u=require("./index-D09qCApg.cjs"),p=require("./vue-ui-digits-wmDN7Vkf.cjs"),y={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(n){const o=n,{vue_ui_kpi:m}=u.useConfig(),e=a.computed({get:()=>i(),set:t=>t});function i(){return g.useNestedProp({userConfig:o.config,defaultConfig:m})}a.watch(()=>o.config,t=>{e.value=i(),r()},{deep:!0});const f=a.ref((typeof o.dataset=="number",o.dataset)),l=a.ref(e.value.useAnimation?e.value.animationValueStart:f.value),s=t=>{const v=e.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()};a.onMounted(()=>{r()});function r(){e.value.useAnimation?(l.value=e.value.animationValueStart,s(o.dataset)):l.value=o.dataset}return a.watch(()=>o.dataset,t=>{e.value.useAnimation?s(t):l.value=t}),(t,v)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(`vue-ui-kpi ${e.value.layoutClass}`),style:a.normalizeStyle(`background:${e.value.backgroundColor}; ${e.value.layoutCss}`)},[a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-title ${e.value.titleClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.titleFontSize}px; color:${e.value.titleColor}; font-weight:${e.value.titleBold?"bold":"normal"}; ${e.value.titleCss}`)},[a.renderSlot(t.$slots,"title",{comment:n.dataset}),a.createTextVNode(" "+a.toDisplayString(e.value.title),1)],6),a.renderSlot(t.$slots,"comment-before",{comment:n.dataset}),a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-value ${e.value.valueClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.valueFontSize}px; color:${e.value.valueColor}; font-weight:${e.value.valueBold?"bold":"normal"}; ${e.value.valueCss}`)},[a.renderSlot(t.$slots,"value",{comment:n.dataset}),e.value.analogDigits.show?(a.openBlock(),a.createElementBlock("div",{key:0,style:a.normalizeStyle({height:e.value.analogDigits.height+"px"})},[a.createVNode(p.default,{dataset:Number(l.value.toFixed(e.value.valueRounding)),config:{backgroundColor:e.value.backgroundColor,digits:{color:e.value.analogDigits.color,skeletonColor:e.value.analogDigits.skeletonColor}}},null,8,["dataset","config"])],4)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(a.unref(u.applyDataLabel)(e.value.formatter,l.value,a.unref(u.dataLabel)({p:e.value.prefix,v:l.value,s:e.value.suffix,r:e.value.valueRounding}))),1)],64))],6),a.renderSlot(t.$slots,"comment-after",{comment:n.dataset})],6))}};exports.default=y;
@@ -1,7 +1,7 @@
1
1
  import { computed as N, watch as p, ref as C, onMounted as D, openBlock as i, createElementBlock as s, normalizeClass as v, normalizeStyle as u, createElementVNode as $, renderSlot as n, createTextVNode as y, toDisplayString as k, createVNode as S, Fragment as x, unref as h } from "vue";
2
- import { u as z } from "./useNestedProp-BrIRtQj1.js";
3
- import { u as A, i as w, f as B } from "./index-mBy4elhB.js";
4
- import L from "./vue-ui-digits-DZJI0YuX.js";
2
+ import { u as z } from "./useNestedProp-CrHvyupb.js";
3
+ import { u as A, i as w, f as B } from "./index-DhJby8wL.js";
4
+ import L from "./vue-ui-digits-gNKgZqYU.js";
5
5
  const T = {
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-m8IH8hWW.cjs"),n=require("./index-BhH89oF0.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){const a=u;e.useCssVars(k=>({"221651ee":c.value,d11bae38:d.value,d85c00de:p.value}));const{vue_ui_mini_loader:i}=n.useConfig(),t=e.computed(()=>v.useNestedProp({userConfig:a.config,defaultConfig:i})),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-Bwd7mK1Z.cjs"),n=require("./index-D09qCApg.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){const a=u;e.useCssVars(k=>({"221651ee":c.value,d11bae38:d.value,d85c00de:p.value}));const{vue_ui_mini_loader:i}=n.useConfig(),t=e.computed(()=>v.useNestedProp({userConfig:a.config,defaultConfig:i})),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, openBlock as n, createElementBlock as u, unref as M, createElementVNode as t, normalizeStyle as l, createCommentVNode as a } from "vue";
2
- import { u as m } from "./useNestedProp-BrIRtQj1.js";
3
- import { u as y, X as L } from "./index-mBy4elhB.js";
2
+ import { u as m } from "./useNestedProp-CrHvyupb.js";
3
+ import { u as y, X as L } from "./index-DhJby8wL.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 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-BhH89oF0.cjs"),Ne=require("./Title-Bg_BK11V.cjs"),ie=require("./usePrinter-B8jr_V3b.cjs"),Ee=require("./DataTable-CnkdsvIo.cjs"),Te=require("./Tooltip-lM1Jzkza.cjs"),z=require("./BaseIcon-JWGtHqTA.cjs"),Se=require("./vue-ui-skeleton-Cf89QIhl.cjs"),Ve=require("./vue-ui-accordion-Bzq1iTL2.cjs"),ue=require("./useNestedProp-m8IH8hWW.cjs"),Re=require("./PackageVersion-LdLhc8hQ.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ze=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Me={__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:g}){const h=r;function i(a){g("zoom",a)}function u(a){g("hover",a)}return e.toRef(h,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(d=>{d.ancestor=a})}),(a,d)=>{const C=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(P,M)=>(e.openBlock(),e.createElementBlock("circle",{cx:P.x,cy:P.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:r.hoveredUid&&r.hoveredUid===v.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(x=>i(v),["stop"]),onMouseover:x=>u(v),onMouseleave:d[0]||(d[0]=x=>u(null))},null,40,ze))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(C,{key:0,dataset:v.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:i,onHover:u},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},De=["x1","y1","x2","y2","stroke","stroke-width"],Ue=["x1","y1","x2","y2","stroke","stroke-width"],Ie={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const g=r;return e.toRef(g,"dataset").value.forEach(i=>{i.nodes&&i.nodes.length>0&&i.nodes.forEach(u=>{u.ancestor=i})}),(i,u)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(d,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,De),e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.color,"stroke-width":a.circleRadius/2},null,8,Ue)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:r.color,backgroundColor:r.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},Oe=["x","y","fill","font-size"],He={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;return e.toRef(h,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(B=>{B.ancestor=u})}),(u,B)=>{const a=e.resolveComponent("RecursiveLabels",!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,C=>(e.openBlock(),e.createElementBlock("text",{x:C.x,y:C.y+d.circleRadius*2,fill:r.color,"font-size":d.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(d.name),9,Oe))),256)),d.nodes&&d.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:d.nodes,color:r.color,hoveredUid:r.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},qe={style:{position:"relative",height:"100%",width:"100%"}},Ae={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:g}){return(h,i)=>(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",qe,[e.createElementVNode("button",{onClick:i[0]||(i[0]=e.withModifiers(u=>g("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:i[1]||(i[1]=e.withModifiers(u=>g("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:i[2]||(i[2]=e.withModifiers(u=>g("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:i[3]||(i[3]=e.withModifiers(u=>g("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:i[4]||(i[4]=e.withModifiers(u=>g("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))}},je=["id"],Ge={key:0,style:"width:100%;background:transparent;"},Xe=["xmlns","viewBox"],Ye=["id"],We=["stop-color"],Ze=["stop-color"],Je={key:4,class:"vue-data-ui-watermark"},Ke=["innerHTML"],Qe={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:g}){const h=r,{vue_ui_molecule:i}=m.useConfig(),u=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{B()});function B(){m.objectIsEmpty(h.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const a=e.ref(m.createUid()),d=e.ref(null),C=e.ref(!1),v=e.ref(""),P=e.ref(null),M=e.ref(null),x=e.ref(!1),y=e.ref(null),X=e.ref(null),U=e.ref(0),Y=e.ref(0),W=e.ref(0),o=e.computed({get:()=>Z(),set:t=>t});function Z(){const t=ue.useNestedProp({userConfig:h.config,defaultConfig:i});return t.theme?{...ue.useNestedProp({userConfig:m.themes.vue_ui_molecule[t.theme]||h.config,defaultConfig:t}),customPalette:m.themePalettes[t.theme]||m.palette}:t}e.watch(()=>h.config,t=>{o.value=Z(),B(),Y.value+=1,W.value+=1},{deep:!0});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:_}=ie.usePrinter({elementId:`cluster_${a.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ce=e.computed(()=>m.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function ee(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?ee(t[0].nodes,l+1):l}function de(){const t=ee(h.dataset);let l=100,n=l;for(let c=0;c<t;c+=1)l/=1,n+=l;return{height:n,width:n}}const w=e.ref(de()),I=e.ref(`0 0 ${w.value.width} ${w.value.height}`);function te(t,l={x:-w.value.width/2.43,y:w.value.height/2},n=w.value.width/1.1,c=24,s=0,f=0,V="#BBBBBB"){if(t&&t.length>0){const j=m.createPolygonPath({plot:l,radius:n,sides:t.length,rotation:s});t.forEach((p,F)=>{const R=j.coordinates[F];let $;if(p.ancestor?p.ancestor.ancestor?$=p.ancestor.color||V:($=ce.value[f]||m.palette[f]||V,f+=1):$=V,p.polygonPath={coordinates:[R]},p.circleRadius=c,p.color=$,p.uid=m.createUid(),p.nodes&&p.nodes.length>0){const G=!p.ancestor||!p.ancestor.ancestor?f:0;p.nodes=te(p.nodes,R,n/2.9,c/2.2,s+Math.PI*F/p.nodes.length,G,$)}})}return t}function ve(t){const l=new Set;function n(s){s.forEach(f=>{f.color&&!l.has(f.color)&&l.add(f.color),f.nodes&&f.nodes.length>0&&n(f.nodes)})}n(t);const c={};return Array.from(l).forEach((s,f)=>{c[s]=`gradient_${f}`}),c}const fe=e.computed(()=>ve(b.value)),b=e.computed(()=>te(h.dataset));function O(){x.value=!1,M.value=null,X.value=null,y.value=null,q({polygonPath:{coordinates:[{x:w.value.width/2,y:w.value.height/2}]},circleRadius:24})}const H=e.ref(null);function q(t){P.value.focus(),e.nextTick(()=>{H.value&&cancelAnimationFrame(H.value);const l=I.value.split(" "),n=parseFloat(l[0]),c=parseFloat(l[1]),s=parseFloat(l[2]),f=parseFloat(l[3]),{x:V,y:j}=t.polygonPath.coordinates[0],{circleRadius:p}=t,F=8.34,R=V-p*F,$=j-p*F,G=p*F*2,Be=p*F*2,xe=Math.sqrt((R-n)**2+($-c)**2),L=Math.min(1200,Math.max(20,Math.floor(xe/10))),we=(R-n)/L,$e=($-c)/L,Pe=(G-s)/L,Fe=(Be-f)/L;let E=0;function se(){I.value=`${n+we*E} ${c+$e*E} ${s+Pe*E} ${f+Fe*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(H.value=requestAnimationFrame(se))}se()})}function pe(t){M.value===t.uid?O():(M.value=t.uid,X.value=t,y.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},q(t),x.value=t.uid!==b.value[0].uid)}function me(t){if(t.target.nodeName!=="circle")O(),x.value=!1;else return}const A=e.ref(null);function he(t){A.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})))v.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>`),v.value=`<div style="font-family:inherit">${n}</div>`}}const oe=e.ref(null),T=e.ref(null);function ge(t){oe.value=t,t?(C.value=!0,he(t),T.value=t.uid):(C.value=!1,v.value="",T.value=null)}function D(t){t==="right"&&(y.value.polygonPath.coordinates[0].x+=y.value.circleRadius),t==="left"&&(y.value.polygonPath.coordinates[0].x-=y.value.circleRadius),t==="top"&&(y.value.polygonPath.coordinates[0].y-=y.value.circleRadius),t==="bottom"&&(y.value.polygonPath.coordinates[0].y+=y.value.circleRadius),q(y.value)}function ye(t){const l=[];function n(c){c.forEach(s=>{const f={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};l.push(f),s.nodes&&s.nodes.length>0&&n(s.nodes,s.name)})}return n(t),l}const ke=e.computed(()=>ye(b.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=ke.value.map((s,f)=>[{color:s.color,name:s.name},s.details,s.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 le(){e.nextTick(()=>{const t=N.value.body.map((c,s)=>[[c[0].name],[c[1]],[c[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),n=m.createCsvContent(l);m.downloadCsv({csvContent:n,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function be(){return b.value}const S=e.ref(!1);function Ce(t){S.value=t,U.value+=1}function ne(){k.value.showTable=!k.value.showTable}function re(){k.value.showDataLabels=!k.value.showDataLabels}function ae(){k.value.showTooltip=!k.value.showTooltip}return g({getData:be,generatePdf:Q,generateCsv:le,generateImage:_,toggleTable:ne,toggleLabels:re,toggleTooltip:ae}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:l[7]||(l[7]=n=>{oe.value=null,T.value=null}),ref_key:"moleculeChart",ref:P,class:e.normalizeClass(`vue-ui-molecule ${S.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_${a.value}`},[o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Ge,[(e.openBlock(),e.createBlock(Ne._sfc_main,{key:`title_${Y.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&&u.value?(e.openBlock(),e.createBlock(ie.UserOptions,{ref_key:"details",ref:d,key:`user_options_${U.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(J),isImaging:e.unref(K),uid:a.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:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:P.value,position:o.value.userOptions.position,onToggleFullscreen:Ce,onGeneratePdf:e.unref(Q),onGenerateCsv:le,onGenerateImage:e.unref(_),onToggleTable:ne,onToggleLabels:re,onToggleTooltip:ae},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]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(m.XMLNS),viewBox:I.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(n=>me(n),["stop"]))},[e.createVNode(Re._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(fe.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,We),e.createElementVNode("stop",{offset:"100%","stop-color":n},null,8,Ze)],8,Ye))),256))]),e.createVNode(Ie,{dataset:b.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Me,{dataset:b.value,hoveredUid:T.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:pe,onHover:ge},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(He,{key:0,dataset:b.value,color:o.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:w.value},void 0,!0)],14,Xe)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Ae,{key:`direction_pad_${U.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:l[1]||(l[1]=n=>D("left")),onMoveRight:l[2]||(l[2]=n=>D("right")),onMoveTop:l[3]||(l[3]=n=>D("top")),onMoveBottom:l[4]||(l[4]=n=>D("bottom")),onReset:l[5]||(l[5]=n=>{O(),x.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(J)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Se.default,{key:5,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Te._sfc_main,{show:k.value.showTooltip&&C.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:P.value,content:v.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({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),u.value?(e.openBlock(),e.createBlock(Ve.default,{key:6,hideDetails:"",config:{open:k.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(Ee.DataTable,{key:`table_${W.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.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=>k.value.showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n,style:{display:"flex","align-items":"center"}},null,8,Ke)]),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,je))}},_e=Le._export_sfc(Qe,[["__scopeId","data-v-aafaabe0"]]);exports.default=_e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-D09qCApg.cjs"),Ne=require("./Title-Bjrh7khe.cjs"),ie=require("./usePrinter-DdsPm5a4.cjs"),Ee=require("./DataTable-oa0Srfuc.cjs"),Te=require("./Tooltip-CPATjuur.cjs"),z=require("./BaseIcon-dYWMubrH.cjs"),Se=require("./vue-ui-skeleton-CAlTn_Cg.cjs"),Ve=require("./vue-ui-accordion-BAHX7KzB.cjs"),ue=require("./useNestedProp-Bwd7mK1Z.cjs"),Re=require("./PackageVersion-BkgJVmj1.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ze=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Me={__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:g}){const h=r;function i(a){g("zoom",a)}function u(a){g("hover",a)}return e.toRef(h,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(d=>{d.ancestor=a})}),(a,d)=>{const C=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(P,M)=>(e.openBlock(),e.createElementBlock("circle",{cx:P.x,cy:P.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:r.hoveredUid&&r.hoveredUid===v.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(x=>i(v),["stop"]),onMouseover:x=>u(v),onMouseleave:d[0]||(d[0]=x=>u(null))},null,40,ze))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(C,{key:0,dataset:v.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:i,onHover:u},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},De=["x1","y1","x2","y2","stroke","stroke-width"],Ue=["x1","y1","x2","y2","stroke","stroke-width"],Ie={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const g=r;return e.toRef(g,"dataset").value.forEach(i=>{i.nodes&&i.nodes.length>0&&i.nodes.forEach(u=>{u.ancestor=i})}),(i,u)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(d,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,De),e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.color,"stroke-width":a.circleRadius/2},null,8,Ue)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:r.color,backgroundColor:r.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},Oe=["x","y","fill","font-size"],He={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;return e.toRef(h,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(B=>{B.ancestor=u})}),(u,B)=>{const a=e.resolveComponent("RecursiveLabels",!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,C=>(e.openBlock(),e.createElementBlock("text",{x:C.x,y:C.y+d.circleRadius*2,fill:r.color,"font-size":d.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(d.name),9,Oe))),256)),d.nodes&&d.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:d.nodes,color:r.color,hoveredUid:r.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},qe={style:{position:"relative",height:"100%",width:"100%"}},Ae={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:g}){return(h,i)=>(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",qe,[e.createElementVNode("button",{onClick:i[0]||(i[0]=e.withModifiers(u=>g("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:i[1]||(i[1]=e.withModifiers(u=>g("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:i[2]||(i[2]=e.withModifiers(u=>g("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:i[3]||(i[3]=e.withModifiers(u=>g("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:i[4]||(i[4]=e.withModifiers(u=>g("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))}},je=["id"],Ge={key:0,style:"width:100%;background:transparent;"},Xe=["xmlns","viewBox"],Ye=["id"],We=["stop-color"],Ze=["stop-color"],Je={key:4,class:"vue-data-ui-watermark"},Ke=["innerHTML"],Qe={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:g}){const h=r,{vue_ui_molecule:i}=m.useConfig(),u=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{B()});function B(){m.objectIsEmpty(h.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const a=e.ref(m.createUid()),d=e.ref(null),C=e.ref(!1),v=e.ref(""),P=e.ref(null),M=e.ref(null),x=e.ref(!1),y=e.ref(null),X=e.ref(null),U=e.ref(0),Y=e.ref(0),W=e.ref(0),o=e.computed({get:()=>Z(),set:t=>t});function Z(){const t=ue.useNestedProp({userConfig:h.config,defaultConfig:i});return t.theme?{...ue.useNestedProp({userConfig:m.themes.vue_ui_molecule[t.theme]||h.config,defaultConfig:t}),customPalette:m.themePalettes[t.theme]||m.palette}:t}e.watch(()=>h.config,t=>{o.value=Z(),B(),Y.value+=1,W.value+=1},{deep:!0});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:_}=ie.usePrinter({elementId:`cluster_${a.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ce=e.computed(()=>m.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function ee(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?ee(t[0].nodes,l+1):l}function de(){const t=ee(h.dataset);let l=100,n=l;for(let c=0;c<t;c+=1)l/=1,n+=l;return{height:n,width:n}}const w=e.ref(de()),I=e.ref(`0 0 ${w.value.width} ${w.value.height}`);function te(t,l={x:-w.value.width/2.43,y:w.value.height/2},n=w.value.width/1.1,c=24,s=0,f=0,V="#BBBBBB"){if(t&&t.length>0){const j=m.createPolygonPath({plot:l,radius:n,sides:t.length,rotation:s});t.forEach((p,F)=>{const R=j.coordinates[F];let $;if(p.ancestor?p.ancestor.ancestor?$=p.ancestor.color||V:($=ce.value[f]||m.palette[f]||V,f+=1):$=V,p.polygonPath={coordinates:[R]},p.circleRadius=c,p.color=$,p.uid=m.createUid(),p.nodes&&p.nodes.length>0){const G=!p.ancestor||!p.ancestor.ancestor?f:0;p.nodes=te(p.nodes,R,n/2.9,c/2.2,s+Math.PI*F/p.nodes.length,G,$)}})}return t}function ve(t){const l=new Set;function n(s){s.forEach(f=>{f.color&&!l.has(f.color)&&l.add(f.color),f.nodes&&f.nodes.length>0&&n(f.nodes)})}n(t);const c={};return Array.from(l).forEach((s,f)=>{c[s]=`gradient_${f}`}),c}const fe=e.computed(()=>ve(b.value)),b=e.computed(()=>te(h.dataset));function O(){x.value=!1,M.value=null,X.value=null,y.value=null,q({polygonPath:{coordinates:[{x:w.value.width/2,y:w.value.height/2}]},circleRadius:24})}const H=e.ref(null);function q(t){P.value.focus(),e.nextTick(()=>{H.value&&cancelAnimationFrame(H.value);const l=I.value.split(" "),n=parseFloat(l[0]),c=parseFloat(l[1]),s=parseFloat(l[2]),f=parseFloat(l[3]),{x:V,y:j}=t.polygonPath.coordinates[0],{circleRadius:p}=t,F=8.34,R=V-p*F,$=j-p*F,G=p*F*2,Be=p*F*2,xe=Math.sqrt((R-n)**2+($-c)**2),L=Math.min(1200,Math.max(20,Math.floor(xe/10))),we=(R-n)/L,$e=($-c)/L,Pe=(G-s)/L,Fe=(Be-f)/L;let E=0;function se(){I.value=`${n+we*E} ${c+$e*E} ${s+Pe*E} ${f+Fe*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(H.value=requestAnimationFrame(se))}se()})}function pe(t){M.value===t.uid?O():(M.value=t.uid,X.value=t,y.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},q(t),x.value=t.uid!==b.value[0].uid)}function me(t){if(t.target.nodeName!=="circle")O(),x.value=!1;else return}const A=e.ref(null);function he(t){A.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})))v.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>`),v.value=`<div style="font-family:inherit">${n}</div>`}}const oe=e.ref(null),T=e.ref(null);function ge(t){oe.value=t,t?(C.value=!0,he(t),T.value=t.uid):(C.value=!1,v.value="",T.value=null)}function D(t){t==="right"&&(y.value.polygonPath.coordinates[0].x+=y.value.circleRadius),t==="left"&&(y.value.polygonPath.coordinates[0].x-=y.value.circleRadius),t==="top"&&(y.value.polygonPath.coordinates[0].y-=y.value.circleRadius),t==="bottom"&&(y.value.polygonPath.coordinates[0].y+=y.value.circleRadius),q(y.value)}function ye(t){const l=[];function n(c){c.forEach(s=>{const f={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};l.push(f),s.nodes&&s.nodes.length>0&&n(s.nodes,s.name)})}return n(t),l}const ke=e.computed(()=>ye(b.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=ke.value.map((s,f)=>[{color:s.color,name:s.name},s.details,s.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 le(){e.nextTick(()=>{const t=N.value.body.map((c,s)=>[[c[0].name],[c[1]],[c[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),n=m.createCsvContent(l);m.downloadCsv({csvContent:n,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function be(){return b.value}const S=e.ref(!1);function Ce(t){S.value=t,U.value+=1}function ne(){k.value.showTable=!k.value.showTable}function re(){k.value.showDataLabels=!k.value.showDataLabels}function ae(){k.value.showTooltip=!k.value.showTooltip}return g({getData:be,generatePdf:Q,generateCsv:le,generateImage:_,toggleTable:ne,toggleLabels:re,toggleTooltip:ae}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:l[7]||(l[7]=n=>{oe.value=null,T.value=null}),ref_key:"moleculeChart",ref:P,class:e.normalizeClass(`vue-ui-molecule ${S.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_${a.value}`},[o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Ge,[(e.openBlock(),e.createBlock(Ne._sfc_main,{key:`title_${Y.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&&u.value?(e.openBlock(),e.createBlock(ie.UserOptions,{ref_key:"details",ref:d,key:`user_options_${U.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(J),isImaging:e.unref(K),uid:a.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:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:P.value,position:o.value.userOptions.position,onToggleFullscreen:Ce,onGeneratePdf:e.unref(Q),onGenerateCsv:le,onGenerateImage:e.unref(_),onToggleTable:ne,onToggleLabels:re,onToggleTooltip:ae},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]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(m.XMLNS),viewBox:I.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(n=>me(n),["stop"]))},[e.createVNode(Re._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(fe.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,We),e.createElementVNode("stop",{offset:"100%","stop-color":n},null,8,Ze)],8,Ye))),256))]),e.createVNode(Ie,{dataset:b.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Me,{dataset:b.value,hoveredUid:T.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:pe,onHover:ge},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(He,{key:0,dataset:b.value,color:o.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:w.value},void 0,!0)],14,Xe)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Ae,{key:`direction_pad_${U.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:l[1]||(l[1]=n=>D("left")),onMoveRight:l[2]||(l[2]=n=>D("right")),onMoveTop:l[3]||(l[3]=n=>D("top")),onMoveBottom:l[4]||(l[4]=n=>D("bottom")),onReset:l[5]||(l[5]=n=>{O(),x.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(J)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Se.default,{key:5,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Te._sfc_main,{show:k.value.showTooltip&&C.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:P.value,content:v.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({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),u.value?(e.openBlock(),e.createBlock(Ve.default,{key:6,hideDetails:"",config:{open:k.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(Ee.DataTable,{key:`table_${W.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.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=>k.value.showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n,style:{display:"flex","align-items":"center"}},null,8,Ke)]),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,je))}},_e=Le._export_sfc(Qe,[["__scopeId","data-v-aafaabe0"]]);exports.default=_e;
@@ -1,14 +1,14 @@
1
1
  import { toRef as re, resolveComponent as ie, openBlock as s, createElementBlock as r, Fragment as y, renderList as z, withModifiers as H, createBlock as F, createCommentVNode as m, createElementVNode as $, toDisplayString as Le, normalizeStyle as ne, createVNode as S, computed as O, onMounted as Ze, ref as f, watch as Je, normalizeClass as Pe, unref as U, createSlots as Ke, withCtx as C, renderSlot as P, normalizeProps as J, guardReactiveProps as K, createTextVNode as Qe, nextTick as Te } from "vue";
2
- import { u as _e, o as et, e as tt, c as Fe, t as ot, a as lt, p as Re, b as at, X as st, l as nt, N as rt, q as it, r as ut, x as ct, y as dt } from "./index-mBy4elhB.js";
3
- import { _ as vt } from "./Title-CECK1w9L.js";
4
- import { u as ft, U as pt } from "./usePrinter-Ck-yukK2.js";
5
- import { D as ht } from "./DataTable-BKc3r3k3.js";
6
- import { _ as gt } from "./Tooltip-Ci3AprCm.js";
7
- import W from "./BaseIcon-DfaCNBgc.js";
8
- import yt from "./vue-ui-skeleton-DDhwPZd_.js";
9
- import mt from "./vue-ui-accordion-dyF20BlD.js";
10
- import { u as Se } from "./useNestedProp-BrIRtQj1.js";
11
- import { _ as bt } from "./PackageVersion-D9PU8glB.js";
2
+ import { u as _e, o as et, e as tt, c as Fe, t as ot, a as lt, p as Re, b as at, X as st, l as nt, N as rt, q as it, r as ut, x as ct, y as dt } from "./index-DhJby8wL.js";
3
+ import { _ as vt } from "./Title-1Sw6EmHy.js";
4
+ import { u as ft, U as pt } from "./usePrinter-Bwm8J3RQ.js";
5
+ import { D as ht } from "./DataTable-BXnbua0J.js";
6
+ import { _ as gt } from "./Tooltip-EJf3VBPR.js";
7
+ import W from "./BaseIcon-CAmYNoaf.js";
8
+ import yt from "./vue-ui-skeleton-ASX40MGk.js";
9
+ import mt from "./vue-ui-accordion-Cn5Jbplg.js";
10
+ import { u as Se } from "./useNestedProp-CrHvyupb.js";
11
+ import { _ as bt } from "./PackageVersion-BVZfgDqm.js";
12
12
  import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const Ct = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], $t = {
14
14
  __name: "RecursiveCircles",
@@ -1,14 +1,14 @@
1
1
  import { computed as c, onMounted as he, ref as h, watch as fe, openBlock as n, createElementBlock as k, normalizeClass as R, normalizeStyle as O, createVNode as F, createCommentVNode as i, createBlock as f, unref as s, createSlots as me, withCtx as m, renderSlot as b, normalizeProps as X, guardReactiveProps as K, createElementVNode as a, Fragment as q, renderList as Y, toDisplayString as M, createTextVNode as J, nextTick as pe } from "vue";
2
- import { u as ge, o as ke, e as Q, c as be, t as Ce, N as xe, X as _e, s as C, w as we, O as $e, i as Z, f as A, q as Me, r as Ne } from "./index-mBy4elhB.js";
3
- import { _ as Pe } from "./Title-CECK1w9L.js";
4
- import { u as Le, U as Te } from "./usePrinter-Ck-yukK2.js";
5
- import { L as Ae } from "./Legend-WNL92WSx.js";
6
- import N from "./BaseIcon-DfaCNBgc.js";
7
- import { D as Ie } from "./DataTable-BKc3r3k3.js";
8
- import Oe from "./vue-ui-skeleton-DDhwPZd_.js";
9
- import Fe from "./vue-ui-accordion-dyF20BlD.js";
10
- import { u as ee } from "./useNestedProp-BrIRtQj1.js";
11
- import { _ as Se } from "./PackageVersion-D9PU8glB.js";
2
+ import { u as ge, o as ke, e as Q, c as be, t as Ce, N as xe, X as _e, s as C, w as we, O as $e, i as Z, f as A, q as Me, r as Ne } from "./index-DhJby8wL.js";
3
+ import { _ as Pe } from "./Title-1Sw6EmHy.js";
4
+ import { u as Le, U as Te } from "./usePrinter-Bwm8J3RQ.js";
5
+ import { L as Ae } from "./Legend-Cr1hulgT.js";
6
+ import N from "./BaseIcon-CAmYNoaf.js";
7
+ import { D as Ie } from "./DataTable-BXnbua0J.js";
8
+ import Oe from "./vue-ui-skeleton-ASX40MGk.js";
9
+ import Fe from "./vue-ui-accordion-Cn5Jbplg.js";
10
+ import { u as ee } from "./useNestedProp-CrHvyupb.js";
11
+ import { _ as Se } from "./PackageVersion-BVZfgDqm.js";
12
12
  import { _ as Ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const je = ["id"], Be = {
14
14
  key: 0,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BhH89oF0.cjs"),X=require("./Title-Bg_BK11V.cjs"),S=require("./usePrinter-B8jr_V3b.cjs"),K=require("./Legend-BQJV6Xk4.cjs"),p=require("./BaseIcon-JWGtHqTA.cjs"),Y=require("./DataTable-CnkdsvIo.cjs"),J=require("./vue-ui-skeleton-Cf89QIhl.cjs"),Q=require("./vue-ui-accordion-Bzq1iTL2.cjs"),T=require("./useNestedProp-m8IH8hWW.cjs"),Z=require("./PackageVersion-LdLhc8hQ.cjs"),ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=["id"],oe={key:0,style:"width:100%;background:transparent"},le=["xmlns","viewBox"],ae=["id"],re=["stop-color"],ne=["stop-color"],se=["x1","y1","x2","y2","stroke","stroke-width"],ue=["d","stroke","stroke-width"],ie=["stroke"],ce=["fill"],de=["stroke"],ye=["fill"],ve=["stroke"],me=["fill"],he=["stroke"],fe=["fill"],pe=["stroke"],ke=["fill"],ge=["d","stroke","stroke-width","fill"],be=["x1","y1","stroke"],Ce=["cx","cy","fill","stroke"],Ne=["fill","stroke"],xe=["y","fill","font-weight"],we=["y","fill"],_e={key:3,class:"vue-data-ui-watermark"},Ve=["onClick"],Pe={style:{"font-weight":"bold"}},Me=["innerHTML"],$e={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(O,{expose:A}){const s=O,{vue_ui_mood_radar:I}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{N()});function N(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),x=e.ref(null),F=e.ref(null),n=e.ref(null),D=e.ref(0),q=e.ref(0),w=e.ref(0),t=e.computed({get:()=>_(),set:l=>l});function _(){const l=T.useNestedProp({userConfig:s.config,defaultConfig:I});return l.theme?{...T.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=_(),N(),D.value+=1,q.value+=1,w.value+=1},{deep:!0});const{isPrinting:V,isImaging:P,generatePdf:M,generateImage:$}=S.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),k=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function z({centerX:l,centerY:a,apexX:o,apexY:u,proportion:c,key:f,value:R}){return{x:l+(o-l)*c,y:a+(u-a)*c,key:f,value:R}}const j=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),v=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),i=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/v.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),B=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})}),C.value.coordinates.map((l,a)=>{const o=z({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:i.value[a].value/j.value,key:i.value[a].key,value:i.value[a].value});return{...l,plots:o,key:i.value[a].key}})):[]),W=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 G(l){l===n.value?n.value=null:n.value=l}const y=e.computed(()=>{const l=i.value.map(o=>({name:o.key,color:o.color})),a=i.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function E(){e.nextTick(()=>{const l=y.value.head.map((u,c)=>[[u.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.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(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,f)=>[{color:c.color,name:c.name},y.value.body[f].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[f]/v.value)?"-":(y.value.body[f]/v.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 U(){return i.value}function L(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function H(l){b.value=l}return A({getData:U,generatePdf:M,generateCsv:E,generateImage:$,toggleTable:L}),(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:x,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",oe,[e.createVNode(X._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.openBlock(),e.createBlock(S.UserOptions,{key:1,ref_key:"details",ref:F,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(V),isImaging:e.unref(P),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:x.value,position:t.value.userOptions.position,onToggleFullscreen:H,onGeneratePdf:e.unref(M),onGenerateCsv:E,onGenerateImage:e.unref($),onToggleTable:L},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]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${d.value.width} ${d.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(Z._sfc_main),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,re),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,ne)],8,ae)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.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,se))),256)),e.createElementVNode("path",{d:C.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,ue),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,ie),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,ce),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,de),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,ye),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,ve),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,me),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,he),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,fe),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,pe),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,ke),e.createElementVNode("path",{d:e.unref(r.makePath)(B.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,ge),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.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,be),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,Ce),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,Ne),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,xe),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/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,we)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,le)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",_e,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(V)||e.unref(P)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.default,{key:4,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(K.Legend,{legendSet:i.value,config:W.value,key:`legend_${w.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>G(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(p.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(p.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(p.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(p.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(p.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",Pe,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,Ve)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:i.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(Q.default,{key:6,hideDetails:"",config:{open:k.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(Y.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=>k.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Me)]),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)],14,te))}},Be=ee._export_sfc($e,[["__scopeId","data-v-bded5f3b"]]);exports.default=Be;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-D09qCApg.cjs"),X=require("./Title-Bjrh7khe.cjs"),S=require("./usePrinter-DdsPm5a4.cjs"),K=require("./Legend-Dhm9_peB.cjs"),p=require("./BaseIcon-dYWMubrH.cjs"),Y=require("./DataTable-oa0Srfuc.cjs"),J=require("./vue-ui-skeleton-CAlTn_Cg.cjs"),Q=require("./vue-ui-accordion-BAHX7KzB.cjs"),T=require("./useNestedProp-Bwd7mK1Z.cjs"),Z=require("./PackageVersion-BkgJVmj1.cjs"),ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=["id"],oe={key:0,style:"width:100%;background:transparent"},le=["xmlns","viewBox"],ae=["id"],re=["stop-color"],ne=["stop-color"],se=["x1","y1","x2","y2","stroke","stroke-width"],ue=["d","stroke","stroke-width"],ie=["stroke"],ce=["fill"],de=["stroke"],ye=["fill"],ve=["stroke"],me=["fill"],he=["stroke"],fe=["fill"],pe=["stroke"],ke=["fill"],ge=["d","stroke","stroke-width","fill"],be=["x1","y1","stroke"],Ce=["cx","cy","fill","stroke"],Ne=["fill","stroke"],xe=["y","fill","font-weight"],we=["y","fill"],_e={key:3,class:"vue-data-ui-watermark"},Ve=["onClick"],Pe={style:{"font-weight":"bold"}},Me=["innerHTML"],$e={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(O,{expose:A}){const s=O,{vue_ui_mood_radar:I}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{N()});function N(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),x=e.ref(null),F=e.ref(null),n=e.ref(null),D=e.ref(0),q=e.ref(0),w=e.ref(0),t=e.computed({get:()=>_(),set:l=>l});function _(){const l=T.useNestedProp({userConfig:s.config,defaultConfig:I});return l.theme?{...T.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=_(),N(),D.value+=1,q.value+=1,w.value+=1},{deep:!0});const{isPrinting:V,isImaging:P,generatePdf:M,generateImage:$}=S.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),k=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function z({centerX:l,centerY:a,apexX:o,apexY:u,proportion:c,key:f,value:R}){return{x:l+(o-l)*c,y:a+(u-a)*c,key:f,value:R}}const j=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),v=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),i=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/v.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),B=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})}),C.value.coordinates.map((l,a)=>{const o=z({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:i.value[a].value/j.value,key:i.value[a].key,value:i.value[a].value});return{...l,plots:o,key:i.value[a].key}})):[]),W=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 G(l){l===n.value?n.value=null:n.value=l}const y=e.computed(()=>{const l=i.value.map(o=>({name:o.key,color:o.color})),a=i.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function E(){e.nextTick(()=>{const l=y.value.head.map((u,c)=>[[u.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.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(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,f)=>[{color:c.color,name:c.name},y.value.body[f].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[f]/v.value)?"-":(y.value.body[f]/v.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 U(){return i.value}function L(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function H(l){b.value=l}return A({getData:U,generatePdf:M,generateCsv:E,generateImage:$,toggleTable:L}),(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:x,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",oe,[e.createVNode(X._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.openBlock(),e.createBlock(S.UserOptions,{key:1,ref_key:"details",ref:F,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(V),isImaging:e.unref(P),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:x.value,position:t.value.userOptions.position,onToggleFullscreen:H,onGeneratePdf:e.unref(M),onGenerateCsv:E,onGenerateImage:e.unref($),onToggleTable:L},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]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${d.value.width} ${d.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(Z._sfc_main),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,re),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,ne)],8,ae)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.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,se))),256)),e.createElementVNode("path",{d:C.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,ue),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,ie),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,ce),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,de),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,ye),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,ve),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,me),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,he),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,fe),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,pe),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,ke),e.createElementVNode("path",{d:e.unref(r.makePath)(B.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,ge),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.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,be),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,Ce),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,Ne),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,xe),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/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,we)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,le)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",_e,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(V)||e.unref(P)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.default,{key:4,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(K.Legend,{legendSet:i.value,config:W.value,key:`legend_${w.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>G(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(p.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(p.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(p.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(p.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(p.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",Pe,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,Ve)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:i.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(Q.default,{key:6,hideDetails:"",config:{open:k.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(Y.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=>k.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Me)]),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)],14,te))}},Be=ee._export_sfc($e,[["__scopeId","data-v-bded5f3b"]]);exports.default=Be;
@@ -1,15 +1,15 @@
1
1
  import { computed as g, ref as d, watch as De, onMounted as Je, onBeforeUnmount as Ke, openBlock as u, createElementBlock as n, normalizeClass as z, normalizeStyle as ue, createBlock as P, createCommentVNode as y, unref as r, createSlots as Qe, withCtx as m, renderSlot as $, normalizeProps as q, guardReactiveProps as J, createVNode as Oe, createElementVNode as p, Fragment as x, renderList as S, toDisplayString as T, createTextVNode as K, nextTick as Ze, pushScopeId as je, popScopeId as et } from "vue";
2
- import { u as tt, c as lt, t as at, a as ot, p as Q, o as st, e as A, b as ut, G as ze, d as nt, m as Pe, f as L, X as rt, s as Ae, I as it, k as V, n as ne, i as G, x as Ve, y as dt, q as ct, r as vt } from "./index-mBy4elhB.js";
2
+ import { u as tt, c as lt, t as at, a as ot, p as Q, o as st, e as A, b as ut, G as ze, d as nt, m as Pe, f as L, X as rt, s as Ae, I as it, k as V, n as ne, i as G, x as Ve, y as dt, q as ct, r as vt } from "./index-DhJby8wL.js";
3
3
  import { t as ft, u as ht } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as yt } from "./Title-CECK1w9L.js";
5
- import { u as pt, U as bt } from "./usePrinter-Ck-yukK2.js";
6
- import { D as gt } from "./DataTable-BKc3r3k3.js";
7
- import { _ as mt } from "./Tooltip-Ci3AprCm.js";
8
- import { L as _t } from "./Legend-WNL92WSx.js";
9
- import wt from "./vue-ui-skeleton-DDhwPZd_.js";
10
- import kt from "./vue-ui-accordion-dyF20BlD.js";
11
- import { u as Me } from "./useNestedProp-BrIRtQj1.js";
12
- import { _ as xt } from "./PackageVersion-D9PU8glB.js";
4
+ import { _ as yt } from "./Title-1Sw6EmHy.js";
5
+ import { u as pt, U as bt } from "./usePrinter-Bwm8J3RQ.js";
6
+ import { D as gt } from "./DataTable-BXnbua0J.js";
7
+ import { _ as mt } from "./Tooltip-EJf3VBPR.js";
8
+ import { L as _t } from "./Legend-Cr1hulgT.js";
9
+ import wt from "./vue-ui-skeleton-ASX40MGk.js";
10
+ import kt from "./vue-ui-accordion-Cn5Jbplg.js";
11
+ import { u as Me } from "./useNestedProp-CrHvyupb.js";
12
+ import { _ as xt } from "./PackageVersion-BVZfgDqm.js";
13
13
  import { _ as $t } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
14
  const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = ["xmlns", "viewBox"], Ft = ["id"], St = /* @__PURE__ */ re(() => /* @__PURE__ */ p("stop", {
15
15
  offset: "0%",
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BhH89oF0.cjs"),ce=require("./useResponsive-B3TrDDIG.cjs"),we=require("./Title-Bg_BK11V.cjs"),de=require("./usePrinter-B8jr_V3b.cjs"),xe=require("./DataTable-CnkdsvIo.cjs"),Be=require("./Tooltip-lM1Jzkza.cjs"),_e=require("./Legend-BQJV6Xk4.cjs"),$e=require("./vue-ui-skeleton-Cf89QIhl.cjs"),Ne=require("./vue-ui-accordion-Bzq1iTL2.cjs"),ve=require("./useNestedProp-m8IH8hWW.cjs"),Se=require("./PackageVersion-LdLhc8hQ.cjs"),Ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M=w=>(e.pushScopeId("data-v-e05474aa"),w=w(),e.popScopeId(),w),Fe=["id"],Ve=["xmlns","viewBox"],Te=["id"],De=M(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),ze=["offset","stop-color"],Pe=["offset","stop-opacity"],Oe=M(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Ie=["id"],Ae=["id"],Me=M(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Re=["id"],Ue=["flood-color"],qe=["d","fill","stroke","stroke-width","filter"],Ye={key:0},Xe=["d","fill"],Ge={key:1},He=["x","y","font-size","font-weight","fill"],We={key:2},Je=["filter"],Ke=["text-anchor","x","y","fill","font-size","font-weight"],Qe=["text-anchor","x","y","fill","font-size","font-weight"],Ze=["text-anchor","x","y","fill","font-size","font-weight"],je=["d","fill","onMouseenter","onClick"],et={key:3,class:"vue-data-ui-watermark"},tt={key:0,class:"vue-ui-nested-donuts-legend-title"},lt=["onClick"],at=["innerHTML"],ot={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(w,{expose:fe,emit:R}){const k=w,{vue_ui_nested_donuts:pe}=r.useConfig(),_=e.computed(()=>!!k.dataset&&k.dataset.length),p=e.ref(r.createUid()),V=e.ref(!1),T=e.ref(""),he=e.ref(null),U=e.ref(0),x=e.ref(null),q=e.ref(null),D=e.ref(null),Y=e.ref(0),X=e.ref(0),G=e.ref(0),B=e.ref(!1);function ye(l){B.value=l,U.value+=1}const t=e.computed({get:()=>H(),set:l=>l});function H(){const l=ve.useNestedProp({userConfig:k.config,defaultConfig:pe});return l.theme?{...ve.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=H(),W(),Y.value+=1,X.value+=1,G.value+=1},{deep:!0});const $=e.ref(null);e.onMounted(()=>{W()});function W(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=ce.throttle(()=>{const{width:s,height:o}=ce.useResponsive({chart:x.value,title:t.value.style.chart.title.text?q.value:null,legend:t.value.style.chart.legend.show?D.value:null});d.value.width=s,d.value.height=o});$.value=new ResizeObserver(l),$.value.observe(x.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:Z}=de.usePrinter({elementId:`nested_donuts_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),me=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),d=e.ref({height:512,width:512});function be({datapoint:l,index:s}){R("selectDatapoint",{datapoint:l,index:s})}const v=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=>!v.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:`${p.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${p.value}_${s}`,id:`${p.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||me.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(d.value.height,d.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),j=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!v.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!v.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function ge(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 c=e.ref(j.value);e.watch(()=>j.value,l=>c.value=l);const ee=e.ref(null),te=e.ref(null);function z(l){R("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=c.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),f=ge(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(ee.value),c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),ee.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(f){let i=function(){a<.1?(cancelAnimationFrame(te.value),v.value.push(l.id),c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:0}:L)}))):(a/=1.1,c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:a}:L)})),te.value=requestAnimationFrame(i))};i()}}const P=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),le=e.computed(()=>c.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>c.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,P.value)}})),ae=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},d.value.width/2,d.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]}})),oe=e.ref(null),S=e.ref(null),E=e.ref(null),O=e.ref(null);function ke({datapoint:l,_relativeIndex:s,seriesIndex:o}){oe.value=l.arcOfId,S.value=l.id,E.value=o,O.value={datapoint:l,seriesIndex:o,series:c.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:c.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:c.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=c.value.map(f=>f.series.find(i=>i.seriesIndex===o));u.forEach((f,i)=>{if(!f)return"";a+=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-D09qCApg.cjs"),ce=require("./useResponsive-B3TrDDIG.cjs"),we=require("./Title-Bjrh7khe.cjs"),de=require("./usePrinter-DdsPm5a4.cjs"),xe=require("./DataTable-oa0Srfuc.cjs"),Be=require("./Tooltip-CPATjuur.cjs"),_e=require("./Legend-Dhm9_peB.cjs"),$e=require("./vue-ui-skeleton-CAlTn_Cg.cjs"),Ne=require("./vue-ui-accordion-BAHX7KzB.cjs"),ve=require("./useNestedProp-Bwd7mK1Z.cjs"),Se=require("./PackageVersion-BkgJVmj1.cjs"),Ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M=w=>(e.pushScopeId("data-v-e05474aa"),w=w(),e.popScopeId(),w),Fe=["id"],Ve=["xmlns","viewBox"],Te=["id"],De=M(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),ze=["offset","stop-color"],Pe=["offset","stop-opacity"],Oe=M(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Ie=["id"],Ae=["id"],Me=M(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Re=["id"],Ue=["flood-color"],qe=["d","fill","stroke","stroke-width","filter"],Ye={key:0},Xe=["d","fill"],Ge={key:1},He=["x","y","font-size","font-weight","fill"],We={key:2},Je=["filter"],Ke=["text-anchor","x","y","fill","font-size","font-weight"],Qe=["text-anchor","x","y","fill","font-size","font-weight"],Ze=["text-anchor","x","y","fill","font-size","font-weight"],je=["d","fill","onMouseenter","onClick"],et={key:3,class:"vue-data-ui-watermark"},tt={key:0,class:"vue-ui-nested-donuts-legend-title"},lt=["onClick"],at=["innerHTML"],ot={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(w,{expose:fe,emit:R}){const k=w,{vue_ui_nested_donuts:pe}=r.useConfig(),_=e.computed(()=>!!k.dataset&&k.dataset.length),p=e.ref(r.createUid()),V=e.ref(!1),T=e.ref(""),he=e.ref(null),U=e.ref(0),x=e.ref(null),q=e.ref(null),D=e.ref(null),Y=e.ref(0),X=e.ref(0),G=e.ref(0),B=e.ref(!1);function ye(l){B.value=l,U.value+=1}const t=e.computed({get:()=>H(),set:l=>l});function H(){const l=ve.useNestedProp({userConfig:k.config,defaultConfig:pe});return l.theme?{...ve.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=H(),W(),Y.value+=1,X.value+=1,G.value+=1},{deep:!0});const $=e.ref(null);e.onMounted(()=>{W()});function W(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=ce.throttle(()=>{const{width:s,height:o}=ce.useResponsive({chart:x.value,title:t.value.style.chart.title.text?q.value:null,legend:t.value.style.chart.legend.show?D.value:null});d.value.width=s,d.value.height=o});$.value=new ResizeObserver(l),$.value.observe(x.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:Z}=de.usePrinter({elementId:`nested_donuts_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),me=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),d=e.ref({height:512,width:512});function be({datapoint:l,index:s}){R("selectDatapoint",{datapoint:l,index:s})}const v=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=>!v.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:`${p.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${p.value}_${s}`,id:`${p.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||me.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(d.value.height,d.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),j=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!v.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!v.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function ge(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 c=e.ref(j.value);e.watch(()=>j.value,l=>c.value=l);const ee=e.ref(null),te=e.ref(null);function z(l){R("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=c.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),f=ge(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(ee.value),c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),ee.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(f){let i=function(){a<.1?(cancelAnimationFrame(te.value),v.value.push(l.id),c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:0}:L)}))):(a/=1.1,c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:a}:L)})),te.value=requestAnimationFrame(i))};i()}}const P=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),le=e.computed(()=>c.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>c.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,P.value)}})),ae=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},d.value.width/2,d.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]}})),oe=e.ref(null),S=e.ref(null),E=e.ref(null),O=e.ref(null);function ke({datapoint:l,_relativeIndex:s,seriesIndex:o}){oe.value=l.arcOfId,S.value=l.id,E.value=o,O.value={datapoint:l,seriesIndex:o,series:c.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:c.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:c.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=c.value.map(f=>f.series.find(i=>i.seriesIndex===o));u.forEach((f,i)=>{if(!f)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}">