/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends } from "tslib";
import { Base, runOn, delegateCombine, delegateRemove, markType, INotifyPropertyChanged_$type, PropertyChangedEventArgs, enumGetBox } from "igniteui-angular-core";
import { RenderingContext } from "igniteui-angular-core";
import { DefaultTrackThumbVisual } from "./DefaultTrackThumbVisual";
import { DefaultTrackRangeVisual } from "./DefaultTrackRangeVisual";
import { DefaultTrackBarVisual } from "./DefaultTrackBarVisual";
import { DefaultTrackShadeVisual } from "./DefaultTrackShadeVisual";
import { DefaultTrackThumbCalloutVisual } from "./DefaultTrackThumbCalloutVisual";
import { FontInfo } from "igniteui-angular-core";
import { Rect } from "igniteui-angular-core";
import { TranslateTransform } from "igniteui-angular-core";
import { DoubleAnimator } from "igniteui-angular-core";
import { CanvasViewRenderer } from "igniteui-angular-core";
import { CanvasGestureDOMEventProxy } from "igniteui-angular-core";
import { FontUtil } from "igniteui-angular-core";
import { Size } from "igniteui-angular-core";
import { truncate, isNaN_ } from "igniteui-angular-core";
import { ITrackOwner_$type } from "./ITrackOwner";
import { IZoomSlider_$type } from "igniteui-angular-core";
import { TrackThumb } from "./TrackThumb";
import { TrackThumbRange } from "./TrackThumbRange";
import { ZoomSliderOrientation_$type } from "./ZoomSliderOrientation";
import { ZoomSliderResolvingAxisValueEventArgs } from "./ZoomSliderResolvingAxisValueEventArgs";
import { RectChangedEventArgs } from "igniteui-angular-core";
import { Thickness } from "igniteui-angular-core";
import { NotImplementedException } from "igniteui-angular-core";
import { EasingFunctions } from "igniteui-angular-core";
/**
 * @hidden
 */
