Uses bowser to get default browser browserInformation such as version and name
Evaluates bowser browserInfo and adds vendorPrefix browserInformation
@param {string} userAgent - userAgent that gets evaluated
480835
function getBrowserInformation(userAgent) {
  var browserInfo = _bowser2.default._detect(userAgent);

  for (var browser in prefixByBrowser) {
    if (browserInfo.hasOwnProperty(browser)) {
      var prefix = prefixByBrowser[browser];

      browserInfo.jsPrefix = prefix;
      browserInfo.cssPrefix = '-' + prefix.toLowerCase() + '-';
      break;
    }
  }

  browserInfo.browserName = getBrowserName(browserInfo);

  // For cordova IOS 8 the version is missing, set truncated osversion to prevent NaN
  if (browserInfo.version) {
    browserInfo.browserVersion = parseFloat(browserInfo.version);
  } else {
    browserInfo.browserVersion = parseInt(parseFloat(browserInfo.osversion), 10);
  }

  browserInfo.osVersion = parseFloat(browserInfo.osversion);

  // iOS forces all browsers to use Safari under the hood
  // as the Safari version seems to match the iOS version
  // we just explicitely use the osversion instead
  // https://github.com/rofrischmann/inline-style-prefixer/issues/72
  if (browserInfo.browserName === 'ios_saf' && browserInfo.browserVersion > browserInfo.osVersion) {
    browserInfo.browserVersion = browserInfo.osVersion;
  }

  // seperate native android chrome
  // https://github.com/rofrischmann/inline-style-prefixer/issues/45
  if (browserInfo.browserName === 'android' && browserInfo.chrome && browserInfo.browserVersion > 37) {
    browserInfo.browserName = 'and_chr';
  }

  // For android < 4.4 we want to check the osversion
  // not the chrome version, see issue #26
  // https://github.com/rofrischmann/inline-style-prefixer/issues/26
  if (browserInfo.browserName === 'android' && browserInfo.osVersion < 5) {
    browserInfo.browserVersion = browserInfo.osVersion;
  }

  // Samsung browser are basically build on Chrome > 44
  // https://github.com/rofrischmann/inline-style-prefixer/issues/102
  if (browserInfo.browserName === 'android' && browserInfo.samsungBrowser) {
    browserInfo.browserName = 'and_chr';
    browserInfo.browserVersion = 44;
  }

  return browserInfo;
}
1174332
function parseUseragent(ua) {

		if (!ua) {
			return null;
		}

		let platform,
		    webview = false,
		    version,
		    engine,
		    result,
		    major,
		    minor,
		    patch,
		    float,
		    index,
		    name,
		    temp,
		    os;

		ua = ua.toLowerCase();

		if (~ua.indexOf('mobile')) {
			platform = 'mobile';
		} else if (~ua.indexOf('tablet')) {
			platform = 'tablet';
		} else {
			platform = 'desktop';
		}

		if (~(index = ua.indexOf('msie'))) {
			name = 'internet explorer';
			platform = 'desktop';
		} else if (~(index = ua.indexOf('trident/'))) {
			name = 'internet explorer';
			platform = 'desktop';
			index += 13;
		} else if (~(index = ua.indexOf('edge/'))) {
			name = 'edge';
			engine = 'edgehtml';
		} else if (~(index = ua.indexOf('chrome/'))) {
			name = 'chrome';
		} else if (~(index = ua.indexOf('firefox/'))) {
			name = 'firefox';
			engine = 'gecko';
		} else if (~(index = ua.indexOf('safari/'))) {
			name = 'safari';
			index = ua.indexOf('version/');
			engine = 'webkit';
		}

		if (~index) {
			version = version_rx.exec(ua.slice(index));

			if (version) {
				float = parseFloat(version[0]);
				major = +version[1];
				minor = +version[2];
				patch = version[3] || '';
			}
		}

		if (!engine) {
			switch (name) {
				case 'internet explorer':
					engine = 'trident';
					break;

				case 'chrome':
					if (major < 28) {
						engine = 'webkit';
					} else {
						engine = 'blink';
					}
					break;
			}
		}

		if (platform != 'desktop') {
			if (~ua.indexOf('iphone') || ~ua.indexOf('ipad') || ~ua.indexOf('ipod')) {
				os = 'ios';

				if (ua.indexOf('safari') == -1) {
					webview = true;
				}
			} else if (~ua.indexOf('; wv')) {
				webview = true;
			}
		}

		result = {
			family    : name,
			version   : {
				major : major,
				minor : minor,
				patch : patch,
				float : float
			},
			platform  : platform,
			engine    : engine,
			webview   : webview,
			os        : os
		};

		return result;
	}
