-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path7-es5.70185415bd87b6a472fb.js
1 lines (1 loc) · 44.4 KB
/
7-es5.70185415bd87b6a472fb.js
1
function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,a){return t&&_defineProperties(e.prototype,t),a&&_defineProperties(e,a),e}(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{"w1+i":function(e,t,a){"use strict";a.r(t);var n=a("ofXK"),o=a("tyNb"),i=a("fXoL"),c=a("XiUz"),r=a("wZkO");function l(e,t){if(1&e&&(i.Sb(0,"a",6,7),i.Bc(2),i.Rb()),2&e){var a=t.$implicit,n=i.oc(1);i.jc("routerLink",a.link)("active",n.isActive),i.Bb(2),i.Dc(" ",a.label," ")}}var s,u=((s=function(){function e(){_classCallCheck(this,e),this.navLinks=[{label:"Graphique",link:"graphique",index:0},{label:"Carte",link:"carte",index:1}]}return _createClass(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||s)},s.\u0275cmp=i.Hb({type:s,selectors:[["app-global"]],decls:7,vars:1,consts:[["fxFill","",1,"noScroll"],["fxFlex","","fxLayout","column"],["fxFlex","50px"],["mat-tab-nav-bar",""],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"ngFor","ngForOf"],["fxFlex","",1,"noScroll"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],["rla","routerLinkActive"]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"div",1),i.Sb(2,"div",2),i.Sb(3,"nav",3),i.Ac(4,l,3,3,"a",4),i.Rb(),i.Rb(),i.Sb(5,"div",5),i.Ob(6,"router-outlet"),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.Bb(4),i.jc("ngForOf",t.navLinks))},directives:[c.f,c.b,c.d,r.b,n.j,o.f,o.d,r.a,o.c],styles:[".mat-tab-label[_ngcontent-%COMP%], .mat-tab-link[_ngcontent-%COMP%], .mat-tab-links[_ngcontent-%COMP%]{height:50px}.mat-tab-label-active[_ngcontent-%COMP%]{font-weight:700}.scrollable[_ngcontent-%COMP%]{overflow:auto}.noScroll[_ngcontent-%COMP%]{overflow:hidden;flex-wrap:nowrap}"]}),s),d=a("PPqH"),b=a("4R65"),f=a("WYmB"),p=a("9KmE"),g=a("tk/3"),h=a("/qmH"),v=a("bTqV"),m=a("OwhE"),y=a("f0Cb"),R=a("kmnG"),S=a("d3UM"),x=a("qFsG"),C=a("iadO"),D=a("FKr1"),B=a("NFeN"),L=a("znSr");function I(e,t){if(1&e&&(i.Sb(0,"mat-option",42),i.Bc(1),i.Rb()),2&e){var a=t.$implicit;i.jc("value",a),i.Bb(1),i.Dc(" ",a," ")}}function k(e,t){if(1&e){var a=i.Tb();i.Sb(0,"div",33),i.Sb(1,"div",34),i.Sb(2,"h1"),i.Bc(3," Param\xe8tres "),i.Rb(),i.Rb(),i.Ob(4,"mat-divider"),i.Sb(5,"div",27),i.Sb(6,"div",34),i.Sb(7,"h3"),i.Bc(8," Type de donn\xe9es "),i.Rb(),i.Rb(),i.Sb(9,"div",35),i.Sb(10,"mat-form-field"),i.Sb(11,"mat-select",36),i.ac("selectionChange",(function(){return i.rc(a),i.ec().updateStyleMap()}))("valueChange",(function(e){return i.rc(a),i.ec().selectedTypeGraph=e})),i.Ac(12,I,2,2,"mat-option",37),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(13,"div",27),i.Sb(14,"div",34),i.Sb(15,"h3"),i.Bc(16," Choix Date "),i.Rb(),i.Rb(),i.Sb(17,"div",35),i.Sb(18,"mat-form-field",38),i.Sb(19,"input",39),i.ac("dateChange",(function(e){return i.rc(a),i.ec().dateChanged(e.value)})),i.Rb(),i.Ob(20,"mat-datepicker-toggle",40),i.Ob(21,"mat-datepicker",null,41),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){var n=i.oc(22),o=i.ec();i.Bb(11),i.jc("value",o.selectedTypeGraph),i.Bb(1),i.jc("ngForOf",o.listTypeGraph),i.Bb(7),i.jc("value",o.selectedDate)("min",o.minDate)("max",o.maxDate)("matDatepicker",n),i.Bb(1),i.jc("for",n)}}function w(e,t){1&e&&(i.Sb(0,"mat-icon"),i.Bc(1," keyboard_arrow_left "),i.Rb())}function O(e,t){1&e&&(i.Sb(0,"mat-icon"),i.Bc(1," keyboard_arrow_right "),i.Rb())}function M(e,t){if(1&e&&(i.Sb(0,"h1",43),i.Bc(1),i.Rb()),2&e){var a=i.ec();i.Bb(1),i.Dc(" ",a.onHoverLegendInfos," ")}}function E(e,t){if(1&e&&(i.Sb(0,"h2",21),i.Bc(1),i.Rb()),2&e){var a=i.ec(2);i.Bb(1),i.Dc(" ",a.onHoverLegendInfosValue," Cas ")}}function T(e,t){if(1&e&&(i.Sb(0,"div",46),i.Sb(1,"h2",47),i.Bc(2),i.Rb(),i.Rb()),2&e){var a=i.ec(2);i.Bb(2),i.Dc(" Taux ",a.onHoverLegendInfosValue," ")}}function A(e,t){1&e&&(i.Sb(0,"span"),i.Bc(1,"+"),i.Rb())}var G=function(e,t){return{red:e,green:t}};function j(e,t){if(1&e&&(i.Sb(0,"span",48),i.Bc(1," ( "),i.Ac(2,A,2,0,"span",7),i.Bc(3),i.Rb()),2&e){var a=i.ec(2);i.jc("ngClass",i.mc(3,G,a.onHoverLegendInfosValueDayBefore>0,a.onHoverLegendInfosValueDayBefore<0)),i.Bb(2),i.jc("ngIf",a.onHoverLegendInfosValueDayBefore>=0),i.Bb(1),i.Dc(" ",a.onHoverLegendInfosValueDayBefore,") ")}}function F(e,t){1&e&&(i.Sb(0,"span"),i.Bc(1,"+"),i.Rb())}function P(e,t){if(1&e&&(i.Sb(0,"span",48),i.Bc(1," ( "),i.Ac(2,F,2,0,"span",7),i.Bc(3),i.Rb()),2&e){var a=i.ec(2);i.jc("ngClass",i.mc(3,G,a.onHoverLegendInfosValueDayBefore<0,a.onHoverLegendInfosValueDayBefore>0)),i.Bb(2),i.jc("ngIf",a.onHoverLegendInfosValueDayBefore>=0),i.Bb(1),i.Dc(" ",a.onHoverLegendInfosValueDayBefore,") ")}}function V(e,t){if(1&e&&(i.Sb(0,"div",28),i.Ac(1,E,2,1,"h2",44),i.Ac(2,T,3,1,"div",45),i.Bc(3," \xa0 "),i.Sb(4,"h2",28),i.Ac(5,j,4,6,"span",25),i.Ac(6,P,4,6,"span",25),i.Rb(),i.Rb()),2&e){var a=i.ec();i.Bb(1),i.jc("ngIf",!a.miseEnFormeLegendBottomTitle()),i.Bb(1),i.jc("ngIf",a.miseEnFormeLegendBottomTitle()),i.Bb(3),i.jc("ngIf",a.isColorInversed),i.Bb(1),i.jc("ngIf",!a.isColorInversed)}}function _(e,t){1&e&&(i.Sb(0,"div",28),i.Sb(1,"h2"),i.Bc(2," Donn\xe9es non disponible "),i.Rb(),i.Rb())}function H(e,t){1&e&&(i.Sb(0,"div",28),i.Sb(1,"h2"),i.Bc(2," Selectionnez un pays... "),i.Rb(),i.Rb())}function q(e,t){1&e&&(i.Sb(0,"span"),i.Bc(1,"+"),i.Rb())}function z(e,t){if(1&e&&(i.Sb(0,"span",48),i.Bc(1," ( "),i.Ac(2,q,2,0,"span",7),i.Bc(3),i.Rb()),2&e){var a=i.ec();i.jc("ngClass",i.mc(3,G,a.onHoverLegendInfosValueMinDayBefore>0,a.onHoverLegendInfosValueMinDayBefore<0)),i.Bb(2),i.jc("ngIf",a.onHoverLegendInfosValueMinDayBefore>0),i.Bb(1),i.Dc(" ",a.onHoverLegendInfosValueMinDayBefore,") ")}}function N(e,t){1&e&&(i.Sb(0,"span"),i.Bc(1,"+"),i.Rb())}function Y(e,t){if(1&e&&(i.Sb(0,"span",48),i.Bc(1," ( "),i.Ac(2,N,2,0,"span",7),i.Bc(3),i.Rb()),2&e){var a=i.ec();i.jc("ngClass",i.mc(3,G,a.onHoverLegendInfosValueMinDayBefore<0,a.onHoverLegendInfosValueMinDayBefore>0)),i.Bb(2),i.jc("ngIf",a.onHoverLegendInfosValueMinDayBefore>0),i.Bb(1),i.Dc(" ",a.onHoverLegendInfosValueMinDayBefore,") ")}}function U(e,t){1&e&&(i.Sb(0,"span"),i.Bc(1,"+"),i.Rb())}function $(e,t){if(1&e&&(i.Sb(0,"span",48),i.Bc(1," ( "),i.Ac(2,U,2,0,"span",7),i.Bc(3),i.Rb()),2&e){var a=i.ec();i.jc("ngClass",i.mc(3,G,a.onHoverLegendInfosValuemaxDayBefore>0,a.onHoverLegendInfosValuemaxDayBefore<0)),i.Bb(2),i.jc("ngIf",a.onHoverLegendInfosValuemaxDayBefore>0),i.Bb(1),i.Dc(" ",a.onHoverLegendInfosValuemaxDayBefore,") ")}}function X(e,t){1&e&&(i.Sb(0,"span"),i.Bc(1,"+"),i.Rb())}function K(e,t){if(1&e&&(i.Sb(0,"span",48),i.Bc(1," ( "),i.Ac(2,X,2,0,"span",7),i.Bc(3),i.Rb()),2&e){var a=i.ec();i.jc("ngClass",i.mc(3,G,a.onHoverLegendInfosValuemaxDayBefore<0,a.onHoverLegendInfosValuemaxDayBefore>0)),i.Bb(2),i.jc("ngIf",a.onHoverLegendInfosValuemaxDayBefore>0),i.Bb(1),i.Dc(" ",a.onHoverLegendInfosValuemaxDayBefore,") ")}}function J(e,t){1&e&&(i.Sb(0,"span"),i.Bc(1,"+"),i.Rb())}function Q(e,t){if(1&e&&(i.Sb(0,"span",48),i.Bc(1," ( "),i.Ac(2,J,2,0,"span",7),i.Bc(3),i.Rb()),2&e){var a=i.ec();i.jc("ngClass",i.mc(3,G,a.onHoverLegendInfosValueMeanDayBefore>0,a.onHoverLegendInfosValueMeanDayBefore<0)),i.Bb(2),i.jc("ngIf",a.onHoverLegendInfosValueMeanDayBefore>0),i.Bb(1),i.Dc(" ",a.onHoverLegendInfosValueMeanDayBefore,") ")}}function W(e,t){1&e&&(i.Sb(0,"span"),i.Bc(1,"+"),i.Rb())}function Z(e,t){if(1&e&&(i.Sb(0,"span",48),i.Bc(1," ( "),i.Ac(2,W,2,0,"span",7),i.Bc(3),i.Rb()),2&e){var a=i.ec();i.jc("ngClass",i.mc(3,G,a.onHoverLegendInfosValueMeanDayBefore<0,a.onHoverLegendInfosValueMeanDayBefore>0)),i.Bb(2),i.jc("ngIf",a.onHoverLegendInfosValueMeanDayBefore>0),i.Bb(1),i.Dc(" ",a.onHoverLegendInfosValueMeanDayBefore,") ")}}function ee(e,t){if(1&e&&(i.Sb(0,"span"),i.Bc(1),i.Rb()),2&e){var a=i.ec();i.Bb(1),i.Dc("Cas ",a.selectedTypeGraph,"")}}function te(e,t){if(1&e&&(i.Sb(0,"span"),i.Bc(1),i.Rb()),2&e){var a=i.ec();i.Bb(1),i.Cc(a.selectedTypeGraph)}}function ae(e,t){1&e&&(i.Sb(0,"span"),i.Bc(1,"pour 100 personnes"),i.Rb())}function ne(e,t){1&e&&i.Ob(0,"div",49),2&e&&i.yc("background: ",t.$implicit,"")}function oe(e,t){if(1&e&&(i.Sb(0,"div"),i.Bc(1),i.Rb()),2&e){var a=t.$implicit;i.Bb(1),i.Cc(a)}}var ie,ce=function(e){return{bottom:!1,right:e,top:!1,left:!1}},re=300,le={color:"#4974ff",fillOpacity:.7,weight:2},se={weight:5,color:"white"},ue=((ie=function(){function e(t,a){_classCallCheck(this,e),this.http=t,this.ref=a,this.leafletOptions={layers:[Object(b.tileLayer)("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:18,attribution:"Bastien MAURICE"})],zoom:3,center:Object(b.latLng)(46.303558,6.0164252)},this.widthSidebar=re,this.isOpenSidebar=!0,this.selectedTypeGraph=d.a.CONFIRMED,this.selectedLegendColorGradient=f.c,this.listTypeGraph=[d.a.CONFIRMED,d.a.DEATH,d.a.ACTIVE,d.a.RECOVERED,d.a.RECOVERY_RATE,d.a.MORTALITY_RATE],this.selectedLegendInfos=[],this.onHoverLegendInfos="",this.isHoveringItem=!1,this.isColorInversed=!0}return _createClass(e,[{key:"toggleSidebar",value:function(){this.isOpenSidebar=!this.isOpenSidebar,this.widthSidebar=this.isOpenSidebar?re:30}},{key:"onResizeEnd",value:function(e){re=e.rectangle.width,this.widthSidebar=e.rectangle.width}},{key:"dateChanged",value:function(e){this.selectedDate=e,this.updateStyleMap()}},{key:"updateMinMaxMeanTopLegendInfos",value:function(){var e,t,a,n,o=this,i=this.getArgsId(),c=0,r=0,l=0,s=0;this.globalLayer.eachLayer((function(u){u.feature.properties.value.forEach((function(u){Object(p.j)(new Date(u.Date),o.selectedDate)&&(c+=u[i],r++,void 0===e?e=u[i]:u[i]<e&&(e=u[i]),void 0===t?t=u[i]:u[i]>t&&(t=u[i]));var d=new Date(o.selectedDate);d.setDate(d.getDate()-1),Object(p.j)(d,new Date(u.Date))&&(l+=u[i],s++,void 0===a?a=u[i]:u[i]<a&&(a=u[i]),void 0===n?n=u[i]:u[i]>n&&(n=u[i]))}))})),this.onHoverLegendInfosValueMean=Number(Math.round(c/r).toFixed(2)),this.onHoverLegendInfosValueMin=Number(e.toFixed(2)),this.onHoverLegendInfosValuemax=Number(t.toFixed(2)),this.onHoverLegendInfosValueMeanDayBefore=Number((Math.round(l/s)-this.onHoverLegendInfosValueMean).toFixed(2)),this.onHoverLegendInfosValueMinDayBefore=Number((e-a).toFixed(2)),this.onHoverLegendInfosValuemaxDayBefore=Number((n-t).toFixed(2))}},{key:"updateLegendValues",value:function(){var e=this,t=0;this.globalLayer.eachLayer((function(a){a.feature.properties.value.forEach((function(a){if(Object(p.j)(new Date(a.Date),e.selectedDate))switch(e.selectedTypeGraph){case d.a.CONFIRMED:a.Confirmed>t&&(t=a.Confirmed);break;case d.a.DEATH:a.Death>t&&(t=a.Death);break;case d.a.ACTIVE:a.Active>t&&(t=a.Active);break;case d.a.RECOVERED:a.Recovered>t&&(t=a.Recovered);break;case d.a.RECOVERY_RATE:a.Recovered_Rate>t&&(t=a.Recovered_Rate);break;case d.a.MORTALITY_RATE:a.Mortality_Rate>t&&(t=a.Mortality_Rate)}}))}));var a=Math.round(t/7);this.selectedLegendInfos=[6*a,5*a,4*a,3*a,2*a,a]}},{key:"updateStyleMap",value:function(){var e,t=this;switch(this.updateLengendColor(),this.updateLegendValues(),this.updateMinMaxMeanTopLegendInfos(),this.selectedTypeGraph){case d.a.CONFIRMED:e="Confirmed",this.isColorInversed=!0;break;case d.a.DEATH:e="Death",this.isColorInversed=!0;break;case d.a.ACTIVE:e="Active",this.isColorInversed=!0;break;case d.a.RECOVERED:e="Recovered",this.isColorInversed=!1;break;case d.a.RECOVERY_RATE:e="Recovered_Rate",this.isColorInversed=!1;break;case d.a.MORTALITY_RATE:e="Mortality_Rate",this.isColorInversed=!0}this.globalLayer.eachLayer((function(a){a.feature.properties.value.forEach((function(n){Object(p.j)(new Date(n.Date),t.selectedDate)&&a.setStyle({fillColor:t.getColor(n[e]),fillOpacity:.7,weight:2})}))}))}},{key:"updateLengendColor",value:function(){switch(this.selectedTypeGraph){case d.a.CONFIRMED:case d.a.DEATH:this.selectedLegendColorGradient=f.c;break;case d.a.ACTIVE:this.selectedLegendColorGradient=f.b;break;case d.a.RECOVERED:case d.a.RECOVERY_RATE:this.selectedLegendColorGradient=f.a;break;case d.a.MORTALITY_RATE:this.selectedLegendColorGradient=f.c}}},{key:"validate",value:function(e){return!(e.rectangle.width&&e.rectangle.width<300)}},{key:"miseEnFormeLegendBottomTitle",value:function(){return this.selectedTypeGraph===d.a.MORTALITY_RATE||this.selectedTypeGraph===d.a.RECOVERY_RATE}},{key:"getColor",value:function(e){return e>this.selectedLegendInfos[0]?this.selectedLegendColorGradient[0]:e>this.selectedLegendInfos[1]?this.selectedLegendColorGradient[1]:e>this.selectedLegendInfos[2]?this.selectedLegendColorGradient[2]:e>this.selectedLegendInfos[3]?this.selectedLegendColorGradient[3]:e>this.selectedLegendInfos[4]?this.selectedLegendColorGradient[4]:this.selectedLegendColorGradient[5]}},{key:"initDatesMinMax",value:function(){var e=this;this.globalLayer.eachLayer((function(t){t.feature.properties.value.forEach((function(t){void 0===e.minDate&&(e.minDate=new Date(t.Date)),void 0===e.maxDate&&(e.maxDate=new Date(t.Date)),void 0===e.selectedDate&&(e.selectedDate=new Date(t.Date)),new Date(t.Date)>e.maxDate&&(e.maxDate=new Date(t.Date),e.selectedDate=new Date(t.Date)),new Date(t.Date)<e.minDate&&(e.minDate=new Date(t.Date))}))}))}},{key:"ngOnInit",value:function(){var e=this;this.http.get(p.f).subscribe((function(t){e.globalLayer=b.geoJSON(t,{style:le,onEachFeature:function(t,a){a.on("mouseover",(function(t){return e.highlightFeature(t)})),a.on("mouseout",(function(t){return e.resetHighlight(t)}))}}),e.initDatesMinMax(),e.updateStyleMap()}))}},{key:"onMapReady",value:function(e){this.leafletMap=e}},{key:"resetHighlight",value:function(e){this.isHoveringItem=!1,this.globalLayer.eachLayer((function(e){e.setStyle(le)})),this.onHoverLegendInfos=null,this.onHoverLegendInfosValue=null,this.ref.detectChanges()}},{key:"getArgsId",value:function(){var e;switch(this.selectedTypeGraph){case d.a.CONFIRMED:e="Confirmed";break;case d.a.DEATH:e="Death";break;case d.a.ACTIVE:e="Active";break;case d.a.RECOVERED:e="Recovered";break;case d.a.RECOVERY_RATE:e="Recovered_Rate";break;case d.a.MORTALITY_RATE:e="Mortality_Rate"}return e}},{key:"highlightFeature",value:function(e){var t=this;this.isHoveringItem=!0;var a,n,o=e.target;o.setStyle(se);var i=this.getArgsId(),c=new Date(this.selectedDate);c.setDate(c.getDate()-1),o.feature.properties.value.forEach((function(e){Object(p.j)(new Date(e.Date),t.selectedDate)&&(a=e[i]),Object(p.j)(new Date(e.Date),c)&&(n=e[i])})),a?(this.onHoverLegendInfos=o.feature.properties.CountryName,this.onHoverLegendInfosValue=Number(a.toFixed(2)),this.onHoverLegendInfosValueDayBefore=Number((a-n).toFixed(2))):(this.onHoverLegendInfos=o.feature.properties.CountryName,this.onHoverLegendInfosValue=null,this.onHoverLegendInfosValueDayBefore=null),this.ref.detectChanges()}}]),e}()).\u0275fac=function(e){return new(e||ie)(i.Nb(g.a),i.Nb(i.h))},ie.\u0275cmp=i.Hb({type:ie,selectors:[["app-map"]],decls:63,vars:30,consts:[["fxFlexFill","","fxLayout","row","fxLayoutAlign","center",1,"mainContener"],["mwlResizable","","resizeCursorPrecision","5",3,"enableGhostResize","resizeEdges","validateResize","resizeEnd"],["fxFlex","","fxLayout","row","fxLayoutAlign","space-between"],["fxFlex","","fxLayout","column","fxLayoutGap","20px","class","scrollable",4,"ngIf"],["fxLayout","row","fxFlex","30px"],["fxFlex","","fxLayoutAlign","center"],["fxFlex","","mat-button","",1,"buttonSidebarClose","icon",3,"click"],[4,"ngIf"],["fxFlex","2px",1,"dividerSidebar"],["fxFlex",""],["leaflet","",1,"lastPlan",2,"height","100%",3,"leafletOptions","leafletMapReady"],[3,"leafletLayer"],[1,"legendTop"],["fxFlex","","fxLayout","row","fxLayoutAlign","center"],["fxFlex","","fxLayout","column","fxLayoutAlign","center"],["fxLayoutAlign","center","style","margin: 0px;font-weight: bold;",4,"ngIf"],["fxLayoutAlign","center",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center",2,"margin","10px"],["fxFlex","60%"],["fxFill",""],["fxLayout","column","fxLayoutAlign","center center","fxLa","",2,"margin","0px","margin-bottom","10px"],[2,"margin","0px"],["fxLayout","row","fxLayoutAlign","space-around center"],[2,"margin-left","20px"],["fxFlex","","fxLayout","row","fxLayoutAlign","end",2,"margin","0px","margin-right","20px"],[3,"ngClass",4,"ngIf"],[1,"firstPlan","legend"],["fxLayout","column"],["fxLayoutAlign","center"],["fxFlex","","fxLayout","row","fxLayoutGap","10px","fxLayoutAlign","space-evenly"],["fxLayoutGap","5px","fxLayout","column","fxLayoutAlign","center"],["class","squareLegend",3,"style",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],["fxFlex","","fxLayout","column","fxLayoutGap","20px",1,"scrollable"],["fxLayout","row","fxLayoutAlign","center"],[1,"contentTemplate"],[3,"value","selectionChange","valueChange"],[3,"value",4,"ngFor","ngForOf"],[1,"dateInput"],["matInput","",3,"value","min","max","matDatepicker","dateChange"],["matSuffix","",3,"for"],["picker",""],[3,"value"],["fxLayoutAlign","center",2,"margin","0px","font-weight","bold"],["style","margin: 0px;",4,"ngIf"],["style","margin: 0px;","fxLayout","column",4,"ngIf"],["fxLayout","column",2,"margin","0px"],["fxLayoutAlign","center",2,"margin","0px"],[3,"ngClass"],[1,"squareLegend"]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"div",1),i.ac("resizeEnd",(function(e){return t.onResizeEnd(e)})),i.Sb(2,"div",2),i.Ac(3,k,23,7,"div",3),i.Sb(4,"div",4),i.Sb(5,"div",5),i.Sb(6,"button",6),i.ac("click",(function(){return t.toggleSidebar()})),i.Ac(7,w,2,0,"mat-icon",7),i.Ac(8,O,2,0,"mat-icon",7),i.Rb(),i.Rb(),i.Ob(9,"div",8),i.Rb(),i.Rb(),i.Rb(),i.Sb(10,"div",9),i.Sb(11,"div",10),i.ac("leafletMapReady",(function(e){return t.onMapReady(e)})),i.Ob(12,"div",11),i.Rb(),i.Rb(),i.Rb(),i.Sb(13,"div",12),i.Sb(14,"div",13),i.Sb(15,"div",14),i.Ac(16,M,2,1,"h1",15),i.Ac(17,V,7,4,"div",16),i.Ac(18,_,3,0,"div",16),i.Ac(19,H,3,0,"div",16),i.Sb(20,"div",17),i.Sb(21,"div",18),i.Ob(22,"mat-divider",19),i.Rb(),i.Rb(),i.Sb(23,"div",20),i.Sb(24,"h2",21),i.Bc(25," PAYS "),i.Rb(),i.Sb(26,"h3",21),i.Bc(27," Tout confondu "),i.Rb(),i.Rb(),i.Sb(28,"div",22),i.Sb(29,"div",23),i.Bc(30," Min "),i.Rb(),i.Sb(31,"h3",24),i.Sb(32,"div"),i.Bc(33),i.Ac(34,z,4,6,"span",25),i.Ac(35,Y,4,6,"span",25),i.Rb(),i.Rb(),i.Rb(),i.Sb(36,"div",22),i.Sb(37,"div",23),i.Bc(38," Max "),i.Rb(),i.Sb(39,"h3",24),i.Bc(40),i.Ac(41,$,4,6,"span",25),i.Ac(42,K,4,6,"span",25),i.Rb(),i.Rb(),i.Sb(43,"div",22),i.Sb(44,"div",23),i.Bc(45," Moyenne "),i.Rb(),i.Sb(46,"h3",24),i.Bc(47),i.Ac(48,Q,4,6,"span",25),i.Ac(49,Z,4,6,"span",25),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(50,"div",26),i.Sb(51,"div",27),i.Sb(52,"div",28),i.Sb(53,"div"),i.Sb(54,"h3",21),i.Ac(55,ee,2,1,"span",7),i.Ac(56,te,2,1,"span",7),i.Rb(),i.Ac(57,ae,2,0,"span",7),i.Rb(),i.Rb(),i.Sb(58,"div",29),i.Sb(59,"div",30),i.Ac(60,ne,1,3,"div",31),i.Rb(),i.Sb(61,"div",30),i.Ac(62,oe,2,1,"div",32),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.Bb(1),i.zc("width",t.widthSidebar+"px"),i.jc("enableGhostResize",!0)("resizeEdges",i.lc(28,ce,t.isOpenSidebar))("validateResize",t.validate),i.Bb(2),i.jc("ngIf",t.isOpenSidebar),i.Bb(4),i.jc("ngIf",t.isOpenSidebar),i.Bb(1),i.jc("ngIf",!t.isOpenSidebar),i.Bb(3),i.jc("leafletOptions",t.leafletOptions),i.Bb(1),i.jc("leafletLayer",t.globalLayer),i.Bb(4),i.jc("ngIf",t.isHoveringItem),i.Bb(1),i.jc("ngIf",t.isHoveringItem&&t.onHoverLegendInfosValue),i.Bb(1),i.jc("ngIf",t.isHoveringItem&&null===t.onHoverLegendInfosValue),i.Bb(1),i.jc("ngIf",!t.isHoveringItem),i.Bb(14),i.Dc(" ",t.onHoverLegendInfosValueMin," \xa0 "),i.Bb(1),i.jc("ngIf",t.isColorInversed),i.Bb(1),i.jc("ngIf",!t.isColorInversed),i.Bb(5),i.Dc(" ",t.onHoverLegendInfosValuemax," \xa0 "),i.Bb(1),i.jc("ngIf",t.isColorInversed),i.Bb(1),i.jc("ngIf",!t.isColorInversed),i.Bb(5),i.Dc(" ",t.onHoverLegendInfosValueMean," \xa0 "),i.Bb(1),i.jc("ngIf",t.isColorInversed),i.Bb(1),i.jc("ngIf",!t.isColorInversed),i.Bb(6),i.jc("ngIf",!t.miseEnFormeLegendBottomTitle()),i.Bb(1),i.jc("ngIf",t.miseEnFormeLegendBottomTitle()),i.Bb(1),i.jc("ngIf",t.miseEnFormeLegendBottomTitle()),i.Bb(3),i.jc("ngForOf",t.selectedLegendColorGradient),i.Bb(2),i.jc("ngForOf",t.selectedLegendInfos))},directives:[c.f,c.d,c.c,h.a,c.b,n.k,v.a,m.a,m.b,y.a,c.e,n.j,R.b,S.a,x.b,C.b,C.d,R.f,C.a,D.k,B.a,n.i,L.a],styles:[".dividerSidebar[_ngcontent-%COMP%]{background-color:#323233}.icon[_ngcontent-%COMP%]:hover{color:#ec407a}.icon[_ngcontent-%COMP%]{color:#f48fb1}mwlResizable[_ngcontent-%COMP%]{box-sizing:border-box}.floatingButtonContener[_ngcontent-%COMP%]{position:fixed;bottom:40px;right:20px}.buttonSidebarClose[_ngcontent-%COMP%]{padding:0;width:20px;min-width:0}.contentTemplate[_ngcontent-%COMP%]{padding-left:10px}.titleTemplate[_ngcontent-%COMP%]{padding-left:5px}.dateInput[_ngcontent-%COMP%]{width:150px}.loader[_ngcontent-%COMP%]{background-color:transparent;width:100%;height:100%;position:absolute;top:0;left:0;background-color:red;opacity:.5}.legend[_ngcontent-%COMP%]{width:150px;height:200px;bottom:60px}.legend[_ngcontent-%COMP%], .legendTop[_ngcontent-%COMP%]{position:fixed;right:40px;background-color:#fff}.legendTop[_ngcontent-%COMP%]{width:250px;height:280px;top:120px;z-index:3}.lastPlan[_ngcontent-%COMP%]{z-index:1}.firstPlan[_ngcontent-%COMP%]{z-index:2}.squareLegend[_ngcontent-%COMP%]{width:20px;height:20px}.green[_ngcontent-%COMP%]{color:green}.red[_ngcontent-%COMP%]{color:red}.scrollable[_ngcontent-%COMP%]{overflow:auto}"]}),ie),de=a("kRbQ"),be=a("GvUb"),fe=a("v5SH"),pe=function(){function e(t,a,n,o,i,c,r,l,s){_classCallCheck(this,e),this.date=t,this.region=a,this.country=n,this.death=i,this.confirmed=o,this.recovered=c,this.active=r,this.mortalityRate=l,this.recoveryRate=s}return _createClass(e,[{key:"getDate",value:function(){return this.date}},{key:"setDate",value:function(e){this.date=e}},{key:"getRegion",value:function(){return this.region}},{key:"setRegion",value:function(e){this.region=e}},{key:"getCountry",value:function(){return this.country}},{key:"setCountry",value:function(e){this.country=e}},{key:"getDeath",value:function(){return this.death}},{key:"setDeath",value:function(e){this.death=e}},{key:"getConfirmed",value:function(){return this.confirmed}},{key:"setConfirmed",value:function(e){this.confirmed=e}},{key:"getRecovered",value:function(){return this.recovered}},{key:"setRecovered",value:function(e){this.recovered=e}},{key:"getActive",value:function(){return this.active}},{key:"setActive",value:function(e){this.active=e}},{key:"getMortalityRate",value:function(){return this.mortalityRate}},{key:"setMortalityRate",value:function(e){this.mortalityRate=e}},{key:"getRecoveryRate",value:function(){return this.recoveryRate}},{key:"setRecoveryRate",value:function(e){this.recoveryRate=e}}]),e}(),ge=a("zT9C"),he=a("kDNy"),ve=a("nXzS"),me=a("JJv3"),ye=a("Qu3c"),Re=a("8pX3"),Se=a("1jcm"),xe=a("QibW"),Ce=a("3Pt+"),De=a("5RNC"),Be=a("u3+B");function Le(e,t){if(1&e&&(i.Sb(0,"mat-option",31),i.Bc(1),i.Rb()),2&e){var a=t.$implicit;i.jc("value",a),i.Bb(1),i.Dc(" ",a.country," ")}}function Ie(e,t){if(1&e){var a=i.Tb();i.Sb(0,"div"),i.Sb(1,"mat-form-field"),i.Sb(2,"mat-select",30),i.ac("selectionChange",(function(){return i.rc(a),i.ec(2).updateFiltredData()}))("valueChange",(function(e){return i.rc(a),i.ec(2).selectedMultipleCountry=e})),i.Ac(3,Le,2,2,"mat-option",26),i.Rb(),i.Rb(),i.Rb()}if(2&e){var n=i.ec(2);i.Bb(2),i.jc("value",n.selectedMultipleCountry),i.Bb(1),i.jc("ngForOf",n.allCountry)}}function ke(e,t){if(1&e&&(i.Sb(0,"mat-option",31),i.Bc(1),i.Rb()),2&e){var a=t.$implicit;i.jc("value",a),i.Bb(1),i.Dc(" ",a.country," ")}}function we(e,t){if(1&e){var a=i.Tb();i.Sb(0,"div"),i.Sb(1,"mat-form-field"),i.Sb(2,"mat-select",32),i.ac("selectionChange",(function(){return i.rc(a),i.ec(2).updateFiltredData()}))("valueChange",(function(e){return i.rc(a),i.ec(2).selectedUniqueCountry=e})),i.Ac(3,ke,2,2,"mat-option",26),i.Rb(),i.Rb(),i.Rb()}if(2&e){var n=i.ec(2);i.Bb(2),i.jc("value",n.selectedUniqueCountry),i.Bb(1),i.jc("ngForOf",n.allCountry)}}function Oe(e,t){if(1&e){var a=i.Tb();i.Sb(0,"div",20),i.Sb(1,"mat-form-field",24),i.Sb(2,"input",33),i.ac("dateChange",(function(e){return i.rc(a),i.ec(2).updateDate(e.value)})),i.Rb(),i.Ob(3,"mat-datepicker-toggle",34),i.Ob(4,"mat-datepicker",null,35),i.Rb(),i.Rb()}if(2&e){var n=i.oc(5),o=i.ec(2);i.Bb(2),i.jc("value",o.currentDate)("min",o.minDate)("max",o.maxDate)("matDatepicker",n),i.Bb(1),i.jc("for",n)}}function Me(e,t){if(1&e){var a=i.Tb();i.Sb(0,"div",20),i.Sb(1,"div"),i.Bc(2,"Date Minimal"),i.Rb(),i.Sb(3,"mat-form-field",24),i.Sb(4,"input",33),i.ac("dateChange",(function(e){return i.rc(a),i.ec(2).updateDateCurrentMin(e.value)})),i.Rb(),i.Ob(5,"mat-datepicker-toggle",34),i.Ob(6,"mat-datepicker",null,36),i.Rb(),i.Sb(8,"div"),i.Bc(9,"Date Maximal"),i.Rb(),i.Sb(10,"mat-form-field",24),i.Sb(11,"input",33),i.ac("dateChange",(function(e){return i.rc(a),i.ec(2).updateDateCurrentMax(e.value)})),i.Rb(),i.Ob(12,"mat-datepicker-toggle",34),i.Ob(13,"mat-datepicker",null,37),i.Rb(),i.Rb()}if(2&e){var n=i.oc(7),o=i.oc(14),c=i.ec(2);i.Bb(4),i.jc("value",c.selectedDateMin)("min",c.minDate)("max",c.maxDate)("matDatepicker",n),i.Bb(1),i.jc("for",n),i.Bb(6),i.jc("value",c.selectedDateMax)("min",c.minDate)("max",c.maxDate)("matDatepicker",o),i.Bb(1),i.jc("for",o)}}function Ee(e,t){if(1&e&&(i.Sb(0,"mat-option",31),i.Bc(1),i.Rb()),2&e){var a=t.$implicit;i.jc("value",a),i.Bb(1),i.Cc(a)}}function Te(e,t){if(1&e&&(i.Sb(0,"mat-radio-button",31),i.Bc(1),i.Rb()),2&e){var a=t.$implicit;i.jc("value",a),i.Bb(1),i.Dc(" ",a," ")}}function Ae(e,t){if(1&e&&(i.Sb(0,"mat-option",31),i.Bc(1),i.Rb()),2&e){var a=t.$implicit;i.jc("value",a),i.Bb(1),i.Cc(a)}}function Ge(e,t){if(1&e){var a=i.Tb();i.Sb(0,"div",20),i.Sb(1,"mat-form-field"),i.Sb(2,"mat-label"),i.Bc(3,"Liste submode"),i.Rb(),i.Sb(4,"mat-select",38),i.ac("selectionChange",(function(e){return i.rc(a),i.ec(2).updateScatterSubmod(e.value)})),i.Ac(5,Ae,2,2,"mat-option",26),i.Rb(),i.Rb(),i.Rb()}if(2&e){var n=i.ec(2);i.Bb(4),i.jc("ngModel",n.allScatterSubmod),i.Bb(1),i.jc("ngForOf",n.allScatterSubmod)}}function je(e,t){if(1&e&&(i.Sb(0,"mat-radio-button",31),i.Bc(1),i.Rb()),2&e){var a=t.$implicit;i.jc("value",a),i.Bb(1),i.Dc(" ",a," ")}}function Fe(e,t){if(1&e){var a=i.Tb();i.Sb(0,"div",39),i.Sb(1,"div"),i.Sb(2,"mat-radio-group",27),i.ac("change",(function(e){return i.rc(a),i.ec(2).updateBarSubmod(e.value)}))("ngModelChange",(function(e){return i.rc(a),i.ec(2).selectedBarSubmod=e})),i.Sb(3,"div",28),i.Ac(4,je,2,2,"mat-radio-button",26),i.Rb(),i.Rb(),i.Rb(),i.Sb(5,"div",19),i.Sb(6,"div",40),i.Sb(7,"span"),i.Bc(8,"Gap bar"),i.Rb(),i.Sb(9,"mat-slider",41),i.ac("change",(function(e){return i.rc(a),i.ec(2).updateBarGap(e.value,"gap")}))("ngModelChange",(function(e){return i.rc(a),i.ec(2).selectedGap=e})),i.Rb(),i.Rb(),i.Sb(10,"div",40),i.Sb(11,"span"),i.Bc(12,"Gap bar groupe"),i.Rb(),i.Sb(13,"mat-slider",41),i.ac("change",(function(e){return i.rc(a),i.ec(2).updateBarGap(e.value,"gapGroup")}))("ngModelChange",(function(e){return i.rc(a),i.ec(2).selectedGapGroup=e})),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){var n=i.ec(2);i.Bb(2),i.jc("ngModel",n.selectedBarSubmod),i.Bb(2),i.jc("ngForOf",n.allBarSubmob),i.Bb(5),i.jc("ngModel",n.selectedGap),i.Bb(4),i.jc("ngModel",n.selectedGapGroup)}}function Pe(e,t){if(1&e){var a=i.Tb();i.Sb(0,"div",17),i.Sb(1,"div",18),i.Sb(2,"h1"),i.Bc(3," Param\xe8tres "),i.Rb(),i.Rb(),i.Sb(4,"div",19),i.Sb(5,"div",18),i.Sb(6,"h3"),i.Bc(7," Choix Pays "),i.Rb(),i.Rb(),i.Sb(8,"div",20),i.Ac(9,Ie,4,2,"div",7),i.Ac(10,we,4,2,"div",7),i.Rb(),i.Rb(),i.Ob(11,"mat-divider"),i.Sb(12,"div",19),i.Sb(13,"div",18),i.Sb(14,"h3"),i.Bc(15," Choix Date "),i.Rb(),i.Rb(),i.Sb(16,"div",20),i.Sb(17,"mat-slide-toggle",21),i.ac("change",(function(e){return i.rc(a),i.ec().updateDateContener(e.checked)})),i.Bc(18," Date Unique "),i.Rb(),i.Rb(),i.Ac(19,Oe,6,5,"div",22),i.Ac(20,Me,15,10,"div",22),i.Rb(),i.Ob(21,"mat-divider"),i.Sb(22,"div",19),i.Sb(23,"div",18),i.Sb(24,"h3"),i.Bc(25," Granularit\xe9 Graphique "),i.Rb(),i.Rb(),i.Sb(26,"div",23),i.Sb(27,"mat-slide-toggle",21),i.ac("change",(function(e){return i.rc(a),i.ec().updateGraphiqueContener(e.checked)})),i.Bc(28," Graphique global "),i.Rb(),i.Sb(29,"mat-form-field",24),i.Sb(30,"mat-label"),i.Bc(31,"Liste graphique"),i.Rb(),i.Sb(32,"mat-select",25),i.ac("selectionChange",(function(e){return i.rc(a),i.ec().updateNumberOfGraphique(e.value)})),i.Ac(33,Ee,2,2,"mat-option",26),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Ob(34,"mat-divider"),i.Sb(35,"div",19),i.Sb(36,"div",18),i.Sb(37,"h3"),i.Bc(38," Graphique Type "),i.Rb(),i.Rb(),i.Sb(39,"div",20),i.Sb(40,"mat-radio-group",27),i.ac("change",(function(e){return i.rc(a),i.ec().updateGraphicType(e.value)}))("ngModelChange",(function(e){return i.rc(a),i.ec().selectedPlotType=e})),i.Sb(41,"div",28),i.Ac(42,Te,2,2,"mat-radio-button",26),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Ob(43,"mat-divider"),i.Sb(44,"div",19),i.Sb(45,"div",18),i.Sb(46,"h3"),i.Bc(47," Customization "),i.Rb(),i.Rb(),i.Ac(48,Ge,6,2,"div",22),i.Ac(49,Fe,14,4,"div",29),i.Rb(),i.Rb()}if(2&e){var n=i.ec();i.Bb(9),i.jc("ngIf",!n.uniqueGraphique),i.Bb(1),i.jc("ngIf",n.uniqueGraphique),i.Bb(7),i.jc("checked",n.uniqueDate),i.Bb(2),i.jc("ngIf",n.uniqueDate),i.Bb(1),i.jc("ngIf",!n.uniqueDate),i.Bb(7),i.jc("checked",n.uniqueGraphique),i.Bb(5),i.jc("disabled",n.uniqueGraphique),i.Bb(1),i.jc("ngForOf",n.listTypeGraph),i.Bb(7),i.jc("ngModel",n.selectedPlotType),i.Bb(2),i.jc("ngForOf",n.listPlotType),i.Bb(6),i.jc("ngIf",n.selectedPlotType===n.aliasPlotType.SCATTER),i.Bb(1),i.jc("ngIf",n.selectedPlotType===n.aliasPlotType.BAR)}}function Ve(e,t){1&e&&(i.Sb(0,"mat-icon"),i.Bc(1," keyboard_arrow_left "),i.Rb())}function _e(e,t){1&e&&(i.Sb(0,"mat-icon"),i.Bc(1," keyboard_arrow_right "),i.Rb())}var He=function(){return{width:"100%",height:"100%"}};function qe(e,t){if(1&e&&(i.Sb(0,"div",42),i.Ob(1,"plotly-plot",43),i.Rb()),2&e){var a=t.$implicit;i.Bb(1),i.xc(i.kc(6,He)),i.jc("useResizeHandler",!0)("data",a.data)("config",a.config)("layout",a.layout)}}var ze,Ne,Ye=function(e){return{bottom:!1,right:e,top:!1,left:!1}},Ue=300,$e=[{path:"",component:u,children:[{path:"",redirectTo:"graphique",pathMatch:"full"},{path:"carte",component:ue},{path:"graphique",component:(ze=function(){function e(t){_classCallCheck(this,e),this.http=t,this.aliasPlotType=de.a,this.allData=[],this.allCountry=[],this.isOpenSidebar=!0,this.widthSidebar=Ue,this.uniqueDate=!0,this.uniqueGraphique=!0,this.selectedSpecificGraphicsList=[],this.allBarSubmob=[be.a.GROUP,be.a.STACK],this.selectedBarSubmod=be.a.GROUP,this.selectedScatterSubmod="",this.selectedGap=.1,this.selectedGapGroup=.1,this.allScatterSubmod=[fe.a.LINES,fe.a.MARKERS],this.listTypeGraph=[d.a.ACTIVE,d.a.CONFIRMED,d.a.DEATH,d.a.RECOVERED,d.a.RECOVERY_RATE,d.a.MORTALITY_RATE],this.selectedPlotType=de.a.BAR,this.listPlotType=[de.a.BAR,de.a.SCATTER],this.allGraphics=[],this.initializeGlobalGraphics(),this.loadData()}return _createClass(e,[{key:"loadData",value:function(){var e=this;this.http.get(p.b,{responseType:"text"}).subscribe((function(t){e.parseXmlFile(t)}))}},{key:"parseXmlFile",value:function(e){var t=this,a=e.split("\n"),n=0;a.forEach((function(e){if(e.length&&""!==e){var a=e.split(",");0===n||(t.allData.push(new pe(new Date(a[0]),"",a[1],Number(a[2]),Number(a[3]),Number(a[4]),Number(a[5]),Number(a[6]),Number(a[7]))),void 0===t.maxDate&&(t.maxDate=new Date(a[0])),void 0===t.minDate&&(t.minDate=new Date(a[0])),new Date(a[0]).getTime()>t.maxDate.getTime()&&(t.maxDate=new Date(a[0])),new Date(a[0]).getTime()<t.minDate.getTime()&&(t.minDate=new Date(a[0])),t.allCountry.find((function(e){return e.country===String(a[1])}))||t.allCountry.push({country:String(a[1])})),n++}})),this.selectedDateMax=new Date(this.maxDate);var o=new Date(this.selectedDateMax);o.setDate(o.getDate()-1),this.selectedDateMin=o,this.currentDate=new Date(this.maxDate),this.filtredData=ge(this.allData),this.selectedUniqueCountry=this.allCountry[0],this.selectedMultipleCountry=[this.allCountry[0]],this.updateFiltredData()}},{key:"onResizeEnd",value:function(e){Ue=e.rectangle.width,this.widthSidebar=e.rectangle.width,Object(p.h)()}},{key:"toggleSidebar",value:function(){this.isOpenSidebar=!this.isOpenSidebar,this.widthSidebar=this.isOpenSidebar?Ue:30,Object(p.h)()}},{key:"updateBarSubmod",value:function(e){var t=this;this.selectedBarSubmod=e,this.allGraphics.forEach((function(e){e.layout.barmode=t.selectedBarSubmod.toLowerCase()}))}},{key:"updateNumberOfGraphique",value:function(e){this.selectedSpecificGraphicsList=e,this.redrawSpecificGraphicsList()}},{key:"redrawSpecificGraphicsList",value:function(){var e=this;this.deleteAllGraphics(),this.selectedSpecificGraphicsList.forEach((function(t){e.addGraphics("Graphique "+t,[],[],t)})),Object(p.h)(),this.updateFiltredData()}},{key:"addGraphics",value:function(e,t,a,n){var o=[];o.push({x:t,y:a,type:this.selectedPlotType,mode:this.selectedScatterSubmod});var i={data:o,config:{responsive:!0},layout:{title:e,autosize:!0,bargap:this.selectedGap,bargroupgap:this.selectedGapGroup,barmode:this.selectedBarSubmod.toLowerCase()},typeGraphic:n};this.allGraphics.push(i)}},{key:"updateDateContener",value:function(e){this.uniqueDate=e,this.updateFiltredData()}},{key:"initializeGlobalGraphics",value:function(){this.deleteAllGraphics(),this.addGraphics("Graphique Global",[],[],d.a.GLOBAL),Object(p.h)()}},{key:"updateGraphiqueContener",value:function(e){this.uniqueGraphique=e,this.uniqueGraphique?(this.initializeGlobalGraphics(),this.updateFiltredData()):this.selectedSpecificGraphicsList.length?this.redrawSpecificGraphicsList():this.deleteAllGraphics(),this.updateFiltredData()}},{key:"updateFiltredData",value:function(){var e=this;this.cleanAllDataGraph(),this.filtredData.forEach(this.uniqueDate?this.uniqueGraphique?function(t){e.selectedUniqueCountry.country===t.getCountry()&&Object(p.j)(t.getDate(),e.currentDate)&&e.addRow(t)}:function(t){e.selectedMultipleCountry.forEach((function(a){a.country===t.getCountry()&&Object(p.j)(t.getDate(),e.currentDate)&&e.addRowMultipleDate(t)}))}:this.uniqueGraphique?function(t){e.selectedUniqueCountry.country===t.getCountry()&&Object(p.i)(t.getDate(),e.selectedDateMin,e.selectedDateMax)&&e.addRow(t)}:function(t){e.selectedMultipleCountry.forEach((function(a){a.country===t.getCountry()&&Object(p.i)(t.getDate(),e.selectedDateMin,e.selectedDateMax)&&e.addRowMultipleDate(t)}))})}},{key:"addRowMultipleDate",value:function(e){var t=this,a=e.getDate().getDate()+"-"+e.getDate().getMonth()+"-"+e.getDate().getFullYear();this.allGraphics.forEach((function(n){n.data.length;var o=e.getCountry();switch(""!==e.getRegion()&&(o+=" - "+e.getRegion()),n.typeGraphic){case d.a.ACTIVE:if(0===n.data.length)n.data.push({x:[a],y:[e.getActive()],name:o,type:t.selectedPlotType.toLowerCase(),legendgroup:o,showlegend:!0,mode:t.selectedScatterSubmod});else{var i=!1;n.data.forEach((function(t){t.name!==o||i||(i=!0,t.x.push(a),t.y.push(e.getActive()))})),i||n.data.push({x:[a],y:[e.getActive()],name:o,type:t.selectedPlotType.toLowerCase(),legendgroup:o,showlegend:!0,mode:t.selectedScatterSubmod})}break;case d.a.CONFIRMED:if(0===n.data.length)n.data.push({x:[a],y:[e.getConfirmed()],name:o,type:t.selectedPlotType.toLowerCase(),legendgroup:o,showlegend:!0,mode:t.selectedScatterSubmod});else{var c=!1;n.data.forEach((function(t){t.name!==o||c||(c=!0,t.x.push(a),t.y.push(e.getConfirmed()))})),c||n.data.push({x:[a],y:[e.getConfirmed()],name:o,type:t.selectedPlotType.toLowerCase(),legendgroup:o,showlegend:!0,mode:t.selectedScatterSubmod})}break;case d.a.DEATH:if(0===n.data.length)n.data.push({x:[a],y:[e.getDeath()],name:o,type:t.selectedPlotType.toLowerCase(),legendgroup:o,showlegend:!0,mode:t.selectedScatterSubmod});else{var r=!1;n.data.forEach((function(t){t.name!==o||r||(r=!0,t.x.push(a),t.y.push(e.getDeath()))})),r||n.data.push({x:[a],y:[e.getDeath()],name:o,type:t.selectedPlotType.toLowerCase(),legendgroup:o,showlegend:!0,mode:t.selectedScatterSubmod})}break;case d.a.RECOVERED:if(0===n.data.length)n.data.push({x:[a],y:[e.getRecovered()],name:o,type:t.selectedPlotType.toLowerCase(),legendgroup:o,showlegend:!0,mode:t.selectedScatterSubmod});else{var l=!1;n.data.forEach((function(t){t.name!==o||l||(l=!0,t.x.push(a),t.y.push(e.getRecovered()))})),l||n.data.push({x:[a],y:[e.getRecovered()],name:o,type:t.selectedPlotType.toLowerCase(),legendgroup:o,showlegend:!0,mode:t.selectedScatterSubmod})}break;case d.a.MORTALITY_RATE:if(0===n.data.length)n.data.push({x:[a],y:[e.getMortalityRate()],name:o,type:t.selectedPlotType.toLowerCase(),legendgroup:o,showlegend:!0,mode:t.selectedScatterSubmod});else{var s=!1;n.data.forEach((function(t){t.name!==o||s||(s=!0,t.x.push(a),t.y.push(e.getMortalityRate()))})),s||n.data.push({x:[a],y:[e.getMortalityRate()],name:o,type:t.selectedPlotType.toLowerCase(),legendgroup:o,showlegend:!0,mode:t.selectedScatterSubmod})}break;case d.a.RECOVERY_RATE:if(0===n.data.length)n.data.push({x:[a],y:[e.getRecoveryRate()],name:o,type:t.selectedPlotType.toLowerCase(),legendgroup:o,showlegend:!0,mode:t.selectedScatterSubmod});else{var u=!1;n.data.forEach((function(t){t.name!==o||u||(u=!0,t.x.push(a),t.y.push(e.getRecoveryRate()))})),u||n.data.push({x:[a],y:[e.getRecoveryRate()],name:o,type:t.selectedPlotType.toLowerCase(),legendgroup:o,showlegend:!0,mode:t.selectedScatterSubmod})}}}))}},{key:"addRow",value:function(e){var t=this,a=e.getDate().getDate()+"-"+e.getDate().getMonth()+"-"+e.getDate().getFullYear();this.allGraphics.forEach((function(n){var o;switch(o=!(n.data.length>0),n.typeGraphic){case d.a.GLOBAL:0===n.data.length?(n.data.push({x:[a],y:[e.getDeath()],type:t.selectedPlotType.toLowerCase(),name:he.a.DEATH,marker:{color:"red"},legendgroup:"D\xe9c\xe9s",showlegend:o,mode:t.selectedScatterSubmod}),n.data.push({x:[a],y:[e.getConfirmed()],type:t.selectedPlotType.toLowerCase(),name:he.a.CONFIRMED,marker:{color:"grey"},legendgroup:"Confirm\xe9s",showlegend:o,mode:t.selectedScatterSubmod}),n.data.push({x:[a],y:[e.getRecovered()],type:t.selectedPlotType.toLowerCase(),name:he.a.RECOVERED,marker:{color:"green"},legendgroup:"Gu\xe9rris",showlegend:o,mode:t.selectedScatterSubmod}),n.data.push({x:[a],y:[e.getActive()],type:t.selectedPlotType.toLowerCase(),name:he.a.ACTIVE,marker:{color:"blue"},legendgroup:"Actifs",showlegend:o,mode:t.selectedScatterSubmod})):n.data.forEach((function(t){switch(t.name){case he.a.ACTIVE:t.x.push(a),t.y.push(e.getActive());break;case he.a.DEATH:t.x.push(a),t.y.push(e.getDeath());break;case he.a.RECOVERED:t.x.push(a),t.y.push(e.getRecovered());break;case he.a.CONFIRMED:t.x.push(a),t.y.push(e.getConfirmed())}}));break;case d.a.ACTIVE:n.data.push({x:[a],y:[e.getActive()],name:he.a.ACTIVE,type:t.selectedPlotType.toLowerCase(),marker:{color:"blue"},legendgroup:"Actifs",showlegend:o,mode:t.selectedScatterSubmod});break;case d.a.CONFIRMED:n.data.push({x:[a],y:[e.getConfirmed()],name:he.a.CONFIRMED,type:t.selectedPlotType.toLowerCase(),marker:{color:"grey"},legendgroup:"Confirm\xe9s",showlegend:o,mode:t.selectedScatterSubmod});break;case d.a.DEATH:n.data.push({x:[a],y:[e.getDeath()],type:t.selectedPlotType.toLowerCase(),name:he.a.DEATH,marker:{color:"red"},legendgroup:"D\xe9c\xe9s",showlegend:o,mode:t.selectedScatterSubmod});break;case d.a.RECOVERED:n.data.push({x:[a],y:[e.getRecovered()],name:he.a.RECOVERED,type:t.selectedPlotType.toLowerCase(),marker:{color:"green"},legendgroup:"Gu\xe9rris",showlegend:o,mode:t.selectedScatterSubmod});break;case d.a.MORTALITY_RATE:n.data.push({x:[a],y:[e.getMortalityRate()],name:he.a.RECOVERED,type:t.selectedPlotType.toLowerCase(),marker:{color:"purple"},legendgroup:"Taux de mortalit\xe9",showlegend:o,mode:t.selectedScatterSubmod});break;case d.a.RECOVERY_RATE:n.data.push({x:[a],y:[e.getRecoveryRate()],name:he.a.RECOVERED,type:t.selectedPlotType.toLowerCase(),marker:{color:"pink"},legendgroup:"Taux de soign\xe9s",showlegend:o,mode:t.selectedScatterSubmod})}}))}},{key:"updateDateCurrentMin",value:function(e){this.selectedDateMin=e,this.updateFiltredData()}},{key:"updateDateCurrentMax",value:function(e){this.selectedDateMax=e,this.updateFiltredData()}},{key:"updateDate",value:function(e){this.currentDate=e,this.updateFiltredData()}},{key:"cleanAllDataGraph",value:function(){this.allGraphics.forEach((function(e){e.data=[]}))}},{key:"deleteAllGraphics",value:function(){this.allGraphics=[]}},{key:"updateScatterSubmod",value:function(e){var t=this;this.selectedScatterSubmod="";var a=1;e.forEach((function(n){t.selectedScatterSubmod+=n.toLowerCase(),a<e.length&&(t.selectedScatterSubmod+="+"),a++})),this.allGraphics.forEach((function(e){e.data.forEach((function(e){e.mode=t.selectedScatterSubmod}))}))}},{key:"updateGraphicType",value:function(e){var t=this;this.selectedPlotType=e,this.allGraphics.forEach((function(e){e.data.forEach((function(e){e.type=t.selectedPlotType.toLowerCase()}))}))}},{key:"updateBarGap",value:function(e,t){var a=this;switch(t){case"gap":this.selectedGap=e,this.allGraphics.forEach((function(e){e.layout.bargap=a.selectedGap}));break;case"gapGroup":this.selectedGapGroup=e,this.allGraphics.forEach((function(e){e.layout.bargroupgap=a.selectedGapGroup}))}}},{key:"validate",value:function(e){return!(e.rectangle.width&&e.rectangle.width<300)}},{key:"ngOnInit",value:function(){}}]),e}(),ze.\u0275fac=function(e){return new(e||ze)(i.Nb(g.a))},ze.\u0275cmp=i.Hb({type:ze,selectors:[["app-graphique"]],decls:22,vars:11,consts:[["fxFlexFill","","fxLayout","row","fxLayoutAlign","center",1,"mainContener"],["mwlResizable","","resizeCursorPrecision","5",3,"enableGhostResize","resizeEdges","validateResize","resizeEnd"],["fxFlex","","fxLayout","row","fxLayoutAlign","space-between"],["fxFlex","","fxLayout","column","fxLayoutGap","20px","class","scrollable",4,"ngIf"],["fxLayout","row","fxFlex","30px"],["fxFlex","","fxLayoutAlign","center"],["fxFlex","","mat-button","",1,"buttonSidebarClose","icon",3,"click"],[4,"ngIf"],["fxFlex","2px",1,"dividerSidebar"],["fxFlex",""],["fxLayout","column","fxFlex","",4,"ngFor","ngForOf"],[1,"floatingButtonContener"],["direction","up","animationMode","fling"],["spin","true"],["matTooltipPosition","left","mat-fab","","matTooltip","Param\xe8tres"],[1,"spin360"],["matTooltipPosition","left","matTooltip","Ouvrir menu param\xe8tres","mat-mini-fab","",3,"click"],["fxFlex","","fxLayout","column","fxLayoutGap","20px",1,"scrollable"],["fxLayout","row","fxLayoutAlign","center"],["fxLayout","column"],[1,"contentTemplate"],[3,"checked","change"],["class","contentTemplate",4,"ngIf"],["fxLayout","column","fxLayoutGap","5px",1,"contentTemplate"],[1,"dateInput"],["multiple","",3,"disabled","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModel","change","ngModelChange"],["fxLayout","column","fxLayoutGap","5px"],["class","contentTemplate","fxLayout","column","fxLayoutGap","10px",4,"ngIf"],["multiple","",3,"value","selectionChange","valueChange"],[3,"value"],[3,"value","selectionChange","valueChange"],["matInput","",3,"value","min","max","matDatepicker","dateChange"],["matSuffix","",3,"for"],["picker",""],["pickerCurrentMin",""],["pickerCurrentMax",""],["multiple","",3,"ngModel","selectionChange"],["fxLayout","column","fxLayoutGap","10px",1,"contentTemplate"],["fxLayout","row","fxLayoutAlign","space-between center"],["max","1","min","0","step","0.1","thumbLabel","true",3,"ngModel","change","ngModelChange"],["fxLayout","column","fxFlex",""],["fxFlex","",3,"useResizeHandler","data","config","layout"]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"div",1),i.ac("resizeEnd",(function(e){return t.onResizeEnd(e)})),i.Sb(2,"div",2),i.Ac(3,Pe,50,12,"div",3),i.Sb(4,"div",4),i.Sb(5,"div",5),i.Sb(6,"button",6),i.ac("click",(function(){return t.toggleSidebar()})),i.Ac(7,Ve,2,0,"mat-icon",7),i.Ac(8,_e,2,0,"mat-icon",7),i.Rb(),i.Rb(),i.Ob(9,"div",8),i.Rb(),i.Rb(),i.Rb(),i.Sb(10,"div",9),i.Ac(11,qe,2,7,"div",10),i.Rb(),i.Rb(),i.Sb(12,"div",11),i.Sb(13,"floating-button",12),i.Sb(14,"floating-button-trigger",13),i.Sb(15,"button",14),i.Sb(16,"mat-icon",15),i.Bc(17,"menu"),i.Rb(),i.Rb(),i.Rb(),i.Sb(18,"floating-button-action"),i.Sb(19,"button",16),i.ac("click",(function(){return t.toggleSidebar()})),i.Sb(20,"mat-icon"),i.Bc(21,"build"),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.Bb(1),i.zc("width",t.widthSidebar+"px"),i.jc("enableGhostResize",!0)("resizeEdges",i.lc(9,Ye,t.isOpenSidebar))("validateResize",t.validate),i.Bb(2),i.jc("ngIf",t.isOpenSidebar),i.Bb(4),i.jc("ngIf",t.isOpenSidebar),i.Bb(1),i.jc("ngIf",!t.isOpenSidebar),i.Bb(3),i.jc("ngForOf",t.allGraphics))},directives:[c.f,c.d,c.c,h.a,c.b,n.k,v.a,n.j,ve.a,me.a,ye.a,B.a,Re.a,c.e,y.a,Se.a,R.b,R.e,S.a,xe.b,Ce.g,Ce.i,D.k,x.b,C.b,C.d,R.f,C.a,xe.a,De.a,Be.a],styles:[".dividerSidebar[_ngcontent-%COMP%]{background-color:#323233}.icon[_ngcontent-%COMP%]:hover{color:#ec407a}.icon[_ngcontent-%COMP%]{color:#f48fb1}mwlResizable[_ngcontent-%COMP%]{box-sizing:border-box}.floatingButtonContener[_ngcontent-%COMP%]{position:fixed;bottom:40px;right:20px}.buttonSidebarClose[_ngcontent-%COMP%]{padding:0;width:20px;min-width:0}.contentTemplate[_ngcontent-%COMP%]{padding-left:10px}.titleTemplate[_ngcontent-%COMP%]{padding-left:5px}.dateInput[_ngcontent-%COMP%]{width:150px}.scrollable[_ngcontent-%COMP%]{overflow:auto}"]}),ze)}]}],Xe=((Ne=function e(){_classCallCheck(this,e)}).\u0275mod=i.Lb({type:Ne}),Ne.\u0275inj=i.Kb({factory:function(e){return new(e||Ne)},imports:[[o.e.forChild($e)],o.e]}),Ne),Ke=a("95T3"),Je=a("YUcS"),Qe=a("j+7c"),We=a("XhcP"),Ze=a("bSwM"),et=a("Xa2L");a.d(t,"GlobalModule",(function(){return at})),Be.b.plotlyjs=Ke;var tt,at=((tt=function e(){_classCallCheck(this,e)}).\u0275mod=i.Lb({type:tt}),tt.\u0275inj=i.Kb({factory:function(e){return new(e||tt)},imports:[[n.c,Xe,r.c,Be.b,v.b,B.b,Je.a,Qe.a,xe.c,Ce.c,y.b,We.a,h.b,ye.b,Ze.a,C.c,x.c,R.d,D.i,Se.b,S.b,Ce.j,De.b,et.a,m.c]]}),tt)}}]);