/*
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 { EventArgs, Base, markType, typeCast, Point_$type, String_$type, runOn, Number_$type, enumGetBox, fromEnum, toEnum, Date_$type, markDep, Delegate_$type } from "igniteui-react-core";
import { IBucketizer_$type } from "./IBucketizer";
import { ArgumentNullException } from "igniteui-react-core";
import { IFastItemColumn$1_$type } from "igniteui-react-core";
import { Series } from "./Series";
import { Rect } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { ISortingAxis_$type } from "./ISortingAxis";
import { SeriesView } from "./SeriesView";
import { truncate, intDivide, isInfinity, isNaN_ } from "igniteui-react-core";
import { IHasCategoryAxis_$type } from "./IHasCategoryAxis";
import { IHasCategoryModePreference_$type } from "./IHasCategoryModePreference";
import { Brush } from "igniteui-react-core";
import { DependencyProperty } from "igniteui-react-core";
import { CategoryAxisBase } from "./CategoryAxisBase";
import { NumericYAxis } from "./NumericYAxis";
import { HighlightingInfo } from "./HighlightingInfo";
import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode";
import { CategoryTransitionSourceFramePreparer } from "./CategoryTransitionSourceFramePreparer";
import { CategoryFrame } from "./CategoryFrame";
import { CategoryMode_$type } from "./CategoryMode";
import { ITimeRangeSelectorAxis_$type } from "./ITimeRangeSelectorAxis";
import { FastReflectionHelper } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { Dictionary$2 } from "igniteui-react-core";
import { CategorySeriesRenderManager } from "./CategorySeriesRenderManager";
import { IFastItemsSource_$type } from "igniteui-react-core";
import { FinancialValueList } from "./FinancialValueList";
import { CategoryXAxis } from "./CategoryXAxis";
import { SafeSortedReadOnlyDoubleCollection } from "./SafeSortedReadOnlyDoubleCollection";
import { SafeReadOnlyDoubleCollection } from "./SafeReadOnlyDoubleCollection";
import { SafeEnumerable } from "./SafeEnumerable";
import { CalculatedColumn } from "./CalculatedColumn";
import { TrendCalculators } from "igniteui-react-core";
import { ColumnSupportingCalculation } from "./ColumnSupportingCalculation";
import { IDateTimeAxis_$type } from "./IDateTimeAxis";
import { PropertyMetadata } from "igniteui-react-core";
import { stringIsNullOrEmpty } from "igniteui-react-core";
import { dateToStringFormat } from "igniteui-react-core";
import { SupportingCalculation$1 } from "./SupportingCalculation$1";
import { SRProvider } from "igniteui-react-core";
import { Color } from "igniteui-react-core";
/**
 * @hidden
 */
export let FinancialEventArgs = /*@__PURE__*/ (() => {
    class FinancialEventArgs extends EventArgs {
        constructor(a, b, c, d, e) {
            super();
            this._position = 0;
            this._count = 0;
            this._dataSource = null;
            this._supportingCalculations = null;
            this._basedOn = null;
            this.position = a;
            this.count = b;
            this.dataSource = c;
            this.supportingCalculations = d;
            if (c != null) {
                c.series = e;
            }
        }
        get position() {
            return this._position;
        }
        set position(a) {
            this._position = a;
        }
        get count() {
            return this._count;
        }
        set count(a) {
            this._count = a;
        }
        get dataSource() {
            return this._dataSource;
        }
        set dataSource(a) {
            this._dataSource = a;
        }
        get supportingCalculations() {
            return this._supportingCalculations;
        }
        set supportingCalculations(a) {
            this._supportingCalculations = a;
        }
        get basedOn() {
            return this._basedOn;
        }
        set basedOn(a) {
            this._basedOn = a;
        }
    }
    FinancialEventArgs.$t = /*@__PURE__*/ markType(FinancialEventArgs, 'FinancialEventArgs', EventArgs.$);
    return FinancialEventArgs;
})();
/**
 * @hidden
 */
export let FinancialBucketCalculator = /*@__PURE__*/ (() => {
    class FinancialBucketCalculator extends Base {
        constructor(a) {
            super();
            this.a = null;
            this.c = 0;
            this.d = 0;
            this.b = 0;
            if (a == null) {
                throw new ArgumentNullException(0, "view");
            }
            this.a = a;
            this.c = -1;
            this.d = this.d;
            this.b = 0;
        }
        getBucket(a) {
            return null;
        }
        getBucketWithoutUnknowns(a) {
            return this.getBucket(a);
        }
        getErrorBucket(a, b) {
            return NaN;
        }
        getBucketInfo(a, b, c, d) {
            a = this.c;
            b = this.d;
            c = this.b;
            d = this.a.bw.eu;
            return {
                p0: a,
                p1: b,
                p2: c,
                p3: d
            };
        }
        e(a) {
            let b = this.a.bs;
            let c = this.a.br;
            let d = this.a.br;
            if (this.a.bw != null) {
                d = this.a.bw.getEffectiveViewport1(this.a);
            }
            if (b.isEmpty || c.isEmpty || this.a.bw.mi == null) {
                this.b = 0;
                return;
            }
            let e = (this.a.bw.mi != null) ? this.a.bw.mi.ca : false;
            let f = new ScalerParams(0, b, c, e, d);
            let g = this.a.bw.l0(this.a);
            let h = typeCast(ISortingAxis_$type, this.a.bw.mi);
            if (h == null || h.i$b == null) {
                let i = Math.floor(this.a.bw.mi.d1(g.left, f));
                let j = Math.ceil(this.a.bw.mi.d1(g.right, f));
                if (this.a.bw.mi.ca) {
                    j = Math.ceil(this.a.bw.mi.d1(g.left, f));
                    i = Math.floor(this.a.bw.mi.d1(g.right, f));
                }
                let k = Math.floor((j - i + 1) * a / g.width);
                this.b = truncate(Math.max(1, k));
                this.c = truncate(Math.floor(i / this.b));
                this.d = truncate(Math.ceil(j / this.b));
            }
            else {
                this.c = h.i$e(b, c, d, g);
                this.d = h.i$g(b, c, d, g);
                this.b = 1;
            }
        }
        cacheValues() {
        }
        unCacheValues() {
        }
    }
    FinancialBucketCalculator.$t = /*@__PURE__*/ markType(FinancialBucketCalculator, 'FinancialBucketCalculator', Base.$, [IBucketizer_$type]);
    return FinancialBucketCalculator;
})();
/**
 * @hidden
 */