962255
function UserAgent(userAgent, // @arg String = navigator.userAgent
                   options) { // @arg Object = {} - { WEB_VIEW, DISPLAY_DPR, DISPLAY_LONG, DISPLAY_SHORT }
    if (UserAgent["DISABLE_CACHE"]) {
        return UserAgent_parse(userAgent, options || {});
    }
    if (!UserAgent["cache"]) {
        UserAgent["cache"] = UserAgent_parse(userAgent, options || {});
    }
    return UserAgent["cache"];
}
1175286
protected function filterBrowserVersions(array $userAgent)
    {
        // Safari and Opera 10.00+ version number is not encoded "normally"
        if (in_array($userAgent['browser_name'], ['safari', 'opera']) && stripos($userAgent['string'], ' version/')) {
            $userAgent['browser_version'] = preg_replace('|.+ version/([0-9]+(?:\.[0-9]+)?).*|i', '$1', $userAgent['string']);

            return $userAgent;
        }

        return $userAgent;
    }
932620
protected function findBrowserInDefaultTable(string $userAgent)
    {
        // Build query with default table
        $query  = 'SELECT t2.browser_id, t2.browser_parent_id FROM ';
        $query .= '(';
        $query .= 'SELECT browser_id ';
        $query .= 'FROM search ';
        $query .= 'WHERE :agent GLOB browser_pattern ';
        $query .= 'ORDER BY browser_pattern_length DESC, browser_id ';
        $query .= 'LIMIT 1';
        $query .= ') t1 ';
        $query .= 'JOIN browser t2 ON t2.browser_id = t1.browser_id';
        $statement = $this->getAdapter()->prepare($query);

        /** @noinspection PdoApiUsageInspection */
        foreach ($statement->execute(['agent' => strtolower($userAgent)]) as $row) {
            $this->browserId = (int)$row['browser_id'];
            $this->browserParentId = (int)$row['browser_parent_id'];
        }
    }
815943
public static Useragent getUserAgent(HttpServletRequest request) {
    String head = request.getHeader("USER-AGENT");
    Useragent agent = new Useragent(getIpAddr(request), Browser.parse(head), Os.parse(head));
    if (agent.getOs().equals(OsCategory.Unknown) || agent.getBrowser().equals(BrowserCategory.Unknown)) {
      logger.info("Cannot parser user agent:{}", request.getHeader("USER-AGENT"));
    }
    return agent;
  }
