vue-data-ui 2.10.2-beta.0 → 2.10.2-beta.2
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.
- package/dist/{Arrow-DvrzYEem.js → Arrow-B2-rOYz8.js} +1 -1
- package/dist/{Arrow-DiKmN6eo.cjs → Arrow-D6UBVyNr.cjs} +1 -1
- package/dist/{BaseIcon-1opvCDaQ.js → BaseIcon-Br5G8Cdk.js} +1 -1
- package/dist/{BaseIcon-BRmHoHji.cjs → BaseIcon-DfoJJxST.cjs} +1 -1
- package/dist/{ColorPicker-G7dML0BS.js → ColorPicker-CiQzB3a-.js} +3 -3
- package/dist/{ColorPicker-BQY41CwB.cjs → ColorPicker-Dvgprgpv.cjs} +1 -1
- package/dist/{DataTable-DSZwidNa.cjs → DataTable-CGucPqAQ.cjs} +1 -1
- package/dist/{DataTable-DVAtzq48.js → DataTable-Dk-94kK2.js} +2 -2
- package/dist/{Legend-DUY48WfL.cjs → Legend-B9aoKeq3.cjs} +1 -1
- package/dist/{Legend-ClChB3yO.js → Legend-Cx6NYPTA.js} +2 -2
- package/dist/{PackageVersion-BVqKnl8d.js → PackageVersion-BdNfnIm2.js} +3 -3
- package/dist/PackageVersion-C2bjLIu9.cjs +1 -0
- package/dist/{PenAndPaper-Bt9JtDPx.cjs → PenAndPaper-CJIFAI78.cjs} +1 -1
- package/dist/{PenAndPaper-3jmU5GLm.js → PenAndPaper-wrVNMaG8.js} +3 -3
- package/dist/{Shape-x1m9d0T3.cjs → Shape-Cn2RU1NY.cjs} +1 -1
- package/dist/{Shape-BOc09O7_.js → Shape-vIKj52KP.js} +1 -1
- package/dist/{Slicer-B7Gt3_Nl.cjs → Slicer-t3EfI94H.cjs} +1 -1
- package/dist/{Slicer-dM7HrmEG.js → Slicer-yki6JqTB.js} +2 -2
- package/dist/{Title-CcgS3et4.cjs → Title-Bae0QJu7.cjs} +1 -1
- package/dist/{Title-Bsx1bBKe.js → Title-CDYBDpu3.js} +1 -1
- package/dist/{Tooltip-C8rHMEUK.js → Tooltip-BzsAOdBd.js} +1 -1
- package/dist/{Tooltip-DWCw-8oz.cjs → Tooltip-CfqYTd5O.cjs} +1 -1
- package/dist/{dom-to-png-CHXF3z4X.cjs → dom-to-png-DgRl9bEH.cjs} +1 -1
- package/dist/{dom-to-png-JSc0Wutr.js → dom-to-png-IAiARGiU.js} +1 -1
- package/dist/{img-7aPSvY3c.js → img-DaDUVggy.js} +1 -1
- package/dist/{img-Czqt0BR-.cjs → img-DxEvbX77.cjs} +1 -1
- package/dist/{index-DooXAewR.js → index-BI6O7K58.js} +1 -1
- package/dist/{index-BzyzkUsY.cjs → index-DgIVCHLv.cjs} +1 -1
- package/dist/{pdf-CS-UdLZt.js → pdf-DBVNp7s2.js} +1 -1
- package/dist/{pdf-B9tvtSl9.cjs → pdf-Dq3h9PEr.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-CWnDOg1g.cjs → useNestedProp-CCR03NVM.cjs} +1 -1
- package/dist/{useNestedProp-CeA-IFZT.js → useNestedProp-Cvz4MkSy.js} +1 -1
- package/dist/{usePrinter-CBfmcTyQ.cjs → usePrinter-B2xVvtiy.cjs} +1 -1
- package/dist/{usePrinter-rVrVRW1p.js → usePrinter-Jr3eyr8H.js} +3 -3
- package/dist/{vue-data-ui-B7d3aUDp.cjs → vue-data-ui-DhWKehHS.cjs} +1 -1
- package/dist/{vue-data-ui-Tce5_-Eb.js → vue-data-ui-bm5wfGa_.js} +62 -62
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-gO5QnUl-.cjs → vue-ui-3d-bar-Bpm8dKya.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-B8Xjt8JB.js → vue-ui-3d-bar-CHOAZoDV.js} +9 -9
- package/dist/{vue-ui-accordion-B4ML49fc.cjs → vue-ui-accordion-DE1isSE9.cjs} +1 -1
- package/dist/{vue-ui-accordion-DLa3SOIQ.js → vue-ui-accordion-ldF7KsjV.js} +3 -3
- package/dist/{vue-ui-age-pyramid-DLDGvlfL.cjs → vue-ui-age-pyramid-BnHOxOPT.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-BRLXIdCs.js → vue-ui-age-pyramid-BuKSta-B.js} +10 -10
- package/dist/{vue-ui-annotator-DpgWa9Cn.cjs → vue-ui-annotator-B9j16TKW.cjs} +1 -1
- package/dist/{vue-ui-annotator-NtzLi6e5.js → vue-ui-annotator-BBuH-QB4.js} +2 -2
- package/dist/{vue-ui-bullet-oESdTIjM.js → vue-ui-bullet-B0C_rPTQ.js} +8 -8
- package/dist/{vue-ui-bullet-DIGwu5xc.cjs → vue-ui-bullet-CRChR0Qe.cjs} +1 -1
- package/dist/{vue-ui-candlestick-Dsb2-JRF.cjs → vue-ui-candlestick-Bq66GLxw.cjs} +1 -1
- package/dist/{vue-ui-candlestick-CnAI7klD.js → vue-ui-candlestick-By5MsCcS.js} +11 -11
- package/dist/{vue-ui-carousel-table-CAmFkQql.js → vue-ui-carousel-table-BOtjI2Ov.js} +4 -4
- package/dist/{vue-ui-carousel-table-DUu0feRu.cjs → vue-ui-carousel-table-CyywZulq.cjs} +1 -1
- package/dist/{vue-ui-chestnut-CCrwb8aH.js → vue-ui-chestnut-BS2kXrPU.js} +8 -8
- package/dist/{vue-ui-chestnut-Bkg_-3Jh.cjs → vue-ui-chestnut-D8QPZS8n.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-Baw5MjxR.js → vue-ui-circle-pack-C8m10WZ0.js} +9 -9
- package/dist/{vue-ui-circle-pack-D2LmdTWH.cjs → vue-ui-circle-pack-iOxdB75t.cjs} +1 -1
- package/dist/{vue-ui-cursor-BC3eK7ZM.js → vue-ui-cursor-Bn-CCFO0.js} +2 -2
- package/dist/{vue-ui-cursor-CfMz226i.cjs → vue-ui-cursor-Ccym3tFb.cjs} +1 -1
- package/dist/{vue-ui-dashboard-OU8D2OTa.cjs → vue-ui-dashboard-Cw4IXhXY.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BOU2cJ2b.js → vue-ui-dashboard-D-vs2N_7.js} +62 -62
- package/dist/{vue-ui-digits-DGQWpbm2.js → vue-ui-digits-BXBXg7wv.js} +2 -2
- package/dist/{vue-ui-digits-BSLSYNb7.cjs → vue-ui-digits-D66h3nUw.cjs} +1 -1
- package/dist/{vue-ui-donut-LglxgRri.js → vue-ui-donut-BGZIwC5D.js} +12 -12
- package/dist/{vue-ui-donut-DO9gOTvW.cjs → vue-ui-donut-Bf3THSxi.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-CGnR05_I.js → vue-ui-donut-evolution-5yOibvNM.js} +11 -11
- package/dist/{vue-ui-donut-evolution-jwuqDtAA.cjs → vue-ui-donut-evolution-xxrUJzgG.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-DkBWRski.js → vue-ui-dumbbell-C-KqKhxI.js} +10 -10
- package/dist/{vue-ui-dumbbell-CSE5loIk.cjs → vue-ui-dumbbell-CWn7cNsm.cjs} +1 -1
- package/dist/{vue-ui-flow-B2AXCnm5.js → vue-ui-flow-D4_2VnaB.js} +9 -9
- package/dist/{vue-ui-flow-tg58e_cr.cjs → vue-ui-flow-DFxWNRRJ.cjs} +1 -1
- package/dist/{vue-ui-funnel-DuzxYzyD.js → vue-ui-funnel-ADEjZ8yz.js} +9 -9
- package/dist/{vue-ui-funnel-DcQWW2NS.cjs → vue-ui-funnel-DIoqpwbm.cjs} +1 -1
- package/dist/{vue-ui-galaxy-ySnbPS-x.cjs → vue-ui-galaxy-BRle40mR.cjs} +1 -1
- package/dist/{vue-ui-galaxy-ESjv8ZqA.js → vue-ui-galaxy-DLtA9Ebb.js} +11 -11
- package/dist/{vue-ui-gauge-Bwo4YkkZ.cjs → vue-ui-gauge-B4vEWkRk.cjs} +1 -1
- package/dist/{vue-ui-gauge-vp6PLuJ2.js → vue-ui-gauge-BVj-IBdi.js} +7 -7
- package/dist/{vue-ui-gizmo-BrN-J1Ee.js → vue-ui-gizmo-BTe8CPyi.js} +3 -3
- package/dist/{vue-ui-gizmo-CddlRjeu.cjs → vue-ui-gizmo-BwBtkZ5z.cjs} +1 -1
- package/dist/{vue-ui-heatmap-CBRtJ8Cd.js → vue-ui-heatmap-DrXMOxbe.js} +10 -10
- package/dist/{vue-ui-heatmap-s-ma5UVQ.cjs → vue-ui-heatmap-VdFtflO6.cjs} +1 -1
- package/dist/{vue-ui-history-plot-Yc_8sbsM.cjs → vue-ui-history-plot-B-ScOcEy.cjs} +1 -1
- package/dist/{vue-ui-history-plot-CaZhV-nU.js → vue-ui-history-plot-_DfuZIMP.js} +11 -11
- package/dist/{vue-ui-kpi-IRvK3TS2.cjs → vue-ui-kpi-DSQV0Kf2.cjs} +1 -1
- package/dist/{vue-ui-kpi-CjkmnlkE.js → vue-ui-kpi-DfFiDtCP.js} +3 -3
- package/dist/{vue-ui-mini-loader-CYVzNUON.js → vue-ui-mini-loader-1JZipPcP.js} +2 -2
- package/dist/{vue-ui-mini-loader-BQzcs6uB.cjs → vue-ui-mini-loader-CDOlO_1_.cjs} +1 -1
- package/dist/{vue-ui-molecule-Bci1mou3.js → vue-ui-molecule-Db_C7mVS.js} +11 -11
- package/dist/{vue-ui-molecule-DJ5RuqdD.cjs → vue-ui-molecule-jEcRTe4V.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-CjKeANNT.cjs → vue-ui-mood-radar-BoKSTE-Y.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BQBLof4Z.js → vue-ui-mood-radar-m48vvkft.js} +11 -11
- package/dist/{vue-ui-nested-donuts-DrNhJSPg.js → vue-ui-nested-donuts-DNhMOryo.js} +11 -11
- package/dist/{vue-ui-nested-donuts-a1bC0MIy.cjs → vue-ui-nested-donuts-ihd00Tpn.cjs} +1 -1
- package/dist/{vue-ui-onion-Xy3gKPoa.cjs → vue-ui-onion-D9AHOWa5.cjs} +1 -1
- package/dist/{vue-ui-onion-S2zaH8gC.js → vue-ui-onion-YKxsqnI7.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-B1SL_FlT.js → vue-ui-parallel-coordinate-plot-7SCwFkrU.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-DlDkqRXZ.cjs → vue-ui-parallel-coordinate-plot-BmO6zenq.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BbI_WV9P.js → vue-ui-quadrant-Bi0by7IK.js} +12 -12
- package/dist/{vue-ui-quadrant-Er30dYmu.cjs → vue-ui-quadrant-CAJ4dTBu.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-F5MYUxBh.cjs → vue-ui-quick-chart-C37lGqa1.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-CuQeZuMv.js → vue-ui-quick-chart-DlV0Qv_x.js} +9 -9
- package/dist/{vue-ui-radar-ZGmdrOWg.js → vue-ui-radar-B14zLIww.js} +12 -12
- package/dist/{vue-ui-radar-ODXlpihN.cjs → vue-ui-radar-H08KmB3s.cjs} +1 -1
- package/dist/{vue-ui-rating-CGDzme3N.cjs → vue-ui-rating-CYarWaTf.cjs} +1 -1
- package/dist/{vue-ui-rating-kTiSrHnd.js → vue-ui-rating-CdSQUBG6.js} +2 -2
- package/dist/{vue-ui-relation-circle-Ciae1qCQ.cjs → vue-ui-relation-circle-A4Vw8kYl.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CbQYCuW1.js → vue-ui-relation-circle-IzAvPPGl.js} +7 -7
- package/dist/{vue-ui-ridgeline-BYyeFIhk.js → vue-ui-ridgeline-BF5X6KQR.js} +12 -12
- package/dist/{vue-ui-ridgeline-c1obnD3W.cjs → vue-ui-ridgeline-BaHgOn_p.cjs} +1 -1
- package/dist/{vue-ui-rings-DlT7Q9C_.js → vue-ui-rings-DUhnXy1h.js} +12 -12
- package/dist/{vue-ui-rings-JyiU6_sc.cjs → vue-ui-rings-DnVeMrOw.cjs} +1 -1
- package/dist/{vue-ui-scatter-ntN0LVrZ.js → vue-ui-scatter-D7bXuxob.js} +12 -12
- package/dist/{vue-ui-scatter-CuJCs6sT.cjs → vue-ui-scatter-DoGX7iHp.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CZb-ZjJ-.cjs → vue-ui-skeleton-DeEGdJEn.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BJBwGLvQ.js → vue-ui-skeleton-Dxm7rqic.js} +3 -3
- package/dist/{vue-ui-smiley-TZDNziHi.js → vue-ui-smiley-95l4UiqT.js} +2 -2
- package/dist/{vue-ui-smiley-BPtUaxih.cjs → vue-ui-smiley-DmAtXVht.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-bueclFIq.cjs → vue-ui-spark-trend-C3CO25Jy.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-Dcr7S70f.js → vue-ui-spark-trend-DdH43oVm.js} +5 -5
- package/dist/{vue-ui-sparkbar-BQlWKjxx.cjs → vue-ui-sparkbar-C2roDWfv.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CmMSpIWT.js → vue-ui-sparkbar-DTe3QrR3.js} +4 -4
- package/dist/{vue-ui-sparkgauge-BZyTGzW5.js → vue-ui-sparkgauge-BwclNj3C.js} +4 -4
- package/dist/{vue-ui-sparkgauge-B7nCrYcd.cjs → vue-ui-sparkgauge-nq6-9TjT.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-Dlnfvocd.cjs → vue-ui-sparkhistogram-BdWirDjI.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-C9a9yysC.js → vue-ui-sparkhistogram-Brau127G.js} +5 -5
- package/dist/{vue-ui-sparkline-BYXy4_ye.cjs → vue-ui-sparkline-B2mOJzkG.cjs} +1 -1
- package/dist/{vue-ui-sparkline-SWxohDk9.js → vue-ui-sparkline-qqfyQyVz.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-DLHaGMca.cjs → vue-ui-sparkstackbar-BJl9lbBp.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-B2kazMC5.js → vue-ui-sparkstackbar-DLlDU0B2.js} +5 -5
- package/dist/{vue-ui-stackbar-DFHLxQ-o.cjs → vue-ui-stackbar-CEvmDjq3.cjs} +1 -1
- package/dist/{vue-ui-stackbar-AvRusEob.js → vue-ui-stackbar-RRGnblUm.js} +13 -13
- package/dist/{vue-ui-strip-plot-ISii3FHM.js → vue-ui-strip-plot-C9LKjSkW.js} +11 -11
- package/dist/{vue-ui-strip-plot-BtqRC7h3.cjs → vue-ui-strip-plot-Dlsv-yRI.cjs} +1 -1
- package/dist/{vue-ui-table-DKsKbnap.js → vue-ui-table-DxdJ151X.js} +3 -3
- package/dist/{vue-ui-table-heatmap-C5G_CELV.cjs → vue-ui-table-heatmap-BhxOvDDW.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CLLk1u2z.js → vue-ui-table-heatmap-CzGeU_uL.js} +4 -4
- package/dist/{vue-ui-table-DeSxVc3g.cjs → vue-ui-table-qULtmHGA.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-5vuYcAME.cjs → vue-ui-table-sparkline-D1hriLB0.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BncY35Is.js → vue-ui-table-sparkline-DSZhEDKX.js} +5 -5
- package/dist/{vue-ui-thermometer-jm_63HZL.cjs → vue-ui-thermometer-Cvnh4jvE.cjs} +1 -1
- package/dist/{vue-ui-thermometer-xOTD55R3.js → vue-ui-thermometer-Pw4X3Bun.js} +7 -7
- package/dist/{vue-ui-timer-DmwSXmTW.cjs → vue-ui-timer-BlmIXPv6.cjs} +1 -1
- package/dist/{vue-ui-timer-m_ncHz58.js → vue-ui-timer-CvvexEeN.js} +5 -5
- package/dist/{vue-ui-tiremarks-0UU9Mw4i.cjs → vue-ui-tiremarks-BAkMBz3o.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-GaLo5qjV.js → vue-ui-tiremarks-DbZQvV_2.js} +7 -7
- package/dist/{vue-ui-treemap-CFSNLj9T.js → vue-ui-treemap-CF-RjM16.js} +12 -12
- package/dist/{vue-ui-treemap-BVFJiMAZ.cjs → vue-ui-treemap-a6b1vWy-.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-CWaIXNCd.cjs → vue-ui-vertical-bar-Dm5zMIeE.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-z2t7Pcta.js → vue-ui-vertical-bar-ZJbSI-xR.js} +12 -12
- package/dist/{vue-ui-waffle-B57vn44W.js → vue-ui-waffle-I9AKkwb4.js} +12 -12
- package/dist/{vue-ui-waffle-DFH1pRat.cjs → vue-ui-waffle-XNiw-qtb.cjs} +1 -1
- package/dist/{vue-ui-wheel-CeDuJhdJ.js → vue-ui-wheel-BA7wZUZL.js} +7 -7
- package/dist/{vue-ui-wheel-BInY09xB.cjs → vue-ui-wheel-DJUrO6CA.cjs} +1 -1
- package/dist/vue-ui-word-cloud-BVqb1Yix.js +648 -0
- package/dist/vue-ui-word-cloud-ByjkRq1g.cjs +1 -0
- package/dist/{vue-ui-world-KRmkbVed.cjs → vue-ui-world-9nlcZMH1.cjs} +1 -1
- package/dist/{vue-ui-world-OzkiVQUb.js → vue-ui-world-DkYRlp5s.js} +11 -11
- package/dist/{vue-ui-xy-CfE-caY1.js → vue-ui-xy-B1HwPMFi.js} +16 -16
- package/dist/{vue-ui-xy-vkK0CrKz.cjs → vue-ui-xy-B4sqGuw6.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-CkjbrUpb.cjs → vue-ui-xy-canvas-C-rykR_6.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-DtQzJAsY.js → vue-ui-xy-canvas-CGCtkn9g.js} +12 -12
- package/package.json +1 -1
- package/dist/PackageVersion-B5BeU3j9.cjs +0 -1
- package/dist/vue-ui-word-cloud-CrQ8lUc4.js +0 -630
- package/dist/vue-ui-word-cloud-OChNmjNF.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BzyzkUsY.cjs"),se=require("./useResponsive-DQmBAoBf.cjs"),Pe=require("./Title-CcgS3et4.cjs"),ue=require("./usePrinter-CBfmcTyQ.cjs"),_e=require("./Tooltip-DWCw-8oz.cjs"),$e=require("./vue-ui-sparkbar-BQlWKjxx.cjs"),Te=require("./Legend-DUY48WfL.cjs"),Ne=require("./DataTable-DSZwidNa.cjs"),xe=require("./vue-ui-skeleton-CZb-ZjJ-.cjs"),Se=require("./vue-ui-accordion-B4ML49fc.cjs"),ie=require("./useNestedProp-CWnDOg1g.cjs"),Ee=require("./PackageVersion-B5BeU3j9.cjs"),Ve=require("./PenAndPaper-Bt9JtDPx.cjs"),Oe=require("./useUserOptionState-BgepsfED.cjs"),Fe=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Le=["id"],ze=["xmlns","viewBox"],Ie=["width","height"],Re=["id"],qe=["stop-color"],Me=["stop-color"],Ue={key:1},De=["x1","y1","x2","y2","stroke","stroke-width"],Ge={key:0},We=["d","stroke","stroke-width"],He=["d","stroke","stroke-width"],je={key:2},Xe=["x","y","text-anchor","font-size","fill","onMouseenter"],Ye=["points","stroke","stroke-width"],Je=["points","stroke","stroke-width","fill"],Ke={key:3},Qe=["cx","cy","fill","r","stroke"],Ze={key:5,class:"vue-data-ui-watermark"},et=["onClick"],tt={key:0,style:{"max-width":"200px",margin:"0 auto"}},ot={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ce,{expose:de,emit:ve}){const{vue_ui_radar:pe}=n.useConfig(),d=ce,b=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),f=e.ref(n.createUid()),he=e.ref(null),T=e.ref(!1),N=e.ref(""),L=e.ref(0),C=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(null),M=e.ref(0),U=e.ref(0),D=e.ref(0),t=e.computed({get:()=>j(),set:o=>o}),{userOptionsVisible:x,setUserOptionsVisibility:G,keepUserOptionState:W}=Oe.useUserOptionState({config:t.value}),{svgRef:H}=Fe.useChartAccessibility({config:t.value.style.chart.title});function j(){const o=ie.useNestedProp({userConfig:d.config,defaultConfig:pe});return o.theme?{...ie.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=j(),x.value=!t.value.userOptions.showOnChartHover,X(),M.value+=1,U.value+=1,D.value+=1,p.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,p.value.showTable=t.value.table.show,p.value.showTooltip=t.value.style.chart.tootlip.show},{deep:!0});const B=e.ref(null);function X(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=se.throttle(()=>{const{width:a,height:l}=se.useResponsive({chart:C.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?I.value:null,source:R.value,noTitle:q.value});requestAnimationFrame(()=>{u.value.width=a,u.value.height=l})});B.value=new ResizeObserver(o),B.value.observe(C.value.parentNode)}}e.onMounted(()=>{X()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:Y,isImaging:J,generatePdf:K,generateImage:Q}=ue.usePrinter({elementId:`vue-ui-radar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar",options:t.value.userOptions.print}),ge=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Z=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),p=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),fe=e.computed(()=>({style:{backgroundColor:"#FFFFFF00",animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),u=e.ref({height:312,width:512}),me=ve,i=e.ref([]),w=e.ref(null),m=e.ref(!1);function ee(o){m.value=!0,i.value.includes(o)?(w.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{m.value=!1,w.value=null},500)):(i.value.push(o),setTimeout(()=>{m.value=!1},500)),me("selectLegend",y.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function ye(){return y.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${f.value}_${a}`,color:n.convertColorToHex(o.color)||Z.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),h=e.computed(()=>b.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Z.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${f.value}_${a}`,formatter:o.formatter||null})):[]),te=e.computed(()=>Math.max(...h.value.flatMap(o=>o.values))),oe=e.computed(()=>h.value.length),S=e.computed(()=>Math.min(u.value.width,u.value.height)/3),ae=e.computed(()=>n.createPolygonPath({plot:{x:u.value.width/2,y:u.value.height/2},radius:S.value,sides:oe.value,rotation:0})),ke=e.computed(()=>{const o=[];for(let a=0;a<S.value;a+=S.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),g=e.computed(()=>ae.value.coordinates.map((o,a)=>{const l=h.value[a].values.map(r=>be({centerX:u.value.width/2,centerY:u.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(h.value[a].target||te.value)}));return{...o,...h.value[a],plots:l}}));function E({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>u.value.width/2&&(o+=12,l="start"),o<u.value.width/2&&(o-=12,l="end"),a>u.value.height/2&&(a+=20),a<u.value.height/2&&(a-=12),a===u.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function be({centerX:o,centerY:a,apexX:l,apexY:r,proportion:s}){return{x:o+(l-o)*s,y:a+(r-a)*s}}const y=e.computed(()=>{const o=h.value.map((a,l)=>a.values.map(r=>r/(a.target||te.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,s)=>r+s,0)/h.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>ee(l),isSegregated:i.value.includes(l)}))}),Ce=e.computed(()=>({cy:"radar-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":""})),P=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...y.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((s,c)=>`${n.applyDataLabel(r.formatter,s,n.dataLabel({p:v.value[c].prefix,v:s,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(s/r.target)?"":n.dataLabel({v:s/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:a,config:l,colNames:o}}),_=e.ref(null),V=e.ref([]),O=e.ref(null);function we(o,a){V.value=[],_.value=a,T.value=!0;let l="";O.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let s=0;s<o.values.length;s+=1)i.value.includes(s)||V.value.push({name:v.value[s].name,value:o.values[s]/o.target*100,color:v.value[s].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[s].prefix??"",v:o.values[s],s:v.value[s].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function le(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...y.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,lt)=>[c.name,c.target,...c.values.flatMap(A=>[A,isNaN(A/c.target)?"":A/c.target*100])]),r=o.concat([a]).concat(l),s=n.createCsvContent(r);n.downloadCsv({csvContent:s,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const k=e.ref(!1);function Be(o){k.value=o,L.value+=1}function re(){p.value.showTable=!p.value.showTable}function ne(){p.value.showTooltip=!p.value.showTooltip}const $=e.ref(!1);function F(){$.value=!$.value}return de({getData:ye,generatePdf:K,generateCsv:le,generateImage:Q,toggleTable:re,toggleTooltip:ne,toggleAnnotator:F}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${k.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:C,id:`vue-ui-radar_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[3]||(a[3]=()=>e.unref(G)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(G)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ve._sfc_main,{key:0,svgRef:e.unref(H),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:F},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ge.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:q,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Pe._sfc_main,{key:`title_${M.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(W)||e.unref(x))?(e.openBlock(),e.createBlock(ue.UserOptions,{ref_key:"details",ref:he,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(J),isPrinting:e.unref(Y),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:Be,onGeneratePdf:e.unref(K),onGenerateCsv:le,onGenerateImage:e.unref(Q),onToggleTable:re,onToggleTooltip:ne,onToggleAnnotator:F,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(x)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:r})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:H,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ee._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Ie)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Me)],8,Re))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.width/2,y1:u.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,De))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:u.value.width/2,y:u.value.height/2},radius:l,sides:oe.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,We))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:ae.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,He),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:E(l).x,y:E(l).y,"text-anchor":E(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:s=>we(l,r),onMouseleave:a[0]||(a[0]=s=>{T.value=!1,_.value=null})},e.toDisplayString(l.name),41,Xe))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(n.makePath)(g.value.map(s=>s.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===r&&t.value.useCssAnimation})},null,10,Ye)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,points:e.unref(n.makePath)(g.value.map(s=>s.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${f.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===r&&t.value.useCssAnimation})},null,10,Je)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(s,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:_.value!==null&&_.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===c&&t.value.useCssAnimation})},null,10,Qe))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:u.value},void 0,!0)],14,ze)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ze,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Te.Legend,{key:`legend_${D.value}`,legendSet:y.value,config:Ce.value,onClickMarker:a[1]||(a[1]=({i:l})=>ee(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,et)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:y.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:R,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(_e._sfc_main,{show:p.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,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,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:N.value,isFullscreen:k.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",tt,[e.createVNode($e.default,{dataset:V.value,config:fe.value,backgroundOpacity:0},null,8,["dataset","config"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isFullscreen","isCustom"]),b.value?(e.openBlock(),e.createBlock(Se.default,{key:8,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ne.DataTable,{key:`table_${U.value}`,colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Le))}},at=Ae._export_sfc(ot,[["__scopeId","data-v-b6116edd"]]);exports.default=at;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DgIVCHLv.cjs"),se=require("./useResponsive-DQmBAoBf.cjs"),Pe=require("./Title-Bae0QJu7.cjs"),ue=require("./usePrinter-B2xVvtiy.cjs"),_e=require("./Tooltip-CfqYTd5O.cjs"),$e=require("./vue-ui-sparkbar-C2roDWfv.cjs"),Te=require("./Legend-B9aoKeq3.cjs"),Ne=require("./DataTable-CGucPqAQ.cjs"),xe=require("./vue-ui-skeleton-DeEGdJEn.cjs"),Se=require("./vue-ui-accordion-DE1isSE9.cjs"),ie=require("./useNestedProp-CCR03NVM.cjs"),Ee=require("./PackageVersion-C2bjLIu9.cjs"),Ve=require("./PenAndPaper-CJIFAI78.cjs"),Oe=require("./useUserOptionState-BgepsfED.cjs"),Fe=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Le=["id"],ze=["xmlns","viewBox"],Ie=["width","height"],Re=["id"],qe=["stop-color"],Me=["stop-color"],Ue={key:1},De=["x1","y1","x2","y2","stroke","stroke-width"],Ge={key:0},We=["d","stroke","stroke-width"],He=["d","stroke","stroke-width"],je={key:2},Xe=["x","y","text-anchor","font-size","fill","onMouseenter"],Ye=["points","stroke","stroke-width"],Je=["points","stroke","stroke-width","fill"],Ke={key:3},Qe=["cx","cy","fill","r","stroke"],Ze={key:5,class:"vue-data-ui-watermark"},et=["onClick"],tt={key:0,style:{"max-width":"200px",margin:"0 auto"}},ot={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ce,{expose:de,emit:ve}){const{vue_ui_radar:pe}=n.useConfig(),d=ce,b=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),f=e.ref(n.createUid()),he=e.ref(null),T=e.ref(!1),N=e.ref(""),L=e.ref(0),C=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(null),M=e.ref(0),U=e.ref(0),D=e.ref(0),t=e.computed({get:()=>j(),set:o=>o}),{userOptionsVisible:x,setUserOptionsVisibility:G,keepUserOptionState:W}=Oe.useUserOptionState({config:t.value}),{svgRef:H}=Fe.useChartAccessibility({config:t.value.style.chart.title});function j(){const o=ie.useNestedProp({userConfig:d.config,defaultConfig:pe});return o.theme?{...ie.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=j(),x.value=!t.value.userOptions.showOnChartHover,X(),M.value+=1,U.value+=1,D.value+=1,p.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,p.value.showTable=t.value.table.show,p.value.showTooltip=t.value.style.chart.tootlip.show},{deep:!0});const B=e.ref(null);function X(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=se.throttle(()=>{const{width:a,height:l}=se.useResponsive({chart:C.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?I.value:null,source:R.value,noTitle:q.value});requestAnimationFrame(()=>{u.value.width=a,u.value.height=l})});B.value=new ResizeObserver(o),B.value.observe(C.value.parentNode)}}e.onMounted(()=>{X()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:Y,isImaging:J,generatePdf:K,generateImage:Q}=ue.usePrinter({elementId:`vue-ui-radar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar",options:t.value.userOptions.print}),ge=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Z=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),p=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),fe=e.computed(()=>({style:{backgroundColor:"#FFFFFF00",animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),u=e.ref({height:312,width:512}),me=ve,i=e.ref([]),w=e.ref(null),m=e.ref(!1);function ee(o){m.value=!0,i.value.includes(o)?(w.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{m.value=!1,w.value=null},500)):(i.value.push(o),setTimeout(()=>{m.value=!1},500)),me("selectLegend",y.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function ye(){return y.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${f.value}_${a}`,color:n.convertColorToHex(o.color)||Z.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),h=e.computed(()=>b.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Z.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${f.value}_${a}`,formatter:o.formatter||null})):[]),te=e.computed(()=>Math.max(...h.value.flatMap(o=>o.values))),oe=e.computed(()=>h.value.length),S=e.computed(()=>Math.min(u.value.width,u.value.height)/3),ae=e.computed(()=>n.createPolygonPath({plot:{x:u.value.width/2,y:u.value.height/2},radius:S.value,sides:oe.value,rotation:0})),ke=e.computed(()=>{const o=[];for(let a=0;a<S.value;a+=S.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),g=e.computed(()=>ae.value.coordinates.map((o,a)=>{const l=h.value[a].values.map(r=>be({centerX:u.value.width/2,centerY:u.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(h.value[a].target||te.value)}));return{...o,...h.value[a],plots:l}}));function E({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>u.value.width/2&&(o+=12,l="start"),o<u.value.width/2&&(o-=12,l="end"),a>u.value.height/2&&(a+=20),a<u.value.height/2&&(a-=12),a===u.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function be({centerX:o,centerY:a,apexX:l,apexY:r,proportion:s}){return{x:o+(l-o)*s,y:a+(r-a)*s}}const y=e.computed(()=>{const o=h.value.map((a,l)=>a.values.map(r=>r/(a.target||te.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,s)=>r+s,0)/h.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>ee(l),isSegregated:i.value.includes(l)}))}),Ce=e.computed(()=>({cy:"radar-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":""})),P=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...y.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((s,c)=>`${n.applyDataLabel(r.formatter,s,n.dataLabel({p:v.value[c].prefix,v:s,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(s/r.target)?"":n.dataLabel({v:s/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:a,config:l,colNames:o}}),_=e.ref(null),V=e.ref([]),O=e.ref(null);function we(o,a){V.value=[],_.value=a,T.value=!0;let l="";O.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let s=0;s<o.values.length;s+=1)i.value.includes(s)||V.value.push({name:v.value[s].name,value:o.values[s]/o.target*100,color:v.value[s].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[s].prefix??"",v:o.values[s],s:v.value[s].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function le(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...y.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,lt)=>[c.name,c.target,...c.values.flatMap(A=>[A,isNaN(A/c.target)?"":A/c.target*100])]),r=o.concat([a]).concat(l),s=n.createCsvContent(r);n.downloadCsv({csvContent:s,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const k=e.ref(!1);function Be(o){k.value=o,L.value+=1}function re(){p.value.showTable=!p.value.showTable}function ne(){p.value.showTooltip=!p.value.showTooltip}const $=e.ref(!1);function F(){$.value=!$.value}return de({getData:ye,generatePdf:K,generateCsv:le,generateImage:Q,toggleTable:re,toggleTooltip:ne,toggleAnnotator:F}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${k.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:C,id:`vue-ui-radar_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[3]||(a[3]=()=>e.unref(G)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(G)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ve._sfc_main,{key:0,svgRef:e.unref(H),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:F},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ge.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:q,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Pe._sfc_main,{key:`title_${M.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(W)||e.unref(x))?(e.openBlock(),e.createBlock(ue.UserOptions,{ref_key:"details",ref:he,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(J),isPrinting:e.unref(Y),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:Be,onGeneratePdf:e.unref(K),onGenerateCsv:le,onGenerateImage:e.unref(Q),onToggleTable:re,onToggleTooltip:ne,onToggleAnnotator:F,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(x)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:r})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:H,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ee._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Ie)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Me)],8,Re))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.width/2,y1:u.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,De))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:u.value.width/2,y:u.value.height/2},radius:l,sides:oe.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,We))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:ae.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,He),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:E(l).x,y:E(l).y,"text-anchor":E(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:s=>we(l,r),onMouseleave:a[0]||(a[0]=s=>{T.value=!1,_.value=null})},e.toDisplayString(l.name),41,Xe))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(n.makePath)(g.value.map(s=>s.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===r&&t.value.useCssAnimation})},null,10,Ye)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,points:e.unref(n.makePath)(g.value.map(s=>s.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${f.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===r&&t.value.useCssAnimation})},null,10,Je)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(s,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:_.value!==null&&_.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===c&&t.value.useCssAnimation})},null,10,Qe))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:u.value},void 0,!0)],14,ze)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ze,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Te.Legend,{key:`legend_${D.value}`,legendSet:y.value,config:Ce.value,onClickMarker:a[1]||(a[1]=({i:l})=>ee(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,et)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:y.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:R,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(_e._sfc_main,{show:p.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,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,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:N.value,isFullscreen:k.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",tt,[e.createVNode($e.default,{dataset:V.value,config:fe.value,backgroundOpacity:0},null,8,["dataset","config"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isFullscreen","isCustom"]),b.value?(e.openBlock(),e.createBlock(Se.default,{key:8,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ne.DataTable,{key:`table_${U.value}`,colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Le))}},at=Ae._export_sfc(ot,[["__scopeId","data-v-b6116edd"]]);exports.default=at;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-BzyzkUsY.cjs"),F=require("./useNestedProp-CWnDOg1g.cjs"),A=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),R={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},j={key:0,style:{position:"relative"}},O={key:0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}},X={key:1,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}},I=["src","height","width"],Y=["xmlns","height","width"],G=["id"],P=["stop-color"],U=["stop-color"],q=["points","fill","stroke","stroke-width"],H=["src","alt","height","width","id"],K=["xmlns","viewBox","height","id"],T=["id"],W=["stop-color"],J=["stop-color"],Q=["points","fill","stroke"],Z=["xmlns","height"],ee=["onClick","onMouseenter","onFocus","onKeyup"],te=["onMouseenter","onFocus"],le={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(S,{expose:_,emit:z}){const{vue_ui_rating:w}=a.useConfig(),i=S,v=e.ref(a.createUid()),g=e.ref(!1),r=e.ref(void 0),y=e.ref(void 0),p=e.ref([]),B=e.useSlots();e.onMounted(()=>{B["chart-background"]&&console.warn("VueUiRating does not support the #chart-background slot.")});const V=z,t=e.computed({get:()=>m(),set:o=>o});function m(){return F.useNestedProp({userConfig:i.config,defaultConfig:w})}e.watch(()=>i.config,o=>{t.value=m(),k()},{deep:!0});const N=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?E(i.dataset.rating):i.dataset.rating),C=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),u=e.ref(N.value),h=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function E(o){let n=0,l=0;for(const s in o){const D=parseInt(s),x=o[s];n+=D*x,l+=x}if(l===0)return 0;const d=n/l;return Math.min(t.value.to,Math.max(t.value.from,d))}e.onMounted(()=>{k()});function k(){(!Object.hasOwn(i.dataset,"rating")||a.objectIsEmpty(i.dataset))&&a.error({componentName:"VueUiRating",type:"datasetAttribute",property:"rating"}),p.value=[];for(let o=t.value.from;o<=t.value.to;o+=1)p.value.push(o)}function f(o,n=!1){return o>r.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${v.value})`:t.value.style.star.activeColor}function $(o,n=!1){const l=u.value-o,d=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*d;default:return l*d}}function b(o){c.value||(u.value=o,V("rate",o))}function L(){return u.value}function M(o=!0){c.value=o}return _({getData:L,toggleReadonly:M}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[4]||(n[4]=l=>g.value=!0),onMouseleave:n[5]||(n[5]=l=>{g.value=!1,r.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",R,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(l,d)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[o.$slots["layer-under"]||o.$slots["layer-above"]?(e.openBlock(),e.createElementBlock("div",j,[o.$slots["layer-under"]?(e.openBlock(),e.createElementBlock("div",O,[e.renderSlot(o.$slots,"layer-under",e.mergeProps({ref_for:!0},{value:l,size:t.value.style.itemSize,hoveredValue:r.value,focusedValue:y.value}),void 0,!0)])):e.createCommentVNode("",!0),o.$slots["layer-above"]?(e.openBlock(),e.createElementBlock("div",X,[e.renderSlot(o.$slots,"layer-above",e.mergeProps({ref_for:!0},{value:l,size:t.value.style.itemSize,hoveredValue:r.value,focusedValue:y.value}),void 0,!0)])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(r.value)?t.value.style.image.inactiveOpacity:f(l,!0)}`)},null,12,I)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,U)],8,G)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(r.value)?t.value.style.star.inactiveColor:f(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:r.value?f(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,q)],8,Y)),h.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${v.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${$(d,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,H)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${$(d)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${v.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,W),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,J)],8,T)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${v.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,Q)],8,K))],64)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:s=>b(l),onMouseenter:s=>r.value=l,onMouseleave:n[0]||(n[0]=s=>r.value=void 0),onFocus:s=>y.value=l,onBlur:n[1]||(n[1]=s=>y.value=void 0),tabindex:"0",onKeyup:e.withKeys(s=>b(l),["enter"])},null,40,ee)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:s=>r.value=l,onMouseleave:n[2]||(n[2]=s=>r.value=void 0),onFocus:s=>y.value=l,onBlur:n[3]||(n[3]=s=>y.value=void 0)},null,40,te)):e.createCommentVNode("",!0)],12,Z)),t.value.style.tooltip.show&&C.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${r.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(a.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},oe=A._export_sfc(le,[["__scopeId","data-v-e9ed619f"]]);exports.default=oe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-DgIVCHLv.cjs"),F=require("./useNestedProp-CCR03NVM.cjs"),A=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),R={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},j={key:0,style:{position:"relative"}},O={key:0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}},X={key:1,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}},I=["src","height","width"],Y=["xmlns","height","width"],G=["id"],P=["stop-color"],U=["stop-color"],q=["points","fill","stroke","stroke-width"],H=["src","alt","height","width","id"],K=["xmlns","viewBox","height","id"],T=["id"],W=["stop-color"],J=["stop-color"],Q=["points","fill","stroke"],Z=["xmlns","height"],ee=["onClick","onMouseenter","onFocus","onKeyup"],te=["onMouseenter","onFocus"],le={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(S,{expose:_,emit:z}){const{vue_ui_rating:w}=a.useConfig(),i=S,v=e.ref(a.createUid()),g=e.ref(!1),r=e.ref(void 0),y=e.ref(void 0),p=e.ref([]),B=e.useSlots();e.onMounted(()=>{B["chart-background"]&&console.warn("VueUiRating does not support the #chart-background slot.")});const V=z,t=e.computed({get:()=>m(),set:o=>o});function m(){return F.useNestedProp({userConfig:i.config,defaultConfig:w})}e.watch(()=>i.config,o=>{t.value=m(),k()},{deep:!0});const N=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?E(i.dataset.rating):i.dataset.rating),C=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),u=e.ref(N.value),h=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function E(o){let n=0,l=0;for(const s in o){const D=parseInt(s),x=o[s];n+=D*x,l+=x}if(l===0)return 0;const d=n/l;return Math.min(t.value.to,Math.max(t.value.from,d))}e.onMounted(()=>{k()});function k(){(!Object.hasOwn(i.dataset,"rating")||a.objectIsEmpty(i.dataset))&&a.error({componentName:"VueUiRating",type:"datasetAttribute",property:"rating"}),p.value=[];for(let o=t.value.from;o<=t.value.to;o+=1)p.value.push(o)}function f(o,n=!1){return o>r.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${v.value})`:t.value.style.star.activeColor}function $(o,n=!1){const l=u.value-o,d=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*d;default:return l*d}}function b(o){c.value||(u.value=o,V("rate",o))}function L(){return u.value}function M(o=!0){c.value=o}return _({getData:L,toggleReadonly:M}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[4]||(n[4]=l=>g.value=!0),onMouseleave:n[5]||(n[5]=l=>{g.value=!1,r.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",R,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(l,d)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[o.$slots["layer-under"]||o.$slots["layer-above"]?(e.openBlock(),e.createElementBlock("div",j,[o.$slots["layer-under"]?(e.openBlock(),e.createElementBlock("div",O,[e.renderSlot(o.$slots,"layer-under",e.mergeProps({ref_for:!0},{value:l,size:t.value.style.itemSize,hoveredValue:r.value,focusedValue:y.value}),void 0,!0)])):e.createCommentVNode("",!0),o.$slots["layer-above"]?(e.openBlock(),e.createElementBlock("div",X,[e.renderSlot(o.$slots,"layer-above",e.mergeProps({ref_for:!0},{value:l,size:t.value.style.itemSize,hoveredValue:r.value,focusedValue:y.value}),void 0,!0)])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(r.value)?t.value.style.image.inactiveOpacity:f(l,!0)}`)},null,12,I)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,U)],8,G)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(r.value)?t.value.style.star.inactiveColor:f(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:r.value?f(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,q)],8,Y)),h.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${v.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${$(d,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,H)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${$(d)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${v.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,W),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,J)],8,T)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${v.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,Q)],8,K))],64)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:s=>b(l),onMouseenter:s=>r.value=l,onMouseleave:n[0]||(n[0]=s=>r.value=void 0),onFocus:s=>y.value=l,onBlur:n[1]||(n[1]=s=>y.value=void 0),tabindex:"0",onKeyup:e.withKeys(s=>b(l),["enter"])},null,40,ee)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:s=>r.value=l,onMouseleave:n[2]||(n[2]=s=>r.value=void 0),onFocus:s=>y.value=l,onBlur:n[3]||(n[3]=s=>y.value=void 0)},null,40,te)):e.createCommentVNode("",!0)],12,Z)),t.value.style.tooltip.show&&C.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${r.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(a.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},oe=A._export_sfc(le,[["__scopeId","data-v-e9ed619f"]]);exports.default=oe;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as $, useSlots as J, onMounted as R, computed as x, watch as Q, createElementBlock as o, openBlock as a, normalizeStyle as s, createCommentVNode as p, createElementVNode as r, toDisplayString as f, unref as n, Fragment as B, renderList as Z, renderSlot as j, mergeProps as O, withKeys as ee } from "vue";
|
|
2
|
-
import { u as te, c as le, o as oe, e as ae, i as b, f as _, X as z, w as X, W as I } from "./index-
|
|
3
|
-
import { u as ie } from "./useNestedProp-
|
|
2
|
+
import { u as te, c as le, o as oe, e as ae, i as b, f as _, X as z, w as X, W as I } from "./index-BI6O7K58.js";
|
|
3
|
+
import { u as ie } from "./useNestedProp-Cvz4MkSy.js";
|
|
4
4
|
import { _ as se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const ne = {
|
|
6
6
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BzyzkUsY.cjs"),ee=require("./useResponsive-DQmBAoBf.cjs"),Be=require("./Title-CcgS3et4.cjs"),te=require("./usePrinter-CBfmcTyQ.cjs"),$e=require("./vue-ui-skeleton-CZb-ZjJ-.cjs"),le=require("./useNestedProp-CWnDOg1g.cjs"),_e=require("./PackageVersion-B5BeU3j9.cjs"),Pe=require("./PenAndPaper-Bt9JtDPx.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Ee=["xmlns","viewBox"],Ae=["width","height"],Ne=["cx","cy","r","stroke","stroke-width"],Ie={key:1},Ve=["stroke","d","stroke-width"],Fe={style:{"pointer-events":"none"}},Me=["cx","cy","fill","r","stroke"],Re=["x","y","fill","font-size"],Te={key:2},qe=["stroke","stroke-width","x1","x2","y1","y2"],je={style:{"pointer-events":"none"}},De=["cx","cy","fill","r","stroke"],Ue=["x","y","fill","font-size"],Ge=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],We=["cx","cy","fill","stroke","onClick","r"],Ye={key:5,class:"vue-data-ui-watermark"},Xe={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(re,{expose:ne}){e.useCssVars(t=>({cc1109c8:ce.value,fd19c20a:ue.value,"0d0b359d":de.value}));const{vue_ui_relation_circle:oe}=s.useConfig(),y=re,$=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),w=e.ref(s.createUid()),E=e.ref(0),b=e.ref(null),A=e.ref(null),N=e.ref(null),I=e.ref(null),V=e.ref(0),r=e.computed({get:()=>T(),set:t=>t}),{userOptionsVisible:_,setUserOptionsVisibility:F,keepUserOptionState:M}=Le.useUserOptionState({config:r.value}),{svgRef:R}=ze.useChartAccessibility({config:r.value.style.title});function T(){const t=le.useNestedProp({userConfig:y.config,defaultConfig:oe});return t.theme?{...le.useNestedProp({userConfig:s.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>y.config,t=>{r.value=T(),_.value=!r.value.userOptions.showOnChartHover,X(),V.value+=1},{deep:!0});const{isPrinting:q,isImaging:j,generatePdf:D,generateImage:U}=te.usePrinter({elementId:`relation_circle_${w.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle",options:r.value.userOptions.print}),se=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),G=e.computed(()=>s.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),i=e.ref({}),v=e.ref([]),ae=e.ref(0),P=e.computed(()=>y.dataset.slice(0,r.value.style.limit)),k=e.ref(r.value.style.size),f=e.ref(r.value.style.weightLabels.size),W=e.ref(r.value.style.plot.radius),Y=e.ref(r.value.style.labels.fontSize),a=e.ref({height:r.value.style.size,width:r.value.style.size}),m=e.computed({get(){return k.value*r.value.style.circle.radiusProportion},set(t){return t}}),ie=e.computed(()=>r.value.style.links.curved),ue=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ce=e.computed(()=>m.value*2),de=e.computed(()=>m.value*4),x=e.ref(null);e.onMounted(()=>{X(),document.getElementById(`relation_circle_${w.value}`).addEventListener("click",H)});function X(){if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{s.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{s.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=ee.throttle(()=>{const{width:n,height:l}=ee.useResponsive({chart:b.value,title:r.value.style.title.text?A.value:null,source:N.value,noTitle:I.value});requestAnimationFrame(()=>{k.value=Math.min(n,l),a.value.width=n,a.value.height=l,m.value=k.value*r.value.style.circle.radiusProportion,h.value=[],d.value=[],J(),K(),f.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),W.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),Y.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})})});x.value=new ResizeObserver(t),x.value.observe(b.value.parentNode)}else h.value=[],d.value=[],J(),K()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${w.value}`).removeEventListener("click",H),x.value&&x.value.disconnect()});function H(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(i.value={},v.value=[])}function J(){const t=6.28319/P.value.length,n=360/P.value.length;let l=0,o=0;P.value.forEach((c,u)=>{const O=c.weights.reduce((xe,Ce)=>xe+Ce,0),S=m.value*Math.cos(l)+a.value.width/2,be=m.value*Math.sin(l)+a.value.height/2+r.value.style.circle.offsetY;h.value.push({x:S,y:be,...c,color:c.color?c.color:G.value[u]?G.value[u]:s.palette[u],regAngle:o,totalWeight:O}),l+=t,o+=n})}function ve(t,n){const l=(t.x+n.x)/2,o=(t.y+n.y)/2;return{x:l,y:o}}function K(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,o)=>{const c=l.relations.indexOf(t.id);d.value.push({weight:l.weights[c]?l.weights[c]:0,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,midPointLine:ve({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:fe({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function fe(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},o={x:t.x1,y:t.y1},c={x:a.value.width/2,y:a.value.height/2+r.value.style.circle.offsetY},u=.5,O=Math.pow(1-u,3)*n.x+3*Math.pow(1-u,2)*u*o.x+3*(1-u)*Math.pow(u,2)*c.x+Math.pow(u,3)*l.x,S=Math.pow(1-u,3)*n.y+3*Math.pow(1-u,2)*u*o.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:O,y:S}}const ye=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function ge(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function g(t){return t.colorSource}function Q(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function p(t){return Object.hasOwn(i.value,"x")?!!(v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`):!1}function he(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function me(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function ke(t){return Object.hasOwn(i.value,"x")?i.value.id===t.id||v.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function pe(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function Z(t){ae.value=360-t.regAngle,i.value.id&&t.id===i.value.id?(i.value={},v.value=[]):(i.value=t,v.value=[...t.relations])}function L(t){const n=t.weight/ye.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function we(t){C.value=t,E.value+=1}const B=e.ref(!1);function z(){B.value=!B.value}return ne({generatePdf:D,generateImage:U,toggleAnnotator:z}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:b,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${w.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref(F)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(F)(!1))},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe._sfc_main,{key:0,svgRef:e.unref(R),backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:z},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:I,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Be._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&$.value&&(e.unref(M)||e.unref(_))?(e.openBlock(),e.createBlock(te.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(q),isImaging:e.unref(j),uid:w.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:C.value,titles:{...r.value.userOptions.buttonTitles},chartElement:b.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:we,onGeneratePdf:e.unref(D),onGenerateImage:e.unref(U),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:o})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:o})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"3"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:R,xmlns:e.unref(s.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value},"relation-circle"]),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode(_e._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:a.value.width<=0?10:a.value.width,height:a.value.height<=0?10:a.value.height,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,Ae)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:(a.value.width<=0?1e-4:a.value.width)/2,cy:(a.value.height<=0?1e-4:a.value.height)/2+r.value.style.circle.offsetY,r:m.value<=0?1e-4:m.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,Ne),ie.value?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${o}`,style:e.normalizeStyle(Q(l)),stroke:g(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${a.value.width/2},${a.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,Ve))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",Fe,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.mergeProps({key:0,ref_for:!0},{x:l.midPointBezier.x,y:l.midPointBezier.y,color:g(l),weight:l.weight,fontSize:f.value}),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointBezier.x,cy:l.midPointBezier.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Me)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointBezier.x,y:l.midPointBezier.y+f.value/3,fill:e.unref(s.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Re)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${o}`,stroke:g(l),"stroke-width":L(l),style:e.normalizeStyle(Q(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}),"stroke-linecap":"round"},null,14,qe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",je,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.mergeProps({key:0,ref_for:!0},{x:l.midPointLine.x,y:l.midPointLine.y,color:g(l),weight:l.weight,fontSize:f.value}),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointLine.x,cy:l.midPointLine.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,De)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointLine.x,y:l.midPointLine.y+f.value/3,fill:e.unref(s.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Ue)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${o}`,"text-anchor":he(l),transform:pe(l),x:me(l),y:l.y+5,onClick:c=>Z(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":i.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${ke(l)}`),"font-size":Y.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,Ge))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${o}`,style:e.normalizeStyle(ge(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.useSerieColor?l.color:r.value.style.plot.color,stroke:r.value.style.backgroundColor,"stroke-width":"1",onClick:c=>Z(l),r:W.value},null,12,We))),128)),e.renderSlot(t.$slots,"svg",{svg:a.value},void 0,!0)],10,Ee)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],44,Se))}},He=Oe._export_sfc(Xe,[["__scopeId","data-v-1f567c99"]]);exports.default=He;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DgIVCHLv.cjs"),ee=require("./useResponsive-DQmBAoBf.cjs"),Be=require("./Title-Bae0QJu7.cjs"),te=require("./usePrinter-B2xVvtiy.cjs"),$e=require("./vue-ui-skeleton-DeEGdJEn.cjs"),le=require("./useNestedProp-CCR03NVM.cjs"),_e=require("./PackageVersion-C2bjLIu9.cjs"),Pe=require("./PenAndPaper-CJIFAI78.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Ee=["xmlns","viewBox"],Ae=["width","height"],Ne=["cx","cy","r","stroke","stroke-width"],Ie={key:1},Ve=["stroke","d","stroke-width"],Fe={style:{"pointer-events":"none"}},Me=["cx","cy","fill","r","stroke"],Re=["x","y","fill","font-size"],Te={key:2},qe=["stroke","stroke-width","x1","x2","y1","y2"],je={style:{"pointer-events":"none"}},De=["cx","cy","fill","r","stroke"],Ue=["x","y","fill","font-size"],Ge=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],We=["cx","cy","fill","stroke","onClick","r"],Ye={key:5,class:"vue-data-ui-watermark"},Xe={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(re,{expose:ne}){e.useCssVars(t=>({cc1109c8:ce.value,fd19c20a:ue.value,"0d0b359d":de.value}));const{vue_ui_relation_circle:oe}=s.useConfig(),y=re,$=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),w=e.ref(s.createUid()),E=e.ref(0),b=e.ref(null),A=e.ref(null),N=e.ref(null),I=e.ref(null),V=e.ref(0),r=e.computed({get:()=>T(),set:t=>t}),{userOptionsVisible:_,setUserOptionsVisibility:F,keepUserOptionState:M}=Le.useUserOptionState({config:r.value}),{svgRef:R}=ze.useChartAccessibility({config:r.value.style.title});function T(){const t=le.useNestedProp({userConfig:y.config,defaultConfig:oe});return t.theme?{...le.useNestedProp({userConfig:s.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>y.config,t=>{r.value=T(),_.value=!r.value.userOptions.showOnChartHover,X(),V.value+=1},{deep:!0});const{isPrinting:q,isImaging:j,generatePdf:D,generateImage:U}=te.usePrinter({elementId:`relation_circle_${w.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle",options:r.value.userOptions.print}),se=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),G=e.computed(()=>s.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),i=e.ref({}),v=e.ref([]),ae=e.ref(0),P=e.computed(()=>y.dataset.slice(0,r.value.style.limit)),k=e.ref(r.value.style.size),f=e.ref(r.value.style.weightLabels.size),W=e.ref(r.value.style.plot.radius),Y=e.ref(r.value.style.labels.fontSize),a=e.ref({height:r.value.style.size,width:r.value.style.size}),m=e.computed({get(){return k.value*r.value.style.circle.radiusProportion},set(t){return t}}),ie=e.computed(()=>r.value.style.links.curved),ue=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ce=e.computed(()=>m.value*2),de=e.computed(()=>m.value*4),x=e.ref(null);e.onMounted(()=>{X(),document.getElementById(`relation_circle_${w.value}`).addEventListener("click",H)});function X(){if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{s.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{s.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=ee.throttle(()=>{const{width:n,height:l}=ee.useResponsive({chart:b.value,title:r.value.style.title.text?A.value:null,source:N.value,noTitle:I.value});requestAnimationFrame(()=>{k.value=Math.min(n,l),a.value.width=n,a.value.height=l,m.value=k.value*r.value.style.circle.radiusProportion,h.value=[],d.value=[],J(),K(),f.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),W.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),Y.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})})});x.value=new ResizeObserver(t),x.value.observe(b.value.parentNode)}else h.value=[],d.value=[],J(),K()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${w.value}`).removeEventListener("click",H),x.value&&x.value.disconnect()});function H(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(i.value={},v.value=[])}function J(){const t=6.28319/P.value.length,n=360/P.value.length;let l=0,o=0;P.value.forEach((c,u)=>{const O=c.weights.reduce((xe,Ce)=>xe+Ce,0),S=m.value*Math.cos(l)+a.value.width/2,be=m.value*Math.sin(l)+a.value.height/2+r.value.style.circle.offsetY;h.value.push({x:S,y:be,...c,color:c.color?c.color:G.value[u]?G.value[u]:s.palette[u],regAngle:o,totalWeight:O}),l+=t,o+=n})}function ve(t,n){const l=(t.x+n.x)/2,o=(t.y+n.y)/2;return{x:l,y:o}}function K(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,o)=>{const c=l.relations.indexOf(t.id);d.value.push({weight:l.weights[c]?l.weights[c]:0,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,midPointLine:ve({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:fe({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function fe(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},o={x:t.x1,y:t.y1},c={x:a.value.width/2,y:a.value.height/2+r.value.style.circle.offsetY},u=.5,O=Math.pow(1-u,3)*n.x+3*Math.pow(1-u,2)*u*o.x+3*(1-u)*Math.pow(u,2)*c.x+Math.pow(u,3)*l.x,S=Math.pow(1-u,3)*n.y+3*Math.pow(1-u,2)*u*o.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:O,y:S}}const ye=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function ge(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function g(t){return t.colorSource}function Q(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function p(t){return Object.hasOwn(i.value,"x")?!!(v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`):!1}function he(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function me(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function ke(t){return Object.hasOwn(i.value,"x")?i.value.id===t.id||v.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function pe(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function Z(t){ae.value=360-t.regAngle,i.value.id&&t.id===i.value.id?(i.value={},v.value=[]):(i.value=t,v.value=[...t.relations])}function L(t){const n=t.weight/ye.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function we(t){C.value=t,E.value+=1}const B=e.ref(!1);function z(){B.value=!B.value}return ne({generatePdf:D,generateImage:U,toggleAnnotator:z}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:b,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${w.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref(F)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(F)(!1))},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe._sfc_main,{key:0,svgRef:e.unref(R),backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:z},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:I,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Be._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&$.value&&(e.unref(M)||e.unref(_))?(e.openBlock(),e.createBlock(te.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(q),isImaging:e.unref(j),uid:w.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:C.value,titles:{...r.value.userOptions.buttonTitles},chartElement:b.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:we,onGeneratePdf:e.unref(D),onGenerateImage:e.unref(U),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:o})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:o})),void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"3"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:R,xmlns:e.unref(s.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value},"relation-circle"]),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode(_e._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:a.value.width<=0?10:a.value.width,height:a.value.height<=0?10:a.value.height,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,Ae)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:(a.value.width<=0?1e-4:a.value.width)/2,cy:(a.value.height<=0?1e-4:a.value.height)/2+r.value.style.circle.offsetY,r:m.value<=0?1e-4:m.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,Ne),ie.value?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${o}`,style:e.normalizeStyle(Q(l)),stroke:g(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${a.value.width/2},${a.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,Ve))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",Fe,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.mergeProps({key:0,ref_for:!0},{x:l.midPointBezier.x,y:l.midPointBezier.y,color:g(l),weight:l.weight,fontSize:f.value}),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointBezier.x,cy:l.midPointBezier.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Me)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointBezier.x,y:l.midPointBezier.y+f.value/3,fill:e.unref(s.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Re)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${o}`,stroke:g(l),"stroke-width":L(l),style:e.normalizeStyle(Q(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}),"stroke-linecap":"round"},null,14,qe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",je,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.mergeProps({key:0,ref_for:!0},{x:l.midPointLine.x,y:l.midPointLine.y,color:g(l),weight:l.weight,fontSize:f.value}),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointLine.x,cy:l.midPointLine.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,De)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointLine.x,y:l.midPointLine.y+f.value/3,fill:e.unref(s.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Ue)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${o}`,"text-anchor":he(l),transform:pe(l),x:me(l),y:l.y+5,onClick:c=>Z(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":i.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${ke(l)}`),"font-size":Y.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,Ge))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${o}`,style:e.normalizeStyle(ge(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.useSerieColor?l.color:r.value.style.plot.color,stroke:r.value.style.backgroundColor,"stroke-width":"1",onClick:c=>Z(l),r:W.value},null,12,We))),128)),e.renderSlot(t.$slots,"svg",{svg:a.value},void 0,!0)],10,Ee)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],44,Se))}},He=Oe._export_sfc(Xe,[["__scopeId","data-v-1f567c99"]]);exports.default=He;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useCssVars as Ve, computed as y, ref as o, watch as We, onMounted as De, onBeforeUnmount as Xe, createElementBlock as a, openBlock as i, unref as r, normalizeStyle as C, createBlock as F, createCommentVNode as v, createSlots as Ye, withCtx as z, renderSlot as h, normalizeProps as B, guardReactiveProps as R, normalizeClass as D, createVNode as qe, createElementVNode as He, Fragment as P, renderList as L, mergeProps as me, toDisplayString as E } from "vue";
|
|
2
|
-
import { u as Je, c as Ke, t as Qe, p as ke, a as Ze, b as et, o as tt, e as pe, g as st, X as lt, G as we, i as X, f as Y, F as q } from "./index-
|
|
2
|
+
import { u as Je, c as Ke, t as Qe, p as ke, a as Ze, b as et, o as tt, e as pe, g as st, X as lt, G as we, i as X, f as Y, F as q } from "./index-BI6O7K58.js";
|
|
3
3
|
import { t as it, u as at } from "./useResponsive-Cw4oZ8sQ.js";
|
|
4
|
-
import { _ as nt } from "./Title-
|
|
5
|
-
import { u as rt, U as ut } from "./usePrinter-
|
|
6
|
-
import ot from "./vue-ui-skeleton-
|
|
7
|
-
import { u as xe } from "./useNestedProp-
|
|
8
|
-
import { _ as ct } from "./PackageVersion-
|
|
9
|
-
import { _ as dt } from "./PenAndPaper-
|
|
4
|
+
import { _ as nt } from "./Title-CDYBDpu3.js";
|
|
5
|
+
import { u as rt, U as ut } from "./usePrinter-Jr3eyr8H.js";
|
|
6
|
+
import ot from "./vue-ui-skeleton-Dxm7rqic.js";
|
|
7
|
+
import { u as xe } from "./useNestedProp-Cvz4MkSy.js";
|
|
8
|
+
import { _ as ct } from "./PackageVersion-BdNfnIm2.js";
|
|
9
|
+
import { _ as dt } from "./PenAndPaper-wrVNMaG8.js";
|
|
10
10
|
import { u as vt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
11
|
import { u as ft } from "./useChartAccessibility-BWojgys7.js";
|
|
12
12
|
import { _ as yt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { useCssVars as Ct, ref as h, reactive as At, computed as k, onUnmounted as _t, createBlock as P, openBlock as r, Teleport as St, createElementBlock as u, createCommentVNode as y, withModifiers as V, normalizeStyle as O, createElementVNode as c, unref as g, renderSlot as x, createVNode as Ze, nextTick as et, onMounted as Mt, onBeforeUnmount as zt, watch as Ve, normalizeClass as ce, createSlots as Ue, withCtx as $, normalizeProps as de, guardReactiveProps as he, Fragment as b, renderList as T, mergeProps as Ge, toDisplayString as J, createTextVNode as je } from "vue";
|
|
2
|
-
import { X as tt, u as Lt, c as Ae, o as Tt, e as _e, g as qe, b as Ot, d as Pt, p as ve, ak as Je, a7 as Et, R as Ke, S as Dt, T as Nt, G as It, i as fe, f as ge, t as Xt, a as Ft, q as Rt, r as Ht, al as Bt } from "./index-
|
|
2
|
+
import { X as tt, u as Lt, c as Ae, o as Tt, e as _e, g as qe, b as Ot, d as Pt, p as ve, ak as Je, a7 as Et, R as Ke, S as Dt, T as Nt, G as It, i as fe, f as ge, t as Xt, a as Ft, q as Rt, r as Ht, al as Bt } from "./index-BI6O7K58.js";
|
|
3
3
|
import { u as Wt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
4
4
|
import { u as Yt } from "./useChartAccessibility-BWojgys7.js";
|
|
5
|
-
import { u as Vt, U as Ut } from "./usePrinter-
|
|
5
|
+
import { u as Vt, U as Ut } from "./usePrinter-Jr3eyr8H.js";
|
|
6
6
|
import { t as Gt, u as jt } from "./useResponsive-Cw4oZ8sQ.js";
|
|
7
|
-
import { u as Qe } from "./useNestedProp-
|
|
8
|
-
import qt from "./vue-ui-accordion-
|
|
9
|
-
import Jt from "./BaseIcon-
|
|
7
|
+
import { u as Qe } from "./useNestedProp-Cvz4MkSy.js";
|
|
8
|
+
import qt from "./vue-ui-accordion-ldF7KsjV.js";
|
|
9
|
+
import Jt from "./BaseIcon-Br5G8Cdk.js";
|
|
10
10
|
import { _ as at } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
-
import { D as Kt } from "./DataTable-
|
|
12
|
-
import { L as Qt } from "./Legend-
|
|
13
|
-
import { _ as Zt } from "./PenAndPaper-
|
|
14
|
-
import { _ as ea } from "./Shape-
|
|
15
|
-
import ta from "./vue-ui-skeleton-
|
|
16
|
-
import { _ as aa } from "./Title-
|
|
17
|
-
import la from "./vue-ui-xy-
|
|
11
|
+
import { D as Kt } from "./DataTable-Dk-94kK2.js";
|
|
12
|
+
import { L as Qt } from "./Legend-Cx6NYPTA.js";
|
|
13
|
+
import { _ as Zt } from "./PenAndPaper-wrVNMaG8.js";
|
|
14
|
+
import { _ as ea } from "./Shape-vIKj52KP.js";
|
|
15
|
+
import ta from "./vue-ui-skeleton-Dxm7rqic.js";
|
|
16
|
+
import { _ as aa } from "./Title-CDYBDpu3.js";
|
|
17
|
+
import la from "./vue-ui-xy-B1HwPMFi.js";
|
|
18
18
|
const oa = ["xmlns"], sa = { class: "modal-title" }, na = { class: "modal-body" }, ra = {
|
|
19
19
|
__name: "BaseDraggableDialog",
|
|
20
20
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BzyzkUsY.cjs"),je=require("./useUserOptionState-BgepsfED.cjs"),Je=require("./useChartAccessibility-Cm7nkzTG.cjs"),Be=require("./usePrinter-CBfmcTyQ.cjs"),Ee=require("./useResponsive-DQmBAoBf.cjs"),Se=require("./useNestedProp-CWnDOg1g.cjs"),Ke=require("./vue-ui-accordion-B4ML49fc.cjs"),Qe=require("./BaseIcon-BRmHoHji.cjs"),$e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ze=require("./DataTable-DSZwidNa.cjs"),et=require("./Legend-DUY48WfL.cjs"),tt=require("./PenAndPaper-Bt9JtDPx.cjs"),lt=require("./Shape-x1m9d0T3.cjs"),at=require("./vue-ui-skeleton-CZb-ZjJ-.cjs"),ot=require("./Title-CcgS3et4.cjs"),rt=require("./vue-ui-xy-vkK0CrKz.cjs"),nt=["xmlns"],st={class:"modal-title"},it={class:"modal-body"},ut={__name:"BaseDraggableDialog",props:{backgroundColor:{type:String},color:{type:String},headerBg:{type:String},headerColor:{type:String}},emits:["close"],setup($,{expose:K,emit:Q}){e.useCssVars(i=>({b93256ca:$.color}));const Z=$,p=Q,b=e.ref(!1),V=e.ref(!1),r=e.reactive({left:window.innerWidth/2-200,top:window.innerHeight/2-120,width:400,height:400,dragging:!1,resizing:!1,dragOffsetX:0,dragOffsetY:0,pointerStartX:0,pointerStartY:0,resizeStartW:0,resizeStartH:0});function Y(){b.value=!0,e.nextTick(()=>{V.value||(r.left=Math.max(0,window.innerWidth/2-r.width/2),r.top=Math.max(0,window.innerHeight/2-r.height/2),V.value=!0)})}function O(){b.value=!1,p("close")}K({open:Y,close:O});const P=e.computed(()=>({position:"fixed",left:`${r.left}px`,top:`${r.top}px`,width:`${r.width}px`,height:`${r.height}px`,padding:0,border:"none",background:Z.backgroundColor,boxShadow:"0 4px 24px rgba(0,0,0,0.15)",zIndex:9999,overflow:"visible",borderRadius:"2px"}));function C(i){return i.touches&&i.touches.length?{x:i.touches[0].clientX,y:i.touches[0].clientY}:{x:i.clientX,y:i.clientY}}function F(i){var v;(v=i.preventDefault)==null||v.call(i),r.dragging=!0;const d=C(i);r.dragOffsetX=d.x-r.left,r.dragOffsetY=d.y-r.top,document.addEventListener("mousemove",A),document.addEventListener("mouseup",N),document.addEventListener("touchmove",A,{passive:!1}),document.addEventListener("touchend",N)}function A(i){var t;if(!r.dragging)return;(t=i.preventDefault)==null||t.call(i);const d=C(i);let v=d.x-r.dragOffsetX,w=d.y-r.dragOffsetY;v=Math.max(0,Math.min(v,window.innerWidth-r.width)),w=Math.max(0,Math.min(w,window.innerHeight-r.height)),r.left=v,r.top=w}function N(){r.dragging=!1,document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",N),document.removeEventListener("touchmove",A),document.removeEventListener("touchend",N)}function I(i){var v;(v=i.preventDefault)==null||v.call(i),r.resizing=!0;const d=C(i);r.pointerStartX=d.x,r.pointerStartY=d.y,r.resizeStartW=r.width,r.resizeStartH=r.height,document.addEventListener("mousemove",f),document.addEventListener("mouseup",E),document.addEventListener("touchmove",f,{passive:!1}),document.addEventListener("touchend",E)}function f(i){var t;if(!r.resizing)return;(t=i.preventDefault)==null||t.call(i);const d=C(i);let v=d.x-r.pointerStartX,w=d.y-r.pointerStartY;r.width=Math.max(240,r.resizeStartW+v),r.height=Math.max(400,r.resizeStartH+w)}function E(){r.resizing=!1,document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",E),document.removeEventListener("touchmove",f),document.removeEventListener("touchend",E)}function G(i){var v;(v=i.preventDefault)==null||v.call(i),r.resizing=!0;const d=C(i);r.pointerStartX=d.x,r.pointerStartY=d.y,r.resizeStartW=r.width,r.resizeStartH=r.height,r.resizeStartLeft=r.left,r.resizeStartTop=r.top,document.addEventListener("mousemove",z),document.addEventListener("mouseup",h),document.addEventListener("touchmove",z,{passive:!1}),document.addEventListener("touchend",h)}function z(i){var R;if(!r.resizing)return;(R=i.preventDefault)==null||R.call(i);const d=C(i);let v=d.x-r.pointerStartX,w=Math.min(Math.max(0,r.resizeStartLeft+v),r.resizeStartLeft+r.resizeStartW-240),t=r.resizeStartW-(w-r.resizeStartLeft),y=d.y-r.pointerStartY,X=Math.max(400,r.resizeStartH+y);r.left=w,r.width=t,r.height=X}function h(){r.resizing=!1,document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",h),document.removeEventListener("touchmove",z),document.removeEventListener("touchend",h)}return e.onUnmounted(()=>{N(),E(),h()}),(i,d)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[b.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"modal vue-ui-draggable-dialog",style:e.normalizeStyle(P.value),onClick:d[0]||(d[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"modal-header",style:e.normalizeStyle({backgroundColor:$.headerBg,color:$.headerColor})},[e.createElementVNode("span",{class:"drag-handle",onMousedown:e.withModifiers(F,["stop","prevent"]),onTouchstart:e.withModifiers(F,["stop","prevent"])},[(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(u.XMLNS),width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},d[1]||(d[1]=[e.createElementVNode("path",{d:"M5 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M5 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M12 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M12 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M19 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M19 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1)]),8,nt))],32),e.createElementVNode("span",st,[e.renderSlot(i.$slots,"title",{},void 0,!0)]),e.createElementVNode("button",{class:"close",onClick:O},[e.createVNode(Qe.default,{name:"close",stroke:$.headerColor},null,8,["stroke"])])],4),e.createElementVNode("div",it,[e.renderSlot(i.$slots,"default",{},void 0,!0)]),e.createElementVNode("div",{class:"resize-handle",onMousedown:e.withModifiers(I,["stop","prevent"]),onTouchstart:e.withModifiers(I,["stop","prevent"])},null,32),e.createElementVNode("div",{class:"resize-handle resize-handle-left",onMousedown:e.withModifiers(G,["stop","prevent"]),onTouchstart:e.withModifiers(G,["stop","prevent"])},null,32)],4)):e.createCommentVNode("",!0)]))}},ct=$e._export_sfc(ut,[["__scopeId","data-v-1344ad9f"]]),dt=["id"],ht=["xmlns","viewBox"],vt=["id"],mt=["stop-color"],ft=["stop-color"],pt=["stop-color"],gt=["stop-color"],yt=["id"],kt=["stop-color"],xt=["stop-color"],bt=["stop-color"],wt=["stop-color"],Ct={key:0},Bt=["fill","d"],Et=["stroke","stroke-width","d"],St=["fill","d"],$t=["stroke","stroke-dasharray","stroke-width","d"],At=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],Nt=["cx","cy","stroke","stroke-width","r","fill"],zt=["x","y","font-size","font-weight","fill","text-decoration","onMouseenter","onClick"],Lt={key:0},Mt=["font-size","fill","font-weight","transform","text-anchor"],_t=["x","y","width","height","onMouseenter","onClick"],Vt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Pt=["cx","cy","stroke","stroke-width","r","fill"],Tt=["x","y","text-anchor","font-size","fill"],Dt={key:5,class:"vue-data-ui-watermark"},Ot=["onClick"],Ft=["innerHTML"],It={__name:"vue-ui-ridgeline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint","selectX"],setup($,{expose:K,emit:Q}){const{vue_ui_ridgeline:Z}=u.useConfig(),p=$,b=e.computed({get(){return!!p.dataset&&p.dataset.length},set(a){return a}}),V=Q,r=e.ref(null),Y=e.ref(null),O=e.ref(null),P=e.ref(null),C=e.ref(null),F=e.ref(null),A=e.ref(0),N=e.ref(0),I=e.ref(0),f=e.ref(u.createUid()),E=e.ref(0),G=e.ref(0),z=e.ref(512),h=e.ref(null),i=e.ref(null),d=e.ref(null),v=e.ref(0);function w(){const a=Se.useNestedProp({userConfig:p.config,defaultConfig:Z});return a.theme?{...Se.useNestedProp({userConfig:u.themes.vue_ui_ridgeline[a.theme]||p.config,defaultConfig:a}),customPalette:u.themePalettes[a.theme]||u.palette}:a}const t=e.computed({get:()=>w(),set:a=>a}),y=e.ref(Math.min(t.value.style.chart.areas.height,t.value.style.chart.areas.rowHeight)),{userOptionsVisible:X,setUserOptionsVisibility:R,keepUserOptionState:ne}=je.useUserOptionState({config:t.value}),{svgRef:ee}=Je.useChartAccessibility({config:t.value.style.chart.title});e.onMounted(te),e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});function te(){if(u.objectIsEmpty(p.dataset)?u.error({componentName:"VueUiRidgeline",type:"dataset"}):p.dataset.forEach((a,s)=>{u.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","datapoints"]}).forEach(l=>{b.value=!1,u.error({componentName:"VueUiRidgeline",type:"datasetSerieAttribute",property:l,index:s})}),a.datapoints.length&&a.datapoints.forEach((l,n)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{b.value=!1,u.error({componentName:"VueUiRidgeline",type:"datasetSerieAttribute",property:`datapoint.${o}`,index:`${s}-${n}`})})})}),G.value=p.dataset.length,y.value=Math.min(t.value.style.chart.areas.height,t.value.style.chart.areas.rowHeight),t.value.responsive){const a=Ee.throttle(()=>{const{width:s,height:l}=Ee.useResponsive({chart:r.value,title:t.value.style.chart.title.text?Y.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:C.value,noTitle:F.value,padding:t.value.style.chart.padding});requestAnimationFrame(()=>{z.value=s,y.value=l/p.dataset.length,v.value=l})});P.value=new ResizeObserver(a),P.value.observe(r.value.parentNode)}}const{isPrinting:se,isImaging:ie,generatePdf:ue,generateImage:ce}=Be.usePrinter({elementId:`vue-ui-ridgeline_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-ridgeline",options:t.value.userOptions.print}),Ae=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Ne=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),H=e.ref({showTable:t.value.table.show});e.watch(()=>p.config,a=>{t.value=w(),X.value=!t.value.userOptions.showOnChartHover,te(),A.value+=1,I.value+=1,y.value=Math.min(t.value.style.chart.areas.height,t.value.style.chart.areas.rowHeight),H.value.showTable=t.value.table.show},{deep:!0}),e.watch(()=>p.dataset,te,{deep:!0});const le=e.computed(()=>t.value.style.chart.areas.height/t.value.style.chart.areas.rowHeight);function de(a){S.value.includes(a)?S.value=S.value.filter(s=>s!==a):S.value.push(a),V("selectLegend",D.value)}const B=e.computed(()=>b.value?p.dataset.map((a,s)=>({...a,labelLen:Me(a.name,t.value.style.chart.yAxis.labels.fontSize),uid:u.createUid(),datapoints:a.datapoints.map((l,n)=>{const o=l.color?u.convertColorToHex(l.color):Ne.value[n]||u.palette[n]||u.palette[n%u.palette.length],c=u.slugify(l.name);return{...l,color:o,id:c}})})):[]),he=e.computed(()=>t.value.style.chart.padding.top+y.value*p.dataset.length+y.value*le.value),k=e.computed(()=>({fullHeight:m.value.padding.top+m.value.padding.bottom+m.value.height,top:m.value.padding.top,left:m.value.padding.left,right:m.value.width-m.value.padding.right,bottom:m.value.padding.top+m.value.height,width:m.value.width-(m.value.padding.left+m.value.padding.right)})),m=e.computed(()=>{const a=t.value.style.chart.padding;return{width:z.value,height:he.value,padding:a}}),T=e.computed(()=>{const a=Math.max(...B.value.map(c=>c.labelLen)),s=Math.max(...B.value.flatMap(c=>c.datapoints.map(x=>x.values.length))),l=m.value.padding.left+a+16+t.value.style.chart.yAxis.labels.offsetX,n=(k.value.width-l)/s,o=[];for(let c=0;c<s;c+=1)o.push({selectorX:l+n*c,x:l+n*c-n/2,y:k.value.top,label:t.value.style.chart.xAxis.labels.values[c]||"",index:c,width:n,height:he.value});return o});function ze(a){V("selectX",B.value.map(s=>s.datapoints.map(l=>({dp:l,selected:l.values[a.index]}))))}function Le(a,s){return a.length*s/2+s}function ve(a,s,l){const n=Le(s,l);return a+n>k.value.right}function Me(a,s,l="sans-serif"){const o=document.createElement("canvas").getContext("2d"),c=typeof s=="number"?`${s}px`:s;return o.font=`${c} ${l}`,o.measureText(a).width}const D=e.computed(()=>{y.value;const a=Math.max(...B.value.map(g=>g.labelLen)),s=Math.max(...B.value.flatMap(g=>g.datapoints.map(L=>L.values.length))),l=Math.max(...B.value.flatMap(g=>g.datapoints.flatMap(L=>L.values))),n=Math.min(...B.value.flatMap(g=>g.datapoints.flatMap(L=>L.values))),o=m.value.padding.left+a+16+t.value.style.chart.yAxis.labels.offsetX,c=(k.value.width-o)/s,x=Math.abs(Math.min(n,0)),ke=l+x;function xe(g){return isNaN(g/ke)?0:g/ke}return B.value.map((g,L)=>{const be=k.value.top+y.value*L,M=k.value.top+be+y.value*le.value*(1-xe(x));return{...g,label:{x:o-t.value.style.chart.yAxis.labels.fontSize,y:M},datapoints:g.datapoints.map(W=>{const _=W.values.map((U,qe)=>{const We=isNaN(U)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(U)?0:U||0,Ue=o+c*qe,Ye=k.value.top+be+y.value*le.value*(1-xe(We+x)),Ge=U===Math.max(...W.values);return{x:Ue,y:Ye,value:U,isMaxPoint:Ge,zero:M}}),Ie=`${u.createSmoothAreaSegments(_,M,!1,!1)}`,Xe=`M ${o},${M} ${u.createStraightPath(_)} ${_.at(-1).x},${M}`,Re=`M ${o},${M} ${_.at(-1).x},${M}`,we=`M ${u.createSmoothPath(_)}`,Ce=`M ${u.createStraightPath(_)}`,He=u.getPathLengthFromCoordinates(t.value.style.chart.areas.smooth?we:Ce);return{...W,uid:u.createUid(),plots:_,smoothPath:Ie,straightPath:Xe,zeroPath:Re,pathLength:He,smoothPathRidge:we,straightPathRidge:Ce}}).filter(W=>!S.value.includes(W.id))}})}),S=e.ref([]);function _e(a){const s=new Map;return a.forEach(l=>{l.datapoints.forEach((n,o)=>{const c=u.slugify(n.name);s.has(c)||s.set(c,{id:c,name:n.name,color:n.color,shape:"circle",segregate:()=>de(c),isSegregated:S.value.includes(c),opacity:S.value.includes(c)?.5:1})})}),Array.from(s.values())}const ae=e.computed(()=>_e(B.value)),Ve=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":""})),q=e.ref(!1);function Pe(a){q.value=a,E.value+=1}const me=e.ref({}),fe=e.ref([]);function Te(a){V("selectDatapoint",a),t.value.style.chart.dialog.show&&(fe.value=a.datapoints.map(s=>({name:s.name,color:s.color,type:"line",useArea:!0,smooth:t.value.style.chart.areas.smooth,series:s.values})),i.value=a,me.value=u.deepEmptyObjectToNull({...t.value.style.chart.dialog.xyChart,responsive:!0,chart:{...t.value.style.chart.dialog.xyChart.chart,grid:{...t.value.style.chart.dialog.xyChart.chart.grid,labels:{...t.value.style.chart.dialog.xyChart.chart.grid.labels,xAxisLabels:{...t.value.style.chart.dialog.xyChart.chart.grid.labels.xAxisLabels,values:t.value.style.chart.xAxis.labels.values}}},tooltip:{...t.value.style.chart.dialog.xyChart.chart.tooltip,showTimeLabel:t.value.style.chart.xAxis.labels.values.length>0}}}),d.value&&d.value.open())}const oe=e.ref(null);function De(a){oe.value=a}function Oe(){oe.value=null}const j=e.ref(!1);function re(){j.value=!j.value}function pe(){H.value.showTable=!H.value.showTable}const ge=e.computed(()=>({body:D.value.flatMap(l=>l.datapoints.flatMap(n=>({...n,rowName:`${l.name}: ${n.name}`}))).map(l=>[{name:l.rowName,color:l.color},...l.values])})),J=e.computed(()=>{const a=[t.value.table.columnNames.series,...t.value.style.chart.xAxis.labels.values],s={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.style.chart.xAxis.labels.values],head:a,body:ge.value.body,config:s}});function ye(){e.nextTick(()=>{const a=[[t.value.table.columnNames.series,...t.value.style.chart.xAxis.labels.values.map(n=>[n])],...ge.value.body.map((n,o)=>[n[0].name,...n.slice(1)])],s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text]].concat(a),l=u.createCsvContent(s);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-ridgeline"})})}function Fe(){return D.value}return K({getData:Fe,generateImage:ce,generatePdf:ue,generateCsv:ye,toggleAnnotator:re,toggleTable:pe}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ridgelineChart",ref:r,class:e.normalizeClass(`vue-ui-ridgeline ${q.value?"vue-data-ui-wrapper-fullscreen":""}`),id:`vue-ui-ridgeline_${f.value}`,style:e.normalizeStyle({fontFamily:t.value.style.fontFamily,width:"100%",textAlign:"center",background:t.value.style.chart.backgroundColor,height:t.value.responsive?"100%":void 0}),onMouseenter:s[4]||(s[4]=()=>e.unref(R)(!0)),onMouseleave:s[5]||(s[5]=()=>e.unref(R)(!1))},[t.value.userOptions.buttons.annotator&&e.unref(ee)?(e.openBlock(),e.createBlock(tt._sfc_main,{key:0,color:t.value.style.chart.color,backgroundColor:t.value.style.chart.backgroundColor,active:j.value,svgRef:e.unref(ee),onClose:re},null,8,["color","backgroundColor","active","svgRef"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"userConfig",{},void 0,!0),Ae.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:F,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:Y,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ot._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"ridgeline-div-title",...t.value.style.chart.title},subtitle:{cy:"ridgeline-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(ne)||e.unref(X))?(e.openBlock(),e.createBlock(Be.UserOptions,{ref:"details",key:`user_option_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(se),isImaging:e.unref(ie),uid:f.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:q.value,chartElement:r.value,position:t.value.userOptions.position,isTooltip:!1,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:j.value,style:e.normalizeStyle({visibility:e.unref(ne)?e.unref(X)?"visible":"hidden":"visible"}),onToggleFullscreen:Pe,onGeneratePdf:e.unref(ue),onGenerateCsv:ye,onGenerateImage:e.unref(ce),onToggleTable:pe,onToggleAnnotator:re},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","style","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:ee,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":q.value,"vue-data-ui-fulscreen--off":!q.value}),viewBox:`0 0 ${m.value.width<=0?10:m.value.width} ${k.value.fullHeight<=0?10:k.value.fullHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color};${t.value.responsive?`height: ${v.value}px; width: 100%;`:""}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ae.value,(l,n)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`gradient-${l.id}-${f.value}`,x1:"50%",y1:"0%",x2:"50%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color,"stop-opacity":"1"},null,8,mt),e.createElementVNode("stop",{offset:"30%","stop-color":l.color,"stop-opacity":"0.7"},null,8,ft),e.createElementVNode("stop",{offset:"70%","stop-color":l.color,"stop-opacity":"0.3"},null,8,pt),e.createElementVNode("stop",{offset:"100%","stop-color":l.color,"stop-opacity":"0.1"},null,8,gt)],8,vt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.datapoints,(o,c)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`grad${o.id}`,id:`gradient-single-${f.value}-${o.uid}`,x1:"50%",y1:"0%",x2:"50%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color,"stop-opacity":"1"},null,8,kt),e.createElementVNode("stop",{offset:"30%","stop-color":o.color,"stop-opacity":"0.7"},null,8,xt),e.createElementVNode("stop",{offset:"70%","stop-color":o.color,"stop-opacity":"0.3"},null,8,bt),e.createElementVNode("stop",{offset:"100%","stop-color":o.color,"stop-opacity":"0.1"},null,8,wt)],8,yt))),128))],64))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",{key:`ds-${n}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.datapoints,(o,c)=>(e.openBlock(),e.createElementBlock("g",{key:o.id},[a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Ct,[e.createElementVNode("defs",null,[e.renderSlot(a.$slots,"pattern",e.mergeProps({ref_for:!0},{datapointIndex:n,seriesIndex:c,patternId:`pattern_${f.value}_${o.uid}`}),void 0,!0)])])):e.createCommentVNode("",!0),e.createElementVNode("path",{fill:a.$slots.pattern?`url(#pattern_${f.value}_${o.uid})`:t.value.style.chart.backgroundColor,stroke:"none","stroke-linecap":"round",d:t.value.style.chart.areas.smooth?o.smoothPath:o.straightPath,style:e.normalizeStyle({opacity:t.value.style.chart.areas.opacity})},null,12,Bt),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.areas.stroke.useSerieColor?o.color:t.value.style.chart.areas.stroke.color,"stroke-width":t.value.style.chart.areas.strokeWidth,d:t.value.style.chart.areas.smooth?o.smoothPathRidge:o.straightPathRidge,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-ui-ridgeline-animate":t.value.useCssAnimation}),style:e.normalizeStyle({strokeDasharray:o.pathLength,strokeDashoffset:t.value.useCssAnimation?o.pathLength:0})},null,14,Et),e.createElementVNode("path",{fill:t.value.style.chart.areas.useGradient?t.value.style.chart.areas.useCommonColor?`url(#gradient-${o.id}-${f.value})`:`url(#gradient-single-${f.value}-${o.uid})`:o.color,stroke:"none",d:t.value.style.chart.areas.smooth?o.smoothPath:o.straightPath,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-ui-ridgeline-animate":t.value.useCssAnimation}),style:e.normalizeStyle({strokeDasharray:o.pathLength,strokeDashoffset:t.value.useCssAnimation?o.pathLength:0})},null,14,St),t.value.style.chart.zeroLine.show?(e.openBlock(),e.createElementBlock("path",{key:1,stroke:t.value.style.chart.zeroLine.useSerieColor?o.color:t.value.style.chart.zeroLine.stroke,"stroke-dasharray":t.value.style.chart.zeroLine.strokeDasharray,"stroke-width":t.value.style.chart.zeroLine.strokeWidth,d:o.zeroPath,"stroke-linecap":"round"},null,8,$t)):e.createCommentVNode("",!0),t.value.style.chart.areas.maxPoint.show&&o.plots.length>1?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(o.plots,x=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[x.isMaxPoint?(e.openBlock(),e.createElementBlock("line",{key:0,x1:x.x,y1:x.y,x2:x.x,y2:x.zero,stroke:t.value.style.chart.areas.maxPoint.adaptStrokeToBackground?e.unref(u.adaptColorToBackground)(o.color):t.value.style.chart.areas.maxPoint.stroke,"stroke-width":t.value.style.chart.areas.maxPoint.strokeWidth,"stroke-linecap":"round","stroke-dasharray":t.value.style.chart.areas.maxPoint.strokeDasharray},null,8,At)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0),o.plots.length===1?(e.openBlock(),e.createElementBlock("circle",{key:3,cx:o.plots[0].x,cy:o.plots[0].y,stroke:t.value.style.chart.selector.dot.stroke,"stroke-width":t.value.style.chart.selector.dot.strokeWidth,r:t.value.style.chart.selector.dot.radius,fill:t.value.style.chart.selector.dot.useDatapointColor?o.color:t.value.style.chart.selector.dot.fill,style:{pointerEvents:"none"}},null,8,Nt)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("text",{x:l.label.x,y:l.label.y,"text-anchor":"end","font-size":t.value.style.chart.yAxis.labels.fontSize,"font-weight":t.value.style.chart.yAxis.labels.bold?"bold":"normal",fill:t.value.style.chart.yAxis.labels.color,style:e.normalizeStyle({cursor:t.value.style.chart.dialog.show?"pointer":"default"}),"text-decoration":t.value.style.chart.dialog.show&&(oe.value===n||i.value&&l.uid===i.value.uid)?"underline":"",onMouseenter:o=>De(n),onMouseleave:Oe,onClick:o=>Te(l)},e.toDisplayString(l.name),45,zt)]))),128)),t.value.style.chart.xAxis.labels.values.length?(e.openBlock(),e.createElementBlock("g",Lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(l,n)=>e.renderSlot(a.$slots,"time-label",e.mergeProps({ref_for:!0},{show:l&&!t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&!t.value.style.chart.xAxis.labels.showOnlyAtModulo||l&&t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&(n===0||n===T.value.length-1)||l&&h.value&&h.value.index===n||l&&!t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&t.value.style.chart.xAxis.labels.showOnlyAtModulo&&n%Math.floor(T.value.length/t.value.style.chart.xAxis.labels.modulo)===0,fontSize:t.value.style.chart.xAxis.labels.fontSize,content:l.label,textAnchor:t.value.style.chart.xAxis.labels.rotation>0?"start":t.value.style.chart.xAxis.labels.rotation<0?"end":"middle",fill:t.value.style.chart.xAxis.labels.color,transform:`translate(${l.selectorX}, ${k.value.top+l.height+t.value.style.chart.xAxis.labels.offsetY}), rotate(${t.value.style.chart.xAxis.labels.rotation})`,x:l.selectorX,y:k.value.top+l.height+t.value.style.chart.xAxis.labels.offsetY}),()=>[l&&!t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&!t.value.style.chart.xAxis.labels.showOnlyAtModulo||l&&t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&(n===0||n===T.value.length-1)||l&&h.value&&h.value.index===n||l&&!t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&t.value.style.chart.xAxis.labels.showOnlyAtModulo&&n%Math.floor(T.value.length/t.value.style.chart.xAxis.labels.modulo)===0?(e.openBlock(),e.createElementBlock("text",{key:0,"font-size":t.value.style.chart.xAxis.labels.fontSize,fill:t.value.style.chart.xAxis.labels.color,"font-weight":t.value.style.chart.xAxis.labels.bold?"bold":"normal",transform:`translate(${l.selectorX}, ${k.value.top+l.height+t.value.style.chart.xAxis.labels.offsetY}), rotate(${t.value.style.chart.xAxis.labels.rotation})`,"text-anchor":t.value.style.chart.xAxis.labels.rotation>0?"start":t.value.style.chart.xAxis.labels.rotation<0?"end":"middle",style:e.normalizeStyle({opacity:h.value?h.value.index===n?1:.2:1})},e.toDisplayString(l.label),13,Mt)):e.createCommentVNode("",!0)],!0)),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(l,n)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,width:l.width<0?.1:l.width,height:l.height<0?.1:l.height,fill:"transparent",onMouseenter:o=>h.value=l,onMouseleave:s[0]||(s[0]=o=>h.value=null),onClick:()=>ze(l)},null,40,_t))),256)),t.value.style.chart.selector.show&&h.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:h.value.selectorX,x2:h.value.selectorX,y1:h.value.y,y2:h.value.y+h.value.height-y.value/2,stroke:t.value.style.chart.selector.stroke,"stroke-width":t.value.style.chart.selector.strokeWidth,"stroke-dasharray":t.value.style.chart.selector.strokeDasharray,"stroke-linecap":"round",style:{pointerEvents:"none"}},null,8,Vt)):e.createCommentVNode("",!0),h.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(D.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.datapoints,n=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.plots,(o,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[h.value&&h.value.index===c?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:o.x,cy:o.y,stroke:t.value.style.chart.selector.dot.stroke,"stroke-width":t.value.style.chart.selector.dot.strokeWidth,r:t.value.style.chart.selector.dot.radius,fill:t.value.style.chart.selector.dot.useDatapointColor?n.color:t.value.style.chart.selector.dot.fill,style:{pointerEvents:"none"}},null,8,Pt)):e.createCommentVNode("",!0),h.value&&h.value.index===c?(e.openBlock(),e.createElementBlock("text",{key:1,x:ve(o.x,e.unref(u.applyDataLabel)(t.value.style.chart.selector.labels.formatter,o.value,e.unref(u.dataLabel)({p:t.value.style.chart.xAxis.labels.prefix,v:o.value,s:t.value.style.chart.xAxis.labels.suffix,r:t.value.style.chart.selector.labels.rounding})),t.value.style.chart.selector.labels.fontSize)?o.x-t.value.style.chart.selector.labels.fontSize/2:o.x+t.value.style.chart.selector.labels.fontSize/2,y:o.y+t.value.style.chart.selector.labels.fontSize/3,"text-anchor":ve(o.x,e.unref(u.applyDataLabel)(t.value.style.chart.selector.labels.formatter,o.value,e.unref(u.dataLabel)({p:t.value.style.chart.xAxis.labels.prefix,v:o.value,s:t.value.style.chart.xAxis.labels.suffix,r:t.value.style.chart.selector.labels.rounding})),t.value.style.chart.selector.labels.fontSize)?"end":"start","font-size":t.value.style.chart.selector.labels.fontSize,fill:t.value.style.chart.selector.labels.color,style:{pointerEvents:"none"}},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.selector.labels.formatter,o.value,e.unref(u.dataLabel)({p:t.value.style.chart.xAxis.labels.prefix,v:o.value,s:t.value.style.chart.xAxis.labels.suffix,r:t.value.style.chart.selector.labels.rounding}))),9,Tt)):e.createCommentVNode("",!0)],64))),256))],64))),256))],64))),256)):e.createCommentVNode("",!0)]),e.renderSlot(a.$slots,"svg",{svg:m.value},void 0,!0)],14,ht)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Dt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(se)||e.unref(ie)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(at.default,{key:6,config:{type:"ridgeline",style:{backgroundColor:t.value.style.chart.backgroundColor,ridgeline:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(et.Legend,{key:`legend_${I.value}`,legendSet:ae.value,config:Ve.value,onClickMarker:s[1]||(s[1]=({legend:l})=>de(l.id))},e.createSlots({item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{style:e.normalizeStyle(`opacity:${S.value.includes(l.id)?.5:1}`),onClick:n=>l.segregate()},e.toDisplayString(l.name),13,Ot)]),_:2},[a.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:n})=>[e.createVNode(lt._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${n})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:ae.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:C,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(Ke.default,{key:8,hideDetails:"",config:{open:H.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ze.DataTable,{key:`table_${N.value}`,colNames:J.value.colNames,head:J.value.head,body:J.value.body,config:J.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` :${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[2]||(s[2]=l=>H.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l},null,8,Ft)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:e.unref(u.applyDataLabel)(t.value.style.chart.selector.labels.formatter,l,e.unref(u.dataLabel)({p:t.value.style.chart.xAxis.labels.prefix,v:l,s:t.value.style.chart.xAxis.labels.suffix,r:t.value.table.td.roundingValue}))),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0),t.value.style.chart.dialog.show?(e.openBlock(),e.createBlock(ct,{key:9,ref_key:"dialog",ref:d,onClose:s[3]||(s[3]=l=>i.value=null),backgroundColor:t.value.style.chart.dialog.backgroundColor,color:t.value.style.chart.dialog.color,headerBg:t.value.style.chart.dialog.header.backgroundColor,headerColor:t.value.style.chart.dialog.header.color},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.name),1)]),default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(rt.default,{key:0,config:me.value,dataset:fe.value},null,8,["config","dataset"])):e.createCommentVNode("",!0)]),_:1},8,["backgroundColor","color","headerBg","headerColor"])):e.createCommentVNode("",!0)],46,dt))}},Xt=$e._export_sfc(It,[["__scopeId","data-v-9c3affc2"]]);exports.default=Xt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-DgIVCHLv.cjs"),je=require("./useUserOptionState-BgepsfED.cjs"),Je=require("./useChartAccessibility-Cm7nkzTG.cjs"),Be=require("./usePrinter-B2xVvtiy.cjs"),Ee=require("./useResponsive-DQmBAoBf.cjs"),Se=require("./useNestedProp-CCR03NVM.cjs"),Ke=require("./vue-ui-accordion-DE1isSE9.cjs"),Qe=require("./BaseIcon-DfoJJxST.cjs"),$e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ze=require("./DataTable-CGucPqAQ.cjs"),et=require("./Legend-B9aoKeq3.cjs"),tt=require("./PenAndPaper-CJIFAI78.cjs"),lt=require("./Shape-Cn2RU1NY.cjs"),at=require("./vue-ui-skeleton-DeEGdJEn.cjs"),ot=require("./Title-Bae0QJu7.cjs"),rt=require("./vue-ui-xy-B4sqGuw6.cjs"),nt=["xmlns"],st={class:"modal-title"},it={class:"modal-body"},ut={__name:"BaseDraggableDialog",props:{backgroundColor:{type:String},color:{type:String},headerBg:{type:String},headerColor:{type:String}},emits:["close"],setup($,{expose:K,emit:Q}){e.useCssVars(i=>({b93256ca:$.color}));const Z=$,p=Q,b=e.ref(!1),V=e.ref(!1),r=e.reactive({left:window.innerWidth/2-200,top:window.innerHeight/2-120,width:400,height:400,dragging:!1,resizing:!1,dragOffsetX:0,dragOffsetY:0,pointerStartX:0,pointerStartY:0,resizeStartW:0,resizeStartH:0});function Y(){b.value=!0,e.nextTick(()=>{V.value||(r.left=Math.max(0,window.innerWidth/2-r.width/2),r.top=Math.max(0,window.innerHeight/2-r.height/2),V.value=!0)})}function O(){b.value=!1,p("close")}K({open:Y,close:O});const P=e.computed(()=>({position:"fixed",left:`${r.left}px`,top:`${r.top}px`,width:`${r.width}px`,height:`${r.height}px`,padding:0,border:"none",background:Z.backgroundColor,boxShadow:"0 4px 24px rgba(0,0,0,0.15)",zIndex:9999,overflow:"visible",borderRadius:"2px"}));function C(i){return i.touches&&i.touches.length?{x:i.touches[0].clientX,y:i.touches[0].clientY}:{x:i.clientX,y:i.clientY}}function F(i){var v;(v=i.preventDefault)==null||v.call(i),r.dragging=!0;const d=C(i);r.dragOffsetX=d.x-r.left,r.dragOffsetY=d.y-r.top,document.addEventListener("mousemove",A),document.addEventListener("mouseup",N),document.addEventListener("touchmove",A,{passive:!1}),document.addEventListener("touchend",N)}function A(i){var t;if(!r.dragging)return;(t=i.preventDefault)==null||t.call(i);const d=C(i);let v=d.x-r.dragOffsetX,w=d.y-r.dragOffsetY;v=Math.max(0,Math.min(v,window.innerWidth-r.width)),w=Math.max(0,Math.min(w,window.innerHeight-r.height)),r.left=v,r.top=w}function N(){r.dragging=!1,document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",N),document.removeEventListener("touchmove",A),document.removeEventListener("touchend",N)}function I(i){var v;(v=i.preventDefault)==null||v.call(i),r.resizing=!0;const d=C(i);r.pointerStartX=d.x,r.pointerStartY=d.y,r.resizeStartW=r.width,r.resizeStartH=r.height,document.addEventListener("mousemove",f),document.addEventListener("mouseup",E),document.addEventListener("touchmove",f,{passive:!1}),document.addEventListener("touchend",E)}function f(i){var t;if(!r.resizing)return;(t=i.preventDefault)==null||t.call(i);const d=C(i);let v=d.x-r.pointerStartX,w=d.y-r.pointerStartY;r.width=Math.max(240,r.resizeStartW+v),r.height=Math.max(400,r.resizeStartH+w)}function E(){r.resizing=!1,document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",E),document.removeEventListener("touchmove",f),document.removeEventListener("touchend",E)}function G(i){var v;(v=i.preventDefault)==null||v.call(i),r.resizing=!0;const d=C(i);r.pointerStartX=d.x,r.pointerStartY=d.y,r.resizeStartW=r.width,r.resizeStartH=r.height,r.resizeStartLeft=r.left,r.resizeStartTop=r.top,document.addEventListener("mousemove",z),document.addEventListener("mouseup",h),document.addEventListener("touchmove",z,{passive:!1}),document.addEventListener("touchend",h)}function z(i){var R;if(!r.resizing)return;(R=i.preventDefault)==null||R.call(i);const d=C(i);let v=d.x-r.pointerStartX,w=Math.min(Math.max(0,r.resizeStartLeft+v),r.resizeStartLeft+r.resizeStartW-240),t=r.resizeStartW-(w-r.resizeStartLeft),y=d.y-r.pointerStartY,X=Math.max(400,r.resizeStartH+y);r.left=w,r.width=t,r.height=X}function h(){r.resizing=!1,document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",h),document.removeEventListener("touchmove",z),document.removeEventListener("touchend",h)}return e.onUnmounted(()=>{N(),E(),h()}),(i,d)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[b.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"modal vue-ui-draggable-dialog",style:e.normalizeStyle(P.value),onClick:d[0]||(d[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"modal-header",style:e.normalizeStyle({backgroundColor:$.headerBg,color:$.headerColor})},[e.createElementVNode("span",{class:"drag-handle",onMousedown:e.withModifiers(F,["stop","prevent"]),onTouchstart:e.withModifiers(F,["stop","prevent"])},[(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(u.XMLNS),width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},d[1]||(d[1]=[e.createElementVNode("path",{d:"M5 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M5 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M12 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M12 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M19 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),e.createElementVNode("path",{d:"M19 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1)]),8,nt))],32),e.createElementVNode("span",st,[e.renderSlot(i.$slots,"title",{},void 0,!0)]),e.createElementVNode("button",{class:"close",onClick:O},[e.createVNode(Qe.default,{name:"close",stroke:$.headerColor},null,8,["stroke"])])],4),e.createElementVNode("div",it,[e.renderSlot(i.$slots,"default",{},void 0,!0)]),e.createElementVNode("div",{class:"resize-handle",onMousedown:e.withModifiers(I,["stop","prevent"]),onTouchstart:e.withModifiers(I,["stop","prevent"])},null,32),e.createElementVNode("div",{class:"resize-handle resize-handle-left",onMousedown:e.withModifiers(G,["stop","prevent"]),onTouchstart:e.withModifiers(G,["stop","prevent"])},null,32)],4)):e.createCommentVNode("",!0)]))}},ct=$e._export_sfc(ut,[["__scopeId","data-v-1344ad9f"]]),dt=["id"],ht=["xmlns","viewBox"],vt=["id"],mt=["stop-color"],ft=["stop-color"],pt=["stop-color"],gt=["stop-color"],yt=["id"],kt=["stop-color"],xt=["stop-color"],bt=["stop-color"],wt=["stop-color"],Ct={key:0},Bt=["fill","d"],Et=["stroke","stroke-width","d"],St=["fill","d"],$t=["stroke","stroke-dasharray","stroke-width","d"],At=["x1","y1","x2","y2","stroke","stroke-width","stroke-dasharray"],Nt=["cx","cy","stroke","stroke-width","r","fill"],zt=["x","y","font-size","font-weight","fill","text-decoration","onMouseenter","onClick"],Lt={key:0},Mt=["font-size","fill","font-weight","transform","text-anchor"],_t=["x","y","width","height","onMouseenter","onClick"],Vt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Pt=["cx","cy","stroke","stroke-width","r","fill"],Tt=["x","y","text-anchor","font-size","fill"],Dt={key:5,class:"vue-data-ui-watermark"},Ot=["onClick"],Ft=["innerHTML"],It={__name:"vue-ui-ridgeline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint","selectX"],setup($,{expose:K,emit:Q}){const{vue_ui_ridgeline:Z}=u.useConfig(),p=$,b=e.computed({get(){return!!p.dataset&&p.dataset.length},set(a){return a}}),V=Q,r=e.ref(null),Y=e.ref(null),O=e.ref(null),P=e.ref(null),C=e.ref(null),F=e.ref(null),A=e.ref(0),N=e.ref(0),I=e.ref(0),f=e.ref(u.createUid()),E=e.ref(0),G=e.ref(0),z=e.ref(512),h=e.ref(null),i=e.ref(null),d=e.ref(null),v=e.ref(0);function w(){const a=Se.useNestedProp({userConfig:p.config,defaultConfig:Z});return a.theme?{...Se.useNestedProp({userConfig:u.themes.vue_ui_ridgeline[a.theme]||p.config,defaultConfig:a}),customPalette:u.themePalettes[a.theme]||u.palette}:a}const t=e.computed({get:()=>w(),set:a=>a}),y=e.ref(Math.min(t.value.style.chart.areas.height,t.value.style.chart.areas.rowHeight)),{userOptionsVisible:X,setUserOptionsVisibility:R,keepUserOptionState:ne}=je.useUserOptionState({config:t.value}),{svgRef:ee}=Je.useChartAccessibility({config:t.value.style.chart.title});e.onMounted(te),e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});function te(){if(u.objectIsEmpty(p.dataset)?u.error({componentName:"VueUiRidgeline",type:"dataset"}):p.dataset.forEach((a,s)=>{u.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","datapoints"]}).forEach(l=>{b.value=!1,u.error({componentName:"VueUiRidgeline",type:"datasetSerieAttribute",property:l,index:s})}),a.datapoints.length&&a.datapoints.forEach((l,n)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{b.value=!1,u.error({componentName:"VueUiRidgeline",type:"datasetSerieAttribute",property:`datapoint.${o}`,index:`${s}-${n}`})})})}),G.value=p.dataset.length,y.value=Math.min(t.value.style.chart.areas.height,t.value.style.chart.areas.rowHeight),t.value.responsive){const a=Ee.throttle(()=>{const{width:s,height:l}=Ee.useResponsive({chart:r.value,title:t.value.style.chart.title.text?Y.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:C.value,noTitle:F.value,padding:t.value.style.chart.padding});requestAnimationFrame(()=>{z.value=s,y.value=l/p.dataset.length,v.value=l})});P.value=new ResizeObserver(a),P.value.observe(r.value.parentNode)}}const{isPrinting:se,isImaging:ie,generatePdf:ue,generateImage:ce}=Be.usePrinter({elementId:`vue-ui-ridgeline_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-ridgeline",options:t.value.userOptions.print}),Ae=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Ne=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),H=e.ref({showTable:t.value.table.show});e.watch(()=>p.config,a=>{t.value=w(),X.value=!t.value.userOptions.showOnChartHover,te(),A.value+=1,I.value+=1,y.value=Math.min(t.value.style.chart.areas.height,t.value.style.chart.areas.rowHeight),H.value.showTable=t.value.table.show},{deep:!0}),e.watch(()=>p.dataset,te,{deep:!0});const le=e.computed(()=>t.value.style.chart.areas.height/t.value.style.chart.areas.rowHeight);function de(a){S.value.includes(a)?S.value=S.value.filter(s=>s!==a):S.value.push(a),V("selectLegend",D.value)}const B=e.computed(()=>b.value?p.dataset.map((a,s)=>({...a,labelLen:Me(a.name,t.value.style.chart.yAxis.labels.fontSize),uid:u.createUid(),datapoints:a.datapoints.map((l,n)=>{const o=l.color?u.convertColorToHex(l.color):Ne.value[n]||u.palette[n]||u.palette[n%u.palette.length],c=u.slugify(l.name);return{...l,color:o,id:c}})})):[]),he=e.computed(()=>t.value.style.chart.padding.top+y.value*p.dataset.length+y.value*le.value),k=e.computed(()=>({fullHeight:m.value.padding.top+m.value.padding.bottom+m.value.height,top:m.value.padding.top,left:m.value.padding.left,right:m.value.width-m.value.padding.right,bottom:m.value.padding.top+m.value.height,width:m.value.width-(m.value.padding.left+m.value.padding.right)})),m=e.computed(()=>{const a=t.value.style.chart.padding;return{width:z.value,height:he.value,padding:a}}),T=e.computed(()=>{const a=Math.max(...B.value.map(c=>c.labelLen)),s=Math.max(...B.value.flatMap(c=>c.datapoints.map(x=>x.values.length))),l=m.value.padding.left+a+16+t.value.style.chart.yAxis.labels.offsetX,n=(k.value.width-l)/s,o=[];for(let c=0;c<s;c+=1)o.push({selectorX:l+n*c,x:l+n*c-n/2,y:k.value.top,label:t.value.style.chart.xAxis.labels.values[c]||"",index:c,width:n,height:he.value});return o});function ze(a){V("selectX",B.value.map(s=>s.datapoints.map(l=>({dp:l,selected:l.values[a.index]}))))}function Le(a,s){return a.length*s/2+s}function ve(a,s,l){const n=Le(s,l);return a+n>k.value.right}function Me(a,s,l="sans-serif"){const o=document.createElement("canvas").getContext("2d"),c=typeof s=="number"?`${s}px`:s;return o.font=`${c} ${l}`,o.measureText(a).width}const D=e.computed(()=>{y.value;const a=Math.max(...B.value.map(g=>g.labelLen)),s=Math.max(...B.value.flatMap(g=>g.datapoints.map(L=>L.values.length))),l=Math.max(...B.value.flatMap(g=>g.datapoints.flatMap(L=>L.values))),n=Math.min(...B.value.flatMap(g=>g.datapoints.flatMap(L=>L.values))),o=m.value.padding.left+a+16+t.value.style.chart.yAxis.labels.offsetX,c=(k.value.width-o)/s,x=Math.abs(Math.min(n,0)),ke=l+x;function xe(g){return isNaN(g/ke)?0:g/ke}return B.value.map((g,L)=>{const be=k.value.top+y.value*L,M=k.value.top+be+y.value*le.value*(1-xe(x));return{...g,label:{x:o-t.value.style.chart.yAxis.labels.fontSize,y:M},datapoints:g.datapoints.map(W=>{const _=W.values.map((U,qe)=>{const We=isNaN(U)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(U)?0:U||0,Ue=o+c*qe,Ye=k.value.top+be+y.value*le.value*(1-xe(We+x)),Ge=U===Math.max(...W.values);return{x:Ue,y:Ye,value:U,isMaxPoint:Ge,zero:M}}),Ie=`${u.createSmoothAreaSegments(_,M,!1,!1)}`,Xe=`M ${o},${M} ${u.createStraightPath(_)} ${_.at(-1).x},${M}`,Re=`M ${o},${M} ${_.at(-1).x},${M}`,we=`M ${u.createSmoothPath(_)}`,Ce=`M ${u.createStraightPath(_)}`,He=u.getPathLengthFromCoordinates(t.value.style.chart.areas.smooth?we:Ce);return{...W,uid:u.createUid(),plots:_,smoothPath:Ie,straightPath:Xe,zeroPath:Re,pathLength:He,smoothPathRidge:we,straightPathRidge:Ce}}).filter(W=>!S.value.includes(W.id))}})}),S=e.ref([]);function _e(a){const s=new Map;return a.forEach(l=>{l.datapoints.forEach((n,o)=>{const c=u.slugify(n.name);s.has(c)||s.set(c,{id:c,name:n.name,color:n.color,shape:"circle",segregate:()=>de(c),isSegregated:S.value.includes(c),opacity:S.value.includes(c)?.5:1})})}),Array.from(s.values())}const ae=e.computed(()=>_e(B.value)),Ve=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":""})),q=e.ref(!1);function Pe(a){q.value=a,E.value+=1}const me=e.ref({}),fe=e.ref([]);function Te(a){V("selectDatapoint",a),t.value.style.chart.dialog.show&&(fe.value=a.datapoints.map(s=>({name:s.name,color:s.color,type:"line",useArea:!0,smooth:t.value.style.chart.areas.smooth,series:s.values})),i.value=a,me.value=u.deepEmptyObjectToNull({...t.value.style.chart.dialog.xyChart,responsive:!0,chart:{...t.value.style.chart.dialog.xyChart.chart,grid:{...t.value.style.chart.dialog.xyChart.chart.grid,labels:{...t.value.style.chart.dialog.xyChart.chart.grid.labels,xAxisLabels:{...t.value.style.chart.dialog.xyChart.chart.grid.labels.xAxisLabels,values:t.value.style.chart.xAxis.labels.values}}},tooltip:{...t.value.style.chart.dialog.xyChart.chart.tooltip,showTimeLabel:t.value.style.chart.xAxis.labels.values.length>0}}}),d.value&&d.value.open())}const oe=e.ref(null);function De(a){oe.value=a}function Oe(){oe.value=null}const j=e.ref(!1);function re(){j.value=!j.value}function pe(){H.value.showTable=!H.value.showTable}const ge=e.computed(()=>({body:D.value.flatMap(l=>l.datapoints.flatMap(n=>({...n,rowName:`${l.name}: ${n.name}`}))).map(l=>[{name:l.rowName,color:l.color},...l.values])})),J=e.computed(()=>{const a=[t.value.table.columnNames.series,...t.value.style.chart.xAxis.labels.values],s={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.style.chart.xAxis.labels.values],head:a,body:ge.value.body,config:s}});function ye(){e.nextTick(()=>{const a=[[t.value.table.columnNames.series,...t.value.style.chart.xAxis.labels.values.map(n=>[n])],...ge.value.body.map((n,o)=>[n[0].name,...n.slice(1)])],s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text]].concat(a),l=u.createCsvContent(s);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-ridgeline"})})}function Fe(){return D.value}return K({getData:Fe,generateImage:ce,generatePdf:ue,generateCsv:ye,toggleAnnotator:re,toggleTable:pe}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ridgelineChart",ref:r,class:e.normalizeClass(`vue-ui-ridgeline ${q.value?"vue-data-ui-wrapper-fullscreen":""}`),id:`vue-ui-ridgeline_${f.value}`,style:e.normalizeStyle({fontFamily:t.value.style.fontFamily,width:"100%",textAlign:"center",background:t.value.style.chart.backgroundColor,height:t.value.responsive?"100%":void 0}),onMouseenter:s[4]||(s[4]=()=>e.unref(R)(!0)),onMouseleave:s[5]||(s[5]=()=>e.unref(R)(!1))},[t.value.userOptions.buttons.annotator&&e.unref(ee)?(e.openBlock(),e.createBlock(tt._sfc_main,{key:0,color:t.value.style.chart.color,backgroundColor:t.value.style.chart.backgroundColor,active:j.value,svgRef:e.unref(ee),onClose:re},null,8,["color","backgroundColor","active","svgRef"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"userConfig",{},void 0,!0),Ae.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:F,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:Y,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ot._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"ridgeline-div-title",...t.value.style.chart.title},subtitle:{cy:"ridgeline-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(ne)||e.unref(X))?(e.openBlock(),e.createBlock(Be.UserOptions,{ref:"details",key:`user_option_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(se),isImaging:e.unref(ie),uid:f.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:q.value,chartElement:r.value,position:t.value.userOptions.position,isTooltip:!1,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:j.value,style:e.normalizeStyle({visibility:e.unref(ne)?e.unref(X)?"visible":"hidden":"visible"}),onToggleFullscreen:Pe,onGeneratePdf:e.unref(ue),onGenerateCsv:ye,onGenerateImage:e.unref(ce),onToggleTable:pe,onToggleAnnotator:re},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","style","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:ee,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":q.value,"vue-data-ui-fulscreen--off":!q.value}),viewBox:`0 0 ${m.value.width<=0?10:m.value.width} ${k.value.fullHeight<=0?10:k.value.fullHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color};${t.value.responsive?`height: ${v.value}px; width: 100%;`:""}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ae.value,(l,n)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`gradient-${l.id}-${f.value}`,x1:"50%",y1:"0%",x2:"50%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color,"stop-opacity":"1"},null,8,mt),e.createElementVNode("stop",{offset:"30%","stop-color":l.color,"stop-opacity":"0.7"},null,8,ft),e.createElementVNode("stop",{offset:"70%","stop-color":l.color,"stop-opacity":"0.3"},null,8,pt),e.createElementVNode("stop",{offset:"100%","stop-color":l.color,"stop-opacity":"0.1"},null,8,gt)],8,vt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.datapoints,(o,c)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`grad${o.id}`,id:`gradient-single-${f.value}-${o.uid}`,x1:"50%",y1:"0%",x2:"50%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color,"stop-opacity":"1"},null,8,kt),e.createElementVNode("stop",{offset:"30%","stop-color":o.color,"stop-opacity":"0.7"},null,8,xt),e.createElementVNode("stop",{offset:"70%","stop-color":o.color,"stop-opacity":"0.3"},null,8,bt),e.createElementVNode("stop",{offset:"100%","stop-color":o.color,"stop-opacity":"0.1"},null,8,wt)],8,yt))),128))],64))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",{key:`ds-${n}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.datapoints,(o,c)=>(e.openBlock(),e.createElementBlock("g",{key:o.id},[a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Ct,[e.createElementVNode("defs",null,[e.renderSlot(a.$slots,"pattern",e.mergeProps({ref_for:!0},{datapointIndex:n,seriesIndex:c,patternId:`pattern_${f.value}_${o.uid}`}),void 0,!0)])])):e.createCommentVNode("",!0),e.createElementVNode("path",{fill:a.$slots.pattern?`url(#pattern_${f.value}_${o.uid})`:t.value.style.chart.backgroundColor,stroke:"none","stroke-linecap":"round",d:t.value.style.chart.areas.smooth?o.smoothPath:o.straightPath,style:e.normalizeStyle({opacity:t.value.style.chart.areas.opacity})},null,12,Bt),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.areas.stroke.useSerieColor?o.color:t.value.style.chart.areas.stroke.color,"stroke-width":t.value.style.chart.areas.strokeWidth,d:t.value.style.chart.areas.smooth?o.smoothPathRidge:o.straightPathRidge,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-ui-ridgeline-animate":t.value.useCssAnimation}),style:e.normalizeStyle({strokeDasharray:o.pathLength,strokeDashoffset:t.value.useCssAnimation?o.pathLength:0})},null,14,Et),e.createElementVNode("path",{fill:t.value.style.chart.areas.useGradient?t.value.style.chart.areas.useCommonColor?`url(#gradient-${o.id}-${f.value})`:`url(#gradient-single-${f.value}-${o.uid})`:o.color,stroke:"none",d:t.value.style.chart.areas.smooth?o.smoothPath:o.straightPath,"stroke-linecap":"round","stroke-linejoin":"round",class:e.normalizeClass({"vue-ui-ridgeline-animate":t.value.useCssAnimation}),style:e.normalizeStyle({strokeDasharray:o.pathLength,strokeDashoffset:t.value.useCssAnimation?o.pathLength:0})},null,14,St),t.value.style.chart.zeroLine.show?(e.openBlock(),e.createElementBlock("path",{key:1,stroke:t.value.style.chart.zeroLine.useSerieColor?o.color:t.value.style.chart.zeroLine.stroke,"stroke-dasharray":t.value.style.chart.zeroLine.strokeDasharray,"stroke-width":t.value.style.chart.zeroLine.strokeWidth,d:o.zeroPath,"stroke-linecap":"round"},null,8,$t)):e.createCommentVNode("",!0),t.value.style.chart.areas.maxPoint.show&&o.plots.length>1?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(o.plots,x=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[x.isMaxPoint?(e.openBlock(),e.createElementBlock("line",{key:0,x1:x.x,y1:x.y,x2:x.x,y2:x.zero,stroke:t.value.style.chart.areas.maxPoint.adaptStrokeToBackground?e.unref(u.adaptColorToBackground)(o.color):t.value.style.chart.areas.maxPoint.stroke,"stroke-width":t.value.style.chart.areas.maxPoint.strokeWidth,"stroke-linecap":"round","stroke-dasharray":t.value.style.chart.areas.maxPoint.strokeDasharray},null,8,At)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0),o.plots.length===1?(e.openBlock(),e.createElementBlock("circle",{key:3,cx:o.plots[0].x,cy:o.plots[0].y,stroke:t.value.style.chart.selector.dot.stroke,"stroke-width":t.value.style.chart.selector.dot.strokeWidth,r:t.value.style.chart.selector.dot.radius,fill:t.value.style.chart.selector.dot.useDatapointColor?o.color:t.value.style.chart.selector.dot.fill,style:{pointerEvents:"none"}},null,8,Nt)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("text",{x:l.label.x,y:l.label.y,"text-anchor":"end","font-size":t.value.style.chart.yAxis.labels.fontSize,"font-weight":t.value.style.chart.yAxis.labels.bold?"bold":"normal",fill:t.value.style.chart.yAxis.labels.color,style:e.normalizeStyle({cursor:t.value.style.chart.dialog.show?"pointer":"default"}),"text-decoration":t.value.style.chart.dialog.show&&(oe.value===n||i.value&&l.uid===i.value.uid)?"underline":"",onMouseenter:o=>De(n),onMouseleave:Oe,onClick:o=>Te(l)},e.toDisplayString(l.name),45,zt)]))),128)),t.value.style.chart.xAxis.labels.values.length?(e.openBlock(),e.createElementBlock("g",Lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(l,n)=>e.renderSlot(a.$slots,"time-label",e.mergeProps({ref_for:!0},{show:l&&!t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&!t.value.style.chart.xAxis.labels.showOnlyAtModulo||l&&t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&(n===0||n===T.value.length-1)||l&&h.value&&h.value.index===n||l&&!t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&t.value.style.chart.xAxis.labels.showOnlyAtModulo&&n%Math.floor(T.value.length/t.value.style.chart.xAxis.labels.modulo)===0,fontSize:t.value.style.chart.xAxis.labels.fontSize,content:l.label,textAnchor:t.value.style.chart.xAxis.labels.rotation>0?"start":t.value.style.chart.xAxis.labels.rotation<0?"end":"middle",fill:t.value.style.chart.xAxis.labels.color,transform:`translate(${l.selectorX}, ${k.value.top+l.height+t.value.style.chart.xAxis.labels.offsetY}), rotate(${t.value.style.chart.xAxis.labels.rotation})`,x:l.selectorX,y:k.value.top+l.height+t.value.style.chart.xAxis.labels.offsetY}),()=>[l&&!t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&!t.value.style.chart.xAxis.labels.showOnlyAtModulo||l&&t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&(n===0||n===T.value.length-1)||l&&h.value&&h.value.index===n||l&&!t.value.style.chart.xAxis.labels.showOnlyFirstAndLast&&t.value.style.chart.xAxis.labels.showOnlyAtModulo&&n%Math.floor(T.value.length/t.value.style.chart.xAxis.labels.modulo)===0?(e.openBlock(),e.createElementBlock("text",{key:0,"font-size":t.value.style.chart.xAxis.labels.fontSize,fill:t.value.style.chart.xAxis.labels.color,"font-weight":t.value.style.chart.xAxis.labels.bold?"bold":"normal",transform:`translate(${l.selectorX}, ${k.value.top+l.height+t.value.style.chart.xAxis.labels.offsetY}), rotate(${t.value.style.chart.xAxis.labels.rotation})`,"text-anchor":t.value.style.chart.xAxis.labels.rotation>0?"start":t.value.style.chart.xAxis.labels.rotation<0?"end":"middle",style:e.normalizeStyle({opacity:h.value?h.value.index===n?1:.2:1})},e.toDisplayString(l.label),13,Mt)):e.createCommentVNode("",!0)],!0)),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(l,n)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,width:l.width<0?.1:l.width,height:l.height<0?.1:l.height,fill:"transparent",onMouseenter:o=>h.value=l,onMouseleave:s[0]||(s[0]=o=>h.value=null),onClick:()=>ze(l)},null,40,_t))),256)),t.value.style.chart.selector.show&&h.value?(e.openBlock(),e.createElementBlock("line",{key:0,x1:h.value.selectorX,x2:h.value.selectorX,y1:h.value.y,y2:h.value.y+h.value.height-y.value/2,stroke:t.value.style.chart.selector.stroke,"stroke-width":t.value.style.chart.selector.strokeWidth,"stroke-dasharray":t.value.style.chart.selector.strokeDasharray,"stroke-linecap":"round",style:{pointerEvents:"none"}},null,8,Vt)):e.createCommentVNode("",!0),h.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(D.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.datapoints,n=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.plots,(o,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[h.value&&h.value.index===c?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:o.x,cy:o.y,stroke:t.value.style.chart.selector.dot.stroke,"stroke-width":t.value.style.chart.selector.dot.strokeWidth,r:t.value.style.chart.selector.dot.radius,fill:t.value.style.chart.selector.dot.useDatapointColor?n.color:t.value.style.chart.selector.dot.fill,style:{pointerEvents:"none"}},null,8,Pt)):e.createCommentVNode("",!0),h.value&&h.value.index===c?(e.openBlock(),e.createElementBlock("text",{key:1,x:ve(o.x,e.unref(u.applyDataLabel)(t.value.style.chart.selector.labels.formatter,o.value,e.unref(u.dataLabel)({p:t.value.style.chart.xAxis.labels.prefix,v:o.value,s:t.value.style.chart.xAxis.labels.suffix,r:t.value.style.chart.selector.labels.rounding})),t.value.style.chart.selector.labels.fontSize)?o.x-t.value.style.chart.selector.labels.fontSize/2:o.x+t.value.style.chart.selector.labels.fontSize/2,y:o.y+t.value.style.chart.selector.labels.fontSize/3,"text-anchor":ve(o.x,e.unref(u.applyDataLabel)(t.value.style.chart.selector.labels.formatter,o.value,e.unref(u.dataLabel)({p:t.value.style.chart.xAxis.labels.prefix,v:o.value,s:t.value.style.chart.xAxis.labels.suffix,r:t.value.style.chart.selector.labels.rounding})),t.value.style.chart.selector.labels.fontSize)?"end":"start","font-size":t.value.style.chart.selector.labels.fontSize,fill:t.value.style.chart.selector.labels.color,style:{pointerEvents:"none"}},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.selector.labels.formatter,o.value,e.unref(u.dataLabel)({p:t.value.style.chart.xAxis.labels.prefix,v:o.value,s:t.value.style.chart.xAxis.labels.suffix,r:t.value.style.chart.selector.labels.rounding}))),9,Tt)):e.createCommentVNode("",!0)],64))),256))],64))),256))],64))),256)):e.createCommentVNode("",!0)]),e.renderSlot(a.$slots,"svg",{svg:m.value},void 0,!0)],14,ht)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Dt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(se)||e.unref(ie)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(at.default,{key:6,config:{type:"ridgeline",style:{backgroundColor:t.value.style.chart.backgroundColor,ridgeline:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(et.Legend,{key:`legend_${I.value}`,legendSet:ae.value,config:Ve.value,onClickMarker:s[1]||(s[1]=({legend:l})=>de(l.id))},e.createSlots({item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{style:e.normalizeStyle(`opacity:${S.value.includes(l.id)?.5:1}`),onClick:n=>l.segregate()},e.toDisplayString(l.name),13,Ot)]),_:2},[a.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:n})=>[e.createVNode(lt._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${n})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:ae.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:C,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(Ke.default,{key:8,hideDetails:"",config:{open:H.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ze.DataTable,{key:`table_${N.value}`,colNames:J.value.colNames,head:J.value.head,body:J.value.body,config:J.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` :${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[2]||(s[2]=l=>H.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l},null,8,Ft)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name?l.name:e.unref(u.applyDataLabel)(t.value.style.chart.selector.labels.formatter,l,e.unref(u.dataLabel)({p:t.value.style.chart.xAxis.labels.prefix,v:l,s:t.value.style.chart.xAxis.labels.suffix,r:t.value.table.td.roundingValue}))),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0),t.value.style.chart.dialog.show?(e.openBlock(),e.createBlock(ct,{key:9,ref_key:"dialog",ref:d,onClose:s[3]||(s[3]=l=>i.value=null),backgroundColor:t.value.style.chart.dialog.backgroundColor,color:t.value.style.chart.dialog.color,headerBg:t.value.style.chart.dialog.header.backgroundColor,headerColor:t.value.style.chart.dialog.header.color},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.name),1)]),default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(rt.default,{key:0,config:me.value,dataset:fe.value},null,8,["config","dataset"])):e.createCommentVNode("",!0)]),_:1},8,["backgroundColor","color","headerBg","headerColor"])):e.createCommentVNode("",!0)],46,dt))}},Xt=$e._export_sfc(It,[["__scopeId","data-v-9c3affc2"]]);exports.default=Xt;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useSlots as He, ref as i, computed as g, watch as Ge, onMounted as je, onBeforeUnmount as Xe, createElementBlock as v, openBlock as n, unref as r, normalizeStyle as I, normalizeClass as M, createBlock as O, createCommentVNode as m, createElementVNode as _, createVNode as J, createSlots as we, withCtx as h, renderSlot as d, normalizeProps as P, guardReactiveProps as F, Fragment as K, renderList as Q, mergeProps as qe, createTextVNode as _e, toDisplayString as E, nextTick as Ye } from "vue";
|
|
2
|
-
import { u as Je, c as Te, t as Ke, p as N, a as Qe, o as Ze, e as Z, g as et, b as tt, H as lt, d as xe, f as S, X as ot, s as at, w as st, v as H, i as Ie, q as nt, r as ut, x as rt, y as it } from "./index-
|
|
2
|
+
import { u as Je, c as Te, t as Ke, p as N, a as Qe, o as Ze, e as Z, g as et, b as tt, H as lt, d as xe, f as S, X as ot, s as at, w as st, v as H, i as Ie, q as nt, r as ut, x as rt, y as it } from "./index-BI6O7K58.js";
|
|
3
3
|
import { t as vt, u as ct } from "./useResponsive-Cw4oZ8sQ.js";
|
|
4
|
-
import { _ as dt } from "./Title-
|
|
5
|
-
import { u as pt, U as ht } from "./usePrinter-
|
|
6
|
-
import { _ as gt } from "./Tooltip-
|
|
7
|
-
import { D as ft } from "./DataTable-
|
|
8
|
-
import { L as yt } from "./Legend-
|
|
9
|
-
import mt from "./vue-ui-skeleton-
|
|
10
|
-
import bt from "./vue-ui-accordion-
|
|
11
|
-
import { u as Oe } from "./useNestedProp-
|
|
12
|
-
import { _ as kt } from "./PackageVersion-
|
|
13
|
-
import { _ as Ct } from "./PenAndPaper-
|
|
4
|
+
import { _ as dt } from "./Title-CDYBDpu3.js";
|
|
5
|
+
import { u as pt, U as ht } from "./usePrinter-Jr3eyr8H.js";
|
|
6
|
+
import { _ as gt } from "./Tooltip-BzsAOdBd.js";
|
|
7
|
+
import { D as ft } from "./DataTable-Dk-94kK2.js";
|
|
8
|
+
import { L as yt } from "./Legend-Cx6NYPTA.js";
|
|
9
|
+
import mt from "./vue-ui-skeleton-Dxm7rqic.js";
|
|
10
|
+
import bt from "./vue-ui-accordion-ldF7KsjV.js";
|
|
11
|
+
import { u as Oe } from "./useNestedProp-Cvz4MkSy.js";
|
|
12
|
+
import { _ as kt } from "./PackageVersion-BdNfnIm2.js";
|
|
13
|
+
import { _ as Ct } from "./PenAndPaper-wrVNMaG8.js";
|
|
14
14
|
import { u as $t } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
|
-
import { _ as wt } from "./Shape-
|
|
15
|
+
import { _ as wt } from "./Shape-vIKj52KP.js";
|
|
16
16
|
import { u as _t } from "./useChartAccessibility-BWojgys7.js";
|
|
17
17
|
import { _ as Tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
18
18
|
const xt = ["id"], It = ["xmlns", "viewBox"], Ot = ["width", "height"], Nt = ["id"], St = ["stop-color"], At = ["stop-color"], Pt = { key: 1 }, Ft = ["stroke", "cx", "cy", "r", "fill"], Lt = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], Rt = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], Mt = ["cx", "cy", "r", "onMouseenter"], Vt = {
|