/**
 * DevExtreme (core/polyfills/weak_map.js)
 * Version: 16.2.15
 * Build date: Tue Mar 12 2019
 *
 * Copyright (c) 2012 - 2019 Developer Express Inc. ALL RIGHTS RESERVED
 * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
 */
"use strict";
var $ = require("jquery"),
    WeakMap = window.WeakMap;
if (!WeakMap) {
    WeakMap = function() {
        var keys = [],
            values = [];
        this.set = function(key, value) {
            var index = $.inArray(key, keys);
            if (index === -1) {
                keys.push(key);
                values.push(value)
            } else {
                values[index] = value
            }
        };
        this.get = function(key) {
            var index = $.inArray(key, keys);
            if (index === -1) {
                return
            }
            return values[index]
        };
        this.has = function(key) {
            var index = $.inArray(key, keys);
            if (index === -1) {
                return false
            }
            return true
        }
    }
}
module.exports = WeakMap;