720782
protected function detectEngine($userAgent)
    {
        if (stripos($userAgent, 'MSIE') !== false || stripos($userAgent, 'Trident') !== false) {
            // Attempt to detect the client engine -- starting with the most popular ... for now.
            $this->engine = self::ENGINE_TRIDENT;
        } elseif (stripos($userAgent, 'Edge') !== false) {
            $this->engine = self::ENGINE_EDGE_HTML;
        } elseif (stripos($userAgent, 'Edg') !== false) {
            $this->engine = self::ENGINE_BLINK;
        } elseif (stripos($userAgent, 'AppleWebKit') !== false || stripos($userAgent, 'blackberry') !== false) {
            // Evidently blackberry uses WebKit and doesn't necessarily report it.  Bad RIM.
            $this->engine = self::ENGINE_WEBKIT;
        } elseif (stripos($userAgent, 'Chrome') !== false) {
            $result  = explode('/', stristr($userAgent, 'Chrome'));
            $version = explode(' ', $result[1]);

            if ($version[0] >= 28) {
                $this->engine = self::ENGINE_BLINK;
            } else {
                $this->engine = self::ENGINE_WEBKIT;
            }
        } elseif (stripos($userAgent, 'Gecko') !== false && stripos($userAgent, 'like Gecko') === false) {
            // We have to check for like Gecko because some other browsers spoof Gecko.
            $this->engine = self::ENGINE_GECKO;
        } elseif (stripos($userAgent, 'Opera') !== false || stripos($userAgent, 'Presto') !== false) {
            // Sometimes Opera browsers don't say Presto.
            $this->engine = self::ENGINE_PRESTO;
        } elseif (stripos($userAgent, 'KHTML') !== false) {
            // *sigh*
            $this->engine = self::ENGINE_KHTML;
        } elseif (stripos($userAgent, 'Amaya') !== false) {
            // Lesser known engine but it finishes off the major list from Wikipedia :-)
            $this->engine = self::AMAYA;
        }

        // Mark this detection routine as run.
        $this->detection['engine'] = true;
    }
544364
public static function isDesktopBrowser($userAgent)
    {
        if (self::$isDesktopBrowser !== null) {
            return self::$isDesktopBrowser;
        }

        self::$isDesktopBrowser = false;
        $userAgent              = strtolower($userAgent);

        foreach (self::$desktopBrowsers as $key) {
            if (strpos($userAgent, $key) !== false) {
                self::$isDesktopBrowser = true;
                break;
            }
        }

        return self::$isDesktopBrowser;
    }
1044654
public function detectVersion(string $useragent): VersionInterface
    {
        if (false !== mb_stripos($useragent, 'bb10') && false === mb_stripos($useragent, 'version')) {
            return (new VersionFactory())->set('10.0.0');
        }

        $searches = ['BlackBerry[0-9a-z]+', 'BlackBerry; [0-9a-z]+\/', 'BlackBerrySimulator'];

        if (false !== mb_stripos($useragent, 'bb10') || false === mb_stripos($useragent, 'opera')) {
            array_unshift($searches, 'Version');
        }

        return (new VersionFactory())->detectVersion($useragent, $searches);
    }
636205
function getBrowserInfo() {
  const ua = navigator.userAgent;
  let M =
    ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) ||
    [];
  let tem;

  if (/trident/i.test(M[1])) {
    tem = /\brv[ :]+(\d+)/g.exec(ua) || [];

    return `IE ${tem[1] || ''}`;
  }

  if (M[1] === 'Chrome') {
    tem = ua.match(/\b(OPR|Edge)\/(\d+)/);
    if (tem !== null) {
      return tem
        .slice(1)
        .join(' ')
        .replace('OPR', 'Opera');
    }
  }

  M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];
  if ((tem = ua.match(/version\/(\d+)/i)) !== null) {
    M.splice(1, 1, tem[1]);
  }

  return M.join(' ');
}
723617
private String generateUserAgent(String userAgent) {
        String title = null;
        String thisVersion = null;

        if(userAgent == null) {
            StackTraceElement[] callers = Thread.currentThread().getStackTrace();
            String module = null;
            String callerClass = null;
            int stackIdx;
            for(stackIdx = callers.length - 1; stackIdx >= 0; stackIdx--) {
                callerClass = callers[stackIdx].getClassName();
                try {
                    Class<?> clazz = Class.forName(callerClass);
                    ClassLoader classLoader = clazz.getClassLoader();
                    // skip JRE classes
                    if (classLoader == null) {
                        continue;
                    }
                    String classFilePath = callerClass.replace(".", "/") + ".class";
                    URL classUrl = classLoader.getResource(classFilePath);
                    if (classUrl != null) {
                        String classUrlPath = classUrl.getPath();
                        int jarSeparator = classUrlPath.indexOf('!');
                        if (jarSeparator > 0) {
                            module = classUrlPath.substring(0, jarSeparator);
                            // extract the last path element (the jar name only)
                            module = module.substring(module.lastIndexOf('/') + 1);
                            break;
                        }
                    }
                } catch (Exception ex) { }
            }
            userAgent = module + "!" + callerClass;
        }
        try {
            final Properties properties = new Properties();
            properties.load(this.getClass().getClassLoader().getResourceAsStream("sdk.properties"));
            thisVersion = properties.getProperty("sdk.version");
            title = properties.getProperty("sdk.name");
        } catch (IOException e) { }
        return title + "/" + thisVersion + "/" + userAgent + "/" + System.getProperty("os.name") + " "
                + System.getProperty("java.vm.name") + " " + System.getProperty("java.vendor") + " "
                + System.getProperty("java.version");
    }
