vue-data-ui 2.3.12 → 2.3.13

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 (136) hide show
  1. package/dist/{Arrow-D9RknCbe.js → Arrow-CxtecoRx.js} +1 -1
  2. package/dist/{Arrow-CAMiXnML.cjs → Arrow-DVPNR1Nh.cjs} +1 -1
  3. package/dist/{BaseIcon-DB1g9sdS.js → BaseIcon-Di0MGg_5.js} +1 -1
  4. package/dist/{BaseIcon-5MAyZTOz.cjs → BaseIcon-Dmx2OFvz.cjs} +1 -1
  5. package/dist/{DataTable-CGX9xKvm.cjs → DataTable-DQGTnBUl.cjs} +1 -1
  6. package/dist/{DataTable-Bza1ed62.js → DataTable-cwJyYtAp.js} +2 -2
  7. package/dist/{Legend-BEMGbN0s.cjs → Legend-BEEbv4va.cjs} +1 -1
  8. package/dist/{Legend-C4cCpb4z.js → Legend-CwT-9P7R.js} +1 -1
  9. package/dist/{Shape-BTzik3V0.cjs → Shape-D_rvgadQ.cjs} +1 -1
  10. package/dist/{Shape-Bttb-v8s.js → Shape-Gv8uj72o.js} +1 -1
  11. package/dist/{Slicer-CuwuufTu.cjs → Slicer-BS_vWPLd.cjs} +1 -1
  12. package/dist/{Slicer-WyjxXfiD.js → Slicer-_2QX31RS.js} +1 -1
  13. package/dist/{Title-BSpLzDC1.js → Title-2ab2u_K8.js} +1 -1
  14. package/dist/{Title-XRMcJkna.cjs → Title-DpgU75bw.cjs} +1 -1
  15. package/dist/{Tooltip-COgv-iii.cjs → Tooltip-B2BLFWIv.cjs} +1 -1
  16. package/dist/{Tooltip-DI8_Wjjy.js → Tooltip-mW2mhj5b.js} +1 -1
  17. package/dist/index--K6Ja9Gj.cjs +4 -0
  18. package/dist/{index-ByO3Ywek.js → index-8jKJqifI.js} +2 -2
  19. package/dist/{useNestedProp-Dikfncsl.cjs → useNestedProp-Bs4c78Cx.cjs} +1 -1
  20. package/dist/{useNestedProp-Da77DnaA.js → useNestedProp-R6UMUTVL.js} +1 -1
  21. package/dist/{usePrinter-Dda5FBG3.js → usePrinter-BZ_nWqN_.js} +1 -1
  22. package/dist/{usePrinter-DedM_6px.cjs → usePrinter-CysnJve5.cjs} +1 -1
  23. package/dist/{vue-data-ui-CV6BvTv3.cjs → vue-data-ui-B_t2clEx.cjs} +1 -1
  24. package/dist/{vue-data-ui-Cl7hqjOh.js → vue-data-ui-cMMDkIkv.js} +55 -55
  25. package/dist/vue-data-ui.cjs +1 -1
  26. package/dist/vue-data-ui.js +1 -1
  27. package/dist/{vue-ui-3d-bar-DoFgj58m.js → vue-ui-3d-bar-BbuTc4wl.js} +7 -7
  28. package/dist/{vue-ui-3d-bar-DMek7e52.cjs → vue-ui-3d-bar-D_KT2ttX.cjs} +1 -1
  29. package/dist/{vue-ui-accordion-BytUYLYl.cjs → vue-ui-accordion-B0UeLf1b.cjs} +1 -1
  30. package/dist/{vue-ui-accordion-CbKHVPHh.js → vue-ui-accordion-BsXo1_Ap.js} +3 -3
  31. package/dist/{vue-ui-age-pyramid-CZy4Y3uw.js → vue-ui-age-pyramid-2ncnyfbF.js} +8 -8
  32. package/dist/{vue-ui-age-pyramid-DjlXDjMI.cjs → vue-ui-age-pyramid-NkJjm7Y5.cjs} +1 -1
  33. package/dist/{vue-ui-annotator-BqG8z2Ms.js → vue-ui-annotator-1XKNdkzk.js} +1 -1
  34. package/dist/{vue-ui-annotator-BJShyHMc.cjs → vue-ui-annotator-Cp_9YW9j.cjs} +1 -1
  35. package/dist/{vue-ui-candlestick-DkOQM3qu.js → vue-ui-candlestick-BRtCmvvk.js} +9 -9
  36. package/dist/{vue-ui-candlestick-DJETMuli.cjs → vue-ui-candlestick-C7UfUhKH.cjs} +1 -1
  37. package/dist/{vue-ui-carousel-table-C2vcNP0X.js → vue-ui-carousel-table-BDSfeqmZ.js} +4 -4
  38. package/dist/{vue-ui-carousel-table-BQipTTWP.cjs → vue-ui-carousel-table-DqFMeiuA.cjs} +1 -1
  39. package/dist/{vue-ui-chestnut-D39qozSK.js → vue-ui-chestnut-BYjoX9jF.js} +6 -6
  40. package/dist/{vue-ui-chestnut-D3FtT3JK.cjs → vue-ui-chestnut-C8OAoRK_.cjs} +1 -1
  41. package/dist/{vue-ui-cursor-LMFBAzPM.js → vue-ui-cursor-D2Z7TPI-.js} +2 -2
  42. package/dist/{vue-ui-cursor-CpJO5mEd.cjs → vue-ui-cursor-g-HCrJEh.cjs} +1 -1
  43. package/dist/{vue-ui-dashboard-BzOic-SZ.cjs → vue-ui-dashboard-BtcFyRqQ.cjs} +1 -1
  44. package/dist/{vue-ui-dashboard-C-LaI61T.js → vue-ui-dashboard-Di61LOP8.js} +2 -2
  45. package/dist/{vue-ui-digits-D2XilsJW.cjs → vue-ui-digits-CWBg_VEu.cjs} +1 -1
  46. package/dist/{vue-ui-digits-BMoM0DwG.js → vue-ui-digits-DZ4PtZ2V.js} +2 -2
  47. package/dist/{vue-ui-donut-BYacXuN1.cjs → vue-ui-donut-D7coup6_.cjs} +1 -1
  48. package/dist/{vue-ui-donut-evolution-DwhuTpBB.cjs → vue-ui-donut-evolution-D0CnAbTe.cjs} +1 -1
  49. package/dist/{vue-ui-donut-evolution-Dr1MkSB2.js → vue-ui-donut-evolution-DFnIT2Ha.js} +9 -9
  50. package/dist/{vue-ui-donut-DvESP2fh.js → vue-ui-donut-goSbPuLj.js} +9 -9
  51. package/dist/{vue-ui-dumbbell-kTZ4cbhw.js → vue-ui-dumbbell-Bg3ZJTCq.js} +8 -8
  52. package/dist/{vue-ui-dumbbell-CzYf1Etr.cjs → vue-ui-dumbbell-CgLLF153.cjs} +1 -1
  53. package/dist/{vue-ui-flow-BkSTX5_A.js → vue-ui-flow-B3z_g_8N.js} +7 -7
  54. package/dist/{vue-ui-flow-BJbCaSJI.cjs → vue-ui-flow-BkxQCKjx.cjs} +1 -1
  55. package/dist/{vue-ui-galaxy-DiKAWRBN.js → vue-ui-galaxy-9GX2Yn08.js} +9 -9
  56. package/dist/{vue-ui-galaxy-Bb-A8wCU.cjs → vue-ui-galaxy-XEjtYCs3.cjs} +1 -1
  57. package/dist/{vue-ui-gauge-Dt6Cuuo0.js → vue-ui-gauge-BlGlMncn.js} +4 -4
  58. package/dist/{vue-ui-gauge-DvYBrZs4.cjs → vue-ui-gauge-CgPj9uEv.cjs} +1 -1
  59. package/dist/{vue-ui-heatmap-KHa42VW8.cjs → vue-ui-heatmap-B4CFPky7.cjs} +1 -1
  60. package/dist/{vue-ui-heatmap-B9B0h5N8.js → vue-ui-heatmap-hMExvod2.js} +8 -8
  61. package/dist/{vue-ui-kpi-BfqVRF0H.cjs → vue-ui-kpi-BK9T4bpj.cjs} +1 -1
  62. package/dist/{vue-ui-kpi-Bts4qzfH.js → vue-ui-kpi-Cq6v98L7.js} +2 -2
  63. package/dist/{vue-ui-mini-loader-DdlM_ms1.cjs → vue-ui-mini-loader-CbxnHLGF.cjs} +1 -1
  64. package/dist/{vue-ui-mini-loader-CZtaTr-s.js → vue-ui-mini-loader-Dlt9PzOu.js} +2 -2
  65. package/dist/{vue-ui-molecule-Y29DXzD8.js → vue-ui-molecule-Do_rYDzn.js} +9 -9
  66. package/dist/{vue-ui-molecule-Cey5Cuqp.cjs → vue-ui-molecule-o7CQo9fo.cjs} +1 -1
  67. package/dist/{vue-ui-mood-radar-CaXsxM2P.js → vue-ui-mood-radar-CUJgwOoe.js} +9 -9
  68. package/dist/{vue-ui-mood-radar-BGQYx51N.cjs → vue-ui-mood-radar-DI5JbPJo.cjs} +1 -1
  69. package/dist/{vue-ui-nested-donuts-B0OSKK4x.cjs → vue-ui-nested-donuts-DKoxrXcL.cjs} +1 -1
  70. package/dist/{vue-ui-nested-donuts-8aIjfQHr.js → vue-ui-nested-donuts-Dj2KRb7e.js} +9 -9
  71. package/dist/{vue-ui-onion-BuM5DcbA.js → vue-ui-onion-Cc2jbWrA.js} +9 -9
  72. package/dist/{vue-ui-onion-D8Ug2z_r.cjs → vue-ui-onion-yFKEaqim.cjs} +1 -1
  73. package/dist/{vue-ui-parallel-coordinate-plot-RAjWALxs.cjs → vue-ui-parallel-coordinate-plot-Bktf9Q8d.cjs} +1 -1
  74. package/dist/{vue-ui-parallel-coordinate-plot-BnylgPQ1.js → vue-ui-parallel-coordinate-plot-sbbh6u1F.js} +10 -10
  75. package/dist/{vue-ui-quadrant-DpUSb39t.js → vue-ui-quadrant-BPR-kNQP.js} +10 -10
  76. package/dist/{vue-ui-quadrant-Bd9XzzOJ.cjs → vue-ui-quadrant-R3-Xo1sw.cjs} +1 -1
  77. package/dist/{vue-ui-quick-chart-CMkvhuhW.js → vue-ui-quick-chart-DO8ZMKIh.js} +6 -6
  78. package/dist/{vue-ui-quick-chart-7dYq_RGE.cjs → vue-ui-quick-chart-DfSCSQqC.cjs} +1 -1
  79. package/dist/{vue-ui-radar-DVFyhzLg.cjs → vue-ui-radar-66Df70XX.cjs} +1 -1
  80. package/dist/{vue-ui-radar-BlHTPxa4.js → vue-ui-radar-aAN29Jds.js} +10 -10
  81. package/dist/{vue-ui-rating-cVAVmnzB.js → vue-ui-rating-CjBBd7yH.js} +2 -2
  82. package/dist/{vue-ui-rating-DRncGN96.cjs → vue-ui-rating-D_ccOaNz.cjs} +1 -1
  83. package/dist/{vue-ui-relation-circle-B8iBDo0q.js → vue-ui-relation-circle-CMzLThvR.js} +5 -5
  84. package/dist/{vue-ui-relation-circle-C8QjpkXl.cjs → vue-ui-relation-circle-Ck1rJqbu.cjs} +1 -1
  85. package/dist/{vue-ui-rings-CQq3JQNk.js → vue-ui-rings-CLZcLdfP.js} +9 -9
  86. package/dist/{vue-ui-rings-m4MWlNsq.cjs → vue-ui-rings-ChK4CWHY.cjs} +1 -1
  87. package/dist/{vue-ui-scatter-C-Egs7S_.js → vue-ui-scatter-08CGJzrL.js} +10 -10
  88. package/dist/{vue-ui-scatter-mNEnBtaf.cjs → vue-ui-scatter-nYfvOhiI.cjs} +1 -1
  89. package/dist/{vue-ui-screenshot-Bl9jX-C2.cjs → vue-ui-screenshot-B-dCSFDA.cjs} +1 -1
  90. package/dist/{vue-ui-screenshot-DfHSBG7u.js → vue-ui-screenshot-BlJChEJa.js} +1 -1
  91. package/dist/{vue-ui-skeleton-rY_nZhMQ.cjs → vue-ui-skeleton-Bf_PLiHN.cjs} +1 -1
  92. package/dist/{vue-ui-skeleton-BxRSQeuo.js → vue-ui-skeleton-CxbgzdoX.js} +2 -2
  93. package/dist/{vue-ui-smiley-J5ng6jFT.js → vue-ui-smiley-C_atoEId.js} +2 -2
  94. package/dist/{vue-ui-smiley-BWTx88Vc.cjs → vue-ui-smiley-CwpLvr5B.cjs} +1 -1
  95. package/dist/{vue-ui-spark-trend-CKllSCO9.cjs → vue-ui-spark-trend-DgvljrXb.cjs} +1 -1
  96. package/dist/{vue-ui-spark-trend-CSgSKyhQ.js → vue-ui-spark-trend-jzplEySC.js} +4 -4
  97. package/dist/{vue-ui-sparkbar-wLasc_jU.cjs → vue-ui-sparkbar-BaqyijV1.cjs} +1 -1
  98. package/dist/{vue-ui-sparkbar-BDSuCvBs.js → vue-ui-sparkbar-DQSTdQ1V.js} +36 -37
  99. package/dist/{vue-ui-sparkgauge-DsKCi2rC.js → vue-ui-sparkgauge-B5UKLj0l.js} +3 -3
  100. package/dist/{vue-ui-sparkgauge-DLf9qwso.cjs → vue-ui-sparkgauge-Z18yo2Z8.cjs} +1 -1
  101. package/dist/{vue-ui-sparkhistogram-BY9WjI96.js → vue-ui-sparkhistogram-Be3ehhGJ.js} +4 -4
  102. package/dist/{vue-ui-sparkhistogram-D3xFCR7z.cjs → vue-ui-sparkhistogram-CmCIpXl6.cjs} +1 -1
  103. package/dist/{vue-ui-sparkline-D8gMceMV.js → vue-ui-sparkline-BYqBWbjw.js} +3 -3
  104. package/dist/{vue-ui-sparkline-BhB4gTda.cjs → vue-ui-sparkline-D80QVWdy.cjs} +1 -1
  105. package/dist/{vue-ui-sparkstackbar-dINlqLlM.cjs → vue-ui-sparkstackbar-DH4dUMx0.cjs} +1 -1
  106. package/dist/{vue-ui-sparkstackbar-8ap_HMW0.js → vue-ui-sparkstackbar-DjnE1I-5.js} +3 -3
  107. package/dist/{vue-ui-strip-plot-wUXpoWOD.cjs → vue-ui-strip-plot-Cln20Ld8.cjs} +1 -1
  108. package/dist/{vue-ui-strip-plot-Duu9jsML.js → vue-ui-strip-plot-DJy6rHjW.js} +9 -9
  109. package/dist/{vue-ui-table-Bbjo6d7J.js → vue-ui-table-Ffw1XO2M.js} +1 -1
  110. package/dist/{vue-ui-table-heatmap-CokrixjX.js → vue-ui-table-heatmap-BQexH7HX.js} +4 -4
  111. package/dist/{vue-ui-table-heatmap-BWUGw4tD.cjs → vue-ui-table-heatmap-D1Nbq4uX.cjs} +1 -1
  112. package/dist/{vue-ui-table-sparkline-DwStFsdv.cjs → vue-ui-table-sparkline-tfvjgw5Z.cjs} +1 -1
  113. package/dist/{vue-ui-table-sparkline-B4f74K6D.js → vue-ui-table-sparkline-uVlNJ867.js} +5 -5
  114. package/dist/{vue-ui-table-DPBuQHl9.cjs → vue-ui-table-zZ7Z9muE.cjs} +1 -1
  115. package/dist/{vue-ui-thermometer-Bvw08auw.js → vue-ui-thermometer-C3aP4aYg.js} +5 -5
  116. package/dist/{vue-ui-thermometer-D4lvsaZQ.cjs → vue-ui-thermometer-DKYjF4LF.cjs} +1 -1
  117. package/dist/{vue-ui-timer-BSU22BD2.cjs → vue-ui-timer-BdwfMEMG.cjs} +1 -1
  118. package/dist/{vue-ui-timer-C6zSHO_W.js → vue-ui-timer-dDMpywVB.js} +4 -4
  119. package/dist/{vue-ui-tiremarks-CH0_xCoD.cjs → vue-ui-tiremarks-CKmVyzxM.cjs} +1 -1
  120. package/dist/{vue-ui-tiremarks-BY4m2mEn.js → vue-ui-tiremarks-pjMd7d-R.js} +5 -5
  121. package/dist/{vue-ui-treemap-DIxqUkmn.cjs → vue-ui-treemap-BuEmj1Sy.cjs} +1 -1
  122. package/dist/{vue-ui-treemap-DWBXR_CR.js → vue-ui-treemap-CXwX04Bu.js} +9 -9
  123. package/dist/{vue-ui-vertical-bar-DnPmmj4p.cjs → vue-ui-vertical-bar-BV_CvoPe.cjs} +1 -1
  124. package/dist/{vue-ui-vertical-bar-BxvhqgWg.js → vue-ui-vertical-bar-DC8B39Uu.js} +9 -9
  125. package/dist/{vue-ui-waffle-CYpc5Enk.cjs → vue-ui-waffle-Doh1T4Ji.cjs} +1 -1
  126. package/dist/{vue-ui-waffle-BlFjCDDx.js → vue-ui-waffle-t4gEowfH.js} +9 -9
  127. package/dist/{vue-ui-wheel-CHvx9zQF.js → vue-ui-wheel-B9yjkkA6.js} +5 -5
  128. package/dist/{vue-ui-wheel-WxC0_YV_.cjs → vue-ui-wheel-Rv1F1zVc.cjs} +1 -1
  129. package/dist/{vue-ui-word-cloud-LMl5vudk.cjs → vue-ui-word-cloud-CIdTdi88.cjs} +1 -1
  130. package/dist/{vue-ui-word-cloud-BnLAMza-.js → vue-ui-word-cloud-SlFlX-fY.js} +6 -6
  131. package/dist/{vue-ui-xy-DHzwqXVf.cjs → vue-ui-xy-CzqnufbM.cjs} +1 -1
  132. package/dist/{vue-ui-xy-DStN5sP4.js → vue-ui-xy-DpnhJcZD.js} +12 -12
  133. package/dist/{vue-ui-xy-canvas-D3zCvIfh.js → vue-ui-xy-canvas-Dwl-uL4T.js} +10 -10
  134. package/dist/{vue-ui-xy-canvas-DTjWEsfN.cjs → vue-ui-xy-canvas-Dzl92nPU.cjs} +1 -1
  135. package/package.json +1 -1
  136. package/dist/index-BDKEFvEF.cjs +0 -4
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BDKEFvEF.cjs"),te=require("./useNestedProp-Dikfncsl.cjs"),D=require("./usePrinter-DedM_6px.cjs"),oe=require("./vue-ui-skeleton-rY_nZhMQ.cjs"),ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],le=["height"],re=["data-cell","height"],ie={__name:"vue-ui-carousel-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(v,{expose:G}){const l=v,{vue_ui_carousel_table:j}=r.useConfig(),w=e.ref(r.createUid()),I=e.ref(!1),f=e.ref(!!l.dataset);e.onMounted(()=>{r.objectIsEmpty(l.dataset)?r.error({componentName:"VueUiCarouselTable",type:"dataset"}):((!l.dataset.head||r.objectIsEmpty(l.dataset.head))&&(r.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"head"}),f.value=!1),(!l.dataset.body||r.objectIsEmpty(l.dataset.body))&&(r.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"body"}),f.value=!1))});const t=e.computed(()=>te.useNestedProp({userConfig:l.config,defaultConfig:j})),{isPrinting:z,isImaging:P,generatePdf:X,generateImage:E}=D.usePrinter({elementId:`carousel-table_${w.value}`,fileName:t.value.caption.text||"vue-ui-carousel-table"}),u=e.ref({showAnimation:t.value.animation.use}),s=e.ref(null),F=e.ref(null),m=e.ref(null),h=e.ref(null),g=e.ref(0),x=e.ref(0),$=e.ref(!1),T=e.ref(null),d=e.ref(null),b=e.ref(0);function N(){T.value&&(d.value={elements:T.value.getElementsByTagName("tr"),heights:Array.from(T.value.getElementsByTagName("tr")).map(o=>o.getBoundingClientRect().height)})}e.onMounted(N);const J=e.computed(()=>!d.value||!d.value.heights.length?0:Math.max(...d.value.heights)+g.value+x.value),K=e.computed(()=>l.dataset.body?t.value.tbody.tr.visible<=l.dataset.body.length?t.value.tbody.tr.visible:l.dataset.body.length:0),Q=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)*K.value+g.value+x.value),A=e.ref(0),y=e.ref(null),k=e.ref(0),c=e.ref(!1),O=e.ref(0);e.onMounted(()=>{m.value&&(g.value=m.value.getBoundingClientRect().height),h.value&&(x.value=h.value.getBoundingClientRect().height),u.value.showAnimation&&d.value&&R()});function W(o){I.value=o,O.value+=1}function R(){!y.value&&!c.value&&(y.value=requestAnimationFrame(V))}function Y(){if(!s.value)return!1;const{scrollTop:o,scrollHeight:a,clientHeight:n}=s.value;return o+n>=a}function V(o){if(c.value)return;k.value||(k.value=o),o-k.value>=t.value.animation.speedMs&&(A.value+=d.value.heights[b.value],(Y()||b.value>=d.value.heights.length)&&(A.value=0,b.value=0),s.value&&(s.value.scrollTo({top:A.value,behavior:"smooth"}),b.value+=1),k.value=o),y.value=requestAnimationFrame(V)}function p(){c.value=!0,cancelAnimationFrame(y.value),y.value=null}e.onBeforeUnmount(p);function C(){!c.value||!u.value.showAnimation||(c.value=!1,k.value=0,R())}function Z(){t.value.animation.pauseOnHover&&p()}const S=e.ref(null);function _(){p(),clearTimeout(S.value)}function H(){clearTimeout(S.value),S.value=setTimeout(C,1e3)}e.watch(()=>t.value.animation.use,o=>{o?(u.value.showAnimation=!0,C()):(u.value.showAnimation=!1,p())});const ee=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{const o=new ResizeObserver(a=>{a.forEach(n=>{$.value=n.contentRect.width<ee.value}),g.value=m.value?m.value.getBoundingClientRect().height:0,x.value=h.value?h.value.getBoundingClientRect().height:0,b.value=0,N()});s.value&&o.observe(s.value)});function M(){X()}function L(){u.value.showAnimation=!u.value.showAnimation,u.value.showAnimation?C():p()}function U(){e.nextTick(()=>{const o=l.dataset.head.map((i,B)=>[[l.dataset.body[B]]]),a=[[t.value.caption.text],[l.dataset.head.map(i=>[i])]].concat(o),n=r.createCsvContent(a);r.downloadCsv({csvContent:n,title:t.value.caption.text||"vue-ui-carousel-table"})})}return G({pauseAnimation:p,resumeAnimation:C,toggleAnimation:L,generateCsv:U,generatePdf:M,generateImage:E}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{style:{position:"relative",overflow:"visible"},ref_key:"chartContainer",ref:F},[e.createElementVNode("div",{ref_key:"tableContainer",ref:s,id:`carousel-table_${w.value}`,style:e.normalizeStyle({height:e.unref(z)||e.unref(P)?"auto":`${Math.max(Q.value,J.value)}px`,containerType:"inline-size",position:"relative",overflow:"auto",fontFamily:t.value.fontFamily}),class:e.normalizeClass({"vue-ui-responsive":$.value,"is-playing":!c.value}),onMouseenter:a[0]||(a[0]=n=>Z()),onMouseleave:a[1]||(a[1]=n=>C()),onTouchstart:a[2]||(a[2]=n=>_()),onTouchend:a[3]||(a[3]=n=>H()),onTouchcancel:a[4]||(a[4]=n=>H())},[f.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"})},[e.createElementVNode("caption",{ref_key:"caption",ref:m,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:$.value?t.value.thead.tr.style.boxShadow:"none",minHeight:"36px"})},[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:`${g.value}px`,zIndex:1})},[e.createElementVNode("tr",{ref_key:"tableRow",ref:h,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:$.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(v.dataset.head,(n,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?"":n)+" ",1),e.renderSlot(o.$slots,"th",e.normalizeProps(e.guardReactiveProps({th:n,colIndex:i})),void 0,!0)],4))),128))],12,le)],4),v.dataset.body&&v.dataset.head?(e.openBlock(),e.createElementBlock("tbody",{key:0,ref_key:"tbody",ref:T},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.dataset.body,(n,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(n,(B,q)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":v.dataset.head[q]||"",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:t.value.tbody.tr.td.style.backgroundColor+e.unref(r.opacity)[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?"":B)+" ",1),e.renderSlot(o.$slots,"td",e.normalizeProps(e.guardReactiveProps({td:B,rowIndex:i,colIndex:q})),void 0,!0)],12,re))),256))],4))),256))],512)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],46,ne),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe.default,{key:0,config:{type:"table"}})),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(D.UserOptions,{ref:"details",key:`user_option_${O.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isPrinting:e.unref(z),isImaging:e.unref(P),uid:w.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:!u.value.showAnimation,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:I.value,chartElement:F.value,titles:{...t.value.userOptions.buttonTitles},zIndex:3,noOffset:"",onGeneratePdf:M,onGenerateCsv:U,onGenerateImage:e.unref(E),onToggleAnimation:L,onToggleFullscreen:W},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionAnimation?{name:"optionAnimation",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionAnimation",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasAnimation","isAnimation","hasFullscreen","isFullscreen","chartElement","titles","onGenerateImage"])):e.createCommentVNode("",!0)],512))}},ue=ae._export_sfc(ie,[["__scopeId","data-v-c06beec9"]]);exports.default=ue;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index--K6Ja9Gj.cjs"),te=require("./useNestedProp-Bs4c78Cx.cjs"),D=require("./usePrinter-CysnJve5.cjs"),oe=require("./vue-ui-skeleton-Bf_PLiHN.cjs"),ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],le=["height"],re=["data-cell","height"],ie={__name:"vue-ui-carousel-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(v,{expose:G}){const l=v,{vue_ui_carousel_table:j}=r.useConfig(),w=e.ref(r.createUid()),I=e.ref(!1),f=e.ref(!!l.dataset);e.onMounted(()=>{r.objectIsEmpty(l.dataset)?r.error({componentName:"VueUiCarouselTable",type:"dataset"}):((!l.dataset.head||r.objectIsEmpty(l.dataset.head))&&(r.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"head"}),f.value=!1),(!l.dataset.body||r.objectIsEmpty(l.dataset.body))&&(r.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"body"}),f.value=!1))});const t=e.computed(()=>te.useNestedProp({userConfig:l.config,defaultConfig:j})),{isPrinting:z,isImaging:P,generatePdf:X,generateImage:E}=D.usePrinter({elementId:`carousel-table_${w.value}`,fileName:t.value.caption.text||"vue-ui-carousel-table"}),u=e.ref({showAnimation:t.value.animation.use}),s=e.ref(null),F=e.ref(null),m=e.ref(null),h=e.ref(null),g=e.ref(0),x=e.ref(0),$=e.ref(!1),T=e.ref(null),d=e.ref(null),b=e.ref(0);function N(){T.value&&(d.value={elements:T.value.getElementsByTagName("tr"),heights:Array.from(T.value.getElementsByTagName("tr")).map(o=>o.getBoundingClientRect().height)})}e.onMounted(N);const J=e.computed(()=>!d.value||!d.value.heights.length?0:Math.max(...d.value.heights)+g.value+x.value),K=e.computed(()=>l.dataset.body?t.value.tbody.tr.visible<=l.dataset.body.length?t.value.tbody.tr.visible:l.dataset.body.length:0),Q=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)*K.value+g.value+x.value),A=e.ref(0),y=e.ref(null),k=e.ref(0),c=e.ref(!1),O=e.ref(0);e.onMounted(()=>{m.value&&(g.value=m.value.getBoundingClientRect().height),h.value&&(x.value=h.value.getBoundingClientRect().height),u.value.showAnimation&&d.value&&R()});function W(o){I.value=o,O.value+=1}function R(){!y.value&&!c.value&&(y.value=requestAnimationFrame(V))}function Y(){if(!s.value)return!1;const{scrollTop:o,scrollHeight:a,clientHeight:n}=s.value;return o+n>=a}function V(o){if(c.value)return;k.value||(k.value=o),o-k.value>=t.value.animation.speedMs&&(A.value+=d.value.heights[b.value],(Y()||b.value>=d.value.heights.length)&&(A.value=0,b.value=0),s.value&&(s.value.scrollTo({top:A.value,behavior:"smooth"}),b.value+=1),k.value=o),y.value=requestAnimationFrame(V)}function p(){c.value=!0,cancelAnimationFrame(y.value),y.value=null}e.onBeforeUnmount(p);function C(){!c.value||!u.value.showAnimation||(c.value=!1,k.value=0,R())}function Z(){t.value.animation.pauseOnHover&&p()}const S=e.ref(null);function _(){p(),clearTimeout(S.value)}function H(){clearTimeout(S.value),S.value=setTimeout(C,1e3)}e.watch(()=>t.value.animation.use,o=>{o?(u.value.showAnimation=!0,C()):(u.value.showAnimation=!1,p())});const ee=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{const o=new ResizeObserver(a=>{a.forEach(n=>{$.value=n.contentRect.width<ee.value}),g.value=m.value?m.value.getBoundingClientRect().height:0,x.value=h.value?h.value.getBoundingClientRect().height:0,b.value=0,N()});s.value&&o.observe(s.value)});function M(){X()}function L(){u.value.showAnimation=!u.value.showAnimation,u.value.showAnimation?C():p()}function U(){e.nextTick(()=>{const o=l.dataset.head.map((i,B)=>[[l.dataset.body[B]]]),a=[[t.value.caption.text],[l.dataset.head.map(i=>[i])]].concat(o),n=r.createCsvContent(a);r.downloadCsv({csvContent:n,title:t.value.caption.text||"vue-ui-carousel-table"})})}return G({pauseAnimation:p,resumeAnimation:C,toggleAnimation:L,generateCsv:U,generatePdf:M,generateImage:E}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{style:{position:"relative",overflow:"visible"},ref_key:"chartContainer",ref:F},[e.createElementVNode("div",{ref_key:"tableContainer",ref:s,id:`carousel-table_${w.value}`,style:e.normalizeStyle({height:e.unref(z)||e.unref(P)?"auto":`${Math.max(Q.value,J.value)}px`,containerType:"inline-size",position:"relative",overflow:"auto",fontFamily:t.value.fontFamily}),class:e.normalizeClass({"vue-ui-responsive":$.value,"is-playing":!c.value}),onMouseenter:a[0]||(a[0]=n=>Z()),onMouseleave:a[1]||(a[1]=n=>C()),onTouchstart:a[2]||(a[2]=n=>_()),onTouchend:a[3]||(a[3]=n=>H()),onTouchcancel:a[4]||(a[4]=n=>H())},[f.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"})},[e.createElementVNode("caption",{ref_key:"caption",ref:m,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:$.value?t.value.thead.tr.style.boxShadow:"none",minHeight:"36px"})},[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:`${g.value}px`,zIndex:1})},[e.createElementVNode("tr",{ref_key:"tableRow",ref:h,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:$.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(v.dataset.head,(n,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?"":n)+" ",1),e.renderSlot(o.$slots,"th",e.normalizeProps(e.guardReactiveProps({th:n,colIndex:i})),void 0,!0)],4))),128))],12,le)],4),v.dataset.body&&v.dataset.head?(e.openBlock(),e.createElementBlock("tbody",{key:0,ref_key:"tbody",ref:T},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.dataset.body,(n,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(n,(B,q)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":v.dataset.head[q]||"",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:t.value.tbody.tr.td.style.backgroundColor+e.unref(r.opacity)[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?"":B)+" ",1),e.renderSlot(o.$slots,"td",e.normalizeProps(e.guardReactiveProps({td:B,rowIndex:i,colIndex:q})),void 0,!0)],12,re))),256))],4))),256))],512)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],46,ne),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe.default,{key:0,config:{type:"table"}})),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(D.UserOptions,{ref:"details",key:`user_option_${O.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isPrinting:e.unref(z),isImaging:e.unref(P),uid:w.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:!u.value.showAnimation,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:I.value,chartElement:F.value,titles:{...t.value.userOptions.buttonTitles},zIndex:3,noOffset:"",onGeneratePdf:M,onGenerateCsv:U,onGenerateImage:e.unref(E),onToggleAnimation:L,onToggleFullscreen:W},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionAnimation?{name:"optionAnimation",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionAnimation",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasAnimation","isAnimation","hasFullscreen","isFullscreen","chartElement","titles","onGenerateImage"])):e.createCommentVNode("",!0)],512))}},ue=ae._export_sfc(ie,[["__scopeId","data-v-c06beec9"]]);exports.default=ue;
@@ -1,10 +1,10 @@
1
1
  import { useCssVars as Pe, computed as $, ref as z, onMounted as Ve, openBlock as a, createElementBlock as o, normalizeClass as m, normalizeStyle as h, createBlock as Q, unref as y, createSlots as Re, withCtx as E, renderSlot as X, normalizeProps as Be, guardReactiveProps as Me, createCommentVNode as b, toDisplayString as n, createElementVNode as s, Fragment as p, renderList as _, createTextVNode as Y, withKeys as je, createVNode as Xe, nextTick as ve } from "vue";