var ZoomSliderView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(ZoomSliderView, _super);
    function ZoomSliderView(a) {
        var _this = _super.call(this) || this;
        _this.q = false;
        _this.i = null;
        _this.h = null;
        _this.c = null;
        _this.b = null;
        _this.e = null;
        _this.d = null;
        _this.g = null;
        _this.f = null;
        _this.j = null;
        _this.u = null;
        _this.v = null;
        _this.o = null;
        _this.t = 0;
        _this.r = false;
        _this.x = 0;
        _this.w = 0;
        _this.m = null;
        _this.a = null;
        _this.l = null;
        _this.y = -1;
        _this.s = 10;
        _this.k = 0;
        _this.z = -1;
        _this.p = true;
        _this.j = a;
        _this.i = new DefaultTrackThumbVisual();
        _this.h = new DefaultTrackThumbVisual();
        _this.c = new DefaultTrackRangeVisual();
        _this.b = new DefaultTrackBarVisual();
        _this.e = new DefaultTrackShadeVisual();
        _this.d = new DefaultTrackShadeVisual();
        _this.g = new DefaultTrackThumbCalloutVisual();
        _this.f = new DefaultTrackThumbCalloutVisual();
        _this.m = _this.n();
        _this.an();
        return _this;
    }
    ZoomSliderView.prototype.ar = function () {
        this.p = true;
        this.an();
        if (this.a != null) {
            this.a.at(this.u.rootWrapper, "");
        }
        if (this.z == -1) {
            this.z = this.u.setTimeout(runOn(this, this.al), 200);
        }
    };
    ZoomSliderView.prototype.as = function () {
        this.p = false;
        if (this.a != null) {
            this.a.bh(this.u.rootWrapper, "");
        }
        if (this.z != -1) {
            window.clearTimeout(this.z);
            this.z = -1;
        }
    };
    ZoomSliderView.prototype.ao = function () {
        if (!this.q) {
            if (this.u != null) {
                this.q = true;
                this.u.setTimeout(runOn(this, this.a2), 0);
            }
        }
    };
    ZoomSliderView.prototype.aj = function () {
        this.a2();
    };
    ZoomSliderView.prototype.a2 = function () {
        if (!this.q) {
            return;
        }
        this.q = false;
        this.j.d6();
        this.aw();
    };
    ZoomSliderView.prototype.aw = function () {
        if (this.o == null) {
            return;
        }
        var a = this.j.fj.width;
        var b = this.j.fj.height;
        var c = Math.round(a * this.t);
        var d = Math.round(b * this.t);
        if (this.x != c || this.w != d) {
            this.v.setAttribute("width", c.toString());
            this.v.setAttribute("height", d.toString());
            this.v.setStyleProperty("width", a.toString() + "px");
            this.v.setStyleProperty("height", b.toString() + "px");
            this.x = truncate(Math.round(c));
            this.w = truncate(Math.round(d));
        }
        if (this.o.d && this.t != 1) {
            this.o.z();
            this.o.aa(this.t, this.t);
        }
        this.o.k(this.j.fj.left, this.j.fj.top, this.j.fj.width, this.j.fj.height);
        this.a0(this.i.allPaths, this.i.translateX, this.i.translateY);
        this.a0(this.h.allPaths, this.h.translateX, this.h.translateY);
        this.a0(this.c.allPaths, this.c.translateX, this.c.translateY);
        this.a0(this.b.allPaths, this.b.translateX, this.b.translateY);
        this.a0(this.e.allPaths, this.e.translateX, this.e.translateY);
        this.a0(this.d.allPaths, this.d.translateX, this.d.translateY);
        this.a0(this.g.allPaths, this.g.translateX, this.g.translateY);
        this.a0(this.f.allPaths, this.f.translateX, this.f.translateY);
        this.a1(this.g.calloutText, this.g.textTranslateX, this.g.textTranslateY);
        this.a1(this.f.calloutText, this.f.textTranslateX, this.f.textTranslateY);
        this.ax(this.b.allPaths);
        this.ax(this.c.allPaths);
        this.ax(this.e.allPaths);
        this.ax(this.d.allPaths);
        this.ax(this.i.allPaths);
        this.ax(this.h.allPaths);
        this.ax(this.g.allPaths);
        this.ax(this.f.allPaths);
        this.ay(this.g.calloutText);
        this.ay(this.f.calloutText);
        if (this.o.d && this.t != 1) {
            this.o.y();
        }
    };
    ZoomSliderView.prototype.ay = function (a) {
        if (a.j != null) {
            this.o.z();
        }
        this.o.j(a.j);
        this.o.w(a);
        if (a.j != null) {
            this.o.y();
        }
    };
    ZoomSliderView.prototype.ax = function (a) {
        for (var b = 0; b < a.count; b++) {
            var c = a.item(b);
            if (c.j != null) {
                this.o.z();
            }
            this.o.j(c.j);
            this.o.s(c);
            if (c.j != null) {
                this.o.y();
            }
        }
    };
    ZoomSliderView.prototype.a1 = function (a, b, c) {
        if (a.j == null) {
            a.j = new TranslateTransform();
        }
        var d = a.j;
        d.j = b;
        d.k = c;
    };
    ZoomSliderView.prototype.a0 = function (a, b, c) {
        for (var d = 0; d < a.count; d++) {
            var e = a.item(d);
            if (e.j == null) {
                e.j = new TranslateTransform();
            }
            var f = e.j;
            f.j = b;
            f.k = c;
        }
    };
    ZoomSliderView.prototype.an = function () {
        var a = this.j.bi;
        var b = this.j.a4;
        if (!isNaN_(a) && a != 0) {
            return;
        }
        if (window.devicePixelRatio != undefined && window.devicePixelRatio != b) {
            this.j.a4 = window.devicePixelRatio;
        }
    };
    ZoomSliderView.prototype.au = function (a) {
        var _this = this;
        if (a == null) {
            var b = this.u;
            this.v = null;
            this.u = null;
            this.o = null;
            this.ab();
            if (this.z != -1) {
                if (b != null) {
                    b.clearTimeout(this.z);
                }
                else {
                    window.clearTimeout(this.z);
                }
                this.z = -1;
            }
            return;
        }
        this.t = (isNaN_(this.j.bi) ? this.j.a4 : this.j.bi);
        var c = a;
        this.u = c;
        this.j.l.u(this.u);
        this.u.rootWrapper.addClass("ui-zoomslider-container");
        var d = this.t;
        var e = Math.round(c.rootWrapper.width());
        var f = Math.round(c.rootWrapper.height());
        var g = e * d;
        var h = f * d;
        this.u.rootWrapper.setStyleProperty("position", "relative");
        var i = this.u.createElement("canvas");
        i.setStyleProperty("position", "absolute");
        this.u.append(i);
        this.x = truncate(Math.round(g));
        this.w = truncate(Math.round(h));
        i.setAttribute("width", g.toString());
        i.setAttribute("height", h.toString());
        i.setStyleProperty("width", e.toString() + "px");
        i.setStyleProperty("height", f.toString() + "px");
        this.v = i;
        var j = this.u.get2DCanvasContext(this.v);
        this.o = new RenderingContext(new CanvasViewRenderer(), j);
        this.o.ac(this.m);
        this.ab();
        this.a = new CanvasGestureDOMEventProxy(this.u.rootWrapper, this.u, false);
        this.a.bl = this.j.fj;
        var k = this.a;
        k.onContactStarted = delegateCombine(k.onContactStarted, runOn(this, this.ai));
        var l = this.a;
        l.onContactMoved = delegateCombine(l.onContactMoved, runOn(this, this.ah));
        var m = this.a;
        m.onContactCompleted = delegateCombine(m.onContactCompleted, runOn(this, this.ag));
        this.a.ao = function (n) { return _this.j.fh.containsPoint(n); };
        this.j.de(0, 0, e, f);
        this.s = FontUtil.getCurrentFontHeight(this.u, this.m);
        this.j.trackDirty();
        this.z = this.u.setTimeout(runOn(this, this.al), 200);
    };
    ZoomSliderView.prototype.ag = function (a, b) {
        this.j.c8(a, b);
    };
    ZoomSliderView.prototype.ah = function (a, b) {
        this.j.c9(a);
    };
    ZoomSliderView.prototype.ai = function (a, b) {
        this.j.ae(a, b);
    };
    ZoomSliderView.prototype.ab = function () {
        if (this.a != null) {
            var a = this.a;
            a.onContactStarted = delegateRemove(a.onContactStarted, runOn(this, this.ai));
            var b = this.a;
            b.onContactMoved = delegateRemove(b.onContactMoved, runOn(this, this.ah));
            var c = this.a;
            c.onContactCompleted = delegateRemove(c.onContactCompleted, runOn(this, this.ag));
            this.a.ao = null;
            this.a.av();
        }
    };
    ZoomSliderView.prototype.av = function () {
    };
    ZoomSliderView.prototype.ap = function () {
        this.aq(true);
    };
    ZoomSliderView.prototype.aq = function (a) {
        if (this.u == null || this.u.rootWrapper == null) {
            return;
        }
        this.an();
        var b = Math.round(this.u.rootWrapper.width());
        var c = Math.round(this.u.rootWrapper.height());
        var d = b != this.j.fj.width || c != this.j.fj.height;
        if (a || d) {
            this.j.de(0, 0, b, c);
            if (this.a != null) {
                this.a.bl = this.j.fj;
            }
        }
    };
    ZoomSliderView.prototype.ak = function () {
    };
    ZoomSliderView.prototype.n = function () {
        return ((function () {
            var $ret = new FontInfo();
            $ret.n = "Verdana";
            $ret.d = 10;
            return $ret;
        })());
    };
    ZoomSliderView.prototype.a3 = function (a, b, c) {
        if (a.al != b) {
            a.al = b;
        }
        if (this.l != c) {
            this.l = c;
            this.m = this.l;
            this.s = FontUtil.getCurrentFontHeight(this.u, this.m);
            this.o.ac(this.l);
            this.j.trackDirty();
        }
    };
    ZoomSliderView.prototype.ad = function () {
        if (this.k != 3) {
            this.k = 3;
            this.u.rootWrapper.setStyleProperty("cursor", "move");
        }
    };
    ZoomSliderView.prototype.af = function () {
        if (this.k != 2) {
            this.k = 2;
            this.u.rootWrapper.setStyleProperty("cursor", "ns-resize");
        }
    };
    ZoomSliderView.prototype.ac = function () {
        if (this.k != 0) {
            this.k = 0;
            this.u.rootWrapper.setStyleProperty("cursor", "inherit");
        }
    };
    ZoomSliderView.prototype.ae = function () {
        if (this.k != 1) {
            this.k = 1;
            this.u.rootWrapper.setStyleProperty("cursor", "ew-resize");
        }
    };
    ZoomSliderView.prototype.a4 = function (a) {
        var b = this.s;
        var c = this.o.f(a.al);
        return new Size(1, c, b);
    };
    ZoomSliderView.prototype.at = function () {
        this.t = this.j.a4;
        this.ao();
    };
    ZoomSliderView.prototype.az = function () {
        if (this.u == null || this.u.rootWrapper == null) {
            return;
        }
        this.u.rootWrapper.show();
    };
    ZoomSliderView.prototype.am = function () {
        if (this.u == null || this.u.rootWrapper == null) {
            return;
        }
        this.u.rootWrapper.hide();
    };
    ZoomSliderView.prototype.al = function () {
        this.z = -1;
        if (this.u == null) {
            return;
        }
        if (!this.p) {
            return;
        }
        this.aq(false);
        this.z = this.u.setTimeout(runOn(this, this.al), 200);
    };
    ZoomSliderView.$t = markType(ZoomSliderView, 'ZoomSliderView');
    return ZoomSliderView;
}(Base));
export { ZoomSliderView };
/**
 * @hidden
 */