export let FinancialSeries = /*@__PURE__*/ (() => {
    class FinancialSeries extends Series {
        constructor() {
            super();
            this.m8 = null;
            this.m6 = null;
            this.m7 = null;
            this.m5 = null;
            this.m9 = null;
            this.ni = false;
            this.assigningCategoryStyle = null;
            this.mq = null;
            this.nt = new Dictionary$2(IFastItemColumn$1_$type.specialize(Number_$type), String_$type, 0);
            this.nu = new Dictionary$2(String_$type, String_$type, 0);
            this.nh = false;
            this.m1 = null;
            this.ml = null;
            this.mn = null;
            this.mk = null;
            this.mt = null;
            this.typical = null;
            this.typicalBasedOn = null;
            this.ng = false;
            this.n6 = null;
            this.n4 = null;
            this.n5 = null;
            this.n3 = null;
            this.n7 = null;
            this.mm = null;
            this.mj = null;
            this.mo = 0;
            this.m2 = null;
            this.m4 = null;
            this.mq = new CategorySeriesRenderManager();
            this.ni = false;
            this.mt = new CategoryTransitionSourceFramePreparer();
            this.mm = new CategoryFrame(3);
            this.ab = FinancialSeries.$;
            this.mp = 0;
        }
        i2(a) {
            super.i2(a);
            this.my = a;
        }
        get_cr() {
            return true;
        }
        ag() {
            return [this.mi, this.m3];
        }
        fs(a, b) {
            let c = this.g2(b);
            if (c == FinancialSeries.$$p[6]) {
                return this.ft(a, b, this.oy);
            }
            if (c == FinancialSeries.$$p[1]) {
                return this.ft(a, b, this.op);
            }
            if (c == FinancialSeries.$$p[4]) {
                return this.ft(a, b, this.ou);
            }
            if (c == FinancialSeries.$$p[0]) {
                return this.ft(a, b, this.om);
            }
            if (c == FinancialSeries.$$p[8]) {
                return this.ft(a, b, this.o2);
            }
            return super.fs(a, b);
        }
        oi() {
            return 2;
        }
        og() {
            return 4;
        }
        ah(a) {
            let b = this.aj(this.mi, this.mk.f, this.of(this.bi), this.oh(this.bi), this.ly(a), true);
            if (b == null) {
                return null;
            }
            let c = b[0];
            let d = b[1];
            let e = new Array(1);
            let f = new Array(2);
            let g = this.oi();
            f[0] = { $type: Point_$type, x: c[0], y: c[g] };
            f[1] = { $type: Point_$type, x: d[0], y: d[g] };
            e[0] = f;
            return e;
        }
        ai(a) {
            let b = this.aj(this.mi, this.mk.f, this.of(this.bi), this.oh(this.bi), this.ly(a), true);
            if (b == null) {
                return null;
            }
            let c = b[0];
            let d = b[1];
            let e = new Array(1);
            let f = new Array(2);
            f[0] = { $type: Point_$type, x: c[0], y: c[1] };
            f[1] = { $type: Point_$type, x: d[0], y: d[1] };
            e[0] = f;
            return e;
        }
        lj() {
            return this.po;
        }
        h1() {
            super.h1();
            this.mi = null;
            this.m3 = null;
        }
        get nd() {
            return this.m8;
        }
        set nd(a) {
            if (this.m8 != a) {
                let b = this.m8;
                this.m8 = a;
                this.raisePropertyChanged("OpenColumn", b, this.m8);
            }
        }
        get nb() {
            return this.m6;
        }
        set nb(a) {
            if (this.m6 != a) {
                let b = this.m6;
                this.m6 = a;
                this.raisePropertyChanged("HighColumn", b, this.m6);
            }
        }
        get nc() {
            return this.m7;
        }
        set nc(a) {
            if (this.m7 != a) {
                let b = this.m7;
                this.m7 = a;
                this.raisePropertyChanged("LowColumn", b, this.m7);
            }
        }
        get na() {
            return this.m5;
        }
        set na(a) {
            if (this.m5 != a) {
                let b = this.m5;
                this.m5 = a;
                this.raisePropertyChanged("CloseColumn", b, this.m5);
            }
        }
        get nf() {
            return this.m9;
        }
        set nf(a) {
            if (this.m9 != a) {
                let b = this.m9;
                this.m9 = a;
                this.raisePropertyChanged("VolumeColumn", b, this.m9);
            }
        }
        nq() {
            return (this.assigningCategoryStyle != null && this.ni) || this.cu;
        }
        pa(a) {
            if (this.assigningCategoryStyle != null && this.ni) {
                this.assigningCategoryStyle(this, a);
            }
        }
        o8(a, b, c, d, e, f) {
            let g = this.b9;
            this.mq.ac(a, b, c, d, e, f, g);
            let h = this.mq.c;
            let i = null;
            let j = this.bz;
            if (g && this.bs != null) {
                i = this.bs.az.getHighlightingInfo(this, j, d, h.m, h.l, false);
                h.b = i;
            }
            h.f = f;
            this.pa(h);
            this.mq.aa(i, f, g);
        }
        n8(a) {
            return this.ed(a, this.mi);
        }
        fe(a, b) {
            return this.ff(a, b, this.mi, runOn(this, this.n8), new FinancialValueList(this.nd, this.nb, this.nc, this.na, this.nf));
        }
        fc(a, b) {
            return this.fd(a, b, this.mi, runOn(this, this.n8), new FinancialValueList(this.nd, this.nb, this.nc, this.na, this.nf));
        }
        d9(a, b, c, d, e) {
            if (c == null) {
                return Number.POSITIVE_INFINITY;
            }
            let f = this.mi.j7;
            return this.ea(a, b, this.mi, d, e, f, runOn(this, this.n8));
        }
        getOffsetValue() {
            return this.n9(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi));
        }
        getCategoryWidth() {
            return this.mi.getCategorySize(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi));
        }
        lv(a, b, c) {
            return this.lx(a, b, c, this.n9(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.m3, this.mi, null, null, null);
        }
        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);
            return this.ep(new FinancialValueList(this.nd, this.nb, this.nc, this.na, this.nf), a, this.mi, f, e, runOn(this, this.n8), b, c);
        }
        ej(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);
            return this.ep(this.nb, a, this.mi, f, e, runOn(this, this.n8), b, c);
        }
        el(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);
            return this.ep(this.nc, a, this.mi, f, e, runOn(this, this.n8), b, c);
        }
        oa(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);
            return this.ep(this.na, a, this.mi, f, e, runOn(this, this.n8), b, c);
        }
        ob(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);
            return this.ep(this.nd, a, this.mi, f, e, runOn(this, this.n8), b, c);
        }
        oc(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);
            return this.ep(this.nf, a, this.mi, f, e, runOn(this, this.n8), b, c);
        }
        lr(a, b, c) {
            return this.lx(a, b, c, this.n9(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.m3, this.mi, runOn(this, this.ej), (d, e) => this.ff(d, e, this.mi, runOn(this, this.n8), this.nb), (d, e) => this.fd(d, e, this.mi, runOn(this, this.n8), this.nb));
        }
        lt(a, b, c) {
            return this.lx(a, b, c, this.n9(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.m3, this.mi, runOn(this, this.el), (d, e) => this.ff(d, e, this.mi, runOn(this, this.n8), this.nc), (d, e) => this.fd(d, e, this.mi, runOn(this, this.n8), this.nc));
        }
        pq(a, b, c) {
            return this.lx(a, b, c, this.n9(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.m3, this.mi, runOn(this, this.ob), (d, e) => this.ff(d, e, this.mi, runOn(this, this.n8), this.nd), (d, e) => this.fd(d, e, this.mi, runOn(this, this.n8), this.nd));
        }
        pp(a, b, c) {
            return this.lx(a, b, c, this.n9(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.m3, this.mi, runOn(this, this.oa), (d, e) => this.ff(d, e, this.mi, runOn(this, this.n8), this.na), (d, e) => this.fd(d, e, this.mi, runOn(this, this.n8), this.na));
        }
        pr(a, b, c) {
            return this.lx(a, b, c, this.n9(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.m3, this.mi, runOn(this, this.oc), (d, e) => this.ff(d, e, this.mi, runOn(this, this.n8), this.nf), (d, e) => this.fd(d, e, this.mi, runOn(this, this.n8), this.nf));
        }
        ik() {
            super.ik();
            if (this.mi != null) {
                this.mi.hb(false);
            }
            if (this.m3 != null) {
                this.m3.hb(false);
            }
        }
        j1(a, b) {
            this.my.bu.e(this.eu);
            this.jl(false);
        }
        j0(a, b) {
            if (this.dm && this.ez < 0.05) {
                this.dn = true;
            }
            this.my.bu.e(this.eu);
            this.jl(false);
        }
        ne(a, b, c) {
            let d = this.bw(b);
            this.nt.addItem(d, b);
            this.nu.addItem(b, c);
            return d;
        }
        o7(a, b) {
            if (b == null) {
                return;
            }
            a.deregisterColumn(b);
            let c = this.nt.item(b);
            this.nu.removeItem(c);
            this.nt.removeItem(b);
        }
        i7(a, b, c, d) {
            super.i7(a, b, c, d);
            switch (b) {
                case "SyncLink":
                    if (this.bn != null && this.bs != null) {
                        this.my.bu.e(this.eu);
                        this.jl(false);
                    }
                    break;
                case "SeriesViewer":
                    if (c != null && d == null) {
                        if (this.mi != null) {
                            this.mi.bx(this);
                        }
                        if (this.m3 != null) {
                            this.m3.bx(this);
                        }
                    }
                    if (c == null && d != null) {
                        if (this.mi != null) {
                            this.mi.ck(this);
                        }
                        if (this.m3 != null) {
                            this.m3.ck(this);
                        }
                    }
                    this.my.bu.e(this.eu);
                    this.jl(false);
                    break;
                case "FastItemsSource":
                    this.nh = true;
                    if (typeCast(IFastItemsSource_$type, c) != null) {
                        this.o7(typeCast(IFastItemsSource_$type, c), this.nd);
                        this.o7(typeCast(IFastItemsSource_$type, c), this.nb);
                        this.o7(typeCast(IFastItemsSource_$type, c), this.nc);
                        this.o7(typeCast(IFastItemsSource_$type, c), this.na);
                        this.o7(typeCast(IFastItemsSource_$type, c), this.nf);
                        this.nd = null;
                        this.nb = null;
                        this.nc = null;
                        this.na = null;
                        this.nf = null;
                    }
                    if (typeCast(IFastItemsSource_$type, d) != null) {
                        if (stringIsNullOrEmpty(this.oy) == false) {
                            this.nd = this.ne(typeCast(IFastItemsSource_$type, d), this.oy, "OpenColumn");
                        }
                        if (stringIsNullOrEmpty(this.op) == false) {
                            this.nb = this.ne(typeCast(IFastItemsSource_$type, d), this.op, "HighColumn");
                        }
                        if (stringIsNullOrEmpty(this.ou) == false) {
                            this.nc = this.ne(typeCast(IFastItemsSource_$type, d), this.ou, "LowColumn");
                        }
                        if (stringIsNullOrEmpty(this.om) == false) {
                            this.na = this.ne(typeCast(IFastItemsSource_$type, d), this.om, "CloseColumn");
                        }
                        if (stringIsNullOrEmpty(this.o2) == false) {
                            this.nf = this.ne(typeCast(IFastItemsSource_$type, d), this.o2, "VolumeColumn");
                        }
                    }
                    this.nh = false;
                    if (this.m3 != null && !this.m3.cn()) {
                        this.my.bu.e(this.eu);
                        this.jl(false);
                    }
                    break;
                case FinancialSeries.$$p[6]:
                    if (this.bz != null) {
                        this.o7(this.bz, this.nd);
                        this.nd = this.ne(this.bz, this.oy, "OpenColumn");
                    }
                    break;
                case "OpenColumn":
                    if (this.m3 != null && !this.m3.cn() && !this.nh) {
                        this.my.bu.e(this.eu);
                        this.jl(false);
                    }
                    break;
                case FinancialSeries.$$p[1]:
                    if (this.bz != null) {
                        this.o7(this.bz, this.nb);
                        this.nb = this.ne(this.bz, this.op, "HighColumn");
                    }
                    break;
                case "HighColumn":
                    if (this.m3 != null && !this.m3.cn() && !this.nh) {
                        this.my.bu.e(this.eu);
                        this.jl(false);
                    }
                    break;
                case FinancialSeries.$$p[4]:
                    if (this.bz != null) {
                        this.o7(this.bz, this.nc);
                        this.nc = this.ne(this.bz, this.ou, "LowColumn");
                    }
                    break;
                case "LowColumn":
                    if (this.m3 != null && !this.m3.cn() && !this.nh) {
                        this.my.bu.e(this.eu);
                        this.jl(false);
                    }
                    break;
                case FinancialSeries.$$p[0]:
                    if (this.bz != null) {
                        this.o7(this.bz, this.na);
                        this.na = this.ne(this.bz, this.om, "CloseColumn");
                    }
                    break;
                case "CloseColumn":
                    if (this.m3 != null && !this.m3.cn() && !this.nh) {
                        this.my.bu.e(this.eu);
                        this.jl(false);
                    }
                    this.pc();
                    break;
                case FinancialSeries.$$p[8]:
                    if (this.bz != null) {
                        this.o7(this.bz, this.nf);
                        this.nf = this.ne(this.bz, this.o2, "VolumeColumn");
                    }
                    break;
                case "VolumeColumn":
                    if (this.m3 != null && !this.m3.cn() && !this.nh) {
                        this.my.bu.e(this.eu);
                        this.jl(false);
                    }
                    break;
                case FinancialSeries.$$p[9]:
                    if (c != null) {
                        c.bx(this);
                    }
                    if (d != null) {
                        d.ck(this);
                    }
                    this.my.bu.e(this.eu);
                    this.jl(false);
                    this.it();
                    this.m2 = typeCast(ITimeRangeSelectorAxis_$type, this.mi);
                    break;
                case FinancialSeries.$$p[10]:
                    if (c != null) {
                        c.bx(this);
                    }
                    if (d != null) {
                        d.ck(this);
                    }
                    this.my.bu.e(this.eu);
                    if (this.m3 != null) {
                        this.m3.cn();
                    }
                    {
                        this.jl(false);
                    }
                    this.it();
                    break;
                case "TransitionProgress":
                    this.mn.c(this.ez, this.ml, this.mk);
                    if (this.cc(this.bi)) {
                        return;
                    }
                    if (this.ez == 1) {
                        this.mk.v();
                        this.pb(this.mk, this.my);
                        if (this.dm) {
                            this.dm = false;
                            this.h4();
                            this.bt.r = truncate(this.eq());
                            this.bt.b = this.bu;
                        }
                    }
                    else {
                        this.pb(this.mn, this.my);
                    }
                    if (this.bs != null) {
                        this.bs.ko(this);
                    }
                    break;
                case FinancialSeries.$$p[5]:
                    this.jl(false);
                    break;
                case "IsCustomCategoryStyleAllowed":
                    this.ni = this.nl();
                    this.jl(false);
                    break;
                case "CategoryMode":
                    if (this.mi != null) {
                        this.mi.kv(true);
                    }
                    break;
            }
        }
        nk(a) {
            if (typeCast(NumericYAxis.$, a) !== null) {
                return true;
            }
            return false;
        }
        nj(a) {
            if (typeCast(CategoryXAxis.$, a) !== null || a.b7) {
                return true;
            }
            return false;
        }
        mb(a, b, c) {
            if (b < a || a < 0 || a > this.bz.count || b < 0 || b > this.bz.count || c == null) {
                return null;
            }
            let d = new Array((b - a) + 1);
            let e = c.cf;
            let f = null;
            if (e) {
                f = c.i$b;
            }
            for (let g = a; g <= b; g++) {
                let h = g;
                if (e) {
                    h = f._inner[h];
                }
                d[g - a] = this.bz.item(g);
            }
            return d;
        }
        of(a) {
            return a.bu.b;
        }
        oh(a) {
            return a.bu.c;
        }
        ma(a, b) {
            return this.mb(a, b, this.m3);
        }
        get_nm() {
            return false;
        }
        get nm() {
            return this.get_nm();
        }
        get_cv() {
            return true;
        }
        at(a, b) {
            if (this.nm) {
                let c = this.m0(a, b, this.m1);
                this.m1 = c;
                return c;
            }
            else {
                let d = this.mz(a, b, this.m1);
                this.m1 = d;
                return d;
            }
        }
        oj(a) {
            let b = this.mk;
            if (this.ca()) {
                b = this.mn;
            }
            let c = this.bi.br;
            let d = this.bi.bs;
            let e = this.mi;
            let f = 0;
            if (e.ch) {
                let g = (a.y - d.top) / d.height;
                f = g * c.height + c.top;
            }
            else {
                let h = (a.x - d.left) / d.width;
                f = h * c.width + c.left;
            }
            let i = b.f.count;
            let j = 0;
            for (j = 0; j < i; j++) {
                let k = b.f._inner[j];
                let l = null;
                if (j < i - 1) {
                    l = b.f._inner[j + 1];
                }
                if (k[0] <= f && l == null || l[0] >= f) {
                    if (l != null) {
                        if (Math.abs(k[0] - f) < Math.abs(l[0] - f)) {
                            return j;
                        }
                        else {
                            return j + 1;
                        }
                    }
                    else {
                        return j;
                    }
                }
            }
            return j;
        }
        m0(a, b, c) {
            let d = this.bz.count;
            let e = this.my.bu.c;
            let f = this.my.bu.d;
            let g = this.my.bu.b;
            let h = this.mi;
            let i = -1;
            let j = -1;
            if (h.cf) {
                let k = this.mk;
                if (this.ca()) {
                    k = this.mn;
                }
                let l = this.oj(b);
                i = l;
                j = l;
            }
            else {
                let m = this.e8(b);
                i = truncate(Math.floor((intDivide(m, g)))) * g;
                j = i + (g - 1);
            }
            if (c != null && c.f == i && c.e == j) {
                return c;
            }
            let n = new HighlightingInfo();
            n.b = this;
            n.f = i;
            n.e = j;
            return n;
        }
        mz(a, b, c) {
            let d = new HighlightingInfo();
            d.b = this;
            d.f = 0;
            d.e = this.bz.count - 1;
            if (c != null && c.f == d.f && c.e == d.e) {
                return c;
            }
            return d;
        }
        nl() {
            return this.no;
        }
        eb(a) {
            let b = this.bi.bs;
            let c = this.bi.br;
            let d = -1;
            if (!b.isEmpty && !c.isEmpty && this.mi != null) {
                let e = this.getEffectiveViewport1(this.bi);
                let f = new ScalerParams(0, b, c, this.mi.ca, e);
                let g = this.l0(this.bi);
                let h = this.mi.d1(g.left, f);
                let i = this.mi.d1(g.right, f);
                let j = (a.x - b.left) / b.width;
                let k = h + (j * (i - h));
                if (this.mi.categoryMode != 0) {
                    k -= 0.5;
                }
                d = k;
            }
            return d;
        }
        e8(a) {
            return truncate(Math.round(this.eb(a)));
        }
        get_c1() {
            return typeCast(ISortingAxis_$type, this.mi) !== null;
        }
        ap() {
            return this.mi;
        }
        fa(a) {
            let b = this.bi.bs;
            let c = this.bi.br;
            let d = this.getEffectiveViewport1(this.bi);
            if (b.isEmpty || c.isEmpty) {
                return -1;
            }
            let e = new Rect(0, 0, 0, 1, 1);
            let f = new ScalerParams(0, b, c, this.mi.ca, d);
            let g = typeCast(ISortingAxis_$type, this.mi);
            let h = this.l0(this.bi);
            let i = h.left;
            let j = h.right;
            let k = this.lq(a).x;
            let l = this.mi.d1(k, f);
            let m = this.mi.d1(i, f);
            let n = this.mi.d1(j, f);
            l = Math.max(m, Math.min(n, l));
            let o = g.i$f(l);
            return o;
        }
        fp(a) {
            let b = 0;
            if (typeCast(ISortingAxis_$type, this.mi) !== null) {
                b = this.fa(a);
                if (b == -1) {
                    return null;
                }
            }
            else {
                b = this.e8(a);
            }
            return b >= 0 && this.bz != null && b < this.bz.count ? this.bz.item(b) : null;
        }
        n9(a, b, c) {
            if (this.mi == null) {
                return 0;
            }
            return this.mi.j0(a, b, c, this.fh);
        }
        dc() {
            return this.np;
        }
        mr() {
            return 11;
        }
        bo() {
            return 3;
        }
        pb(a, b) {
            this.lz = a.aa;
            b.ar();
        }
        o9(a, b) {
            a.u();
        }
        dw(a, b, c) {
            let d = super.dw(a, b, c);
            let e = c;
            if (this.bz == null || this.bz.count == 0 || !c.l() || b.isEmpty || a.isEmpty || this.mi == null || this.m3 == null || e.bu.b < 1 || this.mi.bh == null || this.m3.bh == null || this.m3.kc == this.m3.kb || this.mi.itemsSource == null || this.mi.j7 < 1) {
                e.bu.b = 0;
                d = false;
            }
            return d;
        }
        getViewInfo(a, b) {
            b = this.bi.bs;
            a = this.bi.br;
            return {
                p0: a,
                p1: b
            };
        }
        od(a) {
            let b = 0;
            let c = a.bs;
            let d = a.br;
            let e = this.getEffectiveViewport1(this.bi);
            if (!c.isEmpty && !d.isEmpty && this.m3 != null) {
                let f = new ScalerParams(0, c, d, this.m3.ca, e);
                f.b = this.eh();
                b = this.m3.dy(this.m3.km, f);
            }
            return b;
        }
        h4() {
            super.h4();
            this.ml.v();
            this.mk.v();
            this.mn.v();
        }
        jm(a) {
            super.jm(a);
            this.my.bu.e(this.eu);
            if (this.cc(this.bi)) {
                return;
            }
            if (this.de) {
                if (this.ca()) {
                    this.pb(this.mn, this.my);
                }
                else {
                    this.pb(this.mk, this.my);
                }
                return;
            }
            if (this.da(a)) {
                let b = this.ml;
                if (this.ca()) {
                    if (this.bt.g) {
                        this.bt.t();
                    }
                    this.ml = this.mn;
                    this.mn = b;
                }
                else {
                    this.ml = this.mk;
                    this.mk = b;
                }
                this.o9(this.mk, this.my);
                if (this.dp) {
                    this.bt.w();
                    this.bt.r = truncate(this.er());
                    this.bt.b = this.bv != null ? this.bv : this.bu;
                    this.mt.p(this.ml, this.mk, this.isVertical, this.mi, this.m3, this.ms, this.mr(), this.bp, this.bo(), () => this.od(this.my), this.my.br);
                }
                this.h0();
                this.jt();
                if (this.dp) {
                    this.dn = false;
                    this.dm = true;
                }
            }
            else {
                this.o9(this.mk, this.my);
                this.pb(this.mk, this.my);
            }
        }
        nr(a) {
            for (let b of fromEnum(a)) {
                switch (b) {
                    case "HighColumn":
                        if (this.nb == null) {
                            return false;
                        }
                        break;
                    case "LowColumn":
                        if (this.nc == null) {
                            return false;
                        }
                        break;
                    case "OpenColumn":
                        if (this.nd == null) {
                            return false;
                        }
                        break;
                    case "CloseColumn":
                        if (this.na == null) {
                            return false;
                        }
                        break;
                    case "VolumeColumn":
                        if (this.nf == null) {
                            return false;
                        }
                        break;
                }
            }
            return true;
        }
        get ns() {
            return this.mi != null && typeCast(ISortingAxis_$type, this.mi) !== null;
        }
        nn() {
            return this.typical != null;
        }
        o6(a) {
            this.typical(this, a);
        }
        get n0() {
            return this.nx();
        }
        *_nx() {
            let a = false;
            if (this.nn()) {
                let b = this.mu(0, this.bz.count);
                this.o6(new FinancialEventArgs(0, this.bz.count, b, this.mv(b), this));
                if (b.typicalColumn != null) {
                    a = true;
                    for (let c of fromEnum(b.typicalColumn)) {
                        yield c;
                    }
                }
            }
            if (!a) {
                if (this.ns && this.mi.i$b != null) {
                    let d = this.bz.count;
                    let e = this.mi.i$b;
                    for (let f = 0; f < d; ++f) {
                        yield (this.nb.item(e.item(f)) + this.nc.item(e.item(f)) + this.na.item(e.item(f))) / 3;
                    }
                }
                else {
                    let g = this.bz.count;
                    for (let h = 0; h < g; ++h) {
                        yield (this.nb.item(h) + this.nc.item(h) + this.na.item(h)) / 3;
                    }
                }
            }
        }
        nx() {
            return toEnum(() => this._nx());
        }
        get nz() {
            return this.nw();
        }
        *_nw() {
            if (this.ns && this.mi.i$b != null) {
                let a = this.nb.count;
                let b = this.mi.i$b;
                if (a > 0) {
                    yield this.oe(this.nb.item(b.item(0)) - this.nc.item(b.item(0)));
                }
                for (let c = 1; c < a; ++c) {
                    yield Math.max(this.oe(this.nb.item(b.item(c)) - this.nc.item(b.item(c))), Math.max(this.oe(Math.abs(this.nb.item(b.item(c)) - this.na.item(b.item(c - 1)))), this.oe(Math.abs(this.nc.item(b.item(c)) - this.na.item(b.item(c - 1))))));
                }
            }
            else {
                let d = this.nb.count;
                if (d > 0) {
                    yield this.oe(this.nb.item(0) - this.nc.item(0));
                }
                for (let e = 1; e < d; ++e) {
                    yield Math.max(this.oe(this.nb.item(e) - this.nc.item(e)), Math.max(this.oe(Math.abs(this.nb.item(e) - this.na.item(e - 1))), this.oe(Math.abs(this.nc.item(e) - this.na.item(e - 1)))));
                }
            }
        }
        nw() {
            return toEnum(() => this._nw());
        }
        get ny() {
            return this.nv();
        }
        *_nv() {
            if (this.ns && this.mi.i$b != null) {
                let a = this.nc.count;
                let b = this.mi.i$b;
                if (a > 0) {
                    yield this.oe(this.nc.item(b.item(0)));
                }
                for (let c = 1; c < a; c++) {
                    yield Math.min(this.oe(this.nc.item(b.item(c))), this.oe(this.na.item(b.item(c - 1))));
                }
            }
            else {
                let d = this.nc.count;
                if (d > 0) {
                    yield this.oe(this.nc.item(0));
                }
                for (let e = 1; e < d; e++) {
                    yield Math.min(this.oe(this.nc.item(e)), this.oe(this.na.item(e - 1)));
                }
            }
        }
        nv() {
            return toEnum(() => this._nv());
        }
        n2(a) {
            if (a == null) {
                return null;
            }
            if (this.ns && this.mi.i$b != null) {
                return new SafeSortedReadOnlyDoubleCollection(0, a, this.mi.i$b);
            }
            return new SafeReadOnlyDoubleCollection(0, a);
        }
        n1() {
            let a = new List$1(String_$type, 0);
            a.add("HighColumn");
            a.add("LowColumn");
            a.add("CloseColumn");
            if (this.typicalBasedOn != null && this.bz != null && !this.ng) {
                this.ng = true;
                let b = this.mu(0, this.bz.count);
                this.ng = false;
                let c = new FinancialEventArgs(0, this.bz.count, b, this.mv(b), this);
                this.typicalBasedOn(this, c);
                if (c.basedOn != null && c.basedOn.count > 0) {
                    return c.basedOn;
                }
            }
            return a;
        }
        getOpenColumnAsArray() {
            if (this.nd == null) {
                return null;
            }
            if (this.mi != null && typeCast(ISortingAxis_$type, this.mi) !== null) {
                if (this.n6 != null) {
                    return this.n6.asArray();
                }
                let a = new List$1(Number_$type, 2, this.nd.count);
                let b = this.mi.i$b;
                let c = this.nd.asArray();
                for (let d = 0; d < b.count; d++) {
                    a.add(c[b._inner[d]]);
                }
                this.n6 = a;
                return this.n6.asArray();
            }
            else {
                return this.nd.asArray();
            }
        }
        getHighColumnAsArray() {
            if (this.nb == null) {
                return null;
            }
            if (this.mi != null && typeCast(ISortingAxis_$type, this.mi) !== null) {
                if (this.n4 != null) {
                    return this.n4.asArray();
                }
                let a = new List$1(Number_$type, 2, this.nb.count);
                let b = this.mi.i$b;
                let c = this.nb.asArray();
                for (let d = 0; d < b.count; d++) {
                    a.add(c[b._inner[d]]);
                }
                this.n4 = a;
                return this.n4.asArray();
            }
            else {
                return this.nb.asArray();
            }
        }
        getLowColumnAsArray() {
            if (this.nc == null) {
                return null;
            }
            if (this.mi != null && typeCast(ISortingAxis_$type, this.mi) !== null) {
                if (this.n5 != null) {
                    return this.n5.asArray();
                }
                let a = new List$1(Number_$type, 2, this.nc.count);
                let b = this.mi.i$b;
                let c = this.nc.asArray();
                for (let d = 0; d < b.count; d++) {
                    a.add(c[b._inner[d]]);
                }
                this.n5 = a;
                return this.n5.asArray();
            }
            else {
                return this.nc.asArray();
            }
        }
        getCloseColumnAsArray() {
            if (this.na == null) {
                return null;
            }
            if (this.mi != null && typeCast(ISortingAxis_$type, this.mi) !== null) {
                if (this.n3 != null) {
                    return this.n3.asArray();
                }
                let a = new List$1(Number_$type, 2, this.na.count);
                let b = this.mi.i$b;
                let c = this.na.asArray();
                for (let d = 0; d < b.count; d++) {
                    a.add(c[b._inner[d]]);
                }
                this.n3 = a;
                return this.n3.asArray();
            }
            else {
                return this.na.asArray();
            }
        }
        getVolumeColumnAsArray() {
            if (this.nf == null) {
                return null;
            }
            if (this.mi != null && typeCast(ISortingAxis_$type, this.mi) !== null) {
                if (this.n7 != null) {
                    return this.n7.asArray();
                }
                let a = new List$1(Number_$type, 2, this.nf.count);
                let b = this.mi.i$b;
                let c = this.nf.asArray();
                for (let d = 0; d < b.count; d++) {
                    a.add(c[b._inner[d]]);
                }
                this.n7 = a;
                return this.n7.asArray();
            }
            else {
                return this.nf.asArray();
            }
        }
        h6(a, b, c, d) {
            super.h6(a, b, c, d);
            if (this.mi == null || !(typeCast(ISortingAxis_$type, this.mi) !== null)) {
                return;
            }
            let e = this.mi.i$b;
            switch (a) {
                case 1:
                    for (let f = b; f < c; f++) {
                        let g = e._inner[f];
                        if (this.n6 != null) {
                            this.n6.insert(f, this.nd.item(g));
                        }
                        if (this.n4 != null) {
                            this.n4.insert(f, this.nb.item(g));
                        }
                        if (this.n5 != null) {
                            this.n5.insert(f, this.nc.item(g));
                        }
                        if (this.n3 != null) {
                            this.n3.insert(f, this.na.item(g));
                        }
                        if (this.n7 != null) {
                            this.n7.insert(f, this.nf.item(g));
                        }
                    }
                    break;
                case 0:
                    if (this.n6 != null) {
                        this.n6.v(b, c);
                    }
                    if (this.n4 != null) {
                        this.n4.v(b, c);
                    }
                    if (this.n5 != null) {
                        this.n5.v(b, c);
                    }
                    if (this.n3 != null) {
                        this.n3.v(b, c);
                    }
                    if (this.n7 != null) {
                        this.n7.v(b, c);
                    }
                    break;
                case 4:
                    if (this.n6 != null) {
                        this.n6 = new List$1(Number_$type, 0);
                    }
                    if (this.n4 != null) {
                        this.n4 = new List$1(Number_$type, 0);
                    }
                    if (this.n5 != null) {
                        this.n5 = new List$1(Number_$type, 0);
                    }
                    if (this.n3 != null) {
                        this.n3 = new List$1(Number_$type, 0);
                    }
                    if (this.n7 != null) {
                        this.n7 = new List$1(Number_$type, 0);
                    }
                    break;
                case 3:
                case 2:
                    for (let h = b; h < c; h++) {
                        let i = e._inner[h];
                        if (this.n6 != null) {
                            this.n6._inner[h] = this.nd.item(i);
                        }
                        if (this.n4 != null) {
                            this.n4._inner[h] = this.nb.item(i);
                        }
                        if (this.n5 != null) {
                            this.n5._inner[h] = this.nc.item(i);
                        }
                        if (this.n3 != null) {
                            this.n3._inner[h] = this.na.item(i);
                        }
                        if (this.n7 != null) {
                            this.n7._inner[h] = this.nf.item(i);
                        }
                    }
                    break;
            }
            this.pc();
            this.jy();
        }
        mu(a, b) {
            let c = this.n2(this.nd);
            let d = this.n2(this.na);
            let e = this.n2(this.nb);
            let f = this.n2(this.nc);
            let g = this.n2(this.nf);
            let h = ((() => {
                let $ret = new FinancialCalculationDataSource();
                $ret.typicalColumn = new CalculatedColumn(1, new SafeEnumerable(this.n0), this.n1());
                $ret.trueRange = new CalculatedColumn(1, new SafeEnumerable(this.nz), ((() => {
                    let $ret = new List$1(String_$type, 0);
                    $ret.add("HighColumn");
                    $ret.add("LowColumn");
                    $ret.add("CloseColumn");
                    return $ret;
                })()));
                $ret.trueLow = new CalculatedColumn(1, new SafeEnumerable(this.ny), ((() => {
                    let $ret = new List$1(String_$type, 0);
                    $ret.add("LowColumn");
                    $ret.add("CloseColumn");
                    return $ret;
                })()));
                $ret.openColumn = c;
                $ret.closeColumn = d;
                $ret.highColumn = e;
                $ret.lowColumn = f;
                $ret.volumeColumn = g;
                $ret.calculateFrom = a;
                $ret.calculateCount = b;
                $ret.minimumValue = NaN;
                $ret.maximumValue = NaN;
                $ret.count = this.bz != null ? this.bz.count : 0;
                return $ret;
            })());
            return h;
        }
        oe(a) {
            if (isInfinity(a) || isNaN_(a)) {
                return 0;
            }
            return a;
        }
        mv(a) {
            return ((() => {
                let $ret = new FinancialCalculationSupportingCalculations();
                $ret.a = new ColumnSupportingCalculation(1, TrendCalculators.b, new List$1(String_$type, 0));
                $ret.c = new ColumnSupportingCalculation(1, TrendCalculators.e, new List$1(String_$type, 0));
                $ret.d = new ColumnSupportingCalculation(1, TrendCalculators.f, new List$1(String_$type, 0));
                $ret.b = new ColumnSupportingCalculation(1, TrendCalculators.d, new List$1(String_$type, 0));
                $ret.h = new DataSourceSupportingCalculation(1, (b) => TrendCalculators.b(b.volumeColumn, b.shortPeriod), ((() => {
                    let $ret = new List$1(String_$type, 0);
                    $ret.add("VolumeColumn");
                    return $ret;
                })()));
                $ret.f = new DataSourceSupportingCalculation(1, (b) => TrendCalculators.b(b.volumeColumn, b.longPeriod), ((() => {
                    let $ret = new List$1(String_$type, 0);
                    $ret.add("VolumeColumn");
                    return $ret;
                })()));
                $ret.g = new DataSourceSupportingCalculation(1, (b) => TrendCalculators.b(b.typicalColumn, b.shortPeriod), a.typicalColumn.basedOn);
                $ret.e = new DataSourceSupportingCalculation(1, (b) => TrendCalculators.b(b.typicalColumn, b.longPeriod), a.typicalColumn.basedOn);
                $ret.k = Series.d1;
                $ret.j = Series.d0;
                $ret.i = runOn(this, this.oe);
                return $ret;
            })());
        }
        get categoryAxis() {
            return this.mi;
        }
        jn(a, b) {
            super.jn(a, b);
            if (!this.dl) {
                this.bi.az(b);
                return;
            }
            let c = typeCast(FinancialSeriesView.$, this.bh);
            this.bi.az(b);
            c.bu.e(this.eu);
            if (this.cc(this.bh)) {
                return;
            }
            if (!this.df) {
                this.o9(this.mm, c);
            }
            this.df = false;
            this.pb(this.mm, c);
            this.dl = false;
        }
        jk(a, b, c, d, e) {
            super.jk(a, b, c, d, e);
            let f = this.a0.a$h.item(d);
            let g = f;
            g.bu.e(this.eu);
            f.ay(c);
            if (this.cc(g)) {
                return;
            }
            if (this.mj == null) {
                this.mj = new CategoryFrame(3);
            }
            this.mj.u();
            this.o9(this.mj, g);
            this.pb(this.mj, g);
        }
        am(a) {
            if (this.mi == a) {
                return this.m3;
            }
            if (this.m3 == a) {
                return this.mi;
            }
            return null;
        }
        preferredCategoryMode(a) {
            let b = typeCast(IDateTimeAxis_$type, this.mi);
            return b != null ? b.preferredCategoryMode(this) : this.mp;
        }
        get mp() {
            return this.mo;
        }
        set mp(a) {
            let b = this.mp;
            if (a != b) {
                this.mo = a;
                this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.mp));
            }
        }
        get_cz() {
            return true;
        }
        jq(a, b) {
            super.jq(a, b);
            this.po = a;
        }
        pc() {
            this.d8 = this.na == null || this.na.count == 0 ? NaN : this.na.item(this.na.count - 1);
        }
        fr(a) {
            if (this.m2 != null && a != null) {
                if (this.m4 == null || this.m4.propertyName != this.m2.dateTimeMemberPath) {
                    this.m4 = new FastReflectionHelper(false, this.m2.dateTimeMemberPath);
                }
                let b = this.m4.getPropertyValue(a);
                if (typeCast(Date_$type, b) !== null) {
                    return dateToStringFormat(b, this.m2.itemLabelFormat());
                }
            }
            return super.fr(a);
        }
    }
    FinancialSeries.$t = /*@__PURE__*/ markType(FinancialSeries, 'FinancialSeries', Series.$, [IHasCategoryAxis_$type, IHasCategoryModePreference_$type]);
    FinancialSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, FinancialSeries, 'raisePropertyChanged', ['CloseMemberPath:om:pd', [2, null], 'HighMemberPath:op:pe', [2, null], 'IsCustomCategoryStyleAllowed:no:pf', [0, false], 'IsTransitionInEnabled:np:pg', [0, false], 'LowMemberPath:ou:ph', [2, null], 'NegativeBrush:po:pi', [Brush.$, null], 'OpenMemberPath:oy:pj', [2, null], 'TransitionInMode:ms:pk', [CategoryTransitionInMode_$type, /*@__PURE__*/ enumGetBox(CategoryTransitionInMode_$type, 0)], 'VolumeMemberPath:o2:pl', [2, null], 'XAxis:mi:pm', [CategoryAxisBase.$, null], 'YAxis:m3:pn', [NumericYAxis.$, null]]);
    return FinancialSeries;
})();
/**
 * @hidden
 */
