"use strict";
/* NOTE: There is similar (but currently insanely convoluted)
   functionality in @cocalc/frontend/feature.ts.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.isChrome = exports.isSafari = exports.isIOS = void 0;
function isIOS() {
    if (typeof window == "undefined")
        return false;
    const { navigator } = window;
    return (navigator?.userAgent?.match(/Mac/) &&
        navigator.maxTouchPoints &&
        navigator.maxTouchPoints > 2);
}
exports.isIOS = isIOS;
function isSafari() {
    if (typeof window == "undefined")
        return false;
    if (isChrome())
        return false;
    const { navigator } = window;
    return navigator?.userAgent?.match(/Safari/);
}
exports.isSafari = isSafari;
function isChrome() {
    if (typeof window == "undefined")
        return false;
    const { navigator } = window;
    return /Chrom(e|ium)/.test(navigator?.userAgent ?? "");
}
exports.isChrome = isChrome;
//# sourceMappingURL=feature.js.map