/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { FinancialSeries } from "./FinancialSeries";
import { ITrendLineSeries_$type } from "./ITrendLineSeries";
import { IndicatorDisplayType_$type } from "./IndicatorDisplayType";
import { DependencyProperty } from "igniteui-react-core";
import { TrendLineType_$type } from "igniteui-react-core";
import { Brush } from "igniteui-react-core";
import { PenLineCap_$type } from "igniteui-react-core";
import { DoubleCollection } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { AxisRange } from "./AxisRange";
import { CategoryFrame } from "./CategoryFrame";
import { Number_$type, typeCast, enumGetBox, EnumUtil, runOn, markType, markDep } from "igniteui-react-core";
import { Rect } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { ISortingAxis_$type } from "./ISortingAxis";
import { CategoryTrendLineManagerFactory } from "./CategoryTrendLineManagerFactory";
import { FinancialSeriesView } from "./FinancialSeriesView";
import { FinancialBucketCalculator } from "./FinancialBucketCalculator";
import { TrendResolutionParams } from "./TrendResolutionParams";
import { CategorySeries } from "./CategorySeries";
import { NotImplementedException } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { PropertyMetadata } from "igniteui-react-core";
import { isNaN_ } from "igniteui-react-core";
import { Pool$1 } from "igniteui-react-core";
import { LineGeometry } from "igniteui-react-core";
import { PathGeometry } from "igniteui-react-core";
import { GeometryGroup } from "igniteui-react-core";
import { Extensions } from "igniteui-react-core";
import { IndicatorRenderer } from "./IndicatorRenderer";
/**
 * @hidden
 */