2
- import { u as Oe, c as Ge, t as Ee, a as Ae, p as I, b as Ue, g as Z, e as H, d as ee, o as De, X as Ye, s as ye, r as F, C as he, m as fe, i as qe, j as L, k as q, n as He, q as We } from "./index-ByO3Ywek.js";
3
- import { u as Ke, U as Je } from "./usePrinter-Dda5FBG3.js";
4
- import Qe from "./vue-ui-skeleton-BxRSQeuo.js";
5
- import Ze from "./BaseIcon-DB1g9sdS.js";
6
- import et from "./vue-ui-accordion-CbKHVPHh.js";
7
- import { u as be } from "./useNestedProp-Da77DnaA.js";
2
+ import { u as Oe, c as Ge, t as Ee, a as Ae, p as I, b as Ue, g as Z, e as H, d as ee, o as De, X as Ye, s as ye, r as F, C as he, m as fe, i as qe, j as L, k as q, n as He, q as We } from "./index-8jKJqifI.js";
3
+ import { u as Ke, U as Je } from "./usePrinter-BZ_nWqN_.js";
4
+ import Qe from "./vue-ui-skeleton-CxbgzdoX.js";
5
+ import Ze from "./BaseIcon-Di0MGg_5.js";
6
+ import et from "./vue-ui-accordion-BsXo1_Ap.js";
7
+ import { u as be } from "./useNestedProp-R6UMUTVL.js";
8
8
  import { _ as tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  const lt = ["id"], at = ["xmlns", "viewBox"], ot = { key: 0 }, st = ["fill", "font-weight", "font-size", "x", "y"], ut = ["fill", "font-weight", "font-size", "x", "y"], nt = ["id"], rt = ["stop-color"], it = ["stop-color"], ct = ["id"], dt = ["stop-color"], vt = ["stop-color"], yt = ["id"], ht = ["stop-color"], ft = ["stop-color"], bt = ["stop-color"], pt = ["id"], _t = ["stop-color"], gt = ["stop-color"], xt = ["stop-color"], mt = ["id"], kt = ["stop-color"], wt = ["stop-color"], $t = ["stop-color"], Ct = { key: 1 }, zt = ["x", "y", "font-size", "font-weight", "fill"], Tt = ["x", "y", "font-size", "font-weight", "fill"], Ft = ["d", "stroke"], Nt = ["cx", "cy", "r", "fill"], St = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick"], It = { key: 2 }, Lt = ["x", "y", "font-size", "fill", "onClick"], Pt = { key: 0 }, Vt = ["x", "y", "fill", "font-size", "font-weight"], Rt = ["x", "y", "height", "width", "fill", "rx", "onClick"], Bt = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width", "onClick"], Mt = { key: 3 }, jt = ["x", "y", "fill", "font-size", "onClick"], Xt = ["d", "stroke"], Ot = ["cx", "cy", "fill", "onClick"], Gt = ["fill", "cx", "cy", "r", "onClick"], Et = { key: 4 }, At = ["x", "y", "font-size", "font-weight", "fill"], Ut = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Dt = ["y", "height", "width"], Yt = { style: { width: "100%", height: "100%", display: "flex", "align-items": "center", "justify-content": "center", "flex-direction": "column" } }, qt = { style: { display: "flex", "align-items": "center", "justify-content": "center", gap: "12px", "flex-wrap": "wrap", "flex-direction": "row" } }, Ht = {
10
10
  viewBox: "0 0 20 20",
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BDKEFvEF.cjs"),U=require("./usePrinter-DedM_6px.cjs"),ce=require("./vue-ui-skeleton-rY_nZhMQ.cjs"),ie=require("./BaseIcon-5MAyZTOz.cjs"),de=require("./vue-ui-accordion-BytUYLYl.cjs"),q=require("./useNestedProp-Dikfncsl.cjs"),ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],he=["xmlns","viewBox"],pe={key:0},fe=["fill","font-weight","font-size","x","y"],me=["fill","font-weight","font-size","x","y"],ge=["id"],be=["stop-color"],ke=["stop-color"],xe=["id"],_e=["stop-color"],Be=["stop-color"],Ee=["id"],Se=["stop-color"],Ne=["stop-color"],ze=["stop-color"],Ce=["id"],we=["stop-color"],Ve=["stop-color"],$e=["stop-color"],Te=["id"],Fe=["stop-color"],De=["stop-color"],Le=["stop-color"],Me={key:1},Ie=["x","y","font-size","font-weight","fill"],Pe=["x","y","font-size","font-weight","fill"],Oe=["d","stroke"],Re=["cx","cy","r","fill"],Xe=["cx","cy","r","fill","stroke","stroke-width","onClick"],je={key:2},Ae=["x","y","font-size","fill","onClick"],Ge={key:0},Ue=["x","y","fill","font-size","font-weight"],qe=["x","y","height","width","fill","rx","onClick"],Ye=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],He={key:3},We=["x","y","fill","font-size","onClick"],Ke=["d","stroke"],Je=["cx","cy","fill","onClick"],Qe=["fill","cx","cy","r","onClick"],Ze={key:4},et=["x","y","font-size","font-weight","fill"],tt=["x1","x2","y1","y2","stroke","stroke-width"],lt=["y","height","width"],at={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},ot={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},nt={viewBox:"0 0 20 20",height:"16",width:"16"},rt=["fill"],st={key:6},ut=["y","height","width"],ct={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},it={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},dt={viewBox:"0 0 20 20",height:"16",width:"16"},yt=["fill"],vt=["d","stroke"],ht=["cx","cy","fill"],pt=["cx","cy","fill"],ft=["d","stroke"],mt=["cx","cy","fill"],gt=["cx","cy","fill"],bt=["x","y","fill","font-size","font-weight"],kt=["x","y","fill","font-size","font-weight"],xt=["x","text-anchor","y","fill","font-size"],_t=["x","text-anchor","y","fill","font-size"],Bt=["x","text-anchor","y","fill","font-size"],Et=["x","text-anchor","y","fill","font-size"],St=["x","text-anchor","y","fill","font-size"],Nt=["x","y","font-size","fill"],zt=["x","y","font-size","fill"],Ct=["x","y","font-size","fill"],wt={style:{"padding-top":"36px",position:"relative"}},Vt={class:"vue-ui-data-table"},$t={key:0},Tt=["data-cell"],Ft={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Dt={key:0},Lt={key:1},Mt=["data-cell"],It={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Pt={key:0},Ot={key:1},Rt=["data-cell"],Xt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},jt={key:0},At={key:1},Gt=["data-cell"],Ut={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},qt={key:0},Yt={key:1},Ht=["data-cell"],Wt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Kt={key:0},Jt={key:1},Qt=["data-cell"],Zt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},el={key:0},tl={key:1},ll=["data-cell"],al={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ol={key:0},nl={key:1},rl=["data-cell"],sl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ul=["data-cell"],cl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},il=["data-cell"],dl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},yl=["data-cell"],vl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},hl=["data-cell"],pl={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(Y,{expose:H,emit:N}){const k=Y;e.useCssVars(a=>({a08a8b28:a.tdo}));const{vue_ui_chestnut:W}=n.useConfig(),C=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(n.createUid()),D=e.ref(null),K=e.ref(null),L=e.ref(0),t=e.computed(()=>{const a=q.useNestedProp({userConfig:k.config,defaultConfig:W});return a.theme?{...q.useNestedProp({userConfig:n.themes.vue_ui_chestnut[a.theme]||k.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}),{isPrinting:J,isImaging:Q,generatePdf:M,generateImage:I}=U.usePrinter({elementId:`vue-ui-chestnut_${h.value}`,fileName:t.value.style.chart.layout.title.text||"vue-ui-chestnut"}),$=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),w=e.ref({showTable:t.value.table.show}),P=e.ref(null),O=e.ref(!1),Z=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})),x=e.computed(()=>C.value?k.dataset.flatMap(a=>a.branches.map(s=>s.value)).reduce((a,s)=>a+s):0),m=e.computed(()=>(k.dataset.forEach((a,s)=>{n.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","branches"]}).forEach(l=>{n.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:l,index:s})}),a.branches&&a.branches.forEach((l,o)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(d=>{n.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:d,index:`${s} - ${o}`})}),l.breakdown&&l.breakdown.forEach((d,i)=>{n.getMissingDatasetAttributes({datasetObject:d,requiredAttributes:["name","value"]}).forEach(y=>{n.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:y,index:`${s} - ${o} - ${i}`})})})})}),k.dataset.map((a,s)=>{const l=a.branches.map(o=>o.value).reduce((o,d)=>o+d);return{...a,color:n.convertColorToHex(a.color)||$.value[s]||n.palette[s]||n.palette[s%n.palette.length],id:a.id||`root_${s}_${h.value}`,type:"root",total:l,rootIndex:s,branches:a.branches.map((o,d)=>({...o,rootName:a.name,rootIndex:s,color:n.convertColorToHex(a.color)||$.value[s]||n.palette[s]||n.palette[s%n.palette.length],value:o.value>=0?o.value:0,id:o.id||`branch_${s}_${d}_${h.value}`,proportionToRoot:o.value/l,type:"branch",breakdown:o.breakdown.map((i,y)=>({table:{rootName:a.name,rootValue:l,rootToTotal:l/x.value,branchName:o.name,branchValue:o.value,branchToTotal:o.value/x.value,branchToRoot:o.value/l,nutName:i.name,nutValue:i.value,nutToTotal:i.value/x.value,nutToRoot:i.value/l,nutToBranch:i.value/o.value},...i,type:"nut",branchName:o.name,rootName:a.name,branchTotal:o.value>=0?o.value:0,proportionToBranch:i.value/o.value,proportionToRoot:i.value/l,proportionToTree:i.value/x.value,rootIndex:s,id:i.id||`nut_${s}_${d}_${y}_${h.value}`,color:n.convertColorToHex(i.color)||$.value[y]||n.palette[y]||n.palette[y%n.palette.length],value:i.value>=0?i.value:0}))}))}})));function ee(){return m.value}const te=e.computed(()=>m.value.flatMap(a=>a.branches).length),le=e.computed(()=>Math.max(...m.value.map(a=>a.branches.map(s=>s.value).reduce((s,l)=>s+l,0)))),ae=e.computed(()=>Math.max(...m.value.flatMap(a=>a.branches.map(s=>s.value)))),R=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,o=a.total/le.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:o<r.value.branchSize/2?r.value.branchSize/2:o}})),oe=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),ne=e.computed(()=>B.value.flatMap(a=>a.branches)),_=e.computed(()=>ne.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:R.value,x2:384*a.value/ae.value*oe.value+R.value})));function T(a){const s=B.value.find(l=>l.rootIndex===a.rootIndex);return{x:s.x,y:s.y,r:s.r}}const c=e.ref(null),E=e.ref(null),v=e.ref(null),g=e.ref(null);function p(){c.value=null,v.value=null,g.value=null}function b(a){return g.value?g.value===null?!0:a.type==="root"?a.id===g.value.id:a.rootIndex===g.value.rootIndex:c.value===null&&v.value===null?!0:a.type==="nut"?c.value.id===a.id:a.type==="branch"?v.value.id===a.id:a.type==="root"?v.value&&v.value.rootIndex===a.rootIndex||c.value&&c.value.rootIndex===a.rootIndex:!1}function X(a){p(),e.nextTick(()=>{c.value=a,v.value=a,E.value=n.makeDonut({series:a.breakdown,base:1},a.x2+24+t.value.style.chart.layout.nuts.offsetX,a.y1+r.value.branchSize/2,80,80),N("selectNut",a.breakdown)})}function S(){c.value=null,E.value=null,N("selectNut",null)}function F(a){v.value&&v.value.id===a.id?(v.value=null,p(),N("selectBranch",null)):(p(),v.value=a,N("selectBranch",a))}function j(a){g.value&&g.value.id===a.id?(p(),N("selectRoot",null)):(p(),g.value=a,N("selectRoot",a))}function re(){return f.value.bottom-(c.value.y1+180)<0?0:f.value.bottom}function z(a){return a.proportion*100>t.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}function se(){new ResizeObserver(s=>{s.forEach(l=>{O.value=l.contentRect.width<Z.value})}).observe(P.value)}e.onMounted(()=>{n.objectIsEmpty(k.dataset)&&n.error({componentName:"VueUiChestnut",type:"dataset"});const a=te.value*(r.value.branchSize+r.value.gap)+r.value.padding.top+r.value.padding.bottom;r.value.height=a,se()});const u=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,o)=>l.branches.flatMap((d,i)=>d.breakdown.flatMap((y,gl)=>y.table)));return{head:a,body:s}});function A(){e.nextTick(()=>{const a=[[t.value.style.chart.layout.title.text],[t.value.style.chart.layout.title.subtitle.text],[""],["Grand total",x.value],[""]],s=u.value.head,l=u.value.body.map((i,y)=>[u.value.body[y-1]&&u.value.body[y-1].rootName===i.rootName?"":i.rootName,u.value.body[y-1]&&u.value.body[y-1].rootName===i.rootName?"":i.rootValue,u.value.body[y-1]&&u.value.body[y-1].rootName===i.rootName?"":i.rootToTotal,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchName,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchValue,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchToRoot,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchToTotal,i.nutName,i.nutValue,i.nutToBranch,i.nutToRoot,i.nutToTotal]),o=a.concat([s]).concat(l),d=n.createCsvContent(o);n.downloadCsv({csvContent:d,title:t.value.style.chart.layout.title.text||"vue-ui-chestnut"})})}const V=e.ref(!1);function ue(a){V.value=a,L.value+=1}function G(){w.value.showTable=!w.value.showTable}return H({getData:ee,generatePdf:M,generateCsv:A,generateImage:I,toggleTable:G}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-chestnut ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"chestnutChart",ref:D,id:`vue-ui-chestnut_${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;padding-top:36px;background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.show&&C.value?(e.openBlock(),e.createBlock(U.UserOptions,{ref_key:"details",ref:K,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(Q),isPrinting:e.unref(J),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:D.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(M),onGenerateCsv:A,onGenerateImage:e.unref(I),onToggleTable:G},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),r.value.height>0&&C.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("g",pe,[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,fe)):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,me)):e.createCommentVNode("",!0)])),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,o)=>(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(n.shiftHue)(l.color,.05)}${e.unref(n.opacity)[100-t.value.style.chart.layout.roots.gradientIntensity]}`},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,ke)],8,ge))),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,_e),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(n.shiftHue)(l.color,.02)}${e.unref(n.opacity)[100-t.value.style.chart.layout.branches.gradientIntensity]}`},null,8,Be)],8,xe))),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":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,Se),e.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${e.unref(n.opacity)[t.value.style.chart.layout.nuts.selected.gradientIntensity]}`},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,ze)],8,Ee),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,we),e.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${e.unref(n.opacity)[t.value.style.chart.layout.nuts.gradientIntensity]}`},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,$e)],8,Ce),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":`${t.value.style.chart.backgroundColor}${e.unref(n.opacity)[100]}`},null,8,Fe),e.createElementVNode("stop",{offset:"80%","stop-color":`${t.value.style.chart.backgroundColor}${e.unref(n.opacity)[60]}`},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.chart.backgroundColor}${e.unref(n.opacity)[0]}`},null,8,Le)],8,Te)]),t.value.style.chart.layout.grandTotal.show?(e.openBlock(),e.createElementBlock("g",Me,[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,Ie),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(t.value.style.chart.layout.grandTotal.prefix)+" "+e.toDisplayString(x.value.toFixed(t.value.style.chart.layout.grandTotal.roundingValue))+" "+e.toDisplayString(t.value.style.chart.layout.grandTotal.suffix),9,Pe)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,l=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.branchSize,(o,d)=>(e.openBlock(),e.createElementBlock("path",{d:`M
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index--K6Ja9Gj.cjs"),U=require("./usePrinter-CysnJve5.cjs"),ce=require("./vue-ui-skeleton-Bf_PLiHN.cjs"),ie=require("./BaseIcon-Dmx2OFvz.cjs"),de=require("./vue-ui-accordion-B0UeLf1b.cjs"),q=require("./useNestedProp-Bs4c78Cx.cjs"),ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],he=["xmlns","viewBox"],pe={key:0},fe=["fill","font-weight","font-size","x","y"],me=["fill","font-weight","font-size","x","y"],ge=["id"],be=["stop-color"],ke=["stop-color"],xe=["id"],_e=["stop-color"],Be=["stop-color"],Ee=["id"],Se=["stop-color"],Ne=["stop-color"],ze=["stop-color"],Ce=["id"],we=["stop-color"],Ve=["stop-color"],$e=["stop-color"],Te=["id"],Fe=["stop-color"],De=["stop-color"],Le=["stop-color"],Me={key:1},Ie=["x","y","font-size","font-weight","fill"],Pe=["x","y","font-size","font-weight","fill"],Oe=["d","stroke"],Re=["cx","cy","r","fill"],Xe=["cx","cy","r","fill","stroke","stroke-width","onClick"],je={key:2},Ae=["x","y","font-size","fill","onClick"],Ge={key:0},Ue=["x","y","fill","font-size","font-weight"],qe=["x","y","height","width","fill","rx","onClick"],Ye=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],He={key:3},We=["x","y","fill","font-size","onClick"],Ke=["d","stroke"],Je=["cx","cy","fill","onClick"],Qe=["fill","cx","cy","r","onClick"],Ze={key:4},et=["x","y","font-size","font-weight","fill"],tt=["x1","x2","y1","y2","stroke","stroke-width"],lt=["y","height","width"],at={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},ot={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},nt={viewBox:"0 0 20 20",height:"16",width:"16"},rt=["fill"],st={key:6},ut=["y","height","width"],ct={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},it={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},dt={viewBox:"0 0 20 20",height:"16",width:"16"},yt=["fill"],vt=["d","stroke"],ht=["cx","cy","fill"],pt=["cx","cy","fill"],ft=["d","stroke"],mt=["cx","cy","fill"],gt=["cx","cy","fill"],bt=["x","y","fill","font-size","font-weight"],kt=["x","y","fill","font-size","font-weight"],xt=["x","text-anchor","y","fill","font-size"],_t=["x","text-anchor","y","fill","font-size"],Bt=["x","text-anchor","y","fill","font-size"],Et=["x","text-anchor","y","fill","font-size"],St=["x","text-anchor","y","fill","font-size"],Nt=["x","y","font-size","fill"],zt=["x","y","font-size","fill"],Ct=["x","y","font-size","fill"],wt={style:{"padding-top":"36px",position:"relative"}},Vt={class:"vue-ui-data-table"},$t={key:0},Tt=["data-cell"],Ft={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Dt={key:0},Lt={key:1},Mt=["data-cell"],It={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Pt={key:0},Ot={key:1},Rt=["data-cell"],Xt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},jt={key:0},At={key:1},Gt=["data-cell"],Ut={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},qt={key:0},Yt={key:1},Ht=["data-cell"],Wt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Kt={key:0},Jt={key:1},Qt=["data-cell"],Zt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},el={key:0},tl={key:1},ll=["data-cell"],al={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ol={key:0},nl={key:1},rl=["data-cell"],sl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ul=["data-cell"],cl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},il=["data-cell"],dl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},yl=["data-cell"],vl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},hl=["data-cell"],pl={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(Y,{expose:H,emit:N}){const k=Y;e.useCssVars(a=>({a08a8b28:a.tdo}));const{vue_ui_chestnut:W}=n.useConfig(),C=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(n.createUid()),D=e.ref(null),K=e.ref(null),L=e.ref(0),t=e.computed(()=>{const a=q.useNestedProp({userConfig:k.config,defaultConfig:W});return a.theme?{...q.useNestedProp({userConfig:n.themes.vue_ui_chestnut[a.theme]||k.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}),{isPrinting:J,isImaging:Q,generatePdf:M,generateImage:I}=U.usePrinter({elementId:`vue-ui-chestnut_${h.value}`,fileName:t.value.style.chart.layout.title.text||"vue-ui-chestnut"}),$=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),w=e.ref({showTable:t.value.table.show}),P=e.ref(null),O=e.ref(!1),Z=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})),x=e.computed(()=>C.value?k.dataset.flatMap(a=>a.branches.map(s=>s.value)).reduce((a,s)=>a+s):0),m=e.computed(()=>(k.dataset.forEach((a,s)=>{n.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","branches"]}).forEach(l=>{n.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:l,index:s})}),a.branches&&a.branches.forEach((l,o)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(d=>{n.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:d,index:`${s} - ${o}`})}),l.breakdown&&l.breakdown.forEach((d,i)=>{n.getMissingDatasetAttributes({datasetObject:d,requiredAttributes:["name","value"]}).forEach(y=>{n.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:y,index:`${s} - ${o} - ${i}`})})})})}),k.dataset.map((a,s)=>{const l=a.branches.map(o=>o.value).reduce((o,d)=>o+d);return{...a,color:n.convertColorToHex(a.color)||$.value[s]||n.palette[s]||n.palette[s%n.palette.length],id:a.id||`root_${s}_${h.value}`,type:"root",total:l,rootIndex:s,branches:a.branches.map((o,d)=>({...o,rootName:a.name,rootIndex:s,color:n.convertColorToHex(a.color)||$.value[s]||n.palette[s]||n.palette[s%n.palette.length],value:o.value>=0?o.value:0,id:o.id||`branch_${s}_${d}_${h.value}`,proportionToRoot:o.value/l,type:"branch",breakdown:o.breakdown.map((i,y)=>({table:{rootName:a.name,rootValue:l,rootToTotal:l/x.value,branchName:o.name,branchValue:o.value,branchToTotal:o.value/x.value,branchToRoot:o.value/l,nutName:i.name,nutValue:i.value,nutToTotal:i.value/x.value,nutToRoot:i.value/l,nutToBranch:i.value/o.value},...i,type:"nut",branchName:o.name,rootName:a.name,branchTotal:o.value>=0?o.value:0,proportionToBranch:i.value/o.value,proportionToRoot:i.value/l,proportionToTree:i.value/x.value,rootIndex:s,id:i.id||`nut_${s}_${d}_${y}_${h.value}`,color:n.convertColorToHex(i.color)||$.value[y]||n.palette[y]||n.palette[y%n.palette.length],value:i.value>=0?i.value:0}))}))}})));function ee(){return m.value}const te=e.computed(()=>m.value.flatMap(a=>a.branches).length),le=e.computed(()=>Math.max(...m.value.map(a=>a.branches.map(s=>s.value).reduce((s,l)=>s+l,0)))),ae=e.computed(()=>Math.max(...m.value.flatMap(a=>a.branches.map(s=>s.value)))),R=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,o=a.total/le.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:o<r.value.branchSize/2?r.value.branchSize/2:o}})),oe=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),ne=e.computed(()=>B.value.flatMap(a=>a.branches)),_=e.computed(()=>ne.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:R.value,x2:384*a.value/ae.value*oe.value+R.value})));function T(a){const s=B.value.find(l=>l.rootIndex===a.rootIndex);return{x:s.x,y:s.y,r:s.r}}const c=e.ref(null),E=e.ref(null),v=e.ref(null),g=e.ref(null);function p(){c.value=null,v.value=null,g.value=null}function b(a){return g.value?g.value===null?!0:a.type==="root"?a.id===g.value.id:a.rootIndex===g.value.rootIndex:c.value===null&&v.value===null?!0:a.type==="nut"?c.value.id===a.id:a.type==="branch"?v.value.id===a.id:a.type==="root"?v.value&&v.value.rootIndex===a.rootIndex||c.value&&c.value.rootIndex===a.rootIndex:!1}function X(a){p(),e.nextTick(()=>{c.value=a,v.value=a,E.value=n.makeDonut({series:a.breakdown,base:1},a.x2+24+t.value.style.chart.layout.nuts.offsetX,a.y1+r.value.branchSize/2,80,80),N("selectNut",a.breakdown)})}function S(){c.value=null,E.value=null,N("selectNut",null)}function F(a){v.value&&v.value.id===a.id?(v.value=null,p(),N("selectBranch",null)):(p(),v.value=a,N("selectBranch",a))}function j(a){g.value&&g.value.id===a.id?(p(),N("selectRoot",null)):(p(),g.value=a,N("selectRoot",a))}function re(){return f.value.bottom-(c.value.y1+180)<0?0:f.value.bottom}function z(a){return a.proportion*100>t.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}function se(){new ResizeObserver(s=>{s.forEach(l=>{O.value=l.contentRect.width<Z.value})}).observe(P.value)}e.onMounted(()=>{n.objectIsEmpty(k.dataset)&&n.error({componentName:"VueUiChestnut",type:"dataset"});const a=te.value*(r.value.branchSize+r.value.gap)+r.value.padding.top+r.value.padding.bottom;r.value.height=a,se()});const u=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,o)=>l.branches.flatMap((d,i)=>d.breakdown.flatMap((y,gl)=>y.table)));return{head:a,body:s}});function A(){e.nextTick(()=>{const a=[[t.value.style.chart.layout.title.text],[t.value.style.chart.layout.title.subtitle.text],[""],["Grand total",x.value],[""]],s=u.value.head,l=u.value.body.map((i,y)=>[u.value.body[y-1]&&u.value.body[y-1].rootName===i.rootName?"":i.rootName,u.value.body[y-1]&&u.value.body[y-1].rootName===i.rootName?"":i.rootValue,u.value.body[y-1]&&u.value.body[y-1].rootName===i.rootName?"":i.rootToTotal,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchName,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchValue,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchToRoot,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchToTotal,i.nutName,i.nutValue,i.nutToBranch,i.nutToRoot,i.nutToTotal]),o=a.concat([s]).concat(l),d=n.createCsvContent(o);n.downloadCsv({csvContent:d,title:t.value.style.chart.layout.title.text||"vue-ui-chestnut"})})}const V=e.ref(!1);function ue(a){V.value=a,L.value+=1}function G(){w.value.showTable=!w.value.showTable}return H({getData:ee,generatePdf:M,generateCsv:A,generateImage:I,toggleTable:G}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-chestnut ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"chestnutChart",ref:D,id:`vue-ui-chestnut_${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;padding-top:36px;background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.show&&C.value?(e.openBlock(),e.createBlock(U.UserOptions,{ref_key:"details",ref:K,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(Q),isPrinting:e.unref(J),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:D.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(M),onGenerateCsv:A,onGenerateImage:e.unref(I),onToggleTable:G},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),r.value.height>0&&C.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("g",pe,[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,fe)):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,me)):e.createCommentVNode("",!0)])),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,o)=>(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(n.shiftHue)(l.color,.05)}${e.unref(n.opacity)[100-t.value.style.chart.layout.roots.gradientIntensity]}`},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,ke)],8,ge))),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,_e),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(n.shiftHue)(l.color,.02)}${e.unref(n.opacity)[100-t.value.style.chart.layout.branches.gradientIntensity]}`},null,8,Be)],8,xe))),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":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,Se),e.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${e.unref(n.opacity)[t.value.style.chart.layout.nuts.selected.gradientIntensity]}`},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,ze)],8,Ee),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,we),e.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${e.unref(n.opacity)[t.value.style.chart.layout.nuts.gradientIntensity]}`},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,$e)],8,Ce),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":`${t.value.style.chart.backgroundColor}${e.unref(n.opacity)[100]}`},null,8,Fe),e.createElementVNode("stop",{offset:"80%","stop-color":`${t.value.style.chart.backgroundColor}${e.unref(n.opacity)[60]}`},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.chart.backgroundColor}${e.unref(n.opacity)[0]}`},null,8,Le)],8,Te)]),t.value.style.chart.layout.grandTotal.show?(e.openBlock(),e.createElementBlock("g",Me,[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,Ie),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(t.value.style.chart.layout.grandTotal.prefix)+" "+e.toDisplayString(x.value.toFixed(t.value.style.chart.layout.grandTotal.roundingValue))+" "+e.toDisplayString(t.value.style.chart.layout.grandTotal.suffix),9,Pe)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,l=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.branchSize,(o,d)=>(e.openBlock(),e.createElementBlock("path",{d:`M
2
2
  ${l.x1},${l.y1+d}
