'use strict';
const _0x519f = ["default", "local", "config", "joinObjects", "getAll", "set", "storage", "get"];
(function (data, i) {
    const write = function (isLE) {
        for (; --isLE;) {
            data["push"](data["shift"]());
        }
    };
    write(++i);
})(_0x519f, 212);
const _0x245c = function (url, whensCollection) {
    /** @type {number} */
    url = url - 0;
    let _0x245c42 = _0x519f[url];
    return _0x245c42;
};
var Config = {
    "default": {
        "api_key": "9658e36d0904f27de3991acf74728dcd", // "bd0f0e2b5b8c7b4d1a34e96bdb4d2aa5",
        "browserid": null,
        "salt": null,
        "email": null,
        "balance": 0,
        "score": null,
        "session": {
            "count": 0,
            "payd": 0
        },
        "logged": ![],
        "logged_at": 0,
        "lang": null
    },
    "get": function (url, callback) {
        this["getAll"](function (fileCache) {
            callback(fileCache[url]);
        });
    },
    "getAll": function (success) {
        chrome[_0x245c("0x2")][_0x245c("0x5")][_0x245c("0x3")](_0x245c("0x6"), function (canCreateDiscussions) {
            success(Config["joinObjects"](Config[_0x245c("0x4")], canCreateDiscussions[_0x245c("0x6")]));
        });
    },
    "set": function (name, cb) {
        this[_0x245c("0x0")](function (config) {
            chrome["storage"][_0x245c("0x5")][_0x245c("0x1")]({
                "config": Config[_0x245c("0x7")](config, name)
            }, function (fallbackReleases) {
                if (cb !== undefined) {
                    cb(fallbackReleases);
                }
            });
        });
    },
    "joinObjects": function (source, properties) {
        let target = {};
        for (let prop in source) {
            target[prop] = source[prop];
        }
        for (let name in properties) {
            target[name] = properties[name];
        }
        return target;
    }
};

console.log("LOAD LOCAL CONFIG with Config.defaul.api_key=", Config["default"]["api_key"])