export let FinancialCalculationSupportingCalculations = /*@__PURE__*/ (() => {
    class FinancialCalculationSupportingCalculations extends Base {
        constructor() {
            super(...arguments);
            this.a = null;
            this.c = null;
            this.d = null;
            this.b = null;
            this.h = null;
            this.f = null;
            this.g = null;
            this.e = null;
            this.k = null;
            this.j = null;
            this.i = null;
        }
    }
    FinancialCalculationSupportingCalculations.$t = /*@__PURE__*/ markType(FinancialCalculationSupportingCalculations, 'FinancialCalculationSupportingCalculations');
    return FinancialCalculationSupportingCalculations;
})();
/**
 * @hidden
 */
export let DataSourceSupportingCalculation = /*@__PURE__*/ (() => {
    class DataSourceSupportingCalculation extends SupportingCalculation$1 {
        constructor(a, ..._rest) {
            a = (a == void 0) ? 0 : a;
            switch (a) {
                case 0:
                    {
                        let c = _rest[0];
                        super(Delegate_$type, 0, c);
                    }
                    break;
                case 1:
                    {
                        let c = _rest[0];
                        let d = _rest[1];
                        super(Delegate_$type, 1, c, d);
                    }
                    break;
            }
        }
    }
    DataSourceSupportingCalculation.$t = /*@__PURE__*/ markType(DataSourceSupportingCalculation, 'DataSourceSupportingCalculation', /*@__PURE__*/ SupportingCalculation$1.$.specialize(Delegate_$type));
    return DataSourceSupportingCalculation;
})();
/**
 * @hidden
 */
