/*
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 { IEnumerable$1_$type, Base, fromEnum, toEnum, Number_$type, markType, getEnumerator } from "igniteui-react-core/ES2015/type";
import { isInfinity, isNaN_ } from "igniteui-react-core/ES2015/number";
export class SafeEnumerable extends Base {
    constructor(a) {
        super();
        this.a = null;
        this.a = a;
    }
    c(a) {
        if (isInfinity(a) || isNaN_(a)) {
            return 0;
        }
        return a;
    }
    *_b() {
        if (this.a == null) {
            return undefined;
        }
        for (let a of fromEnum(this.a)) {
            yield this.c(a);
        }
    }
    b() {
        return toEnum(() => this._b());
    }
    getEnumerator() {
        return getEnumerator(this.b());
    }
    getEnumeratorObject() {
        return this.getEnumerator();
    }
}
SafeEnumerable.$t = markType(SafeEnumerable, 'SafeEnumerable', Base.$, [IEnumerable$1_$type.specialize(Number_$type)]);
