/*
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 { __extends, __generator, __values } from "tslib";
import { EventArgs, Base, markType, typeCast, runOn, delegateCombine, enumGetBox, Point_$type, String_$type, Number_$type, 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 "igniteui-react-core";
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 { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
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
 */
var FinancialEventArgs = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FinancialEventArgs, _super);
    function FinancialEventArgs(a, b, c, d, e) {
        var _this = _super.call(this) || this;
        _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;
        }
        return _this;
    }
    Object.defineProperty(FinancialEventArgs.prototype, "position", {
        get: function () {
            return this._position;
        },
        set: function (a) {
            this._position = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialEventArgs.prototype, "count", {
        get: function () {
            return this._count;
        },
        set: function (a) {
            this._count = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialEventArgs.prototype, "dataSource", {
        get: function () {
            return this._dataSource;
        },
        set: function (a) {
            this._dataSource = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialEventArgs.prototype, "supportingCalculations", {
        get: function () {
            return this._supportingCalculations;
        },
        set: function (a) {
            this._supportingCalculations = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialEventArgs.prototype, "basedOn", {
        get: function () {
            return this._basedOn;
        },
        set: function (a) {
            this._basedOn = a;
        },
        enumerable: false,
        configurable: true
    });
    FinancialEventArgs.$t = markType(FinancialEventArgs, 'FinancialEventArgs', EventArgs.$);
    return FinancialEventArgs;
}(EventArgs));
export { FinancialEventArgs };
/**
 * @hidden
 */
var FinancialBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FinancialBucketCalculator, _super);
    function FinancialBucketCalculator(a) {
        var _this = _super.call(this) || this;
        _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;
        return _this;
    }
    FinancialBucketCalculator.prototype.getBucket = function (a) {
        return null;
    };
    FinancialBucketCalculator.prototype.getBucketWithoutUnknowns = function (a) {
        return this.getBucket(a);
    };
    FinancialBucketCalculator.prototype.getErrorBucket = function (a, b) {
        return NaN;
    };
    FinancialBucketCalculator.prototype.getBucketInfo = function (a, b, c, d) {
        a = this.c;
        b = this.d;
        c = this.b;
        d = this.a.b2.ib;
        return {
            p0: a,
            p1: b,
            p2: c,
            p3: d
        };
    };
    FinancialBucketCalculator.prototype.e = function (a) {
        var b = this.a.by;
        var c = this.a.bx;
        var d = this.a.bx;
        if (this.a.b2 != null) {
            d = this.a.b2.getEffectiveViewport1(this.a);
        }
        if (b.isEmpty || c.isEmpty || this.a.b2.wy == null) {
            this.b = 0;
            return;
        }
        var e = (this.a.b2.wy != null) ? this.a.b2.wy.ch : false;
        var f = new ScalerParams(0, b, c, e, d);
        var g = this.a.b2.wd(this.a);
        var h = typeCast(ISortingAxis_$type, this.a.b2.wy);
        if (h == null || h.i$b == null) {
            var i = Math.floor(this.a.b2.wy.en(g.left, f));
            var j = Math.ceil(this.a.b2.wy.en(g.right, f));
            if (this.a.b2.wy.ch) {
                j = Math.ceil(this.a.b2.wy.en(g.left, f));
                i = Math.floor(this.a.b2.wy.en(g.right, f));
            }
            var 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;
        }
    };
    FinancialBucketCalculator.prototype.cacheValues = function () {
    };
    FinancialBucketCalculator.prototype.unCacheValues = function () {
    };
    FinancialBucketCalculator.$t = markType(FinancialBucketCalculator, 'FinancialBucketCalculator', Base.$, [IBucketizer_$type]);
    return FinancialBucketCalculator;
}(Base));
export { FinancialBucketCalculator };
/**
 * @hidden
 */
var FinancialSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FinancialSeries, _super);
    function FinancialSeries() {
        var _this = _super.call(this) || this;
        _this.xp = null;
        _this.xn = null;
        _this.xo = null;
        _this.xm = null;
        _this.xq = null;
        _this.xz = false;
        _this.assigningCategoryStyle = null;
        _this.w7 = null;
        _this.x9 = new Dictionary$2(IFastItemColumn$1_$type.specialize(Number_$type), String_$type, 0);
        _this.ya = new Dictionary$2(String_$type, String_$type, 0);
        _this.xy = false;
        _this.xl = null;
        _this.w2 = null;
        _this.w4 = null;
        _this.w0 = null;
        _this.xa = null;
        _this.typical = null;
        _this.typicalBasedOn = null;
        _this.xx = false;
        _this.ym = null;
        _this.yk = null;
        _this.yl = null;
        _this.yj = null;
        _this.yn = null;
        _this.w3 = null;
        _this.wz = null;
        _this.w5 = 0;
        _this.xg = null;
        _this.xi = null;
        _this.w7 = new CategorySeriesRenderManager();
        _this.xz = false;
        _this.xa = new CategoryTransitionSourceFramePreparer();
        _this.w3 = new CategoryFrame(3);
        _this.ab = FinancialSeries.$;
        _this.w6 = 0;
        return _this;
    }
    FinancialSeries.prototype.hr = function () {
        var a = _super.prototype.hr.call(this);
        {
            var b = ((function () {
                var $ret = new SeriesLayerPropertyOverlay();
                $ret.ad = "OpenMemberPath";
                $ret.p = true;
                $ret.y = "HighlightedOpenMemberPath";
                $ret.q = true;
                return $ret;
            })());
            b.valueResolving = delegateCombine(b.valueResolving, runOn(this, this.z1));
            a.add(b);
        }
        {
            var c = ((function () {
                var $ret = new SeriesLayerPropertyOverlay();
                $ret.ad = "HighMemberPath";
                $ret.p = true;
                $ret.y = "HighlightedHighMemberPath";
                $ret.q = true;
                return $ret;
            })());
            c.valueResolving = delegateCombine(c.valueResolving, runOn(this, this.zz));
            a.add(c);
        }
        {
            var d = ((function () {
                var $ret = new SeriesLayerPropertyOverlay();
                $ret.ad = "LowMemberPath";
                $ret.p = true;
                $ret.y = "HighlightedLowMemberPath";
                $ret.q = true;
                return $ret;
            })());
            d.valueResolving = delegateCombine(d.valueResolving, runOn(this, this.z0));
            a.add(d);
        }
        {
            var e = ((function () {
                var $ret = new SeriesLayerPropertyOverlay();
                $ret.ad = "CloseMemberPath";
                $ret.p = true;
                $ret.y = "HighlightedCloseMemberPath";
                $ret.q = true;
                return $ret;
            })());
            e.valueResolving = delegateCombine(e.valueResolving, runOn(this, this.zy));
            a.add(e);
        }
        {
            var f = ((function () {
                var $ret = new SeriesLayerPropertyOverlay();
                $ret.ad = "VolumeMemberPath";
                $ret.p = true;
                $ret.y = "HighlightedVolumeMemberPath";
                $ret.q = true;
                return $ret;
            })());
            f.valueResolving = delegateCombine(f.valueResolving, runOn(this, this.z2));
            a.add(f);
        }
        {
            var g = ((function () {
                var $ret = new SeriesLayerPropertyOverlay();
                $ret.r = true;
                $ret.ad = "Brush";
                $ret.p = true;
                $ret.y = "ActualBrush";
                $ret.q = true;
                return $ret;
            })());
            g.valueResolving = delegateCombine(g.valueResolving, runOn(this, this.rv));
            a.add(g);
        }
        {
            var h = ((function () {
                var $ret = new SeriesLayerPropertyOverlay();
                $ret.r = true;
                $ret.ad = "Outline";
                $ret.p = true;
                $ret.y = "ActualOutline";
                $ret.q = true;
                return $ret;
            })());
            h.valueResolving = delegateCombine(h.valueResolving, runOn(this, this.rv));
            a.add(h);
        }
        {
            var i = ((function () {
                var $ret = new SeriesLayerPropertyOverlay();
                $ret.r = true;
                $ret.ad = "NegativeBrush";
                $ret.p = true;
                $ret.q = true;
                return $ret;
            })());
            i.valueResolving = delegateCombine(i.valueResolving, runOn(this, this.rv));
            a.add(i);
        }
        {
            var j = ((function () {
                var $ret = new SeriesLayerPropertyOverlay();
                $ret.r = true;
                $ret.ad = "NegativeOutline";
                $ret.p = true;
                $ret.q = true;
                return $ret;
            })());
            j.valueResolving = delegateCombine(j.valueResolving, runOn(this, this.rv));
            a.add(j);
        }
        var k = ((function () {
            var $ret = new SeriesLayerPropertyOverlay();
            $ret.p = true;
            $ret.ad = "IsTransitionInEnabled";
            $ret.x = true;
            $ret.q = true;
            return $ret;
        })());
        a.add(k);
        var l = ((function () {
            var $ret = new SeriesLayerPropertyOverlay();
            $ret.p = true;
            $ret.ad = "TransitionInMode";
            $ret.x = enumGetBox(CategoryTransitionInMode_$type, 20);
            $ret.q = true;
            return $ret;
        })());
        a.add(l);
        return a;
    };
    FinancialSeries.prototype.z1 = function (a, b) {
        if (this.zb != null) {
            b.value = this.zb;
            return;
        }
        b.value = this.zo;
    };
    FinancialSeries.prototype.zz = function (a, b) {
        if (this.y7 != null) {
            b.value = this.y7;
            return;
        }
        b.value = this.zf;
    };
    FinancialSeries.prototype.z0 = function (a, b) {
        if (this.y9 != null) {
            b.value = this.y9;
            return;
        }
        b.value = this.zk;
    };
    FinancialSeries.prototype.zy = function (a, b) {
        if (this.y5 != null) {
            b.value = this.y5;
            return;
        }
        b.value = this.y2;
    };
    FinancialSeries.prototype.z2 = function (a, b) {
        if (this.zd != null) {
            b.value = this.zd;
            return;
        }
        b.value = this.zs;
    };
    FinancialSeries.prototype.kt = function () {
        if (this.d1()) {
            return this.bl.w4;
        }
        else {
            return this.bl.w0;
        }
    };
    FinancialSeries.prototype.qx = function (a) {
        _super.prototype.qx.call(this, a);
        this.xf = a;
    };
    FinancialSeries.prototype.get_e4 = function () {
        return true;
    };
    FinancialSeries.prototype.ai = function () {
        return [this.wy, this.xh];
    };
    FinancialSeries.prototype.ko = function (a, b) {
        var c = this.nb(b);
        if (c == FinancialSeries.$$p[11]) {
            return this.kp(a, b, this.zo);
        }
        if (c == FinancialSeries.$$p[1]) {
            return this.kp(a, b, this.zf);
        }
        if (c == FinancialSeries.$$p[9]) {
            return this.kp(a, b, this.zk);
        }
        if (c == FinancialSeries.$$p[0]) {
            return this.kp(a, b, this.y2);
        }
        if (c == FinancialSeries.$$p[13]) {
            return this.kp(a, b, this.zs);
        }
        if (c == FinancialSeries.$$p[5]) {
            return this.kp(a, b, this.zb);
        }
        if (c == FinancialSeries.$$p[3]) {
            return this.kp(a, b, this.y7);
        }
        if (c == FinancialSeries.$$p[4]) {
            return this.kp(a, b, this.y9);
        }
        if (c == FinancialSeries.$$p[2]) {
            return this.kp(a, b, this.y5);
        }
        if (c == FinancialSeries.$$p[6]) {
            return this.kp(a, b, this.zd);
        }
        return _super.prototype.ko.call(this, a, b);
    };
    FinancialSeries.prototype.mb = function (a) {
        var b = this.nb(a);
        if (b == FinancialSeries.$$p[11]) {
            return this.zo;
        }
        if (b == FinancialSeries.$$p[1]) {
            return this.zf;
        }
        if (b == FinancialSeries.$$p[9]) {
            return this.zk;
        }
        if (b == FinancialSeries.$$p[0]) {
            return this.y2;
        }
        if (b == FinancialSeries.$$p[13]) {
            return this.zs;
        }
        if (b == FinancialSeries.$$p[5]) {
            return this.zb;
        }
        if (b == FinancialSeries.$$p[3]) {
            return this.y7;
        }
        if (b == FinancialSeries.$$p[4]) {
            return this.y9;
        }
        if (b == FinancialSeries.$$p[2]) {
            return this.y5;
        }
        if (b == FinancialSeries.$$p[6]) {
            return this.zd;
        }
        return _super.prototype.mb.call(this, a);
    };
    FinancialSeries.prototype.yy = function () {
        return 2;
    };
    FinancialSeries.prototype.yw = function () {
        return 4;
    };
    FinancialSeries.prototype.aj = function (a) {
        var b = this.am(this.wy, this.w0.f, this.yv(this.ct), this.yx(this.ct), this.wb(a), true);
        if (b == null) {
            return null;
        }
        var c = b[0];
        var d = b[1];
        var e = new Array(1);
        var f = new Array(2);
        var g = this.yy();
        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;
    };
    FinancialSeries.prototype.ak = function (a) {
        var b = this.am(this.wy, this.w0.f, this.yv(this.ct), this.yx(this.ct), this.wb(a), true);
        if (b == null) {
            return null;
        }
        var c = b[0];
        var d = b[1];
        var e = new Array(1);
        var 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;
    };
    FinancialSeries.prototype.vq = function () {
        return this.aao;
    };
    FinancialSeries.prototype.vr = function () {
        return this.aao;
    };
    FinancialSeries.prototype.o0 = function () {
        _super.prototype.o0.call(this);
        this.wy = null;
        this.xh = null;
    };
    FinancialSeries.prototype.get_ei = function () {
        return true;
    };
    FinancialSeries.prototype.get_f3 = function () {
        return this.xh != null && this.xh.ch;
    };
    Object.defineProperty(FinancialSeries.prototype, "xu", {
        get: function () {
            return this.xp;
        },
        set: function (a) {
            if (this.xp != a) {
                var b = this.xp;
                this.xp = a;
                this.raisePropertyChanged("OpenColumn", b, this.xp);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialSeries.prototype, "xs", {
        get: function () {
            return this.xn;
        },
        set: function (a) {
            if (this.xn != a) {
                var b = this.xn;
                this.xn = a;
                this.raisePropertyChanged("HighColumn", b, this.xn);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialSeries.prototype, "xt", {
        get: function () {
            return this.xo;
        },
        set: function (a) {
            if (this.xo != a) {
                var b = this.xo;
                this.xo = a;
                this.raisePropertyChanged("LowColumn", b, this.xo);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialSeries.prototype, "xr", {
        get: function () {
            return this.xm;
        },
        set: function (a) {
            if (this.xm != a) {
                var b = this.xm;
                this.xm = a;
                this.raisePropertyChanged("CloseColumn", b, this.xm);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialSeries.prototype, "xw", {
        get: function () {
            return this.xq;
        },
        set: function (a) {
            if (this.xq != a) {
                var b = this.xq;
                this.xq = a;
                this.raisePropertyChanged("VolumeColumn", b, this.xq);
            }
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype.f9 = function () {
        return this.highlightedItemsSource != null || (this.zb != null && this.y7 != null && this.y9 != null && this.y5 != null);
    };
    FinancialSeries.prototype.x6 = function () {
        return (this.assigningCategoryStyle != null && this.xz) || this.bv != 1 || this.cn != 1 || this.cm != 1;
    };
    FinancialSeries.prototype.z5 = function (a) {
        if (this.assigningCategoryStyle != null && this.xz) {
            this.assigningCategoryStyle(this, a);
        }
    };
    FinancialSeries.prototype.z3 = function (a, b, c, d, e, f, g) {
        var h = this.bv != 1;
        var i = this.cn != 1;
        var j = this.cm != 1;
        this.w7.a3(this.w7.b, d.cn, a, b, c, d, e, f, false, g);
        this.w7.ab(this.h9);
        var k = this.w7.ay;
        var l = null;
        var m = null;
        var n = null;
        var o = this.dl;
        if (h && this.c9 != null) {
            l = this.c9.dj.getHighlightingInfo(this, o, k.z, k.y, false);
            k.c = l;
        }
        if (i && this.c9 != null) {
            m = this.c9.dk.getHighlightingInfo(this, o, k.z, k.y, false);
            if (m == null && this.bl != null) {
                m = this.c9.dk.getHighlightingInfo(this.bl, this.bl.dl, k.z, k.y, false);
            }
            k.d = m;
        }
        if (j && this.c9 != null) {
            n = this.c9.di.getHighlightingInfo(this, o, k.z, k.y, false);
            k.b = n;
        }
        k.h = f;
        this.z5(k);
        this.w7.z(this, l, m, n, f, h, i, j, b < 0);
    };
    FinancialSeries.prototype.yo = function (a) {
        return this.ir(a, this.wy);
    };
    FinancialSeries.prototype.j8 = function (a, b) {
        return this.j9(a, b, this.wy, runOn(this, this.yo), new FinancialValueList(this.xu, this.xs, this.xt, this.xr, this.xw));
    };
    FinancialSeries.prototype.j6 = function (a, b) {
        return this.j7(a, b, this.wy, runOn(this, this.yo), new FinancialValueList(this.xu, this.xs, this.xt, this.xr, this.xw));
    };
    FinancialSeries.prototype.im = function (a, b, c, d, e) {
        if (c == null) {
            return Number.POSITIVE_INFINITY;
        }
        var f = this.wy.lg;
        return this.io(a, b, this.wy, d, e, f, runOn(this, this.yo));
    };
    FinancialSeries.prototype.getOffsetValue = function () {
        return this.yp(this.ct.by, this.ct.bx, this.getEffectiveViewport1(this.ct));
    };
    FinancialSeries.prototype.getCategoryWidth = function () {
        return this.wy.getCategorySize(this.ct.by, this.ct.bx, this.getEffectiveViewport1(this.ct));
    };
    FinancialSeries.prototype.v6 = function (a, b, c) {
        return this.v8(a, b, c, this.yp(this.ct.by, this.ct.bx, this.getEffectiveViewport1(this.ct)), this.xh, this.wy, null, null, null);
    };
    FinancialSeries.prototype.i3 = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.ct);
        var e = this.yp(this.ct.by, this.ct.bx, d);
        var f = new ScalerParams(0, this.ct.by, this.ct.bx, this.wy.ch, d);
        return this.i5(new FinancialValueList(this.xu, this.xs, this.xt, this.xr, this.xw), a, this.wy, f, e, runOn(this, this.yo), b, c);
    };
    FinancialSeries.prototype.iz = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.ct);
        var e = this.yp(this.ct.by, this.ct.bx, d);
        var f = new ScalerParams(0, this.ct.by, this.ct.bx, this.wy.ch, d);
        return this.i5(this.xs, a, this.wy, f, e, runOn(this, this.yo), b, c);
    };
    FinancialSeries.prototype.i1 = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.ct);
        var e = this.yp(this.ct.by, this.ct.bx, d);
        var f = new ScalerParams(0, this.ct.by, this.ct.bx, this.wy.ch, d);
        return this.i5(this.xt, a, this.wy, f, e, runOn(this, this.yo), b, c);
    };
    FinancialSeries.prototype.yq = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.ct);
        var e = this.yp(this.ct.by, this.ct.bx, d);
        var f = new ScalerParams(0, this.ct.by, this.ct.bx, this.wy.ch, d);
        return this.i5(this.xr, a, this.wy, f, e, runOn(this, this.yo), b, c);
    };
    FinancialSeries.prototype.yr = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.ct);
        var e = this.yp(this.ct.by, this.ct.bx, d);
        var f = new ScalerParams(0, this.ct.by, this.ct.bx, this.wy.ch, d);
        return this.i5(this.xu, a, this.wy, f, e, runOn(this, this.yo), b, c);
    };
    FinancialSeries.prototype.ys = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.ct);
        var e = this.yp(this.ct.by, this.ct.bx, d);
        var f = new ScalerParams(0, this.ct.by, this.ct.bx, this.wy.ch, d);
        return this.i5(this.xw, a, this.wy, f, e, runOn(this, this.yo), b, c);
    };
    FinancialSeries.prototype.v2 = function (a, b, c) {
        var _this = this;
        return this.v8(a, b, c, this.yp(this.ct.by, this.ct.bx, this.getEffectiveViewport1(this.ct)), this.xh, this.wy, runOn(this, this.iz), function (d, e) { return _this.j9(d, e, _this.wy, runOn(_this, _this.yo), _this.xs); }, function (d, e) { return _this.j7(d, e, _this.wy, runOn(_this, _this.yo), _this.xs); });
    };
    FinancialSeries.prototype.v4 = function (a, b, c) {
        var _this = this;
        return this.v8(a, b, c, this.yp(this.ct.by, this.ct.bx, this.getEffectiveViewport1(this.ct)), this.xh, this.wy, runOn(this, this.i1), function (d, e) { return _this.j9(d, e, _this.wy, runOn(_this, _this.yo), _this.xt); }, function (d, e) { return _this.j7(d, e, _this.wy, runOn(_this, _this.yo), _this.xt); });
    };
    FinancialSeries.prototype.aaq = function (a, b, c) {
        var _this = this;
        return this.v8(a, b, c, this.yp(this.ct.by, this.ct.bx, this.getEffectiveViewport1(this.ct)), this.xh, this.wy, runOn(this, this.yr), function (d, e) { return _this.j9(d, e, _this.wy, runOn(_this, _this.yo), _this.xu); }, function (d, e) { return _this.j7(d, e, _this.wy, runOn(_this, _this.yo), _this.xu); });
    };
    FinancialSeries.prototype.aap = function (a, b, c) {
        var _this = this;
        return this.v8(a, b, c, this.yp(this.ct.by, this.ct.bx, this.getEffectiveViewport1(this.ct)), this.xh, this.wy, runOn(this, this.yq), function (d, e) { return _this.j9(d, e, _this.wy, runOn(_this, _this.yo), _this.xr); }, function (d, e) { return _this.j7(d, e, _this.wy, runOn(_this, _this.yo), _this.xr); });
    };
    FinancialSeries.prototype.aar = function (a, b, c) {
        var _this = this;
        return this.v8(a, b, c, this.yp(this.ct.by, this.ct.bx, this.getEffectiveViewport1(this.ct)), this.xh, this.wy, runOn(this, this.ys), function (d, e) { return _this.j9(d, e, _this.wy, runOn(_this, _this.yo), _this.xw); }, function (d, e) { return _this.j7(d, e, _this.wy, runOn(_this, _this.yo), _this.xw); });
    };
    FinancialSeries.prototype.p6 = function () {
        _super.prototype.p6.call(this);
        if (this.wy != null) {
            this.wy.h9(false);
        }
        if (this.xh != null) {
            this.xh.h9(false);
        }
    };
    FinancialSeries.prototype.sl = function (a, b) {
        this.xf.b0.e(this.ib);
        this.rn(false);
    };
    FinancialSeries.prototype.sk = function (a, b) {
        if (this.gz && this.jo < 0.05) {
            this.g0 = true;
            this.g3 = false;
            this.gi = false;
        }
        this.xf.b0.e(this.ib);
        this.rn(false);
    };
    FinancialSeries.prototype.xv = function (a, b, c) {
        var d = this.di(b);
        this.x9.addItem(d, b);
        this.ya.addItem(b, c);
        return d;
    };
    FinancialSeries.prototype.zx = function (a, b) {
        if (b == null) {
            return;
        }
        a.deregisterColumn(b);
        var c = this.x9.item(b);
        this.ya.removeItem(c);
        this.x9.removeItem(b);
    };
    FinancialSeries.prototype.q5 = function (a, b, c, d) {
        _super.prototype.q5.call(this, a, b, c, d);
        switch (b) {
            case "SyncLink":
                if (this.c1 != null && this.c9 != null) {
                    this.xf.b0.e(this.ib);
                    this.rn(false);
                }
                break;
            case "SeriesViewer":
                if (c != null && d == null) {
                    if (this.wy != null) {
                        this.wy.b0(this);
                    }
                    if (this.xh != null) {
                        this.xh.b0(this);
                    }
                }
                if (c == null && d != null) {
                    if (this.wy != null) {
                        this.wy.ct(this);
                    }
                    if (this.xh != null) {
                        this.xh.ct(this);
                    }
                }
                this.xf.b0.e(this.ib);
                this.rn(false);
                break;
            case "FastItemsSource":
                this.xy = true;
                if (typeCast(IFastItemsSource_$type, c) != null) {
                    this.zx(typeCast(IFastItemsSource_$type, c), this.xu);
                    this.zx(typeCast(IFastItemsSource_$type, c), this.xs);
                    this.zx(typeCast(IFastItemsSource_$type, c), this.xt);
                    this.zx(typeCast(IFastItemsSource_$type, c), this.xr);
                    this.zx(typeCast(IFastItemsSource_$type, c), this.xw);
                    this.xu = null;
                    this.xs = null;
                    this.xt = null;
                    this.xr = null;
                    this.xw = null;
                }
                if (typeCast(IFastItemsSource_$type, d) != null) {
                    if (stringIsNullOrEmpty(this.zo) == false) {
                        this.xu = this.xv(typeCast(IFastItemsSource_$type, d), this.zo, "OpenColumn");
                    }
                    if (stringIsNullOrEmpty(this.zf) == false) {
                        this.xs = this.xv(typeCast(IFastItemsSource_$type, d), this.zf, "HighColumn");
                    }
                    if (stringIsNullOrEmpty(this.zk) == false) {
                        this.xt = this.xv(typeCast(IFastItemsSource_$type, d), this.zk, "LowColumn");
                    }
                    if (stringIsNullOrEmpty(this.y2) == false) {
                        this.xr = this.xv(typeCast(IFastItemsSource_$type, d), this.y2, "CloseColumn");
                    }
                    if (stringIsNullOrEmpty(this.zs) == false) {
                        this.xw = this.xv(typeCast(IFastItemsSource_$type, d), this.zs, "VolumeColumn");
                    }
                }
                this.xy = false;
                if (this.xh != null && !this.xh.c1()) {
                    this.xf.b0.e(this.ib);
                    this.rn(this.ge && c != null);
                }
                break;
            case FinancialSeries.$$p[11]:
                if (this.dl != null) {
                    this.zx(this.dl, this.xu);
                    this.xu = this.xv(this.dl, this.zo, "OpenColumn");
                }
                break;
            case "OpenColumn":
                if (this.xh != null && !this.xh.c1() && !this.xy) {
                    this.xf.b0.e(this.ib);
                    this.rn(this.ge && this.d5);
                }
                break;
            case FinancialSeries.$$p[1]:
                if (this.dl != null) {
                    this.zx(this.dl, this.xs);
                    this.xs = this.xv(this.dl, this.zf, "HighColumn");
                }
                break;
            case "HighColumn":
                if (this.xh != null && !this.xh.c1() && !this.xy) {
                    this.xf.b0.e(this.ib);
                    this.rn(this.ge && this.d5);
                }
                break;
            case FinancialSeries.$$p[9]:
                if (this.dl != null) {
                    this.zx(this.dl, this.xt);
                    this.xt = this.xv(this.dl, this.zk, "LowColumn");
                }
                break;
            case "LowColumn":
                if (this.xh != null && !this.xh.c1() && !this.xy) {
                    this.xf.b0.e(this.ib);
                    this.rn(this.ge && this.d5);
                }
                break;
            case FinancialSeries.$$p[0]:
                if (this.dl != null) {
                    this.zx(this.dl, this.xr);
                    this.xr = this.xv(this.dl, this.y2, "CloseColumn");
                }
                break;
            case "CloseColumn":
                if (this.xh != null && !this.xh.c1() && !this.xy) {
                    this.xf.b0.e(this.ib);
                    this.rn(this.ge && this.d5);
                }
                this.z7();
                break;
            case FinancialSeries.$$p[13]:
                if (this.dl != null) {
                    this.zx(this.dl, this.xw);
                    this.xw = this.xv(this.dl, this.zs, "VolumeColumn");
                }
                break;
            case "VolumeColumn":
                if (this.xh != null && !this.xh.c1() && !this.xy) {
                    this.xf.b0.e(this.ib);
                    this.rn(this.ge && this.d5);
                }
                break;
            case FinancialSeries.$$p[14]:
                if (c != null) {
                    c.b0(this);
                }
                if (d != null) {
                    d.ct(this);
                }
                this.xf.b0.e(this.ib);
                this.rn(false);
                this.qh();
                this.xg = typeCast(ITimeRangeSelectorAxis_$type, this.wy);
                break;
            case FinancialSeries.$$p[15]:
                if (c != null) {
                    c.b0(this);
                }
                if (d != null) {
                    d.ct(this);
                }
                this.xf.b0.e(this.ib);
                if (this.xh != null) {
                    this.xh.c1();
                }
                {
                    this.rn(false);
                }
                this.qh();
                break;
            case "TransitionProgress":
                this.w4.c(this.jo, this.w2, this.w0);
                if (this.d3(this.ct)) {
                    return;
                }
                if (this.jo == 1) {
                    this.w0.w();
                    this.z6(this.w0, this.xf);
                    if (this.gz) {
                        this.gz = false;
                        this.o4();
                        this.da.r = truncate(this.i7());
                        this.da.b = this.db;
                    }
                    if (this.g2) {
                        this.g2 = false;
                        this.o4();
                        this.da.r = truncate(this.i7());
                        this.da.b = this.db;
                        this.qw();
                    }
                    this.qk();
                }
                else {
                    this.z6(this.w4, this.xf);
                }
                if (this.c9 != null) {
                    this.c9.qa(this);
                }
                break;
            case FinancialSeries.$$p[10]:
                this.rn(false);
                break;
            case "IsCustomCategoryStyleAllowed":
                this.xz = this.x2();
                this.rn(false);
                break;
            case "CategoryMode":
                if (this.wy != null) {
                    this.wy.l7(true);
                }
                break;
        }
    };
    FinancialSeries.prototype.x1 = function (a) {
        if (typeCast(NumericYAxis.$, a) !== null) {
            return true;
        }
        return false;
    };
    FinancialSeries.prototype.x0 = function (a) {
        if (typeCast(CategoryXAxis.$, a) !== null || a.ce) {
            return true;
        }
        return false;
    };
    FinancialSeries.prototype.wr = function (a, b, c) {
        if (b < a || a < 0 || a > this.dl.count || b < 0 || b > this.dl.count || c == null) {
            return null;
        }
        var d = new Array((b - a) + 1);
        var e = c.cn;
        var f = null;
        if (e) {
            f = c.i$b;
        }
        for (var g = a; g <= b; g++) {
            var h = g;
            if (e) {
                h = f._inner[h];
            }
            d[g - a] = this.dl.item(g);
        }
        return d;
    };
    FinancialSeries.prototype.yv = function (a) {
        return a.b0.b;
    };
    FinancialSeries.prototype.yx = function (a) {
        return a.b0.c;
    };
    FinancialSeries.prototype.wq = function (a, b) {
        return this.wr(a, b, this.xh);
    };
    FinancialSeries.prototype.get_fc = function () {
        return true;
    };
    FinancialSeries.prototype.o1 = function () {
        _super.prototype.o1.call(this);
        this.xl = null;
    };
    FinancialSeries.prototype.de = function (a, b, c) {
        if (this.eb && this.fx(this.bv) && !c) {
            var d = this.xk(a, b, this.xl);
            this.xl = d;
            return d;
        }
        else {
            var e = this.xj(a, b, this.xl);
            this.xl = e;
            return e;
        }
    };
    FinancialSeries.prototype.yz = function (a) {
        var b = this.w1();
        var c = this.ct.bx;
        var d = this.ct.by;
        var e = this.wy;
        var f = 0;
        if (e.cp) {
            var g = (a.y - d.top) / d.height;
            f = g * c.height + c.top;
        }
        else {
            var h = (a.x - d.left) / d.width;
            f = h * c.width + c.left;
        }
        var i = b.f.count;
        var j = 0;
        for (j = 0; j < i; j++) {
            var k = b.f._inner[j];
            var 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;
    };
    FinancialSeries.prototype.xk = function (a, b, c) {
        if (this.dl == null) {
            return null;
        }
        var d = this.dl.count;
        var e = this.xf.b0.c;
        var f = this.xf.b0.d;
        var g = this.xf.b0.b;
        var h = this.wy;
        var i = -1;
        var j = -1;
        if (h.cn) {
            var k = this.w1();
            var l = this.yz(b);
            if (k.m != null && l >= 0 && l < k.m.count) {
                l = truncate(Math.round(k.m._inner[l]));
            }
            i = l;
            j = l;
        }
        else {
            var m = this.j1(b);
            i = truncate(Math.floor((intDivide(m, g)))) * g;
            j = i + (g - 1);
        }
        if (c != null && c.g == i && c.f == j) {
            return c;
        }
        var n = new HighlightingInfo();
        n.i = this;
        n.g = i;
        n.f = j;
        return n;
    };
    FinancialSeries.prototype.xj = function (a, b, c) {
        var d = new HighlightingInfo();
        d.i = this;
        d.g = 0;
        d.f = this.dl.count - 1;
        d.c = true;
        if (c != null && c.g == d.g && c.f == d.f) {
            return c;
        }
        return d;
    };
    FinancialSeries.prototype.x2 = function () {
        return this.x4;
    };
    FinancialSeries.prototype.ip = function (a) {
        var b = this.ct.by;
        var c = this.ct.bx;
        var d = -1;
        if (!b.isEmpty && !c.isEmpty && this.wy != null) {
            var e = this.getEffectiveViewport1(this.ct);
            var f = new ScalerParams(0, b, c, this.wy.ch, e);
            var g = this.wd(this.ct);
            var h = this.wy.en(g.left, f);
            var i = this.wy.en(g.right, f);
            var j = (a.x - b.left) / b.width;
            var k = h + (j * (i - h));
            if (this.wy.categoryMode != 0) {
                k -= 0.5;
            }
            d = k;
        }
        return d;
    };
    FinancialSeries.prototype.j1 = function (a) {
        return truncate(Math.round(this.ip(a)));
    };
    FinancialSeries.prototype.get_fq = function () {
        return typeCast(ISortingAxis_$type, this.wy) !== null;
    };
    FinancialSeries.prototype.az = function () {
        return this.wy;
    };
    FinancialSeries.prototype.j3 = function (a) {
        var b = this.ct.by;
        var c = this.ct.bx;
        var d = this.getEffectiveViewport1(this.ct);
        if (b.isEmpty || c.isEmpty) {
            return -1;
        }
        var e = new Rect(0, 0, 0, 1, 1);
        var f = new ScalerParams(0, b, c, this.wy.ch, d);
        var g = typeCast(ISortingAxis_$type, this.wy);
        var h = this.wd(this.ct);
        var i = h.left;
        var j = h.right;
        var k = this.v1(a).x;
        var l = this.wy.en(k, f);
        var m = this.wy.en(i, f);
        var n = this.wy.en(j, f);
        l = Math.max(m, Math.min(n, l));
        var o = g.i$f(l);
        return o;
    };
    FinancialSeries.prototype.kl = function (a) {
        var b = 0;
        if (typeCast(ISortingAxis_$type, this.wy) !== null) {
            b = this.j3(a);
            if (b == -1) {
                return null;
            }
        }
        else {
            b = this.j1(a);
        }
        return b >= 0 && this.dl != null && b < this.dl.count ? this.dl.item(b) : null;
    };
    FinancialSeries.prototype.w1 = function () {
        var a = this.w0;
        if (this.d1()) {
            if (this.da.g) {
                this.da.t();
            }
            a = this.w4;
        }
        return a;
    };
    FinancialSeries.prototype.yp = function (a, b, c) {
        if (this.wy == null) {
            return 0;
        }
        return this.wy.k6(a, b, c, this.index);
    };
    FinancialSeries.prototype.gl = function () {
        return this.x5;
    };
    FinancialSeries.prototype.w8 = function () {
        return 11;
    };
    FinancialSeries.prototype.c2 = function () {
        return 3;
    };
    FinancialSeries.prototype.c5 = function () {
        return 3;
    };
    FinancialSeries.prototype.z6 = function (a, b) {
        this.qt();
        this.wc = a.ab;
        b.aw();
    };
    FinancialSeries.prototype.z4 = function (a, b) {
        a.v();
    };
    FinancialSeries.prototype.hc = function (a, b, c) {
        var d = _super.prototype.hc.call(this, a, b, c);
        var e = c;
        if (this.dl == null || this.dl.count == 0 || !c.o() || b.isEmpty || a.isEmpty || this.wy == null || this.xh == null || e.b0.b < 1 || this.wy.bi == null || this.xh.bi == null || this.xh.ly == this.xh.lx || this.wy.itemsSource == null || this.wy.lg < 1) {
            e.b0.b = 0;
            d = false;
        }
        return d;
    };
    FinancialSeries.prototype.getViewInfo = function (a, b) {
        b = this.ct.by;
        a = this.ct.bx;
        return {
            p0: a,
            p1: b
        };
    };
    FinancialSeries.prototype.yt = function (a) {
        var b = 0;
        var c = a.by;
        var d = a.bx;
        var e = this.getEffectiveViewport1(this.ct);
        if (!c.isEmpty && !d.isEmpty && this.xh != null) {
            var f = new ScalerParams(0, c, d, this.xh.ch, e);
            f.b = this.iw();
            b = this.xh.ek(this.xh.l8, f);
        }
        return b;
    };
    FinancialSeries.prototype.o4 = function () {
        _super.prototype.o4.call(this);
        this.w2.w();
        this.w0.w();
        this.w4.w();
    };
    FinancialSeries.prototype.ro = function (a) {
        var _this = this;
        _super.prototype.ro.call(this, a);
        this.xf.b0.e(this.ib);
        if (this.d3(this.ct)) {
            return;
        }
        if (this.gp) {
            if (this.d1()) {
                this.z6(this.w4, this.xf);
            }
            else {
                this.z6(this.w0, this.xf);
            }
            return;
        }
        if (this.gd(a)) {
            var b = this.w2;
            if (this.d1()) {
                if (this.da.g) {
                    this.da.t();
                }
                this.w2 = this.w4;
                this.w4 = b;
            }
            else {
                this.w2 = this.w0;
                this.w0 = b;
            }
            this.z4(this.w0, this.xf);
            var c = false;
            if (this.g1) {
                this.da.w();
                this.da.r = truncate(this.i8());
                this.da.b = this.dc != null ? this.dc : this.db;
                if (this.g2) {
                    var d = this.w4;
                    this.w4 = this.w2;
                    this.w2 = d;
                    c = true;
                }
                this.xa.s(this, this.w2, this.w0, this.isVertical, this.wy, this.xh, this.w9, this.w8(), this.c3, this.c2(), function () { return _this.yt(_this.xf); }, this.xf.bx);
                if (this.g2) {
                    var e = this.w4;
                    this.w4 = this.w2;
                    this.w2 = e;
                }
                this.g2 = false;
            }
            if (this.g4) {
                this.da.w();
                this.da.r = truncate(this.i9());
                this.da.b = this.dd != null ? this.dd : this.db;
                if (this.gz) {
                    var f = this.w4;
                    this.w4 = this.w2;
                    this.w2 = f;
                    c = true;
                }
                this.xa.s(this, this.w2, this.w0, this.isVertical, this.wy, this.xh, this.w9, this.w8(), this.c3, this.c2(), function () { return _this.yt(_this.xf); }, this.xf.bx);
                var g = this.w0;
                this.w0 = this.w2;
                this.w2 = g;
                if (this.gz) {
                    var h = this.w4;
                    this.w4 = this.w2;
                    this.w2 = h;
                }
                this.gz = false;
            }
            this.d7 = false;
            if (!c) {
                this.oz();
            }
            this.r1();
            if (this.g1) {
                this.g0 = false;
                this.g3 = false;
                this.gi = false;
                this.gz = true;
            }
            if (this.g4) {
                this.g3 = false;
                this.g2 = true;
            }
        }
        else {
            this.z4(this.w0, this.xf);
            this.z6(this.w0, this.xf);
        }
    };
    FinancialSeries.prototype.gm = function () {
        return true;
    };
    FinancialSeries.prototype.x7 = function (a) {
        var e_1, _a;
        try {
            for (var _b = __values(fromEnum(a)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var b = _c.value;
                switch (b) {
                    case "HighColumn":
                        if (this.xs == null) {
                            return false;
                        }
                        break;
                    case "LowColumn":
                        if (this.xt == null) {
                            return false;
                        }
                        break;
                    case "OpenColumn":
                        if (this.xu == null) {
                            return false;
                        }
                        break;
                    case "CloseColumn":
                        if (this.xr == null) {
                            return false;
                        }
                        break;
                    case "VolumeColumn":
                        if (this.xw == null) {
                            return false;
                        }
                        break;
                }
            }
        }
        catch (e_1_1) {
            e_1 = { error: e_1_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_1)
                    throw e_1.error;
            }
        }
        return true;
    };
    Object.defineProperty(FinancialSeries.prototype, "x8", {
        get: function () {
            return this.wy != null && typeCast(ISortingAxis_$type, this.wy) !== null;
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype.x3 = function () {
        return this.typical != null;
    };
    FinancialSeries.prototype.zw = function (a) {
        this.typical(this, a);
    };
    Object.defineProperty(FinancialSeries.prototype, "yg", {
        get: function () {
            return this.yd();
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype._yd = function () {
        var a, b, _a, _b, c, e_2_1, d, e, f, g, h;
        var e_2, _c;
        return __generator(this, function (_d) {
            switch (_d.label) {
                case 0:
                    a = false;
                    if (!this.x3())
                        return [3 /*break*/, 8];
                    b = this.xb(0, this.dl.count);
                    this.zw(new FinancialEventArgs(0, this.dl.count, b, this.xc(b), this));
                    if (!(b.typicalColumn != null))
                        return [3 /*break*/, 8];
                    a = true;
                    _d.label = 1;
                case 1:
                    _d.trys.push([1, 6, 7, 8]);
                    _a = __values(fromEnum(b.typicalColumn)), _b = _a.next();
                    _d.label = 2;
                case 2:
                    if (!!_b.done)
                        return [3 /*break*/, 5];
                    c = _b.value;
                    return [4 /*yield*/, c];
                case 3:
                    _d.sent();
                    _d.label = 4;
                case 4:
                    _b = _a.next();
                    return [3 /*break*/, 2];
                case 5: return [3 /*break*/, 8];
                case 6:
                    e_2_1 = _d.sent();
                    e_2 = { error: e_2_1 };
                    return [3 /*break*/, 8];
                case 7:
                    try {
                        if (_b && !_b.done && (_c = _a.return))
                            _c.call(_a);
                    }
                    finally {
                        if (e_2)
                            throw e_2.error;
                    }
                    return [7 /*endfinally*/];
                case 8:
                    if (!!a)
                        return [3 /*break*/, 17];
                    if (!(this.x8 && this.wy.i$b != null))
                        return [3 /*break*/, 13];
                    d = this.dl.count;
                    e = this.wy.i$b;
                    f = 0;
                    _d.label = 9;
                case 9:
                    if (!(f < d))
                        return [3 /*break*/, 12];
                    return [4 /*yield*/, (this.xs.item(e.item(f)) + this.xt.item(e.item(f)) + this.xr.item(e.item(f))) / 3];
                case 10:
                    _d.sent();
                    _d.label = 11;
                case 11:
                    ++f;
                    return [3 /*break*/, 9];
                case 12: return [3 /*break*/, 17];
                case 13:
                    g = this.dl.count;
                    h = 0;
                    _d.label = 14;
                case 14:
                    if (!(h < g))
                        return [3 /*break*/, 17];
                    return [4 /*yield*/, (this.xs.item(h) + this.xt.item(h) + this.xr.item(h)) / 3];
                case 15:
                    _d.sent();
                    _d.label = 16;
                case 16:
                    ++h;
                    return [3 /*break*/, 14];
                case 17: return [2 /*return*/];
            }
        });
    };
    FinancialSeries.prototype.yd = function () {
        var _this = this;
        return toEnum(function () { return _this._yd(); });
    };
    Object.defineProperty(FinancialSeries.prototype, "yf", {
        get: function () {
            return this.yc();
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype._yc = function () {
        var a, b, c, d, e;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    if (!(this.x8 && this.wy.i$b != null))
                        return [3 /*break*/, 7];
                    a = this.xs.count;
                    b = this.wy.i$b;
                    if (!(a > 0))
                        return [3 /*break*/, 2];
                    return [4 /*yield*/, this.yu(this.xs.item(b.item(0)) - this.xt.item(b.item(0)))];
                case 1:
                    _a.sent();
                    _a.label = 2;
                case 2:
                    c = 1;
                    _a.label = 3;
                case 3:
                    if (!(c < a))
                        return [3 /*break*/, 6];
                    return [4 /*yield*/, Math.max(this.yu(this.xs.item(b.item(c)) - this.xt.item(b.item(c))), Math.max(this.yu(Math.abs(this.xs.item(b.item(c)) - this.xr.item(b.item(c - 1)))), this.yu(Math.abs(this.xt.item(b.item(c)) - this.xr.item(b.item(c - 1))))))];
                case 4:
                    _a.sent();
                    _a.label = 5;
                case 5:
                    ++c;
                    return [3 /*break*/, 3];
                case 6: return [3 /*break*/, 13];
                case 7:
                    d = this.xs.count;
                    if (!(d > 0))
                        return [3 /*break*/, 9];
                    return [4 /*yield*/, this.yu(this.xs.item(0) - this.xt.item(0))];
                case 8:
                    _a.sent();
                    _a.label = 9;
                case 9:
                    e = 1;
                    _a.label = 10;
                case 10:
                    if (!(e < d))
                        return [3 /*break*/, 13];
                    return [4 /*yield*/, Math.max(this.yu(this.xs.item(e) - this.xt.item(e)), Math.max(this.yu(Math.abs(this.xs.item(e) - this.xr.item(e - 1))), this.yu(Math.abs(this.xt.item(e) - this.xr.item(e - 1)))))];
                case 11:
                    _a.sent();
                    _a.label = 12;
                case 12:
                    ++e;
                    return [3 /*break*/, 10];
                case 13: return [2 /*return*/];
            }
        });
    };
    FinancialSeries.prototype.yc = function () {
        var _this = this;
        return toEnum(function () { return _this._yc(); });
    };
    Object.defineProperty(FinancialSeries.prototype, "ye", {
        get: function () {
            return this.yb();
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype._yb = function () {
        var a, b, c, d, e;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    if (!(this.x8 && this.wy.i$b != null))
                        return [3 /*break*/, 7];
                    a = this.xt.count;
                    b = this.wy.i$b;
                    if (!(a > 0))
                        return [3 /*break*/, 2];
                    return [4 /*yield*/, this.yu(this.xt.item(b.item(0)))];
                case 1:
                    _a.sent();
                    _a.label = 2;
                case 2:
                    c = 1;
                    _a.label = 3;
                case 3:
                    if (!(c < a))
                        return [3 /*break*/, 6];
                    return [4 /*yield*/, Math.min(this.yu(this.xt.item(b.item(c))), this.yu(this.xr.item(b.item(c - 1))))];
                case 4:
                    _a.sent();
                    _a.label = 5;
                case 5:
                    c++;
                    return [3 /*break*/, 3];
                case 6: return [3 /*break*/, 13];
                case 7:
                    d = this.xt.count;
                    if (!(d > 0))
                        return [3 /*break*/, 9];
                    return [4 /*yield*/, this.yu(this.xt.item(0))];
                case 8:
                    _a.sent();
                    _a.label = 9;
                case 9:
                    e = 1;
                    _a.label = 10;
                case 10:
                    if (!(e < d))
                        return [3 /*break*/, 13];
                    return [4 /*yield*/, Math.min(this.yu(this.xt.item(e)), this.yu(this.xr.item(e - 1)))];
                case 11:
                    _a.sent();
                    _a.label = 12;
                case 12:
                    e++;
                    return [3 /*break*/, 10];
                case 13: return [2 /*return*/];
            }
        });
    };
    FinancialSeries.prototype.yb = function () {
        var _this = this;
        return toEnum(function () { return _this._yb(); });
    };
    FinancialSeries.prototype.yi = function (a) {
        if (a == null) {
            return null;
        }
        if (this.x8 && this.wy.i$b != null) {
            return new SafeSortedReadOnlyDoubleCollection(0, a, this.wy.i$b);
        }
        return new SafeReadOnlyDoubleCollection(0, a);
    };
    FinancialSeries.prototype.yh = function () {
        var a = new List$1(String_$type, 0);
        a.add("HighColumn");
        a.add("LowColumn");
        a.add("CloseColumn");
        if (this.typicalBasedOn != null && this.dl != null && !this.xx) {
            this.xx = true;
            var b = this.xb(0, this.dl.count);
            this.xx = false;
            var c = new FinancialEventArgs(0, this.dl.count, b, this.xc(b), this);
            this.typicalBasedOn(this, c);
            if (c.basedOn != null && c.basedOn.count > 0) {
                return c.basedOn;
            }
        }
        return a;
    };
    FinancialSeries.prototype.getOpenColumnAsArray = function () {
        if (this.xu == null) {
            return null;
        }
        if (this.wy != null && typeCast(ISortingAxis_$type, this.wy) !== null) {
            if (this.ym != null) {
                return this.ym.asArray();
            }
            var a = new List$1(Number_$type, 2, this.xu.count);
            var b = this.wy.i$b;
            var c = this.xu.asArray();
            for (var d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.ym = a;
            return this.ym.asArray();
        }
        else {
            return this.xu.asArray();
        }
    };
    FinancialSeries.prototype.getHighColumnAsArray = function () {
        if (this.xs == null) {
            return null;
        }
        if (this.wy != null && typeCast(ISortingAxis_$type, this.wy) !== null) {
            if (this.yk != null) {
                return this.yk.asArray();
            }
            var a = new List$1(Number_$type, 2, this.xs.count);
            var b = this.wy.i$b;
            var c = this.xs.asArray();
            for (var d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.yk = a;
            return this.yk.asArray();
        }
        else {
            return this.xs.asArray();
        }
    };
    FinancialSeries.prototype.getLowColumnAsArray = function () {
        if (this.xt == null) {
            return null;
        }
        if (this.wy != null && typeCast(ISortingAxis_$type, this.wy) !== null) {
            if (this.yl != null) {
                return this.yl.asArray();
            }
            var a = new List$1(Number_$type, 2, this.xt.count);
            var b = this.wy.i$b;
            var c = this.xt.asArray();
            for (var d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.yl = a;
            return this.yl.asArray();
        }
        else {
            return this.xt.asArray();
        }
    };
    FinancialSeries.prototype.getCloseColumnAsArray = function () {
        if (this.xr == null) {
            return null;
        }
        if (this.wy != null && typeCast(ISortingAxis_$type, this.wy) !== null) {
            if (this.yj != null) {
                return this.yj.asArray();
            }
            var a = new List$1(Number_$type, 2, this.xr.count);
            var b = this.wy.i$b;
            var c = this.xr.asArray();
            for (var d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.yj = a;
            return this.yj.asArray();
        }
        else {
            return this.xr.asArray();
        }
    };
    FinancialSeries.prototype.getVolumeColumnAsArray = function () {
        if (this.xw == null) {
            return null;
        }
        if (this.wy != null && typeCast(ISortingAxis_$type, this.wy) !== null) {
            if (this.yn != null) {
                return this.yn.asArray();
            }
            var a = new List$1(Number_$type, 2, this.xw.count);
            var b = this.wy.i$b;
            var c = this.xw.asArray();
            for (var d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.yn = a;
            return this.yn.asArray();
        }
        else {
            return this.xw.asArray();
        }
    };
    FinancialSeries.prototype.o9 = function (a, b, c, d) {
        _super.prototype.o9.call(this, a, b, c, d);
        if (this.wy == null || !(typeCast(ISortingAxis_$type, this.wy) !== null)) {
            return;
        }
        var e = this.wy.i$b;
        switch (a) {
            case 1:
                for (var f = b; f < c; f++) {
                    var g = e._inner[f];
                    if (this.ym != null) {
                        this.ym.insert(f, this.xu.item(g));
                    }
                    if (this.yk != null) {
                        this.yk.insert(f, this.xs.item(g));
                    }
                    if (this.yl != null) {
                        this.yl.insert(f, this.xt.item(g));
                    }
                    if (this.yj != null) {
                        this.yj.insert(f, this.xr.item(g));
                    }
                    if (this.yn != null) {
                        this.yn.insert(f, this.xw.item(g));
                    }
                }
                break;
            case 0:
                if (this.ym != null) {
                    this.ym.v(b, c);
                }
                if (this.yk != null) {
                    this.yk.v(b, c);
                }
                if (this.yl != null) {
                    this.yl.v(b, c);
                }
                if (this.yj != null) {
                    this.yj.v(b, c);
                }
                if (this.yn != null) {
                    this.yn.v(b, c);
                }
                break;
            case 4:
                if (this.ym != null) {
                    this.ym = new List$1(Number_$type, 0);
                }
                if (this.yk != null) {
                    this.yk = new List$1(Number_$type, 0);
                }
                if (this.yl != null) {
                    this.yl = new List$1(Number_$type, 0);
                }
                if (this.yj != null) {
                    this.yj = new List$1(Number_$type, 0);
                }
                if (this.yn != null) {
                    this.yn = new List$1(Number_$type, 0);
                }
                break;
            case 3:
            case 2:
                for (var h = b; h < c; h++) {
                    var i = e._inner[h];
                    if (this.ym != null) {
                        this.ym._inner[h] = this.xu.item(i);
                    }
                    if (this.yk != null) {
                        this.yk._inner[h] = this.xs.item(i);
                    }
                    if (this.yl != null) {
                        this.yl._inner[h] = this.xt.item(i);
                    }
                    if (this.yj != null) {
                        this.yj._inner[h] = this.xr.item(i);
                    }
                    if (this.yn != null) {
                        this.yn._inner[h] = this.xw.item(i);
                    }
                }
                break;
        }
        this.z7();
        this.sh();
    };
    FinancialSeries.prototype.xb = function (a, b) {
        var _this = this;
        var c = this.yi(this.xu);
        var d = this.yi(this.xr);
        var e = this.yi(this.xs);
        var f = this.yi(this.xt);
        var g = this.yi(this.xw);
        var h = ((function () {
            var $ret = new FinancialCalculationDataSource();
            $ret.typicalColumn = new CalculatedColumn(1, new SafeEnumerable(_this.yg), _this.yh());
            $ret.trueRange = new CalculatedColumn(1, new SafeEnumerable(_this.yf), ((function () {
                var $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.ye), ((function () {
                var $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.dl != null ? _this.dl.count : 0;
            return $ret;
        })());
        return h;
    };
    FinancialSeries.prototype.yu = function (a) {
        if (isInfinity(a) || isNaN_(a)) {
            return 0;
        }
        return a;
    };
    FinancialSeries.prototype.xc = function (a) {
        var _this = this;
        return ((function () {
            var $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, function (b) { return TrendCalculators.b(b.volumeColumn, b.shortPeriod); }, ((function () {
                var $ret = new List$1(String_$type, 0);
                $ret.add("VolumeColumn");
                return $ret;
            })()));
            $ret.f = new DataSourceSupportingCalculation(1, function (b) { return TrendCalculators.b(b.volumeColumn, b.longPeriod); }, ((function () {
                var $ret = new List$1(String_$type, 0);
                $ret.add("VolumeColumn");
                return $ret;
            })()));
            $ret.g = new DataSourceSupportingCalculation(1, function (b) { return TrendCalculators.b(b.typicalColumn, b.shortPeriod); }, a.typicalColumn.basedOn);
            $ret.e = new DataSourceSupportingCalculation(1, function (b) { return TrendCalculators.b(b.typicalColumn, b.longPeriod); }, a.typicalColumn.basedOn);
            $ret.k = Series.ho;
            $ret.j = Series.hn;
            $ret.i = runOn(_this, _this.yu);
            return $ret;
        })());
    };
    Object.defineProperty(FinancialSeries.prototype, "categoryAxis", {
        get: function () {
            return this.wy;
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype.rp = function (a, b) {
        _super.prototype.rp.call(this, a, b);
        if (!this.gy) {
            this.ct.a4(b);
            return;
        }
        var c = typeCast(FinancialSeriesView.$, this.cs);
        this.ct.a4(b);
        c.b0.e(this.ib);
        if (this.d3(this.cs)) {
            return;
        }
        if (!this.gq) {
            this.z4(this.w3, c);
        }
        this.gq = false;
        this.z6(this.w3, c);
        this.gy = false;
    };
    FinancialSeries.prototype.rm = function (a, b, c, d, e) {
        _super.prototype.rm.call(this, a, b, c, d, e);
        var f = this.a9.a$j.item(d);
        var g = f;
        g.b0.e(this.ib);
        f.a3(c);
        if (this.d3(g)) {
            return;
        }
        if (this.wz == null) {
            this.wz = new CategoryFrame(3);
        }
        this.wz.v();
        this.z4(this.wz, g);
        this.z6(this.wz, g);
    };
    FinancialSeries.prototype.av = function (a) {
        if (this.wy == a) {
            return this.xh;
        }
        if (this.xh == a) {
            return this.wy;
        }
        return null;
    };
    FinancialSeries.prototype.preferredCategoryMode = function (a) {
        var b = typeCast(IDateTimeAxis_$type, this.wy);
        return b != null ? b.preferredCategoryMode(this) : this.w6;
    };
    Object.defineProperty(FinancialSeries.prototype, "w6", {
        get: function () {
            return this.w5;
        },
        set: function (a) {
            var b = this.w6;
            if (a != b) {
                this.w5 = a;
                this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.w6));
            }
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype.get_fk = function () {
        return true;
    };
    FinancialSeries.prototype.rx = function (a, b) {
        _super.prototype.rx.call(this, a, b);
        this.aao = a;
    };
    FinancialSeries.prototype.z7 = function () {
        this.ik = this.xr == null || this.xr.count == 0 ? NaN : this.xr.item(this.xr.count - 1);
    };
    FinancialSeries.prototype.kn = function (a) {
        if (this.xg != null && a != null) {
            if (this.xi == null || this.xi.propertyName != this.xg.dateTimeMemberPath) {
                this.xi = new FastReflectionHelper(false, this.xg.dateTimeMemberPath);
            }
            var b = this.xi.getPropertyValue(a);
            if (typeCast(Date_$type, b) !== null) {
                return dateToStringFormat(b, this.xg.itemLabelFormat());
            }
        }
        return _super.prototype.kn.call(this, a);
    };
    FinancialSeries.$t = markType(FinancialSeries, 'FinancialSeries', Series.$, [IHasCategoryAxis_$type, IHasCategoryModePreference_$type]);
    FinancialSeries.$$p = markDep(DependencyProperty, PropertyMetadata, FinancialSeries, 'raisePropertyChanged', ['CloseMemberPath:y2:z8', [2, null], 'HighMemberPath:zf:aae', [2, null], 'HighlightedCloseMemberPath:y5:z9', [2, null], 'HighlightedHighMemberPath:y7:aaa', [2, null], 'HighlightedLowMemberPath:y9:aab', [2, null], 'HighlightedOpenMemberPath:zb:aac', [2, null], 'HighlightedVolumeMemberPath:zd:aad', [2, null], 'IsCustomCategoryStyleAllowed:x4:aaf', [0, false], 'IsTransitionInEnabled:x5:aag', [0, false], 'LowMemberPath:zk:aah', [2, null], 'NegativeBrush:aao:aai', [Brush.$, null], 'OpenMemberPath:zo:aaj', [2, null], 'TransitionInMode:w9:aak', [CategoryTransitionInMode_$type, enumGetBox(CategoryTransitionInMode_$type, 0)], 'VolumeMemberPath:zs:aal', [2, null], 'XAxis:wy:aam', [CategoryAxisBase.$, null], 'YAxis:xh:aan', [NumericYAxis.$, null]]);
    return FinancialSeries;
}(Series));
export { FinancialSeries };
/**
 * @hidden
 */
var FinancialCalculationSupportingCalculations = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FinancialCalculationSupportingCalculations, _super);
    function FinancialCalculationSupportingCalculations() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _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;
        return _this;
    }
    FinancialCalculationSupportingCalculations.$t = markType(FinancialCalculationSupportingCalculations, 'FinancialCalculationSupportingCalculations');
    return FinancialCalculationSupportingCalculations;
}(Base));
export { FinancialCalculationSupportingCalculations };
/**
 * @hidden
 */
var DataSourceSupportingCalculation = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(DataSourceSupportingCalculation, _super);
    function DataSourceSupportingCalculation(a) {
        var _rest = [];
        for (var _i = 1; _i < arguments.length; _i++) {
            _rest[_i - 1] = arguments[_i];
        }
        var _this = this;
        a = (a == void 0) ? 0 : a;
        switch (a) {
            case 0:
                {
                    var c = _rest[0];
                    _this = _super.call(this, Delegate_$type, 0, c) || this;
                }
                break;
            case 1:
                {
                    var c = _rest[0];
                    var d = _rest[1];
                    _this = _super.call(this, Delegate_$type, 1, c, d) || this;
                }
                break;
        }
        return _this;
    }
    DataSourceSupportingCalculation.$t = markType(DataSourceSupportingCalculation, 'DataSourceSupportingCalculation', SupportingCalculation$1.$.specialize(Delegate_$type));
    return DataSourceSupportingCalculation;
}(SupportingCalculation$1));
export { DataSourceSupportingCalculation };
/**
 * @hidden
 */
var FinancialCalculationDataSource = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FinancialCalculationDataSource, _super);
    function FinancialCalculationDataSource() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _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;
        return _this;
    }
    Object.defineProperty(FinancialCalculationDataSource.prototype, "openColumn", {
        get: function () {
            return this._openColumn;
        },
        set: function (a) {
            this._openColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "closeColumn", {
        get: function () {
            return this._closeColumn;
        },
        set: function (a) {
            this._closeColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "highColumn", {
        get: function () {
            return this._highColumn;
        },
        set: function (a) {
            this._highColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "lowColumn", {
        get: function () {
            return this._lowColumn;
        },
        set: function (a) {
            this._lowColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "volumeColumn", {
        get: function () {
            return this._volumeColumn;
        },
        set: function (a) {
            this._volumeColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "indicatorColumn", {
        get: function () {
            return this._indicatorColumn;
        },
        set: function (a) {
            this._indicatorColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "typicalColumn", {
        get: function () {
            return this._typicalColumn;
        },
        set: function (a) {
            this._typicalColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "trueRange", {
        get: function () {
            return this._trueRange;
        },
        set: function (a) {
            this._trueRange = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "trueLow", {
        get: function () {
            return this._trueLow;
        },
        set: function (a) {
            this._trueLow = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "period", {
        get: function () {
            return this._period;
        },
        set: function (a) {
            this._period = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "shortPeriod", {
        get: function () {
            return this._shortPeriod;
        },
        set: function (a) {
            this._shortPeriod = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "longPeriod", {
        get: function () {
            return this._longPeriod;
        },
        set: function (a) {
            this._longPeriod = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "count", {
        get: function () {
            return this._count;
        },
        set: function (a) {
            this._count = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "calculateFrom", {
        get: function () {
            return this._calculateFrom;
        },
        set: function (a) {
            this._calculateFrom = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "calculateCount", {
        get: function () {
            return this._calculateCount;
        },
        set: function (a) {
            this._calculateCount = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "multiplier", {
        get: function () {
            return this._multiplier;
        },
        set: function (a) {
            this._multiplier = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "minimumValue", {
        get: function () {
            return this._minimumValue;
        },
        set: function (a) {
            this._minimumValue = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "maximumValue", {
        get: function () {
            return this._maximumValue;
        },
        set: function (a) {
            this._maximumValue = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "specifiesRange", {
        get: function () {
            return this._specifiesRange;
        },
        set: function (a) {
            this._specifiesRange = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "series", {
        get: function () {
            return this._series;
        },
        set: function (a) {
            this._series = a;
        },
        enumerable: false,
        configurable: true
    });
    FinancialCalculationDataSource.$t = markType(FinancialCalculationDataSource, 'FinancialCalculationDataSource');
    return FinancialCalculationDataSource;
}(Base));
export { FinancialCalculationDataSource };
/**
 * @hidden
 */
var FinancialSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FinancialSeriesView, _super);
    function FinancialSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.b2 = null;
        _this.b0 = null;
        _this.b4 = 0;
        _this.b4 = -1;
        _this.b2 = a;
        _this.b0 = _this.b1();
        return _this;
    }
    FinancialSeriesView.prototype.b3 = function (a) {
        if (this.b4 != a.u) {
            return true;
        }
        return false;
    };
    FinancialSeriesView.prototype.b5 = function (a) {
        this.b4 = a.u;
    };
    FinancialSeriesView.prototype.au = function () {
        _super.prototype.au.call(this);
        if (!this.q) {
        }
    };
    FinancialSeriesView.prototype.getDefaultTooltipTemplate = function () {
        var a = "<div class='ui-chart-default-tooltip-content'>";
        if (this.b2.wy.ce) {
            a += "<span>${itemLabel}</span><br/>";
        }
        else if (this.b2.wy.f1 != null) {
            a += "<span>${item." + this.b2.wy.f1 + "}</span><br/>";
        }
        a += "<span class='ui-priority-primary'";
        var b = this.e.a9.a$u(this.e);
        if (!stringIsNullOrEmpty(b)) {
            a += " style='color:" + b + "'";
        }
        var c = new SRProvider(this.w);
        var d = c.b1("financialSeries_Open");
        var e = c.b1("financialSeries_High");
        var f = c.b1("financialSeries_Low");
        var 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.b2.title + "</span><table><tr><td>" + d + ":</td><td>" + "${item." + this.b2.zo + "}</td></tr><tr><td>" + e + ":</td><td>" + "${item." + this.b2.zf + "}</td></tr><tr><td>" + f + ":</td><td>" + "${item." + this.b2.zk + "}</td></tr><tr><td>" + g + ":</td><td>" + "${item." + this.b2.y2 + "}</td></tr>";
        if (!stringIsNullOrEmpty(this.b2.zs)) {
            var h = c.b1("financialSeries_Volume");
            h = stringIsNullOrEmpty(h) ? "Volume" : h;
            a += "<tr><td>" + h + ":</td><td>" + "${item." + this.b2.zs + "}</td></tr>";
        }
        a += "</table></div>";
        return a;
    };
    FinancialSeriesView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.vv = a;
        this.e.jk = 5;
        this.e.jl = 2;
        this.e.jm = 2;
    };
    FinancialSeriesView.$t = markType(FinancialSeriesView, 'FinancialSeriesView', SeriesView.$);
    return FinancialSeriesView;
}(SeriesView));
export { FinancialSeriesView };
