@mozaic-ds/chart 0.1.0-beta.30 → 0.1.0-beta.31

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.
@@ -9007,7 +9007,7 @@ class ge {
9007
9007
  }
9008
9008
  handleTooltipPosition(t, e, n) {
9009
9009
  const s = t.chart.canvas.getBoundingClientRect(), o = window.innerWidth, a = s.left + window.scrollX + e.caretX, r = s.top + window.scrollY + e.caretY;
9010
- n.style.left = a + "px", n.style.top = r + "px", n.style.height = "auto", n.style.minWidth = "17rem", n.style.opacity = "1", n.style.position = "absolute", n.style.zIndex = "99", n.style.backgroundColor = "white", n.style.pointerEvents = "none", n.getBoundingClientRect().width + a > o && (n.style.left = a - n.getBoundingClientRect().width + "px");
9010
+ n.style.left = a + "px", n.style.top = r + "px", n.style.height = "auto", n.style.minWidth = "17rem", n.style.opacity = "1", n.style.position = "absolute", n.style.zIndex = "1999999999", n.style.backgroundColor = "white", n.style.pointerEvents = "none", n.getBoundingClientRect().width + a > o && (n.style.left = a - n.getBoundingClientRect().width + "px");
9011
9011
  }
9012
9012
  createNewTooltipElement() {
9013
9013
  const t = document.createElement("div");
@@ -19,7 +19,7 @@ var Lu=Object.defineProperty;var Tu=(G,x,rt)=>x in G?Lu(G,x,{enumerable:!0,confi
19
19
  min-width: ${yi};
20
20
  min-height: ${yi};
21
21
  margin-right: ${Yo};
22
- border-color: ${o};`)}function wn(i,t,e){const s=i.config.type==="doughnut"?t.index:t.datasetIndex,o=document.createElement("input");o.setAttribute("type","checkbox"),o.setAttribute("data-test-id",`legend-checkbox-${s}`);const a=ta(i,s),r=e?e[s]:void 0;return wd(a,t,o,r),o}function kn(i){const{type:t}=i.config;return t==="pie"||t==="doughnut"}function Jo(i){let t=i.config.data.datasets;return kn(i)&&(t=i.config.data.datasets[0].data),t}function Qo(i,t,e){if(!e.value){const n=Jo(i);e.value=!0,n.forEach((s,o)=>{o!==t&&vi(i,o)})}}function kd(i){let t=!0;return Jo(i).forEach((n,s)=>{t=t&&ta(i,s)}),t}function ta(i,t){return kn(i)?i.getDataVisibility(t):i.isDatasetVisible(t)}function vi(i,t,e){kn(i)?i.toggleDataVisibility(t):i.setDatasetVisibility(t,!i.isDatasetVisible(t)),e&&kd(i)&&(e.value=!1),i.update()}function Cn(i,t){const e=Zo(i,""),n=Sd(i),s=i.index||i.datasetIndex;return n.style.width="10px",n.style.height="10px",s%2===0?t?n.style.borderRadius="25px":n.style.transform="rotate(45deg)":t?n.style.transform="rotate(45deg)":n.style.borderRadius="25px",e.appendChild(n),e}function Si(i,t){var n,s;let e=(n=i.value)==null?void 0:n.querySelector("ul");return e||(e=document.createElement("ul"),e.style.display="flex",e.style.flexDirection=t,e.style.margin="0",e.style.padding="0",(s=i.value)==null||s.appendChild(e)),e}function ea(i){return i==="#00000000"}function Oe(i,t){const e=Math.round(Math.min(Math.max(t||1,0),1)*255);return i+e.toString(16).toUpperCase()}const{getPatternIndexWithShift:Mn}=bi();function Cd(){const i=x.ref(3),t=x.ref(null),e=x.reactive({dataSetIndex:-1,columnIndex:-1});function n(p,m,g,y,_,S){return Go(p,m,e,g,y,_,S)}function s(){i.value=4,i.value=3}function o(p,m,g,y,_,S){const v=i.value;return p.map((w,M)=>({borderColor:function(C){return g?"#00000000":r(M,C.index,y,S)},backgroundColor:function(C){return l(M,C.index,g,y,_,S)},borderWidth:function(){return g?1:v},data:w.data,label:w.label,stack:`Stack ${m?w.stack:M}`}))}function a(p,m,g,y,_){return o([p,m],!1,_,g,y)}function r(p,m,g,y){const _=Mn(p,y);return u(p,m)?g[_]:Oe(g[_],.2)}function l(p,m,g,y,_,S){const v=Mn(p,S);return u(p,m)?_[v](!1,y[v],g):_[v](!0,y[v],g)}function c(){return e.dataSetIndex<0}function h(p,m){return e.dataSetIndex===p&&e.columnIndex===m}function d(p){return e.dataSetIndex===p&&e.columnIndex<0}function u(p,m){return c()||h(p,m)||d(p)}function f(){e.dataSetIndex=-1,e.columnIndex=-1}function b(){return(p,m)=>{m[0]!==void 0?(e.dataSetIndex=m[0].datasetIndex,e.columnIndex=m[0].index):f()}}return{onHoverIndex:e,reloadChart:s,getDatasets:a,getStackedDatasets:o,getOnHoverOptions:b,getBorderColor:r,getPattern:l,privateGetHtmlLegendPlugin:n,getPatternIndexWithShift:Mn,barChartRef:t,borderWidth:i}}const{getPatternCanvas:Md}=bi();class se{constructor(){k(this,"chartType","");k(this,"datasetIndex",0);k(this,"dataIndex",0);k(this,"titleLines",[""]);k(this,"dataToDisplay","");k(this,"xValue","");k(this,"yValue","");k(this,"patternShifting",0)}createTooltip(t,e,n,s,o,a=!1){var c,h,d,u;if(!t.tooltip.dataPoints)return;this.datasetIndex=((c=t.tooltip)==null?void 0:c.dataPoints[0].datasetIndex)||0,this.dataIndex=t.tooltip.dataPoints[0].dataIndex||0,this.xValue=n.firstLineLabel||"",this.yValue=n.secondLineLabel||"",this.chartType=n.chartType,this.dataToDisplay=e(t),this.patternShifting=n.patternShifting||0;let r=document.querySelector("#chartjs-tooltip");r||(r=this.createNewTooltipElement());const l=t.tooltip;if(l.opacity===0){r.style.opacity="0";return}if(l.body){this.titleLines=l.title||[];const f=l.body.map(this.getBody);let b="background: white;";b+="border-bottom: 1px solid #CCCCCC;",b+="border-radius: 5px;",b+="padding: 10px 20px";const p=`<div style="${b}" class="tooltipTitle">`,m=this.chartType==="DOUGHNUT"?[l.title[0].split("(")[0].trim()]:f[0];let g="",y="";const _=(u=(d=(h=t.tooltip)==null?void 0:h.dataPoints[0])==null?void 0:d.dataset)==null?void 0:u.type;this.chartType==="RADAR"||this.chartType==="LINE_CHART"?(g=this.createLegendStyle(t),y=this.createLegendInnerStyle(t)):this.chartType==="BAR_CHART"||this.chartType==="DETAILS_BAR_CHART"||this.chartType==="DOUGHNUT"?g=this.createPatternLegendStyle(t):this.chartType==="MIXED_BAR_LINE_CHART"&&(_==="bar"?g=this.createPatternLegendStyle(t):(g=this.createLegendStyle(t),y=this.createLegendInnerStyle(t))),this.addLegendToDom(p,g,y,m,b,r,s,o,a,_)}this.handleTooltipPosition(t,l,r)}handleTooltipPosition(t,e,n){const s=t.chart.canvas.getBoundingClientRect(),o=window.innerWidth,a=s.left+window.scrollX+e.caretX,r=s.top+window.scrollY+e.caretY;n.style.left=a+"px",n.style.top=r+"px",n.style.height="auto",n.style.minWidth="17rem",n.style.opacity="1",n.style.position="absolute",n.style.zIndex="99",n.style.backgroundColor="white",n.style.pointerEvents="none",n.getBoundingClientRect().width+a>o&&(n.style.left=a-n.getBoundingClientRect().width+"px")}createNewTooltipElement(){const t=document.createElement("div");return t.id="chartjs-tooltip",t.style.backgroundColor="white",t.style.borderRadius="5px",t.style.transition="opacity .5s",t.style.boxShadow="0px 1px 5px rgba(0, 0, 0, 0.2)",t.innerHTML='<div class="tooltipCtn"></div>',document.body.appendChild(t),t}createPatternLegendStyle(t){return this.createCommonLegendSquareStyle(t)}createLegendStyle(t){let e=`background-color:${t.tooltip.labelColors[0].backgroundColor}`;return e+=this.createCommonLegendSquareStyle(t),e}createCommonLegendSquareStyle(t){let e=`;border: 2px solid ${t.tooltip.labelColors[0].borderColor}`;return e+=";min-height: 20px",e+=";min-width: 20px",e+=";border-radius: 5px",e+=";margin-right: 10px",e+=";display: flex",e+=";align-items: center",e+=";justify-content: center",e+=";background: rgba(0, 0, 0, 0.1);",e}createLegendInnerStyle(t){let e="height: 12px";return e+=";width: 12px",e+=";background-color: #FFF",e+=`;border: 2px solid ${t.tooltip.labelColors[0].borderColor};`,t.tooltip.labelPointStyles[0].pointStyle==="circle"?e+="border-radius: 25px;":t.tooltip.labelPointStyles[0].pointStyle==="rectRot"&&(e+="transform: rotate(45deg);"),e}addLegendToDom(t,e,n,s,o,a,r,l,c=!1,h){let d=t,u=`<div class="legendIcon" style="${e}">`;const f=`<div style="${n}"></div>`;u+=`${f}</div>`;const b=this.setInnerHtmlToAdd(s,o,u);d+=b;const p=a==null?void 0:a.querySelector(".tooltipCtn");(p==null?void 0:p.innerHTML)!=null&&(h?this.setInnerHtmlAndPattern(p,d,r,l,c,h):this.setInnerHtmlAndPattern(p,d,r,l,c))}setInnerHtmlToAdd(t,e,n){const a=`<span style="font-family: Arial; font-size: 16px">${t[0].split(":")[0]}</span>`;return this.chartType==="RADAR"?this.returnRadarHtml(e,n,a):this.chartType==="DOUGHNUT"?this.returnDoughnutHtml(n,a):this.returnDetailsBarchartHtml(e,n,a)}returnDoughnutHtml(t,e){const n="font-family: Arial; font-size: 16px",s=`<span style="${n}">${e.split("(")[0]}</span>`;let o=`<div style="${n}; display: flex; align-items: center; justify-content: space-between">`;return o+=`<div style="display:flex; align-items: center;" >${t+s}</div>`,o+=`<div style="${n}; margin-left:3rem;">${this.dataToDisplay}</div>`,o+="</div></div>",o}returnRadarHtml(t,e,n){const s="font-family: Arial; font-size: 16px";let o=`<div style="${s}; display: flex; align-items: center;">${e+n}</div>`;return o+="</div>",o+=`<div style="${s}; ${t}; border: none; display:flex; justify-content: space-between;">`,o+=`<div>${this.titleLines[0]}</div>`,o+=`<div style="margin-left: 20px;">${this.dataToDisplay}</div>`,o+="</div>",o+="</div><div>",o}returnDetailsBarchartHtml(t,e,n){const s="font-family: Arial; font-size: 16px";let o=`<div style="${s}; display: flex; align-items: center;">${e+n}</div>`;return o+="</div>",o+=`<div style="${s}; ${t}; display:flex; justify-content: space-between;">`,o+=`<div>${this.xValue}</div>`,o+=`<div style="margin-left: 20px;">${this.titleLines[0]}</div>`,o+="</div>",o+=`<div style="${s}; ${t}; border-: none; display:flex; justify-content: space-between;">`,o+=`<div>${this.yValue}</div>`,o+=`<div style="margin-left: 20px;">${this.dataToDisplay}</div>`,o+="</div>",o}setInnerHtmlAndPattern(t,e,n,s,o=!1,a){t.innerHTML=e;const r=document.querySelector(".legendIcon"),l=new Image;let c;this.chartType==="DOUGHNUT"?c=this.dataIndex+1:c=this.datasetIndex+1;const h=fd(c,this.patternShifting);if(this.chartType!=="LINE_CHART"&&this.chartType!=="RADAR"&&a!=="line"){const d=s[h-1](!1,n[h-1],o),u=Md(d,22,22);l.src=u.toDataURL(),r.style.backgroundImage=`url(${l.src})`}}getBody(t){return t.lines}}var oe=(i=>(i.RADAR="RADAR",i.BAR_CHART="BAR_CHART",i.MIXED_BAR_LINE_CHART="MIXED_BAR_LINE_CHART",i.DETAILS_BAR_CHART="DETAILS_BAR_CHART",i.LINE_CHART="LINE_CHART",i.DOUGHNUT="DOUGHNUT",i))(oe||{});function Pd(i,t="#A274FF",e=!1){const n=document.createElement("canvas"),s=n.getContext("2d");if(!s)return new CanvasPattern;const o=50,a=o*.15;n.width=o,n.height=o,e===!0?(s.beginPath(),s.fillStyle=t,s.rect(0,0,o,o),s.fill()):(s.beginPath(),s.fillStyle="#FFFFFF",s.lineWidth=.005*o,s.rect(0,0,o,o),s.fill(),s.beginPath(),s.globalAlpha=.1,s.fillStyle=t,s.lineWidth=.005*o,s.rect(0,0,o,o),s.fill(),s.beginPath(),s.globalAlpha=.7,s.fillStyle=t,s.lineWidth=.006*o,s.rect(.5*o,0,a,a),s.fill(),s.beginPath(),s.globalAlpha=.7,s.fillStyle=t,s.lineWidth=.006*o,s.rect(.75*o,o/2,a,a),s.fill(),s.beginPath(),s.globalAlpha=.3,s.fillStyle=t,s.lineWidth=.006*o,s.rect(0,0,a,a),s.fill(),s.beginPath(),s.globalAlpha=.3,s.fillStyle=t,s.lineWidth=.006*o,s.rect(.25*o,o/2,a,a),s.fill()),i&&(s.beginPath(),s.globalAlpha=.5,s.fillStyle="#FFFFFF",s.lineWidth=.006*o,s.rect(0,0,o,o),s.fill());const l=document.createElement("canvas").getContext("2d");if(!l)return new CanvasPattern;const c=l.createPattern(n,"repeat");return c||new CanvasPattern}function Ad(i,t="#143666",e=!1){const n=document.createElement("canvas"),s=n.getContext("2d");if(!s)return new CanvasPattern;const o=50;n.width=o,n.height=o,e===!0?(s.beginPath(),s.fillStyle=t,s.rect(0,0,o,o),s.fill()):(s.beginPath(),s.fillStyle="#FFFFFF",s.lineWidth=.005*o,s.rect(0,0,o,o),s.fill(),s.beginPath(),s.globalAlpha=.1,s.fillStyle=t,s.lineWidth=.005*o,s.rect(0,0,o,o),s.fill(),s.save(),s.beginPath(),s.transform(.708293,.705919,-.666352,.745637,0,0),s.globalAlpha=.7,s.fillStyle=t,s.lineWidth=.075*o,s.miterLimit=4,s.rect(-o*.03,-.01*o,o+o/2,.04*o),s.fill(),s.restore(),s.save(),s.beginPath(),s.transform(.708293,.705919,-.666352,.745637,0,0),s.globalAlpha=.3,s.fillStyle=t,s.lineWidth=.075*o,s.miterLimit=4,s.rect(.29*o,.33*o,o+o/2,.04*o),s.fill(),s.restore(),s.save(),s.beginPath(),s.transform(.708293,.705919,-.666352,.745637,0,0),s.globalAlpha=.7,s.fillStyle=t,s.lineWidth=.075*o,s.miterLimit=4,s.rect(.63*o,.69*o,o+o/2,.04*o),s.fill(),s.restore(),s.save(),s.beginPath(),s.transform(.708293,.705919,-.666352,.745637,0,0),s.globalAlpha=.3,s.fillStyle=t,s.lineWidth=.075*o,s.miterLimit=4,s.rect(.33*o,-.37*o,o+o/2,.04*o),s.fill(),s.restore(),s.save(),s.beginPath(),s.transform(.708293,.705919,-.666352,.745637,0,0),s.globalAlpha=.7,s.fillStyle=t,s.lineWidth=.075*o,s.miterLimit=4,s.rect(.71*o,-.72*o,o+o/2,.04*o),s.fill(),s.restore()),i&&(s.beginPath(),s.globalAlpha=.5,s.fillStyle="#FFFFFF",s.lineWidth=.006*o,s.rect(0,0,o,o),s.fill());const r=document.createElement("canvas").getContext("2d");if(!r)return new CanvasPattern;const l=r.createPattern(n,"repeat");return l||new CanvasPattern}function Dd(i,t="#00A3B2",e=!1){const n=document.createElement("canvas"),s=n.getContext("2d");if(!s)return new CanvasPattern;const o=50;n.width=o,n.height=o,e===!0?(s.beginPath(),s.fillStyle=t,s.rect(0,0,o,o),s.fill()):(s.beginPath(),s.fillStyle="#FFFFFF",s.lineWidth=.005*o,s.rect(0,0,o,o),s.fill(),s.beginPath(),s.globalAlpha=.1,s.fillStyle=t,s.lineWidth=.005*o,s.rect(0,0,o,o),s.fill(),s.beginPath(),s.globalAlpha=.7,s.strokeStyle=t,s.lineWidth=.08*o,s.moveTo(-o/2,o/2),s.lineTo(0,0),s.lineTo(o/2,o/2),s.lineTo(o,0),s.stroke(),s.beginPath(),s.globalAlpha=.3,s.strokeStyle=t,s.lineWidth=.08*o,s.moveTo(-o/2,o),s.lineTo(0,o/2),s.lineTo(o/2,o),s.lineTo(o,o/2),s.lineTo(o+o/2,o),s.stroke(),s.beginPath(),s.globalAlpha=.3,s.strokeStyle=t,s.lineWidth=.08*o,s.moveTo(-o/2,111e-6),s.lineTo(4e-6*o,-o/2),s.lineTo(o/2,111e-6),s.lineTo(o,-o/2),s.lineTo(o+o/2,111e-6),s.stroke(),s.beginPath(),s.globalAlpha=.7,s.strokeStyle=t,s.lineWidth=.08*o,s.moveTo(-o/2,o+o/2),s.lineTo(0,o),s.lineTo(o/2,o+o/2),s.lineTo(o,o),s.lineTo(o+o/2,o+o/2),s.stroke()),i&&(s.beginPath(),s.globalAlpha=.5,s.fillStyle="#FFFFFF",s.lineWidth=.006*o,s.rect(0,0,o,o),s.fill());const r=document.createElement("canvas").getContext("2d");if(!r)return new CanvasPattern;const l=r.createPattern(n,"repeat");return l||new CanvasPattern}function Ld(i,t="#8C1551",e=!1){const n=document.createElement("canvas"),s=n.getContext("2d");if(!s)return new CanvasPattern;const o=50,a=o*.15;n.width=o,n.height=o,e===!0?(s.beginPath(),s.fillStyle=t,s.rect(0,0,o,o),s.fill()):(s.beginPath(),s.fillStyle="#FFFFFF",s.lineWidth=.005*o,s.rect(0,0,o,o),s.fill(),s.beginPath(),s.globalAlpha=.1,s.fillStyle=t,s.lineWidth=.005*o,s.rect(0,0,o,o),s.fill(),s.beginPath(),s.globalAlpha=.3,s.fillStyle=t,s.lineWidth=.005*o,s.rect(0,0,a,o),s.fill(),s.beginPath(),s.globalAlpha=.7,s.fillStyle=t,s.lineWidth=.005*o,s.rect(o/2,0,a,o),s.fill()),i&&(s.beginPath(),s.globalAlpha=.5,s.fillStyle="#FFFFFF",s.lineWidth=.006*o,s.rect(0,0,o,o),s.fill());const l=document.createElement("canvas").getContext("2d");if(!l)return new CanvasPattern;const c=l.createPattern(n,"repeat");return c?(l.fillStyle=c,l.fillRect(0,0,o,o),c):new CanvasPattern}function Td(i,t="#F255A3",e=!1){const n=document.createElement("canvas"),s=n.getContext("2d");if(!s)return new CanvasPattern;const o=new DOMMatrix,a=21,r=.1*a;n.width=a,n.height=a,e===!0?(s.beginPath(),s.fillStyle=t,s.rect(0,0,a,a),s.fill()):(s.beginPath(),s.fillStyle="#FFFFFF",s.lineWidth=.005*a,s.rect(0,0,a,a),s.fill(),s.beginPath(),s.globalAlpha=.1,s.fillStyle=t,s.lineWidth=.005*a,s.rect(0,0,a,a),s.fill(),s.beginPath(),s.globalAlpha=.3,s.strokeStyle=t,s.lineWidth=r,s.moveTo(r,0),s.lineTo(r,.5*a),s.stroke(),s.beginPath(),s.globalAlpha=.7,s.strokeStyle=t,s.lineWidth=r,s.moveTo(a/2+r,0),s.lineTo(a/2+r,.5*a),s.stroke()),i&&(s.beginPath(),s.fillStyle="#FFFFFF",s.globalAlpha=.5,s.lineWidth=.006*a,s.rect(0,0,a,a),s.fill());const l=document.createElement("canvas"),c=l.getContext("2d");if(!c)return new CanvasPattern;const h=c.createPattern(n,"repeat");return h?(c.fillStyle=h,c.fillRect(0,0,l.width,l.height),h.setTransform(o.rotate(45)),h):new CanvasPattern}function Od(i,t="#095359",e=!1){const n=document.createElement("canvas"),s=n.getContext("2d");if(!s)return new CanvasPattern;const o=50,a=.04*o;n.width=o,n.height=o,e===!0?(s.beginPath(),s.fillStyle=t,s.rect(0,0,o,o),s.fill()):(s.beginPath(),s.fillStyle="#FFFFFF",s.lineWidth=.1005*o,s.rect(0,0,o,o),s.fill(),s.beginPath(),s.globalAlpha=.1,s.fillStyle=t,s.lineWidth=.1005*o,s.rect(0,0,o,o),s.fill(),s.beginPath(),s.globalAlpha=.3,s.strokeStyle=t,s.lineWidth=a,s.arc(a+.06*o,a+.06*o,.06*o,0,2*Math.PI),s.stroke(),s.beginPath(),s.globalAlpha=.7,s.strokeStyle=t,s.lineWidth=a,s.arc(a+.56*o,a+.06*o,.06*o,0,2*Math.PI),s.stroke(),s.beginPath(),s.globalAlpha=.3,s.strokeStyle=t,s.lineWidth=.04*o,s.arc(-a+.44*o,a+.56*o,.06*o,0,2*Math.PI),s.stroke(),s.beginPath(),s.globalAlpha=.7,s.strokeStyle=t,s.lineWidth=.04*o,s.arc(-a+.94*o,a+.56*o,.06*o,0,2*Math.PI),s.stroke()),i&&(s.beginPath(),s.globalAlpha=.5,s.fillStyle="#FFFFFF",s.lineWidth=.006*o,s.rect(0,0,o,o),s.fill());const r=document.createElement("canvas"),l=r.getContext("2d");if(!l)return new CanvasPattern;const c=l.createPattern(n,"repeat");return c?(l.fillStyle=c,l.fillRect(0,0,r.width,r.height),c):new CanvasPattern}function ae(){return{patternsStandardList:[Pd,Ad,Dd,Ld,Td,Od],colourSets:[["#393879","#006974","#405D68","#005C91","#8C3500","#8C0003"],["#A274FF","#143666","#00A3B2","#8C1551","#F255A3","#095359"],["#00A3B2","#143666","#3D993D","#8C1551","#E56D17","#4C3380"],["#8C1551","#E56D17","#4C3380","#4588E5","#095359","#F255A3"],["#4588E5","#4C3380","#E56D17","#143666","#D94141","#8C1551"],["#143666","#F255A3","#095359","#4588E5","#8C1551","#E56D17"],["#A274FF","#B0BBC0","#B0BBC0","#B0BBC0","#B0BBC0","#B0BBC0"]]}}const Id={class:"container"},Fd={class:"main"},Rd=x.defineComponent({__name:"BarChart",props:{chartId:{type:String,default:"radar-chart"},unit:{type:String,default:"%"},labels:{type:Array,default:()=>[]},colourSet:{type:Number,default:0},newPatternsOrder:{type:Array,default:()=>[0,1,2,3,4,5]},datasets:{type:Array,default:()=>[]},width:{type:String,default:"400px"},height:{type:String,default:"300px"},cssClasses:{type:String,default:void 0},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]},stacked:{type:Boolean,default:!1},disableAccessibility:{type:Boolean,default:!1},enableHoverFeature:{type:Boolean,default:!1},xAxisTitle:{type:String,default:null},yAxisTitle:{type:String,default:null},tooltipFirstLineLabel:{type:String,default:"content"},tooltipSecondLineLabel:{type:String,default:"content2"}},setup(i){const t=i;wt.register(Qt,te,Jt,Zt,ee,ie);const{colourSets:e,patternsStandardList:n}=ae(),s=x.ref(null),o=x.ref(!1),a=x.computed(()=>t.newPatternsOrder.length!==n.length?e[t.colourSet]:t.newPatternsOrder.map(A=>e[t.colourSet][A])),r=x.computed(()=>t.newPatternsOrder.length!==n.length?n:t.newPatternsOrder.map(A=>n[A])),l=x.computed(()=>t.disableAccessibility),c=x.computed(()=>t.enableHoverFeature),{onHoverIndex:h,barChartRef:d,reloadChart:u,getOnHoverOptions:f,getStackedDatasets:b,privateGetHtmlLegendPlugin:p}=Cd(),m=x.computed(()=>{const A=M(S.value);return _(),{labels:A,datasets:b(t.datasets.map((P,L)=>({data:v(L,S.value),label:t.datasets[L].label,stack:P.stack||0})),t.stacked,t.disableAccessibility,a.value,r.value,0)}});let g,y;const _=()=>{g=t.tooltipFirstLineLabel,y=t.tooltipSecondLineLabel},S=x.computed(()=>{const A=t.labels;if(A.includes("other")){const P=A.indexOf("other");if(t.datasets[0].data[P].rate+""=="0"&&t.datasets[1].data[P].rate+""=="0")return P}return null}),v=(A,P,L=!1)=>{const B=Object.assign([],t.datasets[A].data);return P&&S.value&&B.splice(S.value,1),B.map(j=>t.unit==="%"?j.rate:j.amount)},w=A=>{const P=A.tooltip.dataPoints[0].datasetIndex,L=A.tooltip.dataPoints[0].dataIndex,B=A.tooltip.body[0].lines[0].split(":")[1],j=t.datasets[P].data[L],F=j.rate?parseFloat(B.replace(",",".")).toFixed(2)+"% ":"",z=j.amountUnit?j.amountUnit:"",$=j.amount?Q(j.amount):"";return F+(F&&$?"/ ":"")+$+z},M=A=>{const P=Object.assign([],t.labels);return A&&P.splice(A,1),P.map(L=>L)},C=x.computed(()=>({onHover:t.enableHoverFeature?f():()=>{},elements:{bar:{borderSkipped:!1}},maxBarThickness:64,categoryPercentage:.6,plugins:{responsive:!0,maintainAspectRatio:!1,legend:{display:!1},title:{display:!1},datalabels:{display:!1},tooltip:{enabled:!1,position:"nearest",external:function(A){var L;const P=((L=A.tooltip.dataPoints)==null?void 0:L[0].dataIndex)||0;!t.labels[P]||t.labels[P]===""||new se().createTooltip(A,w,{chartType:oe.BAR_CHART,firstLineLabel:g,secondLineLabel:y},a.value,r.value,t.disableAccessibility)}}},scales:{x:{stacked:t.stacked,title:{display:t.xAxisTitle!==null,text:t.xAxisTitle}},y:{stacked:t.stacked,title:{display:t.yAxisTitle!==null,text:t.yAxisTitle},ticks:{callback:function(A){return t.unit==="%"?_n(A,t.unit):Q(A)+" "+t.unit}}}}})),D=x.computed(()=>[p(s,o,l,a,r,c)]);return x.watch(h,()=>{u()},{deep:!0}),(A,P)=>(x.openBlock(),x.createElementBlock("div",Id,[x.createElementVNode("div",Fd,[m.value?(x.openBlock(),x.createBlock(x.unref(Uo),{key:0,ref_key:"barChartRef",ref:d,id:i.chartId,data:m.value,options:C.value,plugins:D.value,class:x.normalizeClass(i.cssClasses),style:x.normalizeStyle([{width:i.width,height:i.height,cursor:"pointer"},i.styles])},null,8,["id","data","options","plugins","class","style"])):x.createCommentVNode("",!0)]),x.createElementVNode("div",{ref_key:"legendContainer",ref:s},null,512)]))}}),Ou="",Iu="",re=(i,t)=>{const e=i.__vccOpts||i;for(const[n,s]of t)e[n]=s;return e},wi=re(Rd,[["__scopeId","data-v-360144b2"]]);wi.install=i=>{i.component("BarChart",wi)};function Ed(){const i=x.ref(null),t=x.ref(null),e=x.ref(null),n=x.ref(null);function s(u,f,b,p,m,g,y,_){return Go(u,f,t,b,p,m,_,g,y)}function o(u,f,b,p){return t.value!==null&&p?f.map((m,g)=>t.value===g?m(!1,u[g],b):m(!0,u[g],b)):f.map((m,g)=>m(!1,u[g],b))}function a(u,f){return t.value!==null&&f?u.map((b,p)=>t.value===p?b:Oe(b,.2)):u}function r(){return(u,f)=>{f[0]!==void 0?t.value=f[0].element.$context.index:t.value=null}}const l=u=>u.charAt(0).toUpperCase()+u.slice(1).toLowerCase();function c(u){return{id:"centeredLabelPlugin",afterDatasetDraw:f=>{var y,_,S;const b=[];f.getDatasetMeta(0).data.forEach((v,w)=>{v.startAngle!==v.endAngle&&b.push(w)});const m=(S=(_=(y=f._metasets[0])==null?void 0:y._dataset)==null?void 0:_.raw_value)==null?void 0:S.filter((v,w)=>b.includes(w)).reduce((v,w)=>v+w,0),g=u[0].unit??"";n.value=`${Q(m)}${g}`}}}function h(u,f,b,p){let m=u.slice(0),g=f.slice(0);return u.length>b&&(g=d(f,b),m=m.slice(0,b-1),m.push(p)),m.map((y,_)=>`${l(y)} (${Q(g[_].rate)} %)`)}function d(u,f){if(f<1)return u;let b=u.slice(0);return u.length>f&&(b=b.slice(0,f),b[f-1]=u.slice(f).reduce((p,m)=>(p.rate+=m.rate,p.value+=m.value,p),{...u[f-1]})),b}return{onHoverIndex:t,privateGetHtmlLegendPlugin:s,getOnHoverOptions:r,groupDataAfterNthValue:d,getDoughnutLabels:h,getBackgroundColor:o,getFormatedText:l,getBorderColor:a,backgroundColor:e,doughnutRef:i,getCenteredLabelPlugin:c,centeredLabel:n}}const Bd={class:"container"},zd={class:"main"},Wd={key:1,class:"centered-label"},Hd=x.defineComponent({__name:"DoughnutChart",props:{chartId:{type:String,default:"doughnut-chart"},data:{type:Array,default:()=>[]},labels:{type:Array,default:()=>[]},cssClasses:{type:String,default:void 0},enableCenteredLabel:{type:Boolean,default:!1},disableAccessibility:{type:Boolean,default:!1},enableHoverFeature:{type:Boolean,default:!1},colourSet:{type:Number,default:0},newPatternsOrder:{type:Array,default:()=>[0,1,2,3,4,5]},width:{type:String,default:"400px"},height:{type:String,default:"400px"},maxValues:{type:Number,default:5},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]},othersLabel:{type:String,default:"others"}},setup(i){const t=i;wt.register(Qt,te,Jt,Kt);const{colourSets:e,patternsStandardList:n}=ae(),{onHoverIndex:s,doughnutRef:o,centeredLabel:a,getBackgroundColor:r,privateGetHtmlLegendPlugin:l,getCenteredLabelPlugin:c,getOnHoverOptions:h,groupDataAfterNthValue:d,getDoughnutLabels:u,getBorderColor:f}=Ed(),b=x.ref(!1),p=x.ref(null),m=x.computed(()=>d(t.data,t.maxValues)),g=x.computed(()=>t.newPatternsOrder.length!==6?e[t.colourSet]:t.newPatternsOrder.map(P=>e[t.colourSet][P])),y=x.computed(()=>t.newPatternsOrder.length!==6?n:t.newPatternsOrder.map(P=>n[P])),_=x.computed(()=>({labels:u(t.labels,t.data,t.maxValues,t.othersLabel),datasets:[{data:m.value.map(P=>P.rate),raw_value:m.value.map(P=>P.value),backgroundColor:r(g.value,y.value,t.disableAccessibility,t.enableHoverFeature),borderColor:f(g.value,t.enableHoverFeature)}]})),S=P=>{const L=P.tooltip.dataPoints[0].dataIndex,B=m.value[L],j=Q(B.rate),F=Q(B.value),z=B.unit||"";return`${F}${z} (${j})%`};function v(){return t.labels.length<=1?0:12}const w=x.computed(()=>{const P=g.value,L=y.value;return{onHover:t.enableHoverFeature?h():()=>{},plugins:{legend:{display:!1,position:"bottom",align:"start",labels:{pointStyle:"rectRounded",usePointStyle:!0}},title:{display:!1},datalabels:{display:!1},tooltip:{enabled:!1,external:function(B){new se().createTooltip(B,S,{chartType:oe.DOUGHNUT},P,L,C.value)}}},radius:"90%",cutout:"70%",borderWidth:3,spacing:v(),hoverOffset:4}}),M={data:t.data,labels:t.labels},C=x.computed(()=>t.disableAccessibility),D=x.computed(()=>t.enableHoverFeature),A=x.computed(()=>[l(p,b,C,g,y,t.maxValues,M,D),c(t.data)]);return x.watch(s,(P,L)=>{P!==L&&D.value&&r(g.value,y.value,t.disableAccessibility,D.value)}),x.watch(C,()=>{r(g.value,y.value,t.disableAccessibility,D.value)}),(P,L)=>(x.openBlock(),x.createElementBlock("div",Bd,[x.createElementVNode("div",zd,[_.value?(x.openBlock(),x.createBlock(x.unref(cd),{key:0,ref_key:"doughnutRef",ref:o,id:i.chartId,data:_.value,options:w.value,plugins:A.value,"max-values":i.maxValues,class:x.normalizeClass(i.cssClasses),style:x.normalizeStyle([{width:i.width,height:i.height,cursor:"pointer"},i.styles])},null,8,["id","data","options","plugins","max-values","class","style"])):x.createCommentVNode("",!0),i.enableCenteredLabel?(x.openBlock(),x.createElementBlock("span",Wd,x.toDisplayString(x.unref(a)),1)):x.createCommentVNode("",!0)]),x.createElementVNode("div",{ref_key:"legendContainer",ref:p},null,512)]))}}),Fu="",ki=re(Hd,[["__scopeId","data-v-42646243"]]);ki.install=i=>{i.component("DoughnutChart",ki)};const Nd={class:"container"},Vd={class:"main"},jd=x.defineComponent({__name:"LineChart",props:{chartId:{type:String,default:"radar-chart"},tooltipFirstLineLabel:{type:String,default:"content"},tooltipSecondLineLabel:{type:String,default:"content2"},width:{type:String,default:"200px"},height:{type:String,default:"400px"},disableAccessibility:{type:Boolean,default:!1},colourSet:{type:Number,default:0},newPatternsOrder:{type:Array,default:()=>[0,1,2,3,4,5]},lines:{type:Array,default:()=>{}},labels:{type:Array,default:()=>[]},xAxisTitle:{type:String,default:null},yAxisTitle:{type:String,default:null},suggestedMin:{type:Number,default:void 0},suggestedMax:{type:Number,default:void 0},cssClasses:{type:String,default:void 0},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]}},setup(i){const t=i;wt.register(Qt,te,Jt,Tt,pt,ee,ie);const{colourSets:e,patternsStandardList:n}=ae(),s=x.ref(null),o=x.ref(!1),a=x.computed(()=>t.newPatternsOrder.length!==6?e[t.colourSet]:t.newPatternsOrder.map(g=>e[t.colourSet][g])),r=t.newPatternsOrder.length!==6?n:t.newPatternsOrder.map(g=>n[g]),l=g=>{const y=g.tooltip.dataPoints[0].datasetIndex,_=g.tooltip.dataPoints[0].dataIndex,S=t.lines[y].data[_].toFixed(2);return t.lines[y].unit?S+" "+t.lines[y].unit:S},c=x.computed(()=>t.tooltipFirstLineLabel),h=x.computed(()=>t.tooltipSecondLineLabel),d=g=>{switch(g){case 1:return"circle";default:return"rectRot"}},u=x.computed(()=>({labels:t.labels.map(g=>g),datasets:t.lines.map((g,y)=>({type:"line",borderColor:a.value[y],pointStyle:d(y),pointBackgroundColor:"#FFFFFF",pointRadius:5,label:g.label,data:g.data,borderWidth:2}))}));function f(g,y){return[{id:"htmlLegend",afterUpdate(_){const S=Si(g,"column");for(S.style.display="flex",S.style.flexDirection="row",S.style.margin="1.375rem 1.0625rem";S.firstChild;)S.firstChild.remove();_.options.plugins.legend.labels.generateLabels(_).forEach(w=>{const M=_i(_,y,w.datasetIndex);let C;y.value?C=b(_,w):C=Cn(w),C.style.boxSizing="border-box",M.style.marginRight="10px",M.appendChild(C),M.appendChild(xi(w)),S.appendChild(M)})}}]}function b(g,y){const _=wn(g,y,null);return _.onclick=S=>{vi(g,y.datasetIndex,o),S.stopPropagation()},_}const p=f(s,o),m=x.computed(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},datalabels:{display:!1},tooltip:{enabled:!1,external:function(g){new se().createTooltip(g,l,{chartType:oe.LINE_CHART,firstLineLabel:c.value,secondLineLabel:h.value},a.value,r,t.disableAccessibility)}}},scales:{x:{offset:!0,title:{display:t.xAxisTitle!==null,text:t.xAxisTitle}},y:{type:"linear",display:!0,title:{display:t.yAxisTitle!==null,text:t.yAxisTitle},suggestedMin:t.suggestedMin,suggestedMax:t.suggestedMax,position:"left",grid:{drawOnChartArea:!0},ticks:{callback:function(g){const y=t.lines[0].unit;return`${Q(g)} ${y||""}`}}}}}));return(g,y)=>(x.openBlock(),x.createElementBlock("div",Nd,[x.createElementVNode("div",Vd,[u.value?(x.openBlock(),x.createBlock(x.unref(hd),{key:0,ref:"lineChartRef",id:i.chartId,data:u.value,options:m.value,plugins:x.unref(p),class:x.normalizeClass(i.cssClasses),style:x.normalizeStyle([{width:i.width,height:i.height,cursor:"pointer"},i.styles])},null,8,["id","data","options","plugins","class","style"])):x.createCommentVNode("",!0)]),x.createElementVNode("div",{ref_key:"legendContainer",ref:s},null,512)]))}}),Ru="",Ci=re(jd,[["__scopeId","data-v-e51b4953"]]);Ci.install=i=>{i.component("LineChart",Ci)};function $d(i,t){const e=i.ctx,n=i.scales.r,s=i.data.labels;!e||!n||!s||(e.save(),s.forEach((o,a)=>{const r=(n.getIndexAngle(a)-Math.PI/2)%(2*Math.PI),l=n.getPointPositionForValue(a,n.max);e.textAlign=r<=Math.PI/2||r>3*Math.PI/2?"left":"right";let c=r<=Math.PI/2||r>3*Math.PI/2?15:-15,h;r<0||r>Math.PI?h=-15:h=15,r>Math.PI/4&&r<3*Math.PI/4&&(h*=3),(r<-Math.PI/4||r>5*Math.PI/4)&&(h*=3,c=0),(r>11*Math.PI/8||r<-3*Math.PI/8)&&(e.textAlign="center");const d=l.y+h*(o.length-1)/2;e.font="12px Arial",o.forEach((u,f)=>{const b=f===o.length-1?Ud(t)[a]:"#000000";e.fillStyle=b;const p=l.x+c,m=d+15*f;e.fillText(u,p,m)})}),e.restore())}const Ud=i=>i.datasets[0].areaData.map(t=>{switch(t.color){case"red":return"#C61112";case"green":return"#46A610";default:return"#000000"}});function Yd(i,t){if(i.length>7&&i.includes(" ",7)){const n=i.indexOf(" ",7);return[i.substring(0,n),i.substring(n),t]}return[i,t]}const Xd={class:"container"},Gd=x.defineComponent({__name:"RadarChart",props:{chartId:{type:String,default:"radar-chart"},height:{type:String,default:"600px"},labels:{type:Array,default:()=>[]},disableAccessibility:{type:Boolean,default:!1},colourSet:{type:Number,default:0},newPatternsOrder:{type:Array,default:()=>[0,1,2,3,4,5]},datasets:{type:Array,default:()=>[]},cssClasses:{default:"",type:String},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]}},setup(i){const t=i;wt.register(Qt,te,Jt,Le,pt,Tt,wh);const{colourSets:e,patternsStandardList:n}=ae(),s=x.computed(()=>t.newPatternsOrder.length!==6?e[t.colourSet]:t.newPatternsOrder.map(m=>e[t.colourSet][m])),o=x.computed(()=>t.newPatternsOrder.length!==6?n:t.newPatternsOrder.map(m=>n[m])),a=x.computed(()=>({labels:d(),datasets:r()}));function r(){return t.datasets.map((m,g)=>({label:m.label,backgroundColor:Oe(s.value[g],.1),borderColor:s.value[g],pointBackgroundColor:"#FFFFFF",pointBorderColor:s.value[g],pointBorderWidth:2,borderWidth:2,pointHitRadius:55,pointRadius:5,pointStyle:g%2===0?"circle":"rectRot",pointHoverBackgroundColor:s.value[g],pointHoverBorderColor:s.value[g],data:m.areaData.map(y=>y.position)}))}const l={onClick:(m,g,y)=>{g[0]&&Qo(y,g[0].datasetIndex,h)},plugins:{htmlLegend:{containerID:"legend-container"},legend:{display:!1},title:{display:!1},datalabels:{display:!1},tooltip:{enabled:!1,position:"nearest",external:function(m){new se().createTooltip(m,p,{chartType:oe.RADAR},s.value,o.value,t.disableAccessibility)}}},layout:{padding:{left:130,right:95,top:95,bottom:95}},scales:{r:{min:0,max:100,pointLabels:{display:!1,font:{weight:400,family:"Roboto"}},ticks:{display:!1,stepSize:25}}}},c=x.ref(null),h=x.ref(!1),d=()=>t.labels.map((m,g)=>{const y=t.datasets[0].areaData[g].value?`${u(t.datasets[0].areaData[g].value+"")} ${t.datasets[0].areaData[g].unit}`:"No Data";return Yd(m,y)}),u=m=>Q(parseFloat(m));function f(m,g){const y=wn(m,g,null);return y.onclick=_=>{vi(m,g.datasetIndex,h),_.stopPropagation()},y}const b=[{id:"htmlLegend",afterUpdate(m){const g=Si(c,"row");for(;g.firstChild;)g.firstChild.remove();m.options.plugins.legend.labels.generateLabels(m).reverse().forEach(_=>{const S=_i(m,h,_.datasetIndex);let v;S.style.marginRight="0.625rem",h.value?v=f(m,_):v=Cn(_,!0),S.appendChild(v),S.appendChild(xi(_)),g.appendChild(S)})}},{id:"radarLabelPlugin",beforeDraw(m){$d(m,t)}}],p=m=>{const g=m.tooltip.dataPoints[0].datasetIndex,y=m.tooltip.dataPoints[0].dataIndex,_=t.datasets[g];return _.areaData[y].value.toFixed(2)+" "+_.areaData[y].unit};return(m,g)=>(x.openBlock(),x.createElementBlock("div",Xd,[x.createElementVNode("div",{class:"main",style:x.normalizeStyle({height:i.height})},[a.value?(x.openBlock(),x.createBlock(x.unref(dd),{key:0,id:i.chartId,data:a.value,options:l,plugins:b,class:x.normalizeClass(i.cssClasses),style:x.normalizeStyle([{height:i.height,cursor:"pointer"},i.styles])},null,8,["id","data","class","style"])):x.createCommentVNode("",!0)],4),x.createElementVNode("div",{ref_key:"legendContainer",ref:c,class:"legendContainer"},null,512)]))}}),Eu="",Mi=re(Gd,[["__scopeId","data-v-e82dcdc6"]]);Mi.install=i=>{i.component("RadarChart",Mi)};const ia=Object.freeze(Object.defineProperty({__proto__:null,BarChart:wi,DoughnutChart:ki,LineChart:Ci,RadarChart:Mi},Symbol.toStringTag,{value:"Module"})),{getPatternIndexWithShift:na}=bi();function qd(){const i=x.ref(2),t=x.reactive({dataSetIndex:-1,columnIndex:-1});function e(d,u,f,b,p,m){return[{id:"htmlLegend",afterUpdate(g){const y=Si(d,"column");for(y.style.display="flex",y.style.margin="1.375rem 1.0625rem",y.style.flexDirection="row-reverse",y.style.flexWrap="wrap",y.style.justifyContent="flex-end";y.firstChild;)y.firstChild.remove();g.options.plugins.legend.labels.generateLabels(g).sort((S,v)=>v.datasetIndex-S.datasetIndex).forEach(S=>{const v=_i(g,u,S.datasetIndex);let w;u.value?w=Ko(g,S,u,{datasetIndex:-1},p.value,!1):S!=null&&S.lineCap?w=Cn(S):w=qo(S,g,{datasetIndex:-1},b.value,p.value,m.value,!1),w.style.boxSizing="border-box",v.style.marginRight="10px",v.style.marginBottom="2px",v.appendChild(w),v.appendChild(xi(S)),y.appendChild(v)})}}]}function n(d,u,f,b,p){return e(d,u,t,f,b,p)}function s(d,u,f,b,p){const m=i.value;return d.map((g,y)=>{const _=g.type==="bar";return{type:g.type,fill:_?null:!1,borderWidth:function(){return u&&_?1:m},borderColor:function(S){return u&&_?"#00000000":_?o(y,S.index,f,p):f[y%f.length]},backgroundColor:function(S){return a(y,S.index,u,f,b,p)},yAxisID:_?"A":"B",pointStyle:y%2===0?"rectRot":"circle",data:g.data,label:g.label,pointBackgroundColor:"#FFFFFF",pointRadius:5,order:g.type==="line"?0:1}})}function o(d,u,f,b){const p=na(d,b);return r(d,u)?f[p]:Oe(f[p],.2)}function a(d,u,f,b,p,m){const g=na(d,m);return r(d,u)?p[g](!1,b[g],f):p[g](!0,b[g],f)}function r(d,u){return l()||c(d,u)||h(d)}function l(){return t.dataSetIndex<0}function c(d,u){return t.dataSetIndex===d&&t.columnIndex===u}function h(d){return t.dataSetIndex===d&&t.columnIndex<0}return{privateGetHtmlLegendPlugin:n,getMixedDatasets:s,getBorderColor:o,getPattern:a,onHoverIndex:t}}const Kd={class:"container"},Zd={class:"main"},Jd=x.defineComponent({__name:"MixedBarLineChart",props:{chartId:{type:String,default:"mixed-bar-line-chart"},unit:{type:String,default:""},labels:{type:Array,default:()=>[]},colourSet:{type:Number,default:0},newPatternsOrder:{type:Array,default:()=>[0,1,2,3,4,5]},barDatasets:{type:Array,default:()=>[]},barUnit:{type:String,default:""},lineDatasets:{type:Array,default:()=>[]},lineUnit:{type:String,default:""},width:{type:String,default:"400px"},height:{type:String,default:"300px"},cssClasses:{type:String,default:void 0},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]},stacked:{type:Boolean,default:!1},disableAccessibility:{type:Boolean,default:!1},tooltipFirstLineLabel:{type:String,default:"content"},tooltipSecondLineLabel:{type:String,default:"content2"},xAxisTitle:{type:String,default:null},yLeftAxisTitle:{type:String,default:null},yRightAxisTitle:{type:String,default:null}},setup(i){const t=i;wt.register(Qt,te,Jt,Zt,ee,ie,pt,Tt);const{privateGetHtmlLegendPlugin:e,getMixedDatasets:n}=qd(),{colourSets:s,patternsStandardList:o}=ae(),a=x.ref(null),r=x.ref(!1),l=x.computed(()=>{let g=[];return t.barDatasets&&(g=g.concat(t.barDatasets)),t.lineDatasets&&(g=g.concat(t.lineDatasets)),g}),c=x.computed(()=>t.newPatternsOrder.length!==o.length?s[t.colourSet]:t.newPatternsOrder.map(g=>s[t.colourSet][g])),h=x.computed(()=>t.newPatternsOrder.length!==o.length?o:t.newPatternsOrder.map(g=>o[g])),d=x.computed(()=>t.disableAccessibility),u=x.computed(()=>({labels:b(),datasets:n(l.value,d.value,c.value,h.value,0)})),f=g=>{const y=g.tooltip.dataPoints[0].datasetIndex,_=g.tooltip.dataPoints[0].dataIndex,S=l.value[y].data[_],v=l.value[y].type==="bar"?t.barUnit:t.lineUnit;return(v==="%"?parseFloat(S.toString().replace(",",".")).toFixed(2):Q(S))+v},b=()=>Object.assign([],t.labels).map(y=>y),p=x.computed(()=>({type:"bar",responsive:!0,maintainAspectRatio:!0,maxBarThickness:64,categoryPercentage:.6,elements:{bar:{borderSkipped:!1}},plugins:{legend:{display:!1},title:{display:!1},datalabels:{display:!1},tooltip:{enabled:!1,external:function(g){new se().createTooltip(g,f,{chartType:oe.MIXED_BAR_LINE_CHART,firstLineLabel:t.tooltipFirstLineLabel,secondLineLabel:t.tooltipSecondLineLabel},c.value,h.value,t.disableAccessibility)}}},scales:{x:{offset:!0,title:{display:t.xAxisTitle!==null,text:t.xAxisTitle}},A:{type:"linear",display:!0,position:"left",grid:{drawOnChartArea:!0},title:{display:t.yLeftAxisTitle!==null,text:t.yLeftAxisTitle},ticks:{callback:function(g){return t.barUnit==="%"?_n(g,t.unit):Q(g)+" "+t.barUnit}}},B:{type:"linear",display:!0,position:"right",grid:{drawOnChartArea:!1},title:{display:t.yRightAxisTitle!==null,text:t.yRightAxisTitle},ticks:{callback:function(g){return(t.lineUnit==="%"?_n(g,t.unit):Q(g))+" "+t.lineUnit}}}}})),m=x.ref(e(a,r,d,c,h));return(g,y)=>(x.openBlock(),x.createElementBlock("div",Kd,[x.createElementVNode("div",Zd,[u.value?(x.openBlock(),x.createBlock(x.unref(Uo),{key:0,ref:"mixedBarLineChartRef",id:i.chartId,data:u.value,options:p.value,plugins:m.value,class:x.normalizeClass(i.cssClasses),style:x.normalizeStyle([{width:i.width,height:i.height,cursor:"pointer"},i.styles])},null,8,["id","data","options","plugins","class","style"])):x.createCommentVNode("",!0)]),x.createElementVNode("div",{ref_key:"legendContainer",ref:a},null,512)]))}}),Bu="",zu="",Pn=re(Jd,[["__scopeId","data-v-e2792cc7"]]);Pn.install=i=>{i.component("MixedBarLineChart",Pn)};const Qd="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2IiBmaWxsPSJub25lIj4KICA8Y2lyY2xlIGN4PSI4IiBjeT0iOCIgcj0iNy41IiBzdHJva2U9IiM2NjY2NjYiLz4KICA8Y2lyY2xlIGN4PSI4IiBjeT0iMTEuMiIgcj0iNC4zIiBzdHJva2U9IiM2NjY2NjYiLz4KPC9zdmc+";/*!
22
+ border-color: ${o};`)}function wn(i,t,e){const s=i.config.type==="doughnut"?t.index:t.datasetIndex,o=document.createElement("input");o.setAttribute("type","checkbox"),o.setAttribute("data-test-id",`legend-checkbox-${s}`);const a=ta(i,s),r=e?e[s]:void 0;return wd(a,t,o,r),o}function kn(i){const{type:t}=i.config;return t==="pie"||t==="doughnut"}function Jo(i){let t=i.config.data.datasets;return kn(i)&&(t=i.config.data.datasets[0].data),t}function Qo(i,t,e){if(!e.value){const n=Jo(i);e.value=!0,n.forEach((s,o)=>{o!==t&&vi(i,o)})}}function kd(i){let t=!0;return Jo(i).forEach((n,s)=>{t=t&&ta(i,s)}),t}function ta(i,t){return kn(i)?i.getDataVisibility(t):i.isDatasetVisible(t)}function vi(i,t,e){kn(i)?i.toggleDataVisibility(t):i.setDatasetVisibility(t,!i.isDatasetVisible(t)),e&&kd(i)&&(e.value=!1),i.update()}function Cn(i,t){const e=Zo(i,""),n=Sd(i),s=i.index||i.datasetIndex;return n.style.width="10px",n.style.height="10px",s%2===0?t?n.style.borderRadius="25px":n.style.transform="rotate(45deg)":t?n.style.transform="rotate(45deg)":n.style.borderRadius="25px",e.appendChild(n),e}function Si(i,t){var n,s;let e=(n=i.value)==null?void 0:n.querySelector("ul");return e||(e=document.createElement("ul"),e.style.display="flex",e.style.flexDirection=t,e.style.margin="0",e.style.padding="0",(s=i.value)==null||s.appendChild(e)),e}function ea(i){return i==="#00000000"}function Oe(i,t){const e=Math.round(Math.min(Math.max(t||1,0),1)*255);return i+e.toString(16).toUpperCase()}const{getPatternIndexWithShift:Mn}=bi();function Cd(){const i=x.ref(3),t=x.ref(null),e=x.reactive({dataSetIndex:-1,columnIndex:-1});function n(p,m,g,y,_,S){return Go(p,m,e,g,y,_,S)}function s(){i.value=4,i.value=3}function o(p,m,g,y,_,S){const v=i.value;return p.map((w,M)=>({borderColor:function(C){return g?"#00000000":r(M,C.index,y,S)},backgroundColor:function(C){return l(M,C.index,g,y,_,S)},borderWidth:function(){return g?1:v},data:w.data,label:w.label,stack:`Stack ${m?w.stack:M}`}))}function a(p,m,g,y,_){return o([p,m],!1,_,g,y)}function r(p,m,g,y){const _=Mn(p,y);return u(p,m)?g[_]:Oe(g[_],.2)}function l(p,m,g,y,_,S){const v=Mn(p,S);return u(p,m)?_[v](!1,y[v],g):_[v](!0,y[v],g)}function c(){return e.dataSetIndex<0}function h(p,m){return e.dataSetIndex===p&&e.columnIndex===m}function d(p){return e.dataSetIndex===p&&e.columnIndex<0}function u(p,m){return c()||h(p,m)||d(p)}function f(){e.dataSetIndex=-1,e.columnIndex=-1}function b(){return(p,m)=>{m[0]!==void 0?(e.dataSetIndex=m[0].datasetIndex,e.columnIndex=m[0].index):f()}}return{onHoverIndex:e,reloadChart:s,getDatasets:a,getStackedDatasets:o,getOnHoverOptions:b,getBorderColor:r,getPattern:l,privateGetHtmlLegendPlugin:n,getPatternIndexWithShift:Mn,barChartRef:t,borderWidth:i}}const{getPatternCanvas:Md}=bi();class se{constructor(){k(this,"chartType","");k(this,"datasetIndex",0);k(this,"dataIndex",0);k(this,"titleLines",[""]);k(this,"dataToDisplay","");k(this,"xValue","");k(this,"yValue","");k(this,"patternShifting",0)}createTooltip(t,e,n,s,o,a=!1){var c,h,d,u;if(!t.tooltip.dataPoints)return;this.datasetIndex=((c=t.tooltip)==null?void 0:c.dataPoints[0].datasetIndex)||0,this.dataIndex=t.tooltip.dataPoints[0].dataIndex||0,this.xValue=n.firstLineLabel||"",this.yValue=n.secondLineLabel||"",this.chartType=n.chartType,this.dataToDisplay=e(t),this.patternShifting=n.patternShifting||0;let r=document.querySelector("#chartjs-tooltip");r||(r=this.createNewTooltipElement());const l=t.tooltip;if(l.opacity===0){r.style.opacity="0";return}if(l.body){this.titleLines=l.title||[];const f=l.body.map(this.getBody);let b="background: white;";b+="border-bottom: 1px solid #CCCCCC;",b+="border-radius: 5px;",b+="padding: 10px 20px";const p=`<div style="${b}" class="tooltipTitle">`,m=this.chartType==="DOUGHNUT"?[l.title[0].split("(")[0].trim()]:f[0];let g="",y="";const _=(u=(d=(h=t.tooltip)==null?void 0:h.dataPoints[0])==null?void 0:d.dataset)==null?void 0:u.type;this.chartType==="RADAR"||this.chartType==="LINE_CHART"?(g=this.createLegendStyle(t),y=this.createLegendInnerStyle(t)):this.chartType==="BAR_CHART"||this.chartType==="DETAILS_BAR_CHART"||this.chartType==="DOUGHNUT"?g=this.createPatternLegendStyle(t):this.chartType==="MIXED_BAR_LINE_CHART"&&(_==="bar"?g=this.createPatternLegendStyle(t):(g=this.createLegendStyle(t),y=this.createLegendInnerStyle(t))),this.addLegendToDom(p,g,y,m,b,r,s,o,a,_)}this.handleTooltipPosition(t,l,r)}handleTooltipPosition(t,e,n){const s=t.chart.canvas.getBoundingClientRect(),o=window.innerWidth,a=s.left+window.scrollX+e.caretX,r=s.top+window.scrollY+e.caretY;n.style.left=a+"px",n.style.top=r+"px",n.style.height="auto",n.style.minWidth="17rem",n.style.opacity="1",n.style.position="absolute",n.style.zIndex="1999999999",n.style.backgroundColor="white",n.style.pointerEvents="none",n.getBoundingClientRect().width+a>o&&(n.style.left=a-n.getBoundingClientRect().width+"px")}createNewTooltipElement(){const t=document.createElement("div");return t.id="chartjs-tooltip",t.style.backgroundColor="white",t.style.borderRadius="5px",t.style.transition="opacity .5s",t.style.boxShadow="0px 1px 5px rgba(0, 0, 0, 0.2)",t.innerHTML='<div class="tooltipCtn"></div>',document.body.appendChild(t),t}createPatternLegendStyle(t){return this.createCommonLegendSquareStyle(t)}createLegendStyle(t){let e=`background-color:${t.tooltip.labelColors[0].backgroundColor}`;return e+=this.createCommonLegendSquareStyle(t),e}createCommonLegendSquareStyle(t){let e=`;border: 2px solid ${t.tooltip.labelColors[0].borderColor}`;return e+=";min-height: 20px",e+=";min-width: 20px",e+=";border-radius: 5px",e+=";margin-right: 10px",e+=";display: flex",e+=";align-items: center",e+=";justify-content: center",e+=";background: rgba(0, 0, 0, 0.1);",e}createLegendInnerStyle(t){let e="height: 12px";return e+=";width: 12px",e+=";background-color: #FFF",e+=`;border: 2px solid ${t.tooltip.labelColors[0].borderColor};`,t.tooltip.labelPointStyles[0].pointStyle==="circle"?e+="border-radius: 25px;":t.tooltip.labelPointStyles[0].pointStyle==="rectRot"&&(e+="transform: rotate(45deg);"),e}addLegendToDom(t,e,n,s,o,a,r,l,c=!1,h){let d=t,u=`<div class="legendIcon" style="${e}">`;const f=`<div style="${n}"></div>`;u+=`${f}</div>`;const b=this.setInnerHtmlToAdd(s,o,u);d+=b;const p=a==null?void 0:a.querySelector(".tooltipCtn");(p==null?void 0:p.innerHTML)!=null&&(h?this.setInnerHtmlAndPattern(p,d,r,l,c,h):this.setInnerHtmlAndPattern(p,d,r,l,c))}setInnerHtmlToAdd(t,e,n){const a=`<span style="font-family: Arial; font-size: 16px">${t[0].split(":")[0]}</span>`;return this.chartType==="RADAR"?this.returnRadarHtml(e,n,a):this.chartType==="DOUGHNUT"?this.returnDoughnutHtml(n,a):this.returnDetailsBarchartHtml(e,n,a)}returnDoughnutHtml(t,e){const n="font-family: Arial; font-size: 16px",s=`<span style="${n}">${e.split("(")[0]}</span>`;let o=`<div style="${n}; display: flex; align-items: center; justify-content: space-between">`;return o+=`<div style="display:flex; align-items: center;" >${t+s}</div>`,o+=`<div style="${n}; margin-left:3rem;">${this.dataToDisplay}</div>`,o+="</div></div>",o}returnRadarHtml(t,e,n){const s="font-family: Arial; font-size: 16px";let o=`<div style="${s}; display: flex; align-items: center;">${e+n}</div>`;return o+="</div>",o+=`<div style="${s}; ${t}; border: none; display:flex; justify-content: space-between;">`,o+=`<div>${this.titleLines[0]}</div>`,o+=`<div style="margin-left: 20px;">${this.dataToDisplay}</div>`,o+="</div>",o+="</div><div>",o}returnDetailsBarchartHtml(t,e,n){const s="font-family: Arial; font-size: 16px";let o=`<div style="${s}; display: flex; align-items: center;">${e+n}</div>`;return o+="</div>",o+=`<div style="${s}; ${t}; display:flex; justify-content: space-between;">`,o+=`<div>${this.xValue}</div>`,o+=`<div style="margin-left: 20px;">${this.titleLines[0]}</div>`,o+="</div>",o+=`<div style="${s}; ${t}; border-: none; display:flex; justify-content: space-between;">`,o+=`<div>${this.yValue}</div>`,o+=`<div style="margin-left: 20px;">${this.dataToDisplay}</div>`,o+="</div>",o}setInnerHtmlAndPattern(t,e,n,s,o=!1,a){t.innerHTML=e;const r=document.querySelector(".legendIcon"),l=new Image;let c;this.chartType==="DOUGHNUT"?c=this.dataIndex+1:c=this.datasetIndex+1;const h=fd(c,this.patternShifting);if(this.chartType!=="LINE_CHART"&&this.chartType!=="RADAR"&&a!=="line"){const d=s[h-1](!1,n[h-1],o),u=Md(d,22,22);l.src=u.toDataURL(),r.style.backgroundImage=`url(${l.src})`}}getBody(t){return t.lines}}var oe=(i=>(i.RADAR="RADAR",i.BAR_CHART="BAR_CHART",i.MIXED_BAR_LINE_CHART="MIXED_BAR_LINE_CHART",i.DETAILS_BAR_CHART="DETAILS_BAR_CHART",i.LINE_CHART="LINE_CHART",i.DOUGHNUT="DOUGHNUT",i))(oe||{});function Pd(i,t="#A274FF",e=!1){const n=document.createElement("canvas"),s=n.getContext("2d");if(!s)return new CanvasPattern;const o=50,a=o*.15;n.width=o,n.height=o,e===!0?(s.beginPath(),s.fillStyle=t,s.rect(0,0,o,o),s.fill()):(s.beginPath(),s.fillStyle="#FFFFFF",s.lineWidth=.005*o,s.rect(0,0,o,o),s.fill(),s.beginPath(),s.globalAlpha=.1,s.fillStyle=t,s.lineWidth=.005*o,s.rect(0,0,o,o),s.fill(),s.beginPath(),s.globalAlpha=.7,s.fillStyle=t,s.lineWidth=.006*o,s.rect(.5*o,0,a,a),s.fill(),s.beginPath(),s.globalAlpha=.7,s.fillStyle=t,s.lineWidth=.006*o,s.rect(.75*o,o/2,a,a),s.fill(),s.beginPath(),s.globalAlpha=.3,s.fillStyle=t,s.lineWidth=.006*o,s.rect(0,0,a,a),s.fill(),s.beginPath(),s.globalAlpha=.3,s.fillStyle=t,s.lineWidth=.006*o,s.rect(.25*o,o/2,a,a),s.fill()),i&&(s.beginPath(),s.globalAlpha=.5,s.fillStyle="#FFFFFF",s.lineWidth=.006*o,s.rect(0,0,o,o),s.fill());const l=document.createElement("canvas").getContext("2d");if(!l)return new CanvasPattern;const c=l.createPattern(n,"repeat");return c||new CanvasPattern}function Ad(i,t="#143666",e=!1){const n=document.createElement("canvas"),s=n.getContext("2d");if(!s)return new CanvasPattern;const o=50;n.width=o,n.height=o,e===!0?(s.beginPath(),s.fillStyle=t,s.rect(0,0,o,o),s.fill()):(s.beginPath(),s.fillStyle="#FFFFFF",s.lineWidth=.005*o,s.rect(0,0,o,o),s.fill(),s.beginPath(),s.globalAlpha=.1,s.fillStyle=t,s.lineWidth=.005*o,s.rect(0,0,o,o),s.fill(),s.save(),s.beginPath(),s.transform(.708293,.705919,-.666352,.745637,0,0),s.globalAlpha=.7,s.fillStyle=t,s.lineWidth=.075*o,s.miterLimit=4,s.rect(-o*.03,-.01*o,o+o/2,.04*o),s.fill(),s.restore(),s.save(),s.beginPath(),s.transform(.708293,.705919,-.666352,.745637,0,0),s.globalAlpha=.3,s.fillStyle=t,s.lineWidth=.075*o,s.miterLimit=4,s.rect(.29*o,.33*o,o+o/2,.04*o),s.fill(),s.restore(),s.save(),s.beginPath(),s.transform(.708293,.705919,-.666352,.745637,0,0),s.globalAlpha=.7,s.fillStyle=t,s.lineWidth=.075*o,s.miterLimit=4,s.rect(.63*o,.69*o,o+o/2,.04*o),s.fill(),s.restore(),s.save(),s.beginPath(),s.transform(.708293,.705919,-.666352,.745637,0,0),s.globalAlpha=.3,s.fillStyle=t,s.lineWidth=.075*o,s.miterLimit=4,s.rect(.33*o,-.37*o,o+o/2,.04*o),s.fill(),s.restore(),s.save(),s.beginPath(),s.transform(.708293,.705919,-.666352,.745637,0,0),s.globalAlpha=.7,s.fillStyle=t,s.lineWidth=.075*o,s.miterLimit=4,s.rect(.71*o,-.72*o,o+o/2,.04*o),s.fill(),s.restore()),i&&(s.beginPath(),s.globalAlpha=.5,s.fillStyle="#FFFFFF",s.lineWidth=.006*o,s.rect(0,0,o,o),s.fill());const r=document.createElement("canvas").getContext("2d");if(!r)return new CanvasPattern;const l=r.createPattern(n,"repeat");return l||new CanvasPattern}function Dd(i,t="#00A3B2",e=!1){const n=document.createElement("canvas"),s=n.getContext("2d");if(!s)return new CanvasPattern;const o=50;n.width=o,n.height=o,e===!0?(s.beginPath(),s.fillStyle=t,s.rect(0,0,o,o),s.fill()):(s.beginPath(),s.fillStyle="#FFFFFF",s.lineWidth=.005*o,s.rect(0,0,o,o),s.fill(),s.beginPath(),s.globalAlpha=.1,s.fillStyle=t,s.lineWidth=.005*o,s.rect(0,0,o,o),s.fill(),s.beginPath(),s.globalAlpha=.7,s.strokeStyle=t,s.lineWidth=.08*o,s.moveTo(-o/2,o/2),s.lineTo(0,0),s.lineTo(o/2,o/2),s.lineTo(o,0),s.stroke(),s.beginPath(),s.globalAlpha=.3,s.strokeStyle=t,s.lineWidth=.08*o,s.moveTo(-o/2,o),s.lineTo(0,o/2),s.lineTo(o/2,o),s.lineTo(o,o/2),s.lineTo(o+o/2,o),s.stroke(),s.beginPath(),s.globalAlpha=.3,s.strokeStyle=t,s.lineWidth=.08*o,s.moveTo(-o/2,111e-6),s.lineTo(4e-6*o,-o/2),s.lineTo(o/2,111e-6),s.lineTo(o,-o/2),s.lineTo(o+o/2,111e-6),s.stroke(),s.beginPath(),s.globalAlpha=.7,s.strokeStyle=t,s.lineWidth=.08*o,s.moveTo(-o/2,o+o/2),s.lineTo(0,o),s.lineTo(o/2,o+o/2),s.lineTo(o,o),s.lineTo(o+o/2,o+o/2),s.stroke()),i&&(s.beginPath(),s.globalAlpha=.5,s.fillStyle="#FFFFFF",s.lineWidth=.006*o,s.rect(0,0,o,o),s.fill());const r=document.createElement("canvas").getContext("2d");if(!r)return new CanvasPattern;const l=r.createPattern(n,"repeat");return l||new CanvasPattern}function Ld(i,t="#8C1551",e=!1){const n=document.createElement("canvas"),s=n.getContext("2d");if(!s)return new CanvasPattern;const o=50,a=o*.15;n.width=o,n.height=o,e===!0?(s.beginPath(),s.fillStyle=t,s.rect(0,0,o,o),s.fill()):(s.beginPath(),s.fillStyle="#FFFFFF",s.lineWidth=.005*o,s.rect(0,0,o,o),s.fill(),s.beginPath(),s.globalAlpha=.1,s.fillStyle=t,s.lineWidth=.005*o,s.rect(0,0,o,o),s.fill(),s.beginPath(),s.globalAlpha=.3,s.fillStyle=t,s.lineWidth=.005*o,s.rect(0,0,a,o),s.fill(),s.beginPath(),s.globalAlpha=.7,s.fillStyle=t,s.lineWidth=.005*o,s.rect(o/2,0,a,o),s.fill()),i&&(s.beginPath(),s.globalAlpha=.5,s.fillStyle="#FFFFFF",s.lineWidth=.006*o,s.rect(0,0,o,o),s.fill());const l=document.createElement("canvas").getContext("2d");if(!l)return new CanvasPattern;const c=l.createPattern(n,"repeat");return c?(l.fillStyle=c,l.fillRect(0,0,o,o),c):new CanvasPattern}function Td(i,t="#F255A3",e=!1){const n=document.createElement("canvas"),s=n.getContext("2d");if(!s)return new CanvasPattern;const o=new DOMMatrix,a=21,r=.1*a;n.width=a,n.height=a,e===!0?(s.beginPath(),s.fillStyle=t,s.rect(0,0,a,a),s.fill()):(s.beginPath(),s.fillStyle="#FFFFFF",s.lineWidth=.005*a,s.rect(0,0,a,a),s.fill(),s.beginPath(),s.globalAlpha=.1,s.fillStyle=t,s.lineWidth=.005*a,s.rect(0,0,a,a),s.fill(),s.beginPath(),s.globalAlpha=.3,s.strokeStyle=t,s.lineWidth=r,s.moveTo(r,0),s.lineTo(r,.5*a),s.stroke(),s.beginPath(),s.globalAlpha=.7,s.strokeStyle=t,s.lineWidth=r,s.moveTo(a/2+r,0),s.lineTo(a/2+r,.5*a),s.stroke()),i&&(s.beginPath(),s.fillStyle="#FFFFFF",s.globalAlpha=.5,s.lineWidth=.006*a,s.rect(0,0,a,a),s.fill());const l=document.createElement("canvas"),c=l.getContext("2d");if(!c)return new CanvasPattern;const h=c.createPattern(n,"repeat");return h?(c.fillStyle=h,c.fillRect(0,0,l.width,l.height),h.setTransform(o.rotate(45)),h):new CanvasPattern}function Od(i,t="#095359",e=!1){const n=document.createElement("canvas"),s=n.getContext("2d");if(!s)return new CanvasPattern;const o=50,a=.04*o;n.width=o,n.height=o,e===!0?(s.beginPath(),s.fillStyle=t,s.rect(0,0,o,o),s.fill()):(s.beginPath(),s.fillStyle="#FFFFFF",s.lineWidth=.1005*o,s.rect(0,0,o,o),s.fill(),s.beginPath(),s.globalAlpha=.1,s.fillStyle=t,s.lineWidth=.1005*o,s.rect(0,0,o,o),s.fill(),s.beginPath(),s.globalAlpha=.3,s.strokeStyle=t,s.lineWidth=a,s.arc(a+.06*o,a+.06*o,.06*o,0,2*Math.PI),s.stroke(),s.beginPath(),s.globalAlpha=.7,s.strokeStyle=t,s.lineWidth=a,s.arc(a+.56*o,a+.06*o,.06*o,0,2*Math.PI),s.stroke(),s.beginPath(),s.globalAlpha=.3,s.strokeStyle=t,s.lineWidth=.04*o,s.arc(-a+.44*o,a+.56*o,.06*o,0,2*Math.PI),s.stroke(),s.beginPath(),s.globalAlpha=.7,s.strokeStyle=t,s.lineWidth=.04*o,s.arc(-a+.94*o,a+.56*o,.06*o,0,2*Math.PI),s.stroke()),i&&(s.beginPath(),s.globalAlpha=.5,s.fillStyle="#FFFFFF",s.lineWidth=.006*o,s.rect(0,0,o,o),s.fill());const r=document.createElement("canvas"),l=r.getContext("2d");if(!l)return new CanvasPattern;const c=l.createPattern(n,"repeat");return c?(l.fillStyle=c,l.fillRect(0,0,r.width,r.height),c):new CanvasPattern}function ae(){return{patternsStandardList:[Pd,Ad,Dd,Ld,Td,Od],colourSets:[["#393879","#006974","#405D68","#005C91","#8C3500","#8C0003"],["#A274FF","#143666","#00A3B2","#8C1551","#F255A3","#095359"],["#00A3B2","#143666","#3D993D","#8C1551","#E56D17","#4C3380"],["#8C1551","#E56D17","#4C3380","#4588E5","#095359","#F255A3"],["#4588E5","#4C3380","#E56D17","#143666","#D94141","#8C1551"],["#143666","#F255A3","#095359","#4588E5","#8C1551","#E56D17"],["#A274FF","#B0BBC0","#B0BBC0","#B0BBC0","#B0BBC0","#B0BBC0"]]}}const Id={class:"container"},Fd={class:"main"},Rd=x.defineComponent({__name:"BarChart",props:{chartId:{type:String,default:"radar-chart"},unit:{type:String,default:"%"},labels:{type:Array,default:()=>[]},colourSet:{type:Number,default:0},newPatternsOrder:{type:Array,default:()=>[0,1,2,3,4,5]},datasets:{type:Array,default:()=>[]},width:{type:String,default:"400px"},height:{type:String,default:"300px"},cssClasses:{type:String,default:void 0},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]},stacked:{type:Boolean,default:!1},disableAccessibility:{type:Boolean,default:!1},enableHoverFeature:{type:Boolean,default:!1},xAxisTitle:{type:String,default:null},yAxisTitle:{type:String,default:null},tooltipFirstLineLabel:{type:String,default:"content"},tooltipSecondLineLabel:{type:String,default:"content2"}},setup(i){const t=i;wt.register(Qt,te,Jt,Zt,ee,ie);const{colourSets:e,patternsStandardList:n}=ae(),s=x.ref(null),o=x.ref(!1),a=x.computed(()=>t.newPatternsOrder.length!==n.length?e[t.colourSet]:t.newPatternsOrder.map(A=>e[t.colourSet][A])),r=x.computed(()=>t.newPatternsOrder.length!==n.length?n:t.newPatternsOrder.map(A=>n[A])),l=x.computed(()=>t.disableAccessibility),c=x.computed(()=>t.enableHoverFeature),{onHoverIndex:h,barChartRef:d,reloadChart:u,getOnHoverOptions:f,getStackedDatasets:b,privateGetHtmlLegendPlugin:p}=Cd(),m=x.computed(()=>{const A=M(S.value);return _(),{labels:A,datasets:b(t.datasets.map((P,L)=>({data:v(L,S.value),label:t.datasets[L].label,stack:P.stack||0})),t.stacked,t.disableAccessibility,a.value,r.value,0)}});let g,y;const _=()=>{g=t.tooltipFirstLineLabel,y=t.tooltipSecondLineLabel},S=x.computed(()=>{const A=t.labels;if(A.includes("other")){const P=A.indexOf("other");if(t.datasets[0].data[P].rate+""=="0"&&t.datasets[1].data[P].rate+""=="0")return P}return null}),v=(A,P,L=!1)=>{const B=Object.assign([],t.datasets[A].data);return P&&S.value&&B.splice(S.value,1),B.map(j=>t.unit==="%"?j.rate:j.amount)},w=A=>{const P=A.tooltip.dataPoints[0].datasetIndex,L=A.tooltip.dataPoints[0].dataIndex,B=A.tooltip.body[0].lines[0].split(":")[1],j=t.datasets[P].data[L],F=j.rate?parseFloat(B.replace(",",".")).toFixed(2)+"% ":"",z=j.amountUnit?j.amountUnit:"",$=j.amount?Q(j.amount):"";return F+(F&&$?"/ ":"")+$+z},M=A=>{const P=Object.assign([],t.labels);return A&&P.splice(A,1),P.map(L=>L)},C=x.computed(()=>({onHover:t.enableHoverFeature?f():()=>{},elements:{bar:{borderSkipped:!1}},maxBarThickness:64,categoryPercentage:.6,plugins:{responsive:!0,maintainAspectRatio:!1,legend:{display:!1},title:{display:!1},datalabels:{display:!1},tooltip:{enabled:!1,position:"nearest",external:function(A){var L;const P=((L=A.tooltip.dataPoints)==null?void 0:L[0].dataIndex)||0;!t.labels[P]||t.labels[P]===""||new se().createTooltip(A,w,{chartType:oe.BAR_CHART,firstLineLabel:g,secondLineLabel:y},a.value,r.value,t.disableAccessibility)}}},scales:{x:{stacked:t.stacked,title:{display:t.xAxisTitle!==null,text:t.xAxisTitle}},y:{stacked:t.stacked,title:{display:t.yAxisTitle!==null,text:t.yAxisTitle},ticks:{callback:function(A){return t.unit==="%"?_n(A,t.unit):Q(A)+" "+t.unit}}}}})),D=x.computed(()=>[p(s,o,l,a,r,c)]);return x.watch(h,()=>{u()},{deep:!0}),(A,P)=>(x.openBlock(),x.createElementBlock("div",Id,[x.createElementVNode("div",Fd,[m.value?(x.openBlock(),x.createBlock(x.unref(Uo),{key:0,ref_key:"barChartRef",ref:d,id:i.chartId,data:m.value,options:C.value,plugins:D.value,class:x.normalizeClass(i.cssClasses),style:x.normalizeStyle([{width:i.width,height:i.height,cursor:"pointer"},i.styles])},null,8,["id","data","options","plugins","class","style"])):x.createCommentVNode("",!0)]),x.createElementVNode("div",{ref_key:"legendContainer",ref:s},null,512)]))}}),Ou="",Iu="",re=(i,t)=>{const e=i.__vccOpts||i;for(const[n,s]of t)e[n]=s;return e},wi=re(Rd,[["__scopeId","data-v-360144b2"]]);wi.install=i=>{i.component("BarChart",wi)};function Ed(){const i=x.ref(null),t=x.ref(null),e=x.ref(null),n=x.ref(null);function s(u,f,b,p,m,g,y,_){return Go(u,f,t,b,p,m,_,g,y)}function o(u,f,b,p){return t.value!==null&&p?f.map((m,g)=>t.value===g?m(!1,u[g],b):m(!0,u[g],b)):f.map((m,g)=>m(!1,u[g],b))}function a(u,f){return t.value!==null&&f?u.map((b,p)=>t.value===p?b:Oe(b,.2)):u}function r(){return(u,f)=>{f[0]!==void 0?t.value=f[0].element.$context.index:t.value=null}}const l=u=>u.charAt(0).toUpperCase()+u.slice(1).toLowerCase();function c(u){return{id:"centeredLabelPlugin",afterDatasetDraw:f=>{var y,_,S;const b=[];f.getDatasetMeta(0).data.forEach((v,w)=>{v.startAngle!==v.endAngle&&b.push(w)});const m=(S=(_=(y=f._metasets[0])==null?void 0:y._dataset)==null?void 0:_.raw_value)==null?void 0:S.filter((v,w)=>b.includes(w)).reduce((v,w)=>v+w,0),g=u[0].unit??"";n.value=`${Q(m)}${g}`}}}function h(u,f,b,p){let m=u.slice(0),g=f.slice(0);return u.length>b&&(g=d(f,b),m=m.slice(0,b-1),m.push(p)),m.map((y,_)=>`${l(y)} (${Q(g[_].rate)} %)`)}function d(u,f){if(f<1)return u;let b=u.slice(0);return u.length>f&&(b=b.slice(0,f),b[f-1]=u.slice(f).reduce((p,m)=>(p.rate+=m.rate,p.value+=m.value,p),{...u[f-1]})),b}return{onHoverIndex:t,privateGetHtmlLegendPlugin:s,getOnHoverOptions:r,groupDataAfterNthValue:d,getDoughnutLabels:h,getBackgroundColor:o,getFormatedText:l,getBorderColor:a,backgroundColor:e,doughnutRef:i,getCenteredLabelPlugin:c,centeredLabel:n}}const Bd={class:"container"},zd={class:"main"},Wd={key:1,class:"centered-label"},Hd=x.defineComponent({__name:"DoughnutChart",props:{chartId:{type:String,default:"doughnut-chart"},data:{type:Array,default:()=>[]},labels:{type:Array,default:()=>[]},cssClasses:{type:String,default:void 0},enableCenteredLabel:{type:Boolean,default:!1},disableAccessibility:{type:Boolean,default:!1},enableHoverFeature:{type:Boolean,default:!1},colourSet:{type:Number,default:0},newPatternsOrder:{type:Array,default:()=>[0,1,2,3,4,5]},width:{type:String,default:"400px"},height:{type:String,default:"400px"},maxValues:{type:Number,default:5},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]},othersLabel:{type:String,default:"others"}},setup(i){const t=i;wt.register(Qt,te,Jt,Kt);const{colourSets:e,patternsStandardList:n}=ae(),{onHoverIndex:s,doughnutRef:o,centeredLabel:a,getBackgroundColor:r,privateGetHtmlLegendPlugin:l,getCenteredLabelPlugin:c,getOnHoverOptions:h,groupDataAfterNthValue:d,getDoughnutLabels:u,getBorderColor:f}=Ed(),b=x.ref(!1),p=x.ref(null),m=x.computed(()=>d(t.data,t.maxValues)),g=x.computed(()=>t.newPatternsOrder.length!==6?e[t.colourSet]:t.newPatternsOrder.map(P=>e[t.colourSet][P])),y=x.computed(()=>t.newPatternsOrder.length!==6?n:t.newPatternsOrder.map(P=>n[P])),_=x.computed(()=>({labels:u(t.labels,t.data,t.maxValues,t.othersLabel),datasets:[{data:m.value.map(P=>P.rate),raw_value:m.value.map(P=>P.value),backgroundColor:r(g.value,y.value,t.disableAccessibility,t.enableHoverFeature),borderColor:f(g.value,t.enableHoverFeature)}]})),S=P=>{const L=P.tooltip.dataPoints[0].dataIndex,B=m.value[L],j=Q(B.rate),F=Q(B.value),z=B.unit||"";return`${F}${z} (${j})%`};function v(){return t.labels.length<=1?0:12}const w=x.computed(()=>{const P=g.value,L=y.value;return{onHover:t.enableHoverFeature?h():()=>{},plugins:{legend:{display:!1,position:"bottom",align:"start",labels:{pointStyle:"rectRounded",usePointStyle:!0}},title:{display:!1},datalabels:{display:!1},tooltip:{enabled:!1,external:function(B){new se().createTooltip(B,S,{chartType:oe.DOUGHNUT},P,L,C.value)}}},radius:"90%",cutout:"70%",borderWidth:3,spacing:v(),hoverOffset:4}}),M={data:t.data,labels:t.labels},C=x.computed(()=>t.disableAccessibility),D=x.computed(()=>t.enableHoverFeature),A=x.computed(()=>[l(p,b,C,g,y,t.maxValues,M,D),c(t.data)]);return x.watch(s,(P,L)=>{P!==L&&D.value&&r(g.value,y.value,t.disableAccessibility,D.value)}),x.watch(C,()=>{r(g.value,y.value,t.disableAccessibility,D.value)}),(P,L)=>(x.openBlock(),x.createElementBlock("div",Bd,[x.createElementVNode("div",zd,[_.value?(x.openBlock(),x.createBlock(x.unref(cd),{key:0,ref_key:"doughnutRef",ref:o,id:i.chartId,data:_.value,options:w.value,plugins:A.value,"max-values":i.maxValues,class:x.normalizeClass(i.cssClasses),style:x.normalizeStyle([{width:i.width,height:i.height,cursor:"pointer"},i.styles])},null,8,["id","data","options","plugins","max-values","class","style"])):x.createCommentVNode("",!0),i.enableCenteredLabel?(x.openBlock(),x.createElementBlock("span",Wd,x.toDisplayString(x.unref(a)),1)):x.createCommentVNode("",!0)]),x.createElementVNode("div",{ref_key:"legendContainer",ref:p},null,512)]))}}),Fu="",ki=re(Hd,[["__scopeId","data-v-42646243"]]);ki.install=i=>{i.component("DoughnutChart",ki)};const Nd={class:"container"},Vd={class:"main"},jd=x.defineComponent({__name:"LineChart",props:{chartId:{type:String,default:"radar-chart"},tooltipFirstLineLabel:{type:String,default:"content"},tooltipSecondLineLabel:{type:String,default:"content2"},width:{type:String,default:"200px"},height:{type:String,default:"400px"},disableAccessibility:{type:Boolean,default:!1},colourSet:{type:Number,default:0},newPatternsOrder:{type:Array,default:()=>[0,1,2,3,4,5]},lines:{type:Array,default:()=>{}},labels:{type:Array,default:()=>[]},xAxisTitle:{type:String,default:null},yAxisTitle:{type:String,default:null},suggestedMin:{type:Number,default:void 0},suggestedMax:{type:Number,default:void 0},cssClasses:{type:String,default:void 0},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]}},setup(i){const t=i;wt.register(Qt,te,Jt,Tt,pt,ee,ie);const{colourSets:e,patternsStandardList:n}=ae(),s=x.ref(null),o=x.ref(!1),a=x.computed(()=>t.newPatternsOrder.length!==6?e[t.colourSet]:t.newPatternsOrder.map(g=>e[t.colourSet][g])),r=t.newPatternsOrder.length!==6?n:t.newPatternsOrder.map(g=>n[g]),l=g=>{const y=g.tooltip.dataPoints[0].datasetIndex,_=g.tooltip.dataPoints[0].dataIndex,S=t.lines[y].data[_].toFixed(2);return t.lines[y].unit?S+" "+t.lines[y].unit:S},c=x.computed(()=>t.tooltipFirstLineLabel),h=x.computed(()=>t.tooltipSecondLineLabel),d=g=>{switch(g){case 1:return"circle";default:return"rectRot"}},u=x.computed(()=>({labels:t.labels.map(g=>g),datasets:t.lines.map((g,y)=>({type:"line",borderColor:a.value[y],pointStyle:d(y),pointBackgroundColor:"#FFFFFF",pointRadius:5,label:g.label,data:g.data,borderWidth:2}))}));function f(g,y){return[{id:"htmlLegend",afterUpdate(_){const S=Si(g,"column");for(S.style.display="flex",S.style.flexDirection="row",S.style.margin="1.375rem 1.0625rem";S.firstChild;)S.firstChild.remove();_.options.plugins.legend.labels.generateLabels(_).forEach(w=>{const M=_i(_,y,w.datasetIndex);let C;y.value?C=b(_,w):C=Cn(w),C.style.boxSizing="border-box",M.style.marginRight="10px",M.appendChild(C),M.appendChild(xi(w)),S.appendChild(M)})}}]}function b(g,y){const _=wn(g,y,null);return _.onclick=S=>{vi(g,y.datasetIndex,o),S.stopPropagation()},_}const p=f(s,o),m=x.computed(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},datalabels:{display:!1},tooltip:{enabled:!1,external:function(g){new se().createTooltip(g,l,{chartType:oe.LINE_CHART,firstLineLabel:c.value,secondLineLabel:h.value},a.value,r,t.disableAccessibility)}}},scales:{x:{offset:!0,title:{display:t.xAxisTitle!==null,text:t.xAxisTitle}},y:{type:"linear",display:!0,title:{display:t.yAxisTitle!==null,text:t.yAxisTitle},suggestedMin:t.suggestedMin,suggestedMax:t.suggestedMax,position:"left",grid:{drawOnChartArea:!0},ticks:{callback:function(g){const y=t.lines[0].unit;return`${Q(g)} ${y||""}`}}}}}));return(g,y)=>(x.openBlock(),x.createElementBlock("div",Nd,[x.createElementVNode("div",Vd,[u.value?(x.openBlock(),x.createBlock(x.unref(hd),{key:0,ref:"lineChartRef",id:i.chartId,data:u.value,options:m.value,plugins:x.unref(p),class:x.normalizeClass(i.cssClasses),style:x.normalizeStyle([{width:i.width,height:i.height,cursor:"pointer"},i.styles])},null,8,["id","data","options","plugins","class","style"])):x.createCommentVNode("",!0)]),x.createElementVNode("div",{ref_key:"legendContainer",ref:s},null,512)]))}}),Ru="",Ci=re(jd,[["__scopeId","data-v-e51b4953"]]);Ci.install=i=>{i.component("LineChart",Ci)};function $d(i,t){const e=i.ctx,n=i.scales.r,s=i.data.labels;!e||!n||!s||(e.save(),s.forEach((o,a)=>{const r=(n.getIndexAngle(a)-Math.PI/2)%(2*Math.PI),l=n.getPointPositionForValue(a,n.max);e.textAlign=r<=Math.PI/2||r>3*Math.PI/2?"left":"right";let c=r<=Math.PI/2||r>3*Math.PI/2?15:-15,h;r<0||r>Math.PI?h=-15:h=15,r>Math.PI/4&&r<3*Math.PI/4&&(h*=3),(r<-Math.PI/4||r>5*Math.PI/4)&&(h*=3,c=0),(r>11*Math.PI/8||r<-3*Math.PI/8)&&(e.textAlign="center");const d=l.y+h*(o.length-1)/2;e.font="12px Arial",o.forEach((u,f)=>{const b=f===o.length-1?Ud(t)[a]:"#000000";e.fillStyle=b;const p=l.x+c,m=d+15*f;e.fillText(u,p,m)})}),e.restore())}const Ud=i=>i.datasets[0].areaData.map(t=>{switch(t.color){case"red":return"#C61112";case"green":return"#46A610";default:return"#000000"}});function Yd(i,t){if(i.length>7&&i.includes(" ",7)){const n=i.indexOf(" ",7);return[i.substring(0,n),i.substring(n),t]}return[i,t]}const Xd={class:"container"},Gd=x.defineComponent({__name:"RadarChart",props:{chartId:{type:String,default:"radar-chart"},height:{type:String,default:"600px"},labels:{type:Array,default:()=>[]},disableAccessibility:{type:Boolean,default:!1},colourSet:{type:Number,default:0},newPatternsOrder:{type:Array,default:()=>[0,1,2,3,4,5]},datasets:{type:Array,default:()=>[]},cssClasses:{default:"",type:String},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]}},setup(i){const t=i;wt.register(Qt,te,Jt,Le,pt,Tt,wh);const{colourSets:e,patternsStandardList:n}=ae(),s=x.computed(()=>t.newPatternsOrder.length!==6?e[t.colourSet]:t.newPatternsOrder.map(m=>e[t.colourSet][m])),o=x.computed(()=>t.newPatternsOrder.length!==6?n:t.newPatternsOrder.map(m=>n[m])),a=x.computed(()=>({labels:d(),datasets:r()}));function r(){return t.datasets.map((m,g)=>({label:m.label,backgroundColor:Oe(s.value[g],.1),borderColor:s.value[g],pointBackgroundColor:"#FFFFFF",pointBorderColor:s.value[g],pointBorderWidth:2,borderWidth:2,pointHitRadius:55,pointRadius:5,pointStyle:g%2===0?"circle":"rectRot",pointHoverBackgroundColor:s.value[g],pointHoverBorderColor:s.value[g],data:m.areaData.map(y=>y.position)}))}const l={onClick:(m,g,y)=>{g[0]&&Qo(y,g[0].datasetIndex,h)},plugins:{htmlLegend:{containerID:"legend-container"},legend:{display:!1},title:{display:!1},datalabels:{display:!1},tooltip:{enabled:!1,position:"nearest",external:function(m){new se().createTooltip(m,p,{chartType:oe.RADAR},s.value,o.value,t.disableAccessibility)}}},layout:{padding:{left:130,right:95,top:95,bottom:95}},scales:{r:{min:0,max:100,pointLabels:{display:!1,font:{weight:400,family:"Roboto"}},ticks:{display:!1,stepSize:25}}}},c=x.ref(null),h=x.ref(!1),d=()=>t.labels.map((m,g)=>{const y=t.datasets[0].areaData[g].value?`${u(t.datasets[0].areaData[g].value+"")} ${t.datasets[0].areaData[g].unit}`:"No Data";return Yd(m,y)}),u=m=>Q(parseFloat(m));function f(m,g){const y=wn(m,g,null);return y.onclick=_=>{vi(m,g.datasetIndex,h),_.stopPropagation()},y}const b=[{id:"htmlLegend",afterUpdate(m){const g=Si(c,"row");for(;g.firstChild;)g.firstChild.remove();m.options.plugins.legend.labels.generateLabels(m).reverse().forEach(_=>{const S=_i(m,h,_.datasetIndex);let v;S.style.marginRight="0.625rem",h.value?v=f(m,_):v=Cn(_,!0),S.appendChild(v),S.appendChild(xi(_)),g.appendChild(S)})}},{id:"radarLabelPlugin",beforeDraw(m){$d(m,t)}}],p=m=>{const g=m.tooltip.dataPoints[0].datasetIndex,y=m.tooltip.dataPoints[0].dataIndex,_=t.datasets[g];return _.areaData[y].value.toFixed(2)+" "+_.areaData[y].unit};return(m,g)=>(x.openBlock(),x.createElementBlock("div",Xd,[x.createElementVNode("div",{class:"main",style:x.normalizeStyle({height:i.height})},[a.value?(x.openBlock(),x.createBlock(x.unref(dd),{key:0,id:i.chartId,data:a.value,options:l,plugins:b,class:x.normalizeClass(i.cssClasses),style:x.normalizeStyle([{height:i.height,cursor:"pointer"},i.styles])},null,8,["id","data","class","style"])):x.createCommentVNode("",!0)],4),x.createElementVNode("div",{ref_key:"legendContainer",ref:c,class:"legendContainer"},null,512)]))}}),Eu="",Mi=re(Gd,[["__scopeId","data-v-e82dcdc6"]]);Mi.install=i=>{i.component("RadarChart",Mi)};const ia=Object.freeze(Object.defineProperty({__proto__:null,BarChart:wi,DoughnutChart:ki,LineChart:Ci,RadarChart:Mi},Symbol.toStringTag,{value:"Module"})),{getPatternIndexWithShift:na}=bi();function qd(){const i=x.ref(2),t=x.reactive({dataSetIndex:-1,columnIndex:-1});function e(d,u,f,b,p,m){return[{id:"htmlLegend",afterUpdate(g){const y=Si(d,"column");for(y.style.display="flex",y.style.margin="1.375rem 1.0625rem",y.style.flexDirection="row-reverse",y.style.flexWrap="wrap",y.style.justifyContent="flex-end";y.firstChild;)y.firstChild.remove();g.options.plugins.legend.labels.generateLabels(g).sort((S,v)=>v.datasetIndex-S.datasetIndex).forEach(S=>{const v=_i(g,u,S.datasetIndex);let w;u.value?w=Ko(g,S,u,{datasetIndex:-1},p.value,!1):S!=null&&S.lineCap?w=Cn(S):w=qo(S,g,{datasetIndex:-1},b.value,p.value,m.value,!1),w.style.boxSizing="border-box",v.style.marginRight="10px",v.style.marginBottom="2px",v.appendChild(w),v.appendChild(xi(S)),y.appendChild(v)})}}]}function n(d,u,f,b,p){return e(d,u,t,f,b,p)}function s(d,u,f,b,p){const m=i.value;return d.map((g,y)=>{const _=g.type==="bar";return{type:g.type,fill:_?null:!1,borderWidth:function(){return u&&_?1:m},borderColor:function(S){return u&&_?"#00000000":_?o(y,S.index,f,p):f[y%f.length]},backgroundColor:function(S){return a(y,S.index,u,f,b,p)},yAxisID:_?"A":"B",pointStyle:y%2===0?"rectRot":"circle",data:g.data,label:g.label,pointBackgroundColor:"#FFFFFF",pointRadius:5,order:g.type==="line"?0:1}})}function o(d,u,f,b){const p=na(d,b);return r(d,u)?f[p]:Oe(f[p],.2)}function a(d,u,f,b,p,m){const g=na(d,m);return r(d,u)?p[g](!1,b[g],f):p[g](!0,b[g],f)}function r(d,u){return l()||c(d,u)||h(d)}function l(){return t.dataSetIndex<0}function c(d,u){return t.dataSetIndex===d&&t.columnIndex===u}function h(d){return t.dataSetIndex===d&&t.columnIndex<0}return{privateGetHtmlLegendPlugin:n,getMixedDatasets:s,getBorderColor:o,getPattern:a,onHoverIndex:t}}const Kd={class:"container"},Zd={class:"main"},Jd=x.defineComponent({__name:"MixedBarLineChart",props:{chartId:{type:String,default:"mixed-bar-line-chart"},unit:{type:String,default:""},labels:{type:Array,default:()=>[]},colourSet:{type:Number,default:0},newPatternsOrder:{type:Array,default:()=>[0,1,2,3,4,5]},barDatasets:{type:Array,default:()=>[]},barUnit:{type:String,default:""},lineDatasets:{type:Array,default:()=>[]},lineUnit:{type:String,default:""},width:{type:String,default:"400px"},height:{type:String,default:"300px"},cssClasses:{type:String,default:void 0},styles:{type:Object,default:()=>{}},plugins:{type:Array,default:()=>[]},stacked:{type:Boolean,default:!1},disableAccessibility:{type:Boolean,default:!1},tooltipFirstLineLabel:{type:String,default:"content"},tooltipSecondLineLabel:{type:String,default:"content2"},xAxisTitle:{type:String,default:null},yLeftAxisTitle:{type:String,default:null},yRightAxisTitle:{type:String,default:null}},setup(i){const t=i;wt.register(Qt,te,Jt,Zt,ee,ie,pt,Tt);const{privateGetHtmlLegendPlugin:e,getMixedDatasets:n}=qd(),{colourSets:s,patternsStandardList:o}=ae(),a=x.ref(null),r=x.ref(!1),l=x.computed(()=>{let g=[];return t.barDatasets&&(g=g.concat(t.barDatasets)),t.lineDatasets&&(g=g.concat(t.lineDatasets)),g}),c=x.computed(()=>t.newPatternsOrder.length!==o.length?s[t.colourSet]:t.newPatternsOrder.map(g=>s[t.colourSet][g])),h=x.computed(()=>t.newPatternsOrder.length!==o.length?o:t.newPatternsOrder.map(g=>o[g])),d=x.computed(()=>t.disableAccessibility),u=x.computed(()=>({labels:b(),datasets:n(l.value,d.value,c.value,h.value,0)})),f=g=>{const y=g.tooltip.dataPoints[0].datasetIndex,_=g.tooltip.dataPoints[0].dataIndex,S=l.value[y].data[_],v=l.value[y].type==="bar"?t.barUnit:t.lineUnit;return(v==="%"?parseFloat(S.toString().replace(",",".")).toFixed(2):Q(S))+v},b=()=>Object.assign([],t.labels).map(y=>y),p=x.computed(()=>({type:"bar",responsive:!0,maintainAspectRatio:!0,maxBarThickness:64,categoryPercentage:.6,elements:{bar:{borderSkipped:!1}},plugins:{legend:{display:!1},title:{display:!1},datalabels:{display:!1},tooltip:{enabled:!1,external:function(g){new se().createTooltip(g,f,{chartType:oe.MIXED_BAR_LINE_CHART,firstLineLabel:t.tooltipFirstLineLabel,secondLineLabel:t.tooltipSecondLineLabel},c.value,h.value,t.disableAccessibility)}}},scales:{x:{offset:!0,title:{display:t.xAxisTitle!==null,text:t.xAxisTitle}},A:{type:"linear",display:!0,position:"left",grid:{drawOnChartArea:!0},title:{display:t.yLeftAxisTitle!==null,text:t.yLeftAxisTitle},ticks:{callback:function(g){return t.barUnit==="%"?_n(g,t.unit):Q(g)+" "+t.barUnit}}},B:{type:"linear",display:!0,position:"right",grid:{drawOnChartArea:!1},title:{display:t.yRightAxisTitle!==null,text:t.yRightAxisTitle},ticks:{callback:function(g){return(t.lineUnit==="%"?_n(g,t.unit):Q(g))+" "+t.lineUnit}}}}})),m=x.ref(e(a,r,d,c,h));return(g,y)=>(x.openBlock(),x.createElementBlock("div",Kd,[x.createElementVNode("div",Zd,[u.value?(x.openBlock(),x.createBlock(x.unref(Uo),{key:0,ref:"mixedBarLineChartRef",id:i.chartId,data:u.value,options:p.value,plugins:m.value,class:x.normalizeClass(i.cssClasses),style:x.normalizeStyle([{width:i.width,height:i.height,cursor:"pointer"},i.styles])},null,8,["id","data","options","plugins","class","style"])):x.createCommentVNode("",!0)]),x.createElementVNode("div",{ref_key:"legendContainer",ref:a},null,512)]))}}),Bu="",zu="",Pn=re(Jd,[["__scopeId","data-v-e2792cc7"]]);Pn.install=i=>{i.component("MixedBarLineChart",Pn)};const Qd="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2IiBmaWxsPSJub25lIj4KICA8Y2lyY2xlIGN4PSI4IiBjeT0iOCIgcj0iNy41IiBzdHJva2U9IiM2NjY2NjYiLz4KICA8Y2lyY2xlIGN4PSI4IiBjeT0iMTEuMiIgcj0iNC4zIiBzdHJva2U9IiM2NjY2NjYiLz4KPC9zdmc+";/*!
23
23
  * chartjs-plugin-datalabels v2.2.0
24
24
  * https://chartjs-plugin-datalabels.netlify.app
25
25
  * (c) 2017-2022 chartjs-plugin-datalabels contributors
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mozaic-ds/chart",
3
- "version": "0.1.0-beta.30",
3
+ "version": "0.1.0-beta.31",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "vue-tsc && vite build",
@@ -175,7 +175,7 @@ export class GenericTooltipService {
175
175
  tooltipEl.style.minWidth = '17rem';
176
176
  tooltipEl.style.opacity = '1';
177
177
  tooltipEl.style.position = 'absolute';
178
- tooltipEl.style.zIndex = '99';
178
+ tooltipEl.style.zIndex = '1999999999'; // Make sure the tooltip is on top of mozaic overlay
179
179
  tooltipEl.style.backgroundColor = 'white';
180
180
  tooltipEl.style.pointerEvents = 'none';
181
181