vue-data-ui 3.28.9 → 3.28.10

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 (209) hide show
  1. package/dist/{PackageVersion-D6_O7PmZ.js → PackageVersion-DKSNC-YP.js} +1 -1
  2. package/dist/StackChartTable-CZteRybF.js +1 -0
  3. package/dist/{XyAnalysisOptions-djGOJdKc.js → XyAnalysisOptions-CV22ga_a.js} +1 -1
  4. package/dist/components/vue-ui-3d-bar.js +1 -1
  5. package/dist/components/vue-ui-accordion.js +1 -1
  6. package/dist/components/vue-ui-age-pyramid.js +1 -1
  7. package/dist/components/vue-ui-annotator.js +1 -1
  8. package/dist/components/vue-ui-bullet.js +1 -1
  9. package/dist/components/vue-ui-bump.js +1 -1
  10. package/dist/components/vue-ui-candlestick.js +1 -1
  11. package/dist/components/vue-ui-carousel-table.js +1 -1
  12. package/dist/components/vue-ui-chestnut.js +1 -1
  13. package/dist/components/vue-ui-chord.js +1 -1
  14. package/dist/components/vue-ui-circle-pack.js +1 -1
  15. package/dist/components/vue-ui-cursor.js +1 -1
  16. package/dist/components/vue-ui-dag.js +1 -1
  17. package/dist/components/vue-ui-dashboard.js +1 -1
  18. package/dist/components/vue-ui-digits.js +1 -1
  19. package/dist/components/vue-ui-donut-evolution.js +1 -1
  20. package/dist/components/vue-ui-donut.js +1 -1
  21. package/dist/components/vue-ui-dumbbell.js +1 -1
  22. package/dist/components/vue-ui-flow.js +1 -1
  23. package/dist/components/vue-ui-funnel.js +1 -1
  24. package/dist/components/vue-ui-galaxy.js +1 -1
  25. package/dist/components/vue-ui-gauge.js +1 -1
  26. package/dist/components/vue-ui-geo.js +1 -1
  27. package/dist/components/vue-ui-gizmo.js +1 -1
  28. package/dist/components/vue-ui-graph.js +1 -1
  29. package/dist/components/vue-ui-heatmap.js +1 -1
  30. package/dist/components/vue-ui-hill.js +1 -1
  31. package/dist/components/vue-ui-history-plot.js +1 -1
  32. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  33. package/dist/components/vue-ui-kpi.js +1 -1
  34. package/dist/components/vue-ui-label.js +1 -1
  35. package/dist/components/vue-ui-mini-loader.js +1 -1
  36. package/dist/components/vue-ui-molecule.js +1 -1
  37. package/dist/components/vue-ui-mood-radar.js +1 -1
  38. package/dist/components/vue-ui-nested-donuts.js +1 -1
  39. package/dist/components/vue-ui-onion.js +1 -1
  40. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  41. package/dist/components/vue-ui-quadrant.js +1 -1
  42. package/dist/components/vue-ui-quick-chart.js +1 -1
  43. package/dist/components/vue-ui-radar.js +1 -1
  44. package/dist/components/vue-ui-rating.js +1 -1
  45. package/dist/components/vue-ui-relation-circle.js +1 -1
  46. package/dist/components/vue-ui-ridgeline.js +1 -1
  47. package/dist/components/vue-ui-rings.js +1 -1
  48. package/dist/components/vue-ui-scatter.js +1 -1
  49. package/dist/components/vue-ui-skeleton.js +1 -1
  50. package/dist/components/vue-ui-smiley.js +1 -1
  51. package/dist/components/vue-ui-spark-trend.js +1 -1
  52. package/dist/components/vue-ui-sparkbar.js +1 -1
  53. package/dist/components/vue-ui-sparkgauge.js +1 -1
  54. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  55. package/dist/components/vue-ui-sparkline.js +1 -1
  56. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  57. package/dist/components/vue-ui-stackbar.js +1 -1
  58. package/dist/components/vue-ui-stackline.js +1 -1
  59. package/dist/components/vue-ui-strip-plot.js +1 -1
  60. package/dist/components/vue-ui-table-heatmap.js +1 -1
  61. package/dist/components/vue-ui-table-sparkline.js +1 -1
  62. package/dist/components/vue-ui-table.js +1 -1
  63. package/dist/components/vue-ui-thermometer.js +1 -1
  64. package/dist/components/vue-ui-timer.js +1 -1
  65. package/dist/components/vue-ui-tiremarks.js +1 -1
  66. package/dist/components/vue-ui-treemap.js +1 -1
  67. package/dist/components/vue-ui-vertical-bar.js +1 -1
  68. package/dist/components/vue-ui-waffle.js +1 -1
  69. package/dist/components/vue-ui-wheel.js +1 -1
  70. package/dist/components/vue-ui-word-cloud.js +1 -1
  71. package/dist/components/vue-ui-world.js +1 -1
  72. package/dist/components/vue-ui-xy-canvas.js +1 -1
  73. package/dist/components/vue-ui-xy.js +1 -1
  74. package/dist/package-CXaebsLV.js +1 -0
  75. package/dist/{render-common-BbY81Ao2.js → render-common-Cy1X2PzP.js} +1 -1
  76. package/dist/ssr/vue-ui-donut.js +1 -1
  77. package/dist/ssr/vue-ui-xy.js +1 -1
  78. package/dist/ssr.js +1 -1
  79. package/dist/style.css +1 -1
  80. package/dist/{useConfig-By3Vb5kz.js → useConfig-C3FbHv4N.js} +1 -1
  81. package/dist/{useObjectBindings-0vvvimYP.js → useObjectBindings-C_70Czuj.js} +1 -1
  82. package/dist/{userOptionsSlots-DYuo-E5m.js → userOptionsSlots-CWtXN5Q6.js} +1 -1
  83. package/dist/utils.js +1 -1
  84. package/dist/vue-data-ui-O-w339Ac.js +1 -0
  85. package/dist/vue-data-ui.js +1 -1
  86. package/dist/vue-ui-3d-bar-CcFFARyq.js +19 -0
  87. package/dist/{vue-ui-accordion-DFxSW8ET.js → vue-ui-accordion-E8TJfFeK.js} +1 -1
  88. package/dist/vue-ui-age-pyramid-Di6fKV6f.js +1 -0
  89. package/dist/vue-ui-annotator-sBGtsgcb.js +331 -0
  90. package/dist/vue-ui-bullet-BZLa1xj7.js +34 -0
  91. package/dist/vue-ui-bump-BSdpAH0l.js +8 -0
  92. package/dist/vue-ui-candlestick-BKZASgq9.js +22 -0
  93. package/dist/vue-ui-carousel-table-B20E2K8A.js +1 -0
  94. package/dist/vue-ui-chestnut-DavvzmiQ.js +1 -0
  95. package/dist/vue-ui-chord-D2Hn54i7.js +21 -0
  96. package/dist/vue-ui-circle-pack-BKaS-zWo.js +13 -0
  97. package/dist/{vue-ui-cursor-D3E3f7Lc.js → vue-ui-cursor-BUOHKNmb.js} +1 -1
  98. package/dist/vue-ui-dag-SLYPxbGo.js +9 -0
  99. package/dist/vue-ui-dashboard-Bgt7VLv0.js +1 -0
  100. package/dist/{vue-ui-digits-p2met3a2.js → vue-ui-digits-DbxT72mM.js} +1 -1
  101. package/dist/{vue-ui-donut-CZbBq7bs.js → vue-ui-donut-8ZWyXEVs.js} +1 -1
  102. package/dist/vue-ui-donut-DBcB8Ym1.js +47 -0
  103. package/dist/vue-ui-donut-evolution-D3lo74Ce.js +2 -0
  104. package/dist/vue-ui-dumbbell-CdarkL8Z.js +9 -0
  105. package/dist/vue-ui-flow-B0dYxGWT.js +3 -0
  106. package/dist/vue-ui-funnel-C0Cl9jMd.js +1 -0
  107. package/dist/vue-ui-galaxy-C_UWOQn4.js +1 -0
  108. package/dist/vue-ui-gauge-B94ToHlW.js +1 -0
  109. package/dist/vue-ui-geo-V-JmJgKS.js +1 -0
  110. package/dist/{vue-ui-gizmo-COJHVo7O.js → vue-ui-gizmo-BvVDEnNu.js} +1 -1
  111. package/dist/{vue-ui-graph-BqnyGn9p.js → vue-ui-graph-9YSKwYhC.js} +1 -1
  112. package/dist/vue-ui-heatmap-DWtbocz5.js +1 -0
  113. package/dist/vue-ui-hill-BH_lYm5G.js +1 -0
  114. package/dist/vue-ui-history-plot-DkWvta0h.js +2 -0
  115. package/dist/vue-ui-horizontal-bar-DbJ1DFjG.js +4 -0
  116. package/dist/{vue-ui-kpi-D1Ps7D_O.js → vue-ui-kpi-BxW6DctE.js} +1 -1
  117. package/dist/{vue-ui-label-W0oz08pp.js → vue-ui-label-rxuzmeyD.js} +1 -1
  118. package/dist/{vue-ui-mini-loader-OLYDdN3T.js → vue-ui-mini-loader-DpAYrTYb.js} +1 -1
  119. package/dist/vue-ui-molecule-BrG8K2Tm.js +1 -0
  120. package/dist/vue-ui-mood-radar-DEpFpfiW.js +1 -0
  121. package/dist/vue-ui-nested-donuts-CZetOzaq.js +19 -0
  122. package/dist/vue-ui-onion-DvyAxUSj.js +5 -0
  123. package/dist/vue-ui-parallel-coordinate-plot-Bdakcv3w.js +9 -0
  124. package/dist/vue-ui-quadrant-CWZeQjHE.js +2 -0
  125. package/dist/vue-ui-quick-chart-BULxPrPs.js +16 -0
  126. package/dist/vue-ui-radar-CJ_5G0QP.js +1 -0
  127. package/dist/{vue-ui-rating-B9HeTCLa.js → vue-ui-rating-QcJoab0i.js} +1 -1
  128. package/dist/vue-ui-relation-circle-Vetly6f0.js +1 -0
  129. package/dist/vue-ui-ridgeline-5a87TiQf.js +2 -0
  130. package/dist/vue-ui-rings-CKuFf5vA.js +1 -0
  131. package/dist/vue-ui-scatter-C2hNg3ED.js +9 -0
  132. package/dist/{vue-ui-skeleton-98OnGJ2N.js → vue-ui-skeleton-SlYTmirP.js} +1 -1
  133. package/dist/{vue-ui-smiley-Cht1imV-.js → vue-ui-smiley-DZVFOGfv.js} +1 -1
  134. package/dist/{vue-ui-spark-trend-C4uYyXEy.js → vue-ui-spark-trend-D155vscB.js} +1 -1
  135. package/dist/{vue-ui-sparkbar-BcZyqPB9.js → vue-ui-sparkbar-DFShNanl.js} +1 -1
  136. package/dist/{vue-ui-sparkgauge-dBZzMqn5.js → vue-ui-sparkgauge-CFj0wLj5.js} +1 -1
  137. package/dist/{vue-ui-sparkhistogram-DcbAY6vr.js → vue-ui-sparkhistogram-DwDcqqEj.js} +1 -1
  138. package/dist/{vue-ui-sparkline-BizzsAR5.js → vue-ui-sparkline-kxl5wQGY.js} +1 -1
  139. package/dist/{vue-ui-sparkstackbar-xlg048YB.js → vue-ui-sparkstackbar-CHjaAWVJ.js} +1 -1
  140. package/dist/vue-ui-stackbar-BrtUg-Mb.js +29 -0
  141. package/dist/vue-ui-stackline-CU2UkEJU.js +39 -0
  142. package/dist/vue-ui-strip-plot-BmEpoIoU.js +2 -0
  143. package/dist/vue-ui-table-Ddg209i0.js +14 -0
  144. package/dist/vue-ui-table-heatmap-B8AdX6Nq.js +1 -0
  145. package/dist/{vue-ui-table-sparkline-B6ynMUGE.js → vue-ui-table-sparkline-B62l_ODH.js} +1 -1
  146. package/dist/vue-ui-thermometer-CvxyfTWE.js +1 -0
  147. package/dist/{vue-ui-timer-B1JNZk6j.js → vue-ui-timer-BkNtid9A.js} +2 -2
  148. package/dist/vue-ui-tiremarks-BE0nbuHp.js +1 -0
  149. package/dist/vue-ui-treemap-B9wAoh5g.js +1 -0
  150. package/dist/vue-ui-waffle-DqeBiuY3.js +1 -0
  151. package/dist/vue-ui-wheel---NZaS40.js +1 -0
  152. package/dist/vue-ui-word-cloud-DRFGFVmf.js +4 -0
  153. package/dist/vue-ui-world-D5gKzypf.js +19 -0
  154. package/dist/{vue-ui-xy-B2lrTGG4.js → vue-ui-xy-Caj8jz6D.js} +1 -1
  155. package/dist/vue-ui-xy-CcVIXfL_.js +27 -0
  156. package/dist/vue-ui-xy-canvas-BceSG3AO.js +9 -0
  157. package/package.json +1 -1
  158. package/dist/package-BEq7yyhf.js +0 -1
  159. package/dist/vue-data-ui-BwiGr37w.js +0 -1
  160. package/dist/vue-ui-3d-bar-C2igj6OX.js +0 -19
  161. package/dist/vue-ui-age-pyramid-DOG_ZOgO.js +0 -1
  162. package/dist/vue-ui-annotator-BnR2XnsL.js +0 -331
  163. package/dist/vue-ui-bullet-HUKP90GR.js +0 -34
  164. package/dist/vue-ui-bump-BuHuxEzm.js +0 -8
  165. package/dist/vue-ui-candlestick-CZkyowA5.js +0 -22
  166. package/dist/vue-ui-carousel-table-B73USTMi.js +0 -1
  167. package/dist/vue-ui-chestnut-VdMHjsWk.js +0 -1
  168. package/dist/vue-ui-chord-DfWjMAuo.js +0 -21
  169. package/dist/vue-ui-circle-pack-ByV3SOkF.js +0 -13
  170. package/dist/vue-ui-dag-DlllVyCV.js +0 -9
  171. package/dist/vue-ui-dashboard-C9aGsEAi.js +0 -1
  172. package/dist/vue-ui-donut-BlQXnf7O.js +0 -47
  173. package/dist/vue-ui-donut-evolution-Csq1sqhK.js +0 -2
  174. package/dist/vue-ui-dumbbell-ChLfyyGq.js +0 -9
  175. package/dist/vue-ui-flow-DfEHi_Cq.js +0 -3
  176. package/dist/vue-ui-funnel-QCG-rmsx.js +0 -1
  177. package/dist/vue-ui-galaxy-DFTeXUse.js +0 -1
  178. package/dist/vue-ui-gauge-XTx--A-H.js +0 -1
  179. package/dist/vue-ui-geo-BXB5xFcV.js +0 -1
  180. package/dist/vue-ui-heatmap-CPq3bcnS.js +0 -1
  181. package/dist/vue-ui-hill-DKm3PjHT.js +0 -1
  182. package/dist/vue-ui-history-plot-B5OPsHZ1.js +0 -2
  183. package/dist/vue-ui-horizontal-bar-C8SymyhN.js +0 -4
  184. package/dist/vue-ui-molecule-f-GNAQ0p.js +0 -1
  185. package/dist/vue-ui-mood-radar-kp-jOb4S.js +0 -1
  186. package/dist/vue-ui-nested-donuts-DCCSKIGa.js +0 -19
  187. package/dist/vue-ui-onion-KqzGj1z_.js +0 -5
  188. package/dist/vue-ui-parallel-coordinate-plot-dn_41Wv5.js +0 -9
  189. package/dist/vue-ui-quadrant-CP8n4v5B.js +0 -2
  190. package/dist/vue-ui-quick-chart-D8PbGpSw.js +0 -17
  191. package/dist/vue-ui-radar-ybR3N44-.js +0 -1
  192. package/dist/vue-ui-relation-circle-B0PwfFpT.js +0 -1
  193. package/dist/vue-ui-ridgeline-BnslUzA-.js +0 -2
  194. package/dist/vue-ui-rings-B-cOW0Dw.js +0 -1
  195. package/dist/vue-ui-scatter-BX5cTC01.js +0 -9
  196. package/dist/vue-ui-stackbar-2AX-m3Pb.js +0 -29
  197. package/dist/vue-ui-stackline-GKaZJh8y.js +0 -39
  198. package/dist/vue-ui-strip-plot-BhxIrd67.js +0 -2
  199. package/dist/vue-ui-table-D9FJBxrk.js +0 -14
  200. package/dist/vue-ui-table-heatmap-SGJGI5Wq.js +0 -1
  201. package/dist/vue-ui-thermometer-SE_c51TO.js +0 -1
  202. package/dist/vue-ui-tiremarks-Cr8EG4T5.js +0 -1
  203. package/dist/vue-ui-treemap-DKJVe7v7.js +0 -1
  204. package/dist/vue-ui-waffle-DSq3l2sE.js +0 -1
  205. package/dist/vue-ui-wheel-CcYOzS05.js +0 -1
  206. package/dist/vue-ui-word-cloud-gogYiwIU.js +0 -4
  207. package/dist/vue-ui-world-C2zGhq_U.js +0 -19
  208. package/dist/vue-ui-xy-CpS-ASnd.js +0 -27
  209. package/dist/vue-ui-xy-canvas-CXBsRU35.js +0 -9
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,Ht as ee,X as te,at as ne,i as o,in as re,r as ie,rn as ae,t as oe,w as se,yt as ce,zt as le}from"./lib-rPeBMZrn.js";import{n as ue,t as de}from"./BaseScanner-8NdoBs7B.js";import{n as fe,t as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as he}from"./resolveChartConfig-CIhClE5R.js";import{t as ge}from"./img-D4RQwASc.js";import{n as _e}from"./Title-BliHuXfT.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{n as ye,t as be}from"./userOptionsSlots-DYuo-E5m.js";import{t as xe}from"./usePrinter-DVf3YcG5.js";import{c as Se}from"./canvas-lib-22VpOI4_.js";import{t as Ce}from"./useResponsive-CENUxfEL.js";import{t as we}from"./A11yDataTable-DWNlWXzs.js";import{t as Te}from"./useUserOptionState-CXlFnwPv.js";import{t as Ee}from"./useChartAccessibility-DOMuYJfm.js";import{t as De}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Oe}from"./vue_ui_relation_circle-Dkv-cSB6.js";import{Fragment as s,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as ke,createTextVNode as Ae,createVNode as je,defineAsyncComponent as Me,guardReactiveProps as p,mergeProps as Ne,normalizeClass as Pe,normalizeProps as m,normalizeStyle as h,onBeforeUnmount as Fe,onMounted as Ie,openBlock as g,ref as _,renderList as v,renderSlot as y,shallowRef as Le,toDisplayString as b,toRefs as Re,unref as x,useCssVars as ze,watch as Be,withCtx as Ve}from"vue";var He=/* @__PURE__ */ e({default:()=>lt}),Ue=[`id`],We=[`id`],Ge={style:{position:`relative`}},Ke=[`xmlns`,`viewBox`,`aria-describedby`],qe=[`width`,`height`],Je=[`cx`,`cy`,`r`,`stroke`,`stroke-width`],Ye={key:1},Xe=[`stroke`,`d`,`stroke-width`],Ze={style:{"pointer-events":`none`}},Qe=[`cx`,`cy`,`fill`,`r`,`stroke`],$e=[`x`,`y`,`fill`,`font-size`],et={key:2},tt=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],nt={style:{"pointer-events":`none`}},rt=[`cx`,`cy`,`fill`,`r`,`stroke`],it=[`x`,`y`,`fill`,`font-size`],at=[`text-anchor`,`transform`,`x`,`y`,`font-weight`,`font-size`,`fill`,`text-decoration`,`onClick`,`onMouseenter`,`onMouseleave`],ot=[`cx`,`cy`,`fill`,`stroke`,`r`,`onClick`,`onMouseenter`,`onMouseleave`],st={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},ct={key:5,class:`vue-data-ui-watermark`},lt=/*#__PURE__*/ me({__name:`vue-ui-relation-circle`,props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:me,emit:He}){ze(e=>({v6d4223c7:Pt.value,v2ed90bb4:Nt.value,v384e5f88:Ft.value}));let lt=Me(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),ut=Me(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),dt=Me(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),{vue_ui_relation_circle:ft}=i(),S=e,pt=He,mt=c(()=>!!S.dataset&&Object.keys(S.dataset).length),C=_(te()),ht=_(0),w=_(null),gt=_(null),_t=_(null),vt=_(null),yt=_(0),T=_(null),E=_(!1),D=_(Et()),O=c(()=>D.value.userOptions),k=c(()=>D.value.style.weightLabels),A=c(()=>D.value.style);fe({config:()=>D.value,dataset:()=>S.dataset,component:`VueUiRelationCircle`,rules:[pe.noHint]});let j=c(()=>D.value.userOptions.useCursorPointer),bt=c(()=>re({defaultConfig:{userOptions:{show:!1},customPalette:Array(7).fill(`#CACACA`),style:{backgroundColor:`#99999930`,labels:{color:`#6A6A6A`},circle:{stroke:`#6A6A6A`},plot:{color:`#6A6A6A`,useSerieColor:!0},links:{maxWidth:2}}},userConfig:D.value.skeletonConfig??{}})),{loading:xt,FINAL_DATASET:St,manualLoading:Ct}=ue({...Re(S),FINAL_CONFIG:D,prepareConfig:Et,skeletonDataset:S.config?.skeletonDataset??[{id:`A`,label:`_`,relations:[`B`,`C`,`D`,`E`,`F`,`G`]},{id:`B`,label:`_`,relations:[`A`]},{id:`C`,label:`_`,relations:[`A`]},{id:`D`,label:`_`,relations:[`A`]},{id:`E`,label:`_`,relations:[`A`]},{id:`F`,label:`_`,relations:[`A`]},{id:`G`,label:`_`,relations:[`A`]}],skeletonConfig:re({defaultConfig:D.value,userConfig:bt.value})}),{userOptionsVisible:M,setUserOptionsVisibility:wt,keepUserOptionState:Tt}=Te({config:D.value}),{svgRef:N}=Ee({config:A.value.title});function Et(){return he(S.config,ft,Oe)}Be(()=>S.config,e=>{D.value=Et(),M.value=!D.value.userOptions.showOnChartHover,V.value=A.value.size,H.value=k.value.size,U.value=A.value.plot.radius,W.value=A.value.labels.fontSize,G.value.height=A.value.size,G.value.width=A.value.size,Lt(),yt.value+=1},{deep:!0}),Be(()=>S.dataset,e=>{Array.isArray(e)&&e.length>0&&(Ct.value=!1)},{deep:!0});let{isPrinting:P,isImaging:F,generatePdf:Dt,generateImage:Ot}=xe({elementId:`relation_circle_${C.value}`,fileName:A.value.title.text||`vue-ui-relation-circle`,options:D.value.userOptions.print}),kt=c(()=>D.value.userOptions.show&&!A.value.title.text),At=c(()=>se(D.value.customPalette)),I=_([]),L=_([]),R=_({}),z=_([]),jt=_(0),B=c(()=>St.value.slice(0,A.value.limit).map(e=>{let t=Array.isArray(e.relations)?e.relations:[];return{...e,weights:Array.isArray(e.weights)?e.weights:Array(t.length).fill(1),relations:t}}));Be(B,()=>{I.value=[],L.value=[],Bt(),Ht()});let V=_(A.value.size),H=_(k.value.size),U=_(A.value.plot.radius),W=_(A.value.labels.fontSize),G=_({height:A.value.size,width:A.value.size}),K=c({get(){return V.value*A.value.circle.radiusProportion},set(e){return e}}),Mt=c(()=>A.value.links.curved),Nt=c(()=>`${A.value.animation.speedMs}ms`),Pt=c(()=>K.value*2),Ft=c(()=>K.value*4),q=Le(null),J=Le(null);Ie(()=>{Lt(),document.getElementById(`relation_circle_${C.value}`).addEventListener(`click`,zt)});let It=c(()=>D.value.debug);function Lt(){if(le(S.dataset)?(ne({componentName:`VueUiRelationCircle`,type:`dataset`,debug:It.value}),Ct.value=!0):It.value&&S.dataset.forEach((e,t)=>{ce({datasetObject:e,requiredAttributes:[`id`,`label`,`relations`,`weights`]}).forEach(e=>{ne({componentName:`VueUiRelationCircle`,type:`datasetSerieAttribute`,property:e,index:t})})}),le(S.dataset)||(Ct.value=D.value.loading),D.value.responsive){let e=Se(()=>{let{width:e,height:t}=Ce({chart:w.value,title:A.value.title.text?gt.value:null,source:_t.value,noTitle:vt.value});requestAnimationFrame(()=>{V.value=Math.min(e,t),G.value.width=Math.max(.1,e),G.value.height=Math.max(.1,t-12),K.value=V.value*A.value.circle.radiusProportion,I.value=[],L.value=[],Bt(),Ht(),Rt(),D.value.responsiveProportionalSizing?(H.value=ae({relator:V.value,adjuster:A.value.size,source:k.value.size,threshold:6,fallback:6}),U.value=ae({relator:V.value,adjuster:A.value.size,source:A.value.plot.radius,threshold:1,fallback:1}),W.value=ae({relator:V.value,adjuster:A.value.size,source:A.value.labels.fontSize,threshold:6,fallback:6})):(H.value=k.value.size,U.value=A.value.plot.radius,W.value=A.value.labels.fontSize)})});q.value&&(J.value&&q.value.unobserve(J.value),q.value.disconnect()),q.value=new ResizeObserver(e),J.value=w.value.parentNode,q.value.observe(J.value)}else I.value=[],L.value=[],Bt(),Ht();Rt()}Fe(()=>{document.getElementById(`relation_circle_${C.value}`)?.removeEventListener(`click`,zt),q.value&&(J.value&&q.value.unobserve(J.value),q.value.disconnect())});let{autoSizeLabels:Rt}=De({svgRef:N,fontSize:A.value.labels.fontSize,minFontSize:A.value.labels.minFontSize,sizeRef:W,labelClass:`.vue-ui-relation-circle-legend`});function zt(e){let t=e.target;t&&Array.from(t.classList).includes(`vue-ui-user-options`)||t&&Array.from(t.classList).includes(`vue-ui-user-options-summary`)||t&&Array.from(t.classList).includes(`vue-data-ui-button`)||t&&Array.from(t.classList).includes(`vue-ui-relation-circle-legend`)||(R.value={},z.value=[])}function Bt(){let e=6.28319/B.value.length,t=360/B.value.length,n=0,r=0;B.value.forEach((i,a)=>{let te=i.weights.reduce((e,t)=>e+t,0),ne=K.value*Math.cos(n)+G.value.width/2,o=K.value*Math.sin(n)+G.value.height/2+A.value.circle.offsetY;I.value.push({x:ne,y:o,...i,color:i.color?i.color:At.value[a]?At.value[a]:ee[a],regAngle:r,totalWeight:te}),n+=e,r+=t})}function Vt(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}function Ht(){L.value=[],I.value.forEach(e=>{I.value.filter(t=>t.relations.includes(e.id)).forEach((t,n)=>{let r=t.relations.indexOf(e.id);L.value.push({weight:t.weights[r]?t.weights[r]:0,relationId:`${e.id}_${t.id}`,x1:e.x,y1:e.y,x2:t.x,y2:t.y,colorSource:e.color,colorTarget:t.color,midPointLine:Vt({x:e.x,y:e.y},{x:t.x,y:t.y}),midPointBezier:Ut({x1:e.x,x2:t.x,y1:e.y,y2:t.y}),...e})})})}function Ut(e){let t={x:e.x1,y:e.y1},n={x:e.x2,y:e.y2},r={x:e.x1,y:e.y1},i={x:G.value.width/2,y:G.value.height/2+A.value.circle.offsetY},a=.5;return{x:.5**3*t.x+3*.5**2*a*r.x+1.5*a**2*i.x+a**3*n.x,y:.5**3*t.y+3*.5**2*a*r.y+1.5*a**2*i.y+a**3*n.y}}let Wt=c(()=>Math.max(...L.value.map(e=>e.weight)));function Gt(e){return Object.hasOwn(R.value,`x`)?z.value.includes(e.id)?`opacity:1`:`opacity:0.1`:`opacity:1`}function Y(e){return e.colorSource}function Kt(e){return Object.hasOwn(R.value,`x`)?z.value.includes(e.id)&&e.relationId===`${e.id}_${R.value.id}`||e.relationId===`${R.value.id}_${e.id}`?`opacity:1;stroke-width:${tn(e)}`:`opacity: 0`:`opacity: 1`}function X(e){return Object.hasOwn(R.value,`x`)?!!(z.value.includes(e.id)&&e.relationId===`${e.id}_${R.value.id}`||e.relationId===`${R.value.id}_${e.id}`):!1}function qt(e){return e.regAngle>90&&e.regAngle<270?`end`:`start`}function Jt(e){return e.regAngle>90&&e.regAngle<270?e.x-5:e.x+5}function Yt(e){return Object.hasOwn(R.value,`x`)?R.value.id===e.id||z.value.includes(e.id)?`opacity:1`:`opacity:0.2`:`opacity:1`}function Xt(e){return e.regAngle>90&&e.regAngle<270?`rotate(${e.regAngle+180},${e.x},${e.y})`:`rotate(${e.regAngle},${e.x},${e.y})`}let Z=_(null);function Zt(e,t){Z.value=t,T.value=t,D.value.events.datapointEnter&&D.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function Qt(e,t){Z.value=null,E.value||(T.value=null),D.value.events.datapointLeave&&D.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function $t(e,t){e&&(D.value.events.datapointClick&&D.value.events.datapointClick({datapoint:e,seriesIndex:t}),jt.value=360-e.regAngle,R.value.id&&e.id===R.value.id?(R.value={},z.value=[]):(R.value=e,z.value=[...e.relations]))}function en(e,t){T.value=t,$t(e,t)}function tn(e){let t=e.weight/Wt.value*A.value.links.maxWidth;return Math.max(.3,t)}let Q=_(!1);function nn(e){Q.value=e,ht.value+=1}let $=_(!1);function rn(){$.value=!$.value}async function an({scale:e=2}={}){if(!w.value)return;let{width:t,height:n}=w.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await ge({domElement:w.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:A.value.title.text,width:t,height:n,aspectRatio:r}}let on=c(()=>A.value.backgroundColor),sn=c(()=>A.value.title),{isCallbackImaging:cn,isCallbackSvg:ln,generateSvg:un,onGenerateImage:dn}=ve({svg:N,title:sn,legend:null,legendItems:null,backgroundColor:on,getSvgCallback:()=>D.value.userOptions.callbacks.svg,generateImage:Ot});async function fn(){pt(`copyAlt`,{config:D.value,dataset:B.value}),D.value.userOptions.callbacks.altCopy?await Promise.resolve(D.value.userOptions.callbacks.altCopy({config:D.value,dataset:B.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function pn(){E.value=!0,I.value.length&&T.value===null&&(T.value=0)}function mn(){E.value=!1,T.value=null}function hn(e){if(!N.value||$.value||document.activeElement!==N.value||!I.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){T.value=null,R.value={},z.value=[];return}if(r){if(T.value===null)return;let e=I.value[T.value];if(!e)return;$t(e,T.value);return}let a=T.value;a===null||a<0||a>=I.value.length?a=n?0:I.value.length-1:n?(a+=1,a>=I.value.length&&(a=0)):t&&(--a,a<0&&(a=I.value.length-1)),T.value=a,Z.value=a;let ee=I.value[a];ee&&D.value.events.datapointEnter&&D.value.events.datapointEnter({datapoint:ee,seriesIndex:a})}let gn=c(()=>({headers:[`ID`,`Label`,`Total weight`,`Relations count`,`Relations`],rows:B.value.map(e=>{let t=e.relations.map(e=>B.value.find(t=>t.id===e)?.label||e).join(`, `),n=(e.weights||[]).reduce((e,t)=>e+Number(t||0),0);return[e.id,e.label,n,e.relations.length,t]})}));return me({getImage:an,generatePdf:Dt,generateSvg:un,generateImage:Ot,toggleAnnotator:rn,toggleFullscreen:nn,copyAlt:fn}),(e,i)=>(g(),d(`div`,{ref_key:`relationCircleChart`,ref:w,class:`vue-data-ui-component vue-ui-relation-circle`,style:h(`width:100%;background:${A.value.backgroundColor};text-align:center;${D.value.responsive?`height: 100%`:``}`),id:`relation_circle_${C.value}`,onMouseenter:i[0]||=()=>x(wt)(!0),onMouseleave:i[1]||=()=>x(wt)(!1)},[f(`div`,{id:`chart-instructions-${C.value}`,class:`sr-only`},[f(`p`,null,b(D.value.a11y.translations.keyboardNavigation),1)],8,We),gn.value?.rows?.length?(g(),l(we,{key:0,uid:C.value,head:gn.value.headers,body:gn.value.rows,notice:D.value.a11y.translations.tableAvailable,caption:D.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):u(``,!0),O.value.buttons.annotator?(g(),l(x(lt),Ne({key:1},x(n)(O.value.annotator),{svgRef:x(N),backgroundColor:A.value.backgroundColor,color:A.value.color,active:$.value,isCursorPointer:j.value,palette:O.value.annotatorPalette,onClose:rn}),ke({_:2},[v(x(r),n=>({name:n,fn:Ve(r=>[y(e.$slots,n,m(p(x(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):u(``,!0),kt.value?(g(),d(`div`,{key:2,ref_key:`noTitle`,ref:vt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):u(``,!0),A.value.title.text?(g(),d(`div`,{key:3,ref_key:`chartTitle`,ref:gt,style:`width:100%;background:transparent`},[(g(),l(_e,{key:`title_${yt.value}`,config:{title:{cy:`relation-div-title`,...A.value.title},subtitle:{cy:`relation-div-subtitle`,...A.value.title.subtitle}}},null,8,[`config`]))],512)):u(``,!0),O.value.show&&mt.value&&(x(Tt)||x(M))?(g(),l(x(ut),{ref:`details`,key:`user_options_${ht.value}`,backgroundColor:A.value.backgroundColor,color:A.value.color,isPrinting:x(P),isImaging:x(F),uid:C.value,hasPdf:O.value.buttons.pdf,hasImg:O.value.buttons.img,hasSvg:O.value.buttons.svg,hasFullscreen:O.value.buttons.fullscreen,hasAltCopy:O.value.buttons.altCopy,hasXls:!1,isFullscreen:Q.value,titles:{...O.value.buttonTitles},chartElement:w.value,position:O.value.position,hasAnnotator:O.value.buttons.annotator,isAnnotation:$.value,callbacks:O.value.callbacks,printScale:O.value.print.scale,isCursorPointer:j.value,onToggleFullscreen:nn,onGeneratePdf:x(Dt),onGenerateImage:x(dn),onGenerateSvg:x(un),onToggleAnnotator:rn,onCopyAlt:fn,style:h({visibility:x(Tt)?x(M)?`visible`:`hidden`:`visible`})},ke({_:2},[v(x(ye)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Ve(n=>[y(e.$slots,t,m(p(x(be)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasImg`,`hasSvg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`titles`,`chartElement`,`position`,`hasAnnotator`,`isAnnotation`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):u(``,!0),f(`div`,Ge,[(g(),d(`svg`,{ref_key:`svgRef`,ref:N,xmlns:x(oe),class:Pe([{"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value},`relation-circle`]),viewBox:`0 0 ${G.value.width<=0?10:G.value.width} ${G.value.height<=0?10:G.value.height}`,width:`100%`,style:`user-select:none; background:transparent`,"aria-describedby":`chart-instructions-${C.value}`,tabindex:`0`,onFocus:pn,onBlur:mn,onKeydown:hn},[je(x(dt)),y(e.$slots,`svg-underlayer`,{svg:{...G.value,isPrintingImg:x(P)||x(F)||x(cn),isPrintingSvg:x(ln)}},void 0,!0),e.$slots[`chart-background`]?(g(),d(`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`}},[y(e.$slots,`chart-background`,{},void 0,!0)],8,qe)):u(``,!0),f(`circle`,{cx:(G.value.width<=0?1e-4:G.value.width)/2,cy:(G.value.height<=0?1e-4:G.value.height)/2+A.value.circle.offsetY,r:K.value<=0?1e-4:K.value,stroke:A.value.circle.stroke,"stroke-width":A.value.circle.strokeWidth,fill:`transparent`,class:`main-circle`},null,8,Je),Mt.value?(g(),d(`g`,Ye,[(g(!0),d(s,null,v(L.value,(e,t)=>(g(),d(`path`,{key:`relation_${t}`,style:h(Kt(e)),stroke:Y(e),class:Pe([`relation`,{"vue-ui-relation-circle-selected":R.value.hasOwnProperty(`id`)&&z.value.includes(e.id)}]),d:`M${e.x1},${e.y1} C${e.x1},${e.y1} ${G.value.width/2},${G.value.height/2+A.value.circle.offsetY} ${e.x2},${e.y2}`,fill:`none`,"stroke-width":tn(e),"stroke-linecap":`round`},null,14,Xe))),128)),(g(!0),d(s,null,v(L.value,(t,n)=>(g(),d(`g`,Ze,[X(t)?y(e.$slots,`dataLabel`,Ne({ref_for:!0},{x:t.midPointBezier.x,y:t.midPointBezier.y,color:Y(t),weight:t.weight,fontSize:H.value}),void 0,!0,0):u(``,!0),X(t)&&!e.$slots.dataLabel?(g(),d(`circle`,{key:1,cx:t.midPointBezier.x,cy:t.midPointBezier.y,fill:Y(t),r:H.value,stroke:A.value.backgroundColor,"stroke-width":`1`},null,8,Qe)):u(``,!0),X(t)&&!e.$slots.dataLabel?(g(),d(`text`,{key:2,x:t.midPointBezier.x,y:t.midPointBezier.y+H.value/3,fill:x(ie)(Y(t)),"text-anchor":`middle`,"font-size":H.value},b(x(o)(k.value.formatter,t.weight,x(a)({p:k.value.prefix,v:t.weight,s:k.value.suffix,r:k.value.rounding}),{...t})),9,$e)):u(``,!0)]))),256))])):(g(),d(`g`,et,[(g(!0),d(s,null,v(L.value,(e,t)=>(g(),d(`line`,{key:`relation_${t}`,stroke:Y(e),"stroke-width":tn(e),style:h(Kt(e)),x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2,class:Pe({"vue-ui-relation-circle-selected":R.value.hasOwnProperty(`id`)&&z.value.includes(e.id)}),"stroke-linecap":`round`},null,14,tt))),128)),(g(!0),d(s,null,v(L.value,(t,n)=>(g(),d(`g`,nt,[X(t)?y(e.$slots,`dataLabel`,Ne({ref_for:!0},{x:t.midPointLine.x,y:t.midPointLine.y,color:Y(t),weight:t.weight,fontSize:H.value}),void 0,!0,0):u(``,!0),X(t)&&!e.$slots.dataLabel&&k.value.show?(g(),d(`circle`,{key:1,cx:t.midPointLine.x,cy:t.midPointLine.y,fill:Y(t),r:H.value,stroke:A.value.backgroundColor,"stroke-width":`1`},null,8,rt)):u(``,!0),X(t)&&!e.$slots.dataLabel&&k.value.show?(g(),d(`text`,{key:2,x:t.midPointLine.x,y:t.midPointLine.y+H.value/3,fill:x(ie)(Y(t)),"text-anchor":`middle`,"font-size":H.value},b(x(o)(k.value.formatter,t.weight,x(a)({p:k.value.prefix,v:t.weight,s:k.value.suffix,r:k.value.rounding}),{...t})),9,it)):u(``,!0)]))),256))])),(g(!0),d(s,null,v(I.value,(e,t)=>(g(),d(`text`,{key:`plot_text_${t}`,"text-anchor":qt(e),transform:Xt(e),x:Jt(e),y:e.y+5,class:`vue-ui-relation-circle-legend`,"transform-origin":`start`,"font-weight":R.value.id===e.id?`900`:`400`,style:h(`font-family:${A.value.fontFamily};${Yt(e)};cursor:${j.value?`pointer`:`default`}`),"font-size":W.value,fill:A.value.labels.color,"text-decoration":t===Z.value||t===T.value?`underline`:void 0,onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},[x(xt)?(g(),d(s,{key:0},[Ae(`--------`)],64)):(g(),d(s,{key:1},[Ae(b(e.label)+` (`+b(x(o)(k.value.formatter,e.totalWeight,x(a)({p:k.value.prefix,v:e.totalWeight,s:k.value.suffix,r:k.value.rounding}),{...e}))+`) `,1)],64))],44,at))),128)),(g(!0),d(s,null,v(I.value,(e,t)=>(g(),d(`circle`,{cx:e.x,cy:e.y,key:`plot_${t}`,style:h(`${Gt(e)}; transition: r 0.2s ease-in-out; cursor:${j.value?`pointer`:`default`}`),class:`vue-ui-relation-circle-plot`,fill:A.value.plot.useSerieColor?e.color:A.value.plot.color,stroke:A.value.backgroundColor,"stroke-width":`1`,r:U.value*(t===Z.value||t===T.value?2:1),onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},null,44,ot))),128)),y(e.$slots,`svg`,{svg:{...G.value,isPrintingImg:x(P)||x(F)||x(cn),isPrintingSvg:x(ln)}},void 0,!0)],42,Ke)),e.$slots.hint?(g(),d(`div`,st,[y(e.$slots,`hint`,m(p({hint:D.value.a11y.translations.keyboardNavigation,isVisible:E.value})),void 0,!0)])):u(``,!0)]),e.$slots.watermark?(g(),d(`div`,ct,[y(e.$slots,`watermark`,m(p({isPrinting:x(P)||x(F)||x(cn)||x(ln)})),void 0,!0)])):u(``,!0),e.$slots.source?(g(),d(`div`,{key:6,ref_key:`source`,ref:_t,dir:`auto`},[y(e.$slots,`source`,{},void 0,!0)],512)):u(``,!0),y(e.$slots,`skeleton`,{},()=>[x(xt)?(g(),l(de,{key:0})):u(``,!0)],!0)],44,Ue))}},[[`__scopeId`,`data-v-28e8ae2b`]]);export{He as n,lt as t};
@@ -1,2 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as o,Ht as s,J as c,N as ee,P as te,S as ne,U as re,X as ie,Xt as ae,at as oe,i as l,in as se,nt as ce,r as le,t as ue,tt as de,w as fe,xt as pe,yt as me,zt as he}from"./lib-rPeBMZrn.js";import{n as ge,t as _e}from"./BaseScanner-8NdoBs7B.js";import{n as ve,t as ye}from"./useHints-C-TwxM0Y.js";import{t as be}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as xe}from"./resolveChartConfig-CIhClE5R.js";import{t as Se}from"./chartImage-DPGnEuYM.js";import{n as Ce}from"./Title-BliHuXfT.js";import{t as we}from"./useChartExport-BZts4KFb.js";import{n as Te,t as Ee}from"./tableIntegration-CNoJ1CIY.js";import{n as De,t as Oe}from"./userOptionsSlots-DYuo-E5m.js";import{t as ke}from"./useTimeLabels-Das5O74F.js";import{t as Ae}from"./usePrinter-DVf3YcG5.js";import{t as je}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Me}from"./Shape-CRe8woTu.js";import{c as Ne}from"./canvas-lib-22VpOI4_.js";import{t as Pe}from"./useResponsive-CENUxfEL.js";import{t as Fe}from"./DefGrad-DKMq1REY.js";import{t as Ie}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Le}from"./A11yDataTable-DWNlWXzs.js";import{t as Re}from"./useUserOptionState-CXlFnwPv.js";import{t as ze}from"./useChartAccessibility-DOMuYJfm.js";import{t as Be}from"./Legend-DM0ClX3D.js";import{t as Ve}from"./vue_ui_ridgeline-Di26JtQu.js";import{Fragment as u,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as He,createTextVNode as Ue,createVNode as We,defineAsyncComponent as g,guardReactiveProps as Ge,mergeProps as Ke,nextTick as qe,normalizeClass as Je,normalizeProps as Ye,normalizeStyle as _,onBeforeUnmount as Xe,openBlock as v,ref as y,renderList as b,renderSlot as x,resolveDynamicComponent as Ze,shallowRef as Qe,toDisplayString as S,toRefs as $e,unref as C,watch as et,watchEffect as tt,withCtx as w}from"vue";var nt=/* @__PURE__ */ e({default:()=>Tt}),rt=[`id`],it=[`id`],at={style:{position:`relative`}},ot=[`xmlns`,`aria-describedby`,`viewBox`],st={key:0},ct=[`fill`,`d`],lt=[`stroke`,`stroke-width`,`d`],ut=[`fill`,`d`],dt=[`stroke`,`stroke-dasharray`,`stroke-width`,`d`],ft=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],pt=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],mt=[`x`,`y`,`font-size`,`font-weight`,`fill`,`text-decoration`,`onMouseenter`,`onClick`],ht={key:0},gt=[`font-size`,`fill`,`stroke`,`font-weight`,`transform`,`text-anchor`],_t=[`font-size`,`fill`,`font-weight`,`transform`,`text-anchor`,`innerHTML`],vt=[`x`,`y`,`width`,`height`,`onMouseenter`,`onMouseleave`,`onClick`],yt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],bt=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],xt=[`x`,`y`,`stroke`,`text-anchor`,`font-size`,`fill`],St={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Ct={key:5,class:`vue-data-ui-watermark`},wt=[`onClick`],Tt=/*#__PURE__*/ be({__name:`vue-ui-ridgeline`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`selectX`,`copyAlt`],setup(e,{expose:be,emit:nt}){let Tt=g(()=>import(`./vue-ui-xy-CpS-ASnd.js`).then(e=>e.n)),Et=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Dt=g(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Ot=g(()=>import(`./DataTable-Dof6yhO7.js`)),kt=g(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),At=g(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),jt=g(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),Mt=g(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_ridgeline:Nt}=i(),T=e,Pt=d({get(){return Array.isArray(B.value)&&B.value.length>0},set(e){return e}}),Ft=nt,E=y(null),It=y(null),Lt=y(null),D=Qe(null),O=Qe(null),Rt=y(null),zt=y(null),Bt=y(0),Vt=y(0),Ht=y(0),k=y(ie()),Ut=y(0),Wt=y(0),Gt=y(512),A=y(null),Kt=y(null),qt=y(null),Jt=y(0),Yt=y(null),Xt=y(null),Zt=y(null),j=y(null),Qt=y(!1);function $t(){return xe(T.config,Nt,Ve)}let M=y($t()),N=d(()=>M.value.userOptions),P=d(()=>M.value.style.chart.areas),F=d(()=>M.value.style.chart.selector),I=d(()=>M.value.style.chart.xAxis.labels),L=d(()=>M.value.style.chart.yAxis.labels),R=d(()=>M.value.style.chart);ve({config:()=>M.value,dataset:()=>T.dataset,component:`VueUiRidgeline`,rules:[ye.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display`,``,`▶️ Use several instances of the component to show related series`]},{test:e=>e.some(e=>e.datapoints.some(e=>e.values.length>200)),message:[`👀 Some series contain > 200 data points, which can affect performance. Consider if you really need this level of detail.`,``,`▶️ Use larger time scales, or aggregated values.`,``,`▶️ Filter the time range by adding date inputs in your UI.`]},{test:e=>e.length<6&&e.length>0,message:[`👀 The number of series < 6. Consider:`,``,`▶️ Using VueUiXy instead`]}]});let z=d(()=>M.value.userOptions.useCursorPointer),en=d(()=>se({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,areas:{maxPoint:{show:!1},opacity:.9,stroke:{useSerieColor:!0}},legend:{backgroundColor:`transparent`},padding:{right:-24,left:0},xAxis:{labels:{values:[]}},yAxis:{labels:{fontSize:0}},zeroLine:{show:!1}}}},userConfig:M.value.skeletonConfig??{}})),{loading:tn,FINAL_DATASET:B,manualLoading:nn}=ge({...$e(T),FINAL_CONFIG:M,prepareConfig:$t,skeletonDataset:T.config?.skeletonDataset??[{name:`_`,datapoints:[{name:`__`,color:`#999999`,values:[28.639,32.04,41.134,44.525,21.151,2.436,.218,.024,.002,0,0,0]},{name:`_`,color:`#CACACA`,values:[13.253,15.621,23.36,33.698,29.935,10.874,2.364,.561,.107,.02,.006,.004]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[10.851,13.195,21.617,36.556,42.292,21.006,3.398,.223,.013,.001,0,0]},{name:`_`,color:`#CACACA`,values:[3.171,4.115,8.108,18.248,31.641,29.063,12.031,2.742,.504,.102,.032,.021]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[1.731,2.334,5.125,13.626,29.911,38.524,24.168,7.646,1.575,.317,.097,.063]},{name:`_`,color:`#CACACA`,values:[.25,.367,1.026,3.944,13.635,28.891,30.149,15.419,4.714,1.246,.442,.299]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[.034,.054,.194,1.065,5.747,20.735,38.306,32.899,15.318,5.566,2.422,1.76]},{name:`_`,color:`#CACACA`,values:[.001,.002,.009,.095,1.124,8.342,27.115,35.08,21.449,9.093,4.243,3.143]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[0,.001,.004,.051,.567,3.322,14.215,44.783,40.351,20.377,9.866,7.378]},{name:`_`,color:`#CACACA`,values:[0,0,0,0,.001,.11,4.136,27.498,43.24,29.807,17.345,13.678]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[0,0,0,0,.025,.598,3.886,10.645,54.479,45.953,30.814,24.55]},{name:`_`,color:`#CACACA`,values:[0,0,0,0,0,0,.007,1.655,26.63,52.017,45.192,39.651]}]}],skeletonConfig:se({defaultConfig:M.value,userConfig:en.value})}),V=y(Math.min(P.value.height,P.value.rowHeight)),{userOptionsVisible:rn,setUserOptionsVisibility:an,keepUserOptionState:on}=Re({config:M.value}),{svgRef:H}=ze({config:R.value.title}),sn=d(()=>M.value.debug);function cn(){let e=B.value||[];if(!Array.isArray(e)||e.length===0)oe({componentName:`VueUiRidgeline`,type:`dataset`,debug:sn.value}),nn.value=!0;else if(e.forEach((e,t)=>{me({datasetObject:e,requiredAttributes:[`name`,`datapoints`]}).forEach(e=>{Pt.value=!1,oe({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:e,index:t,debug:sn.value})}),Array.isArray(e.datapoints)&&e.datapoints.length&&e.datapoints.forEach((e,n)=>{me({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{Pt.value=!1,oe({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:`datapoint.${e}`,index:`${t}-${n}`,debug:sn.value})})})}),Wt.value=e.length,V.value=Math.min(P.value.height,P.value.rowHeight),he(T.dataset)||(nn.value=M.value.loading),M.value.responsive){let t=Ne(()=>{let{width:t,height:n}=Pe({chart:E.value,title:R.value.title.text?It.value:null,legend:R.value.legend.show?Lt.value:null,source:Rt.value,noTitle:zt.value,padding:R.value.padding});requestAnimationFrame(()=>{Gt.value=t,V.value=e.length?n/e.length:0,Jt.value=n-12})});D.value&&(O.value&&D.value.unobserve(O.value),D.value.disconnect()),D.value=new ResizeObserver(t),O.value=E.value?.parentNode||null,O.value&&D.value.observe(O.value)}}Xe(()=>{D.value&&(O.value&&D.value.unobserve(O.value),D.value.disconnect())});let{isPrinting:ln,isImaging:un,generatePdf:dn,generateImage:fn}=Ae({elementId:`vue-ui-ridgeline_${k.value}`,fileName:R.value.title.text||`vue-ui-ridgeline`,options:M.value.userOptions.print}),pn=d(()=>M.value.userOptions.show&&!R.value.title.text),mn=d(()=>fe(M.value.customPalette)),U=y({showTable:M.value.table.show});et(()=>B.value,async e=>{Array.isArray(e)&&e.length&&(rn.value=!M.value.userOptions.showOnChartHover,await qe(),cn(),Bt.value+=1,Ht.value+=1,U.value.showTable=M.value.table.show)},{deep:!0,immediate:!0}),et(()=>T.dataset,e=>{Array.isArray(e)&&e.length>0&&(nn.value=!1)},{deep:!0}),et(()=>tn.value,async e=>{e||(await qe(),cn())},{immediate:!0}),et(()=>T.config,()=>{M.value=$t(B.value||null),rn.value=!M.value.userOptions.showOnChartHover,V.value=Math.min(P.value.height,P.value.rowHeight),U.value.showTable=M.value.table.show,Bt.value+=1,Ht.value+=1},{deep:!0});let hn=d(()=>P.value.height/P.value.rowHeight);function gn(){X.value.length?X.value=[]:Z.value.forEach(e=>{X.value.push(e.id)}),Ft(`selectLegend`,Y.value)}function _n(e){X.value.includes(e)?X.value=X.value.filter(t=>t!==e):X.value.push(e),Ft(`selectLegend`,Y.value)}function vn(e){return Z.value.length?Z.value.find(t=>t.name===e)||(sn.value&&console.warn(`VueUiRidgeline - Series name not found "${e}"`),null):(sn.value&&console.warn(`VueUiRidgeline - There are no series to show.`),null)}function yn(e){let t=vn(e);t!==null&&X.value.includes(t.id)&&_n(t.id)}function bn(e){let t=vn(e);t!==null&&(X.value.includes(t.id)||_n(t.id))}let W=d(()=>Pt.value?(B.value||[]).map(e=>({...e,labelLen:Pn(e.name,L.value.fontSize),uid:ie(),datapoints:e.datapoints.map((e,t)=>{let n=e.color?ne(e.color):mn.value[t]||s[t]||s[t%s.length],r=ae(e.name);return{...e,color:n,id:r}})})):[]),xn=d(()=>R.value.padding.top+V.value*(B.value||[]).length+V.value*hn.value+R.value.padding.bottom),G=d(()=>{let e=R.value.padding;return{width:Gt.value,height:xn.value,padding:e}}),Sn=d(()=>G.value.width),Cn=d(()=>G.value.height),wn=y(0),Tn=Ne(e=>{wn.value=e},100);tt(e=>{let t=Yt.value;if(!t)return;let n=new ResizeObserver(e=>{Tn(e[0].contentRect.height)});n.observe(t),e(()=>n.disconnect())}),Xe(()=>{wn.value=0});let K=d(()=>({fullHeight:G.value.height+wn.value,top:G.value.padding.top,left:G.value.padding.left,right:G.value.width-G.value.padding.right,bottom:G.value.height-R.value.padding.bottom,width:G.value.width-(G.value.padding.left+G.value.padding.right)})),En=d(()=>Math.max(...W.value.flatMap(e=>e.datapoints.map(e=>e.values.length)))),q=y([]),Dn=0;tt(()=>{let e=++Dn;(async()=>{let t=await ke({values:I.value.values,maxDatapoints:En.value,formatter:I.value.datetimeFormatter,start:0,end:I.value.values.length});e===Dn&&(q.value=t)})()});let J=d(()=>{let e=Math.max(...W.value.map(e=>e.labelLen)),t=G.value.padding.left+e+16+L.value.offsetX,n=(K.value.width-t)/En.value,r=[];for(let e=0;e<En.value;e+=1)r.push({selectorX:t+n*e,x:t+n*e-n/2,y:K.value.top,label:I.value.values[e]?q.value[e]?.text??``:``,index:e,width:n,height:xn.value});return r});function On(e){return W.value.map(t=>t.datapoints.map(t=>({dp:t,selected:t.values[e.index]})))}function kn(e){A.value=e;let t=On(e);M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:t,seriesIndex:e.index})}function An(e){A.value=null;let t=On(e);M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:t,seriesIndex:e.index})}function jn(e){let t=On(e);M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:t,seriesIndex:e.index}),Ft(`selectX`,t)}function Mn(e,t){return e.length*t/2+t}function Nn(e,t,n){return e+Mn(t,n)>K.value.right}function Pn(e,t,n=`sans-serif`){let r=document.createElement(`canvas`).getContext(`2d`);return r.font=`${typeof t==`number`?`${t}px`:t} ${n}`,r.measureText(e).width}let Y=d(()=>{V.value;let e=Math.max(...W.value.map(e=>e.labelLen)),t=Math.max(...W.value.flatMap(e=>e.datapoints.flatMap(e=>e.values))),n=Math.min(...W.value.flatMap(e=>e.datapoints.flatMap(e=>e.values))),r=G.value.padding.left+e+16+L.value.offsetX,i=(K.value.width-r)/En.value,a=Math.abs(Math.min(n,0)),o=t+a;function s(e){return isNaN(e/o)?0:e/o}return W.value.map((e,t)=>{let n=V.value*hn.value*(1-s(a)),o=K.value.top+V.value*t,c=K.value.top+o+n;return{...e,label:{x:r-L.value.fontSize,y:(L.value.centered?c-n/2:c)+L.value.offsetY},datapoints:e.datapoints.map(e=>{let t=e.values.map((t,n)=>{let ee=isNaN(t)||[void 0,null,`NaN`,NaN,1/0,-1/0].includes(t)?0:t||0;return{x:r+i*n,y:K.value.top+o+V.value*hn.value*(1-s(ee+a)),value:t,isMaxPoint:t===Math.max(...e.values),zero:c}}),n=`${ee(t,c,!1,!1)}`,ne=`M ${r},${c} ${re(t)} ${t.at(-1).x},${c}`,ae=`M ${r},${c} ${t.at(-1).x},${c}`,oe=`M ${te(t)}`,l=`M ${re(t)}`,se=pe(P.value.smooth?oe:l);return{...e,uid:ie(),plots:t,smoothPath:n,straightPath:ne,zeroPath:ae,pathLength:se,smoothPathRidge:oe,straightPathRidge:l}}).filter(e=>!X.value.includes(e.id))}})}),X=y([]);function Fn(e){let t=/* @__PURE__ */ new Map;return e.forEach(e=>{e.datapoints.forEach((e,n)=>{let r=ae(e.name);t.has(r)||t.set(r,{id:r,name:e.name,color:e.color,shape:`circle`,segregate:()=>_n(r),isSegregated:X.value.includes(r),opacity:X.value.includes(r)?.5:1})})}),Array.from(t.values())}let Z=d(()=>Fn(W.value)),In=d(()=>({cy:`donut-div-legend`,backgroundColor:R.value.legend.backgroundColor,color:R.value.legend.color,fontSize:R.value.legend.fontSize,paddingBottom:12,fontWeight:R.value.legend.bold?`bold`:``})),Q=y(!1);function Ln(e){Q.value=e,Ut.value+=1}let Rn=y({}),zn=y([]);function Bn(e){Ft(`selectDatapoint`,e),R.value.dialog.show&&(zn.value=e.datapoints.map(e=>({name:e.name,color:e.color,type:`line`,useArea:!0,smooth:P.value.smooth,series:e.values})),Kt.value=e,Rn.value=de({...R.value.dialog.xyChart,responsive:!0,chart:{...R.value.dialog.xyChart.chart,grid:{...R.value.dialog.xyChart.chart.grid,labels:{...R.value.dialog.xyChart.chart.grid.labels,xAxisLabels:{...R.value.dialog.xyChart.chart.grid.labels.xAxisLabels,values:I.value.values,autoRotate:{enable:!0,angle:R.value.dialog.xyChart.chart.grid.labels.xAxisLabels.autoRotate.angle},datetimeFormatter:I.value.datetimeFormatter}}},tooltip:{...R.value.dialog.xyChart.chart.tooltip,showTimeLabel:I.value.values.length>0},userOptions:{...R.value.dialog.xyChart.chart.userOptions,buttons:{...R.value.dialog.xyChart.chart.userOptions.buttons,altCopy:M.value.userOptions.buttons.altCopy},callbacks:{...R.value.dialog.xyChart.chart.userOptions.callbacks,altCopy:()=>{}},useCursorPointer:M.value.userOptions.useCursorPointer}}}),qt.value&&qt.value.open())}let Vn=y(null);function Hn(e){Vn.value=e}function Un(){Vn.value=null}let Wn=y(!1);function Gn(){Wn.value=!Wn.value}function Kn(){U.value.showTable=!U.value.showTable}let qn=d(()=>({body:Y.value.flatMap(e=>e.datapoints.flatMap(t=>({...t,rowName:`${e.name}: ${t.name}`}))).map(e=>[{name:e.rowName,color:e.color},...e.values])})),$=d(()=>{let e=[M.value.table.columnNames.series,...q.value.map(e=>e.text)],t={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};return{colNames:[M.value.table.columnNames.series,...q.value.map(e=>e.text)],head:e,body:qn.value.body,config:t}});function Jn(e=null){qe(()=>{let t=[[M.value.table.columnNames.series,...q.map(e=>[e.text])],...qn.value.body.map((e,t)=>[e[0].name,...e.slice(1)])],n=[[R.value.title.text],[R.value.title.subtitle.text]].concat(t),r=o(n);e?e(r):ce({csvContent:r,title:R.value.title.text||`vue-ui-ridgeline`})})}function Yn(){return Y.value}let Xn=Se(E,()=>R.value.title.text),Zn=d(()=>({min:0,max:En.value}));je({timeLabelsEls:Yt,timeLabels:q,slicer:Zn,configRef:M,rotationPath:[`style`,`chart`,`xAxis`,`labels`,`rotation`],autoRotatePath:[`style`,`chart`,`xAxis`,`labels`,`autoRotate`,`enable`],isAutoSize:!1,width:Sn,height:Cn,targetClass:`.vue-ui-ridgeline-x-axis-label`,angle:I.value.autoRotate.angle});let Qn=d(()=>Ee({config:M,style:R,mutableConfig:U,dialog:Mt,accordion:Dt,isFullscreen:Q,parent:E,maxWidth:800,isCursorPointer:z}));et(()=>U.value.showTable,e=>Te(e,M,Xt));function $n(){U.value.showTable=!1,Zt.value&&Zt.value.setTableIconState(!1)}let er=d(()=>R.value.backgroundColor),tr=d(()=>({...R.value.legend,position:`bottom`})),nr=d(()=>R.value.title),{isCallbackImaging:rr,isCallbackSvg:ir,generateSvg:ar,onGenerateImage:or}=we({svg:H,title:nr,legend:tr,legendItems:Z,backgroundColor:er,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:fn});function sr(e){cr(`xy-zoom`,e.dataset,e.config)}async function cr(e=`main-chart`,t=null,n=null){Ft(`copyAlt`,{source:e,config:e===`main-chart`?M.value:Rn.value,dataset:e===`main-chart`?Y.value:zn.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({source:e,config:e===`main-chart`?M.value:Rn.value,dataset:e===`main-chart`?Y.value:zn.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function lr(){j.value=null,Qt.value=!0}function ur(){mr(),Qt.value=!1}function dr(e){if(!H.value||Wn.value||document.activeElement!==H.value||!Y.value.length)return;let t=e.key===`ArrowUp`,n=e.key===`ArrowDown`,r=e.key===`ArrowLeft`,i=e.key===`ArrowRight`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){mr();return}if(a){if(j.value!==null){let e=Y.value[j.value];e&&Bn(e);return}A.value&&jn(A.value);return}if(t||n){let e=j.value;e=e===null?n?0:Y.value.length-1:fr(e+(n?1:-1)),j.value=e,Vn.value=e;return}if(!J.value.length)return;let s=A.value?.index??null;s=s===null?i?0:J.value.length-1:pr(s+(i?1:-1));let c=J.value[s];c&&kn(c)}function fr(e){let t=Y.value.length;return t?(e%t+t)%t:null}function pr(e){let t=J.value.length;return t?(e%t+t)%t:null}function mr(){j.value=null,Vn.value=null,A.value?An(A.value):A.value=null}let hr=d(()=>({head:$.value.head,body:$.value.body.map(e=>[e[0]?.name??``,...e.slice(1)]),caption:M.value.a11y.translations.tableCaption,notice:M.value.a11y.translations.tableAvailable}));return be({getData:Yn,getImage:Xn,generateImage:fn,generateSvg:ar,generatePdf:dn,generateCsv:Jn,hideSeries:bn,showSeries:yn,toggleAnnotator:Gn,toggleTable:Kn,toggleFullscreen:Ln,copyAlt:cr}),(e,i)=>(v(),m(`div`,{ref_key:`ridgelineChart`,ref:E,class:Je(`vue-data-ui-component vue-ui-ridgeline ${Q.value?`vue-data-ui-wrapper-fullscreen`:``}`),id:`vue-ui-ridgeline_${k.value}`,style:_({fontFamily:M.value.style.fontFamily,width:`100%`,textAlign:`center`,background:R.value.backgroundColor,height:M.value.responsive?`100%`:void 0}),onMouseenter:i[3]||=()=>C(an)(!0),onMouseleave:i[4]||=()=>C(an)(!1)},[h(`div`,{id:`chart-instructions-${k.value}`,class:`sr-only`},[h(`p`,null,S(M.value.a11y.translations.keyboardNavigation),1)],8,it),hr.value.body.length?(v(),f(Le,{key:0,uid:k.value,head:hr.value.head,body:hr.value.body,caption:hr.value.caption,notice:hr.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):p(``,!0),N.value.buttons.annotator&&C(H)?(v(),f(C(kt),Ke({key:1},C(n)(N.value.annotator),{color:R.value.color,backgroundColor:R.value.backgroundColor,active:Wn.value,svgRef:C(H),isCursorPointer:z.value,onClose:Gn}),He({_:2},[b(C(r),n=>({name:n,fn:w(r=>[x(e.$slots,n,Ye(Ge(C(t)(n,r))),void 0,!0)])}))]),1040,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`])):p(``,!0),x(e.$slots,`userConfig`,{},void 0,!0),pn.value?(v(),m(`div`,{key:2,ref_key:`noTitle`,ref:zt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),R.value.title.text?(v(),m(`div`,{key:3,ref_key:`chartTitle`,ref:It,style:`width:100%;background:transparent;padding-bottom:24px`},[(v(),f(Ce,{key:`title_${Bt.value}`,config:{title:{cy:`ridgeline-div-title`,...R.value.title},subtitle:{cy:`ridgeline-div-subtitle`,...R.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),N.value.show&&Pt.value&&(C(on)||C(rn))?(v(),f(C(At),{ref_key:`userOptionsRef`,ref:Zt,key:`user_option_${Ut.value}`,backgroundColor:R.value.backgroundColor,color:R.value.color,isPrinting:C(ln),isImaging:C(un),uid:k.value,hasTooltip:!1,callbacks:N.value.callbacks,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,hasLabel:!1,hasFullscreen:N.value.buttons.fullscreen,hasAltCopy:N.value.buttons.altCopy,isFullscreen:Q.value,printScale:N.value.print.scale,chartElement:E.value,position:N.value.position,isTooltip:!1,titles:{...N.value.buttonTitles},hasAnnotator:N.value.buttons.annotator,isAnnotation:Wn.value,tableDialog:M.value.table.useDialog,style:_({visibility:C(on)?C(rn)?`visible`:`hidden`:`visible`}),isCursorPointer:z.value,onToggleFullscreen:Ln,onGeneratePdf:C(dn),onGenerateCsv:Jn,onGenerateImage:C(or),onGenerateSvg:C(ar),onToggleTable:Kn,onToggleAnnotator:Gn,onCopyAlt:cr},He({_:2},[b(C(De)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:w(n=>[x(e.$slots,t,Ye(Ge(C(Oe)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.callbacks.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.printScale.chartElement.position.titles.hasAnnotator.isAnnotation.tableDialog.style.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg`.split(`.`))):p(``,!0),h(`div`,at,[(v(),m(`svg`,{ref_key:`svgRef`,ref:H,xmlns:C(ue),"aria-describedby":`chart-instructions-${k.value}`,class:Je({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value}),viewBox:`0 0 ${G.value.width<=0?10:G.value.width} ${K.value.fullHeight<=0?10:K.value.fullHeight}`,style:_(`max-width:100%;overflow:visible;background:transparent;color:${R.value.color};${M.value.responsive?`height: ${Jt.value}px; width: 100%;`:``}`),tabindex:`0`,onFocus:lr,onBlur:ur,onKeydown:dr},[We(C(jt)),x(e.$slots,`svg-underlayer`,{svg:{...G.value,drawingArea:K.value,isPrintingImg:C(ln)||C(un)||C(rr),isPrintingSvg:C(ir),data:Y.value}},void 0,!0),h(`defs`,null,[(v(!0),m(u,null,b(Z.value,(e,t)=>(v(),f(Fe,{t:`linear`,id:`gradient-${e.id}-${k.value}`,key:`gradient-${e.id}-${k.value}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,e.color,1],[`30%`,e.color,.7],[`70%`,e.color,.3],[`100%`,e.color,.1]]},null,8,[`id`,`stops`]))),128)),(v(!0),m(u,null,b(Y.value,(e,t)=>(v(),m(u,null,[(v(!0),m(u,null,b(e.datapoints,(e,t)=>(v(),f(Fe,{t:`linear`,key:`grad${e.id}`,id:`gradient-single-${k.value}-${e.uid}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,e.color,1],[`30%`,e.color,.7],[`70%`,e.color,.3],[`100%`,e.color,.1]]},null,8,[`id`,`stops`]))),128))],64))),256))]),(v(!0),m(u,null,b(Y.value,(t,n)=>(v(),m(`g`,{key:`ds-${n}`},[(v(!0),m(u,null,b(t.datapoints,(t,r)=>(v(),m(`g`,{key:t.id},[e.$slots.pattern?(v(),m(`g`,st,[h(`defs`,null,[x(e.$slots,`pattern`,Ke({ref_for:!0},{datapointIndex:n,seriesIndex:r,patternId:`pattern_${k.value}_${t.uid}`}),void 0,!0)])])):p(``,!0),h(`path`,{fill:e.$slots.pattern?`url(#pattern_${k.value}_${t.uid})`:R.value.backgroundColor,stroke:`none`,"stroke-linecap":`round`,d:P.value.smooth?t.smoothPath:t.straightPath,style:_({opacity:P.value.opacity})},null,12,ct),h(`path`,{fill:`none`,stroke:P.value.stroke.useSerieColor?t.color:P.value.stroke.color,"stroke-width":P.value.strokeWidth,d:P.value.smooth?t.smoothPathRidge:t.straightPathRidge,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:_({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,lt),h(`path`,{fill:P.value.useGradient?P.value.useCommonColor?`url(#gradient-${t.id}-${k.value})`:`url(#gradient-single-${k.value}-${t.uid})`:t.color,stroke:`none`,d:P.value.smooth?t.smoothPath:t.straightPath,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:_({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,ut),R.value.zeroLine.show?(v(),m(`path`,{key:1,stroke:R.value.zeroLine.useSerieColor?t.color:R.value.zeroLine.stroke,"stroke-dasharray":R.value.zeroLine.strokeDasharray,"stroke-width":R.value.zeroLine.strokeWidth,d:t.zeroPath,"stroke-linecap":`round`},null,8,dt)):p(``,!0),P.value.maxPoint.show&&t.plots.length>1?(v(!0),m(u,{key:2},b(t.plots,e=>(v(),m(u,null,[e.isMaxPoint?(v(),m(`line`,{key:0,x1:e.x,y1:e.y,x2:e.x,y2:e.zero,stroke:P.value.maxPoint.adaptStrokeToBackground?C(le)(t.color):P.value.maxPoint.stroke,"stroke-width":P.value.maxPoint.strokeWidth,"stroke-linecap":`round`,"stroke-dasharray":P.value.maxPoint.strokeDasharray},null,8,ft)):p(``,!0)],64))),256)):p(``,!0),t.plots.length===1?(v(),m(`circle`,{key:3,cx:t.plots[0].x,cy:t.plots[0].y,stroke:F.value.dot.stroke,"stroke-width":F.value.dot.strokeWidth,r:F.value.dot.radius,fill:F.value.dot.useDatapointColor?t.color:F.value.dot.fill,style:{pointerEvents:`none`}},null,8,pt)):p(``,!0)]))),128)),h(`text`,{x:t.label.x,y:t.label.y,"text-anchor":`end`,"font-size":L.value.fontSize,"font-weight":L.value.bold?`bold`:`normal`,fill:L.value.color,style:_({cursor:R.value.dialog.show&&z.value?`pointer`:`default`}),"text-decoration":R.value.dialog.show&&(Vn.value===n||Kt.value&&t.uid===Kt.value.uid||j.value===n)?`underline`:``,"dominant-baseline":`middle`,onMouseenter:e=>Hn(n),onMouseleave:Un,onClick:e=>Bn(t)},S(t.name),45,mt)]))),128)),I.value.values.length?(v(),m(`g`,{key:0,ref_key:`timeLabelsEls`,ref:Yt},[(v(!0),m(u,null,b(J.value,(t,n)=>x(e.$slots,`time-label`,Ke({ref_for:!0},{show:t&&!I.value.showOnlyFirstAndLast&&!I.value.showOnlyAtModulo||t&&I.value.showOnlyFirstAndLast&&(n===0||n===J.value.length-1)||t&&A.value&&A.value.index===n||t&&!I.value.showOnlyFirstAndLast&&I.value.showOnlyAtModulo&&n%Math.max(1,Math.floor(Number(R.value.xAxis.labels.modulo)||1))===0,fontSize:I.value.fontSize,content:t.label,textAnchor:I.value.rotation>0?`start`:I.value.rotation<0?`end`:`middle`,fill:I.value.color,transform:`translate(${t.selectorX}, ${K.value.top+t.height+I.value.offsetY}), rotate(${I.value.rotation})`,x:t.selectorX,y:K.value.bottom+I.value.offsetY}),()=>[t&&!I.value.showOnlyFirstAndLast&&!I.value.showOnlyAtModulo||t&&I.value.showOnlyFirstAndLast&&(n===0||n===J.value.length-1)||t&&A.value&&A.value.index===n||t&&!I.value.showOnlyFirstAndLast&&I.value.showOnlyAtModulo&&n%Math.max(1,Math.floor(Number(R.value.xAxis.labels.modulo)||1))===0?(v(),m(`g`,ht,[String(t.label).includes(`
2
- `)?(v(),m(`text`,{key:1,class:`vue-ui-ridgeline-x-axis-label`,"font-size":I.value.fontSize,fill:I.value.color,"font-weight":I.value.bold?`bold`:`normal`,transform:`translate(${t.selectorX}, ${K.value.bottom+I.value.offsetY}), rotate(${I.value.rotation})`,"text-anchor":I.value.rotation>0?`start`:R.value.xAxis.labels.rotation<0?`end`:`middle`,style:_({opacity:A.value?A.value.index===n?1:.2:1}),innerHTML:C(c)({content:String(t.label),fontSize:R.value.xAxis.labels.fontSize,fill:R.value.xAxis.labels.color,stroke:R.value.backgroundColor,x:0,y:0})},null,12,_t)):(v(),m(`text`,{key:0,class:`vue-ui-ridgeline-x-axis-label`,"font-size":I.value.fontSize,fill:I.value.color,stroke:R.value.backgroundColor,"stroke-width":`3`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"paint-order":`stroke fill`,"font-weight":I.value.bold?`bold`:`normal`,transform:`translate(${t.selectorX}, ${K.value.bottom+I.value.offsetY}), rotate(${I.value.rotation})`,"text-anchor":I.value.rotation>0?`start`:R.value.xAxis.labels.rotation<0?`end`:`middle`,style:_({opacity:A.value?A.value.index===n?1:.2:1})},S(t.label),13,gt))])):p(``,!0)],!0)),256))],512)):p(``,!0),h(`g`,null,[(v(!0),m(u,null,b(J.value,(e,t)=>(v(),m(`rect`,{x:e.x,y:e.y,width:e.width<0?.1:e.width,height:e.height<0?.1:e.height,fill:`transparent`,onMouseenter:t=>kn(e),onMouseleave:t=>An(e),onClick:()=>jn(e)},null,40,vt))),256)),F.value.show&&A.value?(v(),m(`line`,{key:0,x1:A.value.selectorX,x2:A.value.selectorX,y1:A.value.y,y2:A.value.y+A.value.height-V.value/2,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-dasharray":F.value.strokeDasharray,"stroke-linecap":`round`,style:{pointerEvents:`none`}},null,8,yt)):p(``,!0),A.value||F.value.labels.showLast?(v(!0),m(u,{key:1},b(Y.value,e=>(v(),m(u,null,[(v(!0),m(u,null,b(e.datapoints,e=>(v(),m(u,null,[(v(!0),m(u,null,b(e.plots,(t,n)=>(v(),m(u,null,[A.value&&A.value.index===n||!A.value&&n===e.plots.length-1&&R.value.selector.labels.showLast?(v(),m(`circle`,{key:0,cx:t.x,cy:t.y,stroke:F.value.dot.stroke,"stroke-width":F.value.dot.strokeWidth,r:F.value.dot.radius,fill:F.value.dot.useDatapointColor?e.color:R.value.selector.dot.fill,style:{pointerEvents:`none`}},null,8,bt)):p(``,!0),A.value&&A.value.index===n||!A.value&&n===e.plots.length-1&&R.value.selector.labels.showLast?(v(),m(`text`,{key:1,x:Nn(t.x,C(l)(R.value.selector.labels.formatter,t.value,C(a)({p:M.value.style.chart.xAxis.labels.prefix,v:t.value,s:M.value.style.chart.xAxis.labels.suffix,r:M.value.style.chart.selector.labels.rounding})),R.value.selector.labels.fontSize)?t.x-R.value.selector.labels.fontSize/2:t.x+R.value.selector.labels.fontSize/2,y:t.y,"dominant-baseline":`middle`,stroke:R.value.backgroundColor,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`3`,"paint-order":`stroke fill`,"text-anchor":Nn(t.x,C(l)(R.value.selector.labels.formatter,t.value,C(a)({p:M.value.style.chart.xAxis.labels.prefix,v:t.value,s:M.value.style.chart.xAxis.labels.suffix,r:M.value.style.chart.selector.labels.rounding})),R.value.selector.labels.fontSize)?`end`:`start`,"font-size":F.value.labels.fontSize,fill:F.value.labels.color,style:{pointerEvents:`none`}},S(C(l)(R.value.selector.labels.formatter,t.value,C(a)({p:R.value.xAxis.labels.prefix,v:t.value,s:R.value.xAxis.labels.suffix,r:R.value.selector.labels.rounding}))),9,xt)):p(``,!0)],64))),256))],64))),256))],64))),256)):p(``,!0)]),x(e.$slots,`svg`,{svg:{...G.value,drawingArea:K.value,isPrintingImg:C(ln)||C(un)||C(rr),isPrintingSvg:C(ir),data:Y.value}},void 0,!0)],46,ot)),e.$slots.hint?(v(),m(`div`,St,[x(e.$slots,`hint`,Ye(Ge({hint:M.value.a11y.translations.keyboardNavigation,isVisible:Qt.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(v(),m(`div`,Ct,[x(e.$slots,`watermark`,Ye(Ge({isPrinting:C(ln)||C(un)||C(rr)||C(ir)})),void 0,!0)])):p(``,!0),h(`div`,{ref_key:`chartLegend`,ref:Lt},[x(e.$slots,`legend`,{legend:Z.value},()=>[R.value.legend.show?(v(),f(Be,{key:`legend_${Ht.value}`,legendSet:Z.value,config:In.value,isCursorPointer:z.value,onClickMarker:i[0]||=({legend:e})=>_n(e.id)},He({item:w(({legend:e})=>[C(tn)?p(``,!0):(v(),m(`div`,{key:0,style:_(`opacity:${X.value.includes(e.id)?.5:1}`),onClick:t=>e.segregate()},S(e.name),13,wt))]),legendToggle:w(()=>[Z.value.length>2&&R.value.legend.selectAllToggle.show&&!C(tn)?(v(),f(Ie,{key:0,backgroundColor:R.value.legend.selectAllToggle.backgroundColor,color:R.value.legend.selectAllToggle.color,fontSize:R.value.legend.fontSize,checked:X.value.length>0,isCursorPointer:z.value,onToggle:gn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):p(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:w(({legend:e,index:t})=>[We(Me,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${k.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):p(``,!0)],!0)],512),e.$slots.source?(v(),m(`div`,{key:6,ref_key:`source`,ref:Rt,dir:`auto`},[x(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),Pt.value&&N.value.buttons.table?(v(),f(Ze(Qn.value.component),Ke({key:7},Qn.value.props,{ref_key:`tableUnit`,ref:Xt,onClose:$n}),He({content:w(()=>[(v(),f(C(Ot),{key:`table_${Vt.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:M.value.table.useDialog?``:Qn.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:z.value,onClose:$n},{th:w(({th:e})=>[h(`div`,null,S(e),1)]),td:w(({td:e})=>[Ue(S(e.name?e.name:C(l)(F.value.labels.formatter,e,C(a)({p:R.value.xAxis.labels.prefix,v:e,s:R.value.xAxis.labels.suffix,r:M.value.table.td.roundingValue}))),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[M.value.table.useDialog?{name:`title`,fn:w(()=>[Ue(S(Qn.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:w(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>Jn(N.value.callbacks.csv),style:_({cursor:z.value?`pointer`:`default`})},[We(C(Et),{name:`fileCsv`,stroke:Qn.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),R.value.dialog.show?(v(),f(C(Mt),{key:8,ref_key:`dialog`,ref:qt,onClose:i[2]||=e=>Kt.value=null,backgroundColor:R.value.dialog.backgroundColor,color:R.value.dialog.color,headerBg:R.value.dialog.header.backgroundColor,headerColor:R.value.dialog.header.color,isFullscreen:Q.value,fullscreenParent:E.value,isCursorPointer:z.value,withPadding:``},{title:w(()=>[Ue(S(Kt.value.name),1)]),content:w(()=>[Kt.value?(v(),f(C(Tt),{key:0,config:Rn.value,dataset:zn.value,onCopyAlt:sr},null,8,[`config`,`dataset`])):p(``,!0)]),_:1},8,[`backgroundColor`,`color`,`headerBg`,`headerColor`,`isFullscreen`,`fullscreenParent`,`isCursorPointer`])):p(``,!0),x(e.$slots,`skeleton`,{},()=>[C(tn)?(v(),f(_e,{key:0})):p(``,!0)],!0)],46,rt))}},[[`__scopeId`,`data-v-394193d9`]]);export{nt as n,Tt as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as ee,Dt as te,Ht as o,J as ne,Jt as re,Kt as ie,S as ae,X as oe,Yt as se,Zt as ce,at as le,b as ue,i as de,in as fe,nn as pe,nt as me,pt as he,t as ge,w as _e,yt as ve,zt as ye}from"./lib-rPeBMZrn.js";import{n as be,t as xe}from"./BaseScanner-8NdoBs7B.js";import{n as Se,t as Ce}from"./useHints-C-TwxM0Y.js";import{t as we}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as Te}from"./useNestedProp-DnGoh-XS.js";import{t as Ee}from"./useThemeCheck-BKNRbGeC.js";import{t as De}from"./chartImage-DPGnEuYM.js";import{n as Oe}from"./Title-BliHuXfT.js";import{t as ke}from"./useChartExport-BZts4KFb.js";import{n as Ae,t as je}from"./tableIntegration-CNoJ1CIY.js";import{n as Me,t as Ne}from"./userOptionsSlots-DYuo-E5m.js";import{t as Pe}from"./usePrinter-DVf3YcG5.js";import{t as Fe}from"./useTransitions-ChGGrtrv.js";import{t as Ie}from"./Shape-CRe8woTu.js";import{c as Le}from"./canvas-lib-22VpOI4_.js";import{t as Re}from"./useResponsive-CENUxfEL.js";import{t as ze}from"./DefGrad-DKMq1REY.js";import{t as Be}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Ve}from"./A11yDataTable-DWNlWXzs.js";import{t as He}from"./useUserOptionState-CXlFnwPv.js";import{t as Ue}from"./useChartAccessibility-DOMuYJfm.js";import{t as We}from"./labelUtils-CdtU-yB_.js";import{t as Ge}from"./Legend-DM0ClX3D.js";import{t as Ke}from"./vue_ui_rings-BcDDXHpQ.js";import{Fragment as qe,Teleport as Je,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as Ye,createTextVNode as Xe,createVNode as Ze,defineAsyncComponent as f,guardReactiveProps as p,mergeProps as Qe,nextTick as $e,normalizeClass as m,normalizeProps as h,normalizeStyle as g,onBeforeUnmount as et,onMounted as tt,openBlock as _,ref as v,renderList as nt,renderSlot as y,resolveDynamicComponent as rt,shallowRef as it,toDisplayString as at,toRefs as ot,unref as b,useSlots as st,watch as ct,withCtx as x}from"vue";var lt=/* @__PURE__ */ e({default:()=>At}),ut=[`id`],dt=[`id`],ft=[`id`],pt={style:{position:`relative`}},mt=[`xmlns`,`viewBox`,`aria-describedby`],ht=[`width`,`height`],gt={key:1},_t=[`stroke`,`cx`,`cy`,`r`,`fill`],vt=[`stroke`,`stroke-width`,`cx`,`cy`,`r`,`fill`],yt=[`stroke`,`stroke-width`,`cx`,`cy`,`r`,`fill`],bt=[`cx`,`cy`,`r`,`onMouseenter`,`onMouseleave`,`onClick`],xt=[`x`,`y`,`width`,`height`,`fill`,`rx`],St=[`cx`,`cy`,`r`,`fill`,`stroke`],Ct=[`text-anchor`,`font-size`,`fill`,`font-weight`,`transform`,`onMouseenter`,`onMouseleave`,`onClick`,`innerHTML`],wt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Tt={key:5,class:`vue-data-ui-watermark`},Et=[`id`],Dt=[`onClick`],Ot={key:0},kt={key:1},At=/*#__PURE__*/ we({__name:`vue-ui-rings`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:we,emit:lt}){let At=f(()=>import(`./Tooltip-C1q0Qoh7.js`)),jt=f(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Mt=f(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Nt=f(()=>import(`./DataTable-Dof6yhO7.js`)),Pt=f(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Ft=f(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),It=f(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),Lt=f(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_rings:Rt}=i(),{isThemeValid:zt,warnInvalidTheme:Bt}=Ee(),Vt=st(),S=e,C=v(!1),Ht=s(()=>!!S.dataset&&S.dataset.length),w=v(oe()),T=v(!1),Ut=v(``),E=v(null),Wt=v(0),D=v(null),Gt=v(null),Kt=v(null),qt=v(null),Jt=v(null),Yt=v(0),Xt=v(0),Zt=v(0),Qt=v(!1),$t=v(!1),en=v(null),tn=v(null),O=v(null),nn=v({x:0,y:0}),k=v(`pointer`),rn=v(!1),A=v(dn()),j=s(()=>A.value.userOptions),M=s(()=>A.value.style.chart.layout.rings),N=s(()=>A.value.style.chart.layout.labels),P=s(()=>A.value.style.chart.tooltip),F=s(()=>A.value.style.chart);Se({config:()=>A.value,dataset:()=>S.dataset,component:`VueUiRings`,rules:[Ce.singleSeries,Ce.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let{transitionEnabled:I}=Fe({config:()=>A.value.transitions,dataset:()=>S.dataset}),L=s(()=>A.value.userOptions.useCursorPointer),an=s(()=>fe({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{rings:{stroke:`#6A6A6A`,gradient:{underlayerColor:`#FFFFFF`}},labels:{dataLabels:{show:!1}}},legend:{backgroundColor:`transparent`}}}},userConfig:A.value.skeletonConfig??{}})),{loading:R,FINAL_DATASET:on,manualLoading:sn}=be({...ot(S),FINAL_CONFIG:A,prepareConfig:dn,skeletonDataset:S.config?.skeletonDataset??[{name:`_`,values:[13],color:`#808080`},{name:`_`,values:[8],color:`#969696`},{name:`_`,values:[5],color:`#ADADAD`},{name:`_`,values:[3],color:`#C4C4C4`},{name:`_`,values:[2],color:`#DBDBDB`}],skeletonConfig:fe({defaultConfig:A.value,userConfig:an.value})}),{userOptionsVisible:cn,setUserOptionsVisibility:ln,keepUserOptionState:un}=He({config:A.value}),{svgRef:z}=Ue({config:F.value.title});function dn(){let e=Te({userConfig:S.config,defaultConfig:Rt}),t=e.theme;if(!t)return e;if(!zt.value(e))return Bt(e),e;let n=Te({userConfig:Ke[t]||S.config,defaultConfig:e});return{...Te({userConfig:S.config,defaultConfig:n}),customPalette:e.customPalette.length?e.customPalette:pe[e.theme]||o}}let fn=ce(S.config);ct(()=>S.config,(e,t)=>{let n=ce(e),r=n!==fn;fn=n;let i=dn();r?(R.value||(A.value=i),cn.value=!A.value.userOptions.showOnChartHover,hn(),Yt.value+=1,Xt.value+=1,Zt.value+=1,U.value.showTable=A.value.table.show,U.value.showTooltip=P.value.show,U.value.showLabels=N.value.dataLabels.show,W.value.width=F.value.size,W.value.height=F.value.size):(A.value.style.chart.tooltip=i.style.chart.tooltip,U.value.showTooltip=A.value.style.chart.tooltip.show)},{deep:!0});let pn=s(()=>{let{markers:e}=N.value.dataLabels,t=Y.value/2,n=U.value.showLabels?e.position===`left`?t:-t:0,r=U.value.showLabels?W.value.width/2-t:0,i=e.position===`left`?r:-r;return{x:A.value.responsive?i:n/F.value.size*W.value.width,y:0/F.value.size*W.value.height}}),B=s(()=>({x:W.value.width/2+pn.value.x,y:W.value.height/2+pn.value.y}));ct(()=>S.dataset,e=>{Array.isArray(e)&&e.length>0&&(sn.value=!1)},{deep:!0});let V=it(null),H=it(null);tt(()=>{$t.value=!0,hn()});let mn=s(()=>A.value.debug);function hn(){if(ye(S.dataset)?(le({componentName:`VueUiRings`,type:`dataset`,debug:mn.value}),sn.value=!0):S.dataset.forEach((e,t)=>{e.values.length||(le({componentName:`VueUiRings`,type:`dataset`,debug:mn.value}),sn.value=!0),ve({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{le({componentName:`VueUiRings`,type:`datasetSerieAttribute`,property:e,index:t,debug:mn.value})})}),ye(S.dataset)||(sn.value=A.value.loading),A.value.responsive){let e=Le(()=>{Qt.value=!0;let{width:e,height:t}=Re({chart:D.value,title:F.value.title.text?Gt.value:null,legend:F.value.legend.show?Kt.value:null,source:qt.value,noTitle:Jt.value});requestAnimationFrame(()=>{W.value.width=e,W.value.height=t-12,Qt.value=!1})});V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect()),V.value=new ResizeObserver(e),H.value=D.value.parentNode,V.value.observe(H.value)}setTimeout(()=>{C.value=!0},600)}et(()=>{V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect())});let{isPrinting:gn,isImaging:_n,generatePdf:vn,generateImage:yn}=Pe({elementId:`rings_${w.value}`,fileName:F.value.title.text||`vue-ui-rings`,options:A.value.userOptions.print}),bn=s(()=>A.value.userOptions.show&&!F.value.title.text),xn=s(()=>_e(A.value.customPalette)),U=v({showTable:A.value.table.show,showTooltip:P.value.show,showLabels:N.value.dataLabels.show});ct(A,()=>{U.value={showTable:A.value.table.show,showTooltip:P.value.show,showLabels:N.value.dataLabels.show}},{immediate:!0});let W=v({height:F.value.size,width:F.value.size}),Sn=s(()=>Math.min(W.value.height,W.value.width)),Cn=lt,G=v([]);function wn(){G.value.length?G.value=[]:Mn.value.forEach(e=>{G.value.push(e.uid)}),Tn()}function Tn(){Cn(`selectLegend`,J.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function En(e){if(G.value.includes(e))G.value=G.value.filter(t=>t!==e);else{if(G.value.length===K.value.length-1)return;G.value.push(e)}Tn()}function Dn(e){return K.value.length?K.value.find(t=>t.name===e)||(mn.value&&console.warn(`VueUiRings - Series name not found "${e}"`),null):(mn.value&&console.warn(`VueUiRings - There are no series to show.`),null)}function On(e){let t=Dn(e);t!==null&&G.value.includes(t.uid)&&En(t.uid)}function kn(e){let t=Dn(e);t!==null&&(G.value.includes(t.uid)||En(t.uid))}let An=s(()=>Math.max(...K.value.filter(e=>!G.value.includes(e.uid)).map(({value:e})=>e)));function jn(e){return e/An.value}let K=s(()=>on.value.map(({values:e,name:t,color:n=null},r)=>{let i=ie(e).reduce((e,t)=>e+t,0);return{name:t,color:n||ae(n)||xn.value[r]||o[r]||o[r%o.length],value:i,proportion:i/on.value.map(e=>(e.values||[]).reduce((e,t)=>e+t,0)).reduce((e,t)=>e+t,0),uid:oe(),absoluteIndex:r}})),Mn=s(()=>K.value.map((e,t)=>{let n=de(N.value.dataLabels.formatter,e.value,a({p:N.value.dataLabels.prefix,v:e.value,s:N.value.dataLabels.suffix,r:F.value.legend.roundingValue}),{datapoint:e,index:t}),r=isNaN(e.value/q.value)?`-`:a({v:e.value/q.value*100,s:`%`,r:F.value.legend.roundingPercentage}),i=Ln({showVal:F.value.legend.showValue,showPercentage:F.value.legend.showPercentage,val:n,percentage:G.value.includes(e.uid)?`-%`:r});return{...e,shape:`circle`,opacity:G.value.includes(e.uid)?.5:1,segregate:()=>En(e.uid),isSegregated:G.value.includes(e.uid),display:`${e.name}${F.value.legend.showPercentage||F.value.legend.showValue?`: `:``}${i}`}}).toSorted((e,t)=>t.value-e.value)),Nn=s(()=>({cy:`rings-div-legend`,backgroundColor:F.value.legend.backgroundColor,color:F.value.legend.color,fontSize:F.value.legend.fontSize,paddingBottom:12,fontWeight:F.value.legend.bold?`bold`:``})),q=s(()=>K.value.filter(e=>!G.value.includes(e.uid)).map(({value:e})=>e).reduce((e,t)=>e+t,0)),J=s(()=>K.value.filter(e=>!G.value.includes(e.uid)).map(({name:e,value:t,color:n=null,uid:r,absoluteIndex:i},a)=>({absoluteIndex:i,uid:r,name:e,color:n||ae(n)||xn.value[a]||o[a]||o[a%o.length],value:t,proportion:jn(t),percentage:t/q.value*100,strokeWidth:M.value.strokeWidth*jn(t)})).toSorted((e,t)=>t.value-e.value));function Pn(){return J.value.map(({name:e,color:t,value:n,absoluteValues:r,percentage:i})=>({name:e,color:t,value:n,absoluteValues:r,percentage:i}))}let Y=s(()=>Sn.value-M.value.strokeWidth*2);function Fn(e,t){A.value.events.datapointClick&&A.value.events.datapointClick({datapoint:e,seriesIndex:t})}function In(e,t){E.value=null,T.value=!1,O.value=null,k.value=`pointer`,A.value.events.datapointLeave&&A.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function Ln({val:e,percentage:t,showVal:n,showPercentage:r}){let i=N.value.dataLabels;return We({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function Rn(e){let t=N.value.dataLabels,n=de(t.formatter,e.value,a({p:t.prefix,v:e.value,s:t.suffix,r:t.roundingValue})),r=a({v:e.percentage,s:`%`,r:t.roundingPercentage});return`${e.name}\n${Ln({val:n,percentage:r,showVal:t.showValue,showPercentage:t.showPercentage})}`}function zn(e){return ue(Y.value*e.proportion/2*.9<=0?1e-4:Y.value*e.proportion/2*.9)}function Bn(e,t){return t===0?B.value.y:B.value.y+Y.value*J.value[0].proportion/2-Y.value*e.proportion/2-2*(t+1)}function X(e,t){let n=N.value.dataLabels.markers.position===`left`?-(Y.value/2):Y.value/2;return{x:B.value.x+n,y:Bn(e,t)-zn(e)}}let Vn=v(null);function Hn(e,t,n=`pointer`){if(A.value.events.datapointEnter&&A.value.events.datapointEnter({datapoint:e,seriesIndex:t}),G.value.length===S.dataset.length)return;Vn.value={datapoint:e,seriesIndex:t,series:J.value,config:A.value},E.value=t,O.value=t,k.value=n;let r=J.value[t],i=P.value.customFormat;if(te(i)&&he(()=>i({seriesIndex:t,datapoint:e,series:J.value,config:A.value})))Ut.value=i({seriesIndex:t,datapoint:e,series:J.value,config:A.value});else{let n=``;n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${P.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${r.name}</div>`,n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${r.color}" />${Vt.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${w.value}_${e.absoluteIndex})" />`:``}</svg>`,n+=`<b>${Ln({showVal:P.value.showValue,showPercentage:P.value.showPercentage,val:`<span>${de(N.value.dataLabels.formatter,r.value,a({p:N.value.dataLabels.prefix,v:r.value,s:N.value.dataLabels.suffix,r:P.value.roundingValue}),{datapoint:e,seriesIndex:t})}</span>`,percentage:a({v:r.value/q.value*100,s:`%`,r:P.value.roundingPercentage})})}</b></div>`,Ut.value=n}T.value=!0}let Z=s(()=>({head:J.value.map(e=>({name:e.name,color:e.color})),body:J.value.map(e=>e.value)})),Q=s(()=>{let e=[`__SUM__`,a({p:N.value.dataLabels.prefix,v:q.value,s:N.value.dataLabels.suffix,r:A.value.table.td.roundingValue}),`100%`],t=Z.value.head.map((e,t)=>[{color:e.color,name:e.name},a({p:N.value.dataLabels.prefix,v:Z.value.body[t],s:N.value.dataLabels.suffix,r:A.value.table.td.roundingValue}),isNaN(Z.value.body[t]/q.value)?`-`:(Z.value.body[t]/q.value*100).toFixed(A.value.table.td.roundingPercentage)+`%`]);return{head:e,body:t,a11yBody:t.map(e=>e.map((e,t)=>t===0?e.name:e)),config:{th:{backgroundColor:A.value.table.th.backgroundColor,color:A.value.table.th.color,outline:A.value.table.th.outline},td:{backgroundColor:A.value.table.td.backgroundColor,color:A.value.table.td.color,outline:A.value.table.td.outline},breakpoint:A.value.table.responsiveBreakpoint},colNames:[A.value.table.columnNames.series,A.value.table.columnNames.value,A.value.table.columnNames.percentage]}});function Un(e=null){$e(()=>{let t=Z.value.head.map((e,t)=>[[e.name],[Z.value.body[t]],[isNaN(Z.value.body[t]/q.value)?`-`:Z.value.body[t]/q.value*100]]),n=[[F.value.title.text],[F.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=ee(n);e?e(r):me({csvContent:r,title:F.value.title.text||`vue-ui-rings`})})}let $=v(!1);function Wn(e){$.value=e,Wt.value+=1}function Gn(){U.value.showTable=!U.value.showTable}function Kn(){U.value.showTooltip=!U.value.showTooltip}function qn(){U.value.showLabels=!U.value.showLabels}let Jn=v(!1);function Yn(){Jn.value=!Jn.value}let Xn=De(D,()=>F.value.title.text),Zn=s(()=>je({config:A,style:F,mutableConfig:U,dialog:Lt,accordion:Mt,isFullscreen:$,parent:D,maxWidth:800,isCursorPointer:L}));ct(()=>U.value.showTable,e=>Ae(e,A,en));function Qn(){U.value.showTable=!1,tn.value&&tn.value.setTableIconState(!1)}let $n=s(()=>Mn.value.map(e=>({...e,name:e.display}))),er=s(()=>F.value.backgroundColor),tr=s(()=>F.value.legend),nr=s(()=>F.value.title),{isCallbackImaging:rr,isCallbackSvg:ir,generateSvg:ar,onGenerateImage:or}=ke({svg:z,title:nr,legend:tr,legendItems:$n,backgroundColor:er,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:yn});async function sr(){Cn(`copyAlt`,{config:A.value,dataset:J.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:J.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function cr(){O.value=null,rn.value=!0}function lr(){O.value=null,k.value=`pointer`,T.value=!1,E.value=null,rn.value=!1}function ur(e){if(!z.value||Jn.value||document.activeElement!==z.value||!J.value.length||G.value.length===S.dataset.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){O.value=null,k.value=`pointer`,T.value=!1,E.value=null;return}if(r){if(O.value===null)return;let e=J.value[O.value];if(!e)return;Fn(e,O.value);return}let a=O.value;a===null||a<0||a>=J.value.length?a=n?0:J.value.length-1:n?(a+=1,a>=J.value.length&&(a=0)):t&&(--a,a<0&&(a=J.value.length-1));let ee=J.value[a];ee&&(dr(a),Hn(ee,a,`keyboard`))}function dr(e){if(!Number.isFinite(e)||!z.value)return;let t=J.value[e];if(!t)return;let n=X(t,e),r=z.value.getBoundingClientRect();nn.value={x:r.left+n.x/W.value.width*r.width,y:r.top+n.y/W.value.height*r.height}}let fr=s(()=>({headers:Q.value?.colNames??[],rows:Q.value?.a11yBody??[]}));return we({getData:Pn,getImage:Xn,generatePdf:vn,generateCsv:Un,generateImage:yn,generateSvg:ar,hideSeries:kn,showSeries:On,toggleTable:Gn,toggleTooltip:Kn,toggleAnnotator:Yn,toggleFullscreen:Wn,toggleLabels:qn,copyAlt:sr}),(e,i)=>(_(),u(`div`,{ref_key:`ringsChart`,ref:D,class:m(`vue-data-ui-component vue-ui-rings ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${A.value.useCssAnimation?``:`vue-ui-dna`}`),style:g(`font-family:${A.value.style.fontFamily};text-align:center;width:100%;background:${F.value.backgroundColor};${A.value.responsive?`height: 100%`:``}`),id:`rings_${w.value}`,onMouseleave:i[2]||=e=>{E.value=null,T.value=!1,b(ln)(!1)},onMouseenter:i[3]||=()=>b(ln)(!0)},[d(`div`,{id:`chart-instructions-${w.value}`,class:`sr-only`},[d(`p`,null,at(A.value.a11y.translations.keyboardNavigation),1)],8,dt),fr.value?.rows?.length?(_(),c(Ve,{key:0,uid:w.value,head:fr.value.headers,body:fr.value.rows,notice:A.value.a11y.translations.tableAvailable,caption:A.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):l(``,!0),j.value.buttons.annotator?(_(),c(b(Pt),Qe({key:1},b(n)(j.value.annotator),{svgRef:b(z),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Jn.value,isCursorPointer:L.value,palette:j.value.annotatorPalette,onClose:Yn}),Ye({_:2},[nt(b(r),n=>({name:n,fn:x(r=>[y(e.$slots,n,h(p(b(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):l(``,!0),bn.value?(_(),u(`div`,{key:2,ref_key:`noTitle`,ref:Jt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):l(``,!0),F.value.title.text?(_(),u(`div`,{key:3,ref_key:`chartTitle`,ref:Gt,style:`width:100%;background:transparent`},[(_(),c(Oe,{key:`title_${Yt.value}`,config:{title:{cy:`rings-div-title`,...F.value.title},subtitle:{cy:`rings-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],512)):l(``,!0),d(`div`,{id:`legend-top-${w.value}`},null,8,ft),j.value.show&&Ht.value&&(b(un)||b(cn))?(_(),c(b(Ft),{ref_key:`userOptionsRef`,ref:tn,key:`user_options_${Wt.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isPrinting:b(gn),isImaging:b(_n),uid:w.value,hasTooltip:j.value.buttons.tooltip&&P.value.show,hasPdf:j.value.buttons.pdf,hasXls:j.value.buttons.csv,hasImg:j.value.buttons.img,hasSvg:j.value.buttons.svg,hasTable:j.value.buttons.table,hasFullscreen:j.value.buttons.fullscreen,hasAltCopy:j.value.buttons.altCopy,hasLabel:j.value.buttons.labels,isTooltip:U.value.showTooltip,isFullscreen:$.value,titles:{...j.value.buttonTitles},chartElement:D.value,position:j.value.position,hasAnnotator:j.value.buttons.annotator,isAnnotation:Jn.value,callbacks:j.value.callbacks,printScale:j.value.print.scale,tableDialog:A.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:Wn,onGeneratePdf:b(vn),onGenerateCsv:Un,onGenerateImage:b(or),onGenerateSvg:b(ar),onToggleTable:Gn,onToggleTooltip:Kn,onToggleAnnotator:Yn,onToggleLabels:qn,onCopyAlt:sr,style:g({visibility:b(un)?b(cn)?`visible`:`hidden`:`visible`})},Ye({_:2},[nt(b(Me)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:x(n=>[y(e.$slots,t,h(p(b(Ne)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.hasLabel.isTooltip.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):l(``,!0),d(`div`,pt,[(_(),u(`svg`,{ref_key:`svgRef`,ref:z,xmlns:b(ge),class:m({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value,resizing:Qt.value||b(R),"vue-data-ui-no-transition":!b(I)}),viewBox:`0 0 ${W.value.width<=0?10:W.value.width} ${W.value.height<=0?10:W.value.height}`,style:g(`max-width:100%;overflow:hidden;background:transparent;color:${F.value.color}`),"aria-describedby":`chart-instructions-${w.value}`,tabindex:`0`,onFocus:cr,onBlur:lr,onKeydown:ur},[Ze(b(It)),y(e.$slots,`svg-underlayer`,{svg:{...W.value,isPrintingImg:b(gn)||b(_n)||b(rr),isPrintingSvg:b(ir)}},void 0,!0),e.$slots[`chart-background`]?(_(),u(`foreignObject`,{key:0,x:0,y:0,width:W.value.width<=0?10:W.value.width,height:W.value.height<=0?10:W.value.height,style:{pointerEvents:`none`}},[y(e.$slots,`chart-background`,{},void 0,!0)],8,ht)):l(``,!0),d(`defs`,null,[(_(!0),u(qe,null,nt(J.value,(e,t)=>(_(),c(ze,{t:`radial`,cx:`50%`,cy:`30%`,r:`50%`,fx:`50%`,fy:`50%`,id:`gradient_${w.value}_${t}`,key:`gradient_${w.value}_${t}`,stops:[[`0%`,b(re)(b(se)(e.color,.05),100-M.value.gradient.intensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),e.$slots.pattern?(_(),u(`g`,gt,[(_(!0),u(qe,null,nt(J.value,t=>(_(),u(`defs`,null,[y(e.$slots,`pattern`,Qe({ref_for:!0},{seriesIndex:t.absoluteIndex,patternId:`pattern_${w.value}_${t.absoluteIndex}`}),void 0,!0)]))),256))])):l(``,!0),(_(!0),u(qe,null,nt(J.value,(t,n)=>(_(),u(`g`,{key:`r_${t.uid}`},[d(`circle`,{class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-opacity":E.value!==null&&E.value!==n}),style:g(`animation-delay:${n*100}ms`),stroke:M.value.stroke,cx:B.value.x,cy:Bn(t,n),r:zn(t),fill:M.value.gradient.underlayerColor},null,14,_t),d(`circle`,{class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n}),style:g(`animation-delay:${n*100}ms`),stroke:M.value.stroke,"stroke-width":t.strokeWidth<.5?.5:t.strokeWidth,cx:B.value.x,cy:Bn(t,n),r:zn(t),fill:M.value.gradient.show?`url(#gradient_${w.value}_${n})`:t.color},null,14,vt),e.$slots.pattern?(_(),u(`circle`,{key:0,class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n}),style:g(`animation-delay:${n*100}ms`),stroke:M.value.stroke,"stroke-width":t.strokeWidth<.5?.5:t.strokeWidth,cx:B.value.x,cy:Bn(t,n),r:zn(t),fill:`url(#pattern_${w.value}_${t.absoluteIndex})`},null,14,yt)):l(``,!0),d(`circle`,{stroke:`none`,cx:B.value.x,cy:Bn(t,n),r:zn(t),fill:`transparent`,onMouseenter:e=>Hn(t,n,`pointer`),onMouseleave:e=>In(t,n),onClick:e=>Fn(t,n)},null,40,bt),U.value.showLabels?(_(),u(qe,{key:1},[d(`rect`,{x:N.value.dataLabels.markers.position===`left`?X(t,n).x:B.value.x,y:X(t,n).y-N.value.dataLabels.markers.strokeWidth/2,width:Math.abs(B.value.x-X(t,n).x),height:N.value.dataLabels.markers.strokeWidth,fill:N.value.dataLabels.markers.stroke,rx:N.value.dataLabels.markers.strokeWidth,class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n})},null,10,xt),d(`circle`,{cx:X(t,n).x,cy:X(t,n).y,r:N.value.dataLabels.markers.radius,fill:t.color,stroke:F.value.backgroundColor,class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n})},null,10,St),d(`text`,{"text-anchor":N.value.dataLabels.markers.position===`left`?`end`:`start`,"font-size":N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,"font-weight":N.value.dataLabels.bold?`bold`:`normal`,class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n}),transform:`translate(${X(t,n).x+(N.value.dataLabels.markers.position===`left`?-N.value.dataLabels.offsetX-14:N.value.dataLabels.offsetX)+6}, ${X(t,n).y+N.value.dataLabels.fontSize/3})`,onMouseenter:e=>Hn(t,n,`pointer`),onMouseleave:e=>In(t,n),onClick:e=>Fn(t,n),innerHTML:b(ne)({content:Rn(t),fontSize:N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,x:0,y:0,translateY:!0})},null,42,Ct)],64)):l(``,!0)]))),128)),y(e.$slots,`svg`,{svg:{...W.value,isPrintingImg:b(gn)||b(_n)||b(rr),isPrintingSvg:b(ir)}},void 0,!0)],46,mt)),e.$slots.hint?(_(),u(`div`,wt,[y(e.$slots,`hint`,h(p({hint:A.value.a11y.translations.keyboardNavigation,isVisible:rn.value})),void 0,!0)])):l(``,!0)]),e.$slots.watermark?(_(),u(`div`,Tt,[y(e.$slots,`watermark`,h(p({isPrinting:b(gn)||b(_n)||b(rr)||b(ir)})),void 0,!0)])):l(``,!0),d(`div`,{id:`legend-bottom-${w.value}`},null,8,Et),$t.value&&(F.value.legend.show||e.$slots.legend)?(_(),c(Je,{key:6,to:F.value.legend.position===`top`?`#legend-top-${w.value}`:`#legend-bottom-${w.value}`},[d(`div`,{ref_key:`chartLegend`,ref:Kt},[y(e.$slots,`legend`,{legend:Mn.value},()=>[F.value.legend.show?(_(),c(Ge,{key:`legend_${Zt.value}`,legendSet:Mn.value,config:Nn.value,isCursorPointer:L.value,onClickMarker:i[0]||=({legend:e})=>En(e.uid)},Ye({item:x(({legend:e,index:t})=>[b(R)?l(``,!0):(_(),u(`div`,{key:0,onClick:t=>En(e.uid),style:g(`opacity:${G.value.includes(e.uid)?.5:1}`)},at(e.display),13,Dt))]),legendToggle:x(()=>[Mn.value.length>2&&F.value.legend.selectAllToggle.show&&!b(R)?(_(),c(Be,{key:0,backgroundColor:F.value.legend.selectAllToggle.backgroundColor,color:F.value.legend.selectAllToggle.color,fontSize:F.value.legend.fontSize,checked:G.value.length>0,isCursorPointer:L.value,onToggle:wn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):l(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:x(({legend:e,index:t})=>[Ze(Ie,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${w.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):l(``,!0)],!0)],512)],8,[`to`])):l(``,!0),e.$slots.source?(_(),u(`div`,{key:7,ref_key:`source`,ref:qt,dir:`auto`},[y(e.$slots,`source`,{},void 0,!0)],512)):l(``,!0),Ze(b(At),{teleportTo:P.value.teleportTo,show:U.value.showTooltip&&T.value&&G.value.length<S.dataset.length,backgroundColor:P.value.backgroundColor,color:P.value.color,borderRadius:P.value.borderRadius,borderColor:P.value.borderColor,borderWidth:P.value.borderWidth,fontSize:P.value.fontSize,backgroundOpacity:P.value.backgroundOpacity,position:P.value.position,offsetX:P.value.offsetX,offsetY:P.value.offsetY,parent:D.value,content:Ut.value,isFullscreen:$.value,isCustom:P.value.customFormat&&typeof P.value.customFormat==`function`,smooth:P.value.smooth,backdropFilter:P.value.backdropFilter,smoothForce:P.value.smoothForce,smoothSnapThreshold:P.value.smoothSnapThreshold,isA11yMode:k.value===`keyboard`,a11yPosition:nn.value},{"tooltip-before":x(()=>[y(e.$slots,`tooltip-before`,h(p({...Vn.value})),void 0,!0)]),tooltip:x(()=>[y(e.$slots,`tooltip`,h(p({...Vn.value})),void 0,!0)]),"tooltip-after":x(()=>[y(e.$slots,`tooltip-after`,h(p({...Vn.value})),void 0,!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`]),Ht.value&&j.value.buttons.table?(_(),c(rt(Zn.value.component),Qe({key:8},Zn.value.props,{ref_key:`tableUnit`,ref:en,onClose:Qn}),Ye({content:x(()=>[(_(),c(b(Nt),{key:`table_${Xt.value}`,colNames:Q.value.colNames,head:Q.value.head,body:Q.value.body,config:Q.value.config,title:A.value.table.useDialog?``:Zn.value.title,withCloseButton:!A.value.table.useDialog,isCursorPointer:L.value,onClose:Qn},{th:x(({th:e})=>[e===`__SUM__`?(_(),u(`div`,Ot,[Ze(b(jt),{name:`sigma`,stroke:Q.value.config.th.color,size:16},null,8,[`stroke`])])):(_(),u(`div`,kt,at(e),1))]),td:x(({td:e})=>[Xe(at(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[A.value.table.useDialog?{name:`title`,fn:x(()=>[Xe(at(Zn.value.title),1)]),key:`0`}:void 0,A.value.table.useDialog?{name:`actions`,fn:x(()=>[d(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>Un(j.value.callbacks.csv),style:g({cursor:L.value?`pointer`:`default`})},[Ze(b(jt),{name:`fileCsv`,stroke:Zn.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):l(``,!0),y(e.$slots,`skeleton`,{},()=>[b(R)?(_(),c(xe,{key:0})):l(``,!0)],!0)],46,ut))}},[[`__scopeId`,`data-v-83abb35d`]]);export{lt as n,At as t};
@@ -1,9 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,Ct as o,D as s,Dt as c,F as l,Ht as u,Jt as d,P as f,Qt as p,S as ee,X as te,_ as ne,at as m,b as h,i as g,in as re,jt as ie,nt as ae,pt as oe,t as se,tn as ce,v as le,w as ue,yt as de,zt as fe}from"./lib-rPeBMZrn.js";import{n as pe,t as me}from"./BaseScanner-8NdoBs7B.js";import{n as he,t as ge}from"./useHints-C-TwxM0Y.js";import{t as _e}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ve}from"./resolveChartConfig-CIhClE5R.js";import{t as ye}from"./img-D4RQwASc.js";import{n as be}from"./Title-BliHuXfT.js";import{t as xe}from"./useChartExport-BZts4KFb.js";import{n as Se,t as Ce}from"./tableIntegration-CNoJ1CIY.js";import{n as we,t as Te}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ee}from"./usePrinter-DVf3YcG5.js";import{t as De}from"./useTransitions-ChGGrtrv.js";import{t as Oe}from"./useSvgLabelLayout-42Kats14.js";import{t as ke}from"./Shape-CRe8woTu.js";import{t as Ae}from"./useResponsive-CENUxfEL.js";import{t as je}from"./DefGrad-DKMq1REY.js";import{t as Me}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Ne}from"./A11yDataTable-DWNlWXzs.js";import{t as Pe}from"./useUserOptionState-CXlFnwPv.js";import{t as Fe}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ie}from"./Legend-DM0ClX3D.js";import{t as Le}from"./vue_ui_scatter-C50uFYQL.js";import{Fragment as _,Teleport as Re,computed as v,createBlock as y,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as ze,createTextVNode as Be,createVNode as Ve,defineAsyncComponent as He,guardReactiveProps as Ue,mergeProps as We,nextTick as Ge,normalizeClass as Ke,normalizeProps as qe,normalizeStyle as Je,onBeforeUnmount as Ye,onMounted as Xe,openBlock as C,ref as w,renderList as T,renderSlot as E,resolveDynamicComponent as Ze,shallowRef as Qe,toDisplayString as D,toRefs as $e,unref as O,watch as et,withCtx as k}from"vue";var tt=/* @__PURE__ */ e({default:()=>Tn}),nt=[`id`],rt=[`id`],it={key:0,class:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`},at=[`id`],ot={style:{position:`relative`}},st=[`xmlns`,`aria-describedby`,`viewBox`],ct=[`width`,`height`],lt={key:1},ut=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],dt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ft={key:2},pt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],mt=[`opacity`],ht=[`stroke`,`stroke-width`,`d`],gt=[`transform`,`font-size`,`fill`,`stroke`],_t={key:4},vt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],yt=[`opacity`],bt=[`d`,`stroke`,`stroke-width`],xt=[`transform`,`font-size`,`fill`,`stroke`],St={key:6},Ct=[`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`,`rx`],wt=[`x`,`y`,`width`,`height`,`onMouseenter`],Tt={key:2,style:{"pointer-events":`none`}},Et=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`],Dt=[`x1`,`x2`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Ot=[`x1`,`x2`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],kt=[`x`,`y`,`height`,`width`,`fill`,`stroke`,`stroke-width`,`rx`],At=[`x`,`y`,`width`,`height`,`onMouseenter`],jt={key:2,style:{"pointer-events":`none`}},Mt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`],Nt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Pt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Ft={key:0,style:{"pointer-events":`none`}},It=[`d`,`stroke`,`stroke-width`],Lt=[`d`,`stroke`,`stroke-width`],Rt=[`d`,`stroke`,`stroke-width`],zt=[`d`,`stroke`,`stroke-width`],Bt={key:7},Vt=[`points`,`fill`,`stroke-width`,`stroke-dasharray`,`stroke`],Ht={key:0,class:`vue-ui-scatter-datapoint`},Ut=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onMouseover`,`onMouseleave`,`onClick`],Wt={key:1},Gt=[`transform`,`font-size`,`fill`,`onMouseover`,`onMouseleave`,`onClick`],Kt=[`d`,`fill`,`stroke`,`stroke-width`,`stroke-opacity`],qt={key:0,style:{"pointer-events":`none`}},Jt=[`x`,`y`,`width`,`height`],Yt={key:0,style:{"pointer-events":`none !important`}},Xt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Zt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Qt=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],$t=[`x`,`y`,`font-size`,`fill`,`font-weight`],en=[`x`,`y`,`font-size`,`fill`],tn=[`x`,`y`,`font-size`,`fill`],nn=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],rn=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],an=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],on=[`id`,`transform`,`font-size`,`font-weight`,`fill`],sn=[`font-size`,`fill`,`transform`],cn=[`transform`,`font-size`,`fill`],ln=[`x`,`y`,`font-size`,`fill`],un=[`x`,`y`,`font-size`,`fill`],dn=[`font-size`,`font-weight`,`fill`,`x`,`y`],fn=[`id`],pn=[`x`,`y`,`width`,`height`],mn={key:14,style:{pointerEvents:`none`}},hn=[`x1`,`x2`,`y1`,`y2`,`stroke-dasharray`,`stroke`,`stroke-width`,`clip-path`],gn=[`x`,`y`,`fill`,`font-size`,`font-weight`],_n={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},vn={key:6,class:`vue-data-ui-watermark`},yn=[`id`],bn=[`onClick`],xn={key:0,style:{width:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`}},Sn={viewBox:`0 0 20 20`,height:`20`,width:`20`,style:{overflow:`hidden`,background:`transparent`}},Cn={key:0},wn=[`innerHTML`],Tn=/*#__PURE__*/ _e({__name:`vue-ui-scatter`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`,`selectLegend`],setup(e,{expose:_e,emit:tt}){let Tn=He(()=>import(`./Tooltip-C1q0Qoh7.js`)),En=He(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Dn=He(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),On=He(()=>import(`./DataTable-Dof6yhO7.js`)),kn=He(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),An=He(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),jn=He(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),Mn=He(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_scatter:Nn}=i(),A=e,Pn=tt,Fn=v(()=>!!A.dataset&&A.dataset.length),j=w(te()),In=w(!1),Ln=w(``),Rn=w(0),zn=w(null),Bn=w(null),Vn=w(null),Hn=w(null),Un=w(null),Wn=w(0),Gn=w(0),Kn=w(0),M=w([]),qn=w(!1),Jn=w(null),Yn=w(null),Xn=w(null),Zn=w(null),Qn=w(null),$n=w(null),er=w(null),tr=w(null),nr=w(null),rr=w(null),ir=w(null),ar=w({x:0,y:0}),or=w(`pointer`),sr=w(!1),cr=w(null),N=w(xr()),P=v(()=>N.value.userOptions),F=v(()=>N.value.style.layout.dataLabels.xAxis),I=v(()=>N.value.style.layout.dataLabels.yAxis),L=v(()=>N.value.style.layout.marginalBars),R=v(()=>N.value.style.layout.plots),z=v(()=>N.value.style.tooltip),B=v(()=>N.value.style);he({config:()=>N.value,dataset:()=>A.dataset,component:`VueUiScatter`,rules:[ge.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series (clusters) is > 6. Consider:`,``,``,`▶️ Using filters to let users choose a maximum number of series (clusters) to display.`]}]});let{transitionEnabled:lr}=De({config:()=>N.value.transitions,dataset:()=>A.dataset}),ur=v(()=>N.value.userOptions.useCursorPointer),dr=v(()=>c(N.value.events?.datapointClick));function fr(e=100,t=.8,n={}){let{meanX:r=0,sdX:i=1,meanY:a=0,sdY:o=1,seed:s}=n,c=(s??Math.floor(Math.random()*2**31))>>>0,l=()=>(c=c*1664525+1013904223>>>0,c/2**32),u=()=>{let e=0,t=0;for(;e===0;)e=l();for(;t===0;)t=l();return Math.sqrt(-2*Math.log(e))*Math.cos(2*Math.PI*t)},d=e/2,f=Array.from({length:d},u),p=Array.from({length:d},u),ee=e=>e.reduce((e,t)=>e+t,0)/e.length,te=ee(f),ne=ee(p);for(let e=0;e<d;e+=1)f[e]-=te,p[e]-=ne;let m=(e,t)=>e.reduce((e,n,r)=>e+n*t[r],0),h=e=>m(e,e),g=m(p,f)/h(f),re=p.map((e,t)=>e-g*f[t]),ie=h(f)/d,ae=h(re)/d,oe=Math.sqrt((1-t*t)*ie/ae),se=f.map((e,n)=>t*e+oe*re[n]),ce=f.concat(f.map(e=>-e)),le=se.concat(se.map(e=>-e)),ue=e=>Math.sqrt(h(e)/e.length),de=(e,t,n)=>{let r=ue(e);return e.map(e=>n+(r?e/r*t:0))},fe=de(ce,i,r),pe=de(le,o,a);for(let e=fe.length-1;e>0;--e){let t=Math.floor(l()*(e+1));[fe[e],fe[t]]=[fe[t],fe[e]],[pe[e],pe[t]]=[pe[t],pe[e]]}return fe.map((e,t)=>({x:e,y:pe[t]}))}let pr=v(()=>re({defaultConfig:{userOptions:{show:!1},table:{show:!1},useCssAnimation:!1,style:{backgroundColor:`#99999930`,layout:{axis:{stroke:`#6A6A6A`},correlation:{label:{show:!1}},dataLabels:{xAxis:{show:!1},yAxis:{show:!1}},marginalBars:{fill:`#99999960`},padding:{top:12,right:12,bottom:12,left:12},plots:{stroke:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}},userConfig:N.value.skeletonConfig??{}})),{loading:mr,FINAL_DATASET:hr,manualLoading:gr}=pe({...$e(A),FINAL_CONFIG:N,prepareConfig:xr,skeletonDataset:A.config?.skeletonDataset??[{name:``,color:`#999999`,values:fr(100,.5,{seed:42})}],skeletonConfig:re({defaultConfig:N.value,userConfig:pr.value})}),{userOptionsVisible:_r,setUserOptionsVisibility:vr,keepUserOptionState:yr}=Pe({config:N.value}),{svgRef:br}=Fe({config:B.value.title});function xr(){return ve(A.config,Nn,Le)}let Sr=p(A.config);et(()=>A.config,(e,t)=>{let n=p(e),r=n!==Sr;Sr=n;let i=xr();r?(mr.value||(N.value=i),_r.value=!N.value.userOptions.showOnChartHover,Or(),Wn.value+=1,Gn.value+=1,Kn.value+=1,V.value.showTable=N.value.table.show,V.value.showTooltip=z.value.show,Dr.value&&N.value.usePerformanceMode&&console.warn(`VueUiScatter : You are using performance mode
2
-
3
- - downsampling is disabled in this mode, all plots are rendered
4
-
5
- - plot significance is not active in this mode (all plots have the same opacity)
6
-
7
- - Depending on plot density, shapes might not display a border (stroke) to avoid fuzziness
8
-
9
- ℹ️ To remove this warning, set config.debug to false.`)):(N.value.style.tooltip=i.style.tooltip,V.value.showTooltip=N.value.style.tooltip.show)},{deep:!0}),et(()=>A.dataset,e=>{Array.isArray(e)&&e.length>0&&(gr.value=!1)},{deep:!0});let Cr=Qe(null),wr=Qe(null),Tr=w(!1),Er=0;Xe(async()=>{Or(),await Ge(),qn.value=!0});let Dr=v(()=>N.value.debug);function Or(){fe(A.dataset)&&(m({componentName:`VueUiScatter`,type:`dataset`,debug:Dr.value}),gr.value=!0),fe(A.dataset)||(gr.value=N.value.loading),N.value.responsive&&(Cr.value&&(wr.value&&Cr.value.unobserve(wr.value),Cr.value.disconnect()),Cr.value=new ResizeObserver(()=>{let{width:e,height:t}=Ae({chart:zn.value,title:B.value.title.text?Bn.value:null,legend:B.value.legend.show?Vn.value:null,source:Hn.value,noTitle:Un.value});cancelAnimationFrame(Er),Er=requestAnimationFrame(()=>{H.value.width=e,H.value.height=t,Tr.value=!0})}),wr.value=zn.value.parentNode,Cr.value.observe(wr.value))}Ye(()=>{cancelAnimationFrame(Er),Cr.value&&(wr.value&&Cr.value.unobserve(wr.value),Cr.value.disconnect())});let{isPrinting:kr,isImaging:Ar,generatePdf:jr,generateImage:Mr}=Ee({elementId:`vue-ui-scatter_${j.value}`,fileName:B.value.title.text||`vue-ui-scatter`,options:N.value.userOptions.print}),Nr=v(()=>N.value.userOptions.show&&!B.value.title.text),Pr=v(()=>ue(N.value.customPalette)),V=w({showTable:N.value.table.show,showTooltip:z.value.show});et(N,()=>{V.value={showTable:N.value.table.show,showTooltip:z.value.show}},{immediate:!0});let H=w({height:B.value.layout.height,width:B.value.layout.width}),Fr=v(()=>L.value.show?L.value.size+L.value.offset:0),{metrics:Ir,ready:Lr,settling:Rr,update:zr}=Oe({svgRef:br,canMeasure:()=>!N.value.responsive||Tr.value,initialMetrics:{left:0,right:0,bottom:0},measure:e=>{let t=I.value.scales.show?e(nr.value).textWidth:0,n=t=>{let n=e(t);return Math.max(0,n.x+n.width-H.value.width)},r=$n.value?n($n.value):0,i=F.value.scales.show&&rr.value?Math.max(0,...[...rr.value.querySelectorAll(`text`)].map(n)):0,a=Math.max(r,i);return{left:Math.max(e(Qn.value).width,t?t+12:0),right:a?a+6:0,bottom:tr.value?e(tr.value).height+6:0}}}),U=v(()=>{let{left:e,right:t,bottom:n}=Ir.value;return{top:B.value.layout.padding.top+Fr.value+I.value.fontSize*2,right:H.value.width-B.value.layout.padding.right-Fr.value-6-t,bottom:H.value.height-B.value.layout.padding.bottom-n,left:B.value.layout.padding.left+e,height:H.value.height-B.value.layout.padding.top-B.value.layout.padding.bottom-Fr.value-n-I.value.fontSize*2,width:H.value.width-B.value.layout.padding.left-B.value.layout.padding.right-Fr.value-e-t-6}}),Br=v(()=>{Dr.value&&hr.value.forEach((e,t)=>{de({datasetObject:e,requiredAttributes:[`values`]}).forEach(e=>{m({componentName:`VueUiScatter`,type:`datasetSerieAttribute`,property:e,index:t})}),e.values&&e.values.forEach((e,n)=>{de({datasetObject:e,requiredAttributes:[`x`,`y`]}).forEach(e=>{m({componentName:`VueUiScatter`,type:`datasetSerieAttribute`,property:`values.${e}`,index:`${t} - ${n}`})})})});let e=Math.min(...K.value.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values.map(e=>e.x))),t=Math.max(...K.value.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values.map(e=>e.x))),n=Math.min(...K.value.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values.map(e=>e.y))),r=Math.max(...K.value.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values.map(e=>e.y)));return{xMin:e<0?e:0,xMax:t,yMin:n<0?n:0,yMax:r}}),Vr=v(()=>{let e=B.value.layout.axis;return{xMin:e.xMin!==null&&e.xMin!==void 0?e.xMin:Br.value.xMin,xMax:e.xMax!==null&&e.xMax!==void 0?e.xMax:Br.value.xMax,yMin:e.yMin!==null&&e.yMin!==void 0?e.yMin:Br.value.yMin,yMax:e.yMax!==null&&e.yMax!==void 0?e.yMax:Br.value.yMax}});function Hr(e){return Number.isFinite(e)?e<2?2:Math.trunc(e):5}function Ur(e){return e.roundingValue!==void 0&&e.roundingValue!==null?e.roundingValue:e.rounding!==void 0&&e.rounding!==null?e.rounding:0}function Wr({minimum:e,maximum:t,stepCount:n,useNiceScale:r}){let i=Hr(n);if(e===t){let n=t+(e===0?1:Math.abs(e)*.01);return(r?ne:le)(e,n,i)}return(r?ne:le)(e,t,i)}let Gr=v(()=>{let e=F.value;return Wr({minimum:Vr.value.xMin,maximum:Vr.value.xMax,stepCount:e.scales.steps,useNiceScale:e.scales.useNiceScale})}),Kr=v(()=>{let e=I.value;return Wr({minimum:Vr.value.yMin,maximum:Vr.value.yMax,stepCount:e.scales.steps,useNiceScale:e.scales.useNiceScale})}),W=v(()=>({xMin:Gr.value.min,xMax:Gr.value.max,yMin:Kr.value.min,yMax:Kr.value.max})),qr=v(()=>{let e=F.value,t=e.scales.labels;return Gr.value.ticks.map(n=>({value:n,x:Zr(n),label:g(t.formatter,h(n),a({p:R.value.selectors.labels.prefix,v:h(n),s:R.value.selectors.labels.suffix,r:Ur(e)}))}))}),Jr=v(()=>{let e=I.value,t=e.scales.labels;return Kr.value.ticks.map(n=>({value:n,y:Qr(n),label:g(t.formatter,h(n),a({p:R.value.selectors.labels.prefix,v:h(n),s:R.value.selectors.labels.suffix,r:Ur(e)}))}))}),Yr=v(()=>fi.value.length>0&&F.value.scales.show),Xr=v(()=>fi.value.length>0&&I.value.scales.show);function Zr(e){let t=W.value.xMax-W.value.xMin;return t===0?U.value.left:U.value.left+(e-W.value.xMin)/t*U.value.width}function Qr(e){let t=W.value.yMax-W.value.yMin;return t===0?U.value.bottom:U.value.bottom-(e-W.value.yMin)/t*U.value.height}let G=v(()=>{let{xMin:e,xMax:t,yMin:n,yMax:r}=W.value,i=e>0?e:t<0?t:0,a=n>0?n:r<0?r:0;return{x:Zr(i),y:Qr(a)}}),K=v(()=>hr.value.map((e,t)=>{let n=`cluster_${j.value}_${t}`;return{...e,values:ie({data:e.values,threshold:N.value.usePerformanceMode?e.values.length+1:N.value.downsample.threshold}),id:n,color:e.color?e.color:Pr.value[t]||u[t]||u[t%u.length],opacity:M.value.includes(n)?.5:1,shape:e.shape??`circle`,segregate:()=>yi(n),isSegregated:M.value.includes(n),hasGroupSelection:!!si.value,isGroupSelected:si.value===n,onEnter:()=>li(n),onLeave:()=>ui()}})),$r=v(()=>({cy:`scatter-div-legend`,backgroundColor:B.value.legend.backgroundColor,color:B.value.legend.color,fontSize:B.value.legend.fontSize,paddingBottom:12,fontWeight:B.value.legend.bold?`bold`:``})),ei=v(()=>K.value.map((e,t)=>({...e,plots:e.values.map((n,r)=>({x:Zr(n.x),y:Qr(n.y),v:{...n,name:n.name||``},clusterName:e.name,clusterId:e.id,color:e.color?e.color:Pr.value[t]||u[t]||u[t%u.length],id:`plot_${j.value}_${t}_${r}`,weight:n.weight??R.value.radius}))})).filter(e=>!M.value.includes(e.id))),q=v(()=>{let e=1e-9,t=({m:t,b:n,rect:r,verticalX:i=null})=>{let{left:a,right:o,top:s,bottom:c}=r,l=[],u=(e,t)=>{Number.isFinite(e)&&Number.isFinite(t)&&l.push({x:e,y:t})},d=({x:t,y:n})=>t>=a-e&&t<=o+e&&n>=s-e&&n<=c+e;i===null?Number.isFinite(t)&&(u(a,t*a+n),u(o,t*o+n),Math.abs(t)>e?(u((s-n)/t,s),u((c-n)/t,c)):n>=s-e&&n<=c+e&&(u(a,n),u(o,n))):i>=a-e&&i<=o+e&&(u(i,s),u(i,c));let f=l.filter(d),p=[];for(let e of f)p.some(t=>Math.abs(t.x-e.x)<1e-6&&Math.abs(t.y-e.y)<1e-6)||p.push(e);if(p.length<2)return null;let ee=p[0],te=p[1],ne=0;for(let e=0;e<p.length;e+=1)for(let t=e+1;t<p.length;t+=1){let n=p[e].x-p[t].x,r=p[e].y-p[t].y,i=n*n+r*r;i>ne&&(ne=i,ee=p[e],te=p[t])}return{x1:ee.x,y1:ee.y,x2:te.x,y2:te.y}};return ei.value.map(n=>{let r=n.plots.length,i=n.plots.reduce((e,t)=>e+t.x,0)/r,a=n.plots.reduce((e,t)=>e+t.y,0)/r,o=0,s=0,c=0;for(let e of n.plots){let t=e.x-i,n=e.y-a;o+=t*n,s+=t*t,c+=n*n}let l,u,d=null;s<e?(d=i,l=1/0,u=null):(l=o/s,u=a-l*i);let f,p;d===null?(f=l,p=u):(f=1/0,p=null);let te=n.plots.every(e=>e.v&&typeof e.v.x==`number`&&typeof e.v.y==`number`),ne=NaN;if(r>=2){let t=0,o=0;te?(t=n.plots.reduce((e,t)=>e+t.v.x,0)/r,o=n.plots.reduce((e,t)=>e+t.v.y,0)/r):(t=i,o=-a);let s=0,c=0,l=0;for(let e of n.plots){let n=te?e.v.x:e.x,r=te?e.v.y:-e.y,i=n-t,a=r-o;s+=i*a,c+=i*i,l+=a*a}if(c>=e&&l>=e){let e=s/Math.sqrt(c*l);ne=Math.max(-1,Math.min(1,e))}}let m=t({m:f,b:p,rect:U.value,verticalX:d});if(!m)return{...n,correlation:null,label:null,plots:n.plots.map(e=>({...e,deviation:0,shape:n.shape,color:ee(n.color)}))};let h={x:(m.x1+m.x2)/2,y:(m.y1+m.y2)/2};return{...n,color:ee(n.color),correlation:{...m,coefficient:ne},label:h,plots:n.plots.map(t=>{let r,i;d===null?Math.abs(f)<e?(r=t.x,i=p):(r=(t.x+f*t.y-f*p)/(1+f*f),i=(f*t.x+f*f*t.y+p)/(1+f*f)):(r=d,i=t.y);let a=t.x-r,o=t.y-i,s=Math.sqrt(a*a+o*o);return{...t,deviation:s,shape:n.shape,color:ee(n.color)}})}})}),ti=v(()=>Math.max(...q.value.flatMap(e=>e.plots.map(e=>Math.abs(e.deviation)))));function ni(){return q.value}function ri(e,t){let n=Array.isArray(e)?e.flatMap(e=>e.plots.map(e=>({x:e.x,y:e.y}))):e.plots.map(e=>({x:e.x,y:e.y})),r=1/0,i=-1/0,a=1/0,o=-1/0;n.forEach(({x:e,y:t})=>{r=Math.min(r,e),i=Math.max(i,e),a=Math.min(a,t),o=Math.max(o,t)});let s=i-r,c=o-a,l=s/t,u=c/t,d=Array(t).fill(0),f=Array(t).fill(0),p=(e,n,r)=>r>0?Math.max(0,Math.min(t-1,Math.floor((e-n)/r+1e-10))):0;n.forEach(({x:e,y:t})=>{let n=p(e,r,l),i=p(t,a,u);d[n]||(d[n]=0),f[i]||(f[i]=0),d[n]+=1,f[i]+=1});let ee=[],te=[];for(let e=0;e<t;e+=1)ee.push(r+(e+.5)*l),te.push(a+(e+.5)*u);return{x:d,y:f,avgX:ee,avgY:te,maxX:Math.max(...d),maxY:Math.max(...f)}}let J=v(()=>L.value.tranches),Y=v(()=>ri(ei.value,J.value)),ii=v(()=>{let e=U.value.top-L.value.offset,t=U.value.right+L.value.offset;return ei.value.map(n=>{let r=ri(n,J.value);return{coords:r,dX:f(r.avgX.map((t,n)=>({x:t,y:e-r.x[n]/r.maxX*L.value.size}))),dY:l(r.avgY.map((e,n)=>({y:e,x:t+L.value.size*r.y[n]/r.maxY}))),color:n.color,id:n.id}})}),X=w(void 0),Z=w(null),Q=w([]),ai=w(!1),oi=w(null),si=w(void 0);function ci(){In.value=!1,X.value=void 0,Q.value=[],Z.value=null,cr.value=null,ir.value=null,si.value=void 0}function li(e){let t=q.value.find(t=>t.id===e);t?(Q.value=t.plots.map(e=>e.id),si.value=e):Q.value=[]}function ui(){Q.value=[],si.value=void 0}function di(e){if(!br.value||!e)return;let t=ce(e.x,e.y,br.value);t&&(ar.value=t)}let fi=v(()=>Z.value?[Z.value]:Q.value.length?q.value.flatMap(e=>e.plots).filter(e=>Q.value.includes(e.id)):[]);function pi(e){let t=F.value,n=t.scales.labels;return g(n.formatter,h(e.v.x),a({p:R.value.selectors.labels.prefix,v:h(e.v.x),s:R.value.selectors.labels.suffix,r:Ur(t)}),{datapoint:e})}function mi(e){let t=I.value,n=t.scales.labels;return g(n.formatter,h(e.v.y),a({p:R.value.selectors.labels.prefix,v:h(e.v.y),s:R.value.selectors.labels.suffix,r:Ur(t)}),{datapoint:e})}function hi(e,t,n=`pointer`,r=null){X.value=e.id,Z.value=e,or.value=n,cr.value=r,ir.value=e.id;let i=``;N.value.events.datapointEnter&&N.value.events.datapointEnter({datapoint:e,seriesIndex:t}),oi.value={datapoint:e,seriesIndex:t,series:q.value,config:N.value};let o=z.value.customFormat;c(o)&&oe(()=>o({datapoint:e,seriesIndex:t,series:q.value,config:N.value}))?Ln.value=o({datapoint:e,seriesIndex:t,series:q.value,config:N.value}):(e.clusterName&&(i+=`<div style="display:flex;gap:3px;align-items:center">${e.clusterName}</div>`),e.v.name&&(i+=`<div>${e.v.name}</div>`),i+=`<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${z.value.borderColor}">`,i+=`<div>${F.value.name}: <b>${isNaN(e.v.x)?`-`:g(R.value.selectors.labels.x.formatter,e.v.x,a({p:z.value.prefix,v:e.v.x,s:z.value.suffix,r:z.value.roundingValue}),{datapoint:e,seriesIndex:t})}</b></div>`,i+=`<div>${I.value.name}: <b>${isNaN(e.v.y)?`-`:g(R.value.selectors.labels.y.formatter,e.v.y,a({p:z.value.prefix,v:e.v.y,s:z.value.suffix,r:z.value.roundingValue}),{datapoint:e,seriesIndex:t})}</b></div>`,i+=`${R.value.deviation.translation}: <b>${a({v:e.deviation,r:R.value.deviation.roundingValue})}</b>`,i+=`</div>`,Ln.value=`<div>${i}</div>`),In.value=!0,n===`keyboard`&&Ge(()=>{di(e)})}function gi(e,t){N.value.events.datapointLeave&&N.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(or.value!==`keyboard`||ir.value!==e?.id)&&(In.value=!1,X.value=void 0,Z.value=null)}function _i(e,t){N.value.events.datapointClick&&N.value.events.datapointClick({datapoint:e,seriesIndex:t})}function vi(){M.value.length?M.value=[]:K.value.forEach(e=>{M.value.push(e.id)}),Pn(`selectLegend`,ei.value)}function yi(e){M.value.includes(e)?M.value=M.value.filter(t=>t!==e):M.value.length<hr.value.length-1&&M.value.push(e),Pn(`selectLegend`,ei.value)}function bi(e){return K.value.length?K.value.find(t=>t.name===e)||(Dr.value&&console.warn(`VueUiScatter - Series name not found "${e}"`),null):(Dr.value&&console.warn(`VueUiScatter - There are no series to show.`),null)}function xi(e){let t=bi(e);t!==null&&M.value.includes(t.id)&&yi(t.id)}function Si(e){let t=bi(e);t!==null&&(M.value.includes(t.id)||yi(t.id))}function Ci(e=null){Ge(()=>{let t=[``,N.value.table.translations.correlationCoefficient,N.value.table.translations.nbrPlots,`${F.value.name} ${N.value.table.translations.average}`,`${I.value.name} ${N.value.table.translations.average}`],n=q.value.map(e=>[e.name,e.correlation.coefficient,e.plots.length,e.plots.map(e=>e.v.x).reduce((e,t)=>e+t,0)/e.plots.length,e.plots.map(e=>e.v.y).reduce((e,t)=>e+t,0)/e.plots.length]),r=[[B.value.title.text],[B.value.title.subtitle.text],[[``],[``],[``]],t].concat(n),i=s(r);e?e(i):ae({csvContent:i,title:B.value.title.text||`vue-ui-heatmap`})})}let wi=v(()=>{let e=[N.value.table.translations.series,N.value.table.translations.correlationCoefficient,N.value.table.translations.nbrPlots,`${F.value.name} ${N.value.table.translations.average}`,`${I.value.name} ${N.value.table.translations.average}`],t=q.value.map(e=>[{shape:e.shape,content:e.name??`-`,color:e.color},Number((e.correlation?.coefficient??0).toFixed(N.value.table.td.roundingValue)).toLocaleString(),e.plots.length.toLocaleString(),Number((e.plots.map(e=>e.v.x??0).reduce((e,t)=>e+t,0)/e.plots.length).toFixed(N.value.table.td.roundingAverage)).toLocaleString(),Number((e.plots.map(e=>e.v.y??0).reduce((e,t)=>e+t,0)/e.plots.length).toFixed(N.value.table.td.roundingAverage)).toLocaleString()]);return{head:e,body:t,a11yBody:t.map(e=>e.map((e,t)=>t===0?e.content:e)),config:{th:{backgroundColor:N.value.table.th.backgroundColor,color:N.value.table.th.color,outline:N.value.table.th.outline},td:{backgroundColor:N.value.table.td.backgroundColor,color:N.value.table.td.color,outline:N.value.table.td.outline},breakpoint:N.value.table.responsiveBreakpoint},colNames:e}}),Ti=w(!1);function Ei(e){Ti.value=e,Rn.value+=1}function Di(){V.value.showTable=!V.value.showTable}function Oi(){V.value.showTooltip=!V.value.showTooltip}let ki=w(!1);function Ai(){ki.value=!ki.value}async function ji({scale:e=2}={}){if(!zn.value)return;let{width:t,height:n}=zn.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await ye({domElement:zn.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:B.value.title.text,width:t,height:n,aspectRatio:r}}function Mi(e){Jn.value=e,L.value.highlighter.highlightBothAxes&&(Yn.value=Y.value.y.length-2-e)}function Ni(e){Yn.value=e,L.value.highlighter.highlightBothAxes&&(Jn.value=e)}function Pi(){Jn.value=null,Yn.value=null}let Fi={circle:1,square:1,diamond:1,triangle:1.2,star:1.3,pentagon:1.3,hexagon:1.3},$=e=>e.toFixed(3);function Ii({shape:e=`circle`,cx:t,cy:n,r}){if(!N.value.usePerformanceMode)return``;let i=Fi[e]*r;switch(e){case`circle`:{let e=$(t-i),r=$(n),a=$(t+i),o=$(i);return`M ${e} ${r} A ${o} ${o} 0 1 0 ${a} ${r} A ${o} ${o} 0 1 0 ${e} ${r} Z`}case`square`:{let e=$(t-i),r=$(n-i),a=$(t+i),o=$(n+i);return`M ${e} ${r} L ${a} ${r} L ${a} ${o} L ${e} ${o} Z`}case`diamond`:{let e=$(t),r=$(n);return`M ${e} ${$(n-i)} L ${$(t+i)} ${r} L ${e} ${$(n+i)} L ${$(t-i)} ${r} Z`}case`triangle`:{let e=i*Math.sqrt(3),r=t,a=n-2/3*e,o=t-i,s=n+1/3*e,c=t+i,l=s;return`M ${$(r)} ${$(a)} L ${$(o)} ${$(s)} L ${$(c)} ${$(l)} Z`}case`star`:{let e=i,r=i*.5,a=[];for(let i=0;i<10;i+=1){let o=(-90+i*36)*Math.PI/180,s=i%2==0?e:r;a.push([t+s*Math.cos(o),n+s*Math.sin(o)])}let o=`M ${$(a[0][0])} ${$(a[0][1])}`;for(let e=1;e<a.length;e+=1)o+=` L ${$(a[e][0])} ${$(a[e][1])}`;return o+` Z`}case`pentagon`:{let e=[];for(let r=0;r<5;r+=1){let a=(-90+r*72)*Math.PI/180;e.push([t+i*Math.cos(a),n+i*Math.sin(a)])}let r=`M ${$(e[0][0])} ${$(e[0][1])}`;for(let t=1;t<5;t+=1)r+=` L ${$(e[t][0])} ${$(e[t][1])}`;return r+` Z`}case`hexagon`:{let e=[];for(let r=0;r<6;r+=1){let a=(-60+r*60)*Math.PI/180;e.push([t+i*Math.cos(a),n+i*Math.sin(a)])}let r=`M ${$(e[0][0])} ${$(e[0][1])}`;for(let t=1;t<6;t+=1)r+=` L ${$(e[t][0])} ${$(e[t][1])}`;return r+` Z`}default:{let e=$(t-i),r=$(n),a=$(t+i),o=$(i);return`M ${e} ${r} A ${o} ${o} 0 1 0 ${a} ${r} A ${o} ${o} 0 1 0 ${e} ${r} Z`}}}let Li=v(()=>{if(!N.value.usePerformanceMode)return[``];let{left:e,right:t,top:n,bottom:r}=U.value,i=Math.max(1,(t-e)*(r-n)),a=e=>e/i*1e4,o=R.value.stroke,s=R.value.strokeWidth,c=R.value.opacity;return q.value.map(i=>{let l=[];for(let a of i.plots){let o=a.x,s=a.y;if(o<e||o>t||s<n||s>r)continue;let c=Math.max(R.value.radius,a.weight);l.push(Ii({shape:i.shape||`circle`,cx:o,cy:s,r:c}))}if(!l.length)return null;let u=a(i.plots.length)>2.5||i.plots.length>1e3;return{id:i.id,d:l.join(``),fill:d(i.color,c*100),stroke:u?`none`:o,strokeWidth:u?0:s,strokeOpacity:1}}).filter(Boolean)});function Ri(){return N.value.usePerformanceMode?e=>{let t=br.value;if(!t)return;let n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;let r=t.getScreenCTM();if(!r)return;let i=r.inverse(),a=n.matrixTransform(i),o=null,s=1/0,c=-1;if(q.value.forEach((e,t)=>{e.plots.forEach(e=>{let n=e.x-a.x,r=e.y-a.y,i=n*n+r*r;i<=64&&i<s&&(s=i,o=e,c=t)})}),ai.value=!!o,o)X.value!==o.id&&(X.value=o.id,hi(o,c,`pointer`,ia.value.get(o.id)??null));else if(X.value){let e=Z.value;X.value=void 0,gi(e,c)}}:()=>null}let zi=Ri();function Bi(){if(ai.value=!1,X.value){let e=Z.value;X.value=void 0,gi(e,null)}}function Vi(e){let t=Z.value;if(t){let e=q.value.findIndex(e=>e.id===t.clusterId);_i(t,e>=0?e:0)}}let Hi=v(()=>Ce({config:N,style:B,mutableConfig:V,dialog:Mn,accordion:Dn,isFullscreen:Ti,parent:zn,maxWidth:800,isCursorPointer:ur}));et(()=>V.value.showTable,e=>Se(e,N,Xn));function Ui(){V.value.showTable=!1,Zn.value&&Zn.value.setTableIconState(!1)}let Wi=v(()=>B.value.backgroundColor),Gi=v(()=>B.value.legend),Ki=v(()=>B.value.title),{isCallbackImaging:qi,isCallbackSvg:Ji,generateSvg:Yi,onGenerateImage:Xi}=xe({svg:br,title:Ki,legend:Gi,legendItems:K,backgroundColor:Wi,getSvgCallback:()=>N.value.userOptions.callbacks.svg,generateImage:Mr});async function Zi(){Pn(`copyAlt`,{config:N.value,dataset:ei.value}),N.value.userOptions.callbacks.altCopy?await Promise.resolve(N.value.userOptions.callbacks.altCopy({config:N.value,dataset:ei.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Qi(e,t){let n=ra.value.filter(t=>t.id!==e.id);if(!n.length)return null;let r=(n=>{if(!n.length)return null;let r=null,i=1/0;return n.forEach(n=>{let a=n.x-e.x,o=n.y-e.y,s=0,c=0;t===`right`||t===`left`?(s=Math.abs(a),c=Math.abs(o)):(s=Math.abs(o),c=Math.abs(a));let l=s*1e3+c;l<i&&(r=n,i=l)}),r})(n.filter(n=>t===`right`?n.x>e.x:t===`left`?n.x<e.x:t===`down`?n.y>e.y:t===`up`&&n.y<e.y));if(r)return r;let i=[];if(t===`right`){let e=Math.min(...n.map(e=>e.x));i=n.filter(t=>t.x===e)}if(t===`left`){let e=Math.max(...n.map(e=>e.x));i=n.filter(t=>t.x===e)}if(t===`down`){let e=Math.min(...n.map(e=>e.y));i=n.filter(t=>t.y===e)}if(t===`up`){let e=Math.max(...n.map(e=>e.y));i=n.filter(t=>t.y===e)}return i.length?i.reduce((n,r)=>{if(!n)return r;let i=Math.abs(t===`right`||t===`left`?n.y-e.y:n.x-e.x);return Math.abs(t===`right`||t===`left`?r.y-e.y:r.x-e.x)<i?r:n},null):null}function $i(){cr.value=null,ir.value=null,sr.value=!0}function ea(){ci(),or.value=`pointer`,sr.value=!1}function ta(e){if(!br.value||ki.value||document.activeElement!==br.value||!ra.value.length)return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`ArrowUp`,i=e.key===`ArrowDown`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){ci(),or.value=`pointer`;return}if(a){if(cr.value===null)return;let e=ra.value[cr.value];if(!e)return;_i(e,e.seriesIndex);return}let s=null;if(n&&(s=`right`),t&&(s=`left`),i&&(s=`down`),r&&(s=`up`),ir.value===null){let e=Z.value;if(e&&e.id){let t=Qi(e,s);if(!t){let t=ia.value.get(e.id);if(t===void 0)return;hi(e,e.seriesIndex,`keyboard`,t);return}let n=ia.value.get(t.id);if(n===void 0)return;hi(t,t.seriesIndex,`keyboard`,n);return}let t=ra.value[0];if(!t)return;let n=ia.value.get(t.id)??0;hi(t,t.seriesIndex,`keyboard`,n);return}let c=ia.value.get(ir.value);if(c===void 0)return;let l=ra.value[c];if(!l)return;let u=Qi(l,s);if(!u)return;let d=ia.value.get(u.id);d!==void 0&&hi(u,u.seriesIndex,`keyboard`,d)}let na=v(()=>{if(!Z.value)return``;let e=Z.value,t=isNaN(e.v.x)?`-`:g(R.value.selectors.labels.x.formatter,e.v.x,a({p:z.value.prefix,v:e.v.x,s:z.value.suffix,r:z.value.roundingValue}),{datapoint:e,seriesIndex:e.seriesIndex}),n=isNaN(e.v.y)?`-`:g(R.value.selectors.labels.y.formatter,e.v.y,a({p:z.value.prefix,v:e.v.y,s:z.value.suffix,r:z.value.roundingValue}),{datapoint:e,seriesIndex:e.seriesIndex});return[e.clusterName||``,e.v.name||``,`${F.value.name}: ${t}`,`${I.value.name}: ${n}`].filter(Boolean).join(`. `)}),ra=v(()=>q.value.flatMap((e,t)=>e.plots.map(n=>({...n,seriesIndex:t,seriesId:e.id,seriesName:e.name,shape:e.shape||`circle`,color:e.color})))),ia=v(()=>{let e=/* @__PURE__ */ new Map;return ra.value.forEach((t,n)=>{e.set(t.id,n)}),e}),aa=v(()=>({headers:wi.value?.colNames??[],rows:wi.value?.a11yBody??[]}));return _e({getData:ni,getImage:ji,generatePdf:jr,generateCsv:Ci,generateImage:Mr,generateSvg:Yi,hideSeries:Si,showSeries:xi,toggleTable:Di,toggleTooltip:Oi,toggleAnnotator:Ai,toggleFullscreen:Ei,copyAlt:Zi}),et(()=>[H.value,F.value,I.value,B.value.layout.padding,Fr.value,W.value,R.value.selectors.labels,N.value.style.fontFamily,A.dataset,M.value,Tr.value,Qn.value,$n.value,tr.value,rr.value,nr.value],zr,{flush:`post`,deep:!0}),(e,i)=>(C(),x(`div`,{class:Ke(`vue-data-ui-component vue-ui-scatter ${Ti.value?`vue-data-ui-wrapper-fullscreen`:``} ${N.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`scatterChart`,ref:zn,id:`vue-ui-scatter_${j.value}`,style:Je(`font-family:${B.value.fontFamily};width:100%; text-align:center;background:${B.value.backgroundColor};${N.value.responsive?`height: 100%`:``}`),onMouseenter:i[5]||=()=>O(vr)(!0),onMouseleave:i[6]||=()=>{O(vr)(!1),sr.value||ci()}},[S(`div`,{id:`chart-instructions-${j.value}`,class:`sr-only`},[S(`p`,null,D(N.value.a11y.translations.keyboardNavigation),1)],8,rt),V.value.showTooltip?b(``,!0):(C(),x(`div`,it,D(na.value),1)),aa.value?.rows?.length&&Fn.value?(C(),y(Ne,{key:1,uid:j.value,head:aa.value.headers,body:aa.value.rows,notice:N.value.a11y.translations.tableAvailable,caption:N.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):b(``,!0),P.value.buttons.annotator?(C(),y(O(kn),We({key:2},O(n)(P.value.annotator),{svgRef:O(br),backgroundColor:B.value.backgroundColor,color:B.value.color,active:ki.value,isCursorPointer:ur.value,palette:P.value.annotatorPalette,onClose:Ai}),ze({_:2},[T(O(r),n=>({name:n,fn:k(r=>[E(e.$slots,n,qe(Ue(O(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):b(``,!0),Nr.value?(C(),x(`div`,{key:3,ref_key:`noTitle`,ref:Un,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):b(``,!0),B.value.title.text?(C(),x(`div`,{key:4,ref_key:`chartTitle`,ref:Bn,style:`width:100%;background:transparent`},[(C(),y(be,{key:`title_${Wn.value}`,config:{title:{cy:`scatter-div-title`,...B.value.title},subtitle:{cy:`scatter-div-subtitle`,...B.value.title.subtitle}}},null,8,[`config`]))],512)):b(``,!0),S(`div`,{id:`legend-top-${j.value}`},null,8,at),P.value.show&&Fn.value&&(O(yr)||O(_r))?(C(),y(O(An),{ref_key:`userOptionsRef`,ref:Zn,key:`user_options_${Rn.value}`,backgroundColor:B.value.backgroundColor,color:B.value.color,isImaging:O(Ar),isPrinting:O(kr),uid:j.value,hasTooltip:P.value.buttons.tooltip&&z.value.show,hasPdf:P.value.buttons.pdf,hasImg:P.value.buttons.img,hasSvg:P.value.buttons.svg,hasXls:P.value.buttons.csv,hasTable:P.value.buttons.table,hasFullscreen:P.value.buttons.fullscreen,hasAltCopy:P.value.buttons.altCopy,isTooltip:V.value.showTooltip,isFullscreen:Ti.value,titles:{...P.value.buttonTitles},chartElement:zn.value,position:P.value.position,hasAnnotator:P.value.buttons.annotator,isAnnotation:ki.value,callbacks:P.value.callbacks,printScale:P.value.print.scale,tableDialog:N.value.table.useDialog,isCursorPointer:ur.value,onToggleFullscreen:Ei,onGeneratePdf:O(jr),onGenerateCsv:Ci,onGenerateImage:O(Xi),onGenerateSvg:O(Yi),onToggleTable:Di,onToggleTooltip:Oi,onToggleAnnotator:Ai,onCopyAlt:Zi,style:Je({visibility:O(yr)?O(_r)?`visible`:`hidden`:`visible`})},ze({_:2},[T(O(we)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:k(n=>[E(e.$slots,t,qe(Ue(O(Te)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isTooltip.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):b(``,!0),S(`div`,ot,[(C(),x(`svg`,{ref_key:`svgRef`,ref:br,xmlns:O(se),"aria-describedby":`chart-instructions-${j.value}`,class:Ke({"vue-data-ui-fullscreen--on":Ti.value,"vue-data-ui-fulscreen--off":!Ti.value,"vue-data-ui-no-transition":!O(lr)||O(Rr)}),viewBox:`0 0 ${H.value.width<=0?10:H.value.width} ${H.value.height<=0?10:H.value.height}`,style:Je(`max-width:100%;overflow:visible;background:transparent;color:${B.value.color};visibility:${O(Lr)?`visible`:`hidden`}`),onMouseleave:Pi,tabindex:`0`,onFocus:$i,onBlur:ea,onKeydown:ta},[Ve(O(jn)),E(e.$slots,`svg-underlayer`,{svg:{...H.value,drawingArea:{...U.value,zero:G.value},data:ei.value,isPrintingImg:O(kr)||O(Ar)||O(qi),isPrintingSvg:O(Ji)}},void 0,!0),e.$slots[`chart-background`]?(C(),x(`foreignObject`,{key:0,x:0,y:0,width:H.value.width<=0?10:H.value.width,height:H.value.height<=0?10:H.value.height,style:{pointerEvents:`none`}},[E(e.$slots,`chart-background`,{},void 0,!0)],8,ct)):b(``,!0),B.value.layout.axis.show?(C(),x(`g`,lt,[S(`line`,{x1:G.value.x,x2:G.value.x,y1:U.value.top,y2:U.value.bottom,stroke:B.value.layout.axis.stroke,"stroke-width":B.value.layout.axis.strokeWidth,"stroke-linecap":`round`},null,8,ut),S(`line`,{x1:U.value.left,x2:U.value.right,y1:G.value.y,y2:G.value.y,stroke:B.value.layout.axis.stroke,"stroke-width":B.value.layout.axis.strokeWidth,"stroke-linecap":`round`},null,8,dt)])):b(``,!0),F.value.scales.verticalLines.show?(C(),x(`g`,ft,[(C(!0),x(_,null,T(qr.value,(e,t)=>(C(),x(`line`,{key:`scatter-x-scale-line-${j.value}-${t}`,x1:e.x,x2:e.x,y1:U.value.top,y2:U.value.bottom,stroke:F.value.scales.verticalLines.stroke,"stroke-width":F.value.scales.verticalLines.strokeWidth,"stroke-linecap":`round`},null,8,pt))),128))])):b(``,!0),F.value.scales.show?(C(),x(`g`,{key:3,ref_key:`xAxisScaleLabels`,ref:rr},[(C(!0),x(_,null,T(qr.value,(e,t)=>(C(),x(`g`,{class:`vue-ui-scatter-scale-group`,key:`scatter-x-scale-${j.value}-${t}`,opacity:+!Yr.value},[S(`path`,{class:Ke({"vue-data-ui-transition":O(lr)&&!O(Rr)}),stroke:B.value.layout.axis.stroke,"stroke-width":B.value.layout.axis.strokeWidth,d:`M${e.x},${G.value.y-4} ${e.x},${G.value.y+4}`,"stroke-linecap":`round`},null,10,ht),S(`text`,{class:Ke({"vue-data-ui-transition":O(lr)&&!O(Rr)}),transform:`translate(${e.x}, ${G.value.y+F.value.scales.labels.fontSize+6+F.value.scales.labels.offsetY})`,"text-anchor":`middle`,"font-size":F.value.scales.labels.fontSize,fill:F.value.scales.labels.color,stroke:B.value.backgroundColor,"stroke-width":`2`,"paint-order":`stroke`},D(e.label),11,gt)],8,mt))),128))],512)):b(``,!0),I.value.scales.horizontalLines.show?(C(),x(`g`,_t,[(C(!0),x(_,null,T(Jr.value,(e,t)=>(C(),x(`line`,{key:`scatter-y-scale-line-${j.value}-${t}`,x1:U.value.left,x2:U.value.right,y1:e.y,y2:e.y,stroke:I.value.scales.horizontalLines.stroke,"stroke-width":I.value.scales.horizontalLines.strokeWidth,"stroke-linecap":`round`},null,8,vt))),128))])):b(``,!0),I.value.scales.show?(C(),x(`g`,{key:5,ref_key:`yAxisScaleLabels`,ref:nr,opacity:+!Xr.value,style:{transition:`opacity 0.1s ease-in-out`},class:`vue-ui-scatter-scale-group`},[(C(!0),x(_,null,T(Jr.value,(e,t)=>(C(),x(`g`,{key:`scatter-y-scale-${j.value}-${t}`},[S(`path`,{class:Ke({"vue-data-ui-transition":O(lr)&&!O(Rr)}),d:`M${G.value.x-4},${e.y} ${G.value.x+4},${e.y}`,stroke:B.value.layout.axis.stroke,"stroke-width":B.value.layout.axis.strokeWidth,"stroke-linecap":`round`},null,10,bt),S(`text`,{class:Ke({"vue-data-ui-transition":O(lr)&&!O(Rr)}),transform:`translate(${G.value.x-I.value.scales.labels.fontSize/2-8+I.value.scales.labels.offsetX}, ${e.y+I.value.scales.labels.fontSize/3})`,"text-anchor":`end`,"font-size":I.value.scales.labels.fontSize,fill:I.value.scales.labels.color,stroke:B.value.backgroundColor,"stroke-width":`2`,"paint-order":`stroke`},D(e.label),11,xt)]))),128))],8,yt)):b(``,!0),L.value.show?(C(),x(`g`,St,[S(`defs`,null,[Ve(je,{t:`linear`,id:`marginal_x_${j.value}`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,stops:[[`0%`,L.value.fill,1],[`100%`,B.value.backgroundColor,1]]},null,8,[`id`,`stops`]),Ve(je,{t:`linear`,id:`marginal_y_${j.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,B.value.backgroundColor,1],[`100%`,L.value.fill,1]]},null,8,[`id`,`stops`])]),(C(!0),x(_,null,T(Y.value.x,(e,t)=>(C(),x(`g`,null,[e&&Y.value.avgX[t]?(C(),x(`rect`,{key:0,x:Y.value.avgX[t]-U.value.width/J.value/2,y:U.value.top-L.value.offset-e/Y.value.maxX*L.value.size,width:U.value.width/J.value<=0?1e-4:U.value.width/J.value,height:e/Y.value.maxX*L.value.size<=0?1e-4:e/Y.value.maxX*L.value.size,fill:L.value.useGradient?`url(#marginal_x_${j.value})`:L.value.fill,style:Je([`opacity:${L.value.opacity}`,{"pointer-events":`none`}]),stroke:B.value.backgroundColor,"stroke-width":L.value.strokeWidth,rx:L.value.borderRadius},null,12,Ct)):b(``,!0),Y.value.avgX[t]?(C(),x(`rect`,{key:1,x:Y.value.avgX[t]-U.value.width/J.value/2,y:U.value.top-L.value.offset-L.value.size,width:U.value.width/J.value<=0?1e-4:U.value.width/J.value,height:Math.max(.1,L.value.size),fill:`transparent`,onMouseenter:e=>Mi(t),onMouseleave:i[0]||=e=>Pi()},null,40,wt)):b(``,!0),Y.value.avgX[t]&&Jn.value!=null&&Jn.value===t?(C(),x(`g`,Tt,[S(`rect`,{x:Y.value.avgX[t]-U.value.width/J.value/2,y:U.value.top,width:U.value.width/J.value<=0?1e-4:U.value.width/J.value,height:U.value.height,fill:L.value.highlighter.color,"fill-opacity":L.value.highlighter.opacity},null,8,Et),S(`line`,{x1:Y.value.avgX[t]-U.value.width/J.value/2,x2:Y.value.avgX[t]-U.value.width/J.value/2,y1:0,y2:U.value.top+U.value.height,stroke:L.value.highlighter.stroke,"stroke-dasharray":L.value.highlighter.strokeDasharray,"stroke-width":L.value.highlighter.strokeWidth,style:{transition:`none !important`,animation:`none !important`}},null,8,Dt),S(`line`,{x1:Y.value.avgX[t]-U.value.width/J.value/2+(U.value.width/J.value<=0?1e-4:U.value.width/J.value),x2:Y.value.avgX[t]-U.value.width/J.value/2+(U.value.width/J.value<=0?1e-4:U.value.width/J.value),y1:0,y2:U.value.top+U.value.height,stroke:L.value.highlighter.stroke,"stroke-dasharray":L.value.highlighter.strokeDasharray,"stroke-width":L.value.highlighter.strokeWidth,style:{transition:`none !important`,animation:`none !important`}},null,8,Ot)])):b(``,!0)]))),256)),(C(!0),x(_,null,T(Y.value.y,(e,t)=>(C(),x(`g`,null,[e&&Y.value.avgY[t]?(C(),x(`rect`,{key:0,x:U.value.right+L.value.offset,y:Y.value.avgY[t]-U.value.height/J.value/2,height:U.value.height/J.value<=0?1e-4:U.value.height/J.value,width:e/Y.value.maxY*L.value.size<=0?1e-4:e/Y.value.maxY*L.value.size,fill:L.value.useGradient?`url(#marginal_y_${j.value})`:L.value.fill,style:Je([`opacity:${L.value.opacity}`,{"pointer-events":`none`}]),stroke:B.value.backgroundColor,"stroke-width":L.value.strokeWidth,rx:L.value.borderRadius},null,12,kt)):b(``,!0),Y.value.avgY[t]?(C(),x(`rect`,{key:1,x:U.value.right+L.value.offset,y:Y.value.avgY[t]-U.value.height/J.value/2,width:Math.max(.1,L.value.size),height:U.value.height/J.value<=0?1e-4:U.value.height/J.value,fill:`transparent`,onMouseenter:e=>Ni(t),onMouseleave:i[1]||=e=>Pi()},null,40,At)):b(``,!0),Y.value.avgY[t]&&Yn.value!=null&&Yn.value===t?(C(),x(`g`,jt,[S(`rect`,{x:U.value.left,y:Y.value.avgY[t]-U.value.height/J.value/2,width:U.value.width,height:U.value.height/J.value<=0?1e-4:U.value.height/J.value,fill:L.value.highlighter.color,"fill-opacity":L.value.highlighter.opacity},null,8,Mt),S(`line`,{x1:U.value.left,x2:H.value.width,y1:Y.value.avgY[t]-U.value.height/J.value/2,y2:Y.value.avgY[t]-U.value.height/J.value/2,stroke:L.value.highlighter.stroke,"stroke-dasharray":L.value.highlighter.strokeDasharray,"stroke-width":L.value.highlighter.strokeWidth,style:{transition:`none !important`,animation:`none !important`}},null,8,Nt),S(`line`,{x1:U.value.left,x2:H.value.width,y1:Y.value.avgY[t]-U.value.height/J.value/2+(U.value.height/J.value<=0?1e-4:U.value.height/J.value),y2:Y.value.avgY[t]-U.value.height/J.value/2+(U.value.height/J.value<=0?1e-4:U.value.height/J.value),stroke:L.value.highlighter.stroke,"stroke-dasharray":L.value.highlighter.strokeDasharray,"stroke-width":L.value.highlighter.strokeWidth,style:{transition:`none !important`,animation:`none !important`}},null,8,Pt)])):b(``,!0)]))),256)),L.value.showLines?(C(),x(`g`,Ft,[(C(!0),x(_,null,T(ii.value,e=>(C(),x(_,null,[M.value.includes(e.id)?b(``,!0):(C(),x(`path`,{key:0,d:`M ${e.dX}`,stroke:B.value.backgroundColor,"stroke-width":L.value.linesStrokeWidth+1,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,It)),M.value.includes(e.id)?b(``,!0):(C(),x(`path`,{key:1,d:`M ${e.dX}`,stroke:e.color,"stroke-width":L.value.linesStrokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,Lt)),M.value.includes(e.id)?b(``,!0):(C(),x(`path`,{key:2,d:`M ${e.dY}`,stroke:B.value.backgroundColor,"stroke-width":L.value.linesStrokeWidth+1,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,Rt)),M.value.includes(e.id)?b(``,!0):(C(),x(`path`,{key:3,d:`M ${e.dY}`,stroke:e.color,"stroke-width":L.value.linesStrokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,zt))],64))),256))])):b(``,!0)])):b(``,!0),R.value.giftWrap.show?(C(),x(`g`,Bt,[(C(!0),x(_,null,T(q.value,(e,t)=>(C(),x(`g`,null,[e.plots.length>2?(C(),x(`polygon`,{key:0,points:O(o)({series:e.plots}),fill:O(d)(e.color,R.value.giftWrap.fillOpacity*100),"stroke-width":R.value.giftWrap.strokeWidth,"stroke-dasharray":R.value.giftWrap.strokeDasharray,stroke:e.color,"stroke-linejoin":`round`,"stroke-linecap":`round`},null,8,Vt)):b(``,!0)]))),256))])):b(``,!0),N.value.usePerformanceMode?b(``,!0):(C(!0),x(_,{key:8},T(q.value,(e,t)=>(C(),x(`g`,{key:e.id},[!e.shape||e.shape===`circle`?(C(),x(`g`,Ht,[(C(!0),x(_,null,T(e.plots,(n,r)=>(C(),x(`circle`,{key:n.id,cx:n.x,cy:n.y,r:X.value&&X.value===n.id||Q.value.includes(n.id)?n.weight*R.value.hoverRadiusRatio:n.weight,fill:O(d)(e.color,X.value&&X.value!==n.id||Q.value.length&&!Q.value.includes(n.id)?R.value.opacityNotSelected*100:R.value.opacity*100),stroke:R.value.stroke,"stroke-width":R.value.strokeWidth,style:Je(`opacity:${X.value&&X.value===n.id||Q.value.includes(n.id)?1:R.value.significance.useDistanceOpacity?1-Math.abs(n.deviation)/ti.value:R.value.significance.show&&Math.abs(n.deviation)>R.value.significance.deviationThreshold?R.value.significance.opacity:1}`),onMouseover:e=>hi(n,t,`pointer`,ia.value.get(n.id)),onMouseleave:e=>gi(n,t),onClick:e=>_i(n,t)},null,44,Ut))),128))])):(C(),x(`g`,Wt,[(C(!0),x(_,null,T(e.plots,(n,r)=>(C(),y(ke,{class:`vue-ui-scatter-datapoint`,plot:{x:n.x,y:n.y},radius:X.value&&X.value===n.id||Q.value.includes(n.id)?n.weight*R.value.hoverRadiusRatio:n.weight,shape:e.shape,color:O(d)(e.color,X.value&&X.value!==n.id||Q.value.length&&!Q.value.includes(n.id)?R.value.opacityNotSelected*100:R.value.opacity*100),stroke:R.value.stroke,strokeWidth:R.value.strokeWidth,style:Je(`opacity:${X.value&&X.value===n.id||Q.value.includes(n.id)?1:R.value.significance.useDistanceOpacity?1-Math.abs(n.deviation)/ti.value:R.value.significance.show&&Math.abs(n.deviation)>R.value.significance.deviationThreshold?R.value.significance.opacity:1}`),onMouseover:e=>hi(n,t,`pointer`,ia.value.get(n.id)),onMouseleave:e=>gi(n,t),onClick:e=>_i(n,t)},null,8,[`plot`,`radius`,`shape`,`color`,`stroke`,`strokeWidth`,`style`,`onMouseover`,`onMouseleave`,`onClick`]))),256))])),R.value.name.show?(C(!0),x(_,{key:2},T(e.plots,(e,n)=>(C(),x(`text`,{class:`vue-ui-scatter-datapoint-label`,key:`datalabel-${e.id}`,transform:`translate(${e.x}, ${e.y-e.weight-R.value.name.fontSize+R.value.name.offsetY})`,"text-anchor":`middle`,"font-size":R.value.name.fontSize,fill:O(d)(R.value.name.color,X.value&&X.value!==e.id||Q.value.length&&!Q.value.includes(e.id)?R.value.opacityNotSelected*100:100),onMouseover:n=>hi(e,t,`pointer`,ia.value.get(e.id)),onMouseleave:n=>gi(e,t),onClick:n=>_i(e,t)},D(e.clusterName),41,Gt))),128)):b(``,!0)]))),128)),N.value.usePerformanceMode?(C(),x(_,{key:9},[S(`g`,null,[(C(!0),x(_,null,T(Li.value,e=>(C(),x(`path`,{key:e.id,d:e.d,fill:e.fill,stroke:e.stroke,"stroke-width":e.strokeWidth,"stroke-opacity":e.strokeOpacity,"vector-effect":`non-scaling-stroke`,"paint-order":`fill`},null,8,Kt))),128))]),Z.value?(C(),x(`g`,qt,[Ve(ke,{shape:Z.value.shape||`circle`,color:Z.value.color,plot:{x:Z.value.x,y:Z.value.y},radius:Z.value.weight*R.value.hoverRadiusRatio,stroke:R.value.stroke,strokeWidth:R.value.strokeWidth},null,8,[`shape`,`color`,`plot`,`radius`,`stroke`,`strokeWidth`])])):b(``,!0),S(`rect`,{x:U.value.left,y:U.value.top,width:Math.max(1e-4,U.value.width),height:Math.max(1e-4,U.value.height),fill:`transparent`,style:Je({cursor:ai.value&&dr.value?`pointer`:`default`}),onMousemove:i[2]||=(...e)=>O(zi)&&O(zi)(...e),onMouseleave:Bi,onClick:Vi},null,44,Jt)],64)):b(``,!0),(C(!0),x(_,null,T(fi.value,e=>(C(),x(_,{key:`selector_${e.id}`},[R.value.selectors.show?(C(),x(`g`,Yt,[S(`line`,{x1:G.value.x,x2:e.x,y1:e.y,y2:e.y,stroke:R.value.selectors.stroke,"stroke-width":R.value.selectors.strokeWidth,"stroke-dasharray":R.value.selectors.strokeDasharray,"stroke-linecap":`round`,class:`line-pointer`},null,8,Xt),S(`line`,{x1:e.x,x2:e.x,y1:G.value.y,y2:e.y,stroke:R.value.selectors.stroke,"stroke-width":R.value.selectors.strokeWidth,"stroke-dasharray":R.value.selectors.strokeDasharray,"stroke-linecap":`round`,class:`line-pointer`},null,8,Zt),I.value.scales.show?b(``,!0):(C(),x(`text`,{key:0,x:G.value.x+(e.x>G.value.x?-6:6),y:e.y+R.value.selectors.labels.fontSize/3,"font-size":R.value.selectors.labels.fontSize,fill:R.value.selectors.labels.color,"font-weight":R.value.selectors.labels.bold?`bold`:`normal`,"text-anchor":e.x>G.value.x?`end`:`start`},D(O(g)(R.value.selectors.labels.y.formatter,O(h)(e.v.y),O(a)({p:R.value.selectors.labels.prefix,v:O(h)(e.v.y),s:R.value.selectors.labels.suffix,r:R.value.selectors.labels.rounding}),{datapoint:e})),9,Qt)),F.value.scales.show?b(``,!0):(C(),x(`text`,{key:1,x:e.x,y:G.value.y+(e.y>G.value.y?-6:R.value.selectors.labels.fontSize+6),"font-size":R.value.selectors.labels.fontSize,fill:R.value.selectors.labels.color,"font-weight":R.value.selectors.labels.bold?`bold`:`normal`,"text-anchor":`middle`},D(O(g)(R.value.selectors.labels.y.formatter,O(h)(e.v.x),O(a)({p:R.value.selectors.labels.prefix,v:O(h)(e.v.x),s:R.value.selectors.labels.suffix,r:R.value.selectors.labels.rounding}),{datapoint:e})),9,$t)),F.value.scales.show?(C(),x(`text`,{key:2,x:e.x,y:G.value.y+F.value.scales.labels.fontSize+6+F.value.scales.labels.offsetY,"text-anchor":`middle`,"font-size":F.value.scales.labels.fontSize,fill:F.value.scales.labels.color},D(pi(e)),9,en)):b(``,!0),I.value.scales.show?(C(),x(`text`,{key:3,x:G.value.x-I.value.scales.labels.fontSize/2-8+I.value.scales.labels.offsetX,y:e.y+I.value.scales.labels.fontSize/3,"text-anchor":`end`,"font-size":I.value.scales.labels.fontSize,fill:I.value.scales.labels.color},D(mi(e)),9,tn)):b(``,!0),S(`circle`,{cx:G.value.x,cy:e.y,r:R.value.selectors.markers.radius,fill:R.value.selectors.markers.fill,stroke:R.value.selectors.markers.stroke,"stroke-width":R.value.selectors.markers.strokeWidth,class:`line-pointer`},null,8,nn),S(`circle`,{cx:e.x,cy:G.value.y,r:R.value.selectors.markers.radius,fill:R.value.selectors.markers.fill,stroke:R.value.selectors.markers.stroke,"stroke-width":R.value.selectors.markers.strokeWidth,class:`line-pointer`},null,8,rn),R.value.selectors.labels.showName&&!R.value.name.show?(C(),x(`text`,{key:4,x:e.x,y:e.y+(e.y<G.value.y?-R.value.selectors.labels.fontSize/2:R.value.selectors.labels.fontSize),"font-size":R.value.selectors.labels.fontSize,fill:R.value.selectors.labels.color,"font-weight":R.value.selectors.labels.bold?`bold`:`normal`,"text-anchor":e.x<U.value.left+100?`start`:e.x>U.value.right-100?`end`:e.x>G.value.x?`start`:`end`},D(e.v.name),9,an)):b(``,!0)])):b(``,!0)],64))),128)),F.value.show?(C(),x(`g`,{key:10,ref_key:`xAxisLabelLeft`,ref:Qn},[S(`text`,{id:`vue-ui-scatter-xAxis-label-${j.value}`,transform:`translate(${F.value.fontSize+(B.value.layout.dataLabels.reverseAxisLabels?I.value.offsetX:F.value.offsetX)}, ${U.value.top+U.value.height/2+(B.value.layout.dataLabels.reverseAxisLabels?I.value.offsetY:F.value.offsetY)}), rotate(-90)`,"text-anchor":`middle`,"font-size":F.value.fontSize,"font-weight":F.value.bold?`bold`:`normal`,fill:F.value.color},D(B.value.layout.dataLabels.reverseAxisLabels?I.value.name:F.value.name),9,on),F.value.showValue?(C(),x(`text`,{key:0,"text-anchor":`middle`,"font-size":F.value.fontSize,fill:F.value.color,transform:`translate(${F.value.name?F.value.fontSize*3:0}, ${G.value.y+F.value.fontSize/3}), rotate(-90)`},D(O(g)(R.value.selectors.labels.x.formatter,O(h)(W.value.xMin),O(a)({p:R.value.selectors.labels.prefix,v:O(h)(W.value.xMin),s:R.value.selectors.labels.suffix,r:B.value.layout.dataLabels.xAxis.rounding}))),9,sn)):b(``,!0)],512)):b(``,!0),F.value.show&&F.value.showValue?(C(),x(`text`,{key:11,ref_key:`xAxisLabelRight`,ref:$n,"text-anchor":`middle`,transform:`translate(${U.value.right+B.value.layout.padding.right+6}, ${G.value.y+F.value.fontSize/3}), rotate(-90)`,"font-size":F.value.fontSize,fill:F.value.color},D(O(g)(R.value.selectors.labels.x.formatter,O(h)(W.value.xMax),O(a)({p:R.value.selectors.labels.prefix,v:O(h)(W.value.xMax),s:R.value.selectors.labels.suffix,r:F.value.rounding}))),9,cn)):b(``,!0),I.value.show&&I.value.showValue?(C(),x(`text`,{key:12,ref_key:`yAxisLabelTop`,ref:er,x:G.value.x,y:U.value.top-I.value.fontSize,"text-anchor":`middle`,"font-size":I.value.fontSize,fill:I.value.color},D(O(g)(R.value.selectors.labels.y.formatter,O(h)(W.value.yMax),O(a)({p:R.value.selectors.labels.prefix,v:O(h)(W.value.yMax),s:R.value.selectors.labels.suffix,r:I.value.rounding}))),9,ln)):b(``,!0),I.value.show?(C(),x(`g`,{key:13,ref_key:`yAxisLabelBottom`,ref:tr},[I.value.showValue?(C(),x(`text`,{key:0,x:G.value.x,y:H.value.height-I.value.fontSize*2,"text-anchor":`middle`,"font-size":I.value.fontSize,fill:I.value.color},D(O(g)(R.value.selectors.labels.y.formatter,O(h)(W.value.yMin),O(a)({p:R.value.selectors.labels.prefix,v:O(h)(W.value.yMin),s:R.value.selectors.labels.suffix,r:B.value.layout.dataLabels.yAxis.rounding}))),9,un)):b(``,!0),S(`text`,{"text-anchor":`middle`,"font-size":I.value.fontSize,"font-weight":I.value.bold?`bold`:`normal`,fill:I.value.color,x:U.value.left+U.value.width/2+(B.value.layout.dataLabels.reverseAxisLabels?F.value.offsetX:I.value.offsetX),y:H.value.height+(B.value.layout.dataLabels.reverseAxisLabels?F.value.offsetY:I.value.offsetY)},D(B.value.layout.dataLabels.reverseAxisLabels?F.value.name:I.value.name),9,dn)],512)):b(``,!0),S(`clipPath`,{id:`clip_path_${j.value}`},[S(`rect`,{x:U.value.left,y:U.value.top,width:U.value.width<=0?1e-4:U.value.width,height:U.value.height<=0?1e-4:U.value.height},null,8,pn)],8,fn),B.value.layout.correlation.show?(C(),x(`g`,mn,[(C(!0),x(_,null,T(q.value.filter(e=>e.correlation),(e,t)=>(C(),x(`line`,{x1:e.correlation.x1,x2:e.correlation.x2,y1:e.correlation.y1,y2:e.correlation.y2,"stroke-dasharray":B.value.layout.correlation.strokeDasharray,stroke:e.color,"stroke-width":B.value.layout.correlation.strokeWidth,"clip-path":`url(#clip_path_${j.value})`},null,8,hn))),256)),(C(!0),x(_,null,T(q.value.filter(e=>e.correlation),(e,t)=>(C(),x(`g`,null,[B.value.layout.correlation.label.show?(C(),x(`text`,{key:0,x:e.correlation.x2,y:e.correlation.y2,fill:B.value.layout.correlation.label.useSerieColor?e.color:B.value.layout.correlation.label.color,"text-anchor":`end`,"font-size":B.value.layout.correlation.label.fontSize,"font-weight":B.value.layout.correlation.label.bold?`bold`:`normal`},D(O(a)({v:O(h)(e.correlation?.coefficient??0),r:B.value.layout.correlation.label.roundingValue})),9,gn)):b(``,!0)]))),256))])):b(``,!0),E(e.$slots,`svg`,{svg:{...H.value,drawingArea:{...U.value,zero:G.value},data:ei.value,isPrintingImg:O(kr)||O(Ar)||O(qi),isPrintingSvg:O(Ji)}},void 0,!0)],46,st)),e.$slots.hint?(C(),x(`div`,_n,[E(e.$slots,`hint`,qe(Ue({hint:N.value.a11y.translations.keyboardNavigation,isVisible:sr.value})),void 0,!0)])):b(``,!0)]),e.$slots.watermark?(C(),x(`div`,vn,[E(e.$slots,`watermark`,qe(Ue({isPrinting:O(kr)||O(Ar)||O(qi)||O(Ji)})),void 0,!0)])):b(``,!0),S(`div`,{id:`legend-bottom-${j.value}`},null,8,yn),Fn.value&&qn.value&&(B.value.legend.show||e.$slots.legend)?(C(),y(Re,{key:7,to:B.value.legend.position===`top`?`#legend-top-${j.value}`:`#legend-bottom-${j.value}`},[S(`div`,{ref_key:`chartLegend`,ref:Vn},[E(e.$slots,`legend`,{legend:K.value},()=>[B.value.legend.show?(C(),y(Ie,{key:`legend_${Kn.value}`,legendSet:K.value,config:$r.value,isCursorPointer:ur.value,onClickMarker:i[3]||=({legend:e})=>yi(e.id)},{item:k(({legend:e})=>[S(`div`,{onClick:t=>e.segregate(),style:Je(`opacity:${M.value.includes(e.id)?.5:1}`)},D(e.name),13,bn)]),legendToggle:k(()=>[K.value.length>2&&B.value.legend.selectAllToggle.show&&!O(mr)?(C(),y(Me,{key:0,backgroundColor:B.value.legend.selectAllToggle.backgroundColor,color:B.value.legend.selectAllToggle.color,fontSize:B.value.legend.fontSize,checked:M.value.length>0,isCursorPointer:ur.value,onToggle:vi},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):b(``,!0)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):b(``,!0)],!0)],512)],8,[`to`])):b(``,!0),e.$slots.source?(C(),x(`div`,{key:8,ref_key:`source`,ref:Hn,dir:`auto`},[E(e.$slots,`source`,{},void 0,!0)],512)):b(``,!0),Ve(O(Tn),{teleportTo:z.value.teleportTo,show:V.value.showTooltip&&In.value,backgroundColor:z.value.backgroundColor,color:z.value.color,borderRadius:z.value.borderRadius,borderColor:z.value.borderColor,borderWidth:z.value.borderWidth,fontSize:z.value.fontSize,backgroundOpacity:z.value.backgroundOpacity,position:z.value.position,offsetX:z.value.offsetX,offsetY:z.value.offsetY,parent:zn.value,content:Ln.value,isFullscreen:Ti.value,isCustom:z.value.customFormat&&typeof z.value.customFormat==`function`,smooth:z.value.smooth,backdropFilter:z.value.backdropFilter,smoothForce:z.value.smoothForce,smoothSnapThreshold:z.value.smoothSnapThreshold,isA11yMode:or.value===`keyboard`,a11yPosition:ar.value},{"tooltip-before":k(()=>[E(e.$slots,`tooltip-before`,qe(Ue({...oi.value})),void 0,!0)]),tooltip:k(()=>[E(e.$slots,`tooltip`,qe(Ue({...oi.value})),void 0,!0)]),"tooltip-after":k(()=>[E(e.$slots,`tooltip-after`,qe(Ue({...oi.value})),void 0,!0)]),default:k(()=>[z.value.showShape?(C(),x(`div`,xn,[(C(),x(`svg`,Sn,[Ve(ke,{shape:Z.value.shape,color:Z.value.color,plot:{x:10,y:10},radius:7},null,8,[`shape`,`color`])]))])):b(``,!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`]),Fn.value&&P.value.buttons.table?(C(),y(Ze(Hi.value.component),We({key:9},Hi.value.props,{ref_key:`tableUnit`,ref:Xn,onClose:Ui}),ze({content:k(()=>[(C(),y(O(On),{key:`table_${Gn.value}`,colNames:wi.value.colNames,head:wi.value.head,body:wi.value.body,config:wi.value.config,title:N.value.table.useDialog?``:Hi.value.title,withCloseButton:!N.value.table.useDialog,isCursorPointer:ur.value,onClose:Ui},{th:k(({th:e})=>[Be(D(e),1)]),td:k(({td:e})=>[e.shape?(C(),x(`div`,Cn,[S(`span`,null,D(e.content),1)])):(C(),x(`div`,{key:1,innerHTML:e},null,8,wn))]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[N.value.table.useDialog?{name:`title`,fn:k(()=>[Be(D(Hi.value.title),1)]),key:`0`}:void 0,N.value.table.useDialog?{name:`actions`,fn:k(()=>[S(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[4]||=e=>Ci(P.value.callbacks.csv),style:Je({cursor:ur.value?`pointer`:`default`})},[Ve(O(En),{name:`fileCsv`,stroke:Hi.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):b(``,!0),E(e.$slots,`skeleton`,{},()=>[O(mr)?(C(),y(me,{key:0})):b(``,!0)],!0)],46,nt))}},[[`__scopeId`,`data-v-624e0439`]]);export{tt as n,Tn as t};