/*
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.w2;
        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.wx = null;
        _this.w1 = null;
        _this.x8 = { $type: Point_$type, x: 0, y: 0 };
        _this.wz = null;
        _this.wy = null;
        _this.wz = new RadialFrame(3);
        _this.wx = new CategoryLineRasterizer();
        return _this;
    }
    AnchoredRadialSeries.prototype.cg = function () {
        return new AnchoredRadialSeriesView(this);
    };
    AnchoredRadialSeries.prototype.ng = function () {
        _super.prototype.ng.call(this);
        this.vi = null;
        this.vp = null;
    };
    AnchoredRadialSeries.prototype.ju = function (a, b) {
        var c = this.lv(b);
        if (c == AnchoredRadialSeries.$$p[3]) {
            return this.jv(a, b, this.xk);
        }
        return _super.prototype.ju.call(this, a, b);
    };
    AnchoredRadialSeries.prototype.o0 = function (a) {
        _super.prototype.o0.call(this, a);
        this.ww = a;
    };
    AnchoredRadialSeries.prototype.jf = function (a, b) {
        return this.jg(a, b, this.vi, null, this.w2);
    };
    AnchoredRadialSeries.prototype.jd = function (a, b) {
        return this.je(a, b, this.vi, null, this.w2);
    };
    AnchoredRadialSeries.prototype.ht = function (a, b, c, d, e) {
        if (this.w2 == null) {
            return Number.POSITIVE_INFINITY;
        }
        return this.hu(a, b, this.vi, d, e, this.w2.count, null);
    };
    AnchoredRadialSeries.prototype.h9 = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.cj);
        var e = this.w7(this.vi, this.cj.by, this.cj.bx, d);
        var f = new ScalerParams(0, this.cj.by, this.cj.bx, this.vi.ch, d);
        f.c = this.cy.t2;
        return this.ib(this.w2, a, this.vi, f, e, null, b, c);
    };
    AnchoredRadialSeries.prototype.th = function (a, b, c) {
        if (this.vp == null || this.vi == null || this.cj == null || this.cj.by.isEmpty || this.cj.bx.isEmpty) {
            return { $type: Point_$type, x: NaN, y: NaN };
        }
        var d = this.getEffectiveViewport1(this.cj);
        var e = new ScalerParams(0, this.cj.by, this.cj.bx, this.vp.ch, d);
        e.c = this.getEffectiveViewport1(this.cj);
        var f = this.h9(a, b, c);
        f = this.vp.ej(f, e);
        var g = this.vq.c(a);
        if (!b && this.vi != null) {
            var h = this.jf(a, c);
            var i = this.jd(a, c);
            var j = this.w7(this.vi, this.cj.by, this.cj.bx, d);
            var k = new ScalerParams(0, this.cj.by, this.cj.bx, this.vi.ch, d);
            k.c = this.cy.t2;
            var l = this.ht(a, h, this.vi, k, j);
            var m = this.ht(a, i, this.vi, k, j);
            if (m <= l) {
                g = this.vi.ej(i, k) + j;
            }
            else {
                g = this.vi.ej(h, k) + j;
            }
        }
        var n = this.vq.d(g, f, this.cj.by, this.cj.bx);
        var o = this.vq.e(g, f, this.cj.by, this.cj.bx);
        return { $type: Point_$type, x: n, y: o };
    };
    AnchoredRadialSeries.prototype.fn = function () {
        return this.highlightedItemsSource != null || this.xd != null;
    };
    AnchoredRadialSeries.prototype.g0 = function () {
        var a = _super.prototype.g0.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.xo));
            a.add(b);
        }
        return a;
    };
    AnchoredRadialSeries.prototype.xo = function (a, b) {
        if (this.xd != null) {
            b.value = this.xd;
            return;
        }
        b.value = this.xk;
    };
    Object.defineProperty(AnchoredRadialSeries.prototype, "w2", {
        get: function () {
            return this.w1;
        },
        set: function (a) {
            if (this.w1 != a) {
                var b = this.w1;
                this.w1 = a;
                this.raisePropertyChanged("ValueColumn", b, this.w1);
            }
        },
        enumerable: false,
        configurable: true
    });
    AnchoredRadialSeries.prototype.getDataLegendSeriesContextAt = function (a, b) {
        var c = new DataLegendSeriesValueInfo();
        c.a = 0;
        c.l = this.h9({ $type: Point_$type, x: a, y: b }, false, false);
        c.p = "Value";
        c.q = this.xk != null ? this.xk : "Value";
        c.r = this.xg != null ? this.xg : "V:";
        c.s = this.xi != null ? this.xi : "";
        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, "x4", {
        get: function () {
            return this.c(AnchoredRadialSeries.xs);
        },
        set: function (a) {
            this.h(AnchoredRadialSeries.xs, a);
        },
        enumerable: false,
        configurable: true
    });
    AnchoredRadialSeries.prototype.aq = function (a) {
        if (a != null && a == this.vi && this.w2 != null && this.w2.count > 0) {
            return new AxisRange(0, this.w2.count - 1);
        }
        if (a != null && a == this.vp && this.w2 != null && this.w2.count > 0) {
            return new AxisRange(this.w2.minimum, this.w2.maximum);
        }
        return null;
    };
    AnchoredRadialSeries.prototype.o8 = function (a, b, c, d) {
        _super.prototype.o8.call(this, a, b, c, d);
        if (this.ww.c0.g$b(a, b, c, d)) {
            this.pp(false);
            this.ol();
        }
        var e = typeCast(NumericAxisBase.$, this.vp);
        switch (b) {
            case "FastItemsSource":
                if (typeCast(IFastItemsSource_$type, c) !== null) {
                    c.deregisterColumn(this.w2);
                    this.w2 = null;
                }
                if (typeCast(IFastItemsSource_$type, d) !== null) {
                    this.w2 = this.c3(this.xk);
                    this.ww.cv.e(this.hj);
                }
                if (e != null && !e.c1()) {
                    this.ww.cv.e(this.hj);
                    this.pp(this.fq && c != null);
                }
                break;
            case AnchoredRadialSeries.$$p[3]:
                if (this.c6 != null) {
                    this.c6.deregisterColumn(this.w2);
                    this.w2 = this.c3(this.xk);
                }
                break;
            case "ValueColumn":
                if (e != null && !e.c1()) {
                    this.ww.cv.e(this.hj);
                    this.pp(this.fq && this.dn);
                }
                break;
            case "TrendLineBrush":
                this.pe(b);
                break;
            case "TrendLineType":
                this.ol();
                break;
        }
    };
    AnchoredRadialSeries.prototype.no = function (a, b, c, d) {
        switch (a) {
            case 4:
            case 1:
            case 0:
                this.ww.cv.e(this.hj);
                break;
        }
        this.ww.c0.g$e(a, b, c, d);
        switch (a) {
            case 4:
                if (this.vp != null && !this.vp.c1()) {
                    this.pp(true);
                }
                break;
            case 1:
                if (this.vp != null && !this.vp.c1()) {
                    this.pp(true);
                }
                break;
            case 0:
                if (this.vp != null && !this.vp.c1()) {
                    this.pp(true);
                }
                break;
            case 2:
                if (this.xk != null && this.ww.cv.b > 0 && this.vp != null && !this.vp.c1()) {
                    this.pp(true);
                }
                break;
            case 3:
                if (d == this.xk) {
                    if (this.vp != null && !this.vp.c1()) {
                        this.pp(true);
                    }
                }
                break;
        }
    };
    AnchoredRadialSeries.prototype.gl = function (a, b, c) {
        var d = _super.prototype.gl.call(this, a, b, c);
        var e = c;
        if (this.c6 == null || this.c6.count == 0 || this.vi == null || this.w2 == null || this.vi.lf == 0 || this.vp == null || isInfinity(this.vp.lx) || isInfinity(this.vp.lw) || e.cv.b < 1) {
            d = false;
        }
        return d;
    };
    AnchoredRadialSeries.prototype.getOffsetValue = function () {
        return this.w7(this.vi, this.cj.by, this.cj.bx, this.getEffectiveViewport1(this.cj));
    };
    AnchoredRadialSeries.prototype.getCategoryWidth = function () {
        return this.vi.getCategorySize(this.cj.by, this.cj.bx, this.getEffectiveViewport1(this.cj));
    };
    AnchoredRadialSeries.prototype.get_w5 = function () {
        return false;
    };
    Object.defineProperty(AnchoredRadialSeries.prototype, "w5", {
        get: function () {
            return this.get_w5();
        },
        enumerable: false,
        configurable: true
    });
    AnchoredRadialSeries.prototype.get_dz = function () {
        return true;
    };
    AnchoredRadialSeries.prototype.get_fi = function () {
        return this.vp != null && this.vp.ch;
    };
    AnchoredRadialSeries.prototype.w7 = 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.wd(), b, c, d);
                break;
        }
        if (a.ch) {
            e = -e;
        }
        return e;
    };
    AnchoredRadialSeries.prototype.wl = function (a, b) {
        var _this = this;
        var c = b.by;
        var d = b.bx;
        var e = this.getEffectiveViewport1(b);
        var f = this.vi;
        var g = this.vp;
        var h = g.lx;
        var i = g.lw;
        a.f.clear();
        a.m.clear();
        a.p.clear();
        var j = this.uc();
        var k = 0;
        var l = b;
        var m = new CollisionAvoider();
        var n = 0;
        var o = b.cv.d;
        n = this.w7(f, c, d, e);
        l.c0.i = this.vp.no;
        l.c0.h = this.vp.nn;
        l.c0.j = function (p, q) { return _this.w8(p, q, c, d); };
        l.c0.k = function (p, q) { return _this.w9(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.hj;
            $ret.h = d;
            $ret.i = c;
            return $ret;
        })());
        l.c0.l(a.p, this.w0, this.w2, this.xb, function (r) { return _this.vi.getScaledAngle(r); }, function (r) { return _this.vp.nu(r); }, q, p);
        var r = true;
        if (this.w6(b)) {
            o--;
        }
        for (var s = b.cv.c; s <= o; ++s) {
            var t = s;
            if (t * b.cv.b >= this.vi.lf) {
                t -= intDivide((this.vi.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.w5 && this.w4()) {
                    o++;
                }
                else {
                    r = false;
                }
                a.f.add(u);
                if (j) {
                    var v = Math.min(t * b.cv.b, this.c6.count - 1);
                    var w = this.vq.d(u[0], u[1], c, d);
                    var x = this.vq.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.c6.item(v);
                        ++k;
                    }
                }
            }
            else {
                if (r && this.w5 && this.w4()) {
                    o++;
                }
            }
        }
        b.cw.count = k;
        return;
    };
    AnchoredRadialSeries.prototype.w8 = function (a, b, c, d) {
        return this.vq.d(a, b, c, d);
    };
    AnchoredRadialSeries.prototype.w9 = function (a, b, c, d) {
        return this.vq.e(a, b, c, d);
    };
    AnchoredRadialSeries.prototype.w6 = function (a) {
        var b = a;
        return !this.w5 && b.cv.c == 0 && b.cv.d == this.vi.lf;
    };
    AnchoredRadialSeries.prototype.wv = 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.xr = function (a, b, c, d, e) {
        if (a.count > 0 && d.count > 0) {
            if (!e || this.w3()) {
                a.add(this.x8);
                a.add(a._inner[0]);
                d.add(this.x8);
                d.add(d._inner[0]);
            }
        }
    };
    AnchoredRadialSeries.prototype.w4 = function () {
        return !this.w3();
    };
    AnchoredRadialSeries.prototype.w3 = function () {
        var a = this.cj.by;
        return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
    };
    AnchoredRadialSeries.prototype.nj = function (a, b) {
        _super.prototype.nj.call(this, a, b);
        var c = b;
        if (a) {
            c.cw.clear();
        }
        c.c0.g$d();
    };
    AnchoredRadialSeries.prototype.wo = function (a, b) {
        this.ow();
        var c = b.by;
        var d = b.bx;
        var e = this.getEffectiveViewport1(b);
        var f = this.to(b);
        var g = b;
        g.c0.g$g(a.p);
        CategoryMarkerManager.e(this, a.m, g.cw, this.ue);
        this.xn(b, a);
        g.cp();
        this.xm(d, c, e, f, g);
    };
    AnchoredRadialSeries.prototype.wu = function (a, b, c) {
        if (b < a || a < 0 || a > this.w2.count || b < 0 || b > this.w2.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.c6.item(g);
        }
        return d;
    };
    AnchoredRadialSeries.prototype.xp = function (a, b, c, d, e, f) {
        var g = this.bs != 1;
        this.vw.a3(this.vw.d, d.cn, a, b, c, d, e, f, true);
        this.vw.aa(this.hh);
        var h = this.vw.ax;
        var i = null;
        var j = this.c6;
        var k = null;
        if (g && this.cy != null) {
            i = this.cy.a7.getHighlightingInfo(this, j, h.o, h.n, true);
            if (this.cy.a7.isCrossSeriesHighlight(this)) {
                k = this.cy.a7.getHighlightingInfo(this, j, h.o, h.n, true);
            }
            h.b = i;
        }
        h.f = f;
        this.wm(h);
        this.vw.y(this, i, f, g, h.m, this.cy.a7.totalHighlightingProgress);
    };
    AnchoredRadialSeries.prototype.xq = function (a, b, c, d, e, f) {
        var g = this.bs != 1;
        this.vw.a3(this.vw.b, d.cn, a, b, c, d, e, f, false);
        this.vw.ab(this.hh);
        var h = this.vw.ay;
        var i = null;
        var j = this.c6;
        if (g && this.cy != null) {
            i = this.cy.a7.getHighlightingInfo(this, j, h.o, h.n, false);
            h.b = i;
        }
        h.f = f;
        this.wn(h);
        this.vw.z(this, i, f, g, b < 0);
    };
    AnchoredRadialSeries.prototype.xn = function (a, b) {
        a.b6 = true;
        this.vw.a1(this, this.v7(), runOn(this, this.vf), this.wb(a), this.wc(a));
        var c = this.vw.d;
        var d = c != null;
        var e = this.vi;
        if (e == null) {
            return;
        }
        var f = this.getEffectiveViewport1(a);
        var g = new ScalerParams(0, a.by, a.bx, e.ch, f);
        var h = this.c6 == null ? 0 : this.c6.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.xp(j, r, h, e, g, a.q);
            }
            this.vw.ac(p, q);
        }
    };
    AnchoredRadialSeries.prototype.xm = function (a, b, c, d, e) {
        e.c1(a, b, c, d);
    };
    AnchoredRadialSeries.prototype.qd = function () {
        _super.prototype.qd.call(this);
        if (this.index < 0) {
            return;
        }
        this.ww.c2();
    };
    AnchoredRadialSeries.prototype.jy = function (a, b) {
        if (a == this.ww.c0.g$j) {
            return null;
        }
        return _super.prototype.jy.call(this, a, b);
    };
    AnchoredRadialSeries.prototype.fo = function (a) {
        var b = this.cj.by;
        b = b.copy();
        var c = this.cj.bx;
        var d = !b.isEmpty && !c.isEmpty && this.c6 != null ? this.c6.indexOf(a) : -1;
        if (this.vi == null || this.w2 == null || this.vp == null) {
            return false;
        }
        if (d < 0 || d > this.w2.count - 1) {
            return false;
        }
        var e = this.vi.getScaledAngle(d);
        var f = this.vp.nu(this.w2.item(d));
        if (isNaN_(f)) {
            f = (this.vp.nn + this.vp.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.cr != null) {
            this.cr.au(this.cy, b, true);
        }
        return d >= 0;
    };
    AnchoredRadialSeries.prototype.pr = function (a, b) {
        _super.prototype.pr.call(this, a, b);
        if (!this.f8) {
            this.cj.a4(b);
            return;
        }
        this.cj.a4(b);
        var c = typeCast(AnchoredRadialSeriesView.$, this.ci);
        c.cv.e(this.hj);
        if (this.dl(this.ci)) {
            return;
        }
        if (!this.f1) {
            this.wz = new RadialFrame(3);
            this.wl(this.wz, c);
        }
        this.f1 = false;
        this.wo(this.wz, c);
        this.f8 = false;
    };
    AnchoredRadialSeries.prototype.po = function (a, b, c, d, e) {
        _super.prototype.po.call(this, a, b, c, d, e);
        var f = this.a7.a$h.item(d);
        var g = f;
        g.cv.e(this.hj);
        f.a3(c);
        if (this.dl(g)) {
            return;
        }
        if (this.wy == null) {
            this.wy = new RadialFrame(3);
        }
        this.wy.u();
        this.wl(this.wy, g);
        this.wo(this.wy, g);
    };
    AnchoredRadialSeries.prototype.n1 = function (a) {
        _super.prototype.n1.call(this, a);
        this.a9.exportTrendlineData(this, a, this.ww.c0.g$j);
    };
    AnchoredRadialSeries.$t = markType(AnchoredRadialSeries, 'AnchoredRadialSeries', RadialBase.$);
    AnchoredRadialSeries.xs = 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:xd:xt', [2, null], 'ValueMemberAsLegendLabel:xg:x1', [2, null], 'ValueMemberAsLegendUnit:xi:x2', [2, null], 'ValueMemberPath:xk:x3', [2, null], 'TrendLineType:w0:xz', [TrendLineType_$type, enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness:xa:xy', [1, 1.5], 'TrendLinePeriod:xb:xx', [1, 7], 'TrendLineZIndex:xc:x0', [1, 1], 'TrendLineBrush:x5:xu', [Brush.$, null], 'TrendLineDashArray:x6:xv', [DoubleCollection.$], 'TrendLineDashCap:x7:xw', [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.x4 = null;
        if (this.cz.x5 != null) {
            this.cz.x4 = this.cz.x5;
        }
        else {
            this.cz.x4 = this.cz.ss;
        }
    };
    AnchoredRadialSeriesView.prototype.a7 = function (a, b) {
        if (a.d) {
            if (!b) {
            }
            if (this.cz.w0 != 0 && !b) {
                var c = this.c0.g$j;
                c.ad = this.cz.xa;
                c._stroke = this.cz.x4;
                c.ai = this.cz.x6;
                c.aj = this.cz.x7;
                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.vi.f0 != null) {
            a += "<span>${item." + this.cz.vi.f0 + "}</span><br/>";
        }
        a += "<span";
        var b = this.e.a7.a$r(this.e);
        if (!stringIsNullOrEmpty(b)) {
            a += " style='color:" + b + "'";
        }
        a += ">" + this.cz.title + ": </span><span class='ui-priority-primary'>" + "${item." + this.cz.xk + "}</span></div>";
        return a;
    };
    AnchoredRadialSeriesView.$t = markType(AnchoredRadialSeriesView, 'AnchoredRadialSeriesView', RadialBaseView.$);
    return AnchoredRadialSeriesView;
}(RadialBaseView));
export { AnchoredRadialSeriesView };
