vue-data-ui 2.3.85 → 2.3.87

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 (171) hide show
  1. package/dist/{Arrow-CLOh6oi7.cjs → Arrow-eu15g0Zt.cjs} +1 -1
  2. package/dist/{Arrow-JwDgP3de.js → Arrow-tDycrMHk.js} +1 -1
  3. package/dist/{BaseIcon-BBQHz_Sf.cjs → BaseIcon-CgLB-iUq.cjs} +1 -1
  4. package/dist/{BaseIcon-BysUnfCR.js → BaseIcon-D2n64yMC.js} +1 -1
  5. package/dist/{DataTable-MkG5Dqrn.js → DataTable-CrbRO0dh.js} +2 -2
  6. package/dist/{DataTable-pVXaNplZ.cjs → DataTable-DnOI5Ivh.cjs} +1 -1
  7. package/dist/{Legend-KW7sTwN3.js → Legend-BXctzvx2.js} +1 -1
  8. package/dist/{Legend-k2mcTp7z.cjs → Legend-sAjd_vcA.cjs} +1 -1
  9. package/dist/{Shape-COoEWeGM.cjs → Shape-BGa7uWId.cjs} +1 -1
  10. package/dist/{Shape-BFiZBf3X.js → Shape-BUBQ5omG.js} +1 -1
  11. package/dist/{Slicer-CALc-Q4W.js → Slicer-CXK3XM-z.js} +79 -87
  12. package/dist/Slicer-CoyHeBxs.cjs +1 -0
  13. package/dist/{Title-ISDbzCH8.js → Title-BITuZ5CT.js} +1 -1
  14. package/dist/{Title-BaKZYHEx.cjs → Title-DbAaPd9q.cjs} +1 -1
  15. package/dist/{Tooltip-BHmMXOej.js → Tooltip-DDBocDY4.js} +1 -1
  16. package/dist/{Tooltip-okAYzo5Y.cjs → Tooltip-LE8exuMN.cjs} +1 -1
  17. package/dist/{index-BiuHBtkZ.js → index-CP7GYbDW.js} +173 -162
  18. package/dist/index-U4mCr8P0.cjs +4 -0
  19. package/dist/style.css +1 -1
  20. package/dist/types/vue-data-ui.d.cts +13 -0
  21. package/dist/types/vue-data-ui.d.ts +13 -0
  22. package/dist/{useNestedProp-B9yDavuy.cjs → useNestedProp-CgUQgTyB.cjs} +1 -1
  23. package/dist/{useNestedProp-Ck5_RzLu.js → useNestedProp-Dfz8QNDn.js} +1 -1
  24. package/dist/usePrinter-BfETb5Ie.js +527 -0
  25. package/dist/usePrinter-DQLl_Row.cjs +1 -0
  26. package/dist/{vue-data-ui-CAl2KJv9.js → vue-data-ui-BiTJ4KBF.js} +57 -57
  27. package/dist/{vue-data-ui-CVYCyzY-.cjs → vue-data-ui-CgTf8Gw2.cjs} +1 -1
  28. package/dist/vue-data-ui.cjs +1 -1
  29. package/dist/vue-data-ui.js +1 -1
  30. package/dist/vue-ui-3d-bar-CKCcmMbS.cjs +19 -0
  31. package/dist/{vue-ui-3d-bar-CploAEkY.js → vue-ui-3d-bar-CKDV9VVB.js} +11 -10
  32. package/dist/{vue-ui-accordion-btKAUUTu.cjs → vue-ui-accordion-AcWCsB0f.cjs} +1 -1
  33. package/dist/{vue-ui-accordion-D2fhyKpk.js → vue-ui-accordion-DZSSaEp4.js} +3 -3
  34. package/dist/{vue-ui-age-pyramid-DkaM5MrK.js → vue-ui-age-pyramid-Cy-J_3gK.js} +25 -24
  35. package/dist/vue-ui-age-pyramid-DQ-h0bbz.cjs +1 -0
  36. package/dist/{vue-ui-annotator-38FBI0Pn.js → vue-ui-annotator-Dn_5RY5_.js} +1 -1
  37. package/dist/{vue-ui-annotator-BMYk78DR.cjs → vue-ui-annotator-GBAeaQUB.cjs} +1 -1
  38. package/dist/{vue-ui-candlestick-CKsjq0Uw.js → vue-ui-candlestick-CAdWy5Y1.js} +12 -11
  39. package/dist/vue-ui-candlestick-guSNt_H0.cjs +2 -0
  40. package/dist/{vue-ui-carousel-table-Cx72LlTd.cjs → vue-ui-carousel-table-CuFG5v2i.cjs} +1 -1
  41. package/dist/{vue-ui-carousel-table-DjGaEuM7.js → vue-ui-carousel-table-DmmKDp7-.js} +7 -7
  42. package/dist/{vue-ui-chestnut-TLyh4dIZ.js → vue-ui-chestnut-BmzjUDjK.js} +10 -9
  43. package/dist/{vue-ui-chestnut-DAiBfoPN.cjs → vue-ui-chestnut-bAWBqCf3.cjs} +2 -2
  44. package/dist/{vue-ui-cursor-BunDuWpK.cjs → vue-ui-cursor-CfkNSO9o.cjs} +1 -1
  45. package/dist/{vue-ui-cursor-B1xa5yua.js → vue-ui-cursor-DDViNH81.js} +2 -2
  46. package/dist/{vue-ui-dashboard-DdcubzWu.js → vue-ui-dashboard-BGwxII0l.js} +2 -2
  47. package/dist/{vue-ui-dashboard-CMZ736DL.cjs → vue-ui-dashboard-CT09iVhX.cjs} +1 -1
  48. package/dist/{vue-ui-digits-BUpjWWnD.js → vue-ui-digits-BYO9w7xM.js} +2 -2
  49. package/dist/{vue-ui-digits-z5g__gqs.cjs → vue-ui-digits-DObHCYJe.cjs} +1 -1
  50. package/dist/vue-ui-donut-B-YGaPcq.cjs +1 -0
  51. package/dist/{vue-ui-donut-ZLpfm-XT.js → vue-ui-donut-DqOvTGAK.js} +34 -33
  52. package/dist/{vue-ui-donut-evolution-Bn4asQO3.js → vue-ui-donut-evolution-ByIcsVPF.js} +12 -11
  53. package/dist/vue-ui-donut-evolution-DAzxGbsO.cjs +1 -0
  54. package/dist/{vue-ui-dumbbell-CY6X8J1K.cjs → vue-ui-dumbbell-Ch6sj_EW.cjs} +2 -2
  55. package/dist/{vue-ui-dumbbell-D2R9tJ99.js → vue-ui-dumbbell-JpJFPxM2.js} +11 -10
  56. package/dist/{vue-ui-flow-Dd5uPNTQ.js → vue-ui-flow-BhtIMcan.js} +10 -9
  57. package/dist/vue-ui-flow-C5N8YgfJ.cjs +1 -0
  58. package/dist/{vue-ui-galaxy-B7CoWLhj.js → vue-ui-galaxy-BZT14d6d.js} +12 -11
  59. package/dist/vue-ui-galaxy-Cv38ZzWi.cjs +1 -0
  60. package/dist/vue-ui-gauge-BrwCmfGP.cjs +1 -0
  61. package/dist/{vue-ui-gauge-CGh_m922.js → vue-ui-gauge-Dj2gBTkq.js} +29 -28
  62. package/dist/{vue-ui-gizmo-D5Kn7w7L.cjs → vue-ui-gizmo-BhCZEfOE.cjs} +1 -1
  63. package/dist/{vue-ui-gizmo-BY3hnKSH.js → vue-ui-gizmo-Dx0mO1Zf.js} +2 -2
  64. package/dist/{vue-ui-heatmap-yYN0u0I6.js → vue-ui-heatmap-DdSGFMo1.js} +41 -40
  65. package/dist/vue-ui-heatmap-azP3H0Be.cjs +1 -0
  66. package/dist/{vue-ui-kpi-B4zr_geL.js → vue-ui-kpi-C0fjrvpC.js} +3 -3
  67. package/dist/{vue-ui-kpi-Q20yM3IP.cjs → vue-ui-kpi-TKkErBy-.cjs} +1 -1
  68. package/dist/{vue-ui-mini-loader-GImbaGsN.js → vue-ui-mini-loader-CVflLGuB.js} +2 -2
  69. package/dist/{vue-ui-mini-loader-GFSZofpE.cjs → vue-ui-mini-loader-DAos2pVd.cjs} +1 -1
  70. package/dist/vue-ui-molecule-CW1523wC.cjs +1 -0
  71. package/dist/{vue-ui-molecule-DmrB3kgA.js → vue-ui-molecule-D9OfBp53.js} +290 -286
  72. package/dist/{vue-ui-mood-radar-sEkQtzI2.js → vue-ui-mood-radar-PMARjoQW.js} +79 -78
  73. package/dist/vue-ui-mood-radar-vvG5BlGa.cjs +1 -0
  74. package/dist/{vue-ui-nested-donuts-DvpZLcYd.js → vue-ui-nested-donuts-Bt8ZHG4b.js} +35 -34
  75. package/dist/vue-ui-nested-donuts-wVELVgGD.cjs +17 -0
  76. package/dist/{vue-ui-onion-DQMLPe3M.js → vue-ui-onion-B-4djV2X.js} +12 -11
  77. package/dist/vue-ui-onion-j8P027dX.cjs +5 -0
  78. package/dist/{vue-ui-parallel-coordinate-plot-DN2LPNyS.js → vue-ui-parallel-coordinate-plot-B2N249AX.js} +14 -13
  79. package/dist/vue-ui-parallel-coordinate-plot-BRNG5VwG.cjs +8 -0
  80. package/dist/vue-ui-quadrant-BaDei-7C.cjs +1 -0
  81. package/dist/{vue-ui-quadrant-D2GpeXI6.js → vue-ui-quadrant-Bvv3ZZI7.js} +13 -12
  82. package/dist/{vue-ui-quick-chart-C5K9DfUV.js → vue-ui-quick-chart-BzFITYDP.js} +60 -59
  83. package/dist/vue-ui-quick-chart-OUDWfDwC.cjs +15 -0
  84. package/dist/vue-ui-radar-Bpz3hyr9.cjs +1 -0
  85. package/dist/{vue-ui-radar-B9TZPujK.js → vue-ui-radar-CXH5XhDS.js} +13 -12
  86. package/dist/{vue-ui-rating-DpxzUDQq.cjs → vue-ui-rating-BEtR56Zg.cjs} +1 -1
  87. package/dist/{vue-ui-rating-B0pNsmGB.js → vue-ui-rating-BcngasYQ.js} +2 -2
  88. package/dist/{vue-ui-relation-circle-DSnlpLHt.js → vue-ui-relation-circle-BmWv5Kwu.js} +46 -45
  89. package/dist/{vue-ui-relation-circle-D3B-lpdM.cjs → vue-ui-relation-circle-Cn4xYFeJ.cjs} +1 -1
  90. package/dist/{vue-ui-rings-cmeFVitd.cjs → vue-ui-rings-BbrUn18Q.cjs} +2 -2
  91. package/dist/{vue-ui-rings-BuvFDBXg.js → vue-ui-rings-DDvVuJvv.js} +12 -11
  92. package/dist/vue-ui-scatter-C9B6pkLG.cjs +1 -0
  93. package/dist/{vue-ui-scatter-D_chvOSJ.js → vue-ui-scatter-CfgLA10v.js} +13 -12
  94. package/dist/{vue-ui-screenshot-CwrXLMru.cjs → vue-ui-screenshot-BDjgeoQi.cjs} +1 -1
  95. package/dist/{vue-ui-screenshot-DSHeHshf.js → vue-ui-screenshot-W6aedcDN.js} +1 -1
  96. package/dist/{vue-ui-skeleton-Du4zw-c1.js → vue-ui-skeleton-BAQjFiop.js} +2 -2
  97. package/dist/{vue-ui-skeleton-DJhwv2oY.cjs → vue-ui-skeleton-BhG4niml.cjs} +1 -1
  98. package/dist/{vue-ui-smiley-BtQLJ7rA.js → vue-ui-smiley-CQNAPd4d.js} +2 -2
  99. package/dist/{vue-ui-smiley-BNkk6suC.cjs → vue-ui-smiley-J1L8V6KG.cjs} +1 -1
  100. package/dist/{vue-ui-spark-trend-DFIjxBTY.cjs → vue-ui-spark-trend-BTdNsDFX.cjs} +1 -1
  101. package/dist/{vue-ui-spark-trend-BgA79g7a.js → vue-ui-spark-trend-CBc-tBLR.js} +4 -4
  102. package/dist/{vue-ui-sparkbar-BlwQfhlY.cjs → vue-ui-sparkbar-D0189X8M.cjs} +1 -1
  103. package/dist/{vue-ui-sparkbar-DQAWZReF.js → vue-ui-sparkbar-DCLpbzSR.js} +3 -3
  104. package/dist/{vue-ui-sparkgauge-BCRSQDpt.cjs → vue-ui-sparkgauge-ButS3IF8.cjs} +1 -1
  105. package/dist/{vue-ui-sparkgauge-CCApU38s.js → vue-ui-sparkgauge-C-12vLRd.js} +3 -3
  106. package/dist/{vue-ui-sparkhistogram-PKTt4EmH.js → vue-ui-sparkhistogram-CqHEh_4P.js} +4 -4
  107. package/dist/{vue-ui-sparkhistogram-CTxG1Vtn.cjs → vue-ui-sparkhistogram-NLFMPPXv.cjs} +1 -1
  108. package/dist/{vue-ui-sparkline-EESAiZyt.js → vue-ui-sparkline-BaHeaRVl.js} +3 -3
  109. package/dist/{vue-ui-sparkline-BUaixngQ.cjs → vue-ui-sparkline-Cy8fuCDw.cjs} +1 -1
  110. package/dist/{vue-ui-sparkstackbar-iQnc0zcO.cjs → vue-ui-sparkstackbar-B64XK1yu.cjs} +1 -1
  111. package/dist/{vue-ui-sparkstackbar-TnLNixdf.js → vue-ui-sparkstackbar-BLvXeEbr.js} +3 -3
  112. package/dist/{vue-ui-stackbar-Ci04sup3.js → vue-ui-stackbar-B-ZE7Ksh.js} +13 -12
  113. package/dist/vue-ui-stackbar-CLmcckvD.cjs +6 -0
  114. package/dist/vue-ui-strip-plot-DTJeRXEM.cjs +1 -0
  115. package/dist/{vue-ui-strip-plot-DbvW0BuF.js → vue-ui-strip-plot-DbmLZ03_.js} +12 -11
  116. package/dist/{vue-ui-table-CamkBCdL.js → vue-ui-table-CpUWJGi_.js} +1 -1
  117. package/dist/{vue-ui-table-328De4vk.cjs → vue-ui-table-DdroDYB6.cjs} +1 -1
  118. package/dist/vue-ui-table-heatmap-CSHkuLE3.cjs +1 -0
  119. package/dist/{vue-ui-table-heatmap-D-YdrvGV.js → vue-ui-table-heatmap-XJj-iDhJ.js} +27 -26
  120. package/dist/{vue-ui-table-sparkline-Dg2RKv6f.js → vue-ui-table-sparkline-DEhCOiH8.js} +25 -24
  121. package/dist/{vue-ui-table-sparkline-Cmg7wnQ0.cjs → vue-ui-table-sparkline-GgMGhbwH.cjs} +1 -1
  122. package/dist/{vue-ui-thermometer-jWHbZTc2.js → vue-ui-thermometer-CF9_Jiig.js} +51 -50
  123. package/dist/vue-ui-thermometer-LM5LB1fZ.cjs +1 -0
  124. package/dist/{vue-ui-timer-BPepr5eV.js → vue-ui-timer-BN3oSs18.js} +4 -4
  125. package/dist/{vue-ui-timer-B_FyRAU7.cjs → vue-ui-timer-Kw8zfnyl.cjs} +1 -1
  126. package/dist/{vue-ui-tiremarks-CaJWlyz8.cjs → vue-ui-tiremarks-B5Ieo2VI.cjs} +1 -1
  127. package/dist/{vue-ui-tiremarks-DW8Q2IBl.js → vue-ui-tiremarks-CTiztDdT.js} +48 -47
  128. package/dist/{vue-ui-treemap-B9GpvA0k.cjs → vue-ui-treemap-CHngTUd0.cjs} +1 -1
  129. package/dist/{vue-ui-treemap-CWu43qLo.js → vue-ui-treemap-DEDT65NP.js} +13 -12
  130. package/dist/vue-ui-vertical-bar-C8XQwe6S.cjs +4 -0
  131. package/dist/{vue-ui-vertical-bar-CndASePh.js → vue-ui-vertical-bar-hFeIrO6z.js} +13 -12
  132. package/dist/{vue-ui-waffle-CdyqwJwN.js → vue-ui-waffle-CLbMVN8j.js} +46 -45
  133. package/dist/{vue-ui-waffle-c9ycdoKz.cjs → vue-ui-waffle-tFQq8-qt.cjs} +1 -1
  134. package/dist/vue-ui-wheel-CMRCYfem.cjs +1 -0
  135. package/dist/{vue-ui-wheel-Byq_BLhl.js → vue-ui-wheel-DpPdEqHh.js} +34 -33
  136. package/dist/{vue-ui-word-cloud-BVOcsuMP.cjs → vue-ui-word-cloud-C18oOvC0.cjs} +1 -1
  137. package/dist/{vue-ui-word-cloud-BRxN5uFD.js → vue-ui-word-cloud-DTXq9aIY.js} +10 -9
  138. package/dist/vue-ui-xy-Bw1GQuGo.cjs +3 -0
  139. package/dist/{vue-ui-xy-DgEdZz0O.js → vue-ui-xy-DN8TqWYI.js} +342 -339
  140. package/dist/{vue-ui-xy-canvas-BI7jUOTn.js → vue-ui-xy-canvas-BoH-Grae.js} +54 -53
  141. package/dist/{vue-ui-xy-canvas-Td0WNYN0.cjs → vue-ui-xy-canvas-Dg9jorcV.cjs} +2 -2
  142. package/package.json +1 -1
  143. package/dist/Slicer-DCyxUSsn.cjs +0 -1
  144. package/dist/index-D-vy9N1v.cjs +0 -4
  145. package/dist/usePrinter-Do8KiK5h.js +0 -513
  146. package/dist/usePrinter-P4nLcXX-.cjs +0 -1
  147. package/dist/vue-ui-3d-bar-DlUqKETN.cjs +0 -19
  148. package/dist/vue-ui-age-pyramid-CvSoQ1op.cjs +0 -1
  149. package/dist/vue-ui-candlestick-BJulnyV3.cjs +0 -2
  150. package/dist/vue-ui-donut-TY2Z9Ljx.cjs +0 -1
  151. package/dist/vue-ui-donut-evolution-BEm2dOxe.cjs +0 -1
  152. package/dist/vue-ui-flow-DswsuPwy.cjs +0 -1
  153. package/dist/vue-ui-galaxy-Dxy6jzus.cjs +0 -1
  154. package/dist/vue-ui-gauge-CWd_ol6u.cjs +0 -1
  155. package/dist/vue-ui-heatmap-AUm42a1v.cjs +0 -1
  156. package/dist/vue-ui-molecule-C9FcDH4x.cjs +0 -1
  157. package/dist/vue-ui-mood-radar-CRwStVTV.cjs +0 -1
  158. package/dist/vue-ui-nested-donuts-BcOgxtZV.cjs +0 -17
  159. package/dist/vue-ui-onion-C9v9YjdJ.cjs +0 -5
  160. package/dist/vue-ui-parallel-coordinate-plot-BBuPdl2K.cjs +0 -8
  161. package/dist/vue-ui-quadrant-ulY-rCMI.cjs +0 -1
  162. package/dist/vue-ui-quick-chart-DFj17h6h.cjs +0 -15
  163. package/dist/vue-ui-radar-KA287Tp-.cjs +0 -1
  164. package/dist/vue-ui-scatter-BWPqoSUN.cjs +0 -1
  165. package/dist/vue-ui-stackbar-Rrcyg4CC.cjs +0 -6
  166. package/dist/vue-ui-strip-plot-CowHumiU.cjs +0 -1
  167. package/dist/vue-ui-table-heatmap-CCHre3Gt.cjs +0 -1
  168. package/dist/vue-ui-thermometer-BDeKErC9.cjs +0 -1
  169. package/dist/vue-ui-vertical-bar-a_41JdIn.cjs +0 -4
  170. package/dist/vue-ui-wheel-B3BMfKmd.cjs +0 -1
  171. package/dist/vue-ui-xy-CsS5ny0q.cjs +0 -3
