vue-data-ui 2.4.62 → 2.4.64

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 (157) hide show
  1. package/dist/{Arrow-E7FjAwN-.js → Arrow-CRM8J83L.js} +1 -1
  2. package/dist/{Arrow-C0lmBG2-.cjs → Arrow-DSkIkWAr.cjs} +1 -1
  3. package/dist/{BaseIcon-DRLxlrSt.js → BaseIcon-Axko0XAg.js} +1 -1
  4. package/dist/{BaseIcon-DK3C9OCq.cjs → BaseIcon-D13bKBUN.cjs} +1 -1
  5. package/dist/{DataTable-BANy6PnS.js → DataTable-B2hVpPSW.js} +2 -2
  6. package/dist/{DataTable-BLSMgcEN.cjs → DataTable-DnrSae6c.cjs} +1 -1
  7. package/dist/{Legend-pWq2tKCl.js → Legend-CzY3Yhr8.js} +1 -1
  8. package/dist/{Legend-CAgxjrra.cjs → Legend-DIfEhYtz.cjs} +1 -1
  9. package/dist/{PackageVersion-1NslmM8M.js → PackageVersion-B684aQUP.js} +1 -1
  10. package/dist/{PackageVersion-D3dK8oA3.cjs → PackageVersion-FzHnQSp-.cjs} +1 -1
  11. package/dist/{PenAndPaper-CYFIR9j7.cjs → PenAndPaper-C6I0ckZw.cjs} +1 -1
  12. package/dist/{PenAndPaper-CdXSbSZY.js → PenAndPaper-mC0kh-S8.js} +3 -3
  13. package/dist/{Shape-BtKtwV0v.js → Shape-DbnYh6z4.js} +1 -1
  14. package/dist/{Shape-DPztPWor.cjs → Shape-eJUVLesM.cjs} +1 -1
  15. package/dist/Slicer-BBolqweG.js +484 -0
  16. package/dist/Slicer-C9bF7-B-.cjs +1 -0
  17. package/dist/{Title-DPefeOY7.js → Title-DqZErnpZ.js} +1 -1
  18. package/dist/{Title-BhL7TMa_.cjs → Title-DuMgnso9.cjs} +1 -1
  19. package/dist/{Tooltip-C5qSWrXO.cjs → Tooltip-Cz3eQmMV.cjs} +1 -1
  20. package/dist/{Tooltip-C72f83eg.js → Tooltip-DddRc8qD.js} +1 -1
  21. package/dist/index-D-xYtUSL.cjs +9 -0
  22. package/dist/{index-B-k71vpj.js → index-DjTPIx3R.js} +7 -3
  23. package/dist/style.css +1 -1
  24. package/dist/types/vue-data-ui.d.cts +4 -0
  25. package/dist/types/vue-data-ui.d.ts +4 -0
  26. package/dist/{useNestedProp-CxwPeWts.cjs → useNestedProp-BN-VfUfj.cjs} +1 -1
  27. package/dist/{useNestedProp-BeXDUo1v.js → useNestedProp-BNmCbG1v.js} +1 -1
  28. package/dist/{usePrinter-BK-n-gRN.js → usePrinter-BFF1xn1s.js} +1 -1
  29. package/dist/{usePrinter-CMvfTteH.cjs → usePrinter-pT-a_sFr.cjs} +1 -1
  30. package/dist/{vue-data-ui-fOomZU3e.js → vue-data-ui-CPMtS74M.js} +60 -60
  31. package/dist/{vue-data-ui-CG-HnqKG.cjs → vue-data-ui-rWaUsffe.cjs} +1 -1
  32. package/dist/vue-data-ui.cjs +1 -1
  33. package/dist/vue-data-ui.js +1 -1
  34. package/dist/{vue-ui-3d-bar-C95HBkYv.js → vue-ui-3d-bar-Cpx0rTUr.js} +9 -9
  35. package/dist/{vue-ui-3d-bar-DLrJ9TM8.cjs → vue-ui-3d-bar-CxcO1rW_.cjs} +1 -1
  36. package/dist/{vue-ui-accordion-IZgkGqto.cjs → vue-ui-accordion-B1MkyNta.cjs} +1 -1
  37. package/dist/{vue-ui-accordion-DWAg7tbw.js → vue-ui-accordion-CDTXGeL0.js} +3 -3
  38. package/dist/{vue-ui-age-pyramid-BSKXGW3a.cjs → vue-ui-age-pyramid-CEvYSZnY.cjs} +1 -1
  39. package/dist/{vue-ui-age-pyramid-BxBU5CCr.js → vue-ui-age-pyramid-CSwlc2bd.js} +10 -10
  40. package/dist/{vue-ui-annotator-GSRzlJ-N.cjs → vue-ui-annotator-BUoz1Y87.cjs} +1 -1
  41. package/dist/{vue-ui-annotator-DupDeVZx.js → vue-ui-annotator-D5dS0BTP.js} +1 -1
  42. package/dist/{vue-ui-bullet-BD0MrIvY.cjs → vue-ui-bullet-Bcx-V2GQ.cjs} +1 -1
  43. package/dist/{vue-ui-bullet-Dgr-mCAc.js → vue-ui-bullet-RDyK79l0.js} +8 -8
  44. package/dist/{vue-ui-candlestick-DpcBRWha.cjs → vue-ui-candlestick-CkjNRVDz.cjs} +2 -2
  45. package/dist/{vue-ui-candlestick-DYupl4j5.js → vue-ui-candlestick-s-Z42Lns.js} +75 -73
  46. package/dist/{vue-ui-carousel-table-CNS6ZzTc.cjs → vue-ui-carousel-table-CoLBbF34.cjs} +1 -1
  47. package/dist/{vue-ui-carousel-table-DNwWV8de.js → vue-ui-carousel-table-DJNIAgAU.js} +4 -4
  48. package/dist/{vue-ui-chestnut-AVSIntNp.cjs → vue-ui-chestnut-P1hAffNt.cjs} +1 -1
  49. package/dist/{vue-ui-chestnut-OaTraMv4.js → vue-ui-chestnut-_90914ye.js} +8 -8
  50. package/dist/{vue-ui-cursor-CJJ78nNY.cjs → vue-ui-cursor-BoGnTfem.cjs} +1 -1
  51. package/dist/{vue-ui-cursor-Dlo68AuK.js → vue-ui-cursor-Doo6HM0B.js} +2 -2
  52. package/dist/{vue-ui-dashboard-CzF8PeC6.js → vue-ui-dashboard-BZKKb8cZ.js} +43 -43
  53. package/dist/vue-ui-dashboard-mC_BLuIN.cjs +1 -0
  54. package/dist/{vue-ui-digits-BSE3CEuv.cjs → vue-ui-digits-DFwg7Et3.cjs} +1 -1
  55. package/dist/{vue-ui-digits-BHkW0Bi1.js → vue-ui-digits-Z8AprQhX.js} +2 -2
  56. package/dist/{vue-ui-donut-CeestESD.js → vue-ui-donut-C6i_KVvc.js} +11 -11
  57. package/dist/{vue-ui-donut-evolution-DGl_J0JB.js → vue-ui-donut-evolution-CK_0JI6T.js} +127 -125
  58. package/dist/{vue-ui-donut-evolution-BDwV-Ncf.cjs → vue-ui-donut-evolution-D-6gM9JV.cjs} +1 -1
  59. package/dist/{vue-ui-donut-DxH9EkK_.cjs → vue-ui-donut-uH8SS5Ms.cjs} +1 -1
  60. package/dist/{vue-ui-dumbbell-DlELQHtq.js → vue-ui-dumbbell-C4y9e7Gz.js} +10 -10
  61. package/dist/{vue-ui-dumbbell-ChipHJ9p.cjs → vue-ui-dumbbell-DS_3Z5cT.cjs} +1 -1
  62. package/dist/{vue-ui-flow-BowAWyMA.cjs → vue-ui-flow-C2sVVaok.cjs} +1 -1
  63. package/dist/{vue-ui-flow-BZIiidbF.js → vue-ui-flow-XrJvcKqr.js} +9 -9
  64. package/dist/{vue-ui-funnel-Bc7BrgHa.js → vue-ui-funnel-CHhVPjnM.js} +9 -9
  65. package/dist/{vue-ui-funnel-DLzHnLhb.cjs → vue-ui-funnel-DxhsOEbU.cjs} +1 -1
  66. package/dist/{vue-ui-galaxy-t5R2Vz1t.js → vue-ui-galaxy-Bd8p21nC.js} +11 -11
  67. package/dist/{vue-ui-galaxy-DesiP-Ev.cjs → vue-ui-galaxy-CRsan4r5.cjs} +1 -1
  68. package/dist/{vue-ui-gauge-CYx4jt71.js → vue-ui-gauge-B-nOtSwD.js} +7 -7
  69. package/dist/{vue-ui-gauge-_-1DxTe0.cjs → vue-ui-gauge-D0Mk9_aI.cjs} +1 -1
  70. package/dist/{vue-ui-gizmo-DeO_vFhP.cjs → vue-ui-gizmo-C3GRBcSW.cjs} +1 -1
  71. package/dist/{vue-ui-gizmo-DVcY_OyD.js → vue-ui-gizmo-tQNlhr2p.js} +3 -3
  72. package/dist/{vue-ui-heatmap-wLcx9ex3.js → vue-ui-heatmap-6MpvCBmt.js} +10 -10
  73. package/dist/{vue-ui-heatmap-CWqJiKrJ.cjs → vue-ui-heatmap-DwalrFVm.cjs} +1 -1
  74. package/dist/{vue-ui-history-plot-FJnUgshF.cjs → vue-ui-history-plot-FgapeA0e.cjs} +1 -1
  75. package/dist/{vue-ui-history-plot-D7VjQwLk.js → vue-ui-history-plot-Hk-UrZtS.js} +11 -11
  76. package/dist/{vue-ui-kpi-DcGp2H4d.cjs → vue-ui-kpi-CKZQsJnV.cjs} +1 -1
  77. package/dist/{vue-ui-kpi-C4tl3luu.js → vue-ui-kpi-DrCH9EuP.js} +3 -3
  78. package/dist/{vue-ui-mini-loader-DZ-Rxr07.js → vue-ui-mini-loader-BLvcc-fM.js} +2 -2
  79. package/dist/{vue-ui-mini-loader-B41vyg7t.cjs → vue-ui-mini-loader-BSKXq7CA.cjs} +1 -1
  80. package/dist/{vue-ui-molecule-51NSY4Z8.js → vue-ui-molecule-Ch4_SJxL.js} +11 -11
  81. package/dist/{vue-ui-molecule-CUiAEOC9.cjs → vue-ui-molecule-D0IHSilQ.cjs} +1 -1
  82. package/dist/{vue-ui-mood-radar-DkXzwU8x.cjs → vue-ui-mood-radar-DNPseOpJ.cjs} +1 -1
  83. package/dist/{vue-ui-mood-radar-DG3MA8BZ.js → vue-ui-mood-radar-Gv0k1T46.js} +11 -11
  84. package/dist/{vue-ui-nested-donuts-Be9FYX8F.js → vue-ui-nested-donuts-DY8Hig_-.js} +11 -11
  85. package/dist/{vue-ui-nested-donuts-Cerc7ILW.cjs → vue-ui-nested-donuts-QOvJJc30.cjs} +1 -1
  86. package/dist/{vue-ui-onion-BpIopgzq.cjs → vue-ui-onion-Ca0Tcbu3.cjs} +1 -1
  87. package/dist/{vue-ui-onion-BhNd2hbK.js → vue-ui-onion-Ct_1j1fA.js} +11 -11
  88. package/dist/{vue-ui-parallel-coordinate-plot-D1z9zPyF.cjs → vue-ui-parallel-coordinate-plot-C_opo0qJ.cjs} +1 -1
  89. package/dist/{vue-ui-parallel-coordinate-plot-CSll-Vtd.js → vue-ui-parallel-coordinate-plot-DkYcNRQk.js} +12 -12
  90. package/dist/{vue-ui-quadrant-303aQCVj.cjs → vue-ui-quadrant-BJuoZ_lv.cjs} +1 -1
  91. package/dist/{vue-ui-quadrant-mw0cCB8b.js → vue-ui-quadrant-DwAKm2Yj.js} +12 -12
  92. package/dist/{vue-ui-quick-chart-DJfdl_Oc.cjs → vue-ui-quick-chart-5ga8waQS.cjs} +3 -3
  93. package/dist/{vue-ui-quick-chart-6sXw4LvX.js → vue-ui-quick-chart-D5V73GXO.js} +214 -212
  94. package/dist/{vue-ui-radar-B5c80iuj.cjs → vue-ui-radar-C3kzmi1G.cjs} +1 -1
  95. package/dist/{vue-ui-radar-DT2PXZ3W.js → vue-ui-radar-CmE4wCWD.js} +12 -12
  96. package/dist/{vue-ui-rating-RKyIWluu.cjs → vue-ui-rating-CE7LGiFS.cjs} +1 -1
  97. package/dist/{vue-ui-rating-x4INc3T_.js → vue-ui-rating-SAph_BKh.js} +2 -2
  98. package/dist/{vue-ui-relation-circle-OTUjuy7-.js → vue-ui-relation-circle-D1JdWshk.js} +7 -7
  99. package/dist/{vue-ui-relation-circle-T_cM-vkm.cjs → vue-ui-relation-circle-dQQw_mgd.cjs} +1 -1
  100. package/dist/{vue-ui-rings-B1c_TNA0.js → vue-ui-rings-C-7vrgjN.js} +11 -11
  101. package/dist/{vue-ui-rings-CEdur365.cjs → vue-ui-rings-kFhuaBvY.cjs} +1 -1
  102. package/dist/{vue-ui-scatter-BM6iF4yl.cjs → vue-ui-scatter-BrOg2xiN.cjs} +1 -1
  103. package/dist/{vue-ui-scatter-CjI7xkJm.js → vue-ui-scatter-DE4X0DQI.js} +12 -12
  104. package/dist/{vue-ui-screenshot-wadHKtkZ.cjs → vue-ui-screenshot-BXq82cfA.cjs} +1 -1
  105. package/dist/{vue-ui-screenshot-DoMe-dMI.js → vue-ui-screenshot-CyWEEkg_.js} +1 -1
  106. package/dist/{vue-ui-skeleton-BgEjqaz9.cjs → vue-ui-skeleton-D3zg7qd2.cjs} +1 -1
  107. package/dist/{vue-ui-skeleton-DSXzxNMC.js → vue-ui-skeleton-Dt9cA-wa.js} +3 -3
  108. package/dist/{vue-ui-smiley-D5KYgUQi.cjs → vue-ui-smiley-FUNmIUpN.cjs} +1 -1
  109. package/dist/{vue-ui-smiley-DgfHBeGm.js → vue-ui-smiley-uRlPgN-A.js} +2 -2
  110. package/dist/{vue-ui-spark-trend-CEU0TB9l.js → vue-ui-spark-trend-5KFnHsjs.js} +5 -5
  111. package/dist/{vue-ui-spark-trend-DhPXSFpU.cjs → vue-ui-spark-trend-DYXJMJLz.cjs} +1 -1
  112. package/dist/{vue-ui-sparkbar-8vDQ9r97.cjs → vue-ui-sparkbar-BUg0DhGI.cjs} +1 -1
  113. package/dist/{vue-ui-sparkbar-C8TB_YCv.js → vue-ui-sparkbar-D-Yk9z4E.js} +4 -4
  114. package/dist/{vue-ui-sparkgauge-DCXX3ZDS.js → vue-ui-sparkgauge-DVLZofTg.js} +4 -4
  115. package/dist/{vue-ui-sparkgauge-DnYyNQQn.cjs → vue-ui-sparkgauge-DvDPPyau.cjs} +1 -1
  116. package/dist/{vue-ui-sparkhistogram-CEmGA3kW.js → vue-ui-sparkhistogram-Dqgl_5RN.js} +5 -5
  117. package/dist/{vue-ui-sparkhistogram-BQGAFZWZ.cjs → vue-ui-sparkhistogram-GMZxK2oC.cjs} +1 -1
  118. package/dist/vue-ui-sparkline-C96IUWwW.cjs +1 -0
  119. package/dist/{vue-ui-sparkline-BXvaVl-R.js → vue-ui-sparkline-CPEHgvq0.js} +9 -9
  120. package/dist/{vue-ui-sparkstackbar-DbtbyF5W.cjs → vue-ui-sparkstackbar-BroOR6B-.cjs} +1 -1
  121. package/dist/{vue-ui-sparkstackbar-CI0uvrlh.js → vue-ui-sparkstackbar-DCceVnjJ.js} +5 -5
  122. package/dist/{vue-ui-stackbar-CYJLXaU0.cjs → vue-ui-stackbar-Bv7RiRae.cjs} +2 -2
  123. package/dist/{vue-ui-stackbar-D-_Fp5r4.js → vue-ui-stackbar-KznnSCkj.js} +81 -79
  124. package/dist/{vue-ui-strip-plot-DUBjl9cR.cjs → vue-ui-strip-plot-BYO72loZ.cjs} +1 -1
  125. package/dist/{vue-ui-strip-plot-pJsObuy6.js → vue-ui-strip-plot-CJxPAY9n.js} +11 -11
  126. package/dist/{vue-ui-table-CbvpwN05.cjs → vue-ui-table-BTuCiJb7.cjs} +1 -1
  127. package/dist/{vue-ui-table-s7IHsGac.js → vue-ui-table-DKoRX7gX.js} +1 -1
  128. package/dist/{vue-ui-table-heatmap-BAlngE3L.js → vue-ui-table-heatmap-4RZ4Bo12.js} +4 -4
  129. package/dist/{vue-ui-table-heatmap-sAuA3lIc.cjs → vue-ui-table-heatmap-L3Pg7wC0.cjs} +1 -1
  130. package/dist/{vue-ui-table-sparkline-ClrZ-BC3.js → vue-ui-table-sparkline-CVWPCRfz.js} +5 -5
  131. package/dist/{vue-ui-table-sparkline-CjaF-Zjq.cjs → vue-ui-table-sparkline-GaHw2cTh.cjs} +1 -1
  132. package/dist/{vue-ui-thermometer-C_sqnPkS.js → vue-ui-thermometer-BFqURwxY.js} +7 -7
  133. package/dist/{vue-ui-thermometer-fcy4HsN6.cjs → vue-ui-thermometer-VC967j2q.cjs} +1 -1
  134. package/dist/{vue-ui-timer-B0lLVb4J.cjs → vue-ui-timer-Bou1Zg22.cjs} +1 -1
  135. package/dist/{vue-ui-timer-DeRjcfir.js → vue-ui-timer-mPQTAvi1.js} +5 -5
  136. package/dist/{vue-ui-tiremarks-CBnEObhg.cjs → vue-ui-tiremarks-ClzgPlHg.cjs} +1 -1
  137. package/dist/{vue-ui-tiremarks-DCOJWvBx.js → vue-ui-tiremarks-DyEXFKpK.js} +7 -7
  138. package/dist/{vue-ui-treemap-SPe7NLHg.cjs → vue-ui-treemap-DEUSAGw0.cjs} +1 -1
  139. package/dist/{vue-ui-treemap-UU9kd93i.js → vue-ui-treemap-pCrT4KlF.js} +11 -11
  140. package/dist/{vue-ui-vertical-bar-DtPjSOTd.cjs → vue-ui-vertical-bar-DxkQK0tN.cjs} +1 -1
  141. package/dist/{vue-ui-vertical-bar-Do1beV1x.js → vue-ui-vertical-bar-QF9epdei.js} +11 -11
  142. package/dist/{vue-ui-waffle-CCWlLaex.cjs → vue-ui-waffle-DjcwBxNh.cjs} +1 -1
  143. package/dist/{vue-ui-waffle-B1XP-Qon.js → vue-ui-waffle-DkHP1plA.js} +11 -11
  144. package/dist/{vue-ui-wheel-D6IUmaVZ.js → vue-ui-wheel-L8vxpKcv.js} +7 -7
  145. package/dist/{vue-ui-wheel-BHVTUvG3.cjs → vue-ui-wheel-Y2Sny-6a.cjs} +1 -1
  146. package/dist/{vue-ui-word-cloud-BvjWoqnE.cjs → vue-ui-word-cloud-B9UJmesc.cjs} +1 -1
  147. package/dist/{vue-ui-word-cloud-AubuQjfw.js → vue-ui-word-cloud-DIBB7HIj.js} +10 -10
  148. package/dist/{vue-ui-xy-CTLJncUe.cjs → vue-ui-xy-DwidR-Vl.cjs} +3 -3
  149. package/dist/{vue-ui-xy-BMJpPJeS.js → vue-ui-xy-QmsiPNcv.js} +35 -33
  150. package/dist/{vue-ui-xy-canvas-De-MHu0Y.cjs → vue-ui-xy-canvas-2aqG9yv5.cjs} +2 -2
  151. package/dist/{vue-ui-xy-canvas-DHU2wBAP.js → vue-ui-xy-canvas-CeKH8VIR.js} +227 -225
  152. package/package.json +1 -1
  153. package/dist/Slicer-BggxvZRw.cjs +0 -1
  154. package/dist/Slicer-p4IqkHkJ.js +0 -423
  155. package/dist/index-CC7tVh7F.cjs +0 -9
  156. package/dist/vue-ui-dashboard-fYhjRzSY.cjs +0 -1
  157. package/dist/vue-ui-sparkline-HQaxAzTw.cjs +0 -1