115816
public static function getOperaOnAndroidVersion($userAgent, $useDefault = true)
    {
        if (preg_match('/Version\/(\d\d)/', $userAgent, $matches)) {
            $version = $matches[1];

            if (in_array($version, self::$validOperaVersions)) {
                return $version;
            }
        }

        return $useDefault ? self::OPERA_DEFAULT_VERSION : null;
    }
912854
public function detectVersion(string $useragent): VersionInterface
    {
        $doMatch = preg_match('/(?:CoreMedia v|AppleCoreMedia\/)(\d+)\.(\d+)\.(\d+)/', $useragent, $matchesFirst);

        if ($doMatch) {
            return (new VersionFactory())->set($matchesFirst[1] . '.' . $matchesFirst[2] . '.' . $matchesFirst[3]);
        }

        return (new VersionFactory())->set('0');
    }
213548
public static function clientInfo($useragent = '') {
		if (!$useragent) {
			$useragent = self::getIndpEnv('HTTP_USER_AGENT');
		}

		$bInfo = array();
			// Which browser?
		if (strpos($useragent, 'Konqueror') !== FALSE) {
			$bInfo['BROWSER'] = 'konqu';
		} elseif (strpos($useragent, 'Opera') !== FALSE) {
			$bInfo['BROWSER'] = 'opera';
		} elseif (strpos($useragent, 'MSIE') !== FALSE) {
			$bInfo['BROWSER'] = 'msie';
		} elseif (strpos($useragent, 'Mozilla') !== FALSE) {
			$bInfo['BROWSER'] = 'net';
		} elseif (strpos($useragent, 'Flash') !== FALSE) {
			$bInfo['BROWSER'] = 'flash';
		}
		if ($bInfo['BROWSER']) {
				// Browser version
			switch ($bInfo['BROWSER']) {
				case 'net':
					$bInfo['VERSION'] = doubleval(substr($useragent, 8));
					if (strpos($useragent, 'Netscape6/') !== FALSE) {
						$bInfo['VERSION'] = doubleval(substr(strstr($useragent, 'Netscape6/'), 10));
					} // Will we ever know if this was a typo or intention...?! :-(
					if (strpos($useragent, 'Netscape/6') !== FALSE) {
						$bInfo['VERSION'] = doubleval(substr(strstr($useragent, 'Netscape/6'), 10));
					}
					if (strpos($useragent, 'Netscape/7') !== FALSE) {
						$bInfo['VERSION'] = doubleval(substr(strstr($useragent, 'Netscape/7'), 9));
					}
					break;
				case 'msie':
					$tmp = strstr($useragent, 'MSIE');
					$bInfo['VERSION'] = doubleval(preg_replace('/^[^0-9]*/', '', substr($tmp, 4)));
					break;
				case 'opera':
					$tmp = strstr($useragent, 'Opera');
					$bInfo['VERSION'] = doubleval(preg_replace('/^[^0-9]*/', '', substr($tmp, 5)));
					break;
				case 'konqu':
					$tmp = strstr($useragent, 'Konqueror/');
					$bInfo['VERSION'] = doubleval(substr($tmp, 10));
					break;
			}
			// Client system
			if (strpos($useragent, 'Win') !== FALSE) {
				$bInfo['SYSTEM'] = 'win';
			} elseif (strpos($useragent, 'Mac') !== FALSE) {
				$bInfo['SYSTEM'] = 'mac';
			} elseif (strpos($useragent, 'Linux') !== FALSE || strpos($useragent, 'X11') !== FALSE || strpos($useragent, 'SGI') !== FALSE || strpos($useragent, ' SunOS ') !== FALSE || strpos($useragent, ' HP-UX ') !== FALSE) {
				$bInfo['SYSTEM'] = 'unix';
			}
		}
		// Is TRUE if the browser supports css to format forms, especially the width
		$bInfo['FORMSTYLE'] = ($bInfo['BROWSER'] == 'msie' || ($bInfo['BROWSER'] == 'net' && $bInfo['VERSION'] >= 5) || $bInfo['BROWSER'] == 'opera' || $bInfo['BROWSER'] == 'konqu');

		return $bInfo;
	}
