var CheckBrowserSupport;

CheckBrowserSupport = (function() {

  /* Public */
  function CheckBrowserSupport() {
    this.checkBrowser();
  }

  CheckBrowserSupport.prototype.isWebSocketsSupported = function() {
    return 'WebSocket' in window;
  };

  CheckBrowserSupport.prototype.isSVGSupported = function() {
    return (typeof document.createElementNS === "function" ? document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect : void 0) != null;
  };

  CheckBrowserSupport.prototype.isFlexboxSupported = function() {
    var cssProperties, i, len, properties, property;
    cssProperties = document.documentElement.style;
    properties = ['flexBasis', 'webkitFlexBasis', 'msFlexBasis', 'OFlexBasis', 'MozFlexBasis'];
    for (i = 0, len = properties.length; i < len; i++) {
      property = properties[i];
      if (property in cssProperties) {
        return true;
      }
    }
    return false;
  };

  CheckBrowserSupport.prototype.checkBrowser = function() {
    if (!(this.isWebSocketsSupported() && this.isSVGSupported() && this.isFlexboxSupported())) {
      document.getElementById('js_spinner-wrapper').style.display = "none";
      document.getElementById('js_disconnection-overlay').style.display = "none";
      document.getElementById('js_get-updates-overlay').style.display = "none";
      document.getElementById('no-browser').style.display = "block";
      throw new Error("Unsupported Browser");
      return window.currentBrowserIsNotSupported = true;
    }
  };

  return CheckBrowserSupport;

})();

new CheckBrowserSupport();
