"use strict";var profileDemo={init:function(){this.bindUIActions()},bindUIActions:function(){Chart.defaults.global.maintainAspectRatio=!1,this.achievementChart(),this.handleFlatpickr()},colors:function(){return{red:"#B76BA3",orange:"#EC935E",yellow:"#F7C46C",green:"#A7C796",teal:"#00A28A",blue:"#346CB0",purple:"#5F4B8B",gray:"#BEC1C4",grayLight:"#D4D5D7",grayLighter:"#F5F5F5"}},getColor:function(a){return this.colors()[a]},randomScalingFactor:function(){return 1*Math.round(100*Math.random())},achievementChart:function(){var a=this,r={labels:["Jan","Feb","Mar","Apr","May","Jun","Jul"],datasets:[{label:"Total Tasks",borderColor:a.getColor("teal"),backgroundColor:a.getColor("teal"),data:[a.randomScalingFactor(),a.randomScalingFactor(),a.randomScalingFactor(),a.randomScalingFactor(),a.randomScalingFactor(),a.randomScalingFactor(),a.randomScalingFactor()]},{label:"Completed Tasks",borderColor:a.getColor("purple"),backgroundColor:a.getColor("purple"),data:[a.randomScalingFactor(),a.randomScalingFactor(),a.randomScalingFactor(),a.randomScalingFactor(),a.randomScalingFactor(),a.randomScalingFactor(),a.randomScalingFactor()]}]},o=$("#canvas-achievement")[0].getContext("2d");new Chart(o,{type:"bar",data:r,options:{responsive:!0,legend:{display:!1},title:{display:!1},tooltips:{mode:"index",intersect:!0},scales:{xAxes:[{gridLines:{display:!0,drawBorder:!1,drawOnChartArea:!1}}],yAxes:[{gridLines:{display:!0,drawBorder:!1,drawOnChartArea:!1},ticks:{stepSize:20}}]}}})},handleFlatpickr:function(){flatpickr("#flatpickr",{inline:!0,disableMobile:!0,mode:"range",dateFormat:"Y-m-d"}),$("#flatpickr").next().on("click",function(a){a.stopPropagation()})}};profileDemo.init();