/*
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, __values } from "tslib";
import { AnnotationLayer } from "./AnnotationLayer";
import { ValueLayerValueMode_$type } from "./ValueLayerValueMode";
import { DependencyProperty } from "igniteui-angular-core";
import { Brush } from "igniteui-angular-core";
import { Series } from "./Series";
import { Axis } from "./Axis";
import { Base, enumGetBox, Delegate_$type, Number_$type, typeCast, fromEnum, Point_$type, markType, markDep, runOn } from "igniteui-angular-core";
import { Thickness } from "igniteui-angular-core";
import { Visibility_$type } from "igniteui-angular-core";
import { ValueLayerFrame } from "./ValueLayerFrame";
import { List$1 } from "igniteui-angular-core";
import { Dictionary$2 } from "igniteui-angular-core";
import { Pool$1 } from "igniteui-angular-core";
import { AxisAnnotation } from "./AxisAnnotation";
import { DataLegendSeriesContext } from "igniteui-angular-core";
import { DataLegendSeriesValueInfo } from "igniteui-angular-core";
import { AxisAnnotationFrameManager } from "./AxisAnnotationFrameManager";
import { DoubleCollection } from "igniteui-angular-core";
import { DeviceUtils } from "igniteui-angular-core";
import { Tuple$2 } from "igniteui-angular-core";
import { Path } from "igniteui-angular-core";
import { PathGeometry } from "igniteui-angular-core";
import { PathFigure } from "igniteui-angular-core";
import { LineSegment } from "igniteui-angular-core";
import { PropertyMetadata } from "igniteui-angular-core";
import { isNaN_, truncate } from "igniteui-angular-core";
import { AnnotationLayerView } from "./AnnotationLayerView";
import { Defaults } from "./Defaults";
import { TranslateTransform } from "igniteui-angular-core";
import { LineGeometry } from "igniteui-angular-core";
import { BrushUtil } from "igniteui-angular-core";
import { Color } from "igniteui-angular-core";
/**
 * @hidden
 */
