/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import * as tslib_1 from "tslib";
import { HorizontalLinearScaler } from "./HorizontalLinearScaler";
import { markType } from "igniteui-react-core/ES5/type";
import { ArrayAccessHelper } from "igniteui-react-core/ES5/ArrayAccessHelper";
var FastHorizontalLinearScaler = /** @class */ (function (_super) {
    tslib_1.__extends(FastHorizontalLinearScaler, _super);
    function FastHorizontalLinearScaler() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    FastHorizontalLinearScaler.prototype.u = function (a, b, c, d, e) {
        var f;
        var g = e.e;
        var h = e.d;
        var i = e.c;
        var j = e.a;
        var k = !i.isEmpty;
        var l = this.m;
        var m = this.o;
        var n = i.left;
        var o = i.width;
        var p = g.left;
        var q = g.width;
        var r = h.left;
        var s = h.width;
        var t = 0;
        var u = 1;
        var v = ArrayAccessHelper.a(a);
        var w = false;
        if (v != null) {
            w = true;
        }
        var x;
        for (var y = 0; y < b.count; y++) {
            x = b.item(y);
            for (var z = c; z < d; z++) {
                if (w) {
                    f = v[z];
                }
                else {
                    f = a.item(z);
                }
                if (k) {
                    var aa = (f[x] - m) / (l);
                    if (j) {
                        aa = 1 - aa;
                    }
                    aa = n + o * (aa - t) / u;
                    var ab = (aa - (p * s)) / q;
                    f[x] = ab;
                }
                else {
                    var ac = (f[x] - m) / (l);
                    if (j) {
                        ac = 1 - ac;
                    }
                    ac = r + s * (ac - p) / q;
                    f[x] = ac;
                }
            }
        }
    };
    FastHorizontalLinearScaler.$t = markType(FastHorizontalLinearScaler, 'FastHorizontalLinearScaler', HorizontalLinearScaler.$);
    return FastHorizontalLinearScaler;
}(HorizontalLinearScaler));
export { FastHorizontalLinearScaler };
