/*
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 * as tslib_1 from "tslib";
import { AxisLabelPanelBase } from "./AxisLabelPanelBase";
import { Boolean_$type, typeCast, Type, markType, Point_$type, typeGetValue, fromEnum, runOn, Number_$type } from "igniteui-react-core/ES5/type";
import { AxisLabelPanelBaseView } from "./AxisLabelPanelBaseView";
import { Rect } from "igniteui-react-core/ES5/Rect";
import { Extensions } from "igniteui-react-core/ES5/Extensions";
import { Axis } from "./Axis";
import { List$1 } from "igniteui-react-core/ES5/List$1";
import { LabelPosition } from "./LabelPosition";
import { XamDataChart } from "./XamDataChart";
import { CategoryAxisBase } from "./CategoryAxisBase";
import { IAngleScaler_$type } from "./IAngleScaler";
import { CategoryAxisRenderer } from "./CategoryAxisRenderer";
import { DependencyProperty } from "igniteui-react-core/ES5/DependencyProperty";
import { PolarAxisRenderingManager } from "./PolarAxisRenderingManager";
import { AxisLabelManager } from "./AxisLabelManager";
import { ViewportUtils } from "./ViewportUtils";
import { RadialAxisRenderingParameters } from "./RadialAxisRenderingParameters";
import { CategoryTickmarkValues } from "./CategoryTickmarkValues";
import { MathUtil } from "igniteui-react-core/ES5/MathUtil";
import { SeriesViewer } from "./SeriesViewer";
import { ScalerParams } from "./ScalerParams";
import { AxisRangeChangedEventArgs } from "./AxisRangeChangedEventArgs";
import { PropertyMetadata } from "igniteui-react-core/ES5/PropertyMetadata";
import { isNaN_, isInfinity } from "igniteui-react-core/ES5/number";
import { NumericAxisBase } from "./NumericAxisBase";
import { LogarithmicTickmarkValues } from "./LogarithmicTickmarkValues";
import { PolarAxisRenderingParameters } from "./PolarAxisRenderingParameters";
import { RadialAxisLabelPanel } from "./RadialAxisLabelPanel";
import { LinearTickmarkValues } from "./LinearTickmarkValues";
import { RangeInfo } from "./RangeInfo";
import { IPolarRadialRenderingParameters_$type } from "./IPolarRadialRenderingParameters";
import { CategoryAxisBaseView } from "./CategoryAxisBaseView";
import { NumericAxisBaseView } from "./NumericAxisBaseView";
var AngleAxisLabelPanel = /** @class */ (function (_super) {
    tslib_1.__extends(AngleAxisLabelPanel, _super);
    function AngleAxisLabelPanel() {
        var _this = _super.call(this) || this;
        _this.ct = false;
        _this.cz = null;
        _this.cx = 0;
        _this.cu = 0;
        _this.cw = 0;
        _this.cv = 0;
        return _this;
    }
    AngleAxisLabelPanel.prototype.ad = function () {
        return new AngleAxisLabelPanelView(this);
    };
    AngleAxisLabelPanel.prototype.b8 = function (a) {
        _super.prototype.b8.call(this, a);
        this.cs = a;
    };
    AngleAxisLabelPanel.prototype.ao = function (a, b) {
        if (!Extensions.b(b)) {
            return false;
        }
        if (this.ac == null || this.ac.it.isEmpty) {
            return _super.prototype.ao.call(this, a, b);
        }
        return true;
    };
    AngleAxisLabelPanel.prototype.ay = function () {
        var a = new List$1(Rect.$, 0);
        var b = new List$1(Boolean_$type, 0);
        if (this.a3.count != this.a2.count) {
            return a;
        }
        this.cs.ay(a, b);
        var c = false;
        this.am = this.al(a, b);
        if (!this.ac.bz()) {
            c = true;
            this.a9 = this.cx / 2;
            this.a9 = this.a9 + this.cy();
        }
        else {
            c = true;
            this.cs.ac();
        }
        if (c) {
            for (var d = 0; d < a.count; d++) {
                var e = this.a3._inner[d];
                var f = this.a2._inner[d];
                var g = a._inner[d];
                var h = this.cz(f.d);
                var i = h.x - this.bc(e) / 2;
                var j = h.y - this.bb(e) / 2;
                g.x = i;
                g.y = j;
                a._inner[d] = g;
            }
        }
        return a;
    };
    AngleAxisLabelPanel.prototype.cy = function () {
        var a;
        var b;
        b = this.ac;
        a = null;
        if (b != null) {
            a = typeCast(XamDataChart.$, b.bf);
        }
        if (a == null || b == null) {
            return 0;
        }
        var c = new List$1(Axis.$, 0);
        for (var d = 0; d < a.axes.count; d++) {
            var e = a.axes._inner[d];
            if ((typeCast(NumericAngleAxis.$, e) !== null || typeCast(CategoryAngleAxis.$, e) !== null) && typeCast(AngleAxisLabelPanel.$, e.at) !== null && e.at.a3.count > 0 && (!e.bz()) && !e.by() && (e.ag == null || this.ac.ag == null || e.ag.lb == b.ag.lb)) {
                c.add(e);
            }
        }
        var f = c.indexOf(b);
        if (f == -1) {
            return 0;
        }
        var g = 0;
        var h = 5;
        if (f == 0) {
            g += h;
        }
        else {
            g += c._inner[f - 1].at.a9;
            g += c._inner[f].at.a9 * 2 + h;
        }
        return g;
    };
    AngleAxisLabelPanel.prototype.ah = function () {
        return 4;
    };
    AngleAxisLabelPanel.prototype.as = function (a) {
        return a == 4 || a == 5;
    };
    AngleAxisLabelPanel.$t = markType(AngleAxisLabelPanel, 'AngleAxisLabelPanel', AxisLabelPanelBase.$);
    return AngleAxisLabelPanel;
}(AxisLabelPanelBase));
export { AngleAxisLabelPanel };
var CategoryAngleAxis = /** @class */ (function (_super) {
    tslib_1.__extends(CategoryAngleAxis, _super);
    function CategoryAngleAxis() {
        var _this = _super.call(this) || this;
        _this.ku = null;
        _this.kr = null;
        _this.kv = false;
        _this.kz = NaN;
        _this.ks = null;
        _this.k0 = 0;
        _this.kx = 0;
        _this.ky = 0;
        _this.lb = 1;
        _this.ab = CategoryAngleAxis.$;
        _this.kr = _this.kq();
        _this.ku = new PolarAxisRenderingManager();
        return _this;
    }
    CategoryAngleAxis.prototype.a1 = function () {
        return new CategoryAngleAxisView(this);
    };
    CategoryAngleAxis.prototype.gl = function (a) {
        _super.prototype.gl.call(this, a);
        this.kp = a;
    };
    CategoryAngleAxis.prototype.get_b0 = function () {
        return true;
    };
    Object.defineProperty(CategoryAngleAxis.prototype, "b0", {
        get: function () {
            return this.get_b0();
        },
        enumerable: true,
        configurable: true
    });
    CategoryAngleAxis.prototype.as = function () {
        var _this = this;
        var a = new AngleAxisLabelPanel();
        a.cz = function (b) {
            var c = _this.bf != null ? _this.bf.mk : Rect.empty;
            var d = !c.isEmpty ? _this.it : Rect.empty;
            return _this.lo(b, { $type: Point_$type, x: 0.5, y: 0.5 }, c, d, _this.at.a9);
        };
        return a;
    };
    CategoryAngleAxis.prototype.k9 = function (a) {
        return Math.round(a * Math.pow(10, 10)) / Math.pow(10, 10);
    };
    CategoryAngleAxis.prototype.kq = function () {
        var _this = this;
        var a = ((function () {
            var $ret = new AxisLabelManager();
            $ret.a = _this;
            $ret.f = _this.ct;
            $ret.e = _this.cs;
            $ret.b = _this.at;
            return $ret;
        })());
        if (this.aw != null) {
            this.aw.registerAxis(this);
        }
        var b = new CategoryAxisRenderer(a);
        b.u = function () {
            var c = _this.a2.ax();
            var d = _this.a2.a0();
            var e = _this.a2.ay();
            var f = _this.a2.az();
            _this.g7();
            _this.gb(c);
            _this.gb(d);
            _this.gb(e);
            _this.gb(f);
        };
        b.o = function (c, d) { return !d.isEmpty && !c.isEmpty && _this.kt != null; };
        b.d = function (c, d, e, f) { return _this.ko(c, d, e, f); };
        b.v = function () {
            if (!_this.kv) {
                _this.kv = true;
                _this.kt.ck();
                _this.kv = false;
            }
        };
        b.g = function (c) {
            var d = typeGetValue(c);
            if (d > _this.i7.count - 1) {
                d -= _this.i7.count;
            }
            var e = _this.i7.item(d);
            return _this.e0(e);
        };
        b.b.c = function (c) {
            if ((_this.aw == null || _this.aw.visibility == 0) && _this.kt != null && _this.kz != c) {
                var d = typeCast(XamDataChart.$, _this.bf);
                if (d == null) {
                    return;
                }
                _this.kz = c;
                _this.at.a8 = c;
                d.hp();
                try {
                    for (var _a = tslib_1.__values(fromEnum(d.axes)), _b = _a.next(); !_b.done; _b = _a.next()) {
                        var e = _b.value;
                        if (e != _this && typeCast(AngleAxisLabelPanel.$, e.at) !== null) {
                            e.a2.ac();
                        }
                    }
                }
                catch (e_1_1) { e_1 = { error: e_1_1 }; }
                finally {
                    try {
                        if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
                    }
                    finally { if (e_1) throw e_1.error; }
                }
            }
            var e_1, _c;
        };
        b.k = function (c, d, e) {
            var f = typeCast(RadialAxisRenderingParameters.$, c);
            _this.ku.m(d, e, c.z, c.aa, f.minLength, f.maxLength, f.center);
        };
        b.l = function (c, d, e, f) {
            var g = typeCast(RadialAxisRenderingParameters.$, c);
            _this.ku.n(d, e, f, g.z, c.aa, g.minLength, g.maxLength, g.center);
        };
        b.m = function (c, d) { return _this.getScaledAngle(d); };
        b.q = function (c, d) {
            if (_this.k9(d - _this.k0) < 0) {
                return false;
            }
            if (_this.k9(d - _this.k0 - (2 * Math.PI)) > 0) {
                return false;
            }
            return true;
        };
        b.j = function (c) {
            var d = typeCast(RadialAxisRenderingParameters.$, c);
            if (d.e == d.k._inner[0]) {
                _this.ku.i(c.t, c.n, c.z, c.aa, d.center, d.minAngle, d.maxAngle);
            }
        };
        b.e = function (c) {
            c.n = _this.k3();
            c.r = c.n;
        };
        b.p = function (c, d, e) {
            var f = typeCast(RadialAxisRenderingParameters.$, c);
            if (e) {
                return false;
            }
            var g = _this.lo(d, f.center, c.aa, c.z, 0);
            if (g.x < c.z.right && g.x >= c.z.left && g.y < c.z.bottom && g.y >= c.z.top) {
                return true;
            }
            return false;
        };
        b.a = function (c, d, e, f) {
            var g = c.y;
            var h = new ScalerParams(0, c.aa, c.z, _this.b8, g);
            var i = d;
            if (_this.categoryMode != 0) {
                var j = (e * f) + 1;
                j = Math.min(j, _this.jq);
                var k = _this.dt(j, h);
                i = (d + k) / 2;
            }
            return i;
        };
        b.f = runOn(this, this.getGroupCenter);
        b.i = runOn(this, this.k6);
        return b;
    };
    CategoryAngleAxis.prototype.lo = function (a, b, c, d, e) {
        var f = this.k3();
        var g = ViewportUtils.b(e, c, d);
        if (this.aw != null && (this.aw.c == 5 || this.aw.c == 1)) {
            g *= -1;
        }
        var h = b.x + (f + g) * Math.cos(a);
        var i = b.y + (f + g) * Math.sin(a);
        h = ViewportUtils.c(h, c, d);
        i = ViewportUtils.f(i, c, d);
        return { $type: Point_$type, x: h, y: i };
    };
    CategoryAngleAxis.prototype.k3 = function () {
        if (this.kt == null) {
            return 0;
        }
        if (!this.by()) {
            return this.kt.lg();
        }
        else {
            return this.kt.lh((this.ey));
        }
    };
    CategoryAngleAxis.prototype.ko = function (a, b, c, d) {
        if (this.i7 == null) {
            return null;
        }
        var e = new RadialAxisRenderingParameters();
        var f = this.i7.count - 1;
        var g = this.a2.ax();
        var h = this.a2.a0();
        var i = this.a2.ay();
        var j = this.a2.az();
        e.t = g;
        e.w = h;
        e.u = i;
        e.v = j;
        e.l = f;
        e.m = 0;
        e.h = false;
        e.z = a;
        e.y = c;
        e.x = d;
        e.aa = b;
        e.g = this.kw();
        e.p = this.k7;
        e.o = this.d6();
        e.q = this.k8;
        e.s = this.e1;
        var k = this.ku.f(b);
        var l = this.ku.g(b);
        var m = 0.5 * this.kt.lb;
        var n = 0.5 * this.kt.la;
        var o = k;
        var p = l;
        var q = this.kt.lg();
        if (isNaN_(q) || isInfinity(q)) {
            return null;
        }
        if (p >= m) {
            p = q;
        }
        if (o < n) {
            o = n;
        }
        var r = a.width;
        this.ku.k(b, e, 0, this.i7.count, this.b8, runOn(this, this.getUnscaledAngle), r);
        var s = { $type: Point_$type, x: 0.5, y: 0.5 };
        e.center = s;
        e.maxLength = p;
        e.minLength = o;
        e.effectiveMaximum = q;
        e.ae = this.i7.count;
        e.ab = this.categoryMode;
        e.ad = true;
        e.ac = this.b8;
        e.af = this.jt;
        e.f = new CategoryTickmarkValues();
        e.j = this.ci;
        return e;
    };
    CategoryAngleAxis.prototype.getMinMaxAngle = function (a, b, c) {
        var d = this.ku.l(a, b, c);
        b = d.p1;
        c = d.p2;
        return {
            p1: b,
            p2: c
        };
    };
    CategoryAngleAxis.prototype.ac = function () {
        _super.prototype.ac.call(this);
        this.gz(false);
    };
    Object.defineProperty(CategoryAngleAxis.prototype, "kt", {
        get: function () {
            if (this.ks != null) {
                return this.ks;
            }
            var a = typeCast(XamDataChart.$, this.bf);
            if (a != null) {
                for (var b = 0; b < a.axes.count; b++) {
                    if (typeCast(NumericRadiusAxis.$, a.axes._inner[b]) !== null) {
                        return a.axes._inner[b];
                    }
                }
            }
            return this.ks;
        },
        set: function (a) {
            this.ks = a;
        },
        enumerable: true,
        configurable: true
    });
    CategoryAngleAxis.prototype.ah = function () {
        return this.kt;
    };
    CategoryAngleAxis.prototype.getCategorySize = function (a, b, c) {
        return 2 * Math.PI / this.jq;
    };
    CategoryAngleAxis.prototype.jj = function (a, b, c) {
        var d = !isNaN_(this.jg) ? MathUtil.b(this.jg, 0, 1) : 0;
        var e = 0;
        if (!isNaN_(this.jn)) {
            e = Math.min(this.jn, 1);
        }
        var f = 1 - 0.5 * d;
        return this.getCategorySize(a, b, c) * f / (this.jt - (this.jt - 1) * e);
    };
    CategoryAngleAxis.prototype.getGroupCenter = function (a, b, c, d) {
        var e = 0.5;
        if (this.jt > 1) {
            var f = !isNaN_(this.jg) ? MathUtil.b(this.jg, 0, 1) : 0;
            var g = 0;
            if (!isNaN_(this.jn)) {
                g = Math.min(this.jn, 1);
            }
            var h = 1 - 0.5 * f;
            var i = h / (this.jt - (this.jt - 1) * g);
            var j = (h - i) / (this.jt - 1);
            e = 0.25 * f + 0.5 * i + a * j;
        }
        return this.getCategorySize(b, c, d) * e;
    };
    CategoryAngleAxis.prototype.k6 = function (a) {
        var b = 0.5;
        if (this.jt > 1) {
            var c = !isNaN_(this.jg) ? MathUtil.b(this.jg, 0, 1) : 0;
            var d = 0;
            if (!isNaN_(this.jn)) {
                d = Math.min(this.jn, 1);
            }
            var e = 1 - 0.5 * c;
            var f = e / (this.jt - (this.jt - 1) * d);
            var g = (e - f) / (this.jt - 1);
            b = 0.25 * c + 0.5 * f + a * g;
        }
        return b;
    };
    CategoryAngleAxis.prototype.g0 = function (a) {
        _super.prototype.g0.call(this, a);
        var b = this.bf != null ? this.bf.mk : Rect.empty;
        var c = !b.isEmpty ? this.it : Rect.empty;
        var d = this.io();
        var e = this.im();
        var f = this.kr.c(a, c, b, d, e);
        if (f != null) {
            this.k1 = f.f.m;
            this.k2 = f.f.l;
        }
    };
    CategoryAngleAxis.prototype.k5 = function (a, b) {
        var c;
        var d;
        var e = this.ku.l(b, c, d);
        c = e.p1;
        d = e.p2;
        if (c == 0) {
            if (this.b8) {
                return this.jq;
            }
            else {
                return 0;
            }
        }
        var f = this.getUnscaledAngle(c);
        if (f < 0 || f > this.jq) {
            f = this.getUnscaledAngle(c + Math.PI * 2);
        }
        return f;
    };
    CategoryAngleAxis.prototype.k4 = function (a, b) {
        var c;
        var d;
        var e = this.ku.l(b, c, d);
        c = e.p1;
        d = e.p2;
        if (d > Math.PI * 2) {
            d = d - Math.PI * 2;
        }
        if (d == Math.PI * 2) {
            if (this.b8) {
                return 0;
            }
            else {
                return this.jq;
            }
        }
        var f = this.getUnscaledAngle(d);
        if (f < 0 || f > this.jq) {
            f = this.getUnscaledAngle(d + Math.PI * 2);
        }
        return f;
    };
    CategoryAngleAxis.prototype.getScaledAngle = function (a) {
        var b = this.jq;
        var c = b >= 2 ? (a) / (b) : b == 1 ? 0.5 : NaN;
        if (this.b9) {
            c = 1 - c;
        }
        return (c * 2 * Math.PI) + this.k0;
    };
    CategoryAngleAxis.prototype.getUnscaledAngle = function (a) {
        if (a < this.k0) {
            a += 2 * Math.PI;
        }
        var b = (a - this.k0) / (2 * Math.PI);
        if (this.b8) {
            b = 1 - b;
        }
        return b * (this.jq);
    };
    CategoryAngleAxis.prototype.dt = function (a, b) {
        return this.getScaledAngle(a);
    };
    CategoryAngleAxis.prototype.dw = function (a, b) {
        return this.getUnscaledAngle(a);
    };
    CategoryAngleAxis.prototype.gn = function (a, b, c, d) {
        _super.prototype.gn.call(this, a, b, c, d);
        var e = typeCast(XamDataChart.$, this.bf);
        switch (b) {
            case "CrossingAxis":
                var f = typeCast(NumericRadiusAxis.$, d);
                this.lk(f);
                if (f != null) {
                    f.lq(this);
                }
                this.cf = true;
                this.gz(false);
                break;
            case CategoryAngleAxis.$$p[0]:
                this.k0 = this.la;
                while (this.k0 < 0) {
                    this.k0 += 360;
                }
                while (this.k0 >= 360) {
                    this.k0 -= 360;
                }
                this.k0 = (this.k0 * Math.PI) / 180;
                this.cf = true;
                this.gz(false);
                try {
                    for (var _a = tslib_1.__values(fromEnum(this.cu)), _b = _a.next(); !_b.done; _b = _a.next()) {
                        var g = _b.value;
                        g.i1(false);
                        g.h8();
                    }
                }
                catch (e_2_1) { e_2 = { error: e_2_1 }; }
                finally {
                    try {
                        if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
                    }
                    finally { if (e_2) throw e_2.error; }
                }
                break;
            case "Label":
                if (e != null) {
                    try {
                        for (var _d = tslib_1.__values(fromEnum(e.axes)), _e = _d.next(); !_e.done; _e = _d.next()) {
                            var h = _e.value;
                            h.cf = true;
                            h.gy();
                        }
                    }
                    catch (e_3_1) { e_3 = { error: e_3_1 }; }
                    finally {
                        try {
                            if (_e && !_e.done && (_f = _d.return)) _f.call(_d);
                        }
                        finally { if (e_3) throw e_3.error; }
                    }
                }
                break;
            case "CrossingValue":
                if (e != null) {
                    try {
                        for (var _g = tslib_1.__values(fromEnum(e.axes)), _h = _g.next(); !_h.done; _h = _g.next()) {
                            var i = _h.value;
                            if (typeCast(NumericAngleAxis.$, i) !== null || typeCast(CategoryAngleAxis.$, i) !== null) {
                                i.cf = true;
                                i.gy();
                            }
                        }
                    }
                    catch (e_4_1) { e_4 = { error: e_4_1 }; }
                    finally {
                        try {
                            if (_h && !_h.done && (_j = _g.return)) _j.call(_g);
                        }
                        finally { if (e_4) throw e_4.error; }
                    }
                }
                break;
            case "LabelSettings":
                this.kr = this.kq();
                this.li();
                this.cf = true;
                this.gz(false);
                break;
        }
        var e_2, _c, e_3, _f, e_4, _j;
    };
    CategoryAngleAxis.prototype.li = function () {
        this.kz = NaN;
    };
    CategoryAngleAxis.prototype.lk = function (a) {
        this.kt = a;
    };
    Object.defineProperty(CategoryAngleAxis.prototype, "k7", {
        get: function () {
            return this.c(CategoryAngleAxis.ll);
        },
        set: function (a) {
            this.h(CategoryAngleAxis.ll, a);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CategoryAngleAxis.prototype, "k1", {
        get: function () {
            return this.kx;
        },
        set: function (a) {
            if (this.k1 != a) {
                var b = this.kx;
                this.kx = a;
                this.gt("ActualInterval", b, this.k1);
            }
        },
        enumerable: true,
        configurable: true
    });
    CategoryAngleAxis.prototype.d4 = function () {
        return this.k1;
    };
    Object.defineProperty(CategoryAngleAxis.prototype, "k8", {
        get: function () {
            return this.c(CategoryAngleAxis.lm);
        },
        set: function (a) {
            this.h(CategoryAngleAxis.lm, a);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CategoryAngleAxis.prototype, "k2", {
        get: function () {
            return this.ky;
        },
        set: function (a) {
            if (this.k2 != a) {
                var b = this.ky;
                this.ky = a;
                this.gt("ActualMinorInterval", b, this.k2);
            }
        },
        enumerable: true,
        configurable: true
    });
    CategoryAngleAxis.prototype.kw = function () {
        return false;
    };
    CategoryAngleAxis.prototype.get_az = function () {
        return 2;
    };
    Object.defineProperty(CategoryAngleAxis.prototype, "az", {
        get: function () {
            return this.get_az();
        },
        enumerable: true,
        configurable: true
    });
    CategoryAngleAxis.prototype.cm = function () {
        if (this.cf && this.cn) {
            this.a9 = this.a8();
        }
        if (this.i7 == null) {
            return false;
        }
        var a = this.i7.count;
        if (a != this.lc) {
            var b = new AxisRangeChangedEventArgs(0, 1, 1, this.lc, a);
            this.lc = a;
            this.gu(b);
            return true;
        }
        return false;
    };
    Object.defineProperty(CategoryAngleAxis.prototype, "lc", {
        get: function () {
            return this.lb;
        },
        set: function (a) {
            this.lb = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CategoryAngleAxis.prototype, "isVertical", {
        get: function () {
            return this.ce;
        },
        enumerable: true,
        configurable: true
    });
    CategoryAngleAxis.prototype.j$c = function (a, b) {
        return this.dw.apply(this, arguments);
    };
    CategoryAngleAxis.prototype.j$b = function (a, b) {
        return this.dt.apply(this, arguments);
    };
    CategoryAngleAxis.prototype.j$d = function (a, b, c, d, e) {
        this.gf.apply(this, arguments);
    };
    CategoryAngleAxis.prototype.j$e = function (a, b, c, d) {
        this.gg.apply(this, arguments);
    };
    CategoryAngleAxis.prototype.j$f = function (a, b, c, d) {
        this.gh.apply(this, arguments);
    };
    Object.defineProperty(CategoryAngleAxis.prototype, "j$a", {
        get: function () {
            return this.b8;
        },
        enumerable: true,
        configurable: true
    });
    CategoryAngleAxis.ll = DependencyProperty.i("Interval", Number_$type, CategoryAngleAxis.$, new PropertyMetadata(2, NaN, function (a, b) {
        a.gt("Interval", b.oldValue, b.newValue);
        a.gz(false);
    }));
    CategoryAngleAxis.lm = DependencyProperty.i("MinorInterval", Number_$type, CategoryAngleAxis.$, new PropertyMetadata(2, NaN, function (a, b) {
        (typeCast(CategoryAngleAxis.$, a)).gt("MinorInterval", b.oldValue, b.newValue);
        (typeCast(CategoryAngleAxis.$, a)).gz(false);
    }));
    CategoryAngleAxis.$t = markType(CategoryAngleAxis, 'CategoryAngleAxis', CategoryAxisBase.$, [IAngleScaler_$type]);
    return CategoryAngleAxis;
}(CategoryAxisBase));
export { CategoryAngleAxis };
Type.dep(DependencyProperty, PropertyMetadata, CategoryAngleAxis, 'gt', ['StartAngleOffset:la:ln', [1, 0]]);
var NumericAngleAxis = /** @class */ (function (_super) {
    tslib_1.__extends(NumericAngleAxis, _super);
    function NumericAngleAxis() {
        var _this = _super.call(this) || this;
        _this.k7 = null;
        _this.k8 = false;
        _this.k9 = NaN;
        _this.la = 0;
        _this.k5 = null;
        _this.ab = NumericAngleAxis.$;
        _this.k7 = new PolarAxisRenderingManager();
        _this.i7 = _this.i5();
        return _this;
    }
    NumericAngleAxis.prototype.a1 = function () {
        return new NumericAngleAxisView(this);
    };
    NumericAngleAxis.prototype.gl = function (a) {
        _super.prototype.gl.call(this, a);
        this.k4 = a;
    };
    NumericAngleAxis.prototype.get_b0 = function () {
        return true;
    };
    Object.defineProperty(NumericAngleAxis.prototype, "b0", {
        get: function () {
            return this.get_b0();
        },
        enumerable: true,
        configurable: true
    });
    NumericAngleAxis.prototype.as = function () {
        var _this = this;
        var a = new AngleAxisLabelPanel();
        a.cz = function (b) {
            var c = _this.bf != null ? _this.bf.mk : Rect.empty;
            var d = !c.isEmpty ? _this.it : Rect.empty;
            return _this.lk(b, { $type: Point_$type, x: 0.5, y: 0.5 }, c, d, _this.at.a9);
        };
        return a;
    };
    NumericAngleAxis.prototype.lb = function () {
        if (this.k6 == null) {
            return 0;
        }
        if (!this.by()) {
            return this.k6.lg();
        }
        else {
            return this.k6.lh((this.ey));
        }
    };
    NumericAngleAxis.prototype.ld = function (a) {
        return Math.round(a * Math.pow(10, 10)) / Math.pow(10, 10);
    };
    NumericAngleAxis.prototype.i5 = function () {
        var _this = this;
        var a = _super.prototype.i5.call(this);
        a.b.c = function (b) {
            if ((_this.aw == null || _this.aw.visibility == 0) && _this.k6 != null && _this.k9 != b) {
                var c = typeCast(XamDataChart.$, _this.bf);
                if (c == null) {
                    return;
                }
                _this.k9 = b;
                _this.at.a8 = b;
                c.hp();
                try {
                    for (var _a = tslib_1.__values(fromEnum(c.axes)), _b = _a.next(); !_b.done; _b = _a.next()) {
                        var d = _b.value;
                        if (d != _this && typeCast(AngleAxisLabelPanel.$, d.at) !== null) {
                            d.a2.ac();
                        }
                    }
                }
                catch (e_5_1) { e_5 = { error: e_5_1 }; }
                finally {
                    try {
                        if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
                    }
                    finally { if (e_5) throw e_5.error; }
                }
            }
            var e_5, _c;
        };
        a.e = function (b) {
            b.n = _this.lb();
            b.r = b.n;
        };
        a.j = function (b) {
            var c = typeCast(PolarAxisRenderingParameters.$, b);
            if (c.e == c.k._inner[0]) {
                _this.k7.i(b.t, b.n, b.z, b.aa, c.center, c.minAngle, c.maxAngle);
            }
        };
        a.k = function (b, c, d) {
            var e = typeCast(PolarAxisRenderingParameters.$, b);
            _this.k7.m(c, d, b.z, b.aa, e.minLength, e.maxLength, e.center);
        };
        a.l = function (b, c, d, e) {
            var f = typeCast(PolarAxisRenderingParameters.$, b);
            _this.k7.n(c, d, e, f.z, b.aa, f.minLength, f.maxLength, f.center);
        };
        a.d = function (b, c, d, e) {
            var f = typeCast(PolarAxisRenderingParameters.$, _this.i8(b, c, d, e));
            return f;
        };
        a.v = function () {
            if (!_this.k8) {
                _this.k8 = true;
                _this.k6.ck();
                _this.k8 = false;
            }
        };
        a.m = function (b, c) { return _this.getScaledAngle(c); };
        a.o = function (b, c) { return !c.isEmpty && !b.isEmpty && _this.k6 != null; };
        a.q = function (b, c) {
            if (_this.ld(c - _this.la) < 0) {
                return false;
            }
            if (_this.ld(c - _this.la - (2 * Math.PI)) > 0) {
                return false;
            }
            return true;
        };
        a.p = function (b, c, d) {
            var e = typeCast(PolarAxisRenderingParameters.$, b);
            var f = _this.lk(_this.getScaledAngle(e.l), e.center, b.aa, b.z, 0);
            var g = _this.lk(c, e.center, b.aa, b.z, 0);
            if (d && MathUtil.e(f.x - g.x, f.y - g.y) < 2) {
                return false;
            }
            if (g.x < b.z.right && g.x >= b.z.left && g.y < b.z.bottom && g.y >= b.z.top) {
                return true;
            }
            return false;
        };
        a.r = function (b, c, d, e) {
            if (c < b.m && typeCast(LogarithmicTickmarkValues.$, b.f) !== null) {
                return b.m;
            }
            else if (c > b.l && (typeCast(LogarithmicTickmarkValues.$, b.f) !== null || b.h)) {
                return b.l;
            }
            return c;
        };
        return a;
    };
    NumericAngleAxis.prototype.lk = function (a, b, c, d, e) {
        var f = this.lb();
        var g = ViewportUtils.b(e, c, d);
        if (this.aw != null && (this.aw.c == 5 || this.aw.c == 1)) {
            g *= -1;
        }
        var h = b.x + (f + g) * Math.cos(a);
        var i = b.y + (f + g) * Math.sin(a);
        h = ViewportUtils.c(h, c, d);
        i = ViewportUtils.f(i, c, d);
        return { $type: Point_$type, x: h, y: i };
    };
    NumericAngleAxis.prototype.dt = function (a, b) {
        return this.getScaledAngle(a);
    };
    NumericAngleAxis.prototype.getScaledAngle1 = function (a, b, c) {
        var d = 0;
        if (b) {
            d = (Math.log(a) - this.j2) / (this.j1 - this.j2);
        }
        else {
            d = (a - this.jw) / (this.jv - this.jw);
        }
        if (c) {
            d = 1 - d;
        }
        return (d * 2 * Math.PI) + this.la;
    };
    NumericAngleAxis.prototype.getScaledAngle = function (a) {
        return this.getScaledAngle1(a, this.jm, this.b9);
    };
    NumericAngleAxis.prototype.dw = function (a, b) {
        return this.getUnscaledAngle(a);
    };
    NumericAngleAxis.prototype.getUnscaledAngle = function (a) {
        var b = (a - this.la) / (2 * Math.PI);
        if (this.b8) {
            b = 1 - b;
        }
        if (this.jm) {
            return Math.exp(b * (this.j1 - this.j2) + this.j2);
        }
        else {
            return this.jw + b * (this.jv - this.jw);
        }
    };
    NumericAngleAxis.prototype.gn = function (a, b, c, d) {
        _super.prototype.gn.call(this, a, b, c, d);
        var e = typeCast(XamDataChart.$, this.bf);
        switch (b) {
            case "CrossingAxis":
                var f = typeCast(NumericRadiusAxis.$, d);
                this.li(f);
                if (f != null) {
                    f.lq(this);
                }
                this.gz(false);
                break;
            case NumericAngleAxis.$$p[0]:
                this.la = this.le;
                while (this.la < 0) {
                    this.la += 360;
                }
                while (this.la >= 360) {
                    this.la -= 360;
                }
                this.la = (this.le * Math.PI) / 180;
                this.gz(false);
                try {
                    for (var _a = tslib_1.__values(fromEnum(this.cr())), _b = _a.next(); !_b.done; _b = _a.next()) {
                        var g = _b.value;
                        g.i1(false);
                        g.h8();
                    }
                }
                catch (e_6_1) { e_6 = { error: e_6_1 }; }
                finally {
                    try {
                        if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
                    }
                    finally { if (e_6) throw e_6.error; }
                }
                break;
            case "Label":
                if (e != null) {
                    try {
                        for (var _d = tslib_1.__values(fromEnum(e.axes)), _e = _d.next(); !_e.done; _e = _d.next()) {
                            var h = _e.value;
                            h.gy();
                        }
                    }
                    catch (e_7_1) { e_7 = { error: e_7_1 }; }
                    finally {
                        try {
                            if (_e && !_e.done && (_f = _d.return)) _f.call(_d);
                        }
                        finally { if (e_7) throw e_7.error; }
                    }
                }
                break;
            case "CrossingValue":
                if (e != null) {
                    try {
                        for (var _g = tslib_1.__values(fromEnum(e.axes)), _h = _g.next(); !_h.done; _h = _g.next()) {
                            var i = _h.value;
                            if (typeCast(NumericAngleAxis.$, i) !== null || typeCast(CategoryAngleAxis.$, i) !== null) {
                                i.gy();
                            }
                        }
                    }
                    catch (e_8_1) { e_8 = { error: e_8_1 }; }
                    finally {
                        try {
                            if (_h && !_h.done && (_j = _g.return)) _j.call(_g);
                        }
                        finally { if (e_8) throw e_8.error; }
                    }
                }
                break;
            case "LabelSettings":
                this.i7 = this.i5();
                this.lg();
                this.cf = true;
                this.gz(false);
                break;
        }
        var e_6, _c, e_7, _f, e_8, _j;
    };
    NumericAngleAxis.prototype.lg = function () {
        this.k9 = NaN;
    };
    NumericAngleAxis.prototype.i9 = function () {
        return new PolarAxisRenderingParameters();
    };
    NumericAngleAxis.prototype.i8 = function (a, b, c, d) {
        var e = typeCast(PolarAxisRenderingParameters.$, _super.prototype.i8.call(this, a, b, c, d));
        var f = this.k7.f(b);
        var g = this.k7.g(b);
        var h = 0.5 * this.k6.lb;
        var i = 0.5 * this.k6.la;
        var j = f;
        var k = g;
        var l = this.k6.lg();
        if (isNaN_(l) || isInfinity(l)) {
            return null;
        }
        if (k >= h) {
            k = l;
        }
        if (j < i) {
            j = i;
        }
        var m = a.width;
        this.k7.k(b, e, this.jw, this.jv, this.b8, runOn(this, this.getUnscaledAngle), m);
        var n = { $type: Point_$type, x: 0.5, y: 0.5 };
        e.center = n;
        e.maxLength = k;
        e.minLength = j;
        e.effectiveMaximum = l;
        return e;
    };
    NumericAngleAxis.prototype.getMinMaxAngle = function (a, b, c) {
        var d = this.k7.l(a, b, c);
        b = d.p1;
        c = d.p2;
        return {
            p1: b,
            p2: c
        };
    };
    NumericAngleAxis.prototype.g0 = function (a) {
        _super.prototype.g0.call(this, a);
        var b = this.bf != null ? this.bf.mk : Rect.empty;
        var c = !b.isEmpty ? this.it : Rect.empty;
        var d = this.io();
        var e = this.im();
        var f = this.i7.c(a, c, b, d, e);
        if (f != null) {
            this.ju = f.f.m;
            this.jx = f.f.l;
        }
    };
    Object.defineProperty(NumericAngleAxis.prototype, "k6", {
        get: function () {
            if (this.k5 != null) {
                return this.k5;
            }
            var a = typeCast(XamDataChart.$, this.bf);
            if (a != null) {
                for (var b = 0; b < a.axes.count; b++) {
                    if (a.axes._inner[b].cb) {
                        return a.axes._inner[b];
                    }
                }
            }
            return this.k5;
        },
        set: function (a) {
            this.k5 = a;
        },
        enumerable: true,
        configurable: true
    });
    NumericAngleAxis.prototype.ah = function () {
        return this.k6;
    };
    NumericAngleAxis.prototype.li = function (a) {
        this.k6 = a;
    };
    NumericAngleAxis.prototype.ha = function (a, b) {
        _super.prototype.ha.call(this, a, b);
        if (b.height != a.height || b.width != a.width) {
            this.ck();
        }
    };
    NumericAngleAxis.prototype.get_az = function () {
        return 2;
    };
    Object.defineProperty(NumericAngleAxis.prototype, "az", {
        get: function () {
            return this.get_az();
        },
        enumerable: true,
        configurable: true
    });
    NumericAngleAxis.$t = markType(NumericAngleAxis, 'NumericAngleAxis', NumericAxisBase.$, [IAngleScaler_$type]);
    return NumericAngleAxis;
}(NumericAxisBase));
export { NumericAngleAxis };
Type.dep(DependencyProperty, PropertyMetadata, NumericAngleAxis, 'gt', ['StartAngleOffset:le:lj', [1, 0]]);
var NumericRadiusAxis = /** @class */ (function (_super) {
    tslib_1.__extends(NumericRadiusAxis, _super);
    function NumericRadiusAxis() {
        var _this = _super.call(this) || this;
        _this.k7 = null;
        _this.k8 = false;
        _this.k9 = NaN;
        _this.lb = 0;
        _this.la = 0;
        _this.ld = 0;
        _this.k4 = null;
        _this.ab = NumericRadiusAxis.$;
        _this.lb = _this.ll;
        _this.la = _this.lk;
        _this.k7 = new PolarAxisRenderingManager();
        _this.i7 = _this.i5();
        return _this;
    }
    NumericRadiusAxis.prototype.a1 = function () {
        return new NumericRadiusAxisView(this);
    };
    NumericRadiusAxis.prototype.gl = function (a) {
        _super.prototype.gl.call(this, a);
        this.k6 = a;
    };
    NumericRadiusAxis.prototype.get_cb = function () {
        return true;
    };
    Object.defineProperty(NumericRadiusAxis.prototype, "cb", {
        get: function () {
            return this.get_cb();
        },
        enumerable: true,
        configurable: true
    });
    NumericRadiusAxis.prototype.ds = function () {
        var a = this.lb;
        var b = this.la;
        var c = Math.min(this.lf(), this.le()) * (a - b) / 2;
        c = Math.max(c, 14);
        return c;
    };
    NumericRadiusAxis.prototype.lf = function () {
        return this.it.width;
    };
    NumericRadiusAxis.prototype.le = function () {
        return this.it.height;
    };
    NumericRadiusAxis.prototype.as = function () {
        return new RadialAxisLabelPanel();
    };
    NumericRadiusAxis.prototype.lc = function (a) {
        if (a == null) {
            return 0;
        }
        return a;
    };
    NumericRadiusAxis.prototype.i5 = function () {
        var _this = this;
        var a = _super.prototype.i5.call(this);
        a.b.c = function (b) {
            if ((_this.aw == null || _this.aw.visibility == 0) && _this.k5 != null) {
                if ((_this.aw == null || (_this.aw.c == 4 || _this.aw.c == 5)) && _this.k9 != b) {
                    _this.k9 = b;
                    _this.at.a8 = b;
                    _this.bf.hp();
                }
            }
        };
        a.k = function (b, c, d) {
            var e = typeCast(PolarAxisRenderingParameters.$, b);
            _this.k7.i(c, d, e.z, e.aa, e.center, e.minAngle, e.maxAngle);
        };
        a.l = function (b, c, d, e) {
            if (d == e) {
                return;
            }
            var f = typeCast(PolarAxisRenderingParameters.$, b);
            _this.k7.j(c, d, e, f.z, f.aa, f.center, f.minAngle, f.maxAngle);
        };
        a.m = function (b, c) { return _this.lh(c); };
        a.q = function (b, c) {
            var d = typeCast(PolarAxisRenderingParameters.$, b);
            return c <= d.effectiveMaximum;
        };
        a.n = function (b, c) {
            var d = typeCast(PolarAxisRenderingParameters.$, b);
            return c <= d.effectiveMaximum;
        };
        a.j = function (b) {
            var c = typeCast(PolarAxisRenderingParameters.$, b);
            _this.k7.m(b.t, c.crossingAngleRadians, b.z, b.aa, c.minLength, c.maxLength, c.center);
        };
        a.e = function (b) {
            b.n = _this.aw == null || (_this.aw.c == 4 || _this.aw.c == 0) ? b.z.top : b.z.bottom;
            b.r = b.n;
            var c = typeCast(PolarAxisRenderingParameters.$, b);
            c.crossingAngleRadians = (_this.lc(_this.ey) * Math.PI) / 180;
            if (_this.aw == null || (_this.aw.c == 4 || _this.aw.c == 5)) {
                c.n = ViewportUtils.f(0.5, c.aa, c.z) - b.z.top;
                c.r = c.n;
                var d = typeCast(RadialAxisLabelPanel.$, _this.at);
                if (d != null) {
                    var e = 0;
                    if (_this.aw != null && _this.aw.c == 4) {
                        e = 1;
                    }
                    d.dg = { $type: Point_$type, x: ViewportUtils.c(0.5, c.aa, c.z), y: e };
                    d.dd = c.crossingAngleRadians;
                }
            }
        };
        a.p = function (b, c, d) {
            var e = typeCast(PolarAxisRenderingParameters.$, b);
            if (_this.k5 == null) {
                return false;
            }
            if (c > e.effectiveMaximum) {
                return false;
            }
            var f = false;
            f = _this.aw == null || (_this.aw.c == 4 || _this.aw.c == 5);
            var g = 0;
            if (f) {
                g = _this.ld;
            }
            var h = e.center.x + c * Math.cos(g);
            var i = e.center.y + c * Math.sin(g);
            h = ViewportUtils.c(h, e.aa, e.z);
            i = ViewportUtils.f(i, e.aa, e.z);
            if (h <= b.z.right && h >= b.z.left && ((i <= b.z.bottom && i >= b.z.top) || !f)) {
                return true;
            }
            return false;
        };
        a.h = function (b, c) {
            var d = typeCast(PolarAxisRenderingParameters.$, b);
            return new LabelPosition(ViewportUtils.c(d.center.x + c, d.aa, d.z));
        };
        a.r = function (b, c, d, e) {
            if (c < b.m) {
                return b.m;
            }
            else if (c > b.l) {
                return b.l;
            }
            return c;
        };
        return a;
    };
    NumericRadiusAxis.prototype.dt = function (a, b) {
        return this.lh(a);
    };
    NumericRadiusAxis.prototype.li = function (a, b, c, d, e) {
        var f = 0;
        if (b) {
            if (a <= 0) {
                f = (Math.log(this.jw) - this.j2) / (this.j1 - this.j2);
            }
            else {
                f = (Math.log(a) - this.j2) / (this.j1 - this.j2);
            }
        }
        else {
            f = (a - this.jw) / (this.jv - this.jw);
        }
        if (c) {
            f = 1 - f;
        }
        f = e + (f * (d - e));
        f /= 2;
        return f;
    };
    NumericRadiusAxis.prototype.lh = function (a) {
        return this.li(a, this.jm, this.b9, this.lb, this.la);
    };
    NumericRadiusAxis.prototype.lj = function (a) {
        var b = a * 2;
        b = (b - this.la) / (this.lb - this.la);
        if (this.b8) {
            b = 1 - b;
        }
        if (this.jm) {
            return Math.exp(b * (this.j1 - this.j2) + this.j2);
        }
        else {
            return this.jw + b * (this.jv - this.jw);
        }
    };
    NumericRadiusAxis.prototype.dw = function (a, b) {
        return this.lj(a);
    };
    NumericRadiusAxis.prototype.gn = function (a, b, c, d) {
        switch (b) {
            case "CrossingValue":
                this.ld = this.lc(this.ey) * Math.PI / 180;
                break;
        }
        _super.prototype.gn.call(this, a, b, c, d);
        switch (b) {
            case NumericRadiusAxis.$$p[1]:
                this.lb = this.ll;
                if (this.lb < 0) {
                    this.lb = 0.1;
                }
                if (this.lb > 1) {
                    this.lb = 1;
                }
                if (this.la >= this.lb) {
                    this.la = this.lb - 0.01;
                    if (this.la < 0) {
                        this.la = 0;
                        this.lb = 0.01;
                    }
                }
                this.cf = true;
                this.gz(false);
                if (this.k5 != null) {
                    this.k5.gy();
                }
                try {
                    for (var _a = tslib_1.__values(fromEnum(this.cr())), _b = _a.next(); !_b.done; _b = _a.next()) {
                        var e = _b.value;
                        e.i1(false);
                    }
                }
                catch (e_9_1) { e_9 = { error: e_9_1 }; }
                finally {
                    try {
                        if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
                    }
                    finally { if (e_9) throw e_9.error; }
                }
                break;
            case NumericRadiusAxis.$$p[0]:
                this.la = this.lk;
                if (this.la < 0) {
                    this.la = 0.1;
                }
                if (this.la > 1) {
                    this.la = 1;
                }
                if (this.la >= this.lb) {
                    this.la = this.lb - 0.01;
                    if (this.la < 0) {
                        this.la = 0;
                        this.lb = 0.01;
                    }
                }
                this.cf = true;
                this.gz(false);
                if (this.k5 != null) {
                    this.k5.gy();
                }
                try {
                    for (var _d = tslib_1.__values(fromEnum(this.cr())), _e = _d.next(); !_e.done; _e = _d.next()) {
                        var f = _e.value;
                        f.di = true;
                        f.i1(false);
                    }
                }
                catch (e_10_1) { e_10 = { error: e_10_1 }; }
                finally {
                    try {
                        if (_e && !_e.done && (_f = _d.return)) _f.call(_d);
                    }
                    finally { if (e_10) throw e_10.error; }
                }
                if (this.bf != null) {
                    this.bf.hx();
                }
                break;
            case "CrossingAxis":
                var g = typeCast(NumericAngleAxis.$, d);
                var h = typeCast(CategoryAngleAxis.$, d);
                if (g == null && h == null) {
                    this.lq(null);
                }
                if (g != null) {
                    this.lq(g);
                    g.li(this);
                }
                if (h != null) {
                    this.lq(h);
                    h.lk(this);
                }
                this.cf = true;
                this.gz(false);
                break;
            case "IsInverted":
                if (this.k5 != null) {
                    this.k5.cf = true;
                    this.k5.gz(false);
                }
                break;
        }
        var e_9, _c, e_10, _f;
    };
    NumericRadiusAxis.prototype.lq = function (a) {
        this.k5 = a;
    };
    Object.defineProperty(NumericRadiusAxis.prototype, "k5", {
        get: function () {
            if (this.k4 != null) {
                return this.k4;
            }
            var a = typeCast(XamDataChart.$, this.bf);
            if (a != null) {
                for (var b = 0; b < a.axes.count; b++) {
                    if (typeCast(NumericAngleAxis.$, a.axes._inner[b]) !== null || typeCast(CategoryAngleAxis.$, a.axes._inner[b]) !== null) {
                        return a.axes._inner[b];
                    }
                }
            }
            return this.k4;
        },
        set: function (a) {
            this.k4 = a;
        },
        enumerable: true,
        configurable: true
    });
    NumericRadiusAxis.prototype.ah = function () {
        return this.k5;
    };
    NumericRadiusAxis.prototype.i9 = function () {
        return new PolarAxisRenderingParameters();
    };
    NumericRadiusAxis.prototype.i8 = function (a, b, c, d) {
        var e = typeCast(PolarAxisRenderingParameters.$, _super.prototype.i8.call(this, a, b, c, d));
        var f = this.k7.f(b);
        var g = this.k7.g(b);
        var h = 0.5 * this.lb;
        var i = 0.5 * this.la;
        var j, k;
        if (Rect.l_op_Equality(b, SeriesViewer.mu)) {
            k = this.jv;
            j = this.jw;
        }
        else {
            k = Math.min(g, h);
            j = this.lj(f);
            k = this.lj(k);
            var l = this.lr(a, b, j, k);
            j = l.p2;
            k = l.p3;
        }
        var m = { $type: Point_$type, x: 0.5, y: 0.5 };
        var n = f;
        var o = g;
        var p = Math.min(a.width, a.height) * (this.lb - this.la) / 2;
        e.center = m;
        var q = Math.max(o, n);
        var r = Math.min(n, o);
        e.maxLength = q;
        e.minLength = r;
        var s = Math.min(j, k);
        var t = Math.max(j, k);
        if (s < this.jw) {
            s = this.jw;
        }
        if (t > this.jv) {
            t = this.jv;
        }
        this.jz = s;
        this.jy = t;
        e.k.add(((function () {
            var $ret = new RangeInfo();
            $ret.d = s;
            $ret.c = t;
            $ret.b = p;
            return $ret;
        })()));
        var u = typeCast(IAngleScaler_$type, this.k5);
        if (u != null) {
            var v = void 0;
            var w = void 0;
            var x = u.getMinMaxAngle(b, v, w);
            v = x.p1;
            w = x.p2;
            e.minAngle = Math.min(v, w);
            e.maxAngle = Math.max(v, w);
        }
        var y = this.lg();
        if (o >= h) {
            o = y;
        }
        if (n < i) {
            n = i;
        }
        e.minLength = n;
        e.maxLength = o;
        e.effectiveMaximum = y;
        e.f = this.jc;
        var z = typeCast(LinearTickmarkValues.$, e.f);
        if (z != null) {
            z.y = this.lm(m, e.minLength, e.maxLength, b, a);
        }
        return e;
    };
    NumericRadiusAxis.prototype.lr = function (a, b, c, d) {
        var e = { $type: Point_$type, x: 0.5, y: 0.5 };
        var f = 0;
        if (this.b8) {
            f = this.lh(this.jw);
        }
        else {
            f = this.lh(this.jv);
        }
        var g = 0;
        if (this.ey != null) {
            g = this.ld;
        }
        var h = e.x + f * Math.cos(g);
        var i = e.y + f * Math.sin(g);
        e.x = ViewportUtils.c(e.x, b, a);
        e.y = ViewportUtils.f(e.y, b, a);
        h = ViewportUtils.c(h, b, a);
        i = ViewportUtils.f(i, b, a);
        if (h >= a.left && h <= a.right && i >= a.top && i <= a.bottom) {
            if (this.b8) {
                d = this.jw;
            }
            else {
                d = this.jv;
            }
        }
        if (e.x >= a.left && e.x <= a.right && e.y >= a.top && e.y <= a.bottom) {
            if (this.b8) {
                c = this.jv;
            }
            else {
                c = this.jw;
            }
        }
        return {
            p2: c,
            p3: d
        };
    };
    NumericRadiusAxis.prototype.lm = function (a, b, c, d, e) {
        var f = ViewportUtils.d(c - b, d, e);
        var g = f / Math.min(e.width, e.height);
        if (g > 0.7) {
            return 10;
        }
        return 5;
    };
    NumericRadiusAxis.prototype.lg = function () {
        var a = 0;
        if (!this.b8) {
            a = this.lh(this.jv);
        }
        else {
            a = this.lh(this.jw);
        }
        return a;
    };
    NumericRadiusAxis.prototype.ku = function (a) {
        if (this.k5 != null) {
            this.k5.gy();
        }
    };
    NumericRadiusAxis.prototype.g0 = function (a) {
        _super.prototype.g0.call(this, a);
        var b = this.bf != null ? this.bf.mk : Rect.empty;
        var c = !b.isEmpty ? this.it : Rect.empty;
        var d = this.io();
        var e = this.im();
        var f = this.i7.c(a, c, b, d, e);
        if (f != null) {
            this.ju = f.f.m;
            this.jx = f.f.l;
        }
    };
    NumericRadiusAxis.prototype.ha = function (a, b) {
        _super.prototype.ha.call(this, a, b);
        if (b.height != a.height || b.width != a.width) {
            this.ck();
        }
    };
    NumericRadiusAxis.prototype.lp = function (a, b, c, d, e) {
        var f = typeCast(IPolarRadialRenderingParameters_$type, this.i8(b, c, d, e));
        if (f == null) {
            return;
        }
        this.k7.j(a.c, f.minLength, f.maxLength, b, c, f.center, f.minAngle, f.maxAngle);
    };
    NumericRadiusAxis.prototype.get_az = function () {
        return 3;
    };
    Object.defineProperty(NumericRadiusAxis.prototype, "az", {
        get: function () {
            return this.get_az();
        },
        enumerable: true,
        configurable: true
    });
    NumericRadiusAxis.$t = markType(NumericRadiusAxis, 'NumericRadiusAxis', NumericAxisBase.$);
    return NumericRadiusAxis;
}(NumericAxisBase));
export { NumericRadiusAxis };
Type.dep(DependencyProperty, PropertyMetadata, NumericRadiusAxis, 'gt', ['InnerRadiusExtentScale:lk:ls', [1, 0], 'RadiusExtentScale:ll:lt', [1, 0.75]]);
var AngleAxisLabelPanelView = /** @class */ (function (_super) {
    tslib_1.__extends(AngleAxisLabelPanelView, _super);
    function AngleAxisLabelPanelView(a) {
        var _this = _super.call(this, a) || this;
        _this.ax = null;
        _this.ax = a;
        return _this;
    }
    AngleAxisLabelPanelView.prototype.am = function () {
        _super.prototype.am.call(this);
        this.ax.ct = true;
    };
    AngleAxisLabelPanelView.prototype.ay = function (a, b) {
        this.ax.cx = -1.7976931348623157E+308;
        this.ax.cu = -1.7976931348623157E+308;
        this.ax.cw = -1.7976931348623157E+308;
        this.ax.cv = -1.7976931348623157E+308;
        for (var c = 0; c < this.a.a3.count; c++) {
            var d = this.a.a3._inner[c];
            var e = this.a.a2._inner[c];
            var f = e.a;
            var g = this.ax.cz(e.d);
            var h = this.m(d);
            var i = this.l(d);
            var j = h + this.p() + this.q();
            var k = i + this.r() + this.o();
            var l = g.x - j / 2;
            var m = g.y - k / 2;
            this.ax.cw = Math.max(h, this.ax.cw);
            this.ax.cv = Math.max(i, this.ax.cv);
            this.ax.cx = Math.max(j, this.ax.cx);
            this.ax.cu = Math.max(k, this.ax.cu);
            var n = new Rect(0, l, m, j, k);
            a.add(n);
            b.add(f);
        }
    };
    AngleAxisLabelPanelView.prototype.o = function () {
        return 0;
    };
    AngleAxisLabelPanelView.prototype.p = function () {
        return 0;
    };
    AngleAxisLabelPanelView.prototype.q = function () {
        return 0;
    };
    AngleAxisLabelPanelView.prototype.r = function () {
        return 0;
    };
    AngleAxisLabelPanelView.$t = markType(AngleAxisLabelPanelView, 'AngleAxisLabelPanelView', AxisLabelPanelBaseView.$);
    return AngleAxisLabelPanelView;
}(AxisLabelPanelBaseView));
export { AngleAxisLabelPanelView };
var CategoryAngleAxisView = /** @class */ (function (_super) {
    tslib_1.__extends(CategoryAngleAxisView, _super);
    function CategoryAngleAxisView(a) {
        var _this = _super.call(this, a) || this;
        _this.bf = null;
        _this.bf = a;
        return _this;
    }
    CategoryAngleAxisView.$t = markType(CategoryAngleAxisView, 'CategoryAngleAxisView', CategoryAxisBaseView.$);
    return CategoryAngleAxisView;
}(CategoryAxisBaseView));
export { CategoryAngleAxisView };
var NumericAngleAxisView = /** @class */ (function (_super) {
    tslib_1.__extends(NumericAngleAxisView, _super);
    function NumericAngleAxisView(a) {
        var _this = _super.call(this, a) || this;
        _this.bf = null;
        _this.bf = a;
        return _this;
    }
    NumericAngleAxisView.$t = markType(NumericAngleAxisView, 'NumericAngleAxisView', NumericAxisBaseView.$);
    return NumericAngleAxisView;
}(NumericAxisBaseView));
export { NumericAngleAxisView };
var NumericRadiusAxisView = /** @class */ (function (_super) {
    tslib_1.__extends(NumericRadiusAxisView, _super);
    function NumericRadiusAxisView(a) {
        var _this = _super.call(this, a) || this;
        _this.bf = null;
        _this.bf = a;
        return _this;
    }
    NumericRadiusAxisView.$t = markType(NumericRadiusAxisView, 'NumericRadiusAxisView', NumericAxisBaseView.$);
    return NumericRadiusAxisView;
}(NumericAxisBaseView));
export { NumericRadiusAxisView };
/*<BeginStatics Name="Infragistics.Controls.Charts.CategoryAngleAxis" />*/
/*<EndStatics Name="Infragistics.Controls.Charts.CategoryAngleAxis" />*/
/*<BeginStatics Name="Infragistics.Controls.Charts.NumericAngleAxis" />*/
/*<EndStatics Name="Infragistics.Controls.Charts.NumericAngleAxis" />*/
/*<BeginStatics Name="Infragistics.Controls.Charts.NumericRadiusAxis" />*/
/*<EndStatics Name="Infragistics.Controls.Charts.NumericRadiusAxis" />*/
