/*
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 { ShapeSeriesBase } from "./ShapeSeriesBase";
import { ShapeAxisInfoCache } from "./ShapeAxisInfoCache";
import { StyleSelector } from "./StyleSelector";
import { DependencyProperty } from "igniteui-react-core";
import { Style } from "igniteui-react-core";
import { MarkerType_$type } from "./MarkerType";
import { DataTemplate } from "igniteui-react-core";
import { Brush } from "igniteui-react-core";
import { CollisionAvoidanceType_$type } from "./CollisionAvoidanceType";
import { MarkerOutlineMode_$type } from "./MarkerOutlineMode";
import { MarkerFillMode_$type } from "./MarkerFillMode";
import { Rect } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { Base, runOn, enumGetBox, Number_$type, typeCast, fromEnum, markType, markDep, PointUtil } from "igniteui-react-core";
import { Dictionary$2 } from "igniteui-react-core";
import { OwnedPoint } from "./OwnedPoint";
import { ShapeSeriesViewBase } from "./ShapeSeriesViewBase";
import { Marker } from "./Marker";
import { MarkerSeries } from "./MarkerSeries";
import { BrushUtil } from "igniteui-react-core";
import { DataContext } from "igniteui-react-core";
import { HashPool$2 } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { SeriesPointOfInterest } from "./SeriesPointOfInterest";
import { RectUtil } from "igniteui-react-core";
import { PropertyMetadata } from "igniteui-react-core";
import { DeviceUtils } from "igniteui-react-core";
import { isNaN_, isInfinity } from "igniteui-react-core";
import { NumericMarkerManager } from "./NumericMarkerManager";
import { DataTemplateMeasureInfo } from "igniteui-react-core";
import { Size } from "igniteui-react-core";
import { DataTemplatePassInfo } from "igniteui-react-core";
import { DataTemplateRenderInfo } from "igniteui-react-core";
import { MarkerVisualData } from "./MarkerVisualData";
import { stringIsNullOrEmpty } from "igniteui-react-core";
/**
 * @hidden
 */
var ScatterPolygonSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(ScatterPolygonSeries, _super);
    function ScatterPolygonSeries() {
        var _this = _super.call(this) || this;
        _this.rb = null;
        _this.q8 = new ScalerParams(1, ScatterPolygonSeries.sg, ScatterPolygonSeries.sg, false);
        _this.q9 = new ScalerParams(1, ScatterPolygonSeries.sg, ScatterPolygonSeries.sg, false);
        _this.q3 = 1;
        _this.qz = 1;
        _this.ab = ScatterPolygonSeries.$;
        return _this;
    }
    ScatterPolygonSeries.prototype.pi = function () {
        return this.rd();
    };
    ScatterPolygonSeries.prototype.qh = function (a) {
        var _this = this;
        var b = a;
        b.cv(this.si);
        b.cw(this.rc);
        _super.prototype.qh.call(this, a);
        if (this.cp(a)) {
            return;
        }
        var c, d;
        var e = a.getViewInfo(c, d);
        c = e.p0;
        d = e.p1;
        var f = this.getEffectiveViewport1(a);
        this.q8 = new ScalerParams(1, d, c, this.oq.ca);
        this.q8.c = f;
        this.q9 = new ScalerParams(1, d, c, this.os.ca);
        this.q9.c = f;
        if (c.width < 1 || c.height < 1) {
            return;
        }
        this.rb = ((function () {
            var $ret = new ShapeAxisInfoCache();
            $ret.a = _this.oq;
            $ret.b = _this.os;
            $ret.e = _this.oq.ca;
            $ret.f = _this.os.ca;
            $ret.d = _this.cd;
            $ret.c = _this.o0;
            return $ret;
        })());
        if (this.rd()) {
            var g = new Dictionary$2(Base.$, OwnedPoint.$, 0);
            b.dd.l(g, 400, d, c, this.fq);
            b.dd.j(g, false);
            if (this.pg()) {
                this.ru(a);
            }
        }
    };
    ScatterPolygonSeries.prototype.ru = function (a) {
        var _this = this;
        a.dh = true;
        this.ox.aw(this, this.pg(), runOn(this, this.of));
        var b = this.ox.d;
        var c = b != null;
        var d = this.getEffectiveViewport1(a);
        var e = this.cd == null ? 0 : this.cd.count;
        a.dq(function (f) {
            if (f._visibility == 0) {
                var g = f.ak;
                var h = f.content;
                if (h == null) {
                    h = new DataContext();
                    f.content = h;
                }
                if (c) {
                    _this.qc(g, e, a.q);
                }
                _this.ox.ac(f, h);
            }
        });
    };
    ScatterPolygonSeries.prototype.rd = function () {
        return this.rw != null && ((this.q7 != 1 && this.q7 != 0) || this.rx != null);
    };
    ScatterPolygonSeries.prototype.bp = function () {
        return new ScatterPolygonSeriesView(this);
    };
    ScatterPolygonSeries.prototype.kk = function (a) {
        _super.prototype.kk.call(this, a);
        this.ra = a;
    };
    ScatterPolygonSeries.prototype.get_hasMarkers = function () {
        return true;
    };
    ScatterPolygonSeries.prototype.ne = function () {
        return this.sc;
    };
    ScatterPolygonSeries.prototype.nf = function () {
        return this.sd;
    };
    ScatterPolygonSeries.prototype.lu = function () {
        return this.rw;
    };
    ScatterPolygonSeries.prototype.fc = function () {
        return this.rf;
    };
    Object.defineProperty(ScatterPolygonSeries.prototype, "q4", {
        get: function () {
            return this.q3;
        },
        set: function (a) {
            this.q3 = a;
        },
        enumerable: true,
        configurable: true
    });
    ScatterPolygonSeries.prototype.q6 = function () {
        if (this.q5 == 0) {
            return 1;
        }
        return this.q5;
    };
    ScatterPolygonSeries.prototype.lj = function (a) {
        _super.prototype.lj.call(this, a);
        this.q5 = a;
    };
    Object.defineProperty(ScatterPolygonSeries.prototype, "q0", {
        get: function () {
            return this.qz;
        },
        set: function (a) {
            this.qz = a;
        },
        enumerable: true,
        configurable: true
    });
    ScatterPolygonSeries.prototype.q2 = function () {
        if (this.q1 == 0) {
            return 1;
        }
        return this.q1;
    };
    ScatterPolygonSeries.prototype.li = function (a) {
        _super.prototype.li.call(this, a);
        this.q1 = a;
    };
    ScatterPolygonSeries.prototype.lg = function () {
        _super.prototype.lg.call(this);
        if (this.rx != null) {
            this.ra.dp();
        }
        else {
            var a = MarkerSeries.oj(this, this.q7);
            var b = MarkerSeries.os(a);
            if (b == null) {
                this.rw = MarkerSeries.o6;
            }
            else {
                this.ra.dl(b);
            }
        }
        if (this.se != null) {
            this.ra.dm();
        }
        else {
            if (this.q7 == 13) {
                this.sc = this.bs.bq();
            }
            else {
                if (this.q0 != 2) {
                    if (this.b6 != null) {
                        var c = this.b6.oa(this.gi);
                        if (!isNaN_(this.et) && this.et != 1) {
                            c = BrushUtil.n(c, this.et);
                        }
                        this.sc = c;
                    }
                    else {
                        this.sc = null;
                    }
                }
            }
        }
        if (this.sf != null) {
            this.ra.dn();
        }
        else {
            if (this.q7 == 13) {
                this.sd = this.bs.bq();
            }
            else {
                if (this.q5 == 2) {
                    this.sd = this.sc;
                }
                else {
                    this.sd = this.b6 == null ? null : this.b6.ob(this.gi);
                }
            }
        }
        if (this.q0 == 2 && this.se == null && this.q7 != 13) {
            if (this.sd != null) {
                var d = this.sd;
                if (!isNaN_(this.et) && this.et != 1) {
                    d = BrushUtil.n(d, this.et);
                }
                this.sc = d;
            }
            else {
                this.sc = null;
            }
        }
    };
    ScatterPolygonSeries.prototype.kf = function () {
        _super.prototype.kf.call(this);
        this.q4 = this.q6();
        this.q0 = this.q2();
    };
    ScatterPolygonSeries.prototype.kp = function (a, b, c, d) {
        _super.prototype.kp.call(this, a, b, c, d);
        switch (b) {
            case ScatterPolygonSeries.$$p[3]:
            case ScatterPolygonSeries.$$p[11]:
            case ScatterPolygonSeries.$$p[7]:
            case ScatterPolygonSeries.$$p[9]:
            case ScatterPolygonSeries.$$p[10]:
                this.lg();
                this.k3(false);
                break;
            case ScatterPolygonSeries.$$p[6]:
                this.q4 = this.q6();
                this.lg();
                this.k3(false);
                break;
            case ScatterPolygonSeries.$$p[5]:
                this.q0 = this.q2();
                this.lg();
                this.k3(false);
                break;
            case ScatterPolygonSeries.$$p[2]:
                if (c == MarkerSeries.o6 || d == MarkerSeries.o6 || (c == null || d != null)) {
                    this.ra.dr();
                    this.k3(false);
                }
                this.k3(false);
                this.ka();
                break;
            case ScatterPolygonSeries.$$p[12]:
                this.ra.cv(this.si);
                this.k3(false);
                this.ka();
                break;
            case ScatterPolygonSeries.$$p[13]:
                this.ra.cw(this.rc);
                this.k3(false);
                this.ka();
                break;
            case ScatterPolygonSeries.$$p[4]:
                this.k3(false);
                this.ka();
                break;
        }
    };
    ScatterPolygonSeries.prototype.as = function (a, b) {
        var c = this.ra.b1(a);
        var d = null;
        if (c != null) {
            d = c.content;
        }
        if (d != null) {
            return d;
        }
        return _super.prototype.as.call(this, a, b);
    };
    ScatterPolygonSeries.prototype.rv = function (a, b) {
        var e_1, _a, e_2, _b;
        var c = new List$1(Base.$, 0);
        try {
            for (var _c = tslib_1.__values(fromEnum(b.c)), _d = _c.next(); !_d.done; _d = _c.next()) {
                var d = _d.value;
                if (!a.containsKey(d)) {
                    c.add1(d);
                }
            }
        }
        catch (e_1_1) {
            e_1 = { error: e_1_1 };
        }
        finally {
            try {
                if (_d && !_d.done && (_a = _c.return))
                    _a.call(_c);
            }
            finally {
                if (e_1)
                    throw e_1.error;
            }
        }
        try {
            for (var _e = tslib_1.__values(fromEnum(c)), _f = _e.next(); !_f.done; _f = _e.next()) {
                var e = _f.value;
                b.h(e);
            }
        }
        catch (e_2_1) {
            e_2 = { error: e_2_1 };
        }
        finally {
            try {
                if (_f && !_f.done && (_b = _e.return))
                    _b.call(_e);
            }
            finally {
                if (e_2)
                    throw e_2.error;
            }
        }
    };
    ScatterPolygonSeries.prototype.ct = function (a, b, c) {
        var _this = this;
        if (!this.hasMarkers) {
            return false;
        }
        var d = this.oq;
        var e = new ScalerParams(1, this.b6.os, this.n6, d.ca);
        e.c = this.getEffectiveViewport1(this.bs);
        var f = this.os;
        var g = new ScalerParams(1, this.b6.os, this.n6, f.ca);
        g.c = this.getEffectiveViewport1(this.bs);
        a.clear();
        this.ra.dq(function (h) {
            if (h._visibility == 0) {
                var i = new SeriesPointOfInterest();
                var j = h.n;
                var k = h.o;
                if (j < _this.n6.left || j > _this.n6.right || k < _this.n6.top || k > _this.n6.bottom) {
                    return;
                }
                i.b = d.d2(j, e);
                i.c = f.d2(k, g);
                i.a = h.content;
                a.add(i);
            }
        });
        return true;
    };
    ScatterPolygonSeries.prototype.qx = function (a, b, c, d, e) {
        var _this = this;
        if (c == null || c.length != this.rb.d.count) {
            c = new Array(this.rb.d.count);
            for (var f = 0; f < this.rb.d.count; f++) {
                c[f] = PointUtil.create();
            }
        }
        var g = ((function () {
            var $ret = new ScalerParams(1, d, e, _this.oq.ca);
            $ret.c = _this.getEffectiveViewport1(a);
            return $ret;
        })());
        var h = ((function () {
            var $ret = new ScalerParams(1, d, e, _this.os.ca);
            $ret.c = _this.getEffectiveViewport1(a);
            return $ret;
        })());
        var i = this.ny(a);
        var j = this.rb.a.d2(i.left, g);
        var k = this.rb.a.d2(i.right, g);
        var l = this.rb.b.d2(i.bottom, h);
        var m = this.rb.b.d2(i.top, h);
        if (this.rb.e) {
            var n = j;
            j = k;
            k = n;
        }
        if (this.rb.f) {
            var o = l;
            l = m;
            m = o;
        }
        var p = this.rb;
        var q = p.a;
        var r = p.b;
        var s;
        var t;
        var u = g.d.left;
        var v = g.d.right;
        var w = h.d.top;
        var x = h.d.bottom;
        for (var y = 0; y < this.rb.d.count; y++) {
            s = 0;
            t = 0;
            var z = null;
            var aa = a.b9.tryGetValue(y, z);
            z = aa.p1;
            if (z == null) {
                c[y].x = NaN;
                c[y].y = NaN;
            }
            else {
                var ab = z.c;
                var ac = RectUtil.l(ab);
                s = ac.x;
                t = ac.y;
                if (s >= u && s <= v && t >= w && t <= x) {
                    c[y].x = s;
                    c[y].y = t;
                }
                else {
                    c[y].x = NaN;
                    c[y].y = NaN;
                }
            }
        }
        return c;
    };
    ScatterPolygonSeries.prototype.re = function (a, b) {
        var e_3, _a;
        if (b == null) {
            b = new List$1(Number_$type, 2, a.e);
        }
        else {
            b.clear();
        }
        var c = 0;
        var d = this.cd;
        try {
            for (var _b = tslib_1.__values(fromEnum(a.c)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var e = _c.value;
                b.add(d.indexOf(e));
                c++;
            }
        }
        catch (e_3_1) {
            e_3 = { error: e_3_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_3)
                    throw e_3.error;
            }
        }
        return b;
    };
    ScatterPolygonSeries.$t = markType(ScatterPolygonSeries, 'ScatterPolygonSeries', ShapeSeriesBase.$);
    ScatterPolygonSeries.sg = new Rect(0, 0, 0, 1, 1);
    ScatterPolygonSeries.$$p = markDep(DependencyProperty, PropertyMetadata, ScatterPolygonSeries, 'raisePropertyChanged', ['ActualMarkerBrush:sc:ry', [Brush.$], 'ActualMarkerOutline:sd:rz', [Brush.$], 'ActualMarkerTemplate:rw:r0', [DataTemplate.$, null], 'MarkerBrush:se:r1', [Brush.$], 'MarkerCollisionAvoidance:qy:r2', [CollisionAvoidanceType_$type, enumGetBox(CollisionAvoidanceType_$type, 0)], 'MarkerFillMode:q1:r3', [MarkerFillMode_$type, enumGetBox(MarkerFillMode_$type, 0)], 'MarkerOutlineMode:q5:r4', [MarkerOutlineMode_$type, enumGetBox(MarkerOutlineMode_$type, 0)], 'MarkerOutline:sf:r5', [Brush.$], 'MarkerStyle:sh:r6', [Style.$], 'MarkerTemplate:rx:r7', [DataTemplate.$, null], 'MarkerThickness:rf:r8', [1, DeviceUtils.g(2)], 'MarkerType:q7:r9', [MarkerType_$type, enumGetBox(MarkerType_$type, 1)], 'ShapeStyle:si:sa', [Style.$, null], 'ShapeStyleSelector:rc:sb', [StyleSelector.$, null]]);
    return ScatterPolygonSeries;
}(ShapeSeriesBase));
export { ScatterPolygonSeries };
/**
 * @hidden
 */
var ScatterPolygonSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(ScatterPolygonSeriesView, _super);
    function ScatterPolygonSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.dh = false;
        _this.c8 = null;
        _this.dj = null;
        _this.de = null;
        _this.dc = null;
        _this.dg = false;
        _this.df = null;
        _this.dk = null;
        _this.c9 = new Marker();
        _this.dy = null;
        _this.c9 = new Marker();
        _this.c9.content = new DataContext();
        _this.de = a;
        _this.df = new HashPool$2(Base.$, Marker.$);
        _this.dk = new List$1(Marker.$, 0);
        _this.ds(_this.df);
        _this.dc = new NumericMarkerManager(1, function (b) { return _this.df.item(b); }, function (b) { return _this.de.rb.d.item(b); }, runOn(_this, _this.dw), runOn(_this, _this.c7), runOn(_this, _this.di), function () { return _this.de.qy; });
        _this.dc.q = runOn(_this, _this.dz);
        return _this;
    }
    ScatterPolygonSeriesView.prototype.as = function () {
        _super.prototype.as.call(this);
        if (!this.q) {
            this.e.bx = 8;
        }
    };
    Object.defineProperty(ScatterPolygonSeriesView.prototype, "dd", {
        get: function () {
            return this.dc;
        },
        enumerable: true,
        configurable: true
    });
    ScatterPolygonSeriesView.prototype.dw = function (a) {
        this.de.rv(a, this.df);
    };
    ScatterPolygonSeriesView.prototype.c7 = function () {
        this.c8 = this.de.qx(this, this.df, this.c8, this.bv, this.bu);
        return this.c8;
    };
    ScatterPolygonSeriesView.prototype.di = function () {
        this.dj = this.de.re(this.df, this.dj);
        return this.dj;
    };
    ScatterPolygonSeriesView.prototype.c2 = function (a, b) {
        return this.c3(a, b, true);
    };
    ScatterPolygonSeriesView.prototype.cj = function (a, b, c) {
        _super.prototype.cj.call(this, a, b, c);
        ShapeSeriesViewBase.ci(this, a, b);
    };
    ScatterPolygonSeriesView.prototype.ch = function (a, b) {
        var c = a;
        if (c == null) {
            return;
        }
        c.ak = b;
    };
    ScatterPolygonSeriesView.prototype.dq = function (a) {
        this.df.f(a);
    };
    ScatterPolygonSeriesView.prototype.ds = function (a) {
        a.create = runOn(this, this.db);
        a.destroy = runOn(this, this.du);
        a.activate = runOn(this, this.dt);
        a.disactivate = runOn(this, this.dv);
    };
    ScatterPolygonSeriesView.prototype.db = function () {
        var _this = this;
        var a = new Marker();
        if (!this.dg) {
            a.content = ((function () {
                var $ret = new DataContext();
                $ret.series = _this.e;
                return $ret;
            })());
        }
        a.ah = this.e.rw;
        this.dk.add(a);
        return a;
    };
    ScatterPolygonSeriesView.prototype.b1 = function (a) {
        var b = this.da(a, 0);
        if (b == null) {
            b = this.da(a, 3);
        }
        return b;
    };
    ScatterPolygonSeriesView.prototype.da = function (a, b) {
        var c;
        var d;
        var e;
        var f;
        for (var g = this.dk.count - 1; g >= 0; g--) {
            var h = this.dk._inner[g];
            if (h._visibility == 1 || h._opacity == 0) {
                continue;
            }
            c = (h.m / 2) + b;
            d = (h.l / 2) + b;
            e = h.ai;
            f = h.aj;
            if ((h.n + e) - c <= a.x && (h.n + e) + c >= a.x && (h.o + f) - d <= a.y && (h.o + f) + d >= a.y) {
                return h;
            }
        }
        return null;
    };
    ScatterPolygonSeriesView.prototype.du = function (a) {
        a.content = null;
        this.dk.remove(a);
    };
    ScatterPolygonSeriesView.prototype.dt = function (a) {
        a._visibility = 0;
    };
    ScatterPolygonSeriesView.prototype.dv = function (a) {
        if (a.content != null) {
            (typeCast(DataContext.$, a.content)).item = null;
        }
        a._visibility = 1;
    };
    ScatterPolygonSeriesView.prototype.dx = function (a) {
        this.dg = a;
    };
    ScatterPolygonSeriesView.prototype.bh = function (a, b) {
        _super.prototype.bh.call(this, a, b);
        if (!this.dh) {
            var c = a;
            var d = c.content;
            if (d != null) {
                if (this.de.sc != null) {
                    d.actualItemBrush = this.de.sc;
                }
                else {
                    d.actualItemBrush = this.b3.m9;
                }
                if (this.de.sc != null) {
                    d.outline = this.de.sd;
                }
                else {
                    d.outline = this.b3.na;
                }
                d.thickness = this.de.rf;
            }
        }
    };
    ScatterPolygonSeriesView.prototype.bi = function (a, b) {
        _super.prototype.bi.call(this, a, b);
        var c = a;
        this.c9._visibility = c._visibility;
        this.c9.ah = c.ah;
        this.c9.width = c.width;
        this.c9.height = c.height;
        this.c9.m = c.m;
        this.c9.l = c.l;
        this.c9.n = c.n;
        this.c9.o = c.o;
        var d = this.bp(b);
        var e = this.c9.content;
        var f = c.content;
        e.item = f.item;
        e.series = f.series;
        e.thickness = f.thickness;
        if (e != null) {
            e.actualItemBrush = d;
            e.outline = d;
            e.thickness = this.de.rf + 3;
        }
    };
    ScatterPolygonSeriesView.prototype.a5 = function (a, b) {
        _super.prototype.a5.call(this, a, b);
        var c = new DataTemplatePassInfo();
        c.isHitTestRender = b;
        c.context = a.g();
        c.viewportTop = this.bu.top;
        c.viewportLeft = this.bu.left;
        c.viewportWidth = this.bu.width;
        c.viewportHeight = this.bu.height;
        c.passID = "Markers";
        var d = new DataTemplateRenderInfo();
        d.passInfo = c;
        d.isHitTestRender = b;
        var e = new DataTemplateMeasureInfo();
        e.passInfo = c;
        var f = false;
        var g = a.g();
        e.context = g;
        d.context = g;
        var h = 0;
        var i = 0;
        if (this.de.rw != null && this.de.rw.passStarting != null) {
            this.de.rw.passStarting(c);
        }
        for (var j = 0; j < this.dk.count; j++) {
            var k = this.dk._inner[j];
            if (k._visibility == 1) {
                continue;
            }
            this.bg(k, j, b);
            if (b) {
                k = this.c9;
            }
            if (!f) {
                e.width = k.width;
                e.height = k.height;
                e.renderOffsetX = 0;
                e.renderOffsetY = 0;
                e.renderContext = a;
                var l = k.ah;
                if (l.measure != null) {
                    e.data = k.content;
                    l.measure(e);
                    f = e.isConstant;
                    if (f) {
                        h = e.width;
                        i = e.height;
                    }
                }
                d.availableWidth = e.width;
                d.availableHeight = e.height;
                d.renderOffsetX = e.renderOffsetX;
                d.renderOffsetY = e.renderOffsetY;
                d.renderContext = a;
            }
            else {
                d.availableWidth = h;
                d.availableHeight = i;
            }
            if (!isNaN_(k.width) && !isInfinity(k.width)) {
                d.availableWidth = k.width;
            }
            if (!isNaN_(k.height) && !isInfinity(k.height)) {
                d.availableHeight = k.height;
            }
            a.p(d, k);
            k.m = d.availableWidth;
            k.l = d.availableHeight;
            k.ai = d.renderOffsetX;
            k.aj = d.renderOffsetY;
        }
        if (this.de.rw != null && this.de.rw.passCompleted != null) {
            this.de.rw.passCompleted(c);
        }
    };
    ScatterPolygonSeriesView.prototype.dp = function () {
        this.de.rw = null;
        this.de.rw = this.de.rx;
    };
    ScatterPolygonSeriesView.prototype.dm = function () {
        this.de.sc = null;
        if (!isNaN_(this.e.et) && this.e.et != 1) {
            var a = BrushUtil.n(this.de.se, this.e.et);
            this.de.sc = a;
        }
        else {
            this.de.sc = this.de.se;
        }
    };
    ScatterPolygonSeriesView.prototype.dn = function () {
        this.de.sd = null;
        this.de.sd = this.de.sf;
    };
    ScatterPolygonSeriesView.prototype.dl = function (a) {
        switch (a) {
            case "CircleMarkerTemplate":
                this.de.rw = this.de.b6.me;
                break;
            case "TriangleMarkerTemplate":
                this.de.rw = this.de.b6.mn;
                break;
            case "PyramidMarkerTemplate":
                this.de.rw = this.de.b6.mk;
                break;
            case "SquareMarkerTemplate":
                this.de.rw = this.de.b6.ml;
                break;
            case "DiamondMarkerTemplate":
                this.de.rw = this.de.b6.mf;
                break;
            case "PentagonMarkerTemplate":
                this.de.rw = this.de.b6.mi;
                break;
            case "HexagonMarkerTemplate":
                this.de.rw = this.de.b6.mg;
                break;
            case "TetragramMarkerTemplate":
                this.de.rw = this.de.b6.mi;
                break;
            case "PentagramMarkerTemplate":
                this.de.rw = this.de.b6.mj;
                break;
            case "HexagramMarkerTemplate":
                this.de.rw = this.de.b6.mh;
                break;
        }
    };
    ScatterPolygonSeriesView.prototype.dr = function () {
        var e_4, _a;
        try {
            for (var _b = tslib_1.__values(fromEnum(this.dk)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var a = _c.value;
                a.ah = this.de.rw;
            }
        }
        catch (e_4_1) {
            e_4 = { error: e_4_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_4)
                    throw e_4.error;
            }
        }
        this.aq();
    };
    ScatterPolygonSeriesView.prototype.dz = function (a) {
        if (this.dy == null) {
            this.dy = new DataTemplateMeasureInfo();
            this.dy.context = this.k.g();
        }
        this.dy.width = a.width;
        this.dy.height = a.height;
        this.dy.data = a.content;
        var b = a.ah;
        if (b.measure != null) {
            b.measure(this.dy);
        }
        return new Size(1, this.dy.width, this.dy.height);
    };
    ScatterPolygonSeriesView.prototype.al = function (a) {
        var e_5, _a;
        var b = a;
        _super.prototype.al.call(this, b);
        try {
            for (var _b = tslib_1.__values(fromEnum(this.df.c)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var c = _c.value;
                var d = this.df.item(c);
                if (d._visibility != 1) {
                    var e = typeCast(ScatterPolygonSeries.$, this.e);
                    var f = this.e.a5.getMarkerVisualData(e, d, e.rw);
                    b.markerShapes.add(typeCast(MarkerVisualData.$, f));
                }
            }
        }
        catch (e_5_1) {
            e_5 = { error: e_5_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_5)
                    throw e_5.error;
            }
        }
    };
    ScatterPolygonSeriesView.prototype.getDefaultTooltipTemplate = function () {
        var a = "<div class='ui-chart-default-tooltip-content'><span";
        var b = this.e.a3.a$r(this.e);
        if (!stringIsNullOrEmpty(b)) {
            a += " style='color:" + b + "'";
        }
        a += ">" + this.de.gy + "</span><br/>";
        a += "</div>";
        return a;
    };
    ScatterPolygonSeriesView.$t = markType(ScatterPolygonSeriesView, 'ScatterPolygonSeriesView', ShapeSeriesViewBase.$);
    return ScatterPolygonSeriesView;
}(ShapeSeriesViewBase));
export { ScatterPolygonSeriesView };
//# sourceMappingURL=ScatterPolygonSeries_combined.js.map