3
3
  C${l.x1-20},${l.y1+d}
4
4
  ${l.x1-80},${l.y1+d}
@@ -1,6 +1,6 @@
1
1
  import { ref as n, computed as m, onMounted as R, onBeforeUnmount as b, openBlock as o, createElementBlock as l, unref as C, normalizeStyle as E, createElementVNode as r, createCommentVNode as i, normalizeClass as p, toDisplayString as x, nextTick as F, pushScopeId as I, popScopeId as L } from "vue";
2
- import { u as z } from "./useNestedProp-Da77DnaA.js";
3
- import { u as O, c as B, X as N, r as T } from "./index-ByO3Ywek.js";
2
+ import { u as z } from "./useNestedProp-R6UMUTVL.js";
3
+ import { u as O, c as B, X as N, r as T } from "./index-8jKJqifI.js";
4
4
  import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const g = (a) => (I("data-v-fe8d65eb"), a = a(), L(), a), $ = ["xmlns", "height", "width"], W = {
6
6
  id: "follower",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),_=require("./useNestedProp-Dikfncsl.cjs"),i=require("./index-BDKEFvEF.cjs"),C=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),m=l=>(t.pushScopeId("data-v-fe8d65eb"),l=l(),t.popScopeId(),l),p=["xmlns","height","width"],x={id:"follower",fy:"30%",fx:"30%"},E=["stop-color","stop-opacity"],N=m(()=>t.createElementVNode("stop",{offset:"95%","stop-color":"transparent"},null,-1)),g=["r","fill","stroke","stroke-width","stroke-dasharray"],V=["r","fill"],S={key:2,class:"wave"},w=["id"],b=["id"],B=m(()=>t.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),R=["filter","stroke"],F={key:3,class:"crosshair"},z=["x1","stroke","stroke-width","stroke-dasharray"],I=["x1","stroke","stroke-width","stroke-dasharray"],L=["y1","stroke","stroke-width","stroke-dasharray"],O=["y1","stroke","stroke-width","stroke-dasharray"],T=["cy","r","fill"],D=["cy","r","fill"],$=["cx","r","fill"],W=["cx","r","fill"],G={key:5,class:"coordinates"},P=["x","y","font-size","fill"],q=["transform"],A=["font-size","fill"],M={__name:"vue-ui-cursor",props:{config:{type:Object,default:{}}},setup(l){const k=l,{vue_ui_cursor:y}=i.useConfig(),c=t.ref(i.createUid()),e=t.computed(()=>_.useNestedProp({userConfig:k.config,defaultConfig:y})),o=t.ref({x:-100,y:-100});function u({clientX:r,clientY:h,...j}){o.value.x=r-e.value.centerCircleRadius,o.value.y=h-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),n=t.ref(null);function f(){s.value=!1,n.value&&clearTimeout(n.value),t.nextTick(()=>{s.value=!0,n.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",f)}),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",f)}),t.computed(()=>e.value.centerCircleRadius/2.5),(r,h)=>v.value?(t.openBlock(),t.createElementBlock("svg",{key:0,"data-html2canvas-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",x,[t.createElementVNode("stop",{offset:"10%","stop-color":e.value.bubbleEffectColor,"stop-opacity":e.value.bubbleEffectOpacity},null,8,E),N])]),e.value.showCenterCircle?(t.openBlock(),t.createElementBlock("circle",{key:0,cx:50,cy:50,r:e.value.centerCircleRadius,fill:e.value.centerCircleColor+t.unref(i.opacity)[e.value.centerCircleOpacity*100],stroke:e.value.centerCircleStroke,"stroke-width":e.value.centerCircleStrokeWidth,"stroke-dasharray":e.value.centerCircleDasharray},null,8,g)):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,V)):t.createCommentVNode("",!0),e.value.useWaveOnClick?(t.openBlock(),t.createElementBlock("g",S,[t.createElementVNode("defs",null,[t.createElementVNode("filter",{id:`blur_${c.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[t.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:4,id:`blur_std_${c.value}`},null,8,b),B],8,w)]),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_${c.value})`,stroke:e.value.centerCircleStroke,fill:"none","stroke-width":"3"},null,10,R)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.value.showCrosshair?(t.openBlock(),t.createElementBlock("g",F,[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,z),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,I),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,L),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,O)])):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,T),t.createElementVNode("circle",{cx:50,cy:-e.value.centerCircleRadius+50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,D),t.createElementVNode("circle",{cx:-e.value.centerCircleRadius+50,cy:50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,$),t.createElementVNode("circle",{cx:e.value.centerCircleRadius+50,cy:50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,W)],2)):t.createCommentVNode("",!0),e.value.showCoordinates?(t.openBlock(),t.createElementBlock("g",G,[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,P),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,A)],8,q)])):t.createCommentVNode("",!0)],12,p)):t.createCommentVNode("",!0)}},U=C._export_sfc(M,[["__scopeId","data-v-fe8d65eb"]]);exports.default=U;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),_=require("./useNestedProp-Bs4c78Cx.cjs"),i=require("./index--K6Ja9Gj.cjs"),C=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),m=l=>(t.pushScopeId("data-v-fe8d65eb"),l=l(),t.popScopeId(),l),p=["xmlns","height","width"],x={id:"follower",fy:"30%",fx:"30%"},E=["stop-color","stop-opacity"],N=m(()=>t.createElementVNode("stop",{offset:"95%","stop-color":"transparent"},null,-1)),g=["r","fill","stroke","stroke-width","stroke-dasharray"],V=["r","fill"],S={key:2,class:"wave"},w=["id"],b=["id"],B=m(()=>t.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),R=["filter","stroke"],F={key:3,class:"crosshair"},z=["x1","stroke","stroke-width","stroke-dasharray"],I=["x1","stroke","stroke-width","stroke-dasharray"],L=["y1","stroke","stroke-width","stroke-dasharray"],O=["y1","stroke","stroke-width","stroke-dasharray"],T=["cy","r","fill"],D=["cy","r","fill"],$=["cx","r","fill"],W=["cx","r","fill"],G={key:5,class:"coordinates"},P=["x","y","font-size","fill"],q=["transform"],A=["font-size","fill"],M={__name:"vue-ui-cursor",props:{config:{type:Object,default:{}}},setup(l){const k=l,{vue_ui_cursor:y}=i.useConfig(),c=t.ref(i.createUid()),e=t.computed(()=>_.useNestedProp({userConfig:k.config,defaultConfig:y})),o=t.ref({x:-100,y:-100});function u({clientX:r,clientY:h,...j}){o.value.x=r-e.value.centerCircleRadius,o.value.y=h-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),n=t.ref(null);function f(){s.value=!1,n.value&&clearTimeout(n.value),t.nextTick(()=>{s.value=!0,n.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",f)}),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",f)}),t.computed(()=>e.value.centerCircleRadius/2.5),(r,h)=>v.value?(t.openBlock(),t.createElementBlock("svg",{key:0,"data-html2canvas-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",x,[t.createElementVNode("stop",{offset:"10%","stop-color":e.value.bubbleEffectColor,"stop-opacity":e.value.bubbleEffectOpacity},null,8,E),N])]),e.value.showCenterCircle?(t.openBlock(),t.createElementBlock("circle",{key:0,cx:50,cy:50,r:e.value.centerCircleRadius,fill:e.value.centerCircleColor+t.unref(i.opacity)[e.value.centerCircleOpacity*100],stroke:e.value.centerCircleStroke,"stroke-width":e.value.centerCircleStrokeWidth,"stroke-dasharray":e.value.centerCircleDasharray},null,8,g)):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,V)):t.createCommentVNode("",!0),e.value.useWaveOnClick?(t.openBlock(),t.createElementBlock("g",S,[t.createElementVNode("defs",null,[t.createElementVNode("filter",{id:`blur_${c.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[t.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:4,id:`blur_std_${c.value}`},null,8,b),B],8,w)]),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_${c.value})`,stroke:e.value.centerCircleStroke,fill:"none","stroke-width":"3"},null,10,R)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.value.showCrosshair?(t.openBlock(),t.createElementBlock("g",F,[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,z),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,I),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,L),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,O)])):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,T),t.createElementVNode("circle",{cx:50,cy:-e.value.centerCircleRadius+50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,D),t.createElementVNode("circle",{cx:-e.value.centerCircleRadius+50,cy:50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,$),t.createElementVNode("circle",{cx:e.value.centerCircleRadius+50,cy:50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,W)],2)):t.createCommentVNode("",!0),e.value.showCoordinates?(t.openBlock(),t.createElementBlock("g",G,[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,P),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,A)],8,q)])):t.createCommentVNode("",!0)],12,p)):t.createCommentVNode("",!0)}},U=C._export_sfc(M,[["__scopeId","data-v-fe8d65eb"]]);exports.default=U;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),R=require("./pdf-Cz3729tZ.cjs"),q=require("./useNestedProp-Dikfncsl.cjs"),O=require("./index-BDKEFvEF.cjs"),j=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=b=>(o.pushScopeId("data-v-57895b3a"),b=b(),o.popScopeId(),b),G={key:0,"data-html2canvas-ignore":"",style:{width:"100%",display:"flex","justify-content":"end"}},U=["disabled"],J=["stroke"],K=o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-57895b3a></path><path d="M18 16v.01" data-v-57895b3a></path><path d="M6 16v.01" data-v-57895b3a></path><path d="M12 5v.01" data-v-57895b3a></path><path d="M12 12v.01" data-v-57895b3a></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-57895b3a></path>',6),Q=[K],Z={key:1},ee=["id"],te=A(()=>o.createElementVNode("div",{class:"vue-ui-dashboard-grid"},null,-1)),oe=["onMousedown","onTouchstart"],le=["onMousedown","onTouchstart"],ae=["onMousedown","onTouchstart"],ne=["onMousedown","onTouchstart"],ue=["onMousedown","onTouchstart"],M=20,se={__name:"vue-ui-dashboard",props:{dataset:Array,config:Object},emits:["change"],setup(b,{expose:$,emit:B}){const T=b;o.useCssVars(e=>({"417957d3":I.value,"60fae9e7":D.value}));const{vue_ui_dashboard:N}=O.useConfig(),i=o.computed(()=>q.useNestedProp({userConfig:T.config,defaultConfig:N})),z=o.ref(`vue-ui-dashboard-${Math.random()}`),d=o.ref(i.value.locked);function S(){d.value=!d.value}const s=o.ref(T.dataset),h=o.ref(null),u=o.ref(null),v=o.ref({x:0,y:0}),f=o.ref({x:0,y:0}),r=o.ref(null),c=o.ref(!1),p=o.ref(null),y=o.ref(!1);function E(){y.value=!0,R.pdf({domElement:document.getElementById(`vue-ui-dashboard_${z.value}`),fileName:"vue-ui-dashboard"}).finally(()=>{y.value=!1})}function x(e){if(!d.value&&(c.value=!0,p.value=e,u.value===null)){h.value=e,v.value={x:event.clientX,y:event.clientY};const t=s.value[e],a=100-t.width,l=100-t.height;t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left>a&&(t.left=a),t.top>l&&(t.top=l),t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left+t.width>100&&(t.left=100-t.width),t.top+t.height>100&&(t.top=100-t.height)}}function m(e,t){c.value=!0,p.value=e,u.value={index:e,direction:t};const a=s.value[e];f.value={x:event.clientX,y:event.clientY,initialWidth:a.width,initialHeight:a.height}}function C(e,t,a){if(u.value.direction.includes("top")){const l=e.height-a/r.value.offsetHeight*100;l>=M&&(e.top+=a/r.value.offsetHeight*100,e.height=l)}if(u.value.direction.includes("bottom")){const l=e.height+a/r.value.offsetHeight*100;l>=M&&(e.height=l)}if(u.value.direction.includes("left")){const l=e.width-t/r.value.offsetWidth*100;l>=M&&(e.left+=t/r.value.offsetWidth*100,e.width=l)}if(u.value.direction.includes("right")){const l=e.width+t/r.value.offsetWidth*100;l>=M&&(e.width=l)}}function X(e){if(!d.value){if(c.value=!0,h.value!==null){const t=s.value[h.value],a=e.clientX-v.value.x,l=e.clientY-v.value.y,n=t.left+a/r.value.offsetWidth*100,g=t.top+l/r.value.offsetHeight*100;n>=0&&g>=0&&n+t.width<=100&&g+t.height<=100&&(t.left=n,t.top=g),v.value={x:e.clientX,y:e.clientY}}if(u.value!==null){const t=s.value[u.value.index],a=e.clientX-f.value.x,l=e.clientY-f.value.y;C(t,a,l),f.value={x:e.clientX,y:e.clientY}}}}o.watch(s,e=>{e&&!c.value&&B("change",s.value)},{deep:!0});function Y(){h.value=null,u.value=null,c.value=!1,p.value=null,s.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}function V(e){d.value||(c.value=!0,p.value=e,u.value===null&&(h.value=e,v.value={x:event.touches[0].clientX,y:event.touches[0].clientY}))}function k(e,t,a){if(c.value=!0,p.value=e,u.value===null){u.value={index:e,direction:t};const l=s.value[e];f.value={x:a.touches[0].clientX,y:a.touches[0].clientY,initialWidth:l.width,initialHeight:l.height}}}function _(e){if(c.value=!0,e.preventDefault(),u.value!==null){const t=s.value[u.value.index],a=e.touches[0].clientX-f.value.x,l=e.touches[0].clientY-f.value.y;C(t,a,l),f.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function H(e){if(!d.value&&(c.value=!0,e.preventDefault(),h.value!==null)){const t=s.value[h.value],a=e.touches[0].clientX-v.value.x,l=e.touches[0].clientY-v.value.y,n=t.left+a/r.value.offsetWidth*100,g=t.top+l/r.value.offsetHeight*100;n>=0&&g>=0&&n+t.width<=100&&g+t.height<=100&&(t.left=n,t.top=g),v.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function w(){c.value=!1,p.value=null,h.value=null,u.value=null,s.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}const I=o.computed(()=>i.value.style.item.borderColor),D=o.computed(()=>i.value.style.resizeHandles.backgroundColor),W=o.computed(()=>i.value.style.board.aspectRatio),L=o.computed(()=>i.value.style.board.backgroundColor),P=o.computed(()=>i.value.style.board.border);function F(){return s.value}return $({generatePdf:E,getItemsPositions:F,toggleLock:S}),(e,t)=>(o.openBlock(),o.createElementBlock("div",null,[i.value.allowPrint?(o.openBlock(),o.createElementBlock("div",G,[o.createElementVNode("button",{class:"vue-ui-dashboard-button",onClick:E,disabled:y.value,style:o.normalizeStyle([{"margin-top":"12px"},`color:${i.value.style.board.color}`])},[y.value?(o.openBlock(),o.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:i.value.style.board.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Q,8,J)):(o.openBlock(),o.createElementBlock("span",Z,"PDF"))],12,U)])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"vue-ui-dashboard-container",ref_key:"dashboardContainer",ref:r,id:`vue-ui-dashboard_${z.value}`,style:o.normalizeStyle(`border:${P.value}; sbackground:${L.value}; aspect-ratio:${W.value}`)},[o.createElementVNode("div",{class:"vue-ui-dashboard-grid-container",ref:"container",onMousemove:X,onMouseup:Y,onTouchmove:H,onTouchend:w,style:o.normalizeStyle(`background:${i.value.style.board.backgroundColor}`)},[te,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,(a,l)=>(o.openBlock(),o.createElementBlock("div",{key:a.id,class:o.normalizeClass({"vue-ui-dashboard-grid-item":!0,"vue-ui-dashboard-grid-item--locked":d.value}),style:o.normalizeStyle({width:`${a.width}%`,height:`${a.height}%`,left:`${a.left}%`,top:`${a.top}%`,cursor:"move",boxShadow:p.value===l?"0 6px 12px -3px rgba(0,0,0,0.3)":"",zIndex:p.value===l?"1":"0",backgroundColor:i.value.style.item.backgroundColor}),onMousedown:n=>x(l),onTouchstart:n=>V(l)},[d.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left",onMousedown:n=>m(l,"top-left"),onTouchstart:n=>k(l,"top-left",n),onTouchmove:t[0]||(t[0]=n=>_(n)),onTouchend:w},null,40,le),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right",onMousedown:n=>m(l,"top-right"),onTouchstart:n=>k(l,"top-right",n),onTouchmove:t[1]||(t[1]=n=>_(n)),onTouchend:w},null,40,ae),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left",onMousedown:n=>m(l,"bottom-left"),onTouchstart:n=>k(l,"bottom-left",n),onTouchmove:t[2]||(t[2]=n=>_(n)),onTouchend:w},null,40,ne),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right",onMousedown:n=>m(l,"bottom-right"),onTouchstart:n=>k(l,"bottom-right",n),onTouchmove:t[3]||(t[3]=n=>_(n)),onTouchend:w},null,40,ue)],64)),o.renderSlot(e.$slots,"content",{item:a,index:l,left:a.left,top:a.top,height:a.height,width:a.width},void 0,!0)],46,oe))),128))],36)],12,ee)]))}},ie=j._export_sfc(se,[["__scopeId","data-v-57895b3a"]]);exports.default=ie;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),R=require("./pdf-Cz3729tZ.cjs"),q=require("./useNestedProp-Bs4c78Cx.cjs"),O=require("./index--K6Ja9Gj.cjs"),j=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=b=>(o.pushScopeId("data-v-57895b3a"),b=b(),o.popScopeId(),b),G={key:0,"data-html2canvas-ignore":"",style:{width:"100%",display:"flex","justify-content":"end"}},U=["disabled"],J=["stroke"],K=o.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-57895b3a></path><path d="M18 16v.01" data-v-57895b3a></path><path d="M6 16v.01" data-v-57895b3a></path><path d="M12 5v.01" data-v-57895b3a></path><path d="M12 12v.01" data-v-57895b3a></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-57895b3a></path>',6),Q=[K],Z={key:1},ee=["id"],te=A(()=>o.createElementVNode("div",{class:"vue-ui-dashboard-grid"},null,-1)),oe=["onMousedown","onTouchstart"],le=["onMousedown","onTouchstart"],ae=["onMousedown","onTouchstart"],ne=["onMousedown","onTouchstart"],ue=["onMousedown","onTouchstart"],M=20,se={__name:"vue-ui-dashboard",props:{dataset:Array,config:Object},emits:["change"],setup(b,{expose:$,emit:B}){const T=b;o.useCssVars(e=>({"417957d3":I.value,"60fae9e7":D.value}));const{vue_ui_dashboard:N}=O.useConfig(),i=o.computed(()=>q.useNestedProp({userConfig:T.config,defaultConfig:N})),z=o.ref(`vue-ui-dashboard-${Math.random()}`),d=o.ref(i.value.locked);function S(){d.value=!d.value}const s=o.ref(T.dataset),h=o.ref(null),u=o.ref(null),v=o.ref({x:0,y:0}),f=o.ref({x:0,y:0}),r=o.ref(null),c=o.ref(!1),p=o.ref(null),y=o.ref(!1);function E(){y.value=!0,R.pdf({domElement:document.getElementById(`vue-ui-dashboard_${z.value}`),fileName:"vue-ui-dashboard"}).finally(()=>{y.value=!1})}function x(e){if(!d.value&&(c.value=!0,p.value=e,u.value===null)){h.value=e,v.value={x:event.clientX,y:event.clientY};const t=s.value[e],a=100-t.width,l=100-t.height;t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left>a&&(t.left=a),t.top>l&&(t.top=l),t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left+t.width>100&&(t.left=100-t.width),t.top+t.height>100&&(t.top=100-t.height)}}function m(e,t){c.value=!0,p.value=e,u.value={index:e,direction:t};const a=s.value[e];f.value={x:event.clientX,y:event.clientY,initialWidth:a.width,initialHeight:a.height}}function C(e,t,a){if(u.value.direction.includes("top")){const l=e.height-a/r.value.offsetHeight*100;l>=M&&(e.top+=a/r.value.offsetHeight*100,e.height=l)}if(u.value.direction.includes("bottom")){const l=e.height+a/r.value.offsetHeight*100;l>=M&&(e.height=l)}if(u.value.direction.includes("left")){const l=e.width-t/r.value.offsetWidth*100;l>=M&&(e.left+=t/r.value.offsetWidth*100,e.width=l)}if(u.value.direction.includes("right")){const l=e.width+t/r.value.offsetWidth*100;l>=M&&(e.width=l)}}function X(e){if(!d.value){if(c.value=!0,h.value!==null){const t=s.value[h.value],a=e.clientX-v.value.x,l=e.clientY-v.value.y,n=t.left+a/r.value.offsetWidth*100,g=t.top+l/r.value.offsetHeight*100;n>=0&&g>=0&&n+t.width<=100&&g+t.height<=100&&(t.left=n,t.top=g),v.value={x:e.clientX,y:e.clientY}}if(u.value!==null){const t=s.value[u.value.index],a=e.clientX-f.value.x,l=e.clientY-f.value.y;C(t,a,l),f.value={x:e.clientX,y:e.clientY}}}}o.watch(s,e=>{e&&!c.value&&B("change",s.value)},{deep:!0});function Y(){h.value=null,u.value=null,c.value=!1,p.value=null,s.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}function V(e){d.value||(c.value=!0,p.value=e,u.value===null&&(h.value=e,v.value={x:event.touches[0].clientX,y:event.touches[0].clientY}))}function k(e,t,a){if(c.value=!0,p.value=e,u.value===null){u.value={index:e,direction:t};const l=s.value[e];f.value={x:a.touches[0].clientX,y:a.touches[0].clientY,initialWidth:l.width,initialHeight:l.height}}}function _(e){if(c.value=!0,e.preventDefault(),u.value!==null){const t=s.value[u.value.index],a=e.touches[0].clientX-f.value.x,l=e.touches[0].clientY-f.value.y;C(t,a,l),f.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function H(e){if(!d.value&&(c.value=!0,e.preventDefault(),h.value!==null)){const t=s.value[h.value],a=e.touches[0].clientX-v.value.x,l=e.touches[0].clientY-v.value.y,n=t.left+a/r.value.offsetWidth*100,g=t.top+l/r.value.offsetHeight*100;n>=0&&g>=0&&n+t.width<=100&&g+t.height<=100&&(t.left=n,t.top=g),v.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function w(){c.value=!1,p.value=null,h.value=null,u.value=null,s.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}const I=o.computed(()=>i.value.style.item.borderColor),D=o.computed(()=>i.value.style.resizeHandles.backgroundColor),W=o.computed(()=>i.value.style.board.aspectRatio),L=o.computed(()=>i.value.style.board.backgroundColor),P=o.computed(()=>i.value.style.board.border);function F(){return s.value}return $({generatePdf:E,getItemsPositions:F,toggleLock:S}),(e,t)=>(o.openBlock(),o.createElementBlock("div",null,[i.value.allowPrint?(o.openBlock(),o.createElementBlock("div",G,[o.createElementVNode("button",{class:"vue-ui-dashboard-button",onClick:E,disabled:y.value,style:o.normalizeStyle([{"margin-top":"12px"},`color:${i.value.style.board.color}`])},[y.value?(o.openBlock(),o.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:i.value.style.board.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Q,8,J)):(o.openBlock(),o.createElementBlock("span",Z,"PDF"))],12,U)])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"vue-ui-dashboard-container",ref_key:"dashboardContainer",ref:r,id:`vue-ui-dashboard_${z.value}`,style:o.normalizeStyle(`border:${P.value}; sbackground:${L.value}; aspect-ratio:${W.value}`)},[o.createElementVNode("div",{class:"vue-ui-dashboard-grid-container",ref:"container",onMousemove:X,onMouseup:Y,onTouchmove:H,onTouchend:w,style:o.normalizeStyle(`background:${i.value.style.board.backgroundColor}`)},[te,(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,(a,l)=>(o.openBlock(),o.createElementBlock("div",{key:a.id,class:o.normalizeClass({"vue-ui-dashboard-grid-item":!0,"vue-ui-dashboard-grid-item--locked":d.value}),style:o.normalizeStyle({width:`${a.width}%`,height:`${a.height}%`,left:`${a.left}%`,top:`${a.top}%`,cursor:"move",boxShadow:p.value===l?"0 6px 12px -3px rgba(0,0,0,0.3)":"",zIndex:p.value===l?"1":"0",backgroundColor:i.value.style.item.backgroundColor}),onMousedown:n=>x(l),onTouchstart:n=>V(l)},[d.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left",onMousedown:n=>m(l,"top-left"),onTouchstart:n=>k(l,"top-left",n),onTouchmove:t[0]||(t[0]=n=>_(n)),onTouchend:w},null,40,le),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right",onMousedown:n=>m(l,"top-right"),onTouchstart:n=>k(l,"top-right",n),onTouchmove:t[1]||(t[1]=n=>_(n)),onTouchend:w},null,40,ae),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left",onMousedown:n=>m(l,"bottom-left"),onTouchstart:n=>k(l,"bottom-left",n),onTouchmove:t[2]||(t[2]=n=>_(n)),onTouchend:w},null,40,ne),o.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right",onMousedown:n=>m(l,"bottom-right"),onTouchstart:n=>k(l,"bottom-right",n),onTouchmove:t[3]||(t[3]=n=>_(n)),onTouchend:w},null,40,ue)],64)),o.renderSlot(e.$slots,"content",{item:a,index:l,left:a.left,top:a.top,height:a.height,width:a.width},void 0,!0)],46,oe))),128))],36)],12,ee)]))}},ie=j._export_sfc(se,[["__scopeId","data-v-57895b3a"]]);exports.default=ie;