@@ -0,0 +1,15 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-U4mCr8P0.cjs"),xe=require("./useResponsive-B3TrDDIG.cjs"),ne=require("./BaseIcon-CgLB-iUq.cjs"),Pe=require("./Tooltip-LE8exuMN.cjs"),Se=require("./usePrinter-DQLl_Row.cjs"),Te=require("./Slicer-CoyHeBxs.cjs"),Re=require("./vue-ui-skeleton-BhG4niml.cjs"),be=require("./useNestedProp-CgUQgTyB.cjs"),Ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},Oe=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function De({dataset:s,barLineSwitch:B=6}){let h=null,L=null,z=0;if((typeof s=="number"||typeof s=="string")&&console.warn(`The provided dataset (${s}) is not sufficient to build a chart`),Q(s)&&(P(s)&&(s.length<B?h=S.BAR:h=S.LINE,L=s,z=s.length),re(s))){if(!Ue(s))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const U=Object.keys(s[0]),j=Object.values(s[0]);if(!U.some(E=>qe(E)))return console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."),!1;Be(j,E=>typeof E=="number")&&(h=S.DONUT,L=s),Be(j,E=>Array.isArray(E)&&P(E))&&(we(s)>B?h=S.LINE:h=S.BAR,z=we(s),L=s.map(E=>({...E,data:We(E,$=>P($))}))),s=s.map(E=>Ee(E)),L=L.map(E=>Ee(E))}return Q(s)&&[...new Set(s.flatMap(U=>Array.isArray(U)))][0],{dataset:s,type:h,usableDataset:L,maxSeriesLength:z}}function _e(s){return!s||Q(s)&&!s.length}function Q(s){return Array.isArray(s)}function P(s){if(!Q(s)||_e(s))return!1;const B=s.map(h=>Number(h));return![...new Set(B.flatMap(h=>typeof h=="number"&&!isNaN(h)))].includes(!1)}function re(s){return!Q(s)||_e(s)||!![...new Set(s.flatMap(h=>typeof h=="object"&&!Array.isArray(h)))].includes(!1)?!1:!s.map(h=>Object.keys(h).length>0).includes(!1)}function Me(s,B){const h=Object.keys(s).sort(),L=Object.keys(B).sort();if(h.length!==L.length)return!1;for(let z=0;z<h.length;z+=1){const F=h[z],M=L[z];if(F!==M||typeof s[F]!=typeof B[M])return!1}return!0}function Ue(s){if(s.length<=1)return!0;for(let B=0;B<s.length;B+=1)for(let h=B+1;h<s.length;h+=1)if(!Me(s[B],s[h]))return!1;return!0}function qe(s){return Oe.includes(s.toUpperCase())}function Be(s,B){let h=[];for(let L=0;L<s.length;L+=1)h.push(B(s[L]));return h.includes(!0)}function we(s){return Math.max(...[...s].flatMap(B=>Object.values(B).filter(h=>P(h)).map(h=>h.length)))}function We(s,B){return Object.values(s).filter(h=>B(h))[0]}function Ee(s){const B={};for(let h in s)s.hasOwnProperty(h)&&(B[h.toUpperCase()]=s[h]);return B}const Le=s=>(e.pushScopeId("data-v-1f3ccedc"),s=s(),e.popScopeId(),s),je=["id"],Ge=["xmlns","viewBox"],He=["id"],Xe=["id"],Ye=Le(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Ze=["id"],Je=["flood-color"],Qe={key:0,class:"donut-label-connectors"},Ke=["d","stroke","stroke-width","filter"],et=["cx","cy","r","fill"],tt=["cx","cy","r","fill","filter"],lt={class:"donut"},at=["d","fill","stroke","stroke-width","filter"],ot=["d","onMouseenter","onClick"],nt={key:1,class:"donut-labels quick-animation"},rt=["cx","cy","fill","filter"],it=["text-anchor","x","y","fill","font-size","filter"],ut=["text-anchor","x","y","fill","font-size","filter"],st={key:2,class:"donut-hollow quick-animation"},ct=["x","y","font-size","fill"],dt=["x","y","font-size","fill"],vt={key:0,class:"line-grid"},mt=["x1","x2","y1","y2","stroke","stroke-width"],ht=["x1","x2","y1","y2","stroke","stroke-width"],ft={key:1,class:"line-axis"},pt=["x1","x2","y1","y2","stroke","stroke-width"],kt=["x1","x2","y1","y2","stroke","stroke-width"],gt={key:2,class:"yLabels"},yt=["x1","x2","y1","y2","stroke","stroke-width"],xt=["x","y","font-size","fill"],St={key:3,class:"periodLabels"},bt=["x1","x2","y1","y2","stroke","stroke-width"],Bt=["font-size","text-anchor","fill","transform"],wt={class:"plots"},Et={class:"line-plot-series"},_t=["d","stroke","stroke-width"],Lt=["d","stroke","stroke-width"],At=["d","stroke","stroke-width"],Ct=["d","stroke","stroke-width"],Nt=["cx","cy","fill","stroke"],zt={key:4,class:"dataLabels"},Vt=["font-size","fill","x","y"],Ft={class:"tooltip-traps"},$t=["x","y","height","width","fill","onMouseenter","onClick"],Pt={key:0,class:"line-grid"},Tt=["x1","x2","y1","y2","stroke","stroke-width"],Rt=["x1","x2","y1","y2","stroke","stroke-width"],It={key:1,class:"line-axis"},Ot=["x1","x2","y1","y2","stroke","stroke-width"],Dt=["x1","x2","y1","y2","stroke","stroke-width"],Mt={key:2,class:"yLabels"},Ut=["x1","x2","y1","y2","stroke","stroke-width"],qt=["x","y","font-size","fill"],Wt={key:3,class:"periodLabels"},jt=["x1","x2","y1","y2","stroke","stroke-width"],Gt=["font-size","text-anchor","transform","fill"],Ht={class:"plots"},Xt=["x","width","height","y","fill","stroke","stroke-width"],Yt=["to"],Zt=["from","to"],Jt={key:4,class:"dataLabels"},Qt=["x","y","font-size","fill"],Kt={class:"tooltip-traps"},el=["x","y","height","width","fill","onMouseenter","onClick"],tl={key:3,class:"axis-labels"},ll={key:0},al=["font-size","fill","x","y"],ol={key:1},nl=["font-size","fill","x","y"],rl={key:2},il=["font-size","fill","transform"],ul={key:3},sl=["font-size","fill","transform"],cl={key:4,class:"vue-data-ui-watermark"},dl=["onClick"],vl=["onClick"],ml=["onClick"],hl={key:1,class:"vue-ui-quick-chart-not-processable"},fl=Le(()=>e.createElementVNode("span",null,"Dataset is not processable",-1)),pl={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(s,{expose:B,emit:h}){const L=s,{vue_ui_quick_chart:z}=u.useConfig(),F=e.ref(null),M=e.ref(null),U=e.ref(null),j=e.ref(null),E=e.ref(u.createUid()),$=e.ref(!1),G=e.ref(null),R=e.ref(""),V=e.ref(null),x=e.ref([]),se=e.ref(0),K=e.ref(0),t=e.computed({get:()=>ce(),set:n=>n});function ce(){const n=be.useNestedProp({userConfig:L.config,defaultConfig:z});return n.theme?{...be.useNestedProp({userConfig:u.themes.vue_ui_quick_chart[n.theme]||L.config,defaultConfig:n}),customPalette:u.themePalettes[n.theme]||u.palette}:n}e.watch(()=>L.config,n=>{t.value=ce(),p.value.width=t.value.width,p.value.height=t.value.height,me()},{deep:!0}),e.watch(()=>L.dataset,n=>{k.value=X.value,g.value.start=0,g.value.end=k.value.maxSeriesLength,K.value+=1},{deep:!0});const H=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),X=e.computed(()=>{const n=De({dataset:u.sanitizeArray(L.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return n||console.error("VueUiQuickChart : Dataset is not processable"),n}),k=e.ref(X.value),Ae=e.computed(()=>!!k.value),b=e.computed(()=>k.value?k.value.type:null);e.watch(()=>b.value,n=>{n||u.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:ee,isImaging:te,generatePdf:de,generateImage:ve}=Se.usePrinter({elementId:`${b.value}_${E.value}`,fileName:t.value.title||b.value}),p=e.ref({width:t.value.width,height:t.value.height}),le=e.ref({showTooltip:t.value.showTooltip}),ae=e.ref(null);e.onMounted(()=>{me()});function me(){if(t.value.responsive){const n=xe.throttle(()=>{const{width:v,height:l}=xe.useResponsive({chart:F.value,title:t.value.title?M.value:null,legend:t.value.showLegend?U.value:null,slicer:[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&k.value.maxSeriesLength>1?j.value:null});p.value.width=v,p.value.height=l});ae.value=new ResizeObserver(n),ae.value.observe(F.value.parentNode)}}e.onBeforeUnmount(()=>{ae.value&&ae.value.disconnect()});const Ce=e.computed(()=>{switch(b.value){case S.LINE:return`0 0 ${p.value.width<=0?10:p.value.width} ${p.value.height<=0?10:p.value.height}`;case S.BAR:return`0 0 ${p.value.width<=0?10:p.value.width} ${p.value.height<=0?10:p.value.height}`;case S.DONUT:return`0 0 ${p.value.width<=0?10:p.value.width} ${p.value.height<=0?10:p.value.height}`;default:return`0 0 ${p.value.width<=0?10:p.value.width} ${p.value.height<=0?10:p.value.height}`}});function he(n){return[...n].map(v=>v.value).reduce((v,l)=>v+l,0)}function Y(n){return t.value.blurOnHover&&![null,void 0].includes(V.value)&&V.value!==n?`url(#blur_${E.value})`:""}function fe(n,v){x.value.includes(n)?x.value=x.value.filter(l=>l!==n):x.value.length<v&&x.value.push(n)}const pe=e.ref(null),ke=e.ref(null),oe=e.ref(!1);function Ne(n,v){oe.value=!0;let l=n.value;if(x.value.includes(n.id)){let i=function(){l>r?(oe.value=!1,cancelAnimationFrame(ke.value),k.value={...k.value,dataset:k.value.dataset.map((m,A)=>n.id===`donut_${A}`?{...m,value:r,VALUE:r}:m)}):(l+=r*.025,k.value={...k.value,dataset:k.value.dataset.map((m,A)=>n.id===`donut_${A}`?{...m,value:l,VALUE:l}:m)},ke.value=requestAnimationFrame(i))};x.value=x.value.filter(m=>m!==n.id);const r=X.value.dataset.find((m,A)=>n.id===`donut_${A}`).VALUE;i()}else if(v.length>1){let r=function(){l<.1?(oe.value=!1,cancelAnimationFrame(pe.value),x.value.push(n.id),k.value={...k.value,dataset:k.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:0,VALUE:0}:i)}):(l/=1.1,k.value={...k.value,dataset:k.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:l,VALUE:l}:i)},pe.value=requestAnimationFrame(r))};r()}}const T=e.ref(null);function ze(n){T.value=n}const ge=e.computed(()=>t.value.donutThicknessRatio<.15?.15:t.value.donutThicknessRatio>.4?.4:t.value.donutThicknessRatio),w=e.computed(()=>{if(b.value!==S.DONUT)return null;const n=k.value.dataset.map((a,o)=>({...a,value:a.VALUE||a.DATA||a.SERIE||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`donut_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],immutableValue:a.value}));function v(a,o){return u.dataLabel({v:isNaN(a.value/he(o))?0:a.value/he(o)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(a){return a.proportion*100>t.value.donutHideLabelUnderPercentage}function r(a,o){const y=X.value.dataset.find((_,C)=>`donut_${C}`===a).VALUE;return Math.abs(String(Number(y.toFixed(0))).length-String(Number(o.toFixed(0))).length)}function i({datapoint:a,seriesIndex:o}){G.value={datapoint:a,seriesIndex:o,config:t.value,dataset:n},V.value=a.id;const y=t.value.tooltipCustomFormat;if(u.isFunction(y)&&u.functionReturnsString(()=>y({datapoint:a,seriesIndex:o,series:n,config:t.value})))R.value=y({datapoint:a,seriesIndex:o,series:n,config:t.value});else{let f="";f+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`,f+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${a.color}"/></svg>`,f+=`<b>${u.applyDataLabel(t.value.formatter,a.value,u.dataLabel({p:t.value.valuePrefix,v:a.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:a,seriesIndex:o})}</b>`,f+=`<span>(${u.dataLabel({v:a.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,R.value=`<div>${f}</div>`}$.value=!0}function m(){$.value=!1,V.value=null,T.value=null}const A={centerX:p.value.width/2,centerY:p.value.height/2},N=n.filter(a=>!x.value.includes(a.id)).map(a=>a.value||0).reduce((a,o)=>a+o,0),q=n.map((a,o)=>({...a,proportion:(a.value||0)/N,value:a.value||0,absoluteValue:X.value.dataset.find((y,f)=>`donut_${f}`===a.id).VALUE})),I=p.value.width/2,W=p.value.height/2,O=p.value.height*t.value.donutRadiusRatio;return{dataset:q.filter(a=>!x.value.includes(a.id)),legend:q,drawingArea:A,displayArcPercentage:v,isArcBigEnough:l,useTooltip:i,killTooltip:m,getSpaces:r,total:N,cx:I,cy:W,radius:O,chart:u.makeDonut({series:n.filter(a=>!x.value.includes(a.id))},I,W,O,O,1.99999,2,1,360,105.25,p.value.height*ge.value)}}),g=e.ref({start:0,end:k.value.maxSeriesLength});function Ve(){g.value={start:0,end:k.value.maxSeriesLength},K.value+=1}const Fe=e.computed(()=>{if(!t.value.zoomMinimap.show||b.value===S.DONUT)return[];let n=[];P(k.value.dataset)&&(n=k.value.dataset),re(k.value.dataset)&&(n=k.value.dataset.map((i,m)=>({values:i.VALUE||i.DATA||i.SERIE||i.SERIES||i.VALUES||i.NUM||0,id:b.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(i=>!x.value.includes(i.id)));const v=P(n)?n.length:Math.max(...n.map(i=>i.values.length));let l=[];if(P(n))l=n;else for(let i=0;i<v;i+=1)l.push(n.map(m=>m.values[i]||0).reduce((m,A)=>(m||0)+(A||0),0));const r=Math.min(...l);return l.map(i=>i+(r<0?Math.abs(r):0))}),d=e.computed(()=>{if(b.value!==S.LINE)return null;const n={height:p.value.height,width:p.value.width},v={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:n.width-t.value.xyPaddingRight,bottom:n.height-t.value.xyPaddingBottom,width:n.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:n.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];P(k.value.dataset)&&(l=[{values:k.value.dataset.slice(g.value.start,g.value.end),absoluteIndices:k.value.dataset.map((a,o)=>o).slice(g.value.start,g.value.end),name:t.value.title,color:H.value[t.value.paletteStartIndex]||u.palette[t.value.paletteStartIndex],id:"line_0"}]),re(k.value.dataset)&&(l=k.value.dataset.map((a,o)=>({...a,values:a.VALUE||a.DATA||a.SERIE||a.SERIES||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`line_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],values:a.values.slice(g.value.start,g.value.end),absoluteIndices:a.values.map((y,f)=>f).slice(g.value.start,g.value.end)})));const r={max:Math.max(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),min:Math.min(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),maxSeries:Math.max(...l.map(a=>a.values.length))},i=u.calculateNiceScale(r.min<0?r.min:0,r.max<0?0:r.max,t.value.xyScaleSegments),m=r.min<0?Math.abs(r.min):0,A=r.max<0?v.top:v.bottom-m/(i.max+m)*v.height,N=v.width/r.maxSeries,q=i.ticks.map(a=>({y:v.bottom-v.height*((a+m)/(i.max+m)),x:v.left-8,value:a})),I=l.map((a,o)=>({...a,coordinates:a.values.map((y,f)=>({x:v.left+N*(f+1)-N/2,y:v.bottom-(y+m)/(i.max+m)*v.height,value:y}))})).map(a=>{let o=[];return a.coordinates.forEach(y=>{o.push(`${y.x},${y.y} `)}),{...a,linePath:o.join(" ")}});function W(a){V.value=a,T.value=a;const o=l.map(f=>({...f,value:f.values[a],absoluteIndex:f.absoluteIndices[a]})).filter(f=>!x.value.includes(f.id));G.value={datapoint:o,seriesIndex:a,config:t.value,dataset:l};const y=t.value.tooltipCustomFormat;if(u.isFunction(y)&&u.functionReturnsString(()=>y({datapoint:o,seriesIndex:a,series:l,config:t.value})))R.value=y({datapoint:o,seriesIndex:a,series:l,config:t.value});else{let f="";t.value.xyPeriods[o[0].absoluteIndex]&&(f+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[o[0].absoluteIndex]}</div>`),o.forEach((_,C)=>{f+=`
2
+ <div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
3
+ <svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${_.color}"/></svg>
4
+ <span>${_.name}:</span>
5
+ <b>${u.applyDataLabel(t.value.formatter,_.value,u.dataLabel({p:t.value.valuePrefix,v:_.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:_,seriesIndex:C})}
6
+ </b>
7
+ </div>
8
+ `}),R.value=f}$.value=!0}function O(){V.value=null,$.value=!1}return{absoluteZero:A,dataset:I.filter(a=>!x.value.includes(a.id)),legend:I,drawingArea:v,extremes:r,slotSize:N,yLabels:q,useTooltip:W,killTooltip:O}}),c=e.computed(()=>{if(b.value!==S.BAR)return null;const n={height:p.value.height,width:p.value.width},v={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:n.width-t.value.xyPaddingRight,bottom:n.height-t.value.xyPaddingBottom,width:n.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:n.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];P(k.value.dataset)&&(l=[{values:k.value.dataset.slice(g.value.start,g.value.end),absoluteIndices:k.value.dataset.map((o,y)=>y).slice(g.value.start,g.value.end),name:t.value.title,color:H.value[t.value.paletteStartIndex]||u.palette[t.value.paletteStartIndex],id:"bar_0"}]),re(k.value.dataset)&&(l=k.value.dataset.map((o,y)=>({...o,values:o.VALUE||o.DATA||o.SERIE||o.SERIES||o.VALUES||o.NUM||0,name:o.NAME||o.DESCRIPTION||o.TITLE||o.LABEL||`Serie ${y}`,id:`bar_${y}`})).map((o,y)=>({...o,color:o.COLOR?u.convertColorToHex(o.COLOR):H.value[y+t.value.paletteStartIndex]||u.palette[y+t.value.paletteStartIndex]||u.palette[(y+t.value.paletteStartIndex)%u.palette.length],values:o.values.slice(g.value.start,g.value.end),absoluteIndices:o.values.map((f,_)=>_).slice(g.value.start,g.value.end)})));const r={max:Math.max(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values))<0?0:Math.max(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),min:Math.min(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),maxSeries:Math.max(...l.filter(o=>!x.value.includes(o.id)).map(o=>o.values.length))},i=u.calculateNiceScale(r.min<0?r.min:0,r.max,t.value.xyScaleSegments),m=i.min<0?Math.abs(i.min):0,A=v.bottom-m/(i.max+m)*v.height,N=v.width/r.maxSeries,q=i.ticks.map(o=>({y:v.bottom-v.height*((o+m)/(i.max+m)),x:v.left-8,value:o})),I=l.map((o,y)=>({...o,coordinates:o.values.map((f,_)=>{const C=(f+m)/(r.max+m)*v.height,Z=Math.abs(f)/Math.abs(r.min)*(v.height-A),ue=m/(r.max+m)*v.height,J=N/l.filter(D=>!x.value.includes(D.id)).length-t.value.barGap/l.filter(D=>!x.value.includes(D.id)).length;return{x:v.left+N*_+J*y+t.value.barGap/2,y:f>0?v.bottom-C:A,height:f>0?C-ue:Z,value:f,width:J}})})),W=l.filter(o=>!x.value.includes(o.id)).map((o,y)=>({...o,coordinates:o.values.map((f,_)=>{const C=(f+m)/(r.max+m)*v.height,Z=Math.abs(f)/(r.max+m)*v.height,ue=m/(r.max+m)*v.height,J=N/l.filter(D=>!x.value.includes(D.id)).length-t.value.barGap/l.filter(D=>!x.value.includes(D.id)).length;return{x:v.left+N*_+J*y+t.value.barGap/2,y:f>0?v.bottom-C:A,height:f>0?C-ue:Z,value:f,width:J}})}));function O(o){V.value=o,T.value=o;const y=l.map(_=>({..._,value:_.values[o],absoluteIndex:_.absoluteIndices[o]})).filter(_=>!x.value.includes(_.id));G.value={datapoint:y,seriesIndex:o,config:t.value,dataset:l};const f=t.value.tooltipCustomFormat;if(u.isFunction(f)&&u.functionReturnsString(()=>f({datapoint:y,seriesIndex:o,series:l,config:t.value})))R.value=f({point:y,seriesIndex:o,series:l,config:t.value});else{let _="";t.value.xyPeriods[y[0].absoluteIndex]&&(_+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[y[0].absoluteIndex]}</div>`),y.forEach((C,Z)=>{_+=`
9
+ <div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
10
+ <svg viewBox="0 0 12 12" height="14" width="12"><rect x=0 y="0" width="12" height="12" rx="1" stroke="none" fill="${C.color}"/></svg>
11
+ <span>${C.name}:</span>
12
+ <b>${u.applyDataLabel(t.value.formatter,C.value,u.dataLabel({p:t.value.valuePrefix,v:C.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:C,seriesIndex:Z})}
13
+ </b>
14
+ </div>
15
+ `}),R.value=_}$.value=!0}function a(){$.value=!1,V.value=null,T.value=null}return{absoluteZero:A,dataset:W.filter(o=>!x.value.includes(o.id)),legend:I,drawingArea:v,extremes:r,slotSize:N,yLabels:q,useTooltip:O,killTooltip:a}}),ie=e.ref(!1);function $e(n){ie.value=n,se.value+=1}function ye(){le.value.showTooltip=!le.value.showTooltip}return B({generatePdf:de,generateImage:ve,toggleTooltip:ye}),(n,v)=>Ae.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:`${b.value}_${E.value}`,ref_key:"quickChart",ref:F,class:e.normalizeClass({"vue-ui-quick-chart":!0,"vue-data-ui-wrapper-fullscreen":ie.value}),style:e.normalizeStyle(`background:${t.value.backgroundColor};color:${t.value.color};font-family:${t.value.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`)},[t.value.showUserOptions?(e.openBlock(),e.createBlock(Se.UserOptions,{ref:"details",key:`user_option_${se.value}`,backgroundColor:t.value.backgroundColor,color:t.value.color,isPrinting:e.unref(ee),isImaging:e.unref(te),uid:E.value,hasTooltip:t.value.userOptionsButtons.tooltip&&t.value.showTooltip,hasPdf:t.value.userOptionsButtons.pdf,hasImg:t.value.userOptionsButtons.img,hasFullscreen:t.value.userOptionsButtons.fullscreen,hasXls:!1,isTooltip:le.value.showTooltip,isFullscreen:ie.value,titles:{...t.value.userOptionsButtonTitles},chartElement:F.value,position:t.value.userOptionsPosition,onToggleFullscreen:$e,onGeneratePdf:e.unref(de),onGenerateImage:e.unref(ve),onToggleTooltip:ye},e.createSlots({_:2},[n.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,n.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,n.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,n.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(n.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),t.value.title?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"quickChartTitle",ref:M,class:"vue-ui-quick-chart-title",style:e.normalizeStyle(`background:transparent;color:${t.value.color};font-size:${t.value.titleFontSize}px;font-weight:${t.value.titleBold?"bold":"normal"};text-align:${t.value.titleTextAlign}`)},e.toDisplayString(t.value.title),5)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(u.XMLNS),viewBox:Ce.value,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${E.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${E.value}`},null,8,Xe),Ye],8,He),e.createElementVNode("filter",{id:`shadow_${E.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.donutShadowColor},null,8,Je)],8,Ze)]),b.value===S.DONUT?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",Qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(u.calcNutArrowPath)(l,{x:p.value.width/2,y:p.value.height/2},16,16,!1,!1,p.value.height*ge.value),stroke:l.color,"stroke-width":t.value.donutLabelMarkerStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:Y(l.id)},null,8,Ke)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("circle",{class:"donut-hollow",cx:(t.value.width||p.value.width)/2,cy:(t.value.height||p.value.height)/2,r:(t.value.height||p.value.height)*t.value.donutRadiusRatio,fill:t.value.backgroundColor},null,8,et),e.createElementVNode("circle",{cx:w.value.cx,cy:w.value.cy,r:w.value.radius,fill:t.value.backgroundColor,filter:t.value.donutUseShadow?`url(#shadow_${E.value})`:""},null,8,tt),e.createElementVNode("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":t.value.donutStrokeWidth,filter:Y(l.id)},null,8,at))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:"transparent",onMouseenter:i=>w.value.useTooltip({datapoint:l,seriesIndex:r}),onMouseout:v[0]||(v[0]=i=>w.value.killTooltip()),onClick:i=>h("selectDatapoint",l)},null,40,ot))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(u.calcMarkerOffsetX)(l).x,cy:e.unref(u.calcMarkerOffsetY)(l)-3.7,fill:l.color,r:3,filter:Y(l.id)},null,8,rt)):e.createCommentVNode("",!0),w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(u.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(u.calcMarkerOffsetX)(l,!0).x,y:e.unref(u.calcMarkerOffsetY)(l),fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:Y(l.id)},e.toDisplayString(w.value.displayArcPercentage(l,w.value.chart))+" ("+e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,l.value,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r}))+") ",9,it)):e.createCommentVNode("",!0),w.value.isArcBigEnough(l,!0,20)?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":e.unref(u.calcMarkerOffsetX)(l).anchor,x:e.unref(u.calcMarkerOffsetX)(l,!0).x,y:e.unref(u.calcMarkerOffsetY)(l)+t.value.dataLabelFontSize,fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:Y(l.id)},e.toDisplayString(l.name),9,ut)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.donutShowTotal?(e.openBlock(),e.createElementBlock("g",st,[e.createElementVNode("text",{"text-anchor":"middle",x:w.value.drawingArea.centerX,y:w.value.drawingArea.centerY-t.value.donutTotalLabelFontSize/2,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(t.value.donutTotalLabelText),9,ct),e.createElementVNode("text",{"text-anchor":"middle",x:w.value.drawingArea.centerX,y:w.value.drawingArea.centerY+t.value.donutTotalLabelFontSize,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(e.unref(u.dataLabel)({p:t.value.valuePrefix,v:w.value.total,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue})),9,dt)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),b.value===S.LINE?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.xyShowGrid?(e.openBlock(),e.createElementBlock("g",vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.yLabels,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=d.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:d.value.drawingArea.left,x2:d.value.drawingArea.right,y1:l.y,y2:l.y,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,mt)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.extremes.maxSeries+1,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.drawingArea.left+d.value.slotSize*r,x2:d.value.drawingArea.left+d.value.slotSize*r,y1:d.value.drawingArea.top,y2:d.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,ht))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",ft,[e.createElementVNode("line",{x1:d.value.drawingArea.left,x2:d.value.drawingArea.left,y1:d.value.drawingArea.top,y2:d.value.drawingArea.bottom,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,pt),e.createElementVNode("line",{x1:d.value.drawingArea.left,x2:d.value.drawingArea.right,y1:isNaN(d.value.absoluteZero)?d.value.drawingArea.bottom:d.value.absoluteZero,y2:isNaN(d.value.absoluteZero)?d.value.drawingArea.bottom:d.value.absoluteZero,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,kt)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.yLabels,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=d.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x+4,x2:d.value.drawingArea.left,y1:l.y,y2:l.y,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,yt)):e.createCommentVNode("",!0),l.y<=d.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.x,y:l.y+t.value.xyLabelsYFontSize/3,"text-anchor":"end","font-size":t.value.xyLabelsYFontSize,fill:t.value.color},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,l.value,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r})),9,xt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",St,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(g.value.start,g.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.drawingArea.left+d.value.slotSize*(r+1)-d.value.slotSize/2,x2:d.value.drawingArea.left+d.value.slotSize*(r+1)-d.value.slotSize/2,y1:d.value.drawingArea.bottom,y2:d.value.drawingArea.bottom+4,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,bt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(g.value.start,g.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("text",{"font-size":t.value.xyLabelsXFontSize,"text-anchor":t.value.xyPeriodLabelsRotation>0?"start":t.value.xyPeriodLabelsRotation<0?"end":"middle",fill:t.value.color,transform:`translate(${d.value.drawingArea.left+d.value.slotSize*(r+1)-d.value.slotSize/2}, ${d.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}), rotate(${t.value.xyPeriodLabelsRotation})`},e.toDisplayString(l),9,Bt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock("g",Et,[t.value.lineSmooth?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("path",{d:`M ${e.unref(u.createSmoothPath)(l.coordinates)}`,stroke:t.value.backgroundColor,"stroke-width":t.value.lineStrokeWidth+1,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,_t),e.createElementVNode("path",{d:`M ${e.unref(u.createSmoothPath)(l.coordinates)}`,stroke:l.color,"stroke-width":t.value.lineStrokeWidth,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,Lt)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("path",{d:`M ${l.linePath}`,stroke:t.value.backgroundColor,"stroke-width":t.value.lineStrokeWidth+1,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,At),e.createElementVNode("path",{d:`M ${l.linePath}`,stroke:l.color,"stroke-width":t.value.lineStrokeWidth,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,Ct)],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("circle",{cx:i.x,cy:e.unref(u.checkNaN)(i.y),r:3,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":"0.5",class:"quick-animation",style:{transition:"all 0.3s ease-in-out"}},null,8,Nt))),256))]))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle","font-size":t.value.dataLabelFontSize,fill:l.color,x:i.x,y:e.unref(u.checkNaN)(i.y)-t.value.dataLabelFontSize/2,class:"quick-animation",style:{transition:"all 0.3s ease-in-out"}},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,e.unref(u.checkNaN)(i.value),e.unref(u.dataLabel)({p:t.value.valuePrefix,v:e.unref(u.checkNaN)(i.value),s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:i,seriesIndex:m})),9,Vt))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.extremes.maxSeries,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{x:d.value.drawingArea.left+r*d.value.slotSize,y:d.value.drawingArea.top,height:d.value.drawingArea.height<=0?1e-5:d.value.drawingArea.height,width:d.value.slotSize<=0?1e-5:d.value.slotSize,fill:[V.value,T.value].includes(r)?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:i=>d.value.useTooltip(r),onMouseleave:v[1]||(v[1]=i=>d.value.killTooltip()),onClick:i=>h("selectDatapoint",d.value.dataset.map(m=>({...m,value:m.values[r]})))},null,44,$t))),256))])],64)):e.createCommentVNode("",!0),b.value===S.BAR?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.value.xyShowGrid?(e.openBlock(),e.createElementBlock("g",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.yLabels,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:c.value.drawingArea.left,x2:c.value.drawingArea.right,y1:l.y,y2:l.y,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Tt)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.extremes.maxSeries+1,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:c.value.drawingArea.left+c.value.slotSize*r,x2:c.value.drawingArea.left+c.value.slotSize*r,y1:c.value.drawingArea.top,y2:c.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Rt))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",It,[e.createElementVNode("line",{x1:c.value.drawingArea.left,x2:c.value.drawingArea.left,y1:c.value.drawingArea.top,y2:c.value.drawingArea.bottom,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Ot),e.createElementVNode("line",{x1:c.value.drawingArea.left,x2:c.value.drawingArea.right,y1:isNaN(c.value.absoluteZero)?c.value.drawingArea.bottom:c.value.absoluteZero,y2:isNaN(c.value.absoluteZero)?c.value.drawingArea.bottom:c.value.absoluteZero,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Dt)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",Mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.yLabels,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x+4,x2:c.value.drawingArea.left,y1:l.y,y2:l.y,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Ut)):e.createCommentVNode("",!0),l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.x,y:l.y+t.value.xyLabelsYFontSize/3,"text-anchor":"end","font-size":t.value.xyLabelsYFontSize,fill:t.value.color},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,l.value,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r})),9,qt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",Wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(g.value.start,g.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:c.value.drawingArea.left+c.value.slotSize*(r+1)-c.value.slotSize/2,x2:c.value.drawingArea.left+c.value.slotSize*(r+1)-c.value.slotSize/2,y1:c.value.drawingArea.bottom,y2:c.value.drawingArea.bottom+4,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,jt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(g.value.start,g.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("text",{"font-size":t.value.xyLabelsXFontSize,"text-anchor":t.value.xyPeriodLabelsRotation>0?"start":t.value.xyPeriodLabelsRotation<0?"end":"middle",transform:`translate(${c.value.drawingArea.left+c.value.slotSize*(r+1)-c.value.slotSize/2}, ${c.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}) rotate(${t.value.xyPeriodLabelsRotation})`,fill:t.value.color},e.toDisplayString(l),9,Gt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("rect",{x:i.x,width:i.width<=0?1e-5:i.width,height:e.unref(u.checkNaN)(i.height<=0?1e-5:i.height),y:e.unref(u.checkNaN)(i.y),fill:l.color,stroke:t.value.backgroundColor,"stroke-width":t.value.barStrokeWidth,"stroke-linecap":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.barAnimated&&i.value<0})},[t.value.barAnimated&&i.value>0&&!e.unref(ee)&&!e.unref(te)?(e.openBlock(),e.createElementBlock("animate",{key:0,attributeName:"height",from:0,to:i.height,dur:"0.5s"},null,8,Yt)):e.createCommentVNode("",!0),t.value.barAnimated&&i.value>0&&!e.unref(ee)&&!e.unref(te)?(e.openBlock(),e.createElementBlock("animate",{key:1,attributeName:"y",from:c.value.absoluteZero,to:c.value.absoluteZero-i.height,dur:"0.5s"},null,8,Zt)):e.createCommentVNode("",!0)],10,Xt))),256))],64))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",Jt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("text",{x:i.x+i.width/2,y:e.unref(u.checkNaN)(i.y)-t.value.dataLabelFontSize/2,"text-anchor":"middle","font-size":t.value.dataLabelFontSize,fill:l.color,class:"quick-animation"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,e.unref(u.checkNaN)(i.value),e.unref(u.dataLabel)({p:t.value.valuePrefix,v:e.unref(u.checkNaN)(i.value),s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:i,seriesIndex:m})),9,Qt))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Kt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.extremes.maxSeries,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{x:c.value.drawingArea.left+r*c.value.slotSize,y:c.value.drawingArea.top,height:c.value.drawingArea.height<=0?1e-5:c.value.drawingArea.height,width:c.value.slotSize<=0?1e-5:c.value.slotSize,fill:[V.value,T.value].includes(r)?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:i=>c.value.useTooltip(r),onMouseleave:v[2]||(v[2]=i=>c.value.killTooltip()),onClick:i=>h("selectDatapoint",c.value.dataset.map(m=>({...m,value:m.values[r]})))},null,44,el))),256))])],64)):e.createCommentVNode("",!0),[S.LINE,S.BAR].includes(b.value)?(e.openBlock(),e.createElementBlock("g",tl,[t.value.xAxisLabel&&b.value===S.LINE?(e.openBlock(),e.createElementBlock("g",ll,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,"text-anchor":"middle",x:d.value.drawingArea.left+d.value.drawingArea.width/2,y:p.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,al)])):e.createCommentVNode("",!0),t.value.xAxisLabel&&b.value===S.BAR?(e.openBlock(),e.createElementBlock("g",ol,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,"text-anchor":"middle",x:c.value.drawingArea.left+c.value.drawingArea.width/2,y:p.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,nl)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&b.value===S.LINE?(e.openBlock(),e.createElementBlock("g",rl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,transform:`translate(${t.value.axisLabelsFontSize}, ${d.value.drawingArea.top+d.value.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.yAxisLabel),9,il)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&b.value===S.BAR?(e.openBlock(),e.createElementBlock("g",ul,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,transform:`translate(${t.value.axisLabelsFontSize}, ${c.value.drawingArea.top+c.value.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.yAxisLabel),9,sl)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],12,Ge)):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Re.default,{key:3,config:{type:"line",style:{backgroundColor:t.value.backgroundColor,line:{axis:{color:t.value.xyAxisStroke},path:{color:t.value.xyAxisStroke,strokeWidth:.5}}}}},null,8,["config"])),n.$slots.watermark?(e.openBlock(),e.createElementBlock("div",cl,[e.renderSlot(n.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ee)||e.unref(te)})),void 0,!0)])):e.createCommentVNode("",!0),[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&k.value.maxSeriesLength>1?(e.openBlock(),e.createElementBlock("div",{key:`slicer_${K.value}`,ref_key:"quickChartSlicer",ref:j},[(e.openBlock(),e.createBlock(Te.Slicer,{key:`slicer_${K.value}`,background:t.value.zoomColor,borderColor:t.value.backgroundColor,fontSize:t.value.zoomFontSize,useResetSlot:t.value.zoomUseResetSlot,labelLeft:t.value.xyPeriods[g.value.start]?t.value.xyPeriods[g.value.start]:"",labelRight:t.value.xyPeriods[g.value.end-1]?t.value.xyPeriods[g.value.end-1]:"",textColor:t.value.color,inputColor:t.value.zoomColor,selectColor:t.value.zoomHighlightColor,max:k.value.maxSeriesLength,min:0,valueStart:g.value.start,valueEnd:g.value.end,smoothMinimap:t.value.zoomMinimap.smooth,minimapSelectedColor:t.value.zoomMinimap.selectedColor,minimapSelectedColorOpacity:t.value.zoomMinimap.selectedColorOpacity,minimapSelectionRadius:t.value.zoomMinimap.selectionRadius,minimapLineColor:t.value.zoomMinimap.lineColor,minimap:Fe.value,minimapIndicatorColor:t.value.zoomMinimap.indicatorColor,minimapSelectedIndex:T.value,start:g.value.start,"onUpdate:start":v[3]||(v[3]=l=>g.value.start=l),end:g.value.end,"onUpdate:end":v[4]||(v[4]=l=>g.value.end=l),onReset:Ve,onTrapMouse:ze},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(n.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","smoothMinimap","minimapSelectedColor","minimapSelectedColorOpacity","minimapSelectionRadius","minimapLineColor","minimap","minimapIndicatorColor","minimapSelectedIndex","start","end"]))])):e.createCommentVNode("",!0),t.value.showLegend?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"quickChartLegend",ref:U,class:"vue-ui-quick-chart-legend",style:e.normalizeStyle(`background:transparent;color:${t.value.color}`)},[b.value===S.DONUT?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(w.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:i=>{Ne(l,w.value.dataset),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${w.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(ne.default,{name:t.value.legendIcon,stroke:l.color,size:t.value.legendIconSize},null,8,["name","stroke","size"]),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)},e.toDisplayString(l.name),5),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px;font-variant-numeric:tabular-nums`)},e.toDisplayString(x.value.includes(l.id)?"-":e.unref(u.applyDataLabel)(t.value.formatter,l.absoluteValue,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.absoluteValue,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r})),5),x.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)}," ( - % ) ",4)):oe.value?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)}," ( - % ) ",4)):(e.openBlock(),e.createElementBlock("span",{key:2,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)}," ("+e.toDisplayString(e.unref(u.dataLabel)({v:l.value/w.value.total*100,s:"%",r:t.value.dataLabelRoundingPercentage}))+") ",5))],64))],12,dl))),256)):e.createCommentVNode("",!0),b.value===S.LINE?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:i=>{fe(l.id,d.value.legend.length-1),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${d.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(ne.default,{name:t.value.legendIcon,stroke:l.color,size:t.value.legendIconSize},null,8,["name","stroke","size"]),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)},e.toDisplayString(l.name),5)],64))],12,vl))),256)):e.createCommentVNode("",!0),b.value===S.BAR?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(c.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:i=>{fe(l.id,c.value.legend.length-1),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${c.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(ne.default,{name:t.value.legendIcon,stroke:l.color,size:t.value.legendIconSize},null,8,["name","stroke","size"]),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)},e.toDisplayString(l.name),5)],64))],12,ml))),256)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createVNode(Pe._sfc_main,{show:le.value.showTooltip&&$.value,backgroundColor:t.value.backgroundColor,color:t.value.color,borderRadius:t.value.tooltipBorderRadius,borderColor:t.value.tooltipBorderColor,borderWidth:t.value.tooltipBorderWidth,fontSize:t.value.tooltipFontSize,backgroundOpacity:t.value.tooltipBackgroundOpacity,position:t.value.tooltipPosition,offsetY:t.value.tooltipOffsetY,parent:F.value,content:R.value,isCustom:e.unref(u.isFunction)(t.value.tooltipCustomFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(n.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(n.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"])],14,je)):(e.openBlock(),e.createElementBlock("div",hl,[e.createVNode(ne.default,{name:"circleCancel",stroke:"red"}),fl]))}},kl=Ie._export_sfc(pl,[["__scopeId","data-v-1f3ccedc"]]);exports.default=kl;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-U4mCr8P0.cjs"),Z=require("./useResponsive-B3TrDDIG.cjs"),ge=require("./Title-DbAaPd9q.cjs"),ee=require("./usePrinter-DQLl_Row.cjs"),he=require("./Tooltip-LE8exuMN.cjs"),me=require("./vue-ui-sparkbar-D0189X8M.cjs"),fe=require("./Legend-sAjd_vcA.cjs"),ye=require("./DataTable-DnOI5Ivh.cjs"),ke=require("./vue-ui-skeleton-BhG4niml.cjs"),be=require("./vue-ui-accordion-AcWCsB0f.cjs"),te=require("./useNestedProp-CgUQgTyB.cjs"),Ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),we=["id"],Be=["xmlns","viewBox"],_e=["id"],xe=["stop-color"],Pe=["stop-color"],$e={key:0},Ne=["x1","y1","x2","y2","stroke","stroke-width"],Te={key:0},Se=["d","stroke","stroke-width"],Ee=["d","stroke","stroke-width"],Ve={key:1},Fe=["x","y","text-anchor","font-size","fill","onMouseenter"],Oe=["points","stroke","stroke-width"],Le=["points","stroke","stroke-width","fill"],ze={key:2},Ae=["cx","cy","fill","r","stroke"],Ie={key:3,class:"vue-data-ui-watermark"},Re=["onClick"],De={key:0,style:{"max-width":"200px",margin:"0 auto"}},Me={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(oe,{expose:ae,emit:le}){const d=oe,{vue_ui_radar:re}=n.useConfig(),k=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),ne=e.ref(null),P=e.ref(!1),$=e.ref(""),F=e.ref(0),b=e.ref(null),O=e.ref(null),L=e.ref(null),z=e.ref(0),A=e.ref(0),I=e.ref(0),t=e.computed({get:()=>R(),set:o=>o});function R(){const o=te.useNestedProp({userConfig:d.config,defaultConfig:re});return o.theme?{...te.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=R(),D(),z.value+=1,A.value+=1,I.value+=1},{deep:!0});const B=e.ref(null);function D(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=Z.throttle(()=>{const{width:a,height:l}=Z.useResponsive({chart:b.value,title:t.value.style.chart.title.text?O.value:null,legend:t.value.style.chart.legend.show?L.value:null});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(b.value.parentNode)}}e.onMounted(()=>{D()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:M,isImaging:q,generatePdf:U,generateImage:G}=ee.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),W=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),g=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),ue=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),s=e.ref({height:312,width:512}),i=e.ref([]),C=e.ref(null),f=e.ref(!1);function H(o){f.value=!0,i.value.includes(o)?(C.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{f.value=!1,C.value=null},500)):(i.value.push(o),setTimeout(()=>{f.value=!1},500)),le("selectLegend",y.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function se(){return y.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${m.value}_${a}`,color:n.convertColorToHex(o.color)||W.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>k.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||W.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`,formatter:o.formatter||null})):[]),X=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),j=e.computed(()=>p.value.length),N=e.computed(()=>Math.min(s.value.width,s.value.height)/3),Y=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:N.value,sides:j.value,rotation:0})),ie=e.computed(()=>{const o=[];for(let a=0;a<N.value;a+=N.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),h=e.computed(()=>Y.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>ce({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||X.value)}));return{...o,...p.value[a],plots:l}}));function T({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>s.value.width/2&&(o+=12,l="start"),o<s.value.width/2&&(o-=12,l="end"),a>s.value.height/2&&(a+=20),a<s.value.height/2&&(a-=12),a===s.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function ce({centerX:o,centerY:a,apexX:l,apexY:r,proportion:u}){return{x:o+(l-o)*u,y:a+(r-a)*u}}const y=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||X.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>H(l),isSegregated:i.value.includes(l)}))}),de=e.computed(()=>({cy:"radar-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),_=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...y.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((u,c)=>`${n.applyDataLabel(r.formatter,u,n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(u/r.target)?"":n.dataLabel({v:u/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:a,config:l,colNames:o}}),x=e.ref(null),S=e.ref([]),E=e.ref(null);function ve(o,a){S.value=[],x.value=a,P.value=!0;let l="";E.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value})))$.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let u=0;u<o.values.length;u+=1)i.value.includes(u)||S.value.push({name:v.value[u].name,value:o.values[u]/o.target*100,color:v.value[u].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[u].prefix??"",v:o.values[u],s:v.value[u].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});$.value=l}}function J(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...y.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,Ue)=>[c.name,c.target,...c.values.flatMap(V=>[V,isNaN(V/c.target)?"":V/c.target*100])]),r=o.concat([a]).concat(l),u=n.createCsvContent(r);n.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const w=e.ref(!1);function pe(o){w.value=o,F.value+=1}function K(){g.value.showTable=!g.value.showTable}function Q(){g.value.showTooltip=!g.value.showTooltip}return ae({getData:se,generatePdf:U,generateCsv:J,generateImage:G,toggleTable:K,toggleTooltip:Q}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:b,id:`vue-ui-radar_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 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",{key:0,ref_key:"chartTitle",ref:O,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(ge._sfc_main,{key:`title_${z.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value?(e.openBlock(),e.createBlock(ee.UserOptions,{ref_key:"details",ref:ne,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(q),isPrinting:e.unref(M),uid:m.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.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:w.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,position:t.value.userOptions.position,onToggleFullscreen:pe,onGeneratePdf:e.unref(U),onGenerateCsv:J,onGenerateImage:e.unref(G),onToggleTable:K,onToggleTooltip:Q},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,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),k.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,xe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Pe)],8,_e))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.width/2,y1:s.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Ne))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:s.value.width/2,y:s.value.height/2},radius:l,sides:j.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Se))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:Y.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,Ee),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:T(l).x,y:T(l).y,"text-anchor":T(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:u=>ve(l,r),onMouseleave:a[0]||(a[0]=u=>{P.value=!1,x.value=null})},e.toDisplayString(l.name),41,Fe))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,Oe)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(h.value.map(u=>u.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${m.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,Le)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(u,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:x.value!==null&&x.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===c&&t.value.useCssAnimation})},null,10,Ae))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,Be)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:4,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:L},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(fe.Legend,{key:`legend_${I.value}`,legendSet:y.value,config:de.value,onClickMarker:a[1]||(a[1]=({i:l})=>H(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,Re)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:y.value},void 0,!0)],512),e.createVNode(he._sfc_main,{show:g.value.showTooltip&&P.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:b.value,content:$.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...E.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",De,[e.createVNode(me.default,{dataset:S.value,config:ue.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...E.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isCustom"]),k.value?(e.openBlock(),e.createBlock(be.default,{key:5,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ye.DataTable,{key:`table_${A.value}`,colNames:_.value.colNames,head:_.value.head,body:_.value.body,config:_.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[2]||(a[2]=l=>g.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,we))}},qe=Ce._export_sfc(Me,[["__scopeId","data-v-689e1b26"]]);exports.default=qe;
@@ -1,15 +1,15 @@
1
1
  import { computed as p, ref as i, watch as Ve, onMounted as Ue, onBeforeUnmount as Ee, openBlock as s, createElementBlock as n, normalizeClass as z, normalizeStyle as J, createBlock as O, createCommentVNode as f, unref as h, createSlots as Be, withCtx as y, renderSlot as m, normalizeProps as B, guardReactiveProps as D, createElementVNode as w, Fragment as $, renderList as x, toDisplayString as R, createVNode as me, createTextVNode as be, nextTick as De } from "vue";
2
- import { u as Ge, c as We, t as Xe, a as Ye, p as P, o as je, e as S, b as qe, g as ke, d as Ce, N as _e, v as He, i as we, f as M, X as Je, s as K, w as Ke, O as $e, x as Qe, y as Ze, q as et, r as tt } from "./index-BiuHBtkZ.js";
2
+ import { u as Ge, c as We, t as Xe, a as Ye, p as P, o as je, e as S, b as qe, g as ke, d as Ce, N as _e, v as He, i as we, f as M, X as Je, s as K, w as Ke, O as $e, x as Qe, y as Ze, q as et, r as tt } from "./index-CP7GYbDW.js";
3
3
  import { t as at, u as ot } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as lt } from "./Title-ISDbzCH8.js";
5
- import { u as rt, U as st } from "./usePrinter-Do8KiK5h.js";
6
- import { _ as nt } from "./Tooltip-BHmMXOej.js";
7
- import ut from "./vue-ui-sparkbar-DQAWZReF.js";
8
- import { L as it } from "./Legend-KW7sTwN3.js";
9
- import { D as ct } from "./DataTable-MkG5Dqrn.js";
10
- import dt from "./vue-ui-skeleton-Du4zw-c1.js";
11
- import vt from "./vue-ui-accordion-D2fhyKpk.js";
12
- import { u as xe } from "./useNestedProp-Ck5_RzLu.js";
4
+ import { _ as lt } from "./Title-BITuZ5CT.js";
5
+ import { u as rt, U as st } from "./usePrinter-BfETb5Ie.js";
6
+ import { _ as nt } from "./Tooltip-DDBocDY4.js";
7
+ import ut from "./vue-ui-sparkbar-DCLpbzSR.js";
8
+ import { L as it } from "./Legend-BXctzvx2.js";
9
+ import { D as ct } from "./DataTable-CrbRO0dh.js";
10
+ import dt from "./vue-ui-skeleton-BAQjFiop.js";
11
+ import vt from "./vue-ui-accordion-DZSSaEp4.js";
12
+ import { u as xe } from "./useNestedProp-Dfz8QNDn.js";
13
13
  import { _ as pt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
14
  const ht = ["id"], gt = ["xmlns", "viewBox"], ft = ["id"], yt = ["stop-color"], mt = ["stop-color"], bt = { key: 0 }, kt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ct = { key: 0 }, _t = ["d", "stroke", "stroke-width"], wt = ["d", "stroke", "stroke-width"], $t = { key: 1 }, xt = ["x", "y", "text-anchor", "font-size", "fill", "onMouseenter"], Pt = ["points", "stroke", "stroke-width"], Tt = ["points", "stroke", "stroke-width", "fill"], Nt = { key: 2 }, Ot = ["cx", "cy", "fill", "r", "stroke"], St = {
15
15
  key: 3,
@@ -379,6 +379,7 @@ const ht = ["id"], gt = ["xmlns", "viewBox"], ft = ["id"], yt = ["stop-color"],
379
379
  isTooltip: k.value.showTooltip,
380
380
  titles: { ...e.value.userOptions.buttonTitles },
381
381
  chartElement: A.value,
382
+ position: e.value.userOptions.position,
382
383
  onToggleFullscreen: Me,
383
384
  onGeneratePdf: h(ue),
384
385
  onGenerateCsv: ge,
@@ -428,7 +429,7 @@ const ht = ["id"], gt = ["xmlns", "viewBox"], ft = ["id"], yt = ["stop-color"],
428
429
  ]),
429
430
  key: "5"
430
431
  } : void 0
431
- ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : f("", !0),
432
+ ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "onGeneratePdf", "onGenerateImage"])) : f("", !0),
432
433
  F.value ? (s(), n("svg", {
433
434
  key: 2,
434
435
  xmlns: h(Je),
@@ -652,7 +653,7 @@ const ht = ["id"], gt = ["xmlns", "viewBox"], ft = ["id"], yt = ["stop-color"],
652
653
  }, 8, ["config"])) : f("", !0)
