/*
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 } from "tslib";
import { RadialBucketCalculator } from "./RadialBucketCalculator";
import { markType, Point_$type, runOn, delegateCombine, enumGetBox, typeCast, markDep } from "igniteui-react-core";
import { isNaN_, intDivide, isInfinity } from "igniteui-react-core";
import { RadialBase } from "./RadialBase";
import { CategoryLineRasterizer } from "./CategoryLineRasterizer";
import { DependencyProperty } from "igniteui-react-core";
import { TrendLineType_$type } from "igniteui-react-core";
import { Brush } from "igniteui-react-core";
import { PenLineCap_$type } from "igniteui-react-core";
import { DoubleCollection } from "igniteui-react-core";
import { RadialFrame } from "./RadialFrame";
import { ScalerParams } from "./ScalerParams";
import { Rect } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
import { DataLegendSeriesValueInfo } from "igniteui-react-core";
import { DataLegendSeriesContext } from "igniteui-react-core";
import { AxisRange } from "./AxisRange";
import { NumericAxisBase } from "./NumericAxisBase";
import { IFastItemsSource_$type } from "igniteui-react-core";
import { RadialBaseView } from "./RadialBaseView";
import { CollisionAvoider } from "./CollisionAvoider";
import { Clipper } from "igniteui-react-core";
import { TrendResolutionParams } from "./TrendResolutionParams";
import { RadialTrendLineManager } from "./RadialTrendLineManager";
import { CategoryMarkerManager } from "./CategoryMarkerManager";
import { PropertyMetadata } from "igniteui-react-core";
import { stringIsNullOrEmpty } from "igniteui-react-core";
/**
 * @hidden
 */
var AnchoredRadialBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(AnchoredRadialBucketCalculator, _super);
    function AnchoredRadialBucketCalculator(a) {
        var _this = _super.call(this, a) || this;
        _this.f = null;
        _this.f = a;
        return _this;
    }
    AnchoredRadialBucketCalculator.prototype.getBucket = function (a) {
        var b = this.f.cz.w4;
        var c = Math.min(a * this.b, b.count - 1);
        var d = Math.min(c + this.b - 1, b.count - 1);
        var e = NaN;
        var f = NaN;
        for (var g = c; g <= d; ++g) {
            var h = b.item(g);
            if (!isNaN_(e)) {
                if (!isNaN_(h)) {
                    e = Math.min(e, h);
                    f = Math.max(f, h);
                }
            }
            else {
                e = h;
                f = h;
            }
        }
        if (!isNaN_(e)) {
            return [0.5 * (c + d), e, f];
        }
        return [0.5 * (c + d), NaN, NaN];
    };
    AnchoredRadialBucketCalculator.$t = markType(AnchoredRadialBucketCalculator, 'AnchoredRadialBucketCalculator', RadialBucketCalculator.$);
    return AnchoredRadialBucketCalculator;
}(RadialBucketCalculator));
export { AnchoredRadialBucketCalculator };
/**
 * @hidden
 */
var AnchoredRadialSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(AnchoredRadialSeries, _super);
    function AnchoredRadialSeries() {
        var _this = _super.call(this) || this;
        _this.wz = null;
        _this.w3 = null;
        _this.ya = { $type: Point_$type, x: 0, y: 0 };
        _this.w1 = null;
        _this.w0 = null;
        _this.w1 = new RadialFrame(3);
        _this.wz = new CategoryLineRasterizer();
        return _this;
    }
    AnchoredRadialSeries.prototype.cd = function () {
        return new AnchoredRadialSeriesView(this);
    };
    AnchoredRadialSeries.prototype.nh = function () {
        _super.prototype.nh.call(this);
        this.vk = null;
        this.vm = null;
    };
    AnchoredRadialSeries.prototype.jv = function (a, b) {
        var c = this.lw(b);
        if (c == AnchoredRadialSeries.$$p[3]) {
            return this.jw(a, b, this.xm);
        }
        return _super.prototype.jv.call(this, a, b);
    };
    AnchoredRadialSeries.prototype.o2 = function (a) {
        _super.prototype.o2.call(this, a);
        this.wy = a;
    };
    AnchoredRadialSeries.prototype.jg = function (a, b) {
        return this.jh(a, b, this.vk, null, this.w4);
    };
    AnchoredRadialSeries.prototype.je = function (a, b) {
        return this.jf(a, b, this.vk, null, this.w4);
    };
    AnchoredRadialSeries.prototype.hu = function (a, b, c, d, e) {
        if (this.w4 == null) {
            return Number.POSITIVE_INFINITY;
        }
        return this.hv(a, b, this.vk, d, e, this.w4.count, null);
    };
    AnchoredRadialSeries.prototype.ia = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.cg);
        var e = this.w9(this.vk, this.cg.by, this.cg.bx, d);
        var f = new ScalerParams(0, this.cg.by, this.cg.bx, this.vk.ch, d);
        f.c = this.cv.t6;
        return this.ic(this.w4, a, this.vk, f, e, null, b, c);
    };
    AnchoredRadialSeries.prototype.tj = function (a, b, c) {
        if (this.vm == null || this.vk == null || this.cg == null || this.cg.by.isEmpty || this.cg.bx.isEmpty) {
            return { $type: Point_$type, x: NaN, y: NaN };
        }
        var d = this.getEffectiveViewport1(this.cg);
        var e = new ScalerParams(0, this.cg.by, this.cg.bx, this.vm.ch, d);
        e.c = this.getEffectiveViewport1(this.cg);
        var f = this.ia(a, b, c);
        f = this.vm.ej(f, e);
        var g = this.vn.c(a);
        if (!b && this.vk != null) {
            var h = this.jg(a, c);
            var i = this.je(a, c);
            var j = this.w9(this.vk, this.cg.by, this.cg.bx, d);
            var k = new ScalerParams(0, this.cg.by, this.cg.bx, this.vk.ch, d);
            k.c = this.cv.t6;
            var l = this.hu(a, h, this.vk, k, j);
            var m = this.hu(a, i, this.vk, k, j);
            if (m <= l) {
                g = this.vk.ej(i, k) + j;
            }
            else {
                g = this.vk.ej(h, k) + j;
            }
        }
        var n = this.vn.d(g, f, this.cg.by, this.cg.bx);
        var o = this.vn.e(g, f, this.cg.by, this.cg.bx);
        return { $type: Point_$type, x: n, y: o };
    };
    AnchoredRadialSeries.prototype.fo = function () {
        return this.highlightedItemsSource != null || this.xf != null;
    };
    AnchoredRadialSeries.prototype.g1 = function () {
        var a = _super.prototype.g1.call(this);
        {
            var b = ((function () {
                var $ret = new SeriesLayerPropertyOverlay();
                $ret.ad = "ValueMemberPath";
                $ret.p = true;
                $ret.y = "HighlightedValueMemberPath";
                $ret.q = true;
                return $ret;
            })());
            b.valueResolving = delegateCombine(b.valueResolving, runOn(this, this.xq));
            a.add(b);
        }
        return a;
    };
    AnchoredRadialSeries.prototype.xq = function (a, b) {
        if (this.xf != null) {
            b.value = this.xf;
            return;
        }
        b.value = this.xm;
    };
    Object.defineProperty(AnchoredRadialSeries.prototype, "w4", {
        get: function () {
            return this.w3;
        },
        set: function (a) {
            if (this.w3 != a) {
                var b = this.w3;
                this.w3 = a;
                this.raisePropertyChanged("ValueColumn", b, this.w3);
            }
        },
        enumerable: false,
        configurable: true
    });
    AnchoredRadialSeries.prototype.getDataLegendSeriesContextAt = function (a, b) {
        var c = new DataLegendSeriesValueInfo();
        c.a = 0;
        c.l = this.ia({ $type: Point_$type, x: a, y: b }, false, false);
        c.p = "Value";
        c.q = this.xm != null ? this.xm : "Value";
        c.r = this.xi != null ? this.xi : "V:";
        c.s = this.xk != null ? this.xk : "";
        var d = new DataLegendSeriesContext();
        d.f = ((function () {
            var $ret = new List$1(DataLegendSeriesValueInfo.$, 0);
            $ret.add(c);
            return $ret;
        })());
        d.b = this.aw();
        return d;
    };
    Object.defineProperty(AnchoredRadialSeries.prototype, "x6", {
        get: function () {
            return this.c(AnchoredRadialSeries.xu);
        },
        set: function (a) {
            this.h(AnchoredRadialSeries.xu, a);
        },
        enumerable: false,
        configurable: true
    });
    AnchoredRadialSeries.prototype.aq = function (a) {
        if (a != null && a == this.vk && this.w4 != null && this.w4.count > 0) {
            return new AxisRange(0, this.w4.count - 1);
        }
        if (a != null && a == this.vm && this.w4 != null && this.w4.count > 0) {
            return new AxisRange(this.w4.minimum, this.w4.maximum);
        }
        return null;
    };
    AnchoredRadialSeries.prototype.pa = function (a, b, c, d) {
        _super.prototype.pa.call(this, a, b, c, d);
        if (this.wy.c0.g$b(a, b, c, d)) {
            this.pr(false);
            this.om();
        }
        var e = typeCast(NumericAxisBase.$, this.vm);
        switch (b) {
            case "FastItemsSource":
                if (typeCast(IFastItemsSource_$type, c) !== null) {
                    c.deregisterColumn(this.w4);
                    this.w4 = null;
                }
                if (typeCast(IFastItemsSource_$type, d) !== null) {
                    this.w4 = this.c4(this.xm);
                    this.wy.cv.e(this.hk);
                }
                if (e != null && !e.c1()) {
                    this.wy.cv.e(this.hk);
                    this.pr(this.fr && c != null);
                }
                break;
            case AnchoredRadialSeries.$$p[3]:
                if (this.c7 != null) {
                    this.c7.deregisterColumn(this.w4);
                    this.w4 = this.c4(this.xm);
                }
                break;
            case "ValueColumn":
                if (e != null && !e.c1()) {
                    this.wy.cv.e(this.hk);
                    this.pr(this.fr && this.dp);
                }
                break;
            case "TrendLineBrush":
                this.pg(b);
                break;
            case "TrendLineType":
                this.om();
                break;
        }
    };
    AnchoredRadialSeries.prototype.np = function (a, b, c, d) {
        switch (a) {
            case 4:
            case 1:
            case 0:
                this.wy.cv.e(this.hk);
                break;
        }
        this.wy.c0.g$e(a, b, c, d);
        switch (a) {
            case 4:
                if (this.vm != null && !this.vm.c1()) {
                    this.pr(true);
                }
                break;
            case 1:
                if (this.vm != null && !this.vm.c1()) {
                    this.pr(true);
                }
                break;
            case 0:
                if (this.vm != null && !this.vm.c1()) {
                    this.pr(true);
                }
                break;
            case 2:
                if (this.xm != null && this.wy.cv.b > 0 && this.vm != null && !this.vm.c1()) {
                    this.pr(true);
                }
                break;
            case 3:
                if (d == this.xm) {
                    if (this.vm != null && !this.vm.c1()) {
                        this.pr(true);
                    }
                }
                break;
        }
    };
    AnchoredRadialSeries.prototype.gm = function (a, b, c) {
        var d = _super.prototype.gm.call(this, a, b, c);
        var e = c;
        if (this.c7 == null || this.c7.count == 0 || this.vk == null || this.w4 == null || this.vk.lf == 0 || this.vm == null || isInfinity(this.vm.lx) || isInfinity(this.vm.lw) || e.cv.b < 1) {
            d = false;
        }
        return d;
    };
    AnchoredRadialSeries.prototype.getOffsetValue = function () {
        return this.w9(this.vk, this.cg.by, this.cg.bx, this.getEffectiveViewport1(this.cg));
    };
    AnchoredRadialSeries.prototype.getCategoryWidth = function () {
        return this.vk.getCategorySize(this.cg.by, this.cg.bx, this.getEffectiveViewport1(this.cg));
    };
    AnchoredRadialSeries.prototype.get_w7 = function () {
        return false;
    };
    Object.defineProperty(AnchoredRadialSeries.prototype, "w7", {
        get: function () {
            return this.get_w7();
        },
        enumerable: false,
        configurable: true
    });
    AnchoredRadialSeries.prototype.get_d0 = function () {
        return true;
    };
    AnchoredRadialSeries.prototype.get_fj = function () {
        return this.vm != null && this.vm.ch;
    };
    AnchoredRadialSeries.prototype.w9 = function (a, b, c, d) {
        var e = 0;
        var f = this.preferredCategoryMode(a);
        if (f == 0 && a.categoryMode != 0) {
            f = 1;
        }
        switch (f) {
            case 0:
                e = 0;
                break;
            case 1:
                e = 0.5 * a.getCategorySize(b, c, d);
                break;
            case 2:
                e = a.getGroupCenter(this.wf(), b, c, d);
                break;
        }
        if (a.ch) {
            e = -e;
        }
        return e;
    };
    AnchoredRadialSeries.prototype.wn = function (a, b) {
        var _this = this;
        var c = b.by;
        var d = b.bx;
        var e = this.getEffectiveViewport1(b);
        var f = this.vk;
        var g = this.vm;
        var h = g.lx;
        var i = g.lw;
        a.f.clear();
        a.m.clear();
        a.p.clear();
        var j = this.ue();
        var k = 0;
        var l = b;
        var m = new CollisionAvoider();
        var n = 0;
        var o = b.cv.d;
        n = this.w9(f, c, d, e);
        l.c0.i = this.vm.no;
        l.c0.h = this.vm.nn;
        l.c0.j = function (p, q) { return _this.xa(p, q, c, d); };
        l.c0.k = function (p, q) { return _this.xb(p, q, c, d); };
        var p = ((function () {
            var $ret = new Clipper(0, d, false);
            $ret.i = a.p;
            return $ret;
        })());
        var q = ((function () {
            var $ret = new TrendResolutionParams();
            $ret.e = b.cv.b;
            $ret.f = b.cv.c;
            $ret.g = o;
            $ret.a = n;
            $ret.d = _this.hk;
            $ret.h = d;
            $ret.i = c;
            return $ret;
        })());
        l.c0.l(a.p, this.w2, this.w4, this.xd, function (r) { return _this.vk.getScaledAngle(r); }, function (r) { return _this.vm.nu(r); }, q, p);
        var r = true;
        if (this.w8(b)) {
            o--;
        }
        for (var s = b.cv.c; s <= o; ++s) {
            var t = s;
            if (t * b.cv.b >= this.vk.lf) {
                t -= intDivide((this.vk.lf), b.cv.b);
            }
            var u = b.cv.getBucket(t);
            if (!isNaN_(u[0])) {
                u[0] = f.getScaledAngle(u[0]) + n;
                if (u[1] < h || u[1] > i) {
                    continue;
                }
                u[1] = g.nu(u[1]);
                if (b.cv.b > 1) {
                    if (u[2] < h || u[2] > i) {
                        continue;
                    }
                    u[2] = g.nu(u[2]);
                }
                else {
                    u[2] = u[1];
                }
                if ((isNaN_(u[1]) || isNaN_(u[2])) && r && this.w7 && this.w6()) {
                    o++;
                }
                else {
                    r = false;
                }
                a.f.add(u);
                if (j) {
                    var v = Math.min(t * b.cv.b, this.c7.count - 1);
                    var w = this.vn.d(u[0], u[1], c, d);
                    var x = this.vn.e(u[0], u[1], c, d);
                    var y = new Rect(0, w - 5, x - 5, 11, 11);
                    if (!isNaN_(w) && !isNaN_(x) && !isInfinity(w) && !isInfinity(x) && m.tryAdd(y)) {
                        a.m.add({ $type: Point_$type, x: w, y: x });
                        var z = b.cw.item(k);
                        z.al = t;
                        z.ak = v;
                        z.content.item = this.c7.item(v);
                        ++k;
                    }
                }
            }
            else {
                if (r && this.w7 && this.w6()) {
                    o++;
                }
            }
        }
        b.cw.count = k;
        return;
    };
    AnchoredRadialSeries.prototype.xa = function (a, b, c, d) {
        return this.vn.d(a, b, c, d);
    };
    AnchoredRadialSeries.prototype.xb = function (a, b, c, d) {
        return this.vn.e(a, b, c, d);
    };
    AnchoredRadialSeries.prototype.w8 = function (a) {
        var b = a;
        return !this.w7 && b.cv.c == 0 && b.cv.d == this.vk.lf;
    };
    AnchoredRadialSeries.prototype.wx = function (a, b, c) {
        var d = null;
        var e = c.by;
        var f = c.bx;
        if (b > -1 && !e.isEmpty && !f.isEmpty) {
            var g = a._inner[0][0] < f.left - 2000 ? f.left - 10 : NaN;
            var h = f.bottom + 10;
            var i = a._inner[b][0] > f.right + 2000 ? f.right + 10 : NaN;
            var j = f.top - 10;
            d = new Clipper(1, g, h, i, j, false);
        }
        return d;
    };
    AnchoredRadialSeries.prototype.xt = function (a, b, c, d, e) {
        if (a.count > 0 && d.count > 0) {
            if (!e || this.w5()) {
                a.add(this.ya);
                a.add(a._inner[0]);
                d.add(this.ya);
                d.add(d._inner[0]);
            }
        }
    };
    AnchoredRadialSeries.prototype.w6 = function () {
        return !this.w5();
    };
    AnchoredRadialSeries.prototype.w5 = function () {
        var a = this.cg.by;
        return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
    };
    AnchoredRadialSeries.prototype.nk = function (a, b) {
        _super.prototype.nk.call(this, a, b);
        var c = b;
        if (a) {
            c.cw.clear();
        }
        c.c0.g$d();
    };
    AnchoredRadialSeries.prototype.wq = function (a, b) {
        this.oy();
        var c = b.by;
        var d = b.bx;
        var e = this.getEffectiveViewport1(b);
        var f = this.tq(b);
        var g = b;
        g.c0.g$g(a.p);
        CategoryMarkerManager.e(this, a.m, g.cw, this.ug);
        this.xp(b, a);
        g.cp();
        this.xo(d, c, e, f, g);
    };
    AnchoredRadialSeries.prototype.ww = function (a, b, c) {
        if (b < a || a < 0 || a > this.w4.count || b < 0 || b > this.w4.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.c7.item(g);
        }
        return d;
    };
    AnchoredRadialSeries.prototype.xr = function (a, b, c, d, e, f) {
        var g = this.bp != 1;
        this.vt.a3(this.vt.d, d.cn, a, b, c, d, e, f, true);
        this.vt.aa(this.hi);
        var h = this.vt.ax;
        var i = null;
        var j = this.c7;
        var k = null;
        if (g && this.cv != null) {
            i = this.cv.c2.getHighlightingInfo(this, j, h.o, h.n, true);
            if (this.cv.c2.isCrossContextHighlight(this)) {
                k = this.cv.c2.getHighlightingInfo(this, j, h.o, h.n, true);
            }
            h.b = i;
        }
        h.f = f;
        this.wo(h);
        this.vt.y(this, i, f, g, h.m, this.cv.c2.totalHighlightingProgress);
    };
    AnchoredRadialSeries.prototype.xs = function (a, b, c, d, e, f) {
        var g = this.bp != 1;
        this.vt.a3(this.vt.b, d.cn, a, b, c, d, e, f, false);
        this.vt.ab(this.hi);
        var h = this.vt.ay;
        var i = null;
        var j = this.c7;
        if (g && this.cv != null) {
            i = this.cv.c2.getHighlightingInfo(this, j, h.o, h.n, false);
            h.b = i;
        }
        h.f = f;
        this.wp(h);
        this.vt.z(this, i, f, g, b < 0);
    };
    AnchoredRadialSeries.prototype.xp = function (a, b) {
        a.b6 = true;
        this.vt.a1(this, this.v9(), runOn(this, this.vh), this.wd(a), this.we(a));
        var c = this.vt.d;
        var d = c != null;
        var e = this.vk;
        if (e == null) {
            return;
        }
        var f = this.getEffectiveViewport1(a);
        var g = new ScalerParams(0, a.by, a.bx, e.ch, f);
        var h = this.c7 == null ? 0 : this.c7.count;
        var i = a;
        var j = b.f;
        var k = i.cv.c;
        var l = i.cv.d;
        var m = i.cv.b;
        var n = k * m;
        for (var o = 0; o < a.cw.count; o++) {
            var p = a.cw.item(o);
            var q = p.content;
            if (d) {
                var r = p.al;
                this.xr(j, r, h, e, g, a.q);
            }
            this.vt.ac(p, q);
        }
    };
    AnchoredRadialSeries.prototype.xo = function (a, b, c, d, e) {
        e.c1(a, b, c, d);
    };
    AnchoredRadialSeries.prototype.qf = function () {
        _super.prototype.qf.call(this);
        if (this.index < 0) {
            return;
        }
        this.wy.c2();
    };
    AnchoredRadialSeries.prototype.jz = function (a, b) {
        if (a == this.wy.c0.g$j) {
            return null;
        }
        return _super.prototype.jz.call(this, a, b);
    };
    AnchoredRadialSeries.prototype.fp = function (a) {
        var b = this.cg.by;
        b = b.copy();
        var c = this.cg.bx;
        var d = !b.isEmpty && !c.isEmpty && this.c7 != null ? this.c7.indexOf(a) : -1;
        if (this.vk == null || this.w4 == null || this.vm == null) {
            return false;
        }
        if (d < 0 || d > this.w4.count - 1) {
            return false;
        }
        var e = this.vk.getScaledAngle(d);
        var f = this.vm.nu(this.w4.item(d));
        if (isNaN_(f)) {
            f = (this.vm.nn + this.vm.no) / 2;
        }
        var g = 0.5 + (Math.cos(e) * f);
        var h = 0.5 + (Math.sin(e) * f);
        if (!isNaN_(g)) {
            if (g < b.left + 0.1 * b.width) {
                g = g + 0.4 * b.width;
                b.x = g - 0.5 * b.width;
            }
            if (g > b.right - 0.1 * b.width) {
                g = g - 0.4 * b.width;
                b.x = g - 0.5 * b.width;
            }
        }
        if (!isNaN_(h)) {
            if (h < b.top + 0.1 * b.height) {
                h = h + 0.4 * b.height;
                b.y = h - 0.5 * b.height;
            }
            if (h > b.bottom - 0.1 * b.height) {
                h = h - 0.4 * b.height;
                b.y = h - 0.5 * b.height;
            }
        }
        if (this.co != null) {
            this.co.au(this.cv, b, true);
        }
        return d >= 0;
    };
    AnchoredRadialSeries.prototype.pt = function (a, b) {
        _super.prototype.pt.call(this, a, b);
        if (!this.f9) {
            this.cg.a4(b);
            return;
        }
        this.cg.a4(b);
        var c = typeCast(AnchoredRadialSeriesView.$, this.cf);
        c.cv.e(this.hk);
        if (this.dm(this.cf)) {
            return;
        }
        if (!this.f2) {
            this.w1 = new RadialFrame(3);
            this.wn(this.w1, c);
        }
        this.f2 = false;
        this.wq(this.w1, c);
        this.f9 = false;
    };
    AnchoredRadialSeries.prototype.pq = function (a, b, c, d, e) {
        _super.prototype.pq.call(this, a, b, c, d, e);
        var f = this.a3.a$h.item(d);
        var g = f;
        g.cv.e(this.hk);
        f.a3(c);
        if (this.dm(g)) {
            return;
        }
        if (this.w0 == null) {
            this.w0 = new RadialFrame(3);
        }
        this.w0.u();
        this.wn(this.w0, g);
        this.wq(this.w0, g);
    };
    AnchoredRadialSeries.prototype.n2 = function (a) {
        _super.prototype.n2.call(this, a);
        this.a5.exportTrendlineData(this, a, this.wy.c0.g$j);
    };
    AnchoredRadialSeries.$t = markType(AnchoredRadialSeries, 'AnchoredRadialSeries', RadialBase.$);
    AnchoredRadialSeries.xu = DependencyProperty.i("ActualTrendLineBrush", Brush.$, AnchoredRadialSeries.$, new PropertyMetadata(2, null, function (a, b) { return a.raisePropertyChanged("ActualTrendLineBrush", b.oldValue, b.newValue); }));
    AnchoredRadialSeries.$$p = markDep(DependencyProperty, PropertyMetadata, AnchoredRadialSeries, 'raisePropertyChanged', ['HighlightedValueMemberPath:xf:xv', [2, null], 'ValueMemberAsLegendLabel:xi:x3', [2, null], 'ValueMemberAsLegendUnit:xk:x4', [2, null], 'ValueMemberPath:xm:x5', [2, null], 'TrendLineType:w2:x1', [TrendLineType_$type, enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness:xc:x0', [1, 1.5], 'TrendLinePeriod:xd:xz', [1, 7], 'TrendLineZIndex:xe:x2', [1, 1], 'TrendLineBrush:x7:xw', [Brush.$, null], 'TrendLineDashArray:x8:xx', [DoubleCollection.$], 'TrendLineDashCap:x9:xy', [PenLineCap_$type, enumGetBox(PenLineCap_$type, 0)]]);
    return AnchoredRadialSeries;
}(RadialBase));
export { AnchoredRadialSeries };
/**
 * @hidden
 */
var AnchoredRadialSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(AnchoredRadialSeriesView, _super);
    function AnchoredRadialSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.cz = null;
        _this.c0 = null;
        _this.cv = new AnchoredRadialBucketCalculator(_this);
        _this.cz = a;
        _this.c0 = new RadialTrendLineManager();
        return _this;
    }
    AnchoredRadialSeriesView.prototype.c1 = function (a, b, c, d) {
    };
    AnchoredRadialSeriesView.prototype.c2 = function () {
        this.cz.x6 = null;
        if (this.cz.x7 != null) {
            this.cz.x6 = this.cz.x7;
        }
        else {
            this.cz.x6 = this.cz.su;
        }
    };
    AnchoredRadialSeriesView.prototype.a7 = function (a, b) {
        if (a.d) {
            if (!b) {
            }
            if (this.cz.w2 != 0 && !b) {
                var c = this.c0.g$j;
                c.ad = this.cz.xc;
                c._stroke = this.cz.x6;
                c.ai = this.cz.x8;
                c.aj = this.cz.x9;
                a.v(c);
            }
        }
        _super.prototype.a7.call(this, a, b);
    };
    AnchoredRadialSeriesView.prototype.getDefaultTooltipTemplate = function () {
        var a = "<div class='ui-chart-default-tooltip-content'>";
        if (this.cz.vk.f0 != null) {
            a += "<span>${item." + this.cz.vk.f0 + "}</span><br/>";
        }
        a += "<span";
        var b = this.e.a3.a$r(this.e);
        if (!stringIsNullOrEmpty(b)) {
            a += " style='color:" + b + "'";
        }
        a += ">" + this.cz.title + ": </span><span class='ui-priority-primary'>" + "${item." + this.cz.xm + "}</span></div>";
        return a;
    };
    AnchoredRadialSeriesView.$t = markType(AnchoredRadialSeriesView, 'AnchoredRadialSeriesView', RadialBaseView.$);
    return AnchoredRadialSeriesView;
}(RadialBaseView));
export { AnchoredRadialSeriesView };
