/*
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 { HorizontalLinearScaler } from "./HorizontalLinearScaler";
import { markType } from "igniteui-react-core/ES2015/type";
import { ArrayAccessHelper } from "igniteui-react-core/ES2015/ArrayAccessHelper";
export class FastHorizontalLinearScaler extends HorizontalLinearScaler {
    u(a, b, c, d, e) {
        let f;
        let g = e.e;
        let h = e.d;
        let i = e.c;
        let j = e.a;
        let k = !i.isEmpty;
        let l = this.m;
        let m = this.o;
        let n = i.left;
        let o = i.width;
        let p = g.left;
        let q = g.width;
        let r = h.left;
        let s = h.width;
        let t = 0;
        let u = 1;
        let v = ArrayAccessHelper.a(a);
        let w = false;
        if (v != null) {
            w = true;
        }
        let x;
        for (let y = 0; y < b.count; y++) {
            x = b.item(y);
            for (let z = c; z < d; z++) {
                if (w) {
                    f = v[z];
                }
                else {
                    f = a.item(z);
                }
                if (k) {
                    let aa = (f[x] - m) / (l);
                    if (j) {
                        aa = 1 - aa;
                    }
                    aa = n + o * (aa - t) / u;
                    let ab = (aa - (p * s)) / q;
                    f[x] = ab;
                }
                else {
                    let 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.$);