var ZoomSlider = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(ZoomSlider, _super);
    function ZoomSlider() {
        var _this = _super.call(this) || this;
        _this.b = null;
        _this.a = null;
        _this.c = null;
        _this.g = null;
        _this.propertyChanged = null;
        _this.bk = 500;
        _this.ax = 1;
        _this.az = NaN;
        _this.ag = 1;
        _this.resolvingAxisValue = null;
        _this.fg = new Rect(0, 0, 0, 1, 1);
        _this.w = false;
        _this.af = false;
        _this.windowRectChanged = null;
        _this.i = 0;
        _this.h = 0;
        _this.ff = null;
        _this.fe = null;
        _this.fk = new Thickness(1, 5, 5, 5, 5);
        _this.fj = null;
        _this.fh = null;
        _this.fi = null;
        _this.ay = 1E-05;
        _this.a1 = 0;
        _this.al = 0;
        _this.a3 = 5;
        _this.a2 = 5;
        _this.ah = 16;
        _this.d = 0;
        _this.en = null;
        _this.av = 1;
        _this.ap = 1;
        _this.ef = null;
        _this.eo = null;
        _this.eg = null;
        _this.ep = null;
        _this.eh = null;
        _this.aw = 10;
        _this.aq = 10;
        _this.au = 22;
        _this.ao = 22;
        _this.el = null;
        _this.em = null;
        _this.at = 1;
        _this.ed = null;
        _this.ee = null;
        _this.an = 1;
        _this.d8 = null;
        _this.d9 = null;
        _this.ai = 0;
        _this.eq = null;
        _this.er = null;
        _this.a0 = 1;
        _this.es = null;
        _this.ei = null;
        _this.ek = null;
        _this.ej = null;
        _this.as = 1;
        _this.ea = null;
        _this.ec = null;
        _this.eb = null;
        _this.am = 1;
        _this.q = false;
        _this.m = null;
        _this.o = null;
        _this.k = null;
        _this.ak = 0;
        _this.aj = 0;
        _this.ar = 0;
        _this.p = false;
        _this.h = 6;
        _this.fj = Rect.empty;
        _this.fh = Rect.empty;
        _this.fi = Rect.empty;
        _this.g = new ZoomSliderView(_this);
        _this.m = _this.g.n();
        _this.b = new TrackThumb();
        _this.b.d = 0;
        _this.a = new TrackThumb();
        _this.a.d = 1;
        _this.c = new TrackThumbRange();
        _this.c.f = _this.b;
        _this.c.e = _this.a;
        _this.b.i = 0;
        _this.a.i = 1;
        _this.c.r = 1;
        _this.c.n = 0.5;
        _this.c.m = 0;
        _this.c.l = 1;
        _this.b.f = _this.c;
        _this.a.f = _this.c;
        _this.c.f = _this.b;
        _this.c.e = _this.a;
        _this.b.b = _this;
        _this.a.b = _this;
        _this.c.b = _this;
        _this.k = new DoubleAnimator(0, 1, _this.bl);
        var a = _this.k;
        a.propertyChanged = delegateCombine(a.propertyChanged, runOn(_this, _this.cx));
        _this.k.b = EasingFunctions.exponentialEase;
        return _this;
    }
    ZoomSlider.prototype.onDetachedFromUI = function () {
        this.g.as();
    };
    ZoomSlider.prototype.onAttachedToUI = function () {
        this.g.ar();
    };
    Object.defineProperty(ZoomSlider.prototype, "bl", {
        get: function () {
            return this.bk;
        },
        set: function (a) {
            var b = this.bk;
            this.bk = a;
            if (b != this.bk) {
                this.dc("PanTransitionDuration", b, this.bk);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "bg", {
        get: function () {
            return this.ax;
        },
        set: function (a) {
            var b = this.ax;
            this.ax = a;
            if (b != this.ax) {
                this.dc("MaxZoomWidth", b, this.ax);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "bi", {
        get: function () {
            return this.az;
        },
        set: function (a) {
            var b = this.az;
            this.az = a;
            if (b != this.az) {
                this.dc("PixelScalingRatio", b, this.az);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "a4", {
        get: function () {
            return this.ag;
        },
        set: function (a) {
            var b = this.ag;
            this.ag = a;
            if (b != this.ag) {
                this.dc("ActualPixelScalingRatio", b, this.ag);
            }
        },
        enumerable: false,
        configurable: true
    });
    ZoomSlider.prototype.de = function (a, b, c, d) {
        this.fj = new Rect(0, a, b, c, d);
        if (this.e == 0) {
            var e = Math.max(0, this.fj.width - (this.startInset + this.endInset));
            this.fh = new Rect(0, this.fj.left + this.startInset, this.fj.top, e, this.fj.height);
            var f = Math.max(0, this.fh.width - (this.trackStartInset + this.trackEndInset));
            this.fi = new Rect(0, this.fh.left + this.trackStartInset, this.fh.top, f, Math.max(0, this.fh.height - this.barExtent));
        }
        else {
            this.fh = new Rect(0, this.fj.left, this.fj.top + this.startInset, this.fj.width, this.fj.height - (this.startInset + this.endInset));
            this.fi = new Rect(0, this.fh.left, this.fh.top + this.trackStartInset, this.fh.width - this.barExtent, this.fh.height - (this.trackStartInset + this.trackEndInset));
        }
        this.trackDirty();
    };
    ZoomSlider.prototype.d6 = function () {
        if (!this.p) {
            return;
        }
        this.p = false;
        var a = this.g.i;
        var b = this.g.h;
        var c = this.g.c;
        var d = this.g.b;
        var e = this.g.e;
        var f = this.g.d;
        if (this.ab) {
            var g = this.bn();
            var h = this.bm();
            this.ds(g, this.b);
            this.dr(h, this.b.i);
            this.ds(h, this.a);
            this.dr(h, this.a.i);
        }
        else {
            this.d5(a, this.b);
            this.d5(b, this.a);
        }
        if (this.z) {
        }
        else {
            this.d3(c, this.c);
        }
        if (this.y) {
        }
        else {
            this.dp(d);
        }
        if (this.aa) {
        }
        else {
            this.dz(e);
            this.du(f);
        }
        this.d7();
    };
    Object.defineProperty(ZoomSlider.prototype, "windowRect", {
        get: function () {
            return this.fg;
        },
        set: function (a) {
            var b = this.fg;
            this.fg = a;
            if (Rect.l_op_Inequality(b, this.fg)) {
                this.dc("WindowRect", b, this.fg);
            }
        },
        enumerable: false,
        configurable: true
    });
    ZoomSlider.prototype.d7 = function () {
        var a = this.windowRect.width;
        var b = this.windowRect.height;
        var c = this.windowRect.left;
        var d = this.windowRect.top;
        var e = c;
        var f = d;
        var g = a;
        var h = b;
        if (this.e == 0) {
            e = this.b.i;
            g = this.c.r;
        }
        else {
            f = this.b.i;
            h = this.c.r;
        }
        if (e != c || f != d || g != a || h != b) {
            this.w = true;
            var i = this.windowRect;
            this.windowRect = new Rect(0, e, f, g, h);
            this.dg(i, this.windowRect);
            this.w = false;
        }
    };
    ZoomSlider.prototype.dg = function (a, b) {
        if (this.af) {
            return;
        }
        if (this.windowRectChanged != null) {
            this.windowRectChanged(this, new RectChangedEventArgs(a, b));
        }
    };
    ZoomSlider.prototype.c8 = function (a, b) {
        if (this.h != 6) {
            this.g.av();
        }
        this.i = this.j(a, b);
        this.h = 6;
        this.c0();
        this.c1();
    };
    ZoomSlider.prototype.c1 = function () {
        this.g.g.isVisible = false;
        this.g.ao();
    };
    ZoomSlider.prototype.c0 = function () {
        this.g.f.isVisible = false;
        this.g.ao();
    };
    ZoomSlider.prototype.da = function (a, b) {
        this.i = this.j(a, false);
    };
    ZoomSlider.prototype.ae = function (a, b) {
        this.i = this.j(a, b);
        if (this.i == 6) {
            return false;
        }
        this.cy();
        if (this.ac(this.i)) {
            this.dm(a, this.i);
            this.g.ak();
            return true;
        }
        if (this.x(this.i)) {
            return this.ad(a, this.i);
        }
        return false;
    };
    ZoomSlider.prototype.ad = function (a, b) {
        switch (b) {
            case 5:
            case 2:
            case 3:
                this.di(a);
                return true;
        }
        return false;
    };
    ZoomSlider.prototype.di = function (a) {
        var b;
        if (this.e == 0) {
            b = (a.x - this.fi.left) / this.fi.width;
        }
        else {
            b = (a.y - this.fi.top) / this.fi.height;
        }
        if (b < 0 || b > 1) {
            return;
        }
        if (b + (this.c.r / 2) > 1) {
            b = 1 - (this.c.r / 2);
        }
        if (b - (this.c.r / 2) < 0) {
            b = (this.c.r / 2);
        }
        if (this.bl > 0) {
            this.dn(b);
        }
        else {
            this.c.n = b;
        }
    };
    ZoomSlider.prototype.dm = function (a, b) {
        this.h = b;
        this.ff = a;
        this.fe = a;
    };
    ZoomSlider.prototype.ac = function (a) {
        switch (a) {
            case 0:
            case 1:
            case 4: return true;
        }
        return false;
    };
    ZoomSlider.prototype.x = function (a) {
        switch (a) {
            case 5:
            case 2:
            case 3: return true;
        }
        return false;
    };
    ZoomSlider.prototype.c9 = function (a) {
        this.i = this.j(a, false);
        if (this.h != 6) {
            if (this.e == 0) {
                this.c4(a);
            }
            else {
                this.dd(a);
            }
        }
        else {
            this.c2();
        }
    };
    ZoomSlider.prototype.c2 = function () {
        if (this.i == 4) {
            this.g.ad();
        }
        else if (this.i == 0 || this.i == 1) {
            if (this.e == 1) {
                this.g.af();
            }
            else {
                this.g.ae();
            }
        }
        else {
            this.g.ac();
        }
    };
    ZoomSlider.prototype.dd = function (a) {
        var b = a.y - this.fe.y;
        b = b / this.fi.height;
        this.fe = a;
        switch (this.h) {
            case 0:
                this.b.j(b);
                this.d1(this.b);
                this.c3();
                break;
            case 1:
                this.a.j(b);
                this.dw(this.a);
                this.c3();
                break;
            case 4:
                this.c.o(b);
                this.d1(this.b);
                this.dw(this.a);
                this.c3();
                break;
        }
    };
    ZoomSlider.prototype.dw = function (a) {
        var b;
        var c;
        if (this.e == 0) {
            b = a.i;
            c = a.i * this.fi.width + this.fi.left;
            if (this.q) {
                var d_1 = b;
                if (this.resolvingAxisValue != null) {
                    var e = ((function () {
                        var $ret = new ZoomSliderResolvingAxisValueEventArgs();
                        $ret.position = b;
                        $ret.value = d_1;
                        return $ret;
                    })());
                    this.resolvingAxisValue(this, e);
                    d_1 = e.value;
                }
                this.dk(c, this.fi.top, d_1);
            }
        }
        else {
            b = a.i;
            c = a.i * this.fi.height + this.fi.top;
            if (this.q) {
                var f_1 = b;
                if (this.resolvingAxisValue != null) {
                    var g = ((function () {
                        var $ret = new ZoomSliderResolvingAxisValueEventArgs();
                        $ret.position = b;
                        $ret.value = f_1;
                        return $ret;
                    })());
                    this.resolvingAxisValue(this, g);
                    f_1 = g.value;
                }
                this.dk(c, this.fi.top, f_1);
            }
        }
    };
    ZoomSlider.prototype.dk = function (a, b, c) {
        var d = this.g.f;
        d.isVisible = true;
        var e = "";
        if (c != null) {
            e = c.toString();
        }
        this.g.a3(d.calloutText, e, this.n());
        var f = this.g.a4(d.calloutText);
        var g = this.fl();
        f = new Size(1, f.width + g.left + g.right, f.height + g.top + g.bottom);
        var h = this.a.i * this.fi.width + this.fi.left;
        var i = this.b.i * this.fi.width + this.fi.left;
        var j = 0;
        var k = 0;
        if ((this.fj.right - h) <= f.width) {
            j = h - f.width;
        }
        else {
            j = h;
        }
        if (j < i) {
            k = this.fi.top;
        }
        else {
            k = this.fi.bottom - f.height;
        }
        d.width = f.width;
        d.height = f.height;
        d.translateX = j;
        d.translateY = k;
        d.textTranslateX = j + g.left;
        d.textTranslateY = k + g.top;
    };
    ZoomSlider.prototype.d1 = function (a) {
        var b;
        var c;
        if (this.e == 0) {
            b = a.i;
            c = a.i * this.fi.width + this.fi.left;
            if (this.q) {
                var d_2 = b;
                if (this.resolvingAxisValue != null) {
                    var e = ((function () {
                        var $ret = new ZoomSliderResolvingAxisValueEventArgs();
                        $ret.position = b;
                        $ret.value = d_2;
                        return $ret;
                    })());
                    this.resolvingAxisValue(this, e);
                    d_2 = e.value;
                }
                this.dl(c, this.fi.top, d_2);
            }
        }
        else {
            b = a.i;
            c = a.i * this.fi.height + this.fi.top;
            if (this.q) {
                var f_2 = b;
                if (this.resolvingAxisValue != null) {
                    var g = ((function () {
                        var $ret = new ZoomSliderResolvingAxisValueEventArgs();
                        $ret.position = b;
                        $ret.value = f_2;
                        return $ret;
                    })());
                    this.resolvingAxisValue(this, g);
                    f_2 = g.value;
                }
                this.dl(c, this.fi.top, f_2);
            }
        }
    };
    ZoomSlider.prototype.fl = function () {
        return this.fk;
    };
    ZoomSlider.prototype.dl = function (a, b, c) {
        var d = this.g.g;
        d.isVisible = true;
        var e = "";
        if (c != null) {
            e = c.toString();
        }
        this.g.a3(d.calloutText, e, this.n());
        var f = this.g.a4(d.calloutText);
        var g = this.fl();
        f = new Size(1, f.width + g.left + g.right, f.height + g.top + g.bottom);
        var h = this.b.i * this.fi.width + this.fi.left;
        var i = this.a.i * this.fi.width + this.fi.left;
        var j = 0;
        var k = 0;
        if (h >= f.width) {
            j = h - f.width;
        }
        else {
            j = h;
        }
        if (j > i) {
            k = this.fi.top;
        }
        else {
            k = this.fi.bottom - f.height;
        }
        d.width = f.width;
        d.height = f.height;
        d.translateX = j;
        d.translateY = k;
        d.textTranslateX = j + g.left;
        d.textTranslateY = k + g.top;
    };
    ZoomSlider.prototype.n = function () {
        if (this.o != null) {
            return this.o;
        }
        return this.m;
    };
    ZoomSlider.prototype.c4 = function (a) {
        var b = a.x - this.fe.x;
        this.fe = a;
        b = b / this.fi.width;
        switch (this.h) {
            case 0:
                this.b.j(b);
                this.d1(this.b);
                this.c3();
                break;
            case 1:
                this.a.j(b);
                this.dw(this.a);
                this.c3();
                break;
            case 4:
                this.c.o(b);
                this.d1(this.b);
                this.dw(this.a);
                this.c3();
                break;
        }
    };
    ZoomSlider.prototype.c6 = function (a) {
        this.i = this.j(a, false);
    };
    ZoomSlider.prototype.c7 = function (a) {
        this.i = this.j(a, false);
    };
    ZoomSlider.prototype.j = function (a, b) {
        if (this.v(a, this.b, this.g.i, b)) {
            return 0;
        }
        if (this.v(a, this.a, this.g.h, b)) {
            return 1;
        }
        if (this.u(a, this.c, this.g.c)) {
            return 4;
        }
        if (this.t(a, this.b)) {
            return 2;
        }
        if (this.s(a, this.a)) {
            return 3;
        }
        if (this.r(a)) {
            return 5;
        }
        return 6;
    };
    ZoomSlider.prototype.r = function (a) {
        if (this.e == 0) {
            if (a.y > this.fi.bottom && a.x >= this.fi.left && a.x <= this.fi.right && a.y <= this.fh.bottom) {
                return true;
            }
        }
        else {
            if (a.x > this.fi.right && a.y >= this.fi.top && a.y <= this.fi.bottom && a.x <= this.fh.right) {
                return true;
            }
        }
        return false;
    };
    ZoomSlider.prototype.u = function (a, b, c) {
        if (this.e == 0) {
            var d = (b.n) * this.fi.width + this.fi.left;
            var e = d - c.width / 2;
            var f = d + c.width / 2;
            if (a.y >= this.fh.top && a.y <= this.fh.bottom && a.x >= e && a.x <= f) {
                return true;
            }
        }
        else {
            var g = (b.n) * this.fi.height + this.fi.top;
            var h = g - c.height / 2;
            var i = g + c.height / 2;
            if (a.x >= this.fh.left && a.x <= this.fh.right && a.y >= h && a.y <= i) {
                return true;
            }
        }
        return false;
    };
    ZoomSlider.prototype.t = function (a, b) {
        if (this.e == 0) {
            var c = b.i * this.fi.width + this.fi.left;
            if (a.y >= this.fh.top && a.x >= this.fh.left && a.x <= this.fh.right && a.x <= c && a.y <= this.fi.bottom) {
                return true;
            }
        }
        else {
            var d = b.i * this.fi.height + this.fi.top;
            if (a.y >= this.fh.top && a.x >= this.fh.left && a.x <= this.fh.right && a.y <= d && a.x <= this.fi.right) {
                return true;
            }
        }
        return false;
    };
    ZoomSlider.prototype.s = function (a, b) {
        if (this.e == 0) {
            var c = b.i * this.fi.width + this.fi.left;
            if (a.y >= this.fh.top && a.x >= this.fh.left && a.x <= this.fh.right && a.x >= c && a.y <= this.fi.bottom) {
                return true;
            }
        }
        else {
            var d = b.i * this.fi.height + this.fi.top;
            if (a.y >= this.fh.top && a.y <= this.fh.bottom && a.x >= this.fh.left && a.x <= this.fh.right && a.y >= d && a.x <= this.fi.right) {
                return true;
            }
        }
        return false;
    };
    ZoomSlider.prototype.v = function (a, b, c, d) {
        var e = 40;
        if (this.e == 0) {
            var f = b.i * this.fi.width + this.fi.left;
            var g = this.fi.top + this.fi.height / 2;
            var h = new Rect(0, f - c.width / 2, g - c.height / 2, c.width, c.height);
            if (d) {
                if (h.width < e) {
                    h.inflate((e - h.width) / 2, 0);
                }
                if (h.height < e) {
                    h.inflate(0, (e - h.height) / 2);
                }
            }
            if (h.containsPoint(a)) {
                return true;
            }
        }
        else {
            var i = b.i * this.fi.height + this.fi.top;
            var j = this.fi.left + this.fi.width / 2;
            var k = new Rect(0, j - c.width / 2, i - c.height / 2, c.width, c.height);
            if (d) {
                if (k.width < e) {
                    k.inflate((e - k.width) / 2, 0);
                }
                if (k.height < e) {
                    k.inflate(0, (e - k.height) / 2);
                }
            }
            if (k.containsPoint(a)) {
                return true;
            }
        }
        return false;
    };
    ZoomSlider.prototype.d3 = function (a, b) {
        if (this.e == 0) {
            a.orientation = this.e;
            a.width = Math.max(15, this.fi.width * b.r);
            a.height = this.barExtent;
            a.translateX = (this.fi.left + this.fi.width * b.n);
            a.translateY = this.fi.bottom + this.barExtent / 2;
        }
        else {
            a.orientation = this.e;
            a.height = Math.max(15, this.fi.height * b.r);
            a.width = this.barExtent;
            a.translateY = (this.fi.top + this.fi.height * b.n);
            a.translateX = this.fi.right + this.barExtent / 2;
        }
    };
    ZoomSlider.prototype.du = function (a) {
        var b = this.a.i;
        if (this.e == 0) {
            var c = this.fi.left + b * this.fi.width;
            a.height = this.fi.height;
            a.translateX = c + (this.fh.right - c) / 2;
            a.translateY = this.fi.top + this.fi.height / 2;
            a.width = (this.fh.right - c);
            a.orientation = 1;
        }
        else {
            var d = this.fi.top + b * this.fi.height;
            a.width = this.fi.width;
            a.translateY = d + (this.fh.bottom - d) / 2;
            a.translateX = this.fh.left + this.fi.width / 2;
            a.height = (this.fh.bottom - d);
            a.orientation = 3;
        }
    };
    ZoomSlider.prototype.dz = function (a) {
        var b = this.b.i;
        if (this.e == 0) {
            var c = this.fi.left + b * this.fi.width;
            a.height = this.fi.height;
            a.translateX = c - (c - this.fh.left) / 2;
            a.translateY = this.fi.top + this.fi.height / 2;
            a.width = c - this.fh.left;
            a.orientation = 0;
        }
        else {
            var d = this.fi.top + b * this.fi.height;
            a.width = this.fi.width;
            a.translateY = d - (d - this.fh.top) / 2;
            a.translateX = this.fh.left + this.fi.width / 2;
            a.height = d - this.fh.top;
            a.orientation = 2;
        }
    };
    ZoomSlider.prototype.dp = function (a) {
        if (this.e == 0) {
            a.height = this.barExtent;
            a.width = this.fi.width;
            a.translateX = this.fi.left + this.fi.width / 2;
            a.translateY = this.fh.bottom - this.barExtent / 2;
        }
        else {
            a.width = this.barExtent;
            a.height = this.fi.height;
            a.translateY = this.fi.top + this.fi.height / 2;
            a.translateX = this.fh.right - this.barExtent / 2;
        }
    };
    ZoomSlider.prototype.d5 = function (a, b) {
        if (this.e == 0) {
            a.orientation = this.e;
            a.translateX = this.fi.left + this.fi.width * b.i;
            a.translateY = this.fi.top + this.fi.height / 2;
        }
        else {
            a.orientation = this.e;
            a.translateY = this.fi.top + this.fi.height * b.i;
            a.translateX = this.fi.left + this.fi.width / 2;
        }
    };
    ZoomSlider.prototype.ds = function (a, b) {
    };
    ZoomSlider.prototype.dr = function (a, b) {
    };
    ZoomSlider.prototype.bm = function () {
        throw new NotImplementedException(0);
    };
    ZoomSlider.prototype.bn = function () {
        throw new NotImplementedException(0);
    };
    Object.defineProperty(ZoomSlider.prototype, "bh", {
        get: function () {
            return this.ay;
        },
        set: function (a) {
            var b = this.ay;
            this.ay = a;
            if (b != this.ay) {
                this.dc("MinZoomWidth", b, this.ay);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "startInset", {
        get: function () {
            return this.a1;
        },
        set: function (a) {
            var b = this.a1;
            this.a1 = a;
            if (b != this.a1) {
                this.dc("StartInset", b, this.a1);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "endInset", {
        get: function () {
            return this.al;
        },
        set: function (a) {
            var b = this.al;
            this.al = a;
            if (b != this.al) {
                this.dc("EndInset", b, this.al);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "trackStartInset", {
        get: function () {
            return this.a3;
        },
        set: function (a) {
            var b = this.a3;
            this.a3 = a;
            if (b != this.a3) {
                this.dc("TrackStartInset", b, this.a3);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "trackEndInset", {
        get: function () {
            return this.a2;
        },
        set: function (a) {
            var b = this.a2;
            this.a2 = a;
            if (b != this.a2) {
                this.dc("TrackEndInset", b, this.a2);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "barExtent", {
        get: function () {
            return this.ah;
        },
        set: function (a) {
            var b = this.ah;
            this.ah = a;
            if (b != this.ah) {
                this.dc("BarExtent", b, this.ah);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e", {
        get: function () {
            return this.d;
        },
        set: function (a) {
            var b = this.d;
            this.d = a;
            if (b != this.d) {
                this.dc("Orientation", enumGetBox(ZoomSliderOrientation_$type, b), enumGetBox(ZoomSliderOrientation_$type, this.d));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e8", {
        get: function () {
            return this.en;
        },
        set: function (a) {
            var b = this.en;
            this.en = a;
            if (b != this.en) {
                this.dc("LowerThumbBrush", b, this.en);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "be", {
        get: function () {
            return this.av;
        },
        set: function (a) {
            var b = this.av;
            this.av = a;
            if (b != this.av) {
                this.dc("LowerThumbStrokeThickness", b, this.av);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "a9", {
        get: function () {
            return this.ap;
        },
        set: function (a) {
            var b = this.ap;
            this.ap = a;
            if (b != this.ap) {
                this.dc("HigherThumbStrokeThickness", b, this.ap);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e0", {
        get: function () {
            return this.ef;
        },
        set: function (a) {
            var b = this.ef;
            this.ef = a;
            if (b != this.ef) {
                this.dc("HigherThumbBrush", b, this.ef);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e9", {
        get: function () {
            return this.eo;
        },
        set: function (a) {
            var b = this.eo;
            this.eo = a;
            if (b != this.eo) {
                this.dc("LowerThumbOutline", b, this.eo);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e1", {
        get: function () {
            return this.eg;
        },
        set: function (a) {
            var b = this.eg;
            this.eg = a;
            if (b != this.eg) {
                this.dc("HigherThumbOutline", b, this.eg);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "fa", {
        get: function () {
            return this.ep;
        },
        set: function (a) {
            var b = this.ep;
            this.ep = a;
            if (b != this.ep) {
                this.dc("LowerThumbRidgesBrush", b, this.ep);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e2", {
        get: function () {
            return this.eh;
        },
        set: function (a) {
            var b = this.eh;
            this.eh = a;
            if (b != this.eh) {
                this.dc("HigherThumbRidgesBrush", b, this.eh);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "bf", {
        get: function () {
            return this.aw;
        },
        set: function (a) {
            var b = this.aw;
            this.aw = a;
            if (b != this.aw) {
                this.dc("LowerThumbWidth", b, this.aw);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "ba", {
        get: function () {
            return this.aq;
        },
        set: function (a) {
            var b = this.aq;
            this.aq = a;
            if (b != this.aq) {
                this.dc("HigherThumbWidth", b, this.aq);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "bd", {
        get: function () {
            return this.au;
        },
        set: function (a) {
            var b = this.au;
            this.au = a;
            if (b != this.au) {
                this.dc("LowerThumbHeight", b, this.au);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "a8", {
        get: function () {
            return this.ao;
        },
        set: function (a) {
            var b = this.ao;
            this.ao = a;
            if (b != this.ao) {
                this.dc("HigherThumbHeight", b, this.ao);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e6", {
        get: function () {
            return this.el;
        },
        set: function (a) {
            var b = this.el;
            this.el = a;
            if (b != this.el) {
                this.dc("LowerShadeBrush", b, this.el);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e7", {
        get: function () {
            return this.em;
        },
        set: function (a) {
            var b = this.em;
            this.em = a;
            if (b != this.em) {
                this.dc("LowerShadeOutline", b, this.em);
            }
        },
        enumerable: false,
        configurable: true
    });
    ZoomSlider.prototype.destroy = function () {
        this.provideContainer(null);
    };
    Object.defineProperty(ZoomSlider.prototype, "bc", {
        get: function () {
            return this.at;
        },
        set: function (a) {
            var b = this.at;
            this.at = a;
            if (b != this.at) {
                this.dc("LowerShadeStrokeThickness", b, this.at);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "ey", {
        get: function () {
            return this.ed;
        },
        set: function (a) {
            var b = this.ed;
            this.ed = a;
            if (b != this.ed) {
                this.dc("HigherShadeBrush", b, this.ed);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "ez", {
        get: function () {
            return this.ee;
        },
        set: function (a) {
            var b = this.ee;
            this.ee = a;
            if (b != this.ee) {
                this.dc("HigherShadeOutline", b, this.ee);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "a7", {
        get: function () {
            return this.an;
        },
        set: function (a) {
            var b = this.an;
            this.an = a;
            if (b != this.an) {
                this.dc("HigherShadeStrokeThickness", b, this.an);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "et", {
        get: function () {
            return this.d8;
        },
        set: function (a) {
            var b = this.d8;
            this.d8 = a;
            if (b != this.d8) {
                this.dc("BarBrush", b, this.d8);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "eu", {
        get: function () {
            return this.d9;
        },
        set: function (a) {
            var b = this.d9;
            this.d9 = a;
            if (b != this.d9) {
                this.dc("BarOutline", b, this.d9);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "a5", {
        get: function () {
            return this.ai;
        },
        set: function (a) {
            var b = this.ai;
            this.ai = a;
            if (b != this.ai) {
                this.dc("BarStrokeThickness", b, this.ai);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "fb", {
        get: function () {
            return this.eq;
        },
        set: function (a) {
            var b = this.eq;
            this.eq = a;
            if (b != this.eq) {
                this.dc("RangeThumbBrush", b, this.eq);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "fc", {
        get: function () {
            return this.er;
        },
        set: function (a) {
            var b = this.er;
            this.er = a;
            if (b != this.er) {
                this.dc("RangeThumbOutline", b, this.er);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "bj", {
        get: function () {
            return this.a0;
        },
        set: function (a) {
            var b = this.a0;
            this.a0 = a;
            if (b != this.a0) {
                this.dc("RangeThumbStrokeThickness", b, this.a0);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "fd", {
        get: function () {
            return this.es;
        },
        set: function (a) {
            var b = this.es;
            this.es = a;
            if (b != this.es) {
                this.dc("RangeThumbRidgesBrush", b, this.es);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e3", {
        get: function () {
            return this.ei;
        },
        set: function (a) {
            var b = this.ei;
            this.ei = a;
            if (b != this.ei) {
                this.dc("LowerCalloutBrush", b, this.ei);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e5", {
        get: function () {
            return this.ek;
        },
        set: function (a) {
            var b = this.ek;
            this.ek = a;
            if (b != this.ek) {
                this.dc("LowerCalloutTextColor", b, this.ek);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "e4", {
        get: function () {
            return this.ej;
        },
        set: function (a) {
            var b = this.ej;
            this.ej = a;
            if (b != this.ej) {
                this.dc("LowerCalloutOutline", b, this.ej);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "bb", {
        get: function () {
            return this.as;
        },
        set: function (a) {
            var b = this.as;
            this.as = a;
            if (b != this.as) {
                this.dc("LowerCalloutStrokeThickness", b, this.as);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "ev", {
        get: function () {
            return this.ea;
        },
        set: function (a) {
            var b = this.ea;
            this.ea = a;
            if (b != this.ea) {
                this.dc("HigherCalloutBrush", b, this.ea);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "ex", {
        get: function () {
            return this.ec;
        },
        set: function (a) {
            var b = this.ec;
            this.ec = a;
            if (b != this.ec) {
                this.dc("HigherCalloutTextColor", b, this.ec);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "ew", {
        get: function () {
            return this.eb;
        },
        set: function (a) {
            var b = this.eb;
            this.eb = a;
            if (b != this.eb) {
                this.dc("HigherCalloutOutline", b, this.eb);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "a6", {
        get: function () {
            return this.am;
        },
        set: function (a) {
            var b = this.am;
            this.am = a;
            if (b != this.am) {
                this.dc("HigherCalloutStrokeThickness", b, this.am);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "ab", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "z", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "y", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ZoomSlider.prototype, "aa", {
        get: function () {
            return false;
        },
        enumerable: false,
        configurable: true
    });
    ZoomSlider.prototype.dc = function (a, b, c) {
        this.dj(a, b, c);
        if (this.propertyChanged != null) {
            this.propertyChanged(this, new PropertyChangedEventArgs(a));
        }
    };
    ZoomSlider.prototype.dj = function (a, b, c) {
        switch (a) {
            case "PixelScalingRatio":
                this.a4 = this.bi;
                break;
            case "ActualPixelScalingRatio":
                if (this.g != null) {
                    this.g.at();
                }
                break;
            case "Orientation":
                this.db();
                this.trackDirty();
                break;
            case "TrackStartInset":
            case "TrackEndInset":
            case "StartInset":
            case "EndInset":
                this.c5();
                this.trackDirty();
                break;
            case "MaxZoomWidth":
            case "MinZoomWidth":
                this.dh();
                this.trackDirty();
                break;
            case "WindowRect":
                if (!this.w) {
                    this.af = true;
                    this.df();
                    this.trackDirty();
                    this.c3();
                    this.af = false;
                }
                break;
            case "LowerThumbBrush":
            case "LowerThumbOutline":
            case "LowerThumbRidgesBrush":
            case "LowerThumbStrokeThickness":
                this.d2();
                this.g.ao();
                break;
            case "LowerThumbWidth":
            case "LowerThumbHeight":
                this.g.i.width = this.bf;
                this.g.i.height = this.bd;
                this.trackDirty();
                break;
            case "HigherThumbBrush":
            case "HigherThumbOutline":
            case "HigherThumbRidgesBrush":
            case "HigherThumbStrokeThickness":
                this.dx();
                this.g.ao();
                break;
            case "HigherThumbWidth":
            case "HigherThumbHeight":
                this.g.i.width = this.bf;
                this.g.i.height = this.bd;
                this.trackDirty();
                break;
            case "LowerShadeBrush":
            case "LowerShadeOutline":
            case "LowerShadeStrokeThickness":
                this.d0();
                this.g.ao();
                break;
            case "HigherShadeBrush":
            case "HigherShadeOutline":
            case "HigherShadeStrokeThickness":
                this.dv();
                this.g.ao();
                break;
            case "RangeThumbBrush":
            case "RangeThumbOutline":
            case "RangeThumbRidgesBrush":
            case "RangeThumbStrokeThickness":
                this.d4();
                this.g.ao();
                break;
            case "BarBrush":
            case "BarOutline":
            case "BarStrokeThickness":
                this.dq();
                this.g.ao();
                break;
            case "LowerCalloutBrush":
            case "LowerCalloutOutline":
            case "LowerCalloutTextColor":
            case "LowerCalloutStrokeThickness":
                this.dy();
                this.g.ao();
                break;
            case "HigherCalloutBrush":
            case "HigherCalloutOutline":
            case "HigherCalloutTextColor":
            case "HigherCalloutStrokeThickness":
                this.dt();
                this.g.ao();
                break;
        }
    };
    ZoomSlider.prototype.dq = function () {
        var a = this.g.b;
        if (this.et == null) {
            a.barBox._fill = a.getBarBoxDefaultBrush();
        }
        else {
            a.barBox._fill = this.et;
        }
        if (this.eu == null) {
            a.barBox._stroke = a.getBarBoxDefaultOutline();
        }
        else {
            a.barBox._stroke = this.eu;
        }
        if (this.a5 == NaN) {
            a.barBox.ac = a.getBarBoxDefaultStrokeThickness();
        }
        else {
            a.barBox.ac = this.a5;
        }
    };
    ZoomSlider.prototype.dy = function () {
        var a = this.g.g;
        if (this.e3 == null) {
            a.calloutBox._fill = a.getCalloutBoxDefaultBrush();
        }
        else {
            a.calloutBox._fill = this.e3;
        }
        if (this.e4 == null) {
            a.calloutBox._stroke = a.getCalloutBoxDefaultStroke();
        }
        else {
            a.calloutBox._stroke = this.e4;
        }
        if (this.e5 == null) {
            a.calloutText.ao = a.getCalloutTextDefaultBrush();
        }
        else {
            a.calloutText.ao = this.e5;
        }
        if (this.bb == NaN) {
            a.calloutBox.ac = a.getCalloutBoxDefaultStrokeThickness();
        }
        else {
            a.calloutBox.ac = this.bb;
        }
    };
    ZoomSlider.prototype.dt = function () {
        var a = this.g.f;
        if (this.ev == null) {
            a.calloutBox._fill = a.getCalloutBoxDefaultBrush();
        }
        else {
            a.calloutBox._fill = this.ev;
        }
        if (this.ew == null) {
            a.calloutBox._stroke = a.getCalloutBoxDefaultStroke();
        }
        else {
            a.calloutBox._stroke = this.ew;
        }
        if (this.ex == null) {
            a.calloutText.ao = a.getCalloutTextDefaultBrush();
        }
        else {
            a.calloutText.ao = this.ex;
        }
        if (this.a6 == NaN) {
            a.calloutBox.ac = a.getCalloutBoxDefaultStrokeThickness();
        }
        else {
            a.calloutBox.ac = this.a6;
        }
    };
    ZoomSlider.prototype.d2 = function () {
        var a = this.g.i;
        if (this.e8 == null) {
            a.thumbBox._fill = a.getThumbBoxDefaultBrush();
        }
        else {
            a.thumbBox._fill = this.e8;
        }
        if (this.e9 == null) {
            a.thumbBox._stroke = a.getThumbBoxDefaultStroke();
        }
        else {
            a.thumbBox._stroke = this.e9;
        }
        if (this.fa == null) {
            a.thumbRidges._stroke = a.getThumbRidgesDefaultStroke();
        }
        else {
            a.thumbRidges._stroke = this.fa;
        }
        if (this.be == NaN) {
            a.thumbBox.ac = a.getThumbBoxDefaultStrokeThickness();
        }
        else {
            a.thumbBox.ac = this.be;
        }
    };
    ZoomSlider.prototype.d4 = function () {
        var a = this.g.c;
        if (this.fb == null) {
            a.thumbBox._fill = a.getThumbBoxDefaultBrush();
        }
        else {
            a.thumbBox._fill = this.fb;
        }
        if (this.fc == null) {
            a.thumbBox._stroke = a.getThumbBoxDefaultStroke();
        }
        else {
            a.thumbBox._stroke = this.fc;
        }
        if (this.fd == null) {
            a.thumbRidges._stroke = a.getThumbRidgesDefaultStroke();
        }
        else {
            a.thumbRidges._stroke = this.fd;
        }
        if (this.bj == NaN) {
            a.thumbBox.ac = a.getThumbBoxDefaultStrokeThickness();
        }
        else {
            a.thumbBox.ac = this.bj;
        }
    };
    ZoomSlider.prototype.d0 = function () {
        var a = this.g.e;
        if (this.e6 == null) {
            a.shadeBox._fill = a.getShadeBoxDefaultBrush();
        }
        else {
            a.shadeBox._fill = this.e6;
        }
        if (this.e7 == null) {
            a.shadeOutline._stroke = a.getShadeOutlineDefaultBrush();
        }
        else {
            a.shadeOutline._stroke = this.e7;
        }
        if (this.bc == NaN) {
            a.shadeOutline.ac = a.getShadeOutlineDefaultStrokeThickness();
        }
        else {
            a.shadeOutline.ac = this.bc;
        }
    };
    ZoomSlider.prototype.dv = function () {
        var a = this.g.d;
        if (this.ey == null) {
            a.shadeBox._fill = a.getShadeBoxDefaultBrush();
        }
        else {
            a.shadeBox._fill = this.ey;
        }
        if (this.ez == null) {
            a.shadeOutline._stroke = a.getShadeOutlineDefaultBrush();
        }
        else {
            a.shadeOutline._stroke = this.ez;
        }
        if (this.a7 == NaN) {
            a.shadeOutline.ac = a.getShadeOutlineDefaultStrokeThickness();
        }
        else {
            a.shadeOutline.ac = this.a7;
        }
    };
    ZoomSlider.prototype.dx = function () {
        var a = this.g.h;
        if (this.e0 == null) {
            a.thumbBox._fill = a.getThumbBoxDefaultBrush();
        }
        else {
            a.thumbBox._fill = this.e0;
        }
        if (this.e1 == null) {
            a.thumbBox._stroke = a.getThumbBoxDefaultStroke();
        }
        else {
            a.thumbBox._stroke = this.e1;
        }
        if (this.e2 == null) {
            a.thumbRidges._stroke = a.getThumbRidgesDefaultStroke();
        }
        else {
            a.thumbRidges._stroke = this.e2;
        }
        if (this.a9 == NaN) {
            a.thumbBox.ac = a.getThumbBoxDefaultStrokeThickness();
        }
        else {
            a.thumbBox.ac = this.a9;
        }
    };
    ZoomSlider.prototype.df = function () {
        if (this.w) {
            return;
        }
        if (this.e == 0) {
            this.b.i = this.windowRect.left;
            this.a.i = this.windowRect.right;
            this.c.r = this.windowRect.width;
            this.c.n = this.windowRect.left + this.windowRect.width / 2;
        }
        else {
            this.b.i = this.windowRect.top;
            this.a.i = this.windowRect.bottom;
            this.c.r = this.windowRect.height;
            this.c.n = this.windowRect.top + this.windowRect.height / 2;
        }
    };
    ZoomSlider.prototype.dh = function () {
        this.c.m = this.bh;
        this.c.l = this.bg;
    };
    ZoomSlider.prototype.c5 = function () {
        if (this.fj.isEmpty) {
            return;
        }
        this.de(this.fj.left, this.fj.top, this.fj.width, this.fj.height);
    };
    ZoomSlider.prototype.db = function () {
        if (this.e == 0) {
            this.g.i.width = this.bf;
            this.g.i.height = this.bd;
            this.g.h.width = this.ba;
            this.g.h.height = this.a8;
        }
        else {
            this.g.i.height = this.bf;
            this.g.i.width = this.bd;
            this.g.h.height = this.ba;
            this.g.h.width = this.a8;
        }
        if (this.fj.isEmpty) {
            return;
        }
        this.de(this.fj.left, this.fj.top, this.fj.width, this.fj.height);
    };
    ZoomSlider.prototype.provideContainer = function (a) {
        this.g.au(a);
    };
    ZoomSlider.prototype.notifySizeChanged = function () {
        this.g.ap();
    };
    Object.defineProperty(ZoomSlider.prototype, "l", {
        get: function () {
            return this.k;
        },
        enumerable: false,
        configurable: true
    });
    ZoomSlider.prototype.dn = function (a) {
        this.ak = a;
        this.aj = this.c.n;
        this.ar = this.aj;
        this.k.v();
    };
    ZoomSlider.prototype.cy = function () {
        if (this.k.f()) {
            this.k.w();
        }
    };
    ZoomSlider.prototype.cx = function (a, b) {
        var c = this.k.o;
        var d = this.aj + c * (this.ak - this.aj);
        var e = d - this.ar;
        this.ar = d;
        this.c.o(e);
        if (this.k.f()) {
            this.d1(this.b);
            this.dw(this.a);
            this.c3();
        }
        else {
            this.c1();
            this.c0();
        }
    };
    ZoomSlider.prototype.c3 = function () {
        this.g.aj();
    };
    ZoomSlider.prototype.trackDirty = function () {
        this.p = true;
        if (this.g == null) {
            return;
        }
        this.g.ao();
    };
    ZoomSlider.prototype.show = function () {
        if (this.g != null) {
            this.g.az();
        }
    };
    ZoomSlider.prototype.hide = function () {
        if (this.g != null) {
            this.g.am();
        }
    };
    ZoomSlider.$t = markType(ZoomSlider, 'ZoomSlider', Base.$, [ITrackOwner_$type, INotifyPropertyChanged_$type, IZoomSlider_$type]);
    return ZoomSlider;
}(Base));
export { ZoomSlider };
