UNPKG

igniteui-webcomponents-charts

Version:

Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.

1,830 lines 62 kB
/*
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 { Series } from "./Series";
import { ISupportsFillScale_$type } from "./ISupportsFillScale";
import { DependencyProperty } from "igniteui-webcomponents-core";
import { BrushScale } from "./BrushScale";
import { HighlightingInfo } from "igniteui-webcomponents-core";
import { ShapeItemSearchMode_$type } from "./ShapeItemSearchMode";
import { IEnumerable$1_$type, String_$type, enumGetBox, Number_$type, Point_$type, typeCast, runOn, delegateCombine, fromEnum, Array_$type, markType, markDep } from "igniteui-webcomponents-core";
import { NumericXAxis } from "./NumericXAxis";
import { NumericYAxis } from "./NumericYAxis";
import { List$1 } from "igniteui-webcomponents-core";
import { Rect } from "igniteui-webcomponents-core";
import { StyleShapeEventArgs } from "./StyleShapeEventArgs";
import { FrameworkElement } from "igniteui-webcomponents-core";
import { IFastItemsSource_$type } from "igniteui-webcomponents-core";
import { DataContext } from "igniteui-webcomponents-core";
import { Tuple$2 } from "igniteui-webcomponents-core";
import { ShapeHitRegion } from "./ShapeHitRegion";
import { RectUtil } from "igniteui-webcomponents-core";
import { Tuple$3 } from "igniteui-webcomponents-core";
import { GeometryUtil } from "igniteui-webcomponents-core";
import { AssigningShapeStyleEventArgs } from "./AssigningShapeStyleEventArgs";
import { AssigningShapeMarkerStyleEventArgs } from "./AssigningShapeMarkerStyleEventArgs";
import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
import { CustomPaletteBrushScale } from "./CustomPaletteBrushScale";
import { ValueBrushScale } from "./ValueBrushScale";
import { PointCollectionUtil } from "igniteui-webcomponents-core";
import { FlattenedShape } from "./FlattenedShape";
import { SeriesView } from "./SeriesView";
import { Clipper } from "igniteui-webcomponents-core";
import { ScalerParams } from "./ScalerParams";
import { Dictionary$2 } from "igniteui-webcomponents-core";
import { ActualRange } from "./ActualRange";
import { SeriesRenderManager } from "./SeriesRenderManager";
import { PolySimplification } from "igniteui-webcomponents-core";
import { DefaultFlattener } from "./DefaultFlattener";
import { ChartSelection } from "./ChartSelection";
import { AxisRange } from "./AxisRange";
import { Style } from "igniteui-webcomponents-core";
import { PropertyMetadata } from "igniteui-webcomponents-core";
import { boxArray$1 } from "igniteui-webcomponents-core";
import { InvalidOperationException } from "igniteui-webcomponents-core";
import { isNaN_, truncate } from "igniteui-webcomponents-core";
import { FastItemObjectColumn } from "igniteui-webcomponents-core";
import { Path } from "igniteui-webcomponents-core";
import { Pool$1 } from "igniteui-webcomponents-core";
import { PointCollection } from "igniteui-webcomponents-core";
import { PathGeometry } from "igniteui-webcomponents-core";
import { PolyLineSegment } from "igniteui-webcomponents-core";
import { PathFigure } from "igniteui-webcomponents-core";
import { PolygonUtil } from "igniteui-webcomponents-core";
/**
 * @hidden
 */