@@ -1,7 +1,7 @@
1
1
  import { useCssVars as J, computed as _, ref as r, watch as K, openBlock as w, createElementBlock as y, createElementVNode as g, normalizeStyle as z, createCommentVNode as I, Fragment as D, renderList as Q, normalizeClass as Z, renderSlot as ee, pushScopeId as te, popScopeId as oe, createStaticVNode as ae } from "vue";
2
2
  import { p as le } from "./pdf-97UbtKC2.js";
3
- import { u as ue } from "./useNestedProp-Da77DnaA.js";
4
- import { u as ne } from "./index-ByO3Ywek.js";
3
+ import { u as ue } from "./useNestedProp-R6UMUTVL.js";
4
+ import { u as ne } from "./index-8jKJqifI.js";
5
5
  import { _ as se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
6
  const ie = (M) => (te("data-v-57895b3a"), M = M(), oe(), M), re = {
7
7
  key: 0,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),g=require("./useNestedProp-Dikfncsl.cjs"),L=require("./index-BDKEFvEF.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 u=e,$=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(u.quanta)?$.value.X:$.value[u.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 u=e,{vue_ui_digits:$}=L.useConfig(),l=t.computed(()=>g.useNestedProp({userConfig:u.config,defaultConfig:$})),a=t.computed(()=>{const c=(u.dataset||0).toString().split(""),d=[],n={x:10,y:10};let i=0;for(let y=0;y<c.length;y+=1){const o=c[y];d.push({x:n.x+i,y:n.y,quanta:o}),o=="."?i+=2:i+=44}return d}),x=t.computed(()=>Math.max(...a.value.map(c=>c.x))+36);return(c,d)=>(t.openBlock(),t.createElementBlock("svg",{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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),g=require("./useNestedProp-Bs4c78Cx.cjs"),L=require("./index--K6Ja9Gj.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 u=e,$=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(u.quanta)?$.value.X:$.value[u.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 u=e,{vue_ui_digits:$}=L.useConfig(),l=t.computed(()=>g.useNestedProp({userConfig:u.config,defaultConfig:$})),a=t.computed(()=>{const c=(u.dataset||0).toString().split(""),d=[],n={x:10,y:10};let i=0;for(let y=0;y<c.length;y+=1){const o=c[y];d.push({x:n.x+i,y:n.y,quanta:o}),o=="."?i+=2:i+=44}return d}),x=t.computed(()=>Math.max(...a.value.map(c=>c.x))+36);return(c,d)=>(t.openBlock(),t.createElementBlock("svg",{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;
@@ -1,6 +1,6 @@
1
1
  import { ref as k, computed as d, openBlock as $, createElementBlock as i, Fragment as o, createElementVNode as l, createCommentVNode as m, unref as v, normalizeStyle as C, renderList as b, createBlock as N } from "vue";
2
- import { u as q } from "./useNestedProp-Da77DnaA.js";
3
- import { u as M, X as S } from "./index-ByO3Ywek.js";
2
+ import { u as q } from "./useNestedProp-R6UMUTVL.js";
3
+ import { u as M, X as S } from "./index-8jKJqifI.js";
4
4
  const w = { key: 0 }, B = ["d", "fill"], F = ["d", "fill"], X = ["d", "fill"], E = ["d", "fill"], I = ["d", "fill"], O = ["d", "fill"], A = ["d", "fill"], D = { key: 1 }, G = ["cx", "cy", "fill"], V = {
5
5
  __name: "Digit",
6
6
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-BDKEFvEF.cjs"),le=require("./useResponsive-B3TrDDIG.cjs"),pe=require("./Title-XRMcJkna.cjs"),oe=require("./usePrinter-DedM_6px.cjs"),me=require("./DataTable-CGX9xKvm.cjs"),ge=require("./Tooltip-COgv-iii.cjs"),be=require("./Legend-BEMGbN0s.cjs"),ke=require("./vue-ui-skeleton-rY_nZhMQ.cjs"),we=require("./vue-ui-accordion-BytUYLYl.cjs"),ae=require("./useNestedProp-Dikfncsl.cjs"),Ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),xe=B=>(e.pushScopeId("data-v-a76ecc28"),B=B(),e.popScopeId(),B),_e=["id"],Be=["xmlns","viewBox"],Se=["id"],$e=["stop-color"],Ne=["stop-color"],Le=["stop-color"],Ee=["id"],Ve=["id"],Te=xe(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),ze=["id"],Oe=["flood-color"],Fe=["d","stroke","filter"],Me=["cx","cy","r","fill","filter"],Pe=["stroke","d"],De=["d","fill","stroke","stroke-width","filter"],Ie=["cx","cy","r","fill"],Xe=["d","fill","onMouseenter","onClick"],Ae=["cx","cy","r","fill"],qe=["x","y","fill","font-size"],Re=["x","y","fill","font-size"],Ge=["x","y","fill","font-size"],He=["x","y","fill","font-size"],Ue=["filter"],Ye={key:0},je=["x","y"],We={key:1},Je=["cx","cy","fill","filter","onClick"],Ke=["text-anchor","x","y","fill","font-size","onClick"],Qe=["text-anchor","x","y","fill","font-size","onClick"],Ze={key:2},et=["x","y","width"],tt=["onClick"],lt={key:0,style:{"font-variant-numeric":"tabular-nums"}},ot={key:1},at=["innerHTML"],rt={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(B,{expose:re,emit:D}){const y=B,{vue_ui_donut:ne}=a.useConfig(),S=e.computed({get(){return!!y.dataset&&y.dataset.length},set(l){return l}}),$=e.ref(null),I=e.ref(null),X=e.ref(null),E=e.ref(null);e.onMounted(()=>{if(a.objectIsEmpty(y.dataset)?a.error({componentName:"VueUiDonut",type:"dataset"}):y.dataset.forEach((l,r)=>{a.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{S.value=!1,a.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:o,index:r})})}),t.value.responsive){const l=le.throttle(()=>{const{width:r,height:o}=le.useResponsive({chart:$.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?X.value:null});s.value.width=r,s.value.height=o});E.value=new ResizeObserver(l),E.value.observe($.value.parentNode)}}),e.onBeforeUnmount(()=>{E.value&&E.value.disconnect()});const h=e.ref(a.createUid()),ue=e.ref(null),z=e.ref(!1),O=e.ref(""),p=e.ref(null),A=e.ref(0),t=e.computed(()=>{const l=ae.useNestedProp({userConfig:y.config,defaultConfig:ne});return l.theme?{...ae.useNestedProp({userConfig:a.themes.vue_ui_donut[l.theme]||y.config,defaultConfig:l}),customPalette:a.themePalettes[l.theme]||a.palette}:l}),{isPrinting:se,isImaging:ie,generatePdf:q,generateImage:R}=oe.usePrinter({elementId:`donut__${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut"}),G=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),c=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:512}),N=e.computed(()=>{const l=t.value.style.chart.layout.donut.strokeWidth/512,r=s.value.width*l;return r>t.value.style.chart.layout.donut.strokeWidth?t.value.style.chart.layout.donut.strokeWidth:r}),g=e.computed(()=>y.dataset.map((l,r)=>({name:l.name,color:a.convertColorToHex(l.color)||G.value[r]||a.palette[r]||a.palette[r%a.palette.length],value:l.values.reduce((o,n)=>o+n,0),absoluteValues:l.values,comment:l.comment||""}))),v=e.ref(g.value);e.watch(()=>g.value,l=>v.value=l);function ce(){return g.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const f=e.ref([]),H=e.ref(null),U=e.ref(null),C=e.ref(!1);function Y(l){const r=g.value.find((u,i)=>i===l);let n=v.value.find((u,i)=>i===l).value;if(f.value.includes(l)){let i=function(){n>u?(cancelAnimationFrame(H.value),v.value=v.value.map((d,P)=>l===P?{...d,value:u}:d),C.value=!1):(C.value=!0,n+=u*.025,v.value=v.value.map((d,P)=>l===P?{...d,value:n}:d),H.value=requestAnimationFrame(i))};f.value=f.value.filter(d=>d!==l);const u=r.value;i()}else if(f.value.length<g.value.length-1){let u=function(){n<.1?(cancelAnimationFrame(U.value),f.value.push(l),v.value=v.value.map((i,d)=>l===d?{...i,value:0}:i),C.value=!1):(C.value=!0,n/=1.1,v.value=v.value.map((i,d)=>l===d?{...i,value:n}:i),U.value=requestAnimationFrame(u))};u()}D("selectLegend",x.value.map(u=>({name:u.name,color:u.color,value:u.value})))}const x=e.computed(()=>(v.value.forEach((l,r)=>{if([null,void 0].includes(l.values))return{...l,values:[]}}),v.value.map((l,r)=>({...l,seriesIndex:r})).filter((l,r)=>!f.value.includes(r)))),j=e.computed(()=>y.dataset.map((l,r)=>({name:l.name,color:a.convertColorToHex(l.color)||G.value[r]||a.palette[r]||a.palette[r%a.palette.length],value:(l.values||[]).reduce((o,n)=>o+n,0),shape:"circle"})).map((l,r)=>({...l,proportion:l.value/y.dataset.map(o=>(o.values||[]).reduce((n,u)=>n+u,0)).reduce((o,n)=>o+n,0),opacity:f.value.includes(r)?.5:1,segregate:()=>Y(r),isSegregated:f.value.includes(r)}))),de=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),b=e.computed(()=>{const l=Math.min(s.value.width/3,s.value.height/3);return l<55?55:l}),w=e.computed(()=>a.makeDonut({series:x.value},s.value.width/2,s.value.height/2,b.value,b.value,1.99999,2,1,360,105.25,N.value));function _(l){return l.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function W(l,r){return isNaN(l.value/J(r))?0:(l.value/J(r)*100).toFixed(0)+"%"}function J(l){return[...l].map(r=>r.value).reduce((r,o)=>r+o,0)}const m=e.computed(()=>x.value.map(l=>l.value).reduce((l,r)=>l+r,0)),ve=e.computed(()=>m.value/x.value.length),F=e.ref(null);function he({datapoint:l,relativeIndex:r,seriesIndex:o,show:n=!1}){F.value={datapoint:l,seriesIndex:o,config:t.value,series:g.value},z.value=n,p.value=r;let u="";const i=t.value.style.chart.tooltip.customFormat;a.isFunction(i)&&a.functionReturnsString(()=>i({seriesIndex:o,datapoint:l,series:g.value,config:t.value}))?O.value=i({seriesIndex:o,datapoint:l,series:g.value,config:t.value}):(u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${a.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:u+=`<b>${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),t.value.style.chart.comments.showInTooltip&&l.comment&&(u+=`<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${l.color}">${l.comment}</div>`),O.value=`<div>${u}</div>`)}function M(l){return t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==l?`url(#blur_${h.value})`:""}const k=e.computed(()=>{const l=x.value.map(o=>({name:o.name,color:o.color})),r=x.value.map(o=>o.value);return{head:l,body:r}});function K(){e.nextTick(()=>{const l=k.value.head.map((n,u)=>[[n.name],[k.value.body[u]],[isNaN(k.value.body[u]/m.value)?"-":k.value.body[u]/m.value*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=a.createCsvContent(r);a.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const V=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',a.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:m.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],r=k.value.head.map((u,i)=>{const d=a.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},d,isNaN(k.value.body[i]/m.value)?"-":(k.value.body[i]/m.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),o={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.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:r,config:o}}),L=e.ref(!1);function fe(l){L.value=l,A.value+=1}const Q=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function ye(l){return l.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(r=>"-").join("")}function T(l,r){D("selectDatapoint",{datapoint:l,index:r})}function Z(){c.value.showTable=!c.value.showTable}function ee(){c.value.dataLabels.show=!c.value.dataLabels.show}function te(){c.value.showTooltip=!c.value.showTooltip}return re({getData:ce,generatePdf:q,generateCsv:K,generateImage:R,toggleTable:Z,toggleLabels:ee,toggleTooltip:te}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:$,class:e.normalizeClass(`vue-ui-donut ${L.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height:100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`donut__${h.value}`},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:I,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(pe._sfc_main,{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"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&S.value?(e.openBlock(),e.createBlock(oe.UserOptions,{ref_key:"details",ref:ue,key:`user_option_${A.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(se),isImaging:e.unref(ie),uid:h.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:L.value,chartElement:$.value,isTooltip:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},onToggleFullscreen:fe,onGeneratePdf:e.unref(q),onGenerateCsv:K,onGenerateImage:e.unref(R),onToggleTable:Z,onToggleLabels:ee,onToggleTooltip:te},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},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]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","isTooltip","titles","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":L.value,"vue-data-ui-fulscreen--off":!L.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,$e),e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+e.unref(a.opacity)[t.value.style.chart.gradientIntensity]},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(a.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Le)],8,Se)):e.createCommentVNode("",!0)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${h.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${h.value}`},null,8,Ve),Te],8,Ee),e.createElementVNode("filter",{id:`shadow_${h.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Oe)],8,ze)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(a.calcNutArrowPath)(o,{x:s.value.width/2,y:s.value.height/2},16,16,!1,!1,N.value),stroke:o.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:M(n)},null,8,Fe)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("circle",{cx:s.value.width/2,cy:s.value.height/2,r:b.value<=0?10:b.value,fill:t.value.style.chart.backgroundColor,filter:t.value.style.chart.layout.donut.useShadow?`url(#shadow_${h.value})`:""},null,8,Me),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:o.arcSlice,fill:"#FFFFFF"},null,8,Pe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:o.arcSlice,fill:`${o.color}CC`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:M(n)},null,8,De))),256)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:s.value.width/2,cy:s.value.height/2,r:b.value<=0?10:b.value,fill:`url(#gradient_${h.value})`},null,8,Ie)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("path",{"data-cy-donut-trap":"",d:o.arcSlice,fill:p.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:u=>he({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:r[0]||(r[0]=u=>{z.value=!1,p.value=null}),onClick:u=>T(o,n)},null,40,Xe))),256)),t.value.style.chart.layout.labels.hollow.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:s.value.width/2,cy:s.value.height/2,r:b.value-N.value<=0?10:b.value-N.value,fill:t.value.style.chart.backgroundColor},null,8,Ae)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.color,"font-size":t.value.style.chart.layout.labels.hollow.total.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.total.text),13,qe)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2+t.value.style.chart.layout.labels.hollow.total.fontSize-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.value.color,"font-size":t.value.style.chart.layout.labels.hollow.total.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},e.toDisplayString(e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.hollow.total.value.prefix,v:m.value,s:t.value.style.chart.layout.labels.hollow.total.value.suffix})),13,Re)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:4,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.color,"font-size":t.value.style.chart.layout.labels.hollow.average.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.average.text),13,Ge)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:5,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.fontSize+t.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.value.color,"font-size":t.value.style.chart.layout.labels.hollow.average.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},e.toDisplayString(C.value?"--":e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.hollow.average.value.prefix,v:ve.value,s:t.value.style.chart.layout.labels.hollow.average.value.suffix,r:t.value.style.chart.layout.labels.hollow.average.value.rounding})),13,He)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",{filter:M(n),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",Ye,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="end"?e.unref(a.calcMarkerOffsetX)(o).x-120:e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="middle"?e.unref(a.calcMarkerOffsetX)(o).x-60:e.unref(a.calcMarkerOffsetX)(o).x,y:e.unref(a.calcMarkerOffsetY)(o)-(Q.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(l.$slots,"dataLabel",e.normalizeProps(e.guardReactiveProps({datapoint:o,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===n,isSafari:Q.value,isVisible:_(o)&&c.value.dataLabels.show,textAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16,!0).anchor,flexAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16).anchor,percentage:W(o,w.value)})),void 0,!0)])],8,je))])):(e.openBlock(),e.createElementBlock("g",We,[_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(a.calcMarkerOffsetX)(o).x,cy:e.unref(a.calcMarkerOffsetY)(o)-3.5,fill:o.color,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===n?"":`url(#blur_${h.value})`,onClick:u=>T(o,n)},null,8,Je)):e.createCommentVNode("",!0),_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(a.calcMarkerOffsetX)(o,!0,12).anchor,x:e.unref(a.calcMarkerOffsetX)(o,!0,12).x,y:e.unref(a.calcMarkerOffsetY)(o),fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:u=>T(o,n)},e.toDisplayString(W(o,w.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,rounding:t.value.style.chart.layout.labels.value.rounding})})`:""),13,Ke)):e.createCommentVNode("",!0),_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":e.unref(a.calcMarkerOffsetX)(o).anchor,x:e.unref(a.calcMarkerOffsetX)(o,!0,12).x,y:e.unref(a.calcMarkerOffsetY)(o)+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:u=>T(o,n)},e.toDisplayString(o.name),13,Qe)):e.createCommentVNode("",!0)])),c.value.dataLabels.show&&t.value.style.chart.comments.show&&o.comment?(e.openBlock(),e.createElementBlock("g",Ze,[_(o)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="end"?e.unref(a.calcMarkerOffsetX)(o).x-t.value.style.chart.comments.width:e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="middle"?e.unref(a.calcMarkerOffsetX)(o).x-t.value.style.chart.comments.width/2:e.unref(a.calcMarkerOffsetX)(o).x),y:e.unref(a.calcMarkerOffsetY)(o)+24+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(l.$slots,"plot-comment",{plot:{...o,textAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16,!0).anchor,flexAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16).anchor}},void 0,!0)])],8,et)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,Ue))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,Be)):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:3,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:N.value*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:X},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(be.Legend,{key:0,legendSet:j.value,config:de.value,onClickMarker:r[1]||(r[1]=({i:o})=>Y(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:u=>o.segregate(),style:e.normalizeStyle(`opacity:${f.value.includes(n)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}))+" ",1),f.value.includes(n)?(e.openBlock(),e.createElementBlock("span",ot," ( "+e.toDisplayString(ye(o.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",lt," ("+e.toDisplayString(isNaN(o.value/m.value)?"-":e.unref(a.dataLabel)({v:C.value?o.proportion*100:o.value/m.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,tt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:j.value},void 0,!0)],512),e.createVNode(ge._sfc_main,{show:c.value.showTooltip&&z.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,parent:$.value,content:O.value,isCustom:e.unref(a.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","parent","content","isCustom"]),S.value?(e.openBlock(),e.createBlock(we.default,{key:4,hideDetails:"",config:{open:c.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.createVNode(me.DataTable,{colNames:V.value.colNames,head:V.value.head,body:V.value.body,config:V.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[2]||(r[2]=o=>c.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,at)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,_e))}},nt=Ce._export_sfc(rt,[["__scopeId","data-v-a76ecc28"]]);exports.default=nt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index--K6Ja9Gj.cjs"),le=require("./useResponsive-B3TrDDIG.cjs"),pe=require("./Title-DpgU75bw.cjs"),oe=require("./usePrinter-CysnJve5.cjs"),me=require("./DataTable-DQGTnBUl.cjs"),ge=require("./Tooltip-B2BLFWIv.cjs"),be=require("./Legend-BEEbv4va.cjs"),ke=require("./vue-ui-skeleton-Bf_PLiHN.cjs"),we=require("./vue-ui-accordion-B0UeLf1b.cjs"),ae=require("./useNestedProp-Bs4c78Cx.cjs"),Ce=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),xe=B=>(e.pushScopeId("data-v-a76ecc28"),B=B(),e.popScopeId(),B),_e=["id"],Be=["xmlns","viewBox"],Se=["id"],$e=["stop-color"],Ne=["stop-color"],Le=["stop-color"],Ee=["id"],Ve=["id"],Te=xe(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),ze=["id"],Oe=["flood-color"],Fe=["d","stroke","filter"],Me=["cx","cy","r","fill","filter"],Pe=["stroke","d"],De=["d","fill","stroke","stroke-width","filter"],Ie=["cx","cy","r","fill"],Xe=["d","fill","onMouseenter","onClick"],Ae=["cx","cy","r","fill"],qe=["x","y","fill","font-size"],Re=["x","y","fill","font-size"],Ge=["x","y","fill","font-size"],He=["x","y","fill","font-size"],Ue=["filter"],Ye={key:0},je=["x","y"],We={key:1},Je=["cx","cy","fill","filter","onClick"],Ke=["text-anchor","x","y","fill","font-size","onClick"],Qe=["text-anchor","x","y","fill","font-size","onClick"],Ze={key:2},et=["x","y","width"],tt=["onClick"],lt={key:0,style:{"font-variant-numeric":"tabular-nums"}},ot={key:1},at=["innerHTML"],rt={__name:"vue-ui-donut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(B,{expose:re,emit:D}){const y=B,{vue_ui_donut:ne}=a.useConfig(),S=e.computed({get(){return!!y.dataset&&y.dataset.length},set(l){return l}}),$=e.ref(null),I=e.ref(null),X=e.ref(null),E=e.ref(null);e.onMounted(()=>{if(a.objectIsEmpty(y.dataset)?a.error({componentName:"VueUiDonut",type:"dataset"}):y.dataset.forEach((l,r)=>{a.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{S.value=!1,a.error({componentName:"VueUiDonut",type:"datasetSerieAttribute",property:o,index:r})})}),t.value.responsive){const l=le.throttle(()=>{const{width:r,height:o}=le.useResponsive({chart:$.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?X.value:null});s.value.width=r,s.value.height=o});E.value=new ResizeObserver(l),E.value.observe($.value.parentNode)}}),e.onBeforeUnmount(()=>{E.value&&E.value.disconnect()});const h=e.ref(a.createUid()),ue=e.ref(null),z=e.ref(!1),O=e.ref(""),p=e.ref(null),A=e.ref(0),t=e.computed(()=>{const l=ae.useNestedProp({userConfig:y.config,defaultConfig:ne});return l.theme?{...ae.useNestedProp({userConfig:a.themes.vue_ui_donut[l.theme]||y.config,defaultConfig:l}),customPalette:a.themePalettes[l.theme]||a.palette}:l}),{isPrinting:se,isImaging:ie,generatePdf:q,generateImage:R}=oe.usePrinter({elementId:`donut__${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-donut"}),G=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),c=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:512}),N=e.computed(()=>{const l=t.value.style.chart.layout.donut.strokeWidth/512,r=s.value.width*l;return r>t.value.style.chart.layout.donut.strokeWidth?t.value.style.chart.layout.donut.strokeWidth:r}),g=e.computed(()=>y.dataset.map((l,r)=>({name:l.name,color:a.convertColorToHex(l.color)||G.value[r]||a.palette[r]||a.palette[r%a.palette.length],value:l.values.reduce((o,n)=>o+n,0),absoluteValues:l.values,comment:l.comment||""}))),v=e.ref(g.value);e.watch(()=>g.value,l=>v.value=l);function ce(){return g.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const f=e.ref([]),H=e.ref(null),U=e.ref(null),C=e.ref(!1);function Y(l){const r=g.value.find((u,i)=>i===l);let n=v.value.find((u,i)=>i===l).value;if(f.value.includes(l)){let i=function(){n>u?(cancelAnimationFrame(H.value),v.value=v.value.map((d,P)=>l===P?{...d,value:u}:d),C.value=!1):(C.value=!0,n+=u*.025,v.value=v.value.map((d,P)=>l===P?{...d,value:n}:d),H.value=requestAnimationFrame(i))};f.value=f.value.filter(d=>d!==l);const u=r.value;i()}else if(f.value.length<g.value.length-1){let u=function(){n<.1?(cancelAnimationFrame(U.value),f.value.push(l),v.value=v.value.map((i,d)=>l===d?{...i,value:0}:i),C.value=!1):(C.value=!0,n/=1.1,v.value=v.value.map((i,d)=>l===d?{...i,value:n}:i),U.value=requestAnimationFrame(u))};u()}D("selectLegend",x.value.map(u=>({name:u.name,color:u.color,value:u.value})))}const x=e.computed(()=>(v.value.forEach((l,r)=>{if([null,void 0].includes(l.values))return{...l,values:[]}}),v.value.map((l,r)=>({...l,seriesIndex:r})).filter((l,r)=>!f.value.includes(r)))),j=e.computed(()=>y.dataset.map((l,r)=>({name:l.name,color:a.convertColorToHex(l.color)||G.value[r]||a.palette[r]||a.palette[r%a.palette.length],value:(l.values||[]).reduce((o,n)=>o+n,0),shape:"circle"})).map((l,r)=>({...l,proportion:l.value/y.dataset.map(o=>(o.values||[]).reduce((n,u)=>n+u,0)).reduce((o,n)=>o+n,0),opacity:f.value.includes(r)?.5:1,segregate:()=>Y(r),isSegregated:f.value.includes(r)}))),de=e.computed(()=>({cy:"donut-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),b=e.computed(()=>{const l=Math.min(s.value.width/3,s.value.height/3);return l<55?55:l}),w=e.computed(()=>a.makeDonut({series:x.value},s.value.width/2,s.value.height/2,b.value,b.value,1.99999,2,1,360,105.25,N.value));function _(l){return l.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function W(l,r){return isNaN(l.value/J(r))?0:(l.value/J(r)*100).toFixed(0)+"%"}function J(l){return[...l].map(r=>r.value).reduce((r,o)=>r+o,0)}const m=e.computed(()=>x.value.map(l=>l.value).reduce((l,r)=>l+r,0)),ve=e.computed(()=>m.value/x.value.length),F=e.ref(null);function he({datapoint:l,relativeIndex:r,seriesIndex:o,show:n=!1}){F.value={datapoint:l,seriesIndex:o,config:t.value,series:g.value},z.value=n,p.value=r;let u="";const i=t.value.style.chart.tooltip.customFormat;a.isFunction(i)&&a.functionReturnsString(()=>i({seriesIndex:o,datapoint:l,series:g.value,config:t.value}))?O.value=i({seriesIndex:o,datapoint:l,series:g.value,config:t.value}):(u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${a.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:u+=`<b>${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),t.value.style.chart.comments.showInTooltip&&l.comment&&(u+=`<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${l.color}">${l.comment}</div>`),O.value=`<div>${u}</div>`)}function M(l){return t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==l?`url(#blur_${h.value})`:""}const k=e.computed(()=>{const l=x.value.map(o=>({name:o.name,color:o.color})),r=x.value.map(o=>o.value);return{head:l,body:r}});function K(){e.nextTick(()=>{const l=k.value.head.map((n,u)=>[[n.name],[k.value.body[u]],[isNaN(k.value.body[u]/m.value)?"-":k.value.body[u]/m.value*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=a.createCsvContent(r);a.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-donut"})})}const V=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',a.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:m.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],r=k.value.head.map((u,i)=>{const d=a.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},d,isNaN(k.value.body[i]/m.value)?"-":(k.value.body[i]/m.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),o={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.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:r,config:o}}),L=e.ref(!1);function fe(l){L.value=l,A.value+=1}const Q=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function ye(l){return l.toFixed(t.value.style.chart.legend.roundingPercentage).split("").map(r=>"-").join("")}function T(l,r){D("selectDatapoint",{datapoint:l,index:r})}function Z(){c.value.showTable=!c.value.showTable}function ee(){c.value.dataLabels.show=!c.value.dataLabels.show}function te(){c.value.showTooltip=!c.value.showTooltip}return re({getData:ce,generatePdf:q,generateCsv:K,generateImage:R,toggleTable:Z,toggleLabels:ee,toggleTooltip:te}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"donutChart",ref:$,class:e.normalizeClass(`vue-ui-donut ${L.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height:100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`donut__${h.value}`},[e.renderSlot(l.$slots,"userConfig",{},void 0,!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:I,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(pe._sfc_main,{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"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&S.value?(e.openBlock(),e.createBlock(oe.UserOptions,{ref_key:"details",ref:ue,key:`user_option_${A.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(se),isImaging:e.unref(ie),uid:h.value,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:L.value,chartElement:$.value,isTooltip:c.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},onToggleFullscreen:fe,onGeneratePdf:e.unref(q),onGenerateCsv:K,onGenerateImage:e.unref(R),onToggleTable:Z,onToggleLabels:ee,onToggleTooltip:te},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},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]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasLabel","hasFullscreen","isFullscreen","chartElement","isTooltip","titles","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),S.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":L.value,"vue-data-ui-fulscreen--off":!L.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("radialGradient",{key:0,id:`gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,$e),e.createElementVNode("stop",{offset:"77%","stop-color":"#FFFFFF"+e.unref(a.opacity)[t.value.style.chart.gradientIntensity]},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(a.convertColorToHex)(t.value.style.chart.backgroundColor)}00`},null,8,Le)],8,Se)):e.createCommentVNode("",!0)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${h.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${h.value}`},null,8,Ve),Te],8,Ee),e.createElementVNode("filter",{id:`shadow_${h.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Oe)],8,ze)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(a.calcNutArrowPath)(o,{x:s.value.width/2,y:s.value.height/2},16,16,!1,!1,N.value),stroke:o.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:M(n)},null,8,Fe)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("circle",{cx:s.value.width/2,cy:s.value.height/2,r:b.value<=0?10:b.value,fill:t.value.style.chart.backgroundColor,filter:t.value.style.chart.layout.donut.useShadow?`url(#shadow_${h.value})`:""},null,8,Me),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("path",{stroke:t.value.style.chart.backgroundColor,d:o.arcSlice,fill:"#FFFFFF"},null,8,Pe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-donut-arc-path",d:o.arcSlice,fill:`${o.color}CC`,stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:M(n)},null,8,De))),256)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:s.value.width/2,cy:s.value.height/2,r:b.value<=0?10:b.value,fill:`url(#gradient_${h.value})`},null,8,Ie)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("path",{"data-cy-donut-trap":"",d:o.arcSlice,fill:p.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:u=>he({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:r[0]||(r[0]=u=>{z.value=!1,p.value=null}),onClick:u=>T(o,n)},null,40,Xe))),256)),t.value.style.chart.layout.labels.hollow.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:s.value.width/2,cy:s.value.height/2,r:b.value-N.value<=0?10:b.value-N.value,fill:t.value.style.chart.backgroundColor},null,8,Ae)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.color,"font-size":t.value.style.chart.layout.labels.hollow.total.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.total.text),13,qe)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.total.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2+t.value.style.chart.layout.labels.hollow.total.fontSize-(t.value.style.chart.layout.labels.hollow.average.show?t.value.style.chart.layout.labels.hollow.total.fontSize:0)+t.value.style.chart.layout.labels.hollow.total.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.total.value.color,"font-size":t.value.style.chart.layout.labels.hollow.total.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.total.value.bold?"bold":""}`)},e.toDisplayString(e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.hollow.total.value.prefix,v:m.value,s:t.value.style.chart.layout.labels.hollow.total.value.suffix})),13,Re)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:4,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.color,"font-size":t.value.style.chart.layout.labels.hollow.average.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.layout.labels.hollow.average.text),13,Ge)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.hollow.average.show?(e.openBlock(),e.createElementBlock("text",{key:5,"text-anchor":"middle",x:s.value.width/2,y:s.value.height/2+(t.value.style.chart.layout.labels.hollow.total.show?t.value.style.chart.layout.labels.hollow.average.fontSize:0)+t.value.style.chart.layout.labels.hollow.average.fontSize+t.value.style.chart.layout.labels.hollow.average.value.offsetY,fill:t.value.style.chart.layout.labels.hollow.average.value.color,"font-size":t.value.style.chart.layout.labels.hollow.average.value.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.hollow.average.value.bold?"bold":""}`)},e.toDisplayString(C.value?"--":e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.hollow.average.value.prefix,v:ve.value,s:t.value.style.chart.layout.labels.hollow.average.value.suffix,r:t.value.style.chart.layout.labels.hollow.average.value.rounding})),13,He)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",{filter:M(n),class:e.normalizeClass({animated:t.value.useCssAnimation})},[t.value.style.chart.layout.labels.dataLabels.useLabelSlots?(e.openBlock(),e.createElementBlock("g",Ye,[(e.openBlock(),e.createElementBlock("foreignObject",{x:e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="end"?e.unref(a.calcMarkerOffsetX)(o).x-120:e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="middle"?e.unref(a.calcMarkerOffsetX)(o).x-60:e.unref(a.calcMarkerOffsetX)(o).x,y:e.unref(a.calcMarkerOffsetY)(o)-(Q.value?20:0),width:"120",height:"60",style:{overflow:"visible"}},[e.createElementVNode("div",null,[e.renderSlot(l.$slots,"dataLabel",e.normalizeProps(e.guardReactiveProps({datapoint:o,isBlur:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===n,isSafari:Q.value,isVisible:_(o)&&c.value.dataLabels.show,textAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16,!0).anchor,flexAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16).anchor,percentage:W(o,w.value)})),void 0,!0)])],8,je))])):(e.openBlock(),e.createElementBlock("g",We,[_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(a.calcMarkerOffsetX)(o).x,cy:e.unref(a.calcMarkerOffsetY)(o)-3.5,fill:o.color,r:3,filter:!t.value.useBlurOnHover||[null,void 0].includes(p.value)||p.value===n?"":`url(#blur_${h.value})`,onClick:u=>T(o,n)},null,8,Je)):e.createCommentVNode("",!0),_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(a.calcMarkerOffsetX)(o,!0,12).anchor,x:e.unref(a.calcMarkerOffsetX)(o,!0,12).x,y:e.unref(a.calcMarkerOffsetY)(o),fill:t.value.style.chart.layout.labels.percentage.color,"font-size":t.value.style.chart.layout.labels.percentage.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.percentage.bold?"bold":""}`),onClick:u=>T(o,n)},e.toDisplayString(W(o,w.value))+" "+e.toDisplayString(t.value.style.chart.layout.labels.value.show?`(${e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,rounding:t.value.style.chart.layout.labels.value.rounding})})`:""),13,Ke)):e.createCommentVNode("",!0),_(o)&&c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":e.unref(a.calcMarkerOffsetX)(o).anchor,x:e.unref(a.calcMarkerOffsetX)(o,!0,12).x,y:e.unref(a.calcMarkerOffsetY)(o)+t.value.style.chart.layout.labels.percentage.fontSize,fill:t.value.style.chart.layout.labels.name.color,"font-size":t.value.style.chart.layout.labels.name.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.labels.name.bold?"bold":""}`),onClick:u=>T(o,n)},e.toDisplayString(o.name),13,Qe)):e.createCommentVNode("",!0)])),c.value.dataLabels.show&&t.value.style.chart.comments.show&&o.comment?(e.openBlock(),e.createElementBlock("g",Ze,[_(o)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:t.value.style.chart.comments.offsetX+(e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="end"?e.unref(a.calcMarkerOffsetX)(o).x-t.value.style.chart.comments.width:e.unref(a.calcMarkerOffsetX)(o,!0).anchor==="middle"?e.unref(a.calcMarkerOffsetX)(o).x-t.value.style.chart.comments.width/2:e.unref(a.calcMarkerOffsetX)(o).x),y:e.unref(a.calcMarkerOffsetY)(o)+24+t.value.style.chart.comments.offsetY,width:t.value.style.chart.comments.width,height:"200",style:{overflow:"visible","pointer-events":"none"}},[e.createElementVNode("div",null,[e.renderSlot(l.$slots,"plot-comment",{plot:{...o,textAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16,!0).anchor,flexAlign:e.unref(a.calcMarkerOffsetX)(o,!0,16).anchor}},void 0,!0)])],8,et)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,Ue))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,Be)):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:3,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC",strokeWidth:N.value*.8}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:X},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(be.Legend,{key:0,legendSet:j.value,config:de.value,onClickMarker:r[1]||(r[1]=({i:o})=>Y(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:u=>o.segregate(),style:e.normalizeStyle(`opacity:${f.value.includes(n)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(a.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}))+" ",1),f.value.includes(n)?(e.openBlock(),e.createElementBlock("span",ot," ( "+e.toDisplayString(ye(o.proportion*100))+" % ) ",1)):(e.openBlock(),e.createElementBlock("span",lt," ("+e.toDisplayString(isNaN(o.value/m.value)?"-":e.unref(a.dataLabel)({v:C.value?o.proportion*100:o.value/m.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,tt)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:j.value},void 0,!0)],512),e.createVNode(ge._sfc_main,{show:c.value.showTooltip&&z.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,parent:$.value,content:O.value,isCustom:e.unref(a.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...F.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","parent","content","isCustom"]),S.value?(e.openBlock(),e.createBlock(we.default,{key:4,hideDetails:"",config:{open:c.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.createVNode(me.DataTable,{colNames:V.value.colNames,head:V.value.head,body:V.value.body,config:V.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[2]||(r[2]=o=>c.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,at)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,_e))}},nt=Ce._export_sfc(rt,[["__scopeId","data-v-a76ecc28"]]);exports.default=nt;