519044
public function applyRecoveryCatchAllMatch($userAgent) {
		if (WURFL_Handlers_Utils::isDesktopBrowserHeavyDutyAnalysis($userAgent)) {
			return WURFL_Constants::GENERIC_WEB_BROWSER;
		}
		$mobile = WURFL_Handlers_Utils::isMobileBrowser($userAgent);
		$desktop = WURFL_Handlers_Utils::isDesktopBrowser($userAgent);
		
		if (!$desktop) {
			$deviceId = WURFL_Handlers_Utils::getMobileCatchAllId($userAgent);
			if ($deviceId !== WURFL_Constants::NO_MATCH) {
				return $deviceId;
			}
		}
		
		if ($mobile) return WURFL_Constants::GENERIC_MOBILE;
		if ($desktop) return WURFL_Constants::GENERIC_WEB_BROWSER;
		return WURFL_Constants::GENERIC;
	}
227157
public function detectVersion(string $useragent): VersionInterface
    {
        $doMatch = preg_match('/\((?:build )?(\d+[A-Z]\d+(?:[a-z])?)\)/i', $useragent, $matches);

        if ($doMatch) {
            $buildVersion = OSXbuild::getVersion($matches[1]);

            if (false !== $buildVersion) {
                return (new VersionFactory())->set($buildVersion);
            }
        }

        $doMatch = preg_match('/coremedia v\d+\.\d+\.\d+\.(\d+[A-Z]\d+(?:[a-z])?)/i', $useragent, $matches);

        if ($doMatch) {
            $buildVersion = OSXbuild::getVersion($matches[1]);

            if (false !== $buildVersion) {
                return (new VersionFactory())->set($buildVersion);
            }
        }

        if (false !== mb_stripos($useragent, 'darwin')) {
            $searches = [
                '/darwin\/18\.2/i' => '10.14.2',
                '/darwin\/18\.1/i' => '10.14.1',
                '/darwin\/18/i' => '10.14.0',
                '/darwin\/17\.6/i' => '10.13.6',
                '/darwin\/17\.5/i' => '10.13.5',
                '/darwin\/17\.4/i' => '10.13.4',
                '/darwin\/17\.3/i' => '10.13.3',
                '/darwin\/17\.2/i' => '10.13.2',
                '/darwin\/17\.1/i' => '10.13.1',
                '/darwin\/17/i' => '10.13.0',
                '/darwin\/16\.6/i' => '10.12.6',
                '/darwin\/16\.5/i' => '10.12.5',
                '/darwin\/16\.4/i' => '10.12.4',
                '/darwin\/16\.3/i' => '10.12.3',
                '/darwin\/16\.2/i' => '10.12.2',
                '/darwin\/16\.1/i' => '10.12.1',
                '/darwin\/16/i' => '10.12.0',
                '/darwin\/15\.6/i' => '10.11.6',
                '/darwin\/15\.5/i' => '10.11.5',
                '/darwin\/15\.4/i' => '10.11.4',
                '/darwin\/15\.3/i' => '10.11.3',
                '/darwin\/15\.2/i' => '10.11.2',
                '/darwin\/15\.1/i' => '10.11.1',
                '/darwin\/15/i' => '10.11.0',
                '/darwin\/14\.5/i' => '10.10.5',
                '/darwin\/14\.4/i' => '10.10.4',
                '/darwin\/14\.3/i' => '10.10.3',
                '/darwin\/14\.2/i' => '10.10.2',
                '/darwin\/14\.1/i' => '10.10.1',
                '/darwin\/14/i' => '10.10.0',
                '/darwin\/13\.5/i' => '10.9.5',
                '/darwin\/13\.4/i' => '10.9.4',
                '/darwin\/13\.3/i' => '10.9.3',
                '/darwin\/13\.2/i' => '10.9.2',
                '/darwin\/13\.1/i' => '10.9.1',
                '/darwin\/13/i' => '10.9.0',
                '/darwin\/12\.5/i' => '10.8.5',
                '/darwin\/12\.4/i' => '10.8.4',
                '/darwin\/12\.3/i' => '10.8.3',
                '/darwin\/12\.2/i' => '10.8.2',
                '/darwin\/12\.1/i' => '10.8.1',
                '/darwin\/12/i' => '10.8.0',
                '/darwin\/11\.4\.2/i' => '10.7.5',
                '/darwin\/11\.4/i' => '10.7.4',
                '/darwin\/11\.3/i' => '10.7.3',
                '/darwin\/11\.2/i' => '10.7.2',
                '/darwin\/11\.1/i' => '10.7.1',
                '/darwin\/11/i' => '10.7.0',
                '/darwin\/10\.8/i' => '10.6.8',
                '/darwin\/10\.7/i' => '10.6.7',
                '/darwin\/10\.6/i' => '10.6.6',
                '/darwin\/10\.5/i' => '10.6.5',
                '/darwin\/10\.4/i' => '10.6.4',
                '/darwin\/10\.3/i' => '10.6.3',
                '/darwin\/10\.2/i' => '10.6.2',
                '/darwin\/10\.1/i' => '10.6.1',
                '/darwin\/10/i' => '10.6.0',
                '/darwin\/9\.8/i' => '10.5.8',
                '/darwin\/9\.7/i' => '10.5.7',
                '/darwin\/9\.6/i' => '10.5.6',
                '/darwin\/9\.5/i' => '10.5.5',
                '/darwin\/9\.4/i' => '10.5.4',
                '/darwin\/9\.3/i' => '10.5.3',
                '/darwin\/9\.2/i' => '10.5.2',
                '/darwin\/9\.1/i' => '10.5.1',
                '/darwin\/9/i' => '10.5.0',
                '/darwin\/8\.11/i' => '10.4.11',
                '/darwin\/8\.10/i' => '10.4.10',
                '/darwin\/8\.9/i' => '10.4.9',
                '/darwin\/8\.8/i' => '10.4.8',
                '/darwin\/8\.7/i' => '10.4.7',
                '/darwin\/8\.6/i' => '10.4.6',
                '/darwin\/8\.5/i' => '10.4.5',
                '/darwin\/8\.4/i' => '10.4.4',
                '/darwin\/8\.3/i' => '10.4.3',
                '/darwin\/8\.2/i' => '10.4.2',
                '/darwin\/8\.1/i' => '10.4.1',
                '/darwin\/8/i' => '10.4.0',
                '/darwin\/7\.9/i' => '10.3.9',
                '/darwin\/7\.8/i' => '10.3.8',
                '/darwin\/7\.7/i' => '10.3.7',
                '/darwin\/7\.6/i' => '10.3.6',
                '/darwin\/7\.5/i' => '10.3.5',
                '/darwin\/7\.4/i' => '10.3.4',
                '/darwin\/7\.3/i' => '10.3.3',
                '/darwin\/7\.2/i' => '10.3.2',
                '/darwin\/7\.1/i' => '10.3.1',
                '/darwin\/7/i' => '10.3.0',
                '/darwin\/6\.8/i' => '10.2.8',
                '/darwin\/6\.7/i' => '10.2.7',
                '/darwin\/6\.6/i' => '10.2.6',
                '/darwin\/6\.5/i' => '10.2.5',
                '/darwin\/6\.4/i' => '10.2.4',
                '/darwin\/6\.3/i' => '10.2.3',
                '/darwin\/6\.2/i' => '10.2.2',
                '/darwin\/6\.1/i' => '10.2.1',
                '/darwin\/6/i' => '10.2.0',
                '/darwin\/5\.5/i' => '10.1.5',
                '/darwin\/5\.4/i' => '10.1.4',
                '/darwin\/5\.3/i' => '10.1.3',
                '/darwin\/5\.2/i' => '10.1.2',
                '/darwin\/5\.1/i' => '10.1.1',
                '/darwin\/1\.4\.1/i' => '10.1.0',
                '/darwin\/1\.3\.1/i' => '10.0.0',
            ];

            foreach ($searches as $rule => $version) {
                if (preg_match($rule, $useragent)) {
                    return (new VersionFactory())->set($version);
                }
            }
        }

        $searches = ['Mac OS X Version', 'Mac OS X v', 'Mac OS X', 'OS X', 'os=mac '];

        $detectedVersion = (new VersionFactory())->detectVersion($useragent, $searches);

        if (preg_match('/(\d{2})(\d)(\d)?/', $detectedVersion->getVersion(VersionInterface::IGNORE_MINOR), $versions)) {
            $version = $versions[1] . '.' . $versions[2];

            if (isset($versions[3])) {
                $version .= '.' . $versions[3];
            }

            return (new VersionFactory())->set($version);
        }

        return $detectedVersion;
    }
