From 6894b4f9aa8cdec15239b4f111a76ef5c2de93fa Mon Sep 17 00:00:00 2001 From: Alexis Leroy Date: Sat, 6 Jul 2024 11:49:00 +0200 Subject: [PATCH] Auto-generated commit [ci skip] --- 404.html | 2 +- 780.1a7bae232be728ba.js | 9 --------- 780.c8cf0f07f915106a.js | 9 +++++++++ index.html | 2 +- ...me.637b14f1f1d12932.js => runtime.00f6657d67cf1530.js | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) delete mode 100644 780.1a7bae232be728ba.js create mode 100644 780.c8cf0f07f915106a.js rename runtime.637b14f1f1d12932.js => runtime.00f6657d67cf1530.js (97%) diff --git a/404.html b/404.html index 4768de3..2da7962 100644 --- a/404.html +++ b/404.html @@ -25,5 +25,5 @@
Test your gaming music knowledge w

- + diff --git a/780.1a7bae232be728ba.js b/780.1a7bae232be728ba.js deleted file mode 100644 index 0a20090..0000000 --- a/780.1a7bae232be728ba.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict";(self.webpackChunkvgmq=self.webpackChunkvgmq||[]).push([[780],{6780:(_e,Fe,J)=>{J.r(Fe),J.d(Fe,{UserModule:()=>Ye});var me=J(6814),Ue=J(2787),O=J(2132),ae=J(6007),F=J(6283),Ze=J(9829),D=J(2596),xe=J(7988),ke=J(617),P=J(9212),De=J(553),qe=J(9862);let ve=(()=>{class R{http;apiEndpoint=De.N.apiEndpoint;constructor(X){this.http=X}getAllUsers(){return this.http.get(`${this.apiEndpoint}/admin/users`)}ban(X,N){return this.http.put(`${this.apiEndpoint}/admin/users/ban/${X}`,{banReason:N})}static \u0275fac=function(N){return new(N||R)(P.LFG(qe.eN))};static \u0275prov=P.Yz7({token:R,factory:R.\u0275fac,providedIn:"root"})}return R})();var Se=J(3305),ne=J(5037),$e=J(6410),Ie=J(5054);const M=["chart"];let ye=(()=>{class R{constructor(X){this.ngZone=X,this.autoUpdateSeries=!0,this.chartReady=new P.vpe}ngOnChanges(X){$e.E.schedule(()=>{this.autoUpdateSeries&&0===Object.keys(X).filter(N=>"series"!==N).length?this.updateSeries(this.series,!0):this.createElement()})}ngOnDestroy(){this.chartObj&&this.chartObj.destroy()}createElement(){const X={};this.annotations&&(X.annotations=this.annotations),this.chart&&(X.chart=this.chart),this.colors&&(X.colors=this.colors),this.dataLabels&&(X.dataLabels=this.dataLabels),this.series&&(X.series=this.series),this.stroke&&(X.stroke=this.stroke),this.labels&&(X.labels=this.labels),this.legend&&(X.legend=this.legend),this.fill&&(X.fill=this.fill),this.tooltip&&(X.tooltip=this.tooltip),this.plotOptions&&(X.plotOptions=this.plotOptions),this.responsive&&(X.responsive=this.responsive),this.markers&&(X.markers=this.markers),this.noData&&(X.noData=this.noData),this.xaxis&&(X.xaxis=this.xaxis),this.yaxis&&(X.yaxis=this.yaxis),this.forecastDataPoints&&(X.forecastDataPoints=this.forecastDataPoints),this.grid&&(X.grid=this.grid),this.states&&(X.states=this.states),this.title&&(X.title=this.title),this.subtitle&&(X.subtitle=this.subtitle),this.theme&&(X.theme=this.theme),this.chartObj&&this.chartObj.destroy(),this.ngZone.runOutsideAngular(()=>{this.chartObj=new Ie(this.chartElement.nativeElement,X)}),this.render(),this.chartReady.emit({chartObj:this.chartObj})}render(){return this.ngZone.runOutsideAngular(()=>this.chartObj.render())}updateOptions(X,N,V,ce){return this.ngZone.runOutsideAngular(()=>this.chartObj.updateOptions(X,N,V,ce))}updateSeries(X,N){return this.ngZone.runOutsideAngular(()=>this.chartObj.updateSeries(X,N))}appendSeries(X,N){this.ngZone.runOutsideAngular(()=>this.chartObj.appendSeries(X,N))}appendData(X){this.ngZone.runOutsideAngular(()=>this.chartObj.appendData(X))}toggleSeries(X){return this.ngZone.runOutsideAngular(()=>this.chartObj.toggleSeries(X))}showSeries(X){this.ngZone.runOutsideAngular(()=>this.chartObj.showSeries(X))}hideSeries(X){this.ngZone.runOutsideAngular(()=>this.chartObj.hideSeries(X))}resetSeries(){this.ngZone.runOutsideAngular(()=>this.chartObj.resetSeries())}zoomX(X,N){this.ngZone.runOutsideAngular(()=>this.chartObj.zoomX(X,N))}toggleDataPointSelection(X,N){this.ngZone.runOutsideAngular(()=>this.chartObj.toggleDataPointSelection(X,N))}destroy(){this.chartObj.destroy()}setLocale(X){this.ngZone.runOutsideAngular(()=>this.chartObj.setLocale(X))}paper(){this.ngZone.runOutsideAngular(()=>this.chartObj.paper())}addXaxisAnnotation(X,N,V){this.ngZone.runOutsideAngular(()=>this.chartObj.addXaxisAnnotation(X,N,V))}addYaxisAnnotation(X,N,V){this.ngZone.runOutsideAngular(()=>this.chartObj.addYaxisAnnotation(X,N,V))}addPointAnnotation(X,N,V){this.ngZone.runOutsideAngular(()=>this.chartObj.addPointAnnotation(X,N,V))}removeAnnotation(X,N){this.ngZone.runOutsideAngular(()=>this.chartObj.removeAnnotation(X,N))}clearAnnotations(X){this.ngZone.runOutsideAngular(()=>this.chartObj.clearAnnotations(X))}dataURI(X){return this.chartObj.dataURI(X)}}return R.\u0275fac=function(X){return new(X||R)(P.Y36(P.R0b))},R.\u0275cmp=P.Xpm({type:R,selectors:[["apx-chart"]],viewQuery:function(X,N){if(1&X&&P.Gf(M,7),2&X){let V;P.iGM(V=P.CRH())&&(N.chartElement=V.first)}},inputs:{chart:"chart",annotations:"annotations",colors:"colors",dataLabels:"dataLabels",series:"series",stroke:"stroke",labels:"labels",legend:"legend",markers:"markers",noData:"noData",fill:"fill",tooltip:"tooltip",plotOptions:"plotOptions",responsive:"responsive",xaxis:"xaxis",yaxis:"yaxis",forecastDataPoints:"forecastDataPoints",grid:"grid",states:"states",title:"title",subtitle:"subtitle",theme:"theme",autoUpdateSeries:"autoUpdateSeries"},outputs:{chartReady:"chartReady"},features:[P.TTD],decls:2,vars:0,consts:[["chart",""]],template:function(X,N){1&X&&P._UZ(0,"div",null,0)},encapsulation:2,changeDetection:0}),R})();window.ApexCharts=Ie;let E=(()=>{class R{}return R.\u0275fac=function(X){return new(X||R)},R.\u0275mod=P.oAB({type:R}),R.\u0275inj=P.cJS({}),R})();const te=()=>({type:"line"}),Xe=()=>({curve:"stepline",width:2}),at=()=>({mode:"dark"});function se(R,U){if(1&R&&P._UZ(0,"apx-chart",1),2&R){const X=P.oxw();P.Q6J("series",X.series)("chart",P.DdM(6,te))("stroke",P.DdM(7,Xe))("theme",P.DdM(8,at))("xaxis",X.xaxis)("annotations",X.annotations)}}let Ce=(()=>{class R{users;series;xaxis={type:"datetime",max:Date.now()};annotations={xaxis:[{x:new Date("28 Aug 2023").getTime(),borderColor:"#775DD0",label:{style:{color:"#fff",background:"#775DD0"},text:"Removed limited access"}},{x:new Date("27 Apr 2024").getTime(),borderColor:"#2df35e",label:{style:{color:"#000",background:"#2df35e"},orientation:"horizontal",text:"New homepage"}}]};ngOnInit(){this.series=[{data:[...this.users.filter(X=>X.enabled).map((X,N)=>({x:X.createdAt,y:N+1})),{x:ne.ou.now().toString(),y:this.users.length}]}]}static \u0275fac=function(N){return new(N||R)};static \u0275cmp=P.Xpm({type:R,selectors:[["app-users-graph"]],inputs:{users:"users"},decls:1,vars:1,consts:[[3,"series","chart","stroke","theme","xaxis","annotations",4,"ngIf"],[3,"series","chart","stroke","theme","xaxis","annotations"]],template:function(N,V){1&N&&P.YNc(0,se,1,9,"apx-chart",0),2&N&&P.Q6J("ngIf",V.users)},dependencies:[me.O5,ye],encapsulation:2})}return R})();var ee=J(5313),Qe=J(1476),He=J(3566),ze=J(7700),le=J(6223),st=J(4716);function Ne(R,U){if(1&R&&(P.ynx(0),P._uU(1),P.BQk()),2&R){const X=P.oxw(2);P.xp6(),P.hij(" ",X.form.errors.serverError," ")}}function Be(R,U){if(1&R&&(P.TgZ(0,"div",8),P.YNc(1,Ne,2,1,"ng-container",9),P.qZA()),2&R){const X=P.oxw();P.xp6(),P.Q6J("ngIf",X.form.errors.serverError)}}function Le(R,U){if(1&R&&(P.TgZ(0,"p",10),P._uU(1),P.qZA()),2&R){const X=P.oxw();P.xp6(),P.Oqu(X.errorMessage)}}function Pe(R,U){1&R&&P._UZ(0,"span",11)}const Je=R=>({"is-invalid":R}),rt=R=>({disabled:R});let ue=(()=>{class R{data;usersHttpService;dialogRef;errorMessage="";loading=!1;form=new le.NI(null,le.kI.required.bind(this));constructor(X,N,V){this.data=X,this.usersHttpService=N,this.dialogRef=V}submit(){this.errorMessage=void 0,this.loading=!0,this.usersHttpService.ban(this.data.user.id,this.form.value).pipe((0,st.x)(()=>this.loading=!1)).subscribe({next:()=>{this.dialogRef.close({action:"banned"})},error:X=>{Array.isArray(X.message)?this.form.setErrors({serverError:X.message[0].errors}):this.errorMessage=X.message}})}static \u0275fac=function(N){return new(N||R)(P.Y36(ze.WI),P.Y36(ve),P.Y36(ze.so))};static \u0275cmp=P.Xpm({type:R,selectors:[["app-ban-dialog"]],decls:10,vars:12,consts:[[1,"tw-flex","tw-flex-col","tw-items-center","!tw-bg-grey","tw-w-[280px]","tw-h-[200px]"],[1,"!tw-mt-4","!tw-font-bold","!tw-text-4xl","tw-text-center"],[1,"tw-w-3/4",3,"ngSubmit"],["required","","placeholder","Reason for ban",1,"form-control","!tw-bg-grey","tw-rounded-md","placeholder:tw-text-light-grey",3,"formControl","ngClass"],["class","invalid-feedback",4,"ngIf"],["class","text-danger",4,"ngIf"],[1,"btn","btn-outline-primary","tw-mt-4",3,"disabled","ngClass","click"],["class","spinner-border spinner-border-sm","role","status","aria-hidden","true",4,"ngIf"],[1,"invalid-feedback"],[4,"ngIf"],[1,"text-danger"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"]],template:function(N,V){1&N&&(P.TgZ(0,"div",0)(1,"h4",1),P._uU(2),P.qZA(),P.TgZ(3,"form",2),P.NdJ("ngSubmit",function(){return V.submit()}),P._UZ(4,"input",3),P.YNc(5,Be,2,1,"div",4),P.qZA(),P.YNc(6,Le,2,1,"p",5),P.TgZ(7,"button",6),P.NdJ("click",function(){return V.form.invalid||V.loading||V.submit()}),P._uU(8," Ban"),P.YNc(9,Pe,1,0,"span",7),P.qZA()()),2&N&&(P.xp6(2),P.hij("Ban ",V.data.user.username,""),P.xp6(2),P.Q6J("formControl",V.form)("ngClass",P.VKq(8,Je,V.form.invalid&&(V.form.dirty||V.form.touched))),P.xp6(),P.Q6J("ngIf",V.form.errors),P.xp6(),P.Q6J("ngIf",V.errorMessage),P.xp6(),P.Q6J("disabled",V.form.invalid||V.loading)("ngClass",P.VKq(10,rt,V.form.invalid||V.loading)),P.xp6(2),P.Q6J("ngIf",V.loading))},dependencies:[me.mk,me.O5,le._Y,le.Fj,le.JJ,le.JL,le.Q7,le.F,le.oH],encapsulation:2})}return R})();var Me=J(2296);function Ke(R,U){1&R&&(P.TgZ(0,"th",18),P._uU(1,"Username"),P.qZA())}function Ae(R,U){if(1&R&&(P.TgZ(0,"td",19),P._uU(1),P.qZA()),2&R){const X=U.$implicit;P.xp6(),P.Oqu(X.username)}}function ge(R,U){1&R&&(P.TgZ(0,"th",18),P._uU(1,"Enabled"),P.qZA())}function et(R,U){if(1&R&&(P.TgZ(0,"td",19),P._uU(1),P.qZA()),2&R){const X=U.$implicit;P.xp6(),P.Oqu(X.enabled)}}function Ee(R,U){1&R&&(P.TgZ(0,"th",18),P._uU(1,"Created At"),P.qZA())}function Te(R,U){if(1&R&&(P.TgZ(0,"td",19),P._uU(1),P.qZA()),2&R){const X=U.$implicit;P.xp6(),P.Oqu(X.createdAt)}}function tt(R,U){1&R&&(P.TgZ(0,"th",20),P._uU(1,"Ban Reason"),P.qZA())}function it(R,U){if(1&R&&(P.TgZ(0,"td",19),P._uU(1),P.qZA()),2&R){const X=U.$implicit;P.xp6(),P.Oqu(X.banReason)}}function We(R,U){1&R&&(P.TgZ(0,"th",20),P._uU(1,"Banned By"),P.qZA())}function Ge(R,U){if(1&R&&(P.TgZ(0,"td",19),P._uU(1),P.qZA()),2&R){const X=U.$implicit;P.xp6(),P.Oqu(null==X.bannedBy?null:X.bannedBy.username)}}function nt(R,U){1&R&&(P.TgZ(0,"th",20),P._uU(1,"Actions"),P.qZA())}function ot(R,U){if(1&R){const X=P.EpF();P.TgZ(0,"td",19)(1,"button",21),P.NdJ("click",function(){const ce=P.CHM(X).$implicit,Re=P.oxw();return P.KtG(Re.openBanDialog(ce))}),P._UZ(2,"i",22),P.qZA()()}}function lt(R,U){1&R&&P._UZ(0,"tr",23)}function Ve(R,U){1&R&&P._UZ(0,"tr",24)}function ht(R,U){if(1&R&&(P.TgZ(0,"tr",25)(1,"td",26),P._uU(2),P.qZA()()),2&R){P.oxw();const X=P.MAs(2);P.xp6(2),P.hij('No data matching the filter "',X.value,'"')}}const ct=()=>[25,50,100];let dt=(()=>{class R{dialog;http;dialogSubscription;getAllUsersSubscription;users;displayedColumns=["username","enabled","createdAt","banReason","bannedBy","actions"];dataSource;constructor(X,N){this.dialog=X,this.http=N}paginator;sort;ngAfterViewInit(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}ngOnInit(){this.dataSource=new ee.by(this.users)}applyFilter(X){this.dataSource.filter=X.target.value.trim().toLowerCase(),this.dataSource.paginator&&this.dataSource.paginator.firstPage()}openBanDialog(X){const N=this.dialog.open(ue,{data:{user:X}});this.dialogSubscription=N.afterClosed().subscribe(V=>{V&&(this.getAllUsersSubscription=this.http.getAllUsers().subscribe(ce=>{this.dataSource=new ee.by(ce)}))})}ngOnDestroy(){this.dataSource.disconnect(),this.dialogSubscription?.unsubscribe(),this.getAllUsersSubscription?.unsubscribe()}static \u0275fac=function(N){return new(N||R)(P.Y36(ze.uw),P.Y36(ve))};static \u0275cmp=P.Xpm({type:R,selectors:[["app-users-table"]],viewQuery:function(N,V){if(1&N&&(P.Gf(Qe.NW,5),P.Gf(He.YE,5)),2&N){let ce;P.iGM(ce=P.CRH())&&(V.paginator=ce.first),P.iGM(ce=P.CRH())&&(V.sort=ce.first)}},inputs:{users:"users"},decls:27,vars:5,consts:[[1,"tw-flex","tw-flex-col","tw-items-center"],["placeholder","Ex. yoyo",1,"!tw-bg-grey","tw-rounded-md","placeholder:tw-text-light-grey","tw-h-[40px]","tw-my-4","!tw-border-none","tw-w-[250px]","md:tw-w-[400px]",3,"keyup"],["search",""],[1,"mat-elevation-z8","tw-w-full","tw-overflow-x-scroll"],["mat-table","","matSort","",1,"!tw-bg-grey",3,"dataSource"],["matColumnDef","username"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","enabled"],["matColumnDef","createdAt"],["matColumnDef","banReason"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","bannedBy"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","mat-row",4,"matNoDataRow"],["aria-label","Select page of users",1,"!tw-bg-grey",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],["mat-button","",3,"click"],[1,"fa-solid","fa-ban"],["mat-header-row",""],["mat-row",""],[1,"mat-row"],["colspan","4",1,"mat-cell"]],template:function(N,V){1&N&&(P.TgZ(0,"div",0)(1,"input",1,2),P.NdJ("keyup",function(Re){return V.applyFilter(Re)}),P.qZA(),P.TgZ(3,"div",3)(4,"table",4),P.ynx(5,5),P.YNc(6,Ke,2,0,"th",6)(7,Ae,2,1,"td",7),P.BQk(),P.ynx(8,8),P.YNc(9,ge,2,0,"th",6)(10,et,2,1,"td",7),P.BQk(),P.ynx(11,9),P.YNc(12,Ee,2,0,"th",6)(13,Te,2,1,"td",7),P.BQk(),P.ynx(14,10),P.YNc(15,tt,2,0,"th",11)(16,it,2,1,"td",7),P.BQk(),P.ynx(17,12),P.YNc(18,We,2,0,"th",11)(19,Ge,2,1,"td",7),P.BQk(),P.ynx(20,13),P.YNc(21,nt,2,0,"th",11)(22,ot,3,0,"td",7),P.BQk(),P.YNc(23,lt,1,0,"tr",14)(24,Ve,1,0,"tr",15)(25,ht,3,1,"tr",16),P.qZA(),P._UZ(26,"mat-paginator",17),P.qZA()()),2&N&&(P.xp6(4),P.Q6J("dataSource",V.dataSource),P.xp6(19),P.Q6J("matHeaderRowDef",V.displayedColumns),P.xp6(),P.Q6J("matRowDefColumns",V.displayedColumns),P.xp6(2),P.Q6J("pageSizeOptions",P.DdM(4,ct)))},dependencies:[Me.lW,ee.BZ,ee.fO,ee.as,ee.w1,ee.Dz,ee.nj,ee.ge,ee.ev,ee.XQ,ee.Gk,ee.Ee,He.YE,He.nU,Qe.NW],encapsulation:2})}return R})();function gt(R,U){if(1&R&&(P.TgZ(0,"div"),P._UZ(1,"app-users-table",7),P.qZA()),2&R){const X=P.oxw();P.xp6(),P.Q6J("users",X.users)}}function ut(R,U){if(1&R&&(P.TgZ(0,"div"),P._UZ(1,"app-users-graph",7),P.qZA()),2&R){const X=P.oxw();P.xp6(),P.Q6J("users",X.users)}}const pt=[{path:"",component:(()=>{class R{http;usersObservable;users;enabledUsers;constructor(X){this.http=X}ngOnInit(){this.usersObservable=this.http.getAllUsers().subscribe(X=>{this.users=X,this.enabledUsers=this.users.filter(N=>N.enabled)})}ngOnDestroy(){this.usersObservable.unsubscribe()}static \u0275fac=function(N){return new(N||R)(P.Y36(ve))};static \u0275cmp=P.Xpm({type:R,selectors:[["app-users"]],decls:17,vars:4,consts:[[1,"tw-flex","tw-flex-col","tw-items-center"],[1,"tw-text-white","!tw-font-fastup","!tw-text-3xl","tw-text-center"],[1,"tw-font-poppins","tw-font-bold","tw-italic"],[1,"tw-w-5/6"],[1,"!tw-bg-newBlack"],[4,"ngIf"],[1,"!tw-bg-newBlack",3,"expanded"],[3,"users"]],template:function(N,V){1&N&&(P.TgZ(0,"div",0)(1,"h1",1)(2,"span",2),P._uU(3),P.qZA(),P._uU(4," Users "),P.qZA(),P.TgZ(5,"div",3)(6,"mat-accordion")(7,"mat-expansion-panel",4)(8,"mat-expansion-panel-header")(9,"mat-panel-title"),P._uU(10,"Table"),P.qZA()(),P.YNc(11,gt,2,1,"div",5),P.qZA(),P.TgZ(12,"mat-expansion-panel",6)(13,"mat-expansion-panel-header")(14,"mat-panel-title"),P._uU(15,"Graph"),P.qZA()(),P.YNc(16,ut,2,1,"div",5),P.qZA()()()()),2&N&&(P.xp6(3),P.Oqu(null==V.enabledUsers?null:V.enabledUsers.length),P.xp6(8),P.Q6J("ngIf",V.users),P.xp6(),P.Q6J("expanded",!0),P.xp6(4),P.Q6J("ngIf",V.users))},dependencies:[me.O5,Se.pp,Se.ib,Se.yz,Se.yK,Ce,dt],encapsulation:2})}return R})()}];let Ye=(()=>{class R{static \u0275fac=function(N){return new(N||R)};static \u0275mod=P.oAB({type:R});static \u0275inj=P.cJS({imports:[me.ez,Ue.Bz.forChild(pt),O.m,ae.Cv,F.Rq,Ze.Cl,D.AV,xe.Tx,ke.Ps,E]})}return R})()},5054:(_e,Fe,J)=>{var me;function Ue(y,e){var t=Object.keys(y);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(y);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(y,a).enumerable})),t.push.apply(t,i)}return t}function O(y){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,i=P(y);if(e){var a=P(this).constructor;t=Reflect.construct(i,arguments,a)}else t=i.apply(this,arguments);return function(r,s){if(s&&("object"==typeof s||"function"==typeof s))return s;if(void 0!==s)throw new TypeError("Derived constructors may only return object or undefined");return qe(r)}(this,t)}}function Se(y,e){return function(t){if(Array.isArray(t))return t}(y)||function(t,i){var a=null==t?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var r,s,n=[],o=!0,l=!1;try{for(a=a.call(t);!(o=(r=a.next()).done)&&(n.push(r.value),!i||n.length!==i);o=!0);}catch(c){l=!0,s=c}finally{try{o||null==a.return||a.return()}finally{if(l)throw s}}return n}}(y,e)||$e(y,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ne(y){return function(e){if(Array.isArray(e))return Ie(e)}(y)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(y)||$e(y)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $e(y,e){if(y){if("string"==typeof y)return Ie(y,e);var t=Object.prototype.toString.call(y).slice(8,-1);return"Object"===t&&y.constructor&&(t=y.constructor.name),"Map"===t||"Set"===t?Array.from(y):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ie(y,e):void 0}}function Ie(y,e){(null==e||e>y.length)&&(e=y.length);for(var t=0,i=new Array(e);t>16,n=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-s)*r)+s)+256*(Math.round((a-n)*r)+n)+(Math.round((a-o)*r)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,t){return y.isColorHex(t)?this.shadeHexColor(e,t):this.shadeRGBColor(e,t)}}],[{key:"bind",value:function(e,t){return function(){return e.apply(t,arguments)}}},{key:"isObject",value:function(e){return e&&"object"===ae(e)&&!Array.isArray(e)&&null!=e}},{key:"is",value:function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"}},{key:"listToArray",value:function(e){var t,i=[];for(t=0;t1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(e)?e:parseFloat(e.toPrecision(t))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(e){var t=String(e).split(/[eE]/);if(1===t.length)return t[0];var i="",a=e<0?"-":"",r=t[0].replace(".",""),s=Number(t[1])+1;if(s<0){for(i=a+"0.";s++;)i+="0";return i+r.replace(/^-/,"")}for(s-=r.length;s--;)i+="0";return r+i}},{key:"getDimensions",value:function(e){var t=getComputedStyle(e,null),i=e.clientHeight,a=e.clientWidth;return i-=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),[a-=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),i]}},{key:"getBoundingClientRect",value:function(e){var t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:e.clientWidth,height:e.clientHeight,x:t.left,y:t.top}}},{key:"getLargestStringFromArr",value:function(e){return e.reduce(function(t,i){return Array.isArray(i)&&(i=i.reduce(function(a,r){return a.length>r.length?a:r})),t.length>i.length?t:i},0)}},{key:"hexToRgba",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==e.substring(0,1)&&(e="#999999");var i=e.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:"x";return e.toString().slice().replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,t)}},{key:"negToZero",value:function(e){return e<0?0:e}},{key:"moveIndexInArray",value:function(e,t,i){if(i>=e.length)for(var a=i-e.length+1;a--;)e.push(void 0);return e.splice(i,0,e.splice(t,1)[0]),e}},{key:"extractNumber",value:function(e){return parseFloat(e.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}},{key:"setELstyles",value:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e.style.key=t[i])}},{key:"isNumber",value:function(e){return!isNaN(e)&&parseFloat(Number(e))===e&&!isNaN(parseInt(e,10))}},{key:"isFloat",value:function(e){return Number(e)===e&&e%1!=0}},{key:"isSafari",value:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"isFirefox",value:function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}},{key:"isIE11",value:function(){if(-1!==window.navigator.userAgent.indexOf("MSIE")||window.navigator.appVersion.indexOf("Trident/")>-1)return!0}},{key:"isIE",value:function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var a=e.indexOf("Edge/");return a>0&&parseInt(e.substring(a+5,e.indexOf(".",a)),10)}},{key:"getGCD",value:function(e,t){var a=Math.pow(10,(arguments.length>2&&void 0!==arguments[2]?arguments[2]:7)-Math.floor(Math.log10(Math.max(e,t))));for(e=Math.round(Math.abs(e)*a),t=Math.round(Math.abs(t)*a);t;){var r=t;t=e%t,e=r}return e/a}},{key:"getPrimeFactors",value:function(e){for(var t=[],i=2;e>=2;)e%i==0?(t.push(i),e/=i):i++;return t}},{key:"mod",value:function(e,t){var a=Math.pow(10,(arguments.length>2&&void 0!==arguments[2]?arguments[2]:7)-Math.floor(Math.log10(Math.max(e,t))));return(e=Math.round(Math.abs(e)*a))%(t=Math.round(Math.abs(t)*a))/a}}]),y}(),ye=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.setEasingFunctions()}return D(y,[{key:"setEasingFunctions",value:function(){var e;if(!this.w.globals.easing){switch(this.w.config.chart.animations.easing){case"linear":e="-";break;case"easein":e="<";break;case"easeout":e=">";break;case"easeinout":default:e="<>";break;case"swing":e=function(t){var i=1.70158;return(t-=1)*t*((i+1)*t+i)+1};break;case"bounce":e=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375};break;case"elastic":e=function(t){return t===!!t?t:Math.pow(2,-10*t)*Math.sin((t-.075)*(2*Math.PI)/.3)+1}}this.w.globals.easing=e}}},{key:"animateLine",value:function(e,t,i,a){e.attr(t).animate(a).attr(i)}},{key:"animateMarker",value:function(e,t,i,a,r,s){t||(t=0),e.attr({r:t,width:t,height:t}).animate(a,r).attr({r:i,width:i.width,height:i.height}).afterAll(function(){s()})}},{key:"animateCircle",value:function(e,t,i,a,r){e.attr({r:t.r,cx:t.cx,cy:t.cy}).animate(a,r).attr({r:i.r,cx:i.cx,cy:i.cy})}},{key:"animateRect",value:function(e,t,i,a,r){e.attr(t).animate(a).attr(i).afterAll(function(){return r()})}},{key:"animatePathsGradually",value:function(e){var c=this.w,d=0;c.config.chart.animations.animateGradually.enabled&&(d=c.config.chart.animations.animateGradually.delay),c.config.chart.animations.dynamicAnimation.enabled&&c.globals.dataChanged&&"bar"!==c.config.chart.type&&(d=0),this.morphSVG(e.el,e.realIndex,e.j,"line"!==c.config.chart.type||c.globals.comboCharts?e.fill:"stroke",e.pathFrom,e.pathTo,e.speed,e.delay*d)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach(function(e){var t=e.el;t.classList.remove("apexcharts-element-hidden"),t.classList.add("apexcharts-hidden-element-shown")})}},{key:"animationCompleted",value:function(e){var t=this.w;t.globals.animationEnded||(t.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof t.config.chart.events.animationEnd&&t.config.chart.events.animationEnd(this.ctx,{el:e,w:t}))}},{key:"morphSVG",value:function(e,t,i,a,r,s,n,o){var l=this,c=this.w;r||(r=e.attr("pathFrom")),s||(s=e.attr("pathTo"));var d=function(g){return"radar"===c.config.chart.type&&(n=1),"M 0 ".concat(c.globals.gridHeight)};(!r||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=d()),(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=d()),c.globals.shouldAnimate||(n=1),e.plot(r).animate(1,c.globals.easing,o).plot(r).animate(n,c.globals.easing,o).plot(s).afterAll(function(){M.isNumber(i)?i===c.globals.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&l.animationCompleted(e):"none"!==a&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&t===c.globals.series.length-1||c.globals.comboCharts)&&l.animationCompleted(e),l.showDelayedElements()})}}]),y}(),oe=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"getDefaultFilter",value:function(e,t){var i=this.w;e.unfilter(!0),(new window.SVG.Filter).size("120%","180%","-5%","-40%"),"none"!==i.config.states.normal.filter?this.applyFilter(e,t,i.config.states.normal.filter.type,i.config.states.normal.filter.value):i.config.chart.dropShadow.enabled&&this.dropShadow(e,i.config.chart.dropShadow,t)}},{key:"addNormalFilter",value:function(e,t){var i=this.w;i.config.chart.dropShadow.enabled&&!e.node.classList.contains("apexcharts-marker")&&this.dropShadow(e,i.config.chart.dropShadow,t)}},{key:"addLightenFilter",value:function(e,t,i){var a=this,r=this.w,s=i.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter(function(n){var o=r.config.chart.dropShadow;(o.enabled?a.addShadow(n,t,o):n).componentTransfer({rgb:{type:"linear",slope:1.5,intercept:s}})}),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"addDarkenFilter",value:function(e,t,i){var a=this,r=this.w,s=i.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter(function(n){var o=r.config.chart.dropShadow;(o.enabled?a.addShadow(n,t,o):n).componentTransfer({rgb:{type:"linear",slope:s}})}),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"applyFilter",value:function(e,t,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;switch(i){case"none":this.addNormalFilter(e,t);break;case"lighten":this.addLightenFilter(e,t,{intensity:a});break;case"darken":this.addDarkenFilter(e,t,{intensity:a})}}},{key:"addShadow",value:function(e,t,i){var a,r=this.w,s=i.blur,n=i.top,o=i.left,l=i.color,c=i.opacity;if((null===(a=r.config.chart.dropShadow.enabledOnSeries)||void 0===a?void 0:a.length)>0&&-1===r.config.chart.dropShadow.enabledOnSeries.indexOf(t))return e;var d=e.flood(Array.isArray(l)?l[t]:l,c).composite(e.sourceAlpha,"in").offset(o,n).gaussianBlur(s).merge(e.source);return e.blend(e.source,d)}},{key:"dropShadow",value:function(e,t){var i,a,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=t.top,n=t.left,o=t.blur,l=t.color,c=t.opacity,d=t.noUserSpaceOnUse,g=this.w;return e.unfilter(!0),M.isIE()&&"radialBar"===g.config.chart.type||(null===(i=g.config.chart.dropShadow.enabledOnSeries)||void 0===i?void 0:i.length)>0&&-1===(null===(a=g.config.chart.dropShadow.enabledOnSeries)||void 0===a?void 0:a.indexOf(r))||(l=Array.isArray(l)?l[r]:l,e.filter(function(p){var f;f=M.isSafari()||M.isFirefox()||M.isIE()?p.flood(l,c).composite(p.sourceAlpha,"in").offset(n,s).gaussianBlur(o):p.flood(l,c).composite(p.sourceAlpha,"in").offset(n,s).gaussianBlur(o).merge(p.source),p.blend(p.source,f)}),d||e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)),e}},{key:"setSelectionFilter",value:function(e,t,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[t]&&a.globals.selectedDataPoints[t].indexOf(i)>-1){e.node.setAttribute("selected",!0);var r=a.config.states.active.filter;"none"!==r&&this.applyFilter(e,t,r.type,r.value)}}},{key:"_scaleFilterSize",value:function(e){!function(t){for(var i in t)t.hasOwnProperty(i)&&e.setAttribute(i,t[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),y}(),E=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"roundPathCorners",value:function(e,t){function i(S,L,C){var z=L.x-S.x,T=L.y-S.y,I=Math.sqrt(z*z+T*T);return a(S,L,Math.min(1,C/I))}function a(S,L,C){return{x:S.x+(L.x-S.x)*C,y:S.y+(L.y-S.y)*C}}function r(S,L){S.length>2&&(S[S.length-2]=L.x,S[S.length-1]=L.y)}function s(S){return{x:parseFloat(S[S.length-2]),y:parseFloat(S[S.length-1])}}e.indexOf("NaN")>-1&&(e="");var n=e.split(/[,\s]/).reduce(function(S,L){var C=L.match("([a-zA-Z])(.+)");return C?(S.push(C[1]),S.push(C[2])):S.push(L),S},[]).reduce(function(S,L){return parseFloat(L)==L&&S.length?S[S.length-1].push(L):S.push([L]),S},[]),o=[];if(n.length>1){var l=s(n[0]),c=null;"Z"==n[n.length-1][0]&&n[0].length>2&&(n[n.length-1]=c=["L",l.x,l.y]),o.push(n[0]);for(var d=1;d2&&"L"==p[0]&&f.length>2&&"L"==f[0]){var b,m,v=s(g),A=s(p),h=s(f);b=i(A,v,t),m=i(A,h,t),r(p,b),p.origPoint=A,o.push(p);var u=a(b,A,.5),x=a(A,m,.5),k=["C",u.x,u.y,x.x,x.y,m.x,m.y];k.origPoint=A,o.push(k)}else o.push(p)}if(c){var w=s(o[o.length-1]);o.push(["Z"]),r(o[0],w)}}else o=n;return o.reduce(function(S,L){return S+L.join(" ")+" "},"")}},{key:"drawLine",value:function(e,t,i,a){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:e,y1:t,x2:i,y2:a,stroke:r,"stroke-dasharray":s,"stroke-width":n,"stroke-linecap":o})}},{key:"drawRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=this.w.globals.dom.Paper.rect();return d.attr({x:e,y:t,width:i>0?i:0,height:a>0?a:0,rx:r,ry:r,opacity:n,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":c}),d.node.setAttribute("fill",s),d}},{key:"drawPolygon",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(e).attr({fill:a,stroke:t,"stroke-width":i})}},{key:"drawCircle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e<0&&(e=0);var i=this.w.globals.dom.Paper.circle(2*e);return null!==t&&i.attr(t),i}},{key:"drawPath",value:function(e){var t=e.d,i=void 0===t?"":t,a=e.stroke,r=void 0===a?"#a8a8a8":a,s=e.strokeWidth,n=void 0===s?1:s,o=e.fill,l=e.fillOpacity,c=void 0===l?1:l,d=e.strokeOpacity,g=void 0===d?1:d,p=e.classes,f=e.strokeLinecap,b=void 0===f?null:f,m=e.strokeDashArray,v=void 0===m?0:m,A=this.w;return null===b&&(b=A.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(A.globals.gridHeight)),A.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":c,stroke:r,"stroke-opacity":g,"stroke-linecap":b,"stroke-width":n,"stroke-dasharray":v,class:p})}},{key:"group",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.w.globals.dom.Paper.group();return null!==e&&t.attr(e),t}},{key:"move",value:function(e,t){return["M",e,t].join(" ")}},{key:"line",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=[" L",e,t].join(" "):"H"===i?a=[" H",e].join(" "):"V"===i&&(a=[" V",t].join(" ")),a}},{key:"curve",value:function(e,t,i,a,r,s){return["C",e,t,i,a,r,s].join(" ")}},{key:"quadraticCurve",value:function(e,t,i,a){return["Q",e,t,i,a].join(" ")}},{key:"arc",value:function(e,t,i,a,r,s,n){var o="A";return arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(o="a"),[o,e,t,i,a,r,s,n].join(" ")}},{key:"renderPaths",value:function(e){var t,i=e.j,a=e.realIndex,r=e.pathFrom,s=e.pathTo,n=e.stroke,o=e.strokeWidth,l=e.strokeLinecap,c=e.fill,d=e.animationDelay,g=e.initialSpeed,p=e.dataChangeSpeed,f=e.className,b=e.shouldClipToGrid,m=void 0===b||b,v=e.bindEventsOnPaths,A=void 0===v||v,h=e.drawShadow,u=void 0===h||h,x=this.w,k=new oe(this.ctx),w=new ye(this.ctx),S=this.w.config.chart.animations.enabled,L=S&&this.w.config.chart.animations.dynamicAnimation.enabled,C=!!(S&&!x.globals.resized||L&&x.globals.dataChanged&&x.globals.shouldAnimate);C?t=r:(t=s,x.globals.animationEnded=!0);var T,z=x.config.stroke.dashArray;T=Array.isArray(z)?z[a]:x.config.stroke.dashArray;var I=this.drawPath({d:t,stroke:n,strokeWidth:o,fill:c,fillOpacity:1,classes:f,strokeLinecap:l,strokeDashArray:T});I.attr("index",a),m&&I.attr({"clip-path":"url(#gridRectMask".concat(x.globals.cuid,")")}),"none"!==x.config.states.normal.filter.type?k.getDefaultFilter(I,a):x.config.chart.dropShadow.enabled&&u&&k.dropShadow(I,x.config.chart.dropShadow,a),A&&(I.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,I)),I.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,I)),I.node.addEventListener("mousedown",this.pathMouseDown.bind(this,I))),I.attr({pathTo:s,pathFrom:r});var H={el:I,j:i,realIndex:a,pathFrom:r,pathTo:s,fill:c,strokeWidth:o,delay:d};return!S||x.globals.resized||x.globals.dataChanged?!x.globals.resized&&x.globals.dataChanged||w.showDelayedElements():w.animatePathsGradually(O(O({},H),{},{speed:g})),x.globals.dataChanged&&L&&C&&w.animatePathsGradually(O(O({},H),{},{speed:p})),I}},{key:"drawPattern",value:function(e,t,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(t,i,function(s){"horizontalLines"===e?s.line(0,0,i,0).stroke({color:a,width:r+1}):"verticalLines"===e?s.line(0,0,0,t).stroke({color:a,width:r+1}):"slantedLines"===e?s.line(0,0,t,i).stroke({color:a,width:r}):"squares"===e?s.rect(t,i).fill("none").stroke({color:a,width:r}):"circles"===e&&s.circle(t).fill("none").stroke({color:a,width:r})})}},{key:"drawGradient",value:function(e,t,i,a,r){var s,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,d=this.w;t.length<9&&0===t.indexOf("#")&&(t=M.hexToRgba(t,a)),i.length<9&&0===i.indexOf("#")&&(i=M.hexToRgba(i,r));var g=0,p=1,f=1,b=null;null!==o&&(g=void 0!==o[0]?o[0]/100:0,p=void 0!==o[1]?o[1]/100:1,f=void 0!==o[2]?o[2]/100:1,b=void 0!==o[3]?o[3]/100:null);var m=!("donut"!==d.config.chart.type&&"pie"!==d.config.chart.type&&"polarArea"!==d.config.chart.type&&"bubble"!==d.config.chart.type);return s=d.globals.dom.Paper.gradient(m?"radial":"linear",null===l||0===l.length?function(h){h.at(g,t,a),h.at(p,i,r),h.at(f,i,r),null!==b&&h.at(b,t,a)}:function(h){(Array.isArray(l[c])?l[c]:l).forEach(function(u){h.at(u.offset/100,u.color,u.opacity)})}),m?s.attr("bubble"!==d.config.chart.type?{gradientUnits:"userSpaceOnUse",cx:d.globals.gridWidth/2,cy:d.globals.gridHeight/2,r:n}:{cx:.5,cy:.5,r:.8,fx:.2,fy:.2}):"vertical"===e?s.from(0,0).to(0,1):"diagonal"===e?s.from(0,0).to(1,1):"horizontal"===e?s.from(0,1).to(1,1):"diagonal2"===e&&s.from(1,0).to(0,1),s}},{key:"getTextBasedOnMaxWidth",value:function(e){var t=e.text,i=e.maxWidth,s=this.getTextRects(t,e.fontSize,e.fontFamily),o=Math.floor(i/(s.width/t.length));return i-1){var o=i.globals.selectedDataPoints[r].indexOf(s);i.globals.selectedDataPoints[r].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.select(".apexcharts-series path").members,c=i.globals.dom.Paper.select(".apexcharts-series circle, .apexcharts-series rect").members,d=function(f){Array.prototype.forEach.call(f,function(b){b.node.setAttribute("selected","false"),a.getDefaultFilter(b,r)})};d(l),d(c)}e.node.setAttribute("selected","true"),n="true",void 0===i.globals.selectedDataPoints[r]&&(i.globals.selectedDataPoints[r]=[]),i.globals.selectedDataPoints[r].push(s)}if("true"===n){var g=i.config.states.active.filter;if("none"!==g)a.applyFilter(e,r,g.type,g.value);else if("none"!==i.config.states.hover.filter&&!i.globals.isTouchDevice){var p=i.config.states.hover.filter;a.applyFilter(e,r,p.type,p.value)}}else"none"!==i.config.states.active.filter.type&&("none"===i.config.states.hover.filter.type||i.globals.isTouchDevice?a.getDefaultFilter(e,r):a.applyFilter(e,r,(p=i.config.states.hover.filter).type,p.value));"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(t,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:r,dataPointIndex:s,w:i}),t&&this.ctx.events.fireEvent("dataPointSelection",[t,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:r,dataPointIndex:s,w:i}])}},{key:"rotateAroundCenter",value:function(e){var t={};return e&&"function"==typeof e.getBBox&&(t=e.getBBox()),{x:t.x+t.width/2,y:t.y+t.height/2}}},{key:"getTextRects",value:function(e,t,i,a){var r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=this.w,n=this.drawText({x:-200,y:-200,text:e,textAnchor:"start",fontSize:t,fontFamily:i,foreColor:"#fff",opacity:0});a&&n.attr("transform",a),s.globals.dom.Paper.add(n);var o=n.bbox();return r||(o=n.node.getBoundingClientRect()),n.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(e,t,i){if("function"==typeof e.getComputedTextLength&&(e.textContent=t,t.length>0&&e.getComputedTextLength()>=i/1.1)){for(var a=t.length-3;a>0;a-=3)if(e.getSubStringLength(0,a)<=i/1.1)return void(e.textContent=t.substring(0,a)+"...");e.textContent="."}}}],[{key:"setAttrs",value:function(e,t){for(var i in t)t.hasOwnProperty(i)&&e.setAttribute(i,t[i])}}]),y}(),te=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"getStackedSeriesTotals",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.w,i=[];if(0===t.globals.series.length)return i;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:null;return null===e?this.w.config.series.reduce(function(t,i){return t+i},0):this.w.globals.series[e].reduce(function(t,i){return t+i},0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var e=this,t=this.w,i=[];return t.globals.seriesGroups.forEach(function(a){var r=[];t.config.series.forEach(function(n,o){a.indexOf(t.globals.seriesNames[o])>-1&&r.push(o)});var s=t.globals.series.map(function(n,o){return-1===r.indexOf(o)?o:-1}).filter(function(n){return-1!==n});i.push(e.getStackedSeriesTotals(s))}),i}},{key:"isSeriesNull",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===e?this.w.config.series.filter(function(t){return null!==t}):this.w.config.series[e].data.filter(function(t){return null!==t})).length}},{key:"seriesHaveSameValues",value:function(e){return this.w.globals.series[e].every(function(t,i,a){return t===a[0]})}},{key:"getCategoryLabels",value:function(e){var t=this.w,i=e.slice();return t.config.xaxis.convertedCatToNumeric&&(i=e.map(function(a,r){return t.config.xaxis.labels.formatter(a-t.globals.minX+1)})),i}},{key:"getLargestSeries",value:function(){var e=this.w;e.globals.maxValsInArrayIndex=e.globals.series.map(function(t){return t.length}).indexOf(Math.max.apply(Math,e.globals.series.map(function(t){return t.length})))}},{key:"getLargestMarkerSize",value:function(){var e=this.w,t=0;return e.globals.markers.size.forEach(function(i){t=Math.max(t,i)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(function(i){t=Math.max(t,i.size)}),t>0&&(t+=e.config.markers.hover.sizeOffset+1),e.globals.markers.largestSize=t,t}},{key:"getSeriesTotals",value:function(){var e=this.w;e.globals.seriesTotals=e.globals.series.map(function(t,i){var a=0;if(Array.isArray(t))for(var r=0;re&&i.globals.seriesX[r][n]0){var f=function(m,v){var A=r.config.yaxis[r.globals.seriesYAxisReverseMap[v]],h=m<0?-1:1;return m=Math.abs(m),A.logarithmic&&(m=a.getBaseLog(A.logBase,m)),-h*m/n[v]};if(s.isMultipleYAxis){l=[];for(var b=0;b0&&(i=!0),{comboBarCount:a,comboCharts:i}}},{key:"extendArrayProps",value:function(e,t,i){var a,r,s,n,o,l;return null!==(a=t)&&void 0!==a&&a.yaxis&&(t=e.extendYAxis(t,i)),null!==(r=t)&&void 0!==r&&r.annotations&&(t.annotations.yaxis&&(t=e.extendYAxisAnnotations(t)),null!==(s=t)&&void 0!==s&&null!==(n=s.annotations)&&void 0!==n&&n.xaxis&&(t=e.extendXAxisAnnotations(t)),null!==(o=t)&&void 0!==o&&null!==(l=o.annotations)&&void 0!==l&&l.points&&(t=e.extendPointAnnotations(t))),t}}]),y}(),Xe=function(){function y(e){F(this,y),this.w=e.w,this.annoCtx=e}return D(y,[{key:"setOrientations",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("vertical"===e.label.orientation){var r=this.w.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(null!==t?t:0,"']"));if(null!==r){var s=r.getBoundingClientRect();r.setAttribute("x",parseFloat(r.getAttribute("x"))-s.height+4),r.setAttribute("y","top"===e.label.position?parseFloat(r.getAttribute("y"))+s.width:parseFloat(r.getAttribute("y"))-s.width);var n=this.annoCtx.graphics.rotateAroundCenter(r),l=n.y;r.setAttribute("transform","rotate(-90 ".concat(n.x," ").concat(l,")"))}}}},{key:"addBackgroundToAnno",value:function(e,t){var i=this.w;if(!e||void 0===t.label.text||void 0!==t.label.text&&!String(t.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),r=e.getBoundingClientRect(),s=t.label.style.padding.left,n=t.label.style.padding.right,o=t.label.style.padding.top,l=t.label.style.padding.bottom;"vertical"===t.label.orientation&&(o=t.label.style.padding.left,l=t.label.style.padding.right,s=t.label.style.padding.top,n=t.label.style.padding.bottom);var g=this.annoCtx.graphics.drawRect(r.left-a.left-s-i.globals.barPadForNumericAxis,r.top-a.top-o,r.width+s+n,r.height+o+l,t.label.borderRadius,t.label.style.background,1,t.label.borderWidth,t.label.borderColor,0);return t.id&&g.node.classList.add(t.id),g}},{key:"annotationsBackground",value:function(){var e=this,t=this.w,i=function(a,r,s){var n=t.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(r,"']"));if(n){var o=n.parentNode,l=e.addBackgroundToAnno(n,a);l&&(o.insertBefore(l.node,n),a.label.mouseEnter&&l.node.addEventListener("mouseenter",a.label.mouseEnter.bind(e,a)),a.label.mouseLeave&&l.node.addEventListener("mouseleave",a.label.mouseLeave.bind(e,a)),a.label.click&&l.node.addEventListener("click",a.label.click.bind(e,a)))}};t.config.annotations.xaxis.map(function(a,r){i(a,r,"xaxis")}),t.config.annotations.yaxis.map(function(a,r){i(a,r,"yaxis")}),t.config.annotations.points.map(function(a,r){i(a,r,"point")})}},{key:"getY1Y2",value:function(e,t){var i,a="y1"===e?t.y:t.y2,r=!1,s=this.w;if(this.annoCtx.invertAxis){var n=s.globals.labels;s.config.xaxis.convertedCatToNumeric&&(n=s.globals.categoryLabels);var o=n.indexOf(a),l=s.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child("+(o+1)+")");i=l?parseFloat(l.getAttribute("y")):(s.globals.gridHeight/n.length-1)*(o+1)-s.globals.barHeight,void 0!==t.seriesIndex&&s.globals.barHeight&&(i=i-s.globals.barHeight/2*(s.globals.series.length-1)+s.globals.barHeight*t.seriesIndex)}else{var c,d=s.globals.seriesYAxisMap[t.yAxisIndex][0];(c=s.config.yaxis[t.yAxisIndex].logarithmic?(a=new te(this.annoCtx.ctx).getLogVal(s.config.yaxis[t.yAxisIndex].logBase,a,d))/s.globals.yLogRatio[d]:(a-s.globals.minYArr[d])/(s.globals.yRange[d]/s.globals.gridHeight))>s.globals.gridHeight?(c=s.globals.gridHeight,r=!0):c<0&&(c=0,r=!0),i=s.globals.gridHeight-c,!t.marker||null!=t.y||(i=0),s.config.yaxis[t.yAxisIndex]&&s.config.yaxis[t.yAxisIndex].reversed&&(i=c)}return"string"==typeof a&&a.indexOf("px")>-1&&(i=parseFloat(a)),{yP:i,clipped:r}}},{key:"getX1X2",value:function(e,t){var i,a="x1"===e?t.x:t.x2,r=this.w,o=this.annoCtx.invertAxis?r.globals.yRange[0]:r.globals.xRange,l=!1;return i=this.annoCtx.inversedReversedAxis?((this.annoCtx.invertAxis?r.globals.maxY:r.globals.maxX)-a)/(o/r.globals.gridWidth):(a-(this.annoCtx.invertAxis?r.globals.minY:r.globals.minX))/(o/r.globals.gridWidth),"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||r.globals.dataFormatXNumeric||r.config.chart.sparkline.enabled||(i=this.getStringX(a)),"string"==typeof a&&a.indexOf("px")>-1&&(i=parseFloat(a)),null==a&&t.marker&&(i=r.globals.gridWidth),void 0!==t.seriesIndex&&r.globals.barWidth&&!this.annoCtx.invertAxis&&(i=i-r.globals.barWidth/2*(r.globals.series.length-1)+r.globals.barWidth*t.seriesIndex),i>r.globals.gridWidth?(i=r.globals.gridWidth,l=!0):i<0&&(i=0,l=!0),{x:i,clipped:l}}},{key:"getStringX",value:function(e){var t=this.w,i=e;t.config.xaxis.convertedCatToNumeric&&t.globals.categoryLabels.length&&(e=t.globals.categoryLabels.indexOf(e)+1);var a=t.globals.labels.indexOf(e),r=t.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child("+(a+1)+")");return r&&(i=parseFloat(r.getAttribute("x"))),i}}]),y}(),at=function(){function y(e){F(this,y),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Xe(this.annoCtx)}return D(y,[{key:"addXaxisAnnotation",value:function(e,t,i){var a,r=this.w,s=this.helpers.getX1X2("x1",e),n=s.x,o=s.clipped,l=!0,c=e.label.text,d=e.strokeDashArray;if(M.isNumber(n)){if(null==e.x2){if(!o){var g=this.annoCtx.graphics.drawLine(n+e.offsetX,0+e.offsetY,n+e.offsetX,r.globals.gridHeight+e.offsetY,e.borderColor,d,e.borderWidth);t.appendChild(g.node),e.id&&g.node.classList.add(e.id)}}else{var p=this.helpers.getX1X2("x2",e);if(a=p.x,l=p.clipped,!o||!l){if(a12?p-12:0===p?12:p;t=(t=(t=(t=t.replace(/(^|[^\\])HH+/g,"$1"+l(p))).replace(/(^|[^\\])H/g,"$1"+p)).replace(/(^|[^\\])hh+/g,"$1"+l(f))).replace(/(^|[^\\])h/g,"$1"+f);var b=a?e.getUTCMinutes():e.getMinutes();t=(t=t.replace(/(^|[^\\])mm+/g,"$1"+l(b))).replace(/(^|[^\\])m/g,"$1"+b);var m=a?e.getUTCSeconds():e.getSeconds();t=(t=t.replace(/(^|[^\\])ss+/g,"$1"+l(m))).replace(/(^|[^\\])s/g,"$1"+m);var v=a?e.getUTCMilliseconds():e.getMilliseconds();t=t.replace(/(^|[^\\])fff+/g,"$1"+l(v,3)),v=Math.round(v/10),t=t.replace(/(^|[^\\])ff/g,"$1"+l(v)),v=Math.round(v/10);var A=p<12?"AM":"PM";t=(t=(t=t.replace(/(^|[^\\])f/g,"$1"+v)).replace(/(^|[^\\])TT+/g,"$1"+A)).replace(/(^|[^\\])T/g,"$1"+A.charAt(0));var h=A.toLowerCase();t=(t=t.replace(/(^|[^\\])tt+/g,"$1"+h)).replace(/(^|[^\\])t/g,"$1"+h.charAt(0));var u=-e.getTimezoneOffset(),x=a||!u?"Z":u>0?"+":"-";if(!a){var k=(u=Math.abs(u))%60;x+=l(Math.floor(u/60))+":"+l(k)}t=t.replace(/(^|[^\\])K/g,"$1"+x);var w=(a?e.getUTCDay():e.getDay())+1;return(t=(t=(t=(t=t.replace(new RegExp(n[0],"g"),n[w])).replace(new RegExp(o[0],"g"),o[w])).replace(new RegExp(r[0],"g"),r[d])).replace(new RegExp(s[0],"g"),s[d])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(e,t,i){var a=this.w;void 0!==a.config.xaxis.min&&(e=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(t=a.config.xaxis.max);var r=this.getDate(e),s=this.getDate(t),n=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(n[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(n[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(n[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(n[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(n[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(n[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(n[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"calculcateLastDaysOfMonth",value:function(e,t,i){return this.determineDaysOfMonths(e,t)-i}},{key:"determineDaysOfYear",value:function(e){var t=365;return this.isLeapYear(e)&&(t=366),t}},{key:"determineRemainingDaysOfYear",value:function(e,t,i){var a=this.daysCntOfYear[t]+i;return t>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(e,t){var i=30;switch(e=M.monthMod(e),!0){case this.months30.indexOf(e)>-1:2===e&&(i=this.isLeapYear(t)?29:28);break;case this.months31.indexOf(e)>-1:default:i=31}return i}}]),y}(),Ce=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return D(y,[{key:"xLabelFormat",value:function(e,t,i,a){var r=this.w;if("datetime"===r.config.xaxis.type&&void 0===r.config.xaxis.labels.formatter&&void 0===r.config.tooltip.x.formatter){var s=new se(this.ctx);return s.formatDate(s.getDate(t),r.config.tooltip.x.format)}return e(t,i,a)}},{key:"defaultGeneralFormatter",value:function(e){return Array.isArray(e)?e.map(function(t){return t}):e}},{key:"defaultYFormatter",value:function(e,t,i){var a=this.w;if(M.isNumber(e))if(0!==a.globals.yValueDecimal)e=e.toFixed(void 0!==t.decimalsInFloat?t.decimalsInFloat:a.globals.yValueDecimal);else{var r=e.toFixed(0);e=e==r?r:e.toFixed(1)}return e}},{key:"setLabelFormatters",value:function(){var e=this,t=this.w;return t.globals.xaxisTooltipFormatter=function(i){return e.defaultGeneralFormatter(i)},t.globals.ttKeyFormatter=function(i){return e.defaultGeneralFormatter(i)},t.globals.ttZFormatter=function(i){return i},t.globals.legendFormatter=function(i){return e.defaultGeneralFormatter(i)},t.globals.xLabelFormatter=void 0!==t.config.xaxis.labels.formatter?t.config.xaxis.labels.formatter:function(i){if(M.isNumber(i)){if(!t.config.xaxis.convertedCatToNumeric&&"numeric"===t.config.xaxis.type){if(M.isNumber(t.config.xaxis.decimalsInFloat))return i.toFixed(t.config.xaxis.decimalsInFloat);var a=t.globals.maxX-t.globals.minX;return i.toFixed(a>0&&a<100?1:0)}return i.toFixed(t.globals.isBarHorizontal&&t.globals.maxY-t.globals.minYArr<4?1:0)}return i},t.globals.ttKeyFormatter="function"==typeof t.config.tooltip.x.formatter?t.config.tooltip.x.formatter:t.globals.xLabelFormatter,"function"==typeof t.config.xaxis.tooltip.formatter&&(t.globals.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||void 0!==t.config.tooltip.y.formatter)&&(t.globals.ttVal=t.config.tooltip.y),void 0!==t.config.tooltip.z.formatter&&(t.globals.ttZFormatter=t.config.tooltip.z.formatter),void 0!==t.config.legend.formatter&&(t.globals.legendFormatter=t.config.legend.formatter),t.config.yaxis.forEach(function(i,a){t.globals.yLabelFormatters[a]=void 0!==i.labels.formatter?i.labels.formatter:function(r){return t.globals.xyCharts?Array.isArray(r)?r.map(function(s){return e.defaultYFormatter(s,i,a)}):e.defaultYFormatter(r,i,a):r}}),t.globals}},{key:"heatmapLabelFormatters",value:function(){var e=this.w;if("heatmap"===e.config.chart.type){e.globals.yAxisScale[0].result=e.globals.seriesNames.slice();var t=e.globals.seriesNames.reduce(function(i,a){return i.length>a.length?i:a},0);e.globals.yAxisScale[0].niceMax=t,e.globals.yAxisScale[0].niceMin=t}}}]),y}(),ee=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"getLabel",value:function(e,t,i,a){var m,v,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",n=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=this.w,l=void 0===e[a]?"":e[a],c=l,d=o.globals.xLabelFormatter,g=o.config.xaxis.labels.formatter,p=!1,f=new Ce(this.ctx);n&&(c=f.xLabelFormat(d,l,l,{i:a,dateFormatter:new se(this.ctx).formatDate,w:o}),void 0!==g&&(c=g(l,e[a],{i:a,dateFormatter:new se(this.ctx).formatDate,w:o}))),t.length>0?(m=t[a].unit,v=null,t.forEach(function(x){"month"===x.unit?v="year":"day"===x.unit?v="month":"hour"===x.unit?v="day":"minute"===x.unit&&(v="hour")}),p=v===m,i=t[a].position,c=t[a].value):"datetime"===o.config.xaxis.type&&void 0===g&&(c=""),void 0===c&&(c=""),c=Array.isArray(c)?c:c.toString();var h,A=new E(this.ctx);h=o.globals.rotateXLabels&&n?A.getTextRects(c,parseInt(s,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):A.getTextRects(c,parseInt(s,10));var u=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(c)&&("NaN"===String(c)||r.indexOf(c)>=0&&u)&&(c=""),{x:i,text:c,textRect:h,isBold:p}}},{key:"checkLabelBasedOnTickamount",value:function(e,t,i){var a=this.w,r=a.config.xaxis.tickAmount;return"dataPoints"===r&&(r=Math.round(a.globals.gridWidth/120)),r>i||e%Math.round(i/(r+1))==0||(t.text=""),t}},{key:"checkForOverflowingLabels",value:function(e,t,i,a,r){var s=this.w;if(0===e&&s.globals.skipFirstTimelinelabel&&(t.text=""),e===i-1&&s.globals.skipLastTimelinelabel&&(t.text=""),s.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var n=r[r.length-1];t.xa.length||a.some(function(r){return Array.isArray(r.seriesName)})?e:i.seriesYAxisReverseMap[e]}},{key:"isYAxisHidden",value:function(e){var t=this.w,i=t.config.yaxis[e];if(!i.show||this.yAxisAllSeriesCollapsed(e))return!0;if(!i.showForNullSeries){var a=t.globals.seriesYAxisMap[e],r=new te(this.ctx);return a.every(function(s){return r.isSeriesNull(s)})}return!1}},{key:"getYAxisForeColor",value:function(e,t){var i=this.w;return Array.isArray(e)&&i.globals.yAxisScale[t]&&this.ctx.theme.pushExtraColors(e,i.globals.yAxisScale[t].result.length,!1),e}},{key:"drawYAxisTicks",value:function(e,t,i,a,r,s,n){var o=this.w,l=new E(this.ctx),c=o.globals.translateY;if(a.show&&t>0){!0===o.config.yaxis[r].opposite&&(e+=a.width);for(var d=t;d>=0;d--){var g=c+t/10+o.config.yaxis[r].labels.offsetY-1;o.globals.isBarHorizontal&&(g=s*d),"heatmap"===o.config.chart.type&&(g+=s/2);var p=l.drawLine(e+i.offsetX-a.width+a.offsetX,g+a.offsetY,e+i.offsetX+a.offsetX,g+a.offsetY,a.color);n.add(p),c+=s}}}}]),y}(),Qe=function(){function y(e){F(this,y),this.w=e.w,this.annoCtx=e,this.helpers=new Xe(this.annoCtx),this.axesUtils=new ee(this.annoCtx)}return D(y,[{key:"addYaxisAnnotation",value:function(e,t,i){var a,r=this.w,s=e.strokeDashArray,n=this.helpers.getY1Y2("y1",e),o=n.yP,l=n.clipped,d=!1,g=e.label.text;if(null==e.y2){if(!l){d=!0;var p=this.annoCtx.graphics.drawLine(0+e.offsetX,o+e.offsetY,this._getYAxisAnnotationWidth(e),o+e.offsetY,e.borderColor,s,e.borderWidth);t.appendChild(p.node),e.id&&p.node.classList.add(e.id)}}else{if((a=(n=this.helpers.getY1Y2("y2",e)).yP)>o){var f=o;o=a,a=f}if(!l||!n.clipped){d=!0;var b=this.annoCtx.graphics.drawRect(0+e.offsetX,a+e.offsetY,this._getYAxisAnnotationWidth(e),o-a,0,e.fillColor,e.opacity,1,e.borderColor,s);b.node.classList.add("apexcharts-annotation-rect"),b.attr("clip-path","url(#gridRectMask".concat(r.globals.cuid,")")),t.appendChild(b.node),e.id&&b.node.classList.add(e.id)}}if(d){var v=this.annoCtx.graphics.drawText({x:("right"===e.label.position?r.globals.gridWidth:"center"===e.label.position?r.globals.gridWidth/2:0)+e.label.offsetX,y:(a??o)+e.label.offsetY-3,text:g,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});v.attr({rel:i}),t.appendChild(v.node)}}},{key:"_getYAxisAnnotationWidth",value:function(e){var t=this.w;return(e.width.indexOf("%")>-1?t.globals.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10))+e.offsetX}},{key:"drawYAxisAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return t.config.annotations.yaxis.forEach(function(a,r){a.yAxisIndex=e.axesUtils.translateYAxisIndex(a.yAxisIndex),e.axesUtils.isYAxisHidden(a.yAxisIndex)&&e.axesUtils.yAxisAllSeriesCollapsed(a.yAxisIndex)||e.addYaxisAnnotation(a,i.node,r)}),i}}]),y}(),He=function(){function y(e){F(this,y),this.w=e.w,this.annoCtx=e,this.helpers=new Xe(this.annoCtx)}return D(y,[{key:"addPointAnnotation",value:function(e,t,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(e.seriesIndex)>-1)){var a=this.helpers.getX1X2("x1",e),r=a.x,s=a.clipped,n=(a=this.helpers.getY1Y2("y1",e)).yP,o=a.clipped;if(M.isNumber(r)&&!o&&!s){var l={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:"apexcharts-point-annotation-marker ".concat(e.marker.cssClass," ").concat(e.id?e.id:"")},c=this.annoCtx.graphics.drawMarker(r+e.marker.offsetX,n+e.marker.offsetY,l);t.appendChild(c.node);var d=e.label.text?e.label.text:"",g=this.annoCtx.graphics.drawText({x:r+e.label.offsetX,y:n+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:d,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});if(g.attr({rel:i}),t.appendChild(g.node),e.customSVG.SVG){var p=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+e.customSVG.cssClass});p.attr({transform:"translate(".concat(r+e.customSVG.offsetX,", ").concat(n+e.customSVG.offsetY,")")}),p.node.innerHTML=e.customSVG.SVG,t.appendChild(p.node)}if(e.image.path){var f=e.image.width?e.image.width:20,b=e.image.height?e.image.height:20;c=this.annoCtx.addImage({x:r+e.image.offsetX-f/2,y:n+e.image.offsetY-b/2,width:f,height:b,path:e.image.path,appendTo:".apexcharts-point-annotations"})}e.mouseEnter&&c.node.addEventListener("mouseenter",e.mouseEnter.bind(this,e)),e.mouseLeave&&c.node.addEventListener("mouseleave",e.mouseLeave.bind(this,e)),e.click&&c.node.addEventListener("click",e.click.bind(this,e))}}}},{key:"drawPointAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return t.config.annotations.points.map(function(a,r){e.addPointAnnotation(a,i.node,r)}),i}}]),y}(),ze={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},le=function(){function y(){F(this,y),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,radius:2,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return D(y,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,easing:"easeinout",speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"transparent",locales:[ze],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.35},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",dateFormatter:function(e){return new Date(e).toDateString()}},png:{filename:void 0},svg:{filename:void 0}},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(e){return e}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(e){return e+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(t,i){return t+i},0)/e.globals.series.length+"%"}}},barLabels:{enabled:!1,margin:5,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(e){return e},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(e){return e}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(e){return e}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(t,i){return t+i},0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(e){return null!==e?e:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{width:12,height:12,strokeWidth:0,fillColors:void 0,strokeColor:"#fff",radius:12,customHTML:void 0,offsetX:0,offsetY:0,onClick:void 0},itemMargin:{horizontal:5,vertical:2},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",width:8,height:8,radius:2,offsetX:0,offsetY:0,onClick:void 0,onDblClick:void 0,showNullDataPoints:!0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{normal:{filter:{type:"none",value:0}},hover:{filter:{type:"lighten",value:.1}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.5}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(e){return e?e+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.4}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"light",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),y}(),st=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.graphics=new E(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Xe(this),this.xAxisAnnotations=new at(this),this.yAxisAnnotations=new Qe(this),this.pointsAnnotations=new He(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return D(y,[{key:"drawAxesAnnotations",value:function(){var e=this.w;if(e.globals.axisCharts){for(var t=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),r=e.config.chart.animations.enabled,s=[t,i,a],n=[i.node,t.node,a.node],o=0;o<3;o++)e.globals.dom.elGraphical.add(s[o]),!r||e.globals.resized||e.globals.dataChanged||"scatter"!==e.config.chart.type&&"bubble"!==e.config.chart.type&&e.globals.dataPoints>1&&n[o].classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:n[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var e=this;this.w.config.annotations.images.map(function(t,i){e.addImage(t,i)})}},{key:"drawTextAnnos",value:function(){var e=this;this.w.config.annotations.texts.map(function(t,i){e.addText(t,i)})}},{key:"addXaxisAnnotation",value:function(e,t,i){this.xAxisAnnotations.addXaxisAnnotation(e,t,i)}},{key:"addYaxisAnnotation",value:function(e,t,i){this.yAxisAnnotations.addYaxisAnnotation(e,t,i)}},{key:"addPointAnnotation",value:function(e,t,i){this.pointsAnnotations.addPointAnnotation(e,t,i)}},{key:"addText",value:function(e,t){var r=e.text,g=e.backgroundColor,p=e.borderWidth,f=e.strokeDashArray,b=e.borderRadius,m=e.borderColor,v=e.appendTo,A=void 0===v?".apexcharts-svg":v,h=e.paddingLeft,u=void 0===h?4:h,x=e.paddingRight,k=void 0===x?4:x,w=e.paddingBottom,S=void 0===w?2:w,L=e.paddingTop,C=void 0===L?2:L,z=this.w,T=this.graphics.drawText({x:e.x,y:e.y,text:r,textAnchor:e.textAnchor||"start",fontSize:e.fontSize||"12px",fontWeight:e.fontWeight||"regular",fontFamily:e.fontFamily||z.config.chart.fontFamily,foreColor:e.foreColor||z.config.chart.foreColor,cssClass:e.cssClass}),I=z.globals.dom.baseEl.querySelector(A);I&&I.appendChild(T.node);var Y=T.bbox();if(r){var H=this.graphics.drawRect(Y.x-u,Y.y-C,Y.width+u+k,Y.height+S+C,b,g||"transparent",1,p,m,f);I.insertBefore(H.node,T.node)}}},{key:"addImage",value:function(e,t){var i=this.w,r=e.x,s=void 0===r?0:r,n=e.y,o=void 0===n?0:n,l=e.width,c=void 0===l?20:l,d=e.height,g=void 0===d?20:d,p=e.appendTo,f=void 0===p?".apexcharts-svg":p,b=i.globals.dom.Paper.image(e.path);b.size(c,g).move(s,o);var m=i.globals.dom.baseEl.querySelector(f);return m&&m.appendChild(b.node),b}},{key:"addXaxisAnnotationExternal",value:function(e,t,i){return this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(e,t,i){return this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(e,t,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(e){var t=e.params,i=e.pushToMemory,a=e.context,r=e.type,s=e.contextMethod,n=a,o=n.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations")),c=l.childNodes.length+1,d=new le,g=Object.assign({},"xaxis"===r?d.xAxisAnnotation:"yaxis"===r?d.yAxisAnnotation:d.pointAnnotation),p=M.extend(g,t);switch(r){case"xaxis":this.addXaxisAnnotation(p,l,c);break;case"yaxis":this.addYaxisAnnotation(p,l,c);break;case"point":this.addPointAnnotation(p,l,c)}var f=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations .apexcharts-").concat(r,"-annotation-label[rel='").concat(c,"']")),b=this.helpers.addBackgroundToAnno(f,p);return b&&l.insertBefore(b.node,f),i&&o.globals.memory.methodsToExec.push({context:n,id:p.id?p.id:M.randomId(),method:s,label:"addAnnotation",params:t}),a}},{key:"clearAnnotations",value:function(e){var t=e.w,i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");t.globals.memory.methodsToExec.map(function(a,r){"addText"!==a.label&&"addAnnotation"!==a.label||t.globals.memory.methodsToExec.splice(r,1)}),i=M.listToArray(i),Array.prototype.forEach.call(i,function(a){for(;a.firstChild;)a.removeChild(a.firstChild)})}},{key:"removeAnnotation",value:function(e,t){var i=e.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(t));a&&(i.globals.memory.methodsToExec.map(function(r,s){r.id===t&&i.globals.memory.methodsToExec.splice(s,1)}),Array.prototype.forEach.call(a,function(r){r.parentElement.removeChild(r)}))}}]),y}(),Ne=function(y){var e,t=y.isTimeline,i=y.ctx,a=y.seriesIndex,r=y.dataPointIndex,s=y.y1,n=y.y2,o=y.w,l=o.globals.seriesRangeStart[a][r],c=o.globals.seriesRangeEnd[a][r],d=o.globals.labels[r],g=o.config.series[a].name?o.config.series[a].name:"",p=o.globals.ttKeyFormatter,f=o.config.tooltip.y.title.formatter,b={w:o,seriesIndex:a,dataPointIndex:r,start:l,end:c};"function"==typeof f&&(g=f(g,b)),null!==(e=o.config.series[a].data[r])&&void 0!==e&&e.x&&(d=o.config.series[a].data[r].x),t||"datetime"===o.config.xaxis.type&&(d=new Ce(i).xLabelFormat(o.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new se(i).formatDate,w:o})),"function"==typeof p&&(d=p(d,b)),Number.isFinite(s)&&Number.isFinite(n)&&(l=s,c=n);var m="",v="",A=o.globals.colors[a];if(void 0===o.config.tooltip.x.formatter)if("datetime"===o.config.xaxis.type){var h=new se(i);m=h.formatDate(h.getDate(l),o.config.tooltip.x.format),v=h.formatDate(h.getDate(c),o.config.tooltip.x.format)}else m=l,v=c;else m=o.config.tooltip.x.formatter(l),v=o.config.tooltip.x.formatter(c);return{start:l,end:c,startVal:m,endVal:v,ylabel:d,color:A,seriesName:g}},Be=function(y){var e=y.color,t=y.seriesName,i=y.ylabel,a=y.start,r=y.end,s=y.seriesIndex,n=y.dataPointIndex,o=y.ctx.tooltip.tooltipLabels.getFormatters(s);a=o.yLbFormatter(a),r=o.yLbFormatter(r);var l=o.yLbFormatter(y.w.globals.series[s][n]),c='\n '.concat(a,'\n - \n ').concat(r,"\n ");return'
'+(t||"")+'
'+i+": "+(y.w.globals.comboCharts?"rangeArea"===y.w.config.series[s].type||"rangeBar"===y.w.config.series[s].type?c:"".concat(l,""):c)+"
"},Le=function(){function y(e){F(this,y),this.opts=e}return D(y,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{chart:{animations:{easing:"swing"}},dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(e){return this.hideYAxis(),M.extend(e,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"bar",value:function(){return{chart:{stacked:!1,animations:{easing:"swing"}},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square",radius:2,size:8}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),O(O({},this.bar()),{},{chart:{animations:{easing:"linear",speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var e=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){return e._getBoxTooltip(t.w,t.seriesIndex,t.dataPointIndex,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var e=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){return e._getBoxTooltip(t.w,t.seriesIndex,t.dataPointIndex,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:5,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(e,t){var i=t.seriesIndex,a=t.dataPointIndex,r=t.w,s=function(){return r.globals.seriesRangeEnd[i][a]-r.globals.seriesRangeStart[i][a]};return r.globals.comboCharts?"rangeBar"===r.config.series[i].type||"rangeArea"===r.config.series[i].type?s():e:s()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(e){return e.w.config.plotOptions&&e.w.config.plotOptions.bar&&e.w.config.plotOptions.bar.horizontal?(a=(i=Ne(O(O({},t=e),{},{isTimeline:!0}))).color,r=i.seriesName,s=i.ylabel,n=i.startVal,o=i.endVal,Be(O(O({},t),{},{color:a,seriesName:r,ylabel:s,start:n,end:o}))):function(t){var i=Ne(t),a=i.color,r=i.seriesName,s=i.ylabel,n=i.start,o=i.end;return Be(O(O({},t),{},{color:a,seriesName:r,ylabel:s,start:n,end:o}))}(e);var t,i,a,r,s,n,o}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(e){var t,i;return null!==(t=e.plotOptions.bar)&&void 0!==t&&t.barHeight||(e.plotOptions.bar.barHeight=2),null!==(i=e.plotOptions.bar)&&void 0!==i&&i.columnWidth||(e.plotOptions.bar.columnWidth=2),e}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(e){return a=(i=Ne(t=e)).color,r=i.seriesName,s=i.ylabel,n=i.start,o=i.end,Be(O(O({},t),{},{color:a,seriesName:r,ylabel:s,start:n,end:o}));var t,i,a,r,s,n,o}}}}},{key:"brush",value:function(e){return M.extend(e,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;var t=e.dataLabels.formatter;return e.yaxis.forEach(function(i,a){e.yaxis[a].min=0,e.yaxis[a].max=100}),"bar"===e.chart.type&&(e.dataLabels.formatter=t||function(i){return"number"==typeof i&&i?i.toFixed(0)+"%":i}),e}},{key:"stackedBars",value:function(){var e=this.bar();return O(O({},e),{},{plotOptions:O(O({},e.plotOptions),{},{bar:O(O({},e.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(e){return e.xaxis.convertedCatToNumeric=!0,e}},{key:"convertCatToNumericXaxis",value:function(e,t,i){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(s){return M.isNumber(s)?Math.floor(s):s};var a=e.xaxis.labels.formatter,r=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return i&&i.length&&(r=i.map(function(s){return Array.isArray(s)?s:String(s)})),r&&r.length&&(e.xaxis.labels.formatter=function(s){return M.isNumber(s)?a(r[Math.floor(s)-1]):a(s)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||"dataPoints",e}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square",size:10,offsetY:2}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:3,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1},xaxis:{labels:{formatter:function(e){return e},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0}}}},{key:"_getBoxTooltip",value:function(e,t,i,a,r){var s=e.globals.seriesCandleO[t][i],n=e.globals.seriesCandleH[t][i],o=e.globals.seriesCandleM[t][i],l=e.globals.seriesCandleL[t][i],c=e.globals.seriesCandleC[t][i];return e.config.series[t].type&&e.config.series[t].type!==r?'
\n '.concat(e.config.series[t].name?e.config.series[t].name:"series-"+(t+1),": ").concat(e.globals.series[t][i],"\n
"):'
')+"
".concat(a[0],': ')+s+"
"+"
".concat(a[1],': ')+n+"
"+(o?"
".concat(a[2],': ')+o+"
":"")+"
".concat(a[3],': ')+l+"
"+"
".concat(a[4],': ')+c+"
"}}]),y}(),Pe=function(){function y(e){F(this,y),this.opts=e}return D(y,[{key:"init",value:function(e){var t=e.responsiveOverride,i=this.opts,a=new le,r=new Le(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var s=a.init(),n={};if(i&&"object"===ae(i)){var o,l,c,d,g,p,f,b,m={};m=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?r[i.chart.type]():r.line(),null!==(o=i.plotOptions)&&void 0!==o&&null!==(l=o.bar)&&void 0!==l&&l.isFunnel&&(m=r.funnel()),i.chart.stacked&&"bar"===i.chart.type&&(m=r.stackedBars()),null!==(c=i.chart.brush)&&void 0!==c&&c.enabled&&(m=r.brush(m)),i.chart.stacked&&"100%"===i.chart.stackType&&(i=r.stacked100(i)),null!==(d=i.plotOptions)&&void 0!==d&&null!==(g=d.bar)&&void 0!==g&&g.isDumbbell&&(i=r.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},t||(i.xaxis.convertedCatToNumeric=!1),(null!==(p=(i=this.checkForCatToNumericXAxis(this.chartType,m,i)).chart.sparkline)&&void 0!==p&&p.enabled||null!==(f=window.Apex.chart)&&void 0!==f&&null!==(b=f.sparkline)&&void 0!==b&&b.enabled)&&(m=r.sparkline(m)),n=M.extend(s,m)}var v=M.extend(n,window.Apex);return s=M.extend(v,i),this.handleUserInputErrors(s)}},{key:"checkForCatToNumericXAxis",value:function(e,t,i){var a,r,s=new Le(i);return("bar"===e||"boxPlot"===e)&&(null===(a=i.plotOptions)||void 0===a||null===(r=a.bar)||void 0===r?void 0:r.horizontal)||"pie"===e||"polarArea"===e||"donut"===e||"radar"===e||"radialBar"===e||"heatmap"===e||!("datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type)||"between"===(i.xaxis.tickPlacement?i.xaxis.tickPlacement:t.xaxis&&t.xaxis.tickPlacement)||(i=s.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(e,t){var i=new le;(void 0===e.yaxis||!e.yaxis||Array.isArray(e.yaxis)&&0===e.yaxis.length)&&(e.yaxis={}),e.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(e.yaxis=M.extend(e.yaxis,window.Apex.yaxis)),e.yaxis=e.yaxis.constructor!==Array?[M.extend(i.yAxis,e.yaxis)]:M.extendArray(e.yaxis,i.yAxis);var a=!1;e.yaxis.forEach(function(s){s.logarithmic&&(a=!0)});var r=e.series;return t&&!r&&(r=t.config.series),a&&r.length!==e.yaxis.length&&r.length&&(e.yaxis=r.map(function(s,n){if(s.name||(r[n].name="series-".concat(n+1)),e.yaxis[n])return e.yaxis[n].seriesName=r[n].name,e.yaxis[n];var o=M.extend(i.yAxis,e.yaxis[0]);return o.show=!1,o})),a&&r.length>1&&r.length!==e.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),e}},{key:"extendAnnotations",value:function(e){return void 0===e.annotations&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),this.extendPointAnnotations(e)}},{key:"extendYAxisAnnotations",value:function(e){var t=new le;return e.annotations.yaxis=M.extendArray(void 0!==e.annotations.yaxis?e.annotations.yaxis:[],t.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var t=new le;return e.annotations.xaxis=M.extendArray(void 0!==e.annotations.xaxis?e.annotations.xaxis:[],t.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var t=new le;return e.annotations.points=M.extendArray(void 0!==e.annotations.points?e.annotations.points:[],t.pointAnnotation),e}},{key:"checkForDarkTheme",value:function(e){e.theme&&"dark"===e.theme.mode&&(e.tooltip||(e.tooltip={}),"light"!==e.tooltip.theme&&(e.tooltip.theme="dark"),e.chart.foreColor||(e.chart.foreColor="#f6f7f8"),e.chart.background||(e.chart.background="#424242"),e.theme.palette||(e.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(e){var t=e;if(t.tooltip.shared&&t.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===t.chart.type&&t.plotOptions.bar.horizontal){if(t.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");t.yaxis[0].reversed&&(t.yaxis[0].opposite=!0),t.xaxis.tooltip.enabled=!1,t.yaxis[0].tooltip.enabled=!1,t.chart.zoom.enabled=!1}return"bar"!==t.chart.type&&"rangeBar"!==t.chart.type||t.tooltip.shared&&"barWidth"===t.xaxis.crosshairs.width&&t.series.length>1&&(t.xaxis.crosshairs.width="tickWidth"),"candlestick"!==t.chart.type&&"boxPlot"!==t.chart.type||t.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(t.chart.type," chart is not supported.")),t.yaxis[0].reversed=!1),t}}]),y}(),Je=function(){function y(){F(this,y)}return D(y,[{key:"initGlobalVars",value:function(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRange=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.labels=[],e.hasXaxisGroups=!1,e.groups=[],e.barGroups=[],e.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.isXNumeric=!1,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0,e.multiAxisTickAmount=0}},{key:"globalVars",value:function(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],goldenPadding:35,invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:"pan"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.pan,selectionEnabled:"selection"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,easing:null,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(e){var t=this.globalVars(e);return this.initGlobalVars(t),t.initialConfig=M.extend({},e),t.initialSeries=M.clone(e.series),t.lastXAxis=M.clone(t.initialConfig.xaxis),t.lastYAxis=M.clone(t.initialConfig.yaxis),t}}]),y}(),rt=function(){function y(e){F(this,y),this.opts=e}return D(y,[{key:"init",value:function(){var e=new Pe(this.opts).init({responsiveOverride:!1});return{config:e,globals:(new Je).init(e)}}}]),y}(),ue=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0}return D(y,[{key:"clippedImgArea",value:function(e){var t=this.w,i=t.config,a=parseInt(t.globals.gridWidth,10),r=parseInt(t.globals.gridHeight,10),s=a>r?a:r,n=e.image,o=0,l=0;void 0===e.width&&void 0===e.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,l=i.fill.image.height):(o=s+1,l=s):(o=e.width,l=e.height);var c=document.createElementNS(t.globals.SVGNS,"pattern");E.setAttrs(c,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var d=document.createElementNS(t.globals.SVGNS,"image");c.appendChild(d),d.setAttributeNS(window.SVG.xlink,"href",n),E.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),d.style.opacity=e.opacity,t.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(e){var t=this.w,i=t.config.chart.type;return this.seriesIndex=("bar"===i||"rangeBar"===i)&&t.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?e.seriesNumber:e.seriesNumber%t.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(e){var t=this.w;this.opts=e;var i,a,r,s=this.w.config;this.seriesIndex=this.getSeriesIndex(e);var n=this.getFillColors()[this.seriesIndex];void 0!==t.globals.seriesColors[this.seriesIndex]&&(n=t.globals.seriesColors[this.seriesIndex]),"function"==typeof n&&(n=n({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:t}));var o=e.fillType?e.fillType:this.getFillType(this.seriesIndex),l=Array.isArray(s.fill.opacity)?s.fill.opacity[this.seriesIndex]:s.fill.opacity;e.color&&(n=e.color),n||(n="#fff",console.warn("undefined color - ApexCharts"));var c=n;if(-1===n.indexOf("rgb")?n.length<9&&(c=M.hexToRgba(n,l)):n.indexOf("rgba")>-1&&(l=M.getOpacityFromRGBA(n)),e.opacity&&(l=e.opacity),"pattern"===o&&(a=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:a,fillColor:n,fillOpacity:l,defaultColor:c})),"gradient"===o&&(r=this.handleGradientFill({fillConfig:e.fillConfig,fillColor:n,fillOpacity:l,i:this.seriesIndex})),"image"===o){var d=s.fill.image.src,g=e.patternID?e.patternID:"";this.clippedImgArea({opacity:l,image:Array.isArray(d)?e.seriesNumber-1&&(p=M.getOpacityFromRGBA(g));var f=void 0===s.gradient.opacityTo?i:Array.isArray(s.gradient.opacityTo)?s.gradient.opacityTo[r]:s.gradient.opacityTo;if(void 0===s.gradient.gradientToColors||0===s.gradient.gradientToColors.length)n=c.shadeColor("dark"===s.gradient.shade?-1*parseFloat(s.gradient.shadeIntensity):parseFloat(s.gradient.shadeIntensity),t.indexOf("rgb")>-1?M.rgb2hex(t):t);else if(s.gradient.gradientToColors[o.seriesNumber]){var b=s.gradient.gradientToColors[o.seriesNumber];n=b,b.indexOf("rgba")>-1&&(f=M.getOpacityFromRGBA(b))}else n=t;if(s.gradient.gradientFrom&&(g=s.gradient.gradientFrom),s.gradient.gradientTo&&(n=s.gradient.gradientTo),s.gradient.inverseColors){var m=g;g=n,n=m}return g.indexOf("rgb")>-1&&(g=M.rgb2hex(g)),n.indexOf("rgb")>-1&&(n=M.rgb2hex(n)),l.drawGradient(d,g,n,p,f,o.size,s.gradient.stops,s.gradient.colorStops,r)}}]),y}(),Me=function(){function y(e,t){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"setGlobalMarkerSize",value:function(){var e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],n=this.w,o=t,l=e,c=null,d=new E(this.ctx),g=n.config.markers.discrete&&n.config.markers.discrete.length;if((n.globals.markers.size[t]>0||s||g)&&(c=d.group({class:s||g?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(n.globals.cuid,")")),Array.isArray(l.x))for(var p=0;p0:n.config.markers.size>0)||s||g){M.isNumber(l.y[p])?b+=" w".concat(M.randomId()):b="apexcharts-nullpoint";var m=this.getMarkerConfig({cssClass:b,seriesIndex:t,dataPointIndex:f});n.config.series[o].data[f]&&(n.config.series[o].data[f].fillColor&&(m.pointFillColor=n.config.series[o].data[f].fillColor),n.config.series[o].data[f].strokeColor&&(m.pointStrokeColor=n.config.series[o].data[f].strokeColor)),a&&(m.pSize=a),(l.x[p]<0||l.x[p]>n.globals.gridWidth||l.y[p]<-n.globals.markers.largestSize||l.y[p]>n.globals.gridHeight+n.globals.markers.largestSize)&&(m.pSize=0),(r=d.drawMarker(l.x[p],l.y[p],m)).attr("rel",f),r.attr("j",f),r.attr("index",t),r.node.setAttribute("default-marker-size",m.pSize),new oe(this.ctx).setSelectionFilter(r,t,f),this.addEvents(r),c&&c.add(r)}else void 0===n.globals.pointsArray[t]&&(n.globals.pointsArray[t]=[]),n.globals.pointsArray[t].push([l.x[p],l.y[p]])}return c}},{key:"getMarkerConfig",value:function(e){var t=e.cssClass,i=e.seriesIndex,a=e.dataPointIndex,r=void 0===a?null:a,s=e.finishRadius,n=void 0===s?null:s,o=this.w,l=this.getMarkerStyle(i),c=o.globals.markers.size[i],d=o.config.markers;return null!==r&&d.discrete.length&&d.discrete.map(function(g){g.seriesIndex===i&&g.dataPointIndex===r&&(l.pointStrokeColor=g.strokeColor,l.pointFillColor=g.fillColor,c=g.size,l.pointShape=g.shape)}),{pSize:null===n?c:n,pRadius:d.radius,width:Array.isArray(d.width)?d.width[i]:d.width,height:Array.isArray(d.height)?d.height[i]:d.height,pointStrokeWidth:Array.isArray(d.strokeWidth)?d.strokeWidth[i]:d.strokeWidth,pointStrokeColor:l.pointStrokeColor,pointFillColor:l.pointFillColor,shape:l.pointShape||(Array.isArray(d.shape)?d.shape[i]:d.shape),class:t,pointStrokeOpacity:Array.isArray(d.strokeOpacity)?d.strokeOpacity[i]:d.strokeOpacity,pointStrokeDashArray:Array.isArray(d.strokeDashArray)?d.strokeDashArray[i]:d.strokeDashArray,pointFillOpacity:Array.isArray(d.fillOpacity)?d.fillOpacity[i]:d.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(e){var t=this.w,i=new E(this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,e)),e.node.addEventListener("click",t.config.markers.onClick),e.node.addEventListener("dblclick",t.config.markers.onDblClick),e.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,e),{passive:!0})}},{key:"getMarkerStyle",value:function(e){var t=this.w,i=t.globals.markers.colors,a=t.config.markers.strokeColor||t.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[e]:a,pointFillColor:Array.isArray(i)?i[e]:i}}}]),y}(),Ke=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled}return D(y,[{key:"draw",value:function(e,t,i){var a=this.w,r=new E(this.ctx),s=i.realIndex,n=i.pointsPos,o=i.zRatio,l=i.elParent,c=r.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(c.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(n.x))for(var d=0;dm.maxBubbleRadius&&(b=m.maxBubbleRadius)}a.config.chart.animations.enabled||(f=b);var A=n.y[d];if(f=f||0,null!==A&&void 0!==a.globals.series[s][g]||(p=!1),p){var h=this.drawPoint(n.x[d],A,f,b,s,g,t);c.add(h)}l.add(c)}}},{key:"drawPoint",value:function(e,t,i,a,r,s,n){var o=this.w,l=r,c=new ye(this.ctx),d=new oe(this.ctx),g=new ue(this.ctx),p=new Me(this.ctx),f=new E(this.ctx),b=p.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:s,finishRadius:"bubble"===o.config.chart.type||o.globals.comboCharts&&o.config.series[r]&&"bubble"===o.config.series[r].type?a:null});a=b.pSize;var m,v=g.fillPath({seriesNumber:r,dataPointIndex:s,color:b.pointFillColor,patternUnits:"objectBoundingBox",value:o.globals.series[r][n]});if("circle"===b.shape?m=f.drawCircle(i):"square"!==b.shape&&"rect"!==b.shape||(m=f.drawRect(0,0,b.width-b.pointStrokeWidth/2,b.height-b.pointStrokeWidth/2,b.pRadius)),o.config.series[l].data[s]&&o.config.series[l].data[s].fillColor&&(v=o.config.series[l].data[s].fillColor),m.attr({x:e-b.width/2-b.pointStrokeWidth/2,y:t-b.height/2-b.pointStrokeWidth/2,cx:e,cy:t,fill:v,"fill-opacity":b.pointFillOpacity,stroke:b.pointStrokeColor,r:a,"stroke-width":b.pointStrokeWidth,"stroke-dasharray":b.pointStrokeDashArray,"stroke-opacity":b.pointStrokeOpacity}),o.config.chart.dropShadow.enabled&&d.dropShadow(m,o.config.chart.dropShadow,r),!this.initialAnim||o.globals.dataChanged||o.globals.resized?o.globals.animationEnded=!0:c.animateMarker(m,0,"circle"===b.shape?a:{width:b.width,height:b.height},o.config.chart.animations.speed,o.globals.easing,function(){window.setTimeout(function(){c.animationCompleted(m)},100)}),o.globals.dataChanged&&"circle"===b.shape)if(this.dynamicAnim){var u,x,k,w,S=o.config.chart.animations.dynamicAnimation.speed;null!=(w=o.globals.previousPaths[r]&&o.globals.previousPaths[r][n])&&(u=w.x,x=w.y,k=void 0!==w.r?w.r:a);for(var L=0;Lo.globals.gridHeight+g&&(t=o.globals.gridHeight+g/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:e,y:t,width:d,height:g}),void 0!==o.globals.dataLabelsRects[a][o.globals.dataLabelsRects[a].length-2]){var b=o.globals.dataLabelsRects[a][void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0];(e>b.x+b.width||t>b.y+b.height||t+gt.globals.gridWidth+m.textRects.width+30)&&(o="");var v=t.globals.dataLabels.style.colors[s];(("bar"===t.config.chart.type||"rangeBar"===t.config.chart.type)&&t.config.plotOptions.bar.distributed||t.config.dataLabels.distributed)&&(v=t.globals.dataLabels.style.colors[n]),"function"==typeof v&&(v=v({series:t.globals.series,seriesIndex:s,dataPointIndex:n,w:t})),p&&(v=p);var A=g.offsetX,h=g.offsetY;if("bar"!==t.config.chart.type&&"rangeBar"!==t.config.chart.type||(A=0,h=0),m.drawnextLabel){var u=i.drawText({width:100,height:parseInt(g.style.fontSize,10),x:a+A,y:r+h,foreColor:v,textAnchor:l||g.textAnchor,text:o,fontSize:c||g.style.fontSize,fontFamily:g.style.fontFamily,fontWeight:g.style.fontWeight||"normal"});if(u.attr({class:"apexcharts-datalabel",cx:a,cy:r}),g.dropShadow.enabled){var x=g.dropShadow;new oe(this.ctx).dropShadow(u,x)}d.add(u),void 0===t.globals.lastDrawnDataLabelsIndexes[s]&&(t.globals.lastDrawnDataLabelsIndexes[s]=[]),t.globals.lastDrawnDataLabelsIndexes[s].push(n)}}}},{key:"addBackgroundToDataLabel",value:function(e,t){var i=this.w,a=i.config.dataLabels.background,r=a.padding,s=a.padding/2,n=t.width,o=t.height,l=new E(this.ctx).drawRect(t.x-r,t.y-s/2,n+2*r,o+s,a.borderRadius,"transparent"===i.config.chart.background?"#fff":i.config.chart.background,a.opacity,a.borderWidth,a.borderColor);return a.dropShadow.enabled&&new oe(this.ctx).dropShadow(l,a.dropShadow),l}},{key:"dataLabelsBackground",value:function(){var e=this.w;if("bubble"!==e.config.chart.type)for(var t=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,r=M.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):r=this.emptyCollapsedSeries(r),a.config.series=r,e&&(t&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(r,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(e){for(var t=this.w,i=0;i-1&&(e[i].data=[]);return e}},{key:"toggleSeriesOnHover",value:function(e,t){var i=this.w;t||(t=e.target);var a=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if("mousemove"===e.type){var r=parseInt(t.getAttribute("rel"),10)-1,s=null,n=null,o=null;i.globals.axisCharts||"radialBar"===i.config.chart.type?i.globals.axisCharts?(s=i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(r,"']")),n=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(r,"']")),o=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i.globals.seriesYAxisReverseMap[r],"']"))):s=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(r+1,"']")):s=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(r+1,"'] path"));for(var c=0;c=o.from&&c<=o.to&&r[l].classList.remove(i.legendInactiveClass)}}(a.config.plotOptions.heatmap.colorScale.ranges[n])}else"mouseout"===e.type&&s("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"asc",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.w,a=0;if(i.config.series.length>1)for(var r=i.config.series.map(function(n,o){return n.data&&n.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(o)&&(!i.globals.comboCharts||0===t.length||t.length&&t.indexOf(i.config.series[o].type)>-1)?o:-1}),s="asc"===e?0:r.length-1;"asc"===e?s=0;"asc"===e?s++:s--)if(-1!==r[s]){a=r[s];break}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map(function(e,t){return"bar"===e.type||"column"===e.type?t:-1}).filter(function(e){return-1!==e}):this.w.config.series.map(function(e,t){return t})}},{key:"getPreviousPaths",value:function(){var e=this.w;function t(s,n,o){for(var l=s[n].childNodes,c={type:o,paths:[],realIndex:s[n].getAttribute("data:realIndex")},d=0;d0)for(var a=function(s){for(var n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(s,"'] rect")),o=[],l=function(d){var g=function(f){return n[d].getAttribute(f)},p={x:parseFloat(g("x")),y:parseFloat(g("y")),width:parseFloat(g("width")),height:parseFloat(g("height"))};o.push({rect:p,color:n[d].getAttribute("color")})},c=0;c0)for(var a=0;a0?t:[]})}}]),y}(),et=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new te(this.ctx)}return D(y,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),t=new ge(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),void 0!==e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&null!==e[this.activeSeriesIndex].data[0]&&void 0!==e[this.activeSeriesIndex].data[0].x&&null!==e[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var e=this.w.config.series.slice(),t=new ge(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),void 0!==e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&null!=e[this.activeSeriesIndex].data[0]&&e[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(e,t){for(var i=this.w.config,a=this.w.globals,r="boxPlot"===i.chart.type||"boxPlot"===i.series[t].type,s=0;s=5?e[t].data[s][4]:e[t].data[s][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var n=new Date(e[t].data[s][0]);n=new Date(n).getTime(),this.twoDSeriesX.push(n)}else this.twoDSeriesX.push(e[t].data[s][0]);for(var o=0;o-1&&(s=this.activeSeriesIndex);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.ctx),o=r.labels.length>0?r.labels.slice():r.xaxis.categories.slice();if(s.isRangeBar="rangeBar"===r.chart.type&&s.isBarHorizontal,s.hasXaxisGroups="category"===r.xaxis.type&&r.xaxis.group.groups.length>0,s.hasXaxisGroups&&(s.groups=r.xaxis.group.groups),e.forEach(function(f,b){s.seriesNames.push(void 0!==f.name?f.name:"series-"+parseInt(b+1,10))}),s.hasSeriesGroups=null===(t=e[0])||void 0===t?void 0:t.group,s.hasSeriesGroups){var l=[],c=ne(new Set(e.map(function(f){return f.group})));e.forEach(function(f,b){var m=c.indexOf(f.group);l[m]||(l[m]=[]),l[m].push(s.seriesNames[b])}),s.seriesGroups=l}for(var d=function(){for(var f=0;f0&&(this.twoDSeriesX=o,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var p=e[g].data.map(function(f){return M.parseNumber(f)});s.series.push(p)}s.seriesZ.push(this.threeDSeries),s.seriesColors.push(void 0!==e[g].color?e[g].color:void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(e){var t=this.w.globals,i=this.w.config;t.series=e.slice(),t.seriesNames=i.labels.slice();for(var a=0;a0?i.labels=t.xaxis.categories:t.labels.length>0?i.labels=t.labels.slice():this.fallbackToCategory?(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map(function(a){a.forEach(function(r){i.labels.indexOf(r.x)<0&&r.x&&i.labels.push(r.x)})}),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),t.xaxis.convertedCatToNumeric&&(new Le(t).convertCatToNumericXaxis(t,this.ctx,i.seriesX[0]),this._generateExternalLabels(e))):this._generateExternalLabels(e)}},{key:"_generateExternalLabels",value:function(e){var t=this.w.globals,i=this.w.config,a=[];if(t.axisCharts){if(t.series.length>0)if(this.isFormatXY())for(var r=i.series.map(function(d,g){return d.data.filter(function(p,f,b){return b.findIndex(function(m){return m.x===p.x})===f})}),s=r.reduce(function(d,g,p,f){return f[d].length>g.length?d:p},0),n=0;n0&&r==i.length&&t.push(a)}),e.globals.ignoreYAxisIndexes=t.map(function(i){return i})}}]),y}(),Ee=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"scaleSvgNode",value:function(e,t){var i=parseFloat(e.getAttributeNS(null,"width")),a=parseFloat(e.getAttributeNS(null,"height"));e.setAttributeNS(null,"width",i*t),e.setAttributeNS(null,"height",a*t),e.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"fixSvgStringForIe11",value:function(e){if(!M.isIE11())return e.replace(/ /g," ");var t=0,i=e.replace(/xmlns="http:\/\/www.w3.org\/2000\/svg"/g,function(a){return 2==++t?'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev"':a});return(i=i.replace(/xmlns:NS\d+=""/g,"")).replace(/NS\d+:(\w+:\w+=")/g,"$1")}},{key:"getSvgString",value:function(e){null==e&&(e=1);var t=this.w.globals.dom.Paper.svg();if(1!==e){var i=this.w.globals.dom.Paper.node.cloneNode(!0);this.scaleSvgNode(i,e),t=(new XMLSerializer).serializeToString(i)}return this.fixSvgStringForIe11(t)}},{key:"cleanup",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=e.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,function(r){r.setAttribute("width",0)}),t&&t[0]&&(t[0].setAttribute("x",-500),t[0].setAttribute("x1",-500),t[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){this.cleanup();var e=this.getSvgString(),t=new Blob([e],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(t)}},{key:"dataURI",value:function(e){var t=this;return new Promise(function(i){var a=t.w,r=e?e.scale||e.width/a.globals.svgWidth:1;t.cleanup();var s=document.createElement("canvas");s.width=a.globals.svgWidth*r,s.height=parseInt(a.globals.dom.elWrap.style.height,10)*r;var n="transparent"===a.config.chart.background?"#fff":a.config.chart.background,o=s.getContext("2d");o.fillStyle=n,o.fillRect(0,0,s.width*r,s.height*r);var l=t.getSvgString(r);if(window.canvg&&M.isIE11()){var c=window.canvg.Canvg.fromString(o,l,{ignoreClear:!0,ignoreDimensions:!0});c.start();var d=s.msToBlob();c.stop(),i({blob:d})}else{var g="data:image/svg+xml,"+encodeURIComponent(l),p=new Image;p.crossOrigin="anonymous",p.onload=function(){if(o.drawImage(p,0,0),s.msToBlob){var f=s.msToBlob();i({blob:f})}else{var b=s.toDataURL("image/png");i({imgURI:b})}},p.src=g}})}},{key:"exportToSVG",value:function(){this.triggerDownload(this.svgUrl(),this.w.config.chart.toolbar.export.svg.filename,".svg")}},{key:"exportToPng",value:function(){var e=this;this.dataURI().then(function(t){var i=t.imgURI,a=t.blob;a?navigator.msSaveOrOpenBlob(a,e.w.globals.chartID+".png"):e.triggerDownload(i,e.w.config.chart.toolbar.export.png.filename,".png")})}},{key:"exportToCSV",value:function(e){var t=this,i=e.series,a=e.fileName,r=e.columnDelimiter,s=void 0===r?",":r,n=e.lineDelimiter,o=void 0===n?"\n":n,l=this.w;i||(i=l.config.series);var c,d,g=[],p=[],f="",b=l.globals.series.map(function(k,w){return-1===l.globals.collapsedSeriesIndices.indexOf(w)?k:[]}),m=function(k){return"datetime"===l.config.xaxis.type&&String(k).length>=10},v=Math.max.apply(Math,ne(i.map(function(k){return k.data?k.data.length:0}))),A=new et(this.ctx),h=new ee(this.ctx),u=function(k){var w="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var S=l.globals.yLabelFormatters[0],L=new ge(t.ctx).getActiveConfigSeriesIndex();w=S(l.globals.labels[k],{seriesIndex:L,dataPointIndex:k,w:l})}else w=h.getLabel(l.globals.labels,l.globals.timescaleLabels,0,k).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?w=l.config.xaxis.categories[k]:l.config.labels.length&&(w=l.config.labels[k]))}else w=l.config.labels[k];return Array.isArray(w)&&(w=w.join(" ")),M.isNumber(w)?w:w.split(s).join("")};g.push(l.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===l.config.chart.type?(g.push("minimum"),g.push("q1"),g.push("median"),g.push("q3"),g.push("maximum")):"candlestick"===l.config.chart.type?(g.push("open"),g.push("high"),g.push("low"),g.push("close")):"rangeBar"===l.config.chart.type?(g.push("minimum"),g.push("maximum")):i.map(function(k,w){var S=(k.name?k.name:"series-".concat(w))+"";l.globals.axisCharts&&g.push(S.split(s).join("")?S.split(s).join(""):"series-".concat(w))}),l.globals.axisCharts||(g.push(l.config.chart.toolbar.export.csv.headerValue),p.push(g.join(s))),l.globals.allSeriesHasEqualX||!l.globals.axisCharts||l.config.xaxis.categories.length||l.config.labels.length?i.map(function(k,w){l.globals.axisCharts?function(k,w){if(g.length&&0===w&&p.push(g.join(s)),k.data){k.data=k.data.length&&k.data||ne(Array(v)).map(function(){return""});for(var S=0;S0&&!i.globals.isBarHorizontal&&(this.xaxisLabels=i.globals.timescaleLabels.slice()),i.config.xaxis.overwriteCategories&&(this.xaxisLabels=i.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],this.offY="top"===i.config.xaxis.position?0:i.globals.gridHeight+1,this.offY=this.offY+i.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===i.config.chart.type&&i.config.plotOptions.bar.horizontal,this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.xaxisBorderWidth=i.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=i.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth=this.xaxisBorderWidth.indexOf("%")>-1?i.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=i.config.xaxis.axisBorder.height,this.yaxis=i.config.yaxis[0]}return D(y,[{key:"drawXaxis",value:function(){var e=this.w,t=new E(this.ctx),i=t.group({class:"apexcharts-xaxis",transform:"translate(".concat(e.config.xaxis.offsetX,", ").concat(e.config.xaxis.offsetY,")")}),a=t.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});i.add(a);for(var r=[],s=0;s6&&void 0!==arguments[6]?arguments[6]:{},c=[],d=[],g=this.w,p=l.xaxisFontSize||this.xaxisFontSize,f=l.xaxisFontFamily||this.xaxisFontFamily,b=l.xaxisForeColors||this.xaxisForeColors,m=l.fontWeight||g.config.xaxis.labels.style.fontWeight,v=l.cssClass||g.config.xaxis.labels.style.cssClass,A=g.globals.padHorizontal,h=a.length,u="category"===g.config.xaxis.type?g.globals.dataPoints:h;0===u&&h>u&&(u=h),r?(n=g.globals.gridWidth/Math.min(u>1?u-1:u,h-1),A=A+s(0,n)/2+g.config.xaxis.labels.offsetX):A=A+s(0,n=g.globals.gridWidth/u)+g.config.xaxis.labels.offsetX;for(var k=function(S){var L=A-s(S,n)/2+g.config.xaxis.labels.offsetX;0===S&&1===h&&n/2===A&&1===u&&(L=g.globals.gridWidth/2);var C=o.axesUtils.getLabel(a,g.globals.timescaleLabels,L,S,c,p,e),z=28;if(g.globals.rotateXLabels&&e&&(z=22),g.config.xaxis.title.text&&"top"===g.config.xaxis.position&&(z+=parseFloat(g.config.xaxis.title.style.fontSize)+2),e||(z=z+parseFloat(p)+(g.globals.xAxisLabelsHeight-g.globals.xAxisGroupLabelsHeight)+(g.globals.rotateXLabels?10:0)),C=void 0!==g.config.xaxis.tickAmount&&"dataPoints"!==g.config.xaxis.tickAmount&&"datetime"!==g.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(S,C,h):o.axesUtils.checkForOverflowingLabels(S,C,h,c,d),g.config.xaxis.labels.show){var T=t.drawText({x:C.x,y:o.offY+g.config.xaxis.labels.offsetY+z-("top"===g.config.xaxis.position?g.globals.xAxisHeight+g.config.xaxis.axisTicks.height-2:0),text:C.text,textAnchor:"middle",fontWeight:C.isBold?600:m,fontSize:p,fontFamily:f,foreColor:Array.isArray(b)?e&&g.config.xaxis.convertedCatToNumeric?b[g.globals.minX+S-1]:b[S]:b,isPlainText:!1,cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+v});if(i.add(T),T.on("click",function(Y){if("function"==typeof g.config.chart.events.xAxisLabelClick){var H=Object.assign({},g,{labelIndex:S});g.config.chart.events.xAxisLabelClick(Y,o.ctx,H)}}),e){var I=document.createElementNS(g.globals.SVGNS,"title");I.textContent=Array.isArray(C.text)?C.text.join(" "):C.text,T.node.appendChild(I),""!==C.text&&(c.push(C.text),d.push(C))}}Sa.globals.gridWidth)){var s=this.offY+a.config.xaxis.axisTicks.offsetY;if(t=t+s+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(t=s-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var n=new E(this.ctx).drawLine(e+a.config.xaxis.axisTicks.offsetX,s+a.config.xaxis.offsetY,r+a.config.xaxis.axisTicks.offsetX,t+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var e=this.w,t=[],i=this.xaxisLabels.length,a=e.globals.padHorizontal;if(e.globals.timescaleLabels.length>0)for(var r=0;r0){var c=r[r.length-1].getBBox(),d=r[0].getBBox();c.x<-20&&r[r.length-1].parentNode.removeChild(r[r.length-1]),d.x+d.width>e.globals.gridWidth&&!e.globals.isBarHorizontal&&r[0].parentNode.removeChild(r[0]);for(var g=0;g0&&(this.xaxisLabels=t.globals.timescaleLabels.slice())}return D(y,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.w,i=new E(this.ctx);null===e&&(e=i.group({class:"apexcharts-grid"}));var a=i.drawLine(t.globals.padHorizontal,1,t.globals.padHorizontal,t.globals.gridHeight,"transparent"),r=i.drawLine(t.globals.padHorizontal,t.globals.gridHeight,t.globals.gridWidth,t.globals.gridHeight,"transparent");return e.add(r),e.add(a),e}},{key:"drawGrid",value:function(){var e=null;return this.w.globals.axisCharts&&(e=this.renderGrid(),this.drawGridArea(e.el)),e}},{key:"createGridMask",value:function(){var e=this.w,t=e.globals,i=new E(this.ctx),a=Array.isArray(e.config.stroke.width)?0:e.config.stroke.width;if(Array.isArray(e.config.stroke.width)){var r=0;e.config.stroke.width.forEach(function(d){r=Math.max(r,d)}),a=r}t.dom.elGridRectMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(t.cuid)),t.dom.elGridRectMarkerMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(t.cuid)),t.dom.elForecastMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elForecastMask.setAttribute("id","forecastMask".concat(t.cuid)),t.dom.elNonForecastMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elNonForecastMask.setAttribute("id","nonForecastMask".concat(t.cuid));var s=e.config.chart.type,n=0,o=0;("bar"===s||"rangeBar"===s||"candlestick"===s||"boxPlot"===s||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&(o=e.config.grid.padding.right,t.barPadForNumericAxis>(n=e.config.grid.padding.left)&&(n=t.barPadForNumericAxis,o=t.barPadForNumericAxis)),t.dom.elGridRect=i.drawRect(-a/2-n-2,-a/2-2,t.gridWidth+a+o+n+4,t.gridHeight+a+4,0,"#fff");var l=e.globals.markers.largestSize+1;t.dom.elGridRectMarker=i.drawRect(2*-l,2*-l,t.gridWidth+4*l,t.gridHeight+4*l,0,"#fff"),t.dom.elGridRectMask.appendChild(t.dom.elGridRect.node),t.dom.elGridRectMarkerMask.appendChild(t.dom.elGridRectMarker.node);var c=t.dom.baseEl.querySelector("defs");c.appendChild(t.dom.elGridRectMask),c.appendChild(t.dom.elForecastMask),c.appendChild(t.dom.elNonForecastMask),c.appendChild(t.dom.elGridRectMarkerMask)}},{key:"_drawGridLines",value:function(e){var t=e.i,i=e.x1,n=e.xCount,l=this.w;if(!(0===t&&l.globals.skipFirstTimelinelabel||t===n-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:t,x1:i,y1:e.y1,x2:e.x2,y2:e.y2,xCount:n,parent:e.parent});var c=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var d=l.globals.groups;if(d){for(var g=0,p=0;g0&&"datetime"!==e.config.xaxis.type&&(r=t.yAxisScale[a].result.length-1)),this._drawXYLines({xCount:r,tickAmount:s})):this._drawInvertedXYLines({xCount:r=s,tickAmount:s=t.xTickAmount}),this.drawGridBands(r,s),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:t.gridWidth/r}}},{key:"drawGridBands",value:function(e,t){var i=this.w;if(void 0!==i.config.grid.row.colors&&i.config.grid.row.colors.length>0)for(var a=0,r=i.globals.gridHeight/t,s=i.globals.gridWidth,n=0,o=0;n=i.config.grid.row.colors.length&&(o=0),this._drawGridBandRect({c:o,x1:0,y1:a,x2:s,y2:r,type:"row"}),a+=i.globals.gridHeight/t;if(void 0!==i.config.grid.column.colors&&i.config.grid.column.colors.length>0)for(var l=i.globals.isBarHorizontal||"on"!==i.config.xaxis.tickPlacement||"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric?e:e-1,c=i.globals.padHorizontal,d=i.globals.padHorizontal+i.globals.gridWidth/l,g=i.globals.gridHeight,p=0,f=0;p=i.config.grid.column.colors.length&&(f=0),this._drawGridBandRect({c:f,x1:c,y1:0,x2:d,y2:g,type:"column"}),c+=i.globals.gridWidth/l}}]),y}(),it=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"niceScale",value:function(e,t){var i,a,r,s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=1e-11,l=this.w,c=l.globals;c.isBarHorizontal?(i=l.config.xaxis,a=Math.max((c.svgWidth-100)/25,2)):(i=l.config.yaxis[n],a=Math.max((c.svgHeight-100)/15,2)),r=null!=i.min,s=void 0!==i.max&&null!==i.min;var d=null!=i.stepSize,g=null!=i.tickAmount,p=g?i.tickAmount:i.forceNiceScale?c.niceScaleDefaultTicks[Math.min(Math.round(a/2),c.niceScaleDefaultTicks.length-1)]:10;if(c.isMultipleYAxis&&!g&&c.multiAxisTickAmount>0&&(p=c.multiAxisTickAmount,g=!0),p="dataPoints"===p?c.dataPoints-1:Math.abs(Math.round(p)),(e===Number.MIN_VALUE&&0===t||!M.isNumber(e)&&!M.isNumber(t)||e===Number.MIN_VALUE&&t===-Number.MAX_VALUE)&&(e=M.isNumber(i.min)?i.min:0,t=M.isNumber(i.max)?i.max:e+p,c.allSeriesCollapsed=!1),e>t){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var f=t;t=e,e=f}else e===t&&(e=0===e?0:e-1,t=0===t?2:t+1);var b=[];p<1&&(p=1);var m=p,v=Math.abs(t-e);i.forceNiceScale&&(!r&&e>0&&e/v<.15&&(e=0,r=!0),!s&&t<0&&-t/v<.15&&(t=0,s=!0),v=Math.abs(t-e));var A=v/m,h=A,u=Math.floor(Math.log10(h)),x=Math.pow(10,u),k=Math.ceil(h/x);if(A=h=(k=c.niceScaleAllowedMagMsd[0===c.yValueDecimal?0:1][k])*x,c.isBarHorizontal&&i.stepSize&&"datetime"!==i.type?(A=i.stepSize,d=!0):d&&(A=i.stepSize),d&&i.forceNiceScale){var w=Math.floor(Math.log10(A));A*=Math.pow(10,u-w)}if(r&&s){var S=v/m;if(g)if(d)if(0!=M.mod(v,A)){var L=M.getGCD(A,S);A=S/L<10?L:S}else 0==M.mod(A,S)?A=S:(S=A,g=!1);else A=S;else if(d)0==M.mod(v,A)?S=A:A=S;else if(0==M.mod(v,A))S=A;else{S=v/(m=Math.ceil(v/A));var C=M.getGCD(v,A);v/Ca&&(e=t-A*p,e+=A*Math.floor((z-e)/A))}else if(r)if(g)t=e+A*m;else{var T=t;t=A*Math.ceil(t/A),Math.abs(t-e)/M.getGCD(v,A)>a&&(t=e+A*p,t+=A*Math.ceil((T-t)/A))}}else if(g){var I=A/(t-e>t?1:2),Y=I*Math.floor(e/I);Math.abs(Y-e)<=I/2?t=(e=Y)+A*m:e=(t=I*Math.ceil(t/I))-A*m}else e=A*Math.floor(e/A),t=A*Math.ceil(t/A);v=Math.abs(t-e),A=M.getGCD(v,A),m=Math.round(v/A)}if(g||r||s||(m=Math.ceil((v-o)/(A+o)))>16&&M.getPrimeFactors(m).length<2&&m++,!g&&i.forceNiceScale&&0===c.yValueDecimal&&m>v&&(m=v,A=Math.round(v/m)),m>a&&(!g&&!d||i.forceNiceScale)){var H=M.getPrimeFactors(m),B=H.length-1,G=m;e:for(var W=0;Wbe);return{result:b,niceMin:b[0],niceMax:b[b.length-1]}}},{key:"linearScale",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,s=Math.abs(t-e);"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,s))&&(i=this.w.globals.dataPoints-1),r||(r=s/i),i===Number.MAX_VALUE&&(i=5,r=1);for(var n=[],o=e;i>=0;)n.push(o),o+=r,i-=1;return{result:n,niceMin:n[0],niceMax:n[n.length-1]}}},{key:"logarithmicScaleNice",value:function(e,t,i){t<=0&&(t=Math.max(e,i)),e<=0&&(e=Math.min(t,i));for(var a=[],r=Math.ceil(Math.log(t)/Math.log(i)+1),s=Math.floor(Math.log(e)/Math.log(i));s5?(a.allSeriesCollapsed=!1,a.yAxisScale[e]=s.forceNiceScale?this.logarithmicScaleNice(t,i,s.logBase):this.logarithmicScale(t,i,s.logBase)):i!==-Number.MAX_VALUE&&M.isNumber(i)&&t!==Number.MAX_VALUE&&M.isNumber(t)?(a.allSeriesCollapsed=!1,a.yAxisScale[e]=this.niceScale(t,i,e)):a.yAxisScale[e]=this.niceScale(Number.MIN_VALUE,0,e)}},{key:"setXScale",value:function(e,t){var i=this.w,a=i.globals,r=Math.abs(t-e);return a.xAxisScale=t!==-Number.MAX_VALUE&&M.isNumber(t)?this.linearScale(e,t,i.config.xaxis.tickAmount?i.config.xaxis.tickAmount:r<10&&r>1?r+1:10,0,i.config.xaxis.stepSize):this.linearScale(0,10,10),a.xAxisScale}},{key:"setSeriesYAxisMappings",value:function(){var e=this.w.globals,t=this.w.config,i=[],a=[],r=[],s=e.series.length>t.yaxis.length||t.yaxis.some(function(d){return Array.isArray(d.seriesName)});t.series.forEach(function(d,g){r.push(g),a.push(null)}),t.yaxis.forEach(function(d,g){i[g]=[]});var n=[];t.yaxis.forEach(function(d,g){var p=!1;if(d.seriesName){var f=[];Array.isArray(d.seriesName)?f=d.seriesName:f.push(d.seriesName),f.forEach(function(b){t.series.forEach(function(m,v){if(m.name===b){var A=v;g===v||s?!s||r.indexOf(v)>-1?i[g].push([g,v]):console.warn("Series '"+m.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[v].push([v,g]),A=g),p=!0,-1!==(A=r.indexOf(A))&&r.splice(A,1)}})})}p||n.push(g)}),i=i.map(function(d,g){var p=[];return d.forEach(function(f){a[f[1]]=f[0],p.push(f[1])}),p});for(var o=t.yaxis.length-1,l=0;l0?function(){var c,d,g=Number.MAX_VALUE,p=-Number.MAX_VALUE,f=g,b=p;if(t.chart.stacked)!function(){var A=i.seriesX[n[0]],h=[],u=[],x=[];l.forEach(function(){h.push(A.map(function(){return Number.MIN_VALUE})),u.push(A.map(function(){return Number.MIN_VALUE})),x.push(A.map(function(){return Number.MIN_VALUE}))});for(var k=function(S){!c&&t.series[n[S]].type&&(c=t.series[n[S]].type);var L=n[S];d=t.series[L].group?t.series[L].group:"axis-".concat(o),!(i.collapsedSeriesIndices.indexOf(L)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(L)<0)||(i.allSeriesCollapsed=!1,l.forEach(function(C,z){if(t.series[L].group===C)for(var T=0;T=0?u[z][T]+=I:x[z][T]+=I,h[z][T]+=I,f=Math.min(f,I),b=Math.max(b,I)}})),"bar"!==c&&"column"!==c||i.barGroups.push(d)},w=0;w1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=this.w.config,s=this.w.globals,n=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=e+1);var l=0,c=0,d=void 0;if(s.seriesX.length>=a){var g,p;l=0,c=(d=ne(new Set((g=[]).concat.apply(g,ne(s.seriesX.slice(e,a)))))).length-1;var f=null===(p=s.brushSource)||void 0===p?void 0:p.w.config.chart.brush;if(r.chart.zoom.enabled&&r.chart.zoom.autoScaleYaxis||null!=f&&f.enabled&&null!=f&&f.autoScaleYaxis){if(r.xaxis.min)for(l=0;ll&&d[c]>r.xaxis.max;c--);}}var b=s.series,m=b,v=b;"candlestick"===r.chart.type?(m=s.seriesCandleL,v=s.seriesCandleH):"boxPlot"===r.chart.type?(m=s.seriesCandleO,v=s.seriesCandleC):s.isRangeData&&(m=s.seriesRangeStart,v=s.seriesRangeEnd);for(var A=e;Am[A][u]&&m[A][u]<0&&(o=m[A][u])}else s.hasNullValues=!0}"bar"!==h&&"column"!==h||(o<0&&n<0&&(n=0,i=Math.max(i,0)),o===Number.MIN_VALUE&&(o=0,t=Math.min(t,0)))}return"rangeBar"===r.chart.type&&s.seriesRangeStart.length&&s.isBarHorizontal&&(o=t),"bar"===r.chart.type&&(o<0&&n<0&&(n=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:n,lowestY:t,highestY:i}}},{key:"setYRange",value:function(){var e=this.w.globals,t=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;var i,a=Number.MAX_VALUE;if(e.isMultipleYAxis){a=Number.MAX_VALUE;for(var r=0;re.dataPoints&&0!==e.dataPoints&&(a=e.dataPoints-1)):"dataPoints"===t.xaxis.tickAmount?(e.series.length>1&&(a=e.series[e.maxValsInArrayIndex].length-1),e.isXNumeric&&(a=e.maxX-e.minX-1)):a=t.xaxis.tickAmount,e.xTickAmount=a,void 0!==t.xaxis.max&&"number"==typeof t.xaxis.max&&(e.maxX=t.xaxis.max),void 0!==t.xaxis.min&&"number"==typeof t.xaxis.min&&(e.minX=t.xaxis.min),void 0!==t.xaxis.range&&(e.minX=e.maxX-t.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(t.xaxis.convertedCatToNumeric&&!e.dataFormatXNumeric){for(var r=[],s=e.minX-1;s0&&(e.xAxisScale=this.scales.linearScale(1,e.labels.length,a-1,0,t.xaxis.stepSize),e.seriesX=e.labels.slice());i&&(e.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&e.labels.length&&(e.xTickAmount=e.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}},{key:"setZRange",value:function(){var e=this.w.globals;if(e.isDataXYZ)for(var t=0;t0){var n=r-a[s-1];n>0&&(e.minXDiff=Math.min(n,e.minXDiff))}}),1!==e.dataPoints&&e.minXDiff!==Number.MAX_VALUE||(e.minXDiff=.5)})}},{key:"_setStackedMinMax",value:function(){var e=this,t=this.w.globals;if(t.series.length){var i=t.seriesGroups;i.length||(i=[this.w.globals.seriesNames.map(function(s){return s})]);var a={},r={};i.forEach(function(s){a[s]=[],r[s]=[],e.w.config.series.map(function(n,o){return s.indexOf(t.seriesNames[o])>-1?o:null}).filter(function(n){return null!==n}).forEach(function(n){for(var o=0;o0?a[s][o]+=parseFloat(t.series[n][o])+1e-4:r[s][o]+=parseFloat(t.series[n][o]))}})}),Object.entries(a).forEach(function(s){var n=Se(s,1)[0];a[n].forEach(function(o,l){t.maxY=Math.max(t.maxY,a[n][l]),t.minY=Math.min(t.minY,r[n][l])})})}}}]),y}(),Ge=function(){function y(e,t){F(this,y),this.ctx=e,this.elgrid=t,this.w=e.w;var i=this.w;this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.axisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===i.config.chart.type&&i.config.plotOptions.bar.horizontal,this.xAxisoffX=0,"bottom"===i.config.xaxis.position&&(this.xAxisoffX=i.globals.gridHeight),this.drawnLabels=[],this.axesUtils=new ee(e)}return D(y,[{key:"drawYaxis",value:function(e){var t=this,i=this.w,a=new E(this.ctx),r=i.config.yaxis[e].labels.style,s=r.fontSize,n=r.fontFamily,o=r.fontWeight,l=a.group({class:"apexcharts-yaxis",rel:e,transform:"translate("+i.globals.translateYAxisX[e]+", 0)"});if(this.axesUtils.isYAxisHidden(e))return l;var c=a.group({class:"apexcharts-yaxis-texts-g"});l.add(c);var d=i.globals.yAxisScale[e].result.length-1,g=i.globals.gridHeight/d,p=i.globals.translateY,f=i.globals.yLabelFormatters[e],b=i.globals.yAxisScale[e].result.slice();b=this.axesUtils.checkForReversedLabels(e,b);var m="";if(i.config.yaxis[e].labels.show)for(var v=function(L){var C=b[L];C=f(C,L,i);var z=i.config.yaxis[e].labels.padding;i.config.yaxis[e].opposite&&0!==i.config.yaxis.length&&(z*=-1);var T="end";i.config.yaxis[e].opposite&&(T="start"),"left"===i.config.yaxis[e].labels.align?T="start":"center"===i.config.yaxis[e].labels.align?T="middle":"right"===i.config.yaxis[e].labels.align&&(T="end");var I=t.axesUtils.getYAxisForeColor(r.colors,e),Y=i.config.yaxis[e].labels.offsetY;"heatmap"===i.config.chart.type&&(Y-=(i.globals.gridHeight/i.globals.series.length-1)/2);var H=a.drawText({x:z,y:p+d/10+Y+1,text:C,textAnchor:T,fontSize:s,fontFamily:n,fontWeight:o,maxWidth:i.config.yaxis[e].labels.maxWidth,foreColor:Array.isArray(I)?I[L]:I,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+r.cssClass});L===d&&(m=H),c.add(H);var B=document.createElementNS(i.globals.SVGNS,"title");if(B.textContent=Array.isArray(C)?C.join(" "):C,H.node.appendChild(B),0!==i.config.yaxis[e].labels.rotate){var G=a.rotateAroundCenter(m.node),W=a.rotateAroundCenter(H.node);H.node.setAttribute("transform","rotate(".concat(i.config.yaxis[e].labels.rotate," ").concat(G.x," ").concat(W.y,")"))}p+=g},A=d;A>=0;A--)v(A);if(void 0!==i.config.yaxis[e].title.text){var h=a.group({class:"apexcharts-yaxis-title"}),u=0;i.config.yaxis[e].opposite&&(u=i.globals.translateYAxisX[e]);var x=a.drawText({x:u,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[e].title.offsetY,text:i.config.yaxis[e].title.text,textAnchor:"end",foreColor:i.config.yaxis[e].title.style.color,fontSize:i.config.yaxis[e].title.style.fontSize,fontWeight:i.config.yaxis[e].title.style.fontWeight,fontFamily:i.config.yaxis[e].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+i.config.yaxis[e].title.style.cssClass});h.add(x),l.add(h)}var k=i.config.yaxis[e].axisBorder,w=31+k.offsetX;if(i.config.yaxis[e].opposite&&(w=-31-k.offsetX),k.show){var S=a.drawLine(w,i.globals.translateY+k.offsetY-2,w,i.globals.gridHeight+i.globals.translateY+k.offsetY+2,k.color,0,k.width);l.add(S)}return i.config.yaxis[e].axisTicks.show&&this.axesUtils.drawYAxisTicks(w,d,k,i.config.yaxis[e].axisTicks,e,g,l),l}},{key:"drawYaxisInversed",value:function(e){var t=this.w,i=new E(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),r=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});a.add(r);var s=t.globals.yAxisScale[e].result.length-1,n=t.globals.gridWidth/s+.1,o=n+t.config.xaxis.labels.offsetX,l=t.globals.xLabelFormatter,c=t.globals.yAxisScale[e].result.slice(),d=t.globals.timescaleLabels;d.length>0&&(this.xaxisLabels=d.slice(),s=(c=d.slice()).length),c=this.axesUtils.checkForReversedLabels(e,c);var g=d.length;if(t.config.xaxis.labels.show)for(var p=g?0:s;g?p=0;g?p++:p--){var f=c[p];f=l(f,p,t);var b=t.globals.gridWidth+t.globals.padHorizontal-(o-n+t.config.xaxis.labels.offsetX);if(d.length){var m=this.axesUtils.getLabel(c,d,b,p,this.drawnLabels,this.xaxisFontSize);b=m.x,f=m.text,this.drawnLabels.push(m.text),0===p&&t.globals.skipFirstTimelinelabel&&(f=""),p===c.length-1&&t.globals.skipLastTimelinelabel&&(f="")}var v=i.drawText({x:b,y:this.xAxisoffX+t.config.xaxis.labels.offsetY+30-("top"===t.config.xaxis.position?t.globals.xAxisHeight+t.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:t.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+t.config.xaxis.labels.style.cssClass});r.add(v),v.tspan(f);var A=document.createElementNS(t.globals.SVGNS,"title");A.textContent=f,v.node.appendChild(A),o+=n}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(e){var t=this.w,i=new E(this.ctx),a=t.config.xaxis.axisBorder;if(a.show){var r=0;"bar"===t.config.chart.type&&t.globals.isXNumeric&&(r-=15);var s=i.drawLine(t.globals.padHorizontal+r+a.offsetX,this.xAxisoffX,t.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(s):e.add(s)}}},{key:"inversedYAxisTitleText",value:function(e){var t=this.w,i=new E(this.ctx);if(void 0!==t.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),r=i.drawText({x:t.globals.gridWidth/2+t.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(t.config.xaxis.title.style.fontSize)+t.config.xaxis.title.offsetY+20,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});a.add(r),e.add(a)}}},{key:"yAxisTitleRotate",value:function(e,t){var i=this.w,a=new E(this.ctx),r={width:0,height:0},s={width:0,height:0},n=i.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-texts-g"));null!==n&&(r=n.getBoundingClientRect());var o=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-title text"));if(null!==o&&(s=o.getBoundingClientRect()),null!==o){var l=this.xPaddingForYAxisTitle(e,r,s,t);o.setAttribute("x",l.xPos-(t?10:0))}if(null!==o){var c=a.rotateAroundCenter(o);o.setAttribute("transform","rotate(".concat(t?-1*i.config.yaxis[e].title.rotate:i.config.yaxis[e].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(e,t,i,a){var r=this.w,s=0,n=0,o=10;return void 0===r.config.yaxis[e].title.text||e<0?{xPos:n,padd:0}:(a?(n=t.width+r.config.yaxis[e].title.offsetX+i.width/2+o/2,0===(s+=1)&&(n-=o/2)):(n=-1*t.width+r.config.yaxis[e].title.offsetX+o/2+i.width/2,r.globals.isBarHorizontal&&(n=-1*t.width-r.config.yaxis[e].title.offsetX-(o=25))),{xPos:n,padd:o})}},{key:"setYAxisXPosition",value:function(e,t){var i=this.w,a=0,r=0,s=18,n=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.map(function(o,l){var c=i.globals.ignoreYAxisIndexes.indexOf(l)>-1||!o.show||o.floating||0===e[l].width,d=e[l].width+t[l].width;o.opposite?i.globals.isBarHorizontal?i.globals.translateYAxisX[l]=(r=i.globals.gridWidth+i.globals.translateX-1)-o.labels.offsetX:(r=i.globals.gridWidth+i.globals.translateX+n,c||(n=n+d+20),i.globals.translateYAxisX[l]=r-o.labels.offsetX+20):(a=i.globals.translateX-s,c||(s=s+d+20),i.globals.translateYAxisX[l]=a+o.labels.offsetX)})}},{key:"setYAxisTextAlignments",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis");(t=M.listToArray(t)).forEach(function(i,a){var r=e.config.yaxis[a];if(r&&!r.floating&&void 0!==r.labels.align){var s=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(a,"'] .apexcharts-yaxis-texts-g")),n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(a,"'] .apexcharts-yaxis-label"));n=M.listToArray(n);var o=s.getBoundingClientRect();"left"===r.labels.align?(n.forEach(function(l,c){l.setAttribute("text-anchor","start")}),r.opposite||s.setAttribute("transform","translate(-".concat(o.width,", 0)"))):"center"===r.labels.align?(n.forEach(function(l,c){l.setAttribute("text-anchor","middle")}),s.setAttribute("transform","translate(".concat(o.width/2*(r.opposite?1:-1),", 0)"))):"right"===r.labels.align&&(n.forEach(function(l,c){l.setAttribute("text-anchor","end")}),r.opposite&&s.setAttribute("transform","translate(".concat(o.width,", 0)")))}})}}]),y}(),nt=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.documentEvent=M.bind(this.documentEvent,this)}return D(y,[{key:"addEventListener",value:function(e,t){var i=this.w;i.globals.events.hasOwnProperty(e)?i.globals.events[e].push(t):i.globals.events[e]=[t]}},{key:"removeEventListener",value:function(e,t){var i=this.w;if(i.globals.events.hasOwnProperty(e)){var a=i.globals.events[e].indexOf(t);-1!==a&&i.globals.events[e].splice(a,1)}}},{key:"fireEvent",value:function(e,t){var i=this.w;if(i.globals.events.hasOwnProperty(e)){t&&t.length||(t=[]);for(var a=i.globals.events[e],r=a.length,s=0;s0&&(t=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=t.filter(function(r){return r.name===e})[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=M.extend(ze,i);this.w.globals.locale=a.options}}]),y}(),lt=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"drawAxis",value:function(e,t){var i,a,r=this,s=this.w.globals,n=this.w.config,o=new Te(this.ctx,t),l=new Ge(this.ctx,t);s.axisCharts&&"radar"!==e&&(s.isBarHorizontal?(a=l.drawYaxisInversed(0),i=o.drawXaxisInversed(0),s.dom.elGraphical.add(i),s.dom.elGraphical.add(a)):(i=o.drawXaxis(),s.dom.elGraphical.add(i),n.yaxis.map(function(c,d){if(-1===s.ignoreYAxisIndexes.indexOf(d)&&(a=l.drawYaxis(d),s.dom.Paper.add(a),"back"===r.w.config.grid.position)){var g=s.dom.Paper.children()[1];g.remove(),s.dom.Paper.add(g)}})))}}]),y}(),Ve=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"drawXCrosshairs",value:function(){var e=this.w,t=new E(this.ctx),i=new oe(this.ctx),a=e.config.xaxis.crosshairs.fill.gradient,r=e.config.xaxis.crosshairs.dropShadow,g=r.enabled,p=r.left,f=r.top,b=r.blur,m=r.color,v=r.opacity,A=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){"gradient"===e.config.xaxis.crosshairs.fill.type&&(A=t.drawGradient("vertical",a.colorFrom,a.colorTo,a.opacityFrom,a.opacityTo,null,a.stops,null));var h=t.drawRect();1===e.config.xaxis.crosshairs.width&&(h=t.drawLine());var u=e.globals.gridHeight;(!M.isNumber(u)||u<0)&&(u=0);var x=e.config.xaxis.crosshairs.width;(!M.isNumber(x)||x<0)&&(x=0),h.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:u,width:x,height:u,fill:A,filter:"none","fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),g&&(h=i.dropShadow(h,{left:p,top:f,blur:b,color:m,opacity:v})),e.globals.dom.elGraphical.add(h)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,t=new E(this.ctx),i=e.config.yaxis[0].crosshairs,a=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){var r=t.drawLine(-a,0,e.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);r.attr({class:"apexcharts-ycrosshairs"}),e.globals.dom.elGraphical.add(r)}var s=t.drawLine(-a,0,e.globals.gridWidth+a,0,i.stroke.color,0,0);s.attr({class:"apexcharts-ycrosshairs-hidden"}),e.globals.dom.elGraphical.add(s)}}]),y}(),ht=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"checkResponsiveConfig",value:function(e){var t=this,i=this.w,a=i.config;if(0!==a.responsive.length){var r=a.responsive.slice();r.sort(function(l,c){return l.breakpoint>c.breakpoint?1:c.breakpoint>l.breakpoint?-1:0}).reverse();var s=new Pe({}),n=function(){var l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=window.innerWidth>0?window.innerWidth:screen.width;if(d>r[0].breakpoint){var g=te.extendArrayProps(s,i.globals.initialConfig,i);l=M.extend(g,l),l=M.extend(i.config,l),t.overrideResponsiveOptions(l)}else for(var p=0;p0&&"function"==typeof i.config.colors[0]&&(i.globals.colors=i.config.series.map(function(f,b){var m=i.config.colors[b];return m||(m=i.config.colors[0]),"function"==typeof m?(t.isColorFn=!0,m({value:i.globals.axisCharts?i.globals.series[b][0]?i.globals.series[b][0]:0:i.globals.series[b],seriesIndex:b,dataPointIndex:b,w:i})):m}))),i.globals.seriesColors.map(function(f,b){f&&(i.globals.colors[b]=f)}),i.config.theme.monochrome.enabled){var r=[],s=i.globals.series.length;(this.isBarDistributed||this.isHeatmapDistributed)&&(s=i.globals.series[0].length*i.globals.series.length);for(var n=i.config.theme.monochrome.color,o=1/(s/i.config.theme.monochrome.shadeIntensity),l=i.config.theme.monochrome.shadeTo,c=0,d=0;d2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,r=t||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(r=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),e.lengthe.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getLargestStringFromMultiArr",value:function(e,t){var i=e;if(this.w.globals.isMultiLineX){var a=t.map(function(s,n){return Array.isArray(s)?s.length:1}),r=Math.max.apply(Math,ne(a));i=t[a.indexOf(r)]}return i}}]),y}(),ut=function(){function y(e){F(this,y),this.w=e.w,this.dCtx=e}return D(y,[{key:"getxAxisLabelsCoords",value:function(){var e,t=this.w,i=t.globals.labels.slice();if(t.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=t.globals.categoryLabels),t.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();e={width:a.width,height:a.height},t.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==t.config.legend.position&&"right"!==t.config.legend.position||t.config.legend.floating?0:this.dCtx.lgRect.width;var r=t.globals.xLabelFormatter,s=M.getLargestStringFromArr(i),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(s,i);t.globals.isBarHorizontal&&(n=s=t.globals.yAxisScale[0].result.reduce(function(f,b){return f.length>b.length?f:b},0));var o=new Ce(this.dCtx.ctx),l=s;s=o.xLabelFormat(r,s,l,{i:void 0,dateFormatter:new se(this.dCtx.ctx).formatDate,w:t}),n=o.xLabelFormat(r,n,l,{i:void 0,dateFormatter:new se(this.dCtx.ctx).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&void 0===s||""===String(s).trim())&&(n=s="1");var c=new E(this.dCtx.ctx),d=c.getTextRects(s,t.config.xaxis.labels.style.fontSize),g=d;if(s!==n&&(g=c.getTextRects(n,t.config.xaxis.labels.style.fontSize)),(e={width:d.width>=g.width?d.width:g.width,height:d.height>=g.height?d.height:g.height}).width*i.length>t.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==t.config.xaxis.labels.rotate||t.config.xaxis.labels.rotateAlways){if(!t.globals.isBarHorizontal){t.globals.rotateXLabels=!0;var p=function(f){return c.getTextRects(f,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,"rotate(".concat(t.config.xaxis.labels.rotate," 0 0)"),!1)};d=p(s),s!==n&&(g=p(n)),e.height=(d.height>g.height?d.height:g.height)/1.5,e.width=d.width>g.width?d.width:g.width}}else t.globals.rotateXLabels=!1}return t.config.xaxis.labels.show||(e={width:0,height:0}),{width:e.width,height:e.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var e,t=this.w;if(!t.globals.hasXaxisGroups)return{width:0,height:0};var i,a=(null===(e=t.config.xaxis.group.style)||void 0===e?void 0:e.fontSize)||t.config.xaxis.labels.style.fontSize,r=t.globals.groups.map(function(d){return d.title}),s=M.getLargestStringFromArr(r),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(s,r),o=new E(this.dCtx.ctx),l=o.getTextRects(s,a),c=l;return s!==n&&(c=o.getTextRects(n,a)),i={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},t.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var e=this.w,t=0,i=0;if(void 0!==e.config.xaxis.title.text){var a=new E(this.dCtx.ctx).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);t=a.width,i=a.height}return{width:t,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var e,t=this.w;this.dCtx.timescaleLabels=t.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map(function(r){return r.value}),a=i.reduce(function(r,s){return void 0===r?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):r.length>s.length?r:s},0);return 1.05*(e=new E(this.dCtx.ctx).getTextRects(a,t.config.xaxis.labels.style.fontSize)).width*i.length>t.globals.gridWidth&&0!==t.config.xaxis.labels.rotate&&(t.globals.overlappingXLabels=!0),e}},{key:"additionalPaddingXLabels",value:function(e){var t=this,i=this.w,a=i.globals,r=i.config,s=r.xaxis.type,n=e.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal;r.yaxis.forEach(function(c,d){o?(t.dCtx.gridPad.left1&&-1!==a.collapsedSeriesIndices.indexOf(d)||function(g){if(t.dCtx.timescaleLabels&&t.dCtx.timescaleLabels.length){var b=t.dCtx.timescaleLabels[0].position-n/1.75+t.dCtx.yAxisWidthLeft;t.dCtx.timescaleLabels[t.dCtx.timescaleLabels.length-1].position+n/1.75-t.dCtx.yAxisWidthRight>a.svgWidth-a.translateX-("right"===i.config.legend.position&&t.dCtx.lgRect.width>0?t.dCtx.lgRect.width:0)&&(a.skipLastTimelinelabel=!0),b<-(g.show&&!g.floating||"bar"!==r.chart.type&&"candlestick"!==r.chart.type&&"rangeBar"!==r.chart.type&&"boxPlot"!==r.chart.type?10:n/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===s?t.dCtx.gridPad.right(null===(w=String(d(x,o)))||void 0===w?void 0:w.length)?u:x},l.niceMin===Number.MIN_VALUE?0:l.niceMin),f=p=d(p,o);if(void 0!==p&&0!==p.length||(p=l.niceMax),t.globals.isBarHorizontal){a=0;var b=t.globals.labels.slice();p=M.getLargestStringFromArr(b),p=d(p,{seriesIndex:n,dataPointIndex:-1,w:t}),f=e.dCtx.dimHelpers.getLargestStringFromMultiArr(p,b)}var m=new E(e.dCtx.ctx),v="rotate(".concat(s.labels.rotate," 0 0)"),A=m.getTextRects(p,s.labels.style.fontSize,s.labels.style.fontFamily,v,!1),h=A;p!==f&&(h=m.getTextRects(f,s.labels.style.fontSize,s.labels.style.fontFamily,v,!1)),i.push({width:(c>h.width||c>A.width?c:h.width>A.width?h.width:A.width)+a,height:h.height>A.height?h.height:A.height})}else i.push({width:0,height:0})}),i}},{key:"getyAxisTitleCoords",value:function(){var e=this,i=[];return this.w.config.yaxis.map(function(a,r){if(a.show&&void 0!==a.title.text){var s=new E(e.dCtx.ctx),n="rotate(".concat(a.title.rotate," 0 0)"),o=s.getTextRects(a.title.text,a.title.style.fontSize,a.title.style.fontFamily,n,!1);i.push({width:o.width,height:o.height})}else i.push({width:0,height:0})}),i}},{key:"getTotalYAxisWidth",value:function(){var e=this.w,t=0,i=0,a=0,r=e.globals.yAxisScale.length>1?10:0,s=new ee(this.dCtx.ctx),n=function(o,l){var c=e.config.yaxis[l].floating,d=0;o.width>0&&!c?(d=o.width+r,e.globals.ignoreYAxisIndexes.indexOf(l)>-1&&(d=d-o.width-r)):d=c||s.isYAxisHidden(l)?0:5,e.config.yaxis[l].opposite?a+=d:i+=d,t+=d};return e.globals.yLabelsCoords.map(function(o,l){n(o,l)}),e.globals.yTitleCoords.map(function(o,l){n(o,l)}),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(t=e.globals.yLabelsCoords[0].width+e.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,t}}]),y}(),pt=function(){function y(e){F(this,y),this.w=e.w,this.dCtx=e}return D(y,[{key:"gridPadForColumnsInNumericAxis",value:function(e){var t=this.w,i=t.config,a=t.globals;if(a.noData||a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.series.length)return 0;var r=function(g){return"bar"===g||"rangeBar"===g||"candlestick"===g||"boxPlot"===g},s=i.chart.type,n=0,o=r(s)?i.series.length:1;if(a.comboBarCount>0&&(o=a.comboBarCount),a.collapsedSeries.forEach(function(g){r(g.type)&&(o-=1)}),i.chart.stacked&&(o=1),(r(s)||a.comboBarCount>0)&&a.isXNumeric&&!a.isBarHorizontal&&o>0){var l,c,d=Math.abs(a.initialMaxX-a.initialMinX);d<=3&&(d=a.dataPoints),l=d/e,a.minXDiff&&a.minXDiff/l>0&&(c=a.minXDiff/l),c>e/2&&(c/=2),(n=c*parseInt(i.plotOptions.bar.columnWidth,10)/100)<1&&(n=1),a.barPadForNumericAxis=n}return n}},{key:"gridPadFortitleSubtitle",value:function(){var e=this,t=this.w,i=t.globals,a=this.dCtx.isSparkline||!t.globals.axisCharts?0:10;["title","subtitle"].forEach(function(n){a+=void 0!==t.config[n].text?t.config[n].margin:e.dCtx.isSparkline||!t.globals.axisCharts?0:5}),!t.config.legend.show||"bottom"!==t.config.legend.position||t.config.legend.floating||t.globals.axisCharts||(a+=10);var r=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),s=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight=i.gridHeight-r.height-s.height-a,i.translateY=i.translateY+r.height+s.height+a}},{key:"setGridXPosForDualYAxis",value:function(e,t){var i=this.w,a=new ee(this.dCtx.ctx);i.config.yaxis.map(function(r,s){-1!==i.globals.ignoreYAxisIndexes.indexOf(s)||r.floating||a.isYAxisHidden(s)||(r.opposite&&(i.globals.translateX=i.globals.translateX-(t[s].width+e[s].width)-parseInt(i.config.yaxis[s].labels.style.fontSize,10)/1.2-12),i.globals.translateX<2&&(i.globals.translateX=2))})}}]),y}(),Ye=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new gt(this),this.dimYAxis=new yt(this),this.dimXAxis=new ut(this),this.dimGrid=new pt(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return D(y,[{key:"plotCoords",value:function(){var e=this,t=this.w,i=t.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.isSparkline&&((t.config.markers.discrete.length>0||t.config.markers.size>0)&&Object.entries(this.gridPad).forEach(function(r){var s=Se(r,2);e.gridPad[s[0]]=Math.max(s[1],e.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(t.config.stroke.width/2,this.gridPad.top),this.gridPad.bottom=Math.max(t.config.stroke.width/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var a=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*a,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(a>0?a+4:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var e=this,t=this.w,i=t.globals,a=this.dimYAxis.getyAxisLabelsCoords(),r=this.dimYAxis.getyAxisTitleCoords();t.globals.yLabelsCoords=[],t.globals.yTitleCoords=[],t.config.yaxis.map(function(p,f){t.globals.yLabelsCoords.push({width:a[f].width,index:f}),t.globals.yTitleCoords.push({width:r[f].width,index:f})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var s=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(s,o,n),i.translateXAxisY=t.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=t.globals.rotateXLabels&&t.globals.isXNumeric&&t.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,t.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(t.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+t.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+t.config.xaxis.labels.offsetX;var l=this.yAxisWidth,c=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-s.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var d=10;("radar"===t.config.chart.type||this.isSparkline)&&(l=0,c=i.goldenPadding),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===t.config.chart.type)&&(l=0,c=0,d=0),this.isSparkline||this.dimXAxis.additionalPaddingXLabels(s);var g=function(){i.translateX=l,i.gridHeight=i.svgHeight-e.lgRect.height-c-(e.isSparkline||"treemap"===t.config.chart.type?0:t.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l};switch("top"===t.config.xaxis.position&&(d=i.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":i.translateY=d,g();break;case"top":i.translateY=this.lgRect.height+d,g();break;case"left":i.translateY=d,i.translateX=this.lgRect.width+l,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-l;break;case"right":i.translateY=d,i.translateX=l,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(r,a),new Ge(this.ctx).setYAxisXPosition(a,r)}},{key:"setDimensionsForNonAxisCharts",value:function(){var e=this.w,t=e.globals,i=e.config,a=0;e.config.legend.show&&!e.config.legend.floating&&(a=20);var r="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",s=i.plotOptions[r].offsetY,n=i.plotOptions[r].offsetX;if(!i.legend.show||i.legend.floating)return t.gridHeight=t.svgHeight-i.grid.padding.left+i.grid.padding.right,t.gridWidth=t.gridHeight,t.translateY=s,void(t.translateX=n+(t.svgWidth-t.gridWidth)/2);switch(i.legend.position){case"bottom":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=s-10,t.translateX=n+(t.svgWidth-t.gridWidth)/2;break;case"top":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=this.lgRect.height+s+10,t.translateX=n+(t.svgWidth-t.gridWidth)/2;break;case"left":t.gridWidth=t.svgWidth-this.lgRect.width-a,t.gridHeight="auto"!==i.chart.height?t.svgHeight:t.gridWidth,t.translateY=s,t.translateX=n+this.lgRect.width+a;break;case"right":t.gridWidth=t.svgWidth-this.lgRect.width-a-5,t.gridHeight="auto"!==i.chart.height?t.svgHeight:t.gridWidth,t.translateY=s,t.translateX=n+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(e,t,i){var a=this.w;this.xAxisHeight=(i.height+e.height+t.height)*(a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO)+(a.globals.hasXaxisGroups?2:1)*(a.globals.rotateXLabels?22:10)+(a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0),this.xAxisWidth=e.width,this.xAxisHeight-t.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeightd&&(this.yAxisWidth=d)}}]),y}(),R=function(){function y(e){F(this,y),this.w=e.w,this.lgCtx=e}return D(y,[{key:"getLegendStyles",value:function(){var e,t,i,a=document.createElement("style");a.setAttribute("type","text/css");var r=(null===(e=this.lgCtx.ctx)||void 0===e||null===(t=e.opts)||void 0===t||null===(i=t.chart)||void 0===i?void 0:i.nonce)||this.w.config.chart.nonce;r&&a.setAttribute("nonce",r);var s=document.createTextNode("\n .apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n }\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n }\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n }\n .apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n }\n .apexcharts-legend.apx-legend-position-bottom .apexcharts-legend-series, .apexcharts-legend.apx-legend-position-top .apexcharts-legend-series{\n display: flex;\n align-items: center;\n }\n .apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n }\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n }\n .apexcharts-legend-marker {\n position: relative;\n display: inline-block;\n cursor: pointer;\n margin-right: 3px;\n border-style: solid;\n }\n\n .apexcharts-legend.apexcharts-align-right .apexcharts-legend-series, .apexcharts-legend.apexcharts-align-left .apexcharts-legend-series{\n display: inline-block;\n }\n .apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n }\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n }\n .apexcharts-inactive-legend {\n opacity: 0.45;\n }");return a.appendChild(s),a}},{key:"getLegendBBox",value:function(){var e=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect();return{clwh:e.height,clww:e.width}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(e,t){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var r=null,s=null;a.globals.risingSeries=[],a.globals.axisCharts?(r=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"']")),s=parseInt(r.getAttribute("data:realIndex"),10)):(r=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e+1,"']")),s=parseInt(r.getAttribute("rel"),10)-1),t?[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach(function(c){i.riseCollapsedSeries(c.cs,c.csi,s)}):this.hideSeries({seriesEl:r,realIndex:s})}else{var n=a.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(e+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var l=a.config.plotOptions.pie.donut.labels;new E(this.lgCtx.ctx).pathMouseDown(n.members[0],null),this.lgCtx.ctx.pie.printDataLabelsInner(n.members[0].node,l)}n.fire("click")}}},{key:"hideSeries",value:function(e){var t=e.seriesEl,i=e.realIndex,a=this.w,r=a.globals,s=M.clone(a.config.series);if(r.axisCharts){var n=a.config.yaxis[r.seriesYAxisReverseMap[i]];if(n&&n.show&&n.showAlways)r.ancillaryCollapsedSeriesIndices.indexOf(i)<0&&(r.ancillaryCollapsedSeries.push({index:i,data:s[i].data.slice(),type:t.parentNode.className.baseVal.split("-")[1]}),r.ancillaryCollapsedSeriesIndices.push(i));else if(r.collapsedSeriesIndices.indexOf(i)<0){r.collapsedSeries.push({index:i,data:s[i].data.slice(),type:t.parentNode.className.baseVal.split("-")[1]}),r.collapsedSeriesIndices.push(i);var o=r.risingSeries.indexOf(i);r.risingSeries.splice(o,1)}}else r.collapsedSeries.push({index:i,data:s[i]}),r.collapsedSeriesIndices.push(i);for(var l=t.childNodes,c=0;c0){for(var s=0;s1||!t.axisCharts)&&i.legend.show){for(;t.dom.elLegendWrap.firstChild;)t.dom.elLegendWrap.removeChild(t.dom.elLegendWrap.firstChild);this.drawLegends(),M.isIE11()?document.getElementsByTagName("head")[0].appendChild(this.legendHelpers.getLegendStyles()):this.legendHelpers.appendToForeignObject(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"drawLegends",value:function(){var e=this,t=this.w,i=t.config.legend.fontFamily,a=t.globals.seriesNames,r=t.globals.colors.slice();if("heatmap"===t.config.chart.type){var s=t.config.plotOptions.heatmap.colorScale.ranges;a=s.map(function(I){return I.name?I.name:I.from+" - "+I.to}),r=s.map(function(I){return I.color})}else this.isBarsDistributed&&(a=t.globals.labels.slice());t.config.legend.customLegendItems.length&&(a=t.config.legend.customLegendItems);for(var n=t.globals.legendFormatter,o=t.config.legend.inverseOrder,l=o?a.length-1:0;o?l>=0:l<=a.length-1;o?l--:l++){var c,d=n(a[l],{seriesIndex:l,w:t}),g=!1,p=!1;if(t.globals.collapsedSeries.length>0)for(var f=0;f0)for(var b=0;b0?l-10:0)+(c>0?c-10:0)}a.style.position="absolute",n=n+t+i.config.legend.offsetY,a.style.left=(s=s+e+i.config.legend.offsetX)+"px",a.style.top=n+"px","bottom"===i.config.legend.position?(a.style.top="auto",a.style.bottom=5-i.config.legend.offsetY+"px"):"right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px"),["width","height"].forEach(function(d){a.style[d]&&(a.style[d]=parseInt(i.config.legend[d],10)+"px")})}},{key:"legendAlignHorizontal",value:function(){var e=this.w;e.globals.dom.elLegendWrap.style.right=0;var t=this.legendHelpers.getLegendBBox(),i=new Ye(this.ctx),a=i.dimHelpers.getTitleSubtitleCoords("title"),r=i.dimHelpers.getTitleSubtitleCoords("subtitle"),s=0;"bottom"===e.config.legend.position?s=-t.clwh/1.8:"top"===e.config.legend.position&&(s=a.height+r.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(20,s)}},{key:"legendAlignVertical",value:function(){var e=this.w,t=this.legendHelpers.getLegendBBox(),i=0;"left"===e.config.legend.position&&(i=20),"right"===e.config.legend.position&&(i=e.globals.svgWidth-t.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(e){var t=this.w,i=e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker");if("heatmap"===t.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(e.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new ge(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&i&&new ge(this.ctx).toggleSeriesOnHover(e,e.target)}},{key:"onLegendClick",value:function(e){var t=this.w;if(!t.config.legend.customLegendItems.length&&(e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(e.target.getAttribute("rel"),10)-1,a="true"===e.target.getAttribute("data:collapsed"),r=this.w.config.chart.events.legendClick;"function"==typeof r&&r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var s=this.w.config.legend.markers.onClick;"function"==typeof s&&e.target.classList.contains("apexcharts-legend-marker")&&(s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==t.config.chart.type&&"heatmap"!==t.config.chart.type&&!this.isBarsDistributed&&t.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),y}(),X=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w;var t=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=t.globals.minX,this.maxX=t.globals.maxX}return D(y,[{key:"createToolbar",value:function(){var e=this,t=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=t.config.chart.toolbar.offsetY+"px",a.style.right=3-t.config.chart.toolbar.offsetX+"px",t.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=t.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var r=0;r\n \n \n\n'),n("zoomOut",this.elZoomOut,'\n \n \n\n');var o=function(d){e.t[d]&&t.config.chart[d].enabled&&s.push({el:"zoom"===d?e.elZoom:e.elSelection,icon:"string"==typeof e.t[d]?e.t[d]:"zoom"===d?'\n \n \n \n':'\n \n \n',title:e.localeValues["zoom"===d?"selectionZoom":"selection"],class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(d,"-icon")})};o("zoom"),o("selection"),this.t.pan&&t.config.chart.zoom.enabled&&s.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'\n \n \n \n \n \n \n \n',title:this.localeValues.pan,class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),n("reset",this.elZoomReset,'\n \n \n'),this.t.download&&s.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;l0&&a.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:i.globals.gridWidth,maxY:i.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var i=this.w,a=this.xyRatios;if(!i.globals.zoomEnabled)if(null!=i.globals.selection)this.drawSelectionRect(i.globals.selection);else if(void 0!==i.config.chart.selection.xaxis.min&&void 0!==i.config.chart.selection.xaxis.max){var r=(i.config.chart.selection.xaxis.min-i.globals.minX)/a.xRatio,s=i.globals.gridWidth-(i.globals.maxX-i.config.chart.selection.xaxis.max)/a.xRatio-r;i.globals.isRangeBar&&(r=(i.config.chart.selection.xaxis.min-i.globals.yAxisScale[0].niceMin)/a.invertedYRatio,s=(i.config.chart.selection.xaxis.max-i.config.chart.selection.xaxis.min)/a.invertedYRatio),this.drawSelectionRect({x:r,y:0,width:s,height:i.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0}),this.makeSelectionRectDraggable(),"function"==typeof i.config.chart.events.selection&&i.config.chart.events.selection(this.ctx,{xaxis:{min:i.config.chart.selection.xaxis.min,max:i.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(i){var a=i.x,r=i.y,s=i.width,n=i.height,o=i.translateX,c=i.translateY,g=this.w,p=this.zoomRect,f=this.selectionRect;if(this.dragged||null!==g.globals.selection){var b={transform:"translate("+(void 0===o?0:o)+", "+(void 0===c?0:c)+")"};g.globals.zoomEnabled&&this.dragged&&(s<0&&(s=1),p.attr({x:a,y:r,width:s,height:n,fill:g.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":g.config.chart.zoom.zoomedArea.fill.opacity,stroke:g.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":g.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":g.config.chart.zoom.zoomedArea.stroke.opacity}),E.setAttrs(p.node,b)),g.globals.selectionEnabled&&(f.attr({x:a,y:r,width:s>0?s:0,height:n>0?n:0,fill:g.config.chart.selection.fill.color,"fill-opacity":g.config.chart.selection.fill.opacity,stroke:g.config.chart.selection.stroke.color,"stroke-width":g.config.chart.selection.stroke.width,"stroke-dasharray":g.config.chart.selection.stroke.dashArray,"stroke-opacity":g.config.chart.selection.stroke.opacity}),E.setAttrs(f.node,b))}}},{key:"hideSelectionRect",value:function(i){i&&i.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(i){var b,r=i.zoomtype,s=this.w,n=i.context,o=this.gridRect.getBoundingClientRect(),l=n.startX-1,c=n.startY,d=!1,g=!1,p=n.clientX-o.left-l,f=n.clientY-o.top-c;return Math.abs(p+l)>s.globals.gridWidth?p=s.globals.gridWidth-l:n.clientX-o.left<0&&(p=l),l>n.clientX-o.left&&(d=!0,p=Math.abs(p)),c>n.clientY-o.top&&(g=!0,f=Math.abs(f)),n.drawSelectionRect(b="x"===r?{x:d?l-p:l,y:0,width:p,height:s.globals.gridHeight}:"y"===r?{x:0,y:g?c-f:c,width:s.globals.gridWidth,height:f}:{x:d?l-p:l,y:g?c-f:c,width:p,height:f}),n.selectionDragging("resizing"),b}},{key:"selectionDragging",value:function(i,a){var r=this,s=this.w,n=this.xyRatios,o=this.selectionRect,l=0;"resizing"===i&&(l=30);var c=function(g){return parseFloat(o.node.getAttribute(g))},d={x:c("x"),y:c("y"),width:c("width"),height:c("height")};s.globals.selection=d,"function"==typeof s.config.chart.events.selection&&s.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var g,p,f,b,m=r.gridRect.getBoundingClientRect(),v=o.node.getBoundingClientRect();s.globals.isRangeBar?(g=s.globals.yAxisScale[0].niceMin+(v.left-m.left)*n.invertedYRatio,p=s.globals.yAxisScale[0].niceMin+(v.right-m.left)*n.invertedYRatio,f=0,b=1):(g=s.globals.xAxisScale.niceMin+(v.left-m.left)*n.xRatio,p=s.globals.xAxisScale.niceMin+(v.right-m.left)*n.xRatio,f=s.globals.yAxisScale[0].niceMin+(m.bottom-v.bottom)*n.yRatio[0],b=s.globals.yAxisScale[0].niceMax-(v.top-m.top)*n.yRatio[0]);var A={xaxis:{min:g,max:p},yaxis:{min:f,max:b}};s.config.chart.events.selection(r.ctx,A),s.config.chart.brush.enabled&&void 0!==s.config.chart.events.brushScrolled&&s.config.chart.events.brushScrolled(r.ctx,A)},l))}},{key:"selectionDrawn",value:function(i){var r=i.zoomtype,s=this.w,n=i.context,o=this.xyRatios,l=this.ctx.toolbar;if(n.startX>n.endX){var c=n.startX;n.startX=n.endX,n.endX=c}if(n.startY>n.endY){var d=n.startY;n.startY=n.endY,n.endY=d}var g=void 0,p=void 0;s.globals.isRangeBar?(g=s.globals.yAxisScale[0].niceMin+n.startX*o.invertedYRatio,p=s.globals.yAxisScale[0].niceMin+n.endX*o.invertedYRatio):(g=s.globals.xAxisScale.niceMin+n.startX*o.xRatio,p=s.globals.xAxisScale.niceMin+n.endX*o.xRatio);var f=[],b=[];if(s.config.yaxis.forEach(function(k,w){if(s.globals.seriesYAxisMap[w].length>0){var S=s.globals.seriesYAxisMap[w][0];f.push(s.globals.yAxisScale[w].niceMax-o.yRatio[S]*n.startY),b.push(s.globals.yAxisScale[w].niceMax-o.yRatio[S]*n.endY)}}),n.dragged&&(n.dragX>10||n.dragY>10)&&g!==p)if(s.globals.zoomEnabled){var m=M.clone(s.globals.initialConfig.yaxis),v=M.clone(s.globals.initialConfig.xaxis);if(s.globals.zoomed=!0,s.config.xaxis.convertedCatToNumeric&&(g=Math.floor(g),p=Math.floor(p),g<1&&(g=1,p=s.globals.dataPoints),p-g<2&&(p=g+1)),"xy"!==r&&"x"!==r||(v={min:g,max:p}),"xy"!==r&&"y"!==r||m.forEach(function(k,w){m[w].min=b[w],m[w].max=f[w]}),l){var A=l.getBeforeZoomRange(v,m);A&&(v=A.xaxis?A.xaxis:v,m=A.yaxis?A.yaxis:m)}var h={xaxis:v};s.config.chart.group||(h.yaxis=m),n.ctx.updateHelpers._updateOptions(h,!1,n.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof s.config.chart.events.zoomed&&l.zoomCallback(v,m)}else if(s.globals.selectionEnabled){var u,x=null;u={min:g,max:p},"xy"!==r&&"y"!==r||(x=M.clone(s.config.yaxis)).forEach(function(k,w){x[w].min=b[w],x[w].max=f[w]}),s.globals.selection=n.selection,"function"==typeof s.config.chart.events.selection&&s.config.chart.events.selection(n.ctx,{xaxis:u,yaxis:x})}}},{key:"panDragging",value:function(i){var r=this.w,s=i.context;if(void 0!==r.globals.lastClientPosition.x){var n=r.globals.lastClientPosition.x-s.clientX,o=r.globals.lastClientPosition.y-s.clientY;Math.abs(n)>Math.abs(o)&&n>0?this.moveDirection="left":Math.abs(n)>Math.abs(o)&&n<0?this.moveDirection="right":Math.abs(o)>Math.abs(n)&&o>0?this.moveDirection="up":Math.abs(o)>Math.abs(n)&&o<0&&(this.moveDirection="down")}r.globals.lastClientPosition={x:s.clientX,y:s.clientY},r.config.xaxis.convertedCatToNumeric||s.panScrolled(r.globals.isRangeBar?r.globals.minY:r.globals.minX,r.globals.isRangeBar?r.globals.maxY:r.globals.maxX)}},{key:"delayedPanScrolled",value:function(){var i=this.w,a=i.globals.minX,r=i.globals.maxX,s=(i.globals.maxX-i.globals.minX)/2;"left"===this.moveDirection?(a=i.globals.minX+s,r=i.globals.maxX+s):"right"===this.moveDirection&&(a=i.globals.minX-s,r=i.globals.maxX-s),a=Math.floor(a),r=Math.floor(r),this.updateScrolledChart({xaxis:{min:a,max:r}},a,r)}},{key:"panScrolled",value:function(i,a){var r=this.w,s=this.xyRatios,n=M.clone(r.globals.initialConfig.yaxis),o=s.xRatio,l=r.globals.minX,c=r.globals.maxX;r.globals.isRangeBar&&(o=s.invertedYRatio,l=r.globals.minY,c=r.globals.maxY),"left"===this.moveDirection?(i=l+r.globals.gridWidth/15*o,a=c+r.globals.gridWidth/15*o):"right"===this.moveDirection&&(i=l-r.globals.gridWidth/15*o,a=c-r.globals.gridWidth/15*o),r.globals.isRangeBar||(ir.globals.initialMaxX)&&(i=l,a=c);var d={xaxis:{min:i,max:a}};r.config.chart.group||(d.yaxis=n),this.updateScrolledChart(d,i,a)}},{key:"updateScrolledChart",value:function(i,a,r){var s=this.w;this.ctx.updateHelpers._updateOptions(i,!1,!1),"function"==typeof s.config.chart.events.scrolled&&s.config.chart.events.scrolled(this.ctx,{xaxis:{min:a,max:r}})}}]),t}(),V=function(){function y(e){F(this,y),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return D(y,[{key:"getNearestValues",value:function(e){var t=e.hoverArea,a=e.clientX,r=e.clientY,s=this.w,n=e.elGrid.getBoundingClientRect(),o=n.width,l=n.height,c=o/(s.globals.dataPoints-1),d=l/s.globals.dataPoints,g=this.hasBars();!s.globals.comboCharts&&!g||s.config.xaxis.convertedCatToNumeric||(c=o/s.globals.dataPoints);var p=a-n.left-s.globals.barPadForNumericAxis,f=r-n.top;p<0||f<0||p>o||f>l?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):s.globals.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):s.globals.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));var b=Math.round(p/c),m=Math.floor(f/d);g&&!s.config.xaxis.convertedCatToNumeric&&(b=Math.ceil(p/c),b-=1);var v=null,A=null,h=s.globals.seriesXvalues.map(function(S){return S.filter(function(L){return M.isNumber(L)})}),u=s.globals.seriesYvalues.map(function(S){return S.filter(function(L){return M.isNumber(L)})});if(s.globals.isXNumeric){var x=this.ttCtx.getElGrid().getBoundingClientRect(),k=p*(x.width/o);v=(A=this.closestInMultiArray(k,f*(x.height/l),h,u)).index,b=A.j,null!==v&&(b=(A=this.closestInArray(k,h=s.globals.seriesXvalues[v])).index)}return s.globals.capturedSeriesIndex=null===v?-1:v,(!b||b<1)&&(b=0),s.globals.capturedDataPointIndex=s.globals.isBarHorizontal?m:b,{capturedSeries:v,j:s.globals.isBarHorizontal?m:b,hoverX:p,hoverY:f}}},{key:"closestInMultiArray",value:function(e,t,i,a){var s=0,n=null,o=-1;this.w.globals.series.length>1?s=this.getFirstActiveXArray(i):n=0;var c=Math.abs(e-i[s][0]);if(i.forEach(function(p){p.forEach(function(f,b){var m=Math.abs(e-f);m<=c&&(c=m,o=b)})}),-1!==o){var g=Math.abs(t-a[s][o]);n=s,a.forEach(function(p,f){var b=Math.abs(t-p[o]);b<=g&&(g=b,n=f)})}return{index:n,j:o}}},{key:"getFirstActiveXArray",value:function(e){for(var t=this.w,i=0,a=e.map(function(s,n){return s.length>0?n:-1}),r=0;r0)for(var a=0;a *"):".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(e=ne(e)).sort(function(i,a){var r=Number(i.getAttribute("data:realIndex")),s=Number(a.getAttribute("data:realIndex"));return sr?-1:0});var t=[];return e.forEach(function(i){t.push(i.querySelector(".apexcharts-marker"))}),t}},{key:"hasMarkers",value:function(e){return this.getElMarkers(e).length>0}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(e){var t=this.w,i=t.config.markers.hover.size;return void 0===i&&(i=t.globals.markers.size[e]+t.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var t=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=t.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,r=0;r ').concat(C.attrs.name,""),L+="
".concat(C.val,"
")}),h.innerHTML=S+"",u.innerHTML=L+""};n?l.globals.seriesGoals[t][i]&&Array.isArray(l.globals.seriesGoals[t][i])?x():(h.innerHTML="",u.innerHTML=""):x()}else h.innerHTML="",u.innerHTML="";if(null!==b&&(a[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,a[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==b?b:""),n&&m[0]){if(l.config.tooltip.hideEmptySeries){var k=a[t].querySelector(".apexcharts-tooltip-marker"),w=a[t].querySelector(".apexcharts-tooltip-text");0==parseFloat(d)?(k.style.display="none",w.style.display="none"):(k.style.display="block",w.style.display="block")}m[0].parentNode.style.display=null==d||l.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||l.globals.collapsedSeriesIndices.indexOf(t)>-1?"none":l.config.tooltip.items.display}}},{key:"toggleActiveInactiveSeries",value:function(e){var t=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=t.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group");i&&(i.classList.add("apexcharts-active"),i.style.display=t.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var t=e.i,i=e.j,a=this.w,r=this.ctx.series.filteredSeriesX(),s="",n="",o=null,l=null,c={series:a.globals.series,seriesIndex:t,dataPointIndex:i,w:a},d=a.globals.ttZFormatter;null===i?l=a.globals.series[t]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(s=r[t][i],0===r[t].length&&(s=r[this.tooltipUtil.getFirstActiveXArray(r)][i])):s=void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var g=s;return s=a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?new Ce(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,g,g,{i:void 0,dateFormatter:new se(this.ctx).formatDate,w:this.w}):a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](g,c):a.globals.xLabelFormatter(g,c),void 0!==a.config.tooltip.x.formatter&&(s=a.globals.ttKeyFormatter(g,c)),a.globals.seriesZ.length>0&&a.globals.seriesZ[t].length>0&&(o=d(a.globals.seriesZ[t][i],a)),n="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(g,c):s,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(s)?s.join(" "):s,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:o}}},{key:"handleCustomTooltip",value:function(e){var t=e.i,i=e.j,a=e.y1,r=e.y2,s=e.w,n=this.ttCtx.getElTooltip(),o=s.config.tooltip.custom;Array.isArray(o)&&o[t]&&(o=o[t]),n.innerHTML=o({ctx:this.ctx,series:s.globals.series,seriesIndex:t,dataPointIndex:i,y1:a,y2:r,w:s})}}]),y}(),Re=function(){function y(e){F(this,y),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return D(y,[{key:"moveXCrosshairs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,r=i.getElXCrosshairs(),s=e-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(null!==t&&(s=a.globals.gridWidth/n*t),null===r||a.globals.isBarHorizontal||(r.setAttribute("x",s),r.setAttribute("x1",s),r.setAttribute("x2",s),r.setAttribute("y2",a.globals.gridHeight),r.classList.add("apexcharts-active")),s<0&&(s=0),s>a.globals.gridWidth&&(s=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=s;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=s+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(e){var t=this.ttCtx;null!==t.ycrosshairs&&E.setAttrs(t.ycrosshairs,{y1:e,y2:e}),null!==t.ycrosshairsHidden&&E.setAttrs(t.ycrosshairsHidden,{y1:e,y2:e})}},{key:"moveXAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var r,a=i.xaxisOffY+t.config.xaxis.tooltip.offsetY+t.globals.translateY+1+t.config.xaxis.offsetY;e-=i.xaxisTooltip.getBoundingClientRect().width/2,isNaN(e)||(e+=t.globals.translateX,r=new E(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=r.width+"px",i.xaxisTooltip.style.left=e+"px",i.xaxisTooltip.style.top=a+"px")}}},{key:"moveYAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),r=t.globals.translateY+a,s=i.yaxisTTEls[e].getBoundingClientRect().height,n=t.globals.translateYAxisX[e]-2;t.config.yaxis[e].opposite&&(n-=26),r-=s/2,-1===t.globals.ignoreYAxisIndexes.indexOf(e)?(i.yaxisTTEls[e].classList.add("apexcharts-active"),i.yaxisTTEls[e].style.top=r+"px",i.yaxisTTEls[e].style.left=n+t.config.yaxis[e].tooltip.offsetX+"px"):i.yaxisTTEls[e].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,r=this.ttCtx,s=r.getElTooltip(),n=r.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(e)+o+5,c=parseFloat(t)+o/2;if(l>a.globals.gridWidth/2&&(l=l-n.ttWidth-o-10),l>a.globals.gridWidth-n.ttWidth-10&&(l=a.globals.gridWidth-n.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var d=r.getElGrid().getBoundingClientRect();(l=r.e.clientX-d.left)>a.globals.gridWidth/2&&(l-=r.tooltipRect.ttWidth),(c=r.e.clientY+a.globals.translateY-d.top)>a.globals.gridHeight/2&&(c-=r.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+c>a.globals.gridHeight&&(c=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(l)||(s.style.left=(l+=a.globals.translateX)+"px",s.style.top=c+"px")}},{key:"moveMarkers",value:function(e,t){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[e]>0)for(var r=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),s=0;s0&&(c.setAttribute("r",o),c.setAttribute("cx",i),c.setAttribute("cy",a)),this.moveXCrosshairs(i),s.fixedTooltip||this.moveTooltip(i,a,o)}}},{key:"moveDynamicPointsOnHover",value:function(e){var t,i=this.ttCtx,a=i.w,r=0,s=0,n=a.globals.pointsArray;t=new ge(this.ctx).getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var o=i.tooltipUtil.getHoverMarkerSize(t);n[t]&&(r=n[t][e][0],s=n[t][e][1]);var l=i.tooltipUtil.getAllMarkers();if(null!==l)for(var c=0;c0?(l[c]&&l[c].setAttribute("r",o),l[c]&&l[c].setAttribute("cy",g)):l[c]&&l[c].setAttribute("r",0)}}this.moveXCrosshairs(r),i.fixedTooltip||this.moveTooltip(r,s||a.globals.gridHeight,o)}},{key:"moveStickyTooltipOverBars",value:function(e,t){var i=this.w,a=this.ttCtx,r=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,s=r>=2&&r%2==0?Math.floor(r/2):Math.floor(r/2)+1;i.globals.isBarHorizontal&&(s=new ge(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(s,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(s,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(s,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(s,"'] path[j='").concat(e,"']"));n||"number"!=typeof t||(n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(t,"'] path[j='").concat(e,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(t,"'] path[j='").concat(e,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(t,"'] path[j='").concat(e,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(t,"'] path[j='").concat(e,"']")));var o=n?parseFloat(n.getAttribute("cx")):0,l=n?parseFloat(n.getAttribute("cy")):0,c=n?parseFloat(n.getAttribute("barWidth")):0,d=a.getElGrid().getBoundingClientRect(),g=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(n&&!g&&(o-=r%2!=0?c/2:0),n&&g&&i.globals.comboCharts&&(o-=c/2)):i.globals.isBarHorizontal||(o=a.xAxisTicksPositions[e-1]+a.dataPointsDividedWidth/2,isNaN(o)&&(o=a.xAxisTicksPositions[e]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?l-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?l=a.e.clientY-d.top-a.tooltipRect.ttHeight/2:l+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(l=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),a.fixedTooltip||this.moveTooltip(o,l||i.globals.gridHeight)}}]),y}(),Tt=function(){function y(e){F(this,y),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new Re(e)}return D(y,[{key:"drawDynamicPoints",value:function(){var e=this.w,t=new E(this.ctx),i=new Me(this.ctx),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=ne(a),e.config.chart.stacked&&a.sort(function(d,g){return parseFloat(d.getAttribute("data:realIndex"))-parseFloat(g.getAttribute("data:realIndex"))});for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=this.w;"bubble"!==r.config.chart.type&&this.newPointSize(e,t);var s=t.getAttribute("cx"),n=t.getAttribute("cy");if(null!==i&&null!==a&&(s=i,n=a),this.tooltipPosition.moveXCrosshairs(s),!this.fixedTooltip){if("radar"===r.config.chart.type){var o=this.ttCtx.getElGrid().getBoundingClientRect();s=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(s,n,r.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var t=this.w,i=this,a=this.ttCtx,r=e,s=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=t.config.markers.hover.size,o=0;o=0?e[t].setAttribute("r",i):e[t].setAttribute("r",0)}}}]),y}(),It=function(){function y(e){F(this,y),this.w=e.w;var t=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&"rangeBar"===t.config.chart.type&&t.config.plotOptions.bar.rangeBarGroupRows}return D(y,[{key:"getAttr",value:function(e,t){return parseFloat(e.target.getAttribute(t))}},{key:"handleHeatTreeTooltip",value:function(e){var t=e.e,i=e.opt,a=e.x,r=e.y,n=this.ttCtx,o=this.w;if(t.target.classList.contains("apexcharts-".concat(e.type,"-rect"))){var l=this.getAttr(t,"i"),c=this.getAttr(t,"j"),d=this.getAttr(t,"cx"),g=this.getAttr(t,"cy"),p=this.getAttr(t,"width"),f=this.getAttr(t,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:c,shared:!1,e:t}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=c,a=d+n.tooltipRect.ttWidth/2+p,r=g+n.tooltipRect.ttHeight/2-f/2,n.tooltipPosition.moveXCrosshairs(d+p/2),a>o.globals.gridWidth/2&&(a=d-n.tooltipRect.ttWidth/2+p),n.w.config.tooltip.followCursor){var b=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-b.left-(a>o.globals.gridWidth/2?n.tooltipRect.ttWidth:0),r=o.globals.clientY-b.top-(r>o.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:r}}},{key:"handleMarkerTooltip",value:function(e){var t,i,a=e.e,r=e.opt,s=e.x,n=e.y,o=this.w,l=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var c=parseInt(r.paths.getAttribute("cx"),10),d=parseInt(r.paths.getAttribute("cy"),10),g=parseFloat(r.paths.getAttribute("val"));if(i=parseInt(r.paths.getAttribute("rel"),10),t=parseInt(r.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var p=M.findAncestor(r.paths,"apexcharts-series");p&&(t=parseInt(p.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:r.ttItems,i:t,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&l.markerClick(a,t,i),o.globals.capturedSeriesIndex=t,o.globals.capturedDataPointIndex=i,s=c,n=d+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var f=l.getElGrid().getBoundingClientRect();n=l.e.clientY+o.globals.translateY-f.top}g<0&&(n=d),l.marker.enlargeCurrentPoint(i,r.paths,s,n)}return{x:s,y:n}}},{key:"handleBarTooltip",value:function(e){var t,i,a=e.e,r=e.opt,s=this.w,n=this.ttCtx,o=n.getElTooltip(),l=0,c=0,d=0,g=this.getBarTooltipXY({e:a,opt:r}),p=g.barHeight,f=g.j;s.globals.capturedSeriesIndex=t=g.i,s.globals.capturedDataPointIndex=f,s.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!s.config.tooltip.shared?(c=g.x,d=g.y,i=Array.isArray(s.config.stroke.width)?s.config.stroke.width[t]:s.config.stroke.width,l=c):s.globals.comboCharts||s.config.tooltip.shared||(l/=2),isNaN(d)&&(d=s.globals.svgHeight-n.tooltipRect.ttHeight);var b=parseInt(r.paths.parentNode.getAttribute("data:realIndex"),10),m=s.globals.isMultipleYAxis?s.config.yaxis[b]&&s.config.yaxis[b].reversed:s.config.yaxis[0].reversed;if(c+n.tooltipRect.ttWidth>s.globals.gridWidth&&!m?c-=n.tooltipRect.ttWidth:c<0&&(c=0),n.w.config.tooltip.followCursor){var v=n.getElGrid().getBoundingClientRect();d=n.e.clientY-v.top}null===n.tooltip&&(n.tooltip=s.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),s.config.tooltip.shared||n.tooltipPosition.moveXCrosshairs(s.globals.comboBarCount>0?l+i/2:l),!n.fixedTooltip&&(!s.config.tooltip.shared||s.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(m&&(c-=n.tooltipRect.ttWidth)<0&&(c=0),!m||s.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||(d=d+p-2*(s.globals.series[t][f]<0?p:0)),d=d+s.globals.translateY-n.tooltipRect.ttHeight/2,o.style.left=c+s.globals.translateX+"px",o.style.top=d+"px")}},{key:"getBarTooltipXY",value:function(e){var t=this,i=e.e,a=e.opt,r=this.w,s=null,n=this.ttCtx,o=0,l=0,c=0,d=0,g=0,p=i.target.classList;if(p.contains("apexcharts-bar-area")||p.contains("apexcharts-candlestick-area")||p.contains("apexcharts-boxPlot-area")||p.contains("apexcharts-rangebar-area")){var f=i.target,b=f.getBoundingClientRect(),m=a.elGrid.getBoundingClientRect(),v=b.height;g=b.height;var A=b.width,h=parseInt(f.getAttribute("cx"),10),u=parseInt(f.getAttribute("cy"),10);d=parseFloat(f.getAttribute("barWidth"));var x="touchmove"===i.type?i.touches[0].clientX:i.clientX;s=parseInt(f.getAttribute("j"),10),o=parseInt(f.parentNode.getAttribute("rel"),10)-1;var k=f.getAttribute("data-range-y1"),w=f.getAttribute("data-range-y2");r.globals.comboCharts&&(o=parseInt(f.parentNode.getAttribute("data:realIndex"),10));var S=function(C){return r.globals.isXNumeric?h-A/2:t.isVerticalGroupedRangeBar?h+A/2:h-n.dataPointsDividedWidth+A/2},L=function(){return u-n.dataPointsDividedHeight+v/2-n.tooltipRect.ttHeight/2};n.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:o,j:s,y1:k?parseInt(k,10):null,y2:w?parseInt(w,10):null,shared:!n.showOnIntersect&&r.config.tooltip.shared,e:i}),r.config.tooltip.followCursor?r.globals.isBarHorizontal?(l=x-m.left+15,c=L()):(l=S(),c=i.clientY-m.top-n.tooltipRect.ttHeight/2-15):r.globals.isBarHorizontal?((l=h)0&&i.setAttribute("width",t.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var e=this.w,t=this.ttCtx;t.ycrosshairs=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),t.ycrosshairsHidden=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(e,t,i){var a=this.ttCtx,r=this.w.globals,s=r.seriesYAxisMap[e];if(a.yaxisTooltips[e]&&s.length>0){var n=r.yLabelFormatters[e],o=a.getElGrid().getBoundingClientRect(),l=s[0];i.yRatio.length>1&&function(p){throw new TypeError('"translationsIndex" is read-only')}();var g=r.minYArr[l]+(r.maxYArr[l]-r.minYArr[l]-(t-o.top)*i.yRatio[0]);a.tooltipPosition.moveYCrosshairs(t-o.top),a.yaxisTooltipText[e].innerHTML=n(g),a.tooltipPosition.moveYAxisTooltip(e)}}}]),y}(),wt=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w;var t=this.w;this.tConfig=t.config.tooltip,this.tooltipUtil=new V(this),this.tooltipLabels=new ce(this),this.tooltipPosition=new Re(this),this.marker=new Tt(this),this.intersect=new It(this),this.axesTooltip=new Xt(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!t.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return D(y,[{key:"getElTooltip",value:function(e){return e||(e=this),e.w.globals.dom.baseEl?e.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(e){var t=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=t.config.xaxis.tooltip.enabled&&t.globals.axisCharts,this.yaxisTooltips=t.config.yaxis.map(function(s,n){return!!(s.show&&s.tooltip.enabled&&t.globals.axisCharts)}),this.allTooltipSeriesGroups=[],t.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),t.config.tooltip.cssClass&&i.classList.add(t.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),t.globals.dom.elWrap.appendChild(i),t.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new Te(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!t.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==t.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==t.config.markers.size&&0!==t.globals.markers.largestSize||this.marker.drawDynamicPoints(this),t.globals.collapsedSeries.length!==t.globals.series.length){this.dataPointsDividedHeight=t.globals.gridHeight/t.globals.dataPoints,this.dataPointsDividedWidth=t.globals.gridWidth/t.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var r=t.globals.series.length;(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(r=this.showOnIntersect?1:t.globals.series.length),this.legendLabels=t.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(r),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var t=this,i=this.w,a=[],r=this.getElTooltip(),s=function(o){var l=document.createElement("div");l.classList.add("apexcharts-tooltip-series-group"),l.style.order=i.config.tooltip.inverseOrder?e-o:o+1,t.tConfig.shared&&t.tConfig.enabledOnSeries&&Array.isArray(t.tConfig.enabledOnSeries)&&t.tConfig.enabledOnSeries.indexOf(o)<0&&l.classList.add("apexcharts-tooltip-series-group-hidden");var c=document.createElement("span");c.classList.add("apexcharts-tooltip-marker"),c.style.backgroundColor=i.globals.colors[o],l.appendChild(c);var d=document.createElement("div");d.classList.add("apexcharts-tooltip-text"),d.style.fontFamily=t.tConfig.style.fontFamily||i.config.chart.fontFamily,d.style.fontSize=t.tConfig.style.fontSize,["y","goals","z"].forEach(function(g){var p=document.createElement("div");p.classList.add("apexcharts-tooltip-".concat(g,"-group"));var f=document.createElement("span");f.classList.add("apexcharts-tooltip-text-".concat(g,"-label")),p.appendChild(f);var b=document.createElement("span");b.classList.add("apexcharts-tooltip-text-".concat(g,"-value")),p.appendChild(b),d.appendChild(p)}),l.appendChild(d),r.appendChild(l),a.push(l)},n=0;n0&&this.addPathsEventListeners(f,d),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(d)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,t=this.getElTooltip(),i=t.getBoundingClientRect(),a=i.width+10,r=i.height+10,s=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(s=s+e.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(n=n+e.globals.svgHeight-r-10),t.style.left=s+"px",t.style.top=n+"px",{x:s,y:n,ttWidth:a,ttHeight:r}}},{key:"addDatapointEventsListeners",value:function(e){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(t,e)}},{key:"addPathsEventListeners",value:function(e,t){for(var i=this,a=function(s){var n={paths:e[s],tooltipEl:t.tooltipEl,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:t.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(function(o){return e[s].addEventListener(o,i.onSeriesHover.bind(i,n),{capture:!1,passive:!0})})},r=0;r=100?this.seriesHover(e,t):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){i.seriesHover(e,t)},100-a))}},{key:"seriesHover",value:function(e,t){var i=this;this.lastHoverTime=Date.now();var a=[],r=this.w;r.config.chart.group&&(a=this.ctx.getGroupedCharts()),r.globals.axisCharts&&(r.globals.minX===-1/0&&r.globals.maxX===1/0||0===r.globals.dataPoints)||(a.length?a.forEach(function(s){var n=i.getElTooltip(s);s.w.globals.minX===i.w.globals.minX&&s.w.globals.maxX===i.w.globals.maxX&&s.w.globals.tooltip.seriesHoverByContext({chartCtx:s,ttCtx:s.w.globals.tooltip,opt:{paths:e.paths,tooltipEl:n,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:s.w.globals.tooltip.ttItems},e:t})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:t}))}},{key:"seriesHoverByContext",value:function(e){var t=e.chartCtx,i=e.ttCtx,a=e.opt,r=e.e,s=t.w,n=this.getElTooltip();n&&(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=r,i.tooltipUtil.hasBars()&&!s.globals.comboCharts&&!i.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new ge(t).toggleSeriesOnHover(r,r.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),s.globals.axisCharts?i.axisChartsTooltips({e:r,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:r,opt:a,tooltipRect:i.tooltipRect}))}},{key:"axisChartsTooltips",value:function(e){var t,i,a=e.e,r=e.opt,s=this.w,n=r.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,l="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=l,this.clientX=o,s.globals.capturedSeriesIndex=-1,s.globals.capturedDataPointIndex=-1,ln.top+n.height)this.handleMouseOut(r);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!s.config.tooltip.shared){var c=parseInt(r.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(r)}var d=this.getElTooltip(),g=this.getElXCrosshairs(),p=s.globals.xyCharts||"bar"===s.config.chart.type&&!s.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||s.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(s.globals.collapsedSeries.length+s.globals.ancillaryCollapsedSeries.length===s.globals.series.length)return;null!==g&&g.classList.add("apexcharts-active");var f=this.yaxisTooltips.filter(function(v){return!0===v});if(null!==this.ycrosshairs&&f.length&&this.ycrosshairs.classList.add("apexcharts-active"),p&&!this.showOnIntersect)this.handleStickyTooltip(a,o,l,r);else if("heatmap"===s.config.chart.type||"treemap"===s.config.chart.type){var b=this.intersect.handleHeatTreeTooltip({e:a,opt:r,x:t,y:i,type:s.config.chart.type});i=b.y,d.style.left=(t=b.x)+"px",d.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:r}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:r,x:t,y:i});if(this.yaxisTooltips.length)for(var m=0;ml.width)this.handleMouseOut(a);else if(null!==o)this.handleStickyCapturedSeries(e,o,a,n);else if(this.tooltipUtil.isXoverlap(n)||r.globals.isBarHorizontal){var c=r.globals.series.findIndex(function(d,g){return!r.globals.collapsedSeriesIndices.includes(g)});this.create(e,this,c,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(e,t,i,a){var r=this.w;if(this.tConfig.shared||null!==r.globals.series[t][a]){if(void 0!==r.globals.series[t][a])this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,t,a,i.ttItems):this.create(e,this,t,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var s=r.globals.series.findIndex(function(n,o){return!r.globals.collapsedSeriesIndices.includes(o)});this.create(e,this,s,a,i.ttItems)}}else this.handleMouseOut(i)}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,t=new E(this.ctx),i=e.globals.dom.Paper.select(".apexcharts-bar-area"),a=0;a5&&void 0!==arguments[5]?arguments[5]:null,w=this.w,S=t;"mouseup"===e.type&&this.markerClick(e,i,a),null===k&&(k=this.tConfig.shared);var L=this.tooltipUtil.hasMarkers(i),C=this.tooltipUtil.getElBars();if(w.config.legend.tooltipHoverFormatter){var z=w.config.legend.tooltipHoverFormatter,T=Array.from(this.legendLabels);T.forEach(function(ie){var re=ie.getAttribute("data:default-text");ie.innerHTML=decodeURIComponent(re)});for(var I=0;I0?S.marker.enlargePoints(a):S.tooltipPosition.moveDynamicPointsOnHover(a);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(C),this.barSeriesHeight>0)){var j=new E(this.ctx),Z=w.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a,i);for(var _=0;_0&&a.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f-=d*w)),k&&(f=f+p.height/2-h/2-2);var L=this.barCtx.series[r][s]<0,C=l;switch(this.barCtx.isReversed&&(C=l-g+(L?2*g:0),l-=g),v.position){case"center":b=k?L?C-g/2+x:C+g/2-x:L?C-g/2+p.height/2+x:C+g/2+p.height/2-x;break;case"bottom":b=k?L?C-g+x:C+g-x:L?C-g+p.height+h+x:C+g-p.height/2+h-x;break;case"top":b=k?L?C+x:C-x:L?C-p.height/2-x:C+p.height+x}if(this.barCtx.lastActiveBarSerieIndex===n&&A.enabled){var z=new E(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:n,j:s}),m.fontSize);t=L?C-z.height/2-x-A.offsetY+18:C+z.height+x+A.offsetY-18,i=f+A.offsetX}return a.config.chart.stacked||(b<0?b=0+h:b+p.height/3>a.globals.gridHeight&&(b=a.globals.gridHeight-h)),{bcx:c,bcy:l,dataLabelsX:f,dataLabelsY:b,totalDataLabelsX:i,totalDataLabelsY:t,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var t=this.w,i=e.x,a=e.i,r=e.j,s=e.realIndex,n=e.groupIndex,o=e.bcy,l=e.barHeight,c=e.barWidth,d=e.textRects,g=e.dataLabelsX,p=e.strokeWidth,f=e.dataLabelsConfig,b=e.barDataLabelsConfig,m=e.barTotalDataLabelsConfig,v=e.offX,A=e.offY,h=t.globals.gridHeight/t.globals.dataPoints;c=Math.abs(c);var u,x,k=(o+=-1!==n?n*l:0)-(this.barCtx.isRangeBar?0:h)+l/2+d.height/2+A-3,w="start",S=this.barCtx.series[a][r]<0,L=i;switch(this.barCtx.isReversed&&(L=i+c-(S?2*c:0),i=t.globals.gridWidth-c),b.position){case"center":g=S?L+c/2-v:Math.max(d.width/2,L-c/2)+v;break;case"bottom":g=S?L+c-p-Math.round(d.width/2)-v:L-c+p+Math.round(d.width/2)+v;break;case"top":g=S?L-p+Math.round(d.width/2)-v:L-p-Math.round(d.width/2)+v}if(this.barCtx.lastActiveBarSerieIndex===s&&m.enabled){var C=new E(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:r}),f.fontSize);S?(u=L-p+Math.round(C.width/2)-v-m.offsetX-15,w="end"):u=L-p-Math.round(C.width/2)+v+m.offsetX+15,x=k+m.offsetY}return t.config.chart.stacked||(g<0?g=g+d.width+p:g+d.width/2>t.globals.gridWidth&&(g=t.globals.gridWidth-d.width-p)),{bcx:i,bcy:o,dataLabelsX:g,dataLabelsY:k,totalDataLabelsX:u,totalDataLabelsY:x,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(e){var t=e.x,i=e.y,a=e.val,r=e.i,s=e.j,n=e.textRects,o=e.barHeight,l=e.barWidth,c=e.dataLabelsConfig,d=this.w,g="rotate(0)";"vertical"===d.config.plotOptions.bar.dataLabels.orientation&&(g="rotate(-90, ".concat(t,", ").concat(i,")"));var p=new Ae(this.barCtx.ctx),f=new E(this.barCtx.ctx),b=c.formatter,m=null,v=d.globals.collapsedSeriesIndices.indexOf(r)>-1;if(c.enabled&&!v){m=f.group({class:"apexcharts-data-labels",transform:g});var A="";void 0!==a&&(A=b(a,O(O({},d),{},{seriesIndex:r,dataPointIndex:s,w:d}))),!a&&d.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(A="");var h=d.globals.series[r][s]<0,u=d.config.plotOptions.bar.dataLabels.position;"vertical"===d.config.plotOptions.bar.dataLabels.orientation&&("top"===u&&(c.textAnchor=h?"end":"start"),"center"===u&&(c.textAnchor="middle"),"bottom"===u&&(c.textAnchor=h?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&lMath.abs(l)&&(A=""):n.height/1.6>Math.abs(o)&&(A=""));var x=O({},c);this.barCtx.isHorizontal&&a<0&&("start"===c.textAnchor?x.textAnchor="end":"end"===c.textAnchor&&(x.textAnchor="start")),p.plotDataLabelsText({x:t,y:i,text:A,i:r,j:s,parent:m,dataLabelsConfig:x,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return m}},{key:"drawTotalDataLabels",value:function(e){var t,i=e.x,a=e.y,r=e.val,s=e.barWidth,n=e.barHeight,o=e.realIndex,l=e.textAnchor,c=e.barTotalDataLabelsConfig,d=this.w,g=new E(this.barCtx.ctx);return c.enabled&&void 0!==i&&void 0!==a&&this.barCtx.lastActiveBarSerieIndex===o&&(t=g.drawText({x:i-(!d.globals.isBarHorizontal&&d.globals.seriesGroups.length?s/d.globals.seriesGroups.length:0),y:a-(d.globals.isBarHorizontal&&d.globals.seriesGroups.length?n/d.globals.seriesGroups.length:0),foreColor:c.style.color,text:r,textAnchor:l,fontFamily:c.style.fontFamily,fontSize:c.style.fontSize,fontWeight:c.style.fontWeight})),t}}]),y}(),Et=function(){function y(e){F(this,y),this.w=e.w,this.barCtx=e}return D(y,[{key:"initVariables",value:function(e){var t=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[i].length),t.globals.isXNumeric)for(var a=0;at.globals.minX&&t.globals.seriesX[i][a]0&&(a=l.globals.minXDiff/g),(s=a/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(s=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(s=parseInt(this.barCtx.barOptions.columnWidth,10)),n=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e=l.globals.padHorizontal+(a-s*this.barCtx.seriesLen)/2}return l.globals.barHeight=r,l.globals.barWidth=s,{x:e,y:t,yDivision:i,xDivision:a,barHeight:r,barWidth:s,zeroH:n,zeroW:o}}},{key:"initializeStackedPrevVars",value:function(e){var t=e.w;t.globals.hasSeriesGroups?t.globals.seriesGroups.forEach(function(i){e[i]||(e[i]={}),e[i].prevY=[],e[i].prevX=[],e[i].prevYF=[],e[i].prevXF=[],e[i].prevYVal=[],e[i].prevXVal=[]}):(e.prevY=[],e.prevX=[],e.prevYF=[],e.prevXF=[],e.prevYVal=[],e.prevXVal=[])}},{key:"initializeStackedXYVars",value:function(e){var t=e.w;t.globals.hasSeriesGroups?t.globals.seriesGroups.forEach(function(i){e[i]||(e[i]={}),e[i].xArrj=[],e[i].xArrjF=[],e[i].xArrjVal=[],e[i].yArrj=[],e[i].yArrjF=[],e[i].yArrjVal=[]}):(e.xArrj=[],e.xArrjF=[],e.xArrjVal=[],e.yArrj=[],e.yArrjF=[],e.yArrjVal=[])}},{key:"getPathFillColor",value:function(e,t,i,a){var r,s,n,o,l=this.w,c=new ue(this.barCtx.ctx),d=null,g=this.barCtx.barOptions.distributed?i:t;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(p){e[t][i]>=p.from&&e[t][i]<=p.to&&(d=p.color)}),l.config.series[t].data[i]&&l.config.series[t].data[i].fillColor&&(d=l.config.series[t].data[i].fillColor),c.fillPath({seriesNumber:this.barCtx.barOptions.distributed?g:a,dataPointIndex:i,color:d,value:e[t][i],fillConfig:null===(r=l.config.series[t].data[i])||void 0===r?void 0:r.fill,fillType:null!==(s=l.config.series[t].data[i])&&void 0!==s&&null!==(n=s.fill)&&void 0!==n&&n.type?null===(o=l.config.series[t].data[i])||void 0===o?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[t]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(e,t,i){var a=0,r=this.w;return this.barCtx.isNullValue=null==this.barCtx.series[e][t],r.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"shouldApplyRadius",value:function(e){var t=this.w,i=!1;return t.config.plotOptions.bar.borderRadius>0&&(t.config.chart.stacked&&"last"===t.config.plotOptions.bar.borderRadiusWhenStacked?this.barCtx.lastActiveBarSerieIndex===e&&(i=!0):i=!0),i}},{key:"barBackground",value:function(e){var t=e.j,i=e.i,a=e.x1,r=e.x2,s=e.y1,n=e.y2,o=e.elSeries,l=this.w,c=new E(this.barCtx.ctx),d=new ge(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&d===i){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);var p=c.drawRect(void 0!==a?a:0,void 0!==s?s:0,void 0!==r?r:l.globals.gridWidth,void 0!==n?n:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,this.barCtx.barOptions.colors.backgroundBarColors[t],this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(p),p.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(e){var t,i=e.barWidth,a=e.barXPosition,r=e.y1,s=e.y2,n=e.strokeWidth,o=e.seriesGroup,l=e.realIndex,c=e.i,d=e.j,g=e.w,p=new E(this.barCtx.ctx);(n=Array.isArray(n)?n[l]:n)||(n=0);var f=i,b=a;null!==(t=g.config.series[l].data[d])&&void 0!==t&&t.columnWidthOffset&&(b=a-g.config.series[l].data[d].columnWidthOffset/2,f=i+g.config.series[l].data[d].columnWidthOffset);var m=b,v=b+f;s+=.001;var A=p.move(m,r+=.001),h=p.move(m,r),u=p.line(v-n,r);if(g.globals.previousPaths.length>0&&(h=this.barCtx.getPreviousPath(l,d,!1)),A=A+p.line(m,s)+p.line(v-n,s)+p.line(v-n,r)+("around"===g.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),h=h+p.line(m,r)+u+u+u+u+u+p.line(m,r)+("around"===g.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),this.shouldApplyRadius(l)&&(A=p.roundPathCorners(A,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var x=this.barCtx;g.globals.hasSeriesGroups&&o&&(x=this.barCtx[o]),x.yArrj.push(s),x.yArrjF.push(Math.abs(r-s)),x.yArrjVal.push(this.barCtx.series[c][d])}return{pathTo:A,pathFrom:h}}},{key:"getBarpaths",value:function(e){var t,i=e.barYPosition,a=e.barHeight,r=e.x1,s=e.x2,n=e.strokeWidth,o=e.seriesGroup,l=e.realIndex,c=e.i,d=e.j,g=e.w,p=new E(this.barCtx.ctx);(n=Array.isArray(n)?n[l]:n)||(n=0);var f=i,b=a;null!==(t=g.config.series[l].data[d])&&void 0!==t&&t.barHeightOffset&&(f=i-g.config.series[l].data[d].barHeightOffset/2,b=a+g.config.series[l].data[d].barHeightOffset);var m=f,v=f+b;s+=.001;var A=p.move(r+=.001,m),h=p.move(r,m);g.globals.previousPaths.length>0&&(h=this.barCtx.getPreviousPath(l,d,!1));var u=p.line(r,v-n);if(A=A+p.line(s,m)+p.line(s,v-n)+u+("around"===g.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),h=h+p.line(r,m)+u+u+u+u+u+p.line(r,m)+("around"===g.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),this.shouldApplyRadius(l)&&(A=p.roundPathCorners(A,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var x=this.barCtx;g.globals.hasSeriesGroups&&o&&(x=this.barCtx[o]),x.xArrj.push(s),x.xArrjF.push(Math.abs(r-s)),x.xArrjVal.push(this.barCtx.series[c][d])}return{pathTo:A,pathFrom:h}}},{key:"checkZeroSeries",value:function(e){for(var t=e.series,i=this.w,a=0;a2&&void 0!==arguments[2]&&!arguments[2]?null:t;return null!=e&&(i=t+e/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(e,t,i){var a=arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?null:t;return null!=e&&(a=t-e/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[i]:0)),a}},{key:"getGoalValues",value:function(e,t,i,a,r,s){var n=this,o=this.w,l=[],c=function(p,f){var b;l.push((xe(b={},e,"x"===e?n.getXForValue(p,t,!1):n.getYForValue(p,i,s,!1)),xe(b,"attrs",f),b))};if(o.globals.seriesGoals[a]&&o.globals.seriesGoals[a][r]&&Array.isArray(o.globals.seriesGoals[a][r])&&o.globals.seriesGoals[a][r].forEach(function(p){c(p.value,p)}),this.barCtx.barOptions.isDumbbell&&o.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:o.globals.colors,g={strokeHeight:"x"===e?0:o.globals.markers.size[a],strokeWidth:"x"===e?o.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[a])?d[a][0]:d[a]};c(o.globals.seriesRangeStart[a][r],g),c(o.globals.seriesRangeEnd[a][r],O(O({},g),{},{strokeColor:Array.isArray(d[a])?d[a][1]:d[a]}))}return l}},{key:"drawGoalLine",value:function(e){var t=e.barXPosition,i=e.barYPosition,a=e.goalX,r=e.goalY,s=e.barWidth,n=e.barHeight,o=new E(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var c=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach(function(d){if(d.x>=-1&&d.x<=o.w.globals.gridWidth+1){var g=void 0!==d.attrs.strokeHeight?d.attrs.strokeHeight:n/2,p=i+g+n/2;c=o.drawLine(d.x,p-2*g,d.x,p,d.attrs.strokeColor?d.attrs.strokeColor:void 0,d.attrs.strokeDashArray,d.attrs.strokeWidth?d.attrs.strokeWidth:2,d.attrs.strokeLineCap),l.add(c)}}):Array.isArray(r)&&r.forEach(function(d){if(d.y>=-1&&d.y<=o.w.globals.gridHeight+1){var g=void 0!==d.attrs.strokeWidth?d.attrs.strokeWidth:s/2,p=t+g+s/2;c=o.drawLine(p-2*g,d.y,p,d.y,d.attrs.strokeColor?d.attrs.strokeColor:void 0,d.attrs.strokeDashArray,d.attrs.strokeHeight?d.attrs.strokeHeight:2,d.attrs.strokeLineCap),l.add(c)}}),l}},{key:"drawBarShadow",value:function(e){var t=e.prevPaths,i=e.currPaths,a=e.color,r=this.w,s=t.x,n=t.x1,l=i.x,c=i.x1,d=i.barYPosition,g=t.barYPosition+i.barHeight,p=new E(this.barCtx.ctx),f=new M,b=p.move(n,g)+p.line(s,g)+p.line(l,d)+p.line(c,d)+p.line(n,g)+("around"===r.config.plotOptions.bar.borderRadiusApplication?" Z":" z");return p.drawPath({d:b,fill:f.shadeColor(.5,M.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadows"})}},{key:"getZeroValueEncounters",value:function(e){var t=e.i,i=e.j,r=0,s=0;return this.w.globals.seriesPercent.forEach(function(n,o){n[i]&&r++,othis.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var n=0,o=0;n0&&(this.visibleI=this.visibleI+1);var h=0,u=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[v],this.translationsIndex=v);var x=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var k=this.barHelpers.initialPositions();f=k.y,h=k.barHeight,c=k.yDivision,g=k.zeroW,p=k.x,u=k.barWidth,l=k.xDivision,d=k.zeroH,this.horizontal||m.push(p+u/2);var w=a.group({class:"apexcharts-datalabels","data:realIndex":v});i.globals.delayedElements.push({el:w.node}),w.node.classList.add("apexcharts-element-hidden");var S=a.group({class:"apexcharts-bar-goals-markers"}),L=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:L.node}),L.node.classList.add("apexcharts-element-hidden");for(var C=0;C0){var H=this.barHelpers.drawBarShadow({color:"string"==typeof Y&&-1===Y?.indexOf("url")?Y:M.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});H&&L.add(H)}this.pathArr.push(T);var B=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:h,barWidth:u});B&&S.add(B),f=T.y,p=T.x,C>0&&m.push(p+u/2),b.push(f),this.renderSeries({realIndex:v,pathFill:Y,j:C,i:n,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:z,elSeries:A,x:p,y:f,series:e,barHeight:T.barHeight?T.barHeight:h,barWidth:T.barWidth?T.barWidth:u,elDataLabelsWrap:w,elGoalsMarkers:S,elBarShadows:L,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[v]=m,i.globals.seriesYvalues[v]=b,s.add(A)}return s}},{key:"renderSeries",value:function(e){var G,W,j,t=e.realIndex,i=e.pathFill,a=e.lineFill,r=e.j,s=e.i,n=e.groupIndex,o=e.pathFrom,l=e.pathTo,c=e.strokeWidth,d=e.elSeries,g=e.x,p=e.y,f=e.y1,b=e.y2,m=e.series,v=e.barHeight,A=e.barWidth,h=e.barXPosition,u=e.barYPosition,x=e.elDataLabelsWrap,k=e.elGoalsMarkers,w=e.elBarShadows,S=e.visibleSeries,L=e.type,C=this.w,z=new E(this.ctx);if(!a){var T="function"==typeof C.globals.stroke.colors[t]?(G=t,j=C.config.stroke.colors,Array.isArray(j)&&j.length>0&&((W=j[G])||(W=""),"function"==typeof W)?W({value:C.globals.series[G][r],dataPointIndex:r,w:C}):W):C.globals.stroke.colors[t];a=this.barOptions.distributed?C.globals.stroke.colors[r]:T}C.config.series[s].data[r]&&C.config.series[s].data[r].strokeColor&&(a=C.config.series[s].data[r].strokeColor),this.isNullValue&&(i="none");var Y=z.renderPaths({i:s,j:r,realIndex:t,pathFrom:o,pathTo:l,stroke:a,strokeWidth:c,strokeLineCap:C.config.stroke.lineCap,fill:i,animationDelay:r/C.config.chart.animations.animateGradually.delay*(C.config.chart.animations.speed/C.globals.dataPoints)/2.4,initialSpeed:C.config.chart.animations.speed,dataChangeSpeed:C.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(L,"-area")});Y.attr("clip-path","url(#gridRectMask".concat(C.globals.cuid,")"));var H=C.config.forecastDataPoints;H.count>0&&r>=C.globals.dataPoints-H.count&&(Y.node.setAttribute("stroke-dasharray",H.dashArray),Y.node.setAttribute("stroke-width",H.strokeWidth),Y.node.setAttribute("fill-opacity",H.fillOpacity)),void 0!==f&&void 0!==b&&(Y.attr("data-range-y1",f),Y.attr("data-range-y2",b)),new oe(this.ctx).setSelectionFilter(Y,t,r),d.add(Y);var B=new zt(this).handleBarDataLabels({x:g,y:p,y1:f,y2:b,i:s,j:r,series:m,realIndex:t,groupIndex:n,barHeight:v,barWidth:A,barXPosition:h,barYPosition:u,renderedPath:Y,visibleSeries:S});return null!==B.dataLabels&&x.add(B.dataLabels),B.totalDataLabels&&x.add(B.totalDataLabels),d.add(x),k&&d.add(k),w&&d.add(w),d}},{key:"drawBarPaths",value:function(e){var t,n,i=e.indexes,a=e.barHeight,r=e.strokeWidth,s=e.zeroW,o=e.y,l=e.yDivision,c=e.elSeries,d=this.w,g=i.i,p=i.j;if(d.globals.isXNumeric)t=(o=(d.globals.seriesX[g][p]-d.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var f=0,b=0;d.globals.seriesPercent.forEach(function(v,A){v[p]&&f++,A0&&(a=this.seriesLen*a/f),t=o+a*this.visibleI,t-=a*b}else t=o+a*this.visibleI;this.isFunnel&&(s-=(this.barHelpers.getXForValue(this.series[g][p],s)-s)/2),n=this.barHelpers.getXForValue(this.series[g][p],s);var m=this.barHelpers.getBarpaths({barYPosition:t,barHeight:a,x1:s,x2:n,strokeWidth:r,series:this.series,realIndex:i.realIndex,i:g,j:p,w:d});return d.globals.isXNumeric||(o+=l),this.barHelpers.barBackground({j:p,i:g,y1:t-a*this.visibleI,y2:a*this.seriesLen,elSeries:c}),{pathTo:m.pathTo,pathFrom:m.pathFrom,x1:s,x:n,y:o,goalX:this.barHelpers.getGoalValues("x",s,null,g,p),barYPosition:t,barHeight:a}}},{key:"drawColumnPaths",value:function(e){var t,r,i=e.indexes,a=e.x,s=e.xDivision,n=e.barWidth,o=e.zeroH,l=e.strokeWidth,c=e.elSeries,d=this.w,g=i.realIndex,p=i.translationsIndex,f=i.i,b=i.j,m=i.bc;if(d.globals.isXNumeric){var v=this.getBarXForNumericXAxis({x:a,j:b,realIndex:g,barWidth:n});a=v.x,t=v.barXPosition}else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var A=this.barHelpers.getZeroValueEncounters({i:f,j:b}),h=A.nonZeroColumns;h>0&&(n=this.seriesLen*n/h),t=a+n*this.visibleI,t-=n*A.zeroEncounters}else t=a+n*this.visibleI;r=this.barHelpers.getYForValue(this.series[f][b],o,p);var x=this.barHelpers.getColumnPaths({barXPosition:t,barWidth:n,y1:o,y2:r,strokeWidth:l,series:this.series,realIndex:g,i:f,j:b,w:d});return d.globals.isXNumeric||(a+=s),this.barHelpers.barBackground({bc:m,j:b,i:f,x1:t-l/2-n*this.visibleI,x2:n*this.seriesLen+l/2,elSeries:c}),{pathTo:x.pathTo,pathFrom:x.pathFrom,x:a,y:r,goalY:this.barHelpers.getGoalValues("y",null,o,f,b,p),barXPosition:t,barWidth:n}}},{key:"getBarXForNumericXAxis",value:function(e){var t=e.x,i=e.barWidth,a=e.realIndex,r=e.j,s=this.w,n=a;return s.globals.seriesX[a].length||(n=s.globals.maxValsInArrayIndex),s.globals.seriesX[n][r]&&(t=(s.globals.seriesX[n][r]-s.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:t+i*this.visibleI,x:t}}},{key:"getPreviousPath",value:function(e,t){for(var i,a=this.w,r=0;r0&&parseInt(s.realIndex,10)===parseInt(e,10)&&void 0!==a.globals.previousPaths[r].paths[t]&&(i=a.globals.previousPaths[r].paths[t].d)}return i}}]),y}(),At=function(y){ke(t,Oe);var e=ve(t);function t(){return F(this,t),e.apply(this,arguments)}return D(t,[{key:"draw",value:function(i,a){var r=this,s=this.w;this.graphics=new E(this.ctx),this.bar=new Oe(this.ctx,this.xyRatios);var n=new te(this.ctx,s);i=n.getLogSeries(i),this.yRatio=n.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i),"100%"===s.config.chart.stackType&&(i=s.globals.seriesPercent.slice()),this.series=i,this.barHelpers.initializeStackedPrevVars(this);for(var o=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),l=0,c=0,d=function(f,b){var m=void 0,v=void 0,A=void 0,h=void 0,u=-1;r.groupCtx=r,s.globals.seriesGroups.forEach(function(_,ie){_.indexOf(s.globals.seriesNames[f])>-1&&(u=ie)}),-1!==u&&(r.groupCtx=r[s.globals.seriesGroups[u]]);var x=[],k=[],w=s.globals.comboCharts?a[f]:f,S=0;r.yRatio.length>1&&(r.yaxisIndex=s.globals.seriesYAxisReverseMap[w][0],S=w),r.isReversed=s.config.yaxis[r.yaxisIndex]&&s.config.yaxis[r.yaxisIndex].reversed;var L=r.graphics.group({class:"apexcharts-series",seriesName:M.escapeString(s.globals.seriesNames[w]),rel:f+1,"data:realIndex":w});r.ctx.series.addCollapsedClassToSeries(L,w);var C=r.graphics.group({class:"apexcharts-datalabels","data:realIndex":w}),z=r.graphics.group({class:"apexcharts-bar-goals-markers"}),T=0,I=0,Y=r.initialPositions(l,c,m,v,A,h,S);c=Y.y,v=Y.yDivision,h=Y.zeroW,l=Y.x,I=Y.barWidth,m=Y.xDivision,A=Y.zeroH,s.globals.barHeight=T=Y.barHeight,s.globals.barWidth=I,r.barHelpers.initializeStackedXYVars(r),1===r.groupCtx.prevY.length&&r.groupCtx.prevY[0].every(function(_){return isNaN(_)})&&(r.groupCtx.prevY[0]=r.groupCtx.prevY[0].map(function(_){return A}),r.groupCtx.prevYF[0]=r.groupCtx.prevYF[0].map(function(_){return 0}));for(var H=0;H1?(r=g.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:d*parseInt(g.config.plotOptions.bar.columnWidth,10)/100,-1===String(g.config.plotOptions.bar.columnWidth).indexOf("%")&&(d=parseInt(g.config.plotOptions.bar.columnWidth,10)),n=g.globals.gridHeight-this.baseLineY[l]-(this.isReversed?g.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[l]:0),i=g.globals.padHorizontal+(r-d)/2);var p=g.globals.barGroups.length?g.globals.barGroups.length:1;return{x:i,y:a,yDivision:s,xDivision:r,barHeight:c/p,barWidth:d/p,zeroH:n,zeroW:o}}},{key:"drawStackedBarPaths",value:function(i){for(var a,l,r=i.indexes,s=i.barHeight,n=i.strokeWidth,o=i.zeroW,c=i.y,d=i.groupIndex,g=i.seriesGroup,p=i.yDivision,f=i.elSeries,b=this.w,m=c+(-1!==d?d*s:0),v=r.i,A=r.j,h=r.translationsIndex,u=0,x=0;x0){var w=o;this.groupCtx.prevXVal[k-1][A]<0?w=this.series[v][A]>=0?this.groupCtx.prevX[k-1][A]+u-2*(this.isReversed?u:0):this.groupCtx.prevX[k-1][A]:this.groupCtx.prevXVal[k-1][A]>=0&&(w=this.series[v][A]>=0?this.groupCtx.prevX[k-1][A]:this.groupCtx.prevX[k-1][A]-u+2*(this.isReversed?u:0)),a=w}else a=o;var S=this.barHelpers.getBarpaths({barYPosition:m,barHeight:s,x1:a,x2:l=null===this.series[v][A]?a:a+this.series[v][A]/this.invertedYRatio-2*(this.isReversed?this.series[v][A]/this.invertedYRatio:0),strokeWidth:n,series:this.series,realIndex:r.realIndex,seriesGroup:g,i:v,j:A,w:b});return this.barHelpers.barBackground({j:A,i:v,y1:m,y2:s,elSeries:f}),c+=p,{pathTo:S.pathTo,pathFrom:S.pathFrom,goalX:this.barHelpers.getGoalValues("x",o,null,v,A,h),barYPosition:m,x:l,y:c}}},{key:"drawStackedColumnPaths",value:function(i){var s,a=i.indexes,r=i.x,n=i.xDivision,o=i.barWidth,l=i.zeroH,c=i.groupIndex,d=i.seriesGroup,g=i.elSeries,p=this.w,f=a.i,b=a.j,m=a.bc,v=a.translationsIndex;if(p.globals.isXNumeric){var A=p.globals.seriesX[f][b];A||(A=0),r=(A-p.globals.minX)/this.xRatio-o/2,p.globals.barGroups.length&&(r=(A-p.globals.minX)/this.xRatio-o/2*p.globals.barGroups.length)}for(var h,u=r+(-1!==c?c*o:0),x=0,k=0;k0&&!p.globals.isXNumeric||w>0&&p.globals.isXNumeric&&p.globals.seriesX[f-1][b]===p.globals.seriesX[f][b]){var S,L,C,z=Math.min(this.yRatio.length+1,f+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var T=1;T=0?C-x+2*(this.isReversed?x:0):C;break}if((null===(B=this.groupCtx.prevYVal[w-Y])||void 0===B?void 0:B[b])>=0){L=this.series[f][b]>=0?C:C+x-2*(this.isReversed?x:0);break}}void 0===L&&(L=p.globals.gridHeight),h=null!==(S=this.groupCtx.prevYF[0])&&void 0!==S&&S.every(function(W){return 0===W})&&this.groupCtx.prevYF.slice(1,w).every(function(W){return W.every(function(j){return isNaN(j)})})?l:L}else h=l;var G=this.barHelpers.getColumnPaths({barXPosition:u,barWidth:o,y1:h,y2:s=this.series[f][b]?h-this.series[f][b]/this.yRatio[v]+2*(this.isReversed?this.series[f][b]/this.yRatio[v]:0):h,yRatio:this.yRatio[v],strokeWidth:this.strokeWidth,series:this.series,seriesGroup:d,realIndex:a.realIndex,i:f,j:b,w:p});return this.barHelpers.barBackground({bc:m,j:b,i:f,x1:u,x2:o,elSeries:g}),r+=n,{pathTo:G.pathTo,pathFrom:G.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,l,f,b),barXPosition:u,x:p.globals.isXNumeric?r-n:r,y:s}}}]),t}(),ft=function(y){ke(t,Oe);var e=ve(t);function t(){return F(this,t),e.apply(this,arguments)}return D(t,[{key:"draw",value:function(i,a,r){var s=this,n=this.w,o=new E(this.ctx),l=n.globals.comboCharts?a:n.config.chart.type,c=new ue(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=n.config.plotOptions.bar.horizontal;var d=new te(this.ctx,n);i=d.getLogSeries(i),this.series=i,this.yRatio=d.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i);for(var g=o.group({class:"apexcharts-".concat(l,"-series apexcharts-plot-series")}),p=function(b){s.isBoxPlot="boxPlot"===n.config.chart.type||"boxPlot"===n.config.series[b].type;var m,v,A,h,u=void 0,x=void 0,k=[],w=[],S=n.globals.comboCharts?r[b]:b,L=o.group({class:"apexcharts-series",seriesName:M.escapeString(n.globals.seriesNames[S]),rel:b+1,"data:realIndex":S});s.ctx.series.addCollapsedClassToSeries(L,S),i[b].length>0&&(s.visibleI=s.visibleI+1);var C,z,T=0;s.yRatio.length>1&&(s.yaxisIndex=n.globals.seriesYAxisReverseMap[S][0],T=S);var I=s.barHelpers.initialPositions();x=I.y,C=I.barHeight,v=I.yDivision,h=I.zeroW,m=I.xDivision,A=I.zeroH,w.push((u=I.x)+(z=I.barWidth)/2);for(var Y=o.group({class:"apexcharts-datalabels","data:realIndex":S}),H=function(G){var W=s.barHelpers.getStrokeWidth(b,G,S),j=null,Z={indexes:{i:b,j:G,realIndex:S,translationsIndex:T},x:u,y:x,strokeWidth:W,elSeries:L};j=s.isHorizontal?s.drawHorizontalBoxPaths(O(O({},Z),{},{yDivision:v,barHeight:C,zeroW:h})):s.drawVerticalBoxPaths(O(O({},Z),{},{xDivision:m,barWidth:z,zeroH:A})),x=j.y,u=j.x,G>0&&w.push(u+z/2),k.push(x),j.pathTo.forEach(function(_,ie){var re=!s.isBoxPlot&&s.candlestickOptions.wick.useFillColor?j.color[ie]:n.globals.stroke.colors[b],K=c.fillPath({seriesNumber:S,dataPointIndex:G,color:j.color[ie],value:i[b][G]});s.renderSeries({realIndex:S,pathFill:K,lineFill:re,j:G,i:b,pathFrom:j.pathFrom,pathTo:_,strokeWidth:W,elSeries:L,x:u,y:x,series:i,barHeight:C,barWidth:z,elDataLabelsWrap:Y,visibleSeries:s.visibleI,type:n.config.chart.type})})},B=0;Bu.c&&(f=!1);var w=Math.min(u.o,u.c),S=Math.max(u.o,u.c),L=u.m;c.globals.isXNumeric&&(r=(c.globals.seriesX[h][p]-c.globals.minX)/this.xRatio-n/2);var C=r+n*this.visibleI;null==this.series[g][p]?(w=o,S=o):(w=o-w/A,S=o-S/A,x=o-u.h/A,k=o-u.l/A,L=o-u.m/A);var z=d.move(C,o),T=d.move(C+n/2,w);return c.globals.previousPaths.length>0&&(T=this.getPreviousPath(h,p,!0)),z=this.isBoxPlot?[d.move(C,w)+d.line(C+n/2,w)+d.line(C+n/2,x)+d.line(C+n/4,x)+d.line(C+n-n/4,x)+d.line(C+n/2,x)+d.line(C+n/2,w)+d.line(C+n,w)+d.line(C+n,L)+d.line(C,L)+d.line(C,w+l/2),d.move(C,L)+d.line(C+n,L)+d.line(C+n,S)+d.line(C+n/2,S)+d.line(C+n/2,k)+d.line(C+n-n/4,k)+d.line(C+n/4,k)+d.line(C+n/2,k)+d.line(C+n/2,S)+d.line(C,S)+d.line(C,L)+"z"]:[d.move(C,S)+d.line(C+n/2,S)+d.line(C+n/2,x)+d.line(C+n/2,S)+d.line(C+n,S)+d.line(C+n,w)+d.line(C+n/2,w)+d.line(C+n/2,k)+d.line(C+n/2,w)+d.line(C,w)+d.line(C,S-l/2)],T+=d.move(C,w),c.globals.isXNumeric||(r+=s),{pathTo:z,pathFrom:T,x:r,y:S,barXPosition:C,color:this.isBoxPlot?v:f?[b]:[m]}}},{key:"drawHorizontalBoxPaths",value:function(i){var a=i.indexes,r=i.y,s=i.yDivision,n=i.barHeight,o=i.zeroW,l=i.strokeWidth,c=this.w,d=new E(this.ctx),g=a.i,p=a.j,f=this.boxOptions.colors.lower;this.isBoxPlot&&(f=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var b=this.invertedYRatio,m=a.realIndex,v=this.getOHLCValue(m,p),A=o,h=o,u=Math.min(v.o,v.c),x=Math.max(v.o,v.c),k=v.m;c.globals.isXNumeric&&(r=(c.globals.seriesX[m][p]-c.globals.minX)/this.invertedXRatio-n/2);var w=r+n*this.visibleI;null==this.series[g][p]?(u=o,x=o):(u=o+u/b,x=o+x/b,A=o+v.h/b,h=o+v.l/b,k=o+v.m/b);var S=d.move(o,w),L=d.move(u,w+n/2);return c.globals.previousPaths.length>0&&(L=this.getPreviousPath(m,p,!0)),S=[d.move(u,w)+d.line(u,w+n/2)+d.line(A,w+n/2)+d.line(A,w+n/2-n/4)+d.line(A,w+n/2+n/4)+d.line(A,w+n/2)+d.line(u,w+n/2)+d.line(u,w+n)+d.line(k,w+n)+d.line(k,w)+d.line(u+l/2,w),d.move(k,w)+d.line(k,w+n)+d.line(x,w+n)+d.line(x,w+n/2)+d.line(h,w+n/2)+d.line(h,w+n-n/4)+d.line(h,w+n/4)+d.line(h,w+n/2)+d.line(x,w+n/2)+d.line(x,w)+d.line(k,w)+"z"],L+=d.move(u,w),c.globals.isXNumeric||(r+=s),{pathTo:S,pathFrom:L,x,y:r,barYPosition:w,color:f}}},{key:"getOHLCValue",value:function(i,a){var r=this.w;return{o:this.isBoxPlot?r.globals.seriesCandleH[i][a]:r.globals.seriesCandleO[i][a],h:this.isBoxPlot?r.globals.seriesCandleO[i][a]:r.globals.seriesCandleH[i][a],m:r.globals.seriesCandleM[i][a],l:this.isBoxPlot?r.globals.seriesCandleC[i][a]:r.globals.seriesCandleL[i][a],c:this.isBoxPlot?r.globals.seriesCandleL[i][a]:r.globals.seriesCandleC[i][a]}}}]),t}(),kt=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"checkColorRange",value:function(){var e=this.w,t=!1,i=e.config.plotOptions[e.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map(function(a,r){a.from<=0&&(t=!0)}),t}},{key:"getShadeColor",value:function(e,t,i,a){var r=this.w,s=1,n=r.config.plotOptions[e].shadeIntensity,o=this.determineColor(e,t,i);r.globals.hasNegs||a?s=r.config.plotOptions[e].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*n):1.25*n*(1-o.percent/100):o.percent<=0?1-(1+o.percent/100)*n:(1-o.percent/100)*n:(s=1-o.percent/100,"treemap"===e&&(s=1.25*n*(1-o.percent/100)));var l=o.color,c=new M;return r.config.plotOptions[e].enableShades&&(l=M.hexToRgba(c.shadeColor("dark"===this.w.config.theme.mode?-1*s:s,o.color),r.config.fill.opacity)),{color:l,colorProps:o}}},{key:"determineColor",value:function(e,t,i){var a=this.w,r=a.globals.series[t][i],s=a.config.plotOptions[e],n=s.colorScale.inverse?i:t;s.distributed&&"treemap"===a.config.chart.type&&(n=i);var o=a.globals.colors[n],l=null,c=Math.min.apply(Math,ne(a.globals.series[t])),d=Math.max.apply(Math,ne(a.globals.series[t]));s.distributed||"heatmap"!==e||(c=a.globals.minY,d=a.globals.maxY),void 0!==s.colorScale.min&&(c=s.colorScale.mina.globals.maxY?s.colorScale.max:a.globals.maxY);var g=Math.abs(d)+Math.abs(c),p=100*r/(0===g?g-1e-6:g);return s.colorScale.ranges.length>0&&s.colorScale.ranges.map(function(f,b){if(r>=f.from&&r<=f.to){o=f.color,l=f.foreColor?f.foreColor:null,c=f.from,d=f.to;var m=Math.abs(d)+Math.abs(c);p=100*r/(0===m?m-1e-6:m)}}),{color:o,foreColor:l,percent:p}}},{key:"calculateDataLabels",value:function(e){var t=e.text,i=e.x,a=e.y,r=e.i,s=e.j,n=e.colorProps,o=e.fontSize,l=this.w.config.dataLabels,c=new E(this.ctx),d=new Ae(this.ctx),g=null;if(l.enabled){g=c.group({class:"apexcharts-data-labels"});var f=l.offsetY,b=i+l.offsetX,m=a+parseFloat(l.style.fontSize)/3+f;d.plotDataLabelsText({x:b,y:m,text:t,i:r,j:s,color:n.foreColor,parent:g,fontSize:o,dataLabelsConfig:l})}return g}},{key:"addListeners",value:function(e){var t=new E(this.ctx);e.node.addEventListener("mouseenter",t.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",t.pathMouseLeave.bind(this,e)),e.node.addEventListener("mousedown",t.pathMouseDown.bind(this,e))}}]),y}(),Yt=function(){function y(e,t){F(this,y),this.ctx=e,this.w=e.w,this.xRatio=t.xRatio,this.yRatio=t.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new kt(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return D(y,[{key:"draw",value:function(e){var t=this.w,i=new E(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(t.globals.cuid,")"));var r=t.globals.gridWidth/t.globals.dataPoints,s=t.globals.gridHeight/t.globals.series.length,n=0,o=!1;this.negRange=this.helpers.checkColorRange();var l=e.slice();t.config.yaxis[0].reversed&&(o=!0,l.reverse());for(var c=o?0:l.length-1;o?c=0;o?c++:c--){var d=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:M.escapeString(t.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(d,c),t.config.chart.dropShadow.enabled){var g=t.config.chart.dropShadow;new oe(this.ctx).dropShadow(d,g,c)}for(var p=0,f=t.config.plotOptions.heatmap.shadeIntensity,b=0;b-1&&this.pieClicked(g),i.config.dataLabels.enabled){var x=h.x,k=h.y,w=100*f/this.fullAngle+"%";if(0!==f&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?t.endAngle=t.endAngle-(a+n):a+n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(c=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(c)>this.fullAngle&&(c-=this.fullAngle);var d=Math.PI*(c-90)/180,g=i.centerX+s*Math.cos(l),p=i.centerY+s*Math.sin(l),f=i.centerX+s*Math.cos(d),b=i.centerY+s*Math.sin(d),m=M.polarToCartesian(i.centerX,i.centerY,i.donutSize,c),v=M.polarToCartesian(i.centerX,i.centerY,i.donutSize,o),A=r>180?1:0,h=["M",g,p,"A",s,s,0,A,1,f,b];return t="donut"===i.chartType?[].concat(h,["L",m.x,m.y,"A",i.donutSize,i.donutSize,0,A,0,v.x,v.y,"L",g,p,"z"]).join(" "):"pie"===i.chartType||"polarArea"===i.chartType?[].concat(h,["L",i.centerX,i.centerY,"L",g,p]).join(" "):[].concat(h).join(" "),n.roundPathCorners(t,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(e){var t=this.w,i=new it(this.ctx),a=new E(this.ctx),r=new St(this.ctx),s=a.group(),n=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),0),l=o.result.reverse(),c=o.result.length;this.maxY=o.niceMax;for(var d=t.globals.radialSize,g=d/(c-1),p=0;p1&&e.total.show&&(r=e.total.color);var n=s.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=s.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,e.value.formatter)(i,s),a||"function"!=typeof e.total.formatter||(i=e.total.formatter(s)),t=e.name.formatter(t,t===e.total.label,s),null!==n&&(n.textContent=t),null!==o&&(o.textContent=i),null!==n&&(n.style.fill=r)}},{key:"printDataLabelsInner",value:function(e,t){var i=this.w,a=e.getAttribute("data:value"),r=i.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(t,r,a,e);var s=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==s&&(s.style.opacity=1)}},{key:"drawSpokes",value:function(e){var t=this,i=this.w,a=new E(this.ctx),r=i.config.plotOptions.polarArea.spokes;if(0!==r.strokeWidth){for(var s=[],n=360/i.globals.series.length,o=0;o1)n&&!t.total.showAlways?l({makeSliceOut:!1,printLabel:!0}):this.printInnerLabels(t,t.total.label,t.total.formatter(r));else if(l({makeSliceOut:!1,printLabel:!0}),!n)if(r.globals.selectedDataPoints.length&&r.globals.series.length>1)if(r.globals.selectedDataPoints[0].length>0){var c=r.globals.selectedDataPoints[0],d=r.globals.dom.baseEl.querySelector(".apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(c));this.printDataLabelsInner(d,t)}else s&&r.globals.selectedDataPoints.length&&0===r.globals.selectedDataPoints[0].length&&(s.style.opacity=0);else s&&r.globals.series.length>1&&(s.style.opacity=0)}}]),y}(),Rt=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var t=this.w;this.graphics=new E(this.ctx),this.lineColorArr=void 0!==t.globals.stroke.colors?t.globals.stroke.colors:t.globals.colors,this.defaultSize=t.globals.svgHeight0&&(k=t.getPreviousPath(v));for(var w=0;w=10?e.x>0?(i="start",a+=10):e.x<0&&(i="end",a-=10):i="middle",Math.abs(e.y)>=t-10&&(e.y<0?r-=10:e.y>0&&(r+=10)),{textAnchor:i,newX:a,newY:r}}},{key:"getPreviousPath",value:function(e){for(var t=this.w,i=null,a=0;a0&&parseInt(r.realIndex,10)===parseInt(e,10)&&void 0!==t.globals.previousPaths[a].paths[0]&&(i=t.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;e=e||[],t=t||[];for(var a=[],r=0;r=360&&(b=360-Math.abs(this.startAngle)-.1);var m=r.drawPath({d:"",stroke:p,strokeWidth:l*parseInt(g.strokeWidth,10)/100,fill:"none",strokeOpacity:g.opacity,classes:"apexcharts-radialbar-area"});g.dropShadow.enabled&&n.dropShadow(m,g.dropShadow),d.add(m),m.attr("id","apexcharts-radialbarTrack-"+c),this.animatePaths(m,{centerX:i.centerX,centerY:i.centerY,endAngle:b,startAngle:f,size:i.size,i:c,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:a.globals.easing})}return s}},{key:"drawArcs",value:function(i){var a=this.w,r=new E(this.ctx),s=new ue(this.ctx),n=new oe(this.ctx),o=r.group(),l=this.getStrokeWidth(i);i.size=i.size-l/2;var c=a.config.plotOptions.radialBar.hollow.background,d=i.size-l*i.series.length-this.margin*i.series.length-l*parseInt(a.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,g=d-a.config.plotOptions.radialBar.hollow.margin;void 0!==a.config.plotOptions.radialBar.hollow.image&&(c=this.drawHollowImage(i,o,d,c));var p=this.drawHollow({size:g,centerX:i.centerX,centerY:i.centerY,fill:c||"transparent"});a.config.plotOptions.radialBar.hollow.dropShadow.enabled&&n.dropShadow(p,a.config.plotOptions.radialBar.hollow.dropShadow);var b=1;!this.radialDataLabels.total.show&&a.globals.series.length>1&&(b=0);var m=null;this.radialDataLabels.show&&(m=this.renderInnerDataLabels(this.radialDataLabels,{hollowSize:d,centerX:i.centerX,centerY:i.centerY,opacity:b})),"back"===a.config.plotOptions.radialBar.hollow.position&&(o.add(p),m&&o.add(m));var v=!1;a.config.plotOptions.radialBar.inverseOrder&&(v=!0);for(var A=v?i.series.length-1:0;v?A>=0:A100?100:i.series[A])/100,S=Math.round(this.totalAngle*w)+this.startAngle,L=void 0;a.globals.dataChanged&&(k=this.startAngle,L=Math.round(this.totalAngle*M.negToZero(a.globals.previousPaths[A])/100)+k),Math.abs(S)+Math.abs(x)>=360&&(S-=.01),Math.abs(L)+Math.abs(k)>=360&&(L-=.01);var C=S-x,z=Array.isArray(a.config.stroke.dashArray)?a.config.stroke.dashArray[A]:a.config.stroke.dashArray,T=r.drawPath({d:"",stroke:u,strokeWidth:l,fill:"none",fillOpacity:a.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+A,strokeDashArray:z});if(E.setAttrs(T.node,{"data:angle":C,"data:value":i.series[A]}),a.config.chart.dropShadow.enabled&&n.dropShadow(T,a.config.chart.dropShadow,A),n.setSelectionFilter(T,0,A),this.addListeners(T,this.radialDataLabels),h.add(T),T.attr({index:0,j:A}),this.barLabels.enabled){var Y=M.polarToCartesian(i.centerX,i.centerY,i.size,x),H=this.barLabels.formatter(a.globals.seriesNames[A],{seriesIndex:A,w:a}),B=["apexcharts-radialbar-label"];this.barLabels.onClick||B.push("apexcharts-no-click");var G=this.barLabels.useSeriesColors?a.globals.colors[A]:a.config.chart.foreColor;G||(G=a.config.chart.foreColor);var W=Y.x-this.barLabels.margin,j=Y.y,Z=r.drawText({x:W,y:j,text:H,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:G,cssClass:B.join(" ")});Z.on("click",this.onBarLabelClick),Z.attr({rel:A+1}),0!==x&&Z.attr({"transform-origin":"".concat(W," ").concat(j),transform:"rotate(".concat(x," 0 0)")}),h.add(Z)}var _=0;!this.initialAnim||a.globals.resized||a.globals.dataChanged||(_=a.config.chart.animations.speed),a.globals.dataChanged&&(_=a.config.chart.animations.dynamicAnimation.speed),this.animDur=_/(1.2*i.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(T,{centerX:i.centerX,centerY:i.centerY,endAngle:S,startAngle:x,prevEndAngle:L,prevStartAngle:k,size:i.size,i:A,totalItems:2,animBeginArr:this.animBeginArr,dur:_,shouldSetPrevPaths:!0,easing:a.globals.easing})}return{g:o,elHollow:p,dataLabels:m}}},{key:"drawHollow",value:function(i){var a=new E(this.ctx).drawCircle(2*i.size);return a.attr({class:"apexcharts-radialbar-hollow",cx:i.centerX,cy:i.centerY,r:i.size,fill:i.fill}),a}},{key:"drawHollowImage",value:function(i,a,r,s){var n=this.w,o=new ue(this.ctx),l=M.randomId(),c=n.config.plotOptions.radialBar.hollow.image;if(n.config.plotOptions.radialBar.hollow.imageClipped)o.clippedImgArea({width:r,height:r,image:c,patternID:"pattern".concat(n.globals.cuid).concat(l)}),s="url(#pattern".concat(n.globals.cuid).concat(l,")");else{var d=n.config.plotOptions.radialBar.hollow.imageWidth,g=n.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===d&&void 0===g){var p=n.globals.dom.Paper.image(c).loaded(function(b){this.move(i.centerX-b.width/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-b.height/2+n.config.plotOptions.radialBar.hollow.imageOffsetY)});a.add(p)}else{var f=n.globals.dom.Paper.image(c).loaded(function(b){this.move(i.centerX-d/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-g/2+n.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(d,g)});a.add(f)}}return s}},{key:"getStrokeWidth",value:function(i){return i.size*(100-parseInt(this.w.config.plotOptions.radialBar.hollow.size,10))/100/(i.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(i){var a=parseInt(i.target.getAttribute("rel"),10)-1,r=this.barLabels.onClick,s=this.w;r&&r(s.globals.seriesNames[a],{w:s,seriesIndex:a})}}]),t}(),Ft=function(y){ke(t,Oe);var e=ve(t);function t(){return F(this,t),e.apply(this,arguments)}return D(t,[{key:"draw",value:function(i,a){var r=this.w,s=new E(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=i,this.seriesRangeStart=r.globals.seriesRangeStart,this.seriesRangeEnd=r.globals.seriesRangeEnd,this.barHelpers.initVariables(i);for(var n=s.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),o=0;o0&&(this.visibleI=this.visibleI+1);var v=0,A=0,h=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[b][0],h=b);var u=this.barHelpers.initialPositions();f=u.y,g=u.zeroW,p=u.x,A=u.barWidth,v=u.barHeight,l=u.xDivision,c=u.yDivision,d=u.zeroH;for(var x=s.group({class:"apexcharts-datalabels","data:realIndex":b}),k=s.group({class:"apexcharts-rangebar-goals-markers"}),w=0;w0});return this.isHorizontal?(s=b.config.plotOptions.bar.rangeBarGroupRows?o+g*u:o+c*this.visibleI+g*u,x>-1&&!b.config.plotOptions.bar.rangeBarOverlap&&(m=b.globals.seriesRange[a][x].overlaps).indexOf(v)>-1&&(s=(c=f.barHeight/m.length)*this.visibleI+g*(100-parseInt(this.barOptions.barHeight,10))/100/2+c*(this.visibleI+m.indexOf(v))+g*u)):(u>-1&&(n=b.config.plotOptions.bar.rangeBarGroupRows?l+p*u:l+d*this.visibleI+p*u),x>-1&&!b.config.plotOptions.bar.rangeBarOverlap&&(m=b.globals.seriesRange[a][x].overlaps).indexOf(v)>-1&&(n=(d=f.barWidth/m.length)*this.visibleI+p*(100-parseInt(this.barOptions.barWidth,10))/100/2+d*(this.visibleI+m.indexOf(v))+p*u)),{barYPosition:s,barXPosition:n,barHeight:c,barWidth:d}}},{key:"drawRangeColumnPaths",value:function(i){var a=i.indexes,r=i.x,s=i.xDivision,n=i.barWidth,o=i.barXPosition,l=i.zeroH,c=this.w,d=a.i,g=a.j,p=this.yRatio[a.translationsIndex],f=a.realIndex,b=this.getRangeValue(f,g),m=Math.min(b.start,b.end),v=Math.max(b.start,b.end);null==this.series[d][g]?m=l:(m=l-m/p,v=l-v/p);var A=Math.abs(v-m),h=this.barHelpers.getColumnPaths({barXPosition:o,barWidth:n,y1:m,y2:v,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:a.realIndex,i:f,j:g,w:c});if(c.globals.isXNumeric){var u=this.getBarXForNumericXAxis({x:r,j:g,realIndex:f,barWidth:n});r=u.x,o=u.barXPosition}else r+=s;return{pathTo:h.pathTo,pathFrom:h.pathFrom,barHeight:A,x:r,y:v,goalY:this.barHelpers.getGoalValues("y",null,l,d,g,a.translationsIndex),barXPosition:o}}},{key:"drawRangeBarPaths",value:function(i){var a=i.indexes,r=i.y,o=i.yDivision,l=i.barHeight,c=i.barYPosition,d=i.zeroW,g=this.w,p=d+i.y1/this.invertedYRatio,f=d+i.y2/this.invertedYRatio,b=Math.abs(f-p),m=this.barHelpers.getBarpaths({barYPosition:c,barHeight:l,x1:p,x2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:a.realIndex,realIndex:a.realIndex,j:a.j,w:g});return g.globals.isXNumeric||(r+=o),{pathTo:m.pathTo,pathFrom:m.pathFrom,barWidth:b,x:f,goalX:this.barHelpers.getGoalValues("x",d,null,a.realIndex,a.j),y:r}}},{key:"getRangeValue",value:function(i,a){var r=this.w;return{start:r.globals.seriesRangeStart[i][a],end:r.globals.seriesRangeEnd[i][a]}}}]),t}(),Dt=function(){function y(e){F(this,y),this.w=e.w,this.lineCtx=e}return D(y,[{key:"sameValueSeriesFix",value:function(e,t){var i=this.w;if(("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[e])&&new te(this.lineCtx.ctx,i).seriesHaveSameValues(e)){var a=t[e].slice();a[a.length-1]=a[a.length-1]+1e-6,t[e]=a}return t}},{key:"calculatePoints",value:function(e){var t=e.series,a=e.x,r=e.y,s=e.i,n=e.j,o=e.prevY,l=this.w,c=[],d=[];if(0===n){var g=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(g=(l.globals.seriesX[e.realIndex][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),c.push(g),d.push(M.isNumber(t[s][0])?o+l.config.markers.offsetY:null),c.push(a+l.config.markers.offsetX),d.push(M.isNumber(t[s][n+1])?r+l.config.markers.offsetY:null)}else c.push(a+l.config.markers.offsetX),d.push(M.isNumber(t[s][n+1])?r+l.config.markers.offsetY:null);return{x:c,y:d}}},{key:"checkPreviousPaths",value:function(e){for(var t=e.pathFromLine,i=e.pathFromArea,a=e.realIndex,r=this.w,s=0;s0&&parseInt(n.realIndex,10)===parseInt(a,10)&&("line"===n.type?(this.lineCtx.appendPathFrom=!1,t=r.globals.previousPaths[s].paths[0].d):"area"===n.type&&(this.lineCtx.appendPathFrom=!1,i=r.globals.previousPaths[s].paths[0].d,r.config.stroke.show&&r.globals.previousPaths[s].paths[1]&&(t=r.globals.previousPaths[s].paths[1].d)))}return{pathFromLine:t,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(e){var t,i,a,r=e.i,s=e.realIndex,n=e.series,o=e.prevY,l=e.lineYPosition,c=e.translationsIndex,d=this.w,g=d.config.chart.stacked&&!d.globals.comboCharts||d.config.chart.stacked&&d.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(t=this.w.config.series[s])||void 0===t?void 0:t.type)||"column"===(null===(i=this.w.config.series[s])||void 0===i?void 0:i.type));if(void 0!==(null===(a=n[r])||void 0===a?void 0:a[0]))o=(l=g&&r>0?this.lineCtx.prevSeriesY[r-1][0]:this.lineCtx.zeroY)-n[r][0]/this.lineCtx.yRatio[c]+2*(this.lineCtx.isReversed?n[r][0]/this.lineCtx.yRatio[c]:0);else if(g&&r>0&&void 0===n[r][0])for(var p=r-1;p>=0;p--)if(null!=n[p][0]){o=l=this.lineCtx.prevSeriesY[p][0];break}return{prevY:o,lineYPosition:l}}}]),y}(),Bt=function(y,e,t){var i=y.slice(e,t);if(e){if(t-e>1&&i[1].length<6){var a=i[0].length;i[1]=[2*i[0][a-2]-i[0][a-4],2*i[0][a-1]-i[0][a-3]].concat(i[1])}i[0]=i[0].slice(-2)}return i};function xt(y,e){return(e[1]-y[1])/(e[0]-y[0])}var bt=function(){function y(e,t,i){F(this,y),this.ctx=e,this.w=e.w,this.xyRatios=t,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||i,this.scatter=new Ke(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Dt(this),this.markers=new Me(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return D(y,[{key:"draw",value:function(e,t,i,a){var r,s=this.w,n=new E(this.ctx),o=s.globals.comboCharts?t:s.config.chart.type,l=n.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),c=new te(this.ctx,s);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=c.getLogSeries(e),this.yRatio=c.getLogYRatios(this.yRatio);for(var d=[],g=0;g1?p:0;this._initSerieVariables(e,g,p);var b=[],m=[],v=[],A=s.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,p),s.globals.isXNumeric&&s.globals.seriesX.length>0&&(A=(s.globals.seriesX[p][0]-s.globals.minX)/this.xRatio),v.push(A);var h,u=A,x=void 0,k=u,w=this.zeroY,S=this.zeroY;w=this.lineHelpers.determineFirstPrevY({i:g,realIndex:p,series:e,prevY:w,lineYPosition:0,translationsIndex:f}).prevY,b.push("monotoneCubic"===s.config.stroke.curve&&null===e[g][0]?null:w),h=w,"rangeArea"===o&&(x=S=this.lineHelpers.determineFirstPrevY({i:g,realIndex:p,series:a,prevY:S,lineYPosition:0,translationsIndex:f}).prevY,m.push(null!==b[0]?S:null));var L=this._calculatePathsFrom({type:o,series:e,i:g,realIndex:p,translationsIndex:f,prevX:k,prevY:w,prevY2:S}),C=[b[0]],z=[m[0]],T={type:o,series:e,realIndex:p,translationsIndex:f,i:g,x:A,y:1,pX:u,pY:h,pathsFrom:L,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:v,yArrj:b,y2Arrj:m,seriesRangeEnd:a},I=this._iterateOverDataPoints(O(O({},T),{},{iterations:"rangeArea"===o?e[g].length-1:void 0,isRangeStart:!0}));if("rangeArea"===o){for(var Y=this._calculatePathsFrom({series:a,i:g,realIndex:p,prevX:k,prevY:S}),H=this._iterateOverDataPoints(O(O({},T),{},{series:a,xArrj:[A],yArrj:C,y2Arrj:z,pY:x,areaPaths:I.areaPaths,pathsFrom:Y,iterations:a[g].length-1,isRangeStart:!1})),B=I.linePaths.length/2,G=0;G0;W--)l.add(d[W-1]);else for(var j=0;j1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],s=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[s]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[s]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=r.group({class:"apexcharts-series",zIndex:void 0!==a.config.series[i].zIndex?a.config.series[i].zIndex:i,seriesName:M.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=r.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=r.group({class:"apexcharts-datalabels","data:realIndex":i}),this.elSeries.attr({"data:longestSeries":e[t].length===a.globals.dataPoints,rel:t+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var t,i,a,r,s=e.type,n=e.series,o=e.i,l=e.realIndex,c=e.translationsIndex,d=e.prevX,g=e.prevY,p=e.prevY2,f=this.w,b=new E(this.ctx);if(null===n[o][0]){for(var m=0;m0){var v=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:r,realIndex:l});a=v.pathFromLine,r=v.pathFromArea}return{prevX:d,prevY:g,linePath:t,areaPath:i,pathFromLine:a,pathFromArea:r}}},{key:"_handlePaths",value:function(e){var t=e.type,i=e.realIndex,a=e.i,r=e.paths,s=this.w,n=new E(this.ctx),o=new ue(this.ctx);this.prevSeriesY.push(r.yArrj),s.globals.seriesXvalues[i]=r.xArrj,s.globals.seriesYvalues[i]=r.yArrj;var l=s.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==t){var c=s.globals.seriesXvalues[i][s.globals.seriesXvalues[i].length-l.count-1],d=n.drawRect(c,0,s.globals.gridWidth,s.globals.gridHeight,0);s.globals.dom.elForecastMask.appendChild(d.node);var g=n.drawRect(0,0,c,s.globals.gridHeight,0);s.globals.dom.elNonForecastMask.appendChild(g.node)}this.pointsChart||s.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var p={i:a,realIndex:i,animationDelay:a,initialSpeed:s.config.chart.animations.speed,dataChangeSpeed:s.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(t)};if("area"===t)for(var f=o.fillPath({seriesNumber:i}),b=0;b0&&"rangeArea"!==t){var w=n.renderPaths(x);w.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&w.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(w),w.attr("clip-path","url(#forecastMask".concat(s.globals.cuid,")")),k.attr("clip-path","url(#nonForecastMask".concat(s.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(e){var t,i,a=this,r=e.type,s=e.series,n=e.iterations,o=e.realIndex,l=e.translationsIndex,c=e.i,d=e.x,g=e.y,p=e.pX,f=e.pY,b=e.pathsFrom,m=e.linePaths,v=e.areaPaths,A=e.seriesIndex,h=e.lineYPosition,u=e.xArrj,x=e.yArrj,k=e.y2Arrj,w=e.isRangeStart,S=e.seriesRangeEnd,L=this.w,C=new E(this.ctx),z=this.yRatio,T=b.prevY,I=b.linePath,Y=b.areaPath,H=b.pathFromLine,B=b.pathFromArea,G=M.isNumber(L.globals.minYArr[o])?L.globals.minYArr[o]:L.globals.minY;n||(n=L.globals.dataPoints>1?L.globals.dataPoints-1:L.globals.dataPoints);var W=function(he,pe){return pe-he/z[l]+2*(a.isReversed?he/z[l]:0)},j=g,Z=L.config.chart.stacked&&!L.globals.comboCharts||L.config.chart.stacked&&L.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(t=this.w.config.series[o])||void 0===t?void 0:t.type)||"column"===(null===(i=this.w.config.series[o])||void 0===i?void 0:i.type)),_=L.config.stroke.curve;Array.isArray(_)&&(_=Array.isArray(A)?_[A[c]]:_[c]);for(var ie,re=0,K=0;K0&&L.globals.collapsedSeries.length-1){pe--;break}return pe>=0?pe:0}(c-1)][K+1]:this.zeroY,be?g=W(G,h):(g=W(s[c][K+1],h),"rangeArea"===r&&(j=W(S[c][K+1],h))),u.push(d),!be||"smooth"!==L.config.stroke.curve&&"monotoneCubic"!==L.config.stroke.curve?(x.push(g),k.push(j)):(x.push(null),k.push(null));var q=this.lineHelpers.calculatePoints({series:s,x:d,y:g,realIndex:o,i:c,j:K,prevY:T}),Q=this._createPaths({type:r,series:s,i:c,realIndex:o,j:K,x:d,y:g,y2:j,xArrj:u,yArrj:x,y2Arrj:k,pX:p,pY:f,pathState:re,segmentStartX:ie,linePath:I,areaPath:Y,linePaths:m,areaPaths:v,curve:_,isRangeStart:w});v=Q.areaPaths,m=Q.linePaths,p=Q.pX,f=Q.pY,re=Q.pathState,ie=Q.segmentStartX,Y=Q.areaPath,I=Q.linePath,!this.appendPathFrom||"monotoneCubic"===_&&"rangeArea"===r||(H+=C.line(d,this.zeroY),B+=C.line(d,this.zeroY)),this.handleNullDataPoints(s,q,c,K,o),this._handleMarkersAndLabels({type:r,pointsPos:q,i:c,j:K,realIndex:o,isRangeStart:w})}return{yArrj:x,xArrj:u,pathFromArea:B,areaPaths:v,pathFromLine:H,linePaths:m,linePath:I,areaPath:Y}}},{key:"_handleMarkersAndLabels",value:function(e){var t=e.type,i=e.pointsPos,a=e.isRangeStart,r=e.i,s=e.j,n=e.realIndex,o=this.w,l=new Ae(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,s,{realIndex:n,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[r].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var c=this.markers.plotChartMarkers(i,n,s+1);null!==c&&this.elPointsMain.add(c)}var d=l.drawDataLabel({type:t,isRangeStart:a,pos:i,i:n,j:s+1});null!==d&&this.elDataLabelsWrap.add(d)}},{key:"_createPaths",value:function(e){var k,t=e.type,i=e.series,a=e.i,r=e.j,s=e.x,n=e.y,o=e.xArrj,l=e.yArrj,c=e.y2,d=e.y2Arrj,g=e.pX,p=e.pY,f=e.pathState,b=e.segmentStartX,m=e.linePath,v=e.areaPath,A=e.linePaths,h=e.areaPaths,u=e.curve,x=e.isRangeStart,w=new E(this.ctx),S=this.areaBottomY,L="rangeArea"===t,C="rangeArea"===t&&x;switch(u){case"monotoneCubic":var z=x?l:d;switch(f){case 0:if(null===z[r+1])break;f=1;case 1:if(!(L?o.length===i[a].length:r===i[a].length-2))break;case 2:var T=x?o:o.slice().reverse(),I=x?z:z.slice().reverse(),Y=(k=I,T.map(function($,q){return[$,k[q]]}).filter(function($){return null!==$[1]})),H=Y.length>1?function(y){var e=function(y){for(var e,t,i,a,r=function(c){for(var d=[],g=c[0],p=c[1],f=d[0]=xt(g,p),b=1,m=c.length-1;b9&&(a=3*i/Math.sqrt(a),r[o]=a*e,r[o+1]=a*t);for(var l=0;l<=s;l++)a=(y[Math.min(s,l+1)][0]-y[Math.max(0,l-1)][0])/(6*(1+r[l]*r[l])),n.push([a||0,r[l]*a||0]);return n}(y),t=y[1],i=y[0],a=[],r=e[1],s=e[0];a.push(i,[i[0]+s[0],i[1]+s[1],t[0]-r[0],t[1]-r[1],t[0],t[1]]);for(var n=2,o=e.length;n0&&(de.push(we),we=0)}),we>0&&de.push(we),de}($),he=[],pe=0,fe=0;pe4?(fe+="C".concat(de[0],", ").concat(de[1]),fe+=", ".concat(de[2],", ").concat(de[3]),fe+=", ".concat(de[4],", ").concat(de[5])):we>2&&(fe+="S".concat(de[0],", ").concat(de[1]),fe+=", ".concat(de[2],", ").concat(de[3]))}return fe}($),Q=W,he=(W+=$.length)-1;C?m=w.move(Y[Q][0],Y[Q][1])+q:L?m=w.move(B[Q][0],B[Q][1])+w.line(Y[Q][0],Y[Q][1])+q+w.line(B[he][0],B[he][1]):(m=w.move(Y[Q][0],Y[Q][1])+q,v=m+w.line(Y[he][0],S)+w.line(Y[Q][0],S)+"z",h.push(v)),A.push(m)}),L&&G>1&&!C){var j=A.slice(G).reverse();A.splice(G),j.forEach(function($){return A.push($)})}f=0}break;case"smooth":var Z=.35*(s-g);if(null===i[a][r])f=0;else switch(f){case 0:if(b=g,m=C?w.move(g,d[r])+w.line(g,p):w.move(g,p),v=w.move(g,p),f=1,r=i[a].length-2&&(m+=C?w.curve(s,n,s,n,s,c)+w.move(s,c):w.move(s,n),v+=w.curve(s,n,s,n,s,S)+w.line(b,S)+"z",A.push(m),h.push(v))}}g=s,p=n;break;default:var re=function($,q,Q){var he=[];switch($){case"stepline":he=w.line(q,null,"H")+w.line(null,Q,"V");break;case"linestep":he=w.line(null,Q,"V")+w.line(q,null,"H");break;case"straight":he=w.line(q,Q)}return he};if(null===i[a][r])f=0;else switch(f){case 0:if(b=g,m=C?w.move(g,d[r])+w.line(g,p):w.move(g,p),v=w.move(g,p),f=1,r=i[a].length-2&&(m+=C?w.line(s,c):w.move(s,n),v+=w.line(s,S)+w.line(b,S)+"z",A.push(m),h.push(v))}}g=s,p=n}return{linePaths:A,areaPaths:h,pX:g,pY:p,pathState:f,segmentStartX:b,linePath:m,areaPath:v}}},{key:"handleNullDataPoints",value:function(e,t,i,a,r){var s=this.w;if(null===e[i][a]&&s.config.markers.showNullDataPoints||1===e[i].length){var n=this.strokeWidth-s.config.markers.strokeWidth/2;n>0||(n=0);var o=this.markers.plotChartMarkers(t,r,a+1,n,!0);null!==o&&this.elPointsMain.add(o)}}}]),y}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function y(n,o,l,c){this.xoffset=n,this.yoffset=o,this.height=c,this.width=l,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(d){var g,p=[],f=this.xoffset,b=this.yoffset,m=r(d)/this.height,v=r(d)/this.width;if(this.width>=this.height)for(g=0;g=this.height){var p=d/this.height;g=new y(this.xoffset+p,this.yoffset,this.width-p,this.height)}else{var b=d/this.width;g=new y(this.xoffset,this.yoffset+b,this.width,this.height-b)}return g}}function e(n,o,l,c,d){return c=void 0===c?0:c,d=void 0===d?0:d,function(p){var f,b,m=[];for(f=0;f=i(v,m))?(o.push(g),t(n.slice(1),o,l,c)):(p=l.cutArea(r(o),c),c.push(l.getCoordinates(o)),t(n,[],p,c)),c;c.push(l.getCoordinates(o))}function i(n,o){var l=Math.min.apply(Math,n),c=Math.max.apply(Math,n),d=r(n);return Math.max(Math.pow(o,2)*c/Math.pow(d,2),Math.pow(d,2)/(Math.pow(o,2)*l))}function a(n){return n&&n.constructor===Array}function r(n){var o,l=0;for(o=0;os-a&&l.width<=n-r){var c=o.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(-90 ".concat(c.x," ").concat(c.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(e,t,i,a,r,s){var n=new E(this.ctx),o=n.getTextRects(e,t).width+this.w.config.stroke.width+5>r-i&&s-a>r-i?s-a:r-i,l=n.getTextBasedOnMaxWidth({text:e,maxWidth:o,fontSize:t});return e.length!==l.length&&o/t<5?"":l}},{key:"animateTreemap",value:function(e,t,i,a){var r=new ye(this.ctx);r.animateRect(e,{x:t.x,y:t.y,width:t.width,height:t.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,function(){r.animationCompleted(e)})}}]),y}(),Vt=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return D(y,[{key:"calculateTimeScaleTicks",value:function(e,t){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var r=new se(this.ctx),s=(t-e)/864e5;this.determineInterval(s),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,s<.00011574074074074075?a.globals.disableZoomIn=!0:s>5e4&&(a.globals.disableZoomOut=!0);var n=r.getTimeUnitsfromTimestamp(e,t,this.utc),o=a.globals.gridWidth/s,l=o/24,c=l/60,d=c/60,g=Math.floor(24*s),p=Math.floor(1440*s),f=Math.floor(86400*s),b=Math.floor(s),m=Math.floor(s/30),v=Math.floor(s/365),A={minMillisecond:n.minMillisecond,minSecond:n.minSecond,minMinute:n.minMinute,minHour:n.minHour,minDate:n.minDate,minMonth:n.minMonth,minYear:n.minYear},h={firstVal:A,currentMillisecond:A.minMillisecond,currentSecond:A.minSecond,currentMinute:A.minMinute,currentHour:A.minHour,currentMonthDate:A.minDate,currentDate:A.minDate,currentMonth:A.minMonth,currentYear:A.minYear,daysWidthOnXAxis:o,hoursWidthOnXAxis:l,minutesWidthOnXAxis:c,secondsWidthOnXAxis:d,numberOfSeconds:f,numberOfMinutes:p,numberOfHours:g,numberOfDays:b,numberOfMonths:m,numberOfYears:v};switch(this.tickInterval){case"years":this.generateYearScale(h);break;case"months":case"half_year":this.generateMonthScale(h);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(h);break;case"hours":this.generateHourScale(h);break;case"minutes_fives":case"minutes":this.generateMinuteScale(h);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(h)}var u=this.timeScaleArray.map(function(x){var k={position:x.position,unit:x.unit,year:x.year,day:x.day?x.day:1,hour:x.hour?x.hour:0,month:x.month+1};return"month"===x.unit?O(O({},k),{},{day:1,value:x.value+1}):"day"===x.unit||"hour"===x.unit?O(O({},k),{},{value:x.value}):"minute"===x.unit?O(O({},k),{},{value:x.value,minute:x.value}):"second"===x.unit?O(O({},k),{},{value:x.value,minute:x.minute,second:x.second}):x});return u.filter(function(x){var k=1,w=Math.ceil(a.globals.gridWidth/120),S=x.value;void 0!==a.config.xaxis.tickAmount&&(w=a.config.xaxis.tickAmount),u.length>w&&(k=Math.floor(u.length/w));var L=!1,C=!1;switch(i.tickInterval){case"years":"year"===x.unit&&(L=!0);break;case"half_year":k=7,"year"===x.unit&&(L=!0);break;case"months":k=1,"year"===x.unit&&(L=!0);break;case"months_fortnight":k=15,"year"!==x.unit&&"month"!==x.unit||(L=!0),30===S&&(C=!0);break;case"months_days":k=10,"month"===x.unit&&(L=!0),30===S&&(C=!0);break;case"week_days":k=8,"month"===x.unit&&(L=!0);break;case"days":k=1,"month"===x.unit&&(L=!0);break;case"hours":"day"===x.unit&&(L=!0);break;case"minutes_fives":case"seconds_fives":S%5!=0&&(C=!0);break;case"seconds_tens":S%10!=0&&(C=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!C)return!0}else if((S%k==0||L)&&!C)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(e,t){var i=this.w,a=this.formatDates(e),r=this.removeOverlappingTS(a);i.globals.timescaleLabels=r.slice(),new Ye(this.ctx).plotCoords()}},{key:"determineInterval",value:function(e){var t=24*e,i=60*t;switch(!0){case e/365>5:this.tickInterval="years";break;case e>800:this.tickInterval="half_year";break;case e>180:this.tickInterval="months";break;case e>90:this.tickInterval="months_fortnight";break;case e>60:this.tickInterval="months_days";break;case e>30:this.tickInterval="week_days";break;case e>2:this.tickInterval="days";break;case t>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(e){var t=e.firstVal,i=e.currentMonth,a=e.currentYear,r=e.daysWidthOnXAxis,s=e.numberOfYears,n=t.minYear,o=0,l=new se(this.ctx),c="year";if(t.minDate>1||t.minMonth>0){var d=l.determineRemainingDaysOfYear(t.minYear,t.minMonth,t.minDate);o=(l.determineDaysOfYear(t.minYear)-d+1)*r,this.timeScaleArray.push({position:o,value:n=t.minYear+1,unit:c,year:n,month:M.monthMod(i+1)})}else 1===t.minDate&&0===t.minMonth&&this.timeScaleArray.push({position:o,value:n,unit:c,year:a,month:M.monthMod(i+1)});for(var g=n,p=o,f=0;f1){l=(c.determineDaysOfMonths(a+1,t.minYear)-i+1)*s,o=M.monthMod(a+1);var p=r+g,f=M.monthMod(o),b=o;0===o&&(d="year",b=p,f=1,p+=g+=1),this.timeScaleArray.push({position:l,value:b,unit:d,year:p,month:f})}else this.timeScaleArray.push({position:l,value:o,unit:d,year:r,month:M.monthMod(a)});for(var m=o+1,v=l,A=0,h=1;An.determineDaysOfMonths(u+1,x)&&(c=1,o="month",p=u+=1),u},g=(24-t.minHour)*r,p=l,f=d(c,i,a);0===t.minHour&&1===t.minDate?(g=0,p=M.monthMod(t.minMonth),o="month",c=t.minDate):1!==t.minDate&&0===t.minHour&&0===t.minMinute&&(g=0,p=l=t.minDate,f=d(c=l,i,a)),this.timeScaleArray.push({position:g,value:p,unit:o,year:this._getYear(a,f,0),month:M.monthMod(f),day:c});for(var b=g,m=0;mo.determineDaysOfMonths(w+1,r)&&(m=1,w+=1),{month:w,date:m}},d=function(k,w){return k>o.determineDaysOfMonths(w+1,r)?w+=1:w},g=60-(t.minMinute+t.minSecond/60),p=g*s,f=t.minHour+1,b=f;60===g&&(p=0,b=f=t.minHour);var m=i;b>=24&&(b=0,m+=1,l="day");var v=c(m,a).month;v=d(m,v),this.timeScaleArray.push({position:p,value:f,unit:l,day:m,hour:b,year:r,month:M.monthMod(v)}),b++;for(var A=p,h=0;h=24&&(b=0,l="day",v=c(m+=1,v).month,v=d(m,v));var u=this._getYear(r,v,0);this.timeScaleArray.push({position:A=60*s+A,value:0===b?m:b,unit:l,hour:b,day:m,year:u,month:M.monthMod(v)}),b++}}},{key:"generateMinuteScale",value:function(e){for(var l=e.minutesWidthOnXAxis,d=e.numberOfMinutes,g=e.currentMinute+1,p=e.currentDate,f=e.currentMonth,b=e.currentYear,m=e.currentHour,v=(60-e.currentSecond-e.currentMillisecond/1e3)*e.secondsWidthOnXAxis,A=0;A=60&&(g=0,24===(m+=1)&&(m=0)),this.timeScaleArray.push({position:v,value:g,unit:"minute",hour:m,minute:g,day:p,year:this._getYear(b,f,0),month:M.monthMod(f)}),v+=l,g++}},{key:"generateSecondScale",value:function(e){for(var l=e.secondsWidthOnXAxis,c=e.numberOfSeconds,d=e.currentSecond+1,g=e.currentMinute,p=e.currentDate,f=e.currentMonth,b=e.currentYear,m=e.currentHour,v=(1e3-e.currentMillisecond)/1e3*l,A=0;A=60&&(d=0,++g>=60&&(g=0,24==++m&&(m=0))),this.timeScaleArray.push({position:v,value:d,unit:"second",hour:m,minute:g,second:d,day:p,year:this._getYear(b,f,0),month:M.monthMod(f)}),v+=l,d++}},{key:"createRawDateString",value:function(e,t){var i=e.year;return 0===e.month&&(e.month=1),i+="-"+("0"+e.month.toString()).slice(-2),i+="day"===e.unit?"day"===e.unit?"-"+("0"+t).slice(-2):"-01":"-"+("0"+(e.day?e.day:"1")).slice(-2),i+="hour"===e.unit?"hour"===e.unit?"T"+("0"+t).slice(-2):"T00":"T"+("0"+(e.hour?e.hour:"0")).slice(-2),i+="minute"===e.unit?":"+("0"+t).slice(-2):":"+(e.minute?("0"+e.minute).slice(-2):"00"),i+="second"===e.unit?":"+("0"+t).slice(-2):":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(e){var t=this,i=this.w;return e.map(function(a){var r=a.value.toString(),s=new se(t.ctx),n=t.createRawDateString(a,r),o=s.getDate(s.parseDate(n));if(t.utc||(o=s.getDate(s.parseDateWithTimezone(n))),void 0===i.config.xaxis.labels.format){var l="dd MMM",c=i.config.xaxis.labels.datetimeFormatter;"year"===a.unit&&(l=c.year),"month"===a.unit&&(l=c.month),"day"===a.unit&&(l=c.day),"hour"===a.unit&&(l=c.hour),"minute"===a.unit&&(l=c.minute),"second"===a.unit&&(l=c.second),r=s.formatDate(o,l)}else r=s.formatDate(o,i.config.xaxis.labels.format);return{dateString:n,position:a.position,value:r,unit:a.unit,year:a.year,month:a.month}})}},{key:"removeOverlappingTS",value:function(e){var t,i=this,a=new E(this.ctx),r=!1;e.length>0&&e[0].value&&e.every(function(o){return o.value.length===e[0].value.length})&&(r=!0,t=a.getTextRects(e[0].value).width);var s=0;return e.map(function(o,l){if(l>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var c=r?t:a.getTextRects(e[s].value).width;return o.position>e[s].position+c+10?(s=l,o):null}return o}).filter(function(o){return null!==o})}},{key:"_getYear",value:function(e,t,i){return e+Math.floor(t/12)+i}}]),y}(),jt=function(){function y(e,t){F(this,y),this.ctx=t,this.w=t.w,this.el=e}return D(y,[{key:"setupElements",value:function(){var e=this.w.globals,t=this.w.config,i=t.chart.type;e.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].indexOf(i)>-1,e.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].indexOf(i)>-1,e.isBarHorizontal=("bar"===t.chart.type||"rangeBar"===t.chart.type||"boxPlot"===t.chart.type)&&t.plotOptions.bar.horizontal,e.chartClass=".apexcharts"+e.chartID,e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),E.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas "+e.chartClass.substring(1)}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=new window.SVG.Doc(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(t.chart.offsetX,", ").concat(t.chart.offsetY,")")}),e.dom.Paper.node.style.background="dark"!==t.theme.mode||t.chart.background?t.chart.background:"rgba(0, 0, 0, 0.8)",this.setSVGDimensions(),e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject"),E.setAttrs(e.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.dom.elLegendForeign.appendChild(e.dom.elLegendWrap),e.dom.Paper.node.appendChild(e.dom.elLegendForeign),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(e,t){var i=this.w,a=i.config,r=i.globals,s={series:[],i:[]},n={series:[],i:[]},o={series:[],i:[]},l={series:[],i:[]},c={series:[],i:[]},d={series:[],i:[]},g={series:[],i:[]},p={series:[],i:[]},f={series:[],seriesRangeEnd:[],i:[]},b=void 0!==a.chart.type?a.chart.type:"line",m=0;r.series.map(function(L,C){void 0!==e[C].type?"column"===e[C].type||"bar"===e[C].type?(c.series.push(L),c.i.push(C),i.globals.columnSeries=c.series,"bar"!==b&&(r.series.length>1&&a.plotOptions.bar.horizontal&&console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"),m++)):"area"===e[C].type?(n.series.push(L),n.i.push(C),b!==e[C].type&&m++):"line"===e[C].type?(s.series.push(L),s.i.push(C),b!==e[C].type&&m++):"scatter"===e[C].type?(o.series.push(L),o.i.push(C)):"bubble"===e[C].type?(l.series.push(L),l.i.push(C),b!==e[C].type&&m++):"candlestick"===e[C].type?(d.series.push(L),d.i.push(C),b!==e[C].type&&m++):"boxPlot"===e[C].type?(g.series.push(L),g.i.push(C),b!==e[C].type&&m++):"rangeBar"===e[C].type?(p.series.push(L),p.i.push(C),b!==e[C].type&&m++):"rangeArea"===e[C].type?(f.series.push(r.seriesRangeStart[C]),f.seriesRangeEnd.push(r.seriesRangeEnd[C]),f.i.push(C),b!==e[C].type&&m++):console.warn("You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble/candlestick/boxPlot/rangeBar/rangeArea"):(s.series.push(L),s.i.push(C))}),r.comboCharts||(r.comboCharts=m>0);var v=new bt(this.ctx,t),A=new ft(this.ctx,t);this.ctx.pie=new Ct(this.ctx);var h=new Ot(this.ctx);this.ctx.rangeBar=new Ft(this.ctx,t);var u=new Rt(this.ctx),x=[];if(r.comboCharts){if(n.series.length>0&&x.push(v.draw(n.series,"area",n.i)),c.series.length>0)if(i.config.chart.stacked){var k=new At(this.ctx,t);x.push(k.draw(c.series,c.i))}else this.ctx.bar=new Oe(this.ctx,t),x.push(this.ctx.bar.draw(c.series,c.i));if(f.series.length>0&&x.push(v.draw(f.series,"rangeArea",f.i,f.seriesRangeEnd)),s.series.length>0&&x.push(v.draw(s.series,"line",s.i)),d.series.length>0&&x.push(A.draw(d.series,"candlestick",d.i)),g.series.length>0&&x.push(A.draw(g.series,"boxPlot",g.i)),p.series.length>0&&x.push(this.ctx.rangeBar.draw(p.series,p.i)),o.series.length>0){var w=new bt(this.ctx,t,!0);x.push(w.draw(o.series,"scatter",o.i))}if(l.series.length>0){var S=new bt(this.ctx,t,!0);x.push(S.draw(l.series,"bubble",l.i))}}else switch(a.chart.type){case"line":x=v.draw(r.series,"line");break;case"area":x=v.draw(r.series,"area");break;case"bar":a.chart.stacked?x=new At(this.ctx,t).draw(r.series):(this.ctx.bar=new Oe(this.ctx,t),x=this.ctx.bar.draw(r.series));break;case"candlestick":x=new ft(this.ctx,t).draw(r.series,"candlestick");break;case"boxPlot":x=new ft(this.ctx,t).draw(r.series,a.chart.type);break;case"rangeBar":x=this.ctx.rangeBar.draw(r.series);break;case"rangeArea":x=v.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":x=new Yt(this.ctx,t).draw(r.series);break;case"treemap":x=new Wt(this.ctx,t).draw(r.series);break;case"pie":case"donut":case"polarArea":x=this.ctx.pie.draw(r.series);break;case"radialBar":x=h.draw(r.series);break;case"radar":x=u.draw(r.series);break;default:x=v.draw(r.series)}return x}},{key:"setSVGDimensions",value:function(){var e=this.w.globals,t=this.w.config;e.svgWidth=t.chart.width,e.svgHeight=t.chart.height;var i=M.getDimensions(this.el),a=t.chart.width.toString().split(/[0-9]+/g).pop();"%"===a?M.isNumber(i[0])&&(0===i[0].width&&(i=M.getDimensions(this.el.parentNode)),e.svgWidth=i[0]*parseInt(t.chart.width,10)/100):"px"!==a&&""!==a||(e.svgWidth=parseInt(t.chart.width,10));var r=t.chart.height.toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===r){var s=M.getDimensions(this.el.parentNode);e.svgHeight=s[1]*parseInt(t.chart.height,10)/100}else e.svgHeight=parseInt(t.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;e.svgWidth<0&&(e.svgWidth=0),e.svgHeight<0&&(e.svgHeight=0),E.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==r&&(e.dom.Paper.node.parentNode.parentNode.style.minHeight=e.svgHeight+(t.chart.sparkline.enabled?0:e.axisCharts?t.chart.parentHeightOffset:0)+"px"),e.dom.elWrap.style.width=e.svgWidth+"px",e.dom.elWrap.style.height=e.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var e=this.w.globals;E.setAttrs(e.dom.elGraphical.node,{transform:"translate("+e.translateX+", "+e.translateY+")"})}},{key:"resizeNonAxisCharts",value:function(){var e=this.w,t=e.globals,i=0,a=e.config.chart.sparkline.enabled?1:15;a+=e.config.grid.padding.bottom,"top"!==e.config.legend.position&&"bottom"!==e.config.legend.position||!e.config.legend.show||e.config.legend.floating||(i=new U(this.ctx).legendHelpers.getLegendBBox().clwh+10);var r=e.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),s=2.05*e.globals.radialSize;if(r&&!e.config.chart.sparkline.enabled&&0!==e.config.plotOptions.radialBar.startAngle){var n=M.getBoundingClientRect(r);s=n.bottom,s=Math.max(2.05*e.globals.radialSize,n.bottom-n.top)}var l=s+t.translateY+i+a;t.dom.elLegendForeign&&t.dom.elLegendForeign.setAttribute("height",l),e.config.chart.height&&String(e.config.chart.height).indexOf("%")>0||(t.dom.elWrap.style.height=l+"px",E.setAttrs(t.dom.Paper.node,{height:l}),t.dom.Paper.node.parentNode.parentNode.style.minHeight=l+"px")}},{key:"coreCalculations",value:function(){new We(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,t=function(){return e.w.config.series.map(function(r){return[]})},i=new Je,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=t(),a.seriesYvalues=t()}},{key:"isMultipleY",value:function(){if(this.w.config.yaxis.constructor===Array&&this.w.config.yaxis.length>1)return this.w.globals.isMultipleYAxis=!0,!0}},{key:"xySettings",value:function(){var e=null,t=this.w;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new Ve(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new Ve(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Vt(this.ctx);var i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new te(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(e){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var e=this,t=this.w;if(t.config.chart.brush.enabled&&"function"!=typeof t.config.chart.events.selection){var i=Array.isArray(t.config.chart.brush.targets)?t.config.chart.brush.targets:[t.config.chart.brush.target];i.forEach(function(a){var r=ApexCharts.getChartByID(a);r.w.globals.brushSource=e.ctx,"function"!=typeof r.w.config.chart.events.zoomed&&(r.w.config.chart.events.zoomed=function(){e.updateSourceChart(r)}),"function"!=typeof r.w.config.chart.events.scrolled&&(r.w.config.chart.events.scrolled=function(){e.updateSourceChart(r)})}),t.config.chart.events.selection=function(a,r){i.forEach(function(s){ApexCharts.getChartByID(s).ctx.updateHelpers._updateOptions({xaxis:{min:r.xaxis.min,max:r.xaxis.max}},!1,!1,!1,!1)})}}}}]),y}(),_t=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"_updateOptions",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise(function(n){var o=[t.ctx];r&&(o=t.ctx.getSyncedCharts()),t.ctx.w.globals.isExecCalled&&(o=[t.ctx],t.ctx.w.globals.isExecCalled=!1),o.forEach(function(l,c){var d=l.w;if(d.globals.shouldAnimate=a,i||(d.globals.resized=!0,d.globals.dataChanged=!0,a&&l.series.getPreviousPaths()),e&&"object"===ae(e)&&(l.config=new Pe(e),e=te.extendArrayProps(l.config,e,d),l.w.globals.chartID!==t.ctx.w.globals.chartID&&delete e.series,d.config=M.extend(d.config,e),s&&(d.globals.lastXAxis=e.xaxis?M.clone(e.xaxis):[],d.globals.lastYAxis=e.yaxis?M.clone(e.yaxis):[],d.globals.initialConfig=M.extend({},d.config),d.globals.initialSeries=M.clone(d.config.series),e.series))){for(var g=0;g2&&void 0!==arguments[2]&&arguments[2];return new Promise(function(r){var s,n=i.w;return n.globals.shouldAnimate=t,n.globals.dataChanged=!0,t&&i.ctx.series.getPreviousPaths(),n.globals.axisCharts?(0===(s=e.map(function(o,l){return i._extendSeries(o,l)})).length&&(s=[{data:[]}]),n.config.series=s):n.config.series=e.slice(),a&&(n.globals.initialConfig.series=M.clone(n.config.series),n.globals.initialSeries=M.clone(n.config.series)),i.ctx.update().then(function(){r(i.ctx)})})}},{key:"_extendSeries",value:function(e,t){var i=this.w,a=i.config.series[t];return O(O({},i.config.series[t]),{},{name:e.name?e.name:a?.name,color:e.color?e.color:a?.color,type:e.type?e.type:a?.type,group:e.group?e.group:a?.group,data:e.data?e.data:a?.data,zIndex:void 0!==e.zIndex?e.zIndex:t})}},{key:"toggleDataPointSelection",value:function(e,t){var i=this.w,a=null,r=".apexcharts-series[data\\:realIndex='".concat(e,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.select("".concat(r," path[j='").concat(t,"'], ").concat(r," circle[j='").concat(t,"'], ").concat(r," rect[j='").concat(t,"']")).members[0]:void 0===t&&(a=i.globals.dom.Paper.select("".concat(r," path[j='").concat(e,"']")).members[0],"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(e)),a?(new E(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(e){var t=this.w;if(["min","max"].forEach(function(a){void 0!==e.xaxis[a]&&(t.config.xaxis[a]=e.xaxis[a],t.globals.lastXAxis[a]=e.xaxis[a])}),e.xaxis.categories&&e.xaxis.categories.length&&(t.config.xaxis.categories=e.xaxis.categories),t.config.xaxis.convertedCatToNumeric){var i=new Le(e);e=i.convertCatToNumericXaxis(e,this.ctx)}return e}},{key:"forceYAxisUpdate",value:function(e){return e.chart&&e.chart.stacked&&"100%"===e.chart.stackType&&(Array.isArray(e.yaxis)?e.yaxis.forEach(function(t,i){e.yaxis[i].min=0,e.yaxis[i].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}},{key:"revertDefaultAxisMinMax",value:function(e){var t=this,i=this.w,a=i.globals.lastXAxis,r=i.globals.lastYAxis;e&&e.xaxis&&(a=e.xaxis),e&&e.yaxis&&(r=e.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max,i.config.yaxis.map(function(n,o){i.globals.zoomed||void 0!==r[o]?function(n){void 0!==r[n]&&(i.config.yaxis[n].min=r[n].min,i.config.yaxis[n].max=r[n].max)}(o):void 0!==t.ctx.opts.yaxis[o]&&(n.min=t.ctx.opts.yaxis[o].min,n.max=t.ctx.opts.yaxis[o].max)})}}]),y}();mt=typeof window<"u"?window:void 0,Lt=function(y,e){var t=(void 0!==this?this:y).SVG=function(h){if(t.supported)return h=new t.Doc(h),t.parser.draw||t.prepare(),h};if(t.ns="http://www.w3.org/2000/svg",t.xmlns="http://www.w3.org/2000/xmlns/",t.xlink="http://www.w3.org/1999/xlink",t.svgjs="http://svgjs.dev",t.supported=!0,!t.supported)return!1;t.did=1e3,t.eid=function(h){return"Svgjs"+c(h)+t.did++},t.create=function(h){var u=e.createElementNS(this.ns,h);return u.setAttribute("id",this.eid(h)),u},t.extend=function(){var h,u;u=(h=[].slice.call(arguments)).pop();for(var x=h.length-1;x>=0;x--)if(h[x])for(var k in u)h[x].prototype[k]=u[k];t.Set&&t.Set.inherit&&t.Set.inherit()},t.invent=function(h){var u="function"==typeof h.create?h.create:function(){this.constructor.call(this,t.create(h.create))};return h.inherit&&(u.prototype=new h.inherit),h.extend&&t.extend(u,h.extend),h.construct&&t.extend(h.parent||t.Container,h.construct),u},t.adopt=function(h){return h?h.instance?h.instance:((u="svg"==h.nodeName?h.parentNode instanceof y.SVGElement?new t.Nested:new t.Doc:"linearGradient"==h.nodeName?new t.Gradient("linear"):"radialGradient"==h.nodeName?new t.Gradient("radial"):t[c(h.nodeName)]?new(t[c(h.nodeName)]):new t.Element(h)).type=h.nodeName,u.node=h,h.instance=u,u instanceof t.Doc&&u.namespace().defs(),u.setData(JSON.parse(h.getAttribute("svgjs:data"))||{}),u):null;var u},t.prepare=function(){var h=e.getElementsByTagName("body")[0],u=(h?new t.Doc(h):t.adopt(e.documentElement).nested()).size(2,0);t.parser={body:h||e.documentElement,draw:u.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:u.polyline().node,path:u.path().node,native:t.create("svg")}},t.parser={native:t.create("svg")},e.addEventListener("DOMContentLoaded",function(){t.parser.draw||t.prepare()},!1),t.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},t.utils={map:function(h,u){for(var x=h.length,k=[],w=0;w1?1:h)),g:~~(this.g+(this.destination.g-this.g)*h),b:~~(this.b+(this.destination.b-this.b)*h)}):this}}),t.Color.test=function(h){return t.regex.isHex.test(h+="")||t.regex.isRgb.test(h)},t.Color.isRgb=function(h){return h&&"number"==typeof h.r&&"number"==typeof h.g&&"number"==typeof h.b},t.Color.isColor=function(h){return t.Color.isRgb(h)||t.Color.test(h)},t.Array=function(h,u){0==(h=(h||[]).valueOf()).length&&u&&(h=u.valueOf()),this.value=this.parse(h)},t.extend(t.Array,{toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(h){return h=h.valueOf(),Array.isArray(h)?h:this.split(h)}}),t.PointArray=function(h,u){t.Array.call(this,h,u||[[0,0]])},t.PointArray.prototype=new t.Array,t.PointArray.prototype.constructor=t.PointArray;for(var i={M:function(h,u,x){return u.x=x.x=h[0],u.y=x.y=h[1],["M",u.x,u.y]},L:function(h,u){return u.x=h[0],u.y=h[1],["L",h[0],h[1]]},H:function(h,u){return u.x=h[0],["H",h[0]]},V:function(h,u){return u.y=h[0],["V",h[0]]},C:function(h,u){return u.x=h[4],u.y=h[5],["C",h[0],h[1],h[2],h[3],h[4],h[5]]},Q:function(h,u){return u.x=h[2],u.y=h[3],["Q",h[0],h[1],h[2],h[3]]},S:function(h,u){return u.x=h[2],u.y=h[3],["S",h[0],h[1],h[2],h[3]]},Z:function(h,u,x){return u.x=x.x,u.y=x.y,["Z"]}},a="mlhvqtcsaz".split(""),r=0,s=a.length;rL);return k},bbox:function(){return t.parser.draw||t.prepare(),t.parser.path.setAttribute("d",this.toString()),t.parser.path.getBBox()}}),t.Number=t.invent({create:function(h,u){this.value=0,this.unit=u||"","number"==typeof h?this.value=isNaN(h)?0:isFinite(h)?h:h<0?-34e37:34e37:"string"==typeof h?(u=h.match(t.regex.numberAndUnit))&&(this.value=parseFloat(u[1]),"%"==u[5]?this.value/=100:"s"==u[5]&&(this.value*=1e3),this.unit=u[5]):h instanceof t.Number&&(this.value=h.valueOf(),this.unit=h.unit)},extend:{toString:function(){return("%"==this.unit?~~(1e8*this.value)/1e6:"s"==this.unit?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(h){return h=new t.Number(h),new t.Number(this+h,this.unit||h.unit)},minus:function(h){return h=new t.Number(h),new t.Number(this-h,this.unit||h.unit)},times:function(h){return h=new t.Number(h),new t.Number(this*h,this.unit||h.unit)},divide:function(h){return h=new t.Number(h),new t.Number(this/h,this.unit||h.unit)},to:function(h){var u=new t.Number(this);return"string"==typeof h&&(u.unit=h),u},morph:function(h){return this.destination=new t.Number(h),h.relative&&(this.destination.value+=this.value),this},at:function(h){return this.destination?new t.Number(this.destination).minus(this).times(h).plus(this):this}}}),t.Element=t.invent({create:function(h){this._stroke=t.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=h)&&(this.type=h.nodeName,this.node.instance=this,this._stroke=h.getAttribute("stroke")||this._stroke)},extend:{x:function(h){return this.attr("x",h)},y:function(h){return this.attr("y",h)},cx:function(h){return null==h?this.x()+this.width()/2:this.x(h-this.width()/2)},cy:function(h){return null==h?this.y()+this.height()/2:this.y(h-this.height()/2)},move:function(h,u){return this.x(h).y(u)},center:function(h,u){return this.cx(h).cy(u)},width:function(h){return this.attr("width",h)},height:function(h){return this.attr("height",h)},size:function(h,u){var x=g(this,h,u);return this.width(new t.Number(x.width)).height(new t.Number(x.height))},clone:function(h){this.writeDataToDom();var u=b(this.node.cloneNode(!0));return h?h.add(u):this.after(u),u},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(h){return this.after(h).remove(),h},addTo:function(h){return h.put(this)},putIn:function(h){return h.add(this)},id:function(h){return this.attr("id",h)},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return"none"!=this.style("display")},toString:function(){return this.attr("id")},classes:function(){var h=this.attr("class");return null==h?[]:h.trim().split(t.regex.delimiter)},hasClass:function(h){return-1!=this.classes().indexOf(h)},addClass:function(h){if(!this.hasClass(h)){var u=this.classes();u.push(h),this.attr("class",u.join(" "))}return this},removeClass:function(h){return this.hasClass(h)&&this.attr("class",this.classes().filter(function(u){return u!=h}).join(" ")),this},toggleClass:function(h){return this.hasClass(h)?this.removeClass(h):this.addClass(h)},reference:function(h){return t.get(this.attr(h))},parent:function(h){var u=this;if(!u.node.parentNode)return null;if(u=t.adopt(u.node.parentNode),!h)return u;for(;u&&u.node instanceof y.SVGElement;){if("string"==typeof h?u.matches(h):u instanceof h)return u;if(!u.node.parentNode||"#document"==u.node.parentNode.nodeName)return null;u=t.adopt(u.node.parentNode)}},doc:function(){return this instanceof t.Doc?this:this.parent(t.Doc)},parents:function(h){var u=[],x=this;do{if(!(x=x.parent(h))||!x.node)break;u.push(x)}while(x.parent);return u},matches:function(h){return((u=this.node).matches||u.matchesSelector||u.msMatchesSelector||u.mozMatchesSelector||u.webkitMatchesSelector||u.oMatchesSelector).call(u,h);var u},native:function(){return this.node},svg:function(h){var u=e.createElement("svg");if(!(h&&this instanceof t.Parent))return u.appendChild(h=e.createElement("svg")),this.writeDataToDom(),h.appendChild(this.node.cloneNode(!0)),u.innerHTML.replace(/^/,"").replace(/<\/svg>$/,"");u.innerHTML=""+h.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2>")+"";for(var x=0,k=u.firstChild.childNodes.length;x":function(h){return-Math.cos(h*Math.PI)/2+.5},">":function(h){return Math.sin(h*Math.PI/2)},"<":function(h){return 1-Math.cos(h*Math.PI/2)}},t.morph=function(h){return function(u,x){return new t.MorphObj(u,x).at(h)}},t.Situation=t.invent({create:function(h){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new t.Number(h.duration).valueOf(),this.delay=new t.Number(h.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=h.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),t.FX=t.invent({create:function(h){this._target=h,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(h,u,x){"object"===ae(h)&&(u=h.ease,x=h.delay,h=h.duration);var k=new t.Situation({duration:h||1e3,delay:x||0,ease:t.easing[u||"-"]||u});return this.queue(k),this},target:function(h){return h&&h instanceof t.Element?(this._target=h,this):this._target},timeToAbsPos:function(h){return(h-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(h){return this.situation.duration/this._speed*h+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=y.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){y.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(h){return("function"==typeof h||h instanceof t.Situation)&&this.situations.push(h),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof t.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var h,u=this.situation;if(u.init)return this;for(var x in u.animations){h=this.target()[x](),Array.isArray(h)||(h=[h]),Array.isArray(u.animations[x])||(u.animations[x]=[u.animations[x]]);for(var k=h.length;k--;)u.animations[x][k]instanceof t.Number&&(h[k]=new t.Number(h[k])),u.animations[x][k]=h[k].morph(u.animations[x][k])}for(var x in u.attrs)u.attrs[x]=new t.MorphObj(this.target().attr(x),u.attrs[x]);for(var x in u.styles)u.styles[x]=new t.MorphObj(this.target().style(x),u.styles[x]);return u.initialTransformation=this.target().matrixify(),u.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(h,u){var x=this.active;return this.active=!1,u&&this.clearQueue(),h&&this.situation&&(!x&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},after:function(h){var u=this.last();return this.target().on("finished.fx",function x(k){k.detail.situation==u&&(h.call(this,u),this.off("finished.fx",x))}),this._callStart()},during:function(h){var u=this.last(),x=function(k){k.detail.situation==u&&h.call(this,k.detail.pos,t.morph(k.detail.pos),k.detail.eased,u)};return this.target().off("during.fx",x).on("during.fx",x),this.after(function(){this.off("during.fx",x)}),this._callStart()},afterAll:function(h){var u=function x(k){h.call(this),this.off("allfinished.fx",x)};return this.target().off("allfinished.fx",u).on("allfinished.fx",u),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(h,u,x){return this.last()[x||"animations"][h]=u,this._callStart()},step:function(h){var u,x,k;h||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops?(u=Math.max(this.absPos,0),x=Math.floor(u),!0===this.situation.loops||xthis.lastPos&&S<=w&&(this.situation.once[S].call(this.target(),this.pos,w),delete this.situation.once[S]);return this.active&&this.target().fire("during",{pos:this.pos,eased:w,fx:this,situation:this.situation}),this.situation?(this.eachAt(),1==this.pos&&!this.situation.reversed||this.situation.reversed&&0==this.pos?(this.stopAnimFrame(),this.target().fire("finished",{fx:this,situation:this.situation}),this.situations.length||(this.target().fire("allfinished"),this.situations.length||(this.target().off(".fx"),this.active=!1)),this.active?this.dequeue():this.clearCurrent()):!this.paused&&this.active&&this.startAnimFrame(),this.lastPos=w,this):this},eachAt:function(){var h,u=this,x=this.target(),k=this.situation;for(var w in k.animations)h=[].concat(k.animations[w]).map(function(C){return"string"!=typeof C&&C.at?C.at(k.ease(u.pos),u.pos):C}),x[w].apply(x,h);for(var w in k.attrs)h=[w].concat(k.attrs[w]).map(function(z){return"string"!=typeof z&&z.at?z.at(k.ease(u.pos),u.pos):z}),x.attr.apply(x,h);for(var w in k.styles)h=[w].concat(k.styles[w]).map(function(z){return"string"!=typeof z&&z.at?z.at(k.ease(u.pos),u.pos):z}),x.style.apply(x,h);if(k.transforms.length){h=k.initialTransformation,w=0;for(var S=k.transforms.length;w=0;--x)this[v[x]]=null!=h[v[x]]?h[v[x]]:u[v[x]]},extend:{extract:function(){var h=p(this,0,1);p(this,1,0);var u=180/Math.PI*Math.atan2(h.y,h.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(u*Math.PI/180)+this.f*Math.sin(u*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(u*Math.PI/180)+this.e*Math.sin(-u*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),rotation:u,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new t.Matrix(this)}},clone:function(){return new t.Matrix(this)},morph:function(h){return this.destination=new t.Matrix(h),this},multiply:function(h){return new t.Matrix(this.native().multiply((u=h,u instanceof t.Matrix||(u=new t.Matrix(u)),u).native()));var u},inverse:function(){return new t.Matrix(this.native().inverse())},translate:function(h,u){return new t.Matrix(this.native().translate(h||0,u||0))},native:function(){for(var h=t.parser.native.createSVGMatrix(),u=v.length-1;u>=0;u--)h[v[u]]=this[v[u]];return h},toString:function(){return"matrix("+m(this.a)+","+m(this.b)+","+m(this.c)+","+m(this.d)+","+m(this.e)+","+m(this.f)+")"}},parent:t.Element,construct:{ctm:function(){return new t.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof t.Nested){var h=this.rect(1,1),u=h.node.getScreenCTM();return h.remove(),new t.Matrix(u)}return new t.Matrix(this.node.getScreenCTM())}}}),t.Point=t.invent({create:function(h,u){var x;x=Array.isArray(h)?{x:h[0],y:h[1]}:"object"===ae(h)?{x:h.x,y:h.y}:null!=h?{x:h,y:u??h}:{x:0,y:0},this.x=x.x,this.y=x.y},extend:{clone:function(){return new t.Point(this)},morph:function(h,u){return this.destination=new t.Point(h,u),this}}}),t.extend(t.Element,{point:function(h,u){return new t.Point(h,u).transform(this.screenCTM().inverse())}}),t.extend(t.Element,{attr:function(h,u,x){if(null==h){for(h={},x=(u=this.node.attributes).length-1;x>=0;x--)h[u[x].nodeName]=t.regex.isNumber.test(u[x].nodeValue)?parseFloat(u[x].nodeValue):u[x].nodeValue;return h}if("object"===ae(h))for(var k in h)this.attr(k,h[k]);else if(null===u)this.node.removeAttribute(h);else{if(null==u)return null==(u=this.node.getAttribute(h))?t.defaults.attrs[h]:t.regex.isNumber.test(u)?parseFloat(u):u;"stroke-width"==h?this.attr("stroke",parseFloat(u)>0?this._stroke:null):"stroke"==h&&(this._stroke=u),"fill"!=h&&"stroke"!=h||(t.regex.isImage.test(u)&&(u=this.doc().defs().image(u,0,0)),u instanceof t.Image&&(u=this.doc().defs().pattern(0,0,function(){this.add(u)}))),"number"==typeof u?u=new t.Number(u):t.Color.isColor(u)?u=new t.Color(u):Array.isArray(u)&&(u=new t.Array(u)),"leading"==h?this.leading&&this.leading(u):"string"==typeof x?this.node.setAttributeNS(x,h,u.toString()):this.node.setAttribute(h,u.toString()),!this.rebuild||"font-size"!=h&&"x"!=h||this.rebuild(h,u)}return this}}),t.extend(t.Element,{transform:function(h,u){var x;return"object"!==ae(h)?(x=new t.Matrix(this).extract(),"string"==typeof h?x[h]:x):(x=new t.Matrix(this),u=!!u||!!h.relative,null!=h.a&&(x=u?x.multiply(new t.Matrix(h)):new t.Matrix(h)),this.attr("transform",x))}}),t.extend(t.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(t.regex.transforms).slice(0,-1).map(function(h){var u=h.trim().split("(");return[u[0],u[1].split(t.regex.delimiter).map(function(x){return parseFloat(x)})]}).reduce(function(h,u){return"matrix"==u[0]?h.multiply(f(u[1])):h[u[0]].apply(h,u[1])},new t.Matrix)},toParent:function(h){if(this==h)return this;var u=this.screenCTM(),x=h.screenCTM().inverse();return this.addTo(h).untransform().transform(x.multiply(u)),this},toDoc:function(){return this.toParent(this.doc())}}),t.Transformation=t.invent({create:function(h,u){if(arguments.length>1&&"boolean"!=typeof u)return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(h))for(var x=0,k=this.arguments.length;x=0},index:function(h){return[].slice.call(this.node.childNodes).indexOf(h.node)},get:function(h){return t.adopt(this.node.childNodes[h])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(h,u){for(var x=this.children(),k=0,w=x.length;k=0;u--)h.childNodes[u]instanceof y.SVGElement&&b(h.childNodes[u]);return t.adopt(h).id(t.eid(h.nodeName))}function m(h){return Math.abs(h)>1e-37?h:0}["fill","stroke"].forEach(function(h){var u={};u[h]=function(x){if(void 0===x)return this;if("string"==typeof x||t.Color.isRgb(x)||x&&"function"==typeof x.fill)this.attr(h,x);else for(var k=n[h].length-1;k>=0;k--)null!=x[n[h][k]]&&this.attr(n.prefix(h,n[h][k]),x[n[h][k]]);return this},t.extend(t.Element,t.FX,u)}),t.extend(t.Element,t.FX,{translate:function(h,u){return this.transform({x:h,y:u})},matrix:function(h){return this.attr("transform",new t.Matrix(6==arguments.length?[].slice.call(arguments):h))},opacity:function(h){return this.attr("opacity",h)},dx:function(h){return this.x(new t.Number(h).plus(this instanceof t.FX?0:this.x()),!0)},dy:function(h){return this.y(new t.Number(h).plus(this instanceof t.FX?0:this.y()),!0)}}),t.extend(t.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(h){return this.node.getPointAtLength(h)}}),t.Set=t.invent({create:function(h){Array.isArray(h)?this.members=h:this.clear()},extend:{add:function(){for(var h=[].slice.call(arguments),u=0,x=h.length;u-1&&this.members.splice(u,1),this},each:function(h){for(var u=0,x=this.members.length;u=0},index:function(h){return this.members.indexOf(h)},get:function(h){return this.members[h]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members}},construct:{set:function(h){return new t.Set(h)}}}),t.FX.Set=t.invent({create:function(h){this.set=h}}),t.Set.inherit=function(){var h=[];for(var u in t.Shape.prototype)"function"==typeof t.Shape.prototype[u]&&"function"!=typeof t.Set.prototype[u]&&h.push(u);for(var u in h.forEach(function(k){t.Set.prototype[k]=function(){for(var w=0,S=this.members.length;w=0;h--)delete this.memory()[arguments[h]];return this},memory:function(){return this._memory||(this._memory={})}}),t.get=function(h){var u=e.getElementById(function(x){var k=(x||"").toString().match(t.regex.reference);if(k)return k[1]}(h)||h);return t.adopt(u)},t.select=function(h,u){return new t.Set(t.utils.map((u||e).querySelectorAll(h),function(x){return t.adopt(x)}))},t.extend(t.Parent,{select:function(h){return t.select(h,this.node)}});var v="abcdef".split("");if("function"!=typeof y.CustomEvent){var A=function(h,u){u=u||{bubbles:!1,cancelable:!1,detail:void 0};var x=e.createEvent("CustomEvent");return x.initCustomEvent(h,u.bubbles,u.cancelable,u.detail),x};A.prototype=y.Event.prototype,t.CustomEvent=A}else t.CustomEvent=y.CustomEvent;return t},void 0!==(me=function(){return Lt(mt,mt.document)}.call(Fe,J,Fe,_e))&&(_e.exports=me), -/*! svg.filter.js - v2.0.2 - 2016-02-24 - * https://github.com/wout/svg.filter.js - * Copyright (c) 2016 Wout Fierens; Licensed MIT */ -function(){SVG.Filter=SVG.invent({create:"filter",inherit:SVG.Parent,extend:{source:"SourceGraphic",sourceAlpha:"SourceAlpha",background:"BackgroundImage",backgroundAlpha:"BackgroundAlpha",fill:"FillPaint",stroke:"StrokePaint",autoSetIn:!0,put:function(s,n){return this.add(s,n),!s.attr("in")&&this.autoSetIn&&s.attr("in",this.source),s.attr("result")||s.attr("result",s),s},blend:function(s,n,o){return this.put(new SVG.BlendEffect(s,n,o))},colorMatrix:function(s,n){return this.put(new SVG.ColorMatrixEffect(s,n))},convolveMatrix:function(s){return this.put(new SVG.ConvolveMatrixEffect(s))},componentTransfer:function(s){return this.put(new SVG.ComponentTransferEffect(s))},composite:function(s,n,o){return this.put(new SVG.CompositeEffect(s,n,o))},flood:function(s,n){return this.put(new SVG.FloodEffect(s,n))},offset:function(s,n){return this.put(new SVG.OffsetEffect(s,n))},image:function(s){return this.put(new SVG.ImageEffect(s))},merge:function(){var s=[void 0];for(var n in arguments)s.push(arguments[n]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,s)))},gaussianBlur:function(s,n){return this.put(new SVG.GaussianBlurEffect(s,n))},morphology:function(s,n){return this.put(new SVG.MorphologyEffect(s,n))},diffuseLighting:function(s,n,o){return this.put(new SVG.DiffuseLightingEffect(s,n,o))},displacementMap:function(s,n,o,l,c){return this.put(new SVG.DisplacementMapEffect(s,n,o,l,c))},specularLighting:function(s,n,o,l){return this.put(new SVG.SpecularLightingEffect(s,n,o,l))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(s,n,o,l,c){return this.put(new SVG.TurbulenceEffect(s,n,o,l,c))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(s){var n=this.put(new SVG.Filter);return"function"==typeof s&&s.call(n,n),n}}),SVG.extend(SVG.Container,{filter:function(s){return this.defs().filter(s)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(s){return this.filterer=s instanceof SVG.Element?s:this.doc().filter(s),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(s){return this.filterer&&!0===s&&this.filterer.remove(),delete this.filterer,this.attr("filter",null)}}),SVG.Effect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(s){return null==s?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",s)},result:function(s){return null==s?this.attr("result"):this.attr("result",s)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(s){return null==s?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",s)},result:function(s){return null==s?this.attr("result"):this.attr("result",s)},toString:function(){return this.result()}}});var y={blend:function(s,n){return this.parent()&&this.parent().blend(this,s,n)},colorMatrix:function(s,n){return this.parent()&&this.parent().colorMatrix(s,n).in(this)},convolveMatrix:function(s){return this.parent()&&this.parent().convolveMatrix(s).in(this)},componentTransfer:function(s){return this.parent()&&this.parent().componentTransfer(s).in(this)},composite:function(s,n){return this.parent()&&this.parent().composite(this,s,n)},flood:function(s,n){return this.parent()&&this.parent().flood(s,n)},offset:function(s,n){return this.parent()&&this.parent().offset(s,n).in(this)},image:function(s){return this.parent()&&this.parent().image(s)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(s,n){return this.parent()&&this.parent().gaussianBlur(s,n).in(this)},morphology:function(s,n){return this.parent()&&this.parent().morphology(s,n).in(this)},diffuseLighting:function(s,n,o){return this.parent()&&this.parent().diffuseLighting(s,n,o).in(this)},displacementMap:function(s,n,o,l){return this.parent()&&this.parent().displacementMap(this,s,n,o,l)},specularLighting:function(s,n,o,l){return this.parent()&&this.parent().specularLighting(s,n,o,l).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(s,n,o,l,c){return this.parent()&&this.parent().turbulence(s,n,o,l,c).in(this)}};SVG.extend(SVG.Effect,y),SVG.extend(SVG.ParentEffect,y),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(s){this.attr("in",s)}}});var e={blend:function(s,n,o){this.attr({in:s,in2:n,mode:o||"normal"})},colorMatrix:function(s,n){"matrix"==s&&(n=a(n)),this.attr({type:s,values:void 0===n?null:n})},convolveMatrix:function(s){s=a(s),this.attr({order:Math.sqrt(s.split(" ").length),kernelMatrix:s})},composite:function(s,n,o){this.attr({in:s,in2:n,operator:o})},flood:function(s,n){this.attr("flood-color",s),null!=n&&this.attr("flood-opacity",n)},offset:function(s,n){this.attr({dx:s,dy:n})},image:function(s){this.attr("href",s,SVG.xlink)},displacementMap:function(s,n,o,l,c){this.attr({in:s,in2:n,scale:o,xChannelSelector:l,yChannelSelector:c})},gaussianBlur:function(s,n){this.attr("stdDeviation",null!=s||null!=n?function(o){if(!Array.isArray(o))return o;for(var l=0,c=o.length,d=[];l1&&(j*=c=Math.sqrt(c),Z*=c),d=(new SVG.Matrix).rotate(_).scale(1/j,1/Z).rotate(-_),$=$.transform(d),f=(g=[(q=q.transform(d)).x-$.x,q.y-$.y])[0]*g[0]+g[1]*g[1],p=Math.sqrt(f),g[0]/=p,g[1]/=p,b=f<4?Math.sqrt(1-f/4):0,ie===re&&(b*=-1),m=new SVG.Point((q.x+$.x)/2+b*-g[1],(q.y+$.y)/2+b*g[0]),v=new SVG.Point($.x-m.x,$.y-m.y),A=new SVG.Point(q.x-m.x,q.y-m.y),h=Math.acos(v.x/Math.sqrt(v.x*v.x+v.y*v.y)),v.y<0&&(h*=-1),u=Math.acos(A.x/Math.sqrt(A.x*A.x+A.y*A.y)),A.y<0&&(u*=-1),re&&h>u&&(u+=2*Math.PI),!re&&hs.maxX-t.width&&(n=(a=s.maxX-t.width)-this.startPoints.box.x),null!=s.minY&&rs.maxY-t.height&&(o=(r=s.maxY-t.height)-this.startPoints.box.y),null!=s.snapToGrid&&(a-=a%s.snapToGrid,r-=r%s.snapToGrid,n-=n%s.snapToGrid,o-=o%s.snapToGrid),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:n,y:o},!0):this.el.move(a,r));return i},y.prototype.end=function(e){var t=this.drag(e);this.el.fire("dragend",{event:e,p:t,m:this.m,handler:this}),SVG.off(window,"mousemove.drag"),SVG.off(window,"touchmove.drag"),SVG.off(window,"mouseup.drag"),SVG.off(window,"touchend.drag")},SVG.extend(SVG.Element,{draggable:function(e,t){"function"!=typeof e&&"object"!=typeof e||(t=e,e=!0);var i=this.remember("_draggable")||new y(this);return(e=void 0===e||e)?i.init(t||{},e):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}.call(void 0),function(){function y(e){this.el=e,e.remember("_selectHandler",this),this.pointSelection={isSelected:!1},this.rectSelection={isSelected:!1},this.pointsList={lt:[0,0],rt:["width",0],rb:["width","height"],lb:[0,"height"],t:["width",0],r:["width","height"],b:["width","height"],l:[0,"height"]},this.pointCoord=function(t,i,a){var r="string"!=typeof t?t:i[t];return a?r/2:r},this.pointCoords=function(t,i){var a=this.pointsList[t];return{x:this.pointCoord(a[0],i,"t"===t||"b"===t),y:this.pointCoord(a[1],i,"r"===t||"l"===t)}}}y.prototype.init=function(e,t){var i=this.el.bbox();this.options={};var a=this.el.selectize.defaults.points;for(var r in this.el.selectize.defaults)this.options[r]=this.el.selectize.defaults[r],void 0!==t[r]&&(this.options[r]=t[r]);var s=["points","pointsExclude"];for(var r in s){var n=this.options[s[r]];"string"==typeof n?n=n.length>0?n.split(/\s*,\s*/i):[]:"boolean"==typeof n&&"points"===s[r]&&(n=n?a:[]),this.options[s[r]]=n}this.options.points=[a,this.options.points].reduce(function(o,l){return o.filter(function(c){return l.indexOf(c)>-1})}),this.options.points=[this.options.points,this.options.pointsExclude].reduce(function(o,l){return o.filter(function(c){return l.indexOf(c)<0})}),this.parent=this.el.parent(),this.nested=this.nested||this.parent.group(),this.nested.matrix(new SVG.Matrix(this.el).translate(i.x,i.y)),this.options.deepSelect&&-1!==["line","polyline","polygon"].indexOf(this.el.type)?this.selectPoints(e):this.selectRect(e),this.observe(),this.cleanup()},y.prototype.selectPoints=function(e){return this.pointSelection.isSelected=e,this.pointSelection.set||(this.pointSelection.set=this.parent.set(),this.drawPoints()),this},y.prototype.getPointArray=function(){var e=this.el.bbox();return this.el.array().valueOf().map(function(t){return[t[0]-e.x,t[1]-e.y]})},y.prototype.drawPoints=function(){for(var e=this,t=this.getPointArray(),i=0,a=t.length;i0&&this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-n[0]);n=this.checkAspectRatio(n),this.el.move(this.parameters.box.x+n[0],this.parameters.box.y+n[1]).size(this.parameters.box.width-n[0],this.parameters.box.height-n[1])}};break;case"rt":this.calc=function(r,s){var n=this.snapToGrid(r,s,2);if(this.parameters.box.width+n[0]>0&&this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+n[0]);n=this.checkAspectRatio(n,!0),this.el.move(this.parameters.box.x,this.parameters.box.y+n[1]).size(this.parameters.box.width+n[0],this.parameters.box.height-n[1])}};break;case"rb":this.calc=function(r,s){var n=this.snapToGrid(r,s,0);if(this.parameters.box.width+n[0]>0&&this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+n[0]);n=this.checkAspectRatio(n),this.el.move(this.parameters.box.x,this.parameters.box.y).size(this.parameters.box.width+n[0],this.parameters.box.height+n[1])}};break;case"lb":this.calc=function(r,s){var n=this.snapToGrid(r,s,1);if(this.parameters.box.width-n[0]>0&&this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-n[0]);n=this.checkAspectRatio(n,!0),this.el.move(this.parameters.box.x+n[0],this.parameters.box.y).size(this.parameters.box.width-n[0],this.parameters.box.height+n[1])}};break;case"t":this.calc=function(r,s){var n=this.snapToGrid(r,s,2);if(this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y+n[1]).height(this.parameters.box.height-n[1])}};break;case"r":this.calc=function(r,s){var n=this.snapToGrid(r,s,0);if(this.parameters.box.width+n[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).width(this.parameters.box.width+n[0])}};break;case"b":this.calc=function(r,s){var n=this.snapToGrid(r,s,0);if(this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).height(this.parameters.box.height+n[1])}};break;case"l":this.calc=function(r,s){var n=this.snapToGrid(r,s,1);if(this.parameters.box.width-n[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x+n[0],this.parameters.box.y).width(this.parameters.box.width-n[0])}};break;case"rot":this.calc=function(r,s){var n=r+this.parameters.p.x,o=s+this.parameters.p.y,l=Math.atan2(this.parameters.p.y-this.parameters.box.y-this.parameters.box.height/2,this.parameters.p.x-this.parameters.box.x-this.parameters.box.width/2),c=Math.atan2(o-this.parameters.box.y-this.parameters.box.height/2,n-this.parameters.box.x-this.parameters.box.width/2),d=this.parameters.rotation+180*(c-l)/Math.PI+this.options.snapToAngle/2;this.el.center(this.parameters.box.cx,this.parameters.box.cy).rotate(d-d%this.options.snapToAngle,this.parameters.box.cx,this.parameters.box.cy)};break;case"point":this.calc=function(r,s){var n=this.snapToGrid(r,s,this.parameters.pointCoords[0],this.parameters.pointCoords[1]),o=this.el.array().valueOf();o[this.parameters.i][0]=this.parameters.pointCoords[0]+n[0],o[this.parameters.i][1]=this.parameters.pointCoords[1]+n[1],this.el.plot(o)}}this.el.fire("resizestart",{dx:this.parameters.x,dy:this.parameters.y,event:e}),SVG.on(window,"touchmove.resize",function(r){t.update(r||window.event)}),SVG.on(window,"touchend.resize",function(){t.done()}),SVG.on(window,"mousemove.resize",function(r){t.update(r||window.event)}),SVG.on(window,"mouseup.resize",function(){t.done()})},y.prototype.update=function(e){if(e){var t=this._extractPosition(e),i=this.transformPoint(t.x,t.y),a=i.x-this.parameters.p.x,r=i.y-this.parameters.p.y;this.lastUpdateCall=[a,r],this.calc(a,r),this.el.fire("resizing",{dx:a,dy:r,event:e})}else this.lastUpdateCall&&this.calc(this.lastUpdateCall[0],this.lastUpdateCall[1])},y.prototype.done=function(){this.lastUpdateCall=null,SVG.off(window,"mousemove.resize"),SVG.off(window,"mouseup.resize"),SVG.off(window,"touchmove.resize"),SVG.off(window,"touchend.resize"),this.el.fire("resizedone")},y.prototype.snapToGrid=function(e,t,i,a){var r;return r=void 0!==a?[(i+e)%this.options.snapToGrid,(a+t)%this.options.snapToGrid]:[(this.parameters.box.x+e+(1&(i=i??3)?0:this.parameters.box.width))%this.options.snapToGrid,(this.parameters.box.y+t+(2&i?0:this.parameters.box.height))%this.options.snapToGrid],e<0&&(r[0]-=this.options.snapToGrid),t<0&&(r[1]-=this.options.snapToGrid),e-=Math.abs(r[0])n.maxX&&(e=n.maxX-r),void 0!==n.minY&&s+tn.maxY&&(t=n.maxY-s),[e,t]},y.prototype.checkAspectRatio=function(e,t){if(!this.options.saveAspectRatio)return e;var i=e.slice(),a=this.parameters.box.width/this.parameters.box.height,r=this.parameters.box.width+e[0],s=this.parameters.box.height-e[1],n=r/s;return na&&(i[0]=this.parameters.box.width-s*a,t&&(i[0]=-i[0])),i},SVG.extend(SVG.Element,{resize:function(e){return(this.remember("_resizeHandler")||new y(this)).init(e||{}),this}}),SVG.Element.prototype.resize.defaults={snapToAngle:.1,snapToGrid:1,constraint:{},saveAspectRatio:!1}}).call(this)}(),void 0===window.Apex&&(window.Apex={});var Pt=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new ye(this.ctx),this.ctx.axes=new lt(this.ctx),this.ctx.core=new jt(this.ctx.el,this.ctx),this.ctx.config=new Pe({}),this.ctx.data=new et(this.ctx),this.ctx.grid=new tt(this.ctx),this.ctx.graphics=new E(this.ctx),this.ctx.coreUtils=new te(this.ctx),this.ctx.crosshairs=new Ve(this.ctx),this.ctx.events=new nt(this.ctx),this.ctx.exports=new Ee(this.ctx),this.ctx.localization=new ot(this.ctx),this.ctx.options=new le,this.ctx.responsive=new ht(this.ctx),this.ctx.series=new ge(this.ctx),this.ctx.theme=new ct(this.ctx),this.ctx.formatters=new Ce(this.ctx),this.ctx.titleSubtitle=new dt(this.ctx),this.ctx.legend=new U(this.ctx),this.ctx.toolbar=new X(this.ctx),this.ctx.tooltip=new wt(this.ctx),this.ctx.dimensions=new Ye(this.ctx),this.ctx.updateHelpers=new _t(this.ctx),this.ctx.zoomPanSelection=new N(this.ctx),this.ctx.w.globals.tooltip=new wt(this.ctx)}}]),y}(),Mt=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"clear",value:function(e){var t=e.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:t})}},{key:"killSVG",value:function(e){e.each(function(t,i){this.removeClass("*"),this.off(),this.stop()},!0),e.ungroup(),e.clear()}},{key:"clearDomElements",value:function(e){var t=this,a=this.w.globals.dom.Paper.node;a.parentNode&&a.parentNode.parentNode&&!e.isUpdating&&(a.parentNode.parentNode.style.minHeight="unset");var r=this.w.globals.dom.baseEl;r&&this.ctx.eventList.forEach(function(n){r.removeEventListener(n,t.ctx.events.documentEvent)});var s=this.w.globals.dom;if(null!==this.ctx.el)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(s.Paper),s.Paper.remove(),s.elWrap=null,s.elGraphical=null,s.elLegendWrap=null,s.elLegendForeign=null,s.baseEl=null,s.elGridRect=null,s.elGridRectMask=null,s.elGridRectMarkerMask=null,s.elForecastMask=null,s.elNonForecastMask=null,s.elDefs=null}}]),y}(),vt=new WeakMap,Ut=function(){function y(e,t){F(this,y),this.opts=t,this.ctx=this,this.w=new rt(t).init(),this.el=e,this.w.globals.cuid=M.randomId(),this.w.globals.chartID=this.w.config.chart.id?M.escapeString(this.w.config.chart.id):this.w.globals.cuid,new Pt(this).initModules(),this.create=M.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return D(y,[{key:"render",value:function(){var e=this;return new Promise(function(t,i){if(null!==e.el){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),e.w.config.chart.id&&Apex._chartInstances.push({id:e.w.globals.chartID,group:e.w.config.chart.group,chart:e}),e.setLocale(e.w.config.chart.defaultLocale);var a=e.w.config.chart.events.beforeMount;"function"==typeof a&&a(e,e.w),e.events.fireEvent("beforeMount",[e,e.w]),window.addEventListener("resize",e.windowResizeHandler),function(g,p){var f=!1;if(g.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var b=g.getBoundingClientRect();"none"!==g.style.display&&0!==b.width||(f=!0)}var m=new ResizeObserver(function(v){f&&p.call(g,v),f=!0});g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(g.children).forEach(function(v){return m.observe(v)}):m.observe(g),vt.set(p,m)}(e.el.parentNode,e.parentResizeHandler);var r=e.el.getRootNode&&e.el.getRootNode(),s=M.is("ShadowRoot",r),n=e.el.ownerDocument,o=s?r.getElementById("apexcharts-css"):n.getElementById("apexcharts-css");if(!o){var l;(o=document.createElement("style")).id="apexcharts-css",o.textContent='@keyframes opaque {\n 0% {\n opacity: 0\n }\n\n to {\n opacity: 1\n }\n}\n\n@keyframes resizeanim {\n 0%,to {\n opacity: 0\n }\n}\n\n.apexcharts-canvas {\n position: relative;\n user-select: none\n}\n\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0,0,0,.5);\n box-shadow: 0 0 1px rgba(255,255,255,.5);\n -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5)\n}\n\n.apexcharts-inner {\n position: relative\n}\n\n.apexcharts-text tspan {\n font-family: inherit\n}\n\n.legend-mouseover-inactive {\n transition: .15s ease all;\n opacity: .2\n}\n\n.apexcharts-legend-text {\n padding-left: 15px;\n margin-left: -15px;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0\n}\n\n.apexcharts-tooltip {\n border-radius: 5px;\n box-shadow: 2px 2px 6px -4px #999;\n cursor: default;\n font-size: 14px;\n left: 62px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 20px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n white-space: nowrap;\n z-index: 12;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n border: 1px solid #e3e3e3;\n background: rgba(255,255,255,.96)\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n color: #fff;\n background: rgba(30,30,30,.8)\n}\n\n.apexcharts-tooltip * {\n font-family: inherit\n}\n\n.apexcharts-tooltip-title {\n padding: 6px;\n font-size: 15px;\n margin-bottom: 4px\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n background: #eceff1;\n border-bottom: 1px solid #ddd\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: rgba(0,0,0,.7);\n border-bottom: 1px solid #333\n}\n\n.apexcharts-tooltip-text-goals-value,.apexcharts-tooltip-text-y-value,.apexcharts-tooltip-text-z-value {\n display: inline-block;\n margin-left: 5px;\n font-weight: 600\n}\n\n.apexcharts-tooltip-text-goals-label:empty,.apexcharts-tooltip-text-goals-value:empty,.apexcharts-tooltip-text-y-label:empty,.apexcharts-tooltip-text-y-value:empty,.apexcharts-tooltip-text-z-value:empty,.apexcharts-tooltip-title:empty {\n display: none\n}\n\n.apexcharts-tooltip-text-goals-label,.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px\n}\n\n.apexcharts-tooltip-goals-group,.apexcharts-tooltip-text-goals-label,.apexcharts-tooltip-text-goals-value {\n display: flex\n}\n\n.apexcharts-tooltip-text-goals-label:not(:empty),.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px\n}\n\n.apexcharts-tooltip-marker {\n width: 12px;\n height: 12px;\n position: relative;\n top: 0;\n margin-right: 10px;\n border-radius: 50%\n}\n\n.apexcharts-tooltip-series-group {\n padding: 0 10px;\n display: none;\n text-align: left;\n justify-content: left;\n align-items: center\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 4px\n}\n\n.apexcharts-tooltip-series-group-hidden {\n opacity: 0;\n height: 0;\n line-height: 0;\n padding: 0!important\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px\n}\n\n.apexcharts-custom-tooltip,.apexcharts-tooltip-box {\n padding: 4px 8px\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0,0,0,.7);\n border: 1px solid rgba(0,0,0,.5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0,0,0,.5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0,0,0,.5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0,0,0,.7);\n border: 1px solid rgba(0,0,0,.5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0,0,0,.5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0,0,0,.5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_boundingRect,.svg_select_points_rot {\n pointer-events: none;\n opacity: 0;\n visibility: hidden\n}\n\n.apexcharts-selection-rect+g .svg_select_boundingRect,.apexcharts-selection-rect+g .svg_select_points_rot {\n opacity: 0;\n visibility: hidden\n}\n\n.apexcharts-selection-rect+g .svg_select_points_l,.apexcharts-selection-rect+g .svg_select_points_r {\n cursor: ew-resize;\n opacity: 1;\n visibility: visible\n}\n\n.svg_select_points {\n fill: #efefef;\n stroke: #333;\n rx: 2\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,.apexcharts-pan-icon,.apexcharts-reset-icon,.apexcharts-selection-icon,.apexcharts-toolbar-custom-icon,.apexcharts-zoom-icon,.apexcharts-zoomin-icon,.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,.apexcharts-reset-icon svg,.apexcharts-zoom-icon svg,.apexcharts-zoomin-icon svg,.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,.apexcharts-theme-dark .apexcharts-pan-icon svg,.apexcharts-theme-dark .apexcharts-reset-icon svg,.apexcharts-theme-dark .apexcharts-selection-icon svg,.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,.apexcharts-theme-dark .apexcharts-zoom-icon svg,.apexcharts-theme-dark .apexcharts-zoomin-icon svg,.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,.apexcharts-theme-light .apexcharts-reset-icon:hover svg,.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,.apexcharts-reset-icon,.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0,0,0,.7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,.apexcharts-datalabel.apexcharts-element-hidden,.apexcharts-hide .apexcharts-series-points {\n opacity: 0\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n.apexcharts-datalabel,.apexcharts-datalabel-label,.apexcharts-datalabel-value,.apexcharts-datalabels,.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,.apexcharts-area-series .apexcharts-area,.apexcharts-area-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,.apexcharts-gridline,.apexcharts-line,.apexcharts-line-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,.apexcharts-point-annotation-label,.apexcharts-radar-series path,.apexcharts-radar-series polygon,.apexcharts-toolbar svg,.apexcharts-tooltip .apexcharts-marker,.apexcharts-xaxis-annotation-label,.apexcharts-yaxis-annotation-label,.apexcharts-zoom-rect {\n pointer-events: none\n}\n\n.apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,.resize-triggers,.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers{\n pointer-events: none\n}\n\n.apexcharts-bar-shadows{\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers{\n pointer-events: none\n}';var c=(null===(l=e.opts.chart)||void 0===l?void 0:l.nonce)||e.w.config.chart.nonce;c&&o.setAttribute("nonce",c),s?r.prepend(o):n.head.appendChild(o)}var d=e.create(e.w.config.series,{});if(!d)return t(e);e.mount(d).then(function(){"function"==typeof e.w.config.chart.events.mounted&&e.w.config.chart.events.mounted(e,e.w),e.events.fireEvent("mounted",[e,e.w]),t(d)}).catch(function(g){i(g)})}else i(new Error("Element not found"))})}},{key:"create",value:function(e,t){var i=this.w;new Pt(this).initModules();var a=this.w.globals;if(a.noData=!1,a.animationEnded=!1,this.responsive.checkResponsiveConfig(t),i.config.xaxis.convertedCatToNumeric&&new Le(i.config).convertCatToNumericXaxis(i.config,this.ctx),null===this.el||(this.core.setupElements(),"treemap"===i.config.chart.type&&(i.config.grid.show=!1,i.config.yaxis[0].show=!1),0===a.svgWidth))return a.animationEnded=!0,null;var r=te.checkComboSeries(e,i.config.chart.type);a.comboCharts=r.comboCharts,a.comboBarCount=r.comboBarCount;var s=e.every(function(c){return c.data&&0===c.data.length});(0===e.length||s&&a.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(e),this.theme.init(),new Me(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),a.noData&&a.collapsedSeries.length!==a.series.length&&!i.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),a.axisCharts&&(this.core.coreCalculations(),"category"!==i.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=i.globals.minX,this.ctx.toolbar.maxX=i.globals.maxX),this.formatters.heatmapLabelFormatters(),new te(this).getLargestMarkerSize(),this.dimensions.plotCoords();var n=this.core.xySettings();this.grid.createGridMask();var o=this.core.plotChartType(e,n),l=new Ae(this);return l.bringForward(),i.config.dataLabels.background.enabled&&l.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:o,xyRatios:n,dimensions:{plot:{left:i.globals.translateX,top:i.globals.translateY,width:i.globals.gridWidth,height:i.globals.gridHeight}}}}},{key:"mount",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise(function(r,s){if(null===i.el)return s(new Error("Not enough data to display or target element not found"));(null===t||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new tt(i);var n,o,l=i.grid.drawGrid();if(i.annotations=new st(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position&&(l&&a.globals.dom.elGraphical.add(l.el),null!=l&&null!==(n=l.elGridBorders)&&void 0!==n&&n.node&&a.globals.dom.elGraphical.add(l.elGridBorders)),Array.isArray(t.elGraph))for(var c=0;c0&&a.globals.memory.methodsToExec.forEach(function(f){f.method(f.params,!1,f.context)}),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),r(i)})}},{key:"destroy",value:function(){var e,t;window.removeEventListener("resize",this.windowResizeHandler),(t=vt.get(e=this.parentResizeHandler))&&(t.disconnect(),vt.delete(e));var i=this.w.config.chart.id;i&&Apex._chartInstances.forEach(function(a,r){a.id===M.escapeString(i)&&Apex._chartInstances.splice(r,1)}),new Mt(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=this.w;return n.globals.selection=void 0,e.series&&(this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map(function(o,l){return t.updateHelpers._extendSeries(o,l)})),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),n.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,i,a,r,s)}},{key:"updateSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,t,i)}},{key:"appendSeries",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w.config.series.slice();return a.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,t,i)}},{key:"appendData",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),r=0;r0&&void 0!==arguments[0])||arguments[0],!(arguments.length>1&&void 0!==arguments[1])||arguments[1])}},{key:"addEventListener",value:function(e,t){this.events.addEventListener(e,t)}},{key:"removeEventListener",value:function(e,t){this.events.removeEventListener(e,t)}},{key:"addXaxisAnnotation",value:function(e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a)}},{key:"addYaxisAnnotation",value:function(e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a)}},{key:"addPointAnnotation",value:function(e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a)}},{key:"clearAnnotations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=this;e&&(t=e),t.annotations.clearAnnotations(t)}},{key:"removeAnnotation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;t&&(i=t),i.annotations.removeAnnotation(i,e)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(e,t){return this.coreUtils.getSeriesTotalsXRange(e,t)}},{key:"getHighestValueInSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new We(this.ctx).getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new We(this.ctx).getMinYMaxY(e).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(e,t){return this.updateHelpers.toggleDataPointSelection(e,t)}},{key:"zoomX",value:function(e,t){this.ctx.toolbar.zoomUpdateOptions(e,t)}},{key:"setLocale",value:function(e){this.localization.setCurrentLocaleValues(e)}},{key:"dataURI",value:function(e){return new Ee(this.ctx).dataURI(e)}},{key:"exportToCSV",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ee(this.ctx).exportToCSV(e)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var e=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){e.w.globals.resized=!0,e.w.globals.dataChanged=!1,e.ctx.update()},150)}},{key:"_windowResizeHandler",value:function(){var e=this.w.config.chart.redrawOnWindowResize;"function"==typeof e&&(e=e()),e&&this._windowResize()}}],[{key:"getChartByID",value:function(e){var t=M.escapeString(e);if(Apex._chartInstances){var i=Apex._chartInstances.filter(function(a){return a.id===t})[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),t=0;t2?r-2:0),n=2;n{J.r(Fe),J.d(Fe,{UserModule:()=>Ye});var me=J(6814),Ue=J(2787),O=J(2132),ae=J(6007),F=J(6283),Ze=J(9829),D=J(2596),xe=J(7988),ke=J(617),P=J(9212),De=J(553),qe=J(9862);let ve=(()=>{class R{http;apiEndpoint=De.N.apiEndpoint;constructor(X){this.http=X}getAllUsers(){return this.http.get(`${this.apiEndpoint}/admin/users`)}ban(X,N){return this.http.put(`${this.apiEndpoint}/admin/users/ban/${X}`,{banReason:N})}static \u0275fac=function(N){return new(N||R)(P.LFG(qe.eN))};static \u0275prov=P.Yz7({token:R,factory:R.\u0275fac,providedIn:"root"})}return R})();var Se=J(3305),ne=J(5037),$e=J(6410),Ie=J(5054);const M=["chart"];let ye=(()=>{class R{constructor(X){this.ngZone=X,this.autoUpdateSeries=!0,this.chartReady=new P.vpe}ngOnChanges(X){$e.E.schedule(()=>{this.autoUpdateSeries&&0===Object.keys(X).filter(N=>"series"!==N).length?this.updateSeries(this.series,!0):this.createElement()})}ngOnDestroy(){this.chartObj&&this.chartObj.destroy()}createElement(){const X={};this.annotations&&(X.annotations=this.annotations),this.chart&&(X.chart=this.chart),this.colors&&(X.colors=this.colors),this.dataLabels&&(X.dataLabels=this.dataLabels),this.series&&(X.series=this.series),this.stroke&&(X.stroke=this.stroke),this.labels&&(X.labels=this.labels),this.legend&&(X.legend=this.legend),this.fill&&(X.fill=this.fill),this.tooltip&&(X.tooltip=this.tooltip),this.plotOptions&&(X.plotOptions=this.plotOptions),this.responsive&&(X.responsive=this.responsive),this.markers&&(X.markers=this.markers),this.noData&&(X.noData=this.noData),this.xaxis&&(X.xaxis=this.xaxis),this.yaxis&&(X.yaxis=this.yaxis),this.forecastDataPoints&&(X.forecastDataPoints=this.forecastDataPoints),this.grid&&(X.grid=this.grid),this.states&&(X.states=this.states),this.title&&(X.title=this.title),this.subtitle&&(X.subtitle=this.subtitle),this.theme&&(X.theme=this.theme),this.chartObj&&this.chartObj.destroy(),this.ngZone.runOutsideAngular(()=>{this.chartObj=new Ie(this.chartElement.nativeElement,X)}),this.render(),this.chartReady.emit({chartObj:this.chartObj})}render(){return this.ngZone.runOutsideAngular(()=>this.chartObj.render())}updateOptions(X,N,V,ce){return this.ngZone.runOutsideAngular(()=>this.chartObj.updateOptions(X,N,V,ce))}updateSeries(X,N){return this.ngZone.runOutsideAngular(()=>this.chartObj.updateSeries(X,N))}appendSeries(X,N){this.ngZone.runOutsideAngular(()=>this.chartObj.appendSeries(X,N))}appendData(X){this.ngZone.runOutsideAngular(()=>this.chartObj.appendData(X))}toggleSeries(X){return this.ngZone.runOutsideAngular(()=>this.chartObj.toggleSeries(X))}showSeries(X){this.ngZone.runOutsideAngular(()=>this.chartObj.showSeries(X))}hideSeries(X){this.ngZone.runOutsideAngular(()=>this.chartObj.hideSeries(X))}resetSeries(){this.ngZone.runOutsideAngular(()=>this.chartObj.resetSeries())}zoomX(X,N){this.ngZone.runOutsideAngular(()=>this.chartObj.zoomX(X,N))}toggleDataPointSelection(X,N){this.ngZone.runOutsideAngular(()=>this.chartObj.toggleDataPointSelection(X,N))}destroy(){this.chartObj.destroy()}setLocale(X){this.ngZone.runOutsideAngular(()=>this.chartObj.setLocale(X))}paper(){this.ngZone.runOutsideAngular(()=>this.chartObj.paper())}addXaxisAnnotation(X,N,V){this.ngZone.runOutsideAngular(()=>this.chartObj.addXaxisAnnotation(X,N,V))}addYaxisAnnotation(X,N,V){this.ngZone.runOutsideAngular(()=>this.chartObj.addYaxisAnnotation(X,N,V))}addPointAnnotation(X,N,V){this.ngZone.runOutsideAngular(()=>this.chartObj.addPointAnnotation(X,N,V))}removeAnnotation(X,N){this.ngZone.runOutsideAngular(()=>this.chartObj.removeAnnotation(X,N))}clearAnnotations(X){this.ngZone.runOutsideAngular(()=>this.chartObj.clearAnnotations(X))}dataURI(X){return this.chartObj.dataURI(X)}}return R.\u0275fac=function(X){return new(X||R)(P.Y36(P.R0b))},R.\u0275cmp=P.Xpm({type:R,selectors:[["apx-chart"]],viewQuery:function(X,N){if(1&X&&P.Gf(M,7),2&X){let V;P.iGM(V=P.CRH())&&(N.chartElement=V.first)}},inputs:{chart:"chart",annotations:"annotations",colors:"colors",dataLabels:"dataLabels",series:"series",stroke:"stroke",labels:"labels",legend:"legend",markers:"markers",noData:"noData",fill:"fill",tooltip:"tooltip",plotOptions:"plotOptions",responsive:"responsive",xaxis:"xaxis",yaxis:"yaxis",forecastDataPoints:"forecastDataPoints",grid:"grid",states:"states",title:"title",subtitle:"subtitle",theme:"theme",autoUpdateSeries:"autoUpdateSeries"},outputs:{chartReady:"chartReady"},features:[P.TTD],decls:2,vars:0,consts:[["chart",""]],template:function(X,N){1&X&&P._UZ(0,"div",null,0)},encapsulation:2,changeDetection:0}),R})();window.ApexCharts=Ie;let E=(()=>{class R{}return R.\u0275fac=function(X){return new(X||R)},R.\u0275mod=P.oAB({type:R}),R.\u0275inj=P.cJS({}),R})();const te=()=>({type:"line"}),Xe=()=>({curve:"stepline",width:2}),at=()=>({mode:"dark"});function se(R,U){if(1&R&&P._UZ(0,"apx-chart",1),2&R){const X=P.oxw();P.Q6J("series",X.series)("chart",P.DdM(6,te))("stroke",P.DdM(7,Xe))("theme",P.DdM(8,at))("xaxis",X.xaxis)("annotations",X.annotations)}}let Ce=(()=>{class R{users;series;xaxis={type:"datetime",max:Date.now()};annotations={xaxis:[{x:new Date("28 Aug 2023").getTime(),borderColor:"#775DD0",label:{style:{color:"#fff",background:"#775DD0"},text:"Removed limited access"}},{x:new Date("27 Apr 2024").getTime(),borderColor:"#2df35e",label:{style:{color:"#000",background:"#2df35e"},orientation:"horizontal",text:"New homepage"}}]};ngOnInit(){this.series=[{data:[...this.users.filter(X=>X.enabled).map((X,N)=>({x:X.createdAt,y:N+1})),{x:ne.ou.now().toString(),y:this.users.length}]}]}static \u0275fac=function(N){return new(N||R)};static \u0275cmp=P.Xpm({type:R,selectors:[["app-users-graph"]],inputs:{users:"users"},decls:1,vars:1,consts:[[3,"series","chart","stroke","theme","xaxis","annotations",4,"ngIf"],[3,"series","chart","stroke","theme","xaxis","annotations"]],template:function(N,V){1&N&&P.YNc(0,se,1,9,"apx-chart",0),2&N&&P.Q6J("ngIf",V.users)},dependencies:[me.O5,ye],encapsulation:2})}return R})();var ee=J(5313),Qe=J(1476),He=J(3566),ze=J(7700),le=J(6223),st=J(4716);function Ne(R,U){if(1&R&&(P.ynx(0),P._uU(1),P.BQk()),2&R){const X=P.oxw(2);P.xp6(),P.hij(" ",X.form.errors.serverError," ")}}function Be(R,U){if(1&R&&(P.TgZ(0,"div",8),P.YNc(1,Ne,2,1,"ng-container",9),P.qZA()),2&R){const X=P.oxw();P.xp6(),P.Q6J("ngIf",X.form.errors.serverError)}}function Le(R,U){if(1&R&&(P.TgZ(0,"p",10),P._uU(1),P.qZA()),2&R){const X=P.oxw();P.xp6(),P.Oqu(X.errorMessage)}}function Pe(R,U){1&R&&P._UZ(0,"span",11)}const Je=R=>({"is-invalid":R}),rt=R=>({disabled:R});let ue=(()=>{class R{data;usersHttpService;dialogRef;errorMessage="";loading=!1;form=new le.NI(null,le.kI.required.bind(this));constructor(X,N,V){this.data=X,this.usersHttpService=N,this.dialogRef=V}submit(){this.errorMessage=void 0,this.loading=!0,this.usersHttpService.ban(this.data.user.id,this.form.value).pipe((0,st.x)(()=>this.loading=!1)).subscribe({next:()=>{this.dialogRef.close({action:"banned"})},error:X=>{Array.isArray(X.message)?this.form.setErrors({serverError:X.message[0].errors}):this.errorMessage=X.message}})}static \u0275fac=function(N){return new(N||R)(P.Y36(ze.WI),P.Y36(ve),P.Y36(ze.so))};static \u0275cmp=P.Xpm({type:R,selectors:[["app-ban-dialog"]],decls:10,vars:12,consts:[[1,"tw-flex","tw-flex-col","tw-items-center","!tw-bg-grey","tw-w-[280px]","tw-h-[200px]"],[1,"!tw-mt-4","!tw-font-bold","!tw-text-4xl","tw-text-center"],[1,"tw-w-3/4",3,"ngSubmit"],["required","","placeholder","Reason for ban",1,"form-control","!tw-bg-grey","tw-rounded-md","placeholder:tw-text-light-grey",3,"formControl","ngClass"],["class","invalid-feedback",4,"ngIf"],["class","text-danger",4,"ngIf"],[1,"btn","btn-outline-primary","tw-mt-4",3,"disabled","ngClass","click"],["class","spinner-border spinner-border-sm","role","status","aria-hidden","true",4,"ngIf"],[1,"invalid-feedback"],[4,"ngIf"],[1,"text-danger"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"]],template:function(N,V){1&N&&(P.TgZ(0,"div",0)(1,"h4",1),P._uU(2),P.qZA(),P.TgZ(3,"form",2),P.NdJ("ngSubmit",function(){return V.submit()}),P._UZ(4,"input",3),P.YNc(5,Be,2,1,"div",4),P.qZA(),P.YNc(6,Le,2,1,"p",5),P.TgZ(7,"button",6),P.NdJ("click",function(){return V.form.invalid||V.loading||V.submit()}),P._uU(8," Ban"),P.YNc(9,Pe,1,0,"span",7),P.qZA()()),2&N&&(P.xp6(2),P.hij("Ban ",V.data.user.username,""),P.xp6(2),P.Q6J("formControl",V.form)("ngClass",P.VKq(8,Je,V.form.invalid&&(V.form.dirty||V.form.touched))),P.xp6(),P.Q6J("ngIf",V.form.errors),P.xp6(),P.Q6J("ngIf",V.errorMessage),P.xp6(),P.Q6J("disabled",V.form.invalid||V.loading)("ngClass",P.VKq(10,rt,V.form.invalid||V.loading)),P.xp6(2),P.Q6J("ngIf",V.loading))},dependencies:[me.mk,me.O5,le._Y,le.Fj,le.JJ,le.JL,le.Q7,le.F,le.oH],encapsulation:2})}return R})();var Me=J(2296);function Ke(R,U){1&R&&(P.TgZ(0,"th",18),P._uU(1,"Username"),P.qZA())}function Ae(R,U){if(1&R&&(P.TgZ(0,"td",19),P._uU(1),P.qZA()),2&R){const X=U.$implicit;P.xp6(),P.Oqu(X.username)}}function ge(R,U){1&R&&(P.TgZ(0,"th",18),P._uU(1,"Enabled"),P.qZA())}function et(R,U){if(1&R&&(P.TgZ(0,"td",19),P._uU(1),P.qZA()),2&R){const X=U.$implicit;P.xp6(),P.Oqu(X.enabled)}}function Ee(R,U){1&R&&(P.TgZ(0,"th",18),P._uU(1,"Created At"),P.qZA())}function Te(R,U){if(1&R&&(P.TgZ(0,"td",19),P._uU(1),P.qZA()),2&R){const X=U.$implicit;P.xp6(),P.Oqu(X.createdAt)}}function tt(R,U){1&R&&(P.TgZ(0,"th",20),P._uU(1,"Ban Reason"),P.qZA())}function it(R,U){if(1&R&&(P.TgZ(0,"td",19),P._uU(1),P.qZA()),2&R){const X=U.$implicit;P.xp6(),P.Oqu(X.banReason)}}function We(R,U){1&R&&(P.TgZ(0,"th",20),P._uU(1,"Banned By"),P.qZA())}function Ge(R,U){if(1&R&&(P.TgZ(0,"td",19),P._uU(1),P.qZA()),2&R){const X=U.$implicit;P.xp6(),P.Oqu(null==X.bannedBy?null:X.bannedBy.username)}}function nt(R,U){1&R&&(P.TgZ(0,"th",20),P._uU(1,"Actions"),P.qZA())}function ot(R,U){if(1&R){const X=P.EpF();P.TgZ(0,"td",19)(1,"button",21),P.NdJ("click",function(){const ce=P.CHM(X).$implicit,Re=P.oxw();return P.KtG(Re.openBanDialog(ce))}),P._UZ(2,"i",22),P.qZA()()}}function lt(R,U){1&R&&P._UZ(0,"tr",23)}function Ve(R,U){1&R&&P._UZ(0,"tr",24)}function ht(R,U){if(1&R&&(P.TgZ(0,"tr",25)(1,"td",26),P._uU(2),P.qZA()()),2&R){P.oxw();const X=P.MAs(2);P.xp6(2),P.hij('No data matching the filter "',X.value,'"')}}const ct=()=>[25,50,100];let dt=(()=>{class R{dialog;http;dialogSubscription;getAllUsersSubscription;users;displayedColumns=["username","enabled","createdAt","banReason","bannedBy","actions"];dataSource;constructor(X,N){this.dialog=X,this.http=N}paginator;sort;ngAfterViewInit(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}ngOnInit(){this.dataSource=new ee.by(this.users)}applyFilter(X){this.dataSource.filter=X.target.value.trim().toLowerCase(),this.dataSource.paginator&&this.dataSource.paginator.firstPage()}openBanDialog(X){const N=this.dialog.open(ue,{data:{user:X}});this.dialogSubscription=N.afterClosed().subscribe(V=>{V&&(this.getAllUsersSubscription=this.http.getAllUsers().subscribe(ce=>{this.dataSource=new ee.by(ce)}))})}ngOnDestroy(){this.dataSource.disconnect(),this.dialogSubscription?.unsubscribe(),this.getAllUsersSubscription?.unsubscribe()}static \u0275fac=function(N){return new(N||R)(P.Y36(ze.uw),P.Y36(ve))};static \u0275cmp=P.Xpm({type:R,selectors:[["app-users-table"]],viewQuery:function(N,V){if(1&N&&(P.Gf(Qe.NW,5),P.Gf(He.YE,5)),2&N){let ce;P.iGM(ce=P.CRH())&&(V.paginator=ce.first),P.iGM(ce=P.CRH())&&(V.sort=ce.first)}},inputs:{users:"users"},decls:27,vars:5,consts:[[1,"tw-flex","tw-flex-col","tw-items-center"],["placeholder","Ex. yoyo",1,"!tw-bg-grey","tw-rounded-md","placeholder:tw-text-light-grey","tw-h-[40px]","tw-my-4","!tw-border-none","tw-w-[250px]","md:tw-w-[400px]",3,"keyup"],["search",""],[1,"mat-elevation-z8","tw-w-full","tw-overflow-x-scroll"],["mat-table","","matSort","",1,"!tw-bg-grey",3,"dataSource"],["matColumnDef","username"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","enabled"],["matColumnDef","createdAt"],["matColumnDef","banReason"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","bannedBy"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","mat-row",4,"matNoDataRow"],["aria-label","Select page of users",1,"!tw-bg-grey",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell",""],["mat-button","",3,"click"],[1,"fa-solid","fa-ban"],["mat-header-row",""],["mat-row",""],[1,"mat-row"],["colspan","4",1,"mat-cell"]],template:function(N,V){1&N&&(P.TgZ(0,"div",0)(1,"input",1,2),P.NdJ("keyup",function(Re){return V.applyFilter(Re)}),P.qZA(),P.TgZ(3,"div",3)(4,"table",4),P.ynx(5,5),P.YNc(6,Ke,2,0,"th",6)(7,Ae,2,1,"td",7),P.BQk(),P.ynx(8,8),P.YNc(9,ge,2,0,"th",6)(10,et,2,1,"td",7),P.BQk(),P.ynx(11,9),P.YNc(12,Ee,2,0,"th",6)(13,Te,2,1,"td",7),P.BQk(),P.ynx(14,10),P.YNc(15,tt,2,0,"th",11)(16,it,2,1,"td",7),P.BQk(),P.ynx(17,12),P.YNc(18,We,2,0,"th",11)(19,Ge,2,1,"td",7),P.BQk(),P.ynx(20,13),P.YNc(21,nt,2,0,"th",11)(22,ot,3,0,"td",7),P.BQk(),P.YNc(23,lt,1,0,"tr",14)(24,Ve,1,0,"tr",15)(25,ht,3,1,"tr",16),P.qZA(),P._UZ(26,"mat-paginator",17),P.qZA()()),2&N&&(P.xp6(4),P.Q6J("dataSource",V.dataSource),P.xp6(19),P.Q6J("matHeaderRowDef",V.displayedColumns),P.xp6(),P.Q6J("matRowDefColumns",V.displayedColumns),P.xp6(2),P.Q6J("pageSizeOptions",P.DdM(4,ct)))},dependencies:[Me.lW,ee.BZ,ee.fO,ee.as,ee.w1,ee.Dz,ee.nj,ee.ge,ee.ev,ee.XQ,ee.Gk,ee.Ee,He.YE,He.nU,Qe.NW],encapsulation:2})}return R})();function gt(R,U){if(1&R&&(P.TgZ(0,"div"),P._UZ(1,"app-users-table",7),P.qZA()),2&R){const X=P.oxw();P.xp6(),P.Q6J("users",X.users)}}function ut(R,U){if(1&R&&(P.TgZ(0,"div"),P._UZ(1,"app-users-graph",7),P.qZA()),2&R){const X=P.oxw();P.xp6(),P.Q6J("users",X.enabledUsers)}}const pt=[{path:"",component:(()=>{class R{http;usersObservable;users;enabledUsers;constructor(X){this.http=X}ngOnInit(){this.usersObservable=this.http.getAllUsers().subscribe(X=>{this.users=X,this.enabledUsers=this.users.filter(N=>N.enabled)})}ngOnDestroy(){this.usersObservable.unsubscribe()}static \u0275fac=function(N){return new(N||R)(P.Y36(ve))};static \u0275cmp=P.Xpm({type:R,selectors:[["app-users"]],decls:17,vars:4,consts:[[1,"tw-flex","tw-flex-col","tw-items-center"],[1,"tw-text-white","!tw-font-fastup","!tw-text-3xl","tw-text-center"],[1,"tw-font-poppins","tw-font-bold","tw-italic"],[1,"tw-w-5/6"],[1,"!tw-bg-newBlack"],[4,"ngIf"],[1,"!tw-bg-newBlack",3,"expanded"],[3,"users"]],template:function(N,V){1&N&&(P.TgZ(0,"div",0)(1,"h1",1)(2,"span",2),P._uU(3),P.qZA(),P._uU(4," Users "),P.qZA(),P.TgZ(5,"div",3)(6,"mat-accordion")(7,"mat-expansion-panel",4)(8,"mat-expansion-panel-header")(9,"mat-panel-title"),P._uU(10,"Table"),P.qZA()(),P.YNc(11,gt,2,1,"div",5),P.qZA(),P.TgZ(12,"mat-expansion-panel",6)(13,"mat-expansion-panel-header")(14,"mat-panel-title"),P._uU(15,"Graph"),P.qZA()(),P.YNc(16,ut,2,1,"div",5),P.qZA()()()()),2&N&&(P.xp6(3),P.Oqu(null==V.enabledUsers?null:V.enabledUsers.length),P.xp6(8),P.Q6J("ngIf",V.users),P.xp6(),P.Q6J("expanded",!0),P.xp6(4),P.Q6J("ngIf",V.users))},dependencies:[me.O5,Se.pp,Se.ib,Se.yz,Se.yK,Ce,dt],encapsulation:2})}return R})()}];let Ye=(()=>{class R{static \u0275fac=function(N){return new(N||R)};static \u0275mod=P.oAB({type:R});static \u0275inj=P.cJS({imports:[me.ez,Ue.Bz.forChild(pt),O.m,ae.Cv,F.Rq,Ze.Cl,D.AV,xe.Tx,ke.Ps,E]})}return R})()},5054:(_e,Fe,J)=>{var me;function Ue(y,e){var t=Object.keys(y);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(y);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(y,a).enumerable})),t.push.apply(t,i)}return t}function O(y){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var t,i=P(y);if(e){var a=P(this).constructor;t=Reflect.construct(i,arguments,a)}else t=i.apply(this,arguments);return function(r,s){if(s&&("object"==typeof s||"function"==typeof s))return s;if(void 0!==s)throw new TypeError("Derived constructors may only return object or undefined");return qe(r)}(this,t)}}function Se(y,e){return function(t){if(Array.isArray(t))return t}(y)||function(t,i){var a=null==t?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var r,s,n=[],o=!0,l=!1;try{for(a=a.call(t);!(o=(r=a.next()).done)&&(n.push(r.value),!i||n.length!==i);o=!0);}catch(c){l=!0,s=c}finally{try{o||null==a.return||a.return()}finally{if(l)throw s}}return n}}(y,e)||$e(y,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ne(y){return function(e){if(Array.isArray(e))return Ie(e)}(y)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(y)||$e(y)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $e(y,e){if(y){if("string"==typeof y)return Ie(y,e);var t=Object.prototype.toString.call(y).slice(8,-1);return"Object"===t&&y.constructor&&(t=y.constructor.name),"Map"===t||"Set"===t?Array.from(y):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ie(y,e):void 0}}function Ie(y,e){(null==e||e>y.length)&&(e=y.length);for(var t=0,i=new Array(e);t>16,n=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-s)*r)+s)+256*(Math.round((a-n)*r)+n)+(Math.round((a-o)*r)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,t){return y.isColorHex(t)?this.shadeHexColor(e,t):this.shadeRGBColor(e,t)}}],[{key:"bind",value:function(e,t){return function(){return e.apply(t,arguments)}}},{key:"isObject",value:function(e){return e&&"object"===ae(e)&&!Array.isArray(e)&&null!=e}},{key:"is",value:function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"}},{key:"listToArray",value:function(e){var t,i=[];for(t=0;t1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(e)?e:parseFloat(e.toPrecision(t))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(e){var t=String(e).split(/[eE]/);if(1===t.length)return t[0];var i="",a=e<0?"-":"",r=t[0].replace(".",""),s=Number(t[1])+1;if(s<0){for(i=a+"0.";s++;)i+="0";return i+r.replace(/^-/,"")}for(s-=r.length;s--;)i+="0";return r+i}},{key:"getDimensions",value:function(e){var t=getComputedStyle(e,null),i=e.clientHeight,a=e.clientWidth;return i-=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),[a-=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),i]}},{key:"getBoundingClientRect",value:function(e){var t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:e.clientWidth,height:e.clientHeight,x:t.left,y:t.top}}},{key:"getLargestStringFromArr",value:function(e){return e.reduce(function(t,i){return Array.isArray(i)&&(i=i.reduce(function(a,r){return a.length>r.length?a:r})),t.length>i.length?t:i},0)}},{key:"hexToRgba",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==e.substring(0,1)&&(e="#999999");var i=e.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:"x";return e.toString().slice().replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,t)}},{key:"negToZero",value:function(e){return e<0?0:e}},{key:"moveIndexInArray",value:function(e,t,i){if(i>=e.length)for(var a=i-e.length+1;a--;)e.push(void 0);return e.splice(i,0,e.splice(t,1)[0]),e}},{key:"extractNumber",value:function(e){return parseFloat(e.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}},{key:"setELstyles",value:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e.style.key=t[i])}},{key:"isNumber",value:function(e){return!isNaN(e)&&parseFloat(Number(e))===e&&!isNaN(parseInt(e,10))}},{key:"isFloat",value:function(e){return Number(e)===e&&e%1!=0}},{key:"isSafari",value:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"isFirefox",value:function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}},{key:"isIE11",value:function(){if(-1!==window.navigator.userAgent.indexOf("MSIE")||window.navigator.appVersion.indexOf("Trident/")>-1)return!0}},{key:"isIE",value:function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var a=e.indexOf("Edge/");return a>0&&parseInt(e.substring(a+5,e.indexOf(".",a)),10)}},{key:"getGCD",value:function(e,t){var a=Math.pow(10,(arguments.length>2&&void 0!==arguments[2]?arguments[2]:7)-Math.floor(Math.log10(Math.max(e,t))));for(e=Math.round(Math.abs(e)*a),t=Math.round(Math.abs(t)*a);t;){var r=t;t=e%t,e=r}return e/a}},{key:"getPrimeFactors",value:function(e){for(var t=[],i=2;e>=2;)e%i==0?(t.push(i),e/=i):i++;return t}},{key:"mod",value:function(e,t){var a=Math.pow(10,(arguments.length>2&&void 0!==arguments[2]?arguments[2]:7)-Math.floor(Math.log10(Math.max(e,t))));return(e=Math.round(Math.abs(e)*a))%(t=Math.round(Math.abs(t)*a))/a}}]),y}(),ye=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.setEasingFunctions()}return D(y,[{key:"setEasingFunctions",value:function(){var e;if(!this.w.globals.easing){switch(this.w.config.chart.animations.easing){case"linear":e="-";break;case"easein":e="<";break;case"easeout":e=">";break;case"easeinout":default:e="<>";break;case"swing":e=function(t){var i=1.70158;return(t-=1)*t*((i+1)*t+i)+1};break;case"bounce":e=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375};break;case"elastic":e=function(t){return t===!!t?t:Math.pow(2,-10*t)*Math.sin((t-.075)*(2*Math.PI)/.3)+1}}this.w.globals.easing=e}}},{key:"animateLine",value:function(e,t,i,a){e.attr(t).animate(a).attr(i)}},{key:"animateMarker",value:function(e,t,i,a,r,s){t||(t=0),e.attr({r:t,width:t,height:t}).animate(a,r).attr({r:i,width:i.width,height:i.height}).afterAll(function(){s()})}},{key:"animateCircle",value:function(e,t,i,a,r){e.attr({r:t.r,cx:t.cx,cy:t.cy}).animate(a,r).attr({r:i.r,cx:i.cx,cy:i.cy})}},{key:"animateRect",value:function(e,t,i,a,r){e.attr(t).animate(a).attr(i).afterAll(function(){return r()})}},{key:"animatePathsGradually",value:function(e){var c=this.w,d=0;c.config.chart.animations.animateGradually.enabled&&(d=c.config.chart.animations.animateGradually.delay),c.config.chart.animations.dynamicAnimation.enabled&&c.globals.dataChanged&&"bar"!==c.config.chart.type&&(d=0),this.morphSVG(e.el,e.realIndex,e.j,"line"!==c.config.chart.type||c.globals.comboCharts?e.fill:"stroke",e.pathFrom,e.pathTo,e.speed,e.delay*d)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach(function(e){var t=e.el;t.classList.remove("apexcharts-element-hidden"),t.classList.add("apexcharts-hidden-element-shown")})}},{key:"animationCompleted",value:function(e){var t=this.w;t.globals.animationEnded||(t.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof t.config.chart.events.animationEnd&&t.config.chart.events.animationEnd(this.ctx,{el:e,w:t}))}},{key:"morphSVG",value:function(e,t,i,a,r,s,n,o){var l=this,c=this.w;r||(r=e.attr("pathFrom")),s||(s=e.attr("pathTo"));var d=function(g){return"radar"===c.config.chart.type&&(n=1),"M 0 ".concat(c.globals.gridHeight)};(!r||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=d()),(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=d()),c.globals.shouldAnimate||(n=1),e.plot(r).animate(1,c.globals.easing,o).plot(r).animate(n,c.globals.easing,o).plot(s).afterAll(function(){M.isNumber(i)?i===c.globals.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&l.animationCompleted(e):"none"!==a&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&t===c.globals.series.length-1||c.globals.comboCharts)&&l.animationCompleted(e),l.showDelayedElements()})}}]),y}(),oe=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"getDefaultFilter",value:function(e,t){var i=this.w;e.unfilter(!0),(new window.SVG.Filter).size("120%","180%","-5%","-40%"),"none"!==i.config.states.normal.filter?this.applyFilter(e,t,i.config.states.normal.filter.type,i.config.states.normal.filter.value):i.config.chart.dropShadow.enabled&&this.dropShadow(e,i.config.chart.dropShadow,t)}},{key:"addNormalFilter",value:function(e,t){var i=this.w;i.config.chart.dropShadow.enabled&&!e.node.classList.contains("apexcharts-marker")&&this.dropShadow(e,i.config.chart.dropShadow,t)}},{key:"addLightenFilter",value:function(e,t,i){var a=this,r=this.w,s=i.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter(function(n){var o=r.config.chart.dropShadow;(o.enabled?a.addShadow(n,t,o):n).componentTransfer({rgb:{type:"linear",slope:1.5,intercept:s}})}),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"addDarkenFilter",value:function(e,t,i){var a=this,r=this.w,s=i.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter(function(n){var o=r.config.chart.dropShadow;(o.enabled?a.addShadow(n,t,o):n).componentTransfer({rgb:{type:"linear",slope:s}})}),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"applyFilter",value:function(e,t,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;switch(i){case"none":this.addNormalFilter(e,t);break;case"lighten":this.addLightenFilter(e,t,{intensity:a});break;case"darken":this.addDarkenFilter(e,t,{intensity:a})}}},{key:"addShadow",value:function(e,t,i){var a,r=this.w,s=i.blur,n=i.top,o=i.left,l=i.color,c=i.opacity;if((null===(a=r.config.chart.dropShadow.enabledOnSeries)||void 0===a?void 0:a.length)>0&&-1===r.config.chart.dropShadow.enabledOnSeries.indexOf(t))return e;var d=e.flood(Array.isArray(l)?l[t]:l,c).composite(e.sourceAlpha,"in").offset(o,n).gaussianBlur(s).merge(e.source);return e.blend(e.source,d)}},{key:"dropShadow",value:function(e,t){var i,a,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=t.top,n=t.left,o=t.blur,l=t.color,c=t.opacity,d=t.noUserSpaceOnUse,g=this.w;return e.unfilter(!0),M.isIE()&&"radialBar"===g.config.chart.type||(null===(i=g.config.chart.dropShadow.enabledOnSeries)||void 0===i?void 0:i.length)>0&&-1===(null===(a=g.config.chart.dropShadow.enabledOnSeries)||void 0===a?void 0:a.indexOf(r))||(l=Array.isArray(l)?l[r]:l,e.filter(function(p){var f;f=M.isSafari()||M.isFirefox()||M.isIE()?p.flood(l,c).composite(p.sourceAlpha,"in").offset(n,s).gaussianBlur(o):p.flood(l,c).composite(p.sourceAlpha,"in").offset(n,s).gaussianBlur(o).merge(p.source),p.blend(p.source,f)}),d||e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)),e}},{key:"setSelectionFilter",value:function(e,t,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[t]&&a.globals.selectedDataPoints[t].indexOf(i)>-1){e.node.setAttribute("selected",!0);var r=a.config.states.active.filter;"none"!==r&&this.applyFilter(e,t,r.type,r.value)}}},{key:"_scaleFilterSize",value:function(e){!function(t){for(var i in t)t.hasOwnProperty(i)&&e.setAttribute(i,t[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),y}(),E=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"roundPathCorners",value:function(e,t){function i(S,L,C){var z=L.x-S.x,T=L.y-S.y,I=Math.sqrt(z*z+T*T);return a(S,L,Math.min(1,C/I))}function a(S,L,C){return{x:S.x+(L.x-S.x)*C,y:S.y+(L.y-S.y)*C}}function r(S,L){S.length>2&&(S[S.length-2]=L.x,S[S.length-1]=L.y)}function s(S){return{x:parseFloat(S[S.length-2]),y:parseFloat(S[S.length-1])}}e.indexOf("NaN")>-1&&(e="");var n=e.split(/[,\s]/).reduce(function(S,L){var C=L.match("([a-zA-Z])(.+)");return C?(S.push(C[1]),S.push(C[2])):S.push(L),S},[]).reduce(function(S,L){return parseFloat(L)==L&&S.length?S[S.length-1].push(L):S.push([L]),S},[]),o=[];if(n.length>1){var l=s(n[0]),c=null;"Z"==n[n.length-1][0]&&n[0].length>2&&(n[n.length-1]=c=["L",l.x,l.y]),o.push(n[0]);for(var d=1;d2&&"L"==p[0]&&f.length>2&&"L"==f[0]){var b,m,v=s(g),A=s(p),h=s(f);b=i(A,v,t),m=i(A,h,t),r(p,b),p.origPoint=A,o.push(p);var u=a(b,A,.5),x=a(A,m,.5),k=["C",u.x,u.y,x.x,x.y,m.x,m.y];k.origPoint=A,o.push(k)}else o.push(p)}if(c){var w=s(o[o.length-1]);o.push(["Z"]),r(o[0],w)}}else o=n;return o.reduce(function(S,L){return S+L.join(" ")+" "},"")}},{key:"drawLine",value:function(e,t,i,a){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:e,y1:t,x2:i,y2:a,stroke:r,"stroke-dasharray":s,"stroke-width":n,"stroke-linecap":o})}},{key:"drawRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=this.w.globals.dom.Paper.rect();return d.attr({x:e,y:t,width:i>0?i:0,height:a>0?a:0,rx:r,ry:r,opacity:n,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":c}),d.node.setAttribute("fill",s),d}},{key:"drawPolygon",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(e).attr({fill:a,stroke:t,"stroke-width":i})}},{key:"drawCircle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e<0&&(e=0);var i=this.w.globals.dom.Paper.circle(2*e);return null!==t&&i.attr(t),i}},{key:"drawPath",value:function(e){var t=e.d,i=void 0===t?"":t,a=e.stroke,r=void 0===a?"#a8a8a8":a,s=e.strokeWidth,n=void 0===s?1:s,o=e.fill,l=e.fillOpacity,c=void 0===l?1:l,d=e.strokeOpacity,g=void 0===d?1:d,p=e.classes,f=e.strokeLinecap,b=void 0===f?null:f,m=e.strokeDashArray,v=void 0===m?0:m,A=this.w;return null===b&&(b=A.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(A.globals.gridHeight)),A.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":c,stroke:r,"stroke-opacity":g,"stroke-linecap":b,"stroke-width":n,"stroke-dasharray":v,class:p})}},{key:"group",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.w.globals.dom.Paper.group();return null!==e&&t.attr(e),t}},{key:"move",value:function(e,t){return["M",e,t].join(" ")}},{key:"line",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=[" L",e,t].join(" "):"H"===i?a=[" H",e].join(" "):"V"===i&&(a=[" V",t].join(" ")),a}},{key:"curve",value:function(e,t,i,a,r,s){return["C",e,t,i,a,r,s].join(" ")}},{key:"quadraticCurve",value:function(e,t,i,a){return["Q",e,t,i,a].join(" ")}},{key:"arc",value:function(e,t,i,a,r,s,n){var o="A";return arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(o="a"),[o,e,t,i,a,r,s,n].join(" ")}},{key:"renderPaths",value:function(e){var t,i=e.j,a=e.realIndex,r=e.pathFrom,s=e.pathTo,n=e.stroke,o=e.strokeWidth,l=e.strokeLinecap,c=e.fill,d=e.animationDelay,g=e.initialSpeed,p=e.dataChangeSpeed,f=e.className,b=e.shouldClipToGrid,m=void 0===b||b,v=e.bindEventsOnPaths,A=void 0===v||v,h=e.drawShadow,u=void 0===h||h,x=this.w,k=new oe(this.ctx),w=new ye(this.ctx),S=this.w.config.chart.animations.enabled,L=S&&this.w.config.chart.animations.dynamicAnimation.enabled,C=!!(S&&!x.globals.resized||L&&x.globals.dataChanged&&x.globals.shouldAnimate);C?t=r:(t=s,x.globals.animationEnded=!0);var T,z=x.config.stroke.dashArray;T=Array.isArray(z)?z[a]:x.config.stroke.dashArray;var I=this.drawPath({d:t,stroke:n,strokeWidth:o,fill:c,fillOpacity:1,classes:f,strokeLinecap:l,strokeDashArray:T});I.attr("index",a),m&&I.attr({"clip-path":"url(#gridRectMask".concat(x.globals.cuid,")")}),"none"!==x.config.states.normal.filter.type?k.getDefaultFilter(I,a):x.config.chart.dropShadow.enabled&&u&&k.dropShadow(I,x.config.chart.dropShadow,a),A&&(I.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,I)),I.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,I)),I.node.addEventListener("mousedown",this.pathMouseDown.bind(this,I))),I.attr({pathTo:s,pathFrom:r});var H={el:I,j:i,realIndex:a,pathFrom:r,pathTo:s,fill:c,strokeWidth:o,delay:d};return!S||x.globals.resized||x.globals.dataChanged?!x.globals.resized&&x.globals.dataChanged||w.showDelayedElements():w.animatePathsGradually(O(O({},H),{},{speed:g})),x.globals.dataChanged&&L&&C&&w.animatePathsGradually(O(O({},H),{},{speed:p})),I}},{key:"drawPattern",value:function(e,t,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(t,i,function(s){"horizontalLines"===e?s.line(0,0,i,0).stroke({color:a,width:r+1}):"verticalLines"===e?s.line(0,0,0,t).stroke({color:a,width:r+1}):"slantedLines"===e?s.line(0,0,t,i).stroke({color:a,width:r}):"squares"===e?s.rect(t,i).fill("none").stroke({color:a,width:r}):"circles"===e&&s.circle(t).fill("none").stroke({color:a,width:r})})}},{key:"drawGradient",value:function(e,t,i,a,r){var s,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,d=this.w;t.length<9&&0===t.indexOf("#")&&(t=M.hexToRgba(t,a)),i.length<9&&0===i.indexOf("#")&&(i=M.hexToRgba(i,r));var g=0,p=1,f=1,b=null;null!==o&&(g=void 0!==o[0]?o[0]/100:0,p=void 0!==o[1]?o[1]/100:1,f=void 0!==o[2]?o[2]/100:1,b=void 0!==o[3]?o[3]/100:null);var m=!("donut"!==d.config.chart.type&&"pie"!==d.config.chart.type&&"polarArea"!==d.config.chart.type&&"bubble"!==d.config.chart.type);return s=d.globals.dom.Paper.gradient(m?"radial":"linear",null===l||0===l.length?function(h){h.at(g,t,a),h.at(p,i,r),h.at(f,i,r),null!==b&&h.at(b,t,a)}:function(h){(Array.isArray(l[c])?l[c]:l).forEach(function(u){h.at(u.offset/100,u.color,u.opacity)})}),m?s.attr("bubble"!==d.config.chart.type?{gradientUnits:"userSpaceOnUse",cx:d.globals.gridWidth/2,cy:d.globals.gridHeight/2,r:n}:{cx:.5,cy:.5,r:.8,fx:.2,fy:.2}):"vertical"===e?s.from(0,0).to(0,1):"diagonal"===e?s.from(0,0).to(1,1):"horizontal"===e?s.from(0,1).to(1,1):"diagonal2"===e&&s.from(1,0).to(0,1),s}},{key:"getTextBasedOnMaxWidth",value:function(e){var t=e.text,i=e.maxWidth,s=this.getTextRects(t,e.fontSize,e.fontFamily),o=Math.floor(i/(s.width/t.length));return i-1){var o=i.globals.selectedDataPoints[r].indexOf(s);i.globals.selectedDataPoints[r].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.select(".apexcharts-series path").members,c=i.globals.dom.Paper.select(".apexcharts-series circle, .apexcharts-series rect").members,d=function(f){Array.prototype.forEach.call(f,function(b){b.node.setAttribute("selected","false"),a.getDefaultFilter(b,r)})};d(l),d(c)}e.node.setAttribute("selected","true"),n="true",void 0===i.globals.selectedDataPoints[r]&&(i.globals.selectedDataPoints[r]=[]),i.globals.selectedDataPoints[r].push(s)}if("true"===n){var g=i.config.states.active.filter;if("none"!==g)a.applyFilter(e,r,g.type,g.value);else if("none"!==i.config.states.hover.filter&&!i.globals.isTouchDevice){var p=i.config.states.hover.filter;a.applyFilter(e,r,p.type,p.value)}}else"none"!==i.config.states.active.filter.type&&("none"===i.config.states.hover.filter.type||i.globals.isTouchDevice?a.getDefaultFilter(e,r):a.applyFilter(e,r,(p=i.config.states.hover.filter).type,p.value));"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(t,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:r,dataPointIndex:s,w:i}),t&&this.ctx.events.fireEvent("dataPointSelection",[t,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:r,dataPointIndex:s,w:i}])}},{key:"rotateAroundCenter",value:function(e){var t={};return e&&"function"==typeof e.getBBox&&(t=e.getBBox()),{x:t.x+t.width/2,y:t.y+t.height/2}}},{key:"getTextRects",value:function(e,t,i,a){var r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=this.w,n=this.drawText({x:-200,y:-200,text:e,textAnchor:"start",fontSize:t,fontFamily:i,foreColor:"#fff",opacity:0});a&&n.attr("transform",a),s.globals.dom.Paper.add(n);var o=n.bbox();return r||(o=n.node.getBoundingClientRect()),n.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(e,t,i){if("function"==typeof e.getComputedTextLength&&(e.textContent=t,t.length>0&&e.getComputedTextLength()>=i/1.1)){for(var a=t.length-3;a>0;a-=3)if(e.getSubStringLength(0,a)<=i/1.1)return void(e.textContent=t.substring(0,a)+"...");e.textContent="."}}}],[{key:"setAttrs",value:function(e,t){for(var i in t)t.hasOwnProperty(i)&&e.setAttribute(i,t[i])}}]),y}(),te=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"getStackedSeriesTotals",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.w,i=[];if(0===t.globals.series.length)return i;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:null;return null===e?this.w.config.series.reduce(function(t,i){return t+i},0):this.w.globals.series[e].reduce(function(t,i){return t+i},0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var e=this,t=this.w,i=[];return t.globals.seriesGroups.forEach(function(a){var r=[];t.config.series.forEach(function(n,o){a.indexOf(t.globals.seriesNames[o])>-1&&r.push(o)});var s=t.globals.series.map(function(n,o){return-1===r.indexOf(o)?o:-1}).filter(function(n){return-1!==n});i.push(e.getStackedSeriesTotals(s))}),i}},{key:"isSeriesNull",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===e?this.w.config.series.filter(function(t){return null!==t}):this.w.config.series[e].data.filter(function(t){return null!==t})).length}},{key:"seriesHaveSameValues",value:function(e){return this.w.globals.series[e].every(function(t,i,a){return t===a[0]})}},{key:"getCategoryLabels",value:function(e){var t=this.w,i=e.slice();return t.config.xaxis.convertedCatToNumeric&&(i=e.map(function(a,r){return t.config.xaxis.labels.formatter(a-t.globals.minX+1)})),i}},{key:"getLargestSeries",value:function(){var e=this.w;e.globals.maxValsInArrayIndex=e.globals.series.map(function(t){return t.length}).indexOf(Math.max.apply(Math,e.globals.series.map(function(t){return t.length})))}},{key:"getLargestMarkerSize",value:function(){var e=this.w,t=0;return e.globals.markers.size.forEach(function(i){t=Math.max(t,i)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(function(i){t=Math.max(t,i.size)}),t>0&&(t+=e.config.markers.hover.sizeOffset+1),e.globals.markers.largestSize=t,t}},{key:"getSeriesTotals",value:function(){var e=this.w;e.globals.seriesTotals=e.globals.series.map(function(t,i){var a=0;if(Array.isArray(t))for(var r=0;re&&i.globals.seriesX[r][n]0){var f=function(m,v){var A=r.config.yaxis[r.globals.seriesYAxisReverseMap[v]],h=m<0?-1:1;return m=Math.abs(m),A.logarithmic&&(m=a.getBaseLog(A.logBase,m)),-h*m/n[v]};if(s.isMultipleYAxis){l=[];for(var b=0;b0&&(i=!0),{comboBarCount:a,comboCharts:i}}},{key:"extendArrayProps",value:function(e,t,i){var a,r,s,n,o,l;return null!==(a=t)&&void 0!==a&&a.yaxis&&(t=e.extendYAxis(t,i)),null!==(r=t)&&void 0!==r&&r.annotations&&(t.annotations.yaxis&&(t=e.extendYAxisAnnotations(t)),null!==(s=t)&&void 0!==s&&null!==(n=s.annotations)&&void 0!==n&&n.xaxis&&(t=e.extendXAxisAnnotations(t)),null!==(o=t)&&void 0!==o&&null!==(l=o.annotations)&&void 0!==l&&l.points&&(t=e.extendPointAnnotations(t))),t}}]),y}(),Xe=function(){function y(e){F(this,y),this.w=e.w,this.annoCtx=e}return D(y,[{key:"setOrientations",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("vertical"===e.label.orientation){var r=this.w.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(null!==t?t:0,"']"));if(null!==r){var s=r.getBoundingClientRect();r.setAttribute("x",parseFloat(r.getAttribute("x"))-s.height+4),r.setAttribute("y","top"===e.label.position?parseFloat(r.getAttribute("y"))+s.width:parseFloat(r.getAttribute("y"))-s.width);var n=this.annoCtx.graphics.rotateAroundCenter(r),l=n.y;r.setAttribute("transform","rotate(-90 ".concat(n.x," ").concat(l,")"))}}}},{key:"addBackgroundToAnno",value:function(e,t){var i=this.w;if(!e||void 0===t.label.text||void 0!==t.label.text&&!String(t.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),r=e.getBoundingClientRect(),s=t.label.style.padding.left,n=t.label.style.padding.right,o=t.label.style.padding.top,l=t.label.style.padding.bottom;"vertical"===t.label.orientation&&(o=t.label.style.padding.left,l=t.label.style.padding.right,s=t.label.style.padding.top,n=t.label.style.padding.bottom);var g=this.annoCtx.graphics.drawRect(r.left-a.left-s-i.globals.barPadForNumericAxis,r.top-a.top-o,r.width+s+n,r.height+o+l,t.label.borderRadius,t.label.style.background,1,t.label.borderWidth,t.label.borderColor,0);return t.id&&g.node.classList.add(t.id),g}},{key:"annotationsBackground",value:function(){var e=this,t=this.w,i=function(a,r,s){var n=t.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(r,"']"));if(n){var o=n.parentNode,l=e.addBackgroundToAnno(n,a);l&&(o.insertBefore(l.node,n),a.label.mouseEnter&&l.node.addEventListener("mouseenter",a.label.mouseEnter.bind(e,a)),a.label.mouseLeave&&l.node.addEventListener("mouseleave",a.label.mouseLeave.bind(e,a)),a.label.click&&l.node.addEventListener("click",a.label.click.bind(e,a)))}};t.config.annotations.xaxis.map(function(a,r){i(a,r,"xaxis")}),t.config.annotations.yaxis.map(function(a,r){i(a,r,"yaxis")}),t.config.annotations.points.map(function(a,r){i(a,r,"point")})}},{key:"getY1Y2",value:function(e,t){var i,a="y1"===e?t.y:t.y2,r=!1,s=this.w;if(this.annoCtx.invertAxis){var n=s.globals.labels;s.config.xaxis.convertedCatToNumeric&&(n=s.globals.categoryLabels);var o=n.indexOf(a),l=s.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child("+(o+1)+")");i=l?parseFloat(l.getAttribute("y")):(s.globals.gridHeight/n.length-1)*(o+1)-s.globals.barHeight,void 0!==t.seriesIndex&&s.globals.barHeight&&(i=i-s.globals.barHeight/2*(s.globals.series.length-1)+s.globals.barHeight*t.seriesIndex)}else{var c,d=s.globals.seriesYAxisMap[t.yAxisIndex][0];(c=s.config.yaxis[t.yAxisIndex].logarithmic?(a=new te(this.annoCtx.ctx).getLogVal(s.config.yaxis[t.yAxisIndex].logBase,a,d))/s.globals.yLogRatio[d]:(a-s.globals.minYArr[d])/(s.globals.yRange[d]/s.globals.gridHeight))>s.globals.gridHeight?(c=s.globals.gridHeight,r=!0):c<0&&(c=0,r=!0),i=s.globals.gridHeight-c,!t.marker||null!=t.y||(i=0),s.config.yaxis[t.yAxisIndex]&&s.config.yaxis[t.yAxisIndex].reversed&&(i=c)}return"string"==typeof a&&a.indexOf("px")>-1&&(i=parseFloat(a)),{yP:i,clipped:r}}},{key:"getX1X2",value:function(e,t){var i,a="x1"===e?t.x:t.x2,r=this.w,o=this.annoCtx.invertAxis?r.globals.yRange[0]:r.globals.xRange,l=!1;return i=this.annoCtx.inversedReversedAxis?((this.annoCtx.invertAxis?r.globals.maxY:r.globals.maxX)-a)/(o/r.globals.gridWidth):(a-(this.annoCtx.invertAxis?r.globals.minY:r.globals.minX))/(o/r.globals.gridWidth),"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||r.globals.dataFormatXNumeric||r.config.chart.sparkline.enabled||(i=this.getStringX(a)),"string"==typeof a&&a.indexOf("px")>-1&&(i=parseFloat(a)),null==a&&t.marker&&(i=r.globals.gridWidth),void 0!==t.seriesIndex&&r.globals.barWidth&&!this.annoCtx.invertAxis&&(i=i-r.globals.barWidth/2*(r.globals.series.length-1)+r.globals.barWidth*t.seriesIndex),i>r.globals.gridWidth?(i=r.globals.gridWidth,l=!0):i<0&&(i=0,l=!0),{x:i,clipped:l}}},{key:"getStringX",value:function(e){var t=this.w,i=e;t.config.xaxis.convertedCatToNumeric&&t.globals.categoryLabels.length&&(e=t.globals.categoryLabels.indexOf(e)+1);var a=t.globals.labels.indexOf(e),r=t.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child("+(a+1)+")");return r&&(i=parseFloat(r.getAttribute("x"))),i}}]),y}(),at=function(){function y(e){F(this,y),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Xe(this.annoCtx)}return D(y,[{key:"addXaxisAnnotation",value:function(e,t,i){var a,r=this.w,s=this.helpers.getX1X2("x1",e),n=s.x,o=s.clipped,l=!0,c=e.label.text,d=e.strokeDashArray;if(M.isNumber(n)){if(null==e.x2){if(!o){var g=this.annoCtx.graphics.drawLine(n+e.offsetX,0+e.offsetY,n+e.offsetX,r.globals.gridHeight+e.offsetY,e.borderColor,d,e.borderWidth);t.appendChild(g.node),e.id&&g.node.classList.add(e.id)}}else{var p=this.helpers.getX1X2("x2",e);if(a=p.x,l=p.clipped,!o||!l){if(a12?p-12:0===p?12:p;t=(t=(t=(t=t.replace(/(^|[^\\])HH+/g,"$1"+l(p))).replace(/(^|[^\\])H/g,"$1"+p)).replace(/(^|[^\\])hh+/g,"$1"+l(f))).replace(/(^|[^\\])h/g,"$1"+f);var b=a?e.getUTCMinutes():e.getMinutes();t=(t=t.replace(/(^|[^\\])mm+/g,"$1"+l(b))).replace(/(^|[^\\])m/g,"$1"+b);var m=a?e.getUTCSeconds():e.getSeconds();t=(t=t.replace(/(^|[^\\])ss+/g,"$1"+l(m))).replace(/(^|[^\\])s/g,"$1"+m);var v=a?e.getUTCMilliseconds():e.getMilliseconds();t=t.replace(/(^|[^\\])fff+/g,"$1"+l(v,3)),v=Math.round(v/10),t=t.replace(/(^|[^\\])ff/g,"$1"+l(v)),v=Math.round(v/10);var A=p<12?"AM":"PM";t=(t=(t=t.replace(/(^|[^\\])f/g,"$1"+v)).replace(/(^|[^\\])TT+/g,"$1"+A)).replace(/(^|[^\\])T/g,"$1"+A.charAt(0));var h=A.toLowerCase();t=(t=t.replace(/(^|[^\\])tt+/g,"$1"+h)).replace(/(^|[^\\])t/g,"$1"+h.charAt(0));var u=-e.getTimezoneOffset(),x=a||!u?"Z":u>0?"+":"-";if(!a){var k=(u=Math.abs(u))%60;x+=l(Math.floor(u/60))+":"+l(k)}t=t.replace(/(^|[^\\])K/g,"$1"+x);var w=(a?e.getUTCDay():e.getDay())+1;return(t=(t=(t=(t=t.replace(new RegExp(n[0],"g"),n[w])).replace(new RegExp(o[0],"g"),o[w])).replace(new RegExp(r[0],"g"),r[d])).replace(new RegExp(s[0],"g"),s[d])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(e,t,i){var a=this.w;void 0!==a.config.xaxis.min&&(e=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(t=a.config.xaxis.max);var r=this.getDate(e),s=this.getDate(t),n=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(n[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(n[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(n[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(n[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(n[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(n[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(n[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"calculcateLastDaysOfMonth",value:function(e,t,i){return this.determineDaysOfMonths(e,t)-i}},{key:"determineDaysOfYear",value:function(e){var t=365;return this.isLeapYear(e)&&(t=366),t}},{key:"determineRemainingDaysOfYear",value:function(e,t,i){var a=this.daysCntOfYear[t]+i;return t>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(e,t){var i=30;switch(e=M.monthMod(e),!0){case this.months30.indexOf(e)>-1:2===e&&(i=this.isLeapYear(t)?29:28);break;case this.months31.indexOf(e)>-1:default:i=31}return i}}]),y}(),Ce=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return D(y,[{key:"xLabelFormat",value:function(e,t,i,a){var r=this.w;if("datetime"===r.config.xaxis.type&&void 0===r.config.xaxis.labels.formatter&&void 0===r.config.tooltip.x.formatter){var s=new se(this.ctx);return s.formatDate(s.getDate(t),r.config.tooltip.x.format)}return e(t,i,a)}},{key:"defaultGeneralFormatter",value:function(e){return Array.isArray(e)?e.map(function(t){return t}):e}},{key:"defaultYFormatter",value:function(e,t,i){var a=this.w;if(M.isNumber(e))if(0!==a.globals.yValueDecimal)e=e.toFixed(void 0!==t.decimalsInFloat?t.decimalsInFloat:a.globals.yValueDecimal);else{var r=e.toFixed(0);e=e==r?r:e.toFixed(1)}return e}},{key:"setLabelFormatters",value:function(){var e=this,t=this.w;return t.globals.xaxisTooltipFormatter=function(i){return e.defaultGeneralFormatter(i)},t.globals.ttKeyFormatter=function(i){return e.defaultGeneralFormatter(i)},t.globals.ttZFormatter=function(i){return i},t.globals.legendFormatter=function(i){return e.defaultGeneralFormatter(i)},t.globals.xLabelFormatter=void 0!==t.config.xaxis.labels.formatter?t.config.xaxis.labels.formatter:function(i){if(M.isNumber(i)){if(!t.config.xaxis.convertedCatToNumeric&&"numeric"===t.config.xaxis.type){if(M.isNumber(t.config.xaxis.decimalsInFloat))return i.toFixed(t.config.xaxis.decimalsInFloat);var a=t.globals.maxX-t.globals.minX;return i.toFixed(a>0&&a<100?1:0)}return i.toFixed(t.globals.isBarHorizontal&&t.globals.maxY-t.globals.minYArr<4?1:0)}return i},t.globals.ttKeyFormatter="function"==typeof t.config.tooltip.x.formatter?t.config.tooltip.x.formatter:t.globals.xLabelFormatter,"function"==typeof t.config.xaxis.tooltip.formatter&&(t.globals.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||void 0!==t.config.tooltip.y.formatter)&&(t.globals.ttVal=t.config.tooltip.y),void 0!==t.config.tooltip.z.formatter&&(t.globals.ttZFormatter=t.config.tooltip.z.formatter),void 0!==t.config.legend.formatter&&(t.globals.legendFormatter=t.config.legend.formatter),t.config.yaxis.forEach(function(i,a){t.globals.yLabelFormatters[a]=void 0!==i.labels.formatter?i.labels.formatter:function(r){return t.globals.xyCharts?Array.isArray(r)?r.map(function(s){return e.defaultYFormatter(s,i,a)}):e.defaultYFormatter(r,i,a):r}}),t.globals}},{key:"heatmapLabelFormatters",value:function(){var e=this.w;if("heatmap"===e.config.chart.type){e.globals.yAxisScale[0].result=e.globals.seriesNames.slice();var t=e.globals.seriesNames.reduce(function(i,a){return i.length>a.length?i:a},0);e.globals.yAxisScale[0].niceMax=t,e.globals.yAxisScale[0].niceMin=t}}}]),y}(),ee=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"getLabel",value:function(e,t,i,a){var m,v,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",n=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=this.w,l=void 0===e[a]?"":e[a],c=l,d=o.globals.xLabelFormatter,g=o.config.xaxis.labels.formatter,p=!1,f=new Ce(this.ctx);n&&(c=f.xLabelFormat(d,l,l,{i:a,dateFormatter:new se(this.ctx).formatDate,w:o}),void 0!==g&&(c=g(l,e[a],{i:a,dateFormatter:new se(this.ctx).formatDate,w:o}))),t.length>0?(m=t[a].unit,v=null,t.forEach(function(x){"month"===x.unit?v="year":"day"===x.unit?v="month":"hour"===x.unit?v="day":"minute"===x.unit&&(v="hour")}),p=v===m,i=t[a].position,c=t[a].value):"datetime"===o.config.xaxis.type&&void 0===g&&(c=""),void 0===c&&(c=""),c=Array.isArray(c)?c:c.toString();var h,A=new E(this.ctx);h=o.globals.rotateXLabels&&n?A.getTextRects(c,parseInt(s,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):A.getTextRects(c,parseInt(s,10));var u=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(c)&&("NaN"===String(c)||r.indexOf(c)>=0&&u)&&(c=""),{x:i,text:c,textRect:h,isBold:p}}},{key:"checkLabelBasedOnTickamount",value:function(e,t,i){var a=this.w,r=a.config.xaxis.tickAmount;return"dataPoints"===r&&(r=Math.round(a.globals.gridWidth/120)),r>i||e%Math.round(i/(r+1))==0||(t.text=""),t}},{key:"checkForOverflowingLabels",value:function(e,t,i,a,r){var s=this.w;if(0===e&&s.globals.skipFirstTimelinelabel&&(t.text=""),e===i-1&&s.globals.skipLastTimelinelabel&&(t.text=""),s.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var n=r[r.length-1];t.xa.length||a.some(function(r){return Array.isArray(r.seriesName)})?e:i.seriesYAxisReverseMap[e]}},{key:"isYAxisHidden",value:function(e){var t=this.w,i=t.config.yaxis[e];if(!i.show||this.yAxisAllSeriesCollapsed(e))return!0;if(!i.showForNullSeries){var a=t.globals.seriesYAxisMap[e],r=new te(this.ctx);return a.every(function(s){return r.isSeriesNull(s)})}return!1}},{key:"getYAxisForeColor",value:function(e,t){var i=this.w;return Array.isArray(e)&&i.globals.yAxisScale[t]&&this.ctx.theme.pushExtraColors(e,i.globals.yAxisScale[t].result.length,!1),e}},{key:"drawYAxisTicks",value:function(e,t,i,a,r,s,n){var o=this.w,l=new E(this.ctx),c=o.globals.translateY;if(a.show&&t>0){!0===o.config.yaxis[r].opposite&&(e+=a.width);for(var d=t;d>=0;d--){var g=c+t/10+o.config.yaxis[r].labels.offsetY-1;o.globals.isBarHorizontal&&(g=s*d),"heatmap"===o.config.chart.type&&(g+=s/2);var p=l.drawLine(e+i.offsetX-a.width+a.offsetX,g+a.offsetY,e+i.offsetX+a.offsetX,g+a.offsetY,a.color);n.add(p),c+=s}}}}]),y}(),Qe=function(){function y(e){F(this,y),this.w=e.w,this.annoCtx=e,this.helpers=new Xe(this.annoCtx),this.axesUtils=new ee(this.annoCtx)}return D(y,[{key:"addYaxisAnnotation",value:function(e,t,i){var a,r=this.w,s=e.strokeDashArray,n=this.helpers.getY1Y2("y1",e),o=n.yP,l=n.clipped,d=!1,g=e.label.text;if(null==e.y2){if(!l){d=!0;var p=this.annoCtx.graphics.drawLine(0+e.offsetX,o+e.offsetY,this._getYAxisAnnotationWidth(e),o+e.offsetY,e.borderColor,s,e.borderWidth);t.appendChild(p.node),e.id&&p.node.classList.add(e.id)}}else{if((a=(n=this.helpers.getY1Y2("y2",e)).yP)>o){var f=o;o=a,a=f}if(!l||!n.clipped){d=!0;var b=this.annoCtx.graphics.drawRect(0+e.offsetX,a+e.offsetY,this._getYAxisAnnotationWidth(e),o-a,0,e.fillColor,e.opacity,1,e.borderColor,s);b.node.classList.add("apexcharts-annotation-rect"),b.attr("clip-path","url(#gridRectMask".concat(r.globals.cuid,")")),t.appendChild(b.node),e.id&&b.node.classList.add(e.id)}}if(d){var v=this.annoCtx.graphics.drawText({x:("right"===e.label.position?r.globals.gridWidth:"center"===e.label.position?r.globals.gridWidth/2:0)+e.label.offsetX,y:(a??o)+e.label.offsetY-3,text:g,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});v.attr({rel:i}),t.appendChild(v.node)}}},{key:"_getYAxisAnnotationWidth",value:function(e){var t=this.w;return(e.width.indexOf("%")>-1?t.globals.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10))+e.offsetX}},{key:"drawYAxisAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return t.config.annotations.yaxis.forEach(function(a,r){a.yAxisIndex=e.axesUtils.translateYAxisIndex(a.yAxisIndex),e.axesUtils.isYAxisHidden(a.yAxisIndex)&&e.axesUtils.yAxisAllSeriesCollapsed(a.yAxisIndex)||e.addYaxisAnnotation(a,i.node,r)}),i}}]),y}(),He=function(){function y(e){F(this,y),this.w=e.w,this.annoCtx=e,this.helpers=new Xe(this.annoCtx)}return D(y,[{key:"addPointAnnotation",value:function(e,t,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(e.seriesIndex)>-1)){var a=this.helpers.getX1X2("x1",e),r=a.x,s=a.clipped,n=(a=this.helpers.getY1Y2("y1",e)).yP,o=a.clipped;if(M.isNumber(r)&&!o&&!s){var l={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:"apexcharts-point-annotation-marker ".concat(e.marker.cssClass," ").concat(e.id?e.id:"")},c=this.annoCtx.graphics.drawMarker(r+e.marker.offsetX,n+e.marker.offsetY,l);t.appendChild(c.node);var d=e.label.text?e.label.text:"",g=this.annoCtx.graphics.drawText({x:r+e.label.offsetX,y:n+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:d,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});if(g.attr({rel:i}),t.appendChild(g.node),e.customSVG.SVG){var p=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+e.customSVG.cssClass});p.attr({transform:"translate(".concat(r+e.customSVG.offsetX,", ").concat(n+e.customSVG.offsetY,")")}),p.node.innerHTML=e.customSVG.SVG,t.appendChild(p.node)}if(e.image.path){var f=e.image.width?e.image.width:20,b=e.image.height?e.image.height:20;c=this.annoCtx.addImage({x:r+e.image.offsetX-f/2,y:n+e.image.offsetY-b/2,width:f,height:b,path:e.image.path,appendTo:".apexcharts-point-annotations"})}e.mouseEnter&&c.node.addEventListener("mouseenter",e.mouseEnter.bind(this,e)),e.mouseLeave&&c.node.addEventListener("mouseleave",e.mouseLeave.bind(this,e)),e.click&&c.node.addEventListener("click",e.click.bind(this,e))}}}},{key:"drawPointAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return t.config.annotations.points.map(function(a,r){e.addPointAnnotation(a,i.node,r)}),i}}]),y}(),ze={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},le=function(){function y(){F(this,y),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,radius:2,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return D(y,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,easing:"easeinout",speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"transparent",locales:[ze],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.35},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",dateFormatter:function(e){return new Date(e).toDateString()}},png:{filename:void 0},svg:{filename:void 0}},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(e){return e}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(e){return e+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(t,i){return t+i},0)/e.globals.series.length+"%"}}},barLabels:{enabled:!1,margin:5,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(e){return e},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(e){return e}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(e){return e}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(t,i){return t+i},0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(e){return null!==e?e:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{width:12,height:12,strokeWidth:0,fillColors:void 0,strokeColor:"#fff",radius:12,customHTML:void 0,offsetX:0,offsetY:0,onClick:void 0},itemMargin:{horizontal:5,vertical:2},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",width:8,height:8,radius:2,offsetX:0,offsetY:0,onClick:void 0,onDblClick:void 0,showNullDataPoints:!0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{normal:{filter:{type:"none",value:0}},hover:{filter:{type:"lighten",value:.1}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.5}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(e){return e?e+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.4}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"light",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),y}(),st=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.graphics=new E(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Xe(this),this.xAxisAnnotations=new at(this),this.yAxisAnnotations=new Qe(this),this.pointsAnnotations=new He(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return D(y,[{key:"drawAxesAnnotations",value:function(){var e=this.w;if(e.globals.axisCharts){for(var t=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),r=e.config.chart.animations.enabled,s=[t,i,a],n=[i.node,t.node,a.node],o=0;o<3;o++)e.globals.dom.elGraphical.add(s[o]),!r||e.globals.resized||e.globals.dataChanged||"scatter"!==e.config.chart.type&&"bubble"!==e.config.chart.type&&e.globals.dataPoints>1&&n[o].classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:n[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var e=this;this.w.config.annotations.images.map(function(t,i){e.addImage(t,i)})}},{key:"drawTextAnnos",value:function(){var e=this;this.w.config.annotations.texts.map(function(t,i){e.addText(t,i)})}},{key:"addXaxisAnnotation",value:function(e,t,i){this.xAxisAnnotations.addXaxisAnnotation(e,t,i)}},{key:"addYaxisAnnotation",value:function(e,t,i){this.yAxisAnnotations.addYaxisAnnotation(e,t,i)}},{key:"addPointAnnotation",value:function(e,t,i){this.pointsAnnotations.addPointAnnotation(e,t,i)}},{key:"addText",value:function(e,t){var r=e.text,g=e.backgroundColor,p=e.borderWidth,f=e.strokeDashArray,b=e.borderRadius,m=e.borderColor,v=e.appendTo,A=void 0===v?".apexcharts-svg":v,h=e.paddingLeft,u=void 0===h?4:h,x=e.paddingRight,k=void 0===x?4:x,w=e.paddingBottom,S=void 0===w?2:w,L=e.paddingTop,C=void 0===L?2:L,z=this.w,T=this.graphics.drawText({x:e.x,y:e.y,text:r,textAnchor:e.textAnchor||"start",fontSize:e.fontSize||"12px",fontWeight:e.fontWeight||"regular",fontFamily:e.fontFamily||z.config.chart.fontFamily,foreColor:e.foreColor||z.config.chart.foreColor,cssClass:e.cssClass}),I=z.globals.dom.baseEl.querySelector(A);I&&I.appendChild(T.node);var Y=T.bbox();if(r){var H=this.graphics.drawRect(Y.x-u,Y.y-C,Y.width+u+k,Y.height+S+C,b,g||"transparent",1,p,m,f);I.insertBefore(H.node,T.node)}}},{key:"addImage",value:function(e,t){var i=this.w,r=e.x,s=void 0===r?0:r,n=e.y,o=void 0===n?0:n,l=e.width,c=void 0===l?20:l,d=e.height,g=void 0===d?20:d,p=e.appendTo,f=void 0===p?".apexcharts-svg":p,b=i.globals.dom.Paper.image(e.path);b.size(c,g).move(s,o);var m=i.globals.dom.baseEl.querySelector(f);return m&&m.appendChild(b.node),b}},{key:"addXaxisAnnotationExternal",value:function(e,t,i){return this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(e,t,i){return this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(e,t,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(e){var t=e.params,i=e.pushToMemory,a=e.context,r=e.type,s=e.contextMethod,n=a,o=n.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations")),c=l.childNodes.length+1,d=new le,g=Object.assign({},"xaxis"===r?d.xAxisAnnotation:"yaxis"===r?d.yAxisAnnotation:d.pointAnnotation),p=M.extend(g,t);switch(r){case"xaxis":this.addXaxisAnnotation(p,l,c);break;case"yaxis":this.addYaxisAnnotation(p,l,c);break;case"point":this.addPointAnnotation(p,l,c)}var f=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations .apexcharts-").concat(r,"-annotation-label[rel='").concat(c,"']")),b=this.helpers.addBackgroundToAnno(f,p);return b&&l.insertBefore(b.node,f),i&&o.globals.memory.methodsToExec.push({context:n,id:p.id?p.id:M.randomId(),method:s,label:"addAnnotation",params:t}),a}},{key:"clearAnnotations",value:function(e){var t=e.w,i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");t.globals.memory.methodsToExec.map(function(a,r){"addText"!==a.label&&"addAnnotation"!==a.label||t.globals.memory.methodsToExec.splice(r,1)}),i=M.listToArray(i),Array.prototype.forEach.call(i,function(a){for(;a.firstChild;)a.removeChild(a.firstChild)})}},{key:"removeAnnotation",value:function(e,t){var i=e.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(t));a&&(i.globals.memory.methodsToExec.map(function(r,s){r.id===t&&i.globals.memory.methodsToExec.splice(s,1)}),Array.prototype.forEach.call(a,function(r){r.parentElement.removeChild(r)}))}}]),y}(),Ne=function(y){var e,t=y.isTimeline,i=y.ctx,a=y.seriesIndex,r=y.dataPointIndex,s=y.y1,n=y.y2,o=y.w,l=o.globals.seriesRangeStart[a][r],c=o.globals.seriesRangeEnd[a][r],d=o.globals.labels[r],g=o.config.series[a].name?o.config.series[a].name:"",p=o.globals.ttKeyFormatter,f=o.config.tooltip.y.title.formatter,b={w:o,seriesIndex:a,dataPointIndex:r,start:l,end:c};"function"==typeof f&&(g=f(g,b)),null!==(e=o.config.series[a].data[r])&&void 0!==e&&e.x&&(d=o.config.series[a].data[r].x),t||"datetime"===o.config.xaxis.type&&(d=new Ce(i).xLabelFormat(o.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new se(i).formatDate,w:o})),"function"==typeof p&&(d=p(d,b)),Number.isFinite(s)&&Number.isFinite(n)&&(l=s,c=n);var m="",v="",A=o.globals.colors[a];if(void 0===o.config.tooltip.x.formatter)if("datetime"===o.config.xaxis.type){var h=new se(i);m=h.formatDate(h.getDate(l),o.config.tooltip.x.format),v=h.formatDate(h.getDate(c),o.config.tooltip.x.format)}else m=l,v=c;else m=o.config.tooltip.x.formatter(l),v=o.config.tooltip.x.formatter(c);return{start:l,end:c,startVal:m,endVal:v,ylabel:d,color:A,seriesName:g}},Be=function(y){var e=y.color,t=y.seriesName,i=y.ylabel,a=y.start,r=y.end,s=y.seriesIndex,n=y.dataPointIndex,o=y.ctx.tooltip.tooltipLabels.getFormatters(s);a=o.yLbFormatter(a),r=o.yLbFormatter(r);var l=o.yLbFormatter(y.w.globals.series[s][n]),c='\n '.concat(a,'\n - \n ').concat(r,"\n ");return'
'+(t||"")+'
'+i+": "+(y.w.globals.comboCharts?"rangeArea"===y.w.config.series[s].type||"rangeBar"===y.w.config.series[s].type?c:"".concat(l,""):c)+"
"},Le=function(){function y(e){F(this,y),this.opts=e}return D(y,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{chart:{animations:{easing:"swing"}},dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(e){return this.hideYAxis(),M.extend(e,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"bar",value:function(){return{chart:{stacked:!1,animations:{easing:"swing"}},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square",radius:2,size:8}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),O(O({},this.bar()),{},{chart:{animations:{easing:"linear",speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var e=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){return e._getBoxTooltip(t.w,t.seriesIndex,t.dataPointIndex,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var e=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){return e._getBoxTooltip(t.w,t.seriesIndex,t.dataPointIndex,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:5,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(e,t){var i=t.seriesIndex,a=t.dataPointIndex,r=t.w,s=function(){return r.globals.seriesRangeEnd[i][a]-r.globals.seriesRangeStart[i][a]};return r.globals.comboCharts?"rangeBar"===r.config.series[i].type||"rangeArea"===r.config.series[i].type?s():e:s()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(e){return e.w.config.plotOptions&&e.w.config.plotOptions.bar&&e.w.config.plotOptions.bar.horizontal?(a=(i=Ne(O(O({},t=e),{},{isTimeline:!0}))).color,r=i.seriesName,s=i.ylabel,n=i.startVal,o=i.endVal,Be(O(O({},t),{},{color:a,seriesName:r,ylabel:s,start:n,end:o}))):function(t){var i=Ne(t),a=i.color,r=i.seriesName,s=i.ylabel,n=i.start,o=i.end;return Be(O(O({},t),{},{color:a,seriesName:r,ylabel:s,start:n,end:o}))}(e);var t,i,a,r,s,n,o}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(e){var t,i;return null!==(t=e.plotOptions.bar)&&void 0!==t&&t.barHeight||(e.plotOptions.bar.barHeight=2),null!==(i=e.plotOptions.bar)&&void 0!==i&&i.columnWidth||(e.plotOptions.bar.columnWidth=2),e}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(e){return a=(i=Ne(t=e)).color,r=i.seriesName,s=i.ylabel,n=i.start,o=i.end,Be(O(O({},t),{},{color:a,seriesName:r,ylabel:s,start:n,end:o}));var t,i,a,r,s,n,o}}}}},{key:"brush",value:function(e){return M.extend(e,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;var t=e.dataLabels.formatter;return e.yaxis.forEach(function(i,a){e.yaxis[a].min=0,e.yaxis[a].max=100}),"bar"===e.chart.type&&(e.dataLabels.formatter=t||function(i){return"number"==typeof i&&i?i.toFixed(0)+"%":i}),e}},{key:"stackedBars",value:function(){var e=this.bar();return O(O({},e),{},{plotOptions:O(O({},e.plotOptions),{},{bar:O(O({},e.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(e){return e.xaxis.convertedCatToNumeric=!0,e}},{key:"convertCatToNumericXaxis",value:function(e,t,i){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(s){return M.isNumber(s)?Math.floor(s):s};var a=e.xaxis.labels.formatter,r=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return i&&i.length&&(r=i.map(function(s){return Array.isArray(s)?s:String(s)})),r&&r.length&&(e.xaxis.labels.formatter=function(s){return M.isNumber(s)?a(r[Math.floor(s)-1]):a(s)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||"dataPoints",e}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square",size:10,offsetY:2}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:3,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1},xaxis:{labels:{formatter:function(e){return e},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0}}}},{key:"_getBoxTooltip",value:function(e,t,i,a,r){var s=e.globals.seriesCandleO[t][i],n=e.globals.seriesCandleH[t][i],o=e.globals.seriesCandleM[t][i],l=e.globals.seriesCandleL[t][i],c=e.globals.seriesCandleC[t][i];return e.config.series[t].type&&e.config.series[t].type!==r?'
\n '.concat(e.config.series[t].name?e.config.series[t].name:"series-"+(t+1),": ").concat(e.globals.series[t][i],"\n
"):'
')+"
".concat(a[0],': ')+s+"
"+"
".concat(a[1],': ')+n+"
"+(o?"
".concat(a[2],': ')+o+"
":"")+"
".concat(a[3],': ')+l+"
"+"
".concat(a[4],': ')+c+"
"}}]),y}(),Pe=function(){function y(e){F(this,y),this.opts=e}return D(y,[{key:"init",value:function(e){var t=e.responsiveOverride,i=this.opts,a=new le,r=new Le(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var s=a.init(),n={};if(i&&"object"===ae(i)){var o,l,c,d,g,p,f,b,m={};m=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?r[i.chart.type]():r.line(),null!==(o=i.plotOptions)&&void 0!==o&&null!==(l=o.bar)&&void 0!==l&&l.isFunnel&&(m=r.funnel()),i.chart.stacked&&"bar"===i.chart.type&&(m=r.stackedBars()),null!==(c=i.chart.brush)&&void 0!==c&&c.enabled&&(m=r.brush(m)),i.chart.stacked&&"100%"===i.chart.stackType&&(i=r.stacked100(i)),null!==(d=i.plotOptions)&&void 0!==d&&null!==(g=d.bar)&&void 0!==g&&g.isDumbbell&&(i=r.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},t||(i.xaxis.convertedCatToNumeric=!1),(null!==(p=(i=this.checkForCatToNumericXAxis(this.chartType,m,i)).chart.sparkline)&&void 0!==p&&p.enabled||null!==(f=window.Apex.chart)&&void 0!==f&&null!==(b=f.sparkline)&&void 0!==b&&b.enabled)&&(m=r.sparkline(m)),n=M.extend(s,m)}var v=M.extend(n,window.Apex);return s=M.extend(v,i),this.handleUserInputErrors(s)}},{key:"checkForCatToNumericXAxis",value:function(e,t,i){var a,r,s=new Le(i);return("bar"===e||"boxPlot"===e)&&(null===(a=i.plotOptions)||void 0===a||null===(r=a.bar)||void 0===r?void 0:r.horizontal)||"pie"===e||"polarArea"===e||"donut"===e||"radar"===e||"radialBar"===e||"heatmap"===e||!("datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type)||"between"===(i.xaxis.tickPlacement?i.xaxis.tickPlacement:t.xaxis&&t.xaxis.tickPlacement)||(i=s.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(e,t){var i=new le;(void 0===e.yaxis||!e.yaxis||Array.isArray(e.yaxis)&&0===e.yaxis.length)&&(e.yaxis={}),e.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(e.yaxis=M.extend(e.yaxis,window.Apex.yaxis)),e.yaxis=e.yaxis.constructor!==Array?[M.extend(i.yAxis,e.yaxis)]:M.extendArray(e.yaxis,i.yAxis);var a=!1;e.yaxis.forEach(function(s){s.logarithmic&&(a=!0)});var r=e.series;return t&&!r&&(r=t.config.series),a&&r.length!==e.yaxis.length&&r.length&&(e.yaxis=r.map(function(s,n){if(s.name||(r[n].name="series-".concat(n+1)),e.yaxis[n])return e.yaxis[n].seriesName=r[n].name,e.yaxis[n];var o=M.extend(i.yAxis,e.yaxis[0]);return o.show=!1,o})),a&&r.length>1&&r.length!==e.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),e}},{key:"extendAnnotations",value:function(e){return void 0===e.annotations&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),this.extendPointAnnotations(e)}},{key:"extendYAxisAnnotations",value:function(e){var t=new le;return e.annotations.yaxis=M.extendArray(void 0!==e.annotations.yaxis?e.annotations.yaxis:[],t.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var t=new le;return e.annotations.xaxis=M.extendArray(void 0!==e.annotations.xaxis?e.annotations.xaxis:[],t.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var t=new le;return e.annotations.points=M.extendArray(void 0!==e.annotations.points?e.annotations.points:[],t.pointAnnotation),e}},{key:"checkForDarkTheme",value:function(e){e.theme&&"dark"===e.theme.mode&&(e.tooltip||(e.tooltip={}),"light"!==e.tooltip.theme&&(e.tooltip.theme="dark"),e.chart.foreColor||(e.chart.foreColor="#f6f7f8"),e.chart.background||(e.chart.background="#424242"),e.theme.palette||(e.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(e){var t=e;if(t.tooltip.shared&&t.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===t.chart.type&&t.plotOptions.bar.horizontal){if(t.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");t.yaxis[0].reversed&&(t.yaxis[0].opposite=!0),t.xaxis.tooltip.enabled=!1,t.yaxis[0].tooltip.enabled=!1,t.chart.zoom.enabled=!1}return"bar"!==t.chart.type&&"rangeBar"!==t.chart.type||t.tooltip.shared&&"barWidth"===t.xaxis.crosshairs.width&&t.series.length>1&&(t.xaxis.crosshairs.width="tickWidth"),"candlestick"!==t.chart.type&&"boxPlot"!==t.chart.type||t.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(t.chart.type," chart is not supported.")),t.yaxis[0].reversed=!1),t}}]),y}(),Je=function(){function y(){F(this,y)}return D(y,[{key:"initGlobalVars",value:function(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRange=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.labels=[],e.hasXaxisGroups=!1,e.groups=[],e.barGroups=[],e.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.isXNumeric=!1,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0,e.multiAxisTickAmount=0}},{key:"globalVars",value:function(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],goldenPadding:35,invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:"pan"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.pan,selectionEnabled:"selection"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,easing:null,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(e){var t=this.globalVars(e);return this.initGlobalVars(t),t.initialConfig=M.extend({},e),t.initialSeries=M.clone(e.series),t.lastXAxis=M.clone(t.initialConfig.xaxis),t.lastYAxis=M.clone(t.initialConfig.yaxis),t}}]),y}(),rt=function(){function y(e){F(this,y),this.opts=e}return D(y,[{key:"init",value:function(){var e=new Pe(this.opts).init({responsiveOverride:!1});return{config:e,globals:(new Je).init(e)}}}]),y}(),ue=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0}return D(y,[{key:"clippedImgArea",value:function(e){var t=this.w,i=t.config,a=parseInt(t.globals.gridWidth,10),r=parseInt(t.globals.gridHeight,10),s=a>r?a:r,n=e.image,o=0,l=0;void 0===e.width&&void 0===e.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,l=i.fill.image.height):(o=s+1,l=s):(o=e.width,l=e.height);var c=document.createElementNS(t.globals.SVGNS,"pattern");E.setAttrs(c,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var d=document.createElementNS(t.globals.SVGNS,"image");c.appendChild(d),d.setAttributeNS(window.SVG.xlink,"href",n),E.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),d.style.opacity=e.opacity,t.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(e){var t=this.w,i=t.config.chart.type;return this.seriesIndex=("bar"===i||"rangeBar"===i)&&t.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?e.seriesNumber:e.seriesNumber%t.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(e){var t=this.w;this.opts=e;var i,a,r,s=this.w.config;this.seriesIndex=this.getSeriesIndex(e);var n=this.getFillColors()[this.seriesIndex];void 0!==t.globals.seriesColors[this.seriesIndex]&&(n=t.globals.seriesColors[this.seriesIndex]),"function"==typeof n&&(n=n({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:t}));var o=e.fillType?e.fillType:this.getFillType(this.seriesIndex),l=Array.isArray(s.fill.opacity)?s.fill.opacity[this.seriesIndex]:s.fill.opacity;e.color&&(n=e.color),n||(n="#fff",console.warn("undefined color - ApexCharts"));var c=n;if(-1===n.indexOf("rgb")?n.length<9&&(c=M.hexToRgba(n,l)):n.indexOf("rgba")>-1&&(l=M.getOpacityFromRGBA(n)),e.opacity&&(l=e.opacity),"pattern"===o&&(a=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:a,fillColor:n,fillOpacity:l,defaultColor:c})),"gradient"===o&&(r=this.handleGradientFill({fillConfig:e.fillConfig,fillColor:n,fillOpacity:l,i:this.seriesIndex})),"image"===o){var d=s.fill.image.src,g=e.patternID?e.patternID:"";this.clippedImgArea({opacity:l,image:Array.isArray(d)?e.seriesNumber-1&&(p=M.getOpacityFromRGBA(g));var f=void 0===s.gradient.opacityTo?i:Array.isArray(s.gradient.opacityTo)?s.gradient.opacityTo[r]:s.gradient.opacityTo;if(void 0===s.gradient.gradientToColors||0===s.gradient.gradientToColors.length)n=c.shadeColor("dark"===s.gradient.shade?-1*parseFloat(s.gradient.shadeIntensity):parseFloat(s.gradient.shadeIntensity),t.indexOf("rgb")>-1?M.rgb2hex(t):t);else if(s.gradient.gradientToColors[o.seriesNumber]){var b=s.gradient.gradientToColors[o.seriesNumber];n=b,b.indexOf("rgba")>-1&&(f=M.getOpacityFromRGBA(b))}else n=t;if(s.gradient.gradientFrom&&(g=s.gradient.gradientFrom),s.gradient.gradientTo&&(n=s.gradient.gradientTo),s.gradient.inverseColors){var m=g;g=n,n=m}return g.indexOf("rgb")>-1&&(g=M.rgb2hex(g)),n.indexOf("rgb")>-1&&(n=M.rgb2hex(n)),l.drawGradient(d,g,n,p,f,o.size,s.gradient.stops,s.gradient.colorStops,r)}}]),y}(),Me=function(){function y(e,t){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"setGlobalMarkerSize",value:function(){var e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],n=this.w,o=t,l=e,c=null,d=new E(this.ctx),g=n.config.markers.discrete&&n.config.markers.discrete.length;if((n.globals.markers.size[t]>0||s||g)&&(c=d.group({class:s||g?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(n.globals.cuid,")")),Array.isArray(l.x))for(var p=0;p0:n.config.markers.size>0)||s||g){M.isNumber(l.y[p])?b+=" w".concat(M.randomId()):b="apexcharts-nullpoint";var m=this.getMarkerConfig({cssClass:b,seriesIndex:t,dataPointIndex:f});n.config.series[o].data[f]&&(n.config.series[o].data[f].fillColor&&(m.pointFillColor=n.config.series[o].data[f].fillColor),n.config.series[o].data[f].strokeColor&&(m.pointStrokeColor=n.config.series[o].data[f].strokeColor)),a&&(m.pSize=a),(l.x[p]<0||l.x[p]>n.globals.gridWidth||l.y[p]<-n.globals.markers.largestSize||l.y[p]>n.globals.gridHeight+n.globals.markers.largestSize)&&(m.pSize=0),(r=d.drawMarker(l.x[p],l.y[p],m)).attr("rel",f),r.attr("j",f),r.attr("index",t),r.node.setAttribute("default-marker-size",m.pSize),new oe(this.ctx).setSelectionFilter(r,t,f),this.addEvents(r),c&&c.add(r)}else void 0===n.globals.pointsArray[t]&&(n.globals.pointsArray[t]=[]),n.globals.pointsArray[t].push([l.x[p],l.y[p]])}return c}},{key:"getMarkerConfig",value:function(e){var t=e.cssClass,i=e.seriesIndex,a=e.dataPointIndex,r=void 0===a?null:a,s=e.finishRadius,n=void 0===s?null:s,o=this.w,l=this.getMarkerStyle(i),c=o.globals.markers.size[i],d=o.config.markers;return null!==r&&d.discrete.length&&d.discrete.map(function(g){g.seriesIndex===i&&g.dataPointIndex===r&&(l.pointStrokeColor=g.strokeColor,l.pointFillColor=g.fillColor,c=g.size,l.pointShape=g.shape)}),{pSize:null===n?c:n,pRadius:d.radius,width:Array.isArray(d.width)?d.width[i]:d.width,height:Array.isArray(d.height)?d.height[i]:d.height,pointStrokeWidth:Array.isArray(d.strokeWidth)?d.strokeWidth[i]:d.strokeWidth,pointStrokeColor:l.pointStrokeColor,pointFillColor:l.pointFillColor,shape:l.pointShape||(Array.isArray(d.shape)?d.shape[i]:d.shape),class:t,pointStrokeOpacity:Array.isArray(d.strokeOpacity)?d.strokeOpacity[i]:d.strokeOpacity,pointStrokeDashArray:Array.isArray(d.strokeDashArray)?d.strokeDashArray[i]:d.strokeDashArray,pointFillOpacity:Array.isArray(d.fillOpacity)?d.fillOpacity[i]:d.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(e){var t=this.w,i=new E(this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,e)),e.node.addEventListener("click",t.config.markers.onClick),e.node.addEventListener("dblclick",t.config.markers.onDblClick),e.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,e),{passive:!0})}},{key:"getMarkerStyle",value:function(e){var t=this.w,i=t.globals.markers.colors,a=t.config.markers.strokeColor||t.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[e]:a,pointFillColor:Array.isArray(i)?i[e]:i}}}]),y}(),Ke=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled}return D(y,[{key:"draw",value:function(e,t,i){var a=this.w,r=new E(this.ctx),s=i.realIndex,n=i.pointsPos,o=i.zRatio,l=i.elParent,c=r.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(c.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(n.x))for(var d=0;dm.maxBubbleRadius&&(b=m.maxBubbleRadius)}a.config.chart.animations.enabled||(f=b);var A=n.y[d];if(f=f||0,null!==A&&void 0!==a.globals.series[s][g]||(p=!1),p){var h=this.drawPoint(n.x[d],A,f,b,s,g,t);c.add(h)}l.add(c)}}},{key:"drawPoint",value:function(e,t,i,a,r,s,n){var o=this.w,l=r,c=new ye(this.ctx),d=new oe(this.ctx),g=new ue(this.ctx),p=new Me(this.ctx),f=new E(this.ctx),b=p.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:s,finishRadius:"bubble"===o.config.chart.type||o.globals.comboCharts&&o.config.series[r]&&"bubble"===o.config.series[r].type?a:null});a=b.pSize;var m,v=g.fillPath({seriesNumber:r,dataPointIndex:s,color:b.pointFillColor,patternUnits:"objectBoundingBox",value:o.globals.series[r][n]});if("circle"===b.shape?m=f.drawCircle(i):"square"!==b.shape&&"rect"!==b.shape||(m=f.drawRect(0,0,b.width-b.pointStrokeWidth/2,b.height-b.pointStrokeWidth/2,b.pRadius)),o.config.series[l].data[s]&&o.config.series[l].data[s].fillColor&&(v=o.config.series[l].data[s].fillColor),m.attr({x:e-b.width/2-b.pointStrokeWidth/2,y:t-b.height/2-b.pointStrokeWidth/2,cx:e,cy:t,fill:v,"fill-opacity":b.pointFillOpacity,stroke:b.pointStrokeColor,r:a,"stroke-width":b.pointStrokeWidth,"stroke-dasharray":b.pointStrokeDashArray,"stroke-opacity":b.pointStrokeOpacity}),o.config.chart.dropShadow.enabled&&d.dropShadow(m,o.config.chart.dropShadow,r),!this.initialAnim||o.globals.dataChanged||o.globals.resized?o.globals.animationEnded=!0:c.animateMarker(m,0,"circle"===b.shape?a:{width:b.width,height:b.height},o.config.chart.animations.speed,o.globals.easing,function(){window.setTimeout(function(){c.animationCompleted(m)},100)}),o.globals.dataChanged&&"circle"===b.shape)if(this.dynamicAnim){var u,x,k,w,S=o.config.chart.animations.dynamicAnimation.speed;null!=(w=o.globals.previousPaths[r]&&o.globals.previousPaths[r][n])&&(u=w.x,x=w.y,k=void 0!==w.r?w.r:a);for(var L=0;Lo.globals.gridHeight+g&&(t=o.globals.gridHeight+g/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:e,y:t,width:d,height:g}),void 0!==o.globals.dataLabelsRects[a][o.globals.dataLabelsRects[a].length-2]){var b=o.globals.dataLabelsRects[a][void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0];(e>b.x+b.width||t>b.y+b.height||t+gt.globals.gridWidth+m.textRects.width+30)&&(o="");var v=t.globals.dataLabels.style.colors[s];(("bar"===t.config.chart.type||"rangeBar"===t.config.chart.type)&&t.config.plotOptions.bar.distributed||t.config.dataLabels.distributed)&&(v=t.globals.dataLabels.style.colors[n]),"function"==typeof v&&(v=v({series:t.globals.series,seriesIndex:s,dataPointIndex:n,w:t})),p&&(v=p);var A=g.offsetX,h=g.offsetY;if("bar"!==t.config.chart.type&&"rangeBar"!==t.config.chart.type||(A=0,h=0),m.drawnextLabel){var u=i.drawText({width:100,height:parseInt(g.style.fontSize,10),x:a+A,y:r+h,foreColor:v,textAnchor:l||g.textAnchor,text:o,fontSize:c||g.style.fontSize,fontFamily:g.style.fontFamily,fontWeight:g.style.fontWeight||"normal"});if(u.attr({class:"apexcharts-datalabel",cx:a,cy:r}),g.dropShadow.enabled){var x=g.dropShadow;new oe(this.ctx).dropShadow(u,x)}d.add(u),void 0===t.globals.lastDrawnDataLabelsIndexes[s]&&(t.globals.lastDrawnDataLabelsIndexes[s]=[]),t.globals.lastDrawnDataLabelsIndexes[s].push(n)}}}},{key:"addBackgroundToDataLabel",value:function(e,t){var i=this.w,a=i.config.dataLabels.background,r=a.padding,s=a.padding/2,n=t.width,o=t.height,l=new E(this.ctx).drawRect(t.x-r,t.y-s/2,n+2*r,o+s,a.borderRadius,"transparent"===i.config.chart.background?"#fff":i.config.chart.background,a.opacity,a.borderWidth,a.borderColor);return a.dropShadow.enabled&&new oe(this.ctx).dropShadow(l,a.dropShadow),l}},{key:"dataLabelsBackground",value:function(){var e=this.w;if("bubble"!==e.config.chart.type)for(var t=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,r=M.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):r=this.emptyCollapsedSeries(r),a.config.series=r,e&&(t&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(r,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(e){for(var t=this.w,i=0;i-1&&(e[i].data=[]);return e}},{key:"toggleSeriesOnHover",value:function(e,t){var i=this.w;t||(t=e.target);var a=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if("mousemove"===e.type){var r=parseInt(t.getAttribute("rel"),10)-1,s=null,n=null,o=null;i.globals.axisCharts||"radialBar"===i.config.chart.type?i.globals.axisCharts?(s=i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(r,"']")),n=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(r,"']")),o=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i.globals.seriesYAxisReverseMap[r],"']"))):s=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(r+1,"']")):s=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(r+1,"'] path"));for(var c=0;c=o.from&&c<=o.to&&r[l].classList.remove(i.legendInactiveClass)}}(a.config.plotOptions.heatmap.colorScale.ranges[n])}else"mouseout"===e.type&&s("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"asc",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.w,a=0;if(i.config.series.length>1)for(var r=i.config.series.map(function(n,o){return n.data&&n.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(o)&&(!i.globals.comboCharts||0===t.length||t.length&&t.indexOf(i.config.series[o].type)>-1)?o:-1}),s="asc"===e?0:r.length-1;"asc"===e?s=0;"asc"===e?s++:s--)if(-1!==r[s]){a=r[s];break}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map(function(e,t){return"bar"===e.type||"column"===e.type?t:-1}).filter(function(e){return-1!==e}):this.w.config.series.map(function(e,t){return t})}},{key:"getPreviousPaths",value:function(){var e=this.w;function t(s,n,o){for(var l=s[n].childNodes,c={type:o,paths:[],realIndex:s[n].getAttribute("data:realIndex")},d=0;d0)for(var a=function(s){for(var n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(s,"'] rect")),o=[],l=function(d){var g=function(f){return n[d].getAttribute(f)},p={x:parseFloat(g("x")),y:parseFloat(g("y")),width:parseFloat(g("width")),height:parseFloat(g("height"))};o.push({rect:p,color:n[d].getAttribute("color")})},c=0;c0)for(var a=0;a0?t:[]})}}]),y}(),et=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new te(this.ctx)}return D(y,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),t=new ge(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),void 0!==e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&null!==e[this.activeSeriesIndex].data[0]&&void 0!==e[this.activeSeriesIndex].data[0].x&&null!==e[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var e=this.w.config.series.slice(),t=new ge(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),void 0!==e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&null!=e[this.activeSeriesIndex].data[0]&&e[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(e,t){for(var i=this.w.config,a=this.w.globals,r="boxPlot"===i.chart.type||"boxPlot"===i.series[t].type,s=0;s=5?e[t].data[s][4]:e[t].data[s][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var n=new Date(e[t].data[s][0]);n=new Date(n).getTime(),this.twoDSeriesX.push(n)}else this.twoDSeriesX.push(e[t].data[s][0]);for(var o=0;o-1&&(s=this.activeSeriesIndex);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.ctx),o=r.labels.length>0?r.labels.slice():r.xaxis.categories.slice();if(s.isRangeBar="rangeBar"===r.chart.type&&s.isBarHorizontal,s.hasXaxisGroups="category"===r.xaxis.type&&r.xaxis.group.groups.length>0,s.hasXaxisGroups&&(s.groups=r.xaxis.group.groups),e.forEach(function(f,b){s.seriesNames.push(void 0!==f.name?f.name:"series-"+parseInt(b+1,10))}),s.hasSeriesGroups=null===(t=e[0])||void 0===t?void 0:t.group,s.hasSeriesGroups){var l=[],c=ne(new Set(e.map(function(f){return f.group})));e.forEach(function(f,b){var m=c.indexOf(f.group);l[m]||(l[m]=[]),l[m].push(s.seriesNames[b])}),s.seriesGroups=l}for(var d=function(){for(var f=0;f0&&(this.twoDSeriesX=o,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var p=e[g].data.map(function(f){return M.parseNumber(f)});s.series.push(p)}s.seriesZ.push(this.threeDSeries),s.seriesColors.push(void 0!==e[g].color?e[g].color:void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(e){var t=this.w.globals,i=this.w.config;t.series=e.slice(),t.seriesNames=i.labels.slice();for(var a=0;a0?i.labels=t.xaxis.categories:t.labels.length>0?i.labels=t.labels.slice():this.fallbackToCategory?(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map(function(a){a.forEach(function(r){i.labels.indexOf(r.x)<0&&r.x&&i.labels.push(r.x)})}),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),t.xaxis.convertedCatToNumeric&&(new Le(t).convertCatToNumericXaxis(t,this.ctx,i.seriesX[0]),this._generateExternalLabels(e))):this._generateExternalLabels(e)}},{key:"_generateExternalLabels",value:function(e){var t=this.w.globals,i=this.w.config,a=[];if(t.axisCharts){if(t.series.length>0)if(this.isFormatXY())for(var r=i.series.map(function(d,g){return d.data.filter(function(p,f,b){return b.findIndex(function(m){return m.x===p.x})===f})}),s=r.reduce(function(d,g,p,f){return f[d].length>g.length?d:p},0),n=0;n0&&r==i.length&&t.push(a)}),e.globals.ignoreYAxisIndexes=t.map(function(i){return i})}}]),y}(),Ee=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"scaleSvgNode",value:function(e,t){var i=parseFloat(e.getAttributeNS(null,"width")),a=parseFloat(e.getAttributeNS(null,"height"));e.setAttributeNS(null,"width",i*t),e.setAttributeNS(null,"height",a*t),e.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"fixSvgStringForIe11",value:function(e){if(!M.isIE11())return e.replace(/ /g," ");var t=0,i=e.replace(/xmlns="http:\/\/www.w3.org\/2000\/svg"/g,function(a){return 2==++t?'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev"':a});return(i=i.replace(/xmlns:NS\d+=""/g,"")).replace(/NS\d+:(\w+:\w+=")/g,"$1")}},{key:"getSvgString",value:function(e){null==e&&(e=1);var t=this.w.globals.dom.Paper.svg();if(1!==e){var i=this.w.globals.dom.Paper.node.cloneNode(!0);this.scaleSvgNode(i,e),t=(new XMLSerializer).serializeToString(i)}return this.fixSvgStringForIe11(t)}},{key:"cleanup",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=e.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,function(r){r.setAttribute("width",0)}),t&&t[0]&&(t[0].setAttribute("x",-500),t[0].setAttribute("x1",-500),t[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){this.cleanup();var e=this.getSvgString(),t=new Blob([e],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(t)}},{key:"dataURI",value:function(e){var t=this;return new Promise(function(i){var a=t.w,r=e?e.scale||e.width/a.globals.svgWidth:1;t.cleanup();var s=document.createElement("canvas");s.width=a.globals.svgWidth*r,s.height=parseInt(a.globals.dom.elWrap.style.height,10)*r;var n="transparent"===a.config.chart.background?"#fff":a.config.chart.background,o=s.getContext("2d");o.fillStyle=n,o.fillRect(0,0,s.width*r,s.height*r);var l=t.getSvgString(r);if(window.canvg&&M.isIE11()){var c=window.canvg.Canvg.fromString(o,l,{ignoreClear:!0,ignoreDimensions:!0});c.start();var d=s.msToBlob();c.stop(),i({blob:d})}else{var g="data:image/svg+xml,"+encodeURIComponent(l),p=new Image;p.crossOrigin="anonymous",p.onload=function(){if(o.drawImage(p,0,0),s.msToBlob){var f=s.msToBlob();i({blob:f})}else{var b=s.toDataURL("image/png");i({imgURI:b})}},p.src=g}})}},{key:"exportToSVG",value:function(){this.triggerDownload(this.svgUrl(),this.w.config.chart.toolbar.export.svg.filename,".svg")}},{key:"exportToPng",value:function(){var e=this;this.dataURI().then(function(t){var i=t.imgURI,a=t.blob;a?navigator.msSaveOrOpenBlob(a,e.w.globals.chartID+".png"):e.triggerDownload(i,e.w.config.chart.toolbar.export.png.filename,".png")})}},{key:"exportToCSV",value:function(e){var t=this,i=e.series,a=e.fileName,r=e.columnDelimiter,s=void 0===r?",":r,n=e.lineDelimiter,o=void 0===n?"\n":n,l=this.w;i||(i=l.config.series);var c,d,g=[],p=[],f="",b=l.globals.series.map(function(k,w){return-1===l.globals.collapsedSeriesIndices.indexOf(w)?k:[]}),m=function(k){return"datetime"===l.config.xaxis.type&&String(k).length>=10},v=Math.max.apply(Math,ne(i.map(function(k){return k.data?k.data.length:0}))),A=new et(this.ctx),h=new ee(this.ctx),u=function(k){var w="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var S=l.globals.yLabelFormatters[0],L=new ge(t.ctx).getActiveConfigSeriesIndex();w=S(l.globals.labels[k],{seriesIndex:L,dataPointIndex:k,w:l})}else w=h.getLabel(l.globals.labels,l.globals.timescaleLabels,0,k).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?w=l.config.xaxis.categories[k]:l.config.labels.length&&(w=l.config.labels[k]))}else w=l.config.labels[k];return Array.isArray(w)&&(w=w.join(" ")),M.isNumber(w)?w:w.split(s).join("")};g.push(l.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===l.config.chart.type?(g.push("minimum"),g.push("q1"),g.push("median"),g.push("q3"),g.push("maximum")):"candlestick"===l.config.chart.type?(g.push("open"),g.push("high"),g.push("low"),g.push("close")):"rangeBar"===l.config.chart.type?(g.push("minimum"),g.push("maximum")):i.map(function(k,w){var S=(k.name?k.name:"series-".concat(w))+"";l.globals.axisCharts&&g.push(S.split(s).join("")?S.split(s).join(""):"series-".concat(w))}),l.globals.axisCharts||(g.push(l.config.chart.toolbar.export.csv.headerValue),p.push(g.join(s))),l.globals.allSeriesHasEqualX||!l.globals.axisCharts||l.config.xaxis.categories.length||l.config.labels.length?i.map(function(k,w){l.globals.axisCharts?function(k,w){if(g.length&&0===w&&p.push(g.join(s)),k.data){k.data=k.data.length&&k.data||ne(Array(v)).map(function(){return""});for(var S=0;S0&&!i.globals.isBarHorizontal&&(this.xaxisLabels=i.globals.timescaleLabels.slice()),i.config.xaxis.overwriteCategories&&(this.xaxisLabels=i.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],this.offY="top"===i.config.xaxis.position?0:i.globals.gridHeight+1,this.offY=this.offY+i.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===i.config.chart.type&&i.config.plotOptions.bar.horizontal,this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.xaxisBorderWidth=i.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=i.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth=this.xaxisBorderWidth.indexOf("%")>-1?i.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=i.config.xaxis.axisBorder.height,this.yaxis=i.config.yaxis[0]}return D(y,[{key:"drawXaxis",value:function(){var e=this.w,t=new E(this.ctx),i=t.group({class:"apexcharts-xaxis",transform:"translate(".concat(e.config.xaxis.offsetX,", ").concat(e.config.xaxis.offsetY,")")}),a=t.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});i.add(a);for(var r=[],s=0;s6&&void 0!==arguments[6]?arguments[6]:{},c=[],d=[],g=this.w,p=l.xaxisFontSize||this.xaxisFontSize,f=l.xaxisFontFamily||this.xaxisFontFamily,b=l.xaxisForeColors||this.xaxisForeColors,m=l.fontWeight||g.config.xaxis.labels.style.fontWeight,v=l.cssClass||g.config.xaxis.labels.style.cssClass,A=g.globals.padHorizontal,h=a.length,u="category"===g.config.xaxis.type?g.globals.dataPoints:h;0===u&&h>u&&(u=h),r?(n=g.globals.gridWidth/Math.min(u>1?u-1:u,h-1),A=A+s(0,n)/2+g.config.xaxis.labels.offsetX):A=A+s(0,n=g.globals.gridWidth/u)+g.config.xaxis.labels.offsetX;for(var k=function(S){var L=A-s(S,n)/2+g.config.xaxis.labels.offsetX;0===S&&1===h&&n/2===A&&1===u&&(L=g.globals.gridWidth/2);var C=o.axesUtils.getLabel(a,g.globals.timescaleLabels,L,S,c,p,e),z=28;if(g.globals.rotateXLabels&&e&&(z=22),g.config.xaxis.title.text&&"top"===g.config.xaxis.position&&(z+=parseFloat(g.config.xaxis.title.style.fontSize)+2),e||(z=z+parseFloat(p)+(g.globals.xAxisLabelsHeight-g.globals.xAxisGroupLabelsHeight)+(g.globals.rotateXLabels?10:0)),C=void 0!==g.config.xaxis.tickAmount&&"dataPoints"!==g.config.xaxis.tickAmount&&"datetime"!==g.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(S,C,h):o.axesUtils.checkForOverflowingLabels(S,C,h,c,d),g.config.xaxis.labels.show){var T=t.drawText({x:C.x,y:o.offY+g.config.xaxis.labels.offsetY+z-("top"===g.config.xaxis.position?g.globals.xAxisHeight+g.config.xaxis.axisTicks.height-2:0),text:C.text,textAnchor:"middle",fontWeight:C.isBold?600:m,fontSize:p,fontFamily:f,foreColor:Array.isArray(b)?e&&g.config.xaxis.convertedCatToNumeric?b[g.globals.minX+S-1]:b[S]:b,isPlainText:!1,cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+v});if(i.add(T),T.on("click",function(Y){if("function"==typeof g.config.chart.events.xAxisLabelClick){var H=Object.assign({},g,{labelIndex:S});g.config.chart.events.xAxisLabelClick(Y,o.ctx,H)}}),e){var I=document.createElementNS(g.globals.SVGNS,"title");I.textContent=Array.isArray(C.text)?C.text.join(" "):C.text,T.node.appendChild(I),""!==C.text&&(c.push(C.text),d.push(C))}}Sa.globals.gridWidth)){var s=this.offY+a.config.xaxis.axisTicks.offsetY;if(t=t+s+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(t=s-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var n=new E(this.ctx).drawLine(e+a.config.xaxis.axisTicks.offsetX,s+a.config.xaxis.offsetY,r+a.config.xaxis.axisTicks.offsetX,t+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var e=this.w,t=[],i=this.xaxisLabels.length,a=e.globals.padHorizontal;if(e.globals.timescaleLabels.length>0)for(var r=0;r0){var c=r[r.length-1].getBBox(),d=r[0].getBBox();c.x<-20&&r[r.length-1].parentNode.removeChild(r[r.length-1]),d.x+d.width>e.globals.gridWidth&&!e.globals.isBarHorizontal&&r[0].parentNode.removeChild(r[0]);for(var g=0;g0&&(this.xaxisLabels=t.globals.timescaleLabels.slice())}return D(y,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.w,i=new E(this.ctx);null===e&&(e=i.group({class:"apexcharts-grid"}));var a=i.drawLine(t.globals.padHorizontal,1,t.globals.padHorizontal,t.globals.gridHeight,"transparent"),r=i.drawLine(t.globals.padHorizontal,t.globals.gridHeight,t.globals.gridWidth,t.globals.gridHeight,"transparent");return e.add(r),e.add(a),e}},{key:"drawGrid",value:function(){var e=null;return this.w.globals.axisCharts&&(e=this.renderGrid(),this.drawGridArea(e.el)),e}},{key:"createGridMask",value:function(){var e=this.w,t=e.globals,i=new E(this.ctx),a=Array.isArray(e.config.stroke.width)?0:e.config.stroke.width;if(Array.isArray(e.config.stroke.width)){var r=0;e.config.stroke.width.forEach(function(d){r=Math.max(r,d)}),a=r}t.dom.elGridRectMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(t.cuid)),t.dom.elGridRectMarkerMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(t.cuid)),t.dom.elForecastMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elForecastMask.setAttribute("id","forecastMask".concat(t.cuid)),t.dom.elNonForecastMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elNonForecastMask.setAttribute("id","nonForecastMask".concat(t.cuid));var s=e.config.chart.type,n=0,o=0;("bar"===s||"rangeBar"===s||"candlestick"===s||"boxPlot"===s||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&(o=e.config.grid.padding.right,t.barPadForNumericAxis>(n=e.config.grid.padding.left)&&(n=t.barPadForNumericAxis,o=t.barPadForNumericAxis)),t.dom.elGridRect=i.drawRect(-a/2-n-2,-a/2-2,t.gridWidth+a+o+n+4,t.gridHeight+a+4,0,"#fff");var l=e.globals.markers.largestSize+1;t.dom.elGridRectMarker=i.drawRect(2*-l,2*-l,t.gridWidth+4*l,t.gridHeight+4*l,0,"#fff"),t.dom.elGridRectMask.appendChild(t.dom.elGridRect.node),t.dom.elGridRectMarkerMask.appendChild(t.dom.elGridRectMarker.node);var c=t.dom.baseEl.querySelector("defs");c.appendChild(t.dom.elGridRectMask),c.appendChild(t.dom.elForecastMask),c.appendChild(t.dom.elNonForecastMask),c.appendChild(t.dom.elGridRectMarkerMask)}},{key:"_drawGridLines",value:function(e){var t=e.i,i=e.x1,n=e.xCount,l=this.w;if(!(0===t&&l.globals.skipFirstTimelinelabel||t===n-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:t,x1:i,y1:e.y1,x2:e.x2,y2:e.y2,xCount:n,parent:e.parent});var c=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var d=l.globals.groups;if(d){for(var g=0,p=0;g0&&"datetime"!==e.config.xaxis.type&&(r=t.yAxisScale[a].result.length-1)),this._drawXYLines({xCount:r,tickAmount:s})):this._drawInvertedXYLines({xCount:r=s,tickAmount:s=t.xTickAmount}),this.drawGridBands(r,s),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:t.gridWidth/r}}},{key:"drawGridBands",value:function(e,t){var i=this.w;if(void 0!==i.config.grid.row.colors&&i.config.grid.row.colors.length>0)for(var a=0,r=i.globals.gridHeight/t,s=i.globals.gridWidth,n=0,o=0;n=i.config.grid.row.colors.length&&(o=0),this._drawGridBandRect({c:o,x1:0,y1:a,x2:s,y2:r,type:"row"}),a+=i.globals.gridHeight/t;if(void 0!==i.config.grid.column.colors&&i.config.grid.column.colors.length>0)for(var l=i.globals.isBarHorizontal||"on"!==i.config.xaxis.tickPlacement||"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric?e:e-1,c=i.globals.padHorizontal,d=i.globals.padHorizontal+i.globals.gridWidth/l,g=i.globals.gridHeight,p=0,f=0;p=i.config.grid.column.colors.length&&(f=0),this._drawGridBandRect({c:f,x1:c,y1:0,x2:d,y2:g,type:"column"}),c+=i.globals.gridWidth/l}}]),y}(),it=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"niceScale",value:function(e,t){var i,a,r,s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=1e-11,l=this.w,c=l.globals;c.isBarHorizontal?(i=l.config.xaxis,a=Math.max((c.svgWidth-100)/25,2)):(i=l.config.yaxis[n],a=Math.max((c.svgHeight-100)/15,2)),r=null!=i.min,s=void 0!==i.max&&null!==i.min;var d=null!=i.stepSize,g=null!=i.tickAmount,p=g?i.tickAmount:i.forceNiceScale?c.niceScaleDefaultTicks[Math.min(Math.round(a/2),c.niceScaleDefaultTicks.length-1)]:10;if(c.isMultipleYAxis&&!g&&c.multiAxisTickAmount>0&&(p=c.multiAxisTickAmount,g=!0),p="dataPoints"===p?c.dataPoints-1:Math.abs(Math.round(p)),(e===Number.MIN_VALUE&&0===t||!M.isNumber(e)&&!M.isNumber(t)||e===Number.MIN_VALUE&&t===-Number.MAX_VALUE)&&(e=M.isNumber(i.min)?i.min:0,t=M.isNumber(i.max)?i.max:e+p,c.allSeriesCollapsed=!1),e>t){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var f=t;t=e,e=f}else e===t&&(e=0===e?0:e-1,t=0===t?2:t+1);var b=[];p<1&&(p=1);var m=p,v=Math.abs(t-e);i.forceNiceScale&&(!r&&e>0&&e/v<.15&&(e=0,r=!0),!s&&t<0&&-t/v<.15&&(t=0,s=!0),v=Math.abs(t-e));var A=v/m,h=A,u=Math.floor(Math.log10(h)),x=Math.pow(10,u),k=Math.ceil(h/x);if(A=h=(k=c.niceScaleAllowedMagMsd[0===c.yValueDecimal?0:1][k])*x,c.isBarHorizontal&&i.stepSize&&"datetime"!==i.type?(A=i.stepSize,d=!0):d&&(A=i.stepSize),d&&i.forceNiceScale){var w=Math.floor(Math.log10(A));A*=Math.pow(10,u-w)}if(r&&s){var S=v/m;if(g)if(d)if(0!=M.mod(v,A)){var L=M.getGCD(A,S);A=S/L<10?L:S}else 0==M.mod(A,S)?A=S:(S=A,g=!1);else A=S;else if(d)0==M.mod(v,A)?S=A:A=S;else if(0==M.mod(v,A))S=A;else{S=v/(m=Math.ceil(v/A));var C=M.getGCD(v,A);v/Ca&&(e=t-A*p,e+=A*Math.floor((z-e)/A))}else if(r)if(g)t=e+A*m;else{var T=t;t=A*Math.ceil(t/A),Math.abs(t-e)/M.getGCD(v,A)>a&&(t=e+A*p,t+=A*Math.ceil((T-t)/A))}}else if(g){var I=A/(t-e>t?1:2),Y=I*Math.floor(e/I);Math.abs(Y-e)<=I/2?t=(e=Y)+A*m:e=(t=I*Math.ceil(t/I))-A*m}else e=A*Math.floor(e/A),t=A*Math.ceil(t/A);v=Math.abs(t-e),A=M.getGCD(v,A),m=Math.round(v/A)}if(g||r||s||(m=Math.ceil((v-o)/(A+o)))>16&&M.getPrimeFactors(m).length<2&&m++,!g&&i.forceNiceScale&&0===c.yValueDecimal&&m>v&&(m=v,A=Math.round(v/m)),m>a&&(!g&&!d||i.forceNiceScale)){var H=M.getPrimeFactors(m),B=H.length-1,G=m;e:for(var W=0;Wbe);return{result:b,niceMin:b[0],niceMax:b[b.length-1]}}},{key:"linearScale",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,s=Math.abs(t-e);"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,s))&&(i=this.w.globals.dataPoints-1),r||(r=s/i),i===Number.MAX_VALUE&&(i=5,r=1);for(var n=[],o=e;i>=0;)n.push(o),o+=r,i-=1;return{result:n,niceMin:n[0],niceMax:n[n.length-1]}}},{key:"logarithmicScaleNice",value:function(e,t,i){t<=0&&(t=Math.max(e,i)),e<=0&&(e=Math.min(t,i));for(var a=[],r=Math.ceil(Math.log(t)/Math.log(i)+1),s=Math.floor(Math.log(e)/Math.log(i));s5?(a.allSeriesCollapsed=!1,a.yAxisScale[e]=s.forceNiceScale?this.logarithmicScaleNice(t,i,s.logBase):this.logarithmicScale(t,i,s.logBase)):i!==-Number.MAX_VALUE&&M.isNumber(i)&&t!==Number.MAX_VALUE&&M.isNumber(t)?(a.allSeriesCollapsed=!1,a.yAxisScale[e]=this.niceScale(t,i,e)):a.yAxisScale[e]=this.niceScale(Number.MIN_VALUE,0,e)}},{key:"setXScale",value:function(e,t){var i=this.w,a=i.globals,r=Math.abs(t-e);return a.xAxisScale=t!==-Number.MAX_VALUE&&M.isNumber(t)?this.linearScale(e,t,i.config.xaxis.tickAmount?i.config.xaxis.tickAmount:r<10&&r>1?r+1:10,0,i.config.xaxis.stepSize):this.linearScale(0,10,10),a.xAxisScale}},{key:"setSeriesYAxisMappings",value:function(){var e=this.w.globals,t=this.w.config,i=[],a=[],r=[],s=e.series.length>t.yaxis.length||t.yaxis.some(function(d){return Array.isArray(d.seriesName)});t.series.forEach(function(d,g){r.push(g),a.push(null)}),t.yaxis.forEach(function(d,g){i[g]=[]});var n=[];t.yaxis.forEach(function(d,g){var p=!1;if(d.seriesName){var f=[];Array.isArray(d.seriesName)?f=d.seriesName:f.push(d.seriesName),f.forEach(function(b){t.series.forEach(function(m,v){if(m.name===b){var A=v;g===v||s?!s||r.indexOf(v)>-1?i[g].push([g,v]):console.warn("Series '"+m.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[v].push([v,g]),A=g),p=!0,-1!==(A=r.indexOf(A))&&r.splice(A,1)}})})}p||n.push(g)}),i=i.map(function(d,g){var p=[];return d.forEach(function(f){a[f[1]]=f[0],p.push(f[1])}),p});for(var o=t.yaxis.length-1,l=0;l0?function(){var c,d,g=Number.MAX_VALUE,p=-Number.MAX_VALUE,f=g,b=p;if(t.chart.stacked)!function(){var A=i.seriesX[n[0]],h=[],u=[],x=[];l.forEach(function(){h.push(A.map(function(){return Number.MIN_VALUE})),u.push(A.map(function(){return Number.MIN_VALUE})),x.push(A.map(function(){return Number.MIN_VALUE}))});for(var k=function(S){!c&&t.series[n[S]].type&&(c=t.series[n[S]].type);var L=n[S];d=t.series[L].group?t.series[L].group:"axis-".concat(o),!(i.collapsedSeriesIndices.indexOf(L)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(L)<0)||(i.allSeriesCollapsed=!1,l.forEach(function(C,z){if(t.series[L].group===C)for(var T=0;T=0?u[z][T]+=I:x[z][T]+=I,h[z][T]+=I,f=Math.min(f,I),b=Math.max(b,I)}})),"bar"!==c&&"column"!==c||i.barGroups.push(d)},w=0;w1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=this.w.config,s=this.w.globals,n=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=e+1);var l=0,c=0,d=void 0;if(s.seriesX.length>=a){var g,p;l=0,c=(d=ne(new Set((g=[]).concat.apply(g,ne(s.seriesX.slice(e,a)))))).length-1;var f=null===(p=s.brushSource)||void 0===p?void 0:p.w.config.chart.brush;if(r.chart.zoom.enabled&&r.chart.zoom.autoScaleYaxis||null!=f&&f.enabled&&null!=f&&f.autoScaleYaxis){if(r.xaxis.min)for(l=0;ll&&d[c]>r.xaxis.max;c--);}}var b=s.series,m=b,v=b;"candlestick"===r.chart.type?(m=s.seriesCandleL,v=s.seriesCandleH):"boxPlot"===r.chart.type?(m=s.seriesCandleO,v=s.seriesCandleC):s.isRangeData&&(m=s.seriesRangeStart,v=s.seriesRangeEnd);for(var A=e;Am[A][u]&&m[A][u]<0&&(o=m[A][u])}else s.hasNullValues=!0}"bar"!==h&&"column"!==h||(o<0&&n<0&&(n=0,i=Math.max(i,0)),o===Number.MIN_VALUE&&(o=0,t=Math.min(t,0)))}return"rangeBar"===r.chart.type&&s.seriesRangeStart.length&&s.isBarHorizontal&&(o=t),"bar"===r.chart.type&&(o<0&&n<0&&(n=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:n,lowestY:t,highestY:i}}},{key:"setYRange",value:function(){var e=this.w.globals,t=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;var i,a=Number.MAX_VALUE;if(e.isMultipleYAxis){a=Number.MAX_VALUE;for(var r=0;re.dataPoints&&0!==e.dataPoints&&(a=e.dataPoints-1)):"dataPoints"===t.xaxis.tickAmount?(e.series.length>1&&(a=e.series[e.maxValsInArrayIndex].length-1),e.isXNumeric&&(a=e.maxX-e.minX-1)):a=t.xaxis.tickAmount,e.xTickAmount=a,void 0!==t.xaxis.max&&"number"==typeof t.xaxis.max&&(e.maxX=t.xaxis.max),void 0!==t.xaxis.min&&"number"==typeof t.xaxis.min&&(e.minX=t.xaxis.min),void 0!==t.xaxis.range&&(e.minX=e.maxX-t.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(t.xaxis.convertedCatToNumeric&&!e.dataFormatXNumeric){for(var r=[],s=e.minX-1;s0&&(e.xAxisScale=this.scales.linearScale(1,e.labels.length,a-1,0,t.xaxis.stepSize),e.seriesX=e.labels.slice());i&&(e.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&e.labels.length&&(e.xTickAmount=e.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}},{key:"setZRange",value:function(){var e=this.w.globals;if(e.isDataXYZ)for(var t=0;t0){var n=r-a[s-1];n>0&&(e.minXDiff=Math.min(n,e.minXDiff))}}),1!==e.dataPoints&&e.minXDiff!==Number.MAX_VALUE||(e.minXDiff=.5)})}},{key:"_setStackedMinMax",value:function(){var e=this,t=this.w.globals;if(t.series.length){var i=t.seriesGroups;i.length||(i=[this.w.globals.seriesNames.map(function(s){return s})]);var a={},r={};i.forEach(function(s){a[s]=[],r[s]=[],e.w.config.series.map(function(n,o){return s.indexOf(t.seriesNames[o])>-1?o:null}).filter(function(n){return null!==n}).forEach(function(n){for(var o=0;o0?a[s][o]+=parseFloat(t.series[n][o])+1e-4:r[s][o]+=parseFloat(t.series[n][o]))}})}),Object.entries(a).forEach(function(s){var n=Se(s,1)[0];a[n].forEach(function(o,l){t.maxY=Math.max(t.maxY,a[n][l]),t.minY=Math.min(t.minY,r[n][l])})})}}}]),y}(),Ge=function(){function y(e,t){F(this,y),this.ctx=e,this.elgrid=t,this.w=e.w;var i=this.w;this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.axisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===i.config.chart.type&&i.config.plotOptions.bar.horizontal,this.xAxisoffX=0,"bottom"===i.config.xaxis.position&&(this.xAxisoffX=i.globals.gridHeight),this.drawnLabels=[],this.axesUtils=new ee(e)}return D(y,[{key:"drawYaxis",value:function(e){var t=this,i=this.w,a=new E(this.ctx),r=i.config.yaxis[e].labels.style,s=r.fontSize,n=r.fontFamily,o=r.fontWeight,l=a.group({class:"apexcharts-yaxis",rel:e,transform:"translate("+i.globals.translateYAxisX[e]+", 0)"});if(this.axesUtils.isYAxisHidden(e))return l;var c=a.group({class:"apexcharts-yaxis-texts-g"});l.add(c);var d=i.globals.yAxisScale[e].result.length-1,g=i.globals.gridHeight/d,p=i.globals.translateY,f=i.globals.yLabelFormatters[e],b=i.globals.yAxisScale[e].result.slice();b=this.axesUtils.checkForReversedLabels(e,b);var m="";if(i.config.yaxis[e].labels.show)for(var v=function(L){var C=b[L];C=f(C,L,i);var z=i.config.yaxis[e].labels.padding;i.config.yaxis[e].opposite&&0!==i.config.yaxis.length&&(z*=-1);var T="end";i.config.yaxis[e].opposite&&(T="start"),"left"===i.config.yaxis[e].labels.align?T="start":"center"===i.config.yaxis[e].labels.align?T="middle":"right"===i.config.yaxis[e].labels.align&&(T="end");var I=t.axesUtils.getYAxisForeColor(r.colors,e),Y=i.config.yaxis[e].labels.offsetY;"heatmap"===i.config.chart.type&&(Y-=(i.globals.gridHeight/i.globals.series.length-1)/2);var H=a.drawText({x:z,y:p+d/10+Y+1,text:C,textAnchor:T,fontSize:s,fontFamily:n,fontWeight:o,maxWidth:i.config.yaxis[e].labels.maxWidth,foreColor:Array.isArray(I)?I[L]:I,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+r.cssClass});L===d&&(m=H),c.add(H);var B=document.createElementNS(i.globals.SVGNS,"title");if(B.textContent=Array.isArray(C)?C.join(" "):C,H.node.appendChild(B),0!==i.config.yaxis[e].labels.rotate){var G=a.rotateAroundCenter(m.node),W=a.rotateAroundCenter(H.node);H.node.setAttribute("transform","rotate(".concat(i.config.yaxis[e].labels.rotate," ").concat(G.x," ").concat(W.y,")"))}p+=g},A=d;A>=0;A--)v(A);if(void 0!==i.config.yaxis[e].title.text){var h=a.group({class:"apexcharts-yaxis-title"}),u=0;i.config.yaxis[e].opposite&&(u=i.globals.translateYAxisX[e]);var x=a.drawText({x:u,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[e].title.offsetY,text:i.config.yaxis[e].title.text,textAnchor:"end",foreColor:i.config.yaxis[e].title.style.color,fontSize:i.config.yaxis[e].title.style.fontSize,fontWeight:i.config.yaxis[e].title.style.fontWeight,fontFamily:i.config.yaxis[e].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+i.config.yaxis[e].title.style.cssClass});h.add(x),l.add(h)}var k=i.config.yaxis[e].axisBorder,w=31+k.offsetX;if(i.config.yaxis[e].opposite&&(w=-31-k.offsetX),k.show){var S=a.drawLine(w,i.globals.translateY+k.offsetY-2,w,i.globals.gridHeight+i.globals.translateY+k.offsetY+2,k.color,0,k.width);l.add(S)}return i.config.yaxis[e].axisTicks.show&&this.axesUtils.drawYAxisTicks(w,d,k,i.config.yaxis[e].axisTicks,e,g,l),l}},{key:"drawYaxisInversed",value:function(e){var t=this.w,i=new E(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),r=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});a.add(r);var s=t.globals.yAxisScale[e].result.length-1,n=t.globals.gridWidth/s+.1,o=n+t.config.xaxis.labels.offsetX,l=t.globals.xLabelFormatter,c=t.globals.yAxisScale[e].result.slice(),d=t.globals.timescaleLabels;d.length>0&&(this.xaxisLabels=d.slice(),s=(c=d.slice()).length),c=this.axesUtils.checkForReversedLabels(e,c);var g=d.length;if(t.config.xaxis.labels.show)for(var p=g?0:s;g?p=0;g?p++:p--){var f=c[p];f=l(f,p,t);var b=t.globals.gridWidth+t.globals.padHorizontal-(o-n+t.config.xaxis.labels.offsetX);if(d.length){var m=this.axesUtils.getLabel(c,d,b,p,this.drawnLabels,this.xaxisFontSize);b=m.x,f=m.text,this.drawnLabels.push(m.text),0===p&&t.globals.skipFirstTimelinelabel&&(f=""),p===c.length-1&&t.globals.skipLastTimelinelabel&&(f="")}var v=i.drawText({x:b,y:this.xAxisoffX+t.config.xaxis.labels.offsetY+30-("top"===t.config.xaxis.position?t.globals.xAxisHeight+t.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:t.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+t.config.xaxis.labels.style.cssClass});r.add(v),v.tspan(f);var A=document.createElementNS(t.globals.SVGNS,"title");A.textContent=f,v.node.appendChild(A),o+=n}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(e){var t=this.w,i=new E(this.ctx),a=t.config.xaxis.axisBorder;if(a.show){var r=0;"bar"===t.config.chart.type&&t.globals.isXNumeric&&(r-=15);var s=i.drawLine(t.globals.padHorizontal+r+a.offsetX,this.xAxisoffX,t.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(s):e.add(s)}}},{key:"inversedYAxisTitleText",value:function(e){var t=this.w,i=new E(this.ctx);if(void 0!==t.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),r=i.drawText({x:t.globals.gridWidth/2+t.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(t.config.xaxis.title.style.fontSize)+t.config.xaxis.title.offsetY+20,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});a.add(r),e.add(a)}}},{key:"yAxisTitleRotate",value:function(e,t){var i=this.w,a=new E(this.ctx),r={width:0,height:0},s={width:0,height:0},n=i.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-texts-g"));null!==n&&(r=n.getBoundingClientRect());var o=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-title text"));if(null!==o&&(s=o.getBoundingClientRect()),null!==o){var l=this.xPaddingForYAxisTitle(e,r,s,t);o.setAttribute("x",l.xPos-(t?10:0))}if(null!==o){var c=a.rotateAroundCenter(o);o.setAttribute("transform","rotate(".concat(t?-1*i.config.yaxis[e].title.rotate:i.config.yaxis[e].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(e,t,i,a){var r=this.w,s=0,n=0,o=10;return void 0===r.config.yaxis[e].title.text||e<0?{xPos:n,padd:0}:(a?(n=t.width+r.config.yaxis[e].title.offsetX+i.width/2+o/2,0===(s+=1)&&(n-=o/2)):(n=-1*t.width+r.config.yaxis[e].title.offsetX+o/2+i.width/2,r.globals.isBarHorizontal&&(n=-1*t.width-r.config.yaxis[e].title.offsetX-(o=25))),{xPos:n,padd:o})}},{key:"setYAxisXPosition",value:function(e,t){var i=this.w,a=0,r=0,s=18,n=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.map(function(o,l){var c=i.globals.ignoreYAxisIndexes.indexOf(l)>-1||!o.show||o.floating||0===e[l].width,d=e[l].width+t[l].width;o.opposite?i.globals.isBarHorizontal?i.globals.translateYAxisX[l]=(r=i.globals.gridWidth+i.globals.translateX-1)-o.labels.offsetX:(r=i.globals.gridWidth+i.globals.translateX+n,c||(n=n+d+20),i.globals.translateYAxisX[l]=r-o.labels.offsetX+20):(a=i.globals.translateX-s,c||(s=s+d+20),i.globals.translateYAxisX[l]=a+o.labels.offsetX)})}},{key:"setYAxisTextAlignments",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis");(t=M.listToArray(t)).forEach(function(i,a){var r=e.config.yaxis[a];if(r&&!r.floating&&void 0!==r.labels.align){var s=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(a,"'] .apexcharts-yaxis-texts-g")),n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(a,"'] .apexcharts-yaxis-label"));n=M.listToArray(n);var o=s.getBoundingClientRect();"left"===r.labels.align?(n.forEach(function(l,c){l.setAttribute("text-anchor","start")}),r.opposite||s.setAttribute("transform","translate(-".concat(o.width,", 0)"))):"center"===r.labels.align?(n.forEach(function(l,c){l.setAttribute("text-anchor","middle")}),s.setAttribute("transform","translate(".concat(o.width/2*(r.opposite?1:-1),", 0)"))):"right"===r.labels.align&&(n.forEach(function(l,c){l.setAttribute("text-anchor","end")}),r.opposite&&s.setAttribute("transform","translate(".concat(o.width,", 0)")))}})}}]),y}(),nt=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.documentEvent=M.bind(this.documentEvent,this)}return D(y,[{key:"addEventListener",value:function(e,t){var i=this.w;i.globals.events.hasOwnProperty(e)?i.globals.events[e].push(t):i.globals.events[e]=[t]}},{key:"removeEventListener",value:function(e,t){var i=this.w;if(i.globals.events.hasOwnProperty(e)){var a=i.globals.events[e].indexOf(t);-1!==a&&i.globals.events[e].splice(a,1)}}},{key:"fireEvent",value:function(e,t){var i=this.w;if(i.globals.events.hasOwnProperty(e)){t&&t.length||(t=[]);for(var a=i.globals.events[e],r=a.length,s=0;s0&&(t=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=t.filter(function(r){return r.name===e})[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=M.extend(ze,i);this.w.globals.locale=a.options}}]),y}(),lt=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"drawAxis",value:function(e,t){var i,a,r=this,s=this.w.globals,n=this.w.config,o=new Te(this.ctx,t),l=new Ge(this.ctx,t);s.axisCharts&&"radar"!==e&&(s.isBarHorizontal?(a=l.drawYaxisInversed(0),i=o.drawXaxisInversed(0),s.dom.elGraphical.add(i),s.dom.elGraphical.add(a)):(i=o.drawXaxis(),s.dom.elGraphical.add(i),n.yaxis.map(function(c,d){if(-1===s.ignoreYAxisIndexes.indexOf(d)&&(a=l.drawYaxis(d),s.dom.Paper.add(a),"back"===r.w.config.grid.position)){var g=s.dom.Paper.children()[1];g.remove(),s.dom.Paper.add(g)}})))}}]),y}(),Ve=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"drawXCrosshairs",value:function(){var e=this.w,t=new E(this.ctx),i=new oe(this.ctx),a=e.config.xaxis.crosshairs.fill.gradient,r=e.config.xaxis.crosshairs.dropShadow,g=r.enabled,p=r.left,f=r.top,b=r.blur,m=r.color,v=r.opacity,A=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){"gradient"===e.config.xaxis.crosshairs.fill.type&&(A=t.drawGradient("vertical",a.colorFrom,a.colorTo,a.opacityFrom,a.opacityTo,null,a.stops,null));var h=t.drawRect();1===e.config.xaxis.crosshairs.width&&(h=t.drawLine());var u=e.globals.gridHeight;(!M.isNumber(u)||u<0)&&(u=0);var x=e.config.xaxis.crosshairs.width;(!M.isNumber(x)||x<0)&&(x=0),h.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:u,width:x,height:u,fill:A,filter:"none","fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),g&&(h=i.dropShadow(h,{left:p,top:f,blur:b,color:m,opacity:v})),e.globals.dom.elGraphical.add(h)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,t=new E(this.ctx),i=e.config.yaxis[0].crosshairs,a=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){var r=t.drawLine(-a,0,e.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);r.attr({class:"apexcharts-ycrosshairs"}),e.globals.dom.elGraphical.add(r)}var s=t.drawLine(-a,0,e.globals.gridWidth+a,0,i.stroke.color,0,0);s.attr({class:"apexcharts-ycrosshairs-hidden"}),e.globals.dom.elGraphical.add(s)}}]),y}(),ht=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"checkResponsiveConfig",value:function(e){var t=this,i=this.w,a=i.config;if(0!==a.responsive.length){var r=a.responsive.slice();r.sort(function(l,c){return l.breakpoint>c.breakpoint?1:c.breakpoint>l.breakpoint?-1:0}).reverse();var s=new Pe({}),n=function(){var l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=window.innerWidth>0?window.innerWidth:screen.width;if(d>r[0].breakpoint){var g=te.extendArrayProps(s,i.globals.initialConfig,i);l=M.extend(g,l),l=M.extend(i.config,l),t.overrideResponsiveOptions(l)}else for(var p=0;p0&&"function"==typeof i.config.colors[0]&&(i.globals.colors=i.config.series.map(function(f,b){var m=i.config.colors[b];return m||(m=i.config.colors[0]),"function"==typeof m?(t.isColorFn=!0,m({value:i.globals.axisCharts?i.globals.series[b][0]?i.globals.series[b][0]:0:i.globals.series[b],seriesIndex:b,dataPointIndex:b,w:i})):m}))),i.globals.seriesColors.map(function(f,b){f&&(i.globals.colors[b]=f)}),i.config.theme.monochrome.enabled){var r=[],s=i.globals.series.length;(this.isBarDistributed||this.isHeatmapDistributed)&&(s=i.globals.series[0].length*i.globals.series.length);for(var n=i.config.theme.monochrome.color,o=1/(s/i.config.theme.monochrome.shadeIntensity),l=i.config.theme.monochrome.shadeTo,c=0,d=0;d2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,r=t||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(r=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),e.lengthe.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getLargestStringFromMultiArr",value:function(e,t){var i=e;if(this.w.globals.isMultiLineX){var a=t.map(function(s,n){return Array.isArray(s)?s.length:1}),r=Math.max.apply(Math,ne(a));i=t[a.indexOf(r)]}return i}}]),y}(),ut=function(){function y(e){F(this,y),this.w=e.w,this.dCtx=e}return D(y,[{key:"getxAxisLabelsCoords",value:function(){var e,t=this.w,i=t.globals.labels.slice();if(t.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=t.globals.categoryLabels),t.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();e={width:a.width,height:a.height},t.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==t.config.legend.position&&"right"!==t.config.legend.position||t.config.legend.floating?0:this.dCtx.lgRect.width;var r=t.globals.xLabelFormatter,s=M.getLargestStringFromArr(i),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(s,i);t.globals.isBarHorizontal&&(n=s=t.globals.yAxisScale[0].result.reduce(function(f,b){return f.length>b.length?f:b},0));var o=new Ce(this.dCtx.ctx),l=s;s=o.xLabelFormat(r,s,l,{i:void 0,dateFormatter:new se(this.dCtx.ctx).formatDate,w:t}),n=o.xLabelFormat(r,n,l,{i:void 0,dateFormatter:new se(this.dCtx.ctx).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&void 0===s||""===String(s).trim())&&(n=s="1");var c=new E(this.dCtx.ctx),d=c.getTextRects(s,t.config.xaxis.labels.style.fontSize),g=d;if(s!==n&&(g=c.getTextRects(n,t.config.xaxis.labels.style.fontSize)),(e={width:d.width>=g.width?d.width:g.width,height:d.height>=g.height?d.height:g.height}).width*i.length>t.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==t.config.xaxis.labels.rotate||t.config.xaxis.labels.rotateAlways){if(!t.globals.isBarHorizontal){t.globals.rotateXLabels=!0;var p=function(f){return c.getTextRects(f,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,"rotate(".concat(t.config.xaxis.labels.rotate," 0 0)"),!1)};d=p(s),s!==n&&(g=p(n)),e.height=(d.height>g.height?d.height:g.height)/1.5,e.width=d.width>g.width?d.width:g.width}}else t.globals.rotateXLabels=!1}return t.config.xaxis.labels.show||(e={width:0,height:0}),{width:e.width,height:e.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var e,t=this.w;if(!t.globals.hasXaxisGroups)return{width:0,height:0};var i,a=(null===(e=t.config.xaxis.group.style)||void 0===e?void 0:e.fontSize)||t.config.xaxis.labels.style.fontSize,r=t.globals.groups.map(function(d){return d.title}),s=M.getLargestStringFromArr(r),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(s,r),o=new E(this.dCtx.ctx),l=o.getTextRects(s,a),c=l;return s!==n&&(c=o.getTextRects(n,a)),i={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},t.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var e=this.w,t=0,i=0;if(void 0!==e.config.xaxis.title.text){var a=new E(this.dCtx.ctx).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);t=a.width,i=a.height}return{width:t,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var e,t=this.w;this.dCtx.timescaleLabels=t.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map(function(r){return r.value}),a=i.reduce(function(r,s){return void 0===r?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):r.length>s.length?r:s},0);return 1.05*(e=new E(this.dCtx.ctx).getTextRects(a,t.config.xaxis.labels.style.fontSize)).width*i.length>t.globals.gridWidth&&0!==t.config.xaxis.labels.rotate&&(t.globals.overlappingXLabels=!0),e}},{key:"additionalPaddingXLabels",value:function(e){var t=this,i=this.w,a=i.globals,r=i.config,s=r.xaxis.type,n=e.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal;r.yaxis.forEach(function(c,d){o?(t.dCtx.gridPad.left1&&-1!==a.collapsedSeriesIndices.indexOf(d)||function(g){if(t.dCtx.timescaleLabels&&t.dCtx.timescaleLabels.length){var b=t.dCtx.timescaleLabels[0].position-n/1.75+t.dCtx.yAxisWidthLeft;t.dCtx.timescaleLabels[t.dCtx.timescaleLabels.length-1].position+n/1.75-t.dCtx.yAxisWidthRight>a.svgWidth-a.translateX-("right"===i.config.legend.position&&t.dCtx.lgRect.width>0?t.dCtx.lgRect.width:0)&&(a.skipLastTimelinelabel=!0),b<-(g.show&&!g.floating||"bar"!==r.chart.type&&"candlestick"!==r.chart.type&&"rangeBar"!==r.chart.type&&"boxPlot"!==r.chart.type?10:n/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===s?t.dCtx.gridPad.right(null===(w=String(d(x,o)))||void 0===w?void 0:w.length)?u:x},l.niceMin===Number.MIN_VALUE?0:l.niceMin),f=p=d(p,o);if(void 0!==p&&0!==p.length||(p=l.niceMax),t.globals.isBarHorizontal){a=0;var b=t.globals.labels.slice();p=M.getLargestStringFromArr(b),p=d(p,{seriesIndex:n,dataPointIndex:-1,w:t}),f=e.dCtx.dimHelpers.getLargestStringFromMultiArr(p,b)}var m=new E(e.dCtx.ctx),v="rotate(".concat(s.labels.rotate," 0 0)"),A=m.getTextRects(p,s.labels.style.fontSize,s.labels.style.fontFamily,v,!1),h=A;p!==f&&(h=m.getTextRects(f,s.labels.style.fontSize,s.labels.style.fontFamily,v,!1)),i.push({width:(c>h.width||c>A.width?c:h.width>A.width?h.width:A.width)+a,height:h.height>A.height?h.height:A.height})}else i.push({width:0,height:0})}),i}},{key:"getyAxisTitleCoords",value:function(){var e=this,i=[];return this.w.config.yaxis.map(function(a,r){if(a.show&&void 0!==a.title.text){var s=new E(e.dCtx.ctx),n="rotate(".concat(a.title.rotate," 0 0)"),o=s.getTextRects(a.title.text,a.title.style.fontSize,a.title.style.fontFamily,n,!1);i.push({width:o.width,height:o.height})}else i.push({width:0,height:0})}),i}},{key:"getTotalYAxisWidth",value:function(){var e=this.w,t=0,i=0,a=0,r=e.globals.yAxisScale.length>1?10:0,s=new ee(this.dCtx.ctx),n=function(o,l){var c=e.config.yaxis[l].floating,d=0;o.width>0&&!c?(d=o.width+r,e.globals.ignoreYAxisIndexes.indexOf(l)>-1&&(d=d-o.width-r)):d=c||s.isYAxisHidden(l)?0:5,e.config.yaxis[l].opposite?a+=d:i+=d,t+=d};return e.globals.yLabelsCoords.map(function(o,l){n(o,l)}),e.globals.yTitleCoords.map(function(o,l){n(o,l)}),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(t=e.globals.yLabelsCoords[0].width+e.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,t}}]),y}(),pt=function(){function y(e){F(this,y),this.w=e.w,this.dCtx=e}return D(y,[{key:"gridPadForColumnsInNumericAxis",value:function(e){var t=this.w,i=t.config,a=t.globals;if(a.noData||a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.series.length)return 0;var r=function(g){return"bar"===g||"rangeBar"===g||"candlestick"===g||"boxPlot"===g},s=i.chart.type,n=0,o=r(s)?i.series.length:1;if(a.comboBarCount>0&&(o=a.comboBarCount),a.collapsedSeries.forEach(function(g){r(g.type)&&(o-=1)}),i.chart.stacked&&(o=1),(r(s)||a.comboBarCount>0)&&a.isXNumeric&&!a.isBarHorizontal&&o>0){var l,c,d=Math.abs(a.initialMaxX-a.initialMinX);d<=3&&(d=a.dataPoints),l=d/e,a.minXDiff&&a.minXDiff/l>0&&(c=a.minXDiff/l),c>e/2&&(c/=2),(n=c*parseInt(i.plotOptions.bar.columnWidth,10)/100)<1&&(n=1),a.barPadForNumericAxis=n}return n}},{key:"gridPadFortitleSubtitle",value:function(){var e=this,t=this.w,i=t.globals,a=this.dCtx.isSparkline||!t.globals.axisCharts?0:10;["title","subtitle"].forEach(function(n){a+=void 0!==t.config[n].text?t.config[n].margin:e.dCtx.isSparkline||!t.globals.axisCharts?0:5}),!t.config.legend.show||"bottom"!==t.config.legend.position||t.config.legend.floating||t.globals.axisCharts||(a+=10);var r=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),s=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight=i.gridHeight-r.height-s.height-a,i.translateY=i.translateY+r.height+s.height+a}},{key:"setGridXPosForDualYAxis",value:function(e,t){var i=this.w,a=new ee(this.dCtx.ctx);i.config.yaxis.map(function(r,s){-1!==i.globals.ignoreYAxisIndexes.indexOf(s)||r.floating||a.isYAxisHidden(s)||(r.opposite&&(i.globals.translateX=i.globals.translateX-(t[s].width+e[s].width)-parseInt(i.config.yaxis[s].labels.style.fontSize,10)/1.2-12),i.globals.translateX<2&&(i.globals.translateX=2))})}}]),y}(),Ye=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new gt(this),this.dimYAxis=new yt(this),this.dimXAxis=new ut(this),this.dimGrid=new pt(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return D(y,[{key:"plotCoords",value:function(){var e=this,t=this.w,i=t.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.isSparkline&&((t.config.markers.discrete.length>0||t.config.markers.size>0)&&Object.entries(this.gridPad).forEach(function(r){var s=Se(r,2);e.gridPad[s[0]]=Math.max(s[1],e.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(t.config.stroke.width/2,this.gridPad.top),this.gridPad.bottom=Math.max(t.config.stroke.width/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var a=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*a,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(a>0?a+4:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var e=this,t=this.w,i=t.globals,a=this.dimYAxis.getyAxisLabelsCoords(),r=this.dimYAxis.getyAxisTitleCoords();t.globals.yLabelsCoords=[],t.globals.yTitleCoords=[],t.config.yaxis.map(function(p,f){t.globals.yLabelsCoords.push({width:a[f].width,index:f}),t.globals.yTitleCoords.push({width:r[f].width,index:f})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var s=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(s,o,n),i.translateXAxisY=t.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=t.globals.rotateXLabels&&t.globals.isXNumeric&&t.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,t.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(t.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+t.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+t.config.xaxis.labels.offsetX;var l=this.yAxisWidth,c=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-s.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var d=10;("radar"===t.config.chart.type||this.isSparkline)&&(l=0,c=i.goldenPadding),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===t.config.chart.type)&&(l=0,c=0,d=0),this.isSparkline||this.dimXAxis.additionalPaddingXLabels(s);var g=function(){i.translateX=l,i.gridHeight=i.svgHeight-e.lgRect.height-c-(e.isSparkline||"treemap"===t.config.chart.type?0:t.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l};switch("top"===t.config.xaxis.position&&(d=i.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":i.translateY=d,g();break;case"top":i.translateY=this.lgRect.height+d,g();break;case"left":i.translateY=d,i.translateX=this.lgRect.width+l,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-l;break;case"right":i.translateY=d,i.translateX=l,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(r,a),new Ge(this.ctx).setYAxisXPosition(a,r)}},{key:"setDimensionsForNonAxisCharts",value:function(){var e=this.w,t=e.globals,i=e.config,a=0;e.config.legend.show&&!e.config.legend.floating&&(a=20);var r="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",s=i.plotOptions[r].offsetY,n=i.plotOptions[r].offsetX;if(!i.legend.show||i.legend.floating)return t.gridHeight=t.svgHeight-i.grid.padding.left+i.grid.padding.right,t.gridWidth=t.gridHeight,t.translateY=s,void(t.translateX=n+(t.svgWidth-t.gridWidth)/2);switch(i.legend.position){case"bottom":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=s-10,t.translateX=n+(t.svgWidth-t.gridWidth)/2;break;case"top":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=this.lgRect.height+s+10,t.translateX=n+(t.svgWidth-t.gridWidth)/2;break;case"left":t.gridWidth=t.svgWidth-this.lgRect.width-a,t.gridHeight="auto"!==i.chart.height?t.svgHeight:t.gridWidth,t.translateY=s,t.translateX=n+this.lgRect.width+a;break;case"right":t.gridWidth=t.svgWidth-this.lgRect.width-a-5,t.gridHeight="auto"!==i.chart.height?t.svgHeight:t.gridWidth,t.translateY=s,t.translateX=n+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(e,t,i){var a=this.w;this.xAxisHeight=(i.height+e.height+t.height)*(a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO)+(a.globals.hasXaxisGroups?2:1)*(a.globals.rotateXLabels?22:10)+(a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0),this.xAxisWidth=e.width,this.xAxisHeight-t.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeightd&&(this.yAxisWidth=d)}}]),y}(),R=function(){function y(e){F(this,y),this.w=e.w,this.lgCtx=e}return D(y,[{key:"getLegendStyles",value:function(){var e,t,i,a=document.createElement("style");a.setAttribute("type","text/css");var r=(null===(e=this.lgCtx.ctx)||void 0===e||null===(t=e.opts)||void 0===t||null===(i=t.chart)||void 0===i?void 0:i.nonce)||this.w.config.chart.nonce;r&&a.setAttribute("nonce",r);var s=document.createTextNode("\n .apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n }\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n }\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n }\n .apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n }\n .apexcharts-legend.apx-legend-position-bottom .apexcharts-legend-series, .apexcharts-legend.apx-legend-position-top .apexcharts-legend-series{\n display: flex;\n align-items: center;\n }\n .apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n }\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n }\n .apexcharts-legend-marker {\n position: relative;\n display: inline-block;\n cursor: pointer;\n margin-right: 3px;\n border-style: solid;\n }\n\n .apexcharts-legend.apexcharts-align-right .apexcharts-legend-series, .apexcharts-legend.apexcharts-align-left .apexcharts-legend-series{\n display: inline-block;\n }\n .apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n }\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n }\n .apexcharts-inactive-legend {\n opacity: 0.45;\n }");return a.appendChild(s),a}},{key:"getLegendBBox",value:function(){var e=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect();return{clwh:e.height,clww:e.width}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(e,t){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var r=null,s=null;a.globals.risingSeries=[],a.globals.axisCharts?(r=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"']")),s=parseInt(r.getAttribute("data:realIndex"),10)):(r=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e+1,"']")),s=parseInt(r.getAttribute("rel"),10)-1),t?[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach(function(c){i.riseCollapsedSeries(c.cs,c.csi,s)}):this.hideSeries({seriesEl:r,realIndex:s})}else{var n=a.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(e+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var l=a.config.plotOptions.pie.donut.labels;new E(this.lgCtx.ctx).pathMouseDown(n.members[0],null),this.lgCtx.ctx.pie.printDataLabelsInner(n.members[0].node,l)}n.fire("click")}}},{key:"hideSeries",value:function(e){var t=e.seriesEl,i=e.realIndex,a=this.w,r=a.globals,s=M.clone(a.config.series);if(r.axisCharts){var n=a.config.yaxis[r.seriesYAxisReverseMap[i]];if(n&&n.show&&n.showAlways)r.ancillaryCollapsedSeriesIndices.indexOf(i)<0&&(r.ancillaryCollapsedSeries.push({index:i,data:s[i].data.slice(),type:t.parentNode.className.baseVal.split("-")[1]}),r.ancillaryCollapsedSeriesIndices.push(i));else if(r.collapsedSeriesIndices.indexOf(i)<0){r.collapsedSeries.push({index:i,data:s[i].data.slice(),type:t.parentNode.className.baseVal.split("-")[1]}),r.collapsedSeriesIndices.push(i);var o=r.risingSeries.indexOf(i);r.risingSeries.splice(o,1)}}else r.collapsedSeries.push({index:i,data:s[i]}),r.collapsedSeriesIndices.push(i);for(var l=t.childNodes,c=0;c0){for(var s=0;s1||!t.axisCharts)&&i.legend.show){for(;t.dom.elLegendWrap.firstChild;)t.dom.elLegendWrap.removeChild(t.dom.elLegendWrap.firstChild);this.drawLegends(),M.isIE11()?document.getElementsByTagName("head")[0].appendChild(this.legendHelpers.getLegendStyles()):this.legendHelpers.appendToForeignObject(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"drawLegends",value:function(){var e=this,t=this.w,i=t.config.legend.fontFamily,a=t.globals.seriesNames,r=t.globals.colors.slice();if("heatmap"===t.config.chart.type){var s=t.config.plotOptions.heatmap.colorScale.ranges;a=s.map(function(I){return I.name?I.name:I.from+" - "+I.to}),r=s.map(function(I){return I.color})}else this.isBarsDistributed&&(a=t.globals.labels.slice());t.config.legend.customLegendItems.length&&(a=t.config.legend.customLegendItems);for(var n=t.globals.legendFormatter,o=t.config.legend.inverseOrder,l=o?a.length-1:0;o?l>=0:l<=a.length-1;o?l--:l++){var c,d=n(a[l],{seriesIndex:l,w:t}),g=!1,p=!1;if(t.globals.collapsedSeries.length>0)for(var f=0;f0)for(var b=0;b0?l-10:0)+(c>0?c-10:0)}a.style.position="absolute",n=n+t+i.config.legend.offsetY,a.style.left=(s=s+e+i.config.legend.offsetX)+"px",a.style.top=n+"px","bottom"===i.config.legend.position?(a.style.top="auto",a.style.bottom=5-i.config.legend.offsetY+"px"):"right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px"),["width","height"].forEach(function(d){a.style[d]&&(a.style[d]=parseInt(i.config.legend[d],10)+"px")})}},{key:"legendAlignHorizontal",value:function(){var e=this.w;e.globals.dom.elLegendWrap.style.right=0;var t=this.legendHelpers.getLegendBBox(),i=new Ye(this.ctx),a=i.dimHelpers.getTitleSubtitleCoords("title"),r=i.dimHelpers.getTitleSubtitleCoords("subtitle"),s=0;"bottom"===e.config.legend.position?s=-t.clwh/1.8:"top"===e.config.legend.position&&(s=a.height+r.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(20,s)}},{key:"legendAlignVertical",value:function(){var e=this.w,t=this.legendHelpers.getLegendBBox(),i=0;"left"===e.config.legend.position&&(i=20),"right"===e.config.legend.position&&(i=e.globals.svgWidth-t.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(e){var t=this.w,i=e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker");if("heatmap"===t.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(e.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new ge(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&i&&new ge(this.ctx).toggleSeriesOnHover(e,e.target)}},{key:"onLegendClick",value:function(e){var t=this.w;if(!t.config.legend.customLegendItems.length&&(e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(e.target.getAttribute("rel"),10)-1,a="true"===e.target.getAttribute("data:collapsed"),r=this.w.config.chart.events.legendClick;"function"==typeof r&&r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var s=this.w.config.legend.markers.onClick;"function"==typeof s&&e.target.classList.contains("apexcharts-legend-marker")&&(s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==t.config.chart.type&&"heatmap"!==t.config.chart.type&&!this.isBarsDistributed&&t.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),y}(),X=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w;var t=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=t.globals.minX,this.maxX=t.globals.maxX}return D(y,[{key:"createToolbar",value:function(){var e=this,t=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=t.config.chart.toolbar.offsetY+"px",a.style.right=3-t.config.chart.toolbar.offsetX+"px",t.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=t.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var r=0;r\n \n \n\n'),n("zoomOut",this.elZoomOut,'\n \n \n\n');var o=function(d){e.t[d]&&t.config.chart[d].enabled&&s.push({el:"zoom"===d?e.elZoom:e.elSelection,icon:"string"==typeof e.t[d]?e.t[d]:"zoom"===d?'\n \n \n \n':'\n \n \n',title:e.localeValues["zoom"===d?"selectionZoom":"selection"],class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(d,"-icon")})};o("zoom"),o("selection"),this.t.pan&&t.config.chart.zoom.enabled&&s.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'\n \n \n \n \n \n \n \n',title:this.localeValues.pan,class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),n("reset",this.elZoomReset,'\n \n \n'),this.t.download&&s.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;l0&&a.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:i.globals.gridWidth,maxY:i.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var i=this.w,a=this.xyRatios;if(!i.globals.zoomEnabled)if(null!=i.globals.selection)this.drawSelectionRect(i.globals.selection);else if(void 0!==i.config.chart.selection.xaxis.min&&void 0!==i.config.chart.selection.xaxis.max){var r=(i.config.chart.selection.xaxis.min-i.globals.minX)/a.xRatio,s=i.globals.gridWidth-(i.globals.maxX-i.config.chart.selection.xaxis.max)/a.xRatio-r;i.globals.isRangeBar&&(r=(i.config.chart.selection.xaxis.min-i.globals.yAxisScale[0].niceMin)/a.invertedYRatio,s=(i.config.chart.selection.xaxis.max-i.config.chart.selection.xaxis.min)/a.invertedYRatio),this.drawSelectionRect({x:r,y:0,width:s,height:i.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0}),this.makeSelectionRectDraggable(),"function"==typeof i.config.chart.events.selection&&i.config.chart.events.selection(this.ctx,{xaxis:{min:i.config.chart.selection.xaxis.min,max:i.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(i){var a=i.x,r=i.y,s=i.width,n=i.height,o=i.translateX,c=i.translateY,g=this.w,p=this.zoomRect,f=this.selectionRect;if(this.dragged||null!==g.globals.selection){var b={transform:"translate("+(void 0===o?0:o)+", "+(void 0===c?0:c)+")"};g.globals.zoomEnabled&&this.dragged&&(s<0&&(s=1),p.attr({x:a,y:r,width:s,height:n,fill:g.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":g.config.chart.zoom.zoomedArea.fill.opacity,stroke:g.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":g.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":g.config.chart.zoom.zoomedArea.stroke.opacity}),E.setAttrs(p.node,b)),g.globals.selectionEnabled&&(f.attr({x:a,y:r,width:s>0?s:0,height:n>0?n:0,fill:g.config.chart.selection.fill.color,"fill-opacity":g.config.chart.selection.fill.opacity,stroke:g.config.chart.selection.stroke.color,"stroke-width":g.config.chart.selection.stroke.width,"stroke-dasharray":g.config.chart.selection.stroke.dashArray,"stroke-opacity":g.config.chart.selection.stroke.opacity}),E.setAttrs(f.node,b))}}},{key:"hideSelectionRect",value:function(i){i&&i.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(i){var b,r=i.zoomtype,s=this.w,n=i.context,o=this.gridRect.getBoundingClientRect(),l=n.startX-1,c=n.startY,d=!1,g=!1,p=n.clientX-o.left-l,f=n.clientY-o.top-c;return Math.abs(p+l)>s.globals.gridWidth?p=s.globals.gridWidth-l:n.clientX-o.left<0&&(p=l),l>n.clientX-o.left&&(d=!0,p=Math.abs(p)),c>n.clientY-o.top&&(g=!0,f=Math.abs(f)),n.drawSelectionRect(b="x"===r?{x:d?l-p:l,y:0,width:p,height:s.globals.gridHeight}:"y"===r?{x:0,y:g?c-f:c,width:s.globals.gridWidth,height:f}:{x:d?l-p:l,y:g?c-f:c,width:p,height:f}),n.selectionDragging("resizing"),b}},{key:"selectionDragging",value:function(i,a){var r=this,s=this.w,n=this.xyRatios,o=this.selectionRect,l=0;"resizing"===i&&(l=30);var c=function(g){return parseFloat(o.node.getAttribute(g))},d={x:c("x"),y:c("y"),width:c("width"),height:c("height")};s.globals.selection=d,"function"==typeof s.config.chart.events.selection&&s.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var g,p,f,b,m=r.gridRect.getBoundingClientRect(),v=o.node.getBoundingClientRect();s.globals.isRangeBar?(g=s.globals.yAxisScale[0].niceMin+(v.left-m.left)*n.invertedYRatio,p=s.globals.yAxisScale[0].niceMin+(v.right-m.left)*n.invertedYRatio,f=0,b=1):(g=s.globals.xAxisScale.niceMin+(v.left-m.left)*n.xRatio,p=s.globals.xAxisScale.niceMin+(v.right-m.left)*n.xRatio,f=s.globals.yAxisScale[0].niceMin+(m.bottom-v.bottom)*n.yRatio[0],b=s.globals.yAxisScale[0].niceMax-(v.top-m.top)*n.yRatio[0]);var A={xaxis:{min:g,max:p},yaxis:{min:f,max:b}};s.config.chart.events.selection(r.ctx,A),s.config.chart.brush.enabled&&void 0!==s.config.chart.events.brushScrolled&&s.config.chart.events.brushScrolled(r.ctx,A)},l))}},{key:"selectionDrawn",value:function(i){var r=i.zoomtype,s=this.w,n=i.context,o=this.xyRatios,l=this.ctx.toolbar;if(n.startX>n.endX){var c=n.startX;n.startX=n.endX,n.endX=c}if(n.startY>n.endY){var d=n.startY;n.startY=n.endY,n.endY=d}var g=void 0,p=void 0;s.globals.isRangeBar?(g=s.globals.yAxisScale[0].niceMin+n.startX*o.invertedYRatio,p=s.globals.yAxisScale[0].niceMin+n.endX*o.invertedYRatio):(g=s.globals.xAxisScale.niceMin+n.startX*o.xRatio,p=s.globals.xAxisScale.niceMin+n.endX*o.xRatio);var f=[],b=[];if(s.config.yaxis.forEach(function(k,w){if(s.globals.seriesYAxisMap[w].length>0){var S=s.globals.seriesYAxisMap[w][0];f.push(s.globals.yAxisScale[w].niceMax-o.yRatio[S]*n.startY),b.push(s.globals.yAxisScale[w].niceMax-o.yRatio[S]*n.endY)}}),n.dragged&&(n.dragX>10||n.dragY>10)&&g!==p)if(s.globals.zoomEnabled){var m=M.clone(s.globals.initialConfig.yaxis),v=M.clone(s.globals.initialConfig.xaxis);if(s.globals.zoomed=!0,s.config.xaxis.convertedCatToNumeric&&(g=Math.floor(g),p=Math.floor(p),g<1&&(g=1,p=s.globals.dataPoints),p-g<2&&(p=g+1)),"xy"!==r&&"x"!==r||(v={min:g,max:p}),"xy"!==r&&"y"!==r||m.forEach(function(k,w){m[w].min=b[w],m[w].max=f[w]}),l){var A=l.getBeforeZoomRange(v,m);A&&(v=A.xaxis?A.xaxis:v,m=A.yaxis?A.yaxis:m)}var h={xaxis:v};s.config.chart.group||(h.yaxis=m),n.ctx.updateHelpers._updateOptions(h,!1,n.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof s.config.chart.events.zoomed&&l.zoomCallback(v,m)}else if(s.globals.selectionEnabled){var u,x=null;u={min:g,max:p},"xy"!==r&&"y"!==r||(x=M.clone(s.config.yaxis)).forEach(function(k,w){x[w].min=b[w],x[w].max=f[w]}),s.globals.selection=n.selection,"function"==typeof s.config.chart.events.selection&&s.config.chart.events.selection(n.ctx,{xaxis:u,yaxis:x})}}},{key:"panDragging",value:function(i){var r=this.w,s=i.context;if(void 0!==r.globals.lastClientPosition.x){var n=r.globals.lastClientPosition.x-s.clientX,o=r.globals.lastClientPosition.y-s.clientY;Math.abs(n)>Math.abs(o)&&n>0?this.moveDirection="left":Math.abs(n)>Math.abs(o)&&n<0?this.moveDirection="right":Math.abs(o)>Math.abs(n)&&o>0?this.moveDirection="up":Math.abs(o)>Math.abs(n)&&o<0&&(this.moveDirection="down")}r.globals.lastClientPosition={x:s.clientX,y:s.clientY},r.config.xaxis.convertedCatToNumeric||s.panScrolled(r.globals.isRangeBar?r.globals.minY:r.globals.minX,r.globals.isRangeBar?r.globals.maxY:r.globals.maxX)}},{key:"delayedPanScrolled",value:function(){var i=this.w,a=i.globals.minX,r=i.globals.maxX,s=(i.globals.maxX-i.globals.minX)/2;"left"===this.moveDirection?(a=i.globals.minX+s,r=i.globals.maxX+s):"right"===this.moveDirection&&(a=i.globals.minX-s,r=i.globals.maxX-s),a=Math.floor(a),r=Math.floor(r),this.updateScrolledChart({xaxis:{min:a,max:r}},a,r)}},{key:"panScrolled",value:function(i,a){var r=this.w,s=this.xyRatios,n=M.clone(r.globals.initialConfig.yaxis),o=s.xRatio,l=r.globals.minX,c=r.globals.maxX;r.globals.isRangeBar&&(o=s.invertedYRatio,l=r.globals.minY,c=r.globals.maxY),"left"===this.moveDirection?(i=l+r.globals.gridWidth/15*o,a=c+r.globals.gridWidth/15*o):"right"===this.moveDirection&&(i=l-r.globals.gridWidth/15*o,a=c-r.globals.gridWidth/15*o),r.globals.isRangeBar||(ir.globals.initialMaxX)&&(i=l,a=c);var d={xaxis:{min:i,max:a}};r.config.chart.group||(d.yaxis=n),this.updateScrolledChart(d,i,a)}},{key:"updateScrolledChart",value:function(i,a,r){var s=this.w;this.ctx.updateHelpers._updateOptions(i,!1,!1),"function"==typeof s.config.chart.events.scrolled&&s.config.chart.events.scrolled(this.ctx,{xaxis:{min:a,max:r}})}}]),t}(),V=function(){function y(e){F(this,y),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return D(y,[{key:"getNearestValues",value:function(e){var t=e.hoverArea,a=e.clientX,r=e.clientY,s=this.w,n=e.elGrid.getBoundingClientRect(),o=n.width,l=n.height,c=o/(s.globals.dataPoints-1),d=l/s.globals.dataPoints,g=this.hasBars();!s.globals.comboCharts&&!g||s.config.xaxis.convertedCatToNumeric||(c=o/s.globals.dataPoints);var p=a-n.left-s.globals.barPadForNumericAxis,f=r-n.top;p<0||f<0||p>o||f>l?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):s.globals.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):s.globals.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));var b=Math.round(p/c),m=Math.floor(f/d);g&&!s.config.xaxis.convertedCatToNumeric&&(b=Math.ceil(p/c),b-=1);var v=null,A=null,h=s.globals.seriesXvalues.map(function(S){return S.filter(function(L){return M.isNumber(L)})}),u=s.globals.seriesYvalues.map(function(S){return S.filter(function(L){return M.isNumber(L)})});if(s.globals.isXNumeric){var x=this.ttCtx.getElGrid().getBoundingClientRect(),k=p*(x.width/o);v=(A=this.closestInMultiArray(k,f*(x.height/l),h,u)).index,b=A.j,null!==v&&(b=(A=this.closestInArray(k,h=s.globals.seriesXvalues[v])).index)}return s.globals.capturedSeriesIndex=null===v?-1:v,(!b||b<1)&&(b=0),s.globals.capturedDataPointIndex=s.globals.isBarHorizontal?m:b,{capturedSeries:v,j:s.globals.isBarHorizontal?m:b,hoverX:p,hoverY:f}}},{key:"closestInMultiArray",value:function(e,t,i,a){var s=0,n=null,o=-1;this.w.globals.series.length>1?s=this.getFirstActiveXArray(i):n=0;var c=Math.abs(e-i[s][0]);if(i.forEach(function(p){p.forEach(function(f,b){var m=Math.abs(e-f);m<=c&&(c=m,o=b)})}),-1!==o){var g=Math.abs(t-a[s][o]);n=s,a.forEach(function(p,f){var b=Math.abs(t-p[o]);b<=g&&(g=b,n=f)})}return{index:n,j:o}}},{key:"getFirstActiveXArray",value:function(e){for(var t=this.w,i=0,a=e.map(function(s,n){return s.length>0?n:-1}),r=0;r0)for(var a=0;a *"):".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(e=ne(e)).sort(function(i,a){var r=Number(i.getAttribute("data:realIndex")),s=Number(a.getAttribute("data:realIndex"));return sr?-1:0});var t=[];return e.forEach(function(i){t.push(i.querySelector(".apexcharts-marker"))}),t}},{key:"hasMarkers",value:function(e){return this.getElMarkers(e).length>0}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(e){var t=this.w,i=t.config.markers.hover.size;return void 0===i&&(i=t.globals.markers.size[e]+t.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var t=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=t.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,r=0;r ').concat(C.attrs.name,""),L+="
".concat(C.val,"
")}),h.innerHTML=S+"",u.innerHTML=L+""};n?l.globals.seriesGoals[t][i]&&Array.isArray(l.globals.seriesGoals[t][i])?x():(h.innerHTML="",u.innerHTML=""):x()}else h.innerHTML="",u.innerHTML="";if(null!==b&&(a[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,a[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==b?b:""),n&&m[0]){if(l.config.tooltip.hideEmptySeries){var k=a[t].querySelector(".apexcharts-tooltip-marker"),w=a[t].querySelector(".apexcharts-tooltip-text");0==parseFloat(d)?(k.style.display="none",w.style.display="none"):(k.style.display="block",w.style.display="block")}m[0].parentNode.style.display=null==d||l.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||l.globals.collapsedSeriesIndices.indexOf(t)>-1?"none":l.config.tooltip.items.display}}},{key:"toggleActiveInactiveSeries",value:function(e){var t=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=t.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group");i&&(i.classList.add("apexcharts-active"),i.style.display=t.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var t=e.i,i=e.j,a=this.w,r=this.ctx.series.filteredSeriesX(),s="",n="",o=null,l=null,c={series:a.globals.series,seriesIndex:t,dataPointIndex:i,w:a},d=a.globals.ttZFormatter;null===i?l=a.globals.series[t]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(s=r[t][i],0===r[t].length&&(s=r[this.tooltipUtil.getFirstActiveXArray(r)][i])):s=void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var g=s;return s=a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?new Ce(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,g,g,{i:void 0,dateFormatter:new se(this.ctx).formatDate,w:this.w}):a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](g,c):a.globals.xLabelFormatter(g,c),void 0!==a.config.tooltip.x.formatter&&(s=a.globals.ttKeyFormatter(g,c)),a.globals.seriesZ.length>0&&a.globals.seriesZ[t].length>0&&(o=d(a.globals.seriesZ[t][i],a)),n="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(g,c):s,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(s)?s.join(" "):s,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:o}}},{key:"handleCustomTooltip",value:function(e){var t=e.i,i=e.j,a=e.y1,r=e.y2,s=e.w,n=this.ttCtx.getElTooltip(),o=s.config.tooltip.custom;Array.isArray(o)&&o[t]&&(o=o[t]),n.innerHTML=o({ctx:this.ctx,series:s.globals.series,seriesIndex:t,dataPointIndex:i,y1:a,y2:r,w:s})}}]),y}(),Re=function(){function y(e){F(this,y),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return D(y,[{key:"moveXCrosshairs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,r=i.getElXCrosshairs(),s=e-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(null!==t&&(s=a.globals.gridWidth/n*t),null===r||a.globals.isBarHorizontal||(r.setAttribute("x",s),r.setAttribute("x1",s),r.setAttribute("x2",s),r.setAttribute("y2",a.globals.gridHeight),r.classList.add("apexcharts-active")),s<0&&(s=0),s>a.globals.gridWidth&&(s=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=s;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=s+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(e){var t=this.ttCtx;null!==t.ycrosshairs&&E.setAttrs(t.ycrosshairs,{y1:e,y2:e}),null!==t.ycrosshairsHidden&&E.setAttrs(t.ycrosshairsHidden,{y1:e,y2:e})}},{key:"moveXAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var r,a=i.xaxisOffY+t.config.xaxis.tooltip.offsetY+t.globals.translateY+1+t.config.xaxis.offsetY;e-=i.xaxisTooltip.getBoundingClientRect().width/2,isNaN(e)||(e+=t.globals.translateX,r=new E(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=r.width+"px",i.xaxisTooltip.style.left=e+"px",i.xaxisTooltip.style.top=a+"px")}}},{key:"moveYAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),r=t.globals.translateY+a,s=i.yaxisTTEls[e].getBoundingClientRect().height,n=t.globals.translateYAxisX[e]-2;t.config.yaxis[e].opposite&&(n-=26),r-=s/2,-1===t.globals.ignoreYAxisIndexes.indexOf(e)?(i.yaxisTTEls[e].classList.add("apexcharts-active"),i.yaxisTTEls[e].style.top=r+"px",i.yaxisTTEls[e].style.left=n+t.config.yaxis[e].tooltip.offsetX+"px"):i.yaxisTTEls[e].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,r=this.ttCtx,s=r.getElTooltip(),n=r.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(e)+o+5,c=parseFloat(t)+o/2;if(l>a.globals.gridWidth/2&&(l=l-n.ttWidth-o-10),l>a.globals.gridWidth-n.ttWidth-10&&(l=a.globals.gridWidth-n.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var d=r.getElGrid().getBoundingClientRect();(l=r.e.clientX-d.left)>a.globals.gridWidth/2&&(l-=r.tooltipRect.ttWidth),(c=r.e.clientY+a.globals.translateY-d.top)>a.globals.gridHeight/2&&(c-=r.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+c>a.globals.gridHeight&&(c=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(l)||(s.style.left=(l+=a.globals.translateX)+"px",s.style.top=c+"px")}},{key:"moveMarkers",value:function(e,t){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[e]>0)for(var r=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),s=0;s0&&(c.setAttribute("r",o),c.setAttribute("cx",i),c.setAttribute("cy",a)),this.moveXCrosshairs(i),s.fixedTooltip||this.moveTooltip(i,a,o)}}},{key:"moveDynamicPointsOnHover",value:function(e){var t,i=this.ttCtx,a=i.w,r=0,s=0,n=a.globals.pointsArray;t=new ge(this.ctx).getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var o=i.tooltipUtil.getHoverMarkerSize(t);n[t]&&(r=n[t][e][0],s=n[t][e][1]);var l=i.tooltipUtil.getAllMarkers();if(null!==l)for(var c=0;c0?(l[c]&&l[c].setAttribute("r",o),l[c]&&l[c].setAttribute("cy",g)):l[c]&&l[c].setAttribute("r",0)}}this.moveXCrosshairs(r),i.fixedTooltip||this.moveTooltip(r,s||a.globals.gridHeight,o)}},{key:"moveStickyTooltipOverBars",value:function(e,t){var i=this.w,a=this.ttCtx,r=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,s=r>=2&&r%2==0?Math.floor(r/2):Math.floor(r/2)+1;i.globals.isBarHorizontal&&(s=new ge(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(s,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(s,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(s,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(s,"'] path[j='").concat(e,"']"));n||"number"!=typeof t||(n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(t,"'] path[j='").concat(e,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(t,"'] path[j='").concat(e,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(t,"'] path[j='").concat(e,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(t,"'] path[j='").concat(e,"']")));var o=n?parseFloat(n.getAttribute("cx")):0,l=n?parseFloat(n.getAttribute("cy")):0,c=n?parseFloat(n.getAttribute("barWidth")):0,d=a.getElGrid().getBoundingClientRect(),g=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(n&&!g&&(o-=r%2!=0?c/2:0),n&&g&&i.globals.comboCharts&&(o-=c/2)):i.globals.isBarHorizontal||(o=a.xAxisTicksPositions[e-1]+a.dataPointsDividedWidth/2,isNaN(o)&&(o=a.xAxisTicksPositions[e]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?l-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?l=a.e.clientY-d.top-a.tooltipRect.ttHeight/2:l+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(l=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),a.fixedTooltip||this.moveTooltip(o,l||i.globals.gridHeight)}}]),y}(),Tt=function(){function y(e){F(this,y),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new Re(e)}return D(y,[{key:"drawDynamicPoints",value:function(){var e=this.w,t=new E(this.ctx),i=new Me(this.ctx),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=ne(a),e.config.chart.stacked&&a.sort(function(d,g){return parseFloat(d.getAttribute("data:realIndex"))-parseFloat(g.getAttribute("data:realIndex"))});for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=this.w;"bubble"!==r.config.chart.type&&this.newPointSize(e,t);var s=t.getAttribute("cx"),n=t.getAttribute("cy");if(null!==i&&null!==a&&(s=i,n=a),this.tooltipPosition.moveXCrosshairs(s),!this.fixedTooltip){if("radar"===r.config.chart.type){var o=this.ttCtx.getElGrid().getBoundingClientRect();s=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(s,n,r.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var t=this.w,i=this,a=this.ttCtx,r=e,s=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=t.config.markers.hover.size,o=0;o=0?e[t].setAttribute("r",i):e[t].setAttribute("r",0)}}}]),y}(),It=function(){function y(e){F(this,y),this.w=e.w;var t=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&"rangeBar"===t.config.chart.type&&t.config.plotOptions.bar.rangeBarGroupRows}return D(y,[{key:"getAttr",value:function(e,t){return parseFloat(e.target.getAttribute(t))}},{key:"handleHeatTreeTooltip",value:function(e){var t=e.e,i=e.opt,a=e.x,r=e.y,n=this.ttCtx,o=this.w;if(t.target.classList.contains("apexcharts-".concat(e.type,"-rect"))){var l=this.getAttr(t,"i"),c=this.getAttr(t,"j"),d=this.getAttr(t,"cx"),g=this.getAttr(t,"cy"),p=this.getAttr(t,"width"),f=this.getAttr(t,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:c,shared:!1,e:t}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=c,a=d+n.tooltipRect.ttWidth/2+p,r=g+n.tooltipRect.ttHeight/2-f/2,n.tooltipPosition.moveXCrosshairs(d+p/2),a>o.globals.gridWidth/2&&(a=d-n.tooltipRect.ttWidth/2+p),n.w.config.tooltip.followCursor){var b=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-b.left-(a>o.globals.gridWidth/2?n.tooltipRect.ttWidth:0),r=o.globals.clientY-b.top-(r>o.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:r}}},{key:"handleMarkerTooltip",value:function(e){var t,i,a=e.e,r=e.opt,s=e.x,n=e.y,o=this.w,l=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var c=parseInt(r.paths.getAttribute("cx"),10),d=parseInt(r.paths.getAttribute("cy"),10),g=parseFloat(r.paths.getAttribute("val"));if(i=parseInt(r.paths.getAttribute("rel"),10),t=parseInt(r.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var p=M.findAncestor(r.paths,"apexcharts-series");p&&(t=parseInt(p.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:r.ttItems,i:t,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&l.markerClick(a,t,i),o.globals.capturedSeriesIndex=t,o.globals.capturedDataPointIndex=i,s=c,n=d+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var f=l.getElGrid().getBoundingClientRect();n=l.e.clientY+o.globals.translateY-f.top}g<0&&(n=d),l.marker.enlargeCurrentPoint(i,r.paths,s,n)}return{x:s,y:n}}},{key:"handleBarTooltip",value:function(e){var t,i,a=e.e,r=e.opt,s=this.w,n=this.ttCtx,o=n.getElTooltip(),l=0,c=0,d=0,g=this.getBarTooltipXY({e:a,opt:r}),p=g.barHeight,f=g.j;s.globals.capturedSeriesIndex=t=g.i,s.globals.capturedDataPointIndex=f,s.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!s.config.tooltip.shared?(c=g.x,d=g.y,i=Array.isArray(s.config.stroke.width)?s.config.stroke.width[t]:s.config.stroke.width,l=c):s.globals.comboCharts||s.config.tooltip.shared||(l/=2),isNaN(d)&&(d=s.globals.svgHeight-n.tooltipRect.ttHeight);var b=parseInt(r.paths.parentNode.getAttribute("data:realIndex"),10),m=s.globals.isMultipleYAxis?s.config.yaxis[b]&&s.config.yaxis[b].reversed:s.config.yaxis[0].reversed;if(c+n.tooltipRect.ttWidth>s.globals.gridWidth&&!m?c-=n.tooltipRect.ttWidth:c<0&&(c=0),n.w.config.tooltip.followCursor){var v=n.getElGrid().getBoundingClientRect();d=n.e.clientY-v.top}null===n.tooltip&&(n.tooltip=s.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),s.config.tooltip.shared||n.tooltipPosition.moveXCrosshairs(s.globals.comboBarCount>0?l+i/2:l),!n.fixedTooltip&&(!s.config.tooltip.shared||s.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(m&&(c-=n.tooltipRect.ttWidth)<0&&(c=0),!m||s.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||(d=d+p-2*(s.globals.series[t][f]<0?p:0)),d=d+s.globals.translateY-n.tooltipRect.ttHeight/2,o.style.left=c+s.globals.translateX+"px",o.style.top=d+"px")}},{key:"getBarTooltipXY",value:function(e){var t=this,i=e.e,a=e.opt,r=this.w,s=null,n=this.ttCtx,o=0,l=0,c=0,d=0,g=0,p=i.target.classList;if(p.contains("apexcharts-bar-area")||p.contains("apexcharts-candlestick-area")||p.contains("apexcharts-boxPlot-area")||p.contains("apexcharts-rangebar-area")){var f=i.target,b=f.getBoundingClientRect(),m=a.elGrid.getBoundingClientRect(),v=b.height;g=b.height;var A=b.width,h=parseInt(f.getAttribute("cx"),10),u=parseInt(f.getAttribute("cy"),10);d=parseFloat(f.getAttribute("barWidth"));var x="touchmove"===i.type?i.touches[0].clientX:i.clientX;s=parseInt(f.getAttribute("j"),10),o=parseInt(f.parentNode.getAttribute("rel"),10)-1;var k=f.getAttribute("data-range-y1"),w=f.getAttribute("data-range-y2");r.globals.comboCharts&&(o=parseInt(f.parentNode.getAttribute("data:realIndex"),10));var S=function(C){return r.globals.isXNumeric?h-A/2:t.isVerticalGroupedRangeBar?h+A/2:h-n.dataPointsDividedWidth+A/2},L=function(){return u-n.dataPointsDividedHeight+v/2-n.tooltipRect.ttHeight/2};n.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:o,j:s,y1:k?parseInt(k,10):null,y2:w?parseInt(w,10):null,shared:!n.showOnIntersect&&r.config.tooltip.shared,e:i}),r.config.tooltip.followCursor?r.globals.isBarHorizontal?(l=x-m.left+15,c=L()):(l=S(),c=i.clientY-m.top-n.tooltipRect.ttHeight/2-15):r.globals.isBarHorizontal?((l=h)0&&i.setAttribute("width",t.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var e=this.w,t=this.ttCtx;t.ycrosshairs=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),t.ycrosshairsHidden=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(e,t,i){var a=this.ttCtx,r=this.w.globals,s=r.seriesYAxisMap[e];if(a.yaxisTooltips[e]&&s.length>0){var n=r.yLabelFormatters[e],o=a.getElGrid().getBoundingClientRect(),l=s[0];i.yRatio.length>1&&function(p){throw new TypeError('"translationsIndex" is read-only')}();var g=r.minYArr[l]+(r.maxYArr[l]-r.minYArr[l]-(t-o.top)*i.yRatio[0]);a.tooltipPosition.moveYCrosshairs(t-o.top),a.yaxisTooltipText[e].innerHTML=n(g),a.tooltipPosition.moveYAxisTooltip(e)}}}]),y}(),wt=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w;var t=this.w;this.tConfig=t.config.tooltip,this.tooltipUtil=new V(this),this.tooltipLabels=new ce(this),this.tooltipPosition=new Re(this),this.marker=new Tt(this),this.intersect=new It(this),this.axesTooltip=new Xt(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!t.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return D(y,[{key:"getElTooltip",value:function(e){return e||(e=this),e.w.globals.dom.baseEl?e.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(e){var t=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=t.config.xaxis.tooltip.enabled&&t.globals.axisCharts,this.yaxisTooltips=t.config.yaxis.map(function(s,n){return!!(s.show&&s.tooltip.enabled&&t.globals.axisCharts)}),this.allTooltipSeriesGroups=[],t.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),t.config.tooltip.cssClass&&i.classList.add(t.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),t.globals.dom.elWrap.appendChild(i),t.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new Te(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!t.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==t.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==t.config.markers.size&&0!==t.globals.markers.largestSize||this.marker.drawDynamicPoints(this),t.globals.collapsedSeries.length!==t.globals.series.length){this.dataPointsDividedHeight=t.globals.gridHeight/t.globals.dataPoints,this.dataPointsDividedWidth=t.globals.gridWidth/t.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var r=t.globals.series.length;(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(r=this.showOnIntersect?1:t.globals.series.length),this.legendLabels=t.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(r),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var t=this,i=this.w,a=[],r=this.getElTooltip(),s=function(o){var l=document.createElement("div");l.classList.add("apexcharts-tooltip-series-group"),l.style.order=i.config.tooltip.inverseOrder?e-o:o+1,t.tConfig.shared&&t.tConfig.enabledOnSeries&&Array.isArray(t.tConfig.enabledOnSeries)&&t.tConfig.enabledOnSeries.indexOf(o)<0&&l.classList.add("apexcharts-tooltip-series-group-hidden");var c=document.createElement("span");c.classList.add("apexcharts-tooltip-marker"),c.style.backgroundColor=i.globals.colors[o],l.appendChild(c);var d=document.createElement("div");d.classList.add("apexcharts-tooltip-text"),d.style.fontFamily=t.tConfig.style.fontFamily||i.config.chart.fontFamily,d.style.fontSize=t.tConfig.style.fontSize,["y","goals","z"].forEach(function(g){var p=document.createElement("div");p.classList.add("apexcharts-tooltip-".concat(g,"-group"));var f=document.createElement("span");f.classList.add("apexcharts-tooltip-text-".concat(g,"-label")),p.appendChild(f);var b=document.createElement("span");b.classList.add("apexcharts-tooltip-text-".concat(g,"-value")),p.appendChild(b),d.appendChild(p)}),l.appendChild(d),r.appendChild(l),a.push(l)},n=0;n0&&this.addPathsEventListeners(f,d),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(d)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,t=this.getElTooltip(),i=t.getBoundingClientRect(),a=i.width+10,r=i.height+10,s=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(s=s+e.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(n=n+e.globals.svgHeight-r-10),t.style.left=s+"px",t.style.top=n+"px",{x:s,y:n,ttWidth:a,ttHeight:r}}},{key:"addDatapointEventsListeners",value:function(e){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(t,e)}},{key:"addPathsEventListeners",value:function(e,t){for(var i=this,a=function(s){var n={paths:e[s],tooltipEl:t.tooltipEl,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:t.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(function(o){return e[s].addEventListener(o,i.onSeriesHover.bind(i,n),{capture:!1,passive:!0})})},r=0;r=100?this.seriesHover(e,t):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){i.seriesHover(e,t)},100-a))}},{key:"seriesHover",value:function(e,t){var i=this;this.lastHoverTime=Date.now();var a=[],r=this.w;r.config.chart.group&&(a=this.ctx.getGroupedCharts()),r.globals.axisCharts&&(r.globals.minX===-1/0&&r.globals.maxX===1/0||0===r.globals.dataPoints)||(a.length?a.forEach(function(s){var n=i.getElTooltip(s);s.w.globals.minX===i.w.globals.minX&&s.w.globals.maxX===i.w.globals.maxX&&s.w.globals.tooltip.seriesHoverByContext({chartCtx:s,ttCtx:s.w.globals.tooltip,opt:{paths:e.paths,tooltipEl:n,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:s.w.globals.tooltip.ttItems},e:t})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:t}))}},{key:"seriesHoverByContext",value:function(e){var t=e.chartCtx,i=e.ttCtx,a=e.opt,r=e.e,s=t.w,n=this.getElTooltip();n&&(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=r,i.tooltipUtil.hasBars()&&!s.globals.comboCharts&&!i.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new ge(t).toggleSeriesOnHover(r,r.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),s.globals.axisCharts?i.axisChartsTooltips({e:r,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:r,opt:a,tooltipRect:i.tooltipRect}))}},{key:"axisChartsTooltips",value:function(e){var t,i,a=e.e,r=e.opt,s=this.w,n=r.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,l="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=l,this.clientX=o,s.globals.capturedSeriesIndex=-1,s.globals.capturedDataPointIndex=-1,ln.top+n.height)this.handleMouseOut(r);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!s.config.tooltip.shared){var c=parseInt(r.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(r)}var d=this.getElTooltip(),g=this.getElXCrosshairs(),p=s.globals.xyCharts||"bar"===s.config.chart.type&&!s.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||s.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(s.globals.collapsedSeries.length+s.globals.ancillaryCollapsedSeries.length===s.globals.series.length)return;null!==g&&g.classList.add("apexcharts-active");var f=this.yaxisTooltips.filter(function(v){return!0===v});if(null!==this.ycrosshairs&&f.length&&this.ycrosshairs.classList.add("apexcharts-active"),p&&!this.showOnIntersect)this.handleStickyTooltip(a,o,l,r);else if("heatmap"===s.config.chart.type||"treemap"===s.config.chart.type){var b=this.intersect.handleHeatTreeTooltip({e:a,opt:r,x:t,y:i,type:s.config.chart.type});i=b.y,d.style.left=(t=b.x)+"px",d.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:r}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:r,x:t,y:i});if(this.yaxisTooltips.length)for(var m=0;ml.width)this.handleMouseOut(a);else if(null!==o)this.handleStickyCapturedSeries(e,o,a,n);else if(this.tooltipUtil.isXoverlap(n)||r.globals.isBarHorizontal){var c=r.globals.series.findIndex(function(d,g){return!r.globals.collapsedSeriesIndices.includes(g)});this.create(e,this,c,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(e,t,i,a){var r=this.w;if(this.tConfig.shared||null!==r.globals.series[t][a]){if(void 0!==r.globals.series[t][a])this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,t,a,i.ttItems):this.create(e,this,t,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var s=r.globals.series.findIndex(function(n,o){return!r.globals.collapsedSeriesIndices.includes(o)});this.create(e,this,s,a,i.ttItems)}}else this.handleMouseOut(i)}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,t=new E(this.ctx),i=e.globals.dom.Paper.select(".apexcharts-bar-area"),a=0;a5&&void 0!==arguments[5]?arguments[5]:null,w=this.w,S=t;"mouseup"===e.type&&this.markerClick(e,i,a),null===k&&(k=this.tConfig.shared);var L=this.tooltipUtil.hasMarkers(i),C=this.tooltipUtil.getElBars();if(w.config.legend.tooltipHoverFormatter){var z=w.config.legend.tooltipHoverFormatter,T=Array.from(this.legendLabels);T.forEach(function(ie){var re=ie.getAttribute("data:default-text");ie.innerHTML=decodeURIComponent(re)});for(var I=0;I0?S.marker.enlargePoints(a):S.tooltipPosition.moveDynamicPointsOnHover(a);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(C),this.barSeriesHeight>0)){var j=new E(this.ctx),Z=w.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a,i);for(var _=0;_0&&a.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f-=d*w)),k&&(f=f+p.height/2-h/2-2);var L=this.barCtx.series[r][s]<0,C=l;switch(this.barCtx.isReversed&&(C=l-g+(L?2*g:0),l-=g),v.position){case"center":b=k?L?C-g/2+x:C+g/2-x:L?C-g/2+p.height/2+x:C+g/2+p.height/2-x;break;case"bottom":b=k?L?C-g+x:C+g-x:L?C-g+p.height+h+x:C+g-p.height/2+h-x;break;case"top":b=k?L?C+x:C-x:L?C-p.height/2-x:C+p.height+x}if(this.barCtx.lastActiveBarSerieIndex===n&&A.enabled){var z=new E(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:n,j:s}),m.fontSize);t=L?C-z.height/2-x-A.offsetY+18:C+z.height+x+A.offsetY-18,i=f+A.offsetX}return a.config.chart.stacked||(b<0?b=0+h:b+p.height/3>a.globals.gridHeight&&(b=a.globals.gridHeight-h)),{bcx:c,bcy:l,dataLabelsX:f,dataLabelsY:b,totalDataLabelsX:i,totalDataLabelsY:t,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var t=this.w,i=e.x,a=e.i,r=e.j,s=e.realIndex,n=e.groupIndex,o=e.bcy,l=e.barHeight,c=e.barWidth,d=e.textRects,g=e.dataLabelsX,p=e.strokeWidth,f=e.dataLabelsConfig,b=e.barDataLabelsConfig,m=e.barTotalDataLabelsConfig,v=e.offX,A=e.offY,h=t.globals.gridHeight/t.globals.dataPoints;c=Math.abs(c);var u,x,k=(o+=-1!==n?n*l:0)-(this.barCtx.isRangeBar?0:h)+l/2+d.height/2+A-3,w="start",S=this.barCtx.series[a][r]<0,L=i;switch(this.barCtx.isReversed&&(L=i+c-(S?2*c:0),i=t.globals.gridWidth-c),b.position){case"center":g=S?L+c/2-v:Math.max(d.width/2,L-c/2)+v;break;case"bottom":g=S?L+c-p-Math.round(d.width/2)-v:L-c+p+Math.round(d.width/2)+v;break;case"top":g=S?L-p+Math.round(d.width/2)-v:L-p-Math.round(d.width/2)+v}if(this.barCtx.lastActiveBarSerieIndex===s&&m.enabled){var C=new E(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:r}),f.fontSize);S?(u=L-p+Math.round(C.width/2)-v-m.offsetX-15,w="end"):u=L-p-Math.round(C.width/2)+v+m.offsetX+15,x=k+m.offsetY}return t.config.chart.stacked||(g<0?g=g+d.width+p:g+d.width/2>t.globals.gridWidth&&(g=t.globals.gridWidth-d.width-p)),{bcx:i,bcy:o,dataLabelsX:g,dataLabelsY:k,totalDataLabelsX:u,totalDataLabelsY:x,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(e){var t=e.x,i=e.y,a=e.val,r=e.i,s=e.j,n=e.textRects,o=e.barHeight,l=e.barWidth,c=e.dataLabelsConfig,d=this.w,g="rotate(0)";"vertical"===d.config.plotOptions.bar.dataLabels.orientation&&(g="rotate(-90, ".concat(t,", ").concat(i,")"));var p=new Ae(this.barCtx.ctx),f=new E(this.barCtx.ctx),b=c.formatter,m=null,v=d.globals.collapsedSeriesIndices.indexOf(r)>-1;if(c.enabled&&!v){m=f.group({class:"apexcharts-data-labels",transform:g});var A="";void 0!==a&&(A=b(a,O(O({},d),{},{seriesIndex:r,dataPointIndex:s,w:d}))),!a&&d.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(A="");var h=d.globals.series[r][s]<0,u=d.config.plotOptions.bar.dataLabels.position;"vertical"===d.config.plotOptions.bar.dataLabels.orientation&&("top"===u&&(c.textAnchor=h?"end":"start"),"center"===u&&(c.textAnchor="middle"),"bottom"===u&&(c.textAnchor=h?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&lMath.abs(l)&&(A=""):n.height/1.6>Math.abs(o)&&(A=""));var x=O({},c);this.barCtx.isHorizontal&&a<0&&("start"===c.textAnchor?x.textAnchor="end":"end"===c.textAnchor&&(x.textAnchor="start")),p.plotDataLabelsText({x:t,y:i,text:A,i:r,j:s,parent:m,dataLabelsConfig:x,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return m}},{key:"drawTotalDataLabels",value:function(e){var t,i=e.x,a=e.y,r=e.val,s=e.barWidth,n=e.barHeight,o=e.realIndex,l=e.textAnchor,c=e.barTotalDataLabelsConfig,d=this.w,g=new E(this.barCtx.ctx);return c.enabled&&void 0!==i&&void 0!==a&&this.barCtx.lastActiveBarSerieIndex===o&&(t=g.drawText({x:i-(!d.globals.isBarHorizontal&&d.globals.seriesGroups.length?s/d.globals.seriesGroups.length:0),y:a-(d.globals.isBarHorizontal&&d.globals.seriesGroups.length?n/d.globals.seriesGroups.length:0),foreColor:c.style.color,text:r,textAnchor:l,fontFamily:c.style.fontFamily,fontSize:c.style.fontSize,fontWeight:c.style.fontWeight})),t}}]),y}(),Et=function(){function y(e){F(this,y),this.w=e.w,this.barCtx=e}return D(y,[{key:"initVariables",value:function(e){var t=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[i].length),t.globals.isXNumeric)for(var a=0;at.globals.minX&&t.globals.seriesX[i][a]0&&(a=l.globals.minXDiff/g),(s=a/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(s=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(s=parseInt(this.barCtx.barOptions.columnWidth,10)),n=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e=l.globals.padHorizontal+(a-s*this.barCtx.seriesLen)/2}return l.globals.barHeight=r,l.globals.barWidth=s,{x:e,y:t,yDivision:i,xDivision:a,barHeight:r,barWidth:s,zeroH:n,zeroW:o}}},{key:"initializeStackedPrevVars",value:function(e){var t=e.w;t.globals.hasSeriesGroups?t.globals.seriesGroups.forEach(function(i){e[i]||(e[i]={}),e[i].prevY=[],e[i].prevX=[],e[i].prevYF=[],e[i].prevXF=[],e[i].prevYVal=[],e[i].prevXVal=[]}):(e.prevY=[],e.prevX=[],e.prevYF=[],e.prevXF=[],e.prevYVal=[],e.prevXVal=[])}},{key:"initializeStackedXYVars",value:function(e){var t=e.w;t.globals.hasSeriesGroups?t.globals.seriesGroups.forEach(function(i){e[i]||(e[i]={}),e[i].xArrj=[],e[i].xArrjF=[],e[i].xArrjVal=[],e[i].yArrj=[],e[i].yArrjF=[],e[i].yArrjVal=[]}):(e.xArrj=[],e.xArrjF=[],e.xArrjVal=[],e.yArrj=[],e.yArrjF=[],e.yArrjVal=[])}},{key:"getPathFillColor",value:function(e,t,i,a){var r,s,n,o,l=this.w,c=new ue(this.barCtx.ctx),d=null,g=this.barCtx.barOptions.distributed?i:t;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(p){e[t][i]>=p.from&&e[t][i]<=p.to&&(d=p.color)}),l.config.series[t].data[i]&&l.config.series[t].data[i].fillColor&&(d=l.config.series[t].data[i].fillColor),c.fillPath({seriesNumber:this.barCtx.barOptions.distributed?g:a,dataPointIndex:i,color:d,value:e[t][i],fillConfig:null===(r=l.config.series[t].data[i])||void 0===r?void 0:r.fill,fillType:null!==(s=l.config.series[t].data[i])&&void 0!==s&&null!==(n=s.fill)&&void 0!==n&&n.type?null===(o=l.config.series[t].data[i])||void 0===o?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[t]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(e,t,i){var a=0,r=this.w;return this.barCtx.isNullValue=null==this.barCtx.series[e][t],r.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"shouldApplyRadius",value:function(e){var t=this.w,i=!1;return t.config.plotOptions.bar.borderRadius>0&&(t.config.chart.stacked&&"last"===t.config.plotOptions.bar.borderRadiusWhenStacked?this.barCtx.lastActiveBarSerieIndex===e&&(i=!0):i=!0),i}},{key:"barBackground",value:function(e){var t=e.j,i=e.i,a=e.x1,r=e.x2,s=e.y1,n=e.y2,o=e.elSeries,l=this.w,c=new E(this.barCtx.ctx),d=new ge(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&d===i){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);var p=c.drawRect(void 0!==a?a:0,void 0!==s?s:0,void 0!==r?r:l.globals.gridWidth,void 0!==n?n:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,this.barCtx.barOptions.colors.backgroundBarColors[t],this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(p),p.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(e){var t,i=e.barWidth,a=e.barXPosition,r=e.y1,s=e.y2,n=e.strokeWidth,o=e.seriesGroup,l=e.realIndex,c=e.i,d=e.j,g=e.w,p=new E(this.barCtx.ctx);(n=Array.isArray(n)?n[l]:n)||(n=0);var f=i,b=a;null!==(t=g.config.series[l].data[d])&&void 0!==t&&t.columnWidthOffset&&(b=a-g.config.series[l].data[d].columnWidthOffset/2,f=i+g.config.series[l].data[d].columnWidthOffset);var m=b,v=b+f;s+=.001;var A=p.move(m,r+=.001),h=p.move(m,r),u=p.line(v-n,r);if(g.globals.previousPaths.length>0&&(h=this.barCtx.getPreviousPath(l,d,!1)),A=A+p.line(m,s)+p.line(v-n,s)+p.line(v-n,r)+("around"===g.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),h=h+p.line(m,r)+u+u+u+u+u+p.line(m,r)+("around"===g.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),this.shouldApplyRadius(l)&&(A=p.roundPathCorners(A,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var x=this.barCtx;g.globals.hasSeriesGroups&&o&&(x=this.barCtx[o]),x.yArrj.push(s),x.yArrjF.push(Math.abs(r-s)),x.yArrjVal.push(this.barCtx.series[c][d])}return{pathTo:A,pathFrom:h}}},{key:"getBarpaths",value:function(e){var t,i=e.barYPosition,a=e.barHeight,r=e.x1,s=e.x2,n=e.strokeWidth,o=e.seriesGroup,l=e.realIndex,c=e.i,d=e.j,g=e.w,p=new E(this.barCtx.ctx);(n=Array.isArray(n)?n[l]:n)||(n=0);var f=i,b=a;null!==(t=g.config.series[l].data[d])&&void 0!==t&&t.barHeightOffset&&(f=i-g.config.series[l].data[d].barHeightOffset/2,b=a+g.config.series[l].data[d].barHeightOffset);var m=f,v=f+b;s+=.001;var A=p.move(r+=.001,m),h=p.move(r,m);g.globals.previousPaths.length>0&&(h=this.barCtx.getPreviousPath(l,d,!1));var u=p.line(r,v-n);if(A=A+p.line(s,m)+p.line(s,v-n)+u+("around"===g.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),h=h+p.line(r,m)+u+u+u+u+u+p.line(r,m)+("around"===g.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),this.shouldApplyRadius(l)&&(A=p.roundPathCorners(A,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var x=this.barCtx;g.globals.hasSeriesGroups&&o&&(x=this.barCtx[o]),x.xArrj.push(s),x.xArrjF.push(Math.abs(r-s)),x.xArrjVal.push(this.barCtx.series[c][d])}return{pathTo:A,pathFrom:h}}},{key:"checkZeroSeries",value:function(e){for(var t=e.series,i=this.w,a=0;a2&&void 0!==arguments[2]&&!arguments[2]?null:t;return null!=e&&(i=t+e/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(e,t,i){var a=arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?null:t;return null!=e&&(a=t-e/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[i]:0)),a}},{key:"getGoalValues",value:function(e,t,i,a,r,s){var n=this,o=this.w,l=[],c=function(p,f){var b;l.push((xe(b={},e,"x"===e?n.getXForValue(p,t,!1):n.getYForValue(p,i,s,!1)),xe(b,"attrs",f),b))};if(o.globals.seriesGoals[a]&&o.globals.seriesGoals[a][r]&&Array.isArray(o.globals.seriesGoals[a][r])&&o.globals.seriesGoals[a][r].forEach(function(p){c(p.value,p)}),this.barCtx.barOptions.isDumbbell&&o.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:o.globals.colors,g={strokeHeight:"x"===e?0:o.globals.markers.size[a],strokeWidth:"x"===e?o.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[a])?d[a][0]:d[a]};c(o.globals.seriesRangeStart[a][r],g),c(o.globals.seriesRangeEnd[a][r],O(O({},g),{},{strokeColor:Array.isArray(d[a])?d[a][1]:d[a]}))}return l}},{key:"drawGoalLine",value:function(e){var t=e.barXPosition,i=e.barYPosition,a=e.goalX,r=e.goalY,s=e.barWidth,n=e.barHeight,o=new E(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var c=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach(function(d){if(d.x>=-1&&d.x<=o.w.globals.gridWidth+1){var g=void 0!==d.attrs.strokeHeight?d.attrs.strokeHeight:n/2,p=i+g+n/2;c=o.drawLine(d.x,p-2*g,d.x,p,d.attrs.strokeColor?d.attrs.strokeColor:void 0,d.attrs.strokeDashArray,d.attrs.strokeWidth?d.attrs.strokeWidth:2,d.attrs.strokeLineCap),l.add(c)}}):Array.isArray(r)&&r.forEach(function(d){if(d.y>=-1&&d.y<=o.w.globals.gridHeight+1){var g=void 0!==d.attrs.strokeWidth?d.attrs.strokeWidth:s/2,p=t+g+s/2;c=o.drawLine(p-2*g,d.y,p,d.y,d.attrs.strokeColor?d.attrs.strokeColor:void 0,d.attrs.strokeDashArray,d.attrs.strokeHeight?d.attrs.strokeHeight:2,d.attrs.strokeLineCap),l.add(c)}}),l}},{key:"drawBarShadow",value:function(e){var t=e.prevPaths,i=e.currPaths,a=e.color,r=this.w,s=t.x,n=t.x1,l=i.x,c=i.x1,d=i.barYPosition,g=t.barYPosition+i.barHeight,p=new E(this.barCtx.ctx),f=new M,b=p.move(n,g)+p.line(s,g)+p.line(l,d)+p.line(c,d)+p.line(n,g)+("around"===r.config.plotOptions.bar.borderRadiusApplication?" Z":" z");return p.drawPath({d:b,fill:f.shadeColor(.5,M.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadows"})}},{key:"getZeroValueEncounters",value:function(e){var t=e.i,i=e.j,r=0,s=0;return this.w.globals.seriesPercent.forEach(function(n,o){n[i]&&r++,othis.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var n=0,o=0;n0&&(this.visibleI=this.visibleI+1);var h=0,u=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[v],this.translationsIndex=v);var x=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var k=this.barHelpers.initialPositions();f=k.y,h=k.barHeight,c=k.yDivision,g=k.zeroW,p=k.x,u=k.barWidth,l=k.xDivision,d=k.zeroH,this.horizontal||m.push(p+u/2);var w=a.group({class:"apexcharts-datalabels","data:realIndex":v});i.globals.delayedElements.push({el:w.node}),w.node.classList.add("apexcharts-element-hidden");var S=a.group({class:"apexcharts-bar-goals-markers"}),L=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:L.node}),L.node.classList.add("apexcharts-element-hidden");for(var C=0;C0){var H=this.barHelpers.drawBarShadow({color:"string"==typeof Y&&-1===Y?.indexOf("url")?Y:M.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});H&&L.add(H)}this.pathArr.push(T);var B=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:h,barWidth:u});B&&S.add(B),f=T.y,p=T.x,C>0&&m.push(p+u/2),b.push(f),this.renderSeries({realIndex:v,pathFill:Y,j:C,i:n,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:z,elSeries:A,x:p,y:f,series:e,barHeight:T.barHeight?T.barHeight:h,barWidth:T.barWidth?T.barWidth:u,elDataLabelsWrap:w,elGoalsMarkers:S,elBarShadows:L,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[v]=m,i.globals.seriesYvalues[v]=b,s.add(A)}return s}},{key:"renderSeries",value:function(e){var G,W,j,t=e.realIndex,i=e.pathFill,a=e.lineFill,r=e.j,s=e.i,n=e.groupIndex,o=e.pathFrom,l=e.pathTo,c=e.strokeWidth,d=e.elSeries,g=e.x,p=e.y,f=e.y1,b=e.y2,m=e.series,v=e.barHeight,A=e.barWidth,h=e.barXPosition,u=e.barYPosition,x=e.elDataLabelsWrap,k=e.elGoalsMarkers,w=e.elBarShadows,S=e.visibleSeries,L=e.type,C=this.w,z=new E(this.ctx);if(!a){var T="function"==typeof C.globals.stroke.colors[t]?(G=t,j=C.config.stroke.colors,Array.isArray(j)&&j.length>0&&((W=j[G])||(W=""),"function"==typeof W)?W({value:C.globals.series[G][r],dataPointIndex:r,w:C}):W):C.globals.stroke.colors[t];a=this.barOptions.distributed?C.globals.stroke.colors[r]:T}C.config.series[s].data[r]&&C.config.series[s].data[r].strokeColor&&(a=C.config.series[s].data[r].strokeColor),this.isNullValue&&(i="none");var Y=z.renderPaths({i:s,j:r,realIndex:t,pathFrom:o,pathTo:l,stroke:a,strokeWidth:c,strokeLineCap:C.config.stroke.lineCap,fill:i,animationDelay:r/C.config.chart.animations.animateGradually.delay*(C.config.chart.animations.speed/C.globals.dataPoints)/2.4,initialSpeed:C.config.chart.animations.speed,dataChangeSpeed:C.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(L,"-area")});Y.attr("clip-path","url(#gridRectMask".concat(C.globals.cuid,")"));var H=C.config.forecastDataPoints;H.count>0&&r>=C.globals.dataPoints-H.count&&(Y.node.setAttribute("stroke-dasharray",H.dashArray),Y.node.setAttribute("stroke-width",H.strokeWidth),Y.node.setAttribute("fill-opacity",H.fillOpacity)),void 0!==f&&void 0!==b&&(Y.attr("data-range-y1",f),Y.attr("data-range-y2",b)),new oe(this.ctx).setSelectionFilter(Y,t,r),d.add(Y);var B=new zt(this).handleBarDataLabels({x:g,y:p,y1:f,y2:b,i:s,j:r,series:m,realIndex:t,groupIndex:n,barHeight:v,barWidth:A,barXPosition:h,barYPosition:u,renderedPath:Y,visibleSeries:S});return null!==B.dataLabels&&x.add(B.dataLabels),B.totalDataLabels&&x.add(B.totalDataLabels),d.add(x),k&&d.add(k),w&&d.add(w),d}},{key:"drawBarPaths",value:function(e){var t,n,i=e.indexes,a=e.barHeight,r=e.strokeWidth,s=e.zeroW,o=e.y,l=e.yDivision,c=e.elSeries,d=this.w,g=i.i,p=i.j;if(d.globals.isXNumeric)t=(o=(d.globals.seriesX[g][p]-d.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var f=0,b=0;d.globals.seriesPercent.forEach(function(v,A){v[p]&&f++,A0&&(a=this.seriesLen*a/f),t=o+a*this.visibleI,t-=a*b}else t=o+a*this.visibleI;this.isFunnel&&(s-=(this.barHelpers.getXForValue(this.series[g][p],s)-s)/2),n=this.barHelpers.getXForValue(this.series[g][p],s);var m=this.barHelpers.getBarpaths({barYPosition:t,barHeight:a,x1:s,x2:n,strokeWidth:r,series:this.series,realIndex:i.realIndex,i:g,j:p,w:d});return d.globals.isXNumeric||(o+=l),this.barHelpers.barBackground({j:p,i:g,y1:t-a*this.visibleI,y2:a*this.seriesLen,elSeries:c}),{pathTo:m.pathTo,pathFrom:m.pathFrom,x1:s,x:n,y:o,goalX:this.barHelpers.getGoalValues("x",s,null,g,p),barYPosition:t,barHeight:a}}},{key:"drawColumnPaths",value:function(e){var t,r,i=e.indexes,a=e.x,s=e.xDivision,n=e.barWidth,o=e.zeroH,l=e.strokeWidth,c=e.elSeries,d=this.w,g=i.realIndex,p=i.translationsIndex,f=i.i,b=i.j,m=i.bc;if(d.globals.isXNumeric){var v=this.getBarXForNumericXAxis({x:a,j:b,realIndex:g,barWidth:n});a=v.x,t=v.barXPosition}else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var A=this.barHelpers.getZeroValueEncounters({i:f,j:b}),h=A.nonZeroColumns;h>0&&(n=this.seriesLen*n/h),t=a+n*this.visibleI,t-=n*A.zeroEncounters}else t=a+n*this.visibleI;r=this.barHelpers.getYForValue(this.series[f][b],o,p);var x=this.barHelpers.getColumnPaths({barXPosition:t,barWidth:n,y1:o,y2:r,strokeWidth:l,series:this.series,realIndex:g,i:f,j:b,w:d});return d.globals.isXNumeric||(a+=s),this.barHelpers.barBackground({bc:m,j:b,i:f,x1:t-l/2-n*this.visibleI,x2:n*this.seriesLen+l/2,elSeries:c}),{pathTo:x.pathTo,pathFrom:x.pathFrom,x:a,y:r,goalY:this.barHelpers.getGoalValues("y",null,o,f,b,p),barXPosition:t,barWidth:n}}},{key:"getBarXForNumericXAxis",value:function(e){var t=e.x,i=e.barWidth,a=e.realIndex,r=e.j,s=this.w,n=a;return s.globals.seriesX[a].length||(n=s.globals.maxValsInArrayIndex),s.globals.seriesX[n][r]&&(t=(s.globals.seriesX[n][r]-s.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:t+i*this.visibleI,x:t}}},{key:"getPreviousPath",value:function(e,t){for(var i,a=this.w,r=0;r0&&parseInt(s.realIndex,10)===parseInt(e,10)&&void 0!==a.globals.previousPaths[r].paths[t]&&(i=a.globals.previousPaths[r].paths[t].d)}return i}}]),y}(),At=function(y){ke(t,Oe);var e=ve(t);function t(){return F(this,t),e.apply(this,arguments)}return D(t,[{key:"draw",value:function(i,a){var r=this,s=this.w;this.graphics=new E(this.ctx),this.bar=new Oe(this.ctx,this.xyRatios);var n=new te(this.ctx,s);i=n.getLogSeries(i),this.yRatio=n.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i),"100%"===s.config.chart.stackType&&(i=s.globals.seriesPercent.slice()),this.series=i,this.barHelpers.initializeStackedPrevVars(this);for(var o=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),l=0,c=0,d=function(f,b){var m=void 0,v=void 0,A=void 0,h=void 0,u=-1;r.groupCtx=r,s.globals.seriesGroups.forEach(function(_,ie){_.indexOf(s.globals.seriesNames[f])>-1&&(u=ie)}),-1!==u&&(r.groupCtx=r[s.globals.seriesGroups[u]]);var x=[],k=[],w=s.globals.comboCharts?a[f]:f,S=0;r.yRatio.length>1&&(r.yaxisIndex=s.globals.seriesYAxisReverseMap[w][0],S=w),r.isReversed=s.config.yaxis[r.yaxisIndex]&&s.config.yaxis[r.yaxisIndex].reversed;var L=r.graphics.group({class:"apexcharts-series",seriesName:M.escapeString(s.globals.seriesNames[w]),rel:f+1,"data:realIndex":w});r.ctx.series.addCollapsedClassToSeries(L,w);var C=r.graphics.group({class:"apexcharts-datalabels","data:realIndex":w}),z=r.graphics.group({class:"apexcharts-bar-goals-markers"}),T=0,I=0,Y=r.initialPositions(l,c,m,v,A,h,S);c=Y.y,v=Y.yDivision,h=Y.zeroW,l=Y.x,I=Y.barWidth,m=Y.xDivision,A=Y.zeroH,s.globals.barHeight=T=Y.barHeight,s.globals.barWidth=I,r.barHelpers.initializeStackedXYVars(r),1===r.groupCtx.prevY.length&&r.groupCtx.prevY[0].every(function(_){return isNaN(_)})&&(r.groupCtx.prevY[0]=r.groupCtx.prevY[0].map(function(_){return A}),r.groupCtx.prevYF[0]=r.groupCtx.prevYF[0].map(function(_){return 0}));for(var H=0;H1?(r=g.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:d*parseInt(g.config.plotOptions.bar.columnWidth,10)/100,-1===String(g.config.plotOptions.bar.columnWidth).indexOf("%")&&(d=parseInt(g.config.plotOptions.bar.columnWidth,10)),n=g.globals.gridHeight-this.baseLineY[l]-(this.isReversed?g.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[l]:0),i=g.globals.padHorizontal+(r-d)/2);var p=g.globals.barGroups.length?g.globals.barGroups.length:1;return{x:i,y:a,yDivision:s,xDivision:r,barHeight:c/p,barWidth:d/p,zeroH:n,zeroW:o}}},{key:"drawStackedBarPaths",value:function(i){for(var a,l,r=i.indexes,s=i.barHeight,n=i.strokeWidth,o=i.zeroW,c=i.y,d=i.groupIndex,g=i.seriesGroup,p=i.yDivision,f=i.elSeries,b=this.w,m=c+(-1!==d?d*s:0),v=r.i,A=r.j,h=r.translationsIndex,u=0,x=0;x0){var w=o;this.groupCtx.prevXVal[k-1][A]<0?w=this.series[v][A]>=0?this.groupCtx.prevX[k-1][A]+u-2*(this.isReversed?u:0):this.groupCtx.prevX[k-1][A]:this.groupCtx.prevXVal[k-1][A]>=0&&(w=this.series[v][A]>=0?this.groupCtx.prevX[k-1][A]:this.groupCtx.prevX[k-1][A]-u+2*(this.isReversed?u:0)),a=w}else a=o;var S=this.barHelpers.getBarpaths({barYPosition:m,barHeight:s,x1:a,x2:l=null===this.series[v][A]?a:a+this.series[v][A]/this.invertedYRatio-2*(this.isReversed?this.series[v][A]/this.invertedYRatio:0),strokeWidth:n,series:this.series,realIndex:r.realIndex,seriesGroup:g,i:v,j:A,w:b});return this.barHelpers.barBackground({j:A,i:v,y1:m,y2:s,elSeries:f}),c+=p,{pathTo:S.pathTo,pathFrom:S.pathFrom,goalX:this.barHelpers.getGoalValues("x",o,null,v,A,h),barYPosition:m,x:l,y:c}}},{key:"drawStackedColumnPaths",value:function(i){var s,a=i.indexes,r=i.x,n=i.xDivision,o=i.barWidth,l=i.zeroH,c=i.groupIndex,d=i.seriesGroup,g=i.elSeries,p=this.w,f=a.i,b=a.j,m=a.bc,v=a.translationsIndex;if(p.globals.isXNumeric){var A=p.globals.seriesX[f][b];A||(A=0),r=(A-p.globals.minX)/this.xRatio-o/2,p.globals.barGroups.length&&(r=(A-p.globals.minX)/this.xRatio-o/2*p.globals.barGroups.length)}for(var h,u=r+(-1!==c?c*o:0),x=0,k=0;k0&&!p.globals.isXNumeric||w>0&&p.globals.isXNumeric&&p.globals.seriesX[f-1][b]===p.globals.seriesX[f][b]){var S,L,C,z=Math.min(this.yRatio.length+1,f+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var T=1;T=0?C-x+2*(this.isReversed?x:0):C;break}if((null===(B=this.groupCtx.prevYVal[w-Y])||void 0===B?void 0:B[b])>=0){L=this.series[f][b]>=0?C:C+x-2*(this.isReversed?x:0);break}}void 0===L&&(L=p.globals.gridHeight),h=null!==(S=this.groupCtx.prevYF[0])&&void 0!==S&&S.every(function(W){return 0===W})&&this.groupCtx.prevYF.slice(1,w).every(function(W){return W.every(function(j){return isNaN(j)})})?l:L}else h=l;var G=this.barHelpers.getColumnPaths({barXPosition:u,barWidth:o,y1:h,y2:s=this.series[f][b]?h-this.series[f][b]/this.yRatio[v]+2*(this.isReversed?this.series[f][b]/this.yRatio[v]:0):h,yRatio:this.yRatio[v],strokeWidth:this.strokeWidth,series:this.series,seriesGroup:d,realIndex:a.realIndex,i:f,j:b,w:p});return this.barHelpers.barBackground({bc:m,j:b,i:f,x1:u,x2:o,elSeries:g}),r+=n,{pathTo:G.pathTo,pathFrom:G.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,l,f,b),barXPosition:u,x:p.globals.isXNumeric?r-n:r,y:s}}}]),t}(),ft=function(y){ke(t,Oe);var e=ve(t);function t(){return F(this,t),e.apply(this,arguments)}return D(t,[{key:"draw",value:function(i,a,r){var s=this,n=this.w,o=new E(this.ctx),l=n.globals.comboCharts?a:n.config.chart.type,c=new ue(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=n.config.plotOptions.bar.horizontal;var d=new te(this.ctx,n);i=d.getLogSeries(i),this.series=i,this.yRatio=d.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i);for(var g=o.group({class:"apexcharts-".concat(l,"-series apexcharts-plot-series")}),p=function(b){s.isBoxPlot="boxPlot"===n.config.chart.type||"boxPlot"===n.config.series[b].type;var m,v,A,h,u=void 0,x=void 0,k=[],w=[],S=n.globals.comboCharts?r[b]:b,L=o.group({class:"apexcharts-series",seriesName:M.escapeString(n.globals.seriesNames[S]),rel:b+1,"data:realIndex":S});s.ctx.series.addCollapsedClassToSeries(L,S),i[b].length>0&&(s.visibleI=s.visibleI+1);var C,z,T=0;s.yRatio.length>1&&(s.yaxisIndex=n.globals.seriesYAxisReverseMap[S][0],T=S);var I=s.barHelpers.initialPositions();x=I.y,C=I.barHeight,v=I.yDivision,h=I.zeroW,m=I.xDivision,A=I.zeroH,w.push((u=I.x)+(z=I.barWidth)/2);for(var Y=o.group({class:"apexcharts-datalabels","data:realIndex":S}),H=function(G){var W=s.barHelpers.getStrokeWidth(b,G,S),j=null,Z={indexes:{i:b,j:G,realIndex:S,translationsIndex:T},x:u,y:x,strokeWidth:W,elSeries:L};j=s.isHorizontal?s.drawHorizontalBoxPaths(O(O({},Z),{},{yDivision:v,barHeight:C,zeroW:h})):s.drawVerticalBoxPaths(O(O({},Z),{},{xDivision:m,barWidth:z,zeroH:A})),x=j.y,u=j.x,G>0&&w.push(u+z/2),k.push(x),j.pathTo.forEach(function(_,ie){var re=!s.isBoxPlot&&s.candlestickOptions.wick.useFillColor?j.color[ie]:n.globals.stroke.colors[b],K=c.fillPath({seriesNumber:S,dataPointIndex:G,color:j.color[ie],value:i[b][G]});s.renderSeries({realIndex:S,pathFill:K,lineFill:re,j:G,i:b,pathFrom:j.pathFrom,pathTo:_,strokeWidth:W,elSeries:L,x:u,y:x,series:i,barHeight:C,barWidth:z,elDataLabelsWrap:Y,visibleSeries:s.visibleI,type:n.config.chart.type})})},B=0;Bu.c&&(f=!1);var w=Math.min(u.o,u.c),S=Math.max(u.o,u.c),L=u.m;c.globals.isXNumeric&&(r=(c.globals.seriesX[h][p]-c.globals.minX)/this.xRatio-n/2);var C=r+n*this.visibleI;null==this.series[g][p]?(w=o,S=o):(w=o-w/A,S=o-S/A,x=o-u.h/A,k=o-u.l/A,L=o-u.m/A);var z=d.move(C,o),T=d.move(C+n/2,w);return c.globals.previousPaths.length>0&&(T=this.getPreviousPath(h,p,!0)),z=this.isBoxPlot?[d.move(C,w)+d.line(C+n/2,w)+d.line(C+n/2,x)+d.line(C+n/4,x)+d.line(C+n-n/4,x)+d.line(C+n/2,x)+d.line(C+n/2,w)+d.line(C+n,w)+d.line(C+n,L)+d.line(C,L)+d.line(C,w+l/2),d.move(C,L)+d.line(C+n,L)+d.line(C+n,S)+d.line(C+n/2,S)+d.line(C+n/2,k)+d.line(C+n-n/4,k)+d.line(C+n/4,k)+d.line(C+n/2,k)+d.line(C+n/2,S)+d.line(C,S)+d.line(C,L)+"z"]:[d.move(C,S)+d.line(C+n/2,S)+d.line(C+n/2,x)+d.line(C+n/2,S)+d.line(C+n,S)+d.line(C+n,w)+d.line(C+n/2,w)+d.line(C+n/2,k)+d.line(C+n/2,w)+d.line(C,w)+d.line(C,S-l/2)],T+=d.move(C,w),c.globals.isXNumeric||(r+=s),{pathTo:z,pathFrom:T,x:r,y:S,barXPosition:C,color:this.isBoxPlot?v:f?[b]:[m]}}},{key:"drawHorizontalBoxPaths",value:function(i){var a=i.indexes,r=i.y,s=i.yDivision,n=i.barHeight,o=i.zeroW,l=i.strokeWidth,c=this.w,d=new E(this.ctx),g=a.i,p=a.j,f=this.boxOptions.colors.lower;this.isBoxPlot&&(f=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var b=this.invertedYRatio,m=a.realIndex,v=this.getOHLCValue(m,p),A=o,h=o,u=Math.min(v.o,v.c),x=Math.max(v.o,v.c),k=v.m;c.globals.isXNumeric&&(r=(c.globals.seriesX[m][p]-c.globals.minX)/this.invertedXRatio-n/2);var w=r+n*this.visibleI;null==this.series[g][p]?(u=o,x=o):(u=o+u/b,x=o+x/b,A=o+v.h/b,h=o+v.l/b,k=o+v.m/b);var S=d.move(o,w),L=d.move(u,w+n/2);return c.globals.previousPaths.length>0&&(L=this.getPreviousPath(m,p,!0)),S=[d.move(u,w)+d.line(u,w+n/2)+d.line(A,w+n/2)+d.line(A,w+n/2-n/4)+d.line(A,w+n/2+n/4)+d.line(A,w+n/2)+d.line(u,w+n/2)+d.line(u,w+n)+d.line(k,w+n)+d.line(k,w)+d.line(u+l/2,w),d.move(k,w)+d.line(k,w+n)+d.line(x,w+n)+d.line(x,w+n/2)+d.line(h,w+n/2)+d.line(h,w+n-n/4)+d.line(h,w+n/4)+d.line(h,w+n/2)+d.line(x,w+n/2)+d.line(x,w)+d.line(k,w)+"z"],L+=d.move(u,w),c.globals.isXNumeric||(r+=s),{pathTo:S,pathFrom:L,x,y:r,barYPosition:w,color:f}}},{key:"getOHLCValue",value:function(i,a){var r=this.w;return{o:this.isBoxPlot?r.globals.seriesCandleH[i][a]:r.globals.seriesCandleO[i][a],h:this.isBoxPlot?r.globals.seriesCandleO[i][a]:r.globals.seriesCandleH[i][a],m:r.globals.seriesCandleM[i][a],l:this.isBoxPlot?r.globals.seriesCandleC[i][a]:r.globals.seriesCandleL[i][a],c:this.isBoxPlot?r.globals.seriesCandleL[i][a]:r.globals.seriesCandleC[i][a]}}}]),t}(),kt=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"checkColorRange",value:function(){var e=this.w,t=!1,i=e.config.plotOptions[e.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map(function(a,r){a.from<=0&&(t=!0)}),t}},{key:"getShadeColor",value:function(e,t,i,a){var r=this.w,s=1,n=r.config.plotOptions[e].shadeIntensity,o=this.determineColor(e,t,i);r.globals.hasNegs||a?s=r.config.plotOptions[e].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*n):1.25*n*(1-o.percent/100):o.percent<=0?1-(1+o.percent/100)*n:(1-o.percent/100)*n:(s=1-o.percent/100,"treemap"===e&&(s=1.25*n*(1-o.percent/100)));var l=o.color,c=new M;return r.config.plotOptions[e].enableShades&&(l=M.hexToRgba(c.shadeColor("dark"===this.w.config.theme.mode?-1*s:s,o.color),r.config.fill.opacity)),{color:l,colorProps:o}}},{key:"determineColor",value:function(e,t,i){var a=this.w,r=a.globals.series[t][i],s=a.config.plotOptions[e],n=s.colorScale.inverse?i:t;s.distributed&&"treemap"===a.config.chart.type&&(n=i);var o=a.globals.colors[n],l=null,c=Math.min.apply(Math,ne(a.globals.series[t])),d=Math.max.apply(Math,ne(a.globals.series[t]));s.distributed||"heatmap"!==e||(c=a.globals.minY,d=a.globals.maxY),void 0!==s.colorScale.min&&(c=s.colorScale.mina.globals.maxY?s.colorScale.max:a.globals.maxY);var g=Math.abs(d)+Math.abs(c),p=100*r/(0===g?g-1e-6:g);return s.colorScale.ranges.length>0&&s.colorScale.ranges.map(function(f,b){if(r>=f.from&&r<=f.to){o=f.color,l=f.foreColor?f.foreColor:null,c=f.from,d=f.to;var m=Math.abs(d)+Math.abs(c);p=100*r/(0===m?m-1e-6:m)}}),{color:o,foreColor:l,percent:p}}},{key:"calculateDataLabels",value:function(e){var t=e.text,i=e.x,a=e.y,r=e.i,s=e.j,n=e.colorProps,o=e.fontSize,l=this.w.config.dataLabels,c=new E(this.ctx),d=new Ae(this.ctx),g=null;if(l.enabled){g=c.group({class:"apexcharts-data-labels"});var f=l.offsetY,b=i+l.offsetX,m=a+parseFloat(l.style.fontSize)/3+f;d.plotDataLabelsText({x:b,y:m,text:t,i:r,j:s,color:n.foreColor,parent:g,fontSize:o,dataLabelsConfig:l})}return g}},{key:"addListeners",value:function(e){var t=new E(this.ctx);e.node.addEventListener("mouseenter",t.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",t.pathMouseLeave.bind(this,e)),e.node.addEventListener("mousedown",t.pathMouseDown.bind(this,e))}}]),y}(),Yt=function(){function y(e,t){F(this,y),this.ctx=e,this.w=e.w,this.xRatio=t.xRatio,this.yRatio=t.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new kt(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return D(y,[{key:"draw",value:function(e){var t=this.w,i=new E(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(t.globals.cuid,")"));var r=t.globals.gridWidth/t.globals.dataPoints,s=t.globals.gridHeight/t.globals.series.length,n=0,o=!1;this.negRange=this.helpers.checkColorRange();var l=e.slice();t.config.yaxis[0].reversed&&(o=!0,l.reverse());for(var c=o?0:l.length-1;o?c=0;o?c++:c--){var d=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:M.escapeString(t.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(d,c),t.config.chart.dropShadow.enabled){var g=t.config.chart.dropShadow;new oe(this.ctx).dropShadow(d,g,c)}for(var p=0,f=t.config.plotOptions.heatmap.shadeIntensity,b=0;b-1&&this.pieClicked(g),i.config.dataLabels.enabled){var x=h.x,k=h.y,w=100*f/this.fullAngle+"%";if(0!==f&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?t.endAngle=t.endAngle-(a+n):a+n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(c=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(c)>this.fullAngle&&(c-=this.fullAngle);var d=Math.PI*(c-90)/180,g=i.centerX+s*Math.cos(l),p=i.centerY+s*Math.sin(l),f=i.centerX+s*Math.cos(d),b=i.centerY+s*Math.sin(d),m=M.polarToCartesian(i.centerX,i.centerY,i.donutSize,c),v=M.polarToCartesian(i.centerX,i.centerY,i.donutSize,o),A=r>180?1:0,h=["M",g,p,"A",s,s,0,A,1,f,b];return t="donut"===i.chartType?[].concat(h,["L",m.x,m.y,"A",i.donutSize,i.donutSize,0,A,0,v.x,v.y,"L",g,p,"z"]).join(" "):"pie"===i.chartType||"polarArea"===i.chartType?[].concat(h,["L",i.centerX,i.centerY,"L",g,p]).join(" "):[].concat(h).join(" "),n.roundPathCorners(t,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(e){var t=this.w,i=new it(this.ctx),a=new E(this.ctx),r=new St(this.ctx),s=a.group(),n=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),0),l=o.result.reverse(),c=o.result.length;this.maxY=o.niceMax;for(var d=t.globals.radialSize,g=d/(c-1),p=0;p1&&e.total.show&&(r=e.total.color);var n=s.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=s.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,e.value.formatter)(i,s),a||"function"!=typeof e.total.formatter||(i=e.total.formatter(s)),t=e.name.formatter(t,t===e.total.label,s),null!==n&&(n.textContent=t),null!==o&&(o.textContent=i),null!==n&&(n.style.fill=r)}},{key:"printDataLabelsInner",value:function(e,t){var i=this.w,a=e.getAttribute("data:value"),r=i.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(t,r,a,e);var s=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==s&&(s.style.opacity=1)}},{key:"drawSpokes",value:function(e){var t=this,i=this.w,a=new E(this.ctx),r=i.config.plotOptions.polarArea.spokes;if(0!==r.strokeWidth){for(var s=[],n=360/i.globals.series.length,o=0;o1)n&&!t.total.showAlways?l({makeSliceOut:!1,printLabel:!0}):this.printInnerLabels(t,t.total.label,t.total.formatter(r));else if(l({makeSliceOut:!1,printLabel:!0}),!n)if(r.globals.selectedDataPoints.length&&r.globals.series.length>1)if(r.globals.selectedDataPoints[0].length>0){var c=r.globals.selectedDataPoints[0],d=r.globals.dom.baseEl.querySelector(".apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(c));this.printDataLabelsInner(d,t)}else s&&r.globals.selectedDataPoints.length&&0===r.globals.selectedDataPoints[0].length&&(s.style.opacity=0);else s&&r.globals.series.length>1&&(s.style.opacity=0)}}]),y}(),Rt=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var t=this.w;this.graphics=new E(this.ctx),this.lineColorArr=void 0!==t.globals.stroke.colors?t.globals.stroke.colors:t.globals.colors,this.defaultSize=t.globals.svgHeight0&&(k=t.getPreviousPath(v));for(var w=0;w=10?e.x>0?(i="start",a+=10):e.x<0&&(i="end",a-=10):i="middle",Math.abs(e.y)>=t-10&&(e.y<0?r-=10:e.y>0&&(r+=10)),{textAnchor:i,newX:a,newY:r}}},{key:"getPreviousPath",value:function(e){for(var t=this.w,i=null,a=0;a0&&parseInt(r.realIndex,10)===parseInt(e,10)&&void 0!==t.globals.previousPaths[a].paths[0]&&(i=t.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;e=e||[],t=t||[];for(var a=[],r=0;r=360&&(b=360-Math.abs(this.startAngle)-.1);var m=r.drawPath({d:"",stroke:p,strokeWidth:l*parseInt(g.strokeWidth,10)/100,fill:"none",strokeOpacity:g.opacity,classes:"apexcharts-radialbar-area"});g.dropShadow.enabled&&n.dropShadow(m,g.dropShadow),d.add(m),m.attr("id","apexcharts-radialbarTrack-"+c),this.animatePaths(m,{centerX:i.centerX,centerY:i.centerY,endAngle:b,startAngle:f,size:i.size,i:c,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:a.globals.easing})}return s}},{key:"drawArcs",value:function(i){var a=this.w,r=new E(this.ctx),s=new ue(this.ctx),n=new oe(this.ctx),o=r.group(),l=this.getStrokeWidth(i);i.size=i.size-l/2;var c=a.config.plotOptions.radialBar.hollow.background,d=i.size-l*i.series.length-this.margin*i.series.length-l*parseInt(a.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,g=d-a.config.plotOptions.radialBar.hollow.margin;void 0!==a.config.plotOptions.radialBar.hollow.image&&(c=this.drawHollowImage(i,o,d,c));var p=this.drawHollow({size:g,centerX:i.centerX,centerY:i.centerY,fill:c||"transparent"});a.config.plotOptions.radialBar.hollow.dropShadow.enabled&&n.dropShadow(p,a.config.plotOptions.radialBar.hollow.dropShadow);var b=1;!this.radialDataLabels.total.show&&a.globals.series.length>1&&(b=0);var m=null;this.radialDataLabels.show&&(m=this.renderInnerDataLabels(this.radialDataLabels,{hollowSize:d,centerX:i.centerX,centerY:i.centerY,opacity:b})),"back"===a.config.plotOptions.radialBar.hollow.position&&(o.add(p),m&&o.add(m));var v=!1;a.config.plotOptions.radialBar.inverseOrder&&(v=!0);for(var A=v?i.series.length-1:0;v?A>=0:A100?100:i.series[A])/100,S=Math.round(this.totalAngle*w)+this.startAngle,L=void 0;a.globals.dataChanged&&(k=this.startAngle,L=Math.round(this.totalAngle*M.negToZero(a.globals.previousPaths[A])/100)+k),Math.abs(S)+Math.abs(x)>=360&&(S-=.01),Math.abs(L)+Math.abs(k)>=360&&(L-=.01);var C=S-x,z=Array.isArray(a.config.stroke.dashArray)?a.config.stroke.dashArray[A]:a.config.stroke.dashArray,T=r.drawPath({d:"",stroke:u,strokeWidth:l,fill:"none",fillOpacity:a.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+A,strokeDashArray:z});if(E.setAttrs(T.node,{"data:angle":C,"data:value":i.series[A]}),a.config.chart.dropShadow.enabled&&n.dropShadow(T,a.config.chart.dropShadow,A),n.setSelectionFilter(T,0,A),this.addListeners(T,this.radialDataLabels),h.add(T),T.attr({index:0,j:A}),this.barLabels.enabled){var Y=M.polarToCartesian(i.centerX,i.centerY,i.size,x),H=this.barLabels.formatter(a.globals.seriesNames[A],{seriesIndex:A,w:a}),B=["apexcharts-radialbar-label"];this.barLabels.onClick||B.push("apexcharts-no-click");var G=this.barLabels.useSeriesColors?a.globals.colors[A]:a.config.chart.foreColor;G||(G=a.config.chart.foreColor);var W=Y.x-this.barLabels.margin,j=Y.y,Z=r.drawText({x:W,y:j,text:H,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:G,cssClass:B.join(" ")});Z.on("click",this.onBarLabelClick),Z.attr({rel:A+1}),0!==x&&Z.attr({"transform-origin":"".concat(W," ").concat(j),transform:"rotate(".concat(x," 0 0)")}),h.add(Z)}var _=0;!this.initialAnim||a.globals.resized||a.globals.dataChanged||(_=a.config.chart.animations.speed),a.globals.dataChanged&&(_=a.config.chart.animations.dynamicAnimation.speed),this.animDur=_/(1.2*i.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(T,{centerX:i.centerX,centerY:i.centerY,endAngle:S,startAngle:x,prevEndAngle:L,prevStartAngle:k,size:i.size,i:A,totalItems:2,animBeginArr:this.animBeginArr,dur:_,shouldSetPrevPaths:!0,easing:a.globals.easing})}return{g:o,elHollow:p,dataLabels:m}}},{key:"drawHollow",value:function(i){var a=new E(this.ctx).drawCircle(2*i.size);return a.attr({class:"apexcharts-radialbar-hollow",cx:i.centerX,cy:i.centerY,r:i.size,fill:i.fill}),a}},{key:"drawHollowImage",value:function(i,a,r,s){var n=this.w,o=new ue(this.ctx),l=M.randomId(),c=n.config.plotOptions.radialBar.hollow.image;if(n.config.plotOptions.radialBar.hollow.imageClipped)o.clippedImgArea({width:r,height:r,image:c,patternID:"pattern".concat(n.globals.cuid).concat(l)}),s="url(#pattern".concat(n.globals.cuid).concat(l,")");else{var d=n.config.plotOptions.radialBar.hollow.imageWidth,g=n.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===d&&void 0===g){var p=n.globals.dom.Paper.image(c).loaded(function(b){this.move(i.centerX-b.width/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-b.height/2+n.config.plotOptions.radialBar.hollow.imageOffsetY)});a.add(p)}else{var f=n.globals.dom.Paper.image(c).loaded(function(b){this.move(i.centerX-d/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-g/2+n.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(d,g)});a.add(f)}}return s}},{key:"getStrokeWidth",value:function(i){return i.size*(100-parseInt(this.w.config.plotOptions.radialBar.hollow.size,10))/100/(i.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(i){var a=parseInt(i.target.getAttribute("rel"),10)-1,r=this.barLabels.onClick,s=this.w;r&&r(s.globals.seriesNames[a],{w:s,seriesIndex:a})}}]),t}(),Ft=function(y){ke(t,Oe);var e=ve(t);function t(){return F(this,t),e.apply(this,arguments)}return D(t,[{key:"draw",value:function(i,a){var r=this.w,s=new E(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=i,this.seriesRangeStart=r.globals.seriesRangeStart,this.seriesRangeEnd=r.globals.seriesRangeEnd,this.barHelpers.initVariables(i);for(var n=s.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),o=0;o0&&(this.visibleI=this.visibleI+1);var v=0,A=0,h=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[b][0],h=b);var u=this.barHelpers.initialPositions();f=u.y,g=u.zeroW,p=u.x,A=u.barWidth,v=u.barHeight,l=u.xDivision,c=u.yDivision,d=u.zeroH;for(var x=s.group({class:"apexcharts-datalabels","data:realIndex":b}),k=s.group({class:"apexcharts-rangebar-goals-markers"}),w=0;w0});return this.isHorizontal?(s=b.config.plotOptions.bar.rangeBarGroupRows?o+g*u:o+c*this.visibleI+g*u,x>-1&&!b.config.plotOptions.bar.rangeBarOverlap&&(m=b.globals.seriesRange[a][x].overlaps).indexOf(v)>-1&&(s=(c=f.barHeight/m.length)*this.visibleI+g*(100-parseInt(this.barOptions.barHeight,10))/100/2+c*(this.visibleI+m.indexOf(v))+g*u)):(u>-1&&(n=b.config.plotOptions.bar.rangeBarGroupRows?l+p*u:l+d*this.visibleI+p*u),x>-1&&!b.config.plotOptions.bar.rangeBarOverlap&&(m=b.globals.seriesRange[a][x].overlaps).indexOf(v)>-1&&(n=(d=f.barWidth/m.length)*this.visibleI+p*(100-parseInt(this.barOptions.barWidth,10))/100/2+d*(this.visibleI+m.indexOf(v))+p*u)),{barYPosition:s,barXPosition:n,barHeight:c,barWidth:d}}},{key:"drawRangeColumnPaths",value:function(i){var a=i.indexes,r=i.x,s=i.xDivision,n=i.barWidth,o=i.barXPosition,l=i.zeroH,c=this.w,d=a.i,g=a.j,p=this.yRatio[a.translationsIndex],f=a.realIndex,b=this.getRangeValue(f,g),m=Math.min(b.start,b.end),v=Math.max(b.start,b.end);null==this.series[d][g]?m=l:(m=l-m/p,v=l-v/p);var A=Math.abs(v-m),h=this.barHelpers.getColumnPaths({barXPosition:o,barWidth:n,y1:m,y2:v,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:a.realIndex,i:f,j:g,w:c});if(c.globals.isXNumeric){var u=this.getBarXForNumericXAxis({x:r,j:g,realIndex:f,barWidth:n});r=u.x,o=u.barXPosition}else r+=s;return{pathTo:h.pathTo,pathFrom:h.pathFrom,barHeight:A,x:r,y:v,goalY:this.barHelpers.getGoalValues("y",null,l,d,g,a.translationsIndex),barXPosition:o}}},{key:"drawRangeBarPaths",value:function(i){var a=i.indexes,r=i.y,o=i.yDivision,l=i.barHeight,c=i.barYPosition,d=i.zeroW,g=this.w,p=d+i.y1/this.invertedYRatio,f=d+i.y2/this.invertedYRatio,b=Math.abs(f-p),m=this.barHelpers.getBarpaths({barYPosition:c,barHeight:l,x1:p,x2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:a.realIndex,realIndex:a.realIndex,j:a.j,w:g});return g.globals.isXNumeric||(r+=o),{pathTo:m.pathTo,pathFrom:m.pathFrom,barWidth:b,x:f,goalX:this.barHelpers.getGoalValues("x",d,null,a.realIndex,a.j),y:r}}},{key:"getRangeValue",value:function(i,a){var r=this.w;return{start:r.globals.seriesRangeStart[i][a],end:r.globals.seriesRangeEnd[i][a]}}}]),t}(),Dt=function(){function y(e){F(this,y),this.w=e.w,this.lineCtx=e}return D(y,[{key:"sameValueSeriesFix",value:function(e,t){var i=this.w;if(("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[e])&&new te(this.lineCtx.ctx,i).seriesHaveSameValues(e)){var a=t[e].slice();a[a.length-1]=a[a.length-1]+1e-6,t[e]=a}return t}},{key:"calculatePoints",value:function(e){var t=e.series,a=e.x,r=e.y,s=e.i,n=e.j,o=e.prevY,l=this.w,c=[],d=[];if(0===n){var g=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(g=(l.globals.seriesX[e.realIndex][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),c.push(g),d.push(M.isNumber(t[s][0])?o+l.config.markers.offsetY:null),c.push(a+l.config.markers.offsetX),d.push(M.isNumber(t[s][n+1])?r+l.config.markers.offsetY:null)}else c.push(a+l.config.markers.offsetX),d.push(M.isNumber(t[s][n+1])?r+l.config.markers.offsetY:null);return{x:c,y:d}}},{key:"checkPreviousPaths",value:function(e){for(var t=e.pathFromLine,i=e.pathFromArea,a=e.realIndex,r=this.w,s=0;s0&&parseInt(n.realIndex,10)===parseInt(a,10)&&("line"===n.type?(this.lineCtx.appendPathFrom=!1,t=r.globals.previousPaths[s].paths[0].d):"area"===n.type&&(this.lineCtx.appendPathFrom=!1,i=r.globals.previousPaths[s].paths[0].d,r.config.stroke.show&&r.globals.previousPaths[s].paths[1]&&(t=r.globals.previousPaths[s].paths[1].d)))}return{pathFromLine:t,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(e){var t,i,a,r=e.i,s=e.realIndex,n=e.series,o=e.prevY,l=e.lineYPosition,c=e.translationsIndex,d=this.w,g=d.config.chart.stacked&&!d.globals.comboCharts||d.config.chart.stacked&&d.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(t=this.w.config.series[s])||void 0===t?void 0:t.type)||"column"===(null===(i=this.w.config.series[s])||void 0===i?void 0:i.type));if(void 0!==(null===(a=n[r])||void 0===a?void 0:a[0]))o=(l=g&&r>0?this.lineCtx.prevSeriesY[r-1][0]:this.lineCtx.zeroY)-n[r][0]/this.lineCtx.yRatio[c]+2*(this.lineCtx.isReversed?n[r][0]/this.lineCtx.yRatio[c]:0);else if(g&&r>0&&void 0===n[r][0])for(var p=r-1;p>=0;p--)if(null!=n[p][0]){o=l=this.lineCtx.prevSeriesY[p][0];break}return{prevY:o,lineYPosition:l}}}]),y}(),Bt=function(y,e,t){var i=y.slice(e,t);if(e){if(t-e>1&&i[1].length<6){var a=i[0].length;i[1]=[2*i[0][a-2]-i[0][a-4],2*i[0][a-1]-i[0][a-3]].concat(i[1])}i[0]=i[0].slice(-2)}return i};function xt(y,e){return(e[1]-y[1])/(e[0]-y[0])}var bt=function(){function y(e,t,i){F(this,y),this.ctx=e,this.w=e.w,this.xyRatios=t,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||i,this.scatter=new Ke(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Dt(this),this.markers=new Me(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return D(y,[{key:"draw",value:function(e,t,i,a){var r,s=this.w,n=new E(this.ctx),o=s.globals.comboCharts?t:s.config.chart.type,l=n.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),c=new te(this.ctx,s);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=c.getLogSeries(e),this.yRatio=c.getLogYRatios(this.yRatio);for(var d=[],g=0;g1?p:0;this._initSerieVariables(e,g,p);var b=[],m=[],v=[],A=s.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,p),s.globals.isXNumeric&&s.globals.seriesX.length>0&&(A=(s.globals.seriesX[p][0]-s.globals.minX)/this.xRatio),v.push(A);var h,u=A,x=void 0,k=u,w=this.zeroY,S=this.zeroY;w=this.lineHelpers.determineFirstPrevY({i:g,realIndex:p,series:e,prevY:w,lineYPosition:0,translationsIndex:f}).prevY,b.push("monotoneCubic"===s.config.stroke.curve&&null===e[g][0]?null:w),h=w,"rangeArea"===o&&(x=S=this.lineHelpers.determineFirstPrevY({i:g,realIndex:p,series:a,prevY:S,lineYPosition:0,translationsIndex:f}).prevY,m.push(null!==b[0]?S:null));var L=this._calculatePathsFrom({type:o,series:e,i:g,realIndex:p,translationsIndex:f,prevX:k,prevY:w,prevY2:S}),C=[b[0]],z=[m[0]],T={type:o,series:e,realIndex:p,translationsIndex:f,i:g,x:A,y:1,pX:u,pY:h,pathsFrom:L,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:v,yArrj:b,y2Arrj:m,seriesRangeEnd:a},I=this._iterateOverDataPoints(O(O({},T),{},{iterations:"rangeArea"===o?e[g].length-1:void 0,isRangeStart:!0}));if("rangeArea"===o){for(var Y=this._calculatePathsFrom({series:a,i:g,realIndex:p,prevX:k,prevY:S}),H=this._iterateOverDataPoints(O(O({},T),{},{series:a,xArrj:[A],yArrj:C,y2Arrj:z,pY:x,areaPaths:I.areaPaths,pathsFrom:Y,iterations:a[g].length-1,isRangeStart:!1})),B=I.linePaths.length/2,G=0;G0;W--)l.add(d[W-1]);else for(var j=0;j1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],s=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[s]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[s]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=r.group({class:"apexcharts-series",zIndex:void 0!==a.config.series[i].zIndex?a.config.series[i].zIndex:i,seriesName:M.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=r.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=r.group({class:"apexcharts-datalabels","data:realIndex":i}),this.elSeries.attr({"data:longestSeries":e[t].length===a.globals.dataPoints,rel:t+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var t,i,a,r,s=e.type,n=e.series,o=e.i,l=e.realIndex,c=e.translationsIndex,d=e.prevX,g=e.prevY,p=e.prevY2,f=this.w,b=new E(this.ctx);if(null===n[o][0]){for(var m=0;m0){var v=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:r,realIndex:l});a=v.pathFromLine,r=v.pathFromArea}return{prevX:d,prevY:g,linePath:t,areaPath:i,pathFromLine:a,pathFromArea:r}}},{key:"_handlePaths",value:function(e){var t=e.type,i=e.realIndex,a=e.i,r=e.paths,s=this.w,n=new E(this.ctx),o=new ue(this.ctx);this.prevSeriesY.push(r.yArrj),s.globals.seriesXvalues[i]=r.xArrj,s.globals.seriesYvalues[i]=r.yArrj;var l=s.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==t){var c=s.globals.seriesXvalues[i][s.globals.seriesXvalues[i].length-l.count-1],d=n.drawRect(c,0,s.globals.gridWidth,s.globals.gridHeight,0);s.globals.dom.elForecastMask.appendChild(d.node);var g=n.drawRect(0,0,c,s.globals.gridHeight,0);s.globals.dom.elNonForecastMask.appendChild(g.node)}this.pointsChart||s.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var p={i:a,realIndex:i,animationDelay:a,initialSpeed:s.config.chart.animations.speed,dataChangeSpeed:s.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(t)};if("area"===t)for(var f=o.fillPath({seriesNumber:i}),b=0;b0&&"rangeArea"!==t){var w=n.renderPaths(x);w.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&w.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(w),w.attr("clip-path","url(#forecastMask".concat(s.globals.cuid,")")),k.attr("clip-path","url(#nonForecastMask".concat(s.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(e){var t,i,a=this,r=e.type,s=e.series,n=e.iterations,o=e.realIndex,l=e.translationsIndex,c=e.i,d=e.x,g=e.y,p=e.pX,f=e.pY,b=e.pathsFrom,m=e.linePaths,v=e.areaPaths,A=e.seriesIndex,h=e.lineYPosition,u=e.xArrj,x=e.yArrj,k=e.y2Arrj,w=e.isRangeStart,S=e.seriesRangeEnd,L=this.w,C=new E(this.ctx),z=this.yRatio,T=b.prevY,I=b.linePath,Y=b.areaPath,H=b.pathFromLine,B=b.pathFromArea,G=M.isNumber(L.globals.minYArr[o])?L.globals.minYArr[o]:L.globals.minY;n||(n=L.globals.dataPoints>1?L.globals.dataPoints-1:L.globals.dataPoints);var W=function(he,pe){return pe-he/z[l]+2*(a.isReversed?he/z[l]:0)},j=g,Z=L.config.chart.stacked&&!L.globals.comboCharts||L.config.chart.stacked&&L.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(t=this.w.config.series[o])||void 0===t?void 0:t.type)||"column"===(null===(i=this.w.config.series[o])||void 0===i?void 0:i.type)),_=L.config.stroke.curve;Array.isArray(_)&&(_=Array.isArray(A)?_[A[c]]:_[c]);for(var ie,re=0,K=0;K0&&L.globals.collapsedSeries.length-1){pe--;break}return pe>=0?pe:0}(c-1)][K+1]:this.zeroY,be?g=W(G,h):(g=W(s[c][K+1],h),"rangeArea"===r&&(j=W(S[c][K+1],h))),u.push(d),!be||"smooth"!==L.config.stroke.curve&&"monotoneCubic"!==L.config.stroke.curve?(x.push(g),k.push(j)):(x.push(null),k.push(null));var q=this.lineHelpers.calculatePoints({series:s,x:d,y:g,realIndex:o,i:c,j:K,prevY:T}),Q=this._createPaths({type:r,series:s,i:c,realIndex:o,j:K,x:d,y:g,y2:j,xArrj:u,yArrj:x,y2Arrj:k,pX:p,pY:f,pathState:re,segmentStartX:ie,linePath:I,areaPath:Y,linePaths:m,areaPaths:v,curve:_,isRangeStart:w});v=Q.areaPaths,m=Q.linePaths,p=Q.pX,f=Q.pY,re=Q.pathState,ie=Q.segmentStartX,Y=Q.areaPath,I=Q.linePath,!this.appendPathFrom||"monotoneCubic"===_&&"rangeArea"===r||(H+=C.line(d,this.zeroY),B+=C.line(d,this.zeroY)),this.handleNullDataPoints(s,q,c,K,o),this._handleMarkersAndLabels({type:r,pointsPos:q,i:c,j:K,realIndex:o,isRangeStart:w})}return{yArrj:x,xArrj:u,pathFromArea:B,areaPaths:v,pathFromLine:H,linePaths:m,linePath:I,areaPath:Y}}},{key:"_handleMarkersAndLabels",value:function(e){var t=e.type,i=e.pointsPos,a=e.isRangeStart,r=e.i,s=e.j,n=e.realIndex,o=this.w,l=new Ae(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,s,{realIndex:n,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[r].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var c=this.markers.plotChartMarkers(i,n,s+1);null!==c&&this.elPointsMain.add(c)}var d=l.drawDataLabel({type:t,isRangeStart:a,pos:i,i:n,j:s+1});null!==d&&this.elDataLabelsWrap.add(d)}},{key:"_createPaths",value:function(e){var k,t=e.type,i=e.series,a=e.i,r=e.j,s=e.x,n=e.y,o=e.xArrj,l=e.yArrj,c=e.y2,d=e.y2Arrj,g=e.pX,p=e.pY,f=e.pathState,b=e.segmentStartX,m=e.linePath,v=e.areaPath,A=e.linePaths,h=e.areaPaths,u=e.curve,x=e.isRangeStart,w=new E(this.ctx),S=this.areaBottomY,L="rangeArea"===t,C="rangeArea"===t&&x;switch(u){case"monotoneCubic":var z=x?l:d;switch(f){case 0:if(null===z[r+1])break;f=1;case 1:if(!(L?o.length===i[a].length:r===i[a].length-2))break;case 2:var T=x?o:o.slice().reverse(),I=x?z:z.slice().reverse(),Y=(k=I,T.map(function($,q){return[$,k[q]]}).filter(function($){return null!==$[1]})),H=Y.length>1?function(y){var e=function(y){for(var e,t,i,a,r=function(c){for(var d=[],g=c[0],p=c[1],f=d[0]=xt(g,p),b=1,m=c.length-1;b9&&(a=3*i/Math.sqrt(a),r[o]=a*e,r[o+1]=a*t);for(var l=0;l<=s;l++)a=(y[Math.min(s,l+1)][0]-y[Math.max(0,l-1)][0])/(6*(1+r[l]*r[l])),n.push([a||0,r[l]*a||0]);return n}(y),t=y[1],i=y[0],a=[],r=e[1],s=e[0];a.push(i,[i[0]+s[0],i[1]+s[1],t[0]-r[0],t[1]-r[1],t[0],t[1]]);for(var n=2,o=e.length;n0&&(de.push(we),we=0)}),we>0&&de.push(we),de}($),he=[],pe=0,fe=0;pe4?(fe+="C".concat(de[0],", ").concat(de[1]),fe+=", ".concat(de[2],", ").concat(de[3]),fe+=", ".concat(de[4],", ").concat(de[5])):we>2&&(fe+="S".concat(de[0],", ").concat(de[1]),fe+=", ".concat(de[2],", ").concat(de[3]))}return fe}($),Q=W,he=(W+=$.length)-1;C?m=w.move(Y[Q][0],Y[Q][1])+q:L?m=w.move(B[Q][0],B[Q][1])+w.line(Y[Q][0],Y[Q][1])+q+w.line(B[he][0],B[he][1]):(m=w.move(Y[Q][0],Y[Q][1])+q,v=m+w.line(Y[he][0],S)+w.line(Y[Q][0],S)+"z",h.push(v)),A.push(m)}),L&&G>1&&!C){var j=A.slice(G).reverse();A.splice(G),j.forEach(function($){return A.push($)})}f=0}break;case"smooth":var Z=.35*(s-g);if(null===i[a][r])f=0;else switch(f){case 0:if(b=g,m=C?w.move(g,d[r])+w.line(g,p):w.move(g,p),v=w.move(g,p),f=1,r=i[a].length-2&&(m+=C?w.curve(s,n,s,n,s,c)+w.move(s,c):w.move(s,n),v+=w.curve(s,n,s,n,s,S)+w.line(b,S)+"z",A.push(m),h.push(v))}}g=s,p=n;break;default:var re=function($,q,Q){var he=[];switch($){case"stepline":he=w.line(q,null,"H")+w.line(null,Q,"V");break;case"linestep":he=w.line(null,Q,"V")+w.line(q,null,"H");break;case"straight":he=w.line(q,Q)}return he};if(null===i[a][r])f=0;else switch(f){case 0:if(b=g,m=C?w.move(g,d[r])+w.line(g,p):w.move(g,p),v=w.move(g,p),f=1,r=i[a].length-2&&(m+=C?w.line(s,c):w.move(s,n),v+=w.line(s,S)+w.line(b,S)+"z",A.push(m),h.push(v))}}g=s,p=n}return{linePaths:A,areaPaths:h,pX:g,pY:p,pathState:f,segmentStartX:b,linePath:m,areaPath:v}}},{key:"handleNullDataPoints",value:function(e,t,i,a,r){var s=this.w;if(null===e[i][a]&&s.config.markers.showNullDataPoints||1===e[i].length){var n=this.strokeWidth-s.config.markers.strokeWidth/2;n>0||(n=0);var o=this.markers.plotChartMarkers(t,r,a+1,n,!0);null!==o&&this.elPointsMain.add(o)}}}]),y}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function y(n,o,l,c){this.xoffset=n,this.yoffset=o,this.height=c,this.width=l,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(d){var g,p=[],f=this.xoffset,b=this.yoffset,m=r(d)/this.height,v=r(d)/this.width;if(this.width>=this.height)for(g=0;g=this.height){var p=d/this.height;g=new y(this.xoffset+p,this.yoffset,this.width-p,this.height)}else{var b=d/this.width;g=new y(this.xoffset,this.yoffset+b,this.width,this.height-b)}return g}}function e(n,o,l,c,d){return c=void 0===c?0:c,d=void 0===d?0:d,function(p){var f,b,m=[];for(f=0;f=i(v,m))?(o.push(g),t(n.slice(1),o,l,c)):(p=l.cutArea(r(o),c),c.push(l.getCoordinates(o)),t(n,[],p,c)),c;c.push(l.getCoordinates(o))}function i(n,o){var l=Math.min.apply(Math,n),c=Math.max.apply(Math,n),d=r(n);return Math.max(Math.pow(o,2)*c/Math.pow(d,2),Math.pow(d,2)/(Math.pow(o,2)*l))}function a(n){return n&&n.constructor===Array}function r(n){var o,l=0;for(o=0;os-a&&l.width<=n-r){var c=o.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(-90 ".concat(c.x," ").concat(c.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(e,t,i,a,r,s){var n=new E(this.ctx),o=n.getTextRects(e,t).width+this.w.config.stroke.width+5>r-i&&s-a>r-i?s-a:r-i,l=n.getTextBasedOnMaxWidth({text:e,maxWidth:o,fontSize:t});return e.length!==l.length&&o/t<5?"":l}},{key:"animateTreemap",value:function(e,t,i,a){var r=new ye(this.ctx);r.animateRect(e,{x:t.x,y:t.y,width:t.width,height:t.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,function(){r.animationCompleted(e)})}}]),y}(),Vt=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return D(y,[{key:"calculateTimeScaleTicks",value:function(e,t){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var r=new se(this.ctx),s=(t-e)/864e5;this.determineInterval(s),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,s<.00011574074074074075?a.globals.disableZoomIn=!0:s>5e4&&(a.globals.disableZoomOut=!0);var n=r.getTimeUnitsfromTimestamp(e,t,this.utc),o=a.globals.gridWidth/s,l=o/24,c=l/60,d=c/60,g=Math.floor(24*s),p=Math.floor(1440*s),f=Math.floor(86400*s),b=Math.floor(s),m=Math.floor(s/30),v=Math.floor(s/365),A={minMillisecond:n.minMillisecond,minSecond:n.minSecond,minMinute:n.minMinute,minHour:n.minHour,minDate:n.minDate,minMonth:n.minMonth,minYear:n.minYear},h={firstVal:A,currentMillisecond:A.minMillisecond,currentSecond:A.minSecond,currentMinute:A.minMinute,currentHour:A.minHour,currentMonthDate:A.minDate,currentDate:A.minDate,currentMonth:A.minMonth,currentYear:A.minYear,daysWidthOnXAxis:o,hoursWidthOnXAxis:l,minutesWidthOnXAxis:c,secondsWidthOnXAxis:d,numberOfSeconds:f,numberOfMinutes:p,numberOfHours:g,numberOfDays:b,numberOfMonths:m,numberOfYears:v};switch(this.tickInterval){case"years":this.generateYearScale(h);break;case"months":case"half_year":this.generateMonthScale(h);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(h);break;case"hours":this.generateHourScale(h);break;case"minutes_fives":case"minutes":this.generateMinuteScale(h);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(h)}var u=this.timeScaleArray.map(function(x){var k={position:x.position,unit:x.unit,year:x.year,day:x.day?x.day:1,hour:x.hour?x.hour:0,month:x.month+1};return"month"===x.unit?O(O({},k),{},{day:1,value:x.value+1}):"day"===x.unit||"hour"===x.unit?O(O({},k),{},{value:x.value}):"minute"===x.unit?O(O({},k),{},{value:x.value,minute:x.value}):"second"===x.unit?O(O({},k),{},{value:x.value,minute:x.minute,second:x.second}):x});return u.filter(function(x){var k=1,w=Math.ceil(a.globals.gridWidth/120),S=x.value;void 0!==a.config.xaxis.tickAmount&&(w=a.config.xaxis.tickAmount),u.length>w&&(k=Math.floor(u.length/w));var L=!1,C=!1;switch(i.tickInterval){case"years":"year"===x.unit&&(L=!0);break;case"half_year":k=7,"year"===x.unit&&(L=!0);break;case"months":k=1,"year"===x.unit&&(L=!0);break;case"months_fortnight":k=15,"year"!==x.unit&&"month"!==x.unit||(L=!0),30===S&&(C=!0);break;case"months_days":k=10,"month"===x.unit&&(L=!0),30===S&&(C=!0);break;case"week_days":k=8,"month"===x.unit&&(L=!0);break;case"days":k=1,"month"===x.unit&&(L=!0);break;case"hours":"day"===x.unit&&(L=!0);break;case"minutes_fives":case"seconds_fives":S%5!=0&&(C=!0);break;case"seconds_tens":S%10!=0&&(C=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!C)return!0}else if((S%k==0||L)&&!C)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(e,t){var i=this.w,a=this.formatDates(e),r=this.removeOverlappingTS(a);i.globals.timescaleLabels=r.slice(),new Ye(this.ctx).plotCoords()}},{key:"determineInterval",value:function(e){var t=24*e,i=60*t;switch(!0){case e/365>5:this.tickInterval="years";break;case e>800:this.tickInterval="half_year";break;case e>180:this.tickInterval="months";break;case e>90:this.tickInterval="months_fortnight";break;case e>60:this.tickInterval="months_days";break;case e>30:this.tickInterval="week_days";break;case e>2:this.tickInterval="days";break;case t>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(e){var t=e.firstVal,i=e.currentMonth,a=e.currentYear,r=e.daysWidthOnXAxis,s=e.numberOfYears,n=t.minYear,o=0,l=new se(this.ctx),c="year";if(t.minDate>1||t.minMonth>0){var d=l.determineRemainingDaysOfYear(t.minYear,t.minMonth,t.minDate);o=(l.determineDaysOfYear(t.minYear)-d+1)*r,this.timeScaleArray.push({position:o,value:n=t.minYear+1,unit:c,year:n,month:M.monthMod(i+1)})}else 1===t.minDate&&0===t.minMonth&&this.timeScaleArray.push({position:o,value:n,unit:c,year:a,month:M.monthMod(i+1)});for(var g=n,p=o,f=0;f1){l=(c.determineDaysOfMonths(a+1,t.minYear)-i+1)*s,o=M.monthMod(a+1);var p=r+g,f=M.monthMod(o),b=o;0===o&&(d="year",b=p,f=1,p+=g+=1),this.timeScaleArray.push({position:l,value:b,unit:d,year:p,month:f})}else this.timeScaleArray.push({position:l,value:o,unit:d,year:r,month:M.monthMod(a)});for(var m=o+1,v=l,A=0,h=1;An.determineDaysOfMonths(u+1,x)&&(c=1,o="month",p=u+=1),u},g=(24-t.minHour)*r,p=l,f=d(c,i,a);0===t.minHour&&1===t.minDate?(g=0,p=M.monthMod(t.minMonth),o="month",c=t.minDate):1!==t.minDate&&0===t.minHour&&0===t.minMinute&&(g=0,p=l=t.minDate,f=d(c=l,i,a)),this.timeScaleArray.push({position:g,value:p,unit:o,year:this._getYear(a,f,0),month:M.monthMod(f),day:c});for(var b=g,m=0;mo.determineDaysOfMonths(w+1,r)&&(m=1,w+=1),{month:w,date:m}},d=function(k,w){return k>o.determineDaysOfMonths(w+1,r)?w+=1:w},g=60-(t.minMinute+t.minSecond/60),p=g*s,f=t.minHour+1,b=f;60===g&&(p=0,b=f=t.minHour);var m=i;b>=24&&(b=0,m+=1,l="day");var v=c(m,a).month;v=d(m,v),this.timeScaleArray.push({position:p,value:f,unit:l,day:m,hour:b,year:r,month:M.monthMod(v)}),b++;for(var A=p,h=0;h=24&&(b=0,l="day",v=c(m+=1,v).month,v=d(m,v));var u=this._getYear(r,v,0);this.timeScaleArray.push({position:A=60*s+A,value:0===b?m:b,unit:l,hour:b,day:m,year:u,month:M.monthMod(v)}),b++}}},{key:"generateMinuteScale",value:function(e){for(var l=e.minutesWidthOnXAxis,d=e.numberOfMinutes,g=e.currentMinute+1,p=e.currentDate,f=e.currentMonth,b=e.currentYear,m=e.currentHour,v=(60-e.currentSecond-e.currentMillisecond/1e3)*e.secondsWidthOnXAxis,A=0;A=60&&(g=0,24===(m+=1)&&(m=0)),this.timeScaleArray.push({position:v,value:g,unit:"minute",hour:m,minute:g,day:p,year:this._getYear(b,f,0),month:M.monthMod(f)}),v+=l,g++}},{key:"generateSecondScale",value:function(e){for(var l=e.secondsWidthOnXAxis,c=e.numberOfSeconds,d=e.currentSecond+1,g=e.currentMinute,p=e.currentDate,f=e.currentMonth,b=e.currentYear,m=e.currentHour,v=(1e3-e.currentMillisecond)/1e3*l,A=0;A=60&&(d=0,++g>=60&&(g=0,24==++m&&(m=0))),this.timeScaleArray.push({position:v,value:d,unit:"second",hour:m,minute:g,second:d,day:p,year:this._getYear(b,f,0),month:M.monthMod(f)}),v+=l,d++}},{key:"createRawDateString",value:function(e,t){var i=e.year;return 0===e.month&&(e.month=1),i+="-"+("0"+e.month.toString()).slice(-2),i+="day"===e.unit?"day"===e.unit?"-"+("0"+t).slice(-2):"-01":"-"+("0"+(e.day?e.day:"1")).slice(-2),i+="hour"===e.unit?"hour"===e.unit?"T"+("0"+t).slice(-2):"T00":"T"+("0"+(e.hour?e.hour:"0")).slice(-2),i+="minute"===e.unit?":"+("0"+t).slice(-2):":"+(e.minute?("0"+e.minute).slice(-2):"00"),i+="second"===e.unit?":"+("0"+t).slice(-2):":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(e){var t=this,i=this.w;return e.map(function(a){var r=a.value.toString(),s=new se(t.ctx),n=t.createRawDateString(a,r),o=s.getDate(s.parseDate(n));if(t.utc||(o=s.getDate(s.parseDateWithTimezone(n))),void 0===i.config.xaxis.labels.format){var l="dd MMM",c=i.config.xaxis.labels.datetimeFormatter;"year"===a.unit&&(l=c.year),"month"===a.unit&&(l=c.month),"day"===a.unit&&(l=c.day),"hour"===a.unit&&(l=c.hour),"minute"===a.unit&&(l=c.minute),"second"===a.unit&&(l=c.second),r=s.formatDate(o,l)}else r=s.formatDate(o,i.config.xaxis.labels.format);return{dateString:n,position:a.position,value:r,unit:a.unit,year:a.year,month:a.month}})}},{key:"removeOverlappingTS",value:function(e){var t,i=this,a=new E(this.ctx),r=!1;e.length>0&&e[0].value&&e.every(function(o){return o.value.length===e[0].value.length})&&(r=!0,t=a.getTextRects(e[0].value).width);var s=0;return e.map(function(o,l){if(l>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var c=r?t:a.getTextRects(e[s].value).width;return o.position>e[s].position+c+10?(s=l,o):null}return o}).filter(function(o){return null!==o})}},{key:"_getYear",value:function(e,t,i){return e+Math.floor(t/12)+i}}]),y}(),jt=function(){function y(e,t){F(this,y),this.ctx=t,this.w=t.w,this.el=e}return D(y,[{key:"setupElements",value:function(){var e=this.w.globals,t=this.w.config,i=t.chart.type;e.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].indexOf(i)>-1,e.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].indexOf(i)>-1,e.isBarHorizontal=("bar"===t.chart.type||"rangeBar"===t.chart.type||"boxPlot"===t.chart.type)&&t.plotOptions.bar.horizontal,e.chartClass=".apexcharts"+e.chartID,e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),E.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas "+e.chartClass.substring(1)}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=new window.SVG.Doc(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(t.chart.offsetX,", ").concat(t.chart.offsetY,")")}),e.dom.Paper.node.style.background="dark"!==t.theme.mode||t.chart.background?t.chart.background:"rgba(0, 0, 0, 0.8)",this.setSVGDimensions(),e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject"),E.setAttrs(e.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.dom.elLegendForeign.appendChild(e.dom.elLegendWrap),e.dom.Paper.node.appendChild(e.dom.elLegendForeign),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(e,t){var i=this.w,a=i.config,r=i.globals,s={series:[],i:[]},n={series:[],i:[]},o={series:[],i:[]},l={series:[],i:[]},c={series:[],i:[]},d={series:[],i:[]},g={series:[],i:[]},p={series:[],i:[]},f={series:[],seriesRangeEnd:[],i:[]},b=void 0!==a.chart.type?a.chart.type:"line",m=0;r.series.map(function(L,C){void 0!==e[C].type?"column"===e[C].type||"bar"===e[C].type?(c.series.push(L),c.i.push(C),i.globals.columnSeries=c.series,"bar"!==b&&(r.series.length>1&&a.plotOptions.bar.horizontal&&console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"),m++)):"area"===e[C].type?(n.series.push(L),n.i.push(C),b!==e[C].type&&m++):"line"===e[C].type?(s.series.push(L),s.i.push(C),b!==e[C].type&&m++):"scatter"===e[C].type?(o.series.push(L),o.i.push(C)):"bubble"===e[C].type?(l.series.push(L),l.i.push(C),b!==e[C].type&&m++):"candlestick"===e[C].type?(d.series.push(L),d.i.push(C),b!==e[C].type&&m++):"boxPlot"===e[C].type?(g.series.push(L),g.i.push(C),b!==e[C].type&&m++):"rangeBar"===e[C].type?(p.series.push(L),p.i.push(C),b!==e[C].type&&m++):"rangeArea"===e[C].type?(f.series.push(r.seriesRangeStart[C]),f.seriesRangeEnd.push(r.seriesRangeEnd[C]),f.i.push(C),b!==e[C].type&&m++):console.warn("You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble/candlestick/boxPlot/rangeBar/rangeArea"):(s.series.push(L),s.i.push(C))}),r.comboCharts||(r.comboCharts=m>0);var v=new bt(this.ctx,t),A=new ft(this.ctx,t);this.ctx.pie=new Ct(this.ctx);var h=new Ot(this.ctx);this.ctx.rangeBar=new Ft(this.ctx,t);var u=new Rt(this.ctx),x=[];if(r.comboCharts){if(n.series.length>0&&x.push(v.draw(n.series,"area",n.i)),c.series.length>0)if(i.config.chart.stacked){var k=new At(this.ctx,t);x.push(k.draw(c.series,c.i))}else this.ctx.bar=new Oe(this.ctx,t),x.push(this.ctx.bar.draw(c.series,c.i));if(f.series.length>0&&x.push(v.draw(f.series,"rangeArea",f.i,f.seriesRangeEnd)),s.series.length>0&&x.push(v.draw(s.series,"line",s.i)),d.series.length>0&&x.push(A.draw(d.series,"candlestick",d.i)),g.series.length>0&&x.push(A.draw(g.series,"boxPlot",g.i)),p.series.length>0&&x.push(this.ctx.rangeBar.draw(p.series,p.i)),o.series.length>0){var w=new bt(this.ctx,t,!0);x.push(w.draw(o.series,"scatter",o.i))}if(l.series.length>0){var S=new bt(this.ctx,t,!0);x.push(S.draw(l.series,"bubble",l.i))}}else switch(a.chart.type){case"line":x=v.draw(r.series,"line");break;case"area":x=v.draw(r.series,"area");break;case"bar":a.chart.stacked?x=new At(this.ctx,t).draw(r.series):(this.ctx.bar=new Oe(this.ctx,t),x=this.ctx.bar.draw(r.series));break;case"candlestick":x=new ft(this.ctx,t).draw(r.series,"candlestick");break;case"boxPlot":x=new ft(this.ctx,t).draw(r.series,a.chart.type);break;case"rangeBar":x=this.ctx.rangeBar.draw(r.series);break;case"rangeArea":x=v.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":x=new Yt(this.ctx,t).draw(r.series);break;case"treemap":x=new Wt(this.ctx,t).draw(r.series);break;case"pie":case"donut":case"polarArea":x=this.ctx.pie.draw(r.series);break;case"radialBar":x=h.draw(r.series);break;case"radar":x=u.draw(r.series);break;default:x=v.draw(r.series)}return x}},{key:"setSVGDimensions",value:function(){var e=this.w.globals,t=this.w.config;e.svgWidth=t.chart.width,e.svgHeight=t.chart.height;var i=M.getDimensions(this.el),a=t.chart.width.toString().split(/[0-9]+/g).pop();"%"===a?M.isNumber(i[0])&&(0===i[0].width&&(i=M.getDimensions(this.el.parentNode)),e.svgWidth=i[0]*parseInt(t.chart.width,10)/100):"px"!==a&&""!==a||(e.svgWidth=parseInt(t.chart.width,10));var r=t.chart.height.toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===r){var s=M.getDimensions(this.el.parentNode);e.svgHeight=s[1]*parseInt(t.chart.height,10)/100}else e.svgHeight=parseInt(t.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;e.svgWidth<0&&(e.svgWidth=0),e.svgHeight<0&&(e.svgHeight=0),E.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==r&&(e.dom.Paper.node.parentNode.parentNode.style.minHeight=e.svgHeight+(t.chart.sparkline.enabled?0:e.axisCharts?t.chart.parentHeightOffset:0)+"px"),e.dom.elWrap.style.width=e.svgWidth+"px",e.dom.elWrap.style.height=e.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var e=this.w.globals;E.setAttrs(e.dom.elGraphical.node,{transform:"translate("+e.translateX+", "+e.translateY+")"})}},{key:"resizeNonAxisCharts",value:function(){var e=this.w,t=e.globals,i=0,a=e.config.chart.sparkline.enabled?1:15;a+=e.config.grid.padding.bottom,"top"!==e.config.legend.position&&"bottom"!==e.config.legend.position||!e.config.legend.show||e.config.legend.floating||(i=new U(this.ctx).legendHelpers.getLegendBBox().clwh+10);var r=e.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),s=2.05*e.globals.radialSize;if(r&&!e.config.chart.sparkline.enabled&&0!==e.config.plotOptions.radialBar.startAngle){var n=M.getBoundingClientRect(r);s=n.bottom,s=Math.max(2.05*e.globals.radialSize,n.bottom-n.top)}var l=s+t.translateY+i+a;t.dom.elLegendForeign&&t.dom.elLegendForeign.setAttribute("height",l),e.config.chart.height&&String(e.config.chart.height).indexOf("%")>0||(t.dom.elWrap.style.height=l+"px",E.setAttrs(t.dom.Paper.node,{height:l}),t.dom.Paper.node.parentNode.parentNode.style.minHeight=l+"px")}},{key:"coreCalculations",value:function(){new We(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,t=function(){return e.w.config.series.map(function(r){return[]})},i=new Je,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=t(),a.seriesYvalues=t()}},{key:"isMultipleY",value:function(){if(this.w.config.yaxis.constructor===Array&&this.w.config.yaxis.length>1)return this.w.globals.isMultipleYAxis=!0,!0}},{key:"xySettings",value:function(){var e=null,t=this.w;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new Ve(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new Ve(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Vt(this.ctx);var i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new te(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(e){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var e=this,t=this.w;if(t.config.chart.brush.enabled&&"function"!=typeof t.config.chart.events.selection){var i=Array.isArray(t.config.chart.brush.targets)?t.config.chart.brush.targets:[t.config.chart.brush.target];i.forEach(function(a){var r=ApexCharts.getChartByID(a);r.w.globals.brushSource=e.ctx,"function"!=typeof r.w.config.chart.events.zoomed&&(r.w.config.chart.events.zoomed=function(){e.updateSourceChart(r)}),"function"!=typeof r.w.config.chart.events.scrolled&&(r.w.config.chart.events.scrolled=function(){e.updateSourceChart(r)})}),t.config.chart.events.selection=function(a,r){i.forEach(function(s){ApexCharts.getChartByID(s).ctx.updateHelpers._updateOptions({xaxis:{min:r.xaxis.min,max:r.xaxis.max}},!1,!1,!1,!1)})}}}}]),y}(),_t=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"_updateOptions",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise(function(n){var o=[t.ctx];r&&(o=t.ctx.getSyncedCharts()),t.ctx.w.globals.isExecCalled&&(o=[t.ctx],t.ctx.w.globals.isExecCalled=!1),o.forEach(function(l,c){var d=l.w;if(d.globals.shouldAnimate=a,i||(d.globals.resized=!0,d.globals.dataChanged=!0,a&&l.series.getPreviousPaths()),e&&"object"===ae(e)&&(l.config=new Pe(e),e=te.extendArrayProps(l.config,e,d),l.w.globals.chartID!==t.ctx.w.globals.chartID&&delete e.series,d.config=M.extend(d.config,e),s&&(d.globals.lastXAxis=e.xaxis?M.clone(e.xaxis):[],d.globals.lastYAxis=e.yaxis?M.clone(e.yaxis):[],d.globals.initialConfig=M.extend({},d.config),d.globals.initialSeries=M.clone(d.config.series),e.series))){for(var g=0;g2&&void 0!==arguments[2]&&arguments[2];return new Promise(function(r){var s,n=i.w;return n.globals.shouldAnimate=t,n.globals.dataChanged=!0,t&&i.ctx.series.getPreviousPaths(),n.globals.axisCharts?(0===(s=e.map(function(o,l){return i._extendSeries(o,l)})).length&&(s=[{data:[]}]),n.config.series=s):n.config.series=e.slice(),a&&(n.globals.initialConfig.series=M.clone(n.config.series),n.globals.initialSeries=M.clone(n.config.series)),i.ctx.update().then(function(){r(i.ctx)})})}},{key:"_extendSeries",value:function(e,t){var i=this.w,a=i.config.series[t];return O(O({},i.config.series[t]),{},{name:e.name?e.name:a?.name,color:e.color?e.color:a?.color,type:e.type?e.type:a?.type,group:e.group?e.group:a?.group,data:e.data?e.data:a?.data,zIndex:void 0!==e.zIndex?e.zIndex:t})}},{key:"toggleDataPointSelection",value:function(e,t){var i=this.w,a=null,r=".apexcharts-series[data\\:realIndex='".concat(e,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.select("".concat(r," path[j='").concat(t,"'], ").concat(r," circle[j='").concat(t,"'], ").concat(r," rect[j='").concat(t,"']")).members[0]:void 0===t&&(a=i.globals.dom.Paper.select("".concat(r," path[j='").concat(e,"']")).members[0],"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(e)),a?(new E(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(e){var t=this.w;if(["min","max"].forEach(function(a){void 0!==e.xaxis[a]&&(t.config.xaxis[a]=e.xaxis[a],t.globals.lastXAxis[a]=e.xaxis[a])}),e.xaxis.categories&&e.xaxis.categories.length&&(t.config.xaxis.categories=e.xaxis.categories),t.config.xaxis.convertedCatToNumeric){var i=new Le(e);e=i.convertCatToNumericXaxis(e,this.ctx)}return e}},{key:"forceYAxisUpdate",value:function(e){return e.chart&&e.chart.stacked&&"100%"===e.chart.stackType&&(Array.isArray(e.yaxis)?e.yaxis.forEach(function(t,i){e.yaxis[i].min=0,e.yaxis[i].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}},{key:"revertDefaultAxisMinMax",value:function(e){var t=this,i=this.w,a=i.globals.lastXAxis,r=i.globals.lastYAxis;e&&e.xaxis&&(a=e.xaxis),e&&e.yaxis&&(r=e.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max,i.config.yaxis.map(function(n,o){i.globals.zoomed||void 0!==r[o]?function(n){void 0!==r[n]&&(i.config.yaxis[n].min=r[n].min,i.config.yaxis[n].max=r[n].max)}(o):void 0!==t.ctx.opts.yaxis[o]&&(n.min=t.ctx.opts.yaxis[o].min,n.max=t.ctx.opts.yaxis[o].max)})}}]),y}();mt=typeof window<"u"?window:void 0,Lt=function(y,e){var t=(void 0!==this?this:y).SVG=function(h){if(t.supported)return h=new t.Doc(h),t.parser.draw||t.prepare(),h};if(t.ns="http://www.w3.org/2000/svg",t.xmlns="http://www.w3.org/2000/xmlns/",t.xlink="http://www.w3.org/1999/xlink",t.svgjs="http://svgjs.dev",t.supported=!0,!t.supported)return!1;t.did=1e3,t.eid=function(h){return"Svgjs"+c(h)+t.did++},t.create=function(h){var u=e.createElementNS(this.ns,h);return u.setAttribute("id",this.eid(h)),u},t.extend=function(){var h,u;u=(h=[].slice.call(arguments)).pop();for(var x=h.length-1;x>=0;x--)if(h[x])for(var k in u)h[x].prototype[k]=u[k];t.Set&&t.Set.inherit&&t.Set.inherit()},t.invent=function(h){var u="function"==typeof h.create?h.create:function(){this.constructor.call(this,t.create(h.create))};return h.inherit&&(u.prototype=new h.inherit),h.extend&&t.extend(u,h.extend),h.construct&&t.extend(h.parent||t.Container,h.construct),u},t.adopt=function(h){return h?h.instance?h.instance:((u="svg"==h.nodeName?h.parentNode instanceof y.SVGElement?new t.Nested:new t.Doc:"linearGradient"==h.nodeName?new t.Gradient("linear"):"radialGradient"==h.nodeName?new t.Gradient("radial"):t[c(h.nodeName)]?new(t[c(h.nodeName)]):new t.Element(h)).type=h.nodeName,u.node=h,h.instance=u,u instanceof t.Doc&&u.namespace().defs(),u.setData(JSON.parse(h.getAttribute("svgjs:data"))||{}),u):null;var u},t.prepare=function(){var h=e.getElementsByTagName("body")[0],u=(h?new t.Doc(h):t.adopt(e.documentElement).nested()).size(2,0);t.parser={body:h||e.documentElement,draw:u.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:u.polyline().node,path:u.path().node,native:t.create("svg")}},t.parser={native:t.create("svg")},e.addEventListener("DOMContentLoaded",function(){t.parser.draw||t.prepare()},!1),t.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},t.utils={map:function(h,u){for(var x=h.length,k=[],w=0;w1?1:h)),g:~~(this.g+(this.destination.g-this.g)*h),b:~~(this.b+(this.destination.b-this.b)*h)}):this}}),t.Color.test=function(h){return t.regex.isHex.test(h+="")||t.regex.isRgb.test(h)},t.Color.isRgb=function(h){return h&&"number"==typeof h.r&&"number"==typeof h.g&&"number"==typeof h.b},t.Color.isColor=function(h){return t.Color.isRgb(h)||t.Color.test(h)},t.Array=function(h,u){0==(h=(h||[]).valueOf()).length&&u&&(h=u.valueOf()),this.value=this.parse(h)},t.extend(t.Array,{toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(h){return h=h.valueOf(),Array.isArray(h)?h:this.split(h)}}),t.PointArray=function(h,u){t.Array.call(this,h,u||[[0,0]])},t.PointArray.prototype=new t.Array,t.PointArray.prototype.constructor=t.PointArray;for(var i={M:function(h,u,x){return u.x=x.x=h[0],u.y=x.y=h[1],["M",u.x,u.y]},L:function(h,u){return u.x=h[0],u.y=h[1],["L",h[0],h[1]]},H:function(h,u){return u.x=h[0],["H",h[0]]},V:function(h,u){return u.y=h[0],["V",h[0]]},C:function(h,u){return u.x=h[4],u.y=h[5],["C",h[0],h[1],h[2],h[3],h[4],h[5]]},Q:function(h,u){return u.x=h[2],u.y=h[3],["Q",h[0],h[1],h[2],h[3]]},S:function(h,u){return u.x=h[2],u.y=h[3],["S",h[0],h[1],h[2],h[3]]},Z:function(h,u,x){return u.x=x.x,u.y=x.y,["Z"]}},a="mlhvqtcsaz".split(""),r=0,s=a.length;rL);return k},bbox:function(){return t.parser.draw||t.prepare(),t.parser.path.setAttribute("d",this.toString()),t.parser.path.getBBox()}}),t.Number=t.invent({create:function(h,u){this.value=0,this.unit=u||"","number"==typeof h?this.value=isNaN(h)?0:isFinite(h)?h:h<0?-34e37:34e37:"string"==typeof h?(u=h.match(t.regex.numberAndUnit))&&(this.value=parseFloat(u[1]),"%"==u[5]?this.value/=100:"s"==u[5]&&(this.value*=1e3),this.unit=u[5]):h instanceof t.Number&&(this.value=h.valueOf(),this.unit=h.unit)},extend:{toString:function(){return("%"==this.unit?~~(1e8*this.value)/1e6:"s"==this.unit?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(h){return h=new t.Number(h),new t.Number(this+h,this.unit||h.unit)},minus:function(h){return h=new t.Number(h),new t.Number(this-h,this.unit||h.unit)},times:function(h){return h=new t.Number(h),new t.Number(this*h,this.unit||h.unit)},divide:function(h){return h=new t.Number(h),new t.Number(this/h,this.unit||h.unit)},to:function(h){var u=new t.Number(this);return"string"==typeof h&&(u.unit=h),u},morph:function(h){return this.destination=new t.Number(h),h.relative&&(this.destination.value+=this.value),this},at:function(h){return this.destination?new t.Number(this.destination).minus(this).times(h).plus(this):this}}}),t.Element=t.invent({create:function(h){this._stroke=t.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=h)&&(this.type=h.nodeName,this.node.instance=this,this._stroke=h.getAttribute("stroke")||this._stroke)},extend:{x:function(h){return this.attr("x",h)},y:function(h){return this.attr("y",h)},cx:function(h){return null==h?this.x()+this.width()/2:this.x(h-this.width()/2)},cy:function(h){return null==h?this.y()+this.height()/2:this.y(h-this.height()/2)},move:function(h,u){return this.x(h).y(u)},center:function(h,u){return this.cx(h).cy(u)},width:function(h){return this.attr("width",h)},height:function(h){return this.attr("height",h)},size:function(h,u){var x=g(this,h,u);return this.width(new t.Number(x.width)).height(new t.Number(x.height))},clone:function(h){this.writeDataToDom();var u=b(this.node.cloneNode(!0));return h?h.add(u):this.after(u),u},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(h){return this.after(h).remove(),h},addTo:function(h){return h.put(this)},putIn:function(h){return h.add(this)},id:function(h){return this.attr("id",h)},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return"none"!=this.style("display")},toString:function(){return this.attr("id")},classes:function(){var h=this.attr("class");return null==h?[]:h.trim().split(t.regex.delimiter)},hasClass:function(h){return-1!=this.classes().indexOf(h)},addClass:function(h){if(!this.hasClass(h)){var u=this.classes();u.push(h),this.attr("class",u.join(" "))}return this},removeClass:function(h){return this.hasClass(h)&&this.attr("class",this.classes().filter(function(u){return u!=h}).join(" ")),this},toggleClass:function(h){return this.hasClass(h)?this.removeClass(h):this.addClass(h)},reference:function(h){return t.get(this.attr(h))},parent:function(h){var u=this;if(!u.node.parentNode)return null;if(u=t.adopt(u.node.parentNode),!h)return u;for(;u&&u.node instanceof y.SVGElement;){if("string"==typeof h?u.matches(h):u instanceof h)return u;if(!u.node.parentNode||"#document"==u.node.parentNode.nodeName)return null;u=t.adopt(u.node.parentNode)}},doc:function(){return this instanceof t.Doc?this:this.parent(t.Doc)},parents:function(h){var u=[],x=this;do{if(!(x=x.parent(h))||!x.node)break;u.push(x)}while(x.parent);return u},matches:function(h){return((u=this.node).matches||u.matchesSelector||u.msMatchesSelector||u.mozMatchesSelector||u.webkitMatchesSelector||u.oMatchesSelector).call(u,h);var u},native:function(){return this.node},svg:function(h){var u=e.createElement("svg");if(!(h&&this instanceof t.Parent))return u.appendChild(h=e.createElement("svg")),this.writeDataToDom(),h.appendChild(this.node.cloneNode(!0)),u.innerHTML.replace(/^/,"").replace(/<\/svg>$/,"");u.innerHTML=""+h.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2>")+"";for(var x=0,k=u.firstChild.childNodes.length;x":function(h){return-Math.cos(h*Math.PI)/2+.5},">":function(h){return Math.sin(h*Math.PI/2)},"<":function(h){return 1-Math.cos(h*Math.PI/2)}},t.morph=function(h){return function(u,x){return new t.MorphObj(u,x).at(h)}},t.Situation=t.invent({create:function(h){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new t.Number(h.duration).valueOf(),this.delay=new t.Number(h.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=h.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),t.FX=t.invent({create:function(h){this._target=h,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(h,u,x){"object"===ae(h)&&(u=h.ease,x=h.delay,h=h.duration);var k=new t.Situation({duration:h||1e3,delay:x||0,ease:t.easing[u||"-"]||u});return this.queue(k),this},target:function(h){return h&&h instanceof t.Element?(this._target=h,this):this._target},timeToAbsPos:function(h){return(h-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(h){return this.situation.duration/this._speed*h+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=y.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){y.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(h){return("function"==typeof h||h instanceof t.Situation)&&this.situations.push(h),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof t.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var h,u=this.situation;if(u.init)return this;for(var x in u.animations){h=this.target()[x](),Array.isArray(h)||(h=[h]),Array.isArray(u.animations[x])||(u.animations[x]=[u.animations[x]]);for(var k=h.length;k--;)u.animations[x][k]instanceof t.Number&&(h[k]=new t.Number(h[k])),u.animations[x][k]=h[k].morph(u.animations[x][k])}for(var x in u.attrs)u.attrs[x]=new t.MorphObj(this.target().attr(x),u.attrs[x]);for(var x in u.styles)u.styles[x]=new t.MorphObj(this.target().style(x),u.styles[x]);return u.initialTransformation=this.target().matrixify(),u.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(h,u){var x=this.active;return this.active=!1,u&&this.clearQueue(),h&&this.situation&&(!x&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},after:function(h){var u=this.last();return this.target().on("finished.fx",function x(k){k.detail.situation==u&&(h.call(this,u),this.off("finished.fx",x))}),this._callStart()},during:function(h){var u=this.last(),x=function(k){k.detail.situation==u&&h.call(this,k.detail.pos,t.morph(k.detail.pos),k.detail.eased,u)};return this.target().off("during.fx",x).on("during.fx",x),this.after(function(){this.off("during.fx",x)}),this._callStart()},afterAll:function(h){var u=function x(k){h.call(this),this.off("allfinished.fx",x)};return this.target().off("allfinished.fx",u).on("allfinished.fx",u),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(h,u,x){return this.last()[x||"animations"][h]=u,this._callStart()},step:function(h){var u,x,k;h||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops?(u=Math.max(this.absPos,0),x=Math.floor(u),!0===this.situation.loops||xthis.lastPos&&S<=w&&(this.situation.once[S].call(this.target(),this.pos,w),delete this.situation.once[S]);return this.active&&this.target().fire("during",{pos:this.pos,eased:w,fx:this,situation:this.situation}),this.situation?(this.eachAt(),1==this.pos&&!this.situation.reversed||this.situation.reversed&&0==this.pos?(this.stopAnimFrame(),this.target().fire("finished",{fx:this,situation:this.situation}),this.situations.length||(this.target().fire("allfinished"),this.situations.length||(this.target().off(".fx"),this.active=!1)),this.active?this.dequeue():this.clearCurrent()):!this.paused&&this.active&&this.startAnimFrame(),this.lastPos=w,this):this},eachAt:function(){var h,u=this,x=this.target(),k=this.situation;for(var w in k.animations)h=[].concat(k.animations[w]).map(function(C){return"string"!=typeof C&&C.at?C.at(k.ease(u.pos),u.pos):C}),x[w].apply(x,h);for(var w in k.attrs)h=[w].concat(k.attrs[w]).map(function(z){return"string"!=typeof z&&z.at?z.at(k.ease(u.pos),u.pos):z}),x.attr.apply(x,h);for(var w in k.styles)h=[w].concat(k.styles[w]).map(function(z){return"string"!=typeof z&&z.at?z.at(k.ease(u.pos),u.pos):z}),x.style.apply(x,h);if(k.transforms.length){h=k.initialTransformation,w=0;for(var S=k.transforms.length;w=0;--x)this[v[x]]=null!=h[v[x]]?h[v[x]]:u[v[x]]},extend:{extract:function(){var h=p(this,0,1);p(this,1,0);var u=180/Math.PI*Math.atan2(h.y,h.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(u*Math.PI/180)+this.f*Math.sin(u*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(u*Math.PI/180)+this.e*Math.sin(-u*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),rotation:u,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new t.Matrix(this)}},clone:function(){return new t.Matrix(this)},morph:function(h){return this.destination=new t.Matrix(h),this},multiply:function(h){return new t.Matrix(this.native().multiply((u=h,u instanceof t.Matrix||(u=new t.Matrix(u)),u).native()));var u},inverse:function(){return new t.Matrix(this.native().inverse())},translate:function(h,u){return new t.Matrix(this.native().translate(h||0,u||0))},native:function(){for(var h=t.parser.native.createSVGMatrix(),u=v.length-1;u>=0;u--)h[v[u]]=this[v[u]];return h},toString:function(){return"matrix("+m(this.a)+","+m(this.b)+","+m(this.c)+","+m(this.d)+","+m(this.e)+","+m(this.f)+")"}},parent:t.Element,construct:{ctm:function(){return new t.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof t.Nested){var h=this.rect(1,1),u=h.node.getScreenCTM();return h.remove(),new t.Matrix(u)}return new t.Matrix(this.node.getScreenCTM())}}}),t.Point=t.invent({create:function(h,u){var x;x=Array.isArray(h)?{x:h[0],y:h[1]}:"object"===ae(h)?{x:h.x,y:h.y}:null!=h?{x:h,y:u??h}:{x:0,y:0},this.x=x.x,this.y=x.y},extend:{clone:function(){return new t.Point(this)},morph:function(h,u){return this.destination=new t.Point(h,u),this}}}),t.extend(t.Element,{point:function(h,u){return new t.Point(h,u).transform(this.screenCTM().inverse())}}),t.extend(t.Element,{attr:function(h,u,x){if(null==h){for(h={},x=(u=this.node.attributes).length-1;x>=0;x--)h[u[x].nodeName]=t.regex.isNumber.test(u[x].nodeValue)?parseFloat(u[x].nodeValue):u[x].nodeValue;return h}if("object"===ae(h))for(var k in h)this.attr(k,h[k]);else if(null===u)this.node.removeAttribute(h);else{if(null==u)return null==(u=this.node.getAttribute(h))?t.defaults.attrs[h]:t.regex.isNumber.test(u)?parseFloat(u):u;"stroke-width"==h?this.attr("stroke",parseFloat(u)>0?this._stroke:null):"stroke"==h&&(this._stroke=u),"fill"!=h&&"stroke"!=h||(t.regex.isImage.test(u)&&(u=this.doc().defs().image(u,0,0)),u instanceof t.Image&&(u=this.doc().defs().pattern(0,0,function(){this.add(u)}))),"number"==typeof u?u=new t.Number(u):t.Color.isColor(u)?u=new t.Color(u):Array.isArray(u)&&(u=new t.Array(u)),"leading"==h?this.leading&&this.leading(u):"string"==typeof x?this.node.setAttributeNS(x,h,u.toString()):this.node.setAttribute(h,u.toString()),!this.rebuild||"font-size"!=h&&"x"!=h||this.rebuild(h,u)}return this}}),t.extend(t.Element,{transform:function(h,u){var x;return"object"!==ae(h)?(x=new t.Matrix(this).extract(),"string"==typeof h?x[h]:x):(x=new t.Matrix(this),u=!!u||!!h.relative,null!=h.a&&(x=u?x.multiply(new t.Matrix(h)):new t.Matrix(h)),this.attr("transform",x))}}),t.extend(t.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(t.regex.transforms).slice(0,-1).map(function(h){var u=h.trim().split("(");return[u[0],u[1].split(t.regex.delimiter).map(function(x){return parseFloat(x)})]}).reduce(function(h,u){return"matrix"==u[0]?h.multiply(f(u[1])):h[u[0]].apply(h,u[1])},new t.Matrix)},toParent:function(h){if(this==h)return this;var u=this.screenCTM(),x=h.screenCTM().inverse();return this.addTo(h).untransform().transform(x.multiply(u)),this},toDoc:function(){return this.toParent(this.doc())}}),t.Transformation=t.invent({create:function(h,u){if(arguments.length>1&&"boolean"!=typeof u)return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(h))for(var x=0,k=this.arguments.length;x=0},index:function(h){return[].slice.call(this.node.childNodes).indexOf(h.node)},get:function(h){return t.adopt(this.node.childNodes[h])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(h,u){for(var x=this.children(),k=0,w=x.length;k=0;u--)h.childNodes[u]instanceof y.SVGElement&&b(h.childNodes[u]);return t.adopt(h).id(t.eid(h.nodeName))}function m(h){return Math.abs(h)>1e-37?h:0}["fill","stroke"].forEach(function(h){var u={};u[h]=function(x){if(void 0===x)return this;if("string"==typeof x||t.Color.isRgb(x)||x&&"function"==typeof x.fill)this.attr(h,x);else for(var k=n[h].length-1;k>=0;k--)null!=x[n[h][k]]&&this.attr(n.prefix(h,n[h][k]),x[n[h][k]]);return this},t.extend(t.Element,t.FX,u)}),t.extend(t.Element,t.FX,{translate:function(h,u){return this.transform({x:h,y:u})},matrix:function(h){return this.attr("transform",new t.Matrix(6==arguments.length?[].slice.call(arguments):h))},opacity:function(h){return this.attr("opacity",h)},dx:function(h){return this.x(new t.Number(h).plus(this instanceof t.FX?0:this.x()),!0)},dy:function(h){return this.y(new t.Number(h).plus(this instanceof t.FX?0:this.y()),!0)}}),t.extend(t.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(h){return this.node.getPointAtLength(h)}}),t.Set=t.invent({create:function(h){Array.isArray(h)?this.members=h:this.clear()},extend:{add:function(){for(var h=[].slice.call(arguments),u=0,x=h.length;u-1&&this.members.splice(u,1),this},each:function(h){for(var u=0,x=this.members.length;u=0},index:function(h){return this.members.indexOf(h)},get:function(h){return this.members[h]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members}},construct:{set:function(h){return new t.Set(h)}}}),t.FX.Set=t.invent({create:function(h){this.set=h}}),t.Set.inherit=function(){var h=[];for(var u in t.Shape.prototype)"function"==typeof t.Shape.prototype[u]&&"function"!=typeof t.Set.prototype[u]&&h.push(u);for(var u in h.forEach(function(k){t.Set.prototype[k]=function(){for(var w=0,S=this.members.length;w=0;h--)delete this.memory()[arguments[h]];return this},memory:function(){return this._memory||(this._memory={})}}),t.get=function(h){var u=e.getElementById(function(x){var k=(x||"").toString().match(t.regex.reference);if(k)return k[1]}(h)||h);return t.adopt(u)},t.select=function(h,u){return new t.Set(t.utils.map((u||e).querySelectorAll(h),function(x){return t.adopt(x)}))},t.extend(t.Parent,{select:function(h){return t.select(h,this.node)}});var v="abcdef".split("");if("function"!=typeof y.CustomEvent){var A=function(h,u){u=u||{bubbles:!1,cancelable:!1,detail:void 0};var x=e.createEvent("CustomEvent");return x.initCustomEvent(h,u.bubbles,u.cancelable,u.detail),x};A.prototype=y.Event.prototype,t.CustomEvent=A}else t.CustomEvent=y.CustomEvent;return t},void 0!==(me=function(){return Lt(mt,mt.document)}.call(Fe,J,Fe,_e))&&(_e.exports=me), +/*! svg.filter.js - v2.0.2 - 2016-02-24 + * https://github.com/wout/svg.filter.js + * Copyright (c) 2016 Wout Fierens; Licensed MIT */ +function(){SVG.Filter=SVG.invent({create:"filter",inherit:SVG.Parent,extend:{source:"SourceGraphic",sourceAlpha:"SourceAlpha",background:"BackgroundImage",backgroundAlpha:"BackgroundAlpha",fill:"FillPaint",stroke:"StrokePaint",autoSetIn:!0,put:function(s,n){return this.add(s,n),!s.attr("in")&&this.autoSetIn&&s.attr("in",this.source),s.attr("result")||s.attr("result",s),s},blend:function(s,n,o){return this.put(new SVG.BlendEffect(s,n,o))},colorMatrix:function(s,n){return this.put(new SVG.ColorMatrixEffect(s,n))},convolveMatrix:function(s){return this.put(new SVG.ConvolveMatrixEffect(s))},componentTransfer:function(s){return this.put(new SVG.ComponentTransferEffect(s))},composite:function(s,n,o){return this.put(new SVG.CompositeEffect(s,n,o))},flood:function(s,n){return this.put(new SVG.FloodEffect(s,n))},offset:function(s,n){return this.put(new SVG.OffsetEffect(s,n))},image:function(s){return this.put(new SVG.ImageEffect(s))},merge:function(){var s=[void 0];for(var n in arguments)s.push(arguments[n]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,s)))},gaussianBlur:function(s,n){return this.put(new SVG.GaussianBlurEffect(s,n))},morphology:function(s,n){return this.put(new SVG.MorphologyEffect(s,n))},diffuseLighting:function(s,n,o){return this.put(new SVG.DiffuseLightingEffect(s,n,o))},displacementMap:function(s,n,o,l,c){return this.put(new SVG.DisplacementMapEffect(s,n,o,l,c))},specularLighting:function(s,n,o,l){return this.put(new SVG.SpecularLightingEffect(s,n,o,l))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(s,n,o,l,c){return this.put(new SVG.TurbulenceEffect(s,n,o,l,c))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(s){var n=this.put(new SVG.Filter);return"function"==typeof s&&s.call(n,n),n}}),SVG.extend(SVG.Container,{filter:function(s){return this.defs().filter(s)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(s){return this.filterer=s instanceof SVG.Element?s:this.doc().filter(s),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(s){return this.filterer&&!0===s&&this.filterer.remove(),delete this.filterer,this.attr("filter",null)}}),SVG.Effect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(s){return null==s?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",s)},result:function(s){return null==s?this.attr("result"):this.attr("result",s)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(s){return null==s?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",s)},result:function(s){return null==s?this.attr("result"):this.attr("result",s)},toString:function(){return this.result()}}});var y={blend:function(s,n){return this.parent()&&this.parent().blend(this,s,n)},colorMatrix:function(s,n){return this.parent()&&this.parent().colorMatrix(s,n).in(this)},convolveMatrix:function(s){return this.parent()&&this.parent().convolveMatrix(s).in(this)},componentTransfer:function(s){return this.parent()&&this.parent().componentTransfer(s).in(this)},composite:function(s,n){return this.parent()&&this.parent().composite(this,s,n)},flood:function(s,n){return this.parent()&&this.parent().flood(s,n)},offset:function(s,n){return this.parent()&&this.parent().offset(s,n).in(this)},image:function(s){return this.parent()&&this.parent().image(s)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(s,n){return this.parent()&&this.parent().gaussianBlur(s,n).in(this)},morphology:function(s,n){return this.parent()&&this.parent().morphology(s,n).in(this)},diffuseLighting:function(s,n,o){return this.parent()&&this.parent().diffuseLighting(s,n,o).in(this)},displacementMap:function(s,n,o,l){return this.parent()&&this.parent().displacementMap(this,s,n,o,l)},specularLighting:function(s,n,o,l){return this.parent()&&this.parent().specularLighting(s,n,o,l).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(s,n,o,l,c){return this.parent()&&this.parent().turbulence(s,n,o,l,c).in(this)}};SVG.extend(SVG.Effect,y),SVG.extend(SVG.ParentEffect,y),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(s){this.attr("in",s)}}});var e={blend:function(s,n,o){this.attr({in:s,in2:n,mode:o||"normal"})},colorMatrix:function(s,n){"matrix"==s&&(n=a(n)),this.attr({type:s,values:void 0===n?null:n})},convolveMatrix:function(s){s=a(s),this.attr({order:Math.sqrt(s.split(" ").length),kernelMatrix:s})},composite:function(s,n,o){this.attr({in:s,in2:n,operator:o})},flood:function(s,n){this.attr("flood-color",s),null!=n&&this.attr("flood-opacity",n)},offset:function(s,n){this.attr({dx:s,dy:n})},image:function(s){this.attr("href",s,SVG.xlink)},displacementMap:function(s,n,o,l,c){this.attr({in:s,in2:n,scale:o,xChannelSelector:l,yChannelSelector:c})},gaussianBlur:function(s,n){this.attr("stdDeviation",null!=s||null!=n?function(o){if(!Array.isArray(o))return o;for(var l=0,c=o.length,d=[];l1&&(j*=c=Math.sqrt(c),Z*=c),d=(new SVG.Matrix).rotate(_).scale(1/j,1/Z).rotate(-_),$=$.transform(d),f=(g=[(q=q.transform(d)).x-$.x,q.y-$.y])[0]*g[0]+g[1]*g[1],p=Math.sqrt(f),g[0]/=p,g[1]/=p,b=f<4?Math.sqrt(1-f/4):0,ie===re&&(b*=-1),m=new SVG.Point((q.x+$.x)/2+b*-g[1],(q.y+$.y)/2+b*g[0]),v=new SVG.Point($.x-m.x,$.y-m.y),A=new SVG.Point(q.x-m.x,q.y-m.y),h=Math.acos(v.x/Math.sqrt(v.x*v.x+v.y*v.y)),v.y<0&&(h*=-1),u=Math.acos(A.x/Math.sqrt(A.x*A.x+A.y*A.y)),A.y<0&&(u*=-1),re&&h>u&&(u+=2*Math.PI),!re&&hs.maxX-t.width&&(n=(a=s.maxX-t.width)-this.startPoints.box.x),null!=s.minY&&rs.maxY-t.height&&(o=(r=s.maxY-t.height)-this.startPoints.box.y),null!=s.snapToGrid&&(a-=a%s.snapToGrid,r-=r%s.snapToGrid,n-=n%s.snapToGrid,o-=o%s.snapToGrid),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:n,y:o},!0):this.el.move(a,r));return i},y.prototype.end=function(e){var t=this.drag(e);this.el.fire("dragend",{event:e,p:t,m:this.m,handler:this}),SVG.off(window,"mousemove.drag"),SVG.off(window,"touchmove.drag"),SVG.off(window,"mouseup.drag"),SVG.off(window,"touchend.drag")},SVG.extend(SVG.Element,{draggable:function(e,t){"function"!=typeof e&&"object"!=typeof e||(t=e,e=!0);var i=this.remember("_draggable")||new y(this);return(e=void 0===e||e)?i.init(t||{},e):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}.call(void 0),function(){function y(e){this.el=e,e.remember("_selectHandler",this),this.pointSelection={isSelected:!1},this.rectSelection={isSelected:!1},this.pointsList={lt:[0,0],rt:["width",0],rb:["width","height"],lb:[0,"height"],t:["width",0],r:["width","height"],b:["width","height"],l:[0,"height"]},this.pointCoord=function(t,i,a){var r="string"!=typeof t?t:i[t];return a?r/2:r},this.pointCoords=function(t,i){var a=this.pointsList[t];return{x:this.pointCoord(a[0],i,"t"===t||"b"===t),y:this.pointCoord(a[1],i,"r"===t||"l"===t)}}}y.prototype.init=function(e,t){var i=this.el.bbox();this.options={};var a=this.el.selectize.defaults.points;for(var r in this.el.selectize.defaults)this.options[r]=this.el.selectize.defaults[r],void 0!==t[r]&&(this.options[r]=t[r]);var s=["points","pointsExclude"];for(var r in s){var n=this.options[s[r]];"string"==typeof n?n=n.length>0?n.split(/\s*,\s*/i):[]:"boolean"==typeof n&&"points"===s[r]&&(n=n?a:[]),this.options[s[r]]=n}this.options.points=[a,this.options.points].reduce(function(o,l){return o.filter(function(c){return l.indexOf(c)>-1})}),this.options.points=[this.options.points,this.options.pointsExclude].reduce(function(o,l){return o.filter(function(c){return l.indexOf(c)<0})}),this.parent=this.el.parent(),this.nested=this.nested||this.parent.group(),this.nested.matrix(new SVG.Matrix(this.el).translate(i.x,i.y)),this.options.deepSelect&&-1!==["line","polyline","polygon"].indexOf(this.el.type)?this.selectPoints(e):this.selectRect(e),this.observe(),this.cleanup()},y.prototype.selectPoints=function(e){return this.pointSelection.isSelected=e,this.pointSelection.set||(this.pointSelection.set=this.parent.set(),this.drawPoints()),this},y.prototype.getPointArray=function(){var e=this.el.bbox();return this.el.array().valueOf().map(function(t){return[t[0]-e.x,t[1]-e.y]})},y.prototype.drawPoints=function(){for(var e=this,t=this.getPointArray(),i=0,a=t.length;i0&&this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-n[0]);n=this.checkAspectRatio(n),this.el.move(this.parameters.box.x+n[0],this.parameters.box.y+n[1]).size(this.parameters.box.width-n[0],this.parameters.box.height-n[1])}};break;case"rt":this.calc=function(r,s){var n=this.snapToGrid(r,s,2);if(this.parameters.box.width+n[0]>0&&this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+n[0]);n=this.checkAspectRatio(n,!0),this.el.move(this.parameters.box.x,this.parameters.box.y+n[1]).size(this.parameters.box.width+n[0],this.parameters.box.height-n[1])}};break;case"rb":this.calc=function(r,s){var n=this.snapToGrid(r,s,0);if(this.parameters.box.width+n[0]>0&&this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+n[0]);n=this.checkAspectRatio(n),this.el.move(this.parameters.box.x,this.parameters.box.y).size(this.parameters.box.width+n[0],this.parameters.box.height+n[1])}};break;case"lb":this.calc=function(r,s){var n=this.snapToGrid(r,s,1);if(this.parameters.box.width-n[0]>0&&this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+n[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-n[0]);n=this.checkAspectRatio(n,!0),this.el.move(this.parameters.box.x+n[0],this.parameters.box.y).size(this.parameters.box.width-n[0],this.parameters.box.height+n[1])}};break;case"t":this.calc=function(r,s){var n=this.snapToGrid(r,s,2);if(this.parameters.box.height-n[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y+n[1]).height(this.parameters.box.height-n[1])}};break;case"r":this.calc=function(r,s){var n=this.snapToGrid(r,s,0);if(this.parameters.box.width+n[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).width(this.parameters.box.width+n[0])}};break;case"b":this.calc=function(r,s){var n=this.snapToGrid(r,s,0);if(this.parameters.box.height+n[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).height(this.parameters.box.height+n[1])}};break;case"l":this.calc=function(r,s){var n=this.snapToGrid(r,s,1);if(this.parameters.box.width-n[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x+n[0],this.parameters.box.y).width(this.parameters.box.width-n[0])}};break;case"rot":this.calc=function(r,s){var n=r+this.parameters.p.x,o=s+this.parameters.p.y,l=Math.atan2(this.parameters.p.y-this.parameters.box.y-this.parameters.box.height/2,this.parameters.p.x-this.parameters.box.x-this.parameters.box.width/2),c=Math.atan2(o-this.parameters.box.y-this.parameters.box.height/2,n-this.parameters.box.x-this.parameters.box.width/2),d=this.parameters.rotation+180*(c-l)/Math.PI+this.options.snapToAngle/2;this.el.center(this.parameters.box.cx,this.parameters.box.cy).rotate(d-d%this.options.snapToAngle,this.parameters.box.cx,this.parameters.box.cy)};break;case"point":this.calc=function(r,s){var n=this.snapToGrid(r,s,this.parameters.pointCoords[0],this.parameters.pointCoords[1]),o=this.el.array().valueOf();o[this.parameters.i][0]=this.parameters.pointCoords[0]+n[0],o[this.parameters.i][1]=this.parameters.pointCoords[1]+n[1],this.el.plot(o)}}this.el.fire("resizestart",{dx:this.parameters.x,dy:this.parameters.y,event:e}),SVG.on(window,"touchmove.resize",function(r){t.update(r||window.event)}),SVG.on(window,"touchend.resize",function(){t.done()}),SVG.on(window,"mousemove.resize",function(r){t.update(r||window.event)}),SVG.on(window,"mouseup.resize",function(){t.done()})},y.prototype.update=function(e){if(e){var t=this._extractPosition(e),i=this.transformPoint(t.x,t.y),a=i.x-this.parameters.p.x,r=i.y-this.parameters.p.y;this.lastUpdateCall=[a,r],this.calc(a,r),this.el.fire("resizing",{dx:a,dy:r,event:e})}else this.lastUpdateCall&&this.calc(this.lastUpdateCall[0],this.lastUpdateCall[1])},y.prototype.done=function(){this.lastUpdateCall=null,SVG.off(window,"mousemove.resize"),SVG.off(window,"mouseup.resize"),SVG.off(window,"touchmove.resize"),SVG.off(window,"touchend.resize"),this.el.fire("resizedone")},y.prototype.snapToGrid=function(e,t,i,a){var r;return r=void 0!==a?[(i+e)%this.options.snapToGrid,(a+t)%this.options.snapToGrid]:[(this.parameters.box.x+e+(1&(i=i??3)?0:this.parameters.box.width))%this.options.snapToGrid,(this.parameters.box.y+t+(2&i?0:this.parameters.box.height))%this.options.snapToGrid],e<0&&(r[0]-=this.options.snapToGrid),t<0&&(r[1]-=this.options.snapToGrid),e-=Math.abs(r[0])n.maxX&&(e=n.maxX-r),void 0!==n.minY&&s+tn.maxY&&(t=n.maxY-s),[e,t]},y.prototype.checkAspectRatio=function(e,t){if(!this.options.saveAspectRatio)return e;var i=e.slice(),a=this.parameters.box.width/this.parameters.box.height,r=this.parameters.box.width+e[0],s=this.parameters.box.height-e[1],n=r/s;return na&&(i[0]=this.parameters.box.width-s*a,t&&(i[0]=-i[0])),i},SVG.extend(SVG.Element,{resize:function(e){return(this.remember("_resizeHandler")||new y(this)).init(e||{}),this}}),SVG.Element.prototype.resize.defaults={snapToAngle:.1,snapToGrid:1,constraint:{},saveAspectRatio:!1}}).call(this)}(),void 0===window.Apex&&(window.Apex={});var Pt=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new ye(this.ctx),this.ctx.axes=new lt(this.ctx),this.ctx.core=new jt(this.ctx.el,this.ctx),this.ctx.config=new Pe({}),this.ctx.data=new et(this.ctx),this.ctx.grid=new tt(this.ctx),this.ctx.graphics=new E(this.ctx),this.ctx.coreUtils=new te(this.ctx),this.ctx.crosshairs=new Ve(this.ctx),this.ctx.events=new nt(this.ctx),this.ctx.exports=new Ee(this.ctx),this.ctx.localization=new ot(this.ctx),this.ctx.options=new le,this.ctx.responsive=new ht(this.ctx),this.ctx.series=new ge(this.ctx),this.ctx.theme=new ct(this.ctx),this.ctx.formatters=new Ce(this.ctx),this.ctx.titleSubtitle=new dt(this.ctx),this.ctx.legend=new U(this.ctx),this.ctx.toolbar=new X(this.ctx),this.ctx.tooltip=new wt(this.ctx),this.ctx.dimensions=new Ye(this.ctx),this.ctx.updateHelpers=new _t(this.ctx),this.ctx.zoomPanSelection=new N(this.ctx),this.ctx.w.globals.tooltip=new wt(this.ctx)}}]),y}(),Mt=function(){function y(e){F(this,y),this.ctx=e,this.w=e.w}return D(y,[{key:"clear",value:function(e){var t=e.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:t})}},{key:"killSVG",value:function(e){e.each(function(t,i){this.removeClass("*"),this.off(),this.stop()},!0),e.ungroup(),e.clear()}},{key:"clearDomElements",value:function(e){var t=this,a=this.w.globals.dom.Paper.node;a.parentNode&&a.parentNode.parentNode&&!e.isUpdating&&(a.parentNode.parentNode.style.minHeight="unset");var r=this.w.globals.dom.baseEl;r&&this.ctx.eventList.forEach(function(n){r.removeEventListener(n,t.ctx.events.documentEvent)});var s=this.w.globals.dom;if(null!==this.ctx.el)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(s.Paper),s.Paper.remove(),s.elWrap=null,s.elGraphical=null,s.elLegendWrap=null,s.elLegendForeign=null,s.baseEl=null,s.elGridRect=null,s.elGridRectMask=null,s.elGridRectMarkerMask=null,s.elForecastMask=null,s.elNonForecastMask=null,s.elDefs=null}}]),y}(),vt=new WeakMap,Ut=function(){function y(e,t){F(this,y),this.opts=t,this.ctx=this,this.w=new rt(t).init(),this.el=e,this.w.globals.cuid=M.randomId(),this.w.globals.chartID=this.w.config.chart.id?M.escapeString(this.w.config.chart.id):this.w.globals.cuid,new Pt(this).initModules(),this.create=M.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return D(y,[{key:"render",value:function(){var e=this;return new Promise(function(t,i){if(null!==e.el){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),e.w.config.chart.id&&Apex._chartInstances.push({id:e.w.globals.chartID,group:e.w.config.chart.group,chart:e}),e.setLocale(e.w.config.chart.defaultLocale);var a=e.w.config.chart.events.beforeMount;"function"==typeof a&&a(e,e.w),e.events.fireEvent("beforeMount",[e,e.w]),window.addEventListener("resize",e.windowResizeHandler),function(g,p){var f=!1;if(g.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var b=g.getBoundingClientRect();"none"!==g.style.display&&0!==b.width||(f=!0)}var m=new ResizeObserver(function(v){f&&p.call(g,v),f=!0});g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(g.children).forEach(function(v){return m.observe(v)}):m.observe(g),vt.set(p,m)}(e.el.parentNode,e.parentResizeHandler);var r=e.el.getRootNode&&e.el.getRootNode(),s=M.is("ShadowRoot",r),n=e.el.ownerDocument,o=s?r.getElementById("apexcharts-css"):n.getElementById("apexcharts-css");if(!o){var l;(o=document.createElement("style")).id="apexcharts-css",o.textContent='@keyframes opaque {\n 0% {\n opacity: 0\n }\n\n to {\n opacity: 1\n }\n}\n\n@keyframes resizeanim {\n 0%,to {\n opacity: 0\n }\n}\n\n.apexcharts-canvas {\n position: relative;\n user-select: none\n}\n\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0,0,0,.5);\n box-shadow: 0 0 1px rgba(255,255,255,.5);\n -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5)\n}\n\n.apexcharts-inner {\n position: relative\n}\n\n.apexcharts-text tspan {\n font-family: inherit\n}\n\n.legend-mouseover-inactive {\n transition: .15s ease all;\n opacity: .2\n}\n\n.apexcharts-legend-text {\n padding-left: 15px;\n margin-left: -15px;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0\n}\n\n.apexcharts-tooltip {\n border-radius: 5px;\n box-shadow: 2px 2px 6px -4px #999;\n cursor: default;\n font-size: 14px;\n left: 62px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 20px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n white-space: nowrap;\n z-index: 12;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n border: 1px solid #e3e3e3;\n background: rgba(255,255,255,.96)\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n color: #fff;\n background: rgba(30,30,30,.8)\n}\n\n.apexcharts-tooltip * {\n font-family: inherit\n}\n\n.apexcharts-tooltip-title {\n padding: 6px;\n font-size: 15px;\n margin-bottom: 4px\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n background: #eceff1;\n border-bottom: 1px solid #ddd\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: rgba(0,0,0,.7);\n border-bottom: 1px solid #333\n}\n\n.apexcharts-tooltip-text-goals-value,.apexcharts-tooltip-text-y-value,.apexcharts-tooltip-text-z-value {\n display: inline-block;\n margin-left: 5px;\n font-weight: 600\n}\n\n.apexcharts-tooltip-text-goals-label:empty,.apexcharts-tooltip-text-goals-value:empty,.apexcharts-tooltip-text-y-label:empty,.apexcharts-tooltip-text-y-value:empty,.apexcharts-tooltip-text-z-value:empty,.apexcharts-tooltip-title:empty {\n display: none\n}\n\n.apexcharts-tooltip-text-goals-label,.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px\n}\n\n.apexcharts-tooltip-goals-group,.apexcharts-tooltip-text-goals-label,.apexcharts-tooltip-text-goals-value {\n display: flex\n}\n\n.apexcharts-tooltip-text-goals-label:not(:empty),.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px\n}\n\n.apexcharts-tooltip-marker {\n width: 12px;\n height: 12px;\n position: relative;\n top: 0;\n margin-right: 10px;\n border-radius: 50%\n}\n\n.apexcharts-tooltip-series-group {\n padding: 0 10px;\n display: none;\n text-align: left;\n justify-content: left;\n align-items: center\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 4px\n}\n\n.apexcharts-tooltip-series-group-hidden {\n opacity: 0;\n height: 0;\n line-height: 0;\n padding: 0!important\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px\n}\n\n.apexcharts-custom-tooltip,.apexcharts-tooltip-box {\n padding: 4px 8px\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0,0,0,.7);\n border: 1px solid rgba(0,0,0,.5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0,0,0,.5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0,0,0,.5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0,0,0,.7);\n border: 1px solid rgba(0,0,0,.5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0,0,0,.5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0,0,0,.5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_boundingRect,.svg_select_points_rot {\n pointer-events: none;\n opacity: 0;\n visibility: hidden\n}\n\n.apexcharts-selection-rect+g .svg_select_boundingRect,.apexcharts-selection-rect+g .svg_select_points_rot {\n opacity: 0;\n visibility: hidden\n}\n\n.apexcharts-selection-rect+g .svg_select_points_l,.apexcharts-selection-rect+g .svg_select_points_r {\n cursor: ew-resize;\n opacity: 1;\n visibility: visible\n}\n\n.svg_select_points {\n fill: #efefef;\n stroke: #333;\n rx: 2\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,.apexcharts-pan-icon,.apexcharts-reset-icon,.apexcharts-selection-icon,.apexcharts-toolbar-custom-icon,.apexcharts-zoom-icon,.apexcharts-zoomin-icon,.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,.apexcharts-reset-icon svg,.apexcharts-zoom-icon svg,.apexcharts-zoomin-icon svg,.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,.apexcharts-theme-dark .apexcharts-pan-icon svg,.apexcharts-theme-dark .apexcharts-reset-icon svg,.apexcharts-theme-dark .apexcharts-selection-icon svg,.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,.apexcharts-theme-dark .apexcharts-zoom-icon svg,.apexcharts-theme-dark .apexcharts-zoomin-icon svg,.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,.apexcharts-theme-light .apexcharts-reset-icon:hover svg,.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,.apexcharts-reset-icon,.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0,0,0,.7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,.apexcharts-datalabel.apexcharts-element-hidden,.apexcharts-hide .apexcharts-series-points {\n opacity: 0\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n.apexcharts-datalabel,.apexcharts-datalabel-label,.apexcharts-datalabel-value,.apexcharts-datalabels,.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,.apexcharts-area-series .apexcharts-area,.apexcharts-area-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,.apexcharts-gridline,.apexcharts-line,.apexcharts-line-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,.apexcharts-point-annotation-label,.apexcharts-radar-series path,.apexcharts-radar-series polygon,.apexcharts-toolbar svg,.apexcharts-tooltip .apexcharts-marker,.apexcharts-xaxis-annotation-label,.apexcharts-yaxis-annotation-label,.apexcharts-zoom-rect {\n pointer-events: none\n}\n\n.apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,.resize-triggers,.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers{\n pointer-events: none\n}\n\n.apexcharts-bar-shadows{\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers{\n pointer-events: none\n}';var c=(null===(l=e.opts.chart)||void 0===l?void 0:l.nonce)||e.w.config.chart.nonce;c&&o.setAttribute("nonce",c),s?r.prepend(o):n.head.appendChild(o)}var d=e.create(e.w.config.series,{});if(!d)return t(e);e.mount(d).then(function(){"function"==typeof e.w.config.chart.events.mounted&&e.w.config.chart.events.mounted(e,e.w),e.events.fireEvent("mounted",[e,e.w]),t(d)}).catch(function(g){i(g)})}else i(new Error("Element not found"))})}},{key:"create",value:function(e,t){var i=this.w;new Pt(this).initModules();var a=this.w.globals;if(a.noData=!1,a.animationEnded=!1,this.responsive.checkResponsiveConfig(t),i.config.xaxis.convertedCatToNumeric&&new Le(i.config).convertCatToNumericXaxis(i.config,this.ctx),null===this.el||(this.core.setupElements(),"treemap"===i.config.chart.type&&(i.config.grid.show=!1,i.config.yaxis[0].show=!1),0===a.svgWidth))return a.animationEnded=!0,null;var r=te.checkComboSeries(e,i.config.chart.type);a.comboCharts=r.comboCharts,a.comboBarCount=r.comboBarCount;var s=e.every(function(c){return c.data&&0===c.data.length});(0===e.length||s&&a.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(e),this.theme.init(),new Me(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),a.noData&&a.collapsedSeries.length!==a.series.length&&!i.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),a.axisCharts&&(this.core.coreCalculations(),"category"!==i.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=i.globals.minX,this.ctx.toolbar.maxX=i.globals.maxX),this.formatters.heatmapLabelFormatters(),new te(this).getLargestMarkerSize(),this.dimensions.plotCoords();var n=this.core.xySettings();this.grid.createGridMask();var o=this.core.plotChartType(e,n),l=new Ae(this);return l.bringForward(),i.config.dataLabels.background.enabled&&l.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:o,xyRatios:n,dimensions:{plot:{left:i.globals.translateX,top:i.globals.translateY,width:i.globals.gridWidth,height:i.globals.gridHeight}}}}},{key:"mount",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise(function(r,s){if(null===i.el)return s(new Error("Not enough data to display or target element not found"));(null===t||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new tt(i);var n,o,l=i.grid.drawGrid();if(i.annotations=new st(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position&&(l&&a.globals.dom.elGraphical.add(l.el),null!=l&&null!==(n=l.elGridBorders)&&void 0!==n&&n.node&&a.globals.dom.elGraphical.add(l.elGridBorders)),Array.isArray(t.elGraph))for(var c=0;c0&&a.globals.memory.methodsToExec.forEach(function(f){f.method(f.params,!1,f.context)}),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),r(i)})}},{key:"destroy",value:function(){var e,t;window.removeEventListener("resize",this.windowResizeHandler),(t=vt.get(e=this.parentResizeHandler))&&(t.disconnect(),vt.delete(e));var i=this.w.config.chart.id;i&&Apex._chartInstances.forEach(function(a,r){a.id===M.escapeString(i)&&Apex._chartInstances.splice(r,1)}),new Mt(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=this.w;return n.globals.selection=void 0,e.series&&(this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map(function(o,l){return t.updateHelpers._extendSeries(o,l)})),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),n.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,i,a,r,s)}},{key:"updateSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,t,i)}},{key:"appendSeries",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w.config.series.slice();return a.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,t,i)}},{key:"appendData",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),r=0;r0&&void 0!==arguments[0])||arguments[0],!(arguments.length>1&&void 0!==arguments[1])||arguments[1])}},{key:"addEventListener",value:function(e,t){this.events.addEventListener(e,t)}},{key:"removeEventListener",value:function(e,t){this.events.removeEventListener(e,t)}},{key:"addXaxisAnnotation",value:function(e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a)}},{key:"addYaxisAnnotation",value:function(e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a)}},{key:"addPointAnnotation",value:function(e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a)}},{key:"clearAnnotations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=this;e&&(t=e),t.annotations.clearAnnotations(t)}},{key:"removeAnnotation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;t&&(i=t),i.annotations.removeAnnotation(i,e)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(e,t){return this.coreUtils.getSeriesTotalsXRange(e,t)}},{key:"getHighestValueInSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new We(this.ctx).getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new We(this.ctx).getMinYMaxY(e).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(e,t){return this.updateHelpers.toggleDataPointSelection(e,t)}},{key:"zoomX",value:function(e,t){this.ctx.toolbar.zoomUpdateOptions(e,t)}},{key:"setLocale",value:function(e){this.localization.setCurrentLocaleValues(e)}},{key:"dataURI",value:function(e){return new Ee(this.ctx).dataURI(e)}},{key:"exportToCSV",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ee(this.ctx).exportToCSV(e)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var e=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){e.w.globals.resized=!0,e.w.globals.dataChanged=!1,e.ctx.update()},150)}},{key:"_windowResizeHandler",value:function(){var e=this.w.config.chart.redrawOnWindowResize;"function"==typeof e&&(e=e()),e&&this._windowResize()}}],[{key:"getChartByID",value:function(e){var t=M.escapeString(e);if(Apex._chartInstances){var i=Apex._chartInstances.filter(function(a){return a.id===t})[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),t=0;t2?r-2:0),n=2;nTest your gaming music knowledge w

- + diff --git a/runtime.637b14f1f1d12932.js b/runtime.00f6657d67cf1530.js similarity index 97% rename from runtime.637b14f1f1d12932.js rename to runtime.00f6657d67cf1530.js index b061de1..5ec1134 100644 --- a/runtime.637b14f1f1d12932.js +++ b/runtime.00f6657d67cf1530.js @@ -1 +1 @@ -(()=>{"use strict";var e,v={},m={};function r(e){var n=m[e];if(void 0!==n)return n.exports;var t=m[e]={exports:{}};return v[e](t,t.exports,r),t.exports}r.m=v,e=[],r.O=(n,t,i,o)=>{if(!t){var a=1/0;for(f=0;f=o)&&Object.keys(r.O).every(b=>r.O[b](t[c]))?t.splice(c--,1):(l=!1,o0&&e[f-1][2]>o;f--)e[f]=e[f-1];e[f]=[t,i,o]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>(592===e?"common":e)+"."+{26:"6c34b1e2fe895916",83:"19f9d4be6c67938e",219:"6877c9cf834db546",434:"eabfb462d217b1bf",592:"3adb3ec903dc239e",624:"f5f4c11da2b94909",683:"a77eb9e40cb4b717",780:"1a7bae232be728ba",813:"830114464f1dbbcb",939:"4b723b07380bb18f",971:"447f52b18fa6b5b4"}[e]+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="vgmq:";r.l=(t,i,o,f)=>{if(e[t])e[t].push(i);else{var a,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u{a.onerror=a.onload=null,clearTimeout(p);var _=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),_&&_.forEach(h=>h(b)),g)return g(b)},p=setTimeout(s.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=s.bind(null,a.onerror),a.onload=s.bind(null,a.onload),l&&document.head.appendChild(a)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={666:0};r.f.j=(i,o)=>{var f=r.o(e,i)?e[i]:void 0;if(0!==f)if(f)o.push(f[2]);else if(666!=i){var a=new Promise((d,s)=>f=e[i]=[d,s]);o.push(f[2]=a);var l=r.p+r.u(i),c=new Error;r.l(l,d=>{if(r.o(e,i)&&(0!==(f=e[i])&&(e[i]=void 0),f)){var s=d&&("load"===d.type?"missing":d.type),p=d&&d.target&&d.target.src;c.message="Loading chunk "+i+" failed.\n("+s+": "+p+")",c.name="ChunkLoadError",c.type=s,c.request=p,f[1](c)}},"chunk-"+i,i)}else e[i]=0},r.O.j=i=>0===e[i];var n=(i,o)=>{var c,u,[f,a,l]=o,d=0;if(f.some(p=>0!==e[p])){for(c in a)r.o(a,c)&&(r.m[c]=a[c]);if(l)var s=l(r)}for(i&&i(o);d{"use strict";var e,v={},m={};function r(e){var n=m[e];if(void 0!==n)return n.exports;var t=m[e]={exports:{}};return v[e](t,t.exports,r),t.exports}r.m=v,e=[],r.O=(n,t,i,o)=>{if(!t){var a=1/0;for(f=0;f=o)&&Object.keys(r.O).every(b=>r.O[b](t[c]))?t.splice(c--,1):(l=!1,o0&&e[f-1][2]>o;f--)e[f]=e[f-1];e[f]=[t,i,o]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>(592===e?"common":e)+"."+{26:"6c34b1e2fe895916",83:"19f9d4be6c67938e",219:"6877c9cf834db546",434:"eabfb462d217b1bf",592:"3adb3ec903dc239e",624:"f5f4c11da2b94909",683:"a77eb9e40cb4b717",780:"c8cf0f07f915106a",813:"830114464f1dbbcb",939:"4b723b07380bb18f",971:"447f52b18fa6b5b4"}[e]+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="vgmq:";r.l=(t,i,o,f)=>{if(e[t])e[t].push(i);else{var a,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u{a.onerror=a.onload=null,clearTimeout(p);var _=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),_&&_.forEach(h=>h(b)),g)return g(b)},p=setTimeout(s.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=s.bind(null,a.onerror),a.onload=s.bind(null,a.onload),l&&document.head.appendChild(a)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={666:0};r.f.j=(i,o)=>{var f=r.o(e,i)?e[i]:void 0;if(0!==f)if(f)o.push(f[2]);else if(666!=i){var a=new Promise((d,s)=>f=e[i]=[d,s]);o.push(f[2]=a);var l=r.p+r.u(i),c=new Error;r.l(l,d=>{if(r.o(e,i)&&(0!==(f=e[i])&&(e[i]=void 0),f)){var s=d&&("load"===d.type?"missing":d.type),p=d&&d.target&&d.target.src;c.message="Loading chunk "+i+" failed.\n("+s+": "+p+")",c.name="ChunkLoadError",c.type=s,c.request=p,f[1](c)}},"chunk-"+i,i)}else e[i]=0},r.O.j=i=>0===e[i];var n=(i,o)=>{var c,u,[f,a,l]=o,d=0;if(f.some(p=>0!==e[p])){for(c in a)r.o(a,c)&&(r.m[c]=a[c]);if(l)var s=l(r)}for(i&&i(o);d