export let ShapeSeriesBase = /*@__PURE__*/ (() => {
    class ShapeSeriesBase extends Series {
        constructor() {
            super();
            this.xy = null;
            this.x3 = false;
            this.x2 = false;
            this.xw = null;
            this.xx = null;
            this.xm = 1;
            this.w7 = null;
            this.w8 = null;
            this.assigningShapeStyle = null;
            this.assigningShapeMarkerStyle = null;
            this.xq = null;
            this.xz = null;
            this.xi = null;
            this.xk = null;
            this.yp = 0;
            this.yl = null;
            this.w4 = null;
            this.w6 = null;
            this.w5 = null;
            this.w3 = null;
            this.z9 = null;
            this.xg = null;
            this.xs = null;
            this.xb = null;
            this.ys = 0;
            this.styleShape = null;
            this.xq = new ShapeSeriesRenderManager();
            FastItemObjectColumn.m();
            this.ys = this.yr;
            this.z9 = Rect.empty;
        }
        o4() {
            super.o4();
            this.xj = null;
            this.xl = null;
        }
        ai() {
            return [this.xj, this.xl];
        }
        kr(a, b) {
            let c = this.nf(b);
            if (c == ShapeSeriesBase.$$p[9]) {
                return this.ks(a, b, this.zc);
            }
            return null;
        }
        mf(a) {
            let b = this.nf(a);
            if (b == ShapeSeriesBase.$$p[9]) {
                return this.zc;
            }
            return super.mf(a);
        }
        get x0() {
            return this.xy;
        }
        set x0(a) {
            if (this.xy != a) {
                let b = this.x0;
                this.xy = a;
                this.raisePropertyChanged("FillColumn", b, this.x0);
            }
        }
        get_ff() {
            return true;
        }
        get_ef() {
            return true;
        }
        xu(a, b, c) {
            if (this.dp == null) {
                return null;
            }
            let d = this.wc(b);
            let e = this.xr.df(d, false);
            let f = -1;
            if (e == null) {
                if (a != null) {
                    f = this.dp.indexOf(a);
                }
                else {
                    return null;
                }
            }
            else if (e.dataContext != null) {
                f = e.dataContext.c;
            }
            if (f == -1) {
                return null;
            }
            let g = new HighlightingInfo();
            g.i = this;
            g.g = f;
            g.f = f;
            g.c = false;
            if (c != null && c.g == g.g && c.f == g.f) {
                return c;
            }
            return g;
        }
        xv(a, b, c) {
            if (this.dp == null) {
                return null;
            }
            let d = this.xr.ch(this.wc(b));
            let e = -1;
            if (d == null) {
                if (a != null) {
                    e = this.dp.indexOf(a);
                }
                else {
                    return null;
                }
            }
            else {
                e = d.ak;
            }
            if (e == -1) {
                return null;
            }
            let f = new HighlightingInfo();
            f.i = this;
            f.g = e;
            f.f = e;
            f.c = false;
            f.d = true;
            if (c != null && c.g == f.g && c.f == f.f) {
                return c;
            }
            return f;
        }
        get xn() {
            return this.xm;
        }
        set xn(a) {
            let b = this.xm;
            this.xm = a;
            if (b != this.xm) {
                this.raisePropertyChanged("ActualItemSearchMode", enumGetBox(ShapeItemSearchMode_$type, b), enumGetBox(ShapeItemSearchMode_$type, this.xm));
            }
        }
        xo() {
            if (this.xp != 0) {
                return this.xp;
            }
            return 1;
        }
        is(a) {
            switch (this.xn) {
                case 1: return this.zi(a).c;
                case 2: return this.yq(a);
                case 3: return this.yq(a);
            }
            return -1;
        }
        zi(a) {
            let b = this.wc(a);
            let c = { $type: Point_$type, x: NaN, y: NaN };
            let d = this.xr.cr;
            if (d == null) {
                return new Tuple$2(Number_$type, Point_$type, -1, c);
            }
            let e = this.xr.ci(b, false, !this.x5);
            if (e != null) {
                c = RectUtil.l(e.d);
                return new Tuple$2(Number_$type, Point_$type, e.b, c);
            }
            let f = b.x;
            let g = b.y;
            if (this.dp == null || this.xj == null || this.xl == null || this.yl == null) {
                return new Tuple$2(Number_$type, Point_$type, -1, c);
            }
            if (this.dp.count > this.yv) {
                return new Tuple$2(Number_$type, Point_$type, -1, c);
            }
            let h = 1.7976931348623157E+308;
            let i = -1;
            for (let j = 0; j < d.count; j++) {
                let k = d._inner[j].d;
                let l = RectUtil.g(k, b);
                if (l < h) {
                    h = l;
                    i = d._inner[j].b;
                    c = RectUtil.l(d._inner[j].d);
                }
            }
            return new Tuple$2(Number_$type, Point_$type, i, c);
        }
        zh(a) {
            let b = this.wc(a);
            let c = b.x;
            let d = b.y;
            let e = { $type: Point_$type, x: NaN, y: NaN };
            if (this.dp == null || this.xj == null || this.xl == null || this.yl == null) {
                return new Tuple$3(Number_$type, Point_$type, Point_$type, -1, e, e);
            }
            if (this.dp.count > this.yv) {
                return new Tuple$3(Number_$type, Point_$type, Point_$type, -1, e, e);
            }
            let f = 1.7976931348623157E+308;
            let g = this.xr.cr;
            if (g == null) {
                return new Tuple$3(Number_$type, Point_$type, Point_$type, -1, e, e);
            }
            let h = this.xr.ci(b, false, !this.x5);
            if (h != null) {
                let i = RectUtil.l(h.d);
                let j = this.zg(b, h.a, this.x5);
                return new Tuple$3(Number_$type, Point_$type, Point_$type, h.b, j.d, i);
            }
            for (let k = 0; k < g.count; k++) {
                let l = g._inner[k].d;
                let m = RectUtil.g(l, b);
                let n = (l.width * l.width) + (l.height * l.height) + m;
                if (n <= f) {
                    f = n;
                }
            }
            let o = 1.7976931348623157E+308;
            let p = -1;
            for (let q = 0; q < g.count; q++) {
                let r = g._inner[q].d;
                let s = RectUtil.g(r, b);
                if (s < f) {
                    let t = this.zg(b, g._inner[q].a, this.x5);
                    if (t.c < o) {
                        o = t.c;
                        e = t.d;
                        p = q;
                    }
                }
            }
            if (p >= 0) {
                return new Tuple$3(Number_$type, Point_$type, Point_$type, g._inner[p].b, e, RectUtil.l(g._inner[p].d));
            }
            return new Tuple$3(Number_$type, Point_$type, Point_$type, -1, e, e);
        }
        get_x5() {
            return true;
        }
        get x5() {
            return this.get_x5();
        }
        zg(a, b, c) {
            let d = { $type: Point_$type, x: NaN, y: NaN };
            let e = 1.7976931348623157E+308;
            let f = { $type: Point_$type, x: NaN, y: NaN };
            let g = false;
            let h = -1;
            for (let i = 0; i < b.count; i++) {
                let j = b._inner[i];
                if (i >= 1) {
                    let k = GeometryUtil.h(a, d, j);
                    if (k < e) {
                        e = k;
                        g = true;
                        h = i;
                    }
                }
                d = j;
            }
            if (c) {
                let l = b._inner[0];
                let m = GeometryUtil.h(a, d, l);
                if (m < e) {
                    e = m;
                    let n = GeometryUtil.m(a, d, l);
                    f = { $type: Point_$type, x: d.x + (l.x - d.x) * n, y: d.y + (l.y - d.y) * n };
                    return new Tuple$2(Number_$type, Point_$type, e, f);
                }
            }
            if (g) {
                let o = b._inner[h - 1];
                let p = b._inner[h];
                let q = GeometryUtil.m(a, o, p);
                f = { $type: Point_$type, x: o.x + (p.x - o.x) * q, y: o.y + (p.y - o.y) * q };
            }
            return new Tuple$2(Number_$type, Point_$type, e, f);
        }
        yq(a) {
            return this.zh(a).c;
        }
        wh(a, b, c) {
            if (this.xj == null || this.xl == null || this.yl == null) {
                return { $type: Point_$type, x: NaN, y: NaN };
            }
            switch (this.xn) {
                case 1:
                    let d = this.zi(a);
                    return d.d;
                case 2:
                    let e = this.zh(a);
                    return e.e;
                case 3:
                    let f = this.zh(a);
                    return f.d;
            }
            return { $type: Point_$type, x: NaN, y: NaN };
        }
        ko(a) {
            let b = this.j4(a);
            if (this.dp != null && b >= 0 && b < this.dp.count) {
                return this.dp.item(b);
            }
            return null;
        }
        xt(a, b, c) {
            let d = new HighlightingInfo();
            d.i = this;
            d.g = 0;
            d.f = this.dp.count - 1;
            d.c = true;
            if (c != null && c.g == d.g && c.f == d.f) {
                return c;
            }
            return d;
        }
        dh(a, b, c) {
            if (this.ef && this.f0(this.by) && !c) {
                let d = this.xu(a, b, this.xw);
                this.xw = d;
                return d;
            }
            else {
                let e = this.xt(a, b, this.xw);
                this.xw = e;
                return e;
            }
        }
        di(a, b, c) {
            if (this.f0(this.by) && !c) {
                let d = this.xv(a, b, this.xx);
                this.xx = d;
                return d;
            }
            else {
                let e = this.xt(a, b, this.xx);
                e.d = true;
                this.xx = e;
                return e;
            }
        }
        yj() {
            return (this.assigningShapeStyle != null && this.x3) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1) || (this.x0 != null && this.xf != null);
        }
        yi() {
            return (this.assigningShapeMarkerStyle != null && this.x2) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1);
        }
        get y3() {
            return this.c(ShapeSeriesBase.zz);
        }
        set y3(a) {
            this.h(ShapeSeriesBase.zz, a);
        }
        gc() {
            return this.highlightedItemsSource != null || this.y3 != null;
        }
        hu() {
            let a = super.hu();
            {
                let b = ((() => {
                    let $ret = new SeriesLayerPropertyOverlay();
                    $ret.ad = "ShapeMemberPath";
                    $ret.p = true;
                    $ret.y = "HighlightedShapeMemberPath";
                    $ret.q = true;
                    return $ret;
                })());
                b.valueResolving = delegateCombine(b.valueResolving, runOn(this, this.zl));
                a.add(b);
            }
            {
                let c = ((() => {
                    let $ret = new SeriesLayerPropertyOverlay();
                    $ret.r = true;
                    $ret.ad = "Brush";
                    $ret.p = true;
                    $ret.y = "ActualBrush";
                    $ret.q = true;
                    return $ret;
                })());
                c.valueResolving = delegateCombine(c.valueResolving, runOn(this, this.r4));
                a.add(c);
            }
            {
                let d = ((() => {
                    let $ret = new SeriesLayerPropertyOverlay();
                    $ret.r = true;
                    $ret.ad = "Outline";
                    $ret.p = true;
                    $ret.y = "ActualOutline";
                    $ret.q = true;
                    return $ret;
                })());
                d.valueResolving = delegateCombine(d.valueResolving, runOn(this, this.r4));
                a.add(d);
            }
            return a;
        }
        zl(a, b) {
            if (this.y3 != null) {
                b.value = this.y3;
                return;
            }
            b.value = this.zc;
        }
        get x1() {
            return this.xz;
        }
        set x1(a) {
            let b = this.x1 != a;
            if (b) {
                let c = this.x1;
                this.xz = a;
                this.raisePropertyChanged("ShapeColumn", c, this.x1);
            }
        }
        ya(array_) {
            let a = (Array.isArray(array_));
            return a;
        }
        static ye(a) {
            if (a == null) {
                return true;
            }
            let val_ = a;
            return (val_ == undefined);
        }
        convertToListList(a) {
            if (a == null) {
                return null;
            }
            let b = new List$1(List$1.$.specialize(Point_$type), 0);
            let c;
            let curr_;
            let d;
            let e;
            let f = false;
            let g = false;
            for (let h = 0; h < a.length; h++) {
                c = a[h];
                if (c == null) {
                    continue;
                }
                let i = new List$1(Point_$type, 0);
                for (let j = 0; j < c.length; j++) {
                    curr_ = c[j];
                    if (f) {
                        d = (curr_.X);
                        e = (curr_.Y);
                    }
                    else {
                        d = (curr_.x);
                        e = (curr_.y);
                    }
                    if (!g) {
                        if ((isNaN_(d) || ShapeSeriesBase.ye(d)) && (isNaN_(e) || ShapeSeriesBase.ye(e))) {
                            d = (curr_.X);
                            e = (curr_.Y);
                            if (!isNaN_(d) && !ShapeSeriesBase.ye(d) && !isNaN_(e) && !ShapeSeriesBase.ye(e)) {
                                g = true;
                                f = true;
                            }
                        }
                        else {
                            g = true;
                        }
                    }
                    i.add({ $type: Point_$type, x: d, y: e });
                }
                b.add(i);
            }
            return b;
        }
        dn(a) {
            if (this.dp != null && this.ya(this.itemsSource) && a != null && a.split('!').length != 2) {
                if (this.coercionMethods == null) {
                    this.coercionMethods = {};
                }
                let methods_ = this.coercionMethods;
                methods_.convertToListList = this.convertToListList;
                a += "!convertToListList";
            }
            return super.dn(a);
        }
        rc(a, b, c, d) {
            super.rc(a, b, c, d);
            let e = false;
            let f = false;
            switch (b) {
                case ShapeSeriesBase.$$p[5]:
                    this.xn = this.xo();
                    break;
                case "FastItemsSource":
                    let g = typeCast(IFastItemsSource_$type, c);
                    if (g != null) {
                        if (this.x0 != null) {
                            g.deregisterColumn(this.x0);
                        }
                        if (this.x1 != null) {
                            g.deregisterColumn(this.x1);
                        }
                        this.x1 = null;
                    }
                    let h = typeCast(IFastItemsSource_$type, d);
                    if (h != null) {
                        if (this.zc != null) {
                            this.x1 = this.dn(this.zc);
                        }
                        if (this.yz != null) {
                            this.x0 = this.dl(this.yz);
                        }
                    }
                    e = this.xj != null && !this.xj.c1();
                    f = this.xl != null && !this.xl.c1();
                    if (e || f) {
                        this.ru(this.gh && c != null);
                    }
                    break;
                case ShapeSeriesBase.$$p[9]:
                    if (this.dp != null) {
                        this.dp.deregisterColumn(this.x1);
                        this.x1 = this.dn(this.zc);
                    }
                    break;
                case "ShapeColumn":
                    this.zt();
                    e = this.xj != null && !this.xj.c1();
                    f = this.xl != null && !this.xl.c1();
                    if (e || f) {
                        this.ru(this.gh && this.d9);
                    }
                    this.qn();
                    break;
                case ShapeSeriesBase.$$p[10]:
                case ShapeSeriesBase.$$p[11]:
                    this.xi = this.xj;
                    this.xk = this.xl;
                    let i = c;
                    let j = d;
                    this.zu(i);
                    this.zm(j);
                    if ((j != null && !j.c1()) || (j == null && i != null)) {
                        this.ru(false);
                    }
                    this.qn();
                    break;
                case "ActualResolution":
                    this.yp = this.ie;
                    this.qn();
                    break;
                case "ActualBrush":
                    this.ru(false);
                    break;
                case ShapeSeriesBase.$$p[8]:
                    this.ys = this.yr;
                    this.ru(false);
                    this.qn();
                    break;
                case ShapeSeriesBase.$$p[2]:
                case "ActualThickness":
                    this.ru(false);
                    this.qn();
                    break;
                case ShapeSeriesBase.$$p[4]:
                    this.x3 = this.yh();
                    this.ru(false);
                    break;
                case ShapeSeriesBase.$$p[3]:
                    this.x2 = this.yg();
                    this.ru(false);
                    break;
                case ShapeSeriesBase.$$p[1]:
                    if (c != null) {
                        c.o.remove(this);
                        c.x();
                        this.xg = null;
                        this.xs = null;
                    }
                    if (d != null) {
                        d.o.add(this);
                        d.x();
                        this.xg = typeCast(CustomPaletteBrushScale.$, d);
                        this.xs = typeCast(ValueBrushScale.$, d);
                    }
                    this.ru(false);
                    this.qn();
                    break;
                case "FillColumn":
                    this.ru(this.gh && this.d9);
                    this.qn();
                    break;
                case ShapeSeriesBase.$$p[0]:
                    if (this.xf != null) {
                        this.xf.x();
                    }
                    if (this.dp != null) {
                        this.dp.deregisterColumn(this.x0);
                        this.x0 = this.dl(this.yz);
                    }
                    break;
            }
        }
        yh() {
            return this.yd;
        }
        yg() {
            return this.yc;
        }
        x7(a) {
            if (typeCast(NumericYAxis.$, a) !== null) {
                return true;
            }
            return false;
        }
        x6(a) {
            if (typeCast(NumericXAxis.$, a) !== null) {
                return true;
            }
            return false;
        }
        zt() {
            this.yl = null;
            if (this.x1 == null) {
                return;
            }
            this.yl = new List$1(Rect.$, 2, this.x1.count);
            for (let a = 0; a < this.x1.count; a++) {
                this.yl.add(PointCollectionUtil.j(this.x1.item(a)));
            }
        }
        aaa(a) {
            if (typeCast(IEnumerable$1_$type.specialize(IEnumerable$1_$type.specialize(Point_$type)), a) !== null) {
                return PointCollectionUtil.h(a);
            }
            else if (typeCast(IEnumerable$1_$type.specialize(Point_$type), a) !== null) {
                return PointCollectionUtil.g(a);
            }
            return Rect.empty;
        }
        yn(a, b, c, d, e, f, g) {
            return this.yo(a, b, c, d, e, f, g);
            if (typeCast(List$1.$.specialize(List$1.$.specialize(Point_$type)), c) !== null) {
                return this.yo(a, b, c, d, e, f, g);
            }
            else if (typeCast(IEnumerable$1_$type.specialize(IEnumerable$1_$type.specialize(Point_$type)), c) !== null) {
                let h = c;
                let i = new List$1(FlattenedShape.$, 0);
                let j = null;
                for (let k of fromEnum(h)) {
                    j = this.xh(a, b, PointCollectionUtil.b(k), d, e, f, g);
                    if (j == null) {
                        continue;
                    }
                    i.add(j);
                }
                return i;
            }
            else if (typeCast(IEnumerable$1_$type.specialize(Point_$type), c) !== null) {
                let l = c;
                let m = this.xh(a, b, PointCollectionUtil.b(l), d, e, f, g);
                let n = new List$1(FlattenedShape.$, 0);
                if (m != null) {
                    n.add(m);
                }
                return n;
            }
            else {
                throw new InvalidOperationException(1, "Unrecognized data in ShapeColumn");
            }
        }
        get_yb() {
            return true;
        }
        get yb() {
            return this.get_yb();
        }
        yk() {
            return false;
        }
        rv(a) {
            this.zs(this.cw);
        }
        rt(a, b, c, d, e) {
            super.rt(a, b, c, d, e);
            let f = this.ba.a$j.item(d);
            let g = f;
            f.bd(c);
            if (this.d7(f)) {
                return;
            }
            this.zs(f);
        }
        updateFillScaleGlobals() {
            let a = new ActualRange();
            a.b = NaN;
            a.a = NaN;
            if (this.x0 != null) {
                a.b = this.x0.minimum;
                a.a = this.x0.maximum;
            }
            if (this.xf != null) {
                this.xf.z(a.b, a.a);
            }
        }
        zs(a) {
            if (this.d7(a)) {
                return;
            }
            if (this.xf != null) {
                this.xb = this.xc();
            }
            let b;
            let c;
            let d = a;
            let e = a.getViewInfo(c, b);
            c = e.p0;
            b = e.p1;
            if (c.width < 1 || c.height < 1 || this.x1 == null) {
                return;
            }
            let f = this.xj;
            let g = this.xl;
            let h = this.getEffectiveViewport1(a);
            let i = new ScalerParams(1, b, c, f.ch);
            i.c = h;
            let j = new ScalerParams(1, b, c, g.ch);
            j.c = h;
            if (!this.gs) {
                d.c7();
                let k = new Rect(0, 0, 0, 0, 0);
                let l;
                let m;
                let n;
                let o;
                let p = this.x1.count;
                if (this.w6 == null || this.w6.length != p) {
                    this.w6 = new Array(p);
                    this.w4 = new Array(p);
                    this.w5 = new Array(p);
                    this.w3 = new Array(p);
                }
                let q = this.w6;
                let r = this.w4;
                let s = this.w5;
                let t = this.w3;
                let u;
                for (let v = 0; v < p; v++) {
                    u = this.yl._inner[v];
                    q[v] = u.top;
                    r[v] = u.left;
                    s[v] = u.right;
                    t[v] = u.bottom;
                }
                this.xi.hq(boxArray$1(r), 0, r.length, i);
                this.xi.hq(boxArray$1(s), 0, s.length, i);
                this.xk.hq(boxArray$1(q), 0, q.length, j);
                this.xk.hq(boxArray$1(t), 0, t.length, j);
                d.c8(r, q, s, t);
                let w = this.x1;
                let x = this.dp;
                this.zv(d);
                let y = c.left;
                let z = c.right;
                let aa = c.top;
                let ab = c.bottom;
                let ac = null;
                if (this.z9.isEmpty) {
                    ac = null;
                }
                else {
                    ac = new Clipper(1, this.z9.left, this.z9.bottom, this.z9.right, this.z9.top, this.yb);
                }
                let ad = this.yk();
                if (ad) {
                    d.cp.clear();
                }
                let ae = false;
                let af = true;
                let ag = 0;
                if (this.dc != null) {
                    if (this.dc.f8()) {
                        let ah = this.dc.nm(b, i);
                        ae = ah.c;
                        ag = ah.d;
                    }
                }
                let ai;
                for (let aj = 0; aj < p; aj++) {
                    n = r[aj];
                    l = q[aj];
                    m = t[aj];
                    o = s[aj];
                    k.x = Math.min(n, o);
                    k.y = Math.min(l, m);
                    k.width = Math.max(n, o) - k.x;
                    k.height = Math.max(l, m) - k.y;
                    if (k.intersectsWith(c)) {
                        if (k.x < y || k.y < aa || k.x > z || k.y > ab) {
                            ai = ac;
                        }
                        else {
                            ai = null;
                        }
                        let ak = this.yn(a, ai, w.item(aj), i, j, 0, ag);
                        if (ad) {
                            ShapeSeriesBase.zr(d, aj, ak);
                        }
                        d.cv(aj, x.item(aj), k, ak);
                    }
                    else if (ae) {
                        k.x = k.x + ag;
                        if (k.intersectsWith(c)) {
                            if (k.x < y || k.y < aa || k.x > z || k.y > ab) {
                                ai = ac;
                            }
                            else {
                                ai = null;
                            }
                            let al = this.yn(a, ai, w.item(aj), i, j, ag, ag);
                            if (ad) {
                                ShapeSeriesBase.zr(d, aj, al);
                            }
                            d.cv(aj, x.item(aj), k, al);
                        }
                    }
                }
                d.c6();
            }
            let am = this.yj();
            this.xq.az(this, this.yj(), runOn(this, this.w9));
            let an = false;
            let ao = this.xq.b;
            if (ao != null) {
                an = true;
            }
            let ap = a.t;
            let aq = this.fz;
            let ar = d.cn;
            d.c2((as) => {
                let at = as.dataContext != null ? as.dataContext.item : null;
                let au = as.dataContext != null ? as.dataContext.c : -1;
                d.cz(as, at, am);
                if (an) {
                    this.zo(as, aq, au, this.x1.count, ap, ar);
                }
                else {
                    if (ar) {
                        {
                            this.xq.a1(as, this.ic, ar);
                        }
                    }
                }
                {
                    this.xq.ad(as, false, false, false, false);
                }
            });
        }
        xc() {
            let a = new ActualRange();
            a.b = NaN;
            a.a = NaN;
            if (this.x0 != null) {
                a.b = this.x0.minimum;
                a.a = this.x0.maximum;
            }
            let b = typeCast(ValueBrushScale.$, this.xf);
            if (b != null) {
                b.s();
                if (this.x8 && this.xf.o.count > 1) {
                    a.b = b.q;
                    a.a = b.p;
                }
            }
            return a;
        }
        zo(a, b, c, d, e, f) {
            let g = this.by != 1;
            let h = this.cq != 1;
            let i = this.cp != 1;
            this.xq.a0(this.xq.b, c, d, false);
            {
                this.xq.a1(a, this.ic, f);
            }
            let j = this.xq.ax;
            let k = null;
            let l = null;
            let m = null;
            let n = this.dp;
            if (this.x0 != null && this.xf != null) {
                if (j.z >= 0 && j.z < this.x0.count) {
                    let o = this.x0.item(j.z);
                    let p = this.xb;
                    let q = p.b;
                    let r = p.a;
                    let s = j.aa;
                    if (this.xg != null) {
                        s = this.xg.getBrush1(j.z, this.x0.count);
                    }
                    else if (this.xs != null && this.x0 != null) {
                        let t = this.x0.item(j.z);
                        s = this.xs.getBrushByRange(t, q, r);
                    }
                    else if (this.xf != null) {
                        s = this.xf.getBrush(j.z);
                    }
                    j.aa = s;
                }
            }
            if (g && this.dc != null) {
                k = this.dc.dn.getHighlightingInfo(this, n, j.z, j.y, false);
                j.c = k;
            }
            if (h && this.dc != null) {
                l = this.dc.dp.getHighlightingInfo(this, n, j.z, j.y, false);
                if (l == null && this.bo != null) {
                    l = this.dc.dp.getHighlightingInfo(this.bo, this.bo.dp, j.z, j.y, false);
                }
                if (l == null && this.bl != null) {
                    l = this.dc.dp.getHighlightingInfo(this.bl, this.bl.dp, j.z, j.y, true);
                }
                j.d = l;
            }
            if (i && this.dc != null) {
                m = this.dc.dm.getHighlightingInfo(this, n, j.z, j.y, false);
                j.b = m;
            }
            j.h = e;
            this.zq(j);
            this.xq.z(this, k, l, m, e, g, h, i, false);
        }
        zn(a, b, c) {
            let d = this.by != 1;
            let e = this.cq != 1;
            let f = this.cp != 1;
            this.xq.a0(this.xq.d, a, b, true);
            this.xq.aa(this.ic);
            let g = this.xq.aw;
            let h = null;
            let i = null;
            let j = null;
            let k = this.dp;
            let l = null;
            let m = null;
            let n = null;
            if (d && this.dc != null) {
                h = this.dc.dn.getHighlightingInfo(this, k, g.z, g.y, true);
                if (this.dc.dn.isCrossContextHighlight(this)) {
                    l = this.dc.dn.getHighlightingInfo(this, k, g.z, g.y, true);
                }
                g.c = h;
            }
            if (e && this.dc != null) {
                i = this.dc.dp.getHighlightingInfo(this, k, g.z, g.y, true);
                if (i == null && this.bo != null) {
                    i = this.dc.dp.getHighlightingInfo(this.bo, this.bo.dp, g.z, g.y, true);
                }
                if (this.dc.dp.isCrossContextHighlight(this)) {
                    m = this.dc.dp.getHighlightingInfo(this, k, g.z, g.y, true);
                }
                g.d = i;
            }
            if (f && this.dc != null) {
                j = this.dc.dm.getHighlightingInfo(this, k, g.z, g.y, true);
                if (this.dc.dm.isCrossContextHighlight(this)) {
                    n = this.dc.dm.getHighlightingInfo(this, k, g.z, g.y, true);
                }
                g.b = i;
            }
            g.h = c;
            this.zp(g);
            this.xq.y(this, h, i, j, c, d, e, f, g.v, this.dc.dn.totalHighWaterMark, g.x, this.dc.dp.totalHighWaterMark, g.t, this.dc.dm.totalHighWaterMark);
        }
        zq(a) {
            if (this.assigningShapeStyle != null && this.x3) {
                this.assigningShapeStyle(this, a);
            }
        }
        zp(a) {
            if (this.assigningShapeMarkerStyle != null && this.x2) {
                this.assigningShapeMarkerStyle(this, a);
            }
        }
        w9(a, b) {
            return this.xa(a, b);
        }
        xa(a, b) {
            if (b < a || a < 0 || a > this.x1.count || b < 0 || b > this.x1.count) {
                return null;
            }
            let c = new Array((b - a) + 1);
            for (let d = a; d <= b; d++) {
                let e = d;
                c[d - a] = this.dp.item(d);
            }
            return c;
        }
        static zr(a, b, c) {
            let d = 0;
            let e = null;
            for (let f = 0; f < c.count; f++) {
                let g = c._inner[f];
                let h = g.b.width * g.b.height;
                if (h > d) {
                    d = h;
                    e = g;
                }
            }
            a.cp.addItem(b, e);
        }
        qd() {
            super.qd();
            if (this.xj != null) {
                this.xj.ia();
            }
            if (this.xl != null) {
                this.xl.ia();
            }
        }
        sv(a, b) {
            this.ru(false);
        }
        su(a, b) {
            this.ru(false);
        }
        pd(a, b, c, d) {
            super.pd(a, b, c, d);
            switch (a) {
                case 3:
                    if (d == this.zc) {
                        this.yl._inner[b] = this.aaa(this.x1.item(b));
                    }
                    break;
                case 1:
                    for (let e = b; e < b + c; e++) {
                        this.yl.insert(e, this.aaa(this.x1.item(e)));
                    }
                    break;
                case 0:
                    this.yl.v(b, c);
                    break;
                case 2:
                    for (let f = b; f < b + c; f++) {
                        this.yl._inner[f] = this.aaa(this.x1.item(f));
                    }
                    break;
                case 4:
                    this.zt();
                    break;
            }
            this.ru(false);
        }
        hf(a, b, c) {
            let d = true;
            if (!super.hf(a, b, c) || (this.yf && this.x1 == null) || b.isEmpty || a.isEmpty || this.xj == null || this.xl == null || this.xj.bi == null || this.xl.bi == null || this.xj.l4 == this.xj.l3 || this.xl.l4 == this.xl.l3 || this.x1 == null || this.x1.count == 0 || this.yl == null || this.yl.count == 0 || this.yl.count != this.x1.count) {
                d = false;
            }
            return d;
        }
        get_yf() {
            return true;
        }
        get yf() {
            return this.get_yf();
        }
        q3(a) {
            super.q3(a);
            this.xr = typeCast(ShapeSeriesViewBase.$, a);
        }
        yo(a, b, c, d, e, f, g) {
            let h = new List$1(FlattenedShape.$, 0);
            let i;
            let j = c.count;
            for (let k = 0; k < j; k++) {
                i = c._inner[k];
                let l = this.xh(a, b, i, d, e, f, g);
                if (l == null) {
                    continue;
                }
                h.add(l);
            }
            return h;
        }
        xh(a, b, c, d, e, f, g) {
            let h = this.zj(c, d, e);
            let i = h.c;
            let j = h.d;
            let k = i.length;
            let l = 1.7976931348623157E+308;
            let m = 1.7976931348623157E+308;
            let n = -1.7976931348623157E+308;
            let o = -1.7976931348623157E+308;
            let p;
            let q;
            if (f != 0) {
                for (let r = 0; r < k; r++) {
                    i[r] = i[r] + f;
                }
            }
            for (let s = 0; s < k; s++) {
                p = i[s];
                q = j[s];
                l = p < l ? p : l;
                m = q < m ? q : m;
                n = p > n ? p : n;
                o = q > o ? q : o;
            }
            let t = !(l > this.z9.right || n < this.z9.left || m > this.z9.bottom || o < this.z9.top);
            if (!t && f == 0 && g != 0) {
                if (g != 0) {
                    for (let u = 0; u < k; u++) {
                        i[u] = i[u] + g;
                    }
                }
                for (let v = 0; v < k; v++) {
                    p = i[v];
                    q = j[v];
                    l = p < l ? p : l;
                    m = q < m ? q : m;
                    n = p > n ? p : n;
                    o = q > o ? q : o;
                }
                t = !(l > this.z9.right || n < this.z9.left || m > this.z9.bottom || o < this.z9.top);
            }
            if (!t) {
                return null;
            }
            let w = b != null && (l < this.z9.left || m < this.z9.top || n > this.z9.right || o > this.z9.bottom);
            let x = new Rect(0, l, m, n - l, o - m);
            if (!a.co(x)) {
                return null;
            }
            l = l < this.z9.left ? this.z9.left : l;
            n = n > this.z9.right ? this.z9.right : n;
            m = m < this.z9.top ? this.z9.top : m;
            o = o > this.z9.bottom ? this.z9.bottom : o;
            let y = PolySimplification.b(h, this.ie);
            let z = new DefaultFlattener().c(h.c, h.d, y, this.yp);
            let aa = z.count;
            if (w) {
                let ab = new List$1(Point_$type, 0);
                b.i = ab;
                for (let ac = 0; ac < aa; ac++) {
                    b.j(z._inner[ac]);
                }
                b.i = null;
                z = ab;
            }
            if (z == null || z.count == 0) {
                return null;
            }
            let ad = new FlattenedShape();
            ad.a = z;
            ad.b = new Rect(0, l, m, n - l, o - m);
            ad.c = x;
            return ad;
        }
        zj(a, b, c) {
            let d = this.xi;
            let e = this.xk;
            let f = a.count;
            let g = new Array(f);
            let h = new Array(f);
            for (let i = 0; i < f; i++) {
                g[i] = a._inner[i].x;
                h[i] = a._inner[i].y;
            }
            d.hq(boxArray$1(g), 0, g.length, b);
            e.hq(boxArray$1(h), 0, h.length, c);
            return new Tuple$2(Array_$type, Array_$type, g, h);
        }
        zv(a) {
            a.dd();
        }
        o7(a, b) {
            super.o7(a, b);
            let c = b;
            c.c0();
        }
        zm(a) {
            if (a != null) {
                a.ct(this);
            }
        }
        zu(a) {
            if (a != null) {
                a.b0(this);
            }
        }
        zk(a, b, c) {
            let d = this.cw;
            let e = d.b9;
            let f = this.dc.w8(this.dc.wy(a));
            if (e.width < 1 || e.height < 1 || this.x1 == null) {
                return;
            }
            let g = this.getEffectiveViewport1(d);
            let h = new ScalerParams(0, f, e, this.xj.ch, g);
            let i = new ScalerParams(0, f, e, this.xl.ch, g);
            d.c7();
            let j = this.x1.count;
            let k = new Array(j);
            let l = new Array(j);
            let m = new Array(j);
            let n = new Array(j);
            let o;
            for (let p = 0; p < j; p++) {
                o = this.yl._inner[p];
                k[p] = o.top;
                l[p] = o.left;
                m[p] = o.right;
                n[p] = o.bottom;
            }
            this.xj.hq(boxArray$1(l), 0, l.length, h);
            this.xj.hq(boxArray$1(m), 0, m.length, h);
            this.xl.hq(boxArray$1(k), 0, k.length, i);
            this.xl.hq(boxArray$1(n), 0, n.length, i);
            d.c8(l, k, m, n);
            d.dd();
            let q = null;
            if (!this.z9.isEmpty) {
                q = new Clipper(1, this.z9.left, this.z9.bottom, this.z9.right, this.z9.top, this.yb);
            }
            let r = false;
            let s = 0;
            if (this.dc != null) {
                if (this.dc.f8()) {
                    let t = this.dc.nm(f, h);
                    r = t.c;
                    s = t.d;
                }
            }
            let u, v, w, x;
            let y = new Rect(0, 0, 0, 0, 0);
            for (let z = 0; z < j; z++) {
                w = l[z];
                u = k[z];
                v = n[z];
                x = m[z];
                y.x = Math.min(w, x);
                y.y = Math.min(u, v);
                y.width = Math.max(w, x) - y.x;
                y.height = Math.max(u, v) - y.y;
                if (r) {
                    y.x = y.x + s;
                }
                if (!y.intersectsWith(e)) {
                    continue;
                }
                let aa = this.yn(d, q, this.x1.item(z), h, i, s, s);
                if (aa.count <= 0) {
                    continue;
                }
                this.x4(b, c, z);
            }
        }
        x4(a, b, c) {
            if (b == 7 || b == 6) {
                a.add(((() => {
                    let $ret = new ChartSelection();
                    $ret.series = this;
                    return $ret;
                })()));
                return false;
            }
            else if (b == 1 || b == 2) {
                a.add(((() => {
                    let $ret = new ChartSelection();
                    $ret.item = this.dp.item(c);
                    return $ret;
                })()));
                return true;
            }
            else {
                a.add(((() => {
                    let $ret = new ChartSelection();
                    $ret.item = this.dp.item(c);
                    $ret.series = this;
                    return $ret;
                })()));
                return true;
            }
        }
        a2(a, b) {
            let c = this.xr.df(a, b);
            let d = null;
            if (c != null) {
                d = c.dataContext;
            }
            if (d != null) {
                return d;
            }
            return super.a2(a, b);
        }
        yw(a) {
            return this.dp.item(a);
        }
        get_g8() {
            return true;
        }
        set_g8(a) {
            super.set_g8(a);
        }
        ay(a) {
            if (typeCast(NumericXAxis.$, a) !== null && this.yl != null) {
                let b = 1.7976931348623157E+308;
                let c = -1.7976931348623157E+308;
                for (let d of fromEnum(this.yl)) {
                    b = Math.min(b, d.left);
                    c = Math.max(c, d.right);
                }
                return new AxisRange(b, c);
            }
            if (typeCast(NumericYAxis.$, a) !== null && this.yl != null) {
                let e = 1.7976931348623157E+308;
                let f = -1.7976931348623157E+308;
                for (let g of fromEnum(this.yl)) {
                    e = Math.min(e, g.top);
                    f = Math.max(f, g.bottom);
                }
                return new AxisRange(e, f);
            }
            return null;
        }
        get_fy() {
            return true;
        }
        get_fm() {
            return true;
        }
        get x9() {
            return this.styleShape != null;
        }
        aab(a, b, c) {
            if (this.styleShape != null) {
                if (this.xr.dm != null && c == this.xr.dm) {
                    c = new Style();
                    let d = this.xr.dm;
                    c.fill = d.fill;
                    c.opacity = d.opacity;
                    c.stroke = d.stroke;
                    c.strokeThickness = d.strokeThickness;
                }
                else {
                    if (c != null) {
                        let e = new Style();
                        e.fill = c.fill;
                        e.opacity = c.opacity;
                        e.stroke = c.stroke;
                        e.strokeThickness = c.strokeThickness;
                        c = e;
                    }
                    else {
                        c = new Style();
                    }
                }
                let f = new StyleShapeEventArgs(a, b, c);
                this.styleShape(this, f);
                return f.d();
            }
            return c;
        }
    }
    ShapeSeriesBase.$t = /*@__PURE__*/ markType(ShapeSeriesBase, 'ShapeSeriesBase', Series.$, [ISupportsFillScale_$type]);
    ShapeSeriesBase.zz = /*@__PURE__*/ DependencyProperty.i("HighlightedValueMemberPath", String_$type, ShapeSeriesBase.$, /*@__PURE__*/ new PropertyMetadata(2, null, (a, b) => a.raisePropertyChanged("HighlightedValueMemberPath", b.oldValue, b.newValue)));
    ShapeSeriesBase.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, ShapeSeriesBase, 'raisePropertyChanged', ['FillMemberPath:yz:zw', [2], 'FillScale:xf:zx', [BrushScale.$], 'FillScaleUseGlobalValues:x8:zy', [0, false], 'IsCustomShapeMarkerStyleAllowed:yc:z0', [0, false], 'IsCustomShapeStyleAllowed:yd:z1', [0, false], 'ItemSearchMode:xp:z2', [ShapeItemSearchMode_$type, /*@__PURE__*/ enumGetBox(ShapeItemSearchMode_$type, 0)], 'ItemSearchPointsThreshold:yu:z3', [1, 10000], 'ItemSearchThreshold:yv:z4', [1, 10000], 'ShapeFilterResolution:yr:z5', [1, 2], 'ShapeMemberPath:zc:z6', [2, null], 'XAxis:xj:z7', [NumericXAxis.$, null], 'YAxis:xl:z8', [NumericYAxis.$, null]]);
    return ShapeSeriesBase;
})();
/**
 * @hidden
 */
