@swimlane/ngx-charts 13.0.4 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/bundles/swimlane-ngx-charts.umd.js +100 -211
  2. package/bundles/swimlane-ngx-charts.umd.js.map +1 -1
  3. package/bundles/swimlane-ngx-charts.umd.min.js +1 -1
  4. package/bundles/swimlane-ngx-charts.umd.min.js.map +1 -1
  5. package/esm2015/lib/area-chart/area-chart-normalized.component.js +3 -5
  6. package/esm2015/lib/area-chart/area-chart-stacked.component.js +3 -5
  7. package/esm2015/lib/area-chart/area-chart.component.js +3 -5
  8. package/esm2015/lib/bar-chart/bar-horizontal-2d.component.js +4 -9
  9. package/esm2015/lib/bar-chart/bar-horizontal-normalized.component.js +4 -9
  10. package/esm2015/lib/bar-chart/bar-horizontal-stacked.component.js +4 -9
  11. package/esm2015/lib/bar-chart/bar-horizontal.component.js +4 -9
  12. package/esm2015/lib/bar-chart/bar-vertical-2d.component.js +4 -9
  13. package/esm2015/lib/bar-chart/bar-vertical-normalized.component.js +4 -9
  14. package/esm2015/lib/bar-chart/bar-vertical-stacked.component.js +4 -9
  15. package/esm2015/lib/bar-chart/bar-vertical.component.js +4 -9
  16. package/esm2015/lib/bar-chart/bar.component.js +2 -5
  17. package/esm2015/lib/bubble-chart/bubble-chart.component.js +3 -5
  18. package/esm2015/lib/bubble-chart/bubble-chart.utils.js +4 -10
  19. package/esm2015/lib/common/area.component.js +2 -5
  20. package/esm2015/lib/common/axes/x-axis-ticks.component.js +1 -1
  21. package/esm2015/lib/common/axes/y-axis-ticks.component.js +1 -1
  22. package/esm2015/lib/common/base-chart.component.js +2 -4
  23. package/esm2015/lib/common/color.helper.js +7 -19
  24. package/esm2015/lib/common/count/count.directive.js +2 -4
  25. package/esm2015/lib/common/legend/advanced-legend.component.js +1 -1
  26. package/esm2015/lib/common/legend/legend.component.js +1 -1
  27. package/esm2015/lib/common/legend/scale-legend.component.js +1 -1
  28. package/esm2015/lib/common/tick-format.helper.js +1 -1
  29. package/esm2015/lib/common/timeline/timeline.component.js +6 -17
  30. package/esm2015/lib/common/tooltip/tooltip.component.js +1 -1
  31. package/esm2015/lib/gauge/gauge.component.js +3 -6
  32. package/esm2015/lib/gauge/linear-gauge.component.js +3 -5
  33. package/esm2015/lib/heat-map/heat-map-cell.component.js +2 -5
  34. package/esm2015/lib/heat-map/heat-map.component.js +4 -10
  35. package/esm2015/lib/line-chart/line-chart.component.js +6 -15
  36. package/esm2015/lib/line-chart/line.component.js +2 -5
  37. package/esm2015/lib/number-card/number-card.component.js +1 -1
  38. package/esm2015/lib/pie-chart/advanced-pie-chart.component.js +1 -1
  39. package/esm2015/lib/pie-chart/pie-arc.component.js +2 -5
  40. package/esm2015/lib/pie-chart/pie-chart.component.js +1 -1
  41. package/esm2015/lib/pie-chart/pie-grid.component.js +1 -1
  42. package/esm2015/lib/pie-chart/pie-label.component.js +2 -4
  43. package/esm2015/lib/polar-chart/polar-chart.component.js +5 -11
  44. package/esm2015/lib/tree-map/tree-map-cell.component.js +3 -11
  45. package/esm2015/lib/utils/throttle.js +1 -1
  46. package/esm5/lib/area-chart/area-chart-normalized.component.js +3 -5
  47. package/esm5/lib/area-chart/area-chart-stacked.component.js +3 -5
  48. package/esm5/lib/area-chart/area-chart.component.js +3 -5
  49. package/esm5/lib/bar-chart/bar-horizontal-2d.component.js +4 -9
  50. package/esm5/lib/bar-chart/bar-horizontal-normalized.component.js +4 -9
  51. package/esm5/lib/bar-chart/bar-horizontal-stacked.component.js +4 -9
  52. package/esm5/lib/bar-chart/bar-horizontal.component.js +4 -9
  53. package/esm5/lib/bar-chart/bar-vertical-2d.component.js +4 -9
  54. package/esm5/lib/bar-chart/bar-vertical-normalized.component.js +4 -9
  55. package/esm5/lib/bar-chart/bar-vertical-stacked.component.js +4 -9
  56. package/esm5/lib/bar-chart/bar-vertical.component.js +4 -9
  57. package/esm5/lib/bar-chart/bar.component.js +2 -5
  58. package/esm5/lib/bubble-chart/bubble-chart.component.js +3 -5
  59. package/esm5/lib/bubble-chart/bubble-chart.utils.js +4 -10
  60. package/esm5/lib/common/area.component.js +2 -5
  61. package/esm5/lib/common/axes/x-axis-ticks.component.js +1 -1
  62. package/esm5/lib/common/axes/y-axis-ticks.component.js +1 -1
  63. package/esm5/lib/common/base-chart.component.js +2 -2
  64. package/esm5/lib/common/color.helper.js +7 -19
  65. package/esm5/lib/common/count/count.directive.js +2 -2
  66. package/esm5/lib/common/legend/advanced-legend.component.js +1 -1
  67. package/esm5/lib/common/legend/legend.component.js +1 -1
  68. package/esm5/lib/common/legend/scale-legend.component.js +1 -1
  69. package/esm5/lib/common/tick-format.helper.js +1 -1
  70. package/esm5/lib/common/timeline/timeline.component.js +6 -17
  71. package/esm5/lib/common/tooltip/tooltip.component.js +1 -1
  72. package/esm5/lib/gauge/gauge.component.js +3 -6
  73. package/esm5/lib/gauge/linear-gauge.component.js +3 -5
  74. package/esm5/lib/heat-map/heat-map-cell.component.js +2 -5
  75. package/esm5/lib/heat-map/heat-map.component.js +4 -10
  76. package/esm5/lib/line-chart/line-chart.component.js +6 -15
  77. package/esm5/lib/line-chart/line.component.js +2 -5
  78. package/esm5/lib/number-card/number-card.component.js +1 -1
  79. package/esm5/lib/pie-chart/advanced-pie-chart.component.js +1 -1
  80. package/esm5/lib/pie-chart/pie-arc.component.js +2 -5
  81. package/esm5/lib/pie-chart/pie-chart.component.js +1 -1
  82. package/esm5/lib/pie-chart/pie-grid.component.js +1 -1
  83. package/esm5/lib/pie-chart/pie-label.component.js +2 -4
  84. package/esm5/lib/polar-chart/polar-chart.component.js +5 -11
  85. package/esm5/lib/tree-map/tree-map-cell.component.js +3 -11
  86. package/esm5/lib/utils/throttle.js +1 -1
  87. package/fesm2015/swimlane-ngx-charts.js +80 -212
  88. package/fesm2015/swimlane-ngx-charts.js.map +1 -1
  89. package/fesm5/swimlane-ngx-charts.js +80 -208
  90. package/fesm5/swimlane-ngx-charts.js.map +1 -1
  91. package/lib/bar-chart/bar.component.d.ts +1 -1
  92. package/lib/common/count/count.directive.d.ts +6 -3
  93. package/lib/common/legend/legend-entry.component.d.ts +1 -1
  94. package/lib/common/svg-radial-gradient.component.d.ts +2 -1
  95. package/lib/common/tooltip/tooltip.component.d.ts +1 -1
  96. package/lib/common/tooltip/tooltip.directive.d.ts +2 -2
  97. package/lib/number-card/number-card.component.d.ts +1 -1
  98. package/lib/pie-chart/pie-label.component.d.ts +5 -5
  99. package/package.json +8 -8
  100. package/swimlane-ngx-charts.metadata.json +1 -1
@@ -12,5 +12,5 @@
12
12
 
13
13
  See the Apache Version 2.0 License for specific language governing permissions
14
14
  and limitations under the License.
15
- ***************************************************************************** */var x=function(t,e){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function f(t,e){function i(){this.constructor=t}x(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var b=function(){return(b=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var a in e=arguments[i])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t}).apply(this,arguments)};function T(t,e,i,n){var a,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s}function k(t){var e="function"==typeof Symbol&&t[Symbol.iterator],i=0;return e?e.call(t):{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}}}function w(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,a,o=i.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){a={error:t}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(a)throw a.error}}return s}function A(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(w(arguments[e]));return t}var I,L=function(){function t(t,e,i){this.applicationRef=t,this.componentFactoryResolver=e,this.injector=i}var i;return i=t,t.setGlobalRootViewContainer=function(t){i.globalRootViewContainer=t},t.prototype.getRootViewContainer=function(){if(this._container)return this._container;if(i.globalRootViewContainer)return i.globalRootViewContainer;if(this.applicationRef.components.length)return this.applicationRef.components[0];throw new Error("View Container not found! ngUpgrade needs to manually set this via setRootViewContainer or setGlobalRootViewContainer.")},t.prototype.setRootViewContainer=function(t){this._container=t},t.prototype.getComponentRootNode=function(t){return t.element?t.element.nativeElement:t.hostView&&t.hostView.rootNodes.length>0?t.hostView.rootNodes[0]:t.location.nativeElement},t.prototype.getRootViewContainerNode=function(t){return this.getComponentRootNode(t)},t.prototype.projectComponentBindings=function(t,e){var i,n,a,o;if(e){if(void 0!==e.inputs){var s=Object.getOwnPropertyNames(e.inputs);try{for(var r=k(s),l=r.next();!l.done;l=r.next()){var c=l.value;t.instance[c]=e.inputs[c]}}catch(t){i={error:t}}finally{try{l&&!l.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}if(void 0!==e.outputs){var h=Object.getOwnPropertyNames(e.outputs);try{for(var p=k(h),d=p.next();!d.done;d=p.next()){var g=d.value;t.instance[g]=e.outputs[g]}}catch(t){a={error:t}}finally{try{d&&!d.done&&(o=p.return)&&o.call(p)}finally{if(a)throw a.error}}}}return t},t.prototype.appendComponent=function(t,e,i){void 0===e&&(e={}),i||(i=this.getRootViewContainer());var n=this.getComponentRootNode(i),o=new a.DomPortalHost(n,this.componentFactoryResolver,this.applicationRef,this.injector),s=new a.ComponentPortal(t),r=o.attach(s);return this.projectComponentBindings(r,e),r},t.globalRootViewContainer=null,t.ctorParameters=function(){return[{type:e.ApplicationRef},{type:e.ComponentFactoryResolver},{type:e.Injector}]},t=i=T([e.Injectable()],t)}();function S(t,e,i){var n,a,o;i=i||{};var s=null,r=0;function l(){r=!1===i.leading?0:+new Date,s=null,o=t.apply(n,a)}return function(){var c=+new Date;r||!1!==i.leading||(r=c);var h=e-(c-r);return n=this,a=arguments,h<=0?(clearTimeout(s),s=null,r=c,o=t.apply(n,a)):s||!1===i.trailing||(s=setTimeout(l,h)),o}}function D(t,e){return function(i,n,a){return{configurable:!0,enumerable:a.enumerable,get:function(){return Object.defineProperty(this,n,{configurable:!0,enumerable:a.enumerable,value:S(a.value,t,e)}),this[n]}}}}!function(t){t[t.top="top"]="top",t[t.bottom="bottom"]="bottom",t[t.left="left"]="left",t[t.right="right"]="right"}(I||(I={}));var C=7;function E(t,e,i){return"top"===i?t.top-C:"bottom"===i?t.top+t.height-e.height+C:"center"===i?t.top+t.height/2-e.height/2:void 0}function O(t,e,i){return"left"===i?t.left-C:"right"===i?t.left+t.width-e.width+C:"center"===i?t.left+t.width/2-e.width/2:void 0}var M=function(){function t(){}return t.calculateVerticalAlignment=function(t,e,i){var n=E(t,e,i);return n+e.height>window.innerHeight&&(n=window.innerHeight-e.height),n},t.calculateVerticalCaret=function(t,e,i,n){var a;"top"===n&&(a=t.height/2-i.height/2+C),"bottom"===n&&(a=e.height-t.height/2-i.height/2-C),"center"===n&&(a=e.height/2-i.height/2);var o=E(t,e,n);return o+e.height>window.innerHeight&&(a+=o+e.height-window.innerHeight),a},t.calculateHorizontalAlignment=function(t,e,i){var n=O(t,e,i);return n+e.width>window.innerWidth&&(n=window.innerWidth-e.width),n},t.calculateHorizontalCaret=function(t,e,i,n){var a;"left"===n&&(a=t.width/2-i.width/2+C),"right"===n&&(a=e.width-t.width/2-i.width/2-C),"center"===n&&(a=e.width/2-i.width/2);var o=O(t,e,n);return o+e.width>window.innerWidth&&(a+=o+e.width-window.innerWidth),a},t.shouldFlip=function(t,e,i,n){var a=!1;return"right"===i&&t.left+t.width+e.width+n>window.innerWidth&&(a=!0),"left"===i&&t.left-e.width-n<0&&(a=!0),"top"===i&&t.top-e.height-n<0&&(a=!0),"bottom"===i&&t.top+t.height+e.height+n>window.innerHeight&&(a=!0),a},t.positionCaret=function(e,i,n,a,o){var s=0,r=0;return e===I.right?(r=-7,s=t.calculateVerticalCaret(n,i,a,o)):e===I.left?(r=i.width,s=t.calculateVerticalCaret(n,i,a,o)):e===I.top?(s=i.height,r=t.calculateHorizontalCaret(n,i,a,o)):e===I.bottom&&(s=-7,r=t.calculateHorizontalCaret(n,i,a,o)),{top:s,left:r}},t.positionContent=function(e,i,n,a,o){var s=0,r=0;return e===I.right?(r=n.left+n.width+a,s=t.calculateVerticalAlignment(n,i,o)):e===I.left?(r=n.left-i.width-a,s=t.calculateVerticalAlignment(n,i,o)):e===I.top?(s=n.top-i.height-a,r=t.calculateHorizontalAlignment(n,i,o)):e===I.bottom&&(s=n.top+n.height+a,r=t.calculateHorizontalAlignment(n,i,o)),{top:s,left:r}},t.determinePlacement=function(e,i,n,a){if(t.shouldFlip(n,i,e,a)){if(e===I.right)return I.left;if(e===I.left)return I.right;if(e===I.top)return I.bottom;if(e===I.bottom)return I.top}return e},t}(),F=function(){function t(t,e){this.element=t,this.renderer=e}return Object.defineProperty(t.prototype,"cssClasses",{get:function(){var t="ngx-charts-tooltip-content";return t+=" position-"+this.placement,t+=" type-"+this.type,t+=" "+this.cssClass},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){setTimeout(this.position.bind(this))},t.prototype.position=function(){var t=this,e=this.element.nativeElement,i=this.host.nativeElement.getBoundingClientRect();if(i.height||i.width){var n=e.getBoundingClientRect();this.checkFlip(i,n),this.positionContent(e,i,n),this.showCaret&&this.positionCaret(i,n),setTimeout((function(){return t.renderer.addClass(e,"animate")}),1)}},t.prototype.positionContent=function(t,e,i){var n=M.positionContent(this.placement,i,e,this.spacing,this.alignment),a=n.top,o=n.left;this.renderer.setStyle(t,"top",a+"px"),this.renderer.setStyle(t,"left",o+"px")},t.prototype.positionCaret=function(t,e){var i=this.caretElm.nativeElement,n=i.getBoundingClientRect(),a=M.positionCaret(this.placement,e,t,n,this.alignment),o=a.top,s=a.left;this.renderer.setStyle(i,"top",o+"px"),this.renderer.setStyle(i,"left",s+"px")},t.prototype.checkFlip=function(t,e){this.placement=M.determinePlacement(this.placement,e,t,this.spacing)},t.prototype.onWindowResize=function(){this.position()},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2}]},T([e.Input()],t.prototype,"host",void 0),T([e.Input()],t.prototype,"showCaret",void 0),T([e.Input()],t.prototype,"type",void 0),T([e.Input()],t.prototype,"placement",void 0),T([e.Input()],t.prototype,"alignment",void 0),T([e.Input()],t.prototype,"spacing",void 0),T([e.Input()],t.prototype,"cssClass",void 0),T([e.Input()],t.prototype,"title",void 0),T([e.Input()],t.prototype,"template",void 0),T([e.Input()],t.prototype,"context",void 0),T([e.ViewChild("caretElm")],t.prototype,"caretElm",void 0),T([e.HostBinding("class")],t.prototype,"cssClasses",null),T([e.HostListener("window:resize"),D(100)],t.prototype,"onWindowResize",null),t=T([e.Component({selector:"ngx-tooltip-content",template:'\n <div>\n <span #caretElm [hidden]="!showCaret" class="tooltip-caret position-{{ this.placement }}"> </span>\n <div class="tooltip-content">\n <span *ngIf="!title">\n <ng-template [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ model: context }"> </ng-template>\n </span>\n <span *ngIf="title" [innerHTML]="title"> </span>\n </div>\n </div>\n ',encapsulation:e.ViewEncapsulation.None,styles:[".ngx-charts-tooltip-content{position:fixed;border-radius:3px;z-index:5000;display:block;font-weight:400;opacity:0;pointer-events:none!important}.ngx-charts-tooltip-content.type-popover{background:#fff;color:#060709;border:1px solid #72809b;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);font-size:13px;padding:4px}.ngx-charts-tooltip-content.type-popover .tooltip-caret{position:absolute;z-index:5001;width:0;height:0}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-left{border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-right{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-bottom{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #fff}.ngx-charts-tooltip-content.type-tooltip{color:#fff;background:rgba(0,0,0,.75);font-size:12px;padding:0 10px;text-align:center;pointer-events:auto}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-left{border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-right{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-bottom{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content .tooltip-label{display:block;line-height:1em;padding:8px 5px 5px;font-size:1em}.ngx-charts-tooltip-content .tooltip-val{display:block;font-size:1.3em;line-height:1em;padding:0 5px 8px}.ngx-charts-tooltip-content .tooltip-caret{position:absolute;z-index:5001;width:0;height:0}.ngx-charts-tooltip-content.position-right{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}.ngx-charts-tooltip-content.position-left{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}.ngx-charts-tooltip-content.position-top{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}.ngx-charts-tooltip-content.position-bottom{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}.ngx-charts-tooltip-content.animate{opacity:1;-webkit-transition:opacity .3s,-webkit-transform .3s;transition:opacity .3s,transform .3s,-webkit-transform .3s;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);pointer-events:auto}.area-tooltip-container{padding:5px 0;pointer-events:none}.tooltip-item{text-align:left;line-height:1.2em;padding:5px 0}.tooltip-item .tooltip-item-color{display:inline-block;height:12px;width:12px;margin-right:5px;color:#5b646b;border-radius:3px}"]})],t)}(),P=function(){function t(t){this.injectionService=t,this.defaults={},this.components=new Map}return t.prototype.getByType=function(t){return void 0===t&&(t=this.type),this.components.get(t)},t.prototype.create=function(t){return this.createByType(this.type,t)},t.prototype.createByType=function(t,e){e=this.assignDefaults(e);var i=this.injectComponent(t,e);return this.register(t,i),i},t.prototype.destroy=function(t){var e=this.components.get(t.componentType);if(e&&e.length){var i=e.indexOf(t);if(i>-1)e[i].destroy(),e.splice(i,1)}},t.prototype.destroyAll=function(){this.destroyByType(this.type)},t.prototype.destroyByType=function(t){var e=this.components.get(t);if(e&&e.length)for(var i=e.length-1;i>=0;)this.destroy(e[i--])},t.prototype.injectComponent=function(t,e){return this.injectionService.appendComponent(t,e)},t.prototype.assignDefaults=function(t){var e=b({},this.defaults.inputs),i=b({},this.defaults.outputs);return t.inputs||t.outputs||(t={inputs:t}),e&&(t.inputs=b(b({},e),t.inputs)),i&&(t.outputs=b(b({},i),t.outputs)),t},t.prototype.register=function(t,e){this.components.has(t)||this.components.set(t,[]),this.components.get(t).push(e)},t}(),X=function(t){function i(e){var i=t.call(this,e)||this;return i.type=F,i}return f(i,t),i.ctorParameters=function(){return[{type:L}]},i=T([e.Injectable()],i)}(P),Y=function(){function t(){this.showLegend=!1,this.animations=!0,this.legendLabelClick=new e.EventEmitter,this.legendLabelActivate=new e.EventEmitter,this.legendLabelDeactivate=new e.EventEmitter}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){var t=0;this.showLegend&&(this.legendType=this.getLegendType(),this.legendOptions&&"right"!==this.legendOptions.position||(t="scaleLegend"===this.legendType?1:2));var e=12-t;this.chartWidth=Math.floor(this.view[0]*e/12),this.legendWidth=this.legendOptions&&"right"!==this.legendOptions.position?this.chartWidth:Math.floor(this.view[0]*t/12)},t.prototype.getLegendType=function(){return"linear"===this.legendOptions.scaleType?"scaleLegend":"legend"},T([e.Input()],t.prototype,"view",void 0),T([e.Input()],t.prototype,"showLegend",void 0),T([e.Input()],t.prototype,"legendOptions",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"legendData",void 0),T([e.Input()],t.prototype,"legendType",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"activeEntries",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"legendLabelClick",void 0),T([e.Output()],t.prototype,"legendLabelActivate",void 0),T([e.Output()],t.prototype,"legendLabelDeactivate",void 0),t=T([e.Component({providers:[X],selector:"ngx-charts-chart",template:'\n <div class="ngx-charts-outer" [style.width.px]="view[0]" [@animationState]="\'active\'" [@.disabled]="!animations">\n <svg class="ngx-charts" [attr.width]="chartWidth" [attr.height]="view[1]">\n <ng-content></ng-content>\n </svg>\n <ngx-charts-scale-legend\n *ngIf="showLegend && legendType === \'scaleLegend\'"\n class="chart-legend"\n [horizontal]="legendOptions && legendOptions.position === \'below\'"\n [valueRange]="legendOptions.domain"\n [colors]="legendOptions.colors"\n [height]="view[1]"\n [width]="legendWidth"\n >\n </ngx-charts-scale-legend>\n <ngx-charts-legend\n *ngIf="showLegend && legendType === \'legend\'"\n class="chart-legend"\n [horizontal]="legendOptions && legendOptions.position === \'below\'"\n [data]="legendOptions.domain"\n [title]="legendOptions.title"\n [colors]="legendOptions.colors"\n [height]="view[1]"\n [width]="legendWidth"\n [activeEntries]="activeEntries"\n (labelClick)="legendLabelClick.emit($event)"\n (labelActivate)="legendLabelActivate.emit($event)"\n (labelDeactivate)="legendLabelDeactivate.emit($event)"\n >\n </ngx-charts-legend>\n </div>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":enter",[n.style({opacity:0}),n.animate("500ms 100ms",n.style({opacity:1}))])])]})],t)}(),R=function(){function t(t,i){this.element=t,this.zone=i,this.visible=new e.EventEmitter,this.isVisible=!1,this.runCheck()}return t.prototype.destroy=function(){clearTimeout(this.timeout)},t.prototype.onVisibilityChange=function(){var t=this;this.zone.run((function(){t.isVisible=!0,t.visible.emit(!0)}))},t.prototype.runCheck=function(){var t=this,e=function(){if(t.element){var i=t.element.nativeElement,n=i.offsetHeight,a=i.offsetWidth;n&&a?(clearTimeout(t.timeout),t.onVisibilityChange()):(clearTimeout(t.timeout),t.zone.runOutsideAngular((function(){t.timeout=setTimeout((function(){return e()}),100)})))}};this.zone.runOutsideAngular((function(){t.timeout=setTimeout((function(){return e()}))}))},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone}]},T([e.Output()],t.prototype,"visible",void 0),t=T([e.Directive({selector:"visibility-observer"})],t)}(),z=function(){function t(t,i,n){this.chartElement=t,this.zone=i,this.cd=n,this.scheme="cool",this.schemeType="ordinal",this.animations=!0,this.select=new e.EventEmitter}return t.prototype.ngAfterViewInit=function(){this.bindWindowResizeEvent(),this.visibilityObserver=new R(this.chartElement,this.zone),this.visibilityObserver.visible.subscribe(this.update.bind(this))},t.prototype.ngOnDestroy=function(){this.unbindEvents(),this.visibilityObserver&&(this.visibilityObserver.visible.unsubscribe(),this.visibilityObserver.destroy())},t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){if(this.results?this.results=this.cloneData(this.results):this.results=[],this.view)this.width=this.view[0],this.height=this.view[1];else{var t=this.getContainerDims();t&&(this.width=t.width,this.height=t.height)}this.width||(this.width=600),this.height||(this.height=400),this.width=Math.floor(this.width),this.height=Math.floor(this.height),this.cd&&this.cd.markForCheck()},t.prototype.getContainerDims=function(){var t,e,i=this.chartElement.nativeElement;if(null!==i.parentNode){var n=i.parentNode.getBoundingClientRect();t=n.width,e=n.height}return t&&e?{width:t,height:e}:null},t.prototype.formatDates=function(){for(var t=0;t<this.results.length;t++){var e=this.results[t];if(e.label=e.name,e.label instanceof Date&&(e.label=e.label.toLocaleDateString()),e.series)for(var i=0;i<e.series.length;i++){var n=e.series[i];n.label=n.name,n.label instanceof Date&&(n.label=n.label.toLocaleDateString())}}},t.prototype.unbindEvents=function(){this.resizeSubscription&&this.resizeSubscription.unsubscribe()},t.prototype.bindWindowResizeEvent=function(){var t=this,e=o.fromEvent(window,"resize").pipe(s.debounceTime(200)).subscribe((function(e){t.update(),t.cd&&t.cd.markForCheck()}));this.resizeSubscription=e},t.prototype.cloneData=function(t){var e,i,n,a,o=[];try{for(var s=k(t),r=s.next();!r.done;r=s.next()){var l=r.value,c={name:l.name};if(void 0!==l.value&&(c.value=l.value),void 0!==l.series){c.series=[];try{for(var h=(n=void 0,k(l.series)),p=h.next();!p.done;p=h.next()){var d=p.value,g=Object.assign({},d);c.series.push(g)}}catch(t){n={error:t}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(n)throw n.error}}}void 0!==l.extra&&(c.extra=JSON.parse(JSON.stringify(l.extra))),o.push(c)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}return o},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone},{type:e.ChangeDetectorRef}]},T([e.Input()],t.prototype,"results",void 0),T([e.Input()],t.prototype,"view",void 0),T([e.Input()],t.prototype,"scheme",void 0),T([e.Input()],t.prototype,"schemeType",void 0),T([e.Input()],t.prototype,"customColors",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),t=T([e.Component({selector:"base-chart",template:"\n <div></div>\n "})],t)}(),H=function(){function t(t){this.textHeight=25,this.margin=5,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){switch(this.strokeWidth="0.01",this.textAnchor="middle",this.transform="",this.orient){case"top":case"bottom":this.y=this.offset,this.x=this.width/2;break;case"left":this.y=-(this.offset+this.textHeight+this.margin),this.x=-this.height/2,this.transform="rotate(270)";break;case"right":this.y=this.offset+this.margin,this.x=-this.height/2,this.transform="rotate(270)"}},t.ctorParameters=function(){return[{type:e.ElementRef}]},T([e.Input()],t.prototype,"orient",void 0),T([e.Input()],t.prototype,"label",void 0),T([e.Input()],t.prototype,"offset",void 0),T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"height",void 0),t=T([e.Component({selector:"g[ngx-charts-axis-label]",template:'\n <svg:text\n [attr.stroke-width]="strokeWidth"\n [attr.x]="x"\n [attr.y]="y"\n [attr.text-anchor]="textAnchor"\n [attr.transform]="transform"\n >\n {{ label }}\n </svg:text>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}();function W(t,e){return void 0===e&&(e=16),"string"!=typeof t?"number"==typeof t?t+"":"":(t=t.trim()).length<=e?t:t.slice(0,e)+"..."}function B(t,e){if(t.length>e){for(var i=[],n=Math.floor(t.length/e),a=0;a<t.length;a++)a%n==0&&i.push(t[a]);t=i}return t}var V=function(){function t(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.rotateTicks=!0,this.dimensionsChanged=new e.EventEmitter,this.verticalSpacing=20,this.rotateLabels=!1,this.innerTickSize=6,this.outerTickSize=6,this.tickPadding=3,this.textAnchor="middle",this.maxTicksLength=0,this.maxAllowedLength=16,this.height=0}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.ngAfterViewInit=function(){var t=this;setTimeout((function(){return t.updateDims()}))},t.prototype.updateDims=function(){var t=this,e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().height,10);e!==this.height&&(this.height=e,this.dimensionsChanged.emit({height:e}),setTimeout((function(){return t.updateDims()})))},t.prototype.update=function(){var t=this,e=this.scale;this.ticks=this.getTicks(),this.tickFormatting?this.tickFormat=this.tickFormatting:e.tickFormat?this.tickFormat=e.tickFormat.apply(e,this.tickArguments):this.tickFormat=function(t){return"Date"===t.constructor.name?t.toLocaleDateString():t.toLocaleString()};var i=this.rotateTicks?this.getRotationAngle(this.ticks):null;this.adjustedScale=this.scale.bandwidth?function(t){return this.scale(t)+.5*this.scale.bandwidth()}:this.scale,this.textTransform="",i&&0!==i?(this.textTransform="rotate("+i+")",this.textAnchor="end",this.verticalSpacing=10):this.textAnchor="middle",setTimeout((function(){return t.updateDims()}))},t.prototype.getRotationAngle=function(t){var e=0;this.maxTicksLength=0;for(var i=0;i<t.length;i++){var n=this.tickFormat(t[i]).toString(),a=n.length;this.trimTicks&&(a=this.tickTrim(n).length),a>this.maxTicksLength&&(this.maxTicksLength=a)}for(var o=8*Math.min(this.maxTicksLength,this.maxAllowedLength),s=o,r=Math.floor(this.width/t.length);s>r&&e>-90;)e-=30,s=Math.cos(e*(Math.PI/180))*o;return e},t.prototype.getTicks=function(){var t=this.getMaxTicks(20),e=this.getMaxTicks(100);return this.tickValues?this.tickValues:this.scale.ticks?this.scale.ticks.apply(this.scale,[e]):B(this.scale.domain(),t)},t.prototype.getMaxTicks=function(t){return Math.floor(this.width/t)},t.prototype.tickTransform=function(t){return"translate("+this.adjustedScale(t)+","+this.verticalSpacing+")"},t.prototype.gridLineTransform=function(){return"translate(0,"+(-this.verticalSpacing-5)+")"},t.prototype.tickTrim=function(t){return this.trimTicks?W(t,this.maxTickLength):t},T([e.Input()],t.prototype,"scale",void 0),T([e.Input()],t.prototype,"orient",void 0),T([e.Input()],t.prototype,"tickArguments",void 0),T([e.Input()],t.prototype,"tickValues",void 0),T([e.Input()],t.prototype,"tickStroke",void 0),T([e.Input()],t.prototype,"trimTicks",void 0),T([e.Input()],t.prototype,"maxTickLength",void 0),T([e.Input()],t.prototype,"tickFormatting",void 0),T([e.Input()],t.prototype,"showGridLines",void 0),T([e.Input()],t.prototype,"gridLineHeight",void 0),T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"rotateTicks",void 0),T([e.Output()],t.prototype,"dimensionsChanged",void 0),T([e.ViewChild("ticksel")],t.prototype,"ticksElement",void 0),t=T([e.Component({selector:"g[ngx-charts-x-axis-ticks]",template:'\n <svg:g #ticksel>\n <svg:g *ngFor="let tick of ticks" class="tick" [attr.transform]="tickTransform(tick)">\n <title>{{ tickFormat(tick) }}</title>\n <svg:text\n stroke-width="0.01"\n [attr.text-anchor]="textAnchor"\n [attr.transform]="textTransform"\n [style.font-size]="\'12px\'"\n >\n {{ tickTrim(tickFormat(tick)) }}\n </svg:text>\n </svg:g>\n </svg:g>\n\n <svg:g *ngFor="let tick of ticks" [attr.transform]="tickTransform(tick)">\n <svg:g *ngIf="showGridLines" [attr.transform]="gridLineTransform()">\n <svg:line class="gridline-path gridline-path-vertical" [attr.y1]="-gridLineHeight" y2="0" />\n </svg:g>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),G=function(){function t(){this.rotateTicks=!0,this.showGridLines=!1,this.xOrient="bottom",this.xAxisOffset=0,this.dimensionsChanged=new e.EventEmitter,this.xAxisClassName="x axis",this.labelOffset=0,this.fill="none",this.stroke="stroke",this.tickStroke="#ccc",this.strokeWidth="none",this.padding=5}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.transform="translate(0,"+(this.xAxisOffset+this.padding+this.dims.height)+")",void 0!==this.xAxisTickCount&&(this.tickArguments=[this.xAxisTickCount])},t.prototype.emitTicksHeight=function(t){var e=this,i=t.height,n=i+25+5;n!==this.labelOffset&&(this.labelOffset=n,setTimeout((function(){e.dimensionsChanged.emit({height:i})}),0))},T([e.Input()],t.prototype,"xScale",void 0),T([e.Input()],t.prototype,"dims",void 0),T([e.Input()],t.prototype,"trimTicks",void 0),T([e.Input()],t.prototype,"rotateTicks",void 0),T([e.Input()],t.prototype,"maxTickLength",void 0),T([e.Input()],t.prototype,"tickFormatting",void 0),T([e.Input()],t.prototype,"showGridLines",void 0),T([e.Input()],t.prototype,"showLabel",void 0),T([e.Input()],t.prototype,"labelText",void 0),T([e.Input()],t.prototype,"ticks",void 0),T([e.Input()],t.prototype,"xAxisTickInterval",void 0),T([e.Input()],t.prototype,"xAxisTickCount",void 0),T([e.Input()],t.prototype,"xOrient",void 0),T([e.Input()],t.prototype,"xAxisOffset",void 0),T([e.Output()],t.prototype,"dimensionsChanged",void 0),T([e.ViewChild(V)],t.prototype,"ticksComponent",void 0),t=T([e.Component({selector:"g[ngx-charts-x-axis]",template:'\n <svg:g [attr.class]="xAxisClassName" [attr.transform]="transform">\n <svg:g\n ngx-charts-x-axis-ticks\n *ngIf="xScale"\n [trimTicks]="trimTicks"\n [rotateTicks]="rotateTicks"\n [maxTickLength]="maxTickLength"\n [tickFormatting]="tickFormatting"\n [tickArguments]="tickArguments"\n [tickStroke]="tickStroke"\n [scale]="xScale"\n [orient]="xOrient"\n [showGridLines]="showGridLines"\n [gridLineHeight]="dims.height"\n [width]="dims.width"\n [tickValues]="ticks"\n (dimensionsChanged)="emitTicksHeight($event)"\n />\n <svg:g\n ngx-charts-axis-label\n *ngIf="showLabel"\n [label]="labelText"\n [offset]="labelOffset"\n [orient]="\'bottom\'"\n [height]="dims.height"\n [width]="dims.width"\n ></svg:g>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}();function $(t,e,i,n,a,o){var s=w(o,4),r=s[0],l=s[1],c=s[2],h=s[3],p="";return p="M"+[t+a,e],p+="h"+((i=0===(i=Math.floor(i))?1:i)-2*a),p+=l?"a"+[a,a]+" 0 0 1 "+[a,a]:"h"+a+"v"+a,p+="v"+((n=0===(n=Math.floor(n))?1:n)-2*a),p+=h?"a"+[a,a]+" 0 0 1 "+[-a,a]:"v"+a+"h"+-a,p+="h"+(2*a-i),p+=c?"a"+[a,a]+" 0 0 1 "+[-a,-a]:"h"+-a+"v"+-a,p+="v"+(2*a-n),p+=r?"a"+[a,a]+" 0 0 1 "+[a,-a]:"v"+-a+"h"+a,p+="z"}var N,j,Z,_=function(){function t(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.showRefLabels=!1,this.showRefLines=!1,this.dimensionsChanged=new e.EventEmitter,this.innerTickSize=6,this.tickPadding=3,this.verticalSpacing=20,this.textAnchor="middle",this.width=0,this.outerTickSize=6,this.rotateLabels=!1,this.referenceLineLength=0}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.ngAfterViewInit=function(){var t=this;setTimeout((function(){return t.updateDims()}))},t.prototype.updateDims=function(){var t=this,e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().width,10);e!==this.width&&(this.width=e,this.dimensionsChanged.emit({width:e}),setTimeout((function(){return t.updateDims()})))},t.prototype.update=function(){var t,e=this,i="top"===this.orient||"right"===this.orient?-1:1;switch(this.tickSpacing=Math.max(this.innerTickSize,0)+this.tickPadding,t=this.scale,this.ticks=this.getTicks(),this.tickFormatting?this.tickFormat=this.tickFormatting:t.tickFormat?this.tickFormat=t.tickFormat.apply(t,this.tickArguments):this.tickFormat=function(t){return"Date"===t.constructor.name?t.toLocaleDateString():t.toLocaleString()},this.adjustedScale=t.bandwidth?function(e){return t(e)+.5*t.bandwidth()}:t,this.showRefLines&&this.referenceLines&&this.setReferencelines(),this.orient){case"top":case"bottom":this.transform=function(t){return"translate("+this.adjustedScale(t)+",0)"},this.textAnchor="middle",this.y2=this.innerTickSize*i,this.y1=this.tickSpacing*i,this.dy=i<0?"0em":".71em";break;case"left":this.transform=function(t){return"translate(0,"+this.adjustedScale(t)+")"},this.textAnchor="end",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em";break;case"right":this.transform=function(t){return"translate(0,"+this.adjustedScale(t)+")"},this.textAnchor="start",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em"}setTimeout((function(){return e.updateDims()}))},t.prototype.setReferencelines=function(){this.refMin=this.adjustedScale(Math.min.apply(null,this.referenceLines.map((function(t){return t.value})))),this.refMax=this.adjustedScale(Math.max.apply(null,this.referenceLines.map((function(t){return t.value})))),this.referenceLineLength=this.referenceLines.length,this.referenceAreaPath=$(0,this.refMax,this.gridLineWidth,this.refMin-this.refMax,0,[!1,!1,!1,!1])},t.prototype.getTicks=function(){var t=this.getMaxTicks(20),e=this.getMaxTicks(50);return this.tickValues?this.tickValues:this.scale.ticks?this.scale.ticks.apply(this.scale,[e]):B(this.scale.domain(),t)},t.prototype.getMaxTicks=function(t){return Math.floor(this.height/t)},t.prototype.tickTransform=function(t){return"translate("+this.adjustedScale(t)+","+this.verticalSpacing+")"},t.prototype.gridLineTransform=function(){return"translate(5,0)"},t.prototype.tickTrim=function(t){return this.trimTicks?W(t,this.maxTickLength):t},T([e.Input()],t.prototype,"scale",void 0),T([e.Input()],t.prototype,"orient",void 0),T([e.Input()],t.prototype,"tickArguments",void 0),T([e.Input()],t.prototype,"tickValues",void 0),T([e.Input()],t.prototype,"tickStroke",void 0),T([e.Input()],t.prototype,"trimTicks",void 0),T([e.Input()],t.prototype,"maxTickLength",void 0),T([e.Input()],t.prototype,"tickFormatting",void 0),T([e.Input()],t.prototype,"showGridLines",void 0),T([e.Input()],t.prototype,"gridLineWidth",void 0),T([e.Input()],t.prototype,"height",void 0),T([e.Input()],t.prototype,"referenceLines",void 0),T([e.Input()],t.prototype,"showRefLabels",void 0),T([e.Input()],t.prototype,"showRefLines",void 0),T([e.Output()],t.prototype,"dimensionsChanged",void 0),T([e.ViewChild("ticksel")],t.prototype,"ticksElement",void 0),t=T([e.Component({selector:"g[ngx-charts-y-axis-ticks]",template:'\n <svg:g #ticksel>\n <svg:g *ngFor="let tick of ticks" class="tick" [attr.transform]="transform(tick)">\n <title>{{ tickFormat(tick) }}</title>\n <svg:text\n stroke-width="0.01"\n [attr.dy]="dy"\n [attr.x]="x1"\n [attr.y]="y1"\n [attr.text-anchor]="textAnchor"\n [style.font-size]="\'12px\'"\n >\n {{ tickTrim(tickFormat(tick)) }}\n </svg:text>\n </svg:g>\n </svg:g>\n\n <svg:path\n *ngIf="referenceLineLength > 1 && refMax && refMin && showRefLines"\n class="reference-area"\n [attr.d]="referenceAreaPath"\n [attr.transform]="gridLineTransform()"\n />\n <svg:g *ngFor="let tick of ticks" [attr.transform]="transform(tick)">\n <svg:g *ngIf="showGridLines" [attr.transform]="gridLineTransform()">\n <svg:line\n *ngIf="orient === \'left\'"\n class="gridline-path gridline-path-horizontal"\n x1="0"\n [attr.x2]="gridLineWidth"\n />\n <svg:line\n *ngIf="orient === \'right\'"\n class="gridline-path gridline-path-horizontal"\n x1="0"\n [attr.x2]="-gridLineWidth"\n />\n </svg:g>\n </svg:g>\n\n <svg:g *ngFor="let refLine of referenceLines">\n <svg:g *ngIf="showRefLines" [attr.transform]="transform(refLine.value)">\n <svg:line\n class="refline-path gridline-path-horizontal"\n x1="0"\n [attr.x2]="gridLineWidth"\n [attr.transform]="gridLineTransform()"\n />\n <svg:g *ngIf="showRefLabels">\n <title>{{ tickTrim(tickFormat(refLine.value)) }}</title>\n <svg:text\n class="refline-label"\n [attr.dy]="dy"\n [attr.y]="-6"\n [attr.x]="gridLineWidth"\n [attr.text-anchor]="textAnchor"\n >\n {{ refLine.name }}\n </svg:text>\n </svg:g>\n </svg:g>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),q=function(){function t(){this.showGridLines=!1,this.yOrient="left",this.yAxisOffset=0,this.dimensionsChanged=new e.EventEmitter,this.yAxisClassName="y axis",this.labelOffset=15,this.fill="none",this.stroke="#CCC",this.tickStroke="#CCC",this.strokeWidth=1,this.padding=5}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.offset=-(this.yAxisOffset+this.padding),"right"===this.yOrient?(this.labelOffset=65,this.transform="translate("+(this.offset+this.dims.width)+" , 0)"):(this.offset=this.offset,this.transform="translate("+this.offset+" , 0)"),void 0!==this.yAxisTickCount&&(this.tickArguments=[this.yAxisTickCount])},t.prototype.emitTicksWidth=function(t){var e=this,i=t.width;i!==this.labelOffset&&"right"===this.yOrient?(this.labelOffset=i+this.labelOffset,setTimeout((function(){e.dimensionsChanged.emit({width:i})}),0)):i!==this.labelOffset&&(this.labelOffset=i,setTimeout((function(){e.dimensionsChanged.emit({width:i})}),0))},T([e.Input()],t.prototype,"yScale",void 0),T([e.Input()],t.prototype,"dims",void 0),T([e.Input()],t.prototype,"trimTicks",void 0),T([e.Input()],t.prototype,"maxTickLength",void 0),T([e.Input()],t.prototype,"tickFormatting",void 0),T([e.Input()],t.prototype,"ticks",void 0),T([e.Input()],t.prototype,"showGridLines",void 0),T([e.Input()],t.prototype,"showLabel",void 0),T([e.Input()],t.prototype,"labelText",void 0),T([e.Input()],t.prototype,"yAxisTickInterval",void 0),T([e.Input()],t.prototype,"yAxisTickCount",void 0),T([e.Input()],t.prototype,"yOrient",void 0),T([e.Input()],t.prototype,"referenceLines",void 0),T([e.Input()],t.prototype,"showRefLines",void 0),T([e.Input()],t.prototype,"showRefLabels",void 0),T([e.Input()],t.prototype,"yAxisOffset",void 0),T([e.Output()],t.prototype,"dimensionsChanged",void 0),T([e.ViewChild(_)],t.prototype,"ticksComponent",void 0),t=T([e.Component({selector:"g[ngx-charts-y-axis]",template:'\n <svg:g [attr.class]="yAxisClassName" [attr.transform]="transform">\n <svg:g\n ngx-charts-y-axis-ticks\n *ngIf="yScale"\n [trimTicks]="trimTicks"\n [maxTickLength]="maxTickLength"\n [tickFormatting]="tickFormatting"\n [tickArguments]="tickArguments"\n [tickValues]="ticks"\n [tickStroke]="tickStroke"\n [scale]="yScale"\n [orient]="yOrient"\n [showGridLines]="showGridLines"\n [gridLineWidth]="dims.width"\n [referenceLines]="referenceLines"\n [showRefLines]="showRefLines"\n [showRefLabels]="showRefLabels"\n [height]="dims.height"\n (dimensionsChanged)="emitTicksWidth($event)"\n />\n\n <svg:g\n ngx-charts-axis-label\n *ngIf="showLabel"\n [label]="labelText"\n [offset]="labelOffset"\n [orient]="yOrient"\n [height]="dims.height"\n [width]="dims.width"\n ></svg:g>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),U=function(){function t(){}return t=T([e.NgModule({imports:[i.CommonModule],declarations:[H,G,V,q,_],exports:[H,G,V,q,_]})],t)}();(N=t.StyleTypes||(t.StyleTypes={}))[N.popover="popover"]="popover",N[N.tooltip="tooltip"]="tooltip",(j=t.AlignmentTypes||(t.AlignmentTypes={}))[j.left="left"]="left",j[j.center="center"]="center",j[j.right="right"]="right",(Z=t.ShowTypes||(t.ShowTypes={}))[Z.all="all"]="all",Z[Z.focus="focus"]="focus",Z[Z.mouseover="mouseover"]="mouseover";var J=function(){function i(i,n,a){this.tooltipService=i,this.viewContainerRef=n,this.renderer=a,this.tooltipCssClass="",this.tooltipTitle="",this.tooltipAppendToBody=!0,this.tooltipSpacing=10,this.tooltipDisabled=!1,this.tooltipShowCaret=!0,this.tooltipPlacement=I.top,this.tooltipAlignment=t.AlignmentTypes.center,this.tooltipType=t.StyleTypes.popover,this.tooltipCloseOnClickOutside=!0,this.tooltipCloseOnMouseLeave=!0,this.tooltipHideTimeout=300,this.tooltipShowTimeout=100,this.tooltipShowEvent=t.ShowTypes.all,this.tooltipImmediateExit=!1,this.show=new e.EventEmitter,this.hide=new e.EventEmitter}return Object.defineProperty(i.prototype,"listensForFocus",{get:function(){return this.tooltipShowEvent===t.ShowTypes.all||this.tooltipShowEvent===t.ShowTypes.focus},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"listensForHover",{get:function(){return this.tooltipShowEvent===t.ShowTypes.all||this.tooltipShowEvent===t.ShowTypes.mouseover},enumerable:!0,configurable:!0}),i.prototype.ngOnDestroy=function(){this.hideTooltip(!0)},i.prototype.onFocus=function(){this.listensForFocus&&this.showTooltip()},i.prototype.onBlur=function(){this.listensForFocus&&this.hideTooltip(!0)},i.prototype.onMouseEnter=function(){this.listensForHover&&this.showTooltip()},i.prototype.onMouseLeave=function(t){if(this.listensForHover&&this.tooltipCloseOnMouseLeave){if(clearTimeout(this.timeout),this.component)if(this.component.instance.element.nativeElement.contains(t))return;this.hideTooltip(this.tooltipImmediateExit)}},i.prototype.onMouseClick=function(){this.listensForHover&&this.hideTooltip(!0)},i.prototype.showTooltip=function(t){var e=this;if(!this.component&&!this.tooltipDisabled){var i=t?0:this.tooltipShowTimeout;clearTimeout(this.timeout),this.timeout=setTimeout((function(){e.tooltipService.destroyAll();var t=e.createBoundOptions();e.component=e.tooltipService.create(t),setTimeout((function(){e.component&&e.addHideListeners(e.component.instance.element.nativeElement)}),10),e.show.emit(!0)}),i)}},i.prototype.addHideListeners=function(t){var e=this;this.mouseEnterContentEvent=this.renderer.listen(t,"mouseenter",(function(){clearTimeout(e.timeout)})),this.tooltipCloseOnMouseLeave&&(this.mouseLeaveContentEvent=this.renderer.listen(t,"mouseleave",(function(){e.hideTooltip(e.tooltipImmediateExit)}))),this.tooltipCloseOnClickOutside&&(this.documentClickEvent=this.renderer.listen(document,"click",(function(i){t.contains(i.target)||e.hideTooltip()})))},i.prototype.hideTooltip=function(t){var e=this;if(void 0===t&&(t=!1),this.component){var i=function(){e.mouseLeaveContentEvent&&e.mouseLeaveContentEvent(),e.mouseEnterContentEvent&&e.mouseEnterContentEvent(),e.documentClickEvent&&e.documentClickEvent(),e.hide.emit(!0),e.tooltipService.destroy(e.component),e.component=void 0};clearTimeout(this.timeout),t?i():this.timeout=setTimeout(i,this.tooltipHideTimeout)}},i.prototype.createBoundOptions=function(){return{title:this.tooltipTitle,template:this.tooltipTemplate,host:this.viewContainerRef.element,placement:this.tooltipPlacement,alignment:this.tooltipAlignment,type:this.tooltipType,showCaret:this.tooltipShowCaret,cssClass:this.tooltipCssClass,spacing:this.tooltipSpacing,context:this.tooltipContext}},i.ctorParameters=function(){return[{type:X},{type:e.ViewContainerRef},{type:e.Renderer2}]},T([e.Input()],i.prototype,"tooltipCssClass",void 0),T([e.Input()],i.prototype,"tooltipTitle",void 0),T([e.Input()],i.prototype,"tooltipAppendToBody",void 0),T([e.Input()],i.prototype,"tooltipSpacing",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"tooltipShowCaret",void 0),T([e.Input()],i.prototype,"tooltipPlacement",void 0),T([e.Input()],i.prototype,"tooltipAlignment",void 0),T([e.Input()],i.prototype,"tooltipType",void 0),T([e.Input()],i.prototype,"tooltipCloseOnClickOutside",void 0),T([e.Input()],i.prototype,"tooltipCloseOnMouseLeave",void 0),T([e.Input()],i.prototype,"tooltipHideTimeout",void 0),T([e.Input()],i.prototype,"tooltipShowTimeout",void 0),T([e.Input()],i.prototype,"tooltipTemplate",void 0),T([e.Input()],i.prototype,"tooltipShowEvent",void 0),T([e.Input()],i.prototype,"tooltipContext",void 0),T([e.Input()],i.prototype,"tooltipImmediateExit",void 0),T([e.Output()],i.prototype,"show",void 0),T([e.Output()],i.prototype,"hide",void 0),T([e.HostListener("focusin")],i.prototype,"onFocus",null),T([e.HostListener("blur")],i.prototype,"onBlur",null),T([e.HostListener("mouseenter")],i.prototype,"onMouseEnter",null),T([e.HostListener("mouseleave",["$event.target"])],i.prototype,"onMouseLeave",null),T([e.HostListener("click")],i.prototype,"onMouseClick",null),i=T([e.Directive({selector:"[ngx-tooltip]"})],i)}(),Q=function(){function t(){}return t=T([e.NgModule({declarations:[F,J],providers:[L,X],exports:[F,J],imports:[i.CommonModule],entryComponents:[F]})],t)}();function K(t){return t=t instanceof Date?t.toLocaleDateString():t.toLocaleString()}function tt(t){return t.toLocaleString().replace(/[&'`"<>]/g,(function(t){return{"&":"&amp;","'":"&#x27;","`":"&#x60;",'"':"&quot;","<":"&lt;",">":"&gt;"}[t]}))}var et={};function it(){var t=("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4);return et[t="a"+t]?it():(et[t]=!0,t)}var nt=function(){function t(){this.type="standard",this.tooltipDisabled=!1,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.barVisible=!1}return t.prototype.ngOnInit=function(){this.gradientId="grad"+it().toString(),this.gradientFill="url(#"+this.gradientId+")"},t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.circle=this.getActiveCircle()},t.prototype.getActiveCircle=function(){var t=this,e=this.data.series.findIndex((function(e){var i=e.name;return i&&t.visibleValue&&i.toString()===t.visibleValue.toString()&&void 0!==e.value}));if(-1!==e)return this.mapDataPointToCircle(this.data.series[e],e)},t.prototype.mapDataPointToCircle=function(t,e){var i,n=this.data.name,a=t.value,o=t.name,s=K(o);i="time"===this.scaleType?this.xScale(o):"linear"===this.scaleType?this.xScale(Number(o)):this.xScale(o);var r,l=this.yScale("standard"===this.type?a:t.d1),c=this.yScale.range()[0]-l;return r="linear"===this.colors.scaleType?"standard"===this.type?this.colors.getColor(a):this.colors.getColor(t.d1):this.colors.getColor(n),{classNames:["circle-data-"+e],value:a,label:o,data:Object.assign({},t,{series:n,value:a,name:o}),cx:i,cy:l,radius:5,height:c,tooltipLabel:s,color:r,opacity:1,seriesName:n,gradientStops:this.getGradientStops(r),min:t.min,max:t.max}},t.prototype.getTooltipText=function(t){var e=t.tooltipLabel,i=t.value,n=t.seriesName,a=t.min,o=t.max;return'\n <span class="tooltip-label">'+tt(n)+" • "+tt(e)+'</span>\n <span class="tooltip-val">'+i.toLocaleString()+this.getTooltipMinMaxText(a,o)+"</span>\n "},t.prototype.getTooltipMinMaxText=function(t,e){if(void 0!==t||void 0!==e){var i=" (";return void 0!==t?(void 0===e&&(i+="≥"),i+=t.toLocaleString(),void 0!==e&&(i+=" - ")):void 0!==e&&(i+="≤"),void 0!==e&&(i+=e.toLocaleString()),i+=")"}return""},t.prototype.getGradientStops=function(t){return[{offset:0,color:t,opacity:.2},{offset:100,color:t,opacity:1}]},t.prototype.onClick=function(t){this.select.emit(t)},t.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.name===e.name}))},t.prototype.activateCircle=function(){this.barVisible=!0,this.activate.emit({name:this.data.name})},t.prototype.deactivateCircle=function(){this.barVisible=!1,this.circle.opacity=0,this.deactivate.emit({name:this.data.name})},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"type",void 0),T([e.Input()],t.prototype,"xScale",void 0),T([e.Input()],t.prototype,"yScale",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"scaleType",void 0),T([e.Input()],t.prototype,"visibleValue",void 0),T([e.Input()],t.prototype,"activeEntries",void 0),T([e.Input()],t.prototype,"tooltipDisabled",void 0),T([e.Input()],t.prototype,"tooltipTemplate",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),t=T([e.Component({selector:"g[ngx-charts-circle-series]",template:'\n <svg:g *ngIf="circle">\n <defs>\n <svg:g\n ngx-charts-svg-linear-gradient\n orientation="vertical"\n [name]="gradientId"\n [stops]="circle.gradientStops"\n />\n </defs>\n <svg:rect\n *ngIf="barVisible && type === \'standard\'"\n [@animationState]="\'active\'"\n [attr.x]="circle.cx - circle.radius"\n [attr.y]="circle.cy"\n [attr.width]="circle.radius * 2"\n [attr.height]="circle.height"\n [attr.fill]="gradientFill"\n class="tooltip-bar"\n />\n <svg:g\n ngx-charts-circle\n class="circle"\n [cx]="circle.cx"\n [cy]="circle.cy"\n [r]="circle.radius"\n [fill]="circle.color"\n [class.active]="isActive({ name: circle.seriesName })"\n [pointerEvents]="circle.value === 0 ? \'none\' : \'all\'"\n [data]="circle.value"\n [classNames]="circle.classNames"\n (select)="onClick(circle.data)"\n (activate)="activateCircle()"\n (deactivate)="deactivateCircle()"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="\'top\'"\n [tooltipType]="\'tooltip\'"\n [tooltipTitle]="tooltipTemplate ? undefined : getTooltipText(circle)"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="circle.data"\n />\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":enter",[n.style({opacity:0}),n.animate(250,n.style({opacity:1}))])])]})],t)}(),at=function(){function t(){this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter}return t.prototype.onClick=function(){this.select.emit(this.data)},t.prototype.onMouseEnter=function(){this.activate.emit(this.data)},t.prototype.onMouseLeave=function(){this.deactivate.emit(this.data)},t.prototype.ngOnChanges=function(t){this.classNames=Array.isArray(this.classNames)?this.classNames.join(" "):"",this.classNames+="circle"},T([e.Input()],t.prototype,"cx",void 0),T([e.Input()],t.prototype,"cy",void 0),T([e.Input()],t.prototype,"r",void 0),T([e.Input()],t.prototype,"fill",void 0),T([e.Input()],t.prototype,"stroke",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"classNames",void 0),T([e.Input()],t.prototype,"circleOpacity",void 0),T([e.Input()],t.prototype,"pointerEvents",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),T([e.HostListener("click")],t.prototype,"onClick",null),T([e.HostListener("mouseenter")],t.prototype,"onMouseEnter",null),T([e.HostListener("mouseleave")],t.prototype,"onMouseLeave",null),t=T([e.Component({selector:"g[ngx-charts-circle]",template:'\n <svg:circle\n [attr.cx]="cx"\n [attr.cy]="cy"\n [attr.r]="r"\n [attr.fill]="fill"\n [attr.stroke]="stroke"\n [attr.opacity]="circleOpacity"\n [attr.class]="classNames"\n [attr.pointer-events]="pointerEvents"\n />\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),ot=function(){function t(){}return T([e.Input()],t.prototype,"path",void 0),T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"height",void 0),T([e.Input()],t.prototype,"x",void 0),T([e.Input()],t.prototype,"y",void 0),t=T([e.Component({selector:"g[ngx-charts-grid-panel]",template:'\n <svg:rect [attr.height]="height" [attr.width]="width" [attr.x]="x" [attr.y]="y" stroke="none" class="gridpanel" />\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),st=function(){function t(){}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.gridPanels=this.getGridPanels()},t.prototype.getGridPanels=function(){var t=this;return this.data.map((function(e){var i,n,a,o,s,r="odd";if("vertical"===t.orient){var l=t.xScale(e.name);Number.parseInt((l/t.xScale.step()).toString(),10)%2==1&&(r="even"),i=t.xScale.bandwidth()*t.xScale.paddingInner(),n=t.xScale.bandwidth()+i,a=t.dims.height,o=t.xScale(e.name)-i/2,s=0}else if("horizontal"===t.orient){l=t.yScale(e.name);Number.parseInt((l/t.yScale.step()).toString(),10)%2==1&&(r="even"),i=t.yScale.bandwidth()*t.yScale.paddingInner(),n=t.dims.width,a=t.yScale.bandwidth()+i,o=0,s=t.yScale(e.name)-i/2}return{name:e.name,class:r,height:a,width:n,x:o,y:s}}))},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"dims",void 0),T([e.Input()],t.prototype,"xScale",void 0),T([e.Input()],t.prototype,"yScale",void 0),T([e.Input()],t.prototype,"orient",void 0),t=T([e.Component({selector:"g[ngx-charts-grid-panel-series]",template:'\n <svg:g\n ngx-charts-grid-panel\n *ngFor="let gridPanel of gridPanels"\n [height]="gridPanel.height"\n [width]="gridPanel.width"\n [x]="gridPanel.x"\n [y]="gridPanel.y"\n [class.grid-panel]="true"\n [class.odd]="gridPanel.class === \'odd\'"\n [class.even]="gridPanel.class === \'even\'"\n ></svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),rt=function(){function t(){this.orientation="vertical"}return t.prototype.ngOnChanges=function(t){this.x1="0%",this.x2="0%",this.y1="0%",this.y2="0%","horizontal"===this.orientation?this.x2="100%":"vertical"===this.orientation&&(this.y1="100%")},T([e.Input()],t.prototype,"orientation",void 0),T([e.Input()],t.prototype,"name",void 0),T([e.Input()],t.prototype,"stops",void 0),t=T([e.Component({selector:"g[ngx-charts-svg-linear-gradient]",template:'\n <svg:linearGradient [id]="name" [attr.x1]="x1" [attr.y1]="y1" [attr.x2]="x2" [attr.y2]="y2">\n <svg:stop\n *ngFor="let stop of stops"\n [attr.offset]="stop.offset + \'%\'"\n [style.stop-color]="stop.color"\n [style.stop-opacity]="stop.opacity"\n />\n </svg:linearGradient>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),lt=function(){function t(){this.endOpacity=1,this.cx=0,this.cy=0}return Object.defineProperty(t.prototype,"stops",{get:function(){return this.stopsInput||this.stopsDefault},set:function(t){this.stopsInput=t},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(t){this.r="30%",("color"in t||"startOpacity"in t||"endOpacity"in t)&&(this.stopsDefault=[{offset:0,color:this.color,opacity:this.startOpacity},{offset:100,color:this.color,opacity:this.endOpacity}])},T([e.Input()],t.prototype,"color",void 0),T([e.Input()],t.prototype,"name",void 0),T([e.Input()],t.prototype,"startOpacity",void 0),T([e.Input()],t.prototype,"endOpacity",void 0),T([e.Input()],t.prototype,"cx",void 0),T([e.Input()],t.prototype,"cy",void 0),T([e.Input()],t.prototype,"stops",null),t=T([e.Component({selector:"g[ngx-charts-svg-radial-gradient]",template:'\n <svg:radialGradient [id]="name" [attr.cx]="cx" [attr.cy]="cy" [attr.r]="r" gradientUnits="userSpaceOnUse">\n <svg:stop\n *ngFor="let stop of stops"\n [attr.offset]="stop.offset + \'%\'"\n [style.stop-color]="stop.color"\n [style.stop-opacity]="stop.opacity"\n />\n </svg:radialGradient>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),ct=function(){function t(t){this.opacity=1,this.startOpacity=.5,this.endOpacity=1,this.gradient=!1,this.animations=!0,this.select=new e.EventEmitter,this.initialized=!1,this.hasGradient=!1,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(t){this.initialized?this.update():(this.loadAnimation(),this.initialized=!0)},t.prototype.update=function(){this.gradientId="grad"+it().toString(),this.gradientFill="url(#"+this.gradientId+")",this.gradient||this.stops?(this.gradientStops=this.getGradient(),this.hasGradient=!0):this.hasGradient=!1,this.updatePathEl()},t.prototype.loadAnimation=function(){this.areaPath=this.startingPath,setTimeout(this.update.bind(this),100)},t.prototype.updatePathEl=function(){var t=r.select(this.element).select(".area");this.animations?t.transition().duration(750).attr("d",this.path):t.attr("d",this.path)},t.prototype.getGradient=function(){return this.stops?this.stops:[{offset:0,color:this.fill,opacity:this.startOpacity},{offset:100,color:this.fill,opacity:this.endOpacity}]},t.ctorParameters=function(){return[{type:e.ElementRef}]},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"path",void 0),T([e.Input()],t.prototype,"startingPath",void 0),T([e.Input()],t.prototype,"fill",void 0),T([e.Input()],t.prototype,"opacity",void 0),T([e.Input()],t.prototype,"startOpacity",void 0),T([e.Input()],t.prototype,"endOpacity",void 0),T([e.Input()],t.prototype,"activeLabel",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"stops",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),t=T([e.Component({selector:"g[ngx-charts-area]",template:'\n <svg:defs *ngIf="gradient">\n <svg:g ngx-charts-svg-linear-gradient orientation="vertical" [name]="gradientId" [stops]="gradientStops" />\n </svg:defs>\n <svg:path class="area" [attr.d]="areaPath" [attr.fill]="gradient ? gradientFill : fill" [style.opacity]="opacity" />\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}();function ht(t,e,i,n){return i*(1-Math.pow(2,-10*t/n))*1024/1023+e}function pt(t,e,i,n,a){var o,s=Number(t),r=Number(e),l=s>r,c=Math.max(0,i),h=Math.pow(10,c),p=1e3*Number(n);return requestAnimationFrame((function(t){return o=t,function t(e){var i,n=e-o;i=l?s-ht(n,0,s-r,p):ht(n,s,r-s,p),i=l?i<r?r:i:i>r?r:i,i=Math.round(i*h)/h;var c=n<p;if(a({value:i,progress:n,timestamp:e,finished:!c}),c)return requestAnimationFrame((function(e){return t(e)}))}(t)}))}function dt(t){var e=Number(t);return e%1!=0&&Math.abs(e)<=10?2:0}var gt,ut=function(){function t(t,i){this.cd=t,this.countDuration=1,this.countPrefix="",this.countSuffix="",this.countChange=new e.EventEmitter,this.countFinish=new e.EventEmitter,this.value="",this._countDecimals=0,this._countTo=0,this._countFrom=0,this.nativeElement=i.nativeElement}return Object.defineProperty(t.prototype,"countDecimals",{get:function(){return this._countDecimals?this._countDecimals:dt(this.countTo)},set:function(t){this._countDecimals=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"countTo",{get:function(){return this._countTo},set:function(t){this._countTo=parseFloat(t),this.start()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"countFrom",{get:function(){return this._countFrom},set:function(t){this._countFrom=parseFloat(t),this.start()},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){cancelAnimationFrame(this.animationReq)},t.prototype.start=function(){var t=this;cancelAnimationFrame(this.animationReq);var e=this.valueFormatting||function(e){return""+t.countPrefix+e.toLocaleString()+t.countSuffix};this.animationReq=pt(this.countFrom,this.countTo,this.countDecimals,this.countDuration,(function(i){var n=i.value,a=i.progress,o=i.finished;t.value=e(n),t.cd.markForCheck(),o||t.countChange.emit({value:t.value,progress:a}),o&&t.countFinish.emit({value:t.value,progress:a})}))},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef}]},T([e.Input()],t.prototype,"countDuration",void 0),T([e.Input()],t.prototype,"countPrefix",void 0),T([e.Input()],t.prototype,"countSuffix",void 0),T([e.Input()],t.prototype,"valueFormatting",void 0),T([e.Input()],t.prototype,"countDecimals",null),T([e.Input()],t.prototype,"countTo",null),T([e.Input()],t.prototype,"countFrom",null),T([e.Output()],t.prototype,"countChange",void 0),T([e.Output()],t.prototype,"countFinish",void 0),t=T([e.Component({selector:"[ngx-charts-count-up]",template:"\n {{ value }}\n "})],t)}();"undefined"!=typeof window?gt=window:"undefined"!=typeof global&&(gt=global);var vt=gt.MouseEvent;function mt(t,e,i){if(void 0===e&&(e=!1),void 0===i&&(i=!0),"function"==typeof vt)return new vt(t,{bubbles:e,cancelable:i});var n=document.createEvent("MouseEvent");return n.initEvent(t,e,i),n}var yt=function(){function t(){this.anchorOpacity=0,this.anchorPos=-1,this.anchorValues=[],this.showPercentage=!1,this.tooltipDisabled=!1,this.hover=new e.EventEmitter}return t.prototype.getValues=function(t){var e,i,n=[];try{for(var a=k(this.results),o=a.next();!o.done;o=a.next()){var s=o.value,r=s.series.find((function(e){return e.name.toString()===t.toString()})),l=s.name;if(l instanceof Date&&(l=l.toLocaleDateString()),r){var c=r.name,h=r.value;this.showPercentage&&(h=(r.d1-r.d0).toFixed(2)+"%");var p=void 0;if("linear"===this.colors.scaleType){var d=h;r.d1&&(d=r.d1),p=this.colors.getColor(d)}else p=this.colors.getColor(s.name);var g=Object.assign({},r,{value:h,name:c,series:l,min:r.min,max:r.max,color:p});n.push(g)}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(e)throw e.error}}return n},t.prototype.mouseMove=function(t){var e=t.pageX-t.target.getBoundingClientRect().left,i=this.findClosestPointIndex(e),n=this.xSet[i];if(this.anchorPos=this.xScale(n),this.anchorPos=Math.max(0,this.anchorPos),this.anchorPos=Math.min(this.dims.width,this.anchorPos),this.anchorValues=this.getValues(n),this.anchorPos!==this.lastAnchorPos){var a=mt("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(a),this.anchorOpacity=.7,this.hover.emit({value:n}),this.showTooltip(),this.lastAnchorPos=this.anchorPos}},t.prototype.findClosestPointIndex=function(t){for(var e=0,i=this.xSet.length-1,n=Number.MAX_VALUE,a=0;e<=i;){var o=(e+i)/2|0,s=this.xScale(this.xSet[o]),r=Math.abs(s-t);if(r<n&&(n=r,a=o),s<t)e=o+1;else{if(!(s>t)){n=0,a=o;break}i=o-1}}return a},t.prototype.showTooltip=function(){var t=mt("mouseenter");this.tooltipAnchor.nativeElement.dispatchEvent(t)},t.prototype.hideTooltip=function(){var t=mt("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(t),this.anchorOpacity=0,this.lastAnchorPos=-1},t.prototype.getToolTipText=function(t){var e="";return void 0!==t.series?e+=t.series:e+="???",e+=": ",void 0!==t.value&&(e+=t.value.toLocaleString()),void 0===t.min&&void 0===t.max||(e+=" (",void 0!==t.min?(void 0===t.max&&(e+="≥"),e+=t.min.toLocaleString(),void 0!==t.max&&(e+=" - ")):void 0!==t.max&&(e+="≤"),void 0!==t.max&&(e+=t.max.toLocaleString()),e+=")"),e},T([e.Input()],t.prototype,"dims",void 0),T([e.Input()],t.prototype,"xSet",void 0),T([e.Input()],t.prototype,"xScale",void 0),T([e.Input()],t.prototype,"yScale",void 0),T([e.Input()],t.prototype,"results",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"showPercentage",void 0),T([e.Input()],t.prototype,"tooltipDisabled",void 0),T([e.Input()],t.prototype,"tooltipTemplate",void 0),T([e.Output()],t.prototype,"hover",void 0),T([e.ViewChild("tooltipAnchor",{static:!1})],t.prototype,"tooltipAnchor",void 0),t=T([e.Component({selector:"g[ngx-charts-tooltip-area]",template:'\n <svg:g>\n <svg:rect\n class="tooltip-area"\n [attr.x]="0"\n y="0"\n [attr.width]="dims.width"\n [attr.height]="dims.height"\n style="opacity: 0; cursor: \'auto\';"\n (mousemove)="mouseMove($event)"\n (mouseleave)="hideTooltip()"\n />\n <ng-template #defaultTooltipTemplate let-model="model">\n <xhtml:div class="area-tooltip-container">\n <xhtml:div *ngFor="let tooltipItem of model" class="tooltip-item">\n <xhtml:span class="tooltip-item-color" [style.background-color]="tooltipItem.color"></xhtml:span>\n {{ getToolTipText(tooltipItem) }}\n </xhtml:div>\n </xhtml:div>\n </ng-template>\n <svg:rect\n #tooltipAnchor\n [@animationState]="anchorOpacity !== 0 ? \'active\' : \'inactive\'"\n class="tooltip-anchor"\n [attr.x]="anchorPos"\n y="0"\n [attr.width]="1"\n [attr.height]="dims.height"\n [style.opacity]="anchorOpacity"\n [style.pointer-events]="\'none\'"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="\'right\'"\n [tooltipType]="\'tooltip\'"\n [tooltipSpacing]="15"\n [tooltipTemplate]="tooltipTemplate ? tooltipTemplate : defaultTooltipTemplate"\n [tooltipContext]="anchorValues"\n [tooltipImmediateExit]="true"\n />\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition("inactive => active",[n.style({opacity:0}),n.animate(250,n.style({opacity:.7}))]),n.transition("active => inactive",[n.style({opacity:.7}),n.animate(250,n.style({opacity:0}))])])]})],t)}(),xt=function(){function t(t,i){this.cd=i,this.height=50,this.select=new e.EventEmitter,this.onDomainChange=new e.EventEmitter,this.initialized=!1,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(t){this.update(),this.initialized||(this.addBrush(),this.initialized=!0)},t.prototype.update=function(){this.dims=this.getDims(),this.height=this.dims.height;var t=this.view[1]-this.height;this.xDomain=this.getXDomain(),this.xScale=this.getXScale(),this.brush&&this.updateBrush(),this.transform="translate(0 , "+t+")",this.filterId="filter"+it().toString(),this.filter="url(#"+this.filterId+")",this.cd.markForCheck()},t.prototype.getXDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.name)||a.push(h.name)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}var p=[];if("time"===this.scaleType)p=[Math.min.apply(Math,A(a)),Math.max.apply(Math,A(a))];else if("linear"===this.scaleType){a=a.map((function(t){return Number(t)})),p=[Math.min.apply(Math,A(a)),Math.max.apply(Math,A(a))]}else p=a;return p},t.prototype.getXScale=function(){var t;return"time"===this.scaleType?t=c.scaleTime().range([0,this.dims.width]).domain(this.xDomain):"linear"===this.scaleType?t=c.scaleLinear().range([0,this.dims.width]).domain(this.xDomain):"ordinal"===this.scaleType&&(t=c.scalePoint().range([0,this.dims.width]).padding(.1).domain(this.xDomain)),t},t.prototype.addBrush=function(){var t=this;if(!this.brush){var e=this.height,i=this.view[0];this.brush=l.brushX().extent([[0,0],[i,e]]).on("brush end",(function(){var e=(r.event.selection||t.xScale.range()).map(t.xScale.invert);t.onDomainChange.emit(e),t.cd.markForCheck()})),r.select(this.element).select(".brush").call(this.brush)}},t.prototype.updateBrush=function(){if(this.brush){var t=this.height,e=this.view[0];this.brush.extent([[0,0],[e,t]]),r.select(this.element).select(".brush").call(this.brush),r.select(this.element).select(".selection").attr("fill",void 0).attr("stroke",void 0).attr("fill-opacity",void 0),this.cd.markForCheck()}},t.prototype.getDims=function(){return{width:this.view[0],height:this.height}},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef}]},T([e.Input()],t.prototype,"view",void 0),T([e.Input()],t.prototype,"state",void 0),T([e.Input()],t.prototype,"results",void 0),T([e.Input()],t.prototype,"scheme",void 0),T([e.Input()],t.prototype,"customColors",void 0),T([e.Input()],t.prototype,"legend",void 0),T([e.Input()],t.prototype,"miniChart",void 0),T([e.Input()],t.prototype,"autoScale",void 0),T([e.Input()],t.prototype,"scaleType",void 0),T([e.Input()],t.prototype,"height",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"onDomainChange",void 0),t=T([e.Component({selector:"g[ngx-charts-timeline]",template:'\n <svg:g class="timeline" [attr.transform]="transform">\n <svg:filter [attr.id]="filterId">\n <svg:feColorMatrix\n in="SourceGraphic"\n type="matrix"\n values="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"\n />\n </svg:filter>\n <svg:g class="embedded-chart">\n <ng-content></ng-content>\n </svg:g>\n <svg:rect x="0" [attr.width]="view[0]" y="0" [attr.height]="height" class="brush-background" />\n <svg:g class="brush"></svg:g>\n </svg:g>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".timeline .brush-background{fill:rgba(0,0,0,.05)}.timeline .brush .selection{fill:rgba(0,0,0,.1);stroke-width:1px;stroke:#888}.timeline .brush .handle{fill-opacity:0}.timeline .embedded-chart{opacity:.6}"]})],t)}(),ft=function(){function t(t){this.cd=t,this.horizontal=!1,this.labelClick=new e.EventEmitter,this.labelActivate=new e.EventEmitter,this.labelDeactivate=new e.EventEmitter,this.legendEntries=[]}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.cd.markForCheck(),this.legendEntries=this.getLegendEntries()},t.prototype.getLegendEntries=function(){var t,e,i=[],n=function(t){var e=K(t);-1===i.findIndex((function(t){return t.label===e}))&&i.push({label:t,formattedLabel:e,color:a.colors.getColor(t)})},a=this;try{for(var o=k(this.data),s=o.next();!s.done;s=o.next()){n(s.value)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return i},t.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.label===e.name}))},t.prototype.activate=function(t){this.labelActivate.emit(t)},t.prototype.deactivate=function(t){this.labelDeactivate.emit(t)},t.prototype.trackBy=function(t,e){return e.label},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"title",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"height",void 0),T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"activeEntries",void 0),T([e.Input()],t.prototype,"horizontal",void 0),T([e.Output()],t.prototype,"labelClick",void 0),T([e.Output()],t.prototype,"labelActivate",void 0),T([e.Output()],t.prototype,"labelDeactivate",void 0),t=T([e.Component({selector:"ngx-charts-legend",template:'\n <div [style.width.px]="width">\n <header class="legend-title" *ngIf="title?.length > 0">\n <span class="legend-title-text">{{ title }}</span>\n </header>\n <div class="legend-wrap">\n <ul class="legend-labels" [class.horizontal-legend]="horizontal" [style.max-height.px]="height - 45">\n <li *ngFor="let entry of legendEntries; trackBy: trackBy" class="legend-label">\n <ngx-charts-legend-entry\n [label]="entry.label"\n [formattedLabel]="entry.formattedLabel"\n [color]="entry.color"\n [isActive]="isActive(entry)"\n (select)="labelClick.emit($event)"\n (activate)="activate($event)"\n (deactivate)="deactivate($event)"\n >\n </ngx-charts-legend-entry>\n </li>\n </ul>\n </div>\n </div>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .legend-title{white-space:nowrap;overflow:hidden;margin-left:10px;margin-bottom:5px;font-size:14px;font-weight:700}.chart-legend li,.chart-legend ul{padding:0;margin:0;list-style:none}.chart-legend .horizontal-legend li{display:inline-block}.chart-legend .legend-wrap{width:calc(100% - 10px)}.chart-legend .legend-labels{line-height:85%;list-style:none;text-align:left;float:left;width:100%;border-radius:3px;overflow-y:auto;overflow-x:hidden;white-space:nowrap;background:rgba(0,0,0,.05)}.chart-legend .legend-label{cursor:pointer;font-size:90%;margin:8px;color:#afb7c8}.chart-legend .legend-label:hover{color:#000;-webkit-transition:.2s;transition:.2s}.chart-legend .legend-label .active .legend-label-text{color:#000}.chart-legend .legend-label-color{display:inline-block;height:15px;width:15px;margin-right:5px;color:#5b646b;border-radius:3px}.chart-legend .legend-label-text{display:inline-block;vertical-align:top;line-height:15px;font-size:12px;width:calc(100% - 20px);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.chart-legend .legend-title-text{vertical-align:bottom;display:inline-block;line-height:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}"]})],t)}(),bt=function(){function t(){this.isActive=!1,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.toggle=new e.EventEmitter}return Object.defineProperty(t.prototype,"trimmedLabel",{get:function(){return this.formattedLabel||"(empty)"},enumerable:!0,configurable:!0}),t.prototype.onMouseEnter=function(){this.activate.emit({name:this.label})},t.prototype.onMouseLeave=function(){this.deactivate.emit({name:this.label})},T([e.Input()],t.prototype,"color",void 0),T([e.Input()],t.prototype,"label",void 0),T([e.Input()],t.prototype,"formattedLabel",void 0),T([e.Input()],t.prototype,"isActive",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),T([e.Output()],t.prototype,"toggle",void 0),T([e.HostListener("mouseenter")],t.prototype,"onMouseEnter",null),T([e.HostListener("mouseleave")],t.prototype,"onMouseLeave",null),t=T([e.Component({selector:"ngx-charts-legend-entry",template:'\n <span [title]="formattedLabel" tabindex="-1" [class.active]="isActive" (click)="select.emit(formattedLabel)">\n <span class="legend-label-color" [style.background-color]="color" (click)="toggle.emit(formattedLabel)"> </span>\n <span class="legend-label-text">\n {{ trimmedLabel }}\n </span>\n </span>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Tt=function(){function t(t){this.sanitizer=t,this.horizontal=!1}return t.prototype.ngOnChanges=function(t){var e=this.gradientString(this.colors.range(),this.colors.domain()),i=this.horizontal?"right":"bottom";this.gradient=this.sanitizer.bypassSecurityTrustStyle("linear-gradient(to "+i+", "+e+")")},t.prototype.gradientString=function(t,e){e.push(1);var i=[];return t.reverse().forEach((function(t,n){i.push(t+" "+Math.round(100*e[n])+"%")})),i.join(", ")},t.ctorParameters=function(){return[{type:h.DomSanitizer}]},T([e.Input()],t.prototype,"valueRange",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"height",void 0),T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"horizontal",void 0),t=T([e.Component({selector:"ngx-charts-scale-legend",template:'\n <div\n class="scale-legend"\n [class.horizontal-legend]="horizontal"\n [style.height.px]="horizontal ? undefined : height"\n [style.width.px]="width"\n >\n <div class="scale-legend-label">\n <span>{{ valueRange[1].toLocaleString() }}</span>\n </div>\n <div class="scale-legend-wrap" [style.background]="gradient"></div>\n <div class="scale-legend-label">\n <span>{{ valueRange[0].toLocaleString() }}</span>\n </div>\n </div>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .scale-legend{text-align:center;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.chart-legend .scale-legend-wrap{display:inline-block;-webkit-box-flex:1;flex:1;width:30px;border-radius:5px;margin:0 auto}.chart-legend .scale-legend-label{font-size:12px}.chart-legend .horizontal-legend.scale-legend{-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.chart-legend .horizontal-legend .scale-legend-wrap{width:auto;height:30px;margin:0 16px}"]})],t)}(),kt=function(){function t(){this.label="Total",this.animations=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.legendItems=[],this.labelFormatting=function(t){return t},this.percentageFormatting=function(t){return t},this.defaultValueFormatting=function(t){return t.toLocaleString()}}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.getTotal=function(){return this.data.map((function(t){return t.value})).reduce((function(t,e){return t+e}),0)},t.prototype.update=function(){this.total=this.getTotal(),this.roundedTotal=this.total,this.legendItems=this.getLegendItems()},t.prototype.getLegendItems=function(){var t=this;return this.data.map((function(e){var i=K(e.name),n=e.value,a=t.colors.getColor(i),o=t.total>0?n/t.total*100:0,s="function"==typeof t.labelFormatting?t.labelFormatting(i):i;return{_value:n,data:e,value:n,color:a,label:s,displayLabel:W(s,20),origialLabel:e.name,percentage:t.percentageFormatting?t.percentageFormatting(o):o.toLocaleString()}}))},t.prototype.trackBy=function(t){return t.formattedLabel},T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"label",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),T([e.Input()],t.prototype,"valueFormatting",void 0),T([e.Input()],t.prototype,"labelFormatting",void 0),T([e.Input()],t.prototype,"percentageFormatting",void 0),t=T([e.Component({selector:"ngx-charts-advanced-legend",template:'\n <div class="advanced-pie-legend" [style.width.px]="width">\n <div\n *ngIf="animations"\n class="total-value"\n ngx-charts-count-up\n [countTo]="roundedTotal"\n [valueFormatting]="valueFormatting"\n ></div>\n <div class="total-value" *ngIf="!animations">\n {{ valueFormatting ? valueFormatting(roundedTotal) : defaultValueFormatting(roundedTotal) }}\n </div>\n <div class="total-label">\n {{ label }}\n </div>\n <div class="legend-items-container">\n <div class="legend-items">\n <div\n *ngFor="let legendItem of legendItems; trackBy: trackBy"\n tabindex="-1"\n class="legend-item"\n (mouseenter)="activate.emit(legendItem.data)"\n (mouseleave)="deactivate.emit(legendItem.data)"\n (click)="select.emit(legendItem.data)"\n >\n <div class="item-color" [style.border-left-color]="legendItem.color"></div>\n <div\n *ngIf="animations"\n class="item-value"\n ngx-charts-count-up\n [countTo]="legendItem._value"\n [valueFormatting]="valueFormatting"\n ></div>\n <div *ngIf="!animations" class="item-value">\n {{ valueFormatting ? valueFormatting(legendItem.value) : defaultValueFormatting(legendItem.value) }}\n </div>\n <div class="item-label">{{ legendItem.displayLabel }}</div>\n <div\n *ngIf="animations"\n class="item-percent"\n ngx-charts-count-up\n [countTo]="legendItem.percentage"\n [countSuffix]="\'%\'"\n ></div>\n <div *ngIf="!animations" class="item-percent">{{ legendItem.percentage.toLocaleString() }}%</div>\n </div>\n </div>\n </div>\n </div>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".advanced-pie-legend{float:left;position:relative;top:50%;-webkit-transform:translate(0,-50%);transform:translate(0,-50%)}.advanced-pie-legend .total-value{font-size:36px}.advanced-pie-legend .total-label{font-size:24px;margin-bottom:19px}.advanced-pie-legend .legend-items-container{width:100%}.advanced-pie-legend .legend-items-container .legend-items{white-space:nowrap;overflow:auto}.advanced-pie-legend .legend-items-container .legend-items .legend-item{margin-right:20px;display:inline-block;cursor:pointer}.advanced-pie-legend .legend-items-container .legend-items .legend-item:focus{outline:0}.advanced-pie-legend .legend-items-container .legend-items .legend-item:hover{color:#000;-webkit-transition:.2s;transition:.2s}.advanced-pie-legend .legend-items-container .legend-items .legend-item .item-value{font-size:24px;margin-top:-6px;margin-left:11px}.advanced-pie-legend .legend-items-container .legend-items .legend-item .item-label{font-size:14px;opacity:.7;margin-left:11px;margin-top:-6px}.advanced-pie-legend .legend-items-container .legend-items .legend-item .item-percent{font-size:24px;opacity:.7;margin-left:11px}.advanced-pie-legend .legend-items-container .legend-items .legend-item .item-color{border-left:4px solid;width:4px;height:42px;float:left;margin-right:7px}"]})],t)}(),wt=[ct,z,ut,yt,Y,ft,bt,Tt,at,nt,ot,st,rt,lt,xt,kt],At=function(){function t(){}return t=T([e.NgModule({imports:[i.CommonModule,U,Q],declarations:A(wt,[R]),exports:A([i.CommonModule,U,Q],wt,[R])})],t)}();function It(t){var e,i=t.width,n=t.height,a=t.margins,o=t.showXAxis,s=void 0!==o&&o,r=t.showYAxis,l=void 0!==r&&r,c=t.xAxisHeight,h=void 0===c?0:c,p=t.yAxisWidth,d=void 0===p?0:p,g=t.showXLabel,u=void 0!==g&&g,v=t.showYLabel,m=void 0!==v&&v,y=t.showLegend,x=void 0!==y&&y,f=t.legendType,b=void 0===f?"ordinal":f,T=t.legendPosition,k=void 0===T?"right":T,w=t.columns,A=void 0===w?12:w,I=a[3],L=i,S=n-a[0]-a[2];(x&&"right"===k&&(A-="ordinal"===b?2:1),L=(L=L*A/12)-a[1]-a[3],s)&&(S-=5,S-=h,u&&(S-=e=30));l&&(L-=5,L-=d,I+=d,I+=10,m&&(L-=e=30,I+=e));return L=Math.max(0,L),S=Math.max(0,S),{width:Math.floor(L),height:Math.floor(S),xOffset:Math.floor(I)}}var Lt=[{name:"vivid",selectable:!0,group:"Ordinal",domain:["#647c8a","#3f51b5","#2196f3","#00b862","#afdf0a","#a7b61a","#f3e562","#ff9800","#ff5722","#ff4514"]},{name:"natural",selectable:!0,group:"Ordinal",domain:["#bf9d76","#e99450","#d89f59","#f2dfa7","#a5d7c6","#7794b1","#afafaf","#707160","#ba9383","#d9d5c3"]},{name:"cool",selectable:!0,group:"Ordinal",domain:["#a8385d","#7aa3e5","#a27ea8","#aae3f5","#adcded","#a95963","#8796c0","#7ed3ed","#50abcc","#ad6886"]},{name:"fire",selectable:!0,group:"Ordinal",domain:["#ff3d00","#bf360c","#ff8f00","#ff6f00","#ff5722","#e65100","#ffca28","#ffab00"]},{name:"solar",selectable:!0,group:"Continuous",domain:["#fff8e1","#ffecb3","#ffe082","#ffd54f","#ffca28","#ffc107","#ffb300","#ffa000","#ff8f00","#ff6f00"]},{name:"air",selectable:!0,group:"Continuous",domain:["#e1f5fe","#b3e5fc","#81d4fa","#4fc3f7","#29b6f6","#03a9f4","#039be5","#0288d1","#0277bd","#01579b"]},{name:"aqua",selectable:!0,group:"Continuous",domain:["#e0f7fa","#b2ebf2","#80deea","#4dd0e1","#26c6da","#00bcd4","#00acc1","#0097a7","#00838f","#006064"]},{name:"flame",selectable:!1,group:"Ordinal",domain:["#A10A28","#D3342D","#EF6D49","#FAAD67","#FDDE90","#DBED91","#A9D770","#6CBA67","#2C9653","#146738"]},{name:"ocean",selectable:!1,group:"Ordinal",domain:["#1D68FB","#33C0FC","#4AFFFE","#AFFFFF","#FFFC63","#FDBD2D","#FC8A25","#FA4F1E","#FA141B","#BA38D1"]},{name:"forest",selectable:!1,group:"Ordinal",domain:["#55C22D","#C1F33D","#3CC099","#AFFFFF","#8CFC9D","#76CFFA","#BA60FB","#EE6490","#C42A1C","#FC9F32"]},{name:"horizon",selectable:!1,group:"Ordinal",domain:["#2597FB","#65EBFD","#99FDD0","#FCEE4B","#FEFCFA","#FDD6E3","#FCB1A8","#EF6F7B","#CB96E8","#EFDEE0"]},{name:"neons",selectable:!1,group:"Ordinal",domain:["#FF3333","#FF33FF","#CC33FF","#0000FF","#33CCFF","#33FFFF","#33FF66","#CCFF33","#FFCC00","#FF6600"]},{name:"picnic",selectable:!1,group:"Ordinal",domain:["#FAC51D","#66BD6D","#FAA026","#29BB9C","#E96B56","#55ACD2","#B7332F","#2C83C9","#9166B8","#92E7E8"]},{name:"night",selectable:!1,group:"Ordinal",domain:["#2B1B5A","#501356","#183356","#28203F","#391B3C","#1E2B3C","#120634","#2D0432","#051932","#453080","#75267D","#2C507D","#4B3880","#752F7D","#35547D"]},{name:"nightLights",selectable:!1,group:"Ordinal",domain:["#4e31a5","#9c25a7","#3065ab","#57468b","#904497","#46648b","#32118d","#a00fb3","#1052a2","#6e51bd","#b63cc3","#6c97cb","#8671c1","#b455be","#7496c3"]}],St=function(){function t(t,e,i,n){"string"==typeof t&&(t=Lt.find((function(e){return e.name===t}))),this.colorDomain=t.domain,this.scaleType=e,this.domain=i,this.customColors=n,this.scale=this.generateColorScheme(t,e,this.domain)}return t.prototype.generateColorScheme=function(t,e,i){var n;if("string"==typeof t&&(t=Lt.find((function(e){return e.name===t}))),"quantile"===e)n=c.scaleQuantile().range(t.domain).domain(i);else if("ordinal"===e)n=c.scaleOrdinal().range(t.domain).domain(i);else if("linear"===e){var a=A(t.domain);1===a.length&&(a.push(a[0]),this.colorDomain=a);var o=d.range(0,1,1/a.length);n=c.scaleLinear().domain(o).range(a)}return n},t.prototype.getColor=function(t){if(null==t)throw new Error("Value can not be null");if("linear"===this.scaleType){var e=c.scaleLinear().domain(this.domain).range([0,1]);return this.scale(e(t))}if("function"==typeof this.customColors)return this.customColors(t);var i=t.toString(),n=void 0;return this.customColors&&this.customColors.length>0&&(n=this.customColors.find((function(t){return t.name.toLowerCase()===i.toLowerCase()}))),n?n.value:this.scale(t)},t.prototype.getLinearGradientStops=function(t,e){var i,n;void 0===e&&(e=this.domain[0]);var a=c.scaleLinear().domain(this.domain).range([0,1]),o=c.scaleBand().domain(this.colorDomain).range([0,1]),s=this.getColor(t),r=a(e),l=this.getColor(e),h=a(t),p=1,d=r,g=[];for(g.push({color:l,offset:r,originalOffset:r,opacity:1});d<h&&p<this.colorDomain.length;){var u=this.colorDomain[p],v=o(u);if(v<=r)p++;else{if(v.toFixed(4)>=(h-o.bandwidth()).toFixed(4))break;g.push({color:u,offset:v,opacity:1}),d=v,p++}}if(g[g.length-1].offset<100&&g.push({color:s,offset:h,opacity:1}),h===r)g[0].offset=0,g[1].offset=100;else if(100!==g[g.length-1].offset)try{for(var m=k(g),y=m.next();!y.done;y=m.next()){var x=y.value;x.offset=(x.offset-r)/(h-r)*100}}catch(t){i={error:t}}finally{try{y&&!y.done&&(n=m.return)&&n.call(m)}finally{if(i)throw i.error}}return g},t}();function Dt(t){var e,i,n,a,o=new Set;try{for(var s=k(t),r=s.next();!r.done;r=s.next()){var l=r.value;try{for(var c=(n=void 0,k(l.series)),h=c.next();!h.done;h=c.next()){var p=h.value;o.add(p.name)}}catch(t){n={error:t}}finally{try{h&&!h.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{r&&!r.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}return Array.from(o)}function Ct(t,e){if((void 0===e&&(e=!0),e)&&t.every((function(t){return t instanceof Date})))return"time";return t.every((function(t){return"number"==typeof t}))?"linear":"ordinal"}var Et=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legendTitle="Legend",i.legendPosition="right",i.baseValue="auto",i.showGridLines=!0,i.curve=p.curveLinear,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.roundDomains=!1,i.tooltipDisabled=!1,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.timelineHeight=50,i.timelinePadding=10,i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.dims=It({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.timeline&&(this.dims.height-=this.timelineHeight+this.margin[2]+this.timelinePadding),this.xDomain=this.getXDomain(),this.filteredDomain&&(this.xDomain=this.filteredDomain),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,this.dims.width),this.yScale=this.getYScale(this.yDomain,this.dims.height),this.updateTimeline(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+", "+this.margin[0]+")",this.clipPathId="clip"+it().toString(),this.clipPath="url(#"+this.clipPathId+")"},i.prototype.updateTimeline=function(){this.timeline&&(this.timelineWidth=this.dims.width,this.timelineXDomain=this.getXDomain(),this.timelineXScale=this.getXScale(this.timelineXDomain,this.timelineWidth),this.timelineYScale=this.getYScale(this.yDomain,this.timelineHeight),this.timelineTransform="translate("+this.dims.xOffset+", "+-this.margin[2]+")")},i.prototype.getXDomain=function(){var t=Dt(this.results);this.scaleType=Ct(t);var e,i,n=[];return"linear"===this.scaleType&&(t=t.map((function(t){return Number(t)}))),"time"!==this.scaleType&&"linear"!==this.scaleType||(e=this.xScaleMin?this.xScaleMin:Math.min.apply(Math,A(t)),i=this.xScaleMax?this.xScaleMax:Math.max.apply(Math,A(t))),"time"===this.scaleType?(n=[new Date(e),new Date(i)],this.xSet=A(t).sort((function(t,e){var i=t.getTime(),n=e.getTime();return i>n?1:n>i?-1:0}))):"linear"===this.scaleType?(n=[e,i],this.xSet=A(t).sort((function(t,e){return t-e}))):(n=t,this.xSet=t),n},i.prototype.getYDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.value)||a.push(h.value)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}var p=A(a);return this.autoScale||p.push(0),"auto"!==this.baseValue&&p.push(this.baseValue),[this.yScaleMin?this.yScaleMin:Math.min.apply(Math,A(p)),this.yScaleMax?this.yScaleMax:Math.max.apply(Math,A(p))]},i.prototype.getSeriesDomain=function(){return this.results.map((function(t){return t.name}))},i.prototype.getXScale=function(t,e){var i;return"time"===this.scaleType?i=c.scaleTime():"linear"===this.scaleType?i=c.scaleLinear():"ordinal"===this.scaleType&&(i=c.scalePoint().padding(.1)),i.range([0,e]).domain(t),this.roundDomains?i.nice():i},i.prototype.getYScale=function(t,e){var i=c.scaleLinear().range([e,0]).domain(t);return this.roundDomains?i.nice():i},i.prototype.getScaleType=function(t){var e,i,n=!0,a=!0;try{for(var o=k(t),s=o.next();!s.done;s=o.next()){var r=s.value;this.isDate(r)||(n=!1),"number"!=typeof r&&(a=!1)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(e)throw e.error}}return n?"time":a?"linear":"ordinal"},i.prototype.isDate=function(t){return t instanceof Date},i.prototype.updateDomain=function(t){this.filteredDomain=t,this.xDomain=this.filteredDomain,this.xScale=this.getXScale(this.xDomain,this.dims.width)},i.prototype.updateHoveredVertical=function(t){this.hoveredVertical=t.value,this.deactivateAll()},i.prototype.hideCircles=function(){this.hoveredVertical=null,this.deactivateAll()},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.seriesDomain:this.yDomain,this.colors=new St(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.seriesDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.yDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t){this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t){var e=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}));this.activeEntries.splice(e,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},i.prototype.deactivateAll=function(){var t,e;this.activeEntries=A(this.activeEntries);try{for(var i=k(this.activeEntries),n=i.next();!n.done;n=i.next()){var a=n.value;this.deactivate.emit({value:a,entries:[]})}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.activeEntries=[]},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"state",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"baseValue",void 0),T([e.Input()],i.prototype,"autoScale",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"timeline",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"curve",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"xScaleMin",void 0),T([e.Input()],i.prototype,"xScaleMax",void 0),T([e.Input()],i.prototype,"yScaleMin",void 0),T([e.Input()],i.prototype,"yScaleMax",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),T([e.ContentChild("seriesTooltipTemplate")],i.prototype,"seriesTooltipTemplate",void 0),T([e.HostListener("mouseleave")],i.prototype,"hideCircles",null),i=T([e.Component({selector:"ngx-charts-area-chart",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelClick)="onClick($event)"\n (legendLabelActivate)="onActivate($event)"\n (legendLabelDeactivate)="onDeactivate($event)"\n >\n <svg:defs>\n <svg:clipPath [attr.id]="clipPathId">\n <svg:rect\n [attr.width]="dims.width + 10"\n [attr.height]="dims.height + 10"\n [attr.transform]="\'translate(-5, -5)\'"\n />\n </svg:clipPath>\n </svg:defs>\n <svg:g [attr.transform]="transform" class="area-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g [attr.clip-path]="clipPath">\n <svg:g *ngFor="let series of results; trackBy: trackBy">\n <svg:g\n ngx-charts-area-series\n [xScale]="xScale"\n [yScale]="yScale"\n [baseValue]="baseValue"\n [colors]="colors"\n [data]="series"\n [activeEntries]="activeEntries"\n [scaleType]="scaleType"\n [gradient]="gradient"\n [curve]="curve"\n [animations]="animations"\n />\n </svg:g>\n\n <svg:g *ngIf="!tooltipDisabled" (mouseleave)="hideCircles()">\n <svg:g\n ngx-charts-tooltip-area\n [dims]="dims"\n [xSet]="xSet"\n [xScale]="xScale"\n [yScale]="yScale"\n [results]="results"\n [colors]="colors"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="seriesTooltipTemplate"\n (hover)="updateHoveredVertical($event)"\n />\n\n <svg:g *ngFor="let series of results">\n <svg:g\n ngx-charts-circle-series\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [activeEntries]="activeEntries"\n [data]="series"\n [scaleType]="scaleType"\n [visibleValue]="hoveredVertical"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n (select)="onClick($event, series)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </svg:g>\n <svg:g\n ngx-charts-timeline\n *ngIf="timeline && scaleType != \'ordinal\'"\n [attr.transform]="timelineTransform"\n [results]="results"\n [view]="[timelineWidth, height]"\n [height]="timelineHeight"\n [scheme]="scheme"\n [customColors]="customColors"\n [legend]="legend"\n [scaleType]="scaleType"\n (onDomainChange)="updateDomain($event)"\n >\n <svg:g *ngFor="let series of results; trackBy: trackBy">\n <svg:g\n ngx-charts-area-series\n [xScale]="timelineXScale"\n [yScale]="timelineYScale"\n [baseValue]="baseValue"\n [colors]="colors"\n [data]="series"\n [scaleType]="scaleType"\n [gradient]="gradient"\n [curve]="curve"\n [animations]="animations"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(z),Ot=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.showGridLines=!0,i.curve=p.curveLinear,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.roundDomains=!1,i.tooltipDisabled=!1,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.timelineHeight=50,i.timelinePadding=10,i}return f(i,t),i.prototype.update=function(){var e=this;t.prototype.update.call(this),this.dims=It({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.timeline&&(this.dims.height-=this.timelineHeight+this.margin[2]+this.timelinePadding),this.xDomain=this.getXDomain(),this.filteredDomain&&(this.xDomain=this.filteredDomain),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,this.dims.width),this.yScale=this.getYScale(this.yDomain,this.dims.height);for(var i=function(t){var i,a,o,s,r=n.xSet[t],l=0,c=0;try{for(var h=(i=void 0,k(n.results)),p=h.next();!p.done;p=h.next()){(v=(u=p.value).series.find((function(t){var i=t.name,n=r;return"time"===e.scaleType&&(i=i.valueOf(),n=n.valueOf()),i===n})))&&(c+=v.value)}}catch(t){i={error:t}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}try{for(var d=(o=void 0,k(n.results)),g=d.next();!g.done;g=d.next()){var u,v;(v=(u=g.value).series.find((function(t){var i=t.name,n=r;return"time"===e.scaleType&&(i=i.valueOf(),n=n.valueOf()),i===n})))?(v.d0=l,v.d1=l+v.value,l+=v.value):(v={name:r,value:0,d0:l,d1:l},u.series.push(v)),c>0?(v.d0=100*v.d0/c,v.d1=100*v.d1/c):(v.d0=0,v.d1=0)}}catch(t){o={error:t}}finally{try{g&&!g.done&&(s=d.return)&&s.call(d)}finally{if(o)throw o.error}}},n=this,a=0;a<this.xSet.length;a++)i(a);this.updateTimeline(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")",this.clipPathId="clip"+it().toString(),this.clipPath="url(#"+this.clipPathId+")"},i.prototype.updateTimeline=function(){this.timeline&&(this.timelineWidth=this.dims.width,this.timelineXDomain=this.getXDomain(),this.timelineXScale=this.getXScale(this.timelineXDomain,this.timelineWidth),this.timelineYScale=this.getYScale(this.yDomain,this.timelineHeight),this.timelineTransform="translate("+this.dims.xOffset+", "+-this.margin[2]+")")},i.prototype.getXDomain=function(){var t=Dt(this.results);this.scaleType=Ct(t);var e=[];if("time"===this.scaleType){var i=Math.min.apply(Math,A(t)),n=Math.max.apply(Math,A(t));e=[new Date(i),new Date(n)],this.xSet=A(t).sort((function(t,e){var i=t.getTime(),n=e.getTime();return i>n?1:n>i?-1:0}))}else if("linear"===this.scaleType){t=t.map((function(t){return Number(t)})),e=[i=Math.min.apply(Math,A(t)),n=Math.max.apply(Math,A(t))],this.xSet=A(t).sort((function(t,e){return t-e}))}else e=t,this.xSet=t;return e},i.prototype.getYDomain=function(){return[0,100]},i.prototype.getSeriesDomain=function(){return this.results.map((function(t){return t.name}))},i.prototype.getXScale=function(t,e){var i;return"time"===this.scaleType?i=c.scaleTime():"linear"===this.scaleType?i=c.scaleLinear():"ordinal"===this.scaleType&&(i=c.scalePoint().padding(.1)),i.range([0,e]).domain(t),this.roundDomains?i.nice():i},i.prototype.getYScale=function(t,e){var i=c.scaleLinear().range([e,0]).domain(t);return this.roundDomains?i.nice():i},i.prototype.updateDomain=function(t){this.filteredDomain=t,this.xDomain=this.filteredDomain,this.xScale=this.getXScale(this.xDomain,this.dims.width)},i.prototype.updateHoveredVertical=function(t){this.hoveredVertical=t.value,this.deactivateAll()},i.prototype.hideCircles=function(){this.hoveredVertical=null,this.deactivateAll()},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.seriesDomain:this.yDomain,this.colors=new St(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.seriesDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.yDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t){this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t){var e=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}));this.activeEntries.splice(e,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},i.prototype.deactivateAll=function(){var t,e;this.activeEntries=A(this.activeEntries);try{for(var i=k(this.activeEntries),n=i.next();!n.done;n=i.next()){var a=n.value;this.deactivate.emit({value:a,entries:[]})}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.activeEntries=[]},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"timeline",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"curve",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),T([e.ContentChild("seriesTooltipTemplate")],i.prototype,"seriesTooltipTemplate",void 0),T([e.HostListener("mouseleave")],i.prototype,"hideCircles",null),i=T([e.Component({selector:"ngx-charts-area-chart-normalized",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelClick)="onClick($event)"\n (legendLabelActivate)="onActivate($event)"\n (legendLabelDeactivate)="onDeactivate($event)"\n >\n <svg:defs>\n <svg:clipPath [attr.id]="clipPathId">\n <svg:rect\n [attr.width]="dims.width + 10"\n [attr.height]="dims.height + 10"\n [attr.transform]="\'translate(-5, -5)\'"\n />\n </svg:clipPath>\n </svg:defs>\n <svg:g [attr.transform]="transform" class="area-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g [attr.clip-path]="clipPath">\n <svg:g *ngFor="let series of results; trackBy: trackBy">\n <svg:g\n ngx-charts-area-series\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [data]="series"\n [scaleType]="scaleType"\n [activeEntries]="activeEntries"\n [gradient]="gradient"\n normalized="true"\n [curve]="curve"\n [animations]="animations"\n />\n </svg:g>\n\n <svg:g *ngIf="!tooltipDisabled" (mouseleave)="hideCircles()">\n <svg:g\n ngx-charts-tooltip-area\n [dims]="dims"\n [xSet]="xSet"\n [xScale]="xScale"\n [yScale]="yScale"\n [results]="results"\n [colors]="colors"\n [showPercentage]="true"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="seriesTooltipTemplate"\n (hover)="updateHoveredVertical($event)"\n />\n\n <svg:g *ngFor="let series of results">\n <svg:g\n ngx-charts-circle-series\n type="stacked"\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [activeEntries]="activeEntries"\n [data]="series"\n [scaleType]="scaleType"\n [visibleValue]="hoveredVertical"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n (select)="onClick($event, series)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </svg:g>\n <svg:g\n ngx-charts-timeline\n *ngIf="timeline && scaleType != \'ordinal\'"\n [attr.transform]="timelineTransform"\n [results]="results"\n [view]="[timelineWidth, height]"\n [height]="timelineHeight"\n [scheme]="scheme"\n [customColors]="customColors"\n [legend]="legend"\n [scaleType]="scaleType"\n (onDomainChange)="updateDomain($event)"\n >\n <svg:g *ngFor="let series of results; trackBy: trackBy">\n <svg:g\n ngx-charts-area-series\n [xScale]="timelineXScale"\n [yScale]="timelineYScale"\n [colors]="colors"\n [data]="series"\n [scaleType]="scaleType"\n [gradient]="gradient"\n normalized="true"\n [curve]="curve"\n [animations]="animations"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(z),Mt=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.showGridLines=!0,i.curve=p.curveLinear,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.roundDomains=!1,i.tooltipDisabled=!1,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.timelineHeight=50,i.timelinePadding=10,i}return f(i,t),i.prototype.update=function(){var e=this;t.prototype.update.call(this),this.dims=It({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.timeline&&(this.dims.height-=this.timelineHeight+this.margin[2]+this.timelinePadding),this.xDomain=this.getXDomain(),this.filteredDomain&&(this.xDomain=this.filteredDomain),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,this.dims.width),this.yScale=this.getYScale(this.yDomain,this.dims.height);for(var i=function(t){var i,a,o=n.xSet[t],s=0;try{for(var r=(i=void 0,k(n.results)),l=r.next();!l.done;l=r.next()){var c=l.value,h=c.series.find((function(t){var i=t.name,n=o;return"time"===e.scaleType&&(i=i.valueOf(),n=n.valueOf()),i===n}));h?(h.d0=s,h.d1=s+h.value,s+=h.value):(h={name:o,value:0,d0:s,d1:s},c.series.push(h))}}catch(t){i={error:t}}finally{try{l&&!l.done&&(a=r.return)&&a.call(r)}finally{if(i)throw i.error}}},n=this,a=0;a<this.xSet.length;a++)i(a);this.updateTimeline(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")",this.clipPathId="clip"+it().toString(),this.clipPath="url(#"+this.clipPathId+")"},i.prototype.updateTimeline=function(){this.timeline&&(this.timelineWidth=this.dims.width,this.timelineXDomain=this.getXDomain(),this.timelineXScale=this.getXScale(this.timelineXDomain,this.timelineWidth),this.timelineYScale=this.getYScale(this.yDomain,this.timelineHeight),this.timelineTransform="translate("+this.dims.xOffset+", "+-this.margin[2]+")")},i.prototype.getXDomain=function(){var t=Dt(this.results);this.scaleType=Ct(t);var e,i,n=[];return"linear"===this.scaleType&&(t=t.map((function(t){return Number(t)}))),"time"!==this.scaleType&&"linear"!==this.scaleType||(e=this.xScaleMin?this.xScaleMin:Math.min.apply(Math,A(t)),i=this.xScaleMax?this.xScaleMax:Math.max.apply(Math,A(t))),"time"===this.scaleType?(n=[new Date(e),new Date(i)],this.xSet=A(t).sort((function(t,e){var i=t.getTime(),n=e.getTime();return i>n?1:n>i?-1:0}))):"linear"===this.scaleType?(n=[e,i],this.xSet=A(t).sort((function(t,e){return t-e}))):(n=t,this.xSet=t),n},i.prototype.getYDomain=function(){for(var t=this,e=[],i=function(i){var a,o,s=n.xSet[i],r=0;try{for(var l=(a=void 0,k(n.results)),c=l.next();!c.done;c=l.next()){var h=c.value.series.find((function(e){var i=e.name,n=s;return"time"===t.scaleType&&(i=i.valueOf(),n=n.valueOf()),i===n}));h&&(r+=h.value)}}catch(t){a={error:t}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(a)throw a.error}}e.push(r)},n=this,a=0;a<this.xSet.length;a++)i(a);return[this.yScaleMin?this.yScaleMin:Math.min.apply(Math,A([0],e)),this.yScaleMax?this.yScaleMax:Math.max.apply(Math,A(e))]},i.prototype.getSeriesDomain=function(){return this.results.map((function(t){return t.name}))},i.prototype.getXScale=function(t,e){var i;return"time"===this.scaleType?i=c.scaleTime():"linear"===this.scaleType?i=c.scaleLinear():"ordinal"===this.scaleType&&(i=c.scalePoint().padding(.1)),i.range([0,e]).domain(t),this.roundDomains?i.nice():i},i.prototype.getYScale=function(t,e){var i=c.scaleLinear().range([e,0]).domain(t);return this.roundDomains?i.nice():i},i.prototype.updateDomain=function(t){this.filteredDomain=t,this.xDomain=this.filteredDomain,this.xScale=this.getXScale(this.xDomain,this.dims.width)},i.prototype.updateHoveredVertical=function(t){this.hoveredVertical=t.value,this.deactivateAll()},i.prototype.hideCircles=function(){this.hoveredVertical=null,this.deactivateAll()},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.seriesDomain:this.yDomain,this.colors=new St(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.seriesDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.yDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t){this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t){var e=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}));this.activeEntries.splice(e,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},i.prototype.deactivateAll=function(){var t,e;this.activeEntries=A(this.activeEntries);try{for(var i=k(this.activeEntries),n=i.next();!n.done;n=i.next()){var a=n.value;this.deactivate.emit({value:a,entries:[]})}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.activeEntries=[]},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"timeline",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"curve",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"xScaleMin",void 0),T([e.Input()],i.prototype,"xScaleMax",void 0),T([e.Input()],i.prototype,"yScaleMin",void 0),T([e.Input()],i.prototype,"yScaleMax",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),T([e.ContentChild("seriesTooltipTemplate")],i.prototype,"seriesTooltipTemplate",void 0),T([e.HostListener("mouseleave")],i.prototype,"hideCircles",null),i=T([e.Component({selector:"ngx-charts-area-chart-stacked",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelClick)="onClick($event)"\n (legendLabelActivate)="onActivate($event)"\n (legendLabelDeactivate)="onDeactivate($event)"\n >\n <svg:defs>\n <svg:clipPath [attr.id]="clipPathId">\n <svg:rect\n [attr.width]="dims.width + 10"\n [attr.height]="dims.height + 10"\n [attr.transform]="\'translate(-5, -5)\'"\n />\n </svg:clipPath>\n </svg:defs>\n <svg:g [attr.transform]="transform" class="area-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g [attr.clip-path]="clipPath">\n <svg:g *ngFor="let series of results; trackBy: trackBy">\n <svg:g\n ngx-charts-area-series\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [data]="series"\n [scaleType]="scaleType"\n [gradient]="gradient"\n [activeEntries]="activeEntries"\n stacked="true"\n [curve]="curve"\n [animations]="animations"\n />\n </svg:g>\n\n <svg:g *ngIf="!tooltipDisabled" (mouseleave)="hideCircles()">\n <svg:g\n ngx-charts-tooltip-area\n [dims]="dims"\n [xSet]="xSet"\n [xScale]="xScale"\n [yScale]="yScale"\n [results]="results"\n [colors]="colors"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="seriesTooltipTemplate"\n (hover)="updateHoveredVertical($event)"\n />\n\n <svg:g *ngFor="let series of results; trackBy: trackBy">\n <svg:g\n ngx-charts-circle-series\n type="stacked"\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [activeEntries]="activeEntries"\n [data]="series"\n [scaleType]="scaleType"\n [visibleValue]="hoveredVertical"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n (select)="onClick($event, series)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </svg:g>\n <svg:g\n ngx-charts-timeline\n *ngIf="timeline && scaleType != \'ordinal\'"\n [attr.transform]="timelineTransform"\n [results]="results"\n [view]="[timelineWidth, height]"\n [height]="timelineHeight"\n [scheme]="scheme"\n [customColors]="customColors"\n [legend]="legend"\n [scaleType]="scaleType"\n (onDomainChange)="updateDomain($event)"\n >\n <svg:g *ngFor="let series of results; trackBy: trackBy">\n <svg:g\n ngx-charts-area-series\n [xScale]="timelineXScale"\n [yScale]="timelineYScale"\n [colors]="colors"\n [data]="series"\n [scaleType]="scaleType"\n [gradient]="gradient"\n stacked="true"\n [curve]="curve"\n [animations]="animations"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(z);function Ft(t,e,i){return void 0===i&&(i="asc"),t.sort((function(t,n){return"asc"===i?t[e]-n[e]:n[e]-t[e]}))}function Pt(t,e,i,n){return void 0===i&&(i="asc"),t.sort((function(t,a){var o=t[e],s=a[e],r=n.indexOf(o),l=n.indexOf(s);return"asc"===i?r-l:l-r}))}function Xt(t,e,i){return void 0===i&&(i="asc"),t.sort((function(t,n){var a=t[e].getTime(),o=n[e].getTime();return"asc"===i?a>o?1:o>a?-1:0:a>o?-1:o>a?1:0}))}var Yt,Rt=function(){function t(){this.baseValue="auto",this.stacked=!1,this.normalized=!1,this.animations=!0,this.select=new e.EventEmitter}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){var t,e,i=this;this.updateGradient();var n=function(t){var e=t.name;return i.xScale(e)};this.stacked||this.normalized?(t=p.area().x(n).y0((function(t,e){return i.yScale(t.d0)})).y1((function(t,e){return i.yScale(t.d1)})),e=p.area().x(n).y0((function(t){return i.yScale.range()[0]})).y1((function(t){return i.yScale.range()[0]}))):(t=p.area().x(n).y0((function(){return"auto"===i.baseValue?i.yScale.range()[0]:i.yScale(i.baseValue)})).y1((function(t){return i.yScale(t.value)})),e=p.area().x(n).y0((function(t){return"auto"===i.baseValue?i.yScale.range()[0]:i.yScale(i.baseValue)})).y1((function(t){return"auto"===i.baseValue?i.yScale.range()[0]:i.yScale(i.baseValue)}))),t.curve(this.curve),e.curve(this.curve),this.opacity=.8;var a=this.data.series;a="linear"===this.scaleType?Ft(a,"name"):"time"===this.scaleType?Xt(a,"name"):Pt(a,"name","asc",this.xScale.domain()),this.path=t(a),this.startingPath=e(a)},t.prototype.updateGradient=function(){if("linear"===this.colors.scaleType)if(this.hasGradient=!0,this.stacked||this.normalized){var t=this.data.series.map((function(t){return t.d0})),e=this.data.series.map((function(t){return t.d1})),i=Math.max.apply(Math,A(e)),n=Math.min.apply(Math,A(t));this.gradientStops=this.colors.getLinearGradientStops(i,n)}else{var a=this.data.series.map((function(t){return t.value}));i=Math.max.apply(Math,A(a));this.gradientStops=this.colors.getLinearGradientStops(i)}else this.hasGradient=!1,this.gradientStops=void 0},t.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.name===e.name}))},t.prototype.isInactive=function(t){return!(!this.activeEntries||0===this.activeEntries.length)&&void 0===this.activeEntries.find((function(e){return t.name===e.name}))},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"xScale",void 0),T([e.Input()],t.prototype,"yScale",void 0),T([e.Input()],t.prototype,"baseValue",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"scaleType",void 0),T([e.Input()],t.prototype,"stacked",void 0),T([e.Input()],t.prototype,"normalized",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"curve",void 0),T([e.Input()],t.prototype,"activeEntries",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),t=T([e.Component({selector:"g[ngx-charts-area-series]",template:'\n <svg:g\n ngx-charts-area\n class="area-series"\n [data]="data"\n [path]="path"\n [fill]="colors.getColor(data.name)"\n [stops]="gradientStops"\n [startingPath]="startingPath"\n [opacity]="opacity"\n [gradient]="gradient || hasGradient"\n [animations]="animations"\n [class.active]="isActive(data)"\n [class.inactive]="isInactive(data)"\n />\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),zt=function(){function t(){}return t=T([e.NgModule({imports:[At],declarations:[Et,Ot,Mt,Rt],exports:[Et,Ot,Mt,Rt]})],t)}(),Ht=function(){function t(t){this.roundEdges=!0,this.gradient=!1,this.offset=0,this.isActive=!1,this.animations=!0,this.noBarWhenZero=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.hasGradient=!1,this.hideBar=!1,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(t){t.roundEdges&&this.loadAnimation(),this.update()},t.prototype.update=function(){this.gradientId="grad"+it().toString(),this.gradientFill="url(#"+this.gradientId+")",this.gradient||this.stops?(this.gradientStops=this.getGradient(),this.hasGradient=!0):this.hasGradient=!1,this.updatePathEl(),this.checkToHideBar()},t.prototype.loadAnimation=function(){this.path=this.getStartingPath(),setTimeout(this.update.bind(this),100)},t.prototype.updatePathEl=function(){var t=r.select(this.element).select(".bar"),e=this.getPath();this.animations?t.transition().duration(500).attr("d",e):t.attr("d",e)},t.prototype.getGradient=function(){return this.stops?this.stops:[{offset:0,color:this.fill,opacity:this.getStartOpacity()},{offset:100,color:this.fill,opacity:1}]},t.prototype.getStartingPath=function(){if(!this.animations)return this.getPath();var t,e=this.getRadius();return this.roundEdges?"vertical"===this.orientation?(e=Math.min(this.height,e),t=$(this.x,this.y+this.height,this.width,1,0,this.edges)):"horizontal"===this.orientation&&(e=Math.min(this.width,e),t=$(this.x,this.y,1,this.height,0,this.edges)):"vertical"===this.orientation?t=$(this.x,this.y+this.height,this.width,1,0,this.edges):"horizontal"===this.orientation&&(t=$(this.x,this.y,1,this.height,0,this.edges)),t},t.prototype.getPath=function(){var t,e=this.getRadius();return this.roundEdges?"vertical"===this.orientation?(e=Math.min(this.height,e),t=$(this.x,this.y,this.width,this.height,e,this.edges)):"horizontal"===this.orientation&&(e=Math.min(this.width,e),t=$(this.x,this.y,this.width,this.height,e,this.edges)):t=$(this.x,this.y,this.width,this.height,e,this.edges),t},t.prototype.getRadius=function(){var t=0;return this.roundEdges&&this.height>5&&this.width>5&&(t=Math.floor(Math.min(5,this.height/2,this.width/2))),t},t.prototype.getStartOpacity=function(){return this.roundEdges?.2:.5},Object.defineProperty(t.prototype,"edges",{get:function(){var t=[!1,!1,!1,!1];return this.roundEdges&&("vertical"===this.orientation?t=this.data.value>0?[!0,!0,!1,!1]:[!1,!1,!0,!0]:"horizontal"===this.orientation&&(t=this.data.value>0?[!1,!0,!1,!0]:[!0,!1,!0,!1])),t},enumerable:!0,configurable:!0}),t.prototype.onMouseEnter=function(){this.activate.emit(this.data)},t.prototype.onMouseLeave=function(){this.deactivate.emit(this.data)},t.prototype.checkToHideBar=function(){this.hideBar=this.noBarWhenZero&&("vertical"===this.orientation&&0===this.height||"horizontal"===this.orientation&&0===this.width)},t.ctorParameters=function(){return[{type:e.ElementRef}]},T([e.Input()],t.prototype,"fill",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"height",void 0),T([e.Input()],t.prototype,"x",void 0),T([e.Input()],t.prototype,"y",void 0),T([e.Input()],t.prototype,"orientation",void 0),T([e.Input()],t.prototype,"roundEdges",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"offset",void 0),T([e.Input()],t.prototype,"isActive",void 0),T([e.Input()],t.prototype,"stops",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Input()],t.prototype,"ariaLabel",void 0),T([e.Input()],t.prototype,"noBarWhenZero",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),T([e.HostListener("mouseenter")],t.prototype,"onMouseEnter",null),T([e.HostListener("mouseleave")],t.prototype,"onMouseLeave",null),t=T([e.Component({selector:"g[ngx-charts-bar]",template:'\n <svg:defs *ngIf="hasGradient">\n <svg:g ngx-charts-svg-linear-gradient [orientation]="orientation" [name]="gradientId" [stops]="gradientStops" />\n </svg:defs>\n <svg:path\n class="bar"\n stroke="none"\n role="img"\n tabIndex="-1"\n [class.active]="isActive"\n [class.hidden]="hideBar"\n [attr.d]="path"\n [attr.aria-label]="ariaLabel"\n [attr.fill]="hasGradient ? gradientFill : fill"\n (click)="select.emit(data)"\n />\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Wt=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.tooltipDisabled=!1,i.showGridLines=!0,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.barPadding=8,i.roundDomains=!1,i.roundEdges=!0,i.showDataLabel=!1,i.noBarWhenZero=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.dataLabelMaxWidth={negative:0,positive:0},i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.showDataLabel||(this.dataLabelMaxWidth={negative:0,positive:0}),this.margin=[10,20+this.dataLabelMaxWidth.positive,10,20+this.dataLabelMaxWidth.negative],this.dims=It({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.formatDates(),this.xScale=this.getXScale(),this.yScale=this.getYScale(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")"},i.prototype.getXScale=function(){this.xDomain=this.getXDomain();var t=c.scaleLinear().range([0,this.dims.width]).domain(this.xDomain);return this.roundDomains?t.nice():t},i.prototype.getYScale=function(){this.yDomain=this.getYDomain();var t=this.yDomain.length/(this.dims.height/this.barPadding+1);return c.scaleBand().rangeRound([0,this.dims.height]).paddingInner(t).domain(this.yDomain)},i.prototype.getXDomain=function(){var t=this.results.map((function(t){return t.value}));return[this.xScaleMin?Math.min.apply(Math,A([this.xScaleMin],t)):Math.min.apply(Math,A([0],t)),this.xScaleMax?Math.max.apply(Math,A([this.xScaleMax],t)):Math.max.apply(Math,A([0],t))]},i.prototype.getYDomain=function(){return this.results.map((function(t){return t.label}))},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.yDomain:this.xDomain,this.colors=new St(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.yDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.xDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onDataLabelMaxWidthChanged=function(t){var e=this;t.size.negative?this.dataLabelMaxWidth.negative=Math.max(this.dataLabelMaxWidth.negative,t.size.width):this.dataLabelMaxWidth.positive=Math.max(this.dataLabelMaxWidth.positive,t.size.width),t.index===this.results.length-1&&setTimeout((function(){return e.update()}))},i.prototype.onActivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name})),this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name}));var i=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}));this.activeEntries.splice(i,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"barPadding",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"roundEdges",void 0),T([e.Input()],i.prototype,"xScaleMax",void 0),T([e.Input()],i.prototype,"xScaleMin",void 0),T([e.Input()],i.prototype,"showDataLabel",void 0),T([e.Input()],i.prototype,"dataLabelFormatting",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-bar-horizontal",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelClick)="onClick($event)"\n (legendLabelActivate)="onActivate($event, true)"\n (legendLabelDeactivate)="onDeactivate($event, true)"\n >\n <svg:g [attr.transform]="transform" class="bar-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n [yAxisOffset]="dataLabelMaxWidth.negative"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g\n ngx-charts-series-horizontal\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [series]="results"\n [dims]="dims"\n [gradient]="gradient"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [activeEntries]="activeEntries"\n [roundEdges]="roundEdges"\n [animations]="animations"\n [showDataLabel]="showDataLabel"\n [dataLabelFormatting]="dataLabelFormatting"\n [noBarWhenZero]="noBarWhenZero"\n (select)="onClick($event)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n (dataLabelWidthChanged)="onDataLabelMaxWidthChanged($event)"\n ></svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(z),Bt=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.tooltipDisabled=!1,i.showGridLines=!0,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.groupPadding=16,i.barPadding=8,i.roundDomains=!1,i.roundEdges=!0,i.showDataLabel=!1,i.noBarWhenZero=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.dataLabelMaxWidth={negative:0,positive:0},i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.showDataLabel||(this.dataLabelMaxWidth={negative:0,positive:0}),this.margin=[10,20+this.dataLabelMaxWidth.positive,10,20+this.dataLabelMaxWidth.negative],this.dims=It({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.formatDates(),this.groupDomain=this.getGroupDomain(),this.innerDomain=this.getInnerDomain(),this.valuesDomain=this.getValueDomain(),this.groupScale=this.getGroupScale(),this.innerScale=this.getInnerScale(),this.valueScale=this.getValueScale(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")"},i.prototype.getGroupScale=function(){var t=this.groupDomain.length/(this.dims.height/this.groupPadding+1);return c.scaleBand().rangeRound([0,this.dims.height]).paddingInner(t).paddingOuter(t/2).domain(this.groupDomain)},i.prototype.getInnerScale=function(){var t=this.groupScale.bandwidth(),e=this.innerDomain.length/(t/this.barPadding+1);return c.scaleBand().rangeRound([0,t]).paddingInner(e).domain(this.innerDomain)},i.prototype.getValueScale=function(){var t=c.scaleLinear().range([0,this.dims.width]).domain(this.valuesDomain);return this.roundDomains?t.nice():t},i.prototype.getGroupDomain=function(){var t,e,i=[];try{for(var n=k(this.results),a=n.next();!a.done;a=n.next()){var o=a.value;i.includes(o.label)||i.push(o.label)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return i},i.prototype.getInnerDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.label)||a.push(h.label)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getValueDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.value)||a.push(h.value)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return[Math.min.apply(Math,A([0],a)),this.xScaleMax?Math.max.apply(Math,A([this.xScaleMax],a)):Math.max.apply(Math,A([0],a))]},i.prototype.groupTransform=function(t){return"translate(0, "+this.groupScale(t.label)+")"},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.innerDomain:this.valuesDomain,this.colors=new St(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.innerDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.valuesDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onDataLabelMaxWidthChanged=function(t,e){var i=this;t.size.negative?this.dataLabelMaxWidth.negative=Math.max(this.dataLabelMaxWidth.negative,t.size.width):this.dataLabelMaxWidth.positive=Math.max(this.dataLabelMaxWidth.positive,t.size.width),e===this.results.length-1&&setTimeout((function(){return i.update()}))},i.prototype.onActivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name);var a=this.results.map((function(t){return t.series})).flat().filter((function(t){return i?t.label===n.name:t.name===n.name&&t.series===n.series}));this.activeEntries=A(a),this.activate.emit({value:n,entries:this.activeEntries})},i.prototype.onDeactivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name),this.activeEntries=this.activeEntries.filter((function(t){return i?t.label!==n.name:!(t.name===n.name&&t.series===n.series)})),this.deactivate.emit({value:n,entries:this.activeEntries})},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"groupPadding",void 0),T([e.Input()],i.prototype,"barPadding",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"roundEdges",void 0),T([e.Input()],i.prototype,"xScaleMax",void 0),T([e.Input()],i.prototype,"showDataLabel",void 0),T([e.Input()],i.prototype,"dataLabelFormatting",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-bar-horizontal-2d",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelActivate)="onActivate($event, undefined, true)"\n (legendLabelDeactivate)="onDeactivate($event, undefined, true)"\n (legendLabelClick)="onClick($event)"\n >\n <svg:g [attr.transform]="transform" class="bar-chart chart">\n <svg:g\n ngx-charts-grid-panel-series\n [xScale]="valueScale"\n [yScale]="groupScale"\n [data]="results"\n [dims]="dims"\n orient="horizontal"\n ></svg:g>\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="valueScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="groupScale"\n [dims]="dims"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n [yAxisOffset]="dataLabelMaxWidth.negative"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g\n *ngFor="let group of results; let index = index; trackBy: trackBy"\n [@animationState]="\'active\'"\n [attr.transform]="groupTransform(group)"\n >\n <svg:g\n ngx-charts-series-horizontal\n [xScale]="valueScale"\n [activeEntries]="activeEntries"\n [yScale]="innerScale"\n [colors]="colors"\n [series]="group.series"\n [dims]="dims"\n [gradient]="gradient"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [seriesName]="group.name"\n [roundEdges]="roundEdges"\n [animations]="animations"\n [showDataLabel]="showDataLabel"\n [dataLabelFormatting]="dataLabelFormatting"\n [noBarWhenZero]="noBarWhenZero"\n (select)="onClick($event, group)"\n (activate)="onActivate($event, group)"\n (deactivate)="onDeactivate($event, group)"\n (dataLabelWidthChanged)="onDataLabelMaxWidthChanged($event, index)"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1,transform:"*"}),n.animate(500,n.style({opacity:0,transform:"scale(0)"}))])])],styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(z),Vt=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.tooltipDisabled=!1,i.showGridLines=!0,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.barPadding=8,i.roundDomains=!1,i.noBarWhenZero=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.dims=It({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.formatDates(),this.groupDomain=this.getGroupDomain(),this.innerDomain=this.getInnerDomain(),this.valueDomain=this.getValueDomain(),this.xScale=this.getXScale(),this.yScale=this.getYScale(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")"},i.prototype.getGroupDomain=function(){var t,e,i=[];try{for(var n=k(this.results),a=n.next();!a.done;a=n.next()){var o=a.value;i.includes(o.label)||i.push(o.label)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return i},i.prototype.getInnerDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.label)||a.push(h.label)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getValueDomain=function(){return[0,100]},i.prototype.getYScale=function(){var t=this.groupDomain.length/(this.dims.height/this.barPadding+1);return c.scaleBand().rangeRound([0,this.dims.height]).paddingInner(t).domain(this.groupDomain)},i.prototype.getXScale=function(){var t=c.scaleLinear().range([0,this.dims.width]).domain(this.valueDomain);return this.roundDomains?t.nice():t},i.prototype.groupTransform=function(t){return"translate(0, "+this.yScale(t.name)+")"},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.innerDomain:this.valueDomain,this.colors=new St(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.innerDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.valueDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name);var a=this.results.map((function(t){return t.series})).flat().filter((function(t){return i?t.label===n.name:t.name===n.name&&t.series===n.series}));this.activeEntries=A(a),this.activate.emit({value:n,entries:this.activeEntries})},i.prototype.onDeactivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name),this.activeEntries=this.activeEntries.filter((function(t){return i?t.label!==n.name:!(t.name===n.name&&t.series===n.series)})),this.deactivate.emit({value:n,entries:this.activeEntries})},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"barPadding",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-bar-horizontal-normalized",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelActivate)="onActivate($event, undefined, true)"\n (legendLabelDeactivate)="onDeactivate($event, undefined, true)"\n (legendLabelClick)="onClick($event)"\n >\n <svg:g [attr.transform]="transform" class="bar-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g\n *ngFor="let group of results; trackBy: trackBy"\n [@animationState]="\'active\'"\n [attr.transform]="groupTransform(group)"\n >\n <svg:g\n ngx-charts-series-horizontal\n type="normalized"\n [xScale]="xScale"\n [yScale]="yScale"\n [activeEntries]="activeEntries"\n [colors]="colors"\n [series]="group.series"\n [dims]="dims"\n [gradient]="gradient"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [seriesName]="group.name"\n [animations]="animations"\n (select)="onClick($event, group)"\n (activate)="onActivate($event, group)"\n (deactivate)="onDeactivate($event, group)"\n [noBarWhenZero]="noBarWhenZero"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1,transform:"*"}),n.animate(500,n.style({opacity:0,transform:"scale(0)"}))])])],styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(z),Gt=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.tooltipDisabled=!1,i.showGridLines=!0,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.barPadding=8,i.roundDomains=!1,i.showDataLabel=!1,i.noBarWhenZero=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.dataLabelMaxWidth={negative:0,positive:0},i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.showDataLabel||(this.dataLabelMaxWidth={negative:0,positive:0}),this.margin=[10,20+this.dataLabelMaxWidth.positive,10,20+this.dataLabelMaxWidth.negative],this.dims=It({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.formatDates(),this.groupDomain=this.getGroupDomain(),this.innerDomain=this.getInnerDomain(),this.valueDomain=this.getValueDomain(),this.xScale=this.getXScale(),this.yScale=this.getYScale(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")"},i.prototype.getGroupDomain=function(){var t,e,i=[];try{for(var n=k(this.results),a=n.next();!a.done;a=n.next()){var o=a.value;i.includes(o.label)||i.push(o.label)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return i},i.prototype.getInnerDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.label)||a.push(h.label)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getValueDomain=function(){var t,e,i,n,a=[],o=0,s=0;try{for(var r=k(this.results),l=r.next();!l.done;l=r.next()){var c=l.value,h=0,p=0;try{for(var d=(i=void 0,k(c.series)),g=d.next();!g.done;g=d.next()){var u=g.value;u.value<0?h+=u.value:p+=u.value,o=u.value<o?u.value:o,s=u.value>s?u.value:s}}catch(t){i={error:t}}finally{try{g&&!g.done&&(n=d.return)&&n.call(d)}finally{if(i)throw i.error}}a.push(h),a.push(p)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return a.push(o),a.push(s),[Math.min.apply(Math,A([0],a)),this.xScaleMax?Math.max.apply(Math,A([this.xScaleMax],a)):Math.max.apply(Math,A(a))]},i.prototype.getYScale=function(){var t=this.groupDomain.length/(this.dims.height/this.barPadding+1);return c.scaleBand().rangeRound([0,this.dims.height]).paddingInner(t).domain(this.groupDomain)},i.prototype.getXScale=function(){var t=c.scaleLinear().range([0,this.dims.width]).domain(this.valueDomain);return this.roundDomains?t.nice():t},i.prototype.groupTransform=function(t){return"translate(0, "+this.yScale(t.name)+")"},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.innerDomain:this.valueDomain,this.colors=new St(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.innerDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.valueDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onDataLabelMaxWidthChanged=function(t,e){var i=this;t.size.negative?this.dataLabelMaxWidth.negative=Math.max(this.dataLabelMaxWidth.negative,t.size.width):this.dataLabelMaxWidth.positive=Math.max(this.dataLabelMaxWidth.positive,t.size.width),e===this.results.length-1&&setTimeout((function(){return i.update()}))},i.prototype.onActivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name);var a=this.results.map((function(t){return t.series})).flat().filter((function(t){return i?t.label===n.name:t.name===n.name&&t.series===n.series}));this.activeEntries=A(a),this.activate.emit({value:n,entries:this.activeEntries})},i.prototype.onDeactivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name),this.activeEntries=this.activeEntries.filter((function(t){return i?t.label!==n.name:!(t.name===n.name&&t.series===n.series)})),this.deactivate.emit({value:n,entries:this.activeEntries})},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"barPadding",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"xScaleMax",void 0),T([e.Input()],i.prototype,"showDataLabel",void 0),T([e.Input()],i.prototype,"dataLabelFormatting",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-bar-horizontal-stacked",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelActivate)="onActivate($event, undefined, true)"\n (legendLabelDeactivate)="onDeactivate($event, undefined, true)"\n (legendLabelClick)="onClick($event)"\n >\n <svg:g [attr.transform]="transform" class="bar-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n [yAxisOffset]="dataLabelMaxWidth.negative"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g\n *ngFor="let group of results; let index = index; trackBy: trackBy"\n [@animationState]="\'active\'"\n [attr.transform]="groupTransform(group)"\n >\n <svg:g\n ngx-charts-series-horizontal\n type="stacked"\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [series]="group.series"\n [activeEntries]="activeEntries"\n [dims]="dims"\n [gradient]="gradient"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [seriesName]="group.name"\n [animations]="animations"\n [showDataLabel]="showDataLabel"\n [dataLabelFormatting]="dataLabelFormatting"\n [noBarWhenZero]="noBarWhenZero"\n (select)="onClick($event, group)"\n (activate)="onActivate($event, group)"\n (deactivate)="onDeactivate($event, group)"\n (dataLabelWidthChanged)="onDataLabelMaxWidthChanged($event, index)"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1,transform:"*"}),n.animate(500,n.style({opacity:0,transform:"scale(0)"}))])])],styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(z),$t=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.tooltipDisabled=!1,i.showGridLines=!0,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.barPadding=8,i.roundDomains=!1,i.roundEdges=!0,i.showDataLabel=!1,i.noBarWhenZero=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.dataLabelMaxHeight={negative:0,positive:0},i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.showDataLabel||(this.dataLabelMaxHeight={negative:0,positive:0}),this.margin=[10+this.dataLabelMaxHeight.positive,20,10+this.dataLabelMaxHeight.negative,20],this.dims=It({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.formatDates(),this.showDataLabel&&(this.dims.height-=this.dataLabelMaxHeight.negative),this.xScale=this.getXScale(),this.yScale=this.getYScale(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+(this.margin[0]+this.dataLabelMaxHeight.negative)+")"},i.prototype.getXScale=function(){this.xDomain=this.getXDomain();var t=this.xDomain.length/(this.dims.width/this.barPadding+1);return c.scaleBand().range([0,this.dims.width]).paddingInner(t).domain(this.xDomain)},i.prototype.getYScale=function(){this.yDomain=this.getYDomain();var t=c.scaleLinear().range([this.dims.height,0]).domain(this.yDomain);return this.roundDomains?t.nice():t},i.prototype.getXDomain=function(){return this.results.map((function(t){return t.label}))},i.prototype.getYDomain=function(){var t=this.results.map((function(t){return t.value})),e=this.yScaleMin?Math.min.apply(Math,A([this.yScaleMin],t)):Math.min.apply(Math,A([0],t));this.yAxisTicks&&!this.yAxisTicks.some(isNaN)&&(e=Math.min.apply(Math,A([e],this.yAxisTicks)));var i=this.yScaleMax?Math.max.apply(Math,A([this.yScaleMax],t)):Math.max.apply(Math,A([0],t));return this.yAxisTicks&&!this.yAxisTicks.some(isNaN)&&(i=Math.max.apply(Math,A([i],this.yAxisTicks))),[e,i]},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.xDomain:this.yDomain,this.colors=new St(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.xDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.yDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onDataLabelMaxHeightChanged=function(t){var e=this;t.size.negative?this.dataLabelMaxHeight.negative=Math.max(this.dataLabelMaxHeight.negative,t.size.height):this.dataLabelMaxHeight.positive=Math.max(this.dataLabelMaxHeight.positive,t.size.height),t.index===this.results.length-1&&setTimeout((function(){return e.update()}))},i.prototype.onActivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name})),this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name}));var i=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}));this.activeEntries.splice(i,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"barPadding",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"roundEdges",void 0),T([e.Input()],i.prototype,"yScaleMax",void 0),T([e.Input()],i.prototype,"yScaleMin",void 0),T([e.Input()],i.prototype,"showDataLabel",void 0),T([e.Input()],i.prototype,"dataLabelFormatting",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-bar-vertical",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelClick)="onClick($event)"\n (legendLabelActivate)="onActivate($event, true)"\n (legendLabelDeactivate)="onDeactivate($event, true)"\n >\n <svg:g [attr.transform]="transform" class="bar-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n [xAxisOffset]="dataLabelMaxHeight.negative"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g\n ngx-charts-series-vertical\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [series]="results"\n [dims]="dims"\n [gradient]="gradient"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [showDataLabel]="showDataLabel"\n [dataLabelFormatting]="dataLabelFormatting"\n [activeEntries]="activeEntries"\n [roundEdges]="roundEdges"\n [animations]="animations"\n [noBarWhenZero]="noBarWhenZero"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n (select)="onClick($event)"\n (dataLabelHeightChanged)="onDataLabelMaxHeightChanged($event)"\n ></svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(z),Nt=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.tooltipDisabled=!1,i.scaleType="ordinal",i.showGridLines=!0,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.groupPadding=16,i.barPadding=8,i.roundDomains=!1,i.roundEdges=!0,i.showDataLabel=!1,i.noBarWhenZero=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.dataLabelMaxHeight={negative:0,positive:0},i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.showDataLabel||(this.dataLabelMaxHeight={negative:0,positive:0}),this.margin=[10+this.dataLabelMaxHeight.positive,20,10+this.dataLabelMaxHeight.negative,20],this.dims=It({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.showDataLabel&&(this.dims.height-=this.dataLabelMaxHeight.negative),this.formatDates(),this.groupDomain=this.getGroupDomain(),this.innerDomain=this.getInnerDomain(),this.valuesDomain=this.getValueDomain(),this.groupScale=this.getGroupScale(),this.innerScale=this.getInnerScale(),this.valueScale=this.getValueScale(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+(this.margin[0]+this.dataLabelMaxHeight.negative)+")"},i.prototype.onDataLabelMaxHeightChanged=function(t,e){var i=this;t.size.negative?this.dataLabelMaxHeight.negative=Math.max(this.dataLabelMaxHeight.negative,t.size.height):this.dataLabelMaxHeight.positive=Math.max(this.dataLabelMaxHeight.positive,t.size.height),e===this.results.length-1&&setTimeout((function(){return i.update()}))},i.prototype.getGroupScale=function(){var t=this.groupDomain.length/(this.dims.height/this.groupPadding+1);return c.scaleBand().rangeRound([0,this.dims.width]).paddingInner(t).paddingOuter(t/2).domain(this.groupDomain)},i.prototype.getInnerScale=function(){var t=this.groupScale.bandwidth(),e=this.innerDomain.length/(t/this.barPadding+1);return c.scaleBand().rangeRound([0,t]).paddingInner(e).domain(this.innerDomain)},i.prototype.getValueScale=function(){var t=c.scaleLinear().range([this.dims.height,0]).domain(this.valuesDomain);return this.roundDomains?t.nice():t},i.prototype.getGroupDomain=function(){var t,e,i=[];try{for(var n=k(this.results),a=n.next();!a.done;a=n.next()){var o=a.value;i.includes(o.label)||i.push(o.label)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return i},i.prototype.getInnerDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.label)||a.push(h.label)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getValueDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.value)||a.push(h.value)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return[Math.min.apply(Math,A([0],a)),this.yScaleMax?Math.max.apply(Math,A([this.yScaleMax],a)):Math.max.apply(Math,A([0],a))]},i.prototype.groupTransform=function(t){return"translate("+this.groupScale(t.label)+", 0)"},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.innerDomain:this.valuesDomain,this.colors=new St(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.innerDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.valuesDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name);var a=this.results.map((function(t){return t.series})).flat().filter((function(t){return i?t.label===n.name:t.name===n.name&&t.series===n.series}));this.activeEntries=A(a),this.activate.emit({value:n,entries:this.activeEntries})},i.prototype.onDeactivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name),this.activeEntries=this.activeEntries.filter((function(t){return i?t.label!==n.name:!(t.name===n.name&&t.series===n.series)})),this.deactivate.emit({value:n,entries:this.activeEntries})},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"scaleType",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"groupPadding",void 0),T([e.Input()],i.prototype,"barPadding",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"roundEdges",void 0),T([e.Input()],i.prototype,"yScaleMax",void 0),T([e.Input()],i.prototype,"showDataLabel",void 0),T([e.Input()],i.prototype,"dataLabelFormatting",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-bar-vertical-2d",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelActivate)="onActivate($event, undefined, true)"\n (legendLabelDeactivate)="onDeactivate($event, undefined, true)"\n (legendLabelClick)="onClick($event)"\n >\n <svg:g [attr.transform]="transform" class="bar-chart chart">\n <svg:g\n ngx-charts-grid-panel-series\n [xScale]="groupScale"\n [yScale]="valueScale"\n [data]="results"\n [dims]="dims"\n orient="vertical"\n ></svg:g>\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="groupScale"\n [dims]="dims"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n [xAxisOffset]="dataLabelMaxHeight.negative"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="valueScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g\n ngx-charts-series-vertical\n *ngFor="let group of results; let index = index; trackBy: trackBy"\n [@animationState]="\'active\'"\n [attr.transform]="groupTransform(group)"\n [activeEntries]="activeEntries"\n [xScale]="innerScale"\n [yScale]="valueScale"\n [colors]="colors"\n [series]="group.series"\n [dims]="dims"\n [gradient]="gradient"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [showDataLabel]="showDataLabel"\n [dataLabelFormatting]="dataLabelFormatting"\n [seriesName]="group.name"\n [roundEdges]="roundEdges"\n [animations]="animations"\n [noBarWhenZero]="noBarWhenZero"\n (select)="onClick($event, group)"\n (activate)="onActivate($event, group)"\n (deactivate)="onDeactivate($event, group)"\n (dataLabelHeightChanged)="onDataLabelMaxHeightChanged($event, index)"\n />\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1,transform:"*"}),n.animate(500,n.style({opacity:0,transform:"scale(0)"}))])])],styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(z),jt=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.tooltipDisabled=!1,i.showGridLines=!0,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.barPadding=8,i.roundDomains=!1,i.noBarWhenZero=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.dims=It({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.formatDates(),this.groupDomain=this.getGroupDomain(),this.innerDomain=this.getInnerDomain(),this.valueDomain=this.getValueDomain(),this.xScale=this.getXScale(),this.yScale=this.getYScale(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")"},i.prototype.getGroupDomain=function(){var t,e,i=[];try{for(var n=k(this.results),a=n.next();!a.done;a=n.next()){var o=a.value;i.includes(o.label)||i.push(o.label)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return i},i.prototype.getInnerDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.label)||a.push(h.label)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getValueDomain=function(){return[0,100]},i.prototype.getXScale=function(){var t=this.groupDomain.length/(this.dims.width/this.barPadding+1);return c.scaleBand().rangeRound([0,this.dims.width]).paddingInner(t).domain(this.groupDomain)},i.prototype.getYScale=function(){var t=c.scaleLinear().range([this.dims.height,0]).domain(this.valueDomain);return this.roundDomains?t.nice():t},i.prototype.groupTransform=function(t){return"translate("+this.xScale(t.name)+", 0)"},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.innerDomain:this.valueDomain,this.colors=new St(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.innerDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.valueDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name);var a=this.results.map((function(t){return t.series})).flat().filter((function(t){return i?t.label===n.name:t.name===n.name&&t.series===n.series}));this.activeEntries=A(a),this.activate.emit({value:n,entries:this.activeEntries})},i.prototype.onDeactivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name),this.activeEntries=this.activeEntries.filter((function(t){return i?t.label!==n.name:!(t.name===n.name&&t.series===n.series)})),this.deactivate.emit({value:n,entries:this.activeEntries})},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"barPadding",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-bar-vertical-normalized",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelActivate)="onActivate($event, undefined, true)"\n (legendLabelDeactivate)="onDeactivate($event, undefined, true)"\n (legendLabelClick)="onClick($event)"\n >\n <svg:g [attr.transform]="transform" class="bar-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g\n *ngFor="let group of results; trackBy: trackBy"\n [@animationState]="\'active\'"\n [attr.transform]="groupTransform(group)"\n >\n <svg:g\n ngx-charts-series-vertical\n type="normalized"\n [xScale]="xScale"\n [yScale]="yScale"\n [activeEntries]="activeEntries"\n [colors]="colors"\n [series]="group.series"\n [dims]="dims"\n [gradient]="gradient"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [seriesName]="group.name"\n [animations]="animations"\n [noBarWhenZero]="noBarWhenZero"\n (select)="onClick($event, group)"\n (activate)="onActivate($event, group)"\n (deactivate)="onDeactivate($event, group)"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1,transform:"*"}),n.animate(500,n.style({opacity:0,transform:"scale(0)"}))])])],styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(z),Zt=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.tooltipDisabled=!1,i.showGridLines=!0,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.barPadding=8,i.roundDomains=!1,i.showDataLabel=!1,i.noBarWhenZero=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.dataLabelMaxHeight={negative:0,positive:0},i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.showDataLabel||(this.dataLabelMaxHeight={negative:0,positive:0}),this.margin=[10+this.dataLabelMaxHeight.positive,20,10+this.dataLabelMaxHeight.negative,20],this.dims=It({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.showDataLabel&&(this.dims.height-=this.dataLabelMaxHeight.negative),this.formatDates(),this.groupDomain=this.getGroupDomain(),this.innerDomain=this.getInnerDomain(),this.valueDomain=this.getValueDomain(),this.xScale=this.getXScale(),this.yScale=this.getYScale(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+(this.margin[0]+this.dataLabelMaxHeight.negative)+")"},i.prototype.getGroupDomain=function(){var t,e,i=[];try{for(var n=k(this.results),a=n.next();!a.done;a=n.next()){var o=a.value;i.includes(o.label)||i.push(o.label)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return i},i.prototype.getInnerDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.label)||a.push(h.label)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getValueDomain=function(){var t,e,i,n,a=[],o=0,s=0;try{for(var r=k(this.results),l=r.next();!l.done;l=r.next()){var c=l.value,h=0,p=0;try{for(var d=(i=void 0,k(c.series)),g=d.next();!g.done;g=d.next()){var u=g.value;u.value<0?h+=u.value:p+=u.value,o=u.value<o?u.value:o,s=u.value>s?u.value:s}}catch(t){i={error:t}}finally{try{g&&!g.done&&(n=d.return)&&n.call(d)}finally{if(i)throw i.error}}a.push(h),a.push(p)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return a.push(o),a.push(s),[Math.min.apply(Math,A([0],a)),this.yScaleMax?Math.max.apply(Math,A([this.yScaleMax],a)):Math.max.apply(Math,A(a))]},i.prototype.getXScale=function(){var t=this.groupDomain.length/(this.dims.width/this.barPadding+1);return c.scaleBand().rangeRound([0,this.dims.width]).paddingInner(t).domain(this.groupDomain)},i.prototype.getYScale=function(){var t=c.scaleLinear().range([this.dims.height,0]).domain(this.valueDomain);return this.roundDomains?t.nice():t},i.prototype.onDataLabelMaxHeightChanged=function(t,e){var i=this;t.size.negative?this.dataLabelMaxHeight.negative=Math.max(this.dataLabelMaxHeight.negative,t.size.height):this.dataLabelMaxHeight.positive=Math.max(this.dataLabelMaxHeight.positive,t.size.height),e===this.results.length-1&&setTimeout((function(){return i.update()}))},i.prototype.groupTransform=function(t){return"translate("+(this.xScale(t.name)||0)+", 0)"},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.innerDomain:this.valueDomain,this.colors=new St(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.innerDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.valueDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name);var a=this.results.map((function(t){return t.series})).flat().filter((function(t){return i?t.label===n.name:t.name===n.name&&t.series===n.series}));this.activeEntries=A(a),this.activate.emit({value:n,entries:this.activeEntries})},i.prototype.onDeactivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name),this.activeEntries=this.activeEntries.filter((function(t){return i?t.label!==n.name:!(t.name===n.name&&t.series===n.series)})),this.deactivate.emit({value:n,entries:this.activeEntries})},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"barPadding",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"yScaleMax",void 0),T([e.Input()],i.prototype,"showDataLabel",void 0),T([e.Input()],i.prototype,"dataLabelFormatting",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-bar-vertical-stacked",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelActivate)="onActivate($event, undefined, true)"\n (legendLabelDeactivate)="onDeactivate($event, undefined, true)"\n (legendLabelClick)="onClick($event)"\n >\n <svg:g [attr.transform]="transform" class="bar-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n [xAxisOffset]="dataLabelMaxHeight.negative"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g\n *ngFor="let group of results; let index = index; trackBy: trackBy"\n [@animationState]="\'active\'"\n [attr.transform]="groupTransform(group)"\n >\n <svg:g\n ngx-charts-series-vertical\n type="stacked"\n [xScale]="xScale"\n [yScale]="yScale"\n [activeEntries]="activeEntries"\n [colors]="colors"\n [series]="group.series"\n [dims]="dims"\n [gradient]="gradient"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [showDataLabel]="showDataLabel"\n [dataLabelFormatting]="dataLabelFormatting"\n [seriesName]="group.name"\n [animations]="animations"\n [noBarWhenZero]="noBarWhenZero"\n (select)="onClick($event, group)"\n (activate)="onActivate($event, group)"\n (deactivate)="onDeactivate($event, group)"\n (dataLabelHeightChanged)="onDataLabelMaxHeightChanged($event, index)"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1,transform:"*"}),n.animate(500,n.style({opacity:0,transform:"scale(0)"}))])])],styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(z);(Yt=t.D0Types||(t.D0Types={})).positive="positive",Yt.negative="negative";var _t=function(){function i(){this.type="standard",this.tooltipDisabled=!1,this.animations=!0,this.showDataLabel=!1,this.noBarWhenZero=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.dataLabelHeightChanged=new e.EventEmitter,this.barsForDataLabels=[]}return i.prototype.ngOnChanges=function(t){this.update()},i.prototype.update=function(){var e,i,n=this;this.updateTooltipSettings(),this.series.length&&(i=this.xScale.bandwidth()),i=Math.round(i);var a,o=Math.max(this.yScale.domain()[0],0),s=((e={})[t.D0Types.positive]=0,e[t.D0Types.negative]=0,e),r=t.D0Types.positive;"normalized"===this.type&&(a=this.series.map((function(t){return t.value})).reduce((function(t,e){return t+e}),0)),this.bars=this.series.map((function(e,l){var c=e.value,h=n.getLabel(e),p=K(h),d=n.roundEdges;r=c>0?t.D0Types.positive:t.D0Types.negative;var g={value:c,label:h,roundEdges:d,data:e,width:i,formattedLabel:p,height:0,x:0,y:0};if("standard"===n.type)g.height=Math.abs(n.yScale(c)-n.yScale(o)),g.x=n.xScale(h),g.y=c<0?n.yScale(0):n.yScale(c);else if("stacked"===n.type){var u=(v=s[r])+c;s[r]+=c,g.height=n.yScale(v)-n.yScale(u),g.x=0,g.y=n.yScale(u),g.offset0=v,g.offset1=u}else if("normalized"===n.type){var v;u=(v=s[r])+c;s[r]+=c,a>0?(v=100*v/a,u=100*u/a):(v=0,u=0),g.height=n.yScale(v)-n.yScale(u),g.x=0,g.y=n.yScale(u),g.offset0=v,g.offset1=u,c=(u-v).toFixed(2)+"%"}"ordinal"===n.colors.scaleType?g.color=n.colors.getColor(h):"standard"===n.type?(g.color=n.colors.getColor(c),g.gradientStops=n.colors.getLinearGradientStops(c)):(g.color=n.colors.getColor(g.offset1),g.gradientStops=n.colors.getLinearGradientStops(g.offset1,g.offset0));var m=p;return g.ariaLabel=p+" "+c.toLocaleString(),n.seriesName&&(m=n.seriesName+" • "+p,g.data.series=n.seriesName,g.ariaLabel=n.seriesName+" "+g.ariaLabel),g.tooltipText=n.tooltipDisabled?void 0:'\n <span class="tooltip-label">'+tt(m)+'</span>\n <span class="tooltip-val">'+c.toLocaleString()+"</span>\n ",g})),this.updateDataLabels()},i.prototype.updateDataLabels=function(){var t=this;if("stacked"===this.type){this.barsForDataLabels=[];var e={};e.series=this.seriesName;var i=this.series.map((function(t){return t.value})).reduce((function(t,e){return e>0?t+e:t}),0),n=this.series.map((function(t){return t.value})).reduce((function(t,e){return e<0?t+e:t}),0);e.total=i+n,e.x=0,e.y=0,e.total>0?e.height=this.yScale(i):e.height=this.yScale(n),e.width=this.xScale.bandwidth(),this.barsForDataLabels.push(e)}else this.barsForDataLabels=this.series.map((function(e){var i={};return i.series=t.seriesName?t.seriesName:e.label,i.total=e.value,i.x=t.xScale(e.label),i.y=t.yScale(0),i.height=t.yScale(i.total)-t.yScale(0),i.width=t.xScale.bandwidth(),i}))},i.prototype.updateTooltipSettings=function(){this.tooltipPlacement=this.tooltipDisabled?void 0:"top",this.tooltipType=this.tooltipDisabled?void 0:"tooltip"},i.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.name===e.name&&t.series===e.series}))},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.getLabel=function(t){return t.label?t.label:t.name},i.prototype.trackBy=function(t,e){return e.label},i.prototype.trackDataLabelBy=function(t,e){return t+"#"+e.series+"#"+e.total},T([e.Input()],i.prototype,"dims",void 0),T([e.Input()],i.prototype,"type",void 0),T([e.Input()],i.prototype,"series",void 0),T([e.Input()],i.prototype,"xScale",void 0),T([e.Input()],i.prototype,"yScale",void 0),T([e.Input()],i.prototype,"colors",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"seriesName",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"tooltipTemplate",void 0),T([e.Input()],i.prototype,"roundEdges",void 0),T([e.Input()],i.prototype,"animations",void 0),T([e.Input()],i.prototype,"showDataLabel",void 0),T([e.Input()],i.prototype,"dataLabelFormatting",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"select",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.Output()],i.prototype,"dataLabelHeightChanged",void 0),i=T([e.Component({selector:"g[ngx-charts-series-vertical]",template:'\n <svg:g\n ngx-charts-bar\n *ngFor="let bar of bars; trackBy: trackBy"\n [@animationState]="\'active\'"\n [@.disabled]="!animations"\n [width]="bar.width"\n [height]="bar.height"\n [x]="bar.x"\n [y]="bar.y"\n [fill]="bar.color"\n [stops]="bar.gradientStops"\n [data]="bar.data"\n [orientation]="\'vertical\'"\n [roundEdges]="bar.roundEdges"\n [gradient]="gradient"\n [ariaLabel]="bar.ariaLabel"\n [isActive]="isActive(bar.data)"\n (select)="onClick($event)"\n (activate)="activate.emit($event)"\n (deactivate)="deactivate.emit($event)"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="tooltipPlacement"\n [tooltipType]="tooltipType"\n [tooltipTitle]="tooltipTemplate ? undefined : bar.tooltipText"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="bar.data"\n [noBarWhenZero]="noBarWhenZero"\n [animations]="animations"\n ></svg:g>\n <svg:g *ngIf="showDataLabel">\n <svg:g\n ngx-charts-bar-label\n *ngFor="let b of barsForDataLabels; let i = index; trackBy: trackDataLabelBy"\n [barX]="b.x"\n [barY]="b.y"\n [barWidth]="b.width"\n [barHeight]="b.height"\n [value]="b.total"\n [valueFormatting]="dataLabelFormatting"\n [orientation]="\'vertical\'"\n (dimensionsChanged)="dataLabelHeightChanged.emit({ size: $event, index: i })"\n />\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1}),n.animate(500,n.style({opacity:0}))])])]})],i)}(),qt=function(){function i(){this.barsForDataLabels=[],this.type="standard",this.tooltipDisabled=!1,this.animations=!0,this.showDataLabel=!1,this.noBarWhenZero=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.dataLabelWidthChanged=new e.EventEmitter}return i.prototype.ngOnChanges=function(t){this.update()},i.prototype.update=function(){var e,i=this;this.updateTooltipSettings();var n,a,o=((e={})[t.D0Types.positive]=0,e[t.D0Types.negative]=0,e);n=t.D0Types.positive,"normalized"===this.type&&(a=this.series.map((function(t){return t.value})).reduce((function(t,e){return t+e}),0));var s=Math.max(this.xScale.domain()[0],0);this.bars=this.series.map((function(e,r){var l=e.value,c=i.getLabel(e),h=K(c),p=i.roundEdges;n=l>0?t.D0Types.positive:t.D0Types.negative;var d={value:l,label:c,roundEdges:p,data:e,formattedLabel:h};if(d.height=i.yScale.bandwidth(),"standard"===i.type)d.width=Math.abs(i.xScale(l)-i.xScale(s)),d.x=l<0?i.xScale(l):i.xScale(s),d.y=i.yScale(c);else if("stacked"===i.type){var g=(u=o[n])+l;o[n]+=l,d.width=i.xScale(g)-i.xScale(u),d.x=i.xScale(u),d.y=0,d.offset0=u,d.offset1=g}else if("normalized"===i.type){var u;g=(u=o[n])+l;o[n]+=l,a>0?(u=100*u/a,g=100*g/a):(u=0,g=0),d.width=i.xScale(g)-i.xScale(u),d.x=i.xScale(u),d.y=0,d.offset0=u,d.offset1=g,l=(g-u).toFixed(2)+"%"}"ordinal"===i.colors.scaleType?d.color=i.colors.getColor(c):"standard"===i.type?(d.color=i.colors.getColor(l),d.gradientStops=i.colors.getLinearGradientStops(l)):(d.color=i.colors.getColor(d.offset1),d.gradientStops=i.colors.getLinearGradientStops(d.offset1,d.offset0));var v=h;return d.ariaLabel=h+" "+l.toLocaleString(),i.seriesName&&(v=i.seriesName+" • "+h,d.data.series=i.seriesName,d.ariaLabel=i.seriesName+" "+d.ariaLabel),d.tooltipText=i.tooltipDisabled?void 0:'\n <span class="tooltip-label">'+tt(v)+'</span>\n <span class="tooltip-val">'+l.toLocaleString()+"</span>\n ",d})),this.updateDataLabels()},i.prototype.updateDataLabels=function(){var t=this;if("stacked"===this.type){this.barsForDataLabels=[];var e={};e.series=this.seriesName;var i=this.series.map((function(t){return t.value})).reduce((function(t,e){return e>0?t+e:t}),0),n=this.series.map((function(t){return t.value})).reduce((function(t,e){return e<0?t+e:t}),0);e.total=i+n,e.x=0,e.y=0,e.total>0?e.width=this.xScale(i):e.width=this.xScale(n),e.height=this.yScale.bandwidth(),this.barsForDataLabels.push(e)}else this.barsForDataLabels=this.series.map((function(e){var i={};return i.series=t.seriesName?t.seriesName:e.label,i.total=e.value,i.x=t.xScale(0),i.y=t.yScale(e.label),i.width=t.xScale(i.total)-t.xScale(0),i.height=t.yScale.bandwidth(),i}))},i.prototype.updateTooltipSettings=function(){this.tooltipPlacement=this.tooltipDisabled?void 0:"top",this.tooltipType=this.tooltipDisabled?void 0:"tooltip"},i.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.name===e.name&&t.series===e.series}))},i.prototype.getLabel=function(t){return t.label?t.label:t.name},i.prototype.trackBy=function(t,e){return e.label},i.prototype.trackDataLabelBy=function(t,e){return t+"#"+e.series+"#"+e.total},i.prototype.click=function(t){this.select.emit(t)},T([e.Input()],i.prototype,"dims",void 0),T([e.Input()],i.prototype,"type",void 0),T([e.Input()],i.prototype,"series",void 0),T([e.Input()],i.prototype,"xScale",void 0),T([e.Input()],i.prototype,"yScale",void 0),T([e.Input()],i.prototype,"colors",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"seriesName",void 0),T([e.Input()],i.prototype,"tooltipTemplate",void 0),T([e.Input()],i.prototype,"roundEdges",void 0),T([e.Input()],i.prototype,"animations",void 0),T([e.Input()],i.prototype,"showDataLabel",void 0),T([e.Input()],i.prototype,"dataLabelFormatting",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"select",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.Output()],i.prototype,"dataLabelWidthChanged",void 0),i=T([e.Component({selector:"g[ngx-charts-series-horizontal]",template:'\n <svg:g\n ngx-charts-bar\n *ngFor="let bar of bars; trackBy: trackBy"\n [@animationState]="\'active\'"\n [width]="bar.width"\n [height]="bar.height"\n [x]="bar.x"\n [y]="bar.y"\n [fill]="bar.color"\n [stops]="bar.gradientStops"\n [data]="bar.data"\n [orientation]="\'horizontal\'"\n [roundEdges]="bar.roundEdges"\n (select)="click($event)"\n [gradient]="gradient"\n [isActive]="isActive(bar.data)"\n [ariaLabel]="bar.ariaLabel"\n [animations]="animations"\n (activate)="activate.emit($event)"\n (deactivate)="deactivate.emit($event)"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="tooltipPlacement"\n [tooltipType]="tooltipType"\n [tooltipTitle]="tooltipTemplate ? undefined : bar.tooltipText"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="bar.data"\n [noBarWhenZero]="noBarWhenZero"\n ></svg:g>\n <svg:g *ngIf="showDataLabel">\n <svg:g\n ngx-charts-bar-label\n *ngFor="let b of barsForDataLabels; let i = index; trackBy: trackDataLabelBy"\n [barX]="b.x"\n [barY]="b.y"\n [barWidth]="b.width"\n [barHeight]="b.height"\n [value]="b.total"\n [valueFormatting]="dataLabelFormatting"\n [orientation]="\'horizontal\'"\n (dimensionsChanged)="dataLabelWidthChanged.emit({ size: $event, index: i })"\n />\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1}),n.animate(500,n.style({opacity:0}))])])]})],i)}(),Ut=function(){function t(t){this.dimensionsChanged=new e.EventEmitter,this.horizontalPadding=2,this.verticalPadding=5,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.getSize=function(){return{height:this.element.getBoundingClientRect().height,width:this.element.getBoundingClientRect().width,negative:this.value<0}},t.prototype.ngAfterViewInit=function(){this.dimensionsChanged.emit(this.getSize())},t.prototype.update=function(){this.valueFormatting?this.formatedValue=this.valueFormatting(this.value):this.formatedValue=K(this.value),"horizontal"===this.orientation?(this.x=this.barX+this.barWidth,this.value<0?(this.x=this.x-this.horizontalPadding,this.textAnchor="end"):(this.x=this.x+this.horizontalPadding,this.textAnchor="start"),this.y=this.barY+this.barHeight/2):(this.x=this.barX+this.barWidth/2,this.y=this.barY+this.barHeight,this.value<0?(this.y=this.y+this.verticalPadding,this.textAnchor="end"):(this.y=this.y-this.verticalPadding,this.textAnchor="start"),this.transform="rotate(-45, "+this.x+" , "+this.y+")")},t.ctorParameters=function(){return[{type:e.ElementRef}]},T([e.Input()],t.prototype,"value",void 0),T([e.Input()],t.prototype,"valueFormatting",void 0),T([e.Input()],t.prototype,"barX",void 0),T([e.Input()],t.prototype,"barY",void 0),T([e.Input()],t.prototype,"barWidth",void 0),T([e.Input()],t.prototype,"barHeight",void 0),T([e.Input()],t.prototype,"orientation",void 0),T([e.Output()],t.prototype,"dimensionsChanged",void 0),t=T([e.Component({selector:"g[ngx-charts-bar-label]",template:'\n <svg:text\n class="textDataLabel"\n alignment-baseline="middle"\n [attr.text-anchor]="textAnchor"\n [attr.transform]="transform"\n [attr.x]="x"\n [attr.y]="y"\n >\n {{ formatedValue }}\n </svg:text>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".textDataLabel{font-size:11px}"]})],t)}(),Jt=function(){function t(){}return t=T([e.NgModule({imports:[At],declarations:[Ht,Wt,Bt,Vt,Gt,$t,Nt,jt,Zt,Ut,qt,_t],exports:[Ht,Wt,Bt,Vt,Gt,$t,Nt,jt,Zt,Ut,qt,_t]})],t)}();function Qt(t,e,i,n,a){var o=[];("linear"===e&&(t=t.map((function(t){return Number(t)})),i||t.push(0)),"time"===e||"linear"===e)?o=[n||Math.min.apply(Math,A(t)),a||Math.max.apply(Math,A(t))]:o=t;return o}function Kt(t,e,i,n){var a;return"time"===i?a=c.scaleTime().range(e).domain(t):"linear"===i?(a=c.scaleLinear().range(e).domain(t),n&&(a=a.nice())):"ordinal"===i&&(a=c.scalePoint().range([e[0],e[1]]).domain(t)),a}var te=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.showGridLines=!0,i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.xAxis=!0,i.yAxis=!0,i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.roundDomains=!1,i.maxRadius=10,i.minRadius=3,i.schemeType="ordinal",i.tooltipDisabled=!1,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.scaleType="linear",i.margin=[10,20,10,20],i.bubblePadding=[0,0,0,0],i.xAxisHeight=0,i.yAxisWidth=0,i.activeEntries=[],i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.dims=It({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.seriesDomain=this.results.map((function(t){return t.name})),this.rDomain=this.getRDomain(),this.xDomain=this.getXDomain(),this.yDomain=this.getYDomain(),this.transform="translate("+this.dims.xOffset+","+this.margin[0]+")";var e="ordinal"===this.schemeType?this.seriesDomain:this.rDomain;this.colors=new St(this.scheme,this.schemeType,e,this.customColors),this.data=this.results,this.minRadius=Math.max(this.minRadius,1),this.maxRadius=Math.max(this.maxRadius,1),this.rScale=this.getRScale(this.rDomain,[this.minRadius,this.maxRadius]),this.bubblePadding=[0,0,0,0],this.setScales(),this.bubblePadding=this.getBubblePadding(),this.setScales(),this.legendOptions=this.getLegendOptions(),this.clipPathId="clip"+it().toString(),this.clipPath="url(#"+this.clipPathId+")"},i.prototype.hideCircles=function(){this.deactivateAll()},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.getBubblePadding=function(){var t,e,i,n,a=0,o=0,s=this.dims.height,r=this.dims.width;try{for(var l=k(this.data),c=l.next();!c.done;c=l.next()){var h=c.value;try{for(var p=(i=void 0,k(h.series)),d=p.next();!d.done;d=p.next()){var g=d.value,u=this.rScale(g.r),v="linear"===this.xScaleType?this.xScale(Number(g.x)):this.xScale(g.x),m="linear"===this.yScaleType?this.yScale(Number(g.y)):this.yScale(g.y);o=Math.max(u-v,o),a=Math.max(u-m,a),s=Math.max(m+u,s),r=Math.max(v+u,r)}}catch(t){i={error:t}}finally{try{d&&!d.done&&(n=p.return)&&n.call(p)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=l.return)&&e.call(l)}finally{if(t)throw t.error}}return[a,r=Math.max(r-this.dims.width,0),s=Math.max(s-this.dims.height,0),o]},i.prototype.setScales=function(){var t=this.dims.width;void 0===this.xScaleMin&&void 0===this.xScaleMax&&(t-=this.bubblePadding[1]);var e=this.dims.height;void 0===this.yScaleMin&&void 0===this.yScaleMax&&(e-=this.bubblePadding[2]),this.xScale=this.getXScale(this.xDomain,t),this.yScale=this.getYScale(this.yDomain,e)},i.prototype.getYScale=function(t,e){return Kt(t,[e,this.bubblePadding[0]],this.yScaleType,this.roundDomains)},i.prototype.getXScale=function(t,e){return Kt(t,[this.bubblePadding[3],e],this.xScaleType,this.roundDomains)},i.prototype.getRScale=function(t,e){var i=c.scaleLinear().range(e).domain(t);return this.roundDomains?i.nice():i},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],position:this.legendPosition,title:void 0};return"ordinal"===t.scaleType?(t.domain=this.seriesDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.rDomain,t.colors=this.colors.scale),t},i.prototype.getXDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.x)||a.push(h.x)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return this.xScaleType=Ct(a),Qt(a,this.xScaleType,this.autoScale,this.xScaleMin,this.xScaleMax)},i.prototype.getYDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.y)||a.push(h.y)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return this.yScaleType=Ct(a),Qt(a,this.yScaleType,this.autoScale,this.yScaleMin,this.yScaleMax)},i.prototype.getRDomain=function(){var t,e,i,n,a=1/0,o=-1/0;try{for(var s=k(this.results),r=s.next();!r.done;r=s.next()){var l=r.value;try{for(var c=(i=void 0,k(l.series)),h=c.next();!h.done;h=c.next()){var p=h.value,d=Number(p.r)||1;a=Math.min(a,d),o=Math.max(o,d)}}catch(t){i={error:t}}finally{try{h&&!h.done&&(n=c.return)&&n.call(c)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}return[a,o]},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t){this.activeEntries.findIndex((function(e){return e.name===t.name}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t){var e=this.activeEntries.findIndex((function(e){return e.name===t.name}));this.activeEntries.splice(e,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},i.prototype.deactivateAll=function(){var t,e;this.activeEntries=A(this.activeEntries);try{for(var i=k(this.activeEntries),n=i.next();!n.done;n=i.next()){var a=n.value;this.deactivate.emit({value:a,entries:[]})}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.activeEntries=[]},i.prototype.trackBy=function(t,e){return e.name},T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"maxRadius",void 0),T([e.Input()],i.prototype,"minRadius",void 0),T([e.Input()],i.prototype,"autoScale",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"xScaleMin",void 0),T([e.Input()],i.prototype,"xScaleMax",void 0),T([e.Input()],i.prototype,"yScaleMin",void 0),T([e.Input()],i.prototype,"yScaleMax",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),T([e.HostListener("mouseleave")],i.prototype,"hideCircles",null),i=T([e.Component({selector:"ngx-charts-bubble-chart",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [activeEntries]="activeEntries"\n [legendOptions]="legendOptions"\n [animations]="animations"\n (legendLabelClick)="onClick($event)"\n (legendLabelActivate)="onActivate($event)"\n (legendLabelDeactivate)="onDeactivate($event)"\n >\n <svg:defs>\n <svg:clipPath [attr.id]="clipPathId">\n <svg:rect\n [attr.width]="dims.width + 10"\n [attr.height]="dims.height + 10"\n [attr.transform]="\'translate(-5, -5)\'"\n />\n </svg:clipPath>\n </svg:defs>\n <svg:g [attr.transform]="transform" class="bubble-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [showGridLines]="showGridLines"\n [dims]="dims"\n [xScale]="xScale"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n />\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [showGridLines]="showGridLines"\n [yScale]="yScale"\n [dims]="dims"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n />\n <svg:rect\n class="bubble-chart-area"\n x="0"\n y="0"\n [attr.width]="dims.width"\n [attr.height]="dims.height"\n style="fill: rgb(255, 0, 0); opacity: 0; cursor: \'auto\';"\n (mouseenter)="deactivateAll()"\n />\n <svg:g [attr.clip-path]="clipPath">\n <svg:g *ngFor="let series of data; trackBy: trackBy" [@animationState]="\'active\'">\n <svg:g\n ngx-charts-bubble-series\n [xScale]="xScale"\n [yScale]="yScale"\n [rScale]="rScale"\n [xScaleType]="xScaleType"\n [yScaleType]="yScaleType"\n [xAxisLabel]="xAxisLabel"\n [yAxisLabel]="yAxisLabel"\n [colors]="colors"\n [data]="series"\n [activeEntries]="activeEntries"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n (select)="onClick($event, series)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1}),n.animate(500,n.style({opacity:0}))])])],styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(z),ee=function(){function t(){this.tooltipDisabled=!1,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.circles=this.getCircles()},t.prototype.getCircles=function(){var t=this,e=this.data.name;return this.data.series.map((function(i,n){if(void 0!==i.y&&void 0!==i.x){var a=i.y,o=i.x,s=i.r,r=t.rScale(s||1),l=K(i.name),c="linear"===t.xScaleType?t.xScale(Number(o)):t.xScale(o),h="linear"===t.yScaleType?t.yScale(Number(a)):t.yScale(a),p="linear"===t.colors.scaleType?t.colors.getColor(s):t.colors.getColor(e),d=!t.activeEntries.length||t.isActive({name:e}),g=d?1:.3;return{data:Object.assign({},i,{series:e,name:i.name,value:i.y,x:i.x,radius:i.r}),x:o,y:a,r:s,classNames:["circle-data-"+n],value:a,label:o,cx:c,cy:h,radius:r,tooltipLabel:l,color:p,opacity:g,seriesName:e,isActive:d,transform:"translate("+c+","+h+")"}}})).filter((function(t){return void 0!==t}))},t.prototype.getTooltipText=function(t){var e=void 0!==t.r,i=t.tooltipLabel&&t.tooltipLabel.length,n=t.seriesName&&t.seriesName.length,a=e?K(t.r):"",o=this.xAxisLabel&&""!==this.xAxisLabel?this.xAxisLabel+":":"",s=this.yAxisLabel&&""!==this.yAxisLabel?this.yAxisLabel+":":"",r=K(t.x),l=K(t.y),c=n&&i?t.seriesName+" • "+t.tooltipLabel:t.seriesName+t.tooltipLabel;return"\n "+(n||i?'<span class="tooltip-label">'+tt(c)+"</span>":"")+'\n <span class="tooltip-label">\n <label>'+tt(o)+"</label> "+tt(r)+"<br />\n <label>"+tt(s)+"</label> "+tt(l)+'\n </span>\n <span class="tooltip-val">\n '+tt(a)+"\n </span>\n "},t.prototype.onClick=function(t){this.select.emit(t)},t.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.name===e.name}))},t.prototype.isVisible=function(t){return this.activeEntries.length>0?this.isActive({name:t.seriesName}):0!==t.opacity},t.prototype.activateCircle=function(t){t.barVisible=!0,this.activate.emit({name:this.data.name})},t.prototype.deactivateCircle=function(t){t.barVisible=!1,this.deactivate.emit({name:this.data.name})},t.prototype.trackBy=function(t,e){return e.data.series+" "+e.data.name},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"xScale",void 0),T([e.Input()],t.prototype,"yScale",void 0),T([e.Input()],t.prototype,"rScale",void 0),T([e.Input()],t.prototype,"xScaleType",void 0),T([e.Input()],t.prototype,"yScaleType",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"visibleValue",void 0),T([e.Input()],t.prototype,"activeEntries",void 0),T([e.Input()],t.prototype,"xAxisLabel",void 0),T([e.Input()],t.prototype,"yAxisLabel",void 0),T([e.Input()],t.prototype,"tooltipDisabled",void 0),T([e.Input()],t.prototype,"tooltipTemplate",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),t=T([e.Component({selector:"g[ngx-charts-bubble-series]",template:'\n <svg:g *ngFor="let circle of circles; trackBy: trackBy">\n <svg:g [attr.transform]="circle.transform">\n <svg:g\n ngx-charts-circle\n [@animationState]="\'active\'"\n class="circle"\n [cx]="0"\n [cy]="0"\n [r]="circle.radius"\n [fill]="circle.color"\n [style.opacity]="circle.opacity"\n [class.active]="circle.isActive"\n [pointerEvents]="\'all\'"\n [data]="circle.value"\n [classNames]="circle.classNames"\n (select)="onClick(circle.data)"\n (activate)="activateCircle(circle)"\n (deactivate)="deactivateCircle(circle)"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="\'top\'"\n [tooltipType]="\'tooltip\'"\n [tooltipTitle]="tooltipTemplate ? undefined : getTooltipText(circle)"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="circle.data"\n />\n </svg:g>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":enter",[n.style({opacity:0,transform:"scale(0)"}),n.animate(250,n.style({opacity:1,transform:"scale(1)"}))])])]})],t)}(),ie=function(){function t(){}return t=T([e.NgModule({imports:[At],declarations:[te,ee],exports:[te,ee]})],t)}(),ne=function(){function t(t){this.gradient=!1,this.animations=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(t){this.transform="translate("+this.x+" , "+this.y+")",this.startOpacity=.3,this.gradientId="grad"+it().toString(),this.gradientUrl="url(#"+this.gradientId+")",this.gradientStops=this.getGradientStops(),this.animations&&this.loadAnimation()},t.prototype.getGradientStops=function(){return[{offset:0,color:this.fill,opacity:this.startOpacity},{offset:100,color:this.fill,opacity:1}]},t.prototype.loadAnimation=function(){r.select(this.element).select(".cell").attr("opacity",0),this.animateToCurrentForm()},t.prototype.animateToCurrentForm=function(){r.select(this.element).select(".cell").transition().duration(750).attr("opacity",1)},t.prototype.onClick=function(){this.select.emit(this.data)},t.prototype.onMouseEnter=function(){this.activate.emit(this.data)},t.prototype.onMouseLeave=function(){this.deactivate.emit(this.data)},t.ctorParameters=function(){return[{type:e.ElementRef}]},T([e.Input()],t.prototype,"fill",void 0),T([e.Input()],t.prototype,"x",void 0),T([e.Input()],t.prototype,"y",void 0),T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"height",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"label",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),T([e.HostListener("mouseenter")],t.prototype,"onMouseEnter",null),T([e.HostListener("mouseleave")],t.prototype,"onMouseLeave",null),t=T([e.Component({selector:"g[ngx-charts-heat-map-cell]",template:'\n <svg:g [attr.transform]="transform" class="cell">\n <defs *ngIf="gradient">\n <svg:g ngx-charts-svg-linear-gradient orientation="vertical" [name]="gradientId" [stops]="gradientStops" />\n </defs>\n <svg:rect\n [attr.fill]="gradient ? gradientUrl : fill"\n rx="3"\n [attr.width]="width"\n [attr.height]="height"\n class="cell"\n style="cursor: pointer"\n (click)="onClick()"\n />\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),ae=function(){function t(){this.tooltipDisabled=!1,this.animations=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter}return t.prototype.ngOnInit=function(){this.tooltipText||(this.tooltipText=this.getTooltipText)},t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.cells=this.getCells()},t.prototype.getCells=function(){var t=this,e=[];return this.data.map((function(i){i.series.map((function(n){var a=n.value;n.series=i.name,e.push({row:i,cell:n,x:t.xScale(i.name),y:t.yScale(n.name),width:t.xScale.bandwidth(),height:t.yScale.bandwidth(),fill:t.colors.getColor(a),data:a,label:K(n.name),series:i.name})}))})),e},t.prototype.getTooltipText=function(t){var e=t.label,i=t.data;return'\n <span class="tooltip-label">'+tt(t.series)+" • "+tt(e)+'</span>\n <span class="tooltip-val">'+i.toLocaleString()+"</span>\n "},t.prototype.trackBy=function(t,e){return e.tooltipText},t.prototype.onClick=function(t){this.select.emit(t)},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"xScale",void 0),T([e.Input()],t.prototype,"yScale",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"tooltipDisabled",void 0),T([e.Input()],t.prototype,"tooltipText",void 0),T([e.Input()],t.prototype,"tooltipTemplate",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),t=T([e.Component({selector:"g[ngx-charts-heat-map-cell-series]",template:'\n <svg:g\n ngx-charts-heat-map-cell\n *ngFor="let c of cells; trackBy: trackBy"\n [x]="c.x"\n [y]="c.y"\n [width]="c.width"\n [height]="c.height"\n [fill]="c.fill"\n [data]="c.data"\n (select)="onClick(c.cell)"\n (activate)="activate.emit(c.cell)"\n (deactivate)="deactivate.emit(c.cell)"\n [gradient]="gradient"\n [animations]="animations"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="\'top\'"\n [tooltipType]="\'tooltip\'"\n [tooltipTitle]="tooltipTemplate ? undefined : tooltipText(c)"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="{ series: c.series, name: c.label, value: c.data }"\n ></svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),oe=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legendTitle="Legend",i.legendPosition="right",i.innerPadding=8,i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.tooltipDisabled=!1,i.activeEntries=[],i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.scaleType="linear",i}return f(i,t),i.prototype.update=function(){if(t.prototype.update.call(this),this.formatDates(),this.xDomain=this.getXDomain(),this.yDomain=this.getYDomain(),this.valueDomain=this.getValueDomain(),this.scaleType=Ct(this.valueDomain,!1),this.dims=It({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.scaleType,legendPosition:this.legendPosition}),"linear"===this.scaleType){var e=this.min,i=this.max;this.min||(e=Math.min.apply(Math,A([0],this.valueDomain))),this.max||(i=Math.max.apply(Math,A(this.valueDomain))),this.valueDomain=[e,i]}this.xScale=this.getXScale(),this.yScale=this.getYScale(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")",this.rects=this.getRects()},i.prototype.getXDomain=function(){var t,e,i=[];try{for(var n=k(this.results),a=n.next();!a.done;a=n.next()){var o=a.value;i.includes(o.name)||i.push(o.name)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return i},i.prototype.getYDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.name)||a.push(h.name)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getValueDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.value)||a.push(h.value)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getDimension=function(t,e,i,n){return void 0===e&&(e=0),"string"==typeof t&&(t=t.replace("[","").replace("]","").replace("px","").replace("'","")).includes(",")&&(t=t.split(",")),Array.isArray(t)&&"number"==typeof e?this.getDimension(t[e],null,i,n):"string"==typeof t&&t.includes("%")?+t.replace("%","")/100:i/(n/+t+1)},i.prototype.getXScale=function(){var t=this.getDimension(this.innerPadding,0,this.xDomain.length,this.dims.width);return c.scaleBand().rangeRound([0,this.dims.width]).domain(this.xDomain).paddingInner(t)},i.prototype.getYScale=function(){var t=this.getDimension(this.innerPadding,1,this.yDomain.length,this.dims.height);return c.scaleBand().rangeRound([this.dims.height,0]).domain(this.yDomain).paddingInner(t)},i.prototype.getRects=function(){var t=this,e=[];return this.xDomain.map((function(i){t.yDomain.map((function(n){e.push({x:t.xScale(i),y:t.yScale(n),rx:3,width:t.xScale.bandwidth(),height:t.yScale.bandwidth(),fill:"rgba(200,200,200,0.03)"})}))})),e},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.setColors=function(){this.colors=new St(this.scheme,this.scaleType,this.valueDomain)},i.prototype.getLegendOptions=function(){return{scaleType:this.scaleType,domain:this.valueDomain,colors:"ordinal"===this.scaleType?this.colors:this.colors.scale,title:"ordinal"===this.scaleType?this.legendTitle:void 0,position:this.legendPosition}},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name);var a=this.results.map((function(t){return t.series})).flat().filter((function(t){return i?t.label===n.name:t.name===n.name&&t.series===n.series}));this.activeEntries=A(a),this.activate.emit({value:n,entries:this.activeEntries})},i.prototype.onDeactivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name),this.activeEntries=this.activeEntries.filter((function(t){return i?t.label!==n.name:!(t.name===n.name&&t.series===n.series)})),this.deactivate.emit({value:n,entries:this.activeEntries})},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"innerPadding",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"tooltipText",void 0),T([e.Input()],i.prototype,"min",void 0),T([e.Input()],i.prototype,"max",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-heat-map",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [animations]="animations"\n [legendOptions]="legendOptions"\n (legendLabelClick)="onClick($event)"\n >\n <svg:g [attr.transform]="transform" class="heat-map chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:rect\n *ngFor="let rect of rects"\n [attr.x]="rect.x"\n [attr.y]="rect.y"\n [attr.rx]="rect.rx"\n [attr.width]="rect.width"\n [attr.height]="rect.height"\n [attr.fill]="rect.fill"\n />\n <svg:g\n ngx-charts-heat-map-cell-series\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [data]="results"\n [gradient]="gradient"\n [animations]="animations"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipText]="tooltipText"\n (select)="onClick($event)"\n (activate)="onActivate($event, undefined)"\n (deactivate)="onDeactivate($event, undefined)"\n />\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(z),se=function(){function t(){}return t=T([e.NgModule({imports:[At],declarations:[ne,ae,oe],exports:[ne,ae,oe]})],t)}(),re=function(){function t(t){this.element=t,this.fill="none",this.animations=!0,this.select=new e.EventEmitter,this.initialized=!1}return t.prototype.ngOnChanges=function(t){this.initialized?this.updatePathEl():(this.initialized=!0,this.initialPath=this.path)},t.prototype.updatePathEl=function(){var t=r.select(this.element.nativeElement).select(".line");this.animations?t.transition().duration(750).attr("d",this.path):t.attr("d",this.path)},t.ctorParameters=function(){return[{type:e.ElementRef}]},T([e.Input()],t.prototype,"path",void 0),T([e.Input()],t.prototype,"stroke",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"fill",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),t=T([e.Component({selector:"g[ngx-charts-line]",template:'\n <svg:path\n [@animationState]="\'active\'"\n class="line"\n [attr.d]="initialPath"\n [attr.fill]="fill"\n [attr.stroke]="stroke"\n stroke-width="1.5px"\n />\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":enter",[n.style({strokeDasharray:2e3,strokeDashoffset:2e3}),n.animate(1e3,n.style({strokeDashoffset:0}))])])]})],t)}(),le=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legendTitle="Legend",i.legendPosition="right",i.showGridLines=!0,i.curve=p.curveLinear,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.roundDomains=!1,i.tooltipDisabled=!1,i.showRefLines=!1,i.showRefLabels=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.timelineHeight=50,i.timelinePadding=10,i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.dims=It({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.timeline&&(this.dims.height-=this.timelineHeight+this.margin[2]+this.timelinePadding),this.xDomain=this.getXDomain(),this.filteredDomain&&(this.xDomain=this.filteredDomain),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,this.dims.width),this.yScale=this.getYScale(this.yDomain,this.dims.height),this.updateTimeline(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")",this.clipPathId="clip"+it().toString(),this.clipPath="url(#"+this.clipPathId+")"},i.prototype.updateTimeline=function(){this.timeline&&(this.timelineWidth=this.dims.width,this.timelineXDomain=this.getXDomain(),this.timelineXScale=this.getXScale(this.timelineXDomain,this.timelineWidth),this.timelineYScale=this.getYScale(this.yDomain,this.timelineHeight),this.timelineTransform="translate("+this.dims.xOffset+", "+-this.margin[2]+")")},i.prototype.getXDomain=function(){var t=Dt(this.results);this.scaleType=Ct(t);var e,i,n=[];return"linear"===this.scaleType&&(t=t.map((function(t){return Number(t)}))),"time"!==this.scaleType&&"linear"!==this.scaleType||(e=this.xScaleMin?this.xScaleMin:Math.min.apply(Math,A(t)),i=this.xScaleMax?this.xScaleMax:Math.max.apply(Math,A(t))),"time"===this.scaleType?(n=[new Date(e),new Date(i)],this.xSet=A(t).sort((function(t,e){var i=t.getTime(),n=e.getTime();return i>n?1:n>i?-1:0}))):"linear"===this.scaleType?(n=[e,i],this.xSet=A(t).sort((function(t,e){return t-e}))):(n=t,this.xSet=t),n},i.prototype.getYDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.indexOf(h.value)<0&&a.push(h.value),void 0!==h.min&&(this.hasRange=!0,a.indexOf(h.min)<0&&a.push(h.min)),void 0!==h.max&&(this.hasRange=!0,a.indexOf(h.max)<0&&a.push(h.max))}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}var p=A(a);return this.autoScale||p.push(0),[this.yScaleMin?this.yScaleMin:Math.min.apply(Math,A(p)),this.yScaleMax?this.yScaleMax:Math.max.apply(Math,A(p))]},i.prototype.getSeriesDomain=function(){return this.results.map((function(t){return t.name}))},i.prototype.getXScale=function(t,e){var i;return"time"===this.scaleType?i=c.scaleTime().range([0,e]).domain(t):"linear"===this.scaleType?(i=c.scaleLinear().range([0,e]).domain(t),this.roundDomains&&(i=i.nice())):"ordinal"===this.scaleType&&(i=c.scalePoint().range([0,e]).padding(.1).domain(t)),i},i.prototype.getYScale=function(t,e){var i=c.scaleLinear().range([e,0]).domain(t);return this.roundDomains?i.nice():i},i.prototype.updateDomain=function(t){this.filteredDomain=t,this.xDomain=this.filteredDomain,this.xScale=this.getXScale(this.xDomain,this.dims.width)},i.prototype.updateHoveredVertical=function(t){this.hoveredVertical=t.value,this.deactivateAll()},i.prototype.hideCircles=function(){this.hoveredVertical=null,this.deactivateAll()},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.seriesDomain:this.yDomain,this.colors=new St(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.seriesDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.yDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t){this.deactivateAll(),this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}))>-1||(this.activeEntries=[t],this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t){var e=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}));this.activeEntries.splice(e,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},i.prototype.deactivateAll=function(){var t,e;this.activeEntries=A(this.activeEntries);try{for(var i=k(this.activeEntries),n=i.next();!n.done;n=i.next()){var a=n.value;this.deactivate.emit({value:a,entries:[]})}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.activeEntries=[]},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"autoScale",void 0),T([e.Input()],i.prototype,"timeline",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"curve",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"rangeFillOpacity",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"showRefLines",void 0),T([e.Input()],i.prototype,"referenceLines",void 0),T([e.Input()],i.prototype,"showRefLabels",void 0),T([e.Input()],i.prototype,"xScaleMin",void 0),T([e.Input()],i.prototype,"xScaleMax",void 0),T([e.Input()],i.prototype,"yScaleMin",void 0),T([e.Input()],i.prototype,"yScaleMax",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),T([e.ContentChild("seriesTooltipTemplate")],i.prototype,"seriesTooltipTemplate",void 0),T([e.HostListener("mouseleave")],i.prototype,"hideCircles",null),i=T([e.Component({selector:"ngx-charts-line-chart",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelClick)="onClick($event)"\n (legendLabelActivate)="onActivate($event)"\n (legendLabelDeactivate)="onDeactivate($event)"\n >\n <svg:defs>\n <svg:clipPath [attr.id]="clipPathId">\n <svg:rect\n [attr.width]="dims.width + 10"\n [attr.height]="dims.height + 10"\n [attr.transform]="\'translate(-5, -5)\'"\n />\n </svg:clipPath>\n </svg:defs>\n <svg:g [attr.transform]="transform" class="line-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n [referenceLines]="referenceLines"\n [showRefLines]="showRefLines"\n [showRefLabels]="showRefLabels"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g [attr.clip-path]="clipPath">\n <svg:g *ngFor="let series of results; trackBy: trackBy" [@animationState]="\'active\'">\n <svg:g\n ngx-charts-line-series\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [data]="series"\n [activeEntries]="activeEntries"\n [scaleType]="scaleType"\n [curve]="curve"\n [rangeFillOpacity]="rangeFillOpacity"\n [hasRange]="hasRange"\n [animations]="animations"\n />\n </svg:g>\n\n <svg:g *ngIf="!tooltipDisabled" (mouseleave)="hideCircles()">\n <svg:g\n ngx-charts-tooltip-area\n [dims]="dims"\n [xSet]="xSet"\n [xScale]="xScale"\n [yScale]="yScale"\n [results]="results"\n [colors]="colors"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="seriesTooltipTemplate"\n (hover)="updateHoveredVertical($event)"\n />\n\n <svg:g *ngFor="let series of results">\n <svg:g\n ngx-charts-circle-series\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [data]="series"\n [scaleType]="scaleType"\n [visibleValue]="hoveredVertical"\n [activeEntries]="activeEntries"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n (select)="onClick($event)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </svg:g>\n <svg:g\n ngx-charts-timeline\n *ngIf="timeline && scaleType != \'ordinal\'"\n [attr.transform]="timelineTransform"\n [results]="results"\n [view]="[timelineWidth, height]"\n [height]="timelineHeight"\n [scheme]="scheme"\n [customColors]="customColors"\n [scaleType]="scaleType"\n [legend]="legend"\n (onDomainChange)="updateDomain($event)"\n >\n <svg:g *ngFor="let series of results; trackBy: trackBy">\n <svg:g\n ngx-charts-line-series\n [xScale]="timelineXScale"\n [yScale]="timelineYScale"\n [colors]="colors"\n [data]="series"\n [scaleType]="scaleType"\n [curve]="curve"\n [hasRange]="hasRange"\n [animations]="animations"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1}),n.animate(500,n.style({opacity:0}))])])],styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(z),ce=function(){function t(){this.animations=!0}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.updateGradients();var t=this.sortData(this.data.series),e=this.getLineGenerator();this.path=e(t)||"";var i=this.getAreaGenerator();if(this.areaPath=i(t)||"",this.hasRange){var n=this.getRangeGenerator();this.outerPath=n(t)||""}if(this.hasGradient){this.stroke=this.gradientUrl;var a=this.data.series.map((function(t){return t.value})),o=Math.max.apply(Math,A(a));o===Math.min.apply(Math,A(a))&&(this.stroke=this.colors.getColor(o))}else this.stroke=this.colors.getColor(this.data.name)},t.prototype.getLineGenerator=function(){var t=this;return p.line().x((function(e){var i=e.name;return"time"===t.scaleType?t.xScale(i):"linear"===t.scaleType?t.xScale(Number(i)):t.xScale(i)})).y((function(e){return t.yScale(e.value)})).curve(this.curve)},t.prototype.getRangeGenerator=function(){var t=this;return p.area().x((function(e){var i=e.name;return"time"===t.scaleType?t.xScale(i):"linear"===t.scaleType?t.xScale(Number(i)):t.xScale(i)})).y0((function(e){return t.yScale("number"==typeof e.min?e.min:e.value)})).y1((function(e){return t.yScale("number"==typeof e.max?e.max:e.value)})).curve(this.curve)},t.prototype.getAreaGenerator=function(){var t=this;return p.area().x((function(e){var i=e.name;return t.xScale(i)})).y0((function(){return t.yScale.range()[0]})).y1((function(e){return t.yScale(e.value)})).curve(this.curve)},t.prototype.sortData=function(t){return t="linear"===this.scaleType?Ft(t,"name"):"time"===this.scaleType?Xt(t,"name"):Pt(t,"name","asc",this.xScale.domain())},t.prototype.updateGradients=function(){if("linear"===this.colors.scaleType){this.hasGradient=!0,this.gradientId="grad"+it().toString(),this.gradientUrl="url(#"+this.gradientId+")";var t=this.data.series.map((function(t){return t.value})),e=Math.max.apply(Math,A(t)),i=Math.min.apply(Math,A(t));this.gradientStops=this.colors.getLinearGradientStops(e,i),this.areaGradientStops=this.colors.getLinearGradientStops(e)}else this.hasGradient=!1,this.gradientStops=void 0,this.areaGradientStops=void 0},t.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.name===e.name}))},t.prototype.isInactive=function(t){return!(!this.activeEntries||0===this.activeEntries.length)&&void 0===this.activeEntries.find((function(e){return t.name===e.name}))},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"xScale",void 0),T([e.Input()],t.prototype,"yScale",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"scaleType",void 0),T([e.Input()],t.prototype,"curve",void 0),T([e.Input()],t.prototype,"activeEntries",void 0),T([e.Input()],t.prototype,"rangeFillOpacity",void 0),T([e.Input()],t.prototype,"hasRange",void 0),T([e.Input()],t.prototype,"animations",void 0),t=T([e.Component({selector:"g[ngx-charts-line-series]",template:'\n <svg:g>\n <defs>\n <svg:g\n ngx-charts-svg-linear-gradient\n *ngIf="hasGradient"\n orientation="vertical"\n [name]="gradientId"\n [stops]="gradientStops"\n />\n </defs>\n <svg:g\n ngx-charts-area\n class="line-highlight"\n [data]="data"\n [path]="areaPath"\n [fill]="hasGradient ? gradientUrl : colors.getColor(data.name)"\n [opacity]="0.25"\n [startOpacity]="0"\n [gradient]="true"\n [stops]="areaGradientStops"\n [class.active]="isActive(data)"\n [class.inactive]="isInactive(data)"\n [animations]="animations"\n />\n <svg:g\n ngx-charts-line\n class="line-series"\n [data]="data"\n [path]="path"\n [stroke]="stroke"\n [animations]="animations"\n [class.active]="isActive(data)"\n [class.inactive]="isInactive(data)"\n />\n <svg:g\n ngx-charts-area\n *ngIf="hasRange"\n class="line-series-range"\n [data]="data"\n [path]="outerPath"\n [fill]="hasGradient ? gradientUrl : colors.getColor(data.name)"\n [class.active]="isActive(data)"\n [class.inactive]="isInactive(data)"\n [opacity]="rangeFillOpacity"\n [animations]="animations"\n />\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),he=function(){function t(){}return t=T([e.NgModule({imports:[At],declarations:[re,le,ce],exports:[re,le,ce]})],t)}();var pe=2*Math.PI,de=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legendTitle="Legend",i.legendPosition="right",i.showGridLines=!0,i.curve=p.curveCardinalClosed,i.activeEntries=[],i.rangeFillOpacity=.15,i.trimYAxisTicks=!0,i.maxYAxisTickLength=16,i.roundDomains=!1,i.tooltipDisabled=!1,i.showSeriesOnHover=!0,i.gradient=!1,i.yAxisMinScale=0,i.labelTrim=!0,i.labelTrimSize=10,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.setDims(),this.setScales(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.setTicks()},i.prototype.setDims=function(){this.dims=It({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition});var t=Math.floor(this.dims.width/2),e=Math.floor(this.dims.height/2),i=this.outerRadius=Math.min(e/1.5,t/1.5),n=Math.max(0,e-i);this.yAxisDims=b(b({},this.dims),{width:t}),this.transform="translate("+this.dims.xOffset+", "+this.margin[0]+")",this.transformYAxis="translate(0, "+n+")",this.labelOffset=this.dims.height+40,this.transformPlot="translate("+t+", "+e+")"},i.prototype.setScales=function(){var t=this.getXValues();this.scaleType=Ct(t),this.xDomain=this.filteredDomain||this.getXDomain(t),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,pe),this.yScale=this.getYScale(this.yDomain,this.outerRadius),this.yAxisScale=this.getYScale(this.yDomain.reverse(),this.outerRadius)},i.prototype.setTicks=function(){var t,e=this;t=this.xAxisTickFormatting?this.xAxisTickFormatting:this.xScale.tickFormat?this.xScale.tickFormat.apply(this.xScale,[5]):function(t){return e=t,"[object Date]"===toString.call(e)?t.toLocaleDateString():t.toLocaleString();var e};var i=this.outerRadius;this.thetaTicks=this.xDomain.map((function(n){var a=e.xScale(n),o=1.1*i*(a>Math.PI?-1:1),s=t(n),r=[i*Math.sin(a),-i*Math.cos(a)];return{innerRadius:0,outerRadius:i,startAngle:a,endAngle:a,value:i,label:s,startPos:r,pos:[o,1.1*r[1]]}}));for(var n=0;n<this.thetaTicks.length-1;n++)for(var a=this.thetaTicks[n],o=n+1;o<this.thetaTicks.length;o++){var s=this.thetaTicks[o];if(s.pos[0]*a.pos[0]>0){var r=10-Math.abs(s.pos[1]-a.pos[1]);r>0&&(s.pos[1]+=Math.sign(s.pos[0])*r)}}this.radiusTicks=this.yAxisScale.ticks(Math.floor(this.dims.height/50)).map((function(t){return e.yScale(t)}))},i.prototype.getXValues=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.name)||a.push(h.name)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getXDomain=function(t){return void 0===t&&(t=this.getXValues()),"time"===this.scaleType?[Math.min.apply(Math,A(t)),Math.max.apply(Math,A(t))]:"linear"===this.scaleType?(t=t.map((function(t){return Number(t)})),[Math.min.apply(Math,A(t)),Math.max.apply(Math,A(t))]):t},i.prototype.getYValues=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.indexOf(h.value)<0&&a.push(h.value),void 0!==h.min&&a.indexOf(h.min)<0&&a.push(h.min),void 0!==h.max&&a.indexOf(h.max)<0&&a.push(h.max)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getYDomain=function(t){void 0===t&&(t=this.getYValues());var e=Math.min.apply(Math,A(t)),i=Math.max.apply(Math,A([this.yAxisMinScale],t));return e=Math.max(0,e),this.autoScale||(e=Math.min(0,e)),[e,i]},i.prototype.getSeriesDomain=function(){return this.results.map((function(t){return t.name}))},i.prototype.getXScale=function(t,e){switch(this.scaleType){case"time":return c.scaleTime().range([0,e]).domain(t);case"linear":var i=c.scaleLinear().range([0,e]).domain(t);return this.roundDomains?i.nice():i;default:return c.scalePoint().range([0,e-pe/t.length]).padding(0).domain(t)}},i.prototype.getYScale=function(t,e){var i=c.scaleLinear().range([0,e]).domain(t);return this.roundDomains?i.nice():i},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.setColors=function(){var t="ordinal"===this.schemeType?this.seriesDomain:this.yDomain.reverse();this.colors=new St(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){return"ordinal"===this.schemeType?{scaleType:this.schemeType,colors:this.colors,domain:this.seriesDomain,title:this.legendTitle,position:this.legendPosition}:{scaleType:this.schemeType,colors:this.colors.scale,domain:this.yDomain,title:void 0,position:this.legendPosition}},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t){this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}))>-1||(this.activeEntries=this.showSeriesOnHover?A([t],this.activeEntries):this.activeEntries,this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t){var e=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}));this.activeEntries.splice(e,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},i.prototype.deactivateAll=function(){var t,e;this.activeEntries=A(this.activeEntries);try{for(var i=k(this.activeEntries),n=i.next();!n.done;n=i.next()){var a=n.value;this.deactivate.emit({value:a,entries:[]})}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.activeEntries=[]},i.prototype.trackBy=function(t,e){return e.name},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"autoScale",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"curve",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"rangeFillOpacity",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"showSeriesOnHover",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"yAxisMinScale",void 0),T([e.Input()],i.prototype,"labelTrim",void 0),T([e.Input()],i.prototype,"labelTrimSize",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-polar-chart",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelClick)="onClick($event)"\n (legendLabelActivate)="onActivate($event)"\n (legendLabelDeactivate)="onDeactivate($event)"\n >\n <svg:g class="polar-chart chart" [attr.transform]="transform">\n <svg:g [attr.transform]="transformPlot">\n <svg:circle class="polar-chart-background" cx="0" cy="0" [attr.r]="this.outerRadius" />\n <svg:g *ngIf="showGridLines">\n <svg:circle\n *ngFor="let r of radiusTicks"\n class="gridline-path radial-gridline-path"\n cx="0"\n cy="0"\n [attr.r]="r"\n />\n </svg:g>\n <svg:g *ngIf="xAxis">\n <svg:g\n ngx-charts-pie-label\n *ngFor="let tick of thetaTicks"\n [data]="tick"\n [radius]="outerRadius"\n [label]="tick.label"\n [max]="outerRadius"\n [value]="showGridLines ? 1 : outerRadius"\n [explodeSlices]="true"\n [animations]="animations"\n [labelTrim]="labelTrim"\n [labelTrimSize]="labelTrimSize"\n ></svg:g>\n </svg:g>\n </svg:g>\n <svg:g\n ngx-charts-y-axis\n [attr.transform]="transformYAxis"\n *ngIf="yAxis"\n [yScale]="yAxisScale"\n [dims]="yAxisDims"\n [showGridLines]="showGridLines"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g\n ngx-charts-axis-label\n *ngIf="xAxis && showXAxisLabel"\n [label]="xAxisLabel"\n [offset]="labelOffset"\n [orient]="\'bottom\'"\n [height]="dims.height"\n [width]="dims.width"\n ></svg:g>\n <svg:g [attr.transform]="transformPlot">\n <svg:g *ngFor="let series of results; trackBy: trackBy" [@animationState]="\'active\'">\n <svg:g\n ngx-charts-polar-series\n [gradient]="gradient"\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [data]="series"\n [activeEntries]="activeEntries"\n [scaleType]="scaleType"\n [curve]="curve"\n [rangeFillOpacity]="rangeFillOpacity"\n [animations]="animations"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n (select)="onClick($event)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1}),n.animate(500,n.style({opacity:0}))])])],styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}",".pie-label{font-size:11px}.pie-label.animation{-webkit-animation:750ms ease-in fadeIn;animation:750ms ease-in fadeIn}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.pie-label-line{stroke-dasharray:100%}.pie-label-line.animation{-webkit-animation:3s linear drawOut;animation:3s linear drawOut;-webkit-transition:d 750ms;transition:d 750ms}@-webkit-keyframes drawOut{from{stroke-dashoffset:100%}to{stroke-dashoffset:0}}@keyframes drawOut{from{stroke-dashoffset:100%}to{stroke-dashoffset:0}}",".polar-chart .polar-chart-background{fill:none}.polar-chart .radial-gridline-path{stroke-dasharray:10 10;fill:none}.polar-chart .pie-label-line{stroke:#2f3646}.polar-charts-series .polar-series-area,.polar-series-path{pointer-events:none}"]})],i)}(z),ge=function(){function t(){this.tooltipDisabled=!1,this.gradient=!1,this.animations=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.circleRadius=3}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){var t=this;this.updateGradients();var e=this.getLineGenerator(),i=this.sortData(this.data.series),n=this.data.name,a="linear"===this.colors.scaleType,o=this.yScale.domain()[0];this.seriesColor=this.colors.getColor(a?o:n),this.path=e(i)||"",this.circles=i.map((function(e){var i=t.getAngle(e),o=t.getRadius(e),s=e.value,r=t.colors.getColor(a?Math.abs(s):n);return{data:Object.assign({},e,{series:n,value:s,name:e.name}),cx:o*Math.sin(i),cy:-o*Math.cos(i),value:s,color:r,label:e.name}})),this.active=this.isActive(this.data),this.inactive=this.isInactive(this.data),this.tooltipText=this.tooltipText||function(e){return t.defaultTooltipText(e)}},t.prototype.getAngle=function(t){var e=t.name;return"time"===this.scaleType?this.xScale(e):"linear"===this.scaleType?this.xScale(Number(e)):this.xScale(e)},t.prototype.getRadius=function(t){return this.yScale(t.value)},t.prototype.getLineGenerator=function(){var t=this;return p.lineRadial().angle((function(e){return t.getAngle(e)})).radius((function(e){return t.getRadius(e)})).curve(this.curve)},t.prototype.sortData=function(t){return"linear"===this.scaleType?Ft(t,"name"):"time"===this.scaleType?Xt(t,"name"):Pt(t,"name","asc",this.xScale.domain())},t.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.name===e.name}))},t.prototype.isInactive=function(t){return!(!this.activeEntries||0===this.activeEntries.length)&&void 0===this.activeEntries.find((function(e){return t.name===e.name}))},t.prototype.defaultTooltipText=function(t){var e=t.label,i=t.value;return'\n <span class="tooltip-label">'+tt(this.data.name)+" • "+tt(e)+'</span>\n <span class="tooltip-val">'+i.toLocaleString()+"</span>\n "},t.prototype.updateGradients=function(){if(this.hasGradient=this.gradient||"linear"===this.colors.scaleType,this.hasGradient)if(this.gradientId="grad"+it().toString(),this.gradientUrl="url(#"+this.gradientId+")","linear"===this.colors.scaleType){var t=this.data.series.map((function(t){return t.value})),e=Math.max.apply(Math,A(t)),i=Math.min.apply(Math,A(t));this.gradientStops=this.colors.getLinearGradientStops(e,i)}else this.gradientStops=void 0},T([e.Input()],t.prototype,"name",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"xScale",void 0),T([e.Input()],t.prototype,"yScale",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"scaleType",void 0),T([e.Input()],t.prototype,"curve",void 0),T([e.Input()],t.prototype,"activeEntries",void 0),T([e.Input()],t.prototype,"rangeFillOpacity",void 0),T([e.Input()],t.prototype,"tooltipDisabled",void 0),T([e.Input()],t.prototype,"tooltipText",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"tooltipTemplate",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),t=T([e.Component({selector:"g[ngx-charts-polar-series]",template:'\n <svg:g class="polar-charts-series">\n <defs>\n <svg:g\n ngx-charts-svg-radial-gradient\n *ngIf="hasGradient"\n orientation="vertical"\n [color]="seriesColor"\n [name]="gradientId"\n [startOpacity]="0.25"\n [endOpacity]="1"\n [stops]="gradientStops"\n />\n </defs>\n <svg:g\n ngx-charts-line\n class="polar-series-path"\n [path]="path"\n [stroke]="hasGradient ? gradientUrl : seriesColor"\n [class.active]="active"\n [class.inactive]="inactive"\n [attr.fill-opacity]="rangeFillOpacity"\n [fill]="hasGradient ? gradientUrl : seriesColor"\n [animations]="animations"\n />\n <svg:g\n ngx-charts-circle\n *ngFor="let circle of circles"\n class="circle"\n [cx]="circle.cx"\n [cy]="circle.cy"\n [r]="circleRadius"\n [fill]="circle.color"\n [style.opacity]="inactive ? 0.2 : 1"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="\'top\'"\n tooltipType="tooltip"\n [tooltipTitle]="tooltipTemplate ? undefined : tooltipText(circle)"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="circle.data"\n (select)="select.emit(circle.data)"\n (activate)="activate.emit({ name: circle.data.series })"\n (deactivate)="deactivate.emit({ name: circle.data.series })"\n ></svg:g>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),ue=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.activeEntries=[],i.tooltipDisabled=!1,i.label="Total",i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[20,20,20,20],i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.dims=It({width:4*this.width/12,height:this.height,margins:this.margin}),this.formatDates(),this.domain=this.getDomain(),this.setColors();var e=this.dims.width/2,i=this.margin[0]+this.dims.height/2;this.legendWidth=this.width-this.dims.width-this.margin[1],this.outerRadius=Math.min(this.dims.width,this.dims.height)/2.5,this.innerRadius=.75*this.outerRadius,this.transform="translate("+e+" , "+i+")"},i.prototype.getDomain=function(){return this.results.map((function(t){return t.label}))},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.setColors=function(){this.colors=new St(this.scheme,"ordinal",this.domain,this.customColors)},i.prototype.onActivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name})),this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name}));var i=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}));this.activeEntries.splice(i,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"tooltipText",void 0),T([e.Input()],i.prototype,"label",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),T([e.Input()],i.prototype,"valueFormatting",void 0),T([e.Input()],i.prototype,"nameFormatting",void 0),T([e.Input()],i.prototype,"percentageFormatting",void 0),i=T([e.Component({selector:"ngx-charts-advanced-pie-chart",template:'\n <div [style.width.px]="width" [style.height.px]="height">\n <div class="advanced-pie chart" [style.width.px]="dims.width" [style.height.px]="dims.height">\n <ngx-charts-chart [view]="[width, height]" [showLegend]="false" [animations]="animations">\n <svg:g [attr.transform]="transform" class="pie chart">\n <svg:g\n ngx-charts-pie-series\n [colors]="colors"\n [series]="results"\n [innerRadius]="innerRadius"\n [activeEntries]="activeEntries"\n [outerRadius]="outerRadius"\n [gradient]="gradient"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipText]="tooltipText"\n (select)="onClick($event)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n [animations]="animations"\n ></svg:g>\n </svg:g>\n </ngx-charts-chart>\n </div>\n <div class="advanced-pie-legend-wrapper" [style.width.px]="width - dims.width" [style.height.px]="height">\n <ngx-charts-advanced-legend\n [data]="results"\n [colors]="colors"\n [width]="width - dims.width - margin[1]"\n [label]="label"\n [animations]="animations"\n [valueFormatting]="valueFormatting"\n [labelFormatting]="nameFormatting"\n [percentageFormatting]="percentageFormatting"\n (select)="onClick($event)"\n (activate)="onActivate($event, true)"\n (deactivate)="onDeactivate($event, true)"\n >\n </ngx-charts-advanced-legend>\n </div>\n </div>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}",".advanced-pie{display:inline-block;float:left}.advanced-pie-legend-wrapper{display:inline-block}"]})],i)}(z),ve=function(){function t(){this.animations=!0,this.labelTrim=!0,this.labelTrimSize=10,this.isIE=/(edge|msie|trident)/i.test(navigator.userAgent),this.trimLabel=W}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){var t=this.radius;this.explodeSlices&&(t=this.radius*this.value/this.max);var e=p.arc().innerRadius(t).outerRadius(t).centroid(this.data),i=this.data.pos[1]/e[1];0!==this.data.pos[1]&&0!==e[1]||(i=1);var n=[i*e[0],i*e[1]];this.line="M"+e+"L"+n+"L"+this.data.pos},Object.defineProperty(t.prototype,"textX",{get:function(){return this.data.pos[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textY",{get:function(){return this.data.pos[1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"styleTransform",{get:function(){return this.isIE?null:"translate3d("+this.textX+"px,"+this.textY+"px, 0)"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"attrTransform",{get:function(){return this.isIE?"translate("+this.textX+","+this.textY+")":null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textTransition",{get:function(){return this.isIE||!this.animations?null:"transform 0.75s"},enumerable:!0,configurable:!0}),t.prototype.textAnchor=function(){return this.midAngle(this.data)<Math.PI?"start":"end"},t.prototype.midAngle=function(t){return t.startAngle+(t.endAngle-t.startAngle)/2},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"radius",void 0),T([e.Input()],t.prototype,"label",void 0),T([e.Input()],t.prototype,"color",void 0),T([e.Input()],t.prototype,"max",void 0),T([e.Input()],t.prototype,"value",void 0),T([e.Input()],t.prototype,"explodeSlices",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Input()],t.prototype,"labelTrim",void 0),T([e.Input()],t.prototype,"labelTrimSize",void 0),t=T([e.Component({selector:"g[ngx-charts-pie-label]",template:'\n <title>{{ label }}</title>\n <svg:g [attr.transform]="attrTransform" [style.transform]="styleTransform" [style.transition]="textTransition">\n <svg:text\n class="pie-label"\n [class.animation]="animations"\n dy=".35em"\n [style.textAnchor]="textAnchor()"\n [style.shapeRendering]="\'crispEdges\'"\n >\n {{ labelTrim ? trimLabel(label, labelTrimSize) : label }}\n </svg:text>\n </svg:g>\n <svg:path\n [attr.d]="line"\n [attr.stroke]="color"\n fill="none"\n class="pie-label-line line"\n [class.animation]="animations"\n ></svg:path>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),me=function(){function t(t){this.startAngle=0,this.endAngle=2*Math.PI,this.cornerRadius=0,this.explodeSlices=!1,this.gradient=!1,this.animate=!0,this.pointerEvents=!0,this.isActive=!1,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.dblclick=new e.EventEmitter,this.initialized=!1,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.getGradient=function(){return this.gradient?this.gradientFill:this.fill},t.prototype.getPointerEvents=function(){return this.pointerEvents?"auto":"none"},t.prototype.update=function(){var t=this.calculateArc();this.startOpacity=.5,this.radialGradientId="linearGrad"+it().toString(),this.gradientFill="url(#"+this.radialGradientId+")",this.animate?this.initialized?this.updateAnimation():(this.loadAnimation(),this.initialized=!0):this.path=t.startAngle(this.startAngle).endAngle(this.endAngle)()},t.prototype.calculateArc=function(){var t=this.outerRadius;return this.explodeSlices&&0===this.innerRadius&&(t=this.outerRadius*this.value/this.max),p.arc().innerRadius(this.innerRadius).outerRadius(t).cornerRadius(this.cornerRadius)},t.prototype.loadAnimation=function(){var t=r.select(this.element).selectAll(".arc").data([{startAngle:this.startAngle,endAngle:this.endAngle}]),e=this.calculateArc();t.transition().attrTween("d",(function(t){this._current=this._current||t;var i=Object.assign({},t);i.endAngle=i.startAngle;var n=g.interpolate(i,i);return this._current=n(0),function(t){return e(n(t))}})).transition().duration(750).attrTween("d",(function(t){this._current=this._current||t;var i=g.interpolate(this._current,t);return this._current=i(0),function(t){return e(i(t))}}))},t.prototype.updateAnimation=function(){var t=r.select(this.element).selectAll(".arc").data([{startAngle:this.startAngle,endAngle:this.endAngle}]),e=this.calculateArc();t.transition().duration(750).attrTween("d",(function(t){this._current=this._current||t;var i=g.interpolate(this._current,t);return this._current=i(0),function(t){return e(i(t))}}))},t.prototype.onClick=function(){var t=this;clearTimeout(this._timeout),this._timeout=setTimeout((function(){return t.select.emit(t.data)}),200)},t.prototype.onDblClick=function(t){t.preventDefault(),t.stopPropagation(),clearTimeout(this._timeout),this.dblclick.emit({data:this.data,nativeEvent:t})},t.ctorParameters=function(){return[{type:e.ElementRef}]},T([e.Input()],t.prototype,"fill",void 0),T([e.Input()],t.prototype,"startAngle",void 0),T([e.Input()],t.prototype,"endAngle",void 0),T([e.Input()],t.prototype,"innerRadius",void 0),T([e.Input()],t.prototype,"outerRadius",void 0),T([e.Input()],t.prototype,"cornerRadius",void 0),T([e.Input()],t.prototype,"value",void 0),T([e.Input()],t.prototype,"max",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"explodeSlices",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"animate",void 0),T([e.Input()],t.prototype,"pointerEvents",void 0),T([e.Input()],t.prototype,"isActive",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),T([e.Output()],t.prototype,"dblclick",void 0),t=T([e.Component({selector:"g[ngx-charts-pie-arc]",template:'\n <svg:g class="arc-group">\n <svg:defs *ngIf="gradient">\n <svg:g\n ngx-charts-svg-radial-gradient\n [color]="fill"\n orientation="vertical"\n [name]="radialGradientId"\n [startOpacity]="startOpacity"\n />\n </svg:defs>\n <svg:path\n [attr.d]="path"\n class="arc"\n [class.active]="isActive"\n [attr.fill]="getGradient()"\n (click)="onClick()"\n (dblclick)="onDblClick($event)"\n (mouseenter)="activate.emit(data)"\n (mouseleave)="deactivate.emit(data)"\n [style.pointer-events]="getPointerEvents()"\n />\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),ye=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.labels=!1,i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.explodeSlices=!1,i.doughnut=!1,i.arcWidth=.25,i.activeEntries=[],i.tooltipDisabled=!1,i.trimLabels=!0,i.maxLabelLength=10,i.dblclick=new e.EventEmitter,i.select=new e.EventEmitter,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i}return f(i,t),i.prototype.update=function(){var e=this;t.prototype.update.call(this),this.labels&&this.hasNoOptionalMarginsSet()?this.margins=[30,80,30,80]:!this.labels&&this.hasNoOptionalMarginsSet()&&(this.margins=[20,20,20,20]),this.dims=It({width:this.width,height:this.height,margins:this.margins,showLegend:this.legend,legendPosition:this.legendPosition}),this.formatDates();var i=this.margins[3]+this.dims.width/2,n=this.margins[0]+this.dims.height/2;this.translation="translate("+i+", "+n+")",this.outerRadius=Math.min(this.dims.width,this.dims.height),this.labels?this.outerRadius/=3:this.outerRadius/=2,this.innerRadius=0,this.doughnut&&(this.innerRadius=this.outerRadius*(1-this.arcWidth)),this.domain=this.getDomain(),this.data=this.results.sort((function(t,i){return e.domain.indexOf(t.name)-e.domain.indexOf(i.name)})),this.setColors(),this.legendOptions=this.getLegendOptions()},i.prototype.getDomain=function(){return this.results.map((function(t){return t.label}))},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.setColors=function(){this.colors=new St(this.scheme,"ordinal",this.domain,this.customColors)},i.prototype.getLegendOptions=function(){return{scaleType:"ordinal",domain:this.domain,colors:this.colors,title:this.legendTitle,position:this.legendPosition}},i.prototype.onActivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name})),this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name}));var i=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}));this.activeEntries.splice(i,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},i.prototype.hasNoOptionalMarginsSet=function(){return!this.margins||this.margins.length<=0},T([e.Input()],i.prototype,"labels",void 0),T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"explodeSlices",void 0),T([e.Input()],i.prototype,"doughnut",void 0),T([e.Input()],i.prototype,"arcWidth",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"labelFormatting",void 0),T([e.Input()],i.prototype,"trimLabels",void 0),T([e.Input()],i.prototype,"maxLabelLength",void 0),T([e.Input()],i.prototype,"tooltipText",void 0),T([e.Output()],i.prototype,"dblclick",void 0),T([e.Input()],i.prototype,"margins",void 0),T([e.Output()],i.prototype,"select",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-pie-chart",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelActivate)="onActivate($event, true)"\n (legendLabelDeactivate)="onDeactivate($event, true)"\n (legendLabelClick)="onClick($event)"\n >\n <svg:g [attr.transform]="translation" class="pie-chart chart">\n <svg:g\n ngx-charts-pie-series\n [colors]="colors"\n [series]="data"\n [showLabels]="labels"\n [labelFormatting]="labelFormatting"\n [trimLabels]="trimLabels"\n [maxLabelLength]="maxLabelLength"\n [activeEntries]="activeEntries"\n [innerRadius]="innerRadius"\n [outerRadius]="outerRadius"\n [explodeSlices]="explodeSlices"\n [gradient]="gradient"\n [animations]="animations"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipText]="tooltipText"\n (dblclick)="dblclick.emit($event)"\n (select)="onClick($event)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n />\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}",".pie-label{font-size:11px}.pie-label.animation{-webkit-animation:750ms ease-in fadeIn;animation:750ms ease-in fadeIn}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.pie-label-line{stroke-dasharray:100%}.pie-label-line.animation{-webkit-animation:3s linear drawOut;animation:3s linear drawOut;-webkit-transition:d 750ms;transition:d 750ms}@-webkit-keyframes drawOut{from{stroke-dashoffset:100%}to{stroke-dashoffset:0}}@keyframes drawOut{from{stroke-dashoffset:100%}to{stroke-dashoffset:0}}"]})],i)}(z);function xe(t,e,i){var n=1,a=e,o=t.width;if(o>i)for(;o/a<i;)n+=1,a=Math.ceil(e/n);return[a,n]}function fe(t,e,i,n){for(var a=c.scaleBand(),o=c.scaleBand(),s=t.width,r=t.height,l=w(xe(t,e.length,i),2),h=l[0],p=l[1],d=[],g=[],u=0;u<p;u++)g.push(u);for(u=0;u<h;u++)d.push(u);a.domain(d),o.domain(g),a.rangeRound([0,s],.1),o.rangeRound([0,r],.1);var v=[],m=n||e.map((function(t){return t?t.value:0})).reduce((function(t,e){return t+e}),0),y=a.bandwidth(),x=o.bandwidth();for(u=0;u<e.length;u++)v[u]={},v[u].data={name:e[u]?e[u].name:"",value:e[u]?e[u].value:void 0,extra:e[u]?e[u].extra:void 0,label:e[u]?e[u].label:""},v[u].x=a(u%h),v[u].y=o(Math.floor(u/h)),v[u].width=y,v[u].height=x,v[u].data.percent=m>0?v[u].data.value/m:0,v[u].data.total=m;return v}var be=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.tooltipDisabled=!1,i.label="Total",i.minWidth=150,i.activeEntries=[],i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[20,20,20,20],i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.dims=It({width:this.width,height:this.height,margins:this.margin}),this.formatDates(),this.domain=this.getDomain(),this.data=fe(this.dims,this.results,this.minWidth,this.designatedTotal),this.transform="translate("+this.margin[3]+" , "+this.margin[0]+")",this.series=this.getSeries(),this.setColors(),this.tooltipText=this.tooltipText||this.defaultTooltipText},i.prototype.defaultTooltipText=function(t){var e=t.data;return'\n <span class="tooltip-label">'+W(K(e.name))+'</span>\n <span class="tooltip-val">'+e.value.toLocaleString()+"</span>\n "},i.prototype.getDomain=function(){return this.results.map((function(t){return t.label}))},i.prototype.getSeries=function(){var t=this,e=this.designatedTotal?this.designatedTotal:this.getTotal();return this.data.map((function(i){var n=i.data.name,a=K(n),o=i.data.value,s=d.min([i.width-10,i.height-20])/2-5,r=.9*s,l=0;return{transform:"translate("+(i.x+(i.width-10)/2)+", "+(i.y+(i.height-20)/2)+")",colors:function(){return 1===(l+=1)?"rgba(100,100,100,0.3)":t.colorScale.getColor(a)},innerRadius:r,outerRadius:s,name:n,label:W(a),total:o,value:o,percent:u.format(".1%")(i.data.percent),data:[i,{data:{other:!0,value:e-o,name:i.data.name}}]}}))},i.prototype.getTotal=function(){return this.results.map((function(t){return t.value})).reduce((function(t,e){return t+e}),0)},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.setColors=function(){this.colorScale=new St(this.scheme,"ordinal",this.domain,this.customColors)},i.prototype.onActivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name})),this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name}));var i=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}));this.activeEntries.splice(i,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},T([e.Input()],i.prototype,"designatedTotal",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"tooltipText",void 0),T([e.Input()],i.prototype,"label",void 0),T([e.Input()],i.prototype,"minWidth",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-pie-grid",template:'\n <ngx-charts-chart [view]="[width, height]" [showLegend]="false" [animations]="animations">\n <svg:g [attr.transform]="transform" class="pie-grid chart">\n <svg:g *ngFor="let series of series" class="pie-grid-item" [attr.transform]="series.transform">\n <svg:g\n ngx-charts-pie-grid-series\n [colors]="series.colors"\n [data]="series.data"\n [innerRadius]="series.innerRadius"\n [outerRadius]="series.outerRadius"\n [animations]="animations"\n (select)="onClick($event)"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="\'top\'"\n [tooltipType]="\'tooltip\'"\n [tooltipTitle]="tooltipTemplate ? undefined : tooltipText({ data: series })"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="series.data[0].data"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n />\n <svg:text\n *ngIf="animations"\n class="label percent-label"\n dy="-0.5em"\n x="0"\n y="5"\n ngx-charts-count-up\n [countTo]="series.percent"\n [countSuffix]="\'%\'"\n text-anchor="middle"\n ></svg:text>\n <svg:text *ngIf="!animations" class="label percent-label" dy="-0.5em" x="0" y="5" text-anchor="middle">\n {{ series.percent.toLocaleString() }}\n </svg:text>\n <svg:text class="label" dy="0.5em" x="0" y="5" text-anchor="middle">\n {{ series.label }}\n </svg:text>\n <svg:text\n *ngIf="animations"\n class="label"\n dy="1.23em"\n x="0"\n [attr.y]="series.outerRadius"\n text-anchor="middle"\n ngx-charts-count-up\n [countTo]="series.total"\n [countPrefix]="label + \': \'"\n ></svg:text>\n <svg:text\n *ngIf="!animations"\n class="label"\n dy="1.23em"\n x="0"\n [attr.y]="series.outerRadius"\n text-anchor="middle"\n >\n {{ label }}: {{ series.total.toLocaleString() }}\n </svg:text>\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}",".pie-grid .arc1{opacity:.4}.pie-grid .percent-label{font-size:16px;font-weight:400}"]})],i)}(z),Te=function(){function t(t){this.innerRadius=70,this.outerRadius=80,this.animations=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.layout=p.pie().value((function(t){return t.data.value})).sort(null),this.arcs=this.getArcs()},t.prototype.getArcs=function(){var t=this;return this.layout(this.data).map((function(e,i){var n=e.data.data.name,a=e.data.data.other;0===i&&(e.startAngle=0);var o=t.colors(n);return{data:e.data.data,class:"arc arc"+i,fill:o,startAngle:a?0:e.startAngle,endAngle:e.endAngle,animate:t.animations&&!a,pointerEvents:!a}}))},t.prototype.onClick=function(t){this.select.emit(this.data[0].data)},t.prototype.trackBy=function(t,e){return e.data.name},t.prototype.label=function(t){return t.data.name},t.prototype.color=function(t){return this.colors(this.label(t))},t.ctorParameters=function(){return[{type:e.ElementRef}]},T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"innerRadius",void 0),T([e.Input()],t.prototype,"outerRadius",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),t=T([e.Component({selector:"g[ngx-charts-pie-grid-series]",template:'\n <svg:g class="pie-grid-arcs">\n <svg:g\n ngx-charts-pie-arc\n *ngFor="let arc of arcs; trackBy: trackBy"\n [attr.class]="arc.class"\n [startAngle]="arc.startAngle"\n [endAngle]="arc.endAngle"\n [innerRadius]="innerRadius"\n [outerRadius]="outerRadius"\n [fill]="color(arc)"\n [value]="arc.data.value"\n [data]="arc.data"\n [gradient]="false"\n [pointerEvents]="arc.pointerEvents"\n [animate]="arc.animate"\n (select)="onClick($event)"\n (activate)="activate.emit($event)"\n (deactivate)="deactivate.emit($event)"\n ></svg:g>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),ke=function(){function t(){this.series=[],this.innerRadius=60,this.outerRadius=80,this.trimLabels=!0,this.maxLabelLength=10,this.tooltipDisabled=!1,this.animations=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.dblclick=new e.EventEmitter}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){var t=p.pie().value((function(t){return t.value})).sort(null)(this.series);this.max=d.max(t,(function(t){return t.value})),this.data=this.calculateLabelPositions(t),this.tooltipText=this.tooltipText||this.defaultTooltipText},t.prototype.midAngle=function(t){return t.startAngle+(t.endAngle-t.startAngle)/2},t.prototype.outerArc=function(){return p.arc().innerRadius(1.5*this.outerRadius).outerRadius(1.5*this.outerRadius)},t.prototype.calculateLabelPositions=function(t){var e=this,i=t;i.forEach((function(t){t.pos=e.outerArc().centroid(t),t.pos[0]=1.5*e.outerRadius*(e.midAngle(t)<Math.PI?1:-1)}));for(var n=0;n<i.length-1;n++){var a=i[n];if(this.labelVisible(a))for(var o=n+1;o<i.length;o++){var s=i[o];if(this.labelVisible(s)&&s.pos[0]*a.pos[0]>0){var r=10-Math.abs(s.pos[1]-a.pos[1]);r>0&&(s.pos[1]+=Math.sign(s.pos[0])*r)}}}return i},t.prototype.labelVisible=function(t){return this.showLabels&&t.endAngle-t.startAngle>Math.PI/30},t.prototype.getTooltipTitle=function(t){return this.tooltipTemplate?void 0:this.tooltipText(t)},t.prototype.labelText=function(t){return this.labelFormatting?this.labelFormatting(t.data.name):this.label(t)},t.prototype.label=function(t){return K(t.data.name)},t.prototype.defaultTooltipText=function(t){var e=this.label(t),i=K(t.data.value);return'\n <span class="tooltip-label">'+tt(e)+'</span>\n <span class="tooltip-val">'+i+"</span>\n "},t.prototype.color=function(t){return this.colors.getColor(this.label(t))},t.prototype.trackBy=function(t,e){return e.data.name},t.prototype.onClick=function(t){this.select.emit(t)},t.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.name===e.name&&t.series===e.series}))},T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"series",void 0),T([e.Input()],t.prototype,"dims",void 0),T([e.Input()],t.prototype,"innerRadius",void 0),T([e.Input()],t.prototype,"outerRadius",void 0),T([e.Input()],t.prototype,"explodeSlices",void 0),T([e.Input()],t.prototype,"showLabels",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"activeEntries",void 0),T([e.Input()],t.prototype,"labelFormatting",void 0),T([e.Input()],t.prototype,"trimLabels",void 0),T([e.Input()],t.prototype,"maxLabelLength",void 0),T([e.Input()],t.prototype,"tooltipText",void 0),T([e.Input()],t.prototype,"tooltipDisabled",void 0),T([e.Input()],t.prototype,"tooltipTemplate",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),T([e.Output()],t.prototype,"dblclick",void 0),t=T([e.Component({selector:"g[ngx-charts-pie-series]",template:'\n <svg:g *ngFor="let arc of data; trackBy: trackBy">\n <svg:g\n ngx-charts-pie-label\n *ngIf="labelVisible(arc)"\n [data]="arc"\n [radius]="outerRadius"\n [color]="color(arc)"\n [label]="labelText(arc)"\n [labelTrim]="trimLabels"\n [labelTrimSize]="maxLabelLength"\n [max]="max"\n [value]="arc.value"\n [explodeSlices]="explodeSlices"\n [animations]="animations"\n ></svg:g>\n <svg:g\n ngx-charts-pie-arc\n [startAngle]="arc.startAngle"\n [endAngle]="arc.endAngle"\n [innerRadius]="innerRadius"\n [outerRadius]="outerRadius"\n [fill]="color(arc)"\n [value]="arc.data.value"\n [gradient]="gradient"\n [data]="arc.data"\n [max]="max"\n [explodeSlices]="explodeSlices"\n [isActive]="isActive(arc.data)"\n [animate]="animations"\n (select)="onClick($event)"\n (activate)="activate.emit($event)"\n (deactivate)="deactivate.emit($event)"\n (dblclick)="dblclick.emit($event)"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="\'top\'"\n [tooltipType]="\'tooltip\'"\n [tooltipTitle]="getTooltipTitle(arc)"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="arc.data"\n ></svg:g>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),we=function(){function t(){}return t=T([e.NgModule({imports:[At],declarations:[ue,ve,me,ye,be,Te,ke],exports:[ue,ve,me,ye,be,Te,ke]})],t)}(),Ae=function(){function t(){}return t=T([e.NgModule({imports:[At,we,he],declarations:[de,ge],exports:[de,ge]})],t)}(),Ie=function(){function t(t,i,n){this.cd=i,this.zone=n,this.animations=!0,this.select=new e.EventEmitter,this.value="",this.textFontSize=12,this.textTransform="",this.initialized=!1,this.bandHeight=10,this.textPadding=[10,20,5,20],this.labelFontSize=15,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.ngOnDestroy=function(){cancelAnimationFrame(this.animationReq)},t.prototype.update=function(){var t=this;this.zone.run((function(){var e=t.data&&void 0!==t.data.value,i=t.valueFormatting||function(t){return t.value.toLocaleString()},n=t.labelFormatting||function(t){return tt(W(t.label,55))};t.transform="translate("+t.x+" , "+t.y+")",t.textWidth=Math.max(0,t.width)-t.textPadding[1]-t.textPadding[3],t.cardWidth=Math.max(0,t.width),t.cardHeight=Math.max(0,t.height),t.label=t.label?t.label:t.data.name;var a={label:t.label,data:t.data,value:t.data.value};t.formattedLabel=n(a),t.transformBand="translate(0 , "+(t.cardHeight-t.bandHeight)+")";var o=e?i(a):"";t.value=t.paddedValue(o),t.setPadding(),t.bandPath=$(0,0,t.cardWidth,t.bandHeight,3,[!1,!1,!0,!0]),setTimeout((function(){t.scaleText(),t.value=o,e&&!t.initialized&&setTimeout((function(){return t.startCount()}),20)}),8)}))},t.prototype.paddedValue=function(t){return this.medianSize&&this.medianSize>t.length&&(t+=" ".repeat(this.medianSize-t.length)),t},t.prototype.startCount=function(){var t=this;if(!this.initialized&&this.animations){cancelAnimationFrame(this.animationReq);var e=this.data.value,i=dt(e),n=this.valueFormatting||function(t){return t.value.toLocaleString()};this.animationReq=pt(0,e,i,1,(function(i){var a=i.value,o=i.finished;t.zone.run((function(){a=o?e:a,t.value=n({label:t.label,data:t.data,value:a}),o||(t.value=t.paddedValue(t.value)),t.cd.markForCheck()}))})),this.initialized=!0}},t.prototype.scaleText=function(){var t=this;this.zone.run((function(){var e=t.textEl.nativeElement.getBoundingClientRect(),i=e.width,n=e.height;if(0!==i&&0!==n){var a=t.textPadding[1]=t.textPadding[3]=t.cardWidth/8,o=t.cardWidth-2*a,s=t.cardHeight/3,r=Math.min(o/i,s/n);t.textFontSize=Math.floor(t.textFontSize*r),t.labelFontSize=Math.min(t.textFontSize,15),t.setPadding(),t.cd.markForCheck()}}))},t.prototype.setPadding=function(){this.textPadding[1]=this.textPadding[3]=this.cardWidth/8;var t=this.cardHeight/2;this.textPadding[0]=t-this.textFontSize-this.labelFontSize/2,this.textPadding[2]=t-this.labelFontSize},t.prototype.onClick=function(){this.select.emit(this.data)},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:e.NgZone}]},T([e.Input()],t.prototype,"color",void 0),T([e.Input()],t.prototype,"bandColor",void 0),T([e.Input()],t.prototype,"textColor",void 0),T([e.Input()],t.prototype,"x",void 0),T([e.Input()],t.prototype,"y",void 0),T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"height",void 0),T([e.Input()],t.prototype,"label",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"medianSize",void 0),T([e.Input()],t.prototype,"valueFormatting",void 0),T([e.Input()],t.prototype,"labelFormatting",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.ViewChild("textEl",{static:!1})],t.prototype,"textEl",void 0),t=T([e.Component({selector:"g[ngx-charts-card]",template:'\n <svg:g [attr.transform]="transform" class="cell" (click)="onClick()">\n <svg:rect class="card" [style.fill]="color" [attr.width]="cardWidth" [attr.height]="cardHeight" rx="3" ry="3" />\n <svg:path\n *ngIf="bandColor && bandColor !== color"\n class="card-band"\n [attr.fill]="bandColor"\n [attr.transform]="transformBand"\n stroke="none"\n [attr.d]="bandPath"\n />\n <title>{{ label }}</title>\n <svg:foreignObject\n class="trimmed-label"\n x="5"\n [attr.x]="textPadding[3]"\n [attr.y]="cardHeight - textPadding[2]"\n [attr.width]="textWidth"\n [attr.height]="labelFontSize + textPadding[2]"\n alignment-baseline="hanging"\n >\n <xhtml:p\n [style.color]="textColor"\n [style.fontSize.px]="labelFontSize"\n [style.lineHeight.px]="labelFontSize"\n [innerHTML]="formattedLabel"\n >\n </xhtml:p>\n </svg:foreignObject>\n <svg:text\n #textEl\n class="value-text"\n [attr.x]="textPadding[3]"\n [attr.y]="textPadding[0]"\n [style.fill]="textColor"\n text-anchor="start"\n alignment-baseline="hanging"\n [style.font-size.pt]="textFontSize"\n >\n {{ value }}\n </svg:text>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}();function Le(t){var e=v.rgb(t),i=e.r,n=e.g,a=e.b;return 0===e.opacity?e.toString():Se(e,(299*i+587*n+114*a)/1e3>=128?-.8:.8)}function Se(t,e){var i=t.r,n=t.g,a=t.b,o=e<0?0:255,s=e<0?-1*e:e;return"rgb("+(i=Math.round((o-i)*s)+i)+", "+(n=Math.round((o-n)*s)+n)+", "+(a=Math.round((o-a)*s)+a)+")"}var De=function(){function t(){this.innerPadding=15,this.emptyColor="rgba(0, 0, 0, 0)",this.animations=!0,this.select=new e.EventEmitter}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){if(this.data.length>2){var t=this.valueFormatting||function(t){return t.value.toLocaleString()},e=this.data.map((function(e){return e&&e.data&&void 0!==e.data.value&&null!==e.data.value?t({data:e.data,label:e?e.data.name:"",value:e&&e.data?e.data.value:""}).length:0})).sort((function(t,e){return e-t})),i=Math.ceil(this.data.length/2);this.medianSize=e[i]}var n=this.getCards();this.cards=n.filter((function(t){return null!==t.data.value})),this.emptySlots=n.filter((function(t){return null===t.data.value}))},t.prototype.getCards=function(){var t=this,e="number"==typeof this.innerPadding?this.innerPadding:this.innerPadding[0]+this.innerPadding[2],i="number"==typeof this.innerPadding?this.innerPadding:this.innerPadding[1]+this.innerPadding[3];return this.data.map((function(n,a){var o=n.data.name;o=o&&"Date"===o.constructor.name?o.toLocaleDateString():o?o.toLocaleString():o;var s=n.data.value,r=o?t.colors.getColor(o):t.emptyColor,l=t.cardColor||r||"#000";return{x:n.x,y:n.y,width:n.width-i,height:n.height-e,color:l,bandColor:t.bandColor||r,textColor:t.textColor||Le(l),label:o,data:n.data,tooltipText:o+": "+s}}))},t.prototype.trackBy=function(t,e){return e.label},t.prototype.onClick=function(t){this.select.emit(t)},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"slots",void 0),T([e.Input()],t.prototype,"dims",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"innerPadding",void 0),T([e.Input()],t.prototype,"cardColor",void 0),T([e.Input()],t.prototype,"bandColor",void 0),T([e.Input()],t.prototype,"emptyColor",void 0),T([e.Input()],t.prototype,"textColor",void 0),T([e.Input()],t.prototype,"valueFormatting",void 0),T([e.Input()],t.prototype,"labelFormatting",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),t=T([e.Component({selector:"g[ngx-charts-card-series]",template:'\n <svg:rect\n *ngFor="let c of emptySlots; trackBy: trackBy"\n class="card-empty"\n [attr.x]="c.x"\n [attr.y]="c.y"\n [style.fill]="emptyColor"\n [attr.width]="c.width"\n [attr.height]="c.height"\n rx="3"\n ry="3"\n />\n <svg:g\n ngx-charts-card\n *ngFor="let c of cards; trackBy: trackBy"\n [x]="c.x"\n [y]="c.y"\n [width]="c.width"\n [height]="c.height"\n [color]="c.color"\n [bandColor]="c.bandColor"\n [textColor]="c.textColor"\n [data]="c.data"\n [label]="c.label"\n [medianSize]="medianSize"\n [valueFormatting]="valueFormatting"\n [labelFormatting]="labelFormatting"\n [animations]="animations"\n (select)="onClick($event)"\n />\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Ce=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.emptyColor="rgba(0, 0, 0, 0)",e.innerPadding=15,e.margin=[10,10,10,10],e}return f(i,t),Object.defineProperty(i.prototype,"clickable",{get:function(){return!!this.select.observers.length},enumerable:!0,configurable:!0}),i.prototype.update=function(){t.prototype.update.call(this),this.dims=It({width:this.width,height:this.height,margins:this.margin}),this.formatDates(),this.domain=this.getDomain(),this.setColors(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")";for(var e=xe(this.dims,this.results.length,150),i=e[0]*e[1],n=this.results.slice();n.length<i;)n.push({value:null});this.data=fe(this.dims,n,150,this.designatedTotal)},i.prototype.getDomain=function(){return this.results.map((function(t){return t.label}))},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.setColors=function(){this.colors=new St(this.scheme,"ordinal",this.domain,this.customColors)},T([e.Input()],i.prototype,"cardColor",void 0),T([e.Input()],i.prototype,"bandColor",void 0),T([e.Input()],i.prototype,"emptyColor",void 0),T([e.Input()],i.prototype,"innerPadding",void 0),T([e.Input()],i.prototype,"textColor",void 0),T([e.Input()],i.prototype,"valueFormatting",void 0),T([e.Input()],i.prototype,"labelFormatting",void 0),T([e.Input()],i.prototype,"designatedTotal",void 0),i=T([e.Component({selector:"ngx-charts-number-card",template:'\n <ngx-charts-chart [view]="[width, height]" [showLegend]="false" [animations]="animations">\n <svg:g [attr.transform]="transform" class="number-card chart" [class.clickable]="clickable">\n <svg:g\n ngx-charts-card-series\n [colors]="colors"\n [cardColor]="cardColor"\n [bandColor]="bandColor"\n [textColor]="textColor"\n [emptyColor]="emptyColor"\n [data]="data"\n [dims]="dims"\n [innerPadding]="innerPadding"\n [valueFormatting]="valueFormatting"\n [labelFormatting]="labelFormatting"\n [animations]="animations"\n (select)="onClick($event)"\n />\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}","ngx-charts-number-card .cell .trimmed-label{font-size:12px;pointer-events:none;overflow:hidden;text-align:left;line-height:1em}ngx-charts-number-card .cell .trimmed-label p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%;padding:0;margin:0}ngx-charts-number-card .cell .value-text{pointer-events:none}ngx-charts-number-card .number-card.clickable .cell .card,ngx-charts-number-card .number-card.clickable .cell .card-band{cursor:pointer}"]})],i)}(z),Ee=function(){function t(){}return t=T([e.NgModule({imports:[At],declarations:[Ie,De,Ce],exports:[Ie,De,Ce]})],t)}(),Oe=function(){function t(t){this.gradient=!1,this.animations=!0,this.select=new e.EventEmitter,this.initialized=!1,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(){this.update(),this.valueFormatting=this.valueFormatting||function(t){return t.toLocaleString()};var t=this.labelFormatting||function(t){return tt(W(t.label,55))},e={data:this.data,label:this.label,value:this.value};this.formattedValue=this.valueFormatting(e.value),this.formattedLabel=t(e),this.gradientId="grad"+it().toString(),this.gradientUrl="url(#"+this.gradientId+")",this.gradientStops=this.getGradientStops()},t.prototype.update=function(){this.initialized?this.animateToCurrentForm():(this.animations&&this.loadAnimation(),this.initialized=!0)},t.prototype.loadAnimation=function(){r.select(this.element).select(".cell").attr("opacity",0).attr("x",this.x).attr("y",this.y),this.animateToCurrentForm()},t.prototype.getTextColor=function(){return Le(this.fill)},t.prototype.animateToCurrentForm=function(){var t=r.select(this.element).select(".cell");this.animations?t.transition().duration(750).attr("opacity",1).attr("x",this.x).attr("y",this.y).attr("width",this.width).attr("height",this.height):t.attr("opacity",1).attr("x",this.x).attr("y",this.y).attr("width",this.width).attr("height",this.height)},t.prototype.onClick=function(){this.select.emit(this.data)},t.prototype.getGradientStops=function(){return[{offset:0,color:this.fill,opacity:.3},{offset:100,color:this.fill,opacity:1}]},t.ctorParameters=function(){return[{type:e.ElementRef}]},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"fill",void 0),T([e.Input()],t.prototype,"x",void 0),T([e.Input()],t.prototype,"y",void 0),T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"height",void 0),T([e.Input()],t.prototype,"label",void 0),T([e.Input()],t.prototype,"value",void 0),T([e.Input()],t.prototype,"valueType",void 0),T([e.Input()],t.prototype,"valueFormatting",void 0),T([e.Input()],t.prototype,"labelFormatting",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),t=T([e.Component({selector:"g[ngx-charts-tree-map-cell]",template:'\n <svg:g>\n <defs *ngIf="gradient">\n <svg:g ngx-charts-svg-linear-gradient orientation="vertical" [name]="gradientId" [stops]="gradientStops" />\n </defs>\n <svg:rect\n [attr.fill]="gradient ? gradientUrl : fill"\n [attr.width]="width"\n [attr.height]="height"\n [attr.x]="x"\n [attr.y]="y"\n [style.cursor]="\'pointer\'"\n class="cell"\n (click)="onClick()"\n />\n <svg:foreignObject\n *ngIf="width >= 70 && height >= 35"\n [attr.x]="x"\n [attr.y]="y"\n [attr.width]="width"\n [attr.height]="height"\n class="treemap-label"\n [style.pointer-events]="\'none\'"\n >\n <xhtml:p [style.color]="getTextColor()" [style.height]="height + \'px\'" [style.width]="width + \'px\'">\n <xhtml:span class="treemap-label" [innerHTML]="formattedLabel"> </xhtml:span>\n <xhtml:br />\n <xhtml:span\n *ngIf="animations"\n class="treemap-val"\n ngx-charts-count-up\n [countTo]="value"\n [valueFormatting]="valueFormatting"\n >\n </xhtml:span>\n <xhtml:span *ngIf="!animations" class="treemap-val">\n {{ formattedValue }}\n </xhtml:span>\n </xhtml:p>\n </svg:foreignObject>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Me=function(){function t(){this.gradient=!1,this.tooltipDisabled=!1,this.animations=!0,this.select=new e.EventEmitter}return t.prototype.ngOnChanges=function(t){this.cells=this.getCells()},t.prototype.getCells=function(){var t=this;return this.data.children.filter((function(t){return 1===t.depth})).map((function(e,i){var n=e.id;return{data:e.data,x:e.x0,y:e.y0,width:e.x1-e.x0,height:e.y1-e.y0,fill:t.colors.getColor(n),label:n,value:e.value,valueType:e.valueType}}))},t.prototype.getTooltipText=function(t){var e=t.label,i=t.value;return'\n <span class="tooltip-label">'+tt(e)+'</span>\n <span class="tooltip-val">'+i.toLocaleString()+"</span>\n "},t.prototype.onClick=function(t){this.select.emit(t)},t.prototype.trackBy=function(t,e){return e.label},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"dims",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"valueFormatting",void 0),T([e.Input()],t.prototype,"labelFormatting",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"tooltipDisabled",void 0),T([e.Input()],t.prototype,"tooltipTemplate",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),t=T([e.Component({selector:"g[ngx-charts-tree-map-cell-series]",template:'\n <svg:g\n ngx-charts-tree-map-cell\n *ngFor="let c of cells; trackBy: trackBy"\n [data]="c.data"\n [x]="c.x"\n [y]="c.y"\n [width]="c.width"\n [height]="c.height"\n [fill]="c.fill"\n [label]="c.label"\n [value]="c.value"\n [valueType]="c.valueType"\n [valueFormatting]="valueFormatting"\n [labelFormatting]="labelFormatting"\n [gradient]="gradient"\n [animations]="animations"\n (select)="onClick($event)"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="\'top\'"\n [tooltipType]="\'tooltip\'"\n [tooltipTitle]="tooltipTemplate ? undefined : getTooltipText(c)"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="c.data"\n ></svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Fe=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.tooltipDisabled=!1,i.gradient=!1,i.select=new e.EventEmitter,i.margin=[10,10,10,10],i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.dims=It({width:this.width,height:this.height,margins:this.margin}),this.domain=this.getDomain(),this.treemap=m.treemap().size([this.dims.width,this.dims.height]);var e=m.stratify().id((function(t){var e=t.name;return e="Date"===e.constructor.name?e.toLocaleDateString():e.toLocaleString()})).parentId((function(t){return t.isRoot?null:"root"}))(A([{name:"root",value:0,isRoot:!0}],this.results)).sum((function(t){return t.value}));this.data=this.treemap(e),this.setColors(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")"},i.prototype.getDomain=function(){return this.results.map((function(t){return t.name}))},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.setColors=function(){this.colors=new St(this.scheme,"ordinal",this.domain,this.customColors)},T([e.Input()],i.prototype,"results",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"valueFormatting",void 0),T([e.Input()],i.prototype,"labelFormatting",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Output()],i.prototype,"select",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-tree-map",template:'\n <ngx-charts-chart [view]="[width, height]" [showLegend]="false" [animations]="animations">\n <svg:g [attr.transform]="transform" class="tree-map chart">\n <svg:g\n ngx-charts-tree-map-cell-series\n [colors]="colors"\n [data]="data"\n [dims]="dims"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [valueFormatting]="valueFormatting"\n [labelFormatting]="labelFormatting"\n [gradient]="gradient"\n [animations]="animations"\n (select)="onClick($event)"\n />\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".tree-map .treemap-val{font-size:1.3em;padding-top:5px;display:inline-block}.tree-map .treemap-label p{display:table-cell;text-align:center;line-height:1.2em;vertical-align:middle}"]})],i)}(z),Pe=function(){function t(){}return t=T([e.NgModule({imports:[At],declarations:[Oe,Me,Fe],exports:[Oe,Me,Fe]})],t)}(),Xe=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.min=0,e.max=100,e.value=0,e.margin=[10,20,10,20],e.valueResizeScale=1,e.unitsResizeScale=1,e.valueTextTransform="",e.valueTranslate="",e.unitsTextTransform="",e.unitsTranslate="",e}return f(i,t),i.prototype.ngAfterViewInit=function(){var e=this;t.prototype.ngAfterViewInit.call(this),setTimeout((function(){e.scaleText("value"),e.scaleText("units")}))},i.prototype.update=function(){var e=this;t.prototype.update.call(this),this.hasPreviousValue=void 0!==this.previousValue,this.max=Math.max(this.max,this.value),this.min=Math.min(this.min,this.value),this.hasPreviousValue&&(this.max=Math.max(this.max,this.previousValue),this.min=Math.min(this.min,this.previousValue)),this.dims=It({width:this.width,height:this.height,margins:this.margin}),this.valueDomain=this.getValueDomain(),this.valueScale=this.getValueScale(),this.displayValue=this.getDisplayValue(),this.setColors();var i=this.margin[3]+this.dims.width/2,n=this.margin[0]+this.dims.height/2;this.transform="translate("+i+", "+n+")",this.transformLine="translate("+(this.margin[3]+this.valueScale(this.previousValue))+", "+n+")",this.valueTranslate="translate(0, -15)",this.unitsTranslate="translate(0, 15)",setTimeout((function(){return e.scaleText("value")}),50),setTimeout((function(){return e.scaleText("units")}),50)},i.prototype.getValueDomain=function(){return[this.min,this.max]},i.prototype.getValueScale=function(){return c.scaleLinear().range([0,this.dims.width]).domain(this.valueDomain)},i.prototype.getDisplayValue=function(){return this.valueFormatting?this.valueFormatting(this.value):this.value.toLocaleString()},i.prototype.scaleText=function(t,e){var i,n,a=this;void 0===e&&(e=!0),"value"===t?(i=this.valueTextEl,n=this.valueResizeScale):(i=this.unitsTextEl,n=this.unitsResizeScale);var o=i.nativeElement.getBoundingClientRect(),s=o.width,r=o.height;if(0!==s&&0!==r){var l=n,c=this.dims.width,h=Math.max(this.dims.height/2-15,0),p=Math.floor(c/(s/n)*100)/100,d=Math.floor(h/(r/n)*100)/100;(n=Math.min(d,p))!==l&&("value"===t?(this.valueResizeScale=n,this.valueTextTransform="scale("+n+", "+n+")"):(this.unitsResizeScale=n,this.unitsTextTransform="scale("+n+", "+n+")"),this.cd.markForCheck(),e&&setTimeout((function(){a.scaleText(t,!1)}),50))}},i.prototype.onClick=function(){this.select.emit({name:"Value",value:this.value})},i.prototype.setColors=function(){this.colors=new St(this.scheme,"ordinal",[this.value],this.customColors)},T([e.Input()],i.prototype,"min",void 0),T([e.Input()],i.prototype,"max",void 0),T([e.Input()],i.prototype,"value",void 0),T([e.Input()],i.prototype,"units",void 0),T([e.Input()],i.prototype,"previousValue",void 0),T([e.Input()],i.prototype,"valueFormatting",void 0),T([e.ViewChild("valueTextEl")],i.prototype,"valueTextEl",void 0),T([e.ViewChild("unitsTextEl")],i.prototype,"unitsTextEl",void 0),i=T([e.Component({selector:"ngx-charts-linear-gauge",template:'\n <ngx-charts-chart [view]="[width, height]" [showLegend]="false" [animations]="animations" (click)="onClick()">\n <svg:g class="linear-gauge chart">\n <svg:g\n ngx-charts-bar\n class="background-bar"\n [width]="dims.width"\n [height]="3"\n [x]="margin[3]"\n [y]="dims.height / 2 + margin[0] - 2"\n [data]="{}"\n [orientation]="\'horizontal\'"\n [roundEdges]="true"\n [animations]="animations"\n ></svg:g>\n <svg:g\n ngx-charts-bar\n [width]="valueScale(value)"\n [height]="3"\n [x]="margin[3]"\n [y]="dims.height / 2 + margin[0] - 2"\n [fill]="colors.getColor(units)"\n [data]="{}"\n [orientation]="\'horizontal\'"\n [roundEdges]="true"\n [animations]="animations"\n ></svg:g>\n\n <svg:line\n *ngIf="hasPreviousValue"\n [attr.transform]="transformLine"\n x1="0"\n y1="5"\n x2="0"\n y2="15"\n [attr.stroke]="colors.getColor(units)"\n />\n\n <svg:line\n *ngIf="hasPreviousValue"\n [attr.transform]="transformLine"\n x1="0"\n y1="-5"\n x2="0"\n y2="-15"\n [attr.stroke]="colors.getColor(units)"\n />\n\n <svg:g [attr.transform]="transform">\n <svg:g [attr.transform]="valueTranslate">\n <svg:text\n #valueTextEl\n class="value"\n [style.textAnchor]="\'middle\'"\n [attr.transform]="valueTextTransform"\n alignment-baseline="after-edge"\n >\n {{ displayValue }}\n </svg:text>\n </svg:g>\n\n <svg:g [attr.transform]="unitsTranslate">\n <svg:text\n #unitsTextEl\n class="units"\n [style.textAnchor]="\'middle\'"\n [attr.transform]="unitsTextTransform"\n alignment-baseline="before-edge"\n >\n {{ units }}\n </svg:text>\n </svg:g>\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}",".linear-gauge{cursor:pointer}.linear-gauge .background-bar path{fill:rgba(0,0,0,.05)}.linear-gauge .units{fill:#666}"]})],i)}(z),Ye=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.min=0,i.max=100,i.bigSegments=10,i.smallSegments=5,i.showAxis=!0,i.startAngle=-120,i.angleSpan=240,i.activeEntries=[],i.tooltipDisabled=!1,i.showText=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.resizeScale=1,i.rotation="",i.textTransform="scale(1, 1)",i.cornerRadius=10,i}return f(i,t),i.prototype.ngAfterViewInit=function(){var e=this;t.prototype.ngAfterViewInit.call(this),setTimeout((function(){return e.scaleText()}))},i.prototype.update=function(){var e=this;t.prototype.update.call(this),this.showAxis?this.margin||(this.margin=[60,100,60,100]):this.margin||(this.margin=[10,20,10,20]),this.startAngle<0&&(this.startAngle=this.startAngle%360+360),this.angleSpan=Math.min(this.angleSpan,360),this.dims=It({width:this.width,height:this.height,margins:this.margin,showLegend:this.legend,legendPosition:this.legendPosition}),this.domain=this.getDomain(),this.valueDomain=this.getValueDomain(),this.valueScale=this.getValueScale(),this.displayValue=this.getDisplayValue(),this.outerRadius=Math.min(this.dims.width,this.dims.height)/2,this.arcs=this.getArcs(),this.setColors(),this.legendOptions=this.getLegendOptions();var i=this.margin[3]+this.dims.width/2,n=this.margin[0]+this.dims.height/2;this.transform="translate("+i+", "+n+")",this.rotation="rotate("+this.startAngle+")",setTimeout((function(){return e.scaleText()}),50)},i.prototype.getArcs=function(){var t,e,i=[],n=.7*this.outerRadius,a=Math.min(n/this.results.length,10),o=.7*a;this.textRadius=this.outerRadius-this.results.length*a,this.cornerRadius=Math.floor(o/2);var s=0;try{for(var r=k(this.results),l=r.next();!l.done;l=r.next()){var c=l.value,h=this.outerRadius-s*a,p=h-o,d={backgroundArc:{endAngle:this.angleSpan*Math.PI/180,innerRadius:p,outerRadius:h,data:{value:this.max,name:c.name}},valueArc:{endAngle:Math.min(this.valueScale(c.value),this.angleSpan)*Math.PI/180,innerRadius:p,outerRadius:h,data:{value:c.value,name:c.name}}};i.push(d),s++}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return i},i.prototype.getDomain=function(){return this.results.map((function(t){return t.name}))},i.prototype.getValueDomain=function(){var t=this.results.map((function(t){return t.value})),e=Math.min.apply(Math,A(t)),i=Math.max.apply(Math,A(t));return void 0!==this.min?this.min=Math.min(this.min,e):this.min=e,void 0!==this.max?this.max=Math.max(this.max,i):this.max=i,[this.min,this.max]},i.prototype.getValueScale=function(){return c.scaleLinear().range([0,this.angleSpan]).nice().domain(this.valueDomain)},i.prototype.getDisplayValue=function(){var t=this.results.map((function(t){return t.value})).reduce((function(t,e){return t+e}),0);return this.textValue&&0!==this.textValue.length?this.textValue.toLocaleString():this.valueFormatting?this.valueFormatting(t):t.toLocaleString()},i.prototype.scaleText=function(t){var e=this;if(void 0===t&&(t=!0),this.showText){var i=this.textEl.nativeElement.getBoundingClientRect().width,n=this.resizeScale;if(0===i)this.resizeScale=1;else{var a=this.textRadius;this.resizeScale=Math.floor(a/(i/this.resizeScale)*100)/100}this.resizeScale!==n&&(this.textTransform="scale("+this.resizeScale+", "+this.resizeScale+")",this.cd.markForCheck(),t&&setTimeout((function(){return e.scaleText(!1)}),50))}},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.getLegendOptions=function(){return{scaleType:"ordinal",colors:this.colors,domain:this.domain,title:this.legendTitle,position:this.legendPosition}},i.prototype.setColors=function(){this.colors=new St(this.scheme,"ordinal",this.domain,this.customColors)},i.prototype.onActivate=function(t){this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t){var e=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}));this.activeEntries.splice(e,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},i.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.name===e.name&&t.series===e.series}))},i.prototype.trackBy=function(t,e){return e.valueArc.data.name},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"min",void 0),T([e.Input()],i.prototype,"max",void 0),T([e.Input()],i.prototype,"textValue",void 0),T([e.Input()],i.prototype,"units",void 0),T([e.Input()],i.prototype,"bigSegments",void 0),T([e.Input()],i.prototype,"smallSegments",void 0),T([e.Input()],i.prototype,"results",void 0),T([e.Input()],i.prototype,"showAxis",void 0),T([e.Input()],i.prototype,"startAngle",void 0),T([e.Input()],i.prototype,"angleSpan",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"axisTickFormatting",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"valueFormatting",void 0),T([e.Input()],i.prototype,"showText",void 0),T([e.Input()],i.prototype,"margin",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),T([e.ViewChild("textEl")],i.prototype,"textEl",void 0),i=T([e.Component({selector:"ngx-charts-gauge",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelClick)="onClick($event)"\n (legendLabelActivate)="onActivate($event)"\n (legendLabelDeactivate)="onDeactivate($event)"\n >\n <svg:g [attr.transform]="transform" class="gauge chart">\n <svg:g *ngFor="let arc of arcs; trackBy: trackBy" [attr.transform]="rotation">\n <svg:g\n ngx-charts-gauge-arc\n [backgroundArc]="arc.backgroundArc"\n [valueArc]="arc.valueArc"\n [cornerRadius]="cornerRadius"\n [colors]="colors"\n [isActive]="isActive(arc.valueArc.data)"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [valueFormatting]="valueFormatting"\n [animations]="animations"\n (select)="onClick($event)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n ></svg:g>\n </svg:g>\n\n <svg:g\n ngx-charts-gauge-axis\n *ngIf="showAxis"\n [bigSegments]="bigSegments"\n [smallSegments]="smallSegments"\n [min]="min"\n [max]="max"\n [radius]="outerRadius"\n [angleSpan]="angleSpan"\n [valueScale]="valueScale"\n [startAngle]="startAngle"\n [tickFormatting]="axisTickFormatting"\n ></svg:g>\n\n <svg:text\n #textEl\n *ngIf="showText"\n [style.textAnchor]="\'middle\'"\n [attr.transform]="textTransform"\n alignment-baseline="central"\n >\n <tspan x="0" dy="0">{{ displayValue }}</tspan>\n <tspan x="0" dy="1.2em">{{ units }}</tspan>\n </svg:text>\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{-webkit-transition:opacity .1s ease-in-out;transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}",".gauge .background-arc path{fill:rgba(0,0,0,.05)}.gauge .gauge-tick path{stroke:#666}.gauge .gauge-tick text{font-size:12px;fill:#666;font-weight:700}.gauge .gauge-tick-large path{stroke-width:2px}.gauge .gauge-tick-small path{stroke-width:1px}"]})],i)}(z),Re=function(){function t(){this.isActive=!1,this.tooltipDisabled=!1,this.animations=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter}return t.prototype.tooltipText=function(t){var e,i=K(t.data.name);return e=this.valueFormatting?this.valueFormatting(t.data.value):K(t.data.value),'\n <span class="tooltip-label">'+tt(i)+'</span>\n <span class="tooltip-val">'+e+"</span>\n "},T([e.Input()],t.prototype,"backgroundArc",void 0),T([e.Input()],t.prototype,"valueArc",void 0),T([e.Input()],t.prototype,"cornerRadius",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"isActive",void 0),T([e.Input()],t.prototype,"tooltipDisabled",void 0),T([e.Input()],t.prototype,"valueFormatting",void 0),T([e.Input()],t.prototype,"tooltipTemplate",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),t=T([e.Component({selector:"g[ngx-charts-gauge-arc]",template:'\n <svg:g\n ngx-charts-pie-arc\n class="background-arc"\n [startAngle]="0"\n [endAngle]="backgroundArc.endAngle"\n [innerRadius]="backgroundArc.innerRadius"\n [outerRadius]="backgroundArc.outerRadius"\n [cornerRadius]="cornerRadius"\n [data]="backgroundArc.data"\n [animate]="false"\n [pointerEvents]="false"\n ></svg:g>\n <svg:g\n ngx-charts-pie-arc\n [startAngle]="0"\n [endAngle]="valueArc.endAngle"\n [innerRadius]="valueArc.innerRadius"\n [outerRadius]="valueArc.outerRadius"\n [cornerRadius]="cornerRadius"\n [fill]="colors.getColor(valueArc.data.name)"\n [data]="valueArc.data"\n [animate]="animations"\n [isActive]="isActive"\n (select)="select.emit($event)"\n (activate)="activate.emit($event)"\n (deactivate)="deactivate.emit($event)"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="\'top\'"\n [tooltipType]="\'tooltip\'"\n [tooltipTitle]="tooltipTemplate ? undefined : tooltipText(valueArc)"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="valueArc.data"\n ></svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),ze=function(){function t(){this.rotate=""}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.rotationAngle=-90+this.startAngle,this.rotate="rotate("+this.rotationAngle+")",this.ticks=this.getTicks()},t.prototype.getTicks=function(){for(var t=this.angleSpan/this.bigSegments,e=t/this.smallSegments,i={big:[],small:[]},n=this.radius+10,a=n+20+10,o=0;o<=this.bigSegments;o++){var s=o*t,r=s*Math.PI/180,l=this.getTextAnchor(s),c=!1;if(0===o&&360===this.angleSpan&&(c=!0),!c){var h=Number.parseFloat(this.valueScale.invert(s).toString()).toLocaleString();this.tickFormatting&&(h=this.tickFormatting(h)),i.big.push({line:this.getTickPath(n,20,r),textAnchor:l,text:h,textTransform:"\n translate("+a*Math.cos(r)+", "+a*Math.sin(r)+") rotate("+-this.rotationAngle+")\n "})}if(o!==this.bigSegments)for(var p=1;p<=this.smallSegments;p++){var d=(s+p*e)*Math.PI/180;i.small.push({line:this.getTickPath(n,10,d)})}}return i},t.prototype.getTextAnchor=function(t){var e="middle";return(t=(this.startAngle+t)%360)>45&&t<=135?e="start":t>225&&t<=315&&(e="end"),e},t.prototype.getTickPath=function(t,e,i){var n=t*Math.sin(i),a=(t+e)*Math.sin(i),o=[{x:t*Math.cos(i),y:n},{x:(t+e)*Math.cos(i),y:a}];return p.line().x((function(t){return t.x})).y((function(t){return t.y}))(o)},T([e.Input()],t.prototype,"bigSegments",void 0),T([e.Input()],t.prototype,"smallSegments",void 0),T([e.Input()],t.prototype,"min",void 0),T([e.Input()],t.prototype,"max",void 0),T([e.Input()],t.prototype,"angleSpan",void 0),T([e.Input()],t.prototype,"startAngle",void 0),T([e.Input()],t.prototype,"radius",void 0),T([e.Input()],t.prototype,"valueScale",void 0),T([e.Input()],t.prototype,"tickFormatting",void 0),t=T([e.Component({selector:"g[ngx-charts-gauge-axis]",template:'\n <svg:g [attr.transform]="rotate">\n <svg:g *ngFor="let tick of ticks.big" class="gauge-tick gauge-tick-large">\n <svg:path [attr.d]="tick.line" />\n </svg:g>\n <svg:g *ngFor="let tick of ticks.big" class="gauge-tick gauge-tick-large">\n <svg:text\n [style.textAnchor]="tick.textAnchor"\n [attr.transform]="tick.textTransform"\n alignment-baseline="central"\n >\n {{ tick.text }}\n </svg:text>\n </svg:g>\n <svg:g *ngFor="let tick of ticks.small" class="gauge-tick gauge-tick-small">\n <svg:path [attr.d]="tick.line" />\n </svg:g>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),He=function(){function t(){}return t=T([e.NgModule({imports:[At,we,Jt],declarations:[Xe,Ye,Re,ze],exports:[Xe,Ye,Re,ze]})],t)}();var We=function(){function t(){"undefined"!=typeof SVGElement&&void 0===SVGElement.prototype.contains&&(SVGElement.prototype.contains=HTMLDivElement.prototype.contains)}return t=T([e.NgModule({exports:[At,zt,Jt,ie,se,he,Ae,Ee,we,Pe,He]})],t)}();t.AdvancedLegendComponent=kt,t.AdvancedPieChartComponent=ue,t.AreaChartComponent=Et,t.AreaChartModule=zt,t.AreaChartNormalizedComponent=Ot,t.AreaChartStackedComponent=Mt,t.AreaComponent=ct,t.AreaSeriesComponent=Rt,t.AxesModule=U,t.AxisLabelComponent=H,t.BarChartModule=Jt,t.BarComponent=Ht,t.BarHorizontal2DComponent=Bt,t.BarHorizontalComponent=Wt,t.BarHorizontalNormalizedComponent=Vt,t.BarHorizontalStackedComponent=Gt,t.BarLabelComponent=Ut,t.BarVertical2DComponent=Nt,t.BarVerticalComponent=$t,t.BarVerticalNormalizedComponent=jt,t.BarVerticalStackedComponent=Zt,t.BaseChartComponent=z,t.BubbleChartComponent=te,t.BubbleChartModule=ie,t.BubbleSeriesComponent=ee,t.CardComponent=Ie,t.CardSeriesComponent=De,t.ChartCommonModule=At,t.ChartComponent=Y,t.CircleComponent=at,t.CircleSeriesComponent=nt,t.ColorHelper=St,t.CountUpDirective=ut,t.GaugeArcComponent=Re,t.GaugeAxisComponent=ze,t.GaugeComponent=Ye,t.GaugeModule=He,t.GridPanelComponent=ot,t.GridPanelSeriesComponent=st,t.HeatCellSeriesComponent=ae,t.HeatMapCellComponent=ne,t.HeatMapComponent=oe,t.HeatMapModule=se,t.LegendComponent=ft,t.LegendEntryComponent=bt,t.LineChartComponent=le,t.LineChartModule=he,t.LineComponent=re,t.LineSeriesComponent=ce,t.LinearGaugeComponent=Xe,t.NgxChartsModule=We,t.NumberCardComponent=Ce,t.NumberCardModule=Ee,t.PieArcComponent=me,t.PieChartComponent=ye,t.PieChartModule=we,t.PieGridComponent=be,t.PieGridSeriesComponent=Te,t.PieLabelComponent=ve,t.PieSeriesComponent=ke,t.PolarChartComponent=de,t.PolarChartModule=Ae,t.PolarSeriesComponent=ge,t.ScaleLegendComponent=Tt,t.SeriesHorizontal=qt,t.SeriesVerticalComponent=_t,t.SvgLinearGradientComponent=rt,t.SvgRadialGradientComponent=lt,t.Timeline=xt,t.TooltipArea=yt,t.TooltipContentComponent=F,t.TooltipDirective=J,t.TooltipModule=Q,t.TooltipService=X,t.TreeMapCellComponent=Oe,t.TreeMapCellSeriesComponent=Me,t.TreeMapComponent=Fe,t.TreeMapModule=Pe,t.VisibilityObserver=R,t.XAxisComponent=G,t.XAxisTicksComponent=V,t.YAxisComponent=q,t.YAxisTicksComponent=_,t.calculateViewDimensions=It,t.colorSets=Lt,t.count=pt,t.decimalChecker=dt,t.escapeLabel=tt,t.formatLabel=K,t.getDomain=Qt,t.getScale=Kt,t.getScaleType=Ct,t.getUniqueXDomainValues=Dt,t.gridLayout=fe,t.gridSize=xe,t.hexToRgb=function(t){return v.rgb(t)},t.id=it,t.invertColor=Le,t.reduceTicks=B,t.shadeRGBColor=Se,t.sortByDomain=Pt,t.sortByTime=Xt,t.sortLinear=Ft,t.throttle=S,t.throttleable=D,t.tickFormat=function(t,e){return function(i){return"No Value"===i||"Other"===i?i:"date"===t&&"groupBy"===e?y.timeFormat("MM/DD/YYYY")(i):i.toString()}},t.trimLabel=W,t.ɵa=P,t.ɵb=L,Object.defineProperty(t,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var x=function(t,e){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function f(t,e){function i(){this.constructor=t}x(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var b=function(){return(b=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var a in e=arguments[i])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t}).apply(this,arguments)};function T(t,e,i,n){var a,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s}function k(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,a,o=i.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){a={error:t}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(a)throw a.error}}return s}function A(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(w(arguments[e]));return t}var I,L=function(){function t(t,e,i){this.applicationRef=t,this.componentFactoryResolver=e,this.injector=i}var i;return i=t,t.setGlobalRootViewContainer=function(t){i.globalRootViewContainer=t},t.prototype.getRootViewContainer=function(){if(this._container)return this._container;if(i.globalRootViewContainer)return i.globalRootViewContainer;if(this.applicationRef.components.length)return this.applicationRef.components[0];throw new Error("View Container not found! ngUpgrade needs to manually set this via setRootViewContainer or setGlobalRootViewContainer.")},t.prototype.setRootViewContainer=function(t){this._container=t},t.prototype.getComponentRootNode=function(t){return t.element?t.element.nativeElement:t.hostView&&t.hostView.rootNodes.length>0?t.hostView.rootNodes[0]:t.location.nativeElement},t.prototype.getRootViewContainerNode=function(t){return this.getComponentRootNode(t)},t.prototype.projectComponentBindings=function(t,e){var i,n,a,o;if(e){if(void 0!==e.inputs){var s=Object.getOwnPropertyNames(e.inputs);try{for(var r=k(s),l=r.next();!l.done;l=r.next()){var c=l.value;t.instance[c]=e.inputs[c]}}catch(t){i={error:t}}finally{try{l&&!l.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}}if(void 0!==e.outputs){var h=Object.getOwnPropertyNames(e.outputs);try{for(var p=k(h),d=p.next();!d.done;d=p.next()){var g=d.value;t.instance[g]=e.outputs[g]}}catch(t){a={error:t}}finally{try{d&&!d.done&&(o=p.return)&&o.call(p)}finally{if(a)throw a.error}}}}return t},t.prototype.appendComponent=function(t,e,i){void 0===e&&(e={}),i||(i=this.getRootViewContainer());var n=this.getComponentRootNode(i),o=new a.DomPortalHost(n,this.componentFactoryResolver,this.applicationRef,this.injector),s=new a.ComponentPortal(t),r=o.attach(s);return this.projectComponentBindings(r,e),r},t.globalRootViewContainer=null,t.ctorParameters=function(){return[{type:e.ApplicationRef},{type:e.ComponentFactoryResolver},{type:e.Injector}]},t=i=T([e.Injectable()],t)}();function S(t,e,i){var n,a,o;i=i||{};var s=null,r=0;function l(){r=!1===i.leading?0:+new Date,s=null,o=t.apply(n,a)}return function(){var c=+new Date;r||!1!==i.leading||(r=c);var h=e-(c-r);return n=this,a=arguments,h<=0?(clearTimeout(s),s=null,r=c,o=t.apply(n,a)):s||!1===i.trailing||(s=setTimeout(l,h)),o}}function D(t,e){return function(i,n,a){return{configurable:!0,enumerable:a.enumerable,get:function(){return Object.defineProperty(this,n,{configurable:!0,enumerable:a.enumerable,value:S(a.value,t,e)}),this[n]}}}}!function(t){t[t.top="top"]="top",t[t.bottom="bottom"]="bottom",t[t.left="left"]="left",t[t.right="right"]="right"}(I||(I={}));function C(t,e,i){return"top"===i?t.top-7:"bottom"===i?t.top+t.height-e.height+7:"center"===i?t.top+t.height/2-e.height/2:void 0}function E(t,e,i){return"left"===i?t.left-7:"right"===i?t.left+t.width-e.width+7:"center"===i?t.left+t.width/2-e.width/2:void 0}var O=function(){function t(){}return t.calculateVerticalAlignment=function(t,e,i){var n=C(t,e,i);return n+e.height>window.innerHeight&&(n=window.innerHeight-e.height),n},t.calculateVerticalCaret=function(t,e,i,n){var a;"top"===n&&(a=t.height/2-i.height/2+7),"bottom"===n&&(a=e.height-t.height/2-i.height/2-7),"center"===n&&(a=e.height/2-i.height/2);var o=C(t,e,n);return o+e.height>window.innerHeight&&(a+=o+e.height-window.innerHeight),a},t.calculateHorizontalAlignment=function(t,e,i){var n=E(t,e,i);return n+e.width>window.innerWidth&&(n=window.innerWidth-e.width),n},t.calculateHorizontalCaret=function(t,e,i,n){var a;"left"===n&&(a=t.width/2-i.width/2+7),"right"===n&&(a=e.width-t.width/2-i.width/2-7),"center"===n&&(a=e.width/2-i.width/2);var o=E(t,e,n);return o+e.width>window.innerWidth&&(a+=o+e.width-window.innerWidth),a},t.shouldFlip=function(t,e,i,n){var a=!1;return"right"===i&&t.left+t.width+e.width+n>window.innerWidth&&(a=!0),"left"===i&&t.left-e.width-n<0&&(a=!0),"top"===i&&t.top-e.height-n<0&&(a=!0),"bottom"===i&&t.top+t.height+e.height+n>window.innerHeight&&(a=!0),a},t.positionCaret=function(e,i,n,a,o){var s=0,r=0;return e===I.right?(r=-7,s=t.calculateVerticalCaret(n,i,a,o)):e===I.left?(r=i.width,s=t.calculateVerticalCaret(n,i,a,o)):e===I.top?(s=i.height,r=t.calculateHorizontalCaret(n,i,a,o)):e===I.bottom&&(s=-7,r=t.calculateHorizontalCaret(n,i,a,o)),{top:s,left:r}},t.positionContent=function(e,i,n,a,o){var s=0,r=0;return e===I.right?(r=n.left+n.width+a,s=t.calculateVerticalAlignment(n,i,o)):e===I.left?(r=n.left-i.width-a,s=t.calculateVerticalAlignment(n,i,o)):e===I.top?(s=n.top-i.height-a,r=t.calculateHorizontalAlignment(n,i,o)):e===I.bottom&&(s=n.top+n.height+a,r=t.calculateHorizontalAlignment(n,i,o)),{top:s,left:r}},t.determinePlacement=function(e,i,n,a){if(t.shouldFlip(n,i,e,a)){if(e===I.right)return I.left;if(e===I.left)return I.right;if(e===I.top)return I.bottom;if(e===I.bottom)return I.top}return e},t}(),M=function(){function t(t,e){this.element=t,this.renderer=e}return Object.defineProperty(t.prototype,"cssClasses",{get:function(){var t="ngx-charts-tooltip-content";return t+=" position-"+this.placement,t+=" type-"+this.type,t+=" "+this.cssClass},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){setTimeout(this.position.bind(this))},t.prototype.position=function(){var t=this,e=this.element.nativeElement,i=this.host.nativeElement.getBoundingClientRect();if(i.height||i.width){var n=e.getBoundingClientRect();this.checkFlip(i,n),this.positionContent(e,i,n),this.showCaret&&this.positionCaret(i,n),setTimeout((function(){return t.renderer.addClass(e,"animate")}),1)}},t.prototype.positionContent=function(t,e,i){var n=O.positionContent(this.placement,i,e,this.spacing,this.alignment),a=n.top,o=n.left;this.renderer.setStyle(t,"top",a+"px"),this.renderer.setStyle(t,"left",o+"px")},t.prototype.positionCaret=function(t,e){var i=this.caretElm.nativeElement,n=i.getBoundingClientRect(),a=O.positionCaret(this.placement,e,t,n,this.alignment),o=a.top,s=a.left;this.renderer.setStyle(i,"top",o+"px"),this.renderer.setStyle(i,"left",s+"px")},t.prototype.checkFlip=function(t,e){this.placement=O.determinePlacement(this.placement,e,t,this.spacing)},t.prototype.onWindowResize=function(){this.position()},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2}]},T([e.Input()],t.prototype,"host",void 0),T([e.Input()],t.prototype,"showCaret",void 0),T([e.Input()],t.prototype,"type",void 0),T([e.Input()],t.prototype,"placement",void 0),T([e.Input()],t.prototype,"alignment",void 0),T([e.Input()],t.prototype,"spacing",void 0),T([e.Input()],t.prototype,"cssClass",void 0),T([e.Input()],t.prototype,"title",void 0),T([e.Input()],t.prototype,"template",void 0),T([e.Input()],t.prototype,"context",void 0),T([e.ViewChild("caretElm")],t.prototype,"caretElm",void 0),T([e.HostBinding("class")],t.prototype,"cssClasses",null),T([e.HostListener("window:resize"),D(100)],t.prototype,"onWindowResize",null),t=T([e.Component({selector:"ngx-tooltip-content",template:'\n <div>\n <span #caretElm [hidden]="!showCaret" class="tooltip-caret position-{{ this.placement }}"> </span>\n <div class="tooltip-content">\n <span *ngIf="!title">\n <ng-template [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ model: context }"> </ng-template>\n </span>\n <span *ngIf="title" [innerHTML]="title"> </span>\n </div>\n </div>\n ',encapsulation:e.ViewEncapsulation.None,styles:[".ngx-charts-tooltip-content{position:fixed;border-radius:3px;z-index:5000;display:block;font-weight:400;opacity:0;pointer-events:none!important}.ngx-charts-tooltip-content.type-popover{background:#fff;color:#060709;border:1px solid #72809b;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);font-size:13px;padding:4px}.ngx-charts-tooltip-content.type-popover .tooltip-caret{position:absolute;z-index:5001;width:0;height:0}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-left{border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-right{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-bottom{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #fff}.ngx-charts-tooltip-content.type-tooltip{color:#fff;background:rgba(0,0,0,.75);font-size:12px;padding:0 10px;text-align:center;pointer-events:auto}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-left{border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-right{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-bottom{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content .tooltip-label{display:block;line-height:1em;padding:8px 5px 5px;font-size:1em}.ngx-charts-tooltip-content .tooltip-val{display:block;font-size:1.3em;line-height:1em;padding:0 5px 8px}.ngx-charts-tooltip-content .tooltip-caret{position:absolute;z-index:5001;width:0;height:0}.ngx-charts-tooltip-content.position-right{transform:translate3d(10px,0,0)}.ngx-charts-tooltip-content.position-left{transform:translate3d(-10px,0,0)}.ngx-charts-tooltip-content.position-top{transform:translate3d(0,-10px,0)}.ngx-charts-tooltip-content.position-bottom{transform:translate3d(0,10px,0)}.ngx-charts-tooltip-content.animate{opacity:1;transition:opacity .3s,transform .3s;transform:translate3d(0,0,0);pointer-events:auto}.area-tooltip-container{padding:5px 0;pointer-events:none}.tooltip-item{text-align:left;line-height:1.2em;padding:5px 0}.tooltip-item .tooltip-item-color{display:inline-block;height:12px;width:12px;margin-right:5px;color:#5b646b;border-radius:3px}"]})],t)}(),F=function(){function t(t){this.injectionService=t,this.defaults={},this.components=new Map}return t.prototype.getByType=function(t){return void 0===t&&(t=this.type),this.components.get(t)},t.prototype.create=function(t){return this.createByType(this.type,t)},t.prototype.createByType=function(t,e){e=this.assignDefaults(e);var i=this.injectComponent(t,e);return this.register(t,i),i},t.prototype.destroy=function(t){var e=this.components.get(t.componentType);if(e&&e.length){var i=e.indexOf(t);if(i>-1)e[i].destroy(),e.splice(i,1)}},t.prototype.destroyAll=function(){this.destroyByType(this.type)},t.prototype.destroyByType=function(t){var e=this.components.get(t);if(e&&e.length)for(var i=e.length-1;i>=0;)this.destroy(e[i--])},t.prototype.injectComponent=function(t,e){return this.injectionService.appendComponent(t,e)},t.prototype.assignDefaults=function(t){var e=b({},this.defaults.inputs),i=b({},this.defaults.outputs);return t.inputs||t.outputs||(t={inputs:t}),e&&(t.inputs=b(b({},e),t.inputs)),i&&(t.outputs=b(b({},i),t.outputs)),t},t.prototype.register=function(t,e){this.components.has(t)||this.components.set(t,[]),this.components.get(t).push(e)},t}(),P=function(t){function i(e){var i=t.call(this,e)||this;return i.type=M,i}return f(i,t),i.ctorParameters=function(){return[{type:L}]},i=T([e.Injectable()],i)}(F),X=function(){function t(){this.showLegend=!1,this.animations=!0,this.legendLabelClick=new e.EventEmitter,this.legendLabelActivate=new e.EventEmitter,this.legendLabelDeactivate=new e.EventEmitter}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){var t=0;this.showLegend&&(this.legendType=this.getLegendType(),this.legendOptions&&"right"!==this.legendOptions.position||(t="scaleLegend"===this.legendType?1:2));var e=12-t;this.chartWidth=Math.floor(this.view[0]*e/12),this.legendWidth=this.legendOptions&&"right"!==this.legendOptions.position?this.chartWidth:Math.floor(this.view[0]*t/12)},t.prototype.getLegendType=function(){return"linear"===this.legendOptions.scaleType?"scaleLegend":"legend"},T([e.Input()],t.prototype,"view",void 0),T([e.Input()],t.prototype,"showLegend",void 0),T([e.Input()],t.prototype,"legendOptions",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"legendData",void 0),T([e.Input()],t.prototype,"legendType",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"activeEntries",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"legendLabelClick",void 0),T([e.Output()],t.prototype,"legendLabelActivate",void 0),T([e.Output()],t.prototype,"legendLabelDeactivate",void 0),t=T([e.Component({providers:[P],selector:"ngx-charts-chart",template:'\n <div class="ngx-charts-outer" [style.width.px]="view[0]" [@animationState]="\'active\'" [@.disabled]="!animations">\n <svg class="ngx-charts" [attr.width]="chartWidth" [attr.height]="view[1]">\n <ng-content></ng-content>\n </svg>\n <ngx-charts-scale-legend\n *ngIf="showLegend && legendType === \'scaleLegend\'"\n class="chart-legend"\n [horizontal]="legendOptions && legendOptions.position === \'below\'"\n [valueRange]="legendOptions.domain"\n [colors]="legendOptions.colors"\n [height]="view[1]"\n [width]="legendWidth"\n >\n </ngx-charts-scale-legend>\n <ngx-charts-legend\n *ngIf="showLegend && legendType === \'legend\'"\n class="chart-legend"\n [horizontal]="legendOptions && legendOptions.position === \'below\'"\n [data]="legendOptions.domain"\n [title]="legendOptions.title"\n [colors]="legendOptions.colors"\n [height]="view[1]"\n [width]="legendWidth"\n [activeEntries]="activeEntries"\n (labelClick)="legendLabelClick.emit($event)"\n (labelActivate)="legendLabelActivate.emit($event)"\n (labelDeactivate)="legendLabelDeactivate.emit($event)"\n >\n </ngx-charts-legend>\n </div>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":enter",[n.style({opacity:0}),n.animate("500ms 100ms",n.style({opacity:1}))])])]})],t)}(),Y=function(){function t(t,i){this.element=t,this.zone=i,this.visible=new e.EventEmitter,this.isVisible=!1,this.runCheck()}return t.prototype.destroy=function(){clearTimeout(this.timeout)},t.prototype.onVisibilityChange=function(){var t=this;this.zone.run((function(){t.isVisible=!0,t.visible.emit(!0)}))},t.prototype.runCheck=function(){var t=this,e=function(){if(t.element){var i=t.element.nativeElement,n=i.offsetHeight,a=i.offsetWidth;n&&a?(clearTimeout(t.timeout),t.onVisibilityChange()):(clearTimeout(t.timeout),t.zone.runOutsideAngular((function(){t.timeout=setTimeout((function(){return e()}),100)})))}};this.zone.runOutsideAngular((function(){t.timeout=setTimeout((function(){return e()}))}))},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone}]},T([e.Output()],t.prototype,"visible",void 0),t=T([e.Directive({selector:"visibility-observer"})],t)}(),R=function(){function t(t,i,n){this.chartElement=t,this.zone=i,this.cd=n,this.scheme="cool",this.schemeType="ordinal",this.animations=!0,this.select=new e.EventEmitter}return t.prototype.ngAfterViewInit=function(){this.bindWindowResizeEvent(),this.visibilityObserver=new Y(this.chartElement,this.zone),this.visibilityObserver.visible.subscribe(this.update.bind(this))},t.prototype.ngOnDestroy=function(){this.unbindEvents(),this.visibilityObserver&&(this.visibilityObserver.visible.unsubscribe(),this.visibilityObserver.destroy())},t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){if(this.results?this.results=this.cloneData(this.results):this.results=[],this.view)this.width=this.view[0],this.height=this.view[1];else{var t=this.getContainerDims();t&&(this.width=t.width,this.height=t.height)}this.width||(this.width=600),this.height||(this.height=400),this.width=Math.floor(this.width),this.height=Math.floor(this.height),this.cd&&this.cd.markForCheck()},t.prototype.getContainerDims=function(){var t,e,i=this.chartElement.nativeElement;if(null!==i.parentNode){var n=i.parentNode.getBoundingClientRect();t=n.width,e=n.height}return t&&e?{width:t,height:e}:null},t.prototype.formatDates=function(){for(var t=0;t<this.results.length;t++){var e=this.results[t];if(e.label=e.name,e.label instanceof Date&&(e.label=e.label.toLocaleDateString()),e.series)for(var i=0;i<e.series.length;i++){var n=e.series[i];n.label=n.name,n.label instanceof Date&&(n.label=n.label.toLocaleDateString())}}},t.prototype.unbindEvents=function(){this.resizeSubscription&&this.resizeSubscription.unsubscribe()},t.prototype.bindWindowResizeEvent=function(){var t=this,e=o.fromEvent(window,"resize").pipe(s.debounceTime(200)).subscribe((function(e){t.update(),t.cd&&t.cd.markForCheck()}));this.resizeSubscription=e},t.prototype.cloneData=function(t){var e,i,n,a,o=[];try{for(var s=k(t),r=s.next();!r.done;r=s.next()){var l=r.value,c={name:l.name};if(void 0!==l.value&&(c.value=l.value),void 0!==l.series){c.series=[];try{for(var h=(n=void 0,k(l.series)),p=h.next();!p.done;p=h.next()){var d=p.value,g=Object.assign({},d);c.series.push(g)}}catch(t){n={error:t}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(n)throw n.error}}}void 0!==l.extra&&(c.extra=JSON.parse(JSON.stringify(l.extra))),o.push(c)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}return o},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone},{type:e.ChangeDetectorRef}]},T([e.Input()],t.prototype,"results",void 0),T([e.Input()],t.prototype,"view",void 0),T([e.Input()],t.prototype,"scheme",void 0),T([e.Input()],t.prototype,"schemeType",void 0),T([e.Input()],t.prototype,"customColors",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),t=T([e.Component({selector:"base-chart",template:" <div></div> "})],t)}(),z=function(){function t(t){this.textHeight=25,this.margin=5,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){switch(this.strokeWidth="0.01",this.textAnchor="middle",this.transform="",this.orient){case"top":case"bottom":this.y=this.offset,this.x=this.width/2;break;case"left":this.y=-(this.offset+this.textHeight+this.margin),this.x=-this.height/2,this.transform="rotate(270)";break;case"right":this.y=this.offset+this.margin,this.x=-this.height/2,this.transform="rotate(270)"}},t.ctorParameters=function(){return[{type:e.ElementRef}]},T([e.Input()],t.prototype,"orient",void 0),T([e.Input()],t.prototype,"label",void 0),T([e.Input()],t.prototype,"offset",void 0),T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"height",void 0),t=T([e.Component({selector:"g[ngx-charts-axis-label]",template:'\n <svg:text\n [attr.stroke-width]="strokeWidth"\n [attr.x]="x"\n [attr.y]="y"\n [attr.text-anchor]="textAnchor"\n [attr.transform]="transform"\n >\n {{ label }}\n </svg:text>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}();function H(t,e){return void 0===e&&(e=16),"string"!=typeof t?"number"==typeof t?t+"":"":(t=t.trim()).length<=e?t:t.slice(0,e)+"..."}function W(t,e){if(t.length>e){for(var i=[],n=Math.floor(t.length/e),a=0;a<t.length;a++)a%n==0&&i.push(t[a]);t=i}return t}var B=function(){function t(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.rotateTicks=!0,this.dimensionsChanged=new e.EventEmitter,this.verticalSpacing=20,this.rotateLabels=!1,this.innerTickSize=6,this.outerTickSize=6,this.tickPadding=3,this.textAnchor="middle",this.maxTicksLength=0,this.maxAllowedLength=16,this.height=0}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.ngAfterViewInit=function(){var t=this;setTimeout((function(){return t.updateDims()}))},t.prototype.updateDims=function(){var t=this,e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().height,10);e!==this.height&&(this.height=e,this.dimensionsChanged.emit({height:e}),setTimeout((function(){return t.updateDims()})))},t.prototype.update=function(){var t=this,e=this.scale;this.ticks=this.getTicks(),this.tickFormatting?this.tickFormat=this.tickFormatting:e.tickFormat?this.tickFormat=e.tickFormat.apply(e,this.tickArguments):this.tickFormat=function(t){return"Date"===t.constructor.name?t.toLocaleDateString():t.toLocaleString()};var i=this.rotateTicks?this.getRotationAngle(this.ticks):null;this.adjustedScale=this.scale.bandwidth?function(t){return this.scale(t)+.5*this.scale.bandwidth()}:this.scale,this.textTransform="",i&&0!==i?(this.textTransform="rotate("+i+")",this.textAnchor="end",this.verticalSpacing=10):this.textAnchor="middle",setTimeout((function(){return t.updateDims()}))},t.prototype.getRotationAngle=function(t){var e=0;this.maxTicksLength=0;for(var i=0;i<t.length;i++){var n=this.tickFormat(t[i]).toString(),a=n.length;this.trimTicks&&(a=this.tickTrim(n).length),a>this.maxTicksLength&&(this.maxTicksLength=a)}for(var o=8*Math.min(this.maxTicksLength,this.maxAllowedLength),s=o,r=Math.floor(this.width/t.length);s>r&&e>-90;)e-=30,s=Math.cos(e*(Math.PI/180))*o;return e},t.prototype.getTicks=function(){var t=this.getMaxTicks(20),e=this.getMaxTicks(100);return this.tickValues?this.tickValues:this.scale.ticks?this.scale.ticks.apply(this.scale,[e]):W(this.scale.domain(),t)},t.prototype.getMaxTicks=function(t){return Math.floor(this.width/t)},t.prototype.tickTransform=function(t){return"translate("+this.adjustedScale(t)+","+this.verticalSpacing+")"},t.prototype.gridLineTransform=function(){return"translate(0,"+(-this.verticalSpacing-5)+")"},t.prototype.tickTrim=function(t){return this.trimTicks?H(t,this.maxTickLength):t},T([e.Input()],t.prototype,"scale",void 0),T([e.Input()],t.prototype,"orient",void 0),T([e.Input()],t.prototype,"tickArguments",void 0),T([e.Input()],t.prototype,"tickValues",void 0),T([e.Input()],t.prototype,"tickStroke",void 0),T([e.Input()],t.prototype,"trimTicks",void 0),T([e.Input()],t.prototype,"maxTickLength",void 0),T([e.Input()],t.prototype,"tickFormatting",void 0),T([e.Input()],t.prototype,"showGridLines",void 0),T([e.Input()],t.prototype,"gridLineHeight",void 0),T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"rotateTicks",void 0),T([e.Output()],t.prototype,"dimensionsChanged",void 0),T([e.ViewChild("ticksel")],t.prototype,"ticksElement",void 0),t=T([e.Component({selector:"g[ngx-charts-x-axis-ticks]",template:'\n <svg:g #ticksel>\n <svg:g *ngFor="let tick of ticks" class="tick" [attr.transform]="tickTransform(tick)">\n <title>{{ tickFormat(tick) }}</title>\n <svg:text\n stroke-width="0.01"\n [attr.text-anchor]="textAnchor"\n [attr.transform]="textTransform"\n [style.font-size]="\'12px\'"\n >\n {{ tickTrim(tickFormat(tick)) }}\n </svg:text>\n </svg:g>\n </svg:g>\n\n <svg:g *ngFor="let tick of ticks" [attr.transform]="tickTransform(tick)">\n <svg:g *ngIf="showGridLines" [attr.transform]="gridLineTransform()">\n <svg:line class="gridline-path gridline-path-vertical" [attr.y1]="-gridLineHeight" y2="0" />\n </svg:g>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),V=function(){function t(){this.rotateTicks=!0,this.showGridLines=!1,this.xOrient="bottom",this.xAxisOffset=0,this.dimensionsChanged=new e.EventEmitter,this.xAxisClassName="x axis",this.labelOffset=0,this.fill="none",this.stroke="stroke",this.tickStroke="#ccc",this.strokeWidth="none",this.padding=5}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.transform="translate(0,"+(this.xAxisOffset+this.padding+this.dims.height)+")",void 0!==this.xAxisTickCount&&(this.tickArguments=[this.xAxisTickCount])},t.prototype.emitTicksHeight=function(t){var e=this,i=t.height,n=i+25+5;n!==this.labelOffset&&(this.labelOffset=n,setTimeout((function(){e.dimensionsChanged.emit({height:i})}),0))},T([e.Input()],t.prototype,"xScale",void 0),T([e.Input()],t.prototype,"dims",void 0),T([e.Input()],t.prototype,"trimTicks",void 0),T([e.Input()],t.prototype,"rotateTicks",void 0),T([e.Input()],t.prototype,"maxTickLength",void 0),T([e.Input()],t.prototype,"tickFormatting",void 0),T([e.Input()],t.prototype,"showGridLines",void 0),T([e.Input()],t.prototype,"showLabel",void 0),T([e.Input()],t.prototype,"labelText",void 0),T([e.Input()],t.prototype,"ticks",void 0),T([e.Input()],t.prototype,"xAxisTickInterval",void 0),T([e.Input()],t.prototype,"xAxisTickCount",void 0),T([e.Input()],t.prototype,"xOrient",void 0),T([e.Input()],t.prototype,"xAxisOffset",void 0),T([e.Output()],t.prototype,"dimensionsChanged",void 0),T([e.ViewChild(B)],t.prototype,"ticksComponent",void 0),t=T([e.Component({selector:"g[ngx-charts-x-axis]",template:'\n <svg:g [attr.class]="xAxisClassName" [attr.transform]="transform">\n <svg:g\n ngx-charts-x-axis-ticks\n *ngIf="xScale"\n [trimTicks]="trimTicks"\n [rotateTicks]="rotateTicks"\n [maxTickLength]="maxTickLength"\n [tickFormatting]="tickFormatting"\n [tickArguments]="tickArguments"\n [tickStroke]="tickStroke"\n [scale]="xScale"\n [orient]="xOrient"\n [showGridLines]="showGridLines"\n [gridLineHeight]="dims.height"\n [width]="dims.width"\n [tickValues]="ticks"\n (dimensionsChanged)="emitTicksHeight($event)"\n />\n <svg:g\n ngx-charts-axis-label\n *ngIf="showLabel"\n [label]="labelText"\n [offset]="labelOffset"\n [orient]="\'bottom\'"\n [height]="dims.height"\n [width]="dims.width"\n ></svg:g>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}();function G(t,e,i,n,a,o){var s=w(o,4),r=s[0],l=s[1],c=s[2],h=s[3],p="";return p="M"+[t+a,e],p+="h"+((i=0===(i=Math.floor(i))?1:i)-2*a),p+=l?"a"+[a,a]+" 0 0 1 "+[a,a]:"h"+a+"v"+a,p+="v"+((n=0===(n=Math.floor(n))?1:n)-2*a),p+=h?"a"+[a,a]+" 0 0 1 "+[-a,a]:"v"+a+"h"+-a,p+="h"+(2*a-i),p+=c?"a"+[a,a]+" 0 0 1 "+[-a,-a]:"h"+-a+"v"+-a,p+="v"+(2*a-n),p+=r?"a"+[a,a]+" 0 0 1 "+[a,-a]:"v"+-a+"h"+a,p+="z"}var $,N,j,Z=function(){function t(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.showRefLabels=!1,this.showRefLines=!1,this.dimensionsChanged=new e.EventEmitter,this.innerTickSize=6,this.tickPadding=3,this.verticalSpacing=20,this.textAnchor="middle",this.width=0,this.outerTickSize=6,this.rotateLabels=!1,this.referenceLineLength=0}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.ngAfterViewInit=function(){var t=this;setTimeout((function(){return t.updateDims()}))},t.prototype.updateDims=function(){var t=this,e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().width,10);e!==this.width&&(this.width=e,this.dimensionsChanged.emit({width:e}),setTimeout((function(){return t.updateDims()})))},t.prototype.update=function(){var t,e=this,i="top"===this.orient||"right"===this.orient?-1:1;switch(this.tickSpacing=Math.max(this.innerTickSize,0)+this.tickPadding,t=this.scale,this.ticks=this.getTicks(),this.tickFormatting?this.tickFormat=this.tickFormatting:t.tickFormat?this.tickFormat=t.tickFormat.apply(t,this.tickArguments):this.tickFormat=function(t){return"Date"===t.constructor.name?t.toLocaleDateString():t.toLocaleString()},this.adjustedScale=t.bandwidth?function(e){return t(e)+.5*t.bandwidth()}:t,this.showRefLines&&this.referenceLines&&this.setReferencelines(),this.orient){case"top":case"bottom":this.transform=function(t){return"translate("+this.adjustedScale(t)+",0)"},this.textAnchor="middle",this.y2=this.innerTickSize*i,this.y1=this.tickSpacing*i,this.dy=i<0?"0em":".71em";break;case"left":this.transform=function(t){return"translate(0,"+this.adjustedScale(t)+")"},this.textAnchor="end",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em";break;case"right":this.transform=function(t){return"translate(0,"+this.adjustedScale(t)+")"},this.textAnchor="start",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em"}setTimeout((function(){return e.updateDims()}))},t.prototype.setReferencelines=function(){this.refMin=this.adjustedScale(Math.min.apply(null,this.referenceLines.map((function(t){return t.value})))),this.refMax=this.adjustedScale(Math.max.apply(null,this.referenceLines.map((function(t){return t.value})))),this.referenceLineLength=this.referenceLines.length,this.referenceAreaPath=G(0,this.refMax,this.gridLineWidth,this.refMin-this.refMax,0,[!1,!1,!1,!1])},t.prototype.getTicks=function(){var t=this.getMaxTicks(20),e=this.getMaxTicks(50);return this.tickValues?this.tickValues:this.scale.ticks?this.scale.ticks.apply(this.scale,[e]):W(this.scale.domain(),t)},t.prototype.getMaxTicks=function(t){return Math.floor(this.height/t)},t.prototype.tickTransform=function(t){return"translate("+this.adjustedScale(t)+","+this.verticalSpacing+")"},t.prototype.gridLineTransform=function(){return"translate(5,0)"},t.prototype.tickTrim=function(t){return this.trimTicks?H(t,this.maxTickLength):t},T([e.Input()],t.prototype,"scale",void 0),T([e.Input()],t.prototype,"orient",void 0),T([e.Input()],t.prototype,"tickArguments",void 0),T([e.Input()],t.prototype,"tickValues",void 0),T([e.Input()],t.prototype,"tickStroke",void 0),T([e.Input()],t.prototype,"trimTicks",void 0),T([e.Input()],t.prototype,"maxTickLength",void 0),T([e.Input()],t.prototype,"tickFormatting",void 0),T([e.Input()],t.prototype,"showGridLines",void 0),T([e.Input()],t.prototype,"gridLineWidth",void 0),T([e.Input()],t.prototype,"height",void 0),T([e.Input()],t.prototype,"referenceLines",void 0),T([e.Input()],t.prototype,"showRefLabels",void 0),T([e.Input()],t.prototype,"showRefLines",void 0),T([e.Output()],t.prototype,"dimensionsChanged",void 0),T([e.ViewChild("ticksel")],t.prototype,"ticksElement",void 0),t=T([e.Component({selector:"g[ngx-charts-y-axis-ticks]",template:'\n <svg:g #ticksel>\n <svg:g *ngFor="let tick of ticks" class="tick" [attr.transform]="transform(tick)">\n <title>{{ tickFormat(tick) }}</title>\n <svg:text\n stroke-width="0.01"\n [attr.dy]="dy"\n [attr.x]="x1"\n [attr.y]="y1"\n [attr.text-anchor]="textAnchor"\n [style.font-size]="\'12px\'"\n >\n {{ tickTrim(tickFormat(tick)) }}\n </svg:text>\n </svg:g>\n </svg:g>\n\n <svg:path\n *ngIf="referenceLineLength > 1 && refMax && refMin && showRefLines"\n class="reference-area"\n [attr.d]="referenceAreaPath"\n [attr.transform]="gridLineTransform()"\n />\n <svg:g *ngFor="let tick of ticks" [attr.transform]="transform(tick)">\n <svg:g *ngIf="showGridLines" [attr.transform]="gridLineTransform()">\n <svg:line\n *ngIf="orient === \'left\'"\n class="gridline-path gridline-path-horizontal"\n x1="0"\n [attr.x2]="gridLineWidth"\n />\n <svg:line\n *ngIf="orient === \'right\'"\n class="gridline-path gridline-path-horizontal"\n x1="0"\n [attr.x2]="-gridLineWidth"\n />\n </svg:g>\n </svg:g>\n\n <svg:g *ngFor="let refLine of referenceLines">\n <svg:g *ngIf="showRefLines" [attr.transform]="transform(refLine.value)">\n <svg:line\n class="refline-path gridline-path-horizontal"\n x1="0"\n [attr.x2]="gridLineWidth"\n [attr.transform]="gridLineTransform()"\n />\n <svg:g *ngIf="showRefLabels">\n <title>{{ tickTrim(tickFormat(refLine.value)) }}</title>\n <svg:text\n class="refline-label"\n [attr.dy]="dy"\n [attr.y]="-6"\n [attr.x]="gridLineWidth"\n [attr.text-anchor]="textAnchor"\n >\n {{ refLine.name }}\n </svg:text>\n </svg:g>\n </svg:g>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),_=function(){function t(){this.showGridLines=!1,this.yOrient="left",this.yAxisOffset=0,this.dimensionsChanged=new e.EventEmitter,this.yAxisClassName="y axis",this.labelOffset=15,this.fill="none",this.stroke="#CCC",this.tickStroke="#CCC",this.strokeWidth=1,this.padding=5}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.offset=-(this.yAxisOffset+this.padding),"right"===this.yOrient?(this.labelOffset=65,this.transform="translate("+(this.offset+this.dims.width)+" , 0)"):(this.offset=this.offset,this.transform="translate("+this.offset+" , 0)"),void 0!==this.yAxisTickCount&&(this.tickArguments=[this.yAxisTickCount])},t.prototype.emitTicksWidth=function(t){var e=this,i=t.width;i!==this.labelOffset&&"right"===this.yOrient?(this.labelOffset=i+this.labelOffset,setTimeout((function(){e.dimensionsChanged.emit({width:i})}),0)):i!==this.labelOffset&&(this.labelOffset=i,setTimeout((function(){e.dimensionsChanged.emit({width:i})}),0))},T([e.Input()],t.prototype,"yScale",void 0),T([e.Input()],t.prototype,"dims",void 0),T([e.Input()],t.prototype,"trimTicks",void 0),T([e.Input()],t.prototype,"maxTickLength",void 0),T([e.Input()],t.prototype,"tickFormatting",void 0),T([e.Input()],t.prototype,"ticks",void 0),T([e.Input()],t.prototype,"showGridLines",void 0),T([e.Input()],t.prototype,"showLabel",void 0),T([e.Input()],t.prototype,"labelText",void 0),T([e.Input()],t.prototype,"yAxisTickInterval",void 0),T([e.Input()],t.prototype,"yAxisTickCount",void 0),T([e.Input()],t.prototype,"yOrient",void 0),T([e.Input()],t.prototype,"referenceLines",void 0),T([e.Input()],t.prototype,"showRefLines",void 0),T([e.Input()],t.prototype,"showRefLabels",void 0),T([e.Input()],t.prototype,"yAxisOffset",void 0),T([e.Output()],t.prototype,"dimensionsChanged",void 0),T([e.ViewChild(Z)],t.prototype,"ticksComponent",void 0),t=T([e.Component({selector:"g[ngx-charts-y-axis]",template:'\n <svg:g [attr.class]="yAxisClassName" [attr.transform]="transform">\n <svg:g\n ngx-charts-y-axis-ticks\n *ngIf="yScale"\n [trimTicks]="trimTicks"\n [maxTickLength]="maxTickLength"\n [tickFormatting]="tickFormatting"\n [tickArguments]="tickArguments"\n [tickValues]="ticks"\n [tickStroke]="tickStroke"\n [scale]="yScale"\n [orient]="yOrient"\n [showGridLines]="showGridLines"\n [gridLineWidth]="dims.width"\n [referenceLines]="referenceLines"\n [showRefLines]="showRefLines"\n [showRefLabels]="showRefLabels"\n [height]="dims.height"\n (dimensionsChanged)="emitTicksWidth($event)"\n />\n\n <svg:g\n ngx-charts-axis-label\n *ngIf="showLabel"\n [label]="labelText"\n [offset]="labelOffset"\n [orient]="yOrient"\n [height]="dims.height"\n [width]="dims.width"\n ></svg:g>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),q=function(){function t(){}return t=T([e.NgModule({imports:[i.CommonModule],declarations:[z,V,B,_,Z],exports:[z,V,B,_,Z]})],t)}();($=t.StyleTypes||(t.StyleTypes={}))[$.popover="popover"]="popover",$[$.tooltip="tooltip"]="tooltip",(N=t.AlignmentTypes||(t.AlignmentTypes={}))[N.left="left"]="left",N[N.center="center"]="center",N[N.right="right"]="right",(j=t.ShowTypes||(t.ShowTypes={}))[j.all="all"]="all",j[j.focus="focus"]="focus",j[j.mouseover="mouseover"]="mouseover";var U=function(){function i(i,n,a){this.tooltipService=i,this.viewContainerRef=n,this.renderer=a,this.tooltipCssClass="",this.tooltipTitle="",this.tooltipAppendToBody=!0,this.tooltipSpacing=10,this.tooltipDisabled=!1,this.tooltipShowCaret=!0,this.tooltipPlacement=I.top,this.tooltipAlignment=t.AlignmentTypes.center,this.tooltipType=t.StyleTypes.popover,this.tooltipCloseOnClickOutside=!0,this.tooltipCloseOnMouseLeave=!0,this.tooltipHideTimeout=300,this.tooltipShowTimeout=100,this.tooltipShowEvent=t.ShowTypes.all,this.tooltipImmediateExit=!1,this.show=new e.EventEmitter,this.hide=new e.EventEmitter}return Object.defineProperty(i.prototype,"listensForFocus",{get:function(){return this.tooltipShowEvent===t.ShowTypes.all||this.tooltipShowEvent===t.ShowTypes.focus},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"listensForHover",{get:function(){return this.tooltipShowEvent===t.ShowTypes.all||this.tooltipShowEvent===t.ShowTypes.mouseover},enumerable:!0,configurable:!0}),i.prototype.ngOnDestroy=function(){this.hideTooltip(!0)},i.prototype.onFocus=function(){this.listensForFocus&&this.showTooltip()},i.prototype.onBlur=function(){this.listensForFocus&&this.hideTooltip(!0)},i.prototype.onMouseEnter=function(){this.listensForHover&&this.showTooltip()},i.prototype.onMouseLeave=function(t){if(this.listensForHover&&this.tooltipCloseOnMouseLeave){if(clearTimeout(this.timeout),this.component)if(this.component.instance.element.nativeElement.contains(t))return;this.hideTooltip(this.tooltipImmediateExit)}},i.prototype.onMouseClick=function(){this.listensForHover&&this.hideTooltip(!0)},i.prototype.showTooltip=function(t){var e=this;if(!this.component&&!this.tooltipDisabled){var i=t?0:this.tooltipShowTimeout;clearTimeout(this.timeout),this.timeout=setTimeout((function(){e.tooltipService.destroyAll();var t=e.createBoundOptions();e.component=e.tooltipService.create(t),setTimeout((function(){e.component&&e.addHideListeners(e.component.instance.element.nativeElement)}),10),e.show.emit(!0)}),i)}},i.prototype.addHideListeners=function(t){var e=this;this.mouseEnterContentEvent=this.renderer.listen(t,"mouseenter",(function(){clearTimeout(e.timeout)})),this.tooltipCloseOnMouseLeave&&(this.mouseLeaveContentEvent=this.renderer.listen(t,"mouseleave",(function(){e.hideTooltip(e.tooltipImmediateExit)}))),this.tooltipCloseOnClickOutside&&(this.documentClickEvent=this.renderer.listen(document,"click",(function(i){t.contains(i.target)||e.hideTooltip()})))},i.prototype.hideTooltip=function(t){var e=this;if(void 0===t&&(t=!1),this.component){var i=function(){e.mouseLeaveContentEvent&&e.mouseLeaveContentEvent(),e.mouseEnterContentEvent&&e.mouseEnterContentEvent(),e.documentClickEvent&&e.documentClickEvent(),e.hide.emit(!0),e.tooltipService.destroy(e.component),e.component=void 0};clearTimeout(this.timeout),t?i():this.timeout=setTimeout(i,this.tooltipHideTimeout)}},i.prototype.createBoundOptions=function(){return{title:this.tooltipTitle,template:this.tooltipTemplate,host:this.viewContainerRef.element,placement:this.tooltipPlacement,alignment:this.tooltipAlignment,type:this.tooltipType,showCaret:this.tooltipShowCaret,cssClass:this.tooltipCssClass,spacing:this.tooltipSpacing,context:this.tooltipContext}},i.ctorParameters=function(){return[{type:P},{type:e.ViewContainerRef},{type:e.Renderer2}]},T([e.Input()],i.prototype,"tooltipCssClass",void 0),T([e.Input()],i.prototype,"tooltipTitle",void 0),T([e.Input()],i.prototype,"tooltipAppendToBody",void 0),T([e.Input()],i.prototype,"tooltipSpacing",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"tooltipShowCaret",void 0),T([e.Input()],i.prototype,"tooltipPlacement",void 0),T([e.Input()],i.prototype,"tooltipAlignment",void 0),T([e.Input()],i.prototype,"tooltipType",void 0),T([e.Input()],i.prototype,"tooltipCloseOnClickOutside",void 0),T([e.Input()],i.prototype,"tooltipCloseOnMouseLeave",void 0),T([e.Input()],i.prototype,"tooltipHideTimeout",void 0),T([e.Input()],i.prototype,"tooltipShowTimeout",void 0),T([e.Input()],i.prototype,"tooltipTemplate",void 0),T([e.Input()],i.prototype,"tooltipShowEvent",void 0),T([e.Input()],i.prototype,"tooltipContext",void 0),T([e.Input()],i.prototype,"tooltipImmediateExit",void 0),T([e.Output()],i.prototype,"show",void 0),T([e.Output()],i.prototype,"hide",void 0),T([e.HostListener("focusin")],i.prototype,"onFocus",null),T([e.HostListener("blur")],i.prototype,"onBlur",null),T([e.HostListener("mouseenter")],i.prototype,"onMouseEnter",null),T([e.HostListener("mouseleave",["$event.target"])],i.prototype,"onMouseLeave",null),T([e.HostListener("click")],i.prototype,"onMouseClick",null),i=T([e.Directive({selector:"[ngx-tooltip]"})],i)}(),J=function(){function t(){}return t=T([e.NgModule({declarations:[M,U],providers:[L,P],exports:[M,U],imports:[i.CommonModule],entryComponents:[M]})],t)}();function Q(t){return t=t instanceof Date?t.toLocaleDateString():t.toLocaleString()}function K(t){return t.toLocaleString().replace(/[&'`"<>]/g,(function(t){return{"&":"&amp;","'":"&#x27;","`":"&#x60;",'"':"&quot;","<":"&lt;",">":"&gt;"}[t]}))}var tt={};function et(){var t=("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4);return tt[t="a"+t]?et():(tt[t]=!0,t)}var it=function(){function t(){this.type="standard",this.tooltipDisabled=!1,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.barVisible=!1}return t.prototype.ngOnInit=function(){this.gradientId="grad"+et().toString(),this.gradientFill="url(#"+this.gradientId+")"},t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.circle=this.getActiveCircle()},t.prototype.getActiveCircle=function(){var t=this,e=this.data.series.findIndex((function(e){var i=e.name;return i&&t.visibleValue&&i.toString()===t.visibleValue.toString()&&void 0!==e.value}));if(-1!==e)return this.mapDataPointToCircle(this.data.series[e],e)},t.prototype.mapDataPointToCircle=function(t,e){var i,n=this.data.name,a=t.value,o=t.name,s=Q(o);i="time"===this.scaleType?this.xScale(o):"linear"===this.scaleType?this.xScale(Number(o)):this.xScale(o);var r,l=this.yScale("standard"===this.type?a:t.d1),c=this.yScale.range()[0]-l;return r="linear"===this.colors.scaleType?"standard"===this.type?this.colors.getColor(a):this.colors.getColor(t.d1):this.colors.getColor(n),{classNames:["circle-data-"+e],value:a,label:o,data:Object.assign({},t,{series:n,value:a,name:o}),cx:i,cy:l,radius:5,height:c,tooltipLabel:s,color:r,opacity:1,seriesName:n,gradientStops:this.getGradientStops(r),min:t.min,max:t.max}},t.prototype.getTooltipText=function(t){var e=t.tooltipLabel,i=t.value,n=t.seriesName,a=t.min,o=t.max;return'\n <span class="tooltip-label">'+K(n)+" • "+K(e)+'</span>\n <span class="tooltip-val">'+i.toLocaleString()+this.getTooltipMinMaxText(a,o)+"</span>\n "},t.prototype.getTooltipMinMaxText=function(t,e){if(void 0!==t||void 0!==e){var i=" (";return void 0!==t?(void 0===e&&(i+="≥"),i+=t.toLocaleString(),void 0!==e&&(i+=" - ")):void 0!==e&&(i+="≤"),void 0!==e&&(i+=e.toLocaleString()),i+=")"}return""},t.prototype.getGradientStops=function(t){return[{offset:0,color:t,opacity:.2},{offset:100,color:t,opacity:1}]},t.prototype.onClick=function(t){this.select.emit(t)},t.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.name===e.name}))},t.prototype.activateCircle=function(){this.barVisible=!0,this.activate.emit({name:this.data.name})},t.prototype.deactivateCircle=function(){this.barVisible=!1,this.circle.opacity=0,this.deactivate.emit({name:this.data.name})},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"type",void 0),T([e.Input()],t.prototype,"xScale",void 0),T([e.Input()],t.prototype,"yScale",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"scaleType",void 0),T([e.Input()],t.prototype,"visibleValue",void 0),T([e.Input()],t.prototype,"activeEntries",void 0),T([e.Input()],t.prototype,"tooltipDisabled",void 0),T([e.Input()],t.prototype,"tooltipTemplate",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),t=T([e.Component({selector:"g[ngx-charts-circle-series]",template:'\n <svg:g *ngIf="circle">\n <defs>\n <svg:g\n ngx-charts-svg-linear-gradient\n orientation="vertical"\n [name]="gradientId"\n [stops]="circle.gradientStops"\n />\n </defs>\n <svg:rect\n *ngIf="barVisible && type === \'standard\'"\n [@animationState]="\'active\'"\n [attr.x]="circle.cx - circle.radius"\n [attr.y]="circle.cy"\n [attr.width]="circle.radius * 2"\n [attr.height]="circle.height"\n [attr.fill]="gradientFill"\n class="tooltip-bar"\n />\n <svg:g\n ngx-charts-circle\n class="circle"\n [cx]="circle.cx"\n [cy]="circle.cy"\n [r]="circle.radius"\n [fill]="circle.color"\n [class.active]="isActive({ name: circle.seriesName })"\n [pointerEvents]="circle.value === 0 ? \'none\' : \'all\'"\n [data]="circle.value"\n [classNames]="circle.classNames"\n (select)="onClick(circle.data)"\n (activate)="activateCircle()"\n (deactivate)="deactivateCircle()"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="\'top\'"\n [tooltipType]="\'tooltip\'"\n [tooltipTitle]="tooltipTemplate ? undefined : getTooltipText(circle)"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="circle.data"\n />\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":enter",[n.style({opacity:0}),n.animate(250,n.style({opacity:1}))])])]})],t)}(),nt=function(){function t(){this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter}return t.prototype.onClick=function(){this.select.emit(this.data)},t.prototype.onMouseEnter=function(){this.activate.emit(this.data)},t.prototype.onMouseLeave=function(){this.deactivate.emit(this.data)},t.prototype.ngOnChanges=function(t){this.classNames=Array.isArray(this.classNames)?this.classNames.join(" "):"",this.classNames+="circle"},T([e.Input()],t.prototype,"cx",void 0),T([e.Input()],t.prototype,"cy",void 0),T([e.Input()],t.prototype,"r",void 0),T([e.Input()],t.prototype,"fill",void 0),T([e.Input()],t.prototype,"stroke",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"classNames",void 0),T([e.Input()],t.prototype,"circleOpacity",void 0),T([e.Input()],t.prototype,"pointerEvents",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),T([e.HostListener("click")],t.prototype,"onClick",null),T([e.HostListener("mouseenter")],t.prototype,"onMouseEnter",null),T([e.HostListener("mouseleave")],t.prototype,"onMouseLeave",null),t=T([e.Component({selector:"g[ngx-charts-circle]",template:'\n <svg:circle\n [attr.cx]="cx"\n [attr.cy]="cy"\n [attr.r]="r"\n [attr.fill]="fill"\n [attr.stroke]="stroke"\n [attr.opacity]="circleOpacity"\n [attr.class]="classNames"\n [attr.pointer-events]="pointerEvents"\n />\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),at=function(){function t(){}return T([e.Input()],t.prototype,"path",void 0),T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"height",void 0),T([e.Input()],t.prototype,"x",void 0),T([e.Input()],t.prototype,"y",void 0),t=T([e.Component({selector:"g[ngx-charts-grid-panel]",template:'\n <svg:rect [attr.height]="height" [attr.width]="width" [attr.x]="x" [attr.y]="y" stroke="none" class="gridpanel" />\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),ot=function(){function t(){}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.gridPanels=this.getGridPanels()},t.prototype.getGridPanels=function(){var t=this;return this.data.map((function(e){var i,n,a,o,s,r="odd";if("vertical"===t.orient){var l=t.xScale(e.name);Number.parseInt((l/t.xScale.step()).toString(),10)%2==1&&(r="even"),i=t.xScale.bandwidth()*t.xScale.paddingInner(),n=t.xScale.bandwidth()+i,a=t.dims.height,o=t.xScale(e.name)-i/2,s=0}else if("horizontal"===t.orient){l=t.yScale(e.name);Number.parseInt((l/t.yScale.step()).toString(),10)%2==1&&(r="even"),i=t.yScale.bandwidth()*t.yScale.paddingInner(),n=t.dims.width,a=t.yScale.bandwidth()+i,o=0,s=t.yScale(e.name)-i/2}return{name:e.name,class:r,height:a,width:n,x:o,y:s}}))},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"dims",void 0),T([e.Input()],t.prototype,"xScale",void 0),T([e.Input()],t.prototype,"yScale",void 0),T([e.Input()],t.prototype,"orient",void 0),t=T([e.Component({selector:"g[ngx-charts-grid-panel-series]",template:'\n <svg:g\n ngx-charts-grid-panel\n *ngFor="let gridPanel of gridPanels"\n [height]="gridPanel.height"\n [width]="gridPanel.width"\n [x]="gridPanel.x"\n [y]="gridPanel.y"\n [class.grid-panel]="true"\n [class.odd]="gridPanel.class === \'odd\'"\n [class.even]="gridPanel.class === \'even\'"\n ></svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),st=function(){function t(){this.orientation="vertical"}return t.prototype.ngOnChanges=function(t){this.x1="0%",this.x2="0%",this.y1="0%",this.y2="0%","horizontal"===this.orientation?this.x2="100%":"vertical"===this.orientation&&(this.y1="100%")},T([e.Input()],t.prototype,"orientation",void 0),T([e.Input()],t.prototype,"name",void 0),T([e.Input()],t.prototype,"stops",void 0),t=T([e.Component({selector:"g[ngx-charts-svg-linear-gradient]",template:'\n <svg:linearGradient [id]="name" [attr.x1]="x1" [attr.y1]="y1" [attr.x2]="x2" [attr.y2]="y2">\n <svg:stop\n *ngFor="let stop of stops"\n [attr.offset]="stop.offset + \'%\'"\n [style.stop-color]="stop.color"\n [style.stop-opacity]="stop.opacity"\n />\n </svg:linearGradient>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),rt=function(){function t(){this.endOpacity=1,this.cx=0,this.cy=0}return Object.defineProperty(t.prototype,"stops",{get:function(){return this.stopsInput||this.stopsDefault},set:function(t){this.stopsInput=t},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(t){this.r="30%",("color"in t||"startOpacity"in t||"endOpacity"in t)&&(this.stopsDefault=[{offset:0,color:this.color,opacity:this.startOpacity},{offset:100,color:this.color,opacity:this.endOpacity}])},T([e.Input()],t.prototype,"color",void 0),T([e.Input()],t.prototype,"name",void 0),T([e.Input()],t.prototype,"startOpacity",void 0),T([e.Input()],t.prototype,"endOpacity",void 0),T([e.Input()],t.prototype,"cx",void 0),T([e.Input()],t.prototype,"cy",void 0),T([e.Input()],t.prototype,"stops",null),t=T([e.Component({selector:"g[ngx-charts-svg-radial-gradient]",template:'\n <svg:radialGradient [id]="name" [attr.cx]="cx" [attr.cy]="cy" [attr.r]="r" gradientUnits="userSpaceOnUse">\n <svg:stop\n *ngFor="let stop of stops"\n [attr.offset]="stop.offset + \'%\'"\n [style.stop-color]="stop.color"\n [style.stop-opacity]="stop.opacity"\n />\n </svg:radialGradient>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),lt=function(){function t(t){this.opacity=1,this.startOpacity=.5,this.endOpacity=1,this.gradient=!1,this.animations=!0,this.select=new e.EventEmitter,this.initialized=!1,this.hasGradient=!1,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(t){this.initialized?this.update():(this.loadAnimation(),this.initialized=!0)},t.prototype.update=function(){this.gradientId="grad"+et().toString(),this.gradientFill="url(#"+this.gradientId+")",this.gradient||this.stops?(this.gradientStops=this.getGradient(),this.hasGradient=!0):this.hasGradient=!1,this.updatePathEl()},t.prototype.loadAnimation=function(){this.areaPath=this.startingPath,setTimeout(this.update.bind(this),100)},t.prototype.updatePathEl=function(){var t=r.select(this.element).select(".area");this.animations?t.transition().duration(750).attr("d",this.path):t.attr("d",this.path)},t.prototype.getGradient=function(){return this.stops?this.stops:[{offset:0,color:this.fill,opacity:this.startOpacity},{offset:100,color:this.fill,opacity:this.endOpacity}]},t.ctorParameters=function(){return[{type:e.ElementRef}]},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"path",void 0),T([e.Input()],t.prototype,"startingPath",void 0),T([e.Input()],t.prototype,"fill",void 0),T([e.Input()],t.prototype,"opacity",void 0),T([e.Input()],t.prototype,"startOpacity",void 0),T([e.Input()],t.prototype,"endOpacity",void 0),T([e.Input()],t.prototype,"activeLabel",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"stops",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),t=T([e.Component({selector:"g[ngx-charts-area]",template:'\n <svg:defs *ngIf="gradient">\n <svg:g ngx-charts-svg-linear-gradient orientation="vertical" [name]="gradientId" [stops]="gradientStops" />\n </svg:defs>\n <svg:path class="area" [attr.d]="areaPath" [attr.fill]="gradient ? gradientFill : fill" [style.opacity]="opacity" />\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}();function ct(t,e,i,n){return i*(1-Math.pow(2,-10*t/n))*1024/1023+e}function ht(t,e,i,n,a){var o,s=Number(t),r=Number(e),l=s>r,c=Math.max(0,i),h=Math.pow(10,c),p=1e3*Number(n);return requestAnimationFrame((function(t){return o=t,function t(e){var i,n=e-o;i=l?s-ct(n,0,s-r,p):ct(n,s,r-s,p),i=l?i<r?r:i:i>r?r:i,i=Math.round(i*h)/h;var c=n<p;if(a({value:i,progress:n,timestamp:e,finished:!c}),c)return requestAnimationFrame((function(e){return t(e)}))}(t)}))}function pt(t){var e=Number(t);return e%1!=0&&Math.abs(e)<=10?2:0}var dt,gt=function(){function t(t,i){this.cd=t,this.countDuration=1,this.countPrefix="",this.countSuffix="",this.countChange=new e.EventEmitter,this.countFinish=new e.EventEmitter,this.value="",this._countDecimals=0,this._countTo=0,this._countFrom=0,this.nativeElement=i.nativeElement}return Object.defineProperty(t.prototype,"countDecimals",{get:function(){return this._countDecimals?this._countDecimals:pt(this.countTo)},set:function(t){this._countDecimals=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"countTo",{get:function(){return this._countTo},set:function(t){this._countTo=parseFloat(t),this.start()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"countFrom",{get:function(){return this._countFrom},set:function(t){this._countFrom=parseFloat(t),this.start()},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){cancelAnimationFrame(this.animationReq)},t.prototype.start=function(){var t=this;cancelAnimationFrame(this.animationReq);var e=this.valueFormatting||function(e){return""+t.countPrefix+e.toLocaleString()+t.countSuffix};this.animationReq=ht(this.countFrom,this.countTo,this.countDecimals,this.countDuration,(function(i){var n=i.value,a=i.progress,o=i.finished;t.value=e(n),t.cd.markForCheck(),o||t.countChange.emit({value:t.value,progress:a}),o&&t.countFinish.emit({value:t.value,progress:a})}))},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef},{type:e.ElementRef}]},T([e.Input()],t.prototype,"countDuration",void 0),T([e.Input()],t.prototype,"countPrefix",void 0),T([e.Input()],t.prototype,"countSuffix",void 0),T([e.Input()],t.prototype,"valueFormatting",void 0),T([e.Input()],t.prototype,"countDecimals",null),T([e.Input()],t.prototype,"countTo",null),T([e.Input()],t.prototype,"countFrom",null),T([e.Output()],t.prototype,"countChange",void 0),T([e.Output()],t.prototype,"countFinish",void 0),t=T([e.Component({selector:"[ngx-charts-count-up]",template:" {{ value }} "})],t)}();"undefined"!=typeof window?dt=window:"undefined"!=typeof global&&(dt=global);var ut=dt.MouseEvent;function vt(t,e,i){if(void 0===e&&(e=!1),void 0===i&&(i=!0),"function"==typeof ut)return new ut(t,{bubbles:e,cancelable:i});var n=document.createEvent("MouseEvent");return n.initEvent(t,e,i),n}var mt=function(){function t(){this.anchorOpacity=0,this.anchorPos=-1,this.anchorValues=[],this.showPercentage=!1,this.tooltipDisabled=!1,this.hover=new e.EventEmitter}return t.prototype.getValues=function(t){var e,i,n=[];try{for(var a=k(this.results),o=a.next();!o.done;o=a.next()){var s=o.value,r=s.series.find((function(e){return e.name.toString()===t.toString()})),l=s.name;if(l instanceof Date&&(l=l.toLocaleDateString()),r){var c=r.name,h=r.value;this.showPercentage&&(h=(r.d1-r.d0).toFixed(2)+"%");var p=void 0;if("linear"===this.colors.scaleType){var d=h;r.d1&&(d=r.d1),p=this.colors.getColor(d)}else p=this.colors.getColor(s.name);var g=Object.assign({},r,{value:h,name:c,series:l,min:r.min,max:r.max,color:p});n.push(g)}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(e)throw e.error}}return n},t.prototype.mouseMove=function(t){var e=t.pageX-t.target.getBoundingClientRect().left,i=this.findClosestPointIndex(e),n=this.xSet[i];if(this.anchorPos=this.xScale(n),this.anchorPos=Math.max(0,this.anchorPos),this.anchorPos=Math.min(this.dims.width,this.anchorPos),this.anchorValues=this.getValues(n),this.anchorPos!==this.lastAnchorPos){var a=vt("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(a),this.anchorOpacity=.7,this.hover.emit({value:n}),this.showTooltip(),this.lastAnchorPos=this.anchorPos}},t.prototype.findClosestPointIndex=function(t){for(var e=0,i=this.xSet.length-1,n=Number.MAX_VALUE,a=0;e<=i;){var o=(e+i)/2|0,s=this.xScale(this.xSet[o]),r=Math.abs(s-t);if(r<n&&(n=r,a=o),s<t)e=o+1;else{if(!(s>t)){n=0,a=o;break}i=o-1}}return a},t.prototype.showTooltip=function(){var t=vt("mouseenter");this.tooltipAnchor.nativeElement.dispatchEvent(t)},t.prototype.hideTooltip=function(){var t=vt("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(t),this.anchorOpacity=0,this.lastAnchorPos=-1},t.prototype.getToolTipText=function(t){var e="";return void 0!==t.series?e+=t.series:e+="???",e+=": ",void 0!==t.value&&(e+=t.value.toLocaleString()),void 0===t.min&&void 0===t.max||(e+=" (",void 0!==t.min?(void 0===t.max&&(e+="≥"),e+=t.min.toLocaleString(),void 0!==t.max&&(e+=" - ")):void 0!==t.max&&(e+="≤"),void 0!==t.max&&(e+=t.max.toLocaleString()),e+=")"),e},T([e.Input()],t.prototype,"dims",void 0),T([e.Input()],t.prototype,"xSet",void 0),T([e.Input()],t.prototype,"xScale",void 0),T([e.Input()],t.prototype,"yScale",void 0),T([e.Input()],t.prototype,"results",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"showPercentage",void 0),T([e.Input()],t.prototype,"tooltipDisabled",void 0),T([e.Input()],t.prototype,"tooltipTemplate",void 0),T([e.Output()],t.prototype,"hover",void 0),T([e.ViewChild("tooltipAnchor",{static:!1})],t.prototype,"tooltipAnchor",void 0),t=T([e.Component({selector:"g[ngx-charts-tooltip-area]",template:'\n <svg:g>\n <svg:rect\n class="tooltip-area"\n [attr.x]="0"\n y="0"\n [attr.width]="dims.width"\n [attr.height]="dims.height"\n style="opacity: 0; cursor: \'auto\';"\n (mousemove)="mouseMove($event)"\n (mouseleave)="hideTooltip()"\n />\n <ng-template #defaultTooltipTemplate let-model="model">\n <xhtml:div class="area-tooltip-container">\n <xhtml:div *ngFor="let tooltipItem of model" class="tooltip-item">\n <xhtml:span class="tooltip-item-color" [style.background-color]="tooltipItem.color"></xhtml:span>\n {{ getToolTipText(tooltipItem) }}\n </xhtml:div>\n </xhtml:div>\n </ng-template>\n <svg:rect\n #tooltipAnchor\n [@animationState]="anchorOpacity !== 0 ? \'active\' : \'inactive\'"\n class="tooltip-anchor"\n [attr.x]="anchorPos"\n y="0"\n [attr.width]="1"\n [attr.height]="dims.height"\n [style.opacity]="anchorOpacity"\n [style.pointer-events]="\'none\'"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="\'right\'"\n [tooltipType]="\'tooltip\'"\n [tooltipSpacing]="15"\n [tooltipTemplate]="tooltipTemplate ? tooltipTemplate : defaultTooltipTemplate"\n [tooltipContext]="anchorValues"\n [tooltipImmediateExit]="true"\n />\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition("inactive => active",[n.style({opacity:0}),n.animate(250,n.style({opacity:.7}))]),n.transition("active => inactive",[n.style({opacity:.7}),n.animate(250,n.style({opacity:0}))])])]})],t)}(),yt=function(){function t(t,i){this.cd=i,this.height=50,this.select=new e.EventEmitter,this.onDomainChange=new e.EventEmitter,this.initialized=!1,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(t){this.update(),this.initialized||(this.addBrush(),this.initialized=!0)},t.prototype.update=function(){this.dims=this.getDims(),this.height=this.dims.height;var t=this.view[1]-this.height;this.xDomain=this.getXDomain(),this.xScale=this.getXScale(),this.brush&&this.updateBrush(),this.transform="translate(0 , "+t+")",this.filterId="filter"+et().toString(),this.filter="url(#"+this.filterId+")",this.cd.markForCheck()},t.prototype.getXDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.name)||a.push(h.name)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}var p=[];if("time"===this.scaleType)p=[Math.min.apply(Math,A(a)),Math.max.apply(Math,A(a))];else if("linear"===this.scaleType){a=a.map((function(t){return Number(t)})),p=[Math.min.apply(Math,A(a)),Math.max.apply(Math,A(a))]}else p=a;return p},t.prototype.getXScale=function(){var t;return"time"===this.scaleType?t=c.scaleTime().range([0,this.dims.width]).domain(this.xDomain):"linear"===this.scaleType?t=c.scaleLinear().range([0,this.dims.width]).domain(this.xDomain):"ordinal"===this.scaleType&&(t=c.scalePoint().range([0,this.dims.width]).padding(.1).domain(this.xDomain)),t},t.prototype.addBrush=function(){var t=this;if(!this.brush){var e=this.height,i=this.view[0];this.brush=l.brushX().extent([[0,0],[i,e]]).on("brush end",(function(){var e=(r.event.selection||t.xScale.range()).map(t.xScale.invert);t.onDomainChange.emit(e),t.cd.markForCheck()})),r.select(this.element).select(".brush").call(this.brush)}},t.prototype.updateBrush=function(){if(this.brush){var t=this.height,e=this.view[0];this.brush.extent([[0,0],[e,t]]),r.select(this.element).select(".brush").call(this.brush),r.select(this.element).select(".selection").attr("fill",void 0).attr("stroke",void 0).attr("fill-opacity",void 0),this.cd.markForCheck()}},t.prototype.getDims=function(){return{width:this.view[0],height:this.height}},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef}]},T([e.Input()],t.prototype,"view",void 0),T([e.Input()],t.prototype,"state",void 0),T([e.Input()],t.prototype,"results",void 0),T([e.Input()],t.prototype,"scheme",void 0),T([e.Input()],t.prototype,"customColors",void 0),T([e.Input()],t.prototype,"legend",void 0),T([e.Input()],t.prototype,"miniChart",void 0),T([e.Input()],t.prototype,"autoScale",void 0),T([e.Input()],t.prototype,"scaleType",void 0),T([e.Input()],t.prototype,"height",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"onDomainChange",void 0),t=T([e.Component({selector:"g[ngx-charts-timeline]",template:'\n <svg:g class="timeline" [attr.transform]="transform">\n <svg:filter [attr.id]="filterId">\n <svg:feColorMatrix\n in="SourceGraphic"\n type="matrix"\n values="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"\n />\n </svg:filter>\n <svg:g class="embedded-chart">\n <ng-content></ng-content>\n </svg:g>\n <svg:rect x="0" [attr.width]="view[0]" y="0" [attr.height]="height" class="brush-background" />\n <svg:g class="brush"></svg:g>\n </svg:g>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".timeline .brush-background{fill:rgba(0,0,0,.05)}.timeline .brush .selection{fill:rgba(0,0,0,.1);stroke-width:1px;stroke:#888}.timeline .brush .handle{fill-opacity:0}.timeline .embedded-chart{opacity:.6}"]})],t)}(),xt=function(){function t(t){this.cd=t,this.horizontal=!1,this.labelClick=new e.EventEmitter,this.labelActivate=new e.EventEmitter,this.labelDeactivate=new e.EventEmitter,this.legendEntries=[]}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.cd.markForCheck(),this.legendEntries=this.getLegendEntries()},t.prototype.getLegendEntries=function(){var t,e,i=[],n=function(t){var e=Q(t);-1===i.findIndex((function(t){return t.label===e}))&&i.push({label:t,formattedLabel:e,color:a.colors.getColor(t)})},a=this;try{for(var o=k(this.data),s=o.next();!s.done;s=o.next()){n(s.value)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return i},t.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.label===e.name}))},t.prototype.activate=function(t){this.labelActivate.emit(t)},t.prototype.deactivate=function(t){this.labelDeactivate.emit(t)},t.prototype.trackBy=function(t,e){return e.label},t.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"title",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"height",void 0),T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"activeEntries",void 0),T([e.Input()],t.prototype,"horizontal",void 0),T([e.Output()],t.prototype,"labelClick",void 0),T([e.Output()],t.prototype,"labelActivate",void 0),T([e.Output()],t.prototype,"labelDeactivate",void 0),t=T([e.Component({selector:"ngx-charts-legend",template:'\n <div [style.width.px]="width">\n <header class="legend-title" *ngIf="title?.length > 0">\n <span class="legend-title-text">{{ title }}</span>\n </header>\n <div class="legend-wrap">\n <ul class="legend-labels" [class.horizontal-legend]="horizontal" [style.max-height.px]="height - 45">\n <li *ngFor="let entry of legendEntries; trackBy: trackBy" class="legend-label">\n <ngx-charts-legend-entry\n [label]="entry.label"\n [formattedLabel]="entry.formattedLabel"\n [color]="entry.color"\n [isActive]="isActive(entry)"\n (select)="labelClick.emit($event)"\n (activate)="activate($event)"\n (deactivate)="deactivate($event)"\n >\n </ngx-charts-legend-entry>\n </li>\n </ul>\n </div>\n </div>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .legend-title{white-space:nowrap;overflow:hidden;margin-left:10px;margin-bottom:5px;font-size:14px;font-weight:700}.chart-legend li,.chart-legend ul{padding:0;margin:0;list-style:none}.chart-legend .horizontal-legend li{display:inline-block}.chart-legend .legend-wrap{width:calc(100% - 10px)}.chart-legend .legend-labels{line-height:85%;list-style:none;text-align:left;float:left;width:100%;border-radius:3px;overflow-y:auto;overflow-x:hidden;white-space:nowrap;background:rgba(0,0,0,.05)}.chart-legend .legend-label{cursor:pointer;font-size:90%;margin:8px;color:#afb7c8}.chart-legend .legend-label:hover{color:#000;transition:.2s}.chart-legend .legend-label .active .legend-label-text{color:#000}.chart-legend .legend-label-color{display:inline-block;height:15px;width:15px;margin-right:5px;color:#5b646b;border-radius:3px}.chart-legend .legend-label-text{display:inline-block;vertical-align:top;line-height:15px;font-size:12px;width:calc(100% - 20px);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.chart-legend .legend-title-text{vertical-align:bottom;display:inline-block;line-height:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}"]})],t)}(),ft=function(){function t(){this.isActive=!1,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.toggle=new e.EventEmitter}return Object.defineProperty(t.prototype,"trimmedLabel",{get:function(){return this.formattedLabel||"(empty)"},enumerable:!0,configurable:!0}),t.prototype.onMouseEnter=function(){this.activate.emit({name:this.label})},t.prototype.onMouseLeave=function(){this.deactivate.emit({name:this.label})},T([e.Input()],t.prototype,"color",void 0),T([e.Input()],t.prototype,"label",void 0),T([e.Input()],t.prototype,"formattedLabel",void 0),T([e.Input()],t.prototype,"isActive",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),T([e.Output()],t.prototype,"toggle",void 0),T([e.HostListener("mouseenter")],t.prototype,"onMouseEnter",null),T([e.HostListener("mouseleave")],t.prototype,"onMouseLeave",null),t=T([e.Component({selector:"ngx-charts-legend-entry",template:'\n <span [title]="formattedLabel" tabindex="-1" [class.active]="isActive" (click)="select.emit(formattedLabel)">\n <span class="legend-label-color" [style.background-color]="color" (click)="toggle.emit(formattedLabel)"> </span>\n <span class="legend-label-text">\n {{ trimmedLabel }}\n </span>\n </span>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),bt=function(){function t(t){this.sanitizer=t,this.horizontal=!1}return t.prototype.ngOnChanges=function(t){var e=this.gradientString(this.colors.range(),this.colors.domain()),i=this.horizontal?"right":"bottom";this.gradient=this.sanitizer.bypassSecurityTrustStyle("linear-gradient(to "+i+", "+e+")")},t.prototype.gradientString=function(t,e){e.push(1);var i=[];return t.reverse().forEach((function(t,n){i.push(t+" "+Math.round(100*e[n])+"%")})),i.join(", ")},t.ctorParameters=function(){return[{type:h.DomSanitizer}]},T([e.Input()],t.prototype,"valueRange",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"height",void 0),T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"horizontal",void 0),t=T([e.Component({selector:"ngx-charts-scale-legend",template:'\n <div\n class="scale-legend"\n [class.horizontal-legend]="horizontal"\n [style.height.px]="horizontal ? undefined : height"\n [style.width.px]="width"\n >\n <div class="scale-legend-label">\n <span>{{ valueRange[1].toLocaleString() }}</span>\n </div>\n <div class="scale-legend-wrap" [style.background]="gradient"></div>\n <div class="scale-legend-label">\n <span>{{ valueRange[0].toLocaleString() }}</span>\n </div>\n </div>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .scale-legend{text-align:center;display:flex;flex-direction:column}.chart-legend .scale-legend-wrap{display:inline-block;flex:1;width:30px;border-radius:5px;margin:0 auto}.chart-legend .scale-legend-label{font-size:12px}.chart-legend .horizontal-legend.scale-legend{flex-direction:row}.chart-legend .horizontal-legend .scale-legend-wrap{width:auto;height:30px;margin:0 16px}"]})],t)}(),Tt=function(){function t(){this.label="Total",this.animations=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.legendItems=[],this.labelFormatting=function(t){return t},this.percentageFormatting=function(t){return t},this.defaultValueFormatting=function(t){return t.toLocaleString()}}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.getTotal=function(){return this.data.map((function(t){return t.value})).reduce((function(t,e){return t+e}),0)},t.prototype.update=function(){this.total=this.getTotal(),this.roundedTotal=this.total,this.legendItems=this.getLegendItems()},t.prototype.getLegendItems=function(){var t=this;return this.data.map((function(e){var i=Q(e.name),n=e.value,a=t.colors.getColor(i),o=t.total>0?n/t.total*100:0,s="function"==typeof t.labelFormatting?t.labelFormatting(i):i;return{_value:n,data:e,value:n,color:a,label:s,displayLabel:H(s,20),origialLabel:e.name,percentage:t.percentageFormatting?t.percentageFormatting(o):o.toLocaleString()}}))},t.prototype.trackBy=function(t){return t.formattedLabel},T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"label",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),T([e.Input()],t.prototype,"valueFormatting",void 0),T([e.Input()],t.prototype,"labelFormatting",void 0),T([e.Input()],t.prototype,"percentageFormatting",void 0),t=T([e.Component({selector:"ngx-charts-advanced-legend",template:'\n <div class="advanced-pie-legend" [style.width.px]="width">\n <div\n *ngIf="animations"\n class="total-value"\n ngx-charts-count-up\n [countTo]="roundedTotal"\n [valueFormatting]="valueFormatting"\n ></div>\n <div class="total-value" *ngIf="!animations">\n {{ valueFormatting ? valueFormatting(roundedTotal) : defaultValueFormatting(roundedTotal) }}\n </div>\n <div class="total-label">\n {{ label }}\n </div>\n <div class="legend-items-container">\n <div class="legend-items">\n <div\n *ngFor="let legendItem of legendItems; trackBy: trackBy"\n tabindex="-1"\n class="legend-item"\n (mouseenter)="activate.emit(legendItem.data)"\n (mouseleave)="deactivate.emit(legendItem.data)"\n (click)="select.emit(legendItem.data)"\n >\n <div class="item-color" [style.border-left-color]="legendItem.color"></div>\n <div\n *ngIf="animations"\n class="item-value"\n ngx-charts-count-up\n [countTo]="legendItem._value"\n [valueFormatting]="valueFormatting"\n ></div>\n <div *ngIf="!animations" class="item-value">\n {{ valueFormatting ? valueFormatting(legendItem.value) : defaultValueFormatting(legendItem.value) }}\n </div>\n <div class="item-label">{{ legendItem.displayLabel }}</div>\n <div\n *ngIf="animations"\n class="item-percent"\n ngx-charts-count-up\n [countTo]="legendItem.percentage"\n [countSuffix]="\'%\'"\n ></div>\n <div *ngIf="!animations" class="item-percent">{{ legendItem.percentage.toLocaleString() }}%</div>\n </div>\n </div>\n </div>\n </div>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".advanced-pie-legend{float:left;position:relative;top:50%;transform:translate(0,-50%)}.advanced-pie-legend .total-value{font-size:36px}.advanced-pie-legend .total-label{font-size:24px;margin-bottom:19px}.advanced-pie-legend .legend-items-container{width:100%}.advanced-pie-legend .legend-items-container .legend-items{white-space:nowrap;overflow:auto}.advanced-pie-legend .legend-items-container .legend-items .legend-item{margin-right:20px;display:inline-block;cursor:pointer}.advanced-pie-legend .legend-items-container .legend-items .legend-item:focus{outline:0}.advanced-pie-legend .legend-items-container .legend-items .legend-item:hover{color:#000;transition:.2s}.advanced-pie-legend .legend-items-container .legend-items .legend-item .item-value{font-size:24px;margin-top:-6px;margin-left:11px}.advanced-pie-legend .legend-items-container .legend-items .legend-item .item-label{font-size:14px;opacity:.7;margin-left:11px;margin-top:-6px}.advanced-pie-legend .legend-items-container .legend-items .legend-item .item-percent{font-size:24px;opacity:.7;margin-left:11px}.advanced-pie-legend .legend-items-container .legend-items .legend-item .item-color{border-left:4px solid;width:4px;height:42px;float:left;margin-right:7px}"]})],t)}(),kt=[lt,R,gt,mt,X,xt,ft,bt,nt,it,at,ot,st,rt,yt,Tt],wt=function(){function t(){}return t=T([e.NgModule({imports:[i.CommonModule,q,J],declarations:A(kt,[Y]),exports:A([i.CommonModule,q,J],kt,[Y])})],t)}();function At(t){var e,i=t.width,n=t.height,a=t.margins,o=t.showXAxis,s=void 0!==o&&o,r=t.showYAxis,l=void 0!==r&&r,c=t.xAxisHeight,h=void 0===c?0:c,p=t.yAxisWidth,d=void 0===p?0:p,g=t.showXLabel,u=void 0!==g&&g,v=t.showYLabel,m=void 0!==v&&v,y=t.showLegend,x=void 0!==y&&y,f=t.legendType,b=void 0===f?"ordinal":f,T=t.legendPosition,k=void 0===T?"right":T,w=t.columns,A=void 0===w?12:w,I=a[3],L=i,S=n-a[0]-a[2];(x&&"right"===k&&(A-="ordinal"===b?2:1),L=(L=L*A/12)-a[1]-a[3],s)&&(S-=5,S-=h,u&&(S-=e=30));l&&(L-=5,L-=d,I+=d,I+=10,m&&(L-=e=30,I+=e));return L=Math.max(0,L),S=Math.max(0,S),{width:Math.floor(L),height:Math.floor(S),xOffset:Math.floor(I)}}var It=[{name:"vivid",selectable:!0,group:"Ordinal",domain:["#647c8a","#3f51b5","#2196f3","#00b862","#afdf0a","#a7b61a","#f3e562","#ff9800","#ff5722","#ff4514"]},{name:"natural",selectable:!0,group:"Ordinal",domain:["#bf9d76","#e99450","#d89f59","#f2dfa7","#a5d7c6","#7794b1","#afafaf","#707160","#ba9383","#d9d5c3"]},{name:"cool",selectable:!0,group:"Ordinal",domain:["#a8385d","#7aa3e5","#a27ea8","#aae3f5","#adcded","#a95963","#8796c0","#7ed3ed","#50abcc","#ad6886"]},{name:"fire",selectable:!0,group:"Ordinal",domain:["#ff3d00","#bf360c","#ff8f00","#ff6f00","#ff5722","#e65100","#ffca28","#ffab00"]},{name:"solar",selectable:!0,group:"Continuous",domain:["#fff8e1","#ffecb3","#ffe082","#ffd54f","#ffca28","#ffc107","#ffb300","#ffa000","#ff8f00","#ff6f00"]},{name:"air",selectable:!0,group:"Continuous",domain:["#e1f5fe","#b3e5fc","#81d4fa","#4fc3f7","#29b6f6","#03a9f4","#039be5","#0288d1","#0277bd","#01579b"]},{name:"aqua",selectable:!0,group:"Continuous",domain:["#e0f7fa","#b2ebf2","#80deea","#4dd0e1","#26c6da","#00bcd4","#00acc1","#0097a7","#00838f","#006064"]},{name:"flame",selectable:!1,group:"Ordinal",domain:["#A10A28","#D3342D","#EF6D49","#FAAD67","#FDDE90","#DBED91","#A9D770","#6CBA67","#2C9653","#146738"]},{name:"ocean",selectable:!1,group:"Ordinal",domain:["#1D68FB","#33C0FC","#4AFFFE","#AFFFFF","#FFFC63","#FDBD2D","#FC8A25","#FA4F1E","#FA141B","#BA38D1"]},{name:"forest",selectable:!1,group:"Ordinal",domain:["#55C22D","#C1F33D","#3CC099","#AFFFFF","#8CFC9D","#76CFFA","#BA60FB","#EE6490","#C42A1C","#FC9F32"]},{name:"horizon",selectable:!1,group:"Ordinal",domain:["#2597FB","#65EBFD","#99FDD0","#FCEE4B","#FEFCFA","#FDD6E3","#FCB1A8","#EF6F7B","#CB96E8","#EFDEE0"]},{name:"neons",selectable:!1,group:"Ordinal",domain:["#FF3333","#FF33FF","#CC33FF","#0000FF","#33CCFF","#33FFFF","#33FF66","#CCFF33","#FFCC00","#FF6600"]},{name:"picnic",selectable:!1,group:"Ordinal",domain:["#FAC51D","#66BD6D","#FAA026","#29BB9C","#E96B56","#55ACD2","#B7332F","#2C83C9","#9166B8","#92E7E8"]},{name:"night",selectable:!1,group:"Ordinal",domain:["#2B1B5A","#501356","#183356","#28203F","#391B3C","#1E2B3C","#120634","#2D0432","#051932","#453080","#75267D","#2C507D","#4B3880","#752F7D","#35547D"]},{name:"nightLights",selectable:!1,group:"Ordinal",domain:["#4e31a5","#9c25a7","#3065ab","#57468b","#904497","#46648b","#32118d","#a00fb3","#1052a2","#6e51bd","#b63cc3","#6c97cb","#8671c1","#b455be","#7496c3"]}],Lt=function(){function t(t,e,i,n){"string"==typeof t&&(t=It.find((function(e){return e.name===t}))),this.colorDomain=t.domain,this.scaleType=e,this.domain=i,this.customColors=n,this.scale=this.generateColorScheme(t,e,this.domain)}return t.prototype.generateColorScheme=function(t,e,i){var n;if("string"==typeof t&&(t=It.find((function(e){return e.name===t}))),"quantile"===e)n=c.scaleQuantile().range(t.domain).domain(i);else if("ordinal"===e)n=c.scaleOrdinal().range(t.domain).domain(i);else if("linear"===e){var a=A(t.domain);1===a.length&&(a.push(a[0]),this.colorDomain=a);var o=d.range(0,1,1/a.length);n=c.scaleLinear().domain(o).range(a)}return n},t.prototype.getColor=function(t){if(null==t)throw new Error("Value can not be null");if("linear"===this.scaleType){var e=c.scaleLinear().domain(this.domain).range([0,1]);return this.scale(e(t))}if("function"==typeof this.customColors)return this.customColors(t);var i=t.toString(),n=void 0;return this.customColors&&this.customColors.length>0&&(n=this.customColors.find((function(t){return t.name.toLowerCase()===i.toLowerCase()}))),n?n.value:this.scale(t)},t.prototype.getLinearGradientStops=function(t,e){var i,n;void 0===e&&(e=this.domain[0]);var a=c.scaleLinear().domain(this.domain).range([0,1]),o=c.scaleBand().domain(this.colorDomain).range([0,1]),s=this.getColor(t),r=a(e),l=this.getColor(e),h=a(t),p=1,d=r,g=[];for(g.push({color:l,offset:r,originalOffset:r,opacity:1});d<h&&p<this.colorDomain.length;){var u=this.colorDomain[p],v=o(u);if(v<=r)p++;else{if(v.toFixed(4)>=(h-o.bandwidth()).toFixed(4))break;g.push({color:u,offset:v,opacity:1}),d=v,p++}}if(g[g.length-1].offset<100&&g.push({color:s,offset:h,opacity:1}),h===r)g[0].offset=0,g[1].offset=100;else if(100!==g[g.length-1].offset)try{for(var m=k(g),y=m.next();!y.done;y=m.next()){var x=y.value;x.offset=(x.offset-r)/(h-r)*100}}catch(t){i={error:t}}finally{try{y&&!y.done&&(n=m.return)&&n.call(m)}finally{if(i)throw i.error}}return g},t}();function St(t){var e,i,n,a,o=new Set;try{for(var s=k(t),r=s.next();!r.done;r=s.next()){var l=r.value;try{for(var c=(n=void 0,k(l.series)),h=c.next();!h.done;h=c.next()){var p=h.value;o.add(p.name)}}catch(t){n={error:t}}finally{try{h&&!h.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{r&&!r.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}return Array.from(o)}function Dt(t,e){if((void 0===e&&(e=!0),e)&&t.every((function(t){return t instanceof Date})))return"time";return t.every((function(t){return"number"==typeof t}))?"linear":"ordinal"}var Ct=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legendTitle="Legend",i.legendPosition="right",i.baseValue="auto",i.showGridLines=!0,i.curve=p.curveLinear,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.roundDomains=!1,i.tooltipDisabled=!1,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.timelineHeight=50,i.timelinePadding=10,i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.dims=At({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.timeline&&(this.dims.height-=this.timelineHeight+this.margin[2]+this.timelinePadding),this.xDomain=this.getXDomain(),this.filteredDomain&&(this.xDomain=this.filteredDomain),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,this.dims.width),this.yScale=this.getYScale(this.yDomain,this.dims.height),this.updateTimeline(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+", "+this.margin[0]+")",this.clipPathId="clip"+et().toString(),this.clipPath="url(#"+this.clipPathId+")"},i.prototype.updateTimeline=function(){this.timeline&&(this.timelineWidth=this.dims.width,this.timelineXDomain=this.getXDomain(),this.timelineXScale=this.getXScale(this.timelineXDomain,this.timelineWidth),this.timelineYScale=this.getYScale(this.yDomain,this.timelineHeight),this.timelineTransform="translate("+this.dims.xOffset+", "+-this.margin[2]+")")},i.prototype.getXDomain=function(){var t=St(this.results);this.scaleType=Dt(t);var e,i,n=[];return"linear"===this.scaleType&&(t=t.map((function(t){return Number(t)}))),"time"!==this.scaleType&&"linear"!==this.scaleType||(e=this.xScaleMin?this.xScaleMin:Math.min.apply(Math,A(t)),i=this.xScaleMax?this.xScaleMax:Math.max.apply(Math,A(t))),"time"===this.scaleType?(n=[new Date(e),new Date(i)],this.xSet=A(t).sort((function(t,e){var i=t.getTime(),n=e.getTime();return i>n?1:n>i?-1:0}))):"linear"===this.scaleType?(n=[e,i],this.xSet=A(t).sort((function(t,e){return t-e}))):(n=t,this.xSet=t),n},i.prototype.getYDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.value)||a.push(h.value)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}var p=A(a);return this.autoScale||p.push(0),"auto"!==this.baseValue&&p.push(this.baseValue),[this.yScaleMin?this.yScaleMin:Math.min.apply(Math,A(p)),this.yScaleMax?this.yScaleMax:Math.max.apply(Math,A(p))]},i.prototype.getSeriesDomain=function(){return this.results.map((function(t){return t.name}))},i.prototype.getXScale=function(t,e){var i;return"time"===this.scaleType?i=c.scaleTime():"linear"===this.scaleType?i=c.scaleLinear():"ordinal"===this.scaleType&&(i=c.scalePoint().padding(.1)),i.range([0,e]).domain(t),this.roundDomains?i.nice():i},i.prototype.getYScale=function(t,e){var i=c.scaleLinear().range([e,0]).domain(t);return this.roundDomains?i.nice():i},i.prototype.getScaleType=function(t){var e,i,n=!0,a=!0;try{for(var o=k(t),s=o.next();!s.done;s=o.next()){var r=s.value;this.isDate(r)||(n=!1),"number"!=typeof r&&(a=!1)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(e)throw e.error}}return n?"time":a?"linear":"ordinal"},i.prototype.isDate=function(t){return t instanceof Date},i.prototype.updateDomain=function(t){this.filteredDomain=t,this.xDomain=this.filteredDomain,this.xScale=this.getXScale(this.xDomain,this.dims.width)},i.prototype.updateHoveredVertical=function(t){this.hoveredVertical=t.value,this.deactivateAll()},i.prototype.hideCircles=function(){this.hoveredVertical=null,this.deactivateAll()},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.seriesDomain:this.yDomain,this.colors=new Lt(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.seriesDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.yDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t){this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t){var e=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}));this.activeEntries.splice(e,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},i.prototype.deactivateAll=function(){var t,e;this.activeEntries=A(this.activeEntries);try{for(var i=k(this.activeEntries),n=i.next();!n.done;n=i.next()){var a=n.value;this.deactivate.emit({value:a,entries:[]})}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.activeEntries=[]},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"state",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"baseValue",void 0),T([e.Input()],i.prototype,"autoScale",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"timeline",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"curve",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"xScaleMin",void 0),T([e.Input()],i.prototype,"xScaleMax",void 0),T([e.Input()],i.prototype,"yScaleMin",void 0),T([e.Input()],i.prototype,"yScaleMax",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),T([e.ContentChild("seriesTooltipTemplate")],i.prototype,"seriesTooltipTemplate",void 0),T([e.HostListener("mouseleave")],i.prototype,"hideCircles",null),i=T([e.Component({selector:"ngx-charts-area-chart",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelClick)="onClick($event)"\n (legendLabelActivate)="onActivate($event)"\n (legendLabelDeactivate)="onDeactivate($event)"\n >\n <svg:defs>\n <svg:clipPath [attr.id]="clipPathId">\n <svg:rect\n [attr.width]="dims.width + 10"\n [attr.height]="dims.height + 10"\n [attr.transform]="\'translate(-5, -5)\'"\n />\n </svg:clipPath>\n </svg:defs>\n <svg:g [attr.transform]="transform" class="area-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g [attr.clip-path]="clipPath">\n <svg:g *ngFor="let series of results; trackBy: trackBy">\n <svg:g\n ngx-charts-area-series\n [xScale]="xScale"\n [yScale]="yScale"\n [baseValue]="baseValue"\n [colors]="colors"\n [data]="series"\n [activeEntries]="activeEntries"\n [scaleType]="scaleType"\n [gradient]="gradient"\n [curve]="curve"\n [animations]="animations"\n />\n </svg:g>\n\n <svg:g *ngIf="!tooltipDisabled" (mouseleave)="hideCircles()">\n <svg:g\n ngx-charts-tooltip-area\n [dims]="dims"\n [xSet]="xSet"\n [xScale]="xScale"\n [yScale]="yScale"\n [results]="results"\n [colors]="colors"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="seriesTooltipTemplate"\n (hover)="updateHoveredVertical($event)"\n />\n\n <svg:g *ngFor="let series of results">\n <svg:g\n ngx-charts-circle-series\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [activeEntries]="activeEntries"\n [data]="series"\n [scaleType]="scaleType"\n [visibleValue]="hoveredVertical"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n (select)="onClick($event, series)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </svg:g>\n <svg:g\n ngx-charts-timeline\n *ngIf="timeline && scaleType != \'ordinal\'"\n [attr.transform]="timelineTransform"\n [results]="results"\n [view]="[timelineWidth, height]"\n [height]="timelineHeight"\n [scheme]="scheme"\n [customColors]="customColors"\n [legend]="legend"\n [scaleType]="scaleType"\n (onDomainChange)="updateDomain($event)"\n >\n <svg:g *ngFor="let series of results; trackBy: trackBy">\n <svg:g\n ngx-charts-area-series\n [xScale]="timelineXScale"\n [yScale]="timelineYScale"\n [baseValue]="baseValue"\n [colors]="colors"\n [data]="series"\n [scaleType]="scaleType"\n [gradient]="gradient"\n [curve]="curve"\n [animations]="animations"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(R),Et=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.showGridLines=!0,i.curve=p.curveLinear,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.roundDomains=!1,i.tooltipDisabled=!1,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.timelineHeight=50,i.timelinePadding=10,i}return f(i,t),i.prototype.update=function(){var e=this;t.prototype.update.call(this),this.dims=At({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.timeline&&(this.dims.height-=this.timelineHeight+this.margin[2]+this.timelinePadding),this.xDomain=this.getXDomain(),this.filteredDomain&&(this.xDomain=this.filteredDomain),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,this.dims.width),this.yScale=this.getYScale(this.yDomain,this.dims.height);for(var i=function(t){var i,a,o,s,r=n.xSet[t],l=0,c=0;try{for(var h=(i=void 0,k(n.results)),p=h.next();!p.done;p=h.next()){(v=(u=p.value).series.find((function(t){var i=t.name,n=r;return"time"===e.scaleType&&(i=i.valueOf(),n=n.valueOf()),i===n})))&&(c+=v.value)}}catch(t){i={error:t}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}try{for(var d=(o=void 0,k(n.results)),g=d.next();!g.done;g=d.next()){var u,v;(v=(u=g.value).series.find((function(t){var i=t.name,n=r;return"time"===e.scaleType&&(i=i.valueOf(),n=n.valueOf()),i===n})))?(v.d0=l,v.d1=l+v.value,l+=v.value):(v={name:r,value:0,d0:l,d1:l},u.series.push(v)),c>0?(v.d0=100*v.d0/c,v.d1=100*v.d1/c):(v.d0=0,v.d1=0)}}catch(t){o={error:t}}finally{try{g&&!g.done&&(s=d.return)&&s.call(d)}finally{if(o)throw o.error}}},n=this,a=0;a<this.xSet.length;a++)i(a);this.updateTimeline(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")",this.clipPathId="clip"+et().toString(),this.clipPath="url(#"+this.clipPathId+")"},i.prototype.updateTimeline=function(){this.timeline&&(this.timelineWidth=this.dims.width,this.timelineXDomain=this.getXDomain(),this.timelineXScale=this.getXScale(this.timelineXDomain,this.timelineWidth),this.timelineYScale=this.getYScale(this.yDomain,this.timelineHeight),this.timelineTransform="translate("+this.dims.xOffset+", "+-this.margin[2]+")")},i.prototype.getXDomain=function(){var t=St(this.results);this.scaleType=Dt(t);var e=[];if("time"===this.scaleType){var i=Math.min.apply(Math,A(t)),n=Math.max.apply(Math,A(t));e=[new Date(i),new Date(n)],this.xSet=A(t).sort((function(t,e){var i=t.getTime(),n=e.getTime();return i>n?1:n>i?-1:0}))}else if("linear"===this.scaleType){t=t.map((function(t){return Number(t)})),e=[i=Math.min.apply(Math,A(t)),n=Math.max.apply(Math,A(t))],this.xSet=A(t).sort((function(t,e){return t-e}))}else e=t,this.xSet=t;return e},i.prototype.getYDomain=function(){return[0,100]},i.prototype.getSeriesDomain=function(){return this.results.map((function(t){return t.name}))},i.prototype.getXScale=function(t,e){var i;return"time"===this.scaleType?i=c.scaleTime():"linear"===this.scaleType?i=c.scaleLinear():"ordinal"===this.scaleType&&(i=c.scalePoint().padding(.1)),i.range([0,e]).domain(t),this.roundDomains?i.nice():i},i.prototype.getYScale=function(t,e){var i=c.scaleLinear().range([e,0]).domain(t);return this.roundDomains?i.nice():i},i.prototype.updateDomain=function(t){this.filteredDomain=t,this.xDomain=this.filteredDomain,this.xScale=this.getXScale(this.xDomain,this.dims.width)},i.prototype.updateHoveredVertical=function(t){this.hoveredVertical=t.value,this.deactivateAll()},i.prototype.hideCircles=function(){this.hoveredVertical=null,this.deactivateAll()},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.seriesDomain:this.yDomain,this.colors=new Lt(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.seriesDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.yDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t){this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t){var e=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}));this.activeEntries.splice(e,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},i.prototype.deactivateAll=function(){var t,e;this.activeEntries=A(this.activeEntries);try{for(var i=k(this.activeEntries),n=i.next();!n.done;n=i.next()){var a=n.value;this.deactivate.emit({value:a,entries:[]})}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.activeEntries=[]},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"timeline",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"curve",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),T([e.ContentChild("seriesTooltipTemplate")],i.prototype,"seriesTooltipTemplate",void 0),T([e.HostListener("mouseleave")],i.prototype,"hideCircles",null),i=T([e.Component({selector:"ngx-charts-area-chart-normalized",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelClick)="onClick($event)"\n (legendLabelActivate)="onActivate($event)"\n (legendLabelDeactivate)="onDeactivate($event)"\n >\n <svg:defs>\n <svg:clipPath [attr.id]="clipPathId">\n <svg:rect\n [attr.width]="dims.width + 10"\n [attr.height]="dims.height + 10"\n [attr.transform]="\'translate(-5, -5)\'"\n />\n </svg:clipPath>\n </svg:defs>\n <svg:g [attr.transform]="transform" class="area-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g [attr.clip-path]="clipPath">\n <svg:g *ngFor="let series of results; trackBy: trackBy">\n <svg:g\n ngx-charts-area-series\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [data]="series"\n [scaleType]="scaleType"\n [activeEntries]="activeEntries"\n [gradient]="gradient"\n normalized="true"\n [curve]="curve"\n [animations]="animations"\n />\n </svg:g>\n\n <svg:g *ngIf="!tooltipDisabled" (mouseleave)="hideCircles()">\n <svg:g\n ngx-charts-tooltip-area\n [dims]="dims"\n [xSet]="xSet"\n [xScale]="xScale"\n [yScale]="yScale"\n [results]="results"\n [colors]="colors"\n [showPercentage]="true"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="seriesTooltipTemplate"\n (hover)="updateHoveredVertical($event)"\n />\n\n <svg:g *ngFor="let series of results">\n <svg:g\n ngx-charts-circle-series\n type="stacked"\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [activeEntries]="activeEntries"\n [data]="series"\n [scaleType]="scaleType"\n [visibleValue]="hoveredVertical"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n (select)="onClick($event, series)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </svg:g>\n <svg:g\n ngx-charts-timeline\n *ngIf="timeline && scaleType != \'ordinal\'"\n [attr.transform]="timelineTransform"\n [results]="results"\n [view]="[timelineWidth, height]"\n [height]="timelineHeight"\n [scheme]="scheme"\n [customColors]="customColors"\n [legend]="legend"\n [scaleType]="scaleType"\n (onDomainChange)="updateDomain($event)"\n >\n <svg:g *ngFor="let series of results; trackBy: trackBy">\n <svg:g\n ngx-charts-area-series\n [xScale]="timelineXScale"\n [yScale]="timelineYScale"\n [colors]="colors"\n [data]="series"\n [scaleType]="scaleType"\n [gradient]="gradient"\n normalized="true"\n [curve]="curve"\n [animations]="animations"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(R),Ot=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.showGridLines=!0,i.curve=p.curveLinear,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.roundDomains=!1,i.tooltipDisabled=!1,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.timelineHeight=50,i.timelinePadding=10,i}return f(i,t),i.prototype.update=function(){var e=this;t.prototype.update.call(this),this.dims=At({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.timeline&&(this.dims.height-=this.timelineHeight+this.margin[2]+this.timelinePadding),this.xDomain=this.getXDomain(),this.filteredDomain&&(this.xDomain=this.filteredDomain),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,this.dims.width),this.yScale=this.getYScale(this.yDomain,this.dims.height);for(var i=function(t){var i,a,o=n.xSet[t],s=0;try{for(var r=(i=void 0,k(n.results)),l=r.next();!l.done;l=r.next()){var c=l.value,h=c.series.find((function(t){var i=t.name,n=o;return"time"===e.scaleType&&(i=i.valueOf(),n=n.valueOf()),i===n}));h?(h.d0=s,h.d1=s+h.value,s+=h.value):(h={name:o,value:0,d0:s,d1:s},c.series.push(h))}}catch(t){i={error:t}}finally{try{l&&!l.done&&(a=r.return)&&a.call(r)}finally{if(i)throw i.error}}},n=this,a=0;a<this.xSet.length;a++)i(a);this.updateTimeline(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")",this.clipPathId="clip"+et().toString(),this.clipPath="url(#"+this.clipPathId+")"},i.prototype.updateTimeline=function(){this.timeline&&(this.timelineWidth=this.dims.width,this.timelineXDomain=this.getXDomain(),this.timelineXScale=this.getXScale(this.timelineXDomain,this.timelineWidth),this.timelineYScale=this.getYScale(this.yDomain,this.timelineHeight),this.timelineTransform="translate("+this.dims.xOffset+", "+-this.margin[2]+")")},i.prototype.getXDomain=function(){var t=St(this.results);this.scaleType=Dt(t);var e,i,n=[];return"linear"===this.scaleType&&(t=t.map((function(t){return Number(t)}))),"time"!==this.scaleType&&"linear"!==this.scaleType||(e=this.xScaleMin?this.xScaleMin:Math.min.apply(Math,A(t)),i=this.xScaleMax?this.xScaleMax:Math.max.apply(Math,A(t))),"time"===this.scaleType?(n=[new Date(e),new Date(i)],this.xSet=A(t).sort((function(t,e){var i=t.getTime(),n=e.getTime();return i>n?1:n>i?-1:0}))):"linear"===this.scaleType?(n=[e,i],this.xSet=A(t).sort((function(t,e){return t-e}))):(n=t,this.xSet=t),n},i.prototype.getYDomain=function(){for(var t=this,e=[],i=function(i){var a,o,s=n.xSet[i],r=0;try{for(var l=(a=void 0,k(n.results)),c=l.next();!c.done;c=l.next()){var h=c.value.series.find((function(e){var i=e.name,n=s;return"time"===t.scaleType&&(i=i.valueOf(),n=n.valueOf()),i===n}));h&&(r+=h.value)}}catch(t){a={error:t}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(a)throw a.error}}e.push(r)},n=this,a=0;a<this.xSet.length;a++)i(a);return[this.yScaleMin?this.yScaleMin:Math.min.apply(Math,A([0],e)),this.yScaleMax?this.yScaleMax:Math.max.apply(Math,A(e))]},i.prototype.getSeriesDomain=function(){return this.results.map((function(t){return t.name}))},i.prototype.getXScale=function(t,e){var i;return"time"===this.scaleType?i=c.scaleTime():"linear"===this.scaleType?i=c.scaleLinear():"ordinal"===this.scaleType&&(i=c.scalePoint().padding(.1)),i.range([0,e]).domain(t),this.roundDomains?i.nice():i},i.prototype.getYScale=function(t,e){var i=c.scaleLinear().range([e,0]).domain(t);return this.roundDomains?i.nice():i},i.prototype.updateDomain=function(t){this.filteredDomain=t,this.xDomain=this.filteredDomain,this.xScale=this.getXScale(this.xDomain,this.dims.width)},i.prototype.updateHoveredVertical=function(t){this.hoveredVertical=t.value,this.deactivateAll()},i.prototype.hideCircles=function(){this.hoveredVertical=null,this.deactivateAll()},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.seriesDomain:this.yDomain,this.colors=new Lt(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.seriesDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.yDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t){this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t){var e=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}));this.activeEntries.splice(e,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},i.prototype.deactivateAll=function(){var t,e;this.activeEntries=A(this.activeEntries);try{for(var i=k(this.activeEntries),n=i.next();!n.done;n=i.next()){var a=n.value;this.deactivate.emit({value:a,entries:[]})}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.activeEntries=[]},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"timeline",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"curve",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"xScaleMin",void 0),T([e.Input()],i.prototype,"xScaleMax",void 0),T([e.Input()],i.prototype,"yScaleMin",void 0),T([e.Input()],i.prototype,"yScaleMax",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),T([e.ContentChild("seriesTooltipTemplate")],i.prototype,"seriesTooltipTemplate",void 0),T([e.HostListener("mouseleave")],i.prototype,"hideCircles",null),i=T([e.Component({selector:"ngx-charts-area-chart-stacked",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelClick)="onClick($event)"\n (legendLabelActivate)="onActivate($event)"\n (legendLabelDeactivate)="onDeactivate($event)"\n >\n <svg:defs>\n <svg:clipPath [attr.id]="clipPathId">\n <svg:rect\n [attr.width]="dims.width + 10"\n [attr.height]="dims.height + 10"\n [attr.transform]="\'translate(-5, -5)\'"\n />\n </svg:clipPath>\n </svg:defs>\n <svg:g [attr.transform]="transform" class="area-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g [attr.clip-path]="clipPath">\n <svg:g *ngFor="let series of results; trackBy: trackBy">\n <svg:g\n ngx-charts-area-series\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [data]="series"\n [scaleType]="scaleType"\n [gradient]="gradient"\n [activeEntries]="activeEntries"\n stacked="true"\n [curve]="curve"\n [animations]="animations"\n />\n </svg:g>\n\n <svg:g *ngIf="!tooltipDisabled" (mouseleave)="hideCircles()">\n <svg:g\n ngx-charts-tooltip-area\n [dims]="dims"\n [xSet]="xSet"\n [xScale]="xScale"\n [yScale]="yScale"\n [results]="results"\n [colors]="colors"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="seriesTooltipTemplate"\n (hover)="updateHoveredVertical($event)"\n />\n\n <svg:g *ngFor="let series of results; trackBy: trackBy">\n <svg:g\n ngx-charts-circle-series\n type="stacked"\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [activeEntries]="activeEntries"\n [data]="series"\n [scaleType]="scaleType"\n [visibleValue]="hoveredVertical"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n (select)="onClick($event, series)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </svg:g>\n <svg:g\n ngx-charts-timeline\n *ngIf="timeline && scaleType != \'ordinal\'"\n [attr.transform]="timelineTransform"\n [results]="results"\n [view]="[timelineWidth, height]"\n [height]="timelineHeight"\n [scheme]="scheme"\n [customColors]="customColors"\n [legend]="legend"\n [scaleType]="scaleType"\n (onDomainChange)="updateDomain($event)"\n >\n <svg:g *ngFor="let series of results; trackBy: trackBy">\n <svg:g\n ngx-charts-area-series\n [xScale]="timelineXScale"\n [yScale]="timelineYScale"\n [colors]="colors"\n [data]="series"\n [scaleType]="scaleType"\n [gradient]="gradient"\n stacked="true"\n [curve]="curve"\n [animations]="animations"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(R);function Mt(t,e,i){return void 0===i&&(i="asc"),t.sort((function(t,n){return"asc"===i?t[e]-n[e]:n[e]-t[e]}))}function Ft(t,e,i,n){return void 0===i&&(i="asc"),t.sort((function(t,a){var o=t[e],s=a[e],r=n.indexOf(o),l=n.indexOf(s);return"asc"===i?r-l:l-r}))}function Pt(t,e,i){return void 0===i&&(i="asc"),t.sort((function(t,n){var a=t[e].getTime(),o=n[e].getTime();return"asc"===i?a>o?1:o>a?-1:0:a>o?-1:o>a?1:0}))}var Xt,Yt=function(){function t(){this.baseValue="auto",this.stacked=!1,this.normalized=!1,this.animations=!0,this.select=new e.EventEmitter}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){var t,e,i=this;this.updateGradient();var n=function(t){var e=t.name;return i.xScale(e)};this.stacked||this.normalized?(t=p.area().x(n).y0((function(t,e){return i.yScale(t.d0)})).y1((function(t,e){return i.yScale(t.d1)})),e=p.area().x(n).y0((function(t){return i.yScale.range()[0]})).y1((function(t){return i.yScale.range()[0]}))):(t=p.area().x(n).y0((function(){return"auto"===i.baseValue?i.yScale.range()[0]:i.yScale(i.baseValue)})).y1((function(t){return i.yScale(t.value)})),e=p.area().x(n).y0((function(t){return"auto"===i.baseValue?i.yScale.range()[0]:i.yScale(i.baseValue)})).y1((function(t){return"auto"===i.baseValue?i.yScale.range()[0]:i.yScale(i.baseValue)}))),t.curve(this.curve),e.curve(this.curve),this.opacity=.8;var a=this.data.series;a="linear"===this.scaleType?Mt(a,"name"):"time"===this.scaleType?Pt(a,"name"):Ft(a,"name","asc",this.xScale.domain()),this.path=t(a),this.startingPath=e(a)},t.prototype.updateGradient=function(){if("linear"===this.colors.scaleType)if(this.hasGradient=!0,this.stacked||this.normalized){var t=this.data.series.map((function(t){return t.d0})),e=this.data.series.map((function(t){return t.d1})),i=Math.max.apply(Math,A(e)),n=Math.min.apply(Math,A(t));this.gradientStops=this.colors.getLinearGradientStops(i,n)}else{var a=this.data.series.map((function(t){return t.value}));i=Math.max.apply(Math,A(a));this.gradientStops=this.colors.getLinearGradientStops(i)}else this.hasGradient=!1,this.gradientStops=void 0},t.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.name===e.name}))},t.prototype.isInactive=function(t){return!(!this.activeEntries||0===this.activeEntries.length)&&void 0===this.activeEntries.find((function(e){return t.name===e.name}))},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"xScale",void 0),T([e.Input()],t.prototype,"yScale",void 0),T([e.Input()],t.prototype,"baseValue",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"scaleType",void 0),T([e.Input()],t.prototype,"stacked",void 0),T([e.Input()],t.prototype,"normalized",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"curve",void 0),T([e.Input()],t.prototype,"activeEntries",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),t=T([e.Component({selector:"g[ngx-charts-area-series]",template:'\n <svg:g\n ngx-charts-area\n class="area-series"\n [data]="data"\n [path]="path"\n [fill]="colors.getColor(data.name)"\n [stops]="gradientStops"\n [startingPath]="startingPath"\n [opacity]="opacity"\n [gradient]="gradient || hasGradient"\n [animations]="animations"\n [class.active]="isActive(data)"\n [class.inactive]="isInactive(data)"\n />\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Rt=function(){function t(){}return t=T([e.NgModule({imports:[wt],declarations:[Ct,Et,Ot,Yt],exports:[Ct,Et,Ot,Yt]})],t)}(),zt=function(){function t(t){this.roundEdges=!0,this.gradient=!1,this.offset=0,this.isActive=!1,this.animations=!0,this.noBarWhenZero=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.hasGradient=!1,this.hideBar=!1,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(t){t.roundEdges&&this.loadAnimation(),this.update()},t.prototype.update=function(){this.gradientId="grad"+et().toString(),this.gradientFill="url(#"+this.gradientId+")",this.gradient||this.stops?(this.gradientStops=this.getGradient(),this.hasGradient=!0):this.hasGradient=!1,this.updatePathEl(),this.checkToHideBar()},t.prototype.loadAnimation=function(){this.path=this.getStartingPath(),setTimeout(this.update.bind(this),100)},t.prototype.updatePathEl=function(){var t=r.select(this.element).select(".bar"),e=this.getPath();this.animations?t.transition().duration(500).attr("d",e):t.attr("d",e)},t.prototype.getGradient=function(){return this.stops?this.stops:[{offset:0,color:this.fill,opacity:this.getStartOpacity()},{offset:100,color:this.fill,opacity:1}]},t.prototype.getStartingPath=function(){if(!this.animations)return this.getPath();var t,e=this.getRadius();return this.roundEdges?"vertical"===this.orientation?(e=Math.min(this.height,e),t=G(this.x,this.y+this.height,this.width,1,0,this.edges)):"horizontal"===this.orientation&&(e=Math.min(this.width,e),t=G(this.x,this.y,1,this.height,0,this.edges)):"vertical"===this.orientation?t=G(this.x,this.y+this.height,this.width,1,0,this.edges):"horizontal"===this.orientation&&(t=G(this.x,this.y,1,this.height,0,this.edges)),t},t.prototype.getPath=function(){var t,e=this.getRadius();return this.roundEdges?"vertical"===this.orientation?(e=Math.min(this.height,e),t=G(this.x,this.y,this.width,this.height,e,this.edges)):"horizontal"===this.orientation&&(e=Math.min(this.width,e),t=G(this.x,this.y,this.width,this.height,e,this.edges)):t=G(this.x,this.y,this.width,this.height,e,this.edges),t},t.prototype.getRadius=function(){var t=0;return this.roundEdges&&this.height>5&&this.width>5&&(t=Math.floor(Math.min(5,this.height/2,this.width/2))),t},t.prototype.getStartOpacity=function(){return this.roundEdges?.2:.5},Object.defineProperty(t.prototype,"edges",{get:function(){var t=[!1,!1,!1,!1];return this.roundEdges&&("vertical"===this.orientation?t=this.data.value>0?[!0,!0,!1,!1]:[!1,!1,!0,!0]:"horizontal"===this.orientation&&(t=this.data.value>0?[!1,!0,!1,!0]:[!0,!1,!0,!1])),t},enumerable:!0,configurable:!0}),t.prototype.onMouseEnter=function(){this.activate.emit(this.data)},t.prototype.onMouseLeave=function(){this.deactivate.emit(this.data)},t.prototype.checkToHideBar=function(){this.hideBar=this.noBarWhenZero&&("vertical"===this.orientation&&0===this.height||"horizontal"===this.orientation&&0===this.width)},t.ctorParameters=function(){return[{type:e.ElementRef}]},T([e.Input()],t.prototype,"fill",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"height",void 0),T([e.Input()],t.prototype,"x",void 0),T([e.Input()],t.prototype,"y",void 0),T([e.Input()],t.prototype,"orientation",void 0),T([e.Input()],t.prototype,"roundEdges",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"offset",void 0),T([e.Input()],t.prototype,"isActive",void 0),T([e.Input()],t.prototype,"stops",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Input()],t.prototype,"ariaLabel",void 0),T([e.Input()],t.prototype,"noBarWhenZero",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),T([e.HostListener("mouseenter")],t.prototype,"onMouseEnter",null),T([e.HostListener("mouseleave")],t.prototype,"onMouseLeave",null),t=T([e.Component({selector:"g[ngx-charts-bar]",template:'\n <svg:defs *ngIf="hasGradient">\n <svg:g ngx-charts-svg-linear-gradient [orientation]="orientation" [name]="gradientId" [stops]="gradientStops" />\n </svg:defs>\n <svg:path\n class="bar"\n stroke="none"\n role="img"\n tabIndex="-1"\n [class.active]="isActive"\n [class.hidden]="hideBar"\n [attr.d]="path"\n [attr.aria-label]="ariaLabel"\n [attr.fill]="hasGradient ? gradientFill : fill"\n (click)="select.emit(data)"\n />\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Ht=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.tooltipDisabled=!1,i.showGridLines=!0,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.barPadding=8,i.roundDomains=!1,i.roundEdges=!0,i.showDataLabel=!1,i.noBarWhenZero=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.dataLabelMaxWidth={negative:0,positive:0},i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.showDataLabel||(this.dataLabelMaxWidth={negative:0,positive:0}),this.margin=[10,20+this.dataLabelMaxWidth.positive,10,20+this.dataLabelMaxWidth.negative],this.dims=At({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.formatDates(),this.xScale=this.getXScale(),this.yScale=this.getYScale(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")"},i.prototype.getXScale=function(){this.xDomain=this.getXDomain();var t=c.scaleLinear().range([0,this.dims.width]).domain(this.xDomain);return this.roundDomains?t.nice():t},i.prototype.getYScale=function(){this.yDomain=this.getYDomain();var t=this.yDomain.length/(this.dims.height/this.barPadding+1);return c.scaleBand().rangeRound([0,this.dims.height]).paddingInner(t).domain(this.yDomain)},i.prototype.getXDomain=function(){var t=this.results.map((function(t){return t.value}));return[this.xScaleMin?Math.min.apply(Math,A([this.xScaleMin],t)):Math.min.apply(Math,A([0],t)),this.xScaleMax?Math.max.apply(Math,A([this.xScaleMax],t)):Math.max.apply(Math,A([0],t))]},i.prototype.getYDomain=function(){return this.results.map((function(t){return t.label}))},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.yDomain:this.xDomain,this.colors=new Lt(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.yDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.xDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onDataLabelMaxWidthChanged=function(t){var e=this;t.size.negative?this.dataLabelMaxWidth.negative=Math.max(this.dataLabelMaxWidth.negative,t.size.width):this.dataLabelMaxWidth.positive=Math.max(this.dataLabelMaxWidth.positive,t.size.width),t.index===this.results.length-1&&setTimeout((function(){return e.update()}))},i.prototype.onActivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name})),this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name}));var i=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}));this.activeEntries.splice(i,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"barPadding",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"roundEdges",void 0),T([e.Input()],i.prototype,"xScaleMax",void 0),T([e.Input()],i.prototype,"xScaleMin",void 0),T([e.Input()],i.prototype,"showDataLabel",void 0),T([e.Input()],i.prototype,"dataLabelFormatting",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-bar-horizontal",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelClick)="onClick($event)"\n (legendLabelActivate)="onActivate($event, true)"\n (legendLabelDeactivate)="onDeactivate($event, true)"\n >\n <svg:g [attr.transform]="transform" class="bar-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n [yAxisOffset]="dataLabelMaxWidth.negative"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g\n ngx-charts-series-horizontal\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [series]="results"\n [dims]="dims"\n [gradient]="gradient"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [activeEntries]="activeEntries"\n [roundEdges]="roundEdges"\n [animations]="animations"\n [showDataLabel]="showDataLabel"\n [dataLabelFormatting]="dataLabelFormatting"\n [noBarWhenZero]="noBarWhenZero"\n (select)="onClick($event)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n (dataLabelWidthChanged)="onDataLabelMaxWidthChanged($event)"\n ></svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(R),Wt=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.tooltipDisabled=!1,i.showGridLines=!0,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.groupPadding=16,i.barPadding=8,i.roundDomains=!1,i.roundEdges=!0,i.showDataLabel=!1,i.noBarWhenZero=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.dataLabelMaxWidth={negative:0,positive:0},i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.showDataLabel||(this.dataLabelMaxWidth={negative:0,positive:0}),this.margin=[10,20+this.dataLabelMaxWidth.positive,10,20+this.dataLabelMaxWidth.negative],this.dims=At({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.formatDates(),this.groupDomain=this.getGroupDomain(),this.innerDomain=this.getInnerDomain(),this.valuesDomain=this.getValueDomain(),this.groupScale=this.getGroupScale(),this.innerScale=this.getInnerScale(),this.valueScale=this.getValueScale(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")"},i.prototype.getGroupScale=function(){var t=this.groupDomain.length/(this.dims.height/this.groupPadding+1);return c.scaleBand().rangeRound([0,this.dims.height]).paddingInner(t).paddingOuter(t/2).domain(this.groupDomain)},i.prototype.getInnerScale=function(){var t=this.groupScale.bandwidth(),e=this.innerDomain.length/(t/this.barPadding+1);return c.scaleBand().rangeRound([0,t]).paddingInner(e).domain(this.innerDomain)},i.prototype.getValueScale=function(){var t=c.scaleLinear().range([0,this.dims.width]).domain(this.valuesDomain);return this.roundDomains?t.nice():t},i.prototype.getGroupDomain=function(){var t,e,i=[];try{for(var n=k(this.results),a=n.next();!a.done;a=n.next()){var o=a.value;i.includes(o.label)||i.push(o.label)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return i},i.prototype.getInnerDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.label)||a.push(h.label)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getValueDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.value)||a.push(h.value)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return[Math.min.apply(Math,A([0],a)),this.xScaleMax?Math.max.apply(Math,A([this.xScaleMax],a)):Math.max.apply(Math,A([0],a))]},i.prototype.groupTransform=function(t){return"translate(0, "+this.groupScale(t.label)+")"},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.innerDomain:this.valuesDomain,this.colors=new Lt(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.innerDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.valuesDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onDataLabelMaxWidthChanged=function(t,e){var i=this;t.size.negative?this.dataLabelMaxWidth.negative=Math.max(this.dataLabelMaxWidth.negative,t.size.width):this.dataLabelMaxWidth.positive=Math.max(this.dataLabelMaxWidth.positive,t.size.width),e===this.results.length-1&&setTimeout((function(){return i.update()}))},i.prototype.onActivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name);var a=this.results.map((function(t){return t.series})).flat().filter((function(t){return i?t.label===n.name:t.name===n.name&&t.series===n.series}));this.activeEntries=A(a),this.activate.emit({value:n,entries:this.activeEntries})},i.prototype.onDeactivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name),this.activeEntries=this.activeEntries.filter((function(t){return i?t.label!==n.name:!(t.name===n.name&&t.series===n.series)})),this.deactivate.emit({value:n,entries:this.activeEntries})},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"groupPadding",void 0),T([e.Input()],i.prototype,"barPadding",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"roundEdges",void 0),T([e.Input()],i.prototype,"xScaleMax",void 0),T([e.Input()],i.prototype,"showDataLabel",void 0),T([e.Input()],i.prototype,"dataLabelFormatting",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-bar-horizontal-2d",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelActivate)="onActivate($event, undefined, true)"\n (legendLabelDeactivate)="onDeactivate($event, undefined, true)"\n (legendLabelClick)="onClick($event)"\n >\n <svg:g [attr.transform]="transform" class="bar-chart chart">\n <svg:g\n ngx-charts-grid-panel-series\n [xScale]="valueScale"\n [yScale]="groupScale"\n [data]="results"\n [dims]="dims"\n orient="horizontal"\n ></svg:g>\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="valueScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="groupScale"\n [dims]="dims"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n [yAxisOffset]="dataLabelMaxWidth.negative"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g\n *ngFor="let group of results; let index = index; trackBy: trackBy"\n [@animationState]="\'active\'"\n [attr.transform]="groupTransform(group)"\n >\n <svg:g\n ngx-charts-series-horizontal\n [xScale]="valueScale"\n [activeEntries]="activeEntries"\n [yScale]="innerScale"\n [colors]="colors"\n [series]="group.series"\n [dims]="dims"\n [gradient]="gradient"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [seriesName]="group.name"\n [roundEdges]="roundEdges"\n [animations]="animations"\n [showDataLabel]="showDataLabel"\n [dataLabelFormatting]="dataLabelFormatting"\n [noBarWhenZero]="noBarWhenZero"\n (select)="onClick($event, group)"\n (activate)="onActivate($event, group)"\n (deactivate)="onDeactivate($event, group)"\n (dataLabelWidthChanged)="onDataLabelMaxWidthChanged($event, index)"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1,transform:"*"}),n.animate(500,n.style({opacity:0,transform:"scale(0)"}))])])],styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(R),Bt=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.tooltipDisabled=!1,i.showGridLines=!0,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.barPadding=8,i.roundDomains=!1,i.noBarWhenZero=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.dims=At({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.formatDates(),this.groupDomain=this.getGroupDomain(),this.innerDomain=this.getInnerDomain(),this.valueDomain=this.getValueDomain(),this.xScale=this.getXScale(),this.yScale=this.getYScale(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")"},i.prototype.getGroupDomain=function(){var t,e,i=[];try{for(var n=k(this.results),a=n.next();!a.done;a=n.next()){var o=a.value;i.includes(o.label)||i.push(o.label)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return i},i.prototype.getInnerDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.label)||a.push(h.label)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getValueDomain=function(){return[0,100]},i.prototype.getYScale=function(){var t=this.groupDomain.length/(this.dims.height/this.barPadding+1);return c.scaleBand().rangeRound([0,this.dims.height]).paddingInner(t).domain(this.groupDomain)},i.prototype.getXScale=function(){var t=c.scaleLinear().range([0,this.dims.width]).domain(this.valueDomain);return this.roundDomains?t.nice():t},i.prototype.groupTransform=function(t){return"translate(0, "+this.yScale(t.name)+")"},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.innerDomain:this.valueDomain,this.colors=new Lt(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.innerDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.valueDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name);var a=this.results.map((function(t){return t.series})).flat().filter((function(t){return i?t.label===n.name:t.name===n.name&&t.series===n.series}));this.activeEntries=A(a),this.activate.emit({value:n,entries:this.activeEntries})},i.prototype.onDeactivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name),this.activeEntries=this.activeEntries.filter((function(t){return i?t.label!==n.name:!(t.name===n.name&&t.series===n.series)})),this.deactivate.emit({value:n,entries:this.activeEntries})},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"barPadding",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-bar-horizontal-normalized",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelActivate)="onActivate($event, undefined, true)"\n (legendLabelDeactivate)="onDeactivate($event, undefined, true)"\n (legendLabelClick)="onClick($event)"\n >\n <svg:g [attr.transform]="transform" class="bar-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g\n *ngFor="let group of results; trackBy: trackBy"\n [@animationState]="\'active\'"\n [attr.transform]="groupTransform(group)"\n >\n <svg:g\n ngx-charts-series-horizontal\n type="normalized"\n [xScale]="xScale"\n [yScale]="yScale"\n [activeEntries]="activeEntries"\n [colors]="colors"\n [series]="group.series"\n [dims]="dims"\n [gradient]="gradient"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [seriesName]="group.name"\n [animations]="animations"\n (select)="onClick($event, group)"\n (activate)="onActivate($event, group)"\n (deactivate)="onDeactivate($event, group)"\n [noBarWhenZero]="noBarWhenZero"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1,transform:"*"}),n.animate(500,n.style({opacity:0,transform:"scale(0)"}))])])],styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(R),Vt=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.tooltipDisabled=!1,i.showGridLines=!0,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.barPadding=8,i.roundDomains=!1,i.showDataLabel=!1,i.noBarWhenZero=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.dataLabelMaxWidth={negative:0,positive:0},i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.showDataLabel||(this.dataLabelMaxWidth={negative:0,positive:0}),this.margin=[10,20+this.dataLabelMaxWidth.positive,10,20+this.dataLabelMaxWidth.negative],this.dims=At({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.formatDates(),this.groupDomain=this.getGroupDomain(),this.innerDomain=this.getInnerDomain(),this.valueDomain=this.getValueDomain(),this.xScale=this.getXScale(),this.yScale=this.getYScale(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")"},i.prototype.getGroupDomain=function(){var t,e,i=[];try{for(var n=k(this.results),a=n.next();!a.done;a=n.next()){var o=a.value;i.includes(o.label)||i.push(o.label)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return i},i.prototype.getInnerDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.label)||a.push(h.label)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getValueDomain=function(){var t,e,i,n,a=[],o=0,s=0;try{for(var r=k(this.results),l=r.next();!l.done;l=r.next()){var c=l.value,h=0,p=0;try{for(var d=(i=void 0,k(c.series)),g=d.next();!g.done;g=d.next()){var u=g.value;u.value<0?h+=u.value:p+=u.value,o=u.value<o?u.value:o,s=u.value>s?u.value:s}}catch(t){i={error:t}}finally{try{g&&!g.done&&(n=d.return)&&n.call(d)}finally{if(i)throw i.error}}a.push(h),a.push(p)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return a.push(o),a.push(s),[Math.min.apply(Math,A([0],a)),this.xScaleMax?Math.max.apply(Math,A([this.xScaleMax],a)):Math.max.apply(Math,A(a))]},i.prototype.getYScale=function(){var t=this.groupDomain.length/(this.dims.height/this.barPadding+1);return c.scaleBand().rangeRound([0,this.dims.height]).paddingInner(t).domain(this.groupDomain)},i.prototype.getXScale=function(){var t=c.scaleLinear().range([0,this.dims.width]).domain(this.valueDomain);return this.roundDomains?t.nice():t},i.prototype.groupTransform=function(t){return"translate(0, "+this.yScale(t.name)+")"},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.innerDomain:this.valueDomain,this.colors=new Lt(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.innerDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.valueDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onDataLabelMaxWidthChanged=function(t,e){var i=this;t.size.negative?this.dataLabelMaxWidth.negative=Math.max(this.dataLabelMaxWidth.negative,t.size.width):this.dataLabelMaxWidth.positive=Math.max(this.dataLabelMaxWidth.positive,t.size.width),e===this.results.length-1&&setTimeout((function(){return i.update()}))},i.prototype.onActivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name);var a=this.results.map((function(t){return t.series})).flat().filter((function(t){return i?t.label===n.name:t.name===n.name&&t.series===n.series}));this.activeEntries=A(a),this.activate.emit({value:n,entries:this.activeEntries})},i.prototype.onDeactivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name),this.activeEntries=this.activeEntries.filter((function(t){return i?t.label!==n.name:!(t.name===n.name&&t.series===n.series)})),this.deactivate.emit({value:n,entries:this.activeEntries})},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"barPadding",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"xScaleMax",void 0),T([e.Input()],i.prototype,"showDataLabel",void 0),T([e.Input()],i.prototype,"dataLabelFormatting",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-bar-horizontal-stacked",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelActivate)="onActivate($event, undefined, true)"\n (legendLabelDeactivate)="onDeactivate($event, undefined, true)"\n (legendLabelClick)="onClick($event)"\n >\n <svg:g [attr.transform]="transform" class="bar-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n [yAxisOffset]="dataLabelMaxWidth.negative"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g\n *ngFor="let group of results; let index = index; trackBy: trackBy"\n [@animationState]="\'active\'"\n [attr.transform]="groupTransform(group)"\n >\n <svg:g\n ngx-charts-series-horizontal\n type="stacked"\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [series]="group.series"\n [activeEntries]="activeEntries"\n [dims]="dims"\n [gradient]="gradient"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [seriesName]="group.name"\n [animations]="animations"\n [showDataLabel]="showDataLabel"\n [dataLabelFormatting]="dataLabelFormatting"\n [noBarWhenZero]="noBarWhenZero"\n (select)="onClick($event, group)"\n (activate)="onActivate($event, group)"\n (deactivate)="onDeactivate($event, group)"\n (dataLabelWidthChanged)="onDataLabelMaxWidthChanged($event, index)"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1,transform:"*"}),n.animate(500,n.style({opacity:0,transform:"scale(0)"}))])])],styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(R),Gt=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.tooltipDisabled=!1,i.showGridLines=!0,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.barPadding=8,i.roundDomains=!1,i.roundEdges=!0,i.showDataLabel=!1,i.noBarWhenZero=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.dataLabelMaxHeight={negative:0,positive:0},i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.showDataLabel||(this.dataLabelMaxHeight={negative:0,positive:0}),this.margin=[10+this.dataLabelMaxHeight.positive,20,10+this.dataLabelMaxHeight.negative,20],this.dims=At({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.formatDates(),this.showDataLabel&&(this.dims.height-=this.dataLabelMaxHeight.negative),this.xScale=this.getXScale(),this.yScale=this.getYScale(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+(this.margin[0]+this.dataLabelMaxHeight.negative)+")"},i.prototype.getXScale=function(){this.xDomain=this.getXDomain();var t=this.xDomain.length/(this.dims.width/this.barPadding+1);return c.scaleBand().range([0,this.dims.width]).paddingInner(t).domain(this.xDomain)},i.prototype.getYScale=function(){this.yDomain=this.getYDomain();var t=c.scaleLinear().range([this.dims.height,0]).domain(this.yDomain);return this.roundDomains?t.nice():t},i.prototype.getXDomain=function(){return this.results.map((function(t){return t.label}))},i.prototype.getYDomain=function(){var t=this.results.map((function(t){return t.value})),e=this.yScaleMin?Math.min.apply(Math,A([this.yScaleMin],t)):Math.min.apply(Math,A([0],t));this.yAxisTicks&&!this.yAxisTicks.some(isNaN)&&(e=Math.min.apply(Math,A([e],this.yAxisTicks)));var i=this.yScaleMax?Math.max.apply(Math,A([this.yScaleMax],t)):Math.max.apply(Math,A([0],t));return this.yAxisTicks&&!this.yAxisTicks.some(isNaN)&&(i=Math.max.apply(Math,A([i],this.yAxisTicks))),[e,i]},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.xDomain:this.yDomain,this.colors=new Lt(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.xDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.yDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onDataLabelMaxHeightChanged=function(t){var e=this;t.size.negative?this.dataLabelMaxHeight.negative=Math.max(this.dataLabelMaxHeight.negative,t.size.height):this.dataLabelMaxHeight.positive=Math.max(this.dataLabelMaxHeight.positive,t.size.height),t.index===this.results.length-1&&setTimeout((function(){return e.update()}))},i.prototype.onActivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name})),this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name}));var i=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}));this.activeEntries.splice(i,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"barPadding",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"roundEdges",void 0),T([e.Input()],i.prototype,"yScaleMax",void 0),T([e.Input()],i.prototype,"yScaleMin",void 0),T([e.Input()],i.prototype,"showDataLabel",void 0),T([e.Input()],i.prototype,"dataLabelFormatting",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-bar-vertical",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelClick)="onClick($event)"\n (legendLabelActivate)="onActivate($event, true)"\n (legendLabelDeactivate)="onDeactivate($event, true)"\n >\n <svg:g [attr.transform]="transform" class="bar-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n [xAxisOffset]="dataLabelMaxHeight.negative"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g\n ngx-charts-series-vertical\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [series]="results"\n [dims]="dims"\n [gradient]="gradient"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [showDataLabel]="showDataLabel"\n [dataLabelFormatting]="dataLabelFormatting"\n [activeEntries]="activeEntries"\n [roundEdges]="roundEdges"\n [animations]="animations"\n [noBarWhenZero]="noBarWhenZero"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n (select)="onClick($event)"\n (dataLabelHeightChanged)="onDataLabelMaxHeightChanged($event)"\n ></svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(R),$t=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.tooltipDisabled=!1,i.scaleType="ordinal",i.showGridLines=!0,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.groupPadding=16,i.barPadding=8,i.roundDomains=!1,i.roundEdges=!0,i.showDataLabel=!1,i.noBarWhenZero=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.dataLabelMaxHeight={negative:0,positive:0},i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.showDataLabel||(this.dataLabelMaxHeight={negative:0,positive:0}),this.margin=[10+this.dataLabelMaxHeight.positive,20,10+this.dataLabelMaxHeight.negative,20],this.dims=At({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.showDataLabel&&(this.dims.height-=this.dataLabelMaxHeight.negative),this.formatDates(),this.groupDomain=this.getGroupDomain(),this.innerDomain=this.getInnerDomain(),this.valuesDomain=this.getValueDomain(),this.groupScale=this.getGroupScale(),this.innerScale=this.getInnerScale(),this.valueScale=this.getValueScale(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+(this.margin[0]+this.dataLabelMaxHeight.negative)+")"},i.prototype.onDataLabelMaxHeightChanged=function(t,e){var i=this;t.size.negative?this.dataLabelMaxHeight.negative=Math.max(this.dataLabelMaxHeight.negative,t.size.height):this.dataLabelMaxHeight.positive=Math.max(this.dataLabelMaxHeight.positive,t.size.height),e===this.results.length-1&&setTimeout((function(){return i.update()}))},i.prototype.getGroupScale=function(){var t=this.groupDomain.length/(this.dims.height/this.groupPadding+1);return c.scaleBand().rangeRound([0,this.dims.width]).paddingInner(t).paddingOuter(t/2).domain(this.groupDomain)},i.prototype.getInnerScale=function(){var t=this.groupScale.bandwidth(),e=this.innerDomain.length/(t/this.barPadding+1);return c.scaleBand().rangeRound([0,t]).paddingInner(e).domain(this.innerDomain)},i.prototype.getValueScale=function(){var t=c.scaleLinear().range([this.dims.height,0]).domain(this.valuesDomain);return this.roundDomains?t.nice():t},i.prototype.getGroupDomain=function(){var t,e,i=[];try{for(var n=k(this.results),a=n.next();!a.done;a=n.next()){var o=a.value;i.includes(o.label)||i.push(o.label)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return i},i.prototype.getInnerDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.label)||a.push(h.label)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getValueDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.value)||a.push(h.value)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return[Math.min.apply(Math,A([0],a)),this.yScaleMax?Math.max.apply(Math,A([this.yScaleMax],a)):Math.max.apply(Math,A([0],a))]},i.prototype.groupTransform=function(t){return"translate("+this.groupScale(t.label)+", 0)"},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.innerDomain:this.valuesDomain,this.colors=new Lt(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.innerDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.valuesDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name);var a=this.results.map((function(t){return t.series})).flat().filter((function(t){return i?t.label===n.name:t.name===n.name&&t.series===n.series}));this.activeEntries=A(a),this.activate.emit({value:n,entries:this.activeEntries})},i.prototype.onDeactivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name),this.activeEntries=this.activeEntries.filter((function(t){return i?t.label!==n.name:!(t.name===n.name&&t.series===n.series)})),this.deactivate.emit({value:n,entries:this.activeEntries})},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"scaleType",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"groupPadding",void 0),T([e.Input()],i.prototype,"barPadding",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"roundEdges",void 0),T([e.Input()],i.prototype,"yScaleMax",void 0),T([e.Input()],i.prototype,"showDataLabel",void 0),T([e.Input()],i.prototype,"dataLabelFormatting",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-bar-vertical-2d",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelActivate)="onActivate($event, undefined, true)"\n (legendLabelDeactivate)="onDeactivate($event, undefined, true)"\n (legendLabelClick)="onClick($event)"\n >\n <svg:g [attr.transform]="transform" class="bar-chart chart">\n <svg:g\n ngx-charts-grid-panel-series\n [xScale]="groupScale"\n [yScale]="valueScale"\n [data]="results"\n [dims]="dims"\n orient="vertical"\n ></svg:g>\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="groupScale"\n [dims]="dims"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n [xAxisOffset]="dataLabelMaxHeight.negative"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="valueScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g\n ngx-charts-series-vertical\n *ngFor="let group of results; let index = index; trackBy: trackBy"\n [@animationState]="\'active\'"\n [attr.transform]="groupTransform(group)"\n [activeEntries]="activeEntries"\n [xScale]="innerScale"\n [yScale]="valueScale"\n [colors]="colors"\n [series]="group.series"\n [dims]="dims"\n [gradient]="gradient"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [showDataLabel]="showDataLabel"\n [dataLabelFormatting]="dataLabelFormatting"\n [seriesName]="group.name"\n [roundEdges]="roundEdges"\n [animations]="animations"\n [noBarWhenZero]="noBarWhenZero"\n (select)="onClick($event, group)"\n (activate)="onActivate($event, group)"\n (deactivate)="onDeactivate($event, group)"\n (dataLabelHeightChanged)="onDataLabelMaxHeightChanged($event, index)"\n />\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1,transform:"*"}),n.animate(500,n.style({opacity:0,transform:"scale(0)"}))])])],styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(R),Nt=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.tooltipDisabled=!1,i.showGridLines=!0,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.barPadding=8,i.roundDomains=!1,i.noBarWhenZero=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.dims=At({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.formatDates(),this.groupDomain=this.getGroupDomain(),this.innerDomain=this.getInnerDomain(),this.valueDomain=this.getValueDomain(),this.xScale=this.getXScale(),this.yScale=this.getYScale(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")"},i.prototype.getGroupDomain=function(){var t,e,i=[];try{for(var n=k(this.results),a=n.next();!a.done;a=n.next()){var o=a.value;i.includes(o.label)||i.push(o.label)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return i},i.prototype.getInnerDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.label)||a.push(h.label)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getValueDomain=function(){return[0,100]},i.prototype.getXScale=function(){var t=this.groupDomain.length/(this.dims.width/this.barPadding+1);return c.scaleBand().rangeRound([0,this.dims.width]).paddingInner(t).domain(this.groupDomain)},i.prototype.getYScale=function(){var t=c.scaleLinear().range([this.dims.height,0]).domain(this.valueDomain);return this.roundDomains?t.nice():t},i.prototype.groupTransform=function(t){return"translate("+this.xScale(t.name)+", 0)"},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.innerDomain:this.valueDomain,this.colors=new Lt(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.innerDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.valueDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name);var a=this.results.map((function(t){return t.series})).flat().filter((function(t){return i?t.label===n.name:t.name===n.name&&t.series===n.series}));this.activeEntries=A(a),this.activate.emit({value:n,entries:this.activeEntries})},i.prototype.onDeactivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name),this.activeEntries=this.activeEntries.filter((function(t){return i?t.label!==n.name:!(t.name===n.name&&t.series===n.series)})),this.deactivate.emit({value:n,entries:this.activeEntries})},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"barPadding",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-bar-vertical-normalized",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelActivate)="onActivate($event, undefined, true)"\n (legendLabelDeactivate)="onDeactivate($event, undefined, true)"\n (legendLabelClick)="onClick($event)"\n >\n <svg:g [attr.transform]="transform" class="bar-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g\n *ngFor="let group of results; trackBy: trackBy"\n [@animationState]="\'active\'"\n [attr.transform]="groupTransform(group)"\n >\n <svg:g\n ngx-charts-series-vertical\n type="normalized"\n [xScale]="xScale"\n [yScale]="yScale"\n [activeEntries]="activeEntries"\n [colors]="colors"\n [series]="group.series"\n [dims]="dims"\n [gradient]="gradient"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [seriesName]="group.name"\n [animations]="animations"\n [noBarWhenZero]="noBarWhenZero"\n (select)="onClick($event, group)"\n (activate)="onActivate($event, group)"\n (deactivate)="onDeactivate($event, group)"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1,transform:"*"}),n.animate(500,n.style({opacity:0,transform:"scale(0)"}))])])],styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(R),jt=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.tooltipDisabled=!1,i.showGridLines=!0,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.barPadding=8,i.roundDomains=!1,i.showDataLabel=!1,i.noBarWhenZero=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.dataLabelMaxHeight={negative:0,positive:0},i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.showDataLabel||(this.dataLabelMaxHeight={negative:0,positive:0}),this.margin=[10+this.dataLabelMaxHeight.positive,20,10+this.dataLabelMaxHeight.negative,20],this.dims=At({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.showDataLabel&&(this.dims.height-=this.dataLabelMaxHeight.negative),this.formatDates(),this.groupDomain=this.getGroupDomain(),this.innerDomain=this.getInnerDomain(),this.valueDomain=this.getValueDomain(),this.xScale=this.getXScale(),this.yScale=this.getYScale(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+(this.margin[0]+this.dataLabelMaxHeight.negative)+")"},i.prototype.getGroupDomain=function(){var t,e,i=[];try{for(var n=k(this.results),a=n.next();!a.done;a=n.next()){var o=a.value;i.includes(o.label)||i.push(o.label)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return i},i.prototype.getInnerDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.label)||a.push(h.label)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getValueDomain=function(){var t,e,i,n,a=[],o=0,s=0;try{for(var r=k(this.results),l=r.next();!l.done;l=r.next()){var c=l.value,h=0,p=0;try{for(var d=(i=void 0,k(c.series)),g=d.next();!g.done;g=d.next()){var u=g.value;u.value<0?h+=u.value:p+=u.value,o=u.value<o?u.value:o,s=u.value>s?u.value:s}}catch(t){i={error:t}}finally{try{g&&!g.done&&(n=d.return)&&n.call(d)}finally{if(i)throw i.error}}a.push(h),a.push(p)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return a.push(o),a.push(s),[Math.min.apply(Math,A([0],a)),this.yScaleMax?Math.max.apply(Math,A([this.yScaleMax],a)):Math.max.apply(Math,A(a))]},i.prototype.getXScale=function(){var t=this.groupDomain.length/(this.dims.width/this.barPadding+1);return c.scaleBand().rangeRound([0,this.dims.width]).paddingInner(t).domain(this.groupDomain)},i.prototype.getYScale=function(){var t=c.scaleLinear().range([this.dims.height,0]).domain(this.valueDomain);return this.roundDomains?t.nice():t},i.prototype.onDataLabelMaxHeightChanged=function(t,e){var i=this;t.size.negative?this.dataLabelMaxHeight.negative=Math.max(this.dataLabelMaxHeight.negative,t.size.height):this.dataLabelMaxHeight.positive=Math.max(this.dataLabelMaxHeight.positive,t.size.height),e===this.results.length-1&&setTimeout((function(){return i.update()}))},i.prototype.groupTransform=function(t){return"translate("+(this.xScale(t.name)||0)+", 0)"},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.innerDomain:this.valueDomain,this.colors=new Lt(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.innerDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.valueDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name);var a=this.results.map((function(t){return t.series})).flat().filter((function(t){return i?t.label===n.name:t.name===n.name&&t.series===n.series}));this.activeEntries=A(a),this.activate.emit({value:n,entries:this.activeEntries})},i.prototype.onDeactivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name),this.activeEntries=this.activeEntries.filter((function(t){return i?t.label!==n.name:!(t.name===n.name&&t.series===n.series)})),this.deactivate.emit({value:n,entries:this.activeEntries})},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"barPadding",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"yScaleMax",void 0),T([e.Input()],i.prototype,"showDataLabel",void 0),T([e.Input()],i.prototype,"dataLabelFormatting",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-bar-vertical-stacked",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelActivate)="onActivate($event, undefined, true)"\n (legendLabelDeactivate)="onDeactivate($event, undefined, true)"\n (legendLabelClick)="onClick($event)"\n >\n <svg:g [attr.transform]="transform" class="bar-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n [xAxisOffset]="dataLabelMaxHeight.negative"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g\n *ngFor="let group of results; let index = index; trackBy: trackBy"\n [@animationState]="\'active\'"\n [attr.transform]="groupTransform(group)"\n >\n <svg:g\n ngx-charts-series-vertical\n type="stacked"\n [xScale]="xScale"\n [yScale]="yScale"\n [activeEntries]="activeEntries"\n [colors]="colors"\n [series]="group.series"\n [dims]="dims"\n [gradient]="gradient"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [showDataLabel]="showDataLabel"\n [dataLabelFormatting]="dataLabelFormatting"\n [seriesName]="group.name"\n [animations]="animations"\n [noBarWhenZero]="noBarWhenZero"\n (select)="onClick($event, group)"\n (activate)="onActivate($event, group)"\n (deactivate)="onDeactivate($event, group)"\n (dataLabelHeightChanged)="onDataLabelMaxHeightChanged($event, index)"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1,transform:"*"}),n.animate(500,n.style({opacity:0,transform:"scale(0)"}))])])],styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(R);(Xt=t.D0Types||(t.D0Types={})).positive="positive",Xt.negative="negative";var Zt=function(){function i(){this.type="standard",this.tooltipDisabled=!1,this.animations=!0,this.showDataLabel=!1,this.noBarWhenZero=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.dataLabelHeightChanged=new e.EventEmitter,this.barsForDataLabels=[]}return i.prototype.ngOnChanges=function(t){this.update()},i.prototype.update=function(){var e,i,n=this;this.updateTooltipSettings(),this.series.length&&(i=this.xScale.bandwidth()),i=Math.round(i);var a,o=Math.max(this.yScale.domain()[0],0),s=((e={})[t.D0Types.positive]=0,e[t.D0Types.negative]=0,e),r=t.D0Types.positive;"normalized"===this.type&&(a=this.series.map((function(t){return t.value})).reduce((function(t,e){return t+e}),0)),this.bars=this.series.map((function(e,l){var c=e.value,h=n.getLabel(e),p=Q(h),d=n.roundEdges;r=c>0?t.D0Types.positive:t.D0Types.negative;var g={value:c,label:h,roundEdges:d,data:e,width:i,formattedLabel:p,height:0,x:0,y:0};if("standard"===n.type)g.height=Math.abs(n.yScale(c)-n.yScale(o)),g.x=n.xScale(h),g.y=c<0?n.yScale(0):n.yScale(c);else if("stacked"===n.type){var u=(v=s[r])+c;s[r]+=c,g.height=n.yScale(v)-n.yScale(u),g.x=0,g.y=n.yScale(u),g.offset0=v,g.offset1=u}else if("normalized"===n.type){var v;u=(v=s[r])+c;s[r]+=c,a>0?(v=100*v/a,u=100*u/a):(v=0,u=0),g.height=n.yScale(v)-n.yScale(u),g.x=0,g.y=n.yScale(u),g.offset0=v,g.offset1=u,c=(u-v).toFixed(2)+"%"}"ordinal"===n.colors.scaleType?g.color=n.colors.getColor(h):"standard"===n.type?(g.color=n.colors.getColor(c),g.gradientStops=n.colors.getLinearGradientStops(c)):(g.color=n.colors.getColor(g.offset1),g.gradientStops=n.colors.getLinearGradientStops(g.offset1,g.offset0));var m=p;return g.ariaLabel=p+" "+c.toLocaleString(),n.seriesName&&(m=n.seriesName+" • "+p,g.data.series=n.seriesName,g.ariaLabel=n.seriesName+" "+g.ariaLabel),g.tooltipText=n.tooltipDisabled?void 0:'\n <span class="tooltip-label">'+K(m)+'</span>\n <span class="tooltip-val">'+c.toLocaleString()+"</span>\n ",g})),this.updateDataLabels()},i.prototype.updateDataLabels=function(){var t=this;if("stacked"===this.type){this.barsForDataLabels=[];var e={};e.series=this.seriesName;var i=this.series.map((function(t){return t.value})).reduce((function(t,e){return e>0?t+e:t}),0),n=this.series.map((function(t){return t.value})).reduce((function(t,e){return e<0?t+e:t}),0);e.total=i+n,e.x=0,e.y=0,e.total>0?e.height=this.yScale(i):e.height=this.yScale(n),e.width=this.xScale.bandwidth(),this.barsForDataLabels.push(e)}else this.barsForDataLabels=this.series.map((function(e){var i={};return i.series=t.seriesName?t.seriesName:e.label,i.total=e.value,i.x=t.xScale(e.label),i.y=t.yScale(0),i.height=t.yScale(i.total)-t.yScale(0),i.width=t.xScale.bandwidth(),i}))},i.prototype.updateTooltipSettings=function(){this.tooltipPlacement=this.tooltipDisabled?void 0:"top",this.tooltipType=this.tooltipDisabled?void 0:"tooltip"},i.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.name===e.name&&t.series===e.series}))},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.getLabel=function(t){return t.label?t.label:t.name},i.prototype.trackBy=function(t,e){return e.label},i.prototype.trackDataLabelBy=function(t,e){return t+"#"+e.series+"#"+e.total},T([e.Input()],i.prototype,"dims",void 0),T([e.Input()],i.prototype,"type",void 0),T([e.Input()],i.prototype,"series",void 0),T([e.Input()],i.prototype,"xScale",void 0),T([e.Input()],i.prototype,"yScale",void 0),T([e.Input()],i.prototype,"colors",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"seriesName",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"tooltipTemplate",void 0),T([e.Input()],i.prototype,"roundEdges",void 0),T([e.Input()],i.prototype,"animations",void 0),T([e.Input()],i.prototype,"showDataLabel",void 0),T([e.Input()],i.prototype,"dataLabelFormatting",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"select",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.Output()],i.prototype,"dataLabelHeightChanged",void 0),i=T([e.Component({selector:"g[ngx-charts-series-vertical]",template:'\n <svg:g\n ngx-charts-bar\n *ngFor="let bar of bars; trackBy: trackBy"\n [@animationState]="\'active\'"\n [@.disabled]="!animations"\n [width]="bar.width"\n [height]="bar.height"\n [x]="bar.x"\n [y]="bar.y"\n [fill]="bar.color"\n [stops]="bar.gradientStops"\n [data]="bar.data"\n [orientation]="\'vertical\'"\n [roundEdges]="bar.roundEdges"\n [gradient]="gradient"\n [ariaLabel]="bar.ariaLabel"\n [isActive]="isActive(bar.data)"\n (select)="onClick($event)"\n (activate)="activate.emit($event)"\n (deactivate)="deactivate.emit($event)"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="tooltipPlacement"\n [tooltipType]="tooltipType"\n [tooltipTitle]="tooltipTemplate ? undefined : bar.tooltipText"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="bar.data"\n [noBarWhenZero]="noBarWhenZero"\n [animations]="animations"\n ></svg:g>\n <svg:g *ngIf="showDataLabel">\n <svg:g\n ngx-charts-bar-label\n *ngFor="let b of barsForDataLabels; let i = index; trackBy: trackDataLabelBy"\n [barX]="b.x"\n [barY]="b.y"\n [barWidth]="b.width"\n [barHeight]="b.height"\n [value]="b.total"\n [valueFormatting]="dataLabelFormatting"\n [orientation]="\'vertical\'"\n (dimensionsChanged)="dataLabelHeightChanged.emit({ size: $event, index: i })"\n />\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1}),n.animate(500,n.style({opacity:0}))])])]})],i)}(),_t=function(){function i(){this.barsForDataLabels=[],this.type="standard",this.tooltipDisabled=!1,this.animations=!0,this.showDataLabel=!1,this.noBarWhenZero=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.dataLabelWidthChanged=new e.EventEmitter}return i.prototype.ngOnChanges=function(t){this.update()},i.prototype.update=function(){var e,i=this;this.updateTooltipSettings();var n,a,o=((e={})[t.D0Types.positive]=0,e[t.D0Types.negative]=0,e);n=t.D0Types.positive,"normalized"===this.type&&(a=this.series.map((function(t){return t.value})).reduce((function(t,e){return t+e}),0));var s=Math.max(this.xScale.domain()[0],0);this.bars=this.series.map((function(e,r){var l=e.value,c=i.getLabel(e),h=Q(c),p=i.roundEdges;n=l>0?t.D0Types.positive:t.D0Types.negative;var d={value:l,label:c,roundEdges:p,data:e,formattedLabel:h};if(d.height=i.yScale.bandwidth(),"standard"===i.type)d.width=Math.abs(i.xScale(l)-i.xScale(s)),d.x=l<0?i.xScale(l):i.xScale(s),d.y=i.yScale(c);else if("stacked"===i.type){var g=(u=o[n])+l;o[n]+=l,d.width=i.xScale(g)-i.xScale(u),d.x=i.xScale(u),d.y=0,d.offset0=u,d.offset1=g}else if("normalized"===i.type){var u;g=(u=o[n])+l;o[n]+=l,a>0?(u=100*u/a,g=100*g/a):(u=0,g=0),d.width=i.xScale(g)-i.xScale(u),d.x=i.xScale(u),d.y=0,d.offset0=u,d.offset1=g,l=(g-u).toFixed(2)+"%"}"ordinal"===i.colors.scaleType?d.color=i.colors.getColor(c):"standard"===i.type?(d.color=i.colors.getColor(l),d.gradientStops=i.colors.getLinearGradientStops(l)):(d.color=i.colors.getColor(d.offset1),d.gradientStops=i.colors.getLinearGradientStops(d.offset1,d.offset0));var v=h;return d.ariaLabel=h+" "+l.toLocaleString(),i.seriesName&&(v=i.seriesName+" • "+h,d.data.series=i.seriesName,d.ariaLabel=i.seriesName+" "+d.ariaLabel),d.tooltipText=i.tooltipDisabled?void 0:'\n <span class="tooltip-label">'+K(v)+'</span>\n <span class="tooltip-val">'+l.toLocaleString()+"</span>\n ",d})),this.updateDataLabels()},i.prototype.updateDataLabels=function(){var t=this;if("stacked"===this.type){this.barsForDataLabels=[];var e={};e.series=this.seriesName;var i=this.series.map((function(t){return t.value})).reduce((function(t,e){return e>0?t+e:t}),0),n=this.series.map((function(t){return t.value})).reduce((function(t,e){return e<0?t+e:t}),0);e.total=i+n,e.x=0,e.y=0,e.total>0?e.width=this.xScale(i):e.width=this.xScale(n),e.height=this.yScale.bandwidth(),this.barsForDataLabels.push(e)}else this.barsForDataLabels=this.series.map((function(e){var i={};return i.series=t.seriesName?t.seriesName:e.label,i.total=e.value,i.x=t.xScale(0),i.y=t.yScale(e.label),i.width=t.xScale(i.total)-t.xScale(0),i.height=t.yScale.bandwidth(),i}))},i.prototype.updateTooltipSettings=function(){this.tooltipPlacement=this.tooltipDisabled?void 0:"top",this.tooltipType=this.tooltipDisabled?void 0:"tooltip"},i.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.name===e.name&&t.series===e.series}))},i.prototype.getLabel=function(t){return t.label?t.label:t.name},i.prototype.trackBy=function(t,e){return e.label},i.prototype.trackDataLabelBy=function(t,e){return t+"#"+e.series+"#"+e.total},i.prototype.click=function(t){this.select.emit(t)},T([e.Input()],i.prototype,"dims",void 0),T([e.Input()],i.prototype,"type",void 0),T([e.Input()],i.prototype,"series",void 0),T([e.Input()],i.prototype,"xScale",void 0),T([e.Input()],i.prototype,"yScale",void 0),T([e.Input()],i.prototype,"colors",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"seriesName",void 0),T([e.Input()],i.prototype,"tooltipTemplate",void 0),T([e.Input()],i.prototype,"roundEdges",void 0),T([e.Input()],i.prototype,"animations",void 0),T([e.Input()],i.prototype,"showDataLabel",void 0),T([e.Input()],i.prototype,"dataLabelFormatting",void 0),T([e.Input()],i.prototype,"noBarWhenZero",void 0),T([e.Output()],i.prototype,"select",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.Output()],i.prototype,"dataLabelWidthChanged",void 0),i=T([e.Component({selector:"g[ngx-charts-series-horizontal]",template:'\n <svg:g\n ngx-charts-bar\n *ngFor="let bar of bars; trackBy: trackBy"\n [@animationState]="\'active\'"\n [width]="bar.width"\n [height]="bar.height"\n [x]="bar.x"\n [y]="bar.y"\n [fill]="bar.color"\n [stops]="bar.gradientStops"\n [data]="bar.data"\n [orientation]="\'horizontal\'"\n [roundEdges]="bar.roundEdges"\n (select)="click($event)"\n [gradient]="gradient"\n [isActive]="isActive(bar.data)"\n [ariaLabel]="bar.ariaLabel"\n [animations]="animations"\n (activate)="activate.emit($event)"\n (deactivate)="deactivate.emit($event)"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="tooltipPlacement"\n [tooltipType]="tooltipType"\n [tooltipTitle]="tooltipTemplate ? undefined : bar.tooltipText"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="bar.data"\n [noBarWhenZero]="noBarWhenZero"\n ></svg:g>\n <svg:g *ngIf="showDataLabel">\n <svg:g\n ngx-charts-bar-label\n *ngFor="let b of barsForDataLabels; let i = index; trackBy: trackDataLabelBy"\n [barX]="b.x"\n [barY]="b.y"\n [barWidth]="b.width"\n [barHeight]="b.height"\n [value]="b.total"\n [valueFormatting]="dataLabelFormatting"\n [orientation]="\'horizontal\'"\n (dimensionsChanged)="dataLabelWidthChanged.emit({ size: $event, index: i })"\n />\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1}),n.animate(500,n.style({opacity:0}))])])]})],i)}(),qt=function(){function t(t){this.dimensionsChanged=new e.EventEmitter,this.horizontalPadding=2,this.verticalPadding=5,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.getSize=function(){return{height:this.element.getBoundingClientRect().height,width:this.element.getBoundingClientRect().width,negative:this.value<0}},t.prototype.ngAfterViewInit=function(){this.dimensionsChanged.emit(this.getSize())},t.prototype.update=function(){this.valueFormatting?this.formatedValue=this.valueFormatting(this.value):this.formatedValue=Q(this.value),"horizontal"===this.orientation?(this.x=this.barX+this.barWidth,this.value<0?(this.x=this.x-this.horizontalPadding,this.textAnchor="end"):(this.x=this.x+this.horizontalPadding,this.textAnchor="start"),this.y=this.barY+this.barHeight/2):(this.x=this.barX+this.barWidth/2,this.y=this.barY+this.barHeight,this.value<0?(this.y=this.y+this.verticalPadding,this.textAnchor="end"):(this.y=this.y-this.verticalPadding,this.textAnchor="start"),this.transform="rotate(-45, "+this.x+" , "+this.y+")")},t.ctorParameters=function(){return[{type:e.ElementRef}]},T([e.Input()],t.prototype,"value",void 0),T([e.Input()],t.prototype,"valueFormatting",void 0),T([e.Input()],t.prototype,"barX",void 0),T([e.Input()],t.prototype,"barY",void 0),T([e.Input()],t.prototype,"barWidth",void 0),T([e.Input()],t.prototype,"barHeight",void 0),T([e.Input()],t.prototype,"orientation",void 0),T([e.Output()],t.prototype,"dimensionsChanged",void 0),t=T([e.Component({selector:"g[ngx-charts-bar-label]",template:'\n <svg:text\n class="textDataLabel"\n alignment-baseline="middle"\n [attr.text-anchor]="textAnchor"\n [attr.transform]="transform"\n [attr.x]="x"\n [attr.y]="y"\n >\n {{ formatedValue }}\n </svg:text>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".textDataLabel{font-size:11px}"]})],t)}(),Ut=function(){function t(){}return t=T([e.NgModule({imports:[wt],declarations:[zt,Ht,Wt,Bt,Vt,Gt,$t,Nt,jt,qt,_t,Zt],exports:[zt,Ht,Wt,Bt,Vt,Gt,$t,Nt,jt,qt,_t,Zt]})],t)}();function Jt(t,e,i,n,a){var o=[];("linear"===e&&(t=t.map((function(t){return Number(t)})),i||t.push(0)),"time"===e||"linear"===e)?o=[n||Math.min.apply(Math,A(t)),a||Math.max.apply(Math,A(t))]:o=t;return o}function Qt(t,e,i,n){var a;return"time"===i?a=c.scaleTime().range(e).domain(t):"linear"===i?(a=c.scaleLinear().range(e).domain(t),n&&(a=a.nice())):"ordinal"===i&&(a=c.scalePoint().range([e[0],e[1]]).domain(t)),a}var Kt=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.showGridLines=!0,i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.xAxis=!0,i.yAxis=!0,i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.roundDomains=!1,i.maxRadius=10,i.minRadius=3,i.schemeType="ordinal",i.tooltipDisabled=!1,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.scaleType="linear",i.margin=[10,20,10,20],i.bubblePadding=[0,0,0,0],i.xAxisHeight=0,i.yAxisWidth=0,i.activeEntries=[],i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.dims=At({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.seriesDomain=this.results.map((function(t){return t.name})),this.rDomain=this.getRDomain(),this.xDomain=this.getXDomain(),this.yDomain=this.getYDomain(),this.transform="translate("+this.dims.xOffset+","+this.margin[0]+")";var e="ordinal"===this.schemeType?this.seriesDomain:this.rDomain;this.colors=new Lt(this.scheme,this.schemeType,e,this.customColors),this.data=this.results,this.minRadius=Math.max(this.minRadius,1),this.maxRadius=Math.max(this.maxRadius,1),this.rScale=this.getRScale(this.rDomain,[this.minRadius,this.maxRadius]),this.bubblePadding=[0,0,0,0],this.setScales(),this.bubblePadding=this.getBubblePadding(),this.setScales(),this.legendOptions=this.getLegendOptions(),this.clipPathId="clip"+et().toString(),this.clipPath="url(#"+this.clipPathId+")"},i.prototype.hideCircles=function(){this.deactivateAll()},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.getBubblePadding=function(){var t,e,i,n,a=0,o=0,s=this.dims.height,r=this.dims.width;try{for(var l=k(this.data),c=l.next();!c.done;c=l.next()){var h=c.value;try{for(var p=(i=void 0,k(h.series)),d=p.next();!d.done;d=p.next()){var g=d.value,u=this.rScale(g.r),v="linear"===this.xScaleType?this.xScale(Number(g.x)):this.xScale(g.x),m="linear"===this.yScaleType?this.yScale(Number(g.y)):this.yScale(g.y);o=Math.max(u-v,o),a=Math.max(u-m,a),s=Math.max(m+u,s),r=Math.max(v+u,r)}}catch(t){i={error:t}}finally{try{d&&!d.done&&(n=p.return)&&n.call(p)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=l.return)&&e.call(l)}finally{if(t)throw t.error}}return[a,r=Math.max(r-this.dims.width,0),s=Math.max(s-this.dims.height,0),o]},i.prototype.setScales=function(){var t=this.dims.width;void 0===this.xScaleMin&&void 0===this.xScaleMax&&(t-=this.bubblePadding[1]);var e=this.dims.height;void 0===this.yScaleMin&&void 0===this.yScaleMax&&(e-=this.bubblePadding[2]),this.xScale=this.getXScale(this.xDomain,t),this.yScale=this.getYScale(this.yDomain,e)},i.prototype.getYScale=function(t,e){return Qt(t,[e,this.bubblePadding[0]],this.yScaleType,this.roundDomains)},i.prototype.getXScale=function(t,e){return Qt(t,[this.bubblePadding[3],e],this.xScaleType,this.roundDomains)},i.prototype.getRScale=function(t,e){var i=c.scaleLinear().range(e).domain(t);return this.roundDomains?i.nice():i},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],position:this.legendPosition,title:void 0};return"ordinal"===t.scaleType?(t.domain=this.seriesDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.rDomain,t.colors=this.colors.scale),t},i.prototype.getXDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.x)||a.push(h.x)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return this.xScaleType=Dt(a),Jt(a,this.xScaleType,this.autoScale,this.xScaleMin,this.xScaleMax)},i.prototype.getYDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.y)||a.push(h.y)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return this.yScaleType=Dt(a),Jt(a,this.yScaleType,this.autoScale,this.yScaleMin,this.yScaleMax)},i.prototype.getRDomain=function(){var t,e,i,n,a=1/0,o=-1/0;try{for(var s=k(this.results),r=s.next();!r.done;r=s.next()){var l=r.value;try{for(var c=(i=void 0,k(l.series)),h=c.next();!h.done;h=c.next()){var p=h.value,d=Number(p.r)||1;a=Math.min(a,d),o=Math.max(o,d)}}catch(t){i={error:t}}finally{try{h&&!h.done&&(n=c.return)&&n.call(c)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}return[a,o]},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t){this.activeEntries.findIndex((function(e){return e.name===t.name}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t){var e=this.activeEntries.findIndex((function(e){return e.name===t.name}));this.activeEntries.splice(e,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},i.prototype.deactivateAll=function(){var t,e;this.activeEntries=A(this.activeEntries);try{for(var i=k(this.activeEntries),n=i.next();!n.done;n=i.next()){var a=n.value;this.deactivate.emit({value:a,entries:[]})}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.activeEntries=[]},i.prototype.trackBy=function(t,e){return e.name},T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"maxRadius",void 0),T([e.Input()],i.prototype,"minRadius",void 0),T([e.Input()],i.prototype,"autoScale",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"xScaleMin",void 0),T([e.Input()],i.prototype,"xScaleMax",void 0),T([e.Input()],i.prototype,"yScaleMin",void 0),T([e.Input()],i.prototype,"yScaleMax",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),T([e.HostListener("mouseleave")],i.prototype,"hideCircles",null),i=T([e.Component({selector:"ngx-charts-bubble-chart",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [activeEntries]="activeEntries"\n [legendOptions]="legendOptions"\n [animations]="animations"\n (legendLabelClick)="onClick($event)"\n (legendLabelActivate)="onActivate($event)"\n (legendLabelDeactivate)="onDeactivate($event)"\n >\n <svg:defs>\n <svg:clipPath [attr.id]="clipPathId">\n <svg:rect\n [attr.width]="dims.width + 10"\n [attr.height]="dims.height + 10"\n [attr.transform]="\'translate(-5, -5)\'"\n />\n </svg:clipPath>\n </svg:defs>\n <svg:g [attr.transform]="transform" class="bubble-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [showGridLines]="showGridLines"\n [dims]="dims"\n [xScale]="xScale"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n />\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [showGridLines]="showGridLines"\n [yScale]="yScale"\n [dims]="dims"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n />\n <svg:rect\n class="bubble-chart-area"\n x="0"\n y="0"\n [attr.width]="dims.width"\n [attr.height]="dims.height"\n style="fill: rgb(255, 0, 0); opacity: 0; cursor: \'auto\';"\n (mouseenter)="deactivateAll()"\n />\n <svg:g [attr.clip-path]="clipPath">\n <svg:g *ngFor="let series of data; trackBy: trackBy" [@animationState]="\'active\'">\n <svg:g\n ngx-charts-bubble-series\n [xScale]="xScale"\n [yScale]="yScale"\n [rScale]="rScale"\n [xScaleType]="xScaleType"\n [yScaleType]="yScaleType"\n [xAxisLabel]="xAxisLabel"\n [yAxisLabel]="yAxisLabel"\n [colors]="colors"\n [data]="series"\n [activeEntries]="activeEntries"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n (select)="onClick($event, series)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1}),n.animate(500,n.style({opacity:0}))])])],styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(R),te=function(){function t(){this.tooltipDisabled=!1,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.circles=this.getCircles()},t.prototype.getCircles=function(){var t=this,e=this.data.name;return this.data.series.map((function(i,n){if(void 0!==i.y&&void 0!==i.x){var a=i.y,o=i.x,s=i.r,r=t.rScale(s||1),l=Q(i.name),c="linear"===t.xScaleType?t.xScale(Number(o)):t.xScale(o),h="linear"===t.yScaleType?t.yScale(Number(a)):t.yScale(a),p="linear"===t.colors.scaleType?t.colors.getColor(s):t.colors.getColor(e),d=!t.activeEntries.length||t.isActive({name:e}),g=d?1:.3;return{data:Object.assign({},i,{series:e,name:i.name,value:i.y,x:i.x,radius:i.r}),x:o,y:a,r:s,classNames:["circle-data-"+n],value:a,label:o,cx:c,cy:h,radius:r,tooltipLabel:l,color:p,opacity:g,seriesName:e,isActive:d,transform:"translate("+c+","+h+")"}}})).filter((function(t){return void 0!==t}))},t.prototype.getTooltipText=function(t){var e=void 0!==t.r,i=t.tooltipLabel&&t.tooltipLabel.length,n=t.seriesName&&t.seriesName.length,a=e?Q(t.r):"",o=this.xAxisLabel&&""!==this.xAxisLabel?this.xAxisLabel+":":"",s=this.yAxisLabel&&""!==this.yAxisLabel?this.yAxisLabel+":":"",r=Q(t.x),l=Q(t.y),c=n&&i?t.seriesName+" • "+t.tooltipLabel:t.seriesName+t.tooltipLabel;return"\n "+(n||i?'<span class="tooltip-label">'+K(c)+"</span>":"")+'\n <span class="tooltip-label">\n <label>'+K(o)+"</label> "+K(r)+"<br />\n <label>"+K(s)+"</label> "+K(l)+'\n </span>\n <span class="tooltip-val">\n '+K(a)+"\n </span>\n "},t.prototype.onClick=function(t){this.select.emit(t)},t.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.name===e.name}))},t.prototype.isVisible=function(t){return this.activeEntries.length>0?this.isActive({name:t.seriesName}):0!==t.opacity},t.prototype.activateCircle=function(t){t.barVisible=!0,this.activate.emit({name:this.data.name})},t.prototype.deactivateCircle=function(t){t.barVisible=!1,this.deactivate.emit({name:this.data.name})},t.prototype.trackBy=function(t,e){return e.data.series+" "+e.data.name},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"xScale",void 0),T([e.Input()],t.prototype,"yScale",void 0),T([e.Input()],t.prototype,"rScale",void 0),T([e.Input()],t.prototype,"xScaleType",void 0),T([e.Input()],t.prototype,"yScaleType",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"visibleValue",void 0),T([e.Input()],t.prototype,"activeEntries",void 0),T([e.Input()],t.prototype,"xAxisLabel",void 0),T([e.Input()],t.prototype,"yAxisLabel",void 0),T([e.Input()],t.prototype,"tooltipDisabled",void 0),T([e.Input()],t.prototype,"tooltipTemplate",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),t=T([e.Component({selector:"g[ngx-charts-bubble-series]",template:'\n <svg:g *ngFor="let circle of circles; trackBy: trackBy">\n <svg:g [attr.transform]="circle.transform">\n <svg:g\n ngx-charts-circle\n [@animationState]="\'active\'"\n class="circle"\n [cx]="0"\n [cy]="0"\n [r]="circle.radius"\n [fill]="circle.color"\n [style.opacity]="circle.opacity"\n [class.active]="circle.isActive"\n [pointerEvents]="\'all\'"\n [data]="circle.value"\n [classNames]="circle.classNames"\n (select)="onClick(circle.data)"\n (activate)="activateCircle(circle)"\n (deactivate)="deactivateCircle(circle)"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="\'top\'"\n [tooltipType]="\'tooltip\'"\n [tooltipTitle]="tooltipTemplate ? undefined : getTooltipText(circle)"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="circle.data"\n />\n </svg:g>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":enter",[n.style({opacity:0,transform:"scale(0)"}),n.animate(250,n.style({opacity:1,transform:"scale(1)"}))])])]})],t)}(),ee=function(){function t(){}return t=T([e.NgModule({imports:[wt],declarations:[Kt,te],exports:[Kt,te]})],t)}(),ie=function(){function t(t){this.gradient=!1,this.animations=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(t){this.transform="translate("+this.x+" , "+this.y+")",this.startOpacity=.3,this.gradientId="grad"+et().toString(),this.gradientUrl="url(#"+this.gradientId+")",this.gradientStops=this.getGradientStops(),this.animations&&this.loadAnimation()},t.prototype.getGradientStops=function(){return[{offset:0,color:this.fill,opacity:this.startOpacity},{offset:100,color:this.fill,opacity:1}]},t.prototype.loadAnimation=function(){r.select(this.element).select(".cell").attr("opacity",0),this.animateToCurrentForm()},t.prototype.animateToCurrentForm=function(){r.select(this.element).select(".cell").transition().duration(750).attr("opacity",1)},t.prototype.onClick=function(){this.select.emit(this.data)},t.prototype.onMouseEnter=function(){this.activate.emit(this.data)},t.prototype.onMouseLeave=function(){this.deactivate.emit(this.data)},t.ctorParameters=function(){return[{type:e.ElementRef}]},T([e.Input()],t.prototype,"fill",void 0),T([e.Input()],t.prototype,"x",void 0),T([e.Input()],t.prototype,"y",void 0),T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"height",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"label",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),T([e.HostListener("mouseenter")],t.prototype,"onMouseEnter",null),T([e.HostListener("mouseleave")],t.prototype,"onMouseLeave",null),t=T([e.Component({selector:"g[ngx-charts-heat-map-cell]",template:'\n <svg:g [attr.transform]="transform" class="cell">\n <defs *ngIf="gradient">\n <svg:g ngx-charts-svg-linear-gradient orientation="vertical" [name]="gradientId" [stops]="gradientStops" />\n </defs>\n <svg:rect\n [attr.fill]="gradient ? gradientUrl : fill"\n rx="3"\n [attr.width]="width"\n [attr.height]="height"\n class="cell"\n style="cursor: pointer"\n (click)="onClick()"\n />\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),ne=function(){function t(){this.tooltipDisabled=!1,this.animations=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter}return t.prototype.ngOnInit=function(){this.tooltipText||(this.tooltipText=this.getTooltipText)},t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.cells=this.getCells()},t.prototype.getCells=function(){var t=this,e=[];return this.data.map((function(i){i.series.map((function(n){var a=n.value;n.series=i.name,e.push({row:i,cell:n,x:t.xScale(i.name),y:t.yScale(n.name),width:t.xScale.bandwidth(),height:t.yScale.bandwidth(),fill:t.colors.getColor(a),data:a,label:Q(n.name),series:i.name})}))})),e},t.prototype.getTooltipText=function(t){var e=t.label,i=t.data;return'\n <span class="tooltip-label">'+K(t.series)+" • "+K(e)+'</span>\n <span class="tooltip-val">'+i.toLocaleString()+"</span>\n "},t.prototype.trackBy=function(t,e){return e.tooltipText},t.prototype.onClick=function(t){this.select.emit(t)},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"xScale",void 0),T([e.Input()],t.prototype,"yScale",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"tooltipDisabled",void 0),T([e.Input()],t.prototype,"tooltipText",void 0),T([e.Input()],t.prototype,"tooltipTemplate",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),t=T([e.Component({selector:"g[ngx-charts-heat-map-cell-series]",template:'\n <svg:g\n ngx-charts-heat-map-cell\n *ngFor="let c of cells; trackBy: trackBy"\n [x]="c.x"\n [y]="c.y"\n [width]="c.width"\n [height]="c.height"\n [fill]="c.fill"\n [data]="c.data"\n (select)="onClick(c.cell)"\n (activate)="activate.emit(c.cell)"\n (deactivate)="deactivate.emit(c.cell)"\n [gradient]="gradient"\n [animations]="animations"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="\'top\'"\n [tooltipType]="\'tooltip\'"\n [tooltipTitle]="tooltipTemplate ? undefined : tooltipText(c)"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="{ series: c.series, name: c.label, value: c.data }"\n ></svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),ae=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legendTitle="Legend",i.legendPosition="right",i.innerPadding=8,i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.tooltipDisabled=!1,i.activeEntries=[],i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.scaleType="linear",i}return f(i,t),i.prototype.update=function(){if(t.prototype.update.call(this),this.formatDates(),this.xDomain=this.getXDomain(),this.yDomain=this.getYDomain(),this.valueDomain=this.getValueDomain(),this.scaleType=Dt(this.valueDomain,!1),this.dims=At({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.scaleType,legendPosition:this.legendPosition}),"linear"===this.scaleType){var e=this.min,i=this.max;this.min||(e=Math.min.apply(Math,A([0],this.valueDomain))),this.max||(i=Math.max.apply(Math,A(this.valueDomain))),this.valueDomain=[e,i]}this.xScale=this.getXScale(),this.yScale=this.getYScale(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")",this.rects=this.getRects()},i.prototype.getXDomain=function(){var t,e,i=[];try{for(var n=k(this.results),a=n.next();!a.done;a=n.next()){var o=a.value;i.includes(o.name)||i.push(o.name)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return i},i.prototype.getYDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.name)||a.push(h.name)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getValueDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.value)||a.push(h.value)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getDimension=function(t,e,i,n){return void 0===e&&(e=0),"string"==typeof t&&(t=t.replace("[","").replace("]","").replace("px","").replace("'","")).includes(",")&&(t=t.split(",")),Array.isArray(t)&&"number"==typeof e?this.getDimension(t[e],null,i,n):"string"==typeof t&&t.includes("%")?+t.replace("%","")/100:i/(n/+t+1)},i.prototype.getXScale=function(){var t=this.getDimension(this.innerPadding,0,this.xDomain.length,this.dims.width);return c.scaleBand().rangeRound([0,this.dims.width]).domain(this.xDomain).paddingInner(t)},i.prototype.getYScale=function(){var t=this.getDimension(this.innerPadding,1,this.yDomain.length,this.dims.height);return c.scaleBand().rangeRound([this.dims.height,0]).domain(this.yDomain).paddingInner(t)},i.prototype.getRects=function(){var t=this,e=[];return this.xDomain.map((function(i){t.yDomain.map((function(n){e.push({x:t.xScale(i),y:t.yScale(n),rx:3,width:t.xScale.bandwidth(),height:t.yScale.bandwidth(),fill:"rgba(200,200,200,0.03)"})}))})),e},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.setColors=function(){this.colors=new Lt(this.scheme,this.scaleType,this.valueDomain)},i.prototype.getLegendOptions=function(){return{scaleType:this.scaleType,domain:this.valueDomain,colors:"ordinal"===this.scaleType?this.colors:this.colors.scale,title:"ordinal"===this.scaleType?this.legendTitle:void 0,position:this.legendPosition}},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name);var a=this.results.map((function(t){return t.series})).flat().filter((function(t){return i?t.label===n.name:t.name===n.name&&t.series===n.series}));this.activeEntries=A(a),this.activate.emit({value:n,entries:this.activeEntries})},i.prototype.onDeactivate=function(t,e,i){void 0===i&&(i=!1);var n=Object.assign({},t);e&&(n.series=e.name),this.activeEntries=this.activeEntries.filter((function(t){return i?t.label!==n.name:!(t.name===n.name&&t.series===n.series)})),this.deactivate.emit({value:n,entries:this.activeEntries})},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"innerPadding",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"tooltipText",void 0),T([e.Input()],i.prototype,"min",void 0),T([e.Input()],i.prototype,"max",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-heat-map",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [animations]="animations"\n [legendOptions]="legendOptions"\n (legendLabelClick)="onClick($event)"\n >\n <svg:g [attr.transform]="transform" class="heat-map chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:rect\n *ngFor="let rect of rects"\n [attr.x]="rect.x"\n [attr.y]="rect.y"\n [attr.rx]="rect.rx"\n [attr.width]="rect.width"\n [attr.height]="rect.height"\n [attr.fill]="rect.fill"\n />\n <svg:g\n ngx-charts-heat-map-cell-series\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [data]="results"\n [gradient]="gradient"\n [animations]="animations"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipText]="tooltipText"\n (select)="onClick($event)"\n (activate)="onActivate($event, undefined)"\n (deactivate)="onDeactivate($event, undefined)"\n />\n </svg:g>\n </ngx-charts-chart>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(R),oe=function(){function t(){}return t=T([e.NgModule({imports:[wt],declarations:[ie,ne,ae],exports:[ie,ne,ae]})],t)}(),se=function(){function t(t){this.element=t,this.fill="none",this.animations=!0,this.select=new e.EventEmitter,this.initialized=!1}return t.prototype.ngOnChanges=function(t){this.initialized?this.updatePathEl():(this.initialized=!0,this.initialPath=this.path)},t.prototype.updatePathEl=function(){var t=r.select(this.element.nativeElement).select(".line");this.animations?t.transition().duration(750).attr("d",this.path):t.attr("d",this.path)},t.ctorParameters=function(){return[{type:e.ElementRef}]},T([e.Input()],t.prototype,"path",void 0),T([e.Input()],t.prototype,"stroke",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"fill",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),t=T([e.Component({selector:"g[ngx-charts-line]",template:'\n <svg:path\n [@animationState]="\'active\'"\n class="line"\n [attr.d]="initialPath"\n [attr.fill]="fill"\n [attr.stroke]="stroke"\n stroke-width="1.5px"\n />\n ',changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":enter",[n.style({strokeDasharray:2e3,strokeDashoffset:2e3}),n.animate(1e3,n.style({strokeDashoffset:0}))])])]})],t)}(),re=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legendTitle="Legend",i.legendPosition="right",i.showGridLines=!0,i.curve=p.curveLinear,i.activeEntries=[],i.trimXAxisTicks=!0,i.trimYAxisTicks=!0,i.rotateXAxisTicks=!0,i.maxXAxisTickLength=16,i.maxYAxisTickLength=16,i.roundDomains=!1,i.tooltipDisabled=!1,i.showRefLines=!1,i.showRefLabels=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i.timelineHeight=50,i.timelinePadding=10,i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.dims=At({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.timeline&&(this.dims.height-=this.timelineHeight+this.margin[2]+this.timelinePadding),this.xDomain=this.getXDomain(),this.filteredDomain&&(this.xDomain=this.filteredDomain),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,this.dims.width),this.yScale=this.getYScale(this.yDomain,this.dims.height),this.updateTimeline(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")",this.clipPathId="clip"+et().toString(),this.clipPath="url(#"+this.clipPathId+")"},i.prototype.updateTimeline=function(){this.timeline&&(this.timelineWidth=this.dims.width,this.timelineXDomain=this.getXDomain(),this.timelineXScale=this.getXScale(this.timelineXDomain,this.timelineWidth),this.timelineYScale=this.getYScale(this.yDomain,this.timelineHeight),this.timelineTransform="translate("+this.dims.xOffset+", "+-this.margin[2]+")")},i.prototype.getXDomain=function(){var t=St(this.results);this.scaleType=Dt(t);var e,i,n=[];return"linear"===this.scaleType&&(t=t.map((function(t){return Number(t)}))),"time"!==this.scaleType&&"linear"!==this.scaleType||(e=this.xScaleMin?this.xScaleMin:Math.min.apply(Math,A(t)),i=this.xScaleMax?this.xScaleMax:Math.max.apply(Math,A(t))),"time"===this.scaleType?(n=[new Date(e),new Date(i)],this.xSet=A(t).sort((function(t,e){var i=t.getTime(),n=e.getTime();return i>n?1:n>i?-1:0}))):"linear"===this.scaleType?(n=[e,i],this.xSet=A(t).sort((function(t,e){return t-e}))):(n=t,this.xSet=t),n},i.prototype.getYDomain=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.indexOf(h.value)<0&&a.push(h.value),void 0!==h.min&&(this.hasRange=!0,a.indexOf(h.min)<0&&a.push(h.min)),void 0!==h.max&&(this.hasRange=!0,a.indexOf(h.max)<0&&a.push(h.max))}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}var p=A(a);return this.autoScale||p.push(0),[this.yScaleMin?this.yScaleMin:Math.min.apply(Math,A(p)),this.yScaleMax?this.yScaleMax:Math.max.apply(Math,A(p))]},i.prototype.getSeriesDomain=function(){return this.results.map((function(t){return t.name}))},i.prototype.getXScale=function(t,e){var i;return"time"===this.scaleType?i=c.scaleTime().range([0,e]).domain(t):"linear"===this.scaleType?(i=c.scaleLinear().range([0,e]).domain(t),this.roundDomains&&(i=i.nice())):"ordinal"===this.scaleType&&(i=c.scalePoint().range([0,e]).padding(.1).domain(t)),i},i.prototype.getYScale=function(t,e){var i=c.scaleLinear().range([e,0]).domain(t);return this.roundDomains?i.nice():i},i.prototype.updateDomain=function(t){this.filteredDomain=t,this.xDomain=this.filteredDomain,this.xScale=this.getXScale(this.xDomain,this.dims.width)},i.prototype.updateHoveredVertical=function(t){this.hoveredVertical=t.value,this.deactivateAll()},i.prototype.hideCircles=function(){this.hoveredVertical=null,this.deactivateAll()},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.trackBy=function(t,e){return e.name},i.prototype.setColors=function(){var t;t="ordinal"===this.schemeType?this.seriesDomain:this.yDomain,this.colors=new Lt(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){var t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.seriesDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.yDomain,t.colors=this.colors.scale),t},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t){this.deactivateAll(),this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}))>-1||(this.activeEntries=[t],this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t){var e=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}));this.activeEntries.splice(e,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},i.prototype.deactivateAll=function(){var t,e;this.activeEntries=A(this.activeEntries);try{for(var i=k(this.activeEntries),n=i.next();!n.done;n=i.next()){var a=n.value;this.deactivate.emit({value:a,entries:[]})}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.activeEntries=[]},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"autoScale",void 0),T([e.Input()],i.prototype,"timeline",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"curve",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"rangeFillOpacity",void 0),T([e.Input()],i.prototype,"trimXAxisTicks",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"rotateXAxisTicks",void 0),T([e.Input()],i.prototype,"maxXAxisTickLength",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"xAxisTicks",void 0),T([e.Input()],i.prototype,"yAxisTicks",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"showRefLines",void 0),T([e.Input()],i.prototype,"referenceLines",void 0),T([e.Input()],i.prototype,"showRefLabels",void 0),T([e.Input()],i.prototype,"xScaleMin",void 0),T([e.Input()],i.prototype,"xScaleMax",void 0),T([e.Input()],i.prototype,"yScaleMin",void 0),T([e.Input()],i.prototype,"yScaleMax",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),T([e.ContentChild("seriesTooltipTemplate")],i.prototype,"seriesTooltipTemplate",void 0),T([e.HostListener("mouseleave")],i.prototype,"hideCircles",null),i=T([e.Component({selector:"ngx-charts-line-chart",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelClick)="onClick($event)"\n (legendLabelActivate)="onActivate($event)"\n (legendLabelDeactivate)="onDeactivate($event)"\n >\n <svg:defs>\n <svg:clipPath [attr.id]="clipPathId">\n <svg:rect\n [attr.width]="dims.width + 10"\n [attr.height]="dims.height + 10"\n [attr.transform]="\'translate(-5, -5)\'"\n />\n </svg:clipPath>\n </svg:defs>\n <svg:g [attr.transform]="transform" class="line-chart chart">\n <svg:g\n ngx-charts-x-axis\n *ngIf="xAxis"\n [xScale]="xScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showXAxisLabel"\n [labelText]="xAxisLabel"\n [trimTicks]="trimXAxisTicks"\n [rotateTicks]="rotateXAxisTicks"\n [maxTickLength]="maxXAxisTickLength"\n [tickFormatting]="xAxisTickFormatting"\n [ticks]="xAxisTicks"\n (dimensionsChanged)="updateXAxisHeight($event)"\n ></svg:g>\n <svg:g\n ngx-charts-y-axis\n *ngIf="yAxis"\n [yScale]="yScale"\n [dims]="dims"\n [showGridLines]="showGridLines"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n [ticks]="yAxisTicks"\n [referenceLines]="referenceLines"\n [showRefLines]="showRefLines"\n [showRefLabels]="showRefLabels"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g [attr.clip-path]="clipPath">\n <svg:g *ngFor="let series of results; trackBy: trackBy" [@animationState]="\'active\'">\n <svg:g\n ngx-charts-line-series\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [data]="series"\n [activeEntries]="activeEntries"\n [scaleType]="scaleType"\n [curve]="curve"\n [rangeFillOpacity]="rangeFillOpacity"\n [hasRange]="hasRange"\n [animations]="animations"\n />\n </svg:g>\n\n <svg:g *ngIf="!tooltipDisabled" (mouseleave)="hideCircles()">\n <svg:g\n ngx-charts-tooltip-area\n [dims]="dims"\n [xSet]="xSet"\n [xScale]="xScale"\n [yScale]="yScale"\n [results]="results"\n [colors]="colors"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="seriesTooltipTemplate"\n (hover)="updateHoveredVertical($event)"\n />\n\n <svg:g *ngFor="let series of results">\n <svg:g\n ngx-charts-circle-series\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [data]="series"\n [scaleType]="scaleType"\n [visibleValue]="hoveredVertical"\n [activeEntries]="activeEntries"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n (select)="onClick($event)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </svg:g>\n <svg:g\n ngx-charts-timeline\n *ngIf="timeline && scaleType != \'ordinal\'"\n [attr.transform]="timelineTransform"\n [results]="results"\n [view]="[timelineWidth, height]"\n [height]="timelineHeight"\n [scheme]="scheme"\n [customColors]="customColors"\n [scaleType]="scaleType"\n [legend]="legend"\n (onDomainChange)="updateDomain($event)"\n >\n <svg:g *ngFor="let series of results; trackBy: trackBy">\n <svg:g\n ngx-charts-line-series\n [xScale]="timelineXScale"\n [yScale]="timelineYScale"\n [colors]="colors"\n [data]="series"\n [scaleType]="scaleType"\n [curve]="curve"\n [hasRange]="hasRange"\n [animations]="animations"\n />\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1}),n.animate(500,n.style({opacity:0}))])])],styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"]})],i)}(R),le=function(){function t(){this.animations=!0}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.updateGradients();var t=this.sortData(this.data.series),e=this.getLineGenerator();this.path=e(t)||"";var i=this.getAreaGenerator();if(this.areaPath=i(t)||"",this.hasRange){var n=this.getRangeGenerator();this.outerPath=n(t)||""}if(this.hasGradient){this.stroke=this.gradientUrl;var a=this.data.series.map((function(t){return t.value})),o=Math.max.apply(Math,A(a));o===Math.min.apply(Math,A(a))&&(this.stroke=this.colors.getColor(o))}else this.stroke=this.colors.getColor(this.data.name)},t.prototype.getLineGenerator=function(){var t=this;return p.line().x((function(e){var i=e.name;return"time"===t.scaleType?t.xScale(i):"linear"===t.scaleType?t.xScale(Number(i)):t.xScale(i)})).y((function(e){return t.yScale(e.value)})).curve(this.curve)},t.prototype.getRangeGenerator=function(){var t=this;return p.area().x((function(e){var i=e.name;return"time"===t.scaleType?t.xScale(i):"linear"===t.scaleType?t.xScale(Number(i)):t.xScale(i)})).y0((function(e){return t.yScale("number"==typeof e.min?e.min:e.value)})).y1((function(e){return t.yScale("number"==typeof e.max?e.max:e.value)})).curve(this.curve)},t.prototype.getAreaGenerator=function(){var t=this;return p.area().x((function(e){var i=e.name;return t.xScale(i)})).y0((function(){return t.yScale.range()[0]})).y1((function(e){return t.yScale(e.value)})).curve(this.curve)},t.prototype.sortData=function(t){return t="linear"===this.scaleType?Mt(t,"name"):"time"===this.scaleType?Pt(t,"name"):Ft(t,"name","asc",this.xScale.domain())},t.prototype.updateGradients=function(){if("linear"===this.colors.scaleType){this.hasGradient=!0,this.gradientId="grad"+et().toString(),this.gradientUrl="url(#"+this.gradientId+")";var t=this.data.series.map((function(t){return t.value})),e=Math.max.apply(Math,A(t)),i=Math.min.apply(Math,A(t));this.gradientStops=this.colors.getLinearGradientStops(e,i),this.areaGradientStops=this.colors.getLinearGradientStops(e)}else this.hasGradient=!1,this.gradientStops=void 0,this.areaGradientStops=void 0},t.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.name===e.name}))},t.prototype.isInactive=function(t){return!(!this.activeEntries||0===this.activeEntries.length)&&void 0===this.activeEntries.find((function(e){return t.name===e.name}))},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"xScale",void 0),T([e.Input()],t.prototype,"yScale",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"scaleType",void 0),T([e.Input()],t.prototype,"curve",void 0),T([e.Input()],t.prototype,"activeEntries",void 0),T([e.Input()],t.prototype,"rangeFillOpacity",void 0),T([e.Input()],t.prototype,"hasRange",void 0),T([e.Input()],t.prototype,"animations",void 0),t=T([e.Component({selector:"g[ngx-charts-line-series]",template:'\n <svg:g>\n <defs>\n <svg:g\n ngx-charts-svg-linear-gradient\n *ngIf="hasGradient"\n orientation="vertical"\n [name]="gradientId"\n [stops]="gradientStops"\n />\n </defs>\n <svg:g\n ngx-charts-area\n class="line-highlight"\n [data]="data"\n [path]="areaPath"\n [fill]="hasGradient ? gradientUrl : colors.getColor(data.name)"\n [opacity]="0.25"\n [startOpacity]="0"\n [gradient]="true"\n [stops]="areaGradientStops"\n [class.active]="isActive(data)"\n [class.inactive]="isInactive(data)"\n [animations]="animations"\n />\n <svg:g\n ngx-charts-line\n class="line-series"\n [data]="data"\n [path]="path"\n [stroke]="stroke"\n [animations]="animations"\n [class.active]="isActive(data)"\n [class.inactive]="isInactive(data)"\n />\n <svg:g\n ngx-charts-area\n *ngIf="hasRange"\n class="line-series-range"\n [data]="data"\n [path]="outerPath"\n [fill]="hasGradient ? gradientUrl : colors.getColor(data.name)"\n [class.active]="isActive(data)"\n [class.inactive]="isInactive(data)"\n [opacity]="rangeFillOpacity"\n [animations]="animations"\n />\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),ce=function(){function t(){}return t=T([e.NgModule({imports:[wt],declarations:[se,re,le],exports:[se,re,le]})],t)}();var he=2*Math.PI,pe=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legendTitle="Legend",i.legendPosition="right",i.showGridLines=!0,i.curve=p.curveCardinalClosed,i.activeEntries=[],i.rangeFillOpacity=.15,i.trimYAxisTicks=!0,i.maxYAxisTickLength=16,i.roundDomains=!1,i.tooltipDisabled=!1,i.showSeriesOnHover=!0,i.gradient=!1,i.yAxisMinScale=0,i.labelTrim=!0,i.labelTrimSize=10,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[10,20,10,20],i.xAxisHeight=0,i.yAxisWidth=0,i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.setDims(),this.setScales(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.setTicks()},i.prototype.setDims=function(){this.dims=At({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition});var t=Math.floor(this.dims.width/2),e=Math.floor(this.dims.height/2),i=this.outerRadius=Math.min(e/1.5,t/1.5),n=Math.max(0,e-i);this.yAxisDims=b(b({},this.dims),{width:t}),this.transform="translate("+this.dims.xOffset+", "+this.margin[0]+")",this.transformYAxis="translate(0, "+n+")",this.labelOffset=this.dims.height+40,this.transformPlot="translate("+t+", "+e+")"},i.prototype.setScales=function(){var t=this.getXValues();this.scaleType=Dt(t),this.xDomain=this.filteredDomain||this.getXDomain(t),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,he),this.yScale=this.getYScale(this.yDomain,this.outerRadius),this.yAxisScale=this.getYScale(this.yDomain.reverse(),this.outerRadius)},i.prototype.setTicks=function(){var t,e=this;t=this.xAxisTickFormatting?this.xAxisTickFormatting:this.xScale.tickFormat?this.xScale.tickFormat.apply(this.xScale,[5]):function(t){return e=t,"[object Date]"===toString.call(e)?t.toLocaleDateString():t.toLocaleString();var e};var i=this.outerRadius;this.thetaTicks=this.xDomain.map((function(n){var a=e.xScale(n),o=1.1*i*(a>Math.PI?-1:1),s=t(n),r=[i*Math.sin(a),-i*Math.cos(a)];return{innerRadius:0,outerRadius:i,startAngle:a,endAngle:a,value:i,label:s,startPos:r,pos:[o,1.1*r[1]]}}));for(var n=0;n<this.thetaTicks.length-1;n++)for(var a=this.thetaTicks[n],o=n+1;o<this.thetaTicks.length;o++){var s=this.thetaTicks[o];if(s.pos[0]*a.pos[0]>0){var r=10-Math.abs(s.pos[1]-a.pos[1]);r>0&&(s.pos[1]+=Math.sign(s.pos[0])*r)}}this.radiusTicks=this.yAxisScale.ticks(Math.floor(this.dims.height/50)).map((function(t){return e.yScale(t)}))},i.prototype.getXValues=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.includes(h.name)||a.push(h.name)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getXDomain=function(t){return void 0===t&&(t=this.getXValues()),"time"===this.scaleType?[Math.min.apply(Math,A(t)),Math.max.apply(Math,A(t))]:"linear"===this.scaleType?(t=t.map((function(t){return Number(t)})),[Math.min.apply(Math,A(t)),Math.max.apply(Math,A(t))]):t},i.prototype.getYValues=function(){var t,e,i,n,a=[];try{for(var o=k(this.results),s=o.next();!s.done;s=o.next()){var r=s.value;try{for(var l=(i=void 0,k(r.series)),c=l.next();!c.done;c=l.next()){var h=c.value;a.indexOf(h.value)<0&&a.push(h.value),void 0!==h.min&&a.indexOf(h.min)<0&&a.push(h.min),void 0!==h.max&&a.indexOf(h.max)<0&&a.push(h.max)}}catch(t){i={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return a},i.prototype.getYDomain=function(t){void 0===t&&(t=this.getYValues());var e=Math.min.apply(Math,A(t)),i=Math.max.apply(Math,A([this.yAxisMinScale],t));return e=Math.max(0,e),this.autoScale||(e=Math.min(0,e)),[e,i]},i.prototype.getSeriesDomain=function(){return this.results.map((function(t){return t.name}))},i.prototype.getXScale=function(t,e){switch(this.scaleType){case"time":return c.scaleTime().range([0,e]).domain(t);case"linear":var i=c.scaleLinear().range([0,e]).domain(t);return this.roundDomains?i.nice():i;default:return c.scalePoint().range([0,e-he/t.length]).padding(0).domain(t)}},i.prototype.getYScale=function(t,e){var i=c.scaleLinear().range([0,e]).domain(t);return this.roundDomains?i.nice():i},i.prototype.onClick=function(t,e){e&&(t.series=e.name),this.select.emit(t)},i.prototype.setColors=function(){var t="ordinal"===this.schemeType?this.seriesDomain:this.yDomain.reverse();this.colors=new Lt(this.scheme,this.schemeType,t,this.customColors)},i.prototype.getLegendOptions=function(){return"ordinal"===this.schemeType?{scaleType:this.schemeType,colors:this.colors,domain:this.seriesDomain,title:this.legendTitle,position:this.legendPosition}:{scaleType:this.schemeType,colors:this.colors.scale,domain:this.yDomain,title:void 0,position:this.legendPosition}},i.prototype.updateYAxisWidth=function(t){var e=t.width;this.yAxisWidth=e,this.update()},i.prototype.updateXAxisHeight=function(t){var e=t.height;this.xAxisHeight=e,this.update()},i.prototype.onActivate=function(t){this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}))>-1||(this.activeEntries=this.showSeriesOnHover?A([t],this.activeEntries):this.activeEntries,this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t){var e=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}));this.activeEntries.splice(e,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},i.prototype.deactivateAll=function(){var t,e;this.activeEntries=A(this.activeEntries);try{for(var i=k(this.activeEntries),n=i.next();!n.done;n=i.next()){var a=n.value;this.deactivate.emit({value:a,entries:[]})}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.activeEntries=[]},i.prototype.trackBy=function(t,e){return e.name},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"xAxis",void 0),T([e.Input()],i.prototype,"yAxis",void 0),T([e.Input()],i.prototype,"showXAxisLabel",void 0),T([e.Input()],i.prototype,"showYAxisLabel",void 0),T([e.Input()],i.prototype,"xAxisLabel",void 0),T([e.Input()],i.prototype,"yAxisLabel",void 0),T([e.Input()],i.prototype,"autoScale",void 0),T([e.Input()],i.prototype,"showGridLines",void 0),T([e.Input()],i.prototype,"curve",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"schemeType",void 0),T([e.Input()],i.prototype,"rangeFillOpacity",void 0),T([e.Input()],i.prototype,"trimYAxisTicks",void 0),T([e.Input()],i.prototype,"maxYAxisTickLength",void 0),T([e.Input()],i.prototype,"xAxisTickFormatting",void 0),T([e.Input()],i.prototype,"yAxisTickFormatting",void 0),T([e.Input()],i.prototype,"roundDomains",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"showSeriesOnHover",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"yAxisMinScale",void 0),T([e.Input()],i.prototype,"labelTrim",void 0),T([e.Input()],i.prototype,"labelTrimSize",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-polar-chart",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelClick)="onClick($event)"\n (legendLabelActivate)="onActivate($event)"\n (legendLabelDeactivate)="onDeactivate($event)"\n >\n <svg:g class="polar-chart chart" [attr.transform]="transform">\n <svg:g [attr.transform]="transformPlot">\n <svg:circle class="polar-chart-background" cx="0" cy="0" [attr.r]="this.outerRadius" />\n <svg:g *ngIf="showGridLines">\n <svg:circle\n *ngFor="let r of radiusTicks"\n class="gridline-path radial-gridline-path"\n cx="0"\n cy="0"\n [attr.r]="r"\n />\n </svg:g>\n <svg:g *ngIf="xAxis">\n <svg:g\n ngx-charts-pie-label\n *ngFor="let tick of thetaTicks"\n [data]="tick"\n [radius]="outerRadius"\n [label]="tick.label"\n [max]="outerRadius"\n [value]="showGridLines ? 1 : outerRadius"\n [explodeSlices]="true"\n [animations]="animations"\n [labelTrim]="labelTrim"\n [labelTrimSize]="labelTrimSize"\n ></svg:g>\n </svg:g>\n </svg:g>\n <svg:g\n ngx-charts-y-axis\n [attr.transform]="transformYAxis"\n *ngIf="yAxis"\n [yScale]="yAxisScale"\n [dims]="yAxisDims"\n [showGridLines]="showGridLines"\n [showLabel]="showYAxisLabel"\n [labelText]="yAxisLabel"\n [trimTicks]="trimYAxisTicks"\n [maxTickLength]="maxYAxisTickLength"\n [tickFormatting]="yAxisTickFormatting"\n (dimensionsChanged)="updateYAxisWidth($event)"\n ></svg:g>\n <svg:g\n ngx-charts-axis-label\n *ngIf="xAxis && showXAxisLabel"\n [label]="xAxisLabel"\n [offset]="labelOffset"\n [orient]="\'bottom\'"\n [height]="dims.height"\n [width]="dims.width"\n ></svg:g>\n <svg:g [attr.transform]="transformPlot">\n <svg:g *ngFor="let series of results; trackBy: trackBy" [@animationState]="\'active\'">\n <svg:g\n ngx-charts-polar-series\n [gradient]="gradient"\n [xScale]="xScale"\n [yScale]="yScale"\n [colors]="colors"\n [data]="series"\n [activeEntries]="activeEntries"\n [scaleType]="scaleType"\n [curve]="curve"\n [rangeFillOpacity]="rangeFillOpacity"\n [animations]="animations"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n (select)="onClick($event)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n />\n </svg:g>\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[n.trigger("animationState",[n.transition(":leave",[n.style({opacity:1}),n.animate(500,n.style({opacity:0}))])])],styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}",".pie-label{font-size:11px}.pie-label.animation{-webkit-animation:750ms ease-in fadeIn;animation:750ms ease-in fadeIn}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.pie-label-line{stroke-dasharray:100%}.pie-label-line.animation{-webkit-animation:3s linear drawOut;animation:3s linear drawOut;transition:d 750ms}@-webkit-keyframes drawOut{from{stroke-dashoffset:100%}to{stroke-dashoffset:0}}@keyframes drawOut{from{stroke-dashoffset:100%}to{stroke-dashoffset:0}}",".polar-chart .polar-chart-background{fill:none}.polar-chart .radial-gridline-path{stroke-dasharray:10 10;fill:none}.polar-chart .pie-label-line{stroke:#2f3646}.polar-charts-series .polar-series-area,.polar-series-path{pointer-events:none}"]})],i)}(R),de=function(){function t(){this.tooltipDisabled=!1,this.gradient=!1,this.animations=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.circleRadius=3}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){var t=this;this.updateGradients();var e=this.getLineGenerator(),i=this.sortData(this.data.series),n=this.data.name,a="linear"===this.colors.scaleType,o=this.yScale.domain()[0];this.seriesColor=this.colors.getColor(a?o:n),this.path=e(i)||"",this.circles=i.map((function(e){var i=t.getAngle(e),o=t.getRadius(e),s=e.value,r=t.colors.getColor(a?Math.abs(s):n);return{data:Object.assign({},e,{series:n,value:s,name:e.name}),cx:o*Math.sin(i),cy:-o*Math.cos(i),value:s,color:r,label:e.name}})),this.active=this.isActive(this.data),this.inactive=this.isInactive(this.data),this.tooltipText=this.tooltipText||function(e){return t.defaultTooltipText(e)}},t.prototype.getAngle=function(t){var e=t.name;return"time"===this.scaleType?this.xScale(e):"linear"===this.scaleType?this.xScale(Number(e)):this.xScale(e)},t.prototype.getRadius=function(t){return this.yScale(t.value)},t.prototype.getLineGenerator=function(){var t=this;return p.lineRadial().angle((function(e){return t.getAngle(e)})).radius((function(e){return t.getRadius(e)})).curve(this.curve)},t.prototype.sortData=function(t){return"linear"===this.scaleType?Mt(t,"name"):"time"===this.scaleType?Pt(t,"name"):Ft(t,"name","asc",this.xScale.domain())},t.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.name===e.name}))},t.prototype.isInactive=function(t){return!(!this.activeEntries||0===this.activeEntries.length)&&void 0===this.activeEntries.find((function(e){return t.name===e.name}))},t.prototype.defaultTooltipText=function(t){var e=t.label,i=t.value;return'\n <span class="tooltip-label">'+K(this.data.name)+" • "+K(e)+'</span>\n <span class="tooltip-val">'+i.toLocaleString()+"</span>\n "},t.prototype.updateGradients=function(){if(this.hasGradient=this.gradient||"linear"===this.colors.scaleType,this.hasGradient)if(this.gradientId="grad"+et().toString(),this.gradientUrl="url(#"+this.gradientId+")","linear"===this.colors.scaleType){var t=this.data.series.map((function(t){return t.value})),e=Math.max.apply(Math,A(t)),i=Math.min.apply(Math,A(t));this.gradientStops=this.colors.getLinearGradientStops(e,i)}else this.gradientStops=void 0},T([e.Input()],t.prototype,"name",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"xScale",void 0),T([e.Input()],t.prototype,"yScale",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"scaleType",void 0),T([e.Input()],t.prototype,"curve",void 0),T([e.Input()],t.prototype,"activeEntries",void 0),T([e.Input()],t.prototype,"rangeFillOpacity",void 0),T([e.Input()],t.prototype,"tooltipDisabled",void 0),T([e.Input()],t.prototype,"tooltipText",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"tooltipTemplate",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),t=T([e.Component({selector:"g[ngx-charts-polar-series]",template:'\n <svg:g class="polar-charts-series">\n <defs>\n <svg:g\n ngx-charts-svg-radial-gradient\n *ngIf="hasGradient"\n orientation="vertical"\n [color]="seriesColor"\n [name]="gradientId"\n [startOpacity]="0.25"\n [endOpacity]="1"\n [stops]="gradientStops"\n />\n </defs>\n <svg:g\n ngx-charts-line\n class="polar-series-path"\n [path]="path"\n [stroke]="hasGradient ? gradientUrl : seriesColor"\n [class.active]="active"\n [class.inactive]="inactive"\n [attr.fill-opacity]="rangeFillOpacity"\n [fill]="hasGradient ? gradientUrl : seriesColor"\n [animations]="animations"\n />\n <svg:g\n ngx-charts-circle\n *ngFor="let circle of circles"\n class="circle"\n [cx]="circle.cx"\n [cy]="circle.cy"\n [r]="circleRadius"\n [fill]="circle.color"\n [style.opacity]="inactive ? 0.2 : 1"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="\'top\'"\n tooltipType="tooltip"\n [tooltipTitle]="tooltipTemplate ? undefined : tooltipText(circle)"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="circle.data"\n (select)="select.emit(circle.data)"\n (activate)="activate.emit({ name: circle.data.series })"\n (deactivate)="deactivate.emit({ name: circle.data.series })"\n ></svg:g>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),ge=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.activeEntries=[],i.tooltipDisabled=!1,i.label="Total",i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[20,20,20,20],i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.dims=At({width:4*this.width/12,height:this.height,margins:this.margin}),this.formatDates(),this.domain=this.getDomain(),this.setColors();var e=this.dims.width/2,i=this.margin[0]+this.dims.height/2;this.legendWidth=this.width-this.dims.width-this.margin[1],this.outerRadius=Math.min(this.dims.width,this.dims.height)/2.5,this.innerRadius=.75*this.outerRadius,this.transform="translate("+e+" , "+i+")"},i.prototype.getDomain=function(){return this.results.map((function(t){return t.label}))},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.setColors=function(){this.colors=new Lt(this.scheme,"ordinal",this.domain,this.customColors)},i.prototype.onActivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name})),this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name}));var i=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}));this.activeEntries.splice(i,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"tooltipText",void 0),T([e.Input()],i.prototype,"label",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),T([e.Input()],i.prototype,"valueFormatting",void 0),T([e.Input()],i.prototype,"nameFormatting",void 0),T([e.Input()],i.prototype,"percentageFormatting",void 0),i=T([e.Component({selector:"ngx-charts-advanced-pie-chart",template:'\n <div [style.width.px]="width" [style.height.px]="height">\n <div class="advanced-pie chart" [style.width.px]="dims.width" [style.height.px]="dims.height">\n <ngx-charts-chart [view]="[width, height]" [showLegend]="false" [animations]="animations">\n <svg:g [attr.transform]="transform" class="pie chart">\n <svg:g\n ngx-charts-pie-series\n [colors]="colors"\n [series]="results"\n [innerRadius]="innerRadius"\n [activeEntries]="activeEntries"\n [outerRadius]="outerRadius"\n [gradient]="gradient"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipText]="tooltipText"\n (select)="onClick($event)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n [animations]="animations"\n ></svg:g>\n </svg:g>\n </ngx-charts-chart>\n </div>\n <div class="advanced-pie-legend-wrapper" [style.width.px]="width - dims.width" [style.height.px]="height">\n <ngx-charts-advanced-legend\n [data]="results"\n [colors]="colors"\n [width]="width - dims.width - margin[1]"\n [label]="label"\n [animations]="animations"\n [valueFormatting]="valueFormatting"\n [labelFormatting]="nameFormatting"\n [percentageFormatting]="percentageFormatting"\n (select)="onClick($event)"\n (activate)="onActivate($event, true)"\n (deactivate)="onDeactivate($event, true)"\n >\n </ngx-charts-advanced-legend>\n </div>\n </div>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}",".advanced-pie{display:inline-block;float:left}.advanced-pie-legend-wrapper{display:inline-block}"]})],i)}(R),ue=function(){function t(){this.animations=!0,this.labelTrim=!0,this.labelTrimSize=10,this.isIE=/(edge|msie|trident)/i.test(navigator.userAgent),this.trimLabel=H}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){var t=this.radius;this.explodeSlices&&(t=this.radius*this.value/this.max);var e=p.arc().innerRadius(t).outerRadius(t).centroid(this.data),i=this.data.pos[1]/e[1];0!==this.data.pos[1]&&0!==e[1]||(i=1);var n=[i*e[0],i*e[1]];this.line="M"+e+"L"+n+"L"+this.data.pos},Object.defineProperty(t.prototype,"textX",{get:function(){return this.data.pos[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textY",{get:function(){return this.data.pos[1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"styleTransform",{get:function(){return this.isIE?null:"translate3d("+this.textX+"px,"+this.textY+"px, 0)"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"attrTransform",{get:function(){return this.isIE?"translate("+this.textX+","+this.textY+")":null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textTransition",{get:function(){return this.isIE||!this.animations?null:"transform 0.75s"},enumerable:!0,configurable:!0}),t.prototype.textAnchor=function(){return this.midAngle(this.data)<Math.PI?"start":"end"},t.prototype.midAngle=function(t){return t.startAngle+(t.endAngle-t.startAngle)/2},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"radius",void 0),T([e.Input()],t.prototype,"label",void 0),T([e.Input()],t.prototype,"color",void 0),T([e.Input()],t.prototype,"max",void 0),T([e.Input()],t.prototype,"value",void 0),T([e.Input()],t.prototype,"explodeSlices",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Input()],t.prototype,"labelTrim",void 0),T([e.Input()],t.prototype,"labelTrimSize",void 0),t=T([e.Component({selector:"g[ngx-charts-pie-label]",template:'\n <title>{{ label }}</title>\n <svg:g [attr.transform]="attrTransform" [style.transform]="styleTransform" [style.transition]="textTransition">\n <svg:text\n class="pie-label"\n [class.animation]="animations"\n dy=".35em"\n [style.textAnchor]="textAnchor()"\n [style.shapeRendering]="\'crispEdges\'"\n >\n {{ labelTrim ? trimLabel(label, labelTrimSize) : label }}\n </svg:text>\n </svg:g>\n <svg:path\n [attr.d]="line"\n [attr.stroke]="color"\n fill="none"\n class="pie-label-line line"\n [class.animation]="animations"\n ></svg:path>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),ve=function(){function t(t){this.startAngle=0,this.endAngle=2*Math.PI,this.cornerRadius=0,this.explodeSlices=!1,this.gradient=!1,this.animate=!0,this.pointerEvents=!0,this.isActive=!1,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.dblclick=new e.EventEmitter,this.initialized=!1,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.getGradient=function(){return this.gradient?this.gradientFill:this.fill},t.prototype.getPointerEvents=function(){return this.pointerEvents?"auto":"none"},t.prototype.update=function(){var t=this.calculateArc();this.startOpacity=.5,this.radialGradientId="linearGrad"+et().toString(),this.gradientFill="url(#"+this.radialGradientId+")",this.animate?this.initialized?this.updateAnimation():(this.loadAnimation(),this.initialized=!0):this.path=t.startAngle(this.startAngle).endAngle(this.endAngle)()},t.prototype.calculateArc=function(){var t=this.outerRadius;return this.explodeSlices&&0===this.innerRadius&&(t=this.outerRadius*this.value/this.max),p.arc().innerRadius(this.innerRadius).outerRadius(t).cornerRadius(this.cornerRadius)},t.prototype.loadAnimation=function(){var t=r.select(this.element).selectAll(".arc").data([{startAngle:this.startAngle,endAngle:this.endAngle}]),e=this.calculateArc();t.transition().attrTween("d",(function(t){this._current=this._current||t;var i=Object.assign({},t);i.endAngle=i.startAngle;var n=g.interpolate(i,i);return this._current=n(0),function(t){return e(n(t))}})).transition().duration(750).attrTween("d",(function(t){this._current=this._current||t;var i=g.interpolate(this._current,t);return this._current=i(0),function(t){return e(i(t))}}))},t.prototype.updateAnimation=function(){var t=r.select(this.element).selectAll(".arc").data([{startAngle:this.startAngle,endAngle:this.endAngle}]),e=this.calculateArc();t.transition().duration(750).attrTween("d",(function(t){this._current=this._current||t;var i=g.interpolate(this._current,t);return this._current=i(0),function(t){return e(i(t))}}))},t.prototype.onClick=function(){var t=this;clearTimeout(this._timeout),this._timeout=setTimeout((function(){return t.select.emit(t.data)}),200)},t.prototype.onDblClick=function(t){t.preventDefault(),t.stopPropagation(),clearTimeout(this._timeout),this.dblclick.emit({data:this.data,nativeEvent:t})},t.ctorParameters=function(){return[{type:e.ElementRef}]},T([e.Input()],t.prototype,"fill",void 0),T([e.Input()],t.prototype,"startAngle",void 0),T([e.Input()],t.prototype,"endAngle",void 0),T([e.Input()],t.prototype,"innerRadius",void 0),T([e.Input()],t.prototype,"outerRadius",void 0),T([e.Input()],t.prototype,"cornerRadius",void 0),T([e.Input()],t.prototype,"value",void 0),T([e.Input()],t.prototype,"max",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"explodeSlices",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"animate",void 0),T([e.Input()],t.prototype,"pointerEvents",void 0),T([e.Input()],t.prototype,"isActive",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),T([e.Output()],t.prototype,"dblclick",void 0),t=T([e.Component({selector:"g[ngx-charts-pie-arc]",template:'\n <svg:g class="arc-group">\n <svg:defs *ngIf="gradient">\n <svg:g\n ngx-charts-svg-radial-gradient\n [color]="fill"\n orientation="vertical"\n [name]="radialGradientId"\n [startOpacity]="startOpacity"\n />\n </svg:defs>\n <svg:path\n [attr.d]="path"\n class="arc"\n [class.active]="isActive"\n [attr.fill]="getGradient()"\n (click)="onClick()"\n (dblclick)="onDblClick($event)"\n (mouseenter)="activate.emit(data)"\n (mouseleave)="deactivate.emit(data)"\n [style.pointer-events]="getPointerEvents()"\n />\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),me=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.labels=!1,i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.explodeSlices=!1,i.doughnut=!1,i.arcWidth=.25,i.activeEntries=[],i.tooltipDisabled=!1,i.trimLabels=!0,i.maxLabelLength=10,i.dblclick=new e.EventEmitter,i.select=new e.EventEmitter,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i}return f(i,t),i.prototype.update=function(){var e=this;t.prototype.update.call(this),this.labels&&this.hasNoOptionalMarginsSet()?this.margins=[30,80,30,80]:!this.labels&&this.hasNoOptionalMarginsSet()&&(this.margins=[20,20,20,20]),this.dims=At({width:this.width,height:this.height,margins:this.margins,showLegend:this.legend,legendPosition:this.legendPosition}),this.formatDates();var i=this.margins[3]+this.dims.width/2,n=this.margins[0]+this.dims.height/2;this.translation="translate("+i+", "+n+")",this.outerRadius=Math.min(this.dims.width,this.dims.height),this.labels?this.outerRadius/=3:this.outerRadius/=2,this.innerRadius=0,this.doughnut&&(this.innerRadius=this.outerRadius*(1-this.arcWidth)),this.domain=this.getDomain(),this.data=this.results.sort((function(t,i){return e.domain.indexOf(t.name)-e.domain.indexOf(i.name)})),this.setColors(),this.legendOptions=this.getLegendOptions()},i.prototype.getDomain=function(){return this.results.map((function(t){return t.label}))},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.setColors=function(){this.colors=new Lt(this.scheme,"ordinal",this.domain,this.customColors)},i.prototype.getLegendOptions=function(){return{scaleType:"ordinal",domain:this.domain,colors:this.colors,title:this.legendTitle,position:this.legendPosition}},i.prototype.onActivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name})),this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name}));var i=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}));this.activeEntries.splice(i,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},i.prototype.hasNoOptionalMarginsSet=function(){return!this.margins||this.margins.length<=0},T([e.Input()],i.prototype,"labels",void 0),T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"explodeSlices",void 0),T([e.Input()],i.prototype,"doughnut",void 0),T([e.Input()],i.prototype,"arcWidth",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"labelFormatting",void 0),T([e.Input()],i.prototype,"trimLabels",void 0),T([e.Input()],i.prototype,"maxLabelLength",void 0),T([e.Input()],i.prototype,"tooltipText",void 0),T([e.Output()],i.prototype,"dblclick",void 0),T([e.Input()],i.prototype,"margins",void 0),T([e.Output()],i.prototype,"select",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-pie-chart",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelActivate)="onActivate($event, true)"\n (legendLabelDeactivate)="onDeactivate($event, true)"\n (legendLabelClick)="onClick($event)"\n >\n <svg:g [attr.transform]="translation" class="pie-chart chart">\n <svg:g\n ngx-charts-pie-series\n [colors]="colors"\n [series]="data"\n [showLabels]="labels"\n [labelFormatting]="labelFormatting"\n [trimLabels]="trimLabels"\n [maxLabelLength]="maxLabelLength"\n [activeEntries]="activeEntries"\n [innerRadius]="innerRadius"\n [outerRadius]="outerRadius"\n [explodeSlices]="explodeSlices"\n [gradient]="gradient"\n [animations]="animations"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipText]="tooltipText"\n (dblclick)="dblclick.emit($event)"\n (select)="onClick($event)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n />\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}",".pie-label{font-size:11px}.pie-label.animation{-webkit-animation:750ms ease-in fadeIn;animation:750ms ease-in fadeIn}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.pie-label-line{stroke-dasharray:100%}.pie-label-line.animation{-webkit-animation:3s linear drawOut;animation:3s linear drawOut;transition:d 750ms}@-webkit-keyframes drawOut{from{stroke-dashoffset:100%}to{stroke-dashoffset:0}}@keyframes drawOut{from{stroke-dashoffset:100%}to{stroke-dashoffset:0}}"]})],i)}(R);function ye(t,e,i){var n=1,a=e,o=t.width;if(o>i)for(;o/a<i;)n+=1,a=Math.ceil(e/n);return[a,n]}function xe(t,e,i,n){for(var a=c.scaleBand(),o=c.scaleBand(),s=t.width,r=t.height,l=w(ye(t,e.length,i),2),h=l[0],p=l[1],d=[],g=[],u=0;u<p;u++)g.push(u);for(u=0;u<h;u++)d.push(u);a.domain(d),o.domain(g),a.rangeRound([0,s],.1),o.rangeRound([0,r],.1);var v=[],m=n||e.map((function(t){return t?t.value:0})).reduce((function(t,e){return t+e}),0),y=a.bandwidth(),x=o.bandwidth();for(u=0;u<e.length;u++)v[u]={},v[u].data={name:e[u]?e[u].name:"",value:e[u]?e[u].value:void 0,extra:e[u]?e[u].extra:void 0,label:e[u]?e[u].label:""},v[u].x=a(u%h),v[u].y=o(Math.floor(u/h)),v[u].width=y,v[u].height=x,v[u].data.percent=m>0?v[u].data.value/m:0,v[u].data.total=m;return v}var fe=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.tooltipDisabled=!1,i.label="Total",i.minWidth=150,i.activeEntries=[],i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.margin=[20,20,20,20],i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.dims=At({width:this.width,height:this.height,margins:this.margin}),this.formatDates(),this.domain=this.getDomain(),this.data=xe(this.dims,this.results,this.minWidth,this.designatedTotal),this.transform="translate("+this.margin[3]+" , "+this.margin[0]+")",this.series=this.getSeries(),this.setColors(),this.tooltipText=this.tooltipText||this.defaultTooltipText},i.prototype.defaultTooltipText=function(t){var e=t.data;return'\n <span class="tooltip-label">'+H(Q(e.name))+'</span>\n <span class="tooltip-val">'+e.value.toLocaleString()+"</span>\n "},i.prototype.getDomain=function(){return this.results.map((function(t){return t.label}))},i.prototype.getSeries=function(){var t=this,e=this.designatedTotal?this.designatedTotal:this.getTotal();return this.data.map((function(i){var n=i.data.name,a=Q(n),o=i.data.value,s=d.min([i.width-10,i.height-20])/2-5,r=.9*s,l=0;return{transform:"translate("+(i.x+(i.width-10)/2)+", "+(i.y+(i.height-20)/2)+")",colors:function(){return 1===(l+=1)?"rgba(100,100,100,0.3)":t.colorScale.getColor(a)},innerRadius:r,outerRadius:s,name:n,label:H(a),total:o,value:o,percent:u.format(".1%")(i.data.percent),data:[i,{data:{other:!0,value:e-o,name:i.data.name}}]}}))},i.prototype.getTotal=function(){return this.results.map((function(t){return t.value})).reduce((function(t,e){return t+e}),0)},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.setColors=function(){this.colorScale=new Lt(this.scheme,"ordinal",this.domain,this.customColors)},i.prototype.onActivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name})),this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t,e){void 0===e&&(e=!1),t=this.results.find((function(i){return e?i.label===t.name:i.name===t.name}));var i=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value&&e.series===t.series}));this.activeEntries.splice(i,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},T([e.Input()],i.prototype,"designatedTotal",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"tooltipText",void 0),T([e.Input()],i.prototype,"label",void 0),T([e.Input()],i.prototype,"minWidth",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-pie-grid",template:'\n <ngx-charts-chart [view]="[width, height]" [showLegend]="false" [animations]="animations">\n <svg:g [attr.transform]="transform" class="pie-grid chart">\n <svg:g *ngFor="let series of series" class="pie-grid-item" [attr.transform]="series.transform">\n <svg:g\n ngx-charts-pie-grid-series\n [colors]="series.colors"\n [data]="series.data"\n [innerRadius]="series.innerRadius"\n [outerRadius]="series.outerRadius"\n [animations]="animations"\n (select)="onClick($event)"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="\'top\'"\n [tooltipType]="\'tooltip\'"\n [tooltipTitle]="tooltipTemplate ? undefined : tooltipText({ data: series })"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="series.data[0].data"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n />\n <svg:text\n *ngIf="animations"\n class="label percent-label"\n dy="-0.5em"\n x="0"\n y="5"\n ngx-charts-count-up\n [countTo]="series.percent"\n [countSuffix]="\'%\'"\n text-anchor="middle"\n ></svg:text>\n <svg:text *ngIf="!animations" class="label percent-label" dy="-0.5em" x="0" y="5" text-anchor="middle">\n {{ series.percent.toLocaleString() }}\n </svg:text>\n <svg:text class="label" dy="0.5em" x="0" y="5" text-anchor="middle">\n {{ series.label }}\n </svg:text>\n <svg:text\n *ngIf="animations"\n class="label"\n dy="1.23em"\n x="0"\n [attr.y]="series.outerRadius"\n text-anchor="middle"\n ngx-charts-count-up\n [countTo]="series.total"\n [countPrefix]="label + \': \'"\n ></svg:text>\n <svg:text\n *ngIf="!animations"\n class="label"\n dy="1.23em"\n x="0"\n [attr.y]="series.outerRadius"\n text-anchor="middle"\n >\n {{ label }}: {{ series.total.toLocaleString() }}\n </svg:text>\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}",".pie-grid .arc1{opacity:.4}.pie-grid .percent-label{font-size:16px;font-weight:400}"]})],i)}(R),be=function(){function t(t){this.innerRadius=70,this.outerRadius=80,this.animations=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.layout=p.pie().value((function(t){return t.data.value})).sort(null),this.arcs=this.getArcs()},t.prototype.getArcs=function(){var t=this;return this.layout(this.data).map((function(e,i){var n=e.data.data.name,a=e.data.data.other;0===i&&(e.startAngle=0);var o=t.colors(n);return{data:e.data.data,class:"arc arc"+i,fill:o,startAngle:a?0:e.startAngle,endAngle:e.endAngle,animate:t.animations&&!a,pointerEvents:!a}}))},t.prototype.onClick=function(t){this.select.emit(this.data[0].data)},t.prototype.trackBy=function(t,e){return e.data.name},t.prototype.label=function(t){return t.data.name},t.prototype.color=function(t){return this.colors(this.label(t))},t.ctorParameters=function(){return[{type:e.ElementRef}]},T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"innerRadius",void 0),T([e.Input()],t.prototype,"outerRadius",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),t=T([e.Component({selector:"g[ngx-charts-pie-grid-series]",template:'\n <svg:g class="pie-grid-arcs">\n <svg:g\n ngx-charts-pie-arc\n *ngFor="let arc of arcs; trackBy: trackBy"\n [attr.class]="arc.class"\n [startAngle]="arc.startAngle"\n [endAngle]="arc.endAngle"\n [innerRadius]="innerRadius"\n [outerRadius]="outerRadius"\n [fill]="color(arc)"\n [value]="arc.data.value"\n [data]="arc.data"\n [gradient]="false"\n [pointerEvents]="arc.pointerEvents"\n [animate]="arc.animate"\n (select)="onClick($event)"\n (activate)="activate.emit($event)"\n (deactivate)="deactivate.emit($event)"\n ></svg:g>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Te=function(){function t(){this.series=[],this.innerRadius=60,this.outerRadius=80,this.trimLabels=!0,this.maxLabelLength=10,this.tooltipDisabled=!1,this.animations=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter,this.dblclick=new e.EventEmitter}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){var t=p.pie().value((function(t){return t.value})).sort(null)(this.series);this.max=d.max(t,(function(t){return t.value})),this.data=this.calculateLabelPositions(t),this.tooltipText=this.tooltipText||this.defaultTooltipText},t.prototype.midAngle=function(t){return t.startAngle+(t.endAngle-t.startAngle)/2},t.prototype.outerArc=function(){return p.arc().innerRadius(1.5*this.outerRadius).outerRadius(1.5*this.outerRadius)},t.prototype.calculateLabelPositions=function(t){var e=this,i=t;i.forEach((function(t){t.pos=e.outerArc().centroid(t),t.pos[0]=1.5*e.outerRadius*(e.midAngle(t)<Math.PI?1:-1)}));for(var n=0;n<i.length-1;n++){var a=i[n];if(this.labelVisible(a))for(var o=n+1;o<i.length;o++){var s=i[o];if(this.labelVisible(s)&&s.pos[0]*a.pos[0]>0){var r=10-Math.abs(s.pos[1]-a.pos[1]);r>0&&(s.pos[1]+=Math.sign(s.pos[0])*r)}}}return i},t.prototype.labelVisible=function(t){return this.showLabels&&t.endAngle-t.startAngle>Math.PI/30},t.prototype.getTooltipTitle=function(t){return this.tooltipTemplate?void 0:this.tooltipText(t)},t.prototype.labelText=function(t){return this.labelFormatting?this.labelFormatting(t.data.name):this.label(t)},t.prototype.label=function(t){return Q(t.data.name)},t.prototype.defaultTooltipText=function(t){var e=this.label(t),i=Q(t.data.value);return'\n <span class="tooltip-label">'+K(e)+'</span>\n <span class="tooltip-val">'+i+"</span>\n "},t.prototype.color=function(t){return this.colors.getColor(this.label(t))},t.prototype.trackBy=function(t,e){return e.data.name},t.prototype.onClick=function(t){this.select.emit(t)},t.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.name===e.name&&t.series===e.series}))},T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"series",void 0),T([e.Input()],t.prototype,"dims",void 0),T([e.Input()],t.prototype,"innerRadius",void 0),T([e.Input()],t.prototype,"outerRadius",void 0),T([e.Input()],t.prototype,"explodeSlices",void 0),T([e.Input()],t.prototype,"showLabels",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"activeEntries",void 0),T([e.Input()],t.prototype,"labelFormatting",void 0),T([e.Input()],t.prototype,"trimLabels",void 0),T([e.Input()],t.prototype,"maxLabelLength",void 0),T([e.Input()],t.prototype,"tooltipText",void 0),T([e.Input()],t.prototype,"tooltipDisabled",void 0),T([e.Input()],t.prototype,"tooltipTemplate",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),T([e.Output()],t.prototype,"dblclick",void 0),t=T([e.Component({selector:"g[ngx-charts-pie-series]",template:'\n <svg:g *ngFor="let arc of data; trackBy: trackBy">\n <svg:g\n ngx-charts-pie-label\n *ngIf="labelVisible(arc)"\n [data]="arc"\n [radius]="outerRadius"\n [color]="color(arc)"\n [label]="labelText(arc)"\n [labelTrim]="trimLabels"\n [labelTrimSize]="maxLabelLength"\n [max]="max"\n [value]="arc.value"\n [explodeSlices]="explodeSlices"\n [animations]="animations"\n ></svg:g>\n <svg:g\n ngx-charts-pie-arc\n [startAngle]="arc.startAngle"\n [endAngle]="arc.endAngle"\n [innerRadius]="innerRadius"\n [outerRadius]="outerRadius"\n [fill]="color(arc)"\n [value]="arc.data.value"\n [gradient]="gradient"\n [data]="arc.data"\n [max]="max"\n [explodeSlices]="explodeSlices"\n [isActive]="isActive(arc.data)"\n [animate]="animations"\n (select)="onClick($event)"\n (activate)="activate.emit($event)"\n (deactivate)="deactivate.emit($event)"\n (dblclick)="dblclick.emit($event)"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="\'top\'"\n [tooltipType]="\'tooltip\'"\n [tooltipTitle]="getTooltipTitle(arc)"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="arc.data"\n ></svg:g>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),ke=function(){function t(){}return t=T([e.NgModule({imports:[wt],declarations:[ge,ue,ve,me,fe,be,Te],exports:[ge,ue,ve,me,fe,be,Te]})],t)}(),we=function(){function t(){}return t=T([e.NgModule({imports:[wt,ke,ce],declarations:[pe,de],exports:[pe,de]})],t)}(),Ae=function(){function t(t,i,n){this.cd=i,this.zone=n,this.animations=!0,this.select=new e.EventEmitter,this.value="",this.textFontSize=12,this.textTransform="",this.initialized=!1,this.bandHeight=10,this.textPadding=[10,20,5,20],this.labelFontSize=15,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.ngOnDestroy=function(){cancelAnimationFrame(this.animationReq)},t.prototype.update=function(){var t=this;this.zone.run((function(){var e=t.data&&void 0!==t.data.value,i=t.valueFormatting||function(t){return t.value.toLocaleString()},n=t.labelFormatting||function(t){return K(H(t.label,55))};t.transform="translate("+t.x+" , "+t.y+")",t.textWidth=Math.max(0,t.width)-t.textPadding[1]-t.textPadding[3],t.cardWidth=Math.max(0,t.width),t.cardHeight=Math.max(0,t.height),t.label=t.label?t.label:t.data.name;var a={label:t.label,data:t.data,value:t.data.value};t.formattedLabel=n(a),t.transformBand="translate(0 , "+(t.cardHeight-t.bandHeight)+")";var o=e?i(a):"";t.value=t.paddedValue(o),t.setPadding(),t.bandPath=G(0,0,t.cardWidth,t.bandHeight,3,[!1,!1,!0,!0]),setTimeout((function(){t.scaleText(),t.value=o,e&&!t.initialized&&setTimeout((function(){return t.startCount()}),20)}),8)}))},t.prototype.paddedValue=function(t){return this.medianSize&&this.medianSize>t.length&&(t+=" ".repeat(this.medianSize-t.length)),t},t.prototype.startCount=function(){var t=this;if(!this.initialized&&this.animations){cancelAnimationFrame(this.animationReq);var e=this.data.value,i=pt(e),n=this.valueFormatting||function(t){return t.value.toLocaleString()};this.animationReq=ht(0,e,i,1,(function(i){var a=i.value,o=i.finished;t.zone.run((function(){a=o?e:a,t.value=n({label:t.label,data:t.data,value:a}),o||(t.value=t.paddedValue(t.value)),t.cd.markForCheck()}))})),this.initialized=!0}},t.prototype.scaleText=function(){var t=this;this.zone.run((function(){var e=t.textEl.nativeElement.getBoundingClientRect(),i=e.width,n=e.height;if(0!==i&&0!==n){var a=t.textPadding[1]=t.textPadding[3]=t.cardWidth/8,o=t.cardWidth-2*a,s=t.cardHeight/3,r=Math.min(o/i,s/n);t.textFontSize=Math.floor(t.textFontSize*r),t.labelFontSize=Math.min(t.textFontSize,15),t.setPadding(),t.cd.markForCheck()}}))},t.prototype.setPadding=function(){this.textPadding[1]=this.textPadding[3]=this.cardWidth/8;var t=this.cardHeight/2;this.textPadding[0]=t-this.textFontSize-this.labelFontSize/2,this.textPadding[2]=t-this.labelFontSize},t.prototype.onClick=function(){this.select.emit(this.data)},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:e.NgZone}]},T([e.Input()],t.prototype,"color",void 0),T([e.Input()],t.prototype,"bandColor",void 0),T([e.Input()],t.prototype,"textColor",void 0),T([e.Input()],t.prototype,"x",void 0),T([e.Input()],t.prototype,"y",void 0),T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"height",void 0),T([e.Input()],t.prototype,"label",void 0),T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"medianSize",void 0),T([e.Input()],t.prototype,"valueFormatting",void 0),T([e.Input()],t.prototype,"labelFormatting",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.ViewChild("textEl",{static:!1})],t.prototype,"textEl",void 0),t=T([e.Component({selector:"g[ngx-charts-card]",template:'\n <svg:g [attr.transform]="transform" class="cell" (click)="onClick()">\n <svg:rect class="card" [style.fill]="color" [attr.width]="cardWidth" [attr.height]="cardHeight" rx="3" ry="3" />\n <svg:path\n *ngIf="bandColor && bandColor !== color"\n class="card-band"\n [attr.fill]="bandColor"\n [attr.transform]="transformBand"\n stroke="none"\n [attr.d]="bandPath"\n />\n <title>{{ label }}</title>\n <svg:foreignObject\n class="trimmed-label"\n x="5"\n [attr.x]="textPadding[3]"\n [attr.y]="cardHeight - textPadding[2]"\n [attr.width]="textWidth"\n [attr.height]="labelFontSize + textPadding[2]"\n alignment-baseline="hanging"\n >\n <xhtml:p\n [style.color]="textColor"\n [style.fontSize.px]="labelFontSize"\n [style.lineHeight.px]="labelFontSize"\n [innerHTML]="formattedLabel"\n >\n </xhtml:p>\n </svg:foreignObject>\n <svg:text\n #textEl\n class="value-text"\n [attr.x]="textPadding[3]"\n [attr.y]="textPadding[0]"\n [style.fill]="textColor"\n text-anchor="start"\n alignment-baseline="hanging"\n [style.font-size.pt]="textFontSize"\n >\n {{ value }}\n </svg:text>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}();function Ie(t){var e=v.rgb(t),i=e.r,n=e.g,a=e.b;return 0===e.opacity?e.toString():Le(e,(299*i+587*n+114*a)/1e3>=128?-.8:.8)}function Le(t,e){var i=t.r,n=t.g,a=t.b,o=e<0?0:255,s=e<0?-1*e:e;return"rgb("+(i=Math.round((o-i)*s)+i)+", "+(n=Math.round((o-n)*s)+n)+", "+(a=Math.round((o-a)*s)+a)+")"}var Se=function(){function t(){this.innerPadding=15,this.emptyColor="rgba(0, 0, 0, 0)",this.animations=!0,this.select=new e.EventEmitter}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){if(this.data.length>2){var t=this.valueFormatting||function(t){return t.value.toLocaleString()},e=this.data.map((function(e){return e&&e.data&&void 0!==e.data.value&&null!==e.data.value?t({data:e.data,label:e?e.data.name:"",value:e&&e.data?e.data.value:""}).length:0})).sort((function(t,e){return e-t})),i=Math.ceil(this.data.length/2);this.medianSize=e[i]}var n=this.getCards();this.cards=n.filter((function(t){return null!==t.data.value})),this.emptySlots=n.filter((function(t){return null===t.data.value}))},t.prototype.getCards=function(){var t=this,e="number"==typeof this.innerPadding?this.innerPadding:this.innerPadding[0]+this.innerPadding[2],i="number"==typeof this.innerPadding?this.innerPadding:this.innerPadding[1]+this.innerPadding[3];return this.data.map((function(n,a){var o=n.data.name;o=o&&"Date"===o.constructor.name?o.toLocaleDateString():o?o.toLocaleString():o;var s=n.data.value,r=o?t.colors.getColor(o):t.emptyColor,l=t.cardColor||r||"#000";return{x:n.x,y:n.y,width:n.width-i,height:n.height-e,color:l,bandColor:t.bandColor||r,textColor:t.textColor||Ie(l),label:o,data:n.data,tooltipText:o+": "+s}}))},t.prototype.trackBy=function(t,e){return e.label},t.prototype.onClick=function(t){this.select.emit(t)},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"slots",void 0),T([e.Input()],t.prototype,"dims",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"innerPadding",void 0),T([e.Input()],t.prototype,"cardColor",void 0),T([e.Input()],t.prototype,"bandColor",void 0),T([e.Input()],t.prototype,"emptyColor",void 0),T([e.Input()],t.prototype,"textColor",void 0),T([e.Input()],t.prototype,"valueFormatting",void 0),T([e.Input()],t.prototype,"labelFormatting",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),t=T([e.Component({selector:"g[ngx-charts-card-series]",template:'\n <svg:rect\n *ngFor="let c of emptySlots; trackBy: trackBy"\n class="card-empty"\n [attr.x]="c.x"\n [attr.y]="c.y"\n [style.fill]="emptyColor"\n [attr.width]="c.width"\n [attr.height]="c.height"\n rx="3"\n ry="3"\n />\n <svg:g\n ngx-charts-card\n *ngFor="let c of cards; trackBy: trackBy"\n [x]="c.x"\n [y]="c.y"\n [width]="c.width"\n [height]="c.height"\n [color]="c.color"\n [bandColor]="c.bandColor"\n [textColor]="c.textColor"\n [data]="c.data"\n [label]="c.label"\n [medianSize]="medianSize"\n [valueFormatting]="valueFormatting"\n [labelFormatting]="labelFormatting"\n [animations]="animations"\n (select)="onClick($event)"\n />\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),De=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.emptyColor="rgba(0, 0, 0, 0)",e.innerPadding=15,e.margin=[10,10,10,10],e}return f(i,t),Object.defineProperty(i.prototype,"clickable",{get:function(){return!!this.select.observers.length},enumerable:!0,configurable:!0}),i.prototype.update=function(){t.prototype.update.call(this),this.dims=At({width:this.width,height:this.height,margins:this.margin}),this.formatDates(),this.domain=this.getDomain(),this.setColors(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")";for(var e=ye(this.dims,this.results.length,150),i=e[0]*e[1],n=this.results.slice();n.length<i;)n.push({value:null});this.data=xe(this.dims,n,150,this.designatedTotal)},i.prototype.getDomain=function(){return this.results.map((function(t){return t.label}))},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.setColors=function(){this.colors=new Lt(this.scheme,"ordinal",this.domain,this.customColors)},T([e.Input()],i.prototype,"cardColor",void 0),T([e.Input()],i.prototype,"bandColor",void 0),T([e.Input()],i.prototype,"emptyColor",void 0),T([e.Input()],i.prototype,"innerPadding",void 0),T([e.Input()],i.prototype,"textColor",void 0),T([e.Input()],i.prototype,"valueFormatting",void 0),T([e.Input()],i.prototype,"labelFormatting",void 0),T([e.Input()],i.prototype,"designatedTotal",void 0),i=T([e.Component({selector:"ngx-charts-number-card",template:'\n <ngx-charts-chart [view]="[width, height]" [showLegend]="false" [animations]="animations">\n <svg:g [attr.transform]="transform" class="number-card chart" [class.clickable]="clickable">\n <svg:g\n ngx-charts-card-series\n [colors]="colors"\n [cardColor]="cardColor"\n [bandColor]="bandColor"\n [textColor]="textColor"\n [emptyColor]="emptyColor"\n [data]="data"\n [dims]="dims"\n [innerPadding]="innerPadding"\n [valueFormatting]="valueFormatting"\n [labelFormatting]="labelFormatting"\n [animations]="animations"\n (select)="onClick($event)"\n />\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}","ngx-charts-number-card .cell .trimmed-label{font-size:12px;pointer-events:none;overflow:hidden;text-align:left;line-height:1em}ngx-charts-number-card .cell .trimmed-label p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%;padding:0;margin:0}ngx-charts-number-card .cell .value-text{pointer-events:none}ngx-charts-number-card .number-card.clickable .cell .card,ngx-charts-number-card .number-card.clickable .cell .card-band{cursor:pointer}"]})],i)}(R),Ce=function(){function t(){}return t=T([e.NgModule({imports:[wt],declarations:[Ae,Se,De],exports:[Ae,Se,De]})],t)}(),Ee=function(){function t(t){this.gradient=!1,this.animations=!0,this.select=new e.EventEmitter,this.initialized=!1,this.element=t.nativeElement}return t.prototype.ngOnChanges=function(){this.update(),this.valueFormatting=this.valueFormatting||function(t){return t.toLocaleString()};var t=this.labelFormatting||function(t){return K(H(t.label,55))},e={data:this.data,label:this.label,value:this.value};this.formattedValue=this.valueFormatting(e.value),this.formattedLabel=t(e),this.gradientId="grad"+et().toString(),this.gradientUrl="url(#"+this.gradientId+")",this.gradientStops=this.getGradientStops()},t.prototype.update=function(){this.initialized?this.animateToCurrentForm():(this.animations&&this.loadAnimation(),this.initialized=!0)},t.prototype.loadAnimation=function(){r.select(this.element).select(".cell").attr("opacity",0).attr("x",this.x).attr("y",this.y),this.animateToCurrentForm()},t.prototype.getTextColor=function(){return Ie(this.fill)},t.prototype.animateToCurrentForm=function(){var t=r.select(this.element).select(".cell");this.animations?t.transition().duration(750).attr("opacity",1).attr("x",this.x).attr("y",this.y).attr("width",this.width).attr("height",this.height):t.attr("opacity",1).attr("x",this.x).attr("y",this.y).attr("width",this.width).attr("height",this.height)},t.prototype.onClick=function(){this.select.emit(this.data)},t.prototype.getGradientStops=function(){return[{offset:0,color:this.fill,opacity:.3},{offset:100,color:this.fill,opacity:1}]},t.ctorParameters=function(){return[{type:e.ElementRef}]},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"fill",void 0),T([e.Input()],t.prototype,"x",void 0),T([e.Input()],t.prototype,"y",void 0),T([e.Input()],t.prototype,"width",void 0),T([e.Input()],t.prototype,"height",void 0),T([e.Input()],t.prototype,"label",void 0),T([e.Input()],t.prototype,"value",void 0),T([e.Input()],t.prototype,"valueType",void 0),T([e.Input()],t.prototype,"valueFormatting",void 0),T([e.Input()],t.prototype,"labelFormatting",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),t=T([e.Component({selector:"g[ngx-charts-tree-map-cell]",template:'\n <svg:g>\n <defs *ngIf="gradient">\n <svg:g ngx-charts-svg-linear-gradient orientation="vertical" [name]="gradientId" [stops]="gradientStops" />\n </defs>\n <svg:rect\n [attr.fill]="gradient ? gradientUrl : fill"\n [attr.width]="width"\n [attr.height]="height"\n [attr.x]="x"\n [attr.y]="y"\n [style.cursor]="\'pointer\'"\n class="cell"\n (click)="onClick()"\n />\n <svg:foreignObject\n *ngIf="width >= 70 && height >= 35"\n [attr.x]="x"\n [attr.y]="y"\n [attr.width]="width"\n [attr.height]="height"\n class="treemap-label"\n [style.pointer-events]="\'none\'"\n >\n <xhtml:p [style.color]="getTextColor()" [style.height]="height + \'px\'" [style.width]="width + \'px\'">\n <xhtml:span class="treemap-label" [innerHTML]="formattedLabel"> </xhtml:span>\n <xhtml:br />\n <xhtml:span\n *ngIf="animations"\n class="treemap-val"\n ngx-charts-count-up\n [countTo]="value"\n [valueFormatting]="valueFormatting"\n >\n </xhtml:span>\n <xhtml:span *ngIf="!animations" class="treemap-val">\n {{ formattedValue }}\n </xhtml:span>\n </xhtml:p>\n </svg:foreignObject>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Oe=function(){function t(){this.gradient=!1,this.tooltipDisabled=!1,this.animations=!0,this.select=new e.EventEmitter}return t.prototype.ngOnChanges=function(t){this.cells=this.getCells()},t.prototype.getCells=function(){var t=this;return this.data.children.filter((function(t){return 1===t.depth})).map((function(e,i){var n=e.id;return{data:e.data,x:e.x0,y:e.y0,width:e.x1-e.x0,height:e.y1-e.y0,fill:t.colors.getColor(n),label:n,value:e.value,valueType:e.valueType}}))},t.prototype.getTooltipText=function(t){var e=t.label,i=t.value;return'\n <span class="tooltip-label">'+K(e)+'</span>\n <span class="tooltip-val">'+i.toLocaleString()+"</span>\n "},t.prototype.onClick=function(t){this.select.emit(t)},t.prototype.trackBy=function(t,e){return e.label},T([e.Input()],t.prototype,"data",void 0),T([e.Input()],t.prototype,"dims",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"valueFormatting",void 0),T([e.Input()],t.prototype,"labelFormatting",void 0),T([e.Input()],t.prototype,"gradient",void 0),T([e.Input()],t.prototype,"tooltipDisabled",void 0),T([e.Input()],t.prototype,"tooltipTemplate",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),t=T([e.Component({selector:"g[ngx-charts-tree-map-cell-series]",template:'\n <svg:g\n ngx-charts-tree-map-cell\n *ngFor="let c of cells; trackBy: trackBy"\n [data]="c.data"\n [x]="c.x"\n [y]="c.y"\n [width]="c.width"\n [height]="c.height"\n [fill]="c.fill"\n [label]="c.label"\n [value]="c.value"\n [valueType]="c.valueType"\n [valueFormatting]="valueFormatting"\n [labelFormatting]="labelFormatting"\n [gradient]="gradient"\n [animations]="animations"\n (select)="onClick($event)"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="\'top\'"\n [tooltipType]="\'tooltip\'"\n [tooltipTitle]="tooltipTemplate ? undefined : getTooltipText(c)"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="c.data"\n ></svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Me=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.tooltipDisabled=!1,i.gradient=!1,i.select=new e.EventEmitter,i.margin=[10,10,10,10],i}return f(i,t),i.prototype.update=function(){t.prototype.update.call(this),this.dims=At({width:this.width,height:this.height,margins:this.margin}),this.domain=this.getDomain(),this.treemap=m.treemap().size([this.dims.width,this.dims.height]);var e=m.stratify().id((function(t){var e=t.name;return e="Date"===e.constructor.name?e.toLocaleDateString():e.toLocaleString()})).parentId((function(t){return t.isRoot?null:"root"}))(A([{name:"root",value:0,isRoot:!0}],this.results)).sum((function(t){return t.value}));this.data=this.treemap(e),this.setColors(),this.transform="translate("+this.dims.xOffset+" , "+this.margin[0]+")"},i.prototype.getDomain=function(){return this.results.map((function(t){return t.name}))},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.setColors=function(){this.colors=new Lt(this.scheme,"ordinal",this.domain,this.customColors)},T([e.Input()],i.prototype,"results",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"valueFormatting",void 0),T([e.Input()],i.prototype,"labelFormatting",void 0),T([e.Input()],i.prototype,"gradient",void 0),T([e.Output()],i.prototype,"select",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),i=T([e.Component({selector:"ngx-charts-tree-map",template:'\n <ngx-charts-chart [view]="[width, height]" [showLegend]="false" [animations]="animations">\n <svg:g [attr.transform]="transform" class="tree-map chart">\n <svg:g\n ngx-charts-tree-map-cell-series\n [colors]="colors"\n [data]="data"\n [dims]="dims"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [valueFormatting]="valueFormatting"\n [labelFormatting]="labelFormatting"\n [gradient]="gradient"\n [animations]="animations"\n (select)="onClick($event)"\n />\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".tree-map .treemap-val{font-size:1.3em;padding-top:5px;display:inline-block}.tree-map .treemap-label p{display:table-cell;text-align:center;line-height:1.2em;vertical-align:middle}"]})],i)}(R),Fe=function(){function t(){}return t=T([e.NgModule({imports:[wt],declarations:[Ee,Oe,Me],exports:[Ee,Oe,Me]})],t)}(),Pe=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.min=0,e.max=100,e.value=0,e.margin=[10,20,10,20],e.valueResizeScale=1,e.unitsResizeScale=1,e.valueTextTransform="",e.valueTranslate="",e.unitsTextTransform="",e.unitsTranslate="",e}return f(i,t),i.prototype.ngAfterViewInit=function(){var e=this;t.prototype.ngAfterViewInit.call(this),setTimeout((function(){e.scaleText("value"),e.scaleText("units")}))},i.prototype.update=function(){var e=this;t.prototype.update.call(this),this.hasPreviousValue=void 0!==this.previousValue,this.max=Math.max(this.max,this.value),this.min=Math.min(this.min,this.value),this.hasPreviousValue&&(this.max=Math.max(this.max,this.previousValue),this.min=Math.min(this.min,this.previousValue)),this.dims=At({width:this.width,height:this.height,margins:this.margin}),this.valueDomain=this.getValueDomain(),this.valueScale=this.getValueScale(),this.displayValue=this.getDisplayValue(),this.setColors();var i=this.margin[3]+this.dims.width/2,n=this.margin[0]+this.dims.height/2;this.transform="translate("+i+", "+n+")",this.transformLine="translate("+(this.margin[3]+this.valueScale(this.previousValue))+", "+n+")",this.valueTranslate="translate(0, -15)",this.unitsTranslate="translate(0, 15)",setTimeout((function(){return e.scaleText("value")}),50),setTimeout((function(){return e.scaleText("units")}),50)},i.prototype.getValueDomain=function(){return[this.min,this.max]},i.prototype.getValueScale=function(){return c.scaleLinear().range([0,this.dims.width]).domain(this.valueDomain)},i.prototype.getDisplayValue=function(){return this.valueFormatting?this.valueFormatting(this.value):this.value.toLocaleString()},i.prototype.scaleText=function(t,e){var i,n,a=this;void 0===e&&(e=!0),"value"===t?(i=this.valueTextEl,n=this.valueResizeScale):(i=this.unitsTextEl,n=this.unitsResizeScale);var o=i.nativeElement.getBoundingClientRect(),s=o.width,r=o.height;if(0!==s&&0!==r){var l=n,c=this.dims.width,h=Math.max(this.dims.height/2-15,0),p=Math.floor(c/(s/n)*100)/100,d=Math.floor(h/(r/n)*100)/100;(n=Math.min(d,p))!==l&&("value"===t?(this.valueResizeScale=n,this.valueTextTransform="scale("+n+", "+n+")"):(this.unitsResizeScale=n,this.unitsTextTransform="scale("+n+", "+n+")"),this.cd.markForCheck(),e&&setTimeout((function(){a.scaleText(t,!1)}),50))}},i.prototype.onClick=function(){this.select.emit({name:"Value",value:this.value})},i.prototype.setColors=function(){this.colors=new Lt(this.scheme,"ordinal",[this.value],this.customColors)},T([e.Input()],i.prototype,"min",void 0),T([e.Input()],i.prototype,"max",void 0),T([e.Input()],i.prototype,"value",void 0),T([e.Input()],i.prototype,"units",void 0),T([e.Input()],i.prototype,"previousValue",void 0),T([e.Input()],i.prototype,"valueFormatting",void 0),T([e.ViewChild("valueTextEl")],i.prototype,"valueTextEl",void 0),T([e.ViewChild("unitsTextEl")],i.prototype,"unitsTextEl",void 0),i=T([e.Component({selector:"ngx-charts-linear-gauge",template:'\n <ngx-charts-chart [view]="[width, height]" [showLegend]="false" [animations]="animations" (click)="onClick()">\n <svg:g class="linear-gauge chart">\n <svg:g\n ngx-charts-bar\n class="background-bar"\n [width]="dims.width"\n [height]="3"\n [x]="margin[3]"\n [y]="dims.height / 2 + margin[0] - 2"\n [data]="{}"\n [orientation]="\'horizontal\'"\n [roundEdges]="true"\n [animations]="animations"\n ></svg:g>\n <svg:g\n ngx-charts-bar\n [width]="valueScale(value)"\n [height]="3"\n [x]="margin[3]"\n [y]="dims.height / 2 + margin[0] - 2"\n [fill]="colors.getColor(units)"\n [data]="{}"\n [orientation]="\'horizontal\'"\n [roundEdges]="true"\n [animations]="animations"\n ></svg:g>\n\n <svg:line\n *ngIf="hasPreviousValue"\n [attr.transform]="transformLine"\n x1="0"\n y1="5"\n x2="0"\n y2="15"\n [attr.stroke]="colors.getColor(units)"\n />\n\n <svg:line\n *ngIf="hasPreviousValue"\n [attr.transform]="transformLine"\n x1="0"\n y1="-5"\n x2="0"\n y2="-15"\n [attr.stroke]="colors.getColor(units)"\n />\n\n <svg:g [attr.transform]="transform">\n <svg:g [attr.transform]="valueTranslate">\n <svg:text\n #valueTextEl\n class="value"\n [style.textAnchor]="\'middle\'"\n [attr.transform]="valueTextTransform"\n alignment-baseline="after-edge"\n >\n {{ displayValue }}\n </svg:text>\n </svg:g>\n\n <svg:g [attr.transform]="unitsTranslate">\n <svg:text\n #unitsTextEl\n class="units"\n [style.textAnchor]="\'middle\'"\n [attr.transform]="unitsTextTransform"\n alignment-baseline="before-edge"\n >\n {{ units }}\n </svg:text>\n </svg:g>\n </svg:g>\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}",".linear-gauge{cursor:pointer}.linear-gauge .background-bar path{fill:rgba(0,0,0,.05)}.linear-gauge .units{fill:#666}"]})],i)}(R),Xe=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.legend=!1,i.legendTitle="Legend",i.legendPosition="right",i.min=0,i.max=100,i.bigSegments=10,i.smallSegments=5,i.showAxis=!0,i.startAngle=-120,i.angleSpan=240,i.activeEntries=[],i.tooltipDisabled=!1,i.showText=!0,i.activate=new e.EventEmitter,i.deactivate=new e.EventEmitter,i.resizeScale=1,i.rotation="",i.textTransform="scale(1, 1)",i.cornerRadius=10,i}return f(i,t),i.prototype.ngAfterViewInit=function(){var e=this;t.prototype.ngAfterViewInit.call(this),setTimeout((function(){return e.scaleText()}))},i.prototype.update=function(){var e=this;t.prototype.update.call(this),this.showAxis?this.margin||(this.margin=[60,100,60,100]):this.margin||(this.margin=[10,20,10,20]),this.startAngle<0&&(this.startAngle=this.startAngle%360+360),this.angleSpan=Math.min(this.angleSpan,360),this.dims=At({width:this.width,height:this.height,margins:this.margin,showLegend:this.legend,legendPosition:this.legendPosition}),this.domain=this.getDomain(),this.valueDomain=this.getValueDomain(),this.valueScale=this.getValueScale(),this.displayValue=this.getDisplayValue(),this.outerRadius=Math.min(this.dims.width,this.dims.height)/2,this.arcs=this.getArcs(),this.setColors(),this.legendOptions=this.getLegendOptions();var i=this.margin[3]+this.dims.width/2,n=this.margin[0]+this.dims.height/2;this.transform="translate("+i+", "+n+")",this.rotation="rotate("+this.startAngle+")",setTimeout((function(){return e.scaleText()}),50)},i.prototype.getArcs=function(){var t,e,i=[],n=.7*this.outerRadius,a=Math.min(n/this.results.length,10),o=.7*a;this.textRadius=this.outerRadius-this.results.length*a,this.cornerRadius=Math.floor(o/2);var s=0;try{for(var r=k(this.results),l=r.next();!l.done;l=r.next()){var c=l.value,h=this.outerRadius-s*a,p=h-o,d={backgroundArc:{endAngle:this.angleSpan*Math.PI/180,innerRadius:p,outerRadius:h,data:{value:this.max,name:c.name}},valueArc:{endAngle:Math.min(this.valueScale(c.value),this.angleSpan)*Math.PI/180,innerRadius:p,outerRadius:h,data:{value:c.value,name:c.name}}};i.push(d),s++}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return i},i.prototype.getDomain=function(){return this.results.map((function(t){return t.name}))},i.prototype.getValueDomain=function(){var t=this.results.map((function(t){return t.value})),e=Math.min.apply(Math,A(t)),i=Math.max.apply(Math,A(t));return void 0!==this.min?this.min=Math.min(this.min,e):this.min=e,void 0!==this.max?this.max=Math.max(this.max,i):this.max=i,[this.min,this.max]},i.prototype.getValueScale=function(){return c.scaleLinear().range([0,this.angleSpan]).nice().domain(this.valueDomain)},i.prototype.getDisplayValue=function(){var t=this.results.map((function(t){return t.value})).reduce((function(t,e){return t+e}),0);return this.textValue&&0!==this.textValue.length?this.textValue.toLocaleString():this.valueFormatting?this.valueFormatting(t):t.toLocaleString()},i.prototype.scaleText=function(t){var e=this;if(void 0===t&&(t=!0),this.showText){var i=this.textEl.nativeElement.getBoundingClientRect().width,n=this.resizeScale;if(0===i)this.resizeScale=1;else{var a=this.textRadius;this.resizeScale=Math.floor(a/(i/this.resizeScale)*100)/100}this.resizeScale!==n&&(this.textTransform="scale("+this.resizeScale+", "+this.resizeScale+")",this.cd.markForCheck(),t&&setTimeout((function(){return e.scaleText(!1)}),50))}},i.prototype.onClick=function(t){this.select.emit(t)},i.prototype.getLegendOptions=function(){return{scaleType:"ordinal",colors:this.colors,domain:this.domain,title:this.legendTitle,position:this.legendPosition}},i.prototype.setColors=function(){this.colors=new Lt(this.scheme,"ordinal",this.domain,this.customColors)},i.prototype.onActivate=function(t){this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}))>-1||(this.activeEntries=A([t],this.activeEntries),this.activate.emit({value:t,entries:this.activeEntries}))},i.prototype.onDeactivate=function(t){var e=this.activeEntries.findIndex((function(e){return e.name===t.name&&e.value===t.value}));this.activeEntries.splice(e,1),this.activeEntries=A(this.activeEntries),this.deactivate.emit({value:t,entries:this.activeEntries})},i.prototype.isActive=function(t){return!!this.activeEntries&&void 0!==this.activeEntries.find((function(e){return t.name===e.name&&t.series===e.series}))},i.prototype.trackBy=function(t,e){return e.valueArc.data.name},T([e.Input()],i.prototype,"legend",void 0),T([e.Input()],i.prototype,"legendTitle",void 0),T([e.Input()],i.prototype,"legendPosition",void 0),T([e.Input()],i.prototype,"min",void 0),T([e.Input()],i.prototype,"max",void 0),T([e.Input()],i.prototype,"textValue",void 0),T([e.Input()],i.prototype,"units",void 0),T([e.Input()],i.prototype,"bigSegments",void 0),T([e.Input()],i.prototype,"smallSegments",void 0),T([e.Input()],i.prototype,"results",void 0),T([e.Input()],i.prototype,"showAxis",void 0),T([e.Input()],i.prototype,"startAngle",void 0),T([e.Input()],i.prototype,"angleSpan",void 0),T([e.Input()],i.prototype,"activeEntries",void 0),T([e.Input()],i.prototype,"axisTickFormatting",void 0),T([e.Input()],i.prototype,"tooltipDisabled",void 0),T([e.Input()],i.prototype,"valueFormatting",void 0),T([e.Input()],i.prototype,"showText",void 0),T([e.Input()],i.prototype,"margin",void 0),T([e.Output()],i.prototype,"activate",void 0),T([e.Output()],i.prototype,"deactivate",void 0),T([e.ContentChild("tooltipTemplate")],i.prototype,"tooltipTemplate",void 0),T([e.ViewChild("textEl")],i.prototype,"textEl",void 0),i=T([e.Component({selector:"ngx-charts-gauge",template:'\n <ngx-charts-chart\n [view]="[width, height]"\n [showLegend]="legend"\n [legendOptions]="legendOptions"\n [activeEntries]="activeEntries"\n [animations]="animations"\n (legendLabelClick)="onClick($event)"\n (legendLabelActivate)="onActivate($event)"\n (legendLabelDeactivate)="onDeactivate($event)"\n >\n <svg:g [attr.transform]="transform" class="gauge chart">\n <svg:g *ngFor="let arc of arcs; trackBy: trackBy" [attr.transform]="rotation">\n <svg:g\n ngx-charts-gauge-arc\n [backgroundArc]="arc.backgroundArc"\n [valueArc]="arc.valueArc"\n [cornerRadius]="cornerRadius"\n [colors]="colors"\n [isActive]="isActive(arc.valueArc.data)"\n [tooltipDisabled]="tooltipDisabled"\n [tooltipTemplate]="tooltipTemplate"\n [valueFormatting]="valueFormatting"\n [animations]="animations"\n (select)="onClick($event)"\n (activate)="onActivate($event)"\n (deactivate)="onDeactivate($event)"\n ></svg:g>\n </svg:g>\n\n <svg:g\n ngx-charts-gauge-axis\n *ngIf="showAxis"\n [bigSegments]="bigSegments"\n [smallSegments]="smallSegments"\n [min]="min"\n [max]="max"\n [radius]="outerRadius"\n [angleSpan]="angleSpan"\n [valueScale]="valueScale"\n [startAngle]="startAngle"\n [tickFormatting]="axisTickFormatting"\n ></svg:g>\n\n <svg:text\n #textEl\n *ngIf="showText"\n [style.textAnchor]="\'middle\'"\n [attr.transform]="textTransform"\n alignment-baseline="central"\n >\n <tspan x="0" dy="0">{{ displayValue }}</tspan>\n <tspan x="0" dy="1.2em">{{ units }}</tspan>\n </svg:text>\n </svg:g>\n </ngx-charts-chart>\n ',encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}",".gauge .background-arc path{fill:rgba(0,0,0,.05)}.gauge .gauge-tick path{stroke:#666}.gauge .gauge-tick text{font-size:12px;fill:#666;font-weight:700}.gauge .gauge-tick-large path{stroke-width:2px}.gauge .gauge-tick-small path{stroke-width:1px}"]})],i)}(R),Ye=function(){function t(){this.isActive=!1,this.tooltipDisabled=!1,this.animations=!0,this.select=new e.EventEmitter,this.activate=new e.EventEmitter,this.deactivate=new e.EventEmitter}return t.prototype.tooltipText=function(t){var e,i=Q(t.data.name);return e=this.valueFormatting?this.valueFormatting(t.data.value):Q(t.data.value),'\n <span class="tooltip-label">'+K(i)+'</span>\n <span class="tooltip-val">'+e+"</span>\n "},T([e.Input()],t.prototype,"backgroundArc",void 0),T([e.Input()],t.prototype,"valueArc",void 0),T([e.Input()],t.prototype,"cornerRadius",void 0),T([e.Input()],t.prototype,"colors",void 0),T([e.Input()],t.prototype,"isActive",void 0),T([e.Input()],t.prototype,"tooltipDisabled",void 0),T([e.Input()],t.prototype,"valueFormatting",void 0),T([e.Input()],t.prototype,"tooltipTemplate",void 0),T([e.Input()],t.prototype,"animations",void 0),T([e.Output()],t.prototype,"select",void 0),T([e.Output()],t.prototype,"activate",void 0),T([e.Output()],t.prototype,"deactivate",void 0),t=T([e.Component({selector:"g[ngx-charts-gauge-arc]",template:'\n <svg:g\n ngx-charts-pie-arc\n class="background-arc"\n [startAngle]="0"\n [endAngle]="backgroundArc.endAngle"\n [innerRadius]="backgroundArc.innerRadius"\n [outerRadius]="backgroundArc.outerRadius"\n [cornerRadius]="cornerRadius"\n [data]="backgroundArc.data"\n [animate]="false"\n [pointerEvents]="false"\n ></svg:g>\n <svg:g\n ngx-charts-pie-arc\n [startAngle]="0"\n [endAngle]="valueArc.endAngle"\n [innerRadius]="valueArc.innerRadius"\n [outerRadius]="valueArc.outerRadius"\n [cornerRadius]="cornerRadius"\n [fill]="colors.getColor(valueArc.data.name)"\n [data]="valueArc.data"\n [animate]="animations"\n [isActive]="isActive"\n (select)="select.emit($event)"\n (activate)="activate.emit($event)"\n (deactivate)="deactivate.emit($event)"\n ngx-tooltip\n [tooltipDisabled]="tooltipDisabled"\n [tooltipPlacement]="\'top\'"\n [tooltipType]="\'tooltip\'"\n [tooltipTitle]="tooltipTemplate ? undefined : tooltipText(valueArc)"\n [tooltipTemplate]="tooltipTemplate"\n [tooltipContext]="valueArc.data"\n ></svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),Re=function(){function t(){this.rotate=""}return t.prototype.ngOnChanges=function(t){this.update()},t.prototype.update=function(){this.rotationAngle=-90+this.startAngle,this.rotate="rotate("+this.rotationAngle+")",this.ticks=this.getTicks()},t.prototype.getTicks=function(){for(var t=this.angleSpan/this.bigSegments,e=t/this.smallSegments,i={big:[],small:[]},n=this.radius+10,a=n+20+10,o=0;o<=this.bigSegments;o++){var s=o*t,r=s*Math.PI/180,l=this.getTextAnchor(s),c=!1;if(0===o&&360===this.angleSpan&&(c=!0),!c){var h=Number.parseFloat(this.valueScale.invert(s).toString()).toLocaleString();this.tickFormatting&&(h=this.tickFormatting(h)),i.big.push({line:this.getTickPath(n,20,r),textAnchor:l,text:h,textTransform:"\n translate("+a*Math.cos(r)+", "+a*Math.sin(r)+") rotate("+-this.rotationAngle+")\n "})}if(o!==this.bigSegments)for(var p=1;p<=this.smallSegments;p++){var d=(s+p*e)*Math.PI/180;i.small.push({line:this.getTickPath(n,10,d)})}}return i},t.prototype.getTextAnchor=function(t){var e="middle";return(t=(this.startAngle+t)%360)>45&&t<=135?e="start":t>225&&t<=315&&(e="end"),e},t.prototype.getTickPath=function(t,e,i){var n=t*Math.sin(i),a=(t+e)*Math.sin(i),o=[{x:t*Math.cos(i),y:n},{x:(t+e)*Math.cos(i),y:a}];return p.line().x((function(t){return t.x})).y((function(t){return t.y}))(o)},T([e.Input()],t.prototype,"bigSegments",void 0),T([e.Input()],t.prototype,"smallSegments",void 0),T([e.Input()],t.prototype,"min",void 0),T([e.Input()],t.prototype,"max",void 0),T([e.Input()],t.prototype,"angleSpan",void 0),T([e.Input()],t.prototype,"startAngle",void 0),T([e.Input()],t.prototype,"radius",void 0),T([e.Input()],t.prototype,"valueScale",void 0),T([e.Input()],t.prototype,"tickFormatting",void 0),t=T([e.Component({selector:"g[ngx-charts-gauge-axis]",template:'\n <svg:g [attr.transform]="rotate">\n <svg:g *ngFor="let tick of ticks.big" class="gauge-tick gauge-tick-large">\n <svg:path [attr.d]="tick.line" />\n </svg:g>\n <svg:g *ngFor="let tick of ticks.big" class="gauge-tick gauge-tick-large">\n <svg:text\n [style.textAnchor]="tick.textAnchor"\n [attr.transform]="tick.textTransform"\n alignment-baseline="central"\n >\n {{ tick.text }}\n </svg:text>\n </svg:g>\n <svg:g *ngFor="let tick of ticks.small" class="gauge-tick gauge-tick-small">\n <svg:path [attr.d]="tick.line" />\n </svg:g>\n </svg:g>\n ',changeDetection:e.ChangeDetectionStrategy.OnPush})],t)}(),ze=function(){function t(){}return t=T([e.NgModule({imports:[wt,ke,Ut],declarations:[Pe,Xe,Ye,Re],exports:[Pe,Xe,Ye,Re]})],t)}();var He=function(){function t(){"undefined"!=typeof SVGElement&&void 0===SVGElement.prototype.contains&&(SVGElement.prototype.contains=HTMLDivElement.prototype.contains)}return t=T([e.NgModule({exports:[wt,Rt,Ut,ee,oe,ce,we,Ce,ke,Fe,ze]})],t)}();t.AdvancedLegendComponent=Tt,t.AdvancedPieChartComponent=ge,t.AreaChartComponent=Ct,t.AreaChartModule=Rt,t.AreaChartNormalizedComponent=Et,t.AreaChartStackedComponent=Ot,t.AreaComponent=lt,t.AreaSeriesComponent=Yt,t.AxesModule=q,t.AxisLabelComponent=z,t.BarChartModule=Ut,t.BarComponent=zt,t.BarHorizontal2DComponent=Wt,t.BarHorizontalComponent=Ht,t.BarHorizontalNormalizedComponent=Bt,t.BarHorizontalStackedComponent=Vt,t.BarLabelComponent=qt,t.BarVertical2DComponent=$t,t.BarVerticalComponent=Gt,t.BarVerticalNormalizedComponent=Nt,t.BarVerticalStackedComponent=jt,t.BaseChartComponent=R,t.BubbleChartComponent=Kt,t.BubbleChartModule=ee,t.BubbleSeriesComponent=te,t.CardComponent=Ae,t.CardSeriesComponent=Se,t.ChartCommonModule=wt,t.ChartComponent=X,t.CircleComponent=nt,t.CircleSeriesComponent=it,t.ColorHelper=Lt,t.CountUpDirective=gt,t.GaugeArcComponent=Ye,t.GaugeAxisComponent=Re,t.GaugeComponent=Xe,t.GaugeModule=ze,t.GridPanelComponent=at,t.GridPanelSeriesComponent=ot,t.HeatCellSeriesComponent=ne,t.HeatMapCellComponent=ie,t.HeatMapComponent=ae,t.HeatMapModule=oe,t.LegendComponent=xt,t.LegendEntryComponent=ft,t.LineChartComponent=re,t.LineChartModule=ce,t.LineComponent=se,t.LineSeriesComponent=le,t.LinearGaugeComponent=Pe,t.NgxChartsModule=He,t.NumberCardComponent=De,t.NumberCardModule=Ce,t.PieArcComponent=ve,t.PieChartComponent=me,t.PieChartModule=ke,t.PieGridComponent=fe,t.PieGridSeriesComponent=be,t.PieLabelComponent=ue,t.PieSeriesComponent=Te,t.PolarChartComponent=pe,t.PolarChartModule=we,t.PolarSeriesComponent=de,t.ScaleLegendComponent=bt,t.SeriesHorizontal=_t,t.SeriesVerticalComponent=Zt,t.SvgLinearGradientComponent=st,t.SvgRadialGradientComponent=rt,t.Timeline=yt,t.TooltipArea=mt,t.TooltipContentComponent=M,t.TooltipDirective=U,t.TooltipModule=J,t.TooltipService=P,t.TreeMapCellComponent=Ee,t.TreeMapCellSeriesComponent=Oe,t.TreeMapComponent=Me,t.TreeMapModule=Fe,t.VisibilityObserver=Y,t.XAxisComponent=V,t.XAxisTicksComponent=B,t.YAxisComponent=_,t.YAxisTicksComponent=Z,t.calculateViewDimensions=At,t.colorSets=It,t.count=ht,t.decimalChecker=pt,t.escapeLabel=K,t.formatLabel=Q,t.getDomain=Jt,t.getScale=Qt,t.getScaleType=Dt,t.getUniqueXDomainValues=St,t.gridLayout=xe,t.gridSize=ye,t.hexToRgb=function(t){return v.rgb(t)},t.id=et,t.invertColor=Ie,t.reduceTicks=W,t.shadeRGBColor=Le,t.sortByDomain=Ft,t.sortByTime=Pt,t.sortLinear=Mt,t.throttle=S,t.throttleable=D,t.tickFormat=function(t,e){return function(i){return"No Value"===i||"Other"===i?i:"date"===t&&"groupBy"===e?y.timeFormat("MM/DD/YYYY")(i):i.toString()}},t.trimLabel=H,t.ɵa=F,t.ɵb=L,Object.defineProperty(t,"__esModule",{value:!0})}));
16
16
  //# sourceMappingURL=swimlane-ngx-charts.umd.min.js.map