@@ -1,18 +1,18 @@
1
- import { c as J, a as K, t as Q, z as j, p as $, V as q, O as R, f as U, L as ee, G as te, i as ie, a2 as re, a0 as ae, a3 as le, v as se, a4 as ne, d as he, B as oe, b as ce, q as de, R as ue, a5 as ge, r as fe, e as Ie, y as Ne, C as me, x as xe, a6 as be, Y as Fe, o as _e, s as Ae, w as ye, F as Le, A as Ce, u as Se } from "./index-B-k71vpj.js";
2
- import { D as ke } from "./DataTable-BANy6PnS.js";
3
- import { _ as we } from "./Title-DPefeOY7.js";
4
- import { _ as Oe, u as Ge } from "./Tooltip-C72f83eg.js";
5
- import { U as ve } from "./usePrinter-BK-n-gRN.js";
6
- import { _ as pe } from "./Shape-BtKtwV0v.js";
7
- import ze from "./BaseIcon-DRLxlrSt.js";
8
- import Me from "./vue-ui-table-sparkline-ClrZ-BC3.js";
9
- import Te from "./vue-ui-skeleton-DSXzxNMC.js";
10
- import { S as Pe } from "./Slicer-p4IqkHkJ.js";
11
- import Ve from "./vue-ui-accordion-DWAg7tbw.js";
12
- import { u as Z } from "./useNestedProp-BeXDUo1v.js";
13
- import { _ as Re } from "./PackageVersion-1NslmM8M.js";
14
- import { P as De } from "./PenAndPaper-CdXSbSZY.js";
15
- import { resolveComponent as P, openBlock as a, createElementBlock as s, normalizeClass as V, normalizeStyle as L, createBlock as D, createCommentVNode as c, createSlots as Be, withCtx as M, renderSlot as w, normalizeProps as B, guardReactiveProps as H, createVNode as X, createElementVNode as f, Fragment as I, renderList as m, toDisplayString as S, withDirectives as He, vModelCheckbox as Ee, createTextVNode as We } from "vue";
1
+ import { c as J, a as K, t as Q, z as j, p as $, V as q, O as R, f as U, L as ee, G as te, i as ie, a2 as re, a0 as ae, a3 as le, v as se, a4 as ne, d as he, B as oe, b as ce, q as de, R as ue, a5 as ge, r as fe, e as Ie, y as Ne, C as me, x as xe, a6 as be, Y as Fe, o as _e, s as Ae, w as ye, F as Le, A as Ce, u as Se } from "./index-DjTPIx3R.js";
2
+ import { D as ke } from "./DataTable-B2hVpPSW.js";
3
+ import { _ as we } from "./Title-DqZErnpZ.js";
4
+ import { _ as Oe, u as Ge } from "./Tooltip-DddRc8qD.js";
5
+ import { U as ve } from "./usePrinter-BFF1xn1s.js";
6
+ import { _ as pe } from "./Shape-DbnYh6z4.js";
7
+ import ze from "./BaseIcon-Axko0XAg.js";
8
+ import Me from "./vue-ui-table-sparkline-CVWPCRfz.js";
9
+ import Te from "./vue-ui-skeleton-Dt9cA-wa.js";
10
+ import { S as Pe } from "./Slicer-BBolqweG.js";
11
+ import Ve from "./vue-ui-accordion-CDTXGeL0.js";
12
+ import { u as Z } from "./useNestedProp-BNmCbG1v.js";
13
+ import { _ as Re } from "./PackageVersion-B684aQUP.js";
14
+ import { P as De } from "./PenAndPaper-mC0kh-S8.js";
15
+ import { resolveComponent as P, openBlock as a, createElementBlock as s, normalizeClass as V, normalizeStyle as L, createBlock as D, createCommentVNode as c, createSlots as He, withCtx as M, renderSlot as w, normalizeProps as H, guardReactiveProps as B, createVNode as X, createElementVNode as f, Fragment as I, renderList as m, toDisplayString as S, withDirectives as Be, vModelCheckbox as Ee, createTextVNode as We } from "vue";
16
16
  import { _ as Ye } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