export let ShapeSeriesRenderManager = /*@__PURE__*/ (() => {
    class ShapeSeriesRenderManager extends SeriesRenderManager {
        constructor() {
            super(...arguments);
            this.aw = null;
            this.ax = null;
        }
        c() {
            this.aw = new AssigningShapeMarkerStyleEventArgs();
            return this.aw;
        }
        a() {
            this.ax = new AssigningShapeStyleEventArgs();
            return this.ax;
        }
        a1(a, b, c) {
            this.ag = this.ak;
            this.ah = this.al;
            this.m = this.t;
            this.am = this.an;
            this.ao = this.ar;
            this.k = this.r;
            this.l = this.s;
            this.j = this.q;
            if (c) {
                if (a._fill != null) {
                    this.ag = a._fill;
                }
                if (a._stroke != null) {
                    this.ah = a._stroke;
                }
                if (!isNaN_(a.ad) && (a.y == null || !isNaN_(a.y.strokeThickness))) {
                    this.m = a.ad;
                }
            }
            let d = this.b;
            if (d != null) {
                d.aa = this.ag;
                d.ab = this.ah;
                d.ae = this.m;
                d.af = this.am;
                d.ag = this.ao;
                d.ac = this.k;
                d.ad = this.l;
                d.o = this.j;
                d.g = this.f;
                d.k = b;
                d.f = false;
            }
        }
        ay(a, b, c) {
            this.w(a, b, c);
        }
        az(a, b, c) {
            this.x(a, b, c);
        }
        a0(a, b, c, d) {
            if (b == -1) {
                a.e = false;
                a.z = 0;
                a.y = c - 1;
            }
            else {
                if (d) {
                    a.z = b;
                    a.y = b;
                }
                else {
                    a.e = false;
                    a.z = b;
                    a.y = b;
                }
            }
        }
    }
    ShapeSeriesRenderManager.$t = /*@__PURE__*/ markType(ShapeSeriesRenderManager, 'ShapeSeriesRenderManager', SeriesRenderManager.$);
    return ShapeSeriesRenderManager;
})();
/**
 * @hidden
 */
export let ShapeSeriesViewBase = /*@__PURE__*/ (() => {
    class ShapeSeriesViewBase extends SeriesView {
        constructor(a) {
            super(a);
            this.cp = null;
            this.cj = null;
            this.cq = new List$1(ShapeHitRegion.$, 0);
            this.cu = 0;
            this.ct = null;
            this.cm = null;
            this.dk = new Path();
            this.ck = null;
            this.dl = null;
            this.ce = null;
            this.cg = null;
            this.cf = null;
            this.cd = null;
            this.cj = a;
            this.cm = this.cl();
            this.ct = new List$1(Path.$, 0);
            this.cp = new Dictionary$2(Number_$type, FlattenedShape.$, 0);
        }
        ch(a) {
            return null;
        }
        get cr() {
            return this.cq;
        }
        cl() {
            return ((() => {
                let $ret = new Pool$1(FrameworkElement.$);
                $ret.create = runOn(this, this.de);
                $ret.activate = runOn(this, this.c3);
                $ret.disactivate = runOn(this, this.c4);
                $ret.destroy = runOn(this, this.c5);
                return $ret;
            })());
        }
        co(a) {
            return a.width >= this.cj.ys && a.height >= this.cj.ys;
        }
        static cs(a) {
            let b = new List$1(PointCollection.$, 0);
            let c;
            let d = a.count;
            for (let e = 0; e < d; e++) {
                c = a._inner[e];
                let f = new PointCollection(1, c.a);
                b.add(f);
            }
            return b;
        }
        get cn() {
            return this.dl != null || this.ck != null || this.cj.x9;
        }
        cv(a, b, c, d) {
            if (d != null && d.count > 0) {
                let e = ShapeSeriesViewBase.cs(d);
                c.intersect(this.b9);
                if (!this.co(c)) {
                }
                else {
                    let f = this.di(a, e);
                    if (f != null) {
                        let g = this.dh(this.cu, b);
                        for (let h = 0; h < d.count; h++) {
                            let i = new ShapeHitRegion();
                            i.d = d._inner[h].b;
                            i.a = d._inner[h].a;
                            i.b = a;
                            i.c = g;
                            this.cq.add(i);
                        }
                        this.cx(g, f);
                        this.cu = this.cu + 1;
                    }
                }
            }
        }
        dh(a, b) {
            let c = this.cm.item(this.cu);
            if (c.dataContext != null) {
                c.dataContext.item = b;
                c.dataContext.c = a;
            }
            return c;
        }
        static cy(a, b, c) {
            if (b._fill == null) {
                b._fill = a.f.ve;
            }
            if (b._stroke == null) {
                b._stroke = a.f.vi;
            }
            if (b.y == null) {
                b.ad = a.f.ig;
            }
        }
        c2(a) {
            for (let b = 0; b < this.cm.a.count; b++) {
                let c = this.cm.a._inner[b];
                a(c);
            }
        }
        cz(a, b, c) {
            if (a == null) {
                return;
            }
            this.c1(a, c);
            let d = false;
            if (this.ck != null) {
                let e = this.ck.selectStyle(b, a);
                if (e != null) {
                    d = true;
                }
                if (a.y != e) {
                    a.y = e;
                    this.m.j(a, a.y);
                }
            }
            if (!d) {
                if (a.y != this.dl) {
                    a.y = this.dl;
                    this.m.j(a, a.y);
                }
            }
            let f = this.cj.aab(b, a, a.y);
            if (a.y != f) {
                a.y = f;
                this.m.j(a, a.y);
            }
        }
        c1(a, b) {
        }
        cw(a, b) {
            let c = truncate(Math.floor(a.left));
            let d = truncate(Math.ceil(a.right));
            let e = truncate(Math.floor(a.top));
            let f = truncate(Math.ceil(a.bottom));
            for (let g = c; g < d; g++) {
                for (let h = e; h < f; h++) {
                    this.da(g, h, b);
                }
            }
        }
        da(a, b, c) {
        }
        c7() {
            this.cu = 0;
        }
        c6() {
            this.cm.count = this.cu;
            this.a2();
        }
        c9(a, b) {
        }
        c0() {
            this.cm.count = 0;
            this.a2();
        }
        de() {
            let a = this.cj;
            let b = ((() => {
                let $ret = new Path();
                $ret.dataContext = ((() => {
                    let $ret = new DataContext();
                    $ret.series = a;
                    return $ret;
                })());
                return $ret;
            })());
            this.ct.add(b);
            return b;
        }
        c3(a) {
            a._visibility = 0;
        }
        c4(a) {
            a.dataContext.item = null;
            a._visibility = 1;
        }
        c5(a) {
            this.ct.remove(a);
        }
        dj(a, b, c) {
            if (b == null) {
                return null;
            }
            let d = new PathGeometry();
            let e;
            let f = b.count;
            for (let g = 0; g < f; g++) {
                e = b._inner[g];
                if (e.count < 1) {
                    continue;
                }
                let h = new PolyLineSegment();
                h._points = e;
                let i = new PathFigure();
                i._isFilled = c;
                i._isClosed = c;
                i._startPoint = e._inner[0];
                i._segments.add(h);
                d.c.add(i);
            }
            return d;
        }
        ak(a) {
            return this.ct._inner[a];
        }
        aj(a) {
            let b = this.ct._inner[a];
            this.dk._visibility = b._visibility;
            this.dk.an = b.an;
            let c = this.b4(a);
            this.dk._fill = c;
            this.dk._stroke = c;
            this.dk.ad = this.f.ig + 3;
            return this.dk;
        }
        bj(a, b) {
            super.bj(a, b);
            for (let c = 0; c < this.ct.count; c++) {
                let d = this.ai(c, b);
                if (d._visibility != 1) {
                    a.t(d);
                }
            }
        }
        get dm() {
            return this.dl;
        }
        dc(a) {
            this.ck = a;
        }
        db(a) {
            this.dl = a;
        }
        df(a, b) {
            return this.dg(a, b, false);
        }
        dg(a, b, c) {
            let d = this.ci(a, b, c);
            if (d == null) {
                return null;
            }
            return d.c;
        }
        ci(a, b, c) {
            if (this.cq.count == 0) {
                return null;
            }
            let d = a.x;
            let e = a.y;
            let f = this.cq.count;
            let g = this.cq;
            let h = null;
            for (let i = 0; i < f; i++) {
                h = g._inner[i];
                if (h.a == null || h.a.count == 0) {
                    continue;
                }
                if (d >= h.d.left && d <= h.d.right && e >= h.d.top && e <= h.d.bottom) {
                    if (c) {
                        let j = this.cj.ig / 2 + this.cj.iv(b);
                        if (GeometryUtil.e(a, h.a._inner[0], h.a, j)) {
                            return h;
                        }
                    }
                    else {
                        if (PolygonUtil.b(h.a, a)) {
                            return h;
                        }
                    }
                }
            }
            return null;
        }
        c8(a, b, c, d) {
            this.ce = a;
            this.cg = b;
            this.cf = c;
            this.cd = d;
            this.cq.clear();
        }
        dd() {
            let a = this.b9;
            let b = ((() => {
                let $ret = new Path();
                $ret.y = this.dl;
                return $ret;
            })());
            b.ad = 1;
            if (this.m != null) {
                this.m.j(b, b.y);
            }
            this.cj.z9 = RectUtil.r(a, b.ad);
        }
        ax(a) {
            super.ax(a);
            if (this.cm.a == null) {
                return;
            }
            for (let b = 0; b < this.cm.a.count; b++) {
                let c = typeCast(Path.$, this.cm.a._inner[b]);
                if (c._visibility != 1) {
                    this.f.bc.exportPathData(a, c, "shape" + b, ["Main "]);
                }
            }
        }
    }
    ShapeSeriesViewBase.$t = /*@__PURE__*/ markType(ShapeSeriesViewBase, 'ShapeSeriesViewBase', SeriesView.$);
    return ShapeSeriesViewBase;
})();