var ValueLayer = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(ValueLayer, _super);
    function ValueLayer() {
        var _this = _super.call(this) || this;
        _this.zv = [NaN, NaN];
        _this.zz = null;
        _this.z0 = null;
        _this.ac0 = null;
        _this.aaa = null;
        _this.z9 = null;
        var a = new ValueLayerFrame();
        var b = new ValueLayerFrame();
        var c = new ValueLayerFrame();
        var d = _this.kd / 1000;
        _this.xa = a;
        _this.w9 = b;
        _this.xb = c;
        _this.ab = ValueLayer.$;
        return _this;
    }
    ValueLayer.prototype.bj = function () {
        return new ValueLayer();
    };
    ValueLayer.prototype.get_et = function () {
        return true;
    };
    ValueLayer.prototype.cs = function () {
        return new ValueLayerView(this);
    };
    ValueLayer.prototype.qz = function (a) {
        _super.prototype.qz.call(this, a);
        this.z4 = a;
    };
    ValueLayer.prototype.gu = function (a) {
        if (this.z1 == null) {
            return true;
        }
        if (this.z1 == a) {
            return true;
        }
        return false;
    };
    Object.defineProperty(ValueLayer.prototype, "ac2", {
        get: function () {
            return new Thickness(1, this.aad, this.aaf, this.aae, this.aac);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ValueLayer.prototype, "ac3", {
        get: function () {
            return new Thickness(1, this.aaj, this.aal, this.aak, this.aai);
        },
        enumerable: false,
        configurable: true
    });
    ValueLayer.prototype.mc = function () {
        return "Value Layer";
    };
    ValueLayer.prototype.get_isSummarizationSupported = function () {
        return false;
    };
    ValueLayer.prototype.i5 = function (a, b, c) {
        if (isNaN_(this.zv[0]) && isNaN_(this.zv[1])) {
            return _super.prototype.i5.call(this, a, b, c);
        }
        if (!isNaN_(this.zv[0])) {
            return this.zv[0];
        }
        return this.zv[1];
    };
    ValueLayer.prototype.getDataLegendSeriesContextAt = function (a, b) {
        if (isNaN_(this.zv[0]) || isNaN_(this.zv[1])) {
            return _super.prototype.getDataLegendSeriesContextAt.call(this, a, b);
        }
        if (this.z1 == null) {
            var c_1 = new DataLegendSeriesValueInfo();
            c_1.l = this.zv[0];
            c_1.a = 0;
            c_1.q = "Value";
            c_1.r = "Value";
            c_1.s = "";
            var d_1 = new DataLegendSeriesValueInfo();
            d_1.l = this.zv[1];
            d_1.a = 0;
            d_1.q = "Value";
            d_1.r = "Value";
            d_1.s = "";
            var e = new DataLegendSeriesContext();
            e.e = ((function () {
                var $ret = new List$1(DataLegendSeriesValueInfo.$, 0);
                $ret.add(c_1);
                $ret.add(d_1);
                return $ret;
            })());
            e.h = this.mc();
            return e;
        }
        var f = this.z1.getDataLegendSeriesContextAt(a, b);
        var g = typeCast(DataLegendSeriesContext.$, f);
        if (g == null || g.e == null) {
            return _super.prototype.getDataLegendSeriesContextAt.call(this, a, b);
        }
        if (g.e.count == 0) {
            g.e._inner[0].l = isNaN_(this.zv[0]) ? this.zv[1] : this.zv[0];
        }
        else {
            g.e._inner[0].l = this.zv[0];
            g.e._inner[1].l = this.zv[1];
        }
        return g;
    };
    ValueLayer.prototype.yn = function (a, b) {
        if (this.z1 == null || this.z1 == a) {
            if (!this.a1.c) {
                this.rp(b);
            }
        }
    };
    ValueLayer.prototype.yp = function (a, b) {
        var e_1, _a, e_2, _b;
        _super.prototype.yp.call(this, a, b);
        var c = a;
        var d = this.z8;
        var e = this.z7;
        c.af.clear();
        c.ag.clear();
        c.ae.clear();
        c.ah.clear();
        AxisAnnotationFrameManager.b(c);
        this.zv = [NaN, NaN];
        this.zz = null;
        this.z0 = null;
        var f = this.z2();
        if (this.xg(this.z1)) {
            var g = this.z1.aq(f);
            this.zv = g;
            this.abq(c, d, e, this.z1);
        }
        else {
            if (f == 5 || f == 4 || f == 6) {
                var h = null;
                var i = null;
                var j = [NaN, NaN];
                var k = 0;
                try {
                    for (var _c = __values(fromEnum(this.db.series)), _d = _c.next(); !_d.done; _d = _c.next()) {
                        var l = _d.value;
                        if (!this.xg(l)) {
                            continue;
                        }
                        var m = l.ai();
                        for (var o = 0; o < m.length; o++) {
                            var n = m[o];
                            if (!this.z6(n)) {
                                continue;
                            }
                            var p = n.cp ? 1 : 0;
                            var q = j[p];
                            var r = null;
                            if (f == 5) {
                                var s = l.i8(2, n);
                                if (!isNaN_(s) && (s > q || isNaN_(q))) {
                                    r = l;
                                }
                                q = !isNaN_(q) ? Math.max(s, q) : s;
                            }
                            else if (f == 4) {
                                var t = l.i8(1, n);
                                if (!isNaN_(t) && (t < q || isNaN_(q))) {
                                    r = l;
                                }
                                q = !isNaN_(q) ? Math.min(t, q) : t;
                            }
                            else if (f == 6) {
                                var u = l.i8(3, n);
                                r = l;
                                q = !isNaN_(q) ? q + u : u;
                            }
                            if (n.cp) {
                                i = r != null ? r : i;
                            }
                            else {
                                h = r != null ? r : h;
                            }
                            j[p] = q;
                        }
                        k++;
                    }
                }
                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;
                    }
                }
                if (f == 6) {
                    j[0] = !isNaN_(j[0]) ? j[0] / k : NaN;
                    j[1] = !isNaN_(j[1]) ? j[1] / k : NaN;
                }
                if (h != null && !isNaN_(j[0])) {
                    var v = h.we(j);
                    this.abs(h, { $type: Point_$type, x: v.x, y: NaN }, c, d, e);
                }
                if (i != null && !isNaN_(j[1])) {
                    var w = i.we(j);
                    this.abs(i, { $type: Point_$type, x: NaN, y: w.y }, c, d, e);
                }
                this.zv = j;
                this.zz = h;
                this.z0 = i;
            }
            else {
                try {
                    for (var _e = __values(fromEnum(this.db.series)), _f = _e.next(); !_f.done; _f = _e.next()) {
                        var x = _f.value;
                        this.abq(c, d, e, x);
                    }
                }
                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;
                    }
                }
            }
        }
    };
    ValueLayer.prototype.abq = function (a, b, c, d) {
        var _this = this;
        if (this.xg(d)) {
            this.abr(d, a, b, c);
        }
        if (d.isStacked) {
            d.p1(function (e) {
                if (_this.xg(e)) {
                    _this.abr(e, a, b, c);
                }
                if (e.eg) {
                    e.pz(function (f) {
                        if (_this.xg(f)) {
                            _this.abr(f, a, b, c);
                        }
                        return true;
                    });
                }
                return true;
            });
        }
        if (d.eg) {
            d.pz(function (e) {
                if (_this.xg(e)) {
                    _this.abr(e, a, b, c);
                }
                return true;
            });
        }
    };
    ValueLayer.prototype.xg = function (a) {
        if (!_super.prototype.xg.call(this, a)) {
            return false;
        }
        if (this.aaw != null) {
            if (a.fb) {
                var b = a.nc();
                if (!Base.equalsStatic(this.aaw, b)) {
                    return false;
                }
            }
            else {
                if (!Base.equalsStatic(this.aaw, a.name)) {
                    return false;
                }
            }
        }
        return true;
    };
    ValueLayer.prototype.z6 = function (a) {
        if (!a.cj) {
            return false;
        }
        if (this.zw != null && this.zw != a) {
            return false;
        }
        if (this.aat != null && !Base.equalsStatic(this.aat, a.name)) {
            return false;
        }
        return true;
    };
    ValueLayer.prototype.qn = function () {
        _super.prototype.qn.call(this);
        if (!this.a1.c && !this.d3()) {
            return;
        }
        if (this.d3()) {
            this.abt(this.xb, false);
        }
        else {
            this.abt(this.w9, false);
        }
    };
    ValueLayer.prototype.z2 = function () {
        if (this.z3 == 0) {
            return 2;
        }
        return this.z3;
    };
    ValueLayer.prototype.w0 = function () {
        return 3;
    };
    ValueLayer.prototype.xn = function () {
        return 0.3;
    };
    ValueLayer.prototype.xq = function () {
        return -0.4;
    };
    ValueLayer.prototype.xp = function () {
        return 0.5;
    };
    ValueLayer.prototype.zm = function () {
        return this.wx == 3 ? this.ac1() : null;
    };
    ValueLayer.prototype.zn = function () {
        return this.wy == 3 ? this.ac1() : null;
    };
    ValueLayer.prototype.ac1 = function () {
        if (this.ac0 == null) {
            this.ac0 = new DoubleCollection();
            this.ac0.add(DeviceUtils.g(5));
            this.ac0.add(DeviceUtils.g(5));
        }
        return this.ac0;
    };
    ValueLayer.prototype.abs = function (a, b, c, d, e) {
        var f = false;
        var g = this.u7;
        if (g == null) {
            g = this.vd;
        }
        if (g == null) {
            g = a.u7;
            f = true;
        }
        var h = false;
        var i = this.acu;
        if (i == null) {
            if (this.vd != null) {
                i = this.vd;
            }
            else {
                i = a.u7;
                h = true;
            }
        }
        var j = false;
        var k = this.acx;
        if (k == null) {
            if (this.vd != null) {
                k = this.vd;
            }
            else {
                k = a.u7;
                j = true;
            }
        }
        var l = g;
        var m = g;
        var n = i;
        var o = k;
        if (this.acs != null) {
            l = this.acs;
        }
        else if (f) {
            switch (this.wx) {
                case 1:
                    l = this.z4.ce(l, this.xk);
                    break;
                case 2:
                    l = this.z4.cg(l, this.xk);
                    break;
                case 4:
                    l = this.z4.cf(l, this.xk);
                    break;
            }
        }
        if (this.act != null) {
            m = this.act;
        }
        else if (f) {
            switch (this.wy) {
                case 1:
                    m = this.z4.ce(m, this.xm);
                    break;
                case 2:
                    m = this.z4.cg(m, this.xm);
                    break;
                case 4:
                    m = this.z4.cf(m, this.xm);
                    break;
            }
        }
        if (h) {
            switch (this.wy) {
                case 1:
                    n = this.z4.ce(n, this.xm);
                    break;
                case 2:
                    n = this.z4.cg(n, this.xm);
                    break;
            }
        }
        if (j) {
            switch (this.wx) {
                case 1:
                    o = this.z4.ce(o, this.xk);
                    break;
                case 2:
                    o = this.z4.cg(o, this.xk);
                    break;
            }
        }
        c.ae.add(l);
        c.ah.add(m);
        c.af.add(b.y);
        c.ag.add(b.x);
        if (this.z5) {
            AxisAnnotationFrameManager.c(c, b, a, this.db, this.getEffectiveViewport(), g, n, this.aab, this.acw, this.acv, this.ac2, this.aag, o, this.aah, this.acz, this.acy, this.ac3, this.aam, this.ac5 == 0, this.ac4 == 0);
        }
    };
    ValueLayer.prototype.abr = function (a, b, c, d) {
        var e = { $type: Point_$type, x: NaN, y: NaN };
        var f = this.z2();
        switch (f) {
            case 5:
                e = a.wd(2);
                break;
            case 4:
                e = a.wd(1);
                break;
            case 6:
                e = a.wd(3);
                break;
            default:
                e = a.wd(f);
                break;
        }
        var i = a.ai();
        for (var h = 0; h < i.length; h++) {
            var g = i[h];
            if (!this.z6(g)) {
                continue;
            }
            if (g.cp) {
                this.abs(a, { $type: Point_$type, x: NaN, y: e.y }, b, c, d);
            }
            else {
                this.abs(a, { $type: Point_$type, x: e.x, y: NaN }, b, c, d);
            }
        }
    };
    ValueLayer.prototype.abt = function (a, b) {
        var c = false;
        if (this.z9 == null) {
            c = true;
            this.aaa = new List$1(Axis.$, 0);
            this.z9 = new Dictionary$2(Axis.$, Pool$1.$.specialize(AxisAnnotation.$), 0);
        }
        AxisAnnotationFrameManager.d(this, a, c, this.z9, this.aaa, b, this.aan, this.aao, this.zx, this.zy);
    };
    ValueLayer.prototype.abp = function (a, b, c, d, e) {
        var f = a.item(b);
        b++;
        if (e) {
            f._stroke = d.ah._inner[c];
            f._fill = d.ah._inner[c];
        }
        else {
            f._stroke = d.ae._inner[c];
            f._fill = d.ae._inner[c];
        }
        f.ad = this.ie;
        f.ai = e ? this.zl : this.zk;
        f.am = this.v3;
        f.al = this.v2;
        f.ak = this.v2;
        f.aj = this.v1;
        f.ac = this.jh;
        return new Tuple$2(Path.$, Number_$type, f, b);
    };
    ValueLayer.prototype.ys = function (a, b) {
        _super.prototype.ys.call(this, a, b);
        var c = this.z4.b8;
        var d = a;
        var e = d.af.count;
        var f = 0;
        var g = b.bx.left;
        var h = b.bx.right;
        var i = b.bx.top;
        var j = b.bx.bottom;
        var k = this.ac5 == 0;
        var l = this.ac4 == 0;
        for (var m = 0; m < e; m++) {
            var n = Math.floor(d.af._inner[m]);
            var o = Math.floor(d.ag._inner[m]);
            var p = null;
            if (k) {
                if (!isNaN_(o)) {
                    var q = this.abp(c, f, m, d, true);
                    p = q.c;
                    f = q.d;
                    var r = new PathGeometry();
                    var s = new PathFigure();
                    s._startPoint = { $type: Point_$type, x: o, y: i };
                    var t = new LineSegment(1);
                    t.c = { $type: Point_$type, x: o, y: j };
                    s._segments.add(t);
                    r.c.add(s);
                    p.an = r;
                }
            }
            if (l) {
                if (!isNaN_(n)) {
                    var u = this.abp(c, f, m, d, false);
                    p = u.c;
                    f = u.d;
                    var v = new PathGeometry();
                    var w = new PathFigure();
                    w._startPoint = { $type: Point_$type, x: g, y: n };
                    var x = new LineSegment(1);
                    x.c = { $type: Point_$type, x: h, y: n };
                    w._segments.add(x);
                    v.c.add(w);
                    p.an = v;
                }
            }
        }
        c.count = f;
        if (this.d3()) {
            this.abt(this.xb, true);
        }
        else {
            this.abt(this.w9, false);
        }
    };
    ValueLayer.prototype.ga = function () {
        return true;
    };
    ValueLayer.prototype.q7 = function (a, b, c, d) {
        _super.prototype.q7.call(this, a, b, c, d);
        switch (b) {
            case "SeriesViewer":
                if (d == null) {
                    if (this.z9 != null && this.z9.count > 0) {
                        var e = void 0;
                        if (this.d3()) {
                            e = this.xb;
                        }
                        else {
                            e = this.w9;
                        }
                        AxisAnnotationFrameManager.b(e);
                        AxisAnnotationFrameManager.d(this, e, true, this.z9, this.aaa, true, this.aan, this.aao, this.zx, this.zy);
                    }
                }
                break;
            case ValueLayer.$$p[1]:
                this.rp(true);
                break;
            case ValueLayer.$$p[11]:
                this.rp(true);
                break;
            case ValueLayer.$$p[6]:
            case ValueLayer.$$p[7]:
            case "Visibility":
                this.rp(true);
                break;
            case ValueLayer.$$p[2]:
            case ValueLayer.$$p[13]:
            case ValueLayer.$$p[12]:
            case ValueLayer.$$p[16]:
            case ValueLayer.$$p[18]:
            case ValueLayer.$$p[20]:
            case ValueLayer.$$p[19]:
            case ValueLayer.$$p[17]:
            case ValueLayer.$$p[21]:
            case ValueLayer.$$p[22]:
            case ValueLayer.$$p[24]:
            case ValueLayer.$$p[27]:
            case ValueLayer.$$p[29]:
            case ValueLayer.$$p[31]:
            case ValueLayer.$$p[30]:
            case ValueLayer.$$p[28]:
            case ValueLayer.$$p[32]:
            case ValueLayer.$$p[33]:
            case ValueLayer.$$p[0]:
            case ValueLayer.$$p[10]:
            case ValueLayer.$$p[8]:
                this.rp(true);
                break;
        }
    };
    ValueLayer.prototype.o5 = function (a, b) {
        _super.prototype.o5.call(this, a, b);
        if (a) {
            AxisAnnotationFrameManager.b(this.w9);
            this.abt(this.w9, false);
        }
    };
    ValueLayer.$t = markType(ValueLayer, 'ValueLayer', AnnotationLayer.$);
    ValueLayer.$$p = markDep(DependencyProperty, PropertyMetadata, ValueLayer, 'raisePropertyChanged', ['HorizontalLineStroke:acs:abu', [Brush.$, null], 'HorizontalLineVisibility:ac4:abv', [Visibility_$type, enumGetBox(Visibility_$type, 0)], 'IsAxisAnnotationEnabled:z5:abw', [0, false], 'SkipUnknownValues:z7:abx', [0, true], 'TargetAxisName:aat:aby', [2, null], 'TargetAxis:zw:abz', [Axis.$, null], 'TargetSeriesName:aaw:ab0', [2, null], 'TargetSeries:z1:ab1', [Series.$, null], 'UseInterpolation:z8:ab2', [0, true], 'ValueMode:z3:ab3', [ValueLayerValueMode_$type, enumGetBox(ValueLayerValueMode_$type, 2)], 'VerticalLineStroke:act:ab4', [Brush.$, null], 'VerticalLineVisibility:ac5:ab5', [Visibility_$type, enumGetBox(Visibility_$type, 0)], 'XAxisAnnotationBackgroundCornerRadius:aab:ab6', [1, DeviceUtils.g(3)], 'XAxisAnnotationBackground:acu:ab7', [Brush.$, null], 'XAxisAnnotationFormatLabel:zx:ab8', [Delegate_$type], 'XAxisAnnotationInterpolatedValuePrecision:aan:ab9', [1, -1], 'XAxisAnnotationOutline:acv:aca', [Brush.$, null], 'XAxisAnnotationPaddingBottom:aac:acb', [1, NaN], 'XAxisAnnotationPaddingLeft:aad:acc', [1, NaN], 'XAxisAnnotationPaddingRight:aae:acd', [1, NaN], 'XAxisAnnotationPaddingTop:aaf:ace', [1, NaN], 'XAxisAnnotationStrokeThickness:aag:acf', [1, NaN], 'XAxisAnnotationTextColor:acw:acg', [Brush.$, null], 'YAxisAnnotationBackgroundCornerRadius:aah:ach', [1, DeviceUtils.g(3)], 'YAxisAnnotationBackground:acx:aci', [Brush.$, null], 'YAxisAnnotationFormatLabel:zy:acj', [Delegate_$type], 'YAxisAnnotationInterpolatedValuePrecision:aao:ack', [1, -1], 'YAxisAnnotationOutline:acy:acl', [Brush.$, null], 'YAxisAnnotationPaddingBottom:aai:acm', [1, NaN], 'YAxisAnnotationPaddingLeft:aaj:acn', [1, NaN], 'YAxisAnnotationPaddingRight:aak:aco', [1, NaN], 'YAxisAnnotationPaddingTop:aal:acp', [1, NaN], 'YAxisAnnotationStrokeThickness:aam:acq', [1, NaN], 'YAxisAnnotationTextColor:acz:acr', [Brush.$, null]]);
    return ValueLayer;
}(AnnotationLayer));
export { ValueLayer };
/**
 * @hidden
 */
