/*
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, String_$type, markType } from "igniteui-angular-core";
import { Dictionary$2 } from "igniteui-angular-core";
import { CultureInfo } from "igniteui-angular-core";
import { parseNumber } from "igniteui-angular-core";
/**
 * @hidden
 */
var ObjectModelCommonPartHelpers_DoubleValueCache = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(ObjectModelCommonPartHelpers_DoubleValueCache, _super);
    function ObjectModelCommonPartHelpers_DoubleValueCache() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.c = new Dictionary$2(String_$type, Base.$, 0);
        _this.a = new Array(512);
        _this.d = 0;
        return _this;
    }
    ObjectModelCommonPartHelpers_DoubleValueCache.f = function (a) {
        var b = ObjectModelCommonPartHelpers_DoubleValueCache.b || (ObjectModelCommonPartHelpers_DoubleValueCache.b = new ObjectModelCommonPartHelpers_DoubleValueCache());
        var c;
        if (((function () { var d = b.c.tryGetValue(a, c); c = d.p1; return d.ret; })()) == false) {
            if (b.a[b.d] != null) {
                b.c.removeItem(b.a[b.d]);
            }
            b.a[b.d] = a;
            b.d = (b.d + 1) % 512;
            b.c.item(a, c = parseNumber(a, CultureInfo.invariantCulture));
        }
        return c;
    };
    ObjectModelCommonPartHelpers_DoubleValueCache.$t = markType(ObjectModelCommonPartHelpers_DoubleValueCache, 'ObjectModelCommonPartHelpers_DoubleValueCache');
    ObjectModelCommonPartHelpers_DoubleValueCache.b = null;
    return ObjectModelCommonPartHelpers_DoubleValueCache;
}(Base));
export { ObjectModelCommonPartHelpers_DoubleValueCache };