653
654
  ], 14, ht));
654
655
  }
655
- }, qt = /* @__PURE__ */ pt(It, [["__scopeId", "data-v-6194d3c4"]]);
656
+ }, qt = /* @__PURE__ */ pt(It, [["__scopeId", "data-v-689e1b26"]]);
656
657
  export {
657
658
  qt as default
658
659
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-D-vy9N1v.cjs"),C=require("./useNestedProp-B9yDavuy.cjs"),V=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},F=["src","height","width"],A=["xmlns","height","width"],D=["id"],R=["stop-color"],X=["stop-color"],j=["points","fill","stroke","stroke-width"],I=["src","alt","height","width","id"],O=["xmlns","viewBox","height","id"],Y=["id"],G=["stop-color"],L=["stop-color"],q=["points","fill","stroke"],T=["xmlns","height"],U=["onClick","onMouseenter","onKeyup"],H=["onMouseenter"],K={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup($,{expose:k,emit:S}){const s=$,{vue_ui_rating:_}=n.useConfig(),d=e.ref(n.createUid()),p=e.ref(!1),r=e.ref(void 0),g=e.ref([]),t=e.computed(()=>C.useNestedProp({userConfig:s.config,defaultConfig:_})),b=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)?z(s.dataset.rating):s.dataset.rating),N=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)),i=e.ref(b.value),f=e.ref(t.value.type==="image"),c=e.ref(t.value.readonly);function z(o){let a=0,l=0;for(const u in o){const E=parseInt(u),h=o[u];a+=E*h,l+=h}if(l===0)return 0;const v=a/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{n.objectIsEmpty(s.dataset)&&n.error({componentName:"VueUiRating",type:"dataset"});for(let o=t.value.from;o<=t.value.to;o+=1)g.value.push(o)});function y(o,a=!1){return o>r.value||c.value?a?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:a?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function m(o,a=!1){const l=i.value-o,v=a?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function x(o){c.value||(i.value=o,S("rate",o))}function w(){return i.value}function B(o=!0){c.value=o}return k({getData:w,toggleReadonly:B}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:a[2]||(a[2]=l=>p.value=!0),onMouseleave:a[3]||(a[3]=l=>{p.value=!1,r.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,v)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[f.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(r.value)?t.value.style.image.inactiveOpacity:y(l,!0)}`)},null,12,F)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,R),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,X)],8,D)]),e.createElementVNode("polygon",{points:e.unref(n.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(r.value)?t.value.style.star.inactiveColor:y(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:r.value?y(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,j)],8,A)),f.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${m(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,I)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${m(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,L)],8,Y)]),e.createElementVNode("polygon",{points:e.unref(n.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,q)],8,O)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:u=>x(l),onMouseenter:u=>r.value=l,onMouseleave:a[0]||(a[0]=u=>r.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>x(l),["enter"])},null,40,U)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:u=>r.value=l,onMouseleave:a[1]||(a[1]=u=>r.value=void 0)},null,40,H)):e.createCommentVNode("",!0)],12,T)),t.value.style.tooltip.show&&N.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${r.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l),5),e.createTextVNode(" : "),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(s.dataset.rating[l]),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],36))}},P=V._export_sfc(K,[["__scopeId","data-v-86ced882"]]);exports.default=P;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-U4mCr8P0.cjs"),C=require("./useNestedProp-CgUQgTyB.cjs"),V=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},F=["src","height","width"],A=["xmlns","height","width"],D=["id"],R=["stop-color"],X=["stop-color"],j=["points","fill","stroke","stroke-width"],I=["src","alt","height","width","id"],O=["xmlns","viewBox","height","id"],Y=["id"],G=["stop-color"],L=["stop-color"],q=["points","fill","stroke"],T=["xmlns","height"],U=["onClick","onMouseenter","onKeyup"],H=["onMouseenter"],K={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup($,{expose:k,emit:S}){const s=$,{vue_ui_rating:_}=n.useConfig(),d=e.ref(n.createUid()),p=e.ref(!1),r=e.ref(void 0),g=e.ref([]),t=e.computed(()=>C.useNestedProp({userConfig:s.config,defaultConfig:_})),b=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)?z(s.dataset.rating):s.dataset.rating),N=e.computed(()=>typeof s.dataset.rating=="object"&&!Array.isArray(s.dataset.rating)),i=e.ref(b.value),f=e.ref(t.value.type==="image"),c=e.ref(t.value.readonly);function z(o){let a=0,l=0;for(const u in o){const E=parseInt(u),h=o[u];a+=E*h,l+=h}if(l===0)return 0;const v=a/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{n.objectIsEmpty(s.dataset)&&n.error({componentName:"VueUiRating",type:"dataset"});for(let o=t.value.from;o<=t.value.to;o+=1)g.value.push(o)});function y(o,a=!1){return o>r.value||c.value?a?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:a?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function m(o,a=!1){const l=i.value-o,v=a?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function x(o){c.value||(i.value=o,S("rate",o))}function w(){return i.value}function B(o=!0){c.value=o}return k({getData:w,toggleReadonly:B}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:a[2]||(a[2]=l=>p.value=!0),onMouseleave:a[3]||(a[3]=l=>{p.value=!1,r.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,v)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[f.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(r.value)?t.value.style.image.inactiveOpacity:y(l,!0)}`)},null,12,F)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,R),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,X)],8,D)]),e.createElementVNode("polygon",{points:e.unref(n.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(r.value)?t.value.style.star.inactiveColor:y(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:r.value?y(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,j)],8,A)),f.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${m(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,I)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${m(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,L)],8,Y)]),e.createElementVNode("polygon",{points:e.unref(n.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,q)],8,O)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:u=>x(l),onMouseenter:u=>r.value=l,onMouseleave:a[0]||(a[0]=u=>r.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>x(l),["enter"])},null,40,U)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:u=>r.value=l,onMouseleave:a[1]||(a[1]=u=>r.value=void 0)},null,40,H)):e.createCommentVNode("",!0)],12,T)),t.value.style.tooltip.show&&N.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${r.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l),5),e.createTextVNode(" : "),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(s.dataset.rating[l]),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(i.value)?"":i.value.toFixed(t.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],36))}},P=V._export_sfc(K,[["__scopeId","data-v-86ced882"]]);exports.default=P;
@@ -1,6 +1,6 @@
1
1
  import { ref as f, computed as $, onMounted as O, openBlock as l, createElementBlock as i, normalizeStyle as a, createElementVNode as n, toDisplayString as p, createCommentVNode as d, Fragment as E, renderList as L, unref as m, withKeys as T, createTextVNode as U } from "vue";
2
- import { u as D, c as K, o as H, e as P, X as _, w as N, T as F } from "./index-BiuHBtkZ.js";
3
- import { u as W } from "./useNestedProp-Ck5_RzLu.js";
2
+ import { u as D, c as K, o as H, e as P, X as _, w as N, T as F } from "./index-CP7GYbDW.js";
3
+ import { u as W } from "./useNestedProp-Dfz8QNDn.js";
4
4
  import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const J = {
6
6
  key: 0,
@@ -1,10 +1,10 @@
1
- import { useCssVars as pe, computed as c, ref as u, watch as _e, onMounted as $e, onBeforeUnmount as xe, openBlock as s, createElementBlock as o, normalizeStyle as p, createBlock as E, createCommentVNode as _, unref as h, createSlots as Ce, withCtx as z, renderSlot as $, normalizeProps as K, guardReactiveProps as Q, normalizeClass as L, createElementVNode as we, Fragment as b, renderList as O, toDisplayString as be } from "vue";
2
- import { u as Oe, c as Pe, t as Ae, a as Ie, p as Z, b as Fe, o as Ee, e as ee, g as ze, X as Le } from "./index-BiuHBtkZ.js";
1
+ import { useCssVars as ke, computed as c, ref as u, watch as _e, onMounted as $e, onBeforeUnmount as xe, openBlock as s, createElementBlock as o, normalizeStyle as k, createBlock as E, createCommentVNode as _, unref as h, createSlots as Ce, withCtx as z, renderSlot as $, normalizeProps as K, guardReactiveProps as Q, normalizeClass as L, createElementVNode as we, Fragment as b, renderList as O, toDisplayString as be } from "vue";
2
+ import { u as Oe, c as Pe, t as Ae, a as Ie, p as Z, b as Fe, o as Ee, e as ee, g as ze, X as Le } from "./index-CP7GYbDW.js";
3
3
  import { t as Se, u as Ne } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as Re } from "./Title-ISDbzCH8.js";
5
- import { u as Te, U as Me } from "./usePrinter-Do8KiK5h.js";
6
- import je from "./vue-ui-skeleton-Du4zw-c1.js";
7
- import { u as te } from "./useNestedProp-Ck5_RzLu.js";
4
+ import { _ as Re } from "./Title-BITuZ5CT.js";
5
+ import { u as Te, U as Me } from "./usePrinter-BfETb5Ie.js";
6
+ import je from "./vue-ui-skeleton-BAQjFiop.js";
7
+ import { u as te } from "./useNestedProp-Dfz8QNDn.js";
8
8
  import { _ as Be } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "stroke-width"], Ve = { key: 0 }, We = ["stroke", "d", "stroke-width"], Xe = { key: 1 }, Ye = ["stroke", "x1", "x2", "y1", "y2"], qe = ["text-anchor", "transform", "x", "y", "onClick", "font-weight", "font-size", "fill"], He = ["cx", "cy", "fill", "onClick", "r"], Je = {
10
10
  key: 3,
@@ -27,10 +27,10 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
27
27
  },
28
28
  setup(le, { expose: re }) {
29
29
  const d = le;
30
- pe((e) => ({
31
- "469eced2": ue.value,
32
- "1e3da7b1": ie.value,
33
- "2d2c73d3": oe.value
30
+ ke((e) => ({
31
+ "34880b02": ue.value,
32
+ "4e5334de": ae.value,
33
+ "79ad6840": oe.value
34
34
  }));
35
35
  const { vue_ui_relation_circle: se } = Oe(), P = c(() => !!d.dataset && Object.keys(d.dataset).length), m = u(Pe()), S = u(0), x = u(null), N = u(null), R = u(0), l = c({
36
36
  get: () => T(),
@@ -55,7 +55,7 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
55
55
  const { isPrinting: M, isImaging: j, generatePdf: B, generateImage: G } = Te({
56
56
  elementId: `relation_circle_${m.value}`,
57
57
  fileName: l.value.style.title.text || "vue-ui-relation-circle"
58
- }), U = c(() => Fe(l.value.customPalette)), f = u([]), y = u([]), n = u({}), v = u([]), ne = u(0), A = c(() => d.dataset.slice(0, l.value.style.limit)), I = u(l.value.style.size), a = u({
58
+ }), U = c(() => Fe(l.value.customPalette)), f = u([]), y = u([]), n = u({}), v = u([]), ne = u(0), A = c(() => d.dataset.slice(0, l.value.style.limit)), I = u(l.value.style.size), i = u({
59
59
  height: l.value.style.size,
60
60
  width: l.value.style.size
61
61
  }), g = c({
@@ -65,7 +65,7 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
65
65
  set(e) {
66
66
  return e;
67
67
  }
68
- }), ae = c(() => l.value.style.links.curved), ie = c(() => `${l.value.style.animation.speedMs}ms`), ue = c(() => g.value * 2), oe = c(() => g.value * 4), C = u(null);
68
+ }), ie = c(() => l.value.style.links.curved), ae = c(() => `${l.value.style.animation.speedMs}ms`), ue = c(() => g.value * 2), oe = c(() => g.value * 4), C = u(null);
69
69
  $e(() => {
70
70
  D(), document.getElementById(`relation_circle_${m.value}`).addEventListener("click", V);
71
71
  });
@@ -91,7 +91,7 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
91
91
  chart: x.value,
92
92
  title: l.value.style.title.text ? N.value : null
93
93
  });
94
- I.value = Math.min(r, t), a.value.width = r, a.value.height = t, g.value = I.value * l.value.style.circle.radiusProportion, f.value = [], y.value = [], W(), X();
94
+ I.value = Math.min(r, t), i.value.width = r, i.value.height = t, g.value = I.value * l.value.style.circle.radiusProportion, f.value = [], y.value = [], W(), X();
95
95
  });
96
96
  C.value = new ResizeObserver(e), C.value.observe(x.value.parentNode);
97
97
  } else
@@ -106,17 +106,17 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
106
106
  }
107
107
  function W() {
108
108
  const e = 6.28319 / A.value.length, r = 360 / A.value.length;
109
- let t = 0, i = 0;
110
- A.value.forEach((k, F) => {
111
- const me = g.value * Math.cos(t) + a.value.width / 2, ke = g.value * Math.sin(t) + a.value.height / 2 + l.value.style.circle.offsetY;
112
- f.value.push({ x: me, y: ke, ...k, color: k.color ? k.color : U.value[F] ? U.value[F] : Z[F], regAngle: i }), t += e, i += r;
109
+ let t = 0, a = 0;
110
+ A.value.forEach((p, F) => {
111
+ const me = g.value * Math.cos(t) + i.value.width / 2, pe = g.value * Math.sin(t) + i.value.height / 2 + l.value.style.circle.offsetY;
112
+ f.value.push({ x: me, y: pe, ...p, color: p.color ? p.color : U.value[F] ? U.value[F] : Z[F], regAngle: a }), t += e, a += r;
113
113
  });
114
114
  }
115
115
  function X() {
116
116
  f.value.forEach((e) => {
117
- f.value.filter((t) => t.relations.includes(e.id)).forEach((t, i) => {
117
+ f.value.filter((t) => t.relations.includes(e.id)).forEach((t, a) => {
118
118
  y.value.push({
119
- weight: e.weights && e.weights[i] ? e.weights[i] : 1,
119
+ weight: e.weights && e.weights[a] ? e.weights[a] : 1,
120
120
  relationId: `${e.id}_${t.id}`,
121
121
  x1: e.x,
122
122
  y1: e.y,
@@ -168,7 +168,7 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
168
168
  ref_key: "relationCircleChart",
169
169
  ref: x,
170
170
  class: "vue-ui-relation-circle",
171
- style: p(`width:100%;background:${l.value.style.backgroundColor};text-align:center;${l.value.responsive ? "height: 100%" : ""}`),
171
+ style: k(`width:100%;background:${l.value.style.backgroundColor};text-align:center;${l.value.responsive ? "height: 100%" : ""}`),
172
172
  id: `relation_circle_${m.value}`
173
173
  }, [
174
174
  l.value.style.title.text ? (s(), o("div", {
@@ -206,6 +206,7 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
206
206
  isFullscreen: w.value,
207
207
  titles: { ...l.value.userOptions.buttonTitles },
208
208
  chartElement: x.value,
209
+ position: l.value.userOptions.position,
209
210
  onToggleFullscreen: ye,
210
211
  onGeneratePdf: h(B),
211
212
  onGenerateImage: h(G)
@@ -226,45 +227,45 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
226
227
  } : void 0,
227
228
  e.$slots.optionFullscreen ? {
228
229
  name: "optionFullscreen",
229
- fn: z(({ toggleFullscreen: t, isFullscreen: i }) => [
230
- $(e.$slots, "optionFullscreen", K(Q({ toggleFullscreen: t, isFullscreen: i })), void 0, !0)
230
+ fn: z(({ toggleFullscreen: t, isFullscreen: a }) => [
231
+ $(e.$slots, "optionFullscreen", K(Q({ toggleFullscreen: t, isFullscreen: a })), void 0, !0)
231
232
  ]),
232
233
  key: "2"
233
234
  } : void 0
234
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : _("", !0),
235
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "onGeneratePdf", "onGenerateImage"])) : _("", !0),
235
236
  P.value ? (s(), o("svg", {
236
237
  key: 2,
237
238
  xmlns: h(Le),
238
239
  class: L([{ "vue-data-ui-fullscreen--on": w.value, "vue-data-ui-fulscreen--off": !w.value }, "relation-circle"]),
239
- viewBox: `0 0 ${a.value.width <= 0 ? 10 : a.value.width} ${a.value.height <= 0 ? 10 : a.value.height}`,
240
+ viewBox: `0 0 ${i.value.width <= 0 ? 10 : i.value.width} ${i.value.height <= 0 ? 10 : i.value.height}`,
240
241
  width: "100%",
241
242
  style: "user-select:none; background:transparent"
242
243
  }, [
243
244
  we("circle", {
244
- cx: (a.value.width <= 0 ? 1e-4 : a.value.width) / 2,
245
- cy: (a.value.height <= 0 ? 1e-4 : a.value.height) / 2 + l.value.style.circle.offsetY,
245
+ cx: (i.value.width <= 0 ? 1e-4 : i.value.width) / 2,
246
+ cy: (i.value.height <= 0 ? 1e-4 : i.value.height) / 2 + l.value.style.circle.offsetY,
246
247
  r: g.value <= 0 ? 1e-4 : g.value,
247
248
  stroke: l.value.style.circle.stroke,
248
249
  "stroke-width": l.value.style.circle.strokeWidth,
249
250
  fill: "transparent",
250
251
  class: "main-circle"
251
252
  }, null, 8, De),
252
- ae.value ? (s(), o("g", Ve, [
253
- (s(!0), o(b, null, O(y.value, (t, i) => (s(), o("path", {
254
- key: `relation_${i}`,
255
- style: p(q(t)),
253
+ ie.value ? (s(), o("g", Ve, [
254
+ (s(!0), o(b, null, O(y.value, (t, a) => (s(), o("path", {
255
+ key: `relation_${a}`,
256
+ style: k(q(t)),
256
257
  stroke: Y(t),
257
258
  class: L(["relation", { "vue-ui-relation-circle-selected": n.value.hasOwnProperty("id") && v.value.includes(t.id) }]),
258
- d: `M${t.x1},${t.y1} C${t.x1},${t.y1} ${a.value.width / 2},${a.value.height / 2 + l.value.style.circle.offsetY} ${t.x2},${t.y2}`,
259
+ d: `M${t.x1},${t.y1} C${t.x1},${t.y1} ${i.value.width / 2},${i.value.height / 2 + l.value.style.circle.offsetY} ${t.x2},${t.y2}`,
259
260
  fill: "none",
260
261
  "stroke-width": J(t),
261
262
  "stroke-linecap": "round"
262
263
  }, null, 14, We))), 128))
263
264
  ])) : (s(), o("g", Xe, [
264
- (s(!0), o(b, null, O(y.value, (t, i) => (s(), o("line", {
265
- key: `relation_${i}`,
265
+ (s(!0), o(b, null, O(y.value, (t, a) => (s(), o("line", {
266
+ key: `relation_${a}`,
266
267
  stroke: Y(t),
267
- style: p(q(t)),
268
+ style: k(q(t)),
268
269
  x1: t.x1,
269
270
  x2: t.x2,
270
271
  y1: t.y1,
@@ -273,31 +274,31 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
273
274
  "stroke-linecap": "round"
274
275
  }, null, 14, Ye))), 128))
275
276
  ])),
276
- (s(!0), o(b, null, O(f.value, (t, i) => (s(), o("text", {
277
- key: `plot_text_${i}`,
277
+ (s(!0), o(b, null, O(f.value, (t, a) => (s(), o("text", {
278
+ key: `plot_text_${a}`,
278
279
  "text-anchor": ve(t),
279
280
  transform: he(t),
280
281
  x: fe(t),
281
282
  y: t.y + 5,
282
- onClick: (k) => H(t),
283
+ onClick: (p) => H(t),
283
284
  class: "vue-ui-relation-circle-legend",
284
285
  "transform-origin": "start",
285
286
  "font-weight": n.value.id === t.id ? "900" : "400",
286
- style: p(`font-family:${l.value.style.fontFamily};${ge(t)}`),
287
+ style: k(`font-family:${l.value.style.fontFamily};${ge(t)}`),
287
288
  "font-size": l.value.style.labels.fontSize,
288
289
  fill: l.value.style.labels.color
289
290
  }, be(t.label), 13, qe))), 128)),
290
- (s(!0), o(b, null, O(f.value, (t, i) => (s(), o("circle", {
291
+ (s(!0), o(b, null, O(f.value, (t, a) => (s(), o("circle", {
291
292
  cx: t.x,
292
293
  cy: t.y,
293
- key: `plot_${i}`,
294
- style: p(de(t)),
294
+ key: `plot_${a}`,
295
+ style: k(de(t)),
295
296
  class: "vue-ui-relation-circle-plot",
296
297
  fill: l.value.style.plot.color,
297
- onClick: (k) => H(t),
298
+ onClick: (p) => H(t),
298
299
  r: l.value.style.plot.radius
299
300
  }, null, 12, He))), 128)),
300
- $(e.$slots, "svg", { svg: a.value }, void 0, !0)
301
+ $(e.$slots, "svg", { svg: i.value }, void 0, !0)
301
302
  ], 10, Ue)) : _("", !0),
302
303
  e.$slots.watermark ? (s(), o("div", Je, [
303
304
  $(e.$slots, "watermark", K(Q({ isPrinting: h(M) || h(j) })), void 0, !0)
@@ -316,7 +317,7 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
316
317
  }, null, 8, ["config"]))
317
318
  ], 12, Ge));
318
319
  }
319
- }, at = /* @__PURE__ */ Be(Ke, [["__scopeId", "data-v-bfb8dffb"]]);
320
+ }, it = /* @__PURE__ */ Be(Ke, [["__scopeId", "data-v-03cfa819"]]);
320
321
  export {
321
- at as default
322
+ it as default
322
323
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-D-vy9N1v.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),ae=require("./Title-BaKZYHEx.cjs"),j=require("./usePrinter-P4nLcXX-.cjs"),se=require("./vue-ui-skeleton-DJhwv2oY.cjs"),q=require("./useNestedProp-B9yDavuy.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ue=["id"],ce=["xmlns","viewBox"],de=["cx","cy","r","stroke","stroke-width"],ve={key:0},fe=["stroke","d","stroke-width"],ge={key:1},me=["stroke","x1","x2","y1","y2"],ye=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],he=["cx","cy","fill","onClick","r"],ke={key:3,class:"vue-data-ui-watermark"},pe={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(G,{expose:U}){const u=G;e.useCssVars(t=>({"469eced2":H.value,"1e3da7b1":Y.value,"2d2c73d3":J.value}));const{vue_ui_relation_circle:D}=o.useConfig(),p=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length),g=e.ref(o.createUid()),$=e.ref(0),y=e.ref(null),w=e.ref(null),b=e.ref(0),r=e.computed({get:()=>B(),set:t=>t});function B(){const t=q.useNestedProp({userConfig:u.config,defaultConfig:D});return t.theme?{...q.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||u.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}e.watch(()=>u.config,t=>{r.value=B(),S(),b.value+=1},{deep:!0});const{isPrinting:P,isImaging:O,generatePdf:E,generateImage:A}=j.usePrinter({elementId:`relation_circle_${g.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),I=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),d=e.ref([]),f=e.ref([]),i=e.ref({}),c=e.ref([]),W=e.ref(0),_=e.computed(()=>u.dataset.slice(0,r.value.style.limit)),C=e.ref(r.value.style.size),a=e.ref({height:r.value.style.size,width:r.value.style.size}),v=e.computed({get(){return C.value*r.value.style.circle.radiusProportion},set(t){return t}}),X=e.computed(()=>r.value.style.links.curved),Y=e.computed(()=>`${r.value.style.animation.speedMs}ms`),H=e.computed(()=>v.value*2),J=e.computed(()=>v.value*4),h=e.ref(null);e.onMounted(()=>{S(),document.getElementById(`relation_circle_${g.value}`).addEventListener("click",z)});function S(){if(o.objectIsEmpty(u.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):u.dataset.forEach((t,n)=>{o.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=V.throttle(()=>{const{width:n,height:l}=V.useResponsive({chart:y.value,title:r.value.style.title.text?w.value:null});C.value=Math.min(n,l),a.value.width=n,a.value.height=l,v.value=C.value*r.value.style.circle.radiusProportion,d.value=[],f.value=[],F(),N()});h.value=new ResizeObserver(t),h.value.observe(y.value.parentNode)}else d.value=[],f.value=[],F(),N()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${g.value}`).removeEventListener("click",z),h.value&&h.value.disconnect()});function z(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(i.value={},c.value=[])}function F(){const t=6.28319/_.value.length,n=360/_.value.length;let l=0,s=0;_.value.forEach((m,x)=>{const ne=v.value*Math.cos(l)+a.value.width/2,ie=v.value*Math.sin(l)+a.value.height/2+r.value.style.circle.offsetY;d.value.push({x:ne,y:ie,...m,color:m.color?m.color:I.value[x]?I.value[x]:o.palette[x],regAngle:s}),l+=t,s+=n})}function N(){d.value.forEach(t=>{d.value.filter(l=>l.relations.includes(t.id)).forEach((l,s)=>{f.value.push({weight:t.weights&&t.weights[s]?t.weights[s]:1,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,...t})})})}const K=e.computed(()=>Math.max(...f.value.map(t=>t.weight)));function Q(t){return Object.hasOwn(i.value,"x")?c.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function L(t){return Object.hasOwn(i.value,"x")?t.colorTarget:t.colorSource}function R(t){return Object.hasOwn(i.value,"x")?c.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`?`opacity:1;stroke-width:${M(t)}`:"opacity: 0":"opacity: 1"}function Z(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function ee(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function te(t){return Object.hasOwn(i.value,"x")?i.value.id===t.id||c.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function le(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function T(t){W.value=360-t.regAngle,i.value.id&&t.id===i.value.id?(i.value={},c.value=[]):(i.value=t,c.value=[...t.relations])}function M(t){return t.weight/K.value*r.value.style.links.maxWidth}const k=e.ref(!1);function re(t){k.value=t,$.value+=1}return U({generatePdf:E,generateImage:A}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:y,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${g.value}`},[r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:w,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ae._sfc_main,{key:`title_${b.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${$.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(P),isImaging:e.unref(O),uid:g.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:k.value,titles:{...r.value.userOptions.buttonTitles},chartElement:y.value,onToggleFullscreen:re,onGeneratePdf:e.unref(E),onGenerateImage:e.unref(A)},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value},"relation-circle"]),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createElementVNode("circle",{cx:(a.value.width<=0?1e-4:a.value.width)/2,cy:(a.value.height<=0?1e-4:a.value.height)/2+r.value.style.circle.offsetY,r:v.value<=0?1e-4:v.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,de),X.value?(e.openBlock(),e.createElementBlock("g",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${s}`,style:e.normalizeStyle(R(l)),stroke:L(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&c.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${a.value.width/2},${a.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":M(l),"stroke-linecap":"round"},null,14,fe))),128))])):(e.openBlock(),e.createElementBlock("g",ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${s}`,stroke:L(l),style:e.normalizeStyle(R(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&c.value.includes(l.id)}),"stroke-linecap":"round"},null,14,me))),128))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${s}`,"text-anchor":Z(l),transform:le(l),x:ee(l),y:l.y+5,onClick:m=>T(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":i.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${te(l)}`),"font-size":r.value.style.labels.fontSize,fill:r.value.style.labels.color},e.toDisplayString(l.label),13,ye))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${s}`,style:e.normalizeStyle(Q(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.color,onClick:m=>T(l),r:r.value.style.plot.radius},null,12,he))),128)),e.renderSlot(t.$slots,"svg",{svg:a.value},void 0,!0)],10,ce)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(P)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(se.default,{key:4,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],12,ue))}},_e=oe._export_sfc(pe,[["__scopeId","data-v-bfb8dffb"]]);exports.default=_e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-U4mCr8P0.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),ae=require("./Title-DbAaPd9q.cjs"),j=require("./usePrinter-DQLl_Row.cjs"),se=require("./vue-ui-skeleton-BhG4niml.cjs"),q=require("./useNestedProp-CgUQgTyB.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ue=["id"],ce=["xmlns","viewBox"],de=["cx","cy","r","stroke","stroke-width"],ve={key:0},fe=["stroke","d","stroke-width"],ge={key:1},me=["stroke","x1","x2","y1","y2"],ye=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],he=["cx","cy","fill","onClick","r"],ke={key:3,class:"vue-data-ui-watermark"},pe={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(G,{expose:U}){const u=G;e.useCssVars(t=>({"34880b02":H.value,"4e5334de":Y.value,"79ad6840":J.value}));const{vue_ui_relation_circle:D}=o.useConfig(),p=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length),g=e.ref(o.createUid()),$=e.ref(0),y=e.ref(null),w=e.ref(null),B=e.ref(0),r=e.computed({get:()=>b(),set:t=>t});function b(){const t=q.useNestedProp({userConfig:u.config,defaultConfig:D});return t.theme?{...q.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||u.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}e.watch(()=>u.config,t=>{r.value=b(),S(),B.value+=1},{deep:!0});const{isPrinting:P,isImaging:O,generatePdf:E,generateImage:A}=j.usePrinter({elementId:`relation_circle_${g.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),I=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),d=e.ref([]),f=e.ref([]),i=e.ref({}),c=e.ref([]),W=e.ref(0),_=e.computed(()=>u.dataset.slice(0,r.value.style.limit)),C=e.ref(r.value.style.size),a=e.ref({height:r.value.style.size,width:r.value.style.size}),v=e.computed({get(){return C.value*r.value.style.circle.radiusProportion},set(t){return t}}),X=e.computed(()=>r.value.style.links.curved),Y=e.computed(()=>`${r.value.style.animation.speedMs}ms`),H=e.computed(()=>v.value*2),J=e.computed(()=>v.value*4),h=e.ref(null);e.onMounted(()=>{S(),document.getElementById(`relation_circle_${g.value}`).addEventListener("click",z)});function S(){if(o.objectIsEmpty(u.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):u.dataset.forEach((t,n)=>{o.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=V.throttle(()=>{const{width:n,height:l}=V.useResponsive({chart:y.value,title:r.value.style.title.text?w.value:null});C.value=Math.min(n,l),a.value.width=n,a.value.height=l,v.value=C.value*r.value.style.circle.radiusProportion,d.value=[],f.value=[],F(),N()});h.value=new ResizeObserver(t),h.value.observe(y.value.parentNode)}else d.value=[],f.value=[],F(),N()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${g.value}`).removeEventListener("click",z),h.value&&h.value.disconnect()});function z(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(i.value={},c.value=[])}function F(){const t=6.28319/_.value.length,n=360/_.value.length;let l=0,s=0;_.value.forEach((m,x)=>{const ne=v.value*Math.cos(l)+a.value.width/2,ie=v.value*Math.sin(l)+a.value.height/2+r.value.style.circle.offsetY;d.value.push({x:ne,y:ie,...m,color:m.color?m.color:I.value[x]?I.value[x]:o.palette[x],regAngle:s}),l+=t,s+=n})}function N(){d.value.forEach(t=>{d.value.filter(l=>l.relations.includes(t.id)).forEach((l,s)=>{f.value.push({weight:t.weights&&t.weights[s]?t.weights[s]:1,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,...t})})})}const K=e.computed(()=>Math.max(...f.value.map(t=>t.weight)));function Q(t){return Object.hasOwn(i.value,"x")?c.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function L(t){return Object.hasOwn(i.value,"x")?t.colorTarget:t.colorSource}function R(t){return Object.hasOwn(i.value,"x")?c.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`?`opacity:1;stroke-width:${M(t)}`:"opacity: 0":"opacity: 1"}function Z(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function ee(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function te(t){return Object.hasOwn(i.value,"x")?i.value.id===t.id||c.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function le(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function T(t){W.value=360-t.regAngle,i.value.id&&t.id===i.value.id?(i.value={},c.value=[]):(i.value=t,c.value=[...t.relations])}function M(t){return t.weight/K.value*r.value.style.links.maxWidth}const k=e.ref(!1);function re(t){k.value=t,$.value+=1}return U({generatePdf:E,generateImage:A}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:y,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${g.value}`},[r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:w,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ae._sfc_main,{key:`title_${B.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${$.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(P),isImaging:e.unref(O),uid:g.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:k.value,titles:{...r.value.userOptions.buttonTitles},chartElement:y.value,position:r.value.userOptions.position,onToggleFullscreen:re,onGeneratePdf:e.unref(E),onGenerateImage:e.unref(A)},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value},"relation-circle"]),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createElementVNode("circle",{cx:(a.value.width<=0?1e-4:a.value.width)/2,cy:(a.value.height<=0?1e-4:a.value.height)/2+r.value.style.circle.offsetY,r:v.value<=0?1e-4:v.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,de),X.value?(e.openBlock(),e.createElementBlock("g",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${s}`,style:e.normalizeStyle(R(l)),stroke:L(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&c.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${a.value.width/2},${a.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":M(l),"stroke-linecap":"round"},null,14,fe))),128))])):(e.openBlock(),e.createElementBlock("g",ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,s)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${s}`,stroke:L(l),style:e.normalizeStyle(R(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&c.value.includes(l.id)}),"stroke-linecap":"round"},null,14,me))),128))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${s}`,"text-anchor":Z(l),transform:le(l),x:ee(l),y:l.y+5,onClick:m=>T(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":i.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${te(l)}`),"font-size":r.value.style.labels.fontSize,fill:r.value.style.labels.color},e.toDisplayString(l.label),13,ye))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${s}`,style:e.normalizeStyle(Q(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.color,onClick:m=>T(l),r:r.value.style.plot.radius},null,12,he))),128)),e.renderSlot(t.$slots,"svg",{svg:a.value},void 0,!0)],10,ce)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(P)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(se.default,{key:4,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],12,ue))}},_e=oe._export_sfc(pe,[["__scopeId","data-v-03cfa819"]]);exports.default=_e;