"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function isOnline() {
    if (typeof navigator.onLine !== 'undefined') {
        return navigator.onLine;
    }
    // always assume it's online
    return true;
}
function isDocumentVisible() {
    if (typeof document !== 'undefined' &&
        typeof document.visibilityState !== 'undefined') {
        return document.visibilityState !== 'hidden';
    }
    // always assume it's visible
    return true;
}
var fetcher = function (url) { return fetch(url).then(function (res) { return res.json(); }); };
exports.default = {
    isOnline: isOnline,
    isDocumentVisible: isDocumentVisible,
    fetcher: fetcher
};
//# sourceMappingURL=web-preset.js.map