vue-data-ui 3.28.3 → 3.28.4
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/{PackageVersion-CXT-eAuk.js → PackageVersion-DhptF5oD.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-graph.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/package-CX7pZToh.js +1 -0
- package/dist/{render-common-C70bnUVe.js → render-common-DwEiRIJ0.js} +1 -1
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +1 -1
- package/dist/vue-data-ui-CORn0LF6.js +1 -0
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-ljsy2rX6.js → vue-ui-3d-bar-CJTKyv3A.js} +1 -1
- package/dist/{vue-ui-age-pyramid-a6CK7z3a.js → vue-ui-age-pyramid-6uZzf1w6.js} +1 -1
- package/dist/{vue-ui-bullet-DX4A2Qwo.js → vue-ui-bullet-CsJcLhmV.js} +1 -1
- package/dist/{vue-ui-bump-IvRdB6MD.js → vue-ui-bump-DXpxBWp_.js} +1 -1
- package/dist/{vue-ui-candlestick-BgyUo13S.js → vue-ui-candlestick-Bn_RSZ0k.js} +1 -1
- package/dist/{vue-ui-carousel-table-D01DGfA0.js → vue-ui-carousel-table-ChNykS-r.js} +1 -1
- package/dist/{vue-ui-chestnut-DYrMSzmQ.js → vue-ui-chestnut-DMYQTkxM.js} +1 -1
- package/dist/{vue-ui-chord-CwzQ7QbP.js → vue-ui-chord-Pp0U0-zV.js} +1 -1
- package/dist/{vue-ui-circle-pack-DQHNM9sC.js → vue-ui-circle-pack-We23fOaF.js} +1 -1
- package/dist/{vue-ui-cursor-CTFfbDX8.js → vue-ui-cursor-3-RTIIl-.js} +1 -1
- package/dist/{vue-ui-dag-DF29_9Gg.js → vue-ui-dag-5fVnwEXd.js} +1 -1
- package/dist/{vue-ui-dashboard-D98rMHjI.js → vue-ui-dashboard-Dlwnintv.js} +1 -1
- package/dist/{vue-ui-digits-AoPCgSfP.js → vue-ui-digits-ZMK0aBxE.js} +1 -1
- package/dist/{vue-ui-donut-BYUkblpv.js → vue-ui-donut-CmLo1r4-.js} +1 -1
- package/dist/{vue-ui-donut-evolution-wxHDTKlg.js → vue-ui-donut-evolution-CYvo7Cww.js} +1 -1
- package/dist/vue-ui-donut-j1bv0KyD.js +22 -0
- package/dist/{vue-ui-dumbbell-DR7rjMt0.js → vue-ui-dumbbell-DigrSGwq.js} +1 -1
- package/dist/{vue-ui-flow-DtQlRSK_.js → vue-ui-flow-D9cc9yXD.js} +1 -1
- package/dist/{vue-ui-funnel-BP3chlZy.js → vue-ui-funnel-U88Hs0nL.js} +1 -1
- package/dist/{vue-ui-galaxy-B7ogrJ6f.js → vue-ui-galaxy-B1Vuz8CA.js} +1 -1
- package/dist/{vue-ui-gauge-CrmzNkjT.js → vue-ui-gauge-1MgZSPXt.js} +1 -1
- package/dist/{vue-ui-geo-BbTvWbfX.js → vue-ui-geo-BV8ARcaX.js} +1 -1
- package/dist/{vue-ui-gizmo-C3wgMKwb.js → vue-ui-gizmo-DtsERB-E.js} +1 -1
- package/dist/{vue-ui-graph-CzUVEiO-.js → vue-ui-graph-BVTPTDl5.js} +1 -1
- package/dist/{vue-ui-heatmap-BxR2ccwd.js → vue-ui-heatmap-6YwaVr3F.js} +1 -1
- package/dist/{vue-ui-hill-BDOd7LrC.js → vue-ui-hill-BvrNT8KZ.js} +1 -1
- package/dist/{vue-ui-history-plot-0-vs_CVn.js → vue-ui-history-plot-CJIILQPt.js} +1 -1
- package/dist/{vue-ui-horizontal-bar-C5pNTRKB.js → vue-ui-horizontal-bar-Dfo-kTqg.js} +1 -1
- package/dist/{vue-ui-kpi-Dfhsk0U1.js → vue-ui-kpi-DHfExr9d.js} +1 -1
- package/dist/{vue-ui-molecule-DUX1NUIY.js → vue-ui-molecule-C8e5IeHG.js} +1 -1
- package/dist/{vue-ui-mood-radar-B1N5AwX_.js → vue-ui-mood-radar-DsnT2U65.js} +1 -1
- package/dist/{vue-ui-nested-donuts-CfHH-cU6.js → vue-ui-nested-donuts-JkpqMhuL.js} +1 -1
- package/dist/{vue-ui-onion-DRN-jIvq.js → vue-ui-onion-CIA2tlff.js} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-UUPjQABF.js → vue-ui-parallel-coordinate-plot-Bcr3B3NI.js} +1 -1
- package/dist/{vue-ui-quadrant-zmtzn0lM.js → vue-ui-quadrant-DKVFawhC.js} +1 -1
- package/dist/{vue-ui-quick-chart-DgU_IhKY.js → vue-ui-quick-chart-Bk2N8Hmd.js} +1 -1
- package/dist/{vue-ui-radar-BGSoxRaK.js → vue-ui-radar-CdH-BFKA.js} +1 -1
- package/dist/{vue-ui-relation-circle-XUw5UMrt.js → vue-ui-relation-circle-COZpOybS.js} +1 -1
- package/dist/{vue-ui-ridgeline-B5RJcFyA.js → vue-ui-ridgeline-MLknaTUO.js} +1 -1
- package/dist/{vue-ui-rings-BJaCLH2Q.js → vue-ui-rings-ARqLCM_P.js} +1 -1
- package/dist/{vue-ui-scatter-BA0hk_Tf.js → vue-ui-scatter-CX2wsXdE.js} +1 -1
- package/dist/{vue-ui-skeleton-DpzaXPO3.js → vue-ui-skeleton-wyvAru88.js} +1 -1
- package/dist/{vue-ui-spark-trend-DJ63XtgQ.js → vue-ui-spark-trend-C02PmIq_.js} +1 -1
- package/dist/{vue-ui-sparkbar-C5wP9R67.js → vue-ui-sparkbar-CjD57-Xi.js} +1 -1
- package/dist/{vue-ui-sparkgauge-DQcAOGuG.js → vue-ui-sparkgauge-8Eia8T2W.js} +1 -1
- package/dist/{vue-ui-sparkhistogram-BBiCxX6W.js → vue-ui-sparkhistogram-C-0f7XCl.js} +1 -1
- package/dist/{vue-ui-sparkline-B_GkB9V_.js → vue-ui-sparkline-BMMrpUPR.js} +1 -1
- package/dist/{vue-ui-sparkstackbar-DSRXhqhJ.js → vue-ui-sparkstackbar-BmgCVCKG.js} +1 -1
- package/dist/{vue-ui-stackbar-QjOQHbld.js → vue-ui-stackbar-G_zZRAa9.js} +1 -1
- package/dist/{vue-ui-stackline-CoII13bc.js → vue-ui-stackline-DchZoEAg.js} +1 -1
- package/dist/{vue-ui-strip-plot-d3UoFFrf.js → vue-ui-strip-plot-DVyPa3sp.js} +1 -1
- package/dist/{vue-ui-table-CHFjZzW7.js → vue-ui-table-qTF_q-Qu.js} +1 -1
- package/dist/{vue-ui-table-sparkline-BkZ7sn4X.js → vue-ui-table-sparkline-B2Q-7-GQ.js} +1 -1
- package/dist/{vue-ui-thermometer-B--g_Lkt.js → vue-ui-thermometer-CxNoxslq.js} +1 -1
- package/dist/{vue-ui-timer-DmwEWrDh.js → vue-ui-timer-DRjoRidI.js} +1 -1
- package/dist/{vue-ui-tiremarks-160Gx7-3.js → vue-ui-tiremarks-BC_YGp3T.js} +1 -1
- package/dist/{vue-ui-treemap-B-Yjtob0.js → vue-ui-treemap-CNM5ohoO.js} +1 -1
- package/dist/{vue-ui-waffle-BhzLg5ip.js → vue-ui-waffle-BiJshI4O.js} +1 -1
- package/dist/{vue-ui-wheel-DHb4G42X.js → vue-ui-wheel-BxR0_iNZ.js} +1 -1
- package/dist/{vue-ui-word-cloud-BcpreM7A.js → vue-ui-word-cloud-CZzC3R1K.js} +1 -1
- package/dist/{vue-ui-world-BD9acchj.js → vue-ui-world-CJgt0ESz.js} +1 -1
- package/dist/{vue-ui-xy-C-2Phexw.js → vue-ui-xy-B6XNUCzQ.js} +1 -1
- package/dist/{vue-ui-xy-CB3lQs2m.js → vue-ui-xy-DrKVPSg7.js} +1 -1
- package/package.json +1 -1
- package/dist/package-CgIKu3rP.js +0 -1
- package/dist/vue-data-ui-CrOhFey9.js +0 -1
- package/dist/vue-ui-donut-BQGnUso2.js +0 -22
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Ct as r,D as i,Dt as a,F as o,Ht as s,Jt as c,P as l,Qt as u,S as d,X as f,_ as p,at as m,b as h,i as g,in as ee,jt as te,nt as ne,pt as re,t as ie,tn as ae,v as oe,w as se,yt as ce,zt as le}from"./lib-rPeBMZrn.js";import{n as ue,t as de}from"./BaseScanner-8NdoBs7B.js";import{n as fe,t as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as he}from"./resolveChartConfig-CIhClE5R.js";import{t as ge}from"./img-D4RQwASc.js";import{n as _e}from"./Title-BliHuXfT.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{n as ye,t as be}from"./tableIntegration-CNoJ1CIY.js";import{n as xe,t as Se}from"./annotationSlots-BRR85CqJ.js";import{n as Ce,t as we}from"./userOptionsSlots-DYuo-E5m.js";import{t as Te}from"./usePrinter-DVf3YcG5.js";import{t as Ee}from"./useTransitions-ChGGrtrv.js";import{t as De}from"./useSvgLabelLayout-42Kats14.js";import{t as Oe}from"./Shape-CRe8woTu.js";import{t as ke}from"./useResponsive-CENUxfEL.js";import{t as Ae}from"./DefGrad-DKMq1REY.js";import{t as je}from"./BaseLegendToggle-Q3TiW9u1.js";import{t as Me}from"./A11yDataTable-DWNlWXzs.js";import{t as Ne}from"./useUserOptionState-CXlFnwPv.js";import{t as Pe}from"./useChartAccessibility-DOMuYJfm.js";import{t as Fe}from"./Legend-DM0ClX3D.js";import{t as Ie}from"./vue_ui_scatter-C50uFYQL.js";import{Fragment as _,Teleport as Le,computed as v,createBlock as y,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as Re,createTextVNode as ze,createVNode as Be,defineAsyncComponent as Ve,guardReactiveProps as He,mergeProps as Ue,nextTick as We,normalizeClass as Ge,normalizeProps as Ke,normalizeStyle as qe,onBeforeUnmount as Je,onMounted as Ye,openBlock as C,ref as w,renderList as T,renderSlot as E,resolveDynamicComponent as Xe,shallowRef as Ze,toDisplayString as D,toRefs as Qe,unref as O,watch as $e,withCtx as k}from"vue";var et=/* @__PURE__ */ e({default:()=>wn}),tt=[`id`],nt=[`id`],rt={key:0,class:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`},it=[`id`],at={style:{position:`relative`}},ot=[`xmlns`,`aria-describedby`,`viewBox`],st=[`width`,`height`],ct={key:1},lt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ut=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],dt={key:2},ft=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],pt=[`opacity`],mt=[`stroke`,`stroke-width`,`d`],ht=[`transform`,`font-size`,`fill`,`stroke`],gt={key:4},_t=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],vt=[`opacity`],yt=[`d`,`stroke`,`stroke-width`],bt=[`transform`,`font-size`,`fill`,`stroke`],xt={key:6},St=[`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`,`rx`],Ct=[`x`,`y`,`width`,`height`,`onMouseenter`],wt={key:2,style:{"pointer-events":`none`}},Tt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`],Et=[`x1`,`x2`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Dt=[`x1`,`x2`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Ot=[`x`,`y`,`height`,`width`,`fill`,`stroke`,`stroke-width`,`rx`],kt=[`x`,`y`,`width`,`height`,`onMouseenter`],At={key:2,style:{"pointer-events":`none`}},jt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`],Mt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Nt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Pt={key:0,style:{"pointer-events":`none`}},Ft=[`d`,`stroke`,`stroke-width`],It=[`d`,`stroke`,`stroke-width`],Lt=[`d`,`stroke`,`stroke-width`],Rt=[`d`,`stroke`,`stroke-width`],zt={key:7},Bt=[`points`,`fill`,`stroke-width`,`stroke-dasharray`,`stroke`],Vt={key:0,class:`vue-ui-scatter-datapoint`},Ht=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onMouseover`,`onMouseleave`,`onClick`],Ut={key:1},Wt=[`transform`,`font-size`,`fill`,`onMouseover`,`onMouseleave`,`onClick`],Gt=[`d`,`fill`,`stroke`,`stroke-width`,`stroke-opacity`],Kt={key:0,style:{"pointer-events":`none`}},qt=[`x`,`y`,`width`,`height`],Jt={key:0,style:{"pointer-events":`none !important`}},Yt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Xt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Zt=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],Qt=[`x`,`y`,`font-size`,`fill`,`font-weight`],$t=[`x`,`y`,`font-size`,`fill`],en=[`x`,`y`,`font-size`,`fill`],tn=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],nn=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],rn=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],an=[`id`,`transform`,`font-size`,`font-weight`,`fill`],on=[`font-size`,`fill`,`transform`],sn=[`transform`,`font-size`,`fill`],cn=[`x`,`y`,`font-size`,`fill`],ln=[`x`,`y`,`font-size`,`fill`],un=[`font-size`,`font-weight`,`fill`,`x`,`y`],dn=[`id`],fn=[`x`,`y`,`width`,`height`],pn={key:14,style:{pointerEvents:`none`}},mn=[`x1`,`x2`,`y1`,`y2`,`stroke-dasharray`,`stroke`,`stroke-width`,`clip-path`],hn=[`x`,`y`,`fill`,`font-size`,`font-weight`],gn={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},_n={key:6,class:`vue-data-ui-watermark`},vn=[`id`],yn=[`onClick`],bn={key:0,style:{width:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`}},xn={viewBox:`0 0 20 20`,height:`20`,width:`20`,style:{overflow:`hidden`,background:`transparent`}},Sn={key:0},Cn=[`innerHTML`],wn=/*#__PURE__*/ me({__name:`vue-ui-scatter`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`,`selectLegend`],setup(e,{expose:me,emit:et}){let wn=Ve(()=>import(`./Tooltip-C1q0Qoh7.js`)),Tn=Ve(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),En=Ve(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),Dn=Ve(()=>import(`./DataTable-0Vv-aGHD.js`)),On=Ve(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),kn=Ve(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),An=Ve(()=>import(`./PackageVersion-
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Ct as r,D as i,Dt as a,F as o,Ht as s,Jt as c,P as l,Qt as u,S as d,X as f,_ as p,at as m,b as h,i as g,in as ee,jt as te,nt as ne,pt as re,t as ie,tn as ae,v as oe,w as se,yt as ce,zt as le}from"./lib-rPeBMZrn.js";import{n as ue,t as de}from"./BaseScanner-8NdoBs7B.js";import{n as fe,t as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as he}from"./resolveChartConfig-CIhClE5R.js";import{t as ge}from"./img-D4RQwASc.js";import{n as _e}from"./Title-BliHuXfT.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{n as ye,t as be}from"./tableIntegration-CNoJ1CIY.js";import{n as xe,t as Se}from"./annotationSlots-BRR85CqJ.js";import{n as Ce,t as we}from"./userOptionsSlots-DYuo-E5m.js";import{t as Te}from"./usePrinter-DVf3YcG5.js";import{t as Ee}from"./useTransitions-ChGGrtrv.js";import{t as De}from"./useSvgLabelLayout-42Kats14.js";import{t as Oe}from"./Shape-CRe8woTu.js";import{t as ke}from"./useResponsive-CENUxfEL.js";import{t as Ae}from"./DefGrad-DKMq1REY.js";import{t as je}from"./BaseLegendToggle-Q3TiW9u1.js";import{t as Me}from"./A11yDataTable-DWNlWXzs.js";import{t as Ne}from"./useUserOptionState-CXlFnwPv.js";import{t as Pe}from"./useChartAccessibility-DOMuYJfm.js";import{t as Fe}from"./Legend-DM0ClX3D.js";import{t as Ie}from"./vue_ui_scatter-C50uFYQL.js";import{Fragment as _,Teleport as Le,computed as v,createBlock as y,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as Re,createTextVNode as ze,createVNode as Be,defineAsyncComponent as Ve,guardReactiveProps as He,mergeProps as Ue,nextTick as We,normalizeClass as Ge,normalizeProps as Ke,normalizeStyle as qe,onBeforeUnmount as Je,onMounted as Ye,openBlock as C,ref as w,renderList as T,renderSlot as E,resolveDynamicComponent as Xe,shallowRef as Ze,toDisplayString as D,toRefs as Qe,unref as O,watch as $e,withCtx as k}from"vue";var et=/* @__PURE__ */ e({default:()=>wn}),tt=[`id`],nt=[`id`],rt={key:0,class:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`},it=[`id`],at={style:{position:`relative`}},ot=[`xmlns`,`aria-describedby`,`viewBox`],st=[`width`,`height`],ct={key:1},lt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ut=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],dt={key:2},ft=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],pt=[`opacity`],mt=[`stroke`,`stroke-width`,`d`],ht=[`transform`,`font-size`,`fill`,`stroke`],gt={key:4},_t=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],vt=[`opacity`],yt=[`d`,`stroke`,`stroke-width`],bt=[`transform`,`font-size`,`fill`,`stroke`],xt={key:6},St=[`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`,`rx`],Ct=[`x`,`y`,`width`,`height`,`onMouseenter`],wt={key:2,style:{"pointer-events":`none`}},Tt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`],Et=[`x1`,`x2`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Dt=[`x1`,`x2`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Ot=[`x`,`y`,`height`,`width`,`fill`,`stroke`,`stroke-width`,`rx`],kt=[`x`,`y`,`width`,`height`,`onMouseenter`],At={key:2,style:{"pointer-events":`none`}},jt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`],Mt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Nt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-dasharray`,`stroke-width`],Pt={key:0,style:{"pointer-events":`none`}},Ft=[`d`,`stroke`,`stroke-width`],It=[`d`,`stroke`,`stroke-width`],Lt=[`d`,`stroke`,`stroke-width`],Rt=[`d`,`stroke`,`stroke-width`],zt={key:7},Bt=[`points`,`fill`,`stroke-width`,`stroke-dasharray`,`stroke`],Vt={key:0,class:`vue-ui-scatter-datapoint`},Ht=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onMouseover`,`onMouseleave`,`onClick`],Ut={key:1},Wt=[`transform`,`font-size`,`fill`,`onMouseover`,`onMouseleave`,`onClick`],Gt=[`d`,`fill`,`stroke`,`stroke-width`,`stroke-opacity`],Kt={key:0,style:{"pointer-events":`none`}},qt=[`x`,`y`,`width`,`height`],Jt={key:0,style:{"pointer-events":`none !important`}},Yt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Xt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Zt=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],Qt=[`x`,`y`,`font-size`,`fill`,`font-weight`],$t=[`x`,`y`,`font-size`,`fill`],en=[`x`,`y`,`font-size`,`fill`],tn=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],nn=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],rn=[`x`,`y`,`font-size`,`fill`,`font-weight`,`text-anchor`],an=[`id`,`transform`,`font-size`,`font-weight`,`fill`],on=[`font-size`,`fill`,`transform`],sn=[`transform`,`font-size`,`fill`],cn=[`x`,`y`,`font-size`,`fill`],ln=[`x`,`y`,`font-size`,`fill`],un=[`font-size`,`font-weight`,`fill`,`x`,`y`],dn=[`id`],fn=[`x`,`y`,`width`,`height`],pn={key:14,style:{pointerEvents:`none`}},mn=[`x1`,`x2`,`y1`,`y2`,`stroke-dasharray`,`stroke`,`stroke-width`,`clip-path`],hn=[`x`,`y`,`fill`,`font-size`,`font-weight`],gn={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},_n={key:6,class:`vue-data-ui-watermark`},vn=[`id`],yn=[`onClick`],bn={key:0,style:{width:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`}},xn={viewBox:`0 0 20 20`,height:`20`,width:`20`,style:{overflow:`hidden`,background:`transparent`}},Sn={key:0},Cn=[`innerHTML`],wn=/*#__PURE__*/ me({__name:`vue-ui-scatter`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`,`selectLegend`],setup(e,{expose:me,emit:et}){let wn=Ve(()=>import(`./Tooltip-C1q0Qoh7.js`)),Tn=Ve(()=>import(`./BaseIcon-Cm-IJ179.js`).then(e=>e.n)),En=Ve(()=>import(`./vue-ui-accordion-S3nRtTU-.js`).then(e=>e.n)),Dn=Ve(()=>import(`./DataTable-0Vv-aGHD.js`)),On=Ve(()=>import(`./PenAndPaper-BGEp-TUm.js`).then(e=>e.t)),kn=Ve(()=>import(`./UserOptions-uWHV_zPB.js`).then(e=>e.n)),An=Ve(()=>import(`./PackageVersion-DhptF5oD.js`).then(e=>e.t)),jn=Ve(()=>import(`./BaseDraggableDialog-DHgIPVmz.js`).then(e=>e.n)),{vue_ui_scatter:Mn}=t(),A=e,Nn=et,Pn=v(()=>!!A.dataset&&A.dataset.length),j=w(f()),Fn=w(!1),In=w(``),Ln=w(0),Rn=w(null),zn=w(null),Bn=w(null),Vn=w(null),Hn=w(null),Un=w(0),Wn=w(0),Gn=w(0),M=w([]),Kn=w(!1),qn=w(null),Jn=w(null),Yn=w(null),Xn=w(null),Zn=w(null),Qn=w(null),$n=w(null),er=w(null),tr=w(null),nr=w(null),rr=w(null),ir=w({x:0,y:0}),ar=w(`pointer`),or=w(!1),sr=w(null),N=w(br()),P=v(()=>N.value.userOptions),F=v(()=>N.value.style.layout.dataLabels.xAxis),I=v(()=>N.value.style.layout.dataLabels.yAxis),L=v(()=>N.value.style.layout.marginalBars),R=v(()=>N.value.style.layout.plots),z=v(()=>N.value.style.tooltip),B=v(()=>N.value.style);fe({config:()=>N.value,dataset:()=>A.dataset,component:`VueUiScatter`,rules:[pe.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series (clusters) is > 6. Consider:`,``,``,`▶️ Using filters to let users choose a maximum number of series (clusters) to display.`]}]});let{transitionEnabled:cr}=Ee({config:()=>N.value.transitions,dataset:()=>A.dataset}),lr=v(()=>N.value.userOptions.useCursorPointer),ur=v(()=>a(N.value.events?.datapointClick));function dr(e=100,t=.8,n={}){let{meanX:r=0,sdX:i=1,meanY:a=0,sdY:o=1,seed:s}=n,c=(s??Math.floor(Math.random()*2**31))>>>0,l=()=>(c=c*1664525+1013904223>>>0,c/2**32),u=()=>{let e=0,t=0;for(;e===0;)e=l();for(;t===0;)t=l();return Math.sqrt(-2*Math.log(e))*Math.cos(2*Math.PI*t)},d=e/2,f=Array.from({length:d},u),p=Array.from({length:d},u),m=e=>e.reduce((e,t)=>e+t,0)/e.length,h=m(f),g=m(p);for(let e=0;e<d;e+=1)f[e]-=h,p[e]-=g;let ee=(e,t)=>e.reduce((e,n,r)=>e+n*t[r],0),te=e=>ee(e,e),ne=ee(p,f)/te(f),re=p.map((e,t)=>e-ne*f[t]),ie=te(f)/d,ae=te(re)/d,oe=Math.sqrt((1-t*t)*ie/ae),se=f.map((e,n)=>t*e+oe*re[n]),ce=f.concat(f.map(e=>-e)),le=se.concat(se.map(e=>-e)),ue=e=>Math.sqrt(te(e)/e.length),de=(e,t,n)=>{let r=ue(e);return e.map(e=>n+(r?e/r*t:0))},fe=de(ce,i,r),pe=de(le,o,a);for(let e=fe.length-1;e>0;--e){let t=Math.floor(l()*(e+1));[fe[e],fe[t]]=[fe[t],fe[e]],[pe[e],pe[t]]=[pe[t],pe[e]]}return fe.map((e,t)=>({x:e,y:pe[t]}))}let fr=v(()=>ee({defaultConfig:{userOptions:{show:!1},table:{show:!1},useCssAnimation:!1,style:{backgroundColor:`#99999930`,layout:{axis:{stroke:`#6A6A6A`},correlation:{label:{show:!1}},dataLabels:{xAxis:{show:!1},yAxis:{show:!1}},marginalBars:{fill:`#99999960`},padding:{top:12,right:12,bottom:12,left:12},plots:{stroke:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}},userConfig:N.value.skeletonConfig??{}})),{loading:pr,FINAL_DATASET:mr,manualLoading:hr}=ue({...Qe(A),FINAL_CONFIG:N,prepareConfig:br,skeletonDataset:A.config?.skeletonDataset??[{name:``,color:`#999999`,values:dr(100,.5,{seed:42})}],skeletonConfig:ee({defaultConfig:N.value,userConfig:fr.value})}),{userOptionsVisible:gr,setUserOptionsVisibility:_r,keepUserOptionState:vr}=Ne({config:N.value}),{svgRef:yr}=Pe({config:B.value.title});function br(){return he(A.config,Mn,Ie)}let xr=u(A.config);$e(()=>A.config,(e,t)=>{let n=u(e),r=n!==xr;xr=n;let i=br();r?(pr.value||(N.value=i),gr.value=!N.value.userOptions.showOnChartHover,Dr(),Un.value+=1,Wn.value+=1,Gn.value+=1,V.value.showTable=N.value.table.show,V.value.showTooltip=z.value.show,Er.value&&N.value.usePerformanceMode&&console.warn(`VueUiScatter : You are using performance mode
|
|
2
2
|
|
|
3
3
|
- downsampling is disabled in this mode, all plots are rendered
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{B as n,Jt as r,M as i,X as ee,t as a}from"./lib-rPeBMZrn.js";import{n as te,t as ne}from"./useHints-C-TwxM0Y.js";import{t as o}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as re}from"./useNestedProp-DnGoh-XS.js";import{t as ie}from"./DefGrad-DKMq1REY.js";import{n as s}from"./PackageVersion-CXT-eAuk.js";import{Fragment as c,computed as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createStaticVNode as p,createVNode as m,normalizeClass as ae,normalizeStyle as h,openBlock as g,ref as _,renderList as v,unref as y}from"vue";var b=/* @__PURE__ */ e({default:()=>G}),oe=[`id`],se=[`xmlns`],ce={transform:`translate(300, 300)`},le=[`d`,`fill`,`stroke`],ue=[`xmlns`],x=[`fill`,`stroke`],S=[`fill`,`stroke`],C=[`fill`,`stroke`],w=[`fill`,`stroke`],T=[`fill`,`stroke`],E=[`xmlns`],D=[`stroke`],O=[`stroke`],k=[`stroke`],A=[`fill`,`stroke`],j=[`fill`],M=[`fill`,`stroke`],N=[`fill`],P=[`fill`,`stroke`],F=[`fill`],I=[`fill`,`stroke`],L=[`fill`],R=[`fill`,`stroke`],z=[`fill`],B=[`fill`,`stroke`],V=[`fill`],H=[`xmlns`],U=[`stroke`],de=[`stroke`],fe=[`stroke`],pe=[`stroke`],me=[`stroke`],he=[`stroke`],ge=[`stroke`],_e=[`stroke`],ve=[`stroke`],ye=[`xmlns`],be=[`stroke`,`fill`],xe=[`xmlns`],Se=[`stroke`,`fill`],Ce=[`xmlns`],we=[`fill`],Te=[`fill`],Ee=[`fill`],De=[`fill`],Oe=[`xmlns`],ke=[`stroke`],Ae=[`fill`],je=[`stroke`,`fill`],Me=[`stroke`,`fill`],Ne=[`fill`],Pe=[`stroke`,`fill`],Fe=[`stroke`,`fill`],Ie=[`fill`],Le=[`stroke`,`fill`],Re=[`stroke`,`fill`],ze=[`fill`],Be=[`stroke`,`fill`],Ve=[`stroke`,`fill`],He=[`fill`],Ue=[`stroke`,`fill`],We=[`stroke`,`fill`],Ge=[`xmlns`],Ke=[`stroke`],qe=[`stroke`],Je=[`stroke`,`fill`],Ye=[`stroke`,`fill`],Xe=[`stroke`,`fill`],Ze=[`stroke`,`fill`],Qe=[`stroke`,`fill`],$e=[`stroke`,`fill`],et=[`stroke`,`fill`],tt=[`stroke`,`fill`],nt=[`stroke`,`fill`],rt=[`stroke`,`fill`],it=[`stroke`,`fill`],at=[`stroke`,`fill`],ot=[`stroke`,`fill`],st=[`stroke`,`fill`],ct=[`stroke`,`fill`],lt=[`stroke`,`fill`],ut=[`stroke`,`fill`],dt=[`stroke`,`fill`],ft=[`stroke`,`fill`],pt=[`stroke`,`fill`],mt=[`stroke`,`fill`],ht=[`stroke`,`fill`],gt=[`stroke`,`fill`],_t=[`xmlns`],vt=[`stroke`],yt=[`xmlns`],bt=[`stroke`],xt=[`xmlns`],St=[`stroke`],Ct=[`xmlns`],wt=[`fill`],Tt=[`fill`],Et=[`fill`],Dt=[`fill`],Ot=[`fill`],kt=[`fill`],At=[`fill`],jt=[`fill`],Mt=[`fill`],Nt=[`fill`],Pt=[`fill`],Ft=[`fill`],It=[`xmlns`],Lt=[`stroke`],Rt=[`stroke`],zt=[`stroke`],Bt=[`stroke`],Vt=[`stroke`],Ht=[`stroke`],Ut=[`xmlns`],Wt=[`stroke`],Gt=[`stroke`],Kt=[`stroke`],qt=[`stroke`],Jt=[`stroke`],Yt=[`stroke`],Xt=[`stroke`],Zt=[`stroke`],Qt=[`stroke`],$t=[`xmlns`],en=[`stroke`],tn=[`xmlns`],nn=[`stroke`],rn=[`stroke`],an=[`stroke`],on=[`stroke`],sn=[`stroke`],cn=[`stroke`],ln=[`stroke`],un=[`stroke`],dn=[`stroke`],fn=[`xmlns`],pn=[`x1`,`x2`,`stroke`],mn=[`xmlns`],hn=[`x`,`y`,`width`,`height`,`fill`],gn=[`y`,`width`,`height`,`fill`],_n=[`xmlns`],vn=[`fill`],yn=[`fill`],bn=[`fill`],xn=[`xmlns`],Sn=[`x1`,`x2`,`y1`,`y2`,`stroke`],Cn=[`stroke`],wn=[`fill`],Tn=[`xmlns`],En=[`fill`],Dn=[`fill`],On=[`x1`,`y1`,`x2`,`y2`,`stroke-width`,`stroke`],kn=[`xmlns`],An={key:0},jn=[`stroke`,`stroke-width`],Mn=[`stroke`,`stroke-width`],Nn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Pn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Fn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],In=[`x`,`y`,`height`,`width`,`fill`],Ln=[`xmlns`,`viewBox`],Rn=[`x`,`y`,`stroke`,`fill`],zn=[`xmlns`],Bn=[`d`,`stroke`],Vn=[`cx`,`cy`,`r`,`fill`,`stroke`],Hn=[`cx`,`cy`,`r`,`fill`,`stroke`],Un=[`x`,`y`,`width`,`fill`],Wn=[`cx`,`cy`,`fill`],Gn=[`cx`,`cy`,`fill`],Kn=[`stroke`],qn=[`xmlns`],Jn=[`stroke`,`stroke-width`],Yn=[`stroke`,`stroke-width`],Xn=[`stroke`,`stroke-width`],Zn=[`fill`],Qn=[`fill`],$n=[`fill`],er=[`fill`],tr=[`fill`],nr=[`fill`],rr=[`xmlns`],ir={key:0},ar=[`stroke`,`stroke-width`],or=[`stroke`,`stroke-width`],sr=[`stroke`,`stroke-width`],cr={key:1},lr=[`r`,`fill`],ur=[`r`,`fill`],dr=[`xmlns`],fr={key:0},pr=[`stroke`,`stroke-width`],mr=[`stroke`,`stroke-width`],hr=[`fill`,`rx`,`x`,`y`,`width`,`height`],gr=[`xmlns`],_r=[`stroke-width`,`stroke`],vr=[`stroke-width`,`stroke`],yr=[`stroke-width`,`stroke`],br=[`xmlns`],xr=[`stroke`],Sr=[`stroke`],Cr=[`stroke`],wr=[`stroke`],Tr=[`fill`],Er=[`stroke`],Dr=[`xmlns`],Or=[`stroke`,`stroke-width`],kr=[`stroke`,`stroke-width`],Ar=[`fill`,`r`],jr=[`fill`,`r`],Mr=[`fill`,`r`],Nr=[`fill`,`r`],Pr=[`fill`,`r`],Fr=[`fill`,`r`],Ir=[`fill`,`r`],Lr=[`fill`,`r`],Rr=[`fill`,`r`],zr=[`xmlns`],Br=[`d`,`stroke`,`stroke-width`],Vr=[`d`,`stroke`,`stroke-width`],Hr=[`d`,`stroke`,`stroke-width`],Ur=[`d`,`stroke`,`stroke-width`],Wr=[`stroke`,`stroke-width`],Gr=[`stroke`,`stroke-width`],Kr=[`stroke`,`stroke-width`],qr=[`fill`],Jr=[`fill`],Yr=[`xmlns`],Xr=[`x`,`y`,`fill`],Zr=[`x`,`y`,`fill`],Qr=[`x`,`y`,`fill`],$r=[`xmlns`],ei=[`fill`],ti=[`fill`],ni=[`y1`,`y2`,`stroke`,`stroke-width`],ri=[`x1`,`x2`,`stroke`,`stroke-width`],ii=[`xmlns`,`stroke`],ai=[`fill`],oi=[`xmlns`,`stroke`],si=[`xmlns`,`stroke`],ci=[`fill`],li=[`xmlns`,`stroke`],ui=[`xmlns`,`stroke`],di=[`fill`],fi=[`xmlns`,`stroke`],pi=[`xmlns`,`stroke`],mi=[`fill`],hi=[`xmlns`,`stroke`],W=[`xmlns`,`stroke`],gi=[`fill`],_i=[`xmlns`,`stroke`],vi=[`xmlns`],yi=[`points`,`fill`,`stroke`,`stroke-width`],bi=[`xmlns`],xi={key:0},Si=[`stroke`,`stroke-width`],Ci=[`y`,`width`,`fill`,`rx`],G=/*#__PURE__*/ o({__name:`vue-ui-skeleton`,props:{config:{type:Object,default(){return{}}}},setup(e){let{vue_ui_skeleton:o}=t(),b=e,G=_(`vue-ui-skeleton-${ee()}`),K=l(()=>re({userConfig:b.config,defaultConfig:o})),q=l(()=>K.value.style);te({config:()=>K.value,dataset:()=>[],component:`VueUiSkeleton`,rules:[ne.noHint]});let wi=l(()=>K.value.style.animated),J=l(()=>K.value.type),Ti=_([60,50,55,36,40,25,26,12]),Ei=l(()=>i({plot:{x:50,y:50},radius:40,sides:6}).path),Di=l(()=>i({plot:{x:50,y:50},radius:30,sides:6}).path),Oi=l(()=>i({plot:{x:50,y:50},radius:20,sides:6}).path),ki=l(()=>i({plot:{x:50,y:50},radius:10,sides:6}).path),Y=_([{root:{x:70,y:77,r:44,opacity:100},bars:[{x:200,y:37,opacity:100,width:240},{x:200,y:118,opacity:100,width:180},{x:200,y:253,opacity:100,width:80}]},{root:{x:70,y:177,r:32,opacity:70},bars:[{x:200,y:145,opacity:70,width:160},{x:200,y:172,opacity:70,width:140},{x:200,y:199,opacity:70,width:120}]},{root:{x:70,y:257,r:24,opacity:40},bars:[{x:200,y:64,opacity:40,width:220},{x:200,y:91,opacity:40,width:200},{x:200,y:226,opacity:40,width:100}]}]),X=_([{y:200,height:100,bar:50},{y:180,height:100,bar:40},{y:150,height:100,bar:30},{y:120,height:80,bar:50},{y:110,height:60,bar:30},{y:80,height:80,bar:10},{y:50,height:80,bar:40},{y:24,height:40,bar:24},{y:44,height:20,bar:13},{y:32,height:45,bar:19}]),Z=_([[3,2.5],[4,3.1],[8,6],[9.5,6.5],[12,11],[16,15],[18,18.2],[25,24],[24,26],[32,32],[33,32],[32,31],[38,37],[37,38],[42,41],[40,41],[44,45],[38,35],[31,32]]),Q=_([{x:40,y:30},{x:45,y:28},{x:50,y:25},{x:55,y:20},{x:60,y:27},{x:65,y:14},{x:70,y:23},{x:75,y:16},{x:80,y:25},{x:85,y:10},{x:90,y:18},{x:95,y:7},{x:100,y:12},{x:105,y:10},{x:110,y:20},{x:115,y:7},{x:120,y:14},{x:125,y:10},{x:130,y:19},{x:135,y:3},{x:140,y:10},{x:145,y:2},{x:150,y:1}]);function $(e,t=1){let n=29.85;return{x:200+160*Math.cos(n+e*Math.PI/180)*t,y:200+160*Math.sin(n+e*Math.PI/180)*t}}let Ai=l(()=>{let e=[];for(let t=0;t<100;t+=1)e.push({x1:$(360/100*t).x,y1:$(360/100*t).y,x2:$(360/100*t,.9).x,y2:$(360/100*t,.9).y,color:K.value.style.wheel.color});return e}),ji=_([`M1.74 203.99A204 204 0 01-131.29-156.13l15.44 18.36A180 180 0 001.53 179.99Z`,`M-123.33-162.5A204 204 0 01-10.2-203.75L-9-179.78a180 180 0 00-99.82 36.4Z`,`M0-180A180 180 0 01175.19 41.33l23.36 5.51A204 204 0 000-204Z`,`M172.91 50.03A180 180 0 0110.53 179.69l1.4 23.96A204 204 0 00195.96 56.7Z`,`M-166.87-67.49a180 180 0 0151.02-70.28Q0 0 119.83-134.32a180 180 0 0152.13 81.13Q0 0-166.87-67.49Z`,`M-29.99-177.48a180 180 0 0110.73-1.49Q0 0 112.89 140.2A180 180 0 0153.63 171.83Q0 0-29.99-177.48Z`,`M179.71 10.29a180 180 0 01-4.52 31.04Q0 0-40.87-175.3a180 180 0 0110.88-2.18Q0 0 179.71 10.29Z`,`M-19.26-178.97Q0 0-166.87-67.49a180 180 0 00-12.14 86.36Q0 0-9-179.78a180 180 0 00-10.26.81Z`,`M-108.82-143.38Q0 0-40.87-175.3a180 180 0 00-67.95 31.92Q0 0-40.87-175.3a180 180 0 00-67.95 31.92Z`,`M0-180a180 180 0 01119.83 45.68Q0 0 0-180a180 180 0 01119.83 45.68Q0 0 0-180Z`,`M-148.85 101.22Q0 0-179.01 18.87a180 180 0 0030.16 82.35Q0 0-179.01 18.87a180 180 0 0030.16 82.35Z`,`M1.53 179.99Q0 0 31.73 177.18a180 180 0 0021.9-5.35Q0 0-148.85 101.22A180 180 0 001.53 179.99Z`,`M31.73 177.18a180 180 0 01-21.2 2.51Q0 0 171.96-53.19a180 180 0 017.75 63.48Q0 0 31.73 177.18Z`,`M172.91 50.03Q0 0 112.89 140.2a180 180 0 0060.02-90.17Q0 0 112.89 140.2a180 180 0 0060.02-90.17Z`]);return(e,t)=>(g(),d(`div`,{id:G.value,class:ae({"vue-data-ui-component":!0,"vue-ui-skeleton":!0,"vue-ui-skeleton-animated":wi.value}),style:h(`background:${q.value.backgroundColor};color:${q.value.color};display:flex;align-items:center;justify-content:center;`)},[J.value===`chord`?(g(),d(`svg`,{key:0,xmlns:y(a),width:`100%`,viewBox:`0 0 600 600`,style:h({background:q.value.backgroundColor})},[m(s),f(`g`,ce,[(g(!0),d(c,null,v(ji.value,(e,t)=>(g(),d(`path`,{key:e,d:e,fill:q.value.chord.color,stroke:q.value.backgroundColor,"stroke-width":`2`,style:h({opacity:t>3?.6:1})},null,12,le))),128))])],12,se)):u(``,!0),J.value===`ridgeline`?(g(),d(`svg`,{key:1,xmlns:y(a),width:`100%`,viewBox:`20 0 512 200`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`defs`,null,[m(ie,{t:`linear`,id:`ridgeline-gradient-${G.value}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,q.value.ridgeline.color,1],[`30%`,q.value.ridgeline.color,.7],[`70%`,q.value.ridgeline.color,.3],[`100%`,q.value.ridgeline.color,.1]]},null,8,[`id`,`stops`])]),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 60c6.18-.6 12.36-1.11 18.55-1.79 6.18-.68 12.37-2.38 18.55-2.4 6.19-.01 12.37 0 18.56-.01 6.18-.02 12.37-5.3 18.55-5.3 6.19 0 12.37 4.95 18.56 4.95 6.18 0 12.37-2.78 18.55-2.78 6.19 0 12.37 1.02 18.56 1.92 6.18.9 12.37 4.58 18.55 4.58s12.37-6.71 18.55-6.71c6.19 0 12.37.89 18.56.89 6.18 0 12.37-4.48 18.55-4.48 6.19 0 12.37 4.79 18.56 4.79 6.18 0 12.37-26.07 18.55-26.07 6.19 0 12.37 9.31 18.56 13.85 6.18 4.54 12.37 13.39 18.55 13.39 6.19 0 12.37-36.14 18.56-36.14 6.18 0 12.36 38.45 18.55 38.45 6.18 0 12.37-11.46 18.55-16.94 6.19-5.48 12.37-15.97 18.56-15.97 6.18 0 12.37 16.4 18.55 16.4 6.19 0 12.37-.12 18.56-.35 6.18-.22 12.37-38.08 18.55-38.08 6.19 0 12.37 24.07 18.56 36.1V60`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,x),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 90c6.18-.22 12.36-.35 18.55-.67 6.18-.32 12.37-1.65 18.55-1.65 6.19 0 12.37 1.66 18.56 1.66 6.18 0 12.37-8.76 18.55-8.76 6.19 0 12.37 4.15 18.56 4.15 6.18 0 12.37-8.44 18.55-8.44 6.19 0 12.37 10.87 18.56 10.87 6.18 0 12.37-9.21 18.55-12.16 6.18-2.96 12.37-6.97 18.55-6.97 6.19 0 12.37 9.59 18.56 12.77 6.18 3.18 12.37 7.6 18.55 7.6 6.19 0 12.37-24.44 18.56-24.44 6.18 0 12.37 16.97 18.55 16.97 6.19 0 12.37-20.62 18.56-20.62 6.18 0 12.37 20.37 18.55 20.37 6.19 0 12.37-13.13 18.56-13.13 6.18 0 12.36 13.51 18.55 13.51 6.18 0 12.37-26.41 18.55-26.41 6.19 0 12.37.49 18.56 1.26 6.18.78 12.37 13.82 18.55 13.82 6.19 0 12.37-5.3 18.56-8.3 6.18-3 12.37-9.81 18.55-9.81 6.19 0 12.37 19.82 18.56 29.72V90`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,S),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 120c6.18-.34 12.36-.55 18.55-1.01 6.18-.46 12.37-1.17 18.55-2.15 6.19-.99 12.37-3.7 18.56-4.69 6.18-.98 12.37-2.15 18.55-2.15 6.19 0 12.37.52 18.56 1.2 6.18.68 12.37 6.67 18.55 6.67 6.19 0 12.37-12.15 18.56-12.15 6.18 0 12.37 4.6 18.55 4.6S227.5 99.7 233.68 98.99c6.19-.71 12.37-1.18 18.56-1.18 6.18 0 12.37 17.75 18.55 18.22 6.19.48 12.37.74 18.56.74 6.18 0 12.37-17.09 18.55-17.09 6.19 0 12.37 12.68 18.56 12.68 6.18 0 12.37-.33 18.55-.67 6.19-.34 12.37-.79 18.56-2.06 6.18-1.26 12.36-25.45 18.55-25.45 6.18 0 12.37 10.35 18.55 10.35 6.19 0 12.37-21.07 18.56-21.07 6.18 0 12.37 33.27 18.55 33.27 6.19 0 12.37-26.97 18.56-26.97 6.18 0 12.37 26.97 18.55 27.36 6.19.4 12.37.41 18.56.61V120`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,C),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 150c6.18-.52 12.36-1.57 18.55-1.57 6.18 0 12.37 1.36 18.55 1.36 6.19 0 12.37-1.75 18.56-3.18 6.18-1.43 12.37-6.62 18.55-6.62 6.19 0 12.37 9.98 18.56 9.98 6.18 0 12.37-4.94 18.55-5.64 6.19-.71 12.37-.52 18.56-1.31 6.18-.78 12.37-12.43 18.55-12.43s12.37 18.52 18.55 18.52c6.19 0 12.37-2.49 18.56-2.49 6.18 0 12.37 3.02 18.55 3.02 6.19 0 12.37-29.39 18.56-29.39 6.18 0 12.37 5.56 18.55 8.36 6.19 2.81 12.37 5.14 18.56 8.47 6.18 3.34 12.37 12.25 18.55 12.25 6.19 0 12.37-4.3 18.56-8.78 6.18-4.48 12.36-28.77 18.55-28.77 6.18 0 12.37 1.29 18.55 3.02 6.19 1.72 12.37 18.36 18.56 18.36 6.18 0 12.37-7.68 18.55-12.92 6.19-5.24 12.37-18.51 18.56-20.1 6.18-1.58 12.37-2.7 18.55-2.7 6.19 0 12.37 34.69 18.56 52.04V150`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,w),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 180c6.18-.6 12.36-1.07 18.55-1.81 6.18-.74 12.37-2.86 18.55-2.86 6.19 0 12.37 2.14 18.56 2.14 6.18 0 12.37-7.08 18.55-7.08 6.19 0 12.37 1.08 18.56 2.03 6.18.95 12.37 4.75 18.55 4.75 6.19 0 12.37-2.45 18.56-4.62 6.18-2.17 12.37-10.99 18.55-10.99s12.37 9.58 18.55 9.58c6.19 0 12.37-.25 18.56-.69 6.18-.43 12.37-13.6 18.55-13.6 6.19 0 12.37 17.23 18.56 17.23 6.18 0 12.37-2.5 18.55-5.19 6.19-2.68 12.37-15.45 18.56-18 6.18-2.55 12.37-4.86 18.55-4.86 6.19 0 12.37 18.61 18.56 18.61 6.18 0 12.36-24.22 18.55-26.66 6.18-2.45 12.37-4.25 18.55-4.25 6.19 0 12.37 7.92 18.56 7.92 6.18 0 12.37-1.95 18.55-1.95 6.19 0 12.37 29.69 18.56 29.69 6.18 0 12.37-2.55 18.55-6.14 6.19-3.58 12.37-28.83 18.56-43.25v60`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,T)],12,ue)):u(``,!0),J.value===`historyPlot`?(g(),d(`svg`,{key:2,xmlns:y(a),width:`100%`,viewBox:`0 0 612 512`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`line`,{x1:`12`,x2:`12`,y1:`12`,y2:`500`,stroke:q.value.historyPlot.color,"stroke-width":`3`,"stroke-linecap":`round`},null,8,D),f(`line`,{x1:`12`,x2:`600`,y1:`500`,y2:`500`,stroke:q.value.historyPlot.color,"stroke-width":`3`,"stroke-linecap":`round`},null,8,O),f(`path`,{d:`M 80,100 300,200 400,150 560,230 360,420 230,320`,fill:`none`,stroke:q.value.historyPlot.color,"stroke-width":`3`},null,8,k),f(`circle`,{cx:`80`,cy:`100`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,A),f(`text`,{x:`80`,y:`108`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 1 `,8,j),f(`circle`,{cx:`300`,cy:`200`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,M),f(`text`,{x:`300`,y:`208`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 2 `,8,N),f(`circle`,{cx:`400`,cy:`150`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,P),f(`text`,{x:`400`,y:`158`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 3 `,8,F),f(`circle`,{cx:`560`,cy:`230`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,I),f(`text`,{x:`560`,y:`238`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 4 `,8,L),f(`circle`,{cx:`360`,cy:`420`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,R),f(`text`,{x:`360`,y:`428`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 5 `,8,z),f(`circle`,{cx:`230`,cy:`320`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,B),f(`text`,{x:`230`,y:`328`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 6 `,8,V)],12,E)):u(``,!0),J.value===`circlePack`?(g(),d(`svg`,{key:3,xmlns:y(a),width:`100%`,viewBox:`0 0 100 100`,style:h(`background:${q.value.backgroundColor}`)},[f(`circle`,{cx:50,cy:50,r:20,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,U),f(`circle`,{cx:80,cy:50,r:10,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,de),f(`circle`,{cx:28,cy:30,r:10,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,fe),f(`circle`,{cx:25,cy:76,r:16,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,pe),f(`circle`,{cx:60,cy:78.5,r:10,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,me),f(`circle`,{cx:64,cy:20,r:13,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,he),f(`circle`,{cx:72,cy:37,r:5,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,ge),f(`circle`,{cx:25,cy:45,r:5,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,_e),f(`circle`,{cx:70,cy:66,r:5,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,ve)],12,H)):u(``,!0),J.value===`flow`?(g(),d(`svg`,{key:4,xmlns:y(a),width:`100%`,viewBox:`0 0 80 60`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`path`,{d:`M5 5V55M75 5V55M28 5V55M52 5V55M5 8l23 4L52 9 75 8v4H52L28 21 5 29ZM5 34l23 1L52 24l23-3v6L52 30 28 44l24-5 23 2v6L52 45 28 52H5Z`,stroke:q.value.flow.color,"stroke-width":.8,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:q.value.flow.color},null,8,be)],12,ye)):u(``,!0),J.value===`parallelCoordinatePlot`?(g(),d(`svg`,{key:5,xmlns:y(a),width:`100%`,viewBox:`0 0 80 60`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`path`,{d:`M5 5V55M75 5V55M28 5V55M52 5V55M5 10a1 1 0 000 2 1 1 0 000-2m23 5a1 1 0 000 2 1 1 0 000-2M52 8a1 1 0 000 2 1 1 0 000-2m23 3a1 1 0 000 2 1 1 0 000-2M6 11l21 5m2 0L51 9m2 0 21 3M5 50a1 1 0 000-2 1 1 0 000 2M28 39a1 1 0 000 2 1 1 0 000-2m24 6a1 1 0 000 2 1 1 0 000-2m23 0a1 1 0 000 2 1 1 0 000-2M6 49l21-9m2 0 22 6m2 0H74M5 25a1 1 0 000 2 1 1 0 000-2m23 6a1 1 0 000 2 1 1 0 000-2m24-8a1 1 0 000 2 1 1 0 000-2m23-2a1 1 0 000 2 1 1 0 000-2M6 26l21 6m2 0 22-8m2 0 21-2`,stroke:q.value.parallelCoordinatePlot.color,"stroke-width":.8,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:q.value.parallelCoordinatePlot.color},null,8,Se)],12,xe)):u(``,!0),J.value===`bullet`?(g(),d(`svg`,{key:6,xmlns:y(a),width:`100%`,viewBox:`0 0 600 96`,style:h(`background:${q.value.backgroundColor}`)},[f(`rect`,{fill:q.value.bullet.color,x:24,y:12,width:300,height:72,style:{opacity:`0.8`}},null,8,we),f(`rect`,{fill:q.value.bullet.color,x:324,y:12,width:150,height:72,style:{opacity:`0.6`}},null,8,Te),f(`rect`,{fill:q.value.bullet.color,x:474,y:12,width:102,height:72,style:{opacity:`0.3`}},null,8,Ee),f(`rect`,{fill:q.value.bullet.color,x:24,y:36,width:490,height:24,style:{opacity:`1`}},null,8,De)],12,Ce)):u(``,!0),J.value===`dumbbell`?(g(),d(`svg`,{key:7,xmlns:y(a),width:`100%`,viewBox:`0 0 100 55`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`line`,{x1:`3`,x2:`3`,y1:`3`,y2:`67`,stroke:q.value.dumbbell.color,"stroke-width":.5,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,ke),f(`path`,{d:`
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{B as n,Jt as r,M as i,X as ee,t as a}from"./lib-rPeBMZrn.js";import{n as te,t as ne}from"./useHints-C-TwxM0Y.js";import{t as o}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as re}from"./useNestedProp-DnGoh-XS.js";import{t as ie}from"./DefGrad-DKMq1REY.js";import{n as s}from"./PackageVersion-DhptF5oD.js";import{Fragment as c,computed as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createStaticVNode as p,createVNode as m,normalizeClass as ae,normalizeStyle as h,openBlock as g,ref as _,renderList as v,unref as y}from"vue";var b=/* @__PURE__ */ e({default:()=>G}),oe=[`id`],se=[`xmlns`],ce={transform:`translate(300, 300)`},le=[`d`,`fill`,`stroke`],ue=[`xmlns`],x=[`fill`,`stroke`],S=[`fill`,`stroke`],C=[`fill`,`stroke`],w=[`fill`,`stroke`],T=[`fill`,`stroke`],E=[`xmlns`],D=[`stroke`],O=[`stroke`],k=[`stroke`],A=[`fill`,`stroke`],j=[`fill`],M=[`fill`,`stroke`],N=[`fill`],P=[`fill`,`stroke`],F=[`fill`],I=[`fill`,`stroke`],L=[`fill`],R=[`fill`,`stroke`],z=[`fill`],B=[`fill`,`stroke`],V=[`fill`],H=[`xmlns`],U=[`stroke`],de=[`stroke`],fe=[`stroke`],pe=[`stroke`],me=[`stroke`],he=[`stroke`],ge=[`stroke`],_e=[`stroke`],ve=[`stroke`],ye=[`xmlns`],be=[`stroke`,`fill`],xe=[`xmlns`],Se=[`stroke`,`fill`],Ce=[`xmlns`],we=[`fill`],Te=[`fill`],Ee=[`fill`],De=[`fill`],Oe=[`xmlns`],ke=[`stroke`],Ae=[`fill`],je=[`stroke`,`fill`],Me=[`stroke`,`fill`],Ne=[`fill`],Pe=[`stroke`,`fill`],Fe=[`stroke`,`fill`],Ie=[`fill`],Le=[`stroke`,`fill`],Re=[`stroke`,`fill`],ze=[`fill`],Be=[`stroke`,`fill`],Ve=[`stroke`,`fill`],He=[`fill`],Ue=[`stroke`,`fill`],We=[`stroke`,`fill`],Ge=[`xmlns`],Ke=[`stroke`],qe=[`stroke`],Je=[`stroke`,`fill`],Ye=[`stroke`,`fill`],Xe=[`stroke`,`fill`],Ze=[`stroke`,`fill`],Qe=[`stroke`,`fill`],$e=[`stroke`,`fill`],et=[`stroke`,`fill`],tt=[`stroke`,`fill`],nt=[`stroke`,`fill`],rt=[`stroke`,`fill`],it=[`stroke`,`fill`],at=[`stroke`,`fill`],ot=[`stroke`,`fill`],st=[`stroke`,`fill`],ct=[`stroke`,`fill`],lt=[`stroke`,`fill`],ut=[`stroke`,`fill`],dt=[`stroke`,`fill`],ft=[`stroke`,`fill`],pt=[`stroke`,`fill`],mt=[`stroke`,`fill`],ht=[`stroke`,`fill`],gt=[`stroke`,`fill`],_t=[`xmlns`],vt=[`stroke`],yt=[`xmlns`],bt=[`stroke`],xt=[`xmlns`],St=[`stroke`],Ct=[`xmlns`],wt=[`fill`],Tt=[`fill`],Et=[`fill`],Dt=[`fill`],Ot=[`fill`],kt=[`fill`],At=[`fill`],jt=[`fill`],Mt=[`fill`],Nt=[`fill`],Pt=[`fill`],Ft=[`fill`],It=[`xmlns`],Lt=[`stroke`],Rt=[`stroke`],zt=[`stroke`],Bt=[`stroke`],Vt=[`stroke`],Ht=[`stroke`],Ut=[`xmlns`],Wt=[`stroke`],Gt=[`stroke`],Kt=[`stroke`],qt=[`stroke`],Jt=[`stroke`],Yt=[`stroke`],Xt=[`stroke`],Zt=[`stroke`],Qt=[`stroke`],$t=[`xmlns`],en=[`stroke`],tn=[`xmlns`],nn=[`stroke`],rn=[`stroke`],an=[`stroke`],on=[`stroke`],sn=[`stroke`],cn=[`stroke`],ln=[`stroke`],un=[`stroke`],dn=[`stroke`],fn=[`xmlns`],pn=[`x1`,`x2`,`stroke`],mn=[`xmlns`],hn=[`x`,`y`,`width`,`height`,`fill`],gn=[`y`,`width`,`height`,`fill`],_n=[`xmlns`],vn=[`fill`],yn=[`fill`],bn=[`fill`],xn=[`xmlns`],Sn=[`x1`,`x2`,`y1`,`y2`,`stroke`],Cn=[`stroke`],wn=[`fill`],Tn=[`xmlns`],En=[`fill`],Dn=[`fill`],On=[`x1`,`y1`,`x2`,`y2`,`stroke-width`,`stroke`],kn=[`xmlns`],An={key:0},jn=[`stroke`,`stroke-width`],Mn=[`stroke`,`stroke-width`],Nn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Pn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Fn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],In=[`x`,`y`,`height`,`width`,`fill`],Ln=[`xmlns`,`viewBox`],Rn=[`x`,`y`,`stroke`,`fill`],zn=[`xmlns`],Bn=[`d`,`stroke`],Vn=[`cx`,`cy`,`r`,`fill`,`stroke`],Hn=[`cx`,`cy`,`r`,`fill`,`stroke`],Un=[`x`,`y`,`width`,`fill`],Wn=[`cx`,`cy`,`fill`],Gn=[`cx`,`cy`,`fill`],Kn=[`stroke`],qn=[`xmlns`],Jn=[`stroke`,`stroke-width`],Yn=[`stroke`,`stroke-width`],Xn=[`stroke`,`stroke-width`],Zn=[`fill`],Qn=[`fill`],$n=[`fill`],er=[`fill`],tr=[`fill`],nr=[`fill`],rr=[`xmlns`],ir={key:0},ar=[`stroke`,`stroke-width`],or=[`stroke`,`stroke-width`],sr=[`stroke`,`stroke-width`],cr={key:1},lr=[`r`,`fill`],ur=[`r`,`fill`],dr=[`xmlns`],fr={key:0},pr=[`stroke`,`stroke-width`],mr=[`stroke`,`stroke-width`],hr=[`fill`,`rx`,`x`,`y`,`width`,`height`],gr=[`xmlns`],_r=[`stroke-width`,`stroke`],vr=[`stroke-width`,`stroke`],yr=[`stroke-width`,`stroke`],br=[`xmlns`],xr=[`stroke`],Sr=[`stroke`],Cr=[`stroke`],wr=[`stroke`],Tr=[`fill`],Er=[`stroke`],Dr=[`xmlns`],Or=[`stroke`,`stroke-width`],kr=[`stroke`,`stroke-width`],Ar=[`fill`,`r`],jr=[`fill`,`r`],Mr=[`fill`,`r`],Nr=[`fill`,`r`],Pr=[`fill`,`r`],Fr=[`fill`,`r`],Ir=[`fill`,`r`],Lr=[`fill`,`r`],Rr=[`fill`,`r`],zr=[`xmlns`],Br=[`d`,`stroke`,`stroke-width`],Vr=[`d`,`stroke`,`stroke-width`],Hr=[`d`,`stroke`,`stroke-width`],Ur=[`d`,`stroke`,`stroke-width`],Wr=[`stroke`,`stroke-width`],Gr=[`stroke`,`stroke-width`],Kr=[`stroke`,`stroke-width`],qr=[`fill`],Jr=[`fill`],Yr=[`xmlns`],Xr=[`x`,`y`,`fill`],Zr=[`x`,`y`,`fill`],Qr=[`x`,`y`,`fill`],$r=[`xmlns`],ei=[`fill`],ti=[`fill`],ni=[`y1`,`y2`,`stroke`,`stroke-width`],ri=[`x1`,`x2`,`stroke`,`stroke-width`],ii=[`xmlns`,`stroke`],ai=[`fill`],oi=[`xmlns`,`stroke`],si=[`xmlns`,`stroke`],ci=[`fill`],li=[`xmlns`,`stroke`],ui=[`xmlns`,`stroke`],di=[`fill`],fi=[`xmlns`,`stroke`],pi=[`xmlns`,`stroke`],mi=[`fill`],hi=[`xmlns`,`stroke`],W=[`xmlns`,`stroke`],gi=[`fill`],_i=[`xmlns`,`stroke`],vi=[`xmlns`],yi=[`points`,`fill`,`stroke`,`stroke-width`],bi=[`xmlns`],xi={key:0},Si=[`stroke`,`stroke-width`],Ci=[`y`,`width`,`fill`,`rx`],G=/*#__PURE__*/ o({__name:`vue-ui-skeleton`,props:{config:{type:Object,default(){return{}}}},setup(e){let{vue_ui_skeleton:o}=t(),b=e,G=_(`vue-ui-skeleton-${ee()}`),K=l(()=>re({userConfig:b.config,defaultConfig:o})),q=l(()=>K.value.style);te({config:()=>K.value,dataset:()=>[],component:`VueUiSkeleton`,rules:[ne.noHint]});let wi=l(()=>K.value.style.animated),J=l(()=>K.value.type),Ti=_([60,50,55,36,40,25,26,12]),Ei=l(()=>i({plot:{x:50,y:50},radius:40,sides:6}).path),Di=l(()=>i({plot:{x:50,y:50},radius:30,sides:6}).path),Oi=l(()=>i({plot:{x:50,y:50},radius:20,sides:6}).path),ki=l(()=>i({plot:{x:50,y:50},radius:10,sides:6}).path),Y=_([{root:{x:70,y:77,r:44,opacity:100},bars:[{x:200,y:37,opacity:100,width:240},{x:200,y:118,opacity:100,width:180},{x:200,y:253,opacity:100,width:80}]},{root:{x:70,y:177,r:32,opacity:70},bars:[{x:200,y:145,opacity:70,width:160},{x:200,y:172,opacity:70,width:140},{x:200,y:199,opacity:70,width:120}]},{root:{x:70,y:257,r:24,opacity:40},bars:[{x:200,y:64,opacity:40,width:220},{x:200,y:91,opacity:40,width:200},{x:200,y:226,opacity:40,width:100}]}]),X=_([{y:200,height:100,bar:50},{y:180,height:100,bar:40},{y:150,height:100,bar:30},{y:120,height:80,bar:50},{y:110,height:60,bar:30},{y:80,height:80,bar:10},{y:50,height:80,bar:40},{y:24,height:40,bar:24},{y:44,height:20,bar:13},{y:32,height:45,bar:19}]),Z=_([[3,2.5],[4,3.1],[8,6],[9.5,6.5],[12,11],[16,15],[18,18.2],[25,24],[24,26],[32,32],[33,32],[32,31],[38,37],[37,38],[42,41],[40,41],[44,45],[38,35],[31,32]]),Q=_([{x:40,y:30},{x:45,y:28},{x:50,y:25},{x:55,y:20},{x:60,y:27},{x:65,y:14},{x:70,y:23},{x:75,y:16},{x:80,y:25},{x:85,y:10},{x:90,y:18},{x:95,y:7},{x:100,y:12},{x:105,y:10},{x:110,y:20},{x:115,y:7},{x:120,y:14},{x:125,y:10},{x:130,y:19},{x:135,y:3},{x:140,y:10},{x:145,y:2},{x:150,y:1}]);function $(e,t=1){let n=29.85;return{x:200+160*Math.cos(n+e*Math.PI/180)*t,y:200+160*Math.sin(n+e*Math.PI/180)*t}}let Ai=l(()=>{let e=[];for(let t=0;t<100;t+=1)e.push({x1:$(360/100*t).x,y1:$(360/100*t).y,x2:$(360/100*t,.9).x,y2:$(360/100*t,.9).y,color:K.value.style.wheel.color});return e}),ji=_([`M1.74 203.99A204 204 0 01-131.29-156.13l15.44 18.36A180 180 0 001.53 179.99Z`,`M-123.33-162.5A204 204 0 01-10.2-203.75L-9-179.78a180 180 0 00-99.82 36.4Z`,`M0-180A180 180 0 01175.19 41.33l23.36 5.51A204 204 0 000-204Z`,`M172.91 50.03A180 180 0 0110.53 179.69l1.4 23.96A204 204 0 00195.96 56.7Z`,`M-166.87-67.49a180 180 0 0151.02-70.28Q0 0 119.83-134.32a180 180 0 0152.13 81.13Q0 0-166.87-67.49Z`,`M-29.99-177.48a180 180 0 0110.73-1.49Q0 0 112.89 140.2A180 180 0 0153.63 171.83Q0 0-29.99-177.48Z`,`M179.71 10.29a180 180 0 01-4.52 31.04Q0 0-40.87-175.3a180 180 0 0110.88-2.18Q0 0 179.71 10.29Z`,`M-19.26-178.97Q0 0-166.87-67.49a180 180 0 00-12.14 86.36Q0 0-9-179.78a180 180 0 00-10.26.81Z`,`M-108.82-143.38Q0 0-40.87-175.3a180 180 0 00-67.95 31.92Q0 0-40.87-175.3a180 180 0 00-67.95 31.92Z`,`M0-180a180 180 0 01119.83 45.68Q0 0 0-180a180 180 0 01119.83 45.68Q0 0 0-180Z`,`M-148.85 101.22Q0 0-179.01 18.87a180 180 0 0030.16 82.35Q0 0-179.01 18.87a180 180 0 0030.16 82.35Z`,`M1.53 179.99Q0 0 31.73 177.18a180 180 0 0021.9-5.35Q0 0-148.85 101.22A180 180 0 001.53 179.99Z`,`M31.73 177.18a180 180 0 01-21.2 2.51Q0 0 171.96-53.19a180 180 0 017.75 63.48Q0 0 31.73 177.18Z`,`M172.91 50.03Q0 0 112.89 140.2a180 180 0 0060.02-90.17Q0 0 112.89 140.2a180 180 0 0060.02-90.17Z`]);return(e,t)=>(g(),d(`div`,{id:G.value,class:ae({"vue-data-ui-component":!0,"vue-ui-skeleton":!0,"vue-ui-skeleton-animated":wi.value}),style:h(`background:${q.value.backgroundColor};color:${q.value.color};display:flex;align-items:center;justify-content:center;`)},[J.value===`chord`?(g(),d(`svg`,{key:0,xmlns:y(a),width:`100%`,viewBox:`0 0 600 600`,style:h({background:q.value.backgroundColor})},[m(s),f(`g`,ce,[(g(!0),d(c,null,v(ji.value,(e,t)=>(g(),d(`path`,{key:e,d:e,fill:q.value.chord.color,stroke:q.value.backgroundColor,"stroke-width":`2`,style:h({opacity:t>3?.6:1})},null,12,le))),128))])],12,se)):u(``,!0),J.value===`ridgeline`?(g(),d(`svg`,{key:1,xmlns:y(a),width:`100%`,viewBox:`20 0 512 200`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`defs`,null,[m(ie,{t:`linear`,id:`ridgeline-gradient-${G.value}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,q.value.ridgeline.color,1],[`30%`,q.value.ridgeline.color,.7],[`70%`,q.value.ridgeline.color,.3],[`100%`,q.value.ridgeline.color,.1]]},null,8,[`id`,`stops`])]),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 60c6.18-.6 12.36-1.11 18.55-1.79 6.18-.68 12.37-2.38 18.55-2.4 6.19-.01 12.37 0 18.56-.01 6.18-.02 12.37-5.3 18.55-5.3 6.19 0 12.37 4.95 18.56 4.95 6.18 0 12.37-2.78 18.55-2.78 6.19 0 12.37 1.02 18.56 1.92 6.18.9 12.37 4.58 18.55 4.58s12.37-6.71 18.55-6.71c6.19 0 12.37.89 18.56.89 6.18 0 12.37-4.48 18.55-4.48 6.19 0 12.37 4.79 18.56 4.79 6.18 0 12.37-26.07 18.55-26.07 6.19 0 12.37 9.31 18.56 13.85 6.18 4.54 12.37 13.39 18.55 13.39 6.19 0 12.37-36.14 18.56-36.14 6.18 0 12.36 38.45 18.55 38.45 6.18 0 12.37-11.46 18.55-16.94 6.19-5.48 12.37-15.97 18.56-15.97 6.18 0 12.37 16.4 18.55 16.4 6.19 0 12.37-.12 18.56-.35 6.18-.22 12.37-38.08 18.55-38.08 6.19 0 12.37 24.07 18.56 36.1V60`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,x),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 90c6.18-.22 12.36-.35 18.55-.67 6.18-.32 12.37-1.65 18.55-1.65 6.19 0 12.37 1.66 18.56 1.66 6.18 0 12.37-8.76 18.55-8.76 6.19 0 12.37 4.15 18.56 4.15 6.18 0 12.37-8.44 18.55-8.44 6.19 0 12.37 10.87 18.56 10.87 6.18 0 12.37-9.21 18.55-12.16 6.18-2.96 12.37-6.97 18.55-6.97 6.19 0 12.37 9.59 18.56 12.77 6.18 3.18 12.37 7.6 18.55 7.6 6.19 0 12.37-24.44 18.56-24.44 6.18 0 12.37 16.97 18.55 16.97 6.19 0 12.37-20.62 18.56-20.62 6.18 0 12.37 20.37 18.55 20.37 6.19 0 12.37-13.13 18.56-13.13 6.18 0 12.36 13.51 18.55 13.51 6.18 0 12.37-26.41 18.55-26.41 6.19 0 12.37.49 18.56 1.26 6.18.78 12.37 13.82 18.55 13.82 6.19 0 12.37-5.3 18.56-8.3 6.18-3 12.37-9.81 18.55-9.81 6.19 0 12.37 19.82 18.56 29.72V90`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,S),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 120c6.18-.34 12.36-.55 18.55-1.01 6.18-.46 12.37-1.17 18.55-2.15 6.19-.99 12.37-3.7 18.56-4.69 6.18-.98 12.37-2.15 18.55-2.15 6.19 0 12.37.52 18.56 1.2 6.18.68 12.37 6.67 18.55 6.67 6.19 0 12.37-12.15 18.56-12.15 6.18 0 12.37 4.6 18.55 4.6S227.5 99.7 233.68 98.99c6.19-.71 12.37-1.18 18.56-1.18 6.18 0 12.37 17.75 18.55 18.22 6.19.48 12.37.74 18.56.74 6.18 0 12.37-17.09 18.55-17.09 6.19 0 12.37 12.68 18.56 12.68 6.18 0 12.37-.33 18.55-.67 6.19-.34 12.37-.79 18.56-2.06 6.18-1.26 12.36-25.45 18.55-25.45 6.18 0 12.37 10.35 18.55 10.35 6.19 0 12.37-21.07 18.56-21.07 6.18 0 12.37 33.27 18.55 33.27 6.19 0 12.37-26.97 18.56-26.97 6.18 0 12.37 26.97 18.55 27.36 6.19.4 12.37.41 18.56.61V120`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,C),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 150c6.18-.52 12.36-1.57 18.55-1.57 6.18 0 12.37 1.36 18.55 1.36 6.19 0 12.37-1.75 18.56-3.18 6.18-1.43 12.37-6.62 18.55-6.62 6.19 0 12.37 9.98 18.56 9.98 6.18 0 12.37-4.94 18.55-5.64 6.19-.71 12.37-.52 18.56-1.31 6.18-.78 12.37-12.43 18.55-12.43s12.37 18.52 18.55 18.52c6.19 0 12.37-2.49 18.56-2.49 6.18 0 12.37 3.02 18.55 3.02 6.19 0 12.37-29.39 18.56-29.39 6.18 0 12.37 5.56 18.55 8.36 6.19 2.81 12.37 5.14 18.56 8.47 6.18 3.34 12.37 12.25 18.55 12.25 6.19 0 12.37-4.3 18.56-8.78 6.18-4.48 12.36-28.77 18.55-28.77 6.18 0 12.37 1.29 18.55 3.02 6.19 1.72 12.37 18.36 18.56 18.36 6.18 0 12.37-7.68 18.55-12.92 6.19-5.24 12.37-18.51 18.56-20.1 6.18-1.58 12.37-2.7 18.55-2.7 6.19 0 12.37 34.69 18.56 52.04V150`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,w),f(`path`,{fill:`url(#ridgeline-gradient-${G.value})`,stroke:q.value.ridgeline.color,"stroke-width":`1`,d:`M66.7 180c6.18-.6 12.36-1.07 18.55-1.81 6.18-.74 12.37-2.86 18.55-2.86 6.19 0 12.37 2.14 18.56 2.14 6.18 0 12.37-7.08 18.55-7.08 6.19 0 12.37 1.08 18.56 2.03 6.18.95 12.37 4.75 18.55 4.75 6.19 0 12.37-2.45 18.56-4.62 6.18-2.17 12.37-10.99 18.55-10.99s12.37 9.58 18.55 9.58c6.19 0 12.37-.25 18.56-.69 6.18-.43 12.37-13.6 18.55-13.6 6.19 0 12.37 17.23 18.56 17.23 6.18 0 12.37-2.5 18.55-5.19 6.19-2.68 12.37-15.45 18.56-18 6.18-2.55 12.37-4.86 18.55-4.86 6.19 0 12.37 18.61 18.56 18.61 6.18 0 12.36-24.22 18.55-26.66 6.18-2.45 12.37-4.25 18.55-4.25 6.19 0 12.37 7.92 18.56 7.92 6.18 0 12.37-1.95 18.55-1.95 6.19 0 12.37 29.69 18.56 29.69 6.18 0 12.37-2.55 18.55-6.14 6.19-3.58 12.37-28.83 18.56-43.25v60`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,T)],12,ue)):u(``,!0),J.value===`historyPlot`?(g(),d(`svg`,{key:2,xmlns:y(a),width:`100%`,viewBox:`0 0 612 512`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`line`,{x1:`12`,x2:`12`,y1:`12`,y2:`500`,stroke:q.value.historyPlot.color,"stroke-width":`3`,"stroke-linecap":`round`},null,8,D),f(`line`,{x1:`12`,x2:`600`,y1:`500`,y2:`500`,stroke:q.value.historyPlot.color,"stroke-width":`3`,"stroke-linecap":`round`},null,8,O),f(`path`,{d:`M 80,100 300,200 400,150 560,230 360,420 230,320`,fill:`none`,stroke:q.value.historyPlot.color,"stroke-width":`3`},null,8,k),f(`circle`,{cx:`80`,cy:`100`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,A),f(`text`,{x:`80`,y:`108`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 1 `,8,j),f(`circle`,{cx:`300`,cy:`200`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,M),f(`text`,{x:`300`,y:`208`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 2 `,8,N),f(`circle`,{cx:`400`,cy:`150`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,P),f(`text`,{x:`400`,y:`158`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 3 `,8,F),f(`circle`,{cx:`560`,cy:`230`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,I),f(`text`,{x:`560`,y:`238`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 4 `,8,L),f(`circle`,{cx:`360`,cy:`420`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,R),f(`text`,{x:`360`,y:`428`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 5 `,8,z),f(`circle`,{cx:`230`,cy:`320`,r:`24`,fill:q.value.historyPlot.color,stroke:q.value.backgroundColor,"stroke-width":`3`},null,8,B),f(`text`,{x:`230`,y:`328`,fill:q.value.backgroundColor,"font-size":`24`,"text-anchor":`middle`},` 6 `,8,V)],12,E)):u(``,!0),J.value===`circlePack`?(g(),d(`svg`,{key:3,xmlns:y(a),width:`100%`,viewBox:`0 0 100 100`,style:h(`background:${q.value.backgroundColor}`)},[f(`circle`,{cx:50,cy:50,r:20,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,U),f(`circle`,{cx:80,cy:50,r:10,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,de),f(`circle`,{cx:28,cy:30,r:10,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,fe),f(`circle`,{cx:25,cy:76,r:16,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,pe),f(`circle`,{cx:60,cy:78.5,r:10,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,me),f(`circle`,{cx:64,cy:20,r:13,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,he),f(`circle`,{cx:72,cy:37,r:5,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,ge),f(`circle`,{cx:25,cy:45,r:5,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,_e),f(`circle`,{cx:70,cy:66,r:5,stroke:q.value.circlePack.color,"stroke-width":1,fill:`none`},null,8,ve)],12,H)):u(``,!0),J.value===`flow`?(g(),d(`svg`,{key:4,xmlns:y(a),width:`100%`,viewBox:`0 0 80 60`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`path`,{d:`M5 5V55M75 5V55M28 5V55M52 5V55M5 8l23 4L52 9 75 8v4H52L28 21 5 29ZM5 34l23 1L52 24l23-3v6L52 30 28 44l24-5 23 2v6L52 45 28 52H5Z`,stroke:q.value.flow.color,"stroke-width":.8,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:q.value.flow.color},null,8,be)],12,ye)):u(``,!0),J.value===`parallelCoordinatePlot`?(g(),d(`svg`,{key:5,xmlns:y(a),width:`100%`,viewBox:`0 0 80 60`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`path`,{d:`M5 5V55M75 5V55M28 5V55M52 5V55M5 10a1 1 0 000 2 1 1 0 000-2m23 5a1 1 0 000 2 1 1 0 000-2M52 8a1 1 0 000 2 1 1 0 000-2m23 3a1 1 0 000 2 1 1 0 000-2M6 11l21 5m2 0L51 9m2 0 21 3M5 50a1 1 0 000-2 1 1 0 000 2M28 39a1 1 0 000 2 1 1 0 000-2m24 6a1 1 0 000 2 1 1 0 000-2m23 0a1 1 0 000 2 1 1 0 000-2M6 49l21-9m2 0 22 6m2 0H74M5 25a1 1 0 000 2 1 1 0 000-2m23 6a1 1 0 000 2 1 1 0 000-2m24-8a1 1 0 000 2 1 1 0 000-2m23-2a1 1 0 000 2 1 1 0 000-2M6 26l21 6m2 0 22-8m2 0 21-2`,stroke:q.value.parallelCoordinatePlot.color,"stroke-width":.8,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:q.value.parallelCoordinatePlot.color},null,8,Se)],12,xe)):u(``,!0),J.value===`bullet`?(g(),d(`svg`,{key:6,xmlns:y(a),width:`100%`,viewBox:`0 0 600 96`,style:h(`background:${q.value.backgroundColor}`)},[f(`rect`,{fill:q.value.bullet.color,x:24,y:12,width:300,height:72,style:{opacity:`0.8`}},null,8,we),f(`rect`,{fill:q.value.bullet.color,x:324,y:12,width:150,height:72,style:{opacity:`0.6`}},null,8,Te),f(`rect`,{fill:q.value.bullet.color,x:474,y:12,width:102,height:72,style:{opacity:`0.3`}},null,8,Ee),f(`rect`,{fill:q.value.bullet.color,x:24,y:36,width:490,height:24,style:{opacity:`1`}},null,8,De)],12,Ce)):u(``,!0),J.value===`dumbbell`?(g(),d(`svg`,{key:7,xmlns:y(a),width:`100%`,viewBox:`0 0 100 55`,style:h(`background:${q.value.backgroundColor}`)},[m(s),f(`line`,{x1:`3`,x2:`3`,y1:`3`,y2:`67`,stroke:q.value.dumbbell.color,"stroke-width":.5,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,ke),f(`path`,{d:`
|
|
2
2
|
M 30,11
|
|
3
3
|
C 39,10 39,10
|
|
4
4
|
45,11
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Jt as r,Mt as i,P as a,X as ee,at as te,b as o,g as ne,i as re,in as ie,t as ae,zt as s}from"./lib-rPeBMZrn.js";import{n as oe,t as se}from"./BaseScanner-8NdoBs7B.js";import{n as ce,t as le}from"./useHints-C-TwxM0Y.js";import{t as c}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ue}from"./resolveChartConfig-CIhClE5R.js";import{c as de}from"./canvas-lib-22VpOI4_.js";import{t as fe}from"./useResponsive-CENUxfEL.js";import{t as pe}from"./DefGrad-DKMq1REY.js";import{t as me}from"./usePrefersMotion-XLHwega2.js";import{t as he}from"./useFitSvgText-C1QC4P5G.js";import{t as ge}from"./vue_ui_spark_trend-BOM3zo64.js";import{computed as l,createBlock as _e,createCommentVNode as u,createElementBlock as d,createElementVNode as ve,createVNode as ye,defineAsyncComponent as be,nextTick as xe,normalizeStyle as Se,onMounted as Ce,openBlock as f,ref as p,renderSlot as m,toDisplayString as h,toRefs as we,unref as g,watch as _}from"vue";var Te=/* @__PURE__ */ e({default:()=>v}),Ee=[`id`,`aria-describedby`],De=[`id`],Oe=[`xmlns`,`viewBox`],ke=[`width`,`height`],Ae={key:1},je=[`d`,`fill`],Me=[`d`,`fill`],Ne=[`d`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-linejoin`],Pe=[`d`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-linejoin`],Fe=[`d`],Ie=[`fill`,`d`],Le=[`x`,`y`,`width`,`height`],Re=[`x`,`y`,`fill`,`font-size`,`font-weight`],ze=[`stroke`,`cx`,`cy`,`fill`],Be=[`x`,`y`,`font-size`,`fill`,`font-weight`],v=/*#__PURE__*/ c({__name:`vue-ui-spark-trend`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(e){let c=be(()=>import(`./PackageVersion-CXT-eAuk.js`).then(e=>e.t)),{vue_ui_spark_trend:Te}=t(),v=me(),y=e,b=p(null),Ve=p(null),x=p(null),S=p(null),C=p(null),w=p(!1),T=p(null),E=p(ee()),D=p(I()),O=l(()=>D.value.style.dataLabel),k=l(()=>D.value.style.trendLabel),A=l(()=>D.value.style.line),j=l(()=>D.value.style.area),M=l(()=>D.value.style);ce({config:()=>D.value,dataset:()=>y.dataset,component:`VueUiSparkTrend`,rules:[le.emptyArray,{test:e=>e.length>1095,message:[`👀 The dataset has > 1095 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.`,``,`▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance will be impacted.`]}]});let He=l(()=>ie({defaultConfig:{style:{animation:{show:!1},backgroundColor:`#99999930`,line:{stroke:`#6A6A6A`,useColorTrend:!1},dataLabel:{show:!1,useColorTrend:!1,color:`#6A6A6A`}}},userConfig:D.value.skeletonConfig??{}})),{loading:N,FINAL_DATASET:P,manualLoading:F}=oe({...we(y),FINAL_CONFIG:D,prepareConfig:I,skeletonDataset:y.config?.skeletonDataset??[1,2,3,5,8,13,21,34,55,89,144,233],skeletonConfig:ie({defaultConfig:D.value,userConfig:He.value})});function I(){return ue(y.config,Te,ge)}let L=l(()=>i({data:P.value,threshold:D.value.downsample.threshold}));_(()=>y.config,e=>{D.value=I(),H.value=M.value.width,U.value=M.value.height,V()},{deep:!0});function R(e){return e.map(e=>o(e))}let z=p(i({data:P.value,threshold:D.value.downsample.threshold}).map(e=>M.value.animation.show&&!v.value||[void 0,1/0,-1/0,null,NaN].includes(e)?null:e));_(L,e=>{T.value&&=(cancelAnimationFrame(T.value),null),M.value.animation.show&&!v.value?z.value=Array(e.length).fill(null):z.value=e.map(e=>![void 0,1/0,-1/0,null].includes(e)&&!Number.isNaN(e)?e:null),B(),xe(()=>$(`.vue-ui-sparktrend-progress-label`,6))},{deep:!0,immediate:!0}),_(()=>JSON.stringify(y.dataset),()=>{T.value&&=(cancelAnimationFrame(T.value),null),F.value=s(y.dataset);let e=L.value;z.value=M.value.animation.show&&!v.value?Array(e.length).fill(null):e.map(e=>Number.isFinite(e)?e:null),B(),xe(()=>$(`.vue-ui-sparktrend-progress-label`,6))},{deep:!1,immediate:!0});function B(){let e=1e3/M.value.animation.animationFrames,t=performance.now();if(!N.value&&M.value.animation.show&&!v.value&&M.value.animation.animationFrames&&P.value.length>1){z.value=[];let n=0;function r(){w.value=!0;let i=performance.now(),a=i-t;a>e?(t=i-a%e,n<L.value.length?(z.value.push(L.value[n]),n+=1,T.value=requestAnimationFrame(r)):(cancelAnimationFrame(T.value),z.value=R(L.value),w.value=!1,$(`.vue-ui-sparktrend-progress-label`,6))):T.value=requestAnimationFrame(r)}r()}}Ce(()=>{V()});let Ue=l(()=>D.value.debug);function V(){if(s(y.dataset)&&(te({componentName:`VueUiSparkTrend`,type:`dataset`,debug:Ue.value}),F.value=!0),s(y.dataset)||(F.value=!1),D.value.responsive){let e=de(()=>{let{width:e,height:t}=fe({chart:b.value,source:x.value});requestAnimationFrame(()=>{H.value=e,U.value=t})});S.value&&(C.value&&S.value.unobserve(C.value),S.value.disconnect()),S.value=new ResizeObserver(e),C.value=b.value.parentNode,S.value.observe(C.value)}B(),$(`.vue-ui-sparktrend-progress-label`,6)}let H=p(M.value.width),U=p(M.value.height),W=l(()=>({height:U.value,width:H.value})),G=l(()=>({top:M.value.padding.top,left:M.value.padding.left,right:W.value.width-M.value.padding.right,bottom:W.value.height-M.value.padding.bottom,height:W.value.height-(M.value.padding.top+M.value.padding.bottom)-(O.value.show?O.value.fontSize:0),width:W.value.width-(M.value.padding.left+M.value.padding.right)})),K=l(()=>{let e=R(L.value).filter(Number.isFinite);if(!e.length)return{max:0,min:0};let t=e[0],n=e[0];for(let r=1;r<e.length;r++){let i=e[r];i>t&&(t=i),i<n&&(n=i)}return{max:t,min:n}}),We=l(()=>{let e=L.value,t=e.length?e[e.length-1]:`x`;return[E.value,e.length,Number.isFinite(t)?t:`x`,D.value.downsample.threshold,A.value.smooth?`s`:`l`].join(`-`)}),q=l(()=>{let e=K.value.min>=0?0:K.value.min;return Math.abs(e)}),Ge=l(()=>K.value.max+q.value);function Ke(e){return e/Ge.value}let qe=l(()=>L.value.length),J=l(()=>z.value.map((e,t)=>{let n=isNaN(e)||[void 0,null,`NaN`,NaN,1/0,-1/0].includes(e)?0:e||0;return{value:o(e),absoluteValue:o(n),plotValue:o(n+q.value),toMax:Ke(n+q.value),x:G.value.left+o(t*(G.value.width/(qe.value-1)))-M.value.padding.right,y:G.value.bottom-o(G.value.height*Ke(n+q.value))}})),Y=l(()=>{let e=R(L.value);return k.value.trendType===`global`?ne(e):k.value.trendType===`n-1`&&e.length>1?(e.at(-1)/e.at(-2)-1)*100:k.value.trendType===`lastToFirst`?(e.at(-1)/e[0]-1)*100:0}),X=l(()=>w.value||Y.value===0?`neutral`:Y.value>0?`positive`:`negative`),Z=l(()=>M.value.arrow.colors[X.value]),Je=l(()=>{let e={x:J.value[0].x,y:W.value.height-6},t={x:J.value[J.value.length-1].x,y:W.value.height-6},n=[];return J.value.forEach(e=>{n.push(`${e.x},${e.y} `)}),[e.x,e.y,...n,t.x,t.y].toString()}),Ye=l(()=>{let e=[];return J.value.forEach(t=>{e.push(`${t.x},${t.y} `)}),`M ${e.toString()}`}),Q=l(()=>U.value/2-k.value.fontSize),Xe=l(()=>G.value.left*.8),{fitText:$}=he({svgRef:Ve,unitWidth:Xe,fontSize:k.value.fontSize}),Ze=l(()=>{if(N.value||w.value)return`Trend chart loading`;let e=J.value?.at(-1),t=e?.value,r=n({p:Y.value>0?`+`:``,v:Y.value,s:`%`,r:k.value.rounding}),i=t==null?`not available`:re(O.value.formatter,t,n({p:O.value.prefix,v:t,s:O.value.suffix,r:O.value.rounding}),{datapoint:e});return`Progression ${X.value===`positive`?`up ${r}`:X.value===`negative`?`down ${r}`:`stable at ${r}`}. Last value ${i}.`}),Qe=l(()=>`sparktrend-a11y-${E.value}`);return(e,t)=>(f(),d(`div`,{ref_key:`sparkTrendChart`,ref:b,class:`vue-data-ui-component vue-ui-spark-trend`,id:E.value,style:Se(`width:100%;font-family:${M.value.fontFamily};background:${M.value.backgroundColor}`),role:`img`,"aria-describedby":Qe.value},[ve(`p`,{id:Qe.value,class:`sr-only`,"aria-live":`polite`},h(Ze.value),9,De),(f(),d(`svg`,{key:We.value,ref_key:`svgRef`,ref:Ve,xmlns:g(ae),viewBox:`0 0 ${W.value.width} ${W.value.height}`,style:`width:100%;background:transparent;overflow:visible`,"aria-hidden":`true`},[ye(g(c)),e.$slots[`chart-background`]?(f(),d(`foreignObject`,{key:0,x:0,y:0,width:W.value.width<=0?10:W.value.width,height:W.value.height<=0?10:W.value.height,style:{pointerEvents:`none`}},[m(e.$slots,`chart-background`,{},void 0,!0)],8,ke)):u(``,!0),ve(`defs`,null,[ye(pe,{t:`linear`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,id:`pill_gradient_${E.value}`,stops:[[`0%`,g(r)(A.value.useColorTrend?Z.value:A.value.stroke,j.value.opacity),1],[`100%`,M.value.backgroundColor,1]]},null,8,[`id`,`stops`])]),j.value.show&&J.value[0]?(f(),d(`g`,Ae,[A.value.smooth?(f(),d(`path`,{key:0,d:`M ${J.value[0].x},${G.value.bottom} ${g(a)(J.value)} L ${J.value.at(-1).x},${G.value.bottom} Z`,fill:j.value.useGradient?`url(#pill_gradient_${E.value})`:g(r)(A.value.useColorTrend?Z.value:A.value.stroke,j.value.opacity),stroke:`none`},null,8,je)):(f(),d(`path`,{key:1,d:`M${Je.value}Z`,fill:j.value.useGradient?`url(#pill_gradient_${E.value})`:g(r)(A.value.useColorTrend?Z.value:A.value.stroke,j.value.opacity),stroke:`none`},null,8,Me))])):u(``,!0),A.value.smooth&&J.value.length?(f(),d(`path`,{key:2,d:`M ${g(a)(J.value)}`,stroke:A.value.useColorTrend?Z.value:A.value.stroke,fill:`none`,"stroke-width":A.value.strokeWidth,"stroke-linecap":A.value.strokeLinecap,"stroke-linejoin":A.value.strokeLinejoin},null,8,Ne)):u(``,!0),!A.value.smooth&&J.value.length?(f(),d(`path`,{key:3,d:Ye.value,stroke:A.value.useColorTrend?Z.value:A.value.stroke,fill:`none`,"stroke-width":A.value.strokeWidth,"stroke-linecap":A.value.strokeLinecap,"stroke-linejoin":A.value.strokeLinejoin},null,8,Pe)):u(``,!0),g(N)?(f(),d(`path`,{key:4,fill:`#6A6A6A`,d:`M ${G.value.left/2+6}, ${Q.value+7} ${G.value.left/2-7}, ${Q.value} ${G.value.left/2-7}, ${Q.value+14} Z`},null,8,Fe)):(f(),d(`path`,{key:5,fill:Z.value,d:X.value===`positive`?`M ${G.value.left/2}, ${Q.value} ${G.value.left/2-7}, ${Q.value+12} ${G.value.left/2+7}, ${Q.value+12} Z`:X.value===`negative`?`M ${G.value.left/2}, ${Q.value+12} ${G.value.left/2-7}, ${Q.value} ${G.value.left/2+7}, ${Q.value} Z`:`M ${G.value.left/2+6}, ${Q.value+7} ${G.value.left/2-7}, ${Q.value} ${G.value.left/2-7}, ${Q.value+14} Z`},null,8,Ie)),g(N)?(f(),d(`rect`,{key:6,x:G.value.left/2-k.value.fontSize-2,y:U.value/2+k.value.fontSize-2,width:k.value.fontSize*2,height:k.value.fontSize,fill:`#6A6A6A80`,rx:`3`},null,8,Le)):u(``,!0),!w.value&&!g(N)?(f(),d(`text`,{key:7,class:`vue-ui-sparktrend-progress-label`,x:G.value.left/2,y:U.value/2+k.value.fontSize*2,"text-anchor":`middle`,fill:k.value.useColorTrend?Z.value:k.value.color,"font-size":k.value.fontSize,"font-weight":k.value.bold?`bold`:`normal`},h(g(n)({p:Y.value>0?`+`:``,v:Y.value,s:`%`,r:k.value.rounding})),9,Re)):u(``,!0),J.value.length&&J.value.at(-1).x!==void 0?(f(),d(`circle`,{key:8,stroke:M.value.backgroundColor,"stroke-width":2,cx:J.value.at(-1).x,cy:J.value.at(-1).y,r:4,fill:g(N)?`#6A6A6A`:Z.value},null,8,ze)):u(``,!0),J.value.length&&J.value.at(-1).x!==void 0&&O.value.show?(f(),d(`text`,{key:9,"text-anchor":`middle`,x:J.value.at(-1).x,y:J.value.at(-1).y-O.value.fontSize/1.5,"font-size":O.value.fontSize,fill:O.value.useColorTrend?Z.value:O.value.color,"font-weight":O.value.bold?`bold`:`normal`},h(g(re)(O.value.formatter,J.value.at(-1).value,g(n)({p:O.value.prefix,v:J.value.at(-1).value,s:O.value.suffix,r:O.value.rounding}),{datapoint:J.value.at(-1)})),9,Be)):u(``,!0)],8,Oe)),e.$slots.source?(f(),d(`div`,{key:0,ref_key:`source`,ref:x,dir:`auto`},[m(e.$slots,`source`,{},void 0,!0)],512)):u(``,!0),m(e.$slots,`skeleton`,{},()=>[g(N)?(f(),_e(se,{key:0})):u(``,!0)],!0)],12,Ee))}},[[`__scopeId`,`data-v-814f1b0f`]]);export{Te as n,v as t};
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Jt as r,Mt as i,P as a,X as ee,at as te,b as o,g as ne,i as re,in as ie,t as ae,zt as s}from"./lib-rPeBMZrn.js";import{n as oe,t as se}from"./BaseScanner-8NdoBs7B.js";import{n as ce,t as le}from"./useHints-C-TwxM0Y.js";import{t as c}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ue}from"./resolveChartConfig-CIhClE5R.js";import{c as de}from"./canvas-lib-22VpOI4_.js";import{t as fe}from"./useResponsive-CENUxfEL.js";import{t as pe}from"./DefGrad-DKMq1REY.js";import{t as me}from"./usePrefersMotion-XLHwega2.js";import{t as he}from"./useFitSvgText-C1QC4P5G.js";import{t as ge}from"./vue_ui_spark_trend-BOM3zo64.js";import{computed as l,createBlock as _e,createCommentVNode as u,createElementBlock as d,createElementVNode as ve,createVNode as ye,defineAsyncComponent as be,nextTick as xe,normalizeStyle as Se,onMounted as Ce,openBlock as f,ref as p,renderSlot as m,toDisplayString as h,toRefs as we,unref as g,watch as _}from"vue";var Te=/* @__PURE__ */ e({default:()=>v}),Ee=[`id`,`aria-describedby`],De=[`id`],Oe=[`xmlns`,`viewBox`],ke=[`width`,`height`],Ae={key:1},je=[`d`,`fill`],Me=[`d`,`fill`],Ne=[`d`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-linejoin`],Pe=[`d`,`stroke`,`stroke-width`,`stroke-linecap`,`stroke-linejoin`],Fe=[`d`],Ie=[`fill`,`d`],Le=[`x`,`y`,`width`,`height`],Re=[`x`,`y`,`fill`,`font-size`,`font-weight`],ze=[`stroke`,`cx`,`cy`,`fill`],Be=[`x`,`y`,`font-size`,`fill`,`font-weight`],v=/*#__PURE__*/ c({__name:`vue-ui-spark-trend`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(e){let c=be(()=>import(`./PackageVersion-DhptF5oD.js`).then(e=>e.t)),{vue_ui_spark_trend:Te}=t(),v=me(),y=e,b=p(null),Ve=p(null),x=p(null),S=p(null),C=p(null),w=p(!1),T=p(null),E=p(ee()),D=p(I()),O=l(()=>D.value.style.dataLabel),k=l(()=>D.value.style.trendLabel),A=l(()=>D.value.style.line),j=l(()=>D.value.style.area),M=l(()=>D.value.style);ce({config:()=>D.value,dataset:()=>y.dataset,component:`VueUiSparkTrend`,rules:[le.emptyArray,{test:e=>e.length>1095,message:[`👀 The dataset has > 1095 datapoints. Above this threshold, the dataset is computed through an LTTB algorithm, to preserve the shape of the data without increasing the number of datapoints.`,``,`▶️ If you need this level of detail, you can change config.downsample.threshold and set a higher value. Note that performance will be impacted.`]}]});let He=l(()=>ie({defaultConfig:{style:{animation:{show:!1},backgroundColor:`#99999930`,line:{stroke:`#6A6A6A`,useColorTrend:!1},dataLabel:{show:!1,useColorTrend:!1,color:`#6A6A6A`}}},userConfig:D.value.skeletonConfig??{}})),{loading:N,FINAL_DATASET:P,manualLoading:F}=oe({...we(y),FINAL_CONFIG:D,prepareConfig:I,skeletonDataset:y.config?.skeletonDataset??[1,2,3,5,8,13,21,34,55,89,144,233],skeletonConfig:ie({defaultConfig:D.value,userConfig:He.value})});function I(){return ue(y.config,Te,ge)}let L=l(()=>i({data:P.value,threshold:D.value.downsample.threshold}));_(()=>y.config,e=>{D.value=I(),H.value=M.value.width,U.value=M.value.height,V()},{deep:!0});function R(e){return e.map(e=>o(e))}let z=p(i({data:P.value,threshold:D.value.downsample.threshold}).map(e=>M.value.animation.show&&!v.value||[void 0,1/0,-1/0,null,NaN].includes(e)?null:e));_(L,e=>{T.value&&=(cancelAnimationFrame(T.value),null),M.value.animation.show&&!v.value?z.value=Array(e.length).fill(null):z.value=e.map(e=>![void 0,1/0,-1/0,null].includes(e)&&!Number.isNaN(e)?e:null),B(),xe(()=>$(`.vue-ui-sparktrend-progress-label`,6))},{deep:!0,immediate:!0}),_(()=>JSON.stringify(y.dataset),()=>{T.value&&=(cancelAnimationFrame(T.value),null),F.value=s(y.dataset);let e=L.value;z.value=M.value.animation.show&&!v.value?Array(e.length).fill(null):e.map(e=>Number.isFinite(e)?e:null),B(),xe(()=>$(`.vue-ui-sparktrend-progress-label`,6))},{deep:!1,immediate:!0});function B(){let e=1e3/M.value.animation.animationFrames,t=performance.now();if(!N.value&&M.value.animation.show&&!v.value&&M.value.animation.animationFrames&&P.value.length>1){z.value=[];let n=0;function r(){w.value=!0;let i=performance.now(),a=i-t;a>e?(t=i-a%e,n<L.value.length?(z.value.push(L.value[n]),n+=1,T.value=requestAnimationFrame(r)):(cancelAnimationFrame(T.value),z.value=R(L.value),w.value=!1,$(`.vue-ui-sparktrend-progress-label`,6))):T.value=requestAnimationFrame(r)}r()}}Ce(()=>{V()});let Ue=l(()=>D.value.debug);function V(){if(s(y.dataset)&&(te({componentName:`VueUiSparkTrend`,type:`dataset`,debug:Ue.value}),F.value=!0),s(y.dataset)||(F.value=!1),D.value.responsive){let e=de(()=>{let{width:e,height:t}=fe({chart:b.value,source:x.value});requestAnimationFrame(()=>{H.value=e,U.value=t})});S.value&&(C.value&&S.value.unobserve(C.value),S.value.disconnect()),S.value=new ResizeObserver(e),C.value=b.value.parentNode,S.value.observe(C.value)}B(),$(`.vue-ui-sparktrend-progress-label`,6)}let H=p(M.value.width),U=p(M.value.height),W=l(()=>({height:U.value,width:H.value})),G=l(()=>({top:M.value.padding.top,left:M.value.padding.left,right:W.value.width-M.value.padding.right,bottom:W.value.height-M.value.padding.bottom,height:W.value.height-(M.value.padding.top+M.value.padding.bottom)-(O.value.show?O.value.fontSize:0),width:W.value.width-(M.value.padding.left+M.value.padding.right)})),K=l(()=>{let e=R(L.value).filter(Number.isFinite);if(!e.length)return{max:0,min:0};let t=e[0],n=e[0];for(let r=1;r<e.length;r++){let i=e[r];i>t&&(t=i),i<n&&(n=i)}return{max:t,min:n}}),We=l(()=>{let e=L.value,t=e.length?e[e.length-1]:`x`;return[E.value,e.length,Number.isFinite(t)?t:`x`,D.value.downsample.threshold,A.value.smooth?`s`:`l`].join(`-`)}),q=l(()=>{let e=K.value.min>=0?0:K.value.min;return Math.abs(e)}),Ge=l(()=>K.value.max+q.value);function Ke(e){return e/Ge.value}let qe=l(()=>L.value.length),J=l(()=>z.value.map((e,t)=>{let n=isNaN(e)||[void 0,null,`NaN`,NaN,1/0,-1/0].includes(e)?0:e||0;return{value:o(e),absoluteValue:o(n),plotValue:o(n+q.value),toMax:Ke(n+q.value),x:G.value.left+o(t*(G.value.width/(qe.value-1)))-M.value.padding.right,y:G.value.bottom-o(G.value.height*Ke(n+q.value))}})),Y=l(()=>{let e=R(L.value);return k.value.trendType===`global`?ne(e):k.value.trendType===`n-1`&&e.length>1?(e.at(-1)/e.at(-2)-1)*100:k.value.trendType===`lastToFirst`?(e.at(-1)/e[0]-1)*100:0}),X=l(()=>w.value||Y.value===0?`neutral`:Y.value>0?`positive`:`negative`),Z=l(()=>M.value.arrow.colors[X.value]),Je=l(()=>{let e={x:J.value[0].x,y:W.value.height-6},t={x:J.value[J.value.length-1].x,y:W.value.height-6},n=[];return J.value.forEach(e=>{n.push(`${e.x},${e.y} `)}),[e.x,e.y,...n,t.x,t.y].toString()}),Ye=l(()=>{let e=[];return J.value.forEach(t=>{e.push(`${t.x},${t.y} `)}),`M ${e.toString()}`}),Q=l(()=>U.value/2-k.value.fontSize),Xe=l(()=>G.value.left*.8),{fitText:$}=he({svgRef:Ve,unitWidth:Xe,fontSize:k.value.fontSize}),Ze=l(()=>{if(N.value||w.value)return`Trend chart loading`;let e=J.value?.at(-1),t=e?.value,r=n({p:Y.value>0?`+`:``,v:Y.value,s:`%`,r:k.value.rounding}),i=t==null?`not available`:re(O.value.formatter,t,n({p:O.value.prefix,v:t,s:O.value.suffix,r:O.value.rounding}),{datapoint:e});return`Progression ${X.value===`positive`?`up ${r}`:X.value===`negative`?`down ${r}`:`stable at ${r}`}. Last value ${i}.`}),Qe=l(()=>`sparktrend-a11y-${E.value}`);return(e,t)=>(f(),d(`div`,{ref_key:`sparkTrendChart`,ref:b,class:`vue-data-ui-component vue-ui-spark-trend`,id:E.value,style:Se(`width:100%;font-family:${M.value.fontFamily};background:${M.value.backgroundColor}`),role:`img`,"aria-describedby":Qe.value},[ve(`p`,{id:Qe.value,class:`sr-only`,"aria-live":`polite`},h(Ze.value),9,De),(f(),d(`svg`,{key:We.value,ref_key:`svgRef`,ref:Ve,xmlns:g(ae),viewBox:`0 0 ${W.value.width} ${W.value.height}`,style:`width:100%;background:transparent;overflow:visible`,"aria-hidden":`true`},[ye(g(c)),e.$slots[`chart-background`]?(f(),d(`foreignObject`,{key:0,x:0,y:0,width:W.value.width<=0?10:W.value.width,height:W.value.height<=0?10:W.value.height,style:{pointerEvents:`none`}},[m(e.$slots,`chart-background`,{},void 0,!0)],8,ke)):u(``,!0),ve(`defs`,null,[ye(pe,{t:`linear`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,id:`pill_gradient_${E.value}`,stops:[[`0%`,g(r)(A.value.useColorTrend?Z.value:A.value.stroke,j.value.opacity),1],[`100%`,M.value.backgroundColor,1]]},null,8,[`id`,`stops`])]),j.value.show&&J.value[0]?(f(),d(`g`,Ae,[A.value.smooth?(f(),d(`path`,{key:0,d:`M ${J.value[0].x},${G.value.bottom} ${g(a)(J.value)} L ${J.value.at(-1).x},${G.value.bottom} Z`,fill:j.value.useGradient?`url(#pill_gradient_${E.value})`:g(r)(A.value.useColorTrend?Z.value:A.value.stroke,j.value.opacity),stroke:`none`},null,8,je)):(f(),d(`path`,{key:1,d:`M${Je.value}Z`,fill:j.value.useGradient?`url(#pill_gradient_${E.value})`:g(r)(A.value.useColorTrend?Z.value:A.value.stroke,j.value.opacity),stroke:`none`},null,8,Me))])):u(``,!0),A.value.smooth&&J.value.length?(f(),d(`path`,{key:2,d:`M ${g(a)(J.value)}`,stroke:A.value.useColorTrend?Z.value:A.value.stroke,fill:`none`,"stroke-width":A.value.strokeWidth,"stroke-linecap":A.value.strokeLinecap,"stroke-linejoin":A.value.strokeLinejoin},null,8,Ne)):u(``,!0),!A.value.smooth&&J.value.length?(f(),d(`path`,{key:3,d:Ye.value,stroke:A.value.useColorTrend?Z.value:A.value.stroke,fill:`none`,"stroke-width":A.value.strokeWidth,"stroke-linecap":A.value.strokeLinecap,"stroke-linejoin":A.value.strokeLinejoin},null,8,Pe)):u(``,!0),g(N)?(f(),d(`path`,{key:4,fill:`#6A6A6A`,d:`M ${G.value.left/2+6}, ${Q.value+7} ${G.value.left/2-7}, ${Q.value} ${G.value.left/2-7}, ${Q.value+14} Z`},null,8,Fe)):(f(),d(`path`,{key:5,fill:Z.value,d:X.value===`positive`?`M ${G.value.left/2}, ${Q.value} ${G.value.left/2-7}, ${Q.value+12} ${G.value.left/2+7}, ${Q.value+12} Z`:X.value===`negative`?`M ${G.value.left/2}, ${Q.value+12} ${G.value.left/2-7}, ${Q.value} ${G.value.left/2+7}, ${Q.value} Z`:`M ${G.value.left/2+6}, ${Q.value+7} ${G.value.left/2-7}, ${Q.value} ${G.value.left/2-7}, ${Q.value+14} Z`},null,8,Ie)),g(N)?(f(),d(`rect`,{key:6,x:G.value.left/2-k.value.fontSize-2,y:U.value/2+k.value.fontSize-2,width:k.value.fontSize*2,height:k.value.fontSize,fill:`#6A6A6A80`,rx:`3`},null,8,Le)):u(``,!0),!w.value&&!g(N)?(f(),d(`text`,{key:7,class:`vue-ui-sparktrend-progress-label`,x:G.value.left/2,y:U.value/2+k.value.fontSize*2,"text-anchor":`middle`,fill:k.value.useColorTrend?Z.value:k.value.color,"font-size":k.value.fontSize,"font-weight":k.value.bold?`bold`:`normal`},h(g(n)({p:Y.value>0?`+`:``,v:Y.value,s:`%`,r:k.value.rounding})),9,Re)):u(``,!0),J.value.length&&J.value.at(-1).x!==void 0?(f(),d(`circle`,{key:8,stroke:M.value.backgroundColor,"stroke-width":2,cx:J.value.at(-1).x,cy:J.value.at(-1).y,r:4,fill:g(N)?`#6A6A6A`:Z.value},null,8,ze)):u(``,!0),J.value.length&&J.value.at(-1).x!==void 0&&O.value.show?(f(),d(`text`,{key:9,"text-anchor":`middle`,x:J.value.at(-1).x,y:J.value.at(-1).y-O.value.fontSize/1.5,"font-size":O.value.fontSize,fill:O.value.useColorTrend?Z.value:O.value.color,"font-weight":O.value.bold?`bold`:`normal`},h(g(re)(O.value.formatter,J.value.at(-1).value,g(n)({p:O.value.prefix,v:J.value.at(-1).value,s:O.value.suffix,r:O.value.rounding}),{datapoint:J.value.at(-1)})),9,Be)):u(``,!0)],8,Oe)),e.$slots.source?(f(),d(`div`,{key:0,ref_key:`source`,ref:x,dir:`auto`},[m(e.$slots,`source`,{},void 0,!0)],512)):u(``,!0),m(e.$slots,`skeleton`,{},()=>[g(N)?(f(),_e(se,{key:0})):u(``,!0)],!0)],12,Ee))}},[[`__scopeId`,`data-v-814f1b0f`]]);export{Te as n,v as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Ht as r,Jt as i,S as a,X as ee,Yt as te,at as o,i as s,in as c,t as ne,w as re,yt as ie,zt as ae}from"./lib-rPeBMZrn.js";import{n as oe,t as se}from"./BaseScanner-8NdoBs7B.js";import{n as ce,t as le}from"./useHints-C-TwxM0Y.js";import{n as ue}from"./resolveChartConfig-CIhClE5R.js";import{t as de}from"./DefGrad-DKMq1REY.js";import{t as l}from"./usePrefersMotion-XLHwega2.js";import{t as u}from"./vue_ui_sparkbar-Bpx7QrFq.js";import{Fragment as d,computed as f,createBlock as fe,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createVNode as g,defineAsyncComponent as pe,guardReactiveProps as me,mergeProps as he,nextTick as ge,normalizeProps as _e,normalizeStyle as _,onMounted as v,openBlock as y,ref as b,renderList as ve,renderSlot as x,toDisplayString as S,toRefs as ye,unref as C,useSlots as w,watch as T}from"vue";var E=/* @__PURE__ */ e({default:()=>P}),D=[`onClick`,`onMouseenter`,`onMouseleave`],O={key:1,class:`vue-ui-sparkbar-datapoint-value`},k=[`xmlns`,`viewBox`],A=[`height`,`width`,`fill`,`rx`],j=[`height`,`width`,`fill`,`rx`],M=[`height`,`width`,`fill`,`rx`],N={key:2,ref:`source`,dir:`auto`},P={__name:`vue-ui-sparkbar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},backgroundOpacity:{type:Number,default:null}},emits:[`selectDatapoint`],setup(e,{emit:E}){let P=pe(()=>import(`./PackageVersion-
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Ht as r,Jt as i,S as a,X as ee,Yt as te,at as o,i as s,in as c,t as ne,w as re,yt as ie,zt as ae}from"./lib-rPeBMZrn.js";import{n as oe,t as se}from"./BaseScanner-8NdoBs7B.js";import{n as ce,t as le}from"./useHints-C-TwxM0Y.js";import{n as ue}from"./resolveChartConfig-CIhClE5R.js";import{t as de}from"./DefGrad-DKMq1REY.js";import{t as l}from"./usePrefersMotion-XLHwega2.js";import{t as u}from"./vue_ui_sparkbar-Bpx7QrFq.js";import{Fragment as d,computed as f,createBlock as fe,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createVNode as g,defineAsyncComponent as pe,guardReactiveProps as me,mergeProps as he,nextTick as ge,normalizeProps as _e,normalizeStyle as _,onMounted as v,openBlock as y,ref as b,renderList as ve,renderSlot as x,toDisplayString as S,toRefs as ye,unref as C,useSlots as w,watch as T}from"vue";var E=/* @__PURE__ */ e({default:()=>P}),D=[`onClick`,`onMouseenter`,`onMouseleave`],O={key:1,class:`vue-ui-sparkbar-datapoint-value`},k=[`xmlns`,`viewBox`],A=[`height`,`width`,`fill`,`rx`],j=[`height`,`width`,`fill`,`rx`],M=[`height`,`width`,`fill`,`rx`],N={key:2,ref:`source`,dir:`auto`},P={__name:`vue-ui-sparkbar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},backgroundOpacity:{type:Number,default:null}},emits:[`selectDatapoint`],setup(e,{emit:E}){let P=pe(()=>import(`./PackageVersion-DhptF5oD.js`).then(e=>e.t)),{vue_ui_sparkbar:be}=t(),F=l(),I=e,xe=w(),L=b(ee()),R=b(G()),z=f(()=>R.value.style.bar),B=f(()=>R.value.style.labels),V=f(()=>R.value.style),H=f(()=>R.value.debug);v(()=>{xe[`chart-background`]&&H.value&&console.warn(`VueUiSparkbar does not support the #chart-background slot.`)}),ce({config:()=>R.value,dataset:()=>I.dataset,component:`VueUiSparkbar`,rules:[le.noHint]});let Se=f(()=>c({defaultConfig:{style:{backgroundColor:`#99999930`,animation:{show:!1},layout:{independant:!0},gutter:{backgroundColor:`#6A6A6A`,opacity:50},bar:{gradient:{underlayerColor:`#6A6A6A`}}}},userConfig:R.value.skeletonConfig??{}})),{loading:U,FINAL_DATASET:W,manualLoading:Ce}=oe({...ye(I),FINAL_CONFIG:R,prepareConfig:G,skeletonDataset:I.config?.skeletonDataset??[{name:`_`,value:21,target:25,color:`#808080`},{name:`_`,value:13,target:25,color:`#ADADAD`},{name:`_`,value:8,target:25,color:`#DBDBDB`}],skeletonConfig:c({defaultConfig:R.value,userConfig:Se.value})});function G(){return ue(I.config,be,u)}T(()=>I.config,e=>{R.value=G()},{deep:!0});let we=f(()=>re(R.value.customPalette)),K=b(W.value.map(e=>({...e,value:V.value.animation.show?0:e.value||0,formatter:e.formatter||null}))),q=b(null);v(async()=>{ae(I.dataset)&&o({componentName:`VueUiSparkbar`,type:`dataset`,debug:H.value}),J()});function J(){if(V.value.animation.show&&!F.value){let e=V.value.animation.animationFrames,t=W.value.map((t,n)=>t.value/e),n=W.value.map(e=>e.value||0).reduce((e,t)=>e+t,0),r=0;function i(){r+=n/e,r<n?(K.value=K.value.map((e,n)=>({...e,value:e.value+=t[n]})),q.value=requestAnimationFrame(i)):K.value=W.value.map(e=>({...e,value:e.value||0,formatter:e.formatter||null}))}i()}}T(()=>W.value,async e=>{cancelAnimationFrame(q.value),K.value=W.value.map(e=>({...e,value:V.value.animation.show&&!F.value?0:e.value||0,formatter:e.formatter||null})),ge(J)},{deep:!0});let Y=b({width:500,height:16}),Te=f(()=>Math.max(...W.value.map(e=>e.value))),Ee=f(()=>(H.value&&W.value.forEach((e,t)=>{ie({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{o({componentName:`VueUiSparkbar`,type:`datasetSerieAttribute`,property:e,index:t})})}),K.value.map((e,t)=>({...e,value:e.value||0,color:a(e.color)||we.value[t]||r[t]||r[t%r.length]}))));function X(e){return e/Te.value}function Z(e){return V.value.layout.independant?e.target?e.value/e.target:V.value.layout.percentage?e.value>100?1:e.value/100:V.value.layout.target===0?1:e.value/V.value.layout.target:X(e.value)}function Q(e){return V.value.layout.independant&&e.target||V.value.layout.target}let De=E;function Oe(e,t){De(`selectDatapoint`,{datapoint:e,index:t}),R.value.events.datapointClick&&R.value.events.datapointClick({datapoint:e,seriesIndex:t})}function ke(e,t){R.value.events.datapointEnter&&R.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function Ae(e,t){R.value.events.datapointLeave&&R.value.events.datapointLeave({datapoint:e,seriesIndex:t})}let $=f(()=>z.value.borderRadius==null?Y.value.height/2:Math.min(Y.value.height/2,z.value.borderRadius));return(e,t)=>(y(),m(`div`,{class:`vue-data-ui-component vue-ui-sparkbar`,style:_({width:`100%`,position:`relative`,fontFamily:V.value.fontFamily,background:I.backgroundOpacity===null?V.value.backgroundColor:C(i)(V.value.backgroundColor,I.backgroundOpacity)})},[e.$slots.title?x(e.$slots,`title`,_e(me({title:{...e.title,title:V.value.title.text,subtitle:V.value.title.subtitle.text}})),void 0,void 0,0):p(``,!0),!e.$slots.title&&V.value.title.text?(y(),m(`div`,{key:1,class:`vue-ui-sparkbar-title-container`,style:_({background:V.value.title.backgroundColor,margin:V.value.title.margin,textAlign:V.value.title.textAlign})},[h(`div`,{class:`vue-ui-sparkbar-title`,style:_({fontSize:V.value.title.fontSize+`px`,color:V.value.title.color,fontWeight:V.value.title.bold?`bold`:`normal`})},S(V.value.title.text),5),V.value.title.subtitle.text?(y(),m(`div`,{key:0,class:`vue-ui-sparkbar-subtitle`,style:_({fontSize:V.value.title.subtitle.fontSize+`px`,color:V.value.title.subtitle.color,fontWeight:V.value.title.subtitle.bold?`bold`:`normal`})},S(V.value.title.subtitle.text),5)):p(``,!0)],4)):p(``,!0),(y(!0),m(d,null,ve(Ee.value,(t,r)=>(y(),m(`div`,{style:_(`display:flex !important;${[`left`,`right`].includes(B.value.name.position)?`flex-direction: ${B.value.name.position===`right`?`row-reverse`:`row`} !important`:`flex-direction:column !important`};gap:${V.value.gap}px !important;align-items:center;${C(W).length>0&&r!==C(W).length-1?`margin-bottom:6px`:``}`),onClick:e=>Oe(t,r),onMouseenter:e=>ke(t,r),onMouseleave:e=>Ae(t,r)},[C(U)?p(``,!0):x(e.$slots,`data-label`,he({ref_for:!0},{bar:{...t,target:Q(t),valueLabel:C(s)(t.formatter,t.value,C(n)({p:t.prefix||``,v:t.value,s:t.suffix||``,r:t.rounding||0}),{datapoint:t,seriesIndex:r}),targetLabel:C(s)(t.formatter,Q(t),C(n)({p:t.prefix||``,v:Q(t),s:t.suffix||``,r:t.rounding||0}),{datapoint:t,seriesIndex:r})}}),void 0,void 0,0),!e.$slots[`data-label`]||C(U)?(y(),m(`div`,{key:1,style:_({display:`flex`,justifyContent:[`right`,`top-right`].includes(B.value.name.position)?`flex-end`:[`top-center`].includes(B.value.name.position)?`center`:`flex-start`,alignItems:`center`,width:B.value.name.width,color:B.value.name.color,fontSize:B.value.fontSize+`px`,fontWeight:B.value.name.bold?`bold`:`normal`,flexWrap:`wrap`})},[C(U)?(y(),m(`div`,{key:0,class:`vue-ui-sparkbar-skeleton-name`,style:_({width:`60px`,height:B.value.fontSize+`px`,borderRadius:B.value.fontSize/4+`px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginTop:`5px`})},[h(`div`,{style:_({height:`100%`,width:`40px`,borderRadius:B.value.fontSize/4+`px`,backgroundColor:`#6A6A6A80`})},null,4),h(`div`,{style:_({height:`100%`,width:`15px`,borderRadius:B.value.fontSize/4+`px`,backgroundColor:`#6A6A6A80`})},null,4)],4)):(y(),m(d,{key:1},[h(`span`,null,S(t.name),1),B.value.value.show?(y(),m(`span`,{key:0,style:_(`font-weight:${B.value.value.bold?`bold`:`normal`}`),class:`vue-ui-sparkbar-datapoint-name`},`: `+S(C(s)(t.formatter,t.value,C(n)({p:t.prefix||``,v:t.value,s:t.suffix||``,r:t.rounding||0}),{datapoint:t,seriesIndex:r})),5)):p(``,!0),V.value.layout.showTargetValue?(y(),m(`span`,O,S(` `+V.value.layout.targetValueText)+` `+S(C(s)(t.formatter,Q(t),C(n)({p:t.prefix||``,v:Q(t),s:t.suffix||``,r:t.rounding||0}),{datapoint:t,seriesIndex:r})),1)):p(``,!0)],64))],4)):p(``,!0),(y(),m(`svg`,{role:`img`,xmlns:C(ne),viewBox:`0 0 ${Y.value.width} ${Y.value.height}`,width:`100%`},[g(C(P)),h(`defs`,null,[g(de,{t:`linear`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,id:`sparkbar_gradient_${r}_${L.value}`,stops:[[`0%`,C(i)(C(te)(t.color,.03),100-z.value.gradient.intensity),1],[`100%`,t.color,1]]},null,8,[`id`,`stops`])]),h(`rect`,{height:Y.value.height,width:Y.value.width,x:0,y:0,fill:C(i)(V.value.gutter.backgroundColor,V.value.gutter.opacity),rx:$.value},null,8,A),h(`rect`,{height:Y.value.height,width:Y.value.width*Z(t),x:0,y:0,fill:z.value.gradient.underlayerColor,rx:$.value},null,8,j),h(`rect`,{height:Y.value.height,width:Y.value.width*Z(t),x:0,y:0,fill:z.value.gradient.show?`url(#sparkbar_gradient_${r}_${L.value})`:t.color,rx:$.value},null,8,M)],8,k))],44,D))),256)),e.$slots.source?(y(),m(`div`,N,[x(e.$slots,`source`)],512)):p(``,!0),C(U)?(y(),fe(se,{key:3})):p(``,!0)],4))}};export{E as n,P as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Tt as r,X as i,at as a,b as o,i as s,in as c,t as l,yt as u,zt as ee}from"./lib-rPeBMZrn.js";import{n as te,t as ne}from"./BaseScanner-8NdoBs7B.js";import{n as re,t as ie}from"./useHints-C-TwxM0Y.js";import{t as ae}from"./resolveChartConfig-CIhClE5R.js";import{t as oe}from"./DefGrad-DKMq1REY.js";import{t as se}from"./useChartAccessibility-DOMuYJfm.js";import{t as ce}from"./usePrefersMotion-XLHwega2.js";import{t as le}from"./vue_ui_sparkgauge-D2Hk6bvS.js";import{computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createVNode as g,defineAsyncComponent as ue,normalizeClass as de,normalizeStyle as _,onBeforeUnmount as fe,onMounted as v,openBlock as y,ref as b,renderSlot as x,toDisplayString as S,toRefs as pe,unref as C,watch as w}from"vue";var T=/* @__PURE__ */ e({default:()=>j}),E=[`xmlns`,`viewBox`],me=[`width`,`height`],he=[`d`,`stroke`,`stroke-linecap`],D=[`d`,`stroke`,`stroke-linecap`,`stroke-dashoffset`],O=[`x`,`y`,`width`,`height`],k=[`x`,`y`,`font-size`,`fill`,`font-weight`],A={key:2,ref:`source`,dir:`auto`},j={__name:`vue-ui-sparkgauge`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(e){let T=ue(()=>import(`./PackageVersion-
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Tt as r,X as i,at as a,b as o,i as s,in as c,t as l,yt as u,zt as ee}from"./lib-rPeBMZrn.js";import{n as te,t as ne}from"./BaseScanner-8NdoBs7B.js";import{n as re,t as ie}from"./useHints-C-TwxM0Y.js";import{t as ae}from"./resolveChartConfig-CIhClE5R.js";import{t as oe}from"./DefGrad-DKMq1REY.js";import{t as se}from"./useChartAccessibility-DOMuYJfm.js";import{t as ce}from"./usePrefersMotion-XLHwega2.js";import{t as le}from"./vue_ui_sparkgauge-D2Hk6bvS.js";import{computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createVNode as g,defineAsyncComponent as ue,normalizeClass as de,normalizeStyle as _,onBeforeUnmount as fe,onMounted as v,openBlock as y,ref as b,renderSlot as x,toDisplayString as S,toRefs as pe,unref as C,watch as w}from"vue";var T=/* @__PURE__ */ e({default:()=>j}),E=[`xmlns`,`viewBox`],me=[`width`,`height`],he=[`d`,`stroke`,`stroke-linecap`],D=[`d`,`stroke`,`stroke-linecap`,`stroke-dashoffset`],O=[`x`,`y`,`width`,`height`],k=[`x`,`y`,`font-size`,`fill`,`font-weight`],A={key:2,ref:`source`,dir:`auto`},j={__name:`vue-ui-sparkgauge`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(e){let T=ue(()=>import(`./PackageVersion-DhptF5oD.js`).then(e=>e.t)),{vue_ui_sparkgauge:j}=t(),M=ce(),N=b(null),P=e,F=b(i()),I=b(W()),L=d(()=>I.value.style.dataLabel),R=d(()=>I.value.style);re({config:()=>I.value,dataset:()=>P.dataset,component:`VueUiSparkgauge`,rules:[ie.noHint]});let z=d(()=>R.value.animation.show&&!M.value),ge=d(()=>c({defaultConfig:{style:{animation:{show:!1},background:`#99999930`,colors:{min:`#CACACA`,max:`#6A6A6A`},track:{autoColor:!0},gutter:{color:`#6A6A6A80`}}},userConfig:I.value.skeletonConfig??{}})),{loading:B,FINAL_DATASET:V}=te({...pe(P),FINAL_CONFIG:I,prepareConfig:W,skeletonDataset:P.config?.skeletonDataset??{value:0,min:-1,max:1,title:``},skeletonConfig:c({defaultConfig:I.value,userConfig:ge.value})}),H=d(()=>{let e=V.value.min??0,t=V.value.max??0;return{min:e,max:t,diff:t-e}}),U=d(()=>H.value.diff/R.value.animation.speedMs),{svgRef:_e}=se({config:{text:P.dataset?.title||``}});function W(){return ae(P.config,j,le)}v(()=>{K()});let G=d(()=>I.value.debug);function K(){ee(P.dataset)?a({componentName:`VueUiSparkgauge`,type:`dataset`,debug:G.value}):u({datasetObject:P.dataset,requiredAttributes:[`value`,`min`,`max`]}).forEach(e=>{a({componentName:`VueUiSparkgauge`,type:`datasetAttribute`,property:e,debug:G.value})})}w(()=>P.config,()=>{I.value=W(),J.value=z.value?H.value.min:V.value.value,K()},{deep:!0});let q=d(()=>({height:R.value.height,width:128,base:R.value.basePosition})),J=b(z.value?H.value.min:V.value.value);w([()=>V.value.value,z],([e,t])=>{Y(e||0,t)},{immediate:!0});let ve=d(()=>J.value>H.value.max?H.value.max:J.value<H.value.min?H.value.min:J.value);v(()=>{Y(V.value.value||0)});function Y(e,t=z.value){if(N.value&&=(cancelAnimationFrame(N.value),null),!t){J.value=e;return}function n(){J.value<e?J.value=Math.min(J.value+U.value,e):J.value>e&&(J.value=Math.max(J.value-U.value,e)),J.value===e?N.value=null:N.value=requestAnimationFrame(n)}n()}let X=d(()=>V.value.title??``),Z=d(()=>{let e=H.value.diff;if(!isFinite(e)||e===0)return 0;let t=H.value.min,n=ve.value;return n>=0?(n-t)/e:(Math.abs(t)-Math.abs(n))/e}),Q=d(()=>r(R.value.colors.min,R.value.colors.max,H.value.min,H.value.max,J.value)),$=d(()=>L.value.autoColor?Q.value:L.value.color),ye=d(()=>R.value.track.autoColor?Q.value:R.value.track.color);return fe(()=>{N.value&&cancelAnimationFrame(N.value)}),(e,t)=>(y(),m(`div`,{class:`vue-data-ui-component vue-ui-sparkgauge`,style:_(`font-family:${R.value.fontFamily};width: 100%; background:${R.value.background}`)},[R.value.title.show&&X.value&&R.value.title.position===`top`?(y(),m(`div`,{key:0,class:`vue-data-ui-sparkgauge-label`,style:_(`font-size:${R.value.title.fontSize}px;text-align:${R.value.title.textAlign};font-weight:${R.value.title.bold?`bold`:`normal`};color:${R.value.title.color}`)},S(X.value),5)):p(``,!0),(y(),m(`svg`,{ref_key:`svgRef`,ref:_e,xmlns:C(l),viewBox:`0 0 ${q.value.width} ${q.value.height}`,style:`overflow: visible; background:transparent; width:100%;`},[g(C(T)),e.$slots[`chart-background`]&&!C(B)?(y(),m(`foreignObject`,{key:0,x:0,y:0,width:q.value.width,height:q.value.height,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`)],8,me)):p(``,!0),h(`defs`,null,[g(oe,{t:`linear`,id:`gradient_${F.value}`,x1:`-10%`,y1:`100%`,x2:`110%`,y2:`100%`,stops:[[`0%`,R.value.colors.min,1],[`100%`,R.value.colors.max,1]]},null,8,[`id`,`stops`])]),h(`path`,{d:`M10 ${q.value.base} A 1 1 0 1 1 118 ${q.value.base}`,stroke:R.value.gutter.color,"stroke-width":8,"stroke-linecap":R.value.gutter.strokeLinecap,fill:`none`},null,8,he),Z.value===0?p(``,!0):(y(),m(`path`,{key:1,d:`M10 ${q.value.base} A 1 1 0 1 1 118 ${q.value.base}`,stroke:R.value.colors.showGradient?`url(#gradient_${F.value})`:ye.value,"stroke-width":8,"stroke-linecap":R.value.track.strokeLinecap,fill:`none`,"stroke-dasharray":169.5,"stroke-dashoffset":169.5-169.5*Z.value,class:de({"vue-ui-sparkgauge-track":R.value.animation.show}),style:_(R.value.animation.show?`animation: vue-ui-sparkgauge-animation ${R.value.animation.speedMs}ms ease-in;`:``)},null,14,D)),C(B)?(y(),m(`rect`,{key:2,x:q.value.width/2-L.value.fontSize/2,y:q.value.base+6+L.value.offsetY-L.value.fontSize,width:L.value.fontSize,height:L.value.fontSize,fill:`#6A6A6A50`,rx:3},null,8,O)):(y(),m(`text`,{key:3,"text-anchor":`middle`,x:q.value.width/2,y:q.value.base+6+L.value.offsetY,"font-size":L.value.fontSize,fill:$.value,"font-weight":L.value.bold?`bold`:`normal`},S(C(s)(L.value.formatter,C(o)(J.value),C(n)({p:L.value.prefix,v:C(o)(J.value),s:L.value.suffix,r:L.value.rounding}),{datapoint:C(o)(J.value),color:$.value})),9,k))],8,E)),R.value.title.show&&X.value&&R.value.title.position===`bottom`?(y(),m(`div`,{key:1,class:`vue-data-ui-sparkgauge-label`,style:_(`font-size:${R.value.title.fontSize}px;text-align:${R.value.title.textAlign};font-weight:${R.value.title.bold?`bold`:`normal`};font-weight:${R.value.title.bold?`bold`:`normal`};color:${R.value.title.color}`)},S(X.value),5)):p(``,!0),e.$slots.source?(y(),m(`div`,A,[x(e.$slots,`source`)],512)):p(``,!0),x(e.$slots,`skeleton`,{},()=>[C(B)?(y(),f(ne,{key:0})):p(``,!0)])],4))}};export{T as n,j as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Jt as r,X as i,Yt as a,at as o,i as s,in as c,t as l,yt as ee,zt as u}from"./lib-rPeBMZrn.js";import{n as d,t as f}from"./BaseScanner-8NdoBs7B.js";import{n as te,t as ne}from"./useHints-C-TwxM0Y.js";import{t as re}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ie}from"./resolveChartConfig-CIhClE5R.js";import{t as ae}from"./Shape-CRe8woTu.js";import{c as oe}from"./canvas-lib-22VpOI4_.js";import{t as se}from"./useResponsive-CENUxfEL.js";import{t as p}from"./DefGrad-DKMq1REY.js";import{t as ce}from"./A11yDataTable-DWNlWXzs.js";import{t as le}from"./useChartAccessibility-DOMuYJfm.js";import{t as ue}from"./useFitSvgText-C1QC4P5G.js";import{t as de}from"./vue_ui_sparkhistogram-ChwOkoMb.js";import{Fragment as m,computed as h,createBlock as g,createCommentVNode as _,createElementBlock as v,createElementVNode as y,createTextVNode as fe,createVNode as pe,defineAsyncComponent as me,guardReactiveProps as he,nextTick as ge,normalizeClass as _e,normalizeProps as ve,normalizeStyle as b,onMounted as ye,openBlock as x,ref as S,renderList as C,renderSlot as w,toDisplayString as T,toRefs as be,unref as E,useCssVars as xe,watch as Se}from"vue";var D=/* @__PURE__ */ e({default:()=>O}),Ce=[`id`],we={key:0},Te={key:1},Ee={style:{position:`relative`}},De=[`xmlns`,`viewBox`,`aria-describedby`],Oe=[`width`,`height`],ke=[`height`,`width`,`fill`,`x`,`stroke`,`stroke-width`,`rx`,`stroke-dasharray`],Ae={key:1},je=[`x`,`y`,`height`,`width`,`fill`,`stroke`,`stroke-width`,`rx`],Me={key:2},Ne=[`x`,`y`,`font-size`,`font-weight`,`fill`],Pe=[`x`,`y`,`font-size`,`fill`],Fe=[`x`,`y`,`font-size`,`fill`],Ie=[`height`,`width`,`x`,`onMouseover`,`onMouseleave`,`onClick`],Le={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},O=/*#__PURE__*/ re({__name:`vue-ui-sparkhistogram`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`],setup(e,{emit:re}){xe(e=>({v57deebda:Xe.value}));let D=me(()=>import(`./PackageVersion-CXT-eAuk.js`).then(e=>e.t)),{vue_ui_sparkhistogram:O}=t(),k=e,A=S(i()),j=S(null),M=S(null),N=S(null),P=S(null),F=S(null),I=S(!1),L=S(null),R=S(`pointer`),z=S(q()),B=h(()=>z.value.style.labels),V=h(()=>z.value.style.bars),H=h(()=>z.value.style);te({config:()=>z.value,dataset:()=>k.dataset,component:`VueUiSparkHistogram`,rules:[ne.singleSeries,{test:e=>e.length>31,message:[`👀 The number of datapoints is > 31. For a more readable chart, consider:`,``,`▶️ Using VueUiXy with a line series`]}]});let Re=h(()=>c({defaultConfig:{style:{animation:{show:!1},backgroundColor:`#99999930`}},userConfig:z.value.skeletonConfig??{}})),{loading:ze,FINAL_DATASET:U,manualLoading:Be}=d({...be(k),FINAL_CONFIG:z,prepareConfig:q,skeletonDataset:k.config?.skeletonDataset??[{value:1,intensity:.2,color:`#CACACA`},{value:2,intensity:.3,color:`#CACACA`},{value:3,intensity:.5,color:`#CACACA`},{value:5,intensity:.7,color:`#CACACA`},{value:8,intensity:.9,color:`#CACACA`},{value:13,intensity:.95,color:`#CACACA`},{value:21,intensity:1,color:`#CACACA`},{value:13,intensity:.95,color:`#CACACA`},{value:8,intensity:.9,color:`#CACACA`},{value:5,intensity:.7,color:`#CACACA`},{value:3,intensity:.5,color:`#CACACA`},{value:2,intensity:.3,color:`#CACACA`},{value:1,intensity:.2,color:`#CACACA`}],skeletonConfig:c({defaultConfig:z.value,userConfig:Re.value})}),W=S(H.value.layout.width),G=S(H.value.layout.height),{svgRef:K}=le({config:H.value.title});function q(){return ie(k.config,O,de)}ye(()=>{He()});let Ve=h(()=>z.value.debug);function He(){if(u(k.dataset)?o({componentName:`VueUiSparkHistogram`,type:`dataset`,debug:Ve.value}):Ve.value&&k.dataset.forEach((e,t)=>{ee({datasetObject:e,requiredAttributes:[`value`]}).forEach(e=>{o({componentName:`VueUiSparkHistogram`,type:`datasetSerieAttribute`,property:e,index:t})})}),z.value.responsive){let e=oe(()=>{let{width:e,height:t}=se({chart:N.value,title:H.value.title.text?M.value:null,source:j.value}),n=B.value.timeLabel.show?B.value.timeLabel.fontSize*2:0,r=B.value.valueLabel.show?B.value.valueLabel.fontSize*2:0;requestAnimationFrame(()=>{W.value=Math.max(10,e),G.value=Math.max(10,t-12-n-r)})});P.value&&(F.value&&P.value.unobserve(F.value),P.value.disconnect()),P.value=new ResizeObserver(e),F.value=N.value.parentNode,P.value.observe(F.value)}}Se(()=>k.config,e=>{z.value=q(),He()},{deep:!0});let J=h(()=>{let e=B.value.timeLabel.show?B.value.timeLabel.fontSize*2:0,t=B.value.valueLabel.show?B.value.valueLabel.fontSize*2:0,n=G.value+e+t,r=W.value,i=H.value.layout.padding.top,a=n-H.value.layout.padding.bottom,o=H.value.layout.padding.left,s=r-H.value.layout.padding.right;return{bottom:a,centerY:i+(n-i-H.value.layout.padding.bottom)/2,drawingHeight:n-H.value.layout.padding.top-H.value.layout.padding.bottom-e-t,drawingWidth:r-H.value.layout.padding.left-H.value.layout.padding.right,height:n,left:o,right:s,top:i,width:r}}),Ue=h(()=>Math.max(...U.value.map(e=>Math.abs(e.value||0))));function We(e){return Math.abs(e)/Ue.value}let Y=h(()=>U.value.map((e,t)=>{let n=We(e.value||0),i=J.value.drawingHeight*n,a=J.value.drawingWidth/U.value.length,o=a*(V.value.gap/100),s=a-o,c=J.value.centerY-i/2,l=J.value.left+(o/2+t*a),ee=J.value.left+t*a,u=e.intensity===void 0?100:Math.round(e.intensity*100),d=e.color?e.color:e.value>=0?r(V.value.colors.positive,u):r(V.value.colors.negative,u),f=e.color?e.color:e.value>=0?V.value.colors.positive:V.value.colors.negative,te=e.color?`url(#gradient_datapoint_${t}_${A.value})`:e.value>=0?`url(#gradient_positive_${t}_${A.value})`:`url(#gradient_negative_${t}_${A.value})`,ne=l+s/2;return{...e,color:d,gradient:te,height:i,intensity:u,proportion:n,stroke:f,textAnchor:ne,trapX:ee,unitWidth:a,width:s,x:l,y:c}}));function Ge(e,t){return s(B.value.value.formatter,e.value,n({p:B.value.value.prefix,v:e.value,s:B.value.value.suffix,r:B.value.value.rounding}),{datapoint:e,seriesIndex:t})}let X=S(null),Ke=re;function Z(e,t){Ke(`selectDatapoint`,{datapoint:e,index:t}),z.value.events.datapointClick&&z.value.events.datapointClick({datapoint:e,seriesIndex:t})}function qe(e,t){R.value=`pointer`,L.value=t,X.value=t,z.value.events.datapointEnter&&z.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function Je(e,t){R.value!==`keyboard`&&(X.value=null,L.value=null,z.value.events.datapointLeave&&z.value.events.datapointLeave({datapoint:e,seriesIndex:t}))}function Ye(){R.value!==`keyboard`&&(X.value=null,L.value=null)}let Xe=h(()=>`${H.value.animation.speedMs}ms`),Ze=h(()=>J.value.drawingWidth/U.value.length*.9),{fitText:Q}=ue({svgRef:K,unitWidth:Ze});ye(async()=>{await ge(),Q(`.vue-ui-sparkhistogram-top-label`,B.value.value.minFontSize),Q(`.vue-ui-sparkhistogram-bottom-label`,B.value.valueLabel.minFontSize),Q(`.vue-ui-sparkhistogram-time-label`,B.value.timeLabel.minFontSize)}),Se([W,G,()=>U.value],async()=>{await ge(),Q(`.vue-ui-sparkhistogram-top-label`,B.value.value.minFontSize),Q(`.vue-ui-sparkhistogram-bottom-label`,B.value.valueLabel.minFontSize),Q(`.vue-ui-sparkhistogram-time-label`,B.value.timeLabel.minFontSize)});function Qe(){I.value=!0}function $e(){I.value=!1,L.value=null,R.value=`pointer`,X.value=null}function et(e){if(!K.value||document.activeElement!==K.value||!Y.value.length)return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){L.value=null,X.value=null,R.value=`pointer`;return}if(r){if(X.value===null)return;let e=Y.value[X.value];if(!e)return;Z(e,X.value);return}R.value=`keyboard`;let a=L.value;a===null||a<0||a>=Y.value.length?a=n?0:Y.value.length-1:n?(a+=1,a>=Y.value.length&&(a=0)):t&&(--a,a<0&&(a=Y.value.length-1)),L.value=a,X.value=a;let o=Y.value[a];z.value.events.datapointEnter&&z.value.events.datapointEnter({datapoint:o,seriesIndex:a})}let $=h(()=>({headers:[z.value.a11y?.translations?.series??`Series`,z.value.a11y?.translations?.time??`Time`,z.value.a11y?.translations?.value??`Value`,z.value.a11y?.translations?.valueLabel??`Label`],rows:Y.value.map((e,t)=>[t+1,e.timeLabel??``,e.value??``,e.valueLabel??``])}));return(e,t)=>(x(),v(`div`,{class:`vue-data-ui-component vue-ui-spark-histogram`,ref_key:`histogramChart`,ref:N,style:b(`width:100%;background:${H.value.backgroundColor};font-family:${H.value.fontFamily}`),onMouseleave:Ye},[y(`div`,{id:`chart-instructions-${A.value}`,class:`sr-only`},[y(`p`,null,T(z.value.a11y.translations.keyboardNavigation),1)],8,Ce),$.value?.rows?.length?(x(),g(ce,{key:0,uid:A.value,head:$.value.headers,body:$.value.rows,notice:z.value.a11y.translations.tableAvailable,caption:z.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):_(``,!0),H.value.title.text?(x(),v(`div`,{key:1,ref_key:`chartTitle`,ref:M,style:b(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${H.value.title.margin};padding: 0 6px;text-align:${H.value.title.textAlign}`)},[y(`div`,{style:b(`font-size:${H.value.title.fontSize}px;color:${H.value.title.color};font-weight:${H.value.title.bold?`bold`:`normal`}`)},[fe(T(H.value.title.text)+` `,1),X.value===null?_(``,!0):(x(),v(`span`,we,`- `+T(Y.value[X.value].timeLabel||``)+` `+T(E(s)(B.value.value.formatter,Y.value[X.value].value,E(n)({p:B.value.value.prefix,v:Y.value[X.value].value,s:B.value.value.suffix,r:B.value.value.rounding}),{datapoint:Y.value[X.value],seriesIndex:X.value})),1)),![void 0,null].includes(X.value)&&![null,void 0].includes(Y.value[X.value].valueLabel)?(x(),v(`span`,Te,T(` (${Y.value[X.value].valueLabel||0})`),1)):_(``,!0)],4),H.value.title.subtitle.text?(x(),v(`div`,{key:0,style:b(`font-size:${H.value.title.subtitle.fontSize}px;color:${H.value.title.subtitle.color};font-weight:${H.value.title.subtitle.bold?`bold`:`normal`}`)},T(H.value.title.subtitle.text),5)):_(``,!0)],4)):_(``,!0),y(`div`,Ee,[(x(),v(`svg`,{ref_key:`svgRef`,ref:K,xmlns:E(l),viewBox:`0 0 ${J.value.width} ${J.value.height}`,style:{overflow:`visible`},"aria-describedby":`chart-instructions-${A.value}`,tabindex:`0`,onFocus:Qe,onBlur:$e,onKeydown:et},[pe(E(D)),e.$slots[`chart-background`]?(x(),v(`foreignObject`,{key:0,x:0,y:0,width:J.value.width,height:J.value.height,style:{pointerEvents:`none`}},[w(e.$slots,`chart-background`,{},void 0,!0)],8,Oe)):_(``,!0),y(`defs`,null,[(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),g(p,{t:`radial`,id:`gradient_positive_${t}_${A.value}`,key:`gradient_positive_${t}_${A.value}`,cy:`50%`,cx:`50%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,E(r)(E(a)(V.value.colors.positive,.05),e.intensity),1],[`100%`,E(r)(V.value.colors.positive,e.intensity),1]]},null,8,[`id`,`stops`]))),128)),(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),g(p,{t:`radial`,id:`gradient_negative_${t}_${A.value}`,key:`gradient_negative_${t}_${A.value}`,cy:`50%`,cx:`50%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,E(r)(E(a)(V.value.colors.negative,.05),e.intensity),1],[`100%`,E(r)(V.value.colors.negative,e.intensity),1]]},null,8,[`id`,`stops`]))),128)),(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),g(p,{t:`radial`,id:`gradient_datapoint_${t}_${A.value}`,key:`gradient_datapoint_${t}_${A.value}`,cy:`50%`,cx:`50%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,E(r)(E(a)(e.color,.05),e.intensity),1],[`100%`,E(r)(e.color,e.intensity),1]]},null,8,[`id`,`stops`]))),128))]),(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),v(`g`,null,[X.value!==null&&X.value===t?(x(),v(`rect`,{key:0,height:J.value.height,width:e.unitWidth,fill:H.value.selector.fill,x:e.trapX,y:0,stroke:H.value.selector.stroke,"stroke-width":H.value.selector.strokeWidth,rx:H.value.selector.borderRadius,"stroke-dasharray":H.value.selector.strokeDasharray},null,8,ke)):_(``,!0)]))),256)),!V.value.shape||V.value.shape===`square`?(x(),v(`g`,Ae,[(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),v(`rect`,{x:e.x,y:e.y,height:e.height,width:e.width,fill:V.value.colors.gradient.show?e.gradient:e.color,stroke:e.stroke,"stroke-width":V.value.strokeWidth,rx:`${V.value.borderRadius*e.proportion/12}%`,class:_e({"vue-ui-sparkhistogram-shape":H.value.animation.show})},null,10,je))),256))])):(x(),v(`g`,Me,[(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),g(ae,{plot:{x:e.x+e.width/2,y:e.y+e.height/2},color:V.value.colors.gradient.show?e.gradient:e.color,shape:V.value.shape,radius:Math.min(e.height*.4,e.width*.4),class:_e({"vue-ui-sparkhistogram-shape":H.value.animation.show})},null,8,[`plot`,`color`,`shape`,`radius`,`class`]))),256))])),E(ze)?_(``,!0):(x(),v(m,{key:3},[(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),v(`g`,null,[B.value.value.show?(x(),v(`text`,{key:0,class:`vue-ui-sparkhistogram-top-label`,"text-anchor":`middle`,x:e.textAnchor,y:e.y-B.value.value.fontSize/3+B.value.value.offsetY,"font-size":B.value.value.fontSize,"font-weight":B.value.value.bold?`bold`:`normal`,fill:B.value.value.color},T(Ge(e,t)),9,Ne)):_(``,!0)]))),256)),(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),v(`g`,null,[e.valueLabel&&B.value.valueLabel.show?(x(),v(`text`,{key:0,class:`vue-ui-sparkhistogram-bottom-label`,x:e.textAnchor,y:e.y+e.height+B.value.valueLabel.fontSize,"font-size":B.value.valueLabel.fontSize,"text-anchor":`middle`,fill:B.value.valueLabel.color},T(e.valueLabel),9,Pe)):_(``,!0)]))),256)),(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),v(`g`,null,[e.timeLabel&&B.value.timeLabel.show?(x(),v(`text`,{key:0,class:`vue-ui-sparkhistogram-time-label`,x:e.textAnchor,y:J.value.height,"font-size":B.value.timeLabel.fontSize,fill:B.value.timeLabel.color,"text-anchor":`middle`},T(e.timeLabel),9,Fe)):_(``,!0)]))),256))],64)),(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),v(`g`,null,[y(`rect`,{height:J.value.height,width:e.unitWidth,fill:`transparent`,x:e.trapX,y:0,onMouseover:n=>qe(e,t),onMouseleave:n=>Je(e,t),onClick:()=>Z(e,t)},null,40,Ie)]))),256))],40,De)),e.$slots.hint?(x(),v(`div`,Le,[w(e.$slots,`hint`,ve(he({hint:z.value.a11y.translations.keyboardNavigation,isVisible:I.value})),void 0,!0)])):_(``,!0)]),e.$slots.source?(x(),v(`div`,{key:2,ref_key:`source`,ref:j,dir:`auto`},[w(e.$slots,`source`,{},void 0,!0)],512)):_(``,!0),w(e.$slots,`skeleton`,{},()=>[E(ze)?(x(),g(f,{key:0})):_(``,!0)],!0)],36))}},[[`__scopeId`,`data-v-e5a32af0`]]);export{D as n,O as t};
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-6jO1fkp5.js";import{$ as n,Jt as r,X as i,Yt as a,at as o,i as s,in as c,t as l,yt as ee,zt as u}from"./lib-rPeBMZrn.js";import{n as d,t as f}from"./BaseScanner-8NdoBs7B.js";import{n as te,t as ne}from"./useHints-C-TwxM0Y.js";import{t as re}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ie}from"./resolveChartConfig-CIhClE5R.js";import{t as ae}from"./Shape-CRe8woTu.js";import{c as oe}from"./canvas-lib-22VpOI4_.js";import{t as se}from"./useResponsive-CENUxfEL.js";import{t as p}from"./DefGrad-DKMq1REY.js";import{t as ce}from"./A11yDataTable-DWNlWXzs.js";import{t as le}from"./useChartAccessibility-DOMuYJfm.js";import{t as ue}from"./useFitSvgText-C1QC4P5G.js";import{t as de}from"./vue_ui_sparkhistogram-ChwOkoMb.js";import{Fragment as m,computed as h,createBlock as g,createCommentVNode as _,createElementBlock as v,createElementVNode as y,createTextVNode as fe,createVNode as pe,defineAsyncComponent as me,guardReactiveProps as he,nextTick as ge,normalizeClass as _e,normalizeProps as ve,normalizeStyle as b,onMounted as ye,openBlock as x,ref as S,renderList as C,renderSlot as w,toDisplayString as T,toRefs as be,unref as E,useCssVars as xe,watch as Se}from"vue";var D=/* @__PURE__ */ e({default:()=>O}),Ce=[`id`],we={key:0},Te={key:1},Ee={style:{position:`relative`}},De=[`xmlns`,`viewBox`,`aria-describedby`],Oe=[`width`,`height`],ke=[`height`,`width`,`fill`,`x`,`stroke`,`stroke-width`,`rx`,`stroke-dasharray`],Ae={key:1},je=[`x`,`y`,`height`,`width`,`fill`,`stroke`,`stroke-width`,`rx`],Me={key:2},Ne=[`x`,`y`,`font-size`,`font-weight`,`fill`],Pe=[`x`,`y`,`font-size`,`fill`],Fe=[`x`,`y`,`font-size`,`fill`],Ie=[`height`,`width`,`x`,`onMouseover`,`onMouseleave`,`onClick`],Le={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},O=/*#__PURE__*/ re({__name:`vue-ui-sparkhistogram`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`],setup(e,{emit:re}){xe(e=>({v57deebda:Xe.value}));let D=me(()=>import(`./PackageVersion-DhptF5oD.js`).then(e=>e.t)),{vue_ui_sparkhistogram:O}=t(),k=e,A=S(i()),j=S(null),M=S(null),N=S(null),P=S(null),F=S(null),I=S(!1),L=S(null),R=S(`pointer`),z=S(q()),B=h(()=>z.value.style.labels),V=h(()=>z.value.style.bars),H=h(()=>z.value.style);te({config:()=>z.value,dataset:()=>k.dataset,component:`VueUiSparkHistogram`,rules:[ne.singleSeries,{test:e=>e.length>31,message:[`👀 The number of datapoints is > 31. For a more readable chart, consider:`,``,`▶️ Using VueUiXy with a line series`]}]});let Re=h(()=>c({defaultConfig:{style:{animation:{show:!1},backgroundColor:`#99999930`}},userConfig:z.value.skeletonConfig??{}})),{loading:ze,FINAL_DATASET:U,manualLoading:Be}=d({...be(k),FINAL_CONFIG:z,prepareConfig:q,skeletonDataset:k.config?.skeletonDataset??[{value:1,intensity:.2,color:`#CACACA`},{value:2,intensity:.3,color:`#CACACA`},{value:3,intensity:.5,color:`#CACACA`},{value:5,intensity:.7,color:`#CACACA`},{value:8,intensity:.9,color:`#CACACA`},{value:13,intensity:.95,color:`#CACACA`},{value:21,intensity:1,color:`#CACACA`},{value:13,intensity:.95,color:`#CACACA`},{value:8,intensity:.9,color:`#CACACA`},{value:5,intensity:.7,color:`#CACACA`},{value:3,intensity:.5,color:`#CACACA`},{value:2,intensity:.3,color:`#CACACA`},{value:1,intensity:.2,color:`#CACACA`}],skeletonConfig:c({defaultConfig:z.value,userConfig:Re.value})}),W=S(H.value.layout.width),G=S(H.value.layout.height),{svgRef:K}=le({config:H.value.title});function q(){return ie(k.config,O,de)}ye(()=>{He()});let Ve=h(()=>z.value.debug);function He(){if(u(k.dataset)?o({componentName:`VueUiSparkHistogram`,type:`dataset`,debug:Ve.value}):Ve.value&&k.dataset.forEach((e,t)=>{ee({datasetObject:e,requiredAttributes:[`value`]}).forEach(e=>{o({componentName:`VueUiSparkHistogram`,type:`datasetSerieAttribute`,property:e,index:t})})}),z.value.responsive){let e=oe(()=>{let{width:e,height:t}=se({chart:N.value,title:H.value.title.text?M.value:null,source:j.value}),n=B.value.timeLabel.show?B.value.timeLabel.fontSize*2:0,r=B.value.valueLabel.show?B.value.valueLabel.fontSize*2:0;requestAnimationFrame(()=>{W.value=Math.max(10,e),G.value=Math.max(10,t-12-n-r)})});P.value&&(F.value&&P.value.unobserve(F.value),P.value.disconnect()),P.value=new ResizeObserver(e),F.value=N.value.parentNode,P.value.observe(F.value)}}Se(()=>k.config,e=>{z.value=q(),He()},{deep:!0});let J=h(()=>{let e=B.value.timeLabel.show?B.value.timeLabel.fontSize*2:0,t=B.value.valueLabel.show?B.value.valueLabel.fontSize*2:0,n=G.value+e+t,r=W.value,i=H.value.layout.padding.top,a=n-H.value.layout.padding.bottom,o=H.value.layout.padding.left,s=r-H.value.layout.padding.right;return{bottom:a,centerY:i+(n-i-H.value.layout.padding.bottom)/2,drawingHeight:n-H.value.layout.padding.top-H.value.layout.padding.bottom-e-t,drawingWidth:r-H.value.layout.padding.left-H.value.layout.padding.right,height:n,left:o,right:s,top:i,width:r}}),Ue=h(()=>Math.max(...U.value.map(e=>Math.abs(e.value||0))));function We(e){return Math.abs(e)/Ue.value}let Y=h(()=>U.value.map((e,t)=>{let n=We(e.value||0),i=J.value.drawingHeight*n,a=J.value.drawingWidth/U.value.length,o=a*(V.value.gap/100),s=a-o,c=J.value.centerY-i/2,l=J.value.left+(o/2+t*a),ee=J.value.left+t*a,u=e.intensity===void 0?100:Math.round(e.intensity*100),d=e.color?e.color:e.value>=0?r(V.value.colors.positive,u):r(V.value.colors.negative,u),f=e.color?e.color:e.value>=0?V.value.colors.positive:V.value.colors.negative,te=e.color?`url(#gradient_datapoint_${t}_${A.value})`:e.value>=0?`url(#gradient_positive_${t}_${A.value})`:`url(#gradient_negative_${t}_${A.value})`,ne=l+s/2;return{...e,color:d,gradient:te,height:i,intensity:u,proportion:n,stroke:f,textAnchor:ne,trapX:ee,unitWidth:a,width:s,x:l,y:c}}));function Ge(e,t){return s(B.value.value.formatter,e.value,n({p:B.value.value.prefix,v:e.value,s:B.value.value.suffix,r:B.value.value.rounding}),{datapoint:e,seriesIndex:t})}let X=S(null),Ke=re;function Z(e,t){Ke(`selectDatapoint`,{datapoint:e,index:t}),z.value.events.datapointClick&&z.value.events.datapointClick({datapoint:e,seriesIndex:t})}function qe(e,t){R.value=`pointer`,L.value=t,X.value=t,z.value.events.datapointEnter&&z.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function Je(e,t){R.value!==`keyboard`&&(X.value=null,L.value=null,z.value.events.datapointLeave&&z.value.events.datapointLeave({datapoint:e,seriesIndex:t}))}function Ye(){R.value!==`keyboard`&&(X.value=null,L.value=null)}let Xe=h(()=>`${H.value.animation.speedMs}ms`),Ze=h(()=>J.value.drawingWidth/U.value.length*.9),{fitText:Q}=ue({svgRef:K,unitWidth:Ze});ye(async()=>{await ge(),Q(`.vue-ui-sparkhistogram-top-label`,B.value.value.minFontSize),Q(`.vue-ui-sparkhistogram-bottom-label`,B.value.valueLabel.minFontSize),Q(`.vue-ui-sparkhistogram-time-label`,B.value.timeLabel.minFontSize)}),Se([W,G,()=>U.value],async()=>{await ge(),Q(`.vue-ui-sparkhistogram-top-label`,B.value.value.minFontSize),Q(`.vue-ui-sparkhistogram-bottom-label`,B.value.valueLabel.minFontSize),Q(`.vue-ui-sparkhistogram-time-label`,B.value.timeLabel.minFontSize)});function Qe(){I.value=!0}function $e(){I.value=!1,L.value=null,R.value=`pointer`,X.value=null}function et(e){if(!K.value||document.activeElement!==K.value||!Y.value.length)return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){L.value=null,X.value=null,R.value=`pointer`;return}if(r){if(X.value===null)return;let e=Y.value[X.value];if(!e)return;Z(e,X.value);return}R.value=`keyboard`;let a=L.value;a===null||a<0||a>=Y.value.length?a=n?0:Y.value.length-1:n?(a+=1,a>=Y.value.length&&(a=0)):t&&(--a,a<0&&(a=Y.value.length-1)),L.value=a,X.value=a;let o=Y.value[a];z.value.events.datapointEnter&&z.value.events.datapointEnter({datapoint:o,seriesIndex:a})}let $=h(()=>({headers:[z.value.a11y?.translations?.series??`Series`,z.value.a11y?.translations?.time??`Time`,z.value.a11y?.translations?.value??`Value`,z.value.a11y?.translations?.valueLabel??`Label`],rows:Y.value.map((e,t)=>[t+1,e.timeLabel??``,e.value??``,e.valueLabel??``])}));return(e,t)=>(x(),v(`div`,{class:`vue-data-ui-component vue-ui-spark-histogram`,ref_key:`histogramChart`,ref:N,style:b(`width:100%;background:${H.value.backgroundColor};font-family:${H.value.fontFamily}`),onMouseleave:Ye},[y(`div`,{id:`chart-instructions-${A.value}`,class:`sr-only`},[y(`p`,null,T(z.value.a11y.translations.keyboardNavigation),1)],8,Ce),$.value?.rows?.length?(x(),g(ce,{key:0,uid:A.value,head:$.value.headers,body:$.value.rows,notice:z.value.a11y.translations.tableAvailable,caption:z.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):_(``,!0),H.value.title.text?(x(),v(`div`,{key:1,ref_key:`chartTitle`,ref:M,style:b(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${H.value.title.margin};padding: 0 6px;text-align:${H.value.title.textAlign}`)},[y(`div`,{style:b(`font-size:${H.value.title.fontSize}px;color:${H.value.title.color};font-weight:${H.value.title.bold?`bold`:`normal`}`)},[fe(T(H.value.title.text)+` `,1),X.value===null?_(``,!0):(x(),v(`span`,we,`- `+T(Y.value[X.value].timeLabel||``)+` `+T(E(s)(B.value.value.formatter,Y.value[X.value].value,E(n)({p:B.value.value.prefix,v:Y.value[X.value].value,s:B.value.value.suffix,r:B.value.value.rounding}),{datapoint:Y.value[X.value],seriesIndex:X.value})),1)),![void 0,null].includes(X.value)&&![null,void 0].includes(Y.value[X.value].valueLabel)?(x(),v(`span`,Te,T(` (${Y.value[X.value].valueLabel||0})`),1)):_(``,!0)],4),H.value.title.subtitle.text?(x(),v(`div`,{key:0,style:b(`font-size:${H.value.title.subtitle.fontSize}px;color:${H.value.title.subtitle.color};font-weight:${H.value.title.subtitle.bold?`bold`:`normal`}`)},T(H.value.title.subtitle.text),5)):_(``,!0)],4)):_(``,!0),y(`div`,Ee,[(x(),v(`svg`,{ref_key:`svgRef`,ref:K,xmlns:E(l),viewBox:`0 0 ${J.value.width} ${J.value.height}`,style:{overflow:`visible`},"aria-describedby":`chart-instructions-${A.value}`,tabindex:`0`,onFocus:Qe,onBlur:$e,onKeydown:et},[pe(E(D)),e.$slots[`chart-background`]?(x(),v(`foreignObject`,{key:0,x:0,y:0,width:J.value.width,height:J.value.height,style:{pointerEvents:`none`}},[w(e.$slots,`chart-background`,{},void 0,!0)],8,Oe)):_(``,!0),y(`defs`,null,[(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),g(p,{t:`radial`,id:`gradient_positive_${t}_${A.value}`,key:`gradient_positive_${t}_${A.value}`,cy:`50%`,cx:`50%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,E(r)(E(a)(V.value.colors.positive,.05),e.intensity),1],[`100%`,E(r)(V.value.colors.positive,e.intensity),1]]},null,8,[`id`,`stops`]))),128)),(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),g(p,{t:`radial`,id:`gradient_negative_${t}_${A.value}`,key:`gradient_negative_${t}_${A.value}`,cy:`50%`,cx:`50%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,E(r)(E(a)(V.value.colors.negative,.05),e.intensity),1],[`100%`,E(r)(V.value.colors.negative,e.intensity),1]]},null,8,[`id`,`stops`]))),128)),(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),g(p,{t:`radial`,id:`gradient_datapoint_${t}_${A.value}`,key:`gradient_datapoint_${t}_${A.value}`,cy:`50%`,cx:`50%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,E(r)(E(a)(e.color,.05),e.intensity),1],[`100%`,E(r)(e.color,e.intensity),1]]},null,8,[`id`,`stops`]))),128))]),(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),v(`g`,null,[X.value!==null&&X.value===t?(x(),v(`rect`,{key:0,height:J.value.height,width:e.unitWidth,fill:H.value.selector.fill,x:e.trapX,y:0,stroke:H.value.selector.stroke,"stroke-width":H.value.selector.strokeWidth,rx:H.value.selector.borderRadius,"stroke-dasharray":H.value.selector.strokeDasharray},null,8,ke)):_(``,!0)]))),256)),!V.value.shape||V.value.shape===`square`?(x(),v(`g`,Ae,[(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),v(`rect`,{x:e.x,y:e.y,height:e.height,width:e.width,fill:V.value.colors.gradient.show?e.gradient:e.color,stroke:e.stroke,"stroke-width":V.value.strokeWidth,rx:`${V.value.borderRadius*e.proportion/12}%`,class:_e({"vue-ui-sparkhistogram-shape":H.value.animation.show})},null,10,je))),256))])):(x(),v(`g`,Me,[(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),g(ae,{plot:{x:e.x+e.width/2,y:e.y+e.height/2},color:V.value.colors.gradient.show?e.gradient:e.color,shape:V.value.shape,radius:Math.min(e.height*.4,e.width*.4),class:_e({"vue-ui-sparkhistogram-shape":H.value.animation.show})},null,8,[`plot`,`color`,`shape`,`radius`,`class`]))),256))])),E(ze)?_(``,!0):(x(),v(m,{key:3},[(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),v(`g`,null,[B.value.value.show?(x(),v(`text`,{key:0,class:`vue-ui-sparkhistogram-top-label`,"text-anchor":`middle`,x:e.textAnchor,y:e.y-B.value.value.fontSize/3+B.value.value.offsetY,"font-size":B.value.value.fontSize,"font-weight":B.value.value.bold?`bold`:`normal`,fill:B.value.value.color},T(Ge(e,t)),9,Ne)):_(``,!0)]))),256)),(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),v(`g`,null,[e.valueLabel&&B.value.valueLabel.show?(x(),v(`text`,{key:0,class:`vue-ui-sparkhistogram-bottom-label`,x:e.textAnchor,y:e.y+e.height+B.value.valueLabel.fontSize,"font-size":B.value.valueLabel.fontSize,"text-anchor":`middle`,fill:B.value.valueLabel.color},T(e.valueLabel),9,Pe)):_(``,!0)]))),256)),(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),v(`g`,null,[e.timeLabel&&B.value.timeLabel.show?(x(),v(`text`,{key:0,class:`vue-ui-sparkhistogram-time-label`,x:e.textAnchor,y:J.value.height,"font-size":B.value.timeLabel.fontSize,fill:B.value.timeLabel.color,"text-anchor":`middle`},T(e.timeLabel),9,Fe)):_(``,!0)]))),256))],64)),(x(!0),v(m,null,C(Y.value,(e,t)=>(x(),v(`g`,null,[y(`rect`,{height:J.value.height,width:e.unitWidth,fill:`transparent`,x:e.trapX,y:0,onMouseover:n=>qe(e,t),onMouseleave:n=>Je(e,t),onClick:()=>Z(e,t)},null,40,Ie)]))),256))],40,De)),e.$slots.hint?(x(),v(`div`,Le,[w(e.$slots,`hint`,ve(he({hint:z.value.a11y.translations.keyboardNavigation,isVisible:I.value})),void 0,!0)])):_(``,!0)]),e.$slots.source?(x(),v(`div`,{key:2,ref_key:`source`,ref:j,dir:`auto`},[w(e.$slots,`source`,{},void 0,!0)],512)):_(``,!0),w(e.$slots,`skeleton`,{},()=>[E(ze)?(x(),g(f,{key:0})):_(``,!0)],!0)],36))}},[[`__scopeId`,`data-v-e5a32af0`]]);export{D as n,O as t};
|