147354
public static function isDesktopBrowserHeavyDutyAnalysis($userAgent){
		// Check Smart TV keywords
		if (WURFL_Handlers_Utils::isSmartTV($userAgent)) return false;
		// Chrome
		if (WURFL_Handlers_Utils::checkIfContains($userAgent, 'Chrome') && !WURFL_Handlers_Utils::checkIfContainsAnyOf($userAgent, array('Android', 'Ventana'))) return true;
		// Check mobile keywords
		if (WURFL_Handlers_Utils::isMobileBrowser($userAgent)) return false;

		if (WURFL_Handlers_Utils::checkIfContains($userAgent, 'PPC')) return false; // PowerPC; not always mobile, but we'll kick it out
		// Firefox;  fennec is already handled in the WURFL_Constants::$MOBILE_BROWSERS keywords
		if (WURFL_Handlers_Utils::checkIfContains($userAgent, 'Firefox') && !WURFL_Handlers_Utils::checkIfContains($userAgent, 'Tablet')) return true;
		// Safari
		if (preg_match('#^Mozilla/5\.0 \((?:Macintosh|Windows)[^\)]+\) AppleWebKit/[\d\.]+ \(KHTML, like Gecko\) Version/[\d\.]+ Safari/[\d\.]+$#', $userAgent)) return true;
		// Opera Desktop
		if (WURFL_Handlers_Utils::checkIfStartsWith($userAgent, 'Opera/9.80 (Windows NT', 'Opera/9.80 (Macintosh')) return true;
		// Check desktop keywords
		if (WURFL_Handlers_Utils::isDesktopBrowser($userAgent)) return true;
		// Internet Explorer 9
		if (preg_match('/^Mozilla\/5\.0 \(compatible; MSIE 9\.0; Windows NT \d\.\d/', $userAgent)) return true;
		// Internet Explorer <9
		if (preg_match('/^Mozilla\/4\.0 \(compatible; MSIE \d\.\d; Windows NT \d\.\d/', $userAgent)) return true;
		return false;
	}