{"version":3,"sources":["src/app/shared/pipes/moment.pipe.ts","node_modules/.pnpm/@angular+animations@19.2.1_@angular+core@19.2.1_rxjs@7.8.2_zone.js@0.15.0_/node_modules/@angular/animations/fesm2022/animations.mjs","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/namespaces.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/namespace.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/creator.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selector.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/select.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/array.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selectorAll.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectAll.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/matcher.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectChild.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectChildren.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/filter.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/sparse.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/enter.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/constant.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/data.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/exit.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/join.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/merge.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/order.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/sort.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/call.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/nodes.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/node.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/size.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/empty.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/each.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/attr.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/window.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/style.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/property.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/classed.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/text.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/html.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/raise.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/lower.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/append.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/insert.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/remove.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/clone.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/datum.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/on.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/dispatch.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/iterator.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/index.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/select.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/sourceEvent.js","node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/pointer.js","node_modules/.pnpm/d3-dispatch@3.0.1/node_modules/d3-dispatch/src/dispatch.js","node_modules/.pnpm/d3-drag@3.0.0/node_modules/d3-drag/src/noevent.js","node_modules/.pnpm/d3-drag@3.0.0/node_modules/d3-drag/src/nodrag.js","node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/define.js","node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/color.js","node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/basis.js","node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/basisClosed.js","node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/constant.js","node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/color.js","node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js","node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/numberArray.js","node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/array.js","node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/date.js","node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/number.js","node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/object.js","node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js","node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/value.js","node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/round.js","node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/decompose.js","node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/parse.js","node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/index.js","node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.js","node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timeout.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/schedule.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/interrupt.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/interrupt.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/tween.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/interpolate.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attr.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attrTween.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/delay.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/duration.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/ease.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/easeVarying.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/filter.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/merge.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/on.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/remove.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/select.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selectAll.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selection.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/style.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/styleTween.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/text.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/textTween.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/transition.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/end.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/index.js","node_modules/.pnpm/d3-ease@3.0.1/node_modules/d3-ease/src/cubic.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/transition.js","node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js","node_modules/.pnpm/d3-brush@3.0.0/node_modules/d3-brush/src/constant.js","node_modules/.pnpm/d3-brush@3.0.0/node_modules/d3-brush/src/event.js","node_modules/.pnpm/d3-brush@3.0.0/node_modules/d3-brush/src/noevent.js","node_modules/.pnpm/d3-brush@3.0.0/node_modules/d3-brush/src/brush.js","node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/ascending.js","node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/descending.js","node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/bisector.js","node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/number.js","node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/bisect.js","node_modules/.pnpm/internmap@2.0.3/node_modules/internmap/src/index.js","node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/ticks.js","node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/quantile.js","node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/range.js","node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/init.js","node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/ordinal.js","node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/band.js","node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/constant.js","node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/number.js","node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/continuous.js","node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatDecimal.js","node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/exponent.js","node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatGroup.js","node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatNumerals.js","node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatSpecifier.js","node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatTrim.js","node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatPrefixAuto.js","node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatRounded.js","node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/formatTypes.js","node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/identity.js","node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/locale.js","node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/defaultLocale.js","node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/precisionFixed.js","node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/precisionPrefix.js","node_modules/.pnpm/d3-format@3.1.0/node_modules/d3-format/src/precisionRound.js","node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/tickFormat.js","node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/linear.js","node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/nice.js","node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/quantile.js","node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/interval.js","node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/millisecond.js","node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/second.js","node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/minute.js","node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/hour.js","node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/day.js","node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/week.js","node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/month.js","node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/year.js","node_modules/.pnpm/d3-time@3.1.0/node_modules/d3-time/src/ticks.js","node_modules/.pnpm/d3-time-format@4.1.0/node_modules/d3-time-format/src/locale.js","node_modules/.pnpm/d3-time-format@4.1.0/node_modules/d3-time-format/src/defaultLocale.js","node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/time.js","node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/constant.js","node_modules/.pnpm/d3-path@3.1.0/node_modules/d3-path/src/path.js","node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/path.js","node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/array.js","node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/linear.js","node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/point.js","node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/line.js","node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/area.js","node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/monotone.js","node_modules/.pnpm/@swimlane+ngx-charts@21.1.3_336b5ac6cf75df76d6700d0490d616c7/node_modules/@swimlane/ngx-charts/fesm2022/swimlane-ngx-charts.mjs","src/app/shared/pipes/sort-desc.pipe.ts","src/app/shared/scoreboard-history-modal/scoreboard-history-modal.component.ts","src/app/shared/scoreboard-history-modal/scoreboard-history-modal.component.html","src/app/shared/scoreboard/teams-scoreboard/teams-scoreboard.component.ts","src/app/shared/scoreboard/teams-scoreboard/teams-scoreboard.component.html"],"sourcesContent":["import { ChangeDetectorRef, OnDestroy, Pipe, PipeTransform } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { DateTime } from 'luxon';\nimport { Subscription } from 'rxjs';\n\ntype DateTimeFormat = 'fromNow' | 'DATETIME_FULL' | 'DATETIME_SHORT' | 'TIME_SIMPLE' | 'DATE_SHORT' | 'DATETIME_MED' | 'DATE_HUGE';\n\n@Pipe({\n name: 'moment',\n pure: false,\n})\nexport class MomentPipe implements PipeTransform, OnDestroy {\n onTranslationChange: Subscription;\n onLangChange: Subscription;\n onDefaultLangChange: Subscription;\n\n private _value: string;\n\n constructor(\n private changeDetector: ChangeDetectorRef,\n private translate: TranslateService,\n ) {}\n\n private updateValue(value: any, format: DateTimeFormat): string {\n if (!value) {\n this._value = value;\n return;\n }\n const m = DateTime.fromISO(value);\n if (m.isValid) {\n switch (format) {\n case 'fromNow':\n this._value = m.toRelative();\n break;\n\n case 'DATETIME_FULL':\n // September 4, 1986 8:30 PM\n this._value = m.toLocaleString(DateTime.DATETIME_FULL);\n break;\n\n case 'DATETIME_SHORT':\n // 9/4/1986 8:30 PM\n this._value = m.toLocaleString(DateTime.DATETIME_SHORT);\n break;\n\n case 'TIME_SIMPLE':\n // 8:30 PM\n this._value = m.toLocaleString(DateTime.TIME_SIMPLE);\n break;\n\n case 'DATE_SHORT':\n // 9/4/1986\n this._value = m.toLocaleString(DateTime.DATE_SHORT);\n break;\n\n case 'DATETIME_MED':\n // September 4, 1986 8:30 PM\n this._value = m.toLocaleString(DateTime.DATETIME_MED);\n break;\n\n case 'DATE_HUGE':\n // September 4, 1986 8:30 PM\n this._value = `${m.toLocaleString(DateTime.DATE_HUGE)}`;\n break;\n }\n } else {\n this._value = `invalid date: ${value}`;\n return;\n }\n }\n\n transform(value: any, format?: DateTimeFormat): any {\n // if there is a subscription to onLangChange, clean it\n this.dispose();\n\n // subscribe to onTranslationChange event, in case the translations change\n if (!this.onTranslationChange) {\n this.onTranslationChange = this.translate.onTranslationChange.subscribe(() => {\n this.changeDetector.markForCheck();\n });\n }\n\n // subscribe to onLangChange event, in case the language changes\n if (!this.onLangChange) {\n this.onLangChange = this.translate.onLangChange.subscribe(() => {\n this.changeDetector.markForCheck();\n });\n }\n\n // subscribe to onDefaultLangChange event, in case the default language changes\n if (!this.onDefaultLangChange) {\n this.onDefaultLangChange = this.translate.onDefaultLangChange.subscribe(() => {\n this.changeDetector.markForCheck();\n });\n }\n this.updateValue(value, format);\n return this._value;\n }\n\n /**\n * Clean any existing subscription to change events\n * @private\n */\n private dispose(): void {\n if (typeof this.onTranslationChange !== 'undefined') {\n this.onTranslationChange.unsubscribe();\n this.onTranslationChange = undefined;\n }\n\n if (typeof this.onLangChange !== 'undefined') {\n this.onLangChange.unsubscribe();\n this.onLangChange = undefined;\n }\n\n if (typeof this.onDefaultLangChange !== 'undefined') {\n this.onDefaultLangChange.unsubscribe();\n this.onDefaultLangChange = undefined;\n }\n }\n ngOnDestroy(): void {\n this.dispose();\n }\n}\n","/**\n * @license Angular v19.2.1\n * (c) 2010-2025 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { inject, Injectable, ANIMATION_MODULE_TYPE, ViewEncapsulation, ɵRuntimeError, Inject } from '@angular/core';\n\n/**\n * @description Constants for the categories of parameters that can be defined for animations.\n *\n * A corresponding function defines a set of parameters for each category, and\n * collects them into a corresponding `AnimationMetadata` object.\n *\n * @publicApi\n */\nvar AnimationMetadataType = /*#__PURE__*/function (AnimationMetadataType) {\n /**\n * Associates a named animation state with a set of CSS styles.\n * See [`state()`](api/animations/state)\n */\n AnimationMetadataType[AnimationMetadataType[\"State\"] = 0] = \"State\";\n /**\n * Data for a transition from one animation state to another.\n * See `transition()`\n */\n AnimationMetadataType[AnimationMetadataType[\"Transition\"] = 1] = \"Transition\";\n /**\n * Contains a set of animation steps.\n * See `sequence()`\n */\n AnimationMetadataType[AnimationMetadataType[\"Sequence\"] = 2] = \"Sequence\";\n /**\n * Contains a set of animation steps.\n * See `{@link /api/animations/group group()}`\n */\n AnimationMetadataType[AnimationMetadataType[\"Group\"] = 3] = \"Group\";\n /**\n * Contains an animation step.\n * See `animate()`\n */\n AnimationMetadataType[AnimationMetadataType[\"Animate\"] = 4] = \"Animate\";\n /**\n * Contains a set of animation steps.\n * See `keyframes()`\n */\n AnimationMetadataType[AnimationMetadataType[\"Keyframes\"] = 5] = \"Keyframes\";\n /**\n * Contains a set of CSS property-value pairs into a named style.\n * See `style()`\n */\n AnimationMetadataType[AnimationMetadataType[\"Style\"] = 6] = \"Style\";\n /**\n * Associates an animation with an entry trigger that can be attached to an element.\n * See `trigger()`\n */\n AnimationMetadataType[AnimationMetadataType[\"Trigger\"] = 7] = \"Trigger\";\n /**\n * Contains a re-usable animation.\n * See `animation()`\n */\n AnimationMetadataType[AnimationMetadataType[\"Reference\"] = 8] = \"Reference\";\n /**\n * Contains data to use in executing child animations returned by a query.\n * See `animateChild()`\n */\n AnimationMetadataType[AnimationMetadataType[\"AnimateChild\"] = 9] = \"AnimateChild\";\n /**\n * Contains animation parameters for a re-usable animation.\n * See `useAnimation()`\n */\n AnimationMetadataType[AnimationMetadataType[\"AnimateRef\"] = 10] = \"AnimateRef\";\n /**\n * Contains child-animation query data.\n * See `query()`\n */\n AnimationMetadataType[AnimationMetadataType[\"Query\"] = 11] = \"Query\";\n /**\n * Contains data for staggering an animation sequence.\n * See `stagger()`\n */\n AnimationMetadataType[AnimationMetadataType[\"Stagger\"] = 12] = \"Stagger\";\n return AnimationMetadataType;\n}(AnimationMetadataType || {});\n/**\n * Specifies automatic styling.\n *\n * @publicApi\n */\nconst AUTO_STYLE = '*';\n/**\n * Creates a named animation trigger, containing a list of [`state()`](api/animations/state)\n * and `transition()` entries to be evaluated when the expression\n * bound to the trigger changes.\n *\n * @param name An identifying string.\n * @param definitions An animation definition object, containing an array of\n * [`state()`](api/animations/state) and `transition()` declarations.\n *\n * @return An object that encapsulates the trigger data.\n *\n * @usageNotes\n * Define an animation trigger in the `animations` section of `@Component` metadata.\n * In the template, reference the trigger by name and bind it to a trigger expression that\n * evaluates to a defined animation state, using the following format:\n *\n * `[@triggerName]=\"expression\"`\n *\n * Animation trigger bindings convert all values to strings, and then match the\n * previous and current values against any linked transitions.\n * Booleans can be specified as `1` or `true` and `0` or `false`.\n *\n * ### Usage Example\n *\n * The following example creates an animation trigger reference based on the provided\n * name value.\n * The provided animation value is expected to be an array consisting of state and\n * transition declarations.\n *\n * ```ts\n * @Component({\n * selector: \"my-component\",\n * templateUrl: \"my-component-tpl.html\",\n * animations: [\n * trigger(\"myAnimationTrigger\", [\n * state(...),\n * state(...),\n * transition(...),\n * transition(...)\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"something\";\n * }\n * ```\n *\n * The template associated with this component makes use of the defined trigger\n * by binding to an element within its template code.\n *\n * ```html\n * \n *
[AnimationBuilder.build](api/animations/AnimationBuilder#build)()
method\n * to create a programmatic animation. The method returns an `AnimationFactory` instance.\n *\n * 2. Use the factory object to create an `AnimationPlayer` and attach it to a DOM element.\n *\n * 3. Use the player object to control the animation programmatically.\n *\n * For example:\n *\n * ```ts\n * // import the service from BrowserAnimationsModule\n * import {AnimationBuilder} from '@angular/animations';\n * // require the service as a dependency\n * class MyCmp {\n * constructor(private _builder: AnimationBuilder) {}\n *\n * makeAnimation(element: any) {\n * // first define a reusable animation\n * const myAnimation = this._builder.build([\n * style({ width: 0 }),\n * animate(1000, style({ width: '100px' }))\n * ]);\n *\n * // use the returned factory object to create a player\n * const player = myAnimation.create(element);\n *\n * player.play();\n * }\n * }\n * ```\n *\n * @publicApi\n */\nlet AnimationBuilder = /*#__PURE__*/(() => {\n class AnimationBuilder {\n static ɵfac = function AnimationBuilder_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || AnimationBuilder)();\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: AnimationBuilder,\n factory: () => (() => inject(BrowserAnimationBuilder))(),\n providedIn: 'root'\n });\n }\n return AnimationBuilder;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * A factory object returned from the\n * [AnimationBuilder.build](api/animations/AnimationBuilder#build)()
\n * method.\n *\n * @publicApi\n */\nclass AnimationFactory {}\nlet BrowserAnimationBuilder = /*#__PURE__*/(() => {\n class BrowserAnimationBuilder extends AnimationBuilder {\n animationModuleType = inject(ANIMATION_MODULE_TYPE, {\n optional: true\n });\n _nextAnimationId = 0;\n _renderer;\n constructor(rootRenderer, doc) {\n super();\n const typeData = {\n id: '0',\n encapsulation: ViewEncapsulation.None,\n styles: [],\n data: {\n animation: []\n }\n };\n this._renderer = rootRenderer.createRenderer(doc.body, typeData);\n if (this.animationModuleType === null && !isAnimationRenderer(this._renderer)) {\n // We only support AnimationRenderer & DynamicDelegationRenderer for this AnimationBuilder\n throw new ɵRuntimeError(3600 /* RuntimeErrorCode.BROWSER_ANIMATION_BUILDER_INJECTED_WITHOUT_ANIMATIONS */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Angular detected that the `AnimationBuilder` was injected, but animation support was not enabled. ' + 'Please make sure that you enable animations in your application by calling `provideAnimations()` or `provideAnimationsAsync()` function.');\n }\n }\n build(animation) {\n const id = this._nextAnimationId;\n this._nextAnimationId++;\n const entry = Array.isArray(animation) ? sequence(animation) : animation;\n issueAnimationCommand(this._renderer, null, id, 'register', [entry]);\n return new BrowserAnimationFactory(id, this._renderer);\n }\n static ɵfac = function BrowserAnimationBuilder_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || BrowserAnimationBuilder)(i0.ɵɵinject(i0.RendererFactory2), i0.ɵɵinject(DOCUMENT));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: BrowserAnimationBuilder,\n factory: BrowserAnimationBuilder.ɵfac,\n providedIn: 'root'\n });\n }\n return BrowserAnimationBuilder;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass BrowserAnimationFactory extends AnimationFactory {\n _id;\n _renderer;\n constructor(_id, _renderer) {\n super();\n this._id = _id;\n this._renderer = _renderer;\n }\n create(element, options) {\n return new RendererAnimationPlayer(this._id, element, options || {}, this._renderer);\n }\n}\nclass RendererAnimationPlayer {\n id;\n element;\n _renderer;\n parentPlayer = null;\n _started = false;\n constructor(id, element, options, _renderer) {\n this.id = id;\n this.element = element;\n this._renderer = _renderer;\n this._command('create', options);\n }\n _listen(eventName, callback) {\n return this._renderer.listen(this.element, `@@${this.id}:${eventName}`, callback);\n }\n _command(command, ...args) {\n issueAnimationCommand(this._renderer, this.element, this.id, command, args);\n }\n onDone(fn) {\n this._listen('done', fn);\n }\n onStart(fn) {\n this._listen('start', fn);\n }\n onDestroy(fn) {\n this._listen('destroy', fn);\n }\n init() {\n this._command('init');\n }\n hasStarted() {\n return this._started;\n }\n play() {\n this._command('play');\n this._started = true;\n }\n pause() {\n this._command('pause');\n }\n restart() {\n this._command('restart');\n }\n finish() {\n this._command('finish');\n }\n destroy() {\n this._command('destroy');\n }\n reset() {\n this._command('reset');\n this._started = false;\n }\n setPosition(p) {\n this._command('setPosition', p);\n }\n getPosition() {\n return unwrapAnimationRenderer(this._renderer)?.engine?.players[this.id]?.getPosition() ?? 0;\n }\n totalTime = 0;\n}\nfunction issueAnimationCommand(renderer, element, id, command, args) {\n renderer.setProperty(element, `@@${id}:${command}`, args);\n}\n/**\n * The following 2 methods cannot reference their correct types (AnimationRenderer &\n * DynamicDelegationRenderer) since this would introduce a import cycle.\n */\nfunction unwrapAnimationRenderer(renderer) {\n const type = renderer.ɵtype;\n if (type === 0 /* AnimationRendererType.Regular */) {\n return renderer;\n } else if (type === 1 /* AnimationRendererType.Delegated */) {\n return renderer.animationRenderer;\n }\n return null;\n}\nfunction isAnimationRenderer(renderer) {\n const type = renderer.ɵtype;\n return type === 0 /* AnimationRendererType.Regular */ || type === 1 /* AnimationRendererType.Delegated */;\n}\n\n/**\n * An empty programmatic controller for reusable animations.\n * Used internally when animations are disabled, to avoid\n * checking for the null case when an animation player is expected.\n *\n * @see {@link animate}\n * @see {@link AnimationPlayer}\n *\n * @publicApi\n */\nclass NoopAnimationPlayer {\n _onDoneFns = [];\n _onStartFns = [];\n _onDestroyFns = [];\n _originalOnDoneFns = [];\n _originalOnStartFns = [];\n _started = false;\n _destroyed = false;\n _finished = false;\n _position = 0;\n parentPlayer = null;\n totalTime;\n constructor(duration = 0, delay = 0) {\n this.totalTime = duration + delay;\n }\n _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n }\n onStart(fn) {\n this._originalOnStartFns.push(fn);\n this._onStartFns.push(fn);\n }\n onDone(fn) {\n this._originalOnDoneFns.push(fn);\n this._onDoneFns.push(fn);\n }\n onDestroy(fn) {\n this._onDestroyFns.push(fn);\n }\n hasStarted() {\n return this._started;\n }\n init() {}\n play() {\n if (!this.hasStarted()) {\n this._onStart();\n this.triggerMicrotask();\n }\n this._started = true;\n }\n /** @internal */\n triggerMicrotask() {\n queueMicrotask(() => this._onFinish());\n }\n _onStart() {\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n }\n pause() {}\n restart() {}\n finish() {\n this._onFinish();\n }\n destroy() {\n if (!this._destroyed) {\n this._destroyed = true;\n if (!this.hasStarted()) {\n this._onStart();\n }\n this.finish();\n this._onDestroyFns.forEach(fn => fn());\n this._onDestroyFns = [];\n }\n }\n reset() {\n this._started = false;\n this._finished = false;\n this._onStartFns = this._originalOnStartFns;\n this._onDoneFns = this._originalOnDoneFns;\n }\n setPosition(position) {\n this._position = this.totalTime ? position * this.totalTime : 1;\n }\n getPosition() {\n return this.totalTime ? this._position / this.totalTime : 1;\n }\n /** @internal */\n triggerCallback(phaseName) {\n const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(fn => fn());\n methods.length = 0;\n }\n}\n\n/**\n * A programmatic controller for a group of reusable animations.\n * Used internally to control animations.\n *\n * @see {@link AnimationPlayer}\n * @see {@link animations/group group}\n *\n */\nclass AnimationGroupPlayer {\n _onDoneFns = [];\n _onStartFns = [];\n _finished = false;\n _started = false;\n _destroyed = false;\n _onDestroyFns = [];\n parentPlayer = null;\n totalTime = 0;\n players;\n constructor(_players) {\n this.players = _players;\n let doneCount = 0;\n let destroyCount = 0;\n let startCount = 0;\n const total = this.players.length;\n if (total == 0) {\n queueMicrotask(() => this._onFinish());\n } else {\n this.players.forEach(player => {\n player.onDone(() => {\n if (++doneCount == total) {\n this._onFinish();\n }\n });\n player.onDestroy(() => {\n if (++destroyCount == total) {\n this._onDestroy();\n }\n });\n player.onStart(() => {\n if (++startCount == total) {\n this._onStart();\n }\n });\n });\n }\n this.totalTime = this.players.reduce((time, player) => Math.max(time, player.totalTime), 0);\n }\n _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n }\n init() {\n this.players.forEach(player => player.init());\n }\n onStart(fn) {\n this._onStartFns.push(fn);\n }\n _onStart() {\n if (!this.hasStarted()) {\n this._started = true;\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n }\n }\n onDone(fn) {\n this._onDoneFns.push(fn);\n }\n onDestroy(fn) {\n this._onDestroyFns.push(fn);\n }\n hasStarted() {\n return this._started;\n }\n play() {\n if (!this.parentPlayer) {\n this.init();\n }\n this._onStart();\n this.players.forEach(player => player.play());\n }\n pause() {\n this.players.forEach(player => player.pause());\n }\n restart() {\n this.players.forEach(player => player.restart());\n }\n finish() {\n this._onFinish();\n this.players.forEach(player => player.finish());\n }\n destroy() {\n this._onDestroy();\n }\n _onDestroy() {\n if (!this._destroyed) {\n this._destroyed = true;\n this._onFinish();\n this.players.forEach(player => player.destroy());\n this._onDestroyFns.forEach(fn => fn());\n this._onDestroyFns = [];\n }\n }\n reset() {\n this.players.forEach(player => player.reset());\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n }\n setPosition(p) {\n const timeAtPosition = p * this.totalTime;\n this.players.forEach(player => {\n const position = player.totalTime ? Math.min(1, timeAtPosition / player.totalTime) : 1;\n player.setPosition(position);\n });\n }\n getPosition() {\n const longestPlayer = this.players.reduce((longestSoFar, player) => {\n const newPlayerIsLongest = longestSoFar === null || player.totalTime > longestSoFar.totalTime;\n return newPlayerIsLongest ? player : longestSoFar;\n }, null);\n return longestPlayer != null ? longestPlayer.getPosition() : 0;\n }\n beforeDestroy() {\n this.players.forEach(player => {\n if (player.beforeDestroy) {\n player.beforeDestroy();\n }\n });\n }\n /** @internal */\n triggerCallback(phaseName) {\n const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(fn => fn());\n methods.length = 0;\n }\n}\nconst ɵPRE_STYLE = '!';\n\n/**\n * @module\n * @description\n * Entry point for all animation APIs of the animation package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AUTO_STYLE, AnimationBuilder, AnimationFactory, AnimationMetadataType, NoopAnimationPlayer, animate, animateChild, animation, group, keyframes, query, sequence, stagger, state, style, transition, trigger, useAnimation, AnimationGroupPlayer as ɵAnimationGroupPlayer, BrowserAnimationBuilder as ɵBrowserAnimationBuilder, ɵPRE_STYLE };\n","export var xhtml = \"http://www.w3.org/1999/xhtml\";\nexport default {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: xhtml,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};","import namespaces from \"./namespaces.js\";\nexport default function (name) {\n var prefix = name += \"\",\n i = prefix.indexOf(\":\");\n if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n return namespaces.hasOwnProperty(prefix) ? {\n space: namespaces[prefix],\n local: name\n } : name; // eslint-disable-line no-prototype-builtins\n}","import namespace from \"./namespace.js\";\nimport { xhtml } from \"./namespaces.js\";\nfunction creatorInherit(name) {\n return function () {\n var document = this.ownerDocument,\n uri = this.namespaceURI;\n return uri === xhtml && document.documentElement.namespaceURI === xhtml ? document.createElement(name) : document.createElementNS(uri, name);\n };\n}\nfunction creatorFixed(fullname) {\n return function () {\n return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n };\n}\nexport default function (name) {\n var fullname = namespace(name);\n return (fullname.local ? creatorFixed : creatorInherit)(fullname);\n}","function none() {}\nexport default function (selector) {\n return selector == null ? none : function () {\n return this.querySelector(selector);\n };\n}","import { Selection } from \"./index.js\";\nimport selector from \"../selector.js\";\nexport default function (select) {\n if (typeof select !== \"function\") select = selector(select);\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n }\n }\n }\n return new Selection(subgroups, this._parents);\n}","// Given something array like (or null), returns something that is strictly an\n// array. This is used to ensure that array-like objects passed to d3.selectAll\n// or selection.selectAll are converted into proper arrays when creating a\n// selection; we don’t ever want to create a selection backed by a live\n// HTMLCollection or NodeList. However, note that selection.selectAll will use a\n// static NodeList as a group, since it safely derived from querySelectorAll.\nexport default function array(x) {\n return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\n}","function empty() {\n return [];\n}\nexport default function (selector) {\n return selector == null ? empty : function () {\n return this.querySelectorAll(selector);\n };\n}","import { Selection } from \"./index.js\";\nimport array from \"../array.js\";\nimport selectorAll from \"../selectorAll.js\";\nfunction arrayAll(select) {\n return function () {\n return array(select.apply(this, arguments));\n };\n}\nexport default function (select) {\n if (typeof select === \"function\") select = arrayAll(select);else select = selectorAll(select);\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n subgroups.push(select.call(node, node.__data__, i, group));\n parents.push(node);\n }\n }\n }\n return new Selection(subgroups, parents);\n}","export default function (selector) {\n return function () {\n return this.matches(selector);\n };\n}\nexport function childMatcher(selector) {\n return function (node) {\n return node.matches(selector);\n };\n}","import { childMatcher } from \"../matcher.js\";\nvar find = Array.prototype.find;\nfunction childFind(match) {\n return function () {\n return find.call(this.children, match);\n };\n}\nfunction childFirst() {\n return this.firstElementChild;\n}\nexport default function (match) {\n return this.select(match == null ? childFirst : childFind(typeof match === \"function\" ? match : childMatcher(match)));\n}","import { childMatcher } from \"../matcher.js\";\nvar filter = Array.prototype.filter;\nfunction children() {\n return Array.from(this.children);\n}\nfunction childrenFilter(match) {\n return function () {\n return filter.call(this.children, match);\n };\n}\nexport default function (match) {\n return this.selectAll(match == null ? children : childrenFilter(typeof match === \"function\" ? match : childMatcher(match)));\n}","import { Selection } from \"./index.js\";\nimport matcher from \"../matcher.js\";\nexport default function (match) {\n if (typeof match !== \"function\") match = matcher(match);\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n return new Selection(subgroups, this._parents);\n}","export default function (update) {\n return new Array(update.length);\n}","import sparse from \"./sparse.js\";\nimport { Selection } from \"./index.js\";\nexport default function () {\n return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\nexport function EnterNode(parent, datum) {\n this.ownerDocument = parent.ownerDocument;\n this.namespaceURI = parent.namespaceURI;\n this._next = null;\n this._parent = parent;\n this.__data__ = datum;\n}\nEnterNode.prototype = {\n constructor: EnterNode,\n appendChild: function (child) {\n return this._parent.insertBefore(child, this._next);\n },\n insertBefore: function (child, next) {\n return this._parent.insertBefore(child, next);\n },\n querySelector: function (selector) {\n return this._parent.querySelector(selector);\n },\n querySelectorAll: function (selector) {\n return this._parent.querySelectorAll(selector);\n }\n};","export default function (x) {\n return function () {\n return x;\n };\n}","import { Selection } from \"./index.js\";\nimport { EnterNode } from \"./enter.js\";\nimport constant from \"../constant.js\";\nfunction bindIndex(parent, group, enter, update, exit, data) {\n var i = 0,\n node,\n groupLength = group.length,\n dataLength = data.length;\n\n // Put any non-null nodes that fit into update.\n // Put any null nodes into enter.\n // Put any remaining data into enter.\n for (; i < dataLength; ++i) {\n if (node = group[i]) {\n node.__data__ = data[i];\n update[i] = node;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Put any non-null nodes that don’t fit into exit.\n for (; i < groupLength; ++i) {\n if (node = group[i]) {\n exit[i] = node;\n }\n }\n}\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n var i,\n node,\n nodeByKeyValue = new Map(),\n groupLength = group.length,\n dataLength = data.length,\n keyValues = new Array(groupLength),\n keyValue;\n\n // Compute the key for each node.\n // If multiple nodes have the same key, the duplicates are added to exit.\n for (i = 0; i < groupLength; ++i) {\n if (node = group[i]) {\n keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n if (nodeByKeyValue.has(keyValue)) {\n exit[i] = node;\n } else {\n nodeByKeyValue.set(keyValue, node);\n }\n }\n }\n\n // Compute the key for each datum.\n // If there a node associated with this key, join and add it to update.\n // If there is not (or the key is a duplicate), add it to enter.\n for (i = 0; i < dataLength; ++i) {\n keyValue = key.call(parent, data[i], i, data) + \"\";\n if (node = nodeByKeyValue.get(keyValue)) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue.delete(keyValue);\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Add any remaining nodes that were not bound to data to exit.\n for (i = 0; i < groupLength; ++i) {\n if ((node = group[i]) && nodeByKeyValue.get(keyValues[i]) === node) {\n exit[i] = node;\n }\n }\n}\nfunction datum(node) {\n return node.__data__;\n}\nexport default function (value, key) {\n if (!arguments.length) return Array.from(this, datum);\n var bind = key ? bindKey : bindIndex,\n parents = this._parents,\n groups = this._groups;\n if (typeof value !== \"function\") value = constant(value);\n for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n var parent = parents[j],\n group = groups[j],\n groupLength = group.length,\n data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),\n dataLength = data.length,\n enterGroup = enter[j] = new Array(dataLength),\n updateGroup = update[j] = new Array(dataLength),\n exitGroup = exit[j] = new Array(groupLength);\n bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n // Now connect the enter nodes to their following update node, such that\n // appendChild can insert the materialized enter node before this node,\n // rather than at the end of the parent node.\n for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n if (previous = enterGroup[i0]) {\n if (i0 >= i1) i1 = i0 + 1;\n while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n previous._next = next || null;\n }\n }\n }\n update = new Selection(update, parents);\n update._enter = enter;\n update._exit = exit;\n return update;\n}\n\n// Given some data, this returns an array-like view of it: an object that\n// exposes a length property and allows numeric indexing. Note that unlike\n// selectAll, this isn’t worried about “live” collections because the resulting\n// array will only be used briefly while data is being bound. (It is possible to\n// cause the data to change while iterating by using a key function, but please\n// don’t; we’d rather avoid a gratuitous copy.)\nfunction arraylike(data) {\n return typeof data === \"object\" && \"length\" in data ? data // Array, TypedArray, NodeList, array-like\n : Array.from(data); // Map, Set, iterable, string, or anything else\n}","import sparse from \"./sparse.js\";\nimport { Selection } from \"./index.js\";\nexport default function () {\n return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}","export default function (onenter, onupdate, onexit) {\n var enter = this.enter(),\n update = this,\n exit = this.exit();\n if (typeof onenter === \"function\") {\n enter = onenter(enter);\n if (enter) enter = enter.selection();\n } else {\n enter = enter.append(onenter + \"\");\n }\n if (onupdate != null) {\n update = onupdate(update);\n if (update) update = update.selection();\n }\n if (onexit == null) exit.remove();else onexit(exit);\n return enter && update ? enter.merge(update).order() : update;\n}","import { Selection } from \"./index.js\";\nexport default function (context) {\n var selection = context.selection ? context.selection() : context;\n for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n return new Selection(merges, this._parents);\n}","export default function () {\n for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n if (node = group[i]) {\n if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n return this;\n}","import { Selection } from \"./index.js\";\nexport default function (compare) {\n if (!compare) compare = ascending;\n function compareNode(a, b) {\n return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n }\n for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n sortgroup[i] = node;\n }\n }\n sortgroup.sort(compareNode);\n }\n return new Selection(sortgroups, this._parents).order();\n}\nfunction ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}","export default function () {\n var callback = arguments[0];\n arguments[0] = this;\n callback.apply(null, arguments);\n return this;\n}","export default function () {\n return Array.from(this);\n}","export default function () {\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n var node = group[i];\n if (node) return node;\n }\n }\n return null;\n}","export default function () {\n let size = 0;\n for (const node of this) ++size; // eslint-disable-line no-unused-vars\n return size;\n}","export default function () {\n return !this.node();\n}","export default function (callback) {\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) callback.call(node, node.__data__, i, group);\n }\n }\n return this;\n}","import namespace from \"../namespace.js\";\nfunction attrRemove(name) {\n return function () {\n this.removeAttribute(name);\n };\n}\nfunction attrRemoveNS(fullname) {\n return function () {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\nfunction attrConstant(name, value) {\n return function () {\n this.setAttribute(name, value);\n };\n}\nfunction attrConstantNS(fullname, value) {\n return function () {\n this.setAttributeNS(fullname.space, fullname.local, value);\n };\n}\nfunction attrFunction(name, value) {\n return function () {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttribute(name);else this.setAttribute(name, v);\n };\n}\nfunction attrFunctionNS(fullname, value) {\n return function () {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttributeNS(fullname.space, fullname.local);else this.setAttributeNS(fullname.space, fullname.local, v);\n };\n}\nexport default function (name, value) {\n var fullname = namespace(name);\n if (arguments.length < 2) {\n var node = this.node();\n return fullname.local ? node.getAttributeNS(fullname.space, fullname.local) : node.getAttribute(fullname);\n }\n return this.each((value == null ? fullname.local ? attrRemoveNS : attrRemove : typeof value === \"function\" ? fullname.local ? attrFunctionNS : attrFunction : fullname.local ? attrConstantNS : attrConstant)(fullname, value));\n}","export default function (node) {\n return node.ownerDocument && node.ownerDocument.defaultView // node is a Node\n || node.document && node // node is a Window\n || node.defaultView; // node is a Document\n}","import defaultView from \"../window.js\";\nfunction styleRemove(name) {\n return function () {\n this.style.removeProperty(name);\n };\n}\nfunction styleConstant(name, value, priority) {\n return function () {\n this.style.setProperty(name, value, priority);\n };\n}\nfunction styleFunction(name, value, priority) {\n return function () {\n var v = value.apply(this, arguments);\n if (v == null) this.style.removeProperty(name);else this.style.setProperty(name, v, priority);\n };\n}\nexport default function (name, value, priority) {\n return arguments.length > 1 ? this.each((value == null ? styleRemove : typeof value === \"function\" ? styleFunction : styleConstant)(name, value, priority == null ? \"\" : priority)) : styleValue(this.node(), name);\n}\nexport function styleValue(node, name) {\n return node.style.getPropertyValue(name) || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}","function propertyRemove(name) {\n return function () {\n delete this[name];\n };\n}\nfunction propertyConstant(name, value) {\n return function () {\n this[name] = value;\n };\n}\nfunction propertyFunction(name, value) {\n return function () {\n var v = value.apply(this, arguments);\n if (v == null) delete this[name];else this[name] = v;\n };\n}\nexport default function (name, value) {\n return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value === \"function\" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name];\n}","function classArray(string) {\n return string.trim().split(/^|\\s+/);\n}\nfunction classList(node) {\n return node.classList || new ClassList(node);\n}\nfunction ClassList(node) {\n this._node = node;\n this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\nClassList.prototype = {\n add: function (name) {\n var i = this._names.indexOf(name);\n if (i < 0) {\n this._names.push(name);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n remove: function (name) {\n var i = this._names.indexOf(name);\n if (i >= 0) {\n this._names.splice(i, 1);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n contains: function (name) {\n return this._names.indexOf(name) >= 0;\n }\n};\nfunction classedAdd(node, names) {\n var list = classList(node),\n i = -1,\n n = names.length;\n while (++i < n) list.add(names[i]);\n}\nfunction classedRemove(node, names) {\n var list = classList(node),\n i = -1,\n n = names.length;\n while (++i < n) list.remove(names[i]);\n}\nfunction classedTrue(names) {\n return function () {\n classedAdd(this, names);\n };\n}\nfunction classedFalse(names) {\n return function () {\n classedRemove(this, names);\n };\n}\nfunction classedFunction(names, value) {\n return function () {\n (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n };\n}\nexport default function (name, value) {\n var names = classArray(name + \"\");\n if (arguments.length < 2) {\n var list = classList(this.node()),\n i = -1,\n n = names.length;\n while (++i < n) if (!list.contains(names[i])) return false;\n return true;\n }\n return this.each((typeof value === \"function\" ? classedFunction : value ? classedTrue : classedFalse)(names, value));\n}","function textRemove() {\n this.textContent = \"\";\n}\nfunction textConstant(value) {\n return function () {\n this.textContent = value;\n };\n}\nfunction textFunction(value) {\n return function () {\n var v = value.apply(this, arguments);\n this.textContent = v == null ? \"\" : v;\n };\n}\nexport default function (value) {\n return arguments.length ? this.each(value == null ? textRemove : (typeof value === \"function\" ? textFunction : textConstant)(value)) : this.node().textContent;\n}","function htmlRemove() {\n this.innerHTML = \"\";\n}\nfunction htmlConstant(value) {\n return function () {\n this.innerHTML = value;\n };\n}\nfunction htmlFunction(value) {\n return function () {\n var v = value.apply(this, arguments);\n this.innerHTML = v == null ? \"\" : v;\n };\n}\nexport default function (value) {\n return arguments.length ? this.each(value == null ? htmlRemove : (typeof value === \"function\" ? htmlFunction : htmlConstant)(value)) : this.node().innerHTML;\n}","function raise() {\n if (this.nextSibling) this.parentNode.appendChild(this);\n}\nexport default function () {\n return this.each(raise);\n}","function lower() {\n if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\nexport default function () {\n return this.each(lower);\n}","import creator from \"../creator.js\";\nexport default function (name) {\n var create = typeof name === \"function\" ? name : creator(name);\n return this.select(function () {\n return this.appendChild(create.apply(this, arguments));\n });\n}","import creator from \"../creator.js\";\nimport selector from \"../selector.js\";\nfunction constantNull() {\n return null;\n}\nexport default function (name, before) {\n var create = typeof name === \"function\" ? name : creator(name),\n select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n return this.select(function () {\n return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n });\n}","function remove() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n}\nexport default function () {\n return this.each(remove);\n}","function selection_cloneShallow() {\n var clone = this.cloneNode(false),\n parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\nfunction selection_cloneDeep() {\n var clone = this.cloneNode(true),\n parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\nexport default function (deep) {\n return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}","export default function (value) {\n return arguments.length ? this.property(\"__data__\", value) : this.node().__data__;\n}","function contextListener(listener) {\n return function (event) {\n listener.call(this, event, this.__data__);\n };\n}\nfunction parseTypenames(typenames) {\n return typenames.trim().split(/^|\\s+/).map(function (t) {\n var name = \"\",\n i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n return {\n type: t,\n name: name\n };\n });\n}\nfunction onRemove(typename) {\n return function () {\n var on = this.__on;\n if (!on) return;\n for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n } else {\n on[++i] = o;\n }\n }\n if (++i) on.length = i;else delete this.__on;\n };\n}\nfunction onAdd(typename, value, options) {\n return function () {\n var on = this.__on,\n o,\n listener = contextListener(value);\n if (on) for (var j = 0, m = on.length; j < m; ++j) {\n if ((o = on[j]).type === typename.type && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n this.addEventListener(o.type, o.listener = listener, o.options = options);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, options);\n o = {\n type: typename.type,\n name: typename.name,\n value: value,\n listener: listener,\n options: options\n };\n if (!on) this.__on = [o];else on.push(o);\n };\n}\nexport default function (typename, value, options) {\n var typenames = parseTypenames(typename + \"\"),\n i,\n n = typenames.length,\n t;\n if (arguments.length < 2) {\n var on = this.node().__on;\n if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n for (i = 0, o = on[j]; i < n; ++i) {\n if ((t = typenames[i]).type === o.type && t.name === o.name) {\n return o.value;\n }\n }\n }\n return;\n }\n on = value ? onAdd : onRemove;\n for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n return this;\n}","import defaultView from \"../window.js\";\nfunction dispatchEvent(node, type, params) {\n var window = defaultView(node),\n event = window.CustomEvent;\n if (typeof event === \"function\") {\n event = new event(type, params);\n } else {\n event = window.document.createEvent(\"Event\");\n if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;else event.initEvent(type, false, false);\n }\n node.dispatchEvent(event);\n}\nfunction dispatchConstant(type, params) {\n return function () {\n return dispatchEvent(this, type, params);\n };\n}\nfunction dispatchFunction(type, params) {\n return function () {\n return dispatchEvent(this, type, params.apply(this, arguments));\n };\n}\nexport default function (type, params) {\n return this.each((typeof params === \"function\" ? dispatchFunction : dispatchConstant)(type, params));\n}","export default function* () {\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) yield node;\n }\n }\n}","import selection_select from \"./select.js\";\nimport selection_selectAll from \"./selectAll.js\";\nimport selection_selectChild from \"./selectChild.js\";\nimport selection_selectChildren from \"./selectChildren.js\";\nimport selection_filter from \"./filter.js\";\nimport selection_data from \"./data.js\";\nimport selection_enter from \"./enter.js\";\nimport selection_exit from \"./exit.js\";\nimport selection_join from \"./join.js\";\nimport selection_merge from \"./merge.js\";\nimport selection_order from \"./order.js\";\nimport selection_sort from \"./sort.js\";\nimport selection_call from \"./call.js\";\nimport selection_nodes from \"./nodes.js\";\nimport selection_node from \"./node.js\";\nimport selection_size from \"./size.js\";\nimport selection_empty from \"./empty.js\";\nimport selection_each from \"./each.js\";\nimport selection_attr from \"./attr.js\";\nimport selection_style from \"./style.js\";\nimport selection_property from \"./property.js\";\nimport selection_classed from \"./classed.js\";\nimport selection_text from \"./text.js\";\nimport selection_html from \"./html.js\";\nimport selection_raise from \"./raise.js\";\nimport selection_lower from \"./lower.js\";\nimport selection_append from \"./append.js\";\nimport selection_insert from \"./insert.js\";\nimport selection_remove from \"./remove.js\";\nimport selection_clone from \"./clone.js\";\nimport selection_datum from \"./datum.js\";\nimport selection_on from \"./on.js\";\nimport selection_dispatch from \"./dispatch.js\";\nimport selection_iterator from \"./iterator.js\";\nexport var root = [null];\nexport function Selection(groups, parents) {\n this._groups = groups;\n this._parents = parents;\n}\nfunction selection() {\n return new Selection([[document.documentElement]], root);\n}\nfunction selection_selection() {\n return this;\n}\nSelection.prototype = selection.prototype = {\n constructor: Selection,\n select: selection_select,\n selectAll: selection_selectAll,\n selectChild: selection_selectChild,\n selectChildren: selection_selectChildren,\n filter: selection_filter,\n data: selection_data,\n enter: selection_enter,\n exit: selection_exit,\n join: selection_join,\n merge: selection_merge,\n selection: selection_selection,\n order: selection_order,\n sort: selection_sort,\n call: selection_call,\n nodes: selection_nodes,\n node: selection_node,\n size: selection_size,\n empty: selection_empty,\n each: selection_each,\n attr: selection_attr,\n style: selection_style,\n property: selection_property,\n classed: selection_classed,\n text: selection_text,\n html: selection_html,\n raise: selection_raise,\n lower: selection_lower,\n append: selection_append,\n insert: selection_insert,\n remove: selection_remove,\n clone: selection_clone,\n datum: selection_datum,\n on: selection_on,\n dispatch: selection_dispatch,\n [Symbol.iterator]: selection_iterator\n};\nexport default selection;","import { Selection, root } from \"./selection/index.js\";\nexport default function (selector) {\n return typeof selector === \"string\" ? new Selection([[document.querySelector(selector)]], [document.documentElement]) : new Selection([[selector]], root);\n}","export default function (event) {\n let sourceEvent;\n while (sourceEvent = event.sourceEvent) event = sourceEvent;\n return event;\n}","import sourceEvent from \"./sourceEvent.js\";\nexport default function (event, node) {\n event = sourceEvent(event);\n if (node === undefined) node = event.currentTarget;\n if (node) {\n var svg = node.ownerSVGElement || node;\n if (svg.createSVGPoint) {\n var point = svg.createSVGPoint();\n point.x = event.clientX, point.y = event.clientY;\n point = point.matrixTransform(node.getScreenCTM().inverse());\n return [point.x, point.y];\n }\n if (node.getBoundingClientRect) {\n var rect = node.getBoundingClientRect();\n return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n }\n }\n return [event.pageX, event.pageY];\n}","var noop = {\n value: () => {}\n};\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || t in _ || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\nfunction Dispatch(_) {\n this._ = _;\n}\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function (t) {\n var name = \"\",\n i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {\n type: t,\n name: name\n };\n });\n}\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function (typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n return this;\n },\n copy: function () {\n var copy = {},\n _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function (type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function (type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({\n name: name,\n value: callback\n });\n return type;\n}\nexport default dispatch;","// These are typically used in conjunction with noevent to ensure that we can\n// preventDefault on the event.\nexport const nonpassive = {\n passive: false\n};\nexport const nonpassivecapture = {\n capture: true,\n passive: false\n};\nexport function nopropagation(event) {\n event.stopImmediatePropagation();\n}\nexport default function (event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}","import { select } from \"d3-selection\";\nimport noevent, { nonpassivecapture } from \"./noevent.js\";\nexport default function (view) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", noevent, nonpassivecapture);\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", noevent, nonpassivecapture);\n } else {\n root.__noselect = root.style.MozUserSelect;\n root.style.MozUserSelect = \"none\";\n }\n}\nexport function yesdrag(view, noclick) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", null);\n if (noclick) {\n selection.on(\"click.drag\", noevent, nonpassivecapture);\n setTimeout(function () {\n selection.on(\"click.drag\", null);\n }, 0);\n }\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", null);\n } else {\n root.style.MozUserSelect = root.__noselect;\n delete root.__noselect;\n }\n}","export default function (constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}","import define, { extend } from \"./define.js\";\nexport function Color() {}\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(`^rgb\\\\(${reI},${reI},${reI}\\\\)$`),\n reRgbPercent = new RegExp(`^rgb\\\\(${reP},${reP},${reP}\\\\)$`),\n reRgbaInteger = new RegExp(`^rgba\\\\(${reI},${reI},${reI},${reN}\\\\)$`),\n reRgbaPercent = new RegExp(`^rgba\\\\(${reP},${reP},${reP},${reN}\\\\)$`),\n reHslPercent = new RegExp(`^hsl\\\\(${reN},${reP},${reP}\\\\)$`),\n reHslaPercent = new RegExp(`^hsla\\\\(${reN},${reP},${reP},${reN}\\\\)$`);\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\ndefine(Color, color, {\n copy(channels) {\n return Object.assign(new this.constructor(), this, channels);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: color_formatHex,\n // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHex8: color_formatHex8,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\nfunction color_formatHex8() {\n return this.rgb().formatHex8();\n}\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb(m >> 8 & 0xf | m >> 4 & 0xf0, m >> 4 & 0xf | m & 0xf0, (m & 0xf) << 4 | m & 0xf, 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba(m >> 12 & 0xf | m >> 8 & 0xf0, m >> 8 & 0xf | m >> 4 & 0xf0, m >> 4 & 0xf | m & 0xf0, ((m & 0xf) << 4 | m & 0xf) / 0xff) // #f000\n : null // invalid hex\n ) : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0) : null;\n}\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb();\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\ndefine(Rgb, rgb, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb() {\n return this;\n },\n clamp() {\n return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));\n },\n displayable() {\n return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;\n },\n hex: rgb_formatHex,\n // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatHex8: rgb_formatHex8,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\nfunction rgb_formatHex() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;\n}\nfunction rgb_formatHex8() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\nfunction rgb_formatRgb() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"rgb(\" : \"rgba(\"}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? \")\" : `, ${a})`}`;\n}\nfunction clampa(opacity) {\n return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));\n}\nfunction clampi(value) {\n return Math.max(0, Math.min(255, Math.round(value) || 0));\n}\nfunction hex(value) {\n value = clampi(value);\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;else if (l <= 0 || l >= 1) h = s = NaN;else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl();\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;else if (g === max) h = (b - r) / s + 2;else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\ndefine(Hsl, hsl, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity);\n },\n clamp() {\n return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));\n },\n displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;\n },\n formatHsl() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"hsl(\" : \"hsla(\"}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? \")\" : `, ${a})`}`;\n }\n}));\nfunction clamph(value) {\n value = (value || 0) % 360;\n return value < 0 ? value + 360 : value;\n}\nfunction clampt(value) {\n return Math.max(0, Math.min(1, value || 0));\n}\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;\n}","export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1,\n t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + (4 - 6 * t2 + 3 * t3) * v1 + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + t3 * v3) / 6;\n}\nexport default function (values) {\n var n = values.length - 1;\n return function (t) {\n var i = t <= 0 ? t = 0 : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}","import { basis } from \"./basis.js\";\nexport default function (values) {\n var n = values.length;\n return function (t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}","export default x => () => x;","import constant from \"./constant.js\";\nfunction linear(a, d) {\n return function (t) {\n return a + t * d;\n };\n}\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function (t) {\n return Math.pow(a + t * b, y);\n };\n}\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function (a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}","import { rgb as colorRgb } from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, { gamma } from \"./color.js\";\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function (t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n rgb.gamma = rgbGamma;\n return rgb;\n})(1);\nfunction rgbSpline(spline) {\n return function (colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i,\n color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function (t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);","export default function (a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function (t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n}\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}","import value from \"./value.js\";\nimport numberArray, { isNumberArray } from \"./numberArray.js\";\nexport default function (a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n return function (t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n}","export default function (a, b) {\n var d = new Date();\n return a = +a, b = +b, function (t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}","export default function (a, b) {\n return a = +a, b = +b, function (t) {\n return a * (1 - t) + b * t;\n };\n}","import value from \"./value.js\";\nexport default function (a, b) {\n var i = {},\n c = {},\n k;\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n return function (t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}","import number from \"./number.js\";\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\nfunction zero(b) {\n return function () {\n return b;\n };\n}\nfunction one(b) {\n return function (t) {\n return b(t) + \"\";\n };\n}\nexport default function (a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0,\n // scan index for next number in b\n am,\n // current match in a\n bm,\n // current match in b\n bs,\n // string preceding current number in b, if any\n i = -1,\n // index in s\n s = [],\n // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a)) && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) {\n // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) {\n // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else {\n // interpolate non-matching numbers\n s[++i] = null;\n q.push({\n i: i,\n x: number(am, bm)\n });\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function (t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}","import { color } from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport { genericArray } from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, { isNumberArray } from \"./numberArray.js\";\nexport default function (a, b) {\n var t = typeof b,\n c;\n return b == null || t === \"boolean\" ? constant(b) : (t === \"number\" ? number : t === \"string\" ? (c = color(b)) ? (b = c, rgb) : string : b instanceof color ? rgb : b instanceof Date ? date : isNumberArray(b) ? numberArray : Array.isArray(b) ? genericArray : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object : number)(a, b);\n}","export default function (a, b) {\n return a = +a, b = +b, function (t) {\n return Math.round(a * (1 - t) + b * t);\n };\n}","var degrees = 180 / Math.PI;\nexport var identity = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\nexport default function (a, b, c, d, e, f) {\n var scaleX, scaleY, skewX;\n if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n return {\n translateX: e,\n translateY: f,\n rotate: Math.atan2(b, a) * degrees,\n skewX: Math.atan(skewX) * degrees,\n scaleX: scaleX,\n scaleY: scaleY\n };\n}","import decompose, { identity } from \"./decompose.js\";\nvar svgNode;\n\n/* eslint-disable no-undef */\nexport function parseCss(value) {\n const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\n}\nexport function parseSvg(value) {\n if (value == null) return identity;\n if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n svgNode.setAttribute(\"transform\", value);\n if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n value = value.matrix;\n return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}","import number from \"../number.js\";\nimport { parseCss, parseSvg } from \"./parse.js\";\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n function pop(s) {\n return s.length ? s.pop() + \" \" : \"\";\n }\n function translate(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n q.push({\n i: i - 4,\n x: number(xa, xb)\n }, {\n i: i - 2,\n x: number(ya, yb)\n });\n } else if (xb || yb) {\n s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n }\n }\n function rotate(a, b, s, q) {\n if (a !== b) {\n if (a - b > 180) b += 360;else if (b - a > 180) a += 360; // shortest path\n q.push({\n i: s.push(pop(s) + \"rotate(\", null, degParen) - 2,\n x: number(a, b)\n });\n } else if (b) {\n s.push(pop(s) + \"rotate(\" + b + degParen);\n }\n }\n function skewX(a, b, s, q) {\n if (a !== b) {\n q.push({\n i: s.push(pop(s) + \"skewX(\", null, degParen) - 2,\n x: number(a, b)\n });\n } else if (b) {\n s.push(pop(s) + \"skewX(\" + b + degParen);\n }\n }\n function scale(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n q.push({\n i: i - 4,\n x: number(xa, xb)\n }, {\n i: i - 2,\n x: number(ya, yb)\n });\n } else if (xb !== 1 || yb !== 1) {\n s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n }\n }\n return function (a, b) {\n var s = [],\n // string constants and placeholders\n q = []; // number interpolators\n a = parse(a), b = parse(b);\n translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n rotate(a.rotate, b.rotate, s, q);\n skewX(a.skewX, b.skewX, s, q);\n scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n a = b = null; // gc\n return function (t) {\n var i = -1,\n n = q.length,\n o;\n while (++i < n) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n };\n}\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");","var frame = 0,\n // is an animation frame pending?\n timeout = 0,\n // is a timeout pending?\n interval = 0,\n // are any timers active?\n pokeDelay = 1000,\n // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function (f) {\n setTimeout(f, 17);\n };\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\nfunction clearNow() {\n clockNow = 0;\n}\nexport function Timer() {\n this._call = this._time = this._next = null;\n}\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function (callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function () {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\nexport function timer(callback, delay, time) {\n var t = new Timer();\n t.restart(callback, delay, time);\n return t;\n}\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n var t = taskHead,\n e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);\n t = t._next;\n }\n --frame;\n}\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\nfunction poke() {\n var now = clock.now(),\n delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\nfunction nap() {\n var t0,\n t1 = taskHead,\n t2,\n time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}","import { Timer } from \"./timer.js\";\nexport default function (callback, delay, time) {\n var t = new Timer();\n delay = delay == null ? 0 : +delay;\n t.restart(elapsed => {\n t.stop();\n callback(elapsed + delay);\n }, delay, time);\n return t;\n}","import { dispatch } from \"d3-dispatch\";\nimport { timer, timeout } from \"d3-timer\";\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\nexport default function (node, name, id, index, group, timing) {\n var schedules = node.__transition;\n if (!schedules) node.__transition = {};else if (id in schedules) return;\n create(node, id, {\n name: name,\n index: index,\n // For context during callback.\n group: group,\n // For context during callback.\n on: emptyOn,\n tween: emptyTween,\n time: timing.time,\n delay: timing.delay,\n duration: timing.duration,\n ease: timing.ease,\n timer: null,\n state: CREATED\n });\n}\nexport function init(node, id) {\n var schedule = get(node, id);\n if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n return schedule;\n}\nexport function set(node, id) {\n var schedule = get(node, id);\n if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n return schedule;\n}\nexport function get(node, id) {\n var schedule = node.__transition;\n if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n return schedule;\n}\nfunction create(node, id, self) {\n var schedules = node.__transition,\n tween;\n\n // Initialize the self timer when the transition is created.\n // Note the actual delay is not known until the first callback!\n schedules[id] = self;\n self.timer = timer(schedule, 0, self.time);\n function schedule(elapsed) {\n self.state = SCHEDULED;\n self.timer.restart(start, self.delay, self.time);\n\n // If the elapsed delay is less than our first sleep, start immediately.\n if (self.delay <= elapsed) start(elapsed - self.delay);\n }\n function start(elapsed) {\n var i, j, n, o;\n\n // If the state is not SCHEDULED, then we previously errored on start.\n if (self.state !== SCHEDULED) return stop();\n for (i in schedules) {\n o = schedules[i];\n if (o.name !== self.name) continue;\n\n // While this element already has a starting transition during this frame,\n // defer starting an interrupting transition until that transition has a\n // chance to tick (and possibly end); see d3/d3-transition#54!\n if (o.state === STARTED) return timeout(start);\n\n // Interrupt the active transition, if any.\n if (o.state === RUNNING) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n\n // Cancel any pre-empted transitions.\n else if (+i < id) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n }\n\n // Defer the first tick to end of the current frame; see d3/d3#1576.\n // Note the transition may be canceled after start and before the first tick!\n // Note this must be scheduled before the start event; see d3/d3-transition#16!\n // Assuming this is successful, subsequent callbacks go straight to tick.\n timeout(function () {\n if (self.state === STARTED) {\n self.state = RUNNING;\n self.timer.restart(tick, self.delay, self.time);\n tick(elapsed);\n }\n });\n\n // Dispatch the start event.\n // Note this must be done before the tween are initialized.\n self.state = STARTING;\n self.on.call(\"start\", node, node.__data__, self.index, self.group);\n if (self.state !== STARTING) return; // interrupted\n self.state = STARTED;\n\n // Initialize the tween, deleting null tween.\n tween = new Array(n = self.tween.length);\n for (i = 0, j = -1; i < n; ++i) {\n if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n tween[++j] = o;\n }\n }\n tween.length = j + 1;\n }\n function tick(elapsed) {\n var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n i = -1,\n n = tween.length;\n while (++i < n) {\n tween[i].call(node, t);\n }\n\n // Dispatch the end event.\n if (self.state === ENDING) {\n self.on.call(\"end\", node, node.__data__, self.index, self.group);\n stop();\n }\n }\n function stop() {\n self.state = ENDED;\n self.timer.stop();\n delete schedules[id];\n for (var i in schedules) return; // eslint-disable-line no-unused-vars\n delete node.__transition;\n }\n}","import { STARTING, ENDING, ENDED } from \"./transition/schedule.js\";\nexport default function (node, name) {\n var schedules = node.__transition,\n schedule,\n active,\n empty = true,\n i;\n if (!schedules) return;\n name = name == null ? null : name + \"\";\n for (i in schedules) {\n if ((schedule = schedules[i]).name !== name) {\n empty = false;\n continue;\n }\n active = schedule.state > STARTING && schedule.state < ENDING;\n schedule.state = ENDED;\n schedule.timer.stop();\n schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n delete schedules[i];\n }\n if (empty) delete node.__transition;\n}","import interrupt from \"../interrupt.js\";\nexport default function (name) {\n return this.each(function () {\n interrupt(this, name);\n });\n}","import { get, set } from \"./schedule.js\";\nfunction tweenRemove(id, name) {\n var tween0, tween1;\n return function () {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = tween0 = tween;\n for (var i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1 = tween1.slice();\n tween1.splice(i, 1);\n break;\n }\n }\n }\n schedule.tween = tween1;\n };\n}\nfunction tweenFunction(id, name, value) {\n var tween0, tween1;\n if (typeof value !== \"function\") throw new Error();\n return function () {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = (tween0 = tween).slice();\n for (var t = {\n name: name,\n value: value\n }, i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1[i] = t;\n break;\n }\n }\n if (i === n) tween1.push(t);\n }\n schedule.tween = tween1;\n };\n}\nexport default function (name, value) {\n var id = this._id;\n name += \"\";\n if (arguments.length < 2) {\n var tween = get(this.node(), id).tween;\n for (var i = 0, n = tween.length, t; i < n; ++i) {\n if ((t = tween[i]).name === name) {\n return t.value;\n }\n }\n return null;\n }\n return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\nexport function tweenValue(transition, name, value) {\n var id = transition._id;\n transition.each(function () {\n var schedule = set(this, id);\n (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n });\n return function (node) {\n return get(node, id).value[name];\n };\n}","import { color } from \"d3-color\";\nimport { interpolateNumber, interpolateRgb, interpolateString } from \"d3-interpolate\";\nexport default function (a, b) {\n var c;\n return (typeof b === \"number\" ? interpolateNumber : b instanceof color ? interpolateRgb : (c = color(b)) ? (b = c, interpolateRgb) : interpolateString)(a, b);\n}","import { interpolateTransformSvg as interpolateTransform } from \"d3-interpolate\";\nimport { namespace } from \"d3-selection\";\nimport { tweenValue } from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\nfunction attrRemove(name) {\n return function () {\n this.removeAttribute(name);\n };\n}\nfunction attrRemoveNS(fullname) {\n return function () {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\nfunction attrConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function () {\n var string0 = this.getAttribute(name);\n return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\nfunction attrConstantNS(fullname, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function () {\n var string0 = this.getAttributeNS(fullname.space, fullname.local);\n return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\nfunction attrFunction(name, interpolate, value) {\n var string00, string10, interpolate0;\n return function () {\n var string0,\n value1 = value(this),\n string1;\n if (value1 == null) return void this.removeAttribute(name);\n string0 = this.getAttribute(name);\n string1 = value1 + \"\";\n return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\nfunction attrFunctionNS(fullname, interpolate, value) {\n var string00, string10, interpolate0;\n return function () {\n var string0,\n value1 = value(this),\n string1;\n if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n string0 = this.getAttributeNS(fullname.space, fullname.local);\n string1 = value1 + \"\";\n return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\nexport default function (name, value) {\n var fullname = namespace(name),\n i = fullname === \"transform\" ? interpolateTransform : interpolate;\n return this.attrTween(name, typeof value === \"function\" ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value)) : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}","import { namespace } from \"d3-selection\";\nfunction attrInterpolate(name, i) {\n return function (t) {\n this.setAttribute(name, i.call(this, t));\n };\n}\nfunction attrInterpolateNS(fullname, i) {\n return function (t) {\n this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n };\n}\nfunction attrTweenNS(fullname, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\nfunction attrTween(name, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\nexport default function (name, value) {\n var key = \"attr.\" + name;\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error();\n var fullname = namespace(name);\n return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}","import { get, init } from \"./schedule.js\";\nfunction delayFunction(id, value) {\n return function () {\n init(this, id).delay = +value.apply(this, arguments);\n };\n}\nfunction delayConstant(id, value) {\n return value = +value, function () {\n init(this, id).delay = value;\n };\n}\nexport default function (value) {\n var id = this._id;\n return arguments.length ? this.each((typeof value === \"function\" ? delayFunction : delayConstant)(id, value)) : get(this.node(), id).delay;\n}","import { get, set } from \"./schedule.js\";\nfunction durationFunction(id, value) {\n return function () {\n set(this, id).duration = +value.apply(this, arguments);\n };\n}\nfunction durationConstant(id, value) {\n return value = +value, function () {\n set(this, id).duration = value;\n };\n}\nexport default function (value) {\n var id = this._id;\n return arguments.length ? this.each((typeof value === \"function\" ? durationFunction : durationConstant)(id, value)) : get(this.node(), id).duration;\n}","import { get, set } from \"./schedule.js\";\nfunction easeConstant(id, value) {\n if (typeof value !== \"function\") throw new Error();\n return function () {\n set(this, id).ease = value;\n };\n}\nexport default function (value) {\n var id = this._id;\n return arguments.length ? this.each(easeConstant(id, value)) : get(this.node(), id).ease;\n}","import { set } from \"./schedule.js\";\nfunction easeVarying(id, value) {\n return function () {\n var v = value.apply(this, arguments);\n if (typeof v !== \"function\") throw new Error();\n set(this, id).ease = v;\n };\n}\nexport default function (value) {\n if (typeof value !== \"function\") throw new Error();\n return this.each(easeVarying(this._id, value));\n}","import { matcher } from \"d3-selection\";\nimport { Transition } from \"./index.js\";\nexport default function (match) {\n if (typeof match !== \"function\") match = matcher(match);\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n return new Transition(subgroups, this._parents, this._name, this._id);\n}","import { Transition } from \"./index.js\";\nexport default function (transition) {\n if (transition._id !== this._id) throw new Error();\n for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n return new Transition(merges, this._parents, this._name, this._id);\n}","import { get, set, init } from \"./schedule.js\";\nfunction start(name) {\n return (name + \"\").trim().split(/^|\\s+/).every(function (t) {\n var i = t.indexOf(\".\");\n if (i >= 0) t = t.slice(0, i);\n return !t || t === \"start\";\n });\n}\nfunction onFunction(id, name, listener) {\n var on0,\n on1,\n sit = start(name) ? init : set;\n return function () {\n var schedule = sit(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n schedule.on = on1;\n };\n}\nexport default function (name, listener) {\n var id = this._id;\n return arguments.length < 2 ? get(this.node(), id).on.on(name) : this.each(onFunction(id, name, listener));\n}","function removeFunction(id) {\n return function () {\n var parent = this.parentNode;\n for (var i in this.__transition) if (+i !== id) return;\n if (parent) parent.removeChild(this);\n };\n}\nexport default function () {\n return this.on(\"end.remove\", removeFunction(this._id));\n}","import { selector } from \"d3-selection\";\nimport { Transition } from \"./index.js\";\nimport schedule, { get } from \"./schedule.js\";\nexport default function (select) {\n var name = this._name,\n id = this._id;\n if (typeof select !== \"function\") select = selector(select);\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n }\n }\n }\n return new Transition(subgroups, this._parents, name, id);\n}","import { selectorAll } from \"d3-selection\";\nimport { Transition } from \"./index.js\";\nimport schedule, { get } from \"./schedule.js\";\nexport default function (select) {\n var name = this._name,\n id = this._id;\n if (typeof select !== \"function\") select = selectorAll(select);\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n if (child = children[k]) {\n schedule(child, name, id, k, children, inherit);\n }\n }\n subgroups.push(children);\n parents.push(node);\n }\n }\n }\n return new Transition(subgroups, parents, name, id);\n}","import { selection } from \"d3-selection\";\nvar Selection = selection.prototype.constructor;\nexport default function () {\n return new Selection(this._groups, this._parents);\n}","import { interpolateTransformCss as interpolateTransform } from \"d3-interpolate\";\nimport { style } from \"d3-selection\";\nimport { set } from \"./schedule.js\";\nimport { tweenValue } from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\nfunction styleNull(name, interpolate) {\n var string00, string10, interpolate0;\n return function () {\n var string0 = style(this, name),\n string1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate(string00 = string0, string10 = string1);\n };\n}\nfunction styleRemove(name) {\n return function () {\n this.style.removeProperty(name);\n };\n}\nfunction styleConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function () {\n var string0 = style(this, name);\n return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\nfunction styleFunction(name, interpolate, value) {\n var string00, string10, interpolate0;\n return function () {\n var string0 = style(this, name),\n value1 = value(this),\n string1 = value1 + \"\";\n if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\nfunction styleMaybeRemove(id, name) {\n var on0,\n on1,\n listener0,\n key = \"style.\" + name,\n event = \"end.\" + key,\n remove;\n return function () {\n var schedule = set(this, id),\n on = schedule.on,\n listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n schedule.on = on1;\n };\n}\nexport default function (name, value, priority) {\n var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n return value == null ? this.styleTween(name, styleNull(name, i)).on(\"end.style.\" + name, styleRemove(name)) : typeof value === \"function\" ? this.styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value))).each(styleMaybeRemove(this._id, name)) : this.styleTween(name, styleConstant(name, i, value), priority).on(\"end.style.\" + name, null);\n}","function styleInterpolate(name, i, priority) {\n return function (t) {\n this.style.setProperty(name, i.call(this, t), priority);\n };\n}\nfunction styleTween(name, value, priority) {\n var t, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n return t;\n }\n tween._value = value;\n return tween;\n}\nexport default function (name, value, priority) {\n var key = \"style.\" + (name += \"\");\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error();\n return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}","import { tweenValue } from \"./tween.js\";\nfunction textConstant(value) {\n return function () {\n this.textContent = value;\n };\n}\nfunction textFunction(value) {\n return function () {\n var value1 = value(this);\n this.textContent = value1 == null ? \"\" : value1;\n };\n}\nexport default function (value) {\n return this.tween(\"text\", typeof value === \"function\" ? textFunction(tweenValue(this, \"text\", value)) : textConstant(value == null ? \"\" : value + \"\"));\n}","function textInterpolate(i) {\n return function (t) {\n this.textContent = i.call(this, t);\n };\n}\nfunction textTween(value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\nexport default function (value) {\n var key = \"text\";\n if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error();\n return this.tween(key, textTween(value));\n}","import { Transition, newId } from \"./index.js\";\nimport schedule, { get } from \"./schedule.js\";\nexport default function () {\n var name = this._name,\n id0 = this._id,\n id1 = newId();\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n var inherit = get(node, id0);\n schedule(node, name, id1, i, group, {\n time: inherit.time + inherit.delay + inherit.duration,\n delay: 0,\n duration: inherit.duration,\n ease: inherit.ease\n });\n }\n }\n }\n return new Transition(groups, this._parents, name, id1);\n}","import { set } from \"./schedule.js\";\nexport default function () {\n var on0,\n on1,\n that = this,\n id = that._id,\n size = that.size();\n return new Promise(function (resolve, reject) {\n var cancel = {\n value: reject\n },\n end = {\n value: function () {\n if (--size === 0) resolve();\n }\n };\n that.each(function () {\n var schedule = set(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) {\n on1 = (on0 = on).copy();\n on1._.cancel.push(cancel);\n on1._.interrupt.push(cancel);\n on1._.end.push(end);\n }\n schedule.on = on1;\n });\n\n // The selection was empty, resolve end immediately\n if (size === 0) resolve();\n });\n}","import { selection } from \"d3-selection\";\nimport transition_attr from \"./attr.js\";\nimport transition_attrTween from \"./attrTween.js\";\nimport transition_delay from \"./delay.js\";\nimport transition_duration from \"./duration.js\";\nimport transition_ease from \"./ease.js\";\nimport transition_easeVarying from \"./easeVarying.js\";\nimport transition_filter from \"./filter.js\";\nimport transition_merge from \"./merge.js\";\nimport transition_on from \"./on.js\";\nimport transition_remove from \"./remove.js\";\nimport transition_select from \"./select.js\";\nimport transition_selectAll from \"./selectAll.js\";\nimport transition_selection from \"./selection.js\";\nimport transition_style from \"./style.js\";\nimport transition_styleTween from \"./styleTween.js\";\nimport transition_text from \"./text.js\";\nimport transition_textTween from \"./textTween.js\";\nimport transition_transition from \"./transition.js\";\nimport transition_tween from \"./tween.js\";\nimport transition_end from \"./end.js\";\nvar id = 0;\nexport function Transition(groups, parents, name, id) {\n this._groups = groups;\n this._parents = parents;\n this._name = name;\n this._id = id;\n}\nexport default function transition(name) {\n return selection().transition(name);\n}\nexport function newId() {\n return ++id;\n}\nvar selection_prototype = selection.prototype;\nTransition.prototype = transition.prototype = {\n constructor: Transition,\n select: transition_select,\n selectAll: transition_selectAll,\n selectChild: selection_prototype.selectChild,\n selectChildren: selection_prototype.selectChildren,\n filter: transition_filter,\n merge: transition_merge,\n selection: transition_selection,\n transition: transition_transition,\n call: selection_prototype.call,\n nodes: selection_prototype.nodes,\n node: selection_prototype.node,\n size: selection_prototype.size,\n empty: selection_prototype.empty,\n each: selection_prototype.each,\n on: transition_on,\n attr: transition_attr,\n attrTween: transition_attrTween,\n style: transition_style,\n styleTween: transition_styleTween,\n text: transition_text,\n textTween: transition_textTween,\n remove: transition_remove,\n tween: transition_tween,\n delay: transition_delay,\n duration: transition_duration,\n ease: transition_ease,\n easeVarying: transition_easeVarying,\n end: transition_end,\n [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};","export function cubicIn(t) {\n return t * t * t;\n}\nexport function cubicOut(t) {\n return --t * t * t + 1;\n}\nexport function cubicInOut(t) {\n return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}","import { Transition, newId } from \"../transition/index.js\";\nimport schedule from \"../transition/schedule.js\";\nimport { easeCubicInOut } from \"d3-ease\";\nimport { now } from \"d3-timer\";\nvar defaultTiming = {\n time: null,\n // Set on use.\n delay: 0,\n duration: 250,\n ease: easeCubicInOut\n};\nfunction inherit(node, id) {\n var timing;\n while (!(timing = node.__transition) || !(timing = timing[id])) {\n if (!(node = node.parentNode)) {\n throw new Error(`transition ${id} not found`);\n }\n }\n return timing;\n}\nexport default function (name) {\n var id, timing;\n if (name instanceof Transition) {\n id = name._id, name = name._name;\n } else {\n id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n }\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n schedule(node, name, id, i, group, timing || inherit(node, id));\n }\n }\n }\n return new Transition(groups, this._parents, name, id);\n}","import { selection } from \"d3-selection\";\nimport selection_interrupt from \"./interrupt.js\";\nimport selection_transition from \"./transition.js\";\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;","export default x => () => x;","export default function BrushEvent(type, {\n sourceEvent,\n target,\n selection,\n mode,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {\n value: type,\n enumerable: true,\n configurable: true\n },\n sourceEvent: {\n value: sourceEvent,\n enumerable: true,\n configurable: true\n },\n target: {\n value: target,\n enumerable: true,\n configurable: true\n },\n selection: {\n value: selection,\n enumerable: true,\n configurable: true\n },\n mode: {\n value: mode,\n enumerable: true,\n configurable: true\n },\n _: {\n value: dispatch\n }\n });\n}","export function nopropagation(event) {\n event.stopImmediatePropagation();\n}\nexport default function (event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}","import { dispatch } from \"d3-dispatch\";\nimport { dragDisable, dragEnable } from \"d3-drag\";\nimport { interpolate } from \"d3-interpolate\";\nimport { pointer, select } from \"d3-selection\";\nimport { interrupt } from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport BrushEvent from \"./event.js\";\nimport noevent, { nopropagation } from \"./noevent.js\";\nvar MODE_DRAG = {\n name: \"drag\"\n },\n MODE_SPACE = {\n name: \"space\"\n },\n MODE_HANDLE = {\n name: \"handle\"\n },\n MODE_CENTER = {\n name: \"center\"\n };\nconst {\n abs,\n max,\n min\n} = Math;\nfunction number1(e) {\n return [+e[0], +e[1]];\n}\nfunction number2(e) {\n return [number1(e[0]), number1(e[1])];\n}\nvar X = {\n name: \"x\",\n handles: [\"w\", \"e\"].map(type),\n input: function (x, e) {\n return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]];\n },\n output: function (xy) {\n return xy && [xy[0][0], xy[1][0]];\n }\n};\nvar Y = {\n name: \"y\",\n handles: [\"n\", \"s\"].map(type),\n input: function (y, e) {\n return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]];\n },\n output: function (xy) {\n return xy && [xy[0][1], xy[1][1]];\n }\n};\nvar XY = {\n name: \"xy\",\n handles: [\"n\", \"w\", \"e\", \"s\", \"nw\", \"ne\", \"sw\", \"se\"].map(type),\n input: function (xy) {\n return xy == null ? null : number2(xy);\n },\n output: function (xy) {\n return xy;\n }\n};\nvar cursors = {\n overlay: \"crosshair\",\n selection: \"move\",\n n: \"ns-resize\",\n e: \"ew-resize\",\n s: \"ns-resize\",\n w: \"ew-resize\",\n nw: \"nwse-resize\",\n ne: \"nesw-resize\",\n se: \"nwse-resize\",\n sw: \"nesw-resize\"\n};\nvar flipX = {\n e: \"w\",\n w: \"e\",\n nw: \"ne\",\n ne: \"nw\",\n se: \"sw\",\n sw: \"se\"\n};\nvar flipY = {\n n: \"s\",\n s: \"n\",\n nw: \"sw\",\n ne: \"se\",\n se: \"ne\",\n sw: \"nw\"\n};\nvar signsX = {\n overlay: +1,\n selection: +1,\n n: null,\n e: +1,\n s: null,\n w: -1,\n nw: -1,\n ne: +1,\n se: +1,\n sw: -1\n};\nvar signsY = {\n overlay: +1,\n selection: +1,\n n: -1,\n e: null,\n s: +1,\n w: null,\n nw: -1,\n ne: -1,\n se: +1,\n sw: +1\n};\nfunction type(t) {\n return {\n type: t\n };\n}\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n return !event.ctrlKey && !event.button;\n}\nfunction defaultExtent() {\n var svg = this.ownerSVGElement || this;\n if (svg.hasAttribute(\"viewBox\")) {\n svg = svg.viewBox.baseVal;\n return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]];\n }\n return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];\n}\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || \"ontouchstart\" in this;\n}\n\n// Like d3.local, but with the name “__brush” rather than auto-generated.\nfunction local(node) {\n while (!node.__brush) if (!(node = node.parentNode)) return;\n return node.__brush;\n}\nfunction empty(extent) {\n return extent[0][0] === extent[1][0] || extent[0][1] === extent[1][1];\n}\nexport function brushSelection(node) {\n var state = node.__brush;\n return state ? state.dim.output(state.selection) : null;\n}\nexport function brushX() {\n return brush(X);\n}\nexport function brushY() {\n return brush(Y);\n}\nexport default function () {\n return brush(XY);\n}\nfunction brush(dim) {\n var extent = defaultExtent,\n filter = defaultFilter,\n touchable = defaultTouchable,\n keys = true,\n listeners = dispatch(\"start\", \"brush\", \"end\"),\n handleSize = 6,\n touchending;\n function brush(group) {\n var overlay = group.property(\"__brush\", initialize).selectAll(\".overlay\").data([type(\"overlay\")]);\n overlay.enter().append(\"rect\").attr(\"class\", \"overlay\").attr(\"pointer-events\", \"all\").attr(\"cursor\", cursors.overlay).merge(overlay).each(function () {\n var extent = local(this).extent;\n select(this).attr(\"x\", extent[0][0]).attr(\"y\", extent[0][1]).attr(\"width\", extent[1][0] - extent[0][0]).attr(\"height\", extent[1][1] - extent[0][1]);\n });\n group.selectAll(\".selection\").data([type(\"selection\")]).enter().append(\"rect\").attr(\"class\", \"selection\").attr(\"cursor\", cursors.selection).attr(\"fill\", \"#777\").attr(\"fill-opacity\", 0.3).attr(\"stroke\", \"#fff\").attr(\"shape-rendering\", \"crispEdges\");\n var handle = group.selectAll(\".handle\").data(dim.handles, function (d) {\n return d.type;\n });\n handle.exit().remove();\n handle.enter().append(\"rect\").attr(\"class\", function (d) {\n return \"handle handle--\" + d.type;\n }).attr(\"cursor\", function (d) {\n return cursors[d.type];\n });\n group.each(redraw).attr(\"fill\", \"none\").attr(\"pointer-events\", \"all\").on(\"mousedown.brush\", started).filter(touchable).on(\"touchstart.brush\", started).on(\"touchmove.brush\", touchmoved).on(\"touchend.brush touchcancel.brush\", touchended).style(\"touch-action\", \"none\").style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n brush.move = function (group, selection, event) {\n if (group.tween) {\n group.on(\"start.brush\", function (event) {\n emitter(this, arguments).beforestart().start(event);\n }).on(\"interrupt.brush end.brush\", function (event) {\n emitter(this, arguments).end(event);\n }).tween(\"brush\", function () {\n var that = this,\n state = that.__brush,\n emit = emitter(that, arguments),\n selection0 = state.selection,\n selection1 = dim.input(typeof selection === \"function\" ? selection.apply(this, arguments) : selection, state.extent),\n i = interpolate(selection0, selection1);\n function tween(t) {\n state.selection = t === 1 && selection1 === null ? null : i(t);\n redraw.call(that);\n emit.brush();\n }\n return selection0 !== null && selection1 !== null ? tween : tween(1);\n });\n } else {\n group.each(function () {\n var that = this,\n args = arguments,\n state = that.__brush,\n selection1 = dim.input(typeof selection === \"function\" ? selection.apply(that, args) : selection, state.extent),\n emit = emitter(that, args).beforestart();\n interrupt(that);\n state.selection = selection1 === null ? null : selection1;\n redraw.call(that);\n emit.start(event).brush(event).end(event);\n });\n }\n };\n brush.clear = function (group, event) {\n brush.move(group, null, event);\n };\n function redraw() {\n var group = select(this),\n selection = local(this).selection;\n if (selection) {\n group.selectAll(\".selection\").style(\"display\", null).attr(\"x\", selection[0][0]).attr(\"y\", selection[0][1]).attr(\"width\", selection[1][0] - selection[0][0]).attr(\"height\", selection[1][1] - selection[0][1]);\n group.selectAll(\".handle\").style(\"display\", null).attr(\"x\", function (d) {\n return d.type[d.type.length - 1] === \"e\" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2;\n }).attr(\"y\", function (d) {\n return d.type[0] === \"s\" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2;\n }).attr(\"width\", function (d) {\n return d.type === \"n\" || d.type === \"s\" ? selection[1][0] - selection[0][0] + handleSize : handleSize;\n }).attr(\"height\", function (d) {\n return d.type === \"e\" || d.type === \"w\" ? selection[1][1] - selection[0][1] + handleSize : handleSize;\n });\n } else {\n group.selectAll(\".selection,.handle\").style(\"display\", \"none\").attr(\"x\", null).attr(\"y\", null).attr(\"width\", null).attr(\"height\", null);\n }\n }\n function emitter(that, args, clean) {\n var emit = that.__brush.emitter;\n return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean);\n }\n function Emitter(that, args, clean) {\n this.that = that;\n this.args = args;\n this.state = that.__brush;\n this.active = 0;\n this.clean = clean;\n }\n Emitter.prototype = {\n beforestart: function () {\n if (++this.active === 1) this.state.emitter = this, this.starting = true;\n return this;\n },\n start: function (event, mode) {\n if (this.starting) this.starting = false, this.emit(\"start\", event, mode);else this.emit(\"brush\", event);\n return this;\n },\n brush: function (event, mode) {\n this.emit(\"brush\", event, mode);\n return this;\n },\n end: function (event, mode) {\n if (--this.active === 0) delete this.state.emitter, this.emit(\"end\", event, mode);\n return this;\n },\n emit: function (type, event, mode) {\n var d = select(this.that).datum();\n listeners.call(type, this.that, new BrushEvent(type, {\n sourceEvent: event,\n target: brush,\n selection: dim.output(this.state.selection),\n mode,\n dispatch: listeners\n }), d);\n }\n };\n function started(event) {\n if (touchending && !event.touches) return;\n if (!filter.apply(this, arguments)) return;\n var that = this,\n type = event.target.__data__.type,\n mode = (keys && event.metaKey ? type = \"overlay\" : type) === \"selection\" ? MODE_DRAG : keys && event.altKey ? MODE_CENTER : MODE_HANDLE,\n signX = dim === Y ? null : signsX[type],\n signY = dim === X ? null : signsY[type],\n state = local(that),\n extent = state.extent,\n selection = state.selection,\n W = extent[0][0],\n w0,\n w1,\n N = extent[0][1],\n n0,\n n1,\n E = extent[1][0],\n e0,\n e1,\n S = extent[1][1],\n s0,\n s1,\n dx = 0,\n dy = 0,\n moving,\n shifting = signX && signY && keys && event.shiftKey,\n lockX,\n lockY,\n points = Array.from(event.touches || [event], t => {\n const i = t.identifier;\n t = pointer(t, that);\n t.point0 = t.slice();\n t.identifier = i;\n return t;\n });\n interrupt(that);\n var emit = emitter(that, arguments, true).beforestart();\n if (type === \"overlay\") {\n if (selection) moving = true;\n const pts = [points[0], points[1] || points[0]];\n state.selection = selection = [[w0 = dim === Y ? W : min(pts[0][0], pts[1][0]), n0 = dim === X ? N : min(pts[0][1], pts[1][1])], [e0 = dim === Y ? E : max(pts[0][0], pts[1][0]), s0 = dim === X ? S : max(pts[0][1], pts[1][1])]];\n if (points.length > 1) move(event);\n } else {\n w0 = selection[0][0];\n n0 = selection[0][1];\n e0 = selection[1][0];\n s0 = selection[1][1];\n }\n w1 = w0;\n n1 = n0;\n e1 = e0;\n s1 = s0;\n var group = select(that).attr(\"pointer-events\", \"none\");\n var overlay = group.selectAll(\".overlay\").attr(\"cursor\", cursors[type]);\n if (event.touches) {\n emit.moved = moved;\n emit.ended = ended;\n } else {\n var view = select(event.view).on(\"mousemove.brush\", moved, true).on(\"mouseup.brush\", ended, true);\n if (keys) view.on(\"keydown.brush\", keydowned, true).on(\"keyup.brush\", keyupped, true);\n dragDisable(event.view);\n }\n redraw.call(that);\n emit.start(event, mode.name);\n function moved(event) {\n for (const p of event.changedTouches || [event]) {\n for (const d of points) if (d.identifier === p.identifier) d.cur = pointer(p, that);\n }\n if (shifting && !lockX && !lockY && points.length === 1) {\n const point = points[0];\n if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1])) lockY = true;else lockX = true;\n }\n for (const point of points) if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1];\n moving = true;\n noevent(event);\n move(event);\n }\n function move(event) {\n const point = points[0],\n point0 = point.point0;\n var t;\n dx = point[0] - point0[0];\n dy = point[1] - point0[1];\n switch (mode) {\n case MODE_SPACE:\n case MODE_DRAG:\n {\n if (signX) dx = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;\n if (signY) dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;\n break;\n }\n case MODE_HANDLE:\n {\n if (points[1]) {\n if (signX) w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1;\n if (signY) n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1;\n } else {\n if (signX < 0) dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0;else if (signX > 0) dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx;\n if (signY < 0) dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0;else if (signY > 0) dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy;\n }\n break;\n }\n case MODE_CENTER:\n {\n if (signX) w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX));\n if (signY) n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, min(S, s0 + dy * signY));\n break;\n }\n }\n if (e1 < w1) {\n signX *= -1;\n t = w0, w0 = e0, e0 = t;\n t = w1, w1 = e1, e1 = t;\n if (type in flipX) overlay.attr(\"cursor\", cursors[type = flipX[type]]);\n }\n if (s1 < n1) {\n signY *= -1;\n t = n0, n0 = s0, s0 = t;\n t = n1, n1 = s1, s1 = t;\n if (type in flipY) overlay.attr(\"cursor\", cursors[type = flipY[type]]);\n }\n if (state.selection) selection = state.selection; // May be set by brush.move!\n if (lockX) w1 = selection[0][0], e1 = selection[1][0];\n if (lockY) n1 = selection[0][1], s1 = selection[1][1];\n if (selection[0][0] !== w1 || selection[0][1] !== n1 || selection[1][0] !== e1 || selection[1][1] !== s1) {\n state.selection = [[w1, n1], [e1, s1]];\n redraw.call(that);\n emit.brush(event, mode.name);\n }\n }\n function ended(event) {\n nopropagation(event);\n if (event.touches) {\n if (event.touches.length) return;\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function () {\n touchending = null;\n }, 500); // Ghost clicks are delayed!\n } else {\n dragEnable(event.view, moving);\n view.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\", null);\n }\n group.attr(\"pointer-events\", \"all\");\n overlay.attr(\"cursor\", cursors.overlay);\n if (state.selection) selection = state.selection; // May be set by brush.move (on start)!\n if (empty(selection)) state.selection = null, redraw.call(that);\n emit.end(event, mode.name);\n }\n function keydowned(event) {\n switch (event.keyCode) {\n case 16:\n {\n // SHIFT\n shifting = signX && signY;\n break;\n }\n case 18:\n {\n // ALT\n if (mode === MODE_HANDLE) {\n if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n mode = MODE_CENTER;\n move(event);\n }\n break;\n }\n case 32:\n {\n // SPACE; takes priority over ALT\n if (mode === MODE_HANDLE || mode === MODE_CENTER) {\n if (signX < 0) e0 = e1 - dx;else if (signX > 0) w0 = w1 - dx;\n if (signY < 0) s0 = s1 - dy;else if (signY > 0) n0 = n1 - dy;\n mode = MODE_SPACE;\n overlay.attr(\"cursor\", cursors.selection);\n move(event);\n }\n break;\n }\n default:\n return;\n }\n noevent(event);\n }\n function keyupped(event) {\n switch (event.keyCode) {\n case 16:\n {\n // SHIFT\n if (shifting) {\n lockX = lockY = shifting = false;\n move(event);\n }\n break;\n }\n case 18:\n {\n // ALT\n if (mode === MODE_CENTER) {\n if (signX < 0) e0 = e1;else if (signX > 0) w0 = w1;\n if (signY < 0) s0 = s1;else if (signY > 0) n0 = n1;\n mode = MODE_HANDLE;\n move(event);\n }\n break;\n }\n case 32:\n {\n // SPACE\n if (mode === MODE_SPACE) {\n if (event.altKey) {\n if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n mode = MODE_CENTER;\n } else {\n if (signX < 0) e0 = e1;else if (signX > 0) w0 = w1;\n if (signY < 0) s0 = s1;else if (signY > 0) n0 = n1;\n mode = MODE_HANDLE;\n }\n overlay.attr(\"cursor\", cursors[type]);\n move(event);\n }\n break;\n }\n default:\n return;\n }\n noevent(event);\n }\n }\n function touchmoved(event) {\n emitter(this, arguments).moved(event);\n }\n function touchended(event) {\n emitter(this, arguments).ended(event);\n }\n function initialize() {\n var state = this.__brush || {\n selection: null\n };\n state.extent = number2(extent.apply(this, arguments));\n state.dim = dim;\n return state;\n }\n brush.extent = function (_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant(number2(_)), brush) : extent;\n };\n brush.filter = function (_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), brush) : filter;\n };\n brush.touchable = function (_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), brush) : touchable;\n };\n brush.handleSize = function (_) {\n return arguments.length ? (handleSize = +_, brush) : handleSize;\n };\n brush.keyModifiers = function (_) {\n return arguments.length ? (keys = !!_, brush) : keys;\n };\n brush.on = function () {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? brush : value;\n };\n return brush;\n}","export default function ascending(a, b) {\n return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}","export default function descending(a, b) {\n return a == null || b == null ? NaN : b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}","import ascending from \"./ascending.js\";\nimport descending from \"./descending.js\";\nexport default function bisector(f) {\n let compare1, compare2, delta;\n\n // If an accessor is specified, promote it to a comparator. In this case we\n // can test whether the search value is (self-) comparable. We can’t do this\n // for a comparator (except for specific, known comparators) because we can’t\n // tell if the comparator is symmetric, and an asymmetric comparator can’t be\n // used to test whether a single value is comparable.\n if (f.length !== 2) {\n compare1 = ascending;\n compare2 = (d, x) => ascending(f(d), x);\n delta = (d, x) => f(d) - x;\n } else {\n compare1 = f === ascending || f === descending ? f : zero;\n compare2 = f;\n delta = f;\n }\n function left(a, x, lo = 0, hi = a.length) {\n if (lo < hi) {\n if (compare1(x, x) !== 0) return hi;\n do {\n const mid = lo + hi >>> 1;\n if (compare2(a[mid], x) < 0) lo = mid + 1;else hi = mid;\n } while (lo < hi);\n }\n return lo;\n }\n function right(a, x, lo = 0, hi = a.length) {\n if (lo < hi) {\n if (compare1(x, x) !== 0) return hi;\n do {\n const mid = lo + hi >>> 1;\n if (compare2(a[mid], x) <= 0) lo = mid + 1;else hi = mid;\n } while (lo < hi);\n }\n return lo;\n }\n function center(a, x, lo = 0, hi = a.length) {\n const i = left(a, x, lo, hi - 1);\n return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n }\n return {\n left,\n center,\n right\n };\n}\nfunction zero() {\n return 0;\n}","export default function number(x) {\n return x === null ? NaN : +x;\n}\nexport function* numbers(values, valueof) {\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n yield value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n yield value;\n }\n }\n }\n}","import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\nimport number from \"./number.js\";\nconst ascendingBisect = bisector(ascending);\nexport const bisectRight = ascendingBisect.right;\nexport const bisectLeft = ascendingBisect.left;\nexport const bisectCenter = bisector(number).center;\nexport default bisectRight;","export class InternMap extends Map {\n constructor(entries, key = keyof) {\n super();\n Object.defineProperties(this, {\n _intern: {\n value: new Map()\n },\n _key: {\n value: key\n }\n });\n if (entries != null) for (const [key, value] of entries) this.set(key, value);\n }\n get(key) {\n return super.get(intern_get(this, key));\n }\n has(key) {\n return super.has(intern_get(this, key));\n }\n set(key, value) {\n return super.set(intern_set(this, key), value);\n }\n delete(key) {\n return super.delete(intern_delete(this, key));\n }\n}\nexport class InternSet extends Set {\n constructor(values, key = keyof) {\n super();\n Object.defineProperties(this, {\n _intern: {\n value: new Map()\n },\n _key: {\n value: key\n }\n });\n if (values != null) for (const value of values) this.add(value);\n }\n has(value) {\n return super.has(intern_get(this, value));\n }\n add(value) {\n return super.add(intern_set(this, value));\n }\n delete(value) {\n return super.delete(intern_delete(this, value));\n }\n}\nfunction intern_get({\n _intern,\n _key\n}, value) {\n const key = _key(value);\n return _intern.has(key) ? _intern.get(key) : value;\n}\nfunction intern_set({\n _intern,\n _key\n}, value) {\n const key = _key(value);\n if (_intern.has(key)) return _intern.get(key);\n _intern.set(key, value);\n return value;\n}\nfunction intern_delete({\n _intern,\n _key\n}, value) {\n const key = _key(value);\n if (_intern.has(key)) {\n value = _intern.get(key);\n _intern.delete(key);\n }\n return value;\n}\nfunction keyof(value) {\n return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}","const e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\nfunction tickSpec(start, stop, count) {\n const step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log10(step)),\n error = step / Math.pow(10, power),\n factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;\n let i1, i2, inc;\n if (power < 0) {\n inc = Math.pow(10, -power) / factor;\n i1 = Math.round(start * inc);\n i2 = Math.round(stop * inc);\n if (i1 / inc < start) ++i1;\n if (i2 / inc > stop) --i2;\n inc = -inc;\n } else {\n inc = Math.pow(10, power) * factor;\n i1 = Math.round(start / inc);\n i2 = Math.round(stop / inc);\n if (i1 * inc < start) ++i1;\n if (i2 * inc > stop) --i2;\n }\n if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);\n return [i1, i2, inc];\n}\nexport default function ticks(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n if (!(count > 0)) return [];\n if (start === stop) return [start];\n const reverse = stop < start,\n [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);\n if (!(i2 >= i1)) return [];\n const n = i2 - i1 + 1,\n ticks = new Array(n);\n if (reverse) {\n if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc;\n } else {\n if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc;\n }\n return ticks;\n}\nexport function tickIncrement(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n return tickSpec(start, stop, count)[2];\n}\nexport function tickStep(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n const reverse = stop < start,\n inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);\n return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);\n}","import max from \"./max.js\";\nimport maxIndex from \"./maxIndex.js\";\nimport min from \"./min.js\";\nimport minIndex from \"./minIndex.js\";\nimport quickselect from \"./quickselect.js\";\nimport number, { numbers } from \"./number.js\";\nimport { ascendingDefined } from \"./sort.js\";\nimport greatest from \"./greatest.js\";\nexport default function quantile(values, p, valueof) {\n values = Float64Array.from(numbers(values, valueof));\n if (!(n = values.length) || isNaN(p = +p)) return;\n if (p <= 0 || n < 2) return min(values);\n if (p >= 1) return max(values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = max(quickselect(values, i0).subarray(0, i0 + 1)),\n value1 = min(values.subarray(i0 + 1));\n return value0 + (value1 - value0) * (i - i0);\n}\nexport function quantileSorted(values, p, valueof = number) {\n if (!(n = values.length) || isNaN(p = +p)) return;\n if (p <= 0 || n < 2) return +valueof(values[0], 0, values);\n if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = +valueof(values[i0], i0, values),\n value1 = +valueof(values[i0 + 1], i0 + 1, values);\n return value0 + (value1 - value0) * (i - i0);\n}\nexport function quantileIndex(values, p, valueof = number) {\n if (isNaN(p = +p)) return;\n numbers = Float64Array.from(values, (_, i) => number(valueof(values[i], i, values)));\n if (p <= 0) return minIndex(numbers);\n if (p >= 1) return maxIndex(numbers);\n var numbers,\n index = Uint32Array.from(values, (_, i) => i),\n j = numbers.length - 1,\n i = Math.floor(j * p);\n quickselect(index, i, 0, j, (i, j) => ascendingDefined(numbers[i], numbers[j]));\n i = greatest(index.subarray(0, i + 1), i => numbers[i]);\n return i >= 0 ? i : -1;\n}","export default function range(start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n while (++i < n) {\n range[i] = start + i * step;\n }\n return range;\n}","export function initRange(domain, range) {\n switch (arguments.length) {\n case 0:\n break;\n case 1:\n this.range(domain);\n break;\n default:\n this.range(range).domain(domain);\n break;\n }\n return this;\n}\nexport function initInterpolator(domain, interpolator) {\n switch (arguments.length) {\n case 0:\n break;\n case 1:\n {\n if (typeof domain === \"function\") this.interpolator(domain);else this.range(domain);\n break;\n }\n default:\n {\n this.domain(domain);\n if (typeof interpolator === \"function\") this.interpolator(interpolator);else this.range(interpolator);\n break;\n }\n }\n return this;\n}","import { InternMap } from \"d3-array\";\nimport { initRange } from \"./init.js\";\nexport const implicit = Symbol(\"implicit\");\nexport default function ordinal() {\n var index = new InternMap(),\n domain = [],\n range = [],\n unknown = implicit;\n function scale(d) {\n let i = index.get(d);\n if (i === undefined) {\n if (unknown !== implicit) return unknown;\n index.set(d, i = domain.push(d) - 1);\n }\n return range[i % range.length];\n }\n scale.domain = function (_) {\n if (!arguments.length) return domain.slice();\n domain = [], index = new InternMap();\n for (const value of _) {\n if (index.has(value)) continue;\n index.set(value, domain.push(value) - 1);\n }\n return scale;\n };\n scale.range = function (_) {\n return arguments.length ? (range = Array.from(_), scale) : range.slice();\n };\n scale.unknown = function (_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n scale.copy = function () {\n return ordinal(domain, range).unknown(unknown);\n };\n initRange.apply(scale, arguments);\n return scale;\n}","import { range as sequence } from \"d3-array\";\nimport { initRange } from \"./init.js\";\nimport ordinal from \"./ordinal.js\";\nexport default function band() {\n var scale = ordinal().unknown(undefined),\n domain = scale.domain,\n ordinalRange = scale.range,\n r0 = 0,\n r1 = 1,\n step,\n bandwidth,\n round = false,\n paddingInner = 0,\n paddingOuter = 0,\n align = 0.5;\n delete scale.unknown;\n function rescale() {\n var n = domain().length,\n reverse = r1 < r0,\n start = reverse ? r1 : r0,\n stop = reverse ? r0 : r1;\n step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n if (round) step = Math.floor(step);\n start += (stop - start - step * (n - paddingInner)) * align;\n bandwidth = step * (1 - paddingInner);\n if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n var values = sequence(n).map(function (i) {\n return start + step * i;\n });\n return ordinalRange(reverse ? values.reverse() : values);\n }\n scale.domain = function (_) {\n return arguments.length ? (domain(_), rescale()) : domain();\n };\n scale.range = function (_) {\n return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1];\n };\n scale.rangeRound = function (_) {\n return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale();\n };\n scale.bandwidth = function () {\n return bandwidth;\n };\n scale.step = function () {\n return step;\n };\n scale.round = function (_) {\n return arguments.length ? (round = !!_, rescale()) : round;\n };\n scale.padding = function (_) {\n return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;\n };\n scale.paddingInner = function (_) {\n return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;\n };\n scale.paddingOuter = function (_) {\n return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;\n };\n scale.align = function (_) {\n return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n };\n scale.copy = function () {\n return band(domain(), [r0, r1]).round(round).paddingInner(paddingInner).paddingOuter(paddingOuter).align(align);\n };\n return initRange.apply(rescale(), arguments);\n}\nfunction pointish(scale) {\n var copy = scale.copy;\n scale.padding = scale.paddingOuter;\n delete scale.paddingInner;\n delete scale.paddingOuter;\n scale.copy = function () {\n return pointish(copy());\n };\n return scale;\n}\nexport function point() {\n return pointish(band.apply(null, arguments).paddingInner(1));\n}","export default function constants(x) {\n return function () {\n return x;\n };\n}","export default function number(x) {\n return +x;\n}","import { bisect } from \"d3-array\";\nimport { interpolate as interpolateValue, interpolateNumber, interpolateRound } from \"d3-interpolate\";\nimport constant from \"./constant.js\";\nimport number from \"./number.js\";\nvar unit = [0, 1];\nexport function identity(x) {\n return x;\n}\nfunction normalize(a, b) {\n return (b -= a = +a) ? function (x) {\n return (x - a) / b;\n } : constant(isNaN(b) ? NaN : 0.5);\n}\nfunction clamper(a, b) {\n var t;\n if (a > b) t = a, a = b, b = t;\n return function (x) {\n return Math.max(a, Math.min(b, x));\n };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n var d0 = domain[0],\n d1 = domain[1],\n r0 = range[0],\n r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function (x) {\n return r0(d0(x));\n };\n}\nfunction polymap(domain, range, interpolate) {\n var j = Math.min(domain.length, range.length) - 1,\n d = new Array(j),\n r = new Array(j),\n i = -1;\n\n // Reverse descending domains.\n if (domain[j] < domain[0]) {\n domain = domain.slice().reverse();\n range = range.slice().reverse();\n }\n while (++i < j) {\n d[i] = normalize(domain[i], domain[i + 1]);\n r[i] = interpolate(range[i], range[i + 1]);\n }\n return function (x) {\n var i = bisect(domain, x, 1, j) - 1;\n return r[i](d[i](x));\n };\n}\nexport function copy(source, target) {\n return target.domain(source.domain()).range(source.range()).interpolate(source.interpolate()).clamp(source.clamp()).unknown(source.unknown());\n}\nexport function transformer() {\n var domain = unit,\n range = unit,\n interpolate = interpolateValue,\n transform,\n untransform,\n unknown,\n clamp = identity,\n piecewise,\n output,\n input;\n function rescale() {\n var n = Math.min(domain.length, range.length);\n if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n piecewise = n > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n }\n scale.invert = function (y) {\n return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n };\n scale.domain = function (_) {\n return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();\n };\n scale.range = function (_) {\n return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n };\n scale.rangeRound = function (_) {\n return range = Array.from(_), interpolate = interpolateRound, rescale();\n };\n scale.clamp = function (_) {\n return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n };\n scale.interpolate = function (_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n scale.unknown = function (_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n return function (t, u) {\n transform = t, untransform = u;\n return rescale();\n };\n}\nexport default function continuous() {\n return transformer()(identity, identity);\n}","export default function (x) {\n return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString(\"en\").replace(/,/g, \"\") : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i,\n coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1)];\n}","import { formatDecimalParts } from \"./formatDecimal.js\";\nexport default function (x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}","export default function (grouping, thousands) {\n return function (value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n return t.reverse().join(thousands);\n };\n}","export default function (numerals) {\n return function (value) {\n return value.replace(/[0-9]/g, function (i) {\n return numerals[+i];\n });\n };\n}","// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\nFormatSpecifier.prototype.toString = function () {\n return this.fill + this.align + this.sign + this.symbol + (this.zero ? \"0\" : \"\") + (this.width === undefined ? \"\" : Math.max(1, this.width | 0)) + (this.comma ? \",\" : \"\") + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0)) + (this.trim ? \"~\" : \"\") + this.type;\n};","// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function (s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\":\n i0 = i1 = i;\n break;\n case \"0\":\n if (i0 === 0) i0 = i;\n i1 = i;\n break;\n default:\n if (!+s[i]) break out;\n if (i0 > 0) i0 = 0;\n break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}","import { formatDecimalParts } from \"./formatDecimal.js\";\nexport var prefixExponent;\nexport default function (x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join(\"0\") : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i) : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}","import { formatDecimalParts } from \"./formatDecimal.js\";\nexport default function (x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1) : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}","import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\nexport default {\n \"%\": (x, p) => (x * 100).toFixed(p),\n \"b\": x => Math.round(x).toString(2),\n \"c\": x => x + \"\",\n \"d\": formatDecimal,\n \"e\": (x, p) => x.toExponential(p),\n \"f\": (x, p) => x.toFixed(p),\n \"g\": (x, p) => x.toPrecision(p),\n \"o\": x => Math.round(x).toString(8),\n \"p\": (x, p) => formatRounded(x * 100, p),\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": x => Math.round(x).toString(16).toUpperCase(),\n \"x\": x => Math.round(x).toString(16)\n};","export default function (x) {\n return x;\n}","import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport { prefixExponent } from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\nvar map = Array.prototype.map,\n prefixes = [\"y\", \"z\", \"a\", \"f\", \"p\", \"n\", \"µ\", \"m\", \"\", \"k\", \"M\", \"G\", \"T\", \"P\", \"E\", \"Z\", \"Y\"];\nexport default function (locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"−\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type;\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || fill === \"0\" && align === \"=\") zero = true, fill = \"0\", align = \"=\";\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision === undefined ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i,\n n,\n c;\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = value < 0 || 1 / value < 0;\n\n // Perform the initial formatting.\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n // Trim insignificant zeros.\n if (trim) value = formatTrim(value);\n\n // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? sign === \"(\" ? sign : minus : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n if (maybeSuffix) {\n i = -1, n = value.length;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\":\n value = valuePrefix + value + valueSuffix + padding;\n break;\n case \"=\":\n value = valuePrefix + padding + value + valueSuffix;\n break;\n case \"^\":\n value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length);\n break;\n default:\n value = padding + valuePrefix + value + valueSuffix;\n break;\n }\n return numerals(value);\n }\n format.toString = function () {\n return specifier + \"\";\n };\n return format;\n }\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function (value) {\n return f(k * value) + prefix;\n };\n }\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}","import formatLocale from \"./locale.js\";\nvar locale;\nexport var format;\nexport var formatPrefix;\ndefaultLocale({\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"]\n});\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n}","import exponent from \"./exponent.js\";\nexport default function (step) {\n return Math.max(0, -exponent(Math.abs(step)));\n}","import exponent from \"./exponent.js\";\nexport default function (step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}","import exponent from \"./exponent.js\";\nexport default function (step, max) {\n step = Math.abs(step), max = Math.abs(max) - step;\n return Math.max(0, exponent(max) - exponent(step)) + 1;\n}","import { tickStep } from \"d3-array\";\nimport { format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound } from \"d3-format\";\nexport default function tickFormat(start, stop, count, specifier) {\n var step = tickStep(start, stop, count),\n precision;\n specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n switch (specifier.type) {\n case \"s\":\n {\n var value = Math.max(Math.abs(start), Math.abs(stop));\n if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n return formatPrefix(specifier, value);\n }\n case \"\":\n case \"e\":\n case \"g\":\n case \"p\":\n case \"r\":\n {\n if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n break;\n }\n case \"f\":\n case \"%\":\n {\n if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n break;\n }\n }\n return format(specifier);\n}","import { ticks, tickIncrement } from \"d3-array\";\nimport continuous, { copy } from \"./continuous.js\";\nimport { initRange } from \"./init.js\";\nimport tickFormat from \"./tickFormat.js\";\nexport function linearish(scale) {\n var domain = scale.domain;\n scale.ticks = function (count) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n };\n scale.tickFormat = function (count, specifier) {\n var d = domain();\n return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n };\n scale.nice = function (count) {\n if (count == null) count = 10;\n var d = domain();\n var i0 = 0;\n var i1 = d.length - 1;\n var start = d[i0];\n var stop = d[i1];\n var prestep;\n var step;\n var maxIter = 10;\n if (stop < start) {\n step = start, start = stop, stop = step;\n step = i0, i0 = i1, i1 = step;\n }\n while (maxIter-- > 0) {\n step = tickIncrement(start, stop, count);\n if (step === prestep) {\n d[i0] = start;\n d[i1] = stop;\n return domain(d);\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n } else {\n break;\n }\n prestep = step;\n }\n return scale;\n };\n return scale;\n}\nexport default function linear() {\n var scale = continuous();\n scale.copy = function () {\n return copy(scale, linear());\n };\n initRange.apply(scale, arguments);\n return linearish(scale);\n}","export default function nice(domain, interval) {\n domain = domain.slice();\n var i0 = 0,\n i1 = domain.length - 1,\n x0 = domain[i0],\n x1 = domain[i1],\n t;\n if (x1 < x0) {\n t = i0, i0 = i1, i1 = t;\n t = x0, x0 = x1, x1 = t;\n }\n domain[i0] = interval.floor(x0);\n domain[i1] = interval.ceil(x1);\n return domain;\n}","import { ascending, bisect, quantileSorted as threshold } from \"d3-array\";\nimport { initRange } from \"./init.js\";\nexport default function quantile() {\n var domain = [],\n range = [],\n thresholds = [],\n unknown;\n function rescale() {\n var i = 0,\n n = Math.max(1, range.length);\n thresholds = new Array(n - 1);\n while (++i < n) thresholds[i - 1] = threshold(domain, i / n);\n return scale;\n }\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : range[bisect(thresholds, x)];\n }\n scale.invertExtent = function (y) {\n var i = range.indexOf(y);\n return i < 0 ? [NaN, NaN] : [i > 0 ? thresholds[i - 1] : domain[0], i < thresholds.length ? thresholds[i] : domain[domain.length - 1]];\n };\n scale.domain = function (_) {\n if (!arguments.length) return domain.slice();\n domain = [];\n for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d);\n domain.sort(ascending);\n return rescale();\n };\n scale.range = function (_) {\n return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n };\n scale.unknown = function (_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n scale.quantiles = function () {\n return thresholds.slice();\n };\n scale.copy = function () {\n return quantile().domain(domain).range(range).unknown(unknown);\n };\n return initRange.apply(scale, arguments);\n}","const t0 = new Date(),\n t1 = new Date();\nexport function timeInterval(floori, offseti, count, field) {\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date() : new Date(+date)), date;\n }\n interval.floor = date => {\n return floori(date = new Date(+date)), date;\n };\n interval.ceil = date => {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n interval.round = date => {\n const d0 = interval(date),\n d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n interval.offset = (date, step) => {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n interval.range = (start, stop, step) => {\n const range = [];\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n let previous;\n do range.push(previous = new Date(+start)), offseti(start, step), floori(start); while (previous < start && start < stop);\n return range;\n };\n interval.filter = test => {\n return timeInterval(date => {\n if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n }, (date, step) => {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n }\n }\n });\n };\n if (count) {\n interval.count = (start, end) => {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n interval.every = step => {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null : !(step > 1) ? interval : interval.filter(field ? d => field(d) % step === 0 : d => interval.count(0, d) % step === 0);\n };\n }\n return interval;\n}","import { timeInterval } from \"./interval.js\";\nexport const millisecond = timeInterval(() => {\n // noop\n}, (date, step) => {\n date.setTime(+date + step);\n}, (start, end) => {\n return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = k => {\n k = Math.floor(k);\n if (!isFinite(k) || !(k > 0)) return null;\n if (!(k > 1)) return millisecond;\n return timeInterval(date => {\n date.setTime(Math.floor(date / k) * k);\n }, (date, step) => {\n date.setTime(+date + step * k);\n }, (start, end) => {\n return (end - start) / k;\n });\n};\nexport const milliseconds = millisecond.range;","import { timeInterval } from \"./interval.js\";\nimport { durationSecond } from \"./duration.js\";\nexport const second = timeInterval(date => {\n date.setTime(date - date.getMilliseconds());\n}, (date, step) => {\n date.setTime(+date + step * durationSecond);\n}, (start, end) => {\n return (end - start) / durationSecond;\n}, date => {\n return date.getUTCSeconds();\n});\nexport const seconds = second.range;","import { timeInterval } from \"./interval.js\";\nimport { durationMinute, durationSecond } from \"./duration.js\";\nexport const timeMinute = timeInterval(date => {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, (date, step) => {\n date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n return (end - start) / durationMinute;\n}, date => {\n return date.getMinutes();\n});\nexport const timeMinutes = timeMinute.range;\nexport const utcMinute = timeInterval(date => {\n date.setUTCSeconds(0, 0);\n}, (date, step) => {\n date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n return (end - start) / durationMinute;\n}, date => {\n return date.getUTCMinutes();\n});\nexport const utcMinutes = utcMinute.range;","import { timeInterval } from \"./interval.js\";\nimport { durationHour, durationMinute, durationSecond } from \"./duration.js\";\nexport const timeHour = timeInterval(date => {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, (date, step) => {\n date.setTime(+date + step * durationHour);\n}, (start, end) => {\n return (end - start) / durationHour;\n}, date => {\n return date.getHours();\n});\nexport const timeHours = timeHour.range;\nexport const utcHour = timeInterval(date => {\n date.setUTCMinutes(0, 0, 0);\n}, (date, step) => {\n date.setTime(+date + step * durationHour);\n}, (start, end) => {\n return (end - start) / durationHour;\n}, date => {\n return date.getUTCHours();\n});\nexport const utcHours = utcHour.range;","import { timeInterval } from \"./interval.js\";\nimport { durationDay, durationMinute } from \"./duration.js\";\nexport const timeDay = timeInterval(date => date.setHours(0, 0, 0, 0), (date, step) => date.setDate(date.getDate() + step), (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay, date => date.getDate() - 1);\nexport const timeDays = timeDay.range;\nexport const utcDay = timeInterval(date => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, date => {\n return date.getUTCDate() - 1;\n});\nexport const utcDays = utcDay.range;\nexport const unixDay = timeInterval(date => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, date => {\n return Math.floor(date / durationDay);\n});\nexport const unixDays = unixDay.range;","import { timeInterval } from \"./interval.js\";\nimport { durationMinute, durationWeek } from \"./duration.js\";\nfunction timeWeekday(i) {\n return timeInterval(date => {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setDate(date.getDate() + step * 7);\n }, (start, end) => {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n}\nexport const timeSunday = timeWeekday(0);\nexport const timeMonday = timeWeekday(1);\nexport const timeTuesday = timeWeekday(2);\nexport const timeWednesday = timeWeekday(3);\nexport const timeThursday = timeWeekday(4);\nexport const timeFriday = timeWeekday(5);\nexport const timeSaturday = timeWeekday(6);\nexport const timeSundays = timeSunday.range;\nexport const timeMondays = timeMonday.range;\nexport const timeTuesdays = timeTuesday.range;\nexport const timeWednesdays = timeWednesday.range;\nexport const timeThursdays = timeThursday.range;\nexport const timeFridays = timeFriday.range;\nexport const timeSaturdays = timeSaturday.range;\nfunction utcWeekday(i) {\n return timeInterval(date => {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, (start, end) => {\n return (end - start) / durationWeek;\n });\n}\nexport const utcSunday = utcWeekday(0);\nexport const utcMonday = utcWeekday(1);\nexport const utcTuesday = utcWeekday(2);\nexport const utcWednesday = utcWeekday(3);\nexport const utcThursday = utcWeekday(4);\nexport const utcFriday = utcWeekday(5);\nexport const utcSaturday = utcWeekday(6);\nexport const utcSundays = utcSunday.range;\nexport const utcMondays = utcMonday.range;\nexport const utcTuesdays = utcTuesday.range;\nexport const utcWednesdays = utcWednesday.range;\nexport const utcThursdays = utcThursday.range;\nexport const utcFridays = utcFriday.range;\nexport const utcSaturdays = utcSaturday.range;","import { timeInterval } from \"./interval.js\";\nexport const timeMonth = timeInterval(date => {\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setMonth(date.getMonth() + step);\n}, (start, end) => {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, date => {\n return date.getMonth();\n});\nexport const timeMonths = timeMonth.range;\nexport const utcMonth = timeInterval(date => {\n date.setUTCDate(1);\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCMonth(date.getUTCMonth() + step);\n}, (start, end) => {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, date => {\n return date.getUTCMonth();\n});\nexport const utcMonths = utcMonth.range;","import { timeInterval } from \"./interval.js\";\nexport const timeYear = timeInterval(date => {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setFullYear(date.getFullYear() + step);\n}, (start, end) => {\n return end.getFullYear() - start.getFullYear();\n}, date => {\n return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\ntimeYear.every = k => {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval(date => {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setFullYear(date.getFullYear() + step * k);\n });\n};\nexport const timeYears = timeYear.range;\nexport const utcYear = timeInterval(date => {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n}, (start, end) => {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}, date => {\n return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = k => {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval(date => {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n};\nexport const utcYears = utcYear.range;","import { bisector, tickStep } from \"d3-array\";\nimport { durationDay, durationHour, durationMinute, durationMonth, durationSecond, durationWeek, durationYear } from \"./duration.js\";\nimport { millisecond } from \"./millisecond.js\";\nimport { second } from \"./second.js\";\nimport { timeMinute, utcMinute } from \"./minute.js\";\nimport { timeHour, utcHour } from \"./hour.js\";\nimport { timeDay, unixDay } from \"./day.js\";\nimport { timeSunday, utcSunday } from \"./week.js\";\nimport { timeMonth, utcMonth } from \"./month.js\";\nimport { timeYear, utcYear } from \"./year.js\";\nfunction ticker(year, month, week, day, hour, minute) {\n const tickIntervals = [[second, 1, durationSecond], [second, 5, 5 * durationSecond], [second, 15, 15 * durationSecond], [second, 30, 30 * durationSecond], [minute, 1, durationMinute], [minute, 5, 5 * durationMinute], [minute, 15, 15 * durationMinute], [minute, 30, 30 * durationMinute], [hour, 1, durationHour], [hour, 3, 3 * durationHour], [hour, 6, 6 * durationHour], [hour, 12, 12 * durationHour], [day, 1, durationDay], [day, 2, 2 * durationDay], [week, 1, durationWeek], [month, 1, durationMonth], [month, 3, 3 * durationMonth], [year, 1, durationYear]];\n function ticks(start, stop, count) {\n const reverse = stop < start;\n if (reverse) [start, stop] = [stop, start];\n const interval = count && typeof count.range === \"function\" ? count : tickInterval(start, stop, count);\n const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop\n return reverse ? ticks.reverse() : ticks;\n }\n function tickInterval(start, stop, count) {\n const target = Math.abs(stop - start) / count;\n const i = bisector(([,, step]) => step).right(tickIntervals, target);\n if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));\n if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));\n const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n return t.every(step);\n }\n return [ticks, tickInterval];\n}\nconst [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcSunday, unixDay, utcHour, utcMinute);\nconst [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute);\nexport { utcTicks, utcTickInterval, timeTicks, timeTickInterval };","import { timeDay, timeSunday, timeMonday, timeThursday, timeYear, utcDay, utcSunday, utcMonday, utcThursday, utcYear } from \"d3-time\";\nfunction localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\nfunction utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\nfunction newDate(y, m, d) {\n return {\n y: y,\n m: m,\n d: d,\n H: 0,\n M: 0,\n S: 0,\n L: 0\n };\n}\nexport default function formatLocale(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"g\": formatYearISO,\n \"G\": formatFullYearISO,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"g\": formatUTCYearISO,\n \"G\": formatUTCFullYearISO,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"g\": parseYear,\n \"G\": parseFullYear,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n function newFormat(specifier, formats) {\n return function (date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n if (!(date instanceof Date)) date = new Date(+date);\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n function newParse(specifier, Z) {\n return function (string) {\n var d = newDate(1900, undefined, 1),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week,\n day;\n if (i != string.length) return null;\n\n // If a UNIX timestamp is specified, return it.\n if (\"Q\" in d) return new Date(d.Q);\n if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n // If this is utcParse, never use the local timezone.\n if (Z && !(\"Z\" in d)) d.Z = 0;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // If the month was not specified, inherit from the quarter.\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n // Convert day-of-week and week-of-year to day-of-year.\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n if (\"Z\" in d) {\n week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n week = timeDay.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n }\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n return localDate(d);\n };\n }\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || (j = parse(d, string, j)) < 0) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n return j;\n }\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n function formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\n }\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\n }\n return {\n format: function (specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.toString = function () {\n return specifier;\n };\n return f;\n },\n parse: function (specifier) {\n var p = newParse(specifier += \"\", false);\n p.toString = function () {\n return specifier;\n };\n return p;\n },\n utcFormat: function (specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.toString = function () {\n return specifier;\n };\n return f;\n },\n utcParse: function (specifier) {\n var p = newParse(specifier += \"\", true);\n p.toString = function () {\n return specifier;\n };\n return p;\n }\n };\n}\nvar pads = {\n \"-\": \"\",\n \"_\": \" \",\n \"0\": \"0\"\n },\n numberRe = /^\\s*\\d+/,\n // note: ignores next directive\n percentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\nfunction pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\nfunction requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n}\nfunction formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\nfunction formatLookup(names) {\n return new Map(names.map((name, i) => [name.toLowerCase(), i]));\n}\nfunction parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\nfunction parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\nfunction parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\nfunction parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\nfunction parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\nfunction parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\nfunction parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\nfunction parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\nfunction parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\nfunction parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\nfunction parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\nfunction parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\nfunction parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\nfunction parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\nfunction parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\nfunction parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\nfunction parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\nfunction parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n}\nfunction parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\nfunction parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\nfunction formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n}\nfunction formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n}\nfunction formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n}\nfunction formatDayOfYear(d, p) {\n return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\nfunction formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n}\nfunction formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n}\nfunction formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n}\nfunction formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n}\nfunction formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n}\nfunction formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n}\nfunction formatWeekNumberSunday(d, p) {\n return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\nfunction dISO(d) {\n var day = d.getDay();\n return day >= 4 || day === 0 ? timeThursday(d) : timeThursday.ceil(d);\n}\nfunction formatWeekNumberISO(d, p) {\n d = dISO(d);\n return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\nfunction formatWeekdayNumberSunday(d) {\n return d.getDay();\n}\nfunction formatWeekNumberMonday(d, p) {\n return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\nfunction formatYearISO(d, p) {\n d = dISO(d);\n return pad(d.getFullYear() % 100, p, 2);\n}\nfunction formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n}\nfunction formatFullYearISO(d, p) {\n var day = d.getDay();\n d = day >= 4 || day === 0 ? timeThursday(d) : timeThursday.ceil(d);\n return pad(d.getFullYear() % 10000, p, 4);\n}\nfunction formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\")) + pad(z / 60 | 0, \"0\", 2) + pad(z % 60, \"0\", 2);\n}\nfunction formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n}\nfunction formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n}\nfunction formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\nfunction formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\nfunction formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n}\nfunction formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n}\nfunction formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n}\nfunction formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n}\nfunction formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n}\nfunction formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n}\nfunction formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\nfunction UTCdISO(d) {\n var day = d.getUTCDay();\n return day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d);\n}\nfunction formatUTCWeekNumberISO(d, p) {\n d = UTCdISO(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\nfunction formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n}\nfunction formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\nfunction formatUTCYearISO(d, p) {\n d = UTCdISO(d);\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\nfunction formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\nfunction formatUTCFullYearISO(d, p) {\n var day = d.getUTCDay();\n d = day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d);\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\nfunction formatUTCZone() {\n return \"+0000\";\n}\nfunction formatLiteralPercent() {\n return \"%\";\n}\nfunction formatUnixTimestamp(d) {\n return +d;\n}\nfunction formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n}","import formatLocale from \"./locale.js\";\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\ndefaultLocale({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n timeFormat = locale.format;\n timeParse = locale.parse;\n utcFormat = locale.utcFormat;\n utcParse = locale.utcParse;\n return locale;\n}","import { timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeTicks, timeTickInterval } from \"d3-time\";\nimport { timeFormat } from \"d3-time-format\";\nimport continuous, { copy } from \"./continuous.js\";\nimport { initRange } from \"./init.js\";\nimport nice from \"./nice.js\";\nfunction date(t) {\n return new Date(t);\n}\nfunction number(t) {\n return t instanceof Date ? +t : +new Date(+t);\n}\nexport function calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format) {\n var scale = continuous(),\n invert = scale.invert,\n domain = scale.domain;\n var formatMillisecond = format(\".%L\"),\n formatSecond = format(\":%S\"),\n formatMinute = format(\"%I:%M\"),\n formatHour = format(\"%I %p\"),\n formatDay = format(\"%a %d\"),\n formatWeek = format(\"%b %d\"),\n formatMonth = format(\"%B\"),\n formatYear = format(\"%Y\");\n function tickFormat(date) {\n return (second(date) < date ? formatMillisecond : minute(date) < date ? formatSecond : hour(date) < date ? formatMinute : day(date) < date ? formatHour : month(date) < date ? week(date) < date ? formatDay : formatWeek : year(date) < date ? formatMonth : formatYear)(date);\n }\n scale.invert = function (y) {\n return new Date(invert(y));\n };\n scale.domain = function (_) {\n return arguments.length ? domain(Array.from(_, number)) : domain().map(date);\n };\n scale.ticks = function (interval) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval);\n };\n scale.tickFormat = function (count, specifier) {\n return specifier == null ? tickFormat : format(specifier);\n };\n scale.nice = function (interval) {\n var d = domain();\n if (!interval || typeof interval.range !== \"function\") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);\n return interval ? domain(nice(d, interval)) : scale;\n };\n scale.copy = function () {\n return copy(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));\n };\n return scale;\n}\nexport default function time() {\n return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}","export default function (x) {\n return function constant() {\n return x;\n };\n}","const pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\nfunction append(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += arguments[i] + strings[i];\n }\n}\nfunction appendRound(digits) {\n let d = Math.floor(digits);\n if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);\n if (d > 15) return append;\n const k = 10 ** d;\n return function (strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += Math.round(arguments[i] * k) / k + strings[i];\n }\n };\n}\nexport class Path {\n constructor(digits) {\n this._x0 = this._y0 =\n // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n this._append = digits == null ? append : appendRound(digits);\n }\n moveTo(x, y) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n }\n closePath() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._append`Z`;\n }\n }\n lineTo(x, y) {\n this._append`L${this._x1 = +x},${this._y1 = +y}`;\n }\n quadraticCurveTo(x1, y1, x, y) {\n this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;\n }\n bezierCurveTo(x1, y1, x2, y2, x, y) {\n this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;\n }\n arcTo(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n let x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._append`M${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon)) ;\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._append`L${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Otherwise, draw an arc!\n else {\n let x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;\n }\n this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;\n }\n }\n arc(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n let dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._append`M${x0},${y0}`;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._append`L${x0},${y0}`;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;\n }\n }\n rect(x, y, w, h) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;\n }\n toString() {\n return this._;\n }\n}\nexport function path() {\n return new Path();\n}\n\n// Allow instanceof d3.path\npath.prototype = Path.prototype;\nexport function pathRound(digits = 3) {\n return new Path(+digits);\n}","import { Path } from \"d3-path\";\nexport function withPath(shape) {\n let digits = 3;\n shape.digits = function (_) {\n if (!arguments.length) return digits;\n if (_ == null) {\n digits = null;\n } else {\n const d = Math.floor(_);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n digits = d;\n }\n return shape;\n };\n return () => new Path(digits);\n}","export var slice = Array.prototype.slice;\nexport default function (x) {\n return typeof x === \"object\" && \"length\" in x ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}","function Linear(context) {\n this._context = context;\n}\nLinear.prototype = {\n areaStart: function () {\n this._line = 0;\n },\n areaEnd: function () {\n this._line = NaN;\n },\n lineStart: function () {\n this._point = 0;\n },\n lineEnd: function () {\n if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function (x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0:\n this._point = 1;\n this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n break;\n case 1:\n this._point = 2;\n // falls through\n default:\n this._context.lineTo(x, y);\n break;\n }\n }\n};\nexport default function (context) {\n return new Linear(context);\n}","export function x(p) {\n return p[0];\n}\nexport function y(p) {\n return p[1];\n}","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport { withPath } from \"./path.js\";\nimport { x as pointX, y as pointY } from \"./point.js\";\nexport default function (x, y) {\n var defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(line);\n x = typeof x === \"function\" ? x : x === undefined ? pointX : constant(x);\n y = typeof y === \"function\" ? y : y === undefined ? pointY : constant(y);\n function line(data) {\n var i,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer;\n if (context == null) output = curve(buffer = path());\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n if (buffer) return output = null, buffer + \"\" || null;\n }\n line.x = function (_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n line.y = function (_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n line.defined = function (_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n line.curve = function (_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n line.context = function (_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n return line;\n}","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport line from \"./line.js\";\nimport { withPath } from \"./path.js\";\nimport { x as pointX, y as pointY } from \"./point.js\";\nexport default function (x0, y0, y1) {\n var x1 = null,\n defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(area);\n x0 = typeof x0 === \"function\" ? x0 : x0 === undefined ? pointX : constant(+x0);\n y0 = typeof y0 === \"function\" ? y0 : y0 === undefined ? constant(0) : constant(+y0);\n y1 = typeof y1 === \"function\" ? y1 : y1 === undefined ? pointY : constant(+y1);\n function area(data) {\n var i,\n j,\n k,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer,\n x0z = new Array(n),\n y0z = new Array(n);\n if (context == null) output = curve(buffer = path());\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) {\n j = i;\n output.areaStart();\n output.lineStart();\n } else {\n output.lineEnd();\n output.lineStart();\n for (k = i - 1; k >= j; --k) {\n output.point(x0z[k], y0z[k]);\n }\n output.lineEnd();\n output.areaEnd();\n }\n }\n if (defined0) {\n x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);\n output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);\n }\n }\n if (buffer) return output = null, buffer + \"\" || null;\n }\n function arealine() {\n return line().defined(defined).curve(curve).context(context);\n }\n area.x = function (_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), x1 = null, area) : x0;\n };\n area.x0 = function (_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), area) : x0;\n };\n area.x1 = function (_) {\n return arguments.length ? (x1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : x1;\n };\n area.y = function (_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), y1 = null, area) : y0;\n };\n area.y0 = function (_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), area) : y0;\n };\n area.y1 = function (_) {\n return arguments.length ? (y1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : y1;\n };\n area.lineX0 = area.lineY0 = function () {\n return arealine().x(x0).y(y0);\n };\n area.lineY1 = function () {\n return arealine().x(x0).y(y1);\n };\n area.lineX1 = function () {\n return arealine().x(x1).y(y0);\n };\n area.defined = function (_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), area) : defined;\n };\n area.curve = function (_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;\n };\n area.context = function (_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;\n };\n return area;\n}","function sign(x) {\n return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n var x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 3;\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\nfunction MonotoneX(context) {\n this._context = context;\n}\nMonotoneX.prototype = {\n areaStart: function () {\n this._line = 0;\n },\n areaEnd: function () {\n this._line = NaN;\n },\n lineStart: function () {\n this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN;\n this._point = 0;\n },\n lineEnd: function () {\n switch (this._point) {\n case 2:\n this._context.lineTo(this._x1, this._y1);\n break;\n case 3:\n point(this, this._t0, slope2(this, this._t0));\n break;\n }\n if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function (x, y) {\n var t1 = NaN;\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n switch (this._point) {\n case 0:\n this._point = 1;\n this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n break;\n case 1:\n this._point = 2;\n break;\n case 2:\n this._point = 3;\n point(this, slope2(this, t1 = slope3(this, x, y)), t1);\n break;\n default:\n point(this, this._t0, t1 = slope3(this, x, y));\n break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n};\nfunction MonotoneY(context) {\n this._context = new ReflectContext(context);\n}\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function (x, y) {\n MonotoneX.prototype.point.call(this, y, x);\n};\nfunction ReflectContext(context) {\n this._context = context;\n}\nReflectContext.prototype = {\n moveTo: function (x, y) {\n this._context.moveTo(y, x);\n },\n closePath: function () {\n this._context.closePath();\n },\n lineTo: function (x, y) {\n this._context.lineTo(y, x);\n },\n bezierCurveTo: function (x1, y1, x2, y2, x, y) {\n this._context.bezierCurveTo(y1, x1, y2, x2, y, x);\n }\n};\nexport function monotoneX(context) {\n return new MonotoneX(context);\n}\nexport function monotoneY(context) {\n return new MonotoneY(context);\n}","import * as i0 from '@angular/core';\nimport { PLATFORM_ID, Component, ViewEncapsulation, Inject, Input, ViewChild, HostBinding, HostListener, Injectable, EventEmitter, ChangeDetectionStrategy, Output, Directive, NgModule, ContentChild } from '@angular/core';\nimport * as i1 from '@angular/common';\nimport { isPlatformBrowser, isPlatformServer, CommonModule } from '@angular/common';\nimport { __decorate } from 'tslib';\nimport { DomPortalOutlet, ComponentPortal } from '@angular/cdk/portal';\nimport { fromEvent } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\nimport { trigger, transition, style, animate } from '@angular/animations';\nimport { select } from 'd3-selection';\nimport { brushX } from 'd3-brush';\nimport { scaleTime, scaleLinear, scalePoint, scaleOrdinal, scaleQuantile, scaleBand } from 'd3-scale';\nimport { area, curveLinear, line, arc, lineRadial, curveCardinalClosed, pie } from 'd3-shape';\nimport { range, min, max, quantile } from 'd3-array';\nimport { interpolate } from 'd3-interpolate';\nimport { easeSinInOut } from 'd3-ease';\nimport { format } from 'd3-format';\nimport * as d3_color from 'd3-color';\nimport { treemap, stratify } from 'd3-hierarchy';\nimport { sankey, sankeyLeft, sankeyLinkHorizontal } from 'd3-sankey';\nimport { timeFormat } from 'd3-time-format';\n\n/**\n * Throttle a function\n *\n */\nconst _c0 = [\"caretElm\"];\nconst _c1 = a0 => ({\n model: a0\n});\nfunction TooltipContentComponent_span_4_ng_template_1_Template(rf, ctx) {}\nfunction TooltipContentComponent_span_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\");\n i0.ɵɵtemplate(1, TooltipContentComponent_span_4_ng_template_1_Template, 0, 0, \"ng-template\", 5);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r0.template)(\"ngTemplateOutletContext\", i0.ɵɵpureFunction1(2, _c1, ctx_r0.context));\n }\n}\nfunction TooltipContentComponent_span_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 6);\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"innerHTML\", ctx_r0.title, i0.ɵɵsanitizeHtml);\n }\n}\nfunction LegendComponent_header_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"header\", 4)(1, \"span\", 5);\n i0.ɵɵtext(2);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(ctx_r0.title);\n }\n}\nfunction LegendComponent_li_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r2 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"li\", 6)(1, \"ngx-charts-legend-entry\", 7);\n i0.ɵɵlistener(\"select\", function LegendComponent_li_4_Template_ngx_charts_legend_entry_select_1_listener($event) {\n i0.ɵɵrestoreView(_r2);\n const ctx_r0 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r0.labelClick.emit($event));\n })(\"activate\", function LegendComponent_li_4_Template_ngx_charts_legend_entry_activate_1_listener($event) {\n i0.ɵɵrestoreView(_r2);\n const ctx_r0 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r0.activate($event));\n })(\"deactivate\", function LegendComponent_li_4_Template_ngx_charts_legend_entry_deactivate_1_listener($event) {\n i0.ɵɵrestoreView(_r2);\n const ctx_r0 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r0.deactivate($event));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const entry_r3 = ctx.$implicit;\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"label\", entry_r3.label)(\"formattedLabel\", entry_r3.formattedLabel)(\"color\", entry_r3.color)(\"isActive\", ctx_r0.isActive(entry_r3));\n }\n}\nconst _c2 = [\"*\"];\nfunction ChartComponent_ngx_charts_scale_legend_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"ngx-charts-scale-legend\", 4);\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"horizontal\", ctx_r0.legendOptions && ctx_r0.legendOptions.position === ctx_r0.LegendPosition.Below)(\"valueRange\", ctx_r0.legendOptions.domain)(\"colors\", ctx_r0.legendOptions.colors)(\"height\", ctx_r0.view[1])(\"width\", ctx_r0.legendWidth);\n }\n}\nfunction ChartComponent_ngx_charts_legend_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r2 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"ngx-charts-legend\", 5);\n i0.ɵɵlistener(\"labelClick\", function ChartComponent_ngx_charts_legend_4_Template_ngx_charts_legend_labelClick_0_listener($event) {\n i0.ɵɵrestoreView(_r2);\n const ctx_r0 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r0.legendLabelClick.emit($event));\n })(\"labelActivate\", function ChartComponent_ngx_charts_legend_4_Template_ngx_charts_legend_labelActivate_0_listener($event) {\n i0.ɵɵrestoreView(_r2);\n const ctx_r0 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r0.legendLabelActivate.emit($event));\n })(\"labelDeactivate\", function ChartComponent_ngx_charts_legend_4_Template_ngx_charts_legend_labelDeactivate_0_listener($event) {\n i0.ɵɵrestoreView(_r2);\n const ctx_r0 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r0.legendLabelDeactivate.emit($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"horizontal\", ctx_r0.legendOptions && ctx_r0.legendOptions.position === ctx_r0.LegendPosition.Below)(\"data\", ctx_r0.legendOptions.domain)(\"title\", ctx_r0.legendOptions.title)(\"colors\", ctx_r0.legendOptions.colors)(\"height\", ctx_r0.view[1])(\"width\", ctx_r0.legendWidth)(\"activeEntries\", ctx_r0.activeEntries);\n }\n}\nconst _c3 = [\"ngx-charts-axis-label\", \"\"];\nconst _c4 = [\"ticksel\"];\nconst _c5 = [\"ngx-charts-x-axis-ticks\", \"\"];\nfunction XAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_container_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementContainer(0);\n }\n}\nfunction XAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_template_5__svg_ng_container_0__svg_tspan_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"tspan\", 10);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const tickLine_r1 = ctx.$implicit;\n const i_r2 = ctx.index;\n i0.ɵɵattribute(\"y\", i_r2 * 12);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", tickLine_r1, \" \");\n }\n}\nfunction XAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_template_5__svg_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, XAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_template_5__svg_ng_container_0__svg_tspan_1_Template, 2, 2, \"tspan\", 9);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const tickLines_r3 = ctx.ngIf;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", tickLines_r3);\n }\n}\nfunction XAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_template_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, XAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_template_5__svg_ng_container_0_Template, 2, 1, \"ng-container\", 6);\n }\n if (rf & 2) {\n const tick_r4 = i0.ɵɵnextContext(2).$implicit;\n const ctx_r4 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"ngIf\", ctx_r4.tickChunks(tick_r4));\n }\n}\nfunction XAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_template_7_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtext(0);\n }\n if (rf & 2) {\n const tickFormatted_r6 = i0.ɵɵnextContext().ngIf;\n const ctx_r4 = i0.ɵɵnextContext(2);\n i0.ɵɵtextInterpolate1(\" \", ctx_r4.tickTrim(tickFormatted_r6), \" \");\n }\n}\nfunction XAxisTicksComponent__svg_g_2__svg_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelementStart(1, \"title\");\n i0.ɵɵtext(2);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"text\", 7);\n i0.ɵɵtemplate(4, XAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_container_4_Template, 1, 0, \"ng-container\", 8);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(5, XAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_template_5_Template, 1, 1, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor)(7, XAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_template_7_Template, 1, 1, \"ng-template\", null, 2, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const tickFormatted_r6 = ctx.ngIf;\n const tmplMultilineTick_r7 = i0.ɵɵreference(6);\n const tmplSinglelineTick_r8 = i0.ɵɵreference(8);\n const ctx_r4 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(tickFormatted_r6);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"text-anchor\", ctx_r4.textAnchor)(\"transform\", ctx_r4.textTransform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r4.isWrapTicksSupported)(\"ngIfThen\", tmplMultilineTick_r7)(\"ngIfElse\", tmplSinglelineTick_r8);\n }\n}\nfunction XAxisTicksComponent__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 5);\n i0.ɵɵtemplate(1, XAxisTicksComponent__svg_g_2__svg_ng_container_1_Template, 9, 6, \"ng-container\", 6);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const tick_r4 = ctx.$implicit;\n const ctx_r4 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"transform\", ctx_r4.tickTransform(tick_r4));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r4.tickFormat(tick_r4));\n }\n}\nfunction XAxisTicksComponent__svg_g_3__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵelement(1, \"line\", 11);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r4 = i0.ɵɵnextContext(2);\n i0.ɵɵattribute(\"transform\", ctx_r4.gridLineTransform());\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"y1\", -ctx_r4.gridLineHeight);\n }\n}\nfunction XAxisTicksComponent__svg_g_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, XAxisTicksComponent__svg_g_3__svg_g_1_Template, 2, 2, \"g\", 6);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const tick_r9 = ctx.$implicit;\n const ctx_r4 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"transform\", ctx_r4.tickTransform(tick_r9));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r4.showGridLines);\n }\n}\nconst _c6 = [\"ngx-charts-x-axis\", \"\"];\nfunction XAxisComponent__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 2);\n i0.ɵɵlistener(\"dimensionsChanged\", function XAxisComponent__svg_g_1_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.emitTicksHeight($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"trimTicks\", ctx_r1.trimTicks)(\"rotateTicks\", ctx_r1.rotateTicks)(\"maxTickLength\", ctx_r1.maxTickLength)(\"tickFormatting\", ctx_r1.tickFormatting)(\"tickArguments\", ctx_r1.tickArguments)(\"tickStroke\", ctx_r1.tickStroke)(\"scale\", ctx_r1.xScale)(\"orient\", ctx_r1.xOrient)(\"showGridLines\", ctx_r1.showGridLines)(\"gridLineHeight\", ctx_r1.dims.height)(\"width\", ctx_r1.dims.width)(\"tickValues\", ctx_r1.ticks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction XAxisComponent__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"g\", 3);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"label\", ctx_r1.labelText)(\"offset\", ctx_r1.labelOffset)(\"orient\", ctx_r1.orientation.Bottom)(\"height\", ctx_r1.dims.height)(\"width\", ctx_r1.dims.width);\n }\n}\nconst _c7 = [\"ngx-charts-y-axis-ticks\", \"\"];\nfunction YAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_container_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementContainer(0);\n }\n}\nfunction YAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_template_5__svg_ng_container_0__svg_ng_container_1__svg_tspan_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"tspan\", 12);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const tickLine_r1 = ctx.$implicit;\n const i_r2 = ctx.index;\n const ctx_r2 = i0.ɵɵnextContext(6);\n i0.ɵɵattribute(\"y\", i_r2 * (8 + ctx_r2.tickSpacing));\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", tickLine_r1, \" \");\n }\n}\nfunction YAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_template_5__svg_ng_container_0__svg_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, YAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_template_5__svg_ng_container_0__svg_ng_container_1__svg_tspan_1_Template, 2, 2, \"tspan\", 11);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const tickLines_r4 = i0.ɵɵnextContext().ngIf;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", tickLines_r4);\n }\n}\nfunction YAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_template_5__svg_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, YAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_template_5__svg_ng_container_0__svg_ng_container_1_Template, 2, 1, \"ng-container\", 10);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const tickLines_r4 = ctx.ngIf;\n i0.ɵɵnextContext(2);\n const tmplSinglelineTick_r5 = i0.ɵɵreference(8);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", tickLines_r4.length > 1)(\"ngIfElse\", tmplSinglelineTick_r5);\n }\n}\nfunction YAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_template_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, YAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_template_5__svg_ng_container_0_Template, 2, 2, \"ng-container\", 7);\n }\n if (rf & 2) {\n const tick_r6 = i0.ɵɵnextContext(2).$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.tickChunks(tick_r6));\n }\n}\nfunction YAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_template_7_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtext(0);\n }\n if (rf & 2) {\n const tickFormatted_r7 = i0.ɵɵnextContext().ngIf;\n const ctx_r2 = i0.ɵɵnextContext(2);\n i0.ɵɵtextInterpolate1(\" \", ctx_r2.tickTrim(tickFormatted_r7), \" \");\n }\n}\nfunction YAxisTicksComponent__svg_g_2__svg_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelementStart(1, \"title\");\n i0.ɵɵtext(2);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"text\", 8);\n i0.ɵɵtemplate(4, YAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_container_4_Template, 1, 0, \"ng-container\", 9);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(5, YAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_template_5_Template, 1, 1, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor)(7, YAxisTicksComponent__svg_g_2__svg_ng_container_1__svg_ng_template_7_Template, 1, 1, \"ng-template\", null, 2, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const tickFormatted_r7 = ctx.ngIf;\n const tmplMultilineTick_r8 = i0.ɵɵreference(6);\n const tmplSinglelineTick_r5 = i0.ɵɵreference(8);\n const ctx_r2 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(tickFormatted_r7);\n i0.ɵɵadvance();\n i0.ɵɵstyleProp(\"font-size\", \"12px\");\n i0.ɵɵattribute(\"dy\", ctx_r2.dy)(\"x\", ctx_r2.x1)(\"y\", ctx_r2.y1)(\"text-anchor\", ctx_r2.textAnchor);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.wrapTicks)(\"ngIfThen\", tmplMultilineTick_r8)(\"ngIfElse\", tmplSinglelineTick_r5);\n }\n}\nfunction YAxisTicksComponent__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 6);\n i0.ɵɵtemplate(1, YAxisTicksComponent__svg_g_2__svg_ng_container_1_Template, 9, 10, \"ng-container\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const tick_r6 = ctx.$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"transform\", ctx_r2.transform(tick_r6));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.tickFormat(tick_r6));\n }\n}\nfunction YAxisTicksComponent__svg_path_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"path\", 13);\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"d\", ctx_r2.referenceAreaPath)(\"transform\", ctx_r2.gridLineTransform());\n }\n}\nfunction YAxisTicksComponent__svg_g_4__svg_g_1__svg_line_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"line\", 15);\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext(3);\n i0.ɵɵattribute(\"x2\", ctx_r2.gridLineWidth);\n }\n}\nfunction YAxisTicksComponent__svg_g_4__svg_g_1__svg_line_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"line\", 15);\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext(3);\n i0.ɵɵattribute(\"x2\", -ctx_r2.gridLineWidth);\n }\n}\nfunction YAxisTicksComponent__svg_g_4__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, YAxisTicksComponent__svg_g_4__svg_g_1__svg_line_1_Template, 1, 1, \"line\", 14)(2, YAxisTicksComponent__svg_g_4__svg_g_1__svg_line_2_Template, 1, 1, \"line\", 14);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext(2);\n i0.ɵɵattribute(\"transform\", ctx_r2.gridLineTransform());\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.orient === ctx_r2.Orientation.Left);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.orient === ctx_r2.Orientation.Right);\n }\n}\nfunction YAxisTicksComponent__svg_g_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, YAxisTicksComponent__svg_g_4__svg_g_1_Template, 3, 3, \"g\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const tick_r9 = ctx.$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"transform\", ctx_r2.transform(tick_r9));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.showGridLines);\n }\n}\nfunction YAxisTicksComponent__svg_g_5__svg_g_1__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"title\");\n i0.ɵɵtext(2);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"text\", 17);\n i0.ɵɵtext(4);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const refLine_r10 = i0.ɵɵnextContext(2).$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(ctx_r2.tickTrim(ctx_r2.tickFormat(refLine_r10.value)));\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"dy\", ctx_r2.dy)(\"y\", -6)(\"x\", ctx_r2.gridLineWidth)(\"text-anchor\", ctx_r2.textAnchor);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", refLine_r10.name, \" \");\n }\n}\nfunction YAxisTicksComponent__svg_g_5__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵelement(1, \"line\", 16);\n i0.ɵɵtemplate(2, YAxisTicksComponent__svg_g_5__svg_g_1__svg_g_2_Template, 5, 6, \"g\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const refLine_r10 = i0.ɵɵnextContext().$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"transform\", ctx_r2.transform(refLine_r10.value));\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"x2\", ctx_r2.gridLineWidth)(\"transform\", ctx_r2.gridLineTransform());\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.showRefLabels);\n }\n}\nfunction YAxisTicksComponent__svg_g_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, YAxisTicksComponent__svg_g_5__svg_g_1_Template, 3, 4, \"g\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.showRefLines);\n }\n}\nconst _c8 = [\"ngx-charts-y-axis\", \"\"];\nfunction YAxisComponent__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 2);\n i0.ɵɵlistener(\"dimensionsChanged\", function YAxisComponent__svg_g_1_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.emitTicksWidth($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"trimTicks\", ctx_r1.trimTicks)(\"maxTickLength\", ctx_r1.maxTickLength)(\"tickFormatting\", ctx_r1.tickFormatting)(\"tickArguments\", ctx_r1.tickArguments)(\"tickValues\", ctx_r1.ticks)(\"tickStroke\", ctx_r1.tickStroke)(\"scale\", ctx_r1.yScale)(\"orient\", ctx_r1.yOrient)(\"showGridLines\", ctx_r1.showGridLines)(\"gridLineWidth\", ctx_r1.dims.width)(\"referenceLines\", ctx_r1.referenceLines)(\"showRefLines\", ctx_r1.showRefLines)(\"showRefLabels\", ctx_r1.showRefLabels)(\"height\", ctx_r1.dims.height)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction YAxisComponent__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"g\", 3);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"label\", ctx_r1.labelText)(\"offset\", ctx_r1.labelOffset)(\"orient\", ctx_r1.yOrient)(\"height\", ctx_r1.dims.height)(\"width\", ctx_r1.dims.width);\n }\n}\nconst _c9 = [\"ngx-charts-circle\", \"\"];\nconst _c10 = [\"ngx-charts-svg-linear-gradient\", \"\"];\nfunction SvgLinearGradientComponent__svg_stop_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"stop\");\n }\n if (rf & 2) {\n const stop_r1 = ctx.$implicit;\n i0.ɵɵstyleProp(\"stop-color\", stop_r1.color)(\"stop-opacity\", stop_r1.opacity);\n i0.ɵɵattribute(\"offset\", stop_r1.offset + \"%\");\n }\n}\nconst _c11 = [\"ngx-charts-circle-series\", \"\"];\nconst _c12 = a0 => ({\n name: a0\n});\nfunction CircleSeriesComponent__svg_g_0__svg_rect_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"rect\", 4);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"@animationState\", \"active\");\n i0.ɵɵattribute(\"x\", ctx_r1.circle.cx - ctx_r1.circle.radius)(\"y\", ctx_r1.circle.cy)(\"width\", ctx_r1.circle.radius * 2)(\"height\", ctx_r1.circle.height)(\"fill\", ctx_r1.gradientFill);\n }\n}\nfunction CircleSeriesComponent__svg_g_0__svg_rect_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"rect\", 4);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵattribute(\"x\", ctx_r1.circle.cx - ctx_r1.circle.radius)(\"y\", ctx_r1.circle.cy)(\"width\", ctx_r1.circle.radius * 2)(\"height\", ctx_r1.circle.height)(\"fill\", ctx_r1.gradientFill);\n }\n}\nfunction CircleSeriesComponent__svg_g_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"defs\");\n i0.ɵɵelement(2, \"g\", 1);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(3, CircleSeriesComponent__svg_g_0__svg_rect_3_Template, 1, 6, \"rect\", 2)(4, CircleSeriesComponent__svg_g_0__svg_rect_4_Template, 1, 5, \"rect\", 2);\n i0.ɵɵelementStart(5, \"g\", 3);\n i0.ɵɵlistener(\"select\", function CircleSeriesComponent__svg_g_0_Template_g_select_5_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onClick(ctx_r1.circle.data));\n })(\"activate\", function CircleSeriesComponent__svg_g_0_Template_g_activate_5_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.activateCircle());\n })(\"deactivate\", function CircleSeriesComponent__svg_g_0_Template_g_deactivate_5_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.deactivateCircle());\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"orientation\", ctx_r1.barOrientation.Vertical)(\"name\", ctx_r1.gradientId)(\"stops\", ctx_r1.circle.gradientStops);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx_r1.isSSR && ctx_r1.barVisible && ctx_r1.type === \"standard\");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isSSR && ctx_r1.barVisible && ctx_r1.type === \"standard\");\n i0.ɵɵadvance();\n i0.ɵɵclassProp(\"active\", ctx_r1.isActive(i0.ɵɵpureFunction1(20, _c12, ctx_r1.circle.seriesName)));\n i0.ɵɵproperty(\"cx\", ctx_r1.circle.cx)(\"cy\", ctx_r1.circle.cy)(\"r\", ctx_r1.circle.radius)(\"fill\", ctx_r1.circle.color)(\"pointerEvents\", ctx_r1.circle.value === 0 ? \"none\" : \"all\")(\"data\", ctx_r1.circle.value)(\"classNames\", ctx_r1.circle.classNames)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipPlacement\", ctx_r1.placementTypes.Top)(\"tooltipType\", ctx_r1.styleTypes.tooltip)(\"tooltipTitle\", ctx_r1.tooltipTemplate ? undefined : ctx_r1.getTooltipText(ctx_r1.circle))(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"tooltipContext\", ctx_r1.circle.data);\n }\n}\nconst _c13 = [\"ngx-charts-grid-panel\", \"\"];\nconst _c14 = [\"ngx-charts-grid-panel-series\", \"\"];\nfunction GridPanelSeriesComponent__svg_g_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"g\", 1);\n }\n if (rf & 2) {\n const gridPanel_r1 = ctx.$implicit;\n i0.ɵɵclassProp(\"grid-panel\", true)(\"odd\", gridPanel_r1.class === \"odd\")(\"even\", gridPanel_r1.class === \"even\");\n i0.ɵɵproperty(\"height\", gridPanel_r1.height)(\"width\", gridPanel_r1.width)(\"x\", gridPanel_r1.x)(\"y\", gridPanel_r1.y);\n }\n}\nconst _c15 = [\"ngx-charts-svg-radial-gradient\", \"\"];\nfunction SvgRadialGradientComponent__svg_stop_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"stop\");\n }\n if (rf & 2) {\n const stop_r1 = ctx.$implicit;\n i0.ɵɵstyleProp(\"stop-color\", stop_r1.color)(\"stop-opacity\", stop_r1.opacity);\n i0.ɵɵattribute(\"offset\", stop_r1.offset + \"%\");\n }\n}\nconst _c16 = [\"ngx-charts-area\", \"\"];\nfunction AreaComponent__svg_defs_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"defs\");\n i0.ɵɵelement(1, \"g\", 2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"orientation\", ctx_r0.barOrientation.Vertical)(\"name\", ctx_r0.gradientId)(\"stops\", ctx_r0.gradientStops);\n }\n}\nconst _c17 = [\"ngx-charts-count-up\", \"\"];\nconst _c18 = [\"tooltipAnchor\"];\nconst _c19 = [\"ngx-charts-tooltip-area\", \"\"];\nfunction TooltipArea__svg_ng_template_2_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 6);\n i0.ɵɵelement(1, \"span\", 7);\n i0.ɵɵtext(2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const tooltipItem_r2 = ctx.$implicit;\n const ctx_r2 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵstyleProp(\"background-color\", tooltipItem_r2.color);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx_r2.getToolTipText(tooltipItem_r2), \" \");\n }\n}\nfunction TooltipArea__svg_ng_template_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 4);\n i0.ɵɵtemplate(1, TooltipArea__svg_ng_template_2_div_1_Template, 3, 3, \"div\", 5);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const model_r4 = ctx.model;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", model_r4);\n }\n}\nconst _c20 = [\"ngx-charts-timeline\", \"\"];\nfunction AdvancedLegendComponent_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 7);\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"countTo\", ctx_r0.roundedTotal)(\"valueFormatting\", ctx_r0.valueFormatting);\n }\n}\nfunction AdvancedLegendComponent_div_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 8);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx_r0.valueFormatting ? ctx_r0.valueFormatting(ctx_r0.roundedTotal) : ctx_r0.defaultValueFormatting(ctx_r0.roundedTotal), \" \");\n }\n}\nfunction AdvancedLegendComponent_div_7_div_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 16);\n }\n if (rf & 2) {\n const legendItem_r3 = i0.ɵɵnextContext().$implicit;\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"countTo\", legendItem_r3._value)(\"valueFormatting\", ctx_r0.valueFormatting);\n }\n}\nfunction AdvancedLegendComponent_div_7_div_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 17);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const legendItem_r3 = i0.ɵɵnextContext().$implicit;\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx_r0.valueFormatting ? ctx_r0.valueFormatting(legendItem_r3.value) : ctx_r0.defaultValueFormatting(legendItem_r3.value), \" \");\n }\n}\nfunction AdvancedLegendComponent_div_7_div_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 18);\n }\n if (rf & 2) {\n const legendItem_r3 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵproperty(\"countTo\", legendItem_r3.percentage)(\"countSuffix\", \"%\");\n }\n}\nfunction AdvancedLegendComponent_div_7_div_7_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 19);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const legendItem_r3 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\"\", legendItem_r3.percentage.toLocaleString(), \"%\");\n }\n}\nfunction AdvancedLegendComponent_div_7_Template(rf, ctx) {\n if (rf & 1) {\n const _r2 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 9);\n i0.ɵɵlistener(\"mouseenter\", function AdvancedLegendComponent_div_7_Template_div_mouseenter_0_listener() {\n const legendItem_r3 = i0.ɵɵrestoreView(_r2).$implicit;\n const ctx_r0 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r0.activate.emit(legendItem_r3.data));\n })(\"mouseleave\", function AdvancedLegendComponent_div_7_Template_div_mouseleave_0_listener() {\n const legendItem_r3 = i0.ɵɵrestoreView(_r2).$implicit;\n const ctx_r0 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r0.deactivate.emit(legendItem_r3.data));\n })(\"click\", function AdvancedLegendComponent_div_7_Template_div_click_0_listener() {\n const legendItem_r3 = i0.ɵɵrestoreView(_r2).$implicit;\n const ctx_r0 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r0.select.emit(legendItem_r3.data));\n });\n i0.ɵɵelement(1, \"div\", 10);\n i0.ɵɵtemplate(2, AdvancedLegendComponent_div_7_div_2_Template, 1, 2, \"div\", 11)(3, AdvancedLegendComponent_div_7_div_3_Template, 2, 1, \"div\", 12);\n i0.ɵɵelementStart(4, \"div\", 13);\n i0.ɵɵtext(5);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(6, AdvancedLegendComponent_div_7_div_6_Template, 1, 2, \"div\", 14)(7, AdvancedLegendComponent_div_7_div_7_Template, 2, 1, \"div\", 15);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const legendItem_r3 = ctx.$implicit;\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵstyleProp(\"border-left-color\", legendItem_r3.color);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r0.animations);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx_r0.animations);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(legendItem_r3.displayLabel);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r0.animations);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx_r0.animations);\n }\n}\nconst _c21 = [\"ngx-charts-area-series\", \"\"];\nconst _c22 = [\"tooltipTemplate\"];\nconst _c23 = [\"seriesTooltipTemplate\"];\nconst _c24 = (a0, a1) => [a0, a1];\nfunction AreaChartComponent__svg_g_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 7);\n i0.ɵɵlistener(\"dimensionsChanged\", function AreaChartComponent__svg_g_5_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateXAxisHeight($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"dims\", ctx_r1.dims)(\"showGridLines\", ctx_r1.showGridLines)(\"showLabel\", ctx_r1.showXAxisLabel)(\"labelText\", ctx_r1.xAxisLabel)(\"trimTicks\", ctx_r1.trimXAxisTicks)(\"rotateTicks\", ctx_r1.rotateXAxisTicks)(\"maxTickLength\", ctx_r1.maxXAxisTickLength)(\"tickFormatting\", ctx_r1.xAxisTickFormatting)(\"ticks\", ctx_r1.xAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction AreaChartComponent__svg_g_6_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 8);\n i0.ɵɵlistener(\"dimensionsChanged\", function AreaChartComponent__svg_g_6_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateYAxisWidth($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"yScale\", ctx_r1.yScale)(\"dims\", ctx_r1.dims)(\"showGridLines\", ctx_r1.showGridLines)(\"showLabel\", ctx_r1.showYAxisLabel)(\"labelText\", ctx_r1.yAxisLabel)(\"trimTicks\", ctx_r1.trimYAxisTicks)(\"maxTickLength\", ctx_r1.maxYAxisTickLength)(\"tickFormatting\", ctx_r1.yAxisTickFormatting)(\"ticks\", ctx_r1.yAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction AreaChartComponent__svg_g_8_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵelement(1, \"g\", 9);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const series_r4 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"baseValue\", ctx_r1.baseValue)(\"colors\", ctx_r1.colors)(\"data\", series_r4)(\"activeEntries\", ctx_r1.activeEntries)(\"scaleType\", ctx_r1.scaleType)(\"gradient\", ctx_r1.gradient)(\"curve\", ctx_r1.curve)(\"animations\", ctx_r1.animations);\n }\n}\nfunction AreaChartComponent__svg_g_9__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 13);\n i0.ɵɵlistener(\"select\", function AreaChartComponent__svg_g_9__svg_g_2_Template_g_select_1_listener($event) {\n const series_r7 = i0.ɵɵrestoreView(_r6).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event, series_r7));\n })(\"activate\", function AreaChartComponent__svg_g_9__svg_g_2_Template_g_activate_1_listener($event) {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event));\n })(\"deactivate\", function AreaChartComponent__svg_g_9__svg_g_2_Template_g_deactivate_1_listener($event) {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const series_r7 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"colors\", ctx_r1.colors)(\"activeEntries\", ctx_r1.activeEntries)(\"data\", series_r7)(\"scaleType\", ctx_r1.scaleType)(\"visibleValue\", ctx_r1.hoveredVertical)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate);\n }\n}\nfunction AreaChartComponent__svg_g_9_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 10);\n i0.ɵɵlistener(\"mouseleave\", function AreaChartComponent__svg_g_9_Template_g_mouseleave_0_listener() {\n i0.ɵɵrestoreView(_r5);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.hideCircles());\n });\n i0.ɵɵelementStart(1, \"g\", 11);\n i0.ɵɵlistener(\"hover\", function AreaChartComponent__svg_g_9_Template_g_hover_1_listener($event) {\n i0.ɵɵrestoreView(_r5);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateHoveredVertical($event));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(2, AreaChartComponent__svg_g_9__svg_g_2_Template, 2, 9, \"g\", 12);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"dims\", ctx_r1.dims)(\"xSet\", ctx_r1.xSet)(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"results\", ctx_r1.results)(\"colors\", ctx_r1.colors)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.seriesTooltipTemplate);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results);\n }\n}\nfunction AreaChartComponent__svg_g_10__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵelement(1, \"g\", 15);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const series_r9 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx_r1.timelineXScale)(\"yScale\", ctx_r1.timelineYScale)(\"baseValue\", ctx_r1.baseValue)(\"colors\", ctx_r1.colors)(\"data\", series_r9)(\"scaleType\", ctx_r1.scaleType)(\"gradient\", ctx_r1.gradient)(\"curve\", ctx_r1.curve)(\"animations\", ctx_r1.animations);\n }\n}\nfunction AreaChartComponent__svg_g_10_Template(rf, ctx) {\n if (rf & 1) {\n const _r8 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 14);\n i0.ɵɵlistener(\"onDomainChange\", function AreaChartComponent__svg_g_10_Template_g_onDomainChange_0_listener($event) {\n i0.ɵɵrestoreView(_r8);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateDomain($event));\n });\n i0.ɵɵtemplate(1, AreaChartComponent__svg_g_10__svg_g_1_Template, 2, 9, \"g\", 4);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"results\", ctx_r1.results)(\"view\", i0.ɵɵpureFunction2(10, _c24, ctx_r1.timelineWidth, ctx_r1.height))(\"height\", ctx_r1.timelineHeight)(\"scheme\", ctx_r1.scheme)(\"customColors\", ctx_r1.customColors)(\"legend\", ctx_r1.legend)(\"scaleType\", ctx_r1.scaleType);\n i0.ɵɵattribute(\"transform\", ctx_r1.timelineTransform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nfunction AreaChartNormalizedComponent__svg_g_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 7);\n i0.ɵɵlistener(\"dimensionsChanged\", function AreaChartNormalizedComponent__svg_g_5_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateXAxisHeight($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"dims\", ctx_r1.dims)(\"showGridLines\", ctx_r1.showGridLines)(\"showLabel\", ctx_r1.showXAxisLabel)(\"labelText\", ctx_r1.xAxisLabel)(\"trimTicks\", ctx_r1.trimXAxisTicks)(\"rotateTicks\", ctx_r1.rotateXAxisTicks)(\"maxTickLength\", ctx_r1.maxXAxisTickLength)(\"tickFormatting\", ctx_r1.xAxisTickFormatting)(\"ticks\", ctx_r1.xAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction AreaChartNormalizedComponent__svg_g_6_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 8);\n i0.ɵɵlistener(\"dimensionsChanged\", function AreaChartNormalizedComponent__svg_g_6_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateYAxisWidth($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"yScale\", ctx_r1.yScale)(\"dims\", ctx_r1.dims)(\"showGridLines\", ctx_r1.showGridLines)(\"showLabel\", ctx_r1.showYAxisLabel)(\"labelText\", ctx_r1.yAxisLabel)(\"trimTicks\", ctx_r1.trimYAxisTicks)(\"maxTickLength\", ctx_r1.maxYAxisTickLength)(\"tickFormatting\", ctx_r1.yAxisTickFormatting)(\"ticks\", ctx_r1.yAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction AreaChartNormalizedComponent__svg_g_8_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵelement(1, \"g\", 9);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const series_r4 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"colors\", ctx_r1.colors)(\"data\", series_r4)(\"scaleType\", ctx_r1.scaleType)(\"activeEntries\", ctx_r1.activeEntries)(\"gradient\", ctx_r1.gradient)(\"normalized\", true)(\"curve\", ctx_r1.curve)(\"animations\", ctx_r1.animations);\n }\n}\nfunction AreaChartNormalizedComponent__svg_g_9__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 13);\n i0.ɵɵlistener(\"select\", function AreaChartNormalizedComponent__svg_g_9__svg_g_2_Template_g_select_1_listener($event) {\n const series_r7 = i0.ɵɵrestoreView(_r6).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event, series_r7));\n })(\"activate\", function AreaChartNormalizedComponent__svg_g_9__svg_g_2_Template_g_activate_1_listener($event) {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event));\n })(\"deactivate\", function AreaChartNormalizedComponent__svg_g_9__svg_g_2_Template_g_deactivate_1_listener($event) {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const series_r7 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"type\", ctx_r1.seriesType.Stacked)(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"colors\", ctx_r1.colors)(\"activeEntries\", ctx_r1.activeEntries)(\"data\", series_r7)(\"scaleType\", ctx_r1.scaleType)(\"visibleValue\", ctx_r1.hoveredVertical)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate);\n }\n}\nfunction AreaChartNormalizedComponent__svg_g_9_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 10);\n i0.ɵɵlistener(\"mouseleave\", function AreaChartNormalizedComponent__svg_g_9_Template_g_mouseleave_0_listener() {\n i0.ɵɵrestoreView(_r5);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.hideCircles());\n });\n i0.ɵɵelementStart(1, \"g\", 11);\n i0.ɵɵlistener(\"hover\", function AreaChartNormalizedComponent__svg_g_9_Template_g_hover_1_listener($event) {\n i0.ɵɵrestoreView(_r5);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateHoveredVertical($event));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(2, AreaChartNormalizedComponent__svg_g_9__svg_g_2_Template, 2, 10, \"g\", 12);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"dims\", ctx_r1.dims)(\"xSet\", ctx_r1.xSet)(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"results\", ctx_r1.results)(\"colors\", ctx_r1.colors)(\"showPercentage\", true)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.seriesTooltipTemplate);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results);\n }\n}\nfunction AreaChartNormalizedComponent__svg_g_10__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵelement(1, \"g\", 15);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const series_r9 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx_r1.timelineXScale)(\"yScale\", ctx_r1.timelineYScale)(\"colors\", ctx_r1.colors)(\"data\", series_r9)(\"scaleType\", ctx_r1.scaleType)(\"gradient\", ctx_r1.gradient)(\"normalized\", true)(\"curve\", ctx_r1.curve)(\"animations\", ctx_r1.animations);\n }\n}\nfunction AreaChartNormalizedComponent__svg_g_10_Template(rf, ctx) {\n if (rf & 1) {\n const _r8 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 14);\n i0.ɵɵlistener(\"onDomainChange\", function AreaChartNormalizedComponent__svg_g_10_Template_g_onDomainChange_0_listener($event) {\n i0.ɵɵrestoreView(_r8);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateDomain($event));\n });\n i0.ɵɵtemplate(1, AreaChartNormalizedComponent__svg_g_10__svg_g_1_Template, 2, 9, \"g\", 4);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"results\", ctx_r1.results)(\"view\", i0.ɵɵpureFunction2(10, _c24, ctx_r1.timelineWidth, ctx_r1.height))(\"height\", ctx_r1.timelineHeight)(\"scheme\", ctx_r1.scheme)(\"customColors\", ctx_r1.customColors)(\"legend\", ctx_r1.legend)(\"scaleType\", ctx_r1.scaleType);\n i0.ɵɵattribute(\"transform\", ctx_r1.timelineTransform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nconst _c25 = \".ngx-charts-outer{animation:chartFadeIn linear .6s}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .node,.ngx-charts .link,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .node.active,.ngx-charts .node:hover,.ngx-charts .link.active,.ngx-charts .link:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .node:focus,.ngx-charts .link:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .node.hidden,.ngx-charts .link.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.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:#0000000d}\\n\";\nfunction AreaChartStackedComponent__svg_g_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 7);\n i0.ɵɵlistener(\"dimensionsChanged\", function AreaChartStackedComponent__svg_g_5_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateXAxisHeight($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"dims\", ctx_r1.dims)(\"showGridLines\", ctx_r1.showGridLines)(\"showLabel\", ctx_r1.showXAxisLabel)(\"labelText\", ctx_r1.xAxisLabel)(\"trimTicks\", ctx_r1.trimXAxisTicks)(\"rotateTicks\", ctx_r1.rotateXAxisTicks)(\"maxTickLength\", ctx_r1.maxXAxisTickLength)(\"tickFormatting\", ctx_r1.xAxisTickFormatting)(\"ticks\", ctx_r1.xAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction AreaChartStackedComponent__svg_g_6_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 8);\n i0.ɵɵlistener(\"dimensionsChanged\", function AreaChartStackedComponent__svg_g_6_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateYAxisWidth($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"yScale\", ctx_r1.yScale)(\"dims\", ctx_r1.dims)(\"showGridLines\", ctx_r1.showGridLines)(\"showLabel\", ctx_r1.showYAxisLabel)(\"labelText\", ctx_r1.yAxisLabel)(\"trimTicks\", ctx_r1.trimYAxisTicks)(\"maxTickLength\", ctx_r1.maxYAxisTickLength)(\"tickFormatting\", ctx_r1.yAxisTickFormatting)(\"ticks\", ctx_r1.yAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction AreaChartStackedComponent__svg_g_8_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵelement(1, \"g\", 9);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const series_r4 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"colors\", ctx_r1.colors)(\"data\", series_r4)(\"scaleType\", ctx_r1.scaleType)(\"gradient\", ctx_r1.gradient)(\"activeEntries\", ctx_r1.activeEntries)(\"stacked\", true)(\"curve\", ctx_r1.curve)(\"animations\", ctx_r1.animations);\n }\n}\nfunction AreaChartStackedComponent__svg_g_9__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 12);\n i0.ɵɵlistener(\"select\", function AreaChartStackedComponent__svg_g_9__svg_g_2_Template_g_select_1_listener($event) {\n const series_r7 = i0.ɵɵrestoreView(_r6).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event, series_r7));\n })(\"activate\", function AreaChartStackedComponent__svg_g_9__svg_g_2_Template_g_activate_1_listener($event) {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event));\n })(\"deactivate\", function AreaChartStackedComponent__svg_g_9__svg_g_2_Template_g_deactivate_1_listener($event) {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const series_r7 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"type\", ctx_r1.seriesType.Stacked)(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"colors\", ctx_r1.colors)(\"activeEntries\", ctx_r1.activeEntries)(\"data\", series_r7)(\"scaleType\", ctx_r1.scaleType)(\"visibleValue\", ctx_r1.hoveredVertical)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate);\n }\n}\nfunction AreaChartStackedComponent__svg_g_9_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 10);\n i0.ɵɵlistener(\"mouseleave\", function AreaChartStackedComponent__svg_g_9_Template_g_mouseleave_0_listener() {\n i0.ɵɵrestoreView(_r5);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.hideCircles());\n });\n i0.ɵɵelementStart(1, \"g\", 11);\n i0.ɵɵlistener(\"hover\", function AreaChartStackedComponent__svg_g_9_Template_g_hover_1_listener($event) {\n i0.ɵɵrestoreView(_r5);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateHoveredVertical($event));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(2, AreaChartStackedComponent__svg_g_9__svg_g_2_Template, 2, 10, \"g\", 4);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"dims\", ctx_r1.dims)(\"xSet\", ctx_r1.xSet)(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"results\", ctx_r1.results)(\"colors\", ctx_r1.colors)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.seriesTooltipTemplate);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nfunction AreaChartStackedComponent__svg_g_10__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵelement(1, \"g\", 14);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const series_r9 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx_r1.timelineXScale)(\"yScale\", ctx_r1.timelineYScale)(\"colors\", ctx_r1.colors)(\"data\", series_r9)(\"scaleType\", ctx_r1.scaleType)(\"gradient\", ctx_r1.gradient)(\"stacked\", true)(\"curve\", ctx_r1.curve)(\"animations\", ctx_r1.animations);\n }\n}\nfunction AreaChartStackedComponent__svg_g_10_Template(rf, ctx) {\n if (rf & 1) {\n const _r8 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 13);\n i0.ɵɵlistener(\"onDomainChange\", function AreaChartStackedComponent__svg_g_10_Template_g_onDomainChange_0_listener($event) {\n i0.ɵɵrestoreView(_r8);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateDomain($event));\n });\n i0.ɵɵtemplate(1, AreaChartStackedComponent__svg_g_10__svg_g_1_Template, 2, 9, \"g\", 4);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"results\", ctx_r1.results)(\"view\", i0.ɵɵpureFunction2(10, _c24, ctx_r1.timelineWidth, ctx_r1.height))(\"height\", ctx_r1.timelineHeight)(\"scheme\", ctx_r1.scheme)(\"customColors\", ctx_r1.customColors)(\"legend\", ctx_r1.legend)(\"scaleType\", ctx_r1.scaleType);\n i0.ɵɵattribute(\"transform\", ctx_r1.timelineTransform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nconst _c26 = [\"ngx-charts-bar\", \"\"];\nfunction BarComponent__svg_defs_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"defs\");\n i0.ɵɵelement(1, \"g\", 2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"orientation\", ctx_r0.orientation)(\"name\", ctx_r0.gradientId)(\"stops\", ctx_r0.gradientStops);\n }\n}\nconst _c27 = [\"ngx-charts-bar-label\", \"\"];\nconst _c28 = [\"ngx-charts-series-horizontal\", \"\"];\nfunction SeriesHorizontal__svg_g_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 2);\n i0.ɵɵlistener(\"select\", function SeriesHorizontal__svg_g_0_Template_g_select_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.click($event));\n })(\"activate\", function SeriesHorizontal__svg_g_0_Template_g_activate_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.activate.emit($event));\n })(\"deactivate\", function SeriesHorizontal__svg_g_0_Template_g_deactivate_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.deactivate.emit($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const bar_r3 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"@animationState\", \"active\")(\"width\", bar_r3.width)(\"height\", bar_r3.height)(\"x\", bar_r3.x)(\"y\", bar_r3.y)(\"fill\", bar_r3.color)(\"stops\", bar_r3.gradientStops)(\"data\", bar_r3.data)(\"orientation\", ctx_r1.barOrientation.Horizontal)(\"roundEdges\", bar_r3.roundEdges)(\"gradient\", ctx_r1.gradient)(\"isActive\", ctx_r1.isActive(bar_r3.data))(\"ariaLabel\", bar_r3.ariaLabel)(\"animations\", ctx_r1.animations)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipPlacement\", ctx_r1.tooltipPlacement)(\"tooltipType\", ctx_r1.tooltipType)(\"tooltipTitle\", ctx_r1.tooltipTemplate ? undefined : bar_r3.tooltipText)(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"tooltipContext\", bar_r3.data)(\"noBarWhenZero\", ctx_r1.noBarWhenZero);\n }\n}\nfunction SeriesHorizontal__svg_g_1__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 4);\n i0.ɵɵlistener(\"dimensionsChanged\", function SeriesHorizontal__svg_g_1__svg_g_1_Template_g_dimensionsChanged_0_listener($event) {\n const i_r5 = i0.ɵɵrestoreView(_r4).index;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.dataLabelWidthChanged.emit({\n size: $event,\n index: i_r5\n }));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const b_r6 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"barX\", b_r6.x)(\"barY\", b_r6.y)(\"barWidth\", b_r6.width)(\"barHeight\", b_r6.height)(\"value\", b_r6.total)(\"valueFormatting\", ctx_r1.dataLabelFormatting)(\"orientation\", ctx_r1.barOrientation.Horizontal);\n }\n}\nfunction SeriesHorizontal__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, SeriesHorizontal__svg_g_1__svg_g_1_Template, 1, 7, \"g\", 3);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.barsForDataLabels)(\"ngForTrackBy\", ctx_r1.trackDataLabelBy);\n }\n}\nfunction BarHorizontalComponent__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 5);\n i0.ɵɵlistener(\"dimensionsChanged\", function BarHorizontalComponent__svg_g_2_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateXAxisHeight($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"dims\", ctx_r1.dims)(\"showGridLines\", ctx_r1.showGridLines)(\"showLabel\", ctx_r1.showXAxisLabel)(\"labelText\", ctx_r1.xAxisLabel)(\"trimTicks\", ctx_r1.trimXAxisTicks)(\"rotateTicks\", ctx_r1.rotateXAxisTicks)(\"maxTickLength\", ctx_r1.maxXAxisTickLength)(\"tickFormatting\", ctx_r1.xAxisTickFormatting)(\"ticks\", ctx_r1.xAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction BarHorizontalComponent__svg_g_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 6);\n i0.ɵɵlistener(\"dimensionsChanged\", function BarHorizontalComponent__svg_g_3_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateYAxisWidth($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"yScale\", ctx_r1.yScale)(\"dims\", ctx_r1.dims)(\"showLabel\", ctx_r1.showYAxisLabel)(\"labelText\", ctx_r1.yAxisLabel)(\"trimTicks\", ctx_r1.trimYAxisTicks)(\"maxTickLength\", ctx_r1.maxYAxisTickLength)(\"tickFormatting\", ctx_r1.yAxisTickFormatting)(\"ticks\", ctx_r1.yAxisTicks)(\"yAxisOffset\", ctx_r1.dataLabelMaxWidth.negative)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction BarHorizontal2DComponent__svg_g_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 6);\n i0.ɵɵlistener(\"dimensionsChanged\", function BarHorizontal2DComponent__svg_g_3_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateXAxisHeight($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"xScale\", ctx_r1.valueScale)(\"dims\", ctx_r1.dims)(\"showGridLines\", ctx_r1.showGridLines)(\"showLabel\", ctx_r1.showXAxisLabel)(\"labelText\", ctx_r1.xAxisLabel)(\"trimTicks\", ctx_r1.trimXAxisTicks)(\"rotateTicks\", ctx_r1.rotateXAxisTicks)(\"maxTickLength\", ctx_r1.maxXAxisTickLength)(\"tickFormatting\", ctx_r1.xAxisTickFormatting)(\"ticks\", ctx_r1.xAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction BarHorizontal2DComponent__svg_g_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 7);\n i0.ɵɵlistener(\"dimensionsChanged\", function BarHorizontal2DComponent__svg_g_4_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateYAxisWidth($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"yScale\", ctx_r1.groupScale)(\"dims\", ctx_r1.dims)(\"showLabel\", ctx_r1.showYAxisLabel)(\"labelText\", ctx_r1.yAxisLabel)(\"trimTicks\", ctx_r1.trimYAxisTicks)(\"maxTickLength\", ctx_r1.maxYAxisTickLength)(\"tickFormatting\", ctx_r1.yAxisTickFormatting)(\"ticks\", ctx_r1.yAxisTicks)(\"yAxisOffset\", ctx_r1.dataLabelMaxWidth.negative)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction BarHorizontal2DComponent__svg_g_5__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 9);\n i0.ɵɵlistener(\"select\", function BarHorizontal2DComponent__svg_g_5__svg_g_1_Template_g_select_1_listener($event) {\n const group_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event, group_r5));\n })(\"activate\", function BarHorizontal2DComponent__svg_g_5__svg_g_1_Template_g_activate_1_listener($event) {\n const group_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event, group_r5));\n })(\"deactivate\", function BarHorizontal2DComponent__svg_g_5__svg_g_1_Template_g_deactivate_1_listener($event) {\n const group_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event, group_r5));\n })(\"dataLabelWidthChanged\", function BarHorizontal2DComponent__svg_g_5__svg_g_1_Template_g_dataLabelWidthChanged_1_listener($event) {\n const index_r6 = i0.ɵɵrestoreView(_r4).index;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDataLabelMaxWidthChanged($event, index_r6));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const group_r5 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"@animationState\", \"active\");\n i0.ɵɵattribute(\"transform\", ctx_r1.groupTransform(group_r5));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx_r1.valueScale)(\"activeEntries\", ctx_r1.activeEntries)(\"yScale\", ctx_r1.innerScale)(\"colors\", ctx_r1.colors)(\"series\", group_r5.series)(\"dims\", ctx_r1.dims)(\"gradient\", ctx_r1.gradient)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"seriesName\", group_r5.name)(\"roundEdges\", ctx_r1.roundEdges)(\"animations\", ctx_r1.animations)(\"showDataLabel\", ctx_r1.showDataLabel)(\"dataLabelFormatting\", ctx_r1.dataLabelFormatting)(\"noBarWhenZero\", ctx_r1.noBarWhenZero);\n }\n}\nfunction BarHorizontal2DComponent__svg_g_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, BarHorizontal2DComponent__svg_g_5__svg_g_1_Template, 2, 17, \"g\", 8);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nfunction BarHorizontal2DComponent__svg_g_6__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r7 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 9);\n i0.ɵɵlistener(\"select\", function BarHorizontal2DComponent__svg_g_6__svg_g_1_Template_g_select_1_listener($event) {\n const group_r8 = i0.ɵɵrestoreView(_r7).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event, group_r8));\n })(\"activate\", function BarHorizontal2DComponent__svg_g_6__svg_g_1_Template_g_activate_1_listener($event) {\n const group_r8 = i0.ɵɵrestoreView(_r7).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event, group_r8));\n })(\"deactivate\", function BarHorizontal2DComponent__svg_g_6__svg_g_1_Template_g_deactivate_1_listener($event) {\n const group_r8 = i0.ɵɵrestoreView(_r7).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event, group_r8));\n })(\"dataLabelWidthChanged\", function BarHorizontal2DComponent__svg_g_6__svg_g_1_Template_g_dataLabelWidthChanged_1_listener($event) {\n const index_r9 = i0.ɵɵrestoreView(_r7).index;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDataLabelMaxWidthChanged($event, index_r9));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const group_r8 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵattribute(\"transform\", ctx_r1.groupTransform(group_r8));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx_r1.valueScale)(\"activeEntries\", ctx_r1.activeEntries)(\"yScale\", ctx_r1.innerScale)(\"colors\", ctx_r1.colors)(\"series\", group_r8.series)(\"dims\", ctx_r1.dims)(\"gradient\", ctx_r1.gradient)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"seriesName\", group_r8.name)(\"roundEdges\", ctx_r1.roundEdges)(\"animations\", ctx_r1.animations)(\"showDataLabel\", ctx_r1.showDataLabel)(\"dataLabelFormatting\", ctx_r1.dataLabelFormatting)(\"noBarWhenZero\", ctx_r1.noBarWhenZero);\n }\n}\nfunction BarHorizontal2DComponent__svg_g_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, BarHorizontal2DComponent__svg_g_6__svg_g_1_Template, 2, 16, \"g\", 8);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nfunction BarHorizontalNormalizedComponent__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 5);\n i0.ɵɵlistener(\"dimensionsChanged\", function BarHorizontalNormalizedComponent__svg_g_2_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateXAxisHeight($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"dims\", ctx_r1.dims)(\"showGridLines\", ctx_r1.showGridLines)(\"showLabel\", ctx_r1.showXAxisLabel)(\"labelText\", ctx_r1.xAxisLabel)(\"trimTicks\", ctx_r1.trimXAxisTicks)(\"rotateTicks\", ctx_r1.rotateXAxisTicks)(\"maxTickLength\", ctx_r1.maxXAxisTickLength)(\"tickFormatting\", ctx_r1.xAxisTickFormatting)(\"ticks\", ctx_r1.xAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction BarHorizontalNormalizedComponent__svg_g_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 6);\n i0.ɵɵlistener(\"dimensionsChanged\", function BarHorizontalNormalizedComponent__svg_g_3_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateYAxisWidth($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"yScale\", ctx_r1.yScale)(\"dims\", ctx_r1.dims)(\"showLabel\", ctx_r1.showYAxisLabel)(\"labelText\", ctx_r1.yAxisLabel)(\"trimTicks\", ctx_r1.trimYAxisTicks)(\"maxTickLength\", ctx_r1.maxYAxisTickLength)(\"tickFormatting\", ctx_r1.yAxisTickFormatting)(\"ticks\", ctx_r1.yAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction BarHorizontalNormalizedComponent__svg_g_4__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 8);\n i0.ɵɵlistener(\"select\", function BarHorizontalNormalizedComponent__svg_g_4__svg_g_1_Template_g_select_1_listener($event) {\n const group_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event, group_r5));\n })(\"activate\", function BarHorizontalNormalizedComponent__svg_g_4__svg_g_1_Template_g_activate_1_listener($event) {\n const group_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event, group_r5));\n })(\"deactivate\", function BarHorizontalNormalizedComponent__svg_g_4__svg_g_1_Template_g_deactivate_1_listener($event) {\n const group_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event, group_r5));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const group_r5 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"@animationState\", \"active\");\n i0.ɵɵattribute(\"transform\", ctx_r1.groupTransform(group_r5));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"type\", ctx_r1.barChartType.Normalized)(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"activeEntries\", ctx_r1.activeEntries)(\"colors\", ctx_r1.colors)(\"series\", group_r5.series)(\"dims\", ctx_r1.dims)(\"gradient\", ctx_r1.gradient)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"seriesName\", group_r5.name)(\"animations\", ctx_r1.animations)(\"noBarWhenZero\", ctx_r1.noBarWhenZero);\n }\n}\nfunction BarHorizontalNormalizedComponent__svg_g_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, BarHorizontalNormalizedComponent__svg_g_4__svg_g_1_Template, 2, 15, \"g\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nfunction BarHorizontalNormalizedComponent__svg_g_5__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 8);\n i0.ɵɵlistener(\"select\", function BarHorizontalNormalizedComponent__svg_g_5__svg_g_1_Template_g_select_1_listener($event) {\n const group_r7 = i0.ɵɵrestoreView(_r6).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event, group_r7));\n })(\"activate\", function BarHorizontalNormalizedComponent__svg_g_5__svg_g_1_Template_g_activate_1_listener($event) {\n const group_r7 = i0.ɵɵrestoreView(_r6).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event, group_r7));\n })(\"deactivate\", function BarHorizontalNormalizedComponent__svg_g_5__svg_g_1_Template_g_deactivate_1_listener($event) {\n const group_r7 = i0.ɵɵrestoreView(_r6).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event, group_r7));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const group_r7 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵattribute(\"transform\", ctx_r1.groupTransform(group_r7));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"type\", ctx_r1.barChartType.Normalized)(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"activeEntries\", ctx_r1.activeEntries)(\"colors\", ctx_r1.colors)(\"series\", group_r7.series)(\"dims\", ctx_r1.dims)(\"gradient\", ctx_r1.gradient)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"seriesName\", group_r7.name)(\"animations\", ctx_r1.animations)(\"noBarWhenZero\", ctx_r1.noBarWhenZero);\n }\n}\nfunction BarHorizontalNormalizedComponent__svg_g_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, BarHorizontalNormalizedComponent__svg_g_5__svg_g_1_Template, 2, 14, \"g\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nfunction BarHorizontalStackedComponent__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 5);\n i0.ɵɵlistener(\"dimensionsChanged\", function BarHorizontalStackedComponent__svg_g_2_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateXAxisHeight($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"dims\", ctx_r1.dims)(\"showGridLines\", ctx_r1.showGridLines)(\"showLabel\", ctx_r1.showXAxisLabel)(\"labelText\", ctx_r1.xAxisLabel)(\"trimTicks\", ctx_r1.trimXAxisTicks)(\"rotateTicks\", ctx_r1.rotateXAxisTicks)(\"maxTickLength\", ctx_r1.maxXAxisTickLength)(\"tickFormatting\", ctx_r1.xAxisTickFormatting)(\"ticks\", ctx_r1.xAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction BarHorizontalStackedComponent__svg_g_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 6);\n i0.ɵɵlistener(\"dimensionsChanged\", function BarHorizontalStackedComponent__svg_g_3_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateYAxisWidth($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"yScale\", ctx_r1.yScale)(\"dims\", ctx_r1.dims)(\"showLabel\", ctx_r1.showYAxisLabel)(\"labelText\", ctx_r1.yAxisLabel)(\"trimTicks\", ctx_r1.trimYAxisTicks)(\"maxTickLength\", ctx_r1.maxYAxisTickLength)(\"tickFormatting\", ctx_r1.yAxisTickFormatting)(\"ticks\", ctx_r1.yAxisTicks)(\"yAxisOffset\", ctx_r1.dataLabelMaxWidth.negative)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction BarHorizontalStackedComponent__svg_g_4__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 8);\n i0.ɵɵlistener(\"select\", function BarHorizontalStackedComponent__svg_g_4__svg_g_1_Template_g_select_1_listener($event) {\n const group_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event, group_r5));\n })(\"activate\", function BarHorizontalStackedComponent__svg_g_4__svg_g_1_Template_g_activate_1_listener($event) {\n const group_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event, group_r5));\n })(\"deactivate\", function BarHorizontalStackedComponent__svg_g_4__svg_g_1_Template_g_deactivate_1_listener($event) {\n const group_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event, group_r5));\n })(\"dataLabelWidthChanged\", function BarHorizontalStackedComponent__svg_g_4__svg_g_1_Template_g_dataLabelWidthChanged_1_listener($event) {\n const index_r6 = i0.ɵɵrestoreView(_r4).index;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDataLabelMaxWidthChanged($event, index_r6));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const group_r5 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"@animationState\", \"active\");\n i0.ɵɵattribute(\"transform\", ctx_r1.groupTransform(group_r5));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"type\", ctx_r1.barChartType.Stacked)(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"colors\", ctx_r1.colors)(\"series\", group_r5.series)(\"activeEntries\", ctx_r1.activeEntries)(\"dims\", ctx_r1.dims)(\"gradient\", ctx_r1.gradient)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"seriesName\", group_r5.name)(\"animations\", ctx_r1.animations)(\"showDataLabel\", ctx_r1.showDataLabel)(\"dataLabelFormatting\", ctx_r1.dataLabelFormatting)(\"noBarWhenZero\", ctx_r1.noBarWhenZero);\n }\n}\nfunction BarHorizontalStackedComponent__svg_g_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, BarHorizontalStackedComponent__svg_g_4__svg_g_1_Template, 2, 17, \"g\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nfunction BarHorizontalStackedComponent__svg_g_5__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r7 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 8);\n i0.ɵɵlistener(\"select\", function BarHorizontalStackedComponent__svg_g_5__svg_g_1_Template_g_select_1_listener($event) {\n const group_r8 = i0.ɵɵrestoreView(_r7).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event, group_r8));\n })(\"activate\", function BarHorizontalStackedComponent__svg_g_5__svg_g_1_Template_g_activate_1_listener($event) {\n const group_r8 = i0.ɵɵrestoreView(_r7).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event, group_r8));\n })(\"deactivate\", function BarHorizontalStackedComponent__svg_g_5__svg_g_1_Template_g_deactivate_1_listener($event) {\n const group_r8 = i0.ɵɵrestoreView(_r7).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event, group_r8));\n })(\"dataLabelWidthChanged\", function BarHorizontalStackedComponent__svg_g_5__svg_g_1_Template_g_dataLabelWidthChanged_1_listener($event) {\n const index_r9 = i0.ɵɵrestoreView(_r7).index;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDataLabelMaxWidthChanged($event, index_r9));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const group_r8 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵattribute(\"transform\", ctx_r1.groupTransform(group_r8));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"type\", ctx_r1.barChartType.Stacked)(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"colors\", ctx_r1.colors)(\"series\", group_r8.series)(\"activeEntries\", ctx_r1.activeEntries)(\"dims\", ctx_r1.dims)(\"gradient\", ctx_r1.gradient)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"seriesName\", group_r8.name)(\"animations\", ctx_r1.animations)(\"showDataLabel\", ctx_r1.showDataLabel)(\"dataLabelFormatting\", ctx_r1.dataLabelFormatting)(\"noBarWhenZero\", ctx_r1.noBarWhenZero);\n }\n}\nfunction BarHorizontalStackedComponent__svg_g_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, BarHorizontalStackedComponent__svg_g_5__svg_g_1_Template, 2, 16, \"g\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nconst _c29 = [\"ngx-charts-series-vertical\", \"\"];\nfunction SeriesVerticalComponent__svg_g_0__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 2);\n i0.ɵɵlistener(\"select\", function SeriesVerticalComponent__svg_g_0__svg_g_1_Template_g_select_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event));\n })(\"activate\", function SeriesVerticalComponent__svg_g_0__svg_g_1_Template_g_activate_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.activate.emit($event));\n })(\"deactivate\", function SeriesVerticalComponent__svg_g_0__svg_g_1_Template_g_deactivate_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.deactivate.emit($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const bar_r3 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"@animationState\", \"active\")(\"@.disabled\", !ctx_r1.animations)(\"width\", bar_r3.width)(\"height\", bar_r3.height)(\"x\", bar_r3.x)(\"y\", bar_r3.y)(\"fill\", bar_r3.color)(\"stops\", bar_r3.gradientStops)(\"data\", bar_r3.data)(\"orientation\", ctx_r1.barOrientation.Vertical)(\"roundEdges\", bar_r3.roundEdges)(\"gradient\", ctx_r1.gradient)(\"ariaLabel\", bar_r3.ariaLabel)(\"isActive\", ctx_r1.isActive(bar_r3.data))(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipPlacement\", ctx_r1.tooltipPlacement)(\"tooltipType\", ctx_r1.tooltipType)(\"tooltipTitle\", ctx_r1.tooltipTemplate ? undefined : bar_r3.tooltipText)(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"tooltipContext\", bar_r3.data)(\"noBarWhenZero\", ctx_r1.noBarWhenZero)(\"animations\", ctx_r1.animations);\n }\n}\nfunction SeriesVerticalComponent__svg_g_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, SeriesVerticalComponent__svg_g_0__svg_g_1_Template, 1, 22, \"g\", 1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.bars)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nfunction SeriesVerticalComponent__svg_g_1__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 2);\n i0.ɵɵlistener(\"select\", function SeriesVerticalComponent__svg_g_1__svg_g_1_Template_g_select_0_listener($event) {\n i0.ɵɵrestoreView(_r4);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event));\n })(\"activate\", function SeriesVerticalComponent__svg_g_1__svg_g_1_Template_g_activate_0_listener($event) {\n i0.ɵɵrestoreView(_r4);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.activate.emit($event));\n })(\"deactivate\", function SeriesVerticalComponent__svg_g_1__svg_g_1_Template_g_deactivate_0_listener($event) {\n i0.ɵɵrestoreView(_r4);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.deactivate.emit($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const bar_r5 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"width\", bar_r5.width)(\"height\", bar_r5.height)(\"x\", bar_r5.x)(\"y\", bar_r5.y)(\"fill\", bar_r5.color)(\"stops\", bar_r5.gradientStops)(\"data\", bar_r5.data)(\"orientation\", ctx_r1.barOrientation.Vertical)(\"roundEdges\", bar_r5.roundEdges)(\"gradient\", ctx_r1.gradient)(\"ariaLabel\", bar_r5.ariaLabel)(\"isActive\", ctx_r1.isActive(bar_r5.data))(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipPlacement\", ctx_r1.tooltipPlacement)(\"tooltipType\", ctx_r1.tooltipType)(\"tooltipTitle\", ctx_r1.tooltipTemplate ? undefined : bar_r5.tooltipText)(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"tooltipContext\", bar_r5.data)(\"noBarWhenZero\", ctx_r1.noBarWhenZero)(\"animations\", ctx_r1.animations);\n }\n}\nfunction SeriesVerticalComponent__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, SeriesVerticalComponent__svg_g_1__svg_g_1_Template, 1, 20, \"g\", 1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.bars)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nfunction SeriesVerticalComponent__svg_g_2__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 4);\n i0.ɵɵlistener(\"dimensionsChanged\", function SeriesVerticalComponent__svg_g_2__svg_g_1_Template_g_dimensionsChanged_0_listener($event) {\n const i_r7 = i0.ɵɵrestoreView(_r6).index;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.dataLabelHeightChanged.emit({\n size: $event,\n index: i_r7\n }));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const b_r8 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"barX\", b_r8.x)(\"barY\", b_r8.y)(\"barWidth\", b_r8.width)(\"barHeight\", b_r8.height)(\"value\", b_r8.total)(\"valueFormatting\", ctx_r1.dataLabelFormatting)(\"orientation\", ctx_r1.barOrientation.Vertical);\n }\n}\nfunction SeriesVerticalComponent__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, SeriesVerticalComponent__svg_g_2__svg_g_1_Template, 1, 7, \"g\", 3);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.barsForDataLabels)(\"ngForTrackBy\", ctx_r1.trackDataLabelBy);\n }\n}\nfunction BarVerticalComponent__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 5);\n i0.ɵɵlistener(\"dimensionsChanged\", function BarVerticalComponent__svg_g_2_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateXAxisHeight($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"dims\", ctx_r1.dims)(\"showGridLines\", ctx_r1.showGridLines)(\"showLabel\", ctx_r1.showXAxisLabel)(\"labelText\", ctx_r1.xAxisLabel)(\"trimTicks\", ctx_r1.trimXAxisTicks)(\"rotateTicks\", ctx_r1.rotateXAxisTicks)(\"maxTickLength\", ctx_r1.maxXAxisTickLength)(\"tickFormatting\", ctx_r1.xAxisTickFormatting)(\"ticks\", ctx_r1.xAxisTicks)(\"xAxisOffset\", ctx_r1.dataLabelMaxHeight.negative)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction BarVerticalComponent__svg_g_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 6);\n i0.ɵɵlistener(\"dimensionsChanged\", function BarVerticalComponent__svg_g_3_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateYAxisWidth($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"yScale\", ctx_r1.yScale)(\"dims\", ctx_r1.dims)(\"showGridLines\", ctx_r1.showGridLines)(\"showLabel\", ctx_r1.showYAxisLabel)(\"labelText\", ctx_r1.yAxisLabel)(\"trimTicks\", ctx_r1.trimYAxisTicks)(\"maxTickLength\", ctx_r1.maxYAxisTickLength)(\"tickFormatting\", ctx_r1.yAxisTickFormatting)(\"ticks\", ctx_r1.yAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction BarVertical2DComponent__svg_g_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 6);\n i0.ɵɵlistener(\"dimensionsChanged\", function BarVertical2DComponent__svg_g_3_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateXAxisHeight($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"xScale\", ctx_r1.groupScale)(\"dims\", ctx_r1.dims)(\"showLabel\", ctx_r1.showXAxisLabel)(\"labelText\", ctx_r1.xAxisLabel)(\"trimTicks\", ctx_r1.trimXAxisTicks)(\"rotateTicks\", ctx_r1.rotateXAxisTicks)(\"maxTickLength\", ctx_r1.maxXAxisTickLength)(\"tickFormatting\", ctx_r1.xAxisTickFormatting)(\"ticks\", ctx_r1.xAxisTicks)(\"xAxisOffset\", ctx_r1.dataLabelMaxHeight.negative)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction BarVertical2DComponent__svg_g_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 7);\n i0.ɵɵlistener(\"dimensionsChanged\", function BarVertical2DComponent__svg_g_4_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateYAxisWidth($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"yScale\", ctx_r1.valueScale)(\"dims\", ctx_r1.dims)(\"showGridLines\", ctx_r1.showGridLines)(\"showLabel\", ctx_r1.showYAxisLabel)(\"labelText\", ctx_r1.yAxisLabel)(\"trimTicks\", ctx_r1.trimYAxisTicks)(\"maxTickLength\", ctx_r1.maxYAxisTickLength)(\"tickFormatting\", ctx_r1.yAxisTickFormatting)(\"ticks\", ctx_r1.yAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction BarVertical2DComponent__svg_g_5__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 9);\n i0.ɵɵlistener(\"select\", function BarVertical2DComponent__svg_g_5__svg_g_1_Template_g_select_0_listener($event) {\n const group_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event, group_r5));\n })(\"activate\", function BarVertical2DComponent__svg_g_5__svg_g_1_Template_g_activate_0_listener($event) {\n const group_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event, group_r5));\n })(\"deactivate\", function BarVertical2DComponent__svg_g_5__svg_g_1_Template_g_deactivate_0_listener($event) {\n const group_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event, group_r5));\n })(\"dataLabelHeightChanged\", function BarVertical2DComponent__svg_g_5__svg_g_1_Template_g_dataLabelHeightChanged_0_listener($event) {\n const index_r6 = i0.ɵɵrestoreView(_r4).index;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDataLabelMaxHeightChanged($event, index_r6));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const group_r5 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"@animationState\", \"active\")(\"activeEntries\", ctx_r1.activeEntries)(\"xScale\", ctx_r1.innerScale)(\"yScale\", ctx_r1.valueScale)(\"colors\", ctx_r1.colors)(\"series\", group_r5.series)(\"dims\", ctx_r1.dims)(\"gradient\", ctx_r1.gradient)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"showDataLabel\", ctx_r1.showDataLabel)(\"dataLabelFormatting\", ctx_r1.dataLabelFormatting)(\"seriesName\", group_r5.name)(\"roundEdges\", ctx_r1.roundEdges)(\"animations\", ctx_r1.animations)(\"noBarWhenZero\", ctx_r1.noBarWhenZero);\n i0.ɵɵattribute(\"transform\", ctx_r1.groupTransform(group_r5));\n }\n}\nfunction BarVertical2DComponent__svg_g_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, BarVertical2DComponent__svg_g_5__svg_g_1_Template, 1, 17, \"g\", 8);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nfunction BarVertical2DComponent__svg_g_6__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r7 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 9);\n i0.ɵɵlistener(\"select\", function BarVertical2DComponent__svg_g_6__svg_g_1_Template_g_select_0_listener($event) {\n const group_r8 = i0.ɵɵrestoreView(_r7).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event, group_r8));\n })(\"activate\", function BarVertical2DComponent__svg_g_6__svg_g_1_Template_g_activate_0_listener($event) {\n const group_r8 = i0.ɵɵrestoreView(_r7).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event, group_r8));\n })(\"deactivate\", function BarVertical2DComponent__svg_g_6__svg_g_1_Template_g_deactivate_0_listener($event) {\n const group_r8 = i0.ɵɵrestoreView(_r7).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event, group_r8));\n })(\"dataLabelHeightChanged\", function BarVertical2DComponent__svg_g_6__svg_g_1_Template_g_dataLabelHeightChanged_0_listener($event) {\n const index_r9 = i0.ɵɵrestoreView(_r7).index;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDataLabelMaxHeightChanged($event, index_r9));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const group_r8 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"activeEntries\", ctx_r1.activeEntries)(\"xScale\", ctx_r1.innerScale)(\"yScale\", ctx_r1.valueScale)(\"colors\", ctx_r1.colors)(\"series\", group_r8.series)(\"dims\", ctx_r1.dims)(\"gradient\", ctx_r1.gradient)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"showDataLabel\", ctx_r1.showDataLabel)(\"dataLabelFormatting\", ctx_r1.dataLabelFormatting)(\"seriesName\", group_r8.name)(\"roundEdges\", ctx_r1.roundEdges)(\"animations\", ctx_r1.animations)(\"noBarWhenZero\", ctx_r1.noBarWhenZero);\n i0.ɵɵattribute(\"transform\", ctx_r1.groupTransform(group_r8));\n }\n}\nfunction BarVertical2DComponent__svg_g_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, BarVertical2DComponent__svg_g_6__svg_g_1_Template, 1, 16, \"g\", 8);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nfunction BarVerticalNormalizedComponent__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 5);\n i0.ɵɵlistener(\"dimensionsChanged\", function BarVerticalNormalizedComponent__svg_g_2_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateXAxisHeight($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"dims\", ctx_r1.dims)(\"showLabel\", ctx_r1.showXAxisLabel)(\"labelText\", ctx_r1.xAxisLabel)(\"trimTicks\", ctx_r1.trimXAxisTicks)(\"rotateTicks\", ctx_r1.rotateXAxisTicks)(\"maxTickLength\", ctx_r1.maxXAxisTickLength)(\"tickFormatting\", ctx_r1.xAxisTickFormatting)(\"ticks\", ctx_r1.xAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction BarVerticalNormalizedComponent__svg_g_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 6);\n i0.ɵɵlistener(\"dimensionsChanged\", function BarVerticalNormalizedComponent__svg_g_3_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateYAxisWidth($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"yScale\", ctx_r1.yScale)(\"dims\", ctx_r1.dims)(\"showGridLines\", ctx_r1.showGridLines)(\"showLabel\", ctx_r1.showYAxisLabel)(\"labelText\", ctx_r1.yAxisLabel)(\"trimTicks\", ctx_r1.trimYAxisTicks)(\"maxTickLength\", ctx_r1.maxYAxisTickLength)(\"tickFormatting\", ctx_r1.yAxisTickFormatting)(\"ticks\", ctx_r1.yAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction BarVerticalNormalizedComponent__svg_g_4__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 8);\n i0.ɵɵlistener(\"select\", function BarVerticalNormalizedComponent__svg_g_4__svg_g_1_Template_g_select_1_listener($event) {\n const group_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event, group_r5));\n })(\"activate\", function BarVerticalNormalizedComponent__svg_g_4__svg_g_1_Template_g_activate_1_listener($event) {\n const group_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event, group_r5));\n })(\"deactivate\", function BarVerticalNormalizedComponent__svg_g_4__svg_g_1_Template_g_deactivate_1_listener($event) {\n const group_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event, group_r5));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const group_r5 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"@animationState\", \"active\");\n i0.ɵɵattribute(\"transform\", ctx_r1.groupTransform(group_r5));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"type\", ctx_r1.barChartType.Normalized)(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"activeEntries\", ctx_r1.activeEntries)(\"colors\", ctx_r1.colors)(\"series\", group_r5.series)(\"dims\", ctx_r1.dims)(\"gradient\", ctx_r1.gradient)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"seriesName\", group_r5.name)(\"animations\", ctx_r1.animations)(\"noBarWhenZero\", ctx_r1.noBarWhenZero);\n }\n}\nfunction BarVerticalNormalizedComponent__svg_g_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, BarVerticalNormalizedComponent__svg_g_4__svg_g_1_Template, 2, 15, \"g\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nfunction BarVerticalNormalizedComponent__svg_g_5__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 8);\n i0.ɵɵlistener(\"select\", function BarVerticalNormalizedComponent__svg_g_5__svg_g_1_Template_g_select_1_listener($event) {\n const group_r7 = i0.ɵɵrestoreView(_r6).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event, group_r7));\n })(\"activate\", function BarVerticalNormalizedComponent__svg_g_5__svg_g_1_Template_g_activate_1_listener($event) {\n const group_r7 = i0.ɵɵrestoreView(_r6).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event, group_r7));\n })(\"deactivate\", function BarVerticalNormalizedComponent__svg_g_5__svg_g_1_Template_g_deactivate_1_listener($event) {\n const group_r7 = i0.ɵɵrestoreView(_r6).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event, group_r7));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const group_r7 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵattribute(\"transform\", ctx_r1.groupTransform(group_r7));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"type\", ctx_r1.barChartType.Normalized)(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"activeEntries\", ctx_r1.activeEntries)(\"colors\", ctx_r1.colors)(\"series\", group_r7.series)(\"dims\", ctx_r1.dims)(\"gradient\", ctx_r1.gradient)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"seriesName\", group_r7.name)(\"animations\", ctx_r1.animations)(\"noBarWhenZero\", ctx_r1.noBarWhenZero);\n }\n}\nfunction BarVerticalNormalizedComponent__svg_g_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, BarVerticalNormalizedComponent__svg_g_5__svg_g_1_Template, 2, 14, \"g\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nfunction BarVerticalStackedComponent__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 5);\n i0.ɵɵlistener(\"dimensionsChanged\", function BarVerticalStackedComponent__svg_g_2_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateXAxisHeight($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"dims\", ctx_r1.dims)(\"showLabel\", ctx_r1.showXAxisLabel)(\"labelText\", ctx_r1.xAxisLabel)(\"trimTicks\", ctx_r1.trimXAxisTicks)(\"rotateTicks\", ctx_r1.rotateXAxisTicks)(\"maxTickLength\", ctx_r1.maxXAxisTickLength)(\"tickFormatting\", ctx_r1.xAxisTickFormatting)(\"ticks\", ctx_r1.xAxisTicks)(\"xAxisOffset\", ctx_r1.dataLabelMaxHeight.negative)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction BarVerticalStackedComponent__svg_g_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 6);\n i0.ɵɵlistener(\"dimensionsChanged\", function BarVerticalStackedComponent__svg_g_3_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateYAxisWidth($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"yScale\", ctx_r1.yScale)(\"dims\", ctx_r1.dims)(\"showGridLines\", ctx_r1.showGridLines)(\"showLabel\", ctx_r1.showYAxisLabel)(\"labelText\", ctx_r1.yAxisLabel)(\"trimTicks\", ctx_r1.trimYAxisTicks)(\"maxTickLength\", ctx_r1.maxYAxisTickLength)(\"tickFormatting\", ctx_r1.yAxisTickFormatting)(\"ticks\", ctx_r1.yAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction BarVerticalStackedComponent__svg_g_4__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 8);\n i0.ɵɵlistener(\"select\", function BarVerticalStackedComponent__svg_g_4__svg_g_1_Template_g_select_1_listener($event) {\n const group_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event, group_r5));\n })(\"activate\", function BarVerticalStackedComponent__svg_g_4__svg_g_1_Template_g_activate_1_listener($event) {\n const group_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event, group_r5));\n })(\"deactivate\", function BarVerticalStackedComponent__svg_g_4__svg_g_1_Template_g_deactivate_1_listener($event) {\n const group_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event, group_r5));\n })(\"dataLabelHeightChanged\", function BarVerticalStackedComponent__svg_g_4__svg_g_1_Template_g_dataLabelHeightChanged_1_listener($event) {\n const index_r6 = i0.ɵɵrestoreView(_r4).index;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDataLabelMaxHeightChanged($event, index_r6));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const group_r5 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"@animationState\", \"active\");\n i0.ɵɵattribute(\"transform\", ctx_r1.groupTransform(group_r5));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"type\", ctx_r1.barChartType.Stacked)(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"activeEntries\", ctx_r1.activeEntries)(\"colors\", ctx_r1.colors)(\"series\", group_r5.series)(\"dims\", ctx_r1.dims)(\"gradient\", ctx_r1.gradient)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"showDataLabel\", ctx_r1.showDataLabel)(\"dataLabelFormatting\", ctx_r1.dataLabelFormatting)(\"seriesName\", group_r5.name)(\"animations\", ctx_r1.animations)(\"noBarWhenZero\", ctx_r1.noBarWhenZero);\n }\n}\nfunction BarVerticalStackedComponent__svg_g_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, BarVerticalStackedComponent__svg_g_4__svg_g_1_Template, 2, 17, \"g\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nfunction BarVerticalStackedComponent__svg_g_5__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r7 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 8);\n i0.ɵɵlistener(\"select\", function BarVerticalStackedComponent__svg_g_5__svg_g_1_Template_g_select_1_listener($event) {\n const group_r8 = i0.ɵɵrestoreView(_r7).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event, group_r8));\n })(\"activate\", function BarVerticalStackedComponent__svg_g_5__svg_g_1_Template_g_activate_1_listener($event) {\n const group_r8 = i0.ɵɵrestoreView(_r7).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event, group_r8));\n })(\"deactivate\", function BarVerticalStackedComponent__svg_g_5__svg_g_1_Template_g_deactivate_1_listener($event) {\n const group_r8 = i0.ɵɵrestoreView(_r7).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event, group_r8));\n })(\"dataLabelHeightChanged\", function BarVerticalStackedComponent__svg_g_5__svg_g_1_Template_g_dataLabelHeightChanged_1_listener($event) {\n const index_r9 = i0.ɵɵrestoreView(_r7).index;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDataLabelMaxHeightChanged($event, index_r9));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const group_r8 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵattribute(\"transform\", ctx_r1.groupTransform(group_r8));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"type\", ctx_r1.barChartType.Stacked)(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"activeEntries\", ctx_r1.activeEntries)(\"colors\", ctx_r1.colors)(\"series\", group_r8.series)(\"dims\", ctx_r1.dims)(\"gradient\", ctx_r1.gradient)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"showDataLabel\", ctx_r1.showDataLabel)(\"dataLabelFormatting\", ctx_r1.dataLabelFormatting)(\"seriesName\", group_r8.name)(\"animations\", ctx_r1.animations)(\"noBarWhenZero\", ctx_r1.noBarWhenZero);\n }\n}\nfunction BarVerticalStackedComponent__svg_g_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, BarVerticalStackedComponent__svg_g_5__svg_g_1_Template, 2, 16, \"g\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nconst _c30 = [\"ngx-charts-box\", \"\"];\nfunction BoxComponent__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"g\", 5);\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"orientation\", ctx_r0.BarOrientation.Vertical)(\"name\", ctx_r0.gradientId)(\"stops\", ctx_r0.gradientStops);\n }\n}\nfunction BoxComponent__svg_line_8_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"line\", 6);\n }\n if (rf & 2) {\n const line_r2 = ctx.$implicit;\n const i_r3 = ctx.index;\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"hidden\", ctx_r0.hideBar);\n i0.ɵɵattribute(\"x1\", line_r2.v1.x)(\"y1\", line_r2.v1.y)(\"x2\", line_r2.v2.x)(\"y2\", line_r2.v2.y)(\"stroke\", ctx_r0.strokeColor)(\"stroke-width\", i_r3 === 2 ? ctx_r0.medianLineWidth : ctx_r0.whiskerStrokeWidth)(\"mask\", i_r3 ? undefined : ctx_r0.maskLine);\n }\n}\nconst _c31 = [\"ngx-charts-box-series\", \"\"];\nfunction BoxChartComponent__svg_g_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 5);\n i0.ɵɵlistener(\"activate\", function BoxChartComponent__svg_g_5_Template_g_activate_1_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onActivate($event));\n })(\"deactivate\", function BoxChartComponent__svg_g_5_Template_g_deactivate_1_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event));\n })(\"select\", function BoxChartComponent__svg_g_5_Template_g_select_1_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onClick($event));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const result_r3 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"colors\", ctx_r1.colors)(\"roundEdges\", ctx_r1.roundEdges)(\"strokeColor\", ctx_r1.strokeColor)(\"strokeWidth\", ctx_r1.strokeWidth)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"series\", result_r3)(\"dims\", ctx_r1.dims)(\"animations\", ctx_r1.animations)(\"gradient\", ctx_r1.gradient);\n }\n}\nconst _c32 = [\"ngx-charts-bubble-series\", \"\"];\nfunction BubbleSeriesComponent__svg_g_0__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 2);\n i0.ɵɵlistener(\"select\", function BubbleSeriesComponent__svg_g_0__svg_g_2_Template_g_select_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const circle_r2 = i0.ɵɵnextContext().$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onClick(circle_r2.data));\n })(\"activate\", function BubbleSeriesComponent__svg_g_0__svg_g_2_Template_g_activate_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const circle_r2 = i0.ɵɵnextContext().$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.activateCircle(circle_r2));\n })(\"deactivate\", function BubbleSeriesComponent__svg_g_0__svg_g_2_Template_g_deactivate_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const circle_r2 = i0.ɵɵnextContext().$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.deactivateCircle(circle_r2));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const circle_r2 = i0.ɵɵnextContext().$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵstyleProp(\"opacity\", circle_r2.opacity);\n i0.ɵɵclassProp(\"active\", circle_r2.isActive);\n i0.ɵɵproperty(\"@animationState\", \"active\")(\"cx\", 0)(\"cy\", 0)(\"r\", circle_r2.radius)(\"fill\", circle_r2.color)(\"pointerEvents\", \"all\")(\"data\", circle_r2.value)(\"classNames\", circle_r2.classNames)(\"tooltipDisabled\", ctx_r2.tooltipDisabled)(\"tooltipPlacement\", ctx_r2.placementTypes.Top)(\"tooltipType\", ctx_r2.styleTypes.tooltip)(\"tooltipTitle\", ctx_r2.tooltipTemplate ? undefined : ctx_r2.getTooltipText(circle_r2))(\"tooltipTemplate\", ctx_r2.tooltipTemplate)(\"tooltipContext\", circle_r2.data);\n }\n}\nfunction BubbleSeriesComponent__svg_g_0__svg_g_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 2);\n i0.ɵɵlistener(\"select\", function BubbleSeriesComponent__svg_g_0__svg_g_3_Template_g_select_0_listener() {\n i0.ɵɵrestoreView(_r4);\n const circle_r2 = i0.ɵɵnextContext().$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onClick(circle_r2.data));\n })(\"activate\", function BubbleSeriesComponent__svg_g_0__svg_g_3_Template_g_activate_0_listener() {\n i0.ɵɵrestoreView(_r4);\n const circle_r2 = i0.ɵɵnextContext().$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.activateCircle(circle_r2));\n })(\"deactivate\", function BubbleSeriesComponent__svg_g_0__svg_g_3_Template_g_deactivate_0_listener() {\n i0.ɵɵrestoreView(_r4);\n const circle_r2 = i0.ɵɵnextContext().$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.deactivateCircle(circle_r2));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const circle_r2 = i0.ɵɵnextContext().$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵstyleProp(\"opacity\", circle_r2.opacity);\n i0.ɵɵclassProp(\"active\", circle_r2.isActive);\n i0.ɵɵproperty(\"cx\", 0)(\"cy\", 0)(\"r\", circle_r2.radius)(\"fill\", circle_r2.color)(\"pointerEvents\", \"all\")(\"data\", circle_r2.value)(\"classNames\", circle_r2.classNames)(\"tooltipDisabled\", ctx_r2.tooltipDisabled)(\"tooltipPlacement\", ctx_r2.placementTypes.Top)(\"tooltipType\", ctx_r2.styleTypes.tooltip)(\"tooltipTitle\", ctx_r2.tooltipTemplate ? undefined : ctx_r2.getTooltipText(circle_r2))(\"tooltipTemplate\", ctx_r2.tooltipTemplate)(\"tooltipContext\", circle_r2.data);\n }\n}\nfunction BubbleSeriesComponent__svg_g_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\");\n i0.ɵɵtemplate(2, BubbleSeriesComponent__svg_g_0__svg_g_2_Template, 1, 18, \"g\", 1)(3, BubbleSeriesComponent__svg_g_0__svg_g_3_Template, 1, 17, \"g\", 1);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const circle_r2 = ctx.$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"transform\", circle_r2.transform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx_r2.isSSR);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.isSSR);\n }\n}\nfunction BubbleChartComponent__svg_g_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 6);\n i0.ɵɵlistener(\"dimensionsChanged\", function BubbleChartComponent__svg_g_5_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateXAxisHeight($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"showGridLines\", ctx_r1.showGridLines)(\"dims\", ctx_r1.dims)(\"xScale\", ctx_r1.xScale)(\"showLabel\", ctx_r1.showXAxisLabel)(\"labelText\", ctx_r1.xAxisLabel)(\"trimTicks\", ctx_r1.trimXAxisTicks)(\"rotateTicks\", ctx_r1.rotateXAxisTicks)(\"maxTickLength\", ctx_r1.maxXAxisTickLength)(\"tickFormatting\", ctx_r1.xAxisTickFormatting)(\"ticks\", ctx_r1.xAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction BubbleChartComponent__svg_g_6_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 7);\n i0.ɵɵlistener(\"dimensionsChanged\", function BubbleChartComponent__svg_g_6_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateYAxisWidth($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"showGridLines\", ctx_r1.showGridLines)(\"yScale\", ctx_r1.yScale)(\"dims\", ctx_r1.dims)(\"showLabel\", ctx_r1.showYAxisLabel)(\"labelText\", ctx_r1.yAxisLabel)(\"trimTicks\", ctx_r1.trimYAxisTicks)(\"maxTickLength\", ctx_r1.maxYAxisTickLength)(\"tickFormatting\", ctx_r1.yAxisTickFormatting)(\"ticks\", ctx_r1.yAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction BubbleChartComponent__svg_g_8__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 9);\n i0.ɵɵlistener(\"select\", function BubbleChartComponent__svg_g_8__svg_g_1_Template_g_select_1_listener($event) {\n const series_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event, series_r5));\n })(\"activate\", function BubbleChartComponent__svg_g_8__svg_g_1_Template_g_activate_1_listener($event) {\n i0.ɵɵrestoreView(_r4);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event));\n })(\"deactivate\", function BubbleChartComponent__svg_g_8__svg_g_1_Template_g_deactivate_1_listener($event) {\n i0.ɵɵrestoreView(_r4);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const series_r5 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"@animationState\", \"active\");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"rScale\", ctx_r1.rScale)(\"xScaleType\", ctx_r1.xScaleType)(\"yScaleType\", ctx_r1.yScaleType)(\"xAxisLabel\", ctx_r1.xAxisLabel)(\"yAxisLabel\", ctx_r1.yAxisLabel)(\"colors\", ctx_r1.colors)(\"data\", series_r5)(\"activeEntries\", ctx_r1.activeEntries)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate);\n }\n}\nfunction BubbleChartComponent__svg_g_8_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, BubbleChartComponent__svg_g_8__svg_g_1_Template, 2, 13, \"g\", 8);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"clip-path\", ctx_r1.clipPath);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.data)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nfunction BubbleChartComponent__svg_g_9__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 9);\n i0.ɵɵlistener(\"select\", function BubbleChartComponent__svg_g_9__svg_g_1_Template_g_select_1_listener($event) {\n const series_r7 = i0.ɵɵrestoreView(_r6).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event, series_r7));\n })(\"activate\", function BubbleChartComponent__svg_g_9__svg_g_1_Template_g_activate_1_listener($event) {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event));\n })(\"deactivate\", function BubbleChartComponent__svg_g_9__svg_g_1_Template_g_deactivate_1_listener($event) {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const series_r7 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"rScale\", ctx_r1.rScale)(\"xScaleType\", ctx_r1.xScaleType)(\"yScaleType\", ctx_r1.yScaleType)(\"xAxisLabel\", ctx_r1.xAxisLabel)(\"yAxisLabel\", ctx_r1.yAxisLabel)(\"colors\", ctx_r1.colors)(\"data\", series_r7)(\"activeEntries\", ctx_r1.activeEntries)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate);\n }\n}\nfunction BubbleChartComponent__svg_g_9_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, BubbleChartComponent__svg_g_9__svg_g_1_Template, 2, 12, \"g\", 8);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"clip-path\", ctx_r1.clipPath);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.data)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nconst _c33 = [\"ngx-charts-heat-map-cell\", \"\"];\nfunction HeatMapCellComponent__svg_defs_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"defs\");\n i0.ɵɵelement(1, \"g\", 3);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"orientation\", ctx_r0.barOrientation.Vertical)(\"name\", ctx_r0.gradientId)(\"stops\", ctx_r0.gradientStops);\n }\n}\nconst _c34 = [\"ngx-charts-heat-map-cell-series\", \"\"];\nconst _c35 = (a0, a1, a2) => ({\n series: a0,\n name: a1,\n value: a2\n});\nfunction HeatCellSeriesComponent__svg_g_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 1);\n i0.ɵɵlistener(\"select\", function HeatCellSeriesComponent__svg_g_0_Template_g_select_0_listener() {\n const c_r2 = i0.ɵɵrestoreView(_r1).$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onClick(c_r2.cell));\n })(\"activate\", function HeatCellSeriesComponent__svg_g_0_Template_g_activate_0_listener() {\n const c_r2 = i0.ɵɵrestoreView(_r1).$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.activate.emit(c_r2.cell));\n })(\"deactivate\", function HeatCellSeriesComponent__svg_g_0_Template_g_deactivate_0_listener() {\n const c_r2 = i0.ɵɵrestoreView(_r1).$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.deactivate.emit(c_r2.cell));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const c_r2 = ctx.$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"x\", c_r2.x)(\"y\", c_r2.y)(\"width\", c_r2.width)(\"height\", c_r2.height)(\"fill\", c_r2.fill)(\"data\", c_r2.data)(\"gradient\", ctx_r2.gradient)(\"animations\", ctx_r2.animations)(\"tooltipDisabled\", ctx_r2.tooltipDisabled)(\"tooltipPlacement\", ctx_r2.placementTypes.Top)(\"tooltipType\", ctx_r2.styleTypes.tooltip)(\"tooltipTitle\", ctx_r2.tooltipTemplate ? undefined : ctx_r2.tooltipText(c_r2))(\"tooltipTemplate\", ctx_r2.tooltipTemplate)(\"tooltipContext\", i0.ɵɵpureFunction3(14, _c35, c_r2.series, c_r2.label, c_r2.data));\n }\n}\nfunction HeatMapComponent__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 6);\n i0.ɵɵlistener(\"dimensionsChanged\", function HeatMapComponent__svg_g_2_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateXAxisHeight($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"dims\", ctx_r1.dims)(\"showLabel\", ctx_r1.showXAxisLabel)(\"labelText\", ctx_r1.xAxisLabel)(\"trimTicks\", ctx_r1.trimXAxisTicks)(\"rotateTicks\", ctx_r1.rotateXAxisTicks)(\"maxTickLength\", ctx_r1.maxXAxisTickLength)(\"tickFormatting\", ctx_r1.xAxisTickFormatting)(\"ticks\", ctx_r1.xAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction HeatMapComponent__svg_g_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 7);\n i0.ɵɵlistener(\"dimensionsChanged\", function HeatMapComponent__svg_g_3_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateYAxisWidth($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"yScale\", ctx_r1.yScale)(\"dims\", ctx_r1.dims)(\"showLabel\", ctx_r1.showYAxisLabel)(\"labelText\", ctx_r1.yAxisLabel)(\"trimTicks\", ctx_r1.trimYAxisTicks)(\"maxTickLength\", ctx_r1.maxYAxisTickLength)(\"tickFormatting\", ctx_r1.yAxisTickFormatting)(\"ticks\", ctx_r1.yAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction HeatMapComponent__svg_rect_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"rect\");\n }\n if (rf & 2) {\n const rect_r4 = ctx.$implicit;\n i0.ɵɵattribute(\"x\", rect_r4.x)(\"y\", rect_r4.y)(\"rx\", rect_r4.rx)(\"width\", rect_r4.width)(\"height\", rect_r4.height)(\"fill\", rect_r4.fill);\n }\n}\nconst _c36 = [\"ngx-charts-line\", \"\"];\nfunction LineComponent__svg_g_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵelement(1, \"path\", 1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"@animationState\", \"active\");\n i0.ɵɵattribute(\"d\", ctx_r0.initialPath)(\"fill\", ctx_r0.fill)(\"stroke\", ctx_r0.stroke);\n }\n}\nfunction LineComponent__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵelement(1, \"path\", 1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"d\", ctx_r0.initialPath)(\"fill\", ctx_r0.fill)(\"stroke\", ctx_r0.stroke);\n }\n}\nconst _c37 = [\"ngx-charts-line-series\", \"\"];\nfunction LineSeriesComponent__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"g\", 4);\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"orientation\", ctx_r0.barOrientation.Vertical)(\"name\", ctx_r0.gradientId)(\"stops\", ctx_r0.gradientStops);\n }\n}\nfunction LineSeriesComponent__svg_g_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"g\", 5);\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"active\", ctx_r0.isActive(ctx_r0.data))(\"inactive\", ctx_r0.isInactive(ctx_r0.data));\n i0.ɵɵproperty(\"data\", ctx_r0.data)(\"path\", ctx_r0.outerPath)(\"fill\", ctx_r0.hasGradient ? ctx_r0.gradientUrl : ctx_r0.colors.getColor(ctx_r0.data.name))(\"opacity\", ctx_r0.rangeFillOpacity)(\"animations\", ctx_r0.animations);\n }\n}\nfunction LineChartComponent__svg_g_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 7);\n i0.ɵɵlistener(\"dimensionsChanged\", function LineChartComponent__svg_g_5_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateXAxisHeight($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"dims\", ctx_r1.dims)(\"showGridLines\", ctx_r1.showGridLines)(\"showLabel\", ctx_r1.showXAxisLabel)(\"labelText\", ctx_r1.xAxisLabel)(\"trimTicks\", ctx_r1.trimXAxisTicks)(\"rotateTicks\", ctx_r1.rotateXAxisTicks)(\"maxTickLength\", ctx_r1.maxXAxisTickLength)(\"tickFormatting\", ctx_r1.xAxisTickFormatting)(\"ticks\", ctx_r1.xAxisTicks)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction LineChartComponent__svg_g_6_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 8);\n i0.ɵɵlistener(\"dimensionsChanged\", function LineChartComponent__svg_g_6_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateYAxisWidth($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"yScale\", ctx_r1.yScale)(\"dims\", ctx_r1.dims)(\"showGridLines\", ctx_r1.showGridLines)(\"showLabel\", ctx_r1.showYAxisLabel)(\"labelText\", ctx_r1.yAxisLabel)(\"trimTicks\", ctx_r1.trimYAxisTicks)(\"maxTickLength\", ctx_r1.maxYAxisTickLength)(\"tickFormatting\", ctx_r1.yAxisTickFormatting)(\"ticks\", ctx_r1.yAxisTicks)(\"referenceLines\", ctx_r1.referenceLines)(\"showRefLines\", ctx_r1.showRefLines)(\"showRefLabels\", ctx_r1.showRefLabels)(\"wrapTicks\", ctx_r1.wrapTicks);\n }\n}\nfunction LineChartComponent__svg_g_8__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵelement(1, \"g\", 10);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const series_r4 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"@animationState\", \"active\");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"colors\", ctx_r1.colors)(\"data\", series_r4)(\"activeEntries\", ctx_r1.activeEntries)(\"scaleType\", ctx_r1.scaleType)(\"curve\", ctx_r1.curve)(\"rangeFillOpacity\", ctx_r1.rangeFillOpacity)(\"hasRange\", ctx_r1.hasRange)(\"animations\", ctx_r1.animations);\n }\n}\nfunction LineChartComponent__svg_g_8_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, LineChartComponent__svg_g_8__svg_g_1_Template, 2, 11, \"g\", 9);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nfunction LineChartComponent__svg_g_9__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵelement(1, \"g\", 10);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const series_r5 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"colors\", ctx_r1.colors)(\"data\", series_r5)(\"activeEntries\", ctx_r1.activeEntries)(\"scaleType\", ctx_r1.scaleType)(\"curve\", ctx_r1.curve)(\"rangeFillOpacity\", ctx_r1.rangeFillOpacity)(\"hasRange\", ctx_r1.hasRange)(\"animations\", ctx_r1.animations);\n }\n}\nfunction LineChartComponent__svg_g_9_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, LineChartComponent__svg_g_9__svg_g_1_Template, 2, 10, \"g\", 9);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nfunction LineChartComponent__svg_g_10__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r7 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 14);\n i0.ɵɵlistener(\"select\", function LineChartComponent__svg_g_10__svg_g_2_Template_g_select_1_listener($event) {\n i0.ɵɵrestoreView(_r7);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event));\n })(\"activate\", function LineChartComponent__svg_g_10__svg_g_2_Template_g_activate_1_listener($event) {\n i0.ɵɵrestoreView(_r7);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event));\n })(\"deactivate\", function LineChartComponent__svg_g_10__svg_g_2_Template_g_deactivate_1_listener($event) {\n i0.ɵɵrestoreView(_r7);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const series_r8 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"colors\", ctx_r1.colors)(\"data\", series_r8)(\"scaleType\", ctx_r1.scaleType)(\"visibleValue\", ctx_r1.hoveredVertical)(\"activeEntries\", ctx_r1.activeEntries)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate);\n }\n}\nfunction LineChartComponent__svg_g_10_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 11);\n i0.ɵɵlistener(\"mouseleave\", function LineChartComponent__svg_g_10_Template_g_mouseleave_0_listener() {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.hideCircles());\n });\n i0.ɵɵelementStart(1, \"g\", 12);\n i0.ɵɵlistener(\"hover\", function LineChartComponent__svg_g_10_Template_g_hover_1_listener($event) {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateHoveredVertical($event));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(2, LineChartComponent__svg_g_10__svg_g_2_Template, 2, 9, \"g\", 13);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"dims\", ctx_r1.dims)(\"xSet\", ctx_r1.xSet)(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"results\", ctx_r1.results)(\"colors\", ctx_r1.colors)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.seriesTooltipTemplate);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results);\n }\n}\nfunction LineChartComponent__svg_g_11__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵelement(1, \"g\", 16);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const series_r10 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx_r1.timelineXScale)(\"yScale\", ctx_r1.timelineYScale)(\"colors\", ctx_r1.colors)(\"data\", series_r10)(\"scaleType\", ctx_r1.scaleType)(\"curve\", ctx_r1.curve)(\"hasRange\", ctx_r1.hasRange)(\"animations\", ctx_r1.animations);\n }\n}\nfunction LineChartComponent__svg_g_11_Template(rf, ctx) {\n if (rf & 1) {\n const _r9 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 15);\n i0.ɵɵlistener(\"onDomainChange\", function LineChartComponent__svg_g_11_Template_g_onDomainChange_0_listener($event) {\n i0.ɵɵrestoreView(_r9);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateDomain($event));\n });\n i0.ɵɵtemplate(1, LineChartComponent__svg_g_11__svg_g_1_Template, 2, 8, \"g\", 9);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"results\", ctx_r1.results)(\"view\", i0.ɵɵpureFunction2(10, _c24, ctx_r1.timelineWidth, ctx_r1.height))(\"height\", ctx_r1.timelineHeight)(\"scheme\", ctx_r1.scheme)(\"customColors\", ctx_r1.customColors)(\"scaleType\", ctx_r1.scaleType)(\"legend\", ctx_r1.legend);\n i0.ɵɵattribute(\"transform\", ctx_r1.timelineTransform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nconst _c38 = [\"ngx-charts-pie-label\", \"\"];\nconst _c39 = [\"ngx-charts-polar-series\", \"\"];\nfunction PolarSeriesComponent__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"g\", 4);\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"color\", ctx_r0.seriesColor)(\"name\", ctx_r0.gradientId)(\"startOpacity\", 0.25)(\"endOpacity\", 1)(\"stops\", ctx_r0.gradientStops);\n }\n}\nfunction PolarSeriesComponent__svg_g_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r2 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 5);\n i0.ɵɵlistener(\"select\", function PolarSeriesComponent__svg_g_4_Template_g_select_0_listener() {\n const circle_r3 = i0.ɵɵrestoreView(_r2).$implicit;\n const ctx_r0 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r0.select.emit(circle_r3.data));\n })(\"activate\", function PolarSeriesComponent__svg_g_4_Template_g_activate_0_listener() {\n const circle_r3 = i0.ɵɵrestoreView(_r2).$implicit;\n const ctx_r0 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r0.activate.emit({\n name: circle_r3.data.series\n }));\n })(\"deactivate\", function PolarSeriesComponent__svg_g_4_Template_g_deactivate_0_listener() {\n const circle_r3 = i0.ɵɵrestoreView(_r2).$implicit;\n const ctx_r0 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r0.deactivate.emit({\n name: circle_r3.data.series\n }));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const circle_r3 = ctx.$implicit;\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵstyleProp(\"opacity\", ctx_r0.inactive ? 0.2 : 1);\n i0.ɵɵproperty(\"cx\", circle_r3.cx)(\"cy\", circle_r3.cy)(\"r\", ctx_r0.circleRadius)(\"fill\", circle_r3.color)(\"tooltipDisabled\", ctx_r0.tooltipDisabled)(\"tooltipPlacement\", ctx_r0.placementTypes.Top)(\"tooltipType\", ctx_r0.styleTypes.tooltip)(\"tooltipTitle\", ctx_r0.tooltipTemplate ? undefined : ctx_r0.tooltipText(circle_r3))(\"tooltipTemplate\", ctx_r0.tooltipTemplate)(\"tooltipContext\", circle_r3.data);\n }\n}\nfunction PolarChartComponent__svg_g_4__svg_circle_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"circle\", 7);\n }\n if (rf & 2) {\n const r_r1 = ctx.$implicit;\n i0.ɵɵattribute(\"r\", r_r1);\n }\n}\nfunction PolarChartComponent__svg_g_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, PolarChartComponent__svg_g_4__svg_circle_1_Template, 1, 1, \"circle\", 6);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.radiusTicks);\n }\n}\nfunction PolarChartComponent__svg_g_5__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"g\", 9);\n }\n if (rf & 2) {\n const tick_r3 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"data\", tick_r3)(\"radius\", ctx_r1.outerRadius)(\"label\", tick_r3.label)(\"max\", ctx_r1.outerRadius)(\"value\", ctx_r1.showGridLines ? 1 : ctx_r1.outerRadius)(\"explodeSlices\", true)(\"animations\", ctx_r1.animations)(\"labelTrim\", ctx_r1.labelTrim)(\"labelTrimSize\", ctx_r1.labelTrimSize);\n }\n}\nfunction PolarChartComponent__svg_g_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, PolarChartComponent__svg_g_5__svg_g_1_Template, 1, 9, \"g\", 8);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.thetaTicks);\n }\n}\nfunction PolarChartComponent__svg_g_6_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 10);\n i0.ɵɵlistener(\"dimensionsChanged\", function PolarChartComponent__svg_g_6_Template_g_dimensionsChanged_0_listener($event) {\n i0.ɵɵrestoreView(_r4);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateYAxisWidth($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"yScale\", ctx_r1.yAxisScale)(\"dims\", ctx_r1.yAxisDims)(\"showGridLines\", ctx_r1.showGridLines)(\"showLabel\", ctx_r1.showYAxisLabel)(\"labelText\", ctx_r1.yAxisLabel)(\"trimTicks\", ctx_r1.trimYAxisTicks)(\"maxTickLength\", ctx_r1.maxYAxisTickLength)(\"tickFormatting\", ctx_r1.yAxisTickFormatting)(\"wrapTicks\", ctx_r1.wrapTicks);\n i0.ɵɵattribute(\"transform\", ctx_r1.transformYAxis);\n }\n}\nfunction PolarChartComponent__svg_g_7_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"g\", 11);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"label\", ctx_r1.xAxisLabel)(\"offset\", ctx_r1.labelOffset)(\"orient\", ctx_r1.orientation.Bottom)(\"height\", ctx_r1.dims.height)(\"width\", ctx_r1.dims.width);\n }\n}\nfunction PolarChartComponent__svg_g_8__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 13);\n i0.ɵɵlistener(\"select\", function PolarChartComponent__svg_g_8__svg_g_1_Template_g_select_1_listener($event) {\n i0.ɵɵrestoreView(_r5);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event));\n })(\"activate\", function PolarChartComponent__svg_g_8__svg_g_1_Template_g_activate_1_listener($event) {\n i0.ɵɵrestoreView(_r5);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event));\n })(\"deactivate\", function PolarChartComponent__svg_g_8__svg_g_1_Template_g_deactivate_1_listener($event) {\n i0.ɵɵrestoreView(_r5);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const series_r6 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"@animationState\", \"active\");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"gradient\", ctx_r1.gradient)(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"colors\", ctx_r1.colors)(\"data\", series_r6)(\"activeEntries\", ctx_r1.activeEntries)(\"scaleType\", ctx_r1.scaleType)(\"curve\", ctx_r1.curve)(\"rangeFillOpacity\", ctx_r1.rangeFillOpacity)(\"animations\", ctx_r1.animations)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate);\n }\n}\nfunction PolarChartComponent__svg_g_8_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, PolarChartComponent__svg_g_8__svg_g_1_Template, 2, 13, \"g\", 12);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"transform\", ctx_r1.transformPlot);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nfunction PolarChartComponent__svg_g_9__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r7 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 13);\n i0.ɵɵlistener(\"select\", function PolarChartComponent__svg_g_9__svg_g_1_Template_g_select_1_listener($event) {\n i0.ɵɵrestoreView(_r7);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onClick($event));\n })(\"activate\", function PolarChartComponent__svg_g_9__svg_g_1_Template_g_activate_1_listener($event) {\n i0.ɵɵrestoreView(_r7);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onActivate($event));\n })(\"deactivate\", function PolarChartComponent__svg_g_9__svg_g_1_Template_g_deactivate_1_listener($event) {\n i0.ɵɵrestoreView(_r7);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const series_r8 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"gradient\", ctx_r1.gradient)(\"xScale\", ctx_r1.xScale)(\"yScale\", ctx_r1.yScale)(\"colors\", ctx_r1.colors)(\"data\", series_r8)(\"activeEntries\", ctx_r1.activeEntries)(\"scaleType\", ctx_r1.scaleType)(\"curve\", ctx_r1.curve)(\"rangeFillOpacity\", ctx_r1.rangeFillOpacity)(\"animations\", ctx_r1.animations)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate);\n }\n}\nfunction PolarChartComponent__svg_g_9_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, PolarChartComponent__svg_g_9__svg_g_1_Template, 2, 12, \"g\", 12);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"transform\", ctx_r1.transformPlot);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.results)(\"ngForTrackBy\", ctx_r1.trackBy);\n }\n}\nconst _c40 = [\"ngx-charts-pie-arc\", \"\"];\nfunction PieArcComponent__svg_defs_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"defs\");\n i0.ɵɵelement(1, \"g\", 3);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"color\", ctx_r0.fill)(\"name\", ctx_r0.radialGradientId)(\"startOpacity\", ctx_r0.startOpacity);\n }\n}\nconst _c41 = [\"ngx-charts-pie-series\", \"\"];\nfunction PieSeriesComponent__svg_g_0__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"g\", 3);\n }\n if (rf & 2) {\n const arc_r2 = i0.ɵɵnextContext().$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"data\", arc_r2)(\"radius\", ctx_r2.outerRadius)(\"color\", ctx_r2.color(arc_r2))(\"label\", ctx_r2.labelText(arc_r2))(\"labelTrim\", ctx_r2.trimLabels)(\"labelTrimSize\", ctx_r2.maxLabelLength)(\"max\", ctx_r2.max)(\"value\", arc_r2.value)(\"explodeSlices\", ctx_r2.explodeSlices)(\"animations\", ctx_r2.animations);\n }\n}\nfunction PieSeriesComponent__svg_g_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, PieSeriesComponent__svg_g_0__svg_g_1_Template, 1, 10, \"g\", 1);\n i0.ɵɵelementStart(2, \"g\", 2);\n i0.ɵɵlistener(\"select\", function PieSeriesComponent__svg_g_0_Template_g_select_2_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onClick($event));\n })(\"activate\", function PieSeriesComponent__svg_g_0_Template_g_activate_2_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.activate.emit($event));\n })(\"deactivate\", function PieSeriesComponent__svg_g_0_Template_g_deactivate_2_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.deactivate.emit($event));\n })(\"dblclick\", function PieSeriesComponent__svg_g_0_Template_g_dblclick_2_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.dblclick.emit($event));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const arc_r2 = ctx.$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.labelVisible(arc_r2));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"startAngle\", arc_r2.startAngle)(\"endAngle\", arc_r2.endAngle)(\"innerRadius\", ctx_r2.innerRadius)(\"outerRadius\", ctx_r2.outerRadius)(\"fill\", ctx_r2.color(arc_r2))(\"value\", arc_r2.data.value)(\"gradient\", ctx_r2.gradient)(\"data\", arc_r2.data)(\"max\", ctx_r2.max)(\"explodeSlices\", ctx_r2.explodeSlices)(\"isActive\", ctx_r2.isActive(arc_r2.data))(\"animate\", ctx_r2.animations)(\"tooltipDisabled\", ctx_r2.tooltipDisabled)(\"tooltipPlacement\", ctx_r2.placementTypes.Top)(\"tooltipType\", ctx_r2.styleTypes.tooltip)(\"tooltipTitle\", ctx_r2.getTooltipTitle(arc_r2))(\"tooltipTemplate\", ctx_r2.tooltipTemplate)(\"tooltipContext\", arc_r2.data);\n }\n}\nconst _c42 = \".pie-label{font-size:11px}.pie-label.animation{animation:.75s ease-in fadeIn}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.pie-label-line{stroke-dasharray:100%}.pie-label-line.animation{animation:3s linear drawOut;transition:d .75s}@keyframes drawOut{0%{stroke-dashoffset:100%}to{stroke-dashoffset:0}}\\n\";\nconst _c43 = [\"ngx-charts-pie-grid-series\", \"\"];\nfunction PieGridSeriesComponent__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 2);\n i0.ɵɵlistener(\"select\", function PieGridSeriesComponent__svg_g_1_Template_g_select_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onClick($event));\n })(\"activate\", function PieGridSeriesComponent__svg_g_1_Template_g_activate_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.activate.emit($event));\n })(\"deactivate\", function PieGridSeriesComponent__svg_g_1_Template_g_deactivate_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.deactivate.emit($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const arc_r3 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"startAngle\", arc_r3.startAngle)(\"endAngle\", arc_r3.endAngle)(\"innerRadius\", ctx_r1.innerRadius)(\"outerRadius\", ctx_r1.outerRadius)(\"fill\", ctx_r1.color(arc_r3))(\"value\", arc_r3.data.value)(\"data\", arc_r3.data)(\"gradient\", false)(\"pointerEvents\", arc_r3.pointerEvents)(\"animate\", arc_r3.animate);\n i0.ɵɵattribute(\"class\", arc_r3.class);\n }\n}\nconst _c44 = a0 => ({\n data: a0\n});\nfunction PieGridComponent__svg_g_2__svg_text_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"text\", 10);\n }\n if (rf & 2) {\n const series_r3 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵproperty(\"countTo\", series_r3.percent)(\"countSuffix\", \"%\");\n }\n}\nfunction PieGridComponent__svg_g_2__svg_text_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"text\", 11);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const series_r3 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", series_r3.percent.toLocaleString(), \" \");\n }\n}\nfunction PieGridComponent__svg_g_2__svg_text_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"text\", 12);\n }\n if (rf & 2) {\n const series_r3 = i0.ɵɵnextContext().$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"countTo\", series_r3.total)(\"countPrefix\", ctx_r1.label + \": \");\n i0.ɵɵattribute(\"y\", series_r3.outerRadius);\n }\n}\nfunction PieGridComponent__svg_g_2__svg_text_7_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"text\", 13);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const series_r3 = i0.ɵɵnextContext().$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"y\", series_r3.outerRadius);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate2(\" \", ctx_r1.label, \": \", series_r3.total.toLocaleString(), \" \");\n }\n}\nfunction PieGridComponent__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 3)(1, \"g\", 4);\n i0.ɵɵlistener(\"select\", function PieGridComponent__svg_g_2_Template_g_select_1_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onClick($event));\n })(\"activate\", function PieGridComponent__svg_g_2_Template_g_activate_1_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onActivate($event));\n })(\"deactivate\", function PieGridComponent__svg_g_2_Template_g_deactivate_1_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(2, PieGridComponent__svg_g_2__svg_text_2_Template, 1, 2, \"text\", 5)(3, PieGridComponent__svg_g_2__svg_text_3_Template, 2, 1, \"text\", 6);\n i0.ɵɵelementStart(4, \"text\", 7);\n i0.ɵɵtext(5);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(6, PieGridComponent__svg_g_2__svg_text_6_Template, 1, 3, \"text\", 8)(7, PieGridComponent__svg_g_2__svg_text_7_Template, 2, 3, \"text\", 9);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const series_r3 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"transform\", series_r3.transform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"colors\", series_r3.colors)(\"data\", series_r3.data)(\"innerRadius\", series_r3.innerRadius)(\"outerRadius\", series_r3.outerRadius)(\"animations\", ctx_r1.animations)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipPlacement\", ctx_r1.placementTypes.Top)(\"tooltipType\", ctx_r1.styleTypes.tooltip)(\"tooltipTitle\", ctx_r1.tooltipTemplate ? undefined : ctx_r1.tooltipText(i0.ɵɵpureFunction1(17, _c44, series_r3)))(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"tooltipContext\", series_r3.data[0].data);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.animations);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx_r1.animations);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", series_r3.label, \" \");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.animations);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx_r1.animations);\n }\n}\nconst _c45 = [\"textEl\"];\nconst _c46 = [\"ngx-charts-card\", \"\"];\nfunction CardComponent__svg_path_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"path\", 7);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"fill\", ctx_r1.bandColor)(\"transform\", ctx_r1.transformBand)(\"d\", ctx_r1.bandPath);\n }\n}\nconst _c47 = [\"ngx-charts-card-series\", \"\"];\nfunction CardSeriesComponent__svg_rect_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"rect\", 2);\n }\n if (rf & 2) {\n const c_r1 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵstyleProp(\"fill\", ctx_r1.emptyColor);\n i0.ɵɵattribute(\"x\", c_r1.x)(\"y\", c_r1.y)(\"width\", c_r1.width)(\"height\", c_r1.height);\n }\n}\nfunction CardSeriesComponent__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 3);\n i0.ɵɵlistener(\"select\", function CardSeriesComponent__svg_g_1_Template_g_select_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onClick($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const c_r4 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"x\", c_r4.x)(\"y\", c_r4.y)(\"width\", c_r4.width)(\"height\", c_r4.height)(\"color\", c_r4.color)(\"bandColor\", c_r4.bandColor)(\"textColor\", c_r4.textColor)(\"data\", c_r4.data)(\"label\", c_r4.label)(\"medianSize\", ctx_r1.medianSize)(\"valueFormatting\", ctx_r1.valueFormatting)(\"labelFormatting\", ctx_r1.labelFormatting)(\"animations\", ctx_r1.animations);\n }\n}\nconst _c48 = [\"ngx-charts-tree-map-cell\", \"\"];\nfunction TreeMapCellComponent__svg_defs_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"defs\");\n i0.ɵɵelement(1, \"g\", 3);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"orientation\", ctx_r0.orientation.Vertical)(\"name\", ctx_r0.gradientId)(\"stops\", ctx_r0.gradientStops);\n }\n}\nfunction TreeMapCellComponent__svg_foreignObject_3_span_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 8);\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"countTo\", ctx_r0.value)(\"valueFormatting\", ctx_r0.valueFormatting);\n }\n}\nfunction TreeMapCellComponent__svg_foreignObject_3_span_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 9);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx_r0.formattedValue, \" \");\n }\n}\nfunction TreeMapCellComponent__svg_foreignObject_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"foreignObject\", 4);\n i0.ɵɵnamespaceHTML();\n i0.ɵɵelementStart(1, \"p\");\n i0.ɵɵelement(2, \"span\", 5)(3, \"br\");\n i0.ɵɵtemplate(4, TreeMapCellComponent__svg_foreignObject_3_span_4_Template, 1, 2, \"span\", 6)(5, TreeMapCellComponent__svg_foreignObject_3_span_5_Template, 2, 1, \"span\", 7);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵstyleProp(\"pointer-events\", \"none\");\n i0.ɵɵattribute(\"x\", ctx_r0.x)(\"y\", ctx_r0.y)(\"width\", ctx_r0.width)(\"height\", ctx_r0.height);\n i0.ɵɵadvance();\n i0.ɵɵstyleProp(\"color\", ctx_r0.getTextColor())(\"height\", ctx_r0.height + \"px\")(\"width\", ctx_r0.width + \"px\");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"innerHTML\", ctx_r0.formattedLabel, i0.ɵɵsanitizeHtml);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx_r0.animations);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx_r0.animations);\n }\n}\nconst _c49 = [\"ngx-charts-tree-map-cell-series\", \"\"];\nfunction TreeMapCellSeriesComponent__svg_g_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 1);\n i0.ɵɵlistener(\"select\", function TreeMapCellSeriesComponent__svg_g_0_Template_g_select_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onClick($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const c_r3 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"data\", c_r3.data)(\"x\", c_r3.x)(\"y\", c_r3.y)(\"width\", c_r3.width)(\"height\", c_r3.height)(\"fill\", c_r3.fill)(\"label\", c_r3.label)(\"value\", c_r3.value)(\"valueFormatting\", ctx_r1.valueFormatting)(\"labelFormatting\", ctx_r1.labelFormatting)(\"gradient\", ctx_r1.gradient)(\"animations\", ctx_r1.animations)(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipPlacement\", ctx_r1.placementTypes.Top)(\"tooltipType\", ctx_r1.styleTypes.tooltip)(\"tooltipTitle\", ctx_r1.tooltipTemplate ? undefined : ctx_r1.getTooltipText(c_r3))(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"tooltipContext\", c_r3.data);\n }\n}\nconst _c50 = [\"valueTextEl\"];\nconst _c51 = [\"unitsTextEl\"];\nconst _c52 = () => ({});\nfunction LinearGaugeComponent__svg_line_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"line\", 10);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"transform\", ctx_r1.transformLine)(\"stroke\", ctx_r1.colors.getColor(ctx_r1.units));\n }\n}\nfunction LinearGaugeComponent__svg_line_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"line\", 11);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"transform\", ctx_r1.transformLine)(\"stroke\", ctx_r1.colors.getColor(ctx_r1.units));\n }\n}\nconst _c53 = [\"ngx-charts-gauge-arc\", \"\"];\nconst _c54 = [\"ngx-charts-gauge-axis\", \"\"];\nfunction GaugeAxisComponent__svg_g_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 2);\n i0.ɵɵelement(1, \"path\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const tick_r1 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"d\", tick_r1.line);\n }\n}\nfunction GaugeAxisComponent__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 2)(1, \"text\", 3);\n i0.ɵɵtext(2);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const tick_r2 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵstyleProp(\"text-anchor\", tick_r2.textAnchor);\n i0.ɵɵattribute(\"transform\", tick_r2.textTransform);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", tick_r2.text, \" \");\n }\n}\nfunction GaugeAxisComponent__svg_g_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 4);\n i0.ɵɵelement(1, \"path\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const tick_r3 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"d\", tick_r3.line);\n }\n}\nfunction GaugeComponent__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"g\", 6);\n i0.ɵɵlistener(\"select\", function GaugeComponent__svg_g_2_Template_g_select_1_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onClick($event));\n })(\"activate\", function GaugeComponent__svg_g_2_Template_g_activate_1_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onActivate($event));\n })(\"deactivate\", function GaugeComponent__svg_g_2_Template_g_deactivate_1_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onDeactivate($event));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const arc_r3 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"transform\", ctx_r1.rotation);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"backgroundArc\", arc_r3.backgroundArc)(\"valueArc\", arc_r3.valueArc)(\"cornerRadius\", ctx_r1.cornerRadius)(\"colors\", ctx_r1.colors)(\"isActive\", ctx_r1.isActive(arc_r3.valueArc.data))(\"tooltipDisabled\", ctx_r1.tooltipDisabled)(\"tooltipTemplate\", ctx_r1.tooltipTemplate)(\"valueFormatting\", ctx_r1.valueFormatting)(\"animations\", ctx_r1.animations);\n }\n}\nfunction GaugeComponent__svg_g_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"g\", 7);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"bigSegments\", ctx_r1.bigSegments)(\"smallSegments\", ctx_r1.smallSegments)(\"min\", ctx_r1.min)(\"max\", ctx_r1.max)(\"radius\", ctx_r1.outerRadius)(\"angleSpan\", ctx_r1.angleSpan)(\"valueScale\", ctx_r1.valueScale)(\"startAngle\", ctx_r1.startAngle)(\"tickFormatting\", ctx_r1.axisTickFormatting);\n }\n}\nfunction GaugeComponent__svg_text_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"text\", 8, 0)(2, \"tspan\", 9);\n i0.ɵɵtext(3);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"tspan\", 10);\n i0.ɵɵtext(5);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵstyleProp(\"text-anchor\", \"middle\");\n i0.ɵɵattribute(\"transform\", ctx_r1.textTransform);\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(ctx_r1.displayValue);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(ctx_r1.units);\n }\n}\nfunction PercentGaugeComponent__svg_g_10_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵelement(1, \"rect\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const tic_r1 = ctx.$implicit;\n i0.ɵɵattribute(\"transform\", tic_r1.transform);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"y\", -tic_r1.height / 2)(\"x\", -tic_r1.width)(\"width\", tic_r1.width)(\"height\", tic_r1.height)(\"fill\", tic_r1.fill);\n }\n}\nfunction PercentGaugeComponent__svg_circle_13_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"circle\", 11);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵstyleProp(\"stroke-width\", ctx_r1.targetRadius / 10);\n i0.ɵɵattribute(\"r\", ctx_r1.targetRadius)(\"stroke\", ctx_r1.targetColor)(\"cx\", -ctx_r1.targetRadius / 2)(\"cy\", -ctx_r1.targetRadius / 2);\n }\n}\nfunction PercentGaugeComponent__svg_g_19_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"text\", 12);\n i0.ɵɵtext(2);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"transform\", ctx_r1.labelTransform);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", ctx_r1.label, \" \");\n }\n}\nfunction SankeyComponent__svg_g_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 5)(1, \"defs\")(2, \"linearGradient\", 6);\n i0.ɵɵelement(3, \"stop\", 7)(4, \"stop\", 8);\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(5, \"path\", 9);\n i0.ɵɵlistener(\"click\", function SankeyComponent__svg_g_2_Template_path_click_5_listener() {\n const link_r2 = i0.ɵɵrestoreView(_r1).$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.select.emit(link_r2.data));\n })(\"mouseenter\", function SankeyComponent__svg_g_2_Template_path_mouseenter_5_listener() {\n const link_r2 = i0.ɵɵrestoreView(_r1).$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.activate.emit(link_r2.data));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const link_r2 = ctx.$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"tooltipDisabled\", ctx_r2.tooltipDisabled)(\"tooltipType\", ctx_r2.styleTypes.tooltip)(\"tooltipPlacement\", \"top\")(\"tooltipTitle\", ctx_r2.tooltipTemplate ? undefined : link_r2.tooltip)(\"tooltipTemplate\", ctx_r2.tooltipTemplate)(\"tooltipContext\", link_r2.data);\n i0.ɵɵadvance(2);\n i0.ɵɵattribute(\"id\", link_r2.id)(\"x1\", link_r2.source.x1)(\"x2\", link_r2.target.x0);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"stop-color\", link_r2.startColor);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"stop-color\", link_r2.endColor);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"d\", link_r2.path)(\"stroke\", link_r2.gradientFill)(\"stroke-width\", link_r2.strokeWidth);\n }\n}\nfunction SankeyComponent__svg_g_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 10)(1, \"rect\", 11);\n i0.ɵɵlistener(\"click\", function SankeyComponent__svg_g_3_Template_rect_click_1_listener() {\n const rect_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.select.emit(rect_r5.data));\n })(\"mouseenter\", function SankeyComponent__svg_g_3_Template_rect_mouseenter_1_listener() {\n const rect_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.activate.emit(rect_r5.data));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const rect_r5 = ctx.$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"transform\", rect_r5.transform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"tooltipDisabled\", ctx_r2.tooltipDisabled)(\"tooltipType\", ctx_r2.styleTypes.tooltip)(\"tooltipPlacement\", \"top\")(\"tooltipTitle\", ctx_r2.tooltipTemplate ? undefined : rect_r5.tooltip)(\"tooltipTemplate\", ctx_r2.tooltipTemplate)(\"tooltipContext\", rect_r5.data);\n i0.ɵɵattribute(\"x\", 0)(\"y\", 0)(\"width\", rect_r5.width)(\"height\", rect_r5.height)(\"fill\", rect_r5.fill);\n }\n}\nfunction SankeyComponent__svg_g_4__svg_text_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"text\", 13);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const rect_r6 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵattribute(\"x\", rect_r6.width + 5)(\"y\", rect_r6.height / 2)(\"text-anchor\", rect_r6.labelAnchor)(\"dx\", rect_r6.labelAnchor === \"end\" ? -25 : 0);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", rect_r6.label, \" \");\n }\n}\nfunction SankeyComponent__svg_g_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, SankeyComponent__svg_g_4__svg_text_1_Template, 2, 5, \"text\", 12);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const rect_r6 = ctx.$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵattribute(\"transform\", rect_r6.transform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.showLabels && rect_r6.height > 15);\n }\n}\nfunction throttle(func, wait, options) {\n options = options || {};\n let context;\n let args;\n let result;\n let timeout = null;\n let previous = 0;\n function later() {\n previous = options.leading === false ? 0 : +new Date();\n timeout = null;\n result = func.apply(context, args);\n }\n return function () {\n const now = +new Date();\n if (!previous && options.leading === false) {\n previous = now;\n }\n const remaining = wait - (now - previous);\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n context = this;\n // eslint-disable-next-line prefer-rest-params\n args = arguments;\n if (remaining <= 0) {\n clearTimeout(timeout);\n timeout = null;\n previous = now;\n result = func.apply(context, args);\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n}\n/**\n * Throttle decorator\n *\n * class MyClass {\n * throttleable(10)\n * myFn() { ... }\n * }\n */\nfunction throttleable(duration, options) {\n return function innerDecorator(target, key, descriptor) {\n return {\n configurable: true,\n enumerable: descriptor.enumerable,\n get: function getter() {\n Object.defineProperty(this, key, {\n configurable: true,\n enumerable: descriptor.enumerable,\n value: throttle(descriptor.value, duration, options)\n });\n return this[key];\n }\n };\n };\n}\nvar PlacementTypes = /*#__PURE__*/function (PlacementTypes) {\n PlacementTypes[\"Top\"] = \"top\";\n PlacementTypes[\"Bottom\"] = \"bottom\";\n PlacementTypes[\"Left\"] = \"left\";\n PlacementTypes[\"Right\"] = \"right\";\n PlacementTypes[\"Center\"] = \"center\";\n return PlacementTypes;\n}(PlacementTypes || {});\nconst caretOffset = 7;\nfunction verticalPosition(elDimensions, popoverDimensions, alignment) {\n if (alignment === PlacementTypes.Top) {\n return elDimensions.top - caretOffset;\n }\n if (alignment === PlacementTypes.Bottom) {\n return elDimensions.top + elDimensions.height - popoverDimensions.height + caretOffset;\n }\n if (alignment === PlacementTypes.Center) {\n return elDimensions.top + elDimensions.height / 2 - popoverDimensions.height / 2;\n }\n return undefined;\n}\nfunction horizontalPosition(elDimensions, popoverDimensions, alignment) {\n if (alignment === PlacementTypes.Left) {\n return elDimensions.left - caretOffset;\n }\n if (alignment === PlacementTypes.Right) {\n return elDimensions.left + elDimensions.width - popoverDimensions.width + caretOffset;\n }\n if (alignment === PlacementTypes.Center) {\n return elDimensions.left + elDimensions.width / 2 - popoverDimensions.width / 2;\n }\n return undefined;\n}\n/**\n * Position helper for the popover directive.\n *\n * @export\n */\nclass PositionHelper {\n /**\n * Calculate vertical alignment position\n *\n * @memberOf PositionHelper\n */\n static calculateVerticalAlignment(elDimensions, popoverDimensions, alignment) {\n let result = verticalPosition(elDimensions, popoverDimensions, alignment);\n if (result + popoverDimensions.height > window.innerHeight) {\n result = window.innerHeight - popoverDimensions.height;\n }\n return result;\n }\n /**\n * Calculate vertical caret position\n *\n * @memberOf PositionHelper\n */\n static calculateVerticalCaret(elDimensions, popoverDimensions, caretDimensions, alignment) {\n let result;\n if (alignment === PlacementTypes.Top) {\n result = elDimensions.height / 2 - caretDimensions.height / 2 + caretOffset;\n }\n if (alignment === PlacementTypes.Bottom) {\n result = popoverDimensions.height - elDimensions.height / 2 - caretDimensions.height / 2 - caretOffset;\n }\n if (alignment === PlacementTypes.Center) {\n result = popoverDimensions.height / 2 - caretDimensions.height / 2;\n }\n const popoverPosition = verticalPosition(elDimensions, popoverDimensions, alignment);\n if (popoverPosition + popoverDimensions.height > window.innerHeight) {\n result += popoverPosition + popoverDimensions.height - window.innerHeight;\n }\n return result;\n }\n /**\n * Calculate horz alignment position\n *\n * @memberOf PositionHelper\n */\n static calculateHorizontalAlignment(elDimensions, popoverDimensions, alignment) {\n let result = horizontalPosition(elDimensions, popoverDimensions, alignment);\n if (result + popoverDimensions.width > window.innerWidth) {\n result = window.innerWidth - popoverDimensions.width;\n }\n return result;\n }\n /**\n * Calculate horz caret position\n *\n * @memberOf PositionHelper\n */\n static calculateHorizontalCaret(elDimensions, popoverDimensions, caretDimensions, alignment) {\n let result;\n if (alignment === PlacementTypes.Left) {\n result = elDimensions.width / 2 - caretDimensions.width / 2 + caretOffset;\n }\n if (alignment === PlacementTypes.Right) {\n result = popoverDimensions.width - elDimensions.width / 2 - caretDimensions.width / 2 - caretOffset;\n }\n if (alignment === PlacementTypes.Center) {\n result = popoverDimensions.width / 2 - caretDimensions.width / 2;\n }\n const popoverPosition = horizontalPosition(elDimensions, popoverDimensions, alignment);\n if (popoverPosition + popoverDimensions.width > window.innerWidth) {\n result += popoverPosition + popoverDimensions.width - window.innerWidth;\n }\n return result;\n }\n /**\n * Checks if the element's position should be flipped\n *\n * @memberOf PositionHelper\n */\n static shouldFlip(elDimensions, popoverDimensions, placement, spacing) {\n let flip = false;\n if (placement === PlacementTypes.Right) {\n if (elDimensions.left + elDimensions.width + popoverDimensions.width + spacing > window.innerWidth) {\n flip = true;\n }\n }\n if (placement === PlacementTypes.Left) {\n if (elDimensions.left - popoverDimensions.width - spacing < 0) {\n flip = true;\n }\n }\n if (placement === PlacementTypes.Top) {\n if (elDimensions.top - popoverDimensions.height - spacing < 0) {\n flip = true;\n }\n }\n if (placement === PlacementTypes.Bottom) {\n if (elDimensions.top + elDimensions.height + popoverDimensions.height + spacing > window.innerHeight) {\n flip = true;\n }\n }\n return flip;\n }\n /**\n * Position caret\n *\n * @memberOf PositionHelper\n */\n static positionCaret(placement, elmDim, hostDim, caretDimensions, alignment) {\n let top = 0;\n let left = 0;\n if (placement === PlacementTypes.Right) {\n left = -7;\n top = PositionHelper.calculateVerticalCaret(hostDim, elmDim, caretDimensions, alignment);\n } else if (placement === PlacementTypes.Left) {\n left = elmDim.width;\n top = PositionHelper.calculateVerticalCaret(hostDim, elmDim, caretDimensions, alignment);\n } else if (placement === PlacementTypes.Top) {\n top = elmDim.height;\n left = PositionHelper.calculateHorizontalCaret(hostDim, elmDim, caretDimensions, alignment);\n } else if (placement === PlacementTypes.Bottom) {\n top = -7;\n left = PositionHelper.calculateHorizontalCaret(hostDim, elmDim, caretDimensions, alignment);\n }\n return {\n top,\n left\n };\n }\n /**\n * Position content\n *\n * @memberOf PositionHelper\n */\n static positionContent(placement, elmDim, hostDim, spacing, alignment) {\n let top = 0;\n let left = 0;\n if (placement === PlacementTypes.Right) {\n left = hostDim.left + hostDim.width + spacing;\n top = PositionHelper.calculateVerticalAlignment(hostDim, elmDim, alignment);\n } else if (placement === PlacementTypes.Left) {\n left = hostDim.left - elmDim.width - spacing;\n top = PositionHelper.calculateVerticalAlignment(hostDim, elmDim, alignment);\n } else if (placement === PlacementTypes.Top) {\n top = hostDim.top - elmDim.height - spacing;\n left = PositionHelper.calculateHorizontalAlignment(hostDim, elmDim, alignment);\n } else if (placement === PlacementTypes.Bottom) {\n top = hostDim.top + hostDim.height + spacing;\n left = PositionHelper.calculateHorizontalAlignment(hostDim, elmDim, alignment);\n }\n return {\n top,\n left\n };\n }\n /**\n * Determine placement based on flip\n *\n * @memberOf PositionHelper\n */\n static determinePlacement(placement, elmDim, hostDim, spacing) {\n const shouldFlip = PositionHelper.shouldFlip(hostDim, elmDim, placement, spacing);\n if (shouldFlip) {\n if (placement === PlacementTypes.Right) {\n return PlacementTypes.Left;\n } else if (placement === PlacementTypes.Left) {\n return PlacementTypes.Right;\n } else if (placement === PlacementTypes.Top) {\n return PlacementTypes.Bottom;\n } else if (placement === PlacementTypes.Bottom) {\n return PlacementTypes.Top;\n }\n }\n return placement;\n }\n}\nlet TooltipContentComponent = /*#__PURE__*/(() => {\n class TooltipContentComponent {\n get cssClasses() {\n let clz = 'ngx-charts-tooltip-content';\n clz += ` position-${this.placement}`;\n clz += ` type-${this.type}`;\n clz += ` ${this.cssClass}`;\n return clz;\n }\n constructor(element, renderer, platformId) {\n this.element = element;\n this.renderer = renderer;\n this.platformId = platformId;\n }\n ngAfterViewInit() {\n setTimeout(this.position.bind(this));\n }\n position() {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n const nativeElm = this.element.nativeElement;\n const hostDim = this.host.nativeElement.getBoundingClientRect();\n // if no dims were found, never show\n if (!hostDim.height && !hostDim.width) return;\n const elmDim = nativeElm.getBoundingClientRect();\n this.checkFlip(hostDim, elmDim);\n this.positionContent(nativeElm, hostDim, elmDim);\n if (this.showCaret) {\n this.positionCaret(hostDim, elmDim);\n }\n // animate its entry\n setTimeout(() => this.renderer.addClass(nativeElm, 'animate'), 1);\n }\n positionContent(nativeElm, hostDim, elmDim) {\n const {\n top,\n left\n } = PositionHelper.positionContent(this.placement, elmDim, hostDim, this.spacing, this.alignment);\n this.renderer.setStyle(nativeElm, 'top', `${top}px`);\n this.renderer.setStyle(nativeElm, 'left', `${left}px`);\n }\n positionCaret(hostDim, elmDim) {\n const caretElm = this.caretElm.nativeElement;\n const caretDimensions = caretElm.getBoundingClientRect();\n const {\n top,\n left\n } = PositionHelper.positionCaret(this.placement, elmDim, hostDim, caretDimensions, this.alignment);\n this.renderer.setStyle(caretElm, 'top', `${top}px`);\n this.renderer.setStyle(caretElm, 'left', `${left}px`);\n }\n checkFlip(hostDim, elmDim) {\n this.placement = PositionHelper.determinePlacement(this.placement, elmDim, hostDim, this.spacing);\n }\n onWindowResize() {\n this.position();\n }\n static {\n this.ɵfac = function TooltipContentComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || TooltipContentComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(PLATFORM_ID));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TooltipContentComponent,\n selectors: [[\"ngx-tooltip-content\"]],\n viewQuery: function TooltipContentComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c0, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.caretElm = _t.first);\n }\n },\n hostVars: 2,\n hostBindings: function TooltipContentComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"resize\", function TooltipContentComponent_resize_HostBindingHandler() {\n return ctx.onWindowResize();\n }, false, i0.ɵɵresolveWindow);\n }\n if (rf & 2) {\n i0.ɵɵclassMap(ctx.cssClasses);\n }\n },\n inputs: {\n host: \"host\",\n showCaret: \"showCaret\",\n type: \"type\",\n placement: \"placement\",\n alignment: \"alignment\",\n spacing: \"spacing\",\n cssClass: \"cssClass\",\n title: \"title\",\n template: \"template\",\n context: \"context\"\n },\n standalone: false,\n decls: 6,\n vars: 6,\n consts: [[\"caretElm\", \"\"], [3, \"hidden\"], [1, \"tooltip-content\"], [4, \"ngIf\"], [3, \"innerHTML\", 4, \"ngIf\"], [3, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"], [3, \"innerHTML\"]],\n template: function TooltipContentComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\");\n i0.ɵɵelement(1, \"span\", 1, 0);\n i0.ɵɵelementStart(3, \"div\", 2);\n i0.ɵɵtemplate(4, TooltipContentComponent_span_4_Template, 2, 4, \"span\", 3)(5, TooltipContentComponent_span_5_Template, 1, 1, \"span\", 4);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵadvance();\n i0.ɵɵclassMapInterpolate1(\"tooltip-caret position-\", ctx.placement, \"\");\n i0.ɵɵproperty(\"hidden\", !ctx.showCaret);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngIf\", !ctx.title);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.title);\n }\n },\n dependencies: [i1.NgIf, i1.NgTemplateOutlet],\n 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 #0003,0 1px 1px #00000024,0 2px 1px -1px #0000001f;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:#000000bf;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:translateZ(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}\\n\"],\n encapsulation: 2\n });\n }\n }\n __decorate([throttleable(100)], TooltipContentComponent.prototype, \"onWindowResize\", null);\n return TooltipContentComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass InjectionRegisteryService {\n constructor(injectionService) {\n this.injectionService = injectionService;\n this.defaults = {};\n this.components = new Map();\n }\n getByType(type = this.type) {\n return this.components.get(type);\n }\n create(bindings) {\n return this.createByType(this.type, bindings);\n }\n createByType(type, bindings) {\n bindings = this.assignDefaults(bindings);\n const component = this.injectComponent(type, bindings);\n this.register(type, component);\n return component;\n }\n destroy(instance) {\n const compsByType = this.components.get(instance.componentType);\n if (compsByType && compsByType.length) {\n const idx = compsByType.indexOf(instance);\n if (idx > -1) {\n const component = compsByType[idx];\n component.destroy();\n compsByType.splice(idx, 1);\n }\n }\n }\n destroyAll() {\n this.destroyByType(this.type);\n }\n destroyByType(type) {\n const comps = this.components.get(type);\n if (comps && comps.length) {\n let i = comps.length - 1;\n while (i >= 0) {\n this.destroy(comps[i--]);\n }\n }\n }\n injectComponent(type, bindings) {\n return this.injectionService.appendComponent(type, bindings);\n }\n assignDefaults(bindings) {\n const inputs = {\n ...this.defaults.inputs\n };\n const outputs = {\n ...this.defaults.outputs\n };\n if (!bindings.inputs && !bindings.outputs) {\n bindings = {\n inputs: bindings\n };\n }\n if (inputs) {\n bindings.inputs = {\n ...inputs,\n ...bindings.inputs\n };\n }\n if (outputs) {\n bindings.outputs = {\n ...outputs,\n ...bindings.outputs\n };\n }\n return bindings;\n }\n register(type, component) {\n if (!this.components.has(type)) {\n this.components.set(type, []);\n }\n const types = this.components.get(type);\n types.push(component);\n }\n}\nfunction isViewContainerRef(x) {\n return x.element;\n}\n/**\n * Injection service is a helper to append components\n * dynamically to a known location in the DOM, most\n * noteably for dialogs/tooltips appending to body.\n *\n * @export\n */\nlet InjectionService = /*#__PURE__*/(() => {\n class InjectionService {\n static {\n this.globalRootViewContainer = null;\n }\n /**\n * Sets a default global root view container. This is useful for\n * things like ngUpgrade that doesn't have a ApplicationRef root.\n *\n * @param container\n */\n static setGlobalRootViewContainer(container) {\n InjectionService.globalRootViewContainer = container;\n }\n constructor(applicationRef, componentFactoryResolver, injector) {\n this.applicationRef = applicationRef;\n this.componentFactoryResolver = componentFactoryResolver;\n this.injector = injector;\n }\n /**\n * Gets the root view container to inject the component to.\n *\n * @memberOf InjectionService\n */\n getRootViewContainer() {\n if (this._container) return this._container;\n if (InjectionService.globalRootViewContainer) return InjectionService.globalRootViewContainer;\n if (this.applicationRef.components.length) return this.applicationRef.components[0];\n throw new Error('View Container not found! ngUpgrade needs to manually set this via setRootViewContainer or setGlobalRootViewContainer.');\n }\n /**\n * Overrides the default root view container. This is useful for\n * things like ngUpgrade that doesn't have a ApplicationRef root.\n *\n * @param container\n *\n * @memberOf InjectionService\n */\n setRootViewContainer(container) {\n this._container = container;\n }\n /**\n * Gets the html element for a component ref.\n *\n * @param componentRef\n *\n * @memberOf InjectionService\n */\n getComponentRootNode(component) {\n if (isViewContainerRef(component)) {\n return component.element.nativeElement;\n }\n if (component.hostView && component.hostView.rootNodes.length > 0) {\n return component.hostView.rootNodes[0];\n }\n // the top most component root node has no `hostView`\n return component.location.nativeElement;\n }\n /**\n * Gets the root component container html element.\n *\n * @memberOf InjectionService\n */\n getRootViewContainerNode(component) {\n return this.getComponentRootNode(component);\n }\n /**\n * Projects the bindings onto the component\n *\n * @param component\n * @param options\n *\n * @memberOf InjectionService\n */\n projectComponentBindings(component, bindings) {\n if (bindings) {\n if (bindings.inputs !== undefined) {\n const bindingKeys = Object.getOwnPropertyNames(bindings.inputs);\n for (const bindingName of bindingKeys) {\n component.instance[bindingName] = bindings.inputs[bindingName];\n }\n }\n if (bindings.outputs !== undefined) {\n const eventKeys = Object.getOwnPropertyNames(bindings.outputs);\n for (const eventName of eventKeys) {\n component.instance[eventName] = bindings.outputs[eventName];\n }\n }\n }\n return component;\n }\n /**\n * Appends a component to a adjacent location\n *\n * @param componentClass\n * @param [options={}]\n * @param [location]\n *\n * @memberOf InjectionService\n */\n appendComponent(componentClass, bindings = {}, location) {\n if (!location) location = this.getRootViewContainer();\n const appendLocation = this.getComponentRootNode(location);\n const portalHost = new DomPortalOutlet(appendLocation, this.componentFactoryResolver, this.applicationRef, this.injector);\n const portal = new ComponentPortal(componentClass);\n const componentRef = portalHost.attach(portal);\n this.projectComponentBindings(componentRef, bindings);\n return componentRef;\n }\n static {\n this.ɵfac = function InjectionService_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || InjectionService)(i0.ɵɵinject(i0.ApplicationRef), i0.ɵɵinject(i0.ComponentFactoryResolver), i0.ɵɵinject(i0.Injector));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: InjectionService,\n factory: InjectionService.ɵfac\n });\n }\n }\n return InjectionService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TooltipService = /*#__PURE__*/(() => {\n class TooltipService extends InjectionRegisteryService {\n constructor(injectionService) {\n super(injectionService);\n this.type = TooltipContentComponent;\n }\n static {\n this.ɵfac = function TooltipService_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || TooltipService)(i0.ɵɵinject(InjectionService));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TooltipService,\n factory: TooltipService.ɵfac\n });\n }\n }\n return TooltipService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar LegendPosition = /*#__PURE__*/function (LegendPosition) {\n LegendPosition[\"Right\"] = \"right\";\n LegendPosition[\"Below\"] = \"below\";\n return LegendPosition;\n}(LegendPosition || {});\nvar LegendType = /*#__PURE__*/function (LegendType) {\n LegendType[\"ScaleLegend\"] = \"scaleLegend\";\n LegendType[\"Legend\"] = \"legend\";\n return LegendType;\n}(LegendType || {});\nvar ScaleType = /*#__PURE__*/function (ScaleType) {\n ScaleType[\"Time\"] = \"time\";\n ScaleType[\"Linear\"] = \"linear\";\n ScaleType[\"Ordinal\"] = \"ordinal\";\n ScaleType[\"Quantile\"] = \"quantile\";\n return ScaleType;\n}(ScaleType || {});\n/**\n * Formats a label given a date, number or string.\n *\n * @export\n */\nfunction formatLabel(label) {\n if (label instanceof Date) {\n label = label.toLocaleDateString();\n } else {\n label = label.toLocaleString();\n }\n return label;\n}\n/**\n * Escapes a label.\n *\n * @export\n */\nfunction escapeLabel(label) {\n return label.toLocaleString().replace(/[&'`\"<>]/g, match => {\n return {\n '&': '&',\n // tslint:disable-next-line: quotemark\n \"'\": ''',\n '`': '`',\n '\"': '"',\n '<': '<',\n '>': '>'\n }[match];\n });\n}\nlet LegendEntryComponent = /*#__PURE__*/(() => {\n class LegendEntryComponent {\n constructor() {\n this.isActive = false;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.toggle = new EventEmitter();\n }\n get trimmedLabel() {\n return this.formattedLabel || '(empty)';\n }\n onMouseEnter() {\n this.activate.emit({\n name: this.label\n });\n }\n onMouseLeave() {\n this.deactivate.emit({\n name: this.label\n });\n }\n static {\n this.ɵfac = function LegendEntryComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || LegendEntryComponent)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: LegendEntryComponent,\n selectors: [[\"ngx-charts-legend-entry\"]],\n hostBindings: function LegendEntryComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"mouseenter\", function LegendEntryComponent_mouseenter_HostBindingHandler() {\n return ctx.onMouseEnter();\n })(\"mouseleave\", function LegendEntryComponent_mouseleave_HostBindingHandler() {\n return ctx.onMouseLeave();\n });\n }\n },\n inputs: {\n color: \"color\",\n label: \"label\",\n formattedLabel: \"formattedLabel\",\n isActive: \"isActive\"\n },\n outputs: {\n select: \"select\",\n activate: \"activate\",\n deactivate: \"deactivate\",\n toggle: \"toggle\"\n },\n standalone: false,\n decls: 4,\n vars: 6,\n consts: [[\"tabindex\", \"-1\", 3, \"click\", \"title\"], [1, \"legend-label-color\", 3, \"click\"], [1, \"legend-label-text\"]],\n template: function LegendEntryComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 0);\n i0.ɵɵlistener(\"click\", function LegendEntryComponent_Template_span_click_0_listener() {\n return ctx.select.emit(ctx.formattedLabel);\n });\n i0.ɵɵelementStart(1, \"span\", 1);\n i0.ɵɵlistener(\"click\", function LegendEntryComponent_Template_span_click_1_listener() {\n return ctx.toggle.emit(ctx.formattedLabel);\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(2, \"span\", 2);\n i0.ɵɵtext(3);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"active\", ctx.isActive);\n i0.ɵɵproperty(\"title\", ctx.formattedLabel);\n i0.ɵɵadvance();\n i0.ɵɵstyleProp(\"background-color\", ctx.color);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", ctx.trimmedLabel, \" \");\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return LegendEntryComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet LegendComponent = /*#__PURE__*/(() => {\n class LegendComponent {\n constructor(cd) {\n this.cd = cd;\n this.horizontal = false;\n this.labelClick = new EventEmitter();\n this.labelActivate = new EventEmitter();\n this.labelDeactivate = new EventEmitter();\n this.legendEntries = [];\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.cd.markForCheck();\n this.legendEntries = this.getLegendEntries();\n }\n getLegendEntries() {\n const items = [];\n for (const label of this.data) {\n const formattedLabel = formatLabel(label);\n const idx = items.findIndex(i => {\n return i.label === formattedLabel;\n });\n if (idx === -1) {\n items.push({\n label,\n formattedLabel,\n color: this.colors.getColor(label)\n });\n }\n }\n return items;\n }\n isActive(entry) {\n if (!this.activeEntries) return false;\n const item = this.activeEntries.find(d => {\n return entry.label === d.name;\n });\n return item !== undefined;\n }\n activate(item) {\n this.labelActivate.emit(item);\n }\n deactivate(item) {\n this.labelDeactivate.emit(item);\n }\n trackBy(index, item) {\n return item.label;\n }\n static {\n this.ɵfac = function LegendComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || LegendComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: LegendComponent,\n selectors: [[\"ngx-charts-legend\"]],\n inputs: {\n data: \"data\",\n title: \"title\",\n colors: \"colors\",\n height: \"height\",\n width: \"width\",\n activeEntries: \"activeEntries\",\n horizontal: \"horizontal\"\n },\n outputs: {\n labelClick: \"labelClick\",\n labelActivate: \"labelActivate\",\n labelDeactivate: \"labelDeactivate\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n decls: 5,\n vars: 9,\n consts: [[\"class\", \"legend-title\", 4, \"ngIf\"], [1, \"legend-wrap\"], [1, \"legend-labels\"], [\"class\", \"legend-label\", 4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [1, \"legend-title\"], [1, \"legend-title-text\"], [1, \"legend-label\"], [3, \"select\", \"activate\", \"deactivate\", \"label\", \"formattedLabel\", \"color\", \"isActive\"]],\n template: function LegendComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\");\n i0.ɵɵtemplate(1, LegendComponent_header_1_Template, 3, 1, \"header\", 0);\n i0.ɵɵelementStart(2, \"div\", 1)(3, \"ul\", 2);\n i0.ɵɵtemplate(4, LegendComponent_li_4_Template, 2, 4, \"li\", 3);\n i0.ɵɵelementEnd()()();\n }\n if (rf & 2) {\n i0.ɵɵstyleProp(\"width\", ctx.width, \"px\");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", (ctx.title == null ? null : ctx.title.length) > 0);\n i0.ɵɵadvance(2);\n i0.ɵɵstyleProp(\"max-height\", ctx.height - 45, \"px\");\n i0.ɵɵclassProp(\"horizontal-legend\", ctx.horizontal);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx.legendEntries)(\"ngForTrackBy\", ctx.trackBy);\n }\n },\n dependencies: [i1.NgForOf, i1.NgIf, LegendEntryComponent],\n 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 ul,.chart-legend li{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:#0000000d}.chart-legend .legend-label{cursor:pointer;font-size:90%;margin:8px;color:#afb7c8}.chart-legend .legend-label:hover{color:#000;-webkit-transition:.2s;-moz-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}\\n\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return LegendComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet ScaleLegendComponent = /*#__PURE__*/(() => {\n class ScaleLegendComponent {\n constructor() {\n this.horizontal = false;\n }\n ngOnChanges(changes) {\n const gradientValues = this.gradientString(this.colors.range(), this.colors.domain());\n const direction = this.horizontal ? 'right' : 'bottom';\n this.gradient = `linear-gradient(to ${direction}, ${gradientValues})`;\n }\n /**\n * Generates the string used in the gradient stylesheet properties\n * @param colors array of colors\n * @param splits array of splits on a scale of (0, 1)\n */\n gradientString(colors, splits) {\n // add the 100%\n splits.push(1);\n const pairs = [];\n colors.reverse().forEach((c, i) => {\n pairs.push(`${c} ${Math.round(splits[i] * 100)}%`);\n });\n return pairs.join(', ');\n }\n static {\n this.ɵfac = function ScaleLegendComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || ScaleLegendComponent)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: ScaleLegendComponent,\n selectors: [[\"ngx-charts-scale-legend\"]],\n inputs: {\n valueRange: \"valueRange\",\n colors: \"colors\",\n height: \"height\",\n width: \"width\",\n horizontal: \"horizontal\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n decls: 8,\n vars: 10,\n consts: [[1, \"scale-legend\"], [1, \"scale-legend-label\"], [1, \"scale-legend-wrap\"]],\n template: function ScaleLegendComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0)(1, \"div\", 1)(2, \"span\");\n i0.ɵɵtext(3);\n i0.ɵɵelementEnd()();\n i0.ɵɵelement(4, \"div\", 2);\n i0.ɵɵelementStart(5, \"div\", 1)(6, \"span\");\n i0.ɵɵtext(7);\n i0.ɵɵelementEnd()()();\n }\n if (rf & 2) {\n i0.ɵɵstyleProp(\"height\", ctx.horizontal ? undefined : ctx.height, \"px\")(\"width\", ctx.width, \"px\");\n i0.ɵɵclassProp(\"horizontal-legend\", ctx.horizontal);\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(ctx.valueRange[1].toLocaleString());\n i0.ɵɵadvance();\n i0.ɵɵstyleProp(\"background\", ctx.gradient);\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(ctx.valueRange[0].toLocaleString());\n }\n },\n 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}\\n\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return ScaleLegendComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet ChartComponent = /*#__PURE__*/(() => {\n class ChartComponent {\n constructor() {\n this.showLegend = false;\n this.animations = true;\n this.legendLabelClick = new EventEmitter();\n this.legendLabelActivate = new EventEmitter();\n this.legendLabelDeactivate = new EventEmitter();\n this.LegendPosition = LegendPosition;\n this.LegendType = LegendType;\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n let legendColumns = 0;\n if (this.showLegend) {\n this.legendType = this.getLegendType();\n if (!this.legendOptions || this.legendOptions.position === LegendPosition.Right) {\n if (this.legendType === LegendType.ScaleLegend) {\n legendColumns = 1;\n } else {\n legendColumns = 2;\n }\n }\n }\n const chartColumns = 12 - legendColumns;\n this.chartWidth = Math.floor(this.view[0] * chartColumns / 12.0);\n this.legendWidth = !this.legendOptions || this.legendOptions.position === LegendPosition.Right ? Math.floor(this.view[0] * legendColumns / 12.0) : this.chartWidth;\n }\n getLegendType() {\n return this.legendOptions.scaleType === ScaleType.Linear ? LegendType.ScaleLegend : LegendType.Legend;\n }\n static {\n this.ɵfac = function ChartComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || ChartComponent)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: ChartComponent,\n selectors: [[\"ngx-charts-chart\"]],\n inputs: {\n view: \"view\",\n showLegend: \"showLegend\",\n legendOptions: \"legendOptions\",\n legendType: \"legendType\",\n activeEntries: \"activeEntries\",\n animations: \"animations\"\n },\n outputs: {\n legendLabelClick: \"legendLabelClick\",\n legendLabelActivate: \"legendLabelActivate\",\n legendLabelDeactivate: \"legendLabelDeactivate\"\n },\n standalone: false,\n features: [i0.ɵɵProvidersFeature([TooltipService]), i0.ɵɵNgOnChangesFeature],\n ngContentSelectors: _c2,\n decls: 5,\n vars: 8,\n consts: [[1, \"ngx-charts-outer\"], [1, \"ngx-charts\"], [\"class\", \"chart-legend\", 3, \"horizontal\", \"valueRange\", \"colors\", \"height\", \"width\", 4, \"ngIf\"], [\"class\", \"chart-legend\", 3, \"horizontal\", \"data\", \"title\", \"colors\", \"height\", \"width\", \"activeEntries\", \"labelClick\", \"labelActivate\", \"labelDeactivate\", 4, \"ngIf\"], [1, \"chart-legend\", 3, \"horizontal\", \"valueRange\", \"colors\", \"height\", \"width\"], [1, \"chart-legend\", 3, \"labelClick\", \"labelActivate\", \"labelDeactivate\", \"horizontal\", \"data\", \"title\", \"colors\", \"height\", \"width\", \"activeEntries\"]],\n template: function ChartComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(1, \"svg\", 1);\n i0.ɵɵprojection(2);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(3, ChartComponent_ngx_charts_scale_legend_3_Template, 1, 5, \"ngx-charts-scale-legend\", 2)(4, ChartComponent_ngx_charts_legend_4_Template, 1, 7, \"ngx-charts-legend\", 3);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵstyleProp(\"width\", ctx.view[0], \"px\")(\"height\", ctx.view[1], \"px\");\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"width\", ctx.chartWidth)(\"height\", ctx.view[1]);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.showLegend && ctx.legendType === ctx.LegendType.ScaleLegend);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.showLegend && ctx.legendType === ctx.LegendType.Legend);\n }\n },\n dependencies: [i1.NgIf, LegendComponent, ScaleLegendComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return ChartComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Visibility Observer\n */\nlet VisibilityObserver = /*#__PURE__*/(() => {\n class VisibilityObserver {\n constructor(element, zone) {\n this.element = element;\n this.zone = zone;\n this.visible = new EventEmitter();\n this.isVisible = false;\n this.runCheck();\n }\n destroy() {\n clearTimeout(this.timeout);\n }\n onVisibilityChange() {\n // trigger zone recalc for columns\n this.zone.run(() => {\n this.isVisible = true;\n this.visible.emit(true);\n });\n }\n runCheck() {\n const check = () => {\n if (!this.element) {\n return;\n }\n // https://davidwalsh.name/offsetheight-visibility\n const {\n offsetHeight,\n offsetWidth\n } = this.element.nativeElement;\n if (offsetHeight && offsetWidth) {\n clearTimeout(this.timeout);\n this.onVisibilityChange();\n } else {\n clearTimeout(this.timeout);\n this.zone.runOutsideAngular(() => {\n this.timeout = setTimeout(() => check(), 100);\n });\n }\n };\n this.zone.runOutsideAngular(() => {\n this.timeout = setTimeout(() => check());\n });\n }\n static {\n this.ɵfac = function VisibilityObserver_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || VisibilityObserver)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.NgZone));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: VisibilityObserver,\n selectors: [[\"visibility-observer\"]],\n outputs: {\n visible: \"visible\"\n },\n standalone: false\n });\n }\n }\n return VisibilityObserver;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction isDate(value) {\n return toString.call(value) === '[object Date]';\n}\nfunction isNumber(value) {\n return typeof value === 'number';\n}\nlet BaseChartComponent = /*#__PURE__*/(() => {\n class BaseChartComponent {\n constructor(chartElement, zone, cd, platformId) {\n this.chartElement = chartElement;\n this.zone = zone;\n this.cd = cd;\n this.platformId = platformId;\n this.scheme = 'cool';\n this.schemeType = ScaleType.Ordinal;\n this.animations = true;\n this.select = new EventEmitter();\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.animations = false;\n }\n }\n ngAfterViewInit() {\n this.bindWindowResizeEvent();\n // listen for visibility of the element for hidden by default scenario\n this.visibilityObserver = new VisibilityObserver(this.chartElement, this.zone);\n this.visibilityObserver.visible.subscribe(this.update.bind(this));\n }\n ngOnDestroy() {\n this.unbindEvents();\n if (this.visibilityObserver) {\n this.visibilityObserver.visible.unsubscribe();\n this.visibilityObserver.destroy();\n }\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n if (this.results) {\n this.results = this.cloneData(this.results);\n } else {\n this.results = [];\n }\n if (this.view) {\n this.width = this.view[0];\n this.height = this.view[1];\n } else {\n const dims = this.getContainerDims();\n if (dims) {\n this.width = dims.width;\n this.height = dims.height;\n }\n }\n // default values if width or height are 0 or undefined\n if (!this.width) {\n this.width = 600;\n }\n if (!this.height) {\n this.height = 400;\n }\n this.width = Math.floor(this.width);\n this.height = Math.floor(this.height);\n if (this.cd) {\n this.cd.markForCheck();\n }\n }\n getContainerDims() {\n let width;\n let height;\n const hostElem = this.chartElement.nativeElement;\n if (isPlatformBrowser(this.platformId) && hostElem.parentNode !== null) {\n // Get the container dimensions\n const dims = hostElem.parentNode.getBoundingClientRect();\n width = dims.width;\n height = dims.height;\n }\n if (width && height) {\n return {\n width,\n height\n };\n }\n return null;\n }\n /**\n * Converts all date objects that appear as name\n * into formatted date strings\n */\n formatDates() {\n for (let i = 0; i < this.results.length; i++) {\n const g = this.results[i];\n g.label = g.name;\n if (isDate(g.label)) {\n g.label = g.label.toLocaleDateString();\n }\n if (g.series) {\n for (let j = 0; j < g.series.length; j++) {\n const d = g.series[j];\n d.label = d.name;\n if (isDate(d.label)) {\n d.label = d.label.toLocaleDateString();\n }\n }\n }\n }\n }\n unbindEvents() {\n if (this.resizeSubscription) {\n this.resizeSubscription.unsubscribe();\n }\n }\n bindWindowResizeEvent() {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n const source = fromEvent(window, 'resize');\n const subscription = source.pipe(debounceTime(200)).subscribe(e => {\n this.update();\n if (this.cd) {\n this.cd.markForCheck();\n }\n });\n this.resizeSubscription = subscription;\n }\n /**\n * Clones the data into a new object\n *\n * @memberOf BaseChart\n */\n cloneData(data) {\n const results = [];\n for (const item of data) {\n const copy = {};\n if (item['name'] !== undefined) {\n copy['name'] = item['name'];\n }\n if (item['value'] !== undefined) {\n copy['value'] = item['value'];\n }\n if (item['series'] !== undefined) {\n copy['series'] = [];\n for (const seriesItem of item['series']) {\n const seriesItemCopy = Object.assign({}, seriesItem);\n copy['series'].push(seriesItemCopy);\n }\n }\n if (item['extra'] !== undefined) {\n copy['extra'] = JSON.parse(JSON.stringify(item['extra']));\n }\n if (item['source'] !== undefined) {\n copy['source'] = item['source'];\n }\n if (item['target'] !== undefined) {\n copy['target'] = item['target'];\n }\n results.push(copy);\n }\n return results;\n }\n static {\n this.ɵfac = function BaseChartComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || BaseChartComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(PLATFORM_ID));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: BaseChartComponent,\n selectors: [[\"base-chart\"]],\n inputs: {\n results: \"results\",\n view: \"view\",\n scheme: \"scheme\",\n schemeType: \"schemeType\",\n customColors: \"customColors\",\n animations: \"animations\"\n },\n outputs: {\n select: \"select\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n decls: 1,\n vars: 0,\n template: function BaseChartComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\");\n }\n },\n encapsulation: 2\n });\n }\n }\n return BaseChartComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar Orientation = /*#__PURE__*/function (Orientation) {\n Orientation[\"Top\"] = \"top\";\n Orientation[\"Bottom\"] = \"bottom\";\n Orientation[\"Left\"] = \"left\";\n Orientation[\"Right\"] = \"right\";\n return Orientation;\n}(Orientation || {});\nlet AxisLabelComponent = /*#__PURE__*/(() => {\n class AxisLabelComponent {\n constructor(element) {\n this.textHeight = 25;\n this.margin = 5;\n this.element = element.nativeElement;\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.strokeWidth = '0.01';\n this.textAnchor = 'middle';\n this.transform = '';\n switch (this.orient) {\n case Orientation.Top:\n this.y = this.offset;\n this.x = this.width / 2;\n break;\n case Orientation.Bottom:\n this.y = this.offset;\n this.x = this.width / 2;\n break;\n case Orientation.Left:\n this.y = -(this.offset + this.textHeight + this.margin);\n this.x = -this.height / 2;\n this.transform = 'rotate(270)';\n break;\n case Orientation.Right:\n this.y = this.offset + this.margin;\n this.x = -this.height / 2;\n this.transform = 'rotate(270)';\n break;\n default:\n }\n }\n static {\n this.ɵfac = function AxisLabelComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || AxisLabelComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: AxisLabelComponent,\n selectors: [[\"g\", \"ngx-charts-axis-label\", \"\"]],\n inputs: {\n orient: \"orient\",\n label: \"label\",\n offset: \"offset\",\n width: \"width\",\n height: \"height\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n attrs: _c3,\n decls: 2,\n vars: 6,\n template: function AxisLabelComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"text\");\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"stroke-width\", ctx.strokeWidth)(\"x\", ctx.x)(\"y\", ctx.y)(\"text-anchor\", ctx.textAnchor)(\"transform\", ctx.transform);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx.label, \" \");\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return AxisLabelComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction trimLabel(s, max = 16) {\n if (typeof s !== 'string') {\n if (typeof s === 'number') {\n return s + '';\n } else {\n return '';\n }\n }\n s = s.trim();\n if (s.length <= max) {\n return s;\n } else {\n return `${s.slice(0, max)}...`;\n }\n}\nfunction reduceTicks(ticks, maxTicks) {\n if (ticks.length > maxTicks) {\n const reduced = [];\n const modulus = Math.floor(ticks.length / maxTicks);\n for (let i = 0; i < ticks.length; i++) {\n if (i % modulus === 0) {\n reduced.push(ticks[i]);\n }\n }\n ticks = reduced;\n }\n return ticks;\n}\nfunction getTickLines(label, maxLength, maxLines) {\n const labelString = (label || '').toString();\n let totalLines = [];\n if (/\\s/.test(labelString)) {\n totalLines = labelString.split(/\\s+/).reduce((lines, line) => {\n const last = (lines.pop() || '') + ' ';\n return last.length + line.length > maxLength ? [...lines, last.trim(), line.trim()] : [...lines, last + line];\n }, []);\n } else {\n let startIndex = 0;\n while (startIndex < labelString.length) {\n totalLines.push(labelString.substring(startIndex, startIndex + maxLength));\n startIndex += maxLength;\n }\n }\n if (totalLines.length > maxLines) {\n totalLines = totalLines.splice(0, maxLines);\n totalLines[totalLines.length - 1] += '...';\n }\n return totalLines;\n}\nvar TextAnchor = /*#__PURE__*/function (TextAnchor) {\n TextAnchor[\"Start\"] = \"start\";\n TextAnchor[\"Middle\"] = \"middle\";\n TextAnchor[\"End\"] = \"end\";\n return TextAnchor;\n}(TextAnchor || {});\nlet XAxisTicksComponent = /*#__PURE__*/(() => {\n class XAxisTicksComponent {\n get isWrapTicksSupported() {\n return this.wrapTicks && this.scale.step;\n }\n constructor(platformId) {\n this.platformId = platformId;\n this.tickArguments = [5];\n this.tickStroke = '#ccc';\n this.trimTicks = true;\n this.maxTickLength = 16;\n this.showGridLines = false;\n this.rotateTicks = true;\n this.wrapTicks = false;\n this.dimensionsChanged = new EventEmitter();\n this.verticalSpacing = 20;\n this.rotateLabels = false;\n this.innerTickSize = 6;\n this.outerTickSize = 6;\n this.tickPadding = 3;\n this.textAnchor = TextAnchor.Middle;\n this.maxTicksLength = 0;\n this.maxAllowedLength = 16;\n this.height = 0;\n this.approxHeight = 10;\n this.maxPossibleLengthForTickIfWrapped = 16;\n }\n ngOnChanges(changes) {\n this.update();\n }\n ngAfterViewInit() {\n setTimeout(() => this.updateDims());\n }\n updateDims() {\n if (!isPlatformBrowser(this.platformId)) {\n // for SSR, use approximate value instead of measured\n this.dimensionsChanged.emit({\n height: this.approxHeight\n });\n return;\n }\n const height = parseInt(this.ticksElement.nativeElement.getBoundingClientRect().height, 10);\n if (height !== this.height) {\n this.height = height;\n this.dimensionsChanged.emit({\n height: this.height\n });\n setTimeout(() => this.updateDims());\n }\n }\n update() {\n const scale = this.scale;\n this.ticks = this.getTicks();\n if (this.tickFormatting) {\n this.tickFormat = this.tickFormatting;\n } else if (scale.tickFormat) {\n // eslint-disable-next-line prefer-spread\n this.tickFormat = scale.tickFormat.apply(scale, this.tickArguments);\n } else {\n this.tickFormat = function (d) {\n if (d.constructor.name === 'Date') {\n return d.toLocaleDateString();\n }\n return d.toLocaleString();\n };\n }\n const angle = this.rotateTicks ? this.getRotationAngle(this.ticks) : null;\n this.adjustedScale = this.scale.bandwidth ? function (d) {\n return this.scale(d) + this.scale.bandwidth() * 0.5;\n } : this.scale;\n this.textTransform = '';\n if (angle && angle !== 0) {\n this.textTransform = `rotate(${angle})`;\n this.textAnchor = TextAnchor.End;\n this.verticalSpacing = 10;\n } else {\n this.textAnchor = TextAnchor.Middle;\n }\n setTimeout(() => this.updateDims());\n }\n getRotationAngle(ticks) {\n let angle = 0;\n this.maxTicksLength = 0;\n for (let i = 0; i < ticks.length; i++) {\n const tick = this.tickFormat(ticks[i]).toString();\n let tickLength = tick.length;\n if (this.trimTicks) {\n tickLength = this.tickTrim(tick).length;\n }\n if (tickLength > this.maxTicksLength) {\n this.maxTicksLength = tickLength;\n }\n }\n const len = Math.min(this.maxTicksLength, this.maxAllowedLength);\n const charWidth = 7; // need to measure this\n const wordWidth = len * charWidth;\n let baseWidth = wordWidth;\n const maxBaseWidth = Math.floor(this.width / ticks.length);\n // calculate optimal angle\n while (baseWidth > maxBaseWidth && angle > -90) {\n angle -= 30;\n baseWidth = Math.cos(angle * (Math.PI / 180)) * wordWidth;\n }\n let labelHeight = 14;\n if (this.isWrapTicksSupported) {\n const longestTick = this.ticks.reduce((earlier, current) => current.length > earlier.length ? current : earlier, '');\n const tickLines = this.tickChunks(longestTick);\n labelHeight = 14 * (tickLines.length || 1);\n this.maxPossibleLengthForTickIfWrapped = this.getMaxPossibleLengthForTick(longestTick);\n }\n const requiredHeight = angle !== 0 ? Math.max(Math.abs(Math.sin(angle * Math.PI / 180)) * this.maxTickLength * charWidth, 10) : labelHeight;\n this.approxHeight = Math.min(requiredHeight, 200);\n return angle;\n }\n getTicks() {\n let ticks;\n const maxTicks = this.getMaxTicks(20);\n const maxScaleTicks = this.getMaxTicks(100);\n if (this.tickValues) {\n ticks = this.tickValues;\n } else if (this.scale.ticks) {\n ticks = this.scale.ticks.apply(this.scale, [maxScaleTicks]);\n } else {\n ticks = this.scale.domain();\n ticks = reduceTicks(ticks, maxTicks);\n }\n return ticks;\n }\n getMaxTicks(tickWidth) {\n return Math.floor(this.width / tickWidth);\n }\n tickTransform(tick) {\n return 'translate(' + this.adjustedScale(tick) + ',' + this.verticalSpacing + ')';\n }\n gridLineTransform() {\n return `translate(0,${-this.verticalSpacing - 5})`;\n }\n tickTrim(label) {\n return this.trimTicks ? trimLabel(label, this.maxTickLength) : label;\n }\n getMaxPossibleLengthForTick(longestLabel) {\n if (this.scale.bandwidth) {\n const averageCharacterWidth = 7; // approximate char width\n const maxCharacters = Math.floor(this.scale.bandwidth() / averageCharacterWidth);\n const truncatedText = longestLabel.slice(0, maxCharacters);\n return Math.max(truncatedText.length, this.maxTickLength);\n }\n return this.maxTickLength;\n }\n tickChunks(label) {\n if (label.toString().length > this.maxTickLength && this.scale.bandwidth) {\n const maxAllowedLines = 5;\n let maxLines = this.rotateTicks ? Math.floor(this.scale.step() / 14) : maxAllowedLines;\n if (maxLines <= 1) {\n return [this.tickTrim(label)];\n }\n let possibleStringLength = Math.max(this.maxPossibleLengthForTickIfWrapped, this.maxTickLength);\n if (!isPlatformBrowser(this.platformId)) {\n possibleStringLength = Math.floor(Math.min(this.approxHeight / maxAllowedLines, Math.max(this.maxPossibleLengthForTickIfWrapped, this.maxTickLength)));\n }\n maxLines = Math.min(maxLines, maxAllowedLines);\n const lines = getTickLines(label, possibleStringLength, maxLines < 1 ? 1 : maxLines);\n return lines;\n }\n return [this.tickTrim(label)];\n }\n static {\n this.ɵfac = function XAxisTicksComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || XAxisTicksComponent)(i0.ɵɵdirectiveInject(PLATFORM_ID));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: XAxisTicksComponent,\n selectors: [[\"g\", \"ngx-charts-x-axis-ticks\", \"\"]],\n viewQuery: function XAxisTicksComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c4, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.ticksElement = _t.first);\n }\n },\n inputs: {\n scale: \"scale\",\n orient: \"orient\",\n tickArguments: \"tickArguments\",\n tickValues: \"tickValues\",\n tickStroke: \"tickStroke\",\n trimTicks: \"trimTicks\",\n maxTickLength: \"maxTickLength\",\n tickFormatting: \"tickFormatting\",\n showGridLines: \"showGridLines\",\n gridLineHeight: \"gridLineHeight\",\n width: \"width\",\n rotateTicks: \"rotateTicks\",\n wrapTicks: \"wrapTicks\"\n },\n outputs: {\n dimensionsChanged: \"dimensionsChanged\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n attrs: _c5,\n decls: 4,\n vars: 2,\n consts: [[\"ticksel\", \"\"], [\"tmplMultilineTick\", \"\"], [\"tmplSinglelineTick\", \"\"], [\"class\", \"tick\", 4, \"ngFor\", \"ngForOf\"], [4, \"ngFor\", \"ngForOf\"], [1, \"tick\"], [4, \"ngIf\"], [\"stroke-width\", \"0.01\", \"font-size\", \"12px\"], [4, \"ngIf\", \"ngIfThen\", \"ngIfElse\"], [\"x\", \"0\", 4, \"ngFor\", \"ngForOf\"], [\"x\", \"0\"], [\"y2\", \"0\", 1, \"gridline-path\", \"gridline-path-vertical\"]],\n template: function XAxisTicksComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", null, 0);\n i0.ɵɵtemplate(2, XAxisTicksComponent__svg_g_2_Template, 2, 2, \"g\", 3);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(3, XAxisTicksComponent__svg_g_3_Template, 2, 2, \"g\", 4);\n }\n if (rf & 2) {\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngForOf\", ctx.ticks);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx.ticks);\n }\n },\n dependencies: [i1.NgForOf, i1.NgIf],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return XAxisTicksComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet XAxisComponent = /*#__PURE__*/(() => {\n class XAxisComponent {\n constructor() {\n this.rotateTicks = true;\n this.showGridLines = false;\n this.xOrient = Orientation.Bottom;\n this.xAxisOffset = 0;\n this.wrapTicks = false;\n this.dimensionsChanged = new EventEmitter();\n this.xAxisClassName = 'x axis';\n this.labelOffset = 0;\n this.fill = 'none';\n this.stroke = 'stroke';\n this.tickStroke = '#ccc';\n this.strokeWidth = 'none';\n this.padding = 5;\n this.orientation = Orientation;\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.transform = `translate(0,${this.xAxisOffset + this.padding + this.dims.height})`;\n if (typeof this.xAxisTickCount !== 'undefined') {\n this.tickArguments = [this.xAxisTickCount];\n }\n }\n emitTicksHeight({\n height\n }) {\n const newLabelOffset = height + 25 + 5;\n if (newLabelOffset !== this.labelOffset) {\n this.labelOffset = newLabelOffset;\n setTimeout(() => {\n this.dimensionsChanged.emit({\n height\n });\n }, 0);\n }\n }\n static {\n this.ɵfac = function XAxisComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || XAxisComponent)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: XAxisComponent,\n selectors: [[\"g\", \"ngx-charts-x-axis\", \"\"]],\n viewQuery: function XAxisComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(XAxisTicksComponent, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.ticksComponent = _t.first);\n }\n },\n inputs: {\n xScale: \"xScale\",\n dims: \"dims\",\n trimTicks: \"trimTicks\",\n rotateTicks: \"rotateTicks\",\n maxTickLength: \"maxTickLength\",\n tickFormatting: \"tickFormatting\",\n showGridLines: \"showGridLines\",\n showLabel: \"showLabel\",\n labelText: \"labelText\",\n ticks: \"ticks\",\n xAxisTickCount: \"xAxisTickCount\",\n xOrient: \"xOrient\",\n xAxisOffset: \"xAxisOffset\",\n wrapTicks: \"wrapTicks\"\n },\n outputs: {\n dimensionsChanged: \"dimensionsChanged\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n attrs: _c6,\n decls: 3,\n vars: 4,\n consts: [[\"ngx-charts-x-axis-ticks\", \"\", 3, \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"tickArguments\", \"tickStroke\", \"scale\", \"orient\", \"showGridLines\", \"gridLineHeight\", \"width\", \"tickValues\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [\"ngx-charts-axis-label\", \"\", 3, \"label\", \"offset\", \"orient\", \"height\", \"width\", 4, \"ngIf\"], [\"ngx-charts-x-axis-ticks\", \"\", 3, \"dimensionsChanged\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"tickArguments\", \"tickStroke\", \"scale\", \"orient\", \"showGridLines\", \"gridLineHeight\", \"width\", \"tickValues\", \"wrapTicks\"], [\"ngx-charts-axis-label\", \"\", 3, \"label\", \"offset\", \"orient\", \"height\", \"width\"]],\n template: function XAxisComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, XAxisComponent__svg_g_1_Template, 1, 13, \"g\", 0)(2, XAxisComponent__svg_g_2_Template, 1, 5, \"g\", 1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"class\", ctx.xAxisClassName)(\"transform\", ctx.transform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.xScale);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.showLabel);\n }\n },\n dependencies: [i1.NgIf, AxisLabelComponent, XAxisTicksComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return XAxisComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generates a rounded rectanglar path\n *\n * @export\n * @param x, y, w, h, r, tl, tr, bl, br\n */\nfunction roundedRect(x, y, w, h, r, [tl, tr, bl, br]) {\n let retval = '';\n w = Math.floor(w);\n h = Math.floor(h);\n w = w === 0 ? 1 : w;\n h = h === 0 ? 1 : h;\n retval = `M${[x + r, y]}`;\n retval += `h${w - 2 * r}`;\n if (tr) {\n retval += `a${[r, r]} 0 0 1 ${[r, r]}`;\n } else {\n retval += `h${r}v${r}`;\n }\n retval += `v${h - 2 * r}`;\n if (br) {\n retval += `a${[r, r]} 0 0 1 ${[-r, r]}`;\n } else {\n retval += `v${r}h${-r}`;\n }\n retval += `h${2 * r - w}`;\n if (bl) {\n retval += `a${[r, r]} 0 0 1 ${[-r, -r]}`;\n } else {\n retval += `h${-r}v${-r}`;\n }\n retval += `v${2 * r - h}`;\n if (tl) {\n retval += `a${[r, r]} 0 0 1 ${[r, -r]}`;\n } else {\n retval += `v${-r}h${r}`;\n }\n retval += `z`;\n return retval;\n}\nlet YAxisTicksComponent = /*#__PURE__*/(() => {\n class YAxisTicksComponent {\n constructor(platformId) {\n this.platformId = platformId;\n this.tickArguments = [5];\n this.tickStroke = '#ccc';\n this.trimTicks = true;\n this.maxTickLength = 16;\n this.showGridLines = false;\n this.showRefLabels = false;\n this.showRefLines = false;\n this.wrapTicks = false;\n this.dimensionsChanged = new EventEmitter();\n this.innerTickSize = 6;\n this.tickPadding = 3;\n this.verticalSpacing = 20;\n this.textAnchor = TextAnchor.Middle;\n this.width = 0;\n this.outerTickSize = 6;\n this.rotateLabels = false;\n this.referenceLineLength = 0;\n this.Orientation = Orientation;\n }\n ngOnChanges(changes) {\n this.update();\n }\n ngAfterViewInit() {\n setTimeout(() => this.updateDims());\n }\n updateDims() {\n if (!isPlatformBrowser(this.platformId)) {\n // for SSR, use approximate value instead of measured\n this.width = this.getApproximateAxisWidth();\n this.dimensionsChanged.emit({\n width: this.width\n });\n return;\n }\n const width = parseInt(this.ticksElement.nativeElement.getBoundingClientRect().width, 10);\n if (width !== this.width) {\n this.width = width;\n this.dimensionsChanged.emit({\n width\n });\n setTimeout(() => this.updateDims());\n }\n }\n update() {\n const scale = this.scale;\n const sign = this.orient === Orientation.Top || this.orient === Orientation.Right ? -1 : 1;\n this.tickSpacing = Math.max(this.innerTickSize, 0) + this.tickPadding;\n this.ticks = this.getTicks();\n if (this.tickFormatting) {\n this.tickFormat = this.tickFormatting;\n } else if (scale.tickFormat) {\n // eslint-disable-next-line prefer-spread\n this.tickFormat = scale.tickFormat.apply(scale, this.tickArguments);\n } else {\n this.tickFormat = function (d) {\n if (d.constructor.name === 'Date') {\n return d.toLocaleDateString();\n }\n return d.toLocaleString();\n };\n }\n this.adjustedScale = scale.bandwidth ? d => {\n // position the tick to middle considering number of lines of the tick\n const positionMiddle = scale(d) + scale.bandwidth() * 0.5;\n if (this.wrapTicks && d.toString().length > this.maxTickLength) {\n const chunksLength = this.tickChunks(d).length;\n if (chunksLength === 1) {\n return positionMiddle;\n }\n const bandWidth = scale.bandwidth();\n const heightOfLines = chunksLength * 8;\n const availableFreeSpace = bandWidth * 0.5 - heightOfLines * 0.5;\n return scale(d) + availableFreeSpace;\n }\n return positionMiddle;\n } : scale;\n if (this.showRefLines && this.referenceLines) {\n this.setReferencelines();\n }\n switch (this.orient) {\n case Orientation.Top:\n this.transform = function (tick) {\n return 'translate(' + this.adjustedScale(tick) + ',0)';\n };\n this.textAnchor = TextAnchor.Middle;\n this.y2 = this.innerTickSize * sign;\n this.y1 = this.tickSpacing * sign;\n this.dy = sign < 0 ? '0em' : '.71em';\n break;\n case Orientation.Bottom:\n this.transform = function (tick) {\n return 'translate(' + this.adjustedScale(tick) + ',0)';\n };\n this.textAnchor = TextAnchor.Middle;\n this.y2 = this.innerTickSize * sign;\n this.y1 = this.tickSpacing * sign;\n this.dy = sign < 0 ? '0em' : '.71em';\n break;\n case Orientation.Left:\n this.transform = function (tick) {\n return 'translate(0,' + this.adjustedScale(tick) + ')';\n };\n this.textAnchor = TextAnchor.End;\n this.x2 = this.innerTickSize * -sign;\n this.x1 = this.tickSpacing * -sign;\n this.dy = '.32em';\n break;\n case Orientation.Right:\n this.transform = function (tick) {\n return 'translate(0,' + this.adjustedScale(tick) + ')';\n };\n this.textAnchor = TextAnchor.Start;\n this.x2 = this.innerTickSize * -sign;\n this.x1 = this.tickSpacing * -sign;\n this.dy = '.32em';\n break;\n default:\n }\n setTimeout(() => this.updateDims());\n }\n setReferencelines() {\n this.refMin = this.adjustedScale(Math.min.apply(null, this.referenceLines.map(item => item.value)));\n this.refMax = this.adjustedScale(Math.max.apply(null, this.referenceLines.map(item => item.value)));\n this.referenceLineLength = this.referenceLines.length;\n this.referenceAreaPath = roundedRect(0, this.refMax, this.gridLineWidth, this.refMin - this.refMax, 0, [false, false, false, false]);\n }\n getTicks() {\n let ticks;\n const maxTicks = this.getMaxTicks(20);\n const maxScaleTicks = this.getMaxTicks(50);\n if (this.tickValues) {\n ticks = this.tickValues;\n } else if (this.scale.ticks) {\n ticks = this.scale.ticks.apply(this.scale, [maxScaleTicks]);\n } else {\n ticks = this.scale.domain();\n ticks = reduceTicks(ticks, maxTicks);\n }\n return ticks;\n }\n getMaxTicks(tickHeight) {\n return Math.floor(this.height / tickHeight);\n }\n tickTransform(tick) {\n return `translate(${this.adjustedScale(tick)},${this.verticalSpacing})`;\n }\n gridLineTransform() {\n return `translate(5,0)`;\n }\n tickTrim(label) {\n return this.trimTicks ? trimLabel(label, this.maxTickLength) : label;\n }\n getApproximateAxisWidth() {\n const maxChars = Math.max(...this.ticks.map(t => this.tickTrim(this.tickFormat(t)).length));\n const charWidth = 7;\n return maxChars * charWidth;\n }\n tickChunks(label) {\n if (label.toString().length > this.maxTickLength && this.scale.bandwidth) {\n // for y-axis the width of the tick is fixed\n const preferredWidth = this.maxTickLength;\n const maxLines = Math.floor(this.scale.bandwidth() / 15);\n if (maxLines <= 1) {\n return [this.tickTrim(label)];\n }\n return getTickLines(label, preferredWidth, Math.min(maxLines, 5));\n }\n return [this.tickFormat(label)];\n }\n static {\n this.ɵfac = function YAxisTicksComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || YAxisTicksComponent)(i0.ɵɵdirectiveInject(PLATFORM_ID));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: YAxisTicksComponent,\n selectors: [[\"g\", \"ngx-charts-y-axis-ticks\", \"\"]],\n viewQuery: function YAxisTicksComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c4, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.ticksElement = _t.first);\n }\n },\n inputs: {\n scale: \"scale\",\n orient: \"orient\",\n tickArguments: \"tickArguments\",\n tickValues: \"tickValues\",\n tickStroke: \"tickStroke\",\n trimTicks: \"trimTicks\",\n maxTickLength: \"maxTickLength\",\n tickFormatting: \"tickFormatting\",\n showGridLines: \"showGridLines\",\n gridLineWidth: \"gridLineWidth\",\n height: \"height\",\n referenceLines: \"referenceLines\",\n showRefLabels: \"showRefLabels\",\n showRefLines: \"showRefLines\",\n wrapTicks: \"wrapTicks\"\n },\n outputs: {\n dimensionsChanged: \"dimensionsChanged\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n attrs: _c7,\n decls: 6,\n vars: 4,\n consts: [[\"ticksel\", \"\"], [\"tmplMultilineTick\", \"\"], [\"tmplSinglelineTick\", \"\"], [\"class\", \"tick\", 4, \"ngFor\", \"ngForOf\"], [\"class\", \"reference-area\", 4, \"ngIf\"], [4, \"ngFor\", \"ngForOf\"], [1, \"tick\"], [4, \"ngIf\"], [\"stroke-width\", \"0.01\"], [4, \"ngIf\", \"ngIfThen\", \"ngIfElse\"], [4, \"ngIf\", \"ngIfElse\"], [\"x\", \"0\", 4, \"ngFor\", \"ngForOf\"], [\"x\", \"0\"], [1, \"reference-area\"], [\"class\", \"gridline-path gridline-path-horizontal\", \"x1\", \"0\", 4, \"ngIf\"], [\"x1\", \"0\", 1, \"gridline-path\", \"gridline-path-horizontal\"], [\"x1\", \"0\", 1, \"refline-path\", \"gridline-path-horizontal\"], [1, \"refline-label\"]],\n template: function YAxisTicksComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", null, 0);\n i0.ɵɵtemplate(2, YAxisTicksComponent__svg_g_2_Template, 2, 2, \"g\", 3);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(3, YAxisTicksComponent__svg_path_3_Template, 1, 2, \"path\", 4)(4, YAxisTicksComponent__svg_g_4_Template, 2, 2, \"g\", 5)(5, YAxisTicksComponent__svg_g_5_Template, 2, 1, \"g\", 5);\n }\n if (rf & 2) {\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngForOf\", ctx.ticks);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.referenceLineLength > 1 && ctx.refMax && ctx.refMin && ctx.showRefLines);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx.ticks);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx.referenceLines);\n }\n },\n dependencies: [i1.NgForOf, i1.NgIf],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return YAxisTicksComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet YAxisComponent = /*#__PURE__*/(() => {\n class YAxisComponent {\n constructor() {\n this.showGridLines = false;\n this.yOrient = Orientation.Left;\n this.yAxisOffset = 0;\n this.wrapTicks = false;\n this.dimensionsChanged = new EventEmitter();\n this.yAxisClassName = 'y axis';\n this.labelOffset = 15;\n this.fill = 'none';\n this.stroke = '#CCC';\n this.tickStroke = '#CCC';\n this.strokeWidth = 1;\n this.padding = 5;\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.offset = -(this.yAxisOffset + this.padding);\n if (this.yOrient === Orientation.Right) {\n this.labelOffset = 65;\n this.transform = `translate(${this.offset + this.dims.width} , 0)`;\n } else {\n this.transform = `translate(${this.offset} , 0)`;\n }\n if (this.yAxisTickCount !== undefined) {\n this.tickArguments = [this.yAxisTickCount];\n }\n }\n emitTicksWidth({\n width\n }) {\n if (width !== this.labelOffset && this.yOrient === Orientation.Right) {\n this.labelOffset = width + this.labelOffset;\n setTimeout(() => {\n this.dimensionsChanged.emit({\n width\n });\n }, 0);\n } else if (width !== this.labelOffset) {\n this.labelOffset = width;\n setTimeout(() => {\n this.dimensionsChanged.emit({\n width\n });\n }, 0);\n }\n }\n static {\n this.ɵfac = function YAxisComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || YAxisComponent)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: YAxisComponent,\n selectors: [[\"g\", \"ngx-charts-y-axis\", \"\"]],\n viewQuery: function YAxisComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(YAxisTicksComponent, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.ticksComponent = _t.first);\n }\n },\n inputs: {\n yScale: \"yScale\",\n dims: \"dims\",\n trimTicks: \"trimTicks\",\n maxTickLength: \"maxTickLength\",\n tickFormatting: \"tickFormatting\",\n ticks: \"ticks\",\n showGridLines: \"showGridLines\",\n showLabel: \"showLabel\",\n labelText: \"labelText\",\n yAxisTickCount: \"yAxisTickCount\",\n yOrient: \"yOrient\",\n referenceLines: \"referenceLines\",\n showRefLines: \"showRefLines\",\n showRefLabels: \"showRefLabels\",\n yAxisOffset: \"yAxisOffset\",\n wrapTicks: \"wrapTicks\"\n },\n outputs: {\n dimensionsChanged: \"dimensionsChanged\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n attrs: _c8,\n decls: 3,\n vars: 4,\n consts: [[\"ngx-charts-y-axis-ticks\", \"\", 3, \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"tickArguments\", \"tickValues\", \"tickStroke\", \"scale\", \"orient\", \"showGridLines\", \"gridLineWidth\", \"referenceLines\", \"showRefLines\", \"showRefLabels\", \"height\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [\"ngx-charts-axis-label\", \"\", 3, \"label\", \"offset\", \"orient\", \"height\", \"width\", 4, \"ngIf\"], [\"ngx-charts-y-axis-ticks\", \"\", 3, \"dimensionsChanged\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"tickArguments\", \"tickValues\", \"tickStroke\", \"scale\", \"orient\", \"showGridLines\", \"gridLineWidth\", \"referenceLines\", \"showRefLines\", \"showRefLabels\", \"height\", \"wrapTicks\"], [\"ngx-charts-axis-label\", \"\", 3, \"label\", \"offset\", \"orient\", \"height\", \"width\"]],\n template: function YAxisComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\");\n i0.ɵɵtemplate(1, YAxisComponent__svg_g_1_Template, 1, 15, \"g\", 0)(2, YAxisComponent__svg_g_2_Template, 1, 5, \"g\", 1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"class\", ctx.yAxisClassName)(\"transform\", ctx.transform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.yScale);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.showLabel);\n }\n },\n dependencies: [i1.NgIf, AxisLabelComponent, YAxisTicksComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return YAxisComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AxesModule = /*#__PURE__*/(() => {\n class AxesModule {\n static {\n this.ɵfac = function AxesModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || AxesModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: AxesModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [CommonModule]\n });\n }\n }\n return AxesModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar StyleTypes = /*#__PURE__*/function (StyleTypes) {\n StyleTypes[\"popover\"] = \"popover\";\n StyleTypes[\"tooltip\"] = \"tooltip\";\n return StyleTypes;\n}(StyleTypes || {});\nvar ShowTypes = /*#__PURE__*/function (ShowTypes) {\n ShowTypes[ShowTypes[\"all\"] = 'all'] = \"all\";\n ShowTypes[ShowTypes[\"focus\"] = 'focus'] = \"focus\";\n ShowTypes[ShowTypes[\"mouseover\"] = 'mouseover'] = \"mouseover\";\n return ShowTypes;\n}(ShowTypes || {});\nlet TooltipDirective = /*#__PURE__*/(() => {\n class TooltipDirective {\n get listensForFocus() {\n return this.tooltipShowEvent === ShowTypes.all || this.tooltipShowEvent === ShowTypes.focus;\n }\n get listensForHover() {\n return this.tooltipShowEvent === ShowTypes.all || this.tooltipShowEvent === ShowTypes.mouseover;\n }\n constructor(tooltipService, viewContainerRef, renderer) {\n this.tooltipService = tooltipService;\n this.viewContainerRef = viewContainerRef;\n this.renderer = renderer;\n this.tooltipCssClass = '';\n this.tooltipAppendToBody = true;\n this.tooltipSpacing = 10;\n this.tooltipDisabled = false;\n this.tooltipShowCaret = true;\n this.tooltipPlacement = PlacementTypes.Top;\n this.tooltipAlignment = PlacementTypes.Center;\n this.tooltipType = StyleTypes.popover;\n this.tooltipCloseOnClickOutside = true;\n this.tooltipCloseOnMouseLeave = true;\n this.tooltipHideTimeout = 300;\n this.tooltipShowTimeout = 100;\n this.tooltipShowEvent = ShowTypes.all;\n this.tooltipImmediateExit = false;\n this.show = new EventEmitter();\n this.hide = new EventEmitter();\n }\n ngOnDestroy() {\n this.hideTooltip(true);\n }\n onFocus() {\n if (this.listensForFocus) {\n this.showTooltip();\n }\n }\n onBlur() {\n if (this.listensForFocus) {\n this.hideTooltip(true);\n }\n }\n onMouseEnter() {\n if (this.listensForHover) {\n this.showTooltip();\n }\n }\n onMouseLeave(target) {\n if (this.listensForHover && this.tooltipCloseOnMouseLeave) {\n clearTimeout(this.timeout);\n if (this.component) {\n const contentDom = this.component.instance.element.nativeElement;\n const contains = contentDom.contains(target);\n if (contains) return;\n }\n this.hideTooltip(this.tooltipImmediateExit);\n }\n }\n onMouseClick() {\n if (this.listensForHover) {\n this.hideTooltip(true);\n }\n }\n showTooltip(immediate) {\n if (this.component || this.tooltipDisabled) return;\n const time = immediate ? 0 : this.tooltipShowTimeout + (navigator.userAgent.match(/\\(i[^;]+;( U;)? CPU.+Mac OS X/) ? 400 : 0);\n clearTimeout(this.timeout);\n this.timeout = setTimeout(() => {\n this.tooltipService.destroyAll();\n const options = this.createBoundOptions();\n this.component = this.tooltipService.create(options);\n // add a tiny timeout to avoid event re-triggers\n setTimeout(() => {\n if (this.component) {\n this.addHideListeners(this.component.instance.element.nativeElement);\n }\n }, 10);\n this.show.emit(true);\n }, time);\n }\n addHideListeners(tooltip) {\n // on mouse enter, cancel the hide triggered by the leave\n this.mouseEnterContentEvent = this.renderer.listen(tooltip, 'mouseenter', () => {\n clearTimeout(this.timeout);\n });\n // content mouse leave listener\n if (this.tooltipCloseOnMouseLeave) {\n this.mouseLeaveContentEvent = this.renderer.listen(tooltip, 'mouseleave', () => {\n this.hideTooltip(this.tooltipImmediateExit);\n });\n }\n // content close on click outside\n if (this.tooltipCloseOnClickOutside) {\n this.documentClickEvent = this.renderer.listen('window', 'click', event => {\n const contains = tooltip.contains(event.target);\n if (!contains) this.hideTooltip();\n });\n }\n }\n hideTooltip(immediate = false) {\n if (!this.component) return;\n const destroyFn = () => {\n // remove events\n if (this.mouseLeaveContentEvent) this.mouseLeaveContentEvent();\n if (this.mouseEnterContentEvent) this.mouseEnterContentEvent();\n if (this.documentClickEvent) this.documentClickEvent();\n // emit events\n this.hide.emit(true);\n // destroy component\n this.tooltipService.destroy(this.component);\n this.component = undefined;\n };\n clearTimeout(this.timeout);\n if (!immediate) {\n this.timeout = setTimeout(destroyFn, this.tooltipHideTimeout);\n } else {\n destroyFn();\n }\n }\n createBoundOptions() {\n return {\n title: this.tooltipTitle,\n template: this.tooltipTemplate,\n host: this.viewContainerRef.element,\n placement: this.tooltipPlacement,\n alignment: this.tooltipAlignment,\n type: this.tooltipType,\n showCaret: this.tooltipShowCaret,\n cssClass: this.tooltipCssClass,\n spacing: this.tooltipSpacing,\n context: this.tooltipContext\n };\n }\n static {\n this.ɵfac = function TooltipDirective_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || TooltipDirective)(i0.ɵɵdirectiveInject(TooltipService), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.Renderer2));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TooltipDirective,\n selectors: [[\"\", \"ngx-tooltip\", \"\"]],\n hostBindings: function TooltipDirective_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"focusin\", function TooltipDirective_focusin_HostBindingHandler() {\n return ctx.onFocus();\n })(\"blur\", function TooltipDirective_blur_HostBindingHandler() {\n return ctx.onBlur();\n })(\"mouseenter\", function TooltipDirective_mouseenter_HostBindingHandler() {\n return ctx.onMouseEnter();\n })(\"mouseleave\", function TooltipDirective_mouseleave_HostBindingHandler($event) {\n return ctx.onMouseLeave($event.target);\n })(\"click\", function TooltipDirective_click_HostBindingHandler() {\n return ctx.onMouseClick();\n });\n }\n },\n inputs: {\n tooltipCssClass: \"tooltipCssClass\",\n tooltipTitle: \"tooltipTitle\",\n tooltipAppendToBody: \"tooltipAppendToBody\",\n tooltipSpacing: \"tooltipSpacing\",\n tooltipDisabled: \"tooltipDisabled\",\n tooltipShowCaret: \"tooltipShowCaret\",\n tooltipPlacement: \"tooltipPlacement\",\n tooltipAlignment: \"tooltipAlignment\",\n tooltipType: \"tooltipType\",\n tooltipCloseOnClickOutside: \"tooltipCloseOnClickOutside\",\n tooltipCloseOnMouseLeave: \"tooltipCloseOnMouseLeave\",\n tooltipHideTimeout: \"tooltipHideTimeout\",\n tooltipShowTimeout: \"tooltipShowTimeout\",\n tooltipTemplate: \"tooltipTemplate\",\n tooltipShowEvent: \"tooltipShowEvent\",\n tooltipContext: \"tooltipContext\",\n tooltipImmediateExit: \"tooltipImmediateExit\"\n },\n outputs: {\n show: \"show\",\n hide: \"hide\"\n },\n standalone: false\n });\n }\n }\n return TooltipDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TooltipModule = /*#__PURE__*/(() => {\n class TooltipModule {\n static {\n this.ɵfac = function TooltipModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || TooltipModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TooltipModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [InjectionService, TooltipService],\n imports: [CommonModule]\n });\n }\n }\n return TooltipModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst cache = {};\n/**\n * Generates a short id.\n *\n * Description:\n * A 4-character alphanumeric sequence (364 = 1.6 million)\n * This should only be used for JavaScript specific models.\n * http://stackoverflow.com/questions/6248666/how-to-generate-short-uid-like-ax4j9z-in-js\n *\n * Example: `ebgf`\n */\nfunction id() {\n let newId = ('0000' + (Math.random() * Math.pow(36, 4) << 0).toString(36)).slice(-4);\n // append a 'a' because neo gets mad\n newId = `a${newId}`;\n // ensure not already used\n if (!cache[newId]) {\n cache[newId] = true;\n return newId;\n }\n return id();\n}\nvar BarOrientation = /*#__PURE__*/function (BarOrientation) {\n BarOrientation[\"Vertical\"] = \"vertical\";\n BarOrientation[\"Horizontal\"] = \"horizontal\";\n return BarOrientation;\n}(BarOrientation || {});\nlet CircleComponent = /*#__PURE__*/(() => {\n class CircleComponent {\n constructor() {\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n }\n onClick() {\n this.select.emit(this.data);\n }\n onMouseEnter() {\n this.activate.emit(this.data);\n }\n onMouseLeave() {\n this.deactivate.emit(this.data);\n }\n ngOnChanges(changes) {\n this.classNames = Array.isArray(this.classNames) ? this.classNames.join(' ') : '';\n this.classNames += 'circle';\n }\n static {\n this.ɵfac = function CircleComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || CircleComponent)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: CircleComponent,\n selectors: [[\"g\", \"ngx-charts-circle\", \"\"]],\n hostBindings: function CircleComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"click\", function CircleComponent_click_HostBindingHandler() {\n return ctx.onClick();\n })(\"mouseenter\", function CircleComponent_mouseenter_HostBindingHandler() {\n return ctx.onMouseEnter();\n })(\"mouseleave\", function CircleComponent_mouseleave_HostBindingHandler() {\n return ctx.onMouseLeave();\n });\n }\n },\n inputs: {\n cx: \"cx\",\n cy: \"cy\",\n r: \"r\",\n fill: \"fill\",\n stroke: \"stroke\",\n data: \"data\",\n classNames: \"classNames\",\n circleOpacity: \"circleOpacity\",\n pointerEvents: \"pointerEvents\"\n },\n outputs: {\n select: \"select\",\n activate: \"activate\",\n deactivate: \"deactivate\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n attrs: _c9,\n decls: 1,\n vars: 8,\n template: function CircleComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"circle\");\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"cx\", ctx.cx)(\"cy\", ctx.cy)(\"r\", ctx.r)(\"fill\", ctx.fill)(\"stroke\", ctx.stroke)(\"opacity\", ctx.circleOpacity)(\"class\", ctx.classNames)(\"pointer-events\", ctx.pointerEvents);\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return CircleComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SvgLinearGradientComponent = /*#__PURE__*/(() => {\n class SvgLinearGradientComponent {\n constructor() {\n this.orientation = BarOrientation.Vertical;\n }\n ngOnChanges(changes) {\n this.x1 = '0%';\n this.x2 = '0%';\n this.y1 = '0%';\n this.y2 = '0%';\n if (this.orientation === BarOrientation.Horizontal) {\n this.x2 = '100%';\n } else if (this.orientation === BarOrientation.Vertical) {\n this.y1 = '100%';\n }\n }\n static {\n this.ɵfac = function SvgLinearGradientComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || SvgLinearGradientComponent)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: SvgLinearGradientComponent,\n selectors: [[\"g\", \"ngx-charts-svg-linear-gradient\", \"\"]],\n inputs: {\n orientation: \"orientation\",\n name: \"name\",\n stops: \"stops\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n attrs: _c10,\n decls: 2,\n vars: 6,\n consts: [[3, \"id\"], [3, \"stop-color\", \"stop-opacity\", 4, \"ngFor\", \"ngForOf\"]],\n template: function SvgLinearGradientComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"linearGradient\", 0);\n i0.ɵɵtemplate(1, SvgLinearGradientComponent__svg_stop_1_Template, 1, 5, \"stop\", 1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"id\", ctx.name);\n i0.ɵɵattribute(\"x1\", ctx.x1)(\"y1\", ctx.y1)(\"x2\", ctx.x2)(\"y2\", ctx.y2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx.stops);\n }\n },\n dependencies: [i1.NgForOf],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return SvgLinearGradientComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar SeriesType = /*#__PURE__*/function (SeriesType) {\n SeriesType[\"Standard\"] = \"standard\";\n SeriesType[\"Stacked\"] = \"stacked\";\n return SeriesType;\n}(SeriesType || {});\nlet CircleSeriesComponent = /*#__PURE__*/(() => {\n class CircleSeriesComponent {\n constructor(platformId) {\n this.platformId = platformId;\n this.type = SeriesType.Standard;\n this.tooltipDisabled = false;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.barVisible = false;\n this.barOrientation = BarOrientation;\n this.placementTypes = PlacementTypes;\n this.styleTypes = StyleTypes;\n this.isSSR = false;\n }\n ngOnInit() {\n this.gradientId = 'grad' + id().toString();\n this.gradientFill = `url(#${this.gradientId})`;\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n ngOnChanges() {\n this.update();\n }\n update() {\n this.circle = this.getActiveCircle();\n }\n getActiveCircle() {\n const indexActiveDataPoint = this.data.series.findIndex(d => {\n const label = d.name;\n return label && this.visibleValue && label.toString() === this.visibleValue.toString() && d.value !== undefined;\n });\n if (indexActiveDataPoint === -1) {\n // No valid point is 'active/hovered over' at this moment.\n return undefined;\n }\n return this.mapDataPointToCircle(this.data.series[indexActiveDataPoint], indexActiveDataPoint);\n }\n mapDataPointToCircle(d, i) {\n const seriesName = this.data.name;\n const value = d.value;\n const label = d.name;\n const tooltipLabel = formatLabel(label);\n let cx;\n if (this.scaleType === ScaleType.Time) {\n cx = this.xScale(label);\n } else if (this.scaleType === ScaleType.Linear) {\n cx = this.xScale(Number(label));\n } else {\n cx = this.xScale(label);\n }\n const cy = this.yScale(this.type === SeriesType.Standard ? value : d.d1);\n const radius = 5;\n const height = this.yScale.range()[0] - cy;\n const opacity = 1;\n let color;\n if (this.colors.scaleType === ScaleType.Linear) {\n if (this.type === SeriesType.Standard) {\n color = this.colors.getColor(value);\n } else {\n color = this.colors.getColor(d.d1);\n }\n } else {\n color = this.colors.getColor(seriesName);\n }\n const data = Object.assign({}, d, {\n series: seriesName,\n value,\n name: label\n });\n return {\n classNames: [`circle-data-${i}`],\n value,\n label,\n data,\n cx,\n cy,\n radius,\n height,\n tooltipLabel,\n color,\n opacity,\n seriesName,\n gradientStops: this.getGradientStops(color),\n min: d.min,\n max: d.max\n };\n }\n getTooltipText({\n tooltipLabel,\n value,\n seriesName,\n min,\n max\n }) {\n return `\n ${escapeLabel(seriesName)} • ${escapeLabel(tooltipLabel)}\n ${value.toLocaleString()}${this.getTooltipMinMaxText(min, max)}\n `;\n }\n getTooltipMinMaxText(min, max) {\n if (min !== undefined || max !== undefined) {\n let result = ' (';\n if (min !== undefined) {\n if (max === undefined) {\n result += '≥';\n }\n result += min.toLocaleString();\n if (max !== undefined) {\n result += ' - ';\n }\n } else if (max !== undefined) {\n result += '≤';\n }\n if (max !== undefined) {\n result += max.toLocaleString();\n }\n result += ')';\n return result;\n } else {\n return '';\n }\n }\n getGradientStops(color) {\n return [{\n offset: 0,\n color,\n opacity: 0.2\n }, {\n offset: 100,\n color,\n opacity: 1\n }];\n }\n onClick(data) {\n this.select.emit(data);\n }\n isActive(entry) {\n if (!this.activeEntries) return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name;\n });\n return item !== undefined;\n }\n activateCircle() {\n this.barVisible = true;\n this.activate.emit({\n name: this.data.name\n });\n }\n deactivateCircle() {\n this.barVisible = false;\n this.circle.opacity = 0;\n this.deactivate.emit({\n name: this.data.name\n });\n }\n static {\n this.ɵfac = function CircleSeriesComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || CircleSeriesComponent)(i0.ɵɵdirectiveInject(PLATFORM_ID));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: CircleSeriesComponent,\n selectors: [[\"g\", \"ngx-charts-circle-series\", \"\"]],\n inputs: {\n data: \"data\",\n type: \"type\",\n xScale: \"xScale\",\n yScale: \"yScale\",\n colors: \"colors\",\n scaleType: \"scaleType\",\n visibleValue: \"visibleValue\",\n activeEntries: \"activeEntries\",\n tooltipDisabled: \"tooltipDisabled\",\n tooltipTemplate: \"tooltipTemplate\"\n },\n outputs: {\n select: \"select\",\n activate: \"activate\",\n deactivate: \"deactivate\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n attrs: _c11,\n decls: 1,\n vars: 1,\n consts: [[4, \"ngIf\"], [\"ngx-charts-svg-linear-gradient\", \"\", 3, \"orientation\", \"name\", \"stops\"], [\"class\", \"tooltip-bar\", 4, \"ngIf\"], [\"ngx-charts-circle\", \"\", \"ngx-tooltip\", \"\", 1, \"circle\", 3, \"select\", \"activate\", \"deactivate\", \"cx\", \"cy\", \"r\", \"fill\", \"pointerEvents\", \"data\", \"classNames\", \"tooltipDisabled\", \"tooltipPlacement\", \"tooltipType\", \"tooltipTitle\", \"tooltipTemplate\", \"tooltipContext\"], [1, \"tooltip-bar\"]],\n template: function CircleSeriesComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, CircleSeriesComponent__svg_g_0_Template, 6, 22, \"g\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", ctx.circle);\n }\n },\n dependencies: [i1.NgIf, TooltipDirective, CircleComponent, SvgLinearGradientComponent],\n encapsulation: 2,\n data: {\n animation: [trigger('animationState', [transition(':enter', [style({\n opacity: 0\n }), animate(250, style({\n opacity: 1\n }))])])]\n },\n changeDetection: 0\n });\n }\n }\n return CircleSeriesComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet GridPanelComponent = /*#__PURE__*/(() => {\n class GridPanelComponent {\n static {\n this.ɵfac = function GridPanelComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || GridPanelComponent)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: GridPanelComponent,\n selectors: [[\"g\", \"ngx-charts-grid-panel\", \"\"]],\n inputs: {\n width: \"width\",\n height: \"height\",\n x: \"x\",\n y: \"y\"\n },\n standalone: false,\n attrs: _c13,\n decls: 1,\n vars: 4,\n consts: [[\"stroke\", \"none\", 1, \"gridpanel\"]],\n template: function GridPanelComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"rect\", 0);\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"height\", ctx.height)(\"width\", ctx.width)(\"x\", ctx.x)(\"y\", ctx.y);\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return GridPanelComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar ClassEnum = /*#__PURE__*/function (ClassEnum) {\n ClassEnum[\"Odd\"] = \"odd\";\n ClassEnum[\"Even\"] = \"even\";\n return ClassEnum;\n}(ClassEnum || {});\nlet GridPanelSeriesComponent = /*#__PURE__*/(() => {\n class GridPanelSeriesComponent {\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.gridPanels = this.getGridPanels();\n }\n getGridPanels() {\n return this.data.map(d => {\n let offset;\n let width;\n let height;\n let x;\n let y;\n let className = ClassEnum.Odd;\n if (this.orient === BarOrientation.Vertical) {\n const position = this.xScale(d.name);\n const positionIndex = Number.parseInt((position / this.xScale.step()).toString(), 10);\n if (positionIndex % 2 === 1) {\n className = ClassEnum.Even;\n }\n offset = this.xScale.bandwidth() * this.xScale.paddingInner();\n width = this.xScale.bandwidth() + offset;\n height = this.dims.height;\n x = this.xScale(d.name) - offset / 2;\n y = 0;\n } else if (this.orient === BarOrientation.Horizontal) {\n const position = this.yScale(d.name);\n const positionIndex = Number.parseInt((position / this.yScale.step()).toString(), 10);\n if (positionIndex % 2 === 1) {\n className = ClassEnum.Even;\n }\n offset = this.yScale.bandwidth() * this.yScale.paddingInner();\n width = this.dims.width;\n height = this.yScale.bandwidth() + offset;\n x = 0;\n y = this.yScale(d.name) - offset / 2;\n }\n return {\n name: d.name,\n class: className,\n height,\n width,\n x,\n y\n };\n });\n }\n static {\n this.ɵfac = function GridPanelSeriesComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || GridPanelSeriesComponent)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: GridPanelSeriesComponent,\n selectors: [[\"g\", \"ngx-charts-grid-panel-series\", \"\"]],\n inputs: {\n data: \"data\",\n dims: \"dims\",\n xScale: \"xScale\",\n yScale: \"yScale\",\n orient: \"orient\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n attrs: _c14,\n decls: 1,\n vars: 1,\n consts: [[\"ngx-charts-grid-panel\", \"\", 3, \"height\", \"width\", \"x\", \"y\", \"grid-panel\", \"odd\", \"even\", 4, \"ngFor\", \"ngForOf\"], [\"ngx-charts-grid-panel\", \"\", 3, \"height\", \"width\", \"x\", \"y\"]],\n template: function GridPanelSeriesComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, GridPanelSeriesComponent__svg_g_0_Template, 1, 10, \"g\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngForOf\", ctx.gridPanels);\n }\n },\n dependencies: [i1.NgForOf, GridPanelComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return GridPanelSeriesComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SvgRadialGradientComponent = /*#__PURE__*/(() => {\n class SvgRadialGradientComponent {\n constructor() {\n this.endOpacity = 1;\n this.cx = 0;\n this.cy = 0;\n }\n get stops() {\n return this.stopsInput || this.stopsDefault;\n }\n set stops(value) {\n this.stopsInput = value;\n }\n ngOnChanges(changes) {\n this.r = '30%';\n if ('color' in changes || 'startOpacity' in changes || 'endOpacity' in changes) {\n this.stopsDefault = [{\n offset: 0,\n color: this.color,\n opacity: this.startOpacity\n }, {\n offset: 100,\n color: this.color,\n opacity: this.endOpacity\n }];\n }\n }\n static {\n this.ɵfac = function SvgRadialGradientComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || SvgRadialGradientComponent)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: SvgRadialGradientComponent,\n selectors: [[\"g\", \"ngx-charts-svg-radial-gradient\", \"\"]],\n inputs: {\n color: \"color\",\n name: \"name\",\n startOpacity: \"startOpacity\",\n endOpacity: \"endOpacity\",\n cx: \"cx\",\n cy: \"cy\",\n stops: \"stops\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n attrs: _c15,\n decls: 2,\n vars: 5,\n consts: [[\"gradientUnits\", \"userSpaceOnUse\", 3, \"id\"], [3, \"stop-color\", \"stop-opacity\", 4, \"ngFor\", \"ngForOf\"]],\n template: function SvgRadialGradientComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"radialGradient\", 0);\n i0.ɵɵtemplate(1, SvgRadialGradientComponent__svg_stop_1_Template, 1, 5, \"stop\", 1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"id\", ctx.name);\n i0.ɵɵattribute(\"cx\", ctx.cx)(\"cy\", ctx.cy)(\"r\", ctx.r);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx.stops);\n }\n },\n dependencies: [i1.NgForOf],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return SvgRadialGradientComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AreaComponent = /*#__PURE__*/(() => {\n class AreaComponent {\n constructor(element) {\n this.opacity = 1;\n this.startOpacity = 0.5;\n this.endOpacity = 1;\n this.gradient = false;\n this.animations = true;\n this.select = new EventEmitter();\n this.animationsLoaded = false;\n this.hasGradient = false;\n this.barOrientation = BarOrientation;\n this.element = element.nativeElement;\n }\n ngOnChanges() {\n this.update();\n if (!this.animationsLoaded) {\n this.loadAnimation();\n this.animationsLoaded = true;\n }\n }\n update() {\n this.gradientId = 'grad' + id().toString();\n this.gradientFill = `url(#${this.gradientId})`;\n if (this.gradient || this.stops) {\n this.gradientStops = this.getGradient();\n this.hasGradient = true;\n } else {\n this.hasGradient = false;\n }\n this.updatePathEl();\n }\n loadAnimation() {\n this.areaPath = this.startingPath;\n setTimeout(this.updatePathEl.bind(this), 100);\n }\n updatePathEl() {\n const node = select(this.element).select('.area');\n if (this.animations) {\n node.transition().duration(750).attr('d', this.path);\n } else {\n node.attr('d', this.path);\n }\n }\n getGradient() {\n if (this.stops) {\n return this.stops;\n }\n return [{\n offset: 0,\n color: this.fill,\n opacity: this.startOpacity\n }, {\n offset: 100,\n color: this.fill,\n opacity: this.endOpacity\n }];\n }\n static {\n this.ɵfac = function AreaComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || AreaComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: AreaComponent,\n selectors: [[\"g\", \"ngx-charts-area\", \"\"]],\n inputs: {\n data: \"data\",\n path: \"path\",\n startingPath: \"startingPath\",\n fill: \"fill\",\n opacity: \"opacity\",\n startOpacity: \"startOpacity\",\n endOpacity: \"endOpacity\",\n gradient: \"gradient\",\n stops: \"stops\",\n animations: \"animations\"\n },\n outputs: {\n select: \"select\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n attrs: _c16,\n decls: 2,\n vars: 5,\n consts: [[4, \"ngIf\"], [1, \"area\"], [\"ngx-charts-svg-linear-gradient\", \"\", 3, \"orientation\", \"name\", \"stops\"]],\n template: function AreaComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, AreaComponent__svg_defs_0_Template, 2, 3, \"defs\", 0);\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(1, \"path\", 1);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", ctx.gradient);\n i0.ɵɵadvance();\n i0.ɵɵstyleProp(\"opacity\", ctx.opacity);\n i0.ɵɵattribute(\"d\", ctx.areaPath)(\"fill\", ctx.gradient ? ctx.gradientFill : ctx.fill);\n }\n },\n dependencies: [i1.NgIf, SvgLinearGradientComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return AreaComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// Robert Penner's easeOutExpo\nfunction easeOutExpo(t, b, c, d) {\n return c * (-Math.pow(2, -10 * t / d) + 1) * 1024 / 1023 + b;\n}\n/**\n * Counts from a number to the end incrementally.\n */\nfunction count(countFrom, countTo, countDecimals, countDuration, callback) {\n const startVal = Number(countFrom);\n const endVal = Number(countTo);\n const countDown = startVal > endVal;\n const decimals = Math.max(0, countDecimals);\n const dec = Math.pow(10, decimals);\n const duration = Number(countDuration) * 1000;\n let startTime;\n function runCount(timestamp) {\n let frameVal;\n const progress = timestamp - startTime;\n if (countDown) {\n frameVal = startVal - easeOutExpo(progress, 0, startVal - endVal, duration);\n } else {\n frameVal = easeOutExpo(progress, startVal, endVal - startVal, duration);\n }\n if (countDown) {\n frameVal = frameVal < endVal ? endVal : frameVal;\n } else {\n frameVal = frameVal > endVal ? endVal : frameVal;\n }\n frameVal = Math.round(frameVal * dec) / dec;\n const tick = progress < duration;\n callback({\n value: frameVal,\n progress,\n timestamp,\n finished: !tick\n });\n if (tick) {\n return requestAnimationFrame(val => runCount(val));\n }\n }\n return requestAnimationFrame(timestamp => {\n startTime = timestamp;\n return runCount(timestamp);\n });\n}\n/**\n * Determine decimals places\n *\n * @export\n */\nfunction decimalChecker(countTo) {\n const endVal = Number(countTo);\n if (endVal % 1 !== 0 && Math.abs(endVal) <= 10) {\n return 2;\n }\n return 0;\n}\n\n/**\n * Count up component\n *\n * Loosely inspired by:\n * - https://github.com/izupet/angular2-counto\n * - https://inorganik.github.io/countUp.js/\n *\n * @export\n */\nlet CountUpDirective = /*#__PURE__*/(() => {\n class CountUpDirective {\n set countDecimals(val) {\n this._countDecimals = val;\n }\n get countDecimals() {\n if (this._countDecimals) return this._countDecimals;\n return decimalChecker(this.countTo);\n }\n set countTo(val) {\n this._countTo = parseFloat(val);\n this.start();\n }\n get countTo() {\n return this._countTo;\n }\n set countFrom(val) {\n this._countFrom = parseFloat(val);\n this.start();\n }\n get countFrom() {\n return this._countFrom;\n }\n constructor(cd, element) {\n this.cd = cd;\n this.countDuration = 1;\n this.countPrefix = '';\n this.countSuffix = '';\n this.countChange = new EventEmitter();\n this.countFinish = new EventEmitter();\n this.value = '';\n this._countDecimals = 0;\n this._countTo = 0;\n this._countFrom = 0;\n this.nativeElement = element.nativeElement;\n }\n ngOnDestroy() {\n cancelAnimationFrame(this.animationReq);\n }\n start() {\n cancelAnimationFrame(this.animationReq);\n const valueFormatting = this.valueFormatting || (value => `${this.countPrefix}${value.toLocaleString()}${this.countSuffix}`);\n const callback = ({\n value,\n progress,\n finished\n }) => {\n this.value = valueFormatting(value);\n this.cd.markForCheck();\n if (!finished) this.countChange.emit({\n value: this.value,\n progress\n });\n if (finished) this.countFinish.emit({\n value: this.value,\n progress\n });\n };\n this.animationReq = count(this.countFrom, this.countTo, this.countDecimals, this.countDuration, callback);\n }\n static {\n this.ɵfac = function CountUpDirective_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || CountUpDirective)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: CountUpDirective,\n selectors: [[\"\", \"ngx-charts-count-up\", \"\"]],\n inputs: {\n countDuration: \"countDuration\",\n countPrefix: \"countPrefix\",\n countSuffix: \"countSuffix\",\n valueFormatting: \"valueFormatting\",\n countDecimals: \"countDecimals\",\n countTo: \"countTo\",\n countFrom: \"countFrom\"\n },\n outputs: {\n countChange: \"countChange\",\n countFinish: \"countFinish\"\n },\n standalone: false,\n attrs: _c17,\n decls: 1,\n vars: 1,\n template: function CountUpDirective_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtext(0);\n }\n if (rf & 2) {\n i0.ɵɵtextInterpolate1(\" \", ctx.value, \" \");\n }\n },\n encapsulation: 2\n });\n }\n }\n return CountUpDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// If we don't check whether 'window' and 'global' variables are defined,\n// code will fail in browser/node with 'variable is undefined' error.\nlet root;\nif (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n}\n// tslint:disable-next-line:variable-name\nconst MouseEvent = root.MouseEvent;\nfunction createMouseEvent(name, bubbles = false, cancelable = true) {\n // Calling new of an event does not work correctly on IE. The following is a tested workaround\n // See https://stackoverflow.com/questions/27176983/dispatchevent-not-working-in-ie11\n if (typeof MouseEvent === 'function') {\n // Sane browsers\n return new MouseEvent(name, {\n bubbles,\n cancelable\n });\n } else {\n // IE\n const event = document.createEvent('MouseEvent');\n event.initEvent(name, bubbles, cancelable);\n return event;\n }\n}\nlet TooltipArea = /*#__PURE__*/(() => {\n class TooltipArea {\n constructor(platformId) {\n this.platformId = platformId;\n this.anchorOpacity = 0;\n this.anchorPos = -1;\n this.anchorValues = [];\n this.placementTypes = PlacementTypes;\n this.styleTypes = StyleTypes;\n this.showPercentage = false;\n this.tooltipDisabled = false;\n this.hover = new EventEmitter();\n }\n getValues(xVal) {\n const results = [];\n for (const group of this.results) {\n const item = group.series.find(d => d.name.toString() === xVal.toString());\n let groupName = group.name;\n if (groupName instanceof Date) {\n groupName = groupName.toLocaleDateString();\n }\n if (item) {\n const label = item.name;\n let val = item.value;\n if (this.showPercentage) {\n val = (item.d1 - item.d0).toFixed(2) + '%';\n }\n let color;\n if (this.colors.scaleType === ScaleType.Linear) {\n let v = val;\n if (item.d1) {\n v = item.d1;\n }\n color = this.colors.getColor(v);\n } else {\n color = this.colors.getColor(group.name);\n }\n const data = Object.assign({}, item, {\n value: val,\n name: label,\n series: groupName,\n min: item.min,\n max: item.max,\n color\n });\n results.push(data);\n }\n }\n return results;\n }\n mouseMove(event) {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n const xPos = event.pageX - event.target.getBoundingClientRect().left;\n const closestIndex = this.findClosestPointIndex(xPos);\n const closestPoint = this.xSet[closestIndex];\n this.anchorPos = this.xScale(closestPoint);\n this.anchorPos = Math.max(0, this.anchorPos);\n this.anchorPos = Math.min(this.dims.width, this.anchorPos);\n this.anchorValues = this.getValues(closestPoint);\n if (this.anchorPos !== this.lastAnchorPos) {\n const ev = createMouseEvent('mouseleave');\n this.tooltipAnchor.nativeElement.dispatchEvent(ev);\n this.anchorOpacity = 0.7;\n this.hover.emit({\n value: closestPoint\n });\n this.showTooltip();\n this.lastAnchorPos = this.anchorPos;\n }\n }\n findClosestPointIndex(xPos) {\n let minIndex = 0;\n let maxIndex = this.xSet.length - 1;\n let minDiff = Number.MAX_VALUE;\n let closestIndex = 0;\n while (minIndex <= maxIndex) {\n const currentIndex = (minIndex + maxIndex) / 2 | 0;\n const currentElement = this.xScale(this.xSet[currentIndex]);\n const curDiff = Math.abs(currentElement - xPos);\n if (curDiff < minDiff) {\n minDiff = curDiff;\n closestIndex = currentIndex;\n }\n if (currentElement < xPos) {\n minIndex = currentIndex + 1;\n } else if (currentElement > xPos) {\n maxIndex = currentIndex - 1;\n } else {\n minDiff = 0;\n closestIndex = currentIndex;\n break;\n }\n }\n return closestIndex;\n }\n showTooltip() {\n const event = createMouseEvent('mouseenter');\n this.tooltipAnchor.nativeElement.dispatchEvent(event);\n }\n hideTooltip() {\n const event = createMouseEvent('mouseleave');\n this.tooltipAnchor.nativeElement.dispatchEvent(event);\n this.anchorOpacity = 0;\n this.lastAnchorPos = -1;\n }\n getToolTipText(tooltipItem) {\n let result = '';\n if (tooltipItem.series !== undefined) {\n result += tooltipItem.series;\n } else {\n result += '???';\n }\n result += ': ';\n if (tooltipItem.value !== undefined) {\n result += tooltipItem.value.toLocaleString();\n }\n if (tooltipItem.min !== undefined || tooltipItem.max !== undefined) {\n result += ' (';\n if (tooltipItem.min !== undefined) {\n if (tooltipItem.max === undefined) {\n result += '≥';\n }\n result += tooltipItem.min.toLocaleString();\n if (tooltipItem.max !== undefined) {\n result += ' - ';\n }\n } else if (tooltipItem.max !== undefined) {\n result += '≤';\n }\n if (tooltipItem.max !== undefined) {\n result += tooltipItem.max.toLocaleString();\n }\n result += ')';\n }\n return result;\n }\n static {\n this.ɵfac = function TooltipArea_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || TooltipArea)(i0.ɵɵdirectiveInject(PLATFORM_ID));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TooltipArea,\n selectors: [[\"g\", \"ngx-charts-tooltip-area\", \"\"]],\n viewQuery: function TooltipArea_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c18, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tooltipAnchor = _t.first);\n }\n },\n inputs: {\n dims: \"dims\",\n xSet: \"xSet\",\n xScale: \"xScale\",\n yScale: \"yScale\",\n results: \"results\",\n colors: \"colors\",\n showPercentage: \"showPercentage\",\n tooltipDisabled: \"tooltipDisabled\",\n tooltipTemplate: \"tooltipTemplate\"\n },\n outputs: {\n hover: \"hover\"\n },\n standalone: false,\n attrs: _c19,\n decls: 6,\n vars: 18,\n consts: [[\"defaultTooltipTemplate\", \"\"], [\"tooltipAnchor\", \"\"], [\"y\", \"0\", 1, \"tooltip-area\", 2, \"opacity\", \"0\", \"cursor\", \"'auto'\", 3, \"mousemove\", \"mouseleave\"], [\"y\", \"0\", \"ngx-tooltip\", \"\", 1, \"tooltip-anchor\", 3, \"tooltipDisabled\", \"tooltipPlacement\", \"tooltipType\", \"tooltipSpacing\", \"tooltipTemplate\", \"tooltipContext\", \"tooltipImmediateExit\"], [1, \"area-tooltip-container\"], [\"class\", \"tooltip-item\", 4, \"ngFor\", \"ngForOf\"], [1, \"tooltip-item\"], [1, \"tooltip-item-color\"]],\n template: function TooltipArea_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\")(1, \"rect\", 2);\n i0.ɵɵlistener(\"mousemove\", function TooltipArea_Template_rect_mousemove_1_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.mouseMove($event));\n })(\"mouseleave\", function TooltipArea_Template_rect_mouseleave_1_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.hideTooltip());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(2, TooltipArea__svg_ng_template_2_Template, 2, 1, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelement(4, \"rect\", 3, 1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const defaultTooltipTemplate_r5 = i0.ɵɵreference(3);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"x\", 0)(\"width\", ctx.dims.width)(\"height\", ctx.dims.height);\n i0.ɵɵadvance(3);\n i0.ɵɵstyleProp(\"opacity\", ctx.anchorOpacity)(\"pointer-events\", \"none\");\n i0.ɵɵproperty(\"@animationState\", ctx.anchorOpacity !== 0 ? \"active\" : \"inactive\")(\"tooltipDisabled\", ctx.tooltipDisabled)(\"tooltipPlacement\", ctx.placementTypes.Right)(\"tooltipType\", ctx.styleTypes.tooltip)(\"tooltipSpacing\", 15)(\"tooltipTemplate\", ctx.tooltipTemplate ? ctx.tooltipTemplate : defaultTooltipTemplate_r5)(\"tooltipContext\", ctx.anchorValues)(\"tooltipImmediateExit\", true);\n i0.ɵɵattribute(\"x\", ctx.anchorPos)(\"width\", 1)(\"height\", ctx.dims.height);\n }\n },\n dependencies: [i1.NgForOf, TooltipDirective],\n encapsulation: 2,\n data: {\n animation: [trigger('animationState', [transition('inactive => active', [style({\n opacity: 0\n }), animate(250, style({\n opacity: 0.7\n }))]), transition('active => inactive', [style({\n opacity: 0.7\n }), animate(250, style({\n opacity: 0\n }))])])]\n },\n changeDetection: 0\n });\n }\n }\n return TooltipArea;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet Timeline = /*#__PURE__*/(() => {\n class Timeline {\n constructor(element, cd) {\n this.cd = cd;\n this.height = 50;\n this.select = new EventEmitter();\n this.onDomainChange = new EventEmitter();\n this.initialized = false;\n this.element = element.nativeElement;\n }\n ngOnChanges(changes) {\n this.update();\n if (!this.initialized) {\n this.addBrush();\n this.initialized = true;\n }\n }\n update() {\n this.dims = this.getDims();\n this.height = this.dims.height;\n const offsetY = this.view[1] - this.height;\n this.xDomain = this.getXDomain();\n this.xScale = this.getXScale();\n if (this.brush) {\n this.updateBrush();\n }\n this.transform = `translate(0 , ${offsetY})`;\n this.filterId = 'filter' + id().toString();\n this.filter = `url(#${this.filterId})`;\n this.cd.markForCheck();\n }\n getXDomain() {\n let values = [];\n for (const results of this.results) {\n for (const d of results.series) {\n if (!values.includes(d.name)) {\n values.push(d.name);\n }\n }\n }\n let domain = [];\n if (this.scaleType === ScaleType.Time) {\n const min = Math.min(...values);\n const max = Math.max(...values);\n domain = [min, max];\n } else if (this.scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n const min = Math.min(...values);\n const max = Math.max(...values);\n domain = [min, max];\n } else {\n domain = values;\n }\n return domain;\n }\n getXScale() {\n let scale;\n if (this.scaleType === ScaleType.Time) {\n scale = scaleTime().range([0, this.dims.width]).domain(this.xDomain);\n } else if (this.scaleType === ScaleType.Linear) {\n scale = scaleLinear().range([0, this.dims.width]).domain(this.xDomain);\n } else if (this.scaleType === ScaleType.Ordinal) {\n scale = scalePoint().range([0, this.dims.width]).padding(0.1).domain(this.xDomain);\n }\n return scale;\n }\n addBrush() {\n if (this.brush) return;\n const height = this.height;\n const width = this.view[0];\n this.brush = brushX().extent([[0, 0], [width, height]]).on('brush end', ({\n selection\n }) => {\n const newSelection = selection || this.xScale.range();\n const newDomain = newSelection.map(this.xScale.invert);\n this.onDomainChange.emit(newDomain);\n this.cd.markForCheck();\n });\n select(this.element).select('.brush').call(this.brush);\n }\n updateBrush() {\n if (!this.brush) return;\n const height = this.height;\n const width = this.view[0];\n this.brush.extent([[0, 0], [width, height]]);\n select(this.element).select('.brush').call(this.brush);\n // clear hardcoded properties so they can be defined by CSS\n select(this.element).select('.selection').attr('fill', undefined).attr('stroke', undefined).attr('fill-opacity', undefined);\n this.cd.markForCheck();\n }\n getDims() {\n const width = this.view[0];\n const dims = {\n width,\n height: this.height\n };\n return dims;\n }\n static {\n this.ɵfac = function Timeline_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || Timeline)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: Timeline,\n selectors: [[\"g\", \"ngx-charts-timeline\", \"\"]],\n inputs: {\n view: \"view\",\n results: \"results\",\n scheme: \"scheme\",\n customColors: \"customColors\",\n legend: \"legend\",\n autoScale: \"autoScale\",\n scaleType: \"scaleType\",\n height: \"height\"\n },\n outputs: {\n select: \"select\",\n onDomainChange: \"onDomainChange\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n attrs: _c20,\n ngContentSelectors: _c2,\n decls: 7,\n vars: 4,\n consts: [[1, \"timeline\"], [\"in\", \"SourceGraphic\", \"type\", \"matrix\", \"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\"], [1, \"embedded-chart\"], [\"x\", \"0\", \"y\", \"0\", 1, \"brush-background\"], [1, \"brush\"]],\n template: function Timeline_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"g\", 0)(1, \"filter\");\n i0.ɵɵelement(2, \"feColorMatrix\", 1);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"g\", 2);\n i0.ɵɵprojection(4);\n i0.ɵɵelementEnd();\n i0.ɵɵelement(5, \"rect\", 3)(6, \"g\", 4);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"transform\", ctx.transform);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"id\", ctx.filterId);\n i0.ɵɵadvance(4);\n i0.ɵɵattribute(\"width\", ctx.view[0])(\"height\", ctx.height);\n }\n },\n styles: [\".timeline .brush-background{fill:#0000000d}.timeline .brush .selection{fill:#0000001a;stroke-width:1px;stroke:#888}.timeline .brush .handle{fill-opacity:0}.timeline .embedded-chart{opacity:.6}\\n\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return Timeline;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AdvancedLegendComponent = /*#__PURE__*/(() => {\n class AdvancedLegendComponent {\n constructor() {\n this.label = 'Total';\n this.animations = true;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.legendItems = [];\n this.labelFormatting = label => label;\n this.percentageFormatting = percentage => percentage;\n this.defaultValueFormatting = value => value.toLocaleString();\n }\n ngOnChanges(changes) {\n this.update();\n }\n getTotal() {\n return this.data.map(d => Number(d.value)).reduce((sum, d) => sum + d, 0);\n }\n update() {\n this.total = this.getTotal();\n this.roundedTotal = this.total;\n this.legendItems = this.getLegendItems();\n }\n getLegendItems() {\n return this.data.map(d => {\n const label = formatLabel(d.name);\n const value = d.value;\n const color = this.colors.getColor(label);\n const percentage = this.total > 0 ? value / this.total * 100 : 0;\n const formattedLabel = typeof this.labelFormatting === 'function' ? this.labelFormatting(label) : label;\n return {\n _value: value,\n data: d,\n value,\n color,\n label: formattedLabel,\n displayLabel: trimLabel(formattedLabel, 20),\n origialLabel: d.name,\n percentage: this.percentageFormatting ? this.percentageFormatting(percentage) : percentage.toLocaleString()\n };\n });\n }\n trackBy(index, item) {\n return item.label;\n }\n static {\n this.ɵfac = function AdvancedLegendComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || AdvancedLegendComponent)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: AdvancedLegendComponent,\n selectors: [[\"ngx-charts-advanced-legend\"]],\n inputs: {\n width: \"width\",\n data: \"data\",\n colors: \"colors\",\n label: \"label\",\n animations: \"animations\",\n valueFormatting: \"valueFormatting\",\n labelFormatting: \"labelFormatting\",\n percentageFormatting: \"percentageFormatting\"\n },\n outputs: {\n select: \"select\",\n activate: \"activate\",\n deactivate: \"deactivate\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n decls: 8,\n vars: 7,\n consts: [[1, \"advanced-pie-legend\"], [\"class\", \"total-value\", \"ngx-charts-count-up\", \"\", 3, \"countTo\", \"valueFormatting\", 4, \"ngIf\"], [\"class\", \"total-value\", 4, \"ngIf\"], [1, \"total-label\"], [1, \"legend-items-container\"], [1, \"legend-items\"], [\"tabindex\", \"-1\", \"class\", \"legend-item\", 3, \"mouseenter\", \"mouseleave\", \"click\", 4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [\"ngx-charts-count-up\", \"\", 1, \"total-value\", 3, \"countTo\", \"valueFormatting\"], [1, \"total-value\"], [\"tabindex\", \"-1\", 1, \"legend-item\", 3, \"mouseenter\", \"mouseleave\", \"click\"], [1, \"item-color\"], [\"class\", \"item-value\", \"ngx-charts-count-up\", \"\", 3, \"countTo\", \"valueFormatting\", 4, \"ngIf\"], [\"class\", \"item-value\", 4, \"ngIf\"], [1, \"item-label\"], [\"class\", \"item-percent\", \"ngx-charts-count-up\", \"\", 3, \"countTo\", \"countSuffix\", 4, \"ngIf\"], [\"class\", \"item-percent\", 4, \"ngIf\"], [\"ngx-charts-count-up\", \"\", 1, \"item-value\", 3, \"countTo\", \"valueFormatting\"], [1, \"item-value\"], [\"ngx-charts-count-up\", \"\", 1, \"item-percent\", 3, \"countTo\", \"countSuffix\"], [1, \"item-percent\"]],\n template: function AdvancedLegendComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵtemplate(1, AdvancedLegendComponent_div_1_Template, 1, 2, \"div\", 1)(2, AdvancedLegendComponent_div_2_Template, 2, 1, \"div\", 2);\n i0.ɵɵelementStart(3, \"div\", 3);\n i0.ɵɵtext(4);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(5, \"div\", 4)(6, \"div\", 5);\n i0.ɵɵtemplate(7, AdvancedLegendComponent_div_7_Template, 8, 7, \"div\", 6);\n i0.ɵɵelementEnd()()();\n }\n if (rf & 2) {\n i0.ɵɵstyleProp(\"width\", ctx.width, \"px\");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.animations);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx.animations);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", ctx.label, \" \");\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngForOf\", ctx.legendItems)(\"ngForTrackBy\", ctx.trackBy);\n }\n },\n dependencies: [i1.NgForOf, i1.NgIf, CountUpDirective],\n styles: [\".advanced-pie-legend{float:left;position:relative;top:50%;transform:translateY(-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:none}.advanced-pie-legend .legend-items-container .legend-items .legend-item:hover{color:#000;-webkit-transition:.2s;-moz-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}\\n\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return AdvancedLegendComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst COMPONENTS = [AreaComponent, BaseChartComponent, CountUpDirective, TooltipArea, ChartComponent, LegendComponent, LegendEntryComponent, ScaleLegendComponent, CircleComponent, CircleSeriesComponent, GridPanelComponent, GridPanelSeriesComponent, SvgLinearGradientComponent, SvgRadialGradientComponent, Timeline, AdvancedLegendComponent];\nlet ChartCommonModule = /*#__PURE__*/(() => {\n class ChartCommonModule {\n static {\n this.ɵfac = function ChartCommonModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || ChartCommonModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: ChartCommonModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [CommonModule, AxesModule, TooltipModule, CommonModule, AxesModule, TooltipModule]\n });\n }\n }\n return ChartCommonModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction calculateViewDimensions({\n width,\n height,\n margins,\n showXAxis = false,\n showYAxis = false,\n xAxisHeight = 0,\n yAxisWidth = 0,\n showXLabel = false,\n showYLabel = false,\n showLegend = false,\n legendType = ScaleType.Ordinal,\n legendPosition = LegendPosition.Right,\n columns = 12\n}) {\n let xOffset = margins[3];\n let chartWidth = width;\n let chartHeight = height - margins[0] - margins[2];\n if (showLegend && legendPosition === LegendPosition.Right) {\n if (legendType === ScaleType.Ordinal) {\n columns -= 2;\n } else {\n columns -= 1;\n }\n }\n chartWidth = chartWidth * columns / 12;\n chartWidth = chartWidth - margins[1] - margins[3];\n if (showXAxis) {\n chartHeight -= 5;\n chartHeight -= xAxisHeight;\n if (showXLabel) {\n // text height + spacing between axis label and tick labels\n const offset = 25 + 5;\n chartHeight -= offset;\n }\n }\n if (showYAxis) {\n chartWidth -= 5;\n chartWidth -= yAxisWidth;\n xOffset += yAxisWidth;\n xOffset += 10;\n if (showYLabel) {\n // text height + spacing between axis label and tick labels\n const offset = 25 + 5;\n chartWidth -= offset;\n xOffset += offset;\n }\n }\n chartWidth = Math.max(0, chartWidth);\n chartHeight = Math.max(0, chartHeight);\n return {\n width: Math.floor(chartWidth),\n height: Math.floor(chartHeight),\n xOffset: Math.floor(xOffset)\n };\n}\nconst colorSets = [{\n name: 'vivid',\n selectable: true,\n group: ScaleType.Ordinal,\n domain: ['#647c8a', '#3f51b5', '#2196f3', '#00b862', '#afdf0a', '#a7b61a', '#f3e562', '#ff9800', '#ff5722', '#ff4514']\n}, {\n name: 'natural',\n selectable: true,\n group: ScaleType.Ordinal,\n domain: ['#bf9d76', '#e99450', '#d89f59', '#f2dfa7', '#a5d7c6', '#7794b1', '#afafaf', '#707160', '#ba9383', '#d9d5c3']\n}, {\n name: 'cool',\n selectable: true,\n group: ScaleType.Ordinal,\n domain: ['#a8385d', '#7aa3e5', '#a27ea8', '#aae3f5', '#adcded', '#a95963', '#8796c0', '#7ed3ed', '#50abcc', '#ad6886']\n}, {\n name: 'fire',\n selectable: true,\n group: ScaleType.Ordinal,\n domain: ['#ff3d00', '#bf360c', '#ff8f00', '#ff6f00', '#ff5722', '#e65100', '#ffca28', '#ffab00']\n}, {\n name: 'solar',\n selectable: true,\n group: ScaleType.Linear,\n domain: ['#fff8e1', '#ffecb3', '#ffe082', '#ffd54f', '#ffca28', '#ffc107', '#ffb300', '#ffa000', '#ff8f00', '#ff6f00']\n}, {\n name: 'air',\n selectable: true,\n group: ScaleType.Linear,\n domain: ['#e1f5fe', '#b3e5fc', '#81d4fa', '#4fc3f7', '#29b6f6', '#03a9f4', '#039be5', '#0288d1', '#0277bd', '#01579b']\n}, {\n name: 'aqua',\n selectable: true,\n group: ScaleType.Linear,\n domain: ['#e0f7fa', '#b2ebf2', '#80deea', '#4dd0e1', '#26c6da', '#00bcd4', '#00acc1', '#0097a7', '#00838f', '#006064']\n}, {\n name: 'flame',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: ['#A10A28', '#D3342D', '#EF6D49', '#FAAD67', '#FDDE90', '#DBED91', '#A9D770', '#6CBA67', '#2C9653', '#146738']\n}, {\n name: 'ocean',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: ['#1D68FB', '#33C0FC', '#4AFFFE', '#AFFFFF', '#FFFC63', '#FDBD2D', '#FC8A25', '#FA4F1E', '#FA141B', '#BA38D1']\n}, {\n name: 'forest',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: ['#55C22D', '#C1F33D', '#3CC099', '#AFFFFF', '#8CFC9D', '#76CFFA', '#BA60FB', '#EE6490', '#C42A1C', '#FC9F32']\n}, {\n name: 'horizon',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: ['#2597FB', '#65EBFD', '#99FDD0', '#FCEE4B', '#FEFCFA', '#FDD6E3', '#FCB1A8', '#EF6F7B', '#CB96E8', '#EFDEE0']\n}, {\n name: 'neons',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: ['#FF3333', '#FF33FF', '#CC33FF', '#0000FF', '#33CCFF', '#33FFFF', '#33FF66', '#CCFF33', '#FFCC00', '#FF6600']\n}, {\n name: 'picnic',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: ['#FAC51D', '#66BD6D', '#FAA026', '#29BB9C', '#E96B56', '#55ACD2', '#B7332F', '#2C83C9', '#9166B8', '#92E7E8']\n}, {\n name: 'night',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: ['#2B1B5A', '#501356', '#183356', '#28203F', '#391B3C', '#1E2B3C', '#120634', '#2D0432', '#051932', '#453080', '#75267D', '#2C507D', '#4B3880', '#752F7D', '#35547D']\n}, {\n name: 'nightLights',\n selectable: false,\n group: ScaleType.Ordinal,\n domain: ['#4e31a5', '#9c25a7', '#3065ab', '#57468b', '#904497', '#46648b', '#32118d', '#a00fb3', '#1052a2', '#6e51bd', '#b63cc3', '#6c97cb', '#8671c1', '#b455be', '#7496c3']\n}];\nclass ColorHelper {\n constructor(scheme, type, domain, customColors) {\n if (typeof scheme === 'string') {\n scheme = colorSets.find(cs => {\n return cs.name === scheme;\n });\n }\n this.colorDomain = scheme.domain;\n this.scaleType = type;\n this.domain = domain;\n this.customColors = customColors;\n this.scale = this.generateColorScheme(scheme, type, this.domain);\n }\n generateColorScheme(scheme, type, domain) {\n if (typeof scheme === 'string') {\n scheme = colorSets.find(cs => {\n return cs.name === scheme;\n });\n }\n let colorScale;\n switch (type) {\n case ScaleType.Quantile:\n colorScale = scaleQuantile().range(scheme.domain).domain(domain);\n break;\n case ScaleType.Ordinal:\n colorScale = scaleOrdinal().range(scheme.domain).domain(domain);\n break;\n case ScaleType.Linear:\n {\n const colorDomain = [...scheme.domain];\n if (colorDomain.length === 1) {\n colorDomain.push(colorDomain[0]);\n this.colorDomain = colorDomain;\n }\n const points = range(0, 1, 1.0 / colorDomain.length);\n colorScale = scaleLinear().range(colorDomain).domain(points);\n }\n break;\n default:\n break;\n }\n return colorScale;\n }\n getColor(value) {\n if (value === undefined || value === null) {\n throw new Error('Value can not be null');\n }\n if (this.scaleType === ScaleType.Linear) {\n const valueScale = scaleLinear().domain(this.domain).range([0, 1]);\n return this.scale(valueScale(value));\n } else {\n if (typeof this.customColors === 'function') {\n return this.customColors(value);\n }\n const formattedValue = value.toString();\n let found; // todo type customColors\n if (this.customColors && this.customColors.length > 0) {\n found = this.customColors.find(mapping => {\n return mapping.name.toLowerCase() === formattedValue.toLowerCase();\n });\n }\n if (found) {\n return found.value;\n } else {\n return this.scale(value);\n }\n }\n }\n getLinearGradientStops(value, start) {\n if (start === undefined) {\n start = this.domain[0];\n }\n const valueScale = scaleLinear().domain(this.domain).range([0, 1]);\n const colorValueScale = scaleBand().domain(this.colorDomain).range([0, 1]);\n const endColor = this.getColor(value);\n // generate the stops\n const startVal = valueScale(start);\n const startColor = this.getColor(start);\n const endVal = valueScale(value);\n let i = 1;\n let currentVal = startVal;\n const stops = [];\n stops.push({\n color: startColor,\n offset: startVal,\n originalOffset: startVal,\n opacity: 1\n });\n while (currentVal < endVal && i < this.colorDomain.length) {\n const color = this.colorDomain[i];\n const offset = colorValueScale(color);\n if (offset <= startVal) {\n i++;\n continue;\n }\n if (offset.toFixed(4) >= (endVal - colorValueScale.bandwidth()).toFixed(4)) {\n break;\n }\n stops.push({\n color,\n offset,\n opacity: 1\n });\n currentVal = offset;\n i++;\n }\n if (stops[stops.length - 1].offset < 100) {\n stops.push({\n color: endColor,\n offset: endVal,\n opacity: 1\n });\n }\n if (endVal === startVal) {\n stops[0].offset = 0;\n stops[1].offset = 100;\n } else {\n // normalize the offsets into percentages\n if (stops[stops.length - 1].offset !== 100) {\n for (const s of stops) {\n s.offset = (s.offset - startVal) / (endVal - startVal) * 100;\n }\n }\n }\n return stops;\n }\n}\n\n/**\n * Based on the data, return an array with unique values.\n *\n * @export\n * @returns array\n */\nfunction getUniqueXDomainValues(results) {\n const valueSet = new Set();\n for (const result of results) {\n for (const d of result.series) {\n valueSet.add(d.name);\n }\n }\n return Array.from(valueSet);\n}\n/**\n * Get the scaleType of enumerable of values.\n * @returns 'time', 'linear' or 'ordinal'\n */\nfunction getScaleType(values, checkDateType = true) {\n if (checkDateType) {\n const allDates = values.every(value => value instanceof Date);\n if (allDates) {\n return ScaleType.Time;\n }\n }\n const allNumbers = values.every(value => typeof value === 'number');\n if (allNumbers) {\n return ScaleType.Linear;\n }\n return ScaleType.Ordinal;\n}\nfunction getXDomainArray(values, xScaleMin, xScaleMax) {\n const scaleType = getScaleType(values);\n let xSet = [];\n let domain = [];\n if (scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n }\n let min;\n let max;\n if (scaleType === ScaleType.Time || scaleType === ScaleType.Linear) {\n const mappedValues = values.map(v => Number(v));\n min = xScaleMin ? xScaleMin : Math.min(...mappedValues);\n max = xScaleMax ? xScaleMax : Math.max(...mappedValues);\n }\n if (scaleType === ScaleType.Time) {\n domain = [new Date(min), new Date(max)];\n xSet = [...values].sort((a, b) => {\n const aDate = a.getTime();\n const bDate = b.getTime();\n if (aDate > bDate) return 1;\n if (bDate > aDate) return -1;\n return 0;\n });\n } else if (scaleType === ScaleType.Linear) {\n domain = [min, max];\n // Use compare function to sort numbers numerically\n xSet = [...values].sort((a, b) => a - b);\n } else {\n domain = values;\n xSet = values;\n }\n return {\n domain,\n xSet,\n scaleType\n };\n}\nfunction sortLinear(data, property, direction = 'asc') {\n return data.sort((a, b) => {\n if (direction === 'asc') {\n return a[property] - b[property];\n } else {\n return b[property] - a[property];\n }\n });\n}\nfunction sortByDomain(data, property, direction = 'asc', domain) {\n return data.sort((a, b) => {\n const aVal = a[property];\n const bVal = b[property];\n const aIdx = domain.indexOf(aVal);\n const bIdx = domain.indexOf(bVal);\n if (direction === 'asc') {\n return aIdx - bIdx;\n } else {\n return bIdx - aIdx;\n }\n });\n}\nfunction sortByTime(data, property, direction = 'asc') {\n return data.sort((a, b) => {\n const aDate = a[property].getTime();\n const bDate = b[property].getTime();\n if (direction === 'asc') {\n if (aDate > bDate) return 1;\n if (bDate > aDate) return -1;\n return 0;\n } else {\n if (aDate > bDate) return -1;\n if (bDate > aDate) return 1;\n return 0;\n }\n });\n}\nlet AreaSeriesComponent = /*#__PURE__*/(() => {\n class AreaSeriesComponent {\n constructor() {\n this.baseValue = 'auto';\n this.stacked = false;\n this.normalized = false;\n this.animations = true;\n this.select = new EventEmitter();\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.updateGradient();\n let currentArea;\n let startingArea;\n const xProperty = d => {\n const label = d.name;\n return this.xScale(label);\n };\n if (this.stacked || this.normalized) {\n currentArea = area().x(xProperty).y0((d, i) => this.yScale(d.d0)).y1((d, i) => this.yScale(d.d1));\n startingArea = area().x(xProperty).y0(d => this.yScale.range()[0]).y1(d => this.yScale.range()[0]);\n } else {\n currentArea = area().x(xProperty).y0(() => this.baseValue === 'auto' ? this.yScale.range()[0] : this.yScale(this.baseValue)).y1(d => this.yScale(d.value));\n startingArea = area().x(xProperty).y0(d => this.baseValue === 'auto' ? this.yScale.range()[0] : this.yScale(this.baseValue)).y1(d => this.baseValue === 'auto' ? this.yScale.range()[0] : this.yScale(this.baseValue));\n }\n currentArea.curve(this.curve);\n startingArea.curve(this.curve);\n this.opacity = 0.8;\n let data = this.data.series;\n if (this.scaleType === ScaleType.Linear) {\n data = sortLinear(data, 'name');\n } else if (this.scaleType === ScaleType.Time) {\n data = sortByTime(data, 'name');\n } else {\n data = sortByDomain(data, 'name', 'asc', this.xScale.domain());\n }\n this.path = currentArea(data);\n this.startingPath = startingArea(data);\n }\n updateGradient() {\n if (this.colors.scaleType === ScaleType.Linear) {\n this.hasGradient = true;\n if (this.stacked || this.normalized) {\n const d0values = this.data.series.map(d => d.d0);\n const d1values = this.data.series.map(d => d.d1);\n const max = Math.max(...d1values);\n const min = Math.min(...d0values);\n this.gradientStops = this.colors.getLinearGradientStops(max, min);\n } else {\n const values = this.data.series.map(d => d.value);\n const max = Math.max(...values);\n this.gradientStops = this.colors.getLinearGradientStops(max);\n }\n } else {\n this.hasGradient = false;\n this.gradientStops = undefined;\n }\n }\n isActive(entry) {\n if (!this.activeEntries) return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name;\n });\n return item !== undefined;\n }\n isInactive(entry) {\n if (!this.activeEntries || this.activeEntries.length === 0) return false;\n const item = this.activeEntries.find(d => {\n return entry.name === d.name;\n });\n return item === undefined;\n }\n static {\n this.ɵfac = function AreaSeriesComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || AreaSeriesComponent)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: AreaSeriesComponent,\n selectors: [[\"g\", \"ngx-charts-area-series\", \"\"]],\n inputs: {\n data: \"data\",\n xScale: \"xScale\",\n yScale: \"yScale\",\n baseValue: \"baseValue\",\n colors: \"colors\",\n scaleType: \"scaleType\",\n stacked: \"stacked\",\n normalized: \"normalized\",\n gradient: \"gradient\",\n curve: \"curve\",\n activeEntries: \"activeEntries\",\n animations: \"animations\"\n },\n outputs: {\n select: \"select\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n attrs: _c21,\n decls: 1,\n vars: 12,\n consts: [[\"ngx-charts-area\", \"\", 1, \"area-series\", 3, \"data\", \"path\", \"fill\", \"stops\", \"startingPath\", \"opacity\", \"gradient\", \"animations\"]],\n template: function AreaSeriesComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelement(0, \"g\", 0);\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"active\", ctx.isActive(ctx.data))(\"inactive\", ctx.isInactive(ctx.data));\n i0.ɵɵproperty(\"data\", ctx.data)(\"path\", ctx.path)(\"fill\", ctx.colors.getColor(ctx.data.name))(\"stops\", ctx.gradientStops)(\"startingPath\", ctx.startingPath)(\"opacity\", ctx.opacity)(\"gradient\", ctx.gradient || ctx.hasGradient)(\"animations\", ctx.animations);\n }\n },\n dependencies: [AreaComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return AreaSeriesComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AreaChartComponent = /*#__PURE__*/(() => {\n class AreaChartComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.xAxis = false;\n this.yAxis = false;\n this.baseValue = 'auto';\n this.autoScale = false;\n this.timeline = false;\n this.showGridLines = true;\n this.curve = curveLinear;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.roundDomains = false;\n this.tooltipDisabled = false;\n this.wrapTicks = false;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.timelineHeight = 50;\n this.timelinePadding = 10;\n this.trackBy = (index, item) => {\n return item.name;\n };\n }\n update() {\n super.update();\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n if (this.timeline) {\n this.dims.height -= this.timelineHeight + this.margin[2] + this.timelinePadding;\n }\n this.xDomain = this.getXDomain();\n if (this.filteredDomain) {\n this.xDomain = this.filteredDomain;\n }\n this.yDomain = this.getYDomain();\n this.seriesDomain = this.getSeriesDomain();\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n this.yScale = this.getYScale(this.yDomain, this.dims.height);\n this.updateTimeline();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset}, ${this.margin[0]})`;\n this.clipPathId = 'clip' + id().toString();\n this.clipPath = `url(#${this.clipPathId})`;\n }\n updateTimeline() {\n if (this.timeline) {\n this.timelineWidth = this.dims.width;\n this.timelineXDomain = this.getXDomain();\n this.timelineXScale = this.getXScale(this.timelineXDomain, this.timelineWidth);\n this.timelineYScale = this.getYScale(this.yDomain, this.timelineHeight);\n this.timelineTransform = `translate(${this.dims.xOffset}, ${-this.margin[2]})`;\n }\n }\n getXDomain() {\n let values = getUniqueXDomainValues(this.results);\n this.scaleType = getScaleType(values);\n let domain = [];\n if (this.scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n }\n let min;\n let max;\n if (this.scaleType === ScaleType.Time || this.scaleType === ScaleType.Linear) {\n min = this.xScaleMin ? this.xScaleMin : Math.min(...values);\n max = this.xScaleMax ? this.xScaleMax : Math.max(...values);\n }\n if (this.scaleType === ScaleType.Time) {\n domain = [new Date(min), new Date(max)];\n this.xSet = [...values].sort((a, b) => {\n const aDate = a.getTime();\n const bDate = b.getTime();\n if (aDate > bDate) return 1;\n if (bDate > aDate) return -1;\n return 0;\n });\n } else if (this.scaleType === ScaleType.Linear) {\n domain = [min, max];\n // Use compare function to sort numbers numerically\n this.xSet = [...values].sort((a, b) => a - b);\n } else {\n domain = values;\n this.xSet = values;\n }\n return domain;\n }\n getYDomain() {\n const domain = [];\n for (const results of this.results) {\n for (const d of results.series) {\n if (!domain.includes(d.value)) {\n domain.push(d.value);\n }\n }\n }\n const values = [...domain];\n if (!this.autoScale) {\n values.push(0);\n }\n if (this.baseValue !== 'auto') {\n values.push(this.baseValue);\n }\n const min = this.yScaleMin ? this.yScaleMin : Math.min(...values);\n const max = this.yScaleMax ? this.yScaleMax : Math.max(...values);\n return [min, max];\n }\n getSeriesDomain() {\n return this.results.map(d => d.name);\n }\n getXScale(domain, width) {\n let scale;\n if (this.scaleType === ScaleType.Time) {\n scale = scaleTime();\n } else if (this.scaleType === ScaleType.Linear) {\n scale = scaleLinear();\n } else if (this.scaleType === ScaleType.Ordinal) {\n scale = scalePoint().padding(0.1);\n }\n scale.range([0, width]).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n getYScale(domain, height) {\n const scale = scaleLinear().range([height, 0]).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n getScaleType(values) {\n let date = true;\n let num = true;\n for (const value of values) {\n if (isDate(value)) {\n date = false;\n }\n if (isNumber(value)) {\n num = false;\n }\n }\n if (date) {\n return ScaleType.Time;\n }\n if (num) {\n return ScaleType.Linear;\n }\n return ScaleType.Ordinal;\n }\n updateDomain(domain) {\n this.filteredDomain = domain;\n this.xDomain = this.filteredDomain;\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n }\n updateHoveredVertical(item) {\n this.hoveredVertical = item.value;\n this.deactivateAll();\n }\n hideCircles() {\n this.hoveredVertical = null;\n this.deactivateAll();\n }\n onClick(data, series) {\n if (series) {\n data.series = series.name;\n }\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.seriesDomain;\n } else {\n domain = this.yDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.seriesDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.yDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({\n width\n }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({\n height\n }) {\n this.xAxisHeight = height;\n this.update();\n }\n onActivate(item) {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n if (idx > -1) {\n return;\n }\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n onDeactivate(item) {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n this.deactivate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n deactivateAll() {\n this.activeEntries = [...this.activeEntries];\n for (const entry of this.activeEntries) {\n this.deactivate.emit({\n value: entry,\n entries: []\n });\n }\n this.activeEntries = [];\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵAreaChartComponent_BaseFactory;\n return function AreaChartComponent_Factory(__ngFactoryType__) {\n return (ɵAreaChartComponent_BaseFactory || (ɵAreaChartComponent_BaseFactory = i0.ɵɵgetInheritedFactory(AreaChartComponent)))(__ngFactoryType__ || AreaChartComponent);\n };\n })();\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: AreaChartComponent,\n selectors: [[\"ngx-charts-area-chart\"]],\n contentQueries: function AreaChartComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, _c22, 5);\n i0.ɵɵcontentQuery(dirIndex, _c23, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tooltipTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.seriesTooltipTemplate = _t.first);\n }\n },\n hostBindings: function AreaChartComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"mouseleave\", function AreaChartComponent_mouseleave_HostBindingHandler() {\n return ctx.hideCircles();\n });\n }\n },\n inputs: {\n legend: \"legend\",\n legendTitle: \"legendTitle\",\n legendPosition: \"legendPosition\",\n xAxis: \"xAxis\",\n yAxis: \"yAxis\",\n baseValue: \"baseValue\",\n autoScale: \"autoScale\",\n showXAxisLabel: \"showXAxisLabel\",\n showYAxisLabel: \"showYAxisLabel\",\n xAxisLabel: \"xAxisLabel\",\n yAxisLabel: \"yAxisLabel\",\n timeline: \"timeline\",\n gradient: \"gradient\",\n showGridLines: \"showGridLines\",\n curve: \"curve\",\n activeEntries: \"activeEntries\",\n schemeType: \"schemeType\",\n trimXAxisTicks: \"trimXAxisTicks\",\n trimYAxisTicks: \"trimYAxisTicks\",\n rotateXAxisTicks: \"rotateXAxisTicks\",\n maxXAxisTickLength: \"maxXAxisTickLength\",\n maxYAxisTickLength: \"maxYAxisTickLength\",\n xAxisTickFormatting: \"xAxisTickFormatting\",\n yAxisTickFormatting: \"yAxisTickFormatting\",\n xAxisTicks: \"xAxisTicks\",\n yAxisTicks: \"yAxisTicks\",\n roundDomains: \"roundDomains\",\n tooltipDisabled: \"tooltipDisabled\",\n xScaleMin: \"xScaleMin\",\n xScaleMax: \"xScaleMax\",\n yScaleMin: \"yScaleMin\",\n yScaleMax: \"yScaleMax\",\n wrapTicks: \"wrapTicks\"\n },\n outputs: {\n activate: \"activate\",\n deactivate: \"deactivate\"\n },\n standalone: false,\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 11,\n vars: 20,\n consts: [[3, \"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\", \"view\", \"showLegend\", \"legendOptions\", \"activeEntries\", \"animations\"], [1, \"area-chart\", \"chart\"], [\"ngx-charts-x-axis\", \"\", 3, \"xScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [\"ngx-charts-y-axis\", \"\", 3, \"yScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [3, \"mouseleave\", 4, \"ngIf\"], [\"ngx-charts-timeline\", \"\", 3, \"results\", \"view\", \"height\", \"scheme\", \"customColors\", \"legend\", \"scaleType\", \"onDomainChange\", 4, \"ngIf\"], [\"ngx-charts-x-axis\", \"\", 3, \"dimensionsChanged\", \"xScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\"], [\"ngx-charts-y-axis\", \"\", 3, \"dimensionsChanged\", \"yScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\"], [\"ngx-charts-area-series\", \"\", 3, \"xScale\", \"yScale\", \"baseValue\", \"colors\", \"data\", \"activeEntries\", \"scaleType\", \"gradient\", \"curve\", \"animations\"], [3, \"mouseleave\"], [\"ngx-charts-tooltip-area\", \"\", 3, \"hover\", \"dims\", \"xSet\", \"xScale\", \"yScale\", \"results\", \"colors\", \"tooltipDisabled\", \"tooltipTemplate\"], [4, \"ngFor\", \"ngForOf\"], [\"ngx-charts-circle-series\", \"\", 3, \"select\", \"activate\", \"deactivate\", \"xScale\", \"yScale\", \"colors\", \"activeEntries\", \"data\", \"scaleType\", \"visibleValue\", \"tooltipDisabled\", \"tooltipTemplate\"], [\"ngx-charts-timeline\", \"\", 3, \"onDomainChange\", \"results\", \"view\", \"height\", \"scheme\", \"customColors\", \"legend\", \"scaleType\"], [\"ngx-charts-area-series\", \"\", 3, \"xScale\", \"yScale\", \"baseValue\", \"colors\", \"data\", \"scaleType\", \"gradient\", \"curve\", \"animations\"]],\n template: function AreaChartComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"ngx-charts-chart\", 0);\n i0.ɵɵlistener(\"legendLabelClick\", function AreaChartComponent_Template_ngx_charts_chart_legendLabelClick_0_listener($event) {\n return ctx.onClick($event);\n })(\"legendLabelActivate\", function AreaChartComponent_Template_ngx_charts_chart_legendLabelActivate_0_listener($event) {\n return ctx.onActivate($event);\n })(\"legendLabelDeactivate\", function AreaChartComponent_Template_ngx_charts_chart_legendLabelDeactivate_0_listener($event) {\n return ctx.onDeactivate($event);\n });\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(1, \"defs\")(2, \"clipPath\");\n i0.ɵɵelement(3, \"rect\");\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(4, \"g\", 1);\n i0.ɵɵtemplate(5, AreaChartComponent__svg_g_5_Template, 1, 11, \"g\", 2)(6, AreaChartComponent__svg_g_6_Template, 1, 10, \"g\", 3);\n i0.ɵɵelementStart(7, \"g\");\n i0.ɵɵtemplate(8, AreaChartComponent__svg_g_8_Template, 2, 10, \"g\", 4)(9, AreaChartComponent__svg_g_9_Template, 3, 9, \"g\", 5);\n i0.ɵɵelementEnd()();\n i0.ɵɵtemplate(10, AreaChartComponent__svg_g_10_Template, 2, 13, \"g\", 6);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"view\", i0.ɵɵpureFunction2(17, _c24, ctx.width, ctx.height))(\"showLegend\", ctx.legend)(\"legendOptions\", ctx.legendOptions)(\"activeEntries\", ctx.activeEntries)(\"animations\", ctx.animations);\n i0.ɵɵadvance(2);\n i0.ɵɵattribute(\"id\", ctx.clipPathId);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"width\", ctx.dims.width + 10)(\"height\", ctx.dims.height + 10)(\"transform\", \"translate(-5, -5)\");\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"transform\", ctx.transform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.xAxis);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.yAxis);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"clip-path\", ctx.clipPath);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx.results)(\"ngForTrackBy\", ctx.trackBy);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx.tooltipDisabled);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.timeline && ctx.scaleType != \"ordinal\");\n }\n },\n dependencies: [i1.NgForOf, i1.NgIf, XAxisComponent, YAxisComponent, TooltipArea, ChartComponent, CircleSeriesComponent, Timeline, AreaSeriesComponent],\n styles: [\".ngx-charts-outer{animation:chartFadeIn linear .6s}@keyframes chartFadeIn{0%{opacity:0}20%{opacity:0}to{opacity:1}}.ngx-charts{float:left;overflow:visible}.ngx-charts .circle,.ngx-charts .cell,.ngx-charts .bar,.ngx-charts .node,.ngx-charts .link,.ngx-charts .arc{cursor:pointer}.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover,.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .node.active,.ngx-charts .node:hover,.ngx-charts .link.active,.ngx-charts .link:hover,.ngx-charts .card.active,.ngx-charts .card:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .bar:focus,.ngx-charts .cell:focus,.ngx-charts .arc:focus,.ngx-charts .node:focus,.ngx-charts .link:focus,.ngx-charts .card:focus{outline:none}.ngx-charts .bar.hidden,.ngx-charts .cell.hidden,.ngx-charts .arc.hidden,.ngx-charts .node.hidden,.ngx-charts .link.hidden,.ngx-charts .card.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .line-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .polar-series-path.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .area-series.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:#0000000d}\\n\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return AreaChartComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AreaChartNormalizedComponent = /*#__PURE__*/(() => {\n class AreaChartNormalizedComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.showXAxisLabel = false;\n this.showYAxisLabel = false;\n this.showGridLines = true;\n this.curve = curveLinear;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.roundDomains = false;\n this.tooltipDisabled = false;\n this.wrapTicks = false;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.yDomain = [0, 100];\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.seriesType = SeriesType;\n this.timelineHeight = 50;\n this.timelinePadding = 10;\n this.trackBy = (index, item) => {\n return item.name;\n };\n }\n update() {\n super.update();\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n if (this.timeline) {\n this.dims.height -= this.timelineHeight + this.margin[2] + this.timelinePadding;\n }\n this.xDomain = this.getXDomain();\n if (this.filteredDomain) {\n this.xDomain = this.filteredDomain;\n }\n this.seriesDomain = this.getSeriesDomain();\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n this.yScale = this.getYScale(this.yDomain, this.dims.height);\n for (let i = 0; i < this.xSet.length; i++) {\n const val = this.xSet[i];\n let d0 = 0;\n let total = 0;\n for (const group of this.results) {\n const d = group.series.find(item => {\n let a = item.name;\n let b = val;\n if (this.scaleType === ScaleType.Time) {\n a = a.valueOf();\n b = b.valueOf();\n }\n return a === b;\n });\n if (d) {\n total += d.value;\n }\n }\n for (const group of this.results) {\n let d = group.series.find(item => {\n let a = item.name;\n let b = val;\n if (this.scaleType === ScaleType.Time) {\n a = a.valueOf();\n b = b.valueOf();\n }\n return a === b;\n });\n if (d) {\n d.d0 = d0;\n d.d1 = d0 + d.value;\n d0 += d.value;\n } else {\n d = {\n name: val,\n value: 0,\n d0,\n d1: d0\n };\n group.series.push(d);\n }\n if (total > 0) {\n d.d0 = d.d0 * 100 / total;\n d.d1 = d.d1 * 100 / total;\n } else {\n d.d0 = 0;\n d.d1 = 0;\n }\n }\n }\n this.updateTimeline();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n this.clipPathId = 'clip' + id().toString();\n this.clipPath = `url(#${this.clipPathId})`;\n }\n updateTimeline() {\n if (this.timeline) {\n this.timelineWidth = this.dims.width;\n this.timelineXDomain = this.getXDomain();\n this.timelineXScale = this.getXScale(this.timelineXDomain, this.timelineWidth);\n this.timelineYScale = this.getYScale(this.yDomain, this.timelineHeight);\n this.timelineTransform = `translate(${this.dims.xOffset}, ${-this.margin[2]})`;\n }\n }\n getXDomain() {\n let values = getUniqueXDomainValues(this.results);\n this.scaleType = getScaleType(values);\n let domain = [];\n if (this.scaleType === ScaleType.Time) {\n const min = Math.min(...values);\n const max = Math.max(...values);\n domain = [new Date(min), new Date(max)];\n this.xSet = [...values].sort((a, b) => {\n const aDate = a.getTime();\n const bDate = b.getTime();\n if (aDate > bDate) return 1;\n if (bDate > aDate) return -1;\n return 0;\n });\n } else if (this.scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n const min = Math.min(...values);\n const max = Math.max(...values);\n domain = [min, max];\n // Use compare function to sort numbers numerically\n this.xSet = [...values].sort((a, b) => a - b);\n } else {\n domain = values;\n this.xSet = values;\n }\n return domain;\n }\n getSeriesDomain() {\n return this.results.map(d => d.name);\n }\n getXScale(domain, width) {\n let scale;\n if (this.scaleType === ScaleType.Time) {\n scale = scaleTime();\n } else if (this.scaleType === ScaleType.Linear) {\n scale = scaleLinear();\n } else if (this.scaleType === ScaleType.Ordinal) {\n scale = scalePoint().padding(0.1);\n }\n scale.range([0, width]).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n getYScale(domain, height) {\n const scale = scaleLinear().range([height, 0]).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n updateDomain(domain) {\n this.filteredDomain = domain;\n this.xDomain = this.filteredDomain;\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n }\n updateHoveredVertical(item) {\n this.hoveredVertical = item.value;\n this.deactivateAll();\n }\n hideCircles() {\n this.hoveredVertical = null;\n this.deactivateAll();\n }\n onClick(data, series) {\n if (series) {\n data.series = series.name;\n }\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.seriesDomain;\n } else {\n domain = this.yDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.seriesDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.yDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({\n width\n }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({\n height\n }) {\n this.xAxisHeight = height;\n this.update();\n }\n onActivate(item) {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n if (idx > -1) {\n return;\n }\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n onDeactivate(item) {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n this.deactivate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n deactivateAll() {\n this.activeEntries = [...this.activeEntries];\n for (const entry of this.activeEntries) {\n this.deactivate.emit({\n value: entry,\n entries: []\n });\n }\n this.activeEntries = [];\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵAreaChartNormalizedComponent_BaseFactory;\n return function AreaChartNormalizedComponent_Factory(__ngFactoryType__) {\n return (ɵAreaChartNormalizedComponent_BaseFactory || (ɵAreaChartNormalizedComponent_BaseFactory = i0.ɵɵgetInheritedFactory(AreaChartNormalizedComponent)))(__ngFactoryType__ || AreaChartNormalizedComponent);\n };\n })();\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: AreaChartNormalizedComponent,\n selectors: [[\"ngx-charts-area-chart-normalized\"]],\n contentQueries: function AreaChartNormalizedComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, _c22, 5);\n i0.ɵɵcontentQuery(dirIndex, _c23, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tooltipTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.seriesTooltipTemplate = _t.first);\n }\n },\n hostBindings: function AreaChartNormalizedComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"mouseleave\", function AreaChartNormalizedComponent_mouseleave_HostBindingHandler() {\n return ctx.hideCircles();\n });\n }\n },\n inputs: {\n legend: \"legend\",\n legendTitle: \"legendTitle\",\n legendPosition: \"legendPosition\",\n xAxis: \"xAxis\",\n yAxis: \"yAxis\",\n showXAxisLabel: \"showXAxisLabel\",\n showYAxisLabel: \"showYAxisLabel\",\n xAxisLabel: \"xAxisLabel\",\n yAxisLabel: \"yAxisLabel\",\n timeline: \"timeline\",\n gradient: \"gradient\",\n showGridLines: \"showGridLines\",\n curve: \"curve\",\n activeEntries: \"activeEntries\",\n schemeType: \"schemeType\",\n trimXAxisTicks: \"trimXAxisTicks\",\n trimYAxisTicks: \"trimYAxisTicks\",\n rotateXAxisTicks: \"rotateXAxisTicks\",\n maxXAxisTickLength: \"maxXAxisTickLength\",\n maxYAxisTickLength: \"maxYAxisTickLength\",\n xAxisTickFormatting: \"xAxisTickFormatting\",\n yAxisTickFormatting: \"yAxisTickFormatting\",\n xAxisTicks: \"xAxisTicks\",\n yAxisTicks: \"yAxisTicks\",\n roundDomains: \"roundDomains\",\n tooltipDisabled: \"tooltipDisabled\",\n wrapTicks: \"wrapTicks\"\n },\n outputs: {\n activate: \"activate\",\n deactivate: \"deactivate\"\n },\n standalone: false,\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 11,\n vars: 20,\n consts: [[3, \"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\", \"view\", \"showLegend\", \"legendOptions\", \"activeEntries\", \"animations\"], [1, \"area-chart\", \"chart\"], [\"ngx-charts-x-axis\", \"\", 3, \"xScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [\"ngx-charts-y-axis\", \"\", 3, \"yScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [3, \"mouseleave\", 4, \"ngIf\"], [\"ngx-charts-timeline\", \"\", 3, \"results\", \"view\", \"height\", \"scheme\", \"customColors\", \"legend\", \"scaleType\", \"onDomainChange\", 4, \"ngIf\"], [\"ngx-charts-x-axis\", \"\", 3, \"dimensionsChanged\", \"xScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\"], [\"ngx-charts-y-axis\", \"\", 3, \"dimensionsChanged\", \"yScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\"], [\"ngx-charts-area-series\", \"\", 3, \"xScale\", \"yScale\", \"colors\", \"data\", \"scaleType\", \"activeEntries\", \"gradient\", \"normalized\", \"curve\", \"animations\"], [3, \"mouseleave\"], [\"ngx-charts-tooltip-area\", \"\", 3, \"hover\", \"dims\", \"xSet\", \"xScale\", \"yScale\", \"results\", \"colors\", \"showPercentage\", \"tooltipDisabled\", \"tooltipTemplate\"], [4, \"ngFor\", \"ngForOf\"], [\"ngx-charts-circle-series\", \"\", 3, \"select\", \"activate\", \"deactivate\", \"type\", \"xScale\", \"yScale\", \"colors\", \"activeEntries\", \"data\", \"scaleType\", \"visibleValue\", \"tooltipDisabled\", \"tooltipTemplate\"], [\"ngx-charts-timeline\", \"\", 3, \"onDomainChange\", \"results\", \"view\", \"height\", \"scheme\", \"customColors\", \"legend\", \"scaleType\"], [\"ngx-charts-area-series\", \"\", 3, \"xScale\", \"yScale\", \"colors\", \"data\", \"scaleType\", \"gradient\", \"normalized\", \"curve\", \"animations\"]],\n template: function AreaChartNormalizedComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"ngx-charts-chart\", 0);\n i0.ɵɵlistener(\"legendLabelClick\", function AreaChartNormalizedComponent_Template_ngx_charts_chart_legendLabelClick_0_listener($event) {\n return ctx.onClick($event);\n })(\"legendLabelActivate\", function AreaChartNormalizedComponent_Template_ngx_charts_chart_legendLabelActivate_0_listener($event) {\n return ctx.onActivate($event);\n })(\"legendLabelDeactivate\", function AreaChartNormalizedComponent_Template_ngx_charts_chart_legendLabelDeactivate_0_listener($event) {\n return ctx.onDeactivate($event);\n });\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(1, \"defs\")(2, \"clipPath\");\n i0.ɵɵelement(3, \"rect\");\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(4, \"g\", 1);\n i0.ɵɵtemplate(5, AreaChartNormalizedComponent__svg_g_5_Template, 1, 11, \"g\", 2)(6, AreaChartNormalizedComponent__svg_g_6_Template, 1, 10, \"g\", 3);\n i0.ɵɵelementStart(7, \"g\");\n i0.ɵɵtemplate(8, AreaChartNormalizedComponent__svg_g_8_Template, 2, 10, \"g\", 4)(9, AreaChartNormalizedComponent__svg_g_9_Template, 3, 10, \"g\", 5);\n i0.ɵɵelementEnd()();\n i0.ɵɵtemplate(10, AreaChartNormalizedComponent__svg_g_10_Template, 2, 13, \"g\", 6);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"view\", i0.ɵɵpureFunction2(17, _c24, ctx.width, ctx.height))(\"showLegend\", ctx.legend)(\"legendOptions\", ctx.legendOptions)(\"activeEntries\", ctx.activeEntries)(\"animations\", ctx.animations);\n i0.ɵɵadvance(2);\n i0.ɵɵattribute(\"id\", ctx.clipPathId);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"width\", ctx.dims.width + 10)(\"height\", ctx.dims.height + 10)(\"transform\", \"translate(-5, -5)\");\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"transform\", ctx.transform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.xAxis);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.yAxis);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"clip-path\", ctx.clipPath);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx.results)(\"ngForTrackBy\", ctx.trackBy);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx.tooltipDisabled);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.timeline && ctx.scaleType != \"ordinal\");\n }\n },\n dependencies: [i1.NgForOf, i1.NgIf, XAxisComponent, YAxisComponent, TooltipArea, ChartComponent, CircleSeriesComponent, Timeline, AreaSeriesComponent],\n styles: [_c25],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return AreaChartNormalizedComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AreaChartStackedComponent = /*#__PURE__*/(() => {\n class AreaChartStackedComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.xAxis = false;\n this.yAxis = false;\n this.timeline = false;\n this.showGridLines = true;\n this.curve = curveLinear;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.roundDomains = false;\n this.tooltipDisabled = false;\n this.wrapTicks = false;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.timelineHeight = 50;\n this.timelinePadding = 10;\n this.seriesType = SeriesType;\n }\n update() {\n super.update();\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n if (this.timeline) {\n this.dims.height -= this.timelineHeight + this.margin[2] + this.timelinePadding;\n }\n this.xDomain = this.getXDomain();\n if (this.filteredDomain) {\n this.xDomain = this.filteredDomain;\n }\n this.yDomain = this.getYDomain();\n this.seriesDomain = this.getSeriesDomain();\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n this.yScale = this.getYScale(this.yDomain, this.dims.height);\n for (let i = 0; i < this.xSet.length; i++) {\n const val = this.xSet[i];\n let d0 = 0;\n for (const group of this.results) {\n let d = group.series.find(item => {\n let a = item.name;\n let b = val;\n if (this.scaleType === ScaleType.Time) {\n a = a.valueOf();\n b = b.valueOf();\n }\n return a === b;\n });\n if (d) {\n d.d0 = d0;\n d.d1 = d0 + d.value;\n d0 += d.value;\n } else {\n d = {\n name: val,\n value: 0,\n d0,\n d1: d0\n };\n group.series.push(d);\n }\n }\n }\n this.updateTimeline();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n this.clipPathId = 'clip' + id().toString();\n this.clipPath = `url(#${this.clipPathId})`;\n }\n updateTimeline() {\n if (this.timeline) {\n this.timelineWidth = this.dims.width;\n this.timelineXDomain = this.getXDomain();\n this.timelineXScale = this.getXScale(this.timelineXDomain, this.timelineWidth);\n this.timelineYScale = this.getYScale(this.yDomain, this.timelineHeight);\n this.timelineTransform = `translate(${this.dims.xOffset}, ${-this.margin[2]})`;\n }\n }\n getXDomain() {\n let values = getUniqueXDomainValues(this.results);\n this.scaleType = getScaleType(values);\n let domain = [];\n if (this.scaleType === ScaleType.Linear) {\n values = values.map(v => Number(v));\n }\n let min;\n let max;\n if (this.scaleType === ScaleType.Time || this.scaleType === ScaleType.Linear) {\n min = this.xScaleMin ? this.xScaleMin : Math.min(...values);\n max = this.xScaleMax ? this.xScaleMax : Math.max(...values);\n }\n if (this.scaleType === ScaleType.Time) {\n domain = [new Date(min), new Date(max)];\n this.xSet = [...values].sort((a, b) => {\n const aDate = a.getTime();\n const bDate = b.getTime();\n if (aDate > bDate) return 1;\n if (bDate > aDate) return -1;\n return 0;\n });\n } else if (this.scaleType === ScaleType.Linear) {\n domain = [min, max];\n // Use compare function to sort numbers numerically\n this.xSet = [...values].sort((a, b) => a - b);\n } else {\n domain = values;\n this.xSet = values;\n }\n return domain;\n }\n getYDomain() {\n const domain = [];\n for (let i = 0; i < this.xSet.length; i++) {\n const val = this.xSet[i];\n let sum = 0;\n for (const group of this.results) {\n const d = group.series.find(item => {\n let a = item.name;\n let b = val;\n if (this.scaleType === ScaleType.Time) {\n a = a.valueOf();\n b = b.valueOf();\n }\n return a === b;\n });\n if (d) {\n sum += d.value;\n }\n }\n domain.push(sum);\n }\n const min = this.yScaleMin ? this.yScaleMin : Math.min(0, ...domain);\n const max = this.yScaleMax ? this.yScaleMax : Math.max(...domain);\n return [min, max];\n }\n getSeriesDomain() {\n return this.results.map(d => d.name);\n }\n getXScale(domain, width) {\n let scale;\n if (this.scaleType === ScaleType.Time) {\n scale = scaleTime();\n } else if (this.scaleType === ScaleType.Linear) {\n scale = scaleLinear();\n } else if (this.scaleType === ScaleType.Ordinal) {\n scale = scalePoint().padding(0.1);\n }\n scale.range([0, width]).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n getYScale(domain, height) {\n const scale = scaleLinear().range([height, 0]).domain(domain);\n return this.roundDomains ? scale.nice() : scale;\n }\n updateDomain(domain) {\n this.filteredDomain = domain;\n this.xDomain = this.filteredDomain;\n this.xScale = this.getXScale(this.xDomain, this.dims.width);\n }\n updateHoveredVertical(item) {\n this.hoveredVertical = item.value;\n this.deactivateAll();\n }\n hideCircles() {\n this.hoveredVertical = null;\n this.deactivateAll();\n }\n onClick(data, series) {\n if (series) {\n data.series = series.name;\n }\n this.select.emit(data);\n }\n trackBy(index, item) {\n return `${item.name}`;\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.seriesDomain;\n } else {\n domain = this.yDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.seriesDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.yDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({\n width\n }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({\n height\n }) {\n this.xAxisHeight = height;\n this.update();\n }\n onActivate(item) {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n if (idx > -1) {\n return;\n }\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n onDeactivate(item) {\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value;\n });\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n this.deactivate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n deactivateAll() {\n this.activeEntries = [...this.activeEntries];\n for (const entry of this.activeEntries) {\n this.deactivate.emit({\n value: entry,\n entries: []\n });\n }\n this.activeEntries = [];\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵAreaChartStackedComponent_BaseFactory;\n return function AreaChartStackedComponent_Factory(__ngFactoryType__) {\n return (ɵAreaChartStackedComponent_BaseFactory || (ɵAreaChartStackedComponent_BaseFactory = i0.ɵɵgetInheritedFactory(AreaChartStackedComponent)))(__ngFactoryType__ || AreaChartStackedComponent);\n };\n })();\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: AreaChartStackedComponent,\n selectors: [[\"ngx-charts-area-chart-stacked\"]],\n contentQueries: function AreaChartStackedComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, _c22, 5);\n i0.ɵɵcontentQuery(dirIndex, _c23, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tooltipTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.seriesTooltipTemplate = _t.first);\n }\n },\n hostBindings: function AreaChartStackedComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"mouseleave\", function AreaChartStackedComponent_mouseleave_HostBindingHandler() {\n return ctx.hideCircles();\n });\n }\n },\n inputs: {\n legend: \"legend\",\n legendTitle: \"legendTitle\",\n legendPosition: \"legendPosition\",\n xAxis: \"xAxis\",\n yAxis: \"yAxis\",\n showXAxisLabel: \"showXAxisLabel\",\n showYAxisLabel: \"showYAxisLabel\",\n xAxisLabel: \"xAxisLabel\",\n yAxisLabel: \"yAxisLabel\",\n timeline: \"timeline\",\n gradient: \"gradient\",\n showGridLines: \"showGridLines\",\n curve: \"curve\",\n activeEntries: \"activeEntries\",\n schemeType: \"schemeType\",\n trimXAxisTicks: \"trimXAxisTicks\",\n trimYAxisTicks: \"trimYAxisTicks\",\n rotateXAxisTicks: \"rotateXAxisTicks\",\n maxXAxisTickLength: \"maxXAxisTickLength\",\n maxYAxisTickLength: \"maxYAxisTickLength\",\n xAxisTickFormatting: \"xAxisTickFormatting\",\n yAxisTickFormatting: \"yAxisTickFormatting\",\n xAxisTicks: \"xAxisTicks\",\n yAxisTicks: \"yAxisTicks\",\n roundDomains: \"roundDomains\",\n tooltipDisabled: \"tooltipDisabled\",\n xScaleMin: \"xScaleMin\",\n xScaleMax: \"xScaleMax\",\n yScaleMin: \"yScaleMin\",\n yScaleMax: \"yScaleMax\",\n wrapTicks: \"wrapTicks\"\n },\n outputs: {\n activate: \"activate\",\n deactivate: \"deactivate\"\n },\n standalone: false,\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 11,\n vars: 20,\n consts: [[3, \"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\", \"view\", \"showLegend\", \"legendOptions\", \"activeEntries\", \"animations\"], [1, \"area-chart\", \"chart\"], [\"ngx-charts-x-axis\", \"\", 3, \"xScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [\"ngx-charts-y-axis\", \"\", 3, \"yScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [3, \"mouseleave\", 4, \"ngIf\"], [\"ngx-charts-timeline\", \"\", 3, \"results\", \"view\", \"height\", \"scheme\", \"customColors\", \"legend\", \"scaleType\", \"onDomainChange\", 4, \"ngIf\"], [\"ngx-charts-x-axis\", \"\", 3, \"dimensionsChanged\", \"xScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\"], [\"ngx-charts-y-axis\", \"\", 3, \"dimensionsChanged\", \"yScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\"], [\"ngx-charts-area-series\", \"\", 3, \"xScale\", \"yScale\", \"colors\", \"data\", \"scaleType\", \"gradient\", \"activeEntries\", \"stacked\", \"curve\", \"animations\"], [3, \"mouseleave\"], [\"ngx-charts-tooltip-area\", \"\", 3, \"hover\", \"dims\", \"xSet\", \"xScale\", \"yScale\", \"results\", \"colors\", \"tooltipDisabled\", \"tooltipTemplate\"], [\"ngx-charts-circle-series\", \"\", 3, \"select\", \"activate\", \"deactivate\", \"type\", \"xScale\", \"yScale\", \"colors\", \"activeEntries\", \"data\", \"scaleType\", \"visibleValue\", \"tooltipDisabled\", \"tooltipTemplate\"], [\"ngx-charts-timeline\", \"\", 3, \"onDomainChange\", \"results\", \"view\", \"height\", \"scheme\", \"customColors\", \"legend\", \"scaleType\"], [\"ngx-charts-area-series\", \"\", 3, \"xScale\", \"yScale\", \"colors\", \"data\", \"scaleType\", \"gradient\", \"stacked\", \"curve\", \"animations\"]],\n template: function AreaChartStackedComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"ngx-charts-chart\", 0);\n i0.ɵɵlistener(\"legendLabelClick\", function AreaChartStackedComponent_Template_ngx_charts_chart_legendLabelClick_0_listener($event) {\n return ctx.onClick($event);\n })(\"legendLabelActivate\", function AreaChartStackedComponent_Template_ngx_charts_chart_legendLabelActivate_0_listener($event) {\n return ctx.onActivate($event);\n })(\"legendLabelDeactivate\", function AreaChartStackedComponent_Template_ngx_charts_chart_legendLabelDeactivate_0_listener($event) {\n return ctx.onDeactivate($event);\n });\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(1, \"defs\")(2, \"clipPath\");\n i0.ɵɵelement(3, \"rect\");\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(4, \"g\", 1);\n i0.ɵɵtemplate(5, AreaChartStackedComponent__svg_g_5_Template, 1, 11, \"g\", 2)(6, AreaChartStackedComponent__svg_g_6_Template, 1, 10, \"g\", 3);\n i0.ɵɵelementStart(7, \"g\");\n i0.ɵɵtemplate(8, AreaChartStackedComponent__svg_g_8_Template, 2, 10, \"g\", 4)(9, AreaChartStackedComponent__svg_g_9_Template, 3, 10, \"g\", 5);\n i0.ɵɵelementEnd()();\n i0.ɵɵtemplate(10, AreaChartStackedComponent__svg_g_10_Template, 2, 13, \"g\", 6);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"view\", i0.ɵɵpureFunction2(17, _c24, ctx.width, ctx.height))(\"showLegend\", ctx.legend)(\"legendOptions\", ctx.legendOptions)(\"activeEntries\", ctx.activeEntries)(\"animations\", ctx.animations);\n i0.ɵɵadvance(2);\n i0.ɵɵattribute(\"id\", ctx.clipPathId);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"width\", ctx.dims.width + 10)(\"height\", ctx.dims.height + 10)(\"transform\", \"translate(-5, -5)\");\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"transform\", ctx.transform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.xAxis);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.yAxis);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"clip-path\", ctx.clipPath);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx.results)(\"ngForTrackBy\", ctx.trackBy);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx.tooltipDisabled);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.timeline && ctx.scaleType != \"ordinal\");\n }\n },\n dependencies: [i1.NgForOf, i1.NgIf, XAxisComponent, YAxisComponent, TooltipArea, ChartComponent, CircleSeriesComponent, Timeline, AreaSeriesComponent],\n styles: [_c25],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return AreaChartStackedComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AreaChartModule = /*#__PURE__*/(() => {\n class AreaChartModule {\n static {\n this.ɵfac = function AreaChartModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || AreaChartModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: AreaChartModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [ChartCommonModule]\n });\n }\n }\n return AreaChartModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet BarComponent = /*#__PURE__*/(() => {\n class BarComponent {\n constructor(element) {\n this.roundEdges = true;\n this.gradient = false;\n this.offset = 0;\n this.isActive = false;\n this.animations = true;\n this.noBarWhenZero = true;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.hasGradient = false;\n this.hideBar = false;\n this.element = element.nativeElement;\n }\n ngOnChanges(changes) {\n if (changes.roundEdges) {\n this.loadAnimation();\n }\n this.update();\n }\n update() {\n this.gradientId = 'grad' + id().toString();\n this.gradientFill = `url(#${this.gradientId})`;\n if (this.gradient || this.stops) {\n this.gradientStops = this.getGradient();\n this.hasGradient = true;\n } else {\n this.hasGradient = false;\n }\n this.updatePathEl();\n this.checkToHideBar();\n }\n loadAnimation() {\n this.path = this.getStartingPath();\n setTimeout(this.update.bind(this), 100);\n }\n updatePathEl() {\n const node = select(this.element).select('.bar');\n const path = this.getPath();\n if (this.animations) {\n node.transition().duration(500).attr('d', path);\n } else {\n node.attr('d', path);\n }\n }\n getGradient() {\n if (this.stops) {\n return this.stops;\n }\n return [{\n offset: 0,\n color: this.fill,\n opacity: this.getStartOpacity()\n }, {\n offset: 100,\n color: this.fill,\n opacity: 1\n }];\n }\n getStartingPath() {\n if (!this.animations) {\n return this.getPath();\n }\n let radius = this.getRadius();\n let path;\n if (this.roundEdges) {\n if (this.orientation === BarOrientation.Vertical) {\n radius = Math.min(this.height, radius);\n path = roundedRect(this.x, this.y + this.height, this.width, 1, 0, this.edges);\n } else if (this.orientation === BarOrientation.Horizontal) {\n radius = Math.min(this.width, radius);\n path = roundedRect(this.x, this.y, 1, this.height, 0, this.edges);\n }\n } else {\n if (this.orientation === BarOrientation.Vertical) {\n path = roundedRect(this.x, this.y + this.height, this.width, 1, 0, this.edges);\n } else if (this.orientation === BarOrientation.Horizontal) {\n path = roundedRect(this.x, this.y, 1, this.height, 0, this.edges);\n }\n }\n return path;\n }\n getPath() {\n let radius = this.getRadius();\n let path;\n if (this.roundEdges) {\n if (this.orientation === BarOrientation.Vertical) {\n radius = Math.min(this.height, radius);\n path = roundedRect(this.x, this.y, this.width, this.height, radius, this.edges);\n } else if (this.orientation === BarOrientation.Horizontal) {\n radius = Math.min(this.width, radius);\n path = roundedRect(this.x, this.y, this.width, this.height, radius, this.edges);\n }\n } else {\n path = roundedRect(this.x, this.y, this.width, this.height, radius, this.edges);\n }\n return path;\n }\n getRadius() {\n let radius = 0;\n if (this.roundEdges && this.height > 5 && this.width > 5) {\n radius = Math.floor(Math.min(5, this.height / 2, this.width / 2));\n }\n return radius;\n }\n getStartOpacity() {\n if (this.roundEdges) {\n return 0.2;\n } else {\n return 0.5;\n }\n }\n get edges() {\n let edges = [false, false, false, false];\n if (this.roundEdges) {\n if (this.orientation === BarOrientation.Vertical) {\n if (this.data.value > 0) {\n edges = [true, true, false, false];\n } else {\n edges = [false, false, true, true];\n }\n } else if (this.orientation === BarOrientation.Horizontal) {\n if (this.data.value > 0) {\n edges = [false, true, false, true];\n } else {\n edges = [true, false, true, false];\n }\n }\n }\n return edges;\n }\n onMouseEnter() {\n this.activate.emit(this.data);\n }\n onMouseLeave() {\n this.deactivate.emit(this.data);\n }\n checkToHideBar() {\n this.hideBar = this.noBarWhenZero && (this.orientation === BarOrientation.Vertical && this.height === 0 || this.orientation === BarOrientation.Horizontal && this.width === 0);\n }\n static {\n this.ɵfac = function BarComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || BarComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: BarComponent,\n selectors: [[\"g\", \"ngx-charts-bar\", \"\"]],\n hostBindings: function BarComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"mouseenter\", function BarComponent_mouseenter_HostBindingHandler() {\n return ctx.onMouseEnter();\n })(\"mouseleave\", function BarComponent_mouseleave_HostBindingHandler() {\n return ctx.onMouseLeave();\n });\n }\n },\n inputs: {\n fill: \"fill\",\n data: \"data\",\n width: \"width\",\n height: \"height\",\n x: \"x\",\n y: \"y\",\n orientation: \"orientation\",\n roundEdges: \"roundEdges\",\n gradient: \"gradient\",\n offset: \"offset\",\n isActive: \"isActive\",\n stops: \"stops\",\n animations: \"animations\",\n ariaLabel: \"ariaLabel\",\n noBarWhenZero: \"noBarWhenZero\"\n },\n outputs: {\n select: \"select\",\n activate: \"activate\",\n deactivate: \"deactivate\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n attrs: _c26,\n decls: 2,\n vars: 8,\n consts: [[4, \"ngIf\"], [\"stroke\", \"none\", \"role\", \"img\", \"tabIndex\", \"-1\", 1, \"bar\", 3, \"click\"], [\"ngx-charts-svg-linear-gradient\", \"\", 3, \"orientation\", \"name\", \"stops\"]],\n template: function BarComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, BarComponent__svg_defs_0_Template, 2, 3, \"defs\", 0);\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(1, \"path\", 1);\n i0.ɵɵlistener(\"click\", function BarComponent_Template_path_click_1_listener() {\n return ctx.select.emit(ctx.data);\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", ctx.hasGradient);\n i0.ɵɵadvance();\n i0.ɵɵclassProp(\"active\", ctx.isActive)(\"hidden\", ctx.hideBar);\n i0.ɵɵattribute(\"d\", ctx.path)(\"aria-label\", ctx.ariaLabel)(\"fill\", ctx.hasGradient ? ctx.gradientFill : ctx.fill);\n }\n },\n dependencies: [i1.NgIf, SvgLinearGradientComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return BarComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar BarChartType = /*#__PURE__*/function (BarChartType) {\n BarChartType[\"Standard\"] = \"standard\";\n BarChartType[\"Normalized\"] = \"normalized\";\n BarChartType[\"Stacked\"] = \"stacked\";\n return BarChartType;\n}(BarChartType || {});\nvar D0Types = /*#__PURE__*/function (D0Types) {\n D0Types[\"positive\"] = \"positive\";\n D0Types[\"negative\"] = \"negative\";\n return D0Types;\n}(D0Types || {});\nlet BarLabelComponent = /*#__PURE__*/(() => {\n class BarLabelComponent {\n constructor(element) {\n this.dimensionsChanged = new EventEmitter();\n this.horizontalPadding = 2;\n this.verticalPadding = 5;\n this.element = element.nativeElement;\n }\n ngOnChanges(changes) {\n this.update();\n }\n getSize() {\n const h = this.element.getBoundingClientRect().height;\n const w = this.element.getBoundingClientRect().width;\n return {\n height: h,\n width: w,\n negative: this.value < 0\n };\n }\n ngAfterViewInit() {\n this.dimensionsChanged.emit(this.getSize());\n }\n update() {\n if (this.valueFormatting) {\n this.formatedValue = this.valueFormatting(this.value);\n } else {\n this.formatedValue = formatLabel(this.value);\n }\n if (this.orientation === 'horizontal') {\n this.x = this.barX + this.barWidth;\n // if the value is negative then it's on the left of the x0.\n // we need to put the data label in front of the bar\n if (this.value < 0) {\n this.x = this.x - this.horizontalPadding;\n this.textAnchor = 'end';\n } else {\n this.x = this.x + this.horizontalPadding;\n this.textAnchor = 'start';\n }\n this.y = this.barY + this.barHeight / 2;\n } else {\n // orientation must be \"vertical\"\n this.x = this.barX + this.barWidth / 2;\n this.y = this.barY + this.barHeight;\n if (this.value < 0) {\n this.y = this.y + this.verticalPadding;\n this.textAnchor = 'end';\n } else {\n this.y = this.y - this.verticalPadding;\n this.textAnchor = 'start';\n }\n this.transform = `rotate(-45, ${this.x} , ${this.y})`;\n }\n }\n static {\n this.ɵfac = function BarLabelComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || BarLabelComponent)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: BarLabelComponent,\n selectors: [[\"g\", \"ngx-charts-bar-label\", \"\"]],\n inputs: {\n value: \"value\",\n valueFormatting: \"valueFormatting\",\n barX: \"barX\",\n barY: \"barY\",\n barWidth: \"barWidth\",\n barHeight: \"barHeight\",\n orientation: \"orientation\"\n },\n outputs: {\n dimensionsChanged: \"dimensionsChanged\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n attrs: _c27,\n decls: 2,\n vars: 5,\n consts: [[\"alignment-baseline\", \"middle\", 1, \"textDataLabel\"]],\n template: function BarLabelComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"text\", 0);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"text-anchor\", ctx.textAnchor)(\"transform\", ctx.transform)(\"x\", ctx.x)(\"y\", ctx.y);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx.formatedValue, \" \");\n }\n },\n styles: [\".textDataLabel[_ngcontent-%COMP%]{font-size:11px}\"],\n changeDetection: 0\n });\n }\n }\n return BarLabelComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SeriesHorizontal = /*#__PURE__*/(() => {\n class SeriesHorizontal {\n constructor() {\n this.type = BarChartType.Standard;\n this.tooltipDisabled = false;\n this.animations = true;\n this.showDataLabel = false;\n this.noBarWhenZero = true;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.dataLabelWidthChanged = new EventEmitter();\n this.barsForDataLabels = [];\n this.barOrientation = BarOrientation;\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.updateTooltipSettings();\n const d0 = {\n [D0Types.positive]: 0,\n [D0Types.negative]: 0\n };\n let d0Type;\n d0Type = D0Types.positive;\n let total;\n if (this.type === BarChartType.Normalized) {\n total = this.series.map(d => d.value).reduce((sum, d) => sum + d, 0);\n }\n const xScaleMin = Math.max(this.xScale.domain()[0], 0);\n this.bars = this.series.map(d => {\n let value = d.value;\n const label = this.getLabel(d);\n const formattedLabel = formatLabel(label);\n const roundEdges = this.roundEdges;\n d0Type = value > 0 ? D0Types.positive : D0Types.negative;\n const bar = {\n value,\n label,\n roundEdges,\n data: d,\n formattedLabel\n };\n bar.height = this.yScale.bandwidth();\n if (this.type === BarChartType.Standard) {\n bar.width = Math.abs(this.xScale(value) - this.xScale(xScaleMin));\n if (value < 0) {\n bar.x = this.xScale(value);\n } else {\n bar.x = this.xScale(xScaleMin);\n }\n bar.y = this.yScale(label);\n } else if (this.type === BarChartType.Stacked) {\n const offset0 = d0[d0Type];\n const offset1 = offset0 + value;\n d0[d0Type] += value;\n bar.width = this.xScale(offset1) - this.xScale(offset0);\n bar.x = this.xScale(offset0);\n bar.y = 0;\n bar.offset0 = offset0;\n bar.offset1 = offset1;\n } else if (this.type === BarChartType.Normalized) {\n let offset0 = d0[d0Type];\n let offset1 = offset0 + value;\n d0[d0Type] += value;\n if (total > 0) {\n offset0 = offset0 * 100 / total;\n offset1 = offset1 * 100 / total;\n } else {\n offset0 = 0;\n offset1 = 0;\n }\n bar.width = this.xScale(offset1) - this.xScale(offset0);\n bar.x = this.xScale(offset0);\n bar.y = 0;\n bar.offset0 = offset0;\n bar.offset1 = offset1;\n value = (offset1 - offset0).toFixed(2) + '%';\n }\n if (this.colors.scaleType === ScaleType.Ordinal) {\n bar.color = this.colors.getColor(label);\n } else {\n if (this.type === BarChartType.Standard) {\n bar.color = this.colors.getColor(value);\n bar.gradientStops = this.colors.getLinearGradientStops(value);\n } else {\n bar.color = this.colors.getColor(bar.offset1);\n bar.gradientStops = this.colors.getLinearGradientStops(bar.offset1, bar.offset0);\n }\n }\n let tooltipLabel = formattedLabel;\n bar.ariaLabel = formattedLabel + ' ' + value.toLocaleString();\n if (this.seriesName !== null && this.seriesName !== undefined) {\n tooltipLabel = `${this.seriesName} • ${formattedLabel}`;\n bar.data.series = this.seriesName;\n bar.ariaLabel = this.seriesName + ' ' + bar.ariaLabel;\n }\n bar.tooltipText = this.tooltipDisabled ? undefined : `\n ${escapeLabel(tooltipLabel)}\n ${this.dataLabelFormatting ? this.dataLabelFormatting(value) : value.toLocaleString()}\n `;\n return bar;\n });\n this.updateDataLabels();\n }\n updateDataLabels() {\n if (this.type === BarChartType.Stacked) {\n this.barsForDataLabels = [];\n const section = {};\n section.series = this.seriesName;\n const totalPositive = this.series.map(d => d.value).reduce((sum, d) => d > 0 ? sum + d : sum, 0);\n const totalNegative = this.series.map(d => d.value).reduce((sum, d) => d < 0 ? sum + d : sum, 0);\n section.total = totalPositive + totalNegative;\n section.x = 0;\n section.y = 0;\n // if total is positive then we show it on the right, otherwise on the left\n if (section.total > 0) {\n section.width = this.xScale(totalPositive);\n } else {\n section.width = this.xScale(totalNegative);\n }\n section.height = this.yScale.bandwidth();\n this.barsForDataLabels.push(section);\n } else {\n this.barsForDataLabels = this.series.map(d => {\n const section = {};\n section.series = this.seriesName ?? d.label;\n section.total = d.value;\n section.x = this.xScale(0);\n section.y = this.yScale(d.label);\n section.width = this.xScale(section.total) - this.xScale(0);\n section.height = this.yScale.bandwidth();\n return section;\n });\n }\n }\n updateTooltipSettings() {\n this.tooltipPlacement = this.tooltipDisabled ? undefined : PlacementTypes.Top;\n this.tooltipType = this.tooltipDisabled ? undefined : StyleTypes.tooltip;\n }\n isActive(entry) {\n if (!this.activeEntries) return false;\n const item = this.activeEntries.find(active => {\n return entry.name === active.name && entry.value === active.value;\n });\n return item !== undefined;\n }\n getLabel(dataItem) {\n if (dataItem.label) {\n return dataItem.label;\n }\n return dataItem.name;\n }\n trackBy(index, bar) {\n return bar.label;\n }\n trackDataLabelBy(index, barLabel) {\n return index + '#' + barLabel.series + '#' + barLabel.total;\n }\n click(data) {\n this.select.emit(data);\n }\n static {\n this.ɵfac = function SeriesHorizontal_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || SeriesHorizontal)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: SeriesHorizontal,\n selectors: [[\"g\", \"ngx-charts-series-horizontal\", \"\"]],\n inputs: {\n dims: \"dims\",\n type: \"type\",\n series: \"series\",\n xScale: \"xScale\",\n yScale: \"yScale\",\n colors: \"colors\",\n tooltipDisabled: \"tooltipDisabled\",\n gradient: \"gradient\",\n activeEntries: \"activeEntries\",\n seriesName: \"seriesName\",\n tooltipTemplate: \"tooltipTemplate\",\n roundEdges: \"roundEdges\",\n animations: \"animations\",\n showDataLabel: \"showDataLabel\",\n dataLabelFormatting: \"dataLabelFormatting\",\n noBarWhenZero: \"noBarWhenZero\"\n },\n outputs: {\n select: \"select\",\n activate: \"activate\",\n deactivate: \"deactivate\",\n dataLabelWidthChanged: \"dataLabelWidthChanged\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n attrs: _c28,\n decls: 2,\n vars: 3,\n consts: [[\"ngx-charts-bar\", \"\", \"ngx-tooltip\", \"\", 3, \"width\", \"height\", \"x\", \"y\", \"fill\", \"stops\", \"data\", \"orientation\", \"roundEdges\", \"gradient\", \"isActive\", \"ariaLabel\", \"animations\", \"tooltipDisabled\", \"tooltipPlacement\", \"tooltipType\", \"tooltipTitle\", \"tooltipTemplate\", \"tooltipContext\", \"noBarWhenZero\", \"select\", \"activate\", \"deactivate\", 4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [4, \"ngIf\"], [\"ngx-charts-bar\", \"\", \"ngx-tooltip\", \"\", 3, \"select\", \"activate\", \"deactivate\", \"width\", \"height\", \"x\", \"y\", \"fill\", \"stops\", \"data\", \"orientation\", \"roundEdges\", \"gradient\", \"isActive\", \"ariaLabel\", \"animations\", \"tooltipDisabled\", \"tooltipPlacement\", \"tooltipType\", \"tooltipTitle\", \"tooltipTemplate\", \"tooltipContext\", \"noBarWhenZero\"], [\"ngx-charts-bar-label\", \"\", 3, \"barX\", \"barY\", \"barWidth\", \"barHeight\", \"value\", \"valueFormatting\", \"orientation\", \"dimensionsChanged\", 4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [\"ngx-charts-bar-label\", \"\", 3, \"dimensionsChanged\", \"barX\", \"barY\", \"barWidth\", \"barHeight\", \"value\", \"valueFormatting\", \"orientation\"]],\n template: function SeriesHorizontal_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, SeriesHorizontal__svg_g_0_Template, 1, 21, \"g\", 0)(1, SeriesHorizontal__svg_g_1_Template, 2, 2, \"g\", 1);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngForOf\", ctx.bars)(\"ngForTrackBy\", ctx.trackBy);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.showDataLabel);\n }\n },\n dependencies: [i1.NgForOf, i1.NgIf, TooltipDirective, BarComponent, BarLabelComponent],\n encapsulation: 2,\n data: {\n animation: [trigger('animationState', [transition(':leave', [style({\n opacity: 1\n }), animate(500, style({\n opacity: 0\n }))])])]\n },\n changeDetection: 0\n });\n }\n }\n return SeriesHorizontal;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet BarHorizontalComponent = /*#__PURE__*/(() => {\n class BarHorizontalComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.tooltipDisabled = false;\n this.showGridLines = true;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.barPadding = 8;\n this.roundDomains = false;\n this.roundEdges = true;\n this.showDataLabel = false;\n this.noBarWhenZero = true;\n this.wrapTicks = false;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.dataLabelMaxWidth = {\n negative: 0,\n positive: 0\n };\n }\n update() {\n super.update();\n if (!this.showDataLabel) {\n this.dataLabelMaxWidth = {\n negative: 0,\n positive: 0\n };\n }\n this.margin = [10, 20 + this.dataLabelMaxWidth.positive, 10, 20 + this.dataLabelMaxWidth.negative];\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n this.formatDates();\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n getXScale() {\n this.xDomain = this.getXDomain();\n const scale = scaleLinear().range([0, this.dims.width]).domain(this.xDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n getYScale() {\n this.yDomain = this.getYDomain();\n const spacing = this.yDomain.length / (this.dims.height / this.barPadding + 1);\n return scaleBand().rangeRound([0, this.dims.height]).paddingInner(spacing).domain(this.yDomain);\n }\n getXDomain() {\n const values = this.results.map(d => d.value);\n const min = this.xScaleMin ? Math.min(this.xScaleMin, ...values) : Math.min(0, ...values);\n const max = this.xScaleMax ? Math.max(this.xScaleMax, ...values) : Math.max(0, ...values);\n return [min, max];\n }\n getYDomain() {\n return this.results.map(d => d.label);\n }\n onClick(data) {\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.yDomain;\n } else {\n domain = this.xDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === 'ordinal') {\n opts.domain = this.yDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.xDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({\n width\n }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({\n height\n }) {\n this.xAxisHeight = height;\n this.update();\n }\n onDataLabelMaxWidthChanged(event) {\n if (event.size.negative) {\n this.dataLabelMaxWidth.negative = Math.max(this.dataLabelMaxWidth.negative, event.size.width);\n } else {\n this.dataLabelMaxWidth.positive = Math.max(this.dataLabelMaxWidth.positive, event.size.width);\n }\n if (event.index === this.results.length - 1) {\n setTimeout(() => this.update());\n }\n }\n onActivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n } else {\n return d.name === item.name;\n }\n });\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n if (idx > -1) {\n return;\n }\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n onDeactivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n } else {\n return d.name === item.name;\n }\n });\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n this.deactivate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵBarHorizontalComponent_BaseFactory;\n return function BarHorizontalComponent_Factory(__ngFactoryType__) {\n return (ɵBarHorizontalComponent_BaseFactory || (ɵBarHorizontalComponent_BaseFactory = i0.ɵɵgetInheritedFactory(BarHorizontalComponent)))(__ngFactoryType__ || BarHorizontalComponent);\n };\n })();\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: BarHorizontalComponent,\n selectors: [[\"ngx-charts-bar-horizontal\"]],\n contentQueries: function BarHorizontalComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, _c22, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tooltipTemplate = _t.first);\n }\n },\n inputs: {\n legend: \"legend\",\n legendTitle: \"legendTitle\",\n legendPosition: \"legendPosition\",\n xAxis: \"xAxis\",\n yAxis: \"yAxis\",\n showXAxisLabel: \"showXAxisLabel\",\n showYAxisLabel: \"showYAxisLabel\",\n xAxisLabel: \"xAxisLabel\",\n yAxisLabel: \"yAxisLabel\",\n tooltipDisabled: \"tooltipDisabled\",\n gradient: \"gradient\",\n showGridLines: \"showGridLines\",\n activeEntries: \"activeEntries\",\n schemeType: \"schemeType\",\n trimXAxisTicks: \"trimXAxisTicks\",\n trimYAxisTicks: \"trimYAxisTicks\",\n rotateXAxisTicks: \"rotateXAxisTicks\",\n maxXAxisTickLength: \"maxXAxisTickLength\",\n maxYAxisTickLength: \"maxYAxisTickLength\",\n xAxisTickFormatting: \"xAxisTickFormatting\",\n yAxisTickFormatting: \"yAxisTickFormatting\",\n xAxisTicks: \"xAxisTicks\",\n yAxisTicks: \"yAxisTicks\",\n barPadding: \"barPadding\",\n roundDomains: \"roundDomains\",\n roundEdges: \"roundEdges\",\n xScaleMax: \"xScaleMax\",\n xScaleMin: \"xScaleMin\",\n showDataLabel: \"showDataLabel\",\n dataLabelFormatting: \"dataLabelFormatting\",\n noBarWhenZero: \"noBarWhenZero\",\n wrapTicks: \"wrapTicks\"\n },\n outputs: {\n activate: \"activate\",\n deactivate: \"deactivate\"\n },\n standalone: false,\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 5,\n vars: 25,\n consts: [[3, \"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\", \"view\", \"showLegend\", \"legendOptions\", \"activeEntries\", \"animations\"], [1, \"bar-chart\", \"chart\"], [\"ngx-charts-x-axis\", \"\", 3, \"xScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [\"ngx-charts-y-axis\", \"\", 3, \"yScale\", \"dims\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"yAxisOffset\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [\"ngx-charts-series-horizontal\", \"\", 3, \"select\", \"activate\", \"deactivate\", \"dataLabelWidthChanged\", \"xScale\", \"yScale\", \"colors\", \"series\", \"dims\", \"gradient\", \"tooltipDisabled\", \"tooltipTemplate\", \"activeEntries\", \"roundEdges\", \"animations\", \"showDataLabel\", \"dataLabelFormatting\", \"noBarWhenZero\"], [\"ngx-charts-x-axis\", \"\", 3, \"dimensionsChanged\", \"xScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\"], [\"ngx-charts-y-axis\", \"\", 3, \"dimensionsChanged\", \"yScale\", \"dims\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"yAxisOffset\", \"wrapTicks\"]],\n template: function BarHorizontalComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"ngx-charts-chart\", 0);\n i0.ɵɵlistener(\"legendLabelClick\", function BarHorizontalComponent_Template_ngx_charts_chart_legendLabelClick_0_listener($event) {\n return ctx.onClick($event);\n })(\"legendLabelActivate\", function BarHorizontalComponent_Template_ngx_charts_chart_legendLabelActivate_0_listener($event) {\n return ctx.onActivate($event, true);\n })(\"legendLabelDeactivate\", function BarHorizontalComponent_Template_ngx_charts_chart_legendLabelDeactivate_0_listener($event) {\n return ctx.onDeactivate($event, true);\n });\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(1, \"g\", 1);\n i0.ɵɵtemplate(2, BarHorizontalComponent__svg_g_2_Template, 1, 11, \"g\", 2)(3, BarHorizontalComponent__svg_g_3_Template, 1, 10, \"g\", 3);\n i0.ɵɵelementStart(4, \"g\", 4);\n i0.ɵɵlistener(\"select\", function BarHorizontalComponent_Template_g_select_4_listener($event) {\n return ctx.onClick($event);\n })(\"activate\", function BarHorizontalComponent_Template_g_activate_4_listener($event) {\n return ctx.onActivate($event);\n })(\"deactivate\", function BarHorizontalComponent_Template_g_deactivate_4_listener($event) {\n return ctx.onDeactivate($event);\n })(\"dataLabelWidthChanged\", function BarHorizontalComponent_Template_g_dataLabelWidthChanged_4_listener($event) {\n return ctx.onDataLabelMaxWidthChanged($event);\n });\n i0.ɵɵelementEnd()()();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"view\", i0.ɵɵpureFunction2(22, _c24, ctx.width, ctx.height))(\"showLegend\", ctx.legend)(\"legendOptions\", ctx.legendOptions)(\"activeEntries\", ctx.activeEntries)(\"animations\", ctx.animations);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"transform\", ctx.transform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.xAxis);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.yAxis);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx.xScale)(\"yScale\", ctx.yScale)(\"colors\", ctx.colors)(\"series\", ctx.results)(\"dims\", ctx.dims)(\"gradient\", ctx.gradient)(\"tooltipDisabled\", ctx.tooltipDisabled)(\"tooltipTemplate\", ctx.tooltipTemplate)(\"activeEntries\", ctx.activeEntries)(\"roundEdges\", ctx.roundEdges)(\"animations\", ctx.animations)(\"showDataLabel\", ctx.showDataLabel)(\"dataLabelFormatting\", ctx.dataLabelFormatting)(\"noBarWhenZero\", ctx.noBarWhenZero);\n }\n },\n dependencies: [i1.NgIf, XAxisComponent, YAxisComponent, ChartComponent, SeriesHorizontal],\n styles: [_c25],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return BarHorizontalComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet BarHorizontal2DComponent = /*#__PURE__*/(() => {\n class BarHorizontal2DComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.tooltipDisabled = false;\n this.showGridLines = true;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.groupPadding = 16;\n this.barPadding = 8;\n this.roundDomains = false;\n this.roundEdges = true;\n this.showDataLabel = false;\n this.noBarWhenZero = true;\n this.wrapTicks = false;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.dataLabelMaxWidth = {\n negative: 0,\n positive: 0\n };\n this.isSSR = false;\n this.barOrientation = BarOrientation;\n this.trackBy = (index, item) => {\n return item.name;\n };\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n update() {\n super.update();\n if (!this.showDataLabel) {\n this.dataLabelMaxWidth = {\n negative: 0,\n positive: 0\n };\n }\n this.margin = [10, 20 + this.dataLabelMaxWidth.positive, 10, 20 + this.dataLabelMaxWidth.negative];\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n this.formatDates();\n this.groupDomain = this.getGroupDomain();\n this.innerDomain = this.getInnerDomain();\n this.valueDomain = this.getValueDomain();\n this.groupScale = this.getGroupScale();\n this.innerScale = this.getInnerScale();\n this.valueScale = this.getValueScale();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n getGroupScale() {\n const spacing = this.groupDomain.length / (this.dims.height / this.groupPadding + 1);\n return scaleBand().rangeRound([0, this.dims.height]).paddingInner(spacing).paddingOuter(spacing / 2).domain(this.groupDomain);\n }\n getInnerScale() {\n const height = this.groupScale.bandwidth();\n const spacing = this.innerDomain.length / (height / this.barPadding + 1);\n return scaleBand().rangeRound([0, height]).paddingInner(spacing).domain(this.innerDomain);\n }\n getValueScale() {\n const scale = scaleLinear().range([0, this.dims.width]).domain(this.valueDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n getGroupDomain() {\n const domain = [];\n for (const group of this.results) {\n if (!domain.includes(group.label)) {\n domain.push(group.label);\n }\n }\n return domain;\n }\n getInnerDomain() {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.label)) {\n domain.push(d.label);\n }\n }\n }\n return domain;\n }\n getValueDomain() {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.value)) {\n domain.push(d.value);\n }\n }\n }\n const min = Math.min(0, ...domain);\n const max = this.xScaleMax ? Math.max(this.xScaleMax, ...domain) : Math.max(0, ...domain);\n return [min, max];\n }\n groupTransform(group) {\n return `translate(0, ${this.groupScale(group.label)})`;\n }\n onClick(data, group) {\n if (group) {\n data.series = group.name;\n }\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.innerDomain;\n } else {\n domain = this.valueDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.innerDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.valueDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({\n width\n }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({\n height\n }) {\n this.xAxisHeight = height;\n this.update();\n }\n onDataLabelMaxWidthChanged(event, groupIndex) {\n if (event.size.negative) {\n this.dataLabelMaxWidth.negative = Math.max(this.dataLabelMaxWidth.negative, event.size.width);\n } else {\n this.dataLabelMaxWidth.positive = Math.max(this.dataLabelMaxWidth.positive, event.size.width);\n }\n if (groupIndex === this.results.length - 1) {\n setTimeout(() => this.update());\n }\n }\n onActivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n const items = this.results.map(g => g.series).flat().filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n } else {\n return i.name === item.name && i.series === item.series;\n }\n });\n this.activeEntries = [...items];\n this.activate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n onDeactivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n } else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n this.deactivate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵBarHorizontal2DComponent_BaseFactory;\n return function BarHorizontal2DComponent_Factory(__ngFactoryType__) {\n return (ɵBarHorizontal2DComponent_BaseFactory || (ɵBarHorizontal2DComponent_BaseFactory = i0.ɵɵgetInheritedFactory(BarHorizontal2DComponent)))(__ngFactoryType__ || BarHorizontal2DComponent);\n };\n })();\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: BarHorizontal2DComponent,\n selectors: [[\"ngx-charts-bar-horizontal-2d\"]],\n contentQueries: function BarHorizontal2DComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, _c22, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tooltipTemplate = _t.first);\n }\n },\n inputs: {\n legend: \"legend\",\n legendTitle: \"legendTitle\",\n legendPosition: \"legendPosition\",\n xAxis: \"xAxis\",\n yAxis: \"yAxis\",\n showXAxisLabel: \"showXAxisLabel\",\n showYAxisLabel: \"showYAxisLabel\",\n xAxisLabel: \"xAxisLabel\",\n yAxisLabel: \"yAxisLabel\",\n tooltipDisabled: \"tooltipDisabled\",\n gradient: \"gradient\",\n showGridLines: \"showGridLines\",\n activeEntries: \"activeEntries\",\n schemeType: \"schemeType\",\n trimXAxisTicks: \"trimXAxisTicks\",\n trimYAxisTicks: \"trimYAxisTicks\",\n rotateXAxisTicks: \"rotateXAxisTicks\",\n maxXAxisTickLength: \"maxXAxisTickLength\",\n maxYAxisTickLength: \"maxYAxisTickLength\",\n xAxisTickFormatting: \"xAxisTickFormatting\",\n yAxisTickFormatting: \"yAxisTickFormatting\",\n xAxisTicks: \"xAxisTicks\",\n yAxisTicks: \"yAxisTicks\",\n groupPadding: \"groupPadding\",\n barPadding: \"barPadding\",\n roundDomains: \"roundDomains\",\n roundEdges: \"roundEdges\",\n xScaleMax: \"xScaleMax\",\n showDataLabel: \"showDataLabel\",\n dataLabelFormatting: \"dataLabelFormatting\",\n noBarWhenZero: \"noBarWhenZero\",\n wrapTicks: \"wrapTicks\"\n },\n outputs: {\n activate: \"activate\",\n deactivate: \"deactivate\"\n },\n standalone: false,\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 7,\n vars: 18,\n consts: [[3, \"legendLabelActivate\", \"legendLabelDeactivate\", \"legendLabelClick\", \"view\", \"showLegend\", \"legendOptions\", \"activeEntries\", \"animations\"], [1, \"bar-chart\", \"chart\"], [\"ngx-charts-grid-panel-series\", \"\", 3, \"xScale\", \"yScale\", \"data\", \"dims\", \"orient\"], [\"ngx-charts-x-axis\", \"\", 3, \"xScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [\"ngx-charts-y-axis\", \"\", 3, \"yScale\", \"dims\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"yAxisOffset\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [4, \"ngIf\"], [\"ngx-charts-x-axis\", \"\", 3, \"dimensionsChanged\", \"xScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\"], [\"ngx-charts-y-axis\", \"\", 3, \"dimensionsChanged\", \"yScale\", \"dims\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"yAxisOffset\", \"wrapTicks\"], [4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [\"ngx-charts-series-horizontal\", \"\", 3, \"select\", \"activate\", \"deactivate\", \"dataLabelWidthChanged\", \"xScale\", \"activeEntries\", \"yScale\", \"colors\", \"series\", \"dims\", \"gradient\", \"tooltipDisabled\", \"tooltipTemplate\", \"seriesName\", \"roundEdges\", \"animations\", \"showDataLabel\", \"dataLabelFormatting\", \"noBarWhenZero\"]],\n template: function BarHorizontal2DComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"ngx-charts-chart\", 0);\n i0.ɵɵlistener(\"legendLabelActivate\", function BarHorizontal2DComponent_Template_ngx_charts_chart_legendLabelActivate_0_listener($event) {\n return ctx.onActivate($event, undefined, true);\n })(\"legendLabelDeactivate\", function BarHorizontal2DComponent_Template_ngx_charts_chart_legendLabelDeactivate_0_listener($event) {\n return ctx.onDeactivate($event, undefined, true);\n })(\"legendLabelClick\", function BarHorizontal2DComponent_Template_ngx_charts_chart_legendLabelClick_0_listener($event) {\n return ctx.onClick($event);\n });\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(1, \"g\", 1);\n i0.ɵɵelement(2, \"g\", 2);\n i0.ɵɵtemplate(3, BarHorizontal2DComponent__svg_g_3_Template, 1, 11, \"g\", 3)(4, BarHorizontal2DComponent__svg_g_4_Template, 1, 10, \"g\", 4)(5, BarHorizontal2DComponent__svg_g_5_Template, 2, 2, \"g\", 5)(6, BarHorizontal2DComponent__svg_g_6_Template, 2, 2, \"g\", 5);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"view\", i0.ɵɵpureFunction2(15, _c24, ctx.width, ctx.height))(\"showLegend\", ctx.legend)(\"legendOptions\", ctx.legendOptions)(\"activeEntries\", ctx.activeEntries)(\"animations\", ctx.animations);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"transform\", ctx.transform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx.valueScale)(\"yScale\", ctx.groupScale)(\"data\", ctx.results)(\"dims\", ctx.dims)(\"orient\", ctx.barOrientation.Horizontal);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.xAxis);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.yAxis);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx.isSSR);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.isSSR);\n }\n },\n dependencies: [i1.NgForOf, i1.NgIf, XAxisComponent, YAxisComponent, ChartComponent, GridPanelSeriesComponent, SeriesHorizontal],\n styles: [_c25],\n encapsulation: 2,\n data: {\n animation: [trigger('animationState', [transition(':leave', [style({\n opacity: 1,\n transform: '*'\n }), animate(500, style({\n opacity: 0,\n transform: 'scale(0)'\n }))])])]\n },\n changeDetection: 0\n });\n }\n }\n return BarHorizontal2DComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet BarHorizontalNormalizedComponent = /*#__PURE__*/(() => {\n class BarHorizontalNormalizedComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.tooltipDisabled = false;\n this.showGridLines = true;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.barPadding = 8;\n this.roundDomains = false;\n this.noBarWhenZero = true;\n this.wrapTicks = false;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.valueDomain = [0, 100];\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.barChartType = BarChartType;\n this.isSSR = false;\n this.trackBy = (index, item) => {\n return item.name;\n };\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n update() {\n super.update();\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n this.formatDates();\n this.groupDomain = this.getGroupDomain();\n this.innerDomain = this.getInnerDomain();\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n getGroupDomain() {\n const domain = [];\n for (const group of this.results) {\n if (!domain.includes(group.label)) {\n domain.push(group.label);\n }\n }\n return domain;\n }\n getInnerDomain() {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.label)) {\n domain.push(d.label);\n }\n }\n }\n return domain;\n }\n getYScale() {\n const spacing = this.groupDomain.length / (this.dims.height / this.barPadding + 1);\n return scaleBand().rangeRound([0, this.dims.height]).paddingInner(spacing).domain(this.groupDomain);\n }\n getXScale() {\n const scale = scaleLinear().range([0, this.dims.width]).domain(this.valueDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n groupTransform(group) {\n return `translate(0, ${this.yScale(group.name)})`;\n }\n onClick(data, group) {\n if (group) {\n data.series = group.name;\n }\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.innerDomain;\n } else {\n domain = this.valueDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.innerDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.valueDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({\n width\n }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({\n height\n }) {\n this.xAxisHeight = height;\n this.update();\n }\n onActivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n const items = this.results.map(g => g.series).flat().filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n } else {\n return i.name === item.name && i.series === item.series;\n }\n });\n this.activeEntries = [...items];\n this.activate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n onDeactivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n } else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n this.deactivate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵBarHorizontalNormalizedComponent_BaseFactory;\n return function BarHorizontalNormalizedComponent_Factory(__ngFactoryType__) {\n return (ɵBarHorizontalNormalizedComponent_BaseFactory || (ɵBarHorizontalNormalizedComponent_BaseFactory = i0.ɵɵgetInheritedFactory(BarHorizontalNormalizedComponent)))(__ngFactoryType__ || BarHorizontalNormalizedComponent);\n };\n })();\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: BarHorizontalNormalizedComponent,\n selectors: [[\"ngx-charts-bar-horizontal-normalized\"]],\n contentQueries: function BarHorizontalNormalizedComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, _c22, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tooltipTemplate = _t.first);\n }\n },\n inputs: {\n legend: \"legend\",\n legendTitle: \"legendTitle\",\n legendPosition: \"legendPosition\",\n xAxis: \"xAxis\",\n yAxis: \"yAxis\",\n showXAxisLabel: \"showXAxisLabel\",\n showYAxisLabel: \"showYAxisLabel\",\n xAxisLabel: \"xAxisLabel\",\n yAxisLabel: \"yAxisLabel\",\n tooltipDisabled: \"tooltipDisabled\",\n gradient: \"gradient\",\n showGridLines: \"showGridLines\",\n activeEntries: \"activeEntries\",\n schemeType: \"schemeType\",\n trimXAxisTicks: \"trimXAxisTicks\",\n trimYAxisTicks: \"trimYAxisTicks\",\n rotateXAxisTicks: \"rotateXAxisTicks\",\n maxXAxisTickLength: \"maxXAxisTickLength\",\n maxYAxisTickLength: \"maxYAxisTickLength\",\n xAxisTickFormatting: \"xAxisTickFormatting\",\n yAxisTickFormatting: \"yAxisTickFormatting\",\n xAxisTicks: \"xAxisTicks\",\n yAxisTicks: \"yAxisTicks\",\n barPadding: \"barPadding\",\n roundDomains: \"roundDomains\",\n noBarWhenZero: \"noBarWhenZero\",\n wrapTicks: \"wrapTicks\"\n },\n outputs: {\n activate: \"activate\",\n deactivate: \"deactivate\"\n },\n standalone: false,\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 6,\n vars: 13,\n consts: [[3, \"legendLabelActivate\", \"legendLabelDeactivate\", \"legendLabelClick\", \"view\", \"showLegend\", \"legendOptions\", \"activeEntries\", \"animations\"], [1, \"bar-chart\", \"chart\"], [\"ngx-charts-x-axis\", \"\", 3, \"xScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [\"ngx-charts-y-axis\", \"\", 3, \"yScale\", \"dims\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [4, \"ngIf\"], [\"ngx-charts-x-axis\", \"\", 3, \"dimensionsChanged\", \"xScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\"], [\"ngx-charts-y-axis\", \"\", 3, \"dimensionsChanged\", \"yScale\", \"dims\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\"], [4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [\"ngx-charts-series-horizontal\", \"\", 3, \"select\", \"activate\", \"deactivate\", \"type\", \"xScale\", \"yScale\", \"activeEntries\", \"colors\", \"series\", \"dims\", \"gradient\", \"tooltipDisabled\", \"tooltipTemplate\", \"seriesName\", \"animations\", \"noBarWhenZero\"]],\n template: function BarHorizontalNormalizedComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"ngx-charts-chart\", 0);\n i0.ɵɵlistener(\"legendLabelActivate\", function BarHorizontalNormalizedComponent_Template_ngx_charts_chart_legendLabelActivate_0_listener($event) {\n return ctx.onActivate($event, undefined, true);\n })(\"legendLabelDeactivate\", function BarHorizontalNormalizedComponent_Template_ngx_charts_chart_legendLabelDeactivate_0_listener($event) {\n return ctx.onDeactivate($event, undefined, true);\n })(\"legendLabelClick\", function BarHorizontalNormalizedComponent_Template_ngx_charts_chart_legendLabelClick_0_listener($event) {\n return ctx.onClick($event);\n });\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(1, \"g\", 1);\n i0.ɵɵtemplate(2, BarHorizontalNormalizedComponent__svg_g_2_Template, 1, 11, \"g\", 2)(3, BarHorizontalNormalizedComponent__svg_g_3_Template, 1, 9, \"g\", 3)(4, BarHorizontalNormalizedComponent__svg_g_4_Template, 2, 2, \"g\", 4)(5, BarHorizontalNormalizedComponent__svg_g_5_Template, 2, 2, \"g\", 4);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"view\", i0.ɵɵpureFunction2(10, _c24, ctx.width, ctx.height))(\"showLegend\", ctx.legend)(\"legendOptions\", ctx.legendOptions)(\"activeEntries\", ctx.activeEntries)(\"animations\", ctx.animations);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"transform\", ctx.transform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.xAxis);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.yAxis);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx.isSSR);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.isSSR);\n }\n },\n dependencies: [i1.NgForOf, i1.NgIf, XAxisComponent, YAxisComponent, ChartComponent, SeriesHorizontal],\n styles: [_c25],\n encapsulation: 2,\n data: {\n animation: [trigger('animationState', [transition(':leave', [style({\n opacity: 1,\n transform: '*'\n }), animate(500, style({\n opacity: 0,\n transform: 'scale(0)'\n }))])])]\n },\n changeDetection: 0\n });\n }\n }\n return BarHorizontalNormalizedComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet BarHorizontalStackedComponent = /*#__PURE__*/(() => {\n class BarHorizontalStackedComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.tooltipDisabled = false;\n this.showGridLines = true;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.barPadding = 8;\n this.roundDomains = false;\n this.showDataLabel = false;\n this.noBarWhenZero = true;\n this.wrapTicks = false;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.dataLabelMaxWidth = {\n negative: 0,\n positive: 0\n };\n this.barChartType = BarChartType;\n this.isSSR = false;\n this.trackBy = (index, item) => {\n return item.name;\n };\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n update() {\n super.update();\n if (!this.showDataLabel) {\n this.dataLabelMaxWidth = {\n negative: 0,\n positive: 0\n };\n }\n this.margin = [10, 20 + this.dataLabelMaxWidth.positive, 10, 20 + this.dataLabelMaxWidth.negative];\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n this.formatDates();\n this.groupDomain = this.getGroupDomain();\n this.innerDomain = this.getInnerDomain();\n this.valueDomain = this.getValueDomain();\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n getGroupDomain() {\n const domain = [];\n for (const group of this.results) {\n if (!domain.includes(group.label)) {\n domain.push(group.label);\n }\n }\n return domain;\n }\n getInnerDomain() {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.label)) {\n domain.push(d.label);\n }\n }\n }\n return domain;\n }\n getValueDomain() {\n const domain = [];\n let smallest = 0;\n let biggest = 0;\n for (const group of this.results) {\n let smallestSum = 0;\n let biggestSum = 0;\n for (const d of group.series) {\n if (d.value < 0) {\n smallestSum += d.value;\n } else {\n biggestSum += d.value;\n }\n smallest = d.value < smallest ? d.value : smallest;\n biggest = d.value > biggest ? d.value : biggest;\n }\n domain.push(smallestSum);\n domain.push(biggestSum);\n }\n domain.push(smallest);\n domain.push(biggest);\n const min = Math.min(0, ...domain);\n const max = this.xScaleMax ? Math.max(this.xScaleMax, ...domain) : Math.max(...domain);\n return [min, max];\n }\n getYScale() {\n const spacing = this.groupDomain.length / (this.dims.height / this.barPadding + 1);\n return scaleBand().rangeRound([0, this.dims.height]).paddingInner(spacing).domain(this.groupDomain);\n }\n getXScale() {\n const scale = scaleLinear().range([0, this.dims.width]).domain(this.valueDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n groupTransform(group) {\n return `translate(0, ${this.yScale(group.name)})`;\n }\n onClick(data, group) {\n if (group) {\n data.series = group.name;\n }\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.innerDomain;\n } else {\n domain = this.valueDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.innerDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.valueDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({\n width\n }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({\n height\n }) {\n this.xAxisHeight = height;\n this.update();\n }\n onDataLabelMaxWidthChanged(event, groupIndex) {\n if (event.size.negative) {\n this.dataLabelMaxWidth.negative = Math.max(this.dataLabelMaxWidth.negative, event.size.width);\n } else {\n this.dataLabelMaxWidth.positive = Math.max(this.dataLabelMaxWidth.positive, event.size.width);\n }\n if (groupIndex === this.results.length - 1) {\n setTimeout(() => this.update());\n }\n }\n onActivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n const items = this.results.map(g => g.series).flat().filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n } else {\n return i.name === item.name && i.series === item.series;\n }\n });\n this.activeEntries = [...items];\n this.activate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n onDeactivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n } else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n this.deactivate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵBarHorizontalStackedComponent_BaseFactory;\n return function BarHorizontalStackedComponent_Factory(__ngFactoryType__) {\n return (ɵBarHorizontalStackedComponent_BaseFactory || (ɵBarHorizontalStackedComponent_BaseFactory = i0.ɵɵgetInheritedFactory(BarHorizontalStackedComponent)))(__ngFactoryType__ || BarHorizontalStackedComponent);\n };\n })();\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: BarHorizontalStackedComponent,\n selectors: [[\"ngx-charts-bar-horizontal-stacked\"]],\n contentQueries: function BarHorizontalStackedComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, _c22, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tooltipTemplate = _t.first);\n }\n },\n inputs: {\n legend: \"legend\",\n legendTitle: \"legendTitle\",\n legendPosition: \"legendPosition\",\n xAxis: \"xAxis\",\n yAxis: \"yAxis\",\n showXAxisLabel: \"showXAxisLabel\",\n showYAxisLabel: \"showYAxisLabel\",\n xAxisLabel: \"xAxisLabel\",\n yAxisLabel: \"yAxisLabel\",\n tooltipDisabled: \"tooltipDisabled\",\n gradient: \"gradient\",\n showGridLines: \"showGridLines\",\n activeEntries: \"activeEntries\",\n schemeType: \"schemeType\",\n trimXAxisTicks: \"trimXAxisTicks\",\n trimYAxisTicks: \"trimYAxisTicks\",\n rotateXAxisTicks: \"rotateXAxisTicks\",\n maxXAxisTickLength: \"maxXAxisTickLength\",\n maxYAxisTickLength: \"maxYAxisTickLength\",\n xAxisTickFormatting: \"xAxisTickFormatting\",\n yAxisTickFormatting: \"yAxisTickFormatting\",\n xAxisTicks: \"xAxisTicks\",\n yAxisTicks: \"yAxisTicks\",\n barPadding: \"barPadding\",\n roundDomains: \"roundDomains\",\n xScaleMax: \"xScaleMax\",\n showDataLabel: \"showDataLabel\",\n dataLabelFormatting: \"dataLabelFormatting\",\n noBarWhenZero: \"noBarWhenZero\",\n wrapTicks: \"wrapTicks\"\n },\n outputs: {\n activate: \"activate\",\n deactivate: \"deactivate\"\n },\n standalone: false,\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 6,\n vars: 13,\n consts: [[3, \"legendLabelActivate\", \"legendLabelDeactivate\", \"legendLabelClick\", \"view\", \"showLegend\", \"legendOptions\", \"activeEntries\", \"animations\"], [1, \"bar-chart\", \"chart\"], [\"ngx-charts-x-axis\", \"\", 3, \"xScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [\"ngx-charts-y-axis\", \"\", 3, \"yScale\", \"dims\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"yAxisOffset\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [4, \"ngIf\"], [\"ngx-charts-x-axis\", \"\", 3, \"dimensionsChanged\", \"xScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\"], [\"ngx-charts-y-axis\", \"\", 3, \"dimensionsChanged\", \"yScale\", \"dims\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"yAxisOffset\", \"wrapTicks\"], [4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [\"ngx-charts-series-horizontal\", \"\", 3, \"select\", \"activate\", \"deactivate\", \"dataLabelWidthChanged\", \"type\", \"xScale\", \"yScale\", \"colors\", \"series\", \"activeEntries\", \"dims\", \"gradient\", \"tooltipDisabled\", \"tooltipTemplate\", \"seriesName\", \"animations\", \"showDataLabel\", \"dataLabelFormatting\", \"noBarWhenZero\"]],\n template: function BarHorizontalStackedComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"ngx-charts-chart\", 0);\n i0.ɵɵlistener(\"legendLabelActivate\", function BarHorizontalStackedComponent_Template_ngx_charts_chart_legendLabelActivate_0_listener($event) {\n return ctx.onActivate($event, undefined, true);\n })(\"legendLabelDeactivate\", function BarHorizontalStackedComponent_Template_ngx_charts_chart_legendLabelDeactivate_0_listener($event) {\n return ctx.onDeactivate($event, undefined, true);\n })(\"legendLabelClick\", function BarHorizontalStackedComponent_Template_ngx_charts_chart_legendLabelClick_0_listener($event) {\n return ctx.onClick($event);\n });\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(1, \"g\", 1);\n i0.ɵɵtemplate(2, BarHorizontalStackedComponent__svg_g_2_Template, 1, 11, \"g\", 2)(3, BarHorizontalStackedComponent__svg_g_3_Template, 1, 10, \"g\", 3)(4, BarHorizontalStackedComponent__svg_g_4_Template, 2, 2, \"g\", 4)(5, BarHorizontalStackedComponent__svg_g_5_Template, 2, 2, \"g\", 4);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"view\", i0.ɵɵpureFunction2(10, _c24, ctx.width, ctx.height))(\"showLegend\", ctx.legend)(\"legendOptions\", ctx.legendOptions)(\"activeEntries\", ctx.activeEntries)(\"animations\", ctx.animations);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"transform\", ctx.transform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.xAxis);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.yAxis);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx.isSSR);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.isSSR);\n }\n },\n dependencies: [i1.NgForOf, i1.NgIf, XAxisComponent, YAxisComponent, ChartComponent, SeriesHorizontal],\n styles: [_c25],\n encapsulation: 2,\n data: {\n animation: [trigger('animationState', [transition(':leave', [style({\n opacity: 1,\n transform: '*'\n }), animate(500, style({\n opacity: 0,\n transform: 'scale(0)'\n }))])])]\n },\n changeDetection: 0\n });\n }\n }\n return BarHorizontalStackedComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SeriesVerticalComponent = /*#__PURE__*/(() => {\n class SeriesVerticalComponent {\n constructor(platformId) {\n this.platformId = platformId;\n this.type = BarChartType.Standard;\n this.tooltipDisabled = false;\n this.animations = true;\n this.showDataLabel = false;\n this.noBarWhenZero = true;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.dataLabelHeightChanged = new EventEmitter();\n this.barsForDataLabels = [];\n this.barOrientation = BarOrientation;\n this.isSSR = false;\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n ngOnChanges(changes) {\n this.update();\n }\n update() {\n this.updateTooltipSettings();\n let width;\n if (this.series.length) {\n width = this.xScale.bandwidth();\n }\n width = Math.round(width);\n const yScaleMin = Math.max(this.yScale.domain()[0], 0);\n const d0 = {\n [D0Types.positive]: 0,\n [D0Types.negative]: 0\n };\n let d0Type = D0Types.positive;\n let total;\n if (this.type === BarChartType.Normalized) {\n total = this.series.map(d => d.value).reduce((sum, d) => sum + d, 0);\n }\n this.bars = this.series.map((d, index) => {\n let value = d.value;\n const label = this.getLabel(d);\n const formattedLabel = formatLabel(label);\n const roundEdges = this.roundEdges;\n d0Type = value > 0 ? D0Types.positive : D0Types.negative;\n const bar = {\n value,\n label,\n roundEdges,\n data: d,\n width,\n formattedLabel,\n height: 0,\n x: 0,\n y: 0\n };\n if (this.type === BarChartType.Standard) {\n bar.height = Math.abs(this.yScale(value) - this.yScale(yScaleMin));\n bar.x = this.xScale(label);\n if (value < 0) {\n bar.y = this.yScale(0);\n } else {\n bar.y = this.yScale(value);\n }\n } else if (this.type === BarChartType.Stacked) {\n const offset0 = d0[d0Type];\n const offset1 = offset0 + value;\n d0[d0Type] += value;\n bar.height = this.yScale(offset0) - this.yScale(offset1);\n bar.x = 0;\n bar.y = this.yScale(offset1);\n bar.offset0 = offset0;\n bar.offset1 = offset1;\n } else if (this.type === BarChartType.Normalized) {\n let offset0 = d0[d0Type];\n let offset1 = offset0 + value;\n d0[d0Type] += value;\n if (total > 0) {\n offset0 = offset0 * 100 / total;\n offset1 = offset1 * 100 / total;\n } else {\n offset0 = 0;\n offset1 = 0;\n }\n bar.height = this.yScale(offset0) - this.yScale(offset1);\n bar.x = 0;\n bar.y = this.yScale(offset1);\n bar.offset0 = offset0;\n bar.offset1 = offset1;\n value = (offset1 - offset0).toFixed(2) + '%';\n }\n if (this.colors.scaleType === ScaleType.Ordinal) {\n bar.color = this.colors.getColor(label);\n } else {\n if (this.type === BarChartType.Standard) {\n bar.color = this.colors.getColor(value);\n bar.gradientStops = this.colors.getLinearGradientStops(value);\n } else {\n bar.color = this.colors.getColor(bar.offset1);\n bar.gradientStops = this.colors.getLinearGradientStops(bar.offset1, bar.offset0);\n }\n }\n let tooltipLabel = formattedLabel;\n bar.ariaLabel = formattedLabel + ' ' + value.toLocaleString();\n if (this.seriesName !== null && this.seriesName !== undefined) {\n tooltipLabel = `${this.seriesName} • ${formattedLabel}`;\n bar.data.series = this.seriesName;\n bar.ariaLabel = this.seriesName + ' ' + bar.ariaLabel;\n }\n bar.tooltipText = this.tooltipDisabled ? undefined : `\n ${escapeLabel(tooltipLabel)}\n ${this.dataLabelFormatting ? this.dataLabelFormatting(value) : value.toLocaleString()}\n `;\n return bar;\n });\n this.updateDataLabels();\n }\n updateDataLabels() {\n if (this.type === BarChartType.Stacked) {\n this.barsForDataLabels = [];\n const section = {};\n section.series = this.seriesName;\n const totalPositive = this.series.map(d => d.value).reduce((sum, d) => d > 0 ? sum + d : sum, 0);\n const totalNegative = this.series.map(d => d.value).reduce((sum, d) => d < 0 ? sum + d : sum, 0);\n section.total = totalPositive + totalNegative;\n section.x = 0;\n section.y = 0;\n if (section.total > 0) {\n section.height = this.yScale(totalPositive);\n } else {\n section.height = this.yScale(totalNegative);\n }\n section.width = this.xScale.bandwidth();\n this.barsForDataLabels.push(section);\n } else {\n this.barsForDataLabels = this.series.map(d => {\n const section = {};\n section.series = this.seriesName ?? d.label;\n section.total = d.value;\n section.x = this.xScale(d.label);\n section.y = this.yScale(0);\n section.height = this.yScale(section.total) - this.yScale(0);\n section.width = this.xScale.bandwidth();\n return section;\n });\n }\n }\n updateTooltipSettings() {\n this.tooltipPlacement = this.tooltipDisabled ? undefined : PlacementTypes.Top;\n this.tooltipType = this.tooltipDisabled ? undefined : StyleTypes.tooltip;\n }\n isActive(entry) {\n if (!this.activeEntries) return false;\n const item = this.activeEntries.find(active => {\n return entry.name === active.name && entry.value === active.value;\n });\n return item !== undefined;\n }\n onClick(data) {\n this.select.emit(data);\n }\n getLabel(dataItem) {\n if (dataItem.label) {\n return dataItem.label;\n }\n return dataItem.name;\n }\n trackBy(index, bar) {\n return bar.label;\n }\n trackDataLabelBy(index, barLabel) {\n return index + '#' + barLabel.series + '#' + barLabel.total;\n }\n static {\n this.ɵfac = function SeriesVerticalComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || SeriesVerticalComponent)(i0.ɵɵdirectiveInject(PLATFORM_ID));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: SeriesVerticalComponent,\n selectors: [[\"g\", \"ngx-charts-series-vertical\", \"\"]],\n inputs: {\n dims: \"dims\",\n type: \"type\",\n series: \"series\",\n xScale: \"xScale\",\n yScale: \"yScale\",\n colors: \"colors\",\n gradient: \"gradient\",\n activeEntries: \"activeEntries\",\n seriesName: \"seriesName\",\n tooltipDisabled: \"tooltipDisabled\",\n tooltipTemplate: \"tooltipTemplate\",\n roundEdges: \"roundEdges\",\n animations: \"animations\",\n showDataLabel: \"showDataLabel\",\n dataLabelFormatting: \"dataLabelFormatting\",\n noBarWhenZero: \"noBarWhenZero\"\n },\n outputs: {\n select: \"select\",\n activate: \"activate\",\n deactivate: \"deactivate\",\n dataLabelHeightChanged: \"dataLabelHeightChanged\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n attrs: _c29,\n decls: 3,\n vars: 3,\n consts: [[4, \"ngIf\"], [\"ngx-charts-bar\", \"\", \"ngx-tooltip\", \"\", 3, \"width\", \"height\", \"x\", \"y\", \"fill\", \"stops\", \"data\", \"orientation\", \"roundEdges\", \"gradient\", \"ariaLabel\", \"isActive\", \"tooltipDisabled\", \"tooltipPlacement\", \"tooltipType\", \"tooltipTitle\", \"tooltipTemplate\", \"tooltipContext\", \"noBarWhenZero\", \"animations\", \"select\", \"activate\", \"deactivate\", 4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [\"ngx-charts-bar\", \"\", \"ngx-tooltip\", \"\", 3, \"select\", \"activate\", \"deactivate\", \"width\", \"height\", \"x\", \"y\", \"fill\", \"stops\", \"data\", \"orientation\", \"roundEdges\", \"gradient\", \"ariaLabel\", \"isActive\", \"tooltipDisabled\", \"tooltipPlacement\", \"tooltipType\", \"tooltipTitle\", \"tooltipTemplate\", \"tooltipContext\", \"noBarWhenZero\", \"animations\"], [\"ngx-charts-bar-label\", \"\", 3, \"barX\", \"barY\", \"barWidth\", \"barHeight\", \"value\", \"valueFormatting\", \"orientation\", \"dimensionsChanged\", 4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [\"ngx-charts-bar-label\", \"\", 3, \"dimensionsChanged\", \"barX\", \"barY\", \"barWidth\", \"barHeight\", \"value\", \"valueFormatting\", \"orientation\"]],\n template: function SeriesVerticalComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, SeriesVerticalComponent__svg_g_0_Template, 2, 2, \"g\", 0)(1, SeriesVerticalComponent__svg_g_1_Template, 2, 2, \"g\", 0)(2, SeriesVerticalComponent__svg_g_2_Template, 2, 2, \"g\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", !ctx.isSSR);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.isSSR);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.showDataLabel);\n }\n },\n dependencies: [i1.NgForOf, i1.NgIf, TooltipDirective, BarComponent, BarLabelComponent],\n encapsulation: 2,\n data: {\n animation: [trigger('animationState', [transition(':leave', [style({\n opacity: 1\n }), animate(500, style({\n opacity: 0\n }))])])]\n },\n changeDetection: 0\n });\n }\n }\n return SeriesVerticalComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet BarVerticalComponent = /*#__PURE__*/(() => {\n class BarVerticalComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.tooltipDisabled = false;\n this.showGridLines = true;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.barPadding = 8;\n this.roundDomains = false;\n this.roundEdges = true;\n this.showDataLabel = false;\n this.noBarWhenZero = true;\n this.wrapTicks = false;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.dataLabelMaxHeight = {\n negative: 0,\n positive: 0\n };\n }\n update() {\n super.update();\n if (!this.showDataLabel) {\n this.dataLabelMaxHeight = {\n negative: 0,\n positive: 0\n };\n }\n this.margin = [10 + this.dataLabelMaxHeight.positive, 20, 10 + this.dataLabelMaxHeight.negative, 20];\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n this.formatDates();\n if (this.showDataLabel) {\n this.dims.height -= this.dataLabelMaxHeight.negative;\n }\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0] + this.dataLabelMaxHeight.negative})`;\n }\n getXScale() {\n this.xDomain = this.getXDomain();\n const spacing = this.xDomain.length / (this.dims.width / this.barPadding + 1);\n return scaleBand().range([0, this.dims.width]).paddingInner(spacing).domain(this.xDomain);\n }\n getYScale() {\n this.yDomain = this.getYDomain();\n const scale = scaleLinear().range([this.dims.height, 0]).domain(this.yDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n getXDomain() {\n return this.results.map(d => d.label);\n }\n getYDomain() {\n const values = this.results.map(d => d.value);\n let min = this.yScaleMin ? Math.min(this.yScaleMin, ...values) : Math.min(0, ...values);\n if (this.yAxisTicks && !this.yAxisTicks.some(isNaN)) {\n min = Math.min(min, ...this.yAxisTicks);\n }\n let max = this.yScaleMax ? Math.max(this.yScaleMax, ...values) : Math.max(0, ...values);\n if (this.yAxisTicks && !this.yAxisTicks.some(isNaN)) {\n max = Math.max(max, ...this.yAxisTicks);\n }\n return [min, max];\n }\n onClick(data) {\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.xDomain;\n } else {\n domain = this.yDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.xDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.yDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({\n width\n }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({\n height\n }) {\n this.xAxisHeight = height;\n this.update();\n }\n onDataLabelMaxHeightChanged(event) {\n if (event.size.negative) {\n this.dataLabelMaxHeight.negative = Math.max(this.dataLabelMaxHeight.negative, event.size.height);\n } else {\n this.dataLabelMaxHeight.positive = Math.max(this.dataLabelMaxHeight.positive, event.size.height);\n }\n if (event.index === this.results.length - 1) {\n setTimeout(() => this.update());\n }\n }\n onActivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n } else {\n return d.name === item.name;\n }\n });\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n if (idx > -1) {\n return;\n }\n this.activeEntries = [item, ...this.activeEntries];\n this.activate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n onDeactivate(item, fromLegend = false) {\n item = this.results.find(d => {\n if (fromLegend) {\n return d.label === item.name;\n } else {\n return d.name === item.name;\n }\n });\n const idx = this.activeEntries.findIndex(d => {\n return d.name === item.name && d.value === item.value && d.series === item.series;\n });\n this.activeEntries.splice(idx, 1);\n this.activeEntries = [...this.activeEntries];\n this.deactivate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵBarVerticalComponent_BaseFactory;\n return function BarVerticalComponent_Factory(__ngFactoryType__) {\n return (ɵBarVerticalComponent_BaseFactory || (ɵBarVerticalComponent_BaseFactory = i0.ɵɵgetInheritedFactory(BarVerticalComponent)))(__ngFactoryType__ || BarVerticalComponent);\n };\n })();\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: BarVerticalComponent,\n selectors: [[\"ngx-charts-bar-vertical\"]],\n contentQueries: function BarVerticalComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, _c22, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tooltipTemplate = _t.first);\n }\n },\n inputs: {\n legend: \"legend\",\n legendTitle: \"legendTitle\",\n legendPosition: \"legendPosition\",\n xAxis: \"xAxis\",\n yAxis: \"yAxis\",\n showXAxisLabel: \"showXAxisLabel\",\n showYAxisLabel: \"showYAxisLabel\",\n xAxisLabel: \"xAxisLabel\",\n yAxisLabel: \"yAxisLabel\",\n tooltipDisabled: \"tooltipDisabled\",\n gradient: \"gradient\",\n showGridLines: \"showGridLines\",\n activeEntries: \"activeEntries\",\n schemeType: \"schemeType\",\n trimXAxisTicks: \"trimXAxisTicks\",\n trimYAxisTicks: \"trimYAxisTicks\",\n rotateXAxisTicks: \"rotateXAxisTicks\",\n maxXAxisTickLength: \"maxXAxisTickLength\",\n maxYAxisTickLength: \"maxYAxisTickLength\",\n xAxisTickFormatting: \"xAxisTickFormatting\",\n yAxisTickFormatting: \"yAxisTickFormatting\",\n xAxisTicks: \"xAxisTicks\",\n yAxisTicks: \"yAxisTicks\",\n barPadding: \"barPadding\",\n roundDomains: \"roundDomains\",\n roundEdges: \"roundEdges\",\n yScaleMax: \"yScaleMax\",\n yScaleMin: \"yScaleMin\",\n showDataLabel: \"showDataLabel\",\n dataLabelFormatting: \"dataLabelFormatting\",\n noBarWhenZero: \"noBarWhenZero\",\n wrapTicks: \"wrapTicks\"\n },\n outputs: {\n activate: \"activate\",\n deactivate: \"deactivate\"\n },\n standalone: false,\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 5,\n vars: 25,\n consts: [[3, \"legendLabelClick\", \"legendLabelActivate\", \"legendLabelDeactivate\", \"view\", \"showLegend\", \"legendOptions\", \"activeEntries\", \"animations\"], [1, \"bar-chart\", \"chart\"], [\"ngx-charts-x-axis\", \"\", 3, \"xScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"xAxisOffset\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [\"ngx-charts-y-axis\", \"\", 3, \"yScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [\"ngx-charts-series-vertical\", \"\", 3, \"activate\", \"deactivate\", \"select\", \"dataLabelHeightChanged\", \"xScale\", \"yScale\", \"colors\", \"series\", \"dims\", \"gradient\", \"tooltipDisabled\", \"tooltipTemplate\", \"showDataLabel\", \"dataLabelFormatting\", \"activeEntries\", \"roundEdges\", \"animations\", \"noBarWhenZero\"], [\"ngx-charts-x-axis\", \"\", 3, \"dimensionsChanged\", \"xScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"xAxisOffset\", \"wrapTicks\"], [\"ngx-charts-y-axis\", \"\", 3, \"dimensionsChanged\", \"yScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\"]],\n template: function BarVerticalComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"ngx-charts-chart\", 0);\n i0.ɵɵlistener(\"legendLabelClick\", function BarVerticalComponent_Template_ngx_charts_chart_legendLabelClick_0_listener($event) {\n return ctx.onClick($event);\n })(\"legendLabelActivate\", function BarVerticalComponent_Template_ngx_charts_chart_legendLabelActivate_0_listener($event) {\n return ctx.onActivate($event, true);\n })(\"legendLabelDeactivate\", function BarVerticalComponent_Template_ngx_charts_chart_legendLabelDeactivate_0_listener($event) {\n return ctx.onDeactivate($event, true);\n });\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(1, \"g\", 1);\n i0.ɵɵtemplate(2, BarVerticalComponent__svg_g_2_Template, 1, 12, \"g\", 2)(3, BarVerticalComponent__svg_g_3_Template, 1, 10, \"g\", 3);\n i0.ɵɵelementStart(4, \"g\", 4);\n i0.ɵɵlistener(\"activate\", function BarVerticalComponent_Template_g_activate_4_listener($event) {\n return ctx.onActivate($event);\n })(\"deactivate\", function BarVerticalComponent_Template_g_deactivate_4_listener($event) {\n return ctx.onDeactivate($event);\n })(\"select\", function BarVerticalComponent_Template_g_select_4_listener($event) {\n return ctx.onClick($event);\n })(\"dataLabelHeightChanged\", function BarVerticalComponent_Template_g_dataLabelHeightChanged_4_listener($event) {\n return ctx.onDataLabelMaxHeightChanged($event);\n });\n i0.ɵɵelementEnd()()();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"view\", i0.ɵɵpureFunction2(22, _c24, ctx.width, ctx.height))(\"showLegend\", ctx.legend)(\"legendOptions\", ctx.legendOptions)(\"activeEntries\", ctx.activeEntries)(\"animations\", ctx.animations);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"transform\", ctx.transform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.xAxis);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.yAxis);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx.xScale)(\"yScale\", ctx.yScale)(\"colors\", ctx.colors)(\"series\", ctx.results)(\"dims\", ctx.dims)(\"gradient\", ctx.gradient)(\"tooltipDisabled\", ctx.tooltipDisabled)(\"tooltipTemplate\", ctx.tooltipTemplate)(\"showDataLabel\", ctx.showDataLabel)(\"dataLabelFormatting\", ctx.dataLabelFormatting)(\"activeEntries\", ctx.activeEntries)(\"roundEdges\", ctx.roundEdges)(\"animations\", ctx.animations)(\"noBarWhenZero\", ctx.noBarWhenZero);\n }\n },\n dependencies: [i1.NgIf, XAxisComponent, YAxisComponent, ChartComponent, SeriesVerticalComponent],\n styles: [_c25],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return BarVerticalComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet BarVertical2DComponent = /*#__PURE__*/(() => {\n class BarVertical2DComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.tooltipDisabled = false;\n this.scaleType = ScaleType.Ordinal;\n this.showGridLines = true;\n this.activeEntries = [];\n this.schemeType = ScaleType.Ordinal;\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.groupPadding = 16;\n this.barPadding = 8;\n this.roundDomains = false;\n this.roundEdges = true;\n this.showDataLabel = false;\n this.noBarWhenZero = true;\n this.wrapTicks = false;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.dataLabelMaxHeight = {\n negative: 0,\n positive: 0\n };\n this.isSSR = false;\n this.barOrientation = BarOrientation;\n this.trackBy = (index, item) => {\n return item.name;\n };\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n update() {\n super.update();\n if (!this.showDataLabel) {\n this.dataLabelMaxHeight = {\n negative: 0,\n positive: 0\n };\n }\n this.margin = [10 + this.dataLabelMaxHeight.positive, 20, 10 + this.dataLabelMaxHeight.negative, 20];\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n if (this.showDataLabel) {\n this.dims.height -= this.dataLabelMaxHeight.negative;\n }\n this.formatDates();\n this.groupDomain = this.getGroupDomain();\n this.innerDomain = this.getInnerDomain();\n this.valueDomain = this.getValueDomain();\n this.groupScale = this.getGroupScale();\n this.innerScale = this.getInnerScale();\n this.valueScale = this.getValueScale();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0] + this.dataLabelMaxHeight.negative})`;\n }\n onDataLabelMaxHeightChanged(event, groupIndex) {\n if (event.size.negative) {\n this.dataLabelMaxHeight.negative = Math.max(this.dataLabelMaxHeight.negative, event.size.height);\n } else {\n this.dataLabelMaxHeight.positive = Math.max(this.dataLabelMaxHeight.positive, event.size.height);\n }\n if (groupIndex === this.results.length - 1) {\n setTimeout(() => this.update());\n }\n }\n getGroupScale() {\n const spacing = this.groupDomain.length / (this.dims.height / this.groupPadding + 1);\n return scaleBand().rangeRound([0, this.dims.width]).paddingInner(spacing).paddingOuter(spacing / 2).domain(this.groupDomain);\n }\n getInnerScale() {\n const width = this.groupScale.bandwidth();\n const spacing = this.innerDomain.length / (width / this.barPadding + 1);\n return scaleBand().rangeRound([0, width]).paddingInner(spacing).domain(this.innerDomain);\n }\n getValueScale() {\n const scale = scaleLinear().range([this.dims.height, 0]).domain(this.valueDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n getGroupDomain() {\n const domain = [];\n for (const group of this.results) {\n if (!domain.includes(group.label)) {\n domain.push(group.label);\n }\n }\n return domain;\n }\n getInnerDomain() {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.label)) {\n domain.push(d.label);\n }\n }\n }\n return domain;\n }\n getValueDomain() {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.value)) {\n domain.push(d.value);\n }\n }\n }\n const min = Math.min(0, ...domain);\n const max = this.yScaleMax ? Math.max(this.yScaleMax, ...domain) : Math.max(0, ...domain);\n return [min, max];\n }\n groupTransform(group) {\n return `translate(${this.groupScale(group.label)}, 0)`;\n }\n onClick(data, group) {\n if (group) {\n data.series = group.name;\n }\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.innerDomain;\n } else {\n domain = this.valueDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.innerDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.valueDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({\n width\n }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({\n height\n }) {\n this.xAxisHeight = height;\n this.update();\n }\n onActivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n const items = this.results.map(g => g.series).flat().filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n } else {\n return i.name === item.name && i.series === item.series;\n }\n });\n this.activeEntries = [...items];\n this.activate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n onDeactivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n } else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n this.deactivate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵBarVertical2DComponent_BaseFactory;\n return function BarVertical2DComponent_Factory(__ngFactoryType__) {\n return (ɵBarVertical2DComponent_BaseFactory || (ɵBarVertical2DComponent_BaseFactory = i0.ɵɵgetInheritedFactory(BarVertical2DComponent)))(__ngFactoryType__ || BarVertical2DComponent);\n };\n })();\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: BarVertical2DComponent,\n selectors: [[\"ngx-charts-bar-vertical-2d\"]],\n contentQueries: function BarVertical2DComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, _c22, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tooltipTemplate = _t.first);\n }\n },\n inputs: {\n legend: \"legend\",\n legendTitle: \"legendTitle\",\n legendPosition: \"legendPosition\",\n xAxis: \"xAxis\",\n yAxis: \"yAxis\",\n showXAxisLabel: \"showXAxisLabel\",\n showYAxisLabel: \"showYAxisLabel\",\n xAxisLabel: \"xAxisLabel\",\n yAxisLabel: \"yAxisLabel\",\n tooltipDisabled: \"tooltipDisabled\",\n scaleType: \"scaleType\",\n gradient: \"gradient\",\n showGridLines: \"showGridLines\",\n activeEntries: \"activeEntries\",\n schemeType: \"schemeType\",\n trimXAxisTicks: \"trimXAxisTicks\",\n trimYAxisTicks: \"trimYAxisTicks\",\n rotateXAxisTicks: \"rotateXAxisTicks\",\n maxXAxisTickLength: \"maxXAxisTickLength\",\n maxYAxisTickLength: \"maxYAxisTickLength\",\n xAxisTickFormatting: \"xAxisTickFormatting\",\n yAxisTickFormatting: \"yAxisTickFormatting\",\n xAxisTicks: \"xAxisTicks\",\n yAxisTicks: \"yAxisTicks\",\n groupPadding: \"groupPadding\",\n barPadding: \"barPadding\",\n roundDomains: \"roundDomains\",\n roundEdges: \"roundEdges\",\n yScaleMax: \"yScaleMax\",\n showDataLabel: \"showDataLabel\",\n dataLabelFormatting: \"dataLabelFormatting\",\n noBarWhenZero: \"noBarWhenZero\",\n wrapTicks: \"wrapTicks\"\n },\n outputs: {\n activate: \"activate\",\n deactivate: \"deactivate\"\n },\n standalone: false,\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 7,\n vars: 18,\n consts: [[3, \"legendLabelActivate\", \"legendLabelDeactivate\", \"legendLabelClick\", \"view\", \"showLegend\", \"legendOptions\", \"activeEntries\", \"animations\"], [1, \"bar-chart\", \"chart\"], [\"ngx-charts-grid-panel-series\", \"\", 3, \"xScale\", \"yScale\", \"data\", \"dims\", \"orient\"], [\"ngx-charts-x-axis\", \"\", 3, \"xScale\", \"dims\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"xAxisOffset\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [\"ngx-charts-y-axis\", \"\", 3, \"yScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [4, \"ngIf\"], [\"ngx-charts-x-axis\", \"\", 3, \"dimensionsChanged\", \"xScale\", \"dims\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"xAxisOffset\", \"wrapTicks\"], [\"ngx-charts-y-axis\", \"\", 3, \"dimensionsChanged\", \"yScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\"], [\"ngx-charts-series-vertical\", \"\", 3, \"activeEntries\", \"xScale\", \"yScale\", \"colors\", \"series\", \"dims\", \"gradient\", \"tooltipDisabled\", \"tooltipTemplate\", \"showDataLabel\", \"dataLabelFormatting\", \"seriesName\", \"roundEdges\", \"animations\", \"noBarWhenZero\", \"select\", \"activate\", \"deactivate\", \"dataLabelHeightChanged\", 4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [\"ngx-charts-series-vertical\", \"\", 3, \"select\", \"activate\", \"deactivate\", \"dataLabelHeightChanged\", \"activeEntries\", \"xScale\", \"yScale\", \"colors\", \"series\", \"dims\", \"gradient\", \"tooltipDisabled\", \"tooltipTemplate\", \"showDataLabel\", \"dataLabelFormatting\", \"seriesName\", \"roundEdges\", \"animations\", \"noBarWhenZero\"]],\n template: function BarVertical2DComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"ngx-charts-chart\", 0);\n i0.ɵɵlistener(\"legendLabelActivate\", function BarVertical2DComponent_Template_ngx_charts_chart_legendLabelActivate_0_listener($event) {\n return ctx.onActivate($event, undefined, true);\n })(\"legendLabelDeactivate\", function BarVertical2DComponent_Template_ngx_charts_chart_legendLabelDeactivate_0_listener($event) {\n return ctx.onDeactivate($event, undefined, true);\n })(\"legendLabelClick\", function BarVertical2DComponent_Template_ngx_charts_chart_legendLabelClick_0_listener($event) {\n return ctx.onClick($event);\n });\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(1, \"g\", 1);\n i0.ɵɵelement(2, \"g\", 2);\n i0.ɵɵtemplate(3, BarVertical2DComponent__svg_g_3_Template, 1, 11, \"g\", 3)(4, BarVertical2DComponent__svg_g_4_Template, 1, 10, \"g\", 4)(5, BarVertical2DComponent__svg_g_5_Template, 2, 2, \"g\", 5)(6, BarVertical2DComponent__svg_g_6_Template, 2, 2, \"g\", 5);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"view\", i0.ɵɵpureFunction2(15, _c24, ctx.width, ctx.height))(\"showLegend\", ctx.legend)(\"legendOptions\", ctx.legendOptions)(\"activeEntries\", ctx.activeEntries)(\"animations\", ctx.animations);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"transform\", ctx.transform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"xScale\", ctx.groupScale)(\"yScale\", ctx.valueScale)(\"data\", ctx.results)(\"dims\", ctx.dims)(\"orient\", ctx.barOrientation.Vertical);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.xAxis);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.yAxis);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx.isSSR);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.isSSR);\n }\n },\n dependencies: [i1.NgForOf, i1.NgIf, XAxisComponent, YAxisComponent, ChartComponent, GridPanelSeriesComponent, SeriesVerticalComponent],\n styles: [_c25],\n encapsulation: 2,\n data: {\n animation: [trigger('animationState', [transition(':leave', [style({\n opacity: 1,\n transform: '*'\n }), animate(500, style({\n opacity: 0,\n transform: 'scale(0)'\n }))])])]\n },\n changeDetection: 0\n });\n }\n }\n return BarVertical2DComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet BarVerticalNormalizedComponent = /*#__PURE__*/(() => {\n class BarVerticalNormalizedComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.tooltipDisabled = false;\n this.showGridLines = true;\n this.activeEntries = [];\n this.schemeType = ScaleType.Ordinal;\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.barPadding = 8;\n this.roundDomains = false;\n this.noBarWhenZero = true;\n this.wrapTicks = false;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.valueDomain = [0, 100];\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.isSSR = false;\n this.barChartType = BarChartType;\n this.trackBy = (index, item) => {\n return item.name;\n };\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n update() {\n super.update();\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n this.formatDates();\n this.groupDomain = this.getGroupDomain();\n this.innerDomain = this.getInnerDomain();\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0]})`;\n }\n getGroupDomain() {\n const domain = [];\n for (const group of this.results) {\n if (!domain.includes(group.label)) {\n domain.push(group.label);\n }\n }\n return domain;\n }\n getInnerDomain() {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.label)) {\n domain.push(d.label);\n }\n }\n }\n return domain;\n }\n getXScale() {\n const spacing = this.groupDomain.length / (this.dims.width / this.barPadding + 1);\n return scaleBand().rangeRound([0, this.dims.width]).paddingInner(spacing).domain(this.groupDomain);\n }\n getYScale() {\n const scale = scaleLinear().range([this.dims.height, 0]).domain(this.valueDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n groupTransform(group) {\n return `translate(${this.xScale(group.name)}, 0)`;\n }\n onClick(data, group) {\n if (group) {\n data.series = group.name;\n }\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.innerDomain;\n } else {\n domain = this.valueDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.innerDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.valueDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({\n width\n }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({\n height\n }) {\n this.xAxisHeight = height;\n this.update();\n }\n onActivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n const items = this.results.map(g => g.series).flat().filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n } else {\n return i.name === item.name && i.series === item.series;\n }\n });\n this.activeEntries = [...items];\n this.activate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n onDeactivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n } else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n this.deactivate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵBarVerticalNormalizedComponent_BaseFactory;\n return function BarVerticalNormalizedComponent_Factory(__ngFactoryType__) {\n return (ɵBarVerticalNormalizedComponent_BaseFactory || (ɵBarVerticalNormalizedComponent_BaseFactory = i0.ɵɵgetInheritedFactory(BarVerticalNormalizedComponent)))(__ngFactoryType__ || BarVerticalNormalizedComponent);\n };\n })();\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: BarVerticalNormalizedComponent,\n selectors: [[\"ngx-charts-bar-vertical-normalized\"]],\n contentQueries: function BarVerticalNormalizedComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, _c22, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tooltipTemplate = _t.first);\n }\n },\n inputs: {\n legend: \"legend\",\n legendTitle: \"legendTitle\",\n legendPosition: \"legendPosition\",\n xAxis: \"xAxis\",\n yAxis: \"yAxis\",\n showXAxisLabel: \"showXAxisLabel\",\n showYAxisLabel: \"showYAxisLabel\",\n xAxisLabel: \"xAxisLabel\",\n yAxisLabel: \"yAxisLabel\",\n tooltipDisabled: \"tooltipDisabled\",\n gradient: \"gradient\",\n showGridLines: \"showGridLines\",\n activeEntries: \"activeEntries\",\n schemeType: \"schemeType\",\n trimXAxisTicks: \"trimXAxisTicks\",\n trimYAxisTicks: \"trimYAxisTicks\",\n rotateXAxisTicks: \"rotateXAxisTicks\",\n maxXAxisTickLength: \"maxXAxisTickLength\",\n maxYAxisTickLength: \"maxYAxisTickLength\",\n xAxisTickFormatting: \"xAxisTickFormatting\",\n yAxisTickFormatting: \"yAxisTickFormatting\",\n xAxisTicks: \"xAxisTicks\",\n yAxisTicks: \"yAxisTicks\",\n barPadding: \"barPadding\",\n roundDomains: \"roundDomains\",\n noBarWhenZero: \"noBarWhenZero\",\n wrapTicks: \"wrapTicks\"\n },\n outputs: {\n activate: \"activate\",\n deactivate: \"deactivate\"\n },\n standalone: false,\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 6,\n vars: 13,\n consts: [[3, \"legendLabelActivate\", \"legendLabelDeactivate\", \"legendLabelClick\", \"view\", \"showLegend\", \"legendOptions\", \"activeEntries\", \"animations\"], [1, \"bar-chart\", \"chart\"], [\"ngx-charts-x-axis\", \"\", 3, \"xScale\", \"dims\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [\"ngx-charts-y-axis\", \"\", 3, \"yScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [4, \"ngIf\"], [\"ngx-charts-x-axis\", \"\", 3, \"dimensionsChanged\", \"xScale\", \"dims\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\"], [\"ngx-charts-y-axis\", \"\", 3, \"dimensionsChanged\", \"yScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\"], [4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [\"ngx-charts-series-vertical\", \"\", 3, \"select\", \"activate\", \"deactivate\", \"type\", \"xScale\", \"yScale\", \"activeEntries\", \"colors\", \"series\", \"dims\", \"gradient\", \"tooltipDisabled\", \"tooltipTemplate\", \"seriesName\", \"animations\", \"noBarWhenZero\"]],\n template: function BarVerticalNormalizedComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"ngx-charts-chart\", 0);\n i0.ɵɵlistener(\"legendLabelActivate\", function BarVerticalNormalizedComponent_Template_ngx_charts_chart_legendLabelActivate_0_listener($event) {\n return ctx.onActivate($event, undefined, true);\n })(\"legendLabelDeactivate\", function BarVerticalNormalizedComponent_Template_ngx_charts_chart_legendLabelDeactivate_0_listener($event) {\n return ctx.onDeactivate($event, undefined, true);\n })(\"legendLabelClick\", function BarVerticalNormalizedComponent_Template_ngx_charts_chart_legendLabelClick_0_listener($event) {\n return ctx.onClick($event);\n });\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(1, \"g\", 1);\n i0.ɵɵtemplate(2, BarVerticalNormalizedComponent__svg_g_2_Template, 1, 10, \"g\", 2)(3, BarVerticalNormalizedComponent__svg_g_3_Template, 1, 10, \"g\", 3)(4, BarVerticalNormalizedComponent__svg_g_4_Template, 2, 2, \"g\", 4)(5, BarVerticalNormalizedComponent__svg_g_5_Template, 2, 2, \"g\", 4);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"view\", i0.ɵɵpureFunction2(10, _c24, ctx.width, ctx.height))(\"showLegend\", ctx.legend)(\"legendOptions\", ctx.legendOptions)(\"activeEntries\", ctx.activeEntries)(\"animations\", ctx.animations);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"transform\", ctx.transform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.xAxis);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.yAxis);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx.isSSR);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.isSSR);\n }\n },\n dependencies: [i1.NgForOf, i1.NgIf, XAxisComponent, YAxisComponent, ChartComponent, SeriesVerticalComponent],\n styles: [_c25],\n encapsulation: 2,\n data: {\n animation: [trigger('animationState', [transition(':leave', [style({\n opacity: 1,\n transform: '*'\n }), animate(500, style({\n opacity: 0,\n transform: 'scale(0)'\n }))])])]\n },\n changeDetection: 0\n });\n }\n }\n return BarVerticalNormalizedComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet BarVerticalStackedComponent = /*#__PURE__*/(() => {\n class BarVerticalStackedComponent extends BaseChartComponent {\n constructor() {\n super(...arguments);\n this.legend = false;\n this.legendTitle = 'Legend';\n this.legendPosition = LegendPosition.Right;\n this.tooltipDisabled = false;\n this.showGridLines = true;\n this.activeEntries = [];\n this.trimXAxisTicks = true;\n this.trimYAxisTicks = true;\n this.rotateXAxisTicks = true;\n this.maxXAxisTickLength = 16;\n this.maxYAxisTickLength = 16;\n this.barPadding = 8;\n this.roundDomains = false;\n this.showDataLabel = false;\n this.noBarWhenZero = true;\n this.wrapTicks = false;\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.margin = [10, 20, 10, 20];\n this.xAxisHeight = 0;\n this.yAxisWidth = 0;\n this.dataLabelMaxHeight = {\n negative: 0,\n positive: 0\n };\n this.isSSR = false;\n this.barChartType = BarChartType;\n this.trackBy = (index, item) => {\n return item.name;\n };\n }\n ngOnInit() {\n if (isPlatformServer(this.platformId)) {\n this.isSSR = true;\n }\n }\n update() {\n super.update();\n if (!this.showDataLabel) {\n this.dataLabelMaxHeight = {\n negative: 0,\n positive: 0\n };\n }\n this.margin = [10 + this.dataLabelMaxHeight.positive, 20, 10 + this.dataLabelMaxHeight.negative, 20];\n this.dims = calculateViewDimensions({\n width: this.width,\n height: this.height,\n margins: this.margin,\n showXAxis: this.xAxis,\n showYAxis: this.yAxis,\n xAxisHeight: this.xAxisHeight,\n yAxisWidth: this.yAxisWidth,\n showXLabel: this.showXAxisLabel,\n showYLabel: this.showYAxisLabel,\n showLegend: this.legend,\n legendType: this.schemeType,\n legendPosition: this.legendPosition\n });\n if (this.showDataLabel) {\n this.dims.height -= this.dataLabelMaxHeight.negative;\n }\n this.formatDates();\n this.groupDomain = this.getGroupDomain();\n this.innerDomain = this.getInnerDomain();\n this.valueDomain = this.getValueDomain();\n this.xScale = this.getXScale();\n this.yScale = this.getYScale();\n this.setColors();\n this.legendOptions = this.getLegendOptions();\n this.transform = `translate(${this.dims.xOffset} , ${this.margin[0] + this.dataLabelMaxHeight.negative})`;\n }\n getGroupDomain() {\n const domain = [];\n for (const group of this.results) {\n if (!domain.includes(group.label)) {\n domain.push(group.label);\n }\n }\n return domain;\n }\n getInnerDomain() {\n const domain = [];\n for (const group of this.results) {\n for (const d of group.series) {\n if (!domain.includes(d.label)) {\n domain.push(d.label);\n }\n }\n }\n return domain;\n }\n getValueDomain() {\n const domain = [];\n let smallest = 0;\n let biggest = 0;\n for (const group of this.results) {\n let smallestSum = 0;\n let biggestSum = 0;\n for (const d of group.series) {\n if (d.value < 0) {\n smallestSum += d.value;\n } else {\n biggestSum += d.value;\n }\n smallest = d.value < smallest ? d.value : smallest;\n biggest = d.value > biggest ? d.value : biggest;\n }\n domain.push(smallestSum);\n domain.push(biggestSum);\n }\n domain.push(smallest);\n domain.push(biggest);\n const min = Math.min(0, ...domain);\n const max = this.yScaleMax ? Math.max(this.yScaleMax, ...domain) : Math.max(...domain);\n return [min, max];\n }\n getXScale() {\n const spacing = this.groupDomain.length / (this.dims.width / this.barPadding + 1);\n return scaleBand().rangeRound([0, this.dims.width]).paddingInner(spacing).domain(this.groupDomain);\n }\n getYScale() {\n const scale = scaleLinear().range([this.dims.height, 0]).domain(this.valueDomain);\n return this.roundDomains ? scale.nice() : scale;\n }\n onDataLabelMaxHeightChanged(event, groupIndex) {\n if (event.size.negative) {\n this.dataLabelMaxHeight.negative = Math.max(this.dataLabelMaxHeight.negative, event.size.height);\n } else {\n this.dataLabelMaxHeight.positive = Math.max(this.dataLabelMaxHeight.positive, event.size.height);\n }\n if (groupIndex === this.results.length - 1) {\n setTimeout(() => this.update());\n }\n }\n groupTransform(group) {\n return `translate(${this.xScale(group.name) || 0}, 0)`;\n }\n onClick(data, group) {\n if (group) {\n data.series = group.name;\n }\n this.select.emit(data);\n }\n setColors() {\n let domain;\n if (this.schemeType === ScaleType.Ordinal) {\n domain = this.innerDomain;\n } else {\n domain = this.valueDomain;\n }\n this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors);\n }\n getLegendOptions() {\n const opts = {\n scaleType: this.schemeType,\n colors: undefined,\n domain: [],\n title: undefined,\n position: this.legendPosition\n };\n if (opts.scaleType === ScaleType.Ordinal) {\n opts.domain = this.innerDomain;\n opts.colors = this.colors;\n opts.title = this.legendTitle;\n } else {\n opts.domain = this.valueDomain;\n opts.colors = this.colors.scale;\n }\n return opts;\n }\n updateYAxisWidth({\n width\n }) {\n this.yAxisWidth = width;\n this.update();\n }\n updateXAxisHeight({\n height\n }) {\n this.xAxisHeight = height;\n this.update();\n }\n onActivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n const items = this.results.map(g => g.series).flat().filter(i => {\n if (fromLegend) {\n return i.label === item.name;\n } else {\n return i.name === item.name && i.series === item.series;\n }\n });\n this.activeEntries = [...items];\n this.activate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n onDeactivate(event, group, fromLegend = false) {\n const item = Object.assign({}, event);\n if (group) {\n item.series = group.name;\n }\n this.activeEntries = this.activeEntries.filter(i => {\n if (fromLegend) {\n return i.label !== item.name;\n } else {\n return !(i.name === item.name && i.series === item.series);\n }\n });\n this.deactivate.emit({\n value: item,\n entries: this.activeEntries\n });\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵBarVerticalStackedComponent_BaseFactory;\n return function BarVerticalStackedComponent_Factory(__ngFactoryType__) {\n return (ɵBarVerticalStackedComponent_BaseFactory || (ɵBarVerticalStackedComponent_BaseFactory = i0.ɵɵgetInheritedFactory(BarVerticalStackedComponent)))(__ngFactoryType__ || BarVerticalStackedComponent);\n };\n })();\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: BarVerticalStackedComponent,\n selectors: [[\"ngx-charts-bar-vertical-stacked\"]],\n contentQueries: function BarVerticalStackedComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, _c22, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tooltipTemplate = _t.first);\n }\n },\n inputs: {\n legend: \"legend\",\n legendTitle: \"legendTitle\",\n legendPosition: \"legendPosition\",\n xAxis: \"xAxis\",\n yAxis: \"yAxis\",\n showXAxisLabel: \"showXAxisLabel\",\n showYAxisLabel: \"showYAxisLabel\",\n xAxisLabel: \"xAxisLabel\",\n yAxisLabel: \"yAxisLabel\",\n tooltipDisabled: \"tooltipDisabled\",\n gradient: \"gradient\",\n showGridLines: \"showGridLines\",\n activeEntries: \"activeEntries\",\n schemeType: \"schemeType\",\n trimXAxisTicks: \"trimXAxisTicks\",\n trimYAxisTicks: \"trimYAxisTicks\",\n rotateXAxisTicks: \"rotateXAxisTicks\",\n maxXAxisTickLength: \"maxXAxisTickLength\",\n maxYAxisTickLength: \"maxYAxisTickLength\",\n xAxisTickFormatting: \"xAxisTickFormatting\",\n yAxisTickFormatting: \"yAxisTickFormatting\",\n xAxisTicks: \"xAxisTicks\",\n yAxisTicks: \"yAxisTicks\",\n barPadding: \"barPadding\",\n roundDomains: \"roundDomains\",\n yScaleMax: \"yScaleMax\",\n showDataLabel: \"showDataLabel\",\n dataLabelFormatting: \"dataLabelFormatting\",\n noBarWhenZero: \"noBarWhenZero\",\n wrapTicks: \"wrapTicks\"\n },\n outputs: {\n activate: \"activate\",\n deactivate: \"deactivate\"\n },\n standalone: false,\n features: [i0.ɵɵInheritDefinitionFeature],\n decls: 6,\n vars: 13,\n consts: [[3, \"legendLabelActivate\", \"legendLabelDeactivate\", \"legendLabelClick\", \"view\", \"showLegend\", \"legendOptions\", \"activeEntries\", \"animations\"], [1, \"bar-chart\", \"chart\"], [\"ngx-charts-x-axis\", \"\", 3, \"xScale\", \"dims\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"xAxisOffset\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [\"ngx-charts-y-axis\", \"\", 3, \"yScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\", \"dimensionsChanged\", 4, \"ngIf\"], [4, \"ngIf\"], [\"ngx-charts-x-axis\", \"\", 3, \"dimensionsChanged\", \"xScale\", \"dims\", \"showLabel\", \"labelText\", \"trimTicks\", \"rotateTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"xAxisOffset\", \"wrapTicks\"], [\"ngx-charts-y-axis\", \"\", 3, \"dimensionsChanged\", \"yScale\", \"dims\", \"showGridLines\", \"showLabel\", \"labelText\", \"trimTicks\", \"maxTickLength\", \"tickFormatting\", \"ticks\", \"wrapTicks\"], [4, \"ngFor\", \"ngForOf\", \"ngForTrackBy\"], [\"ngx-charts-series-vertical\", \"\", 3, \"select\", \"activate\", \"deactivate\", \"dataLabelHeightChanged\", \"type\", \"xScale\", \"yScale\", \"activeEntries\", \"colors\", \"series\", \"dims\", \"gradient\", \"tooltipDisabled\", \"tooltipTemplate\", \"showDataLabel\", \"dataLabelFormatting\", \"seriesName\", \"animations\", \"noBarWhenZero\"]],\n template: function BarVerticalStackedComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"ngx-charts-chart\", 0);\n i0.ɵɵlistener(\"legendLabelActivate\", function BarVerticalStackedComponent_Template_ngx_charts_chart_legendLabelActivate_0_listener($event) {\n return ctx.onActivate($event, undefined, true);\n })(\"legendLabelDeactivate\", function BarVerticalStackedComponent_Template_ngx_charts_chart_legendLabelDeactivate_0_listener($event) {\n return ctx.onDeactivate($event, undefined, true);\n })(\"legendLabelClick\", function BarVerticalStackedComponent_Template_ngx_charts_chart_legendLabelClick_0_listener($event) {\n return ctx.onClick($event);\n });\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(1, \"g\", 1);\n i0.ɵɵtemplate(2, BarVerticalStackedComponent__svg_g_2_Template, 1, 11, \"g\", 2)(3, BarVerticalStackedComponent__svg_g_3_Template, 1, 10, \"g\", 3)(4, BarVerticalStackedComponent__svg_g_4_Template, 2, 2, \"g\", 4)(5, BarVerticalStackedComponent__svg_g_5_Template, 2, 2, \"g\", 4);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"view\", i0.ɵɵpureFunction2(10, _c24, ctx.width, ctx.height))(\"showLegend\", ctx.legend)(\"legendOptions\", ctx.legendOptions)(\"activeEntries\", ctx.activeEntries)(\"animations\", ctx.animations);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"transform\", ctx.transform);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.xAxis);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.yAxis);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx.isSSR);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.isSSR);\n }\n },\n dependencies: [i1.NgForOf, i1.NgIf, XAxisComponent, YAxisComponent, ChartComponent, SeriesVerticalComponent],\n styles: [_c25],\n encapsulation: 2,\n data: {\n animation: [trigger('animationState', [transition(':leave', [style({\n opacity: 1,\n transform: '*'\n }), animate(500, style({\n opacity: 0,\n transform: 'scale(0)'\n }))])])]\n },\n changeDetection: 0\n });\n }\n }\n return BarVerticalStackedComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet BarChartModule = /*#__PURE__*/(() => {\n class BarChartModule {\n static {\n this.ɵfac = function BarChartModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || BarChartModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: BarChartModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [ChartCommonModule]\n });\n }\n }\n return BarChartModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction clonePoint(original) {\n if (!original) {\n return original;\n }\n return {\n x: original.x,\n y: original.y\n };\n}\nfunction cloneVector2d(original) {\n if (!original) {\n return original;\n }\n return {\n v1: clonePoint(original.v1),\n v2: clonePoint(original.v2)\n };\n}\nfunction cloneLineCoordinates(original) {\n if (!original) {\n return original;\n }\n return [cloneVector2d(original[0]), cloneVector2d(original[1]), cloneVector2d(original[2]), cloneVector2d(original[3])];\n}\nlet BoxComponent = /*#__PURE__*/(() => {\n class BoxComponent {\n constructor(element, cd) {\n this.cd = cd;\n this.roundEdges = true;\n this.gradient = false;\n this.offset = 0;\n this.isActive = false;\n this.animations = true;\n this.noBarWhenZero = true;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n this.BarOrientation = BarOrientation;\n this.initialized = false;\n this.hasGradient = false;\n this.hideBar = false;\n this.nativeElm = element.nativeElement;\n }\n ngOnChanges(changes) {\n if (!this.initialized) {\n this.loadAnimation();\n this.initialized = true;\n } else {\n this.update();\n }\n }\n update() {\n this.boxStrokeWidth = Math.max(this.strokeWidth, 1);\n this.whiskerStrokeWidth = Math.max(this.strokeWidth / 2, 1);\n this.medianLineWidth = 1.5 * this.strokeWidth;\n this.gradientId = 'grad' + id().toString();\n this.gradientFill = `url(#${this.gradientId})`;\n if (this.gradient) {\n this.gradientStops = this.getGradient();\n this.hasGradient = true;\n } else {\n this.hasGradient = false;\n }\n this.updateLineEl();\n this.updatePathEl();\n this.checkToHideBar();\n this.maskLineId = 'mask' + id().toString();\n this.maskLine = `url(#${this.maskLineId})`;\n if (this.cd) {\n this.cd.markForCheck();\n }\n }\n loadAnimation() {\n this.boxPath = this.oldPath = this.getStartingPath();\n this.oldLineCoordinates = this.getStartingLineCoordinates();\n setTimeout(this.update.bind(this), 100);\n }\n updatePathEl() {\n const nodeBar = select(this.nativeElm).selectAll('.bar');\n const path = this.getPath();\n if (this.animations) {\n nodeBar.attr('d', this.oldPath).transition().ease(easeSinInOut).duration(500).attrTween('d', this.pathTween(path, 4));\n } else {\n nodeBar.attr('d', path);\n }\n this.oldPath = path;\n }\n updateLineEl() {\n const lineEl = select(this.nativeElm).selectAll('.bar-line');\n const lineCoordinates = this.lineCoordinates;\n const oldLineCoordinates = this.oldLineCoordinates;\n if (this.animations) {\n lineEl.attr('x1', (_, index) => oldLineCoordinates[index].v1.x).attr('y1', (_, index) => oldLineCoordinates[index].v1.y).attr('x2', (_, index) => oldLineCoordinates[index].v2.x).attr('y2', (_, index) => oldLineCoordinates[index].v2.y).transition().ease(easeSinInOut).duration(500).attr('x1', (_, index) => lineCoordinates[index].v1.x).attr('y1', (_, index) => lineCoordinates[index].v1.y).attr('x2', (_, index) => lineCoordinates[index].v2.x).attr('y2', (_, index) => lineCoordinates[index].v2.y);\n } else {\n lineEl.attr('x1', (_, index) => lineCoordinates[index].v1.x).attr('y1', (_, index) => lineCoordinates[index].v1.y).attr('x2', (_, index) => lineCoordinates[index].v2.x).attr('y2', (_, index) => lineCoordinates[index].v2.y);\n }\n this.oldLineCoordinates = [...lineCoordinates];\n }\n /**\n * See [D3 Selections](https://www.d3indepth.com/selections/)\n * @param d The joined data.\n * @param index The index of the element within the selection\n * @param node The node element (Line).\n */\n lineTween(attr, d, index, node) {\n const nodeLineEl = node[index];\n return nodeLineEl[attr].baseVal.value;\n }\n // TODO: Refactor into another .ts file if https://github.com/swimlane/ngx-charts/pull/1179 gets merged.\n pathTween(d1, precision) {\n return function () {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const path0 = this;\n const path1 = this.cloneNode();\n path1.setAttribute('d', d1);\n const n0 = path0?.getTotalLength();\n const n1 = path1?.getTotalLength();\n // Uniform sampling of distance based on specified precision.\n const distances = [0];\n let i = 0;\n const dt = precision / Math.max(n0, n1);\n while (i < 1) {\n distances.push(i);\n i += dt;\n }\n distances.push(1);\n // Compute point-interpolators at each distance.\n const points = distances.map(t => {\n const p0 = path0.getPointAtLength(t * n0);\n const p1 = path1.getPointAtLength(t * n1);\n return interpolate([p0.x, p0.y], [p1.x, p1.y]);\n });\n // 't': T is the fraction of time (between 0 and 1) since the transition began.\n return t => {\n return t < 1 ? 'M' + points.map(p => p(t)).join('L') : d1;\n };\n };\n }\n getStartingPath() {\n if (!this.animations) {\n return this.getPath();\n }\n const radius = this.roundEdges ? 1 : 0;\n const {\n x,\n y\n } = this.lineCoordinates[2].v1;\n return roundedRect(x - this.width, y - 1, this.width, 2, radius, this.edges);\n }\n getPath() {\n const radius = this.getRadius();\n let path = '';\n path = roundedRect(this.x, this.y, this.width, this.height, Math.min(this.height, radius), this.edges);\n return path;\n }\n getStartingLineCoordinates() {\n if (!this.animations) {\n return [...this.lineCoordinates];\n }\n const lineCoordinates = cloneLineCoordinates(this.lineCoordinates);\n lineCoordinates[1].v1.y = lineCoordinates[1].v2.y = lineCoordinates[3].v1.y = lineCoordinates[3].v2.y = lineCoordinates[0].v1.y = lineCoordinates[0].v2.y = lineCoordinates[2].v1.y;\n return lineCoordinates;\n }\n getRadius() {\n let radius = 0;\n if (this.roundEdges && this.height > 5 && this.width > 5) {\n radius = Math.floor(Math.min(5, this.height / 2, this.width / 2));\n }\n return radius;\n }\n getGradient() {\n return [{\n offset: 0,\n color: this.fill,\n opacity: this.getStartOpacity()\n }, {\n offset: 100,\n color: this.fill,\n opacity: 1\n }];\n }\n getStartOpacity() {\n if (this.roundEdges) {\n return 0.2;\n } else {\n return 0.5;\n }\n }\n get edges() {\n let edges = [false, false, false, false];\n if (this.roundEdges) {\n edges = [true, true, true, true];\n }\n return edges;\n }\n onMouseEnter() {\n this.activate.emit(this.data);\n }\n onMouseLeave() {\n this.deactivate.emit(this.data);\n }\n checkToHideBar() {\n this.hideBar = this.noBarWhenZero && this.height === 0;\n }\n static {\n this.ɵfac = function BoxComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || BoxComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: BoxComponent,\n selectors: [[\"g\", \"ngx-charts-box\", \"\"]],\n hostBindings: function BoxComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"mouseenter\", function BoxComponent_mouseenter_HostBindingHandler() {\n return ctx.onMouseEnter();\n })(\"mouseleave\", function BoxComponent_mouseleave_HostBindingHandler() {\n return ctx.onMouseLeave();\n });\n }\n },\n inputs: {\n strokeColor: \"strokeColor\",\n strokeWidth: \"strokeWidth\",\n fill: \"fill\",\n data: \"data\",\n width: \"width\",\n height: \"height\",\n x: \"x\",\n y: \"y\",\n lineCoordinates: \"lineCoordinates\",\n roundEdges: \"roundEdges\",\n gradient: \"gradient\",\n gradientStops: \"gradientStops\",\n offset: \"offset\",\n isActive: \"isActive\",\n animations: \"animations\",\n ariaLabel: \"ariaLabel\",\n noBarWhenZero: \"noBarWhenZero\"\n },\n outputs: {\n select: \"select\",\n activate: \"activate\",\n deactivate: \"deactivate\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature],\n attrs: _c30,\n decls: 9,\n vars: 13,\n consts: [[\"ngx-charts-svg-linear-gradient\", \"\", 3, \"orientation\", \"name\", \"stops\", 4, \"ngIf\"], [\"height\", \"100%\", \"width\", \"100%\", \"fill\", \"white\", \"fill-opacity\", \"1\"], [\"fill\", \"black\", \"fill-opacity\", \"1\", 1, \"bar\"], [\"role\", \"img\", \"tabIndex\", \"-1\", 1, \"bar\", 3, \"click\"], [\"class\", \"bar-line\", \"fill\", \"none\", 3, \"hidden\", 4, \"ngFor\", \"ngForOf\"], [\"ngx-charts-svg-linear-gradient\", \"\", 3, \"orientation\", \"name\", \"stops\"], [\"fill\", \"none\", 1, \"bar-line\"]],\n template: function BoxComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"defs\");\n i0.ɵɵtemplate(1, BoxComponent__svg_g_1_Template, 1, 3, \"g\", 0);\n i0.ɵɵelementStart(2, \"mask\")(3, \"g\");\n i0.ɵɵelement(4, \"rect\", 1)(5, \"path\", 2);\n i0.ɵɵelementEnd()()();\n i0.ɵɵelementStart(6, \"g\")(7, \"path\", 3);\n i0.ɵɵlistener(\"click\", function BoxComponent_Template_path_click_7_listener() {\n return ctx.select.emit(ctx.data);\n });\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(8, BoxComponent__svg_line_8_Template, 1, 9, \"line\", 4);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.hasGradient);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"id\", ctx.maskLineId);\n i0.ɵɵadvance(3);\n i0.ɵɵattribute(\"d\", ctx.boxPath);\n i0.ɵɵadvance(2);\n i0.ɵɵclassProp(\"active\", ctx.isActive)(\"hidden\", ctx.hideBar);\n i0.ɵɵattribute(\"d\", ctx.boxPath)(\"stroke\", ctx.strokeColor)(\"stroke-width\", ctx.boxStrokeWidth)(\"aria-label\", ctx.ariaLabel)(\"fill\", ctx.hasGradient ? ctx.gradientFill : ctx.fill);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx.lineCoordinates);\n }\n },\n dependencies: [i1.NgForOf, i1.NgIf, SvgLinearGradientComponent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return BoxComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet BoxSeriesComponent = /*#__PURE__*/(() => {\n class BoxSeriesComponent {\n constructor() {\n this.animations = true;\n this.tooltipDisabled = false;\n this.gradient = false;\n this.select = new EventEmitter();\n this.activate = new EventEmitter();\n this.deactivate = new EventEmitter();\n }\n ngOnChanges(changes) {\n this.update();\n }\n onClick(data) {\n this.select.emit(data);\n }\n update() {\n this.updateTooltipSettings();\n const width = this.series && this.series.series.length ? Math.round(this.xScale.bandwidth()) : null;\n const seriesName = this.series.name;\n // Calculate Quantile and Whiskers for each box serie.\n this.counts = this.series.series;\n const mappedCounts = this.counts.map(serie => Number(serie.value));\n this.whiskers = [min(mappedCounts), max(mappedCounts)];\n // We get the group count and must sort it in order to retrieve quantiles.\n const groupCounts = this.counts.map(item => item.value).sort((a, b) => Number(a) - Number(b));\n this.quartiles = this.getBoxQuantiles(groupCounts);\n this.lineCoordinates = this.getLinesCoordinates(seriesName.toString(), this.whiskers, this.quartiles, width);\n const value = this.quartiles[1];\n const formattedLabel = formatLabel(seriesName);\n const box = {\n value,\n data: this.counts,\n label: seriesName,\n formattedLabel,\n width,\n height: 0,\n x: 0,\n y: 0,\n roundEdges: this.roundEdges,\n quartiles: this.quartiles,\n lineCoordinates: this.lineCoordinates\n };\n box.height = Math.abs(this.yScale(this.quartiles[0]) - this.yScale(this.quartiles[2]));\n box.x = this.xScale(seriesName.toString());\n box.y = this.yScale(this.quartiles[2]);\n box.ariaLabel = formattedLabel + ' - Median: ' + value.toLocaleString();\n if (this.colors.scaleType === ScaleType.Ordinal) {\n box.color = this.colors.getColor(seriesName);\n } else {\n box.color = this.colors.getColor(this.quartiles[1]);\n box.gradientStops = this.colors.getLinearGradientStops(this.quartiles[0], this.quartiles[2]);\n }\n const tooltipLabel = formattedLabel;\n const formattedTooltipLabel = `\n ${escapeLabel(tooltipLabel)}\n \n • Q1: ${this.quartiles[0]} • Q2: ${this.quartiles[1]} • Q3: ${this.quartiles[2]}