vue-data-ui 3.27.1-beta.0 → 3.27.1

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 (189) hide show
  1. package/dist/{Arrow-CJeSufxg.js → Arrow-C2W0uGrq.js} +1 -1
  2. package/dist/{BaseDraggableDialog-T1gEsQid.js → BaseDraggableDialog-D_tuHEjO.js} +1 -1
  3. package/dist/{BaseIcon-Cz30ODFA.js → BaseIcon-DdIyewwY.js} +1 -1
  4. package/dist/{BaseLegendToggle-Dn_tNvn4.js → BaseLegendToggle-Bq5FjyuI.js} +1 -1
  5. package/dist/{BaseZoomControls-xq3tWD3j.js → BaseZoomControls-DoYifY2y.js} +1 -1
  6. package/dist/{ColorPicker-CUjEw53A.js → ColorPicker-MLwiwxl5.js} +1 -1
  7. package/dist/{DataTable-DSUA5M9p.js → DataTable-WNecJMcY.js} +1 -1
  8. package/dist/{HillActions-DdvXld3a.js → HillActions-CHg1AQ3p.js} +1 -1
  9. package/dist/{Legend-DokTll4u.js → Legend-D8YoT1RJ.js} +1 -1
  10. package/dist/{NonSvgPenAndPaper-BLzQuIm6.js → NonSvgPenAndPaper-CqtJpZKh.js} +1 -1
  11. package/dist/{PackageVersion-D6pKL176.js → PackageVersion-CdkxOy58.js} +1 -1
  12. package/dist/{PenAndPaper-DvJJaeU2.js → PenAndPaper-IMw576MC.js} +1 -1
  13. package/dist/{Shape-tkp65OcG.js → Shape-Bp9YNtPc.js} +1 -1
  14. package/dist/SlicerPreview-CNUciSbY.js +1 -0
  15. package/dist/{SparkTooltip-BlJLvizH.js → SparkTooltip-C5JMcBXT.js} +1 -1
  16. package/dist/{Title-BRAjxtjG.js → Title-BGYFqulv.js} +1 -1
  17. package/dist/{Tooltip-BUXB0i6z.js → Tooltip-Cus2-XNQ.js} +1 -1
  18. package/dist/{UserOptions-D65t74CM.js → UserOptions-DTxMeZv3.js} +1 -1
  19. package/dist/{chartImage-NwZO-elv.js → chartImage-CIvU_04o.js} +1 -1
  20. package/dist/components/arrow.js +1 -1
  21. package/dist/components/vue-ui-3d-bar.js +1 -1
  22. package/dist/components/vue-ui-accordion.js +1 -1
  23. package/dist/components/vue-ui-age-pyramid.js +1 -1
  24. package/dist/components/vue-ui-annotator.js +1 -1
  25. package/dist/components/vue-ui-bullet.js +1 -1
  26. package/dist/components/vue-ui-bump.js +1 -1
  27. package/dist/components/vue-ui-candlestick.js +1 -1
  28. package/dist/components/vue-ui-carousel-table.js +1 -1
  29. package/dist/components/vue-ui-chestnut.js +1 -1
  30. package/dist/components/vue-ui-chord.js +1 -1
  31. package/dist/components/vue-ui-circle-pack.js +1 -1
  32. package/dist/components/vue-ui-cursor.js +1 -1
  33. package/dist/components/vue-ui-dag.js +1 -1
  34. package/dist/components/vue-ui-dashboard.js +1 -1
  35. package/dist/components/vue-ui-digits.js +1 -1
  36. package/dist/components/vue-ui-donut-evolution.js +1 -1
  37. package/dist/components/vue-ui-donut.js +1 -1
  38. package/dist/components/vue-ui-dumbbell.js +1 -1
  39. package/dist/components/vue-ui-flow.js +1 -1
  40. package/dist/components/vue-ui-funnel.js +1 -1
  41. package/dist/components/vue-ui-galaxy.js +1 -1
  42. package/dist/components/vue-ui-gauge.js +1 -1
  43. package/dist/components/vue-ui-geo.js +1 -1
  44. package/dist/components/vue-ui-gizmo.js +1 -1
  45. package/dist/components/vue-ui-heatmap.js +1 -1
  46. package/dist/components/vue-ui-hill.js +1 -1
  47. package/dist/components/vue-ui-history-plot.js +1 -1
  48. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  49. package/dist/components/vue-ui-icon.js +1 -1
  50. package/dist/components/vue-ui-kpi.js +1 -1
  51. package/dist/components/vue-ui-label.js +1 -1
  52. package/dist/components/vue-ui-mini-loader.js +1 -1
  53. package/dist/components/vue-ui-molecule.js +1 -1
  54. package/dist/components/vue-ui-mood-radar.js +1 -1
  55. package/dist/components/vue-ui-nested-donuts.js +1 -1
  56. package/dist/components/vue-ui-onion.js +1 -1
  57. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  58. package/dist/components/vue-ui-quadrant.js +1 -1
  59. package/dist/components/vue-ui-quick-chart.js +1 -1
  60. package/dist/components/vue-ui-radar.js +1 -1
  61. package/dist/components/vue-ui-rating.js +1 -1
  62. package/dist/components/vue-ui-relation-circle.js +1 -1
  63. package/dist/components/vue-ui-ridgeline.js +1 -1
  64. package/dist/components/vue-ui-rings.js +1 -1
  65. package/dist/components/vue-ui-scatter.js +1 -1
  66. package/dist/components/vue-ui-skeleton.js +1 -1
  67. package/dist/components/vue-ui-smiley.js +1 -1
  68. package/dist/components/vue-ui-spark-trend.js +1 -1
  69. package/dist/components/vue-ui-sparkbar.js +1 -1
  70. package/dist/components/vue-ui-sparkgauge.js +1 -1
  71. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  72. package/dist/components/vue-ui-sparkline.js +1 -1
  73. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  74. package/dist/components/vue-ui-stackbar.js +1 -1
  75. package/dist/components/vue-ui-stackline.js +1 -1
  76. package/dist/components/vue-ui-strip-plot.js +1 -1
  77. package/dist/components/vue-ui-table-heatmap.js +1 -1
  78. package/dist/components/vue-ui-table-sparkline.js +1 -1
  79. package/dist/components/vue-ui-table.js +1 -1
  80. package/dist/components/vue-ui-thermometer.js +1 -1
  81. package/dist/components/vue-ui-timer.js +1 -1
  82. package/dist/components/vue-ui-tiremarks.js +1 -1
  83. package/dist/components/vue-ui-treemap.js +1 -1
  84. package/dist/components/vue-ui-vertical-bar.js +1 -1
  85. package/dist/components/vue-ui-waffle.js +1 -1
  86. package/dist/components/vue-ui-wheel.js +1 -1
  87. package/dist/components/vue-ui-word-cloud.js +1 -1
  88. package/dist/components/vue-ui-world.js +1 -1
  89. package/dist/components/vue-ui-xy-canvas.js +1 -1
  90. package/dist/components/vue-ui-xy.js +1 -1
  91. package/dist/{dom-to-png-Cp3WLHmJ.js → dom-to-png-D8t3Bm7s.js} +1 -1
  92. package/dist/{exposedLib-CMTeSmyW.js → exposedLib-DHtyEc_G.js} +1 -1
  93. package/dist/{img-8sM3sVWU.js → img-DiT4ivZ5.js} +1 -1
  94. package/dist/{labelUtils-Djp5nJtN.js → labelUtils-CG3uVXoZ.js} +1 -1
  95. package/dist/{lib-zDxoqrgo.js → lib-CV_IANZ6.js} +2 -2
  96. package/dist/package-DE5cU1Rg.js +1 -0
  97. package/dist/{pdf-Dlv_ks7R.js → pdf-BQSB1V3H.js} +1 -1
  98. package/dist/{render-common-DOYi0f4Z.js → render-common-BdZ5aRyn.js} +1 -1
  99. package/dist/{resolveChartConfig-BSo1Oe9n.js → resolveChartConfig-DZg-korK.js} +1 -1
  100. package/dist/ssr/vue-ui-donut.js +1 -1
  101. package/dist/ssr/vue-ui-xy.js +1 -1
  102. package/dist/ssr.js +1 -1
  103. package/dist/style.css +1 -1
  104. package/dist/{useNestedProp-CT9phgWx.js → useNestedProp-CB186vF2.js} +1 -1
  105. package/dist/{useObjectBindings-DM3xDKV3.js → useObjectBindings-Dse7YyAf.js} +1 -1
  106. package/dist/{usePrinter-CnyKPIFM.js → usePrinter-hLW3cv4N.js} +1 -1
  107. package/dist/utils.js +1 -1
  108. package/dist/vue-data-ui-DyYgLIZN.js +1 -0
  109. package/dist/vue-data-ui.js +1 -1
  110. package/dist/{vue-ui-3d-bar-DiaiNy-k.js → vue-ui-3d-bar-BZAoyWkc.js} +1 -1
  111. package/dist/{vue-ui-accordion-Dy5OVFKr.js → vue-ui-accordion-BNvevckx.js} +1 -1
  112. package/dist/{vue-ui-age-pyramid-OeUr1yxi.js → vue-ui-age-pyramid-DkA6vpU3.js} +1 -1
  113. package/dist/{vue-ui-annotator-DA_xAFql.js → vue-ui-annotator-DuQME4Hh.js} +1 -1
  114. package/dist/{vue-ui-bullet-B9lcCTVb.js → vue-ui-bullet-BVs8JX8S.js} +1 -1
  115. package/dist/{vue-ui-bump-DYajIrva.js → vue-ui-bump-DYdm3EvF.js} +1 -1
  116. package/dist/{vue-ui-candlestick-CdAZuNxo.js → vue-ui-candlestick-DZgxl4mW.js} +1 -1
  117. package/dist/{vue-ui-carousel-table-ihGH0LDH.js → vue-ui-carousel-table-BB7DsTUt.js} +1 -1
  118. package/dist/{vue-ui-chestnut-B2aNXFNO.js → vue-ui-chestnut-Bo1h5rBt.js} +1 -1
  119. package/dist/{vue-ui-chord-fAckHfOW.js → vue-ui-chord-B6_veyvO.js} +1 -1
  120. package/dist/{vue-ui-circle-pack-BWHVImkS.js → vue-ui-circle-pack-Bm7e2YNh.js} +1 -1
  121. package/dist/{vue-ui-cursor-DdXKXmhr.js → vue-ui-cursor-TidZDuSh.js} +1 -1
  122. package/dist/{vue-ui-dag-a0fNoIcJ.js → vue-ui-dag-BiN_AnLo.js} +1 -1
  123. package/dist/{vue-ui-dashboard-DkdYMB7n.js → vue-ui-dashboard-zepAVN_W.js} +1 -1
  124. package/dist/{vue-ui-digits-CL9SuIEI.js → vue-ui-digits-CXKKmfGj.js} +1 -1
  125. package/dist/{vue-ui-donut-BaEodt-3.js → vue-ui-donut-CKkBtyPK.js} +1 -1
  126. package/dist/{vue-ui-donut-DaYxdQmP.js → vue-ui-donut-DLDUpjDU.js} +2 -2
  127. package/dist/{vue-ui-donut-evolution-T8cRXKRQ.js → vue-ui-donut-evolution-BxMTdE5G.js} +1 -1
  128. package/dist/{vue-ui-dumbbell-B6HJxEZp.js → vue-ui-dumbbell-C8rNwdz0.js} +1 -1
  129. package/dist/{vue-ui-flow-BlTCVFr3.js → vue-ui-flow-Dru76A2O.js} +1 -1
  130. package/dist/{vue-ui-funnel-WgLFJadZ.js → vue-ui-funnel-D_u1h5S9.js} +1 -1
  131. package/dist/{vue-ui-galaxy-B3nuI6E8.js → vue-ui-galaxy-sBEH18Xj.js} +1 -1
  132. package/dist/{vue-ui-gauge-BwTP65O4.js → vue-ui-gauge-Do3RN8ne.js} +1 -1
  133. package/dist/{vue-ui-geo-CX3yH18H.js → vue-ui-geo-DDbtx_iJ.js} +1 -1
  134. package/dist/{vue-ui-gizmo-CNHcBsku.js → vue-ui-gizmo-eic6xLjB.js} +1 -1
  135. package/dist/{vue-ui-heatmap-CTdeoar7.js → vue-ui-heatmap-DlmJRsM8.js} +1 -1
  136. package/dist/{vue-ui-hill-DR5k8GWZ.js → vue-ui-hill-C5oiuIXh.js} +1 -1
  137. package/dist/{vue-ui-history-plot-C-9uH-Uj.js → vue-ui-history-plot-BJjnkWcT.js} +1 -1
  138. package/dist/{vue-ui-horizontal-bar-qqF7pL7U.js → vue-ui-horizontal-bar-BRDBJEl1.js} +1 -1
  139. package/dist/{vue-ui-kpi-DVcLXGqG.js → vue-ui-kpi-C-eed3jO.js} +1 -1
  140. package/dist/{vue-ui-label-D1Aog-zO.js → vue-ui-label-B4pkXBxc.js} +1 -1
  141. package/dist/{vue-ui-mini-loader-CX0Dx9tT.js → vue-ui-mini-loader-CElmv_iF.js} +1 -1
  142. package/dist/{vue-ui-molecule-B13qVX71.js → vue-ui-molecule-BeyQWZU9.js} +1 -1
  143. package/dist/{vue-ui-mood-radar-C1BtB8lg.js → vue-ui-mood-radar-Bh0kHfiZ.js} +1 -1
  144. package/dist/{vue-ui-nested-donuts-B90yrlJG.js → vue-ui-nested-donuts-FlnJfDaF.js} +1 -1
  145. package/dist/{vue-ui-onion-UMVO2DE_.js → vue-ui-onion-BjhSpjtW.js} +1 -1
  146. package/dist/vue-ui-parallel-coordinate-plot-CHV6XDti.js +9 -0
  147. package/dist/{vue-ui-quadrant-CPG6yAiu.js → vue-ui-quadrant-BaKSTJDv.js} +1 -1
  148. package/dist/{vue-ui-quick-chart-BTPb-Iz8.js → vue-ui-quick-chart-Nc2mVlle.js} +1 -1
  149. package/dist/{vue-ui-radar-Hd-pE9ih.js → vue-ui-radar-BzUfkLlC.js} +1 -1
  150. package/dist/{vue-ui-rating-C_YxQYa_.js → vue-ui-rating-BwWXvbAg.js} +1 -1
  151. package/dist/{vue-ui-relation-circle-CHYG7ZJl.js → vue-ui-relation-circle-nAZEg-BL.js} +1 -1
  152. package/dist/{vue-ui-ridgeline-DS1Gvljt.js → vue-ui-ridgeline-DxLZg1E2.js} +1 -1
  153. package/dist/{vue-ui-rings-B-Hb13Uu.js → vue-ui-rings-BOti0NGb.js} +1 -1
  154. package/dist/{vue-ui-scatter-BTgvOmuo.js → vue-ui-scatter-CCNMggyo.js} +1 -1
  155. package/dist/{vue-ui-skeleton-B-Acw3CC.js → vue-ui-skeleton-DI7pcimU.js} +1 -1
  156. package/dist/{vue-ui-smiley-Ciwqt6ek.js → vue-ui-smiley-D70sJZWl.js} +1 -1
  157. package/dist/{vue-ui-spark-trend-CYqy6c0S.js → vue-ui-spark-trend-BVtfEalS.js} +1 -1
  158. package/dist/{vue-ui-sparkbar-CTXIgjmP.js → vue-ui-sparkbar-CdsLI7Ke.js} +1 -1
  159. package/dist/{vue-ui-sparkgauge-CObOL6s2.js → vue-ui-sparkgauge-wmj5Wnnp.js} +1 -1
  160. package/dist/{vue-ui-sparkhistogram-ClFyDez-.js → vue-ui-sparkhistogram-D8S_P_P4.js} +1 -1
  161. package/dist/{vue-ui-sparkline-DP_nYlW8.js → vue-ui-sparkline-BjsJnS_9.js} +1 -1
  162. package/dist/{vue-ui-sparkstackbar-B2f0ePMg.js → vue-ui-sparkstackbar-ZN8LXzoV.js} +1 -1
  163. package/dist/{vue-ui-stackbar-nMWHZ-f0.js → vue-ui-stackbar-Dx_EN3pT.js} +1 -1
  164. package/dist/{vue-ui-stackline-B95y6Zc5.js → vue-ui-stackline-DW-oxJvA.js} +1 -1
  165. package/dist/{vue-ui-strip-plot-gFNC4r-X.js → vue-ui-strip-plot-D7kjJ3Qh.js} +1 -1
  166. package/dist/{vue-ui-table-Br2JgD_L.js → vue-ui-table-CaFVLHxE.js} +1 -1
  167. package/dist/{vue-ui-table-heatmap-Btu2ejF4.js → vue-ui-table-heatmap-Ctf7Rhqo.js} +1 -1
  168. package/dist/vue-ui-table-sparkline-C0I0cXBS.js +1 -0
  169. package/dist/{vue-ui-thermometer-C6u1eLfo.js → vue-ui-thermometer-B6og15Al.js} +1 -1
  170. package/dist/{vue-ui-timer-DLgsfB1U.js → vue-ui-timer-DgXvO2Q7.js} +2 -2
  171. package/dist/{vue-ui-tiremarks-8B9uE1Bx.js → vue-ui-tiremarks-Dh6fZ454.js} +1 -1
  172. package/dist/{vue-ui-treemap-C4Mot-Os.js → vue-ui-treemap-7JuvN6P_.js} +1 -1
  173. package/dist/{vue-ui-waffle-BwcwNpf7.js → vue-ui-waffle-BqvGzfse.js} +1 -1
  174. package/dist/{vue-ui-wheel-B3OGCXg7.js → vue-ui-wheel-SdwJqKA7.js} +1 -1
  175. package/dist/{vue-ui-word-cloud-BPIyMBXq.js → vue-ui-word-cloud-1WVV_k12.js} +1 -1
  176. package/dist/{vue-ui-world-Cp0DeauH.js → vue-ui-world-DjMy_utm.js} +1 -1
  177. package/dist/{vue-ui-xy-BOE1jvUS.js → vue-ui-xy-DaozHMfg.js} +1 -1
  178. package/dist/{vue-ui-xy-canvas-CaxxiKSa.js → vue-ui-xy-canvas-CegvS9RR.js} +1 -1
  179. package/dist/{vue-ui-xy-DSyKSn4L.js → vue-ui-xy-rGHSI1am.js} +3 -3
  180. package/dist/vue_ui_donut_evolution-CVoh3twl.js +1 -0
  181. package/dist/vue_ui_quick_chart-BRfcRW6Z.js +1 -0
  182. package/package.json +1 -1
  183. package/dist/SlicerPreview-GFRs2EWB.js +0 -1
  184. package/dist/package-DIR2F6AE.js +0 -1
  185. package/dist/vue-data-ui-BG41UScx.js +0 -1
  186. package/dist/vue-ui-parallel-coordinate-plot-C0ofFivm.js +0 -9
  187. package/dist/vue-ui-table-sparkline-B9mYHAxp.js +0 -1
  188. package/dist/vue_ui_donut_evolution-nzVwNQYv.js +0 -1
  189. package/dist/vue_ui_quick_chart-Da1GwklM.js +0 -1