export let FinancialIndicator = /*@__PURE__*/ (() => {
    class FinancialIndicator extends FinancialSeries {
        constructor() {
            super();
            this._indicatorColumn = null;
            this.ps = null;
            this.ml = new CategoryFrame(3);
            this.mn = new CategoryFrame(3);
            this.mk = new CategoryFrame(3);
            this.indicatorColumn = new List$1(Number_$type, 0);
            this.ps = new AxisRange(-100, 100);
        }
        bf() {
            return new FinancialIndicatorView(this);
        }
        i2(a) {
            super.i2(a);
            this.pt = a;
        }
        p5(a) {
            if (this.m3 != null && !this.m3.cn()) {
                this.jl(true);
            }
        }
        px(a, b, c) {
            if (isNaN_(b.x) || isNaN_(b.y)) {
                return false;
            }
            let d = this.m3;
            let e = 0;
            if (d != null) {
                e = d.ed(d.km);
            }
            if ((a.y >= e && a.y <= b.y) || (a.y <= e && a.y >= b.y)) {
                return true;
            }
            return false;
        }
        bd() {
            if (this.be == 0) {
                return 1;
            }
            else {
                return super.bd();
            }
        }
        l4(a) {
            if (this.mi == null || this.m3 == null) {
                return Rect.empty;
            }
            let b = this.lq(a);
            let c = this.bi.bs;
            let d = this.bi.br;
            let e = this.getEffectiveViewport1(this.bi);
            let f = new ScalerParams(0, c, d, this.m3.ca, e);
            f.b = this.eh();
            let g = this.aj(this.mi, this.mk.f, this.of(this.bi), this.oh(this.bi), a, true);
            if (g == null) {
                return Rect.empty;
            }
            let h = g[0];
            let i = g[1];
            let j = Math.abs(b.x - h[0]);
            let k = Math.abs(b.x - i[0]);
            let l = this.m3.dy(this.m3.km, f);
            let m = 1;
            if (j < k) {
                let n = h[0] - 0.5 * m;
                let o = h[1];
                let p = l;
                return new Rect(0, n, Math.min(o, p), m, Math.max(o, p) - Math.min(o, p));
            }
            else {
                let q = i[0] - 0.5 * m;
                let r = i[1];
                let s = l;
                return new Rect(0, q, Math.min(r, s), m, Math.max(r, s) - Math.min(r, s));
            }
        }
        dh(a, b) {
            let c = this.lv(this.ly(a), true, false);
            if (this.pu == 1) {
                if (this.px(a, c, b)) {
                    return true;
                }
            }
            if (this.pu == 1 || this.pu == 0) {
                if (this.dg(a, b)) {
                    return true;
                }
            }
            if (this.pu == 2) {
                if (this.dk(a, b)) {
                    return true;
                }
            }
            return false;
        }
        h6(a, b, c, d) {
            super.h6(a, b, c, d);
            if (this.mi != null && typeCast(ISortingAxis_$type, this.mi) !== null) {
                this.mi.i$i();
            }
            if (this.pt.b4) {
                this.pt.b2.g$e(a, b, c, d);
            }
            if (d != null && this.nu.containsKey(d)) {
                let e = this.nu.tryGetValue(d, d);
                d = e.p1;
            }
            if (this.mi != null && typeCast(ISortingAxis_$type, this.mi) !== null) {
                a = 4;
                b = 0;
                c = this.bz.count;
            }
            switch (a) {
                case 3:
                    if (this.pw(b, c, d)) {
                        this.p7(b, c, d);
                        this.p5(true);
                    }
                    break;
                case 2:
                    if (this.pw(b, this.bz.count - b, d)) {
                        this.p7(b, this.bz.count - b, d);
                        this.p5(true);
                    }
                    break;
                case 1:
                    if (this.pw(b, this.bz.count - b, d)) {
                        let f = new Array(c);
                        for (let g = 0; g < c; g++) {
                            f[g] = 0;
                        }
                        this.indicatorColumn.s(b, f);
                        this.p7(b, this.bz.count - b, d);
                        this.p5(true);
                    }
                    break;
                case 0:
                    if (this.pw(b, this.bz.count - b, d)) {
                        this.indicatorColumn.v(b, c);
                        this.p7(b, this.bz.count - b, d);
                        this.p5(true);
                    }
                    break;
                case 4:
                    if (this.pw(b, this.bz.count - b, d)) {
                        this.indicatorColumn = new List$1(Number_$type, 2, this.bz.count);
                        let h = new Array(c);
                        for (let i = 0; i < c; i++) {
                            h[i] = 0;
                        }
                        this.indicatorColumn.s(0, h);
                        this.p7(b, this.bz.count - b, d);
                        this.p5(true);
                    }
                    break;
            }
        }
        get qi() {
            return this.c(FinancialIndicator.p8);
        }
        set qi(a) {
            this.h(FinancialIndicator.p8, a);
        }
        p2() {
            return -1;
        }
        get indicatorColumn() {
            return this._indicatorColumn;
        }
        set indicatorColumn(a) {
            this._indicatorColumn = a;
        }
        i7(a, b, c, d) {
            switch (b) {
                case "XAxis":
                    this.pt.ca();
                    break;
                case "TrendLineType":
                    let e = EnumUtil.getEnumValue(TrendLineType_$type, d);
                    if (e != 0) {
                        this.pt.b2 = CategoryTrendLineManagerFactory.a(this.pt.b2, this.mi, this.j5, this, this.b2);
                    }
                    break;
            }
            super.i7(a, b, c, d);
            if (this.pt.b4 && this.pt.b2.g$b(a, b, c, d)) {
                this.jl(false);
                let f = typeCast(FinancialIndicatorView.$, this.bh);
                if (f != null && f.b4) {
                    f.b2.g$b(a, b, c, d);
                }
                this.it();
            }
            switch (b) {
                case "FastItemsSource":
                    if (this.bz != null) {
                        this.indicatorColumn = new List$1(Number_$type, 2, this.bz.count);
                        let g = new Array(this.bz.count);
                        for (let h = 0; h < this.bz.count; h++) {
                            g[h] = 0;
                        }
                        this.indicatorColumn.s(0, g);
                        this.p7(0, this.bz.count, null);
                        if (this.m3 != null && !this.m3.cn()) {
                            this.my.bu.e(this.eu);
                            this.jl(false);
                        }
                    }
                    break;
                case "TrendLineBrush":
                    this.jw();
                    break;
                case FinancialIndicator.$$p[0]:
                    this.h3(true, this.bi);
                    this.jl(false);
                    this.it();
                    break;
                case "OpenColumn":
                case "HighColumn":
                case "LowColumn":
                case "CloseColumn":
                case "VolumeColumn":
                    if (this.bz != null) {
                        if (this.indicatorColumn.count != this.bz.count) {
                            this.indicatorColumn = new List$1(Number_$type, 2, this.bz.count);
                            let i = new Array(this.bz.count);
                            for (let j = 0; j < this.bz.count; j++) {
                                i[j] = 0;
                            }
                            this.indicatorColumn.s(0, i);
                        }
                        if (this.pw(0, this.bz.count - 1, b)) {
                            this.p6();
                        }
                    }
                    break;
                case "XAxis":
                    if (this.mi != null && (typeCast(ISortingAxis_$type, this.mi) !== null || typeCast(ISortingAxis_$type, c) !== null)) {
                        this.p6();
                    }
                    break;
                case "YAxis":
                case FinancialIndicator.$$p[1]:
                    this.p6();
                    this.it();
                    break;
                case "TrendLineType":
                    this.it();
                    break;
            }
        }
        en(a, b, c) {
            if (this.indicatorColumn == null) {
                return super.en(a, b, c);
            }
            let d = this.getEffectiveViewport1(this.bi);
            let e = this.n9(this.bi.bs, this.bi.br, d);
            let f = new ScalerParams(0, this.bi.bs, this.bi.br, this.mi.ca, d);
            f.c = this.bs.oh;
            return this.ep(this.indicatorColumn, a, this.mi, f, e, runOn(this, this.n8), b, c);
        }
        fe(a, b) {
            if (this.indicatorColumn == null) {
                return super.fe(a, b);
            }
            return this.ff(a, b, this.mi, runOn(this, this.n8), this.indicatorColumn);
        }
        fc(a, b) {
            if (this.indicatorColumn == null) {
                return super.fc(a, b);
            }
            return this.fd(a, b, this.mi, runOn(this, this.n8), this.indicatorColumn);
        }
        get_dv() {
            return true;
        }
        pw(a, b, c) {
            if (c == null) {
                return true;
            }
            if (this.py(a, b).contains(c)) {
                return true;
            }
            return false;
        }
        p7(a, b, c) {
            this.pv(a, b);
        }
        an(a) {
            if (this.bz == null) {
                return null;
            }
            if (a != null && a == this.m3) {
                return this.ps;
            }
            return null;
        }
        c9(a) {
            let b = this.bz != null ? this.bz.indexOf(a) : -1;
            let c = this.bi.bs;
            c = c.copy();
            let d = this.bi.br;
            let e = new Rect(0, 0, 0, 1, 1);
            let f = this.l2(this.bi);
            if (b >= 0 && Rect.l_op_Inequality(c, null) && Rect.l_op_Inequality(d, null)) {
                if (this.mi != null) {
                    let g = new ScalerParams(0, e, e, this.mi.ca, f);
                    let h = this.mi.dy(b, g);
                    if (h < c.left + 0.1 * c.width) {
                        h = h + 0.4 * c.width;
                    }
                    if (h > c.right - 0.1 * c.width) {
                        h = h - 0.4 * c.width;
                    }
                    c.x = h - 0.5 * c.width;
                }
                if (this.m3 != null && this.indicatorColumn != null && b < this.indicatorColumn.count) {
                    let i = new ScalerParams(0, e, e, this.m3.ca, f);
                    i.b = this.eh();
                    let j = this.m3.dy(this.indicatorColumn._inner[b], i);
                    if (j < c.top + 0.1 * c.height) {
                        j = j + 0.4 * c.height;
                    }
                    if (j > c.bottom - 0.1 * c.height) {
                        j = j - 0.4 * c.height;
                    }
                    c.y = j - 0.5 * c.height;
                }
                this.bn.ap(this.bs, c, true);
            }
            return b >= 0;
        }
        dw(a, b, c) {
            let d = super.dw(a, b, c);
            if (this.indicatorColumn == null || this.indicatorColumn.count == 0) {
                d = false;
            }
            return d;
        }
        o9(a, b) {
            super.o9(a, b);
            let c = b.bs;
            let d = b.br;
            let e = this.getEffectiveViewport1(b);
            let f = this.mi;
            let g = this.m3;
            let h = new ScalerParams(0, c, d, f.ca, e);
            let i = new ScalerParams(0, c, d, g.ca, e);
            i.b = this.eh();
            a.f.clear();
            a.m.clear();
            a.p.clear();
            let j = 0;
            let k = typeCast(ISortingAxis_$type, this.mi);
            if (k != null && k.i$b.count != this.bz.count) {
                return;
            }
            j = this.n9(c, d, e);
            let l = this.p2();
            if (l == -1) {
                l = this.trendLinePeriod;
            }
            let m = typeCast(FinancialIndicatorView.$, b);
            if (m.b4) {
                m.b2.prepareLineCore(a.p, this.trendLineType, this.indicatorColumn, l, (n) => this.mi.dy(n, h), (n) => this.m3.dy(n, i), ((() => {
                    let $ret = new TrendResolutionParams();
                    $ret.c = b.bu.b;
                    $ret.d = b.bu.c;
                    $ret.e = b.bu.d;
                    $ret.a = j;
                    $ret.b = this.eu;
                    $ret.f = d;
                    $ret.g = c;
                    return $ret;
                })()));
            }
            let n = this.mi.d1(2, h) - this.mi.d1(1, h);
            for (let o = b.bu.c; o <= b.bu.d; ++o) {
                let p;
                if (k == null) {
                    p = b.bu.getBucket(o);
                }
                else {
                    let q = k.i$b._inner[o];
                    let r = k.i$d(q);
                    let s = this.indicatorColumn._inner[o];
                    let t = s;
                    let u = r;
                    while (o < b.bu.d) {
                        q = k.i$b._inner[o + 1];
                        u = k.i$d(q);
                        if (u - r > n) {
                            break;
                        }
                        o++;
                        let v = this.indicatorColumn._inner[o];
                        s = Math.min(s, v);
                        t = Math.max(t, v);
                    }
                    let w = NaN;
                    if (!isNaN_(r)) {
                        w = this.mi.dy(r, h);
                    }
                    p = [w, s, t];
                }
                if (!isNaN_(p[0])) {
                    if (this.mi != null && typeCast(ISortingAxis_$type, this.mi) !== null) {
                        p[0] = p[0] + j;
                    }
                    else {
                        p[0] = f.dy(p[0], h) + j;
                    }
                    p[1] = g.dy(p[1], i);
                    if (b.bu.b > 1 || k != null) {
                        p[2] = g.dy(p[2], i);
                    }
                    else {
                        p[2] = p[1];
                    }
                    a.f.add(p);
                }
            }
            return;
        }
        h3(a, b) {
            super.h3(a, b);
            let c = b;
            c.b5(a);
            if (c.b4) {
                c.b2.g$d();
            }
        }
        mr() {
            switch (this.pu) {
                case 1: return 1;
                case 2: return 1;
                case 0: return 12;
            }
            return 1;
        }
        pb(a, b) {
            super.pb(a, b);
            let c = typeCast(FinancialIndicatorView.$, b);
            let d = (e) => a.f._inner[e][0];
            let e = (f) => a.f._inner[f][1];
            if (c.b4) {
                c.b2.g$d();
                c.b2.g$g(a.p);
            }
            let f = b.br;
            let g = this.getEffectiveViewport1(b);
            let h = 0;
            let i = this.lb;
            let j = this.po;
            if (b.bx(a)) {
                c.b5(false);
                if (a.f.count > 0) {
                    switch (this.pu) {
                        case 0:
                            let k = CategorySeries.ne(a.f, a.f.count - 1, f, b.bs, false);
                            c.b9(a.f.count, d, e, true, k);
                            break;
                        case 1:
                            if (this.m3 != null) {
                                h = this.od(b);
                            }
                            else {
                                h = 0.5 * (f.top + f.bottom);
                            }
                            let l = CategorySeries.ne(a.f, a.f.count - 1, f, b.bs, false);
                            c.b7(a.f.count, d, e, true, h, l);
                            break;
                        case 2:
                            h = this.od(b);
                            c.b8(a.f.count, d, e, true, h);
                            break;
                        default: throw new NotImplementedException(0);
                    }
                }
                b.bz(a);
            }
            let m = a.f;
            let n = this.bz.count;
            this.mq.x(this, this.nq(), this.mi, runOn(this, this.ma), this.of(b), this.oh(b));
            let o = false;
            let p = this.mq.c;
            if (p != null) {
                o = true;
            }
            this.mq.al = i;
            this.mq.ah = i;
            if (o) {
                let q = new ScalerParams(0, b.bs, b.br, this.mi.ca, g);
                this.mq.f = false;
                this.o8(m, -1, n, this.mi, q, b.n);
            }
            this.mq.ae(c.cr, true, false, true, false);
            this.mq.ae(c.ct, true, false, true, false);
            this.mq.ae(c.cs, false, true, false, false);
            c.cs._opacity = 0.8 * this.mq.i * this.d6;
            this.mq.ae(c.cq, true, false, false, false);
            this.mq.al = j;
            this.mq.ah = j;
            if (o) {
                let r = new ScalerParams(0, b.bs, b.br, this.mi.ca, g);
                this.mq.f = true;
                this.o8(m, -1, n, this.mi, r, b.n);
            }
            this.mq.ae(c.cn, true, false, true, false);
            this.mq.ae(c.cp, true, false, true, false);
            this.mq.ae(c.co, false, true, false, false);
            c.co._opacity = 0.8 * this.mq.i * this.d6;
            this.mq.ae(c.cm, true, false, false, false);
            c.cb();
        }
        jw() {
            super.jw();
            if (this.fh < 0) {
                return;
            }
            if (this.pt.b4) {
                this.pt.cc();
            }
        }
        p6() {
            if (this.pt.b4) {
                this.pt.b2.g$i();
            }
            this.pv(0, this.indicatorColumn.count);
            if (this.m3 != null && !this.m3.cn()) {
                this.jl(false);
            }
        }
        ic(a) {
            super.ic(a);
            this.a2.exportTrendlineData(this, a, this.pt.b2.g$j);
        }
    }
    FinancialIndicator.$t = /*@__PURE__*/ markType(FinancialIndicator, 'FinancialIndicator', FinancialSeries.$, [ITrendLineSeries_$type]);
    FinancialIndicator.p8 = /*@__PURE__*/ DependencyProperty.i("ActualTrendLineBrush", Brush.$, FinancialIndicator.$, /*@__PURE__*/ new PropertyMetadata(2, null, (a, b) => a.raisePropertyChanged("ActualTrendLineBrush", b.oldValue, b.newValue)));
    FinancialIndicator.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, FinancialIndicator, 'raisePropertyChanged', ['DisplayType:pu:p9', [IndicatorDisplayType_$type, /*@__PURE__*/ enumGetBox(IndicatorDisplayType_$type, 0)], 'IgnoreFirst:p0:qa', [1, 0], 'TrendLineType::qg', [TrendLineType_$type, /*@__PURE__*/ enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness::qf', [1, 1.5], 'TrendLinePeriod::qe', [1, 7], 'TrendLineBrush::qb', [Brush.$, null], 'TrendLineZIndex:p1:qh', [1, 1001], 'TrendLineDashArray:qj:qc', [DoubleCollection.$], 'TrendLineDashCap:qk:qd', [PenLineCap_$type, /*@__PURE__*/ enumGetBox(PenLineCap_$type, 0)]]);
    return FinancialIndicator;
})();
/**
 * @hidden
 */
export let FinancialIndicatorBucketCalculator = /*@__PURE__*/ (() => {
    class FinancialIndicatorBucketCalculator extends FinancialBucketCalculator {
        constructor(a) {
            super(a);
            this.f = null;
            this.f = a;
        }
        getBucket(a) {
            let b = a * this.b;
            let c = Math.min(b + this.b - 1, this.f.b0.indicatorColumn.count - 1);
            let d = NaN;
            let e = NaN;
            for (let f = b; f <= c; ++f) {
                let g = this.f.b0.indicatorColumn._inner[f];
                if (!isNaN_(d)) {
                    if (!isNaN_(g)) {
                        d = Math.min(d, g);
                        e = Math.max(e, g);
                    }
                }
                else {
                    d = g;
                    e = g;
                }
            }
            if (!isNaN_(d)) {
                return [0.5 * (b + c), d, e];
            }
            return [NaN, NaN, NaN];
        }
    }
    FinancialIndicatorBucketCalculator.$t = /*@__PURE__*/ markType(FinancialIndicatorBucketCalculator, 'FinancialIndicatorBucketCalculator', FinancialBucketCalculator.$);
    return FinancialIndicatorBucketCalculator;
})();
/**
 * @hidden
 */
export let FinancialIndicatorView = /*@__PURE__*/ (() => {
    class FinancialIndicatorView extends FinancialSeriesView {
        constructor(a) {
            super(a);
            this.b0 = null;
            this.b3 = null;
            this.cr = ((() => {
                let $ret = new Path();
                $ret.ak = new PathGeometry();
                return $ret;
            })());
            this.cn = ((() => {
                let $ret = new Path();
                $ret.ak = new PathGeometry();
                return $ret;
            })());
            this.cs = ((() => {
                let $ret = new Path();
                $ret.ak = new PathGeometry();
                return $ret;
            })());
            this.co = ((() => {
                let $ret = new Path();
                $ret.ak = new PathGeometry();
                return $ret;
            })());
            this.ct = ((() => {
                let $ret = new Path();
                $ret.ak = new PathGeometry();
                return $ret;
            })());
            this.cp = ((() => {
                let $ret = new Path();
                $ret.ak = new PathGeometry();
                return $ret;
            })());
            this.cq = ((() => {
                let $ret = new Path();
                $ret.ak = new GeometryGroup();
                return $ret;
            })());
            this.cm = ((() => {
                let $ret = new Path();
                $ret.ak = new GeometryGroup();
                return $ret;
            })());
            this.b1 = null;
            this.cj = new Path();
            this.cl = new Path();
            this.ck = new Path();
            this.ci = new Path();
            this.cf = new Path();
            this.ch = new Path();
            this.cg = new Path();
            this.ce = new Path();
            this.b0 = a;
            this.b3 = ((() => {
                let $ret = new Pool$1(LineGeometry.$);
                $ret.create = runOn(this, this.cd);
                $ret.destroy = runOn(this, this.b6);
                return $ret;
            })());
        }
        bv() {
            return new FinancialIndicatorBucketCalculator(this);
        }
        ap() {
            super.ap();
            if (!this.n) {
                this.bw.po = ((() => {
                    let $ret = new Brush();
                    $ret.fill = "#C62828";
                    return $ret;
                })());
                this.bw.ey = 2;
            }
        }
        cd() {
            return new LineGeometry();
        }
        b6(a) {
        }
        get b2() {
            if (this.b1 == null) {
                this.b1 = CategoryTrendLineManagerFactory.a(this.b1, this.e.ap(), this.e.j5, this.e, this.e.b2);
            }
            return this.b1;
        }
        set b2(a) {
            this.b1 = a;
        }
        get b4() {
            return this.b1 != null;
        }
        b5(a) {
            Extensions.e(this.cr.ak);
            Extensions.e(this.cs.ak);
            Extensions.e(this.ct.ak);
            Extensions.e(this.cn.ak);
            Extensions.e(this.co.ak);
            Extensions.e(this.cp.ak);
            Extensions.d(this.cq.ak);
            Extensions.d(this.cm.ak);
            if (a) {
                this.b3.count = 0;
            }
            this.an();
        }
        cb() {
        }
        b9(a, b, c, d, e) {
            IndicatorRenderer.g(a, b, c, d, this.bs, this.br, this.cr, this.cn, this.bu.b, this.e.eu, e);
            this.an();
        }
        b7(a, b, c, d, e, f) {
            IndicatorRenderer.e(a, b, c, d, this.bs, this.br, this.cr, this.cs, this.cn, this.co, e, this.bu.b, this.e.eu, f);
            this.an();
        }
        b8(a, b, c, d, e) {
            IndicatorRenderer.f(a, b, c, d, this.br, e, this.b3, this.cq, this.cm);
            this.an();
        }
        cc() {
            this.b0.qi = null;
            if (this.b0.trendLineBrush != null) {
                this.b0.qi = this.b0.trendLineBrush;
            }
            else {
                this.b0.qi = this.b0.lb;
            }
        }
        a9() {
            super.a9();
            let a = this.bl();
            this.cj.ak = this.cr.ak;
            this.cl.ak = this.ct.ak;
            this.ck.ak = this.cs.ak;
            this.ci.ak = this.cq.ak;
            this.cf.ak = this.cn.ak;
            this.ch.ak = this.cp.ak;
            this.cg.ak = this.co.ak;
            this.ce.ak = this.cm.ak;
            this.cj._stroke = a;
            this.cl._stroke = a;
            this.cj.ac = this.e.ey + 3;
            this.cl.ac = this.e.ey + 3;
            this.ck._fill = a;
            this.ck._opacity = 1;
            this.ci._stroke = a;
            this.ci.ac = this.e.ey + 3;
            this.cf._stroke = a;
            this.ch._stroke = a;
            this.cf.ac = this.e.ey + 3;
            this.ch.ac = this.e.ey + 3;
            this.cg._fill = a;
            this.cg._opacity = 1;
            this.ce._stroke = a;
            this.ce.ac = this.e.ey + 3;
        }
        a3(a, b) {
            super.a3(a, b);
            if (a.d) {
                if (b) {
                    if (this.b0.pu == 2) {
                        a.s(this.ci);
                        a.s(this.ce);
                    }
                    else {
                        a.s(this.ck);
                        a.s(this.cj);
                        a.s(this.cl);
                        a.s(this.cg);
                        a.s(this.cf);
                        a.s(this.ch);
                    }
                }
                else {
                    if (this.b0.pu == 2) {
                        a.s(this.cq);
                        a.s(this.cm);
                    }
                    else {
                        a.s(this.cs);
                        a.s(this.cr);
                        a.s(this.ct);
                        a.s(this.co);
                        a.s(this.cn);
                        a.s(this.cp);
                    }
                }
            }
        }
        a2(a, b) {
            if (a.d) {
                if (this.b0.trendLineType != 0 && !b) {
                    let c = this.b2.g$j;
                    c.ac = this.b0.trendLineThickness;
                    c._stroke = this.b0.qi;
                    c.ad = this.b0.qk;
                    c.ai = this.b0.qj;
                    a.u(c);
                }
            }
            super.a2(a, b);
        }
        ai(a) {
            super.ai(a);
            this.e.a2.exportPathData(a, this.cq, "positiveColumnsShape", ["Positive", "Main"]);
            this.e.a2.exportPathData(a, this.cm, "negativeColumnsShape", ["Negative"]);
            this.e.a2.exportPathData(a, this.cr, "positive0", ["Positive", "Main"]);
            this.e.a2.exportPathData(a, this.ct, "positive1", ["Positive"]);
            this.e.a2.exportPathData(a, this.cs, "positive01", ["PositiveFill"]);
            this.e.a2.exportPathData(a, this.cn, "negative0", ["Negative", "Main"]);
            this.e.a2.exportPathData(a, this.cp, "negative1", ["Negative"]);
            this.e.a2.exportPathData(a, this.co, "negative01", ["NegativeFill"]);
        }
        ca() {
            if (this.b4) {
                this.b1 = CategoryTrendLineManagerFactory.a(this.b1, this.e.ap(), this.e.j5, this.e, this.e.b2);
            }
        }
    }
    FinancialIndicatorView.$t = /*@__PURE__*/ markType(FinancialIndicatorView, 'FinancialIndicatorView', FinancialSeriesView.$);
    return FinancialIndicatorView;
})();
//# sourceMappingURL=FinancialIndicator_combined.js.map
