UNPKG

vue-data-ui-hq

Version:

A user-empowering data visualization Vue 3 components library for eloquent data storytelling

2 lines (1 loc) 23.9 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),h=require("./index-ZfICPrrM.cjs"),Le=require("./Title-FbHK83tB.cjs"),pe=require("./usePrinter-B-gh2f22.cjs"),Oe=require("./DataTable-CC6dPSer.cjs"),ze=require("./Tooltip-C7TJODUx.cjs"),z=require("./BaseIcon-DO69J5Rk.cjs"),Ue=require("./vue-ui-skeleton-Bvmpr51u.cjs"),Me=require("./vue-ui-accordion-Dp6uTsJi.cjs"),me=require("./useNestedProp-C14rfl0j.cjs"),De=require("./PackageVersion-D3dK8oA3.cjs"),Ae=require("./PenAndPaper-PL3bp4ud.cjs"),Ie=require("./useUserOptionState-BgepsfED.cjs"),He=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),qe=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],je={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(l,{emit:w}){const y=l,f=w;function s(a){f("zoom",a)}function g(a){f("hover",a)}return e.toRef(y,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(k=>{k.ancestor=a})}),(a,k)=>{const P=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.dataset,d=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[d.polygonPath&&d.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.polygonPath.coordinates,(F,N)=>(e.openBlock(),e.createElementBlock("circle",{cx:F.x,cy:F.y,r:d.circleRadius,fill:`url(#gradient_${d.color})`,stroke:l.hoveredUid&&l.hoveredUid===d.uid?l.strokeHovered:l.stroke,"stroke-width":l.hoveredUid&&l.hoveredUid===d.uid?d.circleRadius/6:d.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(v=>s(d),["stop"]),onMouseover:v=>g(d),onMouseleave:k[0]||(k[0]=v=>g(null))},null,40,qe))),256)),d.nodes&&d.nodes.length>0?(e.openBlock(),e.createBlock(P,{key:0,dataset:d.nodes,color:l.color,stroke:l.stroke,strokeHovered:l.strokeHovered,hoveredUid:l.hoveredUid,onZoom:s,onHover:g},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ge=["x1","y1","x2","y2","stroke","stroke-width"],Xe=["x1","y1","x2","y2","stroke","stroke-width"],Ye={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(l){const w=l;return e.toRef(w,"dataset").value.forEach(f=>{f.nodes&&f.nodes.length>0&&f.nodes.forEach(s=>{s.ancestor=f})}),(f,s)=>{const g=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.dataset,u=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.polygonPath&&u.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u.polygonPath.coordinates,(a,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.ancestor&&u.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:a.x,y1:a.y,x2:u.ancestor.polygonPath.coordinates[0].x,y2:u.ancestor.polygonPath.coordinates[0].y,stroke:l.backgroundColor,"stroke-width":u.circleRadius/1.5},null,8,Ge),e.createElementVNode("line",{x1:a.x,y1:a.y,x2:u.ancestor.polygonPath.coordinates[0].x,y2:u.ancestor.polygonPath.coordinates[0].y,stroke:l.color,"stroke-width":u.circleRadius/2},null,8,Xe)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.dataset,u=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.polygonPath&&u.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[u.nodes&&u.nodes.length>0?(e.openBlock(),e.createBlock(g,{key:0,dataset:u.nodes,color:l.color,backgroundColor:l.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},We=["x","y","fill","font-size"],Ze={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(l,{emit:w}){const y=l;return e.toRef(y,"dataset").value.forEach(s=>{s.nodes&&s.nodes.length>0&&s.nodes.forEach(g=>{g.ancestor=s})}),(s,g)=>{const u=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.polygonPath.coordinates,k=>(e.openBlock(),e.createElementBlock("text",{x:k.x,y:k.y+a.circleRadius*2,fill:l.color,"font-size":a.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(a.name),9,We))),256)),a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(u,{key:0,dataset:a.nodes,color:l.color,hoveredUid:l.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Je={style:{position:"relative",height:"100%",width:"100%"}},Ke={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(l,{emit:w}){const y=w;return(f,s)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${l.isFullscreen?"fixed":"absolute"};bottom:0;right:${l.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",Je,[e.createElementVNode("button",{onClick:s[0]||(s[0]=e.withModifiers(g=>y("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:l.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:s[1]||(s[1]=e.withModifiers(g=>y("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:l.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:s[2]||(s[2]=e.withModifiers(g=>y("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:l.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:s[3]||(s[3]=e.withModifiers(g=>y("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:l.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:s[4]||(s[4]=e.withModifiers(g=>y("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:l.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},Qe=["id"],_e={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},et={key:2,style:"width:100%;background:transparent;"},tt=["xmlns","viewBox"],ot=["width","height"],nt=["id"],rt=["stop-color"],lt=["stop-color"],st={key:6,class:"vue-data-ui-watermark"},at={key:8,ref:"source",dir:"auto"},it=["innerHTML"],ut={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(l,{expose:w}){const{vue_ui_molecule:y}=h.useConfig(),f=l,s=e.computed(()=>!!f.dataset&&f.dataset.length);e.onMounted(()=>{g()});function g(){h.objectIsEmpty(f.dataset)&&h.error({componentName:"VueUiMolecule",type:"dataset"})}const u=e.ref(h.createUid()),a=e.ref(null),k=e.ref(!1),P=e.ref(""),d=e.ref(null),F=e.ref(null),N=e.ref(!1),v=e.ref(null),Z=e.ref(null),D=e.ref(0),J=e.ref(0),K=e.ref(0),o=e.computed({get:()=>ee(),set:t=>t}),{userOptionsVisible:A,setUserOptionsVisibility:Q,keepUserOptionState:_}=Ie.useUserOptionState({config:o.value});function ee(){const t=me.useNestedProp({userConfig:f.config,defaultConfig:y});return t.theme?{...me.useNestedProp({userConfig:h.themes.vue_ui_molecule[t.theme]||f.config,defaultConfig:t}),customPalette:h.themePalettes[t.theme]||h.palette}:t}e.watch(()=>f.config,t=>{o.value=ee(),A.value=!o.value.showOnChartHover,g(),J.value+=1,K.value+=1},{deep:!0});const{isPrinting:te,isImaging:oe,generatePdf:ne,generateImage:re}=pe.usePrinter({elementId:`cluster_${u.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),he=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),ge=e.computed(()=>h.convertCustomPalette(o.value.customPalette)),C=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function le(t,n=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?le(t[0].nodes,n+1):n}function ve(){const t=le(f.dataset);let n=100,r=n;for(let c=0;c<t;c+=1)n/=1,r+=n;return{height:r,width:r}}const b=e.ref(ve()),I=e.ref(`0 0 ${b.value.width} ${b.value.height}`);function se(t,n={x:-b.value.width/2.43,y:b.value.height/2},r=b.value.width/1.1,c=24,i=0,p=0,R="#BBBBBB"){if(t&&t.length>0){const Y=h.createPolygonPath({plot:n,radius:r,sides:t.length,rotation:i});t.forEach((m,$)=>{const L=Y.coordinates[$];let x;if(m.ancestor?m.ancestor.ancestor?x=m.ancestor.color||R:(x=ge.value[p]||h.palette[p]||R,p+=1):x=R,m.polygonPath={coordinates:[L]},m.circleRadius=c,m.color=x,m.uid=h.createUid(),m.nodes&&m.nodes.length>0){const W=!m.ancestor||!m.ancestor.ancestor?p:0;m.nodes=se(m.nodes,L,r/2.9,c/2.2,i+Math.PI*$/m.nodes.length,W,x)}})}return t}function ye(t){const n=new Set;function r(i){i.forEach(p=>{p.color&&!n.has(p.color)&&n.add(p.color),p.nodes&&p.nodes.length>0&&r(p.nodes)})}r(t);const c={};return Array.from(n).forEach((i,p)=>{c[i]=`gradient_${p}`}),c}const ke=e.computed(()=>ye(B.value)),B=e.computed(()=>se(f.dataset));function H(){N.value=!1,F.value=null,Z.value=null,v.value=null,j({polygonPath:{coordinates:[{x:b.value.width/2,y:b.value.height/2}]},circleRadius:24})}const q=e.ref(null);function j(t){d.value.focus(),e.nextTick(()=>{q.value&&cancelAnimationFrame(q.value);const n=I.value.split(" "),r=parseFloat(n[0]),c=parseFloat(n[1]),i=parseFloat(n[2]),p=parseFloat(n[3]),{x:R,y:Y}=t.polygonPath.coordinates[0],{circleRadius:m}=t,$=8.34,L=R-m*$,x=Y-m*$,W=m*$*2,Ne=m*$*2,Ee=Math.sqrt((L-r)**2+(x-c)**2),O=Math.min(1200,Math.max(20,Math.floor(Ee/10))),Te=(L-r)/O,Se=(x-c)/O,Ve=(W-i)/O,Re=(Ne-p)/O;let S=0;function fe(){I.value=`${r+Te*S} ${c+Se*S} ${i+Ve*S} ${p+Re*S}`,S+=o.value.style.chart.zoom.speed,S<=O&&(q.value=requestAnimationFrame(fe))}fe()})}function be(t){F.value===t.uid?H():(F.value=t.uid,Z.value=t,v.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},j(t),N.value=t.uid!==B.value[0].uid)}function Ce(t){if(t.target.nodeName!=="circle")H(),N.value=!1;else return}const G=e.ref(null);function Be(t){G.value={datapoint:t,seriesIndex:-1,series:B.value,config:o.value};const n=o.value.style.chart.tooltip.customFormat;if(h.isFunction(n)&&h.functionReturnsString(()=>n({seriesIndex:-1,datapoint:t,series:B.value,config:o.value})))P.value=n({seriesIndex:-1,datapoint:t,series:B.value,config:o.value});else{let r="";r+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(r+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),P.value=`<div style="font-family:inherit">${r}</div>`}}const ae=e.ref(null),V=e.ref(null);function we(t){ae.value=t,t?(k.value=!0,Be(t),V.value=t.uid):(k.value=!1,P.value="",V.value=null)}function U(t){t==="right"&&(v.value.polygonPath.coordinates[0].x+=v.value.circleRadius),t==="left"&&(v.value.polygonPath.coordinates[0].x-=v.value.circleRadius),t==="top"&&(v.value.polygonPath.coordinates[0].y-=v.value.circleRadius),t==="bottom"&&(v.value.polygonPath.coordinates[0].y+=v.value.circleRadius),j(v.value)}function xe(t){const n=[];function r(c){c.forEach(i=>{const p={name:i.name,details:i.details||"-",ancestor:i.ancestor&&i.ancestor.name||"-",color:i.color||""};n.push(p),i.nodes&&i.nodes.length>0&&r(i.nodes,i.name)})}return r(t),n}const $e=e.computed(()=>xe(B.value)),E=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],n=$e.value.map((i,p)=>[{color:i.color,name:i.name},i.details,i.ancestor||""]),r={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},c=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:n,config:r,colNames:c}});function ie(){e.nextTick(()=>{const t=E.value.body.map((c,i)=>[[c[0].name],[c[1]],[c[2]]]),n=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...E.value.head]]].concat(t),r=h.createCsvContent(n);h.downloadCsv({csvContent:r,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function Pe(){return B.value}const T=e.ref(!1);function Fe(t){T.value=t,D.value+=1}function ue(){C.value.showTable=!C.value.showTable}function ce(){C.value.showDataLabels=!C.value.showDataLabels}function de(){C.value.showTooltip=!C.value.showTooltip}const M=e.ref(!1);function X(){M.value=!M.value}return w({getData:Pe,generatePdf:ne,generateCsv:ie,generateImage:re,toggleTable:ue,toggleLabels:ce,toggleTooltip:de,toggleAnnotator:X}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"moleculeChart",ref:d,class:e.normalizeClass(`vue-ui-molecule ${e.unref(T)?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${e.unref(o).style.fontFamily};width:100%; text-align:center;background:${e.unref(o).style.chart.backgroundColor}`),id:`cluster_${e.unref(u)}`,onMouseleave:n[7]||(n[7]=r=>{ae.value=null,V.value=null,e.unref(Q)(!1)}),onMouseenter:n[8]||(n[8]=()=>e.unref(Q)(!0))},[e.unref(o).userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ae.PenAndPaper,{key:0,parent:e.unref(d),backgroundColor:e.unref(o).style.chart.backgroundColor,color:e.unref(o).style.chart.color,active:e.unref(M),onClose:X},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),e.unref(he)?(e.openBlock(),e.createElementBlock("div",_e,null,512)):e.createCommentVNode("",!0),e.unref(o).style.chart.title.text?(e.openBlock(),e.createElementBlock("div",et,[(e.openBlock(),e.createBlock(Le._sfc_main,{key:`title_${e.unref(J)}`,config:{title:{cy:"molecule-div-title",...e.unref(o).style.chart.title},subtitle:{cy:"molecule-div-subtitle",...e.unref(o).style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),e.unref(o).userOptions.show&&e.unref(s)&&(e.unref(_)||e.unref(A))?(e.openBlock(),e.createBlock(pe.UserOptions,{ref_key:"details",ref:a,key:`user_options_${e.unref(D)}`,backgroundColor:e.unref(o).style.chart.backgroundColor,color:e.unref(o).style.chart.color,isPrinting:e.unref(te),isImaging:e.unref(oe),uid:e.unref(u),hasTooltip:e.unref(o).userOptions.buttons.tooltip&&e.unref(o).style.chart.tooltip.show,hasPdf:e.unref(o).userOptions.buttons.pdf,hasXls:e.unref(o).userOptions.buttons.csv,hasImg:e.unref(o).userOptions.buttons.img,hasTable:e.unref(o).userOptions.buttons.table,hasLabel:e.unref(o).userOptions.buttons.labels,hasFullscreen:e.unref(o).userOptions.buttons.fullscreen,isTooltip:e.unref(C).showTooltip,titles:{...e.unref(o).userOptions.buttonTitles},chartElement:e.unref(d),position:e.unref(o).userOptions.position,hasAnnotator:e.unref(o).userOptions.buttons.annotator,isAnnotation:e.unref(M),onToggleFullscreen:Fe,onGeneratePdf:e.unref(ne),onGenerateCsv:ie,onGenerateImage:e.unref(re),onToggleTable:ue,onToggleLabels:ce,onToggleTooltip:de,onToggleAnnotator:X,style:e.normalizeStyle({visibility:e.unref(_)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:r,isFullscreen:c})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:c})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:r,isAnnotator:c})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:r,isAnnotator:c})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),e.unref(s)?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(h.XMLNS),viewBox:e.unref(I),class:e.normalizeClass({"vue-data-ui-fullscreen--on":e.unref(T),"vue-data-ui-fulscreen--off":!e.unref(T)}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${e.unref(o).style.chart.color}`),onClick:n[0]||(n[0]=e.withModifiers(r=>Ce(r),["stop"]))},[e.createVNode(De._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:e.unref(b).width<=0?10:e.unref(b).width,height:e.unref(b).height<=0?10:e.unref(b).height,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,ot)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(e.unref(ke)),r=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${r}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(h.lightenHexColor)(r,.5)},null,8,rt),e.createElementVNode("stop",{offset:"100%","stop-color":r},null,8,lt)],8,nt))),256))]),e.createVNode(Ye,{dataset:e.unref(B),color:e.unref(o).style.chart.links.stroke,backgroundColor:e.unref(o).style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(je,{dataset:e.unref(B),hoveredUid:e.unref(V),stroke:e.unref(o).style.chart.nodes.stroke,strokeHovered:e.unref(o).style.chart.nodes.strokeHovered,onZoom:be,onHover:we},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),e.unref(C).showDataLabels?(e.openBlock(),e.createBlock(Ze,{key:1,dataset:e.unref(B),color:e.unref(o).style.chart.color,hoveredUid:e.unref(V)},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:e.unref(b)},void 0,!0)],14,tt)):e.createCommentVNode("",!0),e.unref(N)?(e.openBlock(),e.createBlock(Ke,{key:`direction_pad_${e.unref(D)}`,color:e.unref(o).style.chart.color,isFullscreen:e.unref(T),onMoveLeft:n[1]||(n[1]=r=>U("left")),onMoveRight:n[2]||(n[2]=r=>U("right")),onMoveTop:n[3]||(n[3]=r=>U("top")),onMoveBottom:n[4]||(n[4]=r=>U("bottom")),onReset:n[5]||(n[5]=r=>{H(),N.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",st,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(te)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(s)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ue.default,{key:7,config:{type:"molecule",style:{backgroundColor:e.unref(o).style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),t.$slots.source?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:e.unref(C).showTooltip&&e.unref(k),backgroundColor:e.unref(o).style.chart.tooltip.backgroundColor,color:e.unref(o).style.chart.tooltip.color,borderRadius:e.unref(o).style.chart.tooltip.borderRadius,borderColor:e.unref(o).style.chart.tooltip.borderColor,borderWidth:e.unref(o).style.chart.tooltip.borderWidth,fontSize:e.unref(o).style.chart.tooltip.fontSize,backgroundOpacity:e.unref(o).style.chart.tooltip.backgroundOpacity,position:e.unref(o).style.chart.tooltip.position,offsetY:e.unref(o).style.chart.tooltip.offsetY,parent:e.unref(d),content:e.unref(P),isFullscreen:e.unref(T),isCustom:e.unref(o).style.chart.tooltip.customFormat&&typeof e.unref(o).style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...e.unref(G)})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...e.unref(G)})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),e.unref(s)?(e.openBlock(),e.createBlock(Me.default,{key:9,hideDetails:"",config:{open:e.unref(C).showTable,maxHeight:1e4,body:{backgroundColor:e.unref(o).style.chart.backgroundColor,color:e.unref(o).style.chart.color},head:{backgroundColor:e.unref(o).style.chart.backgroundColor,color:e.unref(o).style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Oe.DataTable,{key:`table_${e.unref(K)}`,colNames:e.unref(E).colNames,head:e.unref(E).head,body:e.unref(E).body,config:e.unref(E).config,title:`${e.unref(o).style.chart.title.text}${e.unref(o).style.chart.title.subtitle.text?` : ${e.unref(o).style.chart.title.subtitle.text}`:""}`,onClose:n[6]||(n[6]=r=>e.unref(C).showTable=!1)},{th:e.withCtx(({th:r})=>[e.createElementVNode("div",{innerHTML:r,style:{display:"flex","align-items":"center"}},null,8,it)]),td:e.withCtx(({td:r})=>[e.createTextVNode(e.toDisplayString(r.name||r),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Qe))}},ct=He._export_sfc(ut,[["__scopeId","data-v-a6682d9a"]]);exports.default=ct;