@@ -1,2 +1,2 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./tableIntegration-CNoJ1CIY.js";import{n as r,t as i}from"./annotationSlots-BRR85CqJ.js";import{n as a,t as o}from"./userOptionsSlots-DYuo-E5m.js";import{$ as s,Ct as ee,D as te,Dt as ne,Ht as re,J as ie,Jt as ae,S as oe,X as se,Yt as ce,Zt as le,at as ue,i as c,in as de,jt as fe,nt as pe,pt as me,r as he,t as ge,w as _e,zt as ve}from"./lib-zDxoqrgo.js";import{n as ye,t as be}from"./useHints-BH9r_0Vd.js";import{t as xe}from"./useConfig-CKdzPrcf.js";import{t as Se}from"./usePrinter-CnyKPIFM.js";import{n as Ce,t as we}from"./BaseScanner-8NdoBs7B.js";import{t as Te}from"./useChartExport-DtPNpc9M.js";import{n as Ee}from"./Title-BRAjxtjG.js";import{t as De}from"./Shape-tkp65OcG.js";import{t as Oe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{l as ke,t as Ae}from"./useResponsive-D2CPcpda.js";import{t as je}from"./DefGrad-DKMq1REY.js";import{t as Me}from"./BaseLegendToggle-Dn_tNvn4.js";import{t as Ne}from"./A11yDataTable-DWNlWXzs.js";import{n as Pe}from"./resolveChartConfig-BSo1Oe9n.js";import{t as Fe}from"./useUserOptionState-CXlFnwPv.js";import{t as Ie}from"./useChartAccessibility-DOMuYJfm.js";import{t as Le}from"./chartImage-NwZO-elv.js";import{t as Re}from"./Legend-DokTll4u.js";import{t as ze}from"./vue_ui_quadrant-BUv-SqzP.js";import{Fragment as l,Teleport as Be,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Ve,createTextVNode as He,createVNode as Ue,defineAsyncComponent as h,guardReactiveProps as g,mergeProps as We,nextTick as Ge,normalizeClass as _,normalizeProps as v,normalizeStyle as y,onBeforeUnmount as Ke,onMounted as qe,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as Je,shallowRef as Ye,toDisplayString as w,toRefs as Xe,unref as T,watch as Ze,withCtx as E}from"vue";var Qe=/* @__PURE__ */ e({default:()=>sn}),$e=[`id`],et=[`id`],tt=[`id`],nt={style:{position:`relative`}},rt=[`xmlns`,`aria-describedby`,`viewBox`,`id`],it=[`x`,`y`,`width`,`height`],at={key:1},ot=[`fill`,`x`,`y`,`height`,`width`,`stroke-width`,`stroke`,`rx`],st=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],ct=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],lt={key:2},ut=[`points`,`fill`],dt=[`points`,`fill`],ft=[`points`,`fill`],pt=[`points`,`fill`],mt={key:3},ht=[`y`,`fill`,`font-size`],gt=[`x`,`y`,`fill`,`font-size`],_t=[`x`,`y`,`fill`,`font-size`],vt=[`y`,`fill`,`font-size`],yt={key:4},bt=[`x`,`y`,`font-size`,`fill`],xt=[`x`,`y`,`font-size`,`fill`],St=[`x`,`y`,`font-size`,`fill`],Ct=[`id`,`font-size`,`transform`,`fill`],wt=[`id`,`font-size`,`transform`,`fill`],Tt=[`id`,`font-size`,`transform`,`fill`],Et={key:5},Dt=[`fill`,`points`],Ot=[`x`,`y`,`width`,`height`],kt=[`x`,`y`,`width`,`height`],At=[`x`,`y`,`width`,`height`],jt=[`x`,`y`,`width`,`height`],Mt=[`x`,`y`,`onMouseenter`,`onMouseleave`,`onClick`],Nt=[`data-a11y-plot-id`,`cx`,`cy`,`r`],Pt=[`data-a11y-plot-id`,`cx`,`cy`,`r`],Ft={key:0,style:{"pointer-events":`none`}},It=[`x`,`y`,`font-size`,`fill`],Lt=[`x`,`y`,`font-size`,`fill`,`innerHTML`],Rt={key:0},zt=[`x`,`y`,`onMouseover`,`onMouseleave`,`onClick`],Bt={key:8,class:`vue-ui-dna`},Vt=[`points`,`fill`],Ht=[`points`,`fill`],Ut=[`points`,`fill`],Wt=[`points`,`fill`],Gt={key:9},Kt=[`x`,`y`,`font-size`,`fill`,`font-weight`],qt={key:10},Jt=[`x`,`y`,`fill`],Yt=[`x`,`y`,`fill`],Xt=[`x`,`y`,`fill`],Zt=[`x`,`y`,`fill`],Qt=[`stroke`,`d`],$t=[`stroke`,`d`],en={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},tn={key:5,class:`vue-data-ui-watermark`},nn=[`id`],rn=[`onClick`],an={key:0,height:`14`,width:`14`,viewBox:`0 0 20 20`},on=[`innerHTML`],sn=/*#__PURE__*/ Oe({__name:`vue-ui-quadrant`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectPlot`,`selectSide`,`selectLegend`,`copyAlt`],setup(e,{expose:Oe,emit:Qe}){let sn=h(()=>import(`./Tooltip-BUXB0i6z.js`)),cn=h(()=>import(`./BaseIcon-Cz30ODFA.js`).then(e=>e.n)),ln=h(()=>import(`./vue-ui-accordion-Dy5OVFKr.js`).then(e=>e.n)),un=h(()=>import(`./DataTable-DSUA5M9p.js`)),dn=h(()=>import(`./PenAndPaper-DvJJaeU2.js`).then(e=>e.t)),fn=h(()=>import(`./UserOptions-D65t74CM.js`).then(e=>e.n)),pn=h(()=>import(`./PackageVersion-D6pKL176.js`).then(e=>e.t)),mn=h(()=>import(`./BaseDraggableDialog-T1gEsQid.js`).then(e=>e.n)),{vue_ui_quadrant:hn}=xe(),D=e,gn=u(()=>!!D.dataset&&D.dataset.length),O=x(se()),_n=Qe,vn=x(!1),yn=x(``),bn=x(0),k=x(!1),A=x(null),xn=x(null),Sn=x(null),Cn=x(null),wn=x(null),Tn=x(0),En=x(0),Dn=x(0),On=x(!1),kn=x(null),An=x(null),jn=x(null),Mn=x(null),Nn=x({x:0,y:0}),Pn=x(`pointer`),Fn=x(!1),j=x(Hn()),M=u(()=>j.value.userOptions),N=u(()=>j.value.style.chart.layout.grid),P=u(()=>j.value.style.chart.layout.labels),F=u(()=>j.value.style.chart.tooltip),I=u(()=>j.value.style.chart);ye({config:()=>j.value,dataset:()=>D.dataset,component:`VueUiQuadrant`,rules:[be.emptyArray,be.noHint]});let L=u(()=>j.value.userOptions.useCursorPointer),In=u(()=>({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A`,graduations:{stroke:`#6A6A6A`,color:`#6A6A6A90`},xAxis:{auto:!0},yAxis:{auto:!0}},labels:{quadrantLabels:{show:!1},plotLabels:{show:!1},axisLabels:{show:!1}},plots:{outlineColor:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}}},userConfig:j.value.skeletonConfig??{}})),{loading:Ln,FINAL_DATASET:Rn}=Ce({...Xe(D),FINAL_CONFIG:j,prepareConfig:Hn,callback:()=>{Promise.resolve().then(async()=>{await Ge(),B.value.showTable=j.value.table.show})},skeletonDataset:D.config?.skeletonDataset??[{name:`_`,shape:`circle`,color:`#CACACA`,series:[{name:`_`,x:-6,y:-4},{name:`_`,x:-5,y:-2},{name:`_`,x:-4,y:-1},{name:`_`,x:-3,y:-.5},{name:`_`,x:-2,y:-.25},{name:`_`,x:-1,y:-.135},{name:`_`,x:0,y:0},{name:`_`,x:1,y:.135},{name:`_`,x:2,y:.25},{name:`_`,x:3,y:.5},{name:`_`,x:4,y:1},{name:`_`,x:5,y:2},{name:`_`,x:6,y:4}]}],skeletonConfig:de({defaultConfig:j.value,userConfig:In.value})}),{userOptionsVisible:zn,setUserOptionsVisibility:Bn,keepUserOptionState:Vn}=Fe({config:j.value}),{svgRef:R}=Ie({config:I.value.title});function Hn(){return Pe(D.config,hn,ze)}let Un=le(D.config);Ze(()=>D.config,(e,t)=>{let n=le(e),r=n!==Un;Un=n;let i=Hn();if(!r){j.value.style.chart.tooltip=i.style.chart.tooltip,B.value.showTooltip=j.value.style.chart.tooltip.show;return}j.value=i,zn.value=!j.value.userOptions.showOnChartHover,Kn(),Tn.value+=1,En.value+=1,Dn.value+=1,B.value.plotLabels.show=P.value.plotLabels.show,B.value.showTable=j.value.table.show,B.value.showTooltip=F.value.show},{deep:!0});let z=Ye(null),Wn=Ye(null),Gn=u(()=>j.value.debug);function Kn(){if(ve(D.dataset)?ue({componentName:`VueUiQuadrant`,type:`dataset`,debug:Gn.value}):Gn.value&&D.dataset.forEach((e,t)=>{[null,void 0].includes(e.name)&&ue({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`name`,index:t}),[null,void 0].includes(e.series)?ue({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`series`,index:t}):e.series.forEach((e,t)=>{[null,void 0].includes(e.name)&&ue({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`name`,key:`series`,index:t})})}),j.value.responsive){let e=ke(()=>{let{width:e,height:t}=Ae({chart:A.value,title:I.value.title.text?xn.value:null,legend:I.value.legend.show?Sn.value:null,source:Cn.value,noTitle:wn.value});V.value=48,requestAnimationFrame(()=>{H.value.height=t,H.value.usableHeight=t-V.value*2,H.value.width=e,H.value.usableWidth=e-V.value*2,H.value.top=V.value,H.value.left=V.value,H.value.right=e-V.value,H.value.bottom=t-V.value,H.value.centerX=e/2,H.value.centerY=t-t/2,H.value.padding=V.value})});z.value&&(Wn.value&&z.value.unobserve(Wn.value),z.value.disconnect()),z.value=new ResizeObserver(e),Wn.value=A.value.parentNode,z.value.observe(Wn.value)}}qe(()=>{On.value=!0,Kn()}),Ke(()=>{z.value&&(Wn.value&&z.value.unobserve(Wn.value),z.value.disconnect())});let{isPrinting:qn,isImaging:Jn,generatePdf:Yn,generateImage:Xn}=Se({elementId:`vue-ui-quadrant_${O.value}`,fileName:I.value.title.text||`vue-ui-quadrant`,options:j.value.userOptions.print}),Zn=u(()=>j.value.userOptions.show&&!I.value.title.text),Qn=u(()=>_e(j.value.customPalette)),B=x({plotLabels:{show:P.value.plotLabels.show},showTable:j.value.table.show,showTooltip:F.value.show}),V=x(48),H=x({height:I.value.height,usableHeight:I.value.height-V.value*2,width:I.value.width,usableWidth:I.value.width-V.value*2,top:V.value,left:V.value,right:I.value.width-V.value,bottom:I.value.height-V.value,centerX:I.value.width/2,centerY:I.value.height-I.value.height/2,padding:V.value}),U=x({...JSON.parse(JSON.stringify(H.value)),startX:0,startY:0});Ze(()=>H.value,e=>{e&&(U.value={...JSON.parse(JSON.stringify(H.value)),startX:0,startY:0})},{deep:!0});let W=x(null),G=u(()=>{switch(W.value){case`TL`:return{x:U.value.startX+U.value.width/2,y:U.value.height,text:P.value.quadrantLabels.tl.text||`Top Left`,fontSize:P.value.quadrantLabels.tl.fontSize,fill:P.value.quadrantLabels.tl.color,bold:P.value.quadrantLabels.tl.bold};case`TR`:return{x:U.value.startX+U.value.width/2,y:U.value.height,text:P.value.quadrantLabels.tr.text||`Top Right`,fontSize:P.value.quadrantLabels.tr.fontSize,fill:P.value.quadrantLabels.tr.color,bold:P.value.quadrantLabels.tr.bold};case`BR`:return{x:U.value.startX+U.value.width/2,y:U.value.height*1.678,text:P.value.quadrantLabels.br.text||`Bottom Right`,fontSize:P.value.quadrantLabels.br.fontSize,fill:P.value.quadrantLabels.br.color,bold:P.value.quadrantLabels.br.bold};case`BL`:return{x:U.value.startX+U.value.width/2,y:U.value.height*1.678,text:P.value.quadrantLabels.bl.text||`Bottom Left`,fontSize:P.value.quadrantLabels.bl.fontSize,fill:P.value.quadrantLabels.bl.color,bold:P.value.quadrantLabels.bl.bold};default:return{x:0,y:0,text:``,fontSize:0,fill:`none`,bold:!1}}}),$n=x(null),er=x(!1);function tr({targetX:e,targetY:t,targetW:n,targetH:r,side:i}){W.value&&Tr(i);let a={x:e-U.value.startX,y:t-U.value.startY,w:n-U.value.width,h:r-U.value.height},o=j.value.zoomAnimationFrames,s=0;function ee(){er.value=!0,U.value.startX+=a.x/o,U.value.startY+=a.y/o,U.value.width+=a.w/o,U.value.height+=a.h/o,s+=1,s<o?$n.value=requestAnimationFrame(ee):er.value=!1}ee()}let K=u(()=>j.value.zoomEnabled);function q(e){if(K.value&&!er.value){if(k.value&&W.value===e)tr({targetX:0,targetY:0,targetW:H.value.width,targetH:H.value.height}),W.value=null,k.value=!1;else{switch(W.value=e,e){case`TL`:tr({targetX:0,targetY:0,targetW:H.value.width/2+H.value.left,targetH:H.value.height/2+H.value.top,side:`tl`});break;case`TR`:tr({targetX:H.value.width/2-H.value.left,targetY:0,targetW:H.value.width/2+H.value.left,targetH:H.value.height/2+H.value.top,side:`tr`});break;case`BR`:tr({targetX:H.value.width/2-H.value.left,targetY:H.value.height/2-H.value.top,targetW:H.value.width/2+H.value.left,targetH:H.value.height/2+H.value.top,side:`br`});break;case`BL`:tr({targetX:0,targetY:H.value.height/2-H.value.top,targetW:H.value.width/2+H.value.left,targetH:H.value.height/2+H.value.top,side:`bl`});break;default:U.value.startX=0,U.value.startY=0,U.value.width=H.value.width,U.value.height=H.value.height}k.value=!0}}}let nr=u(()=>{let e=N.value.graduations.steps,t=H.value.usableWidth/(e*2),n=H.value.top,r=[];for(let i=0;i<e;i+=1)r.push({x:H.value.padding+t*i,y:n+H.value.usableHeight*(i/e/2),height:H.value.usableHeight*(1-i/e),width:H.value.usableWidth*(1-i/e),opacity:Math.round((i+1)/e*20)});return r}),J=u(()=>{let e=N.value.xAxis.max,t=N.value.xAxis.min,n=N.value.yAxis.max,r=N.value.yAxis.min;return N.value.xAxis.auto&&(e=Math.max(...rr.value.flatMap(e=>e.series.map(e=>e.x))),t=Math.min(...rr.value.flatMap(e=>e.series.map(e=>e.x)))),N.value.yAxis.auto&&(n=Math.max(...rr.value.flatMap(e=>e.series.map(e=>e.y))),r=Math.min(...rr.value.flatMap(e=>e.series.map(e=>e.y)))),{x:{max:e,min:t},y:{max:n,min:r}}}),Y=x([]),rr=u(()=>Rn.value.map((e,t)=>({...e,series:fe({data:e.series,threshold:j.value.downsample.threshold}),id:`cat_${t}_${O.value}`,color:oe(e.color)||Qn.value[t]||re[t]}))),ir=u(()=>rr.value.filter(e=>!Y.value.includes(e.id))),ar=u(()=>rr.value.map((e,t)=>({...e,shape:e.shape||`circle`,series:e.series.map(t=>({...t,x:or(t.x),y:sr(t.y),xValue:t.x,yValue:t.y,quadrantSide:_r({x:t.x,y:t.y}),categoryName:e.name,category:e,shape:e.shape,color:e.color}))}))),X=u(()=>(Gn.value&&Rn.value.forEach((e,t)=>{e.series.forEach((e,t)=>{[null,void 0].includes(e.x)&&ue({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`x`,key:`series`,index:t}),[null,void 0].includes(e.y)&&ue({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`y`,key:`series`,index:t})})}),ir.value.map((e,t)=>({...e,shape:e.shape||`circle`,color:e.color||Qn.value[t]||re[t],series:e.series.map(t=>({...t,category:e,x:or(t.x),y:sr(t.y),xValue:t.x,yValue:t.y,quadrantSide:_r({x:t.x,y:t.y}),categoryName:e.name,shape:e.shape,color:e.color,uid:se()}))}))));function or(e){if(e>=0){let t=e/J.value.x.max;return H.value.centerX+H.value.usableWidth/2*t}{let t=Math.abs(e)/Math.abs(J.value.x.min);return H.value.centerX-H.value.usableWidth/2*t}}function sr(e){if(e>=0){let t=e/J.value.y.max;return H.value.centerY+(1-H.value.usableHeight/2*t)}{let t=Math.abs(e)/Math.abs(J.value.y.min);return H.value.centerY-(1-H.value.usableHeight/2*t)}}let cr=u(()=>{let e=X.value.flatMap(e=>e.series.map(t=>({x:t.xValue,y:t.yValue,name:t.name,category:t.categoryName,quadrantSide:t.quadrantSide,sideName:P.value.quadrantLabels[t.quadrantSide].text,color:e.color,shape:e.shape}))),t=N.value.xAxis.name||`x`,n=N.value.yAxis.name||`y`;return{head:[j.value.translations.category,j.value.translations.item,t,n,j.value.translations.side],body:e.map(e=>[e.category,e.name,e.x,e.y,e.sideName||e.quadrantSide]),itsShapes:e.map(e=>({shape:e.shape,color:e.color})),tableData:e}}),lr=u(()=>{let e=cr.value.head,t=cr.value.tableData.map(e=>[{shape:e.shape,color:e.color,name:e.category},e.name,c(P.value.plotLabels.x.formatter,e.x,s({v:e.x,r:P.value.plotLabels.rounding})),c(P.value.plotLabels.y.formatter,e.y,s({v:e.y,r:P.value.plotLabels.rounding})),e.sideName||e.quadrantSide]);return{head:e,body:t,a11yBody:t.map(e=>e.map((e,t)=>t===0?e.name??``:e)),config:{th:{backgroundColor:j.value.table.th.backgroundColor,color:j.value.table.th.color,outline:j.value.table.th.outline},td:{backgroundColor:j.value.table.td.backgroundColor,color:j.value.table.td.color,outline:j.value.table.td.outline},breakpoint:j.value.table.responsiveBreakpoint},colNames:e}});function ur(){Y.value.length?Y.value=[]:fr.value.forEach(e=>{Y.value.push(e.id)}),_n(`selectLegend`,Er())}function dr(e){Y.value.includes(e)?Y.value=Y.value.filter(t=>t!==e):Y.value.push(e),_n(`selectLegend`,Er())}let fr=u(()=>ar.value.map(e=>({name:e.name,shape:e.shape,color:e.color,id:e.id,opacity:Y.value.includes(e.id)?.5:1,segregate:()=>dr(e.id),isSegregated:Y.value.includes(e.id)})));function pr(e){return fr.value.length?fr.value.find(t=>t.name===e)||(Gn.value&&console.warn(`VueUiQuadrant - Series name not found "${e}"`),null):(Gn.value&&console.warn(`VueUiQuadrant - There are no series to show.`),null)}function mr(e){let t=pr(e);t!==null&&Y.value.includes(t.id)&&dr(t.id)}function hr(e){let t=pr(e);t!==null&&(Y.value.includes(t.id)||dr(t.id))}let gr=u(()=>({cy:`quadrant-div-legend`,backgroundColor:I.value.legend.backgroundColor,color:I.value.legend.color,fontSize:I.value.legend.fontSize,paddingBottom:12,fontWeight:I.value.legend.bold?`bold`:``}));function _r(e){switch(!0){case e.x>=0&&e.y>=0:return`tr`;case e.x>=0&&e.y<0:return`br`;case e.x<0&&e.y<0:return`bl`;case e.x<0&&e.y>=0:return`tl`;default:return``}}let Z=x(null),vr=x(null),yr=x(null);function br(){Z.value=null,vr.value=null,jn.value=null,Mn.value=null,vn.value=!1}function xr(e){if(!R.value||!e)return;let t=`[data-a11y-plot-id="${e}"]`,n=R.value.querySelector(t);if(!n)return;let r=n.getBoundingClientRect();Nn.value={x:r.left+r.width/2,y:r.top+r.height/2}}function Sr(e,t,n,r=`pointer`,i=null){j.value.events.datapointEnter&&j.value.events.datapointEnter({datapoint:t,seriesIndex:n}),Z.value=t.uid,vr.value={color:e.color,shape:e.shape},Pn.value=r,jn.value=i,Mn.value=t.uid,yr.value={datapoint:t,seriesIndex:n,series:X.value,config:j.value};let a=F.value.customFormat;if(ne(a)&&me(()=>a({seriesIndex:n,datapoint:t,series:X.value,config:j.value})))yn.value=a({seriesIndex:n,datapoint:t,series:X.value,config:j.value});else{let r=``;t.quadrantSide&&(r+=`<div style="color:${P.value.quadrantLabels[t.quadrantSide].color};font-weight:${P.value.quadrantLabels[t.quadrantSide].bold?`bold`:`400`}">${P.value.quadrantLabels[t.quadrantSide].text}</div>`),r+=`<div>${e.name}</div>`,r+=`<div style="padding-bottom:6px;border-bottom:1px solid ${F.value.borderColor};margin-bottom:3px">${t.name}</div>`,r+=`<div>${N.value.xAxis.name?N.value.xAxis.name:`x`}: <b>${c(P.value.plotLabels.x.formatter,t.xValue,s({v:t.xValue,r:F.value.roundingValue}),{datapoint:t,category:e,categoryIndex:n})}</b></div>`,r+=`<div>${N.value.yAxis.name?N.value.yAxis.name:`y`}: <b>${c(P.value.plotLabels.y.formatter,t.yValue,s({v:t.yValue,r:F.value.roundingValue}),{datapoint:t,category:e,categoryIndex:n})}</b></div>`,yn.value=`<div style="text-align:left;font-size:${F.value.fontSize}px">${r}</div>`}r===`keyboard`&&Ge(()=>{xr(t.uid)}),vn.value=!0}function Cr(e,t){j.value.events.datapointLeave&&j.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(Mn.value!==e.uid||Pn.value!==`keyboard`)&&(vn.value=!1,Z.value=null,vr.value=null)}function wr(e,t,n){j.value.events.datapointClick&&j.value.events.datapointClick({datapoint:t,seriesIndex:n});let r={category:e.name,shape:e.shape,itemName:t.name,x:t.xValue,y:t.yValue,quadrantSide:t.quadrantSide,sideName:P.value.quadrantLabels[t.quadrantSide].text};_n(`selectPlot`,r)}function Tr(e){if(!e)return;let t=X.value.flatMap(t=>t.series.filter(t=>t.quadrantSide===e).map(e=>({category:e.categoryName,itemName:e.name,x:e.xValue,y:e.yValue}))),n={quadrantSide:e,sideName:P.value.quadrantLabels[e].text,items:[...t]};_n(`selectSide`,n)}let Q=u(()=>({TL:{tl:{x:H.value.left+H.value.usableWidth/4-20,y:0,fill:P.value.quadrantLabels.tl.color},tr:{x:H.value.left+H.value.usableWidth/4,y:0,fill:P.value.quadrantLabels.tr.color},br:{x:H.value.left+H.value.usableWidth/4,y:20,fill:P.value.quadrantLabels.br.color},bl:{x:H.value.left+H.value.usableWidth/4-20,y:20,fill:P.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${H.value.left+H.value.usableWidth/4-20},20 ${H.value.left+H.value.usableWidth/4+20},20`,vertical:`M ${H.value.left+H.value.usableWidth/4},0 ${H.value.left+H.value.usableWidth/4},40`}},TR:{tl:{x:H.value.centerX+H.value.usableWidth/4-20,y:0,fill:P.value.quadrantLabels.tl.color},tr:{x:H.value.centerX+H.value.usableWidth/4,y:0,fill:P.value.quadrantLabels.tr.color},br:{x:H.value.centerX+H.value.usableWidth/4,y:20,fill:P.value.quadrantLabels.br.color},bl:{x:H.value.centerX+H.value.usableWidth/4-20,y:20,fill:P.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${H.value.centerX+H.value.usableWidth/4-20},20 ${H.value.centerX+H.value.usableWidth/4+20},20`,vertical:`M ${H.value.centerX+H.value.usableWidth/4},0 ${H.value.centerX+H.value.usableWidth/4},40`}},BR:{tl:{x:H.value.centerX+H.value.usableWidth/4-20,y:H.value.centerY-48,fill:P.value.quadrantLabels.tl.color},tr:{x:H.value.centerX+H.value.usableWidth/4,y:H.value.centerY-48,fill:P.value.quadrantLabels.tr.color},br:{x:H.value.centerX+H.value.usableWidth/4,y:H.value.centerY-28,fill:P.value.quadrantLabels.br.color},bl:{x:H.value.centerX+H.value.usableWidth/4-20,y:H.value.centerY-28,fill:P.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${H.value.centerX+H.value.usableWidth/4-20},${H.value.centerY-28} ${H.value.centerX+H.value.usableWidth/4+20},${H.value.centerY-28}`,vertical:`M ${H.value.centerX+H.value.usableWidth/4},${H.value.centerY-48} ${H.value.centerX+H.value.usableWidth/4},${H.value.centerY-8}`}},BL:{tl:{x:H.value.left+H.value.usableWidth/4-20,y:H.value.centerY-48,fill:P.value.quadrantLabels.tl.color},tr:{x:H.value.left+H.value.usableWidth/4,y:H.value.centerY-48,fill:P.value.quadrantLabels.tr.color},br:{x:H.value.left+H.value.usableWidth/4,y:H.value.centerY-28,fill:P.value.quadrantLabels.br.color},bl:{x:H.value.left+H.value.usableWidth/4-20,y:H.value.centerY-28,fill:P.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${H.value.left+H.value.usableWidth/4-20},${H.value.centerY-28} ${H.value.left+H.value.usableWidth/4+20},${H.value.centerY-28}`,vertical:`M ${H.value.left+H.value.usableWidth/4},${H.value.centerY-48} ${H.value.left+H.value.usableWidth/4},${H.value.centerY-8}`}}}));function Er(){return X.value.map(e=>({color:e.color,name:e.name,shape:e.shape,series:e.series.map(e=>({name:e.name,x:e.xValue,y:e.yValue,quadrantSide:e.quadrantSide,sideName:P.value.quadrantLabels[e.quadrantSide].text}))}))}function Dr(e=null){Ge(()=>{let t=[[I.value.title.text],[I.value.title.subtitle.text],[``]],n=cr.value.head,r=cr.value.body,i=t.concat([n]).concat(r),a=te(i);e?e(a):pe({csvContent:a,title:I.value.title.text||`vue-ui-quadrant`})})}let Or=x(!1);function kr(e){Or.value=e,bn.value+=1}function Ar(){B.value.showTable=!B.value.showTable}function jr(){B.value.plotLabels.show=!B.value.plotLabels.show}function Mr(){B.value.showTooltip=!B.value.showTooltip}let Nr=x(!1);function Pr(){Nr.value=!Nr.value}let Fr=Le(A,()=>I.value.title.text),Ir=u(()=>n({config:j,style:I,mutableConfig:B,dialog:mn,accordion:ln,isFullscreen:Or,parent:A,maxWidth:800,isCursorPointer:L}));Ze(()=>B.value.showTable,e=>t(e,j,kn));function Lr(){B.value.showTable=!1,An.value&&An.value.setTableIconState(!1)}let Rr=u(()=>I.value.backgroundColor),zr=u(()=>I.value.legend),Br=u(()=>I.value.title),{isCallbackImaging:Vr,isCallbackSvg:Hr,generateSvg:Ur,onGenerateImage:Wr}=Te({svg:R,title:Br,legend:zr,legendItems:fr,backgroundColor:Rr,getSvgCallback:()=>j.value.userOptions.callbacks.svg,generateImage:Xn});async function Gr(){if(_n(`copyAlt`,{config:j.value,dataset:ir.value}),!j.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(j.value.userOptions.callbacks.altCopy({config:j.value,dataset:ir.value}))}function Kr(){jn.value=null,Mn.value=null,Fn.value=!0}function qr(){br(),Fn.value=!1}function Jr(e){if(!R.value||Nr.value||document.activeElement!==R.value||!$.value.length)return;let t=e.key===`ArrowLeft`||e.key===`ArrowUp`,n=e.key===`ArrowRight`||e.key===`ArrowDown`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){br();return}if(r){if(jn.value===null)return;let e=$.value[jn.value];if(!e)return;wr(e.category,e.plot,e.categoryIndex);return}let a=jn.value,o=Z.value?$.value.findIndex(e=>e.plot.uid===Z.value):null,s=a!==null&&a>=0&&a<$.value.length,ee=o!==null&&o>=0&&o<$.value.length;s?(a+=n?1:-1,a<0&&(a=$.value.length-1),a>=$.value.length&&(a=0)):ee?(a=n?o+1:o-1,a>=$.value.length&&(a=0),a<0&&(a=$.value.length-1)):a=n?0:$.value.length-1;let te=$.value[a];te&&Sr(te.category,te.plot,te.categoryIndex,`keyboard`,a)}let Yr=u(()=>({headers:lr.value?.colNames??[],rows:lr.value?.a11yBody??[]})),$=u(()=>X.value.flatMap((e,t)=>e.series.map(n=>({category:e,plot:n,categoryIndex:t}))));return Oe({getData:Er,getImage:Fr,generatePdf:Yn,generateCsv:Dr,generateImage:Xn,generateSvg:Ur,hideSeries:hr,showSeries:mr,toggleTable:Ar,toggleLabels:jr,toggleTooltip:Mr,toggleAnnotator:Pr,toggleFullscreen:kr,copyAlt:Gr}),(e,t)=>(b(),p(`div`,{class:_(`vue-data-ui-component vue-ui-quadrant ${Or.value?`vue-data-ui-wrapper-fullscreen`:``} ${j.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`quadrantChart`,ref:A,id:`vue-ui-quadrant_${O.value}`,style:y(`font-family:${j.value.style.fontFamily};width:100%; text-align:center;background:${I.value.backgroundColor};${j.value.responsive?`height: 100%`:``}`),onMouseenter:t[14]||=()=>T(Bn)(!0),onMouseleave:t[15]||=()=>{T(Bn)(!1),Fn.value||br()}},[m(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[m(`p`,null,w(j.value.a11y.translations.keyboardNavigation),1)],8,et),Yr.value?.rows?.length?(b(),d(Ne,{key:0,uid:O.value,head:Yr.value.headers,body:Yr.value.rows,notice:j.value.a11y.translations.tableAvailable,caption:j.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),M.value.buttons.annotator?(b(),d(T(dn),{key:1,svgRef:T(R),backgroundColor:I.value.backgroundColor,color:I.value.color,active:Nr.value,isCursorPointer:L.value,palette:M.value.annotatorPalette,onClose:Pr},Ve({_:2},[S(T(i),t=>({name:t,fn:E(n=>[C(e.$slots,t,v(g(T(r)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),Zn.value?(b(),p(`div`,{key:2,ref_key:`noTitle`,ref:wn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),I.value.title.text?(b(),p(`div`,{key:3,ref_key:`chartTitle`,ref:xn,style:`width:100%;background:transparent;padding-bottom:12px`},[(b(),d(Ee,{key:`table_${Tn.value}`,config:{title:{cy:`quadrant-title`,...I.value.title},subtitle:{cy:`quadrant-subtitle`,...I.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),m(`div`,{id:`legend-top-${O.value}`},null,8,tt),M.value.show&&gn.value&&(T(Vn)||T(zn))?(b(),d(T(fn),{ref_key:`userOptionsRef`,ref:An,key:`user_options_${bn.value}`,backgroundColor:I.value.backgroundColor,color:I.value.color,isImaging:T(Jn),isPrinting:T(qn),uid:O.value,hasTooltip:M.value.buttons.tooltip&&F.value.show,hasPdf:M.value.buttons.pdf,hasImg:M.value.buttons.img,hasSvg:M.value.buttons.svg,hasXls:M.value.buttons.csv,hasTable:M.value.buttons.table,hasLabel:M.value.buttons.labels,hasFullscreen:M.value.buttons.fullscreen,hasAltCopy:M.value.buttons.altCopy,isFullscreen:Or.value,isTooltip:B.value.showTooltip,titles:{...M.value.buttonTitles},chartElement:A.value,position:M.value.position,hasAnnotator:M.value.buttons.annotator,isAnnotation:Nr.value,callbacks:M.value.callbacks,printScale:M.value.print.scale,tableDialog:j.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:kr,onGeneratePdf:T(Yn),onGenerateCsv:Dr,onGenerateImage:T(Wr),onGenerateSvg:T(Ur),onToggleTable:Ar,onToggleLabels:jr,onToggleTooltip:Mr,onToggleAnnotator:Pr,onCopyAlt:Gr,style:y({visibility:T(Vn)?T(zn)?`visible`:`hidden`:`visible`})},Ve({_:2},[S(T(a)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,v(g(T(o)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),m(`div`,nt,[(b(),p(`svg`,{ref_key:`svgRef`,ref:R,xmlns:T(ge),"aria-describedby":`chart-instructions-${O.value}`,class:_({"vue-data-ui-fullscreen--on":Or.value,"vue-data-ui-fulscreen--off":!Or.value}),viewBox:`${U.value.startX} ${U.value.startY} ${U.value.width} ${U.value.height}`,style:y(`max-width:100%;overflow:hidden;background:transparent;color:${I.value.color}`),id:`svg_${O.value}`,tabindex:`0`,onFocus:Kr,onBlur:qr,onKeydown:Jr},[Ue(T(pn)),e.$slots[`chart-background`]?(b(),p(`foreignObject`,{key:0,x:U.value.startX,y:U.value.startY,width:U.value.width,height:U.value.height,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,it)):f(``,!0),m(`defs`,null,[(b(!0),p(l,null,S(X.value,(e,t)=>(b(),d(je,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`quadrant_gradient_${O.value}_${t}`,key:`quadrant_gradient_${O.value}_${t}`,stops:[[`0%`,T(ae)(T(ce)(e.color,.05),I.value.layout.areas.opacity),1],[`100%`,T(ae)(e.color,I.value.layout.areas.opacity),1]]},null,8,[`id`,`stops`]))),128))]),N.value.graduations.show?(b(),p(`g`,at,[(b(!0),p(l,null,S(nr.value,e=>(b(),p(`rect`,{fill:N.value.graduations.fill?T(ae)(N.value.graduations.color,e.opacity):`none`,x:e.x,y:e.y,height:e.height<=0?.001:e.height,width:e.width<=0?.001:e.width,"stroke-width":N.value.graduations.strokeWidth,stroke:N.value.graduations.stroke,rx:N.value.graduations.roundingForce},null,8,ot))),256))])):f(``,!0),m(`line`,{x1:H.value.left,y1:H.value.centerY,x2:H.value.right,y2:H.value.centerY,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth},null,8,st),m(`line`,{x1:H.value.centerX,y1:H.value.top,x2:H.value.centerX,y2:H.value.bottom,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth},null,8,ct),N.value.showArrows?(b(),p(`g`,lt,[m(`polygon`,{points:`${H.value.right-8},${H.value.centerY-6} ${H.value.right},${H.value.centerY} ${H.value.right-8},${H.value.centerY+6}`,fill:N.value.stroke,stroke:`none`},null,8,ut),m(`polygon`,{points:`${H.value.left+8},${H.value.centerY-6} ${H.value.left},${H.value.centerY} ${H.value.left+8},${H.value.centerY+6}`,fill:N.value.stroke,stroke:`none`},null,8,dt),m(`polygon`,{points:`${H.value.centerX-6},${H.value.top+8} ${H.value.centerX},${H.value.top} ${H.value.centerX+6},${H.value.top+8}`,fill:N.value.stroke,stroke:`none`},null,8,ft),m(`polygon`,{points:`${H.value.centerX-6},${H.value.bottom-8} ${H.value.centerX},${H.value.bottom} ${H.value.centerX+6},${H.value.bottom-8}`,fill:N.value.stroke,stroke:`none`},null,8,pt)])):f(``,!0),P.value.quadrantLabels.show&&!k.value?(b(),p(`g`,mt,[P.value.quadrantLabels.tl.text?(b(),p(`text`,{key:0,x:0,y:H.value.top-H.value.padding/2,"text-anchor":`start`,fill:P.value.quadrantLabels.tl.color,"font-size":P.value.quadrantLabels.tl.fontSize,style:y(`font-weight:${P.value.quadrantLabels.tl.bold?`bold`:``}`),onClick:t[0]||=e=>Tr(`tl`)},w(P.value.quadrantLabels.tl.text),13,ht)):f(``,!0),P.value.quadrantLabels.tr.text?(b(),p(`text`,{key:1,x:H.value.width,y:H.value.top-H.value.padding/2,"text-anchor":`end`,fill:P.value.quadrantLabels.tr.color,"font-size":P.value.quadrantLabels.tr.fontSize,style:y(`font-weight:${P.value.quadrantLabels.tr.bold?`bold`:``}`),onClick:t[1]||=e=>Tr(`tr`)},w(P.value.quadrantLabels.tr.text),13,gt)):f(``,!0),P.value.quadrantLabels.br.text?(b(),p(`text`,{key:2,x:H.value.width,y:H.value.bottom+H.value.padding*.7,"text-anchor":`end`,fill:P.value.quadrantLabels.br.color,"font-size":P.value.quadrantLabels.br.fontSize,style:y(`font-weight:${P.value.quadrantLabels.br.bold?`bold`:``}`),onClick:t[2]||=e=>Tr(`br`)},w(P.value.quadrantLabels.br.text),13,_t)):f(``,!0),P.value.quadrantLabels.bl.text?(b(),p(`text`,{key:3,x:0,y:H.value.bottom+H.value.padding*.7,"text-anchor":`start`,fill:P.value.quadrantLabels.bl.color,"font-size":P.value.quadrantLabels.bl.fontSize,style:y(`font-weight:${P.value.quadrantLabels.bl.bold?`bold`:``}`),onClick:t[3]||=e=>Tr(`bl`)},w(P.value.quadrantLabels.bl.text),13,vt)):f(``,!0)])):f(``,!0),P.value.axisLabels.show?(b(),p(`g`,yt,[N.value.yAxis.show?(b(),p(`text`,{key:0,x:H.value.centerX,y:H.value.top-H.value.padding/6,"text-anchor":`middle`,"font-size":P.value.axisLabels.fontSize,fill:P.value.axisLabels.color.positive},w(T(c)(P.value.plotLabels.y.formatter,J.value.y.max,T(s)({v:J.value.y.max,r:P.value.plotLabels.rounding}))),9,bt)):f(``,!0),m(`text`,{x:H.value.centerX,y:H.value.top-H.value.padding/2,"text-anchor":`middle`,"font-size":P.value.axisLabels.fontSize,fill:P.value.axisLabels.color.positive},w(N.value.yAxis.name),9,xt),N.value.yAxis.show?(b(),p(`text`,{key:1,x:H.value.centerX,y:H.value.bottom+H.value.padding*.35,"text-anchor":`middle`,"font-size":P.value.axisLabels.fontSize,fill:P.value.axisLabels.color.negative},w(T(c)(P.value.plotLabels.y.formatter,J.value.y.min,T(s)({v:J.value.y.min,r:P.value.plotLabels.rounding}))),9,St)):f(``,!0),N.value.xAxis.show?(b(),p(`text`,{key:2,id:`xLabelMin_${O.value}`,"text-anchor":`middle`,"font-size":P.value.axisLabels.fontSize,transform:`translate(${H.value.padding-P.value.axisLabels.fontSize}, ${H.value.height/2}), rotate(-90)`,fill:P.value.axisLabels.color.negative},w(T(c)(P.value.plotLabels.x.formatter,J.value.x.min,T(s)({v:J.value.x.min,r:P.value.plotLabels.rounding}))),9,Ct)):f(``,!0),N.value.xAxis.show?(b(),p(`text`,{key:3,id:`xLabelMax_${O.value}`,"text-anchor":`middle`,"font-size":P.value.axisLabels.fontSize,transform:`translate(${H.value.width-H.value.padding+P.value.axisLabels.fontSize}, ${H.value.height/2}), rotate(90)`,fill:P.value.axisLabels.color.positive},w(T(c)(P.value.plotLabels.x.formatter,J.value.x.max,T(s)({v:J.value.x.max,r:P.value.plotLabels.rounding}))),9,wt)):f(``,!0),m(`text`,{id:`xLabelMaxName_${O.value}`,"text-anchor":`middle`,"font-size":P.value.axisLabels.fontSize,transform:`translate(${H.value.width-P.value.axisLabels.fontSize}, ${H.value.height/2}), rotate(90)`,fill:P.value.axisLabels.color.positive},w(N.value.xAxis.name),9,Tt)])):f(``,!0),I.value.layout.areas.show?(b(),p(`g`,Et,[(b(!0),p(l,null,S(X.value,(e,t)=>(b(),p(`g`,null,[e.series.length>2?(b(),p(`polygon`,{key:0,"data-cy-quadrant-area":``,fill:I.value.layout.areas.useGradient?`url(#quadrant_gradient_${O.value}_${t})`:T(ae)(e.color,I.value.layout.areas.opacity),points:T(ee)(e)},null,8,Dt)):f(``,!0)]))),256))])):f(``,!0),m(`g`,null,[m(`rect`,{onClick:t[4]||=e=>q(`TL`),x:H.value.left,y:H.value.top,width:H.value.usableWidth/2<=0?.001:H.value.usableWidth/2,height:H.value.usableHeight/2<=0?.001:H.value.usableHeight/2,fill:`transparent`,class:_({"vue-data-ui-zoom-plus":!k.value&&K.value,"vue-data-ui-zoom-minus":k.value&&K.value})},null,10,Ot),m(`rect`,{onClick:t[5]||=e=>q(`TR`),x:H.value.centerX,y:H.value.top,width:H.value.usableWidth/2<=0?.001:H.value.usableWidth/2,height:H.value.usableHeight/2<=0?.001:H.value.usableHeight/2,fill:`transparent`,class:_({"vue-data-ui-zoom-plus":!k.value&&K.value,"vue-data-ui-zoom-minus":k.value&&K.value})},null,10,kt),m(`rect`,{onClick:t[6]||=e=>q(`BR`),x:H.value.centerX,y:H.value.centerY,width:H.value.usableWidth/2<=0?.001:H.value.usableWidth/2,height:H.value.usableHeight/2<=0?.001:H.value.usableHeight/2,fill:`transparent`,class:_({"vue-data-ui-zoom-plus":!k.value&&K.value,"vue-data-ui-zoom-minus":k.value&&K.value})},null,10,At),m(`rect`,{onClick:t[7]||=e=>q(`BL`),x:H.value.left,y:H.value.centerY,width:H.value.usableWidth/2<=0?.001:H.value.usableWidth/2,height:H.value.usableHeight/2<=0?.001:H.value.usableHeight/2,fill:`transparent`,class:_({"vue-data-ui-zoom-plus":!k.value&&K.value,"vue-data-ui-zoom-minus":k.value&&K.value})},null,10,jt)]),P.value.plotLabels.showAsTag?(b(),p(l,{key:7},[B.value.plotLabels.show?(b(),p(`g`,Rt,[(b(!0),p(l,null,S(X.value,(e,t)=>(b(),p(l,null,[(b(!0),p(l,null,S(e.series,n=>(b(),p(`foreignObject`,{style:{overflow:`visible`},height:`10`,width:`100`,x:n.x-50,y:n.y-P.value.plotLabels.fontSize,onMouseover:r=>Sr(e,n,t),onMouseleave:e=>Cr(n,t),onClick:r=>wr(e,n,t)},[m(`div`,{style:y(`color:${T(he)(e.color)};margin: 0 auto; font-size:${P.value.plotLabels.fontSize}px; text-align:center;background:${e.color}; padding: 2px 4px; border-radius: 12px; height: fit-content;`)},w(n.name),5)],40,zt))),256))],64))),256))])):f(``,!0)],64)):(b(),p(l,{key:6},[(b(!0),p(l,null,S(X.value,(t,n)=>(b(),p(`g`,null,[e.$slots.datapoint&&!T(Ln)?(b(!0),p(l,{key:0},S(t.series,r=>(b(),p(`g`,{key:r.uid},[(b(),p(`foreignObject`,{x:r.x-1,y:r.y-1,width:`2`,height:`2`,style:{overflow:`visible`,"pointer-events":`none`},onMouseenter:e=>Sr(t,r,n),onMouseleave:e=>Cr(r,n),onClick:e=>wr(t,r,n)},[C(e.$slots,`datapoint`,We({ref_for:!0},{datapoint:{...r,onEnter:()=>Sr(t,r,n),onLeave:()=>Cr(r,n),onClick:()=>wr(t,r,n),isSelected:Z.value&&r.uid===Z.value}}),void 0,!0)],40,Mt)),m(`circle`,{"data-a11y-plot-id":r.uid,cx:r.x,cy:r.y,r:Math.max(I.value.layout.plots.radius/(k.value?1.5:1),10),fill:`transparent`,style:{"pointer-events":`none`}},null,8,Nt)]))),128)):e.$slots.datapointSvg&&!T(Ln)?(b(!0),p(l,{key:1},S(t.series,r=>(b(),p(`g`,{key:r.uid},[C(e.$slots,`datapointSvg`,We({ref_for:!0},{datapoint:{...r,onEnter:()=>Sr(t,r,n),onLeave:()=>Cr(r,n),onClick:()=>wr(t,r,n),isSelected:Z.value&&r.uid===Z.value}}),void 0,!0)]))),128)):(b(!0),p(l,{key:2},S(t.series,(e,r)=>(b(),p(`g`,{key:e.uid},[Ue(De,{color:t.color,isSelected:Z.value&&e.uid===Z.value,plot:e,radius:I.value.layout.plots.radius/(k.value?1.5:1),shape:t.shape,stroke:I.value.layout.plots.outline?I.value.layout.plots.outlineColor:`none`,strokeWidth:I.value.layout.plots.outlineWidth,onMouseenter:r=>Sr(t,e,n,`pointer`),onMouseleave:t=>Cr(e,n),onClick:r=>wr(t,e,n)},null,8,[`color`,`isSelected`,`plot`,`radius`,`shape`,`stroke`,`strokeWidth`,`onMouseenter`,`onMouseleave`,`onClick`]),m(`circle`,{"data-dom-to-png-ignore":``,"data-a11y-plot-id":e.uid,cx:e.x,cy:e.y,r:Math.max(I.value.layout.plots.radius/(k.value?1.5:1),10),fill:`transparent`,style:{"pointer-events":`none`}},null,8,Pt)]))),128))]))),256)),B.value.plotLabels.show?(b(),p(`g`,Ft,[(b(!0),p(l,null,S(X.value,e=>(b(),p(`g`,null,[(b(!0),p(l,null,S(e.series,e=>(b(),p(`g`,null,[String(e.name).includes(`
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./tableIntegration-CNoJ1CIY.js";import{n as r,t as i}from"./annotationSlots-BRR85CqJ.js";import{n as a,t as o}from"./userOptionsSlots-DYuo-E5m.js";import{$ as s,Ct as ee,D as te,Dt as ne,Ht as re,J as ie,Jt as ae,S as oe,X as se,Yt as ce,Zt as le,at as ue,i as c,in as de,jt as fe,nt as pe,pt as me,r as he,t as ge,w as _e,zt as ve}from"./lib-CV_IANZ6.js";import{n as ye,t as be}from"./useHints-BH9r_0Vd.js";import{t as xe}from"./useConfig-CKdzPrcf.js";import{t as Se}from"./usePrinter-hLW3cv4N.js";import{n as Ce,t as we}from"./BaseScanner-8NdoBs7B.js";import{t as Te}from"./useChartExport-DtPNpc9M.js";import{n as Ee}from"./Title-BGYFqulv.js";import{t as De}from"./Shape-Bp9YNtPc.js";import{t as Oe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{l as ke,t as Ae}from"./useResponsive-D2CPcpda.js";import{t as je}from"./DefGrad-DKMq1REY.js";import{t as Me}from"./BaseLegendToggle-Bq5FjyuI.js";import{t as Ne}from"./A11yDataTable-DWNlWXzs.js";import{n as Pe}from"./resolveChartConfig-DZg-korK.js";import{t as Fe}from"./useUserOptionState-CXlFnwPv.js";import{t as Ie}from"./useChartAccessibility-DOMuYJfm.js";import{t as Le}from"./chartImage-CIvU_04o.js";import{t as Re}from"./Legend-D8YoT1RJ.js";import{t as ze}from"./vue_ui_quadrant-BUv-SqzP.js";import{Fragment as l,Teleport as Be,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Ve,createTextVNode as He,createVNode as Ue,defineAsyncComponent as h,guardReactiveProps as g,mergeProps as We,nextTick as Ge,normalizeClass as _,normalizeProps as v,normalizeStyle as y,onBeforeUnmount as Ke,onMounted as qe,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as Je,shallowRef as Ye,toDisplayString as w,toRefs as Xe,unref as T,watch as Ze,withCtx as E}from"vue";var Qe=/* @__PURE__ */ e({default:()=>sn}),$e=[`id`],et=[`id`],tt=[`id`],nt={style:{position:`relative`}},rt=[`xmlns`,`aria-describedby`,`viewBox`,`id`],it=[`x`,`y`,`width`,`height`],at={key:1},ot=[`fill`,`x`,`y`,`height`,`width`,`stroke-width`,`stroke`,`rx`],st=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],ct=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],lt={key:2},ut=[`points`,`fill`],dt=[`points`,`fill`],ft=[`points`,`fill`],pt=[`points`,`fill`],mt={key:3},ht=[`y`,`fill`,`font-size`],gt=[`x`,`y`,`fill`,`font-size`],_t=[`x`,`y`,`fill`,`font-size`],vt=[`y`,`fill`,`font-size`],yt={key:4},bt=[`x`,`y`,`font-size`,`fill`],xt=[`x`,`y`,`font-size`,`fill`],St=[`x`,`y`,`font-size`,`fill`],Ct=[`id`,`font-size`,`transform`,`fill`],wt=[`id`,`font-size`,`transform`,`fill`],Tt=[`id`,`font-size`,`transform`,`fill`],Et={key:5},Dt=[`fill`,`points`],Ot=[`x`,`y`,`width`,`height`],kt=[`x`,`y`,`width`,`height`],At=[`x`,`y`,`width`,`height`],jt=[`x`,`y`,`width`,`height`],Mt=[`x`,`y`,`onMouseenter`,`onMouseleave`,`onClick`],Nt=[`data-a11y-plot-id`,`cx`,`cy`,`r`],Pt=[`data-a11y-plot-id`,`cx`,`cy`,`r`],Ft={key:0,style:{"pointer-events":`none`}},It=[`x`,`y`,`font-size`,`fill`],Lt=[`x`,`y`,`font-size`,`fill`,`innerHTML`],Rt={key:0},zt=[`x`,`y`,`onMouseover`,`onMouseleave`,`onClick`],Bt={key:8,class:`vue-ui-dna`},Vt=[`points`,`fill`],Ht=[`points`,`fill`],Ut=[`points`,`fill`],Wt=[`points`,`fill`],Gt={key:9},Kt=[`x`,`y`,`font-size`,`fill`,`font-weight`],qt={key:10},Jt=[`x`,`y`,`fill`],Yt=[`x`,`y`,`fill`],Xt=[`x`,`y`,`fill`],Zt=[`x`,`y`,`fill`],Qt=[`stroke`,`d`],$t=[`stroke`,`d`],en={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},tn={key:5,class:`vue-data-ui-watermark`},nn=[`id`],rn=[`onClick`],an={key:0,height:`14`,width:`14`,viewBox:`0 0 20 20`},on=[`innerHTML`],sn=/*#__PURE__*/ Oe({__name:`vue-ui-quadrant`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectPlot`,`selectSide`,`selectLegend`,`copyAlt`],setup(e,{expose:Oe,emit:Qe}){let sn=h(()=>import(`./Tooltip-Cus2-XNQ.js`)),cn=h(()=>import(`./BaseIcon-DdIyewwY.js`).then(e=>e.n)),ln=h(()=>import(`./vue-ui-accordion-BNvevckx.js`).then(e=>e.n)),un=h(()=>import(`./DataTable-WNecJMcY.js`)),dn=h(()=>import(`./PenAndPaper-IMw576MC.js`).then(e=>e.t)),fn=h(()=>import(`./UserOptions-DTxMeZv3.js`).then(e=>e.n)),pn=h(()=>import(`./PackageVersion-CdkxOy58.js`).then(e=>e.t)),mn=h(()=>import(`./BaseDraggableDialog-D_tuHEjO.js`).then(e=>e.n)),{vue_ui_quadrant:hn}=xe(),D=e,gn=u(()=>!!D.dataset&&D.dataset.length),O=x(se()),_n=Qe,vn=x(!1),yn=x(``),bn=x(0),k=x(!1),A=x(null),xn=x(null),Sn=x(null),Cn=x(null),wn=x(null),Tn=x(0),En=x(0),Dn=x(0),On=x(!1),kn=x(null),An=x(null),jn=x(null),Mn=x(null),Nn=x({x:0,y:0}),Pn=x(`pointer`),Fn=x(!1),j=x(Hn()),M=u(()=>j.value.userOptions),N=u(()=>j.value.style.chart.layout.grid),P=u(()=>j.value.style.chart.layout.labels),F=u(()=>j.value.style.chart.tooltip),I=u(()=>j.value.style.chart);ye({config:()=>j.value,dataset:()=>D.dataset,component:`VueUiQuadrant`,rules:[be.emptyArray,be.noHint]});let L=u(()=>j.value.userOptions.useCursorPointer),In=u(()=>({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A`,graduations:{stroke:`#6A6A6A`,color:`#6A6A6A90`},xAxis:{auto:!0},yAxis:{auto:!0}},labels:{quadrantLabels:{show:!1},plotLabels:{show:!1},axisLabels:{show:!1}},plots:{outlineColor:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}}},userConfig:j.value.skeletonConfig??{}})),{loading:Ln,FINAL_DATASET:Rn}=Ce({...Xe(D),FINAL_CONFIG:j,prepareConfig:Hn,callback:()=>{Promise.resolve().then(async()=>{await Ge(),B.value.showTable=j.value.table.show})},skeletonDataset:D.config?.skeletonDataset??[{name:`_`,shape:`circle`,color:`#CACACA`,series:[{name:`_`,x:-6,y:-4},{name:`_`,x:-5,y:-2},{name:`_`,x:-4,y:-1},{name:`_`,x:-3,y:-.5},{name:`_`,x:-2,y:-.25},{name:`_`,x:-1,y:-.135},{name:`_`,x:0,y:0},{name:`_`,x:1,y:.135},{name:`_`,x:2,y:.25},{name:`_`,x:3,y:.5},{name:`_`,x:4,y:1},{name:`_`,x:5,y:2},{name:`_`,x:6,y:4}]}],skeletonConfig:de({defaultConfig:j.value,userConfig:In.value})}),{userOptionsVisible:zn,setUserOptionsVisibility:Bn,keepUserOptionState:Vn}=Fe({config:j.value}),{svgRef:R}=Ie({config:I.value.title});function Hn(){return Pe(D.config,hn,ze)}let Un=le(D.config);Ze(()=>D.config,(e,t)=>{let n=le(e),r=n!==Un;Un=n;let i=Hn();if(!r){j.value.style.chart.tooltip=i.style.chart.tooltip,B.value.showTooltip=j.value.style.chart.tooltip.show;return}j.value=i,zn.value=!j.value.userOptions.showOnChartHover,Kn(),Tn.value+=1,En.value+=1,Dn.value+=1,B.value.plotLabels.show=P.value.plotLabels.show,B.value.showTable=j.value.table.show,B.value.showTooltip=F.value.show},{deep:!0});let z=Ye(null),Wn=Ye(null),Gn=u(()=>j.value.debug);function Kn(){if(ve(D.dataset)?ue({componentName:`VueUiQuadrant`,type:`dataset`,debug:Gn.value}):Gn.value&&D.dataset.forEach((e,t)=>{[null,void 0].includes(e.name)&&ue({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`name`,index:t}),[null,void 0].includes(e.series)?ue({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`series`,index:t}):e.series.forEach((e,t)=>{[null,void 0].includes(e.name)&&ue({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`name`,key:`series`,index:t})})}),j.value.responsive){let e=ke(()=>{let{width:e,height:t}=Ae({chart:A.value,title:I.value.title.text?xn.value:null,legend:I.value.legend.show?Sn.value:null,source:Cn.value,noTitle:wn.value});V.value=48,requestAnimationFrame(()=>{H.value.height=t,H.value.usableHeight=t-V.value*2,H.value.width=e,H.value.usableWidth=e-V.value*2,H.value.top=V.value,H.value.left=V.value,H.value.right=e-V.value,H.value.bottom=t-V.value,H.value.centerX=e/2,H.value.centerY=t-t/2,H.value.padding=V.value})});z.value&&(Wn.value&&z.value.unobserve(Wn.value),z.value.disconnect()),z.value=new ResizeObserver(e),Wn.value=A.value.parentNode,z.value.observe(Wn.value)}}qe(()=>{On.value=!0,Kn()}),Ke(()=>{z.value&&(Wn.value&&z.value.unobserve(Wn.value),z.value.disconnect())});let{isPrinting:qn,isImaging:Jn,generatePdf:Yn,generateImage:Xn}=Se({elementId:`vue-ui-quadrant_${O.value}`,fileName:I.value.title.text||`vue-ui-quadrant`,options:j.value.userOptions.print}),Zn=u(()=>j.value.userOptions.show&&!I.value.title.text),Qn=u(()=>_e(j.value.customPalette)),B=x({plotLabels:{show:P.value.plotLabels.show},showTable:j.value.table.show,showTooltip:F.value.show}),V=x(48),H=x({height:I.value.height,usableHeight:I.value.height-V.value*2,width:I.value.width,usableWidth:I.value.width-V.value*2,top:V.value,left:V.value,right:I.value.width-V.value,bottom:I.value.height-V.value,centerX:I.value.width/2,centerY:I.value.height-I.value.height/2,padding:V.value}),U=x({...JSON.parse(JSON.stringify(H.value)),startX:0,startY:0});Ze(()=>H.value,e=>{e&&(U.value={...JSON.parse(JSON.stringify(H.value)),startX:0,startY:0})},{deep:!0});let W=x(null),G=u(()=>{switch(W.value){case`TL`:return{x:U.value.startX+U.value.width/2,y:U.value.height,text:P.value.quadrantLabels.tl.text||`Top Left`,fontSize:P.value.quadrantLabels.tl.fontSize,fill:P.value.quadrantLabels.tl.color,bold:P.value.quadrantLabels.tl.bold};case`TR`:return{x:U.value.startX+U.value.width/2,y:U.value.height,text:P.value.quadrantLabels.tr.text||`Top Right`,fontSize:P.value.quadrantLabels.tr.fontSize,fill:P.value.quadrantLabels.tr.color,bold:P.value.quadrantLabels.tr.bold};case`BR`:return{x:U.value.startX+U.value.width/2,y:U.value.height*1.678,text:P.value.quadrantLabels.br.text||`Bottom Right`,fontSize:P.value.quadrantLabels.br.fontSize,fill:P.value.quadrantLabels.br.color,bold:P.value.quadrantLabels.br.bold};case`BL`:return{x:U.value.startX+U.value.width/2,y:U.value.height*1.678,text:P.value.quadrantLabels.bl.text||`Bottom Left`,fontSize:P.value.quadrantLabels.bl.fontSize,fill:P.value.quadrantLabels.bl.color,bold:P.value.quadrantLabels.bl.bold};default:return{x:0,y:0,text:``,fontSize:0,fill:`none`,bold:!1}}}),$n=x(null),er=x(!1);function tr({targetX:e,targetY:t,targetW:n,targetH:r,side:i}){W.value&&Tr(i);let a={x:e-U.value.startX,y:t-U.value.startY,w:n-U.value.width,h:r-U.value.height},o=j.value.zoomAnimationFrames,s=0;function ee(){er.value=!0,U.value.startX+=a.x/o,U.value.startY+=a.y/o,U.value.width+=a.w/o,U.value.height+=a.h/o,s+=1,s<o?$n.value=requestAnimationFrame(ee):er.value=!1}ee()}let K=u(()=>j.value.zoomEnabled);function q(e){if(K.value&&!er.value){if(k.value&&W.value===e)tr({targetX:0,targetY:0,targetW:H.value.width,targetH:H.value.height}),W.value=null,k.value=!1;else{switch(W.value=e,e){case`TL`:tr({targetX:0,targetY:0,targetW:H.value.width/2+H.value.left,targetH:H.value.height/2+H.value.top,side:`tl`});break;case`TR`:tr({targetX:H.value.width/2-H.value.left,targetY:0,targetW:H.value.width/2+H.value.left,targetH:H.value.height/2+H.value.top,side:`tr`});break;case`BR`:tr({targetX:H.value.width/2-H.value.left,targetY:H.value.height/2-H.value.top,targetW:H.value.width/2+H.value.left,targetH:H.value.height/2+H.value.top,side:`br`});break;case`BL`:tr({targetX:0,targetY:H.value.height/2-H.value.top,targetW:H.value.width/2+H.value.left,targetH:H.value.height/2+H.value.top,side:`bl`});break;default:U.value.startX=0,U.value.startY=0,U.value.width=H.value.width,U.value.height=H.value.height}k.value=!0}}}let nr=u(()=>{let e=N.value.graduations.steps,t=H.value.usableWidth/(e*2),n=H.value.top,r=[];for(let i=0;i<e;i+=1)r.push({x:H.value.padding+t*i,y:n+H.value.usableHeight*(i/e/2),height:H.value.usableHeight*(1-i/e),width:H.value.usableWidth*(1-i/e),opacity:Math.round((i+1)/e*20)});return r}),J=u(()=>{let e=N.value.xAxis.max,t=N.value.xAxis.min,n=N.value.yAxis.max,r=N.value.yAxis.min;return N.value.xAxis.auto&&(e=Math.max(...rr.value.flatMap(e=>e.series.map(e=>e.x))),t=Math.min(...rr.value.flatMap(e=>e.series.map(e=>e.x)))),N.value.yAxis.auto&&(n=Math.max(...rr.value.flatMap(e=>e.series.map(e=>e.y))),r=Math.min(...rr.value.flatMap(e=>e.series.map(e=>e.y)))),{x:{max:e,min:t},y:{max:n,min:r}}}),Y=x([]),rr=u(()=>Rn.value.map((e,t)=>({...e,series:fe({data:e.series,threshold:j.value.downsample.threshold}),id:`cat_${t}_${O.value}`,color:oe(e.color)||Qn.value[t]||re[t]}))),ir=u(()=>rr.value.filter(e=>!Y.value.includes(e.id))),ar=u(()=>rr.value.map((e,t)=>({...e,shape:e.shape||`circle`,series:e.series.map(t=>({...t,x:or(t.x),y:sr(t.y),xValue:t.x,yValue:t.y,quadrantSide:_r({x:t.x,y:t.y}),categoryName:e.name,category:e,shape:e.shape,color:e.color}))}))),X=u(()=>(Gn.value&&Rn.value.forEach((e,t)=>{e.series.forEach((e,t)=>{[null,void 0].includes(e.x)&&ue({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`x`,key:`series`,index:t}),[null,void 0].includes(e.y)&&ue({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`y`,key:`series`,index:t})})}),ir.value.map((e,t)=>({...e,shape:e.shape||`circle`,color:e.color||Qn.value[t]||re[t],series:e.series.map(t=>({...t,category:e,x:or(t.x),y:sr(t.y),xValue:t.x,yValue:t.y,quadrantSide:_r({x:t.x,y:t.y}),categoryName:e.name,shape:e.shape,color:e.color,uid:se()}))}))));function or(e){if(e>=0){let t=e/J.value.x.max;return H.value.centerX+H.value.usableWidth/2*t}{let t=Math.abs(e)/Math.abs(J.value.x.min);return H.value.centerX-H.value.usableWidth/2*t}}function sr(e){if(e>=0){let t=e/J.value.y.max;return H.value.centerY+(1-H.value.usableHeight/2*t)}{let t=Math.abs(e)/Math.abs(J.value.y.min);return H.value.centerY-(1-H.value.usableHeight/2*t)}}let cr=u(()=>{let e=X.value.flatMap(e=>e.series.map(t=>({x:t.xValue,y:t.yValue,name:t.name,category:t.categoryName,quadrantSide:t.quadrantSide,sideName:P.value.quadrantLabels[t.quadrantSide].text,color:e.color,shape:e.shape}))),t=N.value.xAxis.name||`x`,n=N.value.yAxis.name||`y`;return{head:[j.value.translations.category,j.value.translations.item,t,n,j.value.translations.side],body:e.map(e=>[e.category,e.name,e.x,e.y,e.sideName||e.quadrantSide]),itsShapes:e.map(e=>({shape:e.shape,color:e.color})),tableData:e}}),lr=u(()=>{let e=cr.value.head,t=cr.value.tableData.map(e=>[{shape:e.shape,color:e.color,name:e.category},e.name,c(P.value.plotLabels.x.formatter,e.x,s({v:e.x,r:P.value.plotLabels.rounding})),c(P.value.plotLabels.y.formatter,e.y,s({v:e.y,r:P.value.plotLabels.rounding})),e.sideName||e.quadrantSide]);return{head:e,body:t,a11yBody:t.map(e=>e.map((e,t)=>t===0?e.name??``:e)),config:{th:{backgroundColor:j.value.table.th.backgroundColor,color:j.value.table.th.color,outline:j.value.table.th.outline},td:{backgroundColor:j.value.table.td.backgroundColor,color:j.value.table.td.color,outline:j.value.table.td.outline},breakpoint:j.value.table.responsiveBreakpoint},colNames:e}});function ur(){Y.value.length?Y.value=[]:fr.value.forEach(e=>{Y.value.push(e.id)}),_n(`selectLegend`,Er())}function dr(e){Y.value.includes(e)?Y.value=Y.value.filter(t=>t!==e):Y.value.push(e),_n(`selectLegend`,Er())}let fr=u(()=>ar.value.map(e=>({name:e.name,shape:e.shape,color:e.color,id:e.id,opacity:Y.value.includes(e.id)?.5:1,segregate:()=>dr(e.id),isSegregated:Y.value.includes(e.id)})));function pr(e){return fr.value.length?fr.value.find(t=>t.name===e)||(Gn.value&&console.warn(`VueUiQuadrant - Series name not found "${e}"`),null):(Gn.value&&console.warn(`VueUiQuadrant - There are no series to show.`),null)}function mr(e){let t=pr(e);t!==null&&Y.value.includes(t.id)&&dr(t.id)}function hr(e){let t=pr(e);t!==null&&(Y.value.includes(t.id)||dr(t.id))}let gr=u(()=>({cy:`quadrant-div-legend`,backgroundColor:I.value.legend.backgroundColor,color:I.value.legend.color,fontSize:I.value.legend.fontSize,paddingBottom:12,fontWeight:I.value.legend.bold?`bold`:``}));function _r(e){switch(!0){case e.x>=0&&e.y>=0:return`tr`;case e.x>=0&&e.y<0:return`br`;case e.x<0&&e.y<0:return`bl`;case e.x<0&&e.y>=0:return`tl`;default:return``}}let Z=x(null),vr=x(null),yr=x(null);function br(){Z.value=null,vr.value=null,jn.value=null,Mn.value=null,vn.value=!1}function xr(e){if(!R.value||!e)return;let t=`[data-a11y-plot-id="${e}"]`,n=R.value.querySelector(t);if(!n)return;let r=n.getBoundingClientRect();Nn.value={x:r.left+r.width/2,y:r.top+r.height/2}}function Sr(e,t,n,r=`pointer`,i=null){j.value.events.datapointEnter&&j.value.events.datapointEnter({datapoint:t,seriesIndex:n}),Z.value=t.uid,vr.value={color:e.color,shape:e.shape},Pn.value=r,jn.value=i,Mn.value=t.uid,yr.value={datapoint:t,seriesIndex:n,series:X.value,config:j.value};let a=F.value.customFormat;if(ne(a)&&me(()=>a({seriesIndex:n,datapoint:t,series:X.value,config:j.value})))yn.value=a({seriesIndex:n,datapoint:t,series:X.value,config:j.value});else{let r=``;t.quadrantSide&&(r+=`<div style="color:${P.value.quadrantLabels[t.quadrantSide].color};font-weight:${P.value.quadrantLabels[t.quadrantSide].bold?`bold`:`400`}">${P.value.quadrantLabels[t.quadrantSide].text}</div>`),r+=`<div>${e.name}</div>`,r+=`<div style="padding-bottom:6px;border-bottom:1px solid ${F.value.borderColor};margin-bottom:3px">${t.name}</div>`,r+=`<div>${N.value.xAxis.name?N.value.xAxis.name:`x`}: <b>${c(P.value.plotLabels.x.formatter,t.xValue,s({v:t.xValue,r:F.value.roundingValue}),{datapoint:t,category:e,categoryIndex:n})}</b></div>`,r+=`<div>${N.value.yAxis.name?N.value.yAxis.name:`y`}: <b>${c(P.value.plotLabels.y.formatter,t.yValue,s({v:t.yValue,r:F.value.roundingValue}),{datapoint:t,category:e,categoryIndex:n})}</b></div>`,yn.value=`<div style="text-align:left;font-size:${F.value.fontSize}px">${r}</div>`}r===`keyboard`&&Ge(()=>{xr(t.uid)}),vn.value=!0}function Cr(e,t){j.value.events.datapointLeave&&j.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(Mn.value!==e.uid||Pn.value!==`keyboard`)&&(vn.value=!1,Z.value=null,vr.value=null)}function wr(e,t,n){j.value.events.datapointClick&&j.value.events.datapointClick({datapoint:t,seriesIndex:n});let r={category:e.name,shape:e.shape,itemName:t.name,x:t.xValue,y:t.yValue,quadrantSide:t.quadrantSide,sideName:P.value.quadrantLabels[t.quadrantSide].text};_n(`selectPlot`,r)}function Tr(e){if(!e)return;let t=X.value.flatMap(t=>t.series.filter(t=>t.quadrantSide===e).map(e=>({category:e.categoryName,itemName:e.name,x:e.xValue,y:e.yValue}))),n={quadrantSide:e,sideName:P.value.quadrantLabels[e].text,items:[...t]};_n(`selectSide`,n)}let Q=u(()=>({TL:{tl:{x:H.value.left+H.value.usableWidth/4-20,y:0,fill:P.value.quadrantLabels.tl.color},tr:{x:H.value.left+H.value.usableWidth/4,y:0,fill:P.value.quadrantLabels.tr.color},br:{x:H.value.left+H.value.usableWidth/4,y:20,fill:P.value.quadrantLabels.br.color},bl:{x:H.value.left+H.value.usableWidth/4-20,y:20,fill:P.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${H.value.left+H.value.usableWidth/4-20},20 ${H.value.left+H.value.usableWidth/4+20},20`,vertical:`M ${H.value.left+H.value.usableWidth/4},0 ${H.value.left+H.value.usableWidth/4},40`}},TR:{tl:{x:H.value.centerX+H.value.usableWidth/4-20,y:0,fill:P.value.quadrantLabels.tl.color},tr:{x:H.value.centerX+H.value.usableWidth/4,y:0,fill:P.value.quadrantLabels.tr.color},br:{x:H.value.centerX+H.value.usableWidth/4,y:20,fill:P.value.quadrantLabels.br.color},bl:{x:H.value.centerX+H.value.usableWidth/4-20,y:20,fill:P.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${H.value.centerX+H.value.usableWidth/4-20},20 ${H.value.centerX+H.value.usableWidth/4+20},20`,vertical:`M ${H.value.centerX+H.value.usableWidth/4},0 ${H.value.centerX+H.value.usableWidth/4},40`}},BR:{tl:{x:H.value.centerX+H.value.usableWidth/4-20,y:H.value.centerY-48,fill:P.value.quadrantLabels.tl.color},tr:{x:H.value.centerX+H.value.usableWidth/4,y:H.value.centerY-48,fill:P.value.quadrantLabels.tr.color},br:{x:H.value.centerX+H.value.usableWidth/4,y:H.value.centerY-28,fill:P.value.quadrantLabels.br.color},bl:{x:H.value.centerX+H.value.usableWidth/4-20,y:H.value.centerY-28,fill:P.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${H.value.centerX+H.value.usableWidth/4-20},${H.value.centerY-28} ${H.value.centerX+H.value.usableWidth/4+20},${H.value.centerY-28}`,vertical:`M ${H.value.centerX+H.value.usableWidth/4},${H.value.centerY-48} ${H.value.centerX+H.value.usableWidth/4},${H.value.centerY-8}`}},BL:{tl:{x:H.value.left+H.value.usableWidth/4-20,y:H.value.centerY-48,fill:P.value.quadrantLabels.tl.color},tr:{x:H.value.left+H.value.usableWidth/4,y:H.value.centerY-48,fill:P.value.quadrantLabels.tr.color},br:{x:H.value.left+H.value.usableWidth/4,y:H.value.centerY-28,fill:P.value.quadrantLabels.br.color},bl:{x:H.value.left+H.value.usableWidth/4-20,y:H.value.centerY-28,fill:P.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${H.value.left+H.value.usableWidth/4-20},${H.value.centerY-28} ${H.value.left+H.value.usableWidth/4+20},${H.value.centerY-28}`,vertical:`M ${H.value.left+H.value.usableWidth/4},${H.value.centerY-48} ${H.value.left+H.value.usableWidth/4},${H.value.centerY-8}`}}}));function Er(){return X.value.map(e=>({color:e.color,name:e.name,shape:e.shape,series:e.series.map(e=>({name:e.name,x:e.xValue,y:e.yValue,quadrantSide:e.quadrantSide,sideName:P.value.quadrantLabels[e.quadrantSide].text}))}))}function Dr(e=null){Ge(()=>{let t=[[I.value.title.text],[I.value.title.subtitle.text],[``]],n=cr.value.head,r=cr.value.body,i=t.concat([n]).concat(r),a=te(i);e?e(a):pe({csvContent:a,title:I.value.title.text||`vue-ui-quadrant`})})}let Or=x(!1);function kr(e){Or.value=e,bn.value+=1}function Ar(){B.value.showTable=!B.value.showTable}function jr(){B.value.plotLabels.show=!B.value.plotLabels.show}function Mr(){B.value.showTooltip=!B.value.showTooltip}let Nr=x(!1);function Pr(){Nr.value=!Nr.value}let Fr=Le(A,()=>I.value.title.text),Ir=u(()=>n({config:j,style:I,mutableConfig:B,dialog:mn,accordion:ln,isFullscreen:Or,parent:A,maxWidth:800,isCursorPointer:L}));Ze(()=>B.value.showTable,e=>t(e,j,kn));function Lr(){B.value.showTable=!1,An.value&&An.value.setTableIconState(!1)}let Rr=u(()=>I.value.backgroundColor),zr=u(()=>I.value.legend),Br=u(()=>I.value.title),{isCallbackImaging:Vr,isCallbackSvg:Hr,generateSvg:Ur,onGenerateImage:Wr}=Te({svg:R,title:Br,legend:zr,legendItems:fr,backgroundColor:Rr,getSvgCallback:()=>j.value.userOptions.callbacks.svg,generateImage:Xn});async function Gr(){if(_n(`copyAlt`,{config:j.value,dataset:ir.value}),!j.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(j.value.userOptions.callbacks.altCopy({config:j.value,dataset:ir.value}))}function Kr(){jn.value=null,Mn.value=null,Fn.value=!0}function qr(){br(),Fn.value=!1}function Jr(e){if(!R.value||Nr.value||document.activeElement!==R.value||!$.value.length)return;let t=e.key===`ArrowLeft`||e.key===`ArrowUp`,n=e.key===`ArrowRight`||e.key===`ArrowDown`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){br();return}if(r){if(jn.value===null)return;let e=$.value[jn.value];if(!e)return;wr(e.category,e.plot,e.categoryIndex);return}let a=jn.value,o=Z.value?$.value.findIndex(e=>e.plot.uid===Z.value):null,s=a!==null&&a>=0&&a<$.value.length,ee=o!==null&&o>=0&&o<$.value.length;s?(a+=n?1:-1,a<0&&(a=$.value.length-1),a>=$.value.length&&(a=0)):ee?(a=n?o+1:o-1,a>=$.value.length&&(a=0),a<0&&(a=$.value.length-1)):a=n?0:$.value.length-1;let te=$.value[a];te&&Sr(te.category,te.plot,te.categoryIndex,`keyboard`,a)}let Yr=u(()=>({headers:lr.value?.colNames??[],rows:lr.value?.a11yBody??[]})),$=u(()=>X.value.flatMap((e,t)=>e.series.map(n=>({category:e,plot:n,categoryIndex:t}))));return Oe({getData:Er,getImage:Fr,generatePdf:Yn,generateCsv:Dr,generateImage:Xn,generateSvg:Ur,hideSeries:hr,showSeries:mr,toggleTable:Ar,toggleLabels:jr,toggleTooltip:Mr,toggleAnnotator:Pr,toggleFullscreen:kr,copyAlt:Gr}),(e,t)=>(b(),p(`div`,{class:_(`vue-data-ui-component vue-ui-quadrant ${Or.value?`vue-data-ui-wrapper-fullscreen`:``} ${j.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`quadrantChart`,ref:A,id:`vue-ui-quadrant_${O.value}`,style:y(`font-family:${j.value.style.fontFamily};width:100%; text-align:center;background:${I.value.backgroundColor};${j.value.responsive?`height: 100%`:``}`),onMouseenter:t[14]||=()=>T(Bn)(!0),onMouseleave:t[15]||=()=>{T(Bn)(!1),Fn.value||br()}},[m(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[m(`p`,null,w(j.value.a11y.translations.keyboardNavigation),1)],8,et),Yr.value?.rows?.length?(b(),d(Ne,{key:0,uid:O.value,head:Yr.value.headers,body:Yr.value.rows,notice:j.value.a11y.translations.tableAvailable,caption:j.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),M.value.buttons.annotator?(b(),d(T(dn),{key:1,svgRef:T(R),backgroundColor:I.value.backgroundColor,color:I.value.color,active:Nr.value,isCursorPointer:L.value,palette:M.value.annotatorPalette,onClose:Pr},Ve({_:2},[S(T(i),t=>({name:t,fn:E(n=>[C(e.$slots,t,v(g(T(r)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),Zn.value?(b(),p(`div`,{key:2,ref_key:`noTitle`,ref:wn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),I.value.title.text?(b(),p(`div`,{key:3,ref_key:`chartTitle`,ref:xn,style:`width:100%;background:transparent;padding-bottom:12px`},[(b(),d(Ee,{key:`table_${Tn.value}`,config:{title:{cy:`quadrant-title`,...I.value.title},subtitle:{cy:`quadrant-subtitle`,...I.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),m(`div`,{id:`legend-top-${O.value}`},null,8,tt),M.value.show&&gn.value&&(T(Vn)||T(zn))?(b(),d(T(fn),{ref_key:`userOptionsRef`,ref:An,key:`user_options_${bn.value}`,backgroundColor:I.value.backgroundColor,color:I.value.color,isImaging:T(Jn),isPrinting:T(qn),uid:O.value,hasTooltip:M.value.buttons.tooltip&&F.value.show,hasPdf:M.value.buttons.pdf,hasImg:M.value.buttons.img,hasSvg:M.value.buttons.svg,hasXls:M.value.buttons.csv,hasTable:M.value.buttons.table,hasLabel:M.value.buttons.labels,hasFullscreen:M.value.buttons.fullscreen,hasAltCopy:M.value.buttons.altCopy,isFullscreen:Or.value,isTooltip:B.value.showTooltip,titles:{...M.value.buttonTitles},chartElement:A.value,position:M.value.position,hasAnnotator:M.value.buttons.annotator,isAnnotation:Nr.value,callbacks:M.value.callbacks,printScale:M.value.print.scale,tableDialog:j.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:kr,onGeneratePdf:T(Yn),onGenerateCsv:Dr,onGenerateImage:T(Wr),onGenerateSvg:T(Ur),onToggleTable:Ar,onToggleLabels:jr,onToggleTooltip:Mr,onToggleAnnotator:Pr,onCopyAlt:Gr,style:y({visibility:T(Vn)?T(zn)?`visible`:`hidden`:`visible`})},Ve({_:2},[S(T(a)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,v(g(T(o)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),m(`div`,nt,[(b(),p(`svg`,{ref_key:`svgRef`,ref:R,xmlns:T(ge),"aria-describedby":`chart-instructions-${O.value}`,class:_({"vue-data-ui-fullscreen--on":Or.value,"vue-data-ui-fulscreen--off":!Or.value}),viewBox:`${U.value.startX} ${U.value.startY} ${U.value.width} ${U.value.height}`,style:y(`max-width:100%;overflow:hidden;background:transparent;color:${I.value.color}`),id:`svg_${O.value}`,tabindex:`0`,onFocus:Kr,onBlur:qr,onKeydown:Jr},[Ue(T(pn)),e.$slots[`chart-background`]?(b(),p(`foreignObject`,{key:0,x:U.value.startX,y:U.value.startY,width:U.value.width,height:U.value.height,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,it)):f(``,!0),m(`defs`,null,[(b(!0),p(l,null,S(X.value,(e,t)=>(b(),d(je,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`quadrant_gradient_${O.value}_${t}`,key:`quadrant_gradient_${O.value}_${t}`,stops:[[`0%`,T(ae)(T(ce)(e.color,.05),I.value.layout.areas.opacity),1],[`100%`,T(ae)(e.color,I.value.layout.areas.opacity),1]]},null,8,[`id`,`stops`]))),128))]),N.value.graduations.show?(b(),p(`g`,at,[(b(!0),p(l,null,S(nr.value,e=>(b(),p(`rect`,{fill:N.value.graduations.fill?T(ae)(N.value.graduations.color,e.opacity):`none`,x:e.x,y:e.y,height:e.height<=0?.001:e.height,width:e.width<=0?.001:e.width,"stroke-width":N.value.graduations.strokeWidth,stroke:N.value.graduations.stroke,rx:N.value.graduations.roundingForce},null,8,ot))),256))])):f(``,!0),m(`line`,{x1:H.value.left,y1:H.value.centerY,x2:H.value.right,y2:H.value.centerY,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth},null,8,st),m(`line`,{x1:H.value.centerX,y1:H.value.top,x2:H.value.centerX,y2:H.value.bottom,stroke:N.value.stroke,"stroke-width":N.value.strokeWidth},null,8,ct),N.value.showArrows?(b(),p(`g`,lt,[m(`polygon`,{points:`${H.value.right-8},${H.value.centerY-6} ${H.value.right},${H.value.centerY} ${H.value.right-8},${H.value.centerY+6}`,fill:N.value.stroke,stroke:`none`},null,8,ut),m(`polygon`,{points:`${H.value.left+8},${H.value.centerY-6} ${H.value.left},${H.value.centerY} ${H.value.left+8},${H.value.centerY+6}`,fill:N.value.stroke,stroke:`none`},null,8,dt),m(`polygon`,{points:`${H.value.centerX-6},${H.value.top+8} ${H.value.centerX},${H.value.top} ${H.value.centerX+6},${H.value.top+8}`,fill:N.value.stroke,stroke:`none`},null,8,ft),m(`polygon`,{points:`${H.value.centerX-6},${H.value.bottom-8} ${H.value.centerX},${H.value.bottom} ${H.value.centerX+6},${H.value.bottom-8}`,fill:N.value.stroke,stroke:`none`},null,8,pt)])):f(``,!0),P.value.quadrantLabels.show&&!k.value?(b(),p(`g`,mt,[P.value.quadrantLabels.tl.text?(b(),p(`text`,{key:0,x:0,y:H.value.top-H.value.padding/2,"text-anchor":`start`,fill:P.value.quadrantLabels.tl.color,"font-size":P.value.quadrantLabels.tl.fontSize,style:y(`font-weight:${P.value.quadrantLabels.tl.bold?`bold`:``}`),onClick:t[0]||=e=>Tr(`tl`)},w(P.value.quadrantLabels.tl.text),13,ht)):f(``,!0),P.value.quadrantLabels.tr.text?(b(),p(`text`,{key:1,x:H.value.width,y:H.value.top-H.value.padding/2,"text-anchor":`end`,fill:P.value.quadrantLabels.tr.color,"font-size":P.value.quadrantLabels.tr.fontSize,style:y(`font-weight:${P.value.quadrantLabels.tr.bold?`bold`:``}`),onClick:t[1]||=e=>Tr(`tr`)},w(P.value.quadrantLabels.tr.text),13,gt)):f(``,!0),P.value.quadrantLabels.br.text?(b(),p(`text`,{key:2,x:H.value.width,y:H.value.bottom+H.value.padding*.7,"text-anchor":`end`,fill:P.value.quadrantLabels.br.color,"font-size":P.value.quadrantLabels.br.fontSize,style:y(`font-weight:${P.value.quadrantLabels.br.bold?`bold`:``}`),onClick:t[2]||=e=>Tr(`br`)},w(P.value.quadrantLabels.br.text),13,_t)):f(``,!0),P.value.quadrantLabels.bl.text?(b(),p(`text`,{key:3,x:0,y:H.value.bottom+H.value.padding*.7,"text-anchor":`start`,fill:P.value.quadrantLabels.bl.color,"font-size":P.value.quadrantLabels.bl.fontSize,style:y(`font-weight:${P.value.quadrantLabels.bl.bold?`bold`:``}`),onClick:t[3]||=e=>Tr(`bl`)},w(P.value.quadrantLabels.bl.text),13,vt)):f(``,!0)])):f(``,!0),P.value.axisLabels.show?(b(),p(`g`,yt,[N.value.yAxis.show?(b(),p(`text`,{key:0,x:H.value.centerX,y:H.value.top-H.value.padding/6,"text-anchor":`middle`,"font-size":P.value.axisLabels.fontSize,fill:P.value.axisLabels.color.positive},w(T(c)(P.value.plotLabels.y.formatter,J.value.y.max,T(s)({v:J.value.y.max,r:P.value.plotLabels.rounding}))),9,bt)):f(``,!0),m(`text`,{x:H.value.centerX,y:H.value.top-H.value.padding/2,"text-anchor":`middle`,"font-size":P.value.axisLabels.fontSize,fill:P.value.axisLabels.color.positive},w(N.value.yAxis.name),9,xt),N.value.yAxis.show?(b(),p(`text`,{key:1,x:H.value.centerX,y:H.value.bottom+H.value.padding*.35,"text-anchor":`middle`,"font-size":P.value.axisLabels.fontSize,fill:P.value.axisLabels.color.negative},w(T(c)(P.value.plotLabels.y.formatter,J.value.y.min,T(s)({v:J.value.y.min,r:P.value.plotLabels.rounding}))),9,St)):f(``,!0),N.value.xAxis.show?(b(),p(`text`,{key:2,id:`xLabelMin_${O.value}`,"text-anchor":`middle`,"font-size":P.value.axisLabels.fontSize,transform:`translate(${H.value.padding-P.value.axisLabels.fontSize}, ${H.value.height/2}), rotate(-90)`,fill:P.value.axisLabels.color.negative},w(T(c)(P.value.plotLabels.x.formatter,J.value.x.min,T(s)({v:J.value.x.min,r:P.value.plotLabels.rounding}))),9,Ct)):f(``,!0),N.value.xAxis.show?(b(),p(`text`,{key:3,id:`xLabelMax_${O.value}`,"text-anchor":`middle`,"font-size":P.value.axisLabels.fontSize,transform:`translate(${H.value.width-H.value.padding+P.value.axisLabels.fontSize}, ${H.value.height/2}), rotate(90)`,fill:P.value.axisLabels.color.positive},w(T(c)(P.value.plotLabels.x.formatter,J.value.x.max,T(s)({v:J.value.x.max,r:P.value.plotLabels.rounding}))),9,wt)):f(``,!0),m(`text`,{id:`xLabelMaxName_${O.value}`,"text-anchor":`middle`,"font-size":P.value.axisLabels.fontSize,transform:`translate(${H.value.width-P.value.axisLabels.fontSize}, ${H.value.height/2}), rotate(90)`,fill:P.value.axisLabels.color.positive},w(N.value.xAxis.name),9,Tt)])):f(``,!0),I.value.layout.areas.show?(b(),p(`g`,Et,[(b(!0),p(l,null,S(X.value,(e,t)=>(b(),p(`g`,null,[e.series.length>2?(b(),p(`polygon`,{key:0,"data-cy-quadrant-area":``,fill:I.value.layout.areas.useGradient?`url(#quadrant_gradient_${O.value}_${t})`:T(ae)(e.color,I.value.layout.areas.opacity),points:T(ee)(e)},null,8,Dt)):f(``,!0)]))),256))])):f(``,!0),m(`g`,null,[m(`rect`,{onClick:t[4]||=e=>q(`TL`),x:H.value.left,y:H.value.top,width:H.value.usableWidth/2<=0?.001:H.value.usableWidth/2,height:H.value.usableHeight/2<=0?.001:H.value.usableHeight/2,fill:`transparent`,class:_({"vue-data-ui-zoom-plus":!k.value&&K.value,"vue-data-ui-zoom-minus":k.value&&K.value})},null,10,Ot),m(`rect`,{onClick:t[5]||=e=>q(`TR`),x:H.value.centerX,y:H.value.top,width:H.value.usableWidth/2<=0?.001:H.value.usableWidth/2,height:H.value.usableHeight/2<=0?.001:H.value.usableHeight/2,fill:`transparent`,class:_({"vue-data-ui-zoom-plus":!k.value&&K.value,"vue-data-ui-zoom-minus":k.value&&K.value})},null,10,kt),m(`rect`,{onClick:t[6]||=e=>q(`BR`),x:H.value.centerX,y:H.value.centerY,width:H.value.usableWidth/2<=0?.001:H.value.usableWidth/2,height:H.value.usableHeight/2<=0?.001:H.value.usableHeight/2,fill:`transparent`,class:_({"vue-data-ui-zoom-plus":!k.value&&K.value,"vue-data-ui-zoom-minus":k.value&&K.value})},null,10,At),m(`rect`,{onClick:t[7]||=e=>q(`BL`),x:H.value.left,y:H.value.centerY,width:H.value.usableWidth/2<=0?.001:H.value.usableWidth/2,height:H.value.usableHeight/2<=0?.001:H.value.usableHeight/2,fill:`transparent`,class:_({"vue-data-ui-zoom-plus":!k.value&&K.value,"vue-data-ui-zoom-minus":k.value&&K.value})},null,10,jt)]),P.value.plotLabels.showAsTag?(b(),p(l,{key:7},[B.value.plotLabels.show?(b(),p(`g`,Rt,[(b(!0),p(l,null,S(X.value,(e,t)=>(b(),p(l,null,[(b(!0),p(l,null,S(e.series,n=>(b(),p(`foreignObject`,{style:{overflow:`visible`},height:`10`,width:`100`,x:n.x-50,y:n.y-P.value.plotLabels.fontSize,onMouseover:r=>Sr(e,n,t),onMouseleave:e=>Cr(n,t),onClick:r=>wr(e,n,t)},[m(`div`,{style:y(`color:${T(he)(e.color)};margin: 0 auto; font-size:${P.value.plotLabels.fontSize}px; text-align:center;background:${e.color}; padding: 2px 4px; border-radius: 12px; height: fit-content;`)},w(n.name),5)],40,zt))),256))],64))),256))])):f(``,!0)],64)):(b(),p(l,{key:6},[(b(!0),p(l,null,S(X.value,(t,n)=>(b(),p(`g`,null,[e.$slots.datapoint&&!T(Ln)?(b(!0),p(l,{key:0},S(t.series,r=>(b(),p(`g`,{key:r.uid},[(b(),p(`foreignObject`,{x:r.x-1,y:r.y-1,width:`2`,height:`2`,style:{overflow:`visible`,"pointer-events":`none`},onMouseenter:e=>Sr(t,r,n),onMouseleave:e=>Cr(r,n),onClick:e=>wr(t,r,n)},[C(e.$slots,`datapoint`,We({ref_for:!0},{datapoint:{...r,onEnter:()=>Sr(t,r,n),onLeave:()=>Cr(r,n),onClick:()=>wr(t,r,n),isSelected:Z.value&&r.uid===Z.value}}),void 0,!0)],40,Mt)),m(`circle`,{"data-a11y-plot-id":r.uid,cx:r.x,cy:r.y,r:Math.max(I.value.layout.plots.radius/(k.value?1.5:1),10),fill:`transparent`,style:{"pointer-events":`none`}},null,8,Nt)]))),128)):e.$slots.datapointSvg&&!T(Ln)?(b(!0),p(l,{key:1},S(t.series,r=>(b(),p(`g`,{key:r.uid},[C(e.$slots,`datapointSvg`,We({ref_for:!0},{datapoint:{...r,onEnter:()=>Sr(t,r,n),onLeave:()=>Cr(r,n),onClick:()=>wr(t,r,n),isSelected:Z.value&&r.uid===Z.value}}),void 0,!0)]))),128)):(b(!0),p(l,{key:2},S(t.series,(e,r)=>(b(),p(`g`,{key:e.uid},[Ue(De,{color:t.color,isSelected:Z.value&&e.uid===Z.value,plot:e,radius:I.value.layout.plots.radius/(k.value?1.5:1),shape:t.shape,stroke:I.value.layout.plots.outline?I.value.layout.plots.outlineColor:`none`,strokeWidth:I.value.layout.plots.outlineWidth,onMouseenter:r=>Sr(t,e,n,`pointer`),onMouseleave:t=>Cr(e,n),onClick:r=>wr(t,e,n)},null,8,[`color`,`isSelected`,`plot`,`radius`,`shape`,`stroke`,`strokeWidth`,`onMouseenter`,`onMouseleave`,`onClick`]),m(`circle`,{"data-dom-to-png-ignore":``,"data-a11y-plot-id":e.uid,cx:e.x,cy:e.y,r:Math.max(I.value.layout.plots.radius/(k.value?1.5:1),10),fill:`transparent`,style:{"pointer-events":`none`}},null,8,Pt)]))),128))]))),256)),B.value.plotLabels.show?(b(),p(`g`,Ft,[(b(!0),p(l,null,S(X.value,e=>(b(),p(`g`,null,[(b(!0),p(l,null,S(e.series,e=>(b(),p(`g`,null,[String(e.name).includes(`
2
2
  `)?(b(),p(`text`,{key:1,x:e.x,y:e.y+P.value.plotLabels.offsetY+I.value.layout.plots.radius,"text-anchor":`middle`,"font-size":P.value.plotLabels.fontSize/(k.value?1.5:1),fill:P.value.plotLabels.color,innerHTML:T(ie)({content:String(e.name),fontSize:I.value.layout.labels.plotLabels.fontSize/(k.value?1.5:1),fill:I.value.layout.labels.plotLabels.color,x:e.x,y:e.y+I.value.layout.labels.plotLabels.offsetY+I.value.layout.plots.radius})},null,8,Lt)):(b(),p(`text`,{key:0,x:e.x,y:e.y+P.value.plotLabels.offsetY+I.value.layout.plots.radius,"text-anchor":`middle`,"font-size":P.value.plotLabels.fontSize/(k.value?1.5:1),fill:P.value.plotLabels.color},w(e.name),9,It))]))),256))]))),256))])):f(``,!0)],64)),k.value?(b(),p(`g`,Bt,[W.value===`TL`?(b(),p(`polygon`,{key:0,points:`${H.value.left-1},${H.value.centerY} ${H.value.centerX},${H.value.centerY} ${H.value.centerX},${H.value.top-1} ${H.value.right},${H.value.top-1} ${H.value.right},${H.value.bottom} ${H.value.left-1},${H.value.bottom} ${H.value.left-1},${H.value.centerY}`,fill:I.value.backgroundColor,style:{opacity:`1`}},null,8,Vt)):f(``,!0),W.value===`TR`?(b(),p(`polygon`,{key:1,points:`${H.value.left},${H.value.top-1} ${H.value.centerX},${H.value.top-1} ${H.value.centerX},${H.value.centerY} ${H.value.right+1},${H.value.centerY} ${H.value.right+1},${H.value.bottom} ${H.value.left},${H.value.bottom} ${H.value.left},${H.value.top-1}`,fill:I.value.backgroundColor,style:{opacity:`1`}},null,8,Ht)):f(``,!0),W.value===`BR`?(b(),p(`polygon`,{key:2,points:`${H.value.left},${H.value.top} ${H.value.right+1},${H.value.top} ${H.value.right+1},${H.value.centerY} ${H.value.centerX},${H.value.centerY} ${H.value.centerX},${H.value.bottom+1} ${H.value.left},${H.value.bottom+1} ${H.value.left},${H.value.top}`,fill:I.value.backgroundColor,style:{opacity:`1`}},null,8,Ut)):f(``,!0),W.value===`BL`?(b(),p(`polygon`,{key:3,points:`${H.value.left-1},${H.value.top} ${H.value.right},${H.value.top} ${H.value.right},${H.value.bottom+1} ${H.value.centerX},${H.value.bottom+1} ${H.value.centerX},${H.value.centerY} ${H.value.left-1},${H.value.centerY} ${H.value.left-1},${H.value.top}`,fill:I.value.backgroundColor,style:{opacity:`1`}},null,8,Wt)):f(``,!0)])):f(``,!0),W.value&&!er.value?(b(),p(`g`,Gt,[m(`text`,{x:G.value.x,y:G.value.y-G.value.fontSize/1.5,"font-size":G.value.fontSize/1.5,fill:G.value.fill,"text-anchor":`middle`,"font-weight":G.value.bold?`bold`:`normal`},w(G.value.text),9,Kt)])):f(``,!0),k.value&&W.value?(b(),p(`g`,qt,[m(`rect`,{x:Q.value[W.value].tl.x,y:Q.value[W.value].tl.y,height:`20`,width:`20`,fill:Q.value[W.value].tl.fill,style:y(`cursor: ${L.value?`pointer`:`default`}; opacity: ${W.value===`TL`?1:.2}`),onClick:t[8]||=e=>q(`TL`),class:_({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":W.value!==`TL`})},null,14,Jt),m(`rect`,{x:Q.value[W.value].tr.x,y:Q.value[W.value].tr.y,height:`20`,width:`20`,fill:Q.value[W.value].tr.fill,style:y(`cursor: ${L.value?`pointer`:`default`}; opacity: ${W.value===`TR`?1:.2}`),onClick:t[9]||=e=>q(`TR`),class:_({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":W.value!==`TR`})},null,14,Yt),m(`rect`,{x:Q.value[W.value].br.x,y:Q.value[W.value].br.y,height:`20`,width:`20`,fill:Q.value[W.value].br.fill,style:y(`cursor: ${L.value?`pointer`:`default`}; opacity: ${W.value===`BR`?1:.2}`),onClick:t[10]||=e=>q(`BR`),class:_({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":W.value!==`BR`})},null,14,Xt),m(`rect`,{x:Q.value[W.value].bl.x,y:Q.value[W.value].bl.y,height:`20`,width:`20`,fill:Q.value[W.value].bl.fill,style:y(`cursor: ${L.value?`pointer`:`default`}; opacity: ${W.value===`BL`?1:.2}`),onClick:t[11]||=e=>q(`BL`),class:_({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":W.value!==`BL`})},null,14,Zt),m(`path`,{class:`vue-ui-quadrant-minimap-crosshairs`,stroke:I.value.backgroundColor,"stroke-width":1,d:Q.value[W.value].crosshairs.horizontal},null,8,Qt),m(`path`,{class:`vue-ui-quadrant-minimap-crosshairs`,stroke:I.value.backgroundColor,"stroke-width":1,d:Q.value[W.value].crosshairs.vertical},null,8,$t)])):f(``,!0),C(e.$slots,`svg`,{svg:{...H.value,isPrintingImg:T(qn)||T(Jn)||T(Vr),isPrintingSvg:T(Hr)}},void 0,!0)],46,rt)),e.$slots.hint?(b(),p(`div`,en,[C(e.$slots,`hint`,v(g({hint:j.value.a11y.translations.keyboardNavigation,isVisible:Fn.value})),void 0,!0)])):f(``,!0)]),e.$slots.watermark?(b(),p(`div`,tn,[C(e.$slots,`watermark`,v(g({isPrinting:T(qn)||T(Jn)||T(Vr)||T(Hr)})),void 0,!0)])):f(``,!0),m(`div`,{id:`legend-bottom-${O.value}`},null,8,nn),On.value&&(I.value.legend.show||e.$slots.legend)?(b(),d(Be,{key:6,to:I.value.legend.position===`top`?`#legend-top-${O.value}`:`#legend-bottom-${O.value}`},[m(`div`,{ref_key:`chartLegend`,ref:Sn},[C(e.$slots,`legend`,{legend:fr.value},()=>[I.value.legend.show?(b(),d(Re,{key:`legend_${Dn.value}`,legendSet:fr.value,config:gr.value,isCursorPointer:L.value,onClickMarker:t[12]||=({legend:e})=>dr(e.id)},{item:E(({legend:e})=>[T(Ln)?f(``,!0):(b(),p(`div`,{key:0,onClick:t=>dr(e.id),style:y(`opacity:${Y.value.includes(e.id)?.5:1}`)},w(e.name),13,rn))]),legendToggle:E(()=>[fr.value.length>2&&I.value.legend.selectAllToggle.show&&!T(Ln)?(b(),d(Me,{key:0,backgroundColor:I.value.legend.selectAllToggle.backgroundColor,color:I.value.legend.selectAllToggle.color,fontSize:I.value.legend.fontSize,checked:Y.value.length>0,isCursorPointer:L.value,onToggle:ur},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):f(``,!0)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):f(``,!0)],!0)],512)],8,[`to`])):f(``,!0),e.$slots.source?(b(),p(`div`,{key:7,ref_key:`source`,ref:Cn,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),Ue(T(sn),{teleportTo:F.value.teleportTo,show:B.value.showTooltip&&vn.value,backgroundColor:F.value.backgroundColor,color:F.value.color,borderRadius:F.value.borderRadius,borderColor:F.value.borderColor,borderWidth:F.value.borderWidth,fontSize:F.value.fontSize,backgroundOpacity:F.value.backgroundOpacity,position:F.value.position,offsetX:F.value.offsetX,offsetY:F.value.offsetY,parent:A.value,content:yn.value,isFullscreen:Or.value,isCustom:F.value.customFormat&&typeof F.value.customFormat==`function`,smooth:F.value.smooth,backdropFilter:F.value.backdropFilter,smoothForce:F.value.smoothForce,smoothSnapThreshold:F.value.smoothSnapThreshold,isA11yMode:Pn.value===`keyboard`,a11yPosition:Nn.value},{"tooltip-before":E(()=>[C(e.$slots,`tooltip-before`,v(g({...yr.value})),void 0,!0)]),tooltip:E(()=>[C(e.$slots,`tooltip`,v(g({...yr.value})),void 0,!0)]),"tooltip-after":E(()=>[C(e.$slots,`tooltip-after`,v(g({...yr.value})),void 0,!0)]),default:E(()=>[F.value.showShape?(b(),p(`svg`,an,[Ue(De,{plot:{x:10,y:10},shape:vr.value.shape,color:vr.value.color,radius:8,stroke:I.value.layout.plots.outline?I.value.layout.plots.outlineColor:`none`,"stroke-width":I.value.layout.plots.outlineWidth},null,8,[`shape`,`color`,`stroke`,`stroke-width`])])):f(``,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),gn.value&&M.value.buttons.table?(b(),d(Je(Ir.value.component),We({key:8},Ir.value.props,{ref_key:`tableUnit`,ref:kn,onClose:Lr}),Ve({content:E(()=>[(b(),d(T(un),{key:`table_${En.value}`,colNames:lr.value.colNames,head:lr.value.head,body:lr.value.body,config:lr.value.config,title:j.value.table.useDialog?``:Ir.value.title,withCloseButton:!j.value.table.useDialog,isCursorPointer:L.value,onClose:Lr},{th:E(({th:e})=>[He(w(e),1)]),td:E(({td:e})=>[m(`div`,{innerHTML:e.name||e},null,8,on)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[j.value.table.useDialog?{name:`title`,fn:E(()=>[He(w(Ir.value.title),1)]),key:`0`}:void 0,j.value.table.useDialog?{name:`actions`,fn:E(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[13]||=e=>Dr(M.value.callbacks.csv),style:y({cursor:L.value?`pointer`:`default`})},[Ue(T(cn),{name:`fileCsv`,stroke:Ir.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),C(e.$slots,`skeleton`,{},()=>[T(Ln)?(b(),d(we,{key:0})):f(``,!0)],!0)],46,$e))}},[[`__scopeId`,`data-v-e04c7a19`]]);export{Qe as n,sn as t};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./annotationSlots-BRR85CqJ.js";import{n as r,t as i}from"./userOptionsSlots-DYuo-E5m.js";import{$ as a,Dt as o,Ht as s,It as c,J as l,Kt as ee,P as u,S as te,X as ne,_ as re,at as ie,b as d,et as ae,f as oe,h as se,i as f,in as ce,nn as le,p as ue,pt as de,t as fe,w as pe,zt as me}from"./lib-zDxoqrgo.js";import{n as he,t as ge}from"./useHints-BH9r_0Vd.js";import{t as _e}from"./useTimeLabels-Das5O74F.js";import{t as ve}from"./useConfig-CKdzPrcf.js";import{t as ye}from"./usePrinter-CnyKPIFM.js";import{n as be,t as xe}from"./BaseScanner-8NdoBs7B.js";import{t as Se}from"./useNestedProp-CT9phgWx.js";import{t as Ce}from"./useThemeCheck-BKNRbGeC.js";import{t as we}from"./useChartExport-DtPNpc9M.js";import{t as Te}from"./useTransitions-DfSHzsdz.js";import{t as Ee}from"./useStableElementSize-CegFbRlF.js";import{t as De}from"./useTimeLabelCollider-XQf_S7-z.js";import{t as Oe}from"./img-8sM3sVWU.js";import{t as ke}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{l as Ae,t as je}from"./useResponsive-D2CPcpda.js";import{t as Me}from"./SlicerPreview-GFRs2EWB.js";import{t as Ne}from"./BaseLegendToggle-Dn_tNvn4.js";import{t as Pe}from"./A11yDataTable-DWNlWXzs.js";import{t as Fe}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ie}from"./vue_ui_quick_chart-Da1GwklM.js";import{Fragment as p,Teleport as Le,computed as m,createBlock as Re,createCommentVNode as h,createElementBlock as g,createElementVNode as _,createSlots as ze,createVNode as Be,defineAsyncComponent as Ve,guardReactiveProps as He,mergeProps as Ue,nextTick as We,normalizeClass as v,normalizeProps as Ge,normalizeStyle as y,onBeforeUnmount as Ke,onMounted as qe,openBlock as b,ref as x,renderList as S,renderSlot as C,shallowRef as Je,toDisplayString as w,toRefs as Ye,unref as T,watch as Xe,watchEffect as Ze,withCtx as Qe}from"vue";var E={LINE:`LINE`,BAR:`BAR`,DONUT:`DONUT`},$e=[`SERIE`,`SERIES`,`DATA`,`VALUE`,`VALUES`,`NUM`];function et({dataset:e,barLineSwitch:t=6,debug:n=!0}){let r=null,i=null,a=0;if((typeof e==`number`||typeof e==`string`)&&n&&console.warn(`The provided dataset (${e}) is not sufficient to build a chart`),nt(e)&&(rt(e)&&(r=e.length<t?E.BAR:E.LINE,i=e,a=e.length),it(e))){if(!ot(e))return n&&console.warn(`The objects in the dataset array have a different data structure. Either keys or value types are different.`),!1;let o=Object.keys(e[0]),s=Object.values(e[0]);if(!o.some(e=>st(e)))return n&&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;ct(s,e=>typeof e==`number`)&&(r=E.DONUT,i=e),ct(s,e=>Array.isArray(e)&&rt(e))&&(r=lt(e)>t?E.LINE:E.BAR,a=lt(e),i=e.map(e=>({...e,data:ut(e,e=>rt(e))}))),e=e.map(e=>D(e)),i=i.map(e=>D(e))}return{dataset:e,type:r,usableDataset:i,maxSeriesLength:a}}function tt(e){return!e||nt(e)&&!e.length}function nt(e){return Array.isArray(e)}function rt(e){if(!nt(e)||tt(e))return!1;let t=e.map(e=>Number(e));return![...new Set(t.flatMap(e=>typeof e==`number`&&!isNaN(e)))].includes(!1)}function it(e){return!nt(e)||tt(e)||[...new Set(e.flatMap(e=>typeof e==`object`&&!Array.isArray(e)))].includes(!1)?!1:!e.map(e=>Object.keys(e).length>0).includes(!1)}function at(e,t){let n=Object.keys(e).sort(),r=Object.keys(t).sort();if(n.length!==r.length)return!1;for(let i=0;i<n.length;i+=1){let a=n[i],o=r[i];if(a!==o||typeof e[a]!=typeof t[o])return!1}return!0}function ot(e){if(e.length<=1)return!0;for(let t=0;t<e.length;t+=1)for(let n=t+1;n<e.length;n+=1)if(!at(e[t],e[n]))return!1;return!0}function st(e){return $e.includes(e.toUpperCase())}function ct(e,t){let n=[];for(let r=0;r<e.length;r+=1)n.push(t(e[r]));return n.includes(!0)}function lt(e){return Math.max(...[...e].flatMap(e=>Object.values(e).filter(e=>rt(e)).map(e=>e.length)))}function ut(e,t){return Object.values(e).filter(e=>t(e))[0]}function D(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toUpperCase()]=e[n]);return t}var O=/* @__PURE__ */ e({default:()=>Rn}),dt=[`id`],ft=[`id`],pt=[`id`],mt={style:{position:`relative`}},ht=[`xmlns`,`aria-describedby`,`viewBox`],gt=[`x`,`y`,`width`,`height`],_t=[`x`,`y`,`width`,`height`],vt=[`width`,`height`],yt=[`id`],bt=[`id`],xt=[`id`],St=[`flood-color`],Ct={key:0,class:`donut-label-connectors`},wt=[`d`,`stroke`,`stroke-width`,`filter`],Tt=[`cx`,`cy`,`r`,`fill`,`filter`],Et={class:`donut`},Dt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Ot=[`d`,`onMouseenter`,`onMouseout`,`onClick`],kt={key:1,class:`donut-labels`},At=[`cx`,`cy`,`fill`,`stroke`,`filter`],jt=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`filter`],Mt=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`filter`],Nt={key:2,class:`donut-hollow`},Pt=[`x`,`y`,`font-size`,`fill`],Ft=[`x`,`y`,`font-size`,`fill`],It={key:0,class:`line-grid`},Lt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Rt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],zt={key:1,class:`line-axis`},Bt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Vt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ht=[`d`,`stroke`,`stroke-width`],Ut=[`transform`,`font-size`,`fill`],Wt={key:3,class:`periodLabels`},Gt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Kt={key:0},qt=[`font-size`,`text-anchor`,`fill`,`transform`],Jt=[`font-size`,`text-anchor`,`fill`,`transform`,`innerHTML`],Yt={class:`plots`},Xt=[`d`,`stroke`,`stroke-width`],Zt=[`d`,`stroke`,`stroke-width`],Qt=[`d`,`stroke`,`stroke-width`],$t=[`d`,`stroke`,`stroke-width`],en=[`cx`,`cy`,`fill`,`stroke`],tn={key:4,class:`dataLabels`},nn=[`font-size`,`fill`,`transform`],rn={key:5,class:`tooltip-traps`},an=[`x`,`y`,`height`,`width`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],on={key:0,class:`line-grid`},sn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],cn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ln={key:1,class:`line-axis`},un=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],dn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],fn=[`d`,`stroke`,`stroke-width`],pn=[`transform`,`font-size`,`fill`],mn={key:3,class:`periodLabels`},hn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],gn={key:0},_n=[`font-size`,`text-anchor`,`fill`,`transform`],vn=[`font-size`,`text-anchor`,`fill`,`transform`,`innerHTML`],yn={class:`plots`},bn=[`x`,`width`,`height`,`y`,`fill`,`stroke`,`stroke-width`],xn={key:4,class:`dataLabels`},Sn=[`transform`,`font-size`,`fill`],Cn={key:5,class:`tooltip-traps`},wn=[`x`,`y`,`height`,`width`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Tn={key:6,class:`axis-labels`},En=[`font-size`,`fill`,`x`,`y`],Dn=[`font-size`,`fill`,`x`,`y`],On=[`font-size`,`fill`,`transform`],kn=[`font-size`,`fill`,`transform`],An=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],jn={key:1,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Mn={key:5,class:`vue-data-ui-watermark`},Nn=[`id`],Pn=[`onClick`,`onKeydown`],Fn=[`onClick`,`onKeydown`],In=[`onClick`,`onKeydown`],Ln={key:1,class:`vue-ui-quick-chart-not-processable`},Rn=/*#__PURE__*/ ke({__name:`vue-ui-quick-chart`,props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}},zoomState:{type:Object,default:null}},emits:[`selectDatapoint`,`selectLegend`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:ke,emit:$e}){let tt=Ve(()=>import(`./BaseIcon-Cz30ODFA.js`).then(e=>e.n)),nt=Ve(()=>import(`./PackageVersion-D6pKL176.js`).then(e=>e.t)),at=Ve(()=>import(`./PenAndPaper-DvJJaeU2.js`).then(e=>e.t)),ot=Ve(()=>import(`./Tooltip-BUXB0i6z.js`)),st=Ve(()=>import(`./UserOptions-D65t74CM.js`).then(e=>e.n)),{vue_ui_quick_chart:ct}=ve(),{isThemeValid:lt,warnInvalidTheme:ut}=Ce(),D=e,O=x(null),Rn=x(null),zn=x(null),Bn=x(null),k=x(ne()),A=x(!1),Vn=x(null),Hn=x(``),j=x(null),Un=x(null),Wn=x(null),M=x([]),Gn=x(0),Kn=x(0),qn=x(!1),Jn=x(null),Yn=x(null),N=x(null),Xn=x(null),Zn=x(null),Qn=x(null),$n=Je(null),er=x(!1),tr=x(0),nr=x(0),rr=x(!1);function ir(){$n.value=O.value?.parentNode??null}function ar(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})})}async function or(){let e=++nr.value;er.value=!1,await We(),await ar(),await ar(),e===nr.value&&(tr.value+=1,er.value=!0)}function sr(){rr.value||(rr.value=!0,We(()=>{rr.value=!1,ir(),or()}))}let cr=Ee({elementRef:$n,minimumWidth:2,minimumHeight:2,stableFramesRequired:2,once:!1,onSizeAccepted:()=>{or()}});x(`#FFFFFF`);let P=x(Sr());he({config:()=>P.value,dataset:()=>D.dataset,component:`VueUiQuickChart`,rules:[ge.emptyArray,{test:()=>!0,message:[`👀 This is a swiss-knife component. If you need more control, consider using dedicated components:`,``,`▶️ VueUiXy for time series line and/or bars`,``,`▶️ VueUiDonut, VueUiWaffle, VueUiRings for proportions`]}]});let{transitionEnabled:F}=Te({config:()=>P.value.transitions,dataset:()=>D.dataset}),lr=m(()=>P.value.debug),ur=m(()=>P.value.useCursorPointer),I=x(null),dr=x({x:0,y:0}),L=x(`pointer`),fr=x(!1),pr=m(()=>ce({dafaultConfig:{backgroundColor:`#99999930`,customPalette:[`#BABABA`],showDataLabels:!1,paletteStartIndex:0,showUserOptions:!1,showTooltip:!1,xAxisLabel:``,yAxisLabel:``,xyAxisStroke:`#999999`,xyGridStroke:`#99999950`,xyPeriods:[],xyShowScale:!1,xyPaddingLeft:6,xyPaddingBottom:12,zoomXy:!1,zoomStartIndex:null,zoomEndIndex:null},userConfig:P.value.skeletonConfig??{}})),{loading:mr,FINAL_DATASET:hr,manualLoading:gr}=be({...Ye(D),FINAL_CONFIG:P,prepareConfig:Sr,skeletonDataset:D.config?.skeletonDataset??[1,2,3,5,8,13,21,34,55,89],skeletonConfig:ce({defaultConfig:P.value,userConfig:pr.value})}),{svgRef:R}=Fe({config:{text:P.value.title}}),_r=m(()=>P.value.showUserOptionsOnChartHover),vr=m(()=>P.value.keepUserOptionsStateOnChartLeave),yr=x(!P.value.showUserOptionsOnChartHover),br=x(!1);function xr(e=!1){br.value=e,_r.value&&(yr.value=e)}function Sr(){let e=Se({userConfig:D.config,defaultConfig:ct}),t={},n=e.theme;if(n){if(!lt.value(e))ut(e),t=e;else{let r=Se({userConfig:Ie[n]||D.config,defaultConfig:e});t={...Se({userConfig:D.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:le[n]||s}}}else t=e;return t}function Cr(e){let t=ae(e);return t?.tooltipPosition&&delete t.tooltipPosition,JSON.stringify(t)}let wr=Cr(D.config);Xe(()=>D.config,(e,t)=>{let n=Cr(e),r=n!==wr;wr=n;let i=Sr();if(!r){P.value.tooltipPosition=i.tooltipPosition,Fr.value.showTooltip=P.value.showTooltip;return}mr.value||(P.value=i),H.value.width=P.value.width,H.value.height=P.value.height,yr.value=!P.value.showUserOptionsOnChartHover,Rr(),Fr.value.showTooltip=P.value.showTooltip},{deep:!0}),Xe(()=>D.dataset,e=>{Array.isArray(e)&&e.length>0&&(gr.value=!1)},{immediate:!0});let Tr=m(()=>pe(P.value.customPalette)),z=$e,Er=m(()=>{let e=et({debug:lr.value,dataset:ee(hr.value,[`serie`,`series`,`data`,`value`,`values`,`num`]),barLineSwitch:P.value.chartIsBarUnderDatasetLength});return!e&&lr.value&&console.error(`VueUiQuickChart : Dataset is not processable`),e}),B=x(Er.value),Dr=m(()=>!!B.value),V=m(()=>B.value?B.value.type:null),Or=m(()=>[E.BAR,E.LINE].includes(V.value)),kr=m(()=>Or.value&&P.value.zoomXy&&Number(B.value?.maxSeriesLength??0)>1);Xe(()=>V.value,e=>{e||ie({componentName:`VueUiQuickChart`,type:`dataset`,debug:lr.value})},{immediate:!0});let{isPrinting:Ar,isImaging:jr,generatePdf:Mr,generateImage:Nr}=ye({elementId:`${V.value}_${k.value}`,fileName:P.value.title||V.value,options:P.value.userOptionsPrint}),Pr=m(()=>P.value.showUserOptions&&!P.value.title),H=x({width:P.value.width,height:P.value.height}),Fr=x({showTooltip:P.value.showTooltip});Xe(P,()=>{Fr.value={showTooltip:P.value.showTooltip}},{immediate:!0});let Ir=Je(null),Lr=Je(null);qe(()=>{qn.value=!0,ir(),cr.start(),Rr(),or()});function Rr(){if(me(D.dataset)||(gr.value=P.value.loading),P.value.responsive){let e=Ae(()=>{let{width:e,height:t}=je({chart:O.value,title:P.value.title?Rn.value:null,legend:P.value.showLegend?zn.value:null,slicer:kr.value?Bn.value:null,source:Un.value,noTitle:Wn.value});requestAnimationFrame(()=>{H.value.width=e,H.value.height=t,sr()})});Ir.value&&(Lr.value&&Ir.value.unobserve(Lr.value),Ir.value.disconnect()),Ir.value=new ResizeObserver(e),Lr.value=O.value.parentNode,Ir.value.observe(Lr.value)}gi(),sr()}Ke(()=>{cr.stop(),ui(),Pi(),Ir.value&&(Lr.value&&Ir.value.unobserve(Lr.value),Ir.value.disconnect(),Ir.value=null,Lr.value=null)});let zr=m(()=>{switch(V.value){case E.LINE:return`0 0 ${H.value.width<=0?10:H.value.width} ${H.value.height<=0?10:H.value.height}`;case E.BAR:return`0 0 ${H.value.width<=0?10:H.value.width} ${H.value.height<=0?10:H.value.height}`;case E.DONUT:return`0 0 ${H.value.width<=0?10:H.value.width} ${H.value.height<=0?10:H.value.height}`;default:return`0 0 ${H.value.width<=0?10:H.value.width} ${H.value.height<=0?10:H.value.height}`}});function Br(e){return[...e].map(e=>e.value).reduce((e,t)=>e+t,0)}function Vr(e){return P.value.blurOnHover&&![null,void 0].includes(j.value)&&j.value!==e?`url(#blur_${k.value})`:``}function Hr(){M.value.length?M.value=[]:V.value===E.DONUT?W.value.legend.forEach(e=>{M.value.push(e.id)}):V.value===E.LINE?Z.value.legend.forEach(e=>{M.value.push(e.id)}):V.value===E.BAR&&Q.value.legend.forEach(e=>{M.value.push(e.id)}),V.value===E.DONUT?z(`selectLegend`,W.value.dataset):V.value===E.LINE?z(`selectLegend`,Z.value.dataset):V.value===E.BAR&&z(`selectLegend`,Q.value.dataset)}function Ur(e,t){M.value.includes(e)?M.value=M.value.filter(t=>t!==e):M.value.length<t&&M.value.push(e)}let Wr=x(null),Gr=x(null),Kr=x(!1);function qr(e,t){Kr.value=!0;let n=e.value,r=Er.value.dataset.find((t,n)=>e.id===`donut_${n}`).VALUE;if(M.value.includes(e.id)){M.value=M.value.filter(t=>t!==e.id);function t(){n>r?(Kr.value=!1,cancelAnimationFrame(Gr.value),B.value={...B.value,dataset:B.value.dataset.map((t,n)=>e.id===`donut_${n}`?{...t,value:r,VALUE:r}:t)},z(`selectLegend`,W.value.dataset)):(n+=r*.025,B.value={...B.value,dataset:B.value.dataset.map((t,r)=>e.id===`donut_${r}`?{...t,value:n,VALUE:n}:t)},Gr.value=requestAnimationFrame(t))}t()}else if(t.length>1){function t(){n<r/100?(Kr.value=!1,cancelAnimationFrame(Wr.value),M.value.push(e.id),B.value={...B.value,dataset:B.value.dataset.map((t,n)=>e.id===`donut_${n}`?{...t,value:0,VALUE:0}:t)},z(`selectLegend`,W.value.dataset)):(n/=1.1,B.value={...B.value,dataset:B.value.dataset.map((t,r)=>e.id===`donut_${r}`?{...t,value:n,VALUE:n}:t)},Wr.value=requestAnimationFrame(t))}t()}else z(`selectLegend`,W.value.dataset)}let U=x(null);function Jr(e){U.value=e}let Yr=m(()=>P.value.donutThicknessRatio<.01?.01:P.value.donutThicknessRatio>.4?.4:P.value.donutThicknessRatio),W=m(()=>{if(V.value!==E.DONUT)return null;let e=B.value.dataset.map((e,t)=>({...e,value:e.VALUE||e.DATA||e.SERIE||e.VALUES||e.NUM||0,name:e.NAME||e.DESCRIPTION||e.TITLE||e.LABEL||`Serie ${t}`,id:`donut_${t}`})).map((e,t)=>({...e,color:e.COLOR?te(e.COLOR):Tr.value[t+P.value.paletteStartIndex]||s[t+P.value.paletteStartIndex]||s[(t+P.value.paletteStartIndex)%s.length],immutableValue:e.value}));function t(e,t){return a({v:isNaN(e.value/Br(t))?0:e.value/Br(t)*100,s:`%`,r:P.value.dataLabelRoundingPercentage})}function n(e){return e.proportion*100>P.value.donutHideLabelUnderPercentage}function r(e,t){let n=Er.value.dataset.find((t,n)=>`donut_${n}`===e).VALUE;return Math.abs(String(Number(n.toFixed(0))).length-String(Number(t.toFixed(0))).length)}function i({datapoint:t,seriesIndex:n,triggerMode:r=`pointer`}){Vn.value={datapoint:t,seriesIndex:n,config:P.value,dataset:e},j.value=t.id,I.value=n,L.value=r;let i=P.value.tooltipCustomFormat;if(P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:t,seriesIndex:n}),o(i)&&de(()=>i({datapoint:t,seriesIndex:n,series:e,config:P.value})))Hn.value=i({datapoint:t,seriesIndex:n,series:e,config:P.value});else{let e=``;e+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${P.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`,e+=`<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="${t.color}"/></svg>`,e+=`<b>${f(P.value.formatter,t.value,a({p:P.value.valuePrefix,v:t.value,s:P.value.valueSuffix,r:P.value.dataLabelRoundingValue}),{datapoint:t,seriesIndex:n})}</b>`,e+=`<span>(${a({v:t.proportion*100,s:`%`,r:P.value.dataLabelRoundingPercentage})})</span></div>`,Hn.value=`<div>${e}</div>`}A.value=!0}function l({datapoint:e,seriesIndex:t}){P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:t}),A.value=!1,j.value=null,U.value=null,I.value=null,L.value=`pointer`}function ee({datapoint:e,seriesIndex:t}){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:t}),z(`selectDatapoint`,e)}let u={centerX:H.value.width/2,centerY:H.value.height/2},ne=e.filter(e=>!M.value.includes(e.id)).map(e=>e.value||0).reduce((e,t)=>e+t,0),re=e.map((e,t)=>({...e,proportion:(e.value||0)/ne,value:e.value||0,absoluteValue:Er.value.dataset.find((t,n)=>`donut_${n}`===e.id).VALUE,shape:`circle`})),ie=H.value.width/2,d=H.value.height/2,ae=H.value.height*P.value.donutRadiusRatio;return{dataset:re.filter(e=>!M.value.includes(e.id)),legend:re,drawingArea:u,displayArcPercentage:t,isArcBigEnough:n,useTooltip:i,killTooltip:l,selectDatapoint:ee,getSpaces:r,total:ne,cx:ie,cy:d,radius:ae,chart:c({series:e.filter(e=>!M.value.includes(e.id))},ie,d,ae,ae,1.99999,2,1,360,105.25,H.value.height*Yr.value)}}),G=x({start:0,end:B.value.maxSeriesLength}),Xr=x({...G.value}),Zr=x(null),K=x(!1),Qr=x(!1),$r=x(!1),q=x(!1),ei=x(!1),ti=x(null),J=x(null),Y=x(null),ni=x(!1),ri=x({time:0,x:0,y:0,pointerType:null}),ii={show:!1,selection:{fill:`#2D353C`,stroke:`transparent`,fillOpacity:.1,strokeOpacity:.5,strokeWidth:1,strokeDasharray:0}},ai=m(()=>{let e=P.value.dragToZoom??{};return{...ii,...e,selection:{...ii.selection,...e.selection??{}}}}),X=m(()=>Or.value&&ai.value.show&&K.value&&di()>1&&!mr.value),oi=null,si={};function ci(e,t=G.value){if(!e||typeof e!=`object`)return null;let n=e.start!==void 0&&e.start!==null,r=e.end!==void 0&&e.end!==null;if(!n&&!r)return null;let i=Number(n?e.start:t.start),a=Number(r?e.end:t.end);return!Number.isFinite(i)||!Number.isFinite(a)?null:{start:i,end:a}}function li(e){let t=ci(e);t&&z(`update:zoomState`,t)}function ui(){oi&&=(cancelAnimationFrame(oi),null),si={}}function di(){let e=Number(B.value?.maxSeriesLength);return Number.isFinite(e)?Math.max(0,e):0}function fi(e,t=G.value.start){let n=di();if(n<=0)return 0;let r=Math.max(0,Math.min(Number(t)||0,n-1)),i=Number(e);return Number.isFinite(i)?i>n?n:i<=r?Math.min(r+1,n):Math.max(0,i):Math.min(r+1,n)}function pi(){let e=di();if(e<=0){G.value={start:0,end:0},Xr.value={...G.value},Zr.value&&Zr.value.setRangeValues(0,0);return}let t=Number(G.value.start),n=Number(G.value.end);Number.isFinite(t)||(t=0),Number.isFinite(n)||(n=e),t=Math.max(0,Math.min(t,e-1)),n=Math.max(t+1,Math.min(n,e)),G.value={start:t,end:n},Xr.value={start:t,end:n},Zr.value&&Zr.value.setRangeValues(t,n)}function mi(e){if(!Or.value)return null;let t=ci(e);return t?((t.start!==Number(G.value.start)||t.end!==Number(G.value.end))&&(ui(),G.value={start:t.start,end:t.end},Xr.value={...G.value},pi(),sr()),{start:Number(G.value.start),end:Number(G.value.end)}):null}function hi(e){let t=mi(e);return t?(li(t),t):null}async function gi({applyControlledZoom:e=!0}={}){if(!Qr.value){if(!Or.value){K.value=!1;return}Qr.value=!0;try{await We(),await We();let{zoomStartIndex:t,zoomEndIndex:n}=P.value,r=di();if(r<=0){G.value={start:0,end:0},Xr.value={...G.value},K.value=!1;return}let i=t==null?0:Number(t),a=n==null?r:fi(Number(n)+1,i);if(e&&ci(D.zoomState)){let e=ci(D.zoomState);i=e.start,a=e.end}$r.value=!0,G.value={start:i,end:a},Xr.value={start:i,end:a},pi(),K.value=!0,await We(),Zr.value&&Zr.value.setRangeValues(G.value.start,G.value.end)}finally{queueMicrotask(()=>{$r.value=!1}),Qr.value=!1,sr()}}}async function _i({applyControlledZoom:e=!1,publish:t=!1}={}){ui(),await gi({applyControlledZoom:e}),t&&(li({start:Number(G.value.start),end:Number(G.value.end)}),z(`zoomReset`))}function vi(e){si={...si,...e},oi&&cancelAnimationFrame(oi),oi=requestAnimationFrame(()=>{let e={...G.value,...si};si={},oi=null,G.value=e,Xr.value={...e},pi(),li({start:Number(G.value.start),end:Number(G.value.end)}),sr()})}function yi(e){if(Qr.value||$r.value)return;let t=Number(e);Number.isFinite(t)&&(z(`zoomStart`,{index:t,isZoom:t!==0}),(t!==G.value.start||si.end!==void 0)&&vi({start:t}))}function bi(e){if(Qr.value||$r.value)return;let t=si.start===void 0?G.value.start:si.start,n=fi(Number(e),t);z(`zoomEnd`,{index:n,isZoom:n!==di()}),(n!==G.value.end||si.start!==void 0)&&vi({end:n})}Xe([()=>D.zoomState,Or,()=>Number(B.value?.maxSeriesLength??0)],async([e,t,n])=>{if(!(!t||n<=0||!e)){if(!K.value){await gi({applyControlledZoom:!0});return}mi(e)}},{deep:!0,immediate:!0}),Xe(Er,async e=>{if(!e){K.value=!1;return}let t=B.value?.type,n=Number(B.value?.maxSeriesLength??0);B.value=e;let r=e.type,i=Number(e.maxSeriesLength??0);if(![E.BAR,E.LINE].includes(r)){ui(),K.value=!1,sr();return}t!==r||n!==i?(ui(),K.value=!1,G.value={start:0,end:i},Xr.value={...G.value},Kn.value+=1,await We(),await gi({applyControlledZoom:!0})):D.zoomState&&mi(D.zoomState),sr()},{deep:!0});let xi=m(()=>{if(!P.value.zoomMinimap.show||V.value===E.DONUT)return[];let e=[];rt(B.value.dataset)&&(e=B.value.dataset),it(B.value.dataset)&&(e=B.value.dataset.map((e,t)=>({values:e.VALUE||e.DATA||e.SERIE||e.SERIES||e.VALUES||e.NUM||0,id:V.value===E.LINE?`line_${t}`:`bar_${t}`})).filter(e=>!M.value.includes(e.id)));let t=rt(e)?e.length:Math.max(...e.map(e=>e.values.length)),n=[];if(rt(e))n=e;else for(let r=0;r<t;r+=1)n.push(e.map(e=>e.values[r]||0).reduce((e,t)=>(e||0)+(t||0),0));let r=Math.min(...n);return n.map(e=>e+(r<0?Math.abs(r):0))});function Si(){let e=0;return Xn.value&&(e=Array.from(Xn.value.querySelectorAll(`text`)).reduce((e,t)=>{let n=t.getComputedTextLength();return n>e?n:e},0)),e+4}let Ci=x(0),wi=Ae(e=>{Ci.value=e},100);Ze(e=>{let t=N.value;if(!t)return;let n=new ResizeObserver(e=>{wi(e[0].contentRect.height)});n.observe(t),e(()=>n.disconnect())}),Ke(()=>{Ci.value=0});let Ti=m(()=>{let e=0;return N.value&&(e=Ci.value),0+e}),Z=m(()=>{if(V.value!==E.LINE)return null;tr.value;let e={height:H.value.height,width:H.value.width},t=Si();if(N.value){let e=N.value.getBBox().x;e<0&&(t+=Math.abs(e))}let n={left:t+P.value.xyPaddingLeft,top:P.value.xyPaddingTop,right:e.width-P.value.xyPaddingRight,bottom:e.height-P.value.xyPaddingBottom-Ti.value,width:Math.max(10,e.width-P.value.xyPaddingLeft-P.value.xyPaddingRight-t),height:Math.max(10,e.height-P.value.xyPaddingTop-P.value.xyPaddingBottom-Ti.value)},r=[];rt(B.value.dataset)&&(r=[{values:B.value.dataset.slice(G.value.start,G.value.end),absoluteValues:B.value.dataset,absoluteIndices:B.value.dataset.map((e,t)=>t).slice(G.value.start,G.value.end),name:P.value.title,color:Tr.value[P.value.paletteStartIndex]||s[P.value.paletteStartIndex],id:`line_0`}]),it(B.value.dataset)&&(r=B.value.dataset.map((e,t)=>({...e,values:e.VALUE||e.DATA||e.SERIE||e.SERIES||e.VALUES||e.NUM||0,name:e.NAME||e.DESCRIPTION||e.TITLE||e.LABEL||`Serie ${t}`,id:`line_${t}`})).map((e,t)=>({...e,color:e.COLOR?te(e.COLOR):Tr.value[t+P.value.paletteStartIndex]||s[t+P.value.paletteStartIndex]||s[(t+P.value.paletteStartIndex)%s.length],values:e.values.slice(G.value.start,G.value.end),absoluteValues:e.values,absoluteIndices:e.values.map((e,t)=>t).slice(G.value.start,G.value.end)})));let i={max:Math.max(...r.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values)),min:Math.min(...r.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values)),maxSeries:Math.max(...r.map(e=>e.values.length))},c=i.max===i.min?re(Math.min(i.min,0),i.min===0?1:Math.max(i.min,0),P.value.xyScaleSegments):re(i.min<0?i.min:0,i.max<0?0:i.max,P.value.xyScaleSegments),l=i.min<0?Math.abs(i.min):0,ee=i.max<0?n.top:n.bottom-l/(c.max+l)*n.height,u=n.width/i.maxSeries,ne=c.ticks.map(e=>({y:n.bottom-n.height*((e+l)/(c.max+l)),x:n.left-8,value:e})),ie=r.map((e,t)=>({...e,shape:`circle`,coordinates:e.values.map((e,t)=>({x:n.left+u*(t+1)-u/2,y:n.bottom-(e+l)/(c.max+l)*n.height,value:e}))})).map(e=>{let t=[];return e.coordinates.forEach(e=>{t.push(`${e.x},${e.y} `)}),{...e,linePath:t.join(` `)}});function d(e){return r.map(t=>({...t,value:t.values[e],absoluteIndex:t.absoluteIndices[e]})).filter(e=>!M.value.includes(e.id))}function ae(e,t=`pointer`){if(q.value&&t===`pointer`)return;j.value=e,U.value=e,I.value=e,L.value=t;let n=d(e);Vn.value={datapoint:n,seriesIndex:e,config:P.value,dataset:r};let i=P.value.tooltipCustomFormat;if(P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:n,seriesIndex:e+G.value.start}),o(i)&&de(()=>i({datapoint:n,seriesIndex:e,series:r,config:P.value})))Hn.value=i({datapoint:n,seriesIndex:e,series:r,config:P.value});else{let e=``;$.value[n[0].absoluteIndex]&&(e+=`<div style="border-bottom:1px solid ${P.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${$.value[n[0].absoluteIndex].text}</div>`),n.forEach((t,n)=>{e+=`
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./annotationSlots-BRR85CqJ.js";import{n as r,t as i}from"./userOptionsSlots-DYuo-E5m.js";import{$ as a,Dt as o,Ht as s,It as c,J as l,Kt as ee,P as u,S as te,X as ne,_ as re,at as ie,b as d,et as ae,f as oe,h as se,i as f,in as ce,nn as le,p as ue,pt as de,t as fe,w as pe,zt as me}from"./lib-CV_IANZ6.js";import{n as he,t as ge}from"./useHints-BH9r_0Vd.js";import{t as _e}from"./useTimeLabels-Das5O74F.js";import{t as ve}from"./useConfig-CKdzPrcf.js";import{t as ye}from"./usePrinter-hLW3cv4N.js";import{n as be,t as xe}from"./BaseScanner-8NdoBs7B.js";import{t as Se}from"./useNestedProp-CB186vF2.js";import{t as Ce}from"./useThemeCheck-BKNRbGeC.js";import{t as we}from"./useChartExport-DtPNpc9M.js";import{t as Te}from"./useTransitions-DfSHzsdz.js";import{t as Ee}from"./useStableElementSize-CegFbRlF.js";import{t as De}from"./useTimeLabelCollider-XQf_S7-z.js";import{t as Oe}from"./img-DiT4ivZ5.js";import{t as ke}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{l as Ae,t as je}from"./useResponsive-D2CPcpda.js";import{t as Me}from"./SlicerPreview-CNUciSbY.js";import{t as Ne}from"./BaseLegendToggle-Bq5FjyuI.js";import{t as Pe}from"./A11yDataTable-DWNlWXzs.js";import{t as Fe}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ie}from"./vue_ui_quick_chart-BRfcRW6Z.js";import{Fragment as p,Teleport as Le,computed as m,createBlock as Re,createCommentVNode as h,createElementBlock as g,createElementVNode as _,createSlots as ze,createVNode as Be,defineAsyncComponent as Ve,guardReactiveProps as He,mergeProps as Ue,nextTick as We,normalizeClass as v,normalizeProps as Ge,normalizeStyle as y,onBeforeUnmount as Ke,onMounted as qe,openBlock as b,ref as x,renderList as S,renderSlot as C,shallowRef as Je,toDisplayString as w,toRefs as Ye,unref as T,watch as Xe,watchEffect as Ze,withCtx as Qe}from"vue";var E={LINE:`LINE`,BAR:`BAR`,DONUT:`DONUT`},$e=[`SERIE`,`SERIES`,`DATA`,`VALUE`,`VALUES`,`NUM`];function et({dataset:e,barLineSwitch:t=6,debug:n=!0}){let r=null,i=null,a=0;if((typeof e==`number`||typeof e==`string`)&&n&&console.warn(`The provided dataset (${e}) is not sufficient to build a chart`),nt(e)&&(rt(e)&&(r=e.length<t?E.BAR:E.LINE,i=e,a=e.length),it(e))){if(!ot(e))return n&&console.warn(`The objects in the dataset array have a different data structure. Either keys or value types are different.`),!1;let o=Object.keys(e[0]),s=Object.values(e[0]);if(!o.some(e=>st(e)))return n&&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;ct(s,e=>typeof e==`number`)&&(r=E.DONUT,i=e),ct(s,e=>Array.isArray(e)&&rt(e))&&(r=lt(e)>t?E.LINE:E.BAR,a=lt(e),i=e.map(e=>({...e,data:ut(e,e=>rt(e))}))),e=e.map(e=>D(e)),i=i.map(e=>D(e))}return{dataset:e,type:r,usableDataset:i,maxSeriesLength:a}}function tt(e){return!e||nt(e)&&!e.length}function nt(e){return Array.isArray(e)}function rt(e){if(!nt(e)||tt(e))return!1;let t=e.map(e=>Number(e));return![...new Set(t.flatMap(e=>typeof e==`number`&&!isNaN(e)))].includes(!1)}function it(e){return!nt(e)||tt(e)||[...new Set(e.flatMap(e=>typeof e==`object`&&!Array.isArray(e)))].includes(!1)?!1:!e.map(e=>Object.keys(e).length>0).includes(!1)}function at(e,t){let n=Object.keys(e).sort(),r=Object.keys(t).sort();if(n.length!==r.length)return!1;for(let i=0;i<n.length;i+=1){let a=n[i],o=r[i];if(a!==o||typeof e[a]!=typeof t[o])return!1}return!0}function ot(e){if(e.length<=1)return!0;for(let t=0;t<e.length;t+=1)for(let n=t+1;n<e.length;n+=1)if(!at(e[t],e[n]))return!1;return!0}function st(e){return $e.includes(e.toUpperCase())}function ct(e,t){let n=[];for(let r=0;r<e.length;r+=1)n.push(t(e[r]));return n.includes(!0)}function lt(e){return Math.max(...[...e].flatMap(e=>Object.values(e).filter(e=>rt(e)).map(e=>e.length)))}function ut(e,t){return Object.values(e).filter(e=>t(e))[0]}function D(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toUpperCase()]=e[n]);return t}var O=/* @__PURE__ */ e({default:()=>Rn}),dt=[`id`],ft=[`id`],pt=[`id`],mt={style:{position:`relative`}},ht=[`xmlns`,`aria-describedby`,`viewBox`],gt=[`x`,`y`,`width`,`height`],_t=[`x`,`y`,`width`,`height`],vt=[`width`,`height`],yt=[`id`],bt=[`id`],xt=[`id`],St=[`flood-color`],Ct={key:0,class:`donut-label-connectors`},wt=[`d`,`stroke`,`stroke-width`,`filter`],Tt=[`cx`,`cy`,`r`,`fill`,`filter`],Et={class:`donut`},Dt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Ot=[`d`,`onMouseenter`,`onMouseout`,`onClick`],kt={key:1,class:`donut-labels`},At=[`cx`,`cy`,`fill`,`stroke`,`filter`],jt=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`filter`],Mt=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`filter`],Nt={key:2,class:`donut-hollow`},Pt=[`x`,`y`,`font-size`,`fill`],Ft=[`x`,`y`,`font-size`,`fill`],It={key:0,class:`line-grid`},Lt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Rt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],zt={key:1,class:`line-axis`},Bt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Vt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ht=[`d`,`stroke`,`stroke-width`],Ut=[`transform`,`font-size`,`fill`],Wt={key:3,class:`periodLabels`},Gt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Kt={key:0},qt=[`font-size`,`text-anchor`,`fill`,`transform`],Jt=[`font-size`,`text-anchor`,`fill`,`transform`,`innerHTML`],Yt={class:`plots`},Xt=[`d`,`stroke`,`stroke-width`],Zt=[`d`,`stroke`,`stroke-width`],Qt=[`d`,`stroke`,`stroke-width`],$t=[`d`,`stroke`,`stroke-width`],en=[`cx`,`cy`,`fill`,`stroke`],tn={key:4,class:`dataLabels`},nn=[`font-size`,`fill`,`transform`],rn={key:5,class:`tooltip-traps`},an=[`x`,`y`,`height`,`width`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],on={key:0,class:`line-grid`},sn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],cn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ln={key:1,class:`line-axis`},un=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],dn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],fn=[`d`,`stroke`,`stroke-width`],pn=[`transform`,`font-size`,`fill`],mn={key:3,class:`periodLabels`},hn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],gn={key:0},_n=[`font-size`,`text-anchor`,`fill`,`transform`],vn=[`font-size`,`text-anchor`,`fill`,`transform`,`innerHTML`],yn={class:`plots`},bn=[`x`,`width`,`height`,`y`,`fill`,`stroke`,`stroke-width`],xn={key:4,class:`dataLabels`},Sn=[`transform`,`font-size`,`fill`],Cn={key:5,class:`tooltip-traps`},wn=[`x`,`y`,`height`,`width`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Tn={key:6,class:`axis-labels`},En=[`font-size`,`fill`,`x`,`y`],Dn=[`font-size`,`fill`,`x`,`y`],On=[`font-size`,`fill`,`transform`],kn=[`font-size`,`fill`,`transform`],An=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],jn={key:1,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Mn={key:5,class:`vue-data-ui-watermark`},Nn=[`id`],Pn=[`onClick`,`onKeydown`],Fn=[`onClick`,`onKeydown`],In=[`onClick`,`onKeydown`],Ln={key:1,class:`vue-ui-quick-chart-not-processable`},Rn=/*#__PURE__*/ ke({__name:`vue-ui-quick-chart`,props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}},zoomState:{type:Object,default:null}},emits:[`selectDatapoint`,`selectLegend`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:ke,emit:$e}){let tt=Ve(()=>import(`./BaseIcon-DdIyewwY.js`).then(e=>e.n)),nt=Ve(()=>import(`./PackageVersion-CdkxOy58.js`).then(e=>e.t)),at=Ve(()=>import(`./PenAndPaper-IMw576MC.js`).then(e=>e.t)),ot=Ve(()=>import(`./Tooltip-Cus2-XNQ.js`)),st=Ve(()=>import(`./UserOptions-DTxMeZv3.js`).then(e=>e.n)),{vue_ui_quick_chart:ct}=ve(),{isThemeValid:lt,warnInvalidTheme:ut}=Ce(),D=e,O=x(null),Rn=x(null),zn=x(null),Bn=x(null),k=x(ne()),A=x(!1),Vn=x(null),Hn=x(``),j=x(null),Un=x(null),Wn=x(null),M=x([]),Gn=x(0),Kn=x(0),qn=x(!1),Jn=x(null),Yn=x(null),N=x(null),Xn=x(null),Zn=x(null),Qn=x(null),$n=Je(null),er=x(!1),tr=x(0),nr=x(0),rr=x(!1);function ir(){$n.value=O.value?.parentNode??null}function ar(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})})}async function or(){let e=++nr.value;er.value=!1,await We(),await ar(),await ar(),e===nr.value&&(tr.value+=1,er.value=!0)}function sr(){rr.value||(rr.value=!0,We(()=>{rr.value=!1,ir(),or()}))}let cr=Ee({elementRef:$n,minimumWidth:2,minimumHeight:2,stableFramesRequired:2,once:!1,onSizeAccepted:()=>{or()}});x(`#FFFFFF`);let P=x(Sr());he({config:()=>P.value,dataset:()=>D.dataset,component:`VueUiQuickChart`,rules:[ge.emptyArray,{test:()=>!0,message:[`👀 This is a swiss-knife component. If you need more control, consider using dedicated components:`,``,`▶️ VueUiXy for time series line and/or bars`,``,`▶️ VueUiDonut, VueUiWaffle, VueUiRings for proportions`]}]});let{transitionEnabled:F}=Te({config:()=>P.value.transitions,dataset:()=>D.dataset}),lr=m(()=>P.value.debug),ur=m(()=>P.value.useCursorPointer),I=x(null),dr=x({x:0,y:0}),L=x(`pointer`),fr=x(!1),pr=m(()=>ce({dafaultConfig:{backgroundColor:`#99999930`,customPalette:[`#BABABA`],showDataLabels:!1,paletteStartIndex:0,showUserOptions:!1,showTooltip:!1,xAxisLabel:``,yAxisLabel:``,xyAxisStroke:`#999999`,xyGridStroke:`#99999950`,xyPeriods:[],xyShowScale:!1,xyPaddingLeft:6,xyPaddingBottom:12,zoomXy:!1,zoomStartIndex:null,zoomEndIndex:null},userConfig:P.value.skeletonConfig??{}})),{loading:mr,FINAL_DATASET:hr,manualLoading:gr}=be({...Ye(D),FINAL_CONFIG:P,prepareConfig:Sr,skeletonDataset:D.config?.skeletonDataset??[1,2,3,5,8,13,21,34,55,89],skeletonConfig:ce({defaultConfig:P.value,userConfig:pr.value})}),{svgRef:R}=Fe({config:{text:P.value.title}}),_r=m(()=>P.value.showUserOptionsOnChartHover),vr=m(()=>P.value.keepUserOptionsStateOnChartLeave),yr=x(!P.value.showUserOptionsOnChartHover),br=x(!1);function xr(e=!1){br.value=e,_r.value&&(yr.value=e)}function Sr(){let e=Se({userConfig:D.config,defaultConfig:ct}),t={},n=e.theme;if(n){if(!lt.value(e))ut(e),t=e;else{let r=Se({userConfig:Ie[n]||D.config,defaultConfig:e});t={...Se({userConfig:D.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:le[n]||s}}}else t=e;return t}function Cr(e){let t=ae(e);return t?.tooltipPosition&&delete t.tooltipPosition,JSON.stringify(t)}let wr=Cr(D.config);Xe(()=>D.config,(e,t)=>{let n=Cr(e),r=n!==wr;wr=n;let i=Sr();if(!r){P.value.tooltipPosition=i.tooltipPosition,Fr.value.showTooltip=P.value.showTooltip;return}mr.value||(P.value=i),H.value.width=P.value.width,H.value.height=P.value.height,yr.value=!P.value.showUserOptionsOnChartHover,Rr(),Fr.value.showTooltip=P.value.showTooltip},{deep:!0}),Xe(()=>D.dataset,e=>{Array.isArray(e)&&e.length>0&&(gr.value=!1)},{immediate:!0});let Tr=m(()=>pe(P.value.customPalette)),z=$e,Er=m(()=>{let e=et({debug:lr.value,dataset:ee(hr.value,[`serie`,`series`,`data`,`value`,`values`,`num`]),barLineSwitch:P.value.chartIsBarUnderDatasetLength});return!e&&lr.value&&console.error(`VueUiQuickChart : Dataset is not processable`),e}),B=x(Er.value),Dr=m(()=>!!B.value),V=m(()=>B.value?B.value.type:null),Or=m(()=>[E.BAR,E.LINE].includes(V.value)),kr=m(()=>Or.value&&P.value.zoomXy&&Number(B.value?.maxSeriesLength??0)>1);Xe(()=>V.value,e=>{e||ie({componentName:`VueUiQuickChart`,type:`dataset`,debug:lr.value})},{immediate:!0});let{isPrinting:Ar,isImaging:jr,generatePdf:Mr,generateImage:Nr}=ye({elementId:`${V.value}_${k.value}`,fileName:P.value.title||V.value,options:P.value.userOptionsPrint}),Pr=m(()=>P.value.showUserOptions&&!P.value.title),H=x({width:P.value.width,height:P.value.height}),Fr=x({showTooltip:P.value.showTooltip});Xe(P,()=>{Fr.value={showTooltip:P.value.showTooltip}},{immediate:!0});let Ir=Je(null),Lr=Je(null);qe(()=>{qn.value=!0,ir(),cr.start(),Rr(),or()});function Rr(){if(me(D.dataset)||(gr.value=P.value.loading),P.value.responsive){let e=Ae(()=>{let{width:e,height:t}=je({chart:O.value,title:P.value.title?Rn.value:null,legend:P.value.showLegend?zn.value:null,slicer:kr.value?Bn.value:null,source:Un.value,noTitle:Wn.value});requestAnimationFrame(()=>{H.value.width=e,H.value.height=t,sr()})});Ir.value&&(Lr.value&&Ir.value.unobserve(Lr.value),Ir.value.disconnect()),Ir.value=new ResizeObserver(e),Lr.value=O.value.parentNode,Ir.value.observe(Lr.value)}gi(),sr()}Ke(()=>{cr.stop(),ui(),Pi(),Ir.value&&(Lr.value&&Ir.value.unobserve(Lr.value),Ir.value.disconnect(),Ir.value=null,Lr.value=null)});let zr=m(()=>{switch(V.value){case E.LINE:return`0 0 ${H.value.width<=0?10:H.value.width} ${H.value.height<=0?10:H.value.height}`;case E.BAR:return`0 0 ${H.value.width<=0?10:H.value.width} ${H.value.height<=0?10:H.value.height}`;case E.DONUT:return`0 0 ${H.value.width<=0?10:H.value.width} ${H.value.height<=0?10:H.value.height}`;default:return`0 0 ${H.value.width<=0?10:H.value.width} ${H.value.height<=0?10:H.value.height}`}});function Br(e){return[...e].map(e=>e.value).reduce((e,t)=>e+t,0)}function Vr(e){return P.value.blurOnHover&&![null,void 0].includes(j.value)&&j.value!==e?`url(#blur_${k.value})`:``}function Hr(){M.value.length?M.value=[]:V.value===E.DONUT?W.value.legend.forEach(e=>{M.value.push(e.id)}):V.value===E.LINE?Z.value.legend.forEach(e=>{M.value.push(e.id)}):V.value===E.BAR&&Q.value.legend.forEach(e=>{M.value.push(e.id)}),V.value===E.DONUT?z(`selectLegend`,W.value.dataset):V.value===E.LINE?z(`selectLegend`,Z.value.dataset):V.value===E.BAR&&z(`selectLegend`,Q.value.dataset)}function Ur(e,t){M.value.includes(e)?M.value=M.value.filter(t=>t!==e):M.value.length<t&&M.value.push(e)}let Wr=x(null),Gr=x(null),Kr=x(!1);function qr(e,t){Kr.value=!0;let n=e.value,r=Er.value.dataset.find((t,n)=>e.id===`donut_${n}`).VALUE;if(M.value.includes(e.id)){M.value=M.value.filter(t=>t!==e.id);function t(){n>r?(Kr.value=!1,cancelAnimationFrame(Gr.value),B.value={...B.value,dataset:B.value.dataset.map((t,n)=>e.id===`donut_${n}`?{...t,value:r,VALUE:r}:t)},z(`selectLegend`,W.value.dataset)):(n+=r*.025,B.value={...B.value,dataset:B.value.dataset.map((t,r)=>e.id===`donut_${r}`?{...t,value:n,VALUE:n}:t)},Gr.value=requestAnimationFrame(t))}t()}else if(t.length>1){function t(){n<r/100?(Kr.value=!1,cancelAnimationFrame(Wr.value),M.value.push(e.id),B.value={...B.value,dataset:B.value.dataset.map((t,n)=>e.id===`donut_${n}`?{...t,value:0,VALUE:0}:t)},z(`selectLegend`,W.value.dataset)):(n/=1.1,B.value={...B.value,dataset:B.value.dataset.map((t,r)=>e.id===`donut_${r}`?{...t,value:n,VALUE:n}:t)},Wr.value=requestAnimationFrame(t))}t()}else z(`selectLegend`,W.value.dataset)}let U=x(null);function Jr(e){U.value=e}let Yr=m(()=>P.value.donutThicknessRatio<.01?.01:P.value.donutThicknessRatio>.4?.4:P.value.donutThicknessRatio),W=m(()=>{if(V.value!==E.DONUT)return null;let e=B.value.dataset.map((e,t)=>({...e,value:e.VALUE||e.DATA||e.SERIE||e.VALUES||e.NUM||0,name:e.NAME||e.DESCRIPTION||e.TITLE||e.LABEL||`Serie ${t}`,id:`donut_${t}`})).map((e,t)=>({...e,color:e.COLOR?te(e.COLOR):Tr.value[t+P.value.paletteStartIndex]||s[t+P.value.paletteStartIndex]||s[(t+P.value.paletteStartIndex)%s.length],immutableValue:e.value}));function t(e,t){return a({v:isNaN(e.value/Br(t))?0:e.value/Br(t)*100,s:`%`,r:P.value.dataLabelRoundingPercentage})}function n(e){return e.proportion*100>P.value.donutHideLabelUnderPercentage}function r(e,t){let n=Er.value.dataset.find((t,n)=>`donut_${n}`===e).VALUE;return Math.abs(String(Number(n.toFixed(0))).length-String(Number(t.toFixed(0))).length)}function i({datapoint:t,seriesIndex:n,triggerMode:r=`pointer`}){Vn.value={datapoint:t,seriesIndex:n,config:P.value,dataset:e},j.value=t.id,I.value=n,L.value=r;let i=P.value.tooltipCustomFormat;if(P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:t,seriesIndex:n}),o(i)&&de(()=>i({datapoint:t,seriesIndex:n,series:e,config:P.value})))Hn.value=i({datapoint:t,seriesIndex:n,series:e,config:P.value});else{let e=``;e+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${P.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`,e+=`<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="${t.color}"/></svg>`,e+=`<b>${f(P.value.formatter,t.value,a({p:P.value.valuePrefix,v:t.value,s:P.value.valueSuffix,r:P.value.dataLabelRoundingValue}),{datapoint:t,seriesIndex:n})}</b>`,e+=`<span>(${a({v:t.proportion*100,s:`%`,r:P.value.dataLabelRoundingPercentage})})</span></div>`,Hn.value=`<div>${e}</div>`}A.value=!0}function l({datapoint:e,seriesIndex:t}){P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:t}),A.value=!1,j.value=null,U.value=null,I.value=null,L.value=`pointer`}function ee({datapoint:e,seriesIndex:t}){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:t}),z(`selectDatapoint`,e)}let u={centerX:H.value.width/2,centerY:H.value.height/2},ne=e.filter(e=>!M.value.includes(e.id)).map(e=>e.value||0).reduce((e,t)=>e+t,0),re=e.map((e,t)=>({...e,proportion:(e.value||0)/ne,value:e.value||0,absoluteValue:Er.value.dataset.find((t,n)=>`donut_${n}`===e.id).VALUE,shape:`circle`})),ie=H.value.width/2,d=H.value.height/2,ae=H.value.height*P.value.donutRadiusRatio;return{dataset:re.filter(e=>!M.value.includes(e.id)),legend:re,drawingArea:u,displayArcPercentage:t,isArcBigEnough:n,useTooltip:i,killTooltip:l,selectDatapoint:ee,getSpaces:r,total:ne,cx:ie,cy:d,radius:ae,chart:c({series:e.filter(e=>!M.value.includes(e.id))},ie,d,ae,ae,1.99999,2,1,360,105.25,H.value.height*Yr.value)}}),G=x({start:0,end:B.value.maxSeriesLength}),Xr=x({...G.value}),Zr=x(null),K=x(!1),Qr=x(!1),$r=x(!1),q=x(!1),ei=x(!1),ti=x(null),J=x(null),Y=x(null),ni=x(!1),ri=x({time:0,x:0,y:0,pointerType:null}),ii={show:!1,selection:{fill:`#2D353C`,stroke:`transparent`,fillOpacity:.1,strokeOpacity:.5,strokeWidth:1,strokeDasharray:0}},ai=m(()=>{let e=P.value.dragToZoom??{};return{...ii,...e,selection:{...ii.selection,...e.selection??{}}}}),X=m(()=>Or.value&&ai.value.show&&K.value&&di()>1&&!mr.value),oi=null,si={};function ci(e,t=G.value){if(!e||typeof e!=`object`)return null;let n=e.start!==void 0&&e.start!==null,r=e.end!==void 0&&e.end!==null;if(!n&&!r)return null;let i=Number(n?e.start:t.start),a=Number(r?e.end:t.end);return!Number.isFinite(i)||!Number.isFinite(a)?null:{start:i,end:a}}function li(e){let t=ci(e);t&&z(`update:zoomState`,t)}function ui(){oi&&=(cancelAnimationFrame(oi),null),si={}}function di(){let e=Number(B.value?.maxSeriesLength);return Number.isFinite(e)?Math.max(0,e):0}function fi(e,t=G.value.start){let n=di();if(n<=0)return 0;let r=Math.max(0,Math.min(Number(t)||0,n-1)),i=Number(e);return Number.isFinite(i)?i>n?n:i<=r?Math.min(r+1,n):Math.max(0,i):Math.min(r+1,n)}function pi(){let e=di();if(e<=0){G.value={start:0,end:0},Xr.value={...G.value},Zr.value&&Zr.value.setRangeValues(0,0);return}let t=Number(G.value.start),n=Number(G.value.end);Number.isFinite(t)||(t=0),Number.isFinite(n)||(n=e),t=Math.max(0,Math.min(t,e-1)),n=Math.max(t+1,Math.min(n,e)),G.value={start:t,end:n},Xr.value={start:t,end:n},Zr.value&&Zr.value.setRangeValues(t,n)}function mi(e){if(!Or.value)return null;let t=ci(e);return t?((t.start!==Number(G.value.start)||t.end!==Number(G.value.end))&&(ui(),G.value={start:t.start,end:t.end},Xr.value={...G.value},pi(),sr()),{start:Number(G.value.start),end:Number(G.value.end)}):null}function hi(e){let t=mi(e);return t?(li(t),t):null}async function gi({applyControlledZoom:e=!0}={}){if(!Qr.value){if(!Or.value){K.value=!1;return}Qr.value=!0;try{await We(),await We();let{zoomStartIndex:t,zoomEndIndex:n}=P.value,r=di();if(r<=0){G.value={start:0,end:0},Xr.value={...G.value},K.value=!1;return}let i=t==null?0:Number(t),a=n==null?r:fi(Number(n)+1,i);if(e&&ci(D.zoomState)){let e=ci(D.zoomState);i=e.start,a=e.end}$r.value=!0,G.value={start:i,end:a},Xr.value={start:i,end:a},pi(),K.value=!0,await We(),Zr.value&&Zr.value.setRangeValues(G.value.start,G.value.end)}finally{queueMicrotask(()=>{$r.value=!1}),Qr.value=!1,sr()}}}async function _i({applyControlledZoom:e=!1,publish:t=!1}={}){ui(),await gi({applyControlledZoom:e}),t&&(li({start:Number(G.value.start),end:Number(G.value.end)}),z(`zoomReset`))}function vi(e){si={...si,...e},oi&&cancelAnimationFrame(oi),oi=requestAnimationFrame(()=>{let e={...G.value,...si};si={},oi=null,G.value=e,Xr.value={...e},pi(),li({start:Number(G.value.start),end:Number(G.value.end)}),sr()})}function yi(e){if(Qr.value||$r.value)return;let t=Number(e);Number.isFinite(t)&&(z(`zoomStart`,{index:t,isZoom:t!==0}),(t!==G.value.start||si.end!==void 0)&&vi({start:t}))}function bi(e){if(Qr.value||$r.value)return;let t=si.start===void 0?G.value.start:si.start,n=fi(Number(e),t);z(`zoomEnd`,{index:n,isZoom:n!==di()}),(n!==G.value.end||si.start!==void 0)&&vi({end:n})}Xe([()=>D.zoomState,Or,()=>Number(B.value?.maxSeriesLength??0)],async([e,t,n])=>{if(!(!t||n<=0||!e)){if(!K.value){await gi({applyControlledZoom:!0});return}mi(e)}},{deep:!0,immediate:!0}),Xe(Er,async e=>{if(!e){K.value=!1;return}let t=B.value?.type,n=Number(B.value?.maxSeriesLength??0);B.value=e;let r=e.type,i=Number(e.maxSeriesLength??0);if(![E.BAR,E.LINE].includes(r)){ui(),K.value=!1,sr();return}t!==r||n!==i?(ui(),K.value=!1,G.value={start:0,end:i},Xr.value={...G.value},Kn.value+=1,await We(),await gi({applyControlledZoom:!0})):D.zoomState&&mi(D.zoomState),sr()},{deep:!0});let xi=m(()=>{if(!P.value.zoomMinimap.show||V.value===E.DONUT)return[];let e=[];rt(B.value.dataset)&&(e=B.value.dataset),it(B.value.dataset)&&(e=B.value.dataset.map((e,t)=>({values:e.VALUE||e.DATA||e.SERIE||e.SERIES||e.VALUES||e.NUM||0,id:V.value===E.LINE?`line_${t}`:`bar_${t}`})).filter(e=>!M.value.includes(e.id)));let t=rt(e)?e.length:Math.max(...e.map(e=>e.values.length)),n=[];if(rt(e))n=e;else for(let r=0;r<t;r+=1)n.push(e.map(e=>e.values[r]||0).reduce((e,t)=>(e||0)+(t||0),0));let r=Math.min(...n);return n.map(e=>e+(r<0?Math.abs(r):0))});function Si(){let e=0;return Xn.value&&(e=Array.from(Xn.value.querySelectorAll(`text`)).reduce((e,t)=>{let n=t.getComputedTextLength();return n>e?n:e},0)),e+4}let Ci=x(0),wi=Ae(e=>{Ci.value=e},100);Ze(e=>{let t=N.value;if(!t)return;let n=new ResizeObserver(e=>{wi(e[0].contentRect.height)});n.observe(t),e(()=>n.disconnect())}),Ke(()=>{Ci.value=0});let Ti=m(()=>{let e=0;return N.value&&(e=Ci.value),0+e}),Z=m(()=>{if(V.value!==E.LINE)return null;tr.value;let e={height:H.value.height,width:H.value.width},t=Si();if(N.value){let e=N.value.getBBox().x;e<0&&(t+=Math.abs(e))}let n={left:t+P.value.xyPaddingLeft,top:P.value.xyPaddingTop,right:e.width-P.value.xyPaddingRight,bottom:e.height-P.value.xyPaddingBottom-Ti.value,width:Math.max(10,e.width-P.value.xyPaddingLeft-P.value.xyPaddingRight-t),height:Math.max(10,e.height-P.value.xyPaddingTop-P.value.xyPaddingBottom-Ti.value)},r=[];rt(B.value.dataset)&&(r=[{values:B.value.dataset.slice(G.value.start,G.value.end),absoluteValues:B.value.dataset,absoluteIndices:B.value.dataset.map((e,t)=>t).slice(G.value.start,G.value.end),name:P.value.title,color:Tr.value[P.value.paletteStartIndex]||s[P.value.paletteStartIndex],id:`line_0`}]),it(B.value.dataset)&&(r=B.value.dataset.map((e,t)=>({...e,values:e.VALUE||e.DATA||e.SERIE||e.SERIES||e.VALUES||e.NUM||0,name:e.NAME||e.DESCRIPTION||e.TITLE||e.LABEL||`Serie ${t}`,id:`line_${t}`})).map((e,t)=>({...e,color:e.COLOR?te(e.COLOR):Tr.value[t+P.value.paletteStartIndex]||s[t+P.value.paletteStartIndex]||s[(t+P.value.paletteStartIndex)%s.length],values:e.values.slice(G.value.start,G.value.end),absoluteValues:e.values,absoluteIndices:e.values.map((e,t)=>t).slice(G.value.start,G.value.end)})));let i={max:Math.max(...r.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values)),min:Math.min(...r.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values)),maxSeries:Math.max(...r.map(e=>e.values.length))},c=i.max===i.min?re(Math.min(i.min,0),i.min===0?1:Math.max(i.min,0),P.value.xyScaleSegments):re(i.min<0?i.min:0,i.max<0?0:i.max,P.value.xyScaleSegments),l=i.min<0?Math.abs(i.min):0,ee=i.max<0?n.top:n.bottom-l/(c.max+l)*n.height,u=n.width/i.maxSeries,ne=c.ticks.map(e=>({y:n.bottom-n.height*((e+l)/(c.max+l)),x:n.left-8,value:e})),ie=r.map((e,t)=>({...e,shape:`circle`,coordinates:e.values.map((e,t)=>({x:n.left+u*(t+1)-u/2,y:n.bottom-(e+l)/(c.max+l)*n.height,value:e}))})).map(e=>{let t=[];return e.coordinates.forEach(e=>{t.push(`${e.x},${e.y} `)}),{...e,linePath:t.join(` `)}});function d(e){return r.map(t=>({...t,value:t.values[e],absoluteIndex:t.absoluteIndices[e]})).filter(e=>!M.value.includes(e.id))}function ae(e,t=`pointer`){if(q.value&&t===`pointer`)return;j.value=e,U.value=e,I.value=e,L.value=t;let n=d(e);Vn.value={datapoint:n,seriesIndex:e,config:P.value,dataset:r};let i=P.value.tooltipCustomFormat;if(P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:n,seriesIndex:e+G.value.start}),o(i)&&de(()=>i({datapoint:n,seriesIndex:e,series:r,config:P.value})))Hn.value=i({datapoint:n,seriesIndex:e,series:r,config:P.value});else{let e=``;$.value[n[0].absoluteIndex]&&(e+=`<div style="border-bottom:1px solid ${P.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${$.value[n[0].absoluteIndex].text}</div>`),n.forEach((t,n)=>{e+=`
2
2
  <div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
3
3
  <svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>
4
4
  <span>${t.name}:</span>
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./tableIntegration-CNoJ1CIY.js";import{n as r,t as i}from"./annotationSlots-BRR85CqJ.js";import{n as a,t as o}from"./userOptionsSlots-DYuo-E5m.js";import{$ as s,D as ee,Dt as te,Ht as c,Jt as l,Lt as ne,M as re,S as ie,X as ae,Yt as oe,Zt as se,at as u,b as ce,i as le,in as ue,nn as de,nt as fe,pt as pe,t as me,w as he,yt as ge,zt as _e}from"./lib-zDxoqrgo.js";import{n as ve}from"./useHints-BH9r_0Vd.js";import{t as ye}from"./useConfig-CKdzPrcf.js";import{t as be}from"./usePrinter-CnyKPIFM.js";import{n as xe,t as Se}from"./BaseScanner-8NdoBs7B.js";import{t as Ce}from"./useNestedProp-CT9phgWx.js";import{t as we}from"./useThemeCheck-BKNRbGeC.js";import{t as Te}from"./useChartExport-DtPNpc9M.js";import{n as Ee}from"./Title-BRAjxtjG.js";import{t as De}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{l as Oe,t as ke}from"./useResponsive-D2CPcpda.js";import{t as Ae}from"./DefGrad-DKMq1REY.js";import{t as je}from"./BaseLegendToggle-Dn_tNvn4.js";import{t as Me}from"./A11yDataTable-DWNlWXzs.js";import{t as Ne}from"./useUserOptionState-CXlFnwPv.js";import{t as Pe}from"./useChartAccessibility-DOMuYJfm.js";import{t as Fe}from"./chartImage-NwZO-elv.js";import{t as Ie}from"./Legend-DokTll4u.js";import{t as Le}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Re}from"./vue_ui_radar-68iK9Fam.js";import{Fragment as d,Teleport as ze,computed as f,createBlock as p,createCommentVNode as m,createElementBlock as h,createElementVNode as g,createSlots as Be,createTextVNode as Ve,createVNode as He,defineAsyncComponent as _,guardReactiveProps as v,mergeProps as Ue,nextTick as We,normalizeClass as Ge,normalizeProps as y,normalizeStyle as b,onBeforeUnmount as Ke,onMounted as qe,openBlock as x,ref as S,renderList as C,renderSlot as w,resolveDynamicComponent as Je,shallowRef as Ye,toDisplayString as T,toRefs as Xe,unref as E,watch as Ze,withCtx as D}from"vue";var Qe=/* @__PURE__ */ e({default:()=>kt}),$e=[`id`],et=[`id`],tt=[`id`],nt={style:{position:`relative`}},rt=[`xmlns`,`aria-describedby`,`viewBox`],it=[`width`,`height`],at={key:1},ot=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],st={key:0,style:{"pointer-events":`none`}},ct=[`d`,`stroke`,`stroke-width`],lt=[`d`,`stroke`,`stroke-width`],ut={key:2},dt=[`x`,`y`,`text-anchor`,`font-size`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],ft=[`points`,`stroke`,`stroke-width`],pt=[`points`,`stroke`,`stroke-width`,`fill`],mt=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],ht={key:4},gt=[`onMouseenter`,`onMouseleave`,`onClick`],_t=[`cx`,`cy`,`r`],vt=[`cx`,`cy`,`fill`,`r`,`stroke`],yt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},bt={key:5,class:`vue-data-ui-watermark`},xt=[`id`],St=[`onClick`],Ct={class:`vue-data-ui-legend-item`},wt=[`stroke`,`stroke-width`,`stroke-dasharray`],Tt={key:0,style:{"max-width":`200px`,margin:`0 auto`}},Et={class:`vue-ui-radar-tooltip-datalabel`,style:{width:`100%`}},Dt={class:`vue-ui-radar-tooltip-datalabel-name`},Ot={key:0},kt=/*#__PURE__*/ De({__name:`vue-ui-radar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:De,emit:Qe}){let kt=_(()=>import(`./Tooltip-BUXB0i6z.js`)),At=_(()=>import(`./BaseIcon-Cz30ODFA.js`).then(e=>e.n)),jt=_(()=>import(`./vue-ui-sparkbar-CTXIgjmP.js`).then(e=>e.n)),Mt=_(()=>import(`./vue-ui-accordion-Dy5OVFKr.js`).then(e=>e.n)),Nt=_(()=>import(`./DataTable-DSUA5M9p.js`)),Pt=_(()=>import(`./PenAndPaper-DvJJaeU2.js`).then(e=>e.t)),Ft=_(()=>import(`./UserOptions-D65t74CM.js`).then(e=>e.n)),It=_(()=>import(`./PackageVersion-D6pKL176.js`).then(e=>e.t)),Lt=_(()=>import(`./BaseDraggableDialog-T1gEsQid.js`).then(e=>e.n)),{vue_ui_radar:Rt}=ye(),{isThemeValid:zt,warnInvalidTheme:Bt}=we(),O=e,Vt=f(()=>!!O.dataset&&Object.keys(O.dataset).length),k=S(ae()),Ht=S(!1),Ut=S(``),Wt=S(0),A=S(null),Gt=S(null),Kt=S(null),qt=S(null),Jt=S(null),Yt=S(0),Xt=S(0),Zt=S(0),Qt=S(!1),$t=S(null),en=S(null),j=S(null),tn=S({x:0,y:0}),nn=S(`pointer`),rn=S(!1),M=S(dn()),N=f(()=>M.value.userOptions),P=f(()=>M.value.style.chart.layout.labels),F=f(()=>M.value.style.chart.layout),I=f(()=>M.value.style.chart.tooltip),L=f(()=>M.value.style.chart);ve({config:()=>M.value,dataset:()=>O.dataset,component:`VueUiRadar`,rules:[{test:e=>e?.categories&&e.categories.length===0,message:[`👀 There are no categories in your dataset. Consider:`,``,`▶️ Adding categories...`]},{test:e=>e?.series&&e.series.length===0,message:[`👀 There are no series in your dataset. Consider:`,``,`▶️ Adding series...`]},{test:e=>e?.categories&&e.categories.length>3,message:[`👀 The number of categories > 3, the chart might become hard to read. Consider:`,``,`▶️ Using several instances of the component to display related categories.`,``,`▶️ Adding filters to allow users to choose a maximum number of categories.`]},{test:e=>e?.series&&e.series.length>12,message:[`👀 The number of series is > 12. Consider:`,``,`▶️ Using several instances of the component to distribute the series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``]}]});let R=f(()=>M.value.userOptions.useCursorPointer),an=f(()=>ue({defaultConfig:{userOptions:{show:!1},table:{show:!1},useCssAnimation:!1,style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A90`},labels:{dataLabels:{show:!1}},outerPolygon:{stroke:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}}},userConfig:M.value.skeletonConfig??{}})),{loading:on,FINAL_DATASET:z}=xe({...Xe(O),FINAL_CONFIG:M,prepareConfig:dn,callback:()=>{Promise.resolve().then(async()=>{await We(),W.value.showTable=M.value.table.show})},skeletonDataset:O.config?.skeletonDataset??{categories:[{name:`_`,color:`#6A6A6A`}],series:[{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1}]},skeletonConfig:ue({defaultConfig:M.value,userConfig:an.value})}),{userOptionsVisible:sn,setUserOptionsVisibility:cn,keepUserOptionState:ln}=Ne({config:M.value}),{svgRef:B}=Pe({config:L.value.title});function un(e){return{...e,style:{...e.style,chart:{...e.style.chart,layout:{...e.style.chart.layout,grid:{rotate:0,...e.style.chart.layout.grid},labels:{...e.style.chart.layout.labels,dataLabels:{offset:0,...e.style.chart.layout.labels.dataLabels}}}}}}}function dn(){let e=un(Ce({userConfig:O.config,defaultConfig:Rt})),t=e.theme;if(!t)return e;if(!zt.value(e))return Bt(e),e;let n=Ce({userConfig:Re[t]||O.config,defaultConfig:e}),r=Ce({userConfig:O.config,defaultConfig:n});return{...r,customPalette:r.customPalette.length?r.customPalette:de[t]||c}}let fn=se(O.config);Ze(()=>O.config,(e,t)=>{let n=se(e),r=n!==fn;fn=n;let i=dn();if(!r){M.value.style.chart.tooltip=i.style.chart.tooltip,W.value.showTooltip=M.value.style.chart.tooltip.show;return}M.value=i,sn.value=!M.value.userOptions.showOnChartHover,pn(),Yt.value+=1,Xt.value+=1,Zt.value+=1,W.value.dataLabels.show=P.value.dataLabels.show,W.value.showTable=M.value.table.show,W.value.showTooltip=I.value?I.value.show:!1},{deep:!0});let V=Ye(null),H=Ye(null),U=f(()=>M.value.debug);function pn(){if(_e(O.dataset)&&u({componentName:`VueUiRadar`,type:`dataset`,debug:U.value}),M.value.responsive){let e=Oe(()=>{let{width:e,height:t}=ke({chart:A.value,title:L.value.title.text?Gt.value:null,legend:L.value.legend.show?Kt.value:null,source:qt.value,noTitle:Jt.value});requestAnimationFrame(()=>{G.value.width=e,G.value.height=t,Hn()})});V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect()),V.value=new ResizeObserver(e),H.value=A.value.parentNode,V.value.observe(H.value)}Hn()}qe(()=>{Qt.value=!0,pn()}),Ke(()=>{V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect())});let{isPrinting:mn,isImaging:hn,generatePdf:gn,generateImage:_n}=be({elementId:`vue-ui-radar_${k.value}`,fileName:L.value.title.text||`vue-ui-radar`,options:M.value.userOptions.print}),vn=f(()=>M.value.userOptions.show&&!L.value.title.text),yn=f(()=>he(M.value.customPalette)),W=S({dataLabels:{show:P.value.dataLabels.show},showTable:M.value.table.show,showTooltip:I.value.show}),bn=f(()=>({style:{backgroundColor:`#FFFFFF00`,animation:{show:I.value.animation.show,animationFrames:I.value.animation.animationFrames},labels:{fontSize:I.value.fontSize,name:{color:I.value.color}},gutter:{backgroundColor:`#CCCCCC`,opacity:30}}})),G=S({height:312,width:512}),xn=Qe,K=S([]),Sn=S(null),q=S(!1);function Cn(){K.value.length?K.value=[]:Z.value.forEach((e,t)=>{K.value.push(t)}),wn()}function wn(){xn(`selectLegend`,Z.value.filter((e,t)=>!K.value.includes(t)).map(e=>({name:e.name,color:e.color,proportion:e.totalProportion})))}function Tn(e){q.value=!0,K.value.includes(e)?(Sn.value=e,K.value=K.value.filter(t=>t!==e),setTimeout(()=>{q.value=!1,Sn.value=null},500)):(K.value.push(e),setTimeout(()=>{q.value=!1},500)),wn()}function En(){return Z.value.map(e=>({name:e.name,color:e.color,proportion:e.totalProportion}))}function Dn(){let e=z.value;if([null,void 0].includes(e?.categories)){u({componentName:`VueUiRadar`,type:`dataset`,debug:U.value}),u({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`categories ({ name: string; prefix?: string; suffix?: string}[])`,debug:U.value});return}e.categories.length===0?u({componentName:`VueUiRadar`,type:`datasetAttributeEmpty`,property:`categories`,debug:U.value}):U.value&&e.categories.forEach((e,t)=>{ge({datasetObject:e,requiredAttributes:[`name`]}).forEach(e=>{u({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`category.${e} at index ${t}`,index:t})})}),[null,void 0].includes(e?.series)?u({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`series ({ name: string; values: number[]; color?: string; target: number}[])`,debug:U.value}):U.value&&e.series.forEach((e,t)=>{ge({datasetObject:e,requiredAttributes:[`name`,`values`,`target`]}).forEach(e=>{u({componentName:`VueUiRadar`,type:`datasetSerieAttribute`,key:`series`,property:e,index:t})})})}Ze(()=>z.value,()=>Dn(),{deep:!0,immediate:!0});let J=f(()=>{let e=Array.isArray(z.value?.categories)?z.value.categories:[],t=yn.value??c;return e.map((e,n)=>({name:e?.name??``,categoryId:`radar_category_${k.value}_${n}`,color:ie(e?.color)||t[n]||c[n%c.length],prefix:e?.prefix??``,suffix:e?.suffix??``}))}),Y=f(()=>z.value.series.map((e,t)=>({...e,color:ie(e.color)||yn.value[t]||c[t]||c[t%c.length],serieId:`radar_serie_${k.value}_${t}`,formatter:e.formatter||null,absoluteIndex:t})));function On(e){return Y.value.length?Z.value.find(t=>t.name===e)||(U.value&&console.warn(`VueUiRadar - Series name not found "${e}"`),null):(U.value&&console.warn(`VueUiRadar - There are no series to show.`),null)}function kn(e){let t=On(e);t!==null&&K.value.includes(t.absoluteIndex)&&Tn(t.absoluteIndex)}function An(e){let t=On(e);t!==null&&(K.value.includes(t.absoluteIndex)||Tn(t.absoluteIndex))}let jn=f(()=>Math.max(0,...Y.value.flatMap(e=>e.values)));function Mn(e){return F.value.scaleToAxisMax?Math.max(1,e.target||0,...e.values):e.target||jn.value||1}let Nn=f(()=>Y.value.map((e,t)=>{let n=Rn.value.coordinates[t];return Un({centerX:G.value.width/2,centerY:G.value.height/2,apexX:n.x,apexY:n.y,proportion:(e.target||0)/Mn(e)})})),Pn=f(()=>Y.value.length),Fn=f(()=>Math.min(G.value.width,G.value.height)/3),In=f(()=>{let e=Number(F.value.plots.radius??0);return Math.max(Number.isFinite(e)?e*2.5:0,10)}),Ln=f(()=>{let e=Number(F.value.grid.rotation??0);return Number.isFinite(e)?e*Math.PI/180:0}),Rn=f(()=>re({plot:{x:G.value.width/2,y:G.value.height/2},radius:Fn.value,sides:Pn.value,rotation:Ln.value})),zn=f(()=>{let e=[];for(let t=0;t<Fn.value;t+=Fn.value/F.value.grid.graduations)e.push(t);return e}),X=f(()=>Rn.value.coordinates.map((e,t)=>{let n=Y.value[t],r=Y.value[t].values.map(t=>Un({centerX:G.value.width/2,centerY:G.value.height/2,apexX:e.x,apexY:e.y,proportion:t/Mn(n)}));return{...e,...n,plots:r}}).map(e=>({...e,labelX:Bn(e).x,labelY:Bn(e).y,labelAnchor:Bn(e).anchor})));function Bn({x:e,y:t}){let n=G.value.width/2,r=G.value.height/2,i=e-n,a=t-r,o=Math.hypot(i,a),s=Number(P.value.dataLabels.offset??0),ee=20+(Number.isFinite(s)?s:0);if(!o)return{x:e,y:t,anchor:`middle`};let te=i/o,c=a/o,l=`middle`;return te>.01?l=`start`:te<-.01&&(l=`end`),{x:e+te*ee,y:t+c*ee,anchor:l}}let Vn=f({get:()=>P.value.dataLabels.fontSize,set:e=>e}),{autoSizeLabels:Hn}=Le({svgRef:B,fontSize:P.value.dataLabels.fontSize,minFontSize:6,sizeRef:Vn,labelClass:`.vue-ui-radar-apex-label`});function Un({centerX:e,centerY:t,apexX:n,apexY:r,proportion:i}){return{x:e+(n-e)*i,y:t+(r-t)*i}}let Z=f(()=>{let e=Y.value.map((e,t)=>e.values.map(t=>t/(e.target||jn.value)));return J.value.map((t,n)=>{let r=ce(e.map(e=>e[n]).reduce((e,t)=>e+t,0)/Y.value.length);return{...t,absoluteIndex:n,totalProportion:r,shape:`circle`,opacity:K.value.includes(n)?.5:1,segregate:()=>Tn(n),isSegregated:K.value.includes(n),display:`${t.name}: ${s({v:(r??0)*100,s:`%`,r:L.value.legend.roundingPercentage})}`}})}),Wn=f(()=>({cy:`radar-div-legend`,backgroundColor:L.value.legend.backgroundColor,color:L.value.legend.color,fontSize:L.value.legend.fontSize,paddingBottom:12,fontWeight:L.value.legend.bold?`bold`:``})),Q=f(()=>{let e=[{name:M.value.translations.datapoint,color:``},{name:M.value.translations.target,color:``},...Z.value];return{head:e,body:z.value.series.map(e=>[e.name,le(e.formatter,e.target,s({p:e.prefix,v:e.target,s:e.suffix,r:M.value.table.td.roundingValue})),...e.values.map((t,n)=>`${le(e.formatter,t,s({p:J.value[n]?.prefix??``,v:t,s:J.value[n]?.suffix??``,r:M.value.table.td.roundingValue}))} (${isNaN(t/e.target)?``:s({v:t/e.target*100,s:`%`,r:M.value.table.td.roundingPercentage})})`)]),config:{th:{backgroundColor:M.value.table.th.backgroundColor,color:M.value.table.th.color,outline:M.value.table.th.outline},td:{backgroundColor:M.value.table.td.backgroundColor,color:M.value.table.td.color,outline:M.value.table.td.outline},breakpoint:M.value.table.responsiveBreakpoint},colNames:e}}),Gn=S(null),Kn=S([]),qn=S(null);function Jn(e,t){Ht.value=!1,Gn.value=null,j.value=null,nn.value=`pointer`,M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function Yn(e,t){M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:e,seriesIndex:t})}function Xn(e,t,n=`pointer`){M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:e,seriesIndex:t}),nn.value=n,j.value=t;let r=J.value.slice();Kn.value=[],Gn.value=t,Ht.value=!0,qn.value={datapoint:e,seriesIndex:t,series:{categories:r,datapoints:Y.value,radar:X.value},config:M.value};let i=I.value.customFormat;if(te(i)&&pe(()=>i({seriesIndex:t,datapoint:e,series:{categories:r,datapoints:Y.value,radar:X.value},config:M.value}))){Ut.value=i({seriesIndex:t,datapoint:e,series:{categories:r,datapoints:Y.value,radar:X.value},config:M.value});return}Ut.value=`<div style="width:100%;text-align:center;border-bottom:1px solid ${I.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`;for(let t=0;t<e.values.length;t+=1)if(!K.value.includes(t)){let n=r[t],i=e.values[t],a=isNaN(i/e.target)?0:i/e.target*100,o=le(e.formatter,i,s({p:J.value[t].prefix,v:i,s:J.value[t].suffix,r:I.value.roundingValue}),{datapoint:e}),ee=s({v:a,s:`%`,r:I.value.roundingPercentage}),te=I.value.showValue&&I.value.showPercentage?`${o} (${ee})`:I.value.showValue&&!I.value.showPercentage?o:!I.value.showValue&&I.value.showPercentage?`${ee}`:``;Kn.value.push({name:n?.name??`#${t+1}`,value:e.values[t]/e.target*100,color:n?.color,suffix:te,prefix:``,rounding:I.value.roundingPercentage,formatter:e.formatter})}}function Zn(e=null){We(()=>{let t=[[L.value.title.text],[L.value.title.subtitle.text],[``]],n=[[``],[M.value.translations.target],...Z.value.flatMap(e=>[[e.name],[`%`]])],r=z.value.series.map((e,t)=>[e.name,e.target,...e.values.flatMap(t=>[t,isNaN(t/e.target)?``:t/e.target*100])]),i=t.concat([n]).concat(r),a=ee(i);e?e(a):fe({csvContent:a,title:L.value.title.text||`vue-ui-radar`})})}let $=S(!1);function Qn(e){$.value=e,Wt.value+=1}function $n(){W.value.showTable=!W.value.showTable}function er(){W.value.showTooltip=!W.value.showTooltip}let tr=S(!1);function nr(){tr.value=!tr.value}let rr=Fe(A,()=>L.value.title.text),ir=f(()=>n({config:M,style:L,mutableConfig:W,dialog:Lt,accordion:Mt,isFullscreen:$,parent:A,maxWidth:800,isCursorPointer:R}));Ze(()=>W.value.showTable,e=>t(e,M,$t));function ar(){W.value.showTable=!1,en.value&&en.value.setTableIconState(!1)}let or=f(()=>Z.value.map(e=>({...e,name:e.display}))),sr=f(()=>L.value.backgroundColor),cr=f(()=>L.value.legend),lr=f(()=>L.value.title),{isCallbackImaging:ur,isCallbackSvg:dr,generateSvg:fr,onGenerateImage:pr}=Te({svg:B,title:lr,legend:cr,legendItems:or,backgroundColor:sr,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:_n});async function mr(){if(xn(`copyAlt`,{config:M.value,dataset:X.value}),!M.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(M.value.userOptions.callbacks.altCopy({config:M.value,dataset:X.value}))}function hr(){j.value=null,rn.value=!0}function gr(){j.value=null,nn.value=`pointer`,Ht.value=!1,Gn.value=null,rn.value=!1}function _r(e){if(!Number.isFinite(e)||!B.value)return;let t=X.value[e];if(!t)return;let n=B.value.getBoundingClientRect();tn.value={x:n.left+t.labelX/G.value.width*n.width,y:n.top+t.labelY/G.value.height*n.height}}function vr(e){if(!B.value||tr.value||document.activeElement!==B.value||!X.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){j.value=null,nn.value=`pointer`,Ht.value=!1,Gn.value=null;return}if(r){if(j.value===null)return;let e=X.value[j.value];if(!e)return;Yn(e,j.value);return}let a=j.value;a===null||a<0||a>=X.value.length?a=n?0:X.value.length-1:n?(a+=1,a>=X.value.length&&(a=0)):t&&(--a,a<0&&(a=X.value.length-1));let o=X.value[a];o&&(j.value=a,_r(a),Xn(o,a,`keyboard`))}let yr=f(()=>({headers:Q.value?.colNames?.map(e=>e.name??e)??[],rows:Q.value?.body??[]}));return De({getData:En,getImage:rr,generatePdf:gn,generateCsv:Zn,generateImage:_n,generateSvg:fr,hideSeries:An,showSeries:kn,toggleTable:$n,toggleTooltip:er,toggleAnnotator:nr,toggleFullscreen:Qn,copyAlt:mr}),(e,t)=>(x(),h(`div`,{class:Ge(`vue-data-ui-component vue-ui-radar ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${M.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`radarChart`,ref:A,id:`vue-ui-radar_${k.value}`,style:b(`font-family:${M.value.style.fontFamily};width:100%; ${M.value.responsive?`height: 100%;`:``} text-align:center;background:${L.value.backgroundColor}`),onMouseenter:t[2]||=()=>E(cn)(!0),onMouseleave:t[3]||=()=>E(cn)(!1)},[g(`div`,{id:`chart-instructions-${k.value}`,class:`sr-only`},[g(`p`,null,T(M.value.a11y.translations.keyboardNavigation),1)],8,et),yr.value?.rows?.length?(x(),p(Me,{key:0,uid:k.value,head:yr.value.headers,body:yr.value.rows,notice:M.value.a11y.translations.tableAvailable,caption:M.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):m(``,!0),N.value.buttons.annotator?(x(),p(E(Pt),{key:1,svgRef:E(B),backgroundColor:L.value.backgroundColor,color:L.value.color,active:tr.value,isCursorPointer:R.value,palette:N.value.annotatorPalette,onClose:nr},Be({_:2},[C(E(i),t=>({name:t,fn:D(n=>[w(e.$slots,t,y(v(E(r)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):m(``,!0),vn.value?(x(),h(`div`,{key:2,ref_key:`noTitle`,ref:Jt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):m(``,!0),L.value.title.text?(x(),h(`div`,{key:3,ref_key:`chartTitle`,ref:Gt,style:`width:100%;background:transparent;padding-bottom:12px`},[(x(),p(Ee,{key:`title_${Yt.value}`,config:{title:{cy:`radar-div-title`,...L.value.title},subtitle:{cy:`radar-div-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],512)):m(``,!0),g(`div`,{id:`legend-top-${k.value}`},null,8,tt),N.value.show&&Vt.value&&(E(ln)||E(sn))?(x(),p(E(Ft),{ref_key:`userOptionsRef`,ref:en,key:`user_options_${Wt.value}`,backgroundColor:L.value.backgroundColor,color:L.value.color,isImaging:E(hn),isPrinting:E(mn),uid:k.value,hasTooltip:N.value.buttons.tooltip&&I.value.show,hasPdf:N.value.buttons.pdf,hasImg:N.value.buttons.img,hasSvg:N.value.buttons.svg,hasXls:N.value.buttons.csv,hasTable:N.value.buttons.table,hasFullscreen:N.value.buttons.fullscreen,hasAltCopy:N.value.buttons.altCopy,isFullscreen:$.value,isTooltip:W.value.showTooltip,titles:{...N.value.buttonTitles},chartElement:A.value,position:N.value.position,hasAnnotator:N.value.buttons.annotator,isAnnotation:tr.value,callbacks:N.value.callbacks,printScale:N.value.print.scale,tableDialog:M.value.table.useDialog,isCursorPointer:R.value,onToggleFullscreen:Qn,onGeneratePdf:E(gn),onGenerateCsv:Zn,onGenerateImage:E(pr),onGenerateSvg:E(fr),onToggleTable:$n,onToggleTooltip:er,onToggleAnnotator:nr,onCopyAlt:mr,style:b({visibility:E(ln)?E(sn)?`visible`:`hidden`:`visible`})},Be({_:2},[C(E(a)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:D(n=>[w(e.$slots,t,y(v(E(o)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):m(``,!0),g(`div`,nt,[(x(),h(`svg`,{ref_key:`svgRef`,ref:B,xmlns:E(me),"aria-describedby":`chart-instructions-${k.value}`,class:Ge({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value}),viewBox:`0 0 ${G.value.width<=0?10:G.value.width} ${G.value.height<=0?10:G.value.height}`,style:b(`max-width:100%;overflow:visible;background:transparent;color:${L.value.color}`),tabindex:`0`,onFocus:hr,onBlur:gr,onKeydown:vr},[He(E(It)),e.$slots[`chart-background`]?(x(),h(`foreignObject`,{key:0,x:0,y:0,width:G.value.width<=0?10:G.value.width,height:G.value.height<=0?10:G.value.height,style:{pointerEvents:`none`}},[w(e.$slots,`chart-background`,{},void 0,!0)],8,it)):m(``,!0),g(`defs`,null,[(x(!0),h(d,null,C(J.value,(e,t)=>(x(),p(Ae,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`radar_gradient_${k.value}_${t}`,key:`radar_gradient_${k.value}_${t}`,stops:[[`0%`,E(l)(E(oe)(e.color,.05),F.value.dataPolygon.opacity),1],[`100%`,E(l)(e.color,F.value.dataPolygon.opacity),1]]},null,8,[`id`,`stops`]))),128))]),F.value.grid.show?(x(),h(`g`,at,[(x(!0),h(d,null,C(X.value,e=>(x(),h(`line`,{x1:G.value.width/2,y1:G.value.height/2,x2:e.x,y2:e.y,stroke:F.value.grid.stroke,"stroke-width":F.value.grid.strokeWidth,style:{"pointer-events":`none`}},null,8,ot))),256)),F.value.grid.graduations>0?(x(),h(`g`,st,[(x(!0),h(d,null,C(zn.value,e=>(x(),h(`path`,{d:E(re)({plot:{x:G.value.width/2,y:G.value.height/2},radius:e,sides:Pn.value,rotation:Ln.value}).path,fill:`none`,stroke:F.value.grid.stroke,"stroke-width":F.value.grid.strokeWidth},null,8,ct))),256))])):m(``,!0)])):m(``,!0),g(`path`,{d:Rn.value.path,fill:`none`,stroke:F.value.outerPolygon.stroke,"stroke-width":F.value.outerPolygon.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,style:{"pointer-events":`none`}},null,8,lt),P.value.dataLabels.show?(x(),h(`g`,ut,[(x(!0),h(d,null,C(X.value,(e,t)=>(x(),h(`text`,{class:`vue-ui-radar-apex-label`,x:e.labelX,y:e.labelY,"text-anchor":e.labelAnchor,"dominant-baseline":`middle`,"font-size":P.value.dataLabels.fontSize,fill:P.value.dataLabels.color,onMouseenter:n=>Xn(e,t,`pointer`),onMouseleave:n=>Jn(e,t),onClick:n=>Yn(e,t)},T(e.name),41,dt))),256))])):m(``,!0),(x(!0),h(d,null,C(J.value,(e,t)=>(x(),h(`g`,null,[g(`g`,null,[M.value.useCssAnimation||!M.value.useCssAnimation&&!K.value.includes(t)?(x(),h(`polygon`,{key:0,points:E(ne)(X.value.map(e=>e.plots[t]),!1,!0),stroke:L.value.backgroundColor,"stroke-width":F.value.dataPolygon.strokeWidth+1,fill:`none`,class:Ge({"animated-out":K.value.includes(t)&&M.value.useCssAnimation,"animated-in":q.value&&Sn.value===t&&M.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,ft)):m(``,!0),M.value.useCssAnimation||!M.value.useCssAnimation&&!K.value.includes(t)?(x(),h(`polygon`,{key:1,points:E(ne)(X.value.map(e=>e.plots[t]),!1,!0),stroke:e.color,"stroke-width":F.value.dataPolygon.strokeWidth,fill:F.value.dataPolygon.transparent?`transparent`:F.value.dataPolygon.useGradient?`url(#radar_gradient_${k.value}_${t})`:E(l)(e.color,F.value.dataPolygon.opacity),class:Ge({"animated-out":K.value.includes(t)&&M.value.useCssAnimation,"animated-in":q.value&&Sn.value===t&&M.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,pt)):m(``,!0)])]))),256)),F.value.targetReference.show?(x(),h(`path`,{key:3,class:`vue-ui-radar-target-polygon`,d:`M${E(ne)(Nn.value,!1,!0)}Z`,fill:`none`,stroke:F.value.targetReference.stroke,"stroke-width":F.value.targetReference.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,"stroke-dasharray":F.value.targetReference.strokeDasharray,style:{"pointer-events":`none`}},null,8,mt)):m(``,!0),F.value.plots.show?(x(),h(`g`,ht,[(x(!0),h(d,null,C(X.value,(e,t)=>(x(),h(`g`,{key:`radar-category-${t}`},[(x(!0),h(d,null,C(e.plots,(n,r)=>(x(),h(`g`,{key:`radar-plot-${t}-${r}`,onMouseenter:n=>!K.value.includes(r)&&Xn(e,t,`pointer`),onMouseleave:n=>!K.value.includes(r)&&Jn(e,t),onClick:n=>!K.value.includes(r)&&Yn(e,t)},[g(`circle`,{cx:n.x,cy:n.y,r:In.value,fill:`transparent`,stroke:`transparent`,style:b({pointerEvents:K.value.includes(r)?`none`:`all`})},null,12,_t),g(`circle`,{cx:n.x,cy:n.y,fill:K.value.includes(r)?`transparent`:J.value[r]?J.value[r].color:`transparent`,r:Gn.value!==null&&Gn.value===t?F.value.plots.radius*1.6:F.value.plots.radius,stroke:K.value.includes(r)?`transparent`:L.value.backgroundColor,"stroke-width":.5,class:Ge({"animated-out":K.value.includes(r)&&M.value.useCssAnimation,"animated-in":q.value&&Sn.value===r&&M.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,vt)],40,gt))),128))]))),128))])):m(``,!0),w(e.$slots,`svg`,{svg:{...G.value,outerPolygon:Rn.value,isPrintingImg:E(mn)||E(hn)||E(ur),isPrintingSvg:E(dr)}},void 0,!0)],46,rt)),e.$slots.hint?(x(),h(`div`,yt,[w(e.$slots,`hint`,y(v({hint:M.value.a11y.translations.keyboardNavigation,isVisible:rn.value})),void 0,!0)])):m(``,!0)]),e.$slots.watermark?(x(),h(`div`,bt,[w(e.$slots,`watermark`,y(v({isPrinting:E(mn)||E(hn)||E(ur)||E(dr)})),void 0,!0)])):m(``,!0),g(`div`,{id:`legend-bottom-${k.value}`},null,8,xt),Qt.value&&(L.value.legend.show||e.$slots.legend)?(x(),p(ze,{key:6,to:L.value.legend.position===`top`?`#legend-top-${k.value}`:`#legend-bottom-${k.value}`},[g(`div`,{ref_key:`chartLegend`,ref:Kt},[w(e.$slots,`legend`,{legend:Z.value},()=>[L.value.legend.show?(x(),p(Ie,{key:`legend_${Zt.value}`,legendSet:Z.value,config:Wn.value,isCursorPointer:R.value,onClickMarker:t[0]||=({i:e})=>Tn(e)},Be({item:D(({legend:e,index:t})=>[E(on)?m(``,!0):(x(),h(`div`,{key:0,onClick:t=>e.segregate(),style:b(`opacity:${K.value.includes(t)?.5:1}`)},T(e.display),13,St))]),legendToggle:D(()=>[Z.value.length>2&&L.value.legend.selectAllToggle.show&&!E(on)?(x(),p(je,{key:0,backgroundColor:L.value.legend.selectAllToggle.backgroundColor,color:L.value.legend.selectAllToggle.color,fontSize:L.value.legend.fontSize,checked:K.value.length>0,isCursorPointer:R.value,onToggle:Cn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):m(``,!0)]),_:2},[F.value.targetReference.show&&F.value.targetReference.showInLegend?{name:`after`,fn:D(()=>[g(`div`,Ct,[g(`div`,{style:b({display:`flex`,height:L.value.legend.fontSize})},[(x(),h(`svg`,{style:b({width:L.value.legend.fontSize*2}),viewBox:`0 0 16 8`},[g(`line`,{x1:`0`,x2:`16`,y1:`4`,y2:`4`,stroke:F.value.targetReference.stroke,"stroke-width":F.value.targetReference.strokeWidth*.7,"stroke-dasharray":F.value.targetReference.strokeDasharray*.7,"stroke-linecap":`round`},null,8,wt)],4))],4),g(`span`,null,T(F.value.targetReference.legendLabel),1)])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):m(``,!0)],!0)],512)],8,[`to`])):m(``,!0),e.$slots.source?(x(),h(`div`,{key:7,ref_key:`source`,ref:qt,dir:`auto`},[w(e.$slots,`source`,{},void 0,!0)],512)):m(``,!0),He(E(kt),{teleportTo:I.value.teleportTo,show:W.value.showTooltip&&Ht.value,backgroundColor:I.value.backgroundColor,color:I.value.color,borderRadius:I.value.borderRadius,borderColor:I.value.borderColor,borderWidth:I.value.borderWidth,backgroundOpacity:I.value.backgroundOpacity,fontSize:I.value.fontSize,position:I.value.position,offsetX:I.value.offsetX,offsetY:I.value.offsetY,parent:A.value,content:Ut.value,isFullscreen:$.value,isCustom:I.value.customFormat&&typeof I.value.customFormat==`function`,smooth:I.value.smooth,backdropFilter:I.value.backdropFilter,smoothForce:I.value.smoothForce,smoothSnapThreshold:I.value.smoothSnapThreshold,isA11yMode:nn.value===`keyboard`,a11yPosition:tn.value},{"tooltip-before":D(()=>[w(e.$slots,`tooltip-before`,y(v({...qn.value})),void 0,!0)]),tooltip:D(()=>[w(e.$slots,`tooltip`,y(v({...qn.value})),void 0,!0)]),"tooltip-after":D(()=>[![`function`].includes(typeof I.value.customFormat)&&!e.$slots.tooltip?(x(),h(`div`,Tt,[He(E(jt),{dataset:Kn.value,config:bn.value,backgroundOpacity:0},{"data-label":D(({bar:e})=>[g(`div`,Et,[g(`span`,Dt,T(e.name+(I.value.showValue||I.value.showPercentage?`:`:``)),1),I.value.showValue||I.value.showPercentage?(x(),h(`span`,Ot,T(e.suffix),1)):m(``,!0)])]),_:1},8,[`dataset`,`config`])])):m(``,!0),w(e.$slots,`tooltip-after`,y(v({...qn.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`fontSize`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Vt.value&&N.value.buttons.table?(x(),p(Je(ir.value.component),Ue({key:8},ir.value.props,{ref_key:`tableUnit`,ref:$t,onClose:ar}),Be({content:D(()=>[(x(),p(E(Nt),{key:`table_${Xt.value}`,colNames:Q.value.colNames,head:Q.value.head,body:Q.value.body,config:Q.value.config,title:M.value.table.useDialog?``:ir.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:R.value,onClose:ar},{th:D(({th:e})=>[Ve(T(e.name),1)]),td:D(({td:e})=>[Ve(T(e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[M.value.table.useDialog?{name:`title`,fn:D(()=>[Ve(T(ir.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:D(()=>[g(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[1]||=e=>Zn(N.value.callbacks.csv),style:b({cursor:R.value?`pointer`:`default`})},[He(E(At),{name:`fileCsv`,stroke:ir.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):m(``,!0),w(e.$slots,`skeleton`,{},()=>[E(on)?(x(),p(Se,{key:0})):m(``,!0)],!0)],46,$e))}},[[`__scopeId`,`data-v-4c2db0d1`]]);export{Qe as n,kt as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./tableIntegration-CNoJ1CIY.js";import{n as r,t as i}from"./annotationSlots-BRR85CqJ.js";import{n as a,t as o}from"./userOptionsSlots-DYuo-E5m.js";import{$ as s,D as ee,Dt as te,Ht as c,Jt as l,Lt as ne,M as re,S as ie,X as ae,Yt as oe,Zt as se,at as u,b as ce,i as le,in as ue,nn as de,nt as fe,pt as pe,t as me,w as he,yt as ge,zt as _e}from"./lib-CV_IANZ6.js";import{n as ve}from"./useHints-BH9r_0Vd.js";import{t as ye}from"./useConfig-CKdzPrcf.js";import{t as be}from"./usePrinter-hLW3cv4N.js";import{n as xe,t as Se}from"./BaseScanner-8NdoBs7B.js";import{t as Ce}from"./useNestedProp-CB186vF2.js";import{t as we}from"./useThemeCheck-BKNRbGeC.js";import{t as Te}from"./useChartExport-DtPNpc9M.js";import{n as Ee}from"./Title-BGYFqulv.js";import{t as De}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{l as Oe,t as ke}from"./useResponsive-D2CPcpda.js";import{t as Ae}from"./DefGrad-DKMq1REY.js";import{t as je}from"./BaseLegendToggle-Bq5FjyuI.js";import{t as Me}from"./A11yDataTable-DWNlWXzs.js";import{t as Ne}from"./useUserOptionState-CXlFnwPv.js";import{t as Pe}from"./useChartAccessibility-DOMuYJfm.js";import{t as Fe}from"./chartImage-CIvU_04o.js";import{t as Ie}from"./Legend-D8YoT1RJ.js";import{t as Le}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Re}from"./vue_ui_radar-68iK9Fam.js";import{Fragment as d,Teleport as ze,computed as f,createBlock as p,createCommentVNode as m,createElementBlock as h,createElementVNode as g,createSlots as Be,createTextVNode as Ve,createVNode as He,defineAsyncComponent as _,guardReactiveProps as v,mergeProps as Ue,nextTick as We,normalizeClass as Ge,normalizeProps as y,normalizeStyle as b,onBeforeUnmount as Ke,onMounted as qe,openBlock as x,ref as S,renderList as C,renderSlot as w,resolveDynamicComponent as Je,shallowRef as Ye,toDisplayString as T,toRefs as Xe,unref as E,watch as Ze,withCtx as D}from"vue";var Qe=/* @__PURE__ */ e({default:()=>kt}),$e=[`id`],et=[`id`],tt=[`id`],nt={style:{position:`relative`}},rt=[`xmlns`,`aria-describedby`,`viewBox`],it=[`width`,`height`],at={key:1},ot=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],st={key:0,style:{"pointer-events":`none`}},ct=[`d`,`stroke`,`stroke-width`],lt=[`d`,`stroke`,`stroke-width`],ut={key:2},dt=[`x`,`y`,`text-anchor`,`font-size`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],ft=[`points`,`stroke`,`stroke-width`],pt=[`points`,`stroke`,`stroke-width`,`fill`],mt=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],ht={key:4},gt=[`onMouseenter`,`onMouseleave`,`onClick`],_t=[`cx`,`cy`,`r`],vt=[`cx`,`cy`,`fill`,`r`,`stroke`],yt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},bt={key:5,class:`vue-data-ui-watermark`},xt=[`id`],St=[`onClick`],Ct={class:`vue-data-ui-legend-item`},wt=[`stroke`,`stroke-width`,`stroke-dasharray`],Tt={key:0,style:{"max-width":`200px`,margin:`0 auto`}},Et={class:`vue-ui-radar-tooltip-datalabel`,style:{width:`100%`}},Dt={class:`vue-ui-radar-tooltip-datalabel-name`},Ot={key:0},kt=/*#__PURE__*/ De({__name:`vue-ui-radar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:De,emit:Qe}){let kt=_(()=>import(`./Tooltip-Cus2-XNQ.js`)),At=_(()=>import(`./BaseIcon-DdIyewwY.js`).then(e=>e.n)),jt=_(()=>import(`./vue-ui-sparkbar-CdsLI7Ke.js`).then(e=>e.n)),Mt=_(()=>import(`./vue-ui-accordion-BNvevckx.js`).then(e=>e.n)),Nt=_(()=>import(`./DataTable-WNecJMcY.js`)),Pt=_(()=>import(`./PenAndPaper-IMw576MC.js`).then(e=>e.t)),Ft=_(()=>import(`./UserOptions-DTxMeZv3.js`).then(e=>e.n)),It=_(()=>import(`./PackageVersion-CdkxOy58.js`).then(e=>e.t)),Lt=_(()=>import(`./BaseDraggableDialog-D_tuHEjO.js`).then(e=>e.n)),{vue_ui_radar:Rt}=ye(),{isThemeValid:zt,warnInvalidTheme:Bt}=we(),O=e,Vt=f(()=>!!O.dataset&&Object.keys(O.dataset).length),k=S(ae()),Ht=S(!1),Ut=S(``),Wt=S(0),A=S(null),Gt=S(null),Kt=S(null),qt=S(null),Jt=S(null),Yt=S(0),Xt=S(0),Zt=S(0),Qt=S(!1),$t=S(null),en=S(null),j=S(null),tn=S({x:0,y:0}),nn=S(`pointer`),rn=S(!1),M=S(dn()),N=f(()=>M.value.userOptions),P=f(()=>M.value.style.chart.layout.labels),F=f(()=>M.value.style.chart.layout),I=f(()=>M.value.style.chart.tooltip),L=f(()=>M.value.style.chart);ve({config:()=>M.value,dataset:()=>O.dataset,component:`VueUiRadar`,rules:[{test:e=>e?.categories&&e.categories.length===0,message:[`👀 There are no categories in your dataset. Consider:`,``,`▶️ Adding categories...`]},{test:e=>e?.series&&e.series.length===0,message:[`👀 There are no series in your dataset. Consider:`,``,`▶️ Adding series...`]},{test:e=>e?.categories&&e.categories.length>3,message:[`👀 The number of categories > 3, the chart might become hard to read. Consider:`,``,`▶️ Using several instances of the component to display related categories.`,``,`▶️ Adding filters to allow users to choose a maximum number of categories.`]},{test:e=>e?.series&&e.series.length>12,message:[`👀 The number of series is > 12. Consider:`,``,`▶️ Using several instances of the component to distribute the series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``]}]});let R=f(()=>M.value.userOptions.useCursorPointer),an=f(()=>ue({defaultConfig:{userOptions:{show:!1},table:{show:!1},useCssAnimation:!1,style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A90`},labels:{dataLabels:{show:!1}},outerPolygon:{stroke:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}}},userConfig:M.value.skeletonConfig??{}})),{loading:on,FINAL_DATASET:z}=xe({...Xe(O),FINAL_CONFIG:M,prepareConfig:dn,callback:()=>{Promise.resolve().then(async()=>{await We(),W.value.showTable=M.value.table.show})},skeletonDataset:O.config?.skeletonDataset??{categories:[{name:`_`,color:`#6A6A6A`}],series:[{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1}]},skeletonConfig:ue({defaultConfig:M.value,userConfig:an.value})}),{userOptionsVisible:sn,setUserOptionsVisibility:cn,keepUserOptionState:ln}=Ne({config:M.value}),{svgRef:B}=Pe({config:L.value.title});function un(e){return{...e,style:{...e.style,chart:{...e.style.chart,layout:{...e.style.chart.layout,grid:{rotate:0,...e.style.chart.layout.grid},labels:{...e.style.chart.layout.labels,dataLabels:{offset:0,...e.style.chart.layout.labels.dataLabels}}}}}}}function dn(){let e=un(Ce({userConfig:O.config,defaultConfig:Rt})),t=e.theme;if(!t)return e;if(!zt.value(e))return Bt(e),e;let n=Ce({userConfig:Re[t]||O.config,defaultConfig:e}),r=Ce({userConfig:O.config,defaultConfig:n});return{...r,customPalette:r.customPalette.length?r.customPalette:de[t]||c}}let fn=se(O.config);Ze(()=>O.config,(e,t)=>{let n=se(e),r=n!==fn;fn=n;let i=dn();if(!r){M.value.style.chart.tooltip=i.style.chart.tooltip,W.value.showTooltip=M.value.style.chart.tooltip.show;return}M.value=i,sn.value=!M.value.userOptions.showOnChartHover,pn(),Yt.value+=1,Xt.value+=1,Zt.value+=1,W.value.dataLabels.show=P.value.dataLabels.show,W.value.showTable=M.value.table.show,W.value.showTooltip=I.value?I.value.show:!1},{deep:!0});let V=Ye(null),H=Ye(null),U=f(()=>M.value.debug);function pn(){if(_e(O.dataset)&&u({componentName:`VueUiRadar`,type:`dataset`,debug:U.value}),M.value.responsive){let e=Oe(()=>{let{width:e,height:t}=ke({chart:A.value,title:L.value.title.text?Gt.value:null,legend:L.value.legend.show?Kt.value:null,source:qt.value,noTitle:Jt.value});requestAnimationFrame(()=>{G.value.width=e,G.value.height=t,Hn()})});V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect()),V.value=new ResizeObserver(e),H.value=A.value.parentNode,V.value.observe(H.value)}Hn()}qe(()=>{Qt.value=!0,pn()}),Ke(()=>{V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect())});let{isPrinting:mn,isImaging:hn,generatePdf:gn,generateImage:_n}=be({elementId:`vue-ui-radar_${k.value}`,fileName:L.value.title.text||`vue-ui-radar`,options:M.value.userOptions.print}),vn=f(()=>M.value.userOptions.show&&!L.value.title.text),yn=f(()=>he(M.value.customPalette)),W=S({dataLabels:{show:P.value.dataLabels.show},showTable:M.value.table.show,showTooltip:I.value.show}),bn=f(()=>({style:{backgroundColor:`#FFFFFF00`,animation:{show:I.value.animation.show,animationFrames:I.value.animation.animationFrames},labels:{fontSize:I.value.fontSize,name:{color:I.value.color}},gutter:{backgroundColor:`#CCCCCC`,opacity:30}}})),G=S({height:312,width:512}),xn=Qe,K=S([]),Sn=S(null),q=S(!1);function Cn(){K.value.length?K.value=[]:Z.value.forEach((e,t)=>{K.value.push(t)}),wn()}function wn(){xn(`selectLegend`,Z.value.filter((e,t)=>!K.value.includes(t)).map(e=>({name:e.name,color:e.color,proportion:e.totalProportion})))}function Tn(e){q.value=!0,K.value.includes(e)?(Sn.value=e,K.value=K.value.filter(t=>t!==e),setTimeout(()=>{q.value=!1,Sn.value=null},500)):(K.value.push(e),setTimeout(()=>{q.value=!1},500)),wn()}function En(){return Z.value.map(e=>({name:e.name,color:e.color,proportion:e.totalProportion}))}function Dn(){let e=z.value;if([null,void 0].includes(e?.categories)){u({componentName:`VueUiRadar`,type:`dataset`,debug:U.value}),u({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`categories ({ name: string; prefix?: string; suffix?: string}[])`,debug:U.value});return}e.categories.length===0?u({componentName:`VueUiRadar`,type:`datasetAttributeEmpty`,property:`categories`,debug:U.value}):U.value&&e.categories.forEach((e,t)=>{ge({datasetObject:e,requiredAttributes:[`name`]}).forEach(e=>{u({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`category.${e} at index ${t}`,index:t})})}),[null,void 0].includes(e?.series)?u({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`series ({ name: string; values: number[]; color?: string; target: number}[])`,debug:U.value}):U.value&&e.series.forEach((e,t)=>{ge({datasetObject:e,requiredAttributes:[`name`,`values`,`target`]}).forEach(e=>{u({componentName:`VueUiRadar`,type:`datasetSerieAttribute`,key:`series`,property:e,index:t})})})}Ze(()=>z.value,()=>Dn(),{deep:!0,immediate:!0});let J=f(()=>{let e=Array.isArray(z.value?.categories)?z.value.categories:[],t=yn.value??c;return e.map((e,n)=>({name:e?.name??``,categoryId:`radar_category_${k.value}_${n}`,color:ie(e?.color)||t[n]||c[n%c.length],prefix:e?.prefix??``,suffix:e?.suffix??``}))}),Y=f(()=>z.value.series.map((e,t)=>({...e,color:ie(e.color)||yn.value[t]||c[t]||c[t%c.length],serieId:`radar_serie_${k.value}_${t}`,formatter:e.formatter||null,absoluteIndex:t})));function On(e){return Y.value.length?Z.value.find(t=>t.name===e)||(U.value&&console.warn(`VueUiRadar - Series name not found "${e}"`),null):(U.value&&console.warn(`VueUiRadar - There are no series to show.`),null)}function kn(e){let t=On(e);t!==null&&K.value.includes(t.absoluteIndex)&&Tn(t.absoluteIndex)}function An(e){let t=On(e);t!==null&&(K.value.includes(t.absoluteIndex)||Tn(t.absoluteIndex))}let jn=f(()=>Math.max(0,...Y.value.flatMap(e=>e.values)));function Mn(e){return F.value.scaleToAxisMax?Math.max(1,e.target||0,...e.values):e.target||jn.value||1}let Nn=f(()=>Y.value.map((e,t)=>{let n=Rn.value.coordinates[t];return Un({centerX:G.value.width/2,centerY:G.value.height/2,apexX:n.x,apexY:n.y,proportion:(e.target||0)/Mn(e)})})),Pn=f(()=>Y.value.length),Fn=f(()=>Math.min(G.value.width,G.value.height)/3),In=f(()=>{let e=Number(F.value.plots.radius??0);return Math.max(Number.isFinite(e)?e*2.5:0,10)}),Ln=f(()=>{let e=Number(F.value.grid.rotation??0);return Number.isFinite(e)?e*Math.PI/180:0}),Rn=f(()=>re({plot:{x:G.value.width/2,y:G.value.height/2},radius:Fn.value,sides:Pn.value,rotation:Ln.value})),zn=f(()=>{let e=[];for(let t=0;t<Fn.value;t+=Fn.value/F.value.grid.graduations)e.push(t);return e}),X=f(()=>Rn.value.coordinates.map((e,t)=>{let n=Y.value[t],r=Y.value[t].values.map(t=>Un({centerX:G.value.width/2,centerY:G.value.height/2,apexX:e.x,apexY:e.y,proportion:t/Mn(n)}));return{...e,...n,plots:r}}).map(e=>({...e,labelX:Bn(e).x,labelY:Bn(e).y,labelAnchor:Bn(e).anchor})));function Bn({x:e,y:t}){let n=G.value.width/2,r=G.value.height/2,i=e-n,a=t-r,o=Math.hypot(i,a),s=Number(P.value.dataLabels.offset??0),ee=20+(Number.isFinite(s)?s:0);if(!o)return{x:e,y:t,anchor:`middle`};let te=i/o,c=a/o,l=`middle`;return te>.01?l=`start`:te<-.01&&(l=`end`),{x:e+te*ee,y:t+c*ee,anchor:l}}let Vn=f({get:()=>P.value.dataLabels.fontSize,set:e=>e}),{autoSizeLabels:Hn}=Le({svgRef:B,fontSize:P.value.dataLabels.fontSize,minFontSize:6,sizeRef:Vn,labelClass:`.vue-ui-radar-apex-label`});function Un({centerX:e,centerY:t,apexX:n,apexY:r,proportion:i}){return{x:e+(n-e)*i,y:t+(r-t)*i}}let Z=f(()=>{let e=Y.value.map((e,t)=>e.values.map(t=>t/(e.target||jn.value)));return J.value.map((t,n)=>{let r=ce(e.map(e=>e[n]).reduce((e,t)=>e+t,0)/Y.value.length);return{...t,absoluteIndex:n,totalProportion:r,shape:`circle`,opacity:K.value.includes(n)?.5:1,segregate:()=>Tn(n),isSegregated:K.value.includes(n),display:`${t.name}: ${s({v:(r??0)*100,s:`%`,r:L.value.legend.roundingPercentage})}`}})}),Wn=f(()=>({cy:`radar-div-legend`,backgroundColor:L.value.legend.backgroundColor,color:L.value.legend.color,fontSize:L.value.legend.fontSize,paddingBottom:12,fontWeight:L.value.legend.bold?`bold`:``})),Q=f(()=>{let e=[{name:M.value.translations.datapoint,color:``},{name:M.value.translations.target,color:``},...Z.value];return{head:e,body:z.value.series.map(e=>[e.name,le(e.formatter,e.target,s({p:e.prefix,v:e.target,s:e.suffix,r:M.value.table.td.roundingValue})),...e.values.map((t,n)=>`${le(e.formatter,t,s({p:J.value[n]?.prefix??``,v:t,s:J.value[n]?.suffix??``,r:M.value.table.td.roundingValue}))} (${isNaN(t/e.target)?``:s({v:t/e.target*100,s:`%`,r:M.value.table.td.roundingPercentage})})`)]),config:{th:{backgroundColor:M.value.table.th.backgroundColor,color:M.value.table.th.color,outline:M.value.table.th.outline},td:{backgroundColor:M.value.table.td.backgroundColor,color:M.value.table.td.color,outline:M.value.table.td.outline},breakpoint:M.value.table.responsiveBreakpoint},colNames:e}}),Gn=S(null),Kn=S([]),qn=S(null);function Jn(e,t){Ht.value=!1,Gn.value=null,j.value=null,nn.value=`pointer`,M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function Yn(e,t){M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:e,seriesIndex:t})}function Xn(e,t,n=`pointer`){M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:e,seriesIndex:t}),nn.value=n,j.value=t;let r=J.value.slice();Kn.value=[],Gn.value=t,Ht.value=!0,qn.value={datapoint:e,seriesIndex:t,series:{categories:r,datapoints:Y.value,radar:X.value},config:M.value};let i=I.value.customFormat;if(te(i)&&pe(()=>i({seriesIndex:t,datapoint:e,series:{categories:r,datapoints:Y.value,radar:X.value},config:M.value}))){Ut.value=i({seriesIndex:t,datapoint:e,series:{categories:r,datapoints:Y.value,radar:X.value},config:M.value});return}Ut.value=`<div style="width:100%;text-align:center;border-bottom:1px solid ${I.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`;for(let t=0;t<e.values.length;t+=1)if(!K.value.includes(t)){let n=r[t],i=e.values[t],a=isNaN(i/e.target)?0:i/e.target*100,o=le(e.formatter,i,s({p:J.value[t].prefix,v:i,s:J.value[t].suffix,r:I.value.roundingValue}),{datapoint:e}),ee=s({v:a,s:`%`,r:I.value.roundingPercentage}),te=I.value.showValue&&I.value.showPercentage?`${o} (${ee})`:I.value.showValue&&!I.value.showPercentage?o:!I.value.showValue&&I.value.showPercentage?`${ee}`:``;Kn.value.push({name:n?.name??`#${t+1}`,value:e.values[t]/e.target*100,color:n?.color,suffix:te,prefix:``,rounding:I.value.roundingPercentage,formatter:e.formatter})}}function Zn(e=null){We(()=>{let t=[[L.value.title.text],[L.value.title.subtitle.text],[``]],n=[[``],[M.value.translations.target],...Z.value.flatMap(e=>[[e.name],[`%`]])],r=z.value.series.map((e,t)=>[e.name,e.target,...e.values.flatMap(t=>[t,isNaN(t/e.target)?``:t/e.target*100])]),i=t.concat([n]).concat(r),a=ee(i);e?e(a):fe({csvContent:a,title:L.value.title.text||`vue-ui-radar`})})}let $=S(!1);function Qn(e){$.value=e,Wt.value+=1}function $n(){W.value.showTable=!W.value.showTable}function er(){W.value.showTooltip=!W.value.showTooltip}let tr=S(!1);function nr(){tr.value=!tr.value}let rr=Fe(A,()=>L.value.title.text),ir=f(()=>n({config:M,style:L,mutableConfig:W,dialog:Lt,accordion:Mt,isFullscreen:$,parent:A,maxWidth:800,isCursorPointer:R}));Ze(()=>W.value.showTable,e=>t(e,M,$t));function ar(){W.value.showTable=!1,en.value&&en.value.setTableIconState(!1)}let or=f(()=>Z.value.map(e=>({...e,name:e.display}))),sr=f(()=>L.value.backgroundColor),cr=f(()=>L.value.legend),lr=f(()=>L.value.title),{isCallbackImaging:ur,isCallbackSvg:dr,generateSvg:fr,onGenerateImage:pr}=Te({svg:B,title:lr,legend:cr,legendItems:or,backgroundColor:sr,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:_n});async function mr(){if(xn(`copyAlt`,{config:M.value,dataset:X.value}),!M.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(M.value.userOptions.callbacks.altCopy({config:M.value,dataset:X.value}))}function hr(){j.value=null,rn.value=!0}function gr(){j.value=null,nn.value=`pointer`,Ht.value=!1,Gn.value=null,rn.value=!1}function _r(e){if(!Number.isFinite(e)||!B.value)return;let t=X.value[e];if(!t)return;let n=B.value.getBoundingClientRect();tn.value={x:n.left+t.labelX/G.value.width*n.width,y:n.top+t.labelY/G.value.height*n.height}}function vr(e){if(!B.value||tr.value||document.activeElement!==B.value||!X.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){j.value=null,nn.value=`pointer`,Ht.value=!1,Gn.value=null;return}if(r){if(j.value===null)return;let e=X.value[j.value];if(!e)return;Yn(e,j.value);return}let a=j.value;a===null||a<0||a>=X.value.length?a=n?0:X.value.length-1:n?(a+=1,a>=X.value.length&&(a=0)):t&&(--a,a<0&&(a=X.value.length-1));let o=X.value[a];o&&(j.value=a,_r(a),Xn(o,a,`keyboard`))}let yr=f(()=>({headers:Q.value?.colNames?.map(e=>e.name??e)??[],rows:Q.value?.body??[]}));return De({getData:En,getImage:rr,generatePdf:gn,generateCsv:Zn,generateImage:_n,generateSvg:fr,hideSeries:An,showSeries:kn,toggleTable:$n,toggleTooltip:er,toggleAnnotator:nr,toggleFullscreen:Qn,copyAlt:mr}),(e,t)=>(x(),h(`div`,{class:Ge(`vue-data-ui-component vue-ui-radar ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${M.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`radarChart`,ref:A,id:`vue-ui-radar_${k.value}`,style:b(`font-family:${M.value.style.fontFamily};width:100%; ${M.value.responsive?`height: 100%;`:``} text-align:center;background:${L.value.backgroundColor}`),onMouseenter:t[2]||=()=>E(cn)(!0),onMouseleave:t[3]||=()=>E(cn)(!1)},[g(`div`,{id:`chart-instructions-${k.value}`,class:`sr-only`},[g(`p`,null,T(M.value.a11y.translations.keyboardNavigation),1)],8,et),yr.value?.rows?.length?(x(),p(Me,{key:0,uid:k.value,head:yr.value.headers,body:yr.value.rows,notice:M.value.a11y.translations.tableAvailable,caption:M.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):m(``,!0),N.value.buttons.annotator?(x(),p(E(Pt),{key:1,svgRef:E(B),backgroundColor:L.value.backgroundColor,color:L.value.color,active:tr.value,isCursorPointer:R.value,palette:N.value.annotatorPalette,onClose:nr},Be({_:2},[C(E(i),t=>({name:t,fn:D(n=>[w(e.$slots,t,y(v(E(r)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):m(``,!0),vn.value?(x(),h(`div`,{key:2,ref_key:`noTitle`,ref:Jt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):m(``,!0),L.value.title.text?(x(),h(`div`,{key:3,ref_key:`chartTitle`,ref:Gt,style:`width:100%;background:transparent;padding-bottom:12px`},[(x(),p(Ee,{key:`title_${Yt.value}`,config:{title:{cy:`radar-div-title`,...L.value.title},subtitle:{cy:`radar-div-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],512)):m(``,!0),g(`div`,{id:`legend-top-${k.value}`},null,8,tt),N.value.show&&Vt.value&&(E(ln)||E(sn))?(x(),p(E(Ft),{ref_key:`userOptionsRef`,ref:en,key:`user_options_${Wt.value}`,backgroundColor:L.value.backgroundColor,color:L.value.color,isImaging:E(hn),isPrinting:E(mn),uid:k.value,hasTooltip:N.value.buttons.tooltip&&I.value.show,hasPdf:N.value.buttons.pdf,hasImg:N.value.buttons.img,hasSvg:N.value.buttons.svg,hasXls:N.value.buttons.csv,hasTable:N.value.buttons.table,hasFullscreen:N.value.buttons.fullscreen,hasAltCopy:N.value.buttons.altCopy,isFullscreen:$.value,isTooltip:W.value.showTooltip,titles:{...N.value.buttonTitles},chartElement:A.value,position:N.value.position,hasAnnotator:N.value.buttons.annotator,isAnnotation:tr.value,callbacks:N.value.callbacks,printScale:N.value.print.scale,tableDialog:M.value.table.useDialog,isCursorPointer:R.value,onToggleFullscreen:Qn,onGeneratePdf:E(gn),onGenerateCsv:Zn,onGenerateImage:E(pr),onGenerateSvg:E(fr),onToggleTable:$n,onToggleTooltip:er,onToggleAnnotator:nr,onCopyAlt:mr,style:b({visibility:E(ln)?E(sn)?`visible`:`hidden`:`visible`})},Be({_:2},[C(E(a)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:D(n=>[w(e.$slots,t,y(v(E(o)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):m(``,!0),g(`div`,nt,[(x(),h(`svg`,{ref_key:`svgRef`,ref:B,xmlns:E(me),"aria-describedby":`chart-instructions-${k.value}`,class:Ge({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value}),viewBox:`0 0 ${G.value.width<=0?10:G.value.width} ${G.value.height<=0?10:G.value.height}`,style:b(`max-width:100%;overflow:visible;background:transparent;color:${L.value.color}`),tabindex:`0`,onFocus:hr,onBlur:gr,onKeydown:vr},[He(E(It)),e.$slots[`chart-background`]?(x(),h(`foreignObject`,{key:0,x:0,y:0,width:G.value.width<=0?10:G.value.width,height:G.value.height<=0?10:G.value.height,style:{pointerEvents:`none`}},[w(e.$slots,`chart-background`,{},void 0,!0)],8,it)):m(``,!0),g(`defs`,null,[(x(!0),h(d,null,C(J.value,(e,t)=>(x(),p(Ae,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`radar_gradient_${k.value}_${t}`,key:`radar_gradient_${k.value}_${t}`,stops:[[`0%`,E(l)(E(oe)(e.color,.05),F.value.dataPolygon.opacity),1],[`100%`,E(l)(e.color,F.value.dataPolygon.opacity),1]]},null,8,[`id`,`stops`]))),128))]),F.value.grid.show?(x(),h(`g`,at,[(x(!0),h(d,null,C(X.value,e=>(x(),h(`line`,{x1:G.value.width/2,y1:G.value.height/2,x2:e.x,y2:e.y,stroke:F.value.grid.stroke,"stroke-width":F.value.grid.strokeWidth,style:{"pointer-events":`none`}},null,8,ot))),256)),F.value.grid.graduations>0?(x(),h(`g`,st,[(x(!0),h(d,null,C(zn.value,e=>(x(),h(`path`,{d:E(re)({plot:{x:G.value.width/2,y:G.value.height/2},radius:e,sides:Pn.value,rotation:Ln.value}).path,fill:`none`,stroke:F.value.grid.stroke,"stroke-width":F.value.grid.strokeWidth},null,8,ct))),256))])):m(``,!0)])):m(``,!0),g(`path`,{d:Rn.value.path,fill:`none`,stroke:F.value.outerPolygon.stroke,"stroke-width":F.value.outerPolygon.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,style:{"pointer-events":`none`}},null,8,lt),P.value.dataLabels.show?(x(),h(`g`,ut,[(x(!0),h(d,null,C(X.value,(e,t)=>(x(),h(`text`,{class:`vue-ui-radar-apex-label`,x:e.labelX,y:e.labelY,"text-anchor":e.labelAnchor,"dominant-baseline":`middle`,"font-size":P.value.dataLabels.fontSize,fill:P.value.dataLabels.color,onMouseenter:n=>Xn(e,t,`pointer`),onMouseleave:n=>Jn(e,t),onClick:n=>Yn(e,t)},T(e.name),41,dt))),256))])):m(``,!0),(x(!0),h(d,null,C(J.value,(e,t)=>(x(),h(`g`,null,[g(`g`,null,[M.value.useCssAnimation||!M.value.useCssAnimation&&!K.value.includes(t)?(x(),h(`polygon`,{key:0,points:E(ne)(X.value.map(e=>e.plots[t]),!1,!0),stroke:L.value.backgroundColor,"stroke-width":F.value.dataPolygon.strokeWidth+1,fill:`none`,class:Ge({"animated-out":K.value.includes(t)&&M.value.useCssAnimation,"animated-in":q.value&&Sn.value===t&&M.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,ft)):m(``,!0),M.value.useCssAnimation||!M.value.useCssAnimation&&!K.value.includes(t)?(x(),h(`polygon`,{key:1,points:E(ne)(X.value.map(e=>e.plots[t]),!1,!0),stroke:e.color,"stroke-width":F.value.dataPolygon.strokeWidth,fill:F.value.dataPolygon.transparent?`transparent`:F.value.dataPolygon.useGradient?`url(#radar_gradient_${k.value}_${t})`:E(l)(e.color,F.value.dataPolygon.opacity),class:Ge({"animated-out":K.value.includes(t)&&M.value.useCssAnimation,"animated-in":q.value&&Sn.value===t&&M.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,pt)):m(``,!0)])]))),256)),F.value.targetReference.show?(x(),h(`path`,{key:3,class:`vue-ui-radar-target-polygon`,d:`M${E(ne)(Nn.value,!1,!0)}Z`,fill:`none`,stroke:F.value.targetReference.stroke,"stroke-width":F.value.targetReference.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,"stroke-dasharray":F.value.targetReference.strokeDasharray,style:{"pointer-events":`none`}},null,8,mt)):m(``,!0),F.value.plots.show?(x(),h(`g`,ht,[(x(!0),h(d,null,C(X.value,(e,t)=>(x(),h(`g`,{key:`radar-category-${t}`},[(x(!0),h(d,null,C(e.plots,(n,r)=>(x(),h(`g`,{key:`radar-plot-${t}-${r}`,onMouseenter:n=>!K.value.includes(r)&&Xn(e,t,`pointer`),onMouseleave:n=>!K.value.includes(r)&&Jn(e,t),onClick:n=>!K.value.includes(r)&&Yn(e,t)},[g(`circle`,{cx:n.x,cy:n.y,r:In.value,fill:`transparent`,stroke:`transparent`,style:b({pointerEvents:K.value.includes(r)?`none`:`all`})},null,12,_t),g(`circle`,{cx:n.x,cy:n.y,fill:K.value.includes(r)?`transparent`:J.value[r]?J.value[r].color:`transparent`,r:Gn.value!==null&&Gn.value===t?F.value.plots.radius*1.6:F.value.plots.radius,stroke:K.value.includes(r)?`transparent`:L.value.backgroundColor,"stroke-width":.5,class:Ge({"animated-out":K.value.includes(r)&&M.value.useCssAnimation,"animated-in":q.value&&Sn.value===r&&M.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,vt)],40,gt))),128))]))),128))])):m(``,!0),w(e.$slots,`svg`,{svg:{...G.value,outerPolygon:Rn.value,isPrintingImg:E(mn)||E(hn)||E(ur),isPrintingSvg:E(dr)}},void 0,!0)],46,rt)),e.$slots.hint?(x(),h(`div`,yt,[w(e.$slots,`hint`,y(v({hint:M.value.a11y.translations.keyboardNavigation,isVisible:rn.value})),void 0,!0)])):m(``,!0)]),e.$slots.watermark?(x(),h(`div`,bt,[w(e.$slots,`watermark`,y(v({isPrinting:E(mn)||E(hn)||E(ur)||E(dr)})),void 0,!0)])):m(``,!0),g(`div`,{id:`legend-bottom-${k.value}`},null,8,xt),Qt.value&&(L.value.legend.show||e.$slots.legend)?(x(),p(ze,{key:6,to:L.value.legend.position===`top`?`#legend-top-${k.value}`:`#legend-bottom-${k.value}`},[g(`div`,{ref_key:`chartLegend`,ref:Kt},[w(e.$slots,`legend`,{legend:Z.value},()=>[L.value.legend.show?(x(),p(Ie,{key:`legend_${Zt.value}`,legendSet:Z.value,config:Wn.value,isCursorPointer:R.value,onClickMarker:t[0]||=({i:e})=>Tn(e)},Be({item:D(({legend:e,index:t})=>[E(on)?m(``,!0):(x(),h(`div`,{key:0,onClick:t=>e.segregate(),style:b(`opacity:${K.value.includes(t)?.5:1}`)},T(e.display),13,St))]),legendToggle:D(()=>[Z.value.length>2&&L.value.legend.selectAllToggle.show&&!E(on)?(x(),p(je,{key:0,backgroundColor:L.value.legend.selectAllToggle.backgroundColor,color:L.value.legend.selectAllToggle.color,fontSize:L.value.legend.fontSize,checked:K.value.length>0,isCursorPointer:R.value,onToggle:Cn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):m(``,!0)]),_:2},[F.value.targetReference.show&&F.value.targetReference.showInLegend?{name:`after`,fn:D(()=>[g(`div`,Ct,[g(`div`,{style:b({display:`flex`,height:L.value.legend.fontSize})},[(x(),h(`svg`,{style:b({width:L.value.legend.fontSize*2}),viewBox:`0 0 16 8`},[g(`line`,{x1:`0`,x2:`16`,y1:`4`,y2:`4`,stroke:F.value.targetReference.stroke,"stroke-width":F.value.targetReference.strokeWidth*.7,"stroke-dasharray":F.value.targetReference.strokeDasharray*.7,"stroke-linecap":`round`},null,8,wt)],4))],4),g(`span`,null,T(F.value.targetReference.legendLabel),1)])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):m(``,!0)],!0)],512)],8,[`to`])):m(``,!0),e.$slots.source?(x(),h(`div`,{key:7,ref_key:`source`,ref:qt,dir:`auto`},[w(e.$slots,`source`,{},void 0,!0)],512)):m(``,!0),He(E(kt),{teleportTo:I.value.teleportTo,show:W.value.showTooltip&&Ht.value,backgroundColor:I.value.backgroundColor,color:I.value.color,borderRadius:I.value.borderRadius,borderColor:I.value.borderColor,borderWidth:I.value.borderWidth,backgroundOpacity:I.value.backgroundOpacity,fontSize:I.value.fontSize,position:I.value.position,offsetX:I.value.offsetX,offsetY:I.value.offsetY,parent:A.value,content:Ut.value,isFullscreen:$.value,isCustom:I.value.customFormat&&typeof I.value.customFormat==`function`,smooth:I.value.smooth,backdropFilter:I.value.backdropFilter,smoothForce:I.value.smoothForce,smoothSnapThreshold:I.value.smoothSnapThreshold,isA11yMode:nn.value===`keyboard`,a11yPosition:tn.value},{"tooltip-before":D(()=>[w(e.$slots,`tooltip-before`,y(v({...qn.value})),void 0,!0)]),tooltip:D(()=>[w(e.$slots,`tooltip`,y(v({...qn.value})),void 0,!0)]),"tooltip-after":D(()=>[![`function`].includes(typeof I.value.customFormat)&&!e.$slots.tooltip?(x(),h(`div`,Tt,[He(E(jt),{dataset:Kn.value,config:bn.value,backgroundOpacity:0},{"data-label":D(({bar:e})=>[g(`div`,Et,[g(`span`,Dt,T(e.name+(I.value.showValue||I.value.showPercentage?`:`:``)),1),I.value.showValue||I.value.showPercentage?(x(),h(`span`,Ot,T(e.suffix),1)):m(``,!0)])]),_:1},8,[`dataset`,`config`])])):m(``,!0),w(e.$slots,`tooltip-after`,y(v({...qn.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`fontSize`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Vt.value&&N.value.buttons.table?(x(),p(Je(ir.value.component),Ue({key:8},ir.value.props,{ref_key:`tableUnit`,ref:$t,onClose:ar}),Be({content:D(()=>[(x(),p(E(Nt),{key:`table_${Xt.value}`,colNames:Q.value.colNames,head:Q.value.head,body:Q.value.body,config:Q.value.config,title:M.value.table.useDialog?``:ir.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:R.value,onClose:ar},{th:D(({th:e})=>[Ve(T(e.name),1)]),td:D(({td:e})=>[Ve(T(e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[M.value.table.useDialog?{name:`title`,fn:D(()=>[Ve(T(ir.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:D(()=>[g(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[1]||=e=>Zn(N.value.callbacks.csv),style:b({cursor:R.value?`pointer`:`default`})},[He(E(At),{name:`fileCsv`,stroke:ir.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):m(``,!0),w(e.$slots,`skeleton`,{},()=>[E(on)?(x(),p(Se,{key:0})):m(``,!0)],!0)],46,$e))}},[[`__scopeId`,`data-v-4c2db0d1`]]);export{Qe as n,kt as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{$ as t,B as n,X as r,Yt as i,at as a,i as o,t as s,zt as c}from"./lib-zDxoqrgo.js";import{n as ee,t as te}from"./useHints-BH9r_0Vd.js";import{t as l}from"./useConfig-CKdzPrcf.js";import{t as u}from"./useNestedProp-CT9phgWx.js";import{t as d}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as f}from"./DefGrad-DKMq1REY.js";import{Fragment as p,computed as m,createCommentVNode as h,createElementBlock as g,createElementVNode as _,createVNode as v,mergeProps as y,normalizeStyle as b,onMounted as x,openBlock as S,ref as C,renderList as ne,renderSlot as w,toDisplayString as T,unref as E,useSlots as re,watch as ie,withKeys as D}from"vue";var O=/* @__PURE__ */ e({default:()=>F}),k={key:0,class:`vue-ui-rating-title`,style:{width:`100%`}},A={key:0,style:{position:`relative`}},j={key:0,style:{position:`absolute`,top:`0`,left:`0`,width:`100%`,height:`100%`}},M={key:1,style:{position:`absolute`,top:`0`,left:`0`,width:`100%`,height:`100%`}},N=[`src`,`height`,`width`],ae=[`xmlns`,`height`,`width`],oe=[`points`,`fill`,`stroke`,`stroke-width`],se=[`src`,`alt`,`height`,`width`,`id`],ce=[`xmlns`,`viewBox`,`height`,`id`],le=[`points`,`fill`,`stroke`],ue=[`xmlns`,`height`],de=[`onClick`,`onMouseenter`,`onFocus`,`onKeyup`],P=[`onMouseenter`,`onFocus`],F=/*#__PURE__*/ d({__name:`vue-ui-rating`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`rate`],setup(e,{expose:d,emit:O}){let{vue_ui_rating:F}=l(),I=e,L=C(r()),R=C(!1),z=C(void 0),B=C(void 0),V=C([]),fe=re(),pe=O,H=m({get:()=>G(),set:e=>e}),U=m(()=>H.value.style.rating),W=m(()=>H.value.style);x(()=>{fe[`chart-background`]&&H.value.debug&&console.warn(`VueUiRating does not support the #chart-background slot.`)}),ee({config:()=>H.value,dataset:()=>[],component:`VueUiRating`,rules:[te.noHint]});let me=m(()=>H.value.useCursorPointer);function G(){return u({userConfig:I.config,defaultConfig:F})}ie(()=>I.config,e=>{H.value=G(),X()},{deep:!0});let he=m(()=>typeof I.dataset.rating==`object`&&!Array.isArray(I.dataset.rating)?Y(I.dataset.rating):I.dataset.rating),ge=m(()=>typeof I.dataset.rating==`object`&&!Array.isArray(I.dataset.rating)),K=C(he.value),q=m(()=>H.value.type===`image`),J=m(()=>H.value.readonly);function Y(e){let t=0,n=0;for(let r in e){let i=parseInt(r),a=e[r];t+=i*a,n+=a}if(n===0)return 0;let r=t/n;return Math.min(H.value.to,Math.max(H.value.from,r))}x(()=>{X()});function X(){(!Object.hasOwn(I.dataset,`rating`)||c(I.dataset))&&a({componentName:`VueUiRating`,type:`datasetAttribute`,property:`rating`,debug:H.value.debug}),V.value=[];for(let e=H.value.from;e<=H.value.to;e+=1)V.value.push(e)}function Z(e,t=!1){return e>z.value||J.value?t?W.value.image.inactiveOpacity:W.value.star.inactiveColor:t?1:W.value.star.useGradient?`url(#star_gradient_under_${L.value})`:W.value.star.activeColor}function Q(e,t=!1){let n=K.value-e,r=t?1:100;switch(!0){case n<=0:return .001;case n>1:return 1*r;default:return n*r}}function $(e){J.value||(K.value=e,pe(`rate`,e))}function _e(){return K.value}function ve(e=!0){J.value=e}return d({getData:_e,toggleReadonly:ve}),(e,r)=>(S(),g(`div`,{style:b(`background:${W.value.backgroundColor};font-family:${W.value.fontFamily};width:100%`),class:`vue-data-ui-component vue-ui-rating`,onMouseover:r[4]||=e=>R.value=!0,onMouseleave:r[5]||=e=>{R.value=!1,z.value=void 0}},[W.value.title.text?(S(),g(`div`,k,[_(`div`,{style:b(`color:${W.value.title.color};font-weight:${W.value.title.bold?`bold`:`normal`};text-align:${W.value.title.textAlign};margin-bottom:${W.value.title.offsetY}px;font-size:${W.value.title.fontSize}px`)},T(W.value.title.text),5),W.value.title.subtitle.text?(S(),g(`div`,{key:0,style:b(`color:${W.value.title.subtitle.color};font-size:${W.value.title.subtitle.fontSize}px;text-align:${W.value.title.textAlign};margin-bottom:${W.value.title.subtitle.offsetY}px;font-weight:${W.value.title.subtitle.bold?`bold`:`normal`}`)},T(W.value.title.subtitle.text),5)):h(``,!0)])):h(``,!0),U.value.show&&U.value.position===`top`?(S(),g(`div`,{key:1,style:b(`width:100%;text-align:center;margin-bottom:${U.value.offsetY}px;font-size:${U.value.fontSize}px;font-weight:${U.value.bold?`bold`:`normal`};margin-left:${U.value.offsetX}px`)},T(E(o)(U.value.formatter,K.value,E(t)({v:K.value,r:U.value.roundingValue}),H.value)),5)):h(``,!0),_(`div`,{class:`vue-ui-rating-wrapper`,style:b(`height:${W.value.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[U.value.show&&U.value.position===`left`?(S(),g(`div`,{key:0,style:b(`width:fit-content;text-align:center;margin-bottom:${U.value.offsetY}px;font-size:${U.value.fontSize}px;font-weight:${U.value.bold?`bold`:`normal`};padding-right:${U.value.offsetX}px`)},T(E(o)(U.value.formatter,K.value,E(t)({v:K.value,r:U.value.roundingValue}),H.value)),5)):h(``,!0),(S(!0),g(p,null,ne(V.value,(a,c)=>(S(),g(`div`,{class:`vue-ui-rating-unit-container`,style:b(`position:relative;height:${W.value.itemSize}px;width:${W.value.itemSize}px`)},[e.$slots[`layer-under`]||e.$slots[`layer-above`]?(S(),g(`div`,A,[e.$slots[`layer-under`]?(S(),g(`div`,j,[w(e.$slots,`layer-under`,y({ref_for:!0},{value:a,size:W.value.itemSize,hoveredValue:z.value,focusedValue:B.value}),void 0,!0)])):h(``,!0),e.$slots[`layer-above`]?(S(),g(`div`,M,[w(e.$slots,`layer-above`,y({ref_for:!0},{value:a,size:W.value.itemSize,hoveredValue:z.value,focusedValue:B.value}),void 0,!0)])):h(``,!0)])):(S(),g(p,{key:1},[q.value?(S(),g(`img`,{key:0,src:W.value.image.src,height:W.value.itemSize,width:W.value.itemSize,class:`vue-ui-rating-unit`,style:b(`position:absolute;top:0;left:0;opacity:${isNaN(z.value)?W.value.image.inactiveOpacity:Z(a,!0)}`)},null,12,N)):(S(),g(`svg`,{key:1,xmlns:E(s),viewBox:`0 0 100 100`,height:W.value.itemSize,width:W.value.itemSize,class:`vue-ui-rating-unit`},[_(`defs`,null,[v(f,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`star_gradient_under_${L.value}`,stops:[[`0%`,E(i)(W.value.star.activeColor,.05),1],[`100%`,W.value.star.activeColor,1]]},null,8,[`id`,`stops`])]),_(`polygon`,{points:E(n)({plot:{x:50,y:50},radius:30,apexes:W.value.star.apexes}),fill:isNaN(z.value)?W.value.star.inactiveColor:Z(a),stroke:W.value.star.borderColor?W.value.star.borderColor:z.value?Z(a):W.value.star.inactiveColor,"stroke-width":W.value.star.borderWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,oe)],8,ae)),q.value?(S(),g(`img`,{key:2,src:W.value.image.src,alt:`${W.value.image.alt} ${a}`,height:W.value.itemSize,width:W.value.itemSize,id:`active_${L.value}_${a}`,class:`vue-ui-rating-unit`,style:b(`position:absolute;top:0;left:0;clip:rect(0px,${Q(c,!0)*W.value.itemSize}px,${W.value.itemSize}px,0px`)},null,12,se)):(S(),g(`svg`,{key:3,xmlns:E(s),viewBox:`0 0 ${Q(c)} 100`,height:W.value.itemSize,class:`vue-ui-rating-unit`,id:`active_${L.value}_${a}`,style:{position:`absolute`,top:`0`,left:`0`}},[_(`defs`,null,[v(f,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`star_gradient_over_${L.value}`,stops:[[`0%`,E(i)(W.value.star.activeColor,.05),1],[`100%`,W.value.star.activeColor,1]]},null,8,[`id`,`stops`])]),_(`polygon`,{points:E(n)({plot:{x:50,y:50},radius:30,apexes:W.value.star.apexes}),fill:W.value.star.useGradient?`url(#star_gradient_over_${L.value})`:W.value.star.activeColor,stroke:W.value.star.activeColor},null,8,le)],8,ce))],64)),(S(),g(`svg`,{xmlns:E(s),viewBox:`0 0 100 100`,height:W.value.itemSize,class:`vue-ui-rating-unit`,style:b(`position:absolute;top:0;left:0;${J.value?``:me.value?`cursor:pointer`:``}`)},[J.value?h(``,!0):(S(),g(`rect`,{key:0,class:`vue-ui-rating-mouse-trap`,x:0,y:0,width:100,height:100,fill:`transparent`,onClick:e=>$(a),onMouseenter:e=>z.value=a,onMouseleave:r[0]||=e=>z.value=void 0,onFocus:e=>B.value=a,onBlur:r[1]||=e=>B.value=void 0,tabindex:`0`,onKeyup:D(e=>$(a),[`enter`])},null,40,de)),J.value?(S(),g(`rect`,{key:1,class:`vue-ui-rating-mouse-trap`,x:0,y:0,width:100,height:100,fill:`transparent`,onMouseenter:e=>z.value=a,onMouseleave:r[2]||=e=>z.value=void 0,onFocus:e=>B.value=a,onBlur:r[3]||=e=>B.value=void 0},null,40,P)):h(``,!0)],12,ue)),W.value.tooltip.show&&ge.value&&J.value?(S(),g(`div`,{key:2,class:`vue-ui-rating-tooltip`,style:b(`border:1px solid ${W.value.tooltip.borderColor};position:absolute;top:${-48+W.value.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${W.value.tooltip.backgroundColor};display:${z.value===a?`block`:`none`};padding:2px 12px;border-radius:${W.value.tooltip.borderRadius}px;box-shadow:${W.value.tooltip.boxShadow}`)},[_(`div`,{style:b(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${W.value.tooltip.color}`)},[_(`span`,{style:b(`font-size:${W.value.tooltip.fontSize}px`)},T(a)+`:`,5),_(`span`,{style:b(`font-weight:${W.value.tooltip.bold?`bold`:`normal`};font-size:${W.value.tooltip.fontSize}px`)},T(E(o)(W.value.tooltip.formatter,I.dataset.rating[a],E(t)({v:I.dataset.rating[a],r:W.value.tooltip.roundingValue}),H.value)),5),_(`div`,{style:b(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${W.value.tooltip.borderColor}`)},` ▼ `,4)],4)],4)):h(``,!0)],4))),256)),U.value.show&&U.value.position===`right`?(S(),g(`div`,{key:1,style:b(`width:fit-content;text-align:center;margin-bottom:${U.value.offsetY}px;font-size:${U.value.fontSize}px;font-weight:${U.value.bold?`bold`:`normal`};padding-left:${U.value.offsetX}px`)},T(E(o)(U.value.formatter,K.value,E(t)({v:K.value,r:U.value.roundingValue}),H.value)),5)):h(``,!0)],4),U.value.show&&U.value.position===`bottom`?(S(),g(`div`,{key:2,style:b(`width:100%;text-align:center;margin-top:${U.value.offsetY}px;font-size:${U.value.fontSize}px;font-weight:${U.value.bold?`bold`:`normal`};margin-left:${U.value.offsetX}px`)},T(E(o)(U.value.formatter,K.value,E(t)({v:K.value,r:U.value.roundingValue}),H.value)),5)):h(``,!0)],36))}},[[`__scopeId`,`data-v-cdcab4d9`]]);export{O as n,F as t};
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{$ as t,B as n,X as r,Yt as i,at as a,i as o,t as s,zt as c}from"./lib-CV_IANZ6.js";import{n as ee,t as te}from"./useHints-BH9r_0Vd.js";import{t as l}from"./useConfig-CKdzPrcf.js";import{t as u}from"./useNestedProp-CB186vF2.js";import{t as d}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as f}from"./DefGrad-DKMq1REY.js";import{Fragment as p,computed as m,createCommentVNode as h,createElementBlock as g,createElementVNode as _,createVNode as v,mergeProps as y,normalizeStyle as b,onMounted as x,openBlock as S,ref as C,renderList as ne,renderSlot as w,toDisplayString as T,unref as E,useSlots as re,watch as ie,withKeys as D}from"vue";var O=/* @__PURE__ */ e({default:()=>F}),k={key:0,class:`vue-ui-rating-title`,style:{width:`100%`}},A={key:0,style:{position:`relative`}},j={key:0,style:{position:`absolute`,top:`0`,left:`0`,width:`100%`,height:`100%`}},M={key:1,style:{position:`absolute`,top:`0`,left:`0`,width:`100%`,height:`100%`}},N=[`src`,`height`,`width`],ae=[`xmlns`,`height`,`width`],oe=[`points`,`fill`,`stroke`,`stroke-width`],se=[`src`,`alt`,`height`,`width`,`id`],ce=[`xmlns`,`viewBox`,`height`,`id`],le=[`points`,`fill`,`stroke`],ue=[`xmlns`,`height`],de=[`onClick`,`onMouseenter`,`onFocus`,`onKeyup`],P=[`onMouseenter`,`onFocus`],F=/*#__PURE__*/ d({__name:`vue-ui-rating`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`rate`],setup(e,{expose:d,emit:O}){let{vue_ui_rating:F}=l(),I=e,L=C(r()),R=C(!1),z=C(void 0),B=C(void 0),V=C([]),fe=re(),pe=O,H=m({get:()=>G(),set:e=>e}),U=m(()=>H.value.style.rating),W=m(()=>H.value.style);x(()=>{fe[`chart-background`]&&H.value.debug&&console.warn(`VueUiRating does not support the #chart-background slot.`)}),ee({config:()=>H.value,dataset:()=>[],component:`VueUiRating`,rules:[te.noHint]});let me=m(()=>H.value.useCursorPointer);function G(){return u({userConfig:I.config,defaultConfig:F})}ie(()=>I.config,e=>{H.value=G(),X()},{deep:!0});let he=m(()=>typeof I.dataset.rating==`object`&&!Array.isArray(I.dataset.rating)?Y(I.dataset.rating):I.dataset.rating),ge=m(()=>typeof I.dataset.rating==`object`&&!Array.isArray(I.dataset.rating)),K=C(he.value),q=m(()=>H.value.type===`image`),J=m(()=>H.value.readonly);function Y(e){let t=0,n=0;for(let r in e){let i=parseInt(r),a=e[r];t+=i*a,n+=a}if(n===0)return 0;let r=t/n;return Math.min(H.value.to,Math.max(H.value.from,r))}x(()=>{X()});function X(){(!Object.hasOwn(I.dataset,`rating`)||c(I.dataset))&&a({componentName:`VueUiRating`,type:`datasetAttribute`,property:`rating`,debug:H.value.debug}),V.value=[];for(let e=H.value.from;e<=H.value.to;e+=1)V.value.push(e)}function Z(e,t=!1){return e>z.value||J.value?t?W.value.image.inactiveOpacity:W.value.star.inactiveColor:t?1:W.value.star.useGradient?`url(#star_gradient_under_${L.value})`:W.value.star.activeColor}function Q(e,t=!1){let n=K.value-e,r=t?1:100;switch(!0){case n<=0:return .001;case n>1:return 1*r;default:return n*r}}function $(e){J.value||(K.value=e,pe(`rate`,e))}function _e(){return K.value}function ve(e=!0){J.value=e}return d({getData:_e,toggleReadonly:ve}),(e,r)=>(S(),g(`div`,{style:b(`background:${W.value.backgroundColor};font-family:${W.value.fontFamily};width:100%`),class:`vue-data-ui-component vue-ui-rating`,onMouseover:r[4]||=e=>R.value=!0,onMouseleave:r[5]||=e=>{R.value=!1,z.value=void 0}},[W.value.title.text?(S(),g(`div`,k,[_(`div`,{style:b(`color:${W.value.title.color};font-weight:${W.value.title.bold?`bold`:`normal`};text-align:${W.value.title.textAlign};margin-bottom:${W.value.title.offsetY}px;font-size:${W.value.title.fontSize}px`)},T(W.value.title.text),5),W.value.title.subtitle.text?(S(),g(`div`,{key:0,style:b(`color:${W.value.title.subtitle.color};font-size:${W.value.title.subtitle.fontSize}px;text-align:${W.value.title.textAlign};margin-bottom:${W.value.title.subtitle.offsetY}px;font-weight:${W.value.title.subtitle.bold?`bold`:`normal`}`)},T(W.value.title.subtitle.text),5)):h(``,!0)])):h(``,!0),U.value.show&&U.value.position===`top`?(S(),g(`div`,{key:1,style:b(`width:100%;text-align:center;margin-bottom:${U.value.offsetY}px;font-size:${U.value.fontSize}px;font-weight:${U.value.bold?`bold`:`normal`};margin-left:${U.value.offsetX}px`)},T(E(o)(U.value.formatter,K.value,E(t)({v:K.value,r:U.value.roundingValue}),H.value)),5)):h(``,!0),_(`div`,{class:`vue-ui-rating-wrapper`,style:b(`height:${W.value.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[U.value.show&&U.value.position===`left`?(S(),g(`div`,{key:0,style:b(`width:fit-content;text-align:center;margin-bottom:${U.value.offsetY}px;font-size:${U.value.fontSize}px;font-weight:${U.value.bold?`bold`:`normal`};padding-right:${U.value.offsetX}px`)},T(E(o)(U.value.formatter,K.value,E(t)({v:K.value,r:U.value.roundingValue}),H.value)),5)):h(``,!0),(S(!0),g(p,null,ne(V.value,(a,c)=>(S(),g(`div`,{class:`vue-ui-rating-unit-container`,style:b(`position:relative;height:${W.value.itemSize}px;width:${W.value.itemSize}px`)},[e.$slots[`layer-under`]||e.$slots[`layer-above`]?(S(),g(`div`,A,[e.$slots[`layer-under`]?(S(),g(`div`,j,[w(e.$slots,`layer-under`,y({ref_for:!0},{value:a,size:W.value.itemSize,hoveredValue:z.value,focusedValue:B.value}),void 0,!0)])):h(``,!0),e.$slots[`layer-above`]?(S(),g(`div`,M,[w(e.$slots,`layer-above`,y({ref_for:!0},{value:a,size:W.value.itemSize,hoveredValue:z.value,focusedValue:B.value}),void 0,!0)])):h(``,!0)])):(S(),g(p,{key:1},[q.value?(S(),g(`img`,{key:0,src:W.value.image.src,height:W.value.itemSize,width:W.value.itemSize,class:`vue-ui-rating-unit`,style:b(`position:absolute;top:0;left:0;opacity:${isNaN(z.value)?W.value.image.inactiveOpacity:Z(a,!0)}`)},null,12,N)):(S(),g(`svg`,{key:1,xmlns:E(s),viewBox:`0 0 100 100`,height:W.value.itemSize,width:W.value.itemSize,class:`vue-ui-rating-unit`},[_(`defs`,null,[v(f,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`star_gradient_under_${L.value}`,stops:[[`0%`,E(i)(W.value.star.activeColor,.05),1],[`100%`,W.value.star.activeColor,1]]},null,8,[`id`,`stops`])]),_(`polygon`,{points:E(n)({plot:{x:50,y:50},radius:30,apexes:W.value.star.apexes}),fill:isNaN(z.value)?W.value.star.inactiveColor:Z(a),stroke:W.value.star.borderColor?W.value.star.borderColor:z.value?Z(a):W.value.star.inactiveColor,"stroke-width":W.value.star.borderWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,oe)],8,ae)),q.value?(S(),g(`img`,{key:2,src:W.value.image.src,alt:`${W.value.image.alt} ${a}`,height:W.value.itemSize,width:W.value.itemSize,id:`active_${L.value}_${a}`,class:`vue-ui-rating-unit`,style:b(`position:absolute;top:0;left:0;clip:rect(0px,${Q(c,!0)*W.value.itemSize}px,${W.value.itemSize}px,0px`)},null,12,se)):(S(),g(`svg`,{key:3,xmlns:E(s),viewBox:`0 0 ${Q(c)} 100`,height:W.value.itemSize,class:`vue-ui-rating-unit`,id:`active_${L.value}_${a}`,style:{position:`absolute`,top:`0`,left:`0`}},[_(`defs`,null,[v(f,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`star_gradient_over_${L.value}`,stops:[[`0%`,E(i)(W.value.star.activeColor,.05),1],[`100%`,W.value.star.activeColor,1]]},null,8,[`id`,`stops`])]),_(`polygon`,{points:E(n)({plot:{x:50,y:50},radius:30,apexes:W.value.star.apexes}),fill:W.value.star.useGradient?`url(#star_gradient_over_${L.value})`:W.value.star.activeColor,stroke:W.value.star.activeColor},null,8,le)],8,ce))],64)),(S(),g(`svg`,{xmlns:E(s),viewBox:`0 0 100 100`,height:W.value.itemSize,class:`vue-ui-rating-unit`,style:b(`position:absolute;top:0;left:0;${J.value?``:me.value?`cursor:pointer`:``}`)},[J.value?h(``,!0):(S(),g(`rect`,{key:0,class:`vue-ui-rating-mouse-trap`,x:0,y:0,width:100,height:100,fill:`transparent`,onClick:e=>$(a),onMouseenter:e=>z.value=a,onMouseleave:r[0]||=e=>z.value=void 0,onFocus:e=>B.value=a,onBlur:r[1]||=e=>B.value=void 0,tabindex:`0`,onKeyup:D(e=>$(a),[`enter`])},null,40,de)),J.value?(S(),g(`rect`,{key:1,class:`vue-ui-rating-mouse-trap`,x:0,y:0,width:100,height:100,fill:`transparent`,onMouseenter:e=>z.value=a,onMouseleave:r[2]||=e=>z.value=void 0,onFocus:e=>B.value=a,onBlur:r[3]||=e=>B.value=void 0},null,40,P)):h(``,!0)],12,ue)),W.value.tooltip.show&&ge.value&&J.value?(S(),g(`div`,{key:2,class:`vue-ui-rating-tooltip`,style:b(`border:1px solid ${W.value.tooltip.borderColor};position:absolute;top:${-48+W.value.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${W.value.tooltip.backgroundColor};display:${z.value===a?`block`:`none`};padding:2px 12px;border-radius:${W.value.tooltip.borderRadius}px;box-shadow:${W.value.tooltip.boxShadow}`)},[_(`div`,{style:b(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${W.value.tooltip.color}`)},[_(`span`,{style:b(`font-size:${W.value.tooltip.fontSize}px`)},T(a)+`:`,5),_(`span`,{style:b(`font-weight:${W.value.tooltip.bold?`bold`:`normal`};font-size:${W.value.tooltip.fontSize}px`)},T(E(o)(W.value.tooltip.formatter,I.dataset.rating[a],E(t)({v:I.dataset.rating[a],r:W.value.tooltip.roundingValue}),H.value)),5),_(`div`,{style:b(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${W.value.tooltip.borderColor}`)},` ▼ `,4)],4)],4)):h(``,!0)],4))),256)),U.value.show&&U.value.position===`right`?(S(),g(`div`,{key:1,style:b(`width:fit-content;text-align:center;margin-bottom:${U.value.offsetY}px;font-size:${U.value.fontSize}px;font-weight:${U.value.bold?`bold`:`normal`};padding-left:${U.value.offsetX}px`)},T(E(o)(U.value.formatter,K.value,E(t)({v:K.value,r:U.value.roundingValue}),H.value)),5)):h(``,!0)],4),U.value.show&&U.value.position===`bottom`?(S(),g(`div`,{key:2,style:b(`width:100%;text-align:center;margin-top:${U.value.offsetY}px;font-size:${U.value.fontSize}px;font-weight:${U.value.bold?`bold`:`normal`};margin-left:${U.value.offsetX}px`)},T(E(o)(U.value.formatter,K.value,E(t)({v:K.value,r:U.value.roundingValue}),H.value)),5)):h(``,!0)],36))}},[[`__scopeId`,`data-v-cdcab4d9`]]);export{O as n,F as t};