This commit is contained in:
Yamozha
2021-04-02 02:24:13 +03:00
parent c23950b545
commit 7256d79e2c
31493 changed files with 3036630 additions and 0 deletions

12
node_modules/ua-parser-js/.github/FUNDING.yml generated vendored Normal file
View File

@ -0,0 +1,12 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: ua-parser-js
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://www.paypal.me/faisalman/']

View File

@ -0,0 +1,17 @@
name: ua-parser-js-run-test
on: [push, pull_request]
jobs:
run-test:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64, ppc64le]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- name: Run the test
run: |
npm install
npm run test-ci

18
node_modules/ua-parser-js/.travis.yml generated vendored Normal file
View File

@ -0,0 +1,18 @@
arch:
- amd64
- ppc64le
language: node_js
node_js:
- stable
- lts/*
notifications:
email: false
cache:
directories:
- node_modules
sudo: false
script: npm run test-ci

17
node_modules/ua-parser-js/bower.json generated vendored Normal file
View File

@ -0,0 +1,17 @@
{
"name": "ua-parser-js",
"version": "0.7.26",
"authors": [
"Faisal Salman <f@faisalman.com>"
],
"private": false,
"main": "src/ua-parser.js",
"ignore": [
"build",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {}
}

3
node_modules/ua-parser-js/changelog.md generated vendored Normal file
View File

@ -0,0 +1,3 @@
# UAParser.js Changelog
## Version 0.8.0

1
node_modules/ua-parser-js/dist/ua-parser.html generated vendored Normal file
View File

@ -0,0 +1 @@
<script src="./ua-parser.min.js"></script>

9
node_modules/ua-parser-js/dist/ua-parser.min.js generated vendored Normal file

File diff suppressed because one or more lines are too long

9
node_modules/ua-parser-js/dist/ua-parser.pack.js generated vendored Normal file

File diff suppressed because one or more lines are too long

21
node_modules/ua-parser-js/license.md generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2012-2021 Faisal Salman <<f@faisalman.com>>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

12
node_modules/ua-parser-js/package.js generated vendored Normal file
View File

@ -0,0 +1,12 @@
Package.describe({
name: 'faisalman:ua-parser-js',
version: '0.7.26',
summary: 'Lightweight JavaScript-based user-agent string parser',
git: 'https://github.com/faisalman/ua-parser-js.git',
documentation: 'readme.md'
});
Package.onUse(function (api) {
api.addFiles("src/ua-parser.js");
api.export("UAParser");
});

153
node_modules/ua-parser-js/package.json generated vendored Normal file
View File

@ -0,0 +1,153 @@
{
"title": "UAParser.js",
"name": "ua-parser-js",
"version": "0.7.26",
"author": "Faisal Salman <f@faisalman.com> (http://faisalman.com)",
"description": "Lightweight JavaScript-based user-agent string parser",
"keywords": [
"user-agent",
"parser",
"browser",
"engine",
"os",
"device",
"cpu",
"jquery-plugin",
"ecosystem:jquery"
],
"homepage": "https://github.com/faisalman/ua-parser-js",
"contributors": [
"Aamir Poonawalla <aamir@urx.com>",
"Admas <mollases@users.noreply.github.com>",
"algenon <m@antonz.ru>",
"Alvin Portillo <portilloalvin@gmail.com>",
"Andrea Vaghi <andrea.vaghi@jobrapido.com>",
"Anton Zhiyanov <m@antonz.ru>",
"Arturo Mejia <amejia@blim.com>",
"Arun Rama Reddy <arunramareddy@gmail.com>",
"Austin Pray <austin@austinpray.com>",
"Benjamin Bertrand <bertrand.design@gmail.com>",
"Benjamin Urban <benjamin.urban@sueddeutsche.de>",
"boneyao <admin@boneyao.com>",
"Carl C Von Lewin <carlchristianlewin@gmail.com>",
"CESAR RAMOS <c@imagenproactiva.com>",
"Christopher De Cairos <chris.decairos@gmail.com>",
"Dario Vladovic <d.vladimyr@gmail.com>",
"Davit Barbakadze <jayarjo@gmail.com>",
"ddivernois <david-emmanuel.divernois@amadeus.com>",
"Demis Palma <demis.palma@gmail.com>",
"dhoko <aurelien@protonmail.com>",
"dianhe <dianhe@webank.com>",
"Dmitry Tyschenko <dtyschenko@gmail.com>",
"Douglas Li <doug@knotch.it>",
"Dumitru Uzun <contact@duzun.me>",
"Eric Schrenker <eric.schrenker@gmail.com>",
"Erik Hesselink <hesselink@gmail.com>",
"Fabian Becker <halfdan@xnorfz.de>",
"Faisal Salman <fyzlman@gmail.com>",
"Frédéric Camblor <fcamblor@gmail.com>",
"Germán M. Bravo <german.mb@gmail.com>",
"Grigory Dmitrenko <grigory@snsk.ru>",
"Hendrik Helwich <h.helwich@iplabs.de>",
"Hermann Ebert <ebbmo@HE.local>",
"jackpoll <jackpoll123456@gmail.com>",
"Jake Mc <startswithaj@users.noreply.github.com>",
"John Tantalo <john.tantalo@gmail.com>",
"John Yanarella <jmy@codecatalyst.com>",
"Jon Buckley <jon@jbuckley.ca>",
"Kendall Buchanan <kendall@kendagriff.com>",
"Lee Treveil <leetreveil@gmail.com>",
"leonardo <leofiore@libero.it>",
"Levente Balogh <balogh.levente.hu@gmail.com>",
"Liam Quinn <lquinn@blackberry.com>",
"Lithin <lithin@webklipper.com>",
"Loris Guignard <loris.guignard@gmail.com>",
"Lukas Drgon <lukas.drgon@gmail.com>",
"Lukas Eipert <leipert@users.noreply.github.com>",
"Malash <i@malash.me>",
"Martynas <martynas@firmfirm.co>",
"Matt Brophy <matt@brophy.org>",
"Max Maurer <maxemanuel.maurer@gmail.com>",
"Maximilian Haupt <mail@maximilianhaupt.com>",
"Michael Hess <mhess@connectify.me>",
"naoh <naoh.cs03g@nctu.edu.tw>",
"Nik Rolls <nik@rolls.cc>",
"Nikhil Motiani <nikhil.m@247-inc.com>",
"niris <nirisix@gmail.com>",
"Nobuo Okada <nookada@yahoo-corp.jp>",
"otakuSiD <otakusid@gmail.com>",
"Peter Dave Hello <PeterDaveHello@users.noreply.github.com>",
"philippsimon <github@philippsimon.de>",
"Pieter Hendrickx <pieter.hendrickx@belfius.be>",
"Piper Chester <piperchester@gmail.com>",
"Robert Tod <robert@qubit.com>",
"Ron Korland <ron@testim.io>",
"Ross Noble <rosshnoble@gmail.com>",
"Sandro Sonntag <sandro.sonntag@adorsys.de>",
"sgautrea <shanegautreau@gmail.com>",
"Shane Gautreau <sgautrea@opentext.com>",
"Shane Thacker <shane@steadymade.com>",
"shchotse <topal@mail.ua>",
"Simon Eisenmann <simon@longsleep.org>",
"Simon Lang <me@simonlang.org>",
"Stiekel <histkc@gmail.com>",
"Sylvain Gizard <sylvain.gizard@gmail.com>",
"szchenghuang <szchenghuang@gmail.com>",
"Vadim Kurachevsky <vadim@hmvs.org>",
"Yun Young-jin <yupmin@yupmin-office-macmini.local>",
"Insanehong <insae.hong@navercorp.com>"
],
"main": "src/ua-parser.js",
"scripts": {
"build": "uglifyjs src/ua-parser.js -o dist/ua-parser.min.js --comments && uglifyjs src/ua-parser.js -o dist/ua-parser.pack.js --comments --compress --mangle",
"test": "jshint src/ua-parser.js && mocha -R nyan test/test.js",
"test-ci": "jshint src/ua-parser.js && mocha -R spec test/test.js",
"verup": "node ./node_modules/verup",
"version": "node ./node_modules/verup 0"
},
"verup": {
"files": [
"bower.json",
"package.js",
"src/ua-parser.js"
],
"regs": [
"^((?:\\$|(\\s*\\*\\s*@)|(\\s*(?:var|,)?\\s+))(?:LIBVERSION|version)[\\s\\:='\"]+)([0-9]+(?:\\.[0-9]+){2,2})",
"^(\\s?\\*.*v)([0-9]+(?:\\.[0-9]+){2,2})"
]
},
"devDependencies": {
"jshint": "~2.12.0",
"mocha": "~8.2.0",
"requirejs": "^2.3.2",
"safe-regex": "^2.1.1",
"uglify-js": "~3.12.0",
"verup": "^1.3.x"
},
"repository": {
"type": "git",
"url": "https://github.com/faisalman/ua-parser-js.git"
},
"license": "MIT",
"engines": {
"node": "*"
},
"directories": {
"dist": "dist",
"src": "src",
"test": "test"
},
"bugs": "https://github.com/faisalman/ua-parser-js/issues",
"demo": "https://faisalman.github.io/ua-parser-js",
"download": "https://raw.github.com/faisalman/ua-parser-js/master/dist/ua-parser.min.js",
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/ua-parser-js"
},
{
"type": "paypal",
"url": "https://paypal.me/faisalman"
}
]
}

308
node_modules/ua-parser-js/readme.md generated vendored Normal file
View File

@ -0,0 +1,308 @@
<p align="center">
<img src="https://raw.githubusercontent.com/faisalman/ua-parser-js/gh-pages/images/logo.png" width="256" height="256">
</p>
<p align="center">
<a href="https://travis-ci.org/faisalman/ua-parser-js"><img src="https://travis-ci.org/faisalman/ua-parser-js.svg?branch=master"></a>
<a href="https://www.npmjs.com/package/ua-parser-js"><img src="https://img.shields.io/npm/v/ua-parser-js.svg"></a>
<a href="https://www.npmjs.com/package/ua-parser-js"><img src="https://img.shields.io/npm/dw/ua-parser-js.svg"></a>
<a href="https://www.jsdelivr.com/package/npm/ua-parser-js"><img src="https://data.jsdelivr.com/v1/package/npm/ua-parser-js/badge"></a>
<a href="https://cdnjs.com/libraries/UAParser.js"><img src="https://img.shields.io/cdnjs/v/UAParser.js.svg"></a>
</p>
# UAParser.js
JavaScript library to detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data with relatively small footprint (~17KB minified, ~6KB gzipped) that can be used either in browser (client-side) or node.js (server-side).
* Author : Faisal Salman <<f@faisalman.com>>
* Demo : http://faisalman.github.io/ua-parser-js
* Source : https://github.com/faisalman/ua-parser-js
# Documentation
## Constructor
* `new UAParser([uastring][,extensions])`
* returns new instance
* `UAParser([uastring][,extensions])`
* returns result object `{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`
## Methods
* `getBrowser()`
* returns `{ name: '', version: '' }`
```sh
# Possible 'browser.name':
2345Explorer, 360 Browser, Amaya, Android Browser, Arora, Avant, Avast, AVG,
BIDUBrowser, Baidu, Basilisk, Blazer, Bolt, Brave, Bowser, Camino, Chimera,
Chrome Headless, Chrome WebView, Chrome, Chromium, Comodo Dragon, Dillo,
Dolphin, Doris, Edge, Electron, Epiphany, Facebook, Falkon, Fennec, Firebird,
Firefox, Flock, GSA, GoBrowser, ICE Browser, IE, IEMobile, IceApe, IceCat,
IceDragon, Iceape, Iceweasel, Instagram, Iridium, Iron, Jasmine, K-Meleon,
Kindle, Konqueror, LBBROWSER, Line, Links, Lunascape, Lynx, MIUI Browser,
Maemo Browser, Maemo, Maxthon, MetaSr Midori, Minimo, Mobile Safari, Mosaic,
Mozilla, NetFront, NetSurf, Netfront, Netscape, NokiaBrowser, Oculus Browser,
OmniWeb, Opera Coast, Opera Mini, Opera Mobi, Opera Tablet, Opera, PaleMoon,
PhantomJS, Phoenix, Polaris, Puffin, QQ, QQBrowser, QQBrowserLite, Quark,
QupZilla, RockMelt, Safari, Sailfish Browser, Samsung Browser, SeaMonkey, Silk,
Skyfire, Sleipnir, Slim, SlimBrowser, Swiftfox, Tizen Browser, UCBrowser,
Vivaldi, Waterfox, WeChat, Weibo, Yandex, baidu, iCab, w3m, Whale Browser...
# 'browser.version' determined dynamically
```
* `getDevice()`
* returns `{ model: '', type: '', vendor: '' }`
```sh
# Possible 'device.type':
console, mobile, tablet, smarttv, wearable, embedded
# Possible 'device.vendor':
Acer, Alcatel, Amazon, Apple, Archos, ASUS, AT&T, BenQ, BlackBerry, Dell,
Essential, GeeksPhone, Google, HP, HTC, Huawei, Jolla, Lenovo, LG, Meizu,
Microsoft, Motorola, Nexian, Nintendo, Nokia, Nvidia, OnePlus, OPPO, Ouya,
Palm, Panasonic, Pebble, Polytron, Realme, RIM, Samsung, Sharp, Siemens,
Sony[Ericsson], Sprint, Vivo, Vodafone, Xbox, Xiaomi, Zebra, ZTE, ...
# 'device.model' determined dynamically
```
* `getEngine()`
* returns `{ name: '', version: '' }`
```sh
# Possible 'engine.name'
Amaya, Blink, EdgeHTML, Gecko, Goanna, iCab, KHTML, Links, Lynx, NetFront,
NetSurf, Presto, Tasman, Trident, w3m, WebKit
# 'engine.version' determined dynamically
```
* `getOS()`
* returns `{ name: '', version: '' }`
```sh
# Possible 'os.name'
AIX, Amiga OS, Android, Arch, Bada, BeOS, BlackBerry, CentOS, Chromium OS,
Contiki, Fedora, Firefox OS, FreeBSD, Debian, DragonFly, Fuchsia, Gentoo, GNU,
Haiku, Hurd, iOS, Joli, KaiOS, Linpus, Linux, Mac OS, Mageia, Mandriva, MeeGo,
Minix, Mint, Morph OS, NetBSD, Nintendo, OpenBSD, OpenVMS, OS/2, Palm, PC-BSD,
PCLinuxOS, Plan9, PlayStation, QNX, Raspbian, RedHat, RIM Tablet OS, RISC OS,
Sailfish, Series40, Slackware, Solaris, SUSE, Symbian, Tizen, Ubuntu, Unix,
VectorLinux, WebOS, Windows [Phone/Mobile], Zenwalk, ...
# 'os.version' determined dynamically
```
* `getCPU()`
* returns `{ architecture: '' }`
```sh
# Possible 'cpu.architecture'
68k, amd64, arm[64/hf], avr, ia[32/64], irix[64], mips[64], pa-risc, ppc, sparc[64]
```
* `getResult()`
* returns `{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`
* `getUA()`
* returns UA string of current instance
* `setUA(uastring)`
* set UA string to be parsed
* returns current instance
# Usage
## Using HTML
```html
<!doctype html>
<html>
<head>
<script src="ua-parser.min.js"></script>
<script>
var parser = new UAParser();
console.log(parser.getResult());
/*
/// This will print an object structured like this:
{
ua: "",
browser: {
name: "",
version: "",
major: "" //@deprecated
},
engine: {
name: "",
version: ""
},
os: {
name: "",
version: ""
},
device: {
model: "",
type: "",
vendor: ""
},
cpu: {
architecture: ""
}
}
*/
// Default result depends on current window.navigator.userAgent value
// Now let's try a custom user-agent string as an example
var uastring1 = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.2 (KHTML, like Gecko) Ubuntu/11.10 Chromium/15.0.874.106 Chrome/15.0.874.106 Safari/535.2";
parser.setUA(uastring1);
var result = parser.getResult();
// You can also use UAParser constructor directly without having to create an instance:
// var result = UAParser(uastring1);
console.log(result.browser); // {name: "Chromium", version: "15.0.874.106"}
console.log(result.device); // {model: undefined, type: undefined, vendor: undefined}
console.log(result.os); // {name: "Ubuntu", version: "11.10"}
console.log(result.os.version); // "11.10"
console.log(result.engine.name); // "WebKit"
console.log(result.cpu.architecture); // "amd64"
// Do some other tests
var uastring2 = "Mozilla/5.0 (compatible; Konqueror/4.1; OpenBSD) KHTML/4.1.4 (like Gecko)";
console.log(parser.setUA(uastring2).getBrowser().name); // "Konqueror"
console.log(parser.getOS()); // {name: "OpenBSD", version: undefined}
console.log(parser.getEngine()); // {name: "KHTML", version: "4.1.4"}
var uastring3 = 'Mozilla/5.0 (PlayBook; U; RIM Tablet OS 1.0.0; en-US) AppleWebKit/534.11 (KHTML, like Gecko) Version/7.1.0.7 Safari/534.11';
console.log(parser.setUA(uastring3).getDevice().model); // "PlayBook"
console.log(parser.getOS()) // {name: "RIM Tablet OS", version: "1.0.0"}
console.log(parser.getBrowser().name); // "Safari"
</script>
</head>
<body>
</body>
</html>
```
## Using node.js
```sh
$ npm install ua-parser-js
```
```js
var http = require('http');
var parser = require('ua-parser-js');
http.createServer(function (req, res) {
// get user-agent header
var ua = parser(req.headers['user-agent']);
// write the result as response
res.end(JSON.stringify(ua, null, ' '));
})
.listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');
```
## Using TypeScript
```sh
$ npm install --save @types/ua-parser-js
# Download TS type definition from DefinitelyTyped repository:
# https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ua-parser-js
```
## Using jQuery/Zepto ($.ua)
Although written in vanilla js, this library will automatically detect if jQuery/Zepto is present and create `$.ua` object (with values based on its User-Agent) along with `window.UAParser` constructor. To get/set user-agent you can use: `$.ua.get()` / `$.ua.set(uastring)`.
```js
// Say we are in a browser with default user-agent: 'Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Sprint APA7373KT Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0':
// Get the details
console.log($.ua.device); // {vendor: "HTC", model: "Evo Shift 4G", type: "mobile"}
console.log($.ua.os); // {name: "Android", version: "2.3.4"}
console.log($.ua.os.name); // "Android"
console.log($.ua.get()); // "Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; Sprint APA7373KT Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0"
// Now lets try to reset to another custom user-agent
$.ua.set('Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; Xoom Build/HWI69) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13');
// Test again
console.log($.ua.browser.name); // "Safari"
console.log($.ua.engine.name); // "Webkit"
console.log($.ua.device); // {vendor: "Motorola", model: "Xoom", type: "tablet"}
console.log(parseInt($.ua.browser.version.split('.')[0], 10)); // 4
// Add class to <body> tag
// <body class="ua-browser-safari ua-devicetype-tablet">
$('body').addClass('ua-browser-' + $.ua.browser.name + ' ua-devicetype-' + $.ua.device.type);
```
## Using Extension
* `UAParser([uastring,] extensions)`
```js
// Example:
var myOwnListOfBrowsers = [
[/(mybrowser)\/([\w\.]+)/i], [UAParser.BROWSER.NAME, UAParser.BROWSER.VERSION]
];
var myParser = new UAParser({ browser: myOwnListOfBrowsers });
var myUA = 'Mozilla/5.0 MyBrowser/1.3';
console.log(myParser.setUA(myUA).getBrowser()); // {name: "MyBrowser", version: "1.3"}
```
# Development
## Sponsors
<a href="https://opencollective.com/ua-parser-js"><img src="https://opencollective.com/ua-parser-js/tiers/backers.svg?avatarHeight=64" height="80"/></a> <a href="https://opencollective.com/ua-parser-js"><img src="https://opencollective.com/ua-parser-js/tiers/sponsors.svg?avatarHeight=64" height="80"/></a>
<a href="https://www.paypal.me/faisalman/"><img src="https://cdn.rawgit.com/twolfson/paypal-github-button/1.0.0/dist/button.svg" height="40"></a>
## Contributors
<a href="https://github.com/faisalman/ua-parser-js/graphs/contributors">
<img src="https://contrib.rocks/image?repo=faisalman/ua-parser-js" />
</a>
Made with [contributors-img](https://contrib.rocks).
## How To Contribute
* Fork and clone this repository
* Make some changes as required
* Write unit test to showcase its functionality
* Run the test suites to make sure it's not breaking anything `$ npm test`
* Submit a pull request under `develop` branch
# License
MIT License
Copyright (c) 2012-2021 Faisal Salman <<f@faisalman.com>>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

897
node_modules/ua-parser-js/src/ua-parser.js generated vendored Normal file
View File

@ -0,0 +1,897 @@
/*!@license
* UAParser.js v0.7.26
* Lightweight JavaScript-based User-Agent string parser
* https://github.com/faisalman/ua-parser-js
*
* Copyright © 2012-2021 Faisal Salman <f@faisalman.com>
* Licensed under MIT License
*/
(function (window, undefined) {
'use strict';
//////////////
// Constants
/////////////
var LIBVERSION = '0.7.26',
EMPTY = '',
UNKNOWN = '?',
FUNC_TYPE = 'function',
UNDEF_TYPE = 'undefined',
OBJ_TYPE = 'object',
STR_TYPE = 'string',
MAJOR = 'major', // deprecated
MODEL = 'model',
NAME = 'name',
TYPE = 'type',
VENDOR = 'vendor',
VERSION = 'version',
ARCHITECTURE= 'architecture',
CONSOLE = 'console',
MOBILE = 'mobile',
TABLET = 'tablet',
SMARTTV = 'smarttv',
WEARABLE = 'wearable',
EMBEDDED = 'embedded',
UA_MAX_LENGTH = 255;
///////////
// Helper
//////////
var util = {
extend : function (regexes, extensions) {
var mergedRegexes = {};
for (var i in regexes) {
if (extensions[i] && extensions[i].length % 2 === 0) {
mergedRegexes[i] = extensions[i].concat(regexes[i]);
} else {
mergedRegexes[i] = regexes[i];
}
}
return mergedRegexes;
},
has : function (str1, str2) {
return typeof str1 === STR_TYPE ? str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1 : false;
},
lowerize : function (str) {
return str.toLowerCase();
},
major : function (version) {
return typeof(version) === STR_TYPE ? version.replace(/[^\d\.]/g,'').split(".")[0] : undefined;
},
trim : function (str, len) {
str = str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
return typeof(len) === UNDEF_TYPE ? str : str.substring(0, UA_MAX_LENGTH);
}
};
///////////////
// Map helper
//////////////
var mapper = {
rgx : function (ua, arrays) {
var i = 0, j, k, p, q, matches, match;
// loop through all regexes maps
while (i < arrays.length && !matches) {
var regex = arrays[i], // even sequence (0,2,4,..)
props = arrays[i + 1]; // odd sequence (1,3,5,..)
j = k = 0;
// try matching uastring with regexes
while (j < regex.length && !matches) {
matches = regex[j++].exec(ua);
if (!!matches) {
for (p = 0; p < props.length; p++) {
match = matches[++k];
q = props[p];
// check if given property is actually array
if (typeof q === OBJ_TYPE && q.length > 0) {
if (q.length == 2) {
if (typeof q[1] == FUNC_TYPE) {
// assign modified match
this[q[0]] = q[1].call(this, match);
} else {
// assign given value, ignore regex match
this[q[0]] = q[1];
}
} else if (q.length == 3) {
// check whether function or regex
if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {
// call function (usually string mapper)
this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;
} else {
// sanitize match using given regex
this[q[0]] = match ? match.replace(q[1], q[2]) : undefined;
}
} else if (q.length == 4) {
this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;
}
} else {
this[q] = match ? match : undefined;
}
}
}
}
i += 2;
}
},
str : function (str, map) {
for (var i in map) {
// check if array
if (typeof map[i] === OBJ_TYPE && map[i].length > 0) {
for (var j = 0; j < map[i].length; j++) {
if (util.has(map[i][j], str)) {
return (i === UNKNOWN) ? undefined : i;
}
}
} else if (util.has(map[i], str)) {
return (i === UNKNOWN) ? undefined : i;
}
}
return str;
}
};
///////////////
// String map
//////////////
var maps = {
browser : {
// Safari < 3.0
oldSafari : {
version : {
'1.0' : '/8',
'1.2' : '/1',
'1.3' : '/3',
'2.0' : '/412',
'2.0.2' : '/416',
'2.0.3' : '/417',
'2.0.4' : '/419',
'?' : '/'
}
},
oldEdge : {
version : {
'0.1' : '12.',
'21' : '13.',
'31' : '14.',
'39' : '15.',
'41' : '16.',
'42' : '17.',
'44' : '18.'
}
}
},
os : {
windows : {
version : {
'ME' : '4.90',
'NT 3.11' : 'NT3.51',
'NT 4.0' : 'NT4.0',
'2000' : 'NT 5.0',
'XP' : ['NT 5.1', 'NT 5.2'],
'Vista' : 'NT 6.0',
'7' : 'NT 6.1',
'8' : 'NT 6.2',
'8.1' : 'NT 6.3',
'10' : ['NT 6.4', 'NT 10.0'],
'RT' : 'ARM'
}
}
}
};
//////////////
// Regex map
/////////////
var regexes = {
browser : [[
/\b(?:crmo|crios)\/([\w\.]+)/i // Chrome for Android/iOS
], [VERSION, [NAME, 'Chrome']], [
/(?:edgios|edga|edg)\/([\w\.]+)/i // Microsoft Edge
], [VERSION, [NAME, 'Edge']], [
/edge\/([\w\.]+)/i // Old Edge (Trident)
], [[VERSION, mapper.str, maps.browser.oldEdge.version], [NAME, 'Edge']], [
// Presto based
/(opera\smini)\/([\w\.-]+)/i, // Opera Mini
/(opera\s[mobiletab]{3,6})\b.+version\/([\w\.-]+)/i, // Opera Mobi/Tablet
/(opera).+version\/([\w\.]+)/i, // Opera > 9.80
/(opera)[\/\s]+([\w\.]+)/i // Opera < 9.80
], [NAME, VERSION], [
/opios[\/\s]+([\w\.]+)/i // Opera mini on iphone >= 8.0
], [VERSION, [NAME, 'Opera Mini']], [
/\sopr\/([\w\.]+)/i // Opera Webkit
], [VERSION, [NAME, 'Opera']], [
// Mixed
/(kindle)\/([\w\.]+)/i, // Kindle
/(lunascape|maxthon|netfront|jasmine|blazer|instagram)[\/\s]?([\w\.]*)/i, // Lunascape/Maxthon/Netfront/Jasmine/Blazer/Instagram
// Trident based
/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i, // Avant/IEMobile/SlimBrowser
/(ba?idubrowser)[\/\s]?([\w\.]+)/i, // Baidu Browser
/(?:ms|\()(ie)\s([\w\.]+)/i, // Internet Explorer
// Webkit/KHTML based
/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,
// Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon
/(rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i, // Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ, aka ShouQ
/(weibo)__([\d\.]+)/i // Weibo
], [NAME, VERSION], [
/(?:[\s\/]uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i // UCBrowser
], [VERSION, [NAME, 'UCBrowser']], [
/(?:windowswechat)?\sqbcore\/([\w\.]+)\b.*(?:windowswechat)?/i // WeChat Desktop for Windows Built-in Browser
], [VERSION, [NAME, 'WeChat(Win) Desktop']], [
/micromessenger\/([\w\.]+)/i // WeChat
], [VERSION, [NAME, 'WeChat']], [
/konqueror\/([\w\.]+)/i // Konqueror
], [VERSION, [NAME, 'Konqueror']], [
/trident.+rv[:\s]([\w\.]{1,9})\b.+like\sgecko/i // IE11
], [VERSION, [NAME, 'IE']], [
/yabrowser\/([\w\.]+)/i // Yandex
], [VERSION, [NAME, 'Yandex']], [
/(avast|avg)\/([\w\.]+)/i // Avast/AVG Secure Browser
], [[NAME, /(.+)/, '$1 Secure Browser'], VERSION], [
/focus\/([\w\.]+)/i // Firefox Focus
], [VERSION, [NAME, 'Firefox Focus']], [
/opt\/([\w\.]+)/i // Opera Touch
], [VERSION, [NAME, 'Opera Touch']], [
/coc_coc_browser\/([\w\.]+)/i // Coc Coc Browser
], [VERSION, [NAME, 'Coc Coc']], [
/dolfin\/([\w\.]+)/i // Dolphin
], [VERSION, [NAME, 'Dolphin']], [
/coast\/([\w\.]+)/i // Opera Coast
], [VERSION, [NAME, 'Opera Coast']],
[/xiaomi\/miuibrowser\/([\w\.]+)/i // MIUI Browser
], [VERSION, [NAME, 'MIUI Browser']], [
/fxios\/([\w\.-]+)/i // Firefox for iOS
], [VERSION, [NAME, 'Firefox']], [
/(qihu|qhbrowser|qihoobrowser|360browser)/i // 360
], [[NAME, '360 Browser']], [
/(oculus|samsung|sailfish)browser\/([\w\.]+)/i
], [[NAME, /(.+)/, '$1 Browser'], VERSION], [ // Oculus/Samsung/Sailfish Browser
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon
], [[NAME, /_/g, ' '], VERSION], [
/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i // QQBrowser/Baidu App/2345 Browser
], [NAME, VERSION], [
/(MetaSr)[\/\s]?([\w\.]+)/i, // SouGouBrowser
/(LBBROWSER)/i // LieBao Browser
], [NAME], [
// WebView
/;fbav\/([\w\.]+);/i // Facebook App for iOS & Android with version
], [VERSION, [NAME, 'Facebook']], [
/FBAN\/FBIOS|FB_IAB\/FB4A/i // Facebook App for iOS & Android without version
], [[NAME, 'Facebook']], [
/\s(electron)\/([\w\.]+)\ssafari/i, // Electron-based App
/safari\s(line)\/([\w\.]+)/i, // Line App for iOS
/\b(line)\/([\w\.]+)\/iab/i // Line App for Android
], [NAME, VERSION], [
/\bgsa\/([\w\.]+)\s.*safari\//i // Google Search Appliance on iOS
], [VERSION, [NAME, 'GSA']], [
/headlesschrome(?:\/([\w\.]+)|\s)/i // Chrome Headless
], [VERSION, [NAME, 'Chrome Headless']], [
/\swv\).+(chrome)\/([\w\.]+)/i // Chrome WebView
], [[NAME, 'Chrome WebView'], VERSION], [
/droid.+\sversion\/([\w\.]+)\b.+(?:mobile\ssafari|safari)/i // Android Browser
], [VERSION, [NAME, 'Android Browser']], [
/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i // Chrome/OmniWeb/Arora/Tizen/Nokia
], [NAME, VERSION], [
/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i // Mobile Safari
], [VERSION, [NAME, 'Mobile Safari']], [
/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i // Safari & Safari Mobile
], [VERSION, NAME], [
/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i // Safari < 3.0
], [NAME, [VERSION, mapper.str, maps.browser.oldSafari.version]], [
/(webkit|khtml)\/([\w\.]+)/i
], [NAME, VERSION], [
// Gecko based
/(navigator|netscape)\/([\w\.-]+)/i // Netscape
], [[NAME, 'Netscape'], VERSION], [
/(swiftfox)/i, // Swiftfox
/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,
// IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror
/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,
// Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix
/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i, // Other Firefox-based
/(mozilla)\/([\w\.]+)\s.+rv\:.+gecko\/\d+/i, // Mozilla
// Other
/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,
// Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir
/(links)\s\(([\w\.]+)/i, // Links
/(gobrowser)\/?([\w\.]*)/i, // GoBrowser
/(ice\s?browser)\/v?([\w\._]+)/i, // ICE Browser
/(mosaic)[\/\s]([\w\.]+)/i // Mosaic
], [NAME, VERSION]
],
cpu : [[
/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i // AMD64 (x64)
], [[ARCHITECTURE, 'amd64']], [
/(ia32(?=;))/i // IA32 (quicktime)
], [[ARCHITECTURE, util.lowerize]], [
/((?:i[346]|x)86)[;\)]/i // IA32 (x86)
], [[ARCHITECTURE, 'ia32']], [
/\b(aarch64|armv?8e?l?)\b/i // ARM64
], [[ARCHITECTURE, 'arm64']], [
/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i // ARMHF
], [[ARCHITECTURE, 'armhf']], [
// PocketPC mistakenly identified as PowerPC
/windows\s(ce|mobile);\sppc;/i
], [[ARCHITECTURE, 'arm']], [
/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i // PowerPC
], [[ARCHITECTURE, /ower/, '', util.lowerize]], [
/(sun4\w)[;\)]/i // SPARC
], [[ARCHITECTURE, 'sparc']], [
/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?:64|(?=v(?:[1-7]|[5-7]1)l?|;|eabi))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i
// IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
], [[ARCHITECTURE, util.lowerize]]
],
device : [[
//////////////////////
// MOBILES & TABLETS
/////////////////////
// Samsung
/\b(sch-i[89]0\d|shw-m380s|sm-p(?:605|610|587)|sm-t\w+|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus\s10)/i,
], [MODEL, [VENDOR, 'Samsung'], [TYPE, TABLET]], [
/(s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+)/i,
/\ssamsung[\s-]([\w-]+)/i,
/sec-(sgh\w+)/i
], [MODEL, [VENDOR, 'Samsung'], [TYPE, MOBILE]], [
// Apple
/\((ip(?:hone|od)[\s\w]*);/i // iPod/iPhone
], [MODEL, [VENDOR, 'Apple'], [TYPE, MOBILE]], [
/\((ipad);[\w\s\),;-]+(apple)/i // iPad
], [MODEL, VENDOR, [TYPE, TABLET]], [
/applecoremedia\/[\w\.]+\s\((ipad)/i
], [MODEL, [VENDOR, 'Apple'], [TYPE, TABLET]], [
// Huawei
/d\/huawei([\w\s-]+)[;\)]/i,
/\b(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?|ele-l\d\d)/i,
/\b(\w{2,4}-[atu][ln][01259][019])[;\)\s]/i
], [MODEL, [VENDOR, 'Huawei'], [TYPE, MOBILE]], [
/\b(bah2?-a?[lw]\d{2})/i // Huawei MediaPad
], [MODEL, [VENDOR, 'Huawei'], [TYPE, TABLET]], [
// Xiaomi
/\b(poco[\s\w]+)(?:\sbuild|\))/i, // Xiaomi POCO
/\b;\s(\w+)\s+build\/hm\1/i, // Xiaomi Hongmi 'numeric' models
/\b(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i, // Xiaomi Hongmi
/\b(redmi[\s\-_]?(?:note|k)?[\w\s_]+)(?:\sbuild|\))/i, // Xiaomi Redmi
/\b(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i // Xiaomi Mi
], [[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, MOBILE]], [
/\b(mi[\s\-_]?(?:pad)(?:[\w\s_]+))(?:\sbuild|\))/i // Mi Pad tablets
],[[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, TABLET]], [
// OPPO
/;\s(\w+)\sbuild.+\soppo/i,
/\s(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i
], [MODEL, [VENDOR, 'OPPO'], [TYPE, MOBILE]], [
// Vivo
/\svivo\s(\w+)(?:\sbuild|\))/i,
/\s(v[12]\d{3}\w?[at])(?:\sbuild|;)/i
], [MODEL, [VENDOR, 'Vivo'], [TYPE, MOBILE]], [
// Realme
/\s(rmx[12]\d{3})(?:\sbuild|;)/i
], [MODEL, [VENDOR, 'Realme'], [TYPE, MOBILE]], [
// Motorola
/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)\b[\w\s]+build\//i,
/\smot[\s-](\w*)/i,
/(moto[\s\w\(\)]+(?=\sbuild|\)))/i,
/(xt\d{3,4})\sbuild\//i,
/(nexus\s6)/i
], [MODEL, [VENDOR, 'Motorola'], [TYPE, MOBILE]], [
/\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i
], [MODEL, [VENDOR, 'Motorola'], [TYPE, TABLET]], [
// LG
/((?=lg)?[vl]k\-?\d{3})\s+build|\s3\.[\s\w;-]{10}lg?-([06cv9]{3,4})/i
], [MODEL, [VENDOR, 'LG'], [TYPE, TABLET]], [
/(nexus\s[45])/i,
/lg[e;\s\/-]+((?!browser|netcast)\w+)/i,
/\blg(\-?[\d\w]+)\s+build/i
], [MODEL, [VENDOR, 'LG'], [TYPE, MOBILE]], [
// Lenovo
/(ideatab[\w\-\s]+)/i,
/lenovo\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|[\w-]+)/i // Lenovo tablets
], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [
// Nokia
/(?:maemo|nokia).*(n900|lumia\s\d+)/i,
/nokia[\s_-]?([\w\.-]*)/i
], [MODEL, [VENDOR, 'Nokia'], [TYPE, MOBILE]], [
// Google
/droid.+;\s(pixel\sc)[\s)]/i // Google Pixel C
], [MODEL, [VENDOR, 'Google'], [TYPE, TABLET]], [
/droid.+;\s(pixel[\s\daxl]{0,6})(?:\sbuild|\))/i // Google Pixel
], [MODEL, [VENDOR, 'Google'], [TYPE, MOBILE]], [
// Sony
/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i
], [MODEL, [VENDOR, 'Sony'], [TYPE, MOBILE]], [
/sony\stablet\s[ps]\sbuild\//i,
/(?:sony)?sgp\w+(?:\sbuild\/|\))/i
], [[MODEL, 'Xperia Tablet'], [VENDOR, 'Sony'], [TYPE, TABLET]], [
// OnePlus
/\s(kb2005|in20[12]5|be20[12][59])\b/i,
/\ba000(1)\s+build/i, // OnePlus
/\boneplus\s(a\d{4})[\s)]/i
], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [
// Amazon
/(alexa)webm/i,
/(kf[a-z]+)(\sbuild\/|\)).+silk\//i // Kindle Fire HD
], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [
/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i // Fire Phone
], [[MODEL, 'Fire Phone'], [VENDOR, 'Amazon'], [TYPE, MOBILE]], [
// BlackBerry
/\((playbook);[\w\s\),;-]+(rim)/i // BlackBerry PlayBook
], [MODEL, VENDOR, [TYPE, TABLET]], [
/\(bb10;\s(\w+)/i // BlackBerry 10
], [MODEL, [VENDOR, 'BlackBerry'], [TYPE, MOBILE]], [
// Asus
/\b(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus\s7|padfone|p00c)/i
], [MODEL, [VENDOR, 'ASUS'], [TYPE, TABLET]], [
/\s(z[es]6[027][01][km][ls]|zenfone\s\d\w?)\b/i
], [MODEL, [VENDOR, 'ASUS'], [TYPE, MOBILE]], [
// HTC
/(nexus\s9)/i // HTC Nexus 9
], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [
/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i, // HTC
// ZTE
/(zte)-(\w*)/i,
/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i // Alcatel/GeeksPhone/Nexian/Panasonic/Sony
], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [
// Acer
/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i
], [MODEL, [VENDOR, 'Acer'], [TYPE, TABLET]], [
// Meizu
/droid.+;\s(m[1-5]\snote)\sbuild/i,
/\bmz-([\w-]{2,})/i
], [MODEL, [VENDOR, 'Meizu'], [TYPE, MOBILE]], [
// MIXED
/(blackberry)[\s-]?(\w+)/i, // BlackBerry
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,
// BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron
/(hp)\s([\w\s]+\w)/i, // HP iPAQ
/(asus)-?(\w+)/i, // Asus
/(microsoft);\s(lumia[\s\w]+)/i, // Microsoft Lumia
/(lenovo)[_\s-]?([\w-]+)/i, // Lenovo
/linux;.+(jolla);/i, // Jolla
/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i // OPPO
], [VENDOR, MODEL, [TYPE, MOBILE]], [
/(archos)\s(gamepad2?)/i, // Archos
/(hp).+(touchpad)/i, // HP TouchPad
/(hp).+(tablet)/i, // HP Tablet
/(kindle)\/([\w\.]+)/i, // Kindle
/\s(nook)[\w\s]+build\/(\w+)/i, // Nook
/(dell)\s(strea[kpr\s\d]*[\dko])/i, // Dell Streak
/[;\/]\s?(le[\s\-]+pan)[\s\-]+(\w{1,9})\sbuild/i, // Le Pan Tablets
/[;\/]\s?(trinity)[\-\s]*(t\d{3})\sbuild/i, // Trinity Tablets
/\b(gigaset)[\s\-]+(q\w{1,9})\sbuild/i, // Gigaset Tablets
/\b(vodafone)\s([\w\s]+)(?:\)|\sbuild)/i // Vodafone
], [VENDOR, MODEL, [TYPE, TABLET]], [
/\s(surface\sduo)\s/i // Surface Duo
], [MODEL, [VENDOR, 'Microsoft'], [TYPE, TABLET]], [
/\s(u304aa)\sbuild/i // AT&T
], [MODEL, [VENDOR, 'AT&T'], [TYPE, MOBILE]], [
/sie-(\w*)/i // Siemens
], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [
/[;\/]\s?(rct\w+)\sbuild/i // RCA Tablets
], [MODEL, [VENDOR, 'RCA'], [TYPE, TABLET]], [
/[;\/\s](venue[\d\s]{2,7})\sbuild/i // Dell Venue Tablets
], [MODEL, [VENDOR, 'Dell'], [TYPE, TABLET]], [
/[;\/]\s?(q(?:mv|ta)\w+)\sbuild/i // Verizon Tablet
], [MODEL, [VENDOR, 'Verizon'], [TYPE, TABLET]], [
/[;\/]\s(?:barnes[&\s]+noble\s|bn[rt])([\w\s\+]*)\sbuild/i // Barnes & Noble Tablet
], [MODEL, [VENDOR, 'Barnes & Noble'], [TYPE, TABLET]], [
/[;\/]\s(tm\d{3}\w+)\sbuild/i
], [MODEL, [VENDOR, 'NuVision'], [TYPE, TABLET]], [
/;\s(k88)\sbuild/i // ZTE K Series Tablet
], [MODEL, [VENDOR, 'ZTE'], [TYPE, TABLET]], [
/;\s(nx\d{3}j)\sbuild/i // ZTE Nubia
], [MODEL, [VENDOR, 'ZTE'], [TYPE, MOBILE]], [
/[;\/]\s?(gen\d{3})\sbuild.*49h/i // Swiss GEN Mobile
], [MODEL, [VENDOR, 'Swiss'], [TYPE, MOBILE]], [
/[;\/]\s?(zur\d{3})\sbuild/i // Swiss ZUR Tablet
], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [
/[;\/]\s?((zeki)?tb.*\b)\sbuild/i // Zeki Tablets
], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [
/[;\/]\s([yr]\d{2})\sbuild/i,
/[;\/]\s(dragon[\-\s]+touch\s|dt)(\w{5})\sbuild/i // Dragon Touch Tablet
], [[VENDOR, 'Dragon Touch'], MODEL, [TYPE, TABLET]], [
/[;\/]\s?(ns-?\w{0,9})\sbuild/i // Insignia Tablets
], [MODEL, [VENDOR, 'Insignia'], [TYPE, TABLET]], [
/[;\/]\s?((nxa|Next)-?\w{0,9})\sbuild/i // NextBook Tablets
], [MODEL, [VENDOR, 'NextBook'], [TYPE, TABLET]], [
/[;\/]\s?(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05]))\sbuild/i
], [[VENDOR, 'Voice'], MODEL, [TYPE, MOBILE]], [ // Voice Xtreme Phones
/[;\/]\s?(lvtel\-)?(v1[12])\sbuild/i // LvTel Phones
], [[VENDOR, 'LvTel'], MODEL, [TYPE, MOBILE]], [
/;\s(ph-1)\s/i
], [MODEL, [VENDOR, 'Essential'], [TYPE, MOBILE]], [ // Essential PH-1
/[;\/]\s?(v(100md|700na|7011|917g).*\b)\sbuild/i // Envizen Tablets
], [MODEL, [VENDOR, 'Envizen'], [TYPE, TABLET]], [
/[;\/]\s?(trio[\s\w\-\.]+)\sbuild/i // MachSpeed Tablets
], [MODEL, [VENDOR, 'MachSpeed'], [TYPE, TABLET]], [
/[;\/]\s?tu_(1491)\sbuild/i // Rotor Tablets
], [MODEL, [VENDOR, 'Rotor'], [TYPE, TABLET]], [
/(shield[\w\s]+)\sbuild/i // Nvidia Shield Tablets
], [MODEL, [VENDOR, 'Nvidia'], [TYPE, TABLET]], [
/(sprint)\s(\w+)/i // Sprint Phones
], [VENDOR, MODEL, [TYPE, MOBILE]], [
/(kin\.[onetw]{3})/i // Microsoft Kin
], [[MODEL, /\./g, ' '], [VENDOR, 'Microsoft'], [TYPE, MOBILE]], [
/droid\s[\d\.]+;\s(cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i // Zebra
], [MODEL, [VENDOR, 'Zebra'], [TYPE, TABLET]], [
/droid\s[\d\.]+;\s(ec30|ps20|tc[2-8]\d[kx])\)/i
], [MODEL, [VENDOR, 'Zebra'], [TYPE, MOBILE]], [
///////////////////
// CONSOLES
///////////////////
/\s(ouya)\s/i, // Ouya
/(nintendo)\s([wids3utch]+)/i // Nintendo
], [VENDOR, MODEL, [TYPE, CONSOLE]], [
/droid.+;\s(shield)\sbuild/i // Nvidia
], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [
/(playstation\s[345portablevi]+)/i // Playstation
], [MODEL, [VENDOR, 'Sony'], [TYPE, CONSOLE]], [
/[\s\(;](xbox(?:\sone)?(?!;\sxbox))[\s\);]/i // Microsoft Xbox
], [MODEL, [VENDOR, 'Microsoft'], [TYPE, CONSOLE]], [
///////////////////
// SMARTTVS
///////////////////
/smart-tv.+(samsung)/i // Samsung
], [VENDOR, [TYPE, SMARTTV], MODEL], [
/hbbtv.+maple;(\d+)/i
], [[MODEL, /^/, 'SmartTV'], [VENDOR, 'Samsung'], [TYPE, SMARTTV]], [
/linux;\snetcast.+smarttv/i, // LG SmartTV
/lg\snetcast\.tv-201\d/i
], [[VENDOR, 'LG'], MODEL, [TYPE, SMARTTV]], [
/(apple)\s?tv/i // Apple TV
], [VENDOR, [MODEL, 'Apple TV'], [TYPE, SMARTTV]], [
/crkey/i // Google Chromecast
], [[MODEL, 'Chromecast'], [VENDOR, 'Google'], [TYPE, SMARTTV]], [
/droid.+aft([\w])(\sbuild\/|\))/i // Fire TV
], [MODEL, [VENDOR, 'Amazon'], [TYPE, SMARTTV]], [
/\(dtv[\);].+(aquos)/i // Sharp
], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [
/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i // HbbTV devices
], [[VENDOR, util.trim], [MODEL, util.trim], [TYPE, SMARTTV]], [
/[\s\/\(](android\s|smart[-\s]?|opera\s)tv[;\)\s]/i // SmartTV from Unidentified Vendors
], [[TYPE, SMARTTV]], [
///////////////////
// WEARABLES
///////////////////
/((pebble))app\/[\d\.]+\s/i // Pebble
], [VENDOR, MODEL, [TYPE, WEARABLE]], [
/droid.+;\s(glass)\s\d/i // Google Glass
], [MODEL, [VENDOR, 'Google'], [TYPE, WEARABLE]], [
/droid\s[\d\.]+;\s(wt63?0{2,3})\)/i
], [MODEL, [VENDOR, 'Zebra'], [TYPE, WEARABLE]], [
////////////////////
// MIXED (GENERIC)
///////////////////
/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i // Android Phones from Unidentified Vendors
], [MODEL, [TYPE, MOBILE]], [
/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i // Android Tablets from Unidentified Vendors
], [MODEL, [TYPE, TABLET]], [
/\s(tablet|tab)[;\/]/i, // Unidentifiable Tablet
/\s(mobile)(?:[;\/]|\ssafari)/i // Unidentifiable Mobile
], [[TYPE, util.lowerize]], [
/(android[\w\.\s\-]{0,9});.+build/i // Generic Android Device
], [MODEL, [VENDOR, 'Generic']], [
/(phone)/i
], [[TYPE, MOBILE]]
],
engine : [[
/windows.+\sedge\/([\w\.]+)/i // EdgeHTML
], [VERSION, [NAME, 'EdgeHTML']], [
/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i // Blink
], [VERSION, [NAME, 'Blink']], [
/(presto)\/([\w\.]+)/i, // Presto
/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,
// WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna
/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i, // KHTML/Tasman/Links
/(icab)[\/\s]([23]\.[\d\.]+)/i // iCab
], [NAME, VERSION], [
/rv\:([\w\.]{1,9})\b.+(gecko)/i // Gecko
], [VERSION, NAME]
],
os : [[
// Windows
/microsoft\s(windows)\s(vista|xp)/i // Windows (iTunes)
], [NAME, VERSION], [
/(windows)\snt\s6\.2;\s(arm)/i, // Windows RT
/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i, // Windows Phone
/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i
], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [
/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i
], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [
// iOS/macOS
/ip[honead]{2,4}\b(?:.*os\s([\w]+)\slike\smac|;\sopera)/i, // iOS
/cfnetwork\/.+darwin/i
], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [
/(mac\sos\sx)\s?([\w\s\.]*)/i,
/(macintosh|mac(?=_powerpc)\s)(?!.+haiku)/i // Mac OS
], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [
// Mobile OSes
/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i,
// Android/WebOS/Palm/QNX/Bada/RIM/MeeGo/Contiki/Sailfish OS
/(blackberry)\w*\/([\w\.]*)/i, // Blackberry
/(tizen|kaios)[\/\s]([\w\.]+)/i // Tizen/KaiOS
], [NAME, VERSION], [
/\(bb(10);/i // BlackBerry 10
], [VERSION, [NAME, 'BlackBerry']], [
/(?:symbian\s?os|symbos|s60(?=;)|series60)[\/\s-]?([\w\.]*)/i // Symbian
], [VERSION, [NAME, 'Symbian']], [
/\((series40);/i // Series 40
], [NAME], [
/mozilla.+\(mobile;.+gecko.+firefox/i // Firefox OS
], [[NAME, 'Firefox OS']], [
/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i // WebOS
], [VERSION, [NAME, 'webOS']], [
// Google Chromecast
/crkey\/([\d\.]+)/i // Google Chromecast
], [VERSION, [NAME, 'Chromecast']], [
// Console
/(nintendo|playstation)\s([wids345portablevuch]+)/i, // Nintendo/Playstation
/(xbox);\s+xbox\s([^\);]+)/i, // Microsoft Xbox (360, One, X, S, Series X, Series S)
// GNU/Linux based
/(mint)[\/\s\(\)]?(\w*)/i, // Mint
/(mageia|vectorlinux)[;\s]/i, // Mageia/VectorLinux
/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?=\slinux)|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus|raspbian)(?:\sgnu\/linux)?(?:\slinux)?[\/\s-]?(?!chrom|package)([\w\.-]*)/i,
// Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware
// Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus
/(hurd|linux)\s?([\w\.]*)/i, // Hurd/Linux
/(gnu)\s?([\w\.]*)/i // GNU
], [NAME, VERSION], [
/(cros)\s[\w]+\s([\w\.]+\w)/i // Chromium OS
], [[NAME, 'Chromium OS'], VERSION],[
// Solaris
/(sunos)\s?([\w\.\d]*)/i // Solaris
], [[NAME, 'Solaris'], VERSION], [
// BSD based
/\s([frentopc-]{0,4}bsd|dragonfly)\s?(?!amd|[ix346]{1,2}86)([\w\.]*)/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly
], [NAME, VERSION],[
/(haiku)\s(\w+)/i // Haiku
], [NAME, VERSION],[
// Other
/((?:open)?solaris)[\/\s-]?([\w\.]*)/i, // Solaris
/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i, // AIX
/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,
// Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS/OpenVMS/Fuchsia
/(unix)\s?([\w\.]*)/i // UNIX
], [NAME, VERSION]
]
};
/////////////////
// Constructor
////////////////
var UAParser = function (ua, extensions) {
if (typeof ua === 'object') {
extensions = ua;
ua = undefined;
}
if (!(this instanceof UAParser)) {
return new UAParser(ua, extensions).getResult();
}
var _ua = ua || ((typeof window !== 'undefined' && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY);
var _rgxmap = extensions ? util.extend(regexes, extensions) : regexes;
this.getBrowser = function () {
var _browser = { name: undefined, version: undefined };
mapper.rgx.call(_browser, _ua, _rgxmap.browser);
_browser.major = util.major(_browser.version); // deprecated
return _browser;
};
this.getCPU = function () {
var _cpu = { architecture: undefined };
mapper.rgx.call(_cpu, _ua, _rgxmap.cpu);
return _cpu;
};
this.getDevice = function () {
var _device = { vendor: undefined, model: undefined, type: undefined };
mapper.rgx.call(_device, _ua, _rgxmap.device);
return _device;
};
this.getEngine = function () {
var _engine = { name: undefined, version: undefined };
mapper.rgx.call(_engine, _ua, _rgxmap.engine);
return _engine;
};
this.getOS = function () {
var _os = { name: undefined, version: undefined };
mapper.rgx.call(_os, _ua, _rgxmap.os);
return _os;
};
this.getResult = function () {
return {
ua : this.getUA(),
browser : this.getBrowser(),
engine : this.getEngine(),
os : this.getOS(),
device : this.getDevice(),
cpu : this.getCPU()
};
};
this.getUA = function () {
return _ua;
};
this.setUA = function (ua) {
_ua = ua.length > UA_MAX_LENGTH ? util.trim(ua, UA_MAX_LENGTH) : ua;
return this;
};
this.setUA(_ua);
return this;
};
UAParser.VERSION = LIBVERSION;
UAParser.BROWSER = {
NAME : NAME,
MAJOR : MAJOR, // deprecated
VERSION : VERSION
};
UAParser.CPU = {
ARCHITECTURE : ARCHITECTURE
};
UAParser.DEVICE = {
MODEL : MODEL,
VENDOR : VENDOR,
TYPE : TYPE,
CONSOLE : CONSOLE,
MOBILE : MOBILE,
SMARTTV : SMARTTV,
TABLET : TABLET,
WEARABLE: WEARABLE,
EMBEDDED: EMBEDDED
};
UAParser.ENGINE = {
NAME : NAME,
VERSION : VERSION
};
UAParser.OS = {
NAME : NAME,
VERSION : VERSION
};
///////////
// Export
//////////
// check js environment
if (typeof(exports) !== UNDEF_TYPE) {
// nodejs env
if (typeof module !== UNDEF_TYPE && module.exports) {
exports = module.exports = UAParser;
}
exports.UAParser = UAParser;
} else {
// requirejs env (optional)
if (typeof(define) === 'function' && define.amd) {
define(function () {
return UAParser;
});
} else if (typeof window !== 'undefined') {
// browser env
window.UAParser = UAParser;
}
}
// jQuery/Zepto specific (optional)
// Note:
// In AMD env the global scope should be kept clean, but jQuery is an exception.
// jQuery always exports to global scope, unless jQuery.noConflict(true) is used,
// and we should catch that.
var $ = typeof window !== 'undefined' && (window.jQuery || window.Zepto);
if ($ && !$.ua) {
var parser = new UAParser();
$.ua = parser.getResult();
$.ua.get = function () {
return parser.getUA();
};
$.ua.set = function (uastring) {
parser.setUA(uastring);
var result = parser.getResult();
for (var prop in result) {
$.ua[prop] = result[prop];
}
};
}
})(typeof window === 'object' ? window : this);

1337
node_modules/ua-parser-js/test/browser-test.json generated vendored Normal file

File diff suppressed because it is too large Load Diff

178
node_modules/ua-parser-js/test/cpu-test.json generated vendored Normal file
View File

@ -0,0 +1,178 @@
[
{
"desc" : "i686",
"ua" : "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:19.0) Gecko/20100101 Firefox/19.0",
"expect" :
{
"architecture" : "ia32"
}
},
{
"desc" : "i386",
"ua" : "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040628 Epiphany/1.2.6",
"expect" :
{
"architecture" : "ia32"
}
},
{
"desc" : "x86-64",
"ua" : "Opera/9.80 (X11; Linux x86_64; U; Linux Mint; en) Presto/2.2.15 Version/10.10",
"expect" :
{
"architecture" : "amd64"
}
},
{
"desc" : "win64",
"ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; Win64; x64; Trident/6.0; .NET4.0E; .NET4.0C)",
"expect" :
{
"architecture" : "amd64"
}
},
{
"desc" : "WOW64",
"ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)",
"expect" :
{
"architecture" : "amd64"
}
},
{
"desc" : "ARM",
"ua" : "Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 635) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537",
"expect" :
{
"architecture" : "arm"
}
},
{
"desc" : "ARMv61",
"ua" : "Mozilla/5.0 (X11; U; Linux armv61; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1",
"expect" :
{
"architecture" : "arm"
}
},
{
"desc" : "ARMv7",
"ua" : "Mozilla/5.0 (Linux ARMv7) WebKitGTK+/3.4.9 vimprobable2",
"expect" :
{
"architecture" : "arm"
}
},
{
"desc" : "ARMv7l",
"ua" : "Mozilla/5.0 (SMART-TV; X11; Linux armv7l) AppleWebKit/537.42 (KHTML, like Gecko) Chromium/25.0.1349.2 Chrome/25.0.1349.2 Safari/537.42",
"expect" :
{
"architecture" : "arm"
}
},
{
"desc" : "ARMv7l",
"ua" : "Mozilla/5.0 (X11; CrOS armv7l 9765.85.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.123 Safari/537.36",
"expect" :
{
"architecture" : "arm"
}
},
{
"desc" : "ARMEABI",
"ua" : "[FBAN/FB4A;FBAV/237.0.0.44.120;FBBV/170693408;FBDM/{density=1.75,width=720,height=1280};FBLC/en_US;FBRV/172067074;FBCR/ ;FBMF/samsung;FBBD/samsung;FBPN/com.facebook.katana;FBDV/SM-S367VL;FBSV/9;FBBK/1;FBOP/19;FBCA/armeabi-v7a:armeabi;]",
"expect" :
{
"architecture" : "arm"
}
},
{
"desc" : "ARMv8",
"ua" : "Mozilla/5.0 (X11; Linux armv8l; rv:45.0) Gecko/20100101 Firefox/45.0",
"expect" :
{
"architecture" : "arm64"
}
},
{
"desc" : "AARCH64",
"ua" : "Mozilla/5.0 (X11; CrOS aarch64 13310.93.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.133 Safari/537.36",
"expect" :
{
"architecture" : "arm64"
}
},
{
"desc" : "Pocket PC",
"ua" : "Opera/9.7 (Windows Mobile; PPC; Opera Mobi/35166; U; en) Presto/2.2.1",
"expect" :
{
"architecture" : "arm"
}
},
{
"desc" : "Mac PowerPC",
"ua" : "Mozilla/4.0 (compatible; MSIE 4.5; Mac_PowerPC)",
"expect" :
{
"architecture" : "ppc"
}
},
{
"desc" : "Mac PowerPC",
"ua" : "Mozilla/4.0 (compatible; MSIE 5.17; Mac_PowerPC Mac OS; en)",
"expect" :
{
"architecture" : "ppc"
}
},
{
"desc" : "Mac PowerPC",
"ua" : "iCab/2.9.5 (Macintosh; U; PPC; Mac OS X)",
"expect" :
{
"architecture" : "ppc"
}
},
{
"desc" : "UltraSPARC",
"ua" : "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5",
"expect" :
{
"architecture" : "sparc"
}
},
{
"desc" : "sparc64",
"ua" : "ELinks (0.4.3; NetBSD 3.0.2PATCH sparc64; 141x19)",
"expect" :
{
"architecture" : "sparc64"
}
},
{
"desc" : "QuickTime",
"ua" : "QuickTime/7.5.6 (qtver=7.5.6;cpu=IA32;os=Mac 10.5.8)",
"expect" :
{
"architecture" : "ia32"
}
},
{
"desc" : "XBMC",
"ua" : "XBMC/12.0 Git:20130127-fb595f2 (Windows NT 6.1;WOW64;Win64;x64; http://www.xbmc.org)",
"expect" :
{
"architecture" : "amd64"
}
},
{
"desc" : "IRIX64",
"ua" : "Mozilla/4.8C-SGI [en] (X11; U; IRIX64 6.5 IP27",
"expect" :
{
"architecture" : "irix64"
}
}
]

2165
node_modules/ua-parser-js/test/device-test.json generated vendored Normal file

File diff suppressed because it is too large Load Diff

101
node_modules/ua-parser-js/test/engine-test.json generated vendored Normal file
View File

@ -0,0 +1,101 @@
[
{
"desc" : "Blink",
"ua" : "Mozilla/5.0 (Linux; Android 7.0; SM-G920I Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/3.4.9 SamsungBrowser/4.0 Chrome/57.0.2987.146 Mobile VR Safari/537.36",
"expect" :
{
"name" : "Blink",
"version" : "57.0.2987.146"
}
},
{
"desc" : "EdgeHTML",
"ua" : "Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36 Edge/12.0",
"expect" :
{
"name" : "EdgeHTML",
"version" : "12.0"
}
},
{
"desc" : "Gecko",
"ua" : "Mozilla/5.0 (X11; Linux x86_64; rv:2.0b9pre) Gecko/20110111 Firefox/4.0b9pre",
"expect" :
{
"name" : "Gecko",
"version" : "2.0b9pre"
}
},
{
"desc" : "Goanna",
"ua" : "Mozilla/5.0 (Windows NT 5.1; rv:38.9) Gecko/20100101 Goanna/2.2 Firefox/38.9 PaleMoon/26.5.0",
"expect" :
{
"name" : "Goanna",
"version" : "2.2"
}
},
{
"desc" : "KHTML",
"ua" : "Mozilla/5.0 (compatible; Konqueror/4.5; FreeBSD) KHTML/4.5.4 (like Gecko)",
"expect" :
{
"name" : "KHTML",
"version" : "4.5.4"
}
},
{
"desc" : "NetFront",
"ua" : "Mozilla/4.0 (PDA; Windows CE/1.0.1) NetFront/3.0",
"expect" :
{
"name" : "NetFront",
"version" : "3.0"
}
},
{
"desc" : "Presto",
"ua" : "Opera/9.80 (Windows NT 6.1; Opera Tablet/15165; U; en) Presto/2.8.149 Version/11.1",
"expect" :
{
"name" : "Presto",
"version" : "2.8.149"
}
},
{
"desc" : "Tasman",
"ua" : "Mozilla/4.0 (compatible; MSIE 6.0; PPC Mac OS X 10.4.7; Tasman 1.0)",
"expect" :
{
"name" : "Tasman",
"version" : "1.0"
}
},
{
"desc" : "Trident",
"ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Win64; x64; Trident/6.0)",
"expect" :
{
"name" : "Trident",
"version" : "6.0"
}
},
{
"desc" : "WebKit",
"ua" : "Mozilla/5.0 (Windows; U; Windows NT 6.1; sv-SE) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4",
"expect" :
{
"name" : "WebKit",
"version" : "533.19.4"
}
},
{
"desc" : "WebKit",
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/27.0.1453.110 Safari/537.36",
"expect" :
{
"name" : "WebKit",
"version" : "537.36"
}
}
]

582
node_modules/ua-parser-js/test/mediaplayer-test.json generated vendored Normal file
View File

@ -0,0 +1,582 @@
[
{
"desc" : "Coremedia",
"ua" : "Apple Mac OS X v10.6.4 CoreMedia v1.0.0.10F2108",
"expect" :
{
"name" : "CoreMedia",
"version" : "1.0.0.10F2108",
"major" : "1"
}
},
{
"desc" : "AppleCoreMedia",
"ua" : "AppleCoreMedia/1.0.0.10A403 (iPad; U; CPU OS 6_0 like Mac OS X; it_it)",
"expect" :
{
"name" : "AppleCoreMedia",
"version" : "1.0.0.10A403",
"major" : "1"
}
},
{
"desc" : "AppleTv",
"ua" : "AppleTV/3.0.2 (Macintosh; Intel Mac OS X 10.4.7) AppleWebKit/528.18",
"expect" :
{
"name" : "WebKit",
"version" : "528.18",
"major" : "528"
}
},
{
"desc" : "Aqualung",
"ua" : "Aqualung/R-1114",
"expect" :
{
"name" : "Aqualung",
"version" : "R-1114",
"major" : "undefined"
}
},
{
"desc" : "Ares",
"ua" : "Ares 2.2.4.3048",
"expect" :
{
"name" : "Ares",
"version" : "2.2.4.3048",
"major" : "2"
}
},
{
"desc" : "Audacious",
"ua" : "Audacious/3.2.2 neon/0.29.3",
"expect" :
{
"name" : "Audacious",
"version" : "3.2.2",
"major" : "3"
}
},
{
"desc" : "AudiMusicStream",
"ua" : "AudiMusicStream/3020.130826151911",
"expect" :
{
"name" : "AudiMusicStream",
"version" : "3020.130826151911",
"major" : "3020"
}
},
{
"desc" : "BASS",
"ua" : "BASS/2.4",
"expect" :
{
"name" : "BASS",
"version" : "2.4",
"major" : "2"
}
},
{
"desc" : "BSPlayer",
"ua" : "BSPlayer/2",
"expect" :
{
"name" : "BSPlayer",
"version" : "2",
"major" : "2"
}
},
{
"desc" : "Core",
"ua" : "CORE/6.506.4.1",
"expect" :
{
"name" : "CORE",
"version" : "6.506.4.1",
"major" : "6"
}
},
{
"desc" : "Clementine",
"ua" : "Clementine 1.1",
"expect" :
{
"name" : "Clementine",
"version" : "1.1",
"major" : "1"
}
},
{
"desc" : "Dalvik",
"ua" : "Dalvik/1.2.0 (Linux; U; Android 2.2.1; GT-S5830L Build/FROYO)",
"expect" :
{
"name" : "Dalvik",
"version" : "1.2.0",
"major" : "1"
}
},
{
"desc" : "NexPlayer",
"ua" : "E97510d/ Player/NexPlayer 4.0",
"expect" :
{
"name" : "NexPlayer",
"version" : "4.0",
"major" : "4"
}
},
{
"desc" : "FLRP",
"ua" : "FLRP/2.5 CFNetwork/609.1.4 Darwin/13.0.0",
"expect" :
{
"name" : "Flip Player",
"version" : "2.5",
"major" : "2"
}
},
{
"desc" : "FStream",
"ua" : "FStream",
"expect" :
{
"name" : "FStream",
"version" : "undefined",
"major" : "undefined"
}
},
{
"desc" : "GStreamer",
"ua" : "GStreamer souphttpsrc (compatible; LG NetCast.TV-2012) libsoup/2.34.2",
"expect" :
{
"name" : "GStreamer",
"version" : "2.34.2",
"major" : "2"
}
},
{
"desc" : "GnomeMplayer",
"ua" : "GnomeMplayer/1.0.2",
"expect" :
{
"name" : "GnomeMplayer",
"version" : "1.0.2",
"major" : "1"
}
},
{
"desc" : "HTC Streaming Player",
"ua" : "HTC Streaming Player htc_asia_wwe / 1.0 / endeavoru / 4.1.1",
"expect" :
{
"name" : "HTC Streaming Player",
"version" : "1.0",
"major" : "1"
}
},
{
"desc" : "HTC One S",
"ua" : "HTC_One_S/3.16.111.10",
"expect" :
{
"name" : "HTC One S",
"version" : "3.16.111.10",
"major" : "3"
}
},
{
"desc" : "Java",
"ua" : "Java/1.4.1_04",
"expect" :
{
"name" : "Java",
"version" : "1.4.1_04",
"major" : "1"
}
},
{
"desc" : "LG Player",
"ua" : "LG Player 1.0; Android",
"expect" :
{
"name" : "LG Player",
"version" : "1.0",
"major" : "1"
}
},
{
"desc" : "NexPlayer",
"ua" : "LG-P700/V10k-DEC-12-2012 Player/NexPlayer 4.0 for Android",
"expect" :
{
"name" : "NexPlayer",
"version" : "4.0",
"major" : "4"
}
},
{
"desc" : "LG Player",
"ua" : "LGE400/V10b Player/LG Player 1.0",
"expect" :
{
"name" : "LG Player",
"version" : "1.0",
"major" : "1"
}
},
{
"desc" : "Lavf",
"ua" : "Lavf52.111.0",
"expect" :
{
"name" : "Lavf",
"version" : "52.111.0",
"major" : "52"
}
},
{
"desc" : "Lyssna",
"ua" : "Lyssna/46 CFNetwork/609.1.4 Darwin/13.0.0",
"expect" :
{
"name" : "Lyssna",
"version" : "46",
"major" : "46"
}
},
{
"desc" : "MPlayer",
"ua" : "MPlayer 1.1-4.2.1",
"expect" :
{
"name" : "MPlayer",
"version" : "1.1-4.2.1",
"major" : ""
}
},
{
"desc" : "MPlayer SVN",
"ua" : "MPlayer SVN-r33713-4.6.1",
"expect" :
{
"name" : "MPlayer",
"version" : "r33713-4.6.1",
"major" : "undefined"
}
},
{
"desc" : "MPlayer ubuntu",
"ua" : "MPlayer svn r34540 (Ubuntu), built with gcc-4.6",
"expect" :
{
"name" : "MPlayer",
"version" : "r34540",
"major" : "undefined"
}
},
{
"desc" : "MoC",
"ua" : "Music On Console/2.5.0-beta1",
"expect" :
{
"name" : "Music On Console",
"version" : "2.5.0-beta1",
"major" : "2"
}
},
{
"desc" : "MPD",
"ua" : "Music Player Daemon 0.17.4",
"expect" :
{
"name" : "Music Player Daemon",
"version" : "0.17.4",
"major" : "0"
}
},
{
"desc" : "NSPlayer",
"ua" : "NSPlayer/11.0.5358.4827 WMFSDK/11.0",
"expect" :
{
"name" : "NSPlayer",
"version" : "11.0.5358.4827",
"major" : "11"
}
},
{
"desc" : "Nero Home",
"ua" : "Nero Home/1.5.3.0 (compatible; Nero AG; Nero Home 1.5.3.0)",
"expect" :
{
"name" : "Nero Home",
"version" : "1.5.3.0",
"major" : "1"
}
},
{
"desc" : "NexPlayer",
"ua" : "NexPlayer 4.0 for Android( stagefright alternative )",
"expect" :
{
"name" : "NexPlayer",
"version" : "4.0",
"major" : "4"
}
},
{
"desc" : "Nokia3xx",
"ua" : "Nokia303/14.87 CLDC-1.1",
"expect" :
{
"name" : "Nokia303",
"version" : "14.87",
"major" : "14"
}
},
{
"desc" : "MPlayer SVN Sherpya",
"ua" : "MPlayer Sherpya-SVN-r33124-4.2.5",
"expect" :
{
"name" : "MPlayer",
"version" : "r33124-4.2.5",
"major" : "undefined"
}
},
{
"desc" : "Philips Songbird",
"ua" : "NotMoz/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.2.3) Gecko/20101207 Philips-Songbird/5.4.1980 Songbird/1.9.4 (20110302030555)",
"expect" :
{
"name" : "Songbird",
"version" : "1.9.4",
"major" : "1"
}
},
{
"desc" : "Ossproxy",
"ua" : "OSSProxy 1.3.336.320 (Build 336.320 Win32 en-us)(Aug 16 2013 17:38:43)",
"expect" :
{
"name" : "OSSProxy",
"version" : "1.3.336.320",
"major" : "1"
}
},
{
"desc" : "Winamp3",
"ua" : "Nullsoft Winamp3 version 3.0 (compatible)",
"expect" :
{
"name" : "Winamp",
"version" : "3.0",
"major" : "3"
}
},
{
"desc" : "PSP",
"ua" : "PSP-InternetRadioPlayer/1.00",
"expect" :
{
"name" : "PSP-InternetRadioPlayer",
"version" : "1.00",
"major" : "1"
}
},
{
"desc" : "urllib",
"ua" : "Python-urllib/2.7",
"expect" :
{
"name" : "Python-urllib",
"version" : "2.7",
"major" : "2"
}
},
{
"desc" : "QuickTime",
"ua" : "QuickTime/7.5.6 (qtver=7.5.6;cpu=IA32;os=Mac 10.5.8)",
"expect" :
{
"name" : "QuickTime",
"version" : "7.5.6",
"major" : "7"
}
},
{
"desc" : "RMA",
"ua" : "RMA/1.0 (compatible; RealMedia)",
"expect" :
{
"name" : "RMA",
"version" : "1.0",
"major" : "1"
}
},
{
"desc" : "RadioApp",
"ua" : "RadioApp/1.0 CFNetwork/609.1.4 Darwin/11.4.2",
"expect" :
{
"name" : "RadioApp",
"version" : "1.0",
"major" : "1"
}
},
{
"desc" : "RadioClientApplication",
"ua" : "RadioClientApplication/20 CFNetwork/609.1.4 Darwin/13.0.0",
"expect" :
{
"name" : "RadioClientApplication",
"version" : "20",
"major" : "undefined"
}
},
{
"desc" : "stagefright",
"ua" : "Samsung GT-I9070 stagefright/1.1 (Linux;Android 2.3.6)",
"expect" :
{
"name" : "stagefright",
"version" : "1.1",
"major" : "1"
}
},
{
"desc" : "Soundtap",
"ua" : "Soundtap/1.2.4 CFNetwork/672.0.2 Darwin/14.0.0",
"expect" :
{
"name" : "Soundtap",
"version" : "1.2.4",
"major" : "1"
}
},
{
"desc" : "Streamium",
"ua" : "Streamium/1.0",
"expect" :
{
"name" : "Streamium",
"version" : "1.0",
"major" : "1"
}
},
{
"desc" : "Totem",
"ua" : "Totem/3.0.1",
"expect" :
{
"name" : "Totem",
"version" : "3.0.1",
"major" : "3"
}
},
{
"desc" : "VLC",
"ua" : "VLC media player - version 0.8.6c Janus - (c) 1996-2007 the VideoLAN team",
"expect" :
{
"name" : "VLC",
"version" : "0.8.6c",
"major" : "0"
}
},
{
"desc" : "VLC",
"ua" : "VLC/2.0.0 LibVLC/2.0.0",
"expect" :
{
"name" : "VLC",
"version" : "2.0.0",
"major" : "2"
}
},
{
"desc" : "Videos",
"ua" : "Videos/3.8.2",
"expect" :
{
"name" : "Video",
"version" : "3.8.2",
"major" : "3"
}
},
{
"desc" : "Wget",
"ua" : "Wget/1.12 (darwin10.7.0)",
"expect" :
{
"name" : "Wget",
"version" : "1.12",
"major" : "1"
}
},
{
"desc" : "Winamp",
"ua" : "Winamp 2.81",
"expect" :
{
"name" : "Winamp",
"version" : "2.81",
"major" : "2"
}
},
{
"desc" : "Winamp",
"ua" : "WinampMPEG/2.00",
"expect" :
{
"name" : "Winamp",
"version" : "2.00",
"major" : "2"
}
},
{
"desc" : "Windows Media Player",
"ua" : "Windows-Media-Player/10.00.00.4019",
"expect" :
{
"name" : "Windows Media Player",
"version" : "10.00.00.4019",
"major" : "10"
}
},
{
"desc" : "XBMC",
"ua" : "XBMC/12.0 Git:20130127-fb595f2 (Windows NT 6.1;WOW64;Win64;x64; http://www.xbmc.org)",
"expect" :
{
"name" : "XBMC",
"version" : "12.0",
"major" : "12"
}
},
{
"desc" : "rad.io",
"ua" : "rad.io 1.18.1 rv:593 (iPhone 4S; iPhone OS 7.0.4; it_IT)",
"expect" :
{
"name" : "rad.io",
"version" : "1.18.1",
"major" : "1"
}
},
{
"desc" : "BE-Test",
"ua" : "APP-BE Test/1.0 (iPad; Apple; CPU iPhone OS 7_0_2 like Mac OS X)",
"expect" :
{
"name" : "BE Test",
"version" : "1.0",
"major" : "1"
}
}
]

875
node_modules/ua-parser-js/test/os-test.json generated vendored Normal file
View File

@ -0,0 +1,875 @@
[
{
"desc" : "Windows 95",
"ua" : "Mozilla/1.22 (compatible; MSIE 2.0; Windows 95)",
"expect" :
{
"name" : "Windows",
"version" : "95"
}
},
{
"desc" : "Windows 98",
"ua" : "Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)",
"expect" :
{
"name" : "Windows",
"version" : "98"
}
},
{
"desc" : "Windows ME",
"ua" : "Mozilla/5.0 (Windows; U; Win 9x 4.90) Gecko/20020502 CS 2000 7.0/7.0",
"expect" :
{
"name" : "Windows",
"version" : "ME"
}
},
{
"desc" : "Windows 2000",
"ua" : "Mozilla/3.0 (compatible; MSIE 3.0; Windows NT 5.0)",
"expect" :
{
"name" : "Windows",
"version" : "2000"
}
},
{
"desc" : "Windows XP",
"ua" : "Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 5.2)",
"expect" :
{
"name" : "Windows",
"version" : "XP"
}
},
{
"desc" : "Windows Vista",
"ua" : "Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.0; fr-FR)",
"expect" :
{
"name" : "Windows",
"version" : "Vista"
}
},
{
"desc" : "Windows 7",
"ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)",
"expect" :
{
"name" : "Windows",
"version" : "7"
}
},
{
"desc" : "Windows 8",
"ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; Win64; x64; Trident/6.0; .NET4.0E; .NET4.0C)",
"expect" :
{
"name" : "Windows",
"version" : "8"
}
},
{
"desc" : "Windows 10",
"ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0",
"expect" :
{
"name" : "Windows",
"version" : "10"
}
},
{
"desc" : "Windows RT",
"ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0)",
"expect" :
{
"name" : "Windows",
"version" : "RT"
}
},
{
"desc" : "Windows CE",
"ua" : "Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 7.11)",
"expect" :
{
"name" : "Windows",
"version" : "CE"
}
},
{
"desc" : "Windows Mobile",
"ua" : "Mozilla/5.0 (ZTE-E_N72/N72V1.0.0B02;U;Windows Mobile/6.1;Profile/MIDP-2.0 Configuration/CLDC-1.1;320*240;CTC/2.0) IE/6.0 (compatible; MSIE 4.01; Windows CE; PPC)/UC Browser7.7.1.88",
"expect" :
{
"name" : "Windows Mobile",
"version" : "6.1"
}
},
{
"desc" : "Windows Phone",
"ua" : "Opera/9.80 (Windows Phone; Opera Mini/7.6.8/35.7518; U; ru) Presto/2.8.119 Version/11.10",
"expect" :
{
"name" : "Windows Phone",
"version" : "undefined"
}
},
{
"desc" : "Windows Phone OS",
"ua" : "Mozilla/4.0 (compatible; MSIE 7.0; Windows Phone OS 7.0; Trident/3.1; IEMobile/7.0; DELL; Venue Pro)",
"expect" :
{
"name" : "Windows Phone OS",
"version" : "7.0"
}
},
{
"desc" : "Windows Phone 8",
"ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; HTC; Windows Phone 8X by HTC)",
"expect" :
{
"name" : "Windows Phone",
"version" : "8.0"
}
},
{
"desc" : "BlackBerry",
"ua" : "BlackBerry9300/5.0.0.912 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/378",
"expect" :
{
"name" : "BlackBerry",
"version" : "5.0.0.912"
}
},
{
"desc" : "BlackBerry 10",
"ua" : "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.3+ (KHTML, like Gecko) Version/10.0.9.386 Mobile Safari/537.3+",
"expect" :
{
"name" : "BlackBerry",
"version" : "10"
}
},
{
"desc" : "Tizen",
"ua" : "Mozilla/5.0 (SMART-TV; Linux; Tizen 2.3) AppleWebkit/538.1 (KHTML, like Gecko) SamsungBrowser/1.0 TV Safari/538.1",
"expect" :
{
"name" : "Tizen",
"version" : "2.3"
}
},
{
"desc" : "Tizen",
"ua" : "Mozilla/5.0 (Linux; Tizen 2.3; SAMSUNG SM-Z130H) AppleWebKit/537.3 (KHTML, like Gecko) Version/2.3 Mobile Safari/537.3",
"expect" :
{
"name" : "Tizen",
"version" : "2.3"
}
},
{
"desc" : "Android",
"ua" : "Mozilla/5.0 (Linux; U; Android 2.2.2; en-us; VM670 Build/FRG83G) AppleWebKit/533.1 (KHTML, like Gecko)",
"expect" :
{
"name" : "Android",
"version" : "2.2.2"
}
},
{
"desc" : "Sailfish",
"ua" : "Mozilla/5.0 (Linux; U; Sailfish 3.0; Mobile; rv:45.0) Gecko/45.0 Firefox/45.0 SailfishBrowser/1.0",
"expect" :
{
"name" : "Sailfish",
"version" : "3.0"
}
},
{
"desc" : "WebOS",
"ua" : "Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.5; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/234.83 Safari/534.6 TouchPad/1.0",
"expect" :
{
"name" : "webOS",
"version" : "3.0.5"
}
},
{
"desc" : "WebOS",
"ua" : "Mozilla/5.0 (webOS/1.4.5; U; en-US) AppleWebKit/532.2 (KHTML, like Gecko) Version/1.0 Safari/532.2 Pre/1.0",
"expect" :
{
"name" : "webOS",
"version" : "1.4.5"
}
},
{
"desc" : "QNX",
"ua" : "Mozilla/5.0 (Photon; U; QNX x86pc; en-US; rv:1.8.1.20) Gecko/20090127 BonEcho/2.0.0.20",
"expect" :
{
"name" : "QNX",
"version" : "x86pc"
}
},
{
"desc" : "Bada",
"ua" : "Mozilla/5.0 (SAMSUNG; SAMSUNG-GT-S5253/S5253DDKC1; U; Bada/1.0; en-us) AppleWebKit/533.1 (KHTML, like Gecko) Dolfin/2.0 Mobile WQVGA SMM-MMS/1.2.0 OPN-B",
"expect" :
{
"name" : "Bada",
"version" : "1.0"
}
},
{
"desc" : "RIM Tablet OS",
"ua" : "Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+",
"expect" :
{
"name" : "RIM Tablet OS",
"version" : "2.1.0"
}
},
{
"desc" : "MeeGo",
"ua" : "Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13",
"expect" :
{
"name" : "MeeGo",
"version" : "undefined"
}
},
{
"desc" : "Symbian",
"ua" : "Nokia5250/10.0.011 (SymbianOS/9.4; U; Series60/5.0 Mozilla/5.0; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/525 (KHTML, like Gecko) Safari/525 3gpp-gba",
"expect" :
{
"name" : "Symbian",
"version" : "9.4"
}
},
{
"desc" : "Symbian",
"ua" : "Mozilla/5.0 (Symbian/3; Series60/5.2 NokiaC7-00/024.001; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/533.4 (KHTML, like Gecko) NokiaBrowser/7.3.1.37 Mobile Safari/533.4 3gpp-gba",
"expect" :
{
"name" : "Symbian",
"version" : "5.2"
}
},
{
"desc" : "Series40",
"ua" : "Mozilla/5.0 (Series40; Nokia2055/03.20; Profile/MIDP-2.1 Configuration/CLDC-1.1) Gecko/20100401 S40OviBrowser/2.2.0.0.34",
"expect" :
{
"name" : "Series40",
"version" : "undefined"
}
},
{
"desc" : "Firefox OS",
"ua" : "Mozilla/5.0 (Mobile; rv:14.0) Gecko/14.0 Firefox/14.0",
"expect" :
{
"name" : "Firefox OS",
"version" : "undefined"
}
},
{
"desc" : "Google Chromecast",
"ua" : "Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.81 Safari/537.36 CrKey/1.42.183786",
"expect" :
{
"name" : "Chromecast",
"version" : "1.42.183786"
}
},
{
"desc" : "Nintendo Switch",
"ua" : "Mozilla/5.0 (Nintendo Switch; WifiWebAuthApplet) AppleWebKit/606.4 (KHTML, like Gecko) NF/6.0.1.15.4 NintendoBrowser/5.1.0.20393",
"expect" :
{
"name" : "Nintendo",
"version" : "Switch"
}
},
{
"desc" : "PlayStation 4",
"ua" : "Mozilla/5.0 (PlayStation 4 3.00) AppleWebKit/537.73 (KHTML, like Gecko)",
"expect" :
{
"name" : "PlayStation",
"version" : "4"
}
},
{
"desc" : "Xbox 360",
"ua" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64; Xbox; Xbox 360) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36",
"expect" :
{
"name" : "Xbox",
"version" : "360"
}
},
{
"desc" : "Xbox One",
"ua" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64; Xbox; Xbox One; WebView/3.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.19041",
"expect" :
{
"name" : "Xbox",
"version" : "One"
}
},
{
"desc" : "Xbox X",
"ua" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64; Xbox; Xbox X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36 Edge/20.02",
"expect" :
{
"name" : "Xbox",
"version" : "X"
}
},
{
"desc" : "Xbox Series X",
"ua" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64; Xbox; Xbox Series X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36 Edge/20.02 ",
"expect" :
{
"name" : "Xbox",
"version" : "Series X"
}
},
{
"desc" : "Mint",
"ua" : "Opera/9.80 (X11; Linux x86_64; Edition Linux Mint) Presto/2.12.388 Version/12.16",
"expect" :
{
"name" : "Mint",
"version" : "undefined"
}
},
{
"desc" : "Mint",
"ua" : "Opera/9.64 (X11; Linux i686; U; Linux Mint; nb) Presto/2.1.1",
"expect" :
{
"name" : "Mint",
"version" : "undefined"
}
},
{
"desc" : "Mint",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2008121622 Linux Mint/6 (Felicia) Firefox/3.0.4",
"expect" :
{
"name" : "Mint",
"version" : "6"
}
},
{
"desc" : "Ubuntu",
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ Ubuntu/12.04 (3.4.1-0ubuntu1) Epiphany/3.4.1",
"expect" :
{
"name" : "Ubuntu",
"version" : "12.04"
}
},
{
"desc" : "Ubuntu",
"ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/31.0.1650.63 Chrome/31.0.1650.63 Safari/537.36",
"expect" :
{
"name" : "Ubuntu",
"version" : "undefined"
}
},
{
"desc" : "Kubuntu",
"ua" : "Mozilla/5.0 (compatible; Konqueror/4.4; Linux 2.6.32-22-generic; X11; en_US) KHTML/4.4.3 (like Gecko) Kubuntu",
"expect" :
{
"name" : "Kubuntu",
"version" : "undefined"
}
},
{
"desc" : "Debian",
"ua" : "Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.7 (like Gecko) (Debian)",
"expect" :
{
"name" : "Debian",
"version" : "undefined"
}
},
{
"desc" : "Debian",
"ua" : "Mozilla/5.0 (X11; Linux x86_64; Debian GNU/Linux 8.1 (jessie)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.0 Maxthon/1.0.5.3 Safari/537.36",
"expect" :
{
"name" : "Debian",
"version" : "8.1"
}
},
{
"desc" : "Debian",
"ua" : "ELinks/0.12~pre5-4 (textmode; Debian; Linux 3.2.0-4-amd64 x86_64 192x47-2)",
"expect" :
{
"name" : "Debian",
"version" : "undefined"
}
},
{
"desc" : "Debian",
"ua" : "w3m/0.5.3+debian-19",
"expect" :
{
"name" : "debian",
"version" : "19"
}
},
{
"desc" : "Debian",
"ua" : "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.3) Gecko/2008092814 (Debian-3.0.1-1)",
"expect" :
{
"name" : "Debian",
"version" : "3.0.1-1"
}
},
{
"desc" : "Debian",
"ua" : "Mozilla/5.0 (compatible; Konqueror/3.5; Linux 2.6.24.4; X11) KHTML/3.5.9 (like Gecko) (Debian package 4:3.5.9.dfsg.1-2+b1)",
"expect" :
{
"name" : "Debian",
"version" : "undefined"
}
},
{
"desc" : "OpenSUSE",
"ua" : "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110420 SUSE/3.6.17-0.2.1 Firefox/3.6.17",
"expect" :
{
"name" : "SUSE",
"version" : "3.6.17-0.2.1"
}
},
{
"desc" : "Gentoo",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16) Gecko/20080716 (Gentoo) Galeon/2.0.6",
"expect" :
{
"name" : "Gentoo",
"version" : "undefined"
}
},
{
"desc" : "Gentoo",
"ua" : "Xombrero (X11; U; Gentoo Linux amd64; en-US) Webkit/2.8.5",
"expect" :
{
"name" : "Gentoo",
"version" : "amd64"
}
},
{
"desc" : "Gentoo",
"ua" : "Xombrero/1.6.4 (Linux amd64; en; Gentoo)",
"expect" :
{
"name" : "Gentoo",
"version" : "undefined"
}
},
{
"desc" : "Gentoo",
"ua" : "Links (2.8; Linux 3.17.2-gentoo-x86 i686; GNU C 4.8.2; x)",
"expect" :
{
"name" : "gentoo",
"version" : "x86"
}
},
{
"desc" : "Arch",
"ua" : "Uzbl (Webkit 1.1.10) (Arch Linux)",
"expect" :
{
"name" : "Arch",
"version" : "undefined"
}
},
{
"desc" : "Slackware",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
},
{
"desc" : "Fedora",
"ua" : "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0",
"expect" :
{
"name" : "Fedora",
"version" : "undefined"
}
},
{
"desc" : "Fedora",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:2.0) Gecko/20110404 Fedora/16-dev Firefox/4.0",
"expect" :
{
"name" : "Fedora",
"version" : "16-dev"
}
},
{
"desc" : "Fedora",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; sk; rv:1.9.0.4) Gecko/2008111217 Fedora/3.0.4-1.fc10 Firefox/3.0.4",
"expect" :
{
"name" : "Fedora",
"version" : "3.0.4-1.fc10"
}
},
{
"desc" : "Mandriva",
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.22) Gecko/20110907 Mandriva Linux/1.9.2.22-0.1mdv2010.2 (2010.2) Firefox/3.6.22",
"expect" :
{
"name" : "Mandriva",
"version" : "1.9.2.22-0.1mdv2010.2"
}
},
{
"desc" : "Chromium OS",
"ua" : "Mozilla/5.0 (X11; CrOS x86_64 10575.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
"expect" :
{
"name" : "Chromium OS",
"version" : "10575.58.0"
}
},
{
"desc" : "Fuchsia",
"ua" : "Mozilla/5.0 (X11; Fuchsia x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3557.0 Safari/537.36",
"expect" :
{
"name" : "Fuchsia",
"version" : "undefined"
}
},
{
"desc" : "Solaris",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
},
{
"desc" : "FreeBSD",
"ua" : "Mozilla/5.0 (X11; U; FreeBSD x86_64; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16",
"expect" :
{
"name" : "FreeBSD",
"version" : "undefined"
}
},
{
"desc" : "OpenBSD",
"ua" : "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.9.1) Gecko/20090702 Firefox/3.5",
"expect" :
{
"name" : "OpenBSD",
"version" : "undefined"
}
},
{
"desc" : "NetBSD",
"ua" : "ELinks (0.4.3; NetBSD 3.0.2PATCH sparc64; 141x19)",
"expect" :
{
"name" : "NetBSD",
"version" : "3.0.2PATCH"
}
},
{
"desc" : "DragonFly",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
},
{
"desc" : "iOS in App",
"ua" : "AppName/version CFNetwork/version Darwin/version",
"expect" :
{
"name" : "iOS",
"version" : "undefined"
}
},
{
"desc" : "iOS with Chrome",
"ua" : "Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; en) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3",
"expect" :
{
"name" : "iOS",
"version" : "5.1.1"
}
},
{
"desc" : "iOS with Opera Mini",
"ua" : "Opera/9.80 (iPhone; Opera Mini/7.1.32694/27.1407; U; en) Presto/2.8.119 Version/11.10",
"expect" :
{
"name" : "iOS",
"version" : "undefined"
}
},
{
"desc" : "Mac OS",
"ua" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36",
"expect" :
{
"name" : "Mac OS",
"version" : "10.6.8"
}
},
{
"desc" : "Haiku",
"ua" : "Mozilla/5.0 (Macintosh; Intel Haiku R1 x86) AppleWebKit/602.1.1 (KHTML, like Gecko) WebPositive/1.2 Version/8.0 Safari/602.1.1",
"expect" :
{
"name" : "Haiku",
"version" : "R1"
}
},
{
"desc" : "KaiOS",
"ua" : "Mozilla/5.0 (Mobile; Nokia_8110_4G; rv:48.0) Gecko/48.0 Firefox/48.0 KAIOS/2.5",
"expect" :
{
"name" : "KAIOS",
"version" : "2.5"
}
},
{
"desc" : "iTunes Windows Vista",
"ua" : "iTunes/10.7 (Windows; Microsoft Windows Vista Home Premium Edition Service Pack 1 (Build 6001)) AppleWebKit/536.26.9",
"expect" :
{
"name" : "Windows",
"version" : "Vista"
}
},
{
"desc" : "iOS BE App",
"ua" : "APP-BE Test/1.0 (iPad; Apple; CPU iPhone OS 7_0_2 like Mac OS X)",
"expect" :
{
"name" : "iOS",
"version" : "7.0.2"
}
},
{
"desc" : "KTB-Nexus 5",
"ua" : "APP-My App/1.0 (Linux; Android 4.2.1; Nexus 5 Build/JOP40D)",
"expect" :
{
"name" : "Android",
"version" : "4.2.1"
}
},
{
"desc" : "Solaris",
"ua" : "NCSA Mosaic/1.0 (X11;SunOS 4.1.4 sun4m)",
"expect" :
{
"name" : "Solaris",
"version" : "4.1.4"
}
},
{
"desc" : "Raspbian",
"ua" : "Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Raspbian Chromium/72.0.3626.121 HeadlessChrome/72.0.3626.121 Safari/537.36",
"expect" :
{
"name" : "Raspbian",
"version" : "undefined"
}
},
{
"desc" : "Raspbian",
"ua" : "Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/538.15 (KHTML, like Gecko) Version/8.0 Safari/538.15 Raspbian/9.0 (1:3.8.2.0-0rpi28) Epiphany/3.8.2",
"expect" :
{
"name" : "Raspbian",
"version" : "9.0"
}
},
{
"desc" : "AIX",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
},
{
"desc" : "Plan9",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
},
{
"desc" : "Minix",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
},
{
"desc" : "BeOS",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
},
{
"desc" : "OS/2",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
},
{
"desc" : "AmigaOS",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
},
{
"desc" : "MorphOS",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
},
{
"desc" : "UNIX",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
},
{
"desc" : "Joli",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
},
{
"desc" : "CentOS",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
},
{
"desc" : "PCLinuxOS",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
},
{
"desc" : "RedHat",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
},
{
"desc" : "Zenwalk",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
},
{
"desc" : "Hurd",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
},
{
"desc" : "Linux",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
},
{
"desc" : "GNU",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
},
{
"desc" : "Palm OS",
"ua" : "",
"expect" :
{
"name" : "",
"version" : ""
}
}
]

151
node_modules/ua-parser-js/test/test.js generated vendored Normal file

File diff suppressed because one or more lines are too long