"use strict";!function(){let e,t;t=(isDarkStyle?(e=config.colors_dark.textMuted,config.colors_dark):(e=config.colors.textMuted,config.colors)).headingColor;var s={donut:{series1:config.colors.success,series2:"rgba(113, 221, 55, 0.6)",series3:"rgba(113, 221, 55, 0.4)",series4:"rgba(113, 221, 55, 0.2)"},line:{series1:config.colors.warning,series2:config.colors.primary,series3:"#7367f029"}},a=document.querySelector("#shipmentStatisticsChart"),r={series:[{name:"Shipment",type:"column",data:[38,45,33,38,32,50,48,40,42,37]},{name:"Delivery",type:"line",data:[23,28,23,32,28,44,32,38,26,34]}],chart:{height:270,type:"line",stacked:!1,parentHeightOffset:0,toolbar:{show:!1},zoom:{enabled:!1}},markers:{size:4,colors:[config.colors.white],strokeColors:s.line.series2,hover:{size:6},borderRadius:4},stroke:{curve:"smooth",width:[0,3],lineCap:"round"},legend:{show:!0,position:"bottom",markers:{width:8,height:8,offsetX:-3},height:40,offsetY:10,itemMargin:{horizontal:10,vertical:0},fontSize:"15px",fontFamily:"Public Sans",fontWeight:400,labels:{colors:t,useSeriesColors:!1},offsetY:10},grid:{strokeDashArray:8},colors:[s.line.series1,s.line.series2],fill:{opacity:[1,1]},plotOptions:{bar:{columnWidth:"30%",startingShape:"rounded",endingShape:"rounded",borderRadius:4}},dataLabels:{enabled:!1},xaxis:{tickAmount:10,categories:["1 Jan","2 Jan","3 Jan","4 Jan","5 Jan","6 Jan","7 Jan","8 Jan","9 Jan","10 Jan"],labels:{style:{colors:e,fontSize:"13px",fontFamily:"Public Sans",fontWeight:400}},axisBorder:{show:!1},axisTicks:{show:!1}},yaxis:{tickAmount:4,min:10,max:50,labels:{style:{colors:e,fontSize:"13px",fontFamily:"Public Sans",fontWeight:400},formatter:function(e){return e+"%"}}},responsive:[{breakpoint:1400,options:{chart:{height:270},xaxis:{labels:{style:{fontSize:"10px"}}},legend:{itemMargin:{vertical:0,horizontal:10},fontSize:"13px",offsetY:12}}},{breakpoint:1399,options:{chart:{height:415},plotOptions:{bar:{columnWidth:"50%"}}}},{breakpoint:982,options:{plotOptions:{bar:{columnWidth:"30%"}}}},{breakpoint:480,options:{chart:{height:250},legend:{offsetY:7}}}]},a=(null!==a&&new ApexCharts(a,r).render(),document.querySelector("#deliveryExceptionsChart")),r={chart:{height:420,parentHeightOffset:0,type:"donut"},labels:["Incorrect address","Weather conditions","Federal Holidays","Damage during transit"],series:[13,25,22,40],colors:[s.donut.series1,s.donut.series2,s.donut.series3,s.donut.series4],stroke:{width:0},dataLabels:{enabled:!1,formatter:function(e,t){return parseInt(e)+"%"}},legend:{show:!0,position:"bottom",offsetY:10,markers:{width:8,height:8,offsetX:-3},itemMargin:{horizontal:15,vertical:5},fontSize:"13px",fontFamily:"Public Sans",fontWeight:400,labels:{colors:t,useSeriesColors:!1}},tooltip:{theme:!1},grid:{padding:{top:15}},plotOptions:{pie:{donut:{size:"75%",labels:{show:!0,value:{fontSize:"26px",fontFamily:"Public Sans",color:t,fontWeight:500,offsetY:-30,formatter:function(e){return parseInt(e)+"%"}},name:{offsetY:20,fontFamily:"Public Sans"},total:{show:!0,fontSize:"0.7rem",label:"AVG. Exceptions",color:e,formatter:function(e){return"30%"}}}}}},responsive:[{breakpoint:420,options:{chart:{height:360}}}]};null!==a&&new ApexCharts(a,r).render()}(),$(function(){var e=$(".dt-route-vehicles");e.length&&(e.DataTable({ajax:assetsPath+"json/logistics-dashboard.json",columns:[{data:"id"},{data:"id"},{data:"location"},{data:"start_city"},{data:"end_city"},{data:"warnings"},{data:"progress"}],columnDefs:[{className:"control",orderable:!1,searchable:!1,responsivePriority:2,targets:0,render:function(e,t,s,a){return""}},{targets:1,orderable:!1,searchable:!1,checkboxes:!0,checkboxes:{selectAllRender:''},responsivePriority:3,render:function(){return''}},{targets:2,responsivePriority:1,render:function(e,t,s,a){return'
VOL-'+s.location+"
"}},{targets:3,render:function(e,t,s,a){return'
'+s.start_city+", "+s.start_country+"
"}},{targets:4,render:function(e,t,s,a){return'
'+s.end_city+", "+s.end_country+"
"}},{targets:-2,render:function(e,t,s,a){var s=s.warnings,r={1:{title:"No Warnings",class:"bg-label-success"},2:{title:"Temperature Not Optimal",class:"bg-label-warning"},3:{title:"Ecu Not Responding",class:"bg-label-danger"},4:{title:"Oil Leakage",class:"bg-label-info"},5:{title:"fuel problems",class:"bg-label-primary"}};return void 0===r[s]?e:''+r[s].title+""}},{targets:-1,render:function(e,t,s,a){s=s.progress;return'
'+s+"%
"}}],order:[2,"asc"],dom:'<"table-responsive"t><"row d-flex align-items-center"<"col-sm-12 col-md-6"i><"col-sm-12 col-md-6"p>>',displayLength:5,responsive:{details:{display:$.fn.dataTable.Responsive.display.modal({header:function(e){return"Details of "+e.data().location}}),type:"column",renderer:function(e,t,s){s=$.map(s,function(e,t){return""!==e.title?''+e.title+": "+e.data+"":""}).join("");return!!s&&$('').append(s)}}}}),$(".dataTables_info").addClass("pt-0"))});