vue-data-ui 2.11.2 → 2.11.3-beta.0

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 (170) hide show
  1. package/dist/{Arrow-OttzfahM.js → Arrow-DCGOHM6k.js} +1 -1
  2. package/dist/{BaseIcon-CpIcYACc.js → BaseIcon-B7gTspPS.js} +1 -1
  3. package/dist/{ColorPicker-BnsG9Qeu.js → ColorPicker-BZpHLKFj.js} +3 -3
  4. package/dist/{DataTable-CJOtzfgn.js → DataTable-CfJNJ7NR.js} +2 -2
  5. package/dist/{Legend-DKQ4psNY.js → Legend-Ci-FO3V2.js} +2 -2
  6. package/dist/{PackageVersion-D-aPPO0L.js → PackageVersion-Bye0MT5W.js} +3 -3
  7. package/dist/{PenAndPaper-D9g_r8-6.js → PenAndPaper-YLAKASXp.js} +3 -3
  8. package/dist/{Shape-DLjaeo5U.js → Shape-B1e1H4lS.js} +1 -1
  9. package/dist/{Slicer-DuqI_UVS.js → Slicer-CWPgea7y.js} +2 -2
  10. package/dist/{Title-DIYoufYR.js → Title-DqRYBmPn.js} +1 -1
  11. package/dist/{Tooltip-BFz2yelJ.js → Tooltip-Cn5TRz5k.js} +1 -1
  12. package/dist/{dom-to-png-BB-m1MuD.js → dom-to-png-D-0uAVLJ.js} +1 -1
  13. package/dist/{img-Cyr1eIO7.js → img-DP7bwOa0.js} +1 -1
  14. package/dist/{index-d3erwTWB.js → index-BHDxYxsA.js} +1 -1
  15. package/dist/{pdf-BQRTRQlZ.js → pdf-DSSAgKci.js} +1 -1
  16. package/dist/style.css +1 -1
  17. package/dist/{useNestedProp-BqKuhIvF.js → useNestedProp-CX8MPjxN.js} +1 -1
  18. package/dist/{usePrinter-CHrKIDM7.js → usePrinter-mUOYqNDs.js} +3 -3
  19. package/dist/{vue-data-ui-BRKcN5_z.js → vue-data-ui-Bt_OX-Tr.js} +63 -63
  20. package/dist/vue-data-ui.js +1 -1
  21. package/dist/{vue-ui-3d-bar-BIw7nTYA.js → vue-ui-3d-bar-ne-FQ3BQ.js} +9 -9
  22. package/dist/{vue-ui-accordion-BJyaBDyF.js → vue-ui-accordion-BA4dEISn.js} +3 -3
  23. package/dist/{vue-ui-age-pyramid-Dn_061NF.js → vue-ui-age-pyramid-gOYNoKxJ.js} +10 -10
  24. package/dist/{vue-ui-annotator-Y65oZVga.js → vue-ui-annotator-cclttELo.js} +2 -2
  25. package/dist/{vue-ui-bullet-B5mjXy0q.js → vue-ui-bullet-CvKSOwAe.js} +8 -8
  26. package/dist/{vue-ui-candlestick-BIC2-GAV.js → vue-ui-candlestick-B6X1XUi6.js} +11 -11
  27. package/dist/{vue-ui-carousel-table-CnvQ0CeQ.js → vue-ui-carousel-table-BfRMRgxl.js} +4 -4
  28. package/dist/{vue-ui-chestnut-IsRTDol2.js → vue-ui-chestnut-CmmSzRZK.js} +8 -8
  29. package/dist/{vue-ui-chord-iSsr3a59.js → vue-ui-chord-BXpdoJTc.js} +14 -14
  30. package/dist/{vue-ui-circle-pack-CS2l9IXg.js → vue-ui-circle-pack-DACAa7Po.js} +9 -9
  31. package/dist/{vue-ui-cursor-Cq9lPDB7.js → vue-ui-cursor-BCzCHBrt.js} +2 -2
  32. package/dist/{vue-ui-dashboard-7Cm-15oc.js → vue-ui-dashboard-Asv4ojaV.js} +62 -62
  33. package/dist/{vue-ui-digits-BecNI-j7.js → vue-ui-digits-B5FgN7v8.js} +2 -2
  34. package/dist/{vue-ui-donut-D_bFxovZ.js → vue-ui-donut-BBwG3_eI.js} +12 -12
  35. package/dist/{vue-ui-donut-evolution-C8dlmVur.js → vue-ui-donut-evolution-BfZgT3LC.js} +11 -11
  36. package/dist/{vue-ui-dumbbell-Ds41wAQh.js → vue-ui-dumbbell-D6_AcFXT.js} +10 -10
  37. package/dist/{vue-ui-flow-CqdSvk4_.js → vue-ui-flow-a_27wEq2.js} +11 -11
  38. package/dist/{vue-ui-funnel-CNDgAWjp.js → vue-ui-funnel-BQIASo-h.js} +9 -9
  39. package/dist/{vue-ui-galaxy-DzUAHZ4G.js → vue-ui-galaxy-D08PJlS7.js} +11 -11
  40. package/dist/{vue-ui-gauge-Cj-4ZhyL.js → vue-ui-gauge-BST6gr3o.js} +7 -7
  41. package/dist/{vue-ui-gizmo-CCS3u0qr.js → vue-ui-gizmo-CaTpG11y.js} +3 -3
  42. package/dist/{vue-ui-heatmap-CBRd8kvj.js → vue-ui-heatmap-DiuiJH7J.js} +10 -10
  43. package/dist/{vue-ui-history-plot-4XT22zB_.js → vue-ui-history-plot-CvGSOLla.js} +11 -11
  44. package/dist/{vue-ui-kpi-B-lBgRvZ.js → vue-ui-kpi-vDq_MbTb.js} +3 -3
  45. package/dist/{vue-ui-mini-loader-_ksyazrb.js → vue-ui-mini-loader-9J8LdVRw.js} +2 -2
  46. package/dist/{vue-ui-molecule-Db_QmLY6.js → vue-ui-molecule-B1Ykknv1.js} +11 -11
  47. package/dist/{vue-ui-mood-radar-Y_CGEC1L.js → vue-ui-mood-radar-Bo_9AlGw.js} +11 -11
  48. package/dist/{vue-ui-nested-donuts-DosW9Sfg.js → vue-ui-nested-donuts-C6etC_8f.js} +11 -11
  49. package/dist/{vue-ui-onion-CQwIVcfN.js → vue-ui-onion-E77bkiI8.js} +11 -11
  50. package/dist/{vue-ui-parallel-coordinate-plot-Cdu0SvMZ.js → vue-ui-parallel-coordinate-plot-DRX5p5wU.js} +12 -12
  51. package/dist/{vue-ui-quadrant-B8H5sBMi.js → vue-ui-quadrant-BWvOT4Yn.js} +12 -12
  52. package/dist/{vue-ui-quick-chart-ClB6jwSV.js → vue-ui-quick-chart-D0yCkwLS.js} +9 -9
  53. package/dist/{vue-ui-radar-BTluZs04.js → vue-ui-radar-Dxb-NhkQ.js} +12 -12
  54. package/dist/{vue-ui-rating-CTNYeoXO.js → vue-ui-rating-BGBXFzF9.js} +2 -2
  55. package/dist/{vue-ui-relation-circle-CdHhoGcO.js → vue-ui-relation-circle-BhxPABn9.js} +7 -7
  56. package/dist/{vue-ui-ridgeline-Dr6UOfwb.js → vue-ui-ridgeline-CRKQ44VU.js} +12 -12
  57. package/dist/{vue-ui-rings-N2mHKtLh.js → vue-ui-rings-Bm_M6lPM.js} +12 -12
  58. package/dist/{vue-ui-scatter-BcJRyqbE.js → vue-ui-scatter-vrdnuI9T.js} +12 -12
  59. package/dist/{vue-ui-skeleton-BOtCpAcY.js → vue-ui-skeleton-BCAWMgrf.js} +3 -3
  60. package/dist/{vue-ui-smiley-BPqpTUTh.js → vue-ui-smiley-BbDcE-5m.js} +2 -2
  61. package/dist/{vue-ui-spark-trend-BXo8mbxJ.js → vue-ui-spark-trend-dGhL6Ncl.js} +5 -5
  62. package/dist/{vue-ui-sparkbar-DEsL52nJ.js → vue-ui-sparkbar-jBdFxBjW.js} +4 -4
  63. package/dist/{vue-ui-sparkgauge-DkawMq8d.js → vue-ui-sparkgauge-CH1PgkFm.js} +4 -4
  64. package/dist/{vue-ui-sparkhistogram-D8ZCXl7m.js → vue-ui-sparkhistogram-DxuZF7Jp.js} +5 -5
  65. package/dist/{vue-ui-sparkline-D8LYPXpr.js → vue-ui-sparkline-gCNfPXIx.js} +4 -4
  66. package/dist/{vue-ui-sparkstackbar-DzeVCG0H.js → vue-ui-sparkstackbar-CXbLZhzW.js} +5 -5
  67. package/dist/{vue-ui-stackbar-DQ9CcKUd.js → vue-ui-stackbar-CQUmq-Zs.js} +13 -13
  68. package/dist/{vue-ui-strip-plot-C6gcQLMI.js → vue-ui-strip-plot-CwH7POxM.js} +11 -11
  69. package/dist/{vue-ui-table-D7azsjo3.js → vue-ui-table-Bb1L4BbK.js} +3 -3
  70. package/dist/{vue-ui-table-heatmap-DINNMAyX.js → vue-ui-table-heatmap-Bnn-JBcA.js} +4 -4
  71. package/dist/{vue-ui-table-sparkline-BrYh6fVq.js → vue-ui-table-sparkline-Dtyp35z5.js} +5 -5
  72. package/dist/{vue-ui-thermometer-J0A6MZy_.js → vue-ui-thermometer-nqM9BT70.js} +7 -7
  73. package/dist/{vue-ui-timer-CI8zPXh3.js → vue-ui-timer-C2PW101V.js} +5 -5
  74. package/dist/{vue-ui-tiremarks-BuNik_Pf.js → vue-ui-tiremarks-C89aeRJ0.js} +7 -7
  75. package/dist/{vue-ui-treemap-oUtdOGWu.js → vue-ui-treemap-Dj1uUDg4.js} +12 -12
  76. package/dist/{vue-ui-vertical-bar-2bHPN2lr.js → vue-ui-vertical-bar-BwiU9hmU.js} +12 -12
  77. package/dist/{vue-ui-waffle-BuISvHw-.js → vue-ui-waffle-B8cjT4Kp.js} +12 -12
  78. package/dist/{vue-ui-wheel-CSy7_x22.js → vue-ui-wheel-BWUlrmeo.js} +7 -7
  79. package/dist/{vue-ui-word-cloud-DEpoSRMP.js → vue-ui-word-cloud-CLKZ_Ss2.js} +10 -10
  80. package/dist/{vue-ui-world-Cy1VBlK3.js → vue-ui-world-BA6Bpswn.js} +11 -11
  81. package/dist/{vue-ui-xy-PaM6vcjk.js → vue-ui-xy-CsHZNZlq.js} +16 -16
  82. package/dist/{vue-ui-xy-canvas-CSyX_xLO.js → vue-ui-xy-canvas-Cy_2j84B.js} +12 -12
  83. package/package.json +1 -2
  84. package/dist/Arrow-CogAJvGp.cjs +0 -1
  85. package/dist/BaseIcon-DY-33nfj.cjs +0 -1
  86. package/dist/ColorPicker-CrMLe8x_.cjs +0 -1
  87. package/dist/DataTable-CNCnRrD-.cjs +0 -1
  88. package/dist/Legend-ieOu_fKK.cjs +0 -1
  89. package/dist/PackageVersion-BxSGdh6L.cjs +0 -1
  90. package/dist/PenAndPaper-ByAFuR-l.cjs +0 -1
  91. package/dist/Shape-BQIcurpe.cjs +0 -1
  92. package/dist/Slicer-FXxFjXOP.cjs +0 -1
  93. package/dist/Title-D62pPwLz.cjs +0 -1
  94. package/dist/Tooltip-C_H6-uAa.cjs +0 -9
  95. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +0 -1
  96. package/dist/dom-to-png-B3SeX1JP.cjs +0 -3
  97. package/dist/img-Bl4Pt1QH.cjs +0 -1
  98. package/dist/index-Cn2tUOoX.cjs +0 -9
  99. package/dist/pdf-BQABl7QG.cjs +0 -1
  100. package/dist/useChartAccessibility-Cm7nkzTG.cjs +0 -1
  101. package/dist/useNestedProp-C8955nsn.cjs +0 -1
  102. package/dist/usePanZoom-PXRi2Rwx.cjs +0 -1
  103. package/dist/usePrinter-BrH80VBz.cjs +0 -1
  104. package/dist/useResponsive-BBkmXXaa.cjs +0 -1
  105. package/dist/useUserOptionState-BgepsfED.cjs +0 -1
  106. package/dist/vue-data-ui-BbzW2_-6.cjs +0 -9
  107. package/dist/vue-data-ui.cjs +0 -1
  108. package/dist/vue-ui-3d-bar-WFymJ4EL.cjs +0 -19
  109. package/dist/vue-ui-accordion-7GoAZx3k.cjs +0 -1
  110. package/dist/vue-ui-age-pyramid-DGpLdvsL.cjs +0 -1
  111. package/dist/vue-ui-annotator-ypStRKCB.cjs +0 -371
  112. package/dist/vue-ui-bullet-C_Ppz5nn.cjs +0 -34
  113. package/dist/vue-ui-candlestick-BrDk_pc_.cjs +0 -2
  114. package/dist/vue-ui-carousel-table-BTxtBHvb.cjs +0 -1
  115. package/dist/vue-ui-chestnut-D_NZDyDN.cjs +0 -6
  116. package/dist/vue-ui-chord-CZ66gJ7w.cjs +0 -16
  117. package/dist/vue-ui-circle-pack-lGkj98rL.cjs +0 -1
  118. package/dist/vue-ui-cursor-YZyc0ARl.cjs +0 -1
  119. package/dist/vue-ui-dashboard-jP2U4qtK.cjs +0 -1
  120. package/dist/vue-ui-digits-C5PfeED6.cjs +0 -1
  121. package/dist/vue-ui-donut-BM9i2XHJ.cjs +0 -1
  122. package/dist/vue-ui-donut-evolution-Oga32kTV.cjs +0 -1
  123. package/dist/vue-ui-dumbbell-ClzXgan7.cjs +0 -9
  124. package/dist/vue-ui-flow-Bp1oqzTj.cjs +0 -3
  125. package/dist/vue-ui-funnel-y3hN7BGU.cjs +0 -1
  126. package/dist/vue-ui-galaxy-D5vKPiFH.cjs +0 -1
  127. package/dist/vue-ui-gauge-57ahTSbZ.cjs +0 -1
  128. package/dist/vue-ui-gizmo-D5_kCO9e.cjs +0 -1
  129. package/dist/vue-ui-heatmap-B8sfOhVF.cjs +0 -1
  130. package/dist/vue-ui-history-plot-DQVpKlp1.cjs +0 -1
  131. package/dist/vue-ui-kpi-DjI1yXtc.cjs +0 -1
  132. package/dist/vue-ui-mini-loader-BpAnNEHG.cjs +0 -1
  133. package/dist/vue-ui-molecule-BqpYPmrd.cjs +0 -1
  134. package/dist/vue-ui-mood-radar-DI_FioVr.cjs +0 -1
  135. package/dist/vue-ui-nested-donuts-B0rJlEH0.cjs +0 -17
  136. package/dist/vue-ui-onion-CEHc9oKt.cjs +0 -5
  137. package/dist/vue-ui-parallel-coordinate-plot-C1sxm3Nr.cjs +0 -8
  138. package/dist/vue-ui-pattern-CT3p_iOg.cjs +0 -1
  139. package/dist/vue-ui-quadrant-DM3Afg_i.cjs +0 -1
  140. package/dist/vue-ui-quick-chart-ClJi48bc.cjs +0 -15
  141. package/dist/vue-ui-radar-f0QY_Mal.cjs +0 -1
  142. package/dist/vue-ui-rating-B71_TxmN.cjs +0 -1
  143. package/dist/vue-ui-relation-circle-DHOG2jKh.cjs +0 -1
  144. package/dist/vue-ui-ridgeline-CxhklaLX.cjs +0 -1
  145. package/dist/vue-ui-rings-DoGxh2qe.cjs +0 -2
  146. package/dist/vue-ui-scatter-BnRkkP5Z.cjs +0 -1
  147. package/dist/vue-ui-skeleton-Mcoev-5q.cjs +0 -41
  148. package/dist/vue-ui-smiley-Ch9trBZA.cjs +0 -2
  149. package/dist/vue-ui-spark-trend-PqEN-rL8.cjs +0 -1
  150. package/dist/vue-ui-sparkbar-DnRQFo63.cjs +0 -1
  151. package/dist/vue-ui-sparkgauge-C0E5Sojk.cjs +0 -1
  152. package/dist/vue-ui-sparkhistogram-Bqtsbb3w.cjs +0 -1
  153. package/dist/vue-ui-sparkline-BTruGe7A.cjs +0 -1
  154. package/dist/vue-ui-sparkstackbar-DeXUgBIH.cjs +0 -1
  155. package/dist/vue-ui-stackbar-CaFp42Tn.cjs +0 -6
  156. package/dist/vue-ui-strip-plot-DzNU6VRW.cjs +0 -1
  157. package/dist/vue-ui-table-DP2ZaGWa.cjs +0 -14
  158. package/dist/vue-ui-table-heatmap-B2gZkAqm.cjs +0 -1
  159. package/dist/vue-ui-table-sparkline-CgN2nMYT.cjs +0 -1
  160. package/dist/vue-ui-thermometer-DgZfQbR2.cjs +0 -1
  161. package/dist/vue-ui-timer-ClM5FpoU.cjs +0 -64
  162. package/dist/vue-ui-tiremarks-19Krsd1f.cjs +0 -1
  163. package/dist/vue-ui-treemap-DvmJ1MOU.cjs +0 -1
  164. package/dist/vue-ui-vertical-bar-RT-SM-us.cjs +0 -4
  165. package/dist/vue-ui-waffle-BSKRUJbJ.cjs +0 -1
  166. package/dist/vue-ui-wheel-DfBVkT9x.cjs +0 -1
  167. package/dist/vue-ui-word-cloud-BlfCmzD-.cjs +0 -1
  168. package/dist/vue-ui-world-EgFhVXSY.cjs +0 -19
  169. package/dist/vue-ui-xy-aQEDcKbT.cjs +0 -3
  170. package/dist/vue-ui-xy-canvas-C6-sYgU_.cjs +0 -9
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Cn2tUOoX.cjs"),de=require("./useResponsive-BBkmXXaa.cjs"),ze=require("./Title-D62pPwLz.cjs"),ce=require("./usePrinter-BrH80VBz.cjs"),Ve=require("./Tooltip-C_H6-uAa.cjs"),Ee=require("./DataTable-CNCnRrD-.cjs"),Te=require("./vue-ui-skeleton-Mcoev-5q.cjs"),Ae=require("./Slicer-FXxFjXOP.cjs"),Fe=require("./vue-ui-accordion-7GoAZx3k.cjs"),ve=require("./useNestedProp-C8955nsn.cjs"),Ie=require("./PackageVersion-BxSGdh6L.cjs"),Pe=require("./PenAndPaper-ByAFuR-l.cjs"),Re=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./useChartAccessibility-Cm7nkzTG.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ue=["id"],De=["xmlns","viewBox"],Me=["x","y","width","height"],qe={key:1},He=["id"],We=["stop-color"],Ge=["stop-color"],je=["stop-color"],Xe=["id"],Ye=["stop-color"],Je=["stop-color"],Ke=["stop-color"],Qe={key:0},Ze=["x1","x2","y1","y2","stroke","stroke-width"],et=["x1","x2","y1","y2","stroke","stroke-width"],tt={key:1},lt=["x1","x2","y1","y2","stroke","stroke-width"],ot=["x","y","font-size","fill","font-weight"],at={key:2},nt=["transform","text-anchor","font-size","fill","font-weight"],st=["x1","x2","y1","y2","stroke","stroke-width"],ut={key:0},rt=["cx","cy","r","fill"],it=["cx","cy","r","fill"],dt={key:1},ct=["x1","x2","y1","y2","stroke","stroke-width"],vt=["x1","x2","y1","y2","stroke","stroke-width"],yt=["x","y","height","width","fill","rx"],ht=["x","y","height","width","fill","rx","stroke","stroke-width"],pt=["x","y","height","width","fill","onMouseover"],ft={key:5,class:"vue-data-ui-watermark"},mt=["innerHTML"],gt={__name:"vue-ui-candlestick",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(f,{expose:ye}){const{vue_ui_candlestick:he}=s.useConfig(),d=f,x=e.computed(()=>!!d.dataset&&d.dataset.length),h=e.ref(s.createUid()),pe=e.ref(null),V=e.ref(!1),E=e.ref(""),T=e.ref(void 0),R=e.ref(0),b=e.ref(null),L=e.ref(null),O=e.ref(null),U=e.ref(null),D=e.ref(null),M=e.ref(null),C=e.ref(0),q=e.ref(0),H=e.ref(0),t=e.computed({get:()=>X(),set:l=>l}),{userOptionsVisible:A,setUserOptionsVisibility:W,keepUserOptionState:G}=Re.useUserOptionState({config:t.value}),{svgRef:j}=Le.useChartAccessibility({config:t.value.style.title});function X(){const l=ve.useNestedProp({userConfig:d.config,defaultConfig:he});let a={};return l.theme?a={...ve.useNestedProp({userConfig:s.themes.vue_ui_candlestick[l.theme]||d.config,defaultConfig:l})}:a=l,d.config&&s.hasDeepProperty(d.config,"style.zoom.startIndex")?a.style.zoom.startIndex=d.config.style.zoom.startIndex:a.style.zoom.startIndex=null,d.config&&s.hasDeepProperty(d.config,"style.zoom.endIndex")?a.style.zoom.endIndex=d.config.style.zoom.endIndex:a.style.zoom.endIndex=null,a}e.watch(()=>d.config,l=>{t.value=X(),A.value=!t.value.userOptions.showOnChartHover,Y(),C.value+=1,H.value+=1,q.value+=1,p.value.showTable=t.value.table.show,p.value.showTooltip=t.value.style.tooltip.show},{deep:!0}),e.watch(()=>d.dataset,l=>{c.value.start=0,c.value.end=l.length,C.value+=1},{deep:!0});const i=e.ref({height:t.value.style.height,width:t.value.style.width,xAxisFontSize:t.value.style.layout.grid.xAxis.dataLabels.fontSize,yAxisFontSize:t.value.style.layout.grid.yAxis.dataLabels.fontSize}),N=e.ref(null);e.onMounted(()=>{Y()});function Y(){if(s.objectIsEmpty(d.dataset)&&s.error({componentName:"VueUiCandlestick",type:"dataset"}),t.value.responsive){const l=de.throttle(()=>{const{width:a,height:o}=de.useResponsive({chart:b.value,title:t.value.style.title.text?L.value:null,slicer:U.value,legend:O.value,source:D.value,noTitle:M.value});requestAnimationFrame(()=>{i.value.width=a,i.value.height=o,i.value.xAxisFontSize=s.translateSize({relator:Math.min(a,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.xAxis.dataLabels.fontSize,threshold:6,fallback:6}),i.value.yAxisFontSize=s.translateSize({relator:Math.min(a,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.yAxis.dataLabels.fontSize,threshold:6,fallback:6})})});N.value=new ResizeObserver(l),N.value.observe(b.value.parentNode)}le()}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:Z}=ce.usePrinter({elementId:`vue-ui-candlestick_${h.value}`,fileName:t.value.style.title.text||"vue-ui-candlestick",options:t.value.userOptions.print}),fe=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),u=e.computed(()=>{const{top:l,right:a,bottom:o,left:n}=t.value.style.layout.padding;return{top:l,right:i.value.width-a,left:n,bottom:i.value.height-o,width:i.value.width-n-a,height:i.value.height-l-o}}),w=e.computed(()=>d.dataset.length),c=e.ref({start:0,end:w.value}),ee=e.computed(()=>d.dataset.slice(c.value.start,c.value.end)),F=e.computed(()=>(d.dataset.forEach((l,a)=>{[null,void 0].includes(l[0])&&s.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"period (index 0)",index:a}),[null,void 0].includes(l[1])&&s.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"open (index 1)",index:a}),[null,void 0].includes(l[2])&&s.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"high (index 2)",index:a}),[null,void 0].includes(l[3])&&s.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"low (index 3)",index:a}),[null,void 0].includes(l[4])&&s.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"last (index 4)",index:a}),[null,void 0].includes(l[5])&&s.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"volume (index 5)",index:a})}),ee.value.map(l=>({period:l[0],open:l[1],high:l[2],low:l[3],last:l[4],volume:l[5]})))),r=e.computed(()=>u.value.width/ee.value.length),te=e.computed(()=>({max:Math.max(...F.value.map(l=>l.high)),min:0})),m=e.computed(()=>s.calculateNiceScale(te.value.min,te.value.max,t.value.style.layout.grid.yAxis.dataLabels.steps));function $(l,a){return{...l,x:s.checkNaN(u.value.left+a*r.value+r.value/2),y:s.checkNaN(u.value.top+(1-l/m.value.max)*u.value.height),value:s.checkNaN(l)}}const v=e.computed(()=>F.value.map((l,a)=>{const o=$(l.open,a),n=$(l.high,a),y=$(l.low,a),_=$(l.last,a),z=l.last>l.open;return{period:l.period,open:o,high:n,low:y,last:_,volume:l.volume,isBullish:z}}));function me(l){return s.checkNaN(l/m.value.max)}const ge=e.computed(()=>m.value.ticks.map(l=>({y:u.value.bottom-u.value.height*me(l),value:s.checkNaN(l)}))),ke=e.computed(()=>F.value.map(l=>l.period)),I=e.ref(null);function xe(l,a){T.value=l,I.value={datapoint:a,seriesIndex:l,series:v.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(s.isFunction(o)&&s.functionReturnsString(()=>o({seriesIndex:l,datapoint:a,series:v.value,config:t.value})))E.value=o({seriesIndex:l,datapoint:a,series:v.value,config:t.value});else if(t.value.style.tooltip.show){let n="";const{period:y,open:_,high:z,low:se,last:ue,volume:re,isBullish:ie}=v.value[l],{period:xt,open:Ne,high:$e,low:Se,last:Be,volume:_e}=t.value.translations;n+=`<div><svg style="margin-right:6px" viewBox="0 0 12 12" height="12" width="12"><rect x="0" y="0" height="12" width="12" rx="${t.value.style.layout.candle.borderRadius*3}" stroke="${t.value.style.layout.candle.stroke}" stroke-width="${t.value.style.layout.candle.strokeWidth}"
2
- fill="${t.value.style.layout.candle.gradient.show?ie?`url(#bullish_gradient_${h.value})`:`url(#bearish_gradient_${h.value})`:ie?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg>${y}</div>`,n+=`${_e} : <b>${isNaN(re)?"-":Number(re.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()}</b>`,n+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,n+=`<div>${Ne}: <b>${t.value.style.tooltip.prefix} ${isNaN(_.value)?"-":Number(_.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${$e}: <b>${t.value.style.tooltip.prefix} ${isNaN(z.value)?"-":Number(z.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${Se}: <b>${t.value.style.tooltip.prefix} ${isNaN(se.value)?"-":Number(se.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${Be}: <b>${t.value.style.tooltip.prefix} ${isNaN(ue.value)?"-":Number(ue.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+="</div>",E.value=`<div style="text-align:right">${n}</div>`}V.value=!0}function be(){le()}const g=e.ref(null);async function le(){(t.value.style.zoom.startIndex!==null||t.value.style.zoom.endIndex!==null)&&g.value?(t.value.style.zoom.startIndex!==null&&(await e.nextTick(),await e.nextTick(),g.value&&g.value.setStartValue(t.value.style.zoom.startIndex)),t.value.style.zoom.endIndex!==null&&(await e.nextTick(),await e.nextTick(),g.value&&g.value.setEndValue(we(t.value.style.zoom.endIndex+1)))):(c.value={start:0,end:w.value},C.value+=1)}function we(l){const a=w.value;return l>a?a:l<0||t.value.style.zoom.startIndex!==null&&l<t.value.style.zoom.startIndex?t.value.style.zoom.startIndex!==null?t.value.style.zoom.startIndex+1:1:l}function oe(){e.nextTick(()=>{const l=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume],a=v.value.map(y=>[y.period,y.open.value,y.high.value,y.low.value,y.last.value,y.volume]),o=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),n=s.createCsvContent(o);s.downloadCsv({csvContent:n,title:t.value.style.title.text||"vue-ui-candlestick"})})}const S=e.computed(()=>{const l=v.value.map(n=>[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" height="12" width="12" style="margin-right: 6px"><rect x="0" y="0" height="12" width="12" :rx="${t.value.style.layout.candle.borderRadius*3}" fill="${t.value.style.layout.candle.gradient.show?n.isBullish?`url(#bullish_gradient_${h.value}`:`url(#bearish_gradient_${h.value})`:n.isBullish?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg> ${n.period}`,`${t.value.table.td.prefix} ${isNaN(n.open.value)?"-":Number(n.open.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.high.value)?"-":Number(n.high.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.low.value)?"-":Number(n.low.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.last.value)?"-":Number(n.last.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${isNaN(n.volume)?"-":n.volume.toLocaleString()}`]),a={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},o=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume];return{head:o,body:l,config:a,colNames:o}}),k=e.ref(!1);function Ce(l){k.value=l,R.value+=1}function ae(){p.value.showTable=!p.value.showTable}function ne(){p.value.showTooltip=!p.value.showTooltip}const B=e.ref(!1);function P(){B.value=!B.value}return ye({generatePdf:Q,generateCsv:oe,generateImage:Z,toggleTable:ae,toggleTooltip:ne,toggleAnnotator:P}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"candlestickChart",ref:b,class:e.normalizeClass(`vue-ui-candlestick ${k.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`position:relative;font-family:${t.value.style.fontFamily}; text-align:center;background:${t.value.style.backgroundColor}; ${t.value.responsive?"height: 100%":""}`),id:`vue-ui-candlestick_${h.value}`,onMouseenter:a[4]||(a[4]=()=>e.unref(W)(!0)),onMouseleave:a[5]||(a[5]=()=>e.unref(W)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe._sfc_main,{key:0,svgRef:e.unref(j),backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:B.value,onClose:P},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),fe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:M,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:L,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ze._sfc_main,{key:`title_${H.value}`,config:{title:{cy:"candlestick-div-title",...t.value.style.title},subtitle:{cy:"candlestick-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value&&(e.unref(G)||e.unref(A))?(e.openBlock(),e.createBlock(ce.UserOptions,{ref_key:"details",ref:pe,key:`user_options_${R.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(K),isPrinting:e.unref(J),uid:h.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:Ce,onGeneratePdf:e.unref(Q),onGenerateCsv:oe,onGenerateImage:e.unref(Z),onToggleTable:ae,onToggleTooltip:ne,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(G)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:n})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:j,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${i.value.height<=0?10:i.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(Ie._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:u.value.left,y:u.value.top,width:u.value.width,height:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Me)):e.createCommentVNode("",!0),v.value.length>0?(e.openBlock(),e.createElementBlock("g",qe,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`bearish_gradient_${h.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bearish},null,8,We),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(s.shiftHue)(t.value.style.layout.candle.colors.bearish,.02)}DE`},null,8,Ge),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(s.shiftHue)(t.value.style.layout.candle.colors.bearish,.05)}66`},null,8,je)],8,He),e.createElementVNode("linearGradient",{id:`bullish_gradient_${h.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bullish},null,8,Ye),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(s.shiftHue)(t.value.style.layout.candle.colors.bullish,.02)}DE`},null,8,Je),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(s.shiftHue)(t.value.style.layout.candle.colors.bullish,.05)}66`},null,8,Ke)],8,Xe)]),t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Qe,[e.createElementVNode("line",{x1:u.value.left,x2:u.value.left,y1:u.value.top,y2:u.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ze),e.createElementVNode("line",{x1:u.value.left,x2:u.value.right,y1:u.value.bottom,y2:u.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,et)])):e.createCommentVNode("",!0),t.value.style.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value>=m.value.min&&o.value<=m.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:u.value.left,x2:u.value.left-5,y1:o.y,y2:o.y,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,lt)):e.createCommentVNode("",!0),o.value>=m.value.min&&o.value<=m.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:u.value.left-8+t.value.style.layout.grid.yAxis.dataLabels.offsetX,y:o.y+i.value.yAxisFontSize/3,"font-size":i.value.yAxisFontSize,"text-anchor":"end",fill:t.value.style.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.prefix)+" "+e.toDisplayString(e.unref(s.canShowValue)(o.value)?o.value.toFixed(t.value.style.layout.grid.yAxis.dataLabels.roundingValue):"")+" "+e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.suffix),9,ot)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),t.value.style.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{transform:`translate(${u.value.left+r.value*n+r.value/2}, ${u.value.bottom+i.value.xAxisFontSize*2+t.value.style.layout.grid.xAxis.dataLabels.offsetY}), rotate(${t.value.style.layout.grid.xAxis.dataLabels.rotation})`,"text-anchor":t.value.style.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":i.value.xAxisFontSize,fill:t.value.style.layout.grid.xAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.xAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(o),9,nt)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("line",{x1:o.open.x,x2:o.open.x,y1:o.high.y,y2:o.low.y,stroke:t.value.style.layout.wick.stroke,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,st),t.value.style.layout.wick.extremity.shape==="circle"?(e.openBlock(),e.createElementBlock("g",ut,[e.createElementVNode("circle",{cx:o.high.x,cy:o.high.y,r:t.value.style.layout.wick.extremity.size==="auto"?r.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,rt),e.createElementVNode("circle",{cx:o.low.x,cy:o.low.y,r:t.value.style.layout.wick.extremity.size==="auto"?r.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,it)])):e.createCommentVNode("",!0),t.value.style.layout.wick.extremity.shape==="line"?(e.openBlock(),e.createElementBlock("g",dt,[e.createElementVNode("line",{x1:o.high.x-(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:o.high.x+(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:o.high.y,y2:o.high.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,ct),e.createElementVNode("line",{x1:o.low.x-(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:o.low.x+(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:o.low.y,y2:o.low.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,vt)])):e.createCommentVNode("",!0)]))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-r.value/2+r.value*(1-t.value.style.layout.candle.widthRatio)/2,y:o.isBullish?o.last.y:o.open.y,height:Math.abs(o.last.y-o.open.y)<=0?1e-4:Math.abs(o.last.y-o.open.y),width:r.value*t.value.style.layout.candle.widthRatio<=0?1e-4:r.value*t.value.style.layout.candle.widthRatio,fill:t.value.style.layout.candle.gradient.underlayer,rx:t.value.style.layout.candle.borderRadius,stroke:"none"},null,8,yt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-r.value/2+r.value*(1-t.value.style.layout.candle.widthRatio)/2,y:o.isBullish?o.last.y:o.open.y,height:Math.abs(o.last.y-o.open.y)<=0?1e-4:Math.abs(o.last.y-o.open.y),width:r.value*t.value.style.layout.candle.widthRatio<=0?1e-4:r.value*t.value.style.layout.candle.widthRatio,fill:o.isBullish?t.value.style.layout.candle.gradient.show?`url(#bullish_gradient_${h.value})`:t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.gradient.show?`url(#bearish_gradient_${h.value})`:t.value.style.layout.candle.colors.bearish,rx:t.value.style.layout.candle.borderRadius,stroke:t.value.style.layout.candle.stroke,"stroke-width":t.value.style.layout.candle.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,ht))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:u.value.left+n*r.value,y:u.value.top,height:u.value.height<=0?1e-4:u.value.height,width:r.value<=0?1e-4:r.value,fill:T.value===n?e.unref(s.setOpacity)(t.value.style.layout.selector.color,t.value.style.layout.selector.opacity):"transparent",onMouseover:y=>xe(n,o),onMouseleave:a[0]||(a[0]=y=>{T.value=void 0,V.value=!1})},null,40,pt))),256))])])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,De)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ft,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(J)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te.default,{key:6,config:{type:"candlesticks",style:{backgroundColor:t.value.style.backgroundColor,candlesticks:{axis:{color:"#CCCCCC"},candle:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.zoom.show&&x.value?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartSlicer",ref:U},[(e.openBlock(),e.createBlock(Ae.Slicer,{ref_key:"slicerComponent",ref:g,key:`slicer_${C.value}`,background:t.value.style.zoom.color,borderColor:t.value.style.backgroundColor,fontSize:t.value.style.zoom.fontSize,useResetSlot:t.value.style.zoom.useResetSlot,labelLeft:f.dataset[c.value.start]?f.dataset[c.value.start][0]:f.dataset[0][0],labelRight:f.dataset[c.value.end-1]?f.dataset[c.value.end-1][0]:f.dataset.at(-1)[0],textColor:t.value.style.color,inputColor:t.value.style.zoom.color,selectColor:t.value.style.zoom.highlightColor,max:w.value,min:0,valueStart:c.value.start,valueEnd:c.value.end,start:c.value.start,"onUpdate:start":a[1]||(a[1]=o=>c.value.start=o),end:c.value.end,"onUpdate:end":a[2]||(a[2]=o=>c.value.end=o),refreshStartPoint:t.value.style.zoom.startIndex!==null?t.value.style.zoom.startIndex:0,refreshEndPoint:t.value.style.zoom.endIndex!==null?t.value.style.zoom.endIndex+1:w.value,enableRangeHandles:t.value.style.zoom.enableRangeHandles,enableSelectionDrag:t.value.style.zoom.enableSelectionDrag,onReset:be},{"reset-action":e.withCtx(({reset:o})=>[e.renderSlot(l.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:o})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag"]))],512)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[e.renderSlot(l.$slots,"legend",{legend:v.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:D,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ve._sfc_main,{show:p.value.showTooltip&&V.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:b.value,content:E.value,isFullscreen:k.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...I.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...I.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),x.value?(e.openBlock(),e.createBlock(Fe.default,{key:9,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ee.DataTable,{key:`table_${q.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:a[3]||(a[3]=o=>p.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createElementVNode("div",{innerHTML:o},null,8,mt)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ue))}},kt=Oe._export_sfc(gt,[["__scopeId","data-v-83916fa7"]]);exports.default=kt;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-Cn2tUOoX.cjs"),ue=require("./useNestedProp-C8955nsn.cjs"),Q=require("./usePrinter-BrH80VBz.cjs"),se=require("./vue-ui-skeleton-Mcoev-5q.cjs"),de=require("./useUserOptionState-BgepsfED.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],pe=["height"],fe=["data-cell","height"],me={key:2,ref:"source",dir:"auto"},he={__name:"vue-ui-carousel-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(b,{expose:W}){const{vue_ui_carousel_table:Y}=u.useConfig(),r=b,x=e.ref(u.createUid()),z=e.ref(!1),k=e.ref(!!r.dataset),Z=e.useSlots();e.onMounted(()=>{F()}),e.onMounted(()=>{Z["chart-background"]&&console.warn("VueUiCarouselTable does not support the #chart-background slot.")});function F(){u.objectIsEmpty(r.dataset)?u.error({componentName:"VueUiCarouselTable",type:"dataset"}):((!r.dataset.head||u.objectIsEmpty(r.dataset.head))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"head"}),k.value=!1),(!r.dataset.body||u.objectIsEmpty(r.dataset.body))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"body"}),k.value=!1))}const t=e.computed({get:()=>V(),set:o=>o}),{userOptionsVisible:A,setUserOptionsVisibility:P,keepUserOptionState:N}=de.useUserOptionState({config:t.value});function V(){return ue.useNestedProp({userConfig:r.config,defaultConfig:Y})}e.watch(()=>r.config,o=>{t.value=V(),A.value=!t.value.userOptions.showOnChartHover,F()},{deep:!0}),e.watch(()=>r.dataset,o=>{O()},{deep:!0});const{isPrinting:R,isImaging:M,generatePdf:_,generateImage:q}=Q.usePrinter({elementId:`carousel-table_${x.value}`,fileName:t.value.caption.text||"vue-ui-carousel-table",options:t.value.userOptions.print}),v=e.ref({showAnimation:t.value.animation.use}),l=e.ref(null),U=e.ref(null),C=e.ref(null),T=e.ref(null),$=e.ref(0),B=e.ref(0),S=e.ref(!1),w=e.ref(null),f=e.ref(null),y=e.ref(0);function O(){w.value&&(f.value={elements:w.value.getElementsByTagName("tr"),heights:Array.from(w.value.getElementsByTagName("tr")).map(o=>o.getBoundingClientRect().height)})}e.onMounted(O);const ee=e.computed(()=>!f.value||!f.value.heights.length?0:Math.max(...f.value.heights)+$.value+B.value),te=e.computed(()=>r.dataset.body?t.value.tbody.tr.visible<=r.dataset.body.length?t.value.tbody.tr.visible:r.dataset.body.length:0),oe=e.computed(()=>(t.value.tbody.tr.height+t.value.tbody.tr.td.padding.top+t.value.tbody.tr.td.padding.bottom+t.value.tbody.tr.border.size*2)*te.value+$.value+B.value),d=e.ref(0),m=e.ref(null),s=e.ref(0),h=e.ref(!1),H=e.ref(0);e.onMounted(()=>{C.value&&($.value=C.value.getBoundingClientRect().height),T.value&&(B.value=T.value.getBoundingClientRect().height),v.value.showAnimation&&f.value&&L()}),e.onMounted(()=>{if(l.value){let a=function(){const i=o.getBoundingClientRect().bottom;n.forEach(p=>{p.getBoundingClientRect().top<i?p.style.visibility="hidden":p.style.visibility="visible"})};const o=l.value.querySelector("thead"),n=Array.from(w.value.querySelectorAll("tr"));l.value.addEventListener("scroll",a),a(),e.onBeforeUnmount(()=>{l.value.removeEventListener("scroll",a)})}});function ae(o){z.value=o,H.value+=1}function L(){!m.value&&!h.value&&(t.value.animation.type==="scroll"?m.value=requestAnimationFrame(D):m.value=requestAnimationFrame(G))}function ne(){if(!l.value)return!1;const{scrollTop:o,scrollHeight:n,clientHeight:a}=l.value;return o+a>=n}function D(o){if(h.value)return;s.value||(s.value=o),o-s.value>=t.value.animation.speedMs&&(d.value+=f.value.heights[y.value],(ne()||y.value>=f.value.heights.length)&&(d.value=0,y.value=-1),y.value+=1,l.value&&l.value.scrollTo({top:d.value,behavior:"smooth"}),s.value=o),m.value=requestAnimationFrame(D)}function G(o){if(h.value)return;s.value||(s.value=o);const n=o-s.value,a=t.value.animation.speedMs/4/1e3;n>=a&&(d.value+=a,d.value>=l.value.scrollHeight-l.value.clientHeight&&(d.value=0),l.value&&l.value.scrollTo({top:d.value,behavior:"auto"}),s.value=o),m.value=requestAnimationFrame(G)}function c(){h.value=!0,cancelAnimationFrame(m.value),m.value=null}e.onBeforeUnmount(c);function g(){!h.value||!v.value.showAnimation||(h.value=!1,s.value=0,L())}function le(){t.value.animation.pauseOnHover&&c()}const I=e.ref(null);function re(){c(),clearTimeout(I.value)}function j(){clearTimeout(I.value),I.value=setTimeout(g,1e3)}e.watch(()=>t.value.animation.use,o=>{o?(v.value.showAnimation=!0,g()):(v.value.showAnimation=!1,c())}),e.watch(()=>t.value.animation.type,o=>{c(),d.value=0,y.value=0,l.value.scrollTo({top:0,behavior:"auto"}),g()});const ie=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{const o=new ResizeObserver(n=>{n.forEach(a=>{S.value=a.contentRect.width<ie.value}),$.value=C.value?C.value.getBoundingClientRect().height:0,B.value=T.value?T.value.getBoundingClientRect().height:0,y.value=0,e.nextTick(()=>{c(),s.value=0,d.value=0,O(),g()})});l.value&&o.observe(l.value)});function X(){_()}function J(){v.value.showAnimation=!v.value.showAnimation,v.value.showAnimation?g():c()}function K(){e.nextTick(()=>{const o=r.dataset.head.map((i,p)=>[[r.dataset.body[p]]]),n=[[t.value.caption.text],[r.dataset.head.map(i=>[i])]].concat(o),a=u.createCsvContent(n);u.downloadCsv({csvContent:a,title:t.value.caption.text||"vue-ui-carousel-table"})})}return W({pauseAnimation:c,resumeAnimation:g,toggleAnimation:J,generateCsv:K,generatePdf:X,generateImage:q}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-carousel-table",style:{position:"relative",overflow:"visible"},ref_key:"chartContainer",ref:U,onMouseenter:n[5]||(n[5]=()=>e.unref(P)(!0)),onMouseleave:n[6]||(n[6]=()=>e.unref(P)(!1))},[e.createElementVNode("div",{ref_key:"tableContainer",ref:l,id:`carousel-table_${x.value}`,style:e.normalizeStyle({height:e.unref(R)||e.unref(M)?"auto":`${Math.max(oe.value,ee.value)}px`,containerType:"inline-size",position:"relative",overflow:"auto",fontFamily:t.value.fontFamily}),class:e.normalizeClass({"vue-ui-responsive":S.value,"is-playing":t.value.scrollbar.hide||!h.value&&t.value.scrollbar.showOnlyOnHover}),onMouseover:n[0]||(n[0]=a=>le()),onMouseleave:n[1]||(n[1]=a=>g()),onTouchstart:n[2]||(n[2]=a=>re()),onTouchend:n[3]||(n[3]=a=>j()),onTouchcancel:n[4]||(n[4]=a=>j())},[k.value?(e.openBlock(),e.createElementBlock("table",{key:0,class:"vue-data-ui-carousel-table",style:e.normalizeStyle({...t.value.style,border:`${t.value.border.size}px solid ${t.value.border.color}`,width:"100%",borderCollapse:"collapse",backgroundColor:t.value.tbody.backgroundColor})},[e.createElementVNode("caption",{ref_key:"caption",ref:C,class:"vue-data-ui-carousel-table-caption",style:e.normalizeStyle({...t.value.caption.style,fontFamily:"inherit",position:"sticky",top:0,zIndex:2,paddingTop:t.value.caption.padding.top+"px",paddingRight:t.value.caption.padding.right+"px",paddingBottom:t.value.caption.padding.bottom+"px",paddingLeft:t.value.caption.padding.left+"px",boxShadow:S.value?t.value.thead.tr.style.boxShadow:"none",minHeight:"36px",display:o.$slots.caption||t.value.caption.text||t.value.userOptions.show?"":"none"})},[e.createTextVNode(e.toDisplayString(t.value.caption.text&&!o.$slots.caption?t.value.caption.text:"")+" ",1),e.renderSlot(o.$slots,"caption",{},void 0,!0)],4),e.createElementVNode("thead",{style:e.normalizeStyle({...t.value.thead.style,position:"sticky",top:`${o.$slots.caption||t.value.caption.text||t.value.userOptions.show?$.value:0}px`,zIndex:1})},[e.createElementVNode("tr",{ref_key:"tableRow",ref:T,role:"row",style:e.normalizeStyle({...t.value.thead.tr.style,border:t.value.thead.tr.border.size?`${t.value.thead.tr.border.size}px solid ${t.value.thead.tr.border.color}`:"none",boxShadow:S.value?"none":t.value.thead.tr.style.boxShadow}),height:`${t.value.thead.tr.height}px`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.dataset.head,(a,i)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",key:`th_${i}`,style:e.normalizeStyle({...t.value.thead.tr.th.style,border:t.value.thead.tr.th.border.size?`${t.value.thead.tr.th.border.size}px solid ${t.value.thead.tr.th.border.color}`:"none",paddingTop:t.value.thead.tr.th.padding.top+"px",paddingRight:t.value.thead.tr.th.padding.right+"px",paddingBottom:t.value.thead.tr.th.padding.bottom+"px",paddingLeft:t.value.thead.tr.th.padding.left+"px"})},[e.createTextVNode(e.toDisplayString(o.$slots.th?"":a)+" ",1),e.renderSlot(o.$slots,"th",e.mergeProps({ref_for:!0},{th:a,colIndex:i}),void 0,!0)],4))),128))],12,pe)],4),b.dataset.body&&b.dataset.head?(e.openBlock(),e.createElementBlock("tbody",{key:0,ref_key:"tbody",ref:w,style:{clipPath:"inset(0,0,0,0)"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.dataset.body,(a,i)=>(e.openBlock(),e.createElementBlock("tr",{style:e.normalizeStyle({...t.value.tbody.tr.style,border:`${t.value.tbody.tr.border.size}px solid ${t.value.tbody.tr.border.color}`,verticalAlign:"middle"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(p,E)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":b.dataset.head[E]||"",style:e.normalizeStyle({...t.value.tbody.tr.td.style,border:`${t.value.tbody.tr.td.border.size}px solid ${t.value.tbody.tr.td.border.color}`,backgroundColor:e.unref(u.setOpacity)(t.value.tbody.tr.td.style.backgroundColor,i%2===0&&t.value.tbody.tr.td.alternateColor?t.value.tbody.tr.td.alternateOpacity*100:100),paddingTop:t.value.tbody.tr.td.padding.top+"px",paddingRight:t.value.tbody.tr.td.padding.right+"px",paddingBottom:t.value.tbody.tr.td.padding.bottom+"px",paddingLeft:t.value.tbody.tr.td.padding.left+"px",verticalAlign:"middle"}),height:`${t.value.tbody.tr.height}px`},[e.createTextVNode(e.toDisplayString(o.$slots.td?"":p)+" ",1),e.renderSlot(o.$slots,"td",e.mergeProps({ref_for:!0},{td:p,rowIndex:i,colIndex:E}),void 0,!0)],12,fe))),256))],4))),256))],512)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],46,ce),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(se.default,{key:0,config:{type:"table"}})),t.value.userOptions.show&&k.value&&(e.unref(N)||e.unref(A))?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${H.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isPrinting:e.unref(R),isImaging:e.unref(M),uid:x.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:!1,hasLabel:!1,hasAnimation:t.value.userOptions.buttons.animation,isAnimation:!v.value.showAnimation,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:z.value,chartElement:U.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},zIndex:3,offsetX:12,onGeneratePdf:X,onGenerateCsv:K,onGenerateImage:e.unref(q),onToggleAnimation:J,onToggleFullscreen:ae,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:i})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:i})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionAnimation?{name:"optionAnimation",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionAnimation",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:i})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasAnimation","isAnimation","hasFullscreen","isFullscreen","chartElement","position","titles","onGenerateImage","style"])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",me,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],544))}},ge=ve._export_sfc(he,[["__scopeId","data-v-751c3b08"]]);exports.default=ge;
@@ -1,6 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-Cn2tUOoX.cjs"),ee=require("./usePrinter-BrH80VBz.cjs"),ge=require("./vue-ui-skeleton-Mcoev-5q.cjs"),ke=require("./BaseIcon-DY-33nfj.cjs"),_e=require("./vue-ui-accordion-7GoAZx3k.cjs"),te=require("./useNestedProp-C8955nsn.cjs"),xe=require("./PackageVersion-BxSGdh6L.cjs"),Be=require("./PenAndPaper-ByAFuR-l.cjs"),Ee=require("./useUserOptionState-BgepsfED.cjs"),Ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],we={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ze=["xmlns","viewBox"],Ve=["width","height"],$e={key:1},Te=["fill","font-weight","font-size","x","y"],Fe=["fill","font-weight","font-size","x","y"],Le=["id"],De=["stop-color"],Oe=["stop-color"],Pe=["id"],Ie=["stop-color"],Me=["stop-color"],Re=["id"],Ae=["stop-color"],Xe=["stop-color"],je=["stop-color"],Ge=["id"],Ue=["stop-color"],qe=["stop-color"],Ye=["stop-color"],He=["id"],We=["stop-color"],Ke=["stop-color"],Je=["stop-color"],Qe={key:2},Ze=["x","y","font-size","font-weight","fill"],et=["x","y","font-size","font-weight","fill"],tt=["d","stroke"],lt=["cx","cy","r","fill"],at=["cx","cy","r","fill","stroke","stroke-width","onClick"],ot={key:3},nt=["x","y","font-size","fill","onClick"],rt={key:0},st=["x","y","fill","font-size","font-weight"],ut=["x","y","height","width","fill","rx","onClick"],ct=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],it={key:4},dt=["x","y","fill","font-size","onClick"],yt=["d","stroke"],vt=["fill","cx","cy","r","onClick"],ht={key:5},pt=["x","y","font-size","font-weight","fill"],ft=["x1","x2","y1","y2","stroke","stroke-width"],mt=["y","height","width"],bt={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},gt={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},kt={viewBox:"0 0 20 20",height:"16",width:"16"},_t=["fill"],xt={key:7},Bt=["y","height","width"],Et={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},Nt={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},St={viewBox:"0 0 20 20",height:"16",width:"16"},Ct=["fill"],wt=["cx","cy","fill"],zt=["d","stroke"],Vt=["cx","cy","fill"],$t=["d","stroke"],Tt=["cx","cy","fill"],Ft=["cx","cy","fill"],Lt=["x","y","fill","font-size","font-weight"],Dt=["x","y","fill","font-size","font-weight"],Ot=["x","text-anchor","y","fill","font-size"],Pt=["x","text-anchor","y","fill","font-size"],It=["x","text-anchor","y","fill","font-size"],Mt=["x","text-anchor","y","fill","font-size"],Rt=["x","text-anchor","y","fill","font-size"],At=["x","y","font-size","fill"],Xt=["x","y","font-size","fill"],jt=["x","y","font-size","fill"],Gt={key:4,class:"vue-data-ui-watermark"},Ut={key:6,ref:"source",dir:"auto"},qt={style:{"padding-top":"36px",position:"relative"}},Yt={class:"vue-ui-data-table"},Ht={key:0},Wt=["data-cell"],Kt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Jt={key:0},Qt={key:1},Zt=["data-cell"],el={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},tl={key:0},ll={key:1},al=["data-cell"],ol={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},nl={key:0},rl={key:1},sl=["data-cell"],ul={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},cl={key:0},il={key:1},dl=["data-cell"],yl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},vl={key:0},hl={key:1},pl=["data-cell"],fl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ml={key:0},bl={key:1},gl=["data-cell"],kl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},_l={key:0},xl={key:1},Bl=["data-cell"],El={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Nl=["data-cell"],Sl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Cl=["data-cell"],wl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},zl=["data-cell"],Vl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},$l=["data-cell"],Tl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Fl={__name:"vue-ui-chestnut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectRoot","selectBranch","selectNut"],setup(le,{expose:ae,emit:oe}){e.useCssVars(a=>({"4b8440b7":a.tdo}));const{vue_ui_chestnut:ne}=o.useConfig(),k=le,z=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(o.createUid()),I=e.ref(null),re=e.ref(null),M=e.ref(0),t=e.computed({get:()=>j(),set:a=>a}),{userOptionsVisible:T,setUserOptionsVisibility:R,keepUserOptionState:A}=Ee.useUserOptionState({config:t.value}),{svgRef:X}=Ne.useChartAccessibility({config:t.value.style.chart.layout.title});function j(){const a=te.useNestedProp({userConfig:k.config,defaultConfig:ne});return a.theme?{...te.useNestedProp({userConfig:o.themes.vue_ui_chestnut[a.theme]||k.config,defaultConfig:a}),customPalette:o.themePalettes[a.theme]||o.palette}:a}e.watch(()=>k.config,a=>{t.value=j(),T.value=!t.value.userOptions.showOnChartHover,S.value.showTable=t.value.table.show,J()},{deep:!0});const{isPrinting:G,isImaging:U,generatePdf:q,generateImage:Y}=ee.usePrinter({elementId:`vue-ui-chestnut_${h.value}`,fileName:t.value.style.chart.layout.title.text||"vue-ui-chestnut",options:t.value.userOptions.print}),se=e.computed(()=>t.value.userOptions.show),F=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),S=e.ref({showTable:t.value.table.show}),L=e.ref(null),H=e.ref(!1),ue=e.computed(()=>t.value.table.responsiveBreakpoint),r=e.ref({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),f=e.computed(()=>({left:r.value.padding.left,top:r.value.padding.top,right:r.value.width-r.value.padding.right,bottom:r.value.height-r.value.padding.bottom,width:r.value.width-(r.value.padding.left+r.value.padding.right),height:r.value.height-(r.value.padding.top+r.value.padding.bottom),seedX:r.value.padding.left+64})),_=e.computed(()=>z.value?k.dataset.flatMap(a=>(a.branches||[]).map(s=>s.value||0)).reduce((a,s)=>a+s,0):0),m=e.computed(()=>(k.dataset.forEach((a,s)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","branches"]}).forEach(l=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:l,index:s})}),a.branches&&a.branches.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(d=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:d,index:`${s} - ${n}`})}),l.breakdown&&l.breakdown.forEach((d,i)=>{o.getMissingDatasetAttributes({datasetObject:d,requiredAttributes:["name","value"]}).forEach(y=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:y,index:`${s} - ${n} - ${i}`})})})})}),k.dataset.map((a,s)=>{const l=(a.branches||[]).map(n=>n.value||0).reduce((n,d)=>n+d,0);return{...a,color:o.convertColorToHex(a.color)||F.value[s]||o.palette[s]||o.palette[s%o.palette.length],id:a.id||`root_${s}_${h.value}`,type:"root",total:l,rootIndex:s,branches:(a.branches||[]).map((n,d)=>({...n,rootName:a.name,rootIndex:s,color:o.convertColorToHex(a.color)||F.value[s]||o.palette[s]||o.palette[s%o.palette.length],value:n.value>=0?n.value:0,id:n.id||`branch_${s}_${d}_${h.value}`,proportionToRoot:n.value/l,type:"branch",breakdown:(n.breakdown||[]).map((i,y)=>({table:{rootName:a.name,rootValue:l,rootToTotal:l/_.value,branchName:n.name,branchValue:n.value,branchToTotal:n.value/_.value,branchToRoot:n.value/l,nutName:i.name,nutValue:i.value,nutToTotal:i.value/_.value,nutToRoot:i.value/l,nutToBranch:i.value/n.value},...i,type:"nut",branchName:n.name,rootName:a.name,branchTotal:n.value>=0?n.value:0,proportionToBranch:i.value/n.value,proportionToRoot:i.value/l,proportionToTree:i.value/_.value,rootIndex:s,id:i.id||`nut_${s}_${d}_${y}_${h.value}`,color:o.convertColorToHex(i.color)||F.value[y]||o.palette[y]||o.palette[y%o.palette.length],value:i.value>=0?i.value:0}))}))}})));function ce(){return m.value}const C=oe,ie=e.computed(()=>m.value.flatMap(a=>a.branches).length),de=e.computed(()=>Math.max(...m.value.map(a=>a.branches.map(s=>s.value).reduce((s,l)=>s+l,0)))),ye=e.computed(()=>Math.max(...m.value.flatMap(a=>a.branches.map(s=>s.value)))),W=e.computed(()=>256+r.value.padding.left),B=e.computed(()=>m.value.sort((a,s)=>s.total-a.total).map((a,s)=>{const l=f.value.height/m.value.length/2,n=a.total/de.value*(l>64?64:l);return{...a,x:f.value.seedX,y:f.value.top+f.value.height/m.value.length*(s+1)-(f.value.height/m.value.length/2+r.value.gap/2),r:n<r.value.branchSize/2?r.value.branchSize/2:n}})),ve=e.computed(()=>t.value.style.chart.layout.branches.widthRatio<=0?.1:t.value.style.chart.layout.branches.widthRatio>1.8?1.8:t.value.style.chart.layout.branches.widthRatio),he=e.computed(()=>B.value.flatMap(a=>a.branches)),E=e.computed(()=>he.value.sort((a,s)=>s.value-a.value).map((a,s)=>({...a,y1:s*r.value.branchSize+f.value.top+s*r.value.gap,y2:s*r.value.branchSize+r.value.branchSize,x1:W.value,x2:384*a.value/ye.value*ve.value+W.value})));function D(a){const s=B.value.find(l=>l.rootIndex===a.rootIndex);return{x:s.x,y:s.y,r:s.r}}const u=e.ref(null),x=e.ref(null),v=e.ref(null),b=e.ref(null);function p(){u.value=null,v.value=null,b.value=null}function g(a){return b.value?b.value===null?!0:a.type==="root"?a.id===b.value.id:a.rootIndex===b.value.rootIndex:u.value===null&&v.value===null?!0:a.type==="nut"?u.value.id===a.id:a.type==="branch"?v.value.id===a.id:a.type==="root"?v.value&&v.value.rootIndex===a.rootIndex||u.value&&u.value.rootIndex===a.rootIndex:!1}function pe(a){p(),e.nextTick(()=>{u.value=a,v.value=a,x.value=o.makeDonut({series:a.breakdown,base:1},a.x2+24+t.value.style.chart.layout.nuts.offsetX,a.y1+r.value.branchSize/2,80,80),C("selectNut",a.breakdown)})}function N(){u.value=null,x.value=null,C("selectNut",null)}function O(a){v.value&&v.value.id===a.id?(v.value=null,p(),C("selectBranch",null)):(p(),v.value=a,C("selectBranch",a))}function K(a){b.value&&b.value.id===a.id?(p(),C("selectRoot",null)):(p(),b.value=a,C("selectRoot",a))}function fe(){return f.value.bottom-(u.value.y1+180)<0?0:f.value.bottom}function w(a){return a.proportion*100>t.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}function me(){const a=new ResizeObserver(s=>{s.forEach(l=>{H.value=l.contentRect.width<ue.value})});L.value&&a.observe(L.value)}e.onMounted(()=>{J()});function J(){o.objectIsEmpty(k.dataset)&&o.error({componentName:"VueUiChestnut",type:"dataset"});const a=ie.value*(r.value.branchSize+r.value.gap)+r.value.padding.top+r.value.padding.bottom;r.value.height=a,me()}const c=e.computed(()=>{const a=[t.value.table.th.translations.rootName,t.value.table.th.translations.rootValue,t.value.table.th.translations.rootToTotal,t.value.table.th.translations.branchName,t.value.table.th.translations.branchValue,t.value.table.th.translations.branchToRoot,t.value.table.th.translations.branchToTotal,t.value.table.th.translations.nutName,t.value.table.th.translations.nutValue,t.value.table.th.translations.nutToBranch,t.value.table.th.translations.nutToRoot,t.value.table.th.translations.nutToTotal],s=m.value.flatMap((l,n)=>l.branches.flatMap((d,i)=>d.breakdown.flatMap((y,Dl)=>y.table)));return{head:a,body:s}});function Q(){e.nextTick(()=>{const a=[[t.value.style.chart.layout.title.text],[t.value.style.chart.layout.title.subtitle.text],[""],["Grand total",_.value],[""]],s=c.value.head,l=c.value.body.map((i,y)=>[c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootName,c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootValue,c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootToTotal,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchName,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchValue,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchToRoot,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchToTotal,i.nutName,i.nutValue,i.nutToBranch,i.nutToRoot,i.nutToTotal]),n=a.concat([s]).concat(l),d=o.createCsvContent(n);o.downloadCsv({csvContent:d,title:t.value.style.chart.layout.title.text||"vue-ui-chestnut"})})}const V=e.ref(!1);function be(a){V.value=a,M.value+=1}function Z(){S.value.showTable=!S.value.showTable}const $=e.ref(!1);function P(){$.value=!$.value}return ae({getData:ce,generatePdf:q,generateCsv:Q,generateImage:Y,toggleTable:Z,toggleAnnotator:P}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-chestnut ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"chestnutChart",ref:I,id:`vue-ui-chestnut_${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:s[2]||(s[2]=()=>e.unref(R)(!0)),onMouseleave:s[3]||(s[3]=()=>e.unref(R)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Be._sfc_main,{key:0,svgRef:e.unref(X),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:P},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",we,null,512)):e.createCommentVNode("",!0),t.value.userOptions.show&&z.value&&(e.unref(A)||e.unref(T))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref_key:"details",ref:re,key:`user_options_${M.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(U),isPrinting:e.unref(G),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:I.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:be,onGeneratePdf:e.unref(q),onGenerateCsv:Q,onGenerateImage:e.unref(Y),onToggleTable:Z,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(A)?e.unref(T)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),r.value.height>0&&z.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:X,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(xe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width<=0?10:r.value.width,height:r.value.height<=0?10:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Ve)):e.createCommentVNode("",!0),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("g",$e,[t.value.style.chart.layout.title.text?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",fill:t.value.style.chart.layout.title.color,"font-weight":t.value.style.chart.layout.title.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.fontSize,x:r.value.width/2,y:12+t.value.style.chart.layout.title.fontSize+t.value.style.chart.layout.title.offsetY,onClick:p},e.toDisplayString(t.value.style.chart.layout.title.text),9,Te)):e.createCommentVNode("",!0),t.value.style.chart.layout.title.subtitle.text?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",fill:t.value.style.chart.layout.title.subtitle.color,"font-weight":t.value.style.chart.layout.title.subtitle.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.subtitle.fontSize,x:r.value.width/2,y:48+t.value.style.chart.layout.title.subtitle.fontSize+t.value.style.chart.layout.title.subtitle.offsetY,onClick:p},e.toDisplayString(t.value.style.chart.layout.title.subtitle.text),9,Fe)):e.createCommentVNode("",!0)])),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`root_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(l.color,.05),100-t.value.style.chart.layout.roots.gradientIntensity)},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,Oe)],8,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,l=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`branch_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,Ie),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(l.color,.02),100-t.value.style.chart.layout.branches.gradientIntensity)},null,8,Me)],8,Pe))),256)),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nutpick_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ae),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.selected.gradientIntensity)},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,je)],8,Re),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ue),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.gradientIntensity)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ye)],8,Ge),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_underlayer_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,100)},null,8,We),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,60)},null,8,Ke),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,0)},null,8,Je)],8,He)]),t.value.style.chart.layout.grandTotal.show?(e.openBlock(),e.createElementBlock("g",Qe,[e.createElementVNode("text",{x:f.value.seedX,y:32+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:p},e.toDisplayString(t.value.style.chart.layout.grandTotal.text),9,Ze),e.createElementVNode("text",{x:f.value.seedX,y:38+t.value.style.chart.layout.grandTotal.fontSize+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:p},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.grandTotal.formatter,_.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.grandTotal.prefix,v:_.value,s:t.value.style.chart.layout.grandTotal.suffix,r:t.value.style.chart.layout.grandTotal.roundingValue}))),9,et)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.branchSize,(n,d)=>(e.openBlock(),e.createElementBlock("path",{d:`M
2
- ${l.x1},${l.y1+d}
3
- C${l.x1-20},${l.y1+d}
4
- ${l.x1-80},${l.y1+d}
5
- ${D(l).x+D(l).r/2}, ${D(l).y}
6
- `,stroke:e.unref(o.setOpacity)(l.color,t.value.style.chart.layout.links.opacity),fill:"none","stroke-width":"2","shape-rendering":"cirspEdges",style:e.normalizeStyle(`opacity:${g(l)?1:0}`),onClick:p},null,12,tt))),256))]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,l=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,r:l.r,fill:t.value.style.chart.layout.roots.underlayerColor,stroke:"none",style:e.normalizeStyle(`cursor:pointer; opacity:${g(l)?1:.05}`)},null,12,lt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(l,n)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,r:l.r,fill:t.value.style.chart.layout.roots.useGradient?`url(#root_gradient_${h.value}_${l.rootIndex})`:l.color,stroke:t.value.style.chart.layout.roots.stroke,"stroke-width":t.value.style.chart.layout.roots.strokeWidth,style:e.normalizeStyle(`cursor:pointer; opacity:${g(l)?1:.05}`),onClick:d=>K(l)},null,12,at))),256)),t.value.style.chart.layout.roots.labels.show?(e.openBlock(),e.createElementBlock("g",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(l,n)=>(e.openBlock(),e.createElementBlock("text",{x:l.x,y:l.y+t.value.style.chart.layout.roots.labels.fontSize/2.6,"text-anchor":"middle","font-size":t.value.style.chart.layout.roots.labels.fontSize,fill:t.value.style.chart.layout.roots.labels.adaptColorToBackground?e.unref(o.adaptColorToBackground)(l.color):t.value.style.chart.layout.roots.labels.color,"font-weight":"bold",style:e.normalizeStyle(`cursor:pointer; opacity:${g(l)?1:.05}`),onClick:d=>K(l)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.roots.labels.formatter,l.total,e.unref(o.dataLabel)({p:t.value.style.chart.layout.roots.labels.prefix,v:l.total,s:t.value.style.chart.layout.roots.labels.suffix,r:t.value.style.chart.layout.roots.labels.roundingValue}),{datapoint:l})),13,nt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,l=>(e.openBlock(),e.createElementBlock("g",null,[u.value&&l.rootIndex===u.value.rootIndex||v.value&&l.rootIndex===v.value.rootIndex||b.value&&l.rootIndex===b.value.rootIndex?(e.openBlock(),e.createElementBlock("g",rt,[e.createElementVNode("text",{x:l.x,y:l.y+l.r+24,"text-anchor":"middle",fill:t.value.style.chart.layout.roots.labels.name.color,"font-size":t.value.style.chart.layout.roots.labels.name.fontSize,"font-weight":t.value.style.chart.layout.roots.labels.name.bold?"bold":"normal",onClick:p},e.toDisplayString(l.name),9,st)])):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("rect",{x:l.x1,y:l.y1,height:r.value.branchSize,width:l.x2-l.x1,fill:t.value.style.chart.layout.branches.underlayerColor,rx:t.value.style.chart.layout.branches.borderRadius,stroke:"none",style:e.normalizeStyle(`opacity:${g(l)?1:.05}`),onClick:n=>O(l)},null,12,ut))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(l,n)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x1,y:l.y1,height:r.value.branchSize,width:l.x2-l.x1,fill:t.value.style.chart.layout.branches.useGradient?`url(#branch_gradient_${h.value}_${l.rootIndex})`:l.color,rx:t.value.style.chart.layout.branches.borderRadius,stroke:t.value.style.chart.layout.branches.stroke,"stroke-width":t.value.style.chart.layout.branches.strokeWidth,style:e.normalizeStyle(`cursor:pointer; opacity:${g(l)?1:.05}`),onClick:d=>O(l)},null,12,ct))),256)),t.value.style.chart.layout.branches.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("g",null,[l.proportionToRoot*100>t.value.style.chart.layout.branches.labels.dataLabels.hideUnderValue?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.x1+6,y:l.y1+r.value.branchSize/1.5,"text-anchor":"start",fill:e.unref(o.adaptColorToBackground)(l.color),"font-size":t.value.style.chart.layout.branches.labels.dataLabels.fontSize,"font-weight":"bold",style:e.normalizeStyle(`cursor:pointer; opacity:${g(l)?1:.05}`),onClick:n=>O(l)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.branches.labels.dataLabels.formatter,l.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.branches.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.branches.labels.dataLabels.suffix,r:t.value.style.chart.layout.branches.labels.dataLabels.roundingValue}),{datapoint:l})),13,dt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o.makeDonut)({series:l.breakdown,base:1},l.x2+24+t.value.style.chart.layout.nuts.offsetX,l.y1+r.value.branchSize/2,r.value.branchSize/3,r.value.branchSize/3),(d,i)=>(e.openBlock(),e.createElementBlock("path",{d:d.path,stroke:d.color,"stroke-width":10,fill:"none",style:e.normalizeStyle(`opacity:${g(l)?1:.1}`)},null,12,yt))),256)),e.createElementVNode("circle",{fill:t.value.style.chart.layout.nuts.useGradient?`url(#nut_${h.value})`:"transparent",cx:l.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:l.y1+r.value.branchSize/2,r:r.value.branchSize/2+2,onClick:d=>pe(l),style:e.normalizeStyle(`cursor:pointer;opacity:${g(l)?1:.1}`)},null,12,vt)]))),256)),t.value.style.chart.layout.branches.labels.show&&!v.value?(e.openBlock(),e.createElementBlock("g",ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("text",{x:l.x2+r.value.branchSize+24+t.value.style.chart.layout.nuts.offsetX,y:l.y1+r.value.branchSize/2+5,"font-size":t.value.style.chart.layout.branches.labels.fontSize,"font-weight":t.value.style.chart.layout.branches.labels.bold?"bold":"normal",fill:t.value.style.chart.layout.branches.labels.color,"text-anchor":"start",style:e.normalizeStyle(`opacity:${g(l)?1:.1}`)},e.toDisplayString(l.name),13,pt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:256+r.value.padding.left,x2:256+r.value.padding.left,y1:f.value.top,y2:f.value.bottom,stroke:t.value.style.chart.layout.verticalSeparator.stroke,"stroke-width":t.value.style.chart.layout.verticalSeparator.strokeWidth},null,8,ft),!u.value&&!v.value?(e.openBlock(),e.createElementBlock("foreignObject",{key:6,x:0,y:f.value.bottom,height:r.value.height-f.value.bottom,width:r.value.width,style:{overflow:"visible"},onClick:p},[e.createElementVNode("div",bt,[e.createElementVNode("div",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,l=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`display:flex;align-items:center;gap:3px;flex-direction:row;font-size:${t.value.style.chart.layout.legend.fontSize}px;`)},[(e.openBlock(),e.createElementBlock("svg",kt,[e.createElementVNode("circle",{cx:"10",cy:"10",r:"10",fill:l.color,stroke:"none"},null,8,_t)])),e.createElementVNode("span",null,e.toDisplayString(l.name)+":",1),e.createElementVNode("b",null,e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.roots.labels.formatter,l.total,e.unref(o.dataLabel)({p:t.value.style.chart.layout.legend.prefix,v:l.total,s:t.value.style.chart.layout.legend.suffix,r:t.value.style.chart.layout.legend.roundingValue}),{datapoint:l})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(o.dataLabel)({v:l.total/_.value*100,s:"%",r:t.value.style.chart.layout.legend.roundingPercentage}))+") ",1)],4))),256))])])],8,mt)):e.createCommentVNode("",!0),u.value&&x.value?(e.openBlock(),e.createElementBlock("g",xt,[(e.openBlock(),e.createElementBlock("foreignObject",{x:0,y:fe(),height:r.value.height-f.value.bottom,width:r.value.width,style:{overflow:"visible"},onClick:p},[e.createElementVNode("div",Et,[e.createElementVNode("b",null,e.toDisplayString(u.value.name),1),e.createElementVNode("div",Nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.breakdown,(l,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`display:flex;align-items:center;gap:6px;flex-direction:row;font-size:${t.value.style.chart.layout.legend.fontSize}px;`)},[(e.openBlock(),e.createElementBlock("svg",St,[e.createElementVNode("circle",{cx:"10",cy:"10",r:"10",fill:l.color,stroke:"none"},null,8,Ct)])),e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(l.name)+": ",1),e.createElementVNode("b",null,e.toDisplayString(t.value.style.chart.layout.legend.prefix)+" "+e.toDisplayString(l.value.toFixed(t.value.style.chart.layout.nuts.selected.labels.roundingValue))+" "+e.toDisplayString(t.value.style.chart.layout.legend.suffix),1),e.createTextVNode(" ("+e.toDisplayString((l.proportionToBranch*100).toFixed(t.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"%)",1)])],4))),256))])])],8,Bt)),e.createElementVNode("circle",{cx:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:u.value.y1+r.value.branchSize/2,r:256,fill:`url(#nut_underlayer_${h.value})`,onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,wt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,l=>(e.openBlock(),e.createElementBlock("g",null,[w(l)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(o.calcNutArrowPath)(l,{x:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,y:u.value.y1+r.value.branchSize/2},16,16,!1,!1,64),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,zt)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("circle",{cx:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:u.value.y1+r.value.branchSize/2,r:118,fill:t.value.style.chart.backgroundColor,onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,Vt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,l=>(e.openBlock(),e.createElementBlock("path",{d:l.path,stroke:l.color,"stroke-width":64,fill:"none",onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,$t))),256)),e.createElementVNode("circle",{cx:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:u.value.y1+r.value.branchSize/2,r:110,fill:`url(#nutpick_${h.value})`,onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,Tt),e.createElementVNode("circle",{cx:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:u.value.y1+r.value.branchSize/2,r:64,fill:t.value.style.chart.backgroundColor,onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,Ft),e.createElementVNode("text",{x:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,y:u.value.y1+8,fill:t.value.style.chart.layout.nuts.selected.labels.core.total.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.core.total.fontSize,"font-weight":t.value.style.chart.layout.nuts.selected.labels.core.total.bold?"bold":"normal","text-anchor":"middle",onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(t.value.translations.total),11,Lt),e.createElementVNode("text",{x:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,y:u.value.y1+36,fill:t.value.style.chart.layout.nuts.selected.labels.core.value.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.core.value.fontSize,"font-weight":t.value.style.chart.layout.nuts.selected.labels.core.value.bold?"bold":"normal","text-anchor":"middle",onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.nuts.selected.labels.dataLabels.formatter,u.value.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.nuts.selected.labels.core.value.prefix,v:u.value.value,s:t.value.style.chart.layout.nuts.selected.labels.core.value.suffix,r:t.value.style.chart.layout.nuts.selected.roundingValue}),{datapoint:u.value})),11,Dt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[w(l)?(e.openBlock(),e.createElementBlock("text",{key:0,x:e.unref(o.calcMarkerOffsetX)(l).x,"text-anchor":e.unref(o.calcMarkerOffsetX)(l).anchor,y:e.unref(o.calcMarkerOffsetY)(l)-t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize/6,fill:l.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize/2,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")}," ⬤ ",14,Ot)):e.createCommentVNode("",!0),w(l)?(e.openBlock(),e.createElementBlock("text",{key:1,x:e.unref(o.calcMarkerOffsetX)(l,!0).x,"text-anchor":e.unref(o.calcMarkerOffsetX)(l,!0).anchor,y:e.unref(o.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(u.value.breakdown[n].name),15,Pt)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[w(l)?(e.openBlock(),e.createElementBlock("text",{key:0,x:e.unref(o.calcMarkerOffsetX)(l,!0).x,"text-anchor":e.unref(o.calcMarkerOffsetX)(l).anchor,y:e.unref(o.calcMarkerOffsetY)(l)+t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(e.unref(o.dataLabel)({v:u.value.breakdown[n].value/u.value.value*100,s:"%",r:t.value.style.chart.layout.nuts.selected.labels.roundingPercentage}))+" "+e.toDisplayString(t.value.translations.of)+" "+e.toDisplayString(u.value.breakdown[n].branchName)+" "+e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.nuts.selected.labels.dataLabels.formatter,u.value.breakdown[n].value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.nuts.selected.labels.dataLabels.prefix,v:u.value.breakdown[n].value,s:t.value.style.chart.layout.nuts.selected.labels.dataLabels.suffix,r:t.value.style.chart.layout.nuts.selected.roundingValue}),{datapoint:x.value,seriesIndex:n})),15,It)):e.createCommentVNode("",!0),w(l)?(e.openBlock(),e.createElementBlock("text",{key:1,x:e.unref(o.calcMarkerOffsetX)(l,!0).x,"text-anchor":e.unref(o.calcMarkerOffsetX)(l).anchor,y:e.unref(o.calcMarkerOffsetY)(l)+t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize*2,fill:t.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(e.unref(o.dataLabel)({v:u.value.breakdown[n].proportionToRoot*100,s:"%",r:t.value.style.chart.layout.nuts.selected.labels.roundingPercentage}))+" "+e.toDisplayString(t.value.translations.of)+" "+e.toDisplayString(u.value.breakdown[n].rootName),15,Mt)):e.createCommentVNode("",!0),w(l)?(e.openBlock(),e.createElementBlock("text",{key:2,x:e.unref(o.calcMarkerOffsetX)(l,!0).x,"text-anchor":e.unref(o.calcMarkerOffsetX)(l).anchor,y:e.unref(o.calcMarkerOffsetY)(l)+t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize*3,fill:t.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(e.unref(o.dataLabel)({v:u.value.breakdown[n].proportionToTree*100,s:"%",r:t.value.style.chart.layout.nuts.selected.labels.roundingPercentage}))+" "+e.toDisplayString(t.value.translations.proportionToTree),15,Rt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("g",null,[v.value&&v.value.id===l.id&&!u.value?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.x1+6,y:l.y1+r.value.branchSize+24,"font-weight":"bold","text-anchor":"start","font-size":t.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.branches.labels.color,onClick:p},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.branches.labels.dataLabels.formatter,l.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.branches.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.branches.labels.dataLabels.suffix,r:t.value.style.chart.layout.branches.labels.dataLabels.roundingValue}),{datapoint:l})),9,At)):e.createCommentVNode("",!0),v.value&&v.value.id===l.id&&!u.value?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.x1+6,y:l.y1+r.value.branchSize+48,"text-anchor":"start","font-size":t.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.branches.labels.color,onClick:p},e.toDisplayString(e.unref(o.dataLabel)({v:l.proportionToRoot*100,s:"%",r:t.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage}))+" "+e.toDisplayString(t.value.translations.of)+" "+e.toDisplayString(l.rootName),9,Xt)):e.createCommentVNode("",!0),v.value&&v.value.id===l.id&&!u.value?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.x1+6,y:l.y1+r.value.branchSize+72,"text-anchor":"start","font-size":t.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.branches.labels.color,onClick:p},e.toDisplayString(e.unref(o.dataLabel)({v:l.value/_.value*100,s:"%",r:t.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage}))+" "+e.toDisplayString(t.value.translations.proportionToTree),9,jt)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(a.$slots,"svg",{svg:r.value},void 0,!0)],14,ze)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Gt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(G)||e.unref(U)})),void 0,!0)])):e.createCommentVNode("",!0),z.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ge.default,{key:5,config:{type:"chestnut",style:{backgroundColor:t.value.style.chart.backgroundColor,chestnut:{color:"#CCCCCC"}}}},null,8,["config"])),e.renderSlot(a.$slots,"legend",{legend:m.value},void 0,!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",Ut,[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createBlock(_e.default,{key:7,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:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:L,class:"vue-ui-chestnut-table"},[e.createElementVNode("div",qt,[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:s[0]||(s[0]=l=>S.value.showTable=!1),onKeypress:s[1]||(s[1]=e.withKeys(l=>S.value.showTable=!1,["enter"]))},[e.createVNode(ke.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("div",{style:{width:"100%"},class:e.normalizeClass({"vue-ui-responsive":H.value})},[e.createElementVNode("table",Yt,[e.createElementVNode("caption",{style:e.normalizeStyle({backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline}),class:"vue-ui-data-table__caption"},[e.createTextVNode(e.toDisplayString(t.value.style.chart.layout.title.text)+" ",1),t.value.style.chart.layout.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",Ht,e.toDisplayString(t.value.style.chart.layout.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.head,l=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline}`)},e.toDisplayString(l),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.body,(l,n)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[0]},[e.createElementVNode("div",Kt,[c.value.body[n-1]&&c.value.body[n-1].rootName===l.rootName?(e.openBlock(),e.createElementBlock("span",Jt)):(e.openBlock(),e.createElementBlock("span",Qt,e.toDisplayString(l.rootName),1))])],12,Wt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[1]},[e.createElementVNode("div",el,[c.value.body[n-1]&&c.value.body[n-1].rootName===l.rootName?(e.openBlock(),e.createElementBlock("span",tl)):(e.openBlock(),e.createElementBlock("span",ll,e.toDisplayString(l.rootValue.toFixed(t.value.table.td.roundingValue)),1))])],12,Zt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[2]},[e.createElementVNode("div",ol,[c.value.body[n-1]&&c.value.body[n-1].rootName===l.rootName?(e.openBlock(),e.createElementBlock("span",nl)):(e.openBlock(),e.createElementBlock("span",rl,e.toDisplayString((l.rootToTotal*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1))])],12,al),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[3]},[e.createElementVNode("div",ul,[c.value.body[n-1]&&c.value.body[n-1].branchName===l.branchName?(e.openBlock(),e.createElementBlock("span",cl)):(e.openBlock(),e.createElementBlock("span",il,e.toDisplayString(l.branchName),1))])],12,sl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[4]},[e.createElementVNode("div",yl,[c.value.body[n-1]&&c.value.body[n-1].branchName===l.branchName?(e.openBlock(),e.createElementBlock("span",vl)):(e.openBlock(),e.createElementBlock("span",hl,e.toDisplayString(l.branchValue.toFixed(t.value.table.td.roundingValue)),1))])],12,dl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[5]},[e.createElementVNode("div",fl,[c.value.body[n-1]&&c.value.body[n-1].branchName===l.branchName?(e.openBlock(),e.createElementBlock("span",ml)):(e.openBlock(),e.createElementBlock("span",bl,e.toDisplayString((l.branchToRoot*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1))])],12,pl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[6]},[e.createElementVNode("div",kl,[c.value.body[n-1]&&c.value.body[n-1].branchName===l.branchName?(e.openBlock(),e.createElementBlock("span",_l)):(e.openBlock(),e.createElementBlock("span",xl,e.toDisplayString((l.branchToTotal*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1))])],12,gl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[7]},[e.createElementVNode("div",El,e.toDisplayString(l.nutName),1)],12,Bl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[8]},[e.createElementVNode("div",Sl,e.toDisplayString(l.nutValue.toFixed(t.value.table.td.roundingValue)),1)],12,Nl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[9]},[e.createElementVNode("div",wl,e.toDisplayString((l.nutToBranch*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1)],12,Cl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[10]},[e.createElementVNode("div",Vl,e.toDisplayString((l.nutToRoot*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1)],12,zl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[11]},[e.createElementVNode("div",Tl,e.toDisplayString((l.nutToTotal*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1)],12,$l)],6))),256))])])],2)])],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ce))}},Ll=Se._export_sfc(Fl,[["__scopeId","data-v-168b0c1a"]]);exports.default=Ll;
@@ -1,16 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),d=require("./index-Cn2tUOoX.cjs"),Qe=require("./useUserOptionState-BgepsfED.cjs"),Pe=require("./useNestedProp-C8955nsn.cjs"),Ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Je=require("./Title-D62pPwLz.cjs"),Ke=require("./PackageVersion-BxSGdh6L.cjs"),et=require("./PenAndPaper-ByAFuR-l.cjs"),tt=require("./BaseIcon-DY-33nfj.cjs"),Ae=require("./usePrinter-BrH80VBz.cjs"),ot=require("./Legend-ieOu_fKK.cjs"),at=require("./Shape-BQIcurpe.cjs"),lt=require("./DataTable-CNCnRrD-.cjs"),nt=require("./vue-ui-accordion-7GoAZx3k.cjs"),rt=require("./vue-ui-skeleton-Mcoev-5q.cjs"),Ie=require("./useResponsive-BBkmXXaa.cjs"),st=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ut=["id"],it=["xmlns","viewBox"],ct=["width","height"],dt={key:1},vt=["id","d"],ht={key:2},ft=["transform"],mt=["d","fill","stroke","stroke-width","onMouseenter","onClick"],pt=["d","fill","stroke","stroke-width"],gt=["d","fill"],bt=["d","fill","stroke","stroke-width","onMouseenter","onClick"],kt=["d","fill","stroke","stroke-width"],yt=["d","fill","stroke","stroke-width"],Ct=["d","fill","stroke","stroke-width"],$t={key:0},wt=["x1","y1","x2","y2","stroke","stroke-width"],Bt=["x1","y1","x2","y2","stroke","stroke-width"],Mt=["cx","cy","r","stroke","stroke-width","fill"],xt=["transform","fill","text-anchor","font-size","font-weight"],Pt={key:1},At=["font-size","font-weight","fill"],It=["href"],_t=["transform","text-anchor","font-size","font-weight","fill"],St={key:5,class:"vue-data-ui-watermark"},Et=["onClick"],Nt={key:8,"data-dom-to-png-ignore":"",class:"reset-wrapper"},Vt={style:{"text-align":"right",width:"100%"}},Tt={__name:"vue-ui-chord",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},emits:["selectLegend","selectGroup","selectRibbon"],setup(_e,{expose:Se,emit:Ee}){e.useCssVars(o=>({"7187d07a":o.slicerColor}));const{vue_ui_chord:Ne}=d.useConfig(),h=_e,L=Ee,P=e.ref(!!h.dataset&&Object.hasOwn(h.dataset,"matrix")),B=e.ref(d.createUid()),b=e.ref(null),m=e.ref(null),v=e.ref(null),H=e.ref(0),E=e.ref(null),Q=e.ref(null),Z=e.ref(null),J=e.ref(null),K=e.ref(null),ee=e.ref(0),te=e.ref(0),oe=e.ref(0),N=e.ref(!1),X=e.ref(null),a=e.computed({get:()=>ie(),set:o=>o}),{userOptionsVisible:j,setUserOptionsVisibility:ae,keepUserOptionState:le}=Qe.useUserOptionState({config:a.value}),{svgRef:V}=Ze.useChartAccessibility({config:a.value.style.chart.title}),{isPrinting:ne,isImaging:re,generatePdf:se,generateImage:ue}=Ae.usePrinter({elementId:`chord_${B.value}`,fileName:a.value.style.chart.title.text||"vue-ui-chord",options:a.value.userOptions.print}),T=e.ref({showTable:a.value.table.show});function ie(){const o=Pe.useNestedProp({userConfig:h.config,defaultConfig:Ne});return o.theme?{...Pe.useNestedProp({userConfig:d.themes.vue_ui_chord[o.theme]||h.config,defaultConfig:o}),customPalette:d.themePalettes[o.theme]||d.palette}:o}e.watch(()=>h.config,o=>{a.value=ie(),j.value=!a.value.userOptions.showOnChartHover,ce(),ee.value+=1,te.value+=1,oe.value+=1,$.value=a.value.initialRotation,T.value.showTable=a.value.table.show},{deep:!0});function ce(){if(d.objectIsEmpty(h.dataset)?d.error({componentName:"VueUiChord",type:"dataset"}):d.getMissingDatasetAttributes({datasetObject:h.dataset,requiredAttributes:["matrix"]}).forEach(o=>{P.value=!1,d.error({componentName:"VueUiChord",type:"datasetAttribute",property:o})}),P.value&&de(),a.value.responsive){const o=E.value.parentNode,l=Ie.throttle(()=>{const{width:n,height:u,heightNoTitle:r,heightSource:s,heightTitle:c,heightLegend:k}=Ie.useResponsive({chart:E.value,title:a.value.style.chart.title.text?Q.value:null,legend:a.value.style.chart.legend.show?Z.value:null,source:J.value,noTitle:K.value}),y=c+k+s+r;n<u?E.value.style.width="100%":(E.value.style.height="100%",V.value.style.height=`calc(100% - ${y}px)`)},100),t=new ResizeObserver(l);t.observe(o),X.value=t,l()}ve.value=setTimeout(()=>{N.value=!0},500)}function de(){h.dataset.matrix.length<2&&(console.warn(`VueUiChord: dataset.matrix requires a minimum of 2 datapoints, for example:
2
-
3
- matrix:[
4
- [1, 1],
5
- [1, 1]
6
- ]`),P.value=!1),h.dataset.matrix.forEach((o,l)=>{o.length!==h.dataset.matrix.length&&(console.warn(`VueUiChord - Invalid matrix: dataset.matrix at index ${l} has ${o.length} elements instead of the required ${h.dataset.matrix.length}
7
-
8
- dataset.matrix[${l}] = [${o.toString()}] has a length of ${o.length} but should have the same length as the matrix itself (${h.dataset.matrix.length})`),P.value=!1)})}const ve=e.ref(null);e.onMounted(()=>{ce()});const M=e.ref({height:600,width:600}),Ve=e.computed(()=>a.value.userOptions.show&&!a.value.style.chart.title.text),Te=e.computed(()=>d.convertCustomPalette(a.value.customPalette)),f=e.computed(()=>({inner:M.value.width*.3*a.value.style.chart.arcs.innerRadiusRatio,outer:M.value.width*.34*a.value.style.chart.arcs.outerRadiusRatio})),ze=e.computed(()=>a.value.style.chart.arcs.padAngle/100),p=e.computed(()=>P.value?{matrix:h.dataset.matrix??[[0]],labels:h.dataset.labels??[""],colors:h.dataset.colors&&Array.isArray(h.dataset.colors)&&h.dataset.colors.length?h.dataset.colors.map(o=>d.convertColorToHex(o)):h.dataset.matrix.map((o,l)=>Te.value[l]||d.palette[l]||d.palette[l%d.palette.length])}:{matrix:[],labels:[],colors:[]});function Oe(o,l){const t=o.length,n=f.value.inner,u=new Array(t).fill(0);let r=0;for(let i=0;i<t;i+=1)for(let g=0;g<t;g+=1)u[i]+=o[i][g],r+=o[i][g];const s=(2*Math.PI-l*t)/r,c=[];let k=0;for(let i=0;i<t;i+=1){const g=k,w=g+u[i]*s;c.push({index:i,pattern:`pattern_${B.value}_${i}`,startAngle:g,endAngle:w,name:p.value.labels[i],id:d.createUid(),color:p.value.colors[i]}),k=w+l}const y=[];for(let i=0;i<t;i+=1){const g=o[i].map((x,I)=>({j:I,v:x}));g.sort((x,I)=>I.v-x.v);let w=c[i].startAngle;for(const{j:x,v:I}of g){const S=w,O=S+I*s;y.push({index:i,subIndex:x,pattern:`pattern_${B.value}_${i}`,startAngle:S,endAngle:O,value:I,groupName:p.value.labels[i],groupId:c[i].id,groupColor:p.value.colors[i],midAngle:(S+O)/2,midBaseX:Math.cos((S+O)/2-Math.PI/2)*n,midBaseY:Math.sin((S+O)/2-Math.PI/2)*n}),w=O}}const A=[];for(const i of y){const g=y.find(w=>w.index===i.subIndex&&w.subIndex===i.index);A.push({source:i,target:g,id:d.createUid()})}return{groups:c,chords:A}}const C=e.computed(()=>{const o=Oe(p.value.matrix,ze.value);return de(),o.chords.sort((l,t)=>Math.max(t.source.value,t.target.value)-Math.max(l.source.value,l.target.value)),o}),Le=e.computed(()=>{const o=f.value.outer+a.value.style.chart.ribbons.labels.offset+12,t=a.value.style.chart.ribbons.labels.fontSize*.6,n=[];if(m.value){const r=m.value;if(r.source.value){const s=String(r.source.value);n.push({id:r.id+"-src",theta:r.source.midAngle,w:s.length*t/o,midBaseX:r.source.midBaseX,midBaseY:r.source.midBaseY,groupColor:r.source.groupColor,value:r.source.value})}if(r.target&&r.target.value&&r.target.value!==r.source.value){const s=String(r.target.value);n.push({id:r.id+"-tgt",theta:r.target.midAngle,w:s.length*t/o,midBaseX:r.target.midBaseX,midBaseY:r.target.midBaseY,groupColor:r.target.groupColor,value:r.target.value})}return n}function u(r){C.value.chords.filter(s=>s.source.groupId===r&&s.source.value).forEach(s=>{{const c=String(s.source.value);n.push({id:s.id+"-src",theta:s.source.midAngle,w:c.length*t/o,midBaseX:s.source.midBaseX,midBaseY:s.source.midBaseY,groupColor:s.source.groupColor,value:s.source.value})}if(s.target&&s.target.value&&s.target.value!==s.source.value){const c=String(s.target.value);n.push({id:s.id+"-tgt",theta:s.target.midAngle,w:c.length*t/o,midBaseX:s.target.midBaseX,midBaseY:s.target.midBaseY,groupColor:s.target.groupColor,value:s.target.value})}})}return v.value&&u(v.value),b.value&&u(b.value.id),n}),Fe=e.computed(()=>{const o=Le.value.map(u=>({...u})).sort((u,r)=>u.theta-r.theta),l=a.value.style.chart.ribbons.labels.minSeparationDeg*Math.PI/180;let t=!0,n=0;for(;t&&n++<10;){t=!1;for(let c=1;c<o.length;c+=1){const k=o[c-1],y=o[c],A=k.theta+k.w+l;y.theta<A&&(y.theta=A,t=!0)}const u=o[0],r=o[o.length-1],s=r.theta+r.w+l-2*Math.PI;u.theta<s&&(u.theta=s,t=!0)}return o});function he(o,l,t,n){const u=o-Math.PI/2,r=l-Math.PI/2,s=Math.cos(u)*t,c=Math.sin(u)*t,k=Math.cos(r)*t,y=Math.sin(r)*t,A=Math.cos(r)*n,i=Math.sin(r)*n,g=Math.cos(u)*n,w=Math.sin(u)*n,x=l-o>Math.PI?1:0;return`M${s},${c} A${t},${t} 0 ${x} 1 ${k},${y} L${A},${i} A${n},${n} 0 ${x} 0 ${g},${w} Z`}function F(o,l){const t=f.value.inner,n=o.startAngle-Math.PI/2,u=o.endAngle-Math.PI/2,r=l.startAngle-Math.PI/2,s=l.endAngle-Math.PI/2,c=Math.cos(n)*t,k=Math.sin(n)*t,y=Math.cos(u)*t,A=Math.sin(u)*t,i=Math.cos(r)*t,g=Math.sin(r)*t,w=Math.cos(s)*t,x=Math.sin(s)*t,I=o.endAngle-o.startAngle>Math.PI?1:0,S=l.endAngle-l.startAngle>Math.PI?1:0;return`M${c},${k}A${t},${t} 0 ${I} 1 ${y},${A}Q0,0 ${i},${g}A${t},${t} 0 ${S} 1 ${w},${x}Q0,0 ${c},${k}Z`}const fe=e.computed(()=>$.value*Math.PI/180);function qe(o){return(o.startAngle+o.endAngle)/2}function Re(o){return((qe(o)+fe.value)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)}function De(o){let l=o+fe.value;return l=(l%(2*Math.PI)+2*Math.PI)%(2*Math.PI),l>Math.PI?"end":"start"}function Ue(o){const l=o-Math.PI/2,t=Math.cos(l)*(f.value.outer+a.value.style.chart.arcs.labels.offset+24),n=Math.sin(l)*(f.value.outer+a.value.style.chart.arcs.labels.offset+24);return`translate(${t},${n})`}function Xe(o,l,t){const n=o-Math.PI/2,u=l-Math.PI/2,r=Math.cos(n)*t,s=Math.sin(n)*t,c=Math.cos(u)*t,k=Math.sin(u)*t,y=l-o>Math.PI?1:0;return`M${r},${s} A${t},${t} 0 ${y} 1 ${c},${k}`}const $=e.ref(a.value.initialRotation),Y=e.ref(!1);let me=0,pe=0;function ge(o){const l=V.value.getBoundingClientRect(),t=l.left+l.width/2,n=l.top+l.height/2,u=o.clientX??o.touches[0].clientX,r=o.clientY??o.touches[0].clientY;return Math.atan2(r-n,u-t)}function be(o){!a.value.enableRotation||z.value||(o.preventDefault(),Y.value=!0,me=$.value,pe=ge(o))}function q(o){if(!Y.value)return;const l=ge(o);$.value=me+(l-pe)*180/Math.PI}function R(){Y.value=!1}function ke(o){return d.applyDataLabel(a.value.style.chart.ribbons.labels.formatter,o,d.dataLabel({p:a.value.style.chart.ribbons.labels.prefix,v:o,s:a.value.style.chart.ribbons.labels.suffix,r:a.value.style.chart.ribbons.labels.rounding}))}e.onMounted(()=>{window.addEventListener("mousemove",q),window.addEventListener("mouseup",R),window.addEventListener("touchmove",q,{passive:!1}),window.addEventListener("touchend",R)}),e.onBeforeUnmount(()=>{window.removeEventListener("mousemove",q),window.removeEventListener("mouseup",R),window.removeEventListener("touchmove",q),window.removeEventListener("touchend",R),clearTimeout(ve.value),X.value&&X.value.disconnect()});const G=e.ref(!1);function je(o){G.value=o,H.value+=1}function Ye(o){v.value||(b.value=o)}function Ge(o){v.value||(m.value=o)}function ye(o){var n;return!v.value&&!b.value&&!m.value?.8:(v.value?v.value===o.source.groupId:b.value?b.value.id===o.source.groupId:((n=m.value)==null?void 0:n.id)===o.id)?1:.1}function Ce(o){var n,u;return!v.value&&!b.value&&!m.value||(v.value?v.value===o.id:b.value?b.value.id===o.id:[(n=m.value)==null?void 0:n.source.groupId,(u=m.value)==null?void 0:u.target.groupId].includes(o.id))?1:.3}const z=e.ref(!1);function W(){z.value=!z.value}function $e(){T.value.showTable=!T.value.showTable}function We(){return C.value}const _=e.ref(null);function we(){const o=a.value.initialRotation;_.value!==null&&cancelAnimationFrame(_.value);const l=()=>{$.value+=(o-$.value)*.05,Math.abs($.value-o)<.1?($.value=o,_.value=null):_.value=requestAnimationFrame(l)};_.value=requestAnimationFrame(l)}e.onBeforeUnmount(()=>{_.value!==null&&cancelAnimationFrame(_.value)});function Be(o){o===v.value?(v.value=null,L("selectLegend",null)):(v.value=o,L("selectLegend",C.value.groups.find(l=>l.id===o)))}const Me=e.computed(()=>C.value.groups.map((o,l)=>({name:o.name,color:o.color,shape:"circle",patternIndex:l,pattern:`pattern_${B.value}_${l}`,id:o.id,select:()=>Be(o.id),opacity:v.value?v.value===o.id?1:.3:1}))),He=e.computed(()=>({cy:"chord-div-legend",backgroundColor:a.value.style.chart.legend.backgroundColor,color:a.value.style.chart.legend.color,fontSize:a.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:a.value.style.chart.legend.bold?"bold":""})),D=e.computed(()=>{const o=C.value.groups.map((t,n)=>({name:t.name||n,color:t.color})),l=p.value.matrix;return{head:o,body:l}}),U=e.computed(()=>{const o=[{name:"",color:null},...D.value.head],l=D.value.body.map((u,r)=>[D.value.head[r],...D.value.body[r]]),t={th:{backgroundColor:a.value.table.th.backgroundColor,color:a.value.table.th.color,outline:a.value.table.th.outline},td:{backgroundColor:a.value.table.td.backgroundColor,color:a.value.table.td.color,outline:a.value.table.td.outline},breakpoint:a.value.table.responsiveBreakpoint};return{colNames:o,head:o,body:l,config:t}});function xe(){e.nextTick(()=>{const o=p.value.matrix.map((n,u)=>[[p.value.labels[u]||u],n]),l=[[a.value.style.chart.title.text],[a.value.style.chart.title.subtitle.text],[[""],...p.value.labels.map((n,u)=>[n||u])]].concat(o),t=d.createCsvContent(l);d.downloadCsv({csvContent:t,title:a.value.style.chart.title.text||"vue-ui-chord"})})}return Se({getData:We,generateCsv:xe,generateImage:ue,generatePdf:se,toggleAnnotator:W,toggleTable:$e}),(o,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"chordChart",ref:E,class:e.normalizeClass({"vue-ui-chord":!0,"vue-data-ui-wrapper-fullscreen":G.value,"vue-data-ui-responsive":a.value.responsive}),style:e.normalizeStyle(`font-family:${a.value.style.fontFamily};width:100%; text-align:center;background:${a.value.style.chart.backgroundColor}`),id:`chord_${B.value}`,onMouseenter:l[4]||(l[4]=()=>e.unref(ae)(!0)),onMouseleave:l[5]||(l[5]=()=>e.unref(ae)(!1))},[a.value.userOptions.buttons.annotator&&e.unref(V)?(e.openBlock(),e.createBlock(et._sfc_main,{key:0,color:a.value.style.chart.color,backgroundColor:a.value.style.chart.backgroundColor,active:z.value,svgRef:e.unref(V),onClose:W},null,8,["color","backgroundColor","active","svgRef"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"userConfig",{},void 0,!0),Ve.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:K,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),a.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:Q,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(Je._sfc_main,{key:`title_${ee.value}`,config:{title:{cy:"chord-div-title",...a.value.style.chart.title},subtitle:{cy:"chord-div-subtitle",...a.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),a.value.userOptions.show&&P.value&&(e.unref(le)||e.unref(j))?(e.openBlock(),e.createBlock(Ae.UserOptions,{ref:"details",key:`user_option_${H.value}`,backgroundColor:a.value.style.chart.backgroundColor,color:a.value.style.chart.color,isPrinting:e.unref(ne),isImaging:e.unref(re),uid:B.value,hasTooltip:!1,hasPdf:a.value.userOptions.buttons.pdf,hasImg:a.value.userOptions.buttons.img,hasXls:a.value.userOptions.buttons.csv,hasTable:a.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:a.value.userOptions.buttons.fullscreen,isFullscreen:G.value,chartElement:E.value,position:a.value.userOptions.position,titles:{...a.value.userOptions.buttonTitles},hasAnnotator:a.value.userOptions.buttons.annotator,isAnnotation:z.value,onToggleFullscreen:je,onGeneratePdf:e.unref(se),onGenerateCsv:xe,onGenerateImage:e.unref(ue),onToggleTable:$e,onToggleAnnotator:W,style:e.normalizeStyle({visibility:e.unref(le)?e.unref(j)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:t,color:n})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:t,color:n})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:t,isFullscreen:n})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:t,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:t,isAnnotator:n})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:t,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(d.XMLNS),ref_key:"svgRef",ref:V,viewBox:`0 0 ${M.value.width} ${M.value.height}`,preserveAspectRatio:"xMidYMid meet",style:{overflow:"visible"},onMousedown:e.withModifiers(be,["prevent"]),onTouchstart:e.withModifiers(be,["prevent"])},[e.createVNode(Ke._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:M.value.width<=0?10:M.value.width,height:M.value.height<=0?10:M.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ct)):e.createCommentVNode("",!0),a.value.style.chart.arcs.labels.curved?(e.openBlock(),e.createElementBlock("defs",dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.groups,(t,n)=>(e.openBlock(),e.createElementBlock("path",{key:`labelPath-${n}`,id:`labelPath-${n}_${B.value}`,d:Xe(t.startAngle,t.endAngle,(f.value.inner+f.value.outer)/2+a.value.style.chart.arcs.labels.offset),fill:"none"},null,8,vt))),128))])):e.createCommentVNode("",!0),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.groups,(t,n)=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(o.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:t.index,patternId:`pattern_${B.value}_${n}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${M.value.width/2}, ${M.value.height/2}) rotate(${$.value})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.groups,(t,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("path",{class:e.normalizeClass({"vue-ui-chord-arc":!0,"vue-ui-chord-arc-animated":a.value.useCssAnimation&&!N.value}),key:`arc-${n}`,d:he(t.startAngle,t.endAngle,f.value.outer,f.value.inner),fill:p.value.colors[n],stroke:a.value.style.chart.arcs.stroke,"stroke-width":a.value.style.chart.arcs.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",style:e.normalizeStyle({opacity:Ce(t)}),onMouseenter:()=>Ye(t),onMouseleave:l[0]||(l[0]=u=>b.value=null),onClick:u=>L("selectGroup",t)},null,46,mt)),o.$slots.pattern?(e.openBlock(),e.createElementBlock("path",{class:e.normalizeClass({"vue-ui-chord-arc":!0,"vue-ui-chord-arc-animated":a.value.useCssAnimation&&!N.value}),key:`arc-${n}`,d:he(t.startAngle,t.endAngle,f.value.outer,f.value.inner),fill:`url(#${t.pattern})`,stroke:a.value.style.chart.arcs.stroke,"stroke-width":a.value.style.chart.arcs.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",style:e.normalizeStyle({opacity:Ce(t),pointerEvents:"none"})},null,14,pt)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value?C.value.chords.filter(t=>t.source.groupId===b.value.id):v.value?C.value.chords.filter(t=>t.source.groupId===v.value):C.value.chords,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`ribbon-${t.id}`},[t.source.value?(e.openBlock(),e.createElementBlock("path",{key:0,class:e.normalizeClass({"vue-ui-chord-ribbon":!0,"vue-ui-chord-ribbon-animated":a.value.useCssAnimation&&!N.value}),d:F(t.source,t.target),fill:a.value.style.chart.backgroundColor,style:e.normalizeStyle({opacity:a.value.style.chart.ribbons.underlayerOpacity})},null,14,gt)):e.createCommentVNode("",!0),t.source.value?(e.openBlock(),e.createElementBlock("path",{key:1,class:e.normalizeClass({"vue-ui-chord-ribbon":!0,"vue-ui-chord-ribbon-animated":a.value.useCssAnimation&&!N.value}),d:F(t.source,t.target),fill:p.value.colors[t.source.index],stroke:a.value.style.chart.ribbons.stroke,"stroke-width":a.value.style.chart.ribbons.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",style:e.normalizeStyle({opacity:ye(t)}),onMouseenter:()=>Ge({...t,path:F(t.source,t.target),color:p.value.colors[t.source.index]}),onClick:n=>L("selectRibbon",{...t,color:p.value.colors[t.source.index]}),onMouseleave:l[1]||(l[1]=n=>m.value=null)},null,46,bt)):e.createCommentVNode("",!0),t.source.value&&o.$slots.pattern?(e.openBlock(),e.createElementBlock("path",{key:2,class:e.normalizeClass({"vue-ui-chord-ribbon":!0,"vue-ui-chord-ribbon-animated":a.value.useCssAnimation&&!N.value}),d:F(t.source,t.target),fill:`url(#pattern_${B.value}_${t.source.index})`,stroke:a.value.style.chart.ribbons.stroke,"stroke-width":a.value.style.chart.ribbons.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",style:e.normalizeStyle({opacity:ye(t),pointerEvents:"none"})},null,14,kt)):e.createCommentVNode("",!0)],64))),128)),m.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:m.value.path,fill:m.value.color,stroke:a.value.style.chart.ribbons.stroke,"stroke-width":a.value.style.chart.ribbons.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-ui-chord-ribbon":!0}),style:{pointerEvents:"none"}},null,8,yt)):e.createCommentVNode("",!0),m.value&&o.$slots.pattern?(e.openBlock(),e.createElementBlock("path",{key:1,d:m.value.path,fill:`url(#${m.value.source.pattern})`,stroke:a.value.style.chart.ribbons.stroke,"stroke-width":a.value.style.chart.ribbons.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-ui-chord-ribbon":!0}),style:{pointerEvents:"none"}},null,8,Ct)):e.createCommentVNode("",!0)]),(b.value||m.value||v.value)&&a.value.style.chart.ribbons.labels.show?(e.openBlock(),e.createElementBlock("g",$t,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Fe.value,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t.id},[e.createElementVNode("line",{x1:t.midBaseX,y1:t.midBaseY,x2:Math.cos(t.theta-Math.PI/2)*(f.value.outer+a.value.style.chart.ribbons.labels.offset+12),y2:Math.sin(t.theta-Math.PI/2)*(f.value.outer+a.value.style.chart.ribbons.labels.offset+12),stroke:a.value.style.chart.backgroundColor,"stroke-width":a.value.style.chart.ribbons.labels.connector.strokeWidth*3,"pointer-events":"none"},null,8,wt),e.createElementVNode("line",{x1:t.midBaseX,y1:t.midBaseY,x2:Math.cos(t.theta-Math.PI/2)*(f.value.outer+a.value.style.chart.ribbons.labels.offset+12),y2:Math.sin(t.theta-Math.PI/2)*(f.value.outer+a.value.style.chart.ribbons.labels.offset+12),stroke:a.value.style.chart.ribbons.labels.connector.stroke,"stroke-width":a.value.style.chart.ribbons.labels.connector.strokeWidth,"pointer-events":"none"},null,8,Bt),a.value.style.chart.ribbons.labels.marker.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:Math.cos(t.theta-Math.PI/2)*(f.value.outer+a.value.style.chart.ribbons.labels.offset+12),cy:Math.sin(t.theta-Math.PI/2)*(f.value.outer+a.value.style.chart.ribbons.labels.offset+12),r:a.value.style.chart.ribbons.labels.marker.radius,stroke:a.value.style.chart.ribbons.labels.marker.stroke,"stroke-width":a.value.style.chart.ribbons.labels.marker.strokeWidth,fill:t.groupColor,"pointer-events":"none"},null,8,Mt)):e.createCommentVNode("",!0),e.createElementVNode("text",{transform:`
9
- translate(
10
- ${Math.cos(t.theta-Math.PI/2)*(f.value.outer+a.value.style.chart.ribbons.labels.offset+24)},
11
- ${Math.sin(t.theta-Math.PI/2)*(f.value.outer+a.value.style.chart.ribbons.labels.offset+24)}
12
- ) rotate(${-$.value})
13
- `,fill:a.value.style.chart.ribbons.labels.useSerieColor?t.groupColor:a.value.style.chart.ribbons.labels.color,"text-anchor":De(t.theta),"font-size":a.value.style.chart.ribbons.labels.fontSize,"font-weight":a.value.style.chart.ribbons.labels.bold?"bold":"normal",dy:".35em","pointer-events":"none"},e.toDisplayString(ke(t.value)),9,xt)],64))),128))])):e.createCommentVNode("",!0),a.value.style.chart.arcs.labels.show?(e.openBlock(),e.createElementBlock("g",Pt,[a.value.style.chart.arcs.labels.curved?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(C.value.groups,(t,n)=>(e.openBlock(),e.createElementBlock("text",{key:`curved-label-${n}`,"font-size":a.value.style.chart.arcs.labels.fontSize,"font-weight":a.value.style.chart.arcs.labels.bold?"bold":"normal",fill:a.value.style.chart.arcs.labels.adaptColorToBackground?e.unref(d.adaptColorToBackground)(p.value.colors[n]):a.value.style.chart.arcs.labels.color},[e.createElementVNode("textPath",{href:`#labelPath-${n}_${B.value}`,startOffset:"50%","text-anchor":"middle"},e.toDisplayString(p.value.labels[n]),9,It)],8,At))),128)):!b.value&&!m.value&&!v.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(C.value.groups,(t,n)=>(e.openBlock(),e.createElementBlock("text",{key:`label-${n}`,transform:`
14
- ${Ue((t.startAngle+t.endAngle)/2)}
15
- rotate(${-$.value})
16
- `,dy:".35em","text-anchor":Re(t)>Math.PI?"end":"start","font-size":a.value.style.chart.arcs.labels.fontSize,"font-weight":a.value.style.chart.arcs.labels.bold?"bold":"normal",fill:a.value.style.chart.arcs.labels.color},e.toDisplayString(p.value.labels[n]),9,_t))),128)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],8,ft),e.renderSlot(o.$slots,"svg",{svg:{height:600,width:600}},void 0,!0)],40,it)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",St,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ne)||e.unref(re)})),void 0,!0)])):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(rt.default,{key:6,config:{type:"chord",style:{backgroundColor:a.value.style.chart.backgroundColor,chord:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:Z},[a.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ot.Legend,{key:`legend_${oe.value}`,legendSet:Me.value,config:He.value,onClickMarker:l[2]||(l[2]=({legend:t})=>Be(t.id))},e.createSlots({item:e.withCtx(({legend:t,index:n})=>[e.createElementVNode("div",{style:e.normalizeStyle({opacity:v.value?v.value===t.id?1:.3:1}),onClick:u=>t.select()},e.toDisplayString(t.name),13,Et)]),_:2},[o.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:t,index:n})=>[e.createVNode(at._sfc_main,{shape:t.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${B.value}_${n})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:Me.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:J,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value!==a.value.initialRotation?(e.openBlock(),e.createElementBlock("div",Nt,[e.renderSlot(o.$slots,"reset-action",{reset:we},()=>[e.createElementVNode("button",{"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({background:a.value.style.chart.backgroundColor}),onClick:we},[e.createVNode(tt.default,{name:"refresh",stroke:a.value.style.chart.color},null,8,["stroke"])],4)],!0)])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createBlock(nt.default,{key:9,hideDetails:"",config:{open:T.value.showTable,maxHeight:1e4,body:{backgroundColor:a.value.style.chart.backgroundColor,color:a.value.style.chart.color},head:{backgroundColor:a.value.style.chart.backgroundColor,color:a.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(lt.DataTable,{key:`table_${te.value}`,colNames:U.value.colNames,head:U.value.head,body:U.value.body,config:U.value.config,title:`${a.value.style.chart.title.text}${a.value.style.chart.title.subtitle.text?` : ${a.value.style.chart.title.subtitle.text}`:""}`,onClose:l[3]||(l[3]=t=>T.value.showTable=!1)},{th:e.withCtx(({th:t})=>[e.createTextVNode(e.toDisplayString(t.name),1)]),td:e.withCtx(({td:t})=>[e.createElementVNode("div",Vt,e.toDisplayString(t.name?t.name:ke(t)),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ut))}},zt=st._export_sfc(Tt,[["__scopeId","data-v-5f1eebd5"]]);exports.default=zt;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-Cn2tUOoX.cjs"),ie=require("./useNestedProp-C8955nsn.cjs"),ce=require("./usePrinter-BrH80VBz.cjs"),_e=require("./Title-D62pPwLz.cjs"),Be=require("./PenAndPaper-ByAFuR-l.cjs"),Se=require("./useUserOptionState-BgepsfED.cjs"),$e=require("./PackageVersion-BxSGdh6L.cjs"),Ne=require("./vue-ui-accordion-7GoAZx3k.cjs"),Ee=require("./DataTable-CNCnRrD-.cjs"),Pe=require("./vue-ui-skeleton-Mcoev-5q.cjs"),Te=require("./useChartAccessibility-Cm7nkzTG.cjs"),ve=require("./useResponsive-BBkmXXaa.cjs"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function de(i,d=0){const m=i.reduce((a,{x:r,r:c})=>Math.min(a,r-c-d),1/0),v=i.reduce((a,{x:r,r:c})=>Math.max(a,r+c+d),-1/0),f=i.reduce((a,{y:r,r:c})=>Math.min(a,r-c-d),1/0),n=i.reduce((a,{y:r,r:c})=>Math.max(a,r+c+d),-1/0);return[m,f,v-m,n-f]}function Oe(i,d,m){const v=i._,f=i.next._,n=v.r+f.r,a=(v.x*f.r+f.x*v.r)/n,r=(v.y*f.r+f.y*v.r)/n;return Math.max(Math.abs(a*m),Math.abs(r*d))}function fe(i,d,m){const v=Oe,f=i.length;if(!f)return i;let n,a,r;if(n=i[0],n.x=0,n.y=0,!(f>1)||(a=i[1],n.x=-a.r,a.x=n.r,a.y=0,!(f>2)))return i;he(a,n,r=i[2]),n=new q(n),a=new q(a),r=new q(r),n.next=r.previous=a,a.next=n.previous=r,r.next=a.previous=n;e:for(let c=3;c<f;++c){he(n._,a._,r=i[c]),r=new q(r);let y=a.next,b=n.previous,S=a._.r,$=n._.r;do if(S<=$){if(me(y._,r._)){a=y,n.next=a,a.previous=n,--c;continue e}S+=y._.r,y=y.next}else{if(me(b._,r._)){n=b,n.next=a,a.previous=n,--c;continue e}$+=b._.r,b=b.previous}while(y!==b.next);r.previous=n,r.next=a,n.next=a.previous=a=r;let N=v(n,m,d),F;for(;(r=r.next)!==a;)(F=v(r,m,d))<N&&(n=r,N=F);a=n.next}return i}function he(i,d,m){const v=i.x-d.x,f=i.y-d.y,n=v*v+f*f;if(n){const a=(d.r+m.r)**2,r=(i.r+m.r)**2;if(a>r){const c=(n+r-a)/(2*n),y=Math.sqrt(Math.max(0,r/n-c*c));m.x=i.x-c*v-y*f,m.y=i.y-c*f+y*v}else{const c=(n+a-r)/(2*n),y=Math.sqrt(Math.max(0,a/n-c*c));m.x=d.x+c*v-y*f,m.y=d.y+c*f+y*v}}else m.x=d.x+m.r,m.y=d.y}function me(i,d){const m=i.r+d.r-1e-6,v=d.x-i.x,f=d.y-i.y;return m>0&&m*m>v*v+f*f}class q{constructor(d){this._=d,this.next=null,this.previous=null}}const Fe=["id"],Ie=["xmlns","viewBox","height","width"],Re=["x","y","width","height"],Me=["id"],Ae=["stop-color"],qe=["stop-color"],De=["stop-color"],Le={key:0},He=["x","y","width","height","stroke","stroke-width","fill","rx","onMouseenter","onClick"],Ue=["x","y","width","height","stroke","stroke-width","fill","rx"],je=["opacity","x","y","font-size","fill","font-weight"],Ge=["opacity","x","y","font-size","fill","font-weight"],We=["cx","cy","r","opacity","stroke","stroke-width","fill"],Ye={key:0,style:{pointerEvents:"none"}},Xe={key:1},Ze=["opacity","x","y","font-size","fill","font-weight"],Je=["opacity","x","y","font-size","fill","font-weight"],Ke={key:6,class:"vue-data-ui-watermark"},Qe=["innerHTML"],et={__name:"vue-ui-circle-pack",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(i,{expose:d,emit:m}){e.useCssVars(o=>({cf72f1fe:B.value,"4e89318c":H.value}));const v=i,f=m,{vue_ui_circle_pack:n}=u.useConfig(),a=e.computed(()=>!!v.dataset&&v.dataset.length),r=e.ref(u.createUid()),c=e.ref(null),y=e.ref(null),b=e.ref(null),S=e.ref(0),$=e.ref(0),N=e.ref(0),F=e.ref(null),t=e.computed({get:()=>J(),set:o=>o}),{svgRef:Y}=Te.useChartAccessibility({config:t.value.style.chart.title}),{userOptionsVisible:D,setUserOptionsVisibility:X,keepUserOptionState:Z}=Se.useUserOptionState({config:t.value});function J(){const o=ie.useNestedProp({userConfig:v.config,defaultConfig:n});return o.theme?{...ie.useNestedProp({userConfig:u.themes.vue_ui_circle_pack[o.theme]||v.config,defaultConfig:o}),customPalette:u.themePalettes[o.theme]||u.palette}:o}e.watch(()=>v.config,o=>{t.value=J(),D.value=!t.value.userOptions.showOnChartHover,L(),S.value+=1,$.value+=1,E.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:K,isImaging:Q,generatePdf:ee,generateImage:te}=ce.usePrinter({elementId:`vue-ui-circle-pack_${r.value}`,fileName:t.value.style.chart.title.text||"vue-ui-circle-pack",options:t.value.userOptions.print}),pe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),E=e.ref({showTable:t.value.table.show}),oe=e.ref(null),w=e.ref({h:10,w:10}),le=e.ref(0),z=e.ref([0,0,100,100]),I=e.ref({h:0,w:0});async function L(){u.objectIsEmpty(v.dataset)&&u.error({componentName:"VueUiCirclePack",type:"dataset"}),_.value=await fe(R.value),k.value=de(_.value,1).join(" "),I.value=ae(c.value);const o=ve.throttle(()=>{const{width:s,height:l,heightTitle:p,heightNoTitle:g}=ve.useResponsive({chart:c.value,title:y.value,noTitle:b.value}),G=s||10,W=l&&l>10?l:10;le.value=t.value.style.chart.title.text?p:g,requestAnimationFrame(()=>{w.value.w=G,w.value.h=W-le.value,e.nextTick(async()=>{const we=R.value.map(ze=>({...ze}));_.value=await fe(we,w.value.h,w.value.w),z.value=de(_.value,1),k.value=z.value.join(" "),I.value=ae(c.value)})})});oe.value=new ResizeObserver(o),oe.value.observe(c.value.parentNode)}e.onMounted(L);function ae(o){if(!o||!o.parentElement)return console.warn("Component or parent element is missing."),{w:0,h:0};const s=o.parentElement;if(s.offsetWidth>0&&s.offsetHeight>0)return{w:s.offsetWidth,h:s.offsetHeight};const l=window.getComputedStyle(s),p=l.width,g=l.height;return p!=="auto"&&g!=="auto"&&parseFloat(p)>0&&parseFloat(g)>0?{w:parseFloat(p),h:parseFloat(g)}:{w:0,h:0}}e.watch(()=>v.dataset,async o=>{await L()},{deep:!0});const ye=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),R=e.computed(()=>v.dataset.map((o,s)=>{const l=u.convertColorToHex(o.color)||ye.value[s]||u.themePalettes[t.value.theme||"default"][s%u.themePalettes[t.value.theme||"default"].length]||u.palette[s]||u.palette[s%u.palette.length];return{...o,r:o.value,id:u.createUid(),color:l}}).filter(o=>![null,void 0,1/0,-1/0].includes(o.value))),_=e.ref([]),k=e.ref("0 0 100 100"),P=e.computed(()=>Math.max(..._.value.map(o=>o.r)));function ne(o,s){return s/P.value*o}const h=e.ref(null);function ge(o){t.value.style.chart.circles.zoom.show&&(h.value=o)}const B=e.computed(()=>h.value?h.value.r:0),H=e.computed(()=>C.value?B.value:h.value?h.value.r>z.value[3]/6*t.value.style.chart.circles.zoom.zoomRatio?h.value.r:z.value[3]/6*t.value.style.chart.circles.zoom.zoomRatio:0),x=e.ref(0),be=e.computed(()=>({pointerEvents:"none",opacity:x.value,filter:`drop-shadow(0px 0px 6px ${u.darkenHexColor(h.value.color,t.value.style.chart.circles.zoom.shadowForce)})`})),T=e.ref(B.value);e.watchEffect(()=>{T.value=B.value,x.value=0;let o=null;function s(l){o||(o=l);const p=(l-o)/t.value.style.chart.circles.zoom.animationFrameMs;p<1?(T.value=B.value+(H.value-B.value)*p,x.value=0+t.value.style.chart.circles.zoom.opacity*p,requestAnimationFrame(s)):(T.value=H.value,x.value=t.value.style.chart.circles.zoom.opacity)}requestAnimationFrame(s)});const V=e.computed(()=>({name:t.value.style.chart.circles.zoom.label.name.fontSize*z.value[3]/300,value:t.value.style.chart.circles.zoom.label.value.fontSize*z.value[3]/300}));function U(o){return u.applyDataLabel(t.value.style.chart.circles.labels.value.formatter,o.value,u.dataLabel({p:t.value.style.chart.circles.labels.value.prefix,v:o.value,s:t.value.style.chart.circles.labels.value.suffix,r:t.value.style.chart.circles.labels.value.rounding}))}function ke(){return u.applyDataLabel(t.value.style.chart.circles.zoom.label.value.formatter,h.value.value,u.dataLabel({p:t.value.style.chart.circles.zoom.label.value.prefix,v:h.value.value,s:t.value.style.chart.circles.zoom.label.value.suffix,r:t.value.style.chart.circles.zoom.label.value.rounding}))}function re(o){if(!o)return 0;const s=o.r/U(o).length*(U(o).length===1?1:2);return Math.min(o.r/2.5,s)}const O=e.ref(!1);function xe(o){O.value=o,N.value+=1}const C=e.ref(!1);function j(){C.value=!C.value}const M=e.computed(()=>{const o=R.value.map(l=>({name:l.name,value:l.value,color:l.color})).toSorted((l,p)=>p.value-l.value),s=o.map(l=>l.value);return{head:o,body:s}});function se(){e.nextTick(()=>{const o=M.value.head.map((p,g)=>[[p.name],[M.value.body[g]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=u.createCsvContent(s);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-circle-pack"})})}const A=e.computed(()=>{const o=[t.value.table.columnNames.datapoint,t.value.table.columnNames.value],s=M.value.head.map((g,G)=>{const W=u.dataLabel({p:t.value.style.chart.circles.labels.value.prefix,v:M.value.body[G],s:t.value.style.chart.circles.labels.value.suffix,r:t.value.style.chart.circles.labels.value.rounding});return[{color:g.color,name:g.name},W]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.datapoint,t.value.table.columnNames.value],head:o,body:s,config:l}});function ue(){E.value.showTable=!E.value.showTable}function Ce(){return R.value}return d({getData:Ce,generateCsv:se,generatePdf:ee,generateImage:te,toggleTable:ue,toggleAnnotator:j}),(o,s)=>(e.openBlock(),e.createElementBlock("div",{id:`vue-ui-circle-pack_${r.value}`,class:e.normalizeClass(`vue-ui-circle-pack ${O.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"circlePackChart",ref:c,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;background:${t.value.style.chart.backgroundColor}; height: ${I.value.h}px; width:${I.value.w}px`),onMouseenter:s[2]||(s[2]=()=>e.unref(X)(!0)),onMouseleave:s[3]||(s[3]=()=>e.unref(X)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Be._sfc_main,{key:0,svgRef:e.unref(Y),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,scale:P.value/100,onClose:j},null,8,["svgRef","backgroundColor","color","active","scale"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"userConfig",{},void 0,!0),pe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:b,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:y,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(_e._sfc_main,{key:`title_${S.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&a.value&&(e.unref(Z)||e.unref(D))?(e.openBlock(),e.createBlock(ce.UserOptions,{ref:"details",key:`user_option_${N.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(K),isImaging:e.unref(Q),uid:r.value,hasTooltip:!1,hasLabel:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:O.value,chartElement:c.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:xe,onGeneratePdf:e.unref(ee),onGenerateCsv:se,onGenerateImage:e.unref(te),onToggleTable:ue,onToggleAnnotator:j,style:e.normalizeStyle({visibility:e.unref(Z)?e.unref(D)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:p})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:p})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:p})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:p})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:p})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:p})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:Y,xmlns:e.unref(u.XMLNS),viewBox:k.value,height:w.value.h,width:w.value.w,class:e.normalizeClass({"vue-data-ui-fullscreen--on":O.value,"vue-data-ui-fulscreen--off":!O.value}),style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color};background:${t.value.style.chart.backgroundColor};`)},[e.createVNode($e._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:k.value.x,y:k.value.y,width:k.value.width,height:k.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Re)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:l.id,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(u.lightenHexColor)(l.color,t.value.style.chart.circles.gradient.intensity/100)},null,8,Ae),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(u.darkenHexColor)(l.color,.1)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,De)],8,Me)]),o.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Le,[e.createElementVNode("defs",null,[e.renderSlot(o.$slots,"pattern",e.mergeProps({ref_for:!0},{...l,patternId:`pattern_${r.value}_${l.id}`}),void 0,!0)])])):e.createCommentVNode("",!0),e.createElementVNode("rect",{x:l.x-l.r,y:l.y-l.r,width:l.r*2,height:l.r*2,stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth*P.value/100,fill:t.value.style.chart.circles.gradient.show?`url(#${l.id})`:l.color,rx:l.r,onMouseenter:()=>ge(l),onMouseout:s[0]||(s[0]=p=>h.value=null),onClick:p=>f("selectDatapoint",l)},null,40,He),o.$slots.pattern?(e.openBlock(),e.createElementBlock("rect",{key:1,x:l.x-l.r,y:l.y-l.r,width:l.r*2,height:l.r*2,stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth*P.value/100,fill:`url(#pattern_${r.value}_${l.id})`,rx:l.r,style:{pointerEvents:"none"}},null,8,Ue)):e.createCommentVNode("",!0),o.$slots["data-label"]?e.renderSlot(o.$slots,"data-label",e.mergeProps({key:2,ref_for:!0},{...l,createTSpans:e.unref(u.createTSpans),fontSize:{name:l.r/3*t.value.style.chart.circles.labels.name.fontSizeRatio,value:re(l)*t.value.style.chart.circles.labels.value.fontSizeRatio},color:t.value.style.chart.circles.labels.name.color?t.value.style.chart.circles.labels.name.color:e.unref(u.adaptColorToBackground)(l.color)}),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.circles.labels.name.show&&l.name?(e.openBlock(),e.createElementBlock("text",{key:0,style:{pointerEvents:"none",transition:"opacity 0.2s ease-in-out"},opacity:h.value&&!C.value?.2:1,x:l.x,y:l.y+ne(l.r,t.value.style.chart.circles.labels.name.offsetY)-l.r/10,"font-size":l.r/3*t.value.style.chart.circles.labels.name.fontSizeRatio,fill:t.value.style.chart.circles.labels.name.color?t.value.style.chart.circles.labels.name.color:e.unref(u.adaptColorToBackground)(l.color),"font-weight":t.value.style.chart.circles.labels.name.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(l.name),9,je)):e.createCommentVNode("",!0),t.value.style.chart.circles.labels.value.show?(e.openBlock(),e.createElementBlock("text",{key:1,style:{pointerEvents:"none",transition:"opacity 0.2s ease-in-out"},opacity:h.value&&!C.value?.2:1,x:l.x,y:l.y+ne(l.r,t.value.style.chart.circles.labels.value.offsetY)+l.r/2.5,"font-size":re(l)*t.value.style.chart.circles.labels.value.fontSizeRatio,fill:t.value.style.chart.circles.labels.value.color?t.value.style.chart.circles.labels.value.color:e.unref(u.adaptColorToBackground)(l.color),"font-weight":t.value.style.chart.circles.labels.value.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(U(l)),9,Ge)):e.createCommentVNode("",!0)],64))],64))),256)),h.value&&t.value.style.chart.circles.zoom.show&&!C.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("circle",{style:e.normalizeStyle(be.value),cx:h.value.x,cy:h.value.y,r:T.value,opacity:x.value,stroke:t.value.style.chart.circles.stroke,"stroke-width":t.value.style.chart.circles.strokeWidth*P.value/100,fill:t.value.style.chart.circles.gradient.show?`url(#${h.value.id})`:h.value.color},null,12,We),o.$slots["zoom-label"]?(e.openBlock(),e.createElementBlock("g",Ye,[e.renderSlot(o.$slots,"zoom-label",e.normalizeProps(e.guardReactiveProps({...h.value,zoomOpacity:x.value,currentRadius:T.value,fontSize:V.value})),void 0,!0)])):(e.openBlock(),e.createElementBlock("g",Xe,[e.createElementVNode("text",{style:{pointerEvents:"none"},opacity:x.value,x:h.value.x,y:h.value.y+t.value.style.chart.circles.zoom.label.name.offsetY-V.value.name/4,"text-anchor":"middle","font-size":V.value.name,fill:t.value.style.chart.circles.zoom.label.name.color?t.value.style.chart.circles.zoom.label.name.color:e.unref(u.adaptColorToBackground)(h.value.color),"font-weight":t.value.style.chart.circles.zoom.label.name.bold?"bold":"normal"},e.toDisplayString(h.value.name),9,Ze),e.createElementVNode("text",{style:{pointerEvents:"none"},opacity:x.value,x:h.value.x,y:h.value.y+V.value.value+t.value.style.chart.circles.zoom.label.value.offsetY,"text-anchor":"middle","font-size":V.value.value,fill:t.value.style.chart.circles.zoom.label.value.color?t.value.style.chart.circles.zoom.label.value.color:e.unref(u.adaptColorToBackground)(h.value.color),"font-weight":t.value.style.chart.circles.zoom.label.value.bold?"bold":"normal"},e.toDisplayString(ke()),9,Je)]))],64)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:{...k.value}},void 0,!0)],14,Ie)):e.createCommentVNode("",!0),a.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:5,config:{type:"circlePack",style:{color:"#CCCCCC"}}})),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(Q)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:F,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createBlock(Ne.default,{key:8,hideDetails:"",config:{open:E.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ee.DataTable,{key:`table_${$.value}`,colNames:A.value.colNames,head:A.value.head,body:A.value.body,config:A.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[1]||(s[1]=l=>E.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Qe)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Fe))}},tt=Ve._export_sfc(et,[["__scopeId","data-v-bb4f66a5"]]);exports.default=tt;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),y=require("./useNestedProp-C8955nsn.cjs"),i=require("./index-Cn2tUOoX.cjs"),C=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_=["xmlns","height","width"],p={id:"follower",fy:"30%",fx:"30%"},x=["stop-color","stop-opacity"],E=["r","fill","stroke","stroke-width","stroke-dasharray"],N=["r"],g={key:2,class:"wave"},V=["id"],w=["id"],S=["filter","stroke"],B={key:3,class:"crosshair"},R=["x1","stroke","stroke-width","stroke-dasharray"],b=["x1","stroke","stroke-width","stroke-dasharray"],F=["y1","stroke","stroke-width","stroke-dasharray"],z=["y1","stroke","stroke-width","stroke-dasharray"],L=["cy","r","fill"],O=["cy","r","fill"],I=["cx","r","fill"],T=["cx","r","fill"],D={key:5,class:"coordinates"},$=["x","y","font-size","fill"],W=["transform"],G=["font-size","fill"],P={__name:"vue-ui-cursor",props:{config:{type:Object,default:{}}},setup(f){const{vue_ui_cursor:h}=i.useConfig(),k=f,n=t.ref(i.createUid()),e=t.computed(()=>y.useNestedProp({userConfig:k.config,defaultConfig:h})),o=t.ref({x:-100,y:-100});function u({clientX:r,clientY:l,...A}){o.value.x=r-e.value.centerCircleRadius,o.value.y=l-e.value.centerCircleRadius}function d(r){o.value.x=r.targetTouches[0].clientX-e.value.centerCircleRadius,o.value.y=r.targetTouches[0].clientY-e.value.centerCircleRadius}const v=t.ref(!0);function a(r){v.value=r}const s=t.ref(!1),c=t.ref(null);function m(){s.value=!1,c.value&&clearTimeout(c.value),t.nextTick(()=>{s.value=!0,c.value=setTimeout(()=>{s.value=!1},1e3)})}return t.onMounted(()=>{const r=e.value.parentId?document.getElementById(e.value.parentId):document.getElementsByTagName("div")[0];r.addEventListener("mousemove",u),r.addEventListener("touchmove",d),r.addEventListener("mouseleave",()=>a(!1)),r.addEventListener("mouseenter",()=>a(!0)),r.addEventListener("click",m)}),t.onBeforeUnmount(()=>{const r=e.value.parentId?document.getElementById(e.value.parentId):document.getElementsByTagName("div")[0];r.removeEventListener("mousemove",u),r.removeEventListener("touchmove",d),r.removeEventListener("mouseleave",()=>a(!1)),r.removeEventListener("mouseenter",()=>a(!0)),r.removeEventListener("click",m)}),t.computed(()=>e.value.centerCircleRadius/2.5),(r,l)=>v.value?(t.openBlock(),t.createElementBlock("svg",{key:0,"data-dom-to-png-ignore":"",xmlns:t.unref(i.XMLNS),style:t.normalizeStyle(`z-index: 2147483647; overflow: visible; pointer-events: none;background: transparent; position:fixed; top:${o.value.y}px; left:${o.value.x}px;`),viewBox:"0 0 100 100",height:e.value.centerCircleRadius*2,width:e.value.centerCircleRadius*2},[t.createElementVNode("defs",null,[t.createElementVNode("radialGradient",p,[t.createElementVNode("stop",{offset:"10%","stop-color":e.value.bubbleEffectColor,"stop-opacity":e.value.bubbleEffectOpacity},null,8,x),l[0]||(l[0]=t.createElementVNode("stop",{offset:"95%","stop-color":"transparent"},null,-1))])]),e.value.showCenterCircle?(t.openBlock(),t.createElementBlock("circle",{key:0,cx:50,cy:50,r:e.value.centerCircleRadius,fill:t.unref(i.setOpacity)(e.value.centerCircleColor,e.value.centerCircleOpacity*100),stroke:e.value.centerCircleStroke,"stroke-width":e.value.centerCircleStrokeWidth,"stroke-dasharray":e.value.centerCircleDasharray},null,8,E)):t.createCommentVNode("",!0),e.value.bubbleEffect?(t.openBlock(),t.createElementBlock("circle",{key:1,cx:50,cy:50,r:e.value.centerCircleRadius,fill:"url(#follower)",stroke:"none"},null,8,N)):t.createCommentVNode("",!0),e.value.useWaveOnClick?(t.openBlock(),t.createElementBlock("g",g,[t.createElementVNode("defs",null,[t.createElementVNode("filter",{id:`blur_${n.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[t.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:4,id:`blur_std_${n.value}`},null,8,w),l[1]||(l[1]=t.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1))],8,V)]),s.value?(t.openBlock(),t.createElementBlock("circle",{key:0,class:t.normalizeClass({"circle-wave":s.value}),cx:50,cy:50,r:50,filter:`url(#blur_${n.value})`,stroke:e.value.centerCircleStroke,fill:"none","stroke-width":"3"},null,10,S)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.value.showCrosshair?(t.openBlock(),t.createElementBlock("g",B,[t.createElementVNode("line",{x1:-e.value.centerCircleRadius+50,x2:-5e3,y1:50,y2:50,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,R),t.createElementVNode("line",{x1:50+e.value.centerCircleRadius,x2:5e3,y1:50,y2:50,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,b),t.createElementVNode("line",{x1:50,x2:50,y1:-e.value.centerCircleRadius+50,y2:-5e3,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,F),t.createElementVNode("line",{x1:50,x2:50,y1:e.value.centerCircleRadius+50,y2:5e3,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,z)])):t.createCommentVNode("",!0),e.value.showIntersectCircles?(t.openBlock(),t.createElementBlock("g",{key:4,class:t.normalizeClass({"rotating-circles":e.value.isLoading})},[t.createElementVNode("circle",{cx:50,cy:e.value.centerCircleRadius+50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,L),t.createElementVNode("circle",{cx:50,cy:-e.value.centerCircleRadius+50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,O),t.createElementVNode("circle",{cx:-e.value.centerCircleRadius+50,cy:50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,I),t.createElementVNode("circle",{cx:e.value.centerCircleRadius+50,cy:50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,T)],2)):t.createCommentVNode("",!0),e.value.showCoordinates?(t.openBlock(),t.createElementBlock("g",D,[t.createElementVNode("text",{"text-anchor":"end",x:-e.value.centerCircleRadius+50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset,y:50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset,"font-size":e.value.coordinatesFontSize,fill:e.value.coordinatesColor,style:{"font-variant-numeric":"tabular-nums"},"font-family":"Arial"},t.toDisplayString(o.value.x.toFixed(0)),9,$),t.createElementVNode("g",{transform:`translate(${50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset}, ${-e.value.centerCircleRadius+50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset})`},[t.createElementVNode("text",{"text-anchor":"start","font-size":e.value.coordinatesFontSize,fill:e.value.coordinatesColor,style:{"font-variant-numeric":"tabular-nums"},transform:"rotate(-90)","font-family":"Arial"},t.toDisplayString(o.value.y.toFixed(0)),9,G)],8,W)])):t.createCommentVNode("",!0)],12,_)):t.createCommentVNode("",!0)}},q=C._export_sfc(P,[["__scopeId","data-v-e07e5d09"]]);exports.default=q;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Q=require("./pdf-BQABl7QG.cjs"),K=require("./useNestedProp-C8955nsn.cjs"),_=require("./index-Cn2tUOoX.cjs"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z={key:0,"data-dom-to-png-ignore":"",style:{width:"100%",display:"flex","justify-content":"end"}},ee=["disabled"],oe=["stroke"],ne={key:1},te=["id"],re=["onMousedown","onTouchstart"],ie=["onMousedown","onTouchstart"],ue=["onMousedown","onTouchstart"],se=["onMousedown","onTouchstart"],le=["onMousedown","onTouchstart"],A=1,ae={__name:"vue-ui-dashboard",props:{dataset:Array,config:Object},emits:["change"],setup(B,{expose:E,emit:z}){e.useCssVars(o=>({"56f02d00":R.value,"2fbe8dda":L.value}));const N={VueDataUi:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-data-ui-BbzW2_-6.cjs"))),VueUi3dBar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-3d-bar-WFymJ4EL.cjs"))),VueUiAccordion:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-accordion-7GoAZx3k.cjs"))),VueUiAgePyramid:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-age-pyramid-DGpLdvsL.cjs"))),VueUiAnnotator:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-annotator-ypStRKCB.cjs"))),VueUiCandlestick:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-candlestick-BrDk_pc_.cjs"))),VueUiChestnut:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-chestnut-D_NZDyDN.cjs"))),VueUiDigits:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-digits-C5PfeED6.cjs"))),VueUiDonut:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-donut-BM9i2XHJ.cjs"))),VueUiDonutEvolution:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-donut-evolution-Oga32kTV.cjs"))),VueUiDumbbell:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-dumbbell-ClzXgan7.cjs"))),VueUiFlow:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-flow-Bp1oqzTj.cjs"))),VueUiGalaxy:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-galaxy-D5vKPiFH.cjs"))),VueUiGauge:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-gauge-57ahTSbZ.cjs"))),VueUiHeatmap:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-heatmap-B8sfOhVF.cjs"))),VueUiKpi:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-kpi-DjI1yXtc.cjs"))),VueUiMiniLoader:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-mini-loader-BpAnNEHG.cjs"))),VueUiMolecule:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-molecule-BqpYPmrd.cjs"))),VueUiMoodRadar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-mood-radar-DI_FioVr.cjs"))),VueUiNestedDonuts:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-nested-donuts-B0rJlEH0.cjs"))),VueUiOnion:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-onion-CEHc9oKt.cjs"))),VueUiParallelCoordinatePlot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-parallel-coordinate-plot-C1sxm3Nr.cjs"))),VueUiQuadrant:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-quadrant-DM3Afg_i.cjs"))),VueUiQuickChart:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-quick-chart-ClJi48bc.cjs"))),VueUiRadar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-radar-f0QY_Mal.cjs"))),VueUiRating:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-rating-B71_TxmN.cjs"))),VueUiRelationCircle:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-relation-circle-DHOG2jKh.cjs"))),VueUiRings:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-rings-DoGxh2qe.cjs"))),VueUiScatter:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-scatter-BnRkkP5Z.cjs"))),VueUiSkeleton:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-skeleton-Mcoev-5q.cjs"))),VueUiSmiley:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-smiley-Ch9trBZA.cjs"))),VueUiSparkHistogram:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkhistogram-Bqtsbb3w.cjs"))),VueUiSparkStackbar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkstackbar-DeXUgBIH.cjs"))),VueUiSparkTrend:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-spark-trend-PqEN-rL8.cjs"))),VueUiSparkbar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkbar-DnRQFo63.cjs"))),VueUiSparkgauge:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkgauge-C0E5Sojk.cjs"))),VueUiSparkline:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-sparkline-BTruGe7A.cjs"))),VueUiStripPlot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-strip-plot-DzNU6VRW.cjs"))),VueUiTable:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-table-DP2ZaGWa.cjs"))),VueUiTableHeatmap:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-table-heatmap-B2gZkAqm.cjs"))),VueUiTableSparkline:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-table-sparkline-CgN2nMYT.cjs"))),VueUiThermometer:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-thermometer-DgZfQbR2.cjs"))),VueUiTimer:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-timer-ClM5FpoU.cjs"))),VueUiTiremarks:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-tiremarks-19Krsd1f.cjs"))),VueUiTreemap:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-treemap-DvmJ1MOU.cjs"))),VueUiVerticalBar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-vertical-bar-RT-SM-us.cjs"))),VueUiWaffle:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-waffle-BSKRUJbJ.cjs"))),VueUiWheel:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-wheel-DfBVkT9x.cjs"))),VueUiWordCloud:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-word-cloud-BlfCmzD-.cjs"))),VueUiXy:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-xy-aQEDcKbT.cjs"))),VueUiXyCanvas:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-xy-canvas-C6-sYgU_.cjs"))),VueUiCarouselTable:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-carousel-table-BTxtBHvb.cjs"))),VueUiGizmo:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-gizmo-D5_kCO9e.cjs"))),VueUiStackbar:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-stackbar-CaFp42Tn.cjs"))),VueUiBullet:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-bullet-C_Ppz5nn.cjs"))),VueUiFunnel:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-funnel-y3hN7BGU.cjs"))),VueUiHistoryPlot:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-history-plot-DQVpKlp1.cjs"))),VueUiCirclePack:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-circle-pack-lGkj98rL.cjs"))),VueUiWorld:e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./vue-ui-world-EgFhVXSY.cjs")))},{vue_ui_dashboard:$}=_.useConfig(),q=B,l=e.computed(()=>K.useNestedProp({userConfig:q.config,defaultConfig:$})),U=e.ref(_.createUid()),c=e.ref(l.value.locked);function x(){c.value=!c.value}const s=e.ref(q.dataset.map((o,n)=>({...o,index:n}))),k=e.computed(()=>s.value.map(o=>({...o,resolvedComponent:typeof o.component=="string"?N[o.component]:o.component}))),h=e.ref(null),u=e.ref(null),v=e.ref({x:0,y:0}),f=e.ref({x:0,y:0}),a=e.ref(null),d=e.ref(!1),m=e.ref(null),C=e.ref(!1),y=e.ref(!1);function w(o){const n=o.target;(n.tagName==="INPUT"&&n.type==="range"||n.classList.contains("range-handle"))&&(y.value=!0)}function T(o){const n=o.target;n.tagName==="INPUT"&&n.type==="range"&&(y.value=!1)}function M(){C.value=!0,Q.default({domElement:document.getElementById(`vue-ui-dashboard_${U.value}`),fileName:"vue-ui-dashboard"}).finally(()=>{C.value=!1})}function D(o){if(!c.value&&(d.value=!0,m.value=o,u.value===null)){h.value=o,v.value={x:event.clientX,y:event.clientY};const n=s.value[o],r=100-n.width,t=100-n.height;n.left<0&&(n.left=0),n.top<0&&(n.top=0),n.left>r&&(n.left=r),n.top>t&&(n.top=t),n.left<0&&(n.left=0),n.top<0&&(n.top=0),n.left+n.width>100&&(n.left=100-n.width),n.top+n.height>100&&(n.top=100-n.height)}}function P(o,n){d.value=!0,m.value=o,u.value={index:o,direction:n};const r=s.value[o];f.value={x:event.clientX,y:event.clientY,initialWidth:r.width,initialHeight:r.height}}function S(o,n,r){if(u.value.direction.includes("top")){const t=o.height-r/a.value.offsetHeight*100;t>=A&&(o.top+=r/a.value.offsetHeight*100,o.height=t)}if(u.value.direction.includes("bottom")){const t=o.height+r/a.value.offsetHeight*100;t>=A&&(o.height=t)}if(u.value.direction.includes("left")){const t=o.width-n/a.value.offsetWidth*100;t>=A&&(o.left+=n/a.value.offsetWidth*100,o.width=t)}if(u.value.direction.includes("right")){const t=o.width+n/a.value.offsetWidth*100;t>=A&&(o.width=t)}}function H(o){if(!(c.value||y.value)){if(d.value=!0,h.value!==null){const n=s.value[h.value],r=o.clientX-v.value.x,t=o.clientY-v.value.y,i=n.left+r/a.value.offsetWidth*100,p=n.top+t/a.value.offsetHeight*100;i>=0&&p>=0&&i+n.width<=100&&p+n.height<=100&&(n.left=i,n.top=p),v.value={x:o.clientX,y:o.clientY}}if(u.value!==null){const n=s.value[u.value.index],r=o.clientX-f.value.x,t=o.clientY-f.value.y;S(n,r,t),f.value={x:o.clientX,y:o.clientY}}}}const X=z;e.watch(s,o=>{o&&!d.value&&X("change",s.value)},{deep:!0});function I(){h.value=null,u.value=null,d.value=!1,m.value=null,s.value.forEach(o=>{o.left=Math.round(o.left/100*100),o.top=Math.round(o.top/100*100),o.width=Math.round(o.width/100*100),o.height=Math.round(o.height/100*100)})}function Y(o){c.value||y.value||(d.value=!0,m.value=o,u.value===null&&(h.value=o,v.value={x:event.touches[0].clientX,y:event.touches[0].clientY}))}function V(o,n,r){if(d.value=!0,m.value=o,u.value===null){u.value={index:o,direction:n};const t=s.value[o];f.value={x:r.touches[0].clientX,y:r.touches[0].clientY,initialWidth:t.width,initialHeight:t.height}}}function b(o){if(d.value=!0,o.preventDefault(),u.value!==null){const n=s.value[u.value.index],r=o.touches[0].clientX-f.value.x,t=o.touches[0].clientY-f.value.y;S(n,r,t),f.value={x:o.touches[0].clientX,y:o.touches[0].clientY}}}function W(o){if(!(c.value||y.value)&&(d.value=!0,o.preventDefault(),h.value!==null)){const n=s.value[h.value],r=o.touches[0].clientX-v.value.x,t=o.touches[0].clientY-v.value.y,i=n.left+r/a.value.offsetWidth*100,p=n.top+t/a.value.offsetHeight*100;i>=0&&p>=0&&i+n.width<=100&&p+n.height<=100&&(n.left=i,n.top=p),v.value={x:o.touches[0].clientX,y:o.touches[0].clientY}}}function g(){d.value=!1,m.value=null,h.value=null,u.value=null,s.value.forEach(o=>{o.left=Math.round(o.left/100*100),o.top=Math.round(o.top/100*100),o.width=Math.round(o.width/100*100),o.height=Math.round(o.height/100*100)})}const R=e.computed(()=>l.value.style.item.borderColor),L=e.computed(()=>l.value.style.resizeHandles.backgroundColor),F=e.computed(()=>l.value.style.board.aspectRatio),O=e.computed(()=>l.value.style.board.backgroundColor),G=e.computed(()=>l.value.style.board.border);function j(){return s.value}return E({generatePdf:M,getItemsPositions:j,toggleLock:x}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{onMousedown:w,onMouseup:T,onTouchstart:w,onTouchend:T},[l.value.allowPrint?(e.openBlock(),e.createElementBlock("div",Z,[e.createElementVNode("button",{class:"vue-ui-dashboard-button",onClick:M,disabled:C.value,style:e.normalizeStyle([{"margin-top":"12px"},`color:${l.value.style.board.color}`])},[C.value?(e.openBlock(),e.createElementBlock("svg",{key:0,class:"vue-ui-dashboard-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:l.value.style.board.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},n[4]||(n[4]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-f5946722></path><path d="M18 16v.01" data-v-f5946722></path><path d="M6 16v.01" data-v-f5946722></path><path d="M12 5v.01" data-v-f5946722></path><path d="M12 12v.01" data-v-f5946722></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-f5946722></path>',6)]),8,oe)):(e.openBlock(),e.createElementBlock("span",ne,"PDF"))],12,ee)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-dashboard-container",ref_key:"dashboardContainer",ref:a,id:`vue-ui-dashboard_${U.value}`,style:e.normalizeStyle(`border:${G.value}; background:${O.value}; aspect-ratio:${F.value}`)},[e.createElementVNode("div",{class:"vue-ui-dashboard-grid-container",ref:"container",onMousemove:H,onMouseup:I,onTouchmove:W,onTouchend:g,style:e.normalizeStyle(`background:${l.value.style.board.backgroundColor}`)},[n[5]||(n[5]=e.createElementVNode("div",{class:"vue-ui-dashboard-grid"},null,-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(r,t)=>(e.openBlock(),e.createElementBlock("div",{key:r.id,class:e.normalizeClass({"vue-ui-dashboard-grid-item":!0,"vue-ui-dashboard-grid-item--locked":c.value}),style:e.normalizeStyle({width:`${r.width}%`,height:`${r.height}%`,left:`${r.left}%`,top:`${r.top}%`,cursor:"move",boxShadow:m.value===t?"0 6px 12px -3px rgba(0,0,0,0.3)":"",zIndex:m.value===t?k.value.length+1:r.index,backgroundColor:l.value.style.item.backgroundColor}),onMousedown:i=>D(t),onTouchstart:i=>Y(t)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left",onMousedown:i=>P(t,"top-left"),onTouchstart:i=>V(t,"top-left",i),onTouchmove:n[0]||(n[0]=i=>b(i)),onTouchend:g},null,40,ie),e.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right",onMousedown:i=>P(t,"top-right"),onTouchstart:i=>V(t,"top-right",i),onTouchmove:n[1]||(n[1]=i=>b(i)),onTouchend:g},null,40,ue),e.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left",onMousedown:i=>P(t,"bottom-left"),onTouchstart:i=>V(t,"bottom-left",i),onTouchmove:n[2]||(n[2]=i=>b(i)),onTouchend:g},null,40,se),e.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right",onMousedown:i=>P(t,"bottom-right"),onTouchstart:i=>V(t,"bottom-right",i),onTouchmove:n[3]||(n[3]=i=>b(i)),onTouchend:g},null,40,le)],64)),e.renderSlot(o.$slots,"top",{item:r,index:t},void 0,!0),r.resolvedComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.resolvedComponent),e.mergeProps({key:1,ref_for:!0},r.props),null,16)):e.renderSlot(o.$slots,"content",{key:2,item:r,index:t,left:r.left,top:r.top,height:r.height,width:r.width},void 0,!0),e.renderSlot(o.$slots,"bottom",{item:r,index:t},void 0,!0)],46,re))),128))],36)],12,te)],32))}},de=J._export_sfc(ae,[["__scopeId","data-v-f5946722"]]);exports.default=de;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),g=require("./useNestedProp-C8955nsn.cjs"),L=require("./index-Cn2tUOoX.cjs"),f={key:0},m=["d","fill"],k=["d","fill"],h=["d","fill"],v=["d","fill"],C=["d","fill"],N=["d","fill"],b=["d","fill"],B={key:1},E=["cx","cy","fill"],q={__name:"Digit",props:{quanta:{type:String,default:null},backgroundColor:{type:String,default:"#e1e5e8"},color:{type:String,default:"#000000"},x:{type:Number,default:0},y:{type:Number,default:0}},setup(e){const $=e,u=t.ref({0:"1111110",1:"0110000",2:"1101101",3:"1111001",4:"0110011",5:"1011011",6:"1011111",7:"1110000",8:"1111111",9:"1111011","-":"0000001",X:"0000000"}),l=t.computed(()=>[void 0,null].includes($.quanta)?u.value.X:u.value[$.quanta]);return(a,x)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[[void 0,null,"."].includes(e.quanta)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("g",f,[t.createElementVNode("path",{d:`M ${e.x} ${e.y} L ${e.x+2} ${e.y-2} L ${e.x+24} ${e.y-2} L ${e.x+26} ${e.y} L ${e.x+24} ${e.y+2} L ${e.x+2} ${e.y+2}Z`,fill:l.value[0]==1?e.color:e.backgroundColor,stroke:"none"},null,8,m),t.createElementVNode("path",{d:`M ${e.x+26} ${e.y+26} L ${e.x+26} ${e.y+4} L ${e.x+28} ${e.y+2} L ${e.x+30} ${e.y+4} L ${e.x+30} ${e.y+26} L ${e.x+28} ${e.y+28} L ${e.x+26} ${e.y+26}`,fill:l.value[1]==1?e.color:e.backgroundColor,stroke:"none"},null,8,k),t.createElementVNode("path",{d:`M ${e.x+26} ${e.y+56} L ${e.x+26} ${e.y+34} L ${e.x+28} ${e.y+32} L ${e.x+30} ${e.y+34} L ${e.x+30} ${e.y+56} L ${e.x+28} ${e.y+58} L ${e.x+26} ${e.y+56}`,fill:l.value[2]==1?e.color:e.backgroundColor,stroke:"none"},null,8,h),t.createElementVNode("path",{d:`M ${e.x+2} ${e.y+58} L ${e.x} ${e.y+60} L ${e.x+2} ${e.y+62} L ${e.x+24} ${e.y+62} L ${e.x+26} ${e.y+60} L ${e.x+24} ${e.y+58} L ${e.x+2} ${e.y+58}`,fill:l.value[3]==1?e.color:e.backgroundColor,stroke:"none"},null,8,v),t.createElementVNode("path",{d:`M ${e.x} ${e.y+34} L ${e.x-2} ${e.y+32} L ${e.x-4} ${e.y+34} L ${e.x-4} ${e.y+56} L ${e.x-2} ${e.y+58} L ${e.x} ${e.y+56} L ${e.x} ${e.y+34}`,fill:l.value[4]==1?e.color:e.backgroundColor,stroke:"none"},null,8,C),t.createElementVNode("path",{d:`M ${e.x-2} ${e.y+2} L ${e.x} ${e.y+4} L ${e.x} ${e.y+26} L ${e.x-2} ${e.y+28} L ${e.x-4} ${e.y+26} L ${e.x-4} ${e.y+4} L ${e.x-2} ${e.y+2}`,fill:l.value[5]==1?e.color:e.backgroundColor,stroke:"none"},null,8,N),t.createElementVNode("path",{d:`M ${e.x+2} ${e.y+28} L ${e.x} ${e.y+30} L ${e.x+2} ${e.y+32} L ${e.x+24} ${e.y+32} L ${e.x+26} ${e.y+30} L ${e.x+24} ${e.y+28} L ${e.x+2} ${e.y+28}`,fill:l.value[6]==1?e.color:e.backgroundColor,stroke:"none"},null,8,b)])),e.quanta=="."?(t.openBlock(),t.createElementBlock("g",B,[t.createElementVNode("circle",{cx:e.x-8,cy:e.y+60,r:3,fill:e.color},null,8,E)])):t.createCommentVNode("",!0)],64))}},M=["xmlns","viewBox"],V={__name:"vue-ui-digits",props:{dataset:{type:Number,default:0},config:{type:Object,default(){return{}}}},setup(e){const{vue_ui_digits:$}=L.useConfig(),u=e,l=t.computed(()=>g.useNestedProp({userConfig:u.config,defaultConfig:$})),a=t.computed(()=>{const c=(u.dataset||0).toString().split(""),i=[],n={x:10,y:10};let d=0;for(let y=0;y<c.length;y+=1){const o=c[y];i.push({x:n.x+d,y:n.y,quanta:o}),o=="."?d+=2:d+=44}return i}),x=t.computed(()=>Math.max(...a.value.map(c=>c.x))+36);return(c,i)=>(t.openBlock(),t.createElementBlock("svg",{class:"vue-ui-digits",xmlns:t.unref(L.XMLNS),viewBox:`0 0 ${x.value} 80`,style:t.normalizeStyle(`background:${l.value.backgroundColor};${l.value.height?`height:${l.value.height};`:""}${l.value.width?`width:${l.value.width}`:""}`)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,n=>(t.openBlock(),t.createBlock(q,{x:n.x,y:n.y,quanta:n.quanta,color:l.value.digits.color,backgroundColor:l.value.digits.skeletonColor},null,8,["x","y","quanta","color","backgroundColor"]))),256))],12,M))}};exports.default=V;