export let FinancialCalculationDataSource = /*@__PURE__*/ (() => {
    class FinancialCalculationDataSource extends Base {
        constructor() {
            super(...arguments);
            this._openColumn = null;
            this._closeColumn = null;
            this._highColumn = null;
            this._lowColumn = null;
            this._volumeColumn = null;
            this._indicatorColumn = null;
            this._typicalColumn = null;
            this._trueRange = null;
            this._trueLow = null;
            this._period = 0;
            this._shortPeriod = 0;
            this._longPeriod = 0;
            this._count = 0;
            this._calculateFrom = 0;
            this._calculateCount = 0;
            this._multiplier = 0;
            this._minimumValue = 0;
            this._maximumValue = 0;
            this._specifiesRange = false;
            this._series = null;
        }
        get openColumn() {
            return this._openColumn;
        }
        set openColumn(a) {
            this._openColumn = a;
        }
        get closeColumn() {
            return this._closeColumn;
        }
        set closeColumn(a) {
            this._closeColumn = a;
        }
        get highColumn() {
            return this._highColumn;
        }
        set highColumn(a) {
            this._highColumn = a;
        }
        get lowColumn() {
            return this._lowColumn;
        }
        set lowColumn(a) {
            this._lowColumn = a;
        }
        get volumeColumn() {
            return this._volumeColumn;
        }
        set volumeColumn(a) {
            this._volumeColumn = a;
        }
        get indicatorColumn() {
            return this._indicatorColumn;
        }
        set indicatorColumn(a) {
            this._indicatorColumn = a;
        }
        get typicalColumn() {
            return this._typicalColumn;
        }
        set typicalColumn(a) {
            this._typicalColumn = a;
        }
        get trueRange() {
            return this._trueRange;
        }
        set trueRange(a) {
            this._trueRange = a;
        }
        get trueLow() {
            return this._trueLow;
        }
        set trueLow(a) {
            this._trueLow = a;
        }
        get period() {
            return this._period;
        }
        set period(a) {
            this._period = a;
        }
        get shortPeriod() {
            return this._shortPeriod;
        }
        set shortPeriod(a) {
            this._shortPeriod = a;
        }
        get longPeriod() {
            return this._longPeriod;
        }
        set longPeriod(a) {
            this._longPeriod = a;
        }
        get count() {
            return this._count;
        }
        set count(a) {
            this._count = a;
        }
        get calculateFrom() {
            return this._calculateFrom;
        }
        set calculateFrom(a) {
            this._calculateFrom = a;
        }
        get calculateCount() {
            return this._calculateCount;
        }
        set calculateCount(a) {
            this._calculateCount = a;
        }
        get multiplier() {
            return this._multiplier;
        }
        set multiplier(a) {
            this._multiplier = a;
        }
        get minimumValue() {
            return this._minimumValue;
        }
        set minimumValue(a) {
            this._minimumValue = a;
        }
        get maximumValue() {
            return this._maximumValue;
        }
        set maximumValue(a) {
            this._maximumValue = a;
        }
        get specifiesRange() {
            return this._specifiesRange;
        }
        set specifiesRange(a) {
            this._specifiesRange = a;
        }
        get series() {
            return this._series;
        }
        set series(a) {
            this._series = a;
        }
    }
    FinancialCalculationDataSource.$t = /*@__PURE__*/ markType(FinancialCalculationDataSource, 'FinancialCalculationDataSource');
    return FinancialCalculationDataSource;
})();
/**
 * @hidden
 */
