e;
        }
    };

    function setCookie(name, value, isGlobal) {
        let path;
        if (isGlobal) {
            path = 'path=/';
        } else {
            path = 'path=/shared-preferences';
        }

        document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + "; "
            + path + "; "
            + "max-age=" + COOKIE_LIFE_TIME;
    }

    function getCookie(name) {
        let matches = document.cookie.match(new RegExp(
            "(?:^|; )" + name.replace(/(