17
  const Xe = J(), qe = {
18
18
  name: "vue-ui-xy",
@@ -1077,15 +1077,15 @@ const Xe = J(), qe = {
1077
1077
  ref: "noTitle",
1078
1078
  class: "vue-data-ui-no-title-space",
1079
1079
  style: "height:36px; width: 100%; background:transparent"
1080
- }, Je = ["viewBox"], Ke = ["x", "y", "width", "height"], Qe = { key: 1 }, je = { class: "vue-ui-xy-grid" }, $e = ["stroke", "x1", "x2", "y1", "y2"], et = ["stroke", "x1", "x2", "y1", "y2"], tt = { key: 1 }, it = ["x1", "x2", "y1", "y2", "stroke"], rt = ["x1", "x2", "y1", "y2", "stroke"], at = ["x1", "x2", "y1", "y2", "stroke"], lt = { key: 3 }, st = ["x1", "x2", "y1", "y2", "stroke"], nt = ["id"], ht = ["stop-color"], ot = ["stop-color"], ct = ["stop-color"], dt = ["id"], ut = ["stop-color"], gt = ["stop-color"], ft = ["stop-color"], It = ["id"], Nt = ["stop-color"], mt = ["stop-color"], xt = ["id"], bt = ["stop-color"], Ft = ["stop-color"], _t = ["id"], At = ["stop-color"], yt = ["stop-color"], Lt = ["x", "y", "height", "width", "fill"], Ct = ["x", "y", "width"], St = ["x", "y", "height", "width", "fill"], kt = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], wt = ["width", "x", "y"], Ot = { key: 0 }, Gt = ["id"], vt = ["fill"], pt = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], zt = ["x", "y", "font-size", "fill"], Mt = ["stroke", "x1", "x2", "y1", "y2"], Tt = { key: 2 }, Pt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Vt = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray"], Rt = { key: 4 }, Dt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Bt = ["fill", "font-size", "transform"], Ht = ["x1", "x2", "y1", "y2", "stroke"], Et = ["x", "y", "font-size", "fill"], Wt = ["x1", "x2", "y1", "y2", "stroke"], Yt = ["x", "y", "font-size", "fill"], Xt = ["width", "x", "y"], qt = { style: { width: "100%" } }, Ut = { key: 0 }, Zt = ["id"], Jt = ["fill"], Kt = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], Qt = ["x", "y", "font-size", "fill"], jt = ["d", "stroke", "stroke-width", "stroke-dasharray"], $t = { key: 1 }, ei = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], ti = { key: 0 }, ii = ["d", "fill"], ri = ["d", "fill"], ai = ["d", "stroke", "stroke-width", "stroke-dasharray"], li = { key: 2 }, si = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], ni = ["width", "x", "y"], hi = { style: { width: "100%" } }, oi = { key: 3 }, ci = ["id"], di = ["fill"], ui = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], gi = ["x", "y", "font-size", "fill"], fi = { key: 5 }, Ii = ["x", "y", "font-size", "fill"], Ni = ["x", "y", "font-size", "fill", "font-weight"], mi = { key: 6 }, xi = ["x", "y", "font-size", "fill"], bi = ["x", "y"], Fi = ["x", "y"], _i = { key: 7 }, Ai = ["x", "y", "font-size", "fill"], yi = ["x", "y"], Li = ["x", "y"], Ci = ["x", "y", "font-size", "fill", "innerHTML"], Si = ["x", "y", "font-size", "fill", "innerHTML"], ki = ["x", "y", "font-size", "fill", "innerHTML"], wi = ["x", "y", "font-size", "fill", "innerHTML"], Oi = ["x", "y", "width", "height", "fill", "onMouseenter"], Gi = ["font-size", "fill", "transform"], vi = ["x", "y", "font-size", "fill"], pi = { key: 9 }, zi = ["text-anchor", "font-size", "fill", "transform", "onClick"], Mi = ["x", "y", "height", "width", "onMouseenter", "onClick"], Ti = { key: 10 }, Pi = ["x", "y"], Vi = ["cx", "cy", "r", "fill"], Ri = {
1080
+ }, Je = ["viewBox"], Ke = ["x", "y", "width", "height"], Qe = { key: 1 }, je = { class: "vue-ui-xy-grid" }, $e = ["stroke", "x1", "x2", "y1", "y2"], et = ["stroke", "x1", "x2", "y1", "y2"], tt = { key: 1 }, it = ["x1", "x2", "y1", "y2", "stroke"], rt = ["x1", "x2", "y1", "y2", "stroke"], at = ["x1", "x2", "y1", "y2", "stroke"], lt = { key: 3 }, st = ["x1", "x2", "y1", "y2", "stroke"], nt = ["id"], ht = ["stop-color"], ot = ["stop-color"], ct = ["stop-color"], dt = ["id"], ut = ["stop-color"], gt = ["stop-color"], ft = ["stop-color"], It = ["id"], Nt = ["stop-color"], mt = ["stop-color"], xt = ["id"], bt = ["stop-color"], Ft = ["stop-color"], _t = ["id"], At = ["stop-color"], yt = ["stop-color"], Lt = ["x", "y", "height", "width", "fill"], Ct = ["x", "y", "width"], St = ["x", "y", "height", "width", "fill"], kt = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], wt = ["width", "x", "y"], Ot = { key: 0 }, Gt = ["id"], vt = ["fill"], pt = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], zt = ["x", "y", "font-size", "fill"], Mt = ["stroke", "x1", "x2", "y1", "y2"], Tt = { key: 2 }, Pt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Vt = ["x", "y", "width", "height", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "stroke-dasharray"], Rt = { key: 4 }, Dt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ht = ["fill", "font-size", "transform"], Bt = ["x1", "x2", "y1", "y2", "stroke"], Et = ["x", "y", "font-size", "fill"], Wt = ["x1", "x2", "y1", "y2", "stroke"], Yt = ["x", "y", "font-size", "fill"], Xt = ["width", "x", "y"], qt = { style: { width: "100%" } }, Ut = { key: 0 }, Zt = ["id"], Jt = ["fill"], Kt = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], Qt = ["x", "y", "font-size", "fill"], jt = ["d", "stroke", "stroke-width", "stroke-dasharray"], $t = { key: 1 }, ei = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], ti = { key: 0 }, ii = ["d", "fill"], ri = ["d", "fill"], ai = ["d", "stroke", "stroke-width", "stroke-dasharray"], li = { key: 2 }, si = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], ni = ["width", "x", "y"], hi = { style: { width: "100%" } }, oi = { key: 3 }, ci = ["id"], di = ["fill"], ui = ["x1", "x2", "y1", "y2", "stroke", "marker-end"], gi = ["x", "y", "font-size", "fill"], fi = { key: 5 }, Ii = ["x", "y", "font-size", "fill"], Ni = ["x", "y", "font-size", "fill", "font-weight"], mi = { key: 6 }, xi = ["x", "y", "font-size", "fill"], bi = ["x", "y"], Fi = ["x", "y"], _i = { key: 7 }, Ai = ["x", "y", "font-size", "fill"], yi = ["x", "y"], Li = ["x", "y"], Ci = ["x", "y", "font-size", "fill", "innerHTML"], Si = ["x", "y", "font-size", "fill", "innerHTML"], ki = ["x", "y", "font-size", "fill", "innerHTML"], wi = ["x", "y", "font-size", "fill", "innerHTML"], Oi = ["x", "y", "width", "height", "fill", "onMouseenter"], Gi = ["font-size", "fill", "transform"], vi = ["x", "y", "font-size", "fill"], pi = { key: 9 }, zi = ["text-anchor", "font-size", "fill", "transform", "onClick"], Mi = ["x", "y", "height", "width", "onMouseenter", "onClick"], Ti = { key: 10 }, Pi = ["x", "y"], Vi = ["cx", "cy", "r", "fill"], Ri = {
1081
1081
  key: 5,
1082
1082
  class: "vue-data-ui-watermark"
1083
- }, Di = ["onClick"], Bi = {
1083
+ }, Di = ["onClick"], Hi = {
1084
1084
  key: 0,
1085
1085
  viewBox: "0 0 20 12",
1086
1086
  height: "14",
1087
1087
  width: "20"
1088
- }, Hi = ["stroke", "fill"], Ei = {
1088
+ }, Bi = ["stroke", "fill"], Ei = {
1089
1089
  key: 1,
1090
1090
  viewBox: "0 0 12 12",
1091
1091
  height: "14",
@@ -1176,7 +1176,7 @@ function Zi(i, l, o, u, t, e) {
1176
1176
  style: L({
1177
1177
  visibility: t.keepUserOptionState ? t.userOptionsVisible ? "visible" : "hidden" : "visible"
1178
1178
  })
1179
- }, Be({ _: 2 }, [
1179
+ }, He({ _: 2 }, [
1180
1180
  i.$slots.optionTooltip ? {
1181
1181
  name: "optionTooltip",
1182
1182
  fn: M(() => [
@@ -1229,14 +1229,14 @@ function Zi(i, l, o, u, t, e) {
1229
1229
  i.$slots.optionFullscreen ? {
1230
1230
  name: "optionFullscreen",
1231
1231
  fn: M(({ toggleFullscreen: r, isFullscreen: h }) => [
1232
- w(i.$slots, "optionFullscreen", B(H({ toggleFullscreen: r, isFullscreen: h })), void 0, !0)
1232
+ w(i.$slots, "optionFullscreen", H(B({ toggleFullscreen: r, isFullscreen: h })), void 0, !0)
1233
1233
  ]),
1234
1234
  key: "7"
1235
1235
  } : void 0,
1236
1236
  i.$slots.optionAnnotator ? {
1237
1237
  name: "optionAnnotator",
1238
1238
  fn: M(({ toggleAnnotator: r, isAnnotator: h }) => [
1239
- w(i.$slots, "optionAnnotator", B(H({ toggleAnnotator: r, isAnnotator: h })), void 0, !0)
1239
+ w(i.$slots, "optionAnnotator", H(B({ toggleAnnotator: r, isAnnotator: h })), void 0, !0)
1240
1240
  ]),
1241
1241
  key: "8"
1242
1242
  } : void 0
@@ -1600,7 +1600,7 @@ function Zi(i, l, o, u, t, e) {
1600
1600
  "font-size": t.fontSizes.dataLabels,
1601
1601
  "text-anchor": "middle",
1602
1602
  transform: `translate(${r.x - e.FINAL_CONFIG.chart.grid.labels.yAxis.labelWidth + 5}, ${t.mutableConfig.isStacked ? e.drawingArea.bottom - r.yOffset - r.individualHeight / 2 : e.drawingArea.top + e.drawingArea.height / 2}) rotate(-90)`
1603
- }, S(r.name) + " " + S(r.scaleLabel ? `- ${r.scaleLabel}` : ""), 9, Bt),
1603
+ }, S(r.name) + " " + S(r.scaleLabel ? `- ${r.scaleLabel}` : ""), 9, Ht),
1604
1604
  (a(!0), s(I, null, m(r.yLabels, (h, n) => (a(), s("line", {
1605
1605
  x1: r.x - 3 + e.xPadding,
1606
1606
  x2: r.x + e.xPadding,
@@ -1609,7 +1609,7 @@ function Zi(i, l, o, u, t, e) {
1609
1609
  stroke: r.color,
1610
1610
  "stroke-width": 1,
1611
1611
  "stroke-linecap": "round"
1612
- }, null, 8, Ht))), 256)),
1612
+ }, null, 8, Bt))), 256)),
1613
1613
  (a(!0), s(I, null, m(r.yLabels, (h, n) => (a(), s("text", {
1614
1614
  x: r.x - 5 + e.xPadding,
1615
1615
  y: e.checkNaN(h.y) + t.fontSizes.dataLabels / 3,
@@ -2144,7 +2144,7 @@ function Zi(i, l, o, u, t, e) {
2144
2144
  i.$slots["time-label"] ? (a(!0), s(I, { key: 0 }, m(e.timeLabels, (r, h) => (a(), s("g", {
2145
2145
  key: `time_label_${h}`
2146
2146
  }, [
2147
- w(i.$slots, "time-label", B(H({
2147
+ w(i.$slots, "time-label", H(B({
2148
2148
  x: e.drawingArea.left + e.drawingArea.width / e.maxSeries * h + e.drawingArea.width / e.maxSeries / 2,
2149
2149
  y: e.drawingArea.bottom + t.fontSizes.xAxis * 1.3 + e.FINAL_CONFIG.chart.grid.labels.xAxisLabels.yOffset,
2150
2150
  fontSize: t.fontSizes.xAxis,
@@ -2212,7 +2212,7 @@ function Zi(i, l, o, u, t, e) {
2212
2212
  w(i.$slots, "svg", { svg: e.svg }, void 0, !0)
2213
2213
  ], 14, Je)) : c("", !0),
2214
2214
  i.$slots.watermark ? (a(), s("div", Ri, [
2215
- w(i.$slots, "watermark", B(H({ isPrinting: t.isPrinting || t.isImaging })), void 0, !0)
2215
+ w(i.$slots, "watermark", H(B({ isPrinting: t.isPrinting || t.isImaging })), void 0, !0)
2216
2216
  ])) : c("", !0),
2217
2217
  e.isDataset ? c("", !0) : (a(), D(T, {
2218
2218
  key: 6,
@@ -2262,14 +2262,16 @@ function Zi(i, l, o, u, t, e) {
2262
2262
  "onUpdate:end": l[3] || (l[3] = (r) => t.slicer.end = r),
2263
2263
  refreshStartPoint: e.FINAL_CONFIG.chart.zoom.startIndex !== null ? e.FINAL_CONFIG.chart.zoom.startIndex : 0,
2264
2264
  refreshEndPoint: e.FINAL_CONFIG.chart.zoom.endIndex !== null ? e.FINAL_CONFIG.chart.zoom.endIndex + 1 : Math.max(...o.dataset.map((r) => e.largestTriangleThreeBucketsArray({ data: r.series, threshold: e.FINAL_CONFIG.downsample.threshold }).length)),
2265
+ enableRangeHandles: e.FINAL_CONFIG.chart.zoom.enableRangeHandles,
2266
+ enableSelectionDrag: e.FINAL_CONFIG.chart.zoom.enableSelectionDrag,
2265
2267
  onReset: e.refreshSlicer,
2266
2268
  onTrapMouse: e.selectMinimapIndex
2267
2269
  }, {
2268
2270
  "reset-action": M(({ reset: r }) => [
2269
- w(i.$slots, "reset-action", B(H({ reset: r })), void 0, !0)
2271
+ w(i.$slots, "reset-action", H(B({ reset: r })), void 0, !0)
2270
2272
  ]),
2271
2273
  _: 3
2272
- }, 8, ["background", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "borderColor", "minimap", "smoothMinimap", "minimapSelectedColor", "minimapSelectionRadius", "minimapLineColor", "minimapSelectedColorOpacity", "minimapSelectedIndex", "minimapIndicatorColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "onReset", "onTrapMouse"])) : c("", !0),
2274
+ }, 8, ["background", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "borderColor", "minimap", "smoothMinimap", "minimapSelectedColor", "minimapSelectionRadius", "minimapLineColor", "minimapSelectedColorOpacity", "minimapSelectedIndex", "minimapIndicatorColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag", "onReset", "onTrapMouse"])) : c("", !0),
2273
2275
  e.FINAL_CONFIG.chart.legend.show ? (a(), s("div", {
2274
2276
  key: 8,
2275
2277
  ref: "chartLegend",
@@ -2281,7 +2283,7 @@ function Zi(i, l, o, u, t, e) {
2281
2283
  onClick: (n) => e.segregate(r),
2282
2284
  class: V({ "vue-ui-xy-legend-item": !0, "vue-ui-xy-legend-item-segregated": t.segregatedSeries.includes(r.id) })
2283
2285
  }, [
2284
- t.icons[r.type] === "line" ? (a(), s("svg", Bi, [
2286
+ t.icons[r.type] === "line" ? (a(), s("svg", Hi, [
2285
2287
  f("rect", {
2286
2288
  x: "0",
2287
2289
  y: "7.5",
@@ -2291,7 +2293,7 @@ function Zi(i, l, o, u, t, e) {
2291
2293
  height: "3",
2292
2294
  width: "20",
2293
2295
  fill: r.color
2294
- }, null, 8, Hi),
2296
+ }, null, 8, Bi),
2295
2297
  X(b, {
2296
2298
  plot: { x: 10, y: 9 },
2297
2299
  radius: 4,
@@ -2345,10 +2347,10 @@ function Zi(i, l, o, u, t, e) {
2345
2347
  isCustom: e.FINAL_CONFIG.chart.tooltip.customFormat && typeof e.FINAL_CONFIG.chart.tooltip.customFormat == "function"
2346
2348
  }, {
2347
2349
  "tooltip-before": M(() => [
2348
- w(i.$slots, "tooltip-before", B(H({ ...e.dataTooltipSlot })), void 0, !0)
2350
+ w(i.$slots, "tooltip-before", H(B({ ...e.dataTooltipSlot })), void 0, !0)
2349
2351
  ]),
2350
2352
  "tooltip-after": M(() => [
2351
- w(i.$slots, "tooltip-after", B(H({ ...e.dataTooltipSlot })), void 0, !0)
2353
+ w(i.$slots, "tooltip-after", H(B({ ...e.dataTooltipSlot })), void 0, !0)
2352
2354
  ]),
2353
2355
  _: 3
2354
2356
  }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
@@ -2373,7 +2375,7 @@ function Zi(i, l, o, u, t, e) {
2373
2375
  style: L(`${t.isPrinting ? "" : "max-height:400px"};overflow:auto;width:100%;margin-top:48px`)
2374
2376
  }, [
2375
2377
  f("div", qi, [
2376
- He(f("input", {
2378
+ Be(f("input", {
2377
2379
  type: "checkbox",
2378
2380
  "onUpdate:modelValue": l[4] || (l[4] = (r) => t.showSparklineTable = r)
2379
2381
  }, null, 512), [
@@ -2422,7 +2424,7 @@ function Zi(i, l, o, u, t, e) {
2422
2424
  }, 8, ["config"])) : c("", !0)
2423
2425
  ], 46, Ue);
2424
2426
  }
2425
- const dr = /* @__PURE__ */ Ye(qe, [["render", Zi], ["__scopeId", "data-v-953140c3"]]);
2427
+ const dr = /* @__PURE__ */ Ye(qe, [["render", Zi], ["__scopeId", "data-v-03fbeffe"]]);
2426
2428
  export {
2427
2429
  dr as default
2428
2430
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),u=require("./index-CC7tVh7F.cjs"),c=require("./useResponsive-BJ7DTGpm.cjs"),ot=require("./Tooltip-C5qSWrXO.cjs"),rt=require("./Legend-CAgxjrra.cjs"),nt=require("./Title-BhL7TMa_.cjs"),ut=require("./Slicer-BggxvZRw.cjs"),Ee=require("./usePrinter-CMvfTteH.cjs"),st=require("./vue-ui-accordion-IZgkGqto.cjs"),it=require("./DataTable-BLSMgcEN.cjs"),ct=require("./vue-ui-skeleton-BgEjqaz9.cjs"),Ne=require("./useNestedProp-CxwPeWts.cjs"),vt=require("./PenAndPaper-CYFIR9j7.cjs"),dt=require("./useUserOptionState-BgepsfED.cjs"),ht=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ft=["id"],yt=["onClick"],gt={key:2,class:"vue-data-ui-watermark"},pt=["innerHTML"],mt={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(re,{expose:Be,emit:Fe}){const p=re,{vue_ui_xy_canvas:De}=u.useConfig(),Z=l.ref(u.createUid()),N=l.ref(null),S=l.ref(null),B=l.ref(null),i=l.ref(null),g=l.ref(1),T=l.ref(1),H=l.ref(!1),f=l.ref(null),V=l.ref(""),ne=l.ref(null),C=l.ref([]),O=l.ref(1),M=l.ref(!0),z=l.ref(!0),G=l.ref(null),ue=l.ref(0),se=l.ref(0),U=l.ref(!1),ie=l.ref(null),ce=l.ref(null),ve=l.ref(null),de=l.ref(null),j=l.ref(0),J=l.ref(0),K=l.ref(0),Q=l.computed(()=>!!p.dataset&&p.dataset.length),Ae=l.useSlots();l.onMounted(()=>{Ae["chart-background"]&&console.warn("VueUiXyCanvas does not support the #chart-background slot.")});const t=l.computed({get:()=>ye(),set:e=>e}),{userOptionsVisible:ee,setUserOptionsVisibility:he,keepUserOptionState:fe}=dt.useUserOptionState({config:t.value});function ye(){const e=Ne.useNestedProp({userConfig:p.config,defaultConfig:De});let a={};return e.theme?a={...Ne.useNestedProp({userConfig:u.themes.vue_ui_xy_canvas[e.theme]||p.config,defaultConfig:e}),customPalette:u.themePalettes[e.theme]||u.palette}:a=e,p.config&&u.hasDeepProperty(p.config,"style.chart.scale.min")?a.style.chart.scale.min=p.config.style.chart.scale.min:a.style.chart.scale.min=null,p.config&&u.hasDeepProperty(p.config,"style.chart.scale.max")?a.style.chart.scale.max=p.config.style.chart.scale.max:a.style.chart.scale.max=null,p.config&&u.hasDeepProperty(p.config,"style.chart.zoom.startIndex")?a.style.chart.zoom.startIndex=p.config.style.chart.zoom.startIndex:a.style.chart.zoom.startIndex=null,p.config&&u.hasDeepProperty(p.config,"style.chart.zoom.endIndex")?a.style.chart.zoom.endIndex=p.config.style.chart.zoom.endIndex:a.style.chart.zoom.endIndex=null,a}l.watch(()=>p.config,e=>{t.value=ye(),ee.value=!t.value.showOnChartHover,le(),j.value+=1,J.value+=1,K.value+=1},{deep:!0}),l.watch(()=>p.dataset,()=>{le(),j.value+=1,J.value+=1,K.value+=1},{deep:!0});const ge=l.ref(t.value.style.chart.aspectRatio),{isPrinting:pe,isImaging:me,generatePdf:be,generateImage:xe}=Ee.usePrinter({elementId:`xy_canvas_${Z.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas"}),s=l.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function He(e){U.value=e,se.value+=1}const ke=l.computed(()=>u.convertCustomPalette(t.value.customPalette)),w=l.computed(()=>R.value?Math.max(...R.value.filter((e,a)=>!C.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),o=l.computed(()=>{const e=g.value-g.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:g.value,canvasHeight:T.value,left:g.value*t.value.style.chart.paddingProportions.left,top:T.value*t.value.style.chart.paddingProportions.top,right:g.value-g.value*t.value.style.chart.paddingProportions.right,bottom:T.value-T.value*t.value.style.chart.paddingProportions.bottom,width:e,height:T.value-T.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(n.value.end-n.value.start)}});function Le(e,a){return e/a}function Ve({hasAutoScale:e,series:a,min:r,max:d,scale:h,yOffset:m,individualHeight:v,stackIndex:b=null}){return a.map((L,oe)=>{const $=h.min<0?Math.abs(h.min):0,I=Le(L+$,$+h.max);let P,F;e&&(P=Math.abs(h.min),F=Le(L+P,h.max+P));let D=0;return b===null?D=o.value.bottom-o.value.height*(e?F:I):D=o.value.bottom-m-v*(e?F:I),{x:o.value.left+o.value.slot*oe+o.value.slot/2,y:D,value:L}})}const x=l.computed(()=>{const e=t.value.style.chart.scale.min!==null?t.value.style.chart.scale.min:Math.min(...R.value.filter((v,b)=>!C.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(n.value.start,n.value.end))),a=t.value.style.chart.scale.max!==null?t.value.style.chart.scale.max:Math.max(...R.value.filter((v,b)=>!C.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(n.value.start,n.value.end))),r=u.calculateNiceScale(e<0?e:0,a===e?e+1<0?0:e+1:a<0?0:a,t.value.style.chart.scale.ticks),d=r.min<0?Math.abs(r.min):0,h=o.value.bottom-o.value.height*(d/(r.max+d)),m=r.ticks.map(v=>({y:o.value.bottom-o.value.height*((v+d)/(r.max+d)),x:o.value.left-8,value:v}));return{absoluteMin:d,max:a,min:e,scale:r,yLabels:m,zero:h}}),Ue=l.computed(()=>y.value.map(e=>`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),u=require("./index-D-xYtUSL.cjs"),c=require("./useResponsive-BJ7DTGpm.cjs"),ot=require("./Tooltip-Cz3eQmMV.cjs"),rt=require("./Legend-DIfEhYtz.cjs"),nt=require("./Title-DuMgnso9.cjs"),ut=require("./Slicer-C9bF7-B-.cjs"),Ee=require("./usePrinter-pT-a_sFr.cjs"),st=require("./vue-ui-accordion-B1MkyNta.cjs"),it=require("./DataTable-DnrSae6c.cjs"),ct=require("./vue-ui-skeleton-D3zg7qd2.cjs"),Ne=require("./useNestedProp-BN-VfUfj.cjs"),vt=require("./PenAndPaper-C6I0ckZw.cjs"),dt=require("./useUserOptionState-BgepsfED.cjs"),ht=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ft=["id"],yt=["onClick"],gt={key:2,class:"vue-data-ui-watermark"},pt=["innerHTML"],mt={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(re,{expose:Be,emit:De}){const p=re,{vue_ui_xy_canvas:Fe}=u.useConfig(),Z=l.ref(u.createUid()),N=l.ref(null),S=l.ref(null),B=l.ref(null),i=l.ref(null),g=l.ref(1),T=l.ref(1),H=l.ref(!1),f=l.ref(null),V=l.ref(""),ne=l.ref(null),C=l.ref([]),O=l.ref(1),M=l.ref(!0),z=l.ref(!0),G=l.ref(null),ue=l.ref(0),se=l.ref(0),U=l.ref(!1),ie=l.ref(null),ce=l.ref(null),ve=l.ref(null),de=l.ref(null),j=l.ref(0),J=l.ref(0),K=l.ref(0),Q=l.computed(()=>!!p.dataset&&p.dataset.length),Ae=l.useSlots();l.onMounted(()=>{Ae["chart-background"]&&console.warn("VueUiXyCanvas does not support the #chart-background slot.")});const t=l.computed({get:()=>ye(),set:e=>e}),{userOptionsVisible:ee,setUserOptionsVisibility:he,keepUserOptionState:fe}=dt.useUserOptionState({config:t.value});function ye(){const e=Ne.useNestedProp({userConfig:p.config,defaultConfig:Fe});let a={};return e.theme?a={...Ne.useNestedProp({userConfig:u.themes.vue_ui_xy_canvas[e.theme]||p.config,defaultConfig:e}),customPalette:u.themePalettes[e.theme]||u.palette}:a=e,p.config&&u.hasDeepProperty(p.config,"style.chart.scale.min")?a.style.chart.scale.min=p.config.style.chart.scale.min:a.style.chart.scale.min=null,p.config&&u.hasDeepProperty(p.config,"style.chart.scale.max")?a.style.chart.scale.max=p.config.style.chart.scale.max:a.style.chart.scale.max=null,p.config&&u.hasDeepProperty(p.config,"style.chart.zoom.startIndex")?a.style.chart.zoom.startIndex=p.config.style.chart.zoom.startIndex:a.style.chart.zoom.startIndex=null,p.config&&u.hasDeepProperty(p.config,"style.chart.zoom.endIndex")?a.style.chart.zoom.endIndex=p.config.style.chart.zoom.endIndex:a.style.chart.zoom.endIndex=null,a}l.watch(()=>p.config,e=>{t.value=ye(),ee.value=!t.value.showOnChartHover,le(),j.value+=1,J.value+=1,K.value+=1},{deep:!0}),l.watch(()=>p.dataset,()=>{le(),j.value+=1,J.value+=1,K.value+=1},{deep:!0});const ge=l.ref(t.value.style.chart.aspectRatio),{isPrinting:pe,isImaging:me,generatePdf:be,generateImage:xe}=Ee.usePrinter({elementId:`xy_canvas_${Z.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas"}),s=l.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function He(e){U.value=e,se.value+=1}const ke=l.computed(()=>u.convertCustomPalette(t.value.customPalette)),w=l.computed(()=>R.value?Math.max(...R.value.filter((e,a)=>!C.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),o=l.computed(()=>{const e=g.value-g.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:g.value,canvasHeight:T.value,left:g.value*t.value.style.chart.paddingProportions.left,top:T.value*t.value.style.chart.paddingProportions.top,right:g.value-g.value*t.value.style.chart.paddingProportions.right,bottom:T.value-T.value*t.value.style.chart.paddingProportions.bottom,width:e,height:T.value-T.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(n.value.end-n.value.start)}});function Le(e,a){return e/a}function Ve({hasAutoScale:e,series:a,min:r,max:d,scale:h,yOffset:m,individualHeight:v,stackIndex:b=null}){return a.map((L,oe)=>{const $=h.min<0?Math.abs(h.min):0,I=Le(L+$,$+h.max);let P,D;e&&(P=Math.abs(h.min),D=Le(L+P,h.max+P));let F=0;return b===null?F=o.value.bottom-o.value.height*(e?D:I):F=o.value.bottom-m-v*(e?D:I),{x:o.value.left+o.value.slot*oe+o.value.slot/2,y:F,value:L}})}const x=l.computed(()=>{const e=t.value.style.chart.scale.min!==null?t.value.style.chart.scale.min:Math.min(...R.value.filter((v,b)=>!C.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(n.value.start,n.value.end))),a=t.value.style.chart.scale.max!==null?t.value.style.chart.scale.max:Math.max(...R.value.filter((v,b)=>!C.value.includes(v.absoluteIndex)).flatMap(v=>v.series.slice(n.value.start,n.value.end))),r=u.calculateNiceScale(e<0?e:0,a===e?e+1<0?0:e+1:a<0?0:a,t.value.style.chart.scale.ticks),d=r.min<0?Math.abs(r.min):0,h=o.value.bottom-o.value.height*(d/(r.max+d)),m=r.ticks.map(v=>({y:o.value.bottom-o.value.height*((v+d)/(r.max+d)),x:o.value.left-8,value:v}));return{absoluteMin:d,max:a,min:e,scale:r,yLabels:m,zero:h}}),Ue=l.computed(()=>y.value.map(e=>`
2
2
  <div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
3
3
  <svg viewBox="0 0 10 10" height="12" width="12">
4
4
  <circle cx="5" cy="5" r="5" fill="${e.color}"/>
@@ -6,4 +6,4 @@
6
6
  <span>${e.name?e.name+": ":""}</span>
7
7
  <span>${u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.series[f.value],u.dataLabel({p:e.prefix||"",v:e.series[f.value],s:e.suffix||"",r:e.rounding||0}),{datapoint:e,seriesIndex:f.value})}</span>
8
8
  </div>
9
- `)),R=l.computed(()=>p.dataset.map((e,a)=>({...e,series:u.largestTriangleThreeBucketsArray({data:u.sanitizeArray(e.series),threshold:t.value.downsample.threshold}),absoluteIndex:a,color:u.convertColorToHex(e.color||ke.value[a]||u.palette[a]||u.palette[a%u.palette.length])})));l.watch(w,e=>{e&&Ce()});const y=l.computed(()=>u.assignStackRatios(R.value.filter((e,a)=>!C.value.includes(e.absoluteIndex))).map((e,a)=>({...e,series:e.series.slice(n.value.start,n.value.end)})).map((e,a)=>{let r=[null,void 0].includes(e.scaleMin)?Math.min(...e.series)||0:e.scaleMin,d=[null,void 0].includes(e.scaleMax)?Math.max(...e.series)||1:e.scaleMax;r===d&&(r=r>=0?d-1:r,d=d>=0?d:r+1);const m={ratios:e.series.filter(A=>![null,void 0].includes(A)).map(A=>(A-r)/(d-r)),valueMin:r,valueMax:d},v=e.scaleSteps||t.value.style.chart.scale.ticks;let b;e.autoScaling?b=u.calculateNiceScale(m.valueMin,m.valueMax,v):b=u.calculateNiceScale(m.valueMin<0?m.valueMin:0,m.valueMax<=0?0:m.valueMax,v);const L=s.value.stacked?o.value.height*(1-e.cumulatedStackRatio):0,oe=s.value.stacked?o.value.height/t.value.style.chart.stackGap:0,$=s.value.stacked?o.value.height*e.stackRatio-oe:o.value.height,I=b.min<0?Math.abs(b.min):0;let P;e.autoScaling&&s.value.stacked&&d<=0?P=o.value.bottom-L-$:P=o.value.bottom-L-$*(I/(b.max+I));const F=b.ticks.map((A,at)=>({y:o.value.bottom-L-$*(at/(b.ticks.length-1)),x:o.value.left-8,value:A})),D=Ve({hasAutoScale:s.value.stacked&&e.autoScaling,series:e.series,min:s.value.stacked?r:x.value.min,max:s.value.stacked?d:x.value.max,scale:s.value.stacked?b:x.value.scale,yOffset:L,individualHeight:$,stackIndex:s.value.stacked?a:null});return{...e,coordinatesLine:D,min:r,max:d,localScale:b,localZero:P,localMin:I,localYLabels:F,yOffset:L,individualHeight:$}})),n=l.ref({start:0,end:w.value});function Ce(){we()}const E=l.ref(null);async function we(){(t.value.style.chart.zoom.startIndex!==null||t.value.style.chart.zoom.endIndex!==null)&&E.value?(t.value.style.chart.zoom.startIndex!==null&&(await l.nextTick(),await l.nextTick(),E.value&&E.value.setStartValue(t.value.style.chart.zoom.startIndex)),t.value.style.chart.zoom.endIndex!==null&&(await l.nextTick(),await l.nextTick(),E.value&&E.value.setEndValue(_e(t.value.style.chart.zoom.endIndex+1)))):(n.value={start:0,end:w.value},ue.value+=1)}function _e(e){const a=w.value;return e>a?a:e<0||t.value.style.chart.zoom.startIndex!==null&&e<t.value.style.chart.zoom.startIndex?t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex+1:1:e}const qe=l.computed(()=>y.value.filter(e=>["line","plot",void 0].includes(e.type))),k=l.computed(()=>y.value.filter(e=>e.type==="bar"));function We(){if(!S.value)return;const e=B.value.offsetWidth,a=B.value.offsetHeight;S.value.width=e*O.value*2,S.value.height=a*O.value*2,g.value=e*O.value*2,T.value=a*O.value*2,i.value.scale(O.value,O.value),te()}function Xe(){if(i.value.clearRect(0,0,1e4,1e4),i.value.fillStyle=t.value.style.chart.backgroundColor,i.value.fillRect(0,0,o.value.canvasWidth,o.value.canvasHeight),s.value.stacked)t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength?y.value.forEach(e=>{for(let a=0;a<n.value.end-n.value.start+1;a+=1)c.line(i.value,[{x:o.value.left+o.value.slot*a,y:o.value.bottom-e.yOffset-e.individualHeight},{x:o.value.left+o.value.slot*a,y:o.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}):t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength&&y.value.forEach(e=>{for(let a=n.value.start;a<n.value.end;a+=1)a%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&c.line(i.value,[{x:o.value.left+o.value.slot*(a-n.value.start)+o.value.slot/2,y:o.value.bottom-e.yOffset-e.individualHeight},{x:o.value.left+o.value.slot*(a-n.value.start)+o.value.slot/2,y:o.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}),t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?y.value.forEach(e=>{e.localYLabels.forEach((a,r)=>{r<e.localYLabels.length-1&&c.rect(i.value,[{x:o.value.left,y:a.y},{x:o.value.right,y:a.y},{x:o.value.right,y:e.localYLabels[r+1].y},{x:o.value.left,y:e.localYLabels[r+1].y}],{fillColor:r%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})})}):y.value.forEach(e=>{e.localYLabels.slice(n.value.start,n.value.end).forEach(a=>{c.line(i.value,[{x:o.value.left,y:a.y},{x:o.value.right,y:a.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})})),t.value.style.chart.grid.zeroLine.show&&y.value.forEach(e=>{c.line(i.value,[{x:o.value.left,y:e.localZero},{x:o.value.right,y:e.localZero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]})}),t.value.style.chart.grid.y.axisLabels.show&&y.value.forEach(e=>{c.line(i.value,[{x:o.value.left,y:o.value.bottom-e.yOffset},{x:o.value.left,y:o.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),c.line(i.value,[{x:o.value.right,y:o.value.bottom-e.yOffset},{x:o.value.right,y:o.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),e.localYLabels.forEach((a,r)=>{c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,a.value,u.dataLabel({p:e.prefix||t.value.style.chart.grid.y.axisLabels.prefix||"",v:a.value,s:e.suffix||t.value.style.chart.grid.y.axisLabels.suffix||"",r:e.rounding||t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:a,seriesIndex:r}),a.x+t.value.style.chart.grid.y.axisLabels.offsetX,a.y,{align:"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:e.color})})}),y.value.forEach(e=>{c.text(i.value,e.name,g.value/35,o.value.bottom-e.yOffset-e.individualHeight/2,{align:"center",rotation:-90,color:e.color,font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`})});else{if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=0;e<n.value.end-n.value.start+1;e+=1)c.line(i.value,[{x:o.value.left+o.value.slot*e,y:o.value.top},{x:o.value.left+o.value.slot*e,y:o.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});else if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=n.value.start;e<n.value.end;e+=1)e%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&c.line(i.value,[{x:o.value.left+o.value.slot*(e-n.value.start)+o.value.slot/2,y:o.value.top},{x:o.value.left+o.value.slot*(e-n.value.start)+o.value.slot/2,y:o.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?x.value.yLabels.forEach((e,a)=>{a<x.value.yLabels.length-1&&c.rect(i.value,[{x:o.value.left,y:e.y},{x:o.value.right,y:e.y},{x:o.value.right,y:x.value.yLabels[a+1].y},{x:o.value.left,y:x.value.yLabels[a+1].y}],{fillColor:a%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})}):x.value.yLabels.forEach(e=>{c.line(i.value,[{x:o.value.left,y:e.y},{x:o.value.right,y:e.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})),t.value.style.chart.grid.y.showAxis&&c.line(i.value,[{x:o.value.left,y:o.value.top},{x:o.value.left,y:o.value.bottom}],{color:t.value.style.chart.grid.y.axisColor,lineWidth:t.value.style.chart.grid.y.axisThickness}),t.value.style.chart.grid.x.showAxis&&c.line(i.value,[{x:o.value.left,y:o.value.bottom},{x:o.value.right,y:o.value.bottom}],{color:t.value.style.chart.grid.x.axisColor,lineWidth:t.value.style.chart.grid.x.axisThickness}),t.value.style.chart.grid.zeroLine.show&&c.line(i.value,[{x:o.value.left,y:x.value.zero},{x:o.value.right,y:x.value.zero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]}),t.value.style.chart.grid.y.axisLabels.show&&x.value.yLabels.forEach((e,a)=>{c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.value,u.dataLabel({p:t.value.style.chart.grid.y.axisLabels.prefix||"",v:e.value,s:t.value.style.chart.grid.y.axisLabels.suffix||"",r:t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:e,seriesIndex:a}),e.x+t.value.style.chart.grid.y.axisLabels.offsetX,e.y,{align:"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.grid.y.axisLabels.color})})}t.value.style.chart.grid.y.axisName&&c.text(i.value,t.value.style.chart.grid.y.axisName,g.value-g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio*1.2,o.value.bottom-o.value.height/2,{font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center",rotation:90}),t.value.style.chart.grid.x.axisName&&c.text(i.value,t.value.style.chart.grid.x.axisName,g.value/2,T.value,{font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center"})}function Ye(e){for(let a=0;a<e.coordinatesLine.length;a+=1){const r=(f.value===a?g.value/150:t.value.style.chart.line.plots.show?g.value/200:0)*t.value.style.chart.line.plots.radiusRatio;c.circle(i.value,{x:e.coordinatesLine[a].x,y:e.coordinatesLine[a].y},r,{color:t.value.style.chart.backgroundColor,fillStyle:e.color,strokeColor:"transparent"})}}function Ze(e){for(let a=0;a<e.coordinatesLine.length;a+=1)c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[a].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[a].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[a],seriesIndex:a}),e.coordinatesLine[a].x,e.coordinatesLine[a].y+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(g.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color,strokeColor:t.value.style.chart.backgroundColor,lineWidth:.8})}function Ge(){for(let e=n.value.start;e<n.value.end;e+=1)(n.value.end-n.value.start<t.value.style.chart.grid.y.timeLabels.modulo||n.value.end-n.value.start>=t.value.style.chart.grid.y.timeLabels.modulo&&(e%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0||e===f.value+n.value.start))&&c.text(i.value,t.value.style.chart.grid.y.timeLabels.values[e]||e+1,o.value.left+o.value.slot*(e-n.value.start)+o.value.slot/2,o.value.bottom+g.value/t.value.style.chart.grid.y.timeLabels.offsetY,{align:t.value.style.chart.grid.y.timeLabels.rotation===0?"center":t.value.style.chart.grid.y.timeLabels.rotation>0?"left":"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.timeLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:u.setOpacity(t.value.style.chart.grid.y.timeLabels.color,f.value!==null?f.value+n.value.start===e?100:20:100),rotation:t.value.style.chart.grid.y.timeLabels.rotation})}function Se(){c.line(i.value,[{x:o.value.left+o.value.slot*f.value+o.value.slot/2,y:o.value.top},{x:o.value.left+o.value.slot*f.value+o.value.slot/2,y:o.value.bottom}],{color:t.value.style.chart.selector.color,lineDash:t.value.style.chart.selector.dashed?[8,8]:[0,0],lineWidth:2,linceCap:"round"})}function je(){k.value.forEach((e,a)=>{for(let r=0;r<e.coordinatesLine.length;r+=1)c.rect(i.value,[{x:o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a)),y:s.value.stacked?e.localZero:x.value.zero},{x:o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a))+o.value.slot*.8/(s.value.stacked?1:k.value.length),y:s.value.stacked?e.localZero:x.value.zero},{x:o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a))+o.value.slot*.8/(s.value.stacked?1:k.value.length),y:e.coordinatesLine[r].y},{x:o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a)),y:e.coordinatesLine[r].y}],{strokeColor:t.value.style.chart.backgroundColor,gradient:{type:"linear",start:{x:e.coordinatesLine[r].x,y:e.coordinatesLine[r].y},end:{x:e.coordinatesLine[r].x,y:s.value.stacked?e.localZero:x.value.zero},stops:[{offset:0,color:e.color},{offset:1,color:u.lightenHexColor(e.color,.5)}]}}),s.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[r].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[r].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[r],seriesIndex:r}),o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a))+o.value.slot*.4/(s.value.stacked?1:k.value.length),(e.coordinatesLine[r].value<0?s.value.stacked?e.localZero:x.value.zero:e.coordinatesLine[r].y)+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(g.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color,strokeColor:t.value.style.chart.backgroundColor,lineWidth:.8})})}function Je(e){e.useArea?s.value.stacked?c.polygon(i.value,[{x:e.coordinatesLine[0].x,y:e.localZero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:e.localZero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):c.polygon(i.value,[{x:e.coordinatesLine[0].x,y:x.value.zero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:x.value.zero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):c.line(i.value,e.coordinatesLine,{color:e.color,lineWidth:3})}function Ke(){y.value.forEach((e,a)=>{c.line(i.value,[{x:o.value.left,y:o.value.bottom-e.yOffset},{x:o.value.right,y:o.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.x.horizontalLines.color,lineWidth:1})})}function te(){Xe(),M.value?(z.value&&f.value!==null&&t.value.style.chart.selector.show&&Se(),je(),s.value.stacked&&t.value.style.chart.grid.x.showAxis&&Ke(),qe.value.forEach(e=>{(e.type==="line"||!e.type)&&Je(e),z.value&&(Ye(e),s.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&Ze(e))}),G.value=c.cloneCanvas(S.value)):(G.value&&(i.value.clearRect(0,0,1e4,1e4),i.value.drawImage(G.value,0,0)),z.value&&f.value!==null&&t.value.style.chart.selector.show&&Se(),z.value&&f.value!==null&&y.value.forEach(e=>{if(e.type==="line"||!e.type||e.type==="plot"){if(!e.coordinatesLine[f.value])return;e.coordinatesLine[f.value].x!==void 0&&e.coordinatesLine[f.value].y!==void 0&&c.circle(i.value,{x:e.coordinatesLine[f.value].x,y:e.coordinatesLine[f.value].y},g.value/150*t.value.style.chart.line.plots.radiusRatio,{color:t.value.style.chart.backgroundColor,fillStyle:e.color,strokeColor:"transparent"})}})),t.value.style.chart.grid.y.timeLabels.show&&Ge(),M.value=!1}const _=c.debounce(()=>{z.value=!0,We()},w.value>200?10:1,!z.value);function Qe(e){const{left:a}=S.value.getBoundingClientRect(),r=e.clientX-a;if(r*2<o.value.left||r*2>o.value.right){H.value=!1,f.value=null;return}const d=r*2-o.value.left;if(f.value=Math.floor(d/o.value.slot),H.value=!0,!z.value)return;let h="";const m=t.value.style.chart.tooltip.customFormat;u.isFunction(m)&&u.functionReturnsString(()=>m({seriesIndex:f.value,datapoint:y.value.map(v=>({shape:v.shape||null,name:v.name,color:v.color,type:v.type||"line",value:v.series.find((b,L)=>L===f.value)})),series:y.value,config:t.value}))?V.value=m({seriesIndex:f.value,datapoint:y.value.map(v=>({shape:v.shape||null,name:v.name,color:v.color,type:v.type||"line",value:v.series.find((b,L)=>L===f.value)})),series:y.value,config:t.value}):(t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[f.value]&&(h+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; width:100%">${t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[f.value]}</div>`),h+=Ue.value.join(""),V.value=h),z.value=!1}l.watch(()=>f.value,e=>{_()}),l.watch(()=>n.value,e=>{M.value=!0,te()},{deep:!0}),l.watch(()=>s.value.showDataLabels,e=>{M.value=!0,te()}),l.watch(()=>s.value.stacked,e=>{M.value=!0,z.value=!0,_()});function et(){H.value=!1,f.value=null,V.value=""}const q=l.ref(null),W=l.ref(null);l.onMounted(()=>{le()});function le(){if(u.objectIsEmpty(p.dataset)?u.error({componentName:"VueUiXyCanvas",type:"dataset"}):S.value&&(i.value=S.value.getContext("2d",{willReadFrequently:!0})),t.value.responsive){const e=c.throttle(()=>{const{width:a,height:r}=c.useResponsive({chart:N.value,title:t.value.style.chart.title.text?ie.value:null,legend:t.value.style.chart.legend.show?ce.value:null,slicer:t.value.style.chart.zoom.show&&w.value>1?ve.value:null,source:de.value});ge.value=`${a} / ${r}`});q.value=new ResizeObserver(e),q.value.observe(N.value.parentNode)}W.value=new ResizeObserver(e=>{for(const a of e)a.contentBoxSize&&B.value&&(M.value=!0,_())}),W.value.observe(B.value),we()}l.onBeforeUnmount(()=>{W.value&&W.value.disconnect(),q.value&&q.value.disconnect()});function ze(e){Fe("selectLegend",y.value.find(a=>a.absoluteIndex===e)),C.value.includes(e)?C.value=C.value.filter(a=>a!==e):C.value.push(e),M.value=!0,_()}const $e=l.computed(()=>R.value.map((e,a)=>({...e,name:e.name,color:u.convertColorToHex(e.color)||ke.value[a]||u.palette[a]||u.palette[a%u.palette.length],shape:e.shape||"circle",prefix:e.prefix||"",suffix:e.suffix||"",rounding:e.rounding||0})).map(e=>({...e,opacity:C.value.includes(e.absoluteIndex)?.5:1,segregate:()=>ze(e.absoluteIndex),isSegregated:C.value.includes(e.absoluteIndex)}))),tt=l.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),X=l.computed(()=>{const e=[""].concat(y.value.map(h=>h.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');let a=[];for(let h=0;h<w.value;h+=1){const m=y.value.map(v=>v.series[h]??0).reduce((v,b)=>v+b,0);a.push([t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[h]??h+1].concat(y.value.map(v=>(v.series[h]??0).toFixed(t.value.table.rounding))).concat((m??0).toFixed(t.value.table.rounding)))}const r={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},d=[t.value.table.columnNames.period].concat(y.value.map(h=>h.name)).concat(t.value.table.columnNames.total);return{head:e,body:a.slice(0,n.value.end-n.value.start),config:r,colNames:d}}),Te=l.computed(()=>{if(y.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const e=y.value.map(r=>({label:r.name,color:r.color,type:r.type})),a=[];for(let r=n.value.start;r<n.value.end;r+=1){const d=[t.value.style.chart.grid.y.timeLabels.values[r]||r+1];y.value.forEach(h=>{d.push(Number((h.series[r]||0).toFixed(t.value.table.rounding)))}),a.push(d)}return{head:e,body:a}});function Ie(){const e=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=["",...Te.value.head.map(m=>m.label)],r=Te.value.body,d=e.concat([a]).concat(r),h=u.createCsvContent(d);u.downloadCsv({csvContent:h,title:t.value.style.chart.title.text||"vue-ui-xy-canvas"})}function lt(){return y.value}function Pe(){s.value.showTable=!s.value.showTable}function Me(){s.value.showDataLabels=!s.value.showDataLabels}function Oe(){s.value.stacked=!s.value.stacked}function Re(){s.value.showTooltip=!s.value.showTooltip}const Y=l.ref(!1);function ae(){Y.value=!Y.value}return Be({getData:lt,generateCsv:Ie,generatePdf:be,generateImage:xe,toggleTable:Pe,toggleLabels:Me,toggleStack:Oe,toggleTooltip:Re,toggleAnnotator:ae}),(e,a)=>(l.openBlock(),l.createElementBlock("div",{style:l.normalizeStyle(`width:100%; position:relative; ${t.value.responsive?"height: 100%":""}`),ref_key:"xy",ref:N,id:`xy_canvas_${Z.value}`,class:l.normalizeClass(`vue-ui-donut ${U.value?"vue-data-ui-wrapper-fullscreen":""}`),onMouseenter:a[5]||(a[5]=()=>l.unref(he)(!0)),onMouseleave:a[6]||(a[6]=()=>l.unref(he)(!1))},[t.value.style.chart.title.text?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:ie,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};`)},[(l.openBlock(),l.createBlock(nt._sfc_main,{key:`title_${j.value}`,config:{title:{cy:"xy-canvas-title",...t.value.style.chart.title},subtitle:{cy:"xy-canvas-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):l.createCommentVNode("",!0),t.value.userOptions.show&&Q.value&&(l.unref(fe)||l.unref(ee))?(l.openBlock(),l.createBlock(Ee.UserOptions,{ref:"details",key:`user_option_${se.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:l.unref(pe),isImaging:l.unref(me),uid:Z.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasLabel:t.value.userOptions.buttons.labels,hasStack:re.dataset.length>1&&t.value.userOptions.buttons.stack,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasTable:n.value.end-n.value.start<200&&t.value.userOptions.buttons.table,isFullscreen:U.value,isTooltip:s.value.showTooltip,isStacked:s.value.stacked,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:Y.value,onToggleFullscreen:He,onGeneratePdf:l.unref(be),onGenerateCsv:Ie,onGenerateImage:l.unref(xe),onToggleTable:Pe,onToggleLabels:Me,onToggleStack:Oe,onToggleTooltip:Re,onToggleAnnotator:ae,style:l.normalizeStyle({visibility:l.unref(fe)?l.unref(ee)?"visible":"hidden":"visible"})},l.createSlots({_:2},[e.$slots.optionTooltip?{name:"optionTooltip",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,e.$slots.optionPdf?{name:"optionPdf",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,e.$slots.optionCsv?{name:"optionCsv",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,e.$slots.optionImg?{name:"optionImg",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,e.$slots.optionTable?{name:"optionTable",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,e.$slots.optionLabels?{name:"optionLabels",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,e.$slots.optionStack?{name:"optionStack",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionStack",{},void 0,!0)]),key:"6"}:void 0,e.$slots.optionFullscreen?{name:"optionFullscreen",fn:l.withCtx(({toggleFullscreen:r,isFullscreen:d})=>[l.renderSlot(e.$slots,"optionFullscreen",l.normalizeProps(l.guardReactiveProps({toggleFullscreen:r,isFullscreen:d})),void 0,!0)]),key:"7"}:void 0,e.$slots.optionAnnotator?{name:"optionAnnotator",fn:l.withCtx(({toggleAnnotator:r,isAnnotator:d})=>[l.renderSlot(e.$slots,"optionAnnotator",l.normalizeProps(l.guardReactiveProps({toggleAnnotator:r,isAnnotator:d})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasLabel","hasStack","hasFullscreen","hasTable","isFullscreen","isTooltip","isStacked","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):l.createCommentVNode("",!0),l.createElementVNode("div",{class:"vue-ui-xy-canvas",style:l.normalizeStyle(`position: relative; aspect-ratio: ${ge.value}`),ref_key:"container",ref:B},[Q.value?(l.openBlock(),l.createElementBlock("canvas",{key:0,ref_key:"canvas",ref:S,style:{width:"100%",height:"100%"},onMousemove:a[0]||(a[0]=r=>Qe(r)),onMouseleave:et},null,544)):(l.openBlock(),l.createBlock(ct.default,{key:1,config:{type:"line",style:{backgroundColor:t.value.style.chart.backgroundColor,line:{axis:{color:"#CCCCCC"},path:{color:"#CCCCCC",strokeWidth:.5}}}}},null,8,["config"])),l.createVNode(ot._sfc_main,{show:s.value.showTooltip&&H.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:S.value,content:V.value,isFullscreen:U.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,isCustom:l.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-before",l.normalizeProps(l.guardReactiveProps({...ne.value})),void 0,!0)]),"tooltip-after":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-after",l.normalizeProps(l.guardReactiveProps({...ne.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","position","offsetY","parent","content","isFullscreen","backgroundOpacity","isCustom"])],4),l.createElementVNode("div",{ref_key:"chartSlicer",ref:ve,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&w.value>1?(l.openBlock(),l.createBlock(ut.Slicer,{ref_key:"slicerComponent",ref:E,key:`slicer_${ue.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.grid.y.timeLabels.values[n.value.start]?t.value.style.chart.grid.y.timeLabels.values[n.value.start]:"",labelRight:t.value.style.chart.grid.y.timeLabels.values[n.value.end-1]?t.value.style.chart.grid.y.timeLabels.values[n.value.end-1]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:w.value,min:0,valueStart:n.value.start,valueEnd:n.value.end,start:n.value.start,"onUpdate:start":a[1]||(a[1]=r=>n.value.start=r),end:n.value.end,"onUpdate:end":a[2]||(a[2]=r=>n.value.end=r),refreshStartPoint:t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex:0,refreshEndPoint:t.value.style.chart.zoom.endIndex!==null?t.value.style.chart.zoom.endIndex+1:w.value,onReset:Ce},{"reset-action":l.withCtx(({reset:r})=>[l.renderSlot(e.$slots,"reset-action",l.normalizeProps(l.guardReactiveProps({reset:r})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint"])):l.createCommentVNode("",!0)],4),l.createElementVNode("div",{ref_key:"chartLegend",ref:ce},[t.value.style.chart.legend.show&&Q.value?(l.openBlock(),l.createBlock(rt.Legend,{legendSet:$e.value,config:tt.value,key:`legend_${K.value}`,onClickMarker:a[3]||(a[3]=({i:r})=>ze(r))},{item:l.withCtx(({legend:r,index:d})=>[l.createElementVNode("div",{onClick:h=>r.segregate(),style:l.normalizeStyle(`opacity:${C.value.includes(d)?.5:1}`)},l.toDisplayString(r.name),13,yt)]),_:1},8,["legendSet","config"])):l.renderSlot(e.$slots,"legend",{key:1,legend:$e.value},void 0,!0)],512),e.$slots.watermark?(l.openBlock(),l.createElementBlock("div",gt,[l.renderSlot(e.$slots,"watermark",l.normalizeProps(l.guardReactiveProps({isPrinting:l.unref(pe)||l.unref(me)})),void 0,!0)])):l.createCommentVNode("",!0),e.$slots.source?(l.openBlock(),l.createElementBlock("div",{key:3,ref_key:"source",ref:de,dir:"auto"},[l.renderSlot(e.$slots,"source",{},void 0,!0)],512)):l.createCommentVNode("",!0),n.value.end-n.value.start<200?(l.openBlock(),l.createBlock(st.default,{key:4,hideDetails:"",config:{open:s.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:l.withCtx(()=>[(l.openBlock(),l.createBlock(it.DataTable,{key:`table_${J.value}`,colNames:X.value.colNames,head:X.value.head,body:X.value.body,config:X.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[4]||(a[4]=r=>s.value.showTable=!1)},{th:l.withCtx(({th:r})=>[l.createElementVNode("div",{innerHTML:r},null,8,pt)]),td:l.withCtx(({td:r})=>[l.createTextVNode(l.toDisplayString(r),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):l.createCommentVNode("",!0),t.value.userOptions.buttons.annotator&&y.value.length?(l.openBlock(),l.createBlock(vt.PenAndPaper,{key:5,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:Y.value,onClose:ae},null,8,["parent","backgroundColor","color","active"])):l.createCommentVNode("",!0)],46,ft))}},bt=ht._export_sfc(mt,[["__scopeId","data-v-c9593b73"]]);exports.default=bt;
9
+ `)),R=l.computed(()=>p.dataset.map((e,a)=>({...e,series:u.largestTriangleThreeBucketsArray({data:u.sanitizeArray(e.series),threshold:t.value.downsample.threshold}),absoluteIndex:a,color:u.convertColorToHex(e.color||ke.value[a]||u.palette[a]||u.palette[a%u.palette.length])})));l.watch(w,e=>{e&&Ce()});const y=l.computed(()=>u.assignStackRatios(R.value.filter((e,a)=>!C.value.includes(e.absoluteIndex))).map((e,a)=>({...e,series:e.series.slice(n.value.start,n.value.end)})).map((e,a)=>{let r=[null,void 0].includes(e.scaleMin)?Math.min(...e.series)||0:e.scaleMin,d=[null,void 0].includes(e.scaleMax)?Math.max(...e.series)||1:e.scaleMax;r===d&&(r=r>=0?d-1:r,d=d>=0?d:r+1);const m={ratios:e.series.filter(A=>![null,void 0].includes(A)).map(A=>(A-r)/(d-r)),valueMin:r,valueMax:d},v=e.scaleSteps||t.value.style.chart.scale.ticks;let b;e.autoScaling?b=u.calculateNiceScale(m.valueMin,m.valueMax,v):b=u.calculateNiceScale(m.valueMin<0?m.valueMin:0,m.valueMax<=0?0:m.valueMax,v);const L=s.value.stacked?o.value.height*(1-e.cumulatedStackRatio):0,oe=s.value.stacked?o.value.height/t.value.style.chart.stackGap:0,$=s.value.stacked?o.value.height*e.stackRatio-oe:o.value.height,I=b.min<0?Math.abs(b.min):0;let P;e.autoScaling&&s.value.stacked&&d<=0?P=o.value.bottom-L-$:P=o.value.bottom-L-$*(I/(b.max+I));const D=b.ticks.map((A,at)=>({y:o.value.bottom-L-$*(at/(b.ticks.length-1)),x:o.value.left-8,value:A})),F=Ve({hasAutoScale:s.value.stacked&&e.autoScaling,series:e.series,min:s.value.stacked?r:x.value.min,max:s.value.stacked?d:x.value.max,scale:s.value.stacked?b:x.value.scale,yOffset:L,individualHeight:$,stackIndex:s.value.stacked?a:null});return{...e,coordinatesLine:F,min:r,max:d,localScale:b,localZero:P,localMin:I,localYLabels:D,yOffset:L,individualHeight:$}})),n=l.ref({start:0,end:w.value});function Ce(){we()}const E=l.ref(null);async function we(){(t.value.style.chart.zoom.startIndex!==null||t.value.style.chart.zoom.endIndex!==null)&&E.value?(t.value.style.chart.zoom.startIndex!==null&&(await l.nextTick(),await l.nextTick(),E.value&&E.value.setStartValue(t.value.style.chart.zoom.startIndex)),t.value.style.chart.zoom.endIndex!==null&&(await l.nextTick(),await l.nextTick(),E.value&&E.value.setEndValue(_e(t.value.style.chart.zoom.endIndex+1)))):(n.value={start:0,end:w.value},ue.value+=1)}function _e(e){const a=w.value;return e>a?a:e<0||t.value.style.chart.zoom.startIndex!==null&&e<t.value.style.chart.zoom.startIndex?t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex+1:1:e}const qe=l.computed(()=>y.value.filter(e=>["line","plot",void 0].includes(e.type))),k=l.computed(()=>y.value.filter(e=>e.type==="bar"));function We(){if(!S.value)return;const e=B.value.offsetWidth,a=B.value.offsetHeight;S.value.width=e*O.value*2,S.value.height=a*O.value*2,g.value=e*O.value*2,T.value=a*O.value*2,i.value.scale(O.value,O.value),te()}function Xe(){if(i.value.clearRect(0,0,1e4,1e4),i.value.fillStyle=t.value.style.chart.backgroundColor,i.value.fillRect(0,0,o.value.canvasWidth,o.value.canvasHeight),s.value.stacked)t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength?y.value.forEach(e=>{for(let a=0;a<n.value.end-n.value.start+1;a+=1)c.line(i.value,[{x:o.value.left+o.value.slot*a,y:o.value.bottom-e.yOffset-e.individualHeight},{x:o.value.left+o.value.slot*a,y:o.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}):t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength&&y.value.forEach(e=>{for(let a=n.value.start;a<n.value.end;a+=1)a%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&c.line(i.value,[{x:o.value.left+o.value.slot*(a-n.value.start)+o.value.slot/2,y:o.value.bottom-e.yOffset-e.individualHeight},{x:o.value.left+o.value.slot*(a-n.value.start)+o.value.slot/2,y:o.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.y.verticalLines.color})}),t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?y.value.forEach(e=>{e.localYLabels.forEach((a,r)=>{r<e.localYLabels.length-1&&c.rect(i.value,[{x:o.value.left,y:a.y},{x:o.value.right,y:a.y},{x:o.value.right,y:e.localYLabels[r+1].y},{x:o.value.left,y:e.localYLabels[r+1].y}],{fillColor:r%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})})}):y.value.forEach(e=>{e.localYLabels.slice(n.value.start,n.value.end).forEach(a=>{c.line(i.value,[{x:o.value.left,y:a.y},{x:o.value.right,y:a.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})})),t.value.style.chart.grid.zeroLine.show&&y.value.forEach(e=>{c.line(i.value,[{x:o.value.left,y:e.localZero},{x:o.value.right,y:e.localZero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]})}),t.value.style.chart.grid.y.axisLabels.show&&y.value.forEach(e=>{c.line(i.value,[{x:o.value.left,y:o.value.bottom-e.yOffset},{x:o.value.left,y:o.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),c.line(i.value,[{x:o.value.right,y:o.value.bottom-e.yOffset},{x:o.value.right,y:o.value.bottom-e.yOffset-e.individualHeight}],{color:e.color}),e.localYLabels.forEach((a,r)=>{c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,a.value,u.dataLabel({p:e.prefix||t.value.style.chart.grid.y.axisLabels.prefix||"",v:a.value,s:e.suffix||t.value.style.chart.grid.y.axisLabels.suffix||"",r:e.rounding||t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:a,seriesIndex:r}),a.x+t.value.style.chart.grid.y.axisLabels.offsetX,a.y,{align:"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:e.color})})}),y.value.forEach(e=>{c.text(i.value,e.name,g.value/35,o.value.bottom-e.yOffset-e.individualHeight/2,{align:"center",rotation:-90,color:e.color,font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`})});else{if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start<t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=0;e<n.value.end-n.value.start+1;e+=1)c.line(i.value,[{x:o.value.left+o.value.slot*e,y:o.value.top},{x:o.value.left+o.value.slot*e,y:o.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});else if(t.value.style.chart.grid.y.verticalLines.show&&n.value.end-n.value.start>=t.value.style.chart.grid.y.verticalLines.hideUnderXLength)for(let e=n.value.start;e<n.value.end;e+=1)e%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0&&c.line(i.value,[{x:o.value.left+o.value.slot*(e-n.value.start)+o.value.slot/2,y:o.value.top},{x:o.value.left+o.value.slot*(e-n.value.start)+o.value.slot/2,y:o.value.bottom}],{color:t.value.style.chart.grid.y.verticalLines.color});t.value.style.chart.grid.x.horizontalLines.show&&(t.value.style.chart.grid.x.horizontalLines.alternate?x.value.yLabels.forEach((e,a)=>{a<x.value.yLabels.length-1&&c.rect(i.value,[{x:o.value.left,y:e.y},{x:o.value.right,y:e.y},{x:o.value.right,y:x.value.yLabels[a+1].y},{x:o.value.left,y:x.value.yLabels[a+1].y}],{fillColor:a%2===0?"transparent":u.setOpacity(t.value.style.chart.grid.x.horizontalLines.color,t.value.style.chart.grid.x.horizontalLines.opacity),strokeColor:"transparent"})}):x.value.yLabels.forEach(e=>{c.line(i.value,[{x:o.value.left,y:e.y},{x:o.value.right,y:e.y}],{color:t.value.style.chart.grid.x.horizontalLines.color})})),t.value.style.chart.grid.y.showAxis&&c.line(i.value,[{x:o.value.left,y:o.value.top},{x:o.value.left,y:o.value.bottom}],{color:t.value.style.chart.grid.y.axisColor,lineWidth:t.value.style.chart.grid.y.axisThickness}),t.value.style.chart.grid.x.showAxis&&c.line(i.value,[{x:o.value.left,y:o.value.bottom},{x:o.value.right,y:o.value.bottom}],{color:t.value.style.chart.grid.x.axisColor,lineWidth:t.value.style.chart.grid.x.axisThickness}),t.value.style.chart.grid.zeroLine.show&&c.line(i.value,[{x:o.value.left,y:x.value.zero},{x:o.value.right,y:x.value.zero}],{color:t.value.style.chart.grid.zeroLine.color,lineDash:t.value.style.chart.grid.zeroLine.dashed?[10,10]:[0,0]}),t.value.style.chart.grid.y.axisLabels.show&&x.value.yLabels.forEach((e,a)=>{c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.value,u.dataLabel({p:t.value.style.chart.grid.y.axisLabels.prefix||"",v:e.value,s:t.value.style.chart.grid.y.axisLabels.suffix||"",r:t.value.style.chart.grid.y.axisLabels.rounding||0}),{datapoint:e,seriesIndex:a}),e.x+t.value.style.chart.grid.y.axisLabels.offsetX,e.y,{align:"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.grid.y.axisLabels.color})})}t.value.style.chart.grid.y.axisName&&c.text(i.value,t.value.style.chart.grid.y.axisName,g.value-g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio*1.2,o.value.bottom-o.value.height/2,{font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center",rotation:90}),t.value.style.chart.grid.x.axisName&&c.text(i.value,t.value.style.chart.grid.x.axisName,g.value/2,T.value,{font:`${Math.round(g.value/40*t.value.style.chart.grid.y.axisLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.color,align:"center"})}function Ye(e){for(let a=0;a<e.coordinatesLine.length;a+=1){const r=(f.value===a?g.value/150:t.value.style.chart.line.plots.show?g.value/200:0)*t.value.style.chart.line.plots.radiusRatio;c.circle(i.value,{x:e.coordinatesLine[a].x,y:e.coordinatesLine[a].y},r,{color:t.value.style.chart.backgroundColor,fillStyle:e.color,strokeColor:"transparent"})}}function Ze(e){for(let a=0;a<e.coordinatesLine.length;a+=1)c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[a].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[a].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[a],seriesIndex:a}),e.coordinatesLine[a].x,e.coordinatesLine[a].y+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(g.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color,strokeColor:t.value.style.chart.backgroundColor,lineWidth:.8})}function Ge(){for(let e=n.value.start;e<n.value.end;e+=1)(n.value.end-n.value.start<t.value.style.chart.grid.y.timeLabels.modulo||n.value.end-n.value.start>=t.value.style.chart.grid.y.timeLabels.modulo&&(e%Math.floor((n.value.end-n.value.start)/t.value.style.chart.grid.y.timeLabels.modulo)===0||e===f.value+n.value.start))&&c.text(i.value,t.value.style.chart.grid.y.timeLabels.values[e]||e+1,o.value.left+o.value.slot*(e-n.value.start)+o.value.slot/2,o.value.bottom+g.value/t.value.style.chart.grid.y.timeLabels.offsetY,{align:t.value.style.chart.grid.y.timeLabels.rotation===0?"center":t.value.style.chart.grid.y.timeLabels.rotation>0?"left":"right",font:`${Math.round(g.value/40*t.value.style.chart.grid.y.timeLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:u.setOpacity(t.value.style.chart.grid.y.timeLabels.color,f.value!==null?f.value+n.value.start===e?100:20:100),rotation:t.value.style.chart.grid.y.timeLabels.rotation})}function Se(){c.line(i.value,[{x:o.value.left+o.value.slot*f.value+o.value.slot/2,y:o.value.top},{x:o.value.left+o.value.slot*f.value+o.value.slot/2,y:o.value.bottom}],{color:t.value.style.chart.selector.color,lineDash:t.value.style.chart.selector.dashed?[8,8]:[0,0],lineWidth:2,linceCap:"round"})}function je(){k.value.forEach((e,a)=>{for(let r=0;r<e.coordinatesLine.length;r+=1)c.rect(i.value,[{x:o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a)),y:s.value.stacked?e.localZero:x.value.zero},{x:o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a))+o.value.slot*.8/(s.value.stacked?1:k.value.length),y:s.value.stacked?e.localZero:x.value.zero},{x:o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a))+o.value.slot*.8/(s.value.stacked?1:k.value.length),y:e.coordinatesLine[r].y},{x:o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a)),y:e.coordinatesLine[r].y}],{strokeColor:t.value.style.chart.backgroundColor,gradient:{type:"linear",start:{x:e.coordinatesLine[r].x,y:e.coordinatesLine[r].y},end:{x:e.coordinatesLine[r].x,y:s.value.stacked?e.localZero:x.value.zero},stops:[{offset:0,color:e.color},{offset:1,color:u.lightenHexColor(e.color,.5)}]}}),s.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&c.text(i.value,u.applyDataLabel(t.value.style.chart.dataLabels.formatter,e.coordinatesLine[r].value,u.dataLabel({p:e.prefix||"",v:e.coordinatesLine[r].value,s:e.suffix||"",r:e.rounding||0}),{datapoint:e.coordinatesLine[r],seriesIndex:r}),o.value.left+o.value.slot*r+o.value.slot/10+(s.value.stacked?0:o.value.slot/k.value.length*a-(a===0?0:o.value.slot/(5*k.value.length)*a))+o.value.slot*.4/(s.value.stacked?1:k.value.length),(e.coordinatesLine[r].value<0?s.value.stacked?e.localZero:x.value.zero:e.coordinatesLine[r].y)+t.value.style.chart.dataLabels.offsetY,{align:"center",font:`${Math.round(g.value/40*t.value.style.chart.dataLabels.fontSizeRatio)}px ${t.value.style.fontFamily}`,color:t.value.style.chart.dataLabels.useSerieColor?e.color:t.value.style.chart.dataLabels.color,strokeColor:t.value.style.chart.backgroundColor,lineWidth:.8})})}function Je(e){e.useArea?s.value.stacked?c.polygon(i.value,[{x:e.coordinatesLine[0].x,y:e.localZero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:e.localZero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):c.polygon(i.value,[{x:e.coordinatesLine[0].x,y:x.value.zero},...e.coordinatesLine,{x:e.coordinatesLine.at(-1).x,y:x.value.zero}],{fillColor:u.setOpacity(e.color,t.value.style.chart.area.opacity),strokeColor:"transparent"}):c.line(i.value,e.coordinatesLine,{color:e.color,lineWidth:3})}function Ke(){y.value.forEach((e,a)=>{c.line(i.value,[{x:o.value.left,y:o.value.bottom-e.yOffset},{x:o.value.right,y:o.value.bottom-e.yOffset}],{color:t.value.style.chart.grid.x.horizontalLines.color,lineWidth:1})})}function te(){Xe(),M.value?(z.value&&f.value!==null&&t.value.style.chart.selector.show&&Se(),je(),s.value.stacked&&t.value.style.chart.grid.x.showAxis&&Ke(),qe.value.forEach(e=>{(e.type==="line"||!e.type)&&Je(e),z.value&&(Ye(e),s.value.showDataLabels&&[!0,void 0].includes(e.dataLabels)&&Ze(e))}),G.value=c.cloneCanvas(S.value)):(G.value&&(i.value.clearRect(0,0,1e4,1e4),i.value.drawImage(G.value,0,0)),z.value&&f.value!==null&&t.value.style.chart.selector.show&&Se(),z.value&&f.value!==null&&y.value.forEach(e=>{if(e.type==="line"||!e.type||e.type==="plot"){if(!e.coordinatesLine[f.value])return;e.coordinatesLine[f.value].x!==void 0&&e.coordinatesLine[f.value].y!==void 0&&c.circle(i.value,{x:e.coordinatesLine[f.value].x,y:e.coordinatesLine[f.value].y},g.value/150*t.value.style.chart.line.plots.radiusRatio,{color:t.value.style.chart.backgroundColor,fillStyle:e.color,strokeColor:"transparent"})}})),t.value.style.chart.grid.y.timeLabels.show&&Ge(),M.value=!1}const _=c.debounce(()=>{z.value=!0,We()},w.value>200?10:1,!z.value);function Qe(e){const{left:a}=S.value.getBoundingClientRect(),r=e.clientX-a;if(r*2<o.value.left||r*2>o.value.right){H.value=!1,f.value=null;return}const d=r*2-o.value.left;if(f.value=Math.floor(d/o.value.slot),H.value=!0,!z.value)return;let h="";const m=t.value.style.chart.tooltip.customFormat;u.isFunction(m)&&u.functionReturnsString(()=>m({seriesIndex:f.value,datapoint:y.value.map(v=>({shape:v.shape||null,name:v.name,color:v.color,type:v.type||"line",value:v.series.find((b,L)=>L===f.value)})),series:y.value,config:t.value}))?V.value=m({seriesIndex:f.value,datapoint:y.value.map(v=>({shape:v.shape||null,name:v.name,color:v.color,type:v.type||"line",value:v.series.find((b,L)=>L===f.value)})),series:y.value,config:t.value}):(t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[f.value]&&(h+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; width:100%">${t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[f.value]}</div>`),h+=Ue.value.join(""),V.value=h),z.value=!1}l.watch(()=>f.value,e=>{_()}),l.watch(()=>n.value,e=>{M.value=!0,te()},{deep:!0}),l.watch(()=>s.value.showDataLabels,e=>{M.value=!0,te()}),l.watch(()=>s.value.stacked,e=>{M.value=!0,z.value=!0,_()});function et(){H.value=!1,f.value=null,V.value=""}const q=l.ref(null),W=l.ref(null);l.onMounted(()=>{le()});function le(){if(u.objectIsEmpty(p.dataset)?u.error({componentName:"VueUiXyCanvas",type:"dataset"}):S.value&&(i.value=S.value.getContext("2d",{willReadFrequently:!0})),t.value.responsive){const e=c.throttle(()=>{const{width:a,height:r}=c.useResponsive({chart:N.value,title:t.value.style.chart.title.text?ie.value:null,legend:t.value.style.chart.legend.show?ce.value:null,slicer:t.value.style.chart.zoom.show&&w.value>1?ve.value:null,source:de.value});ge.value=`${a} / ${r}`});q.value=new ResizeObserver(e),q.value.observe(N.value.parentNode)}W.value=new ResizeObserver(e=>{for(const a of e)a.contentBoxSize&&B.value&&(M.value=!0,_())}),W.value.observe(B.value),we()}l.onBeforeUnmount(()=>{W.value&&W.value.disconnect(),q.value&&q.value.disconnect()});function ze(e){De("selectLegend",y.value.find(a=>a.absoluteIndex===e)),C.value.includes(e)?C.value=C.value.filter(a=>a!==e):C.value.push(e),M.value=!0,_()}const $e=l.computed(()=>R.value.map((e,a)=>({...e,name:e.name,color:u.convertColorToHex(e.color)||ke.value[a]||u.palette[a]||u.palette[a%u.palette.length],shape:e.shape||"circle",prefix:e.prefix||"",suffix:e.suffix||"",rounding:e.rounding||0})).map(e=>({...e,opacity:C.value.includes(e.absoluteIndex)?.5:1,segregate:()=>ze(e.absoluteIndex),isSegregated:C.value.includes(e.absoluteIndex)}))),tt=l.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),X=l.computed(()=>{const e=[""].concat(y.value.map(h=>h.name)).concat(' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>');let a=[];for(let h=0;h<w.value;h+=1){const m=y.value.map(v=>v.series[h]??0).reduce((v,b)=>v+b,0);a.push([t.value.style.chart.grid.y.timeLabels.values.slice(n.value.start,n.value.end)[h]??h+1].concat(y.value.map(v=>(v.series[h]??0).toFixed(t.value.table.rounding))).concat((m??0).toFixed(t.value.table.rounding)))}const r={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},d=[t.value.table.columnNames.period].concat(y.value.map(h=>h.name)).concat(t.value.table.columnNames.total);return{head:e,body:a.slice(0,n.value.end-n.value.start),config:r,colNames:d}}),Te=l.computed(()=>{if(y.value.length===0)return{head:[],body:[],config:{},columnNames:[]};const e=y.value.map(r=>({label:r.name,color:r.color,type:r.type})),a=[];for(let r=n.value.start;r<n.value.end;r+=1){const d=[t.value.style.chart.grid.y.timeLabels.values[r]||r+1];y.value.forEach(h=>{d.push(Number((h.series[r]||0).toFixed(t.value.table.rounding)))}),a.push(d)}return{head:e,body:a}});function Ie(){const e=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=["",...Te.value.head.map(m=>m.label)],r=Te.value.body,d=e.concat([a]).concat(r),h=u.createCsvContent(d);u.downloadCsv({csvContent:h,title:t.value.style.chart.title.text||"vue-ui-xy-canvas"})}function lt(){return y.value}function Pe(){s.value.showTable=!s.value.showTable}function Me(){s.value.showDataLabels=!s.value.showDataLabels}function Oe(){s.value.stacked=!s.value.stacked}function Re(){s.value.showTooltip=!s.value.showTooltip}const Y=l.ref(!1);function ae(){Y.value=!Y.value}return Be({getData:lt,generateCsv:Ie,generatePdf:be,generateImage:xe,toggleTable:Pe,toggleLabels:Me,toggleStack:Oe,toggleTooltip:Re,toggleAnnotator:ae}),(e,a)=>(l.openBlock(),l.createElementBlock("div",{style:l.normalizeStyle(`width:100%; position:relative; ${t.value.responsive?"height: 100%":""}`),ref_key:"xy",ref:N,id:`xy_canvas_${Z.value}`,class:l.normalizeClass(`vue-ui-donut ${U.value?"vue-data-ui-wrapper-fullscreen":""}`),onMouseenter:a[5]||(a[5]=()=>l.unref(he)(!0)),onMouseleave:a[6]||(a[6]=()=>l.unref(he)(!1))},[t.value.style.chart.title.text?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:ie,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};`)},[(l.openBlock(),l.createBlock(nt._sfc_main,{key:`title_${j.value}`,config:{title:{cy:"xy-canvas-title",...t.value.style.chart.title},subtitle:{cy:"xy-canvas-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):l.createCommentVNode("",!0),t.value.userOptions.show&&Q.value&&(l.unref(fe)||l.unref(ee))?(l.openBlock(),l.createBlock(Ee.UserOptions,{ref:"details",key:`user_option_${se.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:l.unref(pe),isImaging:l.unref(me),uid:Z.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasLabel:t.value.userOptions.buttons.labels,hasStack:re.dataset.length>1&&t.value.userOptions.buttons.stack,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasTable:n.value.end-n.value.start<200&&t.value.userOptions.buttons.table,isFullscreen:U.value,isTooltip:s.value.showTooltip,isStacked:s.value.stacked,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:Y.value,onToggleFullscreen:He,onGeneratePdf:l.unref(be),onGenerateCsv:Ie,onGenerateImage:l.unref(xe),onToggleTable:Pe,onToggleLabels:Me,onToggleStack:Oe,onToggleTooltip:Re,onToggleAnnotator:ae,style:l.normalizeStyle({visibility:l.unref(fe)?l.unref(ee)?"visible":"hidden":"visible"})},l.createSlots({_:2},[e.$slots.optionTooltip?{name:"optionTooltip",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,e.$slots.optionPdf?{name:"optionPdf",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,e.$slots.optionCsv?{name:"optionCsv",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,e.$slots.optionImg?{name:"optionImg",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,e.$slots.optionTable?{name:"optionTable",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,e.$slots.optionLabels?{name:"optionLabels",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,e.$slots.optionStack?{name:"optionStack",fn:l.withCtx(()=>[l.renderSlot(e.$slots,"optionStack",{},void 0,!0)]),key:"6"}:void 0,e.$slots.optionFullscreen?{name:"optionFullscreen",fn:l.withCtx(({toggleFullscreen:r,isFullscreen:d})=>[l.renderSlot(e.$slots,"optionFullscreen",l.normalizeProps(l.guardReactiveProps({toggleFullscreen:r,isFullscreen:d})),void 0,!0)]),key:"7"}:void 0,e.$slots.optionAnnotator?{name:"optionAnnotator",fn:l.withCtx(({toggleAnnotator:r,isAnnotator:d})=>[l.renderSlot(e.$slots,"optionAnnotator",l.normalizeProps(l.guardReactiveProps({toggleAnnotator:r,isAnnotator:d})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasLabel","hasStack","hasFullscreen","hasTable","isFullscreen","isTooltip","isStacked","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):l.createCommentVNode("",!0),l.createElementVNode("div",{class:"vue-ui-xy-canvas",style:l.normalizeStyle(`position: relative; aspect-ratio: ${ge.value}`),ref_key:"container",ref:B},[Q.value?(l.openBlock(),l.createElementBlock("canvas",{key:0,ref_key:"canvas",ref:S,style:{width:"100%",height:"100%"},onMousemove:a[0]||(a[0]=r=>Qe(r)),onMouseleave:et},null,544)):(l.openBlock(),l.createBlock(ct.default,{key:1,config:{type:"line",style:{backgroundColor:t.value.style.chart.backgroundColor,line:{axis:{color:"#CCCCCC"},path:{color:"#CCCCCC",strokeWidth:.5}}}}},null,8,["config"])),l.createVNode(ot._sfc_main,{show:s.value.showTooltip&&H.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:S.value,content:V.value,isFullscreen:U.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,isCustom:l.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-before",l.normalizeProps(l.guardReactiveProps({...ne.value})),void 0,!0)]),"tooltip-after":l.withCtx(()=>[l.renderSlot(e.$slots,"tooltip-after",l.normalizeProps(l.guardReactiveProps({...ne.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","position","offsetY","parent","content","isFullscreen","backgroundOpacity","isCustom"])],4),l.createElementVNode("div",{ref_key:"chartSlicer",ref:ve,style:l.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&w.value>1?(l.openBlock(),l.createBlock(ut.Slicer,{ref_key:"slicerComponent",ref:E,key:`slicer_${ue.value}`,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,fontSize:t.value.style.chart.zoom.fontSize,useResetSlot:t.value.style.chart.zoom.useResetSlot,labelLeft:t.value.style.chart.grid.y.timeLabels.values[n.value.start]?t.value.style.chart.grid.y.timeLabels.values[n.value.start]:"",labelRight:t.value.style.chart.grid.y.timeLabels.values[n.value.end-1]?t.value.style.chart.grid.y.timeLabels.values[n.value.end-1]:"",textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,max:w.value,min:0,valueStart:n.value.start,valueEnd:n.value.end,start:n.value.start,"onUpdate:start":a[1]||(a[1]=r=>n.value.start=r),end:n.value.end,"onUpdate:end":a[2]||(a[2]=r=>n.value.end=r),refreshStartPoint:t.value.style.chart.zoom.startIndex!==null?t.value.style.chart.zoom.startIndex:0,refreshEndPoint:t.value.style.chart.zoom.endIndex!==null?t.value.style.chart.zoom.endIndex+1:w.value,enableRangeHandles:t.value.style.chart.zoom.enableRangeHandles,enableSelectionDrag:t.value.style.chart.zoom.enableSelectionDrag,onReset:Ce},{"reset-action":l.withCtx(({reset:r})=>[l.renderSlot(e.$slots,"reset-action",l.normalizeProps(l.guardReactiveProps({reset:r})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag"])):l.createCommentVNode("",!0)],4),l.createElementVNode("div",{ref_key:"chartLegend",ref:ce},[t.value.style.chart.legend.show&&Q.value?(l.openBlock(),l.createBlock(rt.Legend,{legendSet:$e.value,config:tt.value,key:`legend_${K.value}`,onClickMarker:a[3]||(a[3]=({i:r})=>ze(r))},{item:l.withCtx(({legend:r,index:d})=>[l.createElementVNode("div",{onClick:h=>r.segregate(),style:l.normalizeStyle(`opacity:${C.value.includes(d)?.5:1}`)},l.toDisplayString(r.name),13,yt)]),_:1},8,["legendSet","config"])):l.renderSlot(e.$slots,"legend",{key:1,legend:$e.value},void 0,!0)],512),e.$slots.watermark?(l.openBlock(),l.createElementBlock("div",gt,[l.renderSlot(e.$slots,"watermark",l.normalizeProps(l.guardReactiveProps({isPrinting:l.unref(pe)||l.unref(me)})),void 0,!0)])):l.createCommentVNode("",!0),e.$slots.source?(l.openBlock(),l.createElementBlock("div",{key:3,ref_key:"source",ref:de,dir:"auto"},[l.renderSlot(e.$slots,"source",{},void 0,!0)],512)):l.createCommentVNode("",!0),n.value.end-n.value.start<200?(l.openBlock(),l.createBlock(st.default,{key:4,hideDetails:"",config:{open:s.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:l.withCtx(()=>[(l.openBlock(),l.createBlock(it.DataTable,{key:`table_${J.value}`,colNames:X.value.colNames,head:X.value.head,body:X.value.body,config:X.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[4]||(a[4]=r=>s.value.showTable=!1)},{th:l.withCtx(({th:r})=>[l.createElementVNode("div",{innerHTML:r},null,8,pt)]),td:l.withCtx(({td:r})=>[l.createTextVNode(l.toDisplayString(r),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):l.createCommentVNode("",!0),t.value.userOptions.buttons.annotator&&y.value.length?(l.openBlock(),l.createBlock(vt.PenAndPaper,{key:5,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:Y.value,onClose:ae},null,8,["parent","backgroundColor","color","active"])):l.createCommentVNode("",!0)],46,ft))}},bt=ht._export_sfc(mt,[["__scopeId","data-v-fbe7238f"]]);exports.default=bt;