export let FinancialSeriesView = /*@__PURE__*/ (() => {
    class FinancialSeriesView extends SeriesView {
        constructor(a) {
            super(a);
            this.bw = null;
            this.bu = null;
            this.by = 0;
            this.by = -1;
            this.bw = a;
            this.bu = this.bv();
        }
        bx(a) {
            if (this.by != a.t) {
                return true;
            }
            return false;
        }
        bz(a) {
            this.by = a.t;
        }
        ap() {
            super.ap();
            if (!this.n) {
                this.e.bj = 6;
            }
        }
        getDefaultTooltipTemplate() {
            let a = "<div class='ui-chart-default-tooltip-content'>";
            if (this.bw.mi.b7) {
                a += "<span>${itemLabel}</span><br/>";
            }
            else if (this.bw.mi.e9 != null) {
                a += "<span>${item." + this.bw.mi.e9 + "}</span><br/>";
            }
            a += "<span class='ui-priority-primary'";
            let b = this.e.a0.a$q(this.e);
            if (!stringIsNullOrEmpty(b)) {
                a += " style='color:" + b + "'";
            }
            let c = new SRProvider(this.t);
            let d = c.b1("financialSeries_Open");
            let e = c.b1("financialSeries_High");
            let f = c.b1("financialSeries_Low");
            let g = c.b1("financialSeries_Close");
            d = stringIsNullOrEmpty(d) ? "Open" : d;
            e = stringIsNullOrEmpty(e) ? "High" : e;
            f = stringIsNullOrEmpty(f) ? "Low" : f;
            g = stringIsNullOrEmpty(g) ? "Close" : g;
            a += ">" + this.bw.fx + "</span><table><tr><td>" + d + ":</td><td>" + "${item." + this.bw.oy + "}</td></tr><tr><td>" + e + ":</td><td>" + "${item." + this.bw.op + "}</td></tr><tr><td>" + f + ":</td><td>" + "${item." + this.bw.ou + "}</td></tr><tr><td>" + g + ":</td><td>" + "${item." + this.bw.om + "}</td></tr>";
            if (!stringIsNullOrEmpty(this.bw.o2)) {
                let h = c.b1("financialSeries_Volume");
                h = stringIsNullOrEmpty(h) ? "Volume" : h;
                a += "<tr><td>" + h + ":</td><td>" + "${item." + this.bw.o2 + "}</td></tr>";
            }
            a += "</table></div>";
            return a;
        }
        ac() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.e.lk = a;
            this.e.ev = 5;
            this.e.ew = 2;
            this.e.ex = 2;
        }
    }
    FinancialSeriesView.$t = /*@__PURE__*/ markType(FinancialSeriesView, 'FinancialSeriesView', SeriesView.$);
    return FinancialSeriesView;
})();
//# sourceMappingURL=FinancialEventArgs_combined.js.map
