/* eslint-disable */
function getInternetExplorerVersion(ua) {
    var msie = ua.indexOf('MSIE');
    var trident = ua.indexOf('Trident/');
    if (ua.indexOf('MSIE ') > 0) {
        return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
    }
    if (trident > 0) {
        const rv = ua.indexOf('rv:');
        return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);
    }
    return 0;
}

const ieErrorMessage = 'Microsoft no longer supports Internet Explorer. To use the Micetro web application, please switch to a different browser.';
if (getInternetExplorerVersion(navigator.userAgent) !== 0) {
    alert(ieErrorMessage);
    window.location.replace('https://microsoftedgewelcome.microsoft.com/en-us/mb04?form=MA13E6');
}
