export var isOutdatedBrowser = function isOutdatedBrowser(userAgent) {
  // Take browsers in both Desktop and Mobile (includes Chrome, Firefox, Edge and Safari) within last 2 years
  var chrome = /Chrome\//.test(userAgent) && !/OPR\//.test(userAgent);
  var chromeVersion = chrome ? parseInt((userAgent.match(/Chrome\/(\d+)/) || [])[1], 10) : 0;
  if (chromeVersion >= 84) {
    return false;
  }
  var gecko = /gecko\/\d/i.test(userAgent);
  var geckoVersion = gecko ? parseInt((userAgent.match(/Firefox\/(\d+)/) || [])[1], 10) : 0;
  if (geckoVersion >= 84) {
    return false;
  }
  var edge = /Edge\/(\d+)/.exec(userAgent);
  var edgeVersion = edge ? +edge[1] : 0;
  if (edgeVersion >= 84) {
    return false;
  }
  var safari = !chrome && !gecko && /Version\/([0-9\._]+).*Safari/.test(userAgent);
  var safariVersion = safari ? parseInt((userAgent.match(/Version\/([0-9\._]+).*Safari/) || [])[1], 10) : 0;
  if (safariVersion >= 12) {
    return false;
  }
  return true;
};