var ValueLayerView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(ValueLayerView, _super);
    function ValueLayerView(a) {
        var _this = _super.call(this, a) || this;
        _this.b7 = null;
        _this.b8 = null;
        _this.b9 = null;
        _this.b7 = a;
        _this.b9 = new List$1(Path.$, 0);
        return _this;
    }
    ValueLayerView.prototype.au = function () {
        var _this = this;
        _super.prototype.au.call(this);
        this.b8 = ((function () {
            var $ret = new Pool$1(Path.$);
            $ret.create = runOn(_this, _this.ch);
            $ret.activate = runOn(_this, _this.ca);
            $ret.disactivate = runOn(_this, _this.cc);
            $ret.destroy = runOn(_this, _this.cb);
            return $ret;
        })());
        this.b7.jp = Defaults.j;
    };
    ValueLayerView.prototype.ch = function () {
        var a = new Path();
        a.j = new TranslateTransform();
        this.b9.add(a);
        return a;
    };
    ValueLayerView.prototype.ca = function (a) {
        a._visibility = 0;
    };
    ValueLayerView.prototype.cc = function (a) {
        a._visibility = 1;
    };
    ValueLayerView.prototype.cb = function (a) {
        this.b9.remove(a);
    };
    ValueLayerView.prototype.cd = function (a, b, c, d) {
        if (a.an == null || a.an.c.x != d || a.an.d.x != c) {
            var e = ((function () {
                var $ret = new LineGeometry();
                $ret.d = { $type: Point_$type, x: c, y: b };
                $ret.c = { $type: Point_$type, x: d, y: b };
                return $ret;
            })());
            a.an = e;
        }
    };
    ValueLayerView.prototype.ce = function (a, b) {
        if (a == null) {
            return a;
        }
        return BrushUtil.m(a, b);
    };
    ValueLayerView.prototype.cg = function (a, b) {
        if (a == null) {
            return a;
        }
        return BrushUtil.o(a, b);
    };
    ValueLayerView.prototype.cf = function (a, b) {
        if (a == null) {
            return a;
        }
        var c = new Brush();
        c.color = Color.u(truncate((a.color.l * b)), a.color.o, a.color.n, a.color.m);
        return c;
    };
    ValueLayerView.prototype.a8 = function (a, b) {
        _super.prototype.a8.call(this, a, b);
        if (a.d && !b) {
            for (var c = 0; c < this.b9.count; c++) {
                var d = this.b9._inner[c];
                if (d._visibility == 0) {
                    a.t(d);
                }
            }
        }
    };
    ValueLayerView.prototype.an = function (a) {
        _super.prototype.an.call(this, a);
        for (var b = 0; b < this.b9.count; b++) {
            this.e.bc.exportPathData(a, this.b9._inner[b], "crosshairLine", ["Main", "Crosshair"]);
        }
    };
    ValueLayerView.$t = markType(ValueLayerView, 'ValueLayerView', AnnotationLayerView.$);
    return ValueLayerView;
}(AnnotationLayerView));
